From a7371b9a8565682198860730497eca5f717bb976 Mon Sep 17 00:00:00 2001 From: mk360 Date: Fri, 24 Jul 2020 18:48:17 +0300 Subject: [PATCH 001/241] [types] allow Text#setPadding to receive an object --- src/gameobjects/text/static/Text.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gameobjects/text/static/Text.js b/src/gameobjects/text/static/Text.js index e48bd63e8..193120475 100644 --- a/src/gameobjects/text/static/Text.js +++ b/src/gameobjects/text/static/Text.js @@ -1022,9 +1022,9 @@ var Text = new Class({ * @since 3.0.0 * * @param {(number|Phaser.Types.GameObjects.Text.TextPadding)} left - The left padding value, or a padding config object. - * @param {number} top - The top padding value. - * @param {number} right - The right padding value. - * @param {number} bottom - The bottom padding value. + * @param {[number]} top - The top padding value. + * @param {[number]} right - The right padding value. + * @param {[number]} bottom - The bottom padding value. * * @return {this} This Text object. */ From 6915fd3420b153c285249356dd41d711387110c5 Mon Sep 17 00:00:00 2001 From: halilcakar Date: Sun, 9 Aug 2020 19:55:09 +0300 Subject: [PATCH 002/241] Fix incorrect event names in ProcessQueue.js#205, 222 --- src/structs/ProcessQueue.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/structs/ProcessQueue.js b/src/structs/ProcessQueue.js index d1831fd0d..9c38410e4 100644 --- a/src/structs/ProcessQueue.js +++ b/src/structs/ProcessQueue.js @@ -11,7 +11,7 @@ var Events = require('./events'); /** * @classdesc * A Process Queue maintains three internal lists. - * + * * The `pending` list is a selection of items which are due to be made 'active' in the next update. * The `active` list is a selection of items which are considered active and should be updated. * The `destroy` list is a selection of items that were active and are awaiting being destroyed in the next update. @@ -92,7 +92,7 @@ var ProcessQueue = new Class({ /** * Adds a new item to the Process Queue. - * + * * The item is added to the pending list and made active in the next update. * * @method Phaser.Structs.ProcessQueue#add @@ -116,7 +116,7 @@ var ProcessQueue = new Class({ /** * Removes an item from the Process Queue. - * + * * The item is added to the pending destroy and fully removed in the next update. * * @method Phaser.Structs.ProcessQueue#remove @@ -140,7 +140,7 @@ var ProcessQueue = new Class({ /** * Removes all active items from this Process Queue. - * + * * All the items are marked as 'pending destroy' and fully removed in the next update. * * @method Phaser.Structs.ProcessQueue#removeAll @@ -166,7 +166,7 @@ var ProcessQueue = new Class({ /** * Update this queue. First it will process any items awaiting destruction, and remove them. - * + * * Then it will check to see if there are any items pending insertion, and move them to an * active state. Finally, it will return a list of active items for further processing. * @@ -202,7 +202,7 @@ var ProcessQueue = new Class({ { active.splice(idx, 1); - this.emit(Events.REMOVE, item); + this.emit(Events.PROCESS_QUEUE_REMOVE, item); } } @@ -219,7 +219,7 @@ var ProcessQueue = new Class({ this._active.push(item); - this.emit(Events.ADD, item); + this.emit(Events.PROCESS_QUEUE_ADD, item); } list.length = 0; @@ -232,7 +232,7 @@ var ProcessQueue = new Class({ /** * Returns the current list of active items. - * + * * This method returns a reference to the active list array, not a copy of it. * Therefore, be careful to not modify this array outside of the ProcessQueue. * From 8e1b5e757d69056d832af186fc6fad66e8517e6c Mon Sep 17 00:00:00 2001 From: Bulat Khasanov Date: Sun, 9 Aug 2020 23:31:50 +0300 Subject: [PATCH 003/241] Allow to pass font in TextStyle --- src/gameobjects/text/typedefs/TextStyle.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gameobjects/text/typedefs/TextStyle.js b/src/gameobjects/text/typedefs/TextStyle.js index 7a496fdd0..d7fc5e526 100644 --- a/src/gameobjects/text/typedefs/TextStyle.js +++ b/src/gameobjects/text/typedefs/TextStyle.js @@ -7,6 +7,7 @@ * @property {string} [fontFamily='Courier'] - The font the Text object will render with. This is a Canvas style font string. * @property {string} [fontSize='16px'] - The font size, as a CSS size string. * @property {string} [fontStyle] - Any addition font styles, such as 'strong'. + * @property {string} [font] - The font family or font settings to set. Overrides the other font settings. * @property {string} [backgroundColor] - A solid fill color that is rendered behind the Text object. Given as a CSS string color such as `#ff0`. * @property {string} [color='#fff'] - The color the Text is drawn in. Given as a CSS string color such as `#fff` or `rgb()`. * @property {string} [stroke='#fff'] - The color used to stroke the Text if the `strokeThickness` property is greater than zero. From 748e699d43c6c938da0ad0ac3b8358b547bcffe9 Mon Sep 17 00:00:00 2001 From: mk360 Date: Mon, 10 Aug 2020 08:21:26 +0300 Subject: [PATCH 004/241] update setPadding jsdoc --- src/gameobjects/text/static/Text.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gameobjects/text/static/Text.js b/src/gameobjects/text/static/Text.js index 193120475..03c33b4e1 100644 --- a/src/gameobjects/text/static/Text.js +++ b/src/gameobjects/text/static/Text.js @@ -1022,9 +1022,9 @@ var Text = new Class({ * @since 3.0.0 * * @param {(number|Phaser.Types.GameObjects.Text.TextPadding)} left - The left padding value, or a padding config object. - * @param {[number]} top - The top padding value. - * @param {[number]} right - The right padding value. - * @param {[number]} bottom - The bottom padding value. + * @param {number} [top] - The top padding value. + * @param {number} [right] - The right padding value. + * @param {number} [bottom] - The bottom padding value. * * @return {this} This Text object. */ From ceb96665b89c7eead6c7713c1a89d8645deabdc9 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 17 Aug 2020 15:05:39 +0100 Subject: [PATCH 005/241] Bumped version --- package.json | 2 +- src/const.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 7c4646ccd..034b0f5c5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "phaser", - "version": "3.50.0-beta.1", + "version": "3.50.0-beta.2", "release": "Subaru", "description": "A fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers.", "author": "Richard Davey (http://www.photonstorm.com)", diff --git a/src/const.js b/src/const.js index fbc8f1282..7b70942a3 100644 --- a/src/const.js +++ b/src/const.js @@ -20,7 +20,7 @@ var CONST = { * @type {string} * @since 3.0.0 */ - VERSION: '3.50.0-beta.1', + VERSION: '3.50.0-beta.2', BlendModes: require('./renderer/BlendModes'), From 06c92f9af822dd5fe7d076e93281db99779d8cc2 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 17 Aug 2020 15:05:46 +0100 Subject: [PATCH 006/241] `Geom.Intersects.GetRaysFromPointToPolygon` is a new function that emits rays out from the given point and detects for intersection against all given polygons, returning the points of intersection in the results array. --- .../intersects/GetRaysFromPointToPolygon.js | 83 +++++++++++++++++++ src/geom/intersects/index.js | 1 + 2 files changed, 84 insertions(+) create mode 100644 src/geom/intersects/GetRaysFromPointToPolygon.js diff --git a/src/geom/intersects/GetRaysFromPointToPolygon.js b/src/geom/intersects/GetRaysFromPointToPolygon.js new file mode 100644 index 000000000..47fe6837d --- /dev/null +++ b/src/geom/intersects/GetRaysFromPointToPolygon.js @@ -0,0 +1,83 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Vector4 = require('../../math/Vector4'); +var GetLineToPolygon = require('./GetLineToPolygon'); +var Line = require('../line/Line'); + +// Temp calculation segment +var segment = new Line(); + +function CheckIntersects (angle, x, y, polygons, intersects) +{ + var dx = Math.cos(angle); + var dy = Math.sin(angle); + + segment.setTo(x, y, x + dx, y + dy); + + var closestIntersect = GetLineToPolygon(segment, polygons); + + if (closestIntersect) + { + intersects.push(new Vector4(closestIntersect.x, closestIntersect.y, angle, closestIntersect.w)); + } +} + +function SortIntersects (a, b) +{ + return a.z - b.z; +} + +/** + * Projects rays out from the given point to each line segment of the polygons. + * + * If the rays intersect with the polygons, the points of intersection are returned in an array. + * + * If no intersections are found, the returned array will be empty. + * + * Each Vector4 intersection result has the following properties: + * + * The `x` and `y` components contain the point of the intersection. + * The `z` component contains the angle of intersection. + * The `w` component contains the index of the polygon, in the given array, that triggered the intersection. + * + * @function Phaser.Geom.Intersects.GetRaysFromPointToPolygon + * @since 3.50.0 + * + * @param {number} x - The x coordinate to project the rays from. + * @param {number} y - The y coordinate to project the rays from. + * @param {Phaser.Geom.Polygon | Phaser.Geom.Polygon[]} polygons - A single polygon, or array of polygons, to check against the rays. + * + * @return {Phaser.Math.Vector4[]} An array containing all intersections in Vector4s. + */ +var GetRaysFromPointToPolygon = function (x, y, polygons) +{ + if (!Array.isArray(polygons)) + { + polygons = [ polygons ]; + } + + var intersects = []; + + for (var i = 0; i < polygons.length; i++) + { + var points = polygons[i].points; + + for (var p = 0; p < points.length; p++) + { + var angle = Math.atan2(points[p].y - y, points[p].x - x); + + // +- 0.00001 rads to catch lines behind segment corners + CheckIntersects(angle, x, y, polygons, intersects); + CheckIntersects(angle - 0.00001, x, y, polygons, intersects); + CheckIntersects(angle + 0.00001, x, y, polygons, intersects); + } + } + + return intersects.sort(SortIntersects); +}; + +module.exports = GetRaysFromPointToPolygon; diff --git a/src/geom/intersects/index.js b/src/geom/intersects/index.js index 68e7cfb37..2f5c1882c 100644 --- a/src/geom/intersects/index.js +++ b/src/geom/intersects/index.js @@ -18,6 +18,7 @@ module.exports = { GetLineToLine: require('./GetLineToLine'), GetLineToPolygon: require('./GetLineToPolygon'), GetLineToRectangle: require('./GetLineToRectangle'), + GetRaysFromPointToPolygon: require('./GetRaysFromPointToPolygon'), GetRectangleIntersection: require('./GetRectangleIntersection'), GetRectangleToRectangle: require('./GetRectangleToRectangle'), GetRectangleToTriangle: require('./GetRectangleToTriangle'), From 0c06bb20e0243bef79c589120193571f61016a83 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 17 Aug 2020 15:05:49 +0100 Subject: [PATCH 007/241] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e71832404..ccf376f5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -142,6 +142,7 @@ If you used any of them in your code, please update to the new function names be * `WebGLRenderer.setInt1iv` will allow you to look-up and set a 1iv uniform on the given shader. * `Geom.Intersects.GetLineToLine` is a new function that will return a Vector3 containing the point of intersection between 2 line segments, with the `z` property holding the distance value. * `Geom.Intersects.GetLineToPolygon` is a new function that checks for the closest point of intersection between a line segment and an array of polygons. +* `Geom.Intersects.GetRaysFromPointToPolygon` is a new function that emits rays out from the given point and detects for intersection against all given polygons, returning the points of intersection in the results array. * `Geom.Polygon.Translate` is a new function that allows you to translate all the points of a polygon by the given values. * `Phaser.Types.Math.Vector3Like` is a new data type representing as Vector 3 like object. * `Phaser.Types.Math.Vector4Like` is a new data type representing as Vector 4 like object. From 4678fc7186f44924c8bf850f83ccbe419162cb3b Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 18 Aug 2020 17:04:32 +0100 Subject: [PATCH 008/241] `Geom.Intersects.GetLineToPoints` is a new function that checks for the closest point of intersection between a line segment and an array of points, where each pair of points form a line segment. --- src/geom/intersects/GetLineToPoints.js | 71 ++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 src/geom/intersects/GetLineToPoints.js diff --git a/src/geom/intersects/GetLineToPoints.js b/src/geom/intersects/GetLineToPoints.js new file mode 100644 index 000000000..3dc28f65a --- /dev/null +++ b/src/geom/intersects/GetLineToPoints.js @@ -0,0 +1,71 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Vector3 = require('../../math/Vector3'); +var GetLineToLine = require('./GetLineToLine'); +var Line = require('../line/Line'); + +// Temp calculation segment +var segment = new Line(); + +// Temp vec3 +var tempIntersect = new Vector3(); + +/** + * Checks for the closest point of intersection between a line segment and an array of points, where each pair + * of points are converted to line segments for the intersection tests. + * + * If no intersection is found, this function returns `null`. + * + * If intersection was found, a Vector3 is returned with the following properties: + * + * The `x` and `y` components contain the point of the intersection. + * The `z` component contains the closest distance. + * + * @function Phaser.Geom.Intersects.GetLineToPoints + * @since 3.50.0 + * + * @param {Phaser.Geom.Line} line - The line segment to check. + * @param {Phaser.Math.Vector2[] | Phaser.Geom.Point[]} points - An array of points to check. + * @param {Phaser.Math.Vector3} [out] - A Vector3 to store the intersection results in. + * + * @return {Phaser.Math.Vector3} A Vector3 containing the intersection results, or `null`. + */ +var GetLineToPoints = function (line, points, out) +{ + if (out === undefined) { out = new Vector3(); } + + var closestIntersect = false; + + // Reset our vec3s + out.set(); + tempIntersect.set(); + + var prev = points[0]; + + for (var i = 1; i < points.length; i++) + { + var current = points[i]; + + segment.setTo(prev.x, prev.y, current.x, current.y); + + prev = current; + + if (GetLineToLine(line, segment, tempIntersect)) + { + if (!closestIntersect || tempIntersect.z < out.z) + { + out.copy(tempIntersect); + + closestIntersect = true; + } + } + } + + return (closestIntersect) ? out : null; +}; + +module.exports = GetLineToPoints; From 1a1275958f4d4788f82bdcdf4eb518ae61bb9f5f Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 18 Aug 2020 17:04:55 +0100 Subject: [PATCH 009/241] Only test unique angles --- src/geom/intersects/GetRaysFromPointToPolygon.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/geom/intersects/GetRaysFromPointToPolygon.js b/src/geom/intersects/GetRaysFromPointToPolygon.js index 47fe6837d..f5a3f8e33 100644 --- a/src/geom/intersects/GetRaysFromPointToPolygon.js +++ b/src/geom/intersects/GetRaysFromPointToPolygon.js @@ -61,6 +61,7 @@ var GetRaysFromPointToPolygon = function (x, y, polygons) } var intersects = []; + var angles = []; for (var i = 0; i < polygons.length; i++) { @@ -70,10 +71,16 @@ var GetRaysFromPointToPolygon = function (x, y, polygons) { var angle = Math.atan2(points[p].y - y, points[p].x - x); - // +- 0.00001 rads to catch lines behind segment corners - CheckIntersects(angle, x, y, polygons, intersects); - CheckIntersects(angle - 0.00001, x, y, polygons, intersects); - CheckIntersects(angle + 0.00001, x, y, polygons, intersects); + if (angles.indexOf(angle) === -1) + { + // +- 0.00001 rads to catch lines behind segment corners + + CheckIntersects(angle, x, y, polygons, intersects); + CheckIntersects(angle - 0.00001, x, y, polygons, intersects); + CheckIntersects(angle + 0.00001, x, y, polygons, intersects); + + angles.push(angle); + } } } From 74f24a06f3a568bed35cbfa677d36d44a35c3860 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 18 Aug 2020 17:05:06 +0100 Subject: [PATCH 010/241] Use new GetLineToPoints function --- src/geom/intersects/GetLineToPolygon.js | 36 +++++-------------------- 1 file changed, 7 insertions(+), 29 deletions(-) diff --git a/src/geom/intersects/GetLineToPolygon.js b/src/geom/intersects/GetLineToPolygon.js index 5ab3d0846..f749dd4b9 100644 --- a/src/geom/intersects/GetLineToPolygon.js +++ b/src/geom/intersects/GetLineToPolygon.js @@ -6,11 +6,7 @@ var Vector3 = require('../../math/Vector3'); var Vector4 = require('../../math/Vector4'); -var GetLineToLine = require('./GetLineToLine'); -var Line = require('../line/Line'); - -// Temp calculation segment -var segment = new Line(); +var GetLineToPoints = require('./GetLineToPoints'); // Temp vec3 var tempIntersect = new Vector3(); @@ -37,10 +33,7 @@ var tempIntersect = new Vector3(); */ var GetLineToPolygon = function (line, polygons, out) { - if (out === undefined) - { - out = new Vector4(); - } + if (out === undefined) { out = new Vector4(); } if (!Array.isArray(polygons)) { @@ -49,32 +42,17 @@ var GetLineToPolygon = function (line, polygons, out) var closestIntersect = false; - // Reset our temporary vec4 + // Reset our vec4s + out.set(); tempIntersect.set(); - for (var p = 0; p < polygons.length; p++) + for (var i = 0; i < polygons.length; i++) { - var points = polygons[p].points; - - var prev = points[0]; - - for (var i = 1; i < points.length; i++) + if (GetLineToPoints(line, polygons[i].points, tempIntersect)) { - var current = points[i]; - - segment.setTo(prev.x, prev.y, current.x, current.y); - - prev = current; - - if (!GetLineToLine(line, segment, tempIntersect)) - { - // No intersection? Carry on ... - continue; - } - if (!closestIntersect || tempIntersect.z < out.z) { - out.set(tempIntersect.x, tempIntersect.y, tempIntersect.z, p); + out.set(tempIntersect.x, tempIntersect.y, tempIntersect.z, i); closestIntersect = true; } From 995cfb6271714f8602bb61f4d6a9ea1d7883bafe Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 18 Aug 2020 17:05:12 +0100 Subject: [PATCH 011/241] Expose new function --- src/geom/intersects/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/geom/intersects/index.js b/src/geom/intersects/index.js index 2f5c1882c..27a372470 100644 --- a/src/geom/intersects/index.js +++ b/src/geom/intersects/index.js @@ -16,6 +16,7 @@ module.exports = { GetCircleToRectangle: require('./GetCircleToRectangle'), GetLineToCircle: require('./GetLineToCircle'), GetLineToLine: require('./GetLineToLine'), + GetLineToPoints: require('./GetLineToPoints'), GetLineToPolygon: require('./GetLineToPolygon'), GetLineToRectangle: require('./GetLineToRectangle'), GetRaysFromPointToPolygon: require('./GetRaysFromPointToPolygon'), From 24e3a0ca42e044f6d8774fc9885feac987305e4a Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 18 Aug 2020 17:05:16 +0100 Subject: [PATCH 012/241] Update CHANGELOG.md --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ccf376f5f..221454193 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -139,11 +139,12 @@ If you used any of them in your code, please update to the new function names be ### New Features -* `WebGLRenderer.setInt1iv` will allow you to look-up and set a 1iv uniform on the given shader. * `Geom.Intersects.GetLineToLine` is a new function that will return a Vector3 containing the point of intersection between 2 line segments, with the `z` property holding the distance value. * `Geom.Intersects.GetLineToPolygon` is a new function that checks for the closest point of intersection between a line segment and an array of polygons. +* `Geom.Intersects.GetLineToPoints` is a new function that checks for the closest point of intersection between a line segment and an array of points, where each pair of points form a line segment. * `Geom.Intersects.GetRaysFromPointToPolygon` is a new function that emits rays out from the given point and detects for intersection against all given polygons, returning the points of intersection in the results array. * `Geom.Polygon.Translate` is a new function that allows you to translate all the points of a polygon by the given values. +* `WebGLRenderer.setInt1iv` will allow you to look-up and set a 1iv uniform on the given shader. * `Phaser.Types.Math.Vector3Like` is a new data type representing as Vector 3 like object. * `Phaser.Types.Math.Vector4Like` is a new data type representing as Vector 4 like object. * `Transform.getLocalPoint` is a new method, available on all Game Objects, that takes an `x` / `y` pair and translates them into the local space of the Game Object, factoring in parent transforms and display origins. From 616dbfceb541a615cd97ca90ce27d5957bb28885 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 18 Aug 2020 17:24:45 +0100 Subject: [PATCH 013/241] Earcut, used for polygon triangulation, has been updated from 2.1.4 to 2.2.2. --- src/geom/polygon/Earcut.js | 69 +++++++++++++++++++++++++++----------- 1 file changed, 49 insertions(+), 20 deletions(-) diff --git a/src/geom/polygon/Earcut.js b/src/geom/polygon/Earcut.js index e4babbf1e..3e55e3a82 100644 --- a/src/geom/polygon/Earcut.js +++ b/src/geom/polygon/Earcut.js @@ -4,17 +4,17 @@ * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -// Earcut 2.1.4 (December 4th 2018) +// Earcut 2.2.2 (January 21st 2020) /* * ISC License - * + * * Copyright (c) 2016, Mapbox - * + * * Permission to use, copy, modify, and/or distribute this software for any purpose * with or without fee is hereby granted, provided that the above copyright notice * and this permission notice appear in all copies. - * + * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, @@ -85,7 +85,7 @@ function linkedList(data, start, end, dim, clockwise) { return last; } -// eliminate collinear or duplicate points +// eliminate colinear or duplicate points function filterPoints(start, end) { if (!start) return start; if (!end) end = start; @@ -149,7 +149,7 @@ function earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) { // if this didn't work, try curing all small self-intersections locally } else if (pass === 1) { - ear = cureLocalIntersections(ear, triangles, dim); + ear = cureLocalIntersections(filterPoints(ear), triangles, dim); earcutLinked(ear, triangles, dim, minX, minY, invSize, 2); // as a last resort, try splitting the remaining polygon into two @@ -256,7 +256,7 @@ function cureLocalIntersections(start, triangles, dim) { p = p.next; } while (p !== start); - return p; + return filterPoints(p); } // try splitting polygon into two and triangulate them independently @@ -270,7 +270,7 @@ function splitEarcut(start, triangles, dim, minX, minY, invSize) { // split the polygon in two by the diagonal var c = splitPolygon(a, b); - // filter collinear points around the cuts + // filter colinear points around the cuts a = filterPoints(a, a.next); c = filterPoints(c, c.next); @@ -318,6 +318,9 @@ function eliminateHole(hole, outerNode) { outerNode = findHoleBridge(hole, outerNode); if (outerNode) { var b = splitPolygon(outerNode, hole); + + // filter collinear points around the cuts + filterPoints(outerNode, outerNode.next); filterPoints(b, b.next); } } @@ -349,7 +352,7 @@ function findHoleBridge(hole, outerNode) { if (!m) return null; - if (hx === qx) return m.prev; // hole touches outer segment; pick lower endpoint + if (hx === qx) return m; // hole touches outer segment; pick leftmost endpoint // look for points inside the triangle of hole point, segment intersection and endpoint; // if there are no points found, we have a valid connection; @@ -361,26 +364,32 @@ function findHoleBridge(hole, outerNode) { tanMin = Infinity, tan; - p = m.next; + p = m; - while (p !== stop) { + do { if (hx >= p.x && p.x >= mx && hx !== p.x && pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) { tan = Math.abs(hy - p.y) / (hx - p.x); // tangential - if ((tan < tanMin || (tan === tanMin && p.x > m.x)) && locallyInside(p, hole)) { + if (locallyInside(p, hole) && + (tan < tanMin || (tan === tanMin && (p.x > m.x || (p.x === m.x && sectorContainsSector(m, p)))))) { m = p; tanMin = tan; } } p = p.next; - } + } while (p !== stop); return m; } +// whether sector in vertex m contains sector in vertex p in the same coordinates +function sectorContainsSector(m, p) { + return area(m.prev, m, p.prev) < 0 && area(p.next, m, m.next) < 0; +} + // interlink polygon nodes in z-order function indexCurve(start, minX, minY, invSize) { var p = start; @@ -474,7 +483,7 @@ function getLeftmost(start) { var p = start, leftmost = start; do { - if (p.x < leftmost.x) leftmost = p; + if (p.x < leftmost.x || (p.x === leftmost.x && p.y < leftmost.y)) leftmost = p; p = p.next; } while (p !== start); @@ -490,8 +499,10 @@ function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) { // check if a diagonal between two polygon nodes is valid (lies in polygon interior) function isValidDiagonal(a, b) { - return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && - locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b); + return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && // dones't intersect other edges + (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible + (area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors + equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case } // signed area of a triangle @@ -506,10 +517,28 @@ function equals(p1, p2) { // check if two segments intersect function intersects(p1, q1, p2, q2) { - if ((equals(p1, q1) && equals(p2, q2)) || - (equals(p1, q2) && equals(p2, q1))) return true; - return area(p1, q1, p2) > 0 !== area(p1, q1, q2) > 0 && - area(p2, q2, p1) > 0 !== area(p2, q2, q1) > 0; + var o1 = sign(area(p1, q1, p2)); + var o2 = sign(area(p1, q1, q2)); + var o3 = sign(area(p2, q2, p1)); + var o4 = sign(area(p2, q2, q1)); + + if (o1 !== o2 && o3 !== o4) return true; // general case + + if (o1 === 0 && onSegment(p1, p2, q1)) return true; // p1, q1 and p2 are collinear and p2 lies on p1q1 + if (o2 === 0 && onSegment(p1, q2, q1)) return true; // p1, q1 and q2 are collinear and q2 lies on p1q1 + if (o3 === 0 && onSegment(p2, p1, q2)) return true; // p2, q2 and p1 are collinear and p1 lies on p2q2 + if (o4 === 0 && onSegment(p2, q1, q2)) return true; // p2, q2 and q1 are collinear and q1 lies on p2q2 + + return false; +} + +// for collinear points p, q, r, check if point q lies on segment pr +function onSegment(p, q, r) { + return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y); +} + +function sign(num) { + return num > 0 ? 1 : num < 0 ? -1 : 0; } // check if a polygon diagonal intersects any polygon segments From 62d72730fa69f59f862bb6dc3c9b62b1d85c2438 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 18 Aug 2020 17:24:49 +0100 Subject: [PATCH 014/241] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 221454193..da217f0f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -155,6 +155,7 @@ If you used any of them in your code, please update to the new function names be ### Updates and API Changes +* Earcut, used for polygon triangulation, has been updated from 2.1.4 to 2.2.2. * `Config.batchSize` has been increased from 2000 to 4096. * Removed the Deferred Diffuse fragment and vertex shaders from the project, as they're not used. * `StaticTilemapLayer.upload` will now set the vertex attributes and buffer the data, and handles internal checks more efficiently. From 305ea40baf6b1ee8a1ca1e455c47d5b7736f6b9d Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 18 Aug 2020 18:05:38 +0100 Subject: [PATCH 015/241] Update GetRaysFromPointToPolygon.js --- src/geom/intersects/GetRaysFromPointToPolygon.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/geom/intersects/GetRaysFromPointToPolygon.js b/src/geom/intersects/GetRaysFromPointToPolygon.js index f5a3f8e33..c7d82a146 100644 --- a/src/geom/intersects/GetRaysFromPointToPolygon.js +++ b/src/geom/intersects/GetRaysFromPointToPolygon.js @@ -11,6 +11,9 @@ var Line = require('../line/Line'); // Temp calculation segment var segment = new Line(); +/** + * @ignore + */ function CheckIntersects (angle, x, y, polygons, intersects) { var dx = Math.cos(angle); @@ -26,6 +29,9 @@ function CheckIntersects (angle, x, y, polygons, intersects) } } +/** + * @ignore + */ function SortIntersects (a, b) { return a.z - b.z; From 2db1496511def1616a6c0c0004c91e2b0890b119 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 18 Aug 2020 18:05:45 +0100 Subject: [PATCH 016/241] `Geom.Polygon.Simplify` is a new function that takes a polygon and simplifies the points by running them through a combination of Douglas-Peucker and Radial Distance algorithms, potentially dramatically reducing the number of points while retaining its shape. --- src/geom/polygon/Simplify.js | 203 +++++++++++++++++++++++++++++++++++ src/geom/polygon/index.js | 1 + 2 files changed, 204 insertions(+) create mode 100644 src/geom/polygon/Simplify.js diff --git a/src/geom/polygon/Simplify.js b/src/geom/polygon/Simplify.js new file mode 100644 index 000000000..dfcc8b89e --- /dev/null +++ b/src/geom/polygon/Simplify.js @@ -0,0 +1,203 @@ +/** + * @author Richard Davey + * @author Vladimir Agafonkin + * @see Based on Simplify.js mourner.github.io/simplify-js + */ + +/** + * Copyright (c) 2017, Vladimir Agafonkin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +'use strict'; + +/** + * @ignore + */ +function getSqDist (p1, p2) +{ + var dx = p1.x - p2.x, + dy = p1.y - p2.y; + + return dx * dx + dy * dy; +} + +/** + * Square distance from a point to a segment + * + * @ignore + */ +function getSqSegDist (p, p1, p2) +{ + var x = p1.x, + y = p1.y, + dx = p2.x - x, + dy = p2.y - y; + + if (dx !== 0 || dy !== 0) + { + var t = ((p.x - x) * dx + (p.y - y) * dy) / (dx * dx + dy * dy); + + if (t > 1) + { + x = p2.x; + y = p2.y; + } + else if (t > 0) + { + x += dx * t; + y += dy * t; + } + } + + dx = p.x - x; + dy = p.y - y; + + return dx * dx + dy * dy; +} + +/** + * Basic distance-based simplification + * + * @ignore + */ +function simplifyRadialDist (points, sqTolerance) +{ + var prevPoint = points[0], + newPoints = [ prevPoint ], + point; + + for (var i = 1, len = points.length; i < len; i++) + { + point = points[i]; + + if (getSqDist(point, prevPoint) > sqTolerance) + { + newPoints.push(point); + prevPoint = point; + } + } + + if (prevPoint !== point) + { + newPoints.push(point); + } + + return newPoints; +} + +/** + * @ignore + */ +function simplifyDPStep (points, first, last, sqTolerance, simplified) +{ + var maxSqDist = sqTolerance, + index; + + for (var i = first + 1; i < last; i++) + { + var sqDist = getSqSegDist(points[i], points[first], points[last]); + + if (sqDist > maxSqDist) + { + index = i; + maxSqDist = sqDist; + } + } + + if (maxSqDist > sqTolerance) + { + if (index - first > 1) + { + simplifyDPStep(points, first, index, sqTolerance, simplified); + } + + simplified.push(points[index]); + + if (last - index > 1) + { + simplifyDPStep(points, index, last, sqTolerance, simplified); + } + } +} + +/** + * Simplification using Ramer-Douglas-Peucker algorithm + * + * @ignore + */ +function simplifyDouglasPeucker (points, sqTolerance) +{ + var last = points.length - 1; + + var simplified = [ points[0] ]; + + simplifyDPStep(points, 0, last, sqTolerance, simplified); + + simplified.push(points[last]); + + return simplified; +} + +/** + * Takes a Polygon object and simplifies the points by running them through a combination of + * Douglas-Peucker and Radial Distance algorithms. Simplification dramatically reduces the number of + * points in a polygon while retaining its shape, giving a huge performance boost when processing + * it and also reducing visual noise. + * + * @function Phaser.Geom.Polygon.Simplify + * @since 3.50.0 + * + * @generic {Phaser.Geom.Polygon} O - [polygon,$return] + * + * @param {Phaser.Geom.Polygon} polygon - The polygon to be simplified. The polygon will be modified in-place and returned. + * @param {number} [tolerance=1] - Affects the amount of simplification (in the same metric as the point coordinates). + * @param {boolean} [highestQuality=false] - Excludes distance-based preprocessing step which leads to highest quality simplification but runs ~10-20 times slower. + * + * @return {Phaser.Geom.Polygon} The input polygon. + */ +var Simplify = function (polygon, tolerance, highestQuality) +{ + if (tolerance === undefined) { tolerance = 1; } + if (highestQuality === undefined) { highestQuality = false; } + + var points = polygon.points; + + if (points.length <= 2) + { + return points; + } + + var sqTolerance = tolerance * tolerance; + + if (!highestQuality) + { + points = simplifyRadialDist(points, sqTolerance); + } + + polygon.setTo(simplifyDouglasPeucker(points, sqTolerance)); + + return polygon; +}; + +module.exports = Simplify; diff --git a/src/geom/polygon/index.js b/src/geom/polygon/index.js index 43f62416b..ee31ab284 100644 --- a/src/geom/polygon/index.js +++ b/src/geom/polygon/index.js @@ -14,6 +14,7 @@ Polygon.GetNumberArray = require('./GetNumberArray'); Polygon.GetPoints = require('./GetPoints'); Polygon.Perimeter = require('./Perimeter'); Polygon.Reverse = require('./Reverse'); +Polygon.Simplify = require('./Simplify'); Polygon.Smooth = require('./Smooth'); Polygon.Translate = require('./Translate'); From c89b61950883c5be064f5130abea21a09a462613 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 18 Aug 2020 18:05:48 +0100 Subject: [PATCH 017/241] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index da217f0f0..f79e45575 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -144,6 +144,7 @@ If you used any of them in your code, please update to the new function names be * `Geom.Intersects.GetLineToPoints` is a new function that checks for the closest point of intersection between a line segment and an array of points, where each pair of points form a line segment. * `Geom.Intersects.GetRaysFromPointToPolygon` is a new function that emits rays out from the given point and detects for intersection against all given polygons, returning the points of intersection in the results array. * `Geom.Polygon.Translate` is a new function that allows you to translate all the points of a polygon by the given values. +* `Geom.Polygon.Simplify` is a new function that takes a polygon and simplifies the points by running them through a combination of Douglas-Peucker and Radial Distance algorithms, potentially dramatically reducing the number of points while retaining its shape. * `WebGLRenderer.setInt1iv` will allow you to look-up and set a 1iv uniform on the given shader. * `Phaser.Types.Math.Vector3Like` is a new data type representing as Vector 3 like object. * `Phaser.Types.Math.Vector4Like` is a new data type representing as Vector 4 like object. From b1b8a74cf95524779e41b1807aa4351bac9bc816 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 19 Aug 2020 13:14:36 +0100 Subject: [PATCH 018/241] `RenderTexture.fill` would fail to fill the correct area under WebGL if the RenderTexture wasn't the same size as the Canvas. It now fills the given region properly. --- .../rendertexture/RenderTexture.js | 41 +++++++++++-------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/src/gameobjects/rendertexture/RenderTexture.js b/src/gameobjects/rendertexture/RenderTexture.js index 2efa3b54d..23f5f270b 100644 --- a/src/gameobjects/rendertexture/RenderTexture.js +++ b/src/gameobjects/rendertexture/RenderTexture.js @@ -17,6 +17,7 @@ var ProjectOrtho = require('../../renderer/webgl/mvp/ProjectOrtho'); var Render = require('./RenderTextureRender'); var Utils = require('../../renderer/webgl/Utils'); var UUID = require('../../utils/string/UUID'); +const Clamp = require('../../math/Clamp'); /** * @classdesc @@ -517,21 +518,22 @@ var RenderTexture = new Class({ */ fill: function (rgb, alpha, x, y, width, height) { + var gl = this.gl; + var frame = this.frame; + var texture = this.texture; + var camera = this.camera; + var renderer = this.renderer; + if (alpha === undefined) { alpha = 1; } if (x === undefined) { x = 0; } if (y === undefined) { y = 0; } - if (width === undefined) { width = this.frame.cutWidth; } - if (height === undefined) { height = this.frame.cutHeight; } + if (width === undefined) { width = frame.cutWidth; } + if (height === undefined) { height = frame.cutHeight; } var r = ((rgb >> 16) | 0) & 0xff; var g = ((rgb >> 8) | 0) & 0xff; var b = (rgb | 0) & 0xff; - var gl = this.gl; - var frame = this.frame; - var camera = this.camera; - var renderer = this.renderer; - camera.preRender(1, 1); if (gl) @@ -543,16 +545,23 @@ var RenderTexture = new Class({ renderer.resetTextures(true); - renderer.setFramebuffer(this.framebuffer, false); + renderer.pushScissor(cx, cy, cw, -ch); - renderer.pushScissor(cx, cy, cw, ch, ch); + renderer.setFramebuffer(this.framebuffer, false); var pipeline = this.pipeline; - ProjectOrtho(pipeline, 0, this.texture.width, 0, this.texture.height, -1000.0, 1000.0); + var tw = texture.width; + var th = texture.height; + + var rw = pipeline.width; + var rh = pipeline.height; + + var sx = rw / tw; + var sy = rh / th; pipeline.drawFillRect( - x, y, width, height, + x * sx, (th - height - y) * sy, width * sx, height * sy, Utils.getTintFromFloats(r / 255, g / 255, b / 255, 1), alpha ); @@ -562,15 +571,15 @@ var RenderTexture = new Class({ renderer.setFramebuffer(null, false); renderer.popScissor(); - - ProjectOrtho(pipeline, 0, pipeline.width, pipeline.height, 0, -1000.0, 1000.0); } else { - renderer.setContext(this.context); + var ctx = this.context; - this.context.fillStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + alpha + ')'; - this.context.fillRect(x + frame.cutX, y + frame.cutY, width, height); + renderer.setContext(ctx); + + ctx.fillStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + alpha + ')'; + ctx.fillRect(x + frame.cutX, y + frame.cutY, width, height); renderer.setContext(); } From 3ffb1e2dba9c3936649b720883fd8c34c71ab057 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 19 Aug 2020 13:14:39 +0100 Subject: [PATCH 019/241] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f79e45575..301742f8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -172,6 +172,7 @@ If you used any of them in your code, please update to the new function names be ### Bug Fixes * `RenderTexture.resize` (which is called from `setSize`) wouldn't correctly set the `TextureSource.glTexture` property, leading to `bindTexture: attempt to use a deleted object` errors under WebGL. +* `RenderTexture.fill` would fail to fill the correct area under WebGL if the RenderTexture wasn't the same size as the Canvas. It now fills the given region properly. * The `MatterAttractors` plugin, which enables attractors between bodies, has been fixed. The original plugin only worked if the body with the attractor was _first_ in the world bodies list. It can now attract any body, no matter where in the world list it is. Fix #5160 (thanks @strahius) * The `KeyboardManager` and `KeyboardPlugin` were both still checking for the `InputManager.useQueue` property, which was removed several versions ago. * In Arcade Physics, Dynamic bodies would no longer hit walls when riding on horizontally moving platforms. The horizontal (and vertical) friction is now re-applied correctly in these edge-cases. Fix #5210 (thanks @Dercetech @samme) From ab605eed7844aa83a177386fb08fad535f30343f Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 19 Aug 2020 13:19:07 +0100 Subject: [PATCH 020/241] Remove false import --- src/gameobjects/rendertexture/RenderTexture.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gameobjects/rendertexture/RenderTexture.js b/src/gameobjects/rendertexture/RenderTexture.js index 23f5f270b..e70b1408c 100644 --- a/src/gameobjects/rendertexture/RenderTexture.js +++ b/src/gameobjects/rendertexture/RenderTexture.js @@ -17,7 +17,6 @@ var ProjectOrtho = require('../../renderer/webgl/mvp/ProjectOrtho'); var Render = require('./RenderTextureRender'); var Utils = require('../../renderer/webgl/Utils'); var UUID = require('../../utils/string/UUID'); -const Clamp = require('../../math/Clamp'); /** * @classdesc From 8c55fc7ee2ba996d5ef19179e3a2060bad56e844 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 20 Aug 2020 10:22:35 +0100 Subject: [PATCH 021/241] `TweenManager.getTweensOf` has a new parameter `includePending`. If set, it will also check the pending tweens for the given targets and return those in the results as well. Fix #5260 --- src/tweens/TweenManager.js | 59 ++++++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 21 deletions(-) diff --git a/src/tweens/TweenManager.js b/src/tweens/TweenManager.js index c2d80262a..61da46421 100644 --- a/src/tweens/TweenManager.js +++ b/src/tweens/TweenManager.js @@ -266,14 +266,14 @@ var TweenManager = new Class({ /** * Creates a Stagger function to be used by a Tween property. - * + * * The stagger function will allow you to stagger changes to the value of the property across all targets of the tween. - * + * * This is only worth using if the tween has multiple targets. - * + * * The following will stagger the delay by 100ms across all targets of the tween, causing them to scale down to 0.2 * over the duration specified: - * + * * ```javascript * this.tweens.add({ * targets: [ ... ], @@ -283,10 +283,10 @@ var TweenManager = new Class({ * delay: this.tweens.stagger(100) * }); * ``` - * + * * The following will stagger the delay by 500ms across all targets of the tween using a 10 x 6 grid, staggering * from the center out, using a cubic ease. - * + * * ```javascript * this.tweens.add({ * targets: [ ... ], @@ -541,27 +541,56 @@ var TweenManager = new Class({ /** * Returns an array of all Tweens or Timelines in the Tween Manager which affect the given target or array of targets. * + * Only the currently active tweens are tested. A tween that has completed and is + * awaiting removal will not be included in the results. + * + * If you wish to also search pending tweens, use the `includePending` flag. + * * @method Phaser.Tweens.TweenManager#getTweensOf * @since 3.0.0 * * @param {(object|array)} target - The target to look for. Provide an array to look for multiple targets. + * @param {boolean} [includePending=false] - Also check for pending tweens, not just active ones? * * @return {Phaser.Tweens.Tween[]} A new array containing all Tweens and Timelines which affect the given target(s). */ - getTweensOf: function (target) + getTweensOf: function (target, includePending) { + if (includePending === undefined) { includePending = false; } + var list = this._active; var tween; var output = []; var i; + var t; - if (Array.isArray(target)) + if (!Array.isArray(target)) { + target = [ target ]; + } + + for (i = 0; i < list.length; i++) + { + tween = list[i]; + + for (t = 0; t < target.length; t++) + { + if (tween.hasTarget(target[t])) + { + output.push(tween); + } + } + } + + if (includePending) + { + list = this._pending; + for (i = 0; i < list.length; i++) { tween = list[i]; - for (var t = 0; t < target.length; t++) + for (t = 0; t < target.length; t++) { if (tween.hasTarget(target[t])) { @@ -570,18 +599,6 @@ var TweenManager = new Class({ } } } - else - { - for (i = 0; i < list.length; i++) - { - tween = list[i]; - - if (tween.hasTarget(target)) - { - output.push(tween); - } - } - } return output; }, From ab55a7163441d44cec5e8c72a694b1e7f0219318 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 20 Aug 2020 10:22:38 +0100 Subject: [PATCH 022/241] Update CHANGELOG.md --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 301742f8b..f26f9fafc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -153,6 +153,7 @@ If you used any of them in your code, please update to the new function names be * `Display.Color.GetColorFromValue` is a new function that will take a hex color value and return it as an integer, for use in WebGL. This is now used internally by the Tint component and other classes. * `Utils.String.RemoveAt` is a new function that will remove a character from the given index in a string and return the new string. * `Frame.setUVs` is a new method that allows you to directly set the canvas and UV data for a frame. Use this if you need to override the values set automatically during frame creation. +* `TweenManager.getTweensOf` has a new parameter `includePending`. If set, it will also check the pending tweens for the given targets and return those in the results as well. Fix #5260 (thanks @pcharest2000) ### Updates and API Changes @@ -177,12 +178,13 @@ If you used any of them in your code, please update to the new function names be * The `KeyboardManager` and `KeyboardPlugin` were both still checking for the `InputManager.useQueue` property, which was removed several versions ago. * In Arcade Physics, Dynamic bodies would no longer hit walls when riding on horizontally moving platforms. The horizontal (and vertical) friction is now re-applied correctly in these edge-cases. Fix #5210 (thanks @Dercetech @samme) * Calling `Rectangle.setSize()` wouldn't change the underlying geometry of the Shape Game Object, causing any stroke to be incorrectly rendered after a size change. +* The `ProcessQueue` was emiting the wrong events internally. It now emits 'add' and 'remove' correctly (thanks @halilcakar) ### Examples, Documentation and TypeScript My thanks to the following for helping with the Phaser 3 Examples, Docs and TypeScript definitions, either by reporting errors, fixing them or helping author the docs: -@samme @16patsle @scott20145 +@samme @16patsle @scott20145 @khasanovbi @mk360 From e3142f313f720e7c54f5698ab91fe2808d75cec0 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 20 Aug 2020 10:47:21 +0100 Subject: [PATCH 023/241] `WebGLPipeline.hasBooted` is a new boolean property that tracks if the pipeline has been booted or not, which is now far more important in 3.5 than in previous versions. This is checked in the `WebGLRenderer.addPipeline` method, and if not set, the pipeline is booted. Fix #5251 #5255 --- src/renderer/webgl/WebGLPipeline.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/renderer/webgl/WebGLPipeline.js b/src/renderer/webgl/WebGLPipeline.js index 3b72d6d6e..d55cd4c8f 100644 --- a/src/renderer/webgl/WebGLPipeline.js +++ b/src/renderer/webgl/WebGLPipeline.js @@ -255,6 +255,16 @@ var WebGLPipeline = new Class({ * @since 3.50.0 */ this.forceZero = false; + + /** + * Indicates if the current pipeline has booted or not. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#hasBooted + * @type {boolean} + * @readonly + * @since 3.50.0 + */ + this.hasBooted = false; }, /** @@ -296,6 +306,8 @@ var WebGLPipeline = new Class({ } } + this.hasBooted = true; + return this; }, From 84ef02743b0797d121fe5bb86e955d9e23bfc430 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 20 Aug 2020 10:48:30 +0100 Subject: [PATCH 024/241] The WebGL Renderer will now add the pipelines during the `boot` method, instead of `init`. --- src/renderer/webgl/WebGLRenderer.js | 32 +++++++++++++++-------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/src/renderer/webgl/WebGLRenderer.js b/src/renderer/webgl/WebGLRenderer.js index 9081e8ee5..f1fd14ccd 100644 --- a/src/renderer/webgl/WebGLRenderer.js +++ b/src/renderer/webgl/WebGLRenderer.js @@ -804,11 +804,6 @@ var WebGLRenderer = new Class({ // Clear previous pipelines and reload default ones this.pipelines = {}; - this.addPipeline('TextureTintPipeline', new TextureTintPipeline({ game: game, renderer: this })); - this.addPipeline('TextureTintStripPipeline', new TextureTintStripPipeline({ game: game, renderer: this })); - this.addPipeline('BitmapMaskPipeline', new BitmapMaskPipeline({ game: game, renderer: this })); - this.addPipeline('Light2D', new ForwardDiffuseLightPipeline({ game: game, renderer: this, maxLights: config.maxLights })); - this.setBlendMode(CONST.BlendModes.NORMAL); game.textures.once(TextureEvents.READY, this.boot, this); @@ -825,14 +820,16 @@ var WebGLRenderer = new Class({ */ boot: function () { - for (var pipelineName in this.pipelines) - { - this.pipelines[pipelineName].boot(); - } + var game = this.game; - var blank = this.game.textures.getFrame('__DEFAULT'); + var ttp = this.addPipeline('TextureTintPipeline', new TextureTintPipeline({ game: game, renderer: this })); + this.addPipeline('TextureTintStripPipeline', new TextureTintStripPipeline({ game: game, renderer: this })); + this.addPipeline('BitmapMaskPipeline', new BitmapMaskPipeline({ game: game, renderer: this })); + this.addPipeline('Light2D', new ForwardDiffuseLightPipeline({ game: game, renderer: this, maxLights: this.config.maxLights })); - this.pipelines.TextureTintPipeline.currentFrame = blank; + var blank = game.textures.getFrame('__DEFAULT'); + + ttp.currentFrame = blank; this.blankTexture = blank; @@ -842,13 +839,13 @@ var WebGLRenderer = new Class({ gl.enable(gl.SCISSOR_TEST); - this.setPipeline(this.pipelines.TextureTintPipeline); + this.setPipeline(ttp); - this.game.scale.on(ScaleEvents.RESIZE, this.onResize, this); + game.scale.on(ScaleEvents.RESIZE, this.onResize, this); - var baseSize = this.game.scale.baseSize; + var baseSize = game.scale.baseSize; - this.resize(baseSize.width, baseSize.height, this.game.scale.resolution); + this.resize(baseSize.width, baseSize.height, game.scale.resolution); }, /** @@ -1031,6 +1028,11 @@ var WebGLRenderer = new Class({ pipelineInstance.name = pipelineName; + if (!pipelineInstance.hasBooted) + { + pipelineInstance.boot(); + } + this.pipelines[pipelineName].resize(this.width, this.height, this.config.resolution); return pipelineInstance; From f2bd22d581edaabe9d6f094b3aeb589b2d22eeb8 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 20 Aug 2020 10:48:33 +0100 Subject: [PATCH 025/241] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f26f9fafc..d2d14fd71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -154,6 +154,8 @@ If you used any of them in your code, please update to the new function names be * `Utils.String.RemoveAt` is a new function that will remove a character from the given index in a string and return the new string. * `Frame.setUVs` is a new method that allows you to directly set the canvas and UV data for a frame. Use this if you need to override the values set automatically during frame creation. * `TweenManager.getTweensOf` has a new parameter `includePending`. If set, it will also check the pending tweens for the given targets and return those in the results as well. Fix #5260 (thanks @pcharest2000) +* `WebGLPipeline.hasBooted` is a new boolean property that tracks if the pipeline has been booted or not, which is now far more important in 3.5 than in previous versions. This is checked in the `WebGLRenderer.addPipeline` method, and if not set, the pipeline is booted. Fix #5251 #5255 (thanks @telinc1 @rexrainbow) +* The WebGL Renderer will now add the pipelines during the `boot` method, instead of `init`. ### Updates and API Changes From b4e1b5af77106de1158d8c5dd9f2d71a7441caec Mon Sep 17 00:00:00 2001 From: halilcakar Date: Thu, 20 Aug 2020 15:27:29 +0300 Subject: [PATCH 026/241] Fix for #5019 --- src/actions/GridAlign.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/actions/GridAlign.js b/src/actions/GridAlign.js index c7aa00ffd..02e458ca5 100644 --- a/src/actions/GridAlign.js +++ b/src/actions/GridAlign.js @@ -65,6 +65,27 @@ var GridAlign = function (items, options) // We keep laying them out vertically until we've done them all tempZone.y += cellHeight; } + else if (heightSet && !widthSet) + { + console.log('heighta göre set!'); + // We keep laying them out until we hit the column limit + cy += cellHeight; + tempZone.y += cellHeight; + + if (cy === h) + { + cy = 0; + cx += cellWidth; + tempZone.y = y; + tempZone.x += cellWidth; + + if (cx === w) + { + // We've hit the column limit, so return, even if there are items left + break; + } + } + } else { // We keep laying them out until we hit the column limit From 8aa54e86a0f6dcbd187b19e90c3372b6439283fc Mon Sep 17 00:00:00 2001 From: halilcakar Date: Thu, 20 Aug 2020 23:29:15 +0300 Subject: [PATCH 027/241] Remove console.log --- src/actions/GridAlign.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/actions/GridAlign.js b/src/actions/GridAlign.js index 02e458ca5..6fac388f7 100644 --- a/src/actions/GridAlign.js +++ b/src/actions/GridAlign.js @@ -67,7 +67,6 @@ var GridAlign = function (items, options) } else if (heightSet && !widthSet) { - console.log('heighta göre set!'); // We keep laying them out until we hit the column limit cy += cellHeight; tempZone.y += cellHeight; From 8edbbb2e2d9ccac752f3e57b5e8ba172a7cfbe04 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 21 Aug 2020 09:44:43 +0100 Subject: [PATCH 028/241] `Renderer.WebGL.Utils.parseFragmentShaderMaxTextures` is a new function that will take fragment shader source and search it for `%count%` and `%forloop%` declarations, replacing them with the required GLSL for multi-texture support, returning the modified source. --- src/renderer/webgl/Utils.js | 41 ++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/src/renderer/webgl/Utils.js b/src/renderer/webgl/Utils.js index 00f3204fc..99930eebb 100644 --- a/src/renderer/webgl/Utils.js +++ b/src/renderer/webgl/Utils.js @@ -203,6 +203,45 @@ module.exports = { } return maxTextures; - } + }, + /** + * Checks the given Fragment Shader Source for `%count%` and `%forloop%` declarations and + * replaces those with GLSL code for setting `texture = texture2D(uMainSampler[i], outTexCoord)`. + * + * @function Phaser.Renderer.WebGL.Utils.parseFragmentShaderMaxTextures + * @since 3.50.0 + * + * @param {string} fragmentShaderSource - The Fragment Shader source code to operate on. + * @param {number} maxTextures - The number of maxTextures value. + * + * @return {string} The modified Fragment Shader source. + */ + parseFragmentShaderMaxTextures: function (fragmentShaderSource, maxTextures) + { + var src = ''; + + for (var i = 0; i < maxTextures; i++) + { + if (i > 0) + { + src += '\n\telse '; + } + + if (i < maxTextures - 1) + { + src += 'if (outTexId < ' + i + '.5)'; + } + + src += '\n\t{'; + src += '\n\t\ttexture = texture2D(uMainSampler[' + i + '], outTexCoord);'; + src += '\n\t}'; + } + + fragmentShaderSource = fragmentShaderSource.replace(/%count%/gi, maxTextures.toString()); + + fragmentShaderSource = fragmentShaderSource.replace(/%forloop%/gi, src); + + return fragmentShaderSource; + } }; From 14ad202adcf244360677a86b1c1776e98d64c8de Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 21 Aug 2020 09:44:52 +0100 Subject: [PATCH 029/241] Use new Utils function --- .../webgl/pipelines/TextureTintPipeline.js | 24 ++----------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/src/renderer/webgl/pipelines/TextureTintPipeline.js b/src/renderer/webgl/pipelines/TextureTintPipeline.js index 0895758cd..305a4e6a3 100644 --- a/src/renderer/webgl/pipelines/TextureTintPipeline.js +++ b/src/renderer/webgl/pipelines/TextureTintPipeline.js @@ -52,32 +52,12 @@ var TextureTintPipeline = new Class({ { var rendererConfig = config.renderer.config; + var fragmentShaderSource; var maxTextures = config.renderer.maxTextures; if (!config.fragShader) { - var src = ''; - - for (var i = 0; i < maxTextures; i++) - { - if (i > 0) - { - src += '\n\telse '; - } - - if (i < maxTextures - 1) - { - src += 'if (outTexId < ' + i + '.5)'; - } - - src += '\n\t{'; - src += '\n\t\ttexture = texture2D(uMainSampler[' + i + '], outTexCoord);'; - src += '\n\t}'; - } - - var fragmentShaderSource = ShaderSourceFS.replace(/%count%/gi, maxTextures.toString()); - - fragmentShaderSource = fragmentShaderSource.replace(/%forloop%/gi, src); + fragmentShaderSource = Utils.parseFragmentShaderMaxTextures(ShaderSourceFS, maxTextures); } else { From eb4b2d737a28e99438d3e1963c1ec3eddd924ef1 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 21 Aug 2020 09:44:58 +0100 Subject: [PATCH 030/241] Deps update --- package-lock.json | 185 +++++++++++++++++++++++++++------------------- package.json | 8 +- 2 files changed, 111 insertions(+), 82 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5ebdd2f57..8f3c64dc1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "phaser", - "version": "3.25.0", + "version": "3.50.0-beta.2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -44,9 +44,9 @@ } }, "@babel/parser": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.4.tgz", - "integrity": "sha512-8jHII4hf+YVDsskTF6WuMB3X4Eh+PsUkC2ljq22so5rHvH+T8BzyL94VOdyFLNR8tBSVXOTbNHOKpR4TfRxVtA==", + "version": "7.11.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.4.tgz", + "integrity": "sha512-MggwidiH+E9j5Sh8pbrX5sJvMcsqS5o+7iB42M9/k0CD63MjYbdP4nhSh7uB5wnv2/RVzTZFTxzF/kIa5mrCqA==", "dev": true }, "@sindresorhus/df": { @@ -345,9 +345,9 @@ "dev": true }, "acorn": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.3.1.tgz", - "integrity": "sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.0.tgz", + "integrity": "sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w==", "dev": true }, "acorn-jsx": { @@ -431,7 +431,7 @@ "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha1-vNZ5HqWuCXJeF+WtmIE0zUCz2RE=", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "requires": { "sprintf-js": "~1.0.2" @@ -483,14 +483,15 @@ "dev": true }, "asn1.js": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", - "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", + "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", "dev": true, "requires": { "bn.js": "^4.0.0", "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" }, "dependencies": { "bn.js": { @@ -645,15 +646,15 @@ "dev": true }, "bn.js": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.2.tgz", - "integrity": "sha512-40rZaf3bUNKTVYu9sIeeEGOg7g14Yvnj9kH7b50EiwX0Q7A6umbvfI5tvHaOERH0XigqKkfLkFQxzb4e6CIXnA==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.3.tgz", + "integrity": "sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ==", "dev": true }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { "balanced-match": "^1.0.0", @@ -751,16 +752,16 @@ } }, "browserify-sign": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.0.tgz", - "integrity": "sha512-hEZC1KEeYuoHRqhGhTy6gWrpJA3ZDjFWv0DE61643ZnOXAKJb3u7yWcrU0mMc9SwAqK1n7myPGndkp0dFG7NFA==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", + "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", "dev": true, "requires": { "bn.js": "^5.1.1", "browserify-rsa": "^4.0.1", "create-hash": "^1.2.0", "create-hmac": "^1.1.7", - "elliptic": "^6.5.2", + "elliptic": "^6.5.3", "inherits": "^2.0.4", "parse-asn1": "^5.1.5", "readable-stream": "^3.6.0", @@ -955,9 +956,9 @@ } }, "chokidar": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.0.tgz", - "integrity": "sha512-aXAaho2VJtisB/1fg1+3nlLJqGOuewTzQpd/Tz0yTg2R0e4IGtshYvtjowyEumcBv2z+y4+kc75Mz7j5xJskcQ==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.2.tgz", + "integrity": "sha512-IZHaDeBeI+sZJRX7lGcXsdzgvZqKv6sECqsbErJA4mHWfpRrD8B97kSFN4cQz6nGBGiuFia1MKR4d6c1o8Cv7A==", "dev": true, "optional": true, "requires": { @@ -1154,7 +1155,7 @@ "concat-stream": { "version": "1.6.2", "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha1-kEvfGUzTEi/Gdcd/xKw9T/D9GjQ=", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -1233,13 +1234,13 @@ } }, "create-ecdh": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", - "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", + "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", "dev": true, "requires": { "bn.js": "^4.1.0", - "elliptic": "^6.0.0" + "elliptic": "^6.5.3" }, "dependencies": { "bn.js": { @@ -1591,9 +1592,9 @@ "dev": true }, "eslint": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.4.0.tgz", - "integrity": "sha512-gU+lxhlPHu45H3JkEGgYhWhkR9wLHHEXC9FbWFnTlEkbKyZKWgWRLgf61E8zWmBuI6g5xKBph9ltg3NtZMVF8g==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.7.0.tgz", + "integrity": "sha512-1KUxLzos0ZVsyL81PnRN335nDtQ8/vZUD6uMtWbF+5zDtjKcsklIi78XoE0MVL93QvWTu+E5y44VyyCsOMBrIg==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -1604,9 +1605,9 @@ "doctrine": "^3.0.0", "enquirer": "^2.3.5", "eslint-scope": "^5.1.0", - "eslint-utils": "^2.0.0", - "eslint-visitor-keys": "^1.2.0", - "espree": "^7.1.0", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^1.3.0", + "espree": "^7.2.0", "esquery": "^1.2.0", "esutils": "^2.0.2", "file-entry-cache": "^5.0.1", @@ -1620,7 +1621,7 @@ "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", - "lodash": "^4.17.14", + "lodash": "^4.17.19", "minimatch": "^3.0.4", "natural-compare": "^1.4.0", "optionator": "^0.9.1", @@ -1666,14 +1667,14 @@ "dev": true }, "espree": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.1.0.tgz", - "integrity": "sha512-dcorZSyfmm4WTuTnE5Y7MEN1DyoPYy1ZR783QW1FJoenn7RailyWFsq/UL6ZAAA7uXurN9FIpYyUs3OfiIW+Qw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.2.0.tgz", + "integrity": "sha512-H+cQ3+3JYRMEIOl87e7QdHX70ocly5iW4+dttuR8iYSPr/hXKFb+7dBsZ7+u1adC4VrnPlTkv0+OwuPnDop19g==", "dev": true, "requires": { - "acorn": "^7.2.0", + "acorn": "^7.3.1", "acorn-jsx": "^5.2.0", - "eslint-visitor-keys": "^1.2.0" + "eslint-visitor-keys": "^1.3.0" } }, "esprima": { @@ -1692,9 +1693,9 @@ }, "dependencies": { "estraverse": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.1.0.tgz", - "integrity": "sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", "dev": true } } @@ -1702,7 +1703,7 @@ "esrecurse": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha1-AHo7n9vCs7uH5IeeoZyS/b05Qs8=", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", "dev": true, "requires": { "estraverse": "^4.1.0" @@ -1726,9 +1727,9 @@ "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==" }, "events": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.1.0.tgz", - "integrity": "sha512-Rv+u8MLHNOdMjTAFeT3nCjHn2aGlx435FP/sDHNaRhDEMwyI/aB22Kj2qIN8R0cw3z28psEQLYwxVKLsKrMgWg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.2.0.tgz", + "integrity": "sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg==", "dev": true }, "evp_bytestokey": { @@ -2739,9 +2740,9 @@ } }, "jsdoc": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.4.tgz", - "integrity": "sha512-3G9d37VHv7MFdheviDCjUfQoIjdv4TC5zTTf5G9VODLtOnVS6La1eoYBDlbWfsRT3/Xo+j2MIqki2EV12BZfwA==", + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.5.tgz", + "integrity": "sha512-SbY+i9ONuxSK35cgVHaI8O9senTE4CDYAmGSDJ5l3+sfe62Ff4gy96osy6OW84t4K4A8iGnMrlRrsSItSNp3RQ==", "dev": true, "requires": { "@babel/parser": "^7.9.4", @@ -2878,9 +2879,9 @@ } }, "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "dev": true }, "lru-cache": { @@ -3031,7 +3032,7 @@ "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -3443,14 +3444,13 @@ } }, "parse-asn1": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.5.tgz", - "integrity": "sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", + "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", "dev": true, "requires": { - "asn1.js": "^4.0.0", + "asn1.js": "^5.2.0", "browserify-aes": "^1.0.0", - "create-hash": "^1.1.0", "evp_bytestokey": "^1.0.0", "pbkdf2": "^3.0.3", "safe-buffer": "^5.1.1" @@ -3945,6 +3945,12 @@ "ret": "~0.1.10" } }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, "schema-utils": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", @@ -4413,16 +4419,16 @@ } }, "terser-webpack-plugin": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.4.tgz", - "integrity": "sha512-U4mACBHIegmfoEe5fdongHESNJWqsGU+W0S/9+BmYGVQDw1+c2Ow05TpMhxjPK1sRb7cuYq1BPl1e5YHJMTCqA==", + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.5.tgz", + "integrity": "sha512-04Rfe496lN8EYruwi6oPQkG0vo8C+HT49X687FZnpPF0qMAIHONI6HEXYPKDOE8e5HjXTyKfqRd/agHtH0kOtw==", "dev": true, "requires": { "cacache": "^12.0.2", "find-cache-dir": "^2.1.0", "is-wsl": "^1.1.0", "schema-utils": "^1.0.0", - "serialize-javascript": "^3.1.0", + "serialize-javascript": "^4.0.0", "source-map": "^0.6.1", "terser": "^4.1.2", "webpack-sources": "^1.4.0", @@ -4430,9 +4436,9 @@ }, "dependencies": { "serialize-javascript": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-3.1.0.tgz", - "integrity": "sha512-JIJT1DGiWmIKhzRsG91aS6Ze4sFUrYbltlkg2onR5OrnNM02Kl/hnY/T4FN2omvyeBbQmMJv+K4cPOpGzOTFBg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", "dev": true, "requires": { "randombytes": "^2.1.0" @@ -4607,9 +4613,9 @@ "dev": true }, "typescript": { - "version": "3.9.6", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.6.tgz", - "integrity": "sha512-Pspx3oKAPJtjNwE92YS05HQoY7z2SFyOpHo9MqJor3BXAGNaPUs83CuVp9VISFkSjyRfiTpmKuAYGJB7S7hOxw==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.2.tgz", + "integrity": "sha512-e4ERvRV2wb+rRZ/IQeb3jm2VxBsirQLpQhdxplZ2MEzGvDkkMmPglecnNDfSUBivMjP93vRbngYYDQqQ/78bcQ==", "dev": true }, "uc.micro": { @@ -4816,12 +4822,12 @@ "dev": true }, "watchpack": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.2.tgz", - "integrity": "sha512-ymVbbQP40MFTp+cNMvpyBpBtygHnPzPkHqoIwRRj/0B8KhqQwV8LaKjtbaxF2lK4vl8zN9wCxS46IFCU5K4W0g==", + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.4.tgz", + "integrity": "sha512-aWAgTW4MoSJzZPAicljkO1hsi1oKj/RRq/OJQh2PKI2UKL04c2Bs+MBOB+BBABHTXJpf9mCwHN7ANCvYsvY2sg==", "dev": true, "requires": { - "chokidar": "^3.4.0", + "chokidar": "^3.4.1", "graceful-fs": "^4.1.2", "neo-async": "^2.5.0", "watchpack-chokidar2": "^2.0.0" @@ -4943,9 +4949,9 @@ } }, "webpack": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.43.0.tgz", - "integrity": "sha512-GW1LjnPipFW2Y78OOab8NJlCflB7EFskMih2AHdvjbpKMeDJqEgSx24cXXXiPS65+WSwVyxtDsJH6jGX2czy+g==", + "version": "4.44.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.44.1.tgz", + "integrity": "sha512-4UOGAohv/VGUNQJstzEywwNxqX417FnjZgZJpJQegddzPmTvph37eBIRbRTfdySXzVtJXLJfbMN3mMYhM6GdmQ==", "dev": true, "requires": { "@webassemblyjs/ast": "1.9.0", @@ -4956,7 +4962,7 @@ "ajv": "^6.10.2", "ajv-keywords": "^3.4.1", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^4.1.0", + "enhanced-resolve": "^4.3.0", "eslint-scope": "^4.0.3", "json-parse-better-errors": "^1.0.2", "loader-runner": "^2.4.0", @@ -4969,7 +4975,7 @@ "schema-utils": "^1.0.0", "tapable": "^1.1.3", "terser-webpack-plugin": "^1.4.3", - "watchpack": "^1.6.1", + "watchpack": "^1.7.4", "webpack-sources": "^1.4.1" }, "dependencies": { @@ -4979,6 +4985,29 @@ "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==", "dev": true }, + "enhanced-resolve": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.3.0.tgz", + "integrity": "sha512-3e87LvavsdxyoCfGusJnrZ5G8SLPOFeHSNpZI/ATL9a5leXo2k0w6MKnbqhdBad9qTobSfB20Ld7UmgoNbAZkQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "memory-fs": "^0.5.0", + "tapable": "^1.0.0" + }, + "dependencies": { + "memory-fs": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.5.0.tgz", + "integrity": "sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA==", + "dev": true, + "requires": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + } + } + } + }, "eslint-scope": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", diff --git a/package.json b/package.json index 034b0f5c5..e14081374 100644 --- a/package.json +++ b/package.json @@ -63,16 +63,16 @@ "devDependencies": { "clean-webpack-plugin": "^3.0.0", "dts-dom": "^3.6.0", - "eslint": "^7.4.0", + "eslint": "^7.7.0", "eslint-plugin-es5": "^1.5.0", "fs-extra": "^9.0.1", - "jsdoc": "^3.6.4", + "jsdoc": "^3.6.5", "node-sloc": "^0.1.12", "remove-files-webpack-plugin": "^1.4.3", - "typescript": "^3.9.6", + "typescript": "^4.0.2", "uglifyjs-webpack-plugin": "^2.2.0", "vivid-cli": "^1.1.2", - "webpack": "^4.43.0", + "webpack": "^4.44.1", "webpack-cli": "^3.3.12", "webpack-shell-plugin": "^0.5.0" }, From 96072e58a9097cfb6840bcfce067160b53a17db9 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 21 Aug 2020 09:45:02 +0100 Subject: [PATCH 031/241] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d2d14fd71..ee3541b9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,7 @@ All of the internal functions, such as `batchQuad` and `batchSprite` have been u * `WebGLPipeline.forceZero` is a new property that informs Game Objects if the pipeline requires a zero bound texture unit. * `WebGLPipeline.setAttribPointers` is a new method that will set the vertex attribute pointers for the pipeline. * `WebGLRenderer.unbindTextures` is a new method that will activate and then null bind all WebGL textures. +* `Renderer.WebGL.Utils.parseFragmentShaderMaxTextures` is a new function that will take fragment shader source and search it for `%count%` and `%forloop%` declarations, replacing them with the required GLSL for multi-texture support, returning the modified source. ### Forward Diffuse Light Pipeline API Changes From 6435772646d1c057a9f5b30550ce24ebf8c4dff6 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 21 Aug 2020 15:41:12 +0100 Subject: [PATCH 032/241] Shaders renamed to match new pipeline names --- scripts/bundle-shaders.js | 11 +++--- .../{ForwardDiffuse-frag.js => Light-frag.js} | 0 .../{TextureTint-frag.js => Multi-frag.js} | 0 .../{TextureTint-vert.js => Multi-vert.js} | 0 src/renderer/webgl/shaders/Single-frag.js | 38 +++++++++++++++++++ src/renderer/webgl/shaders/Single-vert.js | 28 ++++++++++++++ .../src/{ForwardDiffuse.frag => Light.frag} | 0 .../src/{TextureTint.frag => Multi.frag} | 0 .../src/{TextureTint.vert => Multi.vert} | 0 src/renderer/webgl/shaders/src/Single.frag | 35 +++++++++++++++++ src/renderer/webgl/shaders/src/Single.vert | 25 ++++++++++++ 11 files changed, 131 insertions(+), 6 deletions(-) rename src/renderer/webgl/shaders/{ForwardDiffuse-frag.js => Light-frag.js} (100%) rename src/renderer/webgl/shaders/{TextureTint-frag.js => Multi-frag.js} (100%) rename src/renderer/webgl/shaders/{TextureTint-vert.js => Multi-vert.js} (100%) create mode 100644 src/renderer/webgl/shaders/Single-frag.js create mode 100644 src/renderer/webgl/shaders/Single-vert.js rename src/renderer/webgl/shaders/src/{ForwardDiffuse.frag => Light.frag} (100%) rename src/renderer/webgl/shaders/src/{TextureTint.frag => Multi.frag} (100%) rename src/renderer/webgl/shaders/src/{TextureTint.vert => Multi.vert} (100%) create mode 100644 src/renderer/webgl/shaders/src/Single.frag create mode 100644 src/renderer/webgl/shaders/src/Single.vert diff --git a/scripts/bundle-shaders.js b/scripts/bundle-shaders.js index 7a7bec1d5..ddd079c69 100644 --- a/scripts/bundle-shaders.js +++ b/scripts/bundle-shaders.js @@ -3,12 +3,11 @@ let fs = require('fs-extra'); /* BitmapMask.frag BitmapMask.vert -DeferredDiffuse.frag -DeferredDiffuse.vert -ForwardDiffuse.frag -GBuffer.frag -TextureTint.frag -TextureTint.vert +Light.frag +Single.frag +Single.vert +Multi.frag +Multi.vert */ let srcdir = './src/renderer/webgl/shaders/src/'; diff --git a/src/renderer/webgl/shaders/ForwardDiffuse-frag.js b/src/renderer/webgl/shaders/Light-frag.js similarity index 100% rename from src/renderer/webgl/shaders/ForwardDiffuse-frag.js rename to src/renderer/webgl/shaders/Light-frag.js diff --git a/src/renderer/webgl/shaders/TextureTint-frag.js b/src/renderer/webgl/shaders/Multi-frag.js similarity index 100% rename from src/renderer/webgl/shaders/TextureTint-frag.js rename to src/renderer/webgl/shaders/Multi-frag.js diff --git a/src/renderer/webgl/shaders/TextureTint-vert.js b/src/renderer/webgl/shaders/Multi-vert.js similarity index 100% rename from src/renderer/webgl/shaders/TextureTint-vert.js rename to src/renderer/webgl/shaders/Multi-vert.js diff --git a/src/renderer/webgl/shaders/Single-frag.js b/src/renderer/webgl/shaders/Single-frag.js new file mode 100644 index 000000000..f14eb511d --- /dev/null +++ b/src/renderer/webgl/shaders/Single-frag.js @@ -0,0 +1,38 @@ +module.exports = [ + '#define SHADER_NAME PHASER_SINGLE_TEXTURE_TINT_FS', + '', + 'precision mediump float;', + '', + 'uniform sampler2D uMainSampler;', + '', + 'varying vec2 outTexCoord;', + 'varying float outTintEffect;', + 'varying vec4 outTint;', + '', + 'void main()', + '{', + ' vec4 texture = texture2D(uMainSampler, outTexCoord);', + ' vec4 texel = vec4(outTint.rgb * outTint.a, outTint.a);', + ' vec4 color = texture;', + '', + ' if (outTintEffect == 0.0)', + ' {', + ' // Multiply texture tint', + ' color = texture * texel;', + ' }', + ' else if (outTintEffect == 1.0)', + ' {', + ' // Solid color + texture alpha', + ' color.rgb = mix(texture.rgb, outTint.rgb * outTint.a, texture.a);', + ' color.a = texture.a * texel.a;', + ' }', + ' else if (outTintEffect == 2.0)', + ' {', + ' // Solid color, no texture', + ' color = texel;', + ' }', + '', + ' gl_FragColor = color;', + '}', + '' +].join('\n'); diff --git a/src/renderer/webgl/shaders/Single-vert.js b/src/renderer/webgl/shaders/Single-vert.js new file mode 100644 index 000000000..f96e5fdab --- /dev/null +++ b/src/renderer/webgl/shaders/Single-vert.js @@ -0,0 +1,28 @@ +module.exports = [ + '#define SHADER_NAME PHASER_SINGLE_TEXTURE_TINT_VS', + '', + 'precision mediump float;', + '', + 'uniform mat4 uProjectionMatrix;', + 'uniform mat4 uViewMatrix;', + 'uniform mat4 uModelMatrix;', + '', + 'attribute vec2 inPosition;', + 'attribute vec2 inTexCoord;', + 'attribute float inTintEffect;', + 'attribute vec4 inTint;', + '', + 'varying vec2 outTexCoord;', + 'varying float outTintEffect;', + 'varying vec4 outTint;', + '', + 'void main ()', + '{', + ' gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);', + '', + ' outTexCoord = inTexCoord;', + ' outTint = inTint;', + ' outTintEffect = inTintEffect;', + '}', + '' +].join('\n'); diff --git a/src/renderer/webgl/shaders/src/ForwardDiffuse.frag b/src/renderer/webgl/shaders/src/Light.frag similarity index 100% rename from src/renderer/webgl/shaders/src/ForwardDiffuse.frag rename to src/renderer/webgl/shaders/src/Light.frag diff --git a/src/renderer/webgl/shaders/src/TextureTint.frag b/src/renderer/webgl/shaders/src/Multi.frag similarity index 100% rename from src/renderer/webgl/shaders/src/TextureTint.frag rename to src/renderer/webgl/shaders/src/Multi.frag diff --git a/src/renderer/webgl/shaders/src/TextureTint.vert b/src/renderer/webgl/shaders/src/Multi.vert similarity index 100% rename from src/renderer/webgl/shaders/src/TextureTint.vert rename to src/renderer/webgl/shaders/src/Multi.vert diff --git a/src/renderer/webgl/shaders/src/Single.frag b/src/renderer/webgl/shaders/src/Single.frag new file mode 100644 index 000000000..080a56737 --- /dev/null +++ b/src/renderer/webgl/shaders/src/Single.frag @@ -0,0 +1,35 @@ +#define SHADER_NAME PHASER_SINGLE_TEXTURE_TINT_FS + +precision mediump float; + +uniform sampler2D uMainSampler; + +varying vec2 outTexCoord; +varying float outTintEffect; +varying vec4 outTint; + +void main() +{ + vec4 texture = texture2D(uMainSampler, outTexCoord); + vec4 texel = vec4(outTint.rgb * outTint.a, outTint.a); + vec4 color = texture; + + if (outTintEffect == 0.0) + { + // Multiply texture tint + color = texture * texel; + } + else if (outTintEffect == 1.0) + { + // Solid color + texture alpha + color.rgb = mix(texture.rgb, outTint.rgb * outTint.a, texture.a); + color.a = texture.a * texel.a; + } + else if (outTintEffect == 2.0) + { + // Solid color, no texture + color = texel; + } + + gl_FragColor = color; +} diff --git a/src/renderer/webgl/shaders/src/Single.vert b/src/renderer/webgl/shaders/src/Single.vert new file mode 100644 index 000000000..91236a6a3 --- /dev/null +++ b/src/renderer/webgl/shaders/src/Single.vert @@ -0,0 +1,25 @@ +#define SHADER_NAME PHASER_SINGLE_TEXTURE_TINT_VS + +precision mediump float; + +uniform mat4 uProjectionMatrix; +uniform mat4 uViewMatrix; +uniform mat4 uModelMatrix; + +attribute vec2 inPosition; +attribute vec2 inTexCoord; +attribute float inTintEffect; +attribute vec4 inTint; + +varying vec2 outTexCoord; +varying float outTintEffect; +varying vec4 outTint; + +void main () +{ + gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0); + + outTexCoord = inTexCoord; + outTint = inTint; + outTintEffect = inTintEffect; +} From 8f5ee5391f628dd26c0c3d6fd1fa445985841104 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 21 Aug 2020 15:59:41 +0100 Subject: [PATCH 033/241] Removed redundant consts --- src/renderer/webgl/index.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/renderer/webgl/index.js b/src/renderer/webgl/index.js index f28c4ba41..3879bb14b 100644 --- a/src/renderer/webgl/index.js +++ b/src/renderer/webgl/index.js @@ -13,13 +13,6 @@ module.exports = { Utils: require('./Utils'), WebGLPipeline: require('./WebGLPipeline'), WebGLRenderer: require('./WebGLRenderer'), - Pipelines: require('./pipelines'), - - // Constants - BYTE: 0, - SHORT: 1, - UNSIGNED_BYTE: 2, - UNSIGNED_SHORT: 3, - FLOAT: 4 + Pipelines: require('./pipelines') }; From 57040554ef06678501a21f8abffa32e743fec646 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 21 Aug 2020 16:01:39 +0100 Subject: [PATCH 034/241] Renamed the pipelines to make them less ambiguous and sorted out lots of config properties --- ...ffuseLightPipeline.js => LightPipeline.js} | 90 +++++-- ...extureTintPipeline.js => MultiPipeline.js} | 254 +++++++++--------- src/renderer/webgl/pipelines/RopePipeline.js | 66 +++++ .../pipelines/TextureTintStripPipeline.js | 43 --- src/renderer/webgl/pipelines/index.js | 7 +- 5 files changed, 266 insertions(+), 194 deletions(-) rename src/renderer/webgl/pipelines/{ForwardDiffuseLightPipeline.js => LightPipeline.js} (76%) rename src/renderer/webgl/pipelines/{TextureTintPipeline.js => MultiPipeline.js} (87%) create mode 100644 src/renderer/webgl/pipelines/RopePipeline.js delete mode 100644 src/renderer/webgl/pipelines/TextureTintStripPipeline.js diff --git a/src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js b/src/renderer/webgl/pipelines/LightPipeline.js similarity index 76% rename from src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js rename to src/renderer/webgl/pipelines/LightPipeline.js index 692229f99..d46068882 100644 --- a/src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js +++ b/src/renderer/webgl/pipelines/LightPipeline.js @@ -6,47 +6,81 @@ */ var Class = require('../../../utils/Class'); -var ShaderSourceFS = require('../shaders/ForwardDiffuse-frag.js'); -var TextureTintPipeline = require('./TextureTintPipeline'); +var GetFastValue = require('../../../utils/object/GetFastValue'); +var ShaderSourceFS = require('../shaders/Light-frag.js'); +var MultiPipeline = require('./MultiPipeline'); var WebGLPipeline = require('../WebGLPipeline'); var LIGHT_COUNT = 10; /** * @classdesc - * ForwardDiffuseLightPipeline implements a forward rendering approach for 2D lights. * - * It works by using a custom shader, combined with Light Game Objects, that provides an ambient - * illumination effect in your games. + * The Light Pipeline is an extension of the Multi Pipeline and uses a custom shader + * designed to handle forward diffused rendering of 2D lights in a Scene. * - * This pipeline extends TextureTintPipeline so it implements all of its rendering functions and batching system. + * The shader works in tandem with Light Game Objects, and optionally texture normal maps, + * to provide an ambient illumination effect. * - * @class ForwardDiffuseLightPipeline - * @extends Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline + * If you wish to provide your own shader, you can use the `%LIGHT_COUNT%` declaration in the source, + * and it will be automatically replaced at run-time with the total number of configured lights. + * + * The maximum number of lights can be set in the Render Config `maxLights` property and defaults to 10. + * + * Prior to Phaser v3.50 this pipeline was called the `ForwardDiffuseLightPipeline`. + * + * The fragment shader it uses can be found in `shaders/src/Light.frag`. + * The vertex shader it uses can be found in `shaders/src/Multi.vert`. + * + * The default shader attributes for this pipeline are: + * + * `inPosition` (vec2, offset 0) + * `inTexCoord` (vec2, offset 8) + * `inTexId` (float, offset 16) + * `inTintEffect` (float, offset 20) + * `inTint` (vec4, offset 24, normalized) + * + * The default shader uniforms for this pipeline are: + * + * `uProjectionMatrix` (mat4) + * `uViewMatrix` (mat4) + * `uModelMatrix` (mat4) + * `uMainSampler` (sampler2D) + * `uNormSampler` (sampler2D) + * `uCamera` (vec4) + * `uResolution` (vec2) + * `uAmbientLightColor` (vec3) + * `uInverseRotationMatrix` (mat3) + * `uLights` (Light struct) + * + * @class LightPipeline + * @extends Phaser.Renderer.WebGL.Pipelines.MultiPipeline * @memberof Phaser.Renderer.WebGL.Pipelines * @constructor - * @since 3.0.0 + * @since 3.50.0 * - * @param {object} config - The configuration of the pipeline, same as the {@link Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline}. The fragment shader will be replaced with the lighting shader. + * @param {Phaser.Types.Renderer.WebGL.WebGLPipelineConfig} config - The configuration options for this pipeline. */ -var ForwardDiffuseLightPipeline = new Class({ +var LightPipeline = new Class({ - Extends: TextureTintPipeline, + Extends: MultiPipeline, initialize: - function ForwardDiffuseLightPipeline (config) + function LightPipeline (config) { - LIGHT_COUNT = config.maxLights; + LIGHT_COUNT = config.game.renderer.config.maxLights; - config.fragShader = ShaderSourceFS.replace('%LIGHT_COUNT%', LIGHT_COUNT.toString()); + var fragmentShaderSource = GetFastValue(config, 'fragShader', ShaderSourceFS); - TextureTintPipeline.call(this, config); + config.fragShader = fragmentShaderSource.replace('%LIGHT_COUNT%', LIGHT_COUNT.toString()); + + MultiPipeline.call(this, config); /** * Inverse rotation matrix for normal map rotations. * - * @name Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#inverseRotationMatrix + * @name Phaser.Renderer.WebGL.Pipelines.LightPipeline#inverseRotationMatrix * @type {Float32Array} * @private * @since 3.16.0 @@ -61,7 +95,7 @@ var ForwardDiffuseLightPipeline = new Class({ * Stores a default normal map, which is an object with a `glTexture` property that * maps to a 1x1 texture of the color #7f7fff created in the `boot` method. * - * @name Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#defaultNormalMap + * @name Phaser.Renderer.WebGL.Pipelines.LightPipeline#defaultNormalMap * @type {object} * @since 3.50.0 */ @@ -70,7 +104,7 @@ var ForwardDiffuseLightPipeline = new Class({ /** * Stores the previous number of lights rendered. * - * @name Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#lightCount + * @name Phaser.Renderer.WebGL.Pipelines.LightPipeline#lightCount * @type {number} * @since 3.50.0 */ @@ -85,7 +119,7 @@ var ForwardDiffuseLightPipeline = new Class({ * By this stage all Game level systems are now in place and you can perform any final * tasks that the pipeline may need that relied on game systems such as the Texture Manager. * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#boot + * @method Phaser.Renderer.WebGL.LightPipeline#boot * @since 3.11.0 */ boot: function () @@ -112,7 +146,7 @@ var ForwardDiffuseLightPipeline = new Class({ * Sets the shader program, vertex buffer and other resources. * Should only be called when changing pipeline. * - * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#bind + * @method Phaser.Renderer.WebGL.Pipelines.LightPipeline#bind * @since 3.50.0 * * @return {this} This WebGLPipeline instance. @@ -134,7 +168,7 @@ var ForwardDiffuseLightPipeline = new Class({ /** * This function sets all the needed resources for each camera pass. * - * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#onRender + * @method Phaser.Renderer.WebGL.Pipelines.LightPipeline#onRender * @since 3.0.0 * * @param {Phaser.Scene} scene - The Scene being rendered. @@ -218,7 +252,7 @@ var ForwardDiffuseLightPipeline = new Class({ * Rotates the normal map vectors inversely by the given angle. * Only works in 2D space. * - * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#setNormalMapRotation + * @method Phaser.Renderer.WebGL.Pipelines.LightPipeline#setNormalMapRotation * @since 3.16.0 * * @param {number} rotation - The angle of rotation in radians. @@ -259,7 +293,7 @@ var ForwardDiffuseLightPipeline = new Class({ /** * Assigns a texture to the current batch. If a different texture is already set it creates a new batch object. * - * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#setTexture2D + * @method Phaser.Renderer.WebGL.Pipelines.LightPipeline#setTexture2D * @since 3.50.0 * * @param {WebGLTexture} [texture] - WebGLTexture that will be assigned to the current batch. If not given uses blankTexture. @@ -294,7 +328,7 @@ var ForwardDiffuseLightPipeline = new Class({ * Custom pipelines can use this method in order to perform any required pre-batch tasks * for the given Game Object. It must return the texture unit the Game Object was assigned. * - * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#setGameObject + * @method Phaser.Renderer.WebGL.Pipelines.LightPipeline#setGameObject * @since 3.50.0 * * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object being rendered or added to the batch. @@ -329,7 +363,7 @@ var ForwardDiffuseLightPipeline = new Class({ * Returns the normal map WebGLTexture from the given Game Object. * If the Game Object doesn't have one, it returns the default normal map from this pipeline instead. * - * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#getNormalMap + * @method Phaser.Renderer.WebGL.Pipelines.LightPipeline#getNormalMap * @since 3.50.0 * * @param {Phaser.GameObjects.GameObject} [gameObject] - The Game Object to get the normal map from. @@ -374,6 +408,6 @@ var ForwardDiffuseLightPipeline = new Class({ }); -ForwardDiffuseLightPipeline.LIGHT_COUNT = LIGHT_COUNT; +LightPipeline.LIGHT_COUNT = LIGHT_COUNT; -module.exports = ForwardDiffuseLightPipeline; +module.exports = LightPipeline; diff --git a/src/renderer/webgl/pipelines/TextureTintPipeline.js b/src/renderer/webgl/pipelines/MultiPipeline.js similarity index 87% rename from src/renderer/webgl/pipelines/TextureTintPipeline.js rename to src/renderer/webgl/pipelines/MultiPipeline.js index 305a4e6a3..15074e101 100644 --- a/src/renderer/webgl/pipelines/TextureTintPipeline.js +++ b/src/renderer/webgl/pipelines/MultiPipeline.js @@ -10,35 +10,65 @@ var Earcut = require('../../../geom/polygon/Earcut'); var GetFastValue = require('../../../utils/object/GetFastValue'); var ModelViewProjection = require('./components/ModelViewProjection'); var ProjectOrtho = require('../mvp/ProjectOrtho'); -var ShaderSourceFS = require('../shaders/TextureTint-frag.js'); -var ShaderSourceVS = require('../shaders/TextureTint-vert.js'); +var ShaderSourceFS = require('../shaders/Multi-frag.js'); +var ShaderSourceVS = require('../shaders/Multi-vert.js'); var TransformMatrix = require('../../../gameobjects/components/TransformMatrix'); var Utils = require('../Utils'); var WebGLPipeline = require('../WebGLPipeline'); /** * @classdesc - * TextureTintPipeline implements the rendering infrastructure - * for displaying textured objects - * The config properties are: - * - game: Current game instance. - * - renderer: Current WebGL renderer. - * - topology: This indicates how the primitives are rendered. The default value is GL_TRIANGLES. - * Here is the full list of rendering primitives (https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants). - * - vertShader: Source for vertex shader as a string. - * - fragShader: Source for fragment shader as a string. - * - vertexCapacity: The amount of vertices that shall be allocated - * - vertexSize: The size of a single vertex in bytes. * - * @class TextureTintPipeline + * The Multi Pipeline is the core 2D texture rendering pipeline used by Phaser in WebGL. + * Virtually all Game Objects use this pipeline by default, including Sprites, Graphics + * and Tilemaps. It handles the batching of quads and tris, as well as methods for + * drawing and batching geometry data. + * + * Prior to Phaser v3.50 this pipeline was called the `TextureTintPipeline`. + * + * In previous versions of Phaser only one single texture unit was supported at any one time. + * The Multi Pipeline is an evolution of the old Texture Tint Pipeline, updated to support + * multi-textures for increased performance. + * + * The fragment shader it uses can be found in `shaders/src/Multi.frag`. + * The vertex shader it uses can be found in `shaders/src/Multi.vert`. + * + * The default shader attributes for this pipeline are: + * + * `inPosition` (vec2, offset 0) + * `inTexCoord` (vec2, offset 8) + * `inTexId` (float, offset 16) + * `inTintEffect` (float, offset 20) + * `inTint` (vec4, offset 24, normalized) + * + * The default shader uniforms for this pipeline are: + * + * `uProjectionMatrix` (mat4) + * `uViewMatrix` (mat4) + * `uModelMatrix` (mat4) + * `uMainSampler` (sampler2D array) + * + * If you wish to create a custom pipeline extending from this one, you can use two string + * declarations in your fragment shader source: `%count%` and `%forloop%`, where `count` is + * used to set the number of `sampler2Ds` available, and `forloop` is a block of GLSL code + * that will get the currently bound texture unit. + * + * This pipeline will automatically inject that code for you, should those values exist + * in your shader source. If you wish to handle this yourself, you can also use the + * function `Utils.parseFragmentShaderMaxTextures`. + * + * If you wish to create a pipeline that works from a single texture, or that doesn't have + * internal texture iteration, please see the `SinglePipeline` instead. + * + * @class MultiPipeline * @extends Phaser.Renderer.WebGL.WebGLPipeline * @memberof Phaser.Renderer.WebGL.Pipelines * @constructor - * @since 3.0.0 + * @since 3.50.0 * - * @param {object} config - The configuration options for this Texture Tint Pipeline, as described above. + * @param {Phaser.Types.Renderer.WebGL.WebGLPipelineConfig} config - The configuration options for this pipeline. */ -var TextureTintPipeline = new Class({ +var MultiPipeline = new Class({ Extends: WebGLPipeline, @@ -48,87 +78,71 @@ var TextureTintPipeline = new Class({ initialize: - function TextureTintPipeline (config) + function MultiPipeline (config) { - var rendererConfig = config.renderer.config; + var renderer = config.game.renderer; + var gl = renderer.gl; - var fragmentShaderSource; - var maxTextures = config.renderer.maxTextures; + var fragmentShaderSource = GetFastValue(config, 'fragShader', ShaderSourceFS); - if (!config.fragShader) - { - fragmentShaderSource = Utils.parseFragmentShaderMaxTextures(ShaderSourceFS, maxTextures); - } - else - { - fragmentShaderSource = config.fragShader; - } - - // Vertex Size = attribute size added together (2 + 2 + 1 + 4) // Vertex Size = attribute size added together (2 + 2 + 1 + 1 + 4) inc maxTextures - WebGLPipeline.call(this, { - game: config.game, - renderer: config.renderer, - gl: config.renderer.gl, - topology: GetFastValue(config, 'topology', config.renderer.gl.TRIANGLES), - vertShader: GetFastValue(config, 'vertShader', ShaderSourceVS), - fragShader: GetFastValue(config, 'fragShader', fragmentShaderSource), - vertexCapacity: GetFastValue(config, 'vertexCapacity', 6 * rendererConfig.batchSize), - vertexSize: GetFastValue(config, 'vertexSize', Float32Array.BYTES_PER_ELEMENT * 6 + Uint8Array.BYTES_PER_ELEMENT * 4), - attributes: [ - { - name: 'inPosition', - size: 2, - type: config.renderer.gl.FLOAT, - normalized: false, - offset: 0, - enabled: false, - location: -1 - }, - { - name: 'inTexCoord', - size: 2, - type: config.renderer.gl.FLOAT, - normalized: false, - offset: 4 * 2, - enabled: false, - location: -1 - }, - { - name: 'inTexId', - size: 1, - type: config.renderer.gl.FLOAT, - normalized: false, - offset: 4 * 4, - enabled: false, - location: -1 - }, - { - name: 'inTintEffect', - size: 1, - type: config.renderer.gl.FLOAT, - normalized: false, - offset: 4 * 5, - enabled: false, - location: -1 - }, - { - name: 'inTint', - size: 4, - type: config.renderer.gl.UNSIGNED_BYTE, - normalized: true, - offset: 4 * 6, - enabled: false, - location: -1 - } - ] - }); + config.fragShader = Utils.parseFragmentShaderMaxTextures(fragmentShaderSource, renderer.maxTextures); + config.vertShader = GetFastValue(config, 'vertShader', ShaderSourceVS); + config.attributes = GetFastValue(config, 'attributes', [ + { + name: 'inPosition', + size: 2, + type: gl.FLOAT, + normalized: false, + offset: 0, + enabled: false, + location: -1 + }, + { + name: 'inTexCoord', + size: 2, + type: gl.FLOAT, + normalized: false, + offset: 8, + enabled: false, + location: -1 + }, + { + name: 'inTexId', + size: 1, + type: gl.FLOAT, + normalized: false, + offset: 16, + enabled: false, + location: -1 + }, + { + name: 'inTintEffect', + size: 1, + type: gl.FLOAT, + normalized: false, + offset: 20, + enabled: false, + location: -1 + }, + { + name: 'inTint', + size: 4, + type: gl.UNSIGNED_BYTE, + normalized: true, + offset: 24, + enabled: false, + location: -1 + } + ]); + + WebGLPipeline.call(this, config); /** * Float32 view of the array buffer containing the pipeline's vertices. * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#vertexViewF32 + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#vertexViewF32 * @type {Float32Array} * @since 3.0.0 */ @@ -137,7 +151,7 @@ var TextureTintPipeline = new Class({ /** * Uint32 view of the array buffer containing the pipeline's vertices. * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#vertexViewU32 + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#vertexViewU32 * @type {Uint32Array} * @since 3.0.0 */ @@ -146,7 +160,7 @@ var TextureTintPipeline = new Class({ /** * A temporary Transform Matrix, re-used internally during batching. * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#_tempMatrix1 + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#_tempMatrix1 * @private * @type {Phaser.GameObjects.Components.TransformMatrix} * @since 3.11.0 @@ -156,7 +170,7 @@ var TextureTintPipeline = new Class({ /** * A temporary Transform Matrix, re-used internally during batching. * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#_tempMatrix2 + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#_tempMatrix2 * @private * @type {Phaser.GameObjects.Components.TransformMatrix} * @since 3.11.0 @@ -166,7 +180,7 @@ var TextureTintPipeline = new Class({ /** * A temporary Transform Matrix, re-used internally during batching. * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#_tempMatrix3 + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#_tempMatrix3 * @private * @type {Phaser.GameObjects.Components.TransformMatrix} * @since 3.11.0 @@ -176,7 +190,7 @@ var TextureTintPipeline = new Class({ /** * A temporary Transform Matrix, re-used internally during batching. * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#_tempMatrix4 + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#_tempMatrix4 * @private * @type {Phaser.GameObjects.Components.TransformMatrix} * @since 3.11.0 @@ -186,7 +200,7 @@ var TextureTintPipeline = new Class({ /** * Used internally to draw stroked triangles. * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#tempTriangle + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#tempTriangle * @type {array} * @private * @since 3.12.0 @@ -206,7 +220,7 @@ var TextureTintPipeline = new Class({ * 2 = solid color, no texture * 3 = solid texture, no color * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#tintEffect + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#tintEffect * @type {number} * @private * @since 3.12.0 @@ -216,7 +230,7 @@ var TextureTintPipeline = new Class({ /** * Cached stroke tint. * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#strokeTint + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#strokeTint * @type {object} * @private * @since 3.12.0 @@ -226,7 +240,7 @@ var TextureTintPipeline = new Class({ /** * Cached fill tint. * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#fillTint + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#fillTint * @type {object} * @private * @since 3.12.0 @@ -236,7 +250,7 @@ var TextureTintPipeline = new Class({ /** * Internal texture frame reference. * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#currentFrame + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#currentFrame * @type {Phaser.Textures.Frame} * @private * @since 3.12.0 @@ -246,7 +260,7 @@ var TextureTintPipeline = new Class({ /** * Internal path quad cache. * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#firstQuad + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#firstQuad * @type {array} * @private * @since 3.12.0 @@ -256,7 +270,7 @@ var TextureTintPipeline = new Class({ /** * Internal path quad cache. * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#prevQuad + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#prevQuad * @type {array} * @private * @since 3.12.0 @@ -266,7 +280,7 @@ var TextureTintPipeline = new Class({ /** * Used internally for triangulating a polygon. * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#polygonCache + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#polygonCache * @type {array} * @private * @since 3.12.0 @@ -281,7 +295,7 @@ var TextureTintPipeline = new Class({ * Sets the shader program, vertex buffer and other resources. * Should only be called when changing pipeline. * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#bind + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#bind * @since 3.50.0 * * @return {this} This WebGLPipeline instance. @@ -298,7 +312,7 @@ var TextureTintPipeline = new Class({ /** * Called every time a Game Object needs to use this pipeline. * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#onBind + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#onBind * @since 3.0.0 * * @param {Phaser.GameObjects.GameObject} [gameObject] - The Game Object that invoked this pipeline, if any. @@ -315,7 +329,7 @@ var TextureTintPipeline = new Class({ /** * Resizes this pipeline and updates the projection. * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#resize + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#resize * @since 3.0.0 * * @param {number} width - The new width. @@ -336,7 +350,7 @@ var TextureTintPipeline = new Class({ /** * Assigns a texture to the current batch. If a different texture is already set it creates a new batch object. * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#setTexture2D + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#setTexture2D * @since 3.1.0 * * @param {WebGLTexture} [texture] - WebGLTexture that will be assigned to the current batch. If not given uses blankTexture. @@ -355,7 +369,7 @@ var TextureTintPipeline = new Class({ /** * Uploads the vertex data and emits a draw call for the current batch of vertices. * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#flush + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#flush * @since 3.0.0 * * @return {this} This WebGLPipeline instance. @@ -388,7 +402,7 @@ var TextureTintPipeline = new Class({ /** * Takes a Sprite Game Object, or any object that extends it, and adds it to the batch. * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchSprite + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchSprite * @since 3.0.0 * * @param {(Phaser.GameObjects.Image|Phaser.GameObjects.Sprite)} sprite - The texture based Game Object to add to the batch. @@ -561,7 +575,7 @@ var TextureTintPipeline = new Class({ * * Where tx0/ty0 = 0, tx1/ty1 = 1, tx2/ty2 = 2 and tx3/ty3 = 3 * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchQuad + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchQuad * @since 3.12.0 * * @param {number} x0 - The top-left x position. @@ -674,7 +688,7 @@ var TextureTintPipeline = new Class({ * 1-----2 * ``` * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchTri + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchTri * @since 3.12.0 * * @param {number} x1 - The bottom-left x position. @@ -748,7 +762,7 @@ var TextureTintPipeline = new Class({ /** * Generic function for batching a textured quad using argument values instead of a Game Object. * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchTexture + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchTexture * @since 3.0.0 * * @param {Phaser.GameObjects.GameObject} gameObject - Source GameObject. @@ -938,7 +952,7 @@ var TextureTintPipeline = new Class({ /** * Adds a Texture Frame into the batch for rendering. * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchTextureFrame + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchTextureFrame * @since 3.12.0 * * @param {Phaser.Textures.Frame} frame - The Texture Frame to be rendered. @@ -1003,7 +1017,7 @@ var TextureTintPipeline = new Class({ * * Used for directly batching untransformed rectangles, such as Camera background colors. * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#drawFillRect + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#drawFillRect * @since 3.12.0 * * @param {number} x - Horizontal top left coordinate of the rectangle. @@ -1034,7 +1048,7 @@ var TextureTintPipeline = new Class({ * Pushes a filled rectangle into the vertex batch. * Rectangle factors in the given transform matrices before adding to the batch. * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchFillRect + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchFillRect * @since 3.12.0 * * @param {number} x - Horizontal top left coordinate of the rectangle. @@ -1087,7 +1101,7 @@ var TextureTintPipeline = new Class({ * Pushes a filled triangle into the vertex batch. * Triangle factors in the given transform matrices before adding to the batch. * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchFillTriangle + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchFillTriangle * @since 3.12.0 * * @param {number} x0 - Point 0 x coordinate. @@ -1135,7 +1149,7 @@ var TextureTintPipeline = new Class({ * Triangle factors in the given transform matrices before adding to the batch. * The triangle is created from 3 lines and drawn using the `batchStrokePath` method. * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchStrokeTriangle + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchStrokeTriangle * @since 3.12.0 * * @param {number} x0 - Point 0 x coordinate. @@ -1179,7 +1193,7 @@ var TextureTintPipeline = new Class({ * * The path is always automatically closed because it's filled. * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchFillPath + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchFillPath * @since 3.12.0 * * @param {array} path - Collection of points that represent the path. @@ -1260,7 +1274,7 @@ var TextureTintPipeline = new Class({ * * The path is optionally closed at the end. * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchStrokePath + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchStrokePath * @since 3.12.0 * * @param {array} path - Collection of points that represent the path. @@ -1304,7 +1318,7 @@ var TextureTintPipeline = new Class({ * Creates a line out of 4 quads and adds it to the vertex batch based on the given line values. * Assumes a texture has already been set, prior to calling this function. * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchLine + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchLine * @since 3.12.0 * * @param {number} ax - X coordinate to the start of the line @@ -1420,4 +1434,4 @@ var TextureTintPipeline = new Class({ }); -module.exports = TextureTintPipeline; +module.exports = MultiPipeline; diff --git a/src/renderer/webgl/pipelines/RopePipeline.js b/src/renderer/webgl/pipelines/RopePipeline.js new file mode 100644 index 000000000..1820eaa80 --- /dev/null +++ b/src/renderer/webgl/pipelines/RopePipeline.js @@ -0,0 +1,66 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = require('../../../utils/Class'); +var ModelViewProjection = require('./components/ModelViewProjection'); +var MultiPipeline = require('./MultiPipeline'); + +/** + * @classdesc + * + * The Rope Pipeline is a variation of the Multi Pipeline that uses a `TRIANGLE_STRIP` for + * its topology, instead of TRIANGLES. This is primarily used by the Rope Game Object, + * or anything that extends it. + * + * Prior to Phaser v3.50 this pipeline was called the `TextureTintStripPipeline`. + * + * The fragment shader it uses can be found in `shaders/src/Multi.frag`. + * The vertex shader it uses can be found in `shaders/src/Multi.vert`. + * + * The default shader attributes for this pipeline are: + * + * `inPosition` (vec2, offset 0) + * `inTexCoord` (vec2, offset 8) + * `inTexId` (float, offset 16) + * `inTintEffect` (float, offset 20) + * `inTint` (vec4, offset 24, normalized) + * + * The default shader uniforms for this pipeline are: + * + * `uProjectionMatrix` (mat4) + * `uViewMatrix` (mat4) + * `uModelMatrix` (mat4) + * `uMainSampler` (sampler2D array) + * + * The pipeline is structurally identical to the Multi Pipeline and should be treated as such. + * + * @class RopePipeline + * @extends Phaser.Renderer.WebGL.Pipelines.MultiPipeline + * @memberof Phaser.Renderer.WebGL.Pipelines + * @constructor + * @since 3.50.0 + * + * @param {Phaser.Types.Renderer.WebGL.WebGLPipelineConfig} config - The configuration options for this pipeline. + */ +var RopePipeline = new Class({ + + Extends: MultiPipeline, + + Mixins: [ + ModelViewProjection + ], + + initialize: + + function RopePipeline (config) + { + config.topology = config.renderer.gl.TRIANGLE_STRIP; + + MultiPipeline.call(this, config); + } +}); + +module.exports = RopePipeline; diff --git a/src/renderer/webgl/pipelines/TextureTintStripPipeline.js b/src/renderer/webgl/pipelines/TextureTintStripPipeline.js deleted file mode 100644 index c6415a06f..000000000 --- a/src/renderer/webgl/pipelines/TextureTintStripPipeline.js +++ /dev/null @@ -1,43 +0,0 @@ -/** - * @author Richard Davey - * @author Felipe Alfonso <@bitnenfer> - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = require('../../../utils/Class'); -var ModelViewProjection = require('./components/ModelViewProjection'); -var TextureTintPipeline = require('./TextureTintPipeline'); - -/** - * @classdesc - * The Texture Tint Strip Pipeline is a variation of the Texture Tint Pipeline that uses a TRIANGLE_STRIP for - * its topology, instead of TRIANGLES. This is primarily used by the Rope Game Object any anything that extends it. - * - * @class TextureTintStripPipeline - * @extends Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline - * @memberof Phaser.Renderer.WebGL.Pipelines - * @constructor - * @since 3.23.0 - * - * @param {object} config - The configuration options for this Texture Tint Pipeline, as described above. - */ -var TextureTintStripPipeline = new Class({ - - Extends: TextureTintPipeline, - - Mixins: [ - ModelViewProjection - ], - - initialize: - - function TextureTintStripPipeline (config) - { - config.topology = config.renderer.gl.TRIANGLE_STRIP; - - TextureTintPipeline.call(this, config); - } -}); - -module.exports = TextureTintStripPipeline; diff --git a/src/renderer/webgl/pipelines/index.js b/src/renderer/webgl/pipelines/index.js index 10bd15cb3..d3964677c 100644 --- a/src/renderer/webgl/pipelines/index.js +++ b/src/renderer/webgl/pipelines/index.js @@ -11,9 +11,10 @@ module.exports = { BitmapMaskPipeline: require('./BitmapMaskPipeline'), - ForwardDiffuseLightPipeline: require('./ForwardDiffuseLightPipeline'), - TextureTintPipeline: require('./TextureTintPipeline'), - TextureTintStripPipeline: require('./TextureTintStripPipeline'), + LightPipeline: require('./LightPipeline'), + SinglePipeline: require('./SinglePipeline'), + MultiPipeline: require('./MultiPipeline'), + RopePipeline: require('./RopePipeline'), ModelViewProjection: require('./components/ModelViewProjection') }; From 600385ac29759148a00344e93e7d6d71fbb46bab Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 21 Aug 2020 16:01:53 +0100 Subject: [PATCH 035/241] A brand new pipeline for single-texture custom pipelines --- .../webgl/pipelines/SinglePipeline.js | 320 ++++++++++++++++++ 1 file changed, 320 insertions(+) create mode 100644 src/renderer/webgl/pipelines/SinglePipeline.js diff --git a/src/renderer/webgl/pipelines/SinglePipeline.js b/src/renderer/webgl/pipelines/SinglePipeline.js new file mode 100644 index 000000000..90ffd8f63 --- /dev/null +++ b/src/renderer/webgl/pipelines/SinglePipeline.js @@ -0,0 +1,320 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = require('../../../utils/Class'); +var GetFastValue = require('../../../utils/object/GetFastValue'); +var ModelViewProjection = require('./components/ModelViewProjection'); +var MultiPipeline = require('./MultiPipeline'); +var ShaderSourceFS = require('../shaders/Single-frag.js'); +var ShaderSourceVS = require('../shaders/Single-vert.js'); +var WebGLPipeline = require('../WebGLPipeline'); + +/** + * @classdesc + * + * The Single Pipeline is a special version of the Multi Pipeline that only ever + * uses one single texture, bound to texture unit zero. Although not as efficient as the + * Multi Pipeline, it provides an easier way to create custom pipelines that only require + * a single bound texture. + * + * Prior to Phaser v3.50 this pipeline didn't exist, but could be compared to the old `TextureTintPipeline`. + * + * The fragment shader it uses can be found in `shaders/src/Single.frag`. + * The vertex shader it uses can be found in `shaders/src/Single.vert`. + * + * The default shader attributes for this pipeline are: + * + * `inPosition` (vec2, offset 0) + * `inTexCoord` (vec2, offset 8) + * `inTintEffect` (float, offset 16) + * `inTint` (vec4, offset 20, normalized) + * + * The default shader uniforms for this pipeline are: + * + * `uProjectionMatrix` (mat4) + * `uViewMatrix` (mat4) + * `uModelMatrix` (mat4) + * `uMainSampler` (sampler2D) + * + * @class SinglePipeline + * @extends Phaser.Renderer.WebGL.Pipelines.MultiPipeline + * @memberof Phaser.Renderer.WebGL.Pipelines + * @constructor + * @since 3.50.0 + * + * @param {Phaser.Types.Renderer.WebGL.WebGLPipelineConfig} config - The configuration options for this pipeline. + */ +var SinglePipeline = new Class({ + + Extends: MultiPipeline, + + Mixins: [ + ModelViewProjection + ], + + initialize: + + function SinglePipeline (config) + { + config.fragShader = GetFastValue(config, 'fragShader', ShaderSourceFS), + config.vertShader = GetFastValue(config, 'vertShader', ShaderSourceVS), + config.vertexSize = GetFastValue(config, 'vertexSize', 24), + config.attributes = GetFastValue(config, 'attributes', [ + { + name: 'inPosition', + size: 2, + type: config.renderer.gl.FLOAT, + normalized: false, + offset: 0, + enabled: false, + location: -1 + }, + { + name: 'inTexCoord', + size: 2, + type: config.renderer.gl.FLOAT, + normalized: false, + offset: 8, + enabled: false, + location: -1 + }, + { + name: 'inTintEffect', + size: 1, + type: config.renderer.gl.FLOAT, + normalized: false, + offset: 16, + enabled: false, + location: -1 + }, + { + name: 'inTint', + size: 4, + type: config.renderer.gl.UNSIGNED_BYTE, + normalized: true, + offset: 20, + enabled: false, + location: -1 + } + ]); + + MultiPipeline.call(this, config); + + this.forceZero = true; + }, + + /** + * Adds the vertices data into the batch and flushes if full. + * + * Assumes 6 vertices in the following arrangement: + * + * ``` + * 0----3 + * |\ B| + * | \ | + * | \ | + * | A \| + * | \ + * 1----2 + * ``` + * + * Where tx0/ty0 = 0, tx1/ty1 = 1, tx2/ty2 = 2 and tx3/ty3 = 3 + * + * @method Phaser.Renderer.WebGL.Pipelines.SinglePipeline#batchQuad + * @since 3.50.0 + * + * @param {number} x0 - The top-left x position. + * @param {number} y0 - The top-left y position. + * @param {number} x1 - The bottom-left x position. + * @param {number} y1 - The bottom-left y position. + * @param {number} x2 - The bottom-right x position. + * @param {number} y2 - The bottom-right y position. + * @param {number} x3 - The top-right x position. + * @param {number} y3 - The top-right y position. + * @param {number} u0 - UV u0 value. + * @param {number} v0 - UV v0 value. + * @param {number} u1 - UV u1 value. + * @param {number} v1 - UV v1 value. + * @param {number} tintTL - The top-left tint color value. + * @param {number} tintTR - The top-right tint color value. + * @param {number} tintBL - The bottom-left tint color value. + * @param {number} tintBR - The bottom-right tint color value. + * @param {(number|boolean)} tintEffect - The tint effect for the shader to use. + * @param {WebGLTexture} [texture] - WebGLTexture that will be assigned to the current batch if a flush occurs. + * @param {integer} [unit=0] - This parameter isn't used by this pipeline, but is retained for TTP support. + * + * @return {boolean} `true` if this method caused the batch to flush, otherwise `false`. + */ + batchQuad: function (x0, y0, x1, y1, x2, y2, x3, y3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, unit) + { + if (unit === undefined) { unit = this.currentUnit; } + + var hasFlushed = false; + + if (this.vertexCount + 6 > this.vertexCapacity) + { + this.flush(); + + hasFlushed = true; + + unit = this.setTexture2D(texture); + } + + var vertexViewF32 = this.vertexViewF32; + var vertexViewU32 = this.vertexViewU32; + + var vertexOffset = (this.vertexCount * this.vertexComponentCount) - 1; + + vertexViewF32[++vertexOffset] = x0; + vertexViewF32[++vertexOffset] = y0; + vertexViewF32[++vertexOffset] = u0; + vertexViewF32[++vertexOffset] = v0; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintTL; + + vertexViewF32[++vertexOffset] = x1; + vertexViewF32[++vertexOffset] = y1; + vertexViewF32[++vertexOffset] = u0; + vertexViewF32[++vertexOffset] = v1; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintBL; + + vertexViewF32[++vertexOffset] = x2; + vertexViewF32[++vertexOffset] = y2; + vertexViewF32[++vertexOffset] = u1; + vertexViewF32[++vertexOffset] = v1; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintBR; + + vertexViewF32[++vertexOffset] = x0; + vertexViewF32[++vertexOffset] = y0; + vertexViewF32[++vertexOffset] = u0; + vertexViewF32[++vertexOffset] = v0; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintTL; + + vertexViewF32[++vertexOffset] = x2; + vertexViewF32[++vertexOffset] = y2; + vertexViewF32[++vertexOffset] = u1; + vertexViewF32[++vertexOffset] = v1; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintBR; + + vertexViewF32[++vertexOffset] = x3; + vertexViewF32[++vertexOffset] = y3; + vertexViewF32[++vertexOffset] = u1; + vertexViewF32[++vertexOffset] = v0; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintTR; + + this.vertexCount += 6; + + return hasFlushed; + }, + + /** + * Adds the vertices data into the batch and flushes if full. + * + * Assumes 3 vertices in the following arrangement: + * + * ``` + * 0 + * |\ + * | \ + * | \ + * | \ + * | \ + * 1-----2 + * ``` + * + * @method Phaser.Renderer.WebGL.Pipelines.SinglePipeline#batchTri + * @since 3.50.0 + * + * @param {number} x1 - The bottom-left x position. + * @param {number} y1 - The bottom-left y position. + * @param {number} x2 - The bottom-right x position. + * @param {number} y2 - The bottom-right y position. + * @param {number} x3 - The top-right x position. + * @param {number} y3 - The top-right y position. + * @param {number} u0 - UV u0 value. + * @param {number} v0 - UV v0 value. + * @param {number} u1 - UV u1 value. + * @param {number} v1 - UV v1 value. + * @param {number} tintTL - The top-left tint color value. + * @param {number} tintTR - The top-right tint color value. + * @param {number} tintBL - The bottom-left tint color value. + * @param {(number|boolean)} tintEffect - The tint effect for the shader to use. + * @param {WebGLTexture} [texture] - WebGLTexture that will be assigned to the current batch if a flush occurs. + * @param {integer} [unit=0] - This parameter isn't used by this pipeline, but is retained for TTP support. + * + * @return {boolean} `true` if this method caused the batch to flush, otherwise `false`. + */ + batchTri: function (x1, y1, x2, y2, x3, y3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintEffect, texture, unit) + { + if (unit === undefined) { unit = this.currentUnit; } + + var hasFlushed = false; + + if (this.vertexCount + 3 > this.vertexCapacity) + { + this.flush(); + + hasFlushed = true; + + unit = this.setTexture2D(texture); + } + + var vertexViewF32 = this.vertexViewF32; + var vertexViewU32 = this.vertexViewU32; + + var vertexOffset = (this.vertexCount * this.vertexComponentCount) - 1; + + vertexViewF32[++vertexOffset] = x1; + vertexViewF32[++vertexOffset] = y1; + vertexViewF32[++vertexOffset] = u0; + vertexViewF32[++vertexOffset] = v0; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintTL; + + vertexViewF32[++vertexOffset] = x2; + vertexViewF32[++vertexOffset] = y2; + vertexViewF32[++vertexOffset] = u0; + vertexViewF32[++vertexOffset] = v1; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintTR; + + vertexViewF32[++vertexOffset] = x3; + vertexViewF32[++vertexOffset] = y3; + vertexViewF32[++vertexOffset] = u1; + vertexViewF32[++vertexOffset] = v1; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintBL; + + this.vertexCount += 3; + + return hasFlushed; + }, + + /** + * Called every time the pipeline is bound by the renderer. + * Sets the shader program, vertex buffer and other resources. + * Should only be called when changing pipeline. + * + * @method Phaser.Renderer.WebGL.Pipelines.SinglePipeline#bind + * @since 3.50.0 + * + * @return {this} This WebGLPipeline instance. + */ + bind: function () + { + WebGLPipeline.prototype.bind.call(this); + + return this; + } + +}); + +module.exports = SinglePipeline; From 37fdde7911d8000f9edb0a794a0bd80fd73a4f2a Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 21 Aug 2020 16:02:30 +0100 Subject: [PATCH 036/241] New typedefs for pipeline configs --- .../typedefs/WebGLPipelineAttributesConfig.js | 12 ++++++++++++ src/renderer/webgl/typedefs/WebGLPipelineConfig.js | 14 ++++++++++++++ src/renderer/webgl/typedefs/index.js | 9 +++++++++ 3 files changed, 35 insertions(+) create mode 100644 src/renderer/webgl/typedefs/WebGLPipelineAttributesConfig.js create mode 100644 src/renderer/webgl/typedefs/WebGLPipelineConfig.js create mode 100644 src/renderer/webgl/typedefs/index.js diff --git a/src/renderer/webgl/typedefs/WebGLPipelineAttributesConfig.js b/src/renderer/webgl/typedefs/WebGLPipelineAttributesConfig.js new file mode 100644 index 000000000..7ba215298 --- /dev/null +++ b/src/renderer/webgl/typedefs/WebGLPipelineAttributesConfig.js @@ -0,0 +1,12 @@ +/** + * @typedef {object} Phaser.Types.Renderer.WebGL.WebGLPipelineAttributesConfig + * @since 3.50.0 + * + * @property {string} name - The name of the attribute as defined in the vertex shader. + * @property {number} size - The number of components in the attribute, i.e. 1 for a float, 2 for a vec2, 3 for a vec3, etc. + * @property {GLenum} type - The data type of the attribute. Either `gl.BYTE`, `gl.SHORT`, `gl.UNSIGNED_BYTE`, `gl.UNSIGNED_SHORT` or `gl.FLOAT`. + * @property {number} offset - The offset, in bytes, of this attribute data in the vertex array. Equivalent to `offsetof(vertex, attrib)` in C. + * @property {boolean} normalized - Should the attribute data be normalized? + * @property {boolean} enabled - You should set this to `false` by default. The pipeline will enable it on boot. + * @property {number} location - You should set this to `-1` by default. The pipeline will set it on boot. + */ diff --git a/src/renderer/webgl/typedefs/WebGLPipelineConfig.js b/src/renderer/webgl/typedefs/WebGLPipelineConfig.js new file mode 100644 index 000000000..e4cd7a117 --- /dev/null +++ b/src/renderer/webgl/typedefs/WebGLPipelineConfig.js @@ -0,0 +1,14 @@ +/** + * @typedef {object} Phaser.Types.Renderer.WebGL.WebGLPipelineConfig + * @since 3.50.0 + * + * @property {Phaser.Game} game - The Phaser.Game instance that owns this pipeline. + * @property {string} [name] - The name of the pipeline. + * @property {GLenum} [topology=gl.TRIANGLES] - How the primitives are rendered. The default value is GL_TRIANGLES. Here is the full list of rendering primitives: (https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants). + * @property {string} [vertShader] - The source code, as a string, for the vertex shader. + * @property {string} [fragShader] - The source code, as a string, for the fragment shader. Can include `%count%` and `%forloop%` declarations for multi-texture support. + * @property {number} [vertexCapacity] - The number of vertices to hold in the batch. Defaults to `RenderConfig.batchSize` * 6. + * @property {number} [vertexSize] - The size, in bytes, of a single entry in the vertex buffer. Defaults to Float32Array.BYTES_PER_ELEMENT * 6 + Uint8Array.BYTES_PER_ELEMENT * 4. + * @property {ArrayBuffer} [vertices] - An optional Array Buffer full of pre-calculated vertices data. + * @property {Phaser.Types.Renderer.WebGL.WebGLPipelineAttributesConfig} [attributes] - An array of shader attribute data. + */ diff --git a/src/renderer/webgl/typedefs/index.js b/src/renderer/webgl/typedefs/index.js new file mode 100644 index 000000000..edb75f907 --- /dev/null +++ b/src/renderer/webgl/typedefs/index.js @@ -0,0 +1,9 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Types.Renderer.WebGL + */ From 4b4af50ca901111152fb4c01cff2a138f02acd54 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 21 Aug 2020 16:02:43 +0100 Subject: [PATCH 037/241] Quicker return --- src/renderer/webgl/Utils.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/renderer/webgl/Utils.js b/src/renderer/webgl/Utils.js index 99930eebb..535dd516f 100644 --- a/src/renderer/webgl/Utils.js +++ b/src/renderer/webgl/Utils.js @@ -240,8 +240,6 @@ module.exports = { fragmentShaderSource = fragmentShaderSource.replace(/%count%/gi, maxTextures.toString()); - fragmentShaderSource = fragmentShaderSource.replace(/%forloop%/gi, src); - - return fragmentShaderSource; + return fragmentShaderSource.replace(/%forloop%/gi, src); } }; From 468c03dfe5b221d2a80b7d40ce41e273e1c01ce3 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 21 Aug 2020 16:03:07 +0100 Subject: [PATCH 038/241] Much better docs and handling of config values --- src/renderer/webgl/WebGLPipeline.js | 173 ++++++++++++++-------------- 1 file changed, 86 insertions(+), 87 deletions(-) diff --git a/src/renderer/webgl/WebGLPipeline.js b/src/renderer/webgl/WebGLPipeline.js index d55cd4c8f..dd463d2d6 100644 --- a/src/renderer/webgl/WebGLPipeline.js +++ b/src/renderer/webgl/WebGLPipeline.js @@ -6,46 +6,31 @@ */ var Class = require('../../utils/Class'); +var GetFastValue = require('../../utils/object/GetFastValue'); var Utils = require('./Utils'); /** * @classdesc - * WebGLPipeline is a class that describes the way elements will be renderered - * in WebGL, specially focused on batching vertices (batching is not provided). - * Pipelines are mostly used for describing 2D rendering passes but it's - * flexible enough to be used for any type of rendering including 3D. - * Internally WebGLPipeline will handle things like compiling shaders, - * creating vertex buffers, assigning primitive topology and binding - * vertex attributes. * - * The config properties are: - * - game: Current game instance. - * - renderer: Current WebGL renderer. - * - gl: Current WebGL context. - * - topology: This indicates how the primitives are rendered. The default value is GL_TRIANGLES. - * Here is the full list of rendering primitives (https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants). - * - vertShader: Source for vertex shader as a string. - * - fragShader: Source for fragment shader as a string. - * - vertexCapacity: The amount of vertices that shall be allocated - * - vertexSize: The size of a single vertex in bytes. - * - vertices: An optional buffer of vertices - * - attributes: An array describing the vertex attributes + * The `WebGLPipeline` is a base class used by all of the core Phaser pipelines. * - * The vertex attributes properties are: - * - name : String - Name of the attribute in the vertex shader - * - size : integer - How many components describe the attribute. For ex: vec3 = size of 3, float = size of 1 - * - type : GLenum - WebGL type (gl.BYTE, gl.SHORT, gl.UNSIGNED_BYTE, gl.UNSIGNED_SHORT, gl.FLOAT) - * - normalized : boolean - Is the attribute normalized - * - offset : integer - The offset in bytes to the current attribute in the vertex. Equivalent to offsetof(vertex, attrib) in C - * Here you can find more information of how to describe an attribute: - * - https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/vertexAttribPointer + * It describes the way elements will be rendered in WebGL. Internally, it handles + * compiling the shaders, creating vertex buffers, assigning primitive topolgy and + * binding vertex attributes, all based on the given configuration data. + * + * The pipeline is configured by passing in a `WebGLPipelineConfig` object. Please + * see the documentation for this type to fully understand the configuration options + * available to you. + * + * Usually, you would not extend from this class directly, but would instead extend + * from one of the core pipelines, such as the Multi Pipeline or Rope Pipeline. * * @class WebGLPipeline * @memberof Phaser.Renderer.WebGL * @constructor * @since 3.0.0 * - * @param {object} config - The configuration object for this WebGL Pipeline, as described above. + * @param {Phaser.Types.Renderer.WebGL.WebGLPipelineConfig} config - The configuration object for this WebGL Pipeline. */ var WebGLPipeline = new Class({ @@ -53,59 +38,36 @@ var WebGLPipeline = new Class({ function WebGLPipeline (config) { + var game = config.game; + var renderer = game.renderer; + var gl = renderer.gl; + /** - * Name of the Pipeline. Used for identifying + * Name of the pipeline. Used for identification. * * @name Phaser.Renderer.WebGL.WebGLPipeline#name * @type {string} * @since 3.0.0 */ - this.name = 'WebGLPipeline'; + this.name = GetFastValue(config, 'name', 'WebGLPipeline'); /** - * The Game which owns this WebGL Pipeline. + * The Phaser Game instance to which this pipeline is bound. * * @name Phaser.Renderer.WebGL.WebGLPipeline#game * @type {Phaser.Game} * @since 3.0.0 */ - this.game = config.game; + this.game = game; /** - * The canvas which this WebGL Pipeline renders to. + * The WebGL Renderer instance to which this pipeline is bound. * - * @name Phaser.Renderer.WebGL.WebGLPipeline#view - * @type {HTMLCanvasElement} + * @name Phaser.Renderer.WebGL.WebGLPipeline#renderer + * @type {Phaser.Renderer.WebGL.WebGLRenderer} * @since 3.0.0 */ - this.view = config.game.canvas; - - /** - * Used to store the current game resolution - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#resolution - * @type {number} - * @since 3.0.0 - */ - this.resolution = 1; - - /** - * Width of the current viewport - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#width - * @type {number} - * @since 3.0.0 - */ - this.width = 0; - - /** - * Height of the current viewport - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#height - * @type {number} - * @since 3.0.0 - */ - this.height = 0; + this.renderer = renderer; /** * The WebGL context this WebGL Pipeline uses. @@ -114,10 +76,47 @@ var WebGLPipeline = new Class({ * @type {WebGLRenderingContext} * @since 3.0.0 */ - this.gl = config.gl; + this.gl = gl; /** - * How many vertices have been fed to the current pipeline. + * The canvas which this WebGL Pipeline renders to. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#view + * @type {HTMLCanvasElement} + * @since 3.0.0 + */ + this.view = game.canvas; + + /** + * The current game resolution. + * This is hard-coded to 1. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#resolution + * @type {number} + * @since 3.0.0 + */ + this.resolution = 1; + + /** + * Width of the current viewport. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#width + * @type {number} + * @since 3.0.0 + */ + this.width = 0; + + /** + * Height of the current viewport. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#height + * @type {number} + * @since 3.0.0 + */ + this.height = 0; + + /** + * The current number of vertices that have been added to the pipeline batch. * * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCount * @type {number} @@ -127,22 +126,29 @@ var WebGLPipeline = new Class({ this.vertexCount = 0; /** - * The limit of vertices that the pipeline can hold + * The total number of vertices that the pipeline batch can hold before it will flush. + * This defaults to `batchSize * 6`, where `batchSize` is defined in the Renderer Config. * * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCapacity * @type {integer} * @since 3.0.0 */ - this.vertexCapacity = config.vertexCapacity; + this.vertexCapacity = GetFastValue(config, 'vertexCapacity', renderer.config.batchSize * 6); /** - * The WebGL Renderer which owns this WebGL Pipeline. + * The size in bytes of a vertex. * - * @name Phaser.Renderer.WebGL.WebGLPipeline#renderer - * @type {Phaser.Renderer.WebGL.WebGLRenderer} + * Derived by adding together all of the vertex attributes. + * + * For example, the Texture Tint Pipeline has 2 + 2 + 1 + 1 + 4 for the attributes + * `inPosition` (size 2), `inTexCoord` (size 2), `inTexId` (size 1), `inTintEffect` (size 1) + * and `inTint` (size 4), for a total of 28, which is the default for this property. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexSize + * @type {integer} * @since 3.0.0 */ - this.renderer = config.renderer; + this.vertexSize = GetFastValue(config, 'vertexSize', 28); /** * Raw byte buffer of vertices. @@ -151,16 +157,17 @@ var WebGLPipeline = new Class({ * @type {ArrayBuffer} * @since 3.0.0 */ - this.vertexData = (config.vertices ? config.vertices : new ArrayBuffer(config.vertexCapacity * config.vertexSize)); + this.vertexData = GetFastValue(config, 'vertices', new ArrayBuffer(this.vertexCapacity * this.vertexSize)); /** - * The handle to a WebGL vertex buffer object. + * The WebGLBuffer that holds the vertex data. + * Created from the `vertices` config ArrayBuffer that was passed in, or set by default, by the pipeline. * * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexBuffer * @type {WebGLBuffer} * @since 3.0.0 */ - this.vertexBuffer = this.renderer.createVertexBuffer((config.vertices ? config.vertices : this.vertexData.byteLength), this.gl.STREAM_DRAW); + this.vertexBuffer = this.renderer.createVertexBuffer(this.vertexData.byteLength, this.gl.STREAM_DRAW); /** * The handle to a WebGL program. @@ -175,28 +182,20 @@ var WebGLPipeline = new Class({ * Array of objects that describe the vertex attributes. * * @name Phaser.Renderer.WebGL.WebGLPipeline#attributes - * @type {object} + * @type {Phaser.Types.Renderer.WebGL.WebGLPipelineAttributesConfig} * @since 3.0.0 */ this.attributes = config.attributes; - /** - * The size in bytes of the vertex. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexSize - * @type {integer} - * @since 3.0.0 - */ - this.vertexSize = config.vertexSize; - /** * The primitive topology which the pipeline will use to submit draw calls. + * Defaults to GL_TRIANGLES if not otherwise set. * * @name Phaser.Renderer.WebGL.WebGLPipeline#topology - * @type {integer} + * @type {GLenum} * @since 3.0.0 */ - this.topology = config.topology; + this.topology = GetFastValue(config, 'topology', gl.TRIANGLES); /** * Uint8 view to the vertex raw buffer. Used for uploading vertex buffer resources to the GPU. @@ -214,7 +213,7 @@ var WebGLPipeline = new Class({ * @type {integer} * @since 3.0.0 */ - this.vertexComponentCount = Utils.getComponentCount(config.attributes, this.gl); + this.vertexComponentCount = Utils.getComponentCount(this.attributes, gl); /** * Indicates if the current pipeline is flushing the contents to the GPU. From 209b39b38c9e553b0168a1ff40705068a9fb0339 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 21 Aug 2020 16:03:29 +0100 Subject: [PATCH 039/241] New pipeline names and single texture flag --- src/renderer/webgl/WebGLRenderer.js | 43 ++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/src/renderer/webgl/WebGLRenderer.js b/src/renderer/webgl/WebGLRenderer.js index f1fd14ccd..0e2bd5f5f 100644 --- a/src/renderer/webgl/WebGLRenderer.js +++ b/src/renderer/webgl/WebGLRenderer.js @@ -22,9 +22,10 @@ var WebGLSnapshot = require('../snapshot/WebGLSnapshot'); // Default Pipelines var BitmapMaskPipeline = require('./pipelines/BitmapMaskPipeline'); -var ForwardDiffuseLightPipeline = require('./pipelines/ForwardDiffuseLightPipeline'); -var TextureTintPipeline = require('./pipelines/TextureTintPipeline'); -var TextureTintStripPipeline = require('./pipelines/TextureTintStripPipeline'); +var LightPipeline = require('./pipelines/LightPipeline'); +var MultiPipeline = require('./pipelines/MultiPipeline'); +var RopePipeline = require('./pipelines/RopePipeline'); +var SinglePipeline = require('./pipelines/SinglePipeline'); /** * @callback WebGLContextCallback @@ -822,14 +823,16 @@ var WebGLRenderer = new Class({ { var game = this.game; - var ttp = this.addPipeline('TextureTintPipeline', new TextureTintPipeline({ game: game, renderer: this })); - this.addPipeline('TextureTintStripPipeline', new TextureTintStripPipeline({ game: game, renderer: this })); - this.addPipeline('BitmapMaskPipeline', new BitmapMaskPipeline({ game: game, renderer: this })); - this.addPipeline('Light2D', new ForwardDiffuseLightPipeline({ game: game, renderer: this, maxLights: this.config.maxLights })); + var multi = this.addPipeline('MultiPipeline', new MultiPipeline({ game: game })); + + this.addPipeline('SinglePipeline', new SinglePipeline({ game: game })); + this.addPipeline('RopePipeline', new RopePipeline({ game: game })); + this.addPipeline('BitmapMaskPipeline', new BitmapMaskPipeline({ game: game })); + this.addPipeline('Light2D', new LightPipeline({ game: game })); var blank = game.textures.getFrame('__DEFAULT'); - ttp.currentFrame = blank; + multi.currentFrame = blank; this.blankTexture = blank; @@ -839,7 +842,7 @@ var WebGLRenderer = new Class({ gl.enable(gl.SCISSOR_TEST); - this.setPipeline(ttp); + this.setPipeline(multi); game.scale.on(ScaleEvents.RESIZE, this.onResize, this); @@ -1391,6 +1394,13 @@ var WebGLRenderer = new Class({ */ setTextureSource: function (textureSource) { + if (this.currentPipeline.forceZero) + { + this.setTextureZero(textureSource.glTexture, true); + + return 0; + } + var gl = this.gl; var currentActiveTexture = this.currentActiveTexture; @@ -1455,11 +1465,17 @@ var WebGLRenderer = new Class({ * @since 3.50.0 * * @param {WebGLTexture} texture - The WebGL texture that needs to be bound. + * @param {boolean} [flush=false] - Flush the pipeline if the texture is different? */ - setTextureZero: function (texture) + setTextureZero: function (texture, flush) { if (this.textureZero !== texture) { + if (flush) + { + this.flush(); + } + var gl = this.gl; gl.activeTexture(gl.TEXTURE0); @@ -1608,6 +1624,13 @@ var WebGLRenderer = new Class({ */ setTexture2D: function (texture) { + if (this.currentPipeline.forceZero) + { + this.setTextureZero(texture, true); + + return 0; + } + var gl = this.gl; var currentActiveTexture = this.currentActiveTexture; From 5c39254f363e31a3633bcef54eaef56288fa171f Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 21 Aug 2020 16:04:26 +0100 Subject: [PATCH 040/241] Testing new config approach --- .../webgl/pipelines/BitmapMaskPipeline.js | 111 +++++++++--------- 1 file changed, 56 insertions(+), 55 deletions(-) diff --git a/src/renderer/webgl/pipelines/BitmapMaskPipeline.js b/src/renderer/webgl/pipelines/BitmapMaskPipeline.js index 9d9870c18..58490c047 100644 --- a/src/renderer/webgl/pipelines/BitmapMaskPipeline.js +++ b/src/renderer/webgl/pipelines/BitmapMaskPipeline.js @@ -6,23 +6,18 @@ */ var Class = require('../../../utils/Class'); +var GetFastValue = require('../../../utils/object/GetFastValue'); var ShaderSourceFS = require('../shaders/BitmapMask-frag.js'); var ShaderSourceVS = require('../shaders/BitmapMask-vert.js'); var WebGLPipeline = require('../WebGLPipeline'); /** * @classdesc - * BitmapMaskPipeline handles all bitmap masking rendering in WebGL. It works by using + * + * + * + * BitmapMaskPipeline handles all bitmap masking rendering in WebGL. It works by using * sampling two texture on the fragment shader and using the fragment's alpha to clip the region. - * The config properties are: - * - game: Current game instance. - * - renderer: Current WebGL renderer. - * - topology: This indicates how the primitives are rendered. The default value is GL_TRIANGLES. - * Here is the full list of rendering primitives (https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants). - * - vertShader: Source for vertex shader as a string. - * - fragShader: Source for fragment shader as a string. - * - vertexCapacity: The amount of vertices that shall be allocated - * - vertexSize: The size of a single vertex in bytes. * * @class BitmapMaskPipeline * @extends Phaser.Renderer.WebGL.WebGLPipeline @@ -30,42 +25,34 @@ var WebGLPipeline = require('../WebGLPipeline'); * @constructor * @since 3.0.0 * - * @param {object} config - Used for overriding shader an pipeline properties if extending this pipeline. + * @param {Phaser.Types.Renderer.WebGL.WebGLPipelineConfig} config - The configuration options for this pipeline. */ var BitmapMaskPipeline = new Class({ Extends: WebGLPipeline, - + initialize: function BitmapMaskPipeline (config) { - WebGLPipeline.call(this, { - game: config.game, - renderer: config.renderer, - gl: config.renderer.gl, - topology: (config.topology ? config.topology : config.renderer.gl.TRIANGLES), - vertShader: (config.vertShader ? config.vertShader : ShaderSourceVS), - fragShader: (config.fragShader ? config.fragShader : ShaderSourceFS), - vertexCapacity: (config.vertexCapacity ? config.vertexCapacity : 3), + config.fragShader = GetFastValue(config, 'fragShader', ShaderSourceFS), + config.vertShader = GetFastValue(config, 'vertShader', ShaderSourceVS), + config.vertexSize = GetFastValue(config, 'vertexSize', 8), + config.vertexCapacity = GetFastValue(config, 'vertexCapacity', 3), + config.vertices = GetFastValue(config, 'vertices', new Float32Array([ -1, 1, -1, -7, 7, 1 ]).buffer), + config.attributes = GetFastValue(config, 'attributes', [ + { + name: 'inPosition', + size: 2, + type: config.game.renderer.gl.FLOAT, + normalized: false, + offset: 0, + enabled: false, + location: -1 + } + ]); - vertexSize: (config.vertexSize ? config.vertexSize : - Float32Array.BYTES_PER_ELEMENT * 2), - - vertices: new Float32Array([ - -1, +1, -1, -7, +7, +1 - ]).buffer, - - attributes: [ - { - name: 'inPosition', - size: 2, - type: config.renderer.gl.FLOAT, - normalized: false, - offset: 0 - } - ] - }); + WebGLPipeline.call(this, config); /** * Float32 view of the array buffer containing the pipeline's vertices. @@ -74,20 +61,10 @@ var BitmapMaskPipeline = new Class({ * @type {Float32Array} * @since 3.0.0 */ - this.vertexViewF32 = new Float32Array(this.vertexData); + // this.vertexViewF32 = new Float32Array(this.vertexData); /** - * Size of the batch. - * - * @name Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#maxQuads - * @type {number} - * @default 1 - * @since 3.0.0 - */ - this.maxQuads = 1; - - /** - * Dirty flag to check if resolution properties need to be updated on the + * Dirty flag to check if resolution properties need to be updated on the * masking shader. * * @name Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#resolutionDirty @@ -95,7 +72,7 @@ var BitmapMaskPipeline = new Class({ * @default true * @since 3.0.0 */ - this.resolutionDirty = true; + // this.resolutionDirty = true; }, /** @@ -106,14 +83,13 @@ var BitmapMaskPipeline = new Class({ * @since 3.0.0 * * @return {this} This WebGLPipeline instance. - */ onBind: function () { WebGLPipeline.prototype.onBind.call(this); var renderer = this.renderer; var program = this.program; - + if (this.resolutionDirty) { renderer.setFloat2(program, 'uResolution', this.width, this.height); @@ -124,6 +100,31 @@ var BitmapMaskPipeline = new Class({ return this; }, + */ + + /** + * Called every time the pipeline is bound by the renderer. + * Sets the shader program, vertex buffer and other resources. + * Should only be called when changing pipeline. + * + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#bind + * @since 3.50.0 + * + * @return {this} This WebGLPipeline instance. + */ + bind: function () + { + WebGLPipeline.prototype.bind.call(this); + + var renderer = this.renderer; + var program = this.program; + + renderer.setFloat2(program, 'uResolution', this.width, this.height); + renderer.setInt1(program, 'uMainSampler', 0); + renderer.setInt1(program, 'uMaskSampler', 1); + + return this; + }, /** * Resizes this pipeline and updates the projection. @@ -188,10 +189,10 @@ var BitmapMaskPipeline = new Class({ }, /** - * The masked game objects framebuffer is unbound and its texture - * is bound together with the mask texture and the mask shader and + * The masked game objects framebuffer is unbound and its texture + * is bound together with the mask texture and the mask shader and * a draw call with a single quad is processed. Here is where the - * masking effect is applied. + * masking effect is applied. * * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#endMask * @since 3.0.0 From 5f1ecfe073006088675361ab014d2e4ce52006f7 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 21 Aug 2020 16:07:51 +0100 Subject: [PATCH 041/241] Update CHANGELOG.md --- CHANGELOG.md | 44 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee3541b9a..55a3cc203 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,42 @@ ## Version 3.50.0 - Subaru - in development +### WebGL Pipeline Updates + +If you use a custom WebGL Pipeline in your game, you must update in order to use Phaser 3.50. + +Due to the huge amount of work that has taken place in this area, all of the pipelines have been renamed. If you extend any of these pipelines, or use them in your game code (referenced by name), then please update accordingly. The name changes are: + +* `TextureTintPipeline` is now called the `MultiPipeline`. +* `TextureTintStripPipeline` is now called the `RopePipeline`. +* `ForwardDiffuseLightPipeline` is now called the `LightPipeline`. + +To match the new pipeline names, the shader source code has also been renamed. + +* `ForwardDiffuse.frag` is now called `Light.frag`. +* `TextureTint.frag` is now called `Multi.frag`. +* `TextureTint.vert` is now called `Multi.vert`. + +Other pipeline changes are as follows: + +* `Types.Renderer.WebGL.WebGLPipelineConfig` is a new TypeDef that helps you easily configure your own Custom Pipeline when using TypeScript and also provides better JSDocs. +* `Types.Renderer.WebGL.WebGLPipelineAttributesConfig` is a new TypeDef that helps you easily configure the attributes for your own Custom Pipelines when using TypeScript and also provides better JSDocs. +* All piplines will now work out the `renderer` property automatically, so it's no longer required in the config. +* All piplines will now work out the `gl` property automatically, so it's no longer required in the config. +* All piplines will now extract the `name` property from the config, allowing you to set it externally. +* All piplines will now extract the `vertexCapacity` property from the config, allowing you to set it externally. +* All piplines will now extract the `vertexSize` property from the config, allowing you to set it externally. +* All piplines will now extract the `vertexData` property from the config, allowing you to set it externally. +* All piplines will now extract the `attributes` property from the config, allowing you to set it externally. +* All piplines will now extract the `topology` property from the config, allowing you to set it externally. + +#### Single Pipeline + +There is also a new pipeline called `SinglePipeline`, created to emulate the old `TextureTintPipeline`. This special pipeline uses just a single texture and makes things a lot easier if you wish to create a custom pipeline, but not have to recode your shaders to work with multiple textures. Instead, just extend `SinglePipeline`, where-as before you extended the `TextureTintPipeline` and you won't have to change any of your shader code. However, if you can, you should update it to make it perform faster, but that choice is left up to you. + ### WebGL Multi-Texture Rendering -The Texture Tint Pipeline has had its core flow rewritten to eliminate the need for constantly creating `batch` objects. Instead, it now supports the new multi-texture shader, vastly increasing rendering performance, especially on drawcall-bound systems. +The Multi Pipeline (previously the Texture Tint Pipeline) has had its core flow rewritten to eliminate the need for constantly creating `batch` objects. Instead, it now supports the new multi-texture shader, vastly increasing rendering performance, especially on drawcall-bound systems. All of the internal functions, such as `batchQuad` and `batchSprite` have been updated to use the new method of texture setting. The method signatures all remain the same, unless indicated below. @@ -52,9 +85,9 @@ All of the internal functions, such as `batchQuad` and `batchSprite` have been u * `WebGLRenderer.unbindTextures` is a new method that will activate and then null bind all WebGL textures. * `Renderer.WebGL.Utils.parseFragmentShaderMaxTextures` is a new function that will take fragment shader source and search it for `%count%` and `%forloop%` declarations, replacing them with the required GLSL for multi-texture support, returning the modified source. -### Forward Diffuse Light Pipeline API Changes +### Light Pipeline Changes -This Light2D pipeline, which is responsible for rendering lights under WebGL, has been rewritten to work with the new Texture Tint Pipeline functions. Lots of redundant code has been removed and the following changes and improvements took place: +The Light Pipeline (previously called the Forward Diffuse Light Pipeline), which is responsible for rendering lights under WebGL, has been rewritten to work with the new Multi Pipeline features. Lots of redundant code has been removed and the following changes and improvements took place: * The pipeline now works with Game Objects that do not have a normal map. They will be rendered using the new default normal map, which allows for a flat light effect to pass over them and merge with their diffuse map colors. * Fixed a bug in the way lights were handled that caused Tilemaps to render one tile at a time, causing massive slow down. They're now batched properly, making a combination of lights and tilemaps possible again. @@ -172,6 +205,11 @@ If you used any of them in your code, please update to the new function names be * The `KeyboardPlugin` no longer emits `keydown_` events. These were replaced with `keydown-` events in v3.15. The previous event string was deprecated in v3.20. * The `KeyboardPlugin` no longer emits `keyup_` events. These were replaced with `keyup-` events in v3.15. The previous event string was deprecated in v3.20. * The `ScaleManager.updateBounds` method is now called every time the browser fires a 'resize' or 'orientationchange' event. This will update the offset of the canvas element Phaser is rendering to, which is responsible for keeping input positions correct. However, if you change the canvas position, or visibility, via any other method (i.e. via an Angular route) you should call the `updateBounds` method directly, yourself. +* The constant `Phaser.Renderer.WebGL.BYTE` value has been removed as it wasn't used internally. +* The constant `Phaser.Renderer.WebGL.SHORT` value has been removed as it wasn't used internally. +* The constant `Phaser.Renderer.WebGL.UNSIGNED_BYTE` value has been removed as it wasn't used internally. +* The constant `Phaser.Renderer.WebGL.UNSIGNED_SHORT` value has been removed as it wasn't used internally. +* The constant `Phaser.Renderer.WebGL.FLOAT` value has been removed as it wasn't used internally. ### Bug Fixes From 0dd07333af3339a260bd2a0cffbf4b4452138b22 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 21 Aug 2020 16:14:59 +0100 Subject: [PATCH 042/241] Updated to use MultiPipeline --- src/cameras/2d/effects/Fade.js | 2 +- src/cameras/2d/effects/Flash.js | 2 +- src/gameobjects/components/Pipeline.js | 5 ++-- src/physics/matter-js/MatterImage.js | 2 +- src/physics/matter-js/MatterSprite.js | 2 +- src/renderer/webgl/WebGLRenderer.js | 24 ++++++++-------- .../webgl/pipelines/BitmapMaskPipeline.js | 2 +- .../dynamiclayer/DynamicTilemapLayer.js | 28 +++++++++---------- .../staticlayer/StaticTilemapLayer.js | 2 +- 9 files changed, 35 insertions(+), 34 deletions(-) diff --git a/src/cameras/2d/effects/Fade.js b/src/cameras/2d/effects/Fade.js index 408258e18..0125853c9 100644 --- a/src/cameras/2d/effects/Fade.js +++ b/src/cameras/2d/effects/Fade.js @@ -301,7 +301,7 @@ var Fade = new Class({ * @method Phaser.Cameras.Scene2D.Effects.Fade#postRenderWebGL * @since 3.5.0 * - * @param {Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline} pipeline - The WebGL Pipeline to render to. + * @param {Phaser.Renderer.WebGL.Pipelines.MultiPipeline} pipeline - The WebGL Pipeline to render to. Must provide the `drawFillRect` method. * @param {function} getTintFunction - A function that will return the gl safe tint colors. * * @return {boolean} `true` if the effect drew to the renderer, otherwise `false`. diff --git a/src/cameras/2d/effects/Flash.js b/src/cameras/2d/effects/Flash.js index 409573547..2d9898901 100644 --- a/src/cameras/2d/effects/Flash.js +++ b/src/cameras/2d/effects/Flash.js @@ -269,7 +269,7 @@ var Flash = new Class({ * @method Phaser.Cameras.Scene2D.Effects.Flash#postRenderWebGL * @since 3.5.0 * - * @param {Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline} pipeline - The WebGL Pipeline to render to. + * @param {Phaser.Renderer.WebGL.Pipelines.MultiPipeline} pipeline - The WebGL Pipeline to render to. Must provide the `drawFillRect` method. * @param {function} getTintFunction - A function that will return the gl safe tint colors. * * @return {boolean} `true` if the effect drew to the renderer, otherwise `false`. diff --git a/src/gameobjects/components/Pipeline.js b/src/gameobjects/components/Pipeline.js index 4b58cd98e..dd66fa0cc 100644 --- a/src/gameobjects/components/Pipeline.js +++ b/src/gameobjects/components/Pipeline.js @@ -38,19 +38,20 @@ var Pipeline = { /** * Sets the initial WebGL Pipeline of this Game Object. + * * This should only be called during the instantiation of the Game Object. * * @method Phaser.GameObjects.Components.Pipeline#initPipeline * @webglOnly * @since 3.0.0 * - * @param {string} [pipelineName=TextureTintPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Texture Tint Pipeline. + * @param {string} [pipelineName=MultiPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Multi Pipeline. * * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. */ initPipeline: function (pipelineName) { - if (pipelineName === undefined) { pipelineName = 'TextureTintPipeline'; } + if (pipelineName === undefined) { pipelineName = 'MultiPipeline'; } var renderer = this.scene.sys.game.renderer; diff --git a/src/physics/matter-js/MatterImage.js b/src/physics/matter-js/MatterImage.js index 1a0490dd1..afba05aeb 100644 --- a/src/physics/matter-js/MatterImage.js +++ b/src/physics/matter-js/MatterImage.js @@ -132,7 +132,7 @@ var MatterImage = new Class({ this.setPosition(x, y); - this.initPipeline('TextureTintPipeline'); + this.initPipeline('MultiPipeline'); } }); diff --git a/src/physics/matter-js/MatterSprite.js b/src/physics/matter-js/MatterSprite.js index cc0f0d438..800322fc1 100644 --- a/src/physics/matter-js/MatterSprite.js +++ b/src/physics/matter-js/MatterSprite.js @@ -138,7 +138,7 @@ var MatterSprite = new Class({ this.setPosition(x, y); - this.initPipeline('TextureTintPipeline'); + this.initPipeline('MultiPipeline'); } }); diff --git a/src/renderer/webgl/WebGLRenderer.js b/src/renderer/webgl/WebGLRenderer.js index 0e2bd5f5f..750122e1c 100644 --- a/src/renderer/webgl/WebGLRenderer.js +++ b/src/renderer/webgl/WebGLRenderer.js @@ -2188,7 +2188,7 @@ var WebGLRenderer = new Class({ var cw = camera._cw; var ch = camera._ch; - var TextureTintPipeline = this.pipelines.TextureTintPipeline; + var MultiPipeline = this.pipelines.MultiPipeline; var color = camera.backgroundColor; @@ -2206,7 +2206,7 @@ var WebGLRenderer = new Class({ gl.clear(gl.COLOR_BUFFER_BIT); - ProjectOrtho(TextureTintPipeline, cx, cw + cx, cy, ch + cy, -1000, 1000); + ProjectOrtho(MultiPipeline, cx, cw + cx, cy, ch + cy, -1000, 1000); if (camera.mask) { @@ -2218,7 +2218,7 @@ var WebGLRenderer = new Class({ if (color.alphaGL > 0) { - TextureTintPipeline.drawFillRect( + MultiPipeline.drawFillRect( cx, cy, cw + cx, ch + cy, Utils.getTintFromFloats(color.redGL, color.greenGL, color.blueGL, 1), color.alphaGL @@ -2241,7 +2241,7 @@ var WebGLRenderer = new Class({ if (color.alphaGL > 0) { - TextureTintPipeline.drawFillRect( + MultiPipeline.drawFillRect( cx, cy, cw , ch, Utils.getTintFromFloats(color.redGL, color.greenGL, color.blueGL, 1), color.alphaGL @@ -2286,12 +2286,12 @@ var WebGLRenderer = new Class({ */ postRenderCamera: function (camera) { - this.setPipeline(this.pipelines.TextureTintPipeline); + this.setPipeline(this.pipelines.MultiPipeline); - var TextureTintPipeline = this.pipelines.TextureTintPipeline; + var MultiPipeline = this.pipelines.MultiPipeline; - camera.flashEffect.postRenderWebGL(TextureTintPipeline, Utils.getTintFromFloats); - camera.fadeEffect.postRenderWebGL(TextureTintPipeline, Utils.getTintFromFloats); + camera.flashEffect.postRenderWebGL(MultiPipeline, Utils.getTintFromFloats); + camera.fadeEffect.postRenderWebGL(MultiPipeline, Utils.getTintFromFloats); camera.dirty = false; @@ -2299,7 +2299,7 @@ var WebGLRenderer = new Class({ if (camera.renderToTexture) { - TextureTintPipeline.flush(); + MultiPipeline.flush(); this.setFramebuffer(null); @@ -2307,11 +2307,11 @@ var WebGLRenderer = new Class({ if (camera.renderToGame) { - ProjectOrtho(TextureTintPipeline, 0, TextureTintPipeline.width, TextureTintPipeline.height, 0, -1000.0, 1000.0); + ProjectOrtho(MultiPipeline, 0, MultiPipeline.width, MultiPipeline.height, 0, -1000.0, 1000.0); var getTint = Utils.getTintAppendFloatAlpha; - var pipeline = (camera.pipeline) ? camera.pipeline : TextureTintPipeline; + var pipeline = (camera.pipeline) ? camera.pipeline : MultiPipeline; pipeline.batchTexture( camera, @@ -2397,7 +2397,7 @@ var WebGLRenderer = new Class({ this.textureFlush = 0; - this.setPipeline(this.pipelines.TextureTintPipeline); + this.setPipeline(this.pipelines.MultiPipeline); }, /** diff --git a/src/renderer/webgl/pipelines/BitmapMaskPipeline.js b/src/renderer/webgl/pipelines/BitmapMaskPipeline.js index 58490c047..9296e20c8 100644 --- a/src/renderer/webgl/pipelines/BitmapMaskPipeline.js +++ b/src/renderer/webgl/pipelines/BitmapMaskPipeline.js @@ -107,7 +107,7 @@ var BitmapMaskPipeline = new Class({ * Sets the shader program, vertex buffer and other resources. * Should only be called when changing pipeline. * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#bind + * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#bind * @since 3.50.0 * * @return {this} This WebGLPipeline instance. diff --git a/src/tilemaps/dynamiclayer/DynamicTilemapLayer.js b/src/tilemaps/dynamiclayer/DynamicTilemapLayer.js index d4bb80057..d7b2d8644 100644 --- a/src/tilemaps/dynamiclayer/DynamicTilemapLayer.js +++ b/src/tilemaps/dynamiclayer/DynamicTilemapLayer.js @@ -18,7 +18,7 @@ var TilemapComponents = require('../components'); * A Dynamic Tilemap Layer trades some speed for being able to apply powerful effects. Unlike a * Static Tilemap Layer, you can apply per-tile effects like tint or alpha, and you can change the * tiles in a DynamicTilemapLayer. - * + * * Use this over a Static Tilemap Layer when you need those features. * * @class DynamicTilemapLayer @@ -114,7 +114,7 @@ var DynamicTilemapLayer = new Class({ /** * The Tileset/s associated with this layer. - * + * * As of Phaser 3.14 this property is now an array of Tileset objects, previously it was a single reference. * * @name Phaser.Tilemaps.DynamicTilemapLayer#tileset @@ -211,17 +211,17 @@ var DynamicTilemapLayer = new Class({ /** * The rendering (draw) order of the tiles in this layer. - * + * * The default is 0 which is 'right-down', meaning it will draw the tiles starting from the top-left, * drawing to the right and then moving down to the next row. - * + * * The draw orders are: - * + * * 0 = right-down * 1 = left-down * 2 = right-up * 3 = left-up - * + * * This can be changed via the `setRenderOrder` method. * * @name Phaser.Tilemaps.DynamicTilemapLayer#_renderOrder @@ -247,7 +247,7 @@ var DynamicTilemapLayer = new Class({ this.setOrigin(); this.setSize(tilemap.tileWidth * this.layer.width, tilemap.tileHeight * this.layer.height); - this.initPipeline('TextureTintPipeline'); + this.initPipeline('MultiPipeline'); }, /** @@ -256,7 +256,7 @@ var DynamicTilemapLayer = new Class({ * @method Phaser.Tilemaps.DynamicTilemapLayer#setTilesets * @private * @since 3.14.0 - * + * * @param {(string|string[]|Phaser.Tilemaps.Tileset|Phaser.Tilemaps.Tileset[])} tileset - The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object. */ setTilesets: function (tilesets) @@ -298,20 +298,20 @@ var DynamicTilemapLayer = new Class({ /** * Sets the rendering (draw) order of the tiles in this layer. - * + * * The default is 'right-down', meaning it will order the tiles starting from the top-left, * drawing to the right and then moving down to the next row. - * + * * The draw orders are: - * + * * 0 = right-down * 1 = left-down * 2 = right-up * 3 = left-up - * + * * Setting the render order does not change the tiles or how they are stored in the layer, * it purely impacts the order in which they are rendered. - * + * * You can provide either an integer (0 to 3), or the string version of the order. * * @method Phaser.Tilemaps.DynamicTilemapLayer#setRenderOrder @@ -451,7 +451,7 @@ var DynamicTilemapLayer = new Class({ * * @method Phaser.Tilemaps.DynamicTilemapLayer#destroy * @since 3.0.0 - * + * * @param {boolean} [removeFromTilemap=true] - Remove this layer from the parent Tilemap? */ destroy: function (removeFromTilemap) diff --git a/src/tilemaps/staticlayer/StaticTilemapLayer.js b/src/tilemaps/staticlayer/StaticTilemapLayer.js index 9050598c1..cb16d55e8 100644 --- a/src/tilemaps/staticlayer/StaticTilemapLayer.js +++ b/src/tilemaps/staticlayer/StaticTilemapLayer.js @@ -360,7 +360,7 @@ var StaticTilemapLayer = new Class({ this.updateVBOData(); - this.initPipeline('TextureTintPipeline'); + this.initPipeline('MultiPipeline'); this.mvpInit(); From 9a1dc640f87fa7549825d2567a53a6bd711a3560 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 21 Aug 2020 16:17:29 +0100 Subject: [PATCH 043/241] Fix gl access --- src/renderer/webgl/pipelines/RopePipeline.js | 2 +- src/renderer/webgl/pipelines/SinglePipeline.js | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/renderer/webgl/pipelines/RopePipeline.js b/src/renderer/webgl/pipelines/RopePipeline.js index 1820eaa80..33c441218 100644 --- a/src/renderer/webgl/pipelines/RopePipeline.js +++ b/src/renderer/webgl/pipelines/RopePipeline.js @@ -57,7 +57,7 @@ var RopePipeline = new Class({ function RopePipeline (config) { - config.topology = config.renderer.gl.TRIANGLE_STRIP; + config.topology = config.game.renderer.gl.TRIANGLE_STRIP; MultiPipeline.call(this, config); } diff --git a/src/renderer/webgl/pipelines/SinglePipeline.js b/src/renderer/webgl/pipelines/SinglePipeline.js index 90ffd8f63..6174aa3c6 100644 --- a/src/renderer/webgl/pipelines/SinglePipeline.js +++ b/src/renderer/webgl/pipelines/SinglePipeline.js @@ -59,6 +59,8 @@ var SinglePipeline = new Class({ function SinglePipeline (config) { + var gl = config.game.renderer.gl; + config.fragShader = GetFastValue(config, 'fragShader', ShaderSourceFS), config.vertShader = GetFastValue(config, 'vertShader', ShaderSourceVS), config.vertexSize = GetFastValue(config, 'vertexSize', 24), @@ -66,7 +68,7 @@ var SinglePipeline = new Class({ { name: 'inPosition', size: 2, - type: config.renderer.gl.FLOAT, + type: gl.FLOAT, normalized: false, offset: 0, enabled: false, @@ -75,7 +77,7 @@ var SinglePipeline = new Class({ { name: 'inTexCoord', size: 2, - type: config.renderer.gl.FLOAT, + type: gl.FLOAT, normalized: false, offset: 8, enabled: false, @@ -84,7 +86,7 @@ var SinglePipeline = new Class({ { name: 'inTintEffect', size: 1, - type: config.renderer.gl.FLOAT, + type: gl.FLOAT, normalized: false, offset: 16, enabled: false, @@ -93,7 +95,7 @@ var SinglePipeline = new Class({ { name: 'inTint', size: 4, - type: config.renderer.gl.UNSIGNED_BYTE, + type: gl.UNSIGNED_BYTE, normalized: true, offset: 20, enabled: false, From 0cd4d0fc54c29a064f756f5e6cf4285fb09fbff9 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 21 Aug 2020 16:23:04 +0100 Subject: [PATCH 044/241] Update WebGLRenderer.js --- src/renderer/webgl/WebGLRenderer.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/renderer/webgl/WebGLRenderer.js b/src/renderer/webgl/WebGLRenderer.js index 750122e1c..e88cc12a5 100644 --- a/src/renderer/webgl/WebGLRenderer.js +++ b/src/renderer/webgl/WebGLRenderer.js @@ -1223,9 +1223,6 @@ var WebGLRenderer = new Class({ this.resetTextures(true); - // gl.activeTexture(gl.TEXTURE1); - // gl.bindTexture(gl.TEXTURE_2D, this.blankTexture.glTexture); - this.currentActiveTexture = 1; this.startActiveTexture++; From 5b08be9a506e83319723ce633dbebebf1d14cf8c Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 21 Aug 2020 16:42:41 +0100 Subject: [PATCH 045/241] 3.50.0 Beta 2 --- dist/phaser-arcade-physics.js | 14675 ++++++++++++++------------- dist/phaser-arcade-physics.min.js | 2 +- dist/phaser.js | 15179 +++++++++++++++------------- dist/phaser.min.js | 2 +- 4 files changed, 15879 insertions(+), 13979 deletions(-) diff --git a/dist/phaser-arcade-physics.js b/dist/phaser-arcade-physics.js index e3db2061a..33c20f5e8 100644 --- a/dist/phaser-arcade-physics.js +++ b/dist/phaser-arcade-physics.js @@ -91,7 +91,7 @@ return /******/ (function(modules) { // webpackBootstrap /******/ /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 1448); +/******/ return __webpack_require__(__webpack_require__.s = 1454); /******/ }) /************************************************************************/ /******/ ([ @@ -1205,7 +1205,7 @@ module.exports = Vector2; */ var Class = __webpack_require__(0); -var GEOM_CONST = __webpack_require__(47); +var GEOM_CONST = __webpack_require__(48); /** * @classdesc @@ -1714,12 +1714,12 @@ module.exports = FileTypesManager; */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(48); -var GetPoint = __webpack_require__(156); +var Contains = __webpack_require__(49); +var GetPoint = __webpack_require__(157); var GetPoints = __webpack_require__(278); -var GEOM_CONST = __webpack_require__(47); -var Line = __webpack_require__(49); -var Random = __webpack_require__(159); +var GEOM_CONST = __webpack_require__(48); +var Line = __webpack_require__(39); +var Random = __webpack_require__(160); /** * @classdesc @@ -2423,8 +2423,45 @@ module.exports = { } return maxTextures; - } + }, + /** + * Checks the given Fragment Shader Source for `%count%` and `%forloop%` declarations and + * replaces those with GLSL code for setting `texture = texture2D(uMainSampler[i], outTexCoord)`. + * + * @function Phaser.Renderer.WebGL.Utils.parseFragmentShaderMaxTextures + * @since 3.50.0 + * + * @param {string} fragmentShaderSource - The Fragment Shader source code to operate on. + * @param {number} maxTextures - The number of maxTextures value. + * + * @return {string} The modified Fragment Shader source. + */ + parseFragmentShaderMaxTextures: function (fragmentShaderSource, maxTextures) + { + var src = ''; + + for (var i = 0; i < maxTextures; i++) + { + if (i > 0) + { + src += '\n\telse '; + } + + if (i < maxTextures - 1) + { + src += 'if (outTexId < ' + i + '.5)'; + } + + src += '\n\t{'; + src += '\n\t\ttexture = texture2D(uMainSampler[' + i + '], outTexCoord);'; + src += '\n\t}'; + } + + fragmentShaderSource = fragmentShaderSource.replace(/%count%/gi, maxTextures.toString()); + + return fragmentShaderSource.replace(/%forloop%/gi, src); + } }; @@ -2787,24 +2824,24 @@ if (true) { module.exports = { - Alpha: __webpack_require__(534), + Alpha: __webpack_require__(537), AlphaSingle: __webpack_require__(273), - Animation: __webpack_require__(505), + Animation: __webpack_require__(507), BlendMode: __webpack_require__(276), - ComputedSize: __webpack_require__(553), - Crop: __webpack_require__(554), + ComputedSize: __webpack_require__(556), + Crop: __webpack_require__(557), Depth: __webpack_require__(277), - Flip: __webpack_require__(555), - GetBounds: __webpack_require__(556), + Flip: __webpack_require__(558), + GetBounds: __webpack_require__(559), Mask: __webpack_require__(281), - Origin: __webpack_require__(573), - PathFollower: __webpack_require__(574), - Pipeline: __webpack_require__(160), + Origin: __webpack_require__(576), + PathFollower: __webpack_require__(577), + Pipeline: __webpack_require__(161), ScrollFactor: __webpack_require__(284), - Size: __webpack_require__(575), - Texture: __webpack_require__(576), - TextureCrop: __webpack_require__(577), - Tint: __webpack_require__(578), + Size: __webpack_require__(578), + Texture: __webpack_require__(579), + TextureCrop: __webpack_require__(580), + Tint: __webpack_require__(581), ToJSON: __webpack_require__(285), Transform: __webpack_require__(286), TransformMatrix: __webpack_require__(30), @@ -2917,9 +2954,9 @@ module.exports = MATH_CONST; var Class = __webpack_require__(0); var ComponentsToJSON = __webpack_require__(285); -var DataManager = __webpack_require__(115); +var DataManager = __webpack_require__(118); var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(90); +var Events = __webpack_require__(91); /** * @classdesc @@ -3624,7 +3661,7 @@ module.exports = GameObject; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH = __webpack_require__(175); +var MATH = __webpack_require__(176); var GetValue = __webpack_require__(6); /** @@ -4168,22 +4205,22 @@ module.exports = Extend; module.exports = { - BLUR: __webpack_require__(557), - BOOT: __webpack_require__(558), - CONTEXT_LOST: __webpack_require__(559), - CONTEXT_RESTORED: __webpack_require__(560), - DESTROY: __webpack_require__(561), - FOCUS: __webpack_require__(562), - HIDDEN: __webpack_require__(563), - PAUSE: __webpack_require__(564), - POST_RENDER: __webpack_require__(565), - POST_STEP: __webpack_require__(566), - PRE_RENDER: __webpack_require__(567), - PRE_STEP: __webpack_require__(568), - READY: __webpack_require__(569), - RESUME: __webpack_require__(570), - STEP: __webpack_require__(571), - VISIBLE: __webpack_require__(572) + BLUR: __webpack_require__(560), + BOOT: __webpack_require__(561), + CONTEXT_LOST: __webpack_require__(562), + CONTEXT_RESTORED: __webpack_require__(563), + DESTROY: __webpack_require__(564), + FOCUS: __webpack_require__(565), + HIDDEN: __webpack_require__(566), + PAUSE: __webpack_require__(567), + POST_RENDER: __webpack_require__(568), + POST_STEP: __webpack_require__(569), + PRE_RENDER: __webpack_require__(570), + PRE_STEP: __webpack_require__(571), + READY: __webpack_require__(572), + RESUME: __webpack_require__(573), + STEP: __webpack_require__(574), + VISIBLE: __webpack_require__(575) }; @@ -4200,12 +4237,12 @@ module.exports = { var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var Events = __webpack_require__(82); +var Events = __webpack_require__(83); var GetFastValue = __webpack_require__(2); -var GetURL = __webpack_require__(140); +var GetURL = __webpack_require__(144); var MergeXHRSettings = __webpack_require__(221); -var XHRLoader = __webpack_require__(456); -var XHRSettings = __webpack_require__(141); +var XHRLoader = __webpack_require__(458); +var XHRSettings = __webpack_require__(145); /** * @classdesc @@ -4752,25 +4789,25 @@ module.exports = File; module.exports = { - BOOT: __webpack_require__(710), - CREATE: __webpack_require__(711), - DESTROY: __webpack_require__(712), - PAUSE: __webpack_require__(713), - POST_UPDATE: __webpack_require__(714), - PRE_UPDATE: __webpack_require__(715), - READY: __webpack_require__(716), - RENDER: __webpack_require__(717), - RESUME: __webpack_require__(718), - SHUTDOWN: __webpack_require__(719), - SLEEP: __webpack_require__(720), - START: __webpack_require__(721), - TRANSITION_COMPLETE: __webpack_require__(722), - TRANSITION_INIT: __webpack_require__(723), - TRANSITION_OUT: __webpack_require__(724), - TRANSITION_START: __webpack_require__(725), - TRANSITION_WAKE: __webpack_require__(726), - UPDATE: __webpack_require__(727), - WAKE: __webpack_require__(728) + BOOT: __webpack_require__(713), + CREATE: __webpack_require__(714), + DESTROY: __webpack_require__(715), + PAUSE: __webpack_require__(716), + POST_UPDATE: __webpack_require__(717), + PRE_UPDATE: __webpack_require__(718), + READY: __webpack_require__(719), + RENDER: __webpack_require__(720), + RESUME: __webpack_require__(721), + SHUTDOWN: __webpack_require__(722), + SLEEP: __webpack_require__(723), + START: __webpack_require__(724), + TRANSITION_COMPLETE: __webpack_require__(725), + TRANSITION_INIT: __webpack_require__(726), + TRANSITION_OUT: __webpack_require__(727), + TRANSITION_START: __webpack_require__(728), + TRANSITION_WAKE: __webpack_require__(729), + UPDATE: __webpack_require__(730), + WAKE: __webpack_require__(731) }; @@ -5146,7 +5183,7 @@ module.exports = PropertyValueSet; */ var CONST = __webpack_require__(33); -var Smoothing = __webpack_require__(172); +var Smoothing = __webpack_require__(173); // The pool into which the canvas elements are placed. var pool = []; @@ -5625,7 +5662,7 @@ module.exports = SetTransform; var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var Line = __webpack_require__(49); +var Line = __webpack_require__(39); /** * @classdesc @@ -6943,9 +6980,9 @@ module.exports = TransformMatrix; */ var Class = __webpack_require__(0); -var GetColor = __webpack_require__(170); +var GetColor = __webpack_require__(171); var GetColor32 = __webpack_require__(299); -var HSVToRGB = __webpack_require__(171); +var HSVToRGB = __webpack_require__(172); var RGBToHSV = __webpack_require__(300); /** @@ -7876,7 +7913,7 @@ var CONST = { * @type {string} * @since 3.0.0 */ - VERSION: '3.50.0-beta.1', + VERSION: '3.50.0-beta.2', BlendModes: __webpack_require__(53), @@ -8171,358 +8208,6 @@ module.exports = PropertyValueInc; /* 39 */ /***/ (function(module, exports, __webpack_require__) { -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var CONST = __webpack_require__(13); - -/** - * Convert the given angle from degrees, to the equivalent angle in radians. - * - * @function Phaser.Math.DegToRad - * @since 3.0.0 - * - * @param {integer} degrees - The angle (in degrees) to convert to radians. - * - * @return {number} The given angle converted to radians. - */ -var DegToRad = function (degrees) -{ - return degrees * CONST.DEG_TO_RAD; -}; - -module.exports = DegToRad; - - -/***/ }), -/* 40 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Cameras.Scene2D.Events - */ - -module.exports = { - - DESTROY: __webpack_require__(648), - FADE_IN_COMPLETE: __webpack_require__(649), - FADE_IN_START: __webpack_require__(650), - FADE_OUT_COMPLETE: __webpack_require__(651), - FADE_OUT_START: __webpack_require__(652), - FLASH_COMPLETE: __webpack_require__(653), - FLASH_START: __webpack_require__(654), - PAN_COMPLETE: __webpack_require__(655), - PAN_START: __webpack_require__(656), - POST_RENDER: __webpack_require__(657), - PRE_RENDER: __webpack_require__(658), - ROTATE_COMPLETE: __webpack_require__(659), - ROTATE_START: __webpack_require__(660), - SHAKE_COMPLETE: __webpack_require__(661), - SHAKE_START: __webpack_require__(662), - ZOOM_COMPLETE: __webpack_require__(663), - ZOOM_START: __webpack_require__(664) - -}; - - -/***/ }), -/* 41 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Sets the fillStyle on the target context based on the given Shape. - * - * @method Phaser.GameObjects.Shape#FillStyleCanvas - * @since 3.13.0 - * @private - * - * @param {CanvasRenderingContext2D} ctx - The context to set the fill style on. - * @param {Phaser.GameObjects.Shape} src - The Game Object to set the fill style from. - * @param {number} [altColor] - An alternative color to render with. - * @param {number} [altAlpha] - An alternative alpha to render with. - */ -var FillStyleCanvas = function (ctx, src, altColor, altAlpha) -{ - var fillColor = (altColor) ? altColor : src.fillColor; - var fillAlpha = (altAlpha) ? altAlpha : src.fillAlpha; - - var red = ((fillColor & 0xFF0000) >>> 16); - var green = ((fillColor & 0xFF00) >>> 8); - var blue = (fillColor & 0xFF); - - ctx.fillStyle = 'rgba(' + red + ',' + green + ',' + blue + ',' + fillAlpha + ')'; -}; - -module.exports = FillStyleCanvas; - - -/***/ }), -/* 42 */, -/* 43 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Positions the Game Object so that the top of its bounds aligns with the given coordinate. - * - * @function Phaser.Display.Bounds.SetTop - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned. - * @param {number} value - The coordinate to position the Game Object bounds on. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned. - */ -var SetTop = function (gameObject, value) -{ - gameObject.y = value + (gameObject.height * gameObject.originY); - - return gameObject; -}; - -module.exports = SetTop; - - -/***/ }), -/* 44 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Positions the Game Object so that the left of its bounds aligns with the given coordinate. - * - * @function Phaser.Display.Bounds.SetLeft - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned. - * @param {number} value - The coordinate to position the Game Object bounds on. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned. - */ -var SetLeft = function (gameObject, value) -{ - gameObject.x = value + (gameObject.width * gameObject.originX); - - return gameObject; -}; - -module.exports = SetLeft; - - -/***/ }), -/* 45 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Positions the Game Object so that the left of its bounds aligns with the given coordinate. - * - * @function Phaser.Display.Bounds.SetRight - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned. - * @param {number} value - The coordinate to position the Game Object bounds on. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned. - */ -var SetRight = function (gameObject, value) -{ - gameObject.x = (value - gameObject.width) + (gameObject.width * gameObject.originX); - - return gameObject; -}; - -module.exports = SetRight; - - -/***/ }), -/* 46 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Positions the Game Object so that the bottom of its bounds aligns with the given coordinate. - * - * @function Phaser.Display.Bounds.SetBottom - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned. - * @param {number} value - The coordinate to position the Game Object bounds on. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned. - */ -var SetBottom = function (gameObject, value) -{ - gameObject.y = (value - gameObject.height) + (gameObject.height * gameObject.originY); - - return gameObject; -}; - -module.exports = SetBottom; - - -/***/ }), -/* 47 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GEOM_CONST = { - - /** - * A Circle Geometry object type. - * - * @name Phaser.Geom.CIRCLE - * @type {integer} - * @since 3.19.0 - */ - CIRCLE: 0, - - /** - * An Ellipse Geometry object type. - * - * @name Phaser.Geom.ELLIPSE - * @type {integer} - * @since 3.19.0 - */ - ELLIPSE: 1, - - /** - * A Line Geometry object type. - * - * @name Phaser.Geom.LINE - * @type {integer} - * @since 3.19.0 - */ - LINE: 2, - - /** - * A Point Geometry object type. - * - * @name Phaser.Geom.POINT - * @type {integer} - * @since 3.19.0 - */ - POINT: 3, - - /** - * A Polygon Geometry object type. - * - * @name Phaser.Geom.POLYGON - * @type {integer} - * @since 3.19.0 - */ - POLYGON: 4, - - /** - * A Rectangle Geometry object type. - * - * @name Phaser.Geom.RECTANGLE - * @type {integer} - * @since 3.19.0 - */ - RECTANGLE: 5, - - /** - * A Triangle Geometry object type. - * - * @name Phaser.Geom.TRIANGLE - * @type {integer} - * @since 3.19.0 - */ - TRIANGLE: 6 - -}; - -module.exports = GEOM_CONST; - - -/***/ }), -/* 48 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Checks if a given point is inside a Rectangle's bounds. - * - * @function Phaser.Geom.Rectangle.Contains - * @since 3.0.0 - * - * @param {Phaser.Geom.Rectangle} rect - The Rectangle to check. - * @param {number} x - The X coordinate of the point to check. - * @param {number} y - The Y coordinate of the point to check. - * - * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`. - */ -var Contains = function (rect, x, y) -{ - if (rect.width <= 0 || rect.height <= 0) - { - return false; - } - - return (rect.x <= x && rect.x + rect.width >= x && rect.y <= y && rect.y + rect.height >= y); -}; - -module.exports = Contains; - - -/***/ }), -/* 49 */ -/***/ (function(module, exports, __webpack_require__) { - /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. @@ -8531,9 +8216,9 @@ module.exports = Contains; var Class = __webpack_require__(0); var GetPoint = __webpack_require__(279); -var GetPoints = __webpack_require__(157); -var GEOM_CONST = __webpack_require__(47); -var Random = __webpack_require__(158); +var GetPoints = __webpack_require__(158); +var GEOM_CONST = __webpack_require__(48); +var Random = __webpack_require__(159); var Vector2 = __webpack_require__(3); /** @@ -8856,6 +8541,358 @@ var Line = new Class({ module.exports = Line; +/***/ }), +/* 40 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(13); + +/** + * Convert the given angle from degrees, to the equivalent angle in radians. + * + * @function Phaser.Math.DegToRad + * @since 3.0.0 + * + * @param {integer} degrees - The angle (in degrees) to convert to radians. + * + * @return {number} The given angle converted to radians. + */ +var DegToRad = function (degrees) +{ + return degrees * CONST.DEG_TO_RAD; +}; + +module.exports = DegToRad; + + +/***/ }), +/* 41 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Cameras.Scene2D.Events + */ + +module.exports = { + + DESTROY: __webpack_require__(651), + FADE_IN_COMPLETE: __webpack_require__(652), + FADE_IN_START: __webpack_require__(653), + FADE_OUT_COMPLETE: __webpack_require__(654), + FADE_OUT_START: __webpack_require__(655), + FLASH_COMPLETE: __webpack_require__(656), + FLASH_START: __webpack_require__(657), + PAN_COMPLETE: __webpack_require__(658), + PAN_START: __webpack_require__(659), + POST_RENDER: __webpack_require__(660), + PRE_RENDER: __webpack_require__(661), + ROTATE_COMPLETE: __webpack_require__(662), + ROTATE_START: __webpack_require__(663), + SHAKE_COMPLETE: __webpack_require__(664), + SHAKE_START: __webpack_require__(665), + ZOOM_COMPLETE: __webpack_require__(666), + ZOOM_START: __webpack_require__(667) + +}; + + +/***/ }), +/* 42 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Sets the fillStyle on the target context based on the given Shape. + * + * @method Phaser.GameObjects.Shape#FillStyleCanvas + * @since 3.13.0 + * @private + * + * @param {CanvasRenderingContext2D} ctx - The context to set the fill style on. + * @param {Phaser.GameObjects.Shape} src - The Game Object to set the fill style from. + * @param {number} [altColor] - An alternative color to render with. + * @param {number} [altAlpha] - An alternative alpha to render with. + */ +var FillStyleCanvas = function (ctx, src, altColor, altAlpha) +{ + var fillColor = (altColor) ? altColor : src.fillColor; + var fillAlpha = (altAlpha) ? altAlpha : src.fillAlpha; + + var red = ((fillColor & 0xFF0000) >>> 16); + var green = ((fillColor & 0xFF00) >>> 8); + var blue = (fillColor & 0xFF); + + ctx.fillStyle = 'rgba(' + red + ',' + green + ',' + blue + ',' + fillAlpha + ')'; +}; + +module.exports = FillStyleCanvas; + + +/***/ }), +/* 43 */, +/* 44 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Positions the Game Object so that the top of its bounds aligns with the given coordinate. + * + * @function Phaser.Display.Bounds.SetTop + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned. + * @param {number} value - The coordinate to position the Game Object bounds on. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned. + */ +var SetTop = function (gameObject, value) +{ + gameObject.y = value + (gameObject.height * gameObject.originY); + + return gameObject; +}; + +module.exports = SetTop; + + +/***/ }), +/* 45 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Positions the Game Object so that the left of its bounds aligns with the given coordinate. + * + * @function Phaser.Display.Bounds.SetLeft + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned. + * @param {number} value - The coordinate to position the Game Object bounds on. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned. + */ +var SetLeft = function (gameObject, value) +{ + gameObject.x = value + (gameObject.width * gameObject.originX); + + return gameObject; +}; + +module.exports = SetLeft; + + +/***/ }), +/* 46 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Positions the Game Object so that the left of its bounds aligns with the given coordinate. + * + * @function Phaser.Display.Bounds.SetRight + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned. + * @param {number} value - The coordinate to position the Game Object bounds on. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned. + */ +var SetRight = function (gameObject, value) +{ + gameObject.x = (value - gameObject.width) + (gameObject.width * gameObject.originX); + + return gameObject; +}; + +module.exports = SetRight; + + +/***/ }), +/* 47 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Positions the Game Object so that the bottom of its bounds aligns with the given coordinate. + * + * @function Phaser.Display.Bounds.SetBottom + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return] + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned. + * @param {number} value - The coordinate to position the Game Object bounds on. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned. + */ +var SetBottom = function (gameObject, value) +{ + gameObject.y = (value - gameObject.height) + (gameObject.height * gameObject.originY); + + return gameObject; +}; + +module.exports = SetBottom; + + +/***/ }), +/* 48 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GEOM_CONST = { + + /** + * A Circle Geometry object type. + * + * @name Phaser.Geom.CIRCLE + * @type {integer} + * @since 3.19.0 + */ + CIRCLE: 0, + + /** + * An Ellipse Geometry object type. + * + * @name Phaser.Geom.ELLIPSE + * @type {integer} + * @since 3.19.0 + */ + ELLIPSE: 1, + + /** + * A Line Geometry object type. + * + * @name Phaser.Geom.LINE + * @type {integer} + * @since 3.19.0 + */ + LINE: 2, + + /** + * A Point Geometry object type. + * + * @name Phaser.Geom.POINT + * @type {integer} + * @since 3.19.0 + */ + POINT: 3, + + /** + * A Polygon Geometry object type. + * + * @name Phaser.Geom.POLYGON + * @type {integer} + * @since 3.19.0 + */ + POLYGON: 4, + + /** + * A Rectangle Geometry object type. + * + * @name Phaser.Geom.RECTANGLE + * @type {integer} + * @since 3.19.0 + */ + RECTANGLE: 5, + + /** + * A Triangle Geometry object type. + * + * @name Phaser.Geom.TRIANGLE + * @type {integer} + * @since 3.19.0 + */ + TRIANGLE: 6 + +}; + +module.exports = GEOM_CONST; + + +/***/ }), +/* 49 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Checks if a given point is inside a Rectangle's bounds. + * + * @function Phaser.Geom.Rectangle.Contains + * @since 3.0.0 + * + * @param {Phaser.Geom.Rectangle} rect - The Rectangle to check. + * @param {number} x - The X coordinate of the point to check. + * @param {number} y - The Y coordinate of the point to check. + * + * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`. + */ +var Contains = function (rect, x, y) +{ + if (rect.width <= 0 || rect.height <= 0) + { + return false; + } + + return (rect.x <= x && rect.x + rect.width >= x && rect.y <= y && rect.y + rect.height >= y); +}; + +module.exports = Contains; + + /***/ }), /* 50 */ /***/ (function(module, exports) { @@ -9033,7 +9070,7 @@ module.exports = CONST; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(144); +var GetTileAt = __webpack_require__(148); var GetTilesWithin = __webpack_require__(24); /** @@ -9478,52 +9515,52 @@ module.exports = DistanceBetween; module.exports = { - BOOT: __webpack_require__(826), - DESTROY: __webpack_require__(827), - DRAG_END: __webpack_require__(828), - DRAG_ENTER: __webpack_require__(829), - DRAG: __webpack_require__(830), - DRAG_LEAVE: __webpack_require__(831), - DRAG_OVER: __webpack_require__(832), - DRAG_START: __webpack_require__(833), - DROP: __webpack_require__(834), - GAME_OUT: __webpack_require__(835), - GAME_OVER: __webpack_require__(836), - GAMEOBJECT_DOWN: __webpack_require__(837), - GAMEOBJECT_DRAG_END: __webpack_require__(838), - GAMEOBJECT_DRAG_ENTER: __webpack_require__(839), - GAMEOBJECT_DRAG: __webpack_require__(840), - GAMEOBJECT_DRAG_LEAVE: __webpack_require__(841), - GAMEOBJECT_DRAG_OVER: __webpack_require__(842), - GAMEOBJECT_DRAG_START: __webpack_require__(843), - GAMEOBJECT_DROP: __webpack_require__(844), - GAMEOBJECT_MOVE: __webpack_require__(845), - GAMEOBJECT_OUT: __webpack_require__(846), - GAMEOBJECT_OVER: __webpack_require__(847), - GAMEOBJECT_POINTER_DOWN: __webpack_require__(848), - GAMEOBJECT_POINTER_MOVE: __webpack_require__(849), - GAMEOBJECT_POINTER_OUT: __webpack_require__(850), - GAMEOBJECT_POINTER_OVER: __webpack_require__(851), - GAMEOBJECT_POINTER_UP: __webpack_require__(852), - GAMEOBJECT_POINTER_WHEEL: __webpack_require__(853), - GAMEOBJECT_UP: __webpack_require__(854), - GAMEOBJECT_WHEEL: __webpack_require__(855), - MANAGER_BOOT: __webpack_require__(856), - MANAGER_PROCESS: __webpack_require__(857), - MANAGER_UPDATE: __webpack_require__(858), - POINTER_DOWN: __webpack_require__(859), - POINTER_DOWN_OUTSIDE: __webpack_require__(860), - POINTER_MOVE: __webpack_require__(861), - POINTER_OUT: __webpack_require__(862), - POINTER_OVER: __webpack_require__(863), - POINTER_UP: __webpack_require__(864), - POINTER_UP_OUTSIDE: __webpack_require__(865), - POINTER_WHEEL: __webpack_require__(866), - POINTERLOCK_CHANGE: __webpack_require__(867), - PRE_UPDATE: __webpack_require__(868), - SHUTDOWN: __webpack_require__(869), - START: __webpack_require__(870), - UPDATE: __webpack_require__(871) + BOOT: __webpack_require__(831), + DESTROY: __webpack_require__(832), + DRAG_END: __webpack_require__(833), + DRAG_ENTER: __webpack_require__(834), + DRAG: __webpack_require__(835), + DRAG_LEAVE: __webpack_require__(836), + DRAG_OVER: __webpack_require__(837), + DRAG_START: __webpack_require__(838), + DROP: __webpack_require__(839), + GAME_OUT: __webpack_require__(840), + GAME_OVER: __webpack_require__(841), + GAMEOBJECT_DOWN: __webpack_require__(842), + GAMEOBJECT_DRAG_END: __webpack_require__(843), + GAMEOBJECT_DRAG_ENTER: __webpack_require__(844), + GAMEOBJECT_DRAG: __webpack_require__(845), + GAMEOBJECT_DRAG_LEAVE: __webpack_require__(846), + GAMEOBJECT_DRAG_OVER: __webpack_require__(847), + GAMEOBJECT_DRAG_START: __webpack_require__(848), + GAMEOBJECT_DROP: __webpack_require__(849), + GAMEOBJECT_MOVE: __webpack_require__(850), + GAMEOBJECT_OUT: __webpack_require__(851), + GAMEOBJECT_OVER: __webpack_require__(852), + GAMEOBJECT_POINTER_DOWN: __webpack_require__(853), + GAMEOBJECT_POINTER_MOVE: __webpack_require__(854), + GAMEOBJECT_POINTER_OUT: __webpack_require__(855), + GAMEOBJECT_POINTER_OVER: __webpack_require__(856), + GAMEOBJECT_POINTER_UP: __webpack_require__(857), + GAMEOBJECT_POINTER_WHEEL: __webpack_require__(858), + GAMEOBJECT_UP: __webpack_require__(859), + GAMEOBJECT_WHEEL: __webpack_require__(860), + MANAGER_BOOT: __webpack_require__(861), + MANAGER_PROCESS: __webpack_require__(862), + MANAGER_UPDATE: __webpack_require__(863), + POINTER_DOWN: __webpack_require__(864), + POINTER_DOWN_OUTSIDE: __webpack_require__(865), + POINTER_MOVE: __webpack_require__(866), + POINTER_OUT: __webpack_require__(867), + POINTER_OVER: __webpack_require__(868), + POINTER_UP: __webpack_require__(869), + POINTER_UP_OUTSIDE: __webpack_require__(870), + POINTER_WHEEL: __webpack_require__(871), + POINTERLOCK_CHANGE: __webpack_require__(872), + PRE_UPDATE: __webpack_require__(873), + SHUTDOWN: __webpack_require__(874), + START: __webpack_require__(875), + UPDATE: __webpack_require__(876) }; @@ -9645,29 +9682,29 @@ module.exports = Wrap; module.exports = { - COMPLETE: __webpack_require__(894), - DECODED: __webpack_require__(895), - DECODED_ALL: __webpack_require__(896), - DESTROY: __webpack_require__(897), - DETUNE: __webpack_require__(898), - GLOBAL_DETUNE: __webpack_require__(899), - GLOBAL_MUTE: __webpack_require__(900), - GLOBAL_RATE: __webpack_require__(901), - GLOBAL_VOLUME: __webpack_require__(902), - LOOP: __webpack_require__(903), - LOOPED: __webpack_require__(904), - MUTE: __webpack_require__(905), - PAUSE_ALL: __webpack_require__(906), - PAUSE: __webpack_require__(907), - PLAY: __webpack_require__(908), - RATE: __webpack_require__(909), - RESUME_ALL: __webpack_require__(910), - RESUME: __webpack_require__(911), - SEEK: __webpack_require__(912), - STOP_ALL: __webpack_require__(913), - STOP: __webpack_require__(914), - UNLOCKED: __webpack_require__(915), - VOLUME: __webpack_require__(916) + COMPLETE: __webpack_require__(899), + DECODED: __webpack_require__(900), + DECODED_ALL: __webpack_require__(901), + DESTROY: __webpack_require__(902), + DETUNE: __webpack_require__(903), + GLOBAL_DETUNE: __webpack_require__(904), + GLOBAL_MUTE: __webpack_require__(905), + GLOBAL_RATE: __webpack_require__(906), + GLOBAL_VOLUME: __webpack_require__(907), + LOOP: __webpack_require__(908), + LOOPED: __webpack_require__(909), + MUTE: __webpack_require__(910), + PAUSE_ALL: __webpack_require__(911), + PAUSE: __webpack_require__(912), + PLAY: __webpack_require__(913), + RATE: __webpack_require__(914), + RESUME_ALL: __webpack_require__(915), + RESUME: __webpack_require__(916), + SEEK: __webpack_require__(917), + STOP_ALL: __webpack_require__(918), + STOP: __webpack_require__(919), + UNLOCKED: __webpack_require__(920), + VOLUME: __webpack_require__(921) }; @@ -10253,8 +10290,8 @@ var Class = __webpack_require__(0); var Contains = __webpack_require__(56); var GetPoint = __webpack_require__(270); var GetPoints = __webpack_require__(271); -var GEOM_CONST = __webpack_require__(47); -var Random = __webpack_require__(154); +var GEOM_CONST = __webpack_require__(48); +var Random = __webpack_require__(155); /** * @classdesc @@ -10625,17 +10662,17 @@ module.exports = Circle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -// Earcut 2.1.4 (December 4th 2018) +// Earcut 2.2.2 (January 21st 2020) /* * ISC License - * + * * Copyright (c) 2016, Mapbox - * + * * Permission to use, copy, modify, and/or distribute this software for any purpose * with or without fee is hereby granted, provided that the above copyright notice * and this permission notice appear in all copies. - * + * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, @@ -10706,7 +10743,7 @@ function linkedList(data, start, end, dim, clockwise) { return last; } -// eliminate collinear or duplicate points +// eliminate colinear or duplicate points function filterPoints(start, end) { if (!start) return start; if (!end) end = start; @@ -10770,7 +10807,7 @@ function earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) { // if this didn't work, try curing all small self-intersections locally } else if (pass === 1) { - ear = cureLocalIntersections(ear, triangles, dim); + ear = cureLocalIntersections(filterPoints(ear), triangles, dim); earcutLinked(ear, triangles, dim, minX, minY, invSize, 2); // as a last resort, try splitting the remaining polygon into two @@ -10877,7 +10914,7 @@ function cureLocalIntersections(start, triangles, dim) { p = p.next; } while (p !== start); - return p; + return filterPoints(p); } // try splitting polygon into two and triangulate them independently @@ -10891,7 +10928,7 @@ function splitEarcut(start, triangles, dim, minX, minY, invSize) { // split the polygon in two by the diagonal var c = splitPolygon(a, b); - // filter collinear points around the cuts + // filter colinear points around the cuts a = filterPoints(a, a.next); c = filterPoints(c, c.next); @@ -10939,6 +10976,9 @@ function eliminateHole(hole, outerNode) { outerNode = findHoleBridge(hole, outerNode); if (outerNode) { var b = splitPolygon(outerNode, hole); + + // filter collinear points around the cuts + filterPoints(outerNode, outerNode.next); filterPoints(b, b.next); } } @@ -10970,7 +11010,7 @@ function findHoleBridge(hole, outerNode) { if (!m) return null; - if (hx === qx) return m.prev; // hole touches outer segment; pick lower endpoint + if (hx === qx) return m; // hole touches outer segment; pick leftmost endpoint // look for points inside the triangle of hole point, segment intersection and endpoint; // if there are no points found, we have a valid connection; @@ -10982,26 +11022,32 @@ function findHoleBridge(hole, outerNode) { tanMin = Infinity, tan; - p = m.next; + p = m; - while (p !== stop) { + do { if (hx >= p.x && p.x >= mx && hx !== p.x && pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) { tan = Math.abs(hy - p.y) / (hx - p.x); // tangential - if ((tan < tanMin || (tan === tanMin && p.x > m.x)) && locallyInside(p, hole)) { + if (locallyInside(p, hole) && + (tan < tanMin || (tan === tanMin && (p.x > m.x || (p.x === m.x && sectorContainsSector(m, p)))))) { m = p; tanMin = tan; } } p = p.next; - } + } while (p !== stop); return m; } +// whether sector in vertex m contains sector in vertex p in the same coordinates +function sectorContainsSector(m, p) { + return area(m.prev, m, p.prev) < 0 && area(p.next, m, m.next) < 0; +} + // interlink polygon nodes in z-order function indexCurve(start, minX, minY, invSize) { var p = start; @@ -11095,7 +11141,7 @@ function getLeftmost(start) { var p = start, leftmost = start; do { - if (p.x < leftmost.x) leftmost = p; + if (p.x < leftmost.x || (p.x === leftmost.x && p.y < leftmost.y)) leftmost = p; p = p.next; } while (p !== start); @@ -11111,8 +11157,10 @@ function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) { // check if a diagonal between two polygon nodes is valid (lies in polygon interior) function isValidDiagonal(a, b) { - return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && - locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b); + return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && // dones't intersect other edges + (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible + (area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors + equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case } // signed area of a triangle @@ -11127,10 +11175,28 @@ function equals(p1, p2) { // check if two segments intersect function intersects(p1, q1, p2, q2) { - if ((equals(p1, q1) && equals(p2, q2)) || - (equals(p1, q2) && equals(p2, q1))) return true; - return area(p1, q1, p2) > 0 !== area(p1, q1, q2) > 0 && - area(p2, q2, p1) > 0 !== area(p2, q2, q1) > 0; + var o1 = sign(area(p1, q1, p2)); + var o2 = sign(area(p1, q1, q2)); + var o3 = sign(area(p2, q2, p1)); + var o4 = sign(area(p2, q2, q1)); + + if (o1 !== o2 && o3 !== o4) return true; // general case + + if (o1 === 0 && onSegment(p1, p2, q1)) return true; // p1, q1 and p2 are collinear and p2 lies on p1q1 + if (o2 === 0 && onSegment(p1, q2, q1)) return true; // p1, q1 and q2 are collinear and q2 lies on p1q1 + if (o3 === 0 && onSegment(p2, p1, q2)) return true; // p2, q2 and p1 are collinear and p1 lies on p2q2 + if (o4 === 0 && onSegment(p2, q1, q2)) return true; // p2, q2 and q1 are collinear and q1 lies on p2q2 + + return false; +} + +// for collinear points p, q, r, check if point q lies on segment pr +function onSegment(p, q, r) { + return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y); +} + +function sign(num) { + return num > 0 ? 1 : num < 0 ? -1 : 0; } // check if a polygon diagonal intersects any polygon segments @@ -11397,7 +11463,7 @@ module.exports = SafeRange; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var EaseMap = __webpack_require__(117); +var EaseMap = __webpack_require__(120); var UppercaseFirst = __webpack_require__(187); /** @@ -11582,12 +11648,12 @@ module.exports = StrokePathWebGL; */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(83); +var Contains = __webpack_require__(84); var GetPoint = __webpack_require__(425); var GetPoints = __webpack_require__(426); -var GEOM_CONST = __webpack_require__(47); -var Line = __webpack_require__(49); -var Random = __webpack_require__(163); +var GEOM_CONST = __webpack_require__(48); +var Line = __webpack_require__(39); +var Random = __webpack_require__(164); /** * @classdesc @@ -12340,7 +12406,7 @@ module.exports = SetTileCollision; var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var Rectangle = __webpack_require__(445); +var Rectangle = __webpack_require__(447); /** * @classdesc @@ -13179,7 +13245,7 @@ module.exports = Tile; var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var SpriteRender = __webpack_require__(971); +var SpriteRender = __webpack_require__(976); /** * @classdesc @@ -13472,6 +13538,816 @@ module.exports = SetCenterY; /***/ }), /* 80 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji +// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl + +var Class = __webpack_require__(0); + +/** + * @classdesc + * A representation of a vector in 3D space. + * + * A three-component vector. + * + * @class Vector3 + * @memberof Phaser.Math + * @constructor + * @since 3.0.0 + * + * @param {number} [x] - The x component. + * @param {number} [y] - The y component. + * @param {number} [z] - The z component. + */ +var Vector3 = new Class({ + + initialize: + + function Vector3 (x, y, z) + { + /** + * The x component of this Vector. + * + * @name Phaser.Math.Vector3#x + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.x = 0; + + /** + * The y component of this Vector. + * + * @name Phaser.Math.Vector3#y + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.y = 0; + + /** + * The z component of this Vector. + * + * @name Phaser.Math.Vector3#z + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.z = 0; + + if (typeof x === 'object') + { + this.x = x.x || 0; + this.y = x.y || 0; + this.z = x.z || 0; + } + else + { + this.x = x || 0; + this.y = y || 0; + this.z = z || 0; + } + }, + + /** + * Set this Vector to point up. + * + * Sets the y component of the vector to 1, and the others to 0. + * + * @method Phaser.Math.Vector3#up + * @since 3.0.0 + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + up: function () + { + this.x = 0; + this.y = 1; + this.z = 0; + + return this; + }, + + /** + * Make a clone of this Vector3. + * + * @method Phaser.Math.Vector3#clone + * @since 3.0.0 + * + * @return {Phaser.Math.Vector3} A new Vector3 object containing this Vectors values. + */ + clone: function () + { + return new Vector3(this.x, this.y, this.z); + }, + + /** + * Calculate the cross (vector) product of two given Vectors. + * + * @method Phaser.Math.Vector3#crossVectors + * @since 3.0.0 + * + * @param {Phaser.Math.Vector3} a - The first Vector to multiply. + * @param {Phaser.Math.Vector3} b - The second Vector to multiply. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + crossVectors: function (a, b) + { + var ax = a.x; + var ay = a.y; + var az = a.z; + var bx = b.x; + var by = b.y; + var bz = b.z; + + this.x = ay * bz - az * by; + this.y = az * bx - ax * bz; + this.z = ax * by - ay * bx; + + return this; + }, + + /** + * Check whether this Vector is equal to a given Vector. + * + * Performs a strict equality check against each Vector's components. + * + * @method Phaser.Math.Vector3#equals + * @since 3.0.0 + * + * @param {Phaser.Math.Vector3} v - The Vector3 to compare against. + * + * @return {boolean} True if the two vectors strictly match, otherwise false. + */ + equals: function (v) + { + return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z)); + }, + + /** + * Copy the components of a given Vector into this Vector. + * + * @method Phaser.Math.Vector3#copy + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} src - The Vector to copy the components from. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + copy: function (src) + { + this.x = src.x; + this.y = src.y; + this.z = src.z || 0; + + return this; + }, + + /** + * Set the `x`, `y`, and `z` components of this Vector to the given `x`, `y`, and `z` values. + * + * @method Phaser.Math.Vector3#set + * @since 3.0.0 + * + * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y and z components. + * @param {number} [y] - The y value to set for this Vector. + * @param {number} [z] - The z value to set for this Vector. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + set: function (x, y, z) + { + if (typeof x === 'object') + { + this.x = x.x || 0; + this.y = x.y || 0; + this.z = x.z || 0; + } + else + { + this.x = x || 0; + this.y = y || 0; + this.z = z || 0; + } + + return this; + }, + + /** + * Add a given Vector to this Vector. Addition is component-wise. + * + * @method Phaser.Math.Vector3#add + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + add: function (v) + { + this.x += v.x; + this.y += v.y; + this.z += v.z || 0; + + return this; + }, + + /** + * Subtract the given Vector from this Vector. Subtraction is component-wise. + * + * @method Phaser.Math.Vector3#subtract + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to subtract from this Vector. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + subtract: function (v) + { + this.x -= v.x; + this.y -= v.y; + this.z -= v.z || 0; + + return this; + }, + + /** + * Perform a component-wise multiplication between this Vector and the given Vector. + * + * Multiplies this Vector by the given Vector. + * + * @method Phaser.Math.Vector3#multiply + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to multiply this Vector by. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + multiply: function (v) + { + this.x *= v.x; + this.y *= v.y; + this.z *= v.z || 1; + + return this; + }, + + /** + * Scale this Vector by the given value. + * + * @method Phaser.Math.Vector3#scale + * @since 3.0.0 + * + * @param {number} scale - The value to scale this Vector by. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + scale: function (scale) + { + if (isFinite(scale)) + { + this.x *= scale; + this.y *= scale; + this.z *= scale; + } + else + { + this.x = 0; + this.y = 0; + this.z = 0; + } + + return this; + }, + + /** + * Perform a component-wise division between this Vector and the given Vector. + * + * Divides this Vector by the given Vector. + * + * @method Phaser.Math.Vector3#divide + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to divide this Vector by. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + divide: function (v) + { + this.x /= v.x; + this.y /= v.y; + this.z /= v.z || 1; + + return this; + }, + + /** + * Negate the `x`, `y` and `z` components of this Vector. + * + * @method Phaser.Math.Vector3#negate + * @since 3.0.0 + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + negate: function () + { + this.x = -this.x; + this.y = -this.y; + this.z = -this.z; + + return this; + }, + + /** + * Calculate the distance between this Vector and the given Vector. + * + * @method Phaser.Math.Vector3#distance + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to. + * + * @return {number} The distance from this Vector to the given Vector. + */ + distance: function (v) + { + var dx = v.x - this.x; + var dy = v.y - this.y; + var dz = v.z - this.z || 0; + + return Math.sqrt(dx * dx + dy * dy + dz * dz); + }, + + /** + * Calculate the distance between this Vector and the given Vector, squared. + * + * @method Phaser.Math.Vector3#distanceSq + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to. + * + * @return {number} The distance from this Vector to the given Vector, squared. + */ + distanceSq: function (v) + { + var dx = v.x - this.x; + var dy = v.y - this.y; + var dz = v.z - this.z || 0; + + return dx * dx + dy * dy + dz * dz; + }, + + /** + * Calculate the length (or magnitude) of this Vector. + * + * @method Phaser.Math.Vector3#length + * @since 3.0.0 + * + * @return {number} The length of this Vector. + */ + length: function () + { + var x = this.x; + var y = this.y; + var z = this.z; + + return Math.sqrt(x * x + y * y + z * z); + }, + + /** + * Calculate the length of this Vector squared. + * + * @method Phaser.Math.Vector3#lengthSq + * @since 3.0.0 + * + * @return {number} The length of this Vector, squared. + */ + lengthSq: function () + { + var x = this.x; + var y = this.y; + var z = this.z; + + return x * x + y * y + z * z; + }, + + /** + * Normalize this Vector. + * + * Makes the vector a unit length vector (magnitude of 1) in the same direction. + * + * @method Phaser.Math.Vector3#normalize + * @since 3.0.0 + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + normalize: function () + { + var x = this.x; + var y = this.y; + var z = this.z; + var len = x * x + y * y + z * z; + + if (len > 0) + { + len = 1 / Math.sqrt(len); + + this.x = x * len; + this.y = y * len; + this.z = z * len; + } + + return this; + }, + + /** + * Calculate the dot product of this Vector and the given Vector. + * + * @method Phaser.Math.Vector3#dot + * @since 3.0.0 + * + * @param {Phaser.Math.Vector3} v - The Vector3 to dot product with this Vector3. + * + * @return {number} The dot product of this Vector and `v`. + */ + dot: function (v) + { + return this.x * v.x + this.y * v.y + this.z * v.z; + }, + + /** + * Calculate the cross (vector) product of this Vector (which will be modified) and the given Vector. + * + * @method Phaser.Math.Vector3#cross + * @since 3.0.0 + * + * @param {Phaser.Math.Vector3} v - The Vector to cross product with. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + cross: function (v) + { + var ax = this.x; + var ay = this.y; + var az = this.z; + var bx = v.x; + var by = v.y; + var bz = v.z; + + this.x = ay * bz - az * by; + this.y = az * bx - ax * bz; + this.z = ax * by - ay * bx; + + return this; + }, + + /** + * Linearly interpolate between this Vector and the given Vector. + * + * Interpolates this Vector towards the given Vector. + * + * @method Phaser.Math.Vector3#lerp + * @since 3.0.0 + * + * @param {Phaser.Math.Vector3} v - The Vector3 to interpolate towards. + * @param {number} [t=0] - The interpolation percentage, between 0 and 1. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + lerp: function (v, t) + { + if (t === undefined) { t = 0; } + + var ax = this.x; + var ay = this.y; + var az = this.z; + + this.x = ax + t * (v.x - ax); + this.y = ay + t * (v.y - ay); + this.z = az + t * (v.z - az); + + return this; + }, + + /** + * Transform this Vector with the given Matrix. + * + * @method Phaser.Math.Vector3#transformMat3 + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector3 with. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + transformMat3: function (mat) + { + var x = this.x; + var y = this.y; + var z = this.z; + var m = mat.val; + + this.x = x * m[0] + y * m[3] + z * m[6]; + this.y = x * m[1] + y * m[4] + z * m[7]; + this.z = x * m[2] + y * m[5] + z * m[8]; + + return this; + }, + + /** + * Transform this Vector with the given Matrix. + * + * @method Phaser.Math.Vector3#transformMat4 + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + transformMat4: function (mat) + { + var x = this.x; + var y = this.y; + var z = this.z; + var m = mat.val; + + this.x = m[0] * x + m[4] * y + m[8] * z + m[12]; + this.y = m[1] * x + m[5] * y + m[9] * z + m[13]; + this.z = m[2] * x + m[6] * y + m[10] * z + m[14]; + + return this; + }, + + /** + * Transforms the coordinates of this Vector3 with the given Matrix4. + * + * @method Phaser.Math.Vector3#transformCoordinates + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + transformCoordinates: function (mat) + { + var x = this.x; + var y = this.y; + var z = this.z; + var m = mat.val; + + var tx = (x * m[0]) + (y * m[4]) + (z * m[8]) + m[12]; + var ty = (x * m[1]) + (y * m[5]) + (z * m[9]) + m[13]; + var tz = (x * m[2]) + (y * m[6]) + (z * m[10]) + m[14]; + var tw = (x * m[3]) + (y * m[7]) + (z * m[11]) + m[15]; + + this.x = tx / tw; + this.y = ty / tw; + this.z = tz / tw; + + return this; + }, + + /** + * Transform this Vector with the given Quaternion. + * + * @method Phaser.Math.Vector3#transformQuat + * @since 3.0.0 + * + * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + transformQuat: function (q) + { + // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations + var x = this.x; + var y = this.y; + var z = this.z; + var qx = q.x; + var qy = q.y; + var qz = q.z; + var qw = q.w; + + // calculate quat * vec + var ix = qw * x + qy * z - qz * y; + var iy = qw * y + qz * x - qx * z; + var iz = qw * z + qx * y - qy * x; + var iw = -qx * x - qy * y - qz * z; + + // calculate result * inverse quat + this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy; + this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz; + this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx; + + return this; + }, + + /** + * Multiplies this Vector3 by the specified matrix, applying a W divide. This is useful for projection, + * e.g. unprojecting a 2D point into 3D space. + * + * @method Phaser.Math.Vector3#project + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix4} mat - The Matrix4 to multiply this Vector3 with. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + project: function (mat) + { + var x = this.x; + var y = this.y; + var z = this.z; + var m = mat.val; + + var a00 = m[0]; + var a01 = m[1]; + var a02 = m[2]; + var a03 = m[3]; + var a10 = m[4]; + var a11 = m[5]; + var a12 = m[6]; + var a13 = m[7]; + var a20 = m[8]; + var a21 = m[9]; + var a22 = m[10]; + var a23 = m[11]; + var a30 = m[12]; + var a31 = m[13]; + var a32 = m[14]; + var a33 = m[15]; + + var lw = 1 / (x * a03 + y * a13 + z * a23 + a33); + + this.x = (x * a00 + y * a10 + z * a20 + a30) * lw; + this.y = (x * a01 + y * a11 + z * a21 + a31) * lw; + this.z = (x * a02 + y * a12 + z * a22 + a32) * lw; + + return this; + }, + + /** + * Unproject this point from 2D space to 3D space. + * The point should have its x and y properties set to + * 2D screen space, and the z either at 0 (near plane) + * or 1 (far plane). The provided matrix is assumed to already + * be combined, i.e. projection * view * model. + * + * After this operation, this vector's (x, y, z) components will + * represent the unprojected 3D coordinate. + * + * @method Phaser.Math.Vector3#unproject + * @since 3.0.0 + * + * @param {Phaser.Math.Vector4} viewport - Screen x, y, width and height in pixels. + * @param {Phaser.Math.Matrix4} invProjectionView - Combined projection and view matrix. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + unproject: function (viewport, invProjectionView) + { + var viewX = viewport.x; + var viewY = viewport.y; + var viewWidth = viewport.z; + var viewHeight = viewport.w; + + var x = this.x - viewX; + var y = (viewHeight - this.y - 1) - viewY; + var z = this.z; + + this.x = (2 * x) / viewWidth - 1; + this.y = (2 * y) / viewHeight - 1; + this.z = 2 * z - 1; + + return this.project(invProjectionView); + }, + + /** + * Make this Vector the zero vector (0, 0, 0). + * + * @method Phaser.Math.Vector3#reset + * @since 3.0.0 + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + reset: function () + { + this.x = 0; + this.y = 0; + this.z = 0; + + return this; + } + +}); + +/** + * A static zero Vector3 for use by reference. + * + * This constant is meant for comparison operations and should not be modified directly. + * + * @constant + * @name Phaser.Math.Vector3.ZERO + * @type {Phaser.Math.Vector3} + * @since 3.16.0 + */ +Vector3.ZERO = new Vector3(); + +/** + * A static right Vector3 for use by reference. + * + * This constant is meant for comparison operations and should not be modified directly. + * + * @constant + * @name Phaser.Math.Vector3.RIGHT + * @type {Phaser.Math.Vector3} + * @since 3.16.0 + */ +Vector3.RIGHT = new Vector3(1, 0, 0); + +/** + * A static left Vector3 for use by reference. + * + * This constant is meant for comparison operations and should not be modified directly. + * + * @constant + * @name Phaser.Math.Vector3.LEFT + * @type {Phaser.Math.Vector3} + * @since 3.16.0 + */ +Vector3.LEFT = new Vector3(-1, 0, 0); + +/** + * A static up Vector3 for use by reference. + * + * This constant is meant for comparison operations and should not be modified directly. + * + * @constant + * @name Phaser.Math.Vector3.UP + * @type {Phaser.Math.Vector3} + * @since 3.16.0 + */ +Vector3.UP = new Vector3(0, -1, 0); + +/** + * A static down Vector3 for use by reference. + * + * This constant is meant for comparison operations and should not be modified directly. + * + * @constant + * @name Phaser.Math.Vector3.DOWN + * @type {Phaser.Math.Vector3} + * @since 3.16.0 + */ +Vector3.DOWN = new Vector3(0, 1, 0); + +/** + * A static forward Vector3 for use by reference. + * + * This constant is meant for comparison operations and should not be modified directly. + * + * @constant + * @name Phaser.Math.Vector3.FORWARD + * @type {Phaser.Math.Vector3} + * @since 3.16.0 + */ +Vector3.FORWARD = new Vector3(0, 0, 1); + +/** + * A static back Vector3 for use by reference. + * + * This constant is meant for comparison operations and should not be modified directly. + * + * @constant + * @name Phaser.Math.Vector3.BACK + * @type {Phaser.Math.Vector3} + * @since 3.16.0 + */ +Vector3.BACK = new Vector3(0, 0, -1); + +/** + * A static one Vector3 for use by reference. + * + * This constant is meant for comparison operations and should not be modified directly. + * + * @constant + * @name Phaser.Math.Vector3.ONE + * @type {Phaser.Math.Vector3} + * @since 3.16.0 + */ +Vector3.ONE = new Vector3(1, 1, 1); + +module.exports = Vector3; + + +/***/ }), +/* 81 */ /***/ (function(module, exports) { /** @@ -13517,7 +14393,7 @@ module.exports = SpliceOne; /***/ }), -/* 81 */ +/* 82 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -14134,7 +15010,7 @@ module.exports = Curve; /***/ }), -/* 82 */ +/* 83 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -14149,22 +15025,22 @@ module.exports = Curve; module.exports = { - ADD: __webpack_require__(873), - COMPLETE: __webpack_require__(874), - FILE_COMPLETE: __webpack_require__(875), - FILE_KEY_COMPLETE: __webpack_require__(876), - FILE_LOAD_ERROR: __webpack_require__(877), - FILE_LOAD: __webpack_require__(878), - FILE_PROGRESS: __webpack_require__(879), - POST_PROCESS: __webpack_require__(880), - PROGRESS: __webpack_require__(881), - START: __webpack_require__(882) + ADD: __webpack_require__(878), + COMPLETE: __webpack_require__(879), + FILE_COMPLETE: __webpack_require__(880), + FILE_KEY_COMPLETE: __webpack_require__(881), + FILE_LOAD_ERROR: __webpack_require__(882), + FILE_LOAD: __webpack_require__(883), + FILE_PROGRESS: __webpack_require__(884), + POST_PROCESS: __webpack_require__(885), + PROGRESS: __webpack_require__(886), + START: __webpack_require__(887) }; /***/ }), -/* 83 */ +/* 84 */ /***/ (function(module, exports) { /** @@ -14217,7 +15093,7 @@ module.exports = Contains; /***/ }), -/* 84 */ +/* 85 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -14293,7 +15169,7 @@ module.exports = LineToLine; /***/ }), -/* 85 */ +/* 86 */ /***/ (function(module, exports) { /** @@ -14321,8 +15197,8 @@ module.exports = Angle; /***/ }), -/* 86 */, -/* 87 */ +/* 87 */, +/* 88 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -14356,7 +15232,7 @@ module.exports = FromPercent; /***/ }), -/* 88 */ +/* 89 */ /***/ (function(module, exports) { /** @@ -14397,7 +15273,7 @@ module.exports = GetBoolean; /***/ }), -/* 89 */ +/* 90 */ /***/ (function(module, exports) { /** @@ -14569,7 +15445,7 @@ module.exports = TWEEN_CONST; /***/ }), -/* 90 */ +/* 91 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -14584,23 +15460,23 @@ module.exports = TWEEN_CONST; module.exports = { - DESTROY: __webpack_require__(583), - VIDEO_COMPLETE: __webpack_require__(584), - VIDEO_CREATED: __webpack_require__(585), - VIDEO_ERROR: __webpack_require__(586), - VIDEO_LOOP: __webpack_require__(587), - VIDEO_PLAY: __webpack_require__(588), - VIDEO_SEEKED: __webpack_require__(589), - VIDEO_SEEKING: __webpack_require__(590), - VIDEO_STOP: __webpack_require__(591), - VIDEO_TIMEOUT: __webpack_require__(592), - VIDEO_UNLOCKED: __webpack_require__(593) + DESTROY: __webpack_require__(586), + VIDEO_COMPLETE: __webpack_require__(587), + VIDEO_CREATED: __webpack_require__(588), + VIDEO_ERROR: __webpack_require__(589), + VIDEO_LOOP: __webpack_require__(590), + VIDEO_PLAY: __webpack_require__(591), + VIDEO_SEEKED: __webpack_require__(592), + VIDEO_SEEKING: __webpack_require__(593), + VIDEO_STOP: __webpack_require__(594), + VIDEO_TIMEOUT: __webpack_require__(595), + VIDEO_UNLOCKED: __webpack_require__(596) }; /***/ }), -/* 91 */ +/* 92 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -14611,12 +15487,12 @@ module.exports = { var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var DegToRad = __webpack_require__(39); +var DegToRad = __webpack_require__(40); var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(40); +var Events = __webpack_require__(41); var Rectangle = __webpack_require__(9); var TransformMatrix = __webpack_require__(30); -var ValueToColor = __webpack_require__(169); +var ValueToColor = __webpack_require__(170); var Vector2 = __webpack_require__(3); /** @@ -16521,7 +17397,7 @@ module.exports = BaseCamera; /***/ }), -/* 92 */ +/* 93 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16536,18 +17412,18 @@ module.exports = BaseCamera; module.exports = { - ENTER_FULLSCREEN: __webpack_require__(704), - FULLSCREEN_FAILED: __webpack_require__(705), - FULLSCREEN_UNSUPPORTED: __webpack_require__(706), - LEAVE_FULLSCREEN: __webpack_require__(707), - ORIENTATION_CHANGE: __webpack_require__(708), - RESIZE: __webpack_require__(709) + ENTER_FULLSCREEN: __webpack_require__(707), + FULLSCREEN_FAILED: __webpack_require__(708), + FULLSCREEN_UNSUPPORTED: __webpack_require__(709), + LEAVE_FULLSCREEN: __webpack_require__(710), + ORIENTATION_CHANGE: __webpack_require__(711), + RESIZE: __webpack_require__(712) }; /***/ }), -/* 93 */ +/* 94 */ /***/ (function(module, exports) { /** @@ -16590,816 +17466,6 @@ var SnapFloor = function (value, gap, start, divide) module.exports = SnapFloor; -/***/ }), -/* 94 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji -// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl - -var Class = __webpack_require__(0); - -/** - * @classdesc - * A representation of a vector in 3D space. - * - * A three-component vector. - * - * @class Vector3 - * @memberof Phaser.Math - * @constructor - * @since 3.0.0 - * - * @param {number} [x] - The x component. - * @param {number} [y] - The y component. - * @param {number} [z] - The z component. - */ -var Vector3 = new Class({ - - initialize: - - function Vector3 (x, y, z) - { - /** - * The x component of this Vector. - * - * @name Phaser.Math.Vector3#x - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.x = 0; - - /** - * The y component of this Vector. - * - * @name Phaser.Math.Vector3#y - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.y = 0; - - /** - * The z component of this Vector. - * - * @name Phaser.Math.Vector3#z - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.z = 0; - - if (typeof x === 'object') - { - this.x = x.x || 0; - this.y = x.y || 0; - this.z = x.z || 0; - } - else - { - this.x = x || 0; - this.y = y || 0; - this.z = z || 0; - } - }, - - /** - * Set this Vector to point up. - * - * Sets the y component of the vector to 1, and the others to 0. - * - * @method Phaser.Math.Vector3#up - * @since 3.0.0 - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - up: function () - { - this.x = 0; - this.y = 1; - this.z = 0; - - return this; - }, - - /** - * Make a clone of this Vector3. - * - * @method Phaser.Math.Vector3#clone - * @since 3.0.0 - * - * @return {Phaser.Math.Vector3} A new Vector3 object containing this Vectors values. - */ - clone: function () - { - return new Vector3(this.x, this.y, this.z); - }, - - /** - * Calculate the cross (vector) product of two given Vectors. - * - * @method Phaser.Math.Vector3#crossVectors - * @since 3.0.0 - * - * @param {Phaser.Math.Vector3} a - The first Vector to multiply. - * @param {Phaser.Math.Vector3} b - The second Vector to multiply. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - crossVectors: function (a, b) - { - var ax = a.x; - var ay = a.y; - var az = a.z; - var bx = b.x; - var by = b.y; - var bz = b.z; - - this.x = ay * bz - az * by; - this.y = az * bx - ax * bz; - this.z = ax * by - ay * bx; - - return this; - }, - - /** - * Check whether this Vector is equal to a given Vector. - * - * Performs a strict equality check against each Vector's components. - * - * @method Phaser.Math.Vector3#equals - * @since 3.0.0 - * - * @param {Phaser.Math.Vector3} v - The Vector3 to compare against. - * - * @return {boolean} True if the two vectors strictly match, otherwise false. - */ - equals: function (v) - { - return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z)); - }, - - /** - * Copy the components of a given Vector into this Vector. - * - * @method Phaser.Math.Vector3#copy - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} src - The Vector to copy the components from. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - copy: function (src) - { - this.x = src.x; - this.y = src.y; - this.z = src.z || 0; - - return this; - }, - - /** - * Set the `x`, `y`, and `z` components of this Vector to the given `x`, `y`, and `z` values. - * - * @method Phaser.Math.Vector3#set - * @since 3.0.0 - * - * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y and z components. - * @param {number} [y] - The y value to set for this Vector. - * @param {number} [z] - The z value to set for this Vector. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - set: function (x, y, z) - { - if (typeof x === 'object') - { - this.x = x.x || 0; - this.y = x.y || 0; - this.z = x.z || 0; - } - else - { - this.x = x || 0; - this.y = y || 0; - this.z = z || 0; - } - - return this; - }, - - /** - * Add a given Vector to this Vector. Addition is component-wise. - * - * @method Phaser.Math.Vector3#add - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - add: function (v) - { - this.x += v.x; - this.y += v.y; - this.z += v.z || 0; - - return this; - }, - - /** - * Subtract the given Vector from this Vector. Subtraction is component-wise. - * - * @method Phaser.Math.Vector3#subtract - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to subtract from this Vector. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - subtract: function (v) - { - this.x -= v.x; - this.y -= v.y; - this.z -= v.z || 0; - - return this; - }, - - /** - * Perform a component-wise multiplication between this Vector and the given Vector. - * - * Multiplies this Vector by the given Vector. - * - * @method Phaser.Math.Vector3#multiply - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to multiply this Vector by. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - multiply: function (v) - { - this.x *= v.x; - this.y *= v.y; - this.z *= v.z || 1; - - return this; - }, - - /** - * Scale this Vector by the given value. - * - * @method Phaser.Math.Vector3#scale - * @since 3.0.0 - * - * @param {number} scale - The value to scale this Vector by. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - scale: function (scale) - { - if (isFinite(scale)) - { - this.x *= scale; - this.y *= scale; - this.z *= scale; - } - else - { - this.x = 0; - this.y = 0; - this.z = 0; - } - - return this; - }, - - /** - * Perform a component-wise division between this Vector and the given Vector. - * - * Divides this Vector by the given Vector. - * - * @method Phaser.Math.Vector3#divide - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to divide this Vector by. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - divide: function (v) - { - this.x /= v.x; - this.y /= v.y; - this.z /= v.z || 1; - - return this; - }, - - /** - * Negate the `x`, `y` and `z` components of this Vector. - * - * @method Phaser.Math.Vector3#negate - * @since 3.0.0 - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - negate: function () - { - this.x = -this.x; - this.y = -this.y; - this.z = -this.z; - - return this; - }, - - /** - * Calculate the distance between this Vector and the given Vector. - * - * @method Phaser.Math.Vector3#distance - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to. - * - * @return {number} The distance from this Vector to the given Vector. - */ - distance: function (v) - { - var dx = v.x - this.x; - var dy = v.y - this.y; - var dz = v.z - this.z || 0; - - return Math.sqrt(dx * dx + dy * dy + dz * dz); - }, - - /** - * Calculate the distance between this Vector and the given Vector, squared. - * - * @method Phaser.Math.Vector3#distanceSq - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to. - * - * @return {number} The distance from this Vector to the given Vector, squared. - */ - distanceSq: function (v) - { - var dx = v.x - this.x; - var dy = v.y - this.y; - var dz = v.z - this.z || 0; - - return dx * dx + dy * dy + dz * dz; - }, - - /** - * Calculate the length (or magnitude) of this Vector. - * - * @method Phaser.Math.Vector3#length - * @since 3.0.0 - * - * @return {number} The length of this Vector. - */ - length: function () - { - var x = this.x; - var y = this.y; - var z = this.z; - - return Math.sqrt(x * x + y * y + z * z); - }, - - /** - * Calculate the length of this Vector squared. - * - * @method Phaser.Math.Vector3#lengthSq - * @since 3.0.0 - * - * @return {number} The length of this Vector, squared. - */ - lengthSq: function () - { - var x = this.x; - var y = this.y; - var z = this.z; - - return x * x + y * y + z * z; - }, - - /** - * Normalize this Vector. - * - * Makes the vector a unit length vector (magnitude of 1) in the same direction. - * - * @method Phaser.Math.Vector3#normalize - * @since 3.0.0 - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - normalize: function () - { - var x = this.x; - var y = this.y; - var z = this.z; - var len = x * x + y * y + z * z; - - if (len > 0) - { - len = 1 / Math.sqrt(len); - - this.x = x * len; - this.y = y * len; - this.z = z * len; - } - - return this; - }, - - /** - * Calculate the dot product of this Vector and the given Vector. - * - * @method Phaser.Math.Vector3#dot - * @since 3.0.0 - * - * @param {Phaser.Math.Vector3} v - The Vector3 to dot product with this Vector3. - * - * @return {number} The dot product of this Vector and `v`. - */ - dot: function (v) - { - return this.x * v.x + this.y * v.y + this.z * v.z; - }, - - /** - * Calculate the cross (vector) product of this Vector (which will be modified) and the given Vector. - * - * @method Phaser.Math.Vector3#cross - * @since 3.0.0 - * - * @param {Phaser.Math.Vector3} v - The Vector to cross product with. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - cross: function (v) - { - var ax = this.x; - var ay = this.y; - var az = this.z; - var bx = v.x; - var by = v.y; - var bz = v.z; - - this.x = ay * bz - az * by; - this.y = az * bx - ax * bz; - this.z = ax * by - ay * bx; - - return this; - }, - - /** - * Linearly interpolate between this Vector and the given Vector. - * - * Interpolates this Vector towards the given Vector. - * - * @method Phaser.Math.Vector3#lerp - * @since 3.0.0 - * - * @param {Phaser.Math.Vector3} v - The Vector3 to interpolate towards. - * @param {number} [t=0] - The interpolation percentage, between 0 and 1. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - lerp: function (v, t) - { - if (t === undefined) { t = 0; } - - var ax = this.x; - var ay = this.y; - var az = this.z; - - this.x = ax + t * (v.x - ax); - this.y = ay + t * (v.y - ay); - this.z = az + t * (v.z - az); - - return this; - }, - - /** - * Transform this Vector with the given Matrix. - * - * @method Phaser.Math.Vector3#transformMat3 - * @since 3.0.0 - * - * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector3 with. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - transformMat3: function (mat) - { - var x = this.x; - var y = this.y; - var z = this.z; - var m = mat.val; - - this.x = x * m[0] + y * m[3] + z * m[6]; - this.y = x * m[1] + y * m[4] + z * m[7]; - this.z = x * m[2] + y * m[5] + z * m[8]; - - return this; - }, - - /** - * Transform this Vector with the given Matrix. - * - * @method Phaser.Math.Vector3#transformMat4 - * @since 3.0.0 - * - * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - transformMat4: function (mat) - { - var x = this.x; - var y = this.y; - var z = this.z; - var m = mat.val; - - this.x = m[0] * x + m[4] * y + m[8] * z + m[12]; - this.y = m[1] * x + m[5] * y + m[9] * z + m[13]; - this.z = m[2] * x + m[6] * y + m[10] * z + m[14]; - - return this; - }, - - /** - * Transforms the coordinates of this Vector3 with the given Matrix4. - * - * @method Phaser.Math.Vector3#transformCoordinates - * @since 3.0.0 - * - * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - transformCoordinates: function (mat) - { - var x = this.x; - var y = this.y; - var z = this.z; - var m = mat.val; - - var tx = (x * m[0]) + (y * m[4]) + (z * m[8]) + m[12]; - var ty = (x * m[1]) + (y * m[5]) + (z * m[9]) + m[13]; - var tz = (x * m[2]) + (y * m[6]) + (z * m[10]) + m[14]; - var tw = (x * m[3]) + (y * m[7]) + (z * m[11]) + m[15]; - - this.x = tx / tw; - this.y = ty / tw; - this.z = tz / tw; - - return this; - }, - - /** - * Transform this Vector with the given Quaternion. - * - * @method Phaser.Math.Vector3#transformQuat - * @since 3.0.0 - * - * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - transformQuat: function (q) - { - // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations - var x = this.x; - var y = this.y; - var z = this.z; - var qx = q.x; - var qy = q.y; - var qz = q.z; - var qw = q.w; - - // calculate quat * vec - var ix = qw * x + qy * z - qz * y; - var iy = qw * y + qz * x - qx * z; - var iz = qw * z + qx * y - qy * x; - var iw = -qx * x - qy * y - qz * z; - - // calculate result * inverse quat - this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy; - this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz; - this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx; - - return this; - }, - - /** - * Multiplies this Vector3 by the specified matrix, applying a W divide. This is useful for projection, - * e.g. unprojecting a 2D point into 3D space. - * - * @method Phaser.Math.Vector3#project - * @since 3.0.0 - * - * @param {Phaser.Math.Matrix4} mat - The Matrix4 to multiply this Vector3 with. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - project: function (mat) - { - var x = this.x; - var y = this.y; - var z = this.z; - var m = mat.val; - - var a00 = m[0]; - var a01 = m[1]; - var a02 = m[2]; - var a03 = m[3]; - var a10 = m[4]; - var a11 = m[5]; - var a12 = m[6]; - var a13 = m[7]; - var a20 = m[8]; - var a21 = m[9]; - var a22 = m[10]; - var a23 = m[11]; - var a30 = m[12]; - var a31 = m[13]; - var a32 = m[14]; - var a33 = m[15]; - - var lw = 1 / (x * a03 + y * a13 + z * a23 + a33); - - this.x = (x * a00 + y * a10 + z * a20 + a30) * lw; - this.y = (x * a01 + y * a11 + z * a21 + a31) * lw; - this.z = (x * a02 + y * a12 + z * a22 + a32) * lw; - - return this; - }, - - /** - * Unproject this point from 2D space to 3D space. - * The point should have its x and y properties set to - * 2D screen space, and the z either at 0 (near plane) - * or 1 (far plane). The provided matrix is assumed to already - * be combined, i.e. projection * view * model. - * - * After this operation, this vector's (x, y, z) components will - * represent the unprojected 3D coordinate. - * - * @method Phaser.Math.Vector3#unproject - * @since 3.0.0 - * - * @param {Phaser.Math.Vector4} viewport - Screen x, y, width and height in pixels. - * @param {Phaser.Math.Matrix4} invProjectionView - Combined projection and view matrix. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - unproject: function (viewport, invProjectionView) - { - var viewX = viewport.x; - var viewY = viewport.y; - var viewWidth = viewport.z; - var viewHeight = viewport.w; - - var x = this.x - viewX; - var y = (viewHeight - this.y - 1) - viewY; - var z = this.z; - - this.x = (2 * x) / viewWidth - 1; - this.y = (2 * y) / viewHeight - 1; - this.z = 2 * z - 1; - - return this.project(invProjectionView); - }, - - /** - * Make this Vector the zero vector (0, 0, 0). - * - * @method Phaser.Math.Vector3#reset - * @since 3.0.0 - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - reset: function () - { - this.x = 0; - this.y = 0; - this.z = 0; - - return this; - } - -}); - -/** - * A static zero Vector3 for use by reference. - * - * This constant is meant for comparison operations and should not be modified directly. - * - * @constant - * @name Phaser.Math.Vector3.ZERO - * @type {Phaser.Math.Vector3} - * @since 3.16.0 - */ -Vector3.ZERO = new Vector3(); - -/** - * A static right Vector3 for use by reference. - * - * This constant is meant for comparison operations and should not be modified directly. - * - * @constant - * @name Phaser.Math.Vector3.RIGHT - * @type {Phaser.Math.Vector3} - * @since 3.16.0 - */ -Vector3.RIGHT = new Vector3(1, 0, 0); - -/** - * A static left Vector3 for use by reference. - * - * This constant is meant for comparison operations and should not be modified directly. - * - * @constant - * @name Phaser.Math.Vector3.LEFT - * @type {Phaser.Math.Vector3} - * @since 3.16.0 - */ -Vector3.LEFT = new Vector3(-1, 0, 0); - -/** - * A static up Vector3 for use by reference. - * - * This constant is meant for comparison operations and should not be modified directly. - * - * @constant - * @name Phaser.Math.Vector3.UP - * @type {Phaser.Math.Vector3} - * @since 3.16.0 - */ -Vector3.UP = new Vector3(0, -1, 0); - -/** - * A static down Vector3 for use by reference. - * - * This constant is meant for comparison operations and should not be modified directly. - * - * @constant - * @name Phaser.Math.Vector3.DOWN - * @type {Phaser.Math.Vector3} - * @since 3.16.0 - */ -Vector3.DOWN = new Vector3(0, 1, 0); - -/** - * A static forward Vector3 for use by reference. - * - * This constant is meant for comparison operations and should not be modified directly. - * - * @constant - * @name Phaser.Math.Vector3.FORWARD - * @type {Phaser.Math.Vector3} - * @since 3.16.0 - */ -Vector3.FORWARD = new Vector3(0, 0, 1); - -/** - * A static back Vector3 for use by reference. - * - * This constant is meant for comparison operations and should not be modified directly. - * - * @constant - * @name Phaser.Math.Vector3.BACK - * @type {Phaser.Math.Vector3} - * @since 3.16.0 - */ -Vector3.BACK = new Vector3(0, 0, -1); - -/** - * A static one Vector3 for use by reference. - * - * This constant is meant for comparison operations and should not be modified directly. - * - * @constant - * @name Phaser.Math.Vector3.ONE - * @type {Phaser.Math.Vector3} - * @since 3.16.0 - */ -Vector3.ONE = new Vector3(1, 1, 1); - -module.exports = Vector3; - - /***/ }), /* 95 */ /***/ (function(module, exports, __webpack_require__) { @@ -18271,8 +18337,8 @@ var Class = __webpack_require__(0); var Contains = __webpack_require__(97); var GetPoint = __webpack_require__(398); var GetPoints = __webpack_require__(399); -var GEOM_CONST = __webpack_require__(47); -var Random = __webpack_require__(162); +var GEOM_CONST = __webpack_require__(48); +var Random = __webpack_require__(163); /** * @classdesc @@ -18693,12 +18759,12 @@ module.exports = Contains; var Actions = __webpack_require__(245); var Class = __webpack_require__(0); -var Events = __webpack_require__(90); +var Events = __webpack_require__(91); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); var IsPlainObject = __webpack_require__(7); var Range = __webpack_require__(392); -var Set = __webpack_require__(135); +var Set = __webpack_require__(139); var Sprite = __webpack_require__(75); /** @@ -21477,6 +21543,2458 @@ module.exports = Equal; /* 108 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var GetFastValue = __webpack_require__(2); +var Utils = __webpack_require__(10); + +/** + * @classdesc + * + * The `WebGLPipeline` is a base class used by all of the core Phaser pipelines. + * + * It describes the way elements will be rendered in WebGL. Internally, it handles + * compiling the shaders, creating vertex buffers, assigning primitive topolgy and + * binding vertex attributes, all based on the given configuration data. + * + * The pipeline is configured by passing in a `WebGLPipelineConfig` object. Please + * see the documentation for this type to fully understand the configuration options + * available to you. + * + * Usually, you would not extend from this class directly, but would instead extend + * from one of the core pipelines, such as the Multi Pipeline or Rope Pipeline. + * + * @class WebGLPipeline + * @memberof Phaser.Renderer.WebGL + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Types.Renderer.WebGL.WebGLPipelineConfig} config - The configuration object for this WebGL Pipeline. + */ +var WebGLPipeline = new Class({ + + initialize: + + function WebGLPipeline (config) + { + var game = config.game; + var renderer = game.renderer; + var gl = renderer.gl; + + /** + * Name of the pipeline. Used for identification. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#name + * @type {string} + * @since 3.0.0 + */ + this.name = GetFastValue(config, 'name', 'WebGLPipeline'); + + /** + * The Phaser Game instance to which this pipeline is bound. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#game + * @type {Phaser.Game} + * @since 3.0.0 + */ + this.game = game; + + /** + * The WebGL Renderer instance to which this pipeline is bound. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#renderer + * @type {Phaser.Renderer.WebGL.WebGLRenderer} + * @since 3.0.0 + */ + this.renderer = renderer; + + /** + * The WebGL context this WebGL Pipeline uses. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#gl + * @type {WebGLRenderingContext} + * @since 3.0.0 + */ + this.gl = gl; + + /** + * The canvas which this WebGL Pipeline renders to. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#view + * @type {HTMLCanvasElement} + * @since 3.0.0 + */ + this.view = game.canvas; + + /** + * The current game resolution. + * This is hard-coded to 1. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#resolution + * @type {number} + * @since 3.0.0 + */ + this.resolution = 1; + + /** + * Width of the current viewport. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#width + * @type {number} + * @since 3.0.0 + */ + this.width = 0; + + /** + * Height of the current viewport. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#height + * @type {number} + * @since 3.0.0 + */ + this.height = 0; + + /** + * The current number of vertices that have been added to the pipeline batch. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCount + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.vertexCount = 0; + + /** + * The total number of vertices that the pipeline batch can hold before it will flush. + * This defaults to `batchSize * 6`, where `batchSize` is defined in the Renderer Config. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCapacity + * @type {integer} + * @since 3.0.0 + */ + this.vertexCapacity = GetFastValue(config, 'vertexCapacity', renderer.config.batchSize * 6); + + /** + * The size in bytes of a vertex. + * + * Derived by adding together all of the vertex attributes. + * + * For example, the Texture Tint Pipeline has 2 + 2 + 1 + 1 + 4 for the attributes + * `inPosition` (size 2), `inTexCoord` (size 2), `inTexId` (size 1), `inTintEffect` (size 1) + * and `inTint` (size 4), for a total of 28, which is the default for this property. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexSize + * @type {integer} + * @since 3.0.0 + */ + this.vertexSize = GetFastValue(config, 'vertexSize', 28); + + /** + * Raw byte buffer of vertices. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexData + * @type {ArrayBuffer} + * @since 3.0.0 + */ + this.vertexData = GetFastValue(config, 'vertices', new ArrayBuffer(this.vertexCapacity * this.vertexSize)); + + /** + * The WebGLBuffer that holds the vertex data. + * Created from the `vertices` config ArrayBuffer that was passed in, or set by default, by the pipeline. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexBuffer + * @type {WebGLBuffer} + * @since 3.0.0 + */ + this.vertexBuffer = this.renderer.createVertexBuffer(this.vertexData.byteLength, this.gl.STREAM_DRAW); + + /** + * The handle to a WebGL program. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#program + * @type {WebGLProgram} + * @since 3.0.0 + */ + this.program = this.renderer.createProgram(config.vertShader, config.fragShader); + + /** + * Array of objects that describe the vertex attributes. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#attributes + * @type {Phaser.Types.Renderer.WebGL.WebGLPipelineAttributesConfig} + * @since 3.0.0 + */ + this.attributes = config.attributes; + + /** + * The primitive topology which the pipeline will use to submit draw calls. + * Defaults to GL_TRIANGLES if not otherwise set. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#topology + * @type {GLenum} + * @since 3.0.0 + */ + this.topology = GetFastValue(config, 'topology', gl.TRIANGLES); + + /** + * Uint8 view to the vertex raw buffer. Used for uploading vertex buffer resources to the GPU. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#bytes + * @type {Uint8Array} + * @since 3.0.0 + */ + this.bytes = new Uint8Array(this.vertexData); + + /** + * This will store the amount of components of 32 bit length. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexComponentCount + * @type {integer} + * @since 3.0.0 + */ + this.vertexComponentCount = Utils.getComponentCount(this.attributes, gl); + + /** + * Indicates if the current pipeline is flushing the contents to the GPU. + * When the variable is set the flush function will be locked. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#flushLocked + * @type {boolean} + * @since 3.1.0 + */ + this.flushLocked = false; + + /** + * Indicates if the current pipeline is active or not for this frame only. + * Reset in the onRender method. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#active + * @type {boolean} + * @since 3.10.0 + */ + this.active = false; + + /** + * Holds the most recently assigned texture unit. + * Treat this value as read-only. + * + * @name Phaser.Renderer.WebGL.Pipelines.WebGLPipeline#currentUnit + * @type {number} + * @since 3.50.0 + */ + this.currentUnit = 0; + + /** + * Some pipelines require the forced use of texture zero (like the light pipeline). + * This boolean should be set when that is the case. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#forceZero + * @type {boolean} + * @since 3.50.0 + */ + this.forceZero = false; + + /** + * Indicates if the current pipeline has booted or not. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#hasBooted + * @type {boolean} + * @readonly + * @since 3.50.0 + */ + this.hasBooted = false; + }, + + /** + * Called when the Game has fully booted and the Renderer has finished setting up. + * + * By this stage all Game level systems are now in place and you can perform any final + * tasks that the pipeline may need that relied on game systems such as the Texture Manager. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#boot + * @since 3.11.0 + */ + boot: function () + { + var gl = this.gl; + var vertexBuffer = this.vertexBuffer; + var attributes = this.attributes; + var program = this.program; + var renderer = this.renderer; + var vertexSize = this.vertexSize; + + renderer.setProgram(program); + renderer.setVertexBuffer(vertexBuffer); + + for (var i = 0; i < attributes.length; i++) + { + var element = attributes[i]; + var location = gl.getAttribLocation(program, element.name); + + if (location >= 0) + { + gl.enableVertexAttribArray(location); + gl.vertexAttribPointer(location, element.size, element.type, element.normalized, vertexSize, element.offset); + element.enabled = true; + element.location = location; + } + else if (location !== -1) + { + gl.disableVertexAttribArray(location); + } + } + + this.hasBooted = true; + + return this; + }, + + /** + * Custom pipelines can use this method in order to perform any required pre-batch tasks + * for the given Game Object. It must return the texture unit the Game Object was assigned. + * + * @method Phaser.Renderer.WebGL.Pipelines.WebGLPipeline#setGameObject + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object being rendered or added to the batch. + * @param {Phaser.Textures.Frame} [frame] - Optional frame to use. Can override that of the Game Object. + * + * @return {number} The texture unit the Game Object has been assigned. + */ + setGameObject: function (gameObject, frame) + { + if (frame === undefined) { frame = gameObject.frame; } + + this.currentUnit = this.renderer.setTextureSource(frame.source); + + return this.currentUnit; + }, + + /** + * Adds a description of vertex attribute to the pipeline + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#addAttribute + * @since 3.2.0 + * + * @param {string} name - Name of the vertex attribute + * @param {integer} size - Vertex component size + * @param {integer} type - Type of the attribute + * @param {boolean} normalized - Is the value normalized to a range + * @param {integer} offset - Byte offset to the beginning of the first element in the vertex + * + * @return {this} This WebGLPipeline instance. + */ + addAttribute: function (name, size, type, normalized, offset) + { + this.attributes.push({ + name: name, + size: size, + type: this.renderer.glFormats[type], + normalized: normalized, + offset: offset, + enabled: false, + location: -1 + }); + + this.vertexComponentCount = Utils.getComponentCount( + this.attributes, + this.gl + ); + return this; + }, + + /** + * Check if the current batch of vertices is full. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#shouldFlush + * @since 3.0.0 + * + * @return {boolean} `true` if the current batch should be flushed, otherwise `false`. + */ + shouldFlush: function () + { + return (this.vertexCount >= this.vertexCapacity); + }, + + /** + * Resizes the properties used to describe the viewport + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#resize + * @since 3.0.0 + * + * @param {number} width - The new width of this WebGL Pipeline. + * @param {number} height - The new height of this WebGL Pipeline. + * @param {number} resolution - The resolution this WebGL Pipeline should be resized to. + * + * @return {this} This WebGLPipeline instance. + */ + resize: function (width, height, resolution) + { + this.width = width * resolution; + this.height = height * resolution; + this.resolution = resolution; + + return this; + }, + + /** + * Binds the pipeline resources, including the program, vertex buffer and attribute pointers. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#bind + * @since 3.0.0 + * + * @return {this} This WebGLPipeline instance. + */ + bind: function () + { + var vertexBuffer = this.vertexBuffer; + var program = this.program; + var renderer = this.renderer; + + renderer.setProgram(program); + renderer.setVertexBuffer(vertexBuffer); + + this.setAttribPointers(); + + return this; + }, + + /** + * Sets the vertex attribute pointers. + * This should only be called after the vertex buffer has been bound. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setAttribPointers + * @since 3.50.0 + * + * @return {this} This WebGLPipeline instance. + */ + setAttribPointers: function () + { + var gl = this.gl; + var attributes = this.attributes; + var vertexSize = this.vertexSize; + + for (var i = 0; i < attributes.length; i++) + { + var element = attributes[i]; + + if (element.enabled) + { + gl.vertexAttribPointer(element.location, element.size, element.type, element.normalized, vertexSize, element.offset); + } + else if (!element.enabled && element.location > -1) + { + gl.disableVertexAttribArray(element.location); + element.location = -1; + } + } + }, + + /** + * Set whenever this WebGL Pipeline is bound to a WebGL Renderer. + * + * This method is called every time the WebGL Pipeline is attempted to be bound, even if it already is the current pipeline. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#onBind + * @since 3.0.0 + * + * @return {this} This WebGLPipeline instance. + */ + onBind: function () + { + // This is for updating uniform data it's called on each bind attempt. + return this; + }, + + /** + * Called before each frame is rendered, but after the canvas has been cleared. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#onPreRender + * @since 3.0.0 + * + * @return {this} This WebGLPipeline instance. + */ + onPreRender: function () + { + // called once every frame + return this; + }, + + /** + * Called before a Scene's Camera is rendered. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#onRender + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - The Scene being rendered. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera being rendered with. + * + * @return {this} This WebGLPipeline instance. + */ + onRender: function () + { + // called for each camera + return this; + }, + + /** + * Called after each frame has been completely rendered and snapshots have been taken. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#onPostRender + * @since 3.0.0 + * + * @return {this} This WebGLPipeline instance. + */ + onPostRender: function () + { + // called once every frame + return this; + }, + + /** + * Uploads the vertex data and emits a draw call + * for the current batch of vertices. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#flush + * @since 3.0.0 + * + * @return {this} This WebGLPipeline instance. + */ + flush: function () + { + if (this.flushLocked) { return this; } + + this.flushLocked = true; + + var gl = this.gl; + var vertexCount = this.vertexCount; + var topology = this.topology; + var vertexSize = this.vertexSize; + + if (vertexCount === 0) + { + this.flushLocked = false; + return; + } + + gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize)); + gl.drawArrays(topology, 0, vertexCount); + + this.vertexCount = 0; + this.flushLocked = false; + + return this; + }, + + /** + * Removes all object references in this WebGL Pipeline and removes its program from the WebGL context. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#destroy + * @since 3.0.0 + * + * @return {this} This WebGLPipeline instance. + */ + destroy: function () + { + var gl = this.gl; + + gl.deleteProgram(this.program); + gl.deleteBuffer(this.vertexBuffer); + + delete this.program; + delete this.vertexBuffer; + delete this.gl; + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat1 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {number} x - The new value of the `float` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat1: function (name, x) + { + this.renderer.setFloat1(this.program, name, x); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat2 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {number} x - The new X component of the `vec2` uniform. + * @param {number} y - The new Y component of the `vec2` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat2: function (name, x, y) + { + this.renderer.setFloat2(this.program, name, x, y); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat3 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {number} x - The new X component of the `vec3` uniform. + * @param {number} y - The new Y component of the `vec3` uniform. + * @param {number} z - The new Z component of the `vec3` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat3: function (name, x, y, z) + { + this.renderer.setFloat3(this.program, name, x, y, z); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat4 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {number} x - X component of the uniform + * @param {number} y - Y component of the uniform + * @param {number} z - Z component of the uniform + * @param {number} w - W component of the uniform + * + * @return {this} This WebGLPipeline instance. + */ + setFloat4: function (name, x, y, z, w) + { + this.renderer.setFloat4(this.program, name, x, y, z, w); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat1v + * @since 3.13.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {Float32Array} arr - The new value to be used for the uniform variable. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat1v: function (name, arr) + { + this.renderer.setFloat1v(this.program, name, arr); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat2v + * @since 3.13.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {Float32Array} arr - The new value to be used for the uniform variable. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat2v: function (name, arr) + { + this.renderer.setFloat2v(this.program, name, arr); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat3v + * @since 3.13.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {Float32Array} arr - The new value to be used for the uniform variable. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat3v: function (name, arr) + { + this.renderer.setFloat3v(this.program, name, arr); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat4v + * @since 3.13.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {Float32Array} arr - The new value to be used for the uniform variable. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat4v: function (name, arr) + { + this.renderer.setFloat4v(this.program, name, arr); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt1 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {integer} x - The new value of the `int` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setInt1: function (name, x) + { + this.renderer.setInt1(this.program, name, x); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt2 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {integer} x - The new X component of the `ivec2` uniform. + * @param {integer} y - The new Y component of the `ivec2` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setInt2: function (name, x, y) + { + this.renderer.setInt2(this.program, name, x, y); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt3 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {integer} x - The new X component of the `ivec3` uniform. + * @param {integer} y - The new Y component of the `ivec3` uniform. + * @param {integer} z - The new Z component of the `ivec3` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setInt3: function (name, x, y, z) + { + this.renderer.setInt3(this.program, name, x, y, z); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt4 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {integer} x - X component of the uniform + * @param {integer} y - Y component of the uniform + * @param {integer} z - Z component of the uniform + * @param {integer} w - W component of the uniform + * + * @return {this} This WebGLPipeline instance. + */ + setInt4: function (name, x, y, z, w) + { + this.renderer.setInt4(this.program, name, x, y, z, w); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix2 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {boolean} transpose - Whether to transpose the matrix. Should be `false`. + * @param {Float32Array} matrix - The new values for the `mat2` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setMatrix2: function (name, transpose, matrix) + { + this.renderer.setMatrix2(this.program, name, transpose, matrix); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix3 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {boolean} transpose - Whether to transpose the matrix. Should be `false`. + * @param {Float32Array} matrix - The new values for the `mat3` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setMatrix3: function (name, transpose, matrix) + { + this.renderer.setMatrix3(this.program, name, transpose, matrix); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix4 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {boolean} transpose - Should the matrix be transpose + * @param {Float32Array} matrix - Matrix data + * + * @return {this} This WebGLPipeline instance. + */ + setMatrix4: function (name, transpose, matrix) + { + this.renderer.setMatrix4(this.program, name, transpose, matrix); + + return this; + } + +}); + +module.exports = WebGLPipeline; + + +/***/ }), +/* 109 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var Earcut = __webpack_require__(66); +var GetFastValue = __webpack_require__(2); +var ModelViewProjection = __webpack_require__(110); +var ProjectOrtho = __webpack_require__(181); +var ShaderSourceFS = __webpack_require__(793); +var ShaderSourceVS = __webpack_require__(794); +var TransformMatrix = __webpack_require__(30); +var Utils = __webpack_require__(10); +var WebGLPipeline = __webpack_require__(108); + +/** + * @classdesc + * + * The Multi Pipeline is the core 2D texture rendering pipeline used by Phaser in WebGL. + * Virtually all Game Objects use this pipeline by default, including Sprites, Graphics + * and Tilemaps. It handles the batching of quads and tris, as well as methods for + * drawing and batching geometry data. + * + * Prior to Phaser v3.50 this pipeline was called the `TextureTintPipeline`. + * + * In previous versions of Phaser only one single texture unit was supported at any one time. + * The Multi Pipeline is an evolution of the old Texture Tint Pipeline, updated to support + * multi-textures for increased performance. + * + * The fragment shader it uses can be found in `shaders/src/Multi.frag`. + * The vertex shader it uses can be found in `shaders/src/Multi.vert`. + * + * The default shader attributes for this pipeline are: + * + * `inPosition` (vec2, offset 0) + * `inTexCoord` (vec2, offset 8) + * `inTexId` (float, offset 16) + * `inTintEffect` (float, offset 20) + * `inTint` (vec4, offset 24, normalized) + * + * The default shader uniforms for this pipeline are: + * + * `uProjectionMatrix` (mat4) + * `uViewMatrix` (mat4) + * `uModelMatrix` (mat4) + * `uMainSampler` (sampler2D array) + * + * If you wish to create a custom pipeline extending from this one, you can use two string + * declarations in your fragment shader source: `%count%` and `%forloop%`, where `count` is + * used to set the number of `sampler2Ds` available, and `forloop` is a block of GLSL code + * that will get the currently bound texture unit. + * + * This pipeline will automatically inject that code for you, should those values exist + * in your shader source. If you wish to handle this yourself, you can also use the + * function `Utils.parseFragmentShaderMaxTextures`. + * + * If you wish to create a pipeline that works from a single texture, or that doesn't have + * internal texture iteration, please see the `SinglePipeline` instead. + * + * @class MultiPipeline + * @extends Phaser.Renderer.WebGL.WebGLPipeline + * @memberof Phaser.Renderer.WebGL.Pipelines + * @constructor + * @since 3.50.0 + * + * @param {Phaser.Types.Renderer.WebGL.WebGLPipelineConfig} config - The configuration options for this pipeline. + */ +var MultiPipeline = new Class({ + + Extends: WebGLPipeline, + + Mixins: [ + ModelViewProjection + ], + + initialize: + + function MultiPipeline (config) + { + var renderer = config.game.renderer; + var gl = renderer.gl; + + var fragmentShaderSource = GetFastValue(config, 'fragShader', ShaderSourceFS); + + // Vertex Size = attribute size added together (2 + 2 + 1 + 1 + 4) inc maxTextures + + config.fragShader = Utils.parseFragmentShaderMaxTextures(fragmentShaderSource, renderer.maxTextures); + config.vertShader = GetFastValue(config, 'vertShader', ShaderSourceVS); + config.attributes = GetFastValue(config, 'attributes', [ + { + name: 'inPosition', + size: 2, + type: gl.FLOAT, + normalized: false, + offset: 0, + enabled: false, + location: -1 + }, + { + name: 'inTexCoord', + size: 2, + type: gl.FLOAT, + normalized: false, + offset: 8, + enabled: false, + location: -1 + }, + { + name: 'inTexId', + size: 1, + type: gl.FLOAT, + normalized: false, + offset: 16, + enabled: false, + location: -1 + }, + { + name: 'inTintEffect', + size: 1, + type: gl.FLOAT, + normalized: false, + offset: 20, + enabled: false, + location: -1 + }, + { + name: 'inTint', + size: 4, + type: gl.UNSIGNED_BYTE, + normalized: true, + offset: 24, + enabled: false, + location: -1 + } + ]); + + WebGLPipeline.call(this, config); + + /** + * Float32 view of the array buffer containing the pipeline's vertices. + * + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#vertexViewF32 + * @type {Float32Array} + * @since 3.0.0 + */ + this.vertexViewF32 = new Float32Array(this.vertexData); + + /** + * Uint32 view of the array buffer containing the pipeline's vertices. + * + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#vertexViewU32 + * @type {Uint32Array} + * @since 3.0.0 + */ + this.vertexViewU32 = new Uint32Array(this.vertexData); + + /** + * A temporary Transform Matrix, re-used internally during batching. + * + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#_tempMatrix1 + * @private + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @since 3.11.0 + */ + this._tempMatrix1 = new TransformMatrix(); + + /** + * A temporary Transform Matrix, re-used internally during batching. + * + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#_tempMatrix2 + * @private + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @since 3.11.0 + */ + this._tempMatrix2 = new TransformMatrix(); + + /** + * A temporary Transform Matrix, re-used internally during batching. + * + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#_tempMatrix3 + * @private + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @since 3.11.0 + */ + this._tempMatrix3 = new TransformMatrix(); + + /** + * A temporary Transform Matrix, re-used internally during batching. + * + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#_tempMatrix4 + * @private + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @since 3.11.0 + */ + this._tempMatrix4 = new TransformMatrix(); + + /** + * Used internally to draw stroked triangles. + * + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#tempTriangle + * @type {array} + * @private + * @since 3.12.0 + */ + 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 } + ]; + + /** + * The tint effect to be applied by the shader in the next geometry draw: + * + * 0 = texture multiplied by color + * 1 = solid color + texture alpha + * 2 = solid color, no texture + * 3 = solid texture, no color + * + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#tintEffect + * @type {number} + * @private + * @since 3.12.0 + */ + this.tintEffect = 2; + + /** + * Cached stroke tint. + * + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#strokeTint + * @type {object} + * @private + * @since 3.12.0 + */ + this.strokeTint = { TL: 0, TR: 0, BL: 0, BR: 0 }; + + /** + * Cached fill tint. + * + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#fillTint + * @type {object} + * @private + * @since 3.12.0 + */ + this.fillTint = { TL: 0, TR: 0, BL: 0, BR: 0 }; + + /** + * Internal texture frame reference. + * + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#currentFrame + * @type {Phaser.Textures.Frame} + * @private + * @since 3.12.0 + */ + this.currentFrame = { u0: 0, v0: 0, u1: 1, v1: 1 }; + + /** + * Internal path quad cache. + * + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#firstQuad + * @type {array} + * @private + * @since 3.12.0 + */ + this.firstQuad = [ 0, 0, 0, 0, 0 ]; + + /** + * Internal path quad cache. + * + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#prevQuad + * @type {array} + * @private + * @since 3.12.0 + */ + this.prevQuad = [ 0, 0, 0, 0, 0 ]; + + /** + * Used internally for triangulating a polygon. + * + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#polygonCache + * @type {array} + * @private + * @since 3.12.0 + */ + this.polygonCache = []; + + this.mvpInit(); + }, + + /** + * Called every time the pipeline is bound by the renderer. + * Sets the shader program, vertex buffer and other resources. + * Should only be called when changing pipeline. + * + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#bind + * @since 3.50.0 + * + * @return {this} This WebGLPipeline instance. + */ + bind: function () + { + WebGLPipeline.prototype.bind.call(this); + + this.renderer.setInt1iv(this.program, 'uMainSampler', this.renderer.textureIndexes); + + return this; + }, + + /** + * Called every time a Game Object needs to use this pipeline. + * + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#onBind + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} [gameObject] - The Game Object that invoked this pipeline, if any. + * + * @return {this} This WebGLPipeline instance. + */ + onBind: function () + { + this.mvpUpdate(); + + return this; + }, + + /** + * Resizes this pipeline and updates the projection. + * + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#resize + * @since 3.0.0 + * + * @param {number} width - The new width. + * @param {number} height - The new height. + * @param {number} resolution - The resolution. + * + * @return {this} This WebGLPipeline instance. + */ + resize: function (width, height, resolution) + { + WebGLPipeline.prototype.resize.call(this, width, height, resolution); + + ProjectOrtho(this, 0, this.width, this.height, 0, -1000, 1000); + + return this; + }, + + /** + * Assigns a texture to the current batch. If a different texture is already set it creates a new batch object. + * + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#setTexture2D + * @since 3.1.0 + * + * @param {WebGLTexture} [texture] - WebGLTexture that will be assigned to the current batch. If not given uses blankTexture. + * + * @return {number} The assigned texture unit. + */ + setTexture2D: function (texture) + { + if (texture === undefined) { texture = this.renderer.blankTexture.glTexture; } + + this.currentUnit = this.renderer.setTexture2D(texture); + + return this.currentUnit; + }, + + /** + * Uploads the vertex data and emits a draw call for the current batch of vertices. + * + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#flush + * @since 3.0.0 + * + * @return {this} This WebGLPipeline instance. + */ + flush: function () + { + var gl = this.gl; + var vertexCount = this.vertexCount; + var vertexSize = this.vertexSize; + + if (vertexCount > 0) + { + if (vertexCount === this.vertexCapacity) + { + gl.bufferData(gl.ARRAY_BUFFER, this.vertexData, gl.DYNAMIC_DRAW); + } + else + { + gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize)); + } + + gl.drawArrays(this.topology, 0, vertexCount); + + this.vertexCount = 0; + } + + return this; + }, + + /** + * Takes a Sprite Game Object, or any object that extends it, and adds it to the batch. + * + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchSprite + * @since 3.0.0 + * + * @param {(Phaser.GameObjects.Image|Phaser.GameObjects.Sprite)} sprite - The texture based Game Object to add to the batch. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to use for the rendering transform. + * @param {Phaser.GameObjects.Components.TransformMatrix} [parentTransformMatrix] - The transform matrix of the parent container, if set. + */ + batchSprite: function (sprite, camera, parentTransformMatrix) + { + // Will cause a flush if this isn't the current pipeline, vertexbuffer or program + this.renderer.setPipeline(this); + + var camMatrix = this._tempMatrix1; + var spriteMatrix = this._tempMatrix2; + var calcMatrix = this._tempMatrix3; + + var frame = sprite.frame; + var texture = frame.glTexture; + + var u0 = frame.u0; + var v0 = frame.v0; + var u1 = frame.u1; + var v1 = frame.v1; + var frameX = frame.x; + var frameY = frame.y; + var frameWidth = frame.cutWidth; + var frameHeight = frame.cutHeight; + var customPivot = frame.customPivot; + + var displayOriginX = sprite.displayOriginX; + var displayOriginY = sprite.displayOriginY; + + var x = -displayOriginX + frameX; + var y = -displayOriginY + frameY; + + if (sprite.isCropped) + { + var crop = sprite._crop; + + if (crop.flipX !== sprite.flipX || crop.flipY !== sprite.flipY) + { + frame.updateCropUVs(crop, sprite.flipX, sprite.flipY); + } + + u0 = crop.u0; + v0 = crop.v0; + u1 = crop.u1; + v1 = crop.v1; + + frameWidth = crop.width; + frameHeight = crop.height; + + frameX = crop.x; + frameY = crop.y; + + x = -displayOriginX + frameX; + y = -displayOriginY + frameY; + } + + var flipX = 1; + var flipY = 1; + + if (sprite.flipX) + { + if (!customPivot) + { + x += (-frame.realWidth + (displayOriginX * 2)); + } + + flipX = -1; + } + + // Auto-invert the flipY if this is coming from a GLTexture + if (sprite.flipY || (frame.source.isGLTexture && !texture.flipY)) + { + if (!customPivot) + { + y += (-frame.realHeight + (displayOriginY * 2)); + } + + flipY = -1; + } + + spriteMatrix.applyITRS(sprite.x, sprite.y, sprite.rotation, sprite.scaleX * flipX, sprite.scaleY * flipY); + + camMatrix.copyFrom(camera.matrix); + + if (parentTransformMatrix) + { + // Multiply the camera by the parent matrix + camMatrix.multiplyWithOffset(parentTransformMatrix, -camera.scrollX * sprite.scrollFactorX, -camera.scrollY * sprite.scrollFactorY); + + // Undo the camera scroll + spriteMatrix.e = sprite.x; + spriteMatrix.f = sprite.y; + + // Multiply by the Sprite matrix, store result in calcMatrix + camMatrix.multiply(spriteMatrix, calcMatrix); + } + else + { + spriteMatrix.e -= camera.scrollX * sprite.scrollFactorX; + spriteMatrix.f -= camera.scrollY * sprite.scrollFactorY; + + // Multiply by the Sprite matrix, store result in calcMatrix + camMatrix.multiply(spriteMatrix, calcMatrix); + } + + var xw = x + frameWidth; + var yh = y + frameHeight; + + var tx0 = calcMatrix.getX(x, y); + var ty0 = calcMatrix.getY(x, y); + + var tx1 = calcMatrix.getX(x, yh); + var ty1 = calcMatrix.getY(x, yh); + + var tx2 = calcMatrix.getX(xw, yh); + var ty2 = calcMatrix.getY(xw, yh); + + var tx3 = calcMatrix.getX(xw, y); + var ty3 = calcMatrix.getY(xw, y); + + var tintTL = Utils.getTintAppendFloatAlpha(sprite._tintTL, camera.alpha * sprite._alphaTL); + var tintTR = Utils.getTintAppendFloatAlpha(sprite._tintTR, camera.alpha * sprite._alphaTR); + var tintBL = Utils.getTintAppendFloatAlpha(sprite._tintBL, camera.alpha * sprite._alphaBL); + var tintBR = Utils.getTintAppendFloatAlpha(sprite._tintBR, camera.alpha * sprite._alphaBR); + + if (camera.roundPixels) + { + tx0 = Math.round(tx0); + ty0 = Math.round(ty0); + + tx1 = Math.round(tx1); + ty1 = Math.round(ty1); + + tx2 = Math.round(tx2); + ty2 = Math.round(ty2); + + tx3 = Math.round(tx3); + ty3 = Math.round(ty3); + } + + // So batchQuad never assigns a unit to the glTexture, but to the textureSource instead + if (this.vertexCount + 6 > this.vertexCapacity) + { + this.flush(); + } + + var unit = this.setGameObject(sprite); + + var tintEffect = (sprite._isTinted && sprite.tintFill); + + this.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, unit); + }, + + /** + * Adds the vertices data into the batch and flushes if full. + * + * Assumes 6 vertices in the following arrangement: + * + * ``` + * 0----3 + * |\ B| + * | \ | + * | \ | + * | A \| + * | \ + * 1----2 + * ``` + * + * Where tx0/ty0 = 0, tx1/ty1 = 1, tx2/ty2 = 2 and tx3/ty3 = 3 + * + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchQuad + * @since 3.12.0 + * + * @param {number} x0 - The top-left x position. + * @param {number} y0 - The top-left y position. + * @param {number} x1 - The bottom-left x position. + * @param {number} y1 - The bottom-left y position. + * @param {number} x2 - The bottom-right x position. + * @param {number} y2 - The bottom-right y position. + * @param {number} x3 - The top-right x position. + * @param {number} y3 - The top-right y position. + * @param {number} u0 - UV u0 value. + * @param {number} v0 - UV v0 value. + * @param {number} u1 - UV u1 value. + * @param {number} v1 - UV v1 value. + * @param {number} tintTL - The top-left tint color value. + * @param {number} tintTR - The top-right tint color value. + * @param {number} tintBL - The bottom-left tint color value. + * @param {number} tintBR - The bottom-right tint color value. + * @param {(number|boolean)} tintEffect - The tint effect for the shader to use. + * @param {WebGLTexture} [texture] - WebGLTexture that will be assigned to the current batch if a flush occurs. + * @param {integer} [unit=0] - Texture unit to which the texture needs to be bound. + * + * @return {boolean} `true` if this method caused the batch to flush, otherwise `false`. + */ + batchQuad: function (x0, y0, x1, y1, x2, y2, x3, y3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, unit) + { + if (unit === undefined) { unit = this.currentUnit; } + + var hasFlushed = false; + + if (this.vertexCount + 6 > this.vertexCapacity) + { + this.flush(); + + hasFlushed = true; + + unit = this.setTexture2D(texture); + } + + var vertexViewF32 = this.vertexViewF32; + var vertexViewU32 = this.vertexViewU32; + + var vertexOffset = (this.vertexCount * this.vertexComponentCount) - 1; + + vertexViewF32[++vertexOffset] = x0; + vertexViewF32[++vertexOffset] = y0; + vertexViewF32[++vertexOffset] = u0; + vertexViewF32[++vertexOffset] = v0; + vertexViewF32[++vertexOffset] = unit; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintTL; + + vertexViewF32[++vertexOffset] = x1; + vertexViewF32[++vertexOffset] = y1; + vertexViewF32[++vertexOffset] = u0; + vertexViewF32[++vertexOffset] = v1; + vertexViewF32[++vertexOffset] = unit; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintBL; + + vertexViewF32[++vertexOffset] = x2; + vertexViewF32[++vertexOffset] = y2; + vertexViewF32[++vertexOffset] = u1; + vertexViewF32[++vertexOffset] = v1; + vertexViewF32[++vertexOffset] = unit; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintBR; + + vertexViewF32[++vertexOffset] = x0; + vertexViewF32[++vertexOffset] = y0; + vertexViewF32[++vertexOffset] = u0; + vertexViewF32[++vertexOffset] = v0; + vertexViewF32[++vertexOffset] = unit; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintTL; + + vertexViewF32[++vertexOffset] = x2; + vertexViewF32[++vertexOffset] = y2; + vertexViewF32[++vertexOffset] = u1; + vertexViewF32[++vertexOffset] = v1; + vertexViewF32[++vertexOffset] = unit; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintBR; + + vertexViewF32[++vertexOffset] = x3; + vertexViewF32[++vertexOffset] = y3; + vertexViewF32[++vertexOffset] = u1; + vertexViewF32[++vertexOffset] = v0; + vertexViewF32[++vertexOffset] = unit; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintTR; + + this.vertexCount += 6; + + return hasFlushed; + }, + + /** + * Adds the vertices data into the batch and flushes if full. + * + * Assumes 3 vertices in the following arrangement: + * + * ``` + * 0 + * |\ + * | \ + * | \ + * | \ + * | \ + * 1-----2 + * ``` + * + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchTri + * @since 3.12.0 + * + * @param {number} x1 - The bottom-left x position. + * @param {number} y1 - The bottom-left y position. + * @param {number} x2 - The bottom-right x position. + * @param {number} y2 - The bottom-right y position. + * @param {number} x3 - The top-right x position. + * @param {number} y3 - The top-right y position. + * @param {number} u0 - UV u0 value. + * @param {number} v0 - UV v0 value. + * @param {number} u1 - UV u1 value. + * @param {number} v1 - UV v1 value. + * @param {number} tintTL - The top-left tint color value. + * @param {number} tintTR - The top-right tint color value. + * @param {number} tintBL - The bottom-left tint color value. + * @param {(number|boolean)} tintEffect - The tint effect for the shader to use. + * @param {WebGLTexture} [texture] - WebGLTexture that will be assigned to the current batch if a flush occurs. + * @param {integer} [unit=0] - Texture unit to which the texture needs to be bound. + * + * @return {boolean} `true` if this method caused the batch to flush, otherwise `false`. + */ + batchTri: function (x1, y1, x2, y2, x3, y3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintEffect, texture, unit) + { + if (unit === undefined) { unit = this.currentUnit; } + + var hasFlushed = false; + + if (this.vertexCount + 3 > this.vertexCapacity) + { + this.flush(); + + hasFlushed = true; + + unit = this.setTexture2D(texture); + } + + var vertexViewF32 = this.vertexViewF32; + var vertexViewU32 = this.vertexViewU32; + + var vertexOffset = (this.vertexCount * this.vertexComponentCount) - 1; + + vertexViewF32[++vertexOffset] = x1; + vertexViewF32[++vertexOffset] = y1; + vertexViewF32[++vertexOffset] = u0; + vertexViewF32[++vertexOffset] = v0; + vertexViewF32[++vertexOffset] = unit; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintTL; + + vertexViewF32[++vertexOffset] = x2; + vertexViewF32[++vertexOffset] = y2; + vertexViewF32[++vertexOffset] = u0; + vertexViewF32[++vertexOffset] = v1; + vertexViewF32[++vertexOffset] = unit; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintTR; + + vertexViewF32[++vertexOffset] = x3; + vertexViewF32[++vertexOffset] = y3; + vertexViewF32[++vertexOffset] = u1; + vertexViewF32[++vertexOffset] = v1; + vertexViewF32[++vertexOffset] = unit; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintBL; + + this.vertexCount += 3; + + return hasFlushed; + }, + + /** + * Generic function for batching a textured quad using argument values instead of a Game Object. + * + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchTexture + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - Source GameObject. + * @param {WebGLTexture} texture - Raw WebGLTexture associated with the quad. + * @param {integer} textureWidth - Real texture width. + * @param {integer} textureHeight - Real texture height. + * @param {number} srcX - X coordinate of the quad. + * @param {number} srcY - Y coordinate of the quad. + * @param {number} srcWidth - Width of the quad. + * @param {number} srcHeight - Height of the quad. + * @param {number} scaleX - X component of scale. + * @param {number} scaleY - Y component of scale. + * @param {number} rotation - Rotation of the quad. + * @param {boolean} flipX - Indicates if the quad is horizontally flipped. + * @param {boolean} flipY - Indicates if the quad is vertically flipped. + * @param {number} scrollFactorX - By which factor is the quad affected by the camera horizontal scroll. + * @param {number} scrollFactorY - By which factor is the quad effected by the camera vertical scroll. + * @param {number} displayOriginX - Horizontal origin in pixels. + * @param {number} displayOriginY - Vertical origin in pixels. + * @param {number} frameX - X coordinate of the texture frame. + * @param {number} frameY - Y coordinate of the texture frame. + * @param {number} frameWidth - Width of the texture frame. + * @param {number} frameHeight - Height of the texture frame. + * @param {integer} tintTL - Tint for top left. + * @param {integer} tintTR - Tint for top right. + * @param {integer} tintBL - Tint for bottom left. + * @param {integer} tintBR - Tint for bottom right. + * @param {number} tintEffect - The tint effect. + * @param {number} uOffset - Horizontal offset on texture coordinate. + * @param {number} vOffset - Vertical offset on texture coordinate. + * @param {Phaser.Cameras.Scene2D.Camera} camera - Current used camera. + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - Parent container. + * @param {boolean} [skipFlip=false] - Skip the renderTexture check. + * @param {number} [textureUnit] - Use the currently bound texture unit? + */ + batchTexture: function ( + gameObject, + texture, + textureWidth, textureHeight, + srcX, srcY, + srcWidth, srcHeight, + scaleX, scaleY, + rotation, + flipX, flipY, + scrollFactorX, scrollFactorY, + displayOriginX, displayOriginY, + frameX, frameY, frameWidth, frameHeight, + tintTL, tintTR, tintBL, tintBR, tintEffect, + uOffset, vOffset, + camera, + parentTransformMatrix, + skipFlip, + textureUnit) + { + var renderer = this.renderer; + + renderer.setPipeline(this, gameObject); + + var camMatrix = this._tempMatrix1; + var spriteMatrix = this._tempMatrix2; + var calcMatrix = this._tempMatrix3; + + var u0 = (frameX / textureWidth) + uOffset; + var v0 = (frameY / textureHeight) + vOffset; + var u1 = (frameX + frameWidth) / textureWidth + uOffset; + var v1 = (frameY + frameHeight) / textureHeight + vOffset; + + var width = srcWidth; + var height = srcHeight; + + var x = -displayOriginX; + var y = -displayOriginY; + + if (gameObject.isCropped) + { + var crop = gameObject._crop; + + width = crop.width; + height = crop.height; + + srcWidth = crop.width; + srcHeight = crop.height; + + frameX = crop.x; + frameY = crop.y; + + var ox = frameX; + var oy = frameY; + + if (flipX) + { + ox = (frameWidth - crop.x - crop.width); + } + + if (flipY && !texture.isRenderTexture) + { + oy = (frameHeight - crop.y - crop.height); + } + + u0 = (ox / textureWidth) + uOffset; + v0 = (oy / textureHeight) + vOffset; + u1 = (ox + crop.width) / textureWidth + uOffset; + v1 = (oy + crop.height) / textureHeight + vOffset; + + x = -displayOriginX + frameX; + y = -displayOriginY + frameY; + } + + // Invert the flipY if this is a RenderTexture + flipY = flipY ^ (!skipFlip && texture.isRenderTexture ? 1 : 0); + + if (flipX) + { + width *= -1; + x += srcWidth; + } + + if (flipY) + { + height *= -1; + y += srcHeight; + } + + var xw = x + width; + var yh = y + height; + + spriteMatrix.applyITRS(srcX, srcY, rotation, scaleX, scaleY); + + camMatrix.copyFrom(camera.matrix); + + if (parentTransformMatrix) + { + // Multiply the camera by the parent matrix + camMatrix.multiplyWithOffset(parentTransformMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY); + + // Undo the camera scroll + spriteMatrix.e = srcX; + spriteMatrix.f = srcY; + + // Multiply by the Sprite matrix, store result in calcMatrix + camMatrix.multiply(spriteMatrix, calcMatrix); + } + else + { + spriteMatrix.e -= camera.scrollX * scrollFactorX; + spriteMatrix.f -= camera.scrollY * scrollFactorY; + + // Multiply by the Sprite matrix, store result in calcMatrix + camMatrix.multiply(spriteMatrix, calcMatrix); + } + + var tx0 = calcMatrix.getX(x, y); + var ty0 = calcMatrix.getY(x, y); + + var tx1 = calcMatrix.getX(x, yh); + var ty1 = calcMatrix.getY(x, yh); + + var tx2 = calcMatrix.getX(xw, yh); + var ty2 = calcMatrix.getY(xw, yh); + + var tx3 = calcMatrix.getX(xw, y); + var ty3 = calcMatrix.getY(xw, y); + + if (camera.roundPixels) + { + tx0 = Math.round(tx0); + ty0 = Math.round(ty0); + + tx1 = Math.round(tx1); + ty1 = Math.round(ty1); + + tx2 = Math.round(tx2); + ty2 = Math.round(ty2); + + tx3 = Math.round(tx3); + ty3 = Math.round(ty3); + } + + if (textureUnit === undefined) + { + textureUnit = this.renderer.setTexture2D(texture); + } + + this.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, textureUnit); + }, + + /** + * Adds a Texture Frame into the batch for rendering. + * + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchTextureFrame + * @since 3.12.0 + * + * @param {Phaser.Textures.Frame} frame - The Texture Frame to be rendered. + * @param {number} x - The horizontal position to render the texture at. + * @param {number} y - The vertical position to render the texture at. + * @param {number} tint - The tint color. + * @param {number} alpha - The alpha value. + * @param {Phaser.GameObjects.Components.TransformMatrix} transformMatrix - The Transform Matrix to use for the texture. + * @param {Phaser.GameObjects.Components.TransformMatrix} [parentTransformMatrix] - A parent Transform Matrix. + */ + batchTextureFrame: function ( + frame, + x, y, + tint, alpha, + transformMatrix, + parentTransformMatrix + ) + { + this.renderer.setPipeline(this); + + var spriteMatrix = this._tempMatrix1.copyFrom(transformMatrix); + var calcMatrix = this._tempMatrix2; + + var xw = x + frame.width; + var yh = y + frame.height; + + if (parentTransformMatrix) + { + spriteMatrix.multiply(parentTransformMatrix, calcMatrix); + } + else + { + calcMatrix = spriteMatrix; + } + + var tx0 = calcMatrix.getX(x, y); + var ty0 = calcMatrix.getY(x, y); + + var tx1 = calcMatrix.getX(x, yh); + var ty1 = calcMatrix.getY(x, yh); + + var tx2 = calcMatrix.getX(xw, yh); + var ty2 = calcMatrix.getY(xw, yh); + + var tx3 = calcMatrix.getX(xw, y); + var ty3 = calcMatrix.getY(xw, y); + + // this.setTexture2D(frame.glTexture, 0); + var unit = this.renderer.setTextureSource(frame.source); + + tint = Utils.getTintAppendFloatAlpha(tint, alpha); + + this.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, frame.u0, frame.v0, frame.u1, frame.v1, tint, tint, tint, tint, 0, frame.glTexture, unit); + }, + + /** + * Pushes a filled rectangle into the vertex batch. + * + * The dimensions are run through `Math.floor` before the quad is generated. + * + * Rectangle has no transform values and isn't transformed into the local space. + * + * Used for directly batching untransformed rectangles, such as Camera background colors. + * + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#drawFillRect + * @since 3.12.0 + * + * @param {number} x - Horizontal top left coordinate of the rectangle. + * @param {number} y - Vertical top left coordinate of the rectangle. + * @param {number} width - Width of the rectangle. + * @param {number} height - Height of the rectangle. + * @param {number} color - Color of the rectangle to draw. + * @param {number} alpha - Alpha value of the rectangle to draw. + */ + drawFillRect: function (x, y, width, height, color, alpha) + { + x = Math.floor(x); + y = Math.floor(y); + + var xw = Math.floor(x + width); + var yh = Math.floor(y + height); + + var blank = this.renderer.blankTexture.glTexture; + + var unit = this.renderer.setTexture2D(blank); + + var tint = Utils.getTintAppendFloatAlphaAndSwap(color, alpha); + + this.batchQuad(x, y, x, yh, xw, yh, xw, y, 0, 0, 1, 1, tint, tint, tint, tint, 2, blank, unit); + }, + + /** + * Pushes a filled rectangle into the vertex batch. + * Rectangle factors in the given transform matrices before adding to the batch. + * + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchFillRect + * @since 3.12.0 + * + * @param {number} x - Horizontal top left coordinate of the rectangle. + * @param {number} y - Vertical top left coordinate of the rectangle. + * @param {number} width - Width of the rectangle. + * @param {number} height - Height of the rectangle. + * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform. + * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform. + */ + batchFillRect: function (x, y, width, height, currentMatrix, parentMatrix) + { + this.renderer.setPipeline(this); + + var calcMatrix = this._tempMatrix3; + + // Multiply and store result in calcMatrix, only if the parentMatrix is set, otherwise we'll use whatever values are already in the calcMatrix + if (parentMatrix) + { + parentMatrix.multiply(currentMatrix, calcMatrix); + } + + var xw = x + width; + var yh = y + height; + + var x0 = calcMatrix.getX(x, y); + var y0 = calcMatrix.getY(x, y); + + var x1 = calcMatrix.getX(x, yh); + var y1 = calcMatrix.getY(x, yh); + + var x2 = calcMatrix.getX(xw, yh); + var y2 = calcMatrix.getY(xw, yh); + + var x3 = calcMatrix.getX(xw, y); + var y3 = calcMatrix.getY(xw, y); + + var frame = this.currentFrame; + + var u0 = frame.u0; + var v0 = frame.v0; + var u1 = frame.u1; + var v1 = frame.v1; + + var tint = this.fillTint; + + this.batchQuad(x0, y0, x1, y1, x2, y2, x3, y3, u0, v0, u1, v1, tint.TL, tint.TR, tint.BL, tint.BR, this.tintEffect); + }, + + /** + * Pushes a filled triangle into the vertex batch. + * Triangle factors in the given transform matrices before adding to the batch. + * + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchFillTriangle + * @since 3.12.0 + * + * @param {number} x0 - Point 0 x coordinate. + * @param {number} y0 - Point 0 y coordinate. + * @param {number} x1 - Point 1 x coordinate. + * @param {number} y1 - Point 1 y coordinate. + * @param {number} x2 - Point 2 x coordinate. + * @param {number} y2 - Point 2 y coordinate. + * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform. + * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform. + */ + batchFillTriangle: function (x0, y0, x1, y1, x2, y2, currentMatrix, parentMatrix) + { + this.renderer.setPipeline(this); + + var calcMatrix = this._tempMatrix3; + + // Multiply and store result in calcMatrix, only if the parentMatrix is set, otherwise we'll use whatever values are already in the calcMatrix + if (parentMatrix) + { + parentMatrix.multiply(currentMatrix, calcMatrix); + } + + var tx0 = calcMatrix.getX(x0, y0); + var ty0 = calcMatrix.getY(x0, y0); + + var tx1 = calcMatrix.getX(x1, y1); + var ty1 = calcMatrix.getY(x1, y1); + + var tx2 = calcMatrix.getX(x2, y2); + var ty2 = calcMatrix.getY(x2, y2); + + var frame = this.currentFrame; + + var u0 = frame.u0; + var v0 = frame.v0; + var u1 = frame.u1; + var v1 = frame.v1; + + this.batchTri(tx0, ty0, tx1, ty1, tx2, ty2, u0, v0, u1, v1, this.fillTint.TL, this.fillTint.TR, this.fillTint.BL, this.tintEffect); + }, + + /** + * Pushes a stroked triangle into the vertex batch. + * Triangle factors in the given transform matrices before adding to the batch. + * The triangle is created from 3 lines and drawn using the `batchStrokePath` method. + * + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchStrokeTriangle + * @since 3.12.0 + * + * @param {number} x0 - Point 0 x coordinate. + * @param {number} y0 - Point 0 y coordinate. + * @param {number} x1 - Point 1 x coordinate. + * @param {number} y1 - Point 1 y coordinate. + * @param {number} x2 - Point 2 x coordinate. + * @param {number} y2 - Point 2 y coordinate. + * @param {number} lineWidth - The width of the line in pixels. + * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform. + * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform. + */ + batchStrokeTriangle: function (x0, y0, x1, y1, x2, y2, lineWidth, currentMatrix, parentMatrix) + { + var tempTriangle = this.tempTriangle; + + tempTriangle[0].x = x0; + tempTriangle[0].y = y0; + tempTriangle[0].width = lineWidth; + + tempTriangle[1].x = x1; + tempTriangle[1].y = y1; + tempTriangle[1].width = lineWidth; + + tempTriangle[2].x = x2; + tempTriangle[2].y = y2; + tempTriangle[2].width = lineWidth; + + tempTriangle[3].x = x0; + tempTriangle[3].y = y0; + tempTriangle[3].width = lineWidth; + + this.batchStrokePath(tempTriangle, lineWidth, false, currentMatrix, parentMatrix); + }, + + /** + * Adds the given path to the vertex batch for rendering. + * + * It works by taking the array of path data and then passing it through Earcut, which + * creates a list of polygons. Each polygon is then added to the batch. + * + * The path is always automatically closed because it's filled. + * + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchFillPath + * @since 3.12.0 + * + * @param {array} path - Collection of points that represent the path. + * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform. + * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform. + */ + batchFillPath: function (path, currentMatrix, parentMatrix) + { + this.renderer.setPipeline(this); + + var calcMatrix = this._tempMatrix3; + + // Multiply and store result in calcMatrix, only if the parentMatrix is set, otherwise we'll use whatever values are already in the calcMatrix + if (parentMatrix) + { + parentMatrix.multiply(currentMatrix, calcMatrix); + } + + var length = path.length; + var polygonCache = this.polygonCache; + var polygonIndexArray; + var point; + + var tintTL = this.fillTint.TL; + var tintTR = this.fillTint.TR; + var tintBL = this.fillTint.BL; + var tintEffect = this.tintEffect; + + for (var pathIndex = 0; pathIndex < length; ++pathIndex) + { + point = path[pathIndex]; + polygonCache.push(point.x, point.y); + } + + polygonIndexArray = Earcut(polygonCache); + length = polygonIndexArray.length; + + var frame = this.currentFrame; + + for (var index = 0; index < length; index += 3) + { + var p0 = polygonIndexArray[index + 0] * 2; + var p1 = polygonIndexArray[index + 1] * 2; + var p2 = polygonIndexArray[index + 2] * 2; + + var x0 = polygonCache[p0 + 0]; + var y0 = polygonCache[p0 + 1]; + var x1 = polygonCache[p1 + 0]; + var y1 = polygonCache[p1 + 1]; + var x2 = polygonCache[p2 + 0]; + var y2 = polygonCache[p2 + 1]; + + var tx0 = calcMatrix.getX(x0, y0); + var ty0 = calcMatrix.getY(x0, y0); + + var tx1 = calcMatrix.getX(x1, y1); + var ty1 = calcMatrix.getY(x1, y1); + + var tx2 = calcMatrix.getX(x2, y2); + var ty2 = calcMatrix.getY(x2, y2); + + var u0 = frame.u0; + var v0 = frame.v0; + var u1 = frame.u1; + var v1 = frame.v1; + + this.batchTri(tx0, ty0, tx1, ty1, tx2, ty2, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintEffect); + } + + polygonCache.length = 0; + }, + + /** + * Adds the given path to the vertex batch for rendering. + * + * It works by taking the array of path data and calling `batchLine` for each section + * of the path. + * + * The path is optionally closed at the end. + * + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchStrokePath + * @since 3.12.0 + * + * @param {array} path - Collection of points that represent the path. + * @param {number} lineWidth - The width of the line segments in pixels. + * @param {boolean} pathOpen - Indicates if the path should be closed or left open. + * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform. + * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform. + */ + batchStrokePath: function (path, lineWidth, pathOpen, currentMatrix, parentMatrix) + { + this.renderer.setPipeline(this); + + // Reset the closePath booleans + this.prevQuad[4] = 0; + this.firstQuad[4] = 0; + + var pathLength = path.length - 1; + + for (var pathIndex = 0; pathIndex < pathLength; pathIndex++) + { + var point0 = path[pathIndex]; + var point1 = path[pathIndex + 1]; + + this.batchLine( + point0.x, + point0.y, + point1.x, + point1.y, + point0.width / 2, + point1.width / 2, + lineWidth, + pathIndex, + !pathOpen && (pathIndex === pathLength - 1), + currentMatrix, + parentMatrix + ); + } + }, + + /** + * Creates a line out of 4 quads and adds it to the vertex batch based on the given line values. + * Assumes a texture has already been set, prior to calling this function. + * + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchLine + * @since 3.12.0 + * + * @param {number} ax - X coordinate to the start of the line + * @param {number} ay - Y coordinate to the start of the line + * @param {number} bx - X coordinate to the end of the line + * @param {number} by - Y coordinate to the end of the line + * @param {number} aLineWidth - Width of the start of the line + * @param {number} bLineWidth - Width of the end of the line + * @param {Float32Array} currentMatrix - Parent matrix, generally used by containers + */ + batchLine: function (ax, ay, bx, by, aLineWidth, bLineWidth, lineWidth, index, closePath, currentMatrix, parentMatrix) + { + this.renderer.setPipeline(this); + + var calcMatrix = this._tempMatrix3; + + // Multiply and store result in calcMatrix, only if the parentMatrix is set, otherwise we'll use whatever values are already in the calcMatrix + if (parentMatrix) + { + parentMatrix.multiply(currentMatrix, calcMatrix); + } + + var dx = bx - ax; + var dy = by - ay; + + var len = Math.sqrt(dx * dx + dy * dy); + var al0 = aLineWidth * (by - ay) / len; + var al1 = aLineWidth * (ax - bx) / len; + var bl0 = bLineWidth * (by - ay) / len; + var bl1 = bLineWidth * (ax - bx) / len; + + var lx0 = bx - bl0; + var ly0 = by - bl1; + var lx1 = ax - al0; + var ly1 = ay - al1; + var lx2 = bx + bl0; + var ly2 = by + bl1; + var lx3 = ax + al0; + var ly3 = ay + al1; + + // tx0 = bottom right + var brX = calcMatrix.getX(lx0, ly0); + var brY = calcMatrix.getY(lx0, ly0); + + // tx1 = bottom left + var blX = calcMatrix.getX(lx1, ly1); + var blY = calcMatrix.getY(lx1, ly1); + + // tx2 = top right + var trX = calcMatrix.getX(lx2, ly2); + var trY = calcMatrix.getY(lx2, ly2); + + // tx3 = top left + var tlX = calcMatrix.getX(lx3, ly3); + var tlY = calcMatrix.getY(lx3, ly3); + + var tint = this.strokeTint; + var tintEffect = this.tintEffect; + + var tintTL = tint.TL; + var tintTR = tint.TR; + var tintBL = tint.BL; + var tintBR = tint.BR; + + var frame = this.currentFrame; + + var u0 = frame.u0; + var v0 = frame.v0; + var u1 = frame.u1; + var v1 = frame.v1; + + // TL, BL, BR, TR + this.batchQuad(tlX, tlY, blX, blY, brX, brY, trX, trY, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect); + + if (lineWidth <= 2) + { + // No point doing a linejoin if the line isn't thick enough + return; + } + + var prev = this.prevQuad; + var first = this.firstQuad; + + if (index > 0 && prev[4]) + { + this.batchQuad(tlX, tlY, blX, blY, prev[0], prev[1], prev[2], prev[3], u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect); + } + else + { + first[0] = tlX; + first[1] = tlY; + first[2] = blX; + first[3] = blY; + first[4] = 1; + } + + if (closePath && first[4]) + { + // Add a join for the final path segment + this.batchQuad(brX, brY, trX, trY, first[0], first[1], first[2], first[3], u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect); + } + else + { + // Store it + + prev[0] = brX; + prev[1] = brY; + prev[2] = trX; + prev[3] = trY; + prev[4] = 1; + } + } + +}); + +module.exports = MultiPipeline; + + +/***/ }), +/* 110 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Implements a model view projection matrices. + * Pipelines can implement this for doing 2D and 3D rendering. + * + * @namespace Phaser.Renderer.WebGL.Pipelines.ModelViewProjection + * @since 3.0.0 + */ +var ModelViewProjection = { + + /** + * Dirty flag for checking if model matrix needs to be updated on GPU. + * + * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelMatrixDirty + * @type {boolean} + * @since 3.0.0 + */ + modelMatrixDirty: false, + + /** + * Dirty flag for checking if view matrix needs to be updated on GPU. + * + * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewMatrixDirty + * @type {boolean} + * @since 3.0.0 + */ + viewMatrixDirty: false, + + /** + * Dirty flag for checking if projection matrix needs to be updated on GPU. + * + * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projectionMatrixDirty + * @type {boolean} + * @since 3.0.0 + */ + projectionMatrixDirty: false, + + /** + * Model matrix + * + * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelMatrix + * @type {?Float32Array} + * @since 3.0.0 + */ + modelMatrix: null, + + /** + * View matrix + * + * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewMatrix + * @type {?Float32Array} + * @since 3.0.0 + */ + viewMatrix: null, + + /** + * Projection matrix + * + * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projectionMatrix + * @type {?Float32Array} + * @since 3.0.0 + */ + projectionMatrix: null, + + /** + * Initializes MVP matrices with an identity matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#mvpInit + * @since 3.0.0 + */ + mvpInit: function () + { + this.modelMatrixDirty = true; + this.viewMatrixDirty = true; + this.projectionMatrixDirty = true; + + this.modelMatrix = new Float32Array([ + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1 + ]); + + 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 + ]); + + return this; + }, + + /** + * If dirty flags are set then the matrices are uploaded to the GPU. + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#mvpUpdate + * @since 3.0.0 + */ + mvpUpdate: function () + { + var program = this.program; + + if (this.modelMatrixDirty) + { + this.renderer.setMatrix4(program, 'uModelMatrix', false, this.modelMatrix); + this.modelMatrixDirty = false; + } + + if (this.viewMatrixDirty) + { + this.renderer.setMatrix4(program, 'uViewMatrix', false, this.viewMatrix); + this.viewMatrixDirty = false; + } + + if (this.projectionMatrixDirty) + { + this.renderer.setMatrix4(program, 'uProjectionMatrix', false, this.projectionMatrix); + this.projectionMatrixDirty = false; + } + + return this; + } +}; + +module.exports = ModelViewProjection; + + +/***/ }), +/* 111 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. @@ -21486,7 +24004,7 @@ module.exports = Equal; var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var ImageRender = __webpack_require__(974); +var ImageRender = __webpack_require__(979); /** * @classdesc @@ -21575,7 +24093,7 @@ module.exports = Image; /***/ }), -/* 109 */ +/* 112 */ /***/ (function(module, exports) { /** @@ -21604,8 +24122,8 @@ module.exports = HasValue; /***/ }), -/* 110 */, -/* 111 */ +/* 113 */, +/* 114 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -21621,7 +24139,7 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); var Rectangle = __webpack_require__(9); -var RectangleContains = __webpack_require__(48); +var RectangleContains = __webpack_require__(49); /** * @classdesc @@ -21918,7 +24436,7 @@ module.exports = Zone; /***/ }), -/* 112 */ +/* 115 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -21933,30 +24451,30 @@ module.exports = Zone; module.exports = { - ADD_ANIMATION: __webpack_require__(535), - ANIMATION_COMPLETE: __webpack_require__(536), - ANIMATION_REPEAT: __webpack_require__(537), - ANIMATION_RESTART: __webpack_require__(538), - ANIMATION_START: __webpack_require__(539), - PAUSE_ALL: __webpack_require__(540), - REMOVE_ANIMATION: __webpack_require__(541), - RESUME_ALL: __webpack_require__(542), - SPRITE_ANIMATION_COMPLETE: __webpack_require__(543), - SPRITE_ANIMATION_KEY_COMPLETE: __webpack_require__(544), - SPRITE_ANIMATION_KEY_REPEAT: __webpack_require__(545), - SPRITE_ANIMATION_KEY_RESTART: __webpack_require__(546), - SPRITE_ANIMATION_KEY_START: __webpack_require__(547), - SPRITE_ANIMATION_KEY_UPDATE: __webpack_require__(548), - SPRITE_ANIMATION_REPEAT: __webpack_require__(549), - SPRITE_ANIMATION_RESTART: __webpack_require__(550), - SPRITE_ANIMATION_START: __webpack_require__(551), - SPRITE_ANIMATION_UPDATE: __webpack_require__(552) + ADD_ANIMATION: __webpack_require__(538), + ANIMATION_COMPLETE: __webpack_require__(539), + ANIMATION_REPEAT: __webpack_require__(540), + ANIMATION_RESTART: __webpack_require__(541), + ANIMATION_START: __webpack_require__(542), + PAUSE_ALL: __webpack_require__(543), + REMOVE_ANIMATION: __webpack_require__(544), + RESUME_ALL: __webpack_require__(545), + SPRITE_ANIMATION_COMPLETE: __webpack_require__(546), + SPRITE_ANIMATION_KEY_COMPLETE: __webpack_require__(547), + SPRITE_ANIMATION_KEY_REPEAT: __webpack_require__(548), + SPRITE_ANIMATION_KEY_RESTART: __webpack_require__(549), + SPRITE_ANIMATION_KEY_START: __webpack_require__(550), + SPRITE_ANIMATION_KEY_UPDATE: __webpack_require__(551), + SPRITE_ANIMATION_REPEAT: __webpack_require__(552), + SPRITE_ANIMATION_RESTART: __webpack_require__(553), + SPRITE_ANIMATION_START: __webpack_require__(554), + SPRITE_ANIMATION_UPDATE: __webpack_require__(555) }; /***/ }), -/* 113 */ +/* 116 */ /***/ (function(module, exports) { /** @@ -21984,7 +24502,7 @@ module.exports = Perimeter; /***/ }), -/* 114 */ +/* 117 */ /***/ (function(module, exports) { /** @@ -22013,7 +24531,7 @@ module.exports = GetColorFromValue; /***/ }), -/* 115 */ +/* 118 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -22720,7 +25238,7 @@ module.exports = DataManager; /***/ }), -/* 116 */ +/* 119 */ /***/ (function(module, exports) { /** @@ -22761,7 +25279,7 @@ module.exports = Shuffle; /***/ }), -/* 117 */ +/* 120 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -22842,7 +25360,7 @@ module.exports = { /***/ }), -/* 118 */ +/* 121 */ /***/ (function(module, exports) { /** @@ -22872,7 +25390,7 @@ module.exports = Linear; /***/ }), -/* 119 */ +/* 122 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -23041,10 +25559,10 @@ function init () module.exports = init(); -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(730))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(733))) /***/ }), -/* 120 */ +/* 123 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -23053,7 +25571,7 @@ module.exports = init(); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var OS = __webpack_require__(119); +var OS = __webpack_require__(122); /** * Determines the browser type and version running this Phaser Game instance. @@ -23154,7 +25672,7 @@ module.exports = init(); /***/ }), -/* 121 */ +/* 124 */ /***/ (function(module, exports) { /** @@ -23183,7 +25701,7 @@ module.exports = FloatBetween; /***/ }), -/* 122 */ +/* 125 */ /***/ (function(module, exports) { /** @@ -23213,7 +25731,552 @@ module.exports = IsSizePowerOfTwo; /***/ }), -/* 123 */ +/* 126 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji +// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl + +var Class = __webpack_require__(0); + +/** + * @classdesc + * A representation of a vector in 4D space. + * + * A four-component vector. + * + * @class Vector4 + * @memberof Phaser.Math + * @constructor + * @since 3.0.0 + * + * @param {number} [x] - The x component. + * @param {number} [y] - The y component. + * @param {number} [z] - The z component. + * @param {number} [w] - The w component. + */ +var Vector4 = new Class({ + + initialize: + + function Vector4 (x, y, z, w) + { + /** + * The x component of this Vector. + * + * @name Phaser.Math.Vector4#x + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.x = 0; + + /** + * The y component of this Vector. + * + * @name Phaser.Math.Vector4#y + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.y = 0; + + /** + * The z component of this Vector. + * + * @name Phaser.Math.Vector4#z + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.z = 0; + + /** + * The w component of this Vector. + * + * @name Phaser.Math.Vector4#w + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.w = 0; + + if (typeof x === 'object') + { + this.x = x.x || 0; + this.y = x.y || 0; + this.z = x.z || 0; + this.w = x.w || 0; + } + else + { + this.x = x || 0; + this.y = y || 0; + this.z = z || 0; + this.w = w || 0; + } + }, + + /** + * Make a clone of this Vector4. + * + * @method Phaser.Math.Vector4#clone + * @since 3.0.0 + * + * @return {Phaser.Math.Vector4} A clone of this Vector4. + */ + clone: function () + { + return new Vector4(this.x, this.y, this.z, this.w); + }, + + /** + * Copy the components of a given Vector into this Vector. + * + * @method Phaser.Math.Vector4#copy + * @since 3.0.0 + * + * @param {Phaser.Math.Vector4} src - The Vector to copy the components from. + * + * @return {Phaser.Math.Vector4} This Vector4. + */ + copy: function (src) + { + this.x = src.x; + this.y = src.y; + this.z = src.z || 0; + this.w = src.w || 0; + + return this; + }, + + /** + * Check whether this Vector is equal to a given Vector. + * + * Performs a strict quality check against each Vector's components. + * + * @method Phaser.Math.Vector4#equals + * @since 3.0.0 + * + * @param {Phaser.Math.Vector4} v - The vector to check equality with. + * + * @return {boolean} A boolean indicating whether the two Vectors are equal or not. + */ + equals: function (v) + { + return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z) && (this.w === v.w)); + }, + + /** + * Set the `x`, `y`, `z` and `w` components of the this Vector to the given `x`, `y`, `z` and `w` values. + * + * @method Phaser.Math.Vector4#set + * @since 3.0.0 + * + * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y, z and w components. + * @param {number} y - The y value to set for this Vector. + * @param {number} z - The z value to set for this Vector. + * @param {number} w - The z value to set for this Vector. + * + * @return {Phaser.Math.Vector4} This Vector4. + */ + set: function (x, y, z, w) + { + if (typeof x === 'object') + { + this.x = x.x || 0; + this.y = x.y || 0; + this.z = x.z || 0; + this.w = x.w || 0; + } + else + { + this.x = x || 0; + this.y = y || 0; + this.z = z || 0; + this.w = w || 0; + } + + return this; + }, + + /** + * Add a given Vector to this Vector. Addition is component-wise. + * + * @method Phaser.Math.Vector4#add + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to add to this Vector. + * + * @return {Phaser.Math.Vector4} This Vector4. + */ + add: function (v) + { + this.x += v.x; + this.y += v.y; + this.z += v.z || 0; + this.w += v.w || 0; + + return this; + }, + + /** + * Subtract the given Vector from this Vector. Subtraction is component-wise. + * + * @method Phaser.Math.Vector4#subtract + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to subtract from this Vector. + * + * @return {Phaser.Math.Vector4} This Vector4. + */ + subtract: function (v) + { + this.x -= v.x; + this.y -= v.y; + this.z -= v.z || 0; + this.w -= v.w || 0; + + return this; + }, + + /** + * Scale this Vector by the given value. + * + * @method Phaser.Math.Vector4#scale + * @since 3.0.0 + * + * @param {number} scale - The value to scale this Vector by. + * + * @return {Phaser.Math.Vector4} This Vector4. + */ + scale: function (scale) + { + this.x *= scale; + this.y *= scale; + this.z *= scale; + this.w *= scale; + + return this; + }, + + /** + * Calculate the length (or magnitude) of this Vector. + * + * @method Phaser.Math.Vector4#length + * @since 3.0.0 + * + * @return {number} The length of this Vector. + */ + length: function () + { + var x = this.x; + var y = this.y; + var z = this.z; + var w = this.w; + + return Math.sqrt(x * x + y * y + z * z + w * w); + }, + + /** + * Calculate the length of this Vector squared. + * + * @method Phaser.Math.Vector4#lengthSq + * @since 3.0.0 + * + * @return {number} The length of this Vector, squared. + */ + lengthSq: function () + { + var x = this.x; + var y = this.y; + var z = this.z; + var w = this.w; + + return x * x + y * y + z * z + w * w; + }, + + /** + * Normalize this Vector. + * + * Makes the vector a unit length vector (magnitude of 1) in the same direction. + * + * @method Phaser.Math.Vector4#normalize + * @since 3.0.0 + * + * @return {Phaser.Math.Vector4} This Vector4. + */ + normalize: function () + { + var x = this.x; + var y = this.y; + var z = this.z; + var w = this.w; + var len = x * x + y * y + z * z + w * w; + + if (len > 0) + { + len = 1 / Math.sqrt(len); + + this.x = x * len; + this.y = y * len; + this.z = z * len; + this.w = w * len; + } + + return this; + }, + + /** + * Calculate the dot product of this Vector and the given Vector. + * + * @method Phaser.Math.Vector4#dot + * @since 3.0.0 + * + * @param {Phaser.Math.Vector4} v - The Vector4 to dot product with this Vector4. + * + * @return {number} The dot product of this Vector and the given Vector. + */ + dot: function (v) + { + return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w; + }, + + /** + * Linearly interpolate between this Vector and the given Vector. + * + * Interpolates this Vector towards the given Vector. + * + * @method Phaser.Math.Vector4#lerp + * @since 3.0.0 + * + * @param {Phaser.Math.Vector4} v - The Vector4 to interpolate towards. + * @param {number} [t=0] - The interpolation percentage, between 0 and 1. + * + * @return {Phaser.Math.Vector4} This Vector4. + */ + lerp: function (v, t) + { + if (t === undefined) { t = 0; } + + var ax = this.x; + var ay = this.y; + var az = this.z; + var aw = this.w; + + this.x = ax + t * (v.x - ax); + this.y = ay + t * (v.y - ay); + this.z = az + t * (v.z - az); + this.w = aw + t * (v.w - aw); + + return this; + }, + + /** + * Perform a component-wise multiplication between this Vector and the given Vector. + * + * Multiplies this Vector by the given Vector. + * + * @method Phaser.Math.Vector4#multiply + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to multiply this Vector by. + * + * @return {Phaser.Math.Vector4} This Vector4. + */ + multiply: function (v) + { + this.x *= v.x; + this.y *= v.y; + this.z *= v.z || 1; + this.w *= v.w || 1; + + return this; + }, + + /** + * Perform a component-wise division between this Vector and the given Vector. + * + * Divides this Vector by the given Vector. + * + * @method Phaser.Math.Vector4#divide + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to divide this Vector by. + * + * @return {Phaser.Math.Vector4} This Vector4. + */ + divide: function (v) + { + this.x /= v.x; + this.y /= v.y; + this.z /= v.z || 1; + this.w /= v.w || 1; + + return this; + }, + + /** + * Calculate the distance between this Vector and the given Vector. + * + * @method Phaser.Math.Vector4#distance + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to. + * + * @return {number} The distance from this Vector to the given Vector. + */ + distance: function (v) + { + var dx = v.x - this.x; + var dy = v.y - this.y; + var dz = v.z - this.z || 0; + var dw = v.w - this.w || 0; + + return Math.sqrt(dx * dx + dy * dy + dz * dz + dw * dw); + }, + + /** + * Calculate the distance between this Vector and the given Vector, squared. + * + * @method Phaser.Math.Vector4#distanceSq + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to. + * + * @return {number} The distance from this Vector to the given Vector, squared. + */ + distanceSq: function (v) + { + var dx = v.x - this.x; + var dy = v.y - this.y; + var dz = v.z - this.z || 0; + var dw = v.w - this.w || 0; + + return dx * dx + dy * dy + dz * dz + dw * dw; + }, + + /** + * Negate the `x`, `y`, `z` and `w` components of this Vector. + * + * @method Phaser.Math.Vector4#negate + * @since 3.0.0 + * + * @return {Phaser.Math.Vector4} This Vector4. + */ + negate: function () + { + this.x = -this.x; + this.y = -this.y; + this.z = -this.z; + this.w = -this.w; + + return this; + }, + + /** + * Transform this Vector with the given Matrix. + * + * @method Phaser.Math.Vector4#transformMat4 + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector4 with. + * + * @return {Phaser.Math.Vector4} This Vector4. + */ + transformMat4: function (mat) + { + var x = this.x; + var y = this.y; + var z = this.z; + var w = this.w; + var m = mat.val; + + this.x = m[0] * x + m[4] * y + m[8] * z + m[12] * w; + this.y = m[1] * x + m[5] * y + m[9] * z + m[13] * w; + this.z = m[2] * x + m[6] * y + m[10] * z + m[14] * w; + this.w = m[3] * x + m[7] * y + m[11] * z + m[15] * w; + + return this; + }, + + /** + * Transform this Vector with the given Quaternion. + * + * @method Phaser.Math.Vector4#transformQuat + * @since 3.0.0 + * + * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with. + * + * @return {Phaser.Math.Vector4} This Vector4. + */ + transformQuat: function (q) + { + // TODO: is this really the same as Vector3? + // Also, what about this: http://molecularmusings.wordpress.com/2013/05/24/a-faster-quaternion-vector-multiplication/ + // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations + var x = this.x; + var y = this.y; + var z = this.z; + var qx = q.x; + var qy = q.y; + var qz = q.z; + var qw = q.w; + + // calculate quat * vec + var ix = qw * x + qy * z - qz * y; + var iy = qw * y + qz * x - qx * z; + var iz = qw * z + qx * y - qy * x; + var iw = -qx * x - qy * y - qz * z; + + // calculate result * inverse quat + this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy; + this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz; + this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx; + + return this; + }, + + /** + * Make this Vector the zero vector (0, 0, 0, 0). + * + * @method Phaser.Math.Vector4#reset + * @since 3.0.0 + * + * @return {Phaser.Math.Vector4} This Vector4. + */ + reset: function () + { + this.x = 0; + this.y = 0; + this.z = 0; + this.w = 0; + + return this; + } + +}); + +// TODO: Check if these are required internally, if not, remove. +Vector4.prototype.sub = Vector4.prototype.subtract; +Vector4.prototype.mul = Vector4.prototype.multiply; +Vector4.prototype.div = Vector4.prototype.divide; +Vector4.prototype.dist = Vector4.prototype.distance; +Vector4.prototype.distSq = Vector4.prototype.distanceSq; +Vector4.prototype.len = Vector4.prototype.length; +Vector4.prototype.lenSq = Vector4.prototype.lengthSq; + +module.exports = Vector4; + + +/***/ }), +/* 127 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -23228,17 +26291,17 @@ module.exports = IsSizePowerOfTwo; module.exports = { - ADD: __webpack_require__(782), - ERROR: __webpack_require__(783), - LOAD: __webpack_require__(784), - READY: __webpack_require__(785), - REMOVE: __webpack_require__(786) + ADD: __webpack_require__(785), + ERROR: __webpack_require__(786), + LOAD: __webpack_require__(787), + READY: __webpack_require__(788), + REMOVE: __webpack_require__(789) }; /***/ }), -/* 124 */ +/* 128 */ /***/ (function(module, exports) { /** @@ -23296,7 +26359,7 @@ module.exports = AddToDOM; /***/ }), -/* 125 */ +/* 129 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -23305,7 +26368,7 @@ module.exports = AddToDOM; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SpliceOne = __webpack_require__(80); +var SpliceOne = __webpack_require__(81); /** * Removes the given item, or array of items, from the array. @@ -23387,7 +26450,7 @@ module.exports = Remove; /***/ }), -/* 126 */ +/* 130 */ /***/ (function(module, exports) { /** @@ -24293,7 +27356,7 @@ module.exports = KeyCodes; /***/ }), -/* 127 */ +/* 131 */ /***/ (function(module, exports) { /** @@ -24416,7 +27479,7 @@ module.exports = CONST; /***/ }), -/* 128 */ +/* 132 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -24461,7 +27524,7 @@ module.exports = Merge; /***/ }), -/* 129 */ +/* 133 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25175,7 +28238,7 @@ module.exports = BaseSoundManager; /***/ }), -/* 130 */ +/* 134 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25675,7 +28738,7 @@ module.exports = BaseSound; /***/ }), -/* 131 */ +/* 135 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25687,7 +28750,7 @@ module.exports = BaseSound; var ArrayUtils = __webpack_require__(189); var Class = __webpack_require__(0); var NOOP = __webpack_require__(1); -var StableSort = __webpack_require__(133); +var StableSort = __webpack_require__(137); /** * @callback EachListCallback @@ -26491,7 +29554,7 @@ module.exports = List; /***/ }), -/* 132 */ +/* 136 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26563,7 +29626,7 @@ module.exports = RotateMatrix; /***/ }), -/* 133 */ +/* 137 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26708,7 +29771,7 @@ else {} })(); /***/ }), -/* 134 */ +/* 138 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26721,12 +29784,12 @@ var Class = __webpack_require__(0); var Clamp = __webpack_require__(17); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var GetColorFromValue = __webpack_require__(114); -var GetBitmapTextSize = __webpack_require__(948); -var ParseFromAtlas = __webpack_require__(949); +var GetColorFromValue = __webpack_require__(117); +var GetBitmapTextSize = __webpack_require__(953); +var ParseFromAtlas = __webpack_require__(954); var ParseXMLBitmapFont = __webpack_require__(193); var Rectangle = __webpack_require__(9); -var Render = __webpack_require__(950); +var Render = __webpack_require__(955); /** * @classdesc @@ -27836,7 +30899,7 @@ module.exports = BitmapText; /***/ }), -/* 135 */ +/* 139 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28285,7 +31348,7 @@ module.exports = Set; /***/ }), -/* 136 */ +/* 140 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28297,7 +31360,7 @@ module.exports = Set; var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var MeshRender = __webpack_require__(1081); +var MeshRender = __webpack_require__(1086); var NOOP = __webpack_require__(1); /** @@ -28456,7 +31519,7 @@ module.exports = Mesh; /***/ }), -/* 137 */ +/* 141 */ /***/ (function(module, exports) { /** @@ -28494,7 +31557,7 @@ module.exports = RectangleToRectangle; /***/ }), -/* 138 */ +/* 142 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28602,7 +31665,7 @@ module.exports = InputPluginCache; /***/ }), -/* 139 */ +/* 143 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28617,19 +31680,19 @@ module.exports = InputPluginCache; module.exports = { - ANY_KEY_DOWN: __webpack_require__(1223), - ANY_KEY_UP: __webpack_require__(1224), - COMBO_MATCH: __webpack_require__(1225), - DOWN: __webpack_require__(1226), - KEY_DOWN: __webpack_require__(1227), - KEY_UP: __webpack_require__(1228), - UP: __webpack_require__(1229) + ANY_KEY_DOWN: __webpack_require__(1229), + ANY_KEY_UP: __webpack_require__(1230), + COMBO_MATCH: __webpack_require__(1231), + DOWN: __webpack_require__(1232), + KEY_DOWN: __webpack_require__(1233), + KEY_UP: __webpack_require__(1234), + UP: __webpack_require__(1235) }; /***/ }), -/* 140 */ +/* 144 */ /***/ (function(module, exports) { /** @@ -28670,7 +31733,7 @@ module.exports = GetURL; /***/ }), -/* 141 */ +/* 145 */ /***/ (function(module, exports) { /** @@ -28740,7 +31803,7 @@ module.exports = XHRSettings; /***/ }), -/* 142 */ +/* 146 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28841,7 +31904,7 @@ module.exports = ArcadeSprite; /***/ }), -/* 143 */ +/* 147 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28858,52 +31921,52 @@ module.exports = { CalculateFacesAt: __webpack_require__(226), CalculateFacesWithin: __webpack_require__(52), - Copy: __webpack_require__(1319), - CreateFromTiles: __webpack_require__(1320), - CullTiles: __webpack_require__(1321), - Fill: __webpack_require__(1322), - FilterTiles: __webpack_require__(1323), - FindByIndex: __webpack_require__(1324), - FindTile: __webpack_require__(1325), - ForEachTile: __webpack_require__(1326), - GetTileAt: __webpack_require__(144), - GetTileAtWorldXY: __webpack_require__(1327), + Copy: __webpack_require__(1325), + CreateFromTiles: __webpack_require__(1326), + CullTiles: __webpack_require__(1327), + Fill: __webpack_require__(1328), + FilterTiles: __webpack_require__(1329), + FindByIndex: __webpack_require__(1330), + FindTile: __webpack_require__(1331), + ForEachTile: __webpack_require__(1332), + GetTileAt: __webpack_require__(148), + GetTileAtWorldXY: __webpack_require__(1333), GetTilesWithin: __webpack_require__(24), - GetTilesWithinShape: __webpack_require__(1328), - GetTilesWithinWorldXY: __webpack_require__(1329), - HasTileAt: __webpack_require__(477), - HasTileAtWorldXY: __webpack_require__(1330), + GetTilesWithinShape: __webpack_require__(1334), + GetTilesWithinWorldXY: __webpack_require__(1335), + HasTileAt: __webpack_require__(479), + HasTileAtWorldXY: __webpack_require__(1336), IsInLayerBounds: __webpack_require__(102), PutTileAt: __webpack_require__(227), - PutTileAtWorldXY: __webpack_require__(1331), - PutTilesAt: __webpack_require__(1332), - Randomize: __webpack_require__(1333), - RemoveTileAt: __webpack_require__(478), - RemoveTileAtWorldXY: __webpack_require__(1334), - RenderDebug: __webpack_require__(1335), - ReplaceByIndex: __webpack_require__(476), - SetCollision: __webpack_require__(1336), - SetCollisionBetween: __webpack_require__(1337), - SetCollisionByExclusion: __webpack_require__(1338), - SetCollisionByProperty: __webpack_require__(1339), - SetCollisionFromCollisionGroup: __webpack_require__(1340), - SetTileIndexCallback: __webpack_require__(1341), - SetTileLocationCallback: __webpack_require__(1342), - Shuffle: __webpack_require__(1343), - SwapByIndex: __webpack_require__(1344), - TileToWorldX: __webpack_require__(145), - TileToWorldXY: __webpack_require__(1345), - TileToWorldY: __webpack_require__(146), - WeightedRandomize: __webpack_require__(1346), + PutTileAtWorldXY: __webpack_require__(1337), + PutTilesAt: __webpack_require__(1338), + Randomize: __webpack_require__(1339), + RemoveTileAt: __webpack_require__(480), + RemoveTileAtWorldXY: __webpack_require__(1340), + RenderDebug: __webpack_require__(1341), + ReplaceByIndex: __webpack_require__(478), + SetCollision: __webpack_require__(1342), + SetCollisionBetween: __webpack_require__(1343), + SetCollisionByExclusion: __webpack_require__(1344), + SetCollisionByProperty: __webpack_require__(1345), + SetCollisionFromCollisionGroup: __webpack_require__(1346), + SetTileIndexCallback: __webpack_require__(1347), + SetTileLocationCallback: __webpack_require__(1348), + Shuffle: __webpack_require__(1349), + SwapByIndex: __webpack_require__(1350), + TileToWorldX: __webpack_require__(149), + TileToWorldXY: __webpack_require__(1351), + TileToWorldY: __webpack_require__(150), + WeightedRandomize: __webpack_require__(1352), WorldToTileX: __webpack_require__(63), - WorldToTileXY: __webpack_require__(1347), + WorldToTileXY: __webpack_require__(1353), WorldToTileY: __webpack_require__(64) }; /***/ }), -/* 144 */ +/* 148 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28959,7 +32022,7 @@ module.exports = GetTileAt; /***/ }), -/* 145 */ +/* 149 */ /***/ (function(module, exports) { /** @@ -29004,7 +32067,7 @@ module.exports = TileToWorldX; /***/ }), -/* 146 */ +/* 150 */ /***/ (function(module, exports) { /** @@ -29049,7 +32112,7 @@ module.exports = TileToWorldY; /***/ }), -/* 147 */ +/* 151 */ /***/ (function(module, exports) { /** @@ -29113,7 +32176,7 @@ module.exports = GetNewValue; /***/ }), -/* 148 */ +/* 152 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29124,10 +32187,10 @@ module.exports = GetNewValue; var Defaults = __webpack_require__(236); var GetAdvancedValue = __webpack_require__(15); -var GetBoolean = __webpack_require__(88); +var GetBoolean = __webpack_require__(89); var GetEaseFunction = __webpack_require__(69); -var GetNewValue = __webpack_require__(147); -var GetProps = __webpack_require__(499); +var GetNewValue = __webpack_require__(151); +var GetProps = __webpack_require__(501); var GetTargets = __webpack_require__(234); var GetValue = __webpack_require__(6); var GetValueOp = __webpack_require__(235); @@ -29246,2455 +32309,8 @@ module.exports = TweenBuilder; /***/ }), -/* 149 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @author Felipe Alfonso <@bitnenfer> - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var Utils = __webpack_require__(10); - -/** - * @classdesc - * WebGLPipeline is a class that describes the way elements will be renderered - * in WebGL, specially focused on batching vertices (batching is not provided). - * Pipelines are mostly used for describing 2D rendering passes but it's - * flexible enough to be used for any type of rendering including 3D. - * Internally WebGLPipeline will handle things like compiling shaders, - * creating vertex buffers, assigning primitive topology and binding - * vertex attributes. - * - * The config properties are: - * - game: Current game instance. - * - renderer: Current WebGL renderer. - * - gl: Current WebGL context. - * - topology: This indicates how the primitives are rendered. The default value is GL_TRIANGLES. - * Here is the full list of rendering primitives (https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants). - * - vertShader: Source for vertex shader as a string. - * - fragShader: Source for fragment shader as a string. - * - vertexCapacity: The amount of vertices that shall be allocated - * - vertexSize: The size of a single vertex in bytes. - * - vertices: An optional buffer of vertices - * - attributes: An array describing the vertex attributes - * - * The vertex attributes properties are: - * - name : String - Name of the attribute in the vertex shader - * - size : integer - How many components describe the attribute. For ex: vec3 = size of 3, float = size of 1 - * - type : GLenum - WebGL type (gl.BYTE, gl.SHORT, gl.UNSIGNED_BYTE, gl.UNSIGNED_SHORT, gl.FLOAT) - * - normalized : boolean - Is the attribute normalized - * - offset : integer - The offset in bytes to the current attribute in the vertex. Equivalent to offsetof(vertex, attrib) in C - * Here you can find more information of how to describe an attribute: - * - https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/vertexAttribPointer - * - * @class WebGLPipeline - * @memberof Phaser.Renderer.WebGL - * @constructor - * @since 3.0.0 - * - * @param {object} config - The configuration object for this WebGL Pipeline, as described above. - */ -var WebGLPipeline = new Class({ - - initialize: - - function WebGLPipeline (config) - { - /** - * Name of the Pipeline. Used for identifying - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#name - * @type {string} - * @since 3.0.0 - */ - this.name = 'WebGLPipeline'; - - /** - * The Game which owns this WebGL Pipeline. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#game - * @type {Phaser.Game} - * @since 3.0.0 - */ - this.game = config.game; - - /** - * The canvas which this WebGL Pipeline renders to. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#view - * @type {HTMLCanvasElement} - * @since 3.0.0 - */ - this.view = config.game.canvas; - - /** - * Used to store the current game resolution - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#resolution - * @type {number} - * @since 3.0.0 - */ - this.resolution = 1; - - /** - * Width of the current viewport - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#width - * @type {number} - * @since 3.0.0 - */ - this.width = 0; - - /** - * Height of the current viewport - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#height - * @type {number} - * @since 3.0.0 - */ - this.height = 0; - - /** - * The WebGL context this WebGL Pipeline uses. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#gl - * @type {WebGLRenderingContext} - * @since 3.0.0 - */ - this.gl = config.gl; - - /** - * How many vertices have been fed to the current pipeline. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCount - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.vertexCount = 0; - - /** - * The limit of vertices that the pipeline can hold - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCapacity - * @type {integer} - * @since 3.0.0 - */ - this.vertexCapacity = config.vertexCapacity; - - /** - * The WebGL Renderer which owns this WebGL Pipeline. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#renderer - * @type {Phaser.Renderer.WebGL.WebGLRenderer} - * @since 3.0.0 - */ - this.renderer = config.renderer; - - /** - * Raw byte buffer of vertices. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexData - * @type {ArrayBuffer} - * @since 3.0.0 - */ - this.vertexData = (config.vertices ? config.vertices : new ArrayBuffer(config.vertexCapacity * config.vertexSize)); - - /** - * The handle to a WebGL vertex buffer object. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexBuffer - * @type {WebGLBuffer} - * @since 3.0.0 - */ - this.vertexBuffer = this.renderer.createVertexBuffer((config.vertices ? config.vertices : this.vertexData.byteLength), this.gl.STREAM_DRAW); - - /** - * The handle to a WebGL program. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#program - * @type {WebGLProgram} - * @since 3.0.0 - */ - this.program = this.renderer.createProgram(config.vertShader, config.fragShader); - - /** - * Array of objects that describe the vertex attributes. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#attributes - * @type {object} - * @since 3.0.0 - */ - this.attributes = config.attributes; - - /** - * The size in bytes of the vertex. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexSize - * @type {integer} - * @since 3.0.0 - */ - this.vertexSize = config.vertexSize; - - /** - * The primitive topology which the pipeline will use to submit draw calls. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#topology - * @type {integer} - * @since 3.0.0 - */ - this.topology = config.topology; - - /** - * Uint8 view to the vertex raw buffer. Used for uploading vertex buffer resources to the GPU. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#bytes - * @type {Uint8Array} - * @since 3.0.0 - */ - this.bytes = new Uint8Array(this.vertexData); - - /** - * This will store the amount of components of 32 bit length. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexComponentCount - * @type {integer} - * @since 3.0.0 - */ - this.vertexComponentCount = Utils.getComponentCount(config.attributes, this.gl); - - /** - * Indicates if the current pipeline is flushing the contents to the GPU. - * When the variable is set the flush function will be locked. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#flushLocked - * @type {boolean} - * @since 3.1.0 - */ - this.flushLocked = false; - - /** - * Indicates if the current pipeline is active or not for this frame only. - * Reset in the onRender method. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#active - * @type {boolean} - * @since 3.10.0 - */ - this.active = false; - - /** - * Holds the most recently assigned texture unit. - * Treat this value as read-only. - * - * @name Phaser.Renderer.WebGL.Pipelines.WebGLPipeline#currentUnit - * @type {number} - * @since 3.50.0 - */ - this.currentUnit = 0; - - /** - * Some pipelines require the forced use of texture zero (like the light pipeline). - * This boolean should be set when that is the case. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#forceZero - * @type {boolean} - * @since 3.50.0 - */ - this.forceZero = false; - }, - - /** - * Called when the Game has fully booted and the Renderer has finished setting up. - * - * By this stage all Game level systems are now in place and you can perform any final - * tasks that the pipeline may need that relied on game systems such as the Texture Manager. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#boot - * @since 3.11.0 - */ - boot: function () - { - var gl = this.gl; - var vertexBuffer = this.vertexBuffer; - var attributes = this.attributes; - var program = this.program; - var renderer = this.renderer; - var vertexSize = this.vertexSize; - - renderer.setProgram(program); - renderer.setVertexBuffer(vertexBuffer); - - for (var i = 0; i < attributes.length; i++) - { - var element = attributes[i]; - var location = gl.getAttribLocation(program, element.name); - - if (location >= 0) - { - gl.enableVertexAttribArray(location); - gl.vertexAttribPointer(location, element.size, element.type, element.normalized, vertexSize, element.offset); - element.enabled = true; - element.location = location; - } - else if (location !== -1) - { - gl.disableVertexAttribArray(location); - } - } - - return this; - }, - - /** - * Custom pipelines can use this method in order to perform any required pre-batch tasks - * for the given Game Object. It must return the texture unit the Game Object was assigned. - * - * @method Phaser.Renderer.WebGL.Pipelines.WebGLPipeline#setGameObject - * @since 3.50.0 - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object being rendered or added to the batch. - * @param {Phaser.Textures.Frame} [frame] - Optional frame to use. Can override that of the Game Object. - * - * @return {number} The texture unit the Game Object has been assigned. - */ - setGameObject: function (gameObject, frame) - { - if (frame === undefined) { frame = gameObject.frame; } - - this.currentUnit = this.renderer.setTextureSource(frame.source); - - return this.currentUnit; - }, - - /** - * Adds a description of vertex attribute to the pipeline - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#addAttribute - * @since 3.2.0 - * - * @param {string} name - Name of the vertex attribute - * @param {integer} size - Vertex component size - * @param {integer} type - Type of the attribute - * @param {boolean} normalized - Is the value normalized to a range - * @param {integer} offset - Byte offset to the beginning of the first element in the vertex - * - * @return {this} This WebGLPipeline instance. - */ - addAttribute: function (name, size, type, normalized, offset) - { - this.attributes.push({ - name: name, - size: size, - type: this.renderer.glFormats[type], - normalized: normalized, - offset: offset, - enabled: false, - location: -1 - }); - - this.vertexComponentCount = Utils.getComponentCount( - this.attributes, - this.gl - ); - return this; - }, - - /** - * Check if the current batch of vertices is full. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#shouldFlush - * @since 3.0.0 - * - * @return {boolean} `true` if the current batch should be flushed, otherwise `false`. - */ - shouldFlush: function () - { - return (this.vertexCount >= this.vertexCapacity); - }, - - /** - * Resizes the properties used to describe the viewport - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#resize - * @since 3.0.0 - * - * @param {number} width - The new width of this WebGL Pipeline. - * @param {number} height - The new height of this WebGL Pipeline. - * @param {number} resolution - The resolution this WebGL Pipeline should be resized to. - * - * @return {this} This WebGLPipeline instance. - */ - resize: function (width, height, resolution) - { - this.width = width * resolution; - this.height = height * resolution; - this.resolution = resolution; - - return this; - }, - - /** - * Binds the pipeline resources, including the program, vertex buffer and attribute pointers. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#bind - * @since 3.0.0 - * - * @return {this} This WebGLPipeline instance. - */ - bind: function () - { - var vertexBuffer = this.vertexBuffer; - var program = this.program; - var renderer = this.renderer; - - renderer.setProgram(program); - renderer.setVertexBuffer(vertexBuffer); - - this.setAttribPointers(); - - return this; - }, - - /** - * Sets the vertex attribute pointers. - * This should only be called after the vertex buffer has been bound. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setAttribPointers - * @since 3.50.0 - * - * @return {this} This WebGLPipeline instance. - */ - setAttribPointers: function () - { - var gl = this.gl; - var attributes = this.attributes; - var vertexSize = this.vertexSize; - - for (var i = 0; i < attributes.length; i++) - { - var element = attributes[i]; - - if (element.enabled) - { - gl.vertexAttribPointer(element.location, element.size, element.type, element.normalized, vertexSize, element.offset); - } - else if (!element.enabled && element.location > -1) - { - gl.disableVertexAttribArray(element.location); - element.location = -1; - } - } - }, - - /** - * Set whenever this WebGL Pipeline is bound to a WebGL Renderer. - * - * This method is called every time the WebGL Pipeline is attempted to be bound, even if it already is the current pipeline. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#onBind - * @since 3.0.0 - * - * @return {this} This WebGLPipeline instance. - */ - onBind: function () - { - // This is for updating uniform data it's called on each bind attempt. - return this; - }, - - /** - * Called before each frame is rendered, but after the canvas has been cleared. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#onPreRender - * @since 3.0.0 - * - * @return {this} This WebGLPipeline instance. - */ - onPreRender: function () - { - // called once every frame - return this; - }, - - /** - * Called before a Scene's Camera is rendered. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#onRender - * @since 3.0.0 - * - * @param {Phaser.Scene} scene - The Scene being rendered. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera being rendered with. - * - * @return {this} This WebGLPipeline instance. - */ - onRender: function () - { - // called for each camera - return this; - }, - - /** - * Called after each frame has been completely rendered and snapshots have been taken. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#onPostRender - * @since 3.0.0 - * - * @return {this} This WebGLPipeline instance. - */ - onPostRender: function () - { - // called once every frame - return this; - }, - - /** - * Uploads the vertex data and emits a draw call - * for the current batch of vertices. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#flush - * @since 3.0.0 - * - * @return {this} This WebGLPipeline instance. - */ - flush: function () - { - if (this.flushLocked) { return this; } - - this.flushLocked = true; - - var gl = this.gl; - var vertexCount = this.vertexCount; - var topology = this.topology; - var vertexSize = this.vertexSize; - - if (vertexCount === 0) - { - this.flushLocked = false; - return; - } - - gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize)); - gl.drawArrays(topology, 0, vertexCount); - - this.vertexCount = 0; - this.flushLocked = false; - - return this; - }, - - /** - * Removes all object references in this WebGL Pipeline and removes its program from the WebGL context. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#destroy - * @since 3.0.0 - * - * @return {this} This WebGLPipeline instance. - */ - destroy: function () - { - var gl = this.gl; - - gl.deleteProgram(this.program); - gl.deleteBuffer(this.vertexBuffer); - - delete this.program; - delete this.vertexBuffer; - delete this.gl; - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat1 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {number} x - The new value of the `float` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat1: function (name, x) - { - this.renderer.setFloat1(this.program, name, x); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat2 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {number} x - The new X component of the `vec2` uniform. - * @param {number} y - The new Y component of the `vec2` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat2: function (name, x, y) - { - this.renderer.setFloat2(this.program, name, x, y); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat3 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {number} x - The new X component of the `vec3` uniform. - * @param {number} y - The new Y component of the `vec3` uniform. - * @param {number} z - The new Z component of the `vec3` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat3: function (name, x, y, z) - { - this.renderer.setFloat3(this.program, name, x, y, z); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat4 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {number} x - X component of the uniform - * @param {number} y - Y component of the uniform - * @param {number} z - Z component of the uniform - * @param {number} w - W component of the uniform - * - * @return {this} This WebGLPipeline instance. - */ - setFloat4: function (name, x, y, z, w) - { - this.renderer.setFloat4(this.program, name, x, y, z, w); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat1v - * @since 3.13.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {Float32Array} arr - The new value to be used for the uniform variable. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat1v: function (name, arr) - { - this.renderer.setFloat1v(this.program, name, arr); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat2v - * @since 3.13.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {Float32Array} arr - The new value to be used for the uniform variable. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat2v: function (name, arr) - { - this.renderer.setFloat2v(this.program, name, arr); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat3v - * @since 3.13.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {Float32Array} arr - The new value to be used for the uniform variable. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat3v: function (name, arr) - { - this.renderer.setFloat3v(this.program, name, arr); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat4v - * @since 3.13.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {Float32Array} arr - The new value to be used for the uniform variable. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat4v: function (name, arr) - { - this.renderer.setFloat4v(this.program, name, arr); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt1 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {integer} x - The new value of the `int` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setInt1: function (name, x) - { - this.renderer.setInt1(this.program, name, x); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt2 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {integer} x - The new X component of the `ivec2` uniform. - * @param {integer} y - The new Y component of the `ivec2` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setInt2: function (name, x, y) - { - this.renderer.setInt2(this.program, name, x, y); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt3 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {integer} x - The new X component of the `ivec3` uniform. - * @param {integer} y - The new Y component of the `ivec3` uniform. - * @param {integer} z - The new Z component of the `ivec3` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setInt3: function (name, x, y, z) - { - this.renderer.setInt3(this.program, name, x, y, z); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt4 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {integer} x - X component of the uniform - * @param {integer} y - Y component of the uniform - * @param {integer} z - Z component of the uniform - * @param {integer} w - W component of the uniform - * - * @return {this} This WebGLPipeline instance. - */ - setInt4: function (name, x, y, z, w) - { - this.renderer.setInt4(this.program, name, x, y, z, w); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix2 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {boolean} transpose - Whether to transpose the matrix. Should be `false`. - * @param {Float32Array} matrix - The new values for the `mat2` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setMatrix2: function (name, transpose, matrix) - { - this.renderer.setMatrix2(this.program, name, transpose, matrix); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix3 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {boolean} transpose - Whether to transpose the matrix. Should be `false`. - * @param {Float32Array} matrix - The new values for the `mat3` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setMatrix3: function (name, transpose, matrix) - { - this.renderer.setMatrix3(this.program, name, transpose, matrix); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix4 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {boolean} transpose - Should the matrix be transpose - * @param {Float32Array} matrix - Matrix data - * - * @return {this} This WebGLPipeline instance. - */ - setMatrix4: function (name, transpose, matrix) - { - this.renderer.setMatrix4(this.program, name, transpose, matrix); - - return this; - } - -}); - -module.exports = WebGLPipeline; - - -/***/ }), -/* 150 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @author Felipe Alfonso <@bitnenfer> - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var Earcut = __webpack_require__(66); -var GetFastValue = __webpack_require__(2); -var ModelViewProjection = __webpack_require__(151); -var ProjectOrtho = __webpack_require__(181); -var ShaderSourceFS = __webpack_require__(790); -var ShaderSourceVS = __webpack_require__(791); -var TransformMatrix = __webpack_require__(30); -var Utils = __webpack_require__(10); -var WebGLPipeline = __webpack_require__(149); - -/** - * @classdesc - * TextureTintPipeline implements the rendering infrastructure - * for displaying textured objects - * The config properties are: - * - game: Current game instance. - * - renderer: Current WebGL renderer. - * - topology: This indicates how the primitives are rendered. The default value is GL_TRIANGLES. - * Here is the full list of rendering primitives (https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants). - * - vertShader: Source for vertex shader as a string. - * - fragShader: Source for fragment shader as a string. - * - vertexCapacity: The amount of vertices that shall be allocated - * - vertexSize: The size of a single vertex in bytes. - * - * @class TextureTintPipeline - * @extends Phaser.Renderer.WebGL.WebGLPipeline - * @memberof Phaser.Renderer.WebGL.Pipelines - * @constructor - * @since 3.0.0 - * - * @param {object} config - The configuration options for this Texture Tint Pipeline, as described above. - */ -var TextureTintPipeline = new Class({ - - Extends: WebGLPipeline, - - Mixins: [ - ModelViewProjection - ], - - initialize: - - function TextureTintPipeline (config) - { - var rendererConfig = config.renderer.config; - - var maxTextures = config.renderer.maxTextures; - - if (!config.fragShader) - { - var src = ''; - - for (var i = 0; i < maxTextures; i++) - { - if (i > 0) - { - src += '\n\telse '; - } - - if (i < maxTextures - 1) - { - src += 'if (outTexId < ' + i + '.5)'; - } - - src += '\n\t{'; - src += '\n\t\ttexture = texture2D(uMainSampler[' + i + '], outTexCoord);'; - src += '\n\t}'; - } - - var fragmentShaderSource = ShaderSourceFS.replace(/%count%/gi, maxTextures.toString()); - - fragmentShaderSource = fragmentShaderSource.replace(/%forloop%/gi, src); - } - else - { - fragmentShaderSource = config.fragShader; - } - - // Vertex Size = attribute size added together (2 + 2 + 1 + 4) - // Vertex Size = attribute size added together (2 + 2 + 1 + 1 + 4) inc maxTextures - - WebGLPipeline.call(this, { - game: config.game, - renderer: config.renderer, - gl: config.renderer.gl, - topology: GetFastValue(config, 'topology', config.renderer.gl.TRIANGLES), - vertShader: GetFastValue(config, 'vertShader', ShaderSourceVS), - fragShader: GetFastValue(config, 'fragShader', fragmentShaderSource), - vertexCapacity: GetFastValue(config, 'vertexCapacity', 6 * rendererConfig.batchSize), - vertexSize: GetFastValue(config, 'vertexSize', Float32Array.BYTES_PER_ELEMENT * 6 + Uint8Array.BYTES_PER_ELEMENT * 4), - attributes: [ - { - name: 'inPosition', - size: 2, - type: config.renderer.gl.FLOAT, - normalized: false, - offset: 0, - enabled: false, - location: -1 - }, - { - name: 'inTexCoord', - size: 2, - type: config.renderer.gl.FLOAT, - normalized: false, - offset: 4 * 2, - enabled: false, - location: -1 - }, - { - name: 'inTexId', - size: 1, - type: config.renderer.gl.FLOAT, - normalized: false, - offset: 4 * 4, - enabled: false, - location: -1 - }, - { - name: 'inTintEffect', - size: 1, - type: config.renderer.gl.FLOAT, - normalized: false, - offset: 4 * 5, - enabled: false, - location: -1 - }, - { - name: 'inTint', - size: 4, - type: config.renderer.gl.UNSIGNED_BYTE, - normalized: true, - offset: 4 * 6, - enabled: false, - location: -1 - } - ] - }); - - /** - * Float32 view of the array buffer containing the pipeline's vertices. - * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#vertexViewF32 - * @type {Float32Array} - * @since 3.0.0 - */ - this.vertexViewF32 = new Float32Array(this.vertexData); - - /** - * Uint32 view of the array buffer containing the pipeline's vertices. - * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#vertexViewU32 - * @type {Uint32Array} - * @since 3.0.0 - */ - this.vertexViewU32 = new Uint32Array(this.vertexData); - - /** - * A temporary Transform Matrix, re-used internally during batching. - * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#_tempMatrix1 - * @private - * @type {Phaser.GameObjects.Components.TransformMatrix} - * @since 3.11.0 - */ - this._tempMatrix1 = new TransformMatrix(); - - /** - * A temporary Transform Matrix, re-used internally during batching. - * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#_tempMatrix2 - * @private - * @type {Phaser.GameObjects.Components.TransformMatrix} - * @since 3.11.0 - */ - this._tempMatrix2 = new TransformMatrix(); - - /** - * A temporary Transform Matrix, re-used internally during batching. - * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#_tempMatrix3 - * @private - * @type {Phaser.GameObjects.Components.TransformMatrix} - * @since 3.11.0 - */ - this._tempMatrix3 = new TransformMatrix(); - - /** - * A temporary Transform Matrix, re-used internally during batching. - * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#_tempMatrix4 - * @private - * @type {Phaser.GameObjects.Components.TransformMatrix} - * @since 3.11.0 - */ - this._tempMatrix4 = new TransformMatrix(); - - /** - * Used internally to draw stroked triangles. - * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#tempTriangle - * @type {array} - * @private - * @since 3.12.0 - */ - 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 } - ]; - - /** - * The tint effect to be applied by the shader in the next geometry draw: - * - * 0 = texture multiplied by color - * 1 = solid color + texture alpha - * 2 = solid color, no texture - * 3 = solid texture, no color - * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#tintEffect - * @type {number} - * @private - * @since 3.12.0 - */ - this.tintEffect = 2; - - /** - * Cached stroke tint. - * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#strokeTint - * @type {object} - * @private - * @since 3.12.0 - */ - this.strokeTint = { TL: 0, TR: 0, BL: 0, BR: 0 }; - - /** - * Cached fill tint. - * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#fillTint - * @type {object} - * @private - * @since 3.12.0 - */ - this.fillTint = { TL: 0, TR: 0, BL: 0, BR: 0 }; - - /** - * Internal texture frame reference. - * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#currentFrame - * @type {Phaser.Textures.Frame} - * @private - * @since 3.12.0 - */ - this.currentFrame = { u0: 0, v0: 0, u1: 1, v1: 1 }; - - /** - * Internal path quad cache. - * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#firstQuad - * @type {array} - * @private - * @since 3.12.0 - */ - this.firstQuad = [ 0, 0, 0, 0, 0 ]; - - /** - * Internal path quad cache. - * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#prevQuad - * @type {array} - * @private - * @since 3.12.0 - */ - this.prevQuad = [ 0, 0, 0, 0, 0 ]; - - /** - * Used internally for triangulating a polygon. - * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#polygonCache - * @type {array} - * @private - * @since 3.12.0 - */ - this.polygonCache = []; - - this.mvpInit(); - }, - - /** - * Called every time the pipeline is bound by the renderer. - * Sets the shader program, vertex buffer and other resources. - * Should only be called when changing pipeline. - * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#bind - * @since 3.50.0 - * - * @return {this} This WebGLPipeline instance. - */ - bind: function () - { - WebGLPipeline.prototype.bind.call(this); - - this.renderer.setInt1iv(this.program, 'uMainSampler', this.renderer.textureIndexes); - - return this; - }, - - /** - * Called every time a Game Object needs to use this pipeline. - * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#onBind - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject} [gameObject] - The Game Object that invoked this pipeline, if any. - * - * @return {this} This WebGLPipeline instance. - */ - onBind: function () - { - this.mvpUpdate(); - - return this; - }, - - /** - * Resizes this pipeline and updates the projection. - * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#resize - * @since 3.0.0 - * - * @param {number} width - The new width. - * @param {number} height - The new height. - * @param {number} resolution - The resolution. - * - * @return {this} This WebGLPipeline instance. - */ - resize: function (width, height, resolution) - { - WebGLPipeline.prototype.resize.call(this, width, height, resolution); - - ProjectOrtho(this, 0, this.width, this.height, 0, -1000, 1000); - - return this; - }, - - /** - * Assigns a texture to the current batch. If a different texture is already set it creates a new batch object. - * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#setTexture2D - * @since 3.1.0 - * - * @param {WebGLTexture} [texture] - WebGLTexture that will be assigned to the current batch. If not given uses blankTexture. - * - * @return {number} The assigned texture unit. - */ - setTexture2D: function (texture) - { - if (texture === undefined) { texture = this.renderer.blankTexture.glTexture; } - - this.currentUnit = this.renderer.setTexture2D(texture); - - return this.currentUnit; - }, - - /** - * Uploads the vertex data and emits a draw call for the current batch of vertices. - * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#flush - * @since 3.0.0 - * - * @return {this} This WebGLPipeline instance. - */ - flush: function () - { - var gl = this.gl; - var vertexCount = this.vertexCount; - var vertexSize = this.vertexSize; - - if (vertexCount > 0) - { - if (vertexCount === this.vertexCapacity) - { - gl.bufferData(gl.ARRAY_BUFFER, this.vertexData, gl.DYNAMIC_DRAW); - } - else - { - gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize)); - } - - gl.drawArrays(this.topology, 0, vertexCount); - - this.vertexCount = 0; - } - - return this; - }, - - /** - * Takes a Sprite Game Object, or any object that extends it, and adds it to the batch. - * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchSprite - * @since 3.0.0 - * - * @param {(Phaser.GameObjects.Image|Phaser.GameObjects.Sprite)} sprite - The texture based Game Object to add to the batch. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to use for the rendering transform. - * @param {Phaser.GameObjects.Components.TransformMatrix} [parentTransformMatrix] - The transform matrix of the parent container, if set. - */ - batchSprite: function (sprite, camera, parentTransformMatrix) - { - // Will cause a flush if this isn't the current pipeline, vertexbuffer or program - this.renderer.setPipeline(this); - - var camMatrix = this._tempMatrix1; - var spriteMatrix = this._tempMatrix2; - var calcMatrix = this._tempMatrix3; - - var frame = sprite.frame; - var texture = frame.glTexture; - - var u0 = frame.u0; - var v0 = frame.v0; - var u1 = frame.u1; - var v1 = frame.v1; - var frameX = frame.x; - var frameY = frame.y; - var frameWidth = frame.cutWidth; - var frameHeight = frame.cutHeight; - var customPivot = frame.customPivot; - - var displayOriginX = sprite.displayOriginX; - var displayOriginY = sprite.displayOriginY; - - var x = -displayOriginX + frameX; - var y = -displayOriginY + frameY; - - if (sprite.isCropped) - { - var crop = sprite._crop; - - if (crop.flipX !== sprite.flipX || crop.flipY !== sprite.flipY) - { - frame.updateCropUVs(crop, sprite.flipX, sprite.flipY); - } - - u0 = crop.u0; - v0 = crop.v0; - u1 = crop.u1; - v1 = crop.v1; - - frameWidth = crop.width; - frameHeight = crop.height; - - frameX = crop.x; - frameY = crop.y; - - x = -displayOriginX + frameX; - y = -displayOriginY + frameY; - } - - var flipX = 1; - var flipY = 1; - - if (sprite.flipX) - { - if (!customPivot) - { - x += (-frame.realWidth + (displayOriginX * 2)); - } - - flipX = -1; - } - - // Auto-invert the flipY if this is coming from a GLTexture - if (sprite.flipY || (frame.source.isGLTexture && !texture.flipY)) - { - if (!customPivot) - { - y += (-frame.realHeight + (displayOriginY * 2)); - } - - flipY = -1; - } - - spriteMatrix.applyITRS(sprite.x, sprite.y, sprite.rotation, sprite.scaleX * flipX, sprite.scaleY * flipY); - - camMatrix.copyFrom(camera.matrix); - - if (parentTransformMatrix) - { - // Multiply the camera by the parent matrix - camMatrix.multiplyWithOffset(parentTransformMatrix, -camera.scrollX * sprite.scrollFactorX, -camera.scrollY * sprite.scrollFactorY); - - // Undo the camera scroll - spriteMatrix.e = sprite.x; - spriteMatrix.f = sprite.y; - - // Multiply by the Sprite matrix, store result in calcMatrix - camMatrix.multiply(spriteMatrix, calcMatrix); - } - else - { - spriteMatrix.e -= camera.scrollX * sprite.scrollFactorX; - spriteMatrix.f -= camera.scrollY * sprite.scrollFactorY; - - // Multiply by the Sprite matrix, store result in calcMatrix - camMatrix.multiply(spriteMatrix, calcMatrix); - } - - var xw = x + frameWidth; - var yh = y + frameHeight; - - var tx0 = calcMatrix.getX(x, y); - var ty0 = calcMatrix.getY(x, y); - - var tx1 = calcMatrix.getX(x, yh); - var ty1 = calcMatrix.getY(x, yh); - - var tx2 = calcMatrix.getX(xw, yh); - var ty2 = calcMatrix.getY(xw, yh); - - var tx3 = calcMatrix.getX(xw, y); - var ty3 = calcMatrix.getY(xw, y); - - var tintTL = Utils.getTintAppendFloatAlpha(sprite._tintTL, camera.alpha * sprite._alphaTL); - var tintTR = Utils.getTintAppendFloatAlpha(sprite._tintTR, camera.alpha * sprite._alphaTR); - var tintBL = Utils.getTintAppendFloatAlpha(sprite._tintBL, camera.alpha * sprite._alphaBL); - var tintBR = Utils.getTintAppendFloatAlpha(sprite._tintBR, camera.alpha * sprite._alphaBR); - - if (camera.roundPixels) - { - tx0 = Math.round(tx0); - ty0 = Math.round(ty0); - - tx1 = Math.round(tx1); - ty1 = Math.round(ty1); - - tx2 = Math.round(tx2); - ty2 = Math.round(ty2); - - tx3 = Math.round(tx3); - ty3 = Math.round(ty3); - } - - // So batchQuad never assigns a unit to the glTexture, but to the textureSource instead - if (this.vertexCount + 6 > this.vertexCapacity) - { - this.flush(); - } - - var unit = this.setGameObject(sprite); - - var tintEffect = (sprite._isTinted && sprite.tintFill); - - this.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, unit); - }, - - /** - * Adds the vertices data into the batch and flushes if full. - * - * Assumes 6 vertices in the following arrangement: - * - * ``` - * 0----3 - * |\ B| - * | \ | - * | \ | - * | A \| - * | \ - * 1----2 - * ``` - * - * Where tx0/ty0 = 0, tx1/ty1 = 1, tx2/ty2 = 2 and tx3/ty3 = 3 - * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchQuad - * @since 3.12.0 - * - * @param {number} x0 - The top-left x position. - * @param {number} y0 - The top-left y position. - * @param {number} x1 - The bottom-left x position. - * @param {number} y1 - The bottom-left y position. - * @param {number} x2 - The bottom-right x position. - * @param {number} y2 - The bottom-right y position. - * @param {number} x3 - The top-right x position. - * @param {number} y3 - The top-right y position. - * @param {number} u0 - UV u0 value. - * @param {number} v0 - UV v0 value. - * @param {number} u1 - UV u1 value. - * @param {number} v1 - UV v1 value. - * @param {number} tintTL - The top-left tint color value. - * @param {number} tintTR - The top-right tint color value. - * @param {number} tintBL - The bottom-left tint color value. - * @param {number} tintBR - The bottom-right tint color value. - * @param {(number|boolean)} tintEffect - The tint effect for the shader to use. - * @param {WebGLTexture} [texture] - WebGLTexture that will be assigned to the current batch if a flush occurs. - * @param {integer} [unit=0] - Texture unit to which the texture needs to be bound. - * - * @return {boolean} `true` if this method caused the batch to flush, otherwise `false`. - */ - batchQuad: function (x0, y0, x1, y1, x2, y2, x3, y3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, unit) - { - if (unit === undefined) { unit = this.currentUnit; } - - var hasFlushed = false; - - if (this.vertexCount + 6 > this.vertexCapacity) - { - this.flush(); - - hasFlushed = true; - - unit = this.setTexture2D(texture); - } - - var vertexViewF32 = this.vertexViewF32; - var vertexViewU32 = this.vertexViewU32; - - var vertexOffset = (this.vertexCount * this.vertexComponentCount) - 1; - - vertexViewF32[++vertexOffset] = x0; - vertexViewF32[++vertexOffset] = y0; - vertexViewF32[++vertexOffset] = u0; - vertexViewF32[++vertexOffset] = v0; - vertexViewF32[++vertexOffset] = unit; - vertexViewF32[++vertexOffset] = tintEffect; - vertexViewU32[++vertexOffset] = tintTL; - - vertexViewF32[++vertexOffset] = x1; - vertexViewF32[++vertexOffset] = y1; - vertexViewF32[++vertexOffset] = u0; - vertexViewF32[++vertexOffset] = v1; - vertexViewF32[++vertexOffset] = unit; - vertexViewF32[++vertexOffset] = tintEffect; - vertexViewU32[++vertexOffset] = tintBL; - - vertexViewF32[++vertexOffset] = x2; - vertexViewF32[++vertexOffset] = y2; - vertexViewF32[++vertexOffset] = u1; - vertexViewF32[++vertexOffset] = v1; - vertexViewF32[++vertexOffset] = unit; - vertexViewF32[++vertexOffset] = tintEffect; - vertexViewU32[++vertexOffset] = tintBR; - - vertexViewF32[++vertexOffset] = x0; - vertexViewF32[++vertexOffset] = y0; - vertexViewF32[++vertexOffset] = u0; - vertexViewF32[++vertexOffset] = v0; - vertexViewF32[++vertexOffset] = unit; - vertexViewF32[++vertexOffset] = tintEffect; - vertexViewU32[++vertexOffset] = tintTL; - - vertexViewF32[++vertexOffset] = x2; - vertexViewF32[++vertexOffset] = y2; - vertexViewF32[++vertexOffset] = u1; - vertexViewF32[++vertexOffset] = v1; - vertexViewF32[++vertexOffset] = unit; - vertexViewF32[++vertexOffset] = tintEffect; - vertexViewU32[++vertexOffset] = tintBR; - - vertexViewF32[++vertexOffset] = x3; - vertexViewF32[++vertexOffset] = y3; - vertexViewF32[++vertexOffset] = u1; - vertexViewF32[++vertexOffset] = v0; - vertexViewF32[++vertexOffset] = unit; - vertexViewF32[++vertexOffset] = tintEffect; - vertexViewU32[++vertexOffset] = tintTR; - - this.vertexCount += 6; - - return hasFlushed; - }, - - /** - * Adds the vertices data into the batch and flushes if full. - * - * Assumes 3 vertices in the following arrangement: - * - * ``` - * 0 - * |\ - * | \ - * | \ - * | \ - * | \ - * 1-----2 - * ``` - * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchTri - * @since 3.12.0 - * - * @param {number} x1 - The bottom-left x position. - * @param {number} y1 - The bottom-left y position. - * @param {number} x2 - The bottom-right x position. - * @param {number} y2 - The bottom-right y position. - * @param {number} x3 - The top-right x position. - * @param {number} y3 - The top-right y position. - * @param {number} u0 - UV u0 value. - * @param {number} v0 - UV v0 value. - * @param {number} u1 - UV u1 value. - * @param {number} v1 - UV v1 value. - * @param {number} tintTL - The top-left tint color value. - * @param {number} tintTR - The top-right tint color value. - * @param {number} tintBL - The bottom-left tint color value. - * @param {(number|boolean)} tintEffect - The tint effect for the shader to use. - * @param {WebGLTexture} [texture] - WebGLTexture that will be assigned to the current batch if a flush occurs. - * @param {integer} [unit=0] - Texture unit to which the texture needs to be bound. - * - * @return {boolean} `true` if this method caused the batch to flush, otherwise `false`. - */ - batchTri: function (x1, y1, x2, y2, x3, y3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintEffect, texture, unit) - { - if (unit === undefined) { unit = this.currentUnit; } - - var hasFlushed = false; - - if (this.vertexCount + 3 > this.vertexCapacity) - { - this.flush(); - - hasFlushed = true; - - unit = this.setTexture2D(texture); - } - - var vertexViewF32 = this.vertexViewF32; - var vertexViewU32 = this.vertexViewU32; - - var vertexOffset = (this.vertexCount * this.vertexComponentCount) - 1; - - vertexViewF32[++vertexOffset] = x1; - vertexViewF32[++vertexOffset] = y1; - vertexViewF32[++vertexOffset] = u0; - vertexViewF32[++vertexOffset] = v0; - vertexViewF32[++vertexOffset] = unit; - vertexViewF32[++vertexOffset] = tintEffect; - vertexViewU32[++vertexOffset] = tintTL; - - vertexViewF32[++vertexOffset] = x2; - vertexViewF32[++vertexOffset] = y2; - vertexViewF32[++vertexOffset] = u0; - vertexViewF32[++vertexOffset] = v1; - vertexViewF32[++vertexOffset] = unit; - vertexViewF32[++vertexOffset] = tintEffect; - vertexViewU32[++vertexOffset] = tintTR; - - vertexViewF32[++vertexOffset] = x3; - vertexViewF32[++vertexOffset] = y3; - vertexViewF32[++vertexOffset] = u1; - vertexViewF32[++vertexOffset] = v1; - vertexViewF32[++vertexOffset] = unit; - vertexViewF32[++vertexOffset] = tintEffect; - vertexViewU32[++vertexOffset] = tintBL; - - this.vertexCount += 3; - - return hasFlushed; - }, - - /** - * Generic function for batching a textured quad using argument values instead of a Game Object. - * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchTexture - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject} gameObject - Source GameObject. - * @param {WebGLTexture} texture - Raw WebGLTexture associated with the quad. - * @param {integer} textureWidth - Real texture width. - * @param {integer} textureHeight - Real texture height. - * @param {number} srcX - X coordinate of the quad. - * @param {number} srcY - Y coordinate of the quad. - * @param {number} srcWidth - Width of the quad. - * @param {number} srcHeight - Height of the quad. - * @param {number} scaleX - X component of scale. - * @param {number} scaleY - Y component of scale. - * @param {number} rotation - Rotation of the quad. - * @param {boolean} flipX - Indicates if the quad is horizontally flipped. - * @param {boolean} flipY - Indicates if the quad is vertically flipped. - * @param {number} scrollFactorX - By which factor is the quad affected by the camera horizontal scroll. - * @param {number} scrollFactorY - By which factor is the quad effected by the camera vertical scroll. - * @param {number} displayOriginX - Horizontal origin in pixels. - * @param {number} displayOriginY - Vertical origin in pixels. - * @param {number} frameX - X coordinate of the texture frame. - * @param {number} frameY - Y coordinate of the texture frame. - * @param {number} frameWidth - Width of the texture frame. - * @param {number} frameHeight - Height of the texture frame. - * @param {integer} tintTL - Tint for top left. - * @param {integer} tintTR - Tint for top right. - * @param {integer} tintBL - Tint for bottom left. - * @param {integer} tintBR - Tint for bottom right. - * @param {number} tintEffect - The tint effect. - * @param {number} uOffset - Horizontal offset on texture coordinate. - * @param {number} vOffset - Vertical offset on texture coordinate. - * @param {Phaser.Cameras.Scene2D.Camera} camera - Current used camera. - * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - Parent container. - * @param {boolean} [skipFlip=false] - Skip the renderTexture check. - * @param {number} [textureUnit] - Use the currently bound texture unit? - */ - batchTexture: function ( - gameObject, - texture, - textureWidth, textureHeight, - srcX, srcY, - srcWidth, srcHeight, - scaleX, scaleY, - rotation, - flipX, flipY, - scrollFactorX, scrollFactorY, - displayOriginX, displayOriginY, - frameX, frameY, frameWidth, frameHeight, - tintTL, tintTR, tintBL, tintBR, tintEffect, - uOffset, vOffset, - camera, - parentTransformMatrix, - skipFlip, - textureUnit) - { - var renderer = this.renderer; - - renderer.setPipeline(this, gameObject); - - var camMatrix = this._tempMatrix1; - var spriteMatrix = this._tempMatrix2; - var calcMatrix = this._tempMatrix3; - - var u0 = (frameX / textureWidth) + uOffset; - var v0 = (frameY / textureHeight) + vOffset; - var u1 = (frameX + frameWidth) / textureWidth + uOffset; - var v1 = (frameY + frameHeight) / textureHeight + vOffset; - - var width = srcWidth; - var height = srcHeight; - - var x = -displayOriginX; - var y = -displayOriginY; - - if (gameObject.isCropped) - { - var crop = gameObject._crop; - - width = crop.width; - height = crop.height; - - srcWidth = crop.width; - srcHeight = crop.height; - - frameX = crop.x; - frameY = crop.y; - - var ox = frameX; - var oy = frameY; - - if (flipX) - { - ox = (frameWidth - crop.x - crop.width); - } - - if (flipY && !texture.isRenderTexture) - { - oy = (frameHeight - crop.y - crop.height); - } - - u0 = (ox / textureWidth) + uOffset; - v0 = (oy / textureHeight) + vOffset; - u1 = (ox + crop.width) / textureWidth + uOffset; - v1 = (oy + crop.height) / textureHeight + vOffset; - - x = -displayOriginX + frameX; - y = -displayOriginY + frameY; - } - - // Invert the flipY if this is a RenderTexture - flipY = flipY ^ (!skipFlip && texture.isRenderTexture ? 1 : 0); - - if (flipX) - { - width *= -1; - x += srcWidth; - } - - if (flipY) - { - height *= -1; - y += srcHeight; - } - - var xw = x + width; - var yh = y + height; - - spriteMatrix.applyITRS(srcX, srcY, rotation, scaleX, scaleY); - - camMatrix.copyFrom(camera.matrix); - - if (parentTransformMatrix) - { - // Multiply the camera by the parent matrix - camMatrix.multiplyWithOffset(parentTransformMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY); - - // Undo the camera scroll - spriteMatrix.e = srcX; - spriteMatrix.f = srcY; - - // Multiply by the Sprite matrix, store result in calcMatrix - camMatrix.multiply(spriteMatrix, calcMatrix); - } - else - { - spriteMatrix.e -= camera.scrollX * scrollFactorX; - spriteMatrix.f -= camera.scrollY * scrollFactorY; - - // Multiply by the Sprite matrix, store result in calcMatrix - camMatrix.multiply(spriteMatrix, calcMatrix); - } - - var tx0 = calcMatrix.getX(x, y); - var ty0 = calcMatrix.getY(x, y); - - var tx1 = calcMatrix.getX(x, yh); - var ty1 = calcMatrix.getY(x, yh); - - var tx2 = calcMatrix.getX(xw, yh); - var ty2 = calcMatrix.getY(xw, yh); - - var tx3 = calcMatrix.getX(xw, y); - var ty3 = calcMatrix.getY(xw, y); - - if (camera.roundPixels) - { - tx0 = Math.round(tx0); - ty0 = Math.round(ty0); - - tx1 = Math.round(tx1); - ty1 = Math.round(ty1); - - tx2 = Math.round(tx2); - ty2 = Math.round(ty2); - - tx3 = Math.round(tx3); - ty3 = Math.round(ty3); - } - - if (textureUnit === undefined) - { - textureUnit = this.renderer.setTexture2D(texture); - } - - this.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, textureUnit); - }, - - /** - * Adds a Texture Frame into the batch for rendering. - * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchTextureFrame - * @since 3.12.0 - * - * @param {Phaser.Textures.Frame} frame - The Texture Frame to be rendered. - * @param {number} x - The horizontal position to render the texture at. - * @param {number} y - The vertical position to render the texture at. - * @param {number} tint - The tint color. - * @param {number} alpha - The alpha value. - * @param {Phaser.GameObjects.Components.TransformMatrix} transformMatrix - The Transform Matrix to use for the texture. - * @param {Phaser.GameObjects.Components.TransformMatrix} [parentTransformMatrix] - A parent Transform Matrix. - */ - batchTextureFrame: function ( - frame, - x, y, - tint, alpha, - transformMatrix, - parentTransformMatrix - ) - { - this.renderer.setPipeline(this); - - var spriteMatrix = this._tempMatrix1.copyFrom(transformMatrix); - var calcMatrix = this._tempMatrix2; - - var xw = x + frame.width; - var yh = y + frame.height; - - if (parentTransformMatrix) - { - spriteMatrix.multiply(parentTransformMatrix, calcMatrix); - } - else - { - calcMatrix = spriteMatrix; - } - - var tx0 = calcMatrix.getX(x, y); - var ty0 = calcMatrix.getY(x, y); - - var tx1 = calcMatrix.getX(x, yh); - var ty1 = calcMatrix.getY(x, yh); - - var tx2 = calcMatrix.getX(xw, yh); - var ty2 = calcMatrix.getY(xw, yh); - - var tx3 = calcMatrix.getX(xw, y); - var ty3 = calcMatrix.getY(xw, y); - - // this.setTexture2D(frame.glTexture, 0); - var unit = this.renderer.setTextureSource(frame.source); - - tint = Utils.getTintAppendFloatAlpha(tint, alpha); - - this.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, frame.u0, frame.v0, frame.u1, frame.v1, tint, tint, tint, tint, 0, frame.glTexture, unit); - }, - - /** - * Pushes a filled rectangle into the vertex batch. - * - * The dimensions are run through `Math.floor` before the quad is generated. - * - * Rectangle has no transform values and isn't transformed into the local space. - * - * Used for directly batching untransformed rectangles, such as Camera background colors. - * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#drawFillRect - * @since 3.12.0 - * - * @param {number} x - Horizontal top left coordinate of the rectangle. - * @param {number} y - Vertical top left coordinate of the rectangle. - * @param {number} width - Width of the rectangle. - * @param {number} height - Height of the rectangle. - * @param {number} color - Color of the rectangle to draw. - * @param {number} alpha - Alpha value of the rectangle to draw. - */ - drawFillRect: function (x, y, width, height, color, alpha) - { - x = Math.floor(x); - y = Math.floor(y); - - var xw = Math.floor(x + width); - var yh = Math.floor(y + height); - - var blank = this.renderer.blankTexture.glTexture; - - var unit = this.renderer.setTexture2D(blank); - - var tint = Utils.getTintAppendFloatAlphaAndSwap(color, alpha); - - this.batchQuad(x, y, x, yh, xw, yh, xw, y, 0, 0, 1, 1, tint, tint, tint, tint, 2, blank, unit); - }, - - /** - * Pushes a filled rectangle into the vertex batch. - * Rectangle factors in the given transform matrices before adding to the batch. - * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchFillRect - * @since 3.12.0 - * - * @param {number} x - Horizontal top left coordinate of the rectangle. - * @param {number} y - Vertical top left coordinate of the rectangle. - * @param {number} width - Width of the rectangle. - * @param {number} height - Height of the rectangle. - * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform. - * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform. - */ - batchFillRect: function (x, y, width, height, currentMatrix, parentMatrix) - { - this.renderer.setPipeline(this); - - var calcMatrix = this._tempMatrix3; - - // Multiply and store result in calcMatrix, only if the parentMatrix is set, otherwise we'll use whatever values are already in the calcMatrix - if (parentMatrix) - { - parentMatrix.multiply(currentMatrix, calcMatrix); - } - - var xw = x + width; - var yh = y + height; - - var x0 = calcMatrix.getX(x, y); - var y0 = calcMatrix.getY(x, y); - - var x1 = calcMatrix.getX(x, yh); - var y1 = calcMatrix.getY(x, yh); - - var x2 = calcMatrix.getX(xw, yh); - var y2 = calcMatrix.getY(xw, yh); - - var x3 = calcMatrix.getX(xw, y); - var y3 = calcMatrix.getY(xw, y); - - var frame = this.currentFrame; - - var u0 = frame.u0; - var v0 = frame.v0; - var u1 = frame.u1; - var v1 = frame.v1; - - var tint = this.fillTint; - - this.batchQuad(x0, y0, x1, y1, x2, y2, x3, y3, u0, v0, u1, v1, tint.TL, tint.TR, tint.BL, tint.BR, this.tintEffect); - }, - - /** - * Pushes a filled triangle into the vertex batch. - * Triangle factors in the given transform matrices before adding to the batch. - * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchFillTriangle - * @since 3.12.0 - * - * @param {number} x0 - Point 0 x coordinate. - * @param {number} y0 - Point 0 y coordinate. - * @param {number} x1 - Point 1 x coordinate. - * @param {number} y1 - Point 1 y coordinate. - * @param {number} x2 - Point 2 x coordinate. - * @param {number} y2 - Point 2 y coordinate. - * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform. - * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform. - */ - batchFillTriangle: function (x0, y0, x1, y1, x2, y2, currentMatrix, parentMatrix) - { - this.renderer.setPipeline(this); - - var calcMatrix = this._tempMatrix3; - - // Multiply and store result in calcMatrix, only if the parentMatrix is set, otherwise we'll use whatever values are already in the calcMatrix - if (parentMatrix) - { - parentMatrix.multiply(currentMatrix, calcMatrix); - } - - var tx0 = calcMatrix.getX(x0, y0); - var ty0 = calcMatrix.getY(x0, y0); - - var tx1 = calcMatrix.getX(x1, y1); - var ty1 = calcMatrix.getY(x1, y1); - - var tx2 = calcMatrix.getX(x2, y2); - var ty2 = calcMatrix.getY(x2, y2); - - var frame = this.currentFrame; - - var u0 = frame.u0; - var v0 = frame.v0; - var u1 = frame.u1; - var v1 = frame.v1; - - this.batchTri(tx0, ty0, tx1, ty1, tx2, ty2, u0, v0, u1, v1, this.fillTint.TL, this.fillTint.TR, this.fillTint.BL, this.tintEffect); - }, - - /** - * Pushes a stroked triangle into the vertex batch. - * Triangle factors in the given transform matrices before adding to the batch. - * The triangle is created from 3 lines and drawn using the `batchStrokePath` method. - * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchStrokeTriangle - * @since 3.12.0 - * - * @param {number} x0 - Point 0 x coordinate. - * @param {number} y0 - Point 0 y coordinate. - * @param {number} x1 - Point 1 x coordinate. - * @param {number} y1 - Point 1 y coordinate. - * @param {number} x2 - Point 2 x coordinate. - * @param {number} y2 - Point 2 y coordinate. - * @param {number} lineWidth - The width of the line in pixels. - * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform. - * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform. - */ - batchStrokeTriangle: function (x0, y0, x1, y1, x2, y2, lineWidth, currentMatrix, parentMatrix) - { - var tempTriangle = this.tempTriangle; - - tempTriangle[0].x = x0; - tempTriangle[0].y = y0; - tempTriangle[0].width = lineWidth; - - tempTriangle[1].x = x1; - tempTriangle[1].y = y1; - tempTriangle[1].width = lineWidth; - - tempTriangle[2].x = x2; - tempTriangle[2].y = y2; - tempTriangle[2].width = lineWidth; - - tempTriangle[3].x = x0; - tempTriangle[3].y = y0; - tempTriangle[3].width = lineWidth; - - this.batchStrokePath(tempTriangle, lineWidth, false, currentMatrix, parentMatrix); - }, - - /** - * Adds the given path to the vertex batch for rendering. - * - * It works by taking the array of path data and then passing it through Earcut, which - * creates a list of polygons. Each polygon is then added to the batch. - * - * The path is always automatically closed because it's filled. - * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchFillPath - * @since 3.12.0 - * - * @param {array} path - Collection of points that represent the path. - * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform. - * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform. - */ - batchFillPath: function (path, currentMatrix, parentMatrix) - { - this.renderer.setPipeline(this); - - var calcMatrix = this._tempMatrix3; - - // Multiply and store result in calcMatrix, only if the parentMatrix is set, otherwise we'll use whatever values are already in the calcMatrix - if (parentMatrix) - { - parentMatrix.multiply(currentMatrix, calcMatrix); - } - - var length = path.length; - var polygonCache = this.polygonCache; - var polygonIndexArray; - var point; - - var tintTL = this.fillTint.TL; - var tintTR = this.fillTint.TR; - var tintBL = this.fillTint.BL; - var tintEffect = this.tintEffect; - - for (var pathIndex = 0; pathIndex < length; ++pathIndex) - { - point = path[pathIndex]; - polygonCache.push(point.x, point.y); - } - - polygonIndexArray = Earcut(polygonCache); - length = polygonIndexArray.length; - - var frame = this.currentFrame; - - for (var index = 0; index < length; index += 3) - { - var p0 = polygonIndexArray[index + 0] * 2; - var p1 = polygonIndexArray[index + 1] * 2; - var p2 = polygonIndexArray[index + 2] * 2; - - var x0 = polygonCache[p0 + 0]; - var y0 = polygonCache[p0 + 1]; - var x1 = polygonCache[p1 + 0]; - var y1 = polygonCache[p1 + 1]; - var x2 = polygonCache[p2 + 0]; - var y2 = polygonCache[p2 + 1]; - - var tx0 = calcMatrix.getX(x0, y0); - var ty0 = calcMatrix.getY(x0, y0); - - var tx1 = calcMatrix.getX(x1, y1); - var ty1 = calcMatrix.getY(x1, y1); - - var tx2 = calcMatrix.getX(x2, y2); - var ty2 = calcMatrix.getY(x2, y2); - - var u0 = frame.u0; - var v0 = frame.v0; - var u1 = frame.u1; - var v1 = frame.v1; - - this.batchTri(tx0, ty0, tx1, ty1, tx2, ty2, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintEffect); - } - - polygonCache.length = 0; - }, - - /** - * Adds the given path to the vertex batch for rendering. - * - * It works by taking the array of path data and calling `batchLine` for each section - * of the path. - * - * The path is optionally closed at the end. - * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchStrokePath - * @since 3.12.0 - * - * @param {array} path - Collection of points that represent the path. - * @param {number} lineWidth - The width of the line segments in pixels. - * @param {boolean} pathOpen - Indicates if the path should be closed or left open. - * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform. - * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform. - */ - batchStrokePath: function (path, lineWidth, pathOpen, currentMatrix, parentMatrix) - { - this.renderer.setPipeline(this); - - // Reset the closePath booleans - this.prevQuad[4] = 0; - this.firstQuad[4] = 0; - - var pathLength = path.length - 1; - - for (var pathIndex = 0; pathIndex < pathLength; pathIndex++) - { - var point0 = path[pathIndex]; - var point1 = path[pathIndex + 1]; - - this.batchLine( - point0.x, - point0.y, - point1.x, - point1.y, - point0.width / 2, - point1.width / 2, - lineWidth, - pathIndex, - !pathOpen && (pathIndex === pathLength - 1), - currentMatrix, - parentMatrix - ); - } - }, - - /** - * Creates a line out of 4 quads and adds it to the vertex batch based on the given line values. - * Assumes a texture has already been set, prior to calling this function. - * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchLine - * @since 3.12.0 - * - * @param {number} ax - X coordinate to the start of the line - * @param {number} ay - Y coordinate to the start of the line - * @param {number} bx - X coordinate to the end of the line - * @param {number} by - Y coordinate to the end of the line - * @param {number} aLineWidth - Width of the start of the line - * @param {number} bLineWidth - Width of the end of the line - * @param {Float32Array} currentMatrix - Parent matrix, generally used by containers - */ - batchLine: function (ax, ay, bx, by, aLineWidth, bLineWidth, lineWidth, index, closePath, currentMatrix, parentMatrix) - { - this.renderer.setPipeline(this); - - var calcMatrix = this._tempMatrix3; - - // Multiply and store result in calcMatrix, only if the parentMatrix is set, otherwise we'll use whatever values are already in the calcMatrix - if (parentMatrix) - { - parentMatrix.multiply(currentMatrix, calcMatrix); - } - - var dx = bx - ax; - var dy = by - ay; - - var len = Math.sqrt(dx * dx + dy * dy); - var al0 = aLineWidth * (by - ay) / len; - var al1 = aLineWidth * (ax - bx) / len; - var bl0 = bLineWidth * (by - ay) / len; - var bl1 = bLineWidth * (ax - bx) / len; - - var lx0 = bx - bl0; - var ly0 = by - bl1; - var lx1 = ax - al0; - var ly1 = ay - al1; - var lx2 = bx + bl0; - var ly2 = by + bl1; - var lx3 = ax + al0; - var ly3 = ay + al1; - - // tx0 = bottom right - var brX = calcMatrix.getX(lx0, ly0); - var brY = calcMatrix.getY(lx0, ly0); - - // tx1 = bottom left - var blX = calcMatrix.getX(lx1, ly1); - var blY = calcMatrix.getY(lx1, ly1); - - // tx2 = top right - var trX = calcMatrix.getX(lx2, ly2); - var trY = calcMatrix.getY(lx2, ly2); - - // tx3 = top left - var tlX = calcMatrix.getX(lx3, ly3); - var tlY = calcMatrix.getY(lx3, ly3); - - var tint = this.strokeTint; - var tintEffect = this.tintEffect; - - var tintTL = tint.TL; - var tintTR = tint.TR; - var tintBL = tint.BL; - var tintBR = tint.BR; - - var frame = this.currentFrame; - - var u0 = frame.u0; - var v0 = frame.v0; - var u1 = frame.u1; - var v1 = frame.v1; - - // TL, BL, BR, TR - this.batchQuad(tlX, tlY, blX, blY, brX, brY, trX, trY, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect); - - if (lineWidth <= 2) - { - // No point doing a linejoin if the line isn't thick enough - return; - } - - var prev = this.prevQuad; - var first = this.firstQuad; - - if (index > 0 && prev[4]) - { - this.batchQuad(tlX, tlY, blX, blY, prev[0], prev[1], prev[2], prev[3], u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect); - } - else - { - first[0] = tlX; - first[1] = tlY; - first[2] = blX; - first[3] = blY; - first[4] = 1; - } - - if (closePath && first[4]) - { - // Add a join for the final path segment - this.batchQuad(brX, brY, trX, trY, first[0], first[1], first[2], first[3], u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect); - } - else - { - // Store it - - prev[0] = brX; - prev[1] = brY; - prev[2] = trX; - prev[3] = trY; - prev[4] = 1; - } - } - -}); - -module.exports = TextureTintPipeline; - - -/***/ }), -/* 151 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Implements a model view projection matrices. - * Pipelines can implement this for doing 2D and 3D rendering. - * - * @namespace Phaser.Renderer.WebGL.Pipelines.ModelViewProjection - * @since 3.0.0 - */ -var ModelViewProjection = { - - /** - * Dirty flag for checking if model matrix needs to be updated on GPU. - * - * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelMatrixDirty - * @type {boolean} - * @since 3.0.0 - */ - modelMatrixDirty: false, - - /** - * Dirty flag for checking if view matrix needs to be updated on GPU. - * - * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewMatrixDirty - * @type {boolean} - * @since 3.0.0 - */ - viewMatrixDirty: false, - - /** - * Dirty flag for checking if projection matrix needs to be updated on GPU. - * - * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projectionMatrixDirty - * @type {boolean} - * @since 3.0.0 - */ - projectionMatrixDirty: false, - - /** - * Model matrix - * - * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelMatrix - * @type {?Float32Array} - * @since 3.0.0 - */ - modelMatrix: null, - - /** - * View matrix - * - * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewMatrix - * @type {?Float32Array} - * @since 3.0.0 - */ - viewMatrix: null, - - /** - * Projection matrix - * - * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projectionMatrix - * @type {?Float32Array} - * @since 3.0.0 - */ - projectionMatrix: null, - - /** - * Initializes MVP matrices with an identity matrix - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#mvpInit - * @since 3.0.0 - */ - mvpInit: function () - { - this.modelMatrixDirty = true; - this.viewMatrixDirty = true; - this.projectionMatrixDirty = true; - - this.modelMatrix = new Float32Array([ - 1, 0, 0, 0, - 0, 1, 0, 0, - 0, 0, 1, 0, - 0, 0, 0, 1 - ]); - - 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 - ]); - - return this; - }, - - /** - * If dirty flags are set then the matrices are uploaded to the GPU. - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#mvpUpdate - * @since 3.0.0 - */ - mvpUpdate: function () - { - var program = this.program; - - if (this.modelMatrixDirty) - { - this.renderer.setMatrix4(program, 'uModelMatrix', false, this.modelMatrix); - this.modelMatrixDirty = false; - } - - if (this.viewMatrixDirty) - { - this.renderer.setMatrix4(program, 'uViewMatrix', false, this.viewMatrix); - this.viewMatrixDirty = false; - } - - if (this.projectionMatrixDirty) - { - this.renderer.setMatrix4(program, 'uProjectionMatrix', false, this.projectionMatrix); - this.projectionMatrixDirty = false; - } - - return this; - } -}; - -module.exports = ModelViewProjection; - - -/***/ }), -/* 152 */, -/* 153 */ +/* 153 */, +/* 154 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31733,7 +32349,7 @@ module.exports = CircumferencePoint; /***/ }), -/* 154 */ +/* 155 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31777,7 +32393,7 @@ module.exports = Random; /***/ }), -/* 155 */ +/* 156 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31789,7 +32405,7 @@ module.exports = Random; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(112); +var Events = __webpack_require__(115); var FindClosestInSorted = __webpack_require__(274); var Frame = __webpack_require__(275); var GetValue = __webpack_require__(6); @@ -32741,7 +33357,7 @@ module.exports = Animation; /***/ }), -/* 156 */ +/* 157 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32750,7 +33366,7 @@ module.exports = Animation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Perimeter = __webpack_require__(113); +var Perimeter = __webpack_require__(116); var Point = __webpack_require__(4); /** @@ -32822,7 +33438,7 @@ module.exports = GetPoint; /***/ }), -/* 157 */ +/* 158 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32887,7 +33503,7 @@ module.exports = GetPoints; /***/ }), -/* 158 */ +/* 159 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32927,7 +33543,7 @@ module.exports = Random; /***/ }), -/* 159 */ +/* 160 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32965,7 +33581,7 @@ module.exports = Random; /***/ }), -/* 160 */ +/* 161 */ /***/ (function(module, exports) { /** @@ -33008,19 +33624,20 @@ var Pipeline = { /** * Sets the initial WebGL Pipeline of this Game Object. + * * This should only be called during the instantiation of the Game Object. * * @method Phaser.GameObjects.Components.Pipeline#initPipeline * @webglOnly * @since 3.0.0 * - * @param {string} [pipelineName=TextureTintPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Texture Tint Pipeline. + * @param {string} [pipelineName=MultiPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Multi Pipeline. * * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. */ initPipeline: function (pipelineName) { - if (pipelineName === undefined) { pipelineName = 'TextureTintPipeline'; } + if (pipelineName === undefined) { pipelineName = 'MultiPipeline'; } var renderer = this.scene.sys.game.renderer; @@ -33094,7 +33711,7 @@ module.exports = Pipeline; /***/ }), -/* 161 */ +/* 162 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33149,7 +33766,7 @@ module.exports = TransformXY; /***/ }), -/* 162 */ +/* 163 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33190,7 +33807,7 @@ module.exports = Random; /***/ }), -/* 163 */ +/* 164 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33246,7 +33863,7 @@ module.exports = Random; /***/ }), -/* 164 */ +/* 165 */ /***/ (function(module, exports) { /** @@ -33287,7 +33904,7 @@ module.exports = RotateAroundDistance; /***/ }), -/* 165 */ +/* 166 */ /***/ (function(module, exports) { /** @@ -33326,7 +33943,7 @@ module.exports = SmootherStep; /***/ }), -/* 166 */ +/* 167 */ /***/ (function(module, exports) { /** @@ -33373,7 +33990,7 @@ module.exports = SmoothStep; /***/ }), -/* 167 */ +/* 168 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33746,7 +34363,7 @@ module.exports = Map; /***/ }), -/* 168 */ +/* 169 */ /***/ (function(module, exports) { /** @@ -33822,7 +34439,7 @@ module.exports = Pad; /***/ }), -/* 169 */ +/* 170 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33878,7 +34495,7 @@ module.exports = ValueToColor; /***/ }), -/* 170 */ +/* 171 */ /***/ (function(module, exports) { /** @@ -33908,7 +34525,7 @@ module.exports = GetColor; /***/ }), -/* 171 */ +/* 172 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33917,7 +34534,7 @@ module.exports = GetColor; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetColor = __webpack_require__(170); +var GetColor = __webpack_require__(171); /** * Converts an HSV (hue, saturation and value) color value to RGB. @@ -34009,7 +34626,7 @@ module.exports = HSVToRGB; /***/ }), -/* 172 */ +/* 173 */ /***/ (function(module, exports) { /** @@ -34141,7 +34758,7 @@ module.exports = Smoothing(); /***/ }), -/* 173 */ +/* 174 */ /***/ (function(module, exports) { /** @@ -34178,7 +34795,7 @@ module.exports = CenterOn; /***/ }), -/* 174 */ +/* 175 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34187,8 +34804,8 @@ module.exports = CenterOn; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var OS = __webpack_require__(119); -var Browser = __webpack_require__(120); +var OS = __webpack_require__(122); +var Browser = __webpack_require__(123); var CanvasPool = __webpack_require__(26); /** @@ -34370,7 +34987,7 @@ module.exports = init(); /***/ }), -/* 175 */ +/* 176 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34389,63 +35006,63 @@ var Extend = __webpack_require__(19); var PhaserMath = { // Collections of functions - Angle: __webpack_require__(735), - Distance: __webpack_require__(744), - Easing: __webpack_require__(749), - Fuzzy: __webpack_require__(750), - Interpolation: __webpack_require__(753), - Pow2: __webpack_require__(758), - Snap: __webpack_require__(760), + Angle: __webpack_require__(738), + Distance: __webpack_require__(747), + Easing: __webpack_require__(752), + Fuzzy: __webpack_require__(753), + Interpolation: __webpack_require__(756), + Pow2: __webpack_require__(761), + Snap: __webpack_require__(763), // Expose the RNG Class - RandomDataGenerator: __webpack_require__(762), + RandomDataGenerator: __webpack_require__(765), // Single functions - Average: __webpack_require__(763), + Average: __webpack_require__(766), Bernstein: __webpack_require__(328), - Between: __webpack_require__(177), - CatmullRom: __webpack_require__(176), - CeilTo: __webpack_require__(764), + Between: __webpack_require__(178), + CatmullRom: __webpack_require__(177), + CeilTo: __webpack_require__(767), Clamp: __webpack_require__(17), - DegToRad: __webpack_require__(39), - Difference: __webpack_require__(765), + DegToRad: __webpack_require__(40), + Difference: __webpack_require__(768), Factorial: __webpack_require__(329), - FloatBetween: __webpack_require__(121), - FloorTo: __webpack_require__(766), - FromPercent: __webpack_require__(87), - GetSpeed: __webpack_require__(767), - IsEven: __webpack_require__(768), - IsEvenStrict: __webpack_require__(769), - Linear: __webpack_require__(118), - MaxAdd: __webpack_require__(770), - MinSub: __webpack_require__(771), - Percent: __webpack_require__(772), - RadToDeg: __webpack_require__(178), - RandomXY: __webpack_require__(773), - RandomXYZ: __webpack_require__(774), - RandomXYZW: __webpack_require__(775), + FloatBetween: __webpack_require__(124), + FloorTo: __webpack_require__(769), + FromPercent: __webpack_require__(88), + GetSpeed: __webpack_require__(770), + IsEven: __webpack_require__(771), + IsEvenStrict: __webpack_require__(772), + Linear: __webpack_require__(121), + MaxAdd: __webpack_require__(773), + MinSub: __webpack_require__(774), + Percent: __webpack_require__(775), + RadToDeg: __webpack_require__(179), + RandomXY: __webpack_require__(776), + RandomXYZ: __webpack_require__(777), + RandomXYZW: __webpack_require__(778), Rotate: __webpack_require__(335), RotateAround: __webpack_require__(280), - RotateAroundDistance: __webpack_require__(164), - RotateTo: __webpack_require__(776), + RotateAroundDistance: __webpack_require__(165), + RotateTo: __webpack_require__(779), RoundAwayFromZero: __webpack_require__(336), - RoundTo: __webpack_require__(777), - SinCosTableGenerator: __webpack_require__(778), - SmootherStep: __webpack_require__(165), - SmoothStep: __webpack_require__(166), - ToXY: __webpack_require__(779), - TransformXY: __webpack_require__(161), - Within: __webpack_require__(780), + RoundTo: __webpack_require__(780), + SinCosTableGenerator: __webpack_require__(781), + SmootherStep: __webpack_require__(166), + SmoothStep: __webpack_require__(167), + ToXY: __webpack_require__(782), + TransformXY: __webpack_require__(162), + Within: __webpack_require__(783), Wrap: __webpack_require__(58), // Vector classes Vector2: __webpack_require__(3), - Vector3: __webpack_require__(94), - Vector4: __webpack_require__(179), + Vector3: __webpack_require__(80), + Vector4: __webpack_require__(126), Matrix3: __webpack_require__(337), Matrix4: __webpack_require__(338), Quaternion: __webpack_require__(339), - RotateVec3: __webpack_require__(781) + RotateVec3: __webpack_require__(784) }; @@ -34459,7 +35076,7 @@ module.exports = PhaserMath; /***/ }), -/* 176 */ +/* 177 */ /***/ (function(module, exports) { /** @@ -34496,7 +35113,7 @@ module.exports = CatmullRom; /***/ }), -/* 177 */ +/* 178 */ /***/ (function(module, exports) { /** @@ -34525,7 +35142,7 @@ module.exports = Between; /***/ }), -/* 178 */ +/* 179 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34554,551 +35171,6 @@ var RadToDeg = function (radians) module.exports = RadToDeg; -/***/ }), -/* 179 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji -// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl - -var Class = __webpack_require__(0); - -/** - * @classdesc - * A representation of a vector in 4D space. - * - * A four-component vector. - * - * @class Vector4 - * @memberof Phaser.Math - * @constructor - * @since 3.0.0 - * - * @param {number} [x] - The x component. - * @param {number} [y] - The y component. - * @param {number} [z] - The z component. - * @param {number} [w] - The w component. - */ -var Vector4 = new Class({ - - initialize: - - function Vector4 (x, y, z, w) - { - /** - * The x component of this Vector. - * - * @name Phaser.Math.Vector4#x - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.x = 0; - - /** - * The y component of this Vector. - * - * @name Phaser.Math.Vector4#y - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.y = 0; - - /** - * The z component of this Vector. - * - * @name Phaser.Math.Vector4#z - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.z = 0; - - /** - * The w component of this Vector. - * - * @name Phaser.Math.Vector4#w - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.w = 0; - - if (typeof x === 'object') - { - this.x = x.x || 0; - this.y = x.y || 0; - this.z = x.z || 0; - this.w = x.w || 0; - } - else - { - this.x = x || 0; - this.y = y || 0; - this.z = z || 0; - this.w = w || 0; - } - }, - - /** - * Make a clone of this Vector4. - * - * @method Phaser.Math.Vector4#clone - * @since 3.0.0 - * - * @return {Phaser.Math.Vector4} A clone of this Vector4. - */ - clone: function () - { - return new Vector4(this.x, this.y, this.z, this.w); - }, - - /** - * Copy the components of a given Vector into this Vector. - * - * @method Phaser.Math.Vector4#copy - * @since 3.0.0 - * - * @param {Phaser.Math.Vector4} src - The Vector to copy the components from. - * - * @return {Phaser.Math.Vector4} This Vector4. - */ - copy: function (src) - { - this.x = src.x; - this.y = src.y; - this.z = src.z || 0; - this.w = src.w || 0; - - return this; - }, - - /** - * Check whether this Vector is equal to a given Vector. - * - * Performs a strict quality check against each Vector's components. - * - * @method Phaser.Math.Vector4#equals - * @since 3.0.0 - * - * @param {Phaser.Math.Vector4} v - The vector to check equality with. - * - * @return {boolean} A boolean indicating whether the two Vectors are equal or not. - */ - equals: function (v) - { - return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z) && (this.w === v.w)); - }, - - /** - * Set the `x`, `y`, `z` and `w` components of the this Vector to the given `x`, `y`, `z` and `w` values. - * - * @method Phaser.Math.Vector4#set - * @since 3.0.0 - * - * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y, z and w components. - * @param {number} y - The y value to set for this Vector. - * @param {number} z - The z value to set for this Vector. - * @param {number} w - The z value to set for this Vector. - * - * @return {Phaser.Math.Vector4} This Vector4. - */ - set: function (x, y, z, w) - { - if (typeof x === 'object') - { - this.x = x.x || 0; - this.y = x.y || 0; - this.z = x.z || 0; - this.w = x.w || 0; - } - else - { - this.x = x || 0; - this.y = y || 0; - this.z = z || 0; - this.w = w || 0; - } - - return this; - }, - - /** - * Add a given Vector to this Vector. Addition is component-wise. - * - * @method Phaser.Math.Vector4#add - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to add to this Vector. - * - * @return {Phaser.Math.Vector4} This Vector4. - */ - add: function (v) - { - this.x += v.x; - this.y += v.y; - this.z += v.z || 0; - this.w += v.w || 0; - - return this; - }, - - /** - * Subtract the given Vector from this Vector. Subtraction is component-wise. - * - * @method Phaser.Math.Vector4#subtract - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to subtract from this Vector. - * - * @return {Phaser.Math.Vector4} This Vector4. - */ - subtract: function (v) - { - this.x -= v.x; - this.y -= v.y; - this.z -= v.z || 0; - this.w -= v.w || 0; - - return this; - }, - - /** - * Scale this Vector by the given value. - * - * @method Phaser.Math.Vector4#scale - * @since 3.0.0 - * - * @param {number} scale - The value to scale this Vector by. - * - * @return {Phaser.Math.Vector4} This Vector4. - */ - scale: function (scale) - { - this.x *= scale; - this.y *= scale; - this.z *= scale; - this.w *= scale; - - return this; - }, - - /** - * Calculate the length (or magnitude) of this Vector. - * - * @method Phaser.Math.Vector4#length - * @since 3.0.0 - * - * @return {number} The length of this Vector. - */ - length: function () - { - var x = this.x; - var y = this.y; - var z = this.z; - var w = this.w; - - return Math.sqrt(x * x + y * y + z * z + w * w); - }, - - /** - * Calculate the length of this Vector squared. - * - * @method Phaser.Math.Vector4#lengthSq - * @since 3.0.0 - * - * @return {number} The length of this Vector, squared. - */ - lengthSq: function () - { - var x = this.x; - var y = this.y; - var z = this.z; - var w = this.w; - - return x * x + y * y + z * z + w * w; - }, - - /** - * Normalize this Vector. - * - * Makes the vector a unit length vector (magnitude of 1) in the same direction. - * - * @method Phaser.Math.Vector4#normalize - * @since 3.0.0 - * - * @return {Phaser.Math.Vector4} This Vector4. - */ - normalize: function () - { - var x = this.x; - var y = this.y; - var z = this.z; - var w = this.w; - var len = x * x + y * y + z * z + w * w; - - if (len > 0) - { - len = 1 / Math.sqrt(len); - - this.x = x * len; - this.y = y * len; - this.z = z * len; - this.w = w * len; - } - - return this; - }, - - /** - * Calculate the dot product of this Vector and the given Vector. - * - * @method Phaser.Math.Vector4#dot - * @since 3.0.0 - * - * @param {Phaser.Math.Vector4} v - The Vector4 to dot product with this Vector4. - * - * @return {number} The dot product of this Vector and the given Vector. - */ - dot: function (v) - { - return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w; - }, - - /** - * Linearly interpolate between this Vector and the given Vector. - * - * Interpolates this Vector towards the given Vector. - * - * @method Phaser.Math.Vector4#lerp - * @since 3.0.0 - * - * @param {Phaser.Math.Vector4} v - The Vector4 to interpolate towards. - * @param {number} [t=0] - The interpolation percentage, between 0 and 1. - * - * @return {Phaser.Math.Vector4} This Vector4. - */ - lerp: function (v, t) - { - if (t === undefined) { t = 0; } - - var ax = this.x; - var ay = this.y; - var az = this.z; - var aw = this.w; - - this.x = ax + t * (v.x - ax); - this.y = ay + t * (v.y - ay); - this.z = az + t * (v.z - az); - this.w = aw + t * (v.w - aw); - - return this; - }, - - /** - * Perform a component-wise multiplication between this Vector and the given Vector. - * - * Multiplies this Vector by the given Vector. - * - * @method Phaser.Math.Vector4#multiply - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to multiply this Vector by. - * - * @return {Phaser.Math.Vector4} This Vector4. - */ - multiply: function (v) - { - this.x *= v.x; - this.y *= v.y; - this.z *= v.z || 1; - this.w *= v.w || 1; - - return this; - }, - - /** - * Perform a component-wise division between this Vector and the given Vector. - * - * Divides this Vector by the given Vector. - * - * @method Phaser.Math.Vector4#divide - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to divide this Vector by. - * - * @return {Phaser.Math.Vector4} This Vector4. - */ - divide: function (v) - { - this.x /= v.x; - this.y /= v.y; - this.z /= v.z || 1; - this.w /= v.w || 1; - - return this; - }, - - /** - * Calculate the distance between this Vector and the given Vector. - * - * @method Phaser.Math.Vector4#distance - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to. - * - * @return {number} The distance from this Vector to the given Vector. - */ - distance: function (v) - { - var dx = v.x - this.x; - var dy = v.y - this.y; - var dz = v.z - this.z || 0; - var dw = v.w - this.w || 0; - - return Math.sqrt(dx * dx + dy * dy + dz * dz + dw * dw); - }, - - /** - * Calculate the distance between this Vector and the given Vector, squared. - * - * @method Phaser.Math.Vector4#distanceSq - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to. - * - * @return {number} The distance from this Vector to the given Vector, squared. - */ - distanceSq: function (v) - { - var dx = v.x - this.x; - var dy = v.y - this.y; - var dz = v.z - this.z || 0; - var dw = v.w - this.w || 0; - - return dx * dx + dy * dy + dz * dz + dw * dw; - }, - - /** - * Negate the `x`, `y`, `z` and `w` components of this Vector. - * - * @method Phaser.Math.Vector4#negate - * @since 3.0.0 - * - * @return {Phaser.Math.Vector4} This Vector4. - */ - negate: function () - { - this.x = -this.x; - this.y = -this.y; - this.z = -this.z; - this.w = -this.w; - - return this; - }, - - /** - * Transform this Vector with the given Matrix. - * - * @method Phaser.Math.Vector4#transformMat4 - * @since 3.0.0 - * - * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector4 with. - * - * @return {Phaser.Math.Vector4} This Vector4. - */ - transformMat4: function (mat) - { - var x = this.x; - var y = this.y; - var z = this.z; - var w = this.w; - var m = mat.val; - - this.x = m[0] * x + m[4] * y + m[8] * z + m[12] * w; - this.y = m[1] * x + m[5] * y + m[9] * z + m[13] * w; - this.z = m[2] * x + m[6] * y + m[10] * z + m[14] * w; - this.w = m[3] * x + m[7] * y + m[11] * z + m[15] * w; - - return this; - }, - - /** - * Transform this Vector with the given Quaternion. - * - * @method Phaser.Math.Vector4#transformQuat - * @since 3.0.0 - * - * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with. - * - * @return {Phaser.Math.Vector4} This Vector4. - */ - transformQuat: function (q) - { - // TODO: is this really the same as Vector3? - // Also, what about this: http://molecularmusings.wordpress.com/2013/05/24/a-faster-quaternion-vector-multiplication/ - // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations - var x = this.x; - var y = this.y; - var z = this.z; - var qx = q.x; - var qy = q.y; - var qz = q.z; - var qw = q.w; - - // calculate quat * vec - var ix = qw * x + qy * z - qz * y; - var iy = qw * y + qz * x - qx * z; - var iz = qw * z + qx * y - qy * x; - var iw = -qx * x - qy * y - qz * z; - - // calculate result * inverse quat - this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy; - this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz; - this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx; - - return this; - }, - - /** - * Make this Vector the zero vector (0, 0, 0, 0). - * - * @method Phaser.Math.Vector4#reset - * @since 3.0.0 - * - * @return {Phaser.Math.Vector4} This Vector4. - */ - reset: function () - { - this.x = 0; - this.y = 0; - this.z = 0; - this.w = 0; - - return this; - } - -}); - -// TODO: Check if these are required internally, if not, remove. -Vector4.prototype.sub = Vector4.prototype.subtract; -Vector4.prototype.mul = Vector4.prototype.multiply; -Vector4.prototype.div = Vector4.prototype.divide; -Vector4.prototype.dist = Vector4.prototype.distance; -Vector4.prototype.distSq = Vector4.prototype.distanceSq; -Vector4.prototype.len = Vector4.prototype.length; -Vector4.prototype.lenSq = Vector4.prototype.lengthSq; - -module.exports = Vector4; - - /***/ }), /* 180 */ /***/ (function(module, exports, __webpack_require__) { @@ -35504,11 +35576,11 @@ module.exports = INPUT_CONST; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(127); +var CONST = __webpack_require__(131); var DefaultPlugins = __webpack_require__(180); var Events = __webpack_require__(22); -var GetPhysicsPlugins = __webpack_require__(883); -var GetScenePlugins = __webpack_require__(884); +var GetPhysicsPlugins = __webpack_require__(888); +var GetScenePlugins = __webpack_require__(889); var NOOP = __webpack_require__(1); var Settings = __webpack_require__(375); @@ -36840,39 +36912,39 @@ module.exports = Texture; module.exports = { - Matrix: __webpack_require__(919), + Matrix: __webpack_require__(924), - Add: __webpack_require__(926), - AddAt: __webpack_require__(927), - BringToTop: __webpack_require__(928), - CountAllMatching: __webpack_require__(929), - Each: __webpack_require__(930), - EachInRange: __webpack_require__(931), + Add: __webpack_require__(931), + AddAt: __webpack_require__(932), + BringToTop: __webpack_require__(933), + CountAllMatching: __webpack_require__(934), + Each: __webpack_require__(935), + EachInRange: __webpack_require__(936), FindClosestInSorted: __webpack_require__(274), GetAll: __webpack_require__(382), GetFirst: __webpack_require__(383), GetRandom: __webpack_require__(191), - MoveDown: __webpack_require__(932), - MoveTo: __webpack_require__(933), - MoveUp: __webpack_require__(934), - NumberArray: __webpack_require__(935), - NumberArrayStep: __webpack_require__(936), + MoveDown: __webpack_require__(937), + MoveTo: __webpack_require__(938), + MoveUp: __webpack_require__(939), + NumberArray: __webpack_require__(940), + NumberArrayStep: __webpack_require__(941), QuickSelect: __webpack_require__(391), Range: __webpack_require__(392), - Remove: __webpack_require__(125), - RemoveAt: __webpack_require__(937), - RemoveBetween: __webpack_require__(938), - RemoveRandomElement: __webpack_require__(939), - Replace: __webpack_require__(940), + Remove: __webpack_require__(129), + RemoveAt: __webpack_require__(942), + RemoveBetween: __webpack_require__(943), + RemoveRandomElement: __webpack_require__(944), + Replace: __webpack_require__(945), RotateLeft: __webpack_require__(290), RotateRight: __webpack_require__(291), SafeRange: __webpack_require__(68), - SendToBack: __webpack_require__(941), - SetAll: __webpack_require__(942), - Shuffle: __webpack_require__(116), - SpliceOne: __webpack_require__(80), - StableSort: __webpack_require__(133), - Swap: __webpack_require__(943) + SendToBack: __webpack_require__(946), + SetAll: __webpack_require__(947), + Shuffle: __webpack_require__(119), + SpliceOne: __webpack_require__(81), + StableSort: __webpack_require__(137), + Swap: __webpack_require__(948) }; @@ -36985,12 +37057,12 @@ module.exports = GetRandom; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(945); +var Events = __webpack_require__(950); /** * @classdesc * A Process Queue maintains three internal lists. - * + * * The `pending` list is a selection of items which are due to be made 'active' in the next update. * The `active` list is a selection of items which are considered active and should be updated. * The `destroy` list is a selection of items that were active and are awaiting being destroyed in the next update. @@ -37071,7 +37143,7 @@ var ProcessQueue = new Class({ /** * Adds a new item to the Process Queue. - * + * * The item is added to the pending list and made active in the next update. * * @method Phaser.Structs.ProcessQueue#add @@ -37095,7 +37167,7 @@ var ProcessQueue = new Class({ /** * Removes an item from the Process Queue. - * + * * The item is added to the pending destroy and fully removed in the next update. * * @method Phaser.Structs.ProcessQueue#remove @@ -37119,7 +37191,7 @@ var ProcessQueue = new Class({ /** * Removes all active items from this Process Queue. - * + * * All the items are marked as 'pending destroy' and fully removed in the next update. * * @method Phaser.Structs.ProcessQueue#removeAll @@ -37145,7 +37217,7 @@ var ProcessQueue = new Class({ /** * Update this queue. First it will process any items awaiting destruction, and remove them. - * + * * Then it will check to see if there are any items pending insertion, and move them to an * active state. Finally, it will return a list of active items for further processing. * @@ -37181,7 +37253,7 @@ var ProcessQueue = new Class({ { active.splice(idx, 1); - this.emit(Events.REMOVE, item); + this.emit(Events.PROCESS_QUEUE_REMOVE, item); } } @@ -37198,7 +37270,7 @@ var ProcessQueue = new Class({ this._active.push(item); - this.emit(Events.ADD, item); + this.emit(Events.PROCESS_QUEUE_ADD, item); } list.length = 0; @@ -37211,7 +37283,7 @@ var ProcessQueue = new Class({ /** * Returns the current list of active items. - * + * * This method returns a reference to the active list array, not a copy of it. * Therefore, be careful to not modify this array outside of the ProcessQueue. * @@ -37435,13 +37507,13 @@ module.exports = ParseXMLBitmapFont; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlitterRender = __webpack_require__(954); -var Bob = __webpack_require__(957); +var BlitterRender = __webpack_require__(959); +var Bob = __webpack_require__(962); var Class = __webpack_require__(0); var Components = __webpack_require__(12); var Frame = __webpack_require__(95); var GameObject = __webpack_require__(14); -var List = __webpack_require__(131); +var List = __webpack_require__(135); /** * @callback CreateCallback @@ -37739,10 +37811,10 @@ var ArrayUtils = __webpack_require__(189); var BlendModes = __webpack_require__(53); var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var Events = __webpack_require__(90); +var Events = __webpack_require__(91); var GameObject = __webpack_require__(14); var Rectangle = __webpack_require__(9); -var Render = __webpack_require__(958); +var Render = __webpack_require__(963); var Union = __webpack_require__(394); var Vector2 = __webpack_require__(3); @@ -39086,9 +39158,9 @@ module.exports = Container; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(134); +var BitmapText = __webpack_require__(138); var Class = __webpack_require__(0); -var Render = __webpack_require__(963); +var Render = __webpack_require__(968); /** * @classdesc @@ -39319,14 +39391,14 @@ module.exports = DynamicBitmapText; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseCamera = __webpack_require__(91); +var BaseCamera = __webpack_require__(92); var Class = __webpack_require__(0); var Commands = __webpack_require__(198); var ComponentsAlpha = __webpack_require__(273); var ComponentsBlendMode = __webpack_require__(276); var ComponentsDepth = __webpack_require__(277); var ComponentsMask = __webpack_require__(281); -var ComponentsPipeline = __webpack_require__(160); +var ComponentsPipeline = __webpack_require__(161); var ComponentsTransform = __webpack_require__(286); var ComponentsVisible = __webpack_require__(287); var ComponentsScrollFactor = __webpack_require__(284); @@ -39338,7 +39410,7 @@ var GameObject = __webpack_require__(14); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); var MATH_CONST = __webpack_require__(13); -var Render = __webpack_require__(969); +var Render = __webpack_require__(974); /** * @classdesc @@ -40956,9 +41028,9 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); var GravityWell = __webpack_require__(402); -var List = __webpack_require__(131); +var List = __webpack_require__(135); var ParticleEmitter = __webpack_require__(404); -var Render = __webpack_require__(979); +var Render = __webpack_require__(984); /** * @classdesc @@ -41442,7 +41514,7 @@ module.exports = ParticleEmitterManager; */ var BlendModes = __webpack_require__(53); -var Camera = __webpack_require__(91); +var Camera = __webpack_require__(92); var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); var Components = __webpack_require__(12); @@ -41451,7 +41523,7 @@ var Frame = __webpack_require__(95); var GameObject = __webpack_require__(14); var NOOP = __webpack_require__(1); var ProjectOrtho = __webpack_require__(181); -var Render = __webpack_require__(983); +var Render = __webpack_require__(988); var Utils = __webpack_require__(10); var UUID = __webpack_require__(202); @@ -41954,21 +42026,22 @@ var RenderTexture = new Class({ */ fill: function (rgb, alpha, x, y, width, height) { + var gl = this.gl; + var frame = this.frame; + var texture = this.texture; + var camera = this.camera; + var renderer = this.renderer; + if (alpha === undefined) { alpha = 1; } if (x === undefined) { x = 0; } if (y === undefined) { y = 0; } - if (width === undefined) { width = this.frame.cutWidth; } - if (height === undefined) { height = this.frame.cutHeight; } + if (width === undefined) { width = frame.cutWidth; } + if (height === undefined) { height = frame.cutHeight; } var r = ((rgb >> 16) | 0) & 0xff; var g = ((rgb >> 8) | 0) & 0xff; var b = (rgb | 0) & 0xff; - var gl = this.gl; - var frame = this.frame; - var camera = this.camera; - var renderer = this.renderer; - camera.preRender(1, 1); if (gl) @@ -41980,16 +42053,23 @@ var RenderTexture = new Class({ renderer.resetTextures(true); - renderer.setFramebuffer(this.framebuffer, false); + renderer.pushScissor(cx, cy, cw, -ch); - renderer.pushScissor(cx, cy, cw, ch, ch); + renderer.setFramebuffer(this.framebuffer, false); var pipeline = this.pipeline; - ProjectOrtho(pipeline, 0, this.texture.width, 0, this.texture.height, -1000.0, 1000.0); + var tw = texture.width; + var th = texture.height; + + var rw = pipeline.width; + var rh = pipeline.height; + + var sx = rw / tw; + var sy = rh / th; pipeline.drawFillRect( - x, y, width, height, + x * sx, (th - height - y) * sy, width * sx, height * sy, Utils.getTintFromFloats(r / 255, g / 255, b / 255, 1), alpha ); @@ -41999,15 +42079,15 @@ var RenderTexture = new Class({ renderer.setFramebuffer(null, false); renderer.popScissor(); - - ProjectOrtho(pipeline, 0, pipeline.width, pipeline.height, 0, -1000.0, 1000.0); } else { - renderer.setContext(this.context); + var ctx = this.context; - this.context.fillStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + alpha + ')'; - this.context.fillRect(x + frame.cutX, y + frame.cutY, width, height); + renderer.setContext(ctx); + + ctx.fillStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + alpha + ')'; + ctx.fillRect(x + frame.cutX, y + frame.cutY, width, height); renderer.setContext(); } @@ -42743,7 +42823,7 @@ module.exports = UUID; var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var RopeRender = __webpack_require__(989); +var RopeRender = __webpack_require__(994); var Vector2 = __webpack_require__(3); /** @@ -43853,17 +43933,17 @@ module.exports = Rope; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(124); +var AddToDOM = __webpack_require__(128); var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameEvents = __webpack_require__(20); var GameObject = __webpack_require__(14); -var GetTextSize = __webpack_require__(992); +var GetTextSize = __webpack_require__(997); var GetValue = __webpack_require__(6); var RemoveFromDOM = __webpack_require__(184); -var TextRender = __webpack_require__(993); -var TextStyle = __webpack_require__(996); +var TextRender = __webpack_require__(998); +var TextStyle = __webpack_require__(1001); /** * @classdesc @@ -44871,9 +44951,9 @@ var Text = new Class({ * @since 3.0.0 * * @param {(number|Phaser.Types.GameObjects.Text.TextPadding)} left - The left padding value, or a padding config object. - * @param {number} top - The top padding value. - * @param {number} right - The right padding value. - * @param {number} bottom - The bottom padding value. + * @param {number} [top] - The top padding value. + * @param {number} [right] - The right padding value. + * @param {number} [bottom] - The bottom padding value. * * @return {this} This Text object. */ @@ -45271,8 +45351,8 @@ var Components = __webpack_require__(12); var GameEvents = __webpack_require__(20); var GameObject = __webpack_require__(14); var GetPowerOfTwo = __webpack_require__(333); -var Smoothing = __webpack_require__(172); -var TileSpriteRender = __webpack_require__(998); +var Smoothing = __webpack_require__(173); +var TileSpriteRender = __webpack_require__(1003); var Vector2 = __webpack_require__(3); // bitmask flag for GameObject.renderMask @@ -45920,12 +46000,12 @@ module.exports = TileSprite; var Class = __webpack_require__(0); var Clamp = __webpack_require__(17); var Components = __webpack_require__(12); -var Events = __webpack_require__(90); +var Events = __webpack_require__(91); var GameEvents = __webpack_require__(20); var GameObject = __webpack_require__(14); var SoundEvents = __webpack_require__(59); var UUID = __webpack_require__(202); -var VideoRender = __webpack_require__(1001); +var VideoRender = __webpack_require__(1006); var MATH_CONST = __webpack_require__(13); /** @@ -47689,7 +47769,7 @@ module.exports = Video; var Class = __webpack_require__(0); var Contains = __webpack_require__(208); var GetPoints = __webpack_require__(419); -var GEOM_CONST = __webpack_require__(47); +var GEOM_CONST = __webpack_require__(48); /** * @classdesc @@ -47970,7 +48050,7 @@ module.exports = Contains; */ var Class = __webpack_require__(0); -var Mesh = __webpack_require__(136); +var Mesh = __webpack_require__(140); /** * @classdesc @@ -48636,7 +48716,7 @@ var GameObject = __webpack_require__(14); var GetFastValue = __webpack_require__(2); var Extend = __webpack_require__(19); var SetValue = __webpack_require__(427); -var ShaderRender = __webpack_require__(1084); +var ShaderRender = __webpack_require__(1089); var TransformMatrix = __webpack_require__(30); /** @@ -50116,8 +50196,8 @@ module.exports = LineToCircle; */ var Point = __webpack_require__(4); -var LineToLine = __webpack_require__(84); -var LineToRectangle = __webpack_require__(433); +var LineToLine = __webpack_require__(85); +var LineToRectangle = __webpack_require__(435); /** * Checks for intersection between the Line and a Rectangle shape, @@ -50397,12 +50477,12 @@ module.exports = RotateAroundXY; module.exports = { - BUTTON_DOWN: __webpack_require__(1209), - BUTTON_UP: __webpack_require__(1210), - CONNECTED: __webpack_require__(1211), - DISCONNECTED: __webpack_require__(1212), - GAMEPAD_BUTTON_DOWN: __webpack_require__(1213), - GAMEPAD_BUTTON_UP: __webpack_require__(1214) + BUTTON_DOWN: __webpack_require__(1215), + BUTTON_UP: __webpack_require__(1216), + CONNECTED: __webpack_require__(1217), + DISCONNECTED: __webpack_require__(1218), + GAMEPAD_BUTTON_DOWN: __webpack_require__(1219), + GAMEPAD_BUTTON_UP: __webpack_require__(1220) }; @@ -50418,7 +50498,7 @@ module.exports = { */ var Extend = __webpack_require__(19); -var XHRSettings = __webpack_require__(141); +var XHRSettings = __webpack_require__(145); /** * Takes two XHRSettings Objects and creates a new XHRSettings object from them. @@ -50656,18 +50736,18 @@ module.exports = XMLFile; module.exports = { - Acceleration: __webpack_require__(1269), - Angular: __webpack_require__(1270), - Bounce: __webpack_require__(1271), - Debug: __webpack_require__(1272), - Drag: __webpack_require__(1273), - Enable: __webpack_require__(1274), - Friction: __webpack_require__(1275), - Gravity: __webpack_require__(1276), - Immovable: __webpack_require__(1277), - Mass: __webpack_require__(1278), - Size: __webpack_require__(1279), - Velocity: __webpack_require__(1280) + Acceleration: __webpack_require__(1275), + Angular: __webpack_require__(1276), + Bounce: __webpack_require__(1277), + Debug: __webpack_require__(1278), + Drag: __webpack_require__(1279), + Enable: __webpack_require__(1280), + Friction: __webpack_require__(1281), + Gravity: __webpack_require__(1282), + Immovable: __webpack_require__(1283), + Mass: __webpack_require__(1284), + Size: __webpack_require__(1285), + Velocity: __webpack_require__(1286) }; @@ -50688,14 +50768,14 @@ module.exports = { module.exports = { - COLLIDE: __webpack_require__(1282), - OVERLAP: __webpack_require__(1283), - PAUSE: __webpack_require__(1284), - RESUME: __webpack_require__(1285), - TILE_COLLIDE: __webpack_require__(1286), - TILE_OVERLAP: __webpack_require__(1287), - WORLD_BOUNDS: __webpack_require__(1288), - WORLD_STEP: __webpack_require__(1289) + COLLIDE: __webpack_require__(1288), + OVERLAP: __webpack_require__(1289), + PAUSE: __webpack_require__(1290), + RESUME: __webpack_require__(1291), + TILE_COLLIDE: __webpack_require__(1292), + TILE_OVERLAP: __webpack_require__(1293), + WORLD_BOUNDS: __webpack_require__(1294), + WORLD_STEP: __webpack_require__(1295) }; @@ -50711,7 +50791,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(144); +var GetTileAt = __webpack_require__(148); /** * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting @@ -51149,7 +51229,7 @@ module.exports = CreateGroupLayer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Pick = __webpack_require__(487); +var Pick = __webpack_require__(489); var ParseGID = __webpack_require__(230); var copyPoints = function (p) { return { x: p.x, y: p.y }; }; @@ -51231,8 +51311,8 @@ module.exports = ParseObject; var Formats = __webpack_require__(32); var MapData = __webpack_require__(104); -var Parse = __webpack_require__(479); -var Tilemap = __webpack_require__(495); +var Parse = __webpack_require__(481); +var Tilemap = __webpack_require__(497); /** * Create a Tilemap from the given key or data. If neither is given, make a blank Tilemap. When @@ -51681,7 +51761,7 @@ var EventEmitter = __webpack_require__(11); var Events = __webpack_require__(238); var GameObjectCreator = __webpack_require__(16); var GameObjectFactory = __webpack_require__(5); -var TWEEN_CONST = __webpack_require__(89); +var TWEEN_CONST = __webpack_require__(90); var MATH_CONST = __webpack_require__(13); /** @@ -53331,20 +53411,20 @@ module.exports = Tween; module.exports = { - TIMELINE_COMPLETE: __webpack_require__(1369), - TIMELINE_LOOP: __webpack_require__(1370), - TIMELINE_PAUSE: __webpack_require__(1371), - TIMELINE_RESUME: __webpack_require__(1372), - TIMELINE_START: __webpack_require__(1373), - TIMELINE_UPDATE: __webpack_require__(1374), - TWEEN_ACTIVE: __webpack_require__(1375), - TWEEN_COMPLETE: __webpack_require__(1376), - TWEEN_LOOP: __webpack_require__(1377), - TWEEN_REPEAT: __webpack_require__(1378), - TWEEN_START: __webpack_require__(1379), - TWEEN_STOP: __webpack_require__(1380), - TWEEN_UPDATE: __webpack_require__(1381), - TWEEN_YOYO: __webpack_require__(1382) + TIMELINE_COMPLETE: __webpack_require__(1375), + TIMELINE_LOOP: __webpack_require__(1376), + TIMELINE_PAUSE: __webpack_require__(1377), + TIMELINE_RESUME: __webpack_require__(1378), + TIMELINE_START: __webpack_require__(1379), + TIMELINE_UPDATE: __webpack_require__(1380), + TWEEN_ACTIVE: __webpack_require__(1381), + TWEEN_COMPLETE: __webpack_require__(1382), + TWEEN_LOOP: __webpack_require__(1383), + TWEEN_REPEAT: __webpack_require__(1384), + TWEEN_START: __webpack_require__(1385), + TWEEN_STOP: __webpack_require__(1386), + TWEEN_UPDATE: __webpack_require__(1387), + TWEEN_YOYO: __webpack_require__(1388) }; @@ -53612,59 +53692,59 @@ module.exports = WrapDegrees; module.exports = { - AlignTo: __webpack_require__(528), - Angle: __webpack_require__(529), - Call: __webpack_require__(530), - GetFirst: __webpack_require__(531), - GetLast: __webpack_require__(532), - GridAlign: __webpack_require__(533), - IncAlpha: __webpack_require__(594), - IncX: __webpack_require__(595), - IncXY: __webpack_require__(596), - IncY: __webpack_require__(597), - PlaceOnCircle: __webpack_require__(598), - PlaceOnEllipse: __webpack_require__(599), - PlaceOnLine: __webpack_require__(600), - PlaceOnRectangle: __webpack_require__(601), - PlaceOnTriangle: __webpack_require__(602), - PlayAnimation: __webpack_require__(603), + AlignTo: __webpack_require__(531), + Angle: __webpack_require__(532), + Call: __webpack_require__(533), + GetFirst: __webpack_require__(534), + GetLast: __webpack_require__(535), + GridAlign: __webpack_require__(536), + IncAlpha: __webpack_require__(597), + IncX: __webpack_require__(598), + IncXY: __webpack_require__(599), + IncY: __webpack_require__(600), + PlaceOnCircle: __webpack_require__(601), + PlaceOnEllipse: __webpack_require__(602), + PlaceOnLine: __webpack_require__(603), + PlaceOnRectangle: __webpack_require__(604), + PlaceOnTriangle: __webpack_require__(605), + PlayAnimation: __webpack_require__(606), PropertyValueInc: __webpack_require__(38), PropertyValueSet: __webpack_require__(25), - RandomCircle: __webpack_require__(604), - RandomEllipse: __webpack_require__(605), - RandomLine: __webpack_require__(606), - RandomRectangle: __webpack_require__(607), - RandomTriangle: __webpack_require__(608), - Rotate: __webpack_require__(609), - RotateAround: __webpack_require__(610), - RotateAroundDistance: __webpack_require__(611), - ScaleX: __webpack_require__(612), - ScaleXY: __webpack_require__(613), - ScaleY: __webpack_require__(614), - SetAlpha: __webpack_require__(615), - SetBlendMode: __webpack_require__(616), - SetDepth: __webpack_require__(617), - SetHitArea: __webpack_require__(618), - SetOrigin: __webpack_require__(619), - SetRotation: __webpack_require__(620), - SetScale: __webpack_require__(621), - SetScaleX: __webpack_require__(622), - SetScaleY: __webpack_require__(623), - SetScrollFactor: __webpack_require__(624), - SetScrollFactorX: __webpack_require__(625), - SetScrollFactorY: __webpack_require__(626), - SetTint: __webpack_require__(627), - SetVisible: __webpack_require__(628), - SetX: __webpack_require__(629), - SetXY: __webpack_require__(630), - SetY: __webpack_require__(631), - ShiftPosition: __webpack_require__(632), - Shuffle: __webpack_require__(633), - SmootherStep: __webpack_require__(634), - SmoothStep: __webpack_require__(635), - Spread: __webpack_require__(636), - ToggleVisible: __webpack_require__(637), - WrapInRectangle: __webpack_require__(638) + RandomCircle: __webpack_require__(607), + RandomEllipse: __webpack_require__(608), + RandomLine: __webpack_require__(609), + RandomRectangle: __webpack_require__(610), + RandomTriangle: __webpack_require__(611), + Rotate: __webpack_require__(612), + RotateAround: __webpack_require__(613), + RotateAroundDistance: __webpack_require__(614), + ScaleX: __webpack_require__(615), + ScaleXY: __webpack_require__(616), + ScaleY: __webpack_require__(617), + SetAlpha: __webpack_require__(618), + SetBlendMode: __webpack_require__(619), + SetDepth: __webpack_require__(620), + SetHitArea: __webpack_require__(621), + SetOrigin: __webpack_require__(622), + SetRotation: __webpack_require__(623), + SetScale: __webpack_require__(624), + SetScaleX: __webpack_require__(625), + SetScaleY: __webpack_require__(626), + SetScrollFactor: __webpack_require__(627), + SetScrollFactorX: __webpack_require__(628), + SetScrollFactorY: __webpack_require__(629), + SetTint: __webpack_require__(630), + SetVisible: __webpack_require__(631), + SetX: __webpack_require__(632), + SetXY: __webpack_require__(633), + SetY: __webpack_require__(634), + ShiftPosition: __webpack_require__(635), + Shuffle: __webpack_require__(636), + SmootherStep: __webpack_require__(637), + SmoothStep: __webpack_require__(638), + Spread: __webpack_require__(639), + ToggleVisible: __webpack_require__(640), + WrapInRectangle: __webpack_require__(641) }; @@ -53734,7 +53814,7 @@ module.exports = QuickSet; var GetBottom = __webpack_require__(34); var GetCenterX = __webpack_require__(76); var SetCenterX = __webpack_require__(77); -var SetTop = __webpack_require__(43); +var SetTop = __webpack_require__(44); /** * Takes given Game Object and aligns it so that it is positioned next to the bottom center position of the other. @@ -53777,8 +53857,8 @@ module.exports = BottomCenter; var GetBottom = __webpack_require__(34); var GetLeft = __webpack_require__(35); -var SetLeft = __webpack_require__(44); -var SetTop = __webpack_require__(43); +var SetLeft = __webpack_require__(45); +var SetTop = __webpack_require__(44); /** * Takes given Game Object and aligns it so that it is positioned next to the bottom left position of the other. @@ -53821,8 +53901,8 @@ module.exports = BottomLeft; var GetBottom = __webpack_require__(34); var GetRight = __webpack_require__(36); -var SetRight = __webpack_require__(45); -var SetTop = __webpack_require__(43); +var SetRight = __webpack_require__(46); +var SetTop = __webpack_require__(44); /** * Takes given Game Object and aligns it so that it is positioned next to the bottom right position of the other. @@ -53865,8 +53945,8 @@ module.exports = BottomRight; var GetBottom = __webpack_require__(34); var GetLeft = __webpack_require__(35); -var SetBottom = __webpack_require__(46); -var SetRight = __webpack_require__(45); +var SetBottom = __webpack_require__(47); +var SetRight = __webpack_require__(46); /** * Takes given Game Object and aligns it so that it is positioned next to the left bottom position of the other. @@ -53910,7 +53990,7 @@ module.exports = LeftBottom; var GetCenterY = __webpack_require__(78); var GetLeft = __webpack_require__(35); var SetCenterY = __webpack_require__(79); -var SetRight = __webpack_require__(45); +var SetRight = __webpack_require__(46); /** * Takes given Game Object and aligns it so that it is positioned next to the left center position of the other. @@ -53953,8 +54033,8 @@ module.exports = LeftCenter; var GetLeft = __webpack_require__(35); var GetTop = __webpack_require__(37); -var SetRight = __webpack_require__(45); -var SetTop = __webpack_require__(43); +var SetRight = __webpack_require__(46); +var SetTop = __webpack_require__(44); /** * Takes given Game Object and aligns it so that it is positioned next to the left top position of the other. @@ -53997,8 +54077,8 @@ module.exports = LeftTop; var GetBottom = __webpack_require__(34); var GetRight = __webpack_require__(36); -var SetBottom = __webpack_require__(46); -var SetLeft = __webpack_require__(44); +var SetBottom = __webpack_require__(47); +var SetLeft = __webpack_require__(45); /** * Takes given Game Object and aligns it so that it is positioned next to the right bottom position of the other. @@ -54042,7 +54122,7 @@ module.exports = RightBottom; var GetCenterY = __webpack_require__(78); var GetRight = __webpack_require__(36); var SetCenterY = __webpack_require__(79); -var SetLeft = __webpack_require__(44); +var SetLeft = __webpack_require__(45); /** * Takes given Game Object and aligns it so that it is positioned next to the right center position of the other. @@ -54085,8 +54165,8 @@ module.exports = RightCenter; var GetRight = __webpack_require__(36); var GetTop = __webpack_require__(37); -var SetLeft = __webpack_require__(44); -var SetTop = __webpack_require__(43); +var SetLeft = __webpack_require__(45); +var SetTop = __webpack_require__(44); /** * Takes given Game Object and aligns it so that it is positioned next to the right top position of the other. @@ -54129,7 +54209,7 @@ module.exports = RightTop; var GetCenterX = __webpack_require__(76); var GetTop = __webpack_require__(37); -var SetBottom = __webpack_require__(46); +var SetBottom = __webpack_require__(47); var SetCenterX = __webpack_require__(77); /** @@ -54173,8 +54253,8 @@ module.exports = TopCenter; var GetLeft = __webpack_require__(35); var GetTop = __webpack_require__(37); -var SetBottom = __webpack_require__(46); -var SetLeft = __webpack_require__(44); +var SetBottom = __webpack_require__(47); +var SetLeft = __webpack_require__(45); /** * Takes given Game Object and aligns it so that it is positioned next to the top left position of the other. @@ -54217,8 +54297,8 @@ module.exports = TopLeft; var GetRight = __webpack_require__(36); var GetTop = __webpack_require__(37); -var SetBottom = __webpack_require__(46); -var SetRight = __webpack_require__(45); +var SetBottom = __webpack_require__(47); +var SetRight = __webpack_require__(46); /** * Takes given Game Object and aligns it so that it is positioned next to the top right position of the other. @@ -54314,7 +54394,7 @@ module.exports = QuickSet; var GetBottom = __webpack_require__(34); var GetCenterX = __webpack_require__(76); -var SetBottom = __webpack_require__(46); +var SetBottom = __webpack_require__(47); var SetCenterX = __webpack_require__(77); /** @@ -54358,8 +54438,8 @@ module.exports = BottomCenter; var GetBottom = __webpack_require__(34); var GetLeft = __webpack_require__(35); -var SetBottom = __webpack_require__(46); -var SetLeft = __webpack_require__(44); +var SetBottom = __webpack_require__(47); +var SetLeft = __webpack_require__(45); /** * Takes given Game Object and aligns it so that it is positioned in the bottom left of the other. @@ -54402,8 +54482,8 @@ module.exports = BottomLeft; var GetBottom = __webpack_require__(34); var GetRight = __webpack_require__(36); -var SetBottom = __webpack_require__(46); -var SetRight = __webpack_require__(45); +var SetBottom = __webpack_require__(47); +var SetRight = __webpack_require__(46); /** * Takes given Game Object and aligns it so that it is positioned in the bottom right of the other. @@ -54526,7 +54606,7 @@ module.exports = CenterOn; var GetCenterY = __webpack_require__(78); var GetLeft = __webpack_require__(35); var SetCenterY = __webpack_require__(79); -var SetLeft = __webpack_require__(44); +var SetLeft = __webpack_require__(45); /** * Takes given Game Object and aligns it so that it is positioned in the left center of the other. @@ -54570,7 +54650,7 @@ module.exports = LeftCenter; var GetCenterY = __webpack_require__(78); var GetRight = __webpack_require__(36); var SetCenterY = __webpack_require__(79); -var SetRight = __webpack_require__(45); +var SetRight = __webpack_require__(46); /** * Takes given Game Object and aligns it so that it is positioned in the right center of the other. @@ -54614,7 +54694,7 @@ module.exports = RightCenter; var GetCenterX = __webpack_require__(76); var GetTop = __webpack_require__(37); var SetCenterX = __webpack_require__(77); -var SetTop = __webpack_require__(43); +var SetTop = __webpack_require__(44); /** * Takes given Game Object and aligns it so that it is positioned in the top center of the other. @@ -54657,8 +54737,8 @@ module.exports = TopCenter; var GetLeft = __webpack_require__(35); var GetTop = __webpack_require__(37); -var SetLeft = __webpack_require__(44); -var SetTop = __webpack_require__(43); +var SetLeft = __webpack_require__(45); +var SetTop = __webpack_require__(44); /** * Takes given Game Object and aligns it so that it is positioned in the top left of the other. @@ -54701,8 +54781,8 @@ module.exports = TopLeft; var GetRight = __webpack_require__(36); var GetTop = __webpack_require__(37); -var SetRight = __webpack_require__(45); -var SetTop = __webpack_require__(43); +var SetRight = __webpack_require__(46); +var SetTop = __webpack_require__(44); /** * Takes given Game Object and aligns it so that it is positioned in the top right of the other. @@ -54743,8 +54823,8 @@ module.exports = TopRight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CircumferencePoint = __webpack_require__(153); -var FromPercent = __webpack_require__(87); +var CircumferencePoint = __webpack_require__(154); +var FromPercent = __webpack_require__(88); var MATH_CONST = __webpack_require__(13); var Point = __webpack_require__(4); @@ -54787,8 +54867,8 @@ module.exports = GetPoint; */ var Circumference = __webpack_require__(272); -var CircumferencePoint = __webpack_require__(153); -var FromPercent = __webpack_require__(87); +var CircumferencePoint = __webpack_require__(154); +var FromPercent = __webpack_require__(88); var MATH_CONST = __webpack_require__(13); /** @@ -55449,8 +55529,8 @@ module.exports = Depth; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetPoint = __webpack_require__(156); -var Perimeter = __webpack_require__(113); +var GetPoint = __webpack_require__(157); +var Perimeter = __webpack_require__(116); // Return an array of points from the perimeter of the rectangle // each spaced out based on the quantity or step required @@ -56511,7 +56591,7 @@ module.exports = ToJSON; var MATH_CONST = __webpack_require__(13); var TransformMatrix = __webpack_require__(30); -var TransformXY = __webpack_require__(161); +var TransformXY = __webpack_require__(162); var WrapAngle = __webpack_require__(241); var WrapAngleDegrees = __webpack_require__(242); var Vector2 = __webpack_require__(3); @@ -57195,10 +57275,10 @@ module.exports = Visible; module.exports = { - CHANGE_DATA: __webpack_require__(579), - CHANGE_DATA_KEY: __webpack_require__(580), - REMOVE_DATA: __webpack_require__(581), - SET_DATA: __webpack_require__(582) + CHANGE_DATA: __webpack_require__(582), + CHANGE_DATA_KEY: __webpack_require__(583), + REMOVE_DATA: __webpack_require__(584), + SET_DATA: __webpack_require__(585) }; @@ -57213,7 +57293,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Perimeter = __webpack_require__(113); +var Perimeter = __webpack_require__(116); var Point = __webpack_require__(4); @@ -57486,14 +57566,14 @@ module.exports = BresenhamPoints; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Animation = __webpack_require__(155); +var Animation = __webpack_require__(156); var Class = __webpack_require__(0); -var CustomMap = __webpack_require__(167); +var CustomMap = __webpack_require__(168); var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(112); +var Events = __webpack_require__(115); var GameEvents = __webpack_require__(20); var GetValue = __webpack_require__(6); -var Pad = __webpack_require__(168); +var Pad = __webpack_require__(169); /** * @classdesc @@ -58169,7 +58249,7 @@ module.exports = AnimationManager; */ var Class = __webpack_require__(0); -var CustomMap = __webpack_require__(167); +var CustomMap = __webpack_require__(168); var EventEmitter = __webpack_require__(11); var Events = __webpack_require__(295); @@ -58360,8 +58440,8 @@ module.exports = BaseCache; module.exports = { - ADD: __webpack_require__(641), - REMOVE: __webpack_require__(642) + ADD: __webpack_require__(644), + REMOVE: __webpack_require__(645) }; @@ -58610,14 +58690,14 @@ module.exports = CacheManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseCamera = __webpack_require__(91); +var BaseCamera = __webpack_require__(92); var CanvasPool = __webpack_require__(26); -var CenterOn = __webpack_require__(173); +var CenterOn = __webpack_require__(174); var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); var Components = __webpack_require__(12); var Effects = __webpack_require__(305); -var Linear = __webpack_require__(118); +var Linear = __webpack_require__(121); var Rectangle = __webpack_require__(9); var Vector2 = __webpack_require__(3); @@ -59991,12 +60071,12 @@ module.exports = RGBStringToColor; module.exports = { - Fade: __webpack_require__(665), - Flash: __webpack_require__(666), - Pan: __webpack_require__(667), - Shake: __webpack_require__(700), - RotateTo: __webpack_require__(701), - Zoom: __webpack_require__(702) + Fade: __webpack_require__(668), + Flash: __webpack_require__(669), + Pan: __webpack_require__(670), + Shake: __webpack_require__(703), + RotateTo: __webpack_require__(704), + Zoom: __webpack_require__(705) }; @@ -60017,9 +60097,9 @@ module.exports = { module.exports = { - In: __webpack_require__(668), - Out: __webpack_require__(669), - InOut: __webpack_require__(670) + In: __webpack_require__(671), + Out: __webpack_require__(672), + InOut: __webpack_require__(673) }; @@ -60040,9 +60120,9 @@ module.exports = { module.exports = { - In: __webpack_require__(671), - Out: __webpack_require__(672), - InOut: __webpack_require__(673) + In: __webpack_require__(674), + Out: __webpack_require__(675), + InOut: __webpack_require__(676) }; @@ -60063,9 +60143,9 @@ module.exports = { module.exports = { - In: __webpack_require__(674), - Out: __webpack_require__(675), - InOut: __webpack_require__(676) + In: __webpack_require__(677), + Out: __webpack_require__(678), + InOut: __webpack_require__(679) }; @@ -60086,9 +60166,9 @@ module.exports = { module.exports = { - In: __webpack_require__(677), - Out: __webpack_require__(678), - InOut: __webpack_require__(679) + In: __webpack_require__(680), + Out: __webpack_require__(681), + InOut: __webpack_require__(682) }; @@ -60109,9 +60189,9 @@ module.exports = { module.exports = { - In: __webpack_require__(680), - Out: __webpack_require__(681), - InOut: __webpack_require__(682) + In: __webpack_require__(683), + Out: __webpack_require__(684), + InOut: __webpack_require__(685) }; @@ -60132,9 +60212,9 @@ module.exports = { module.exports = { - In: __webpack_require__(683), - Out: __webpack_require__(684), - InOut: __webpack_require__(685) + In: __webpack_require__(686), + Out: __webpack_require__(687), + InOut: __webpack_require__(688) }; @@ -60149,7 +60229,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -module.exports = __webpack_require__(686); +module.exports = __webpack_require__(689); /***/ }), @@ -60168,9 +60248,9 @@ module.exports = __webpack_require__(686); module.exports = { - In: __webpack_require__(687), - Out: __webpack_require__(688), - InOut: __webpack_require__(689) + In: __webpack_require__(690), + Out: __webpack_require__(691), + InOut: __webpack_require__(692) }; @@ -60191,9 +60271,9 @@ module.exports = { module.exports = { - In: __webpack_require__(690), - Out: __webpack_require__(691), - InOut: __webpack_require__(692) + In: __webpack_require__(693), + Out: __webpack_require__(694), + InOut: __webpack_require__(695) }; @@ -60214,9 +60294,9 @@ module.exports = { module.exports = { - In: __webpack_require__(693), - Out: __webpack_require__(694), - InOut: __webpack_require__(695) + In: __webpack_require__(696), + Out: __webpack_require__(697), + InOut: __webpack_require__(698) }; @@ -60237,9 +60317,9 @@ module.exports = { module.exports = { - In: __webpack_require__(696), - Out: __webpack_require__(697), - InOut: __webpack_require__(698) + In: __webpack_require__(699), + Out: __webpack_require__(700), + InOut: __webpack_require__(701) }; @@ -60258,7 +60338,7 @@ module.exports = { * @namespace Phaser.Math.Easing.Stepped */ -module.exports = __webpack_require__(699); +module.exports = __webpack_require__(702); /***/ }), @@ -60277,10 +60357,10 @@ var Device = __webpack_require__(319); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); var IsPlainObject = __webpack_require__(7); -var PhaserMath = __webpack_require__(175); +var PhaserMath = __webpack_require__(176); var NOOP = __webpack_require__(1); var DefaultPlugins = __webpack_require__(180); -var ValueToColor = __webpack_require__(169); +var ValueToColor = __webpack_require__(170); /** * @classdesc @@ -60882,13 +60962,13 @@ module.exports = Config; module.exports = { - os: __webpack_require__(119), - browser: __webpack_require__(120), - features: __webpack_require__(174), - input: __webpack_require__(731), - audio: __webpack_require__(732), - video: __webpack_require__(733), - fullscreen: __webpack_require__(734), + os: __webpack_require__(122), + browser: __webpack_require__(123), + features: __webpack_require__(175), + input: __webpack_require__(734), + audio: __webpack_require__(735), + video: __webpack_require__(736), + fullscreen: __webpack_require__(737), canvasFeatures: __webpack_require__(320) }; @@ -61451,7 +61531,7 @@ module.exports = QuadraticBezierInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmoothStep = __webpack_require__(166); +var SmoothStep = __webpack_require__(167); /** * A Smooth Step interpolation method. @@ -63681,7 +63761,7 @@ module.exports = Matrix4; // and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl var Class = __webpack_require__(0); -var Vector3 = __webpack_require__(94); +var Vector3 = __webpack_require__(80); var Matrix3 = __webpack_require__(337); var EPSILON = 0.000001; @@ -64452,7 +64532,7 @@ module.exports = Quaternion; var CanvasInterpolation = __webpack_require__(341); var CanvasPool = __webpack_require__(26); var CONST = __webpack_require__(33); -var Features = __webpack_require__(174); +var Features = __webpack_require__(175); /** * Called automatically by Phaser.Game and responsible for creating the renderer it will use. @@ -64542,8 +64622,8 @@ var CreateRenderer = function (game) if (true) { - CanvasRenderer = __webpack_require__(506); - WebGLRenderer = __webpack_require__(509); + CanvasRenderer = __webpack_require__(508); + WebGLRenderer = __webpack_require__(511); // Let the config pick the renderer type, as both are included if (config.renderType === CONST.WEBGL) @@ -65969,7 +66049,7 @@ module.exports = { var Class = __webpack_require__(0); var CubicBezier = __webpack_require__(330); -var Curve = __webpack_require__(81); +var Curve = __webpack_require__(82); var Vector2 = __webpack_require__(3); /** @@ -66195,10 +66275,10 @@ module.exports = CubicBezierCurve; // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) var Class = __webpack_require__(0); -var Curve = __webpack_require__(81); -var DegToRad = __webpack_require__(39); +var Curve = __webpack_require__(82); +var DegToRad = __webpack_require__(40); var GetValue = __webpack_require__(6); -var RadToDeg = __webpack_require__(178); +var RadToDeg = __webpack_require__(179); var Vector2 = __webpack_require__(3); /** @@ -66819,7 +66899,7 @@ module.exports = EllipseCurve; // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) var Class = __webpack_require__(0); -var Curve = __webpack_require__(81); +var Curve = __webpack_require__(82); var FromPoints = __webpack_require__(182); var Rectangle = __webpack_require__(9); var Vector2 = __webpack_require__(3); @@ -67120,7 +67200,7 @@ module.exports = LineCurve; */ var Class = __webpack_require__(0); -var Curve = __webpack_require__(81); +var Curve = __webpack_require__(82); var QuadraticBezierInterpolation = __webpack_require__(331); var Vector2 = __webpack_require__(3); @@ -67338,9 +67418,9 @@ module.exports = QuadraticBezier; // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) -var CatmullRom = __webpack_require__(176); +var CatmullRom = __webpack_require__(177); var Class = __webpack_require__(0); -var Curve = __webpack_require__(81); +var Curve = __webpack_require__(82); var Vector2 = __webpack_require__(3); /** @@ -67687,25 +67767,25 @@ module.exports = BaseShader; var Color = __webpack_require__(31); -Color.ColorToRGBA = __webpack_require__(814); +Color.ColorToRGBA = __webpack_require__(819); Color.ComponentToHex = __webpack_require__(355); -Color.GetColor = __webpack_require__(170); +Color.GetColor = __webpack_require__(171); Color.GetColor32 = __webpack_require__(299); -Color.GetColorFromValue = __webpack_require__(114); +Color.GetColorFromValue = __webpack_require__(117); Color.HexStringToColor = __webpack_require__(298); -Color.HSLToColor = __webpack_require__(815); -Color.HSVColorWheel = __webpack_require__(816); -Color.HSVToRGB = __webpack_require__(171); +Color.HSLToColor = __webpack_require__(820); +Color.HSVColorWheel = __webpack_require__(821); +Color.HSVToRGB = __webpack_require__(172); Color.HueToComponent = __webpack_require__(356); Color.IntegerToColor = __webpack_require__(301); Color.IntegerToRGB = __webpack_require__(302); -Color.Interpolate = __webpack_require__(817); +Color.Interpolate = __webpack_require__(822); Color.ObjectToColor = __webpack_require__(303); -Color.RandomRGB = __webpack_require__(818); +Color.RandomRGB = __webpack_require__(823); Color.RGBStringToColor = __webpack_require__(304); Color.RGBToHSV = __webpack_require__(300); -Color.RGBToString = __webpack_require__(819); -Color.ValueToColor = __webpack_require__(169); +Color.RGBToString = __webpack_require__(824); +Color.ValueToColor = __webpack_require__(170); module.exports = Color; @@ -67806,7 +67886,7 @@ module.exports = HueToComponent; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var OS = __webpack_require__(119); +var OS = __webpack_require__(122); /** * @callback ContentLoadedCallback @@ -68364,7 +68444,7 @@ var Mouse = __webpack_require__(367); var Pointer = __webpack_require__(368); var Touch = __webpack_require__(369); var TransformMatrix = __webpack_require__(30); -var TransformXY = __webpack_require__(161); +var TransformXY = __webpack_require__(162); /** * @classdesc @@ -69436,11 +69516,11 @@ module.exports = InputManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayRemove = __webpack_require__(125); +var ArrayRemove = __webpack_require__(129); var Class = __webpack_require__(0); var GameEvents = __webpack_require__(20); var InputEvents = __webpack_require__(55); -var KeyCodes = __webpack_require__(126); +var KeyCodes = __webpack_require__(130); var NOOP = __webpack_require__(1); /** @@ -69881,7 +69961,7 @@ module.exports = KeyboardManager; */ var Class = __webpack_require__(0); -var Features = __webpack_require__(174); +var Features = __webpack_require__(175); var InputEvents = __webpack_require__(55); var NOOP = __webpack_require__(1); @@ -72065,7 +72145,7 @@ var GameObjectCreator = __webpack_require__(16); var GameObjectFactory = __webpack_require__(5); var GetFastValue = __webpack_require__(2); var PluginCache = __webpack_require__(23); -var Remove = __webpack_require__(125); +var Remove = __webpack_require__(129); /** * @classdesc @@ -72962,15 +73042,15 @@ module.exports = PluginManager; var CONST = __webpack_require__(183); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(92); +var Events = __webpack_require__(93); var GameEvents = __webpack_require__(20); -var GetInnerHeight = __webpack_require__(872); +var GetInnerHeight = __webpack_require__(877); var GetTarget = __webpack_require__(363); var GetScreenOrientation = __webpack_require__(358); var NOOP = __webpack_require__(1); var Rectangle = __webpack_require__(9); var Size = __webpack_require__(372); -var SnapFloor = __webpack_require__(93); +var SnapFloor = __webpack_require__(94); var Vector2 = __webpack_require__(3); /** @@ -74672,7 +74752,7 @@ module.exports = ScaleManager; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var SnapFloor = __webpack_require__(93); +var SnapFloor = __webpack_require__(94); var Vector2 = __webpack_require__(3); /** @@ -75449,11 +75529,11 @@ module.exports = Size; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(127); +var CONST = __webpack_require__(131); var Events = __webpack_require__(22); var GameEvents = __webpack_require__(20); var GetValue = __webpack_require__(6); -var LoaderEvents = __webpack_require__(82); +var LoaderEvents = __webpack_require__(83); var NOOP = __webpack_require__(1); var Scene = __webpack_require__(374); var Systems = __webpack_require__(186); @@ -77372,10 +77452,10 @@ module.exports = Scene; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(127); +var CONST = __webpack_require__(131); var GetValue = __webpack_require__(6); -var Merge = __webpack_require__(128); -var InjectionMap = __webpack_require__(885); +var Merge = __webpack_require__(132); +var InjectionMap = __webpack_require__(890); /** * @namespace Phaser.Scenes.Settings @@ -77474,7 +77554,7 @@ var Class = __webpack_require__(0); var Color = __webpack_require__(31); var CONST = __webpack_require__(33); var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(123); +var Events = __webpack_require__(127); var GameEvents = __webpack_require__(20); var GenerateTexture = __webpack_require__(346); var GetValue = __webpack_require__(6); @@ -78674,7 +78754,7 @@ var Class = __webpack_require__(0); var Clamp = __webpack_require__(17); var Color = __webpack_require__(31); var CONST = __webpack_require__(33); -var IsSizePowerOfTwo = __webpack_require__(122); +var IsSizePowerOfTwo = __webpack_require__(125); var Texture = __webpack_require__(188); /** @@ -79307,7 +79387,7 @@ module.exports = CanvasTexture; var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); -var IsSizePowerOfTwo = __webpack_require__(122); +var IsSizePowerOfTwo = __webpack_require__(125); var ScaleModes = __webpack_require__(240); /** @@ -79676,14 +79756,14 @@ module.exports = TextureSource; module.exports = { - AtlasXML: __webpack_require__(886), - Canvas: __webpack_require__(887), - Image: __webpack_require__(888), - JSONArray: __webpack_require__(889), - JSONHash: __webpack_require__(890), - SpriteSheet: __webpack_require__(891), - SpriteSheetFromAtlas: __webpack_require__(892), - UnityYAML: __webpack_require__(893) + AtlasXML: __webpack_require__(891), + Canvas: __webpack_require__(892), + Image: __webpack_require__(893), + JSONArray: __webpack_require__(894), + JSONHash: __webpack_require__(895), + SpriteSheet: __webpack_require__(896), + SpriteSheetFromAtlas: __webpack_require__(897), + UnityYAML: __webpack_require__(898) }; @@ -79751,7 +79831,7 @@ module.exports = SoundManagerCreator; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSoundManager = __webpack_require__(129); +var BaseSoundManager = __webpack_require__(133); var Class = __webpack_require__(0); var Events = __webpack_require__(59); var HTML5AudioSound = __webpack_require__(384); @@ -80341,7 +80421,7 @@ module.exports = GetFirst; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(130); +var BaseSound = __webpack_require__(134); var Class = __webpack_require__(0); var Events = __webpack_require__(59); var Clamp = __webpack_require__(17); @@ -81271,7 +81351,7 @@ module.exports = HTML5AudioSound; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSoundManager = __webpack_require__(129); +var BaseSoundManager = __webpack_require__(133); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(11); var NoAudioSound = __webpack_require__(386); @@ -81389,7 +81469,7 @@ module.exports = NoAudioSoundManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(130); +var BaseSound = __webpack_require__(134); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(11); var Extend = __webpack_require__(19); @@ -81581,7 +81661,7 @@ module.exports = NoAudioSound; */ var Base64ToArrayBuffer = __webpack_require__(388); -var BaseSoundManager = __webpack_require__(129); +var BaseSoundManager = __webpack_require__(133); var Class = __webpack_require__(0); var Events = __webpack_require__(59); var WebAudioSound = __webpack_require__(389); @@ -82118,7 +82198,7 @@ module.exports = Base64ToArrayBuffer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(130); +var BaseSound = __webpack_require__(134); var Class = __webpack_require__(0); var Events = __webpack_require__(59); @@ -83194,7 +83274,7 @@ module.exports = QuickSelect; */ var GetValue = __webpack_require__(6); -var Shuffle = __webpack_require__(116); +var Shuffle = __webpack_require__(119); var BuildChunk = function (a, b, qty) { @@ -83464,12 +83544,12 @@ module.exports = Union; var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var DOMElementRender = __webpack_require__(961); +var DOMElementRender = __webpack_require__(966); var GameObject = __webpack_require__(14); var IsPlainObject = __webpack_require__(7); var RemoveFromDOM = __webpack_require__(184); var SCENE_EVENTS = __webpack_require__(22); -var Vector4 = __webpack_require__(179); +var Vector4 = __webpack_require__(126); /** * @classdesc @@ -84439,7 +84519,7 @@ module.exports = DOMElement; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CSSBlendModes = __webpack_require__(962); +var CSSBlendModes = __webpack_require__(967); var GameObject = __webpack_require__(14); /** @@ -84564,7 +84644,7 @@ module.exports = DOMElementCSSRenderer; var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var ExternRender = __webpack_require__(966); +var ExternRender = __webpack_require__(971); /** * @classdesc @@ -84658,7 +84738,7 @@ module.exports = Extern; */ var CircumferencePoint = __webpack_require__(199); -var FromPercent = __webpack_require__(87); +var FromPercent = __webpack_require__(88); var MATH_CONST = __webpack_require__(13); var Point = __webpack_require__(4); @@ -84702,7 +84782,7 @@ module.exports = GetPoint; var Circumference = __webpack_require__(400); var CircumferencePoint = __webpack_require__(199); -var FromPercent = __webpack_require__(87); +var FromPercent = __webpack_require__(88); var MATH_CONST = __webpack_require__(13); /** @@ -85256,7 +85336,7 @@ module.exports = GravityWell; */ var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(39); +var DegToRad = __webpack_require__(40); var DistanceBetween = __webpack_require__(54); /** @@ -85829,15 +85909,15 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var DeathZone = __webpack_require__(405); var EdgeZone = __webpack_require__(406); -var EmitterOp = __webpack_require__(978); +var EmitterOp = __webpack_require__(983); var GetFastValue = __webpack_require__(2); var GetRandom = __webpack_require__(191); var HasAny = __webpack_require__(407); -var HasValue = __webpack_require__(109); +var HasValue = __webpack_require__(112); var Particle = __webpack_require__(403); var RandomZone = __webpack_require__(408); var Rectangle = __webpack_require__(9); -var StableSort = __webpack_require__(133); +var StableSort = __webpack_require__(137); var Vector2 = __webpack_require__(3); var Wrap = __webpack_require__(58); @@ -88409,9 +88489,9 @@ module.exports = PathFollower; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcRender = __webpack_require__(1004); +var ArcRender = __webpack_require__(1009); var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(39); +var DegToRad = __webpack_require__(40); var Earcut = __webpack_require__(66); var GeomCircle = __webpack_require__(65); var MATH_CONST = __webpack_require__(13); @@ -88819,7 +88899,7 @@ module.exports = Arc; */ var Class = __webpack_require__(0); -var CurveRender = __webpack_require__(1007); +var CurveRender = __webpack_require__(1012); var Earcut = __webpack_require__(66); var Rectangle = __webpack_require__(9); var Shape = __webpack_require__(29); @@ -89002,7 +89082,7 @@ module.exports = Curve; var Class = __webpack_require__(0); var Earcut = __webpack_require__(66); -var EllipseRender = __webpack_require__(1010); +var EllipseRender = __webpack_require__(1015); var GeomEllipse = __webpack_require__(96); var Shape = __webpack_require__(29); @@ -89189,7 +89269,7 @@ module.exports = Ellipse; var Class = __webpack_require__(0); var Shape = __webpack_require__(29); -var GridRender = __webpack_require__(1013); +var GridRender = __webpack_require__(1018); /** * @classdesc @@ -89469,7 +89549,7 @@ module.exports = Grid; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var IsoBoxRender = __webpack_require__(1016); +var IsoBoxRender = __webpack_require__(1021); var Class = __webpack_require__(0); var Shape = __webpack_require__(29); @@ -89685,7 +89765,7 @@ module.exports = IsoBox; */ var Class = __webpack_require__(0); -var IsoTriangleRender = __webpack_require__(1019); +var IsoTriangleRender = __webpack_require__(1024); var Shape = __webpack_require__(29); /** @@ -89932,8 +90012,8 @@ module.exports = IsoTriangle; var Class = __webpack_require__(0); var Shape = __webpack_require__(29); -var GeomLine = __webpack_require__(49); -var LineRender = __webpack_require__(1022); +var GeomLine = __webpack_require__(39); +var LineRender = __webpack_require__(1027); /** * @classdesc @@ -90097,7 +90177,7 @@ module.exports = Line; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PolygonRender = __webpack_require__(1025); +var PolygonRender = __webpack_require__(1030); var Class = __webpack_require__(0); var Earcut = __webpack_require__(66); var GetAABB = __webpack_require__(418); @@ -90293,7 +90373,7 @@ module.exports = GetAABB; */ var Length = __webpack_require__(57); -var Line = __webpack_require__(49); +var Line = __webpack_require__(39); var Perimeter = __webpack_require__(420); /** @@ -90370,7 +90450,7 @@ module.exports = GetPoints; */ var Length = __webpack_require__(57); -var Line = __webpack_require__(49); +var Line = __webpack_require__(39); /** * Returns the perimeter of the given Polygon. @@ -90496,7 +90576,7 @@ module.exports = Smooth; var Class = __webpack_require__(0); var GeomRectangle = __webpack_require__(9); var Shape = __webpack_require__(29); -var RectangleRender = __webpack_require__(1028); +var RectangleRender = __webpack_require__(1033); /** * @classdesc @@ -90636,7 +90716,7 @@ module.exports = Rectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var StarRender = __webpack_require__(1031); +var StarRender = __webpack_require__(1036); var Class = __webpack_require__(0); var Earcut = __webpack_require__(66); var Shape = __webpack_require__(29); @@ -90927,7 +91007,7 @@ module.exports = Star; var Class = __webpack_require__(0); var Shape = __webpack_require__(29); var GeomTriangle = __webpack_require__(71); -var TriangleRender = __webpack_require__(1034); +var TriangleRender = __webpack_require__(1039); /** * @classdesc @@ -92190,7 +92270,7 @@ module.exports = LightsManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(47); +var CONST = __webpack_require__(48); var Extend = __webpack_require__(19); /** @@ -92199,14 +92279,14 @@ var Extend = __webpack_require__(19); var Geom = { - Circle: __webpack_require__(1094), - Ellipse: __webpack_require__(1104), + Circle: __webpack_require__(1099), + Ellipse: __webpack_require__(1109), Intersects: __webpack_require__(431), - Line: __webpack_require__(1124), - Point: __webpack_require__(1146), - Polygon: __webpack_require__(1160), - Rectangle: __webpack_require__(445), - Triangle: __webpack_require__(1192) + Line: __webpack_require__(1129), + Point: __webpack_require__(1151), + Polygon: __webpack_require__(1165), + Rectangle: __webpack_require__(447), + Triangle: __webpack_require__(1198) }; @@ -92234,29 +92314,31 @@ module.exports = { CircleToCircle: __webpack_require__(211), CircleToRectangle: __webpack_require__(212), - GetCircleToCircle: __webpack_require__(1114), - GetCircleToRectangle: __webpack_require__(1115), + GetCircleToCircle: __webpack_require__(1119), + GetCircleToRectangle: __webpack_require__(1120), GetLineToCircle: __webpack_require__(213), GetLineToLine: __webpack_require__(432), - GetLineToPolygon: __webpack_require__(1116), + GetLineToPoints: __webpack_require__(433), + GetLineToPolygon: __webpack_require__(434), GetLineToRectangle: __webpack_require__(215), - GetRectangleIntersection: __webpack_require__(1117), - GetRectangleToRectangle: __webpack_require__(1118), - GetRectangleToTriangle: __webpack_require__(1119), - GetTriangleToCircle: __webpack_require__(1120), - GetTriangleToLine: __webpack_require__(437), - GetTriangleToTriangle: __webpack_require__(1121), + GetRaysFromPointToPolygon: __webpack_require__(1121), + GetRectangleIntersection: __webpack_require__(1122), + GetRectangleToRectangle: __webpack_require__(1123), + GetRectangleToTriangle: __webpack_require__(1124), + GetTriangleToCircle: __webpack_require__(1125), + GetTriangleToLine: __webpack_require__(439), + GetTriangleToTriangle: __webpack_require__(1126), LineToCircle: __webpack_require__(214), - LineToLine: __webpack_require__(84), - LineToRectangle: __webpack_require__(433), - PointToLine: __webpack_require__(441), - PointToLineSegment: __webpack_require__(1122), - RectangleToRectangle: __webpack_require__(137), - RectangleToTriangle: __webpack_require__(434), - RectangleToValues: __webpack_require__(1123), - TriangleToCircle: __webpack_require__(436), - TriangleToLine: __webpack_require__(438), - TriangleToTriangle: __webpack_require__(439) + LineToLine: __webpack_require__(85), + LineToRectangle: __webpack_require__(435), + PointToLine: __webpack_require__(443), + PointToLineSegment: __webpack_require__(1127), + RectangleToRectangle: __webpack_require__(141), + RectangleToTriangle: __webpack_require__(436), + RectangleToValues: __webpack_require__(1128), + TriangleToCircle: __webpack_require__(438), + TriangleToLine: __webpack_require__(440), + TriangleToTriangle: __webpack_require__(441) }; @@ -92271,7 +92353,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector3 = __webpack_require__(94); +var Vector3 = __webpack_require__(80); /** * Checks for intersection between the two line segments and returns the intersection point as a Vector3, @@ -92332,6 +92414,154 @@ module.exports = GetLineToLine; /***/ }), /* 433 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Vector3 = __webpack_require__(80); +var GetLineToLine = __webpack_require__(432); +var Line = __webpack_require__(39); + +// Temp calculation segment +var segment = new Line(); + +// Temp vec3 +var tempIntersect = new Vector3(); + +/** + * Checks for the closest point of intersection between a line segment and an array of points, where each pair + * of points are converted to line segments for the intersection tests. + * + * If no intersection is found, this function returns `null`. + * + * If intersection was found, a Vector3 is returned with the following properties: + * + * The `x` and `y` components contain the point of the intersection. + * The `z` component contains the closest distance. + * + * @function Phaser.Geom.Intersects.GetLineToPoints + * @since 3.50.0 + * + * @param {Phaser.Geom.Line} line - The line segment to check. + * @param {Phaser.Math.Vector2[] | Phaser.Geom.Point[]} points - An array of points to check. + * @param {Phaser.Math.Vector3} [out] - A Vector3 to store the intersection results in. + * + * @return {Phaser.Math.Vector3} A Vector3 containing the intersection results, or `null`. + */ +var GetLineToPoints = function (line, points, out) +{ + if (out === undefined) { out = new Vector3(); } + + var closestIntersect = false; + + // Reset our vec3s + out.set(); + tempIntersect.set(); + + var prev = points[0]; + + for (var i = 1; i < points.length; i++) + { + var current = points[i]; + + segment.setTo(prev.x, prev.y, current.x, current.y); + + prev = current; + + if (GetLineToLine(line, segment, tempIntersect)) + { + if (!closestIntersect || tempIntersect.z < out.z) + { + out.copy(tempIntersect); + + closestIntersect = true; + } + } + } + + return (closestIntersect) ? out : null; +}; + +module.exports = GetLineToPoints; + + +/***/ }), +/* 434 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Vector3 = __webpack_require__(80); +var Vector4 = __webpack_require__(126); +var GetLineToPoints = __webpack_require__(433); + +// Temp vec3 +var tempIntersect = new Vector3(); + +/** + * Checks for the closest point of intersection between a line segment and an array of polygons. + * + * If no intersection is found, this function returns `null`. + * + * If intersection was found, a Vector4 is returned with the following properties: + * + * The `x` and `y` components contain the point of the intersection. + * The `z` component contains the closest distance. + * The `w` component contains the index of the polygon, in the given array, that triggered the intersection. + * + * @function Phaser.Geom.Intersects.GetLineToPolygon + * @since 3.50.0 + * + * @param {Phaser.Geom.Line} line - The line segment to check. + * @param {Phaser.Geom.Polygon | Phaser.Geom.Polygon[]} polygons - A single polygon, or array of polygons, to check. + * @param {Phaser.Math.Vector4} [out] - A Vector4 to store the intersection results in. + * + * @return {Phaser.Math.Vector4} A Vector4 containing the intersection results, or `null`. + */ +var GetLineToPolygon = function (line, polygons, out) +{ + if (out === undefined) { out = new Vector4(); } + + if (!Array.isArray(polygons)) + { + polygons = [ polygons ]; + } + + var closestIntersect = false; + + // Reset our vec4s + out.set(); + tempIntersect.set(); + + for (var i = 0; i < polygons.length; i++) + { + if (GetLineToPoints(line, polygons[i].points, tempIntersect)) + { + if (!closestIntersect || tempIntersect.z < out.z) + { + out.set(tempIntersect.x, tempIntersect.y, tempIntersect.z, i); + + closestIntersect = true; + } + } + } + + return (closestIntersect) ? out : null; +}; + +module.exports = GetLineToPolygon; + + +/***/ }), +/* 435 */ /***/ (function(module, exports) { /** @@ -92432,7 +92662,7 @@ module.exports = LineToRectangle; /***/ }), -/* 434 */ +/* 436 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92441,10 +92671,10 @@ module.exports = LineToRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var LineToLine = __webpack_require__(84); -var Contains = __webpack_require__(48); +var LineToLine = __webpack_require__(85); +var Contains = __webpack_require__(49); var ContainsArray = __webpack_require__(216); -var Decompose = __webpack_require__(435); +var Decompose = __webpack_require__(437); /** * Checks for intersection between Rectangle shape and Triangle shape. @@ -92525,7 +92755,7 @@ module.exports = RectangleToTriangle; /***/ }), -/* 435 */ +/* 437 */ /***/ (function(module, exports) { /** @@ -92562,7 +92792,7 @@ module.exports = Decompose; /***/ }), -/* 436 */ +/* 438 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92572,7 +92802,7 @@ module.exports = Decompose; */ var LineToCircle = __webpack_require__(214); -var Contains = __webpack_require__(83); +var Contains = __webpack_require__(84); /** * Checks if a Triangle and a Circle intersect. @@ -92627,7 +92857,7 @@ module.exports = TriangleToCircle; /***/ }), -/* 437 */ +/* 439 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92638,8 +92868,8 @@ module.exports = TriangleToCircle; */ var Point = __webpack_require__(4); -var TriangleToLine = __webpack_require__(438); -var LineToLine = __webpack_require__(84); +var TriangleToLine = __webpack_require__(440); +var LineToLine = __webpack_require__(85); /** * Checks if a Triangle and a Line intersect, and returns the intersection points as a Point object array. @@ -92686,7 +92916,7 @@ module.exports = GetTriangleToLine; /***/ }), -/* 438 */ +/* 440 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92695,8 +92925,8 @@ module.exports = GetTriangleToLine; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(83); -var LineToLine = __webpack_require__(84); +var Contains = __webpack_require__(84); +var LineToLine = __webpack_require__(85); /** * Checks if a Triangle and a Line intersect. @@ -92742,7 +92972,7 @@ module.exports = TriangleToLine; /***/ }), -/* 439 */ +/* 441 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92752,8 +92982,8 @@ module.exports = TriangleToLine; */ var ContainsArray = __webpack_require__(216); -var Decompose = __webpack_require__(440); -var LineToLine = __webpack_require__(84); +var Decompose = __webpack_require__(442); +var LineToLine = __webpack_require__(85); /** * Checks if two Triangles intersect. @@ -92832,7 +93062,7 @@ module.exports = TriangleToTriangle; /***/ }), -/* 440 */ +/* 442 */ /***/ (function(module, exports) { /** @@ -92867,7 +93097,7 @@ module.exports = Decompose; /***/ }), -/* 441 */ +/* 443 */ /***/ (function(module, exports) { /** @@ -92937,7 +93167,7 @@ module.exports = PointToLine; /***/ }), -/* 442 */ +/* 444 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92948,7 +93178,7 @@ module.exports = PointToLine; var MATH_CONST = __webpack_require__(13); var Wrap = __webpack_require__(58); -var Angle = __webpack_require__(85); +var Angle = __webpack_require__(86); /** * Get the angle of the normal of the given line in radians. @@ -92971,7 +93201,7 @@ module.exports = NormalAngle; /***/ }), -/* 443 */ +/* 445 */ /***/ (function(module, exports) { /** @@ -92999,7 +93229,7 @@ module.exports = GetMagnitude; /***/ }), -/* 444 */ +/* 446 */ /***/ (function(module, exports) { /** @@ -93027,7 +93257,7 @@ module.exports = GetMagnitudeSq; /***/ }), -/* 445 */ +/* 447 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93038,50 +93268,50 @@ module.exports = GetMagnitudeSq; var Rectangle = __webpack_require__(9); -Rectangle.Area = __webpack_require__(1166); -Rectangle.Ceil = __webpack_require__(1167); -Rectangle.CeilAll = __webpack_require__(1168); -Rectangle.CenterOn = __webpack_require__(173); -Rectangle.Clone = __webpack_require__(1169); -Rectangle.Contains = __webpack_require__(48); -Rectangle.ContainsPoint = __webpack_require__(1170); -Rectangle.ContainsRect = __webpack_require__(446); -Rectangle.CopyFrom = __webpack_require__(1171); -Rectangle.Decompose = __webpack_require__(435); -Rectangle.Equals = __webpack_require__(1172); -Rectangle.FitInside = __webpack_require__(1173); -Rectangle.FitOutside = __webpack_require__(1174); -Rectangle.Floor = __webpack_require__(1175); -Rectangle.FloorAll = __webpack_require__(1176); +Rectangle.Area = __webpack_require__(1172); +Rectangle.Ceil = __webpack_require__(1173); +Rectangle.CeilAll = __webpack_require__(1174); +Rectangle.CenterOn = __webpack_require__(174); +Rectangle.Clone = __webpack_require__(1175); +Rectangle.Contains = __webpack_require__(49); +Rectangle.ContainsPoint = __webpack_require__(1176); +Rectangle.ContainsRect = __webpack_require__(448); +Rectangle.CopyFrom = __webpack_require__(1177); +Rectangle.Decompose = __webpack_require__(437); +Rectangle.Equals = __webpack_require__(1178); +Rectangle.FitInside = __webpack_require__(1179); +Rectangle.FitOutside = __webpack_require__(1180); +Rectangle.Floor = __webpack_require__(1181); +Rectangle.FloorAll = __webpack_require__(1182); Rectangle.FromPoints = __webpack_require__(182); -Rectangle.FromXY = __webpack_require__(1177); +Rectangle.FromXY = __webpack_require__(1183); Rectangle.GetAspectRatio = __webpack_require__(218); -Rectangle.GetCenter = __webpack_require__(1178); -Rectangle.GetPoint = __webpack_require__(156); +Rectangle.GetCenter = __webpack_require__(1184); +Rectangle.GetPoint = __webpack_require__(157); Rectangle.GetPoints = __webpack_require__(278); -Rectangle.GetSize = __webpack_require__(1179); -Rectangle.Inflate = __webpack_require__(1180); -Rectangle.Intersection = __webpack_require__(1181); +Rectangle.GetSize = __webpack_require__(1185); +Rectangle.Inflate = __webpack_require__(1186); +Rectangle.Intersection = __webpack_require__(1187); Rectangle.MarchingAnts = __webpack_require__(289); -Rectangle.MergePoints = __webpack_require__(1182); -Rectangle.MergeRect = __webpack_require__(1183); -Rectangle.MergeXY = __webpack_require__(1184); -Rectangle.Offset = __webpack_require__(1185); -Rectangle.OffsetPoint = __webpack_require__(1186); -Rectangle.Overlaps = __webpack_require__(1187); -Rectangle.Perimeter = __webpack_require__(113); -Rectangle.PerimeterPoint = __webpack_require__(1188); -Rectangle.Random = __webpack_require__(159); -Rectangle.RandomOutside = __webpack_require__(1189); -Rectangle.SameDimensions = __webpack_require__(1190); -Rectangle.Scale = __webpack_require__(1191); +Rectangle.MergePoints = __webpack_require__(1188); +Rectangle.MergeRect = __webpack_require__(1189); +Rectangle.MergeXY = __webpack_require__(1190); +Rectangle.Offset = __webpack_require__(1191); +Rectangle.OffsetPoint = __webpack_require__(1192); +Rectangle.Overlaps = __webpack_require__(1193); +Rectangle.Perimeter = __webpack_require__(116); +Rectangle.PerimeterPoint = __webpack_require__(1194); +Rectangle.Random = __webpack_require__(160); +Rectangle.RandomOutside = __webpack_require__(1195); +Rectangle.SameDimensions = __webpack_require__(1196); +Rectangle.Scale = __webpack_require__(1197); Rectangle.Union = __webpack_require__(394); module.exports = Rectangle; /***/ }), -/* 446 */ +/* 448 */ /***/ (function(module, exports) { /** @@ -93121,7 +93351,7 @@ module.exports = ContainsRect; /***/ }), -/* 447 */ +/* 449 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93165,7 +93395,7 @@ module.exports = Centroid; /***/ }), -/* 448 */ +/* 450 */ /***/ (function(module, exports) { /** @@ -93206,7 +93436,7 @@ module.exports = Offset; /***/ }), -/* 449 */ +/* 451 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93271,7 +93501,7 @@ module.exports = InCenter; /***/ }), -/* 450 */ +/* 452 */ /***/ (function(module, exports) { /** @@ -93342,7 +93572,7 @@ module.exports = CreateInteractiveObject; /***/ }), -/* 451 */ +/* 453 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93467,7 +93697,7 @@ module.exports = Axis; /***/ }), -/* 452 */ +/* 454 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93613,7 +93843,7 @@ module.exports = Button; /***/ }), -/* 453 */ +/* 455 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93622,8 +93852,8 @@ module.exports = Button; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Axis = __webpack_require__(451); -var Button = __webpack_require__(452); +var Axis = __webpack_require__(453); +var Button = __webpack_require__(454); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(11); var Vector2 = __webpack_require__(3); @@ -94371,7 +94601,7 @@ module.exports = Gamepad; /***/ }), -/* 454 */ +/* 456 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94382,7 +94612,7 @@ module.exports = Gamepad; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(139); +var Events = __webpack_require__(143); /** * @classdesc @@ -94773,7 +95003,7 @@ module.exports = Key; /***/ }), -/* 455 */ +/* 457 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94783,10 +95013,10 @@ module.exports = Key; */ var Class = __webpack_require__(0); -var Events = __webpack_require__(139); +var Events = __webpack_require__(143); var GetFastValue = __webpack_require__(2); -var ProcessKeyCombo = __webpack_require__(1231); -var ResetKeyCombo = __webpack_require__(1233); +var ProcessKeyCombo = __webpack_require__(1237); +var ResetKeyCombo = __webpack_require__(1239); /** * @classdesc @@ -95066,7 +95296,7 @@ module.exports = KeyCombo; /***/ }), -/* 456 */ +/* 458 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95147,7 +95377,7 @@ module.exports = XHRLoader; /***/ }), -/* 457 */ +/* 459 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95161,7 +95391,7 @@ var CONST = __webpack_require__(18); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); -var HTML5AudioFile = __webpack_require__(458); +var HTML5AudioFile = __webpack_require__(460); var IsPlainObject = __webpack_require__(7); /** @@ -95421,7 +95651,7 @@ module.exports = AudioFile; /***/ }), -/* 458 */ +/* 460 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95431,10 +95661,10 @@ module.exports = AudioFile; */ var Class = __webpack_require__(0); -var Events = __webpack_require__(82); +var Events = __webpack_require__(83); var File = __webpack_require__(21); var GetFastValue = __webpack_require__(2); -var GetURL = __webpack_require__(140); +var GetURL = __webpack_require__(144); var IsPlainObject = __webpack_require__(7); /** @@ -95624,7 +95854,7 @@ module.exports = HTML5AudioFile; /***/ }), -/* 459 */ +/* 461 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95795,7 +96025,7 @@ module.exports = ScriptFile; /***/ }), -/* 460 */ +/* 462 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95970,7 +96200,7 @@ module.exports = TextFile; /***/ }), -/* 461 */ +/* 463 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95979,12 +96209,12 @@ module.exports = TextFile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeImage = __webpack_require__(462); -var ArcadeSprite = __webpack_require__(142); +var ArcadeImage = __webpack_require__(464); +var ArcadeSprite = __webpack_require__(146); var Class = __webpack_require__(0); var CONST = __webpack_require__(51); -var PhysicsGroup = __webpack_require__(463); -var StaticPhysicsGroup = __webpack_require__(464); +var PhysicsGroup = __webpack_require__(465); +var StaticPhysicsGroup = __webpack_require__(466); /** * @classdesc @@ -96243,7 +96473,7 @@ module.exports = Factory; /***/ }), -/* 462 */ +/* 464 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96254,7 +96484,7 @@ module.exports = Factory; var Class = __webpack_require__(0); var Components = __webpack_require__(223); -var Image = __webpack_require__(108); +var Image = __webpack_require__(111); /** * @classdesc @@ -96343,7 +96573,7 @@ module.exports = ArcadeImage; /***/ }), -/* 463 */ +/* 465 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96352,7 +96582,7 @@ module.exports = ArcadeImage; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeSprite = __webpack_require__(142); +var ArcadeSprite = __webpack_require__(146); var Class = __webpack_require__(0); var CONST = __webpack_require__(51); var GetFastValue = __webpack_require__(2); @@ -96628,7 +96858,7 @@ module.exports = PhysicsGroup; /***/ }), -/* 464 */ +/* 466 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96637,7 +96867,7 @@ module.exports = PhysicsGroup; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeSprite = __webpack_require__(142); +var ArcadeSprite = __webpack_require__(146); var Class = __webpack_require__(0); var CONST = __webpack_require__(51); var GetFastValue = __webpack_require__(2); @@ -96827,7 +97057,7 @@ module.exports = StaticPhysicsGroup; /***/ }), -/* 465 */ +/* 467 */ /***/ (function(module, exports) { /** @@ -96912,7 +97142,7 @@ module.exports = OverlapRect; /***/ }), -/* 466 */ +/* 468 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96922,10 +97152,10 @@ module.exports = OverlapRect; */ var AngleBetweenPoints = __webpack_require__(322); -var Body = __webpack_require__(467); +var Body = __webpack_require__(469); var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var Collider = __webpack_require__(468); +var Collider = __webpack_require__(470); var CONST = __webpack_require__(51); var DistanceBetween = __webpack_require__(54); var EventEmitter = __webpack_require__(11); @@ -96933,20 +97163,20 @@ var Events = __webpack_require__(224); var FuzzyEqual = __webpack_require__(107); var FuzzyGreaterThan = __webpack_require__(326); var FuzzyLessThan = __webpack_require__(327); -var GetOverlapX = __webpack_require__(469); -var GetOverlapY = __webpack_require__(470); +var GetOverlapX = __webpack_require__(471); +var GetOverlapY = __webpack_require__(472); var GetValue = __webpack_require__(6); var MATH_CONST = __webpack_require__(13); var ProcessQueue = __webpack_require__(192); -var ProcessTileCallbacks = __webpack_require__(1290); +var ProcessTileCallbacks = __webpack_require__(1296); var Rectangle = __webpack_require__(9); -var RTree = __webpack_require__(471); -var SeparateTile = __webpack_require__(1291); -var SeparateX = __webpack_require__(1296); -var SeparateY = __webpack_require__(1297); -var Set = __webpack_require__(135); -var StaticBody = __webpack_require__(473); -var TileIntersectsBody = __webpack_require__(472); +var RTree = __webpack_require__(473); +var SeparateTile = __webpack_require__(1297); +var SeparateX = __webpack_require__(1302); +var SeparateY = __webpack_require__(1303); +var Set = __webpack_require__(139); +var StaticBody = __webpack_require__(475); +var TileIntersectsBody = __webpack_require__(474); var TransformMatrix = __webpack_require__(30); var Vector2 = __webpack_require__(3); var Wrap = __webpack_require__(58); @@ -99346,7 +99576,7 @@ module.exports = World; /***/ }), -/* 467 */ +/* 469 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99359,9 +99589,9 @@ module.exports = World; var Class = __webpack_require__(0); var CONST = __webpack_require__(51); var Events = __webpack_require__(224); -var RadToDeg = __webpack_require__(178); +var RadToDeg = __webpack_require__(179); var Rectangle = __webpack_require__(9); -var RectangleContains = __webpack_require__(48); +var RectangleContains = __webpack_require__(49); var Vector2 = __webpack_require__(3); /** @@ -101704,7 +101934,7 @@ module.exports = Body; /***/ }), -/* 468 */ +/* 470 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101887,7 +102117,7 @@ module.exports = Collider; /***/ }), -/* 469 */ +/* 471 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101995,7 +102225,7 @@ module.exports = GetOverlapX; /***/ }), -/* 470 */ +/* 472 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102103,7 +102333,7 @@ module.exports = GetOverlapY; /***/ }), -/* 471 */ +/* 473 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102714,7 +102944,7 @@ function multiSelect (arr, left, right, n, compare) module.exports = rbush; /***/ }), -/* 472 */ +/* 474 */ /***/ (function(module, exports) { /** @@ -102750,7 +102980,7 @@ module.exports = TileIntersectsBody; /***/ }), -/* 473 */ +/* 475 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102762,7 +102992,7 @@ module.exports = TileIntersectsBody; var CircleContains = __webpack_require__(56); var Class = __webpack_require__(0); var CONST = __webpack_require__(51); -var RectangleContains = __webpack_require__(48); +var RectangleContains = __webpack_require__(49); var Vector2 = __webpack_require__(3); /** @@ -103739,8 +103969,8 @@ module.exports = StaticBody; /***/ }), -/* 474 */, -/* 475 */ +/* 476 */, +/* 477 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103870,7 +104100,7 @@ module.exports = BasePlugin; /***/ }), -/* 476 */ +/* 478 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103915,7 +104145,7 @@ module.exports = ReplaceByIndex; /***/ }), -/* 477 */ +/* 479 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103958,7 +104188,7 @@ module.exports = HasTileAt; /***/ }), -/* 478 */ +/* 480 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104021,7 +104251,7 @@ module.exports = RemoveTileAt; /***/ }), -/* 479 */ +/* 481 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104032,9 +104262,9 @@ module.exports = RemoveTileAt; var Formats = __webpack_require__(32); var Parse2DArray = __webpack_require__(229); -var ParseCSV = __webpack_require__(480); -var ParseJSONTiled = __webpack_require__(481); -var ParseWeltmeister = __webpack_require__(492); +var ParseCSV = __webpack_require__(482); +var ParseJSONTiled = __webpack_require__(483); +var ParseWeltmeister = __webpack_require__(494); /** * Parses raw data of a given Tilemap format into a new MapData object. If no recognized data format @@ -104091,7 +104321,7 @@ module.exports = Parse; /***/ }), -/* 480 */ +/* 482 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104139,7 +104369,7 @@ module.exports = ParseCSV; /***/ }), -/* 481 */ +/* 483 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104150,12 +104380,12 @@ module.exports = ParseCSV; var Formats = __webpack_require__(32); var MapData = __webpack_require__(104); -var ParseTileLayers = __webpack_require__(482); -var ParseImageLayers = __webpack_require__(484); -var ParseTilesets = __webpack_require__(485); -var ParseObjectLayers = __webpack_require__(488); -var BuildTilesetIndex = __webpack_require__(490); -var AssignTileProperties = __webpack_require__(491); +var ParseTileLayers = __webpack_require__(484); +var ParseImageLayers = __webpack_require__(486); +var ParseTilesets = __webpack_require__(487); +var ParseObjectLayers = __webpack_require__(490); +var BuildTilesetIndex = __webpack_require__(492); +var AssignTileProperties = __webpack_require__(493); /** * Parses a Tiled JSON object into a new MapData object. @@ -104217,7 +104447,7 @@ module.exports = ParseJSONTiled; /***/ }), -/* 482 */ +/* 484 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104226,7 +104456,7 @@ module.exports = ParseJSONTiled; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Base64Decode = __webpack_require__(483); +var Base64Decode = __webpack_require__(485); var GetFastValue = __webpack_require__(2); var LayerData = __webpack_require__(103); var ParseGID = __webpack_require__(230); @@ -104475,7 +104705,7 @@ module.exports = ParseTileLayers; /***/ }), -/* 483 */ +/* 485 */ /***/ (function(module, exports) { /** @@ -104518,7 +104748,7 @@ module.exports = Base64Decode; /***/ }), -/* 484 */ +/* 486 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104606,7 +104836,7 @@ module.exports = ParseImageLayers; /***/ }), -/* 485 */ +/* 487 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104616,7 +104846,7 @@ module.exports = ParseImageLayers; */ var Tileset = __webpack_require__(105); -var ImageCollection = __webpack_require__(486); +var ImageCollection = __webpack_require__(488); var ParseObject = __webpack_require__(232); /** @@ -104775,7 +105005,7 @@ module.exports = ParseTilesets; /***/ }), -/* 486 */ +/* 488 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104947,7 +105177,7 @@ module.exports = ImageCollection; /***/ }), -/* 487 */ +/* 489 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104956,7 +105186,7 @@ module.exports = ImageCollection; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HasValue = __webpack_require__(109); +var HasValue = __webpack_require__(112); /** * Returns a new object that only contains the `keys` that were found on the object provided. @@ -104991,7 +105221,7 @@ module.exports = Pick; /***/ }), -/* 488 */ +/* 490 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105002,7 +105232,7 @@ module.exports = Pick; var GetFastValue = __webpack_require__(2); var ParseObject = __webpack_require__(232); -var ObjectLayer = __webpack_require__(489); +var ObjectLayer = __webpack_require__(491); var CreateGroupLayer = __webpack_require__(231); /** @@ -105090,7 +105320,7 @@ module.exports = ParseObjectLayers; /***/ }), -/* 489 */ +/* 491 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105212,7 +105442,7 @@ module.exports = ObjectLayer; /***/ }), -/* 490 */ +/* 492 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105306,7 +105536,7 @@ module.exports = BuildTilesetIndex; /***/ }), -/* 491 */ +/* 493 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105379,7 +105609,7 @@ module.exports = AssignTileProperties; /***/ }), -/* 492 */ +/* 494 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105390,8 +105620,8 @@ module.exports = AssignTileProperties; var Formats = __webpack_require__(32); var MapData = __webpack_require__(104); -var ParseTileLayers = __webpack_require__(493); -var ParseTilesets = __webpack_require__(494); +var ParseTileLayers = __webpack_require__(495); +var ParseTilesets = __webpack_require__(496); /** * Parses a Weltmeister JSON object into a new MapData object. @@ -105446,7 +105676,7 @@ module.exports = ParseWeltmeister; /***/ }), -/* 493 */ +/* 495 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105532,7 +105762,7 @@ module.exports = ParseTileLayers; /***/ }), -/* 494 */ +/* 496 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105583,7 +105813,7 @@ module.exports = ParseTilesets; /***/ }), -/* 495 */ +/* 497 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105593,16 +105823,16 @@ module.exports = ParseTilesets; */ var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(39); -var DynamicTilemapLayer = __webpack_require__(496); +var DegToRad = __webpack_require__(40); +var DynamicTilemapLayer = __webpack_require__(498); var Extend = __webpack_require__(19); var Formats = __webpack_require__(32); var LayerData = __webpack_require__(103); var Rotate = __webpack_require__(335); -var SpliceOne = __webpack_require__(80); -var StaticTilemapLayer = __webpack_require__(497); +var SpliceOne = __webpack_require__(81); +var StaticTilemapLayer = __webpack_require__(499); var Tile = __webpack_require__(74); -var TilemapComponents = __webpack_require__(143); +var TilemapComponents = __webpack_require__(147); var Tileset = __webpack_require__(105); /** @@ -108140,7 +108370,7 @@ module.exports = Tilemap; /***/ }), -/* 496 */ +/* 498 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108151,9 +108381,9 @@ module.exports = Tilemap; var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var DynamicTilemapLayerRender = __webpack_require__(1351); +var DynamicTilemapLayerRender = __webpack_require__(1357); var GameObject = __webpack_require__(14); -var TilemapComponents = __webpack_require__(143); +var TilemapComponents = __webpack_require__(147); /** * @classdesc @@ -108163,7 +108393,7 @@ var TilemapComponents = __webpack_require__(143); * A Dynamic Tilemap Layer trades some speed for being able to apply powerful effects. Unlike a * Static Tilemap Layer, you can apply per-tile effects like tint or alpha, and you can change the * tiles in a DynamicTilemapLayer. - * + * * Use this over a Static Tilemap Layer when you need those features. * * @class DynamicTilemapLayer @@ -108259,7 +108489,7 @@ var DynamicTilemapLayer = new Class({ /** * The Tileset/s associated with this layer. - * + * * As of Phaser 3.14 this property is now an array of Tileset objects, previously it was a single reference. * * @name Phaser.Tilemaps.DynamicTilemapLayer#tileset @@ -108356,17 +108586,17 @@ var DynamicTilemapLayer = new Class({ /** * The rendering (draw) order of the tiles in this layer. - * + * * The default is 0 which is 'right-down', meaning it will draw the tiles starting from the top-left, * drawing to the right and then moving down to the next row. - * + * * The draw orders are: - * + * * 0 = right-down * 1 = left-down * 2 = right-up * 3 = left-up - * + * * This can be changed via the `setRenderOrder` method. * * @name Phaser.Tilemaps.DynamicTilemapLayer#_renderOrder @@ -108392,7 +108622,7 @@ var DynamicTilemapLayer = new Class({ this.setOrigin(); this.setSize(tilemap.tileWidth * this.layer.width, tilemap.tileHeight * this.layer.height); - this.initPipeline('TextureTintPipeline'); + this.initPipeline('MultiPipeline'); }, /** @@ -108401,7 +108631,7 @@ var DynamicTilemapLayer = new Class({ * @method Phaser.Tilemaps.DynamicTilemapLayer#setTilesets * @private * @since 3.14.0 - * + * * @param {(string|string[]|Phaser.Tilemaps.Tileset|Phaser.Tilemaps.Tileset[])} tileset - The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object. */ setTilesets: function (tilesets) @@ -108443,20 +108673,20 @@ var DynamicTilemapLayer = new Class({ /** * Sets the rendering (draw) order of the tiles in this layer. - * + * * The default is 'right-down', meaning it will order the tiles starting from the top-left, * drawing to the right and then moving down to the next row. - * + * * The draw orders are: - * + * * 0 = right-down * 1 = left-down * 2 = right-up * 3 = left-up - * + * * Setting the render order does not change the tiles or how they are stored in the layer, * it purely impacts the order in which they are rendered. - * + * * You can provide either an integer (0 to 3), or the string version of the order. * * @method Phaser.Tilemaps.DynamicTilemapLayer#setRenderOrder @@ -108596,7 +108826,7 @@ var DynamicTilemapLayer = new Class({ * * @method Phaser.Tilemaps.DynamicTilemapLayer#destroy * @since 3.0.0 - * + * * @param {boolean} [removeFromTilemap=true] - Remove this layer from the parent Tilemap? */ destroy: function (removeFromTilemap) @@ -109461,7 +109691,7 @@ module.exports = DynamicTilemapLayer; /***/ }), -/* 497 */ +/* 499 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109474,9 +109704,9 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameEvents = __webpack_require__(20); var GameObject = __webpack_require__(14); -var ModelViewProjection = __webpack_require__(151); -var StaticTilemapLayerRender = __webpack_require__(1354); -var TilemapComponents = __webpack_require__(143); +var ModelViewProjection = __webpack_require__(110); +var StaticTilemapLayerRender = __webpack_require__(1360); +var TilemapComponents = __webpack_require__(147); var TransformMatrix = __webpack_require__(30); var Utils = __webpack_require__(10); @@ -109826,7 +110056,7 @@ var StaticTilemapLayer = new Class({ this.updateVBOData(); - this.initPipeline('TextureTintPipeline'); + this.initPipeline('MultiPipeline'); this.mvpInit(); @@ -110981,7 +111211,7 @@ module.exports = StaticTilemapLayer; /***/ }), -/* 498 */ +/* 500 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111294,7 +111524,7 @@ module.exports = TimerEvent; /***/ }), -/* 499 */ +/* 501 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111303,7 +111533,7 @@ module.exports = TimerEvent; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RESERVED = __webpack_require__(1368); +var RESERVED = __webpack_require__(1374); /** * Internal function used by the Tween Builder to return an array of properties @@ -111355,7 +111585,7 @@ module.exports = GetProps; /***/ }), -/* 500 */ +/* 502 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111403,7 +111633,7 @@ module.exports = GetTweens; /***/ }), -/* 501 */ +/* 503 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111414,9 +111644,9 @@ module.exports = GetTweens; var Defaults = __webpack_require__(236); var GetAdvancedValue = __webpack_require__(15); -var GetBoolean = __webpack_require__(88); +var GetBoolean = __webpack_require__(89); var GetEaseFunction = __webpack_require__(69); -var GetNewValue = __webpack_require__(147); +var GetNewValue = __webpack_require__(151); var GetValue = __webpack_require__(6); var GetValueOp = __webpack_require__(235); var Tween = __webpack_require__(237); @@ -111533,7 +111763,7 @@ module.exports = NumberTweenBuilder; /***/ }), -/* 502 */ +/* 504 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111779,7 +112009,7 @@ module.exports = StaggerBuilder; /***/ }), -/* 503 */ +/* 505 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111791,14 +112021,14 @@ module.exports = StaggerBuilder; var Clone = __webpack_require__(67); var Defaults = __webpack_require__(236); var GetAdvancedValue = __webpack_require__(15); -var GetBoolean = __webpack_require__(88); +var GetBoolean = __webpack_require__(89); var GetEaseFunction = __webpack_require__(69); -var GetNewValue = __webpack_require__(147); +var GetNewValue = __webpack_require__(151); var GetTargets = __webpack_require__(234); -var GetTweens = __webpack_require__(500); +var GetTweens = __webpack_require__(502); var GetValue = __webpack_require__(6); -var Timeline = __webpack_require__(504); -var TweenBuilder = __webpack_require__(148); +var Timeline = __webpack_require__(506); +var TweenBuilder = __webpack_require__(152); /** * Builds a Timeline of Tweens based on a configuration object. @@ -111933,7 +112163,7 @@ module.exports = TimelineBuilder; /***/ }), -/* 504 */ +/* 506 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111945,8 +112175,8 @@ module.exports = TimelineBuilder; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(11); var Events = __webpack_require__(238); -var TweenBuilder = __webpack_require__(148); -var TWEEN_CONST = __webpack_require__(89); +var TweenBuilder = __webpack_require__(152); +var TWEEN_CONST = __webpack_require__(90); /** * @classdesc @@ -112838,7 +113068,7 @@ module.exports = Timeline; /***/ }), -/* 505 */ +/* 507 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112847,9 +113077,9 @@ module.exports = Timeline; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseAnimation = __webpack_require__(155); +var BaseAnimation = __webpack_require__(156); var Class = __webpack_require__(0); -var Events = __webpack_require__(112); +var Events = __webpack_require__(115); /** * @classdesc @@ -114033,7 +114263,7 @@ module.exports = Animation; /***/ }), -/* 506 */ +/* 508 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -114043,12 +114273,12 @@ module.exports = Animation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CanvasSnapshot = __webpack_require__(507); -var CameraEvents = __webpack_require__(40); +var CanvasSnapshot = __webpack_require__(509); +var CameraEvents = __webpack_require__(41); var Class = __webpack_require__(0); var CONST = __webpack_require__(33); -var GetBlendModes = __webpack_require__(508); -var ScaleEvents = __webpack_require__(92); +var GetBlendModes = __webpack_require__(510); +var ScaleEvents = __webpack_require__(93); var TransformMatrix = __webpack_require__(30); /** @@ -114840,7 +115070,7 @@ module.exports = CanvasRenderer; /***/ }), -/* 507 */ +/* 509 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -114933,7 +115163,7 @@ module.exports = CanvasSnapshot; /***/ }), -/* 508 */ +/* 510 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -114997,7 +115227,7 @@ module.exports = GetBlendModes; /***/ }), -/* 509 */ +/* 511 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115007,26 +115237,27 @@ module.exports = GetBlendModes; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseCamera = __webpack_require__(91); -var CameraEvents = __webpack_require__(40); +var BaseCamera = __webpack_require__(92); +var CameraEvents = __webpack_require__(41); var Class = __webpack_require__(0); var CONST = __webpack_require__(33); var GameEvents = __webpack_require__(20); -var IsSizePowerOfTwo = __webpack_require__(122); +var IsSizePowerOfTwo = __webpack_require__(125); var NOOP = __webpack_require__(1); var ProjectOrtho = __webpack_require__(181); -var ScaleEvents = __webpack_require__(92); -var SpliceOne = __webpack_require__(80); -var TextureEvents = __webpack_require__(123); +var ScaleEvents = __webpack_require__(93); +var SpliceOne = __webpack_require__(81); +var TextureEvents = __webpack_require__(127); var TransformMatrix = __webpack_require__(30); var Utils = __webpack_require__(10); -var WebGLSnapshot = __webpack_require__(510); +var WebGLSnapshot = __webpack_require__(512); // Default Pipelines -var BitmapMaskPipeline = __webpack_require__(511); -var ForwardDiffuseLightPipeline = __webpack_require__(512); -var TextureTintPipeline = __webpack_require__(150); -var TextureTintStripPipeline = __webpack_require__(513); +var BitmapMaskPipeline = __webpack_require__(513); +var LightPipeline = __webpack_require__(514); +var MultiPipeline = __webpack_require__(109); +var RopePipeline = __webpack_require__(515); +var SinglePipeline = __webpack_require__(516); /** * @callback WebGLContextCallback @@ -115806,11 +116037,6 @@ var WebGLRenderer = new Class({ // Clear previous pipelines and reload default ones this.pipelines = {}; - this.addPipeline('TextureTintPipeline', new TextureTintPipeline({ game: game, renderer: this })); - this.addPipeline('TextureTintStripPipeline', new TextureTintStripPipeline({ game: game, renderer: this })); - this.addPipeline('BitmapMaskPipeline', new BitmapMaskPipeline({ game: game, renderer: this })); - this.addPipeline('Light2D', new ForwardDiffuseLightPipeline({ game: game, renderer: this, maxLights: config.maxLights })); - this.setBlendMode(CONST.BlendModes.NORMAL); game.textures.once(TextureEvents.READY, this.boot, this); @@ -115827,14 +116053,18 @@ var WebGLRenderer = new Class({ */ boot: function () { - for (var pipelineName in this.pipelines) - { - this.pipelines[pipelineName].boot(); - } + var game = this.game; - var blank = this.game.textures.getFrame('__DEFAULT'); + var multi = this.addPipeline('MultiPipeline', new MultiPipeline({ game: game })); - this.pipelines.TextureTintPipeline.currentFrame = blank; + this.addPipeline('SinglePipeline', new SinglePipeline({ game: game })); + this.addPipeline('RopePipeline', new RopePipeline({ game: game })); + this.addPipeline('BitmapMaskPipeline', new BitmapMaskPipeline({ game: game })); + this.addPipeline('Light2D', new LightPipeline({ game: game })); + + var blank = game.textures.getFrame('__DEFAULT'); + + multi.currentFrame = blank; this.blankTexture = blank; @@ -115844,13 +116074,13 @@ var WebGLRenderer = new Class({ gl.enable(gl.SCISSOR_TEST); - this.setPipeline(this.pipelines.TextureTintPipeline); + this.setPipeline(multi); - this.game.scale.on(ScaleEvents.RESIZE, this.onResize, this); + game.scale.on(ScaleEvents.RESIZE, this.onResize, this); - var baseSize = this.game.scale.baseSize; + var baseSize = game.scale.baseSize; - this.resize(baseSize.width, baseSize.height, this.game.scale.resolution); + this.resize(baseSize.width, baseSize.height, game.scale.resolution); }, /** @@ -116033,6 +116263,11 @@ var WebGLRenderer = new Class({ pipelineInstance.name = pipelineName; + if (!pipelineInstance.hasBooted) + { + pipelineInstance.boot(); + } + this.pipelines[pipelineName].resize(this.width, this.height, this.config.resolution); return pipelineInstance; @@ -116220,9 +116455,6 @@ var WebGLRenderer = new Class({ this.resetTextures(true); - // gl.activeTexture(gl.TEXTURE1); - // gl.bindTexture(gl.TEXTURE_2D, this.blankTexture.glTexture); - this.currentActiveTexture = 1; this.startActiveTexture++; @@ -116391,6 +116623,13 @@ var WebGLRenderer = new Class({ */ setTextureSource: function (textureSource) { + if (this.currentPipeline.forceZero) + { + this.setTextureZero(textureSource.glTexture, true); + + return 0; + } + var gl = this.gl; var currentActiveTexture = this.currentActiveTexture; @@ -116455,11 +116694,17 @@ var WebGLRenderer = new Class({ * @since 3.50.0 * * @param {WebGLTexture} texture - The WebGL texture that needs to be bound. + * @param {boolean} [flush=false] - Flush the pipeline if the texture is different? */ - setTextureZero: function (texture) + setTextureZero: function (texture, flush) { if (this.textureZero !== texture) { + if (flush) + { + this.flush(); + } + var gl = this.gl; gl.activeTexture(gl.TEXTURE0); @@ -116608,6 +116853,13 @@ var WebGLRenderer = new Class({ */ setTexture2D: function (texture) { + if (this.currentPipeline.forceZero) + { + this.setTextureZero(texture, true); + + return 0; + } + var gl = this.gl; var currentActiveTexture = this.currentActiveTexture; @@ -117165,7 +117417,7 @@ var WebGLRenderer = new Class({ var cw = camera._cw; var ch = camera._ch; - var TextureTintPipeline = this.pipelines.TextureTintPipeline; + var MultiPipeline = this.pipelines.MultiPipeline; var color = camera.backgroundColor; @@ -117183,7 +117435,7 @@ var WebGLRenderer = new Class({ gl.clear(gl.COLOR_BUFFER_BIT); - ProjectOrtho(TextureTintPipeline, cx, cw + cx, cy, ch + cy, -1000, 1000); + ProjectOrtho(MultiPipeline, cx, cw + cx, cy, ch + cy, -1000, 1000); if (camera.mask) { @@ -117195,7 +117447,7 @@ var WebGLRenderer = new Class({ if (color.alphaGL > 0) { - TextureTintPipeline.drawFillRect( + MultiPipeline.drawFillRect( cx, cy, cw + cx, ch + cy, Utils.getTintFromFloats(color.redGL, color.greenGL, color.blueGL, 1), color.alphaGL @@ -117218,7 +117470,7 @@ var WebGLRenderer = new Class({ if (color.alphaGL > 0) { - TextureTintPipeline.drawFillRect( + MultiPipeline.drawFillRect( cx, cy, cw , ch, Utils.getTintFromFloats(color.redGL, color.greenGL, color.blueGL, 1), color.alphaGL @@ -117263,12 +117515,12 @@ var WebGLRenderer = new Class({ */ postRenderCamera: function (camera) { - this.setPipeline(this.pipelines.TextureTintPipeline); + this.setPipeline(this.pipelines.MultiPipeline); - var TextureTintPipeline = this.pipelines.TextureTintPipeline; + var MultiPipeline = this.pipelines.MultiPipeline; - camera.flashEffect.postRenderWebGL(TextureTintPipeline, Utils.getTintFromFloats); - camera.fadeEffect.postRenderWebGL(TextureTintPipeline, Utils.getTintFromFloats); + camera.flashEffect.postRenderWebGL(MultiPipeline, Utils.getTintFromFloats); + camera.fadeEffect.postRenderWebGL(MultiPipeline, Utils.getTintFromFloats); camera.dirty = false; @@ -117276,7 +117528,7 @@ var WebGLRenderer = new Class({ if (camera.renderToTexture) { - TextureTintPipeline.flush(); + MultiPipeline.flush(); this.setFramebuffer(null); @@ -117284,11 +117536,11 @@ var WebGLRenderer = new Class({ if (camera.renderToGame) { - ProjectOrtho(TextureTintPipeline, 0, TextureTintPipeline.width, TextureTintPipeline.height, 0, -1000.0, 1000.0); + ProjectOrtho(MultiPipeline, 0, MultiPipeline.width, MultiPipeline.height, 0, -1000.0, 1000.0); var getTint = Utils.getTintAppendFloatAlpha; - var pipeline = (camera.pipeline) ? camera.pipeline : TextureTintPipeline; + var pipeline = (camera.pipeline) ? camera.pipeline : MultiPipeline; pipeline.batchTexture( camera, @@ -117374,7 +117626,7 @@ var WebGLRenderer = new Class({ this.textureFlush = 0; - this.setPipeline(this.pipelines.TextureTintPipeline); + this.setPipeline(this.pipelines.MultiPipeline); }, /** @@ -118388,7 +118640,7 @@ module.exports = WebGLRenderer; /***/ }), -/* 510 */ +/* 512 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -118498,7 +118750,7 @@ module.exports = WebGLSnapshot; /***/ }), -/* 511 */ +/* 513 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -118509,23 +118761,18 @@ module.exports = WebGLSnapshot; */ var Class = __webpack_require__(0); -var ShaderSourceFS = __webpack_require__(787); -var ShaderSourceVS = __webpack_require__(788); -var WebGLPipeline = __webpack_require__(149); +var GetFastValue = __webpack_require__(2); +var ShaderSourceFS = __webpack_require__(790); +var ShaderSourceVS = __webpack_require__(791); +var WebGLPipeline = __webpack_require__(108); /** * @classdesc - * BitmapMaskPipeline handles all bitmap masking rendering in WebGL. It works by using + * + * + * + * BitmapMaskPipeline handles all bitmap masking rendering in WebGL. It works by using * sampling two texture on the fragment shader and using the fragment's alpha to clip the region. - * The config properties are: - * - game: Current game instance. - * - renderer: Current WebGL renderer. - * - topology: This indicates how the primitives are rendered. The default value is GL_TRIANGLES. - * Here is the full list of rendering primitives (https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants). - * - vertShader: Source for vertex shader as a string. - * - fragShader: Source for fragment shader as a string. - * - vertexCapacity: The amount of vertices that shall be allocated - * - vertexSize: The size of a single vertex in bytes. * * @class BitmapMaskPipeline * @extends Phaser.Renderer.WebGL.WebGLPipeline @@ -118533,42 +118780,34 @@ var WebGLPipeline = __webpack_require__(149); * @constructor * @since 3.0.0 * - * @param {object} config - Used for overriding shader an pipeline properties if extending this pipeline. + * @param {Phaser.Types.Renderer.WebGL.WebGLPipelineConfig} config - The configuration options for this pipeline. */ var BitmapMaskPipeline = new Class({ Extends: WebGLPipeline, - + initialize: function BitmapMaskPipeline (config) { - WebGLPipeline.call(this, { - game: config.game, - renderer: config.renderer, - gl: config.renderer.gl, - topology: (config.topology ? config.topology : config.renderer.gl.TRIANGLES), - vertShader: (config.vertShader ? config.vertShader : ShaderSourceVS), - fragShader: (config.fragShader ? config.fragShader : ShaderSourceFS), - vertexCapacity: (config.vertexCapacity ? config.vertexCapacity : 3), + config.fragShader = GetFastValue(config, 'fragShader', ShaderSourceFS), + config.vertShader = GetFastValue(config, 'vertShader', ShaderSourceVS), + config.vertexSize = GetFastValue(config, 'vertexSize', 8), + config.vertexCapacity = GetFastValue(config, 'vertexCapacity', 3), + config.vertices = GetFastValue(config, 'vertices', new Float32Array([ -1, 1, -1, -7, 7, 1 ]).buffer), + config.attributes = GetFastValue(config, 'attributes', [ + { + name: 'inPosition', + size: 2, + type: config.game.renderer.gl.FLOAT, + normalized: false, + offset: 0, + enabled: false, + location: -1 + } + ]); - vertexSize: (config.vertexSize ? config.vertexSize : - Float32Array.BYTES_PER_ELEMENT * 2), - - vertices: new Float32Array([ - -1, +1, -1, -7, +7, +1 - ]).buffer, - - attributes: [ - { - name: 'inPosition', - size: 2, - type: config.renderer.gl.FLOAT, - normalized: false, - offset: 0 - } - ] - }); + WebGLPipeline.call(this, config); /** * Float32 view of the array buffer containing the pipeline's vertices. @@ -118577,20 +118816,10 @@ var BitmapMaskPipeline = new Class({ * @type {Float32Array} * @since 3.0.0 */ - this.vertexViewF32 = new Float32Array(this.vertexData); + // this.vertexViewF32 = new Float32Array(this.vertexData); /** - * Size of the batch. - * - * @name Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#maxQuads - * @type {number} - * @default 1 - * @since 3.0.0 - */ - this.maxQuads = 1; - - /** - * Dirty flag to check if resolution properties need to be updated on the + * Dirty flag to check if resolution properties need to be updated on the * masking shader. * * @name Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#resolutionDirty @@ -118598,7 +118827,7 @@ var BitmapMaskPipeline = new Class({ * @default true * @since 3.0.0 */ - this.resolutionDirty = true; + // this.resolutionDirty = true; }, /** @@ -118609,14 +118838,13 @@ var BitmapMaskPipeline = new Class({ * @since 3.0.0 * * @return {this} This WebGLPipeline instance. - */ onBind: function () { WebGLPipeline.prototype.onBind.call(this); var renderer = this.renderer; var program = this.program; - + if (this.resolutionDirty) { renderer.setFloat2(program, 'uResolution', this.width, this.height); @@ -118627,6 +118855,31 @@ var BitmapMaskPipeline = new Class({ return this; }, + */ + + /** + * Called every time the pipeline is bound by the renderer. + * Sets the shader program, vertex buffer and other resources. + * Should only be called when changing pipeline. + * + * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#bind + * @since 3.50.0 + * + * @return {this} This WebGLPipeline instance. + */ + bind: function () + { + WebGLPipeline.prototype.bind.call(this); + + var renderer = this.renderer; + var program = this.program; + + renderer.setFloat2(program, 'uResolution', this.width, this.height); + renderer.setInt1(program, 'uMainSampler', 0); + renderer.setInt1(program, 'uMaskSampler', 1); + + return this; + }, /** * Resizes this pipeline and updates the projection. @@ -118691,10 +118944,10 @@ var BitmapMaskPipeline = new Class({ }, /** - * The masked game objects framebuffer is unbound and its texture - * is bound together with the mask texture and the mask shader and + * The masked game objects framebuffer is unbound and its texture + * is bound together with the mask texture and the mask shader and * a draw call with a single quad is processed. Here is where the - * masking effect is applied. + * masking effect is applied. * * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#endMask * @since 3.0.0 @@ -118763,7 +119016,7 @@ module.exports = BitmapMaskPipeline; /***/ }), -/* 512 */ +/* 514 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -118774,47 +119027,81 @@ module.exports = BitmapMaskPipeline; */ var Class = __webpack_require__(0); -var ShaderSourceFS = __webpack_require__(789); -var TextureTintPipeline = __webpack_require__(150); -var WebGLPipeline = __webpack_require__(149); +var GetFastValue = __webpack_require__(2); +var ShaderSourceFS = __webpack_require__(792); +var MultiPipeline = __webpack_require__(109); +var WebGLPipeline = __webpack_require__(108); var LIGHT_COUNT = 10; /** * @classdesc - * ForwardDiffuseLightPipeline implements a forward rendering approach for 2D lights. * - * It works by using a custom shader, combined with Light Game Objects, that provides an ambient - * illumination effect in your games. + * The Light Pipeline is an extension of the Multi Pipeline and uses a custom shader + * designed to handle forward diffused rendering of 2D lights in a Scene. * - * This pipeline extends TextureTintPipeline so it implements all of its rendering functions and batching system. + * The shader works in tandem with Light Game Objects, and optionally texture normal maps, + * to provide an ambient illumination effect. * - * @class ForwardDiffuseLightPipeline - * @extends Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline + * If you wish to provide your own shader, you can use the `%LIGHT_COUNT%` declaration in the source, + * and it will be automatically replaced at run-time with the total number of configured lights. + * + * The maximum number of lights can be set in the Render Config `maxLights` property and defaults to 10. + * + * Prior to Phaser v3.50 this pipeline was called the `ForwardDiffuseLightPipeline`. + * + * The fragment shader it uses can be found in `shaders/src/Light.frag`. + * The vertex shader it uses can be found in `shaders/src/Multi.vert`. + * + * The default shader attributes for this pipeline are: + * + * `inPosition` (vec2, offset 0) + * `inTexCoord` (vec2, offset 8) + * `inTexId` (float, offset 16) + * `inTintEffect` (float, offset 20) + * `inTint` (vec4, offset 24, normalized) + * + * The default shader uniforms for this pipeline are: + * + * `uProjectionMatrix` (mat4) + * `uViewMatrix` (mat4) + * `uModelMatrix` (mat4) + * `uMainSampler` (sampler2D) + * `uNormSampler` (sampler2D) + * `uCamera` (vec4) + * `uResolution` (vec2) + * `uAmbientLightColor` (vec3) + * `uInverseRotationMatrix` (mat3) + * `uLights` (Light struct) + * + * @class LightPipeline + * @extends Phaser.Renderer.WebGL.Pipelines.MultiPipeline * @memberof Phaser.Renderer.WebGL.Pipelines * @constructor - * @since 3.0.0 + * @since 3.50.0 * - * @param {object} config - The configuration of the pipeline, same as the {@link Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline}. The fragment shader will be replaced with the lighting shader. + * @param {Phaser.Types.Renderer.WebGL.WebGLPipelineConfig} config - The configuration options for this pipeline. */ -var ForwardDiffuseLightPipeline = new Class({ +var LightPipeline = new Class({ - Extends: TextureTintPipeline, + Extends: MultiPipeline, initialize: - function ForwardDiffuseLightPipeline (config) + function LightPipeline (config) { - LIGHT_COUNT = config.maxLights; + LIGHT_COUNT = config.game.renderer.config.maxLights; - config.fragShader = ShaderSourceFS.replace('%LIGHT_COUNT%', LIGHT_COUNT.toString()); + var fragmentShaderSource = GetFastValue(config, 'fragShader', ShaderSourceFS); - TextureTintPipeline.call(this, config); + config.fragShader = fragmentShaderSource.replace('%LIGHT_COUNT%', LIGHT_COUNT.toString()); + + MultiPipeline.call(this, config); /** * Inverse rotation matrix for normal map rotations. * - * @name Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#inverseRotationMatrix + * @name Phaser.Renderer.WebGL.Pipelines.LightPipeline#inverseRotationMatrix * @type {Float32Array} * @private * @since 3.16.0 @@ -118829,7 +119116,7 @@ var ForwardDiffuseLightPipeline = new Class({ * Stores a default normal map, which is an object with a `glTexture` property that * maps to a 1x1 texture of the color #7f7fff created in the `boot` method. * - * @name Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#defaultNormalMap + * @name Phaser.Renderer.WebGL.Pipelines.LightPipeline#defaultNormalMap * @type {object} * @since 3.50.0 */ @@ -118838,7 +119125,7 @@ var ForwardDiffuseLightPipeline = new Class({ /** * Stores the previous number of lights rendered. * - * @name Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#lightCount + * @name Phaser.Renderer.WebGL.Pipelines.LightPipeline#lightCount * @type {number} * @since 3.50.0 */ @@ -118853,7 +119140,7 @@ var ForwardDiffuseLightPipeline = new Class({ * By this stage all Game level systems are now in place and you can perform any final * tasks that the pipeline may need that relied on game systems such as the Texture Manager. * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#boot + * @method Phaser.Renderer.WebGL.LightPipeline#boot * @since 3.11.0 */ boot: function () @@ -118880,7 +119167,7 @@ var ForwardDiffuseLightPipeline = new Class({ * Sets the shader program, vertex buffer and other resources. * Should only be called when changing pipeline. * - * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#bind + * @method Phaser.Renderer.WebGL.Pipelines.LightPipeline#bind * @since 3.50.0 * * @return {this} This WebGLPipeline instance. @@ -118902,7 +119189,7 @@ var ForwardDiffuseLightPipeline = new Class({ /** * This function sets all the needed resources for each camera pass. * - * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#onRender + * @method Phaser.Renderer.WebGL.Pipelines.LightPipeline#onRender * @since 3.0.0 * * @param {Phaser.Scene} scene - The Scene being rendered. @@ -118986,7 +119273,7 @@ var ForwardDiffuseLightPipeline = new Class({ * Rotates the normal map vectors inversely by the given angle. * Only works in 2D space. * - * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#setNormalMapRotation + * @method Phaser.Renderer.WebGL.Pipelines.LightPipeline#setNormalMapRotation * @since 3.16.0 * * @param {number} rotation - The angle of rotation in radians. @@ -119027,7 +119314,7 @@ var ForwardDiffuseLightPipeline = new Class({ /** * Assigns a texture to the current batch. If a different texture is already set it creates a new batch object. * - * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#setTexture2D + * @method Phaser.Renderer.WebGL.Pipelines.LightPipeline#setTexture2D * @since 3.50.0 * * @param {WebGLTexture} [texture] - WebGLTexture that will be assigned to the current batch. If not given uses blankTexture. @@ -119062,7 +119349,7 @@ var ForwardDiffuseLightPipeline = new Class({ * Custom pipelines can use this method in order to perform any required pre-batch tasks * for the given Game Object. It must return the texture unit the Game Object was assigned. * - * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#setGameObject + * @method Phaser.Renderer.WebGL.Pipelines.LightPipeline#setGameObject * @since 3.50.0 * * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object being rendered or added to the batch. @@ -119097,7 +119384,7 @@ var ForwardDiffuseLightPipeline = new Class({ * Returns the normal map WebGLTexture from the given Game Object. * If the Game Object doesn't have one, it returns the default normal map from this pipeline instead. * - * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#getNormalMap + * @method Phaser.Renderer.WebGL.Pipelines.LightPipeline#getNormalMap * @since 3.50.0 * * @param {Phaser.GameObjects.GameObject} [gameObject] - The Game Object to get the normal map from. @@ -119142,42 +119429,65 @@ var ForwardDiffuseLightPipeline = new Class({ }); -ForwardDiffuseLightPipeline.LIGHT_COUNT = LIGHT_COUNT; +LightPipeline.LIGHT_COUNT = LIGHT_COUNT; -module.exports = ForwardDiffuseLightPipeline; +module.exports = LightPipeline; /***/ }), -/* 513 */ +/* 515 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @author Felipe Alfonso <@bitnenfer> * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var ModelViewProjection = __webpack_require__(151); -var TextureTintPipeline = __webpack_require__(150); +var ModelViewProjection = __webpack_require__(110); +var MultiPipeline = __webpack_require__(109); /** * @classdesc - * The Texture Tint Strip Pipeline is a variation of the Texture Tint Pipeline that uses a TRIANGLE_STRIP for - * its topology, instead of TRIANGLES. This is primarily used by the Rope Game Object any anything that extends it. * - * @class TextureTintStripPipeline - * @extends Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline + * The Rope Pipeline is a variation of the Multi Pipeline that uses a `TRIANGLE_STRIP` for + * its topology, instead of TRIANGLES. This is primarily used by the Rope Game Object, + * or anything that extends it. + * + * Prior to Phaser v3.50 this pipeline was called the `TextureTintStripPipeline`. + * + * The fragment shader it uses can be found in `shaders/src/Multi.frag`. + * The vertex shader it uses can be found in `shaders/src/Multi.vert`. + * + * The default shader attributes for this pipeline are: + * + * `inPosition` (vec2, offset 0) + * `inTexCoord` (vec2, offset 8) + * `inTexId` (float, offset 16) + * `inTintEffect` (float, offset 20) + * `inTint` (vec4, offset 24, normalized) + * + * The default shader uniforms for this pipeline are: + * + * `uProjectionMatrix` (mat4) + * `uViewMatrix` (mat4) + * `uModelMatrix` (mat4) + * `uMainSampler` (sampler2D array) + * + * The pipeline is structurally identical to the Multi Pipeline and should be treated as such. + * + * @class RopePipeline + * @extends Phaser.Renderer.WebGL.Pipelines.MultiPipeline * @memberof Phaser.Renderer.WebGL.Pipelines * @constructor - * @since 3.23.0 + * @since 3.50.0 * - * @param {object} config - The configuration options for this Texture Tint Pipeline, as described above. + * @param {Phaser.Types.Renderer.WebGL.WebGLPipelineConfig} config - The configuration options for this pipeline. */ -var TextureTintStripPipeline = new Class({ +var RopePipeline = new Class({ - Extends: TextureTintPipeline, + Extends: MultiPipeline, Mixins: [ ModelViewProjection @@ -119185,23 +119495,351 @@ var TextureTintStripPipeline = new Class({ initialize: - function TextureTintStripPipeline (config) + function RopePipeline (config) { - config.topology = config.renderer.gl.TRIANGLE_STRIP; + config.topology = config.game.renderer.gl.TRIANGLE_STRIP; - TextureTintPipeline.call(this, config); + MultiPipeline.call(this, config); } }); -module.exports = TextureTintStripPipeline; +module.exports = RopePipeline; + + +/***/ }), +/* 516 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var GetFastValue = __webpack_require__(2); +var ModelViewProjection = __webpack_require__(110); +var MultiPipeline = __webpack_require__(109); +var ShaderSourceFS = __webpack_require__(795); +var ShaderSourceVS = __webpack_require__(796); +var WebGLPipeline = __webpack_require__(108); + +/** + * @classdesc + * + * The Single Pipeline is a special version of the Multi Pipeline that only ever + * uses one single texture, bound to texture unit zero. Although not as efficient as the + * Multi Pipeline, it provides an easier way to create custom pipelines that only require + * a single bound texture. + * + * Prior to Phaser v3.50 this pipeline didn't exist, but could be compared to the old `TextureTintPipeline`. + * + * The fragment shader it uses can be found in `shaders/src/Single.frag`. + * The vertex shader it uses can be found in `shaders/src/Single.vert`. + * + * The default shader attributes for this pipeline are: + * + * `inPosition` (vec2, offset 0) + * `inTexCoord` (vec2, offset 8) + * `inTintEffect` (float, offset 16) + * `inTint` (vec4, offset 20, normalized) + * + * The default shader uniforms for this pipeline are: + * + * `uProjectionMatrix` (mat4) + * `uViewMatrix` (mat4) + * `uModelMatrix` (mat4) + * `uMainSampler` (sampler2D) + * + * @class SinglePipeline + * @extends Phaser.Renderer.WebGL.Pipelines.MultiPipeline + * @memberof Phaser.Renderer.WebGL.Pipelines + * @constructor + * @since 3.50.0 + * + * @param {Phaser.Types.Renderer.WebGL.WebGLPipelineConfig} config - The configuration options for this pipeline. + */ +var SinglePipeline = new Class({ + + Extends: MultiPipeline, + + Mixins: [ + ModelViewProjection + ], + + initialize: + + function SinglePipeline (config) + { + var gl = config.game.renderer.gl; + + config.fragShader = GetFastValue(config, 'fragShader', ShaderSourceFS), + config.vertShader = GetFastValue(config, 'vertShader', ShaderSourceVS), + config.vertexSize = GetFastValue(config, 'vertexSize', 24), + config.attributes = GetFastValue(config, 'attributes', [ + { + name: 'inPosition', + size: 2, + type: gl.FLOAT, + normalized: false, + offset: 0, + enabled: false, + location: -1 + }, + { + name: 'inTexCoord', + size: 2, + type: gl.FLOAT, + normalized: false, + offset: 8, + enabled: false, + location: -1 + }, + { + name: 'inTintEffect', + size: 1, + type: gl.FLOAT, + normalized: false, + offset: 16, + enabled: false, + location: -1 + }, + { + name: 'inTint', + size: 4, + type: gl.UNSIGNED_BYTE, + normalized: true, + offset: 20, + enabled: false, + location: -1 + } + ]); + + MultiPipeline.call(this, config); + + this.forceZero = true; + }, + + /** + * Adds the vertices data into the batch and flushes if full. + * + * Assumes 6 vertices in the following arrangement: + * + * ``` + * 0----3 + * |\ B| + * | \ | + * | \ | + * | A \| + * | \ + * 1----2 + * ``` + * + * Where tx0/ty0 = 0, tx1/ty1 = 1, tx2/ty2 = 2 and tx3/ty3 = 3 + * + * @method Phaser.Renderer.WebGL.Pipelines.SinglePipeline#batchQuad + * @since 3.50.0 + * + * @param {number} x0 - The top-left x position. + * @param {number} y0 - The top-left y position. + * @param {number} x1 - The bottom-left x position. + * @param {number} y1 - The bottom-left y position. + * @param {number} x2 - The bottom-right x position. + * @param {number} y2 - The bottom-right y position. + * @param {number} x3 - The top-right x position. + * @param {number} y3 - The top-right y position. + * @param {number} u0 - UV u0 value. + * @param {number} v0 - UV v0 value. + * @param {number} u1 - UV u1 value. + * @param {number} v1 - UV v1 value. + * @param {number} tintTL - The top-left tint color value. + * @param {number} tintTR - The top-right tint color value. + * @param {number} tintBL - The bottom-left tint color value. + * @param {number} tintBR - The bottom-right tint color value. + * @param {(number|boolean)} tintEffect - The tint effect for the shader to use. + * @param {WebGLTexture} [texture] - WebGLTexture that will be assigned to the current batch if a flush occurs. + * @param {integer} [unit=0] - This parameter isn't used by this pipeline, but is retained for TTP support. + * + * @return {boolean} `true` if this method caused the batch to flush, otherwise `false`. + */ + batchQuad: function (x0, y0, x1, y1, x2, y2, x3, y3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, unit) + { + if (unit === undefined) { unit = this.currentUnit; } + + var hasFlushed = false; + + if (this.vertexCount + 6 > this.vertexCapacity) + { + this.flush(); + + hasFlushed = true; + + unit = this.setTexture2D(texture); + } + + var vertexViewF32 = this.vertexViewF32; + var vertexViewU32 = this.vertexViewU32; + + var vertexOffset = (this.vertexCount * this.vertexComponentCount) - 1; + + vertexViewF32[++vertexOffset] = x0; + vertexViewF32[++vertexOffset] = y0; + vertexViewF32[++vertexOffset] = u0; + vertexViewF32[++vertexOffset] = v0; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintTL; + + vertexViewF32[++vertexOffset] = x1; + vertexViewF32[++vertexOffset] = y1; + vertexViewF32[++vertexOffset] = u0; + vertexViewF32[++vertexOffset] = v1; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintBL; + + vertexViewF32[++vertexOffset] = x2; + vertexViewF32[++vertexOffset] = y2; + vertexViewF32[++vertexOffset] = u1; + vertexViewF32[++vertexOffset] = v1; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintBR; + + vertexViewF32[++vertexOffset] = x0; + vertexViewF32[++vertexOffset] = y0; + vertexViewF32[++vertexOffset] = u0; + vertexViewF32[++vertexOffset] = v0; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintTL; + + vertexViewF32[++vertexOffset] = x2; + vertexViewF32[++vertexOffset] = y2; + vertexViewF32[++vertexOffset] = u1; + vertexViewF32[++vertexOffset] = v1; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintBR; + + vertexViewF32[++vertexOffset] = x3; + vertexViewF32[++vertexOffset] = y3; + vertexViewF32[++vertexOffset] = u1; + vertexViewF32[++vertexOffset] = v0; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintTR; + + this.vertexCount += 6; + + return hasFlushed; + }, + + /** + * Adds the vertices data into the batch and flushes if full. + * + * Assumes 3 vertices in the following arrangement: + * + * ``` + * 0 + * |\ + * | \ + * | \ + * | \ + * | \ + * 1-----2 + * ``` + * + * @method Phaser.Renderer.WebGL.Pipelines.SinglePipeline#batchTri + * @since 3.50.0 + * + * @param {number} x1 - The bottom-left x position. + * @param {number} y1 - The bottom-left y position. + * @param {number} x2 - The bottom-right x position. + * @param {number} y2 - The bottom-right y position. + * @param {number} x3 - The top-right x position. + * @param {number} y3 - The top-right y position. + * @param {number} u0 - UV u0 value. + * @param {number} v0 - UV v0 value. + * @param {number} u1 - UV u1 value. + * @param {number} v1 - UV v1 value. + * @param {number} tintTL - The top-left tint color value. + * @param {number} tintTR - The top-right tint color value. + * @param {number} tintBL - The bottom-left tint color value. + * @param {(number|boolean)} tintEffect - The tint effect for the shader to use. + * @param {WebGLTexture} [texture] - WebGLTexture that will be assigned to the current batch if a flush occurs. + * @param {integer} [unit=0] - This parameter isn't used by this pipeline, but is retained for TTP support. + * + * @return {boolean} `true` if this method caused the batch to flush, otherwise `false`. + */ + batchTri: function (x1, y1, x2, y2, x3, y3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintEffect, texture, unit) + { + if (unit === undefined) { unit = this.currentUnit; } + + var hasFlushed = false; + + if (this.vertexCount + 3 > this.vertexCapacity) + { + this.flush(); + + hasFlushed = true; + + unit = this.setTexture2D(texture); + } + + var vertexViewF32 = this.vertexViewF32; + var vertexViewU32 = this.vertexViewU32; + + var vertexOffset = (this.vertexCount * this.vertexComponentCount) - 1; + + vertexViewF32[++vertexOffset] = x1; + vertexViewF32[++vertexOffset] = y1; + vertexViewF32[++vertexOffset] = u0; + vertexViewF32[++vertexOffset] = v0; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintTL; + + vertexViewF32[++vertexOffset] = x2; + vertexViewF32[++vertexOffset] = y2; + vertexViewF32[++vertexOffset] = u0; + vertexViewF32[++vertexOffset] = v1; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintTR; + + vertexViewF32[++vertexOffset] = x3; + vertexViewF32[++vertexOffset] = y3; + vertexViewF32[++vertexOffset] = u1; + vertexViewF32[++vertexOffset] = v1; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintBL; + + this.vertexCount += 3; + + return hasFlushed; + }, + + /** + * Called every time the pipeline is bound by the renderer. + * Sets the shader program, vertex buffer and other resources. + * Should only be called when changing pipeline. + * + * @method Phaser.Renderer.WebGL.Pipelines.SinglePipeline#bind + * @since 3.50.0 + * + * @return {this} This WebGLPipeline instance. + */ + bind: function () + { + WebGLPipeline.prototype.bind.call(this); + + return this; + } + +}); + +module.exports = SinglePipeline; /***/ }), -/* 514 */, -/* 515 */, -/* 516 */, /* 517 */, -/* 518 */ +/* 518 */, +/* 519 */, +/* 520 */, +/* 521 */ /***/ (function(module, exports) { var g; @@ -119227,21 +119865,21 @@ module.exports = g; /***/ }), -/* 519 */ +/* 522 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(520); -__webpack_require__(521); -__webpack_require__(522); __webpack_require__(523); __webpack_require__(524); __webpack_require__(525); __webpack_require__(526); __webpack_require__(527); +__webpack_require__(528); +__webpack_require__(529); +__webpack_require__(530); /***/ }), -/* 520 */ +/* 523 */ /***/ (function(module, exports) { /** @@ -119281,7 +119919,7 @@ if (!Array.prototype.forEach) /***/ }), -/* 521 */ +/* 524 */ /***/ (function(module, exports) { /** @@ -119297,7 +119935,7 @@ if (!Array.isArray) /***/ }), -/* 522 */ +/* 525 */ /***/ (function(module, exports) { /* Copyright 2013 Chris Wilson @@ -119484,7 +120122,7 @@ BiquadFilterNode.type and OscillatorNode.type. /***/ }), -/* 523 */ +/* 526 */ /***/ (function(module, exports) { /** @@ -119499,7 +120137,7 @@ if (!window.console) /***/ }), -/* 524 */ +/* 527 */ /***/ (function(module, exports) { // ES6 Math.trunc - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc @@ -119511,7 +120149,7 @@ if (!Math.trunc) { /***/ }), -/* 525 */ +/* 528 */ /***/ (function(module, exports) { /** @@ -119548,7 +120186,7 @@ if (!Math.trunc) { /***/ }), -/* 526 */ +/* 529 */ /***/ (function(module, exports) { // References: @@ -119605,7 +120243,7 @@ if (!window.cancelAnimationFrame) /***/ }), -/* 527 */ +/* 530 */ /***/ (function(module, exports) { /** @@ -119658,7 +120296,7 @@ if (typeof window.Uint32Array !== 'function' && typeof window.Uint32Array !== 'o /***/ }), -/* 528 */ +/* 531 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119706,7 +120344,7 @@ module.exports = AlignTo; /***/ }), -/* 529 */ +/* 532 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119747,7 +120385,7 @@ module.exports = Angle; /***/ }), -/* 530 */ +/* 533 */ /***/ (function(module, exports) { /** @@ -119786,7 +120424,7 @@ module.exports = Call; /***/ }), -/* 531 */ +/* 534 */ /***/ (function(module, exports) { /** @@ -119844,7 +120482,7 @@ module.exports = GetFirst; /***/ }), -/* 532 */ +/* 535 */ /***/ (function(module, exports) { /** @@ -119902,7 +120540,7 @@ module.exports = GetLast; /***/ }), -/* 533 */ +/* 536 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119915,7 +120553,7 @@ var AlignIn = __webpack_require__(259); var CONST = __webpack_require__(106); var GetFastValue = __webpack_require__(2); var NOOP = __webpack_require__(1); -var Zone = __webpack_require__(111); +var Zone = __webpack_require__(114); var tempZone = new Zone({ sys: { queueDepthSort: NOOP, events: { once: NOOP } } }, 0, 0, 1, 1); @@ -120001,7 +120639,7 @@ module.exports = GridAlign; /***/ }), -/* 534 */ +/* 537 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120296,7 +120934,7 @@ module.exports = Alpha; /***/ }), -/* 535 */ +/* 538 */ /***/ (function(module, exports) { /** @@ -120323,7 +120961,7 @@ module.exports = 'add'; /***/ }), -/* 536 */ +/* 539 */ /***/ (function(module, exports) { /** @@ -120351,7 +120989,7 @@ module.exports = 'complete'; /***/ }), -/* 537 */ +/* 540 */ /***/ (function(module, exports) { /** @@ -120378,7 +121016,7 @@ module.exports = 'repeat'; /***/ }), -/* 538 */ +/* 541 */ /***/ (function(module, exports) { /** @@ -120406,7 +121044,7 @@ module.exports = 'restart'; /***/ }), -/* 539 */ +/* 542 */ /***/ (function(module, exports) { /** @@ -120434,7 +121072,7 @@ module.exports = 'start'; /***/ }), -/* 540 */ +/* 543 */ /***/ (function(module, exports) { /** @@ -120458,7 +121096,7 @@ module.exports = 'pauseall'; /***/ }), -/* 541 */ +/* 544 */ /***/ (function(module, exports) { /** @@ -120482,7 +121120,7 @@ module.exports = 'remove'; /***/ }), -/* 542 */ +/* 545 */ /***/ (function(module, exports) { /** @@ -120505,7 +121143,7 @@ module.exports = 'resumeall'; /***/ }), -/* 543 */ +/* 546 */ /***/ (function(module, exports) { /** @@ -120534,7 +121172,7 @@ module.exports = 'animationcomplete'; /***/ }), -/* 544 */ +/* 547 */ /***/ (function(module, exports) { /** @@ -120562,7 +121200,7 @@ module.exports = 'animationcomplete-'; /***/ }), -/* 545 */ +/* 548 */ /***/ (function(module, exports) { /** @@ -120591,7 +121229,7 @@ module.exports = 'animationrepeat-'; /***/ }), -/* 546 */ +/* 549 */ /***/ (function(module, exports) { /** @@ -120619,7 +121257,7 @@ module.exports = 'animationrestart-'; /***/ }), -/* 547 */ +/* 550 */ /***/ (function(module, exports) { /** @@ -120647,7 +121285,7 @@ module.exports = 'animationstart-'; /***/ }), -/* 548 */ +/* 551 */ /***/ (function(module, exports) { /** @@ -120676,7 +121314,7 @@ module.exports = 'animationupdate-'; /***/ }), -/* 549 */ +/* 552 */ /***/ (function(module, exports) { /** @@ -120706,7 +121344,7 @@ module.exports = 'animationrepeat'; /***/ }), -/* 550 */ +/* 553 */ /***/ (function(module, exports) { /** @@ -120735,7 +121373,7 @@ module.exports = 'animationrestart'; /***/ }), -/* 551 */ +/* 554 */ /***/ (function(module, exports) { /** @@ -120764,7 +121402,7 @@ module.exports = 'animationstart'; /***/ }), -/* 552 */ +/* 555 */ /***/ (function(module, exports) { /** @@ -120794,7 +121432,7 @@ module.exports = 'animationupdate'; /***/ }), -/* 553 */ +/* 556 */ /***/ (function(module, exports) { /** @@ -120943,7 +121581,7 @@ module.exports = ComputedSize; /***/ }), -/* 554 */ +/* 557 */ /***/ (function(module, exports) { /** @@ -121068,7 +121706,7 @@ module.exports = Crop; /***/ }), -/* 555 */ +/* 558 */ /***/ (function(module, exports) { /** @@ -121232,7 +121870,7 @@ module.exports = Flip; /***/ }), -/* 556 */ +/* 559 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121591,7 +122229,7 @@ module.exports = GetBounds; /***/ }), -/* 557 */ +/* 560 */ /***/ (function(module, exports) { /** @@ -121614,7 +122252,7 @@ module.exports = 'blur'; /***/ }), -/* 558 */ +/* 561 */ /***/ (function(module, exports) { /** @@ -121636,7 +122274,7 @@ module.exports = 'boot'; /***/ }), -/* 559 */ +/* 562 */ /***/ (function(module, exports) { /** @@ -121659,7 +122297,7 @@ module.exports = 'contextlost'; /***/ }), -/* 560 */ +/* 563 */ /***/ (function(module, exports) { /** @@ -121682,7 +122320,7 @@ module.exports = 'contextrestored'; /***/ }), -/* 561 */ +/* 564 */ /***/ (function(module, exports) { /** @@ -121705,7 +122343,7 @@ module.exports = 'destroy'; /***/ }), -/* 562 */ +/* 565 */ /***/ (function(module, exports) { /** @@ -121727,7 +122365,7 @@ module.exports = 'focus'; /***/ }), -/* 563 */ +/* 566 */ /***/ (function(module, exports) { /** @@ -121753,7 +122391,7 @@ module.exports = 'hidden'; /***/ }), -/* 564 */ +/* 567 */ /***/ (function(module, exports) { /** @@ -121774,7 +122412,7 @@ module.exports = 'pause'; /***/ }), -/* 565 */ +/* 568 */ /***/ (function(module, exports) { /** @@ -121800,7 +122438,7 @@ module.exports = 'postrender'; /***/ }), -/* 566 */ +/* 569 */ /***/ (function(module, exports) { /** @@ -121825,7 +122463,7 @@ module.exports = 'poststep'; /***/ }), -/* 567 */ +/* 570 */ /***/ (function(module, exports) { /** @@ -121850,7 +122488,7 @@ module.exports = 'prerender'; /***/ }), -/* 568 */ +/* 571 */ /***/ (function(module, exports) { /** @@ -121875,7 +122513,7 @@ module.exports = 'prestep'; /***/ }), -/* 569 */ +/* 572 */ /***/ (function(module, exports) { /** @@ -121897,7 +122535,7 @@ module.exports = 'ready'; /***/ }), -/* 570 */ +/* 573 */ /***/ (function(module, exports) { /** @@ -121918,7 +122556,7 @@ module.exports = 'resume'; /***/ }), -/* 571 */ +/* 574 */ /***/ (function(module, exports) { /** @@ -121943,7 +122581,7 @@ module.exports = 'step'; /***/ }), -/* 572 */ +/* 575 */ /***/ (function(module, exports) { /** @@ -121967,7 +122605,7 @@ module.exports = 'visible'; /***/ }), -/* 573 */ +/* 576 */ /***/ (function(module, exports) { /** @@ -122170,7 +122808,7 @@ module.exports = Origin; /***/ }), -/* 574 */ +/* 577 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122179,10 +122817,10 @@ module.exports = Origin; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DegToRad = __webpack_require__(39); -var GetBoolean = __webpack_require__(88); +var DegToRad = __webpack_require__(40); +var GetBoolean = __webpack_require__(89); var GetValue = __webpack_require__(6); -var TWEEN_CONST = __webpack_require__(89); +var TWEEN_CONST = __webpack_require__(90); var Vector2 = __webpack_require__(3); /** @@ -122597,7 +123235,7 @@ module.exports = PathFollower; /***/ }), -/* 575 */ +/* 578 */ /***/ (function(module, exports) { /** @@ -122784,7 +123422,7 @@ module.exports = Size; /***/ }), -/* 576 */ +/* 579 */ /***/ (function(module, exports) { /** @@ -122914,7 +123552,7 @@ module.exports = Texture; /***/ }), -/* 577 */ +/* 580 */ /***/ (function(module, exports) { /** @@ -123122,7 +123760,7 @@ module.exports = TextureCrop; /***/ }), -/* 578 */ +/* 581 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123131,7 +123769,7 @@ module.exports = TextureCrop; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetColorFromValue = __webpack_require__(114); +var GetColorFromValue = __webpack_require__(117); /** * Provides methods used for setting the tint of a Game Object. @@ -123454,7 +124092,7 @@ module.exports = Tint; /***/ }), -/* 579 */ +/* 582 */ /***/ (function(module, exports) { /** @@ -123486,7 +124124,7 @@ module.exports = 'changedata'; /***/ }), -/* 580 */ +/* 583 */ /***/ (function(module, exports) { /** @@ -123516,7 +124154,7 @@ module.exports = 'changedata-'; /***/ }), -/* 581 */ +/* 584 */ /***/ (function(module, exports) { /** @@ -123544,7 +124182,7 @@ module.exports = 'removedata'; /***/ }), -/* 582 */ +/* 585 */ /***/ (function(module, exports) { /** @@ -123572,7 +124210,7 @@ module.exports = 'setdata'; /***/ }), -/* 583 */ +/* 586 */ /***/ (function(module, exports) { /** @@ -123597,7 +124235,7 @@ module.exports = 'destroy'; /***/ }), -/* 584 */ +/* 587 */ /***/ (function(module, exports) { /** @@ -123629,7 +124267,7 @@ module.exports = 'complete'; /***/ }), -/* 585 */ +/* 588 */ /***/ (function(module, exports) { /** @@ -123658,7 +124296,7 @@ module.exports = 'created'; /***/ }), -/* 586 */ +/* 589 */ /***/ (function(module, exports) { /** @@ -123684,7 +124322,7 @@ module.exports = 'error'; /***/ }), -/* 587 */ +/* 590 */ /***/ (function(module, exports) { /** @@ -123716,7 +124354,7 @@ module.exports = 'loop'; /***/ }), -/* 588 */ +/* 591 */ /***/ (function(module, exports) { /** @@ -123744,7 +124382,7 @@ module.exports = 'play'; /***/ }), -/* 589 */ +/* 592 */ /***/ (function(module, exports) { /** @@ -123769,7 +124407,7 @@ module.exports = 'seeked'; /***/ }), -/* 590 */ +/* 593 */ /***/ (function(module, exports) { /** @@ -123795,7 +124433,7 @@ module.exports = 'seeking'; /***/ }), -/* 591 */ +/* 594 */ /***/ (function(module, exports) { /** @@ -123821,7 +124459,7 @@ module.exports = 'stop'; /***/ }), -/* 592 */ +/* 595 */ /***/ (function(module, exports) { /** @@ -123847,7 +124485,7 @@ module.exports = 'timeout'; /***/ }), -/* 593 */ +/* 596 */ /***/ (function(module, exports) { /** @@ -123873,7 +124511,7 @@ module.exports = 'unlocked'; /***/ }), -/* 594 */ +/* 597 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123914,7 +124552,7 @@ module.exports = IncAlpha; /***/ }), -/* 595 */ +/* 598 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123955,7 +124593,7 @@ module.exports = IncX; /***/ }), -/* 596 */ +/* 599 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124002,7 +124640,7 @@ module.exports = IncXY; /***/ }), -/* 597 */ +/* 600 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124043,7 +124681,7 @@ module.exports = IncY; /***/ }), -/* 598 */ +/* 601 */ /***/ (function(module, exports) { /** @@ -124092,7 +124730,7 @@ module.exports = PlaceOnCircle; /***/ }), -/* 599 */ +/* 602 */ /***/ (function(module, exports) { /** @@ -124144,7 +124782,7 @@ module.exports = PlaceOnEllipse; /***/ }), -/* 600 */ +/* 603 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124153,7 +124791,7 @@ module.exports = PlaceOnEllipse; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetPoints = __webpack_require__(157); +var GetPoints = __webpack_require__(158); /** * Positions an array of Game Objects on evenly spaced points of a Line. @@ -124188,7 +124826,7 @@ module.exports = PlaceOnLine; /***/ }), -/* 601 */ +/* 604 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124246,7 +124884,7 @@ module.exports = PlaceOnRectangle; /***/ }), -/* 602 */ +/* 605 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124307,7 +124945,7 @@ module.exports = PlaceOnTriangle; /***/ }), -/* 603 */ +/* 606 */ /***/ (function(module, exports) { /** @@ -124344,7 +124982,7 @@ module.exports = PlayAnimation; /***/ }), -/* 604 */ +/* 607 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124353,7 +124991,7 @@ module.exports = PlayAnimation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(154); +var Random = __webpack_require__(155); /** * Takes an array of Game Objects and positions them at random locations within the Circle. @@ -124384,7 +125022,7 @@ module.exports = RandomCircle; /***/ }), -/* 605 */ +/* 608 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124393,7 +125031,7 @@ module.exports = RandomCircle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(162); +var Random = __webpack_require__(163); /** * Takes an array of Game Objects and positions them at random locations within the Ellipse. @@ -124424,7 +125062,7 @@ module.exports = RandomEllipse; /***/ }), -/* 606 */ +/* 609 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124433,7 +125071,7 @@ module.exports = RandomEllipse; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(158); +var Random = __webpack_require__(159); /** * Takes an array of Game Objects and positions them at random locations on the Line. @@ -124464,7 +125102,7 @@ module.exports = RandomLine; /***/ }), -/* 607 */ +/* 610 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124473,7 +125111,7 @@ module.exports = RandomLine; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(159); +var Random = __webpack_require__(160); /** * Takes an array of Game Objects and positions them at random locations within the Rectangle. @@ -124502,7 +125140,7 @@ module.exports = RandomRectangle; /***/ }), -/* 608 */ +/* 611 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124511,7 +125149,7 @@ module.exports = RandomRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(163); +var Random = __webpack_require__(164); /** * Takes an array of Game Objects and positions them at random locations within the Triangle. @@ -124542,7 +125180,7 @@ module.exports = RandomTriangle; /***/ }), -/* 609 */ +/* 612 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124583,7 +125221,7 @@ module.exports = Rotate; /***/ }), -/* 610 */ +/* 613 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124592,7 +125230,7 @@ module.exports = Rotate; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundDistance = __webpack_require__(164); +var RotateAroundDistance = __webpack_require__(165); var DistanceBetween = __webpack_require__(54); /** @@ -124629,7 +125267,7 @@ module.exports = RotateAround; /***/ }), -/* 611 */ +/* 614 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124638,7 +125276,7 @@ module.exports = RotateAround; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathRotateAroundDistance = __webpack_require__(164); +var MathRotateAroundDistance = __webpack_require__(165); /** * Rotates an array of Game Objects around a point by the given angle and distance. @@ -124678,7 +125316,7 @@ module.exports = RotateAroundDistance; /***/ }), -/* 612 */ +/* 615 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124719,7 +125357,7 @@ module.exports = ScaleX; /***/ }), -/* 613 */ +/* 616 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124766,7 +125404,7 @@ module.exports = ScaleXY; /***/ }), -/* 614 */ +/* 617 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124807,7 +125445,7 @@ module.exports = ScaleY; /***/ }), -/* 615 */ +/* 618 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124848,7 +125486,7 @@ module.exports = SetAlpha; /***/ }), -/* 616 */ +/* 619 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124888,7 +125526,7 @@ module.exports = SetBlendMode; /***/ }), -/* 617 */ +/* 620 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124929,7 +125567,7 @@ module.exports = SetDepth; /***/ }), -/* 618 */ +/* 621 */ /***/ (function(module, exports) { /** @@ -124968,7 +125606,7 @@ module.exports = SetHitArea; /***/ }), -/* 619 */ +/* 622 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125015,7 +125653,7 @@ module.exports = SetOrigin; /***/ }), -/* 620 */ +/* 623 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125056,7 +125694,7 @@ module.exports = SetRotation; /***/ }), -/* 621 */ +/* 624 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125103,7 +125741,7 @@ module.exports = SetScale; /***/ }), -/* 622 */ +/* 625 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125144,7 +125782,7 @@ module.exports = SetScaleX; /***/ }), -/* 623 */ +/* 626 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125185,7 +125823,7 @@ module.exports = SetScaleY; /***/ }), -/* 624 */ +/* 627 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125232,7 +125870,7 @@ module.exports = SetScrollFactor; /***/ }), -/* 625 */ +/* 628 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125273,7 +125911,7 @@ module.exports = SetScrollFactorX; /***/ }), -/* 626 */ +/* 629 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125314,7 +125952,7 @@ module.exports = SetScrollFactorY; /***/ }), -/* 627 */ +/* 630 */ /***/ (function(module, exports) { /** @@ -125353,7 +125991,7 @@ module.exports = SetTint; /***/ }), -/* 628 */ +/* 631 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125391,7 +126029,7 @@ module.exports = SetVisible; /***/ }), -/* 629 */ +/* 632 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125432,7 +126070,7 @@ module.exports = SetX; /***/ }), -/* 630 */ +/* 633 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125479,7 +126117,7 @@ module.exports = SetXY; /***/ }), -/* 631 */ +/* 634 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125520,7 +126158,7 @@ module.exports = SetY; /***/ }), -/* 632 */ +/* 635 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125650,7 +126288,7 @@ module.exports = ShiftPosition; /***/ }), -/* 633 */ +/* 636 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125659,7 +126297,7 @@ module.exports = ShiftPosition; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayShuffle = __webpack_require__(116); +var ArrayShuffle = __webpack_require__(119); /** * Shuffles the array in place. The shuffled array is both modified and returned. @@ -125683,7 +126321,7 @@ module.exports = Shuffle; /***/ }), -/* 634 */ +/* 637 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125692,7 +126330,7 @@ module.exports = Shuffle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathSmootherStep = __webpack_require__(165); +var MathSmootherStep = __webpack_require__(166); /** * Smootherstep is a sigmoid-like interpolation and clamping function. @@ -125741,7 +126379,7 @@ module.exports = SmootherStep; /***/ }), -/* 635 */ +/* 638 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125750,7 +126388,7 @@ module.exports = SmootherStep; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathSmoothStep = __webpack_require__(166); +var MathSmoothStep = __webpack_require__(167); /** * Smoothstep is a sigmoid-like interpolation and clamping function. @@ -125799,7 +126437,7 @@ module.exports = SmoothStep; /***/ }), -/* 636 */ +/* 639 */ /***/ (function(module, exports) { /** @@ -125862,7 +126500,7 @@ module.exports = Spread; /***/ }), -/* 637 */ +/* 640 */ /***/ (function(module, exports) { /** @@ -125898,7 +126536,7 @@ module.exports = ToggleVisible; /***/ }), -/* 638 */ +/* 641 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125947,7 +126585,7 @@ module.exports = WrapInRectangle; /***/ }), -/* 639 */ +/* 642 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125962,16 +126600,16 @@ module.exports = WrapInRectangle; module.exports = { - Animation: __webpack_require__(155), + Animation: __webpack_require__(156), AnimationFrame: __webpack_require__(275), AnimationManager: __webpack_require__(293), - Events: __webpack_require__(112) + Events: __webpack_require__(115) }; /***/ }), -/* 640 */ +/* 643 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125994,7 +126632,7 @@ module.exports = { /***/ }), -/* 641 */ +/* 644 */ /***/ (function(module, exports) { /** @@ -126019,7 +126657,7 @@ module.exports = 'add'; /***/ }), -/* 642 */ +/* 645 */ /***/ (function(module, exports) { /** @@ -126044,7 +126682,7 @@ module.exports = 'remove'; /***/ }), -/* 643 */ +/* 646 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126063,14 +126701,14 @@ module.exports = 'remove'; module.exports = { - Controls: __webpack_require__(644), - Scene2D: __webpack_require__(647) + Controls: __webpack_require__(647), + Scene2D: __webpack_require__(650) }; /***/ }), -/* 644 */ +/* 647 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126085,14 +126723,14 @@ module.exports = { module.exports = { - FixedKeyControl: __webpack_require__(645), - SmoothedKeyControl: __webpack_require__(646) + FixedKeyControl: __webpack_require__(648), + SmoothedKeyControl: __webpack_require__(649) }; /***/ }), -/* 645 */ +/* 648 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126398,7 +127036,7 @@ module.exports = FixedKeyControl; /***/ }), -/* 646 */ +/* 649 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126881,7 +127519,7 @@ module.exports = SmoothedKeyControl; /***/ }), -/* 647 */ +/* 650 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126897,16 +127535,16 @@ module.exports = SmoothedKeyControl; module.exports = { Camera: __webpack_require__(297), - BaseCamera: __webpack_require__(91), - CameraManager: __webpack_require__(703), + BaseCamera: __webpack_require__(92), + CameraManager: __webpack_require__(706), Effects: __webpack_require__(305), - Events: __webpack_require__(40) + Events: __webpack_require__(41) }; /***/ }), -/* 648 */ +/* 651 */ /***/ (function(module, exports) { /** @@ -126929,7 +127567,7 @@ module.exports = 'cameradestroy'; /***/ }), -/* 649 */ +/* 652 */ /***/ (function(module, exports) { /** @@ -126955,7 +127593,7 @@ module.exports = 'camerafadeincomplete'; /***/ }), -/* 650 */ +/* 653 */ /***/ (function(module, exports) { /** @@ -126985,7 +127623,7 @@ module.exports = 'camerafadeinstart'; /***/ }), -/* 651 */ +/* 654 */ /***/ (function(module, exports) { /** @@ -127011,7 +127649,7 @@ module.exports = 'camerafadeoutcomplete'; /***/ }), -/* 652 */ +/* 655 */ /***/ (function(module, exports) { /** @@ -127041,7 +127679,7 @@ module.exports = 'camerafadeoutstart'; /***/ }), -/* 653 */ +/* 656 */ /***/ (function(module, exports) { /** @@ -127065,7 +127703,7 @@ module.exports = 'cameraflashcomplete'; /***/ }), -/* 654 */ +/* 657 */ /***/ (function(module, exports) { /** @@ -127093,7 +127731,7 @@ module.exports = 'cameraflashstart'; /***/ }), -/* 655 */ +/* 658 */ /***/ (function(module, exports) { /** @@ -127117,7 +127755,7 @@ module.exports = 'camerapancomplete'; /***/ }), -/* 656 */ +/* 659 */ /***/ (function(module, exports) { /** @@ -127144,7 +127782,7 @@ module.exports = 'camerapanstart'; /***/ }), -/* 657 */ +/* 660 */ /***/ (function(module, exports) { /** @@ -127170,7 +127808,7 @@ module.exports = 'postrender'; /***/ }), -/* 658 */ +/* 661 */ /***/ (function(module, exports) { /** @@ -127196,7 +127834,7 @@ module.exports = 'prerender'; /***/ }), -/* 659 */ +/* 662 */ /***/ (function(module, exports) { /** @@ -127220,7 +127858,7 @@ module.exports = 'camerarotatecomplete'; /***/ }), -/* 660 */ +/* 663 */ /***/ (function(module, exports) { /** @@ -127246,7 +127884,7 @@ module.exports = 'camerarotatestart'; /***/ }), -/* 661 */ +/* 664 */ /***/ (function(module, exports) { /** @@ -127270,7 +127908,7 @@ module.exports = 'camerashakecomplete'; /***/ }), -/* 662 */ +/* 665 */ /***/ (function(module, exports) { /** @@ -127296,7 +127934,7 @@ module.exports = 'camerashakestart'; /***/ }), -/* 663 */ +/* 666 */ /***/ (function(module, exports) { /** @@ -127320,7 +127958,7 @@ module.exports = 'camerazoomcomplete'; /***/ }), -/* 664 */ +/* 667 */ /***/ (function(module, exports) { /** @@ -127346,7 +127984,7 @@ module.exports = 'camerazoomstart'; /***/ }), -/* 665 */ +/* 668 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127357,7 +127995,7 @@ module.exports = 'camerazoomstart'; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var Events = __webpack_require__(40); +var Events = __webpack_require__(41); /** * @classdesc @@ -127652,7 +128290,7 @@ var Fade = new Class({ * @method Phaser.Cameras.Scene2D.Effects.Fade#postRenderWebGL * @since 3.5.0 * - * @param {Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline} pipeline - The WebGL Pipeline to render to. + * @param {Phaser.Renderer.WebGL.Pipelines.MultiPipeline} pipeline - The WebGL Pipeline to render to. Must provide the `drawFillRect` method. * @param {function} getTintFunction - A function that will return the gl safe tint colors. * * @return {boolean} `true` if the effect drew to the renderer, otherwise `false`. @@ -127734,7 +128372,7 @@ module.exports = Fade; /***/ }), -/* 666 */ +/* 669 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127745,7 +128383,7 @@ module.exports = Fade; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var Events = __webpack_require__(40); +var Events = __webpack_require__(41); /** * @classdesc @@ -128008,7 +128646,7 @@ var Flash = new Class({ * @method Phaser.Cameras.Scene2D.Effects.Flash#postRenderWebGL * @since 3.5.0 * - * @param {Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline} pipeline - The WebGL Pipeline to render to. + * @param {Phaser.Renderer.WebGL.Pipelines.MultiPipeline} pipeline - The WebGL Pipeline to render to. Must provide the `drawFillRect` method. * @param {function} getTintFunction - A function that will return the gl safe tint colors. * * @return {boolean} `true` if the effect drew to the renderer, otherwise `false`. @@ -128085,7 +128723,7 @@ module.exports = Flash; /***/ }), -/* 667 */ +/* 670 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128096,8 +128734,8 @@ module.exports = Flash; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var EaseMap = __webpack_require__(117); -var Events = __webpack_require__(40); +var EaseMap = __webpack_require__(120); +var Events = __webpack_require__(41); var Vector2 = __webpack_require__(3); /** @@ -128410,7 +129048,7 @@ module.exports = Pan; /***/ }), -/* 668 */ +/* 671 */ /***/ (function(module, exports) { /** @@ -128441,7 +129079,7 @@ module.exports = In; /***/ }), -/* 669 */ +/* 672 */ /***/ (function(module, exports) { /** @@ -128472,7 +129110,7 @@ module.exports = Out; /***/ }), -/* 670 */ +/* 673 */ /***/ (function(module, exports) { /** @@ -128512,7 +129150,7 @@ module.exports = InOut; /***/ }), -/* 671 */ +/* 674 */ /***/ (function(module, exports) { /** @@ -128557,7 +129195,7 @@ module.exports = In; /***/ }), -/* 672 */ +/* 675 */ /***/ (function(module, exports) { /** @@ -128600,7 +129238,7 @@ module.exports = Out; /***/ }), -/* 673 */ +/* 676 */ /***/ (function(module, exports) { /** @@ -128664,7 +129302,7 @@ module.exports = InOut; /***/ }), -/* 674 */ +/* 677 */ /***/ (function(module, exports) { /** @@ -128692,7 +129330,7 @@ module.exports = In; /***/ }), -/* 675 */ +/* 678 */ /***/ (function(module, exports) { /** @@ -128720,7 +129358,7 @@ module.exports = Out; /***/ }), -/* 676 */ +/* 679 */ /***/ (function(module, exports) { /** @@ -128755,7 +129393,7 @@ module.exports = InOut; /***/ }), -/* 677 */ +/* 680 */ /***/ (function(module, exports) { /** @@ -128783,7 +129421,7 @@ module.exports = In; /***/ }), -/* 678 */ +/* 681 */ /***/ (function(module, exports) { /** @@ -128811,7 +129449,7 @@ module.exports = Out; /***/ }), -/* 679 */ +/* 682 */ /***/ (function(module, exports) { /** @@ -128846,7 +129484,7 @@ module.exports = InOut; /***/ }), -/* 680 */ +/* 683 */ /***/ (function(module, exports) { /** @@ -128901,7 +129539,7 @@ module.exports = In; /***/ }), -/* 681 */ +/* 684 */ /***/ (function(module, exports) { /** @@ -128956,7 +129594,7 @@ module.exports = Out; /***/ }), -/* 682 */ +/* 685 */ /***/ (function(module, exports) { /** @@ -129018,7 +129656,7 @@ module.exports = InOut; /***/ }), -/* 683 */ +/* 686 */ /***/ (function(module, exports) { /** @@ -129046,7 +129684,7 @@ module.exports = In; /***/ }), -/* 684 */ +/* 687 */ /***/ (function(module, exports) { /** @@ -129074,7 +129712,7 @@ module.exports = Out; /***/ }), -/* 685 */ +/* 688 */ /***/ (function(module, exports) { /** @@ -129109,7 +129747,7 @@ module.exports = InOut; /***/ }), -/* 686 */ +/* 689 */ /***/ (function(module, exports) { /** @@ -129137,7 +129775,7 @@ module.exports = Linear; /***/ }), -/* 687 */ +/* 690 */ /***/ (function(module, exports) { /** @@ -129165,7 +129803,7 @@ module.exports = In; /***/ }), -/* 688 */ +/* 691 */ /***/ (function(module, exports) { /** @@ -129193,7 +129831,7 @@ module.exports = Out; /***/ }), -/* 689 */ +/* 692 */ /***/ (function(module, exports) { /** @@ -129228,7 +129866,7 @@ module.exports = InOut; /***/ }), -/* 690 */ +/* 693 */ /***/ (function(module, exports) { /** @@ -129256,7 +129894,7 @@ module.exports = In; /***/ }), -/* 691 */ +/* 694 */ /***/ (function(module, exports) { /** @@ -129284,7 +129922,7 @@ module.exports = Out; /***/ }), -/* 692 */ +/* 695 */ /***/ (function(module, exports) { /** @@ -129319,7 +129957,7 @@ module.exports = InOut; /***/ }), -/* 693 */ +/* 696 */ /***/ (function(module, exports) { /** @@ -129347,7 +129985,7 @@ module.exports = In; /***/ }), -/* 694 */ +/* 697 */ /***/ (function(module, exports) { /** @@ -129375,7 +130013,7 @@ module.exports = Out; /***/ }), -/* 695 */ +/* 698 */ /***/ (function(module, exports) { /** @@ -129410,7 +130048,7 @@ module.exports = InOut; /***/ }), -/* 696 */ +/* 699 */ /***/ (function(module, exports) { /** @@ -129449,7 +130087,7 @@ module.exports = In; /***/ }), -/* 697 */ +/* 700 */ /***/ (function(module, exports) { /** @@ -129488,7 +130126,7 @@ module.exports = Out; /***/ }), -/* 698 */ +/* 701 */ /***/ (function(module, exports) { /** @@ -129527,7 +130165,7 @@ module.exports = InOut; /***/ }), -/* 699 */ +/* 702 */ /***/ (function(module, exports) { /** @@ -129569,7 +130207,7 @@ module.exports = Stepped; /***/ }), -/* 700 */ +/* 703 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129580,7 +130218,7 @@ module.exports = Stepped; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var Events = __webpack_require__(40); +var Events = __webpack_require__(41); var Vector2 = __webpack_require__(3); /** @@ -129888,7 +130526,7 @@ module.exports = Shake; /***/ }), -/* 701 */ +/* 704 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129899,8 +130537,8 @@ module.exports = Shake; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var Events = __webpack_require__(40); -var EaseMap = __webpack_require__(117); +var Events = __webpack_require__(41); +var EaseMap = __webpack_require__(120); /** * @classdesc @@ -130321,7 +130959,7 @@ module.exports = RotateTo; /***/ }), -/* 702 */ +/* 705 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130332,8 +130970,8 @@ module.exports = RotateTo; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var EaseMap = __webpack_require__(117); -var Events = __webpack_require__(40); +var EaseMap = __webpack_require__(120); +var Events = __webpack_require__(41); /** * @classdesc @@ -130614,7 +131252,7 @@ module.exports = Zoom; /***/ }), -/* 703 */ +/* 706 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130627,8 +131265,8 @@ var Camera = __webpack_require__(297); var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(2); var PluginCache = __webpack_require__(23); -var RectangleContains = __webpack_require__(48); -var ScaleEvents = __webpack_require__(92); +var RectangleContains = __webpack_require__(49); +var ScaleEvents = __webpack_require__(93); var SceneEvents = __webpack_require__(22); /** @@ -131362,7 +132000,7 @@ module.exports = CameraManager; /***/ }), -/* 704 */ +/* 707 */ /***/ (function(module, exports) { /** @@ -131381,7 +132019,7 @@ module.exports = 'enterfullscreen'; /***/ }), -/* 705 */ +/* 708 */ /***/ (function(module, exports) { /** @@ -131400,7 +132038,7 @@ module.exports = 'fullscreenfailed'; /***/ }), -/* 706 */ +/* 709 */ /***/ (function(module, exports) { /** @@ -131419,7 +132057,7 @@ module.exports = 'fullscreenunsupported'; /***/ }), -/* 707 */ +/* 710 */ /***/ (function(module, exports) { /** @@ -131439,7 +132077,7 @@ module.exports = 'leavefullscreen'; /***/ }), -/* 708 */ +/* 711 */ /***/ (function(module, exports) { /** @@ -131460,7 +132098,7 @@ module.exports = 'orientationchange'; /***/ }), -/* 709 */ +/* 712 */ /***/ (function(module, exports) { /** @@ -131491,7 +132129,7 @@ module.exports = 'resize'; /***/ }), -/* 710 */ +/* 713 */ /***/ (function(module, exports) { /** @@ -131516,7 +132154,7 @@ module.exports = 'boot'; /***/ }), -/* 711 */ +/* 714 */ /***/ (function(module, exports) { /** @@ -131545,7 +132183,7 @@ module.exports = 'create'; /***/ }), -/* 712 */ +/* 715 */ /***/ (function(module, exports) { /** @@ -131572,7 +132210,7 @@ module.exports = 'destroy'; /***/ }), -/* 713 */ +/* 716 */ /***/ (function(module, exports) { /** @@ -131599,7 +132237,7 @@ module.exports = 'pause'; /***/ }), -/* 714 */ +/* 717 */ /***/ (function(module, exports) { /** @@ -131636,7 +132274,7 @@ module.exports = 'postupdate'; /***/ }), -/* 715 */ +/* 718 */ /***/ (function(module, exports) { /** @@ -131673,7 +132311,7 @@ module.exports = 'preupdate'; /***/ }), -/* 716 */ +/* 719 */ /***/ (function(module, exports) { /** @@ -131701,7 +132339,7 @@ module.exports = 'ready'; /***/ }), -/* 717 */ +/* 720 */ /***/ (function(module, exports) { /** @@ -131737,7 +132375,7 @@ module.exports = 'render'; /***/ }), -/* 718 */ +/* 721 */ /***/ (function(module, exports) { /** @@ -131764,7 +132402,7 @@ module.exports = 'resume'; /***/ }), -/* 719 */ +/* 722 */ /***/ (function(module, exports) { /** @@ -131794,7 +132432,7 @@ module.exports = 'shutdown'; /***/ }), -/* 720 */ +/* 723 */ /***/ (function(module, exports) { /** @@ -131821,7 +132459,7 @@ module.exports = 'sleep'; /***/ }), -/* 721 */ +/* 724 */ /***/ (function(module, exports) { /** @@ -131846,7 +132484,7 @@ module.exports = 'start'; /***/ }), -/* 722 */ +/* 725 */ /***/ (function(module, exports) { /** @@ -131882,7 +132520,7 @@ module.exports = 'transitioncomplete'; /***/ }), -/* 723 */ +/* 726 */ /***/ (function(module, exports) { /** @@ -131919,7 +132557,7 @@ module.exports = 'transitioninit'; /***/ }), -/* 724 */ +/* 727 */ /***/ (function(module, exports) { /** @@ -131953,7 +132591,7 @@ module.exports = 'transitionout'; /***/ }), -/* 725 */ +/* 728 */ /***/ (function(module, exports) { /** @@ -131993,7 +132631,7 @@ module.exports = 'transitionstart'; /***/ }), -/* 726 */ +/* 729 */ /***/ (function(module, exports) { /** @@ -132028,7 +132666,7 @@ module.exports = 'transitionwake'; /***/ }), -/* 727 */ +/* 730 */ /***/ (function(module, exports) { /** @@ -132065,7 +132703,7 @@ module.exports = 'update'; /***/ }), -/* 728 */ +/* 731 */ /***/ (function(module, exports) { /** @@ -132092,7 +132730,7 @@ module.exports = 'wake'; /***/ }), -/* 729 */ +/* 732 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132118,7 +132756,7 @@ module.exports = { /***/ }), -/* 730 */ +/* 733 */ /***/ (function(module, exports) { // shim for using process in browser @@ -132308,7 +132946,7 @@ process.umask = function() { return 0; }; /***/ }), -/* 731 */ +/* 734 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132317,7 +132955,7 @@ process.umask = function() { return 0; }; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Browser = __webpack_require__(120); +var Browser = __webpack_require__(123); /** * Determines the input support of the browser running this Phaser Game instance. @@ -132383,7 +133021,7 @@ module.exports = init(); /***/ }), -/* 732 */ +/* 735 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132392,7 +133030,7 @@ module.exports = init(); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Browser = __webpack_require__(120); +var Browser = __webpack_require__(123); /** * Determines the audio playback capabilities of the device running this Phaser Game instance. @@ -132508,7 +133146,7 @@ module.exports = init(); /***/ }), -/* 733 */ +/* 736 */ /***/ (function(module, exports) { /** @@ -132595,7 +133233,7 @@ module.exports = init(); /***/ }), -/* 734 */ +/* 737 */ /***/ (function(module, exports) { /** @@ -132699,7 +133337,7 @@ module.exports = init(); /***/ }), -/* 735 */ +/* 738 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132716,15 +133354,15 @@ module.exports = { Between: __webpack_require__(321), BetweenPoints: __webpack_require__(322), - BetweenPointsY: __webpack_require__(736), - BetweenY: __webpack_require__(737), - CounterClockwise: __webpack_require__(738), + BetweenPointsY: __webpack_require__(739), + BetweenY: __webpack_require__(740), + CounterClockwise: __webpack_require__(741), Normalize: __webpack_require__(323), - Random: __webpack_require__(739), - RandomDegrees: __webpack_require__(740), - Reverse: __webpack_require__(741), - RotateTo: __webpack_require__(742), - ShortestBetween: __webpack_require__(743), + Random: __webpack_require__(742), + RandomDegrees: __webpack_require__(743), + Reverse: __webpack_require__(744), + RotateTo: __webpack_require__(745), + ShortestBetween: __webpack_require__(746), Wrap: __webpack_require__(241), WrapDegrees: __webpack_require__(242) @@ -132732,7 +133370,7 @@ module.exports = { /***/ }), -/* 736 */ +/* 739 */ /***/ (function(module, exports) { /** @@ -132764,7 +133402,7 @@ module.exports = BetweenPointsY; /***/ }), -/* 737 */ +/* 740 */ /***/ (function(module, exports) { /** @@ -132798,7 +133436,7 @@ module.exports = BetweenY; /***/ }), -/* 738 */ +/* 741 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132843,7 +133481,7 @@ module.exports = CounterClockwise; /***/ }), -/* 739 */ +/* 742 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132853,7 +133491,7 @@ module.exports = CounterClockwise; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FloatBetween = __webpack_require__(121); +var FloatBetween = __webpack_require__(124); /** * Returns a random angle in the range [-pi, pi]. @@ -132872,7 +133510,7 @@ module.exports = Random; /***/ }), -/* 740 */ +/* 743 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132882,7 +133520,7 @@ module.exports = Random; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FloatBetween = __webpack_require__(121); +var FloatBetween = __webpack_require__(124); /** * Returns a random angle in the range [-180, 180]. @@ -132901,7 +133539,7 @@ module.exports = RandomDegrees; /***/ }), -/* 741 */ +/* 744 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132931,7 +133569,7 @@ module.exports = Reverse; /***/ }), -/* 742 */ +/* 745 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132998,7 +133636,7 @@ module.exports = RotateTo; /***/ }), -/* 743 */ +/* 746 */ /***/ (function(module, exports) { /** @@ -133047,7 +133685,7 @@ module.exports = ShortestBetween; /***/ }), -/* 744 */ +/* 747 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133064,17 +133702,17 @@ module.exports = { Between: __webpack_require__(54), BetweenPoints: __webpack_require__(324), - BetweenPointsSquared: __webpack_require__(745), - Chebyshev: __webpack_require__(746), - Power: __webpack_require__(747), - Snake: __webpack_require__(748), + BetweenPointsSquared: __webpack_require__(748), + Chebyshev: __webpack_require__(749), + Power: __webpack_require__(750), + Snake: __webpack_require__(751), Squared: __webpack_require__(325) }; /***/ }), -/* 745 */ +/* 748 */ /***/ (function(module, exports) { /** @@ -133106,7 +133744,7 @@ module.exports = DistanceBetweenPointsSquared; /***/ }), -/* 746 */ +/* 749 */ /***/ (function(module, exports) { /** @@ -133140,7 +133778,7 @@ module.exports = ChebyshevDistance; /***/ }), -/* 747 */ +/* 750 */ /***/ (function(module, exports) { /** @@ -133174,7 +133812,7 @@ module.exports = DistancePower; /***/ }), -/* 748 */ +/* 751 */ /***/ (function(module, exports) { /** @@ -133208,7 +133846,7 @@ module.exports = SnakeDistance; /***/ }), -/* 749 */ +/* 752 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133240,7 +133878,7 @@ module.exports = { /***/ }), -/* 750 */ +/* 753 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133255,9 +133893,9 @@ module.exports = { module.exports = { - Ceil: __webpack_require__(751), + Ceil: __webpack_require__(754), Equal: __webpack_require__(107), - Floor: __webpack_require__(752), + Floor: __webpack_require__(755), GreaterThan: __webpack_require__(326), LessThan: __webpack_require__(327) @@ -133265,7 +133903,7 @@ module.exports = { /***/ }), -/* 751 */ +/* 754 */ /***/ (function(module, exports) { /** @@ -133296,7 +133934,7 @@ module.exports = Ceil; /***/ }), -/* 752 */ +/* 755 */ /***/ (function(module, exports) { /** @@ -133327,7 +133965,7 @@ module.exports = Floor; /***/ }), -/* 753 */ +/* 756 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133342,19 +133980,19 @@ module.exports = Floor; module.exports = { - Bezier: __webpack_require__(754), - CatmullRom: __webpack_require__(755), + Bezier: __webpack_require__(757), + CatmullRom: __webpack_require__(758), CubicBezier: __webpack_require__(330), - Linear: __webpack_require__(756), + Linear: __webpack_require__(759), QuadraticBezier: __webpack_require__(331), SmoothStep: __webpack_require__(332), - SmootherStep: __webpack_require__(757) + SmootherStep: __webpack_require__(760) }; /***/ }), -/* 754 */ +/* 757 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133393,7 +134031,7 @@ module.exports = BezierInterpolation; /***/ }), -/* 755 */ +/* 758 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133402,7 +134040,7 @@ module.exports = BezierInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CatmullRom = __webpack_require__(176); +var CatmullRom = __webpack_require__(177); /** * A Catmull-Rom interpolation method. @@ -133450,7 +134088,7 @@ module.exports = CatmullRomInterpolation; /***/ }), -/* 756 */ +/* 759 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133459,7 +134097,7 @@ module.exports = CatmullRomInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Linear = __webpack_require__(118); +var Linear = __webpack_require__(121); /** * A linear interpolation method. @@ -133497,7 +134135,7 @@ module.exports = LinearInterpolation; /***/ }), -/* 757 */ +/* 760 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133506,7 +134144,7 @@ module.exports = LinearInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmootherStep = __webpack_require__(165); +var SmootherStep = __webpack_require__(166); /** * A Smoother Step interpolation method. @@ -133530,7 +134168,7 @@ module.exports = SmootherStepInterpolation; /***/ }), -/* 758 */ +/* 761 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133546,14 +134184,14 @@ module.exports = SmootherStepInterpolation; module.exports = { GetNext: __webpack_require__(333), - IsSize: __webpack_require__(122), - IsValue: __webpack_require__(759) + IsSize: __webpack_require__(125), + IsValue: __webpack_require__(762) }; /***/ }), -/* 759 */ +/* 762 */ /***/ (function(module, exports) { /** @@ -133581,7 +134219,7 @@ module.exports = IsValuePowerOfTwo; /***/ }), -/* 760 */ +/* 763 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133597,14 +134235,14 @@ module.exports = IsValuePowerOfTwo; module.exports = { Ceil: __webpack_require__(334), - Floor: __webpack_require__(93), - To: __webpack_require__(761) + Floor: __webpack_require__(94), + To: __webpack_require__(764) }; /***/ }), -/* 761 */ +/* 764 */ /***/ (function(module, exports) { /** @@ -133647,7 +134285,7 @@ module.exports = SnapTo; /***/ }), -/* 762 */ +/* 765 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134157,7 +134795,7 @@ module.exports = RandomDataGenerator; /***/ }), -/* 763 */ +/* 766 */ /***/ (function(module, exports) { /** @@ -134192,7 +134830,7 @@ module.exports = Average; /***/ }), -/* 764 */ +/* 767 */ /***/ (function(module, exports) { /** @@ -134229,7 +134867,7 @@ module.exports = CeilTo; /***/ }), -/* 765 */ +/* 768 */ /***/ (function(module, exports) { /** @@ -134258,7 +134896,7 @@ module.exports = Difference; /***/ }), -/* 766 */ +/* 769 */ /***/ (function(module, exports) { /** @@ -134295,7 +134933,7 @@ module.exports = FloorTo; /***/ }), -/* 767 */ +/* 770 */ /***/ (function(module, exports) { /** @@ -134328,7 +134966,7 @@ module.exports = GetSpeed; /***/ }), -/* 768 */ +/* 771 */ /***/ (function(module, exports) { /** @@ -134359,7 +134997,7 @@ module.exports = IsEven; /***/ }), -/* 769 */ +/* 772 */ /***/ (function(module, exports) { /** @@ -134388,7 +135026,7 @@ module.exports = IsEvenStrict; /***/ }), -/* 770 */ +/* 773 */ /***/ (function(module, exports) { /** @@ -134418,7 +135056,7 @@ module.exports = MaxAdd; /***/ }), -/* 771 */ +/* 774 */ /***/ (function(module, exports) { /** @@ -134448,7 +135086,7 @@ module.exports = MinSub; /***/ }), -/* 772 */ +/* 775 */ /***/ (function(module, exports) { /** @@ -134507,7 +135145,7 @@ module.exports = Percent; /***/ }), -/* 773 */ +/* 776 */ /***/ (function(module, exports) { /** @@ -134547,7 +135185,7 @@ module.exports = RandomXY; /***/ }), -/* 774 */ +/* 777 */ /***/ (function(module, exports) { /** @@ -134586,7 +135224,7 @@ module.exports = RandomXYZ; /***/ }), -/* 775 */ +/* 778 */ /***/ (function(module, exports) { /** @@ -134623,7 +135261,7 @@ module.exports = RandomXYZW; /***/ }), -/* 776 */ +/* 779 */ /***/ (function(module, exports) { /** @@ -134660,7 +135298,7 @@ module.exports = RotateTo; /***/ }), -/* 777 */ +/* 780 */ /***/ (function(module, exports) { /** @@ -134712,7 +135350,7 @@ module.exports = RoundTo; /***/ }), -/* 778 */ +/* 781 */ /***/ (function(module, exports) { /** @@ -134765,7 +135403,7 @@ module.exports = SinCosTableGenerator; /***/ }), -/* 779 */ +/* 782 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134823,7 +135461,7 @@ module.exports = ToXY; /***/ }), -/* 780 */ +/* 783 */ /***/ (function(module, exports) { /** @@ -134853,7 +135491,7 @@ module.exports = Within; /***/ }), -/* 781 */ +/* 784 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134862,7 +135500,7 @@ module.exports = Within; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector3 = __webpack_require__(94); +var Vector3 = __webpack_require__(80); var Matrix4 = __webpack_require__(338); var Quaternion = __webpack_require__(339); @@ -134901,7 +135539,7 @@ module.exports = RotateVec3; /***/ }), -/* 782 */ +/* 785 */ /***/ (function(module, exports) { /** @@ -134927,7 +135565,7 @@ module.exports = 'addtexture'; /***/ }), -/* 783 */ +/* 786 */ /***/ (function(module, exports) { /** @@ -134953,7 +135591,7 @@ module.exports = 'onerror'; /***/ }), -/* 784 */ +/* 787 */ /***/ (function(module, exports) { /** @@ -134982,7 +135620,7 @@ module.exports = 'onload'; /***/ }), -/* 785 */ +/* 788 */ /***/ (function(module, exports) { /** @@ -135005,7 +135643,7 @@ module.exports = 'ready'; /***/ }), -/* 786 */ +/* 789 */ /***/ (function(module, exports) { /** @@ -135033,7 +135671,7 @@ module.exports = 'removetexture'; /***/ }), -/* 787 */ +/* 790 */ /***/ (function(module, exports) { module.exports = [ @@ -135069,7 +135707,7 @@ module.exports = [ /***/ }), -/* 788 */ +/* 791 */ /***/ (function(module, exports) { module.exports = [ @@ -135088,7 +135726,7 @@ module.exports = [ /***/ }), -/* 789 */ +/* 792 */ /***/ (function(module, exports) { module.exports = [ @@ -135147,7 +135785,7 @@ module.exports = [ /***/ }), -/* 790 */ +/* 793 */ /***/ (function(module, exports) { module.exports = [ @@ -135195,7 +135833,7 @@ module.exports = [ /***/ }), -/* 791 */ +/* 794 */ /***/ (function(module, exports) { module.exports = [ @@ -135233,7 +135871,85 @@ module.exports = [ /***/ }), -/* 792 */ +/* 795 */ +/***/ (function(module, exports) { + +module.exports = [ + '#define SHADER_NAME PHASER_SINGLE_TEXTURE_TINT_FS', + '', + 'precision mediump float;', + '', + 'uniform sampler2D uMainSampler;', + '', + 'varying vec2 outTexCoord;', + 'varying float outTintEffect;', + 'varying vec4 outTint;', + '', + 'void main()', + '{', + ' vec4 texture = texture2D(uMainSampler, outTexCoord);', + ' vec4 texel = vec4(outTint.rgb * outTint.a, outTint.a);', + ' vec4 color = texture;', + '', + ' if (outTintEffect == 0.0)', + ' {', + ' // Multiply texture tint', + ' color = texture * texel;', + ' }', + ' else if (outTintEffect == 1.0)', + ' {', + ' // Solid color + texture alpha', + ' color.rgb = mix(texture.rgb, outTint.rgb * outTint.a, texture.a);', + ' color.a = texture.a * texel.a;', + ' }', + ' else if (outTintEffect == 2.0)', + ' {', + ' // Solid color, no texture', + ' color = texel;', + ' }', + '', + ' gl_FragColor = color;', + '}', + '' +].join('\n'); + + +/***/ }), +/* 796 */ +/***/ (function(module, exports) { + +module.exports = [ + '#define SHADER_NAME PHASER_SINGLE_TEXTURE_TINT_VS', + '', + 'precision mediump float;', + '', + 'uniform mat4 uProjectionMatrix;', + 'uniform mat4 uViewMatrix;', + 'uniform mat4 uModelMatrix;', + '', + 'attribute vec2 inPosition;', + 'attribute vec2 inTexCoord;', + 'attribute float inTintEffect;', + 'attribute vec4 inTint;', + '', + 'varying vec2 outTexCoord;', + 'varying float outTintEffect;', + 'varying vec4 outTint;', + '', + 'void main ()', + '{', + ' gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);', + '', + ' outTexCoord = inTexCoord;', + ' outTint = inTint;', + ' outTintEffect = inTintEffect;', + '}', + '' +].join('\n'); + + +/***/ }), +/* 797 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135249,13 +135965,13 @@ module.exports = [ module.exports = { GenerateTexture: __webpack_require__(346), - Palettes: __webpack_require__(793) + Palettes: __webpack_require__(798) }; /***/ }), -/* 793 */ +/* 798 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135271,16 +135987,16 @@ module.exports = { module.exports = { ARNE16: __webpack_require__(347), - C64: __webpack_require__(794), - CGA: __webpack_require__(795), - JMP: __webpack_require__(796), - MSX: __webpack_require__(797) + C64: __webpack_require__(799), + CGA: __webpack_require__(800), + JMP: __webpack_require__(801), + MSX: __webpack_require__(802) }; /***/ }), -/* 794 */ +/* 799 */ /***/ (function(module, exports) { /** @@ -135318,7 +136034,7 @@ module.exports = { /***/ }), -/* 795 */ +/* 800 */ /***/ (function(module, exports) { /** @@ -135356,7 +136072,7 @@ module.exports = { /***/ }), -/* 796 */ +/* 801 */ /***/ (function(module, exports) { /** @@ -135394,7 +136110,7 @@ module.exports = { /***/ }), -/* 797 */ +/* 802 */ /***/ (function(module, exports) { /** @@ -135432,7 +136148,7 @@ module.exports = { /***/ }), -/* 798 */ +/* 803 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135446,10 +136162,10 @@ module.exports = { */ module.exports = { - Path: __webpack_require__(799), + Path: __webpack_require__(804), CubicBezier: __webpack_require__(348), - Curve: __webpack_require__(81), + Curve: __webpack_require__(82), Ellipse: __webpack_require__(349), Line: __webpack_require__(350), QuadraticBezier: __webpack_require__(351), @@ -135458,7 +136174,7 @@ module.exports = { /***/ }), -/* 799 */ +/* 804 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135474,7 +136190,7 @@ var CubicBezierCurve = __webpack_require__(348); var EllipseCurve = __webpack_require__(349); var GameObjectFactory = __webpack_require__(5); var LineCurve = __webpack_require__(350); -var MovePathTo = __webpack_require__(800); +var MovePathTo = __webpack_require__(805); var QuadraticBezierCurve = __webpack_require__(351); var Rectangle = __webpack_require__(9); var SplineCurve = __webpack_require__(352); @@ -136347,7 +137063,7 @@ module.exports = Path; /***/ }), -/* 800 */ +/* 805 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136487,7 +137203,7 @@ module.exports = MoveTo; /***/ }), -/* 801 */ +/* 806 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136502,15 +137218,15 @@ module.exports = MoveTo; module.exports = { - DataManager: __webpack_require__(115), - DataManagerPlugin: __webpack_require__(802), + DataManager: __webpack_require__(118), + DataManagerPlugin: __webpack_require__(807), Events: __webpack_require__(288) }; /***/ }), -/* 802 */ +/* 807 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136520,7 +137236,7 @@ module.exports = { */ var Class = __webpack_require__(0); -var DataManager = __webpack_require__(115); +var DataManager = __webpack_require__(118); var PluginCache = __webpack_require__(23); var SceneEvents = __webpack_require__(22); @@ -136637,7 +137353,7 @@ module.exports = DataManagerPlugin; /***/ }), -/* 803 */ +/* 808 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136652,18 +137368,18 @@ module.exports = DataManagerPlugin; module.exports = { - Align: __webpack_require__(804), + Align: __webpack_require__(809), BaseShader: __webpack_require__(353), - Bounds: __webpack_require__(807), - Canvas: __webpack_require__(811), + Bounds: __webpack_require__(812), + Canvas: __webpack_require__(816), Color: __webpack_require__(354), - Masks: __webpack_require__(820) + Masks: __webpack_require__(825) }; /***/ }), -/* 804 */ +/* 809 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136681,8 +137397,8 @@ var Extend = __webpack_require__(19); var Align = { - In: __webpack_require__(805), - To: __webpack_require__(806) + In: __webpack_require__(810), + To: __webpack_require__(811) }; @@ -136693,7 +137409,7 @@ module.exports = Align; /***/ }), -/* 805 */ +/* 810 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136723,7 +137439,7 @@ module.exports = { /***/ }), -/* 806 */ +/* 811 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136756,7 +137472,7 @@ module.exports = { /***/ }), -/* 807 */ +/* 812 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136773,26 +137489,26 @@ module.exports = { CenterOn: __webpack_require__(264), GetBottom: __webpack_require__(34), - GetBounds: __webpack_require__(808), + GetBounds: __webpack_require__(813), GetCenterX: __webpack_require__(76), GetCenterY: __webpack_require__(78), GetLeft: __webpack_require__(35), - GetOffsetX: __webpack_require__(809), - GetOffsetY: __webpack_require__(810), + GetOffsetX: __webpack_require__(814), + GetOffsetY: __webpack_require__(815), GetRight: __webpack_require__(36), GetTop: __webpack_require__(37), - SetBottom: __webpack_require__(46), + SetBottom: __webpack_require__(47), SetCenterX: __webpack_require__(77), SetCenterY: __webpack_require__(79), - SetLeft: __webpack_require__(44), - SetRight: __webpack_require__(45), - SetTop: __webpack_require__(43) + SetLeft: __webpack_require__(45), + SetRight: __webpack_require__(46), + SetTop: __webpack_require__(44) }; /***/ }), -/* 808 */ +/* 813 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136836,7 +137552,7 @@ module.exports = GetBounds; /***/ }), -/* 809 */ +/* 814 */ /***/ (function(module, exports) { /** @@ -136866,7 +137582,7 @@ module.exports = GetOffsetX; /***/ }), -/* 810 */ +/* 815 */ /***/ (function(module, exports) { /** @@ -136896,7 +137612,7 @@ module.exports = GetOffsetY; /***/ }), -/* 811 */ +/* 816 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136913,15 +137629,15 @@ module.exports = { CanvasInterpolation: __webpack_require__(341), CanvasPool: __webpack_require__(26), - Smoothing: __webpack_require__(172), - TouchAction: __webpack_require__(812), - UserSelect: __webpack_require__(813) + Smoothing: __webpack_require__(173), + TouchAction: __webpack_require__(817), + UserSelect: __webpack_require__(818) }; /***/ }), -/* 812 */ +/* 817 */ /***/ (function(module, exports) { /** @@ -136956,7 +137672,7 @@ module.exports = TouchAction; /***/ }), -/* 813 */ +/* 818 */ /***/ (function(module, exports) { /** @@ -137003,7 +137719,7 @@ module.exports = UserSelect; /***/ }), -/* 814 */ +/* 819 */ /***/ (function(module, exports) { /** @@ -137043,7 +137759,7 @@ module.exports = ColorToRGBA; /***/ }), -/* 815 */ +/* 820 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137093,7 +137809,7 @@ module.exports = HSLToColor; /***/ }), -/* 816 */ +/* 821 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137102,7 +137818,7 @@ module.exports = HSLToColor; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HSVToRGB = __webpack_require__(171); +var HSVToRGB = __webpack_require__(172); /** * Get HSV color wheel values in an array which will be 360 elements in size. @@ -137134,7 +137850,7 @@ module.exports = HSVColorWheel; /***/ }), -/* 817 */ +/* 822 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137143,7 +137859,7 @@ module.exports = HSVColorWheel; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Linear = __webpack_require__(118); +var Linear = __webpack_require__(121); /** * @namespace Phaser.Display.Color.Interpolate @@ -137242,7 +137958,7 @@ module.exports = { /***/ }), -/* 818 */ +/* 823 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137251,7 +137967,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Between = __webpack_require__(177); +var Between = __webpack_require__(178); var Color = __webpack_require__(31); /** @@ -137278,7 +137994,7 @@ module.exports = RandomRGB; /***/ }), -/* 819 */ +/* 824 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137322,7 +138038,7 @@ module.exports = RGBToString; /***/ }), -/* 820 */ +/* 825 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137344,7 +138060,7 @@ module.exports = { /***/ }), -/* 821 */ +/* 826 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137359,7 +138075,7 @@ module.exports = { var Dom = { - AddToDOM: __webpack_require__(124), + AddToDOM: __webpack_require__(128), DOMContentLoaded: __webpack_require__(357), GetScreenOrientation: __webpack_require__(358), GetTarget: __webpack_require__(363), @@ -137373,7 +138089,7 @@ module.exports = Dom; /***/ }), -/* 822 */ +/* 827 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137386,11 +138102,11 @@ module.exports = Dom; * @namespace Phaser.Events */ -module.exports = { EventEmitter: __webpack_require__(823) }; +module.exports = { EventEmitter: __webpack_require__(828) }; /***/ }), -/* 823 */ +/* 828 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137574,7 +138290,7 @@ module.exports = EventEmitter; /***/ }), -/* 824 */ +/* 829 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137583,15 +138299,15 @@ module.exports = EventEmitter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(124); +var AddToDOM = __webpack_require__(128); var AnimationManager = __webpack_require__(293); var CacheManager = __webpack_require__(296); var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); var Config = __webpack_require__(318); -var CreateDOMContainer = __webpack_require__(825); +var CreateDOMContainer = __webpack_require__(830); var CreateRenderer = __webpack_require__(340); -var DataManager = __webpack_require__(115); +var DataManager = __webpack_require__(118); var DebugHeader = __webpack_require__(342); var Device = __webpack_require__(319); var DOMContentLoaded = __webpack_require__(357); @@ -137602,7 +138318,7 @@ var PluginCache = __webpack_require__(23); var PluginManager = __webpack_require__(370); var ScaleManager = __webpack_require__(371); var SceneManager = __webpack_require__(373); -var TextureEvents = __webpack_require__(123); +var TextureEvents = __webpack_require__(127); var TextureManager = __webpack_require__(376); var TimeStep = __webpack_require__(343); var VisibilityHandler = __webpack_require__(345); @@ -138277,7 +138993,7 @@ module.exports = Game; /***/ }), -/* 825 */ +/* 830 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138286,7 +139002,7 @@ module.exports = Game; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(124); +var AddToDOM = __webpack_require__(128); var CreateDOMContainer = function (game) { @@ -138321,7 +139037,7 @@ module.exports = CreateDOMContainer; /***/ }), -/* 826 */ +/* 831 */ /***/ (function(module, exports) { /** @@ -138342,7 +139058,7 @@ module.exports = 'boot'; /***/ }), -/* 827 */ +/* 832 */ /***/ (function(module, exports) { /** @@ -138363,7 +139079,7 @@ module.exports = 'destroy'; /***/ }), -/* 828 */ +/* 833 */ /***/ (function(module, exports) { /** @@ -138391,7 +139107,7 @@ module.exports = 'dragend'; /***/ }), -/* 829 */ +/* 834 */ /***/ (function(module, exports) { /** @@ -138422,7 +139138,7 @@ module.exports = 'dragenter'; /***/ }), -/* 830 */ +/* 835 */ /***/ (function(module, exports) { /** @@ -138454,7 +139170,7 @@ module.exports = 'drag'; /***/ }), -/* 831 */ +/* 836 */ /***/ (function(module, exports) { /** @@ -138485,7 +139201,7 @@ module.exports = 'dragleave'; /***/ }), -/* 832 */ +/* 837 */ /***/ (function(module, exports) { /** @@ -138519,7 +139235,7 @@ module.exports = 'dragover'; /***/ }), -/* 833 */ +/* 838 */ /***/ (function(module, exports) { /** @@ -138549,7 +139265,7 @@ module.exports = 'dragstart'; /***/ }), -/* 834 */ +/* 839 */ /***/ (function(module, exports) { /** @@ -138578,7 +139294,7 @@ module.exports = 'drop'; /***/ }), -/* 835 */ +/* 840 */ /***/ (function(module, exports) { /** @@ -138605,7 +139321,7 @@ module.exports = 'gameout'; /***/ }), -/* 836 */ +/* 841 */ /***/ (function(module, exports) { /** @@ -138632,7 +139348,7 @@ module.exports = 'gameover'; /***/ }), -/* 837 */ +/* 842 */ /***/ (function(module, exports) { /** @@ -138673,7 +139389,7 @@ module.exports = 'gameobjectdown'; /***/ }), -/* 838 */ +/* 843 */ /***/ (function(module, exports) { /** @@ -138704,7 +139420,7 @@ module.exports = 'dragend'; /***/ }), -/* 839 */ +/* 844 */ /***/ (function(module, exports) { /** @@ -138734,7 +139450,7 @@ module.exports = 'dragenter'; /***/ }), -/* 840 */ +/* 845 */ /***/ (function(module, exports) { /** @@ -138765,7 +139481,7 @@ module.exports = 'drag'; /***/ }), -/* 841 */ +/* 846 */ /***/ (function(module, exports) { /** @@ -138795,7 +139511,7 @@ module.exports = 'dragleave'; /***/ }), -/* 842 */ +/* 847 */ /***/ (function(module, exports) { /** @@ -138828,7 +139544,7 @@ module.exports = 'dragover'; /***/ }), -/* 843 */ +/* 848 */ /***/ (function(module, exports) { /** @@ -138862,7 +139578,7 @@ module.exports = 'dragstart'; /***/ }), -/* 844 */ +/* 849 */ /***/ (function(module, exports) { /** @@ -138892,7 +139608,7 @@ module.exports = 'drop'; /***/ }), -/* 845 */ +/* 850 */ /***/ (function(module, exports) { /** @@ -138933,7 +139649,7 @@ module.exports = 'gameobjectmove'; /***/ }), -/* 846 */ +/* 851 */ /***/ (function(module, exports) { /** @@ -138974,7 +139690,7 @@ module.exports = 'gameobjectout'; /***/ }), -/* 847 */ +/* 852 */ /***/ (function(module, exports) { /** @@ -139015,7 +139731,7 @@ module.exports = 'gameobjectover'; /***/ }), -/* 848 */ +/* 853 */ /***/ (function(module, exports) { /** @@ -139056,7 +139772,7 @@ module.exports = 'pointerdown'; /***/ }), -/* 849 */ +/* 854 */ /***/ (function(module, exports) { /** @@ -139097,7 +139813,7 @@ module.exports = 'pointermove'; /***/ }), -/* 850 */ +/* 855 */ /***/ (function(module, exports) { /** @@ -139136,7 +139852,7 @@ module.exports = 'pointerout'; /***/ }), -/* 851 */ +/* 856 */ /***/ (function(module, exports) { /** @@ -139177,7 +139893,7 @@ module.exports = 'pointerover'; /***/ }), -/* 852 */ +/* 857 */ /***/ (function(module, exports) { /** @@ -139218,7 +139934,7 @@ module.exports = 'pointerup'; /***/ }), -/* 853 */ +/* 858 */ /***/ (function(module, exports) { /** @@ -139260,7 +139976,7 @@ module.exports = 'wheel'; /***/ }), -/* 854 */ +/* 859 */ /***/ (function(module, exports) { /** @@ -139301,7 +140017,7 @@ module.exports = 'gameobjectup'; /***/ }), -/* 855 */ +/* 860 */ /***/ (function(module, exports) { /** @@ -139345,7 +140061,7 @@ module.exports = 'gameobjectwheel'; /***/ }), -/* 856 */ +/* 861 */ /***/ (function(module, exports) { /** @@ -139366,7 +140082,7 @@ module.exports = 'boot'; /***/ }), -/* 857 */ +/* 862 */ /***/ (function(module, exports) { /** @@ -139391,7 +140107,7 @@ module.exports = 'process'; /***/ }), -/* 858 */ +/* 863 */ /***/ (function(module, exports) { /** @@ -139412,7 +140128,7 @@ module.exports = 'update'; /***/ }), -/* 859 */ +/* 864 */ /***/ (function(module, exports) { /** @@ -139447,7 +140163,7 @@ module.exports = 'pointerdown'; /***/ }), -/* 860 */ +/* 865 */ /***/ (function(module, exports) { /** @@ -139481,7 +140197,7 @@ module.exports = 'pointerdownoutside'; /***/ }), -/* 861 */ +/* 866 */ /***/ (function(module, exports) { /** @@ -139516,7 +140232,7 @@ module.exports = 'pointermove'; /***/ }), -/* 862 */ +/* 867 */ /***/ (function(module, exports) { /** @@ -139551,7 +140267,7 @@ module.exports = 'pointerout'; /***/ }), -/* 863 */ +/* 868 */ /***/ (function(module, exports) { /** @@ -139586,7 +140302,7 @@ module.exports = 'pointerover'; /***/ }), -/* 864 */ +/* 869 */ /***/ (function(module, exports) { /** @@ -139621,7 +140337,7 @@ module.exports = 'pointerup'; /***/ }), -/* 865 */ +/* 870 */ /***/ (function(module, exports) { /** @@ -139655,7 +140371,7 @@ module.exports = 'pointerupoutside'; /***/ }), -/* 866 */ +/* 871 */ /***/ (function(module, exports) { /** @@ -139693,7 +140409,7 @@ module.exports = 'wheel'; /***/ }), -/* 867 */ +/* 872 */ /***/ (function(module, exports) { /** @@ -139717,7 +140433,7 @@ module.exports = 'pointerlockchange'; /***/ }), -/* 868 */ +/* 873 */ /***/ (function(module, exports) { /** @@ -139739,7 +140455,7 @@ module.exports = 'preupdate'; /***/ }), -/* 869 */ +/* 874 */ /***/ (function(module, exports) { /** @@ -139760,7 +140476,7 @@ module.exports = 'shutdown'; /***/ }), -/* 870 */ +/* 875 */ /***/ (function(module, exports) { /** @@ -139782,7 +140498,7 @@ module.exports = 'start'; /***/ }), -/* 871 */ +/* 876 */ /***/ (function(module, exports) { /** @@ -139807,7 +140523,7 @@ module.exports = 'update'; /***/ }), -/* 872 */ +/* 877 */ /***/ (function(module, exports) { /** @@ -139866,7 +140582,7 @@ module.exports = GetInnerHeight; /***/ }), -/* 873 */ +/* 878 */ /***/ (function(module, exports) { /** @@ -139896,7 +140612,7 @@ module.exports = 'addfile'; /***/ }), -/* 874 */ +/* 879 */ /***/ (function(module, exports) { /** @@ -139924,7 +140640,7 @@ module.exports = 'complete'; /***/ }), -/* 875 */ +/* 880 */ /***/ (function(module, exports) { /** @@ -139953,7 +140669,7 @@ module.exports = 'filecomplete'; /***/ }), -/* 876 */ +/* 881 */ /***/ (function(module, exports) { /** @@ -140007,7 +140723,7 @@ module.exports = 'filecomplete-'; /***/ }), -/* 877 */ +/* 882 */ /***/ (function(module, exports) { /** @@ -140032,7 +140748,7 @@ module.exports = 'loaderror'; /***/ }), -/* 878 */ +/* 883 */ /***/ (function(module, exports) { /** @@ -140058,7 +140774,7 @@ module.exports = 'load'; /***/ }), -/* 879 */ +/* 884 */ /***/ (function(module, exports) { /** @@ -140085,7 +140801,7 @@ module.exports = 'fileprogress'; /***/ }), -/* 880 */ +/* 885 */ /***/ (function(module, exports) { /** @@ -140114,7 +140830,7 @@ module.exports = 'postprocess'; /***/ }), -/* 881 */ +/* 886 */ /***/ (function(module, exports) { /** @@ -140139,7 +140855,7 @@ module.exports = 'progress'; /***/ }), -/* 882 */ +/* 887 */ /***/ (function(module, exports) { /** @@ -140166,7 +140882,7 @@ module.exports = 'start'; /***/ }), -/* 883 */ +/* 888 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140228,7 +140944,7 @@ module.exports = GetPhysicsPlugins; /***/ }), -/* 884 */ +/* 889 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140275,7 +140991,7 @@ module.exports = GetScenePlugins; /***/ }), -/* 885 */ +/* 890 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140336,7 +141052,7 @@ module.exports = InjectionMap; /***/ }), -/* 886 */ +/* 891 */ /***/ (function(module, exports) { /** @@ -140417,7 +141133,7 @@ module.exports = AtlasXML; /***/ }), -/* 887 */ +/* 892 */ /***/ (function(module, exports) { /** @@ -140452,7 +141168,7 @@ module.exports = Canvas; /***/ }), -/* 888 */ +/* 893 */ /***/ (function(module, exports) { /** @@ -140487,7 +141203,7 @@ module.exports = Image; /***/ }), -/* 889 */ +/* 894 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140596,7 +141312,7 @@ module.exports = JSONArray; /***/ }), -/* 890 */ +/* 895 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140704,7 +141420,7 @@ module.exports = JSONHash; /***/ }), -/* 891 */ +/* 896 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140829,7 +141545,7 @@ module.exports = SpriteSheet; /***/ }), -/* 892 */ +/* 897 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141020,7 +141736,7 @@ module.exports = SpriteSheetFromAtlas; /***/ }), -/* 893 */ +/* 898 */ /***/ (function(module, exports) { /** @@ -141190,7 +141906,7 @@ TextureImporter: /***/ }), -/* 894 */ +/* 899 */ /***/ (function(module, exports) { /** @@ -141221,7 +141937,7 @@ module.exports = 'complete'; /***/ }), -/* 895 */ +/* 900 */ /***/ (function(module, exports) { /** @@ -141251,7 +141967,7 @@ module.exports = 'decoded'; /***/ }), -/* 896 */ +/* 901 */ /***/ (function(module, exports) { /** @@ -141283,7 +141999,7 @@ module.exports = 'decodedall'; /***/ }), -/* 897 */ +/* 902 */ /***/ (function(module, exports) { /** @@ -141315,7 +142031,7 @@ module.exports = 'destroy'; /***/ }), -/* 898 */ +/* 903 */ /***/ (function(module, exports) { /** @@ -141348,7 +142064,7 @@ module.exports = 'detune'; /***/ }), -/* 899 */ +/* 904 */ /***/ (function(module, exports) { /** @@ -141376,7 +142092,7 @@ module.exports = 'detune'; /***/ }), -/* 900 */ +/* 905 */ /***/ (function(module, exports) { /** @@ -141403,7 +142119,7 @@ module.exports = 'mute'; /***/ }), -/* 901 */ +/* 906 */ /***/ (function(module, exports) { /** @@ -141431,7 +142147,7 @@ module.exports = 'rate'; /***/ }), -/* 902 */ +/* 907 */ /***/ (function(module, exports) { /** @@ -141458,7 +142174,7 @@ module.exports = 'volume'; /***/ }), -/* 903 */ +/* 908 */ /***/ (function(module, exports) { /** @@ -141492,7 +142208,7 @@ module.exports = 'loop'; /***/ }), -/* 904 */ +/* 909 */ /***/ (function(module, exports) { /** @@ -141526,7 +142242,7 @@ module.exports = 'looped'; /***/ }), -/* 905 */ +/* 910 */ /***/ (function(module, exports) { /** @@ -141559,7 +142275,7 @@ module.exports = 'mute'; /***/ }), -/* 906 */ +/* 911 */ /***/ (function(module, exports) { /** @@ -141586,7 +142302,7 @@ module.exports = 'pauseall'; /***/ }), -/* 907 */ +/* 912 */ /***/ (function(module, exports) { /** @@ -141618,7 +142334,7 @@ module.exports = 'pause'; /***/ }), -/* 908 */ +/* 913 */ /***/ (function(module, exports) { /** @@ -141649,7 +142365,7 @@ module.exports = 'play'; /***/ }), -/* 909 */ +/* 914 */ /***/ (function(module, exports) { /** @@ -141682,7 +142398,7 @@ module.exports = 'rate'; /***/ }), -/* 910 */ +/* 915 */ /***/ (function(module, exports) { /** @@ -141709,7 +142425,7 @@ module.exports = 'resumeall'; /***/ }), -/* 911 */ +/* 916 */ /***/ (function(module, exports) { /** @@ -141742,7 +142458,7 @@ module.exports = 'resume'; /***/ }), -/* 912 */ +/* 917 */ /***/ (function(module, exports) { /** @@ -141775,7 +142491,7 @@ module.exports = 'seek'; /***/ }), -/* 913 */ +/* 918 */ /***/ (function(module, exports) { /** @@ -141802,7 +142518,7 @@ module.exports = 'stopall'; /***/ }), -/* 914 */ +/* 919 */ /***/ (function(module, exports) { /** @@ -141834,7 +142550,7 @@ module.exports = 'stop'; /***/ }), -/* 915 */ +/* 920 */ /***/ (function(module, exports) { /** @@ -141861,7 +142577,7 @@ module.exports = 'unlocked'; /***/ }), -/* 916 */ +/* 921 */ /***/ (function(module, exports) { /** @@ -141894,7 +142610,7 @@ module.exports = 'volume'; /***/ }), -/* 917 */ +/* 922 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141909,19 +142625,19 @@ module.exports = 'volume'; var GameObjects = { - Events: __webpack_require__(90), + Events: __webpack_require__(91), - DisplayList: __webpack_require__(918), + DisplayList: __webpack_require__(923), GameObjectCreator: __webpack_require__(16), GameObjectFactory: __webpack_require__(5), - UpdateList: __webpack_require__(944), + UpdateList: __webpack_require__(949), Components: __webpack_require__(12), BuildGameObject: __webpack_require__(27), BuildGameObjectAnimation: __webpack_require__(393), GameObject: __webpack_require__(14), - BitmapText: __webpack_require__(134), + BitmapText: __webpack_require__(138), Blitter: __webpack_require__(194), Container: __webpack_require__(195), DOMElement: __webpack_require__(395), @@ -141929,16 +142645,16 @@ var GameObjects = { Extern: __webpack_require__(397), Graphics: __webpack_require__(197), Group: __webpack_require__(98), - Image: __webpack_require__(108), - Particles: __webpack_require__(977), + Image: __webpack_require__(111), + Particles: __webpack_require__(982), PathFollower: __webpack_require__(409), RenderTexture: __webpack_require__(201), - RetroFont: __webpack_require__(986), + RetroFont: __webpack_require__(991), Rope: __webpack_require__(203), Sprite: __webpack_require__(75), Text: __webpack_require__(204), TileSprite: __webpack_require__(205), - Zone: __webpack_require__(111), + Zone: __webpack_require__(114), Video: __webpack_require__(206), // Shapes @@ -141959,55 +142675,55 @@ var GameObjects = { // Game Object Factories Factories: { - Blitter: __webpack_require__(1037), - Container: __webpack_require__(1038), - DOMElement: __webpack_require__(1039), - DynamicBitmapText: __webpack_require__(1040), - Extern: __webpack_require__(1041), - Graphics: __webpack_require__(1042), - Group: __webpack_require__(1043), - Image: __webpack_require__(1044), - Particles: __webpack_require__(1045), - PathFollower: __webpack_require__(1046), - RenderTexture: __webpack_require__(1047), - Rope: __webpack_require__(1048), - Sprite: __webpack_require__(1049), - StaticBitmapText: __webpack_require__(1050), - Text: __webpack_require__(1051), - TileSprite: __webpack_require__(1052), - Zone: __webpack_require__(1053), - Video: __webpack_require__(1054), + Blitter: __webpack_require__(1042), + Container: __webpack_require__(1043), + DOMElement: __webpack_require__(1044), + DynamicBitmapText: __webpack_require__(1045), + Extern: __webpack_require__(1046), + Graphics: __webpack_require__(1047), + Group: __webpack_require__(1048), + Image: __webpack_require__(1049), + Particles: __webpack_require__(1050), + PathFollower: __webpack_require__(1051), + RenderTexture: __webpack_require__(1052), + Rope: __webpack_require__(1053), + Sprite: __webpack_require__(1054), + StaticBitmapText: __webpack_require__(1055), + Text: __webpack_require__(1056), + TileSprite: __webpack_require__(1057), + Zone: __webpack_require__(1058), + Video: __webpack_require__(1059), // Shapes - Arc: __webpack_require__(1055), - Curve: __webpack_require__(1056), - Ellipse: __webpack_require__(1057), - Grid: __webpack_require__(1058), - IsoBox: __webpack_require__(1059), - IsoTriangle: __webpack_require__(1060), - Line: __webpack_require__(1061), - Polygon: __webpack_require__(1062), - Rectangle: __webpack_require__(1063), - Star: __webpack_require__(1064), - Triangle: __webpack_require__(1065) + Arc: __webpack_require__(1060), + Curve: __webpack_require__(1061), + Ellipse: __webpack_require__(1062), + Grid: __webpack_require__(1063), + IsoBox: __webpack_require__(1064), + IsoTriangle: __webpack_require__(1065), + Line: __webpack_require__(1066), + Polygon: __webpack_require__(1067), + Rectangle: __webpack_require__(1068), + Star: __webpack_require__(1069), + Triangle: __webpack_require__(1070) }, Creators: { - Blitter: __webpack_require__(1066), - Container: __webpack_require__(1067), - DynamicBitmapText: __webpack_require__(1068), - Graphics: __webpack_require__(1069), - Group: __webpack_require__(1070), - Image: __webpack_require__(1071), - Particles: __webpack_require__(1072), - RenderTexture: __webpack_require__(1073), - Rope: __webpack_require__(1074), - Sprite: __webpack_require__(1075), - StaticBitmapText: __webpack_require__(1076), - Text: __webpack_require__(1077), - TileSprite: __webpack_require__(1078), - Zone: __webpack_require__(1079), - Video: __webpack_require__(1080) + Blitter: __webpack_require__(1071), + Container: __webpack_require__(1072), + DynamicBitmapText: __webpack_require__(1073), + Graphics: __webpack_require__(1074), + Group: __webpack_require__(1075), + Image: __webpack_require__(1076), + Particles: __webpack_require__(1077), + RenderTexture: __webpack_require__(1078), + Rope: __webpack_require__(1079), + Sprite: __webpack_require__(1080), + StaticBitmapText: __webpack_require__(1081), + Text: __webpack_require__(1082), + TileSprite: __webpack_require__(1083), + Zone: __webpack_require__(1084), + Video: __webpack_require__(1085) } }; @@ -142015,29 +142731,29 @@ var GameObjects = { if (true) { // WebGL only Game Objects - GameObjects.Mesh = __webpack_require__(136); + GameObjects.Mesh = __webpack_require__(140); GameObjects.Quad = __webpack_require__(209); GameObjects.Shader = __webpack_require__(210); - GameObjects.Factories.Mesh = __webpack_require__(1087); - GameObjects.Factories.Quad = __webpack_require__(1088); - GameObjects.Factories.Shader = __webpack_require__(1089); + GameObjects.Factories.Mesh = __webpack_require__(1092); + GameObjects.Factories.Quad = __webpack_require__(1093); + GameObjects.Factories.Shader = __webpack_require__(1094); - GameObjects.Creators.Mesh = __webpack_require__(1090); - GameObjects.Creators.Quad = __webpack_require__(1091); - GameObjects.Creators.Shader = __webpack_require__(1092); + GameObjects.Creators.Mesh = __webpack_require__(1095); + GameObjects.Creators.Quad = __webpack_require__(1096); + GameObjects.Creators.Shader = __webpack_require__(1097); GameObjects.Light = __webpack_require__(428); __webpack_require__(429); - __webpack_require__(1093); + __webpack_require__(1098); } module.exports = GameObjects; /***/ }), -/* 918 */ +/* 923 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142047,10 +142763,10 @@ module.exports = GameObjects; */ var Class = __webpack_require__(0); -var List = __webpack_require__(131); +var List = __webpack_require__(135); var PluginCache = __webpack_require__(23); var SceneEvents = __webpack_require__(22); -var StableSort = __webpack_require__(133); +var StableSort = __webpack_require__(137); /** * @classdesc @@ -142242,7 +142958,7 @@ module.exports = DisplayList; /***/ }), -/* 919 */ +/* 924 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142258,20 +142974,20 @@ module.exports = DisplayList; module.exports = { CheckMatrix: __webpack_require__(190), - MatrixToString: __webpack_require__(920), - ReverseColumns: __webpack_require__(921), - ReverseRows: __webpack_require__(922), - Rotate180: __webpack_require__(923), - RotateLeft: __webpack_require__(924), - RotateMatrix: __webpack_require__(132), - RotateRight: __webpack_require__(925), + MatrixToString: __webpack_require__(925), + ReverseColumns: __webpack_require__(926), + ReverseRows: __webpack_require__(927), + Rotate180: __webpack_require__(928), + RotateLeft: __webpack_require__(929), + RotateMatrix: __webpack_require__(136), + RotateRight: __webpack_require__(930), TransposeMatrix: __webpack_require__(390) }; /***/ }), -/* 920 */ +/* 925 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142280,7 +142996,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Pad = __webpack_require__(168); +var Pad = __webpack_require__(169); var CheckMatrix = __webpack_require__(190); /** @@ -142352,7 +143068,7 @@ module.exports = MatrixToString; /***/ }), -/* 921 */ +/* 926 */ /***/ (function(module, exports) { /** @@ -142383,7 +143099,7 @@ module.exports = ReverseColumns; /***/ }), -/* 922 */ +/* 927 */ /***/ (function(module, exports) { /** @@ -142419,7 +143135,7 @@ module.exports = ReverseRows; /***/ }), -/* 923 */ +/* 928 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142428,7 +143144,7 @@ module.exports = ReverseRows; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(132); +var RotateMatrix = __webpack_require__(136); /** * Rotates the array matrix 180 degrees. @@ -142452,7 +143168,7 @@ module.exports = Rotate180; /***/ }), -/* 924 */ +/* 929 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142461,7 +143177,7 @@ module.exports = Rotate180; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(132); +var RotateMatrix = __webpack_require__(136); /** * Rotates the array matrix to the left (or 90 degrees) @@ -142485,7 +143201,7 @@ module.exports = RotateLeft; /***/ }), -/* 925 */ +/* 930 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142494,7 +143210,7 @@ module.exports = RotateLeft; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(132); +var RotateMatrix = __webpack_require__(136); /** * Rotates the array matrix to the left (or -90 degrees) @@ -142518,7 +143234,7 @@ module.exports = RotateRight; /***/ }), -/* 926 */ +/* 931 */ /***/ (function(module, exports) { /** @@ -142635,7 +143351,7 @@ module.exports = Add; /***/ }), -/* 927 */ +/* 932 */ /***/ (function(module, exports) { /** @@ -142757,7 +143473,7 @@ module.exports = AddAt; /***/ }), -/* 928 */ +/* 933 */ /***/ (function(module, exports) { /** @@ -142795,7 +143511,7 @@ module.exports = BringToTop; /***/ }), -/* 929 */ +/* 934 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142847,7 +143563,7 @@ module.exports = CountAllMatching; /***/ }), -/* 930 */ +/* 935 */ /***/ (function(module, exports) { /** @@ -142893,7 +143609,7 @@ module.exports = Each; /***/ }), -/* 931 */ +/* 936 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142949,7 +143665,7 @@ module.exports = EachInRange; /***/ }), -/* 932 */ +/* 937 */ /***/ (function(module, exports) { /** @@ -142991,7 +143707,7 @@ module.exports = MoveDown; /***/ }), -/* 933 */ +/* 938 */ /***/ (function(module, exports) { /** @@ -143038,7 +143754,7 @@ module.exports = MoveTo; /***/ }), -/* 934 */ +/* 939 */ /***/ (function(module, exports) { /** @@ -143080,7 +143796,7 @@ module.exports = MoveUp; /***/ }), -/* 935 */ +/* 940 */ /***/ (function(module, exports) { /** @@ -143144,7 +143860,7 @@ module.exports = NumberArray; /***/ }), -/* 936 */ +/* 941 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143221,7 +143937,7 @@ module.exports = NumberArrayStep; /***/ }), -/* 937 */ +/* 942 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143230,7 +143946,7 @@ module.exports = NumberArrayStep; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SpliceOne = __webpack_require__(80); +var SpliceOne = __webpack_require__(81); /** * Removes the item from the given position in the array. @@ -143272,7 +143988,7 @@ module.exports = RemoveAt; /***/ }), -/* 938 */ +/* 943 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143335,7 +144051,7 @@ module.exports = RemoveBetween; /***/ }), -/* 939 */ +/* 944 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143344,7 +144060,7 @@ module.exports = RemoveBetween; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SpliceOne = __webpack_require__(80); +var SpliceOne = __webpack_require__(81); /** * Removes a random object from the given array and returns it. @@ -143373,7 +144089,7 @@ module.exports = RemoveRandomElement; /***/ }), -/* 940 */ +/* 945 */ /***/ (function(module, exports) { /** @@ -143417,7 +144133,7 @@ module.exports = Replace; /***/ }), -/* 941 */ +/* 946 */ /***/ (function(module, exports) { /** @@ -143455,7 +144171,7 @@ module.exports = SendToBack; /***/ }), -/* 942 */ +/* 947 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143510,7 +144226,7 @@ module.exports = SetAll; /***/ }), -/* 943 */ +/* 948 */ /***/ (function(module, exports) { /** @@ -143558,7 +144274,7 @@ module.exports = Swap; /***/ }), -/* 944 */ +/* 949 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143859,7 +144575,7 @@ module.exports = UpdateList; /***/ }), -/* 945 */ +/* 950 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143874,14 +144590,14 @@ module.exports = UpdateList; module.exports = { - PROCESS_QUEUE_ADD: __webpack_require__(946), - PROCESS_QUEUE_REMOVE: __webpack_require__(947) + PROCESS_QUEUE_ADD: __webpack_require__(951), + PROCESS_QUEUE_REMOVE: __webpack_require__(952) }; /***/ }), -/* 946 */ +/* 951 */ /***/ (function(module, exports) { /** @@ -143908,7 +144624,7 @@ module.exports = 'add'; /***/ }), -/* 947 */ +/* 952 */ /***/ (function(module, exports) { /** @@ -143935,7 +144651,7 @@ module.exports = 'remove'; /***/ }), -/* 948 */ +/* 953 */ /***/ (function(module, exports) { /** @@ -144457,7 +145173,7 @@ module.exports = GetBitmapTextSize; /***/ }), -/* 949 */ +/* 954 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144511,7 +145227,7 @@ module.exports = ParseFromAtlas; /***/ }), -/* 950 */ +/* 955 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144525,12 +145241,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(951); + renderWebGL = __webpack_require__(956); } if (true) { - renderCanvas = __webpack_require__(953); + renderCanvas = __webpack_require__(958); } module.exports = { @@ -144542,7 +145258,7 @@ module.exports = { /***/ }), -/* 951 */ +/* 956 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144551,7 +145267,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BatchChar = __webpack_require__(952); +var BatchChar = __webpack_require__(957); var Utils = __webpack_require__(10); /** @@ -144702,7 +145418,7 @@ module.exports = BitmapTextWebGLRenderer; /***/ }), -/* 952 */ +/* 957 */ /***/ (function(module, exports) { /** @@ -144761,7 +145477,7 @@ module.exports = BatchChar; /***/ }), -/* 953 */ +/* 958 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144943,7 +145659,7 @@ module.exports = BitmapTextCanvasRenderer; /***/ }), -/* 954 */ +/* 959 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144957,12 +145673,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(955); + renderWebGL = __webpack_require__(960); } if (true) { - renderCanvas = __webpack_require__(956); + renderCanvas = __webpack_require__(961); } module.exports = { @@ -144974,7 +145690,7 @@ module.exports = { /***/ }), -/* 955 */ +/* 960 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145104,7 +145820,7 @@ module.exports = BlitterWebGLRenderer; /***/ }), -/* 956 */ +/* 961 */ /***/ (function(module, exports) { /** @@ -145234,7 +145950,7 @@ module.exports = BlitterCanvasRenderer; /***/ }), -/* 957 */ +/* 962 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145664,7 +146380,7 @@ module.exports = Bob; /***/ }), -/* 958 */ +/* 963 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145679,12 +146395,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(959); + renderWebGL = __webpack_require__(964); } if (true) { - renderCanvas = __webpack_require__(960); + renderCanvas = __webpack_require__(965); } module.exports = { @@ -145696,7 +146412,7 @@ module.exports = { /***/ }), -/* 959 */ +/* 964 */ /***/ (function(module, exports) { /** @@ -145845,7 +146561,7 @@ module.exports = ContainerWebGLRenderer; /***/ }), -/* 960 */ +/* 965 */ /***/ (function(module, exports) { /** @@ -145952,7 +146668,7 @@ module.exports = ContainerCanvasRenderer; /***/ }), -/* 961 */ +/* 966 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145983,7 +146699,7 @@ module.exports = { /***/ }), -/* 962 */ +/* 967 */ /***/ (function(module, exports) { /** @@ -146024,7 +146740,7 @@ module.exports = [ /***/ }), -/* 963 */ +/* 968 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146038,12 +146754,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(964); + renderWebGL = __webpack_require__(969); } if (true) { - renderCanvas = __webpack_require__(965); + renderCanvas = __webpack_require__(970); } module.exports = { @@ -146055,7 +146771,7 @@ module.exports = { /***/ }), -/* 964 */ +/* 969 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146065,7 +146781,7 @@ module.exports = { */ var Utils = __webpack_require__(10); -var GetColorFromValue = __webpack_require__(114); +var GetColorFromValue = __webpack_require__(117); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -146362,7 +147078,7 @@ module.exports = DynamicBitmapTextWebGLRenderer; /***/ }), -/* 965 */ +/* 970 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146573,7 +147289,7 @@ module.exports = DynamicBitmapTextCanvasRenderer; /***/ }), -/* 966 */ +/* 971 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146587,12 +147303,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(967); + renderWebGL = __webpack_require__(972); } if (true) { - renderCanvas = __webpack_require__(968); + renderCanvas = __webpack_require__(973); } module.exports = { @@ -146604,7 +147320,7 @@ module.exports = { /***/ }), -/* 967 */ +/* 972 */ /***/ (function(module, exports) { /** @@ -146673,13 +147389,13 @@ module.exports = ExternWebGLRenderer; /***/ }), -/* 968 */ +/* 973 */ /***/ (function(module, exports) { /***/ }), -/* 969 */ +/* 974 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146693,7 +147409,7 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(970); + renderWebGL = __webpack_require__(975); // Needed for Graphics.generateTexture renderCanvas = __webpack_require__(401); @@ -146713,7 +147429,7 @@ module.exports = { /***/ }), -/* 970 */ +/* 975 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147079,7 +147795,7 @@ module.exports = GraphicsWebGLRenderer; /***/ }), -/* 971 */ +/* 976 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147093,12 +147809,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(972); + renderWebGL = __webpack_require__(977); } if (true) { - renderCanvas = __webpack_require__(973); + renderCanvas = __webpack_require__(978); } module.exports = { @@ -147110,7 +147826,7 @@ module.exports = { /***/ }), -/* 972 */ +/* 977 */ /***/ (function(module, exports) { /** @@ -147143,7 +147859,7 @@ module.exports = SpriteWebGLRenderer; /***/ }), -/* 973 */ +/* 978 */ /***/ (function(module, exports) { /** @@ -147176,7 +147892,7 @@ module.exports = SpriteCanvasRenderer; /***/ }), -/* 974 */ +/* 979 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147190,12 +147906,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(975); + renderWebGL = __webpack_require__(980); } if (true) { - renderCanvas = __webpack_require__(976); + renderCanvas = __webpack_require__(981); } module.exports = { @@ -147207,7 +147923,7 @@ module.exports = { /***/ }), -/* 975 */ +/* 980 */ /***/ (function(module, exports) { /** @@ -147240,7 +147956,7 @@ module.exports = ImageWebGLRenderer; /***/ }), -/* 976 */ +/* 981 */ /***/ (function(module, exports) { /** @@ -147273,7 +147989,7 @@ module.exports = ImageCanvasRenderer; /***/ }), -/* 977 */ +/* 982 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147292,13 +148008,13 @@ module.exports = { Particle: __webpack_require__(403), ParticleEmitter: __webpack_require__(404), ParticleEmitterManager: __webpack_require__(200), - Zones: __webpack_require__(982) + Zones: __webpack_require__(987) }; /***/ }), -/* 978 */ +/* 983 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147308,7 +148024,7 @@ module.exports = { */ var Class = __webpack_require__(0); -var FloatBetween = __webpack_require__(121); +var FloatBetween = __webpack_require__(124); var GetEaseFunction = __webpack_require__(69); var GetFastValue = __webpack_require__(2); var Wrap = __webpack_require__(58); @@ -147889,7 +148605,7 @@ module.exports = EmitterOp; /***/ }), -/* 979 */ +/* 984 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147903,12 +148619,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(980); + renderWebGL = __webpack_require__(985); } if (true) { - renderCanvas = __webpack_require__(981); + renderCanvas = __webpack_require__(986); } module.exports = { @@ -147920,7 +148636,7 @@ module.exports = { /***/ }), -/* 980 */ +/* 985 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148081,7 +148797,7 @@ module.exports = ParticleManagerWebGLRenderer; /***/ }), -/* 981 */ +/* 986 */ /***/ (function(module, exports) { /** @@ -148204,7 +148920,7 @@ module.exports = ParticleManagerCanvasRenderer; /***/ }), -/* 982 */ +/* 987 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148227,7 +148943,7 @@ module.exports = { /***/ }), -/* 983 */ +/* 988 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148241,12 +148957,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(984); + renderWebGL = __webpack_require__(989); } if (true) { - renderCanvas = __webpack_require__(985); + renderCanvas = __webpack_require__(990); } module.exports = { @@ -148258,7 +148974,7 @@ module.exports = { /***/ }), -/* 984 */ +/* 989 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148325,7 +149041,7 @@ module.exports = RenderTextureWebGLRenderer; /***/ }), -/* 985 */ +/* 990 */ /***/ (function(module, exports) { /** @@ -148358,7 +149074,7 @@ module.exports = RenderTextureCanvasRenderer; /***/ }), -/* 986 */ +/* 991 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148367,7 +149083,7 @@ module.exports = RenderTextureCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RETRO_FONT_CONST = __webpack_require__(987); +var RETRO_FONT_CONST = __webpack_require__(992); var Extend = __webpack_require__(19); /** @@ -148375,7 +149091,7 @@ var Extend = __webpack_require__(19); * @since 3.6.0 */ -var RetroFont = { Parse: __webpack_require__(988) }; +var RetroFont = { Parse: __webpack_require__(993) }; // Merge in the consts RetroFont = Extend(false, RetroFont, RETRO_FONT_CONST); @@ -148384,7 +149100,7 @@ module.exports = RetroFont; /***/ }), -/* 987 */ +/* 992 */ /***/ (function(module, exports) { /** @@ -148500,7 +149216,7 @@ module.exports = RETRO_FONT_CONST; /***/ }), -/* 988 */ +/* 993 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148616,7 +149332,7 @@ module.exports = ParseRetroFont; /***/ }), -/* 989 */ +/* 994 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148630,12 +149346,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(990); + renderWebGL = __webpack_require__(995); } if (true) { - renderCanvas = __webpack_require__(991); + renderCanvas = __webpack_require__(996); } module.exports = { @@ -148647,7 +149363,7 @@ module.exports = { /***/ }), -/* 990 */ +/* 995 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148784,7 +149500,7 @@ module.exports = RopeWebGLRenderer; /***/ }), -/* 991 */ +/* 996 */ /***/ (function(module, exports) { /** @@ -148813,7 +149529,7 @@ module.exports = RopeCanvasRenderer; /***/ }), -/* 992 */ +/* 997 */ /***/ (function(module, exports) { /** @@ -148895,7 +149611,7 @@ module.exports = GetTextSize; /***/ }), -/* 993 */ +/* 998 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148909,12 +149625,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(994); + renderWebGL = __webpack_require__(999); } if (true) { - renderCanvas = __webpack_require__(995); + renderCanvas = __webpack_require__(1000); } module.exports = { @@ -148926,7 +149642,7 @@ module.exports = { /***/ }), -/* 994 */ +/* 999 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148998,7 +149714,7 @@ module.exports = TextWebGLRenderer; /***/ }), -/* 995 */ +/* 1000 */ /***/ (function(module, exports) { /** @@ -149036,7 +149752,7 @@ module.exports = TextCanvasRenderer; /***/ }), -/* 996 */ +/* 1001 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149048,7 +149764,7 @@ module.exports = TextCanvasRenderer; var Class = __webpack_require__(0); var GetAdvancedValue = __webpack_require__(15); var GetValue = __webpack_require__(6); -var MeasureText = __webpack_require__(997); +var MeasureText = __webpack_require__(1002); // Key: [ Object Key, Default Value ] @@ -150142,7 +150858,7 @@ module.exports = TextStyle; /***/ }), -/* 997 */ +/* 1002 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150277,7 +150993,7 @@ module.exports = MeasureText; /***/ }), -/* 998 */ +/* 1003 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150291,12 +151007,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(999); + renderWebGL = __webpack_require__(1004); } if (true) { - renderCanvas = __webpack_require__(1000); + renderCanvas = __webpack_require__(1005); } module.exports = { @@ -150308,7 +151024,7 @@ module.exports = { /***/ }), -/* 999 */ +/* 1004 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150382,7 +151098,7 @@ module.exports = TileSpriteWebGLRenderer; /***/ }), -/* 1000 */ +/* 1005 */ /***/ (function(module, exports) { /** @@ -150417,7 +151133,7 @@ module.exports = TileSpriteCanvasRenderer; /***/ }), -/* 1001 */ +/* 1006 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150431,12 +151147,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1002); + renderWebGL = __webpack_require__(1007); } if (true) { - renderCanvas = __webpack_require__(1003); + renderCanvas = __webpack_require__(1008); } module.exports = { @@ -150448,7 +151164,7 @@ module.exports = { /***/ }), -/* 1002 */ +/* 1007 */ /***/ (function(module, exports) { /** @@ -150484,7 +151200,7 @@ module.exports = VideoWebGLRenderer; /***/ }), -/* 1003 */ +/* 1008 */ /***/ (function(module, exports) { /** @@ -150520,7 +151236,7 @@ module.exports = VideoCanvasRenderer; /***/ }), -/* 1004 */ +/* 1009 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150534,12 +151250,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1005); + renderWebGL = __webpack_require__(1010); } if (true) { - renderCanvas = __webpack_require__(1006); + renderCanvas = __webpack_require__(1011); } module.exports = { @@ -150551,7 +151267,7 @@ module.exports = { /***/ }), -/* 1005 */ +/* 1010 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150629,7 +151345,7 @@ module.exports = ArcWebGLRenderer; /***/ }), -/* 1006 */ +/* 1011 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150638,8 +151354,8 @@ module.exports = ArcWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DegToRad = __webpack_require__(39); -var FillStyleCanvas = __webpack_require__(41); +var DegToRad = __webpack_require__(40); +var FillStyleCanvas = __webpack_require__(42); var LineStyleCanvas = __webpack_require__(50); var SetTransform = __webpack_require__(28); @@ -150705,7 +151421,7 @@ module.exports = ArcCanvasRenderer; /***/ }), -/* 1007 */ +/* 1012 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150719,12 +151435,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1008); + renderWebGL = __webpack_require__(1013); } if (true) { - renderCanvas = __webpack_require__(1009); + renderCanvas = __webpack_require__(1014); } module.exports = { @@ -150736,7 +151452,7 @@ module.exports = { /***/ }), -/* 1008 */ +/* 1013 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150814,7 +151530,7 @@ module.exports = CurveWebGLRenderer; /***/ }), -/* 1009 */ +/* 1014 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150823,7 +151539,7 @@ module.exports = CurveWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(41); +var FillStyleCanvas = __webpack_require__(42); var LineStyleCanvas = __webpack_require__(50); var SetTransform = __webpack_require__(28); @@ -150902,7 +151618,7 @@ module.exports = CurveCanvasRenderer; /***/ }), -/* 1010 */ +/* 1015 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150916,12 +151632,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1011); + renderWebGL = __webpack_require__(1016); } if (true) { - renderCanvas = __webpack_require__(1012); + renderCanvas = __webpack_require__(1017); } module.exports = { @@ -150933,7 +151649,7 @@ module.exports = { /***/ }), -/* 1011 */ +/* 1016 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151011,7 +151727,7 @@ module.exports = EllipseWebGLRenderer; /***/ }), -/* 1012 */ +/* 1017 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151020,7 +151736,7 @@ module.exports = EllipseWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(41); +var FillStyleCanvas = __webpack_require__(42); var LineStyleCanvas = __webpack_require__(50); var SetTransform = __webpack_require__(28); @@ -151096,7 +151812,7 @@ module.exports = EllipseCanvasRenderer; /***/ }), -/* 1013 */ +/* 1018 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151110,12 +151826,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1014); + renderWebGL = __webpack_require__(1019); } if (true) { - renderCanvas = __webpack_require__(1015); + renderCanvas = __webpack_require__(1020); } module.exports = { @@ -151127,7 +151843,7 @@ module.exports = { /***/ }), -/* 1014 */ +/* 1019 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151347,7 +152063,7 @@ module.exports = GridWebGLRenderer; /***/ }), -/* 1015 */ +/* 1020 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151356,7 +152072,7 @@ module.exports = GridWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(41); +var FillStyleCanvas = __webpack_require__(42); var LineStyleCanvas = __webpack_require__(50); var SetTransform = __webpack_require__(28); @@ -151536,7 +152252,7 @@ module.exports = GridCanvasRenderer; /***/ }), -/* 1016 */ +/* 1021 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151550,12 +152266,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1017); + renderWebGL = __webpack_require__(1022); } if (true) { - renderCanvas = __webpack_require__(1018); + renderCanvas = __webpack_require__(1023); } module.exports = { @@ -151567,7 +152283,7 @@ module.exports = { /***/ }), -/* 1017 */ +/* 1022 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151721,7 +152437,7 @@ module.exports = IsoBoxWebGLRenderer; /***/ }), -/* 1018 */ +/* 1023 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151730,7 +152446,7 @@ module.exports = IsoBoxWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(41); +var FillStyleCanvas = __webpack_require__(42); var SetTransform = __webpack_require__(28); /** @@ -151822,7 +152538,7 @@ module.exports = IsoBoxCanvasRenderer; /***/ }), -/* 1019 */ +/* 1024 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151836,12 +152552,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1020); + renderWebGL = __webpack_require__(1025); } if (true) { - renderCanvas = __webpack_require__(1021); + renderCanvas = __webpack_require__(1026); } module.exports = { @@ -151853,7 +152569,7 @@ module.exports = { /***/ }), -/* 1020 */ +/* 1025 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152028,7 +152744,7 @@ module.exports = IsoTriangleWebGLRenderer; /***/ }), -/* 1021 */ +/* 1026 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152037,7 +152753,7 @@ module.exports = IsoTriangleWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(41); +var FillStyleCanvas = __webpack_require__(42); var SetTransform = __webpack_require__(28); /** @@ -152142,7 +152858,7 @@ module.exports = IsoTriangleCanvasRenderer; /***/ }), -/* 1022 */ +/* 1027 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152156,12 +152872,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1023); + renderWebGL = __webpack_require__(1028); } if (true) { - renderCanvas = __webpack_require__(1024); + renderCanvas = __webpack_require__(1029); } module.exports = { @@ -152173,7 +152889,7 @@ module.exports = { /***/ }), -/* 1023 */ +/* 1028 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152266,7 +152982,7 @@ module.exports = LineWebGLRenderer; /***/ }), -/* 1024 */ +/* 1029 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152323,7 +153039,7 @@ module.exports = LineCanvasRenderer; /***/ }), -/* 1025 */ +/* 1030 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152337,12 +153053,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1026); + renderWebGL = __webpack_require__(1031); } if (true) { - renderCanvas = __webpack_require__(1027); + renderCanvas = __webpack_require__(1032); } module.exports = { @@ -152354,7 +153070,7 @@ module.exports = { /***/ }), -/* 1026 */ +/* 1031 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152432,7 +153148,7 @@ module.exports = PolygonWebGLRenderer; /***/ }), -/* 1027 */ +/* 1032 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152441,7 +153157,7 @@ module.exports = PolygonWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(41); +var FillStyleCanvas = __webpack_require__(42); var LineStyleCanvas = __webpack_require__(50); var SetTransform = __webpack_require__(28); @@ -152517,7 +153233,7 @@ module.exports = PolygonCanvasRenderer; /***/ }), -/* 1028 */ +/* 1033 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152531,12 +153247,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1029); + renderWebGL = __webpack_require__(1034); } if (true) { - renderCanvas = __webpack_require__(1030); + renderCanvas = __webpack_require__(1035); } module.exports = { @@ -152548,7 +153264,7 @@ module.exports = { /***/ }), -/* 1029 */ +/* 1034 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152640,7 +153356,7 @@ module.exports = RectangleWebGLRenderer; /***/ }), -/* 1030 */ +/* 1035 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152649,7 +153365,7 @@ module.exports = RectangleWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(41); +var FillStyleCanvas = __webpack_require__(42); var LineStyleCanvas = __webpack_require__(50); var SetTransform = __webpack_require__(28); @@ -152714,7 +153430,7 @@ module.exports = RectangleCanvasRenderer; /***/ }), -/* 1031 */ +/* 1036 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152728,12 +153444,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1032); + renderWebGL = __webpack_require__(1037); } if (true) { - renderCanvas = __webpack_require__(1033); + renderCanvas = __webpack_require__(1038); } module.exports = { @@ -152745,7 +153461,7 @@ module.exports = { /***/ }), -/* 1032 */ +/* 1037 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152823,7 +153539,7 @@ module.exports = StarWebGLRenderer; /***/ }), -/* 1033 */ +/* 1038 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152832,7 +153548,7 @@ module.exports = StarWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(41); +var FillStyleCanvas = __webpack_require__(42); var LineStyleCanvas = __webpack_require__(50); var SetTransform = __webpack_require__(28); @@ -152908,7 +153624,7 @@ module.exports = StarCanvasRenderer; /***/ }), -/* 1034 */ +/* 1039 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152922,12 +153638,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1035); + renderWebGL = __webpack_require__(1040); } if (true) { - renderCanvas = __webpack_require__(1036); + renderCanvas = __webpack_require__(1041); } module.exports = { @@ -152939,7 +153655,7 @@ module.exports = { /***/ }), -/* 1035 */ +/* 1040 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153042,7 +153758,7 @@ module.exports = TriangleWebGLRenderer; /***/ }), -/* 1036 */ +/* 1041 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153051,7 +153767,7 @@ module.exports = TriangleWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(41); +var FillStyleCanvas = __webpack_require__(42); var LineStyleCanvas = __webpack_require__(50); var SetTransform = __webpack_require__(28); @@ -153117,7 +153833,7 @@ module.exports = TriangleCanvasRenderer; /***/ }), -/* 1037 */ +/* 1042 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153159,7 +153875,7 @@ GameObjectFactory.register('blitter', function (x, y, key, frame) /***/ }), -/* 1038 */ +/* 1043 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153193,7 +153909,7 @@ GameObjectFactory.register('container', function (x, y, children) /***/ }), -/* 1039 */ +/* 1044 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153283,7 +153999,7 @@ GameObjectFactory.register('dom', function (x, y, element, style, innerText) /***/ }), -/* 1040 */ +/* 1045 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153352,7 +154068,7 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size /***/ }), -/* 1041 */ +/* 1046 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153394,7 +154110,7 @@ GameObjectFactory.register('extern', function () /***/ }), -/* 1042 */ +/* 1047 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153433,7 +154149,7 @@ GameObjectFactory.register('graphics', function (config) /***/ }), -/* 1043 */ +/* 1048 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153465,7 +154181,7 @@ GameObjectFactory.register('group', function (children, config) /***/ }), -/* 1044 */ +/* 1049 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153474,7 +154190,7 @@ GameObjectFactory.register('group', function (children, config) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Image = __webpack_require__(108); +var Image = __webpack_require__(111); var GameObjectFactory = __webpack_require__(5); /** @@ -153507,7 +154223,7 @@ GameObjectFactory.register('image', function (x, y, key, frame) /***/ }), -/* 1045 */ +/* 1050 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153553,7 +154269,7 @@ GameObjectFactory.register('particles', function (key, frame, emitters) /***/ }), -/* 1046 */ +/* 1051 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153601,7 +154317,7 @@ GameObjectFactory.register('follower', function (path, x, y, key, frame) /***/ }), -/* 1047 */ +/* 1052 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153641,7 +154357,7 @@ GameObjectFactory.register('renderTexture', function (x, y, width, height, key, /***/ }), -/* 1048 */ +/* 1053 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153695,7 +154411,7 @@ if (true) /***/ }), -/* 1049 */ +/* 1054 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153742,7 +154458,7 @@ GameObjectFactory.register('sprite', function (x, y, key, frame) /***/ }), -/* 1050 */ +/* 1055 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153751,7 +154467,7 @@ GameObjectFactory.register('sprite', function (x, y, key, frame) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(134); +var BitmapText = __webpack_require__(138); var GameObjectFactory = __webpack_require__(5); /** @@ -153806,7 +154522,7 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size, align /***/ }), -/* 1051 */ +/* 1056 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153871,7 +154587,7 @@ GameObjectFactory.register('text', function (x, y, text, style) /***/ }), -/* 1052 */ +/* 1057 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153915,7 +154631,7 @@ GameObjectFactory.register('tileSprite', function (x, y, width, height, key, fra /***/ }), -/* 1053 */ +/* 1058 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153924,7 +154640,7 @@ GameObjectFactory.register('tileSprite', function (x, y, width, height, key, fra * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Zone = __webpack_require__(111); +var Zone = __webpack_require__(114); var GameObjectFactory = __webpack_require__(5); /** @@ -153957,7 +154673,7 @@ GameObjectFactory.register('zone', function (x, y, width, height) /***/ }), -/* 1054 */ +/* 1059 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154003,7 +154719,7 @@ GameObjectFactory.register('video', function (x, y, key) /***/ }), -/* 1055 */ +/* 1060 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154076,7 +154792,7 @@ GameObjectFactory.register('circle', function (x, y, radius, fillColor, fillAlph /***/ }), -/* 1056 */ +/* 1061 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154126,7 +154842,7 @@ GameObjectFactory.register('curve', function (x, y, curve, fillColor, fillAlpha) /***/ }), -/* 1057 */ +/* 1062 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154178,7 +154894,7 @@ GameObjectFactory.register('ellipse', function (x, y, width, height, fillColor, /***/ }), -/* 1058 */ +/* 1063 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154233,7 +154949,7 @@ GameObjectFactory.register('grid', function (x, y, width, height, cellWidth, cel /***/ }), -/* 1059 */ +/* 1064 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154284,7 +155000,7 @@ GameObjectFactory.register('isobox', function (x, y, size, height, fillTop, fill /***/ }), -/* 1060 */ +/* 1065 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154337,7 +155053,7 @@ GameObjectFactory.register('isotriangle', function (x, y, size, height, reversed /***/ }), -/* 1061 */ +/* 1066 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154388,7 +155104,7 @@ GameObjectFactory.register('line', function (x, y, x1, y1, x2, y2, strokeColor, /***/ }), -/* 1062 */ +/* 1067 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154441,7 +155157,7 @@ GameObjectFactory.register('polygon', function (x, y, points, fillColor, fillAlp /***/ }), -/* 1063 */ +/* 1068 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154486,7 +155202,7 @@ GameObjectFactory.register('rectangle', function (x, y, width, height, fillColor /***/ }), -/* 1064 */ +/* 1069 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154538,7 +155254,7 @@ GameObjectFactory.register('star', function (x, y, points, innerRadius, outerRad /***/ }), -/* 1065 */ +/* 1070 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154589,7 +155305,7 @@ GameObjectFactory.register('triangle', function (x, y, x1, y1, x2, y2, x3, y3, f /***/ }), -/* 1066 */ +/* 1071 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154639,7 +155355,7 @@ GameObjectCreator.register('blitter', function (config, addToScene) /***/ }), -/* 1067 */ +/* 1072 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154688,7 +155404,7 @@ GameObjectCreator.register('container', function (config, addToScene) /***/ }), -/* 1068 */ +/* 1073 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154739,7 +155455,7 @@ GameObjectCreator.register('dynamicBitmapText', function (config, addToScene) /***/ }), -/* 1069 */ +/* 1074 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154787,7 +155503,7 @@ GameObjectCreator.register('graphics', function (config, addToScene) /***/ }), -/* 1070 */ +/* 1075 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154820,7 +155536,7 @@ GameObjectCreator.register('group', function (config) /***/ }), -/* 1071 */ +/* 1076 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154832,7 +155548,7 @@ GameObjectCreator.register('group', function (config) var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Image = __webpack_require__(108); +var Image = __webpack_require__(111); /** * Creates a new Image Game Object and returns it. @@ -154870,7 +155586,7 @@ GameObjectCreator.register('image', function (config, addToScene) /***/ }), -/* 1072 */ +/* 1077 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154927,7 +155643,7 @@ GameObjectCreator.register('particles', function (config, addToScene) /***/ }), -/* 1073 */ +/* 1078 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154979,7 +155695,7 @@ GameObjectCreator.register('renderTexture', function (config, addToScene) /***/ }), -/* 1074 */ +/* 1079 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155034,7 +155750,7 @@ GameObjectCreator.register('rope', function (config, addToScene) /***/ }), -/* 1075 */ +/* 1080 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155087,7 +155803,7 @@ GameObjectCreator.register('sprite', function (config, addToScene) /***/ }), -/* 1076 */ +/* 1081 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155096,7 +155812,7 @@ GameObjectCreator.register('sprite', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(134); +var BitmapText = __webpack_require__(138); var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); @@ -155140,7 +155856,7 @@ GameObjectCreator.register('bitmapText', function (config, addToScene) /***/ }), -/* 1077 */ +/* 1082 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155227,7 +155943,7 @@ GameObjectCreator.register('text', function (config, addToScene) /***/ }), -/* 1078 */ +/* 1083 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155279,7 +155995,7 @@ GameObjectCreator.register('tileSprite', function (config, addToScene) /***/ }), -/* 1079 */ +/* 1084 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155290,7 +156006,7 @@ GameObjectCreator.register('tileSprite', function (config, addToScene) var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Zone = __webpack_require__(111); +var Zone = __webpack_require__(114); /** * Creates a new Zone Game Object and returns it. @@ -155318,7 +156034,7 @@ GameObjectCreator.register('zone', function (config) /***/ }), -/* 1080 */ +/* 1085 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155367,7 +156083,7 @@ GameObjectCreator.register('video', function (config, addToScene) /***/ }), -/* 1081 */ +/* 1086 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155381,12 +156097,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1082); + renderWebGL = __webpack_require__(1087); } if (true) { - renderCanvas = __webpack_require__(1083); + renderCanvas = __webpack_require__(1088); } module.exports = { @@ -155398,7 +156114,7 @@ module.exports = { /***/ }), -/* 1082 */ +/* 1087 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155514,7 +156230,7 @@ module.exports = MeshWebGLRenderer; /***/ }), -/* 1083 */ +/* 1088 */ /***/ (function(module, exports) { /** @@ -155543,7 +156259,7 @@ module.exports = MeshCanvasRenderer; /***/ }), -/* 1084 */ +/* 1089 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155557,12 +156273,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1085); + renderWebGL = __webpack_require__(1090); } if (true) { - renderCanvas = __webpack_require__(1086); + renderCanvas = __webpack_require__(1091); } module.exports = { @@ -155574,7 +156290,7 @@ module.exports = { /***/ }), -/* 1085 */ +/* 1090 */ /***/ (function(module, exports) { /** @@ -155658,7 +156374,7 @@ module.exports = ShaderWebGLRenderer; /***/ }), -/* 1086 */ +/* 1091 */ /***/ (function(module, exports) { /** @@ -155687,7 +156403,7 @@ module.exports = ShaderCanvasRenderer; /***/ }), -/* 1087 */ +/* 1092 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155696,7 +156412,7 @@ module.exports = ShaderCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Mesh = __webpack_require__(136); +var Mesh = __webpack_require__(140); var GameObjectFactory = __webpack_require__(5); /** @@ -155737,7 +156453,7 @@ if (true) /***/ }), -/* 1088 */ +/* 1093 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155783,7 +156499,7 @@ if (true) /***/ }), -/* 1089 */ +/* 1094 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155824,7 +156540,7 @@ if (true) /***/ }), -/* 1090 */ +/* 1095 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155837,7 +156553,7 @@ var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); var GetValue = __webpack_require__(6); -var Mesh = __webpack_require__(136); +var Mesh = __webpack_require__(140); /** * Creates a new Mesh Game Object and returns it. @@ -155879,7 +156595,7 @@ GameObjectCreator.register('mesh', function (config, addToScene) /***/ }), -/* 1091 */ +/* 1096 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155929,7 +156645,7 @@ GameObjectCreator.register('quad', function (config, addToScene) /***/ }), -/* 1092 */ +/* 1097 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155982,7 +156698,7 @@ GameObjectCreator.register('shader', function (config, addToScene) /***/ }), -/* 1093 */ +/* 1098 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156098,7 +156814,7 @@ module.exports = LightsPlugin; /***/ }), -/* 1094 */ +/* 1099 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156109,27 +156825,27 @@ module.exports = LightsPlugin; var Circle = __webpack_require__(65); -Circle.Area = __webpack_require__(1095); +Circle.Area = __webpack_require__(1100); Circle.Circumference = __webpack_require__(272); -Circle.CircumferencePoint = __webpack_require__(153); -Circle.Clone = __webpack_require__(1096); +Circle.CircumferencePoint = __webpack_require__(154); +Circle.Clone = __webpack_require__(1101); Circle.Contains = __webpack_require__(56); -Circle.ContainsPoint = __webpack_require__(1097); -Circle.ContainsRect = __webpack_require__(1098); -Circle.CopyFrom = __webpack_require__(1099); -Circle.Equals = __webpack_require__(1100); -Circle.GetBounds = __webpack_require__(1101); +Circle.ContainsPoint = __webpack_require__(1102); +Circle.ContainsRect = __webpack_require__(1103); +Circle.CopyFrom = __webpack_require__(1104); +Circle.Equals = __webpack_require__(1105); +Circle.GetBounds = __webpack_require__(1106); Circle.GetPoint = __webpack_require__(270); Circle.GetPoints = __webpack_require__(271); -Circle.Offset = __webpack_require__(1102); -Circle.OffsetPoint = __webpack_require__(1103); -Circle.Random = __webpack_require__(154); +Circle.Offset = __webpack_require__(1107); +Circle.OffsetPoint = __webpack_require__(1108); +Circle.Random = __webpack_require__(155); module.exports = Circle; /***/ }), -/* 1095 */ +/* 1100 */ /***/ (function(module, exports) { /** @@ -156157,7 +156873,7 @@ module.exports = Area; /***/ }), -/* 1096 */ +/* 1101 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156187,7 +156903,7 @@ module.exports = Clone; /***/ }), -/* 1097 */ +/* 1102 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156218,7 +156934,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1098 */ +/* 1103 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156254,7 +156970,7 @@ module.exports = ContainsRect; /***/ }), -/* 1099 */ +/* 1104 */ /***/ (function(module, exports) { /** @@ -156286,7 +157002,7 @@ module.exports = CopyFrom; /***/ }), -/* 1100 */ +/* 1105 */ /***/ (function(module, exports) { /** @@ -156320,7 +157036,7 @@ module.exports = Equals; /***/ }), -/* 1101 */ +/* 1106 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156360,7 +157076,7 @@ module.exports = GetBounds; /***/ }), -/* 1102 */ +/* 1107 */ /***/ (function(module, exports) { /** @@ -156395,7 +157111,7 @@ module.exports = Offset; /***/ }), -/* 1103 */ +/* 1108 */ /***/ (function(module, exports) { /** @@ -156429,7 +157145,7 @@ module.exports = OffsetPoint; /***/ }), -/* 1104 */ +/* 1109 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156440,27 +157156,27 @@ module.exports = OffsetPoint; var Ellipse = __webpack_require__(96); -Ellipse.Area = __webpack_require__(1105); +Ellipse.Area = __webpack_require__(1110); Ellipse.Circumference = __webpack_require__(400); Ellipse.CircumferencePoint = __webpack_require__(199); -Ellipse.Clone = __webpack_require__(1106); +Ellipse.Clone = __webpack_require__(1111); Ellipse.Contains = __webpack_require__(97); -Ellipse.ContainsPoint = __webpack_require__(1107); -Ellipse.ContainsRect = __webpack_require__(1108); -Ellipse.CopyFrom = __webpack_require__(1109); -Ellipse.Equals = __webpack_require__(1110); -Ellipse.GetBounds = __webpack_require__(1111); +Ellipse.ContainsPoint = __webpack_require__(1112); +Ellipse.ContainsRect = __webpack_require__(1113); +Ellipse.CopyFrom = __webpack_require__(1114); +Ellipse.Equals = __webpack_require__(1115); +Ellipse.GetBounds = __webpack_require__(1116); Ellipse.GetPoint = __webpack_require__(398); Ellipse.GetPoints = __webpack_require__(399); -Ellipse.Offset = __webpack_require__(1112); -Ellipse.OffsetPoint = __webpack_require__(1113); -Ellipse.Random = __webpack_require__(162); +Ellipse.Offset = __webpack_require__(1117); +Ellipse.OffsetPoint = __webpack_require__(1118); +Ellipse.Random = __webpack_require__(163); module.exports = Ellipse; /***/ }), -/* 1105 */ +/* 1110 */ /***/ (function(module, exports) { /** @@ -156494,7 +157210,7 @@ module.exports = Area; /***/ }), -/* 1106 */ +/* 1111 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156524,7 +157240,7 @@ module.exports = Clone; /***/ }), -/* 1107 */ +/* 1112 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156555,7 +157271,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1108 */ +/* 1113 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156591,7 +157307,7 @@ module.exports = ContainsRect; /***/ }), -/* 1109 */ +/* 1114 */ /***/ (function(module, exports) { /** @@ -156623,7 +157339,7 @@ module.exports = CopyFrom; /***/ }), -/* 1110 */ +/* 1115 */ /***/ (function(module, exports) { /** @@ -156658,7 +157374,7 @@ module.exports = Equals; /***/ }), -/* 1111 */ +/* 1116 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156698,7 +157414,7 @@ module.exports = GetBounds; /***/ }), -/* 1112 */ +/* 1117 */ /***/ (function(module, exports) { /** @@ -156733,7 +157449,7 @@ module.exports = Offset; /***/ }), -/* 1113 */ +/* 1118 */ /***/ (function(module, exports) { /** @@ -156767,7 +157483,7 @@ module.exports = OffsetPoint; /***/ }), -/* 1114 */ +/* 1119 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156861,7 +157577,7 @@ module.exports = GetCircleToCircle; /***/ }), -/* 1115 */ +/* 1120 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156911,7 +157627,7 @@ module.exports = GetCircleToRectangle; /***/ }), -/* 1116 */ +/* 1121 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156920,91 +157636,100 @@ module.exports = GetCircleToRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector3 = __webpack_require__(94); -var Vector4 = __webpack_require__(179); -var GetLineToLine = __webpack_require__(432); -var Line = __webpack_require__(49); +var Vector4 = __webpack_require__(126); +var GetLineToPolygon = __webpack_require__(434); +var Line = __webpack_require__(39); // Temp calculation segment var segment = new Line(); -// Temp vec3 -var tempIntersect = new Vector3(); +/** + * @ignore + */ +function CheckIntersects (angle, x, y, polygons, intersects) +{ + var dx = Math.cos(angle); + var dy = Math.sin(angle); + + segment.setTo(x, y, x + dx, y + dy); + + var closestIntersect = GetLineToPolygon(segment, polygons); + + if (closestIntersect) + { + intersects.push(new Vector4(closestIntersect.x, closestIntersect.y, angle, closestIntersect.w)); + } +} /** - * Checks for the closest point of intersection between a line segment and an array of polygons. + * @ignore + */ +function SortIntersects (a, b) +{ + return a.z - b.z; +} + +/** + * Projects rays out from the given point to each line segment of the polygons. * - * If no intersection is found, this function returns `null`. + * If the rays intersect with the polygons, the points of intersection are returned in an array. * - * If intersection was found, a Vector4 is returned with the following properties: + * If no intersections are found, the returned array will be empty. + * + * Each Vector4 intersection result has the following properties: * * The `x` and `y` components contain the point of the intersection. - * The `z` component contains the closest distance. + * The `z` component contains the angle of intersection. * The `w` component contains the index of the polygon, in the given array, that triggered the intersection. * - * @function Phaser.Geom.Intersects.GetLineToPolygon + * @function Phaser.Geom.Intersects.GetRaysFromPointToPolygon * @since 3.50.0 * - * @param {Phaser.Geom.Line} line - The line segment to check. - * @param {Phaser.Geom.Polygon | Phaser.Geom.Polygon[]} polygons - A single polygon, or array of polygons, to check. - * @param {Phaser.Math.Vector4} [out] - A Vector4 to store the intersection results in. + * @param {number} x - The x coordinate to project the rays from. + * @param {number} y - The y coordinate to project the rays from. + * @param {Phaser.Geom.Polygon | Phaser.Geom.Polygon[]} polygons - A single polygon, or array of polygons, to check against the rays. * - * @return {Phaser.Math.Vector4} A Vector4 containing the intersection results, or `null`. + * @return {Phaser.Math.Vector4[]} An array containing all intersections in Vector4s. */ -var GetLineToPolygon = function (line, polygons, out) +var GetRaysFromPointToPolygon = function (x, y, polygons) { - if (out === undefined) - { - out = new Vector4(); - } - if (!Array.isArray(polygons)) { polygons = [ polygons ]; } - var closestIntersect = false; + var intersects = []; + var angles = []; - // Reset our temporary vec4 - tempIntersect.set(); - - for (var p = 0; p < polygons.length; p++) + for (var i = 0; i < polygons.length; i++) { - var points = polygons[p].points; + var points = polygons[i].points; - var prev = points[0]; - - for (var i = 1; i < points.length; i++) + for (var p = 0; p < points.length; p++) { - var current = points[i]; + var angle = Math.atan2(points[p].y - y, points[p].x - x); - segment.setTo(prev.x, prev.y, current.x, current.y); - - prev = current; - - if (!GetLineToLine(line, segment, tempIntersect)) + if (angles.indexOf(angle) === -1) { - // No intersection? Carry on ... - continue; - } + // +- 0.00001 rads to catch lines behind segment corners - if (!closestIntersect || tempIntersect.z < out.z) - { - out.set(tempIntersect.x, tempIntersect.y, tempIntersect.z, p); + CheckIntersects(angle, x, y, polygons, intersects); + CheckIntersects(angle - 0.00001, x, y, polygons, intersects); + CheckIntersects(angle + 0.00001, x, y, polygons, intersects); - closestIntersect = true; + angles.push(angle); } } } - return (closestIntersect) ? out : null; + return intersects.sort(SortIntersects); }; -module.exports = GetLineToPolygon; +module.exports = GetRaysFromPointToPolygon; /***/ }), -/* 1117 */ +/* 1122 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157014,7 +157739,7 @@ module.exports = GetLineToPolygon; */ var Rectangle = __webpack_require__(9); -var RectangleToRectangle = __webpack_require__(137); +var RectangleToRectangle = __webpack_require__(141); /** * Checks if two Rectangle shapes intersect and returns the area of this intersection as Rectangle object. @@ -157053,7 +157778,7 @@ module.exports = GetRectangleIntersection; /***/ }), -/* 1118 */ +/* 1123 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157064,7 +157789,7 @@ module.exports = GetRectangleIntersection; */ var GetLineToRectangle = __webpack_require__(215); -var RectangleToRectangle = __webpack_require__(137); +var RectangleToRectangle = __webpack_require__(141); /** * Checks if two Rectangles intersect and returns the intersection points as a Point object array. @@ -157104,7 +157829,7 @@ module.exports = GetRectangleToRectangle; /***/ }), -/* 1119 */ +/* 1124 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157114,7 +157839,7 @@ module.exports = GetRectangleToRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RectangleToTriangle = __webpack_require__(434); +var RectangleToTriangle = __webpack_require__(436); var GetLineToRectangle = __webpack_require__(215); /** @@ -157152,7 +157877,7 @@ module.exports = GetRectangleToTriangle; /***/ }), -/* 1120 */ +/* 1125 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157163,7 +157888,7 @@ module.exports = GetRectangleToTriangle; */ var GetLineToCircle = __webpack_require__(213); -var TriangleToCircle = __webpack_require__(436); +var TriangleToCircle = __webpack_require__(438); /** * Checks if a Triangle and a Circle intersect, and returns the intersection points as a Point object array. @@ -157201,7 +157926,7 @@ module.exports = GetTriangleToCircle; /***/ }), -/* 1121 */ +/* 1126 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157211,8 +157936,8 @@ module.exports = GetTriangleToCircle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TriangleToTriangle = __webpack_require__(439); -var GetTriangleToLine = __webpack_require__(437); +var TriangleToTriangle = __webpack_require__(441); +var GetTriangleToLine = __webpack_require__(439); /** * Checks if two Triangles intersect, and returns the intersection points as a Point object array. @@ -157250,7 +157975,7 @@ module.exports = GetTriangleToTriangle; /***/ }), -/* 1122 */ +/* 1127 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157259,7 +157984,7 @@ module.exports = GetTriangleToTriangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PointToLine = __webpack_require__(441); +var PointToLine = __webpack_require__(443); /** * Checks if a Point is located on the given line segment. @@ -157291,7 +158016,7 @@ module.exports = PointToLineSegment; /***/ }), -/* 1123 */ +/* 1128 */ /***/ (function(module, exports) { /** @@ -157331,7 +158056,7 @@ module.exports = RectangleToValues; /***/ }), -/* 1124 */ +/* 1129 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157340,43 +158065,43 @@ module.exports = RectangleToValues; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Line = __webpack_require__(49); +var Line = __webpack_require__(39); -Line.Angle = __webpack_require__(85); +Line.Angle = __webpack_require__(86); Line.BresenhamPoints = __webpack_require__(292); -Line.CenterOn = __webpack_require__(1125); -Line.Clone = __webpack_require__(1126); -Line.CopyFrom = __webpack_require__(1127); -Line.Equals = __webpack_require__(1128); -Line.Extend = __webpack_require__(1129); -Line.GetEasedPoints = __webpack_require__(1130); -Line.GetMidPoint = __webpack_require__(1131); -Line.GetNearestPoint = __webpack_require__(1132); -Line.GetNormal = __webpack_require__(1133); +Line.CenterOn = __webpack_require__(1130); +Line.Clone = __webpack_require__(1131); +Line.CopyFrom = __webpack_require__(1132); +Line.Equals = __webpack_require__(1133); +Line.Extend = __webpack_require__(1134); +Line.GetEasedPoints = __webpack_require__(1135); +Line.GetMidPoint = __webpack_require__(1136); +Line.GetNearestPoint = __webpack_require__(1137); +Line.GetNormal = __webpack_require__(1138); Line.GetPoint = __webpack_require__(279); -Line.GetPoints = __webpack_require__(157); -Line.GetShortestDistance = __webpack_require__(1134); -Line.Height = __webpack_require__(1135); +Line.GetPoints = __webpack_require__(158); +Line.GetShortestDistance = __webpack_require__(1139); +Line.Height = __webpack_require__(1140); Line.Length = __webpack_require__(57); -Line.NormalAngle = __webpack_require__(442); -Line.NormalX = __webpack_require__(1136); -Line.NormalY = __webpack_require__(1137); -Line.Offset = __webpack_require__(1138); -Line.PerpSlope = __webpack_require__(1139); -Line.Random = __webpack_require__(158); -Line.ReflectAngle = __webpack_require__(1140); -Line.Rotate = __webpack_require__(1141); -Line.RotateAroundPoint = __webpack_require__(1142); +Line.NormalAngle = __webpack_require__(444); +Line.NormalX = __webpack_require__(1141); +Line.NormalY = __webpack_require__(1142); +Line.Offset = __webpack_require__(1143); +Line.PerpSlope = __webpack_require__(1144); +Line.Random = __webpack_require__(159); +Line.ReflectAngle = __webpack_require__(1145); +Line.Rotate = __webpack_require__(1146); +Line.RotateAroundPoint = __webpack_require__(1147); Line.RotateAroundXY = __webpack_require__(217); -Line.SetToAngle = __webpack_require__(1143); -Line.Slope = __webpack_require__(1144); -Line.Width = __webpack_require__(1145); +Line.SetToAngle = __webpack_require__(1148); +Line.Slope = __webpack_require__(1149); +Line.Width = __webpack_require__(1150); module.exports = Line; /***/ }), -/* 1125 */ +/* 1130 */ /***/ (function(module, exports) { /** @@ -157416,7 +158141,7 @@ module.exports = CenterOn; /***/ }), -/* 1126 */ +/* 1131 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157425,7 +158150,7 @@ module.exports = CenterOn; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Line = __webpack_require__(49); +var Line = __webpack_require__(39); /** * Clone the given line. @@ -157446,7 +158171,7 @@ module.exports = Clone; /***/ }), -/* 1127 */ +/* 1132 */ /***/ (function(module, exports) { /** @@ -157477,7 +158202,7 @@ module.exports = CopyFrom; /***/ }), -/* 1128 */ +/* 1133 */ /***/ (function(module, exports) { /** @@ -157511,7 +158236,7 @@ module.exports = Equals; /***/ }), -/* 1129 */ +/* 1134 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157569,7 +158294,7 @@ module.exports = Extend; /***/ }), -/* 1130 */ +/* 1135 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157689,7 +158414,7 @@ module.exports = GetEasedPoints; /***/ }), -/* 1131 */ +/* 1136 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157727,7 +158452,7 @@ module.exports = GetMidPoint; /***/ }), -/* 1132 */ +/* 1137 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157782,7 +158507,7 @@ module.exports = GetNearestPoint; /***/ }), -/* 1133 */ +/* 1138 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157792,7 +158517,7 @@ module.exports = GetNearestPoint; */ var MATH_CONST = __webpack_require__(13); -var Angle = __webpack_require__(85); +var Angle = __webpack_require__(86); var Point = __webpack_require__(4); /** @@ -157826,7 +158551,7 @@ module.exports = GetNormal; /***/ }), -/* 1134 */ +/* 1139 */ /***/ (function(module, exports) { /** @@ -157873,7 +158598,7 @@ module.exports = GetShortestDistance; /***/ }), -/* 1135 */ +/* 1140 */ /***/ (function(module, exports) { /** @@ -157901,7 +158626,7 @@ module.exports = Height; /***/ }), -/* 1136 */ +/* 1141 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157911,7 +158636,7 @@ module.exports = Height; */ var MATH_CONST = __webpack_require__(13); -var Angle = __webpack_require__(85); +var Angle = __webpack_require__(86); /** * Returns the x component of the normal vector of the given line. @@ -157932,7 +158657,7 @@ module.exports = NormalX; /***/ }), -/* 1137 */ +/* 1142 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157942,7 +158667,7 @@ module.exports = NormalX; */ var MATH_CONST = __webpack_require__(13); -var Angle = __webpack_require__(85); +var Angle = __webpack_require__(86); /** * The Y value of the normal of the given line. @@ -157964,7 +158689,7 @@ module.exports = NormalY; /***/ }), -/* 1138 */ +/* 1143 */ /***/ (function(module, exports) { /** @@ -158002,7 +158727,7 @@ module.exports = Offset; /***/ }), -/* 1139 */ +/* 1144 */ /***/ (function(module, exports) { /** @@ -158030,7 +158755,7 @@ module.exports = PerpSlope; /***/ }), -/* 1140 */ +/* 1145 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158039,8 +158764,8 @@ module.exports = PerpSlope; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Angle = __webpack_require__(85); -var NormalAngle = __webpack_require__(442); +var Angle = __webpack_require__(86); +var NormalAngle = __webpack_require__(444); /** * Calculate the reflected angle between two lines. @@ -158064,7 +158789,7 @@ module.exports = ReflectAngle; /***/ }), -/* 1141 */ +/* 1146 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158100,7 +158825,7 @@ module.exports = Rotate; /***/ }), -/* 1142 */ +/* 1147 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158134,7 +158859,7 @@ module.exports = RotateAroundPoint; /***/ }), -/* 1143 */ +/* 1148 */ /***/ (function(module, exports) { /** @@ -158174,7 +158899,7 @@ module.exports = SetToAngle; /***/ }), -/* 1144 */ +/* 1149 */ /***/ (function(module, exports) { /** @@ -158202,7 +158927,7 @@ module.exports = Slope; /***/ }), -/* 1145 */ +/* 1150 */ /***/ (function(module, exports) { /** @@ -158230,7 +158955,7 @@ module.exports = Width; /***/ }), -/* 1146 */ +/* 1151 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158241,27 +158966,27 @@ module.exports = Width; var Point = __webpack_require__(4); -Point.Ceil = __webpack_require__(1147); -Point.Clone = __webpack_require__(1148); -Point.CopyFrom = __webpack_require__(1149); -Point.Equals = __webpack_require__(1150); -Point.Floor = __webpack_require__(1151); -Point.GetCentroid = __webpack_require__(1152); -Point.GetMagnitude = __webpack_require__(443); -Point.GetMagnitudeSq = __webpack_require__(444); -Point.GetRectangleFromPoints = __webpack_require__(1153); -Point.Interpolate = __webpack_require__(1154); -Point.Invert = __webpack_require__(1155); -Point.Negative = __webpack_require__(1156); -Point.Project = __webpack_require__(1157); -Point.ProjectUnit = __webpack_require__(1158); -Point.SetMagnitude = __webpack_require__(1159); +Point.Ceil = __webpack_require__(1152); +Point.Clone = __webpack_require__(1153); +Point.CopyFrom = __webpack_require__(1154); +Point.Equals = __webpack_require__(1155); +Point.Floor = __webpack_require__(1156); +Point.GetCentroid = __webpack_require__(1157); +Point.GetMagnitude = __webpack_require__(445); +Point.GetMagnitudeSq = __webpack_require__(446); +Point.GetRectangleFromPoints = __webpack_require__(1158); +Point.Interpolate = __webpack_require__(1159); +Point.Invert = __webpack_require__(1160); +Point.Negative = __webpack_require__(1161); +Point.Project = __webpack_require__(1162); +Point.ProjectUnit = __webpack_require__(1163); +Point.SetMagnitude = __webpack_require__(1164); module.exports = Point; /***/ }), -/* 1147 */ +/* 1152 */ /***/ (function(module, exports) { /** @@ -158291,7 +159016,7 @@ module.exports = Ceil; /***/ }), -/* 1148 */ +/* 1153 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158321,7 +159046,7 @@ module.exports = Clone; /***/ }), -/* 1149 */ +/* 1154 */ /***/ (function(module, exports) { /** @@ -158352,7 +159077,7 @@ module.exports = CopyFrom; /***/ }), -/* 1150 */ +/* 1155 */ /***/ (function(module, exports) { /** @@ -158381,7 +159106,7 @@ module.exports = Equals; /***/ }), -/* 1151 */ +/* 1156 */ /***/ (function(module, exports) { /** @@ -158411,7 +159136,7 @@ module.exports = Floor; /***/ }), -/* 1152 */ +/* 1157 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158475,7 +159200,7 @@ module.exports = GetCentroid; /***/ }), -/* 1153 */ +/* 1158 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158545,7 +159270,7 @@ module.exports = GetRectangleFromPoints; /***/ }), -/* 1154 */ +/* 1159 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158586,7 +159311,7 @@ module.exports = Interpolate; /***/ }), -/* 1155 */ +/* 1160 */ /***/ (function(module, exports) { /** @@ -158616,7 +159341,7 @@ module.exports = Invert; /***/ }), -/* 1156 */ +/* 1161 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158651,7 +159376,7 @@ module.exports = Negative; /***/ }), -/* 1157 */ +/* 1162 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158661,7 +159386,7 @@ module.exports = Negative; */ var Point = __webpack_require__(4); -var GetMagnitudeSq = __webpack_require__(444); +var GetMagnitudeSq = __webpack_require__(446); /** * Calculates the vector projection of `pointA` onto the nonzero `pointB`. This is the @@ -158698,7 +159423,7 @@ module.exports = Project; /***/ }), -/* 1158 */ +/* 1163 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158743,7 +159468,7 @@ module.exports = ProjectUnit; /***/ }), -/* 1159 */ +/* 1164 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158752,7 +159477,7 @@ module.exports = ProjectUnit; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetMagnitude = __webpack_require__(443); +var GetMagnitude = __webpack_require__(445); /** * Changes the magnitude (length) of a two-dimensional vector without changing its direction. @@ -158787,7 +159512,7 @@ module.exports = SetMagnitude; /***/ }), -/* 1160 */ +/* 1165 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158798,22 +159523,23 @@ module.exports = SetMagnitude; var Polygon = __webpack_require__(207); -Polygon.Clone = __webpack_require__(1161); +Polygon.Clone = __webpack_require__(1166); Polygon.Contains = __webpack_require__(208); -Polygon.ContainsPoint = __webpack_require__(1162); +Polygon.ContainsPoint = __webpack_require__(1167); Polygon.GetAABB = __webpack_require__(418); -Polygon.GetNumberArray = __webpack_require__(1163); +Polygon.GetNumberArray = __webpack_require__(1168); Polygon.GetPoints = __webpack_require__(419); Polygon.Perimeter = __webpack_require__(420); -Polygon.Reverse = __webpack_require__(1164); +Polygon.Reverse = __webpack_require__(1169); +Polygon.Simplify = __webpack_require__(1170); Polygon.Smooth = __webpack_require__(421); -Polygon.Translate = __webpack_require__(1165); +Polygon.Translate = __webpack_require__(1171); module.exports = Polygon; /***/ }), -/* 1161 */ +/* 1166 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158843,7 +159569,7 @@ module.exports = Clone; /***/ }), -/* 1162 */ +/* 1167 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158874,7 +159600,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1163 */ +/* 1168 */ /***/ (function(module, exports) { /** @@ -158917,7 +159643,7 @@ module.exports = GetNumberArray; /***/ }), -/* 1164 */ +/* 1169 */ /***/ (function(module, exports) { /** @@ -158949,7 +159675,217 @@ module.exports = Reverse; /***/ }), -/* 1165 */ +/* 1170 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * @author Richard Davey + * @author Vladimir Agafonkin + * @see Based on Simplify.js mourner.github.io/simplify-js + */ + +/** + * Copyright (c) 2017, Vladimir Agafonkin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + + +/** + * @ignore + */ +function getSqDist (p1, p2) +{ + var dx = p1.x - p2.x, + dy = p1.y - p2.y; + + return dx * dx + dy * dy; +} + +/** + * Square distance from a point to a segment + * + * @ignore + */ +function getSqSegDist (p, p1, p2) +{ + var x = p1.x, + y = p1.y, + dx = p2.x - x, + dy = p2.y - y; + + if (dx !== 0 || dy !== 0) + { + var t = ((p.x - x) * dx + (p.y - y) * dy) / (dx * dx + dy * dy); + + if (t > 1) + { + x = p2.x; + y = p2.y; + } + else if (t > 0) + { + x += dx * t; + y += dy * t; + } + } + + dx = p.x - x; + dy = p.y - y; + + return dx * dx + dy * dy; +} + +/** + * Basic distance-based simplification + * + * @ignore + */ +function simplifyRadialDist (points, sqTolerance) +{ + var prevPoint = points[0], + newPoints = [ prevPoint ], + point; + + for (var i = 1, len = points.length; i < len; i++) + { + point = points[i]; + + if (getSqDist(point, prevPoint) > sqTolerance) + { + newPoints.push(point); + prevPoint = point; + } + } + + if (prevPoint !== point) + { + newPoints.push(point); + } + + return newPoints; +} + +/** + * @ignore + */ +function simplifyDPStep (points, first, last, sqTolerance, simplified) +{ + var maxSqDist = sqTolerance, + index; + + for (var i = first + 1; i < last; i++) + { + var sqDist = getSqSegDist(points[i], points[first], points[last]); + + if (sqDist > maxSqDist) + { + index = i; + maxSqDist = sqDist; + } + } + + if (maxSqDist > sqTolerance) + { + if (index - first > 1) + { + simplifyDPStep(points, first, index, sqTolerance, simplified); + } + + simplified.push(points[index]); + + if (last - index > 1) + { + simplifyDPStep(points, index, last, sqTolerance, simplified); + } + } +} + +/** + * Simplification using Ramer-Douglas-Peucker algorithm + * + * @ignore + */ +function simplifyDouglasPeucker (points, sqTolerance) +{ + var last = points.length - 1; + + var simplified = [ points[0] ]; + + simplifyDPStep(points, 0, last, sqTolerance, simplified); + + simplified.push(points[last]); + + return simplified; +} + +/** + * Takes a Polygon object and simplifies the points by running them through a combination of + * Douglas-Peucker and Radial Distance algorithms. Simplification dramatically reduces the number of + * points in a polygon while retaining its shape, giving a huge performance boost when processing + * it and also reducing visual noise. + * + * @function Phaser.Geom.Polygon.Simplify + * @since 3.50.0 + * + * @generic {Phaser.Geom.Polygon} O - [polygon,$return] + * + * @param {Phaser.Geom.Polygon} polygon - The polygon to be simplified. The polygon will be modified in-place and returned. + * @param {number} [tolerance=1] - Affects the amount of simplification (in the same metric as the point coordinates). + * @param {boolean} [highestQuality=false] - Excludes distance-based preprocessing step which leads to highest quality simplification but runs ~10-20 times slower. + * + * @return {Phaser.Geom.Polygon} The input polygon. + */ +var Simplify = function (polygon, tolerance, highestQuality) +{ + if (tolerance === undefined) { tolerance = 1; } + if (highestQuality === undefined) { highestQuality = false; } + + var points = polygon.points; + + if (points.length <= 2) + { + return points; + } + + var sqTolerance = tolerance * tolerance; + + if (!highestQuality) + { + points = simplifyRadialDist(points, sqTolerance); + } + + polygon.setTo(simplifyDouglasPeucker(points, sqTolerance)); + + return polygon; +}; + +module.exports = Simplify; + + +/***/ }), +/* 1171 */ /***/ (function(module, exports) { /** @@ -158989,7 +159925,7 @@ module.exports = Translate; /***/ }), -/* 1166 */ +/* 1172 */ /***/ (function(module, exports) { /** @@ -159017,7 +159953,7 @@ module.exports = Area; /***/ }), -/* 1167 */ +/* 1173 */ /***/ (function(module, exports) { /** @@ -159050,7 +159986,7 @@ module.exports = Ceil; /***/ }), -/* 1168 */ +/* 1174 */ /***/ (function(module, exports) { /** @@ -159085,7 +160021,7 @@ module.exports = CeilAll; /***/ }), -/* 1169 */ +/* 1175 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159115,7 +160051,7 @@ module.exports = Clone; /***/ }), -/* 1170 */ +/* 1176 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159124,7 +160060,7 @@ module.exports = Clone; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(48); +var Contains = __webpack_require__(49); /** * Determines whether the specified point is contained within the rectangular region defined by this Rectangle object. @@ -159146,7 +160082,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1171 */ +/* 1177 */ /***/ (function(module, exports) { /** @@ -159177,7 +160113,7 @@ module.exports = CopyFrom; /***/ }), -/* 1172 */ +/* 1178 */ /***/ (function(module, exports) { /** @@ -159211,7 +160147,7 @@ module.exports = Equals; /***/ }), -/* 1173 */ +/* 1179 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159264,7 +160200,7 @@ module.exports = FitInside; /***/ }), -/* 1174 */ +/* 1180 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159317,7 +160253,7 @@ module.exports = FitOutside; /***/ }), -/* 1175 */ +/* 1181 */ /***/ (function(module, exports) { /** @@ -159350,7 +160286,7 @@ module.exports = Floor; /***/ }), -/* 1176 */ +/* 1182 */ /***/ (function(module, exports) { /** @@ -159385,7 +160321,7 @@ module.exports = FloorAll; /***/ }), -/* 1177 */ +/* 1183 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159428,7 +160364,7 @@ module.exports = FromXY; /***/ }), -/* 1178 */ +/* 1184 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159466,7 +160402,7 @@ module.exports = GetCenter; /***/ }), -/* 1179 */ +/* 1185 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159506,7 +160442,7 @@ module.exports = GetSize; /***/ }), -/* 1180 */ +/* 1186 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159515,7 +160451,7 @@ module.exports = GetSize; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CenterOn = __webpack_require__(173); +var CenterOn = __webpack_require__(174); /** @@ -159548,7 +160484,7 @@ module.exports = Inflate; /***/ }), -/* 1181 */ +/* 1187 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159558,7 +160494,7 @@ module.exports = Inflate; */ var Rectangle = __webpack_require__(9); -var Intersects = __webpack_require__(137); +var Intersects = __webpack_require__(141); /** * Takes two Rectangles and first checks to see if they intersect. @@ -159599,7 +160535,7 @@ module.exports = Intersection; /***/ }), -/* 1182 */ +/* 1188 */ /***/ (function(module, exports) { /** @@ -159648,7 +160584,7 @@ module.exports = MergePoints; /***/ }), -/* 1183 */ +/* 1189 */ /***/ (function(module, exports) { /** @@ -159695,7 +160631,7 @@ module.exports = MergeRect; /***/ }), -/* 1184 */ +/* 1190 */ /***/ (function(module, exports) { /** @@ -159739,7 +160675,7 @@ module.exports = MergeXY; /***/ }), -/* 1185 */ +/* 1191 */ /***/ (function(module, exports) { /** @@ -159774,7 +160710,7 @@ module.exports = Offset; /***/ }), -/* 1186 */ +/* 1192 */ /***/ (function(module, exports) { /** @@ -159808,7 +160744,7 @@ module.exports = OffsetPoint; /***/ }), -/* 1187 */ +/* 1193 */ /***/ (function(module, exports) { /** @@ -159842,7 +160778,7 @@ module.exports = Overlaps; /***/ }), -/* 1188 */ +/* 1194 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159852,7 +160788,7 @@ module.exports = Overlaps; */ var Point = __webpack_require__(4); -var DegToRad = __webpack_require__(39); +var DegToRad = __webpack_require__(40); /** * Returns a Point from the perimeter of a Rectangle based on the given angle. @@ -159899,7 +160835,7 @@ module.exports = PerimeterPoint; /***/ }), -/* 1189 */ +/* 1195 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159908,8 +160844,8 @@ module.exports = PerimeterPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Between = __webpack_require__(177); -var ContainsRect = __webpack_require__(446); +var Between = __webpack_require__(178); +var ContainsRect = __webpack_require__(448); var Point = __webpack_require__(4); /** @@ -159970,7 +160906,7 @@ module.exports = RandomOutside; /***/ }), -/* 1190 */ +/* 1196 */ /***/ (function(module, exports) { /** @@ -159999,7 +160935,7 @@ module.exports = SameDimensions; /***/ }), -/* 1191 */ +/* 1197 */ /***/ (function(module, exports) { /** @@ -160038,7 +160974,7 @@ module.exports = Scale; /***/ }), -/* 1192 */ +/* 1198 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160049,36 +160985,36 @@ module.exports = Scale; var Triangle = __webpack_require__(71); -Triangle.Area = __webpack_require__(1193); -Triangle.BuildEquilateral = __webpack_require__(1194); -Triangle.BuildFromPolygon = __webpack_require__(1195); -Triangle.BuildRight = __webpack_require__(1196); -Triangle.CenterOn = __webpack_require__(1197); -Triangle.Centroid = __webpack_require__(447); -Triangle.CircumCenter = __webpack_require__(1198); -Triangle.CircumCircle = __webpack_require__(1199); -Triangle.Clone = __webpack_require__(1200); -Triangle.Contains = __webpack_require__(83); +Triangle.Area = __webpack_require__(1199); +Triangle.BuildEquilateral = __webpack_require__(1200); +Triangle.BuildFromPolygon = __webpack_require__(1201); +Triangle.BuildRight = __webpack_require__(1202); +Triangle.CenterOn = __webpack_require__(1203); +Triangle.Centroid = __webpack_require__(449); +Triangle.CircumCenter = __webpack_require__(1204); +Triangle.CircumCircle = __webpack_require__(1205); +Triangle.Clone = __webpack_require__(1206); +Triangle.Contains = __webpack_require__(84); Triangle.ContainsArray = __webpack_require__(216); -Triangle.ContainsPoint = __webpack_require__(1201); -Triangle.CopyFrom = __webpack_require__(1202); -Triangle.Decompose = __webpack_require__(440); -Triangle.Equals = __webpack_require__(1203); +Triangle.ContainsPoint = __webpack_require__(1207); +Triangle.CopyFrom = __webpack_require__(1208); +Triangle.Decompose = __webpack_require__(442); +Triangle.Equals = __webpack_require__(1209); Triangle.GetPoint = __webpack_require__(425); Triangle.GetPoints = __webpack_require__(426); -Triangle.InCenter = __webpack_require__(449); -Triangle.Perimeter = __webpack_require__(1204); -Triangle.Offset = __webpack_require__(448); -Triangle.Random = __webpack_require__(163); -Triangle.Rotate = __webpack_require__(1205); -Triangle.RotateAroundPoint = __webpack_require__(1206); +Triangle.InCenter = __webpack_require__(451); +Triangle.Perimeter = __webpack_require__(1210); +Triangle.Offset = __webpack_require__(450); +Triangle.Random = __webpack_require__(164); +Triangle.Rotate = __webpack_require__(1211); +Triangle.RotateAroundPoint = __webpack_require__(1212); Triangle.RotateAroundXY = __webpack_require__(219); module.exports = Triangle; /***/ }), -/* 1193 */ +/* 1199 */ /***/ (function(module, exports) { /** @@ -160117,7 +161053,7 @@ module.exports = Area; /***/ }), -/* 1194 */ +/* 1200 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160161,7 +161097,7 @@ module.exports = BuildEquilateral; /***/ }), -/* 1195 */ +/* 1201 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160237,7 +161173,7 @@ module.exports = BuildFromPolygon; /***/ }), -/* 1196 */ +/* 1202 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160286,7 +161222,7 @@ module.exports = BuildRight; /***/ }), -/* 1197 */ +/* 1203 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160295,8 +161231,8 @@ module.exports = BuildRight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Centroid = __webpack_require__(447); -var Offset = __webpack_require__(448); +var Centroid = __webpack_require__(449); +var Offset = __webpack_require__(450); /** * @callback CenterFunction @@ -160339,7 +161275,7 @@ module.exports = CenterOn; /***/ }), -/* 1198 */ +/* 1204 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160415,7 +161351,7 @@ module.exports = CircumCenter; /***/ }), -/* 1199 */ +/* 1205 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160498,7 +161434,7 @@ module.exports = CircumCircle; /***/ }), -/* 1200 */ +/* 1206 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160528,7 +161464,7 @@ module.exports = Clone; /***/ }), -/* 1201 */ +/* 1207 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160537,7 +161473,7 @@ module.exports = Clone; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(83); +var Contains = __webpack_require__(84); /** * Tests if a triangle contains a point. @@ -160559,7 +161495,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1202 */ +/* 1208 */ /***/ (function(module, exports) { /** @@ -160590,7 +161526,7 @@ module.exports = CopyFrom; /***/ }), -/* 1203 */ +/* 1209 */ /***/ (function(module, exports) { /** @@ -160626,7 +161562,7 @@ module.exports = Equals; /***/ }), -/* 1204 */ +/* 1210 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160661,7 +161597,7 @@ module.exports = Perimeter; /***/ }), -/* 1205 */ +/* 1211 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160671,7 +161607,7 @@ module.exports = Perimeter; */ var RotateAroundXY = __webpack_require__(219); -var InCenter = __webpack_require__(449); +var InCenter = __webpack_require__(451); /** * Rotates a Triangle about its incenter, which is the point at which its three angle bisectors meet. @@ -160697,7 +161633,7 @@ module.exports = Rotate; /***/ }), -/* 1206 */ +/* 1212 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160731,7 +161667,7 @@ module.exports = RotateAroundPoint; /***/ }), -/* 1207 */ +/* 1213 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160749,16 +161685,16 @@ var Extend = __webpack_require__(19); var Input = { - CreateInteractiveObject: __webpack_require__(450), + CreateInteractiveObject: __webpack_require__(452), Events: __webpack_require__(55), - Gamepad: __webpack_require__(1208), + Gamepad: __webpack_require__(1214), InputManager: __webpack_require__(365), - InputPlugin: __webpack_require__(1220), - InputPluginCache: __webpack_require__(138), - Keyboard: __webpack_require__(1222), - Mouse: __webpack_require__(1239), + InputPlugin: __webpack_require__(1226), + InputPluginCache: __webpack_require__(142), + Keyboard: __webpack_require__(1228), + Mouse: __webpack_require__(1245), Pointer: __webpack_require__(368), - Touch: __webpack_require__(1240) + Touch: __webpack_require__(1246) }; @@ -160769,7 +161705,7 @@ module.exports = Input; /***/ }), -/* 1208 */ +/* 1214 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160784,18 +161720,18 @@ module.exports = Input; module.exports = { - Axis: __webpack_require__(451), - Button: __webpack_require__(452), + Axis: __webpack_require__(453), + Button: __webpack_require__(454), Events: __webpack_require__(220), - Gamepad: __webpack_require__(453), - GamepadPlugin: __webpack_require__(1215), + Gamepad: __webpack_require__(455), + GamepadPlugin: __webpack_require__(1221), - Configs: __webpack_require__(1216) + Configs: __webpack_require__(1222) }; /***/ }), -/* 1209 */ +/* 1215 */ /***/ (function(module, exports) { /** @@ -160824,7 +161760,7 @@ module.exports = 'down'; /***/ }), -/* 1210 */ +/* 1216 */ /***/ (function(module, exports) { /** @@ -160853,7 +161789,7 @@ module.exports = 'up'; /***/ }), -/* 1211 */ +/* 1217 */ /***/ (function(module, exports) { /** @@ -160884,7 +161820,7 @@ module.exports = 'connected'; /***/ }), -/* 1212 */ +/* 1218 */ /***/ (function(module, exports) { /** @@ -160910,7 +161846,7 @@ module.exports = 'disconnected'; /***/ }), -/* 1213 */ +/* 1219 */ /***/ (function(module, exports) { /** @@ -160942,7 +161878,7 @@ module.exports = 'down'; /***/ }), -/* 1214 */ +/* 1220 */ /***/ (function(module, exports) { /** @@ -160974,7 +161910,7 @@ module.exports = 'up'; /***/ }), -/* 1215 */ +/* 1221 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160986,9 +161922,9 @@ module.exports = 'up'; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(11); var Events = __webpack_require__(220); -var Gamepad = __webpack_require__(453); +var Gamepad = __webpack_require__(455); var GetValue = __webpack_require__(6); -var InputPluginCache = __webpack_require__(138); +var InputPluginCache = __webpack_require__(142); var InputEvents = __webpack_require__(55); /** @@ -161612,7 +162548,7 @@ module.exports = GamepadPlugin; /***/ }), -/* 1216 */ +/* 1222 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161627,15 +162563,15 @@ module.exports = GamepadPlugin; module.exports = { - DUALSHOCK_4: __webpack_require__(1217), - SNES_USB: __webpack_require__(1218), - XBOX_360: __webpack_require__(1219) + DUALSHOCK_4: __webpack_require__(1223), + SNES_USB: __webpack_require__(1224), + XBOX_360: __webpack_require__(1225) }; /***/ }), -/* 1217 */ +/* 1223 */ /***/ (function(module, exports) { /** @@ -161685,7 +162621,7 @@ module.exports = { /***/ }), -/* 1218 */ +/* 1224 */ /***/ (function(module, exports) { /** @@ -161724,7 +162660,7 @@ module.exports = { /***/ }), -/* 1219 */ +/* 1225 */ /***/ (function(module, exports) { /** @@ -161775,7 +162711,7 @@ module.exports = { /***/ }), -/* 1220 */ +/* 1226 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161788,23 +162724,23 @@ var Circle = __webpack_require__(65); var CircleContains = __webpack_require__(56); var Class = __webpack_require__(0); var CONST = __webpack_require__(185); -var CreateInteractiveObject = __webpack_require__(450); -var CreatePixelPerfectHandler = __webpack_require__(1221); +var CreateInteractiveObject = __webpack_require__(452); +var CreatePixelPerfectHandler = __webpack_require__(1227); var DistanceBetween = __webpack_require__(54); var Ellipse = __webpack_require__(96); var EllipseContains = __webpack_require__(97); var Events = __webpack_require__(55); var EventEmitter = __webpack_require__(11); var GetFastValue = __webpack_require__(2); -var GEOM_CONST = __webpack_require__(47); -var InputPluginCache = __webpack_require__(138); +var GEOM_CONST = __webpack_require__(48); +var InputPluginCache = __webpack_require__(142); var IsPlainObject = __webpack_require__(7); var PluginCache = __webpack_require__(23); var Rectangle = __webpack_require__(9); -var RectangleContains = __webpack_require__(48); +var RectangleContains = __webpack_require__(49); var SceneEvents = __webpack_require__(22); var Triangle = __webpack_require__(71); -var TriangleContains = __webpack_require__(83); +var TriangleContains = __webpack_require__(84); /** * @classdesc @@ -164956,7 +165892,7 @@ module.exports = InputPlugin; /***/ }), -/* 1221 */ +/* 1227 */ /***/ (function(module, exports) { /** @@ -164992,7 +165928,7 @@ module.exports = CreatePixelPerfectHandler; /***/ }), -/* 1222 */ +/* 1228 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165007,26 +165943,26 @@ module.exports = CreatePixelPerfectHandler; module.exports = { - Events: __webpack_require__(139), + Events: __webpack_require__(143), KeyboardManager: __webpack_require__(366), - KeyboardPlugin: __webpack_require__(1230), + KeyboardPlugin: __webpack_require__(1236), - Key: __webpack_require__(454), - KeyCodes: __webpack_require__(126), + Key: __webpack_require__(456), + KeyCodes: __webpack_require__(130), - KeyCombo: __webpack_require__(455), + KeyCombo: __webpack_require__(457), - JustDown: __webpack_require__(1235), - JustUp: __webpack_require__(1236), - DownDuration: __webpack_require__(1237), - UpDuration: __webpack_require__(1238) + JustDown: __webpack_require__(1241), + JustUp: __webpack_require__(1242), + DownDuration: __webpack_require__(1243), + UpDuration: __webpack_require__(1244) }; /***/ }), -/* 1223 */ +/* 1229 */ /***/ (function(module, exports) { /** @@ -165062,7 +165998,7 @@ module.exports = 'keydown'; /***/ }), -/* 1224 */ +/* 1230 */ /***/ (function(module, exports) { /** @@ -165091,7 +166027,7 @@ module.exports = 'keyup'; /***/ }), -/* 1225 */ +/* 1231 */ /***/ (function(module, exports) { /** @@ -165125,7 +166061,7 @@ module.exports = 'keycombomatch'; /***/ }), -/* 1226 */ +/* 1232 */ /***/ (function(module, exports) { /** @@ -165159,7 +166095,7 @@ module.exports = 'down'; /***/ }), -/* 1227 */ +/* 1233 */ /***/ (function(module, exports) { /** @@ -165198,7 +166134,7 @@ module.exports = 'keydown-'; /***/ }), -/* 1228 */ +/* 1234 */ /***/ (function(module, exports) { /** @@ -165230,7 +166166,7 @@ module.exports = 'keyup-'; /***/ }), -/* 1229 */ +/* 1235 */ /***/ (function(module, exports) { /** @@ -165264,7 +166200,7 @@ module.exports = 'up'; /***/ }), -/* 1230 */ +/* 1236 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165275,16 +166211,16 @@ module.exports = 'up'; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(139); +var Events = __webpack_require__(143); var GameEvents = __webpack_require__(20); var GetValue = __webpack_require__(6); var InputEvents = __webpack_require__(55); -var InputPluginCache = __webpack_require__(138); -var Key = __webpack_require__(454); -var KeyCodes = __webpack_require__(126); -var KeyCombo = __webpack_require__(455); -var KeyMap = __webpack_require__(1234); -var SnapFloor = __webpack_require__(93); +var InputPluginCache = __webpack_require__(142); +var Key = __webpack_require__(456); +var KeyCodes = __webpack_require__(130); +var KeyCombo = __webpack_require__(457); +var KeyMap = __webpack_require__(1240); +var SnapFloor = __webpack_require__(94); /** * @classdesc @@ -166192,7 +167128,7 @@ module.exports = KeyboardPlugin; /***/ }), -/* 1231 */ +/* 1237 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166201,7 +167137,7 @@ module.exports = KeyboardPlugin; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AdvanceKeyCombo = __webpack_require__(1232); +var AdvanceKeyCombo = __webpack_require__(1238); /** * Used internally by the KeyCombo class. @@ -166273,7 +167209,7 @@ module.exports = ProcessKeyCombo; /***/ }), -/* 1232 */ +/* 1238 */ /***/ (function(module, exports) { /** @@ -166315,7 +167251,7 @@ module.exports = AdvanceKeyCombo; /***/ }), -/* 1233 */ +/* 1239 */ /***/ (function(module, exports) { /** @@ -166350,7 +167286,7 @@ module.exports = ResetKeyCombo; /***/ }), -/* 1234 */ +/* 1240 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166359,7 +167295,7 @@ module.exports = ResetKeyCombo; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var KeyCodes = __webpack_require__(126); +var KeyCodes = __webpack_require__(130); var KeyMap = {}; @@ -166372,7 +167308,7 @@ module.exports = KeyMap; /***/ }), -/* 1235 */ +/* 1241 */ /***/ (function(module, exports) { /** @@ -166414,7 +167350,7 @@ module.exports = JustDown; /***/ }), -/* 1236 */ +/* 1242 */ /***/ (function(module, exports) { /** @@ -166456,7 +167392,7 @@ module.exports = JustUp; /***/ }), -/* 1237 */ +/* 1243 */ /***/ (function(module, exports) { /** @@ -166490,7 +167426,7 @@ module.exports = DownDuration; /***/ }), -/* 1238 */ +/* 1244 */ /***/ (function(module, exports) { /** @@ -166524,7 +167460,7 @@ module.exports = UpDuration; /***/ }), -/* 1239 */ +/* 1245 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166547,7 +167483,7 @@ module.exports = { /***/ }), -/* 1240 */ +/* 1246 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166570,7 +167506,7 @@ module.exports = { /***/ }), -/* 1241 */ +/* 1247 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166588,18 +167524,18 @@ var Extend = __webpack_require__(19); var Loader = { - Events: __webpack_require__(82), + Events: __webpack_require__(83), - FileTypes: __webpack_require__(1242), + FileTypes: __webpack_require__(1248), File: __webpack_require__(21), FileTypesManager: __webpack_require__(8), - GetURL: __webpack_require__(140), - LoaderPlugin: __webpack_require__(1266), + GetURL: __webpack_require__(144), + LoaderPlugin: __webpack_require__(1272), MergeXHRSettings: __webpack_require__(221), MultiFile: __webpack_require__(61), - XHRLoader: __webpack_require__(456), - XHRSettings: __webpack_require__(141) + XHRLoader: __webpack_require__(458), + XHRSettings: __webpack_require__(145) }; @@ -166610,7 +167546,7 @@ module.exports = Loader; /***/ }), -/* 1242 */ +/* 1248 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166625,42 +167561,42 @@ module.exports = Loader; module.exports = { - AnimationJSONFile: __webpack_require__(1243), - AtlasJSONFile: __webpack_require__(1244), - AtlasXMLFile: __webpack_require__(1245), - AudioFile: __webpack_require__(457), - AudioSpriteFile: __webpack_require__(1246), - BinaryFile: __webpack_require__(1247), - BitmapFontFile: __webpack_require__(1248), - CSSFile: __webpack_require__(1249), - GLSLFile: __webpack_require__(1250), - HTML5AudioFile: __webpack_require__(458), - HTMLFile: __webpack_require__(1251), - HTMLTextureFile: __webpack_require__(1252), + AnimationJSONFile: __webpack_require__(1249), + AtlasJSONFile: __webpack_require__(1250), + AtlasXMLFile: __webpack_require__(1251), + AudioFile: __webpack_require__(459), + AudioSpriteFile: __webpack_require__(1252), + BinaryFile: __webpack_require__(1253), + BitmapFontFile: __webpack_require__(1254), + CSSFile: __webpack_require__(1255), + GLSLFile: __webpack_require__(1256), + HTML5AudioFile: __webpack_require__(460), + HTMLFile: __webpack_require__(1257), + HTMLTextureFile: __webpack_require__(1258), ImageFile: __webpack_require__(72), JSONFile: __webpack_require__(60), - MultiAtlasFile: __webpack_require__(1253), - MultiScriptFile: __webpack_require__(1254), - PackFile: __webpack_require__(1255), - PluginFile: __webpack_require__(1256), - SceneFile: __webpack_require__(1257), - ScenePluginFile: __webpack_require__(1258), - ScriptFile: __webpack_require__(459), - SpriteSheetFile: __webpack_require__(1259), - SVGFile: __webpack_require__(1260), - TextFile: __webpack_require__(460), - TilemapCSVFile: __webpack_require__(1261), - TilemapImpactFile: __webpack_require__(1262), - TilemapJSONFile: __webpack_require__(1263), - UnityAtlasFile: __webpack_require__(1264), - VideoFile: __webpack_require__(1265), + MultiAtlasFile: __webpack_require__(1259), + MultiScriptFile: __webpack_require__(1260), + PackFile: __webpack_require__(1261), + PluginFile: __webpack_require__(1262), + SceneFile: __webpack_require__(1263), + ScenePluginFile: __webpack_require__(1264), + ScriptFile: __webpack_require__(461), + SpriteSheetFile: __webpack_require__(1265), + SVGFile: __webpack_require__(1266), + TextFile: __webpack_require__(462), + TilemapCSVFile: __webpack_require__(1267), + TilemapImpactFile: __webpack_require__(1268), + TilemapJSONFile: __webpack_require__(1269), + UnityAtlasFile: __webpack_require__(1270), + VideoFile: __webpack_require__(1271), XMLFile: __webpack_require__(222) }; /***/ }), -/* 1243 */ +/* 1249 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166672,7 +167608,7 @@ module.exports = { var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var JSONFile = __webpack_require__(60); -var LoaderEvents = __webpack_require__(82); +var LoaderEvents = __webpack_require__(83); /** * @classdesc @@ -166861,7 +167797,7 @@ module.exports = AnimationJSONFile; /***/ }), -/* 1244 */ +/* 1250 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167110,7 +168046,7 @@ module.exports = AtlasJSONFile; /***/ }), -/* 1245 */ +/* 1251 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167353,7 +168289,7 @@ module.exports = AtlasXMLFile; /***/ }), -/* 1246 */ +/* 1252 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167362,7 +168298,7 @@ module.exports = AtlasXMLFile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AudioFile = __webpack_require__(457); +var AudioFile = __webpack_require__(459); var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); @@ -167643,7 +168579,7 @@ FileTypesManager.register('audioSprite', function (key, jsonURL, audioURL, audio /***/ }), -/* 1247 */ +/* 1253 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167825,7 +168761,7 @@ module.exports = BinaryFile; /***/ }), -/* 1248 */ +/* 1254 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168072,7 +169008,7 @@ module.exports = BitmapFontFile; /***/ }), -/* 1249 */ +/* 1255 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168240,7 +169176,7 @@ module.exports = CSSFile; /***/ }), -/* 1250 */ +/* 1256 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168651,7 +169587,7 @@ module.exports = GLSLFile; /***/ }), -/* 1251 */ +/* 1257 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168826,7 +169762,7 @@ module.exports = HTMLFile; /***/ }), -/* 1252 */ +/* 1258 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -169084,7 +170020,7 @@ module.exports = HTMLTextureFile; /***/ }), -/* 1253 */ +/* 1259 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -169417,7 +170353,7 @@ module.exports = MultiAtlasFile; /***/ }), -/* 1254 */ +/* 1260 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -169431,7 +170367,7 @@ var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); var MultiFile = __webpack_require__(61); -var ScriptFile = __webpack_require__(459); +var ScriptFile = __webpack_require__(461); /** * @classdesc @@ -169634,7 +170570,7 @@ module.exports = MultiScriptFile; /***/ }), -/* 1255 */ +/* 1261 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -169852,7 +170788,7 @@ module.exports = PackFile; /***/ }), -/* 1256 */ +/* 1262 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170064,7 +171000,7 @@ module.exports = PluginFile; /***/ }), -/* 1257 */ +/* 1263 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170285,7 +171221,7 @@ module.exports = SceneFile; /***/ }), -/* 1258 */ +/* 1264 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170491,7 +171427,7 @@ module.exports = ScenePluginFile; /***/ }), -/* 1259 */ +/* 1265 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170682,7 +171618,7 @@ module.exports = SpriteSheetFile; /***/ }), -/* 1260 */ +/* 1266 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171021,7 +171957,7 @@ module.exports = SVGFile; /***/ }), -/* 1261 */ +/* 1267 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171216,7 +172152,7 @@ module.exports = TilemapCSVFile; /***/ }), -/* 1262 */ +/* 1268 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171372,7 +172308,7 @@ module.exports = TilemapImpactFile; /***/ }), -/* 1263 */ +/* 1269 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171528,7 +172464,7 @@ module.exports = TilemapJSONFile; /***/ }), -/* 1264 */ +/* 1270 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171543,7 +172479,7 @@ var GetFastValue = __webpack_require__(2); var ImageFile = __webpack_require__(72); var IsPlainObject = __webpack_require__(7); var MultiFile = __webpack_require__(61); -var TextFile = __webpack_require__(460); +var TextFile = __webpack_require__(462); /** * @classdesc @@ -171770,7 +172706,7 @@ module.exports = UnityAtlasFile; /***/ }), -/* 1265 */ +/* 1271 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171783,7 +172719,7 @@ var Class = __webpack_require__(0); var CONST = __webpack_require__(18); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); -var GetURL = __webpack_require__(140); +var GetURL = __webpack_require__(144); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -172164,7 +173100,7 @@ module.exports = VideoFile; /***/ }), -/* 1266 */ +/* 1272 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172175,14 +173111,14 @@ module.exports = VideoFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var CustomSet = __webpack_require__(135); +var CustomSet = __webpack_require__(139); var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(82); +var Events = __webpack_require__(83); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var PluginCache = __webpack_require__(23); var SceneEvents = __webpack_require__(22); -var XHRSettings = __webpack_require__(141); +var XHRSettings = __webpack_require__(145); /** * @classdesc @@ -173247,7 +174183,7 @@ module.exports = LoaderPlugin; /***/ }), -/* 1267 */ +/* 1273 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173265,18 +174201,18 @@ var Extend = __webpack_require__(19); var Arcade = { - ArcadePhysics: __webpack_require__(1268), - Body: __webpack_require__(467), - Collider: __webpack_require__(468), + ArcadePhysics: __webpack_require__(1274), + Body: __webpack_require__(469), + Collider: __webpack_require__(470), Components: __webpack_require__(223), Events: __webpack_require__(224), - Factory: __webpack_require__(461), - Group: __webpack_require__(463), - Image: __webpack_require__(462), - Sprite: __webpack_require__(142), - StaticBody: __webpack_require__(473), - StaticGroup: __webpack_require__(464), - World: __webpack_require__(466) + Factory: __webpack_require__(463), + Group: __webpack_require__(465), + Image: __webpack_require__(464), + Sprite: __webpack_require__(146), + StaticBody: __webpack_require__(475), + StaticGroup: __webpack_require__(466), + World: __webpack_require__(468) }; @@ -173287,7 +174223,7 @@ module.exports = Arcade; /***/ }), -/* 1268 */ +/* 1274 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173297,18 +174233,18 @@ module.exports = Arcade; */ var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(39); +var DegToRad = __webpack_require__(40); var DistanceBetween = __webpack_require__(54); var DistanceSquared = __webpack_require__(325); -var Factory = __webpack_require__(461); +var Factory = __webpack_require__(463); var GetFastValue = __webpack_require__(2); -var Merge = __webpack_require__(128); -var OverlapCirc = __webpack_require__(1281); -var OverlapRect = __webpack_require__(465); +var Merge = __webpack_require__(132); +var OverlapCirc = __webpack_require__(1287); +var OverlapRect = __webpack_require__(467); var PluginCache = __webpack_require__(23); var SceneEvents = __webpack_require__(22); var Vector2 = __webpack_require__(3); -var World = __webpack_require__(466); +var World = __webpack_require__(468); /** * @classdesc @@ -173976,7 +174912,7 @@ module.exports = ArcadePhysics; /***/ }), -/* 1269 */ +/* 1275 */ /***/ (function(module, exports) { /** @@ -174051,7 +174987,7 @@ module.exports = Acceleration; /***/ }), -/* 1270 */ +/* 1276 */ /***/ (function(module, exports) { /** @@ -174133,7 +175069,7 @@ module.exports = Angular; /***/ }), -/* 1271 */ +/* 1277 */ /***/ (function(module, exports) { /** @@ -174232,7 +175168,7 @@ module.exports = Bounce; /***/ }), -/* 1272 */ +/* 1278 */ /***/ (function(module, exports) { /** @@ -174359,7 +175295,7 @@ module.exports = Debug; /***/ }), -/* 1273 */ +/* 1279 */ /***/ (function(module, exports) { /** @@ -174492,7 +175428,7 @@ module.exports = Drag; /***/ }), -/* 1274 */ +/* 1280 */ /***/ (function(module, exports) { /** @@ -174616,7 +175552,7 @@ module.exports = Enable; /***/ }), -/* 1275 */ +/* 1281 */ /***/ (function(module, exports) { /** @@ -174704,7 +175640,7 @@ module.exports = Friction; /***/ }), -/* 1276 */ +/* 1282 */ /***/ (function(module, exports) { /** @@ -174782,7 +175718,7 @@ module.exports = Gravity; /***/ }), -/* 1277 */ +/* 1283 */ /***/ (function(module, exports) { /** @@ -174824,7 +175760,7 @@ module.exports = Immovable; /***/ }), -/* 1278 */ +/* 1284 */ /***/ (function(module, exports) { /** @@ -174864,7 +175800,7 @@ module.exports = Mass; /***/ }), -/* 1279 */ +/* 1285 */ /***/ (function(module, exports) { /** @@ -174967,7 +175903,7 @@ module.exports = Size; /***/ }), -/* 1280 */ +/* 1286 */ /***/ (function(module, exports) { /** @@ -175066,10 +176002,10 @@ module.exports = Velocity; /***/ }), -/* 1281 */ +/* 1287 */ /***/ (function(module, exports, __webpack_require__) { -var OverlapRect = __webpack_require__(465); +var OverlapRect = __webpack_require__(467); var Circle = __webpack_require__(65); var CircleToCircle = __webpack_require__(211); var CircleToRectangle = __webpack_require__(212); @@ -175134,7 +176070,7 @@ module.exports = OverlapCirc; /***/ }), -/* 1282 */ +/* 1288 */ /***/ (function(module, exports) { /** @@ -175167,7 +176103,7 @@ module.exports = 'collide'; /***/ }), -/* 1283 */ +/* 1289 */ /***/ (function(module, exports) { /** @@ -175200,7 +176136,7 @@ module.exports = 'overlap'; /***/ }), -/* 1284 */ +/* 1290 */ /***/ (function(module, exports) { /** @@ -175223,7 +176159,7 @@ module.exports = 'pause'; /***/ }), -/* 1285 */ +/* 1291 */ /***/ (function(module, exports) { /** @@ -175246,7 +176182,7 @@ module.exports = 'resume'; /***/ }), -/* 1286 */ +/* 1292 */ /***/ (function(module, exports) { /** @@ -175278,7 +176214,7 @@ module.exports = 'tilecollide'; /***/ }), -/* 1287 */ +/* 1293 */ /***/ (function(module, exports) { /** @@ -175310,7 +176246,7 @@ module.exports = 'tileoverlap'; /***/ }), -/* 1288 */ +/* 1294 */ /***/ (function(module, exports) { /** @@ -175342,7 +176278,7 @@ module.exports = 'worldbounds'; /***/ }), -/* 1289 */ +/* 1295 */ /***/ (function(module, exports) { /** @@ -175368,7 +176304,7 @@ module.exports = 'worldstep'; /***/ }), -/* 1290 */ +/* 1296 */ /***/ (function(module, exports) { /** @@ -175409,7 +176345,7 @@ module.exports = ProcessTileCallbacks; /***/ }), -/* 1291 */ +/* 1297 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -175418,9 +176354,9 @@ module.exports = ProcessTileCallbacks; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileCheckX = __webpack_require__(1292); -var TileCheckY = __webpack_require__(1294); -var TileIntersectsBody = __webpack_require__(472); +var TileCheckX = __webpack_require__(1298); +var TileCheckY = __webpack_require__(1300); +var TileIntersectsBody = __webpack_require__(474); /** * The core separation function to separate a physics body and a tile. @@ -175529,7 +176465,7 @@ module.exports = SeparateTile; /***/ }), -/* 1292 */ +/* 1298 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -175538,7 +176474,7 @@ module.exports = SeparateTile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ProcessTileSeparationX = __webpack_require__(1293); +var ProcessTileSeparationX = __webpack_require__(1299); /** * Check the body against the given tile on the X axis. @@ -175619,7 +176555,7 @@ module.exports = TileCheckX; /***/ }), -/* 1293 */ +/* 1299 */ /***/ (function(module, exports) { /** @@ -175666,7 +176602,7 @@ module.exports = ProcessTileSeparationX; /***/ }), -/* 1294 */ +/* 1300 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -175675,7 +176611,7 @@ module.exports = ProcessTileSeparationX; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ProcessTileSeparationY = __webpack_require__(1295); +var ProcessTileSeparationY = __webpack_require__(1301); /** * Check the body against the given tile on the Y axis. @@ -175756,7 +176692,7 @@ module.exports = TileCheckY; /***/ }), -/* 1295 */ +/* 1301 */ /***/ (function(module, exports) { /** @@ -175803,7 +176739,7 @@ module.exports = ProcessTileSeparationY; /***/ }), -/* 1296 */ +/* 1302 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -175812,7 +176748,7 @@ module.exports = ProcessTileSeparationY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetOverlapX = __webpack_require__(469); +var GetOverlapX = __webpack_require__(471); /** * Separates two overlapping bodies on the X-axis (horizontally). @@ -175896,7 +176832,7 @@ module.exports = SeparateX; /***/ }), -/* 1297 */ +/* 1303 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -175905,7 +176841,7 @@ module.exports = SeparateX; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetOverlapY = __webpack_require__(470); +var GetOverlapY = __webpack_require__(472); /** * Separates two overlapping bodies on the Y-axis (vertically). @@ -175989,19 +176925,19 @@ module.exports = SeparateY; /***/ }), -/* 1298 */, -/* 1299 */, -/* 1300 */, -/* 1301 */, -/* 1302 */, -/* 1303 */, /* 1304 */, /* 1305 */, /* 1306 */, /* 1307 */, /* 1308 */, /* 1309 */, -/* 1310 */ +/* 1310 */, +/* 1311 */, +/* 1312 */, +/* 1313 */, +/* 1314 */, +/* 1315 */, +/* 1316 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -176016,17 +176952,17 @@ module.exports = SeparateY; module.exports = { - BasePlugin: __webpack_require__(475), + BasePlugin: __webpack_require__(477), DefaultPlugins: __webpack_require__(180), PluginCache: __webpack_require__(23), PluginManager: __webpack_require__(370), - ScenePlugin: __webpack_require__(1311) + ScenePlugin: __webpack_require__(1317) }; /***/ }), -/* 1311 */ +/* 1317 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -176035,7 +176971,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ -var BasePlugin = __webpack_require__(475); +var BasePlugin = __webpack_require__(477); var Class = __webpack_require__(0); var SceneEvents = __webpack_require__(22); @@ -176154,7 +177090,7 @@ module.exports = ScenePlugin; /***/ }), -/* 1312 */ +/* 1318 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -176193,7 +177129,7 @@ var CONST = __webpack_require__(183); var Scale = { Center: __webpack_require__(359), - Events: __webpack_require__(92), + Events: __webpack_require__(93), Orientation: __webpack_require__(360), ScaleManager: __webpack_require__(371), ScaleModes: __webpack_require__(361), @@ -176210,7 +177146,7 @@ module.exports = Scale; /***/ }), -/* 1313 */ +/* 1319 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -176219,7 +177155,7 @@ module.exports = Scale; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(127); +var CONST = __webpack_require__(131); var Extend = __webpack_require__(19); /** @@ -176230,7 +177166,7 @@ var Scene = { Events: __webpack_require__(22), SceneManager: __webpack_require__(373), - ScenePlugin: __webpack_require__(1314), + ScenePlugin: __webpack_require__(1320), Settings: __webpack_require__(375), Systems: __webpack_require__(186) @@ -176243,7 +177179,7 @@ module.exports = Scene; /***/ }), -/* 1314 */ +/* 1320 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177253,7 +178189,7 @@ module.exports = ScenePlugin; /***/ }), -/* 1315 */ +/* 1321 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177268,18 +178204,18 @@ module.exports = ScenePlugin; module.exports = { - List: __webpack_require__(131), - Map: __webpack_require__(167), + List: __webpack_require__(135), + Map: __webpack_require__(168), ProcessQueue: __webpack_require__(192), - RTree: __webpack_require__(471), - Set: __webpack_require__(135), + RTree: __webpack_require__(473), + Set: __webpack_require__(139), Size: __webpack_require__(372) }; /***/ }), -/* 1316 */ +/* 1322 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177289,7 +178225,7 @@ module.exports = { */ var Extend = __webpack_require__(19); -var FilterMode = __webpack_require__(1317); +var FilterMode = __webpack_require__(1323); /** * @namespace Phaser.Textures @@ -177316,7 +178252,7 @@ var FilterMode = __webpack_require__(1317); var Textures = { CanvasTexture: __webpack_require__(377), - Events: __webpack_require__(123), + Events: __webpack_require__(127), FilterMode: FilterMode, Frame: __webpack_require__(95), Parsers: __webpack_require__(379), @@ -177332,7 +178268,7 @@ module.exports = Textures; /***/ }), -/* 1317 */ +/* 1323 */ /***/ (function(module, exports) { /** @@ -177376,7 +178312,7 @@ module.exports = CONST; /***/ }), -/* 1318 */ +/* 1324 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177391,30 +178327,30 @@ module.exports = CONST; module.exports = { - Components: __webpack_require__(143), - Parsers: __webpack_require__(1348), + Components: __webpack_require__(147), + Parsers: __webpack_require__(1354), Formats: __webpack_require__(32), - ImageCollection: __webpack_require__(486), + ImageCollection: __webpack_require__(488), ParseToTilemap: __webpack_require__(233), Tile: __webpack_require__(74), - Tilemap: __webpack_require__(495), - TilemapCreator: __webpack_require__(1362), - TilemapFactory: __webpack_require__(1363), + Tilemap: __webpack_require__(497), + TilemapCreator: __webpack_require__(1368), + TilemapFactory: __webpack_require__(1369), Tileset: __webpack_require__(105), LayerData: __webpack_require__(103), MapData: __webpack_require__(104), - ObjectLayer: __webpack_require__(489), + ObjectLayer: __webpack_require__(491), - DynamicTilemapLayer: __webpack_require__(496), - StaticTilemapLayer: __webpack_require__(497) + DynamicTilemapLayer: __webpack_require__(498), + StaticTilemapLayer: __webpack_require__(499) }; /***/ }), -/* 1319 */ +/* 1325 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177479,7 +178415,7 @@ module.exports = Copy; /***/ }), -/* 1320 */ +/* 1326 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177488,10 +178424,10 @@ module.exports = Copy; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileToWorldX = __webpack_require__(145); -var TileToWorldY = __webpack_require__(146); +var TileToWorldX = __webpack_require__(149); +var TileToWorldY = __webpack_require__(150); var GetTilesWithin = __webpack_require__(24); -var ReplaceByIndex = __webpack_require__(476); +var ReplaceByIndex = __webpack_require__(478); /** * Creates a Sprite for every object matching the given tile indexes in the layer. You can @@ -177564,7 +178500,7 @@ module.exports = CreateFromTiles; /***/ }), -/* 1321 */ +/* 1327 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177573,7 +178509,7 @@ module.exports = CreateFromTiles; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SnapFloor = __webpack_require__(93); +var SnapFloor = __webpack_require__(94); var SnapCeil = __webpack_require__(334); /** @@ -177721,7 +178657,7 @@ module.exports = CullTiles; /***/ }), -/* 1322 */ +/* 1328 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177775,7 +178711,7 @@ module.exports = Fill; /***/ }), -/* 1323 */ +/* 1329 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177823,7 +178759,7 @@ module.exports = FilterTiles; /***/ }), -/* 1324 */ +/* 1330 */ /***/ (function(module, exports) { /** @@ -177911,7 +178847,7 @@ module.exports = FindByIndex; /***/ }), -/* 1325 */ +/* 1331 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177965,7 +178901,7 @@ module.exports = FindTile; /***/ }), -/* 1326 */ +/* 1332 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178015,7 +178951,7 @@ module.exports = ForEachTile; /***/ }), -/* 1327 */ +/* 1333 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178024,7 +178960,7 @@ module.exports = ForEachTile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(144); +var GetTileAt = __webpack_require__(148); var WorldToTileX = __webpack_require__(63); var WorldToTileY = __webpack_require__(64); @@ -178056,7 +178992,7 @@ module.exports = GetTileAtWorldXY; /***/ }), -/* 1328 */ +/* 1334 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178069,8 +179005,8 @@ var Geom = __webpack_require__(430); var GetTilesWithin = __webpack_require__(24); var Intersects = __webpack_require__(431); var NOOP = __webpack_require__(1); -var TileToWorldX = __webpack_require__(145); -var TileToWorldY = __webpack_require__(146); +var TileToWorldX = __webpack_require__(149); +var TileToWorldY = __webpack_require__(150); var WorldToTileX = __webpack_require__(63); var WorldToTileY = __webpack_require__(64); @@ -178153,7 +179089,7 @@ module.exports = GetTilesWithinShape; /***/ }), -/* 1329 */ +/* 1335 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178203,7 +179139,7 @@ module.exports = GetTilesWithinWorldXY; /***/ }), -/* 1330 */ +/* 1336 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178212,7 +179148,7 @@ module.exports = GetTilesWithinWorldXY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HasTileAt = __webpack_require__(477); +var HasTileAt = __webpack_require__(479); var WorldToTileX = __webpack_require__(63); var WorldToTileY = __webpack_require__(64); @@ -178243,7 +179179,7 @@ module.exports = HasTileAtWorldXY; /***/ }), -/* 1331 */ +/* 1337 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178286,7 +179222,7 @@ module.exports = PutTileAtWorldXY; /***/ }), -/* 1332 */ +/* 1338 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178350,7 +179286,7 @@ module.exports = PutTilesAt; /***/ }), -/* 1333 */ +/* 1339 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178408,7 +179344,7 @@ module.exports = Randomize; /***/ }), -/* 1334 */ +/* 1340 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178417,7 +179353,7 @@ module.exports = Randomize; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RemoveTileAt = __webpack_require__(478); +var RemoveTileAt = __webpack_require__(480); var WorldToTileX = __webpack_require__(63); var WorldToTileY = __webpack_require__(64); @@ -178449,7 +179385,7 @@ module.exports = RemoveTileAtWorldXY; /***/ }), -/* 1335 */ +/* 1341 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178538,7 +179474,7 @@ module.exports = RenderDebug; /***/ }), -/* 1336 */ +/* 1342 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178607,7 +179543,7 @@ module.exports = SetCollision; /***/ }), -/* 1337 */ +/* 1343 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178682,7 +179618,7 @@ module.exports = SetCollisionBetween; /***/ }), -/* 1338 */ +/* 1344 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178739,7 +179675,7 @@ module.exports = SetCollisionByExclusion; /***/ }), -/* 1339 */ +/* 1345 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178750,7 +179686,7 @@ module.exports = SetCollisionByExclusion; var SetTileCollision = __webpack_require__(73); var CalculateFacesWithin = __webpack_require__(52); -var HasValue = __webpack_require__(109); +var HasValue = __webpack_require__(112); /** * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property @@ -178814,7 +179750,7 @@ module.exports = SetCollisionByProperty; /***/ }), -/* 1340 */ +/* 1346 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178874,7 +179810,7 @@ module.exports = SetCollisionFromCollisionGroup; /***/ }), -/* 1341 */ +/* 1347 */ /***/ (function(module, exports) { /** @@ -178921,7 +179857,7 @@ module.exports = SetTileIndexCallback; /***/ }), -/* 1342 */ +/* 1348 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178964,7 +179900,7 @@ module.exports = SetTileLocationCallback; /***/ }), -/* 1343 */ +/* 1349 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178974,7 +179910,7 @@ module.exports = SetTileLocationCallback; */ var GetTilesWithin = __webpack_require__(24); -var ShuffleArray = __webpack_require__(116); +var ShuffleArray = __webpack_require__(119); /** * Shuffles the tiles in a rectangular region (specified in tile coordinates) within the given @@ -179009,7 +179945,7 @@ module.exports = Shuffle; /***/ }), -/* 1344 */ +/* 1350 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179060,7 +179996,7 @@ module.exports = SwapByIndex; /***/ }), -/* 1345 */ +/* 1351 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179069,8 +180005,8 @@ module.exports = SwapByIndex; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileToWorldX = __webpack_require__(145); -var TileToWorldY = __webpack_require__(146); +var TileToWorldX = __webpack_require__(149); +var TileToWorldY = __webpack_require__(150); var Vector2 = __webpack_require__(3); /** @@ -179104,7 +180040,7 @@ module.exports = TileToWorldXY; /***/ }), -/* 1346 */ +/* 1352 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179184,7 +180120,7 @@ module.exports = WeightedRandomize; /***/ }), -/* 1347 */ +/* 1353 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179229,7 +180165,7 @@ module.exports = WorldToTileXY; /***/ }), -/* 1348 */ +/* 1354 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179244,18 +180180,18 @@ module.exports = WorldToTileXY; module.exports = { - Parse: __webpack_require__(479), + Parse: __webpack_require__(481), Parse2DArray: __webpack_require__(229), - ParseCSV: __webpack_require__(480), + ParseCSV: __webpack_require__(482), - Impact: __webpack_require__(1349), - Tiled: __webpack_require__(1350) + Impact: __webpack_require__(1355), + Tiled: __webpack_require__(1356) }; /***/ }), -/* 1349 */ +/* 1355 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179270,15 +180206,15 @@ module.exports = { module.exports = { - ParseTileLayers: __webpack_require__(493), - ParseTilesets: __webpack_require__(494), - ParseWeltmeister: __webpack_require__(492) + ParseTileLayers: __webpack_require__(495), + ParseTilesets: __webpack_require__(496), + ParseWeltmeister: __webpack_require__(494) }; /***/ }), -/* 1350 */ +/* 1356 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179293,22 +180229,22 @@ module.exports = { module.exports = { - AssignTileProperties: __webpack_require__(491), - Base64Decode: __webpack_require__(483), - BuildTilesetIndex: __webpack_require__(490), + AssignTileProperties: __webpack_require__(493), + Base64Decode: __webpack_require__(485), + BuildTilesetIndex: __webpack_require__(492), ParseGID: __webpack_require__(230), - ParseImageLayers: __webpack_require__(484), - ParseJSONTiled: __webpack_require__(481), + ParseImageLayers: __webpack_require__(486), + ParseJSONTiled: __webpack_require__(483), ParseObject: __webpack_require__(232), - ParseObjectLayers: __webpack_require__(488), - ParseTileLayers: __webpack_require__(482), - ParseTilesets: __webpack_require__(485) + ParseObjectLayers: __webpack_require__(490), + ParseTileLayers: __webpack_require__(484), + ParseTilesets: __webpack_require__(487) }; /***/ }), -/* 1351 */ +/* 1357 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179322,12 +180258,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1352); + renderWebGL = __webpack_require__(1358); } if (true) { - renderCanvas = __webpack_require__(1353); + renderCanvas = __webpack_require__(1359); } module.exports = { @@ -179339,7 +180275,7 @@ module.exports = { /***/ }), -/* 1352 */ +/* 1358 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179460,7 +180396,7 @@ module.exports = DynamicTilemapLayerWebGLRenderer; /***/ }), -/* 1353 */ +/* 1359 */ /***/ (function(module, exports) { /** @@ -179592,7 +180528,7 @@ module.exports = DynamicTilemapLayerCanvasRenderer; /***/ }), -/* 1354 */ +/* 1360 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179606,12 +180542,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1355); + renderWebGL = __webpack_require__(1361); } if (true) { - renderCanvas = __webpack_require__(1361); + renderCanvas = __webpack_require__(1367); } module.exports = { @@ -179623,7 +180559,7 @@ module.exports = { /***/ }), -/* 1355 */ +/* 1361 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179632,10 +180568,10 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Identity = __webpack_require__(1356); -var Scale = __webpack_require__(1358); -var Translate = __webpack_require__(1359); -var ViewLoad2D = __webpack_require__(1360); +var Identity = __webpack_require__(1362); +var Scale = __webpack_require__(1364); +var Translate = __webpack_require__(1365); +var ViewLoad2D = __webpack_require__(1366); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -179718,7 +180654,7 @@ module.exports = StaticTilemapLayerWebGLRenderer; /***/ }), -/* 1356 */ +/* 1362 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179727,7 +180663,7 @@ module.exports = StaticTilemapLayerWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetIdentity = __webpack_require__(1357); +var SetIdentity = __webpack_require__(1363); /** * Loads an identity matrix into the model matrix. @@ -179752,7 +180688,7 @@ module.exports = Identity; /***/ }), -/* 1357 */ +/* 1363 */ /***/ (function(module, exports) { /** @@ -179793,7 +180729,7 @@ module.exports = SetIdentity; /***/ }), -/* 1358 */ +/* 1364 */ /***/ (function(module, exports) { /** @@ -179841,7 +180777,7 @@ module.exports = Scale; /***/ }), -/* 1359 */ +/* 1365 */ /***/ (function(module, exports) { /** @@ -179881,7 +180817,7 @@ module.exports = Translate; /***/ }), -/* 1360 */ +/* 1366 */ /***/ (function(module, exports) { /** @@ -179931,7 +180867,7 @@ module.exports = ViewLoad2D; /***/ }), -/* 1361 */ +/* 1367 */ /***/ (function(module, exports) { /** @@ -180065,7 +181001,7 @@ module.exports = StaticTilemapLayerCanvasRenderer; /***/ }), -/* 1362 */ +/* 1368 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180109,7 +181045,7 @@ GameObjectCreator.register('tilemap', function (config) /***/ }), -/* 1363 */ +/* 1369 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180175,7 +181111,7 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt /***/ }), -/* 1364 */ +/* 1370 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180190,14 +181126,14 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt module.exports = { - Clock: __webpack_require__(1365), - TimerEvent: __webpack_require__(498) + Clock: __webpack_require__(1371), + TimerEvent: __webpack_require__(500) }; /***/ }), -/* 1365 */ +/* 1371 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180209,7 +181145,7 @@ module.exports = { var Class = __webpack_require__(0); var PluginCache = __webpack_require__(23); var SceneEvents = __webpack_require__(22); -var TimerEvent = __webpack_require__(498); +var TimerEvent = __webpack_require__(500); /** * @classdesc @@ -180603,7 +181539,7 @@ module.exports = Clock; /***/ }), -/* 1366 */ +/* 1372 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180612,7 +181548,7 @@ module.exports = Clock; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(89); +var CONST = __webpack_require__(90); var Extend = __webpack_require__(19); /** @@ -180621,13 +181557,13 @@ var Extend = __webpack_require__(19); var Tweens = { - Builders: __webpack_require__(1367), + Builders: __webpack_require__(1373), Events: __webpack_require__(238), - TweenManager: __webpack_require__(1383), + TweenManager: __webpack_require__(1389), Tween: __webpack_require__(237), TweenData: __webpack_require__(239), - Timeline: __webpack_require__(504) + Timeline: __webpack_require__(506) }; @@ -180638,7 +181574,7 @@ module.exports = Tweens; /***/ }), -/* 1367 */ +/* 1373 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180653,23 +181589,23 @@ module.exports = Tweens; module.exports = { - GetBoolean: __webpack_require__(88), + GetBoolean: __webpack_require__(89), GetEaseFunction: __webpack_require__(69), - GetNewValue: __webpack_require__(147), - GetProps: __webpack_require__(499), + GetNewValue: __webpack_require__(151), + GetProps: __webpack_require__(501), GetTargets: __webpack_require__(234), - GetTweens: __webpack_require__(500), + GetTweens: __webpack_require__(502), GetValueOp: __webpack_require__(235), - NumberTweenBuilder: __webpack_require__(501), - StaggerBuilder: __webpack_require__(502), - TimelineBuilder: __webpack_require__(503), - TweenBuilder: __webpack_require__(148) + NumberTweenBuilder: __webpack_require__(503), + StaggerBuilder: __webpack_require__(504), + TimelineBuilder: __webpack_require__(505), + TweenBuilder: __webpack_require__(152) }; /***/ }), -/* 1368 */ +/* 1374 */ /***/ (function(module, exports) { /** @@ -180747,7 +181683,7 @@ module.exports = [ /***/ }), -/* 1369 */ +/* 1375 */ /***/ (function(module, exports) { /** @@ -180783,7 +181719,7 @@ module.exports = 'complete'; /***/ }), -/* 1370 */ +/* 1376 */ /***/ (function(module, exports) { /** @@ -180820,7 +181756,7 @@ module.exports = 'loop'; /***/ }), -/* 1371 */ +/* 1377 */ /***/ (function(module, exports) { /** @@ -180857,7 +181793,7 @@ module.exports = 'pause'; /***/ }), -/* 1372 */ +/* 1378 */ /***/ (function(module, exports) { /** @@ -180894,7 +181830,7 @@ module.exports = 'resume'; /***/ }), -/* 1373 */ +/* 1379 */ /***/ (function(module, exports) { /** @@ -180930,7 +181866,7 @@ module.exports = 'start'; /***/ }), -/* 1374 */ +/* 1380 */ /***/ (function(module, exports) { /** @@ -180967,7 +181903,7 @@ module.exports = 'update'; /***/ }), -/* 1375 */ +/* 1381 */ /***/ (function(module, exports) { /** @@ -181007,7 +181943,7 @@ module.exports = 'active'; /***/ }), -/* 1376 */ +/* 1382 */ /***/ (function(module, exports) { /** @@ -181048,7 +181984,7 @@ module.exports = 'complete'; /***/ }), -/* 1377 */ +/* 1383 */ /***/ (function(module, exports) { /** @@ -181092,7 +182028,7 @@ module.exports = 'loop'; /***/ }), -/* 1378 */ +/* 1384 */ /***/ (function(module, exports) { /** @@ -181137,7 +182073,7 @@ module.exports = 'repeat'; /***/ }), -/* 1379 */ +/* 1385 */ /***/ (function(module, exports) { /** @@ -181177,7 +182113,7 @@ module.exports = 'start'; /***/ }), -/* 1380 */ +/* 1386 */ /***/ (function(module, exports) { /** @@ -181213,7 +182149,7 @@ module.exports = 'stop'; /***/ }), -/* 1381 */ +/* 1387 */ /***/ (function(module, exports) { /** @@ -181256,7 +182192,7 @@ module.exports = 'update'; /***/ }), -/* 1382 */ +/* 1388 */ /***/ (function(module, exports) { /** @@ -181302,7 +182238,7 @@ module.exports = 'yoyo'; /***/ }), -/* 1383 */ +/* 1389 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181311,15 +182247,15 @@ module.exports = 'yoyo'; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayRemove = __webpack_require__(125); +var ArrayRemove = __webpack_require__(129); var Class = __webpack_require__(0); -var NumberTweenBuilder = __webpack_require__(501); +var NumberTweenBuilder = __webpack_require__(503); var PluginCache = __webpack_require__(23); var SceneEvents = __webpack_require__(22); -var StaggerBuilder = __webpack_require__(502); -var TimelineBuilder = __webpack_require__(503); -var TWEEN_CONST = __webpack_require__(89); -var TweenBuilder = __webpack_require__(148); +var StaggerBuilder = __webpack_require__(504); +var TimelineBuilder = __webpack_require__(505); +var TWEEN_CONST = __webpack_require__(90); +var TweenBuilder = __webpack_require__(152); /** * @classdesc @@ -181573,14 +182509,14 @@ var TweenManager = new Class({ /** * Creates a Stagger function to be used by a Tween property. - * + * * The stagger function will allow you to stagger changes to the value of the property across all targets of the tween. - * + * * This is only worth using if the tween has multiple targets. - * + * * The following will stagger the delay by 100ms across all targets of the tween, causing them to scale down to 0.2 * over the duration specified: - * + * * ```javascript * this.tweens.add({ * targets: [ ... ], @@ -181590,10 +182526,10 @@ var TweenManager = new Class({ * delay: this.tweens.stagger(100) * }); * ``` - * + * * The following will stagger the delay by 500ms across all targets of the tween using a 10 x 6 grid, staggering * from the center out, using a cubic ease. - * + * * ```javascript * this.tweens.add({ * targets: [ ... ], @@ -181848,27 +182784,56 @@ var TweenManager = new Class({ /** * Returns an array of all Tweens or Timelines in the Tween Manager which affect the given target or array of targets. * + * Only the currently active tweens are tested. A tween that has completed and is + * awaiting removal will not be included in the results. + * + * If you wish to also search pending tweens, use the `includePending` flag. + * * @method Phaser.Tweens.TweenManager#getTweensOf * @since 3.0.0 * * @param {(object|array)} target - The target to look for. Provide an array to look for multiple targets. + * @param {boolean} [includePending=false] - Also check for pending tweens, not just active ones? * * @return {Phaser.Tweens.Tween[]} A new array containing all Tweens and Timelines which affect the given target(s). */ - getTweensOf: function (target) + getTweensOf: function (target, includePending) { + if (includePending === undefined) { includePending = false; } + var list = this._active; var tween; var output = []; var i; + var t; - if (Array.isArray(target)) + if (!Array.isArray(target)) { + target = [ target ]; + } + + for (i = 0; i < list.length; i++) + { + tween = list[i]; + + for (t = 0; t < target.length; t++) + { + if (tween.hasTarget(target[t])) + { + output.push(tween); + } + } + } + + if (includePending) + { + list = this._pending; + for (i = 0; i < list.length; i++) { tween = list[i]; - for (var t = 0; t < target.length; t++) + for (t = 0; t < target.length; t++) { if (tween.hasTarget(target[t])) { @@ -181877,18 +182842,6 @@ var TweenManager = new Class({ } } } - else - { - for (i = 0; i < list.length; i++) - { - tween = list[i]; - - if (tween.hasTarget(target)) - { - output.push(tween); - } - } - } return output; }, @@ -182074,7 +183027,7 @@ module.exports = TweenManager; /***/ }), -/* 1384 */ +/* 1390 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182090,15 +183043,15 @@ module.exports = TweenManager; module.exports = { Array: __webpack_require__(189), - Base64: __webpack_require__(1385), - Objects: __webpack_require__(1387), - String: __webpack_require__(1391) + Base64: __webpack_require__(1391), + Objects: __webpack_require__(1393), + String: __webpack_require__(1397) }; /***/ }), -/* 1385 */ +/* 1391 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182113,14 +183066,14 @@ module.exports = { module.exports = { - ArrayBufferToBase64: __webpack_require__(1386), + ArrayBufferToBase64: __webpack_require__(1392), Base64ToArrayBuffer: __webpack_require__(388) }; /***/ }), -/* 1386 */ +/* 1392 */ /***/ (function(module, exports) { /** @@ -182178,7 +183131,7 @@ module.exports = ArrayBufferToBase64; /***/ }), -/* 1387 */ +/* 1393 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182197,22 +183150,22 @@ module.exports = { Extend: __webpack_require__(19), GetAdvancedValue: __webpack_require__(15), GetFastValue: __webpack_require__(2), - GetMinMaxValue: __webpack_require__(1388), + GetMinMaxValue: __webpack_require__(1394), GetValue: __webpack_require__(6), - HasAll: __webpack_require__(1389), + HasAll: __webpack_require__(1395), HasAny: __webpack_require__(407), - HasValue: __webpack_require__(109), + HasValue: __webpack_require__(112), IsPlainObject: __webpack_require__(7), - Merge: __webpack_require__(128), - MergeRight: __webpack_require__(1390), - Pick: __webpack_require__(487), + Merge: __webpack_require__(132), + MergeRight: __webpack_require__(1396), + Pick: __webpack_require__(489), SetValue: __webpack_require__(427) }; /***/ }), -/* 1388 */ +/* 1394 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182251,7 +183204,7 @@ module.exports = GetMinMaxValue; /***/ }), -/* 1389 */ +/* 1395 */ /***/ (function(module, exports) { /** @@ -182288,7 +183241,7 @@ module.exports = HasAll; /***/ }), -/* 1390 */ +/* 1396 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182331,7 +183284,7 @@ module.exports = MergeRight; /***/ }), -/* 1391 */ +/* 1397 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182346,10 +183299,10 @@ module.exports = MergeRight; module.exports = { - Format: __webpack_require__(1392), - Pad: __webpack_require__(168), - RemoveAt: __webpack_require__(1393), - Reverse: __webpack_require__(1394), + Format: __webpack_require__(1398), + Pad: __webpack_require__(169), + RemoveAt: __webpack_require__(1399), + Reverse: __webpack_require__(1400), UppercaseFirst: __webpack_require__(187), UUID: __webpack_require__(202) @@ -182357,7 +183310,7 @@ module.exports = { /***/ }), -/* 1392 */ +/* 1398 */ /***/ (function(module, exports) { /** @@ -182392,7 +183345,7 @@ module.exports = Format; /***/ }), -/* 1393 */ +/* 1399 */ /***/ (function(module, exports) { /** @@ -182428,7 +183381,7 @@ module.exports = RemoveAt; /***/ }), -/* 1394 */ +/* 1400 */ /***/ (function(module, exports) { /** @@ -182457,7 +183410,7 @@ module.exports = Reverse; /***/ }), -/* 1395 */ +/* 1401 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182477,8 +183430,8 @@ module.exports = { Events: __webpack_require__(59), - BaseSound: __webpack_require__(130), - BaseSoundManager: __webpack_require__(129), + BaseSound: __webpack_require__(134), + BaseSoundManager: __webpack_require__(133), WebAudioSound: __webpack_require__(389), WebAudioSoundManager: __webpack_require__(387), @@ -182493,12 +183446,6 @@ module.exports = { /***/ }), -/* 1396 */, -/* 1397 */, -/* 1398 */, -/* 1399 */, -/* 1400 */, -/* 1401 */, /* 1402 */, /* 1403 */, /* 1404 */, @@ -182545,7 +183492,13 @@ module.exports = { /* 1445 */, /* 1446 */, /* 1447 */, -/* 1448 */ +/* 1448 */, +/* 1449 */, +/* 1450 */, +/* 1451 */, +/* 1452 */, +/* 1453 */, +/* 1454 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -182554,7 +183507,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -__webpack_require__(519); +__webpack_require__(522); var CONST = __webpack_require__(33); var Extend = __webpack_require__(19); @@ -182573,36 +183526,36 @@ var Extend = __webpack_require__(19); var Phaser = { Actions: __webpack_require__(245), - Animations: __webpack_require__(639), - Cache: __webpack_require__(640), - Cameras: __webpack_require__(643), - Core: __webpack_require__(729), + Animations: __webpack_require__(642), + Cache: __webpack_require__(643), + Cameras: __webpack_require__(646), + Core: __webpack_require__(732), Class: __webpack_require__(0), - Create: __webpack_require__(792), - Curves: __webpack_require__(798), - Data: __webpack_require__(801), - Display: __webpack_require__(803), - DOM: __webpack_require__(821), - Events: __webpack_require__(822), - Game: __webpack_require__(824), - GameObjects: __webpack_require__(917), + Create: __webpack_require__(797), + Curves: __webpack_require__(803), + Data: __webpack_require__(806), + Display: __webpack_require__(808), + DOM: __webpack_require__(826), + Events: __webpack_require__(827), + Game: __webpack_require__(829), + GameObjects: __webpack_require__(922), Geom: __webpack_require__(430), - Input: __webpack_require__(1207), - Loader: __webpack_require__(1241), - Math: __webpack_require__(175), + Input: __webpack_require__(1213), + Loader: __webpack_require__(1247), + Math: __webpack_require__(176), Physics: { - Arcade: __webpack_require__(1267) + Arcade: __webpack_require__(1273) }, - Plugins: __webpack_require__(1310), - Scale: __webpack_require__(1312), + Plugins: __webpack_require__(1316), + Scale: __webpack_require__(1318), Scene: __webpack_require__(374), - Scenes: __webpack_require__(1313), - Structs: __webpack_require__(1315), - Textures: __webpack_require__(1316), - Tilemaps: __webpack_require__(1318), - Time: __webpack_require__(1364), - Tweens: __webpack_require__(1366), - Utils: __webpack_require__(1384) + Scenes: __webpack_require__(1319), + Structs: __webpack_require__(1321), + Textures: __webpack_require__(1322), + Tilemaps: __webpack_require__(1324), + Time: __webpack_require__(1370), + Tweens: __webpack_require__(1372), + Utils: __webpack_require__(1390) }; @@ -182612,7 +183565,7 @@ Phaser = Extend(false, Phaser, CONST); if (true) { - Phaser.Sound = __webpack_require__(1395); + Phaser.Sound = __webpack_require__(1401); } // Export it @@ -182627,7 +183580,7 @@ global.Phaser = Phaser; * -- Dick Brandon */ -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(518))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(521))) /***/ }) /******/ ]); diff --git a/dist/phaser-arcade-physics.min.js b/dist/phaser-arcade-physics.min.js index 24e179c9a..b108399d8 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()}(window,function(){return n={},s.m=i=[function(t,e){function r(t,e,i,n){for(var s in e)if(e.hasOwnProperty(s)){var r=(u=e,l=s,f=d=void 0,f=(c=i)?u[l]:Object.getOwnPropertyDescriptor(u,l),!c&&f.value&&"object"==typeof f.value&&(f=f.value),!(!f||!((d=f).get&&"function"==typeof d.get||d.set&&"function"==typeof d.set))&&(void 0===f.enumerable&&(f.enumerable=!0),void 0===f.configurable&&(f.configurable=!0),f));if(!1!==r){if(o=(n||t).prototype,a=s,h=void 0,(h=Object.getOwnPropertyDescriptor(o,a))&&(h.value&&"object"==typeof h.value&&(h=h.value),!1===h.configurable)){if(p.ignoreFinals)continue;throw new Error("cannot override final property '"+s+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,s,r)}else t.prototype[s]=e[s]}var o,a,h,u,l,c,d,f}function o(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i=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=l},function(t,e){t.exports={getTintFromFloats:function(t,e,i,n){return((255&(255*n|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]},getComponentCount:function(t,e){for(var i=0,n=0;nr.width&&(i=Math.max(r.width-t,0)),e+n>r.height&&(n=Math.max(r.height-e,0));for(var u=[],l=e;l>>16,a=(65280&s)>>>8,h=255&s;t.fillStyle="rgba("+o+","+a+","+h+","+r+")"}},,function(t,e){t.exports=function(t,e){return t.y=e+t.height*t.originY,t}},function(t,e){t.exports=function(t,e){return t.x=e+t.width*t.originX,t}},function(t,e){t.exports=function(t,e){return t.x=e-t.width+t.width*t.originX,t}},function(t,e){t.exports=function(t,e){return t.y=e-t.height+t.height*t.originY,t}},function(t,e){t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},function(t,e){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)}},function(t,e,i){var n=i(0),s=i(279),r=i(157),o=i(47),a=i(158),h=i(3),u=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=o.LINE,this.x1=t,this.y1=e,this.x2=i,this.y2=n},getPoint:function(t,e){return s(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,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,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=u},function(t,e){t.exports=function(t,e,i,n){var s=i||e.strokeColor,r=n||e.strokeAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.strokeStyle="rgba("+o+","+a+","+h+","+r+")",t.lineWidth=e.lineWidth}},function(t,e){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}},function(t,e,i){var d=i(144),f=i(24);t.exports=function(t,e,i,n,s){for(var r,o,a,h,u=f(t,e,i,n,null,s),l=0;l=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}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e,i){t.exports={COMPLETE:i(894),DECODED:i(895),DECODED_ALL:i(896),DESTROY:i(897),DETUNE:i(898),GLOBAL_DETUNE:i(899),GLOBAL_MUTE:i(900),GLOBAL_RATE:i(901),GLOBAL_VOLUME:i(902),LOOP:i(903),LOOPED:i(904),MUTE:i(905),PAUSE_ALL:i(906),PAUSE:i(907),PLAY:i(908),RATE:i(909),RESUME_ALL:i(910),RESUME:i(911),SEEK:i(912),STOP_ALL:i(913),STOP:i(914),UNLOCKED:i(915),VOLUME:i(916)}},function(t,e,i){var n=i(0),h=i(18),u=i(21),s=i(8),l=i(2),c=i(6),d=i(7),r=new n({Extends:u,initialize:function(t,e,i,n,s){var r,o="json";d(e)&&(e=l(r=e,"key"),i=l(r,"url"),n=l(r,"xhrSettings"),o=l(r,"extension",o),s=l(r,"dataKey",s));var a={type:"json",cache:t.cacheManager.json,extension:o,responseType:"text",key:e,url:i,xhrSettings:n,config:s};u.call(this,t,a),d(i)&&(this.data=s?c(i,s):i,this.state=h.FILE_POPULATED)},onProcess:function(){var t,e;this.state!==h.FILE_POPULATED&&(this.state=h.FILE_PROCESSING,t=JSON.parse(this.xhrLoader.responseText),e=this.config,this.data="string"==typeof e?c(t,e,t):t),this.onProcessComplete()}});s.register("json",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&o=n.x&&n.x>=l&&s!==n.x&&T(ri.x)&&E(n,t)&&(i=n,d=h),n=n.next;return i}(t,e))&&v(i=_(e,t),i.next)}}(u[s],i),i=v(i,i.next);return i}(t,e,d,i)),t.length>80*i){n=r=t[0],s=o=t[1];for(var p=i;pr.x?s.x>o.x?s.x:o.x:r.x>o.x?r.x:o.x,l=s.y>r.y?s.y>o.y?s.y:o.y:r.y>o.y?r.y:o.y,c=x(a,h,e,i,n),d=x(u,l,e,i,n),f=t.prevZ,p=t.nextZ;for(;f&&f.z>=c&&p&&p.z<=d;){if(f!==t.prev&&f!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,f.x,f.y)&&0<=w(f.prev,f,f.next))return!1;if(f=f.prevZ,p!==t.prev&&p!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&0<=w(p.prev,p,p.next))return!1;p=p.nextZ}for(;f&&f.z>=c;){if(f!==t.prev&&f!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,f.x,f.y)&&0<=w(f.prev,f,f.next))return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&0<=w(p.prev,p,p.next))return!1;p=p.nextZ}return!0}(t,n,s,r):function(t){var e=t.prev,i=t,n=t.next;if(0<=w(e,i,n))return!1;var s=t.next.next;for(;s!==t.prev;){if(T(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&0<=w(s.prev,s,s.next))return!1;s=s.next}return!0}(t))e.push(a.i/i),e.push(t.i/i),e.push(h.i/i),d(t),t=h.next,u=h.next;else if((t=h)===u){o?1===o?m(t=function(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!l(s,r)&&c(s,n,n.next,r)&&E(s,r)&&E(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),d(n),d(n.next),n=t=r),n=n.next}while(n!==t);return n}(t,e,i),e,i,n,s,r,2):2===o&&function(t,e,i,n,s,r){var o=t;do{for(var a=o.next.next;a!==o.prev;){if(o.i!==a.i&&function(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&&c(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&E(t,e)&&E(e,t)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;for(;i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next,i!==t;);return n}(t,e)}(o,a)){var h=_(o,a);return o=v(o,o.next),h=v(h,h.next),m(o,e,i,n,s,r),m(h,e,i,n,s,r)}a=a.next}o=o.next}while(o!==t)}(t,e,i,n,s,r):m(v(t),e,i,n,s,r,1);break}}}function y(t,e){return t.x-e.x}function x(t,e,i,n,s){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*s)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*s)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function T(t,e,i,n,s,r,o,a){return 0<=(s-o)*(e-a)-(t-o)*(r-a)&&0<=(t-o)*(n-a)-(i-o)*(e-a)&&0<=(i-o)*(r-a)-(s-o)*(n-a)}function w(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function l(t,e){return t.x===e.x&&t.y===e.y}function c(t,e,i,n){return l(t,e)&&l(i,n)||l(t,n)&&l(i,e)||0=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=l},function(t,e,i){var n=i(0),s=i(18),c=i(21),r=i(8),d=i(2),f=i(7),o=new n({Extends:c,initialize:function t(e,i,n,s,r){var o,a,h="png";f(i)&&(i=d(a=i,"key"),n=d(a,"url"),o=d(a,"normalMap"),s=d(a,"xhrSettings"),h=d(a,"extension",h),r=d(a,"frameConfig")),Array.isArray(n)&&(o=n[1],n=n[0]);var u,l={type:"image",cache:e.textureManager,extension:h,responseType:"blob",key:i,url:n,xhrSettings:s,config:r};c.call(this,e,l),o&&((u=new t(e,this.key,o,s,r)).type="normalMap",this.setLink(u),e.addFile(u))},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){c.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){c.revokeObjectURL(t.data),t.onProcessError()},c.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var t,e=this.linkFile;e&&e.state===s.FILE_COMPLETE?(t="image"===this.type?this.cache.addImage(this.key,this.data,e.data):this.cache.addImage(e.key,e.data,this.data),this.pendingDestroy(t),e.pendingDestroy(t)):e||(t=this.cache.addImage(this.key,this.data),this.pendingDestroy(t))}});r.register("image",function(t,e,i){if(Array.isArray(t))for(var n=0;nthis.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=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.tileToWorldX(this.x,t):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.tileToWorldY(this.y,t)-(this.height-this.baseHeight)*e.scaleY:this.y*this.baseHeight-(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 r),e.x=this.getLeft(),e.y=this.getTop(),e.width=this.getRight()-e.x,e.height=this.getBottom()-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},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=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){return 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),this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){return void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===s&&(s=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,s&&this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y),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,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight,this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||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=o},function(t,e,i){var n=i(0),r=i(12),o=i(14),s=i(971),a=new n({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,s],initialize:function(t,e,i,n,s){o.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new r.Animation(this),this.setTexture(n,s),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()},preUpdate:function(t,e){this.anims.update(t,e)},play:function(t,e,i){return this.anims.play(t,e,i),this},toJSON:function(){return r.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=a},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e){t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,n=t[e],s=e;sh||a.y>u)?(l=Math.max(a.x,e),c=Math.max(a.y,i),E=d=Math.min(a.r,h)-l,_=f=Math.min(a.b,u)-c,T=r?p+(v-(l-a.x)-d):p+(l-a.x),w=o?g+(m-(c-a.y)-f):g+(c-a.y),e=l,i=c,n=d,s=f):_=E=w=T=0):(r&&(T=p+(v-e-n)),o&&(w=g+(m-i-s)));var b=this.source.width,S=this.source.height;return t.u0=Math.max(0,T/b),t.v0=Math.max(0,w/S),t.u1=Math.min(1,(T+E)/b),t.v1=Math.min(1,(w+_)/S),t.x=e,t.y=i,t.cx=T,t.cy=w,t.cw=E,t.ch=_,t.width=n,t.height=s,t.flipX=r,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,n,s,r){var o=this.data.drawImage;return o.width=t,o.height=e,this.u0=i,this.v0=n,this.u1=s,this.v1=r,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.width=i,s.height=n;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+n)/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 r(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=s(!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=r},function(t,e,i){var n=i(0),s=i(97),r=i(398),o=i(399),a=i(47),h=i(162),u=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=a.ELLIPSE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(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,n){return this.x=t,this.y=e,this.width=i,this.height=n,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=u},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){var B=i(245),n=i(0),r=i(90),Y=i(2),N=i(6),s=i(7),X=i(392),o=i(135),a=i(75),h=new n({initialize:function(t,e,i){i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?s(e[0])&&(i=e,e=null):s(e)&&(i=e,e=null),this.scene=t,this.children=new o,this.isParent=!0,this.type="Group",this.classType=Y(i,"classType",a),this.name=Y(i,"name",""),this.active=Y(i,"active",!0),this.maxSize=Y(i,"maxSize",-1),this.defaultKey=Y(i,"defaultKey",null),this.defaultFrame=Y(i,"defaultFrame",null),this.runChildUpdate=Y(i,"runChildUpdate",!1),this.createCallback=Y(i,"createCallback",null),this.removeCallback=Y(i,"removeCallback",null),this.createMultipleCallback=Y(i,"createMultipleCallback",null),this.internalCreateCallback=Y(i,"internalCreateCallback",null),this.internalRemoveCallback=Y(i,"internalRemoveCallback",null),e&&this.addMultiple(e),i&&this.createMultiple(i)},create:function(t,e,i,n,s,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),void 0===r&&(r=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(o),o.preUpdate&&this.scene.sys.updateList.add(o),o.visible=s,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=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;i=this.firstgid&&t>16)+(65280&t)+((255&t)<<16)}},function(t,e,i){var n=i(0),a=i(288),s=new n({initialize:function(t,e){this.parent=t,(this.events=e)||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once("destroy",this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],n=0;ne.right||t.y>e.bottom)}},function(t,e,i){var u=i(6),l={},n={register:function(t,e,i,n,s){l[t]={plugin:e,mapping:i,settingsKey:n,configKey:s}},getPlugin:function(t){return l[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,n=e.game.config;for(var s in l){var r=l[s].plugin,o=l[s].mapping,a=l[s].settingsKey,h=l[s].configKey;u(i,a,n[h])&&(t[o]=new r(t))}},remove:function(t){l.hasOwnProperty(t)&&delete l[t]}};t.exports=n},function(t,e,i){t.exports={ANY_KEY_DOWN:i(1223),ANY_KEY_UP:i(1224),COMBO_MATCH:i(1225),DOWN:i(1226),KEY_DOWN:i(1227),KEY_UP:i(1228),UP:i(1229)}},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),void 0===r&&(r=!1),{responseType:t,async:e,user:i,password:n,timeout:s,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:r}}},function(t,e,i){var n=i(0),s=i(223),r=i(75),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s),this.body=null}});t.exports=o},function(t,e,i){t.exports={CalculateFacesAt:i(226),CalculateFacesWithin:i(52),Copy:i(1319),CreateFromTiles:i(1320),CullTiles:i(1321),Fill:i(1322),FilterTiles:i(1323),FindByIndex:i(1324),FindTile:i(1325),ForEachTile:i(1326),GetTileAt:i(144),GetTileAtWorldXY:i(1327),GetTilesWithin:i(24),GetTilesWithinShape:i(1328),GetTilesWithinWorldXY:i(1329),HasTileAt:i(477),HasTileAtWorldXY:i(1330),IsInLayerBounds:i(102),PutTileAt:i(227),PutTileAtWorldXY:i(1331),PutTilesAt:i(1332),Randomize:i(1333),RemoveTileAt:i(478),RemoveTileAtWorldXY:i(1334),RenderDebug:i(1335),ReplaceByIndex:i(476),SetCollision:i(1336),SetCollisionBetween:i(1337),SetCollisionByExclusion:i(1338),SetCollisionByProperty:i(1339),SetCollisionFromCollisionGroup:i(1340),SetTileIndexCallback:i(1341),SetTileLocationCallback:i(1342),Shuffle:i(1343),SwapByIndex:i(1344),TileToWorldX:i(145),TileToWorldXY:i(1345),TileToWorldY:i(146),WeightedRandomize:i(1346),WorldToTileX:i(63),WorldToTileXY:i(1347),WorldToTileY:i(64)}},function(t,e,i){var r=i(102);t.exports=function(t,e,i,n){if(void 0===i&&(i=!1),r(t,e,n)){var s=n.data[e][t]||null;return null!==s&&(-1!==s.index||i)?s:null}return null}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),n*=s.scaleX),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*n}},function(t,e){t.exports=function(o,a,t){return o.hasOwnProperty(a)?"function"==typeof o[a]?function(t,e,i,n,s,r){return o[a](t,e,i,n,s,r)}:function(){return o[a]}:"function"==typeof t?t:function(){return t}}},function(t,e,i){var P=i(236),L=i(15),F=i(88),D=i(69),k=i(147),I=i(499),B=i(234),Y=i(6),N=i(235),X=i(237),U=i(239);t.exports=function(t,e,i){void 0===i&&(i=P);for(var n=i.targets?i.targets:B(e),s=I(e),r=k(e,"delay",i.delay),o=k(e,"duration",i.duration),a=Y(e,"easeParams",i.easeParams),h=D(Y(e,"ease",i.ease),a),u=k(e,"hold",i.hold),l=k(e,"repeat",i.repeat),c=k(e,"repeatDelay",i.repeatDelay),d=F(e,"yoyo",i.yoyo),f=F(e,"flipX",i.flipX),p=F(e,"flipY",i.flipY),g=[],v=0;v=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this.resolution=i,this},bind:function(){var t=this.vertexBuffer,e=this.program,i=this.renderer;return i.setProgram(e),i.setVertexBuffer(t),this.setAttribPointers(),this},setAttribPointers:function(){for(var t=this.gl,e=this.attributes,i=this.vertexSize,n=0;nthis.vertexCapacity&&this.flush();var Y=this.setGameObject(t),N=t._isTinted&&t.tintFill;this.batchQuad(S,C,M,O,R,P,L,F,u,l,c,d,D,k,I,B,N,h,Y)},batchQuad:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g,v,m,y){void 0===y&&(y=this.currentUnit);var x=!1;this.vertexCount+6>this.vertexCapacity&&(this.flush(),x=!0,y=this.setTexture2D(m));var T=this.vertexViewF32,w=this.vertexViewU32,E=this.vertexCount*this.vertexComponentCount-1;return T[++E]=t,T[++E]=e,T[++E]=h,T[++E]=u,T[++E]=y,T[++E]=v,w[++E]=d,T[++E]=i,T[++E]=n,T[++E]=h,T[++E]=c,T[++E]=y,T[++E]=v,w[++E]=p,T[++E]=s,T[++E]=r,T[++E]=l,T[++E]=c,T[++E]=y,T[++E]=v,w[++E]=g,T[++E]=t,T[++E]=e,T[++E]=h,T[++E]=u,T[++E]=y,T[++E]=v,w[++E]=d,T[++E]=s,T[++E]=r,T[++E]=l,T[++E]=c,T[++E]=y,T[++E]=v,w[++E]=g,T[++E]=o,T[++E]=a,T[++E]=l,T[++E]=u,T[++E]=y,T[++E]=v,w[++E]=f,this.vertexCount+=6,x},batchTri:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g){void 0===g&&(g=this.currentUnit);var v=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),v=!0,g=this.setTexture2D(p));var m=this.vertexViewF32,y=this.vertexViewU32,x=this.vertexCount*this.vertexComponentCount-1;return m[++x]=t,m[++x]=e,m[++x]=o,m[++x]=a,m[++x]=g,m[++x]=f,y[++x]=l,m[++x]=i,m[++x]=n,m[++x]=o,m[++x]=u,m[++x]=g,m[++x]=f,y[++x]=c,m[++x]=s,m[++x]=r,m[++x]=h,m[++x]=u,m[++x]=g,m[++x]=f,y[++x]=d,this.vertexCount+=3,v},batchTexture:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g,v,m,y,x,T,w,E,_,A,b,S,C,M,O,R,P){this.renderer.setPipeline(this,t);var L,F,D,k=this._tempMatrix1,I=this._tempMatrix2,B=this._tempMatrix3,Y=m/i+S,N=y/n+C,X=(m+x)/i+S,U=(y+T)/n+C,z=o,G=a,W=-g,V=-v;t.isCropped&&(z=(L=t._crop).width,G=L.height,o=L.width,a=L.height,F=m=L.x,D=y=L.y,c&&(F=x-L.x-L.width),d&&!e.isRenderTexture&&(D=T-L.y-L.height),Y=F/i+S,N=D/n+C,X=(F+L.width)/i+S,U=(D+L.height)/n+C,W=-g+m,V=-v+y),c&&(z*=-1,W+=o),(d^=!R&&e.isRenderTexture?1:0)&&(G*=-1,V+=a);var H=W+z,j=V+G;I.applyITRS(s,r,l,h,u),k.copyFrom(M.matrix),O?(k.multiplyWithOffset(O,-M.scrollX*f,-M.scrollY*p),I.e=s,I.f=r):(I.e-=M.scrollX*f,I.f-=M.scrollY*p),k.multiply(I,B);var K=B.getX(W,V),q=B.getY(W,V),Z=B.getX(W,j),J=B.getY(W,j),Q=B.getX(H,j),$=B.getY(H,j),tt=B.getX(H,V),et=B.getY(H,V);M.roundPixels&&(K=Math.round(K),q=Math.round(q),Z=Math.round(Z),J=Math.round(J),Q=Math.round(Q),$=Math.round($),tt=Math.round(tt),et=Math.round(et)),void 0===P&&(P=this.renderer.setTexture2D(e)),this.batchQuad(K,q,Z,J,Q,$,tt,et,Y,N,X,U,w,E,_,A,b,e,P)},batchTextureFrame:function(t,e,i,n,s,r,o){this.renderer.setPipeline(this);var a=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2,u=e+t.width,l=i+t.height;o?a.multiply(o,h):h=a;var c=h.getX(e,i),d=h.getY(e,i),f=h.getX(e,l),p=h.getY(e,l),g=h.getX(u,l),v=h.getY(u,l),m=h.getX(u,i),y=h.getY(u,i),x=this.renderer.setTextureSource(t.source);n=X.getTintAppendFloatAlpha(n,s),this.batchQuad(c,d,f,p,g,v,m,y,t.u0,t.v0,t.u1,t.v1,n,n,n,n,0,t.glTexture,x)},drawFillRect:function(t,e,i,n,s,r){t=Math.floor(t),e=Math.floor(e);var o=Math.floor(t+i),a=Math.floor(e+n),h=this.renderer.blankTexture.glTexture,u=this.renderer.setTexture2D(h),l=X.getTintAppendFloatAlphaAndSwap(s,r);this.batchQuad(t,e,t,a,o,a,o,e,0,0,1,1,l,l,l,l,2,h,u)},batchFillRect:function(t,e,i,n,s,r){this.renderer.setPipeline(this);var o=this._tempMatrix3;r&&r.multiply(s,o);var a=t+i,h=e+n,u=o.getX(t,e),l=o.getY(t,e),c=o.getX(t,h),d=o.getY(t,h),f=o.getX(a,h),p=o.getY(a,h),g=o.getX(a,e),v=o.getY(a,e),m=this.currentFrame,y=m.u0,x=m.v0,T=m.u1,w=m.v1,E=this.fillTint;this.batchQuad(u,l,c,d,f,p,g,v,y,x,T,w,E.TL,E.TR,E.BL,E.BR,this.tintEffect)},batchFillTriangle:function(t,e,i,n,s,r,o,a){this.renderer.setPipeline(this);var h=this._tempMatrix3;a&&a.multiply(o,h);var u=h.getX(t,e),l=h.getY(t,e),c=h.getX(i,n),d=h.getY(i,n),f=h.getX(s,r),p=h.getY(s,r),g=this.currentFrame,v=g.u0,m=g.v0,y=g.u1,x=g.v1;this.batchTri(u,l,c,d,f,p,v,m,y,x,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.tintEffect)},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h){var u=this.tempTriangle;u[0].x=t,u[0].y=e,u[0].width=o,u[1].x=i,u[1].y=n,u[1].width=o,u[2].x=s,u[2].y=r,u[2].width=o,u[3].x=t,u[3].y=e,u[3].width=o,this.batchStrokePath(u,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.setPipeline(this);var n=this._tempMatrix3;i&&i.multiply(e,n);for(var s,r,o=t.length,a=this.polygonCache,h=this.fillTint.TL,u=this.fillTint.TR,l=this.fillTint.BL,c=this.tintEffect,d=0;d=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo);var i=this.frames[e];0!==e||t.forward||(i=this.getLastFrame()),t.updateFrame(i)},getFrameByProgress:function(t){return t=n(t,0,1),a(t,this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t._yoyo?this.handleYoyoFrame(t,!1):0=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2);t=new Array(1+(s-r)).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){var n=i(298),s=i(301),r=i(303),o=i(304);t.exports=function(t){switch(typeof t){case"string":return("rgb"===t.substr(0,3).toLowerCase()?o:n)(t);case"number":return s(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){var f=i(170);t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1);var s=Math.floor(6*t),r=6*t-s,o=Math.floor(i*(1-e)*255),a=Math.floor(i*(1-r*e)*255),h=Math.floor(i*(1-(1-r)*e)*255),u=i=Math.floor(i*=255),l=i,c=i,d=s%6;return 0==d?(l=h,c=o):1==d?(u=a,c=o):2==d?(u=o,c=h):3==d?(u=o,l=a):4==d?(u=h,l=o):5==d&&(l=o,c=a),n?n.setTo?n.setTo(u,l,c,n.alpha,!1):(n.r=u,n.g=l,n.b=c,n.color=f(u,l,c),n):{r:u,g:l,b:c,color:f(u,l,c)}}},function(t,e){var i="";function n(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;is.width&&(t=s.width-r.cutX),r.cutY+e>s.height&&(e=s.height-r.cutY),r.setSize(t,e,r.cutX,r.cutY)),this.updateDisplayOrigin();var a=this.input;return a&&!a.customHitArea&&(a.hitArea.width=t,a.hitArea.height=e),this},setGlobalTint:function(t){return this.globalTint=t,this},setGlobalAlpha:function(t){return this.globalAlpha=t,this},saveTexture:function(t){return this.textureManager.renameTexture(this.texture.key,t),this._saved=!0,this.texture},fill:function(t,e,i,n,s,r){void 0===e&&(e=1),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.frame.cutWidth),void 0===r&&(r=this.frame.cutHeight);var o,a,h,u,l,c=255&(t>>16|0),d=255&(t>>8|0),f=255&(0|t),p=this.gl,g=this.frame,v=this.camera,m=this.renderer;return v.preRender(1,1),p?(o=v._cx,a=v._cy,h=v._cw,u=v._ch,m.resetTextures(!0),m.setFramebuffer(this.framebuffer,!1),m.pushScissor(o,a,h,u,u),l=this.pipeline,y(l,0,this.texture.width,0,this.texture.height,-1e3,1e3),l.drawFillRect(i,n,s,r,x.getTintFromFloats(c/255,d/255,f/255,1),e),l.flush(),m.setFramebuffer(null,!1),m.popScissor(),y(l,0,l.width,l.height,0,-1e3,1e3)):(m.setContext(this.context),this.context.fillStyle="rgba("+c+","+d+","+f+","+e+")",this.context.fillRect(i+g.cutX,n+g.cutY,s,r),m.setContext()),this.dirty=!0,this},clear:function(){var t,e,i;return this.dirty&&((t=this.gl)?((e=this.renderer).setFramebuffer(this.framebuffer,!0),this.frame.cutWidth===this.canvas.width&&this.frame.cutHeight===this.canvas.height||t.scissor(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),e.setFramebuffer(null,!0)):((i=this.context).save(),i.setTransform(1,0,0,1,0,0),i.clearRect(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),i.restore()),this.dirty=!1),this},erase:function(t,e,i){this._eraseMode=!0;var n=this.renderer.currentBlendMode;return this.renderer.setBlendMode(o.ERASE),this.draw(t,e,i,1,16777215),this.renderer.setBlendMode(n),this._eraseMode=!1,this},draw:function(t,e,i,n,s){void 0===n&&(n=this.globalAlpha),s=void 0===s?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(s>>16)+(65280&s)+((255&s)<<16),Array.isArray(t)||(t=[t]);var r,o,a,h,u,l=this.gl,c=this.camera,d=this.renderer;return c.preRender(1,1),l?(r=c._cx,o=c._cy,a=c._cw,h=c._ch,d.resetTextures(!0),d.setFramebuffer(this.framebuffer,!1),d.pushScissor(r,o,a,h,h),u=this.pipeline,y(u,0,this.texture.width,0,this.texture.height,-1e3,1e3),this.batchList(t,e,i,n,s),d.setFramebuffer(null,!0),d.resetTextures(!0),y(u,0,u.width,u.height,0,-1e3,1e3)):(d.setContext(this.context),this.batchList(t,e,i,n,s),d.setContext()),this.dirty=!0,this},drawFrame:function(t,e,i,n,s,r){void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.globalAlpha),r=void 0===r?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(r>>16)+(65280&r)+((255&r)<<16);var o,a,h,u,l,c=this.gl,d=this.camera,f=this.renderer,p=this.textureManager.getFrame(t,e);return p&&(d.preRender(1,1),c?(o=d._cx,a=d._cy,h=d._cw,u=d._ch,f.resetTextures(!0),f.setFramebuffer(this.framebuffer,!1),f.pushScissor(o,a,h,u,u),l=this.pipeline,y(l,0,this.texture.width,0,this.texture.height,-1e3,1e3),l.batchTextureFrame(p,i+this.frame.cutX,n+this.frame.cutY,r,s,d.matrix,null),l.flush(),f.setFramebuffer(null,!1),f.popScissor(),y(l,0,l.width,l.height,0,-1e3,1e3)):this.batchTextureFrame(p,i+this.frame.cutX,n+this.frame.cutY,s,r),this.dirty=!0),this},batchList:function(t,e,i,n,s){for(var r=0;rs&&(r=t[s]),n[s]=r,t.length>s+1&&(r=t[s+1]),n[s+1]=r;return this},setColors:function(t){var e=this.points.length;if(e<1)return this;var i=this.colors;void 0===t?t=[16777215]:Array.isArray(t)||(t=[t]);var n=0;if(t.length===e)for(r=0;rn&&(s=t[n]),i[n]=s,t.length>n+1&&(s=t[n+1]),i[n+1]=s;return this},setPoints:function(t,e,i){if(void 0===t&&(t=2),"number"==typeof t){var n,s,r,o=t;if(o<2&&(o=2),t=[],this.horizontal)for(r=-this.frame.halfWidth,s=this.frame.width/(o-1),n=0;n=this._markerOut&&(e.loop?(e.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=t,this.emit(o.VIDEO_LOOP,this)):(this.emit(o.VIDEO_COMPLETE,this),this.stop())))},checkVideoProgress:function(){2<=this.video.readyState?this.updateTexture():(this.retry--,0t&&(t=s.totalDuration),s.delaye.length&&(r=e.length),i?(n=e[r-1][i],(s=e[r][i])-t<=t-n?e[r]:e[r-1]):(n=e[r-1],(s=e[r])-t<=t-n?s:n)}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=n,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0}});t.exports=n},function(t,e,i){var n=i(53),s={_blendMode:n.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=n[t]),-1<=(t|=0)&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e,i){var o=i(156),a=i(113);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&0=t.right&&(o=1,r+=s-t.right,s=t.right);break;case 1:(r+=e)>=t.bottom&&(o=2,s-=r-t.bottom,r=t.bottom);break;case 2:(s-=e)<=t.left&&(o=3,r-=t.left-s,s=t.left);break;case 3:(r-=e)<=t.top&&(o=0,r=t.top)}return n}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;nd.right&&(f=T(f,f+(e-d.right),this.lerp.x)),id.bottom&&(p=T(p,p+(i-d.bottom),this.lerp.y))):(f=T(f,e-u,this.lerp.x),p=T(p,i-l,this.lerp.y))),this.useBounds&&(f=this.clampX(f),p=this.clampY(p)),this.roundPixels&&(u=Math.round(u),l=Math.round(l));var g=(this.scrollX=f)+r,v=(this.scrollY=p)+o;this.midPoint.set(g,v);var m=n/a,y=s/a;this.worldView.setTo(g-m/2,v-y/2,m,y),h.applyITRS(this.x+u,this.y+l,this.rotation,a,a),h.translate(-u,-l),this.shakeEffect.preRender()},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,n,s,r){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===n&&(n=i),void 0===s&&(s=0),void 0===r&&(r=s),this._follow=t,this.roundPixels=e,i=l(i,0,1),n=l(n,0,1),this.lerp.set(i,n),this.followOffset.set(s,r);var o=this.width/2,a=this.height/2,h=t.x-s,u=t.y-r;return this.midPoint.set(h,u),this.scrollX=h-o,this.scrollY=u-a,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.clearRenderToTexture(),this.resetFX(),s.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=c},function(t,e,i){var o=i(31);t.exports=function(t){var e=new o;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,n){return e+e+i+i+n+n});var i,n,s,r=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return r&&(i=parseInt(r[1],16),n=parseInt(r[2],16),s=parseInt(r[3],16),e.setTo(i,n,s)),e}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},function(t,e){t.exports=function(t,e,i,n){void 0===n&&(n={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var s=Math.min(t,e,i),r=Math.max(t,e,i),o=r-s,a=0,h=0===r?0:o/r,u=r;return r!==s&&(r===t?a=(e-i)/o+(e>>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}}},function(t,e,i){var n=i(31);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var a=i(31);t.exports=function(t){var e,i,n,s,r=new a,o=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());return o&&(e=parseInt(o[1],10),i=parseInt(o[2],10),n=parseInt(o[3],10),s=void 0!==o[4]?parseFloat(o[4]):1,r.setTo(e,i,n,255*s)),r}},function(t,e,i){t.exports={Fade:i(665),Flash:i(666),Pan:i(667),Shake:i(700),RotateTo:i(701),Zoom:i(702)}},function(t,e,i){t.exports={In:i(668),Out:i(669),InOut:i(670)}},function(t,e,i){t.exports={In:i(671),Out:i(672),InOut:i(673)}},function(t,e,i){t.exports={In:i(674),Out:i(675),InOut:i(676)}},function(t,e,i){t.exports={In:i(677),Out:i(678),InOut:i(679)}},function(t,e,i){t.exports={In:i(680),Out:i(681),InOut:i(682)}},function(t,e,i){t.exports={In:i(683),Out:i(684),InOut:i(685)}},function(t,e,i){t.exports=i(686)},function(t,e,i){t.exports={In:i(687),Out:i(688),InOut:i(689)}},function(t,e,i){t.exports={In:i(690),Out:i(691),InOut:i(692)}},function(t,e,i){t.exports={In:i(693),Out:i(694),InOut:i(695)}},function(t,e,i){t.exports={In:i(696),Out:i(697),InOut:i(698)}},function(t,e,i){t.exports=i(699)},function(t,e,i){var n=i(0),a=i(33),h=i(319),u=i(2),l=i(6),c=i(7),d=i(175),f=i(1),p=i(180),g=i(169),s=new n({initialize:function(t){void 0===t&&(t={});this.width=l(t,"width",1024),this.height=l(t,"height",768),this.zoom=l(t,"zoom",1),this.resolution=l(t,"resolution",1),this.parent=l(t,"parent",void 0),this.scaleMode=l(t,"scaleMode",0),this.expandParent=l(t,"expandParent",!0),this.autoRound=l(t,"autoRound",!1),this.autoCenter=l(t,"autoCenter",0),this.resizeInterval=l(t,"resizeInterval",500),this.fullscreenTarget=l(t,"fullscreenTarget",null),this.minWidth=l(t,"minWidth",0),this.maxWidth=l(t,"maxWidth",0),this.minHeight=l(t,"minHeight",0),this.maxHeight=l(t,"maxHeight",0);var e=l(t,"scale",null);e&&(this.width=l(e,"width",this.width),this.height=l(e,"height",this.height),this.zoom=l(e,"zoom",this.zoom),this.resolution=l(e,"resolution",this.resolution),this.parent=l(e,"parent",this.parent),this.scaleMode=l(e,"mode",this.scaleMode),this.expandParent=l(e,"expandParent",this.expandParent),this.autoRound=l(e,"autoRound",this.autoRound),this.autoCenter=l(e,"autoCenter",this.autoCenter),this.resizeInterval=l(e,"resizeInterval",this.resizeInterval),this.fullscreenTarget=l(e,"fullscreenTarget",this.fullscreenTarget),this.minWidth=l(e,"min.width",this.minWidth),this.maxWidth=l(e,"max.width",this.maxWidth),this.minHeight=l(e,"min.height",this.minHeight),this.maxHeight=l(e,"max.height",this.maxHeight)),this.renderType=l(t,"type",a.AUTO),this.canvas=l(t,"canvas",null),this.context=l(t,"context",null),this.canvasStyle=l(t,"canvasStyle",null),this.customEnvironment=l(t,"customEnvironment",!1),this.sceneConfig=l(t,"scene",null),this.seed=l(t,"seed",[(Date.now()*Math.random()).toString()]),d.RND=new d.RandomDataGenerator(this.seed),this.gameTitle=l(t,"title",""),this.gameURL=l(t,"url","https://phaser.io"),this.gameVersion=l(t,"version",""),this.autoFocus=l(t,"autoFocus",!0),this.domCreateContainer=l(t,"dom.createContainer",!1),this.domBehindCanvas=l(t,"dom.behindCanvas",!1),this.inputKeyboard=l(t,"input.keyboard",!0),this.inputKeyboardEventTarget=l(t,"input.keyboard.target",window),this.inputKeyboardCapture=l(t,"input.keyboard.capture",[]),this.inputMouse=l(t,"input.mouse",!0),this.inputMouseEventTarget=l(t,"input.mouse.target",null),this.inputMouseCapture=l(t,"input.mouse.capture",!0),this.inputTouch=l(t,"input.touch",h.input.touch),this.inputTouchEventTarget=l(t,"input.touch.target",null),this.inputTouchCapture=l(t,"input.touch.capture",!0),this.inputActivePointers=l(t,"input.activePointers",1),this.inputSmoothFactor=l(t,"input.smoothFactor",0),this.inputWindowEvents=l(t,"input.windowEvents",!0),this.inputGamepad=l(t,"input.gamepad",!1),this.inputGamepadEventTarget=l(t,"input.gamepad.target",window),this.disableContextMenu=l(t,"disableContextMenu",!1),this.audio=l(t,"audio"),this.hideBanner=!1===l(t,"banner",null),this.hidePhaser=l(t,"banner.hidePhaser",!1),this.bannerTextColor=l(t,"banner.text","#ffffff"),this.bannerBackgroundColor=l(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=l(t,"fps",null);var i=l(t,"render",t);this.antialias=l(i,"antialias",!0),this.antialiasGL=l(i,"antialiasGL",!0),this.mipmapFilter=l(i,"mipmapFilter","LINEAR"),this.desynchronized=l(i,"desynchronized",!1),this.roundPixels=l(i,"roundPixels",!1),this.pixelArt=l(i,"pixelArt",1!==this.zoom),this.pixelArt&&(this.antialias=!1,this.roundPixels=!0),this.transparent=l(i,"transparent",!1),this.clearBeforeRender=l(i,"clearBeforeRender",!0),this.premultipliedAlpha=l(i,"premultipliedAlpha",!0),this.failIfMajorPerformanceCaveat=l(i,"failIfMajorPerformanceCaveat",!1),this.powerPreference=l(i,"powerPreference","default"),this.batchSize=l(i,"batchSize",4096),this.maxTextures=l(i,"maxTextures",-1),this.maxLights=l(i,"maxLights",10);var n=l(t,"backgroundColor",0);this.backgroundColor=g(n),0===n&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=l(t,"callbacks.preBoot",f),this.postBoot=l(t,"callbacks.postBoot",f),this.physics=l(t,"physics",{}),this.defaultPhysicsSystem=l(this.physics,"default",!1),this.loaderBaseURL=l(t,"loader.baseURL",""),this.loaderPath=l(t,"loader.path",""),this.loaderMaxParallelDownloads=l(t,"loader.maxParallelDownloads",32),this.loaderCrossOrigin=l(t,"loader.crossOrigin",void 0),this.loaderResponseType=l(t,"loader.responseType",""),this.loaderAsync=l(t,"loader.async",!0),this.loaderUser=l(t,"loader.user",""),this.loaderPassword=l(t,"loader.password",""),this.loaderTimeout=l(t,"loader.timeout",0),this.loaderWithCredentials=l(t,"loader.withCredentials",!1),this.installGlobalPlugins=[],this.installScenePlugins=[];var s=l(t,"plugins",null),r=p.DefaultScene;s&&(Array.isArray(s)?this.defaultPlugins=s:c(s)&&(this.installGlobalPlugins=u(s,"global",[]),this.installScenePlugins=u(s,"scene",[]),Array.isArray(s.default)?r=s.default:Array.isArray(s.defaultMerge)&&(r=r.concat(s.defaultMerge)))),this.defaultPlugins=r;var o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=l(t,"images.default",o+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=l(t,"images.missing",o+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),window&&(window.FORCE_WEBGL?this.renderType=a.WEBGL:window.FORCE_CANVAS&&(this.renderType=a.CANVAS))}});t.exports=s},function(t,e,i){t.exports={os:i(119),browser:i(120),features:i(174),input:i(731),audio:i(732),video:i(733),fullscreen:i(734),canvasFeatures:i(320)}},function(t,e,i){var n,s,r,o=i(26),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var i=new Image;i.onload=function(){var t=o.create(i,6,1).getContext("2d");if(t.globalCompositeOperation="multiply",t.drawImage(r,0,0),t.drawImage(i,2,0),!t.getImageData(2,0,1,1))return!1;var e=t.getImageData(2,0,1,1).data;o.remove(i),a.supportNewBlendModes=255===e[0]&&0===e[1]&&0===e[2]},i.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");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);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},function(t,e){t.exports=function(t){return 0<=(t%=2*Math.PI)?t:t+2*Math.PI}},function(t,e){t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return s*s+r*r}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),e-ir[0]&&(e=1),r[8]>r[3*e+e]&&(e=2),i=a[e],n=a[i],s=Math.sqrt(r[3*e+e]-r[3*i+i]-r[3*n+n]+1),h[e]=.5*s,s=.5/s,h[i]=(r[3*i+e]+r[3*e+i])*s,h[n]=(r[3*n+e]+r[3*e+n])*s,this.x=h[0],this.y=h[1],this.z=h[2],this.w=(r[3*n+i]-r[3*i+n])*s),this}});t.exports=d},function(t,e,a){var h=a(341),u=a(26),l=a(33),c=a(174);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===l.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==l.HEADLESS)if(e.renderType===l.CANVAS||e.renderType!==l.CANVAS&&!c.webGL){if(!c.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");e.renderType=l.CANVAS}else e.renderType=l.WEBGL;e.antialias||u.disableSmoothing();var i,n,s=t.scale.baseSize,r=s.width,o=s.height;e.canvas?(t.canvas=e.canvas,t.canvas.width=r,t.canvas.height=o):t.canvas=u.create(t,r,o,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||h.setCrisp(t.canvas),e.renderType!==l.HEADLESS&&(i=a(506),n=a(509),e.renderType===l.WEBGL?t.renderer=new n(t):(t.renderer=new i(t),t.context=t.renderer.gameContext))}},function(t,e){t.exports={setCrisp:function(e){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach(function(t){e.style["image-rendering"]=t}),e.style.msInterpolationMode="nearest-neighbor",e},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},function(t,e,i){var u=i(33);t.exports=function(t){var e,i,n,s,r,o,a,h=t.config;h.hideBanner||(e="WebGL",h.renderType===u.CANVAS?e="Canvas":h.renderType===u.HEADLESS&&(e="Headless"),i=h.audio,a=!(n=t.device.audio).webAudio||i&&i.disableWebAudio?i&&i.noAudio||!n.webAudio&&!n.audioData?"No Audio":"HTML5 Audio":"Web Audio",t.device.browser.ie?window.console&&console.log("Phaser v"+u.VERSION+" / https://phaser.io"):(r=[s=""],Array.isArray(h.bannerBackgroundColor)?(h.bannerBackgroundColor.forEach(function(t){s=s.concat("%c "),r.push("background: "+t),o=t}),r[r.length-1]="color: "+h.bannerTextColor+"; background: "+o):(s=s.concat("%c "),r.push("color: "+h.bannerTextColor+"; background: "+h.bannerBackgroundColor)),r.push("background: #fff"),h.gameTitle&&(s=s.concat(h.gameTitle),h.gameVersion&&(s=s.concat(" v"+h.gameVersion)),h.hidePhaser||(s=s.concat(" / "))),h.hidePhaser||(s=s.concat("Phaser v"+u.VERSION+" ("+e+" | "+a+")")),s=s.concat(" %c "+h.gameURL),r[0]=s,console.log.apply(console,r)))}},function(t,e,i){var n=i(0),s=i(6),r=i(1),o=i(344),a=new n({initialize:function(t,e){this.game=t,this.raf=new o,this.started=!1,this.running=!1,this.minFps=s(e,"min",5),this.targetFps=s(e,"target",60),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=s(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=s(e,"deltaHistory",10),this.panicMax=s(e,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=s(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;for(var e=this.framesThisSecond=0;ethis._min&&(r=n[i],r=Math.min(r,this._min)),n[i]=r,this.deltaIndex++,this.deltaIndex>s&&(this.deltaIndex=0);for(var a=o=0;athis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var h=o/this._target;this.callback(t,o,h),this.lastTime=t,this.frame++},tick:function(){this.step()},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running||(t&&(this.startTime+=-this.lastTime+(this.lastTime+window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step())},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.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0,this.target=0;var n=this;this.step=function t(){var e=window.performance.now();n.lastTime=n.tick,n.tick=e,n.callback(e),n.timeOutID=window.requestAnimationFrame(t)},this.stepTimeout=function t(){var e=Date.now(),i=Math.min(Math.max(2*n.target+n.tick-e,0),n.target);n.lastTime=n.tick,n.tick=e,n.callback(e),n.timeOutID=window.setTimeout(t,i)}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.target=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=s}});t.exports=r},function(t,e,i){var n=i(20);t.exports=function(t){var e,i=t.events;void 0!==document.hidden?e="visibilitychange":["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(n.HIDDEN):i.emit(n.VISIBLE)},!1),window.onblur=function(){i.emit(n.BLUR)},window.onfocus=function(){i.emit(n.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},function(t,e,i){var m=i(347),y=i(26),x=i(6);t.exports=function(t){var e=x(t,"data",[]),i=x(t,"canvas",null),n=x(t,"palette",m),s=x(t,"pixelWidth",1),r=x(t,"pixelHeight",s),o=x(t,"resizeCanvas",!0),a=x(t,"clearCanvas",!0),h=x(t,"preRender",null),u=x(t,"postRender",null),l=Math.floor(Math.abs(e[0].length*s)),c=Math.floor(Math.abs(e.length*r));i||(i=y.create2D(this,l,c),a=o=!1),o&&(i.width=l,i.height=c);var d=i.getContext("2d");a&&d.clearRect(0,0,l,c),h&&h(i,d);for(var f=0;fi.length-2?i.length-1:s+1],u=i[s>i.length-3?i.length-1:s+2];return e.set(l(r,o.x,a.x,h.x,u.x),l(r,o.y,a.y,h.y,u.y))},toJSON:function(){for(var t=[],e=0;ei.width?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE;if("number"==typeof window.orientation)return 0===window.orientation||180===window.orientation?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return s.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return s.ORIENTATION.LANDSCAPE}return tthis.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var e=this.listeners;window.removeEventListener("orientationchange",e.orientationChange,!1),window.removeEventListener("resize",e.windowResize,!1);["webkit","moz",""].forEach(function(t){document.removeEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.removeEventListener(t+"fullscreenerror",e.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",e.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===c.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===c.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=v},function(t,e,i){var n=i(17),s=i(0),r=i(93),o=i(3),a=new s({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=null),this._width=t,this._height=e,this._parent=n,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=n(t,0,this.maxWidth),this.minHeight=n(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=n(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=n(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=n(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=n(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 n=this.snapTo,s=0===e?1:t/e;return i&&this.aspectRatio>s||!i&&this.aspectRatios)&&(t=(e=r(e,n.y))*this.aspectRatio,0r.START&&n.settings.status<=r.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e=r.LOADING&&i.settings.status=r.x&&t=r.y&&e=r.x&&t=r.y&&e=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s>4,u[a++]=(15&i)<<4|n>>2,u[a++]=(3&n)<<6|63&s;return h}},function(t,e,i){var n=i(130),s=i(0),r=i(59),o=new s({Extends:n,initialize:function(t,e,i){if(void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),!this.audioBuffer)throw new Error('There is no audio asset with key "'+e+'" in the audio cache');this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,n.call(this,t,e,i)},play:function(t,e){return!!n.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(r.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime>>16,v=(65280&d)>>>8,m=255&d,u.strokeStyle="rgba("+g+","+v+","+m+","+l+")",u.lineWidth=p,y+=3;break;case x.FILL_STYLE:f=a[y+1],c=a[y+2],g=(16711680&f)>>>16,v=(65280&f)>>>8,m=255&f,u.fillStyle="rgba("+g+","+v+","+m+","+c+")",y+=2;break;case x.BEGIN_PATH:u.beginPath();break;case x.CLOSE_PATH:u.closePath();break;case x.FILL_PATH:o||u.fill();break;case x.STROKE_PATH:o||u.stroke();break;case x.FILL_RECT:o?u.rect(a[y+1],a[y+2],a[y+3],a[y+4]):u.fillRect(a[y+1],a[y+2],a[y+3],a[y+4]),y+=4;break;case x.FILL_TRIANGLE:u.beginPath(),u.moveTo(a[y+1],a[y+2]),u.lineTo(a[y+3],a[y+4]),u.lineTo(a[y+5],a[y+6]),u.closePath(),o||u.fill(),y+=6;break;case x.STROKE_TRIANGLE:u.beginPath(),u.moveTo(a[y+1],a[y+2]),u.lineTo(a[y+3],a[y+4]),u.lineTo(a[y+5],a[y+6]),u.closePath(),o||u.stroke(),y+=6;break;case x.LINE_TO:u.lineTo(a[y+1],a[y+2]),y+=2;break;case x.MOVE_TO:u.moveTo(a[y+1],a[y+2]),y+=2;break;case x.LINE_FX_TO:u.lineTo(a[y+1],a[y+2]),y+=5;break;case x.MOVE_FX_TO:u.moveTo(a[y+1],a[y+2]),y+=5;break;case x.SAVE:u.save();break;case x.RESTORE:u.restore();break;case x.TRANSLATE:u.translate(a[y+1],a[y+2]),y+=2;break;case x.SCALE:u.scale(a[y+1],a[y+2]),y+=2;break;case x.ROTATE:u.rotate(a[y+1]),y+=1;break;case x.GRADIENT_FILL_STYLE:y+=5;break;case x.GRADIENT_LINE_STYLE:y+=6;break;case x.SET_TEXTURE:y+=2}}u.restore()}}},function(t,e,i){var n=i(0),o=i(2),s=new n({initialize:function(t,e,i,n,s){var r;"object"==typeof t?(t=o(r=t,"x",0),e=o(r,"y",0),i=o(r,"power",0),n=o(r,"epsilon",100),s=o(r,"gravity",50)):(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===s&&(s=50)),this.x=t,this.y=e,this.active=!0,this._gravity=s,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i,n,s=this.x-t.x,r=this.y-t.y,o=s*s+r*r;0!==o&&(i=Math.sqrt(o),oe.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(0this._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=n},function(t,e){t.exports=function(t,e){for(var i=0;id.PI2?s=d.PI2:s<0&&(s=d.PI2+s%d.PI2);for(var a,h=[r+Math.cos(n)*i,o+Math.sin(n)*i];e<1;)a=s*e+n,h.push(r+Math.cos(a)*i,o+Math.sin(a)*i),e+=t;return a=s+n,h.push(r+Math.cos(a)*i,o+Math.sin(a)*i),h.push(r+Math.cos(n)*i,o+Math.sin(n)*i),this.pathIndexes=l(h),this.pathData=h,this}});t.exports=r},function(t,e,i){var n=i(0),s=i(1007),r=i(66),o=i(9),a=i(29),h=new n({Extends:a,Mixins:[s],initialize:function(t,e,i,n,s,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Curve",n),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(e,i),void 0!==s&&this.setFillStyle(s,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=[],n=this.geom.getPoints(e),s=0;st.right||e.rightt.bottom||e.bottome.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottomt.width*t.height)&&(e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(s.BUTTON_DOWN,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(s.BUTTON_UP,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=r},function(t,e,i){var a=i(451),h=i(452),n=i(0),u=i(11),l=i(3),s=new n({Extends:u,initialize:function(t,e){u.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],n=0;n=s;for(this.fixedStep||(n=.001*e,o=!0,this._elapsed=0),h=0;h=s;)this._elapsed-=s,this.step(n)}},step:function(t){for(var e,i=this.bodies.entries,n=i.length,s=0;sc)&&(d.xl))return this.separateCircle(t,e,s)}var f=!1,p=!1;s?(f=S(t,e,s,this.OVERLAP_BIAS),p=C(t,e,s,this.OVERLAP_BIAS)):this.forceX||Math.abs(this.gravity.y+t.gravity.y)=e.right||t.position.y>=e.bottom))},circleBodyIntersects:function(t,e){var i=p(t.center.x,e.left,e.right),n=p(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o;t.isParent&&void 0===t.physicsType&&(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var a=Array.isArray(t),h=Array.isArray(e);if(this._total=0,a||h)if(!a&&h)for(o=0;od.baseTileWidth&&(h-=a=(d.tileWidth-d.baseTileWidth)*e.scaleX,l+=a),d.tileHeight>d.baseTileHeight&&(c+=(d.tileHeight-d.baseTileHeight)*e.scaleY);var f=e.getTilesWithinWorldXY(h,u,l,c);return 0!==f.length&&this.collideSpriteVsTilesHandler(t,f,i,n,s,r,!0)},collideSpriteVsTilesHandler:function(t,e,i,n,s,r,o){for(var a,h,u=t.body,l={left:0,right:0,top:0,bottom:0},c=!1,d=0;de.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,r=this.blocked.right=!0),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,r=this.blocked.down=!0),r&&(this.blocked.none=!1),r},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this.updateCenter(),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n,s,r=this.gameObject;return!t&&r.frame&&(t=r.frame.realWidth),!e&&r.frame&&(e=r.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&&r.getCenter&&(n=(r.width-t)/2,s=(r.height-e)/2,this.offset.set(n,s)),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),0=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 0e._dx?r<(s=t.right-e.x)&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?s=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0,e.physicsType===o.STATIC_BODY&&(t.blocked.none=!1,t.blocked.right=!0),t.physicsType===o.STATIC_BODY&&(e.blocked.none=!1,e.blocked.left=!0)):t._dxe._dy?r<(s=t.bottom-e.y)&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?s=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0,e.physicsType===o.STATIC_BODY&&(t.blocked.none=!1,t.blocked.down=!0),t.physicsType===o.STATIC_BODY&&(e.blocked.none=!1,e.blocked.up=!0)):t._dy=t.minX&&e.maxY>=t.minY}function p(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,s){for(var r,o=[e,i];o.length;)(i=o.pop())-(e=o.pop())<=n||(r=e+Math.ceil((i-e)/n/2)*n,a(t,r,e,i,s),o.push(e,r,r,i))}n.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!u(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;sthis._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),o=p(i.children.splice(r,i.children.length-r));o.height=i.height,o.leaf=i.leaf,f(i,this.toBBox),f(o,this.toBBox),e?t[e-1].children.push(o):this._splitRoot(i,o)},_splitRoot:function(t,e){this.data=p([t,e]),this.data.height=t.height+1,this.data.leaf=!1,f(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){for(var n,s,r,o,a,h,u,l,c,d,f,p,g=a=1/0,v=e;v<=i-e;v++)n=m(t,0,v,this.toBBox),s=m(t,v,i,this.toBBox),u=n,l=s,p=f=d=c=void 0,c=Math.max(u.minX,l.minX),d=Math.max(u.minY,l.minY),f=Math.min(u.maxX,l.maxX),p=Math.min(u.maxY,l.maxY),r=Math.max(0,f-c)*Math.max(0,p-d),o=y(n)+y(s),r=t.right||e.position.y>=t.bottom)}},function(t,e,i){var n=i(56),s=i(0),r=i(51),o=i(48),a=i(3),h=new s({initialize:function(t,e){var i=e.displayWidth?e.displayWidth:64,n=e.displayHeight?e.displayHeight:64;this.world=t,this.gameObject=e,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-n*e.originY),this.width=i,this.height=n,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.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).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 n,s,r=this.gameObject;return!t&&r.frame&&(t=r.frame.realWidth),!e&&r.frame&&(e=r.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&&r.getCenter&&(n=r.displayWidth/2,s=r.displayHeight/2,this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(n-this.halfWidth,s-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y),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),0=r.layers.length){if(s.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}r=s.pop()}else{var o,a=r.layers[r.i];if(r.i++,"tilelayer"===a.type)if(a.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+a.name+"'");else{if(a.encoding&&"base64"===a.encoding){if(a.chunks)for(var h=0;h>>0;return n}},function(t,e,i){var h=i(2),u=i(231);t.exports=function(t){for(var e=[],i=[],n=u(t);n.i=n.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}n=i.pop()}else{var s,r,o,a=n.layers[n.i];n.i++,"imagelayer"===a.type?(s=h(a,"offsetx",0)+h(a,"startx",0),r=h(a,"offsety",0)+h(a,"starty",0),e.push({name:n.name+a.name,image:a.image,x:n.x+s+a.x,y:n.y+r+a.y,alpha:n.opacity*a.opacity,visible:n.visible&&a.visible,properties:h(a,"properties",{})})):"group"===a.type&&(o=u(t,a,n),i.push(n),n=o)}return e}},function(t,e,i){var x=i(105),T=i(486),w=i(232);t.exports=function(t){for(var e,i=[],n=[],s=null,r=0;r=this.firstgid&&t=n.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}n=i.pop()}else{var s,r=n.layers[n.i];if(n.i++,r.opacity*=n.opacity,r.visible=n.visible&&r.visible,"objectgroup"===r.type){r.name=n.name+r.name;for(var o=n.x+d(r,"startx",0)+d(r,"offsetx",0),a=n.y+d(r,"starty",0)+d(r,"offsety",0),h=[],u=0;un&&(n=e.layer[r].width),e.layer[r].height>s&&(s=e.layer[r].height);var o=new h({width:n,height:s,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:a.WELTMEISTER});return o.layers=u(e,i),o.tilesets=l(e),o}},function(t,e,i){var d=i(103),f=i(74);t.exports=function(t,e){for(var i=[],n=0;nx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(1===m)for(h=0;hx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(2===m)for(h=f-1;0<=h;h--)for(u=0;ux||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(3===m)for(h=f-1;0<=h;h--)for(u=d-1;0<=u;u--)!(a=v[h][u])||a.indexx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));return this.dirty[e]=!1,null===r&&(r=n.createVertexBuffer(o,s.STATIC_DRAW),this.vertexBuffer[e]=r),n.setVertexBuffer(r),i.setAttribPointers(),s.bufferSubData(s.ARRAY_BUFFER,0,o),this},batchTile:function(t,e,i,n,s,r,o){var a=i.getTileTextureCoordinates(e.index);if(!a)return t;var h=i.tileWidth,u=i.tileHeight,l=h/2,c=u/2,d=a.x/n,f=a.y/s,p=(a.x+h)/n,g=(a.y+u)/s,v=this._tempMatrix,m=-l,y=-c;e.flipX&&(h*=-1,m+=i.tileWidth),e.flipY&&(u*=-1,y+=i.tileHeight);var x=m+h,T=y+u;v.applyITRS(l+e.pixelX,c+e.pixelY,e.rotation,1,1);var w=L.getTintAppendFloatAlpha(16777215,r.alpha*this.alpha*e.alpha),E=v.getX(m,y),_=v.getY(m,y),A=v.getX(m,T),b=v.getY(m,T),S=v.getX(x,T),C=v.getY(x,T),M=v.getX(x,y),O=v.getY(x,y);r.roundPixels&&(E=Math.round(E),_=Math.round(_),A=Math.round(A),b=Math.round(b),S=Math.round(S),C=Math.round(C),M=Math.round(M),O=Math.round(O));var R=this.vertexViewF32[o],P=this.vertexViewU32[o];return R[++t]=E,R[++t]=_,R[++t]=d,R[++t]=f,R[++t]=0,R[++t]=0,P[++t]=w,R[++t]=A,R[++t]=b,R[++t]=d,R[++t]=g,R[++t]=0,R[++t]=0,P[++t]=w,R[++t]=S,R[++t]=C,R[++t]=p,R[++t]=g,R[++t]=0,R[++t]=0,P[++t]=w,R[++t]=E,R[++t]=_,R[++t]=d,R[++t]=f,R[++t]=0,R[++t]=0,P[++t]=w,R[++t]=S,R[++t]=C,R[++t]=p,R[++t]=g,R[++t]=0,R[++t]=0,P[++t]=w,R[++t]=M,R[++t]=O,R[++t]=p,R[++t]=f,R[++t]=0,R[++t]=0,P[++t]=w,this.vertexCount[o]+=6,t},setRenderOrder:function(t){if("string"==typeof t&&(t=["right-down","left-down","right-up","left-up"].indexOf(t)),0<=t&&t<4){this._renderOrder=t;for(var e=0;e=this.nextTick&&this.currentAnim.setFrame(this)}},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),e.setSizeToFrame(),e._originComponent&&(t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin()),e},updateFrame:function(t){var e,i=this.setCurrentFrame(t);this.isPlaying&&(t.setAlpha&&(i.alpha=t.alpha),e=this.currentAnim,i.emit(r.SPRITE_ANIMATION_KEY_UPDATE+e.key,e,t,i),i.emit(r.SPRITE_ANIMATION_UPDATE,e,t,i),3===this._pendingStop&&this._pendingStopValue===t&&this.currentAnim.completeAnimation(this))},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},setYoyo:function(t){return void 0===t&&(t=!1),this._yoyo=t,this.parent},getYoyo:function(){return this._yoyo},destroy:function(){this.animationManager.off(r.REMOVE_ANIMATION,this.remove,this),this.animationManager=null,this.parent=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null}});t.exports=o},function(t,e,i){var l=i(507),p=i(40),n=i(0),s=i(33),r=i(508),o=i(92),a=i(30),h=new n({initialize:function(t){this.game=t,this.type=s.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.config={clearBeforeRender:t.config.clearBeforeRender,backgroundColor:t.config.backgroundColor,resolution:t.config.resolution,antialias:t.config.antialias,roundPixels:t.config.roundPixels},this.gameCanvas=t.canvas;var e={alpha:t.config.transparent,desynchronized:t.config.desynchronized};this.gameContext=this.game.config.context?this.game.config.context:this.gameCanvas.getContext("2d",e),this.currentContext=this.gameContext,this.antialias=t.config.antialias,this.blendModes=r(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new a,this._tempMatrix2=new a,this._tempMatrix3=new a,this._tempMatrix4=new a,this.init()},init:function(){this.game.scale.on(o.RESIZE,this.onResize,this);var t=this.game.scale.baseSize;this.resize(t.width,t.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},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,n=this.height;t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),e.clearBeforeRender&&t.clearRect(0,0,i,n),e.transparent||(t.fillStyle=e.backgroundColor.rgba,t.fillRect(0,0,i,n)),t.save(),this.drawCount=0},render:function(t,e,i,n){var s=e.list,r=s.length,o=n._cx,a=n._cy,h=n._cw,u=n._ch,l=n.renderToTexture?n.context:t.sys.context;l.save(),this.game.scene.customViewports&&(l.beginPath(),l.rect(o,a,h,u),l.clip()),this.currentContext=l;var c=n.mask;c&&c.preRenderCanvas(this,null,n._maskCamera),n.transparent||(l.fillStyle=n.backgroundColor.rgba,l.fillRect(o,a,h,u)),l.globalAlpha=n.alpha,l.globalCompositeOperation="source-over",this.drawCount+=s.length,n.renderToTexture&&n.emit(p.PRE_RENDER,n),n.matrix.copyToContext(l);for(var d=0;d>>0;if("function"!=typeof t)throw new TypeError;for(var n=2<=arguments.length?arguments[1]:void 0,s=0;sthis.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.zoom<.001&&(e.zoom=.001)))},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},function(t,e,i){t.exports={Camera:i(297),BaseCamera:i(91),CameraManager:i(703),Effects:i(305),Events:i(40)}},function(t,e){t.exports="cameradestroy"},function(t,e){t.exports="camerafadeincomplete"},function(t,e){t.exports="camerafadeinstart"},function(t,e){t.exports="camerafadeoutcomplete"},function(t,e){t.exports="camerafadeoutstart"},function(t,e){t.exports="cameraflashcomplete"},function(t,e){t.exports="cameraflashstart"},function(t,e){t.exports="camerapancomplete"},function(t,e){t.exports="camerapanstart"},function(t,e){t.exports="postrender"},function(t,e){t.exports="prerender"},function(t,e){t.exports="camerarotatecomplete"},function(t,e){t.exports="camerarotatestart"},function(t,e){t.exports="camerashakecomplete"},function(t,e){t.exports="camerashakestart"},function(t,e){t.exports="camerazoomcomplete"},function(t,e){t.exports="camerazoomstart"},function(t,e,i){var n=i(17),s=i(0),u=i(40),r=new s({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,n,s,r,o,a){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=!1),void 0===o&&(o=null),void 0===a&&(a=this.camera.scene),!r&&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=n,this.blue=s,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=o,this._onUpdateScope=a;var h=t?u.FADE_OUT_START:u.FADE_IN_START;return this.camera.emit(h,this.camera,this,e,i,n,s),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsedthis.source?Math.abs(this.destination-this.source):Math.abs(this.destination+h)-this.source)<(l=this.source>this.destination?Math.abs(this.source-this.destination):Math.abs(this.source+h)-this.destination)?this.clockwise=!0:lMath.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},function(t,e,i){var n=i(121);t.exports=function(){return n(-Math.PI,Math.PI)}},function(t,e,i){var n=i(121);t.exports=function(){return n(-180,180)}},function(t,e,i){var n=i(323);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(13);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(e>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return 2.3283064365386963e-10*((this.n=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;e=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}s++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getTangentAt(h,e)}s++}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 r([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 o(t.x,t.y)):this.add(new o(t,e))},toJSON:function(){for(var t=[],e=0;e>16&255,g:t>>8&255,b:255&t,a:255};return 16777215>>24),e}},function(t,e,i){var h=i(31),u=i(356);t.exports=function(t,e,i){var n,s,r=i,o=i,a=i;return 0!==e&&(r=u(s=2*i-(n=i<.5?i*(1+e):i+e-i*e),n,t+1/3),o=u(s,n,t),a=u(s,n,t-1/3)),(new h).setGLTo(r,o,a,1)}},function(t,e,i){var s=i(171);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}},function(t,e,i){function o(t,e,i,n,s,r,o,a){void 0===o&&(o=100),void 0===a&&(a=0);var h=a/o;return{r:u(t,n,h),g:u(e,s,h),b:u(i,r,h)}}var u=i(118);t.exports={RGBWithRGB:o,ColorWithRGB:function(t,e,i,n,s,r){return void 0===s&&(s=100),void 0===r&&(r=0),o(t.r,t.g,t.b,e,i,n,s,r)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),o(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(177),s=i(31);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new s(n(t,e),n(t,e),n(t,e))}},function(t,e,i){var r=i(355);t.exports=function(t,e,i,n,s){return void 0===n&&(n=255),void 0===s&&(s="#"),"#"===s?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1):"0x"+r(n)+r(t)+r(e)+r(i)}},function(t,e,i){t.exports={BitmapMask:i(282),GeometryMask:i(283)}},function(t,e,i){var n={AddToDOM:i(124),DOMContentLoaded:i(357),GetScreenOrientation:i(358),GetTarget:i(363),ParseXML:i(364),RemoveFromDOM:i(184),RequestAnimationFrame:i(344)};t.exports=n},function(t,e,i){t.exports={EventEmitter:i(823)}},function(t,e,i){var n=i(0),s=i(11),r=i(23),o=new n({Extends:s,initialize:function(){s.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",o,"events"),t.exports=o},function(t,e,i){var n=i(124),s=i(293),r=i(296),o=i(26),a=i(0),h=i(318),u=i(825),l=i(340),c=i(115),d=i(342),f=i(319),p=i(357),g=i(11),v=i(20),m=i(365),y=i(23),x=i(370),T=i(371),w=i(373),E=i(123),_=i(376),A=i(343),b=i(345),S=i(380),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 g,this.anims=new s(this),this.textures=new _(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=S.create(this),this.loop=new A(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(),l(this),u(this),d(this),n(this.canvas,this.config.parent),this.textures.once(E.READY,this.texturesReady,this),this.events.emit(v.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(v.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)),b(this);var t=this.events;t.on(v.HIDDEN,this.onHidden,this),t.on(v.VISIBLE,this.onVisible,this),t.on(v.BLUR,this.onBlur,this),t.on(v.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e);var n=this.renderer;n.preRender(),i.emit(v.PRE_RENDER,n,t,e),this.scene.render(n),n.postRender(),i.emit(v.POST_RENDER,n,t,e)},headlessStep:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e),i.emit(v.PRE_RENDER),i.emit(v.POST_RENDER)},onHidden:function(){this.loop.pause(),this.events.emit(v.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(v.RESUME)},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(v.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},function(t,e,i){var n=i(124);t.exports=function(t){var e,i=t.config;i.parent&&i.domCreateContainer&&((e=document.createElement("div")).style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: none;","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=e,n(e,i.parent))}},function(t,e){t.exports="boot"},function(t,e){t.exports="destroy"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameout"},function(t,e){t.exports="gameover"},function(t,e){t.exports="gameobjectdown"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameobjectmove"},function(t,e){t.exports="gameobjectout"},function(t,e){t.exports="gameobjectover"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="wheel"},function(t,e){t.exports="gameobjectup"},function(t,e){t.exports="gameobjectwheel"},function(t,e){t.exports="boot"},function(t,e){t.exports="process"},function(t,e){t.exports="update"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointerdownoutside"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="pointerupoutside"},function(t,e){t.exports="wheel"},function(t,e){t.exports="pointerlockchange"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="start"},function(t,e){t.exports="update"},function(t,e){t.exports=function(t){if(!t)return window.innerHeight;var e=Math.abs(window.orientation),i={w:0,h:0},n=document.createElement("div");return n.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(n),i.w=90===e?n.offsetHeight:window.innerWidth,i.h=90===e?window.innerWidth:n.offsetHeight,document.documentElement.removeChild(n),n=null,90!==Math.abs(window.orientation)?i.h:i.w}},function(t,e){t.exports="addfile"},function(t,e){t.exports="complete"},function(t,e){t.exports="filecomplete"},function(t,e){t.exports="filecomplete-"},function(t,e){t.exports="loaderror"},function(t,e){t.exports="load"},function(t,e){t.exports="fileprogress"},function(t,e){t.exports="postprocess"},function(t,e){t.exports="progress"},function(t,e){t.exports="start"},function(t,e,i){var r=i(2),o=i(187);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=r(t.settings,"physics",!1);if(e||i){var n=[];if(e&&n.push(o(e+"Physics")),i)for(var s in i)s=o(s.concat("Physics")),-1===n.indexOf(s)&&n.push(s);return n}}},function(t,e,i){var n=i(2);t.exports=function(t){var e=t.plugins.getDefaultScenePlugins(),i=n(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},function(t,e,i){t.exports={game:"game",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"}},function(t,e){t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var s=i.getElementsByTagName("SubTexture"),r=0;r=t.length)throw new Error("Supplied index out of bounds");return n!==i&&(t.splice(n,1),t.splice(i,0,e)),e}},function(t,e){t.exports=function(t,e){var i,n,s=t.indexOf(e);return-1!==s&&st.length-1)throw new Error("Index out of bounds");var s=r(t,e);return i&&i.call(n,s),s}},function(t,e,i){var u=i(68);t.exports=function(t,e,i,n,s){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===s&&(s=t),u(t,e,i)){var r=i-e,o=t.splice(e,r);if(n)for(var a=0;a?@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"}},function(t,e,i){var T=i(6);t.exports=function(t,e){var i=e.width,n=e.height,s=Math.floor(i/2),r=Math.floor(n/2),o=T(e,"chars","");if(""!==o){var a=T(e,"image",""),h=T(e,"offset.x",0),u=T(e,"offset.y",0),l=T(e,"spacing.x",0),c=T(e,"spacing.y",0),d=T(e,"lineSpacing",0),f=T(e,"charsPerRow",null);null===f&&(f=t.sys.textures.getFrame(a).width/i)>o.length&&(f=o.length);for(var p=h,g=u,v={retroFont:!0,font:a,size:i,lineHeight:n+d,chars:{}},m=0,y=0;yr.vertexCapacity&&r.flush();for(var g=r.setGameObject(e),v=r.vertexViewF32,m=r.vertexViewU32,y=r.vertexCount*r.vertexComponentCount-1,x=0,T=e.tintFill,w=0;w=i&&t.x<=n&&t.y>=s&&t.y<=r}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===r&&(r=0),!(e>t.right+r||it.bottom+r||s=n&&(p.push(v),f=v)}var m=o[o.length-1];return y(f,m)i&&(i=a.x),a.xs&&(s=a.y),a.yn(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)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){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}},function(t,e,i){var r=i(9);t.exports=function(t,e,i,n,s){return void 0===s&&(s=new r),s.setTo(Math.min(t,i),Math.min(e,n),Math.abs(t-i),Math.abs(e-n))}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.centerX,e.y=t.centerY,e}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var r=i(173);t.exports=function(t,e,i){var n=t.centerX,s=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),r(t,n,s)}},function(t,e,i){var n=i(9),s=i(137);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(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}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){var a=i(4),h=i(39);t.exports=function(t,e,i){void 0===i&&(i=new a),e=h(e);var n=Math.sin(e),s=Math.cos(e),r=0=s||0=t.downTime+n)&&(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;it._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,n=0;n'),i.push(''),i.push(''),i.push(this.xhrLoader.responseText),i.push(""),i.push(""),i.push("");var n=[i.join("\n")],s=this;try{var r=new window.Blob(n,{type:"image/svg+xml;charset=utf-8"})}catch(t){return s.state=o.FILE_ERRORED,void s.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){u.revokeObjectURL(s.data),s.onProcessComplete()},this.data.onerror=function(){u.revokeObjectURL(s.data),s.onProcessError()},u.createObjectURL(this.data,r,"image/svg+xml")},addToCache:function(){var t=this.cache.addImage(this.key,this.data);this.pendingDestroy(t)}});s.register("htmlTexture",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;re.deltaAbsY()?g=-1:e.deltaAbsX()i&&s<(o=t.right-i)&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:c(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):0i&&s<(o=t.bottom-i)&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:c(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):0=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;this.systems.events.off(a.UPDATE,this.step,this),t.events.emit(a.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,n){return this.manager.add(t,e,i,n)},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 n=this.manager.getScene(e);return n&&n.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)},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(a.SHUTDOWN,this.shutdown,this),t.off(a.POST_UPDATE,this.step,this),t.off(a.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(a.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});r.register("ScenePlugin",o,"scenePlugin"),t.exports=o},function(t,e,i){t.exports={List:i(131),Map:i(167),ProcessQueue:i(192),RTree:i(471),Set:i(135),Size:i(372)}},function(t,e,i){var n=i(19),s=i(1317),r=n(!1,r={CanvasTexture:i(377),Events:i(123),FilterMode:s,Frame:i(95),Parsers:i(379),Texture:i(188),TextureManager:i(376),TextureSource:i(378)},s);t.exports=r},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){t.exports={Components:i(143),Parsers:i(1348),Formats:i(32),ImageCollection:i(486),ParseToTilemap:i(233),Tile:i(74),Tilemap:i(495),TilemapCreator:i(1362),TilemapFactory:i(1363),Tileset:i(105),LayerData:i(103),MapData:i(104),ObjectLayer:i(489),DynamicTilemapLayer:i(496),StaticTilemapLayer:i(497)}},function(t,e,i){var p=i(24),g=i(52);t.exports=function(t,e,i,n,s,r,o,a){t<0&&(t=0),e<0&&(e=0),void 0===o&&(o=!0);for(var h=p(t,e,i,n,null,a),u=s-t,l=r-e,c=0;c=t&&u.index<=e&&l(u,i)}n&&c(0,0,s.width,s.height,s)}}},function(t,e,i){var a=i(73),h=i(52),u=i(228);t.exports=function(t,e,i,n){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var s=0;s=s.delay&&(n=s.elapsed-s.delay,s.elapsed=s.delay,!s.hasDispatched&&s.callback&&(s.hasDispatched=!0,s.callback.apply(s.callbackScope,s.args)),0>2],s+=o[(3&i[r])<<4|i[r+1]>>4],s+=o[(15&i[r+1])<<2|i[r+2]>>6],s+=o[63&i[r+2]];return n%3==2?s=s.substring(0,s.length-1)+"=":n%3==1&&(s=s.substring(0,s.length-2)+"=="),s}},function(t,e,i){t.exports={Clone:i(67),Extend:i(19),GetAdvancedValue:i(15),GetFastValue:i(2),GetMinMaxValue:i(1388),GetValue:i(6),HasAll:i(1389),HasAny:i(407),HasValue:i(109),IsPlainObject:i(7),Merge:i(128),MergeRight:i(1390),Pick:i(487),SetValue:i(427)}},function(t,e,i){var o=i(6),a=i(17);t.exports=function(t,e,i,n,s){void 0===s&&(s=i);var r=o(t,e,s);return a(r,i,n)}},function(t,e){t.exports=function(t,e){for(var i=0;i=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=l},function(t,e){t.exports={getTintFromFloats:function(t,e,i,n){return((255&(255*n|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]},getComponentCount:function(t,e){for(var i=0,n=0;nr.width&&(i=Math.max(r.width-t,0)),e+n>r.height&&(n=Math.max(r.height-e,0));for(var u=[],l=e;lthis.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=u},function(t,e,i){var n=i(13);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e,i){t.exports={DESTROY:i(651),FADE_IN_COMPLETE:i(652),FADE_IN_START:i(653),FADE_OUT_COMPLETE:i(654),FADE_OUT_START:i(655),FLASH_COMPLETE:i(656),FLASH_START:i(657),PAN_COMPLETE:i(658),PAN_START:i(659),POST_RENDER:i(660),PRE_RENDER:i(661),ROTATE_COMPLETE:i(662),ROTATE_START:i(663),SHAKE_COMPLETE:i(664),SHAKE_START:i(665),ZOOM_COMPLETE:i(666),ZOOM_START:i(667)}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.fillColor,r=n||e.fillAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.fillStyle="rgba("+o+","+a+","+h+","+r+")"}},,function(t,e){t.exports=function(t,e){return t.y=e+t.height*t.originY,t}},function(t,e){t.exports=function(t,e){return t.x=e+t.width*t.originX,t}},function(t,e){t.exports=function(t,e){return t.x=e-t.width+t.width*t.originX,t}},function(t,e){t.exports=function(t,e){return t.y=e-t.height+t.height*t.originY,t}},function(t,e){t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},function(t,e){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)}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.strokeColor,r=n||e.strokeAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.strokeStyle="rgba("+o+","+a+","+h+","+r+")",t.lineWidth=e.lineWidth}},function(t,e){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}},function(t,e,i){var d=i(148),f=i(24);t.exports=function(t,e,i,n,s){for(var r,o,a,h,u=f(t,e,i,n,null,s),l=0;l=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}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e,i){t.exports={COMPLETE:i(899),DECODED:i(900),DECODED_ALL:i(901),DESTROY:i(902),DETUNE:i(903),GLOBAL_DETUNE:i(904),GLOBAL_MUTE:i(905),GLOBAL_RATE:i(906),GLOBAL_VOLUME:i(907),LOOP:i(908),LOOPED:i(909),MUTE:i(910),PAUSE_ALL:i(911),PAUSE:i(912),PLAY:i(913),RATE:i(914),RESUME_ALL:i(915),RESUME:i(916),SEEK:i(917),STOP_ALL:i(918),STOP:i(919),UNLOCKED:i(920),VOLUME:i(921)}},function(t,e,i){var n=i(0),h=i(18),u=i(21),s=i(8),l=i(2),c=i(6),d=i(7),r=new n({Extends:u,initialize:function(t,e,i,n,s){var r,o="json";d(e)&&(e=l(r=e,"key"),i=l(r,"url"),n=l(r,"xhrSettings"),o=l(r,"extension",o),s=l(r,"dataKey",s));var a={type:"json",cache:t.cacheManager.json,extension:o,responseType:"text",key:e,url:i,xhrSettings:n,config:s};u.call(this,t,a),d(i)&&(this.data=s?c(i,s):i,this.state=h.FILE_POPULATED)},onProcess:function(){var t,e;this.state!==h.FILE_POPULATED&&(this.state=h.FILE_PROCESSING,t=JSON.parse(this.xhrLoader.responseText),e=this.config,this.data="string"==typeof e?c(t,e,t):t),this.onProcessComplete()}});s.register("json",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&o=n.x&&n.x>=l&&s!==n.x&&T(ri.x||n.x===i.x&&function(t,e){return w(t.prev,t,e.prev)<0&&w(e.next,t,t.next)<0}(i,n)))&&(i=n,d=h)),n=n.next,n!==u;);return i}(t,e))&&(i=_(e,t),v(e,e.next),v(i,i.next))}}(u[s],i),i=v(i,i.next);return i}(t,e,d,i)),t.length>80*i){n=r=t[0],s=o=t[1];for(var p=i;pr.x?s.x>o.x?s.x:o.x:r.x>o.x?r.x:o.x,l=s.y>r.y?s.y>o.y?s.y:o.y:r.y>o.y?r.y:o.y,c=x(a,h,e,i,n),d=x(u,l,e,i,n),f=t.prevZ,p=t.nextZ;for(;f&&f.z>=c&&p&&p.z<=d;){if(f!==t.prev&&f!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,f.x,f.y)&&0<=w(f.prev,f,f.next))return!1;if(f=f.prevZ,p!==t.prev&&p!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&0<=w(p.prev,p,p.next))return!1;p=p.nextZ}for(;f&&f.z>=c;){if(f!==t.prev&&f!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,f.x,f.y)&&0<=w(f.prev,f,f.next))return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&0<=w(p.prev,p,p.next))return!1;p=p.nextZ}return!0}(t,n,s,r):function(t){var e=t.prev,i=t,n=t.next;if(0<=w(e,i,n))return!1;var s=t.next.next;for(;s!==t.prev;){if(T(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&0<=w(s.prev,s,s.next))return!1;s=s.next}return!0}(t))e.push(a.i/i),e.push(t.i/i),e.push(h.i/i),d(t),t=h.next,u=h.next;else if((t=h)===u){o?1===o?m(t=function(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!l(s,r)&&c(s,n,n.next,r)&&E(s,r)&&E(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),d(n),d(n.next),n=t=r),n=n.next}while(n!==t);return v(n)}(v(t),e,i),e,i,n,s,r,2):2===o&&function(t,e,i,n,s,r){var o=t;do{for(var a=o.next.next;a!==o.prev;){if(o.i!==a.i&&function(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&&c(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&(E(t,e)&&E(e,t)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;for(;i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next,i!==t;);return n}(t,e)&&(w(t.prev,t,e.prev)||w(t,e.prev,e))||l(t,e)&&0=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function u(t){return 0=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=l},function(t,e,i){var n=i(0),s=i(18),c=i(21),r=i(8),d=i(2),f=i(7),o=new n({Extends:c,initialize:function t(e,i,n,s,r){var o,a,h="png";f(i)&&(i=d(a=i,"key"),n=d(a,"url"),o=d(a,"normalMap"),s=d(a,"xhrSettings"),h=d(a,"extension",h),r=d(a,"frameConfig")),Array.isArray(n)&&(o=n[1],n=n[0]);var u,l={type:"image",cache:e.textureManager,extension:h,responseType:"blob",key:i,url:n,xhrSettings:s,config:r};c.call(this,e,l),o&&((u=new t(e,this.key,o,s,r)).type="normalMap",this.setLink(u),e.addFile(u))},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){c.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){c.revokeObjectURL(t.data),t.onProcessError()},c.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var t,e=this.linkFile;e&&e.state===s.FILE_COMPLETE?(t="image"===this.type?this.cache.addImage(this.key,this.data,e.data):this.cache.addImage(e.key,e.data,this.data),this.pendingDestroy(t),e.pendingDestroy(t)):e||(t=this.cache.addImage(this.key,this.data),this.pendingDestroy(t))}});r.register("image",function(t,e,i){if(Array.isArray(t))for(var n=0;nthis.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=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.tileToWorldX(this.x,t):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.tileToWorldY(this.y,t)-(this.height-this.baseHeight)*e.scaleY:this.y*this.baseHeight-(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 r),e.x=this.getLeft(),e.y=this.getTop(),e.width=this.getRight()-e.x,e.height=this.getBottom()-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},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=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){return 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),this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){return void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===s&&(s=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,s&&this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y),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,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight,this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||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=o},function(t,e,i){var n=i(0),r=i(12),o=i(14),s=i(976),a=new n({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,s],initialize:function(t,e,i,n,s){o.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new r.Animation(this),this.setTexture(n,s),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()},preUpdate:function(t,e){this.anims.update(t,e)},play:function(t,e,i){return this.anims.play(t,e,i),this},toJSON:function(){return r.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=a},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e,i){var n=new(i(0))({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},clone:function(){return new n(this.x,this.y,this.z)},crossVectors:function(t,e){var i=t.x,n=t.y,s=t.z,r=e.x,o=e.y,a=e.z;return this.x=n*a-s*o,this.y=s*r-i*a,this.z=i*o-n*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},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||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,n=t.z-this.z||0;return Math.sqrt(e*e+i*i+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return e*e+i*i+n*n},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,n=t*t+e*e+i*i;return 0=t.length)){for(var i=t.length-1,n=t[e],s=e;sh||a.y>u)?(l=Math.max(a.x,e),c=Math.max(a.y,i),E=d=Math.min(a.r,h)-l,_=f=Math.min(a.b,u)-c,T=r?p+(v-(l-a.x)-d):p+(l-a.x),w=o?g+(m-(c-a.y)-f):g+(c-a.y),e=l,i=c,n=d,s=f):_=E=w=T=0):(r&&(T=p+(v-e-n)),o&&(w=g+(m-i-s)));var A=this.source.width,S=this.source.height;return t.u0=Math.max(0,T/A),t.v0=Math.max(0,w/S),t.u1=Math.min(1,(T+E)/A),t.v1=Math.min(1,(w+_)/S),t.x=e,t.y=i,t.cx=T,t.cy=w,t.cw=E,t.ch=_,t.width=n,t.height=s,t.flipX=r,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,n,s,r){var o=this.data.drawImage;return o.width=t,o.height=e,this.u0=i,this.v0=n,this.u1=s,this.v1=r,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.width=i,s.height=n;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+n)/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 r(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=s(!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=r},function(t,e,i){var n=i(0),s=i(97),r=i(398),o=i(399),a=i(48),h=i(163),u=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=a.ELLIPSE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(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,n){return this.x=t,this.y=e,this.width=i,this.height=n,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=u},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){var B=i(245),n=i(0),r=i(91),Y=i(2),N=i(6),s=i(7),X=i(392),o=i(139),a=i(75),h=new n({initialize:function(t,e,i){i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?s(e[0])&&(i=e,e=null):s(e)&&(i=e,e=null),this.scene=t,this.children=new o,this.isParent=!0,this.type="Group",this.classType=Y(i,"classType",a),this.name=Y(i,"name",""),this.active=Y(i,"active",!0),this.maxSize=Y(i,"maxSize",-1),this.defaultKey=Y(i,"defaultKey",null),this.defaultFrame=Y(i,"defaultFrame",null),this.runChildUpdate=Y(i,"runChildUpdate",!1),this.createCallback=Y(i,"createCallback",null),this.removeCallback=Y(i,"removeCallback",null),this.createMultipleCallback=Y(i,"createMultipleCallback",null),this.internalCreateCallback=Y(i,"internalCreateCallback",null),this.internalRemoveCallback=Y(i,"internalRemoveCallback",null),e&&this.addMultiple(e),i&&this.createMultiple(i)},create:function(t,e,i,n,s,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),void 0===r&&(r=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(o),o.preUpdate&&this.scene.sys.updateList.add(o),o.visible=s,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=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;i=this.firstgid&&t=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this.resolution=i,this},bind:function(){var t=this.vertexBuffer,e=this.program,i=this.renderer;return i.setProgram(e),i.setVertexBuffer(t),this.setAttribPointers(),this},setAttribPointers:function(){for(var t=this.gl,e=this.attributes,i=this.vertexSize,n=0;nthis.vertexCapacity&&this.flush();var Y=this.setGameObject(t),N=t._isTinted&&t.tintFill;this.batchQuad(S,C,M,O,R,P,L,F,u,l,c,d,D,k,I,B,N,h,Y)},batchQuad:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g,v,m,y){void 0===y&&(y=this.currentUnit);var x=!1;this.vertexCount+6>this.vertexCapacity&&(this.flush(),x=!0,y=this.setTexture2D(m));var T=this.vertexViewF32,w=this.vertexViewU32,E=this.vertexCount*this.vertexComponentCount-1;return T[++E]=t,T[++E]=e,T[++E]=h,T[++E]=u,T[++E]=y,T[++E]=v,w[++E]=d,T[++E]=i,T[++E]=n,T[++E]=h,T[++E]=c,T[++E]=y,T[++E]=v,w[++E]=p,T[++E]=s,T[++E]=r,T[++E]=l,T[++E]=c,T[++E]=y,T[++E]=v,w[++E]=g,T[++E]=t,T[++E]=e,T[++E]=h,T[++E]=u,T[++E]=y,T[++E]=v,w[++E]=d,T[++E]=s,T[++E]=r,T[++E]=l,T[++E]=c,T[++E]=y,T[++E]=v,w[++E]=g,T[++E]=o,T[++E]=a,T[++E]=l,T[++E]=u,T[++E]=y,T[++E]=v,w[++E]=f,this.vertexCount+=6,x},batchTri:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g){void 0===g&&(g=this.currentUnit);var v=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),v=!0,g=this.setTexture2D(p));var m=this.vertexViewF32,y=this.vertexViewU32,x=this.vertexCount*this.vertexComponentCount-1;return m[++x]=t,m[++x]=e,m[++x]=o,m[++x]=a,m[++x]=g,m[++x]=f,y[++x]=l,m[++x]=i,m[++x]=n,m[++x]=o,m[++x]=u,m[++x]=g,m[++x]=f,y[++x]=c,m[++x]=s,m[++x]=r,m[++x]=h,m[++x]=u,m[++x]=g,m[++x]=f,y[++x]=d,this.vertexCount+=3,v},batchTexture:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g,v,m,y,x,T,w,E,_,b,A,S,C,M,O,R,P){this.renderer.setPipeline(this,t);var L,F,D,k=this._tempMatrix1,I=this._tempMatrix2,B=this._tempMatrix3,Y=m/i+S,N=y/n+C,X=(m+x)/i+S,U=(y+T)/n+C,z=o,G=a,W=-g,V=-v;t.isCropped&&(z=(L=t._crop).width,G=L.height,o=L.width,a=L.height,F=m=L.x,D=y=L.y,c&&(F=x-L.x-L.width),d&&!e.isRenderTexture&&(D=T-L.y-L.height),Y=F/i+S,N=D/n+C,X=(F+L.width)/i+S,U=(D+L.height)/n+C,W=-g+m,V=-v+y),c&&(z*=-1,W+=o),(d^=!R&&e.isRenderTexture?1:0)&&(G*=-1,V+=a);var H=W+z,j=V+G;I.applyITRS(s,r,l,h,u),k.copyFrom(M.matrix),O?(k.multiplyWithOffset(O,-M.scrollX*f,-M.scrollY*p),I.e=s,I.f=r):(I.e-=M.scrollX*f,I.f-=M.scrollY*p),k.multiply(I,B);var K=B.getX(W,V),q=B.getY(W,V),Z=B.getX(W,j),J=B.getY(W,j),Q=B.getX(H,j),$=B.getY(H,j),tt=B.getX(H,V),et=B.getY(H,V);M.roundPixels&&(K=Math.round(K),q=Math.round(q),Z=Math.round(Z),J=Math.round(J),Q=Math.round(Q),$=Math.round($),tt=Math.round(tt),et=Math.round(et)),void 0===P&&(P=this.renderer.setTexture2D(e)),this.batchQuad(K,q,Z,J,Q,$,tt,et,Y,N,X,U,w,E,_,b,A,e,P)},batchTextureFrame:function(t,e,i,n,s,r,o){this.renderer.setPipeline(this);var a=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2,u=e+t.width,l=i+t.height;o?a.multiply(o,h):h=a;var c=h.getX(e,i),d=h.getY(e,i),f=h.getX(e,l),p=h.getY(e,l),g=h.getX(u,l),v=h.getY(u,l),m=h.getX(u,i),y=h.getY(u,i),x=this.renderer.setTextureSource(t.source);n=X.getTintAppendFloatAlpha(n,s),this.batchQuad(c,d,f,p,g,v,m,y,t.u0,t.v0,t.u1,t.v1,n,n,n,n,0,t.glTexture,x)},drawFillRect:function(t,e,i,n,s,r){t=Math.floor(t),e=Math.floor(e);var o=Math.floor(t+i),a=Math.floor(e+n),h=this.renderer.blankTexture.glTexture,u=this.renderer.setTexture2D(h),l=X.getTintAppendFloatAlphaAndSwap(s,r);this.batchQuad(t,e,t,a,o,a,o,e,0,0,1,1,l,l,l,l,2,h,u)},batchFillRect:function(t,e,i,n,s,r){this.renderer.setPipeline(this);var o=this._tempMatrix3;r&&r.multiply(s,o);var a=t+i,h=e+n,u=o.getX(t,e),l=o.getY(t,e),c=o.getX(t,h),d=o.getY(t,h),f=o.getX(a,h),p=o.getY(a,h),g=o.getX(a,e),v=o.getY(a,e),m=this.currentFrame,y=m.u0,x=m.v0,T=m.u1,w=m.v1,E=this.fillTint;this.batchQuad(u,l,c,d,f,p,g,v,y,x,T,w,E.TL,E.TR,E.BL,E.BR,this.tintEffect)},batchFillTriangle:function(t,e,i,n,s,r,o,a){this.renderer.setPipeline(this);var h=this._tempMatrix3;a&&a.multiply(o,h);var u=h.getX(t,e),l=h.getY(t,e),c=h.getX(i,n),d=h.getY(i,n),f=h.getX(s,r),p=h.getY(s,r),g=this.currentFrame,v=g.u0,m=g.v0,y=g.u1,x=g.v1;this.batchTri(u,l,c,d,f,p,v,m,y,x,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.tintEffect)},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h){var u=this.tempTriangle;u[0].x=t,u[0].y=e,u[0].width=o,u[1].x=i,u[1].y=n,u[1].width=o,u[2].x=s,u[2].y=r,u[2].width=o,u[3].x=t,u[3].y=e,u[3].width=o,this.batchStrokePath(u,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.setPipeline(this);var n=this._tempMatrix3;i&&i.multiply(e,n);for(var s,r,o=t.length,a=this.polygonCache,h=this.fillTint.TL,u=this.fillTint.TR,l=this.fillTint.BL,c=this.tintEffect,d=0;d>16)+(65280&t)+((255&t)<<16)}},function(t,e,i){var n=i(0),a=i(288),s=new n({initialize:function(t,e){this.parent=t,(this.events=e)||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once("destroy",this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],n=0;ne.right||t.y>e.bottom)}},function(t,e,i){var u=i(6),l={},n={register:function(t,e,i,n,s){l[t]={plugin:e,mapping:i,settingsKey:n,configKey:s}},getPlugin:function(t){return l[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,n=e.game.config;for(var s in l){var r=l[s].plugin,o=l[s].mapping,a=l[s].settingsKey,h=l[s].configKey;u(i,a,n[h])&&(t[o]=new r(t))}},remove:function(t){l.hasOwnProperty(t)&&delete l[t]}};t.exports=n},function(t,e,i){t.exports={ANY_KEY_DOWN:i(1229),ANY_KEY_UP:i(1230),COMBO_MATCH:i(1231),DOWN:i(1232),KEY_DOWN:i(1233),KEY_UP:i(1234),UP:i(1235)}},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),void 0===r&&(r=!1),{responseType:t,async:e,user:i,password:n,timeout:s,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:r}}},function(t,e,i){var n=i(0),s=i(223),r=i(75),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s),this.body=null}});t.exports=o},function(t,e,i){t.exports={CalculateFacesAt:i(226),CalculateFacesWithin:i(52),Copy:i(1325),CreateFromTiles:i(1326),CullTiles:i(1327),Fill:i(1328),FilterTiles:i(1329),FindByIndex:i(1330),FindTile:i(1331),ForEachTile:i(1332),GetTileAt:i(148),GetTileAtWorldXY:i(1333),GetTilesWithin:i(24),GetTilesWithinShape:i(1334),GetTilesWithinWorldXY:i(1335),HasTileAt:i(479),HasTileAtWorldXY:i(1336),IsInLayerBounds:i(102),PutTileAt:i(227),PutTileAtWorldXY:i(1337),PutTilesAt:i(1338),Randomize:i(1339),RemoveTileAt:i(480),RemoveTileAtWorldXY:i(1340),RenderDebug:i(1341),ReplaceByIndex:i(478),SetCollision:i(1342),SetCollisionBetween:i(1343),SetCollisionByExclusion:i(1344),SetCollisionByProperty:i(1345),SetCollisionFromCollisionGroup:i(1346),SetTileIndexCallback:i(1347),SetTileLocationCallback:i(1348),Shuffle:i(1349),SwapByIndex:i(1350),TileToWorldX:i(149),TileToWorldXY:i(1351),TileToWorldY:i(150),WeightedRandomize:i(1352),WorldToTileX:i(63),WorldToTileXY:i(1353),WorldToTileY:i(64)}},function(t,e,i){var r=i(102);t.exports=function(t,e,i,n){if(void 0===i&&(i=!1),r(t,e,n)){var s=n.data[e][t]||null;return null!==s&&(-1!==s.index||i)?s:null}return null}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),n*=s.scaleX),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*n}},function(t,e){t.exports=function(o,a,t){return o.hasOwnProperty(a)?"function"==typeof o[a]?function(t,e,i,n,s,r){return o[a](t,e,i,n,s,r)}:function(){return o[a]}:"function"==typeof t?t:function(){return t}}},function(t,e,i){var P=i(236),L=i(15),F=i(89),D=i(69),k=i(151),I=i(501),B=i(234),Y=i(6),N=i(235),X=i(237),U=i(239);t.exports=function(t,e,i){void 0===i&&(i=P);for(var n=i.targets?i.targets:B(e),s=I(e),r=k(e,"delay",i.delay),o=k(e,"duration",i.duration),a=Y(e,"easeParams",i.easeParams),h=D(Y(e,"ease",i.ease),a),u=k(e,"hold",i.hold),l=k(e,"repeat",i.repeat),c=k(e,"repeatDelay",i.repeatDelay),d=F(e,"yoyo",i.yoyo),f=F(e,"flipX",i.flipX),p=F(e,"flipY",i.flipY),g=[],v=0;v=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo);var i=this.frames[e];0!==e||t.forward||(i=this.getLastFrame()),t.updateFrame(i)},getFrameByProgress:function(t){return t=n(t,0,1),a(t,this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t._yoyo?this.handleYoyoFrame(t,!1):0=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2);t=new Array(1+(s-r)).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){var n=i(298),s=i(301),r=i(303),o=i(304);t.exports=function(t){switch(typeof t){case"string":return("rgb"===t.substr(0,3).toLowerCase()?o:n)(t);case"number":return s(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){var f=i(171);t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1);var s=Math.floor(6*t),r=6*t-s,o=Math.floor(i*(1-e)*255),a=Math.floor(i*(1-r*e)*255),h=Math.floor(i*(1-(1-r)*e)*255),u=i=Math.floor(i*=255),l=i,c=i,d=s%6;return 0==d?(l=h,c=o):1==d?(u=a,c=o):2==d?(u=o,c=h):3==d?(u=o,l=a):4==d?(u=h,l=o):5==d&&(l=o,c=a),n?n.setTo?n.setTo(u,l,c,n.alpha,!1):(n.r=u,n.g=l,n.b=c,n.color=f(u,l,c),n):{r:u,g:l,b:c,color:f(u,l,c)}}},function(t,e){var i="";function n(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;is.width&&(t=s.width-r.cutX),r.cutY+e>s.height&&(e=s.height-r.cutY),r.setSize(t,e,r.cutX,r.cutY)),this.updateDisplayOrigin();var a=this.input;return a&&!a.customHitArea&&(a.hitArea.width=t,a.hitArea.height=e),this},setGlobalTint:function(t){return this.globalTint=t,this},setGlobalAlpha:function(t){return this.globalAlpha=t,this},saveTexture:function(t){return this.textureManager.renameTexture(this.texture.key,t),this._saved=!0,this.texture},fill:function(t,e,i,n,s,r){var o=this.gl,a=this.frame,h=this.texture,u=this.camera,l=this.renderer;void 0===e&&(e=1),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=a.cutWidth),void 0===r&&(r=a.cutHeight);var c,d,f,p,g,v,m,y,x,T,w=255&(t>>16|0),E=255&(t>>8|0),_=255&(0|t);return u.preRender(1,1),o?(c=u._cx,d=u._cy,f=u._cw,p=u._ch,l.resetTextures(!0),l.pushScissor(c,d,f,-p),l.setFramebuffer(this.framebuffer,!1),g=this.pipeline,v=h.width,m=h.height,y=g.width/v,x=g.height/m,g.drawFillRect(i*y,(m-r-n)*x,s*y,r*x,b.getTintFromFloats(w/255,E/255,_/255,1),e),g.flush(),l.setFramebuffer(null,!1),l.popScissor()):(T=this.context,l.setContext(T),T.fillStyle="rgba("+w+","+E+","+_+","+e+")",T.fillRect(i+a.cutX,n+a.cutY,s,r),l.setContext()),this.dirty=!0,this},clear:function(){var t,e,i;return this.dirty&&((t=this.gl)?((e=this.renderer).setFramebuffer(this.framebuffer,!0),this.frame.cutWidth===this.canvas.width&&this.frame.cutHeight===this.canvas.height||t.scissor(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),e.setFramebuffer(null,!0)):((i=this.context).save(),i.setTransform(1,0,0,1,0,0),i.clearRect(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),i.restore()),this.dirty=!1),this},erase:function(t,e,i){this._eraseMode=!0;var n=this.renderer.currentBlendMode;return this.renderer.setBlendMode(o.ERASE),this.draw(t,e,i,1,16777215),this.renderer.setBlendMode(n),this._eraseMode=!1,this},draw:function(t,e,i,n,s){void 0===n&&(n=this.globalAlpha),s=void 0===s?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(s>>16)+(65280&s)+((255&s)<<16),Array.isArray(t)||(t=[t]);var r,o,a,h,u,l=this.gl,c=this.camera,d=this.renderer;return c.preRender(1,1),l?(r=c._cx,o=c._cy,a=c._cw,h=c._ch,d.resetTextures(!0),d.setFramebuffer(this.framebuffer,!1),d.pushScissor(r,o,a,h,h),u=this.pipeline,g(u,0,this.texture.width,0,this.texture.height,-1e3,1e3),this.batchList(t,e,i,n,s),d.setFramebuffer(null,!0),d.resetTextures(!0),g(u,0,u.width,u.height,0,-1e3,1e3)):(d.setContext(this.context),this.batchList(t,e,i,n,s),d.setContext()),this.dirty=!0,this},drawFrame:function(t,e,i,n,s,r){void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.globalAlpha),r=void 0===r?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(r>>16)+(65280&r)+((255&r)<<16);var o,a,h,u,l,c=this.gl,d=this.camera,f=this.renderer,p=this.textureManager.getFrame(t,e);return p&&(d.preRender(1,1),c?(o=d._cx,a=d._cy,h=d._cw,u=d._ch,f.resetTextures(!0),f.setFramebuffer(this.framebuffer,!1),f.pushScissor(o,a,h,u,u),l=this.pipeline,g(l,0,this.texture.width,0,this.texture.height,-1e3,1e3),l.batchTextureFrame(p,i+this.frame.cutX,n+this.frame.cutY,r,s,d.matrix,null),l.flush(),f.setFramebuffer(null,!1),f.popScissor(),g(l,0,l.width,l.height,0,-1e3,1e3)):this.batchTextureFrame(p,i+this.frame.cutX,n+this.frame.cutY,s,r),this.dirty=!0),this},batchList:function(t,e,i,n,s){for(var r=0;rs&&(r=t[s]),n[s]=r,t.length>s+1&&(r=t[s+1]),n[s+1]=r;return this},setColors:function(t){var e=this.points.length;if(e<1)return this;var i=this.colors;void 0===t?t=[16777215]:Array.isArray(t)||(t=[t]);var n=0;if(t.length===e)for(r=0;rn&&(s=t[n]),i[n]=s,t.length>n+1&&(s=t[n+1]),i[n+1]=s;return this},setPoints:function(t,e,i){if(void 0===t&&(t=2),"number"==typeof t){var n,s,r,o=t;if(o<2&&(o=2),t=[],this.horizontal)for(r=-this.frame.halfWidth,s=this.frame.width/(o-1),n=0;n=this._markerOut&&(e.loop?(e.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=t,this.emit(o.VIDEO_LOOP,this)):(this.emit(o.VIDEO_COMPLETE,this),this.stop())))},checkVideoProgress:function(){2<=this.video.readyState?this.updateTexture():(this.retry--,0t&&(t=s.totalDuration),s.delaye.length&&(r=e.length),i?(n=e[r-1][i],(s=e[r][i])-t<=t-n?e[r]:e[r-1]):(n=e[r-1],(s=e[r])-t<=t-n?s:n)}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=n,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0}});t.exports=n},function(t,e,i){var n=i(53),s={_blendMode:n.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=n[t]),-1<=(t|=0)&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e,i){var o=i(157),a=i(116);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&0=t.right&&(o=1,r+=s-t.right,s=t.right);break;case 1:(r+=e)>=t.bottom&&(o=2,s-=r-t.bottom,r=t.bottom);break;case 2:(s-=e)<=t.left&&(o=3,r-=t.left-s,s=t.left);break;case 3:(r-=e)<=t.top&&(o=0,r=t.top)}return n}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;nd.right&&(f=T(f,f+(e-d.right),this.lerp.x)),id.bottom&&(p=T(p,p+(i-d.bottom),this.lerp.y))):(f=T(f,e-u,this.lerp.x),p=T(p,i-l,this.lerp.y))),this.useBounds&&(f=this.clampX(f),p=this.clampY(p)),this.roundPixels&&(u=Math.round(u),l=Math.round(l));var g=(this.scrollX=f)+r,v=(this.scrollY=p)+o;this.midPoint.set(g,v);var m=n/a,y=s/a;this.worldView.setTo(g-m/2,v-y/2,m,y),h.applyITRS(this.x+u,this.y+l,this.rotation,a,a),h.translate(-u,-l),this.shakeEffect.preRender()},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,n,s,r){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===n&&(n=i),void 0===s&&(s=0),void 0===r&&(r=s),this._follow=t,this.roundPixels=e,i=l(i,0,1),n=l(n,0,1),this.lerp.set(i,n),this.followOffset.set(s,r);var o=this.width/2,a=this.height/2,h=t.x-s,u=t.y-r;return this.midPoint.set(h,u),this.scrollX=h-o,this.scrollY=u-a,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.clearRenderToTexture(),this.resetFX(),s.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=c},function(t,e,i){var o=i(31);t.exports=function(t){var e=new o;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,n){return e+e+i+i+n+n});var i,n,s,r=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return r&&(i=parseInt(r[1],16),n=parseInt(r[2],16),s=parseInt(r[3],16),e.setTo(i,n,s)),e}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},function(t,e){t.exports=function(t,e,i,n){void 0===n&&(n={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var s=Math.min(t,e,i),r=Math.max(t,e,i),o=r-s,a=0,h=0===r?0:o/r,u=r;return r!==s&&(r===t?a=(e-i)/o+(e>>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}}},function(t,e,i){var n=i(31);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var a=i(31);t.exports=function(t){var e,i,n,s,r=new a,o=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());return o&&(e=parseInt(o[1],10),i=parseInt(o[2],10),n=parseInt(o[3],10),s=void 0!==o[4]?parseFloat(o[4]):1,r.setTo(e,i,n,255*s)),r}},function(t,e,i){t.exports={Fade:i(668),Flash:i(669),Pan:i(670),Shake:i(703),RotateTo:i(704),Zoom:i(705)}},function(t,e,i){t.exports={In:i(671),Out:i(672),InOut:i(673)}},function(t,e,i){t.exports={In:i(674),Out:i(675),InOut:i(676)}},function(t,e,i){t.exports={In:i(677),Out:i(678),InOut:i(679)}},function(t,e,i){t.exports={In:i(680),Out:i(681),InOut:i(682)}},function(t,e,i){t.exports={In:i(683),Out:i(684),InOut:i(685)}},function(t,e,i){t.exports={In:i(686),Out:i(687),InOut:i(688)}},function(t,e,i){t.exports=i(689)},function(t,e,i){t.exports={In:i(690),Out:i(691),InOut:i(692)}},function(t,e,i){t.exports={In:i(693),Out:i(694),InOut:i(695)}},function(t,e,i){t.exports={In:i(696),Out:i(697),InOut:i(698)}},function(t,e,i){t.exports={In:i(699),Out:i(700),InOut:i(701)}},function(t,e,i){t.exports=i(702)},function(t,e,i){var n=i(0),a=i(33),h=i(319),u=i(2),l=i(6),c=i(7),d=i(176),f=i(1),p=i(180),g=i(170),s=new n({initialize:function(t){void 0===t&&(t={});this.width=l(t,"width",1024),this.height=l(t,"height",768),this.zoom=l(t,"zoom",1),this.resolution=l(t,"resolution",1),this.parent=l(t,"parent",void 0),this.scaleMode=l(t,"scaleMode",0),this.expandParent=l(t,"expandParent",!0),this.autoRound=l(t,"autoRound",!1),this.autoCenter=l(t,"autoCenter",0),this.resizeInterval=l(t,"resizeInterval",500),this.fullscreenTarget=l(t,"fullscreenTarget",null),this.minWidth=l(t,"minWidth",0),this.maxWidth=l(t,"maxWidth",0),this.minHeight=l(t,"minHeight",0),this.maxHeight=l(t,"maxHeight",0);var e=l(t,"scale",null);e&&(this.width=l(e,"width",this.width),this.height=l(e,"height",this.height),this.zoom=l(e,"zoom",this.zoom),this.resolution=l(e,"resolution",this.resolution),this.parent=l(e,"parent",this.parent),this.scaleMode=l(e,"mode",this.scaleMode),this.expandParent=l(e,"expandParent",this.expandParent),this.autoRound=l(e,"autoRound",this.autoRound),this.autoCenter=l(e,"autoCenter",this.autoCenter),this.resizeInterval=l(e,"resizeInterval",this.resizeInterval),this.fullscreenTarget=l(e,"fullscreenTarget",this.fullscreenTarget),this.minWidth=l(e,"min.width",this.minWidth),this.maxWidth=l(e,"max.width",this.maxWidth),this.minHeight=l(e,"min.height",this.minHeight),this.maxHeight=l(e,"max.height",this.maxHeight)),this.renderType=l(t,"type",a.AUTO),this.canvas=l(t,"canvas",null),this.context=l(t,"context",null),this.canvasStyle=l(t,"canvasStyle",null),this.customEnvironment=l(t,"customEnvironment",!1),this.sceneConfig=l(t,"scene",null),this.seed=l(t,"seed",[(Date.now()*Math.random()).toString()]),d.RND=new d.RandomDataGenerator(this.seed),this.gameTitle=l(t,"title",""),this.gameURL=l(t,"url","https://phaser.io"),this.gameVersion=l(t,"version",""),this.autoFocus=l(t,"autoFocus",!0),this.domCreateContainer=l(t,"dom.createContainer",!1),this.domBehindCanvas=l(t,"dom.behindCanvas",!1),this.inputKeyboard=l(t,"input.keyboard",!0),this.inputKeyboardEventTarget=l(t,"input.keyboard.target",window),this.inputKeyboardCapture=l(t,"input.keyboard.capture",[]),this.inputMouse=l(t,"input.mouse",!0),this.inputMouseEventTarget=l(t,"input.mouse.target",null),this.inputMouseCapture=l(t,"input.mouse.capture",!0),this.inputTouch=l(t,"input.touch",h.input.touch),this.inputTouchEventTarget=l(t,"input.touch.target",null),this.inputTouchCapture=l(t,"input.touch.capture",!0),this.inputActivePointers=l(t,"input.activePointers",1),this.inputSmoothFactor=l(t,"input.smoothFactor",0),this.inputWindowEvents=l(t,"input.windowEvents",!0),this.inputGamepad=l(t,"input.gamepad",!1),this.inputGamepadEventTarget=l(t,"input.gamepad.target",window),this.disableContextMenu=l(t,"disableContextMenu",!1),this.audio=l(t,"audio"),this.hideBanner=!1===l(t,"banner",null),this.hidePhaser=l(t,"banner.hidePhaser",!1),this.bannerTextColor=l(t,"banner.text","#ffffff"),this.bannerBackgroundColor=l(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=l(t,"fps",null);var i=l(t,"render",t);this.antialias=l(i,"antialias",!0),this.antialiasGL=l(i,"antialiasGL",!0),this.mipmapFilter=l(i,"mipmapFilter","LINEAR"),this.desynchronized=l(i,"desynchronized",!1),this.roundPixels=l(i,"roundPixels",!1),this.pixelArt=l(i,"pixelArt",1!==this.zoom),this.pixelArt&&(this.antialias=!1,this.roundPixels=!0),this.transparent=l(i,"transparent",!1),this.clearBeforeRender=l(i,"clearBeforeRender",!0),this.premultipliedAlpha=l(i,"premultipliedAlpha",!0),this.failIfMajorPerformanceCaveat=l(i,"failIfMajorPerformanceCaveat",!1),this.powerPreference=l(i,"powerPreference","default"),this.batchSize=l(i,"batchSize",4096),this.maxTextures=l(i,"maxTextures",-1),this.maxLights=l(i,"maxLights",10);var n=l(t,"backgroundColor",0);this.backgroundColor=g(n),0===n&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=l(t,"callbacks.preBoot",f),this.postBoot=l(t,"callbacks.postBoot",f),this.physics=l(t,"physics",{}),this.defaultPhysicsSystem=l(this.physics,"default",!1),this.loaderBaseURL=l(t,"loader.baseURL",""),this.loaderPath=l(t,"loader.path",""),this.loaderMaxParallelDownloads=l(t,"loader.maxParallelDownloads",32),this.loaderCrossOrigin=l(t,"loader.crossOrigin",void 0),this.loaderResponseType=l(t,"loader.responseType",""),this.loaderAsync=l(t,"loader.async",!0),this.loaderUser=l(t,"loader.user",""),this.loaderPassword=l(t,"loader.password",""),this.loaderTimeout=l(t,"loader.timeout",0),this.loaderWithCredentials=l(t,"loader.withCredentials",!1),this.installGlobalPlugins=[],this.installScenePlugins=[];var s=l(t,"plugins",null),r=p.DefaultScene;s&&(Array.isArray(s)?this.defaultPlugins=s:c(s)&&(this.installGlobalPlugins=u(s,"global",[]),this.installScenePlugins=u(s,"scene",[]),Array.isArray(s.default)?r=s.default:Array.isArray(s.defaultMerge)&&(r=r.concat(s.defaultMerge)))),this.defaultPlugins=r;var o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=l(t,"images.default",o+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=l(t,"images.missing",o+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),window&&(window.FORCE_WEBGL?this.renderType=a.WEBGL:window.FORCE_CANVAS&&(this.renderType=a.CANVAS))}});t.exports=s},function(t,e,i){t.exports={os:i(122),browser:i(123),features:i(175),input:i(734),audio:i(735),video:i(736),fullscreen:i(737),canvasFeatures:i(320)}},function(t,e,i){var n,s,r,o=i(26),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var i=new Image;i.onload=function(){var t=o.create(i,6,1).getContext("2d");if(t.globalCompositeOperation="multiply",t.drawImage(r,0,0),t.drawImage(i,2,0),!t.getImageData(2,0,1,1))return!1;var e=t.getImageData(2,0,1,1).data;o.remove(i),a.supportNewBlendModes=255===e[0]&&0===e[1]&&0===e[2]},i.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");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);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},function(t,e){t.exports=function(t){return 0<=(t%=2*Math.PI)?t:t+2*Math.PI}},function(t,e){t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return s*s+r*r}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),e-ir[0]&&(e=1),r[8]>r[3*e+e]&&(e=2),i=a[e],n=a[i],s=Math.sqrt(r[3*e+e]-r[3*i+i]-r[3*n+n]+1),h[e]=.5*s,s=.5/s,h[i]=(r[3*i+e]+r[3*e+i])*s,h[n]=(r[3*n+e]+r[3*e+n])*s,this.x=h[0],this.y=h[1],this.z=h[2],this.w=(r[3*n+i]-r[3*i+n])*s),this}});t.exports=d},function(t,e,a){var h=a(341),u=a(26),l=a(33),c=a(175);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===l.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==l.HEADLESS)if(e.renderType===l.CANVAS||e.renderType!==l.CANVAS&&!c.webGL){if(!c.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");e.renderType=l.CANVAS}else e.renderType=l.WEBGL;e.antialias||u.disableSmoothing();var i,n,s=t.scale.baseSize,r=s.width,o=s.height;e.canvas?(t.canvas=e.canvas,t.canvas.width=r,t.canvas.height=o):t.canvas=u.create(t,r,o,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||h.setCrisp(t.canvas),e.renderType!==l.HEADLESS&&(i=a(508),n=a(511),e.renderType===l.WEBGL?t.renderer=new n(t):(t.renderer=new i(t),t.context=t.renderer.gameContext))}},function(t,e){t.exports={setCrisp:function(e){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach(function(t){e.style["image-rendering"]=t}),e.style.msInterpolationMode="nearest-neighbor",e},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},function(t,e,i){var u=i(33);t.exports=function(t){var e,i,n,s,r,o,a,h=t.config;h.hideBanner||(e="WebGL",h.renderType===u.CANVAS?e="Canvas":h.renderType===u.HEADLESS&&(e="Headless"),i=h.audio,a=!(n=t.device.audio).webAudio||i&&i.disableWebAudio?i&&i.noAudio||!n.webAudio&&!n.audioData?"No Audio":"HTML5 Audio":"Web Audio",t.device.browser.ie?window.console&&console.log("Phaser v"+u.VERSION+" / https://phaser.io"):(r=[s=""],Array.isArray(h.bannerBackgroundColor)?(h.bannerBackgroundColor.forEach(function(t){s=s.concat("%c "),r.push("background: "+t),o=t}),r[r.length-1]="color: "+h.bannerTextColor+"; background: "+o):(s=s.concat("%c "),r.push("color: "+h.bannerTextColor+"; background: "+h.bannerBackgroundColor)),r.push("background: #fff"),h.gameTitle&&(s=s.concat(h.gameTitle),h.gameVersion&&(s=s.concat(" v"+h.gameVersion)),h.hidePhaser||(s=s.concat(" / "))),h.hidePhaser||(s=s.concat("Phaser v"+u.VERSION+" ("+e+" | "+a+")")),s=s.concat(" %c "+h.gameURL),r[0]=s,console.log.apply(console,r)))}},function(t,e,i){var n=i(0),s=i(6),r=i(1),o=i(344),a=new n({initialize:function(t,e){this.game=t,this.raf=new o,this.started=!1,this.running=!1,this.minFps=s(e,"min",5),this.targetFps=s(e,"target",60),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=s(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=s(e,"deltaHistory",10),this.panicMax=s(e,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=s(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;for(var e=this.framesThisSecond=0;ethis._min&&(r=n[i],r=Math.min(r,this._min)),n[i]=r,this.deltaIndex++,this.deltaIndex>s&&(this.deltaIndex=0);for(var a=o=0;athis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var h=o/this._target;this.callback(t,o,h),this.lastTime=t,this.frame++},tick:function(){this.step()},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running||(t&&(this.startTime+=-this.lastTime+(this.lastTime+window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step())},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.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0,this.target=0;var n=this;this.step=function t(){var e=window.performance.now();n.lastTime=n.tick,n.tick=e,n.callback(e),n.timeOutID=window.requestAnimationFrame(t)},this.stepTimeout=function t(){var e=Date.now(),i=Math.min(Math.max(2*n.target+n.tick-e,0),n.target);n.lastTime=n.tick,n.tick=e,n.callback(e),n.timeOutID=window.setTimeout(t,i)}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.target=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=s}});t.exports=r},function(t,e,i){var n=i(20);t.exports=function(t){var e,i=t.events;void 0!==document.hidden?e="visibilitychange":["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(n.HIDDEN):i.emit(n.VISIBLE)},!1),window.onblur=function(){i.emit(n.BLUR)},window.onfocus=function(){i.emit(n.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},function(t,e,i){var m=i(347),y=i(26),x=i(6);t.exports=function(t){var e=x(t,"data",[]),i=x(t,"canvas",null),n=x(t,"palette",m),s=x(t,"pixelWidth",1),r=x(t,"pixelHeight",s),o=x(t,"resizeCanvas",!0),a=x(t,"clearCanvas",!0),h=x(t,"preRender",null),u=x(t,"postRender",null),l=Math.floor(Math.abs(e[0].length*s)),c=Math.floor(Math.abs(e.length*r));i||(i=y.create2D(this,l,c),a=o=!1),o&&(i.width=l,i.height=c);var d=i.getContext("2d");a&&d.clearRect(0,0,l,c),h&&h(i,d);for(var f=0;fi.length-2?i.length-1:s+1],u=i[s>i.length-3?i.length-1:s+2];return e.set(l(r,o.x,a.x,h.x,u.x),l(r,o.y,a.y,h.y,u.y))},toJSON:function(){for(var t=[],e=0;ei.width?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE;if("number"==typeof window.orientation)return 0===window.orientation||180===window.orientation?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return s.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return s.ORIENTATION.LANDSCAPE}return tthis.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var e=this.listeners;window.removeEventListener("orientationchange",e.orientationChange,!1),window.removeEventListener("resize",e.windowResize,!1);["webkit","moz",""].forEach(function(t){document.removeEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.removeEventListener(t+"fullscreenerror",e.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",e.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===c.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===c.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=v},function(t,e,i){var n=i(17),s=i(0),r=i(94),o=i(3),a=new s({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=null),this._width=t,this._height=e,this._parent=n,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=n(t,0,this.maxWidth),this.minHeight=n(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=n(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=n(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=n(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=n(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 n=this.snapTo,s=0===e?1:t/e;return i&&this.aspectRatio>s||!i&&this.aspectRatios)&&(t=(e=r(e,n.y))*this.aspectRatio,0r.START&&n.settings.status<=r.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e=r.LOADING&&i.settings.status=r.x&&t=r.y&&e=r.x&&t=r.y&&e=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s>4,u[a++]=(15&i)<<4|n>>2,u[a++]=(3&n)<<6|63&s;return h}},function(t,e,i){var n=i(134),s=i(0),r=i(59),o=new s({Extends:n,initialize:function(t,e,i){if(void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),!this.audioBuffer)throw new Error('There is no audio asset with key "'+e+'" in the audio cache');this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,n.call(this,t,e,i)},play:function(t,e){return!!n.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(r.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime>>16,v=(65280&d)>>>8,m=255&d,u.strokeStyle="rgba("+g+","+v+","+m+","+l+")",u.lineWidth=p,y+=3;break;case x.FILL_STYLE:f=a[y+1],c=a[y+2],g=(16711680&f)>>>16,v=(65280&f)>>>8,m=255&f,u.fillStyle="rgba("+g+","+v+","+m+","+c+")",y+=2;break;case x.BEGIN_PATH:u.beginPath();break;case x.CLOSE_PATH:u.closePath();break;case x.FILL_PATH:o||u.fill();break;case x.STROKE_PATH:o||u.stroke();break;case x.FILL_RECT:o?u.rect(a[y+1],a[y+2],a[y+3],a[y+4]):u.fillRect(a[y+1],a[y+2],a[y+3],a[y+4]),y+=4;break;case x.FILL_TRIANGLE:u.beginPath(),u.moveTo(a[y+1],a[y+2]),u.lineTo(a[y+3],a[y+4]),u.lineTo(a[y+5],a[y+6]),u.closePath(),o||u.fill(),y+=6;break;case x.STROKE_TRIANGLE:u.beginPath(),u.moveTo(a[y+1],a[y+2]),u.lineTo(a[y+3],a[y+4]),u.lineTo(a[y+5],a[y+6]),u.closePath(),o||u.stroke(),y+=6;break;case x.LINE_TO:u.lineTo(a[y+1],a[y+2]),y+=2;break;case x.MOVE_TO:u.moveTo(a[y+1],a[y+2]),y+=2;break;case x.LINE_FX_TO:u.lineTo(a[y+1],a[y+2]),y+=5;break;case x.MOVE_FX_TO:u.moveTo(a[y+1],a[y+2]),y+=5;break;case x.SAVE:u.save();break;case x.RESTORE:u.restore();break;case x.TRANSLATE:u.translate(a[y+1],a[y+2]),y+=2;break;case x.SCALE:u.scale(a[y+1],a[y+2]),y+=2;break;case x.ROTATE:u.rotate(a[y+1]),y+=1;break;case x.GRADIENT_FILL_STYLE:y+=5;break;case x.GRADIENT_LINE_STYLE:y+=6;break;case x.SET_TEXTURE:y+=2}}u.restore()}}},function(t,e,i){var n=i(0),o=i(2),s=new n({initialize:function(t,e,i,n,s){var r;"object"==typeof t?(t=o(r=t,"x",0),e=o(r,"y",0),i=o(r,"power",0),n=o(r,"epsilon",100),s=o(r,"gravity",50)):(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===s&&(s=50)),this.x=t,this.y=e,this.active=!0,this._gravity=s,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i,n,s=this.x-t.x,r=this.y-t.y,o=s*s+r*r;0!==o&&(i=Math.sqrt(o),oe.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(0this._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=n},function(t,e){t.exports=function(t,e){for(var i=0;id.PI2?s=d.PI2:s<0&&(s=d.PI2+s%d.PI2);for(var a,h=[r+Math.cos(n)*i,o+Math.sin(n)*i];e<1;)a=s*e+n,h.push(r+Math.cos(a)*i,o+Math.sin(a)*i),e+=t;return a=s+n,h.push(r+Math.cos(a)*i,o+Math.sin(a)*i),h.push(r+Math.cos(n)*i,o+Math.sin(n)*i),this.pathIndexes=l(h),this.pathData=h,this}});t.exports=r},function(t,e,i){var n=i(0),s=i(1012),r=i(66),o=i(9),a=i(29),h=new n({Extends:a,Mixins:[s],initialize:function(t,e,i,n,s,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Curve",n),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(e,i),void 0!==s&&this.setFillStyle(s,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=[],n=this.geom.getPoints(e),s=0;st.right||e.rightt.bottom||e.bottome.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottomt.width*t.height)&&(e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(s.BUTTON_DOWN,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(s.BUTTON_UP,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=r},function(t,e,i){var a=i(453),h=i(454),n=i(0),u=i(11),l=i(3),s=new n({Extends:u,initialize:function(t,e){u.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],n=0;n=s;for(this.fixedStep||(n=.001*e,o=!0,this._elapsed=0),h=0;h=s;)this._elapsed-=s,this.step(n)}},step:function(t){for(var e,i=this.bodies.entries,n=i.length,s=0;sc)&&(d.xl))return this.separateCircle(t,e,s)}var f=!1,p=!1;s?(f=S(t,e,s,this.OVERLAP_BIAS),p=C(t,e,s,this.OVERLAP_BIAS)):this.forceX||Math.abs(this.gravity.y+t.gravity.y)=e.right||t.position.y>=e.bottom))},circleBodyIntersects:function(t,e){var i=p(t.center.x,e.left,e.right),n=p(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o;t.isParent&&void 0===t.physicsType&&(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var a=Array.isArray(t),h=Array.isArray(e);if(this._total=0,a||h)if(!a&&h)for(o=0;od.baseTileWidth&&(h-=a=(d.tileWidth-d.baseTileWidth)*e.scaleX,l+=a),d.tileHeight>d.baseTileHeight&&(c+=(d.tileHeight-d.baseTileHeight)*e.scaleY);var f=e.getTilesWithinWorldXY(h,u,l,c);return 0!==f.length&&this.collideSpriteVsTilesHandler(t,f,i,n,s,r,!0)},collideSpriteVsTilesHandler:function(t,e,i,n,s,r,o){for(var a,h,u=t.body,l={left:0,right:0,top:0,bottom:0},c=!1,d=0;de.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,r=this.blocked.right=!0),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,r=this.blocked.down=!0),r&&(this.blocked.none=!1),r},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this.updateCenter(),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n,s,r=this.gameObject;return!t&&r.frame&&(t=r.frame.realWidth),!e&&r.frame&&(e=r.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&&r.getCenter&&(n=(r.width-t)/2,s=(r.height-e)/2,this.offset.set(n,s)),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),0=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 0e._dx?r<(s=t.right-e.x)&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?s=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0,e.physicsType===o.STATIC_BODY&&(t.blocked.none=!1,t.blocked.right=!0),t.physicsType===o.STATIC_BODY&&(e.blocked.none=!1,e.blocked.left=!0)):t._dxe._dy?r<(s=t.bottom-e.y)&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?s=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0,e.physicsType===o.STATIC_BODY&&(t.blocked.none=!1,t.blocked.down=!0),t.physicsType===o.STATIC_BODY&&(e.blocked.none=!1,e.blocked.up=!0)):t._dy=t.minX&&e.maxY>=t.minY}function p(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,s){for(var r,o=[e,i];o.length;)(i=o.pop())-(e=o.pop())<=n||(r=e+Math.ceil((i-e)/n/2)*n,a(t,r,e,i,s),o.push(e,r,r,i))}n.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!u(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;sthis._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),o=p(i.children.splice(r,i.children.length-r));o.height=i.height,o.leaf=i.leaf,f(i,this.toBBox),f(o,this.toBBox),e?t[e-1].children.push(o):this._splitRoot(i,o)},_splitRoot:function(t,e){this.data=p([t,e]),this.data.height=t.height+1,this.data.leaf=!1,f(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){for(var n,s,r,o,a,h,u,l,c,d,f,p,g=a=1/0,v=e;v<=i-e;v++)n=m(t,0,v,this.toBBox),s=m(t,v,i,this.toBBox),u=n,l=s,p=f=d=c=void 0,c=Math.max(u.minX,l.minX),d=Math.max(u.minY,l.minY),f=Math.min(u.maxX,l.maxX),p=Math.min(u.maxY,l.maxY),r=Math.max(0,f-c)*Math.max(0,p-d),o=y(n)+y(s),r=t.right||e.position.y>=t.bottom)}},function(t,e,i){var n=i(56),s=i(0),r=i(51),o=i(49),a=i(3),h=new s({initialize:function(t,e){var i=e.displayWidth?e.displayWidth:64,n=e.displayHeight?e.displayHeight:64;this.world=t,this.gameObject=e,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-n*e.originY),this.width=i,this.height=n,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.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).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 n,s,r=this.gameObject;return!t&&r.frame&&(t=r.frame.realWidth),!e&&r.frame&&(e=r.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&&r.getCenter&&(n=r.displayWidth/2,s=r.displayHeight/2,this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(n-this.halfWidth,s-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y),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),0=r.layers.length){if(s.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}r=s.pop()}else{var o,a=r.layers[r.i];if(r.i++,"tilelayer"===a.type)if(a.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+a.name+"'");else{if(a.encoding&&"base64"===a.encoding){if(a.chunks)for(var h=0;h>>0;return n}},function(t,e,i){var h=i(2),u=i(231);t.exports=function(t){for(var e=[],i=[],n=u(t);n.i=n.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}n=i.pop()}else{var s,r,o,a=n.layers[n.i];n.i++,"imagelayer"===a.type?(s=h(a,"offsetx",0)+h(a,"startx",0),r=h(a,"offsety",0)+h(a,"starty",0),e.push({name:n.name+a.name,image:a.image,x:n.x+s+a.x,y:n.y+r+a.y,alpha:n.opacity*a.opacity,visible:n.visible&&a.visible,properties:h(a,"properties",{})})):"group"===a.type&&(o=u(t,a,n),i.push(n),n=o)}return e}},function(t,e,i){var x=i(105),T=i(488),w=i(232);t.exports=function(t){for(var e,i=[],n=[],s=null,r=0;r=this.firstgid&&t=n.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}n=i.pop()}else{var s,r=n.layers[n.i];if(n.i++,r.opacity*=n.opacity,r.visible=n.visible&&r.visible,"objectgroup"===r.type){r.name=n.name+r.name;for(var o=n.x+d(r,"startx",0)+d(r,"offsetx",0),a=n.y+d(r,"starty",0)+d(r,"offsety",0),h=[],u=0;un&&(n=e.layer[r].width),e.layer[r].height>s&&(s=e.layer[r].height);var o=new h({width:n,height:s,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:a.WELTMEISTER});return o.layers=u(e,i),o.tilesets=l(e),o}},function(t,e,i){var d=i(103),f=i(74);t.exports=function(t,e){for(var i=[],n=0;nx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(1===m)for(h=0;hx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(2===m)for(h=f-1;0<=h;h--)for(u=0;ux||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(3===m)for(h=f-1;0<=h;h--)for(u=d-1;0<=u;u--)!(a=v[h][u])||a.indexx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));return this.dirty[e]=!1,null===r&&(r=n.createVertexBuffer(o,s.STATIC_DRAW),this.vertexBuffer[e]=r),n.setVertexBuffer(r),i.setAttribPointers(),s.bufferSubData(s.ARRAY_BUFFER,0,o),this},batchTile:function(t,e,i,n,s,r,o){var a=i.getTileTextureCoordinates(e.index);if(!a)return t;var h=i.tileWidth,u=i.tileHeight,l=h/2,c=u/2,d=a.x/n,f=a.y/s,p=(a.x+h)/n,g=(a.y+u)/s,v=this._tempMatrix,m=-l,y=-c;e.flipX&&(h*=-1,m+=i.tileWidth),e.flipY&&(u*=-1,y+=i.tileHeight);var x=m+h,T=y+u;v.applyITRS(l+e.pixelX,c+e.pixelY,e.rotation,1,1);var w=L.getTintAppendFloatAlpha(16777215,r.alpha*this.alpha*e.alpha),E=v.getX(m,y),_=v.getY(m,y),b=v.getX(m,T),A=v.getY(m,T),S=v.getX(x,T),C=v.getY(x,T),M=v.getX(x,y),O=v.getY(x,y);r.roundPixels&&(E=Math.round(E),_=Math.round(_),b=Math.round(b),A=Math.round(A),S=Math.round(S),C=Math.round(C),M=Math.round(M),O=Math.round(O));var R=this.vertexViewF32[o],P=this.vertexViewU32[o];return R[++t]=E,R[++t]=_,R[++t]=d,R[++t]=f,R[++t]=0,R[++t]=0,P[++t]=w,R[++t]=b,R[++t]=A,R[++t]=d,R[++t]=g,R[++t]=0,R[++t]=0,P[++t]=w,R[++t]=S,R[++t]=C,R[++t]=p,R[++t]=g,R[++t]=0,R[++t]=0,P[++t]=w,R[++t]=E,R[++t]=_,R[++t]=d,R[++t]=f,R[++t]=0,R[++t]=0,P[++t]=w,R[++t]=S,R[++t]=C,R[++t]=p,R[++t]=g,R[++t]=0,R[++t]=0,P[++t]=w,R[++t]=M,R[++t]=O,R[++t]=p,R[++t]=f,R[++t]=0,R[++t]=0,P[++t]=w,this.vertexCount[o]+=6,t},setRenderOrder:function(t){if("string"==typeof t&&(t=["right-down","left-down","right-up","left-up"].indexOf(t)),0<=t&&t<4){this._renderOrder=t;for(var e=0;e=this.nextTick&&this.currentAnim.setFrame(this)}},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),e.setSizeToFrame(),e._originComponent&&(t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin()),e},updateFrame:function(t){var e,i=this.setCurrentFrame(t);this.isPlaying&&(t.setAlpha&&(i.alpha=t.alpha),e=this.currentAnim,i.emit(r.SPRITE_ANIMATION_KEY_UPDATE+e.key,e,t,i),i.emit(r.SPRITE_ANIMATION_UPDATE,e,t,i),3===this._pendingStop&&this._pendingStopValue===t&&this.currentAnim.completeAnimation(this))},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},setYoyo:function(t){return void 0===t&&(t=!1),this._yoyo=t,this.parent},getYoyo:function(){return this._yoyo},destroy:function(){this.animationManager.off(r.REMOVE_ANIMATION,this.remove,this),this.animationManager=null,this.parent=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null}});t.exports=o},function(t,e,i){var l=i(509),p=i(41),n=i(0),s=i(33),r=i(510),o=i(93),a=i(30),h=new n({initialize:function(t){this.game=t,this.type=s.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.config={clearBeforeRender:t.config.clearBeforeRender,backgroundColor:t.config.backgroundColor,resolution:t.config.resolution,antialias:t.config.antialias,roundPixels:t.config.roundPixels},this.gameCanvas=t.canvas;var e={alpha:t.config.transparent,desynchronized:t.config.desynchronized};this.gameContext=this.game.config.context?this.game.config.context:this.gameCanvas.getContext("2d",e),this.currentContext=this.gameContext,this.antialias=t.config.antialias,this.blendModes=r(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new a,this._tempMatrix2=new a,this._tempMatrix3=new a,this._tempMatrix4=new a,this.init()},init:function(){this.game.scale.on(o.RESIZE,this.onResize,this);var t=this.game.scale.baseSize;this.resize(t.width,t.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},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,n=this.height;t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),e.clearBeforeRender&&t.clearRect(0,0,i,n),e.transparent||(t.fillStyle=e.backgroundColor.rgba,t.fillRect(0,0,i,n)),t.save(),this.drawCount=0},render:function(t,e,i,n){var s=e.list,r=s.length,o=n._cx,a=n._cy,h=n._cw,u=n._ch,l=n.renderToTexture?n.context:t.sys.context;l.save(),this.game.scene.customViewports&&(l.beginPath(),l.rect(o,a,h,u),l.clip()),this.currentContext=l;var c=n.mask;c&&c.preRenderCanvas(this,null,n._maskCamera),n.transparent||(l.fillStyle=n.backgroundColor.rgba,l.fillRect(o,a,h,u)),l.globalAlpha=n.alpha,l.globalCompositeOperation="source-over",this.drawCount+=s.length,n.renderToTexture&&n.emit(p.PRE_RENDER,n),n.matrix.copyToContext(l);for(var d=0;dthis.vertexCapacity&&(this.flush(),x=!0,y=this.setTexture2D(m));var T=this.vertexViewF32,w=this.vertexViewU32,E=this.vertexCount*this.vertexComponentCount-1;return T[++E]=t,T[++E]=e,T[++E]=h,T[++E]=u,T[++E]=v,w[++E]=d,T[++E]=i,T[++E]=n,T[++E]=h,T[++E]=c,T[++E]=v,w[++E]=p,T[++E]=s,T[++E]=r,T[++E]=l,T[++E]=c,T[++E]=v,w[++E]=g,T[++E]=t,T[++E]=e,T[++E]=h,T[++E]=u,T[++E]=v,w[++E]=d,T[++E]=s,T[++E]=r,T[++E]=l,T[++E]=c,T[++E]=v,w[++E]=g,T[++E]=o,T[++E]=a,T[++E]=l,T[++E]=u,T[++E]=v,w[++E]=f,this.vertexCount+=6,x},batchTri:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g){void 0===g&&(g=this.currentUnit);var v=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),v=!0,g=this.setTexture2D(p));var m=this.vertexViewF32,y=this.vertexViewU32,x=this.vertexCount*this.vertexComponentCount-1;return m[++x]=t,m[++x]=e,m[++x]=o,m[++x]=a,m[++x]=f,y[++x]=l,m[++x]=i,m[++x]=n,m[++x]=o,m[++x]=u,m[++x]=f,y[++x]=c,m[++x]=s,m[++x]=r,m[++x]=h,m[++x]=u,m[++x]=f,y[++x]=d,this.vertexCount+=3,v},bind:function(){return u.prototype.bind.call(this),this}});t.exports=l},,,,,function(t,e){var i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){i(523),i(524),i(525),i(526),i(527),i(528),i(529),i(530)},function(t,e){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 n=2<=arguments.length?arguments[1]:void 0,s=0;sthis.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.zoom<.001&&(e.zoom=.001)))},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},function(t,e,i){t.exports={Camera:i(297),BaseCamera:i(92),CameraManager:i(706),Effects:i(305),Events:i(41)}},function(t,e){t.exports="cameradestroy"},function(t,e){t.exports="camerafadeincomplete"},function(t,e){t.exports="camerafadeinstart"},function(t,e){t.exports="camerafadeoutcomplete"},function(t,e){t.exports="camerafadeoutstart"},function(t,e){t.exports="cameraflashcomplete"},function(t,e){t.exports="cameraflashstart"},function(t,e){t.exports="camerapancomplete"},function(t,e){t.exports="camerapanstart"},function(t,e){t.exports="postrender"},function(t,e){t.exports="prerender"},function(t,e){t.exports="camerarotatecomplete"},function(t,e){t.exports="camerarotatestart"},function(t,e){t.exports="camerashakecomplete"},function(t,e){t.exports="camerashakestart"},function(t,e){t.exports="camerazoomcomplete"},function(t,e){t.exports="camerazoomstart"},function(t,e,i){var n=i(17),s=i(0),u=i(41),r=new s({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,n,s,r,o,a){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=!1),void 0===o&&(o=null),void 0===a&&(a=this.camera.scene),!r&&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=n,this.blue=s,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=o,this._onUpdateScope=a;var h=t?u.FADE_OUT_START:u.FADE_IN_START;return this.camera.emit(h,this.camera,this,e,i,n,s),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsedthis.source?Math.abs(this.destination-this.source):Math.abs(this.destination+h)-this.source)<(l=this.source>this.destination?Math.abs(this.source-this.destination):Math.abs(this.source+h)-this.destination)?this.clockwise=!0:lMath.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},function(t,e,i){var n=i(124);t.exports=function(){return n(-Math.PI,Math.PI)}},function(t,e,i){var n=i(124);t.exports=function(){return n(-180,180)}},function(t,e,i){var n=i(323);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(13);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(e>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return 2.3283064365386963e-10*((this.n=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;e=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}s++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getTangentAt(h,e)}s++}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 r([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 o(t.x,t.y)):this.add(new o(t,e))},toJSON:function(){for(var t=[],e=0;e>16&255,g:t>>8&255,b:255&t,a:255};return 16777215>>24),e}},function(t,e,i){var h=i(31),u=i(356);t.exports=function(t,e,i){var n,s,r=i,o=i,a=i;return 0!==e&&(r=u(s=2*i-(n=i<.5?i*(1+e):i+e-i*e),n,t+1/3),o=u(s,n,t),a=u(s,n,t-1/3)),(new h).setGLTo(r,o,a,1)}},function(t,e,i){var s=i(172);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}},function(t,e,i){function o(t,e,i,n,s,r,o,a){void 0===o&&(o=100),void 0===a&&(a=0);var h=a/o;return{r:u(t,n,h),g:u(e,s,h),b:u(i,r,h)}}var u=i(121);t.exports={RGBWithRGB:o,ColorWithRGB:function(t,e,i,n,s,r){return void 0===s&&(s=100),void 0===r&&(r=0),o(t.r,t.g,t.b,e,i,n,s,r)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),o(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(178),s=i(31);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new s(n(t,e),n(t,e),n(t,e))}},function(t,e,i){var r=i(355);t.exports=function(t,e,i,n,s){return void 0===n&&(n=255),void 0===s&&(s="#"),"#"===s?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1):"0x"+r(n)+r(t)+r(e)+r(i)}},function(t,e,i){t.exports={BitmapMask:i(282),GeometryMask:i(283)}},function(t,e,i){var n={AddToDOM:i(128),DOMContentLoaded:i(357),GetScreenOrientation:i(358),GetTarget:i(363),ParseXML:i(364),RemoveFromDOM:i(184),RequestAnimationFrame:i(344)};t.exports=n},function(t,e,i){t.exports={EventEmitter:i(828)}},function(t,e,i){var n=i(0),s=i(11),r=i(23),o=new n({Extends:s,initialize:function(){s.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",o,"events"),t.exports=o},function(t,e,i){var n=i(128),s=i(293),r=i(296),o=i(26),a=i(0),h=i(318),u=i(830),l=i(340),c=i(118),d=i(342),f=i(319),p=i(357),g=i(11),v=i(20),m=i(365),y=i(23),x=i(370),T=i(371),w=i(373),E=i(127),_=i(376),b=i(343),A=i(345),S=i(380),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 g,this.anims=new s(this),this.textures=new _(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=S.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(),l(this),u(this),d(this),n(this.canvas,this.config.parent),this.textures.once(E.READY,this.texturesReady,this),this.events.emit(v.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(v.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(v.HIDDEN,this.onHidden,this),t.on(v.VISIBLE,this.onVisible,this),t.on(v.BLUR,this.onBlur,this),t.on(v.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e);var n=this.renderer;n.preRender(),i.emit(v.PRE_RENDER,n,t,e),this.scene.render(n),n.postRender(),i.emit(v.POST_RENDER,n,t,e)},headlessStep:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e),i.emit(v.PRE_RENDER),i.emit(v.POST_RENDER)},onHidden:function(){this.loop.pause(),this.events.emit(v.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(v.RESUME)},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(v.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},function(t,e,i){var n=i(128);t.exports=function(t){var e,i=t.config;i.parent&&i.domCreateContainer&&((e=document.createElement("div")).style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: none;","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=e,n(e,i.parent))}},function(t,e){t.exports="boot"},function(t,e){t.exports="destroy"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameout"},function(t,e){t.exports="gameover"},function(t,e){t.exports="gameobjectdown"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameobjectmove"},function(t,e){t.exports="gameobjectout"},function(t,e){t.exports="gameobjectover"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="wheel"},function(t,e){t.exports="gameobjectup"},function(t,e){t.exports="gameobjectwheel"},function(t,e){t.exports="boot"},function(t,e){t.exports="process"},function(t,e){t.exports="update"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointerdownoutside"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="pointerupoutside"},function(t,e){t.exports="wheel"},function(t,e){t.exports="pointerlockchange"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="start"},function(t,e){t.exports="update"},function(t,e){t.exports=function(t){if(!t)return window.innerHeight;var e=Math.abs(window.orientation),i={w:0,h:0},n=document.createElement("div");return n.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(n),i.w=90===e?n.offsetHeight:window.innerWidth,i.h=90===e?window.innerWidth:n.offsetHeight,document.documentElement.removeChild(n),n=null,90!==Math.abs(window.orientation)?i.h:i.w}},function(t,e){t.exports="addfile"},function(t,e){t.exports="complete"},function(t,e){t.exports="filecomplete"},function(t,e){t.exports="filecomplete-"},function(t,e){t.exports="loaderror"},function(t,e){t.exports="load"},function(t,e){t.exports="fileprogress"},function(t,e){t.exports="postprocess"},function(t,e){t.exports="progress"},function(t,e){t.exports="start"},function(t,e,i){var r=i(2),o=i(187);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=r(t.settings,"physics",!1);if(e||i){var n=[];if(e&&n.push(o(e+"Physics")),i)for(var s in i)s=o(s.concat("Physics")),-1===n.indexOf(s)&&n.push(s);return n}}},function(t,e,i){var n=i(2);t.exports=function(t){var e=t.plugins.getDefaultScenePlugins(),i=n(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},function(t,e,i){t.exports={game:"game",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"}},function(t,e){t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var s=i.getElementsByTagName("SubTexture"),r=0;r=t.length)throw new Error("Supplied index out of bounds");return n!==i&&(t.splice(n,1),t.splice(i,0,e)),e}},function(t,e){t.exports=function(t,e){var i,n,s=t.indexOf(e);return-1!==s&&st.length-1)throw new Error("Index out of bounds");var s=r(t,e);return i&&i.call(n,s),s}},function(t,e,i){var u=i(68);t.exports=function(t,e,i,n,s){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===s&&(s=t),u(t,e,i)){var r=i-e,o=t.splice(e,r);if(n)for(var a=0;a?@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"}},function(t,e,i){var T=i(6);t.exports=function(t,e){var i=e.width,n=e.height,s=Math.floor(i/2),r=Math.floor(n/2),o=T(e,"chars","");if(""!==o){var a=T(e,"image",""),h=T(e,"offset.x",0),u=T(e,"offset.y",0),l=T(e,"spacing.x",0),c=T(e,"spacing.y",0),d=T(e,"lineSpacing",0),f=T(e,"charsPerRow",null);null===f&&(f=t.sys.textures.getFrame(a).width/i)>o.length&&(f=o.length);for(var p=h,g=u,v={retroFont:!0,font:a,size:i,lineHeight:n+d,chars:{}},m=0,y=0;yr.vertexCapacity&&r.flush();for(var g=r.setGameObject(e),v=r.vertexViewF32,m=r.vertexViewU32,y=r.vertexCount*r.vertexComponentCount-1,x=0,T=e.tintFill,w=0;w=i&&t.x<=n&&t.y>=s&&t.y<=r}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===r&&(r=0),!(e>t.right+r||it.bottom+r||s=n&&(p.push(v),f=v)}var m=o[o.length-1];return y(f,m)i&&(i=a.x),a.xs&&(s=a.y),a.yn(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)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){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}},function(t,e,i){var r=i(9);t.exports=function(t,e,i,n,s){return void 0===s&&(s=new r),s.setTo(Math.min(t,i),Math.min(e,n),Math.abs(t-i),Math.abs(e-n))}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.centerX,e.y=t.centerY,e}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var r=i(174);t.exports=function(t,e,i){var n=t.centerX,s=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),r(t,n,s)}},function(t,e,i){var n=i(9),s=i(141);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(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}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){var a=i(4),h=i(40);t.exports=function(t,e,i){void 0===i&&(i=new a),e=h(e);var n=Math.sin(e),s=Math.cos(e),r=0=s||0=t.downTime+n)&&(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;it._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,n=0;n'),i.push(''),i.push(''),i.push(this.xhrLoader.responseText),i.push(""),i.push(""),i.push("");var n=[i.join("\n")],s=this;try{var r=new window.Blob(n,{type:"image/svg+xml;charset=utf-8"})}catch(t){return s.state=o.FILE_ERRORED,void s.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){u.revokeObjectURL(s.data),s.onProcessComplete()},this.data.onerror=function(){u.revokeObjectURL(s.data),s.onProcessError()},u.createObjectURL(this.data,r,"image/svg+xml")},addToCache:function(){var t=this.cache.addImage(this.key,this.data);this.pendingDestroy(t)}});s.register("htmlTexture",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;re.deltaAbsY()?g=-1:e.deltaAbsX()i&&s<(o=t.right-i)&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:c(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):0i&&s<(o=t.bottom-i)&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:c(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):0=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;this.systems.events.off(a.UPDATE,this.step,this),t.events.emit(a.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,n){return this.manager.add(t,e,i,n)},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 n=this.manager.getScene(e);return n&&n.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)},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(a.SHUTDOWN,this.shutdown,this),t.off(a.POST_UPDATE,this.step,this),t.off(a.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(a.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});r.register("ScenePlugin",o,"scenePlugin"),t.exports=o},function(t,e,i){t.exports={List:i(135),Map:i(168),ProcessQueue:i(192),RTree:i(473),Set:i(139),Size:i(372)}},function(t,e,i){var n=i(19),s=i(1323),r=n(!1,r={CanvasTexture:i(377),Events:i(127),FilterMode:s,Frame:i(95),Parsers:i(379),Texture:i(188),TextureManager:i(376),TextureSource:i(378)},s);t.exports=r},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){t.exports={Components:i(147),Parsers:i(1354),Formats:i(32),ImageCollection:i(488),ParseToTilemap:i(233),Tile:i(74),Tilemap:i(497),TilemapCreator:i(1368),TilemapFactory:i(1369),Tileset:i(105),LayerData:i(103),MapData:i(104),ObjectLayer:i(491),DynamicTilemapLayer:i(498),StaticTilemapLayer:i(499)}},function(t,e,i){var p=i(24),g=i(52);t.exports=function(t,e,i,n,s,r,o,a){t<0&&(t=0),e<0&&(e=0),void 0===o&&(o=!0);for(var h=p(t,e,i,n,null,a),u=s-t,l=r-e,c=0;c=t&&u.index<=e&&l(u,i)}n&&c(0,0,s.width,s.height,s)}}},function(t,e,i){var a=i(73),h=i(52),u=i(228);t.exports=function(t,e,i,n){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var s=0;s=s.delay&&(n=s.elapsed-s.delay,s.elapsed=s.delay,!s.hasDispatched&&s.callback&&(s.hasDispatched=!0,s.callback.apply(s.callbackScope,s.args)),0>2],s+=o[(3&i[r])<<4|i[r+1]>>4],s+=o[(15&i[r+1])<<2|i[r+2]>>6],s+=o[63&i[r+2]];return n%3==2?s=s.substring(0,s.length-1)+"=":n%3==1&&(s=s.substring(0,s.length-2)+"=="),s}},function(t,e,i){t.exports={Clone:i(67),Extend:i(19),GetAdvancedValue:i(15),GetFastValue:i(2),GetMinMaxValue:i(1394),GetValue:i(6),HasAll:i(1395),HasAny:i(407),HasValue:i(112),IsPlainObject:i(7),Merge:i(132),MergeRight:i(1396),Pick:i(489),SetValue:i(427)}},function(t,e,i){var o=i(6),a=i(17);t.exports=function(t,e,i,n,s){void 0===s&&(s=i);var r=o(t,e,s);return a(r,i,n)}},function(t,e){t.exports=function(t,e){for(var i=0;i 0) + { + src += '\n\telse '; + } + + if (i < maxTextures - 1) + { + src += 'if (outTexId < ' + i + '.5)'; + } + + src += '\n\t{'; + src += '\n\t\ttexture = texture2D(uMainSampler[' + i + '], outTexCoord);'; + src += '\n\t}'; + } + + fragmentShaderSource = fragmentShaderSource.replace(/%count%/gi, maxTextures.toString()); + + return fragmentShaderSource.replace(/%forloop%/gi, src); + } }; @@ -2787,24 +2824,24 @@ if (true) { module.exports = { - Alpha: __webpack_require__(534), + Alpha: __webpack_require__(537), AlphaSingle: __webpack_require__(273), - Animation: __webpack_require__(505), + Animation: __webpack_require__(507), BlendMode: __webpack_require__(276), - ComputedSize: __webpack_require__(553), - Crop: __webpack_require__(554), + ComputedSize: __webpack_require__(556), + Crop: __webpack_require__(557), Depth: __webpack_require__(277), - Flip: __webpack_require__(555), - GetBounds: __webpack_require__(556), + Flip: __webpack_require__(558), + GetBounds: __webpack_require__(559), Mask: __webpack_require__(281), - Origin: __webpack_require__(573), - PathFollower: __webpack_require__(574), - Pipeline: __webpack_require__(160), + Origin: __webpack_require__(576), + PathFollower: __webpack_require__(577), + Pipeline: __webpack_require__(161), ScrollFactor: __webpack_require__(284), - Size: __webpack_require__(575), - Texture: __webpack_require__(576), - TextureCrop: __webpack_require__(577), - Tint: __webpack_require__(578), + Size: __webpack_require__(578), + Texture: __webpack_require__(579), + TextureCrop: __webpack_require__(580), + Tint: __webpack_require__(581), ToJSON: __webpack_require__(285), Transform: __webpack_require__(286), TransformMatrix: __webpack_require__(30), @@ -2917,9 +2954,9 @@ module.exports = MATH_CONST; var Class = __webpack_require__(0); var ComponentsToJSON = __webpack_require__(285); -var DataManager = __webpack_require__(115); +var DataManager = __webpack_require__(118); var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(90); +var Events = __webpack_require__(91); /** * @classdesc @@ -3624,7 +3661,7 @@ module.exports = GameObject; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH = __webpack_require__(175); +var MATH = __webpack_require__(176); var GetValue = __webpack_require__(6); /** @@ -4168,22 +4205,22 @@ module.exports = Extend; module.exports = { - BLUR: __webpack_require__(557), - BOOT: __webpack_require__(558), - CONTEXT_LOST: __webpack_require__(559), - CONTEXT_RESTORED: __webpack_require__(560), - DESTROY: __webpack_require__(561), - FOCUS: __webpack_require__(562), - HIDDEN: __webpack_require__(563), - PAUSE: __webpack_require__(564), - POST_RENDER: __webpack_require__(565), - POST_STEP: __webpack_require__(566), - PRE_RENDER: __webpack_require__(567), - PRE_STEP: __webpack_require__(568), - READY: __webpack_require__(569), - RESUME: __webpack_require__(570), - STEP: __webpack_require__(571), - VISIBLE: __webpack_require__(572) + BLUR: __webpack_require__(560), + BOOT: __webpack_require__(561), + CONTEXT_LOST: __webpack_require__(562), + CONTEXT_RESTORED: __webpack_require__(563), + DESTROY: __webpack_require__(564), + FOCUS: __webpack_require__(565), + HIDDEN: __webpack_require__(566), + PAUSE: __webpack_require__(567), + POST_RENDER: __webpack_require__(568), + POST_STEP: __webpack_require__(569), + PRE_RENDER: __webpack_require__(570), + PRE_STEP: __webpack_require__(571), + READY: __webpack_require__(572), + RESUME: __webpack_require__(573), + STEP: __webpack_require__(574), + VISIBLE: __webpack_require__(575) }; @@ -4200,12 +4237,12 @@ module.exports = { var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var Events = __webpack_require__(82); +var Events = __webpack_require__(83); var GetFastValue = __webpack_require__(2); -var GetURL = __webpack_require__(140); +var GetURL = __webpack_require__(144); var MergeXHRSettings = __webpack_require__(221); -var XHRLoader = __webpack_require__(456); -var XHRSettings = __webpack_require__(141); +var XHRLoader = __webpack_require__(458); +var XHRSettings = __webpack_require__(145); /** * @classdesc @@ -4752,25 +4789,25 @@ module.exports = File; module.exports = { - BOOT: __webpack_require__(710), - CREATE: __webpack_require__(711), - DESTROY: __webpack_require__(712), - PAUSE: __webpack_require__(713), - POST_UPDATE: __webpack_require__(714), - PRE_UPDATE: __webpack_require__(715), - READY: __webpack_require__(716), - RENDER: __webpack_require__(717), - RESUME: __webpack_require__(718), - SHUTDOWN: __webpack_require__(719), - SLEEP: __webpack_require__(720), - START: __webpack_require__(721), - TRANSITION_COMPLETE: __webpack_require__(722), - TRANSITION_INIT: __webpack_require__(723), - TRANSITION_OUT: __webpack_require__(724), - TRANSITION_START: __webpack_require__(725), - TRANSITION_WAKE: __webpack_require__(726), - UPDATE: __webpack_require__(727), - WAKE: __webpack_require__(728) + BOOT: __webpack_require__(713), + CREATE: __webpack_require__(714), + DESTROY: __webpack_require__(715), + PAUSE: __webpack_require__(716), + POST_UPDATE: __webpack_require__(717), + PRE_UPDATE: __webpack_require__(718), + READY: __webpack_require__(719), + RENDER: __webpack_require__(720), + RESUME: __webpack_require__(721), + SHUTDOWN: __webpack_require__(722), + SLEEP: __webpack_require__(723), + START: __webpack_require__(724), + TRANSITION_COMPLETE: __webpack_require__(725), + TRANSITION_INIT: __webpack_require__(726), + TRANSITION_OUT: __webpack_require__(727), + TRANSITION_START: __webpack_require__(728), + TRANSITION_WAKE: __webpack_require__(729), + UPDATE: __webpack_require__(730), + WAKE: __webpack_require__(731) }; @@ -5146,7 +5183,7 @@ module.exports = PropertyValueSet; */ var CONST = __webpack_require__(33); -var Smoothing = __webpack_require__(172); +var Smoothing = __webpack_require__(173); // The pool into which the canvas elements are placed. var pool = []; @@ -5625,7 +5662,7 @@ module.exports = SetTransform; var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var Line = __webpack_require__(49); +var Line = __webpack_require__(39); /** * @classdesc @@ -6943,9 +6980,9 @@ module.exports = TransformMatrix; */ var Class = __webpack_require__(0); -var GetColor = __webpack_require__(170); +var GetColor = __webpack_require__(171); var GetColor32 = __webpack_require__(299); -var HSVToRGB = __webpack_require__(171); +var HSVToRGB = __webpack_require__(172); var RGBToHSV = __webpack_require__(300); /** @@ -7876,7 +7913,7 @@ var CONST = { * @type {string} * @since 3.0.0 */ - VERSION: '3.50.0-beta.1', + VERSION: '3.50.0-beta.2', BlendModes: __webpack_require__(53), @@ -8171,6 +8208,343 @@ module.exports = PropertyValueInc; /* 39 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var GetPoint = __webpack_require__(279); +var GetPoints = __webpack_require__(158); +var GEOM_CONST = __webpack_require__(48); +var Random = __webpack_require__(159); +var Vector2 = __webpack_require__(3); + +/** + * @classdesc + * Defines a Line segment, a part of a line between two endpoints. + * + * @class Line + * @memberof Phaser.Geom + * @constructor + * @since 3.0.0 + * + * @param {number} [x1=0] - The x coordinate of the lines starting point. + * @param {number} [y1=0] - The y coordinate of the lines starting point. + * @param {number} [x2=0] - The x coordinate of the lines ending point. + * @param {number} [y2=0] - The y coordinate of the lines ending point. + */ +var Line = new Class({ + + initialize: + + function Line (x1, y1, x2, y2) + { + if (x1 === undefined) { x1 = 0; } + if (y1 === undefined) { y1 = 0; } + if (x2 === undefined) { x2 = 0; } + if (y2 === undefined) { y2 = 0; } + + /** + * The geometry constant type of this object: `GEOM_CONST.LINE`. + * Used for fast type comparisons. + * + * @name Phaser.Geom.Line#type + * @type {integer} + * @readonly + * @since 3.19.0 + */ + this.type = GEOM_CONST.LINE; + + /** + * The x coordinate of the lines starting point. + * + * @name Phaser.Geom.Line#x1 + * @type {number} + * @since 3.0.0 + */ + this.x1 = x1; + + /** + * The y coordinate of the lines starting point. + * + * @name Phaser.Geom.Line#y1 + * @type {number} + * @since 3.0.0 + */ + this.y1 = y1; + + /** + * The x coordinate of the lines ending point. + * + * @name Phaser.Geom.Line#x2 + * @type {number} + * @since 3.0.0 + */ + this.x2 = x2; + + /** + * The y coordinate of the lines ending point. + * + * @name Phaser.Geom.Line#y2 + * @type {number} + * @since 3.0.0 + */ + this.y2 = y2; + }, + + /** + * Get a point on a line that's a given percentage along its length. + * + * @method Phaser.Geom.Line#getPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [output,$return] + * + * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line. + * @param {(Phaser.Geom.Point|object)} [output] - An optional point, or point-like object, to store the coordinates of the point on the line. + * + * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point on the line. + */ + getPoint: function (position, output) + { + return GetPoint(this, position, output); + }, + + /** + * Get a number of points along a line's length. + * + * Provide a `quantity` to get an exact number of points along the line. + * + * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when + * providing a `stepRate`. + * + * @method Phaser.Geom.Line#getPoints + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point[]} O - [output,$return] + * + * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead. + * @param {integer} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`. + * @param {(array|Phaser.Geom.Point[])} [output] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line. + * + * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line. + */ + getPoints: function (quantity, stepRate, output) + { + return GetPoints(this, quantity, stepRate, output); + }, + + /** + * Get a random Point on the Line. + * + * @method Phaser.Geom.Line#getRandomPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [point,$return] + * + * @param {(Phaser.Geom.Point|object)} [point] - An instance of a Point to be modified. + * + * @return {Phaser.Geom.Point} A random Point on the Line. + */ + getRandomPoint: function (point) + { + return Random(this, point); + }, + + /** + * Set new coordinates for the line endpoints. + * + * @method Phaser.Geom.Line#setTo + * @since 3.0.0 + * + * @param {number} [x1=0] - The x coordinate of the lines starting point. + * @param {number} [y1=0] - The y coordinate of the lines starting point. + * @param {number} [x2=0] - The x coordinate of the lines ending point. + * @param {number} [y2=0] - The y coordinate of the lines ending point. + * + * @return {this} This Line object. + */ + setTo: function (x1, y1, x2, y2) + { + if (x1 === undefined) { x1 = 0; } + if (y1 === undefined) { y1 = 0; } + if (x2 === undefined) { x2 = 0; } + if (y2 === undefined) { y2 = 0; } + + this.x1 = x1; + this.y1 = y1; + + this.x2 = x2; + this.y2 = y2; + + return this; + }, + + /** + * Returns a Vector2 object that corresponds to the start of this Line. + * + * @method Phaser.Geom.Line#getPointA + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [vec2,$return] + * + * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created. + * + * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the start of this Line. + */ + getPointA: function (vec2) + { + if (vec2 === undefined) { vec2 = new Vector2(); } + + vec2.set(this.x1, this.y1); + + return vec2; + }, + + /** + * Returns a Vector2 object that corresponds to the end of this Line. + * + * @method Phaser.Geom.Line#getPointB + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [vec2,$return] + * + * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created. + * + * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the end of this Line. + */ + getPointB: function (vec2) + { + if (vec2 === undefined) { vec2 = new Vector2(); } + + vec2.set(this.x2, this.y2); + + return vec2; + }, + + /** + * The left position of the Line. + * + * @name Phaser.Geom.Line#left + * @type {number} + * @since 3.0.0 + */ + left: { + + get: function () + { + return Math.min(this.x1, this.x2); + }, + + set: function (value) + { + if (this.x1 <= this.x2) + { + this.x1 = value; + } + else + { + this.x2 = value; + } + } + + }, + + /** + * The right position of the Line. + * + * @name Phaser.Geom.Line#right + * @type {number} + * @since 3.0.0 + */ + right: { + + get: function () + { + return Math.max(this.x1, this.x2); + }, + + set: function (value) + { + if (this.x1 > this.x2) + { + this.x1 = value; + } + else + { + this.x2 = value; + } + } + + }, + + /** + * The top position of the Line. + * + * @name Phaser.Geom.Line#top + * @type {number} + * @since 3.0.0 + */ + top: { + + get: function () + { + return Math.min(this.y1, this.y2); + }, + + set: function (value) + { + if (this.y1 <= this.y2) + { + this.y1 = value; + } + else + { + this.y2 = value; + } + } + + }, + + /** + * The bottom position of the Line. + * + * @name Phaser.Geom.Line#bottom + * @type {number} + * @since 3.0.0 + */ + bottom: { + + get: function () + { + return Math.max(this.y1, this.y2); + }, + + set: function (value) + { + if (this.y1 > this.y2) + { + this.y1 = value; + } + else + { + this.y2 = value; + } + } + + } + +}); + +module.exports = Line; + + +/***/ }), +/* 40 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. @@ -8198,7 +8572,7 @@ module.exports = DegToRad; /***/ }), -/* 40 */ +/* 41 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8213,29 +8587,29 @@ module.exports = DegToRad; module.exports = { - DESTROY: __webpack_require__(648), - FADE_IN_COMPLETE: __webpack_require__(649), - FADE_IN_START: __webpack_require__(650), - FADE_OUT_COMPLETE: __webpack_require__(651), - FADE_OUT_START: __webpack_require__(652), - FLASH_COMPLETE: __webpack_require__(653), - FLASH_START: __webpack_require__(654), - PAN_COMPLETE: __webpack_require__(655), - PAN_START: __webpack_require__(656), - POST_RENDER: __webpack_require__(657), - PRE_RENDER: __webpack_require__(658), - ROTATE_COMPLETE: __webpack_require__(659), - ROTATE_START: __webpack_require__(660), - SHAKE_COMPLETE: __webpack_require__(661), - SHAKE_START: __webpack_require__(662), - ZOOM_COMPLETE: __webpack_require__(663), - ZOOM_START: __webpack_require__(664) + DESTROY: __webpack_require__(651), + FADE_IN_COMPLETE: __webpack_require__(652), + FADE_IN_START: __webpack_require__(653), + FADE_OUT_COMPLETE: __webpack_require__(654), + FADE_OUT_START: __webpack_require__(655), + FLASH_COMPLETE: __webpack_require__(656), + FLASH_START: __webpack_require__(657), + PAN_COMPLETE: __webpack_require__(658), + PAN_START: __webpack_require__(659), + POST_RENDER: __webpack_require__(660), + PRE_RENDER: __webpack_require__(661), + ROTATE_COMPLETE: __webpack_require__(662), + ROTATE_START: __webpack_require__(663), + SHAKE_COMPLETE: __webpack_require__(664), + SHAKE_START: __webpack_require__(665), + ZOOM_COMPLETE: __webpack_require__(666), + ZOOM_START: __webpack_require__(667) }; /***/ }), -/* 41 */ +/* 42 */ /***/ (function(module, exports) { /** @@ -8272,7 +8646,7 @@ module.exports = FillStyleCanvas; /***/ }), -/* 42 */ +/* 43 */ /***/ (function(module, exports) { /** @@ -8816,7 +9190,7 @@ module.exports = Common; /***/ }), -/* 43 */ +/* 44 */ /***/ (function(module, exports) { /** @@ -8849,7 +9223,7 @@ module.exports = SetTop; /***/ }), -/* 44 */ +/* 45 */ /***/ (function(module, exports) { /** @@ -8882,7 +9256,7 @@ module.exports = SetLeft; /***/ }), -/* 45 */ +/* 46 */ /***/ (function(module, exports) { /** @@ -8915,7 +9289,7 @@ module.exports = SetRight; /***/ }), -/* 46 */ +/* 47 */ /***/ (function(module, exports) { /** @@ -8948,7 +9322,7 @@ module.exports = SetBottom; /***/ }), -/* 47 */ +/* 48 */ /***/ (function(module, exports) { /** @@ -9028,7 +9402,7 @@ module.exports = GEOM_CONST; /***/ }), -/* 48 */ +/* 49 */ /***/ (function(module, exports) { /** @@ -9062,343 +9436,6 @@ var Contains = function (rect, x, y) module.exports = Contains; -/***/ }), -/* 49 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var GetPoint = __webpack_require__(279); -var GetPoints = __webpack_require__(157); -var GEOM_CONST = __webpack_require__(47); -var Random = __webpack_require__(158); -var Vector2 = __webpack_require__(3); - -/** - * @classdesc - * Defines a Line segment, a part of a line between two endpoints. - * - * @class Line - * @memberof Phaser.Geom - * @constructor - * @since 3.0.0 - * - * @param {number} [x1=0] - The x coordinate of the lines starting point. - * @param {number} [y1=0] - The y coordinate of the lines starting point. - * @param {number} [x2=0] - The x coordinate of the lines ending point. - * @param {number} [y2=0] - The y coordinate of the lines ending point. - */ -var Line = new Class({ - - initialize: - - function Line (x1, y1, x2, y2) - { - if (x1 === undefined) { x1 = 0; } - if (y1 === undefined) { y1 = 0; } - if (x2 === undefined) { x2 = 0; } - if (y2 === undefined) { y2 = 0; } - - /** - * The geometry constant type of this object: `GEOM_CONST.LINE`. - * Used for fast type comparisons. - * - * @name Phaser.Geom.Line#type - * @type {integer} - * @readonly - * @since 3.19.0 - */ - this.type = GEOM_CONST.LINE; - - /** - * The x coordinate of the lines starting point. - * - * @name Phaser.Geom.Line#x1 - * @type {number} - * @since 3.0.0 - */ - this.x1 = x1; - - /** - * The y coordinate of the lines starting point. - * - * @name Phaser.Geom.Line#y1 - * @type {number} - * @since 3.0.0 - */ - this.y1 = y1; - - /** - * The x coordinate of the lines ending point. - * - * @name Phaser.Geom.Line#x2 - * @type {number} - * @since 3.0.0 - */ - this.x2 = x2; - - /** - * The y coordinate of the lines ending point. - * - * @name Phaser.Geom.Line#y2 - * @type {number} - * @since 3.0.0 - */ - this.y2 = y2; - }, - - /** - * Get a point on a line that's a given percentage along its length. - * - * @method Phaser.Geom.Line#getPoint - * @since 3.0.0 - * - * @generic {Phaser.Geom.Point} O - [output,$return] - * - * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line. - * @param {(Phaser.Geom.Point|object)} [output] - An optional point, or point-like object, to store the coordinates of the point on the line. - * - * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point on the line. - */ - getPoint: function (position, output) - { - return GetPoint(this, position, output); - }, - - /** - * Get a number of points along a line's length. - * - * Provide a `quantity` to get an exact number of points along the line. - * - * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when - * providing a `stepRate`. - * - * @method Phaser.Geom.Line#getPoints - * @since 3.0.0 - * - * @generic {Phaser.Geom.Point[]} O - [output,$return] - * - * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead. - * @param {integer} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`. - * @param {(array|Phaser.Geom.Point[])} [output] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line. - * - * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line. - */ - getPoints: function (quantity, stepRate, output) - { - return GetPoints(this, quantity, stepRate, output); - }, - - /** - * Get a random Point on the Line. - * - * @method Phaser.Geom.Line#getRandomPoint - * @since 3.0.0 - * - * @generic {Phaser.Geom.Point} O - [point,$return] - * - * @param {(Phaser.Geom.Point|object)} [point] - An instance of a Point to be modified. - * - * @return {Phaser.Geom.Point} A random Point on the Line. - */ - getRandomPoint: function (point) - { - return Random(this, point); - }, - - /** - * Set new coordinates for the line endpoints. - * - * @method Phaser.Geom.Line#setTo - * @since 3.0.0 - * - * @param {number} [x1=0] - The x coordinate of the lines starting point. - * @param {number} [y1=0] - The y coordinate of the lines starting point. - * @param {number} [x2=0] - The x coordinate of the lines ending point. - * @param {number} [y2=0] - The y coordinate of the lines ending point. - * - * @return {this} This Line object. - */ - setTo: function (x1, y1, x2, y2) - { - if (x1 === undefined) { x1 = 0; } - if (y1 === undefined) { y1 = 0; } - if (x2 === undefined) { x2 = 0; } - if (y2 === undefined) { y2 = 0; } - - this.x1 = x1; - this.y1 = y1; - - this.x2 = x2; - this.y2 = y2; - - return this; - }, - - /** - * Returns a Vector2 object that corresponds to the start of this Line. - * - * @method Phaser.Geom.Line#getPointA - * @since 3.0.0 - * - * @generic {Phaser.Math.Vector2} O - [vec2,$return] - * - * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created. - * - * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the start of this Line. - */ - getPointA: function (vec2) - { - if (vec2 === undefined) { vec2 = new Vector2(); } - - vec2.set(this.x1, this.y1); - - return vec2; - }, - - /** - * Returns a Vector2 object that corresponds to the end of this Line. - * - * @method Phaser.Geom.Line#getPointB - * @since 3.0.0 - * - * @generic {Phaser.Math.Vector2} O - [vec2,$return] - * - * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created. - * - * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the end of this Line. - */ - getPointB: function (vec2) - { - if (vec2 === undefined) { vec2 = new Vector2(); } - - vec2.set(this.x2, this.y2); - - return vec2; - }, - - /** - * The left position of the Line. - * - * @name Phaser.Geom.Line#left - * @type {number} - * @since 3.0.0 - */ - left: { - - get: function () - { - return Math.min(this.x1, this.x2); - }, - - set: function (value) - { - if (this.x1 <= this.x2) - { - this.x1 = value; - } - else - { - this.x2 = value; - } - } - - }, - - /** - * The right position of the Line. - * - * @name Phaser.Geom.Line#right - * @type {number} - * @since 3.0.0 - */ - right: { - - get: function () - { - return Math.max(this.x1, this.x2); - }, - - set: function (value) - { - if (this.x1 > this.x2) - { - this.x1 = value; - } - else - { - this.x2 = value; - } - } - - }, - - /** - * The top position of the Line. - * - * @name Phaser.Geom.Line#top - * @type {number} - * @since 3.0.0 - */ - top: { - - get: function () - { - return Math.min(this.y1, this.y2); - }, - - set: function (value) - { - if (this.y1 <= this.y2) - { - this.y1 = value; - } - else - { - this.y2 = value; - } - } - - }, - - /** - * The bottom position of the Line. - * - * @name Phaser.Geom.Line#bottom - * @type {number} - * @since 3.0.0 - */ - bottom: { - - get: function () - { - return Math.max(this.y1, this.y2); - }, - - set: function (value) - { - if (this.y1 > this.y2) - { - this.y1 = value; - } - else - { - this.y2 = value; - } - } - - } - -}); - -module.exports = Line; - - /***/ }), /* 50 */ /***/ (function(module, exports) { @@ -9576,7 +9613,7 @@ module.exports = CONST; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(144); +var GetTileAt = __webpack_require__(148); var GetTilesWithin = __webpack_require__(24); /** @@ -10021,52 +10058,52 @@ module.exports = DistanceBetween; module.exports = { - BOOT: __webpack_require__(826), - DESTROY: __webpack_require__(827), - DRAG_END: __webpack_require__(828), - DRAG_ENTER: __webpack_require__(829), - DRAG: __webpack_require__(830), - DRAG_LEAVE: __webpack_require__(831), - DRAG_OVER: __webpack_require__(832), - DRAG_START: __webpack_require__(833), - DROP: __webpack_require__(834), - GAME_OUT: __webpack_require__(835), - GAME_OVER: __webpack_require__(836), - GAMEOBJECT_DOWN: __webpack_require__(837), - GAMEOBJECT_DRAG_END: __webpack_require__(838), - GAMEOBJECT_DRAG_ENTER: __webpack_require__(839), - GAMEOBJECT_DRAG: __webpack_require__(840), - GAMEOBJECT_DRAG_LEAVE: __webpack_require__(841), - GAMEOBJECT_DRAG_OVER: __webpack_require__(842), - GAMEOBJECT_DRAG_START: __webpack_require__(843), - GAMEOBJECT_DROP: __webpack_require__(844), - GAMEOBJECT_MOVE: __webpack_require__(845), - GAMEOBJECT_OUT: __webpack_require__(846), - GAMEOBJECT_OVER: __webpack_require__(847), - GAMEOBJECT_POINTER_DOWN: __webpack_require__(848), - GAMEOBJECT_POINTER_MOVE: __webpack_require__(849), - GAMEOBJECT_POINTER_OUT: __webpack_require__(850), - GAMEOBJECT_POINTER_OVER: __webpack_require__(851), - GAMEOBJECT_POINTER_UP: __webpack_require__(852), - GAMEOBJECT_POINTER_WHEEL: __webpack_require__(853), - GAMEOBJECT_UP: __webpack_require__(854), - GAMEOBJECT_WHEEL: __webpack_require__(855), - MANAGER_BOOT: __webpack_require__(856), - MANAGER_PROCESS: __webpack_require__(857), - MANAGER_UPDATE: __webpack_require__(858), - POINTER_DOWN: __webpack_require__(859), - POINTER_DOWN_OUTSIDE: __webpack_require__(860), - POINTER_MOVE: __webpack_require__(861), - POINTER_OUT: __webpack_require__(862), - POINTER_OVER: __webpack_require__(863), - POINTER_UP: __webpack_require__(864), - POINTER_UP_OUTSIDE: __webpack_require__(865), - POINTER_WHEEL: __webpack_require__(866), - POINTERLOCK_CHANGE: __webpack_require__(867), - PRE_UPDATE: __webpack_require__(868), - SHUTDOWN: __webpack_require__(869), - START: __webpack_require__(870), - UPDATE: __webpack_require__(871) + BOOT: __webpack_require__(831), + DESTROY: __webpack_require__(832), + DRAG_END: __webpack_require__(833), + DRAG_ENTER: __webpack_require__(834), + DRAG: __webpack_require__(835), + DRAG_LEAVE: __webpack_require__(836), + DRAG_OVER: __webpack_require__(837), + DRAG_START: __webpack_require__(838), + DROP: __webpack_require__(839), + GAME_OUT: __webpack_require__(840), + GAME_OVER: __webpack_require__(841), + GAMEOBJECT_DOWN: __webpack_require__(842), + GAMEOBJECT_DRAG_END: __webpack_require__(843), + GAMEOBJECT_DRAG_ENTER: __webpack_require__(844), + GAMEOBJECT_DRAG: __webpack_require__(845), + GAMEOBJECT_DRAG_LEAVE: __webpack_require__(846), + GAMEOBJECT_DRAG_OVER: __webpack_require__(847), + GAMEOBJECT_DRAG_START: __webpack_require__(848), + GAMEOBJECT_DROP: __webpack_require__(849), + GAMEOBJECT_MOVE: __webpack_require__(850), + GAMEOBJECT_OUT: __webpack_require__(851), + GAMEOBJECT_OVER: __webpack_require__(852), + GAMEOBJECT_POINTER_DOWN: __webpack_require__(853), + GAMEOBJECT_POINTER_MOVE: __webpack_require__(854), + GAMEOBJECT_POINTER_OUT: __webpack_require__(855), + GAMEOBJECT_POINTER_OVER: __webpack_require__(856), + GAMEOBJECT_POINTER_UP: __webpack_require__(857), + GAMEOBJECT_POINTER_WHEEL: __webpack_require__(858), + GAMEOBJECT_UP: __webpack_require__(859), + GAMEOBJECT_WHEEL: __webpack_require__(860), + MANAGER_BOOT: __webpack_require__(861), + MANAGER_PROCESS: __webpack_require__(862), + MANAGER_UPDATE: __webpack_require__(863), + POINTER_DOWN: __webpack_require__(864), + POINTER_DOWN_OUTSIDE: __webpack_require__(865), + POINTER_MOVE: __webpack_require__(866), + POINTER_OUT: __webpack_require__(867), + POINTER_OVER: __webpack_require__(868), + POINTER_UP: __webpack_require__(869), + POINTER_UP_OUTSIDE: __webpack_require__(870), + POINTER_WHEEL: __webpack_require__(871), + POINTERLOCK_CHANGE: __webpack_require__(872), + PRE_UPDATE: __webpack_require__(873), + SHUTDOWN: __webpack_require__(874), + START: __webpack_require__(875), + UPDATE: __webpack_require__(876) }; @@ -10188,29 +10225,29 @@ module.exports = Wrap; module.exports = { - COMPLETE: __webpack_require__(894), - DECODED: __webpack_require__(895), - DECODED_ALL: __webpack_require__(896), - DESTROY: __webpack_require__(897), - DETUNE: __webpack_require__(898), - GLOBAL_DETUNE: __webpack_require__(899), - GLOBAL_MUTE: __webpack_require__(900), - GLOBAL_RATE: __webpack_require__(901), - GLOBAL_VOLUME: __webpack_require__(902), - LOOP: __webpack_require__(903), - LOOPED: __webpack_require__(904), - MUTE: __webpack_require__(905), - PAUSE_ALL: __webpack_require__(906), - PAUSE: __webpack_require__(907), - PLAY: __webpack_require__(908), - RATE: __webpack_require__(909), - RESUME_ALL: __webpack_require__(910), - RESUME: __webpack_require__(911), - SEEK: __webpack_require__(912), - STOP_ALL: __webpack_require__(913), - STOP: __webpack_require__(914), - UNLOCKED: __webpack_require__(915), - VOLUME: __webpack_require__(916) + COMPLETE: __webpack_require__(899), + DECODED: __webpack_require__(900), + DECODED_ALL: __webpack_require__(901), + DESTROY: __webpack_require__(902), + DETUNE: __webpack_require__(903), + GLOBAL_DETUNE: __webpack_require__(904), + GLOBAL_MUTE: __webpack_require__(905), + GLOBAL_RATE: __webpack_require__(906), + GLOBAL_VOLUME: __webpack_require__(907), + LOOP: __webpack_require__(908), + LOOPED: __webpack_require__(909), + MUTE: __webpack_require__(910), + PAUSE_ALL: __webpack_require__(911), + PAUSE: __webpack_require__(912), + PLAY: __webpack_require__(913), + RATE: __webpack_require__(914), + RESUME_ALL: __webpack_require__(915), + RESUME: __webpack_require__(916), + SEEK: __webpack_require__(917), + STOP_ALL: __webpack_require__(918), + STOP: __webpack_require__(919), + UNLOCKED: __webpack_require__(920), + VOLUME: __webpack_require__(921) }; @@ -10696,12 +10733,12 @@ var Body = {}; module.exports = Body; -var Vertices = __webpack_require__(86); +var Vertices = __webpack_require__(87); var Vector = __webpack_require__(100); var Sleeping = __webpack_require__(243); -var Common = __webpack_require__(42); +var Common = __webpack_require__(43); var Bounds = __webpack_require__(101); -var Axes = __webpack_require__(514); +var Axes = __webpack_require__(517); (function() { @@ -12177,8 +12214,8 @@ var Class = __webpack_require__(0); var Contains = __webpack_require__(56); var GetPoint = __webpack_require__(270); var GetPoints = __webpack_require__(271); -var GEOM_CONST = __webpack_require__(47); -var Random = __webpack_require__(154); +var GEOM_CONST = __webpack_require__(48); +var Random = __webpack_require__(155); /** * @classdesc @@ -12549,17 +12586,17 @@ module.exports = Circle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -// Earcut 2.1.4 (December 4th 2018) +// Earcut 2.2.2 (January 21st 2020) /* * ISC License - * + * * Copyright (c) 2016, Mapbox - * + * * Permission to use, copy, modify, and/or distribute this software for any purpose * with or without fee is hereby granted, provided that the above copyright notice * and this permission notice appear in all copies. - * + * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, @@ -12630,7 +12667,7 @@ function linkedList(data, start, end, dim, clockwise) { return last; } -// eliminate collinear or duplicate points +// eliminate colinear or duplicate points function filterPoints(start, end) { if (!start) return start; if (!end) end = start; @@ -12694,7 +12731,7 @@ function earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) { // if this didn't work, try curing all small self-intersections locally } else if (pass === 1) { - ear = cureLocalIntersections(ear, triangles, dim); + ear = cureLocalIntersections(filterPoints(ear), triangles, dim); earcutLinked(ear, triangles, dim, minX, minY, invSize, 2); // as a last resort, try splitting the remaining polygon into two @@ -12801,7 +12838,7 @@ function cureLocalIntersections(start, triangles, dim) { p = p.next; } while (p !== start); - return p; + return filterPoints(p); } // try splitting polygon into two and triangulate them independently @@ -12815,7 +12852,7 @@ function splitEarcut(start, triangles, dim, minX, minY, invSize) { // split the polygon in two by the diagonal var c = splitPolygon(a, b); - // filter collinear points around the cuts + // filter colinear points around the cuts a = filterPoints(a, a.next); c = filterPoints(c, c.next); @@ -12863,6 +12900,9 @@ function eliminateHole(hole, outerNode) { outerNode = findHoleBridge(hole, outerNode); if (outerNode) { var b = splitPolygon(outerNode, hole); + + // filter collinear points around the cuts + filterPoints(outerNode, outerNode.next); filterPoints(b, b.next); } } @@ -12894,7 +12934,7 @@ function findHoleBridge(hole, outerNode) { if (!m) return null; - if (hx === qx) return m.prev; // hole touches outer segment; pick lower endpoint + if (hx === qx) return m; // hole touches outer segment; pick leftmost endpoint // look for points inside the triangle of hole point, segment intersection and endpoint; // if there are no points found, we have a valid connection; @@ -12906,26 +12946,32 @@ function findHoleBridge(hole, outerNode) { tanMin = Infinity, tan; - p = m.next; + p = m; - while (p !== stop) { + do { if (hx >= p.x && p.x >= mx && hx !== p.x && pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) { tan = Math.abs(hy - p.y) / (hx - p.x); // tangential - if ((tan < tanMin || (tan === tanMin && p.x > m.x)) && locallyInside(p, hole)) { + if (locallyInside(p, hole) && + (tan < tanMin || (tan === tanMin && (p.x > m.x || (p.x === m.x && sectorContainsSector(m, p)))))) { m = p; tanMin = tan; } } p = p.next; - } + } while (p !== stop); return m; } +// whether sector in vertex m contains sector in vertex p in the same coordinates +function sectorContainsSector(m, p) { + return area(m.prev, m, p.prev) < 0 && area(p.next, m, m.next) < 0; +} + // interlink polygon nodes in z-order function indexCurve(start, minX, minY, invSize) { var p = start; @@ -13019,7 +13065,7 @@ function getLeftmost(start) { var p = start, leftmost = start; do { - if (p.x < leftmost.x) leftmost = p; + if (p.x < leftmost.x || (p.x === leftmost.x && p.y < leftmost.y)) leftmost = p; p = p.next; } while (p !== start); @@ -13035,8 +13081,10 @@ function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) { // check if a diagonal between two polygon nodes is valid (lies in polygon interior) function isValidDiagonal(a, b) { - return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && - locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b); + return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && // dones't intersect other edges + (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible + (area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors + equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case } // signed area of a triangle @@ -13051,10 +13099,28 @@ function equals(p1, p2) { // check if two segments intersect function intersects(p1, q1, p2, q2) { - if ((equals(p1, q1) && equals(p2, q2)) || - (equals(p1, q2) && equals(p2, q1))) return true; - return area(p1, q1, p2) > 0 !== area(p1, q1, q2) > 0 && - area(p2, q2, p1) > 0 !== area(p2, q2, q1) > 0; + var o1 = sign(area(p1, q1, p2)); + var o2 = sign(area(p1, q1, q2)); + var o3 = sign(area(p2, q2, p1)); + var o4 = sign(area(p2, q2, q1)); + + if (o1 !== o2 && o3 !== o4) return true; // general case + + if (o1 === 0 && onSegment(p1, p2, q1)) return true; // p1, q1 and p2 are collinear and p2 lies on p1q1 + if (o2 === 0 && onSegment(p1, q2, q1)) return true; // p1, q1 and q2 are collinear and q2 lies on p1q1 + if (o3 === 0 && onSegment(p2, p1, q2)) return true; // p2, q2 and p1 are collinear and p1 lies on p2q2 + if (o4 === 0 && onSegment(p2, q1, q2)) return true; // p2, q2 and q1 are collinear and q1 lies on p2q2 + + return false; +} + +// for collinear points p, q, r, check if point q lies on segment pr +function onSegment(p, q, r) { + return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y); +} + +function sign(num) { + return num > 0 ? 1 : num < 0 ? -1 : 0; } // check if a polygon diagonal intersects any polygon segments @@ -13321,7 +13387,7 @@ module.exports = SafeRange; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var EaseMap = __webpack_require__(117); +var EaseMap = __webpack_require__(120); var UppercaseFirst = __webpack_require__(187); /** @@ -13506,12 +13572,12 @@ module.exports = StrokePathWebGL; */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(83); +var Contains = __webpack_require__(84); var GetPoint = __webpack_require__(425); var GetPoints = __webpack_require__(426); -var GEOM_CONST = __webpack_require__(47); -var Line = __webpack_require__(49); -var Random = __webpack_require__(163); +var GEOM_CONST = __webpack_require__(48); +var Line = __webpack_require__(39); +var Random = __webpack_require__(164); /** * @classdesc @@ -14264,7 +14330,7 @@ module.exports = SetTileCollision; var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var Rectangle = __webpack_require__(445); +var Rectangle = __webpack_require__(447); /** * @classdesc @@ -15103,7 +15169,7 @@ module.exports = Tile; var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var SpriteRender = __webpack_require__(971); +var SpriteRender = __webpack_require__(976); /** * @classdesc @@ -15396,6 +15462,816 @@ module.exports = SetCenterY; /***/ }), /* 80 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji +// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl + +var Class = __webpack_require__(0); + +/** + * @classdesc + * A representation of a vector in 3D space. + * + * A three-component vector. + * + * @class Vector3 + * @memberof Phaser.Math + * @constructor + * @since 3.0.0 + * + * @param {number} [x] - The x component. + * @param {number} [y] - The y component. + * @param {number} [z] - The z component. + */ +var Vector3 = new Class({ + + initialize: + + function Vector3 (x, y, z) + { + /** + * The x component of this Vector. + * + * @name Phaser.Math.Vector3#x + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.x = 0; + + /** + * The y component of this Vector. + * + * @name Phaser.Math.Vector3#y + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.y = 0; + + /** + * The z component of this Vector. + * + * @name Phaser.Math.Vector3#z + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.z = 0; + + if (typeof x === 'object') + { + this.x = x.x || 0; + this.y = x.y || 0; + this.z = x.z || 0; + } + else + { + this.x = x || 0; + this.y = y || 0; + this.z = z || 0; + } + }, + + /** + * Set this Vector to point up. + * + * Sets the y component of the vector to 1, and the others to 0. + * + * @method Phaser.Math.Vector3#up + * @since 3.0.0 + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + up: function () + { + this.x = 0; + this.y = 1; + this.z = 0; + + return this; + }, + + /** + * Make a clone of this Vector3. + * + * @method Phaser.Math.Vector3#clone + * @since 3.0.0 + * + * @return {Phaser.Math.Vector3} A new Vector3 object containing this Vectors values. + */ + clone: function () + { + return new Vector3(this.x, this.y, this.z); + }, + + /** + * Calculate the cross (vector) product of two given Vectors. + * + * @method Phaser.Math.Vector3#crossVectors + * @since 3.0.0 + * + * @param {Phaser.Math.Vector3} a - The first Vector to multiply. + * @param {Phaser.Math.Vector3} b - The second Vector to multiply. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + crossVectors: function (a, b) + { + var ax = a.x; + var ay = a.y; + var az = a.z; + var bx = b.x; + var by = b.y; + var bz = b.z; + + this.x = ay * bz - az * by; + this.y = az * bx - ax * bz; + this.z = ax * by - ay * bx; + + return this; + }, + + /** + * Check whether this Vector is equal to a given Vector. + * + * Performs a strict equality check against each Vector's components. + * + * @method Phaser.Math.Vector3#equals + * @since 3.0.0 + * + * @param {Phaser.Math.Vector3} v - The Vector3 to compare against. + * + * @return {boolean} True if the two vectors strictly match, otherwise false. + */ + equals: function (v) + { + return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z)); + }, + + /** + * Copy the components of a given Vector into this Vector. + * + * @method Phaser.Math.Vector3#copy + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} src - The Vector to copy the components from. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + copy: function (src) + { + this.x = src.x; + this.y = src.y; + this.z = src.z || 0; + + return this; + }, + + /** + * Set the `x`, `y`, and `z` components of this Vector to the given `x`, `y`, and `z` values. + * + * @method Phaser.Math.Vector3#set + * @since 3.0.0 + * + * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y and z components. + * @param {number} [y] - The y value to set for this Vector. + * @param {number} [z] - The z value to set for this Vector. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + set: function (x, y, z) + { + if (typeof x === 'object') + { + this.x = x.x || 0; + this.y = x.y || 0; + this.z = x.z || 0; + } + else + { + this.x = x || 0; + this.y = y || 0; + this.z = z || 0; + } + + return this; + }, + + /** + * Add a given Vector to this Vector. Addition is component-wise. + * + * @method Phaser.Math.Vector3#add + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + add: function (v) + { + this.x += v.x; + this.y += v.y; + this.z += v.z || 0; + + return this; + }, + + /** + * Subtract the given Vector from this Vector. Subtraction is component-wise. + * + * @method Phaser.Math.Vector3#subtract + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to subtract from this Vector. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + subtract: function (v) + { + this.x -= v.x; + this.y -= v.y; + this.z -= v.z || 0; + + return this; + }, + + /** + * Perform a component-wise multiplication between this Vector and the given Vector. + * + * Multiplies this Vector by the given Vector. + * + * @method Phaser.Math.Vector3#multiply + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to multiply this Vector by. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + multiply: function (v) + { + this.x *= v.x; + this.y *= v.y; + this.z *= v.z || 1; + + return this; + }, + + /** + * Scale this Vector by the given value. + * + * @method Phaser.Math.Vector3#scale + * @since 3.0.0 + * + * @param {number} scale - The value to scale this Vector by. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + scale: function (scale) + { + if (isFinite(scale)) + { + this.x *= scale; + this.y *= scale; + this.z *= scale; + } + else + { + this.x = 0; + this.y = 0; + this.z = 0; + } + + return this; + }, + + /** + * Perform a component-wise division between this Vector and the given Vector. + * + * Divides this Vector by the given Vector. + * + * @method Phaser.Math.Vector3#divide + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to divide this Vector by. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + divide: function (v) + { + this.x /= v.x; + this.y /= v.y; + this.z /= v.z || 1; + + return this; + }, + + /** + * Negate the `x`, `y` and `z` components of this Vector. + * + * @method Phaser.Math.Vector3#negate + * @since 3.0.0 + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + negate: function () + { + this.x = -this.x; + this.y = -this.y; + this.z = -this.z; + + return this; + }, + + /** + * Calculate the distance between this Vector and the given Vector. + * + * @method Phaser.Math.Vector3#distance + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to. + * + * @return {number} The distance from this Vector to the given Vector. + */ + distance: function (v) + { + var dx = v.x - this.x; + var dy = v.y - this.y; + var dz = v.z - this.z || 0; + + return Math.sqrt(dx * dx + dy * dy + dz * dz); + }, + + /** + * Calculate the distance between this Vector and the given Vector, squared. + * + * @method Phaser.Math.Vector3#distanceSq + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to. + * + * @return {number} The distance from this Vector to the given Vector, squared. + */ + distanceSq: function (v) + { + var dx = v.x - this.x; + var dy = v.y - this.y; + var dz = v.z - this.z || 0; + + return dx * dx + dy * dy + dz * dz; + }, + + /** + * Calculate the length (or magnitude) of this Vector. + * + * @method Phaser.Math.Vector3#length + * @since 3.0.0 + * + * @return {number} The length of this Vector. + */ + length: function () + { + var x = this.x; + var y = this.y; + var z = this.z; + + return Math.sqrt(x * x + y * y + z * z); + }, + + /** + * Calculate the length of this Vector squared. + * + * @method Phaser.Math.Vector3#lengthSq + * @since 3.0.0 + * + * @return {number} The length of this Vector, squared. + */ + lengthSq: function () + { + var x = this.x; + var y = this.y; + var z = this.z; + + return x * x + y * y + z * z; + }, + + /** + * Normalize this Vector. + * + * Makes the vector a unit length vector (magnitude of 1) in the same direction. + * + * @method Phaser.Math.Vector3#normalize + * @since 3.0.0 + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + normalize: function () + { + var x = this.x; + var y = this.y; + var z = this.z; + var len = x * x + y * y + z * z; + + if (len > 0) + { + len = 1 / Math.sqrt(len); + + this.x = x * len; + this.y = y * len; + this.z = z * len; + } + + return this; + }, + + /** + * Calculate the dot product of this Vector and the given Vector. + * + * @method Phaser.Math.Vector3#dot + * @since 3.0.0 + * + * @param {Phaser.Math.Vector3} v - The Vector3 to dot product with this Vector3. + * + * @return {number} The dot product of this Vector and `v`. + */ + dot: function (v) + { + return this.x * v.x + this.y * v.y + this.z * v.z; + }, + + /** + * Calculate the cross (vector) product of this Vector (which will be modified) and the given Vector. + * + * @method Phaser.Math.Vector3#cross + * @since 3.0.0 + * + * @param {Phaser.Math.Vector3} v - The Vector to cross product with. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + cross: function (v) + { + var ax = this.x; + var ay = this.y; + var az = this.z; + var bx = v.x; + var by = v.y; + var bz = v.z; + + this.x = ay * bz - az * by; + this.y = az * bx - ax * bz; + this.z = ax * by - ay * bx; + + return this; + }, + + /** + * Linearly interpolate between this Vector and the given Vector. + * + * Interpolates this Vector towards the given Vector. + * + * @method Phaser.Math.Vector3#lerp + * @since 3.0.0 + * + * @param {Phaser.Math.Vector3} v - The Vector3 to interpolate towards. + * @param {number} [t=0] - The interpolation percentage, between 0 and 1. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + lerp: function (v, t) + { + if (t === undefined) { t = 0; } + + var ax = this.x; + var ay = this.y; + var az = this.z; + + this.x = ax + t * (v.x - ax); + this.y = ay + t * (v.y - ay); + this.z = az + t * (v.z - az); + + return this; + }, + + /** + * Transform this Vector with the given Matrix. + * + * @method Phaser.Math.Vector3#transformMat3 + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector3 with. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + transformMat3: function (mat) + { + var x = this.x; + var y = this.y; + var z = this.z; + var m = mat.val; + + this.x = x * m[0] + y * m[3] + z * m[6]; + this.y = x * m[1] + y * m[4] + z * m[7]; + this.z = x * m[2] + y * m[5] + z * m[8]; + + return this; + }, + + /** + * Transform this Vector with the given Matrix. + * + * @method Phaser.Math.Vector3#transformMat4 + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + transformMat4: function (mat) + { + var x = this.x; + var y = this.y; + var z = this.z; + var m = mat.val; + + this.x = m[0] * x + m[4] * y + m[8] * z + m[12]; + this.y = m[1] * x + m[5] * y + m[9] * z + m[13]; + this.z = m[2] * x + m[6] * y + m[10] * z + m[14]; + + return this; + }, + + /** + * Transforms the coordinates of this Vector3 with the given Matrix4. + * + * @method Phaser.Math.Vector3#transformCoordinates + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + transformCoordinates: function (mat) + { + var x = this.x; + var y = this.y; + var z = this.z; + var m = mat.val; + + var tx = (x * m[0]) + (y * m[4]) + (z * m[8]) + m[12]; + var ty = (x * m[1]) + (y * m[5]) + (z * m[9]) + m[13]; + var tz = (x * m[2]) + (y * m[6]) + (z * m[10]) + m[14]; + var tw = (x * m[3]) + (y * m[7]) + (z * m[11]) + m[15]; + + this.x = tx / tw; + this.y = ty / tw; + this.z = tz / tw; + + return this; + }, + + /** + * Transform this Vector with the given Quaternion. + * + * @method Phaser.Math.Vector3#transformQuat + * @since 3.0.0 + * + * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + transformQuat: function (q) + { + // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations + var x = this.x; + var y = this.y; + var z = this.z; + var qx = q.x; + var qy = q.y; + var qz = q.z; + var qw = q.w; + + // calculate quat * vec + var ix = qw * x + qy * z - qz * y; + var iy = qw * y + qz * x - qx * z; + var iz = qw * z + qx * y - qy * x; + var iw = -qx * x - qy * y - qz * z; + + // calculate result * inverse quat + this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy; + this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz; + this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx; + + return this; + }, + + /** + * Multiplies this Vector3 by the specified matrix, applying a W divide. This is useful for projection, + * e.g. unprojecting a 2D point into 3D space. + * + * @method Phaser.Math.Vector3#project + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix4} mat - The Matrix4 to multiply this Vector3 with. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + project: function (mat) + { + var x = this.x; + var y = this.y; + var z = this.z; + var m = mat.val; + + var a00 = m[0]; + var a01 = m[1]; + var a02 = m[2]; + var a03 = m[3]; + var a10 = m[4]; + var a11 = m[5]; + var a12 = m[6]; + var a13 = m[7]; + var a20 = m[8]; + var a21 = m[9]; + var a22 = m[10]; + var a23 = m[11]; + var a30 = m[12]; + var a31 = m[13]; + var a32 = m[14]; + var a33 = m[15]; + + var lw = 1 / (x * a03 + y * a13 + z * a23 + a33); + + this.x = (x * a00 + y * a10 + z * a20 + a30) * lw; + this.y = (x * a01 + y * a11 + z * a21 + a31) * lw; + this.z = (x * a02 + y * a12 + z * a22 + a32) * lw; + + return this; + }, + + /** + * Unproject this point from 2D space to 3D space. + * The point should have its x and y properties set to + * 2D screen space, and the z either at 0 (near plane) + * or 1 (far plane). The provided matrix is assumed to already + * be combined, i.e. projection * view * model. + * + * After this operation, this vector's (x, y, z) components will + * represent the unprojected 3D coordinate. + * + * @method Phaser.Math.Vector3#unproject + * @since 3.0.0 + * + * @param {Phaser.Math.Vector4} viewport - Screen x, y, width and height in pixels. + * @param {Phaser.Math.Matrix4} invProjectionView - Combined projection and view matrix. + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + unproject: function (viewport, invProjectionView) + { + var viewX = viewport.x; + var viewY = viewport.y; + var viewWidth = viewport.z; + var viewHeight = viewport.w; + + var x = this.x - viewX; + var y = (viewHeight - this.y - 1) - viewY; + var z = this.z; + + this.x = (2 * x) / viewWidth - 1; + this.y = (2 * y) / viewHeight - 1; + this.z = 2 * z - 1; + + return this.project(invProjectionView); + }, + + /** + * Make this Vector the zero vector (0, 0, 0). + * + * @method Phaser.Math.Vector3#reset + * @since 3.0.0 + * + * @return {Phaser.Math.Vector3} This Vector3. + */ + reset: function () + { + this.x = 0; + this.y = 0; + this.z = 0; + + return this; + } + +}); + +/** + * A static zero Vector3 for use by reference. + * + * This constant is meant for comparison operations and should not be modified directly. + * + * @constant + * @name Phaser.Math.Vector3.ZERO + * @type {Phaser.Math.Vector3} + * @since 3.16.0 + */ +Vector3.ZERO = new Vector3(); + +/** + * A static right Vector3 for use by reference. + * + * This constant is meant for comparison operations and should not be modified directly. + * + * @constant + * @name Phaser.Math.Vector3.RIGHT + * @type {Phaser.Math.Vector3} + * @since 3.16.0 + */ +Vector3.RIGHT = new Vector3(1, 0, 0); + +/** + * A static left Vector3 for use by reference. + * + * This constant is meant for comparison operations and should not be modified directly. + * + * @constant + * @name Phaser.Math.Vector3.LEFT + * @type {Phaser.Math.Vector3} + * @since 3.16.0 + */ +Vector3.LEFT = new Vector3(-1, 0, 0); + +/** + * A static up Vector3 for use by reference. + * + * This constant is meant for comparison operations and should not be modified directly. + * + * @constant + * @name Phaser.Math.Vector3.UP + * @type {Phaser.Math.Vector3} + * @since 3.16.0 + */ +Vector3.UP = new Vector3(0, -1, 0); + +/** + * A static down Vector3 for use by reference. + * + * This constant is meant for comparison operations and should not be modified directly. + * + * @constant + * @name Phaser.Math.Vector3.DOWN + * @type {Phaser.Math.Vector3} + * @since 3.16.0 + */ +Vector3.DOWN = new Vector3(0, 1, 0); + +/** + * A static forward Vector3 for use by reference. + * + * This constant is meant for comparison operations and should not be modified directly. + * + * @constant + * @name Phaser.Math.Vector3.FORWARD + * @type {Phaser.Math.Vector3} + * @since 3.16.0 + */ +Vector3.FORWARD = new Vector3(0, 0, 1); + +/** + * A static back Vector3 for use by reference. + * + * This constant is meant for comparison operations and should not be modified directly. + * + * @constant + * @name Phaser.Math.Vector3.BACK + * @type {Phaser.Math.Vector3} + * @since 3.16.0 + */ +Vector3.BACK = new Vector3(0, 0, -1); + +/** + * A static one Vector3 for use by reference. + * + * This constant is meant for comparison operations and should not be modified directly. + * + * @constant + * @name Phaser.Math.Vector3.ONE + * @type {Phaser.Math.Vector3} + * @since 3.16.0 + */ +Vector3.ONE = new Vector3(1, 1, 1); + +module.exports = Vector3; + + +/***/ }), +/* 81 */ /***/ (function(module, exports) { /** @@ -15441,7 +16317,7 @@ module.exports = SpliceOne; /***/ }), -/* 81 */ +/* 82 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16058,7 +16934,7 @@ module.exports = Curve; /***/ }), -/* 82 */ +/* 83 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16073,22 +16949,22 @@ module.exports = Curve; module.exports = { - ADD: __webpack_require__(873), - COMPLETE: __webpack_require__(874), - FILE_COMPLETE: __webpack_require__(875), - FILE_KEY_COMPLETE: __webpack_require__(876), - FILE_LOAD_ERROR: __webpack_require__(877), - FILE_LOAD: __webpack_require__(878), - FILE_PROGRESS: __webpack_require__(879), - POST_PROCESS: __webpack_require__(880), - PROGRESS: __webpack_require__(881), - START: __webpack_require__(882) + ADD: __webpack_require__(878), + COMPLETE: __webpack_require__(879), + FILE_COMPLETE: __webpack_require__(880), + FILE_KEY_COMPLETE: __webpack_require__(881), + FILE_LOAD_ERROR: __webpack_require__(882), + FILE_LOAD: __webpack_require__(883), + FILE_PROGRESS: __webpack_require__(884), + POST_PROCESS: __webpack_require__(885), + PROGRESS: __webpack_require__(886), + START: __webpack_require__(887) }; /***/ }), -/* 83 */ +/* 84 */ /***/ (function(module, exports) { /** @@ -16141,7 +17017,7 @@ module.exports = Contains; /***/ }), -/* 84 */ +/* 85 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16217,7 +17093,7 @@ module.exports = LineToLine; /***/ }), -/* 85 */ +/* 86 */ /***/ (function(module, exports) { /** @@ -16245,7 +17121,7 @@ module.exports = Angle; /***/ }), -/* 86 */ +/* 87 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16263,7 +17139,7 @@ var Vertices = {}; module.exports = Vertices; var Vector = __webpack_require__(100); -var Common = __webpack_require__(42); +var Common = __webpack_require__(43); (function() { @@ -16706,7 +17582,7 @@ var Common = __webpack_require__(42); /***/ }), -/* 87 */ +/* 88 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16740,7 +17616,7 @@ module.exports = FromPercent; /***/ }), -/* 88 */ +/* 89 */ /***/ (function(module, exports) { /** @@ -16781,7 +17657,7 @@ module.exports = GetBoolean; /***/ }), -/* 89 */ +/* 90 */ /***/ (function(module, exports) { /** @@ -16953,7 +17829,7 @@ module.exports = TWEEN_CONST; /***/ }), -/* 90 */ +/* 91 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16968,23 +17844,23 @@ module.exports = TWEEN_CONST; module.exports = { - DESTROY: __webpack_require__(583), - VIDEO_COMPLETE: __webpack_require__(584), - VIDEO_CREATED: __webpack_require__(585), - VIDEO_ERROR: __webpack_require__(586), - VIDEO_LOOP: __webpack_require__(587), - VIDEO_PLAY: __webpack_require__(588), - VIDEO_SEEKED: __webpack_require__(589), - VIDEO_SEEKING: __webpack_require__(590), - VIDEO_STOP: __webpack_require__(591), - VIDEO_TIMEOUT: __webpack_require__(592), - VIDEO_UNLOCKED: __webpack_require__(593) + DESTROY: __webpack_require__(586), + VIDEO_COMPLETE: __webpack_require__(587), + VIDEO_CREATED: __webpack_require__(588), + VIDEO_ERROR: __webpack_require__(589), + VIDEO_LOOP: __webpack_require__(590), + VIDEO_PLAY: __webpack_require__(591), + VIDEO_SEEKED: __webpack_require__(592), + VIDEO_SEEKING: __webpack_require__(593), + VIDEO_STOP: __webpack_require__(594), + VIDEO_TIMEOUT: __webpack_require__(595), + VIDEO_UNLOCKED: __webpack_require__(596) }; /***/ }), -/* 91 */ +/* 92 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16995,12 +17871,12 @@ module.exports = { var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var DegToRad = __webpack_require__(39); +var DegToRad = __webpack_require__(40); var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(40); +var Events = __webpack_require__(41); var Rectangle = __webpack_require__(9); var TransformMatrix = __webpack_require__(30); -var ValueToColor = __webpack_require__(169); +var ValueToColor = __webpack_require__(170); var Vector2 = __webpack_require__(3); /** @@ -18905,7 +19781,7 @@ module.exports = BaseCamera; /***/ }), -/* 92 */ +/* 93 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -18920,18 +19796,18 @@ module.exports = BaseCamera; module.exports = { - ENTER_FULLSCREEN: __webpack_require__(704), - FULLSCREEN_FAILED: __webpack_require__(705), - FULLSCREEN_UNSUPPORTED: __webpack_require__(706), - LEAVE_FULLSCREEN: __webpack_require__(707), - ORIENTATION_CHANGE: __webpack_require__(708), - RESIZE: __webpack_require__(709) + ENTER_FULLSCREEN: __webpack_require__(707), + FULLSCREEN_FAILED: __webpack_require__(708), + FULLSCREEN_UNSUPPORTED: __webpack_require__(709), + LEAVE_FULLSCREEN: __webpack_require__(710), + ORIENTATION_CHANGE: __webpack_require__(711), + RESIZE: __webpack_require__(712) }; /***/ }), -/* 93 */ +/* 94 */ /***/ (function(module, exports) { /** @@ -18974,816 +19850,6 @@ var SnapFloor = function (value, gap, start, divide) module.exports = SnapFloor; -/***/ }), -/* 94 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji -// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl - -var Class = __webpack_require__(0); - -/** - * @classdesc - * A representation of a vector in 3D space. - * - * A three-component vector. - * - * @class Vector3 - * @memberof Phaser.Math - * @constructor - * @since 3.0.0 - * - * @param {number} [x] - The x component. - * @param {number} [y] - The y component. - * @param {number} [z] - The z component. - */ -var Vector3 = new Class({ - - initialize: - - function Vector3 (x, y, z) - { - /** - * The x component of this Vector. - * - * @name Phaser.Math.Vector3#x - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.x = 0; - - /** - * The y component of this Vector. - * - * @name Phaser.Math.Vector3#y - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.y = 0; - - /** - * The z component of this Vector. - * - * @name Phaser.Math.Vector3#z - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.z = 0; - - if (typeof x === 'object') - { - this.x = x.x || 0; - this.y = x.y || 0; - this.z = x.z || 0; - } - else - { - this.x = x || 0; - this.y = y || 0; - this.z = z || 0; - } - }, - - /** - * Set this Vector to point up. - * - * Sets the y component of the vector to 1, and the others to 0. - * - * @method Phaser.Math.Vector3#up - * @since 3.0.0 - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - up: function () - { - this.x = 0; - this.y = 1; - this.z = 0; - - return this; - }, - - /** - * Make a clone of this Vector3. - * - * @method Phaser.Math.Vector3#clone - * @since 3.0.0 - * - * @return {Phaser.Math.Vector3} A new Vector3 object containing this Vectors values. - */ - clone: function () - { - return new Vector3(this.x, this.y, this.z); - }, - - /** - * Calculate the cross (vector) product of two given Vectors. - * - * @method Phaser.Math.Vector3#crossVectors - * @since 3.0.0 - * - * @param {Phaser.Math.Vector3} a - The first Vector to multiply. - * @param {Phaser.Math.Vector3} b - The second Vector to multiply. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - crossVectors: function (a, b) - { - var ax = a.x; - var ay = a.y; - var az = a.z; - var bx = b.x; - var by = b.y; - var bz = b.z; - - this.x = ay * bz - az * by; - this.y = az * bx - ax * bz; - this.z = ax * by - ay * bx; - - return this; - }, - - /** - * Check whether this Vector is equal to a given Vector. - * - * Performs a strict equality check against each Vector's components. - * - * @method Phaser.Math.Vector3#equals - * @since 3.0.0 - * - * @param {Phaser.Math.Vector3} v - The Vector3 to compare against. - * - * @return {boolean} True if the two vectors strictly match, otherwise false. - */ - equals: function (v) - { - return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z)); - }, - - /** - * Copy the components of a given Vector into this Vector. - * - * @method Phaser.Math.Vector3#copy - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} src - The Vector to copy the components from. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - copy: function (src) - { - this.x = src.x; - this.y = src.y; - this.z = src.z || 0; - - return this; - }, - - /** - * Set the `x`, `y`, and `z` components of this Vector to the given `x`, `y`, and `z` values. - * - * @method Phaser.Math.Vector3#set - * @since 3.0.0 - * - * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y and z components. - * @param {number} [y] - The y value to set for this Vector. - * @param {number} [z] - The z value to set for this Vector. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - set: function (x, y, z) - { - if (typeof x === 'object') - { - this.x = x.x || 0; - this.y = x.y || 0; - this.z = x.z || 0; - } - else - { - this.x = x || 0; - this.y = y || 0; - this.z = z || 0; - } - - return this; - }, - - /** - * Add a given Vector to this Vector. Addition is component-wise. - * - * @method Phaser.Math.Vector3#add - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - add: function (v) - { - this.x += v.x; - this.y += v.y; - this.z += v.z || 0; - - return this; - }, - - /** - * Subtract the given Vector from this Vector. Subtraction is component-wise. - * - * @method Phaser.Math.Vector3#subtract - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to subtract from this Vector. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - subtract: function (v) - { - this.x -= v.x; - this.y -= v.y; - this.z -= v.z || 0; - - return this; - }, - - /** - * Perform a component-wise multiplication between this Vector and the given Vector. - * - * Multiplies this Vector by the given Vector. - * - * @method Phaser.Math.Vector3#multiply - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to multiply this Vector by. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - multiply: function (v) - { - this.x *= v.x; - this.y *= v.y; - this.z *= v.z || 1; - - return this; - }, - - /** - * Scale this Vector by the given value. - * - * @method Phaser.Math.Vector3#scale - * @since 3.0.0 - * - * @param {number} scale - The value to scale this Vector by. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - scale: function (scale) - { - if (isFinite(scale)) - { - this.x *= scale; - this.y *= scale; - this.z *= scale; - } - else - { - this.x = 0; - this.y = 0; - this.z = 0; - } - - return this; - }, - - /** - * Perform a component-wise division between this Vector and the given Vector. - * - * Divides this Vector by the given Vector. - * - * @method Phaser.Math.Vector3#divide - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to divide this Vector by. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - divide: function (v) - { - this.x /= v.x; - this.y /= v.y; - this.z /= v.z || 1; - - return this; - }, - - /** - * Negate the `x`, `y` and `z` components of this Vector. - * - * @method Phaser.Math.Vector3#negate - * @since 3.0.0 - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - negate: function () - { - this.x = -this.x; - this.y = -this.y; - this.z = -this.z; - - return this; - }, - - /** - * Calculate the distance between this Vector and the given Vector. - * - * @method Phaser.Math.Vector3#distance - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to. - * - * @return {number} The distance from this Vector to the given Vector. - */ - distance: function (v) - { - var dx = v.x - this.x; - var dy = v.y - this.y; - var dz = v.z - this.z || 0; - - return Math.sqrt(dx * dx + dy * dy + dz * dz); - }, - - /** - * Calculate the distance between this Vector and the given Vector, squared. - * - * @method Phaser.Math.Vector3#distanceSq - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to. - * - * @return {number} The distance from this Vector to the given Vector, squared. - */ - distanceSq: function (v) - { - var dx = v.x - this.x; - var dy = v.y - this.y; - var dz = v.z - this.z || 0; - - return dx * dx + dy * dy + dz * dz; - }, - - /** - * Calculate the length (or magnitude) of this Vector. - * - * @method Phaser.Math.Vector3#length - * @since 3.0.0 - * - * @return {number} The length of this Vector. - */ - length: function () - { - var x = this.x; - var y = this.y; - var z = this.z; - - return Math.sqrt(x * x + y * y + z * z); - }, - - /** - * Calculate the length of this Vector squared. - * - * @method Phaser.Math.Vector3#lengthSq - * @since 3.0.0 - * - * @return {number} The length of this Vector, squared. - */ - lengthSq: function () - { - var x = this.x; - var y = this.y; - var z = this.z; - - return x * x + y * y + z * z; - }, - - /** - * Normalize this Vector. - * - * Makes the vector a unit length vector (magnitude of 1) in the same direction. - * - * @method Phaser.Math.Vector3#normalize - * @since 3.0.0 - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - normalize: function () - { - var x = this.x; - var y = this.y; - var z = this.z; - var len = x * x + y * y + z * z; - - if (len > 0) - { - len = 1 / Math.sqrt(len); - - this.x = x * len; - this.y = y * len; - this.z = z * len; - } - - return this; - }, - - /** - * Calculate the dot product of this Vector and the given Vector. - * - * @method Phaser.Math.Vector3#dot - * @since 3.0.0 - * - * @param {Phaser.Math.Vector3} v - The Vector3 to dot product with this Vector3. - * - * @return {number} The dot product of this Vector and `v`. - */ - dot: function (v) - { - return this.x * v.x + this.y * v.y + this.z * v.z; - }, - - /** - * Calculate the cross (vector) product of this Vector (which will be modified) and the given Vector. - * - * @method Phaser.Math.Vector3#cross - * @since 3.0.0 - * - * @param {Phaser.Math.Vector3} v - The Vector to cross product with. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - cross: function (v) - { - var ax = this.x; - var ay = this.y; - var az = this.z; - var bx = v.x; - var by = v.y; - var bz = v.z; - - this.x = ay * bz - az * by; - this.y = az * bx - ax * bz; - this.z = ax * by - ay * bx; - - return this; - }, - - /** - * Linearly interpolate between this Vector and the given Vector. - * - * Interpolates this Vector towards the given Vector. - * - * @method Phaser.Math.Vector3#lerp - * @since 3.0.0 - * - * @param {Phaser.Math.Vector3} v - The Vector3 to interpolate towards. - * @param {number} [t=0] - The interpolation percentage, between 0 and 1. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - lerp: function (v, t) - { - if (t === undefined) { t = 0; } - - var ax = this.x; - var ay = this.y; - var az = this.z; - - this.x = ax + t * (v.x - ax); - this.y = ay + t * (v.y - ay); - this.z = az + t * (v.z - az); - - return this; - }, - - /** - * Transform this Vector with the given Matrix. - * - * @method Phaser.Math.Vector3#transformMat3 - * @since 3.0.0 - * - * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector3 with. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - transformMat3: function (mat) - { - var x = this.x; - var y = this.y; - var z = this.z; - var m = mat.val; - - this.x = x * m[0] + y * m[3] + z * m[6]; - this.y = x * m[1] + y * m[4] + z * m[7]; - this.z = x * m[2] + y * m[5] + z * m[8]; - - return this; - }, - - /** - * Transform this Vector with the given Matrix. - * - * @method Phaser.Math.Vector3#transformMat4 - * @since 3.0.0 - * - * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - transformMat4: function (mat) - { - var x = this.x; - var y = this.y; - var z = this.z; - var m = mat.val; - - this.x = m[0] * x + m[4] * y + m[8] * z + m[12]; - this.y = m[1] * x + m[5] * y + m[9] * z + m[13]; - this.z = m[2] * x + m[6] * y + m[10] * z + m[14]; - - return this; - }, - - /** - * Transforms the coordinates of this Vector3 with the given Matrix4. - * - * @method Phaser.Math.Vector3#transformCoordinates - * @since 3.0.0 - * - * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - transformCoordinates: function (mat) - { - var x = this.x; - var y = this.y; - var z = this.z; - var m = mat.val; - - var tx = (x * m[0]) + (y * m[4]) + (z * m[8]) + m[12]; - var ty = (x * m[1]) + (y * m[5]) + (z * m[9]) + m[13]; - var tz = (x * m[2]) + (y * m[6]) + (z * m[10]) + m[14]; - var tw = (x * m[3]) + (y * m[7]) + (z * m[11]) + m[15]; - - this.x = tx / tw; - this.y = ty / tw; - this.z = tz / tw; - - return this; - }, - - /** - * Transform this Vector with the given Quaternion. - * - * @method Phaser.Math.Vector3#transformQuat - * @since 3.0.0 - * - * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - transformQuat: function (q) - { - // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations - var x = this.x; - var y = this.y; - var z = this.z; - var qx = q.x; - var qy = q.y; - var qz = q.z; - var qw = q.w; - - // calculate quat * vec - var ix = qw * x + qy * z - qz * y; - var iy = qw * y + qz * x - qx * z; - var iz = qw * z + qx * y - qy * x; - var iw = -qx * x - qy * y - qz * z; - - // calculate result * inverse quat - this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy; - this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz; - this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx; - - return this; - }, - - /** - * Multiplies this Vector3 by the specified matrix, applying a W divide. This is useful for projection, - * e.g. unprojecting a 2D point into 3D space. - * - * @method Phaser.Math.Vector3#project - * @since 3.0.0 - * - * @param {Phaser.Math.Matrix4} mat - The Matrix4 to multiply this Vector3 with. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - project: function (mat) - { - var x = this.x; - var y = this.y; - var z = this.z; - var m = mat.val; - - var a00 = m[0]; - var a01 = m[1]; - var a02 = m[2]; - var a03 = m[3]; - var a10 = m[4]; - var a11 = m[5]; - var a12 = m[6]; - var a13 = m[7]; - var a20 = m[8]; - var a21 = m[9]; - var a22 = m[10]; - var a23 = m[11]; - var a30 = m[12]; - var a31 = m[13]; - var a32 = m[14]; - var a33 = m[15]; - - var lw = 1 / (x * a03 + y * a13 + z * a23 + a33); - - this.x = (x * a00 + y * a10 + z * a20 + a30) * lw; - this.y = (x * a01 + y * a11 + z * a21 + a31) * lw; - this.z = (x * a02 + y * a12 + z * a22 + a32) * lw; - - return this; - }, - - /** - * Unproject this point from 2D space to 3D space. - * The point should have its x and y properties set to - * 2D screen space, and the z either at 0 (near plane) - * or 1 (far plane). The provided matrix is assumed to already - * be combined, i.e. projection * view * model. - * - * After this operation, this vector's (x, y, z) components will - * represent the unprojected 3D coordinate. - * - * @method Phaser.Math.Vector3#unproject - * @since 3.0.0 - * - * @param {Phaser.Math.Vector4} viewport - Screen x, y, width and height in pixels. - * @param {Phaser.Math.Matrix4} invProjectionView - Combined projection and view matrix. - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - unproject: function (viewport, invProjectionView) - { - var viewX = viewport.x; - var viewY = viewport.y; - var viewWidth = viewport.z; - var viewHeight = viewport.w; - - var x = this.x - viewX; - var y = (viewHeight - this.y - 1) - viewY; - var z = this.z; - - this.x = (2 * x) / viewWidth - 1; - this.y = (2 * y) / viewHeight - 1; - this.z = 2 * z - 1; - - return this.project(invProjectionView); - }, - - /** - * Make this Vector the zero vector (0, 0, 0). - * - * @method Phaser.Math.Vector3#reset - * @since 3.0.0 - * - * @return {Phaser.Math.Vector3} This Vector3. - */ - reset: function () - { - this.x = 0; - this.y = 0; - this.z = 0; - - return this; - } - -}); - -/** - * A static zero Vector3 for use by reference. - * - * This constant is meant for comparison operations and should not be modified directly. - * - * @constant - * @name Phaser.Math.Vector3.ZERO - * @type {Phaser.Math.Vector3} - * @since 3.16.0 - */ -Vector3.ZERO = new Vector3(); - -/** - * A static right Vector3 for use by reference. - * - * This constant is meant for comparison operations and should not be modified directly. - * - * @constant - * @name Phaser.Math.Vector3.RIGHT - * @type {Phaser.Math.Vector3} - * @since 3.16.0 - */ -Vector3.RIGHT = new Vector3(1, 0, 0); - -/** - * A static left Vector3 for use by reference. - * - * This constant is meant for comparison operations and should not be modified directly. - * - * @constant - * @name Phaser.Math.Vector3.LEFT - * @type {Phaser.Math.Vector3} - * @since 3.16.0 - */ -Vector3.LEFT = new Vector3(-1, 0, 0); - -/** - * A static up Vector3 for use by reference. - * - * This constant is meant for comparison operations and should not be modified directly. - * - * @constant - * @name Phaser.Math.Vector3.UP - * @type {Phaser.Math.Vector3} - * @since 3.16.0 - */ -Vector3.UP = new Vector3(0, -1, 0); - -/** - * A static down Vector3 for use by reference. - * - * This constant is meant for comparison operations and should not be modified directly. - * - * @constant - * @name Phaser.Math.Vector3.DOWN - * @type {Phaser.Math.Vector3} - * @since 3.16.0 - */ -Vector3.DOWN = new Vector3(0, 1, 0); - -/** - * A static forward Vector3 for use by reference. - * - * This constant is meant for comparison operations and should not be modified directly. - * - * @constant - * @name Phaser.Math.Vector3.FORWARD - * @type {Phaser.Math.Vector3} - * @since 3.16.0 - */ -Vector3.FORWARD = new Vector3(0, 0, 1); - -/** - * A static back Vector3 for use by reference. - * - * This constant is meant for comparison operations and should not be modified directly. - * - * @constant - * @name Phaser.Math.Vector3.BACK - * @type {Phaser.Math.Vector3} - * @since 3.16.0 - */ -Vector3.BACK = new Vector3(0, 0, -1); - -/** - * A static one Vector3 for use by reference. - * - * This constant is meant for comparison operations and should not be modified directly. - * - * @constant - * @name Phaser.Math.Vector3.ONE - * @type {Phaser.Math.Vector3} - * @since 3.16.0 - */ -Vector3.ONE = new Vector3(1, 1, 1); - -module.exports = Vector3; - - /***/ }), /* 95 */ /***/ (function(module, exports, __webpack_require__) { @@ -20655,8 +20721,8 @@ var Class = __webpack_require__(0); var Contains = __webpack_require__(97); var GetPoint = __webpack_require__(398); var GetPoints = __webpack_require__(399); -var GEOM_CONST = __webpack_require__(47); -var Random = __webpack_require__(162); +var GEOM_CONST = __webpack_require__(48); +var Random = __webpack_require__(163); /** * @classdesc @@ -21077,12 +21143,12 @@ module.exports = Contains; var Actions = __webpack_require__(245); var Class = __webpack_require__(0); -var Events = __webpack_require__(90); +var Events = __webpack_require__(91); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); var IsPlainObject = __webpack_require__(7); var Range = __webpack_require__(392); -var Set = __webpack_require__(135); +var Set = __webpack_require__(139); var Sprite = __webpack_require__(75); /** @@ -24229,6 +24295,2458 @@ module.exports = Equal; /* 108 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var GetFastValue = __webpack_require__(2); +var Utils = __webpack_require__(10); + +/** + * @classdesc + * + * The `WebGLPipeline` is a base class used by all of the core Phaser pipelines. + * + * It describes the way elements will be rendered in WebGL. Internally, it handles + * compiling the shaders, creating vertex buffers, assigning primitive topolgy and + * binding vertex attributes, all based on the given configuration data. + * + * The pipeline is configured by passing in a `WebGLPipelineConfig` object. Please + * see the documentation for this type to fully understand the configuration options + * available to you. + * + * Usually, you would not extend from this class directly, but would instead extend + * from one of the core pipelines, such as the Multi Pipeline or Rope Pipeline. + * + * @class WebGLPipeline + * @memberof Phaser.Renderer.WebGL + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Types.Renderer.WebGL.WebGLPipelineConfig} config - The configuration object for this WebGL Pipeline. + */ +var WebGLPipeline = new Class({ + + initialize: + + function WebGLPipeline (config) + { + var game = config.game; + var renderer = game.renderer; + var gl = renderer.gl; + + /** + * Name of the pipeline. Used for identification. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#name + * @type {string} + * @since 3.0.0 + */ + this.name = GetFastValue(config, 'name', 'WebGLPipeline'); + + /** + * The Phaser Game instance to which this pipeline is bound. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#game + * @type {Phaser.Game} + * @since 3.0.0 + */ + this.game = game; + + /** + * The WebGL Renderer instance to which this pipeline is bound. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#renderer + * @type {Phaser.Renderer.WebGL.WebGLRenderer} + * @since 3.0.0 + */ + this.renderer = renderer; + + /** + * The WebGL context this WebGL Pipeline uses. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#gl + * @type {WebGLRenderingContext} + * @since 3.0.0 + */ + this.gl = gl; + + /** + * The canvas which this WebGL Pipeline renders to. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#view + * @type {HTMLCanvasElement} + * @since 3.0.0 + */ + this.view = game.canvas; + + /** + * The current game resolution. + * This is hard-coded to 1. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#resolution + * @type {number} + * @since 3.0.0 + */ + this.resolution = 1; + + /** + * Width of the current viewport. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#width + * @type {number} + * @since 3.0.0 + */ + this.width = 0; + + /** + * Height of the current viewport. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#height + * @type {number} + * @since 3.0.0 + */ + this.height = 0; + + /** + * The current number of vertices that have been added to the pipeline batch. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCount + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.vertexCount = 0; + + /** + * The total number of vertices that the pipeline batch can hold before it will flush. + * This defaults to `batchSize * 6`, where `batchSize` is defined in the Renderer Config. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCapacity + * @type {integer} + * @since 3.0.0 + */ + this.vertexCapacity = GetFastValue(config, 'vertexCapacity', renderer.config.batchSize * 6); + + /** + * The size in bytes of a vertex. + * + * Derived by adding together all of the vertex attributes. + * + * For example, the Texture Tint Pipeline has 2 + 2 + 1 + 1 + 4 for the attributes + * `inPosition` (size 2), `inTexCoord` (size 2), `inTexId` (size 1), `inTintEffect` (size 1) + * and `inTint` (size 4), for a total of 28, which is the default for this property. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexSize + * @type {integer} + * @since 3.0.0 + */ + this.vertexSize = GetFastValue(config, 'vertexSize', 28); + + /** + * Raw byte buffer of vertices. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexData + * @type {ArrayBuffer} + * @since 3.0.0 + */ + this.vertexData = GetFastValue(config, 'vertices', new ArrayBuffer(this.vertexCapacity * this.vertexSize)); + + /** + * The WebGLBuffer that holds the vertex data. + * Created from the `vertices` config ArrayBuffer that was passed in, or set by default, by the pipeline. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexBuffer + * @type {WebGLBuffer} + * @since 3.0.0 + */ + this.vertexBuffer = this.renderer.createVertexBuffer(this.vertexData.byteLength, this.gl.STREAM_DRAW); + + /** + * The handle to a WebGL program. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#program + * @type {WebGLProgram} + * @since 3.0.0 + */ + this.program = this.renderer.createProgram(config.vertShader, config.fragShader); + + /** + * Array of objects that describe the vertex attributes. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#attributes + * @type {Phaser.Types.Renderer.WebGL.WebGLPipelineAttributesConfig} + * @since 3.0.0 + */ + this.attributes = config.attributes; + + /** + * The primitive topology which the pipeline will use to submit draw calls. + * Defaults to GL_TRIANGLES if not otherwise set. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#topology + * @type {GLenum} + * @since 3.0.0 + */ + this.topology = GetFastValue(config, 'topology', gl.TRIANGLES); + + /** + * Uint8 view to the vertex raw buffer. Used for uploading vertex buffer resources to the GPU. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#bytes + * @type {Uint8Array} + * @since 3.0.0 + */ + this.bytes = new Uint8Array(this.vertexData); + + /** + * This will store the amount of components of 32 bit length. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexComponentCount + * @type {integer} + * @since 3.0.0 + */ + this.vertexComponentCount = Utils.getComponentCount(this.attributes, gl); + + /** + * Indicates if the current pipeline is flushing the contents to the GPU. + * When the variable is set the flush function will be locked. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#flushLocked + * @type {boolean} + * @since 3.1.0 + */ + this.flushLocked = false; + + /** + * Indicates if the current pipeline is active or not for this frame only. + * Reset in the onRender method. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#active + * @type {boolean} + * @since 3.10.0 + */ + this.active = false; + + /** + * Holds the most recently assigned texture unit. + * Treat this value as read-only. + * + * @name Phaser.Renderer.WebGL.Pipelines.WebGLPipeline#currentUnit + * @type {number} + * @since 3.50.0 + */ + this.currentUnit = 0; + + /** + * Some pipelines require the forced use of texture zero (like the light pipeline). + * This boolean should be set when that is the case. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#forceZero + * @type {boolean} + * @since 3.50.0 + */ + this.forceZero = false; + + /** + * Indicates if the current pipeline has booted or not. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#hasBooted + * @type {boolean} + * @readonly + * @since 3.50.0 + */ + this.hasBooted = false; + }, + + /** + * Called when the Game has fully booted and the Renderer has finished setting up. + * + * By this stage all Game level systems are now in place and you can perform any final + * tasks that the pipeline may need that relied on game systems such as the Texture Manager. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#boot + * @since 3.11.0 + */ + boot: function () + { + var gl = this.gl; + var vertexBuffer = this.vertexBuffer; + var attributes = this.attributes; + var program = this.program; + var renderer = this.renderer; + var vertexSize = this.vertexSize; + + renderer.setProgram(program); + renderer.setVertexBuffer(vertexBuffer); + + for (var i = 0; i < attributes.length; i++) + { + var element = attributes[i]; + var location = gl.getAttribLocation(program, element.name); + + if (location >= 0) + { + gl.enableVertexAttribArray(location); + gl.vertexAttribPointer(location, element.size, element.type, element.normalized, vertexSize, element.offset); + element.enabled = true; + element.location = location; + } + else if (location !== -1) + { + gl.disableVertexAttribArray(location); + } + } + + this.hasBooted = true; + + return this; + }, + + /** + * Custom pipelines can use this method in order to perform any required pre-batch tasks + * for the given Game Object. It must return the texture unit the Game Object was assigned. + * + * @method Phaser.Renderer.WebGL.Pipelines.WebGLPipeline#setGameObject + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object being rendered or added to the batch. + * @param {Phaser.Textures.Frame} [frame] - Optional frame to use. Can override that of the Game Object. + * + * @return {number} The texture unit the Game Object has been assigned. + */ + setGameObject: function (gameObject, frame) + { + if (frame === undefined) { frame = gameObject.frame; } + + this.currentUnit = this.renderer.setTextureSource(frame.source); + + return this.currentUnit; + }, + + /** + * Adds a description of vertex attribute to the pipeline + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#addAttribute + * @since 3.2.0 + * + * @param {string} name - Name of the vertex attribute + * @param {integer} size - Vertex component size + * @param {integer} type - Type of the attribute + * @param {boolean} normalized - Is the value normalized to a range + * @param {integer} offset - Byte offset to the beginning of the first element in the vertex + * + * @return {this} This WebGLPipeline instance. + */ + addAttribute: function (name, size, type, normalized, offset) + { + this.attributes.push({ + name: name, + size: size, + type: this.renderer.glFormats[type], + normalized: normalized, + offset: offset, + enabled: false, + location: -1 + }); + + this.vertexComponentCount = Utils.getComponentCount( + this.attributes, + this.gl + ); + return this; + }, + + /** + * Check if the current batch of vertices is full. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#shouldFlush + * @since 3.0.0 + * + * @return {boolean} `true` if the current batch should be flushed, otherwise `false`. + */ + shouldFlush: function () + { + return (this.vertexCount >= this.vertexCapacity); + }, + + /** + * Resizes the properties used to describe the viewport + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#resize + * @since 3.0.0 + * + * @param {number} width - The new width of this WebGL Pipeline. + * @param {number} height - The new height of this WebGL Pipeline. + * @param {number} resolution - The resolution this WebGL Pipeline should be resized to. + * + * @return {this} This WebGLPipeline instance. + */ + resize: function (width, height, resolution) + { + this.width = width * resolution; + this.height = height * resolution; + this.resolution = resolution; + + return this; + }, + + /** + * Binds the pipeline resources, including the program, vertex buffer and attribute pointers. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#bind + * @since 3.0.0 + * + * @return {this} This WebGLPipeline instance. + */ + bind: function () + { + var vertexBuffer = this.vertexBuffer; + var program = this.program; + var renderer = this.renderer; + + renderer.setProgram(program); + renderer.setVertexBuffer(vertexBuffer); + + this.setAttribPointers(); + + return this; + }, + + /** + * Sets the vertex attribute pointers. + * This should only be called after the vertex buffer has been bound. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setAttribPointers + * @since 3.50.0 + * + * @return {this} This WebGLPipeline instance. + */ + setAttribPointers: function () + { + var gl = this.gl; + var attributes = this.attributes; + var vertexSize = this.vertexSize; + + for (var i = 0; i < attributes.length; i++) + { + var element = attributes[i]; + + if (element.enabled) + { + gl.vertexAttribPointer(element.location, element.size, element.type, element.normalized, vertexSize, element.offset); + } + else if (!element.enabled && element.location > -1) + { + gl.disableVertexAttribArray(element.location); + element.location = -1; + } + } + }, + + /** + * Set whenever this WebGL Pipeline is bound to a WebGL Renderer. + * + * This method is called every time the WebGL Pipeline is attempted to be bound, even if it already is the current pipeline. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#onBind + * @since 3.0.0 + * + * @return {this} This WebGLPipeline instance. + */ + onBind: function () + { + // This is for updating uniform data it's called on each bind attempt. + return this; + }, + + /** + * Called before each frame is rendered, but after the canvas has been cleared. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#onPreRender + * @since 3.0.0 + * + * @return {this} This WebGLPipeline instance. + */ + onPreRender: function () + { + // called once every frame + return this; + }, + + /** + * Called before a Scene's Camera is rendered. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#onRender + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - The Scene being rendered. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera being rendered with. + * + * @return {this} This WebGLPipeline instance. + */ + onRender: function () + { + // called for each camera + return this; + }, + + /** + * Called after each frame has been completely rendered and snapshots have been taken. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#onPostRender + * @since 3.0.0 + * + * @return {this} This WebGLPipeline instance. + */ + onPostRender: function () + { + // called once every frame + return this; + }, + + /** + * Uploads the vertex data and emits a draw call + * for the current batch of vertices. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#flush + * @since 3.0.0 + * + * @return {this} This WebGLPipeline instance. + */ + flush: function () + { + if (this.flushLocked) { return this; } + + this.flushLocked = true; + + var gl = this.gl; + var vertexCount = this.vertexCount; + var topology = this.topology; + var vertexSize = this.vertexSize; + + if (vertexCount === 0) + { + this.flushLocked = false; + return; + } + + gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize)); + gl.drawArrays(topology, 0, vertexCount); + + this.vertexCount = 0; + this.flushLocked = false; + + return this; + }, + + /** + * Removes all object references in this WebGL Pipeline and removes its program from the WebGL context. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#destroy + * @since 3.0.0 + * + * @return {this} This WebGLPipeline instance. + */ + destroy: function () + { + var gl = this.gl; + + gl.deleteProgram(this.program); + gl.deleteBuffer(this.vertexBuffer); + + delete this.program; + delete this.vertexBuffer; + delete this.gl; + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat1 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {number} x - The new value of the `float` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat1: function (name, x) + { + this.renderer.setFloat1(this.program, name, x); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat2 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {number} x - The new X component of the `vec2` uniform. + * @param {number} y - The new Y component of the `vec2` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat2: function (name, x, y) + { + this.renderer.setFloat2(this.program, name, x, y); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat3 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {number} x - The new X component of the `vec3` uniform. + * @param {number} y - The new Y component of the `vec3` uniform. + * @param {number} z - The new Z component of the `vec3` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat3: function (name, x, y, z) + { + this.renderer.setFloat3(this.program, name, x, y, z); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat4 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {number} x - X component of the uniform + * @param {number} y - Y component of the uniform + * @param {number} z - Z component of the uniform + * @param {number} w - W component of the uniform + * + * @return {this} This WebGLPipeline instance. + */ + setFloat4: function (name, x, y, z, w) + { + this.renderer.setFloat4(this.program, name, x, y, z, w); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat1v + * @since 3.13.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {Float32Array} arr - The new value to be used for the uniform variable. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat1v: function (name, arr) + { + this.renderer.setFloat1v(this.program, name, arr); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat2v + * @since 3.13.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {Float32Array} arr - The new value to be used for the uniform variable. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat2v: function (name, arr) + { + this.renderer.setFloat2v(this.program, name, arr); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat3v + * @since 3.13.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {Float32Array} arr - The new value to be used for the uniform variable. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat3v: function (name, arr) + { + this.renderer.setFloat3v(this.program, name, arr); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat4v + * @since 3.13.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {Float32Array} arr - The new value to be used for the uniform variable. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat4v: function (name, arr) + { + this.renderer.setFloat4v(this.program, name, arr); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt1 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {integer} x - The new value of the `int` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setInt1: function (name, x) + { + this.renderer.setInt1(this.program, name, x); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt2 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {integer} x - The new X component of the `ivec2` uniform. + * @param {integer} y - The new Y component of the `ivec2` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setInt2: function (name, x, y) + { + this.renderer.setInt2(this.program, name, x, y); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt3 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {integer} x - The new X component of the `ivec3` uniform. + * @param {integer} y - The new Y component of the `ivec3` uniform. + * @param {integer} z - The new Z component of the `ivec3` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setInt3: function (name, x, y, z) + { + this.renderer.setInt3(this.program, name, x, y, z); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt4 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {integer} x - X component of the uniform + * @param {integer} y - Y component of the uniform + * @param {integer} z - Z component of the uniform + * @param {integer} w - W component of the uniform + * + * @return {this} This WebGLPipeline instance. + */ + setInt4: function (name, x, y, z, w) + { + this.renderer.setInt4(this.program, name, x, y, z, w); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix2 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {boolean} transpose - Whether to transpose the matrix. Should be `false`. + * @param {Float32Array} matrix - The new values for the `mat2` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setMatrix2: function (name, transpose, matrix) + { + this.renderer.setMatrix2(this.program, name, transpose, matrix); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix3 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {boolean} transpose - Whether to transpose the matrix. Should be `false`. + * @param {Float32Array} matrix - The new values for the `mat3` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setMatrix3: function (name, transpose, matrix) + { + this.renderer.setMatrix3(this.program, name, transpose, matrix); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix4 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {boolean} transpose - Should the matrix be transpose + * @param {Float32Array} matrix - Matrix data + * + * @return {this} This WebGLPipeline instance. + */ + setMatrix4: function (name, transpose, matrix) + { + this.renderer.setMatrix4(this.program, name, transpose, matrix); + + return this; + } + +}); + +module.exports = WebGLPipeline; + + +/***/ }), +/* 109 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var Earcut = __webpack_require__(66); +var GetFastValue = __webpack_require__(2); +var ModelViewProjection = __webpack_require__(110); +var ProjectOrtho = __webpack_require__(181); +var ShaderSourceFS = __webpack_require__(793); +var ShaderSourceVS = __webpack_require__(794); +var TransformMatrix = __webpack_require__(30); +var Utils = __webpack_require__(10); +var WebGLPipeline = __webpack_require__(108); + +/** + * @classdesc + * + * The Multi Pipeline is the core 2D texture rendering pipeline used by Phaser in WebGL. + * Virtually all Game Objects use this pipeline by default, including Sprites, Graphics + * and Tilemaps. It handles the batching of quads and tris, as well as methods for + * drawing and batching geometry data. + * + * Prior to Phaser v3.50 this pipeline was called the `TextureTintPipeline`. + * + * In previous versions of Phaser only one single texture unit was supported at any one time. + * The Multi Pipeline is an evolution of the old Texture Tint Pipeline, updated to support + * multi-textures for increased performance. + * + * The fragment shader it uses can be found in `shaders/src/Multi.frag`. + * The vertex shader it uses can be found in `shaders/src/Multi.vert`. + * + * The default shader attributes for this pipeline are: + * + * `inPosition` (vec2, offset 0) + * `inTexCoord` (vec2, offset 8) + * `inTexId` (float, offset 16) + * `inTintEffect` (float, offset 20) + * `inTint` (vec4, offset 24, normalized) + * + * The default shader uniforms for this pipeline are: + * + * `uProjectionMatrix` (mat4) + * `uViewMatrix` (mat4) + * `uModelMatrix` (mat4) + * `uMainSampler` (sampler2D array) + * + * If you wish to create a custom pipeline extending from this one, you can use two string + * declarations in your fragment shader source: `%count%` and `%forloop%`, where `count` is + * used to set the number of `sampler2Ds` available, and `forloop` is a block of GLSL code + * that will get the currently bound texture unit. + * + * This pipeline will automatically inject that code for you, should those values exist + * in your shader source. If you wish to handle this yourself, you can also use the + * function `Utils.parseFragmentShaderMaxTextures`. + * + * If you wish to create a pipeline that works from a single texture, or that doesn't have + * internal texture iteration, please see the `SinglePipeline` instead. + * + * @class MultiPipeline + * @extends Phaser.Renderer.WebGL.WebGLPipeline + * @memberof Phaser.Renderer.WebGL.Pipelines + * @constructor + * @since 3.50.0 + * + * @param {Phaser.Types.Renderer.WebGL.WebGLPipelineConfig} config - The configuration options for this pipeline. + */ +var MultiPipeline = new Class({ + + Extends: WebGLPipeline, + + Mixins: [ + ModelViewProjection + ], + + initialize: + + function MultiPipeline (config) + { + var renderer = config.game.renderer; + var gl = renderer.gl; + + var fragmentShaderSource = GetFastValue(config, 'fragShader', ShaderSourceFS); + + // Vertex Size = attribute size added together (2 + 2 + 1 + 1 + 4) inc maxTextures + + config.fragShader = Utils.parseFragmentShaderMaxTextures(fragmentShaderSource, renderer.maxTextures); + config.vertShader = GetFastValue(config, 'vertShader', ShaderSourceVS); + config.attributes = GetFastValue(config, 'attributes', [ + { + name: 'inPosition', + size: 2, + type: gl.FLOAT, + normalized: false, + offset: 0, + enabled: false, + location: -1 + }, + { + name: 'inTexCoord', + size: 2, + type: gl.FLOAT, + normalized: false, + offset: 8, + enabled: false, + location: -1 + }, + { + name: 'inTexId', + size: 1, + type: gl.FLOAT, + normalized: false, + offset: 16, + enabled: false, + location: -1 + }, + { + name: 'inTintEffect', + size: 1, + type: gl.FLOAT, + normalized: false, + offset: 20, + enabled: false, + location: -1 + }, + { + name: 'inTint', + size: 4, + type: gl.UNSIGNED_BYTE, + normalized: true, + offset: 24, + enabled: false, + location: -1 + } + ]); + + WebGLPipeline.call(this, config); + + /** + * Float32 view of the array buffer containing the pipeline's vertices. + * + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#vertexViewF32 + * @type {Float32Array} + * @since 3.0.0 + */ + this.vertexViewF32 = new Float32Array(this.vertexData); + + /** + * Uint32 view of the array buffer containing the pipeline's vertices. + * + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#vertexViewU32 + * @type {Uint32Array} + * @since 3.0.0 + */ + this.vertexViewU32 = new Uint32Array(this.vertexData); + + /** + * A temporary Transform Matrix, re-used internally during batching. + * + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#_tempMatrix1 + * @private + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @since 3.11.0 + */ + this._tempMatrix1 = new TransformMatrix(); + + /** + * A temporary Transform Matrix, re-used internally during batching. + * + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#_tempMatrix2 + * @private + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @since 3.11.0 + */ + this._tempMatrix2 = new TransformMatrix(); + + /** + * A temporary Transform Matrix, re-used internally during batching. + * + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#_tempMatrix3 + * @private + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @since 3.11.0 + */ + this._tempMatrix3 = new TransformMatrix(); + + /** + * A temporary Transform Matrix, re-used internally during batching. + * + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#_tempMatrix4 + * @private + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @since 3.11.0 + */ + this._tempMatrix4 = new TransformMatrix(); + + /** + * Used internally to draw stroked triangles. + * + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#tempTriangle + * @type {array} + * @private + * @since 3.12.0 + */ + 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 } + ]; + + /** + * The tint effect to be applied by the shader in the next geometry draw: + * + * 0 = texture multiplied by color + * 1 = solid color + texture alpha + * 2 = solid color, no texture + * 3 = solid texture, no color + * + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#tintEffect + * @type {number} + * @private + * @since 3.12.0 + */ + this.tintEffect = 2; + + /** + * Cached stroke tint. + * + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#strokeTint + * @type {object} + * @private + * @since 3.12.0 + */ + this.strokeTint = { TL: 0, TR: 0, BL: 0, BR: 0 }; + + /** + * Cached fill tint. + * + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#fillTint + * @type {object} + * @private + * @since 3.12.0 + */ + this.fillTint = { TL: 0, TR: 0, BL: 0, BR: 0 }; + + /** + * Internal texture frame reference. + * + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#currentFrame + * @type {Phaser.Textures.Frame} + * @private + * @since 3.12.0 + */ + this.currentFrame = { u0: 0, v0: 0, u1: 1, v1: 1 }; + + /** + * Internal path quad cache. + * + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#firstQuad + * @type {array} + * @private + * @since 3.12.0 + */ + this.firstQuad = [ 0, 0, 0, 0, 0 ]; + + /** + * Internal path quad cache. + * + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#prevQuad + * @type {array} + * @private + * @since 3.12.0 + */ + this.prevQuad = [ 0, 0, 0, 0, 0 ]; + + /** + * Used internally for triangulating a polygon. + * + * @name Phaser.Renderer.WebGL.Pipelines.MultiPipeline#polygonCache + * @type {array} + * @private + * @since 3.12.0 + */ + this.polygonCache = []; + + this.mvpInit(); + }, + + /** + * Called every time the pipeline is bound by the renderer. + * Sets the shader program, vertex buffer and other resources. + * Should only be called when changing pipeline. + * + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#bind + * @since 3.50.0 + * + * @return {this} This WebGLPipeline instance. + */ + bind: function () + { + WebGLPipeline.prototype.bind.call(this); + + this.renderer.setInt1iv(this.program, 'uMainSampler', this.renderer.textureIndexes); + + return this; + }, + + /** + * Called every time a Game Object needs to use this pipeline. + * + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#onBind + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} [gameObject] - The Game Object that invoked this pipeline, if any. + * + * @return {this} This WebGLPipeline instance. + */ + onBind: function () + { + this.mvpUpdate(); + + return this; + }, + + /** + * Resizes this pipeline and updates the projection. + * + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#resize + * @since 3.0.0 + * + * @param {number} width - The new width. + * @param {number} height - The new height. + * @param {number} resolution - The resolution. + * + * @return {this} This WebGLPipeline instance. + */ + resize: function (width, height, resolution) + { + WebGLPipeline.prototype.resize.call(this, width, height, resolution); + + ProjectOrtho(this, 0, this.width, this.height, 0, -1000, 1000); + + return this; + }, + + /** + * Assigns a texture to the current batch. If a different texture is already set it creates a new batch object. + * + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#setTexture2D + * @since 3.1.0 + * + * @param {WebGLTexture} [texture] - WebGLTexture that will be assigned to the current batch. If not given uses blankTexture. + * + * @return {number} The assigned texture unit. + */ + setTexture2D: function (texture) + { + if (texture === undefined) { texture = this.renderer.blankTexture.glTexture; } + + this.currentUnit = this.renderer.setTexture2D(texture); + + return this.currentUnit; + }, + + /** + * Uploads the vertex data and emits a draw call for the current batch of vertices. + * + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#flush + * @since 3.0.0 + * + * @return {this} This WebGLPipeline instance. + */ + flush: function () + { + var gl = this.gl; + var vertexCount = this.vertexCount; + var vertexSize = this.vertexSize; + + if (vertexCount > 0) + { + if (vertexCount === this.vertexCapacity) + { + gl.bufferData(gl.ARRAY_BUFFER, this.vertexData, gl.DYNAMIC_DRAW); + } + else + { + gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize)); + } + + gl.drawArrays(this.topology, 0, vertexCount); + + this.vertexCount = 0; + } + + return this; + }, + + /** + * Takes a Sprite Game Object, or any object that extends it, and adds it to the batch. + * + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchSprite + * @since 3.0.0 + * + * @param {(Phaser.GameObjects.Image|Phaser.GameObjects.Sprite)} sprite - The texture based Game Object to add to the batch. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to use for the rendering transform. + * @param {Phaser.GameObjects.Components.TransformMatrix} [parentTransformMatrix] - The transform matrix of the parent container, if set. + */ + batchSprite: function (sprite, camera, parentTransformMatrix) + { + // Will cause a flush if this isn't the current pipeline, vertexbuffer or program + this.renderer.setPipeline(this); + + var camMatrix = this._tempMatrix1; + var spriteMatrix = this._tempMatrix2; + var calcMatrix = this._tempMatrix3; + + var frame = sprite.frame; + var texture = frame.glTexture; + + var u0 = frame.u0; + var v0 = frame.v0; + var u1 = frame.u1; + var v1 = frame.v1; + var frameX = frame.x; + var frameY = frame.y; + var frameWidth = frame.cutWidth; + var frameHeight = frame.cutHeight; + var customPivot = frame.customPivot; + + var displayOriginX = sprite.displayOriginX; + var displayOriginY = sprite.displayOriginY; + + var x = -displayOriginX + frameX; + var y = -displayOriginY + frameY; + + if (sprite.isCropped) + { + var crop = sprite._crop; + + if (crop.flipX !== sprite.flipX || crop.flipY !== sprite.flipY) + { + frame.updateCropUVs(crop, sprite.flipX, sprite.flipY); + } + + u0 = crop.u0; + v0 = crop.v0; + u1 = crop.u1; + v1 = crop.v1; + + frameWidth = crop.width; + frameHeight = crop.height; + + frameX = crop.x; + frameY = crop.y; + + x = -displayOriginX + frameX; + y = -displayOriginY + frameY; + } + + var flipX = 1; + var flipY = 1; + + if (sprite.flipX) + { + if (!customPivot) + { + x += (-frame.realWidth + (displayOriginX * 2)); + } + + flipX = -1; + } + + // Auto-invert the flipY if this is coming from a GLTexture + if (sprite.flipY || (frame.source.isGLTexture && !texture.flipY)) + { + if (!customPivot) + { + y += (-frame.realHeight + (displayOriginY * 2)); + } + + flipY = -1; + } + + spriteMatrix.applyITRS(sprite.x, sprite.y, sprite.rotation, sprite.scaleX * flipX, sprite.scaleY * flipY); + + camMatrix.copyFrom(camera.matrix); + + if (parentTransformMatrix) + { + // Multiply the camera by the parent matrix + camMatrix.multiplyWithOffset(parentTransformMatrix, -camera.scrollX * sprite.scrollFactorX, -camera.scrollY * sprite.scrollFactorY); + + // Undo the camera scroll + spriteMatrix.e = sprite.x; + spriteMatrix.f = sprite.y; + + // Multiply by the Sprite matrix, store result in calcMatrix + camMatrix.multiply(spriteMatrix, calcMatrix); + } + else + { + spriteMatrix.e -= camera.scrollX * sprite.scrollFactorX; + spriteMatrix.f -= camera.scrollY * sprite.scrollFactorY; + + // Multiply by the Sprite matrix, store result in calcMatrix + camMatrix.multiply(spriteMatrix, calcMatrix); + } + + var xw = x + frameWidth; + var yh = y + frameHeight; + + var tx0 = calcMatrix.getX(x, y); + var ty0 = calcMatrix.getY(x, y); + + var tx1 = calcMatrix.getX(x, yh); + var ty1 = calcMatrix.getY(x, yh); + + var tx2 = calcMatrix.getX(xw, yh); + var ty2 = calcMatrix.getY(xw, yh); + + var tx3 = calcMatrix.getX(xw, y); + var ty3 = calcMatrix.getY(xw, y); + + var tintTL = Utils.getTintAppendFloatAlpha(sprite._tintTL, camera.alpha * sprite._alphaTL); + var tintTR = Utils.getTintAppendFloatAlpha(sprite._tintTR, camera.alpha * sprite._alphaTR); + var tintBL = Utils.getTintAppendFloatAlpha(sprite._tintBL, camera.alpha * sprite._alphaBL); + var tintBR = Utils.getTintAppendFloatAlpha(sprite._tintBR, camera.alpha * sprite._alphaBR); + + if (camera.roundPixels) + { + tx0 = Math.round(tx0); + ty0 = Math.round(ty0); + + tx1 = Math.round(tx1); + ty1 = Math.round(ty1); + + tx2 = Math.round(tx2); + ty2 = Math.round(ty2); + + tx3 = Math.round(tx3); + ty3 = Math.round(ty3); + } + + // So batchQuad never assigns a unit to the glTexture, but to the textureSource instead + if (this.vertexCount + 6 > this.vertexCapacity) + { + this.flush(); + } + + var unit = this.setGameObject(sprite); + + var tintEffect = (sprite._isTinted && sprite.tintFill); + + this.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, unit); + }, + + /** + * Adds the vertices data into the batch and flushes if full. + * + * Assumes 6 vertices in the following arrangement: + * + * ``` + * 0----3 + * |\ B| + * | \ | + * | \ | + * | A \| + * | \ + * 1----2 + * ``` + * + * Where tx0/ty0 = 0, tx1/ty1 = 1, tx2/ty2 = 2 and tx3/ty3 = 3 + * + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchQuad + * @since 3.12.0 + * + * @param {number} x0 - The top-left x position. + * @param {number} y0 - The top-left y position. + * @param {number} x1 - The bottom-left x position. + * @param {number} y1 - The bottom-left y position. + * @param {number} x2 - The bottom-right x position. + * @param {number} y2 - The bottom-right y position. + * @param {number} x3 - The top-right x position. + * @param {number} y3 - The top-right y position. + * @param {number} u0 - UV u0 value. + * @param {number} v0 - UV v0 value. + * @param {number} u1 - UV u1 value. + * @param {number} v1 - UV v1 value. + * @param {number} tintTL - The top-left tint color value. + * @param {number} tintTR - The top-right tint color value. + * @param {number} tintBL - The bottom-left tint color value. + * @param {number} tintBR - The bottom-right tint color value. + * @param {(number|boolean)} tintEffect - The tint effect for the shader to use. + * @param {WebGLTexture} [texture] - WebGLTexture that will be assigned to the current batch if a flush occurs. + * @param {integer} [unit=0] - Texture unit to which the texture needs to be bound. + * + * @return {boolean} `true` if this method caused the batch to flush, otherwise `false`. + */ + batchQuad: function (x0, y0, x1, y1, x2, y2, x3, y3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, unit) + { + if (unit === undefined) { unit = this.currentUnit; } + + var hasFlushed = false; + + if (this.vertexCount + 6 > this.vertexCapacity) + { + this.flush(); + + hasFlushed = true; + + unit = this.setTexture2D(texture); + } + + var vertexViewF32 = this.vertexViewF32; + var vertexViewU32 = this.vertexViewU32; + + var vertexOffset = (this.vertexCount * this.vertexComponentCount) - 1; + + vertexViewF32[++vertexOffset] = x0; + vertexViewF32[++vertexOffset] = y0; + vertexViewF32[++vertexOffset] = u0; + vertexViewF32[++vertexOffset] = v0; + vertexViewF32[++vertexOffset] = unit; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintTL; + + vertexViewF32[++vertexOffset] = x1; + vertexViewF32[++vertexOffset] = y1; + vertexViewF32[++vertexOffset] = u0; + vertexViewF32[++vertexOffset] = v1; + vertexViewF32[++vertexOffset] = unit; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintBL; + + vertexViewF32[++vertexOffset] = x2; + vertexViewF32[++vertexOffset] = y2; + vertexViewF32[++vertexOffset] = u1; + vertexViewF32[++vertexOffset] = v1; + vertexViewF32[++vertexOffset] = unit; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintBR; + + vertexViewF32[++vertexOffset] = x0; + vertexViewF32[++vertexOffset] = y0; + vertexViewF32[++vertexOffset] = u0; + vertexViewF32[++vertexOffset] = v0; + vertexViewF32[++vertexOffset] = unit; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintTL; + + vertexViewF32[++vertexOffset] = x2; + vertexViewF32[++vertexOffset] = y2; + vertexViewF32[++vertexOffset] = u1; + vertexViewF32[++vertexOffset] = v1; + vertexViewF32[++vertexOffset] = unit; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintBR; + + vertexViewF32[++vertexOffset] = x3; + vertexViewF32[++vertexOffset] = y3; + vertexViewF32[++vertexOffset] = u1; + vertexViewF32[++vertexOffset] = v0; + vertexViewF32[++vertexOffset] = unit; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintTR; + + this.vertexCount += 6; + + return hasFlushed; + }, + + /** + * Adds the vertices data into the batch and flushes if full. + * + * Assumes 3 vertices in the following arrangement: + * + * ``` + * 0 + * |\ + * | \ + * | \ + * | \ + * | \ + * 1-----2 + * ``` + * + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchTri + * @since 3.12.0 + * + * @param {number} x1 - The bottom-left x position. + * @param {number} y1 - The bottom-left y position. + * @param {number} x2 - The bottom-right x position. + * @param {number} y2 - The bottom-right y position. + * @param {number} x3 - The top-right x position. + * @param {number} y3 - The top-right y position. + * @param {number} u0 - UV u0 value. + * @param {number} v0 - UV v0 value. + * @param {number} u1 - UV u1 value. + * @param {number} v1 - UV v1 value. + * @param {number} tintTL - The top-left tint color value. + * @param {number} tintTR - The top-right tint color value. + * @param {number} tintBL - The bottom-left tint color value. + * @param {(number|boolean)} tintEffect - The tint effect for the shader to use. + * @param {WebGLTexture} [texture] - WebGLTexture that will be assigned to the current batch if a flush occurs. + * @param {integer} [unit=0] - Texture unit to which the texture needs to be bound. + * + * @return {boolean} `true` if this method caused the batch to flush, otherwise `false`. + */ + batchTri: function (x1, y1, x2, y2, x3, y3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintEffect, texture, unit) + { + if (unit === undefined) { unit = this.currentUnit; } + + var hasFlushed = false; + + if (this.vertexCount + 3 > this.vertexCapacity) + { + this.flush(); + + hasFlushed = true; + + unit = this.setTexture2D(texture); + } + + var vertexViewF32 = this.vertexViewF32; + var vertexViewU32 = this.vertexViewU32; + + var vertexOffset = (this.vertexCount * this.vertexComponentCount) - 1; + + vertexViewF32[++vertexOffset] = x1; + vertexViewF32[++vertexOffset] = y1; + vertexViewF32[++vertexOffset] = u0; + vertexViewF32[++vertexOffset] = v0; + vertexViewF32[++vertexOffset] = unit; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintTL; + + vertexViewF32[++vertexOffset] = x2; + vertexViewF32[++vertexOffset] = y2; + vertexViewF32[++vertexOffset] = u0; + vertexViewF32[++vertexOffset] = v1; + vertexViewF32[++vertexOffset] = unit; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintTR; + + vertexViewF32[++vertexOffset] = x3; + vertexViewF32[++vertexOffset] = y3; + vertexViewF32[++vertexOffset] = u1; + vertexViewF32[++vertexOffset] = v1; + vertexViewF32[++vertexOffset] = unit; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintBL; + + this.vertexCount += 3; + + return hasFlushed; + }, + + /** + * Generic function for batching a textured quad using argument values instead of a Game Object. + * + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchTexture + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - Source GameObject. + * @param {WebGLTexture} texture - Raw WebGLTexture associated with the quad. + * @param {integer} textureWidth - Real texture width. + * @param {integer} textureHeight - Real texture height. + * @param {number} srcX - X coordinate of the quad. + * @param {number} srcY - Y coordinate of the quad. + * @param {number} srcWidth - Width of the quad. + * @param {number} srcHeight - Height of the quad. + * @param {number} scaleX - X component of scale. + * @param {number} scaleY - Y component of scale. + * @param {number} rotation - Rotation of the quad. + * @param {boolean} flipX - Indicates if the quad is horizontally flipped. + * @param {boolean} flipY - Indicates if the quad is vertically flipped. + * @param {number} scrollFactorX - By which factor is the quad affected by the camera horizontal scroll. + * @param {number} scrollFactorY - By which factor is the quad effected by the camera vertical scroll. + * @param {number} displayOriginX - Horizontal origin in pixels. + * @param {number} displayOriginY - Vertical origin in pixels. + * @param {number} frameX - X coordinate of the texture frame. + * @param {number} frameY - Y coordinate of the texture frame. + * @param {number} frameWidth - Width of the texture frame. + * @param {number} frameHeight - Height of the texture frame. + * @param {integer} tintTL - Tint for top left. + * @param {integer} tintTR - Tint for top right. + * @param {integer} tintBL - Tint for bottom left. + * @param {integer} tintBR - Tint for bottom right. + * @param {number} tintEffect - The tint effect. + * @param {number} uOffset - Horizontal offset on texture coordinate. + * @param {number} vOffset - Vertical offset on texture coordinate. + * @param {Phaser.Cameras.Scene2D.Camera} camera - Current used camera. + * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - Parent container. + * @param {boolean} [skipFlip=false] - Skip the renderTexture check. + * @param {number} [textureUnit] - Use the currently bound texture unit? + */ + batchTexture: function ( + gameObject, + texture, + textureWidth, textureHeight, + srcX, srcY, + srcWidth, srcHeight, + scaleX, scaleY, + rotation, + flipX, flipY, + scrollFactorX, scrollFactorY, + displayOriginX, displayOriginY, + frameX, frameY, frameWidth, frameHeight, + tintTL, tintTR, tintBL, tintBR, tintEffect, + uOffset, vOffset, + camera, + parentTransformMatrix, + skipFlip, + textureUnit) + { + var renderer = this.renderer; + + renderer.setPipeline(this, gameObject); + + var camMatrix = this._tempMatrix1; + var spriteMatrix = this._tempMatrix2; + var calcMatrix = this._tempMatrix3; + + var u0 = (frameX / textureWidth) + uOffset; + var v0 = (frameY / textureHeight) + vOffset; + var u1 = (frameX + frameWidth) / textureWidth + uOffset; + var v1 = (frameY + frameHeight) / textureHeight + vOffset; + + var width = srcWidth; + var height = srcHeight; + + var x = -displayOriginX; + var y = -displayOriginY; + + if (gameObject.isCropped) + { + var crop = gameObject._crop; + + width = crop.width; + height = crop.height; + + srcWidth = crop.width; + srcHeight = crop.height; + + frameX = crop.x; + frameY = crop.y; + + var ox = frameX; + var oy = frameY; + + if (flipX) + { + ox = (frameWidth - crop.x - crop.width); + } + + if (flipY && !texture.isRenderTexture) + { + oy = (frameHeight - crop.y - crop.height); + } + + u0 = (ox / textureWidth) + uOffset; + v0 = (oy / textureHeight) + vOffset; + u1 = (ox + crop.width) / textureWidth + uOffset; + v1 = (oy + crop.height) / textureHeight + vOffset; + + x = -displayOriginX + frameX; + y = -displayOriginY + frameY; + } + + // Invert the flipY if this is a RenderTexture + flipY = flipY ^ (!skipFlip && texture.isRenderTexture ? 1 : 0); + + if (flipX) + { + width *= -1; + x += srcWidth; + } + + if (flipY) + { + height *= -1; + y += srcHeight; + } + + var xw = x + width; + var yh = y + height; + + spriteMatrix.applyITRS(srcX, srcY, rotation, scaleX, scaleY); + + camMatrix.copyFrom(camera.matrix); + + if (parentTransformMatrix) + { + // Multiply the camera by the parent matrix + camMatrix.multiplyWithOffset(parentTransformMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY); + + // Undo the camera scroll + spriteMatrix.e = srcX; + spriteMatrix.f = srcY; + + // Multiply by the Sprite matrix, store result in calcMatrix + camMatrix.multiply(spriteMatrix, calcMatrix); + } + else + { + spriteMatrix.e -= camera.scrollX * scrollFactorX; + spriteMatrix.f -= camera.scrollY * scrollFactorY; + + // Multiply by the Sprite matrix, store result in calcMatrix + camMatrix.multiply(spriteMatrix, calcMatrix); + } + + var tx0 = calcMatrix.getX(x, y); + var ty0 = calcMatrix.getY(x, y); + + var tx1 = calcMatrix.getX(x, yh); + var ty1 = calcMatrix.getY(x, yh); + + var tx2 = calcMatrix.getX(xw, yh); + var ty2 = calcMatrix.getY(xw, yh); + + var tx3 = calcMatrix.getX(xw, y); + var ty3 = calcMatrix.getY(xw, y); + + if (camera.roundPixels) + { + tx0 = Math.round(tx0); + ty0 = Math.round(ty0); + + tx1 = Math.round(tx1); + ty1 = Math.round(ty1); + + tx2 = Math.round(tx2); + ty2 = Math.round(ty2); + + tx3 = Math.round(tx3); + ty3 = Math.round(ty3); + } + + if (textureUnit === undefined) + { + textureUnit = this.renderer.setTexture2D(texture); + } + + this.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, textureUnit); + }, + + /** + * Adds a Texture Frame into the batch for rendering. + * + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchTextureFrame + * @since 3.12.0 + * + * @param {Phaser.Textures.Frame} frame - The Texture Frame to be rendered. + * @param {number} x - The horizontal position to render the texture at. + * @param {number} y - The vertical position to render the texture at. + * @param {number} tint - The tint color. + * @param {number} alpha - The alpha value. + * @param {Phaser.GameObjects.Components.TransformMatrix} transformMatrix - The Transform Matrix to use for the texture. + * @param {Phaser.GameObjects.Components.TransformMatrix} [parentTransformMatrix] - A parent Transform Matrix. + */ + batchTextureFrame: function ( + frame, + x, y, + tint, alpha, + transformMatrix, + parentTransformMatrix + ) + { + this.renderer.setPipeline(this); + + var spriteMatrix = this._tempMatrix1.copyFrom(transformMatrix); + var calcMatrix = this._tempMatrix2; + + var xw = x + frame.width; + var yh = y + frame.height; + + if (parentTransformMatrix) + { + spriteMatrix.multiply(parentTransformMatrix, calcMatrix); + } + else + { + calcMatrix = spriteMatrix; + } + + var tx0 = calcMatrix.getX(x, y); + var ty0 = calcMatrix.getY(x, y); + + var tx1 = calcMatrix.getX(x, yh); + var ty1 = calcMatrix.getY(x, yh); + + var tx2 = calcMatrix.getX(xw, yh); + var ty2 = calcMatrix.getY(xw, yh); + + var tx3 = calcMatrix.getX(xw, y); + var ty3 = calcMatrix.getY(xw, y); + + // this.setTexture2D(frame.glTexture, 0); + var unit = this.renderer.setTextureSource(frame.source); + + tint = Utils.getTintAppendFloatAlpha(tint, alpha); + + this.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, frame.u0, frame.v0, frame.u1, frame.v1, tint, tint, tint, tint, 0, frame.glTexture, unit); + }, + + /** + * Pushes a filled rectangle into the vertex batch. + * + * The dimensions are run through `Math.floor` before the quad is generated. + * + * Rectangle has no transform values and isn't transformed into the local space. + * + * Used for directly batching untransformed rectangles, such as Camera background colors. + * + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#drawFillRect + * @since 3.12.0 + * + * @param {number} x - Horizontal top left coordinate of the rectangle. + * @param {number} y - Vertical top left coordinate of the rectangle. + * @param {number} width - Width of the rectangle. + * @param {number} height - Height of the rectangle. + * @param {number} color - Color of the rectangle to draw. + * @param {number} alpha - Alpha value of the rectangle to draw. + */ + drawFillRect: function (x, y, width, height, color, alpha) + { + x = Math.floor(x); + y = Math.floor(y); + + var xw = Math.floor(x + width); + var yh = Math.floor(y + height); + + var blank = this.renderer.blankTexture.glTexture; + + var unit = this.renderer.setTexture2D(blank); + + var tint = Utils.getTintAppendFloatAlphaAndSwap(color, alpha); + + this.batchQuad(x, y, x, yh, xw, yh, xw, y, 0, 0, 1, 1, tint, tint, tint, tint, 2, blank, unit); + }, + + /** + * Pushes a filled rectangle into the vertex batch. + * Rectangle factors in the given transform matrices before adding to the batch. + * + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchFillRect + * @since 3.12.0 + * + * @param {number} x - Horizontal top left coordinate of the rectangle. + * @param {number} y - Vertical top left coordinate of the rectangle. + * @param {number} width - Width of the rectangle. + * @param {number} height - Height of the rectangle. + * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform. + * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform. + */ + batchFillRect: function (x, y, width, height, currentMatrix, parentMatrix) + { + this.renderer.setPipeline(this); + + var calcMatrix = this._tempMatrix3; + + // Multiply and store result in calcMatrix, only if the parentMatrix is set, otherwise we'll use whatever values are already in the calcMatrix + if (parentMatrix) + { + parentMatrix.multiply(currentMatrix, calcMatrix); + } + + var xw = x + width; + var yh = y + height; + + var x0 = calcMatrix.getX(x, y); + var y0 = calcMatrix.getY(x, y); + + var x1 = calcMatrix.getX(x, yh); + var y1 = calcMatrix.getY(x, yh); + + var x2 = calcMatrix.getX(xw, yh); + var y2 = calcMatrix.getY(xw, yh); + + var x3 = calcMatrix.getX(xw, y); + var y3 = calcMatrix.getY(xw, y); + + var frame = this.currentFrame; + + var u0 = frame.u0; + var v0 = frame.v0; + var u1 = frame.u1; + var v1 = frame.v1; + + var tint = this.fillTint; + + this.batchQuad(x0, y0, x1, y1, x2, y2, x3, y3, u0, v0, u1, v1, tint.TL, tint.TR, tint.BL, tint.BR, this.tintEffect); + }, + + /** + * Pushes a filled triangle into the vertex batch. + * Triangle factors in the given transform matrices before adding to the batch. + * + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchFillTriangle + * @since 3.12.0 + * + * @param {number} x0 - Point 0 x coordinate. + * @param {number} y0 - Point 0 y coordinate. + * @param {number} x1 - Point 1 x coordinate. + * @param {number} y1 - Point 1 y coordinate. + * @param {number} x2 - Point 2 x coordinate. + * @param {number} y2 - Point 2 y coordinate. + * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform. + * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform. + */ + batchFillTriangle: function (x0, y0, x1, y1, x2, y2, currentMatrix, parentMatrix) + { + this.renderer.setPipeline(this); + + var calcMatrix = this._tempMatrix3; + + // Multiply and store result in calcMatrix, only if the parentMatrix is set, otherwise we'll use whatever values are already in the calcMatrix + if (parentMatrix) + { + parentMatrix.multiply(currentMatrix, calcMatrix); + } + + var tx0 = calcMatrix.getX(x0, y0); + var ty0 = calcMatrix.getY(x0, y0); + + var tx1 = calcMatrix.getX(x1, y1); + var ty1 = calcMatrix.getY(x1, y1); + + var tx2 = calcMatrix.getX(x2, y2); + var ty2 = calcMatrix.getY(x2, y2); + + var frame = this.currentFrame; + + var u0 = frame.u0; + var v0 = frame.v0; + var u1 = frame.u1; + var v1 = frame.v1; + + this.batchTri(tx0, ty0, tx1, ty1, tx2, ty2, u0, v0, u1, v1, this.fillTint.TL, this.fillTint.TR, this.fillTint.BL, this.tintEffect); + }, + + /** + * Pushes a stroked triangle into the vertex batch. + * Triangle factors in the given transform matrices before adding to the batch. + * The triangle is created from 3 lines and drawn using the `batchStrokePath` method. + * + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchStrokeTriangle + * @since 3.12.0 + * + * @param {number} x0 - Point 0 x coordinate. + * @param {number} y0 - Point 0 y coordinate. + * @param {number} x1 - Point 1 x coordinate. + * @param {number} y1 - Point 1 y coordinate. + * @param {number} x2 - Point 2 x coordinate. + * @param {number} y2 - Point 2 y coordinate. + * @param {number} lineWidth - The width of the line in pixels. + * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform. + * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform. + */ + batchStrokeTriangle: function (x0, y0, x1, y1, x2, y2, lineWidth, currentMatrix, parentMatrix) + { + var tempTriangle = this.tempTriangle; + + tempTriangle[0].x = x0; + tempTriangle[0].y = y0; + tempTriangle[0].width = lineWidth; + + tempTriangle[1].x = x1; + tempTriangle[1].y = y1; + tempTriangle[1].width = lineWidth; + + tempTriangle[2].x = x2; + tempTriangle[2].y = y2; + tempTriangle[2].width = lineWidth; + + tempTriangle[3].x = x0; + tempTriangle[3].y = y0; + tempTriangle[3].width = lineWidth; + + this.batchStrokePath(tempTriangle, lineWidth, false, currentMatrix, parentMatrix); + }, + + /** + * Adds the given path to the vertex batch for rendering. + * + * It works by taking the array of path data and then passing it through Earcut, which + * creates a list of polygons. Each polygon is then added to the batch. + * + * The path is always automatically closed because it's filled. + * + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchFillPath + * @since 3.12.0 + * + * @param {array} path - Collection of points that represent the path. + * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform. + * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform. + */ + batchFillPath: function (path, currentMatrix, parentMatrix) + { + this.renderer.setPipeline(this); + + var calcMatrix = this._tempMatrix3; + + // Multiply and store result in calcMatrix, only if the parentMatrix is set, otherwise we'll use whatever values are already in the calcMatrix + if (parentMatrix) + { + parentMatrix.multiply(currentMatrix, calcMatrix); + } + + var length = path.length; + var polygonCache = this.polygonCache; + var polygonIndexArray; + var point; + + var tintTL = this.fillTint.TL; + var tintTR = this.fillTint.TR; + var tintBL = this.fillTint.BL; + var tintEffect = this.tintEffect; + + for (var pathIndex = 0; pathIndex < length; ++pathIndex) + { + point = path[pathIndex]; + polygonCache.push(point.x, point.y); + } + + polygonIndexArray = Earcut(polygonCache); + length = polygonIndexArray.length; + + var frame = this.currentFrame; + + for (var index = 0; index < length; index += 3) + { + var p0 = polygonIndexArray[index + 0] * 2; + var p1 = polygonIndexArray[index + 1] * 2; + var p2 = polygonIndexArray[index + 2] * 2; + + var x0 = polygonCache[p0 + 0]; + var y0 = polygonCache[p0 + 1]; + var x1 = polygonCache[p1 + 0]; + var y1 = polygonCache[p1 + 1]; + var x2 = polygonCache[p2 + 0]; + var y2 = polygonCache[p2 + 1]; + + var tx0 = calcMatrix.getX(x0, y0); + var ty0 = calcMatrix.getY(x0, y0); + + var tx1 = calcMatrix.getX(x1, y1); + var ty1 = calcMatrix.getY(x1, y1); + + var tx2 = calcMatrix.getX(x2, y2); + var ty2 = calcMatrix.getY(x2, y2); + + var u0 = frame.u0; + var v0 = frame.v0; + var u1 = frame.u1; + var v1 = frame.v1; + + this.batchTri(tx0, ty0, tx1, ty1, tx2, ty2, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintEffect); + } + + polygonCache.length = 0; + }, + + /** + * Adds the given path to the vertex batch for rendering. + * + * It works by taking the array of path data and calling `batchLine` for each section + * of the path. + * + * The path is optionally closed at the end. + * + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchStrokePath + * @since 3.12.0 + * + * @param {array} path - Collection of points that represent the path. + * @param {number} lineWidth - The width of the line segments in pixels. + * @param {boolean} pathOpen - Indicates if the path should be closed or left open. + * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform. + * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform. + */ + batchStrokePath: function (path, lineWidth, pathOpen, currentMatrix, parentMatrix) + { + this.renderer.setPipeline(this); + + // Reset the closePath booleans + this.prevQuad[4] = 0; + this.firstQuad[4] = 0; + + var pathLength = path.length - 1; + + for (var pathIndex = 0; pathIndex < pathLength; pathIndex++) + { + var point0 = path[pathIndex]; + var point1 = path[pathIndex + 1]; + + this.batchLine( + point0.x, + point0.y, + point1.x, + point1.y, + point0.width / 2, + point1.width / 2, + lineWidth, + pathIndex, + !pathOpen && (pathIndex === pathLength - 1), + currentMatrix, + parentMatrix + ); + } + }, + + /** + * Creates a line out of 4 quads and adds it to the vertex batch based on the given line values. + * Assumes a texture has already been set, prior to calling this function. + * + * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#batchLine + * @since 3.12.0 + * + * @param {number} ax - X coordinate to the start of the line + * @param {number} ay - Y coordinate to the start of the line + * @param {number} bx - X coordinate to the end of the line + * @param {number} by - Y coordinate to the end of the line + * @param {number} aLineWidth - Width of the start of the line + * @param {number} bLineWidth - Width of the end of the line + * @param {Float32Array} currentMatrix - Parent matrix, generally used by containers + */ + batchLine: function (ax, ay, bx, by, aLineWidth, bLineWidth, lineWidth, index, closePath, currentMatrix, parentMatrix) + { + this.renderer.setPipeline(this); + + var calcMatrix = this._tempMatrix3; + + // Multiply and store result in calcMatrix, only if the parentMatrix is set, otherwise we'll use whatever values are already in the calcMatrix + if (parentMatrix) + { + parentMatrix.multiply(currentMatrix, calcMatrix); + } + + var dx = bx - ax; + var dy = by - ay; + + var len = Math.sqrt(dx * dx + dy * dy); + var al0 = aLineWidth * (by - ay) / len; + var al1 = aLineWidth * (ax - bx) / len; + var bl0 = bLineWidth * (by - ay) / len; + var bl1 = bLineWidth * (ax - bx) / len; + + var lx0 = bx - bl0; + var ly0 = by - bl1; + var lx1 = ax - al0; + var ly1 = ay - al1; + var lx2 = bx + bl0; + var ly2 = by + bl1; + var lx3 = ax + al0; + var ly3 = ay + al1; + + // tx0 = bottom right + var brX = calcMatrix.getX(lx0, ly0); + var brY = calcMatrix.getY(lx0, ly0); + + // tx1 = bottom left + var blX = calcMatrix.getX(lx1, ly1); + var blY = calcMatrix.getY(lx1, ly1); + + // tx2 = top right + var trX = calcMatrix.getX(lx2, ly2); + var trY = calcMatrix.getY(lx2, ly2); + + // tx3 = top left + var tlX = calcMatrix.getX(lx3, ly3); + var tlY = calcMatrix.getY(lx3, ly3); + + var tint = this.strokeTint; + var tintEffect = this.tintEffect; + + var tintTL = tint.TL; + var tintTR = tint.TR; + var tintBL = tint.BL; + var tintBR = tint.BR; + + var frame = this.currentFrame; + + var u0 = frame.u0; + var v0 = frame.v0; + var u1 = frame.u1; + var v1 = frame.v1; + + // TL, BL, BR, TR + this.batchQuad(tlX, tlY, blX, blY, brX, brY, trX, trY, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect); + + if (lineWidth <= 2) + { + // No point doing a linejoin if the line isn't thick enough + return; + } + + var prev = this.prevQuad; + var first = this.firstQuad; + + if (index > 0 && prev[4]) + { + this.batchQuad(tlX, tlY, blX, blY, prev[0], prev[1], prev[2], prev[3], u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect); + } + else + { + first[0] = tlX; + first[1] = tlY; + first[2] = blX; + first[3] = blY; + first[4] = 1; + } + + if (closePath && first[4]) + { + // Add a join for the final path segment + this.batchQuad(brX, brY, trX, trY, first[0], first[1], first[2], first[3], u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect); + } + else + { + // Store it + + prev[0] = brX; + prev[1] = brY; + prev[2] = trX; + prev[3] = trY; + prev[4] = 1; + } + } + +}); + +module.exports = MultiPipeline; + + +/***/ }), +/* 110 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Implements a model view projection matrices. + * Pipelines can implement this for doing 2D and 3D rendering. + * + * @namespace Phaser.Renderer.WebGL.Pipelines.ModelViewProjection + * @since 3.0.0 + */ +var ModelViewProjection = { + + /** + * Dirty flag for checking if model matrix needs to be updated on GPU. + * + * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelMatrixDirty + * @type {boolean} + * @since 3.0.0 + */ + modelMatrixDirty: false, + + /** + * Dirty flag for checking if view matrix needs to be updated on GPU. + * + * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewMatrixDirty + * @type {boolean} + * @since 3.0.0 + */ + viewMatrixDirty: false, + + /** + * Dirty flag for checking if projection matrix needs to be updated on GPU. + * + * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projectionMatrixDirty + * @type {boolean} + * @since 3.0.0 + */ + projectionMatrixDirty: false, + + /** + * Model matrix + * + * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelMatrix + * @type {?Float32Array} + * @since 3.0.0 + */ + modelMatrix: null, + + /** + * View matrix + * + * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewMatrix + * @type {?Float32Array} + * @since 3.0.0 + */ + viewMatrix: null, + + /** + * Projection matrix + * + * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projectionMatrix + * @type {?Float32Array} + * @since 3.0.0 + */ + projectionMatrix: null, + + /** + * Initializes MVP matrices with an identity matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#mvpInit + * @since 3.0.0 + */ + mvpInit: function () + { + this.modelMatrixDirty = true; + this.viewMatrixDirty = true; + this.projectionMatrixDirty = true; + + this.modelMatrix = new Float32Array([ + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1 + ]); + + 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 + ]); + + return this; + }, + + /** + * If dirty flags are set then the matrices are uploaded to the GPU. + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#mvpUpdate + * @since 3.0.0 + */ + mvpUpdate: function () + { + var program = this.program; + + if (this.modelMatrixDirty) + { + this.renderer.setMatrix4(program, 'uModelMatrix', false, this.modelMatrix); + this.modelMatrixDirty = false; + } + + if (this.viewMatrixDirty) + { + this.renderer.setMatrix4(program, 'uViewMatrix', false, this.viewMatrix); + this.viewMatrixDirty = false; + } + + if (this.projectionMatrixDirty) + { + this.renderer.setMatrix4(program, 'uProjectionMatrix', false, this.projectionMatrix); + this.projectionMatrixDirty = false; + } + + return this; + } +}; + +module.exports = ModelViewProjection; + + +/***/ }), +/* 111 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. @@ -24238,7 +26756,7 @@ module.exports = Equal; var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var ImageRender = __webpack_require__(974); +var ImageRender = __webpack_require__(979); /** * @classdesc @@ -24327,7 +26845,7 @@ module.exports = Image; /***/ }), -/* 109 */ +/* 112 */ /***/ (function(module, exports) { /** @@ -24356,7 +26874,7 @@ module.exports = HasValue; /***/ }), -/* 110 */ +/* 113 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -24374,12 +26892,12 @@ var Bodies = {}; module.exports = Bodies; -var Vertices = __webpack_require__(86); -var Common = __webpack_require__(42); +var Vertices = __webpack_require__(87); +var Common = __webpack_require__(43); var Body = __webpack_require__(62); var Bounds = __webpack_require__(101); var Vector = __webpack_require__(100); -var decomp = __webpack_require__(1398); +var decomp = __webpack_require__(1404); (function() { @@ -24714,7 +27232,7 @@ var decomp = __webpack_require__(1398); /***/ }), -/* 111 */ +/* 114 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -24730,7 +27248,7 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); var Rectangle = __webpack_require__(9); -var RectangleContains = __webpack_require__(48); +var RectangleContains = __webpack_require__(49); /** * @classdesc @@ -25027,7 +27545,7 @@ module.exports = Zone; /***/ }), -/* 112 */ +/* 115 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25042,30 +27560,30 @@ module.exports = Zone; module.exports = { - ADD_ANIMATION: __webpack_require__(535), - ANIMATION_COMPLETE: __webpack_require__(536), - ANIMATION_REPEAT: __webpack_require__(537), - ANIMATION_RESTART: __webpack_require__(538), - ANIMATION_START: __webpack_require__(539), - PAUSE_ALL: __webpack_require__(540), - REMOVE_ANIMATION: __webpack_require__(541), - RESUME_ALL: __webpack_require__(542), - SPRITE_ANIMATION_COMPLETE: __webpack_require__(543), - SPRITE_ANIMATION_KEY_COMPLETE: __webpack_require__(544), - SPRITE_ANIMATION_KEY_REPEAT: __webpack_require__(545), - SPRITE_ANIMATION_KEY_RESTART: __webpack_require__(546), - SPRITE_ANIMATION_KEY_START: __webpack_require__(547), - SPRITE_ANIMATION_KEY_UPDATE: __webpack_require__(548), - SPRITE_ANIMATION_REPEAT: __webpack_require__(549), - SPRITE_ANIMATION_RESTART: __webpack_require__(550), - SPRITE_ANIMATION_START: __webpack_require__(551), - SPRITE_ANIMATION_UPDATE: __webpack_require__(552) + ADD_ANIMATION: __webpack_require__(538), + ANIMATION_COMPLETE: __webpack_require__(539), + ANIMATION_REPEAT: __webpack_require__(540), + ANIMATION_RESTART: __webpack_require__(541), + ANIMATION_START: __webpack_require__(542), + PAUSE_ALL: __webpack_require__(543), + REMOVE_ANIMATION: __webpack_require__(544), + RESUME_ALL: __webpack_require__(545), + SPRITE_ANIMATION_COMPLETE: __webpack_require__(546), + SPRITE_ANIMATION_KEY_COMPLETE: __webpack_require__(547), + SPRITE_ANIMATION_KEY_REPEAT: __webpack_require__(548), + SPRITE_ANIMATION_KEY_RESTART: __webpack_require__(549), + SPRITE_ANIMATION_KEY_START: __webpack_require__(550), + SPRITE_ANIMATION_KEY_UPDATE: __webpack_require__(551), + SPRITE_ANIMATION_REPEAT: __webpack_require__(552), + SPRITE_ANIMATION_RESTART: __webpack_require__(553), + SPRITE_ANIMATION_START: __webpack_require__(554), + SPRITE_ANIMATION_UPDATE: __webpack_require__(555) }; /***/ }), -/* 113 */ +/* 116 */ /***/ (function(module, exports) { /** @@ -25093,7 +27611,7 @@ module.exports = Perimeter; /***/ }), -/* 114 */ +/* 117 */ /***/ (function(module, exports) { /** @@ -25122,7 +27640,7 @@ module.exports = GetColorFromValue; /***/ }), -/* 115 */ +/* 118 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25829,7 +28347,7 @@ module.exports = DataManager; /***/ }), -/* 116 */ +/* 119 */ /***/ (function(module, exports) { /** @@ -25870,7 +28388,7 @@ module.exports = Shuffle; /***/ }), -/* 117 */ +/* 120 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25951,7 +28469,7 @@ module.exports = { /***/ }), -/* 118 */ +/* 121 */ /***/ (function(module, exports) { /** @@ -25981,7 +28499,7 @@ module.exports = Linear; /***/ }), -/* 119 */ +/* 122 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -26150,10 +28668,10 @@ function init () module.exports = init(); -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(730))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(733))) /***/ }), -/* 120 */ +/* 123 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26162,7 +28680,7 @@ module.exports = init(); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var OS = __webpack_require__(119); +var OS = __webpack_require__(122); /** * Determines the browser type and version running this Phaser Game instance. @@ -26263,7 +28781,7 @@ module.exports = init(); /***/ }), -/* 121 */ +/* 124 */ /***/ (function(module, exports) { /** @@ -26292,7 +28810,7 @@ module.exports = FloatBetween; /***/ }), -/* 122 */ +/* 125 */ /***/ (function(module, exports) { /** @@ -26322,7 +28840,552 @@ module.exports = IsSizePowerOfTwo; /***/ }), -/* 123 */ +/* 126 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji +// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl + +var Class = __webpack_require__(0); + +/** + * @classdesc + * A representation of a vector in 4D space. + * + * A four-component vector. + * + * @class Vector4 + * @memberof Phaser.Math + * @constructor + * @since 3.0.0 + * + * @param {number} [x] - The x component. + * @param {number} [y] - The y component. + * @param {number} [z] - The z component. + * @param {number} [w] - The w component. + */ +var Vector4 = new Class({ + + initialize: + + function Vector4 (x, y, z, w) + { + /** + * The x component of this Vector. + * + * @name Phaser.Math.Vector4#x + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.x = 0; + + /** + * The y component of this Vector. + * + * @name Phaser.Math.Vector4#y + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.y = 0; + + /** + * The z component of this Vector. + * + * @name Phaser.Math.Vector4#z + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.z = 0; + + /** + * The w component of this Vector. + * + * @name Phaser.Math.Vector4#w + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.w = 0; + + if (typeof x === 'object') + { + this.x = x.x || 0; + this.y = x.y || 0; + this.z = x.z || 0; + this.w = x.w || 0; + } + else + { + this.x = x || 0; + this.y = y || 0; + this.z = z || 0; + this.w = w || 0; + } + }, + + /** + * Make a clone of this Vector4. + * + * @method Phaser.Math.Vector4#clone + * @since 3.0.0 + * + * @return {Phaser.Math.Vector4} A clone of this Vector4. + */ + clone: function () + { + return new Vector4(this.x, this.y, this.z, this.w); + }, + + /** + * Copy the components of a given Vector into this Vector. + * + * @method Phaser.Math.Vector4#copy + * @since 3.0.0 + * + * @param {Phaser.Math.Vector4} src - The Vector to copy the components from. + * + * @return {Phaser.Math.Vector4} This Vector4. + */ + copy: function (src) + { + this.x = src.x; + this.y = src.y; + this.z = src.z || 0; + this.w = src.w || 0; + + return this; + }, + + /** + * Check whether this Vector is equal to a given Vector. + * + * Performs a strict quality check against each Vector's components. + * + * @method Phaser.Math.Vector4#equals + * @since 3.0.0 + * + * @param {Phaser.Math.Vector4} v - The vector to check equality with. + * + * @return {boolean} A boolean indicating whether the two Vectors are equal or not. + */ + equals: function (v) + { + return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z) && (this.w === v.w)); + }, + + /** + * Set the `x`, `y`, `z` and `w` components of the this Vector to the given `x`, `y`, `z` and `w` values. + * + * @method Phaser.Math.Vector4#set + * @since 3.0.0 + * + * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y, z and w components. + * @param {number} y - The y value to set for this Vector. + * @param {number} z - The z value to set for this Vector. + * @param {number} w - The z value to set for this Vector. + * + * @return {Phaser.Math.Vector4} This Vector4. + */ + set: function (x, y, z, w) + { + if (typeof x === 'object') + { + this.x = x.x || 0; + this.y = x.y || 0; + this.z = x.z || 0; + this.w = x.w || 0; + } + else + { + this.x = x || 0; + this.y = y || 0; + this.z = z || 0; + this.w = w || 0; + } + + return this; + }, + + /** + * Add a given Vector to this Vector. Addition is component-wise. + * + * @method Phaser.Math.Vector4#add + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to add to this Vector. + * + * @return {Phaser.Math.Vector4} This Vector4. + */ + add: function (v) + { + this.x += v.x; + this.y += v.y; + this.z += v.z || 0; + this.w += v.w || 0; + + return this; + }, + + /** + * Subtract the given Vector from this Vector. Subtraction is component-wise. + * + * @method Phaser.Math.Vector4#subtract + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to subtract from this Vector. + * + * @return {Phaser.Math.Vector4} This Vector4. + */ + subtract: function (v) + { + this.x -= v.x; + this.y -= v.y; + this.z -= v.z || 0; + this.w -= v.w || 0; + + return this; + }, + + /** + * Scale this Vector by the given value. + * + * @method Phaser.Math.Vector4#scale + * @since 3.0.0 + * + * @param {number} scale - The value to scale this Vector by. + * + * @return {Phaser.Math.Vector4} This Vector4. + */ + scale: function (scale) + { + this.x *= scale; + this.y *= scale; + this.z *= scale; + this.w *= scale; + + return this; + }, + + /** + * Calculate the length (or magnitude) of this Vector. + * + * @method Phaser.Math.Vector4#length + * @since 3.0.0 + * + * @return {number} The length of this Vector. + */ + length: function () + { + var x = this.x; + var y = this.y; + var z = this.z; + var w = this.w; + + return Math.sqrt(x * x + y * y + z * z + w * w); + }, + + /** + * Calculate the length of this Vector squared. + * + * @method Phaser.Math.Vector4#lengthSq + * @since 3.0.0 + * + * @return {number} The length of this Vector, squared. + */ + lengthSq: function () + { + var x = this.x; + var y = this.y; + var z = this.z; + var w = this.w; + + return x * x + y * y + z * z + w * w; + }, + + /** + * Normalize this Vector. + * + * Makes the vector a unit length vector (magnitude of 1) in the same direction. + * + * @method Phaser.Math.Vector4#normalize + * @since 3.0.0 + * + * @return {Phaser.Math.Vector4} This Vector4. + */ + normalize: function () + { + var x = this.x; + var y = this.y; + var z = this.z; + var w = this.w; + var len = x * x + y * y + z * z + w * w; + + if (len > 0) + { + len = 1 / Math.sqrt(len); + + this.x = x * len; + this.y = y * len; + this.z = z * len; + this.w = w * len; + } + + return this; + }, + + /** + * Calculate the dot product of this Vector and the given Vector. + * + * @method Phaser.Math.Vector4#dot + * @since 3.0.0 + * + * @param {Phaser.Math.Vector4} v - The Vector4 to dot product with this Vector4. + * + * @return {number} The dot product of this Vector and the given Vector. + */ + dot: function (v) + { + return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w; + }, + + /** + * Linearly interpolate between this Vector and the given Vector. + * + * Interpolates this Vector towards the given Vector. + * + * @method Phaser.Math.Vector4#lerp + * @since 3.0.0 + * + * @param {Phaser.Math.Vector4} v - The Vector4 to interpolate towards. + * @param {number} [t=0] - The interpolation percentage, between 0 and 1. + * + * @return {Phaser.Math.Vector4} This Vector4. + */ + lerp: function (v, t) + { + if (t === undefined) { t = 0; } + + var ax = this.x; + var ay = this.y; + var az = this.z; + var aw = this.w; + + this.x = ax + t * (v.x - ax); + this.y = ay + t * (v.y - ay); + this.z = az + t * (v.z - az); + this.w = aw + t * (v.w - aw); + + return this; + }, + + /** + * Perform a component-wise multiplication between this Vector and the given Vector. + * + * Multiplies this Vector by the given Vector. + * + * @method Phaser.Math.Vector4#multiply + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to multiply this Vector by. + * + * @return {Phaser.Math.Vector4} This Vector4. + */ + multiply: function (v) + { + this.x *= v.x; + this.y *= v.y; + this.z *= v.z || 1; + this.w *= v.w || 1; + + return this; + }, + + /** + * Perform a component-wise division between this Vector and the given Vector. + * + * Divides this Vector by the given Vector. + * + * @method Phaser.Math.Vector4#divide + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to divide this Vector by. + * + * @return {Phaser.Math.Vector4} This Vector4. + */ + divide: function (v) + { + this.x /= v.x; + this.y /= v.y; + this.z /= v.z || 1; + this.w /= v.w || 1; + + return this; + }, + + /** + * Calculate the distance between this Vector and the given Vector. + * + * @method Phaser.Math.Vector4#distance + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to. + * + * @return {number} The distance from this Vector to the given Vector. + */ + distance: function (v) + { + var dx = v.x - this.x; + var dy = v.y - this.y; + var dz = v.z - this.z || 0; + var dw = v.w - this.w || 0; + + return Math.sqrt(dx * dx + dy * dy + dz * dz + dw * dw); + }, + + /** + * Calculate the distance between this Vector and the given Vector, squared. + * + * @method Phaser.Math.Vector4#distanceSq + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to. + * + * @return {number} The distance from this Vector to the given Vector, squared. + */ + distanceSq: function (v) + { + var dx = v.x - this.x; + var dy = v.y - this.y; + var dz = v.z - this.z || 0; + var dw = v.w - this.w || 0; + + return dx * dx + dy * dy + dz * dz + dw * dw; + }, + + /** + * Negate the `x`, `y`, `z` and `w` components of this Vector. + * + * @method Phaser.Math.Vector4#negate + * @since 3.0.0 + * + * @return {Phaser.Math.Vector4} This Vector4. + */ + negate: function () + { + this.x = -this.x; + this.y = -this.y; + this.z = -this.z; + this.w = -this.w; + + return this; + }, + + /** + * Transform this Vector with the given Matrix. + * + * @method Phaser.Math.Vector4#transformMat4 + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector4 with. + * + * @return {Phaser.Math.Vector4} This Vector4. + */ + transformMat4: function (mat) + { + var x = this.x; + var y = this.y; + var z = this.z; + var w = this.w; + var m = mat.val; + + this.x = m[0] * x + m[4] * y + m[8] * z + m[12] * w; + this.y = m[1] * x + m[5] * y + m[9] * z + m[13] * w; + this.z = m[2] * x + m[6] * y + m[10] * z + m[14] * w; + this.w = m[3] * x + m[7] * y + m[11] * z + m[15] * w; + + return this; + }, + + /** + * Transform this Vector with the given Quaternion. + * + * @method Phaser.Math.Vector4#transformQuat + * @since 3.0.0 + * + * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with. + * + * @return {Phaser.Math.Vector4} This Vector4. + */ + transformQuat: function (q) + { + // TODO: is this really the same as Vector3? + // Also, what about this: http://molecularmusings.wordpress.com/2013/05/24/a-faster-quaternion-vector-multiplication/ + // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations + var x = this.x; + var y = this.y; + var z = this.z; + var qx = q.x; + var qy = q.y; + var qz = q.z; + var qw = q.w; + + // calculate quat * vec + var ix = qw * x + qy * z - qz * y; + var iy = qw * y + qz * x - qx * z; + var iz = qw * z + qx * y - qy * x; + var iw = -qx * x - qy * y - qz * z; + + // calculate result * inverse quat + this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy; + this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz; + this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx; + + return this; + }, + + /** + * Make this Vector the zero vector (0, 0, 0, 0). + * + * @method Phaser.Math.Vector4#reset + * @since 3.0.0 + * + * @return {Phaser.Math.Vector4} This Vector4. + */ + reset: function () + { + this.x = 0; + this.y = 0; + this.z = 0; + this.w = 0; + + return this; + } + +}); + +// TODO: Check if these are required internally, if not, remove. +Vector4.prototype.sub = Vector4.prototype.subtract; +Vector4.prototype.mul = Vector4.prototype.multiply; +Vector4.prototype.div = Vector4.prototype.divide; +Vector4.prototype.dist = Vector4.prototype.distance; +Vector4.prototype.distSq = Vector4.prototype.distanceSq; +Vector4.prototype.len = Vector4.prototype.length; +Vector4.prototype.lenSq = Vector4.prototype.lengthSq; + +module.exports = Vector4; + + +/***/ }), +/* 127 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26337,17 +29400,17 @@ module.exports = IsSizePowerOfTwo; module.exports = { - ADD: __webpack_require__(782), - ERROR: __webpack_require__(783), - LOAD: __webpack_require__(784), - READY: __webpack_require__(785), - REMOVE: __webpack_require__(786) + ADD: __webpack_require__(785), + ERROR: __webpack_require__(786), + LOAD: __webpack_require__(787), + READY: __webpack_require__(788), + REMOVE: __webpack_require__(789) }; /***/ }), -/* 124 */ +/* 128 */ /***/ (function(module, exports) { /** @@ -26405,7 +29468,7 @@ module.exports = AddToDOM; /***/ }), -/* 125 */ +/* 129 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26414,7 +29477,7 @@ module.exports = AddToDOM; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SpliceOne = __webpack_require__(80); +var SpliceOne = __webpack_require__(81); /** * Removes the given item, or array of items, from the array. @@ -26496,7 +29559,7 @@ module.exports = Remove; /***/ }), -/* 126 */ +/* 130 */ /***/ (function(module, exports) { /** @@ -27402,7 +30465,7 @@ module.exports = KeyCodes; /***/ }), -/* 127 */ +/* 131 */ /***/ (function(module, exports) { /** @@ -27525,7 +30588,7 @@ module.exports = CONST; /***/ }), -/* 128 */ +/* 132 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -27570,7 +30633,7 @@ module.exports = Merge; /***/ }), -/* 129 */ +/* 133 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28284,7 +31347,7 @@ module.exports = BaseSoundManager; /***/ }), -/* 130 */ +/* 134 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28784,7 +31847,7 @@ module.exports = BaseSound; /***/ }), -/* 131 */ +/* 135 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28796,7 +31859,7 @@ module.exports = BaseSound; var ArrayUtils = __webpack_require__(189); var Class = __webpack_require__(0); var NOOP = __webpack_require__(1); -var StableSort = __webpack_require__(133); +var StableSort = __webpack_require__(137); /** * @callback EachListCallback @@ -29600,7 +32663,7 @@ module.exports = List; /***/ }), -/* 132 */ +/* 136 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29672,7 +32735,7 @@ module.exports = RotateMatrix; /***/ }), -/* 133 */ +/* 137 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29817,7 +32880,7 @@ else {} })(); /***/ }), -/* 134 */ +/* 138 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29830,12 +32893,12 @@ var Class = __webpack_require__(0); var Clamp = __webpack_require__(17); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var GetColorFromValue = __webpack_require__(114); -var GetBitmapTextSize = __webpack_require__(948); -var ParseFromAtlas = __webpack_require__(949); +var GetColorFromValue = __webpack_require__(117); +var GetBitmapTextSize = __webpack_require__(953); +var ParseFromAtlas = __webpack_require__(954); var ParseXMLBitmapFont = __webpack_require__(193); var Rectangle = __webpack_require__(9); -var Render = __webpack_require__(950); +var Render = __webpack_require__(955); /** * @classdesc @@ -30945,7 +34008,7 @@ module.exports = BitmapText; /***/ }), -/* 135 */ +/* 139 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31394,7 +34457,7 @@ module.exports = Set; /***/ }), -/* 136 */ +/* 140 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31406,7 +34469,7 @@ module.exports = Set; var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var MeshRender = __webpack_require__(1081); +var MeshRender = __webpack_require__(1086); var NOOP = __webpack_require__(1); /** @@ -31565,7 +34628,7 @@ module.exports = Mesh; /***/ }), -/* 137 */ +/* 141 */ /***/ (function(module, exports) { /** @@ -31603,7 +34666,7 @@ module.exports = RectangleToRectangle; /***/ }), -/* 138 */ +/* 142 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31711,7 +34774,7 @@ module.exports = InputPluginCache; /***/ }), -/* 139 */ +/* 143 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31726,19 +34789,19 @@ module.exports = InputPluginCache; module.exports = { - ANY_KEY_DOWN: __webpack_require__(1223), - ANY_KEY_UP: __webpack_require__(1224), - COMBO_MATCH: __webpack_require__(1225), - DOWN: __webpack_require__(1226), - KEY_DOWN: __webpack_require__(1227), - KEY_UP: __webpack_require__(1228), - UP: __webpack_require__(1229) + ANY_KEY_DOWN: __webpack_require__(1229), + ANY_KEY_UP: __webpack_require__(1230), + COMBO_MATCH: __webpack_require__(1231), + DOWN: __webpack_require__(1232), + KEY_DOWN: __webpack_require__(1233), + KEY_UP: __webpack_require__(1234), + UP: __webpack_require__(1235) }; /***/ }), -/* 140 */ +/* 144 */ /***/ (function(module, exports) { /** @@ -31779,7 +34842,7 @@ module.exports = GetURL; /***/ }), -/* 141 */ +/* 145 */ /***/ (function(module, exports) { /** @@ -31849,7 +34912,7 @@ module.exports = XHRSettings; /***/ }), -/* 142 */ +/* 146 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31950,7 +35013,7 @@ module.exports = ArcadeSprite; /***/ }), -/* 143 */ +/* 147 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31967,52 +35030,52 @@ module.exports = { CalculateFacesAt: __webpack_require__(226), CalculateFacesWithin: __webpack_require__(52), - Copy: __webpack_require__(1319), - CreateFromTiles: __webpack_require__(1320), - CullTiles: __webpack_require__(1321), - Fill: __webpack_require__(1322), - FilterTiles: __webpack_require__(1323), - FindByIndex: __webpack_require__(1324), - FindTile: __webpack_require__(1325), - ForEachTile: __webpack_require__(1326), - GetTileAt: __webpack_require__(144), - GetTileAtWorldXY: __webpack_require__(1327), + Copy: __webpack_require__(1325), + CreateFromTiles: __webpack_require__(1326), + CullTiles: __webpack_require__(1327), + Fill: __webpack_require__(1328), + FilterTiles: __webpack_require__(1329), + FindByIndex: __webpack_require__(1330), + FindTile: __webpack_require__(1331), + ForEachTile: __webpack_require__(1332), + GetTileAt: __webpack_require__(148), + GetTileAtWorldXY: __webpack_require__(1333), GetTilesWithin: __webpack_require__(24), - GetTilesWithinShape: __webpack_require__(1328), - GetTilesWithinWorldXY: __webpack_require__(1329), - HasTileAt: __webpack_require__(477), - HasTileAtWorldXY: __webpack_require__(1330), + GetTilesWithinShape: __webpack_require__(1334), + GetTilesWithinWorldXY: __webpack_require__(1335), + HasTileAt: __webpack_require__(479), + HasTileAtWorldXY: __webpack_require__(1336), IsInLayerBounds: __webpack_require__(102), PutTileAt: __webpack_require__(227), - PutTileAtWorldXY: __webpack_require__(1331), - PutTilesAt: __webpack_require__(1332), - Randomize: __webpack_require__(1333), - RemoveTileAt: __webpack_require__(478), - RemoveTileAtWorldXY: __webpack_require__(1334), - RenderDebug: __webpack_require__(1335), - ReplaceByIndex: __webpack_require__(476), - SetCollision: __webpack_require__(1336), - SetCollisionBetween: __webpack_require__(1337), - SetCollisionByExclusion: __webpack_require__(1338), - SetCollisionByProperty: __webpack_require__(1339), - SetCollisionFromCollisionGroup: __webpack_require__(1340), - SetTileIndexCallback: __webpack_require__(1341), - SetTileLocationCallback: __webpack_require__(1342), - Shuffle: __webpack_require__(1343), - SwapByIndex: __webpack_require__(1344), - TileToWorldX: __webpack_require__(145), - TileToWorldXY: __webpack_require__(1345), - TileToWorldY: __webpack_require__(146), - WeightedRandomize: __webpack_require__(1346), + PutTileAtWorldXY: __webpack_require__(1337), + PutTilesAt: __webpack_require__(1338), + Randomize: __webpack_require__(1339), + RemoveTileAt: __webpack_require__(480), + RemoveTileAtWorldXY: __webpack_require__(1340), + RenderDebug: __webpack_require__(1341), + ReplaceByIndex: __webpack_require__(478), + SetCollision: __webpack_require__(1342), + SetCollisionBetween: __webpack_require__(1343), + SetCollisionByExclusion: __webpack_require__(1344), + SetCollisionByProperty: __webpack_require__(1345), + SetCollisionFromCollisionGroup: __webpack_require__(1346), + SetTileIndexCallback: __webpack_require__(1347), + SetTileLocationCallback: __webpack_require__(1348), + Shuffle: __webpack_require__(1349), + SwapByIndex: __webpack_require__(1350), + TileToWorldX: __webpack_require__(149), + TileToWorldXY: __webpack_require__(1351), + TileToWorldY: __webpack_require__(150), + WeightedRandomize: __webpack_require__(1352), WorldToTileX: __webpack_require__(63), - WorldToTileXY: __webpack_require__(1347), + WorldToTileXY: __webpack_require__(1353), WorldToTileY: __webpack_require__(64) }; /***/ }), -/* 144 */ +/* 148 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32068,7 +35131,7 @@ module.exports = GetTileAt; /***/ }), -/* 145 */ +/* 149 */ /***/ (function(module, exports) { /** @@ -32113,7 +35176,7 @@ module.exports = TileToWorldX; /***/ }), -/* 146 */ +/* 150 */ /***/ (function(module, exports) { /** @@ -32158,7 +35221,7 @@ module.exports = TileToWorldY; /***/ }), -/* 147 */ +/* 151 */ /***/ (function(module, exports) { /** @@ -32222,7 +35285,7 @@ module.exports = GetNewValue; /***/ }), -/* 148 */ +/* 152 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32233,10 +35296,10 @@ module.exports = GetNewValue; var Defaults = __webpack_require__(236); var GetAdvancedValue = __webpack_require__(15); -var GetBoolean = __webpack_require__(88); +var GetBoolean = __webpack_require__(89); var GetEaseFunction = __webpack_require__(69); -var GetNewValue = __webpack_require__(147); -var GetProps = __webpack_require__(499); +var GetNewValue = __webpack_require__(151); +var GetProps = __webpack_require__(501); var GetTargets = __webpack_require__(234); var GetValue = __webpack_require__(6); var GetValueOp = __webpack_require__(235); @@ -32355,2454 +35418,7 @@ module.exports = TweenBuilder; /***/ }), -/* 149 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @author Felipe Alfonso <@bitnenfer> - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var Utils = __webpack_require__(10); - -/** - * @classdesc - * WebGLPipeline is a class that describes the way elements will be renderered - * in WebGL, specially focused on batching vertices (batching is not provided). - * Pipelines are mostly used for describing 2D rendering passes but it's - * flexible enough to be used for any type of rendering including 3D. - * Internally WebGLPipeline will handle things like compiling shaders, - * creating vertex buffers, assigning primitive topology and binding - * vertex attributes. - * - * The config properties are: - * - game: Current game instance. - * - renderer: Current WebGL renderer. - * - gl: Current WebGL context. - * - topology: This indicates how the primitives are rendered. The default value is GL_TRIANGLES. - * Here is the full list of rendering primitives (https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants). - * - vertShader: Source for vertex shader as a string. - * - fragShader: Source for fragment shader as a string. - * - vertexCapacity: The amount of vertices that shall be allocated - * - vertexSize: The size of a single vertex in bytes. - * - vertices: An optional buffer of vertices - * - attributes: An array describing the vertex attributes - * - * The vertex attributes properties are: - * - name : String - Name of the attribute in the vertex shader - * - size : integer - How many components describe the attribute. For ex: vec3 = size of 3, float = size of 1 - * - type : GLenum - WebGL type (gl.BYTE, gl.SHORT, gl.UNSIGNED_BYTE, gl.UNSIGNED_SHORT, gl.FLOAT) - * - normalized : boolean - Is the attribute normalized - * - offset : integer - The offset in bytes to the current attribute in the vertex. Equivalent to offsetof(vertex, attrib) in C - * Here you can find more information of how to describe an attribute: - * - https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/vertexAttribPointer - * - * @class WebGLPipeline - * @memberof Phaser.Renderer.WebGL - * @constructor - * @since 3.0.0 - * - * @param {object} config - The configuration object for this WebGL Pipeline, as described above. - */ -var WebGLPipeline = new Class({ - - initialize: - - function WebGLPipeline (config) - { - /** - * Name of the Pipeline. Used for identifying - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#name - * @type {string} - * @since 3.0.0 - */ - this.name = 'WebGLPipeline'; - - /** - * The Game which owns this WebGL Pipeline. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#game - * @type {Phaser.Game} - * @since 3.0.0 - */ - this.game = config.game; - - /** - * The canvas which this WebGL Pipeline renders to. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#view - * @type {HTMLCanvasElement} - * @since 3.0.0 - */ - this.view = config.game.canvas; - - /** - * Used to store the current game resolution - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#resolution - * @type {number} - * @since 3.0.0 - */ - this.resolution = 1; - - /** - * Width of the current viewport - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#width - * @type {number} - * @since 3.0.0 - */ - this.width = 0; - - /** - * Height of the current viewport - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#height - * @type {number} - * @since 3.0.0 - */ - this.height = 0; - - /** - * The WebGL context this WebGL Pipeline uses. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#gl - * @type {WebGLRenderingContext} - * @since 3.0.0 - */ - this.gl = config.gl; - - /** - * How many vertices have been fed to the current pipeline. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCount - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.vertexCount = 0; - - /** - * The limit of vertices that the pipeline can hold - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCapacity - * @type {integer} - * @since 3.0.0 - */ - this.vertexCapacity = config.vertexCapacity; - - /** - * The WebGL Renderer which owns this WebGL Pipeline. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#renderer - * @type {Phaser.Renderer.WebGL.WebGLRenderer} - * @since 3.0.0 - */ - this.renderer = config.renderer; - - /** - * Raw byte buffer of vertices. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexData - * @type {ArrayBuffer} - * @since 3.0.0 - */ - this.vertexData = (config.vertices ? config.vertices : new ArrayBuffer(config.vertexCapacity * config.vertexSize)); - - /** - * The handle to a WebGL vertex buffer object. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexBuffer - * @type {WebGLBuffer} - * @since 3.0.0 - */ - this.vertexBuffer = this.renderer.createVertexBuffer((config.vertices ? config.vertices : this.vertexData.byteLength), this.gl.STREAM_DRAW); - - /** - * The handle to a WebGL program. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#program - * @type {WebGLProgram} - * @since 3.0.0 - */ - this.program = this.renderer.createProgram(config.vertShader, config.fragShader); - - /** - * Array of objects that describe the vertex attributes. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#attributes - * @type {object} - * @since 3.0.0 - */ - this.attributes = config.attributes; - - /** - * The size in bytes of the vertex. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexSize - * @type {integer} - * @since 3.0.0 - */ - this.vertexSize = config.vertexSize; - - /** - * The primitive topology which the pipeline will use to submit draw calls. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#topology - * @type {integer} - * @since 3.0.0 - */ - this.topology = config.topology; - - /** - * Uint8 view to the vertex raw buffer. Used for uploading vertex buffer resources to the GPU. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#bytes - * @type {Uint8Array} - * @since 3.0.0 - */ - this.bytes = new Uint8Array(this.vertexData); - - /** - * This will store the amount of components of 32 bit length. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexComponentCount - * @type {integer} - * @since 3.0.0 - */ - this.vertexComponentCount = Utils.getComponentCount(config.attributes, this.gl); - - /** - * Indicates if the current pipeline is flushing the contents to the GPU. - * When the variable is set the flush function will be locked. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#flushLocked - * @type {boolean} - * @since 3.1.0 - */ - this.flushLocked = false; - - /** - * Indicates if the current pipeline is active or not for this frame only. - * Reset in the onRender method. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#active - * @type {boolean} - * @since 3.10.0 - */ - this.active = false; - - /** - * Holds the most recently assigned texture unit. - * Treat this value as read-only. - * - * @name Phaser.Renderer.WebGL.Pipelines.WebGLPipeline#currentUnit - * @type {number} - * @since 3.50.0 - */ - this.currentUnit = 0; - - /** - * Some pipelines require the forced use of texture zero (like the light pipeline). - * This boolean should be set when that is the case. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#forceZero - * @type {boolean} - * @since 3.50.0 - */ - this.forceZero = false; - }, - - /** - * Called when the Game has fully booted and the Renderer has finished setting up. - * - * By this stage all Game level systems are now in place and you can perform any final - * tasks that the pipeline may need that relied on game systems such as the Texture Manager. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#boot - * @since 3.11.0 - */ - boot: function () - { - var gl = this.gl; - var vertexBuffer = this.vertexBuffer; - var attributes = this.attributes; - var program = this.program; - var renderer = this.renderer; - var vertexSize = this.vertexSize; - - renderer.setProgram(program); - renderer.setVertexBuffer(vertexBuffer); - - for (var i = 0; i < attributes.length; i++) - { - var element = attributes[i]; - var location = gl.getAttribLocation(program, element.name); - - if (location >= 0) - { - gl.enableVertexAttribArray(location); - gl.vertexAttribPointer(location, element.size, element.type, element.normalized, vertexSize, element.offset); - element.enabled = true; - element.location = location; - } - else if (location !== -1) - { - gl.disableVertexAttribArray(location); - } - } - - return this; - }, - - /** - * Custom pipelines can use this method in order to perform any required pre-batch tasks - * for the given Game Object. It must return the texture unit the Game Object was assigned. - * - * @method Phaser.Renderer.WebGL.Pipelines.WebGLPipeline#setGameObject - * @since 3.50.0 - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object being rendered or added to the batch. - * @param {Phaser.Textures.Frame} [frame] - Optional frame to use. Can override that of the Game Object. - * - * @return {number} The texture unit the Game Object has been assigned. - */ - setGameObject: function (gameObject, frame) - { - if (frame === undefined) { frame = gameObject.frame; } - - this.currentUnit = this.renderer.setTextureSource(frame.source); - - return this.currentUnit; - }, - - /** - * Adds a description of vertex attribute to the pipeline - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#addAttribute - * @since 3.2.0 - * - * @param {string} name - Name of the vertex attribute - * @param {integer} size - Vertex component size - * @param {integer} type - Type of the attribute - * @param {boolean} normalized - Is the value normalized to a range - * @param {integer} offset - Byte offset to the beginning of the first element in the vertex - * - * @return {this} This WebGLPipeline instance. - */ - addAttribute: function (name, size, type, normalized, offset) - { - this.attributes.push({ - name: name, - size: size, - type: this.renderer.glFormats[type], - normalized: normalized, - offset: offset, - enabled: false, - location: -1 - }); - - this.vertexComponentCount = Utils.getComponentCount( - this.attributes, - this.gl - ); - return this; - }, - - /** - * Check if the current batch of vertices is full. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#shouldFlush - * @since 3.0.0 - * - * @return {boolean} `true` if the current batch should be flushed, otherwise `false`. - */ - shouldFlush: function () - { - return (this.vertexCount >= this.vertexCapacity); - }, - - /** - * Resizes the properties used to describe the viewport - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#resize - * @since 3.0.0 - * - * @param {number} width - The new width of this WebGL Pipeline. - * @param {number} height - The new height of this WebGL Pipeline. - * @param {number} resolution - The resolution this WebGL Pipeline should be resized to. - * - * @return {this} This WebGLPipeline instance. - */ - resize: function (width, height, resolution) - { - this.width = width * resolution; - this.height = height * resolution; - this.resolution = resolution; - - return this; - }, - - /** - * Binds the pipeline resources, including the program, vertex buffer and attribute pointers. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#bind - * @since 3.0.0 - * - * @return {this} This WebGLPipeline instance. - */ - bind: function () - { - var vertexBuffer = this.vertexBuffer; - var program = this.program; - var renderer = this.renderer; - - renderer.setProgram(program); - renderer.setVertexBuffer(vertexBuffer); - - this.setAttribPointers(); - - return this; - }, - - /** - * Sets the vertex attribute pointers. - * This should only be called after the vertex buffer has been bound. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setAttribPointers - * @since 3.50.0 - * - * @return {this} This WebGLPipeline instance. - */ - setAttribPointers: function () - { - var gl = this.gl; - var attributes = this.attributes; - var vertexSize = this.vertexSize; - - for (var i = 0; i < attributes.length; i++) - { - var element = attributes[i]; - - if (element.enabled) - { - gl.vertexAttribPointer(element.location, element.size, element.type, element.normalized, vertexSize, element.offset); - } - else if (!element.enabled && element.location > -1) - { - gl.disableVertexAttribArray(element.location); - element.location = -1; - } - } - }, - - /** - * Set whenever this WebGL Pipeline is bound to a WebGL Renderer. - * - * This method is called every time the WebGL Pipeline is attempted to be bound, even if it already is the current pipeline. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#onBind - * @since 3.0.0 - * - * @return {this} This WebGLPipeline instance. - */ - onBind: function () - { - // This is for updating uniform data it's called on each bind attempt. - return this; - }, - - /** - * Called before each frame is rendered, but after the canvas has been cleared. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#onPreRender - * @since 3.0.0 - * - * @return {this} This WebGLPipeline instance. - */ - onPreRender: function () - { - // called once every frame - return this; - }, - - /** - * Called before a Scene's Camera is rendered. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#onRender - * @since 3.0.0 - * - * @param {Phaser.Scene} scene - The Scene being rendered. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera being rendered with. - * - * @return {this} This WebGLPipeline instance. - */ - onRender: function () - { - // called for each camera - return this; - }, - - /** - * Called after each frame has been completely rendered and snapshots have been taken. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#onPostRender - * @since 3.0.0 - * - * @return {this} This WebGLPipeline instance. - */ - onPostRender: function () - { - // called once every frame - return this; - }, - - /** - * Uploads the vertex data and emits a draw call - * for the current batch of vertices. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#flush - * @since 3.0.0 - * - * @return {this} This WebGLPipeline instance. - */ - flush: function () - { - if (this.flushLocked) { return this; } - - this.flushLocked = true; - - var gl = this.gl; - var vertexCount = this.vertexCount; - var topology = this.topology; - var vertexSize = this.vertexSize; - - if (vertexCount === 0) - { - this.flushLocked = false; - return; - } - - gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize)); - gl.drawArrays(topology, 0, vertexCount); - - this.vertexCount = 0; - this.flushLocked = false; - - return this; - }, - - /** - * Removes all object references in this WebGL Pipeline and removes its program from the WebGL context. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#destroy - * @since 3.0.0 - * - * @return {this} This WebGLPipeline instance. - */ - destroy: function () - { - var gl = this.gl; - - gl.deleteProgram(this.program); - gl.deleteBuffer(this.vertexBuffer); - - delete this.program; - delete this.vertexBuffer; - delete this.gl; - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat1 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {number} x - The new value of the `float` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat1: function (name, x) - { - this.renderer.setFloat1(this.program, name, x); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat2 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {number} x - The new X component of the `vec2` uniform. - * @param {number} y - The new Y component of the `vec2` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat2: function (name, x, y) - { - this.renderer.setFloat2(this.program, name, x, y); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat3 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {number} x - The new X component of the `vec3` uniform. - * @param {number} y - The new Y component of the `vec3` uniform. - * @param {number} z - The new Z component of the `vec3` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat3: function (name, x, y, z) - { - this.renderer.setFloat3(this.program, name, x, y, z); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat4 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {number} x - X component of the uniform - * @param {number} y - Y component of the uniform - * @param {number} z - Z component of the uniform - * @param {number} w - W component of the uniform - * - * @return {this} This WebGLPipeline instance. - */ - setFloat4: function (name, x, y, z, w) - { - this.renderer.setFloat4(this.program, name, x, y, z, w); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat1v - * @since 3.13.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {Float32Array} arr - The new value to be used for the uniform variable. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat1v: function (name, arr) - { - this.renderer.setFloat1v(this.program, name, arr); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat2v - * @since 3.13.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {Float32Array} arr - The new value to be used for the uniform variable. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat2v: function (name, arr) - { - this.renderer.setFloat2v(this.program, name, arr); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat3v - * @since 3.13.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {Float32Array} arr - The new value to be used for the uniform variable. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat3v: function (name, arr) - { - this.renderer.setFloat3v(this.program, name, arr); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat4v - * @since 3.13.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {Float32Array} arr - The new value to be used for the uniform variable. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat4v: function (name, arr) - { - this.renderer.setFloat4v(this.program, name, arr); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt1 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {integer} x - The new value of the `int` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setInt1: function (name, x) - { - this.renderer.setInt1(this.program, name, x); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt2 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {integer} x - The new X component of the `ivec2` uniform. - * @param {integer} y - The new Y component of the `ivec2` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setInt2: function (name, x, y) - { - this.renderer.setInt2(this.program, name, x, y); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt3 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {integer} x - The new X component of the `ivec3` uniform. - * @param {integer} y - The new Y component of the `ivec3` uniform. - * @param {integer} z - The new Z component of the `ivec3` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setInt3: function (name, x, y, z) - { - this.renderer.setInt3(this.program, name, x, y, z); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt4 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {integer} x - X component of the uniform - * @param {integer} y - Y component of the uniform - * @param {integer} z - Z component of the uniform - * @param {integer} w - W component of the uniform - * - * @return {this} This WebGLPipeline instance. - */ - setInt4: function (name, x, y, z, w) - { - this.renderer.setInt4(this.program, name, x, y, z, w); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix2 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {boolean} transpose - Whether to transpose the matrix. Should be `false`. - * @param {Float32Array} matrix - The new values for the `mat2` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setMatrix2: function (name, transpose, matrix) - { - this.renderer.setMatrix2(this.program, name, transpose, matrix); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix3 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {boolean} transpose - Whether to transpose the matrix. Should be `false`. - * @param {Float32Array} matrix - The new values for the `mat3` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setMatrix3: function (name, transpose, matrix) - { - this.renderer.setMatrix3(this.program, name, transpose, matrix); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix4 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {boolean} transpose - Should the matrix be transpose - * @param {Float32Array} matrix - Matrix data - * - * @return {this} This WebGLPipeline instance. - */ - setMatrix4: function (name, transpose, matrix) - { - this.renderer.setMatrix4(this.program, name, transpose, matrix); - - return this; - } - -}); - -module.exports = WebGLPipeline; - - -/***/ }), -/* 150 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @author Felipe Alfonso <@bitnenfer> - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var Earcut = __webpack_require__(66); -var GetFastValue = __webpack_require__(2); -var ModelViewProjection = __webpack_require__(151); -var ProjectOrtho = __webpack_require__(181); -var ShaderSourceFS = __webpack_require__(790); -var ShaderSourceVS = __webpack_require__(791); -var TransformMatrix = __webpack_require__(30); -var Utils = __webpack_require__(10); -var WebGLPipeline = __webpack_require__(149); - -/** - * @classdesc - * TextureTintPipeline implements the rendering infrastructure - * for displaying textured objects - * The config properties are: - * - game: Current game instance. - * - renderer: Current WebGL renderer. - * - topology: This indicates how the primitives are rendered. The default value is GL_TRIANGLES. - * Here is the full list of rendering primitives (https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants). - * - vertShader: Source for vertex shader as a string. - * - fragShader: Source for fragment shader as a string. - * - vertexCapacity: The amount of vertices that shall be allocated - * - vertexSize: The size of a single vertex in bytes. - * - * @class TextureTintPipeline - * @extends Phaser.Renderer.WebGL.WebGLPipeline - * @memberof Phaser.Renderer.WebGL.Pipelines - * @constructor - * @since 3.0.0 - * - * @param {object} config - The configuration options for this Texture Tint Pipeline, as described above. - */ -var TextureTintPipeline = new Class({ - - Extends: WebGLPipeline, - - Mixins: [ - ModelViewProjection - ], - - initialize: - - function TextureTintPipeline (config) - { - var rendererConfig = config.renderer.config; - - var maxTextures = config.renderer.maxTextures; - - if (!config.fragShader) - { - var src = ''; - - for (var i = 0; i < maxTextures; i++) - { - if (i > 0) - { - src += '\n\telse '; - } - - if (i < maxTextures - 1) - { - src += 'if (outTexId < ' + i + '.5)'; - } - - src += '\n\t{'; - src += '\n\t\ttexture = texture2D(uMainSampler[' + i + '], outTexCoord);'; - src += '\n\t}'; - } - - var fragmentShaderSource = ShaderSourceFS.replace(/%count%/gi, maxTextures.toString()); - - fragmentShaderSource = fragmentShaderSource.replace(/%forloop%/gi, src); - } - else - { - fragmentShaderSource = config.fragShader; - } - - // Vertex Size = attribute size added together (2 + 2 + 1 + 4) - // Vertex Size = attribute size added together (2 + 2 + 1 + 1 + 4) inc maxTextures - - WebGLPipeline.call(this, { - game: config.game, - renderer: config.renderer, - gl: config.renderer.gl, - topology: GetFastValue(config, 'topology', config.renderer.gl.TRIANGLES), - vertShader: GetFastValue(config, 'vertShader', ShaderSourceVS), - fragShader: GetFastValue(config, 'fragShader', fragmentShaderSource), - vertexCapacity: GetFastValue(config, 'vertexCapacity', 6 * rendererConfig.batchSize), - vertexSize: GetFastValue(config, 'vertexSize', Float32Array.BYTES_PER_ELEMENT * 6 + Uint8Array.BYTES_PER_ELEMENT * 4), - attributes: [ - { - name: 'inPosition', - size: 2, - type: config.renderer.gl.FLOAT, - normalized: false, - offset: 0, - enabled: false, - location: -1 - }, - { - name: 'inTexCoord', - size: 2, - type: config.renderer.gl.FLOAT, - normalized: false, - offset: 4 * 2, - enabled: false, - location: -1 - }, - { - name: 'inTexId', - size: 1, - type: config.renderer.gl.FLOAT, - normalized: false, - offset: 4 * 4, - enabled: false, - location: -1 - }, - { - name: 'inTintEffect', - size: 1, - type: config.renderer.gl.FLOAT, - normalized: false, - offset: 4 * 5, - enabled: false, - location: -1 - }, - { - name: 'inTint', - size: 4, - type: config.renderer.gl.UNSIGNED_BYTE, - normalized: true, - offset: 4 * 6, - enabled: false, - location: -1 - } - ] - }); - - /** - * Float32 view of the array buffer containing the pipeline's vertices. - * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#vertexViewF32 - * @type {Float32Array} - * @since 3.0.0 - */ - this.vertexViewF32 = new Float32Array(this.vertexData); - - /** - * Uint32 view of the array buffer containing the pipeline's vertices. - * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#vertexViewU32 - * @type {Uint32Array} - * @since 3.0.0 - */ - this.vertexViewU32 = new Uint32Array(this.vertexData); - - /** - * A temporary Transform Matrix, re-used internally during batching. - * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#_tempMatrix1 - * @private - * @type {Phaser.GameObjects.Components.TransformMatrix} - * @since 3.11.0 - */ - this._tempMatrix1 = new TransformMatrix(); - - /** - * A temporary Transform Matrix, re-used internally during batching. - * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#_tempMatrix2 - * @private - * @type {Phaser.GameObjects.Components.TransformMatrix} - * @since 3.11.0 - */ - this._tempMatrix2 = new TransformMatrix(); - - /** - * A temporary Transform Matrix, re-used internally during batching. - * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#_tempMatrix3 - * @private - * @type {Phaser.GameObjects.Components.TransformMatrix} - * @since 3.11.0 - */ - this._tempMatrix3 = new TransformMatrix(); - - /** - * A temporary Transform Matrix, re-used internally during batching. - * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#_tempMatrix4 - * @private - * @type {Phaser.GameObjects.Components.TransformMatrix} - * @since 3.11.0 - */ - this._tempMatrix4 = new TransformMatrix(); - - /** - * Used internally to draw stroked triangles. - * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#tempTriangle - * @type {array} - * @private - * @since 3.12.0 - */ - 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 } - ]; - - /** - * The tint effect to be applied by the shader in the next geometry draw: - * - * 0 = texture multiplied by color - * 1 = solid color + texture alpha - * 2 = solid color, no texture - * 3 = solid texture, no color - * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#tintEffect - * @type {number} - * @private - * @since 3.12.0 - */ - this.tintEffect = 2; - - /** - * Cached stroke tint. - * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#strokeTint - * @type {object} - * @private - * @since 3.12.0 - */ - this.strokeTint = { TL: 0, TR: 0, BL: 0, BR: 0 }; - - /** - * Cached fill tint. - * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#fillTint - * @type {object} - * @private - * @since 3.12.0 - */ - this.fillTint = { TL: 0, TR: 0, BL: 0, BR: 0 }; - - /** - * Internal texture frame reference. - * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#currentFrame - * @type {Phaser.Textures.Frame} - * @private - * @since 3.12.0 - */ - this.currentFrame = { u0: 0, v0: 0, u1: 1, v1: 1 }; - - /** - * Internal path quad cache. - * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#firstQuad - * @type {array} - * @private - * @since 3.12.0 - */ - this.firstQuad = [ 0, 0, 0, 0, 0 ]; - - /** - * Internal path quad cache. - * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#prevQuad - * @type {array} - * @private - * @since 3.12.0 - */ - this.prevQuad = [ 0, 0, 0, 0, 0 ]; - - /** - * Used internally for triangulating a polygon. - * - * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#polygonCache - * @type {array} - * @private - * @since 3.12.0 - */ - this.polygonCache = []; - - this.mvpInit(); - }, - - /** - * Called every time the pipeline is bound by the renderer. - * Sets the shader program, vertex buffer and other resources. - * Should only be called when changing pipeline. - * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#bind - * @since 3.50.0 - * - * @return {this} This WebGLPipeline instance. - */ - bind: function () - { - WebGLPipeline.prototype.bind.call(this); - - this.renderer.setInt1iv(this.program, 'uMainSampler', this.renderer.textureIndexes); - - return this; - }, - - /** - * Called every time a Game Object needs to use this pipeline. - * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#onBind - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject} [gameObject] - The Game Object that invoked this pipeline, if any. - * - * @return {this} This WebGLPipeline instance. - */ - onBind: function () - { - this.mvpUpdate(); - - return this; - }, - - /** - * Resizes this pipeline and updates the projection. - * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#resize - * @since 3.0.0 - * - * @param {number} width - The new width. - * @param {number} height - The new height. - * @param {number} resolution - The resolution. - * - * @return {this} This WebGLPipeline instance. - */ - resize: function (width, height, resolution) - { - WebGLPipeline.prototype.resize.call(this, width, height, resolution); - - ProjectOrtho(this, 0, this.width, this.height, 0, -1000, 1000); - - return this; - }, - - /** - * Assigns a texture to the current batch. If a different texture is already set it creates a new batch object. - * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#setTexture2D - * @since 3.1.0 - * - * @param {WebGLTexture} [texture] - WebGLTexture that will be assigned to the current batch. If not given uses blankTexture. - * - * @return {number} The assigned texture unit. - */ - setTexture2D: function (texture) - { - if (texture === undefined) { texture = this.renderer.blankTexture.glTexture; } - - this.currentUnit = this.renderer.setTexture2D(texture); - - return this.currentUnit; - }, - - /** - * Uploads the vertex data and emits a draw call for the current batch of vertices. - * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#flush - * @since 3.0.0 - * - * @return {this} This WebGLPipeline instance. - */ - flush: function () - { - var gl = this.gl; - var vertexCount = this.vertexCount; - var vertexSize = this.vertexSize; - - if (vertexCount > 0) - { - if (vertexCount === this.vertexCapacity) - { - gl.bufferData(gl.ARRAY_BUFFER, this.vertexData, gl.DYNAMIC_DRAW); - } - else - { - gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize)); - } - - gl.drawArrays(this.topology, 0, vertexCount); - - this.vertexCount = 0; - } - - return this; - }, - - /** - * Takes a Sprite Game Object, or any object that extends it, and adds it to the batch. - * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchSprite - * @since 3.0.0 - * - * @param {(Phaser.GameObjects.Image|Phaser.GameObjects.Sprite)} sprite - The texture based Game Object to add to the batch. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to use for the rendering transform. - * @param {Phaser.GameObjects.Components.TransformMatrix} [parentTransformMatrix] - The transform matrix of the parent container, if set. - */ - batchSprite: function (sprite, camera, parentTransformMatrix) - { - // Will cause a flush if this isn't the current pipeline, vertexbuffer or program - this.renderer.setPipeline(this); - - var camMatrix = this._tempMatrix1; - var spriteMatrix = this._tempMatrix2; - var calcMatrix = this._tempMatrix3; - - var frame = sprite.frame; - var texture = frame.glTexture; - - var u0 = frame.u0; - var v0 = frame.v0; - var u1 = frame.u1; - var v1 = frame.v1; - var frameX = frame.x; - var frameY = frame.y; - var frameWidth = frame.cutWidth; - var frameHeight = frame.cutHeight; - var customPivot = frame.customPivot; - - var displayOriginX = sprite.displayOriginX; - var displayOriginY = sprite.displayOriginY; - - var x = -displayOriginX + frameX; - var y = -displayOriginY + frameY; - - if (sprite.isCropped) - { - var crop = sprite._crop; - - if (crop.flipX !== sprite.flipX || crop.flipY !== sprite.flipY) - { - frame.updateCropUVs(crop, sprite.flipX, sprite.flipY); - } - - u0 = crop.u0; - v0 = crop.v0; - u1 = crop.u1; - v1 = crop.v1; - - frameWidth = crop.width; - frameHeight = crop.height; - - frameX = crop.x; - frameY = crop.y; - - x = -displayOriginX + frameX; - y = -displayOriginY + frameY; - } - - var flipX = 1; - var flipY = 1; - - if (sprite.flipX) - { - if (!customPivot) - { - x += (-frame.realWidth + (displayOriginX * 2)); - } - - flipX = -1; - } - - // Auto-invert the flipY if this is coming from a GLTexture - if (sprite.flipY || (frame.source.isGLTexture && !texture.flipY)) - { - if (!customPivot) - { - y += (-frame.realHeight + (displayOriginY * 2)); - } - - flipY = -1; - } - - spriteMatrix.applyITRS(sprite.x, sprite.y, sprite.rotation, sprite.scaleX * flipX, sprite.scaleY * flipY); - - camMatrix.copyFrom(camera.matrix); - - if (parentTransformMatrix) - { - // Multiply the camera by the parent matrix - camMatrix.multiplyWithOffset(parentTransformMatrix, -camera.scrollX * sprite.scrollFactorX, -camera.scrollY * sprite.scrollFactorY); - - // Undo the camera scroll - spriteMatrix.e = sprite.x; - spriteMatrix.f = sprite.y; - - // Multiply by the Sprite matrix, store result in calcMatrix - camMatrix.multiply(spriteMatrix, calcMatrix); - } - else - { - spriteMatrix.e -= camera.scrollX * sprite.scrollFactorX; - spriteMatrix.f -= camera.scrollY * sprite.scrollFactorY; - - // Multiply by the Sprite matrix, store result in calcMatrix - camMatrix.multiply(spriteMatrix, calcMatrix); - } - - var xw = x + frameWidth; - var yh = y + frameHeight; - - var tx0 = calcMatrix.getX(x, y); - var ty0 = calcMatrix.getY(x, y); - - var tx1 = calcMatrix.getX(x, yh); - var ty1 = calcMatrix.getY(x, yh); - - var tx2 = calcMatrix.getX(xw, yh); - var ty2 = calcMatrix.getY(xw, yh); - - var tx3 = calcMatrix.getX(xw, y); - var ty3 = calcMatrix.getY(xw, y); - - var tintTL = Utils.getTintAppendFloatAlpha(sprite._tintTL, camera.alpha * sprite._alphaTL); - var tintTR = Utils.getTintAppendFloatAlpha(sprite._tintTR, camera.alpha * sprite._alphaTR); - var tintBL = Utils.getTintAppendFloatAlpha(sprite._tintBL, camera.alpha * sprite._alphaBL); - var tintBR = Utils.getTintAppendFloatAlpha(sprite._tintBR, camera.alpha * sprite._alphaBR); - - if (camera.roundPixels) - { - tx0 = Math.round(tx0); - ty0 = Math.round(ty0); - - tx1 = Math.round(tx1); - ty1 = Math.round(ty1); - - tx2 = Math.round(tx2); - ty2 = Math.round(ty2); - - tx3 = Math.round(tx3); - ty3 = Math.round(ty3); - } - - // So batchQuad never assigns a unit to the glTexture, but to the textureSource instead - if (this.vertexCount + 6 > this.vertexCapacity) - { - this.flush(); - } - - var unit = this.setGameObject(sprite); - - var tintEffect = (sprite._isTinted && sprite.tintFill); - - this.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, unit); - }, - - /** - * Adds the vertices data into the batch and flushes if full. - * - * Assumes 6 vertices in the following arrangement: - * - * ``` - * 0----3 - * |\ B| - * | \ | - * | \ | - * | A \| - * | \ - * 1----2 - * ``` - * - * Where tx0/ty0 = 0, tx1/ty1 = 1, tx2/ty2 = 2 and tx3/ty3 = 3 - * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchQuad - * @since 3.12.0 - * - * @param {number} x0 - The top-left x position. - * @param {number} y0 - The top-left y position. - * @param {number} x1 - The bottom-left x position. - * @param {number} y1 - The bottom-left y position. - * @param {number} x2 - The bottom-right x position. - * @param {number} y2 - The bottom-right y position. - * @param {number} x3 - The top-right x position. - * @param {number} y3 - The top-right y position. - * @param {number} u0 - UV u0 value. - * @param {number} v0 - UV v0 value. - * @param {number} u1 - UV u1 value. - * @param {number} v1 - UV v1 value. - * @param {number} tintTL - The top-left tint color value. - * @param {number} tintTR - The top-right tint color value. - * @param {number} tintBL - The bottom-left tint color value. - * @param {number} tintBR - The bottom-right tint color value. - * @param {(number|boolean)} tintEffect - The tint effect for the shader to use. - * @param {WebGLTexture} [texture] - WebGLTexture that will be assigned to the current batch if a flush occurs. - * @param {integer} [unit=0] - Texture unit to which the texture needs to be bound. - * - * @return {boolean} `true` if this method caused the batch to flush, otherwise `false`. - */ - batchQuad: function (x0, y0, x1, y1, x2, y2, x3, y3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, unit) - { - if (unit === undefined) { unit = this.currentUnit; } - - var hasFlushed = false; - - if (this.vertexCount + 6 > this.vertexCapacity) - { - this.flush(); - - hasFlushed = true; - - unit = this.setTexture2D(texture); - } - - var vertexViewF32 = this.vertexViewF32; - var vertexViewU32 = this.vertexViewU32; - - var vertexOffset = (this.vertexCount * this.vertexComponentCount) - 1; - - vertexViewF32[++vertexOffset] = x0; - vertexViewF32[++vertexOffset] = y0; - vertexViewF32[++vertexOffset] = u0; - vertexViewF32[++vertexOffset] = v0; - vertexViewF32[++vertexOffset] = unit; - vertexViewF32[++vertexOffset] = tintEffect; - vertexViewU32[++vertexOffset] = tintTL; - - vertexViewF32[++vertexOffset] = x1; - vertexViewF32[++vertexOffset] = y1; - vertexViewF32[++vertexOffset] = u0; - vertexViewF32[++vertexOffset] = v1; - vertexViewF32[++vertexOffset] = unit; - vertexViewF32[++vertexOffset] = tintEffect; - vertexViewU32[++vertexOffset] = tintBL; - - vertexViewF32[++vertexOffset] = x2; - vertexViewF32[++vertexOffset] = y2; - vertexViewF32[++vertexOffset] = u1; - vertexViewF32[++vertexOffset] = v1; - vertexViewF32[++vertexOffset] = unit; - vertexViewF32[++vertexOffset] = tintEffect; - vertexViewU32[++vertexOffset] = tintBR; - - vertexViewF32[++vertexOffset] = x0; - vertexViewF32[++vertexOffset] = y0; - vertexViewF32[++vertexOffset] = u0; - vertexViewF32[++vertexOffset] = v0; - vertexViewF32[++vertexOffset] = unit; - vertexViewF32[++vertexOffset] = tintEffect; - vertexViewU32[++vertexOffset] = tintTL; - - vertexViewF32[++vertexOffset] = x2; - vertexViewF32[++vertexOffset] = y2; - vertexViewF32[++vertexOffset] = u1; - vertexViewF32[++vertexOffset] = v1; - vertexViewF32[++vertexOffset] = unit; - vertexViewF32[++vertexOffset] = tintEffect; - vertexViewU32[++vertexOffset] = tintBR; - - vertexViewF32[++vertexOffset] = x3; - vertexViewF32[++vertexOffset] = y3; - vertexViewF32[++vertexOffset] = u1; - vertexViewF32[++vertexOffset] = v0; - vertexViewF32[++vertexOffset] = unit; - vertexViewF32[++vertexOffset] = tintEffect; - vertexViewU32[++vertexOffset] = tintTR; - - this.vertexCount += 6; - - return hasFlushed; - }, - - /** - * Adds the vertices data into the batch and flushes if full. - * - * Assumes 3 vertices in the following arrangement: - * - * ``` - * 0 - * |\ - * | \ - * | \ - * | \ - * | \ - * 1-----2 - * ``` - * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchTri - * @since 3.12.0 - * - * @param {number} x1 - The bottom-left x position. - * @param {number} y1 - The bottom-left y position. - * @param {number} x2 - The bottom-right x position. - * @param {number} y2 - The bottom-right y position. - * @param {number} x3 - The top-right x position. - * @param {number} y3 - The top-right y position. - * @param {number} u0 - UV u0 value. - * @param {number} v0 - UV v0 value. - * @param {number} u1 - UV u1 value. - * @param {number} v1 - UV v1 value. - * @param {number} tintTL - The top-left tint color value. - * @param {number} tintTR - The top-right tint color value. - * @param {number} tintBL - The bottom-left tint color value. - * @param {(number|boolean)} tintEffect - The tint effect for the shader to use. - * @param {WebGLTexture} [texture] - WebGLTexture that will be assigned to the current batch if a flush occurs. - * @param {integer} [unit=0] - Texture unit to which the texture needs to be bound. - * - * @return {boolean} `true` if this method caused the batch to flush, otherwise `false`. - */ - batchTri: function (x1, y1, x2, y2, x3, y3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintEffect, texture, unit) - { - if (unit === undefined) { unit = this.currentUnit; } - - var hasFlushed = false; - - if (this.vertexCount + 3 > this.vertexCapacity) - { - this.flush(); - - hasFlushed = true; - - unit = this.setTexture2D(texture); - } - - var vertexViewF32 = this.vertexViewF32; - var vertexViewU32 = this.vertexViewU32; - - var vertexOffset = (this.vertexCount * this.vertexComponentCount) - 1; - - vertexViewF32[++vertexOffset] = x1; - vertexViewF32[++vertexOffset] = y1; - vertexViewF32[++vertexOffset] = u0; - vertexViewF32[++vertexOffset] = v0; - vertexViewF32[++vertexOffset] = unit; - vertexViewF32[++vertexOffset] = tintEffect; - vertexViewU32[++vertexOffset] = tintTL; - - vertexViewF32[++vertexOffset] = x2; - vertexViewF32[++vertexOffset] = y2; - vertexViewF32[++vertexOffset] = u0; - vertexViewF32[++vertexOffset] = v1; - vertexViewF32[++vertexOffset] = unit; - vertexViewF32[++vertexOffset] = tintEffect; - vertexViewU32[++vertexOffset] = tintTR; - - vertexViewF32[++vertexOffset] = x3; - vertexViewF32[++vertexOffset] = y3; - vertexViewF32[++vertexOffset] = u1; - vertexViewF32[++vertexOffset] = v1; - vertexViewF32[++vertexOffset] = unit; - vertexViewF32[++vertexOffset] = tintEffect; - vertexViewU32[++vertexOffset] = tintBL; - - this.vertexCount += 3; - - return hasFlushed; - }, - - /** - * Generic function for batching a textured quad using argument values instead of a Game Object. - * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchTexture - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject} gameObject - Source GameObject. - * @param {WebGLTexture} texture - Raw WebGLTexture associated with the quad. - * @param {integer} textureWidth - Real texture width. - * @param {integer} textureHeight - Real texture height. - * @param {number} srcX - X coordinate of the quad. - * @param {number} srcY - Y coordinate of the quad. - * @param {number} srcWidth - Width of the quad. - * @param {number} srcHeight - Height of the quad. - * @param {number} scaleX - X component of scale. - * @param {number} scaleY - Y component of scale. - * @param {number} rotation - Rotation of the quad. - * @param {boolean} flipX - Indicates if the quad is horizontally flipped. - * @param {boolean} flipY - Indicates if the quad is vertically flipped. - * @param {number} scrollFactorX - By which factor is the quad affected by the camera horizontal scroll. - * @param {number} scrollFactorY - By which factor is the quad effected by the camera vertical scroll. - * @param {number} displayOriginX - Horizontal origin in pixels. - * @param {number} displayOriginY - Vertical origin in pixels. - * @param {number} frameX - X coordinate of the texture frame. - * @param {number} frameY - Y coordinate of the texture frame. - * @param {number} frameWidth - Width of the texture frame. - * @param {number} frameHeight - Height of the texture frame. - * @param {integer} tintTL - Tint for top left. - * @param {integer} tintTR - Tint for top right. - * @param {integer} tintBL - Tint for bottom left. - * @param {integer} tintBR - Tint for bottom right. - * @param {number} tintEffect - The tint effect. - * @param {number} uOffset - Horizontal offset on texture coordinate. - * @param {number} vOffset - Vertical offset on texture coordinate. - * @param {Phaser.Cameras.Scene2D.Camera} camera - Current used camera. - * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - Parent container. - * @param {boolean} [skipFlip=false] - Skip the renderTexture check. - * @param {number} [textureUnit] - Use the currently bound texture unit? - */ - batchTexture: function ( - gameObject, - texture, - textureWidth, textureHeight, - srcX, srcY, - srcWidth, srcHeight, - scaleX, scaleY, - rotation, - flipX, flipY, - scrollFactorX, scrollFactorY, - displayOriginX, displayOriginY, - frameX, frameY, frameWidth, frameHeight, - tintTL, tintTR, tintBL, tintBR, tintEffect, - uOffset, vOffset, - camera, - parentTransformMatrix, - skipFlip, - textureUnit) - { - var renderer = this.renderer; - - renderer.setPipeline(this, gameObject); - - var camMatrix = this._tempMatrix1; - var spriteMatrix = this._tempMatrix2; - var calcMatrix = this._tempMatrix3; - - var u0 = (frameX / textureWidth) + uOffset; - var v0 = (frameY / textureHeight) + vOffset; - var u1 = (frameX + frameWidth) / textureWidth + uOffset; - var v1 = (frameY + frameHeight) / textureHeight + vOffset; - - var width = srcWidth; - var height = srcHeight; - - var x = -displayOriginX; - var y = -displayOriginY; - - if (gameObject.isCropped) - { - var crop = gameObject._crop; - - width = crop.width; - height = crop.height; - - srcWidth = crop.width; - srcHeight = crop.height; - - frameX = crop.x; - frameY = crop.y; - - var ox = frameX; - var oy = frameY; - - if (flipX) - { - ox = (frameWidth - crop.x - crop.width); - } - - if (flipY && !texture.isRenderTexture) - { - oy = (frameHeight - crop.y - crop.height); - } - - u0 = (ox / textureWidth) + uOffset; - v0 = (oy / textureHeight) + vOffset; - u1 = (ox + crop.width) / textureWidth + uOffset; - v1 = (oy + crop.height) / textureHeight + vOffset; - - x = -displayOriginX + frameX; - y = -displayOriginY + frameY; - } - - // Invert the flipY if this is a RenderTexture - flipY = flipY ^ (!skipFlip && texture.isRenderTexture ? 1 : 0); - - if (flipX) - { - width *= -1; - x += srcWidth; - } - - if (flipY) - { - height *= -1; - y += srcHeight; - } - - var xw = x + width; - var yh = y + height; - - spriteMatrix.applyITRS(srcX, srcY, rotation, scaleX, scaleY); - - camMatrix.copyFrom(camera.matrix); - - if (parentTransformMatrix) - { - // Multiply the camera by the parent matrix - camMatrix.multiplyWithOffset(parentTransformMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY); - - // Undo the camera scroll - spriteMatrix.e = srcX; - spriteMatrix.f = srcY; - - // Multiply by the Sprite matrix, store result in calcMatrix - camMatrix.multiply(spriteMatrix, calcMatrix); - } - else - { - spriteMatrix.e -= camera.scrollX * scrollFactorX; - spriteMatrix.f -= camera.scrollY * scrollFactorY; - - // Multiply by the Sprite matrix, store result in calcMatrix - camMatrix.multiply(spriteMatrix, calcMatrix); - } - - var tx0 = calcMatrix.getX(x, y); - var ty0 = calcMatrix.getY(x, y); - - var tx1 = calcMatrix.getX(x, yh); - var ty1 = calcMatrix.getY(x, yh); - - var tx2 = calcMatrix.getX(xw, yh); - var ty2 = calcMatrix.getY(xw, yh); - - var tx3 = calcMatrix.getX(xw, y); - var ty3 = calcMatrix.getY(xw, y); - - if (camera.roundPixels) - { - tx0 = Math.round(tx0); - ty0 = Math.round(ty0); - - tx1 = Math.round(tx1); - ty1 = Math.round(ty1); - - tx2 = Math.round(tx2); - ty2 = Math.round(ty2); - - tx3 = Math.round(tx3); - ty3 = Math.round(ty3); - } - - if (textureUnit === undefined) - { - textureUnit = this.renderer.setTexture2D(texture); - } - - this.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, textureUnit); - }, - - /** - * Adds a Texture Frame into the batch for rendering. - * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchTextureFrame - * @since 3.12.0 - * - * @param {Phaser.Textures.Frame} frame - The Texture Frame to be rendered. - * @param {number} x - The horizontal position to render the texture at. - * @param {number} y - The vertical position to render the texture at. - * @param {number} tint - The tint color. - * @param {number} alpha - The alpha value. - * @param {Phaser.GameObjects.Components.TransformMatrix} transformMatrix - The Transform Matrix to use for the texture. - * @param {Phaser.GameObjects.Components.TransformMatrix} [parentTransformMatrix] - A parent Transform Matrix. - */ - batchTextureFrame: function ( - frame, - x, y, - tint, alpha, - transformMatrix, - parentTransformMatrix - ) - { - this.renderer.setPipeline(this); - - var spriteMatrix = this._tempMatrix1.copyFrom(transformMatrix); - var calcMatrix = this._tempMatrix2; - - var xw = x + frame.width; - var yh = y + frame.height; - - if (parentTransformMatrix) - { - spriteMatrix.multiply(parentTransformMatrix, calcMatrix); - } - else - { - calcMatrix = spriteMatrix; - } - - var tx0 = calcMatrix.getX(x, y); - var ty0 = calcMatrix.getY(x, y); - - var tx1 = calcMatrix.getX(x, yh); - var ty1 = calcMatrix.getY(x, yh); - - var tx2 = calcMatrix.getX(xw, yh); - var ty2 = calcMatrix.getY(xw, yh); - - var tx3 = calcMatrix.getX(xw, y); - var ty3 = calcMatrix.getY(xw, y); - - // this.setTexture2D(frame.glTexture, 0); - var unit = this.renderer.setTextureSource(frame.source); - - tint = Utils.getTintAppendFloatAlpha(tint, alpha); - - this.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, frame.u0, frame.v0, frame.u1, frame.v1, tint, tint, tint, tint, 0, frame.glTexture, unit); - }, - - /** - * Pushes a filled rectangle into the vertex batch. - * - * The dimensions are run through `Math.floor` before the quad is generated. - * - * Rectangle has no transform values and isn't transformed into the local space. - * - * Used for directly batching untransformed rectangles, such as Camera background colors. - * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#drawFillRect - * @since 3.12.0 - * - * @param {number} x - Horizontal top left coordinate of the rectangle. - * @param {number} y - Vertical top left coordinate of the rectangle. - * @param {number} width - Width of the rectangle. - * @param {number} height - Height of the rectangle. - * @param {number} color - Color of the rectangle to draw. - * @param {number} alpha - Alpha value of the rectangle to draw. - */ - drawFillRect: function (x, y, width, height, color, alpha) - { - x = Math.floor(x); - y = Math.floor(y); - - var xw = Math.floor(x + width); - var yh = Math.floor(y + height); - - var blank = this.renderer.blankTexture.glTexture; - - var unit = this.renderer.setTexture2D(blank); - - var tint = Utils.getTintAppendFloatAlphaAndSwap(color, alpha); - - this.batchQuad(x, y, x, yh, xw, yh, xw, y, 0, 0, 1, 1, tint, tint, tint, tint, 2, blank, unit); - }, - - /** - * Pushes a filled rectangle into the vertex batch. - * Rectangle factors in the given transform matrices before adding to the batch. - * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchFillRect - * @since 3.12.0 - * - * @param {number} x - Horizontal top left coordinate of the rectangle. - * @param {number} y - Vertical top left coordinate of the rectangle. - * @param {number} width - Width of the rectangle. - * @param {number} height - Height of the rectangle. - * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform. - * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform. - */ - batchFillRect: function (x, y, width, height, currentMatrix, parentMatrix) - { - this.renderer.setPipeline(this); - - var calcMatrix = this._tempMatrix3; - - // Multiply and store result in calcMatrix, only if the parentMatrix is set, otherwise we'll use whatever values are already in the calcMatrix - if (parentMatrix) - { - parentMatrix.multiply(currentMatrix, calcMatrix); - } - - var xw = x + width; - var yh = y + height; - - var x0 = calcMatrix.getX(x, y); - var y0 = calcMatrix.getY(x, y); - - var x1 = calcMatrix.getX(x, yh); - var y1 = calcMatrix.getY(x, yh); - - var x2 = calcMatrix.getX(xw, yh); - var y2 = calcMatrix.getY(xw, yh); - - var x3 = calcMatrix.getX(xw, y); - var y3 = calcMatrix.getY(xw, y); - - var frame = this.currentFrame; - - var u0 = frame.u0; - var v0 = frame.v0; - var u1 = frame.u1; - var v1 = frame.v1; - - var tint = this.fillTint; - - this.batchQuad(x0, y0, x1, y1, x2, y2, x3, y3, u0, v0, u1, v1, tint.TL, tint.TR, tint.BL, tint.BR, this.tintEffect); - }, - - /** - * Pushes a filled triangle into the vertex batch. - * Triangle factors in the given transform matrices before adding to the batch. - * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchFillTriangle - * @since 3.12.0 - * - * @param {number} x0 - Point 0 x coordinate. - * @param {number} y0 - Point 0 y coordinate. - * @param {number} x1 - Point 1 x coordinate. - * @param {number} y1 - Point 1 y coordinate. - * @param {number} x2 - Point 2 x coordinate. - * @param {number} y2 - Point 2 y coordinate. - * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform. - * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform. - */ - batchFillTriangle: function (x0, y0, x1, y1, x2, y2, currentMatrix, parentMatrix) - { - this.renderer.setPipeline(this); - - var calcMatrix = this._tempMatrix3; - - // Multiply and store result in calcMatrix, only if the parentMatrix is set, otherwise we'll use whatever values are already in the calcMatrix - if (parentMatrix) - { - parentMatrix.multiply(currentMatrix, calcMatrix); - } - - var tx0 = calcMatrix.getX(x0, y0); - var ty0 = calcMatrix.getY(x0, y0); - - var tx1 = calcMatrix.getX(x1, y1); - var ty1 = calcMatrix.getY(x1, y1); - - var tx2 = calcMatrix.getX(x2, y2); - var ty2 = calcMatrix.getY(x2, y2); - - var frame = this.currentFrame; - - var u0 = frame.u0; - var v0 = frame.v0; - var u1 = frame.u1; - var v1 = frame.v1; - - this.batchTri(tx0, ty0, tx1, ty1, tx2, ty2, u0, v0, u1, v1, this.fillTint.TL, this.fillTint.TR, this.fillTint.BL, this.tintEffect); - }, - - /** - * Pushes a stroked triangle into the vertex batch. - * Triangle factors in the given transform matrices before adding to the batch. - * The triangle is created from 3 lines and drawn using the `batchStrokePath` method. - * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchStrokeTriangle - * @since 3.12.0 - * - * @param {number} x0 - Point 0 x coordinate. - * @param {number} y0 - Point 0 y coordinate. - * @param {number} x1 - Point 1 x coordinate. - * @param {number} y1 - Point 1 y coordinate. - * @param {number} x2 - Point 2 x coordinate. - * @param {number} y2 - Point 2 y coordinate. - * @param {number} lineWidth - The width of the line in pixels. - * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform. - * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform. - */ - batchStrokeTriangle: function (x0, y0, x1, y1, x2, y2, lineWidth, currentMatrix, parentMatrix) - { - var tempTriangle = this.tempTriangle; - - tempTriangle[0].x = x0; - tempTriangle[0].y = y0; - tempTriangle[0].width = lineWidth; - - tempTriangle[1].x = x1; - tempTriangle[1].y = y1; - tempTriangle[1].width = lineWidth; - - tempTriangle[2].x = x2; - tempTriangle[2].y = y2; - tempTriangle[2].width = lineWidth; - - tempTriangle[3].x = x0; - tempTriangle[3].y = y0; - tempTriangle[3].width = lineWidth; - - this.batchStrokePath(tempTriangle, lineWidth, false, currentMatrix, parentMatrix); - }, - - /** - * Adds the given path to the vertex batch for rendering. - * - * It works by taking the array of path data and then passing it through Earcut, which - * creates a list of polygons. Each polygon is then added to the batch. - * - * The path is always automatically closed because it's filled. - * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchFillPath - * @since 3.12.0 - * - * @param {array} path - Collection of points that represent the path. - * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform. - * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform. - */ - batchFillPath: function (path, currentMatrix, parentMatrix) - { - this.renderer.setPipeline(this); - - var calcMatrix = this._tempMatrix3; - - // Multiply and store result in calcMatrix, only if the parentMatrix is set, otherwise we'll use whatever values are already in the calcMatrix - if (parentMatrix) - { - parentMatrix.multiply(currentMatrix, calcMatrix); - } - - var length = path.length; - var polygonCache = this.polygonCache; - var polygonIndexArray; - var point; - - var tintTL = this.fillTint.TL; - var tintTR = this.fillTint.TR; - var tintBL = this.fillTint.BL; - var tintEffect = this.tintEffect; - - for (var pathIndex = 0; pathIndex < length; ++pathIndex) - { - point = path[pathIndex]; - polygonCache.push(point.x, point.y); - } - - polygonIndexArray = Earcut(polygonCache); - length = polygonIndexArray.length; - - var frame = this.currentFrame; - - for (var index = 0; index < length; index += 3) - { - var p0 = polygonIndexArray[index + 0] * 2; - var p1 = polygonIndexArray[index + 1] * 2; - var p2 = polygonIndexArray[index + 2] * 2; - - var x0 = polygonCache[p0 + 0]; - var y0 = polygonCache[p0 + 1]; - var x1 = polygonCache[p1 + 0]; - var y1 = polygonCache[p1 + 1]; - var x2 = polygonCache[p2 + 0]; - var y2 = polygonCache[p2 + 1]; - - var tx0 = calcMatrix.getX(x0, y0); - var ty0 = calcMatrix.getY(x0, y0); - - var tx1 = calcMatrix.getX(x1, y1); - var ty1 = calcMatrix.getY(x1, y1); - - var tx2 = calcMatrix.getX(x2, y2); - var ty2 = calcMatrix.getY(x2, y2); - - var u0 = frame.u0; - var v0 = frame.v0; - var u1 = frame.u1; - var v1 = frame.v1; - - this.batchTri(tx0, ty0, tx1, ty1, tx2, ty2, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintEffect); - } - - polygonCache.length = 0; - }, - - /** - * Adds the given path to the vertex batch for rendering. - * - * It works by taking the array of path data and calling `batchLine` for each section - * of the path. - * - * The path is optionally closed at the end. - * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchStrokePath - * @since 3.12.0 - * - * @param {array} path - Collection of points that represent the path. - * @param {number} lineWidth - The width of the line segments in pixels. - * @param {boolean} pathOpen - Indicates if the path should be closed or left open. - * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform. - * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform. - */ - batchStrokePath: function (path, lineWidth, pathOpen, currentMatrix, parentMatrix) - { - this.renderer.setPipeline(this); - - // Reset the closePath booleans - this.prevQuad[4] = 0; - this.firstQuad[4] = 0; - - var pathLength = path.length - 1; - - for (var pathIndex = 0; pathIndex < pathLength; pathIndex++) - { - var point0 = path[pathIndex]; - var point1 = path[pathIndex + 1]; - - this.batchLine( - point0.x, - point0.y, - point1.x, - point1.y, - point0.width / 2, - point1.width / 2, - lineWidth, - pathIndex, - !pathOpen && (pathIndex === pathLength - 1), - currentMatrix, - parentMatrix - ); - } - }, - - /** - * Creates a line out of 4 quads and adds it to the vertex batch based on the given line values. - * Assumes a texture has already been set, prior to calling this function. - * - * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchLine - * @since 3.12.0 - * - * @param {number} ax - X coordinate to the start of the line - * @param {number} ay - Y coordinate to the start of the line - * @param {number} bx - X coordinate to the end of the line - * @param {number} by - Y coordinate to the end of the line - * @param {number} aLineWidth - Width of the start of the line - * @param {number} bLineWidth - Width of the end of the line - * @param {Float32Array} currentMatrix - Parent matrix, generally used by containers - */ - batchLine: function (ax, ay, bx, by, aLineWidth, bLineWidth, lineWidth, index, closePath, currentMatrix, parentMatrix) - { - this.renderer.setPipeline(this); - - var calcMatrix = this._tempMatrix3; - - // Multiply and store result in calcMatrix, only if the parentMatrix is set, otherwise we'll use whatever values are already in the calcMatrix - if (parentMatrix) - { - parentMatrix.multiply(currentMatrix, calcMatrix); - } - - var dx = bx - ax; - var dy = by - ay; - - var len = Math.sqrt(dx * dx + dy * dy); - var al0 = aLineWidth * (by - ay) / len; - var al1 = aLineWidth * (ax - bx) / len; - var bl0 = bLineWidth * (by - ay) / len; - var bl1 = bLineWidth * (ax - bx) / len; - - var lx0 = bx - bl0; - var ly0 = by - bl1; - var lx1 = ax - al0; - var ly1 = ay - al1; - var lx2 = bx + bl0; - var ly2 = by + bl1; - var lx3 = ax + al0; - var ly3 = ay + al1; - - // tx0 = bottom right - var brX = calcMatrix.getX(lx0, ly0); - var brY = calcMatrix.getY(lx0, ly0); - - // tx1 = bottom left - var blX = calcMatrix.getX(lx1, ly1); - var blY = calcMatrix.getY(lx1, ly1); - - // tx2 = top right - var trX = calcMatrix.getX(lx2, ly2); - var trY = calcMatrix.getY(lx2, ly2); - - // tx3 = top left - var tlX = calcMatrix.getX(lx3, ly3); - var tlY = calcMatrix.getY(lx3, ly3); - - var tint = this.strokeTint; - var tintEffect = this.tintEffect; - - var tintTL = tint.TL; - var tintTR = tint.TR; - var tintBL = tint.BL; - var tintBR = tint.BR; - - var frame = this.currentFrame; - - var u0 = frame.u0; - var v0 = frame.v0; - var u1 = frame.u1; - var v1 = frame.v1; - - // TL, BL, BR, TR - this.batchQuad(tlX, tlY, blX, blY, brX, brY, trX, trY, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect); - - if (lineWidth <= 2) - { - // No point doing a linejoin if the line isn't thick enough - return; - } - - var prev = this.prevQuad; - var first = this.firstQuad; - - if (index > 0 && prev[4]) - { - this.batchQuad(tlX, tlY, blX, blY, prev[0], prev[1], prev[2], prev[3], u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect); - } - else - { - first[0] = tlX; - first[1] = tlY; - first[2] = blX; - first[3] = blY; - first[4] = 1; - } - - if (closePath && first[4]) - { - // Add a join for the final path segment - this.batchQuad(brX, brY, trX, trY, first[0], first[1], first[2], first[3], u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect); - } - else - { - // Store it - - prev[0] = brX; - prev[1] = brY; - prev[2] = trX; - prev[3] = trY; - prev[4] = 1; - } - } - -}); - -module.exports = TextureTintPipeline; - - -/***/ }), -/* 151 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Implements a model view projection matrices. - * Pipelines can implement this for doing 2D and 3D rendering. - * - * @namespace Phaser.Renderer.WebGL.Pipelines.ModelViewProjection - * @since 3.0.0 - */ -var ModelViewProjection = { - - /** - * Dirty flag for checking if model matrix needs to be updated on GPU. - * - * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelMatrixDirty - * @type {boolean} - * @since 3.0.0 - */ - modelMatrixDirty: false, - - /** - * Dirty flag for checking if view matrix needs to be updated on GPU. - * - * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewMatrixDirty - * @type {boolean} - * @since 3.0.0 - */ - viewMatrixDirty: false, - - /** - * Dirty flag for checking if projection matrix needs to be updated on GPU. - * - * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projectionMatrixDirty - * @type {boolean} - * @since 3.0.0 - */ - projectionMatrixDirty: false, - - /** - * Model matrix - * - * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelMatrix - * @type {?Float32Array} - * @since 3.0.0 - */ - modelMatrix: null, - - /** - * View matrix - * - * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewMatrix - * @type {?Float32Array} - * @since 3.0.0 - */ - viewMatrix: null, - - /** - * Projection matrix - * - * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projectionMatrix - * @type {?Float32Array} - * @since 3.0.0 - */ - projectionMatrix: null, - - /** - * Initializes MVP matrices with an identity matrix - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#mvpInit - * @since 3.0.0 - */ - mvpInit: function () - { - this.modelMatrixDirty = true; - this.viewMatrixDirty = true; - this.projectionMatrixDirty = true; - - this.modelMatrix = new Float32Array([ - 1, 0, 0, 0, - 0, 1, 0, 0, - 0, 0, 1, 0, - 0, 0, 0, 1 - ]); - - 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 - ]); - - return this; - }, - - /** - * If dirty flags are set then the matrices are uploaded to the GPU. - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#mvpUpdate - * @since 3.0.0 - */ - mvpUpdate: function () - { - var program = this.program; - - if (this.modelMatrixDirty) - { - this.renderer.setMatrix4(program, 'uModelMatrix', false, this.modelMatrix); - this.modelMatrixDirty = false; - } - - if (this.viewMatrixDirty) - { - this.renderer.setMatrix4(program, 'uViewMatrix', false, this.viewMatrix); - this.viewMatrixDirty = false; - } - - if (this.projectionMatrixDirty) - { - this.renderer.setMatrix4(program, 'uProjectionMatrix', false, this.projectionMatrix); - this.projectionMatrixDirty = false; - } - - return this; - } -}; - -module.exports = ModelViewProjection; - - -/***/ }), -/* 152 */ +/* 153 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34821,7 +35437,7 @@ var Composite = {}; module.exports = Composite; var Events = __webpack_require__(244); -var Common = __webpack_require__(42); +var Common = __webpack_require__(43); var Bounds = __webpack_require__(101); var Body = __webpack_require__(62); @@ -35496,7 +36112,7 @@ var Body = __webpack_require__(62); /***/ }), -/* 153 */ +/* 154 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35535,7 +36151,7 @@ module.exports = CircumferencePoint; /***/ }), -/* 154 */ +/* 155 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35579,7 +36195,7 @@ module.exports = Random; /***/ }), -/* 155 */ +/* 156 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35591,7 +36207,7 @@ module.exports = Random; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(112); +var Events = __webpack_require__(115); var FindClosestInSorted = __webpack_require__(274); var Frame = __webpack_require__(275); var GetValue = __webpack_require__(6); @@ -36543,7 +37159,7 @@ module.exports = Animation; /***/ }), -/* 156 */ +/* 157 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36552,7 +37168,7 @@ module.exports = Animation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Perimeter = __webpack_require__(113); +var Perimeter = __webpack_require__(116); var Point = __webpack_require__(4); /** @@ -36624,7 +37240,7 @@ module.exports = GetPoint; /***/ }), -/* 157 */ +/* 158 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36689,7 +37305,7 @@ module.exports = GetPoints; /***/ }), -/* 158 */ +/* 159 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36729,7 +37345,7 @@ module.exports = Random; /***/ }), -/* 159 */ +/* 160 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36767,7 +37383,7 @@ module.exports = Random; /***/ }), -/* 160 */ +/* 161 */ /***/ (function(module, exports) { /** @@ -36810,19 +37426,20 @@ var Pipeline = { /** * Sets the initial WebGL Pipeline of this Game Object. + * * This should only be called during the instantiation of the Game Object. * * @method Phaser.GameObjects.Components.Pipeline#initPipeline * @webglOnly * @since 3.0.0 * - * @param {string} [pipelineName=TextureTintPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Texture Tint Pipeline. + * @param {string} [pipelineName=MultiPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Multi Pipeline. * * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. */ initPipeline: function (pipelineName) { - if (pipelineName === undefined) { pipelineName = 'TextureTintPipeline'; } + if (pipelineName === undefined) { pipelineName = 'MultiPipeline'; } var renderer = this.scene.sys.game.renderer; @@ -36896,7 +37513,7 @@ module.exports = Pipeline; /***/ }), -/* 161 */ +/* 162 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36951,7 +37568,7 @@ module.exports = TransformXY; /***/ }), -/* 162 */ +/* 163 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36992,7 +37609,7 @@ module.exports = Random; /***/ }), -/* 163 */ +/* 164 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37048,7 +37665,7 @@ module.exports = Random; /***/ }), -/* 164 */ +/* 165 */ /***/ (function(module, exports) { /** @@ -37089,7 +37706,7 @@ module.exports = RotateAroundDistance; /***/ }), -/* 165 */ +/* 166 */ /***/ (function(module, exports) { /** @@ -37128,7 +37745,7 @@ module.exports = SmootherStep; /***/ }), -/* 166 */ +/* 167 */ /***/ (function(module, exports) { /** @@ -37175,7 +37792,7 @@ module.exports = SmoothStep; /***/ }), -/* 167 */ +/* 168 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37548,7 +38165,7 @@ module.exports = Map; /***/ }), -/* 168 */ +/* 169 */ /***/ (function(module, exports) { /** @@ -37624,7 +38241,7 @@ module.exports = Pad; /***/ }), -/* 169 */ +/* 170 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37680,7 +38297,7 @@ module.exports = ValueToColor; /***/ }), -/* 170 */ +/* 171 */ /***/ (function(module, exports) { /** @@ -37710,7 +38327,7 @@ module.exports = GetColor; /***/ }), -/* 171 */ +/* 172 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37719,7 +38336,7 @@ module.exports = GetColor; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetColor = __webpack_require__(170); +var GetColor = __webpack_require__(171); /** * Converts an HSV (hue, saturation and value) color value to RGB. @@ -37811,7 +38428,7 @@ module.exports = HSVToRGB; /***/ }), -/* 172 */ +/* 173 */ /***/ (function(module, exports) { /** @@ -37943,7 +38560,7 @@ module.exports = Smoothing(); /***/ }), -/* 173 */ +/* 174 */ /***/ (function(module, exports) { /** @@ -37980,7 +38597,7 @@ module.exports = CenterOn; /***/ }), -/* 174 */ +/* 175 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37989,8 +38606,8 @@ module.exports = CenterOn; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var OS = __webpack_require__(119); -var Browser = __webpack_require__(120); +var OS = __webpack_require__(122); +var Browser = __webpack_require__(123); var CanvasPool = __webpack_require__(26); /** @@ -38172,7 +38789,7 @@ module.exports = init(); /***/ }), -/* 175 */ +/* 176 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38191,63 +38808,63 @@ var Extend = __webpack_require__(19); var PhaserMath = { // Collections of functions - Angle: __webpack_require__(735), - Distance: __webpack_require__(744), - Easing: __webpack_require__(749), - Fuzzy: __webpack_require__(750), - Interpolation: __webpack_require__(753), - Pow2: __webpack_require__(758), - Snap: __webpack_require__(760), + Angle: __webpack_require__(738), + Distance: __webpack_require__(747), + Easing: __webpack_require__(752), + Fuzzy: __webpack_require__(753), + Interpolation: __webpack_require__(756), + Pow2: __webpack_require__(761), + Snap: __webpack_require__(763), // Expose the RNG Class - RandomDataGenerator: __webpack_require__(762), + RandomDataGenerator: __webpack_require__(765), // Single functions - Average: __webpack_require__(763), + Average: __webpack_require__(766), Bernstein: __webpack_require__(328), - Between: __webpack_require__(177), - CatmullRom: __webpack_require__(176), - CeilTo: __webpack_require__(764), + Between: __webpack_require__(178), + CatmullRom: __webpack_require__(177), + CeilTo: __webpack_require__(767), Clamp: __webpack_require__(17), - DegToRad: __webpack_require__(39), - Difference: __webpack_require__(765), + DegToRad: __webpack_require__(40), + Difference: __webpack_require__(768), Factorial: __webpack_require__(329), - FloatBetween: __webpack_require__(121), - FloorTo: __webpack_require__(766), - FromPercent: __webpack_require__(87), - GetSpeed: __webpack_require__(767), - IsEven: __webpack_require__(768), - IsEvenStrict: __webpack_require__(769), - Linear: __webpack_require__(118), - MaxAdd: __webpack_require__(770), - MinSub: __webpack_require__(771), - Percent: __webpack_require__(772), - RadToDeg: __webpack_require__(178), - RandomXY: __webpack_require__(773), - RandomXYZ: __webpack_require__(774), - RandomXYZW: __webpack_require__(775), + FloatBetween: __webpack_require__(124), + FloorTo: __webpack_require__(769), + FromPercent: __webpack_require__(88), + GetSpeed: __webpack_require__(770), + IsEven: __webpack_require__(771), + IsEvenStrict: __webpack_require__(772), + Linear: __webpack_require__(121), + MaxAdd: __webpack_require__(773), + MinSub: __webpack_require__(774), + Percent: __webpack_require__(775), + RadToDeg: __webpack_require__(179), + RandomXY: __webpack_require__(776), + RandomXYZ: __webpack_require__(777), + RandomXYZW: __webpack_require__(778), Rotate: __webpack_require__(335), RotateAround: __webpack_require__(280), - RotateAroundDistance: __webpack_require__(164), - RotateTo: __webpack_require__(776), + RotateAroundDistance: __webpack_require__(165), + RotateTo: __webpack_require__(779), RoundAwayFromZero: __webpack_require__(336), - RoundTo: __webpack_require__(777), - SinCosTableGenerator: __webpack_require__(778), - SmootherStep: __webpack_require__(165), - SmoothStep: __webpack_require__(166), - ToXY: __webpack_require__(779), - TransformXY: __webpack_require__(161), - Within: __webpack_require__(780), + RoundTo: __webpack_require__(780), + SinCosTableGenerator: __webpack_require__(781), + SmootherStep: __webpack_require__(166), + SmoothStep: __webpack_require__(167), + ToXY: __webpack_require__(782), + TransformXY: __webpack_require__(162), + Within: __webpack_require__(783), Wrap: __webpack_require__(58), // Vector classes Vector2: __webpack_require__(3), - Vector3: __webpack_require__(94), - Vector4: __webpack_require__(179), + Vector3: __webpack_require__(80), + Vector4: __webpack_require__(126), Matrix3: __webpack_require__(337), Matrix4: __webpack_require__(338), Quaternion: __webpack_require__(339), - RotateVec3: __webpack_require__(781) + RotateVec3: __webpack_require__(784) }; @@ -38261,7 +38878,7 @@ module.exports = PhaserMath; /***/ }), -/* 176 */ +/* 177 */ /***/ (function(module, exports) { /** @@ -38298,7 +38915,7 @@ module.exports = CatmullRom; /***/ }), -/* 177 */ +/* 178 */ /***/ (function(module, exports) { /** @@ -38327,7 +38944,7 @@ module.exports = Between; /***/ }), -/* 178 */ +/* 179 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38356,551 +38973,6 @@ var RadToDeg = function (radians) module.exports = RadToDeg; -/***/ }), -/* 179 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji -// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl - -var Class = __webpack_require__(0); - -/** - * @classdesc - * A representation of a vector in 4D space. - * - * A four-component vector. - * - * @class Vector4 - * @memberof Phaser.Math - * @constructor - * @since 3.0.0 - * - * @param {number} [x] - The x component. - * @param {number} [y] - The y component. - * @param {number} [z] - The z component. - * @param {number} [w] - The w component. - */ -var Vector4 = new Class({ - - initialize: - - function Vector4 (x, y, z, w) - { - /** - * The x component of this Vector. - * - * @name Phaser.Math.Vector4#x - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.x = 0; - - /** - * The y component of this Vector. - * - * @name Phaser.Math.Vector4#y - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.y = 0; - - /** - * The z component of this Vector. - * - * @name Phaser.Math.Vector4#z - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.z = 0; - - /** - * The w component of this Vector. - * - * @name Phaser.Math.Vector4#w - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.w = 0; - - if (typeof x === 'object') - { - this.x = x.x || 0; - this.y = x.y || 0; - this.z = x.z || 0; - this.w = x.w || 0; - } - else - { - this.x = x || 0; - this.y = y || 0; - this.z = z || 0; - this.w = w || 0; - } - }, - - /** - * Make a clone of this Vector4. - * - * @method Phaser.Math.Vector4#clone - * @since 3.0.0 - * - * @return {Phaser.Math.Vector4} A clone of this Vector4. - */ - clone: function () - { - return new Vector4(this.x, this.y, this.z, this.w); - }, - - /** - * Copy the components of a given Vector into this Vector. - * - * @method Phaser.Math.Vector4#copy - * @since 3.0.0 - * - * @param {Phaser.Math.Vector4} src - The Vector to copy the components from. - * - * @return {Phaser.Math.Vector4} This Vector4. - */ - copy: function (src) - { - this.x = src.x; - this.y = src.y; - this.z = src.z || 0; - this.w = src.w || 0; - - return this; - }, - - /** - * Check whether this Vector is equal to a given Vector. - * - * Performs a strict quality check against each Vector's components. - * - * @method Phaser.Math.Vector4#equals - * @since 3.0.0 - * - * @param {Phaser.Math.Vector4} v - The vector to check equality with. - * - * @return {boolean} A boolean indicating whether the two Vectors are equal or not. - */ - equals: function (v) - { - return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z) && (this.w === v.w)); - }, - - /** - * Set the `x`, `y`, `z` and `w` components of the this Vector to the given `x`, `y`, `z` and `w` values. - * - * @method Phaser.Math.Vector4#set - * @since 3.0.0 - * - * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y, z and w components. - * @param {number} y - The y value to set for this Vector. - * @param {number} z - The z value to set for this Vector. - * @param {number} w - The z value to set for this Vector. - * - * @return {Phaser.Math.Vector4} This Vector4. - */ - set: function (x, y, z, w) - { - if (typeof x === 'object') - { - this.x = x.x || 0; - this.y = x.y || 0; - this.z = x.z || 0; - this.w = x.w || 0; - } - else - { - this.x = x || 0; - this.y = y || 0; - this.z = z || 0; - this.w = w || 0; - } - - return this; - }, - - /** - * Add a given Vector to this Vector. Addition is component-wise. - * - * @method Phaser.Math.Vector4#add - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to add to this Vector. - * - * @return {Phaser.Math.Vector4} This Vector4. - */ - add: function (v) - { - this.x += v.x; - this.y += v.y; - this.z += v.z || 0; - this.w += v.w || 0; - - return this; - }, - - /** - * Subtract the given Vector from this Vector. Subtraction is component-wise. - * - * @method Phaser.Math.Vector4#subtract - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to subtract from this Vector. - * - * @return {Phaser.Math.Vector4} This Vector4. - */ - subtract: function (v) - { - this.x -= v.x; - this.y -= v.y; - this.z -= v.z || 0; - this.w -= v.w || 0; - - return this; - }, - - /** - * Scale this Vector by the given value. - * - * @method Phaser.Math.Vector4#scale - * @since 3.0.0 - * - * @param {number} scale - The value to scale this Vector by. - * - * @return {Phaser.Math.Vector4} This Vector4. - */ - scale: function (scale) - { - this.x *= scale; - this.y *= scale; - this.z *= scale; - this.w *= scale; - - return this; - }, - - /** - * Calculate the length (or magnitude) of this Vector. - * - * @method Phaser.Math.Vector4#length - * @since 3.0.0 - * - * @return {number} The length of this Vector. - */ - length: function () - { - var x = this.x; - var y = this.y; - var z = this.z; - var w = this.w; - - return Math.sqrt(x * x + y * y + z * z + w * w); - }, - - /** - * Calculate the length of this Vector squared. - * - * @method Phaser.Math.Vector4#lengthSq - * @since 3.0.0 - * - * @return {number} The length of this Vector, squared. - */ - lengthSq: function () - { - var x = this.x; - var y = this.y; - var z = this.z; - var w = this.w; - - return x * x + y * y + z * z + w * w; - }, - - /** - * Normalize this Vector. - * - * Makes the vector a unit length vector (magnitude of 1) in the same direction. - * - * @method Phaser.Math.Vector4#normalize - * @since 3.0.0 - * - * @return {Phaser.Math.Vector4} This Vector4. - */ - normalize: function () - { - var x = this.x; - var y = this.y; - var z = this.z; - var w = this.w; - var len = x * x + y * y + z * z + w * w; - - if (len > 0) - { - len = 1 / Math.sqrt(len); - - this.x = x * len; - this.y = y * len; - this.z = z * len; - this.w = w * len; - } - - return this; - }, - - /** - * Calculate the dot product of this Vector and the given Vector. - * - * @method Phaser.Math.Vector4#dot - * @since 3.0.0 - * - * @param {Phaser.Math.Vector4} v - The Vector4 to dot product with this Vector4. - * - * @return {number} The dot product of this Vector and the given Vector. - */ - dot: function (v) - { - return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w; - }, - - /** - * Linearly interpolate between this Vector and the given Vector. - * - * Interpolates this Vector towards the given Vector. - * - * @method Phaser.Math.Vector4#lerp - * @since 3.0.0 - * - * @param {Phaser.Math.Vector4} v - The Vector4 to interpolate towards. - * @param {number} [t=0] - The interpolation percentage, between 0 and 1. - * - * @return {Phaser.Math.Vector4} This Vector4. - */ - lerp: function (v, t) - { - if (t === undefined) { t = 0; } - - var ax = this.x; - var ay = this.y; - var az = this.z; - var aw = this.w; - - this.x = ax + t * (v.x - ax); - this.y = ay + t * (v.y - ay); - this.z = az + t * (v.z - az); - this.w = aw + t * (v.w - aw); - - return this; - }, - - /** - * Perform a component-wise multiplication between this Vector and the given Vector. - * - * Multiplies this Vector by the given Vector. - * - * @method Phaser.Math.Vector4#multiply - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to multiply this Vector by. - * - * @return {Phaser.Math.Vector4} This Vector4. - */ - multiply: function (v) - { - this.x *= v.x; - this.y *= v.y; - this.z *= v.z || 1; - this.w *= v.w || 1; - - return this; - }, - - /** - * Perform a component-wise division between this Vector and the given Vector. - * - * Divides this Vector by the given Vector. - * - * @method Phaser.Math.Vector4#divide - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to divide this Vector by. - * - * @return {Phaser.Math.Vector4} This Vector4. - */ - divide: function (v) - { - this.x /= v.x; - this.y /= v.y; - this.z /= v.z || 1; - this.w /= v.w || 1; - - return this; - }, - - /** - * Calculate the distance between this Vector and the given Vector. - * - * @method Phaser.Math.Vector4#distance - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to. - * - * @return {number} The distance from this Vector to the given Vector. - */ - distance: function (v) - { - var dx = v.x - this.x; - var dy = v.y - this.y; - var dz = v.z - this.z || 0; - var dw = v.w - this.w || 0; - - return Math.sqrt(dx * dx + dy * dy + dz * dz + dw * dw); - }, - - /** - * Calculate the distance between this Vector and the given Vector, squared. - * - * @method Phaser.Math.Vector4#distanceSq - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to. - * - * @return {number} The distance from this Vector to the given Vector, squared. - */ - distanceSq: function (v) - { - var dx = v.x - this.x; - var dy = v.y - this.y; - var dz = v.z - this.z || 0; - var dw = v.w - this.w || 0; - - return dx * dx + dy * dy + dz * dz + dw * dw; - }, - - /** - * Negate the `x`, `y`, `z` and `w` components of this Vector. - * - * @method Phaser.Math.Vector4#negate - * @since 3.0.0 - * - * @return {Phaser.Math.Vector4} This Vector4. - */ - negate: function () - { - this.x = -this.x; - this.y = -this.y; - this.z = -this.z; - this.w = -this.w; - - return this; - }, - - /** - * Transform this Vector with the given Matrix. - * - * @method Phaser.Math.Vector4#transformMat4 - * @since 3.0.0 - * - * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector4 with. - * - * @return {Phaser.Math.Vector4} This Vector4. - */ - transformMat4: function (mat) - { - var x = this.x; - var y = this.y; - var z = this.z; - var w = this.w; - var m = mat.val; - - this.x = m[0] * x + m[4] * y + m[8] * z + m[12] * w; - this.y = m[1] * x + m[5] * y + m[9] * z + m[13] * w; - this.z = m[2] * x + m[6] * y + m[10] * z + m[14] * w; - this.w = m[3] * x + m[7] * y + m[11] * z + m[15] * w; - - return this; - }, - - /** - * Transform this Vector with the given Quaternion. - * - * @method Phaser.Math.Vector4#transformQuat - * @since 3.0.0 - * - * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with. - * - * @return {Phaser.Math.Vector4} This Vector4. - */ - transformQuat: function (q) - { - // TODO: is this really the same as Vector3? - // Also, what about this: http://molecularmusings.wordpress.com/2013/05/24/a-faster-quaternion-vector-multiplication/ - // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations - var x = this.x; - var y = this.y; - var z = this.z; - var qx = q.x; - var qy = q.y; - var qz = q.z; - var qw = q.w; - - // calculate quat * vec - var ix = qw * x + qy * z - qz * y; - var iy = qw * y + qz * x - qx * z; - var iz = qw * z + qx * y - qy * x; - var iw = -qx * x - qy * y - qz * z; - - // calculate result * inverse quat - this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy; - this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz; - this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx; - - return this; - }, - - /** - * Make this Vector the zero vector (0, 0, 0, 0). - * - * @method Phaser.Math.Vector4#reset - * @since 3.0.0 - * - * @return {Phaser.Math.Vector4} This Vector4. - */ - reset: function () - { - this.x = 0; - this.y = 0; - this.z = 0; - this.w = 0; - - return this; - } - -}); - -// TODO: Check if these are required internally, if not, remove. -Vector4.prototype.sub = Vector4.prototype.subtract; -Vector4.prototype.mul = Vector4.prototype.multiply; -Vector4.prototype.div = Vector4.prototype.divide; -Vector4.prototype.dist = Vector4.prototype.distance; -Vector4.prototype.distSq = Vector4.prototype.distanceSq; -Vector4.prototype.len = Vector4.prototype.length; -Vector4.prototype.lenSq = Vector4.prototype.lengthSq; - -module.exports = Vector4; - - /***/ }), /* 180 */ /***/ (function(module, exports, __webpack_require__) { @@ -39306,11 +39378,11 @@ module.exports = INPUT_CONST; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(127); +var CONST = __webpack_require__(131); var DefaultPlugins = __webpack_require__(180); var Events = __webpack_require__(22); -var GetPhysicsPlugins = __webpack_require__(883); -var GetScenePlugins = __webpack_require__(884); +var GetPhysicsPlugins = __webpack_require__(888); +var GetScenePlugins = __webpack_require__(889); var NOOP = __webpack_require__(1); var Settings = __webpack_require__(375); @@ -40642,39 +40714,39 @@ module.exports = Texture; module.exports = { - Matrix: __webpack_require__(919), + Matrix: __webpack_require__(924), - Add: __webpack_require__(926), - AddAt: __webpack_require__(927), - BringToTop: __webpack_require__(928), - CountAllMatching: __webpack_require__(929), - Each: __webpack_require__(930), - EachInRange: __webpack_require__(931), + Add: __webpack_require__(931), + AddAt: __webpack_require__(932), + BringToTop: __webpack_require__(933), + CountAllMatching: __webpack_require__(934), + Each: __webpack_require__(935), + EachInRange: __webpack_require__(936), FindClosestInSorted: __webpack_require__(274), GetAll: __webpack_require__(382), GetFirst: __webpack_require__(383), GetRandom: __webpack_require__(191), - MoveDown: __webpack_require__(932), - MoveTo: __webpack_require__(933), - MoveUp: __webpack_require__(934), - NumberArray: __webpack_require__(935), - NumberArrayStep: __webpack_require__(936), + MoveDown: __webpack_require__(937), + MoveTo: __webpack_require__(938), + MoveUp: __webpack_require__(939), + NumberArray: __webpack_require__(940), + NumberArrayStep: __webpack_require__(941), QuickSelect: __webpack_require__(391), Range: __webpack_require__(392), - Remove: __webpack_require__(125), - RemoveAt: __webpack_require__(937), - RemoveBetween: __webpack_require__(938), - RemoveRandomElement: __webpack_require__(939), - Replace: __webpack_require__(940), + Remove: __webpack_require__(129), + RemoveAt: __webpack_require__(942), + RemoveBetween: __webpack_require__(943), + RemoveRandomElement: __webpack_require__(944), + Replace: __webpack_require__(945), RotateLeft: __webpack_require__(290), RotateRight: __webpack_require__(291), SafeRange: __webpack_require__(68), - SendToBack: __webpack_require__(941), - SetAll: __webpack_require__(942), - Shuffle: __webpack_require__(116), - SpliceOne: __webpack_require__(80), - StableSort: __webpack_require__(133), - Swap: __webpack_require__(943) + SendToBack: __webpack_require__(946), + SetAll: __webpack_require__(947), + Shuffle: __webpack_require__(119), + SpliceOne: __webpack_require__(81), + StableSort: __webpack_require__(137), + Swap: __webpack_require__(948) }; @@ -40787,12 +40859,12 @@ module.exports = GetRandom; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(945); +var Events = __webpack_require__(950); /** * @classdesc * A Process Queue maintains three internal lists. - * + * * The `pending` list is a selection of items which are due to be made 'active' in the next update. * The `active` list is a selection of items which are considered active and should be updated. * The `destroy` list is a selection of items that were active and are awaiting being destroyed in the next update. @@ -40873,7 +40945,7 @@ var ProcessQueue = new Class({ /** * Adds a new item to the Process Queue. - * + * * The item is added to the pending list and made active in the next update. * * @method Phaser.Structs.ProcessQueue#add @@ -40897,7 +40969,7 @@ var ProcessQueue = new Class({ /** * Removes an item from the Process Queue. - * + * * The item is added to the pending destroy and fully removed in the next update. * * @method Phaser.Structs.ProcessQueue#remove @@ -40921,7 +40993,7 @@ var ProcessQueue = new Class({ /** * Removes all active items from this Process Queue. - * + * * All the items are marked as 'pending destroy' and fully removed in the next update. * * @method Phaser.Structs.ProcessQueue#removeAll @@ -40947,7 +41019,7 @@ var ProcessQueue = new Class({ /** * Update this queue. First it will process any items awaiting destruction, and remove them. - * + * * Then it will check to see if there are any items pending insertion, and move them to an * active state. Finally, it will return a list of active items for further processing. * @@ -40983,7 +41055,7 @@ var ProcessQueue = new Class({ { active.splice(idx, 1); - this.emit(Events.REMOVE, item); + this.emit(Events.PROCESS_QUEUE_REMOVE, item); } } @@ -41000,7 +41072,7 @@ var ProcessQueue = new Class({ this._active.push(item); - this.emit(Events.ADD, item); + this.emit(Events.PROCESS_QUEUE_ADD, item); } list.length = 0; @@ -41013,7 +41085,7 @@ var ProcessQueue = new Class({ /** * Returns the current list of active items. - * + * * This method returns a reference to the active list array, not a copy of it. * Therefore, be careful to not modify this array outside of the ProcessQueue. * @@ -41237,13 +41309,13 @@ module.exports = ParseXMLBitmapFont; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlitterRender = __webpack_require__(954); -var Bob = __webpack_require__(957); +var BlitterRender = __webpack_require__(959); +var Bob = __webpack_require__(962); var Class = __webpack_require__(0); var Components = __webpack_require__(12); var Frame = __webpack_require__(95); var GameObject = __webpack_require__(14); -var List = __webpack_require__(131); +var List = __webpack_require__(135); /** * @callback CreateCallback @@ -41541,10 +41613,10 @@ var ArrayUtils = __webpack_require__(189); var BlendModes = __webpack_require__(53); var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var Events = __webpack_require__(90); +var Events = __webpack_require__(91); var GameObject = __webpack_require__(14); var Rectangle = __webpack_require__(9); -var Render = __webpack_require__(958); +var Render = __webpack_require__(963); var Union = __webpack_require__(394); var Vector2 = __webpack_require__(3); @@ -42888,9 +42960,9 @@ module.exports = Container; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(134); +var BitmapText = __webpack_require__(138); var Class = __webpack_require__(0); -var Render = __webpack_require__(963); +var Render = __webpack_require__(968); /** * @classdesc @@ -43121,14 +43193,14 @@ module.exports = DynamicBitmapText; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseCamera = __webpack_require__(91); +var BaseCamera = __webpack_require__(92); var Class = __webpack_require__(0); var Commands = __webpack_require__(198); var ComponentsAlpha = __webpack_require__(273); var ComponentsBlendMode = __webpack_require__(276); var ComponentsDepth = __webpack_require__(277); var ComponentsMask = __webpack_require__(281); -var ComponentsPipeline = __webpack_require__(160); +var ComponentsPipeline = __webpack_require__(161); var ComponentsTransform = __webpack_require__(286); var ComponentsVisible = __webpack_require__(287); var ComponentsScrollFactor = __webpack_require__(284); @@ -43140,7 +43212,7 @@ var GameObject = __webpack_require__(14); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); var MATH_CONST = __webpack_require__(13); -var Render = __webpack_require__(969); +var Render = __webpack_require__(974); /** * @classdesc @@ -44758,9 +44830,9 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); var GravityWell = __webpack_require__(402); -var List = __webpack_require__(131); +var List = __webpack_require__(135); var ParticleEmitter = __webpack_require__(404); -var Render = __webpack_require__(979); +var Render = __webpack_require__(984); /** * @classdesc @@ -45244,7 +45316,7 @@ module.exports = ParticleEmitterManager; */ var BlendModes = __webpack_require__(53); -var Camera = __webpack_require__(91); +var Camera = __webpack_require__(92); var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); var Components = __webpack_require__(12); @@ -45253,7 +45325,7 @@ var Frame = __webpack_require__(95); var GameObject = __webpack_require__(14); var NOOP = __webpack_require__(1); var ProjectOrtho = __webpack_require__(181); -var Render = __webpack_require__(983); +var Render = __webpack_require__(988); var Utils = __webpack_require__(10); var UUID = __webpack_require__(202); @@ -45756,21 +45828,22 @@ var RenderTexture = new Class({ */ fill: function (rgb, alpha, x, y, width, height) { + var gl = this.gl; + var frame = this.frame; + var texture = this.texture; + var camera = this.camera; + var renderer = this.renderer; + if (alpha === undefined) { alpha = 1; } if (x === undefined) { x = 0; } if (y === undefined) { y = 0; } - if (width === undefined) { width = this.frame.cutWidth; } - if (height === undefined) { height = this.frame.cutHeight; } + if (width === undefined) { width = frame.cutWidth; } + if (height === undefined) { height = frame.cutHeight; } var r = ((rgb >> 16) | 0) & 0xff; var g = ((rgb >> 8) | 0) & 0xff; var b = (rgb | 0) & 0xff; - var gl = this.gl; - var frame = this.frame; - var camera = this.camera; - var renderer = this.renderer; - camera.preRender(1, 1); if (gl) @@ -45782,16 +45855,23 @@ var RenderTexture = new Class({ renderer.resetTextures(true); - renderer.setFramebuffer(this.framebuffer, false); + renderer.pushScissor(cx, cy, cw, -ch); - renderer.pushScissor(cx, cy, cw, ch, ch); + renderer.setFramebuffer(this.framebuffer, false); var pipeline = this.pipeline; - ProjectOrtho(pipeline, 0, this.texture.width, 0, this.texture.height, -1000.0, 1000.0); + var tw = texture.width; + var th = texture.height; + + var rw = pipeline.width; + var rh = pipeline.height; + + var sx = rw / tw; + var sy = rh / th; pipeline.drawFillRect( - x, y, width, height, + x * sx, (th - height - y) * sy, width * sx, height * sy, Utils.getTintFromFloats(r / 255, g / 255, b / 255, 1), alpha ); @@ -45801,15 +45881,15 @@ var RenderTexture = new Class({ renderer.setFramebuffer(null, false); renderer.popScissor(); - - ProjectOrtho(pipeline, 0, pipeline.width, pipeline.height, 0, -1000.0, 1000.0); } else { - renderer.setContext(this.context); + var ctx = this.context; - this.context.fillStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + alpha + ')'; - this.context.fillRect(x + frame.cutX, y + frame.cutY, width, height); + renderer.setContext(ctx); + + ctx.fillStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + alpha + ')'; + ctx.fillRect(x + frame.cutX, y + frame.cutY, width, height); renderer.setContext(); } @@ -46545,7 +46625,7 @@ module.exports = UUID; var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var RopeRender = __webpack_require__(989); +var RopeRender = __webpack_require__(994); var Vector2 = __webpack_require__(3); /** @@ -47655,17 +47735,17 @@ module.exports = Rope; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(124); +var AddToDOM = __webpack_require__(128); var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameEvents = __webpack_require__(20); var GameObject = __webpack_require__(14); -var GetTextSize = __webpack_require__(992); +var GetTextSize = __webpack_require__(997); var GetValue = __webpack_require__(6); var RemoveFromDOM = __webpack_require__(184); -var TextRender = __webpack_require__(993); -var TextStyle = __webpack_require__(996); +var TextRender = __webpack_require__(998); +var TextStyle = __webpack_require__(1001); /** * @classdesc @@ -48673,9 +48753,9 @@ var Text = new Class({ * @since 3.0.0 * * @param {(number|Phaser.Types.GameObjects.Text.TextPadding)} left - The left padding value, or a padding config object. - * @param {number} top - The top padding value. - * @param {number} right - The right padding value. - * @param {number} bottom - The bottom padding value. + * @param {number} [top] - The top padding value. + * @param {number} [right] - The right padding value. + * @param {number} [bottom] - The bottom padding value. * * @return {this} This Text object. */ @@ -49073,8 +49153,8 @@ var Components = __webpack_require__(12); var GameEvents = __webpack_require__(20); var GameObject = __webpack_require__(14); var GetPowerOfTwo = __webpack_require__(333); -var Smoothing = __webpack_require__(172); -var TileSpriteRender = __webpack_require__(998); +var Smoothing = __webpack_require__(173); +var TileSpriteRender = __webpack_require__(1003); var Vector2 = __webpack_require__(3); // bitmask flag for GameObject.renderMask @@ -49722,12 +49802,12 @@ module.exports = TileSprite; var Class = __webpack_require__(0); var Clamp = __webpack_require__(17); var Components = __webpack_require__(12); -var Events = __webpack_require__(90); +var Events = __webpack_require__(91); var GameEvents = __webpack_require__(20); var GameObject = __webpack_require__(14); var SoundEvents = __webpack_require__(59); var UUID = __webpack_require__(202); -var VideoRender = __webpack_require__(1001); +var VideoRender = __webpack_require__(1006); var MATH_CONST = __webpack_require__(13); /** @@ -51491,7 +51571,7 @@ module.exports = Video; var Class = __webpack_require__(0); var Contains = __webpack_require__(208); var GetPoints = __webpack_require__(419); -var GEOM_CONST = __webpack_require__(47); +var GEOM_CONST = __webpack_require__(48); /** * @classdesc @@ -51772,7 +51852,7 @@ module.exports = Contains; */ var Class = __webpack_require__(0); -var Mesh = __webpack_require__(136); +var Mesh = __webpack_require__(140); /** * @classdesc @@ -52438,7 +52518,7 @@ var GameObject = __webpack_require__(14); var GetFastValue = __webpack_require__(2); var Extend = __webpack_require__(19); var SetValue = __webpack_require__(427); -var ShaderRender = __webpack_require__(1084); +var ShaderRender = __webpack_require__(1089); var TransformMatrix = __webpack_require__(30); /** @@ -53918,8 +53998,8 @@ module.exports = LineToCircle; */ var Point = __webpack_require__(4); -var LineToLine = __webpack_require__(84); -var LineToRectangle = __webpack_require__(433); +var LineToLine = __webpack_require__(85); +var LineToRectangle = __webpack_require__(435); /** * Checks for intersection between the Line and a Rectangle shape, @@ -54199,12 +54279,12 @@ module.exports = RotateAroundXY; module.exports = { - BUTTON_DOWN: __webpack_require__(1209), - BUTTON_UP: __webpack_require__(1210), - CONNECTED: __webpack_require__(1211), - DISCONNECTED: __webpack_require__(1212), - GAMEPAD_BUTTON_DOWN: __webpack_require__(1213), - GAMEPAD_BUTTON_UP: __webpack_require__(1214) + BUTTON_DOWN: __webpack_require__(1215), + BUTTON_UP: __webpack_require__(1216), + CONNECTED: __webpack_require__(1217), + DISCONNECTED: __webpack_require__(1218), + GAMEPAD_BUTTON_DOWN: __webpack_require__(1219), + GAMEPAD_BUTTON_UP: __webpack_require__(1220) }; @@ -54220,7 +54300,7 @@ module.exports = { */ var Extend = __webpack_require__(19); -var XHRSettings = __webpack_require__(141); +var XHRSettings = __webpack_require__(145); /** * Takes two XHRSettings Objects and creates a new XHRSettings object from them. @@ -54458,18 +54538,18 @@ module.exports = XMLFile; module.exports = { - Acceleration: __webpack_require__(1269), - Angular: __webpack_require__(1270), - Bounce: __webpack_require__(1271), - Debug: __webpack_require__(1272), - Drag: __webpack_require__(1273), - Enable: __webpack_require__(1274), - Friction: __webpack_require__(1275), - Gravity: __webpack_require__(1276), - Immovable: __webpack_require__(1277), - Mass: __webpack_require__(1278), - Size: __webpack_require__(1279), - Velocity: __webpack_require__(1280) + Acceleration: __webpack_require__(1275), + Angular: __webpack_require__(1276), + Bounce: __webpack_require__(1277), + Debug: __webpack_require__(1278), + Drag: __webpack_require__(1279), + Enable: __webpack_require__(1280), + Friction: __webpack_require__(1281), + Gravity: __webpack_require__(1282), + Immovable: __webpack_require__(1283), + Mass: __webpack_require__(1284), + Size: __webpack_require__(1285), + Velocity: __webpack_require__(1286) }; @@ -54490,14 +54570,14 @@ module.exports = { module.exports = { - COLLIDE: __webpack_require__(1282), - OVERLAP: __webpack_require__(1283), - PAUSE: __webpack_require__(1284), - RESUME: __webpack_require__(1285), - TILE_COLLIDE: __webpack_require__(1286), - TILE_OVERLAP: __webpack_require__(1287), - WORLD_BOUNDS: __webpack_require__(1288), - WORLD_STEP: __webpack_require__(1289) + COLLIDE: __webpack_require__(1288), + OVERLAP: __webpack_require__(1289), + PAUSE: __webpack_require__(1290), + RESUME: __webpack_require__(1291), + TILE_COLLIDE: __webpack_require__(1292), + TILE_OVERLAP: __webpack_require__(1293), + WORLD_BOUNDS: __webpack_require__(1294), + WORLD_STEP: __webpack_require__(1295) }; @@ -54520,12 +54600,12 @@ var Constraint = {}; module.exports = Constraint; -var Vertices = __webpack_require__(86); +var Vertices = __webpack_require__(87); var Vector = __webpack_require__(100); var Sleeping = __webpack_require__(243); var Bounds = __webpack_require__(101); -var Axes = __webpack_require__(514); -var Common = __webpack_require__(42); +var Axes = __webpack_require__(517); +var Common = __webpack_require__(43); (function() { @@ -55001,7 +55081,7 @@ var Common = __webpack_require__(42); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(144); +var GetTileAt = __webpack_require__(148); /** * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting @@ -55439,7 +55519,7 @@ module.exports = CreateGroupLayer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Pick = __webpack_require__(487); +var Pick = __webpack_require__(489); var ParseGID = __webpack_require__(230); var copyPoints = function (p) { return { x: p.x, y: p.y }; }; @@ -55521,8 +55601,8 @@ module.exports = ParseObject; var Formats = __webpack_require__(32); var MapData = __webpack_require__(104); -var Parse = __webpack_require__(479); -var Tilemap = __webpack_require__(495); +var Parse = __webpack_require__(481); +var Tilemap = __webpack_require__(497); /** * Create a Tilemap from the given key or data. If neither is given, make a blank Tilemap. When @@ -55971,7 +56051,7 @@ var EventEmitter = __webpack_require__(11); var Events = __webpack_require__(238); var GameObjectCreator = __webpack_require__(16); var GameObjectFactory = __webpack_require__(5); -var TWEEN_CONST = __webpack_require__(89); +var TWEEN_CONST = __webpack_require__(90); var MATH_CONST = __webpack_require__(13); /** @@ -57621,20 +57701,20 @@ module.exports = Tween; module.exports = { - TIMELINE_COMPLETE: __webpack_require__(1369), - TIMELINE_LOOP: __webpack_require__(1370), - TIMELINE_PAUSE: __webpack_require__(1371), - TIMELINE_RESUME: __webpack_require__(1372), - TIMELINE_START: __webpack_require__(1373), - TIMELINE_UPDATE: __webpack_require__(1374), - TWEEN_ACTIVE: __webpack_require__(1375), - TWEEN_COMPLETE: __webpack_require__(1376), - TWEEN_LOOP: __webpack_require__(1377), - TWEEN_REPEAT: __webpack_require__(1378), - TWEEN_START: __webpack_require__(1379), - TWEEN_STOP: __webpack_require__(1380), - TWEEN_UPDATE: __webpack_require__(1381), - TWEEN_YOYO: __webpack_require__(1382) + TIMELINE_COMPLETE: __webpack_require__(1375), + TIMELINE_LOOP: __webpack_require__(1376), + TIMELINE_PAUSE: __webpack_require__(1377), + TIMELINE_RESUME: __webpack_require__(1378), + TIMELINE_START: __webpack_require__(1379), + TIMELINE_UPDATE: __webpack_require__(1380), + TWEEN_ACTIVE: __webpack_require__(1381), + TWEEN_COMPLETE: __webpack_require__(1382), + TWEEN_LOOP: __webpack_require__(1383), + TWEEN_REPEAT: __webpack_require__(1384), + TWEEN_START: __webpack_require__(1385), + TWEEN_STOP: __webpack_require__(1386), + TWEEN_UPDATE: __webpack_require__(1387), + TWEEN_YOYO: __webpack_require__(1388) }; @@ -58035,7 +58115,7 @@ var Events = {}; module.exports = Events; -var Common = __webpack_require__(42); +var Common = __webpack_require__(43); (function() { @@ -58153,59 +58233,59 @@ var Common = __webpack_require__(42); module.exports = { - AlignTo: __webpack_require__(528), - Angle: __webpack_require__(529), - Call: __webpack_require__(530), - GetFirst: __webpack_require__(531), - GetLast: __webpack_require__(532), - GridAlign: __webpack_require__(533), - IncAlpha: __webpack_require__(594), - IncX: __webpack_require__(595), - IncXY: __webpack_require__(596), - IncY: __webpack_require__(597), - PlaceOnCircle: __webpack_require__(598), - PlaceOnEllipse: __webpack_require__(599), - PlaceOnLine: __webpack_require__(600), - PlaceOnRectangle: __webpack_require__(601), - PlaceOnTriangle: __webpack_require__(602), - PlayAnimation: __webpack_require__(603), + AlignTo: __webpack_require__(531), + Angle: __webpack_require__(532), + Call: __webpack_require__(533), + GetFirst: __webpack_require__(534), + GetLast: __webpack_require__(535), + GridAlign: __webpack_require__(536), + IncAlpha: __webpack_require__(597), + IncX: __webpack_require__(598), + IncXY: __webpack_require__(599), + IncY: __webpack_require__(600), + PlaceOnCircle: __webpack_require__(601), + PlaceOnEllipse: __webpack_require__(602), + PlaceOnLine: __webpack_require__(603), + PlaceOnRectangle: __webpack_require__(604), + PlaceOnTriangle: __webpack_require__(605), + PlayAnimation: __webpack_require__(606), PropertyValueInc: __webpack_require__(38), PropertyValueSet: __webpack_require__(25), - RandomCircle: __webpack_require__(604), - RandomEllipse: __webpack_require__(605), - RandomLine: __webpack_require__(606), - RandomRectangle: __webpack_require__(607), - RandomTriangle: __webpack_require__(608), - Rotate: __webpack_require__(609), - RotateAround: __webpack_require__(610), - RotateAroundDistance: __webpack_require__(611), - ScaleX: __webpack_require__(612), - ScaleXY: __webpack_require__(613), - ScaleY: __webpack_require__(614), - SetAlpha: __webpack_require__(615), - SetBlendMode: __webpack_require__(616), - SetDepth: __webpack_require__(617), - SetHitArea: __webpack_require__(618), - SetOrigin: __webpack_require__(619), - SetRotation: __webpack_require__(620), - SetScale: __webpack_require__(621), - SetScaleX: __webpack_require__(622), - SetScaleY: __webpack_require__(623), - SetScrollFactor: __webpack_require__(624), - SetScrollFactorX: __webpack_require__(625), - SetScrollFactorY: __webpack_require__(626), - SetTint: __webpack_require__(627), - SetVisible: __webpack_require__(628), - SetX: __webpack_require__(629), - SetXY: __webpack_require__(630), - SetY: __webpack_require__(631), - ShiftPosition: __webpack_require__(632), - Shuffle: __webpack_require__(633), - SmootherStep: __webpack_require__(634), - SmoothStep: __webpack_require__(635), - Spread: __webpack_require__(636), - ToggleVisible: __webpack_require__(637), - WrapInRectangle: __webpack_require__(638) + RandomCircle: __webpack_require__(607), + RandomEllipse: __webpack_require__(608), + RandomLine: __webpack_require__(609), + RandomRectangle: __webpack_require__(610), + RandomTriangle: __webpack_require__(611), + Rotate: __webpack_require__(612), + RotateAround: __webpack_require__(613), + RotateAroundDistance: __webpack_require__(614), + ScaleX: __webpack_require__(615), + ScaleXY: __webpack_require__(616), + ScaleY: __webpack_require__(617), + SetAlpha: __webpack_require__(618), + SetBlendMode: __webpack_require__(619), + SetDepth: __webpack_require__(620), + SetHitArea: __webpack_require__(621), + SetOrigin: __webpack_require__(622), + SetRotation: __webpack_require__(623), + SetScale: __webpack_require__(624), + SetScaleX: __webpack_require__(625), + SetScaleY: __webpack_require__(626), + SetScrollFactor: __webpack_require__(627), + SetScrollFactorX: __webpack_require__(628), + SetScrollFactorY: __webpack_require__(629), + SetTint: __webpack_require__(630), + SetVisible: __webpack_require__(631), + SetX: __webpack_require__(632), + SetXY: __webpack_require__(633), + SetY: __webpack_require__(634), + ShiftPosition: __webpack_require__(635), + Shuffle: __webpack_require__(636), + SmootherStep: __webpack_require__(637), + SmoothStep: __webpack_require__(638), + Spread: __webpack_require__(639), + ToggleVisible: __webpack_require__(640), + WrapInRectangle: __webpack_require__(641) }; @@ -58275,7 +58355,7 @@ module.exports = QuickSet; var GetBottom = __webpack_require__(34); var GetCenterX = __webpack_require__(76); var SetCenterX = __webpack_require__(77); -var SetTop = __webpack_require__(43); +var SetTop = __webpack_require__(44); /** * Takes given Game Object and aligns it so that it is positioned next to the bottom center position of the other. @@ -58318,8 +58398,8 @@ module.exports = BottomCenter; var GetBottom = __webpack_require__(34); var GetLeft = __webpack_require__(35); -var SetLeft = __webpack_require__(44); -var SetTop = __webpack_require__(43); +var SetLeft = __webpack_require__(45); +var SetTop = __webpack_require__(44); /** * Takes given Game Object and aligns it so that it is positioned next to the bottom left position of the other. @@ -58362,8 +58442,8 @@ module.exports = BottomLeft; var GetBottom = __webpack_require__(34); var GetRight = __webpack_require__(36); -var SetRight = __webpack_require__(45); -var SetTop = __webpack_require__(43); +var SetRight = __webpack_require__(46); +var SetTop = __webpack_require__(44); /** * Takes given Game Object and aligns it so that it is positioned next to the bottom right position of the other. @@ -58406,8 +58486,8 @@ module.exports = BottomRight; var GetBottom = __webpack_require__(34); var GetLeft = __webpack_require__(35); -var SetBottom = __webpack_require__(46); -var SetRight = __webpack_require__(45); +var SetBottom = __webpack_require__(47); +var SetRight = __webpack_require__(46); /** * Takes given Game Object and aligns it so that it is positioned next to the left bottom position of the other. @@ -58451,7 +58531,7 @@ module.exports = LeftBottom; var GetCenterY = __webpack_require__(78); var GetLeft = __webpack_require__(35); var SetCenterY = __webpack_require__(79); -var SetRight = __webpack_require__(45); +var SetRight = __webpack_require__(46); /** * Takes given Game Object and aligns it so that it is positioned next to the left center position of the other. @@ -58494,8 +58574,8 @@ module.exports = LeftCenter; var GetLeft = __webpack_require__(35); var GetTop = __webpack_require__(37); -var SetRight = __webpack_require__(45); -var SetTop = __webpack_require__(43); +var SetRight = __webpack_require__(46); +var SetTop = __webpack_require__(44); /** * Takes given Game Object and aligns it so that it is positioned next to the left top position of the other. @@ -58538,8 +58618,8 @@ module.exports = LeftTop; var GetBottom = __webpack_require__(34); var GetRight = __webpack_require__(36); -var SetBottom = __webpack_require__(46); -var SetLeft = __webpack_require__(44); +var SetBottom = __webpack_require__(47); +var SetLeft = __webpack_require__(45); /** * Takes given Game Object and aligns it so that it is positioned next to the right bottom position of the other. @@ -58583,7 +58663,7 @@ module.exports = RightBottom; var GetCenterY = __webpack_require__(78); var GetRight = __webpack_require__(36); var SetCenterY = __webpack_require__(79); -var SetLeft = __webpack_require__(44); +var SetLeft = __webpack_require__(45); /** * Takes given Game Object and aligns it so that it is positioned next to the right center position of the other. @@ -58626,8 +58706,8 @@ module.exports = RightCenter; var GetRight = __webpack_require__(36); var GetTop = __webpack_require__(37); -var SetLeft = __webpack_require__(44); -var SetTop = __webpack_require__(43); +var SetLeft = __webpack_require__(45); +var SetTop = __webpack_require__(44); /** * Takes given Game Object and aligns it so that it is positioned next to the right top position of the other. @@ -58670,7 +58750,7 @@ module.exports = RightTop; var GetCenterX = __webpack_require__(76); var GetTop = __webpack_require__(37); -var SetBottom = __webpack_require__(46); +var SetBottom = __webpack_require__(47); var SetCenterX = __webpack_require__(77); /** @@ -58714,8 +58794,8 @@ module.exports = TopCenter; var GetLeft = __webpack_require__(35); var GetTop = __webpack_require__(37); -var SetBottom = __webpack_require__(46); -var SetLeft = __webpack_require__(44); +var SetBottom = __webpack_require__(47); +var SetLeft = __webpack_require__(45); /** * Takes given Game Object and aligns it so that it is positioned next to the top left position of the other. @@ -58758,8 +58838,8 @@ module.exports = TopLeft; var GetRight = __webpack_require__(36); var GetTop = __webpack_require__(37); -var SetBottom = __webpack_require__(46); -var SetRight = __webpack_require__(45); +var SetBottom = __webpack_require__(47); +var SetRight = __webpack_require__(46); /** * Takes given Game Object and aligns it so that it is positioned next to the top right position of the other. @@ -58855,7 +58935,7 @@ module.exports = QuickSet; var GetBottom = __webpack_require__(34); var GetCenterX = __webpack_require__(76); -var SetBottom = __webpack_require__(46); +var SetBottom = __webpack_require__(47); var SetCenterX = __webpack_require__(77); /** @@ -58899,8 +58979,8 @@ module.exports = BottomCenter; var GetBottom = __webpack_require__(34); var GetLeft = __webpack_require__(35); -var SetBottom = __webpack_require__(46); -var SetLeft = __webpack_require__(44); +var SetBottom = __webpack_require__(47); +var SetLeft = __webpack_require__(45); /** * Takes given Game Object and aligns it so that it is positioned in the bottom left of the other. @@ -58943,8 +59023,8 @@ module.exports = BottomLeft; var GetBottom = __webpack_require__(34); var GetRight = __webpack_require__(36); -var SetBottom = __webpack_require__(46); -var SetRight = __webpack_require__(45); +var SetBottom = __webpack_require__(47); +var SetRight = __webpack_require__(46); /** * Takes given Game Object and aligns it so that it is positioned in the bottom right of the other. @@ -59067,7 +59147,7 @@ module.exports = CenterOn; var GetCenterY = __webpack_require__(78); var GetLeft = __webpack_require__(35); var SetCenterY = __webpack_require__(79); -var SetLeft = __webpack_require__(44); +var SetLeft = __webpack_require__(45); /** * Takes given Game Object and aligns it so that it is positioned in the left center of the other. @@ -59111,7 +59191,7 @@ module.exports = LeftCenter; var GetCenterY = __webpack_require__(78); var GetRight = __webpack_require__(36); var SetCenterY = __webpack_require__(79); -var SetRight = __webpack_require__(45); +var SetRight = __webpack_require__(46); /** * Takes given Game Object and aligns it so that it is positioned in the right center of the other. @@ -59155,7 +59235,7 @@ module.exports = RightCenter; var GetCenterX = __webpack_require__(76); var GetTop = __webpack_require__(37); var SetCenterX = __webpack_require__(77); -var SetTop = __webpack_require__(43); +var SetTop = __webpack_require__(44); /** * Takes given Game Object and aligns it so that it is positioned in the top center of the other. @@ -59198,8 +59278,8 @@ module.exports = TopCenter; var GetLeft = __webpack_require__(35); var GetTop = __webpack_require__(37); -var SetLeft = __webpack_require__(44); -var SetTop = __webpack_require__(43); +var SetLeft = __webpack_require__(45); +var SetTop = __webpack_require__(44); /** * Takes given Game Object and aligns it so that it is positioned in the top left of the other. @@ -59242,8 +59322,8 @@ module.exports = TopLeft; var GetRight = __webpack_require__(36); var GetTop = __webpack_require__(37); -var SetRight = __webpack_require__(45); -var SetTop = __webpack_require__(43); +var SetRight = __webpack_require__(46); +var SetTop = __webpack_require__(44); /** * Takes given Game Object and aligns it so that it is positioned in the top right of the other. @@ -59284,8 +59364,8 @@ module.exports = TopRight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CircumferencePoint = __webpack_require__(153); -var FromPercent = __webpack_require__(87); +var CircumferencePoint = __webpack_require__(154); +var FromPercent = __webpack_require__(88); var MATH_CONST = __webpack_require__(13); var Point = __webpack_require__(4); @@ -59328,8 +59408,8 @@ module.exports = GetPoint; */ var Circumference = __webpack_require__(272); -var CircumferencePoint = __webpack_require__(153); -var FromPercent = __webpack_require__(87); +var CircumferencePoint = __webpack_require__(154); +var FromPercent = __webpack_require__(88); var MATH_CONST = __webpack_require__(13); /** @@ -59990,8 +60070,8 @@ module.exports = Depth; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetPoint = __webpack_require__(156); -var Perimeter = __webpack_require__(113); +var GetPoint = __webpack_require__(157); +var Perimeter = __webpack_require__(116); // Return an array of points from the perimeter of the rectangle // each spaced out based on the quantity or step required @@ -61052,7 +61132,7 @@ module.exports = ToJSON; var MATH_CONST = __webpack_require__(13); var TransformMatrix = __webpack_require__(30); -var TransformXY = __webpack_require__(161); +var TransformXY = __webpack_require__(162); var WrapAngle = __webpack_require__(241); var WrapAngleDegrees = __webpack_require__(242); var Vector2 = __webpack_require__(3); @@ -61736,10 +61816,10 @@ module.exports = Visible; module.exports = { - CHANGE_DATA: __webpack_require__(579), - CHANGE_DATA_KEY: __webpack_require__(580), - REMOVE_DATA: __webpack_require__(581), - SET_DATA: __webpack_require__(582) + CHANGE_DATA: __webpack_require__(582), + CHANGE_DATA_KEY: __webpack_require__(583), + REMOVE_DATA: __webpack_require__(584), + SET_DATA: __webpack_require__(585) }; @@ -61754,7 +61834,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Perimeter = __webpack_require__(113); +var Perimeter = __webpack_require__(116); var Point = __webpack_require__(4); @@ -62027,14 +62107,14 @@ module.exports = BresenhamPoints; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Animation = __webpack_require__(155); +var Animation = __webpack_require__(156); var Class = __webpack_require__(0); -var CustomMap = __webpack_require__(167); +var CustomMap = __webpack_require__(168); var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(112); +var Events = __webpack_require__(115); var GameEvents = __webpack_require__(20); var GetValue = __webpack_require__(6); -var Pad = __webpack_require__(168); +var Pad = __webpack_require__(169); /** * @classdesc @@ -62710,7 +62790,7 @@ module.exports = AnimationManager; */ var Class = __webpack_require__(0); -var CustomMap = __webpack_require__(167); +var CustomMap = __webpack_require__(168); var EventEmitter = __webpack_require__(11); var Events = __webpack_require__(295); @@ -62901,8 +62981,8 @@ module.exports = BaseCache; module.exports = { - ADD: __webpack_require__(641), - REMOVE: __webpack_require__(642) + ADD: __webpack_require__(644), + REMOVE: __webpack_require__(645) }; @@ -63151,14 +63231,14 @@ module.exports = CacheManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseCamera = __webpack_require__(91); +var BaseCamera = __webpack_require__(92); var CanvasPool = __webpack_require__(26); -var CenterOn = __webpack_require__(173); +var CenterOn = __webpack_require__(174); var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); var Components = __webpack_require__(12); var Effects = __webpack_require__(305); -var Linear = __webpack_require__(118); +var Linear = __webpack_require__(121); var Rectangle = __webpack_require__(9); var Vector2 = __webpack_require__(3); @@ -64532,12 +64612,12 @@ module.exports = RGBStringToColor; module.exports = { - Fade: __webpack_require__(665), - Flash: __webpack_require__(666), - Pan: __webpack_require__(667), - Shake: __webpack_require__(700), - RotateTo: __webpack_require__(701), - Zoom: __webpack_require__(702) + Fade: __webpack_require__(668), + Flash: __webpack_require__(669), + Pan: __webpack_require__(670), + Shake: __webpack_require__(703), + RotateTo: __webpack_require__(704), + Zoom: __webpack_require__(705) }; @@ -64558,9 +64638,9 @@ module.exports = { module.exports = { - In: __webpack_require__(668), - Out: __webpack_require__(669), - InOut: __webpack_require__(670) + In: __webpack_require__(671), + Out: __webpack_require__(672), + InOut: __webpack_require__(673) }; @@ -64581,9 +64661,9 @@ module.exports = { module.exports = { - In: __webpack_require__(671), - Out: __webpack_require__(672), - InOut: __webpack_require__(673) + In: __webpack_require__(674), + Out: __webpack_require__(675), + InOut: __webpack_require__(676) }; @@ -64604,9 +64684,9 @@ module.exports = { module.exports = { - In: __webpack_require__(674), - Out: __webpack_require__(675), - InOut: __webpack_require__(676) + In: __webpack_require__(677), + Out: __webpack_require__(678), + InOut: __webpack_require__(679) }; @@ -64627,9 +64707,9 @@ module.exports = { module.exports = { - In: __webpack_require__(677), - Out: __webpack_require__(678), - InOut: __webpack_require__(679) + In: __webpack_require__(680), + Out: __webpack_require__(681), + InOut: __webpack_require__(682) }; @@ -64650,9 +64730,9 @@ module.exports = { module.exports = { - In: __webpack_require__(680), - Out: __webpack_require__(681), - InOut: __webpack_require__(682) + In: __webpack_require__(683), + Out: __webpack_require__(684), + InOut: __webpack_require__(685) }; @@ -64673,9 +64753,9 @@ module.exports = { module.exports = { - In: __webpack_require__(683), - Out: __webpack_require__(684), - InOut: __webpack_require__(685) + In: __webpack_require__(686), + Out: __webpack_require__(687), + InOut: __webpack_require__(688) }; @@ -64690,7 +64770,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -module.exports = __webpack_require__(686); +module.exports = __webpack_require__(689); /***/ }), @@ -64709,9 +64789,9 @@ module.exports = __webpack_require__(686); module.exports = { - In: __webpack_require__(687), - Out: __webpack_require__(688), - InOut: __webpack_require__(689) + In: __webpack_require__(690), + Out: __webpack_require__(691), + InOut: __webpack_require__(692) }; @@ -64732,9 +64812,9 @@ module.exports = { module.exports = { - In: __webpack_require__(690), - Out: __webpack_require__(691), - InOut: __webpack_require__(692) + In: __webpack_require__(693), + Out: __webpack_require__(694), + InOut: __webpack_require__(695) }; @@ -64755,9 +64835,9 @@ module.exports = { module.exports = { - In: __webpack_require__(693), - Out: __webpack_require__(694), - InOut: __webpack_require__(695) + In: __webpack_require__(696), + Out: __webpack_require__(697), + InOut: __webpack_require__(698) }; @@ -64778,9 +64858,9 @@ module.exports = { module.exports = { - In: __webpack_require__(696), - Out: __webpack_require__(697), - InOut: __webpack_require__(698) + In: __webpack_require__(699), + Out: __webpack_require__(700), + InOut: __webpack_require__(701) }; @@ -64799,7 +64879,7 @@ module.exports = { * @namespace Phaser.Math.Easing.Stepped */ -module.exports = __webpack_require__(699); +module.exports = __webpack_require__(702); /***/ }), @@ -64818,10 +64898,10 @@ var Device = __webpack_require__(319); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); var IsPlainObject = __webpack_require__(7); -var PhaserMath = __webpack_require__(175); +var PhaserMath = __webpack_require__(176); var NOOP = __webpack_require__(1); var DefaultPlugins = __webpack_require__(180); -var ValueToColor = __webpack_require__(169); +var ValueToColor = __webpack_require__(170); /** * @classdesc @@ -65423,13 +65503,13 @@ module.exports = Config; module.exports = { - os: __webpack_require__(119), - browser: __webpack_require__(120), - features: __webpack_require__(174), - input: __webpack_require__(731), - audio: __webpack_require__(732), - video: __webpack_require__(733), - fullscreen: __webpack_require__(734), + os: __webpack_require__(122), + browser: __webpack_require__(123), + features: __webpack_require__(175), + input: __webpack_require__(734), + audio: __webpack_require__(735), + video: __webpack_require__(736), + fullscreen: __webpack_require__(737), canvasFeatures: __webpack_require__(320) }; @@ -65992,7 +66072,7 @@ module.exports = QuadraticBezierInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmoothStep = __webpack_require__(166); +var SmoothStep = __webpack_require__(167); /** * A Smooth Step interpolation method. @@ -68222,7 +68302,7 @@ module.exports = Matrix4; // and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl var Class = __webpack_require__(0); -var Vector3 = __webpack_require__(94); +var Vector3 = __webpack_require__(80); var Matrix3 = __webpack_require__(337); var EPSILON = 0.000001; @@ -68993,7 +69073,7 @@ module.exports = Quaternion; var CanvasInterpolation = __webpack_require__(341); var CanvasPool = __webpack_require__(26); var CONST = __webpack_require__(33); -var Features = __webpack_require__(174); +var Features = __webpack_require__(175); /** * Called automatically by Phaser.Game and responsible for creating the renderer it will use. @@ -69083,8 +69163,8 @@ var CreateRenderer = function (game) if (true) { - CanvasRenderer = __webpack_require__(506); - WebGLRenderer = __webpack_require__(509); + CanvasRenderer = __webpack_require__(508); + WebGLRenderer = __webpack_require__(511); // Let the config pick the renderer type, as both are included if (config.renderType === CONST.WEBGL) @@ -70510,7 +70590,7 @@ module.exports = { var Class = __webpack_require__(0); var CubicBezier = __webpack_require__(330); -var Curve = __webpack_require__(81); +var Curve = __webpack_require__(82); var Vector2 = __webpack_require__(3); /** @@ -70736,10 +70816,10 @@ module.exports = CubicBezierCurve; // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) var Class = __webpack_require__(0); -var Curve = __webpack_require__(81); -var DegToRad = __webpack_require__(39); +var Curve = __webpack_require__(82); +var DegToRad = __webpack_require__(40); var GetValue = __webpack_require__(6); -var RadToDeg = __webpack_require__(178); +var RadToDeg = __webpack_require__(179); var Vector2 = __webpack_require__(3); /** @@ -71360,7 +71440,7 @@ module.exports = EllipseCurve; // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) var Class = __webpack_require__(0); -var Curve = __webpack_require__(81); +var Curve = __webpack_require__(82); var FromPoints = __webpack_require__(182); var Rectangle = __webpack_require__(9); var Vector2 = __webpack_require__(3); @@ -71661,7 +71741,7 @@ module.exports = LineCurve; */ var Class = __webpack_require__(0); -var Curve = __webpack_require__(81); +var Curve = __webpack_require__(82); var QuadraticBezierInterpolation = __webpack_require__(331); var Vector2 = __webpack_require__(3); @@ -71879,9 +71959,9 @@ module.exports = QuadraticBezier; // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) -var CatmullRom = __webpack_require__(176); +var CatmullRom = __webpack_require__(177); var Class = __webpack_require__(0); -var Curve = __webpack_require__(81); +var Curve = __webpack_require__(82); var Vector2 = __webpack_require__(3); /** @@ -72228,25 +72308,25 @@ module.exports = BaseShader; var Color = __webpack_require__(31); -Color.ColorToRGBA = __webpack_require__(814); +Color.ColorToRGBA = __webpack_require__(819); Color.ComponentToHex = __webpack_require__(355); -Color.GetColor = __webpack_require__(170); +Color.GetColor = __webpack_require__(171); Color.GetColor32 = __webpack_require__(299); -Color.GetColorFromValue = __webpack_require__(114); +Color.GetColorFromValue = __webpack_require__(117); Color.HexStringToColor = __webpack_require__(298); -Color.HSLToColor = __webpack_require__(815); -Color.HSVColorWheel = __webpack_require__(816); -Color.HSVToRGB = __webpack_require__(171); +Color.HSLToColor = __webpack_require__(820); +Color.HSVColorWheel = __webpack_require__(821); +Color.HSVToRGB = __webpack_require__(172); Color.HueToComponent = __webpack_require__(356); Color.IntegerToColor = __webpack_require__(301); Color.IntegerToRGB = __webpack_require__(302); -Color.Interpolate = __webpack_require__(817); +Color.Interpolate = __webpack_require__(822); Color.ObjectToColor = __webpack_require__(303); -Color.RandomRGB = __webpack_require__(818); +Color.RandomRGB = __webpack_require__(823); Color.RGBStringToColor = __webpack_require__(304); Color.RGBToHSV = __webpack_require__(300); -Color.RGBToString = __webpack_require__(819); -Color.ValueToColor = __webpack_require__(169); +Color.RGBToString = __webpack_require__(824); +Color.ValueToColor = __webpack_require__(170); module.exports = Color; @@ -72347,7 +72427,7 @@ module.exports = HueToComponent; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var OS = __webpack_require__(119); +var OS = __webpack_require__(122); /** * @callback ContentLoadedCallback @@ -72905,7 +72985,7 @@ var Mouse = __webpack_require__(367); var Pointer = __webpack_require__(368); var Touch = __webpack_require__(369); var TransformMatrix = __webpack_require__(30); -var TransformXY = __webpack_require__(161); +var TransformXY = __webpack_require__(162); /** * @classdesc @@ -73977,11 +74057,11 @@ module.exports = InputManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayRemove = __webpack_require__(125); +var ArrayRemove = __webpack_require__(129); var Class = __webpack_require__(0); var GameEvents = __webpack_require__(20); var InputEvents = __webpack_require__(55); -var KeyCodes = __webpack_require__(126); +var KeyCodes = __webpack_require__(130); var NOOP = __webpack_require__(1); /** @@ -74422,7 +74502,7 @@ module.exports = KeyboardManager; */ var Class = __webpack_require__(0); -var Features = __webpack_require__(174); +var Features = __webpack_require__(175); var InputEvents = __webpack_require__(55); var NOOP = __webpack_require__(1); @@ -76606,7 +76686,7 @@ var GameObjectCreator = __webpack_require__(16); var GameObjectFactory = __webpack_require__(5); var GetFastValue = __webpack_require__(2); var PluginCache = __webpack_require__(23); -var Remove = __webpack_require__(125); +var Remove = __webpack_require__(129); /** * @classdesc @@ -77503,15 +77583,15 @@ module.exports = PluginManager; var CONST = __webpack_require__(183); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(92); +var Events = __webpack_require__(93); var GameEvents = __webpack_require__(20); -var GetInnerHeight = __webpack_require__(872); +var GetInnerHeight = __webpack_require__(877); var GetTarget = __webpack_require__(363); var GetScreenOrientation = __webpack_require__(358); var NOOP = __webpack_require__(1); var Rectangle = __webpack_require__(9); var Size = __webpack_require__(372); -var SnapFloor = __webpack_require__(93); +var SnapFloor = __webpack_require__(94); var Vector2 = __webpack_require__(3); /** @@ -79213,7 +79293,7 @@ module.exports = ScaleManager; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var SnapFloor = __webpack_require__(93); +var SnapFloor = __webpack_require__(94); var Vector2 = __webpack_require__(3); /** @@ -79990,11 +80070,11 @@ module.exports = Size; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(127); +var CONST = __webpack_require__(131); var Events = __webpack_require__(22); var GameEvents = __webpack_require__(20); var GetValue = __webpack_require__(6); -var LoaderEvents = __webpack_require__(82); +var LoaderEvents = __webpack_require__(83); var NOOP = __webpack_require__(1); var Scene = __webpack_require__(374); var Systems = __webpack_require__(186); @@ -81913,10 +81993,10 @@ module.exports = Scene; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(127); +var CONST = __webpack_require__(131); var GetValue = __webpack_require__(6); -var Merge = __webpack_require__(128); -var InjectionMap = __webpack_require__(885); +var Merge = __webpack_require__(132); +var InjectionMap = __webpack_require__(890); /** * @namespace Phaser.Scenes.Settings @@ -82015,7 +82095,7 @@ var Class = __webpack_require__(0); var Color = __webpack_require__(31); var CONST = __webpack_require__(33); var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(123); +var Events = __webpack_require__(127); var GameEvents = __webpack_require__(20); var GenerateTexture = __webpack_require__(346); var GetValue = __webpack_require__(6); @@ -83215,7 +83295,7 @@ var Class = __webpack_require__(0); var Clamp = __webpack_require__(17); var Color = __webpack_require__(31); var CONST = __webpack_require__(33); -var IsSizePowerOfTwo = __webpack_require__(122); +var IsSizePowerOfTwo = __webpack_require__(125); var Texture = __webpack_require__(188); /** @@ -83848,7 +83928,7 @@ module.exports = CanvasTexture; var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); -var IsSizePowerOfTwo = __webpack_require__(122); +var IsSizePowerOfTwo = __webpack_require__(125); var ScaleModes = __webpack_require__(240); /** @@ -84217,14 +84297,14 @@ module.exports = TextureSource; module.exports = { - AtlasXML: __webpack_require__(886), - Canvas: __webpack_require__(887), - Image: __webpack_require__(888), - JSONArray: __webpack_require__(889), - JSONHash: __webpack_require__(890), - SpriteSheet: __webpack_require__(891), - SpriteSheetFromAtlas: __webpack_require__(892), - UnityYAML: __webpack_require__(893) + AtlasXML: __webpack_require__(891), + Canvas: __webpack_require__(892), + Image: __webpack_require__(893), + JSONArray: __webpack_require__(894), + JSONHash: __webpack_require__(895), + SpriteSheet: __webpack_require__(896), + SpriteSheetFromAtlas: __webpack_require__(897), + UnityYAML: __webpack_require__(898) }; @@ -84292,7 +84372,7 @@ module.exports = SoundManagerCreator; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSoundManager = __webpack_require__(129); +var BaseSoundManager = __webpack_require__(133); var Class = __webpack_require__(0); var Events = __webpack_require__(59); var HTML5AudioSound = __webpack_require__(384); @@ -84882,7 +84962,7 @@ module.exports = GetFirst; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(130); +var BaseSound = __webpack_require__(134); var Class = __webpack_require__(0); var Events = __webpack_require__(59); var Clamp = __webpack_require__(17); @@ -85812,7 +85892,7 @@ module.exports = HTML5AudioSound; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSoundManager = __webpack_require__(129); +var BaseSoundManager = __webpack_require__(133); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(11); var NoAudioSound = __webpack_require__(386); @@ -85930,7 +86010,7 @@ module.exports = NoAudioSoundManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(130); +var BaseSound = __webpack_require__(134); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(11); var Extend = __webpack_require__(19); @@ -86122,7 +86202,7 @@ module.exports = NoAudioSound; */ var Base64ToArrayBuffer = __webpack_require__(388); -var BaseSoundManager = __webpack_require__(129); +var BaseSoundManager = __webpack_require__(133); var Class = __webpack_require__(0); var Events = __webpack_require__(59); var WebAudioSound = __webpack_require__(389); @@ -86659,7 +86739,7 @@ module.exports = Base64ToArrayBuffer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(130); +var BaseSound = __webpack_require__(134); var Class = __webpack_require__(0); var Events = __webpack_require__(59); @@ -87735,7 +87815,7 @@ module.exports = QuickSelect; */ var GetValue = __webpack_require__(6); -var Shuffle = __webpack_require__(116); +var Shuffle = __webpack_require__(119); var BuildChunk = function (a, b, qty) { @@ -88005,12 +88085,12 @@ module.exports = Union; var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var DOMElementRender = __webpack_require__(961); +var DOMElementRender = __webpack_require__(966); var GameObject = __webpack_require__(14); var IsPlainObject = __webpack_require__(7); var RemoveFromDOM = __webpack_require__(184); var SCENE_EVENTS = __webpack_require__(22); -var Vector4 = __webpack_require__(179); +var Vector4 = __webpack_require__(126); /** * @classdesc @@ -88980,7 +89060,7 @@ module.exports = DOMElement; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CSSBlendModes = __webpack_require__(962); +var CSSBlendModes = __webpack_require__(967); var GameObject = __webpack_require__(14); /** @@ -89105,7 +89185,7 @@ module.exports = DOMElementCSSRenderer; var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameObject = __webpack_require__(14); -var ExternRender = __webpack_require__(966); +var ExternRender = __webpack_require__(971); /** * @classdesc @@ -89199,7 +89279,7 @@ module.exports = Extern; */ var CircumferencePoint = __webpack_require__(199); -var FromPercent = __webpack_require__(87); +var FromPercent = __webpack_require__(88); var MATH_CONST = __webpack_require__(13); var Point = __webpack_require__(4); @@ -89243,7 +89323,7 @@ module.exports = GetPoint; var Circumference = __webpack_require__(400); var CircumferencePoint = __webpack_require__(199); -var FromPercent = __webpack_require__(87); +var FromPercent = __webpack_require__(88); var MATH_CONST = __webpack_require__(13); /** @@ -89797,7 +89877,7 @@ module.exports = GravityWell; */ var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(39); +var DegToRad = __webpack_require__(40); var DistanceBetween = __webpack_require__(54); /** @@ -90370,15 +90450,15 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var DeathZone = __webpack_require__(405); var EdgeZone = __webpack_require__(406); -var EmitterOp = __webpack_require__(978); +var EmitterOp = __webpack_require__(983); var GetFastValue = __webpack_require__(2); var GetRandom = __webpack_require__(191); var HasAny = __webpack_require__(407); -var HasValue = __webpack_require__(109); +var HasValue = __webpack_require__(112); var Particle = __webpack_require__(403); var RandomZone = __webpack_require__(408); var Rectangle = __webpack_require__(9); -var StableSort = __webpack_require__(133); +var StableSort = __webpack_require__(137); var Vector2 = __webpack_require__(3); var Wrap = __webpack_require__(58); @@ -92950,9 +93030,9 @@ module.exports = PathFollower; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcRender = __webpack_require__(1004); +var ArcRender = __webpack_require__(1009); var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(39); +var DegToRad = __webpack_require__(40); var Earcut = __webpack_require__(66); var GeomCircle = __webpack_require__(65); var MATH_CONST = __webpack_require__(13); @@ -93360,7 +93440,7 @@ module.exports = Arc; */ var Class = __webpack_require__(0); -var CurveRender = __webpack_require__(1007); +var CurveRender = __webpack_require__(1012); var Earcut = __webpack_require__(66); var Rectangle = __webpack_require__(9); var Shape = __webpack_require__(29); @@ -93543,7 +93623,7 @@ module.exports = Curve; var Class = __webpack_require__(0); var Earcut = __webpack_require__(66); -var EllipseRender = __webpack_require__(1010); +var EllipseRender = __webpack_require__(1015); var GeomEllipse = __webpack_require__(96); var Shape = __webpack_require__(29); @@ -93730,7 +93810,7 @@ module.exports = Ellipse; var Class = __webpack_require__(0); var Shape = __webpack_require__(29); -var GridRender = __webpack_require__(1013); +var GridRender = __webpack_require__(1018); /** * @classdesc @@ -94010,7 +94090,7 @@ module.exports = Grid; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var IsoBoxRender = __webpack_require__(1016); +var IsoBoxRender = __webpack_require__(1021); var Class = __webpack_require__(0); var Shape = __webpack_require__(29); @@ -94226,7 +94306,7 @@ module.exports = IsoBox; */ var Class = __webpack_require__(0); -var IsoTriangleRender = __webpack_require__(1019); +var IsoTriangleRender = __webpack_require__(1024); var Shape = __webpack_require__(29); /** @@ -94473,8 +94553,8 @@ module.exports = IsoTriangle; var Class = __webpack_require__(0); var Shape = __webpack_require__(29); -var GeomLine = __webpack_require__(49); -var LineRender = __webpack_require__(1022); +var GeomLine = __webpack_require__(39); +var LineRender = __webpack_require__(1027); /** * @classdesc @@ -94638,7 +94718,7 @@ module.exports = Line; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PolygonRender = __webpack_require__(1025); +var PolygonRender = __webpack_require__(1030); var Class = __webpack_require__(0); var Earcut = __webpack_require__(66); var GetAABB = __webpack_require__(418); @@ -94834,7 +94914,7 @@ module.exports = GetAABB; */ var Length = __webpack_require__(57); -var Line = __webpack_require__(49); +var Line = __webpack_require__(39); var Perimeter = __webpack_require__(420); /** @@ -94911,7 +94991,7 @@ module.exports = GetPoints; */ var Length = __webpack_require__(57); -var Line = __webpack_require__(49); +var Line = __webpack_require__(39); /** * Returns the perimeter of the given Polygon. @@ -95037,7 +95117,7 @@ module.exports = Smooth; var Class = __webpack_require__(0); var GeomRectangle = __webpack_require__(9); var Shape = __webpack_require__(29); -var RectangleRender = __webpack_require__(1028); +var RectangleRender = __webpack_require__(1033); /** * @classdesc @@ -95177,7 +95257,7 @@ module.exports = Rectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var StarRender = __webpack_require__(1031); +var StarRender = __webpack_require__(1036); var Class = __webpack_require__(0); var Earcut = __webpack_require__(66); var Shape = __webpack_require__(29); @@ -95468,7 +95548,7 @@ module.exports = Star; var Class = __webpack_require__(0); var Shape = __webpack_require__(29); var GeomTriangle = __webpack_require__(71); -var TriangleRender = __webpack_require__(1034); +var TriangleRender = __webpack_require__(1039); /** * @classdesc @@ -96731,7 +96811,7 @@ module.exports = LightsManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(47); +var CONST = __webpack_require__(48); var Extend = __webpack_require__(19); /** @@ -96740,14 +96820,14 @@ var Extend = __webpack_require__(19); var Geom = { - Circle: __webpack_require__(1094), - Ellipse: __webpack_require__(1104), + Circle: __webpack_require__(1099), + Ellipse: __webpack_require__(1109), Intersects: __webpack_require__(431), - Line: __webpack_require__(1124), - Point: __webpack_require__(1146), - Polygon: __webpack_require__(1160), - Rectangle: __webpack_require__(445), - Triangle: __webpack_require__(1192) + Line: __webpack_require__(1129), + Point: __webpack_require__(1151), + Polygon: __webpack_require__(1165), + Rectangle: __webpack_require__(447), + Triangle: __webpack_require__(1198) }; @@ -96775,29 +96855,31 @@ module.exports = { CircleToCircle: __webpack_require__(211), CircleToRectangle: __webpack_require__(212), - GetCircleToCircle: __webpack_require__(1114), - GetCircleToRectangle: __webpack_require__(1115), + GetCircleToCircle: __webpack_require__(1119), + GetCircleToRectangle: __webpack_require__(1120), GetLineToCircle: __webpack_require__(213), GetLineToLine: __webpack_require__(432), - GetLineToPolygon: __webpack_require__(1116), + GetLineToPoints: __webpack_require__(433), + GetLineToPolygon: __webpack_require__(434), GetLineToRectangle: __webpack_require__(215), - GetRectangleIntersection: __webpack_require__(1117), - GetRectangleToRectangle: __webpack_require__(1118), - GetRectangleToTriangle: __webpack_require__(1119), - GetTriangleToCircle: __webpack_require__(1120), - GetTriangleToLine: __webpack_require__(437), - GetTriangleToTriangle: __webpack_require__(1121), + GetRaysFromPointToPolygon: __webpack_require__(1121), + GetRectangleIntersection: __webpack_require__(1122), + GetRectangleToRectangle: __webpack_require__(1123), + GetRectangleToTriangle: __webpack_require__(1124), + GetTriangleToCircle: __webpack_require__(1125), + GetTriangleToLine: __webpack_require__(439), + GetTriangleToTriangle: __webpack_require__(1126), LineToCircle: __webpack_require__(214), - LineToLine: __webpack_require__(84), - LineToRectangle: __webpack_require__(433), - PointToLine: __webpack_require__(441), - PointToLineSegment: __webpack_require__(1122), - RectangleToRectangle: __webpack_require__(137), - RectangleToTriangle: __webpack_require__(434), - RectangleToValues: __webpack_require__(1123), - TriangleToCircle: __webpack_require__(436), - TriangleToLine: __webpack_require__(438), - TriangleToTriangle: __webpack_require__(439) + LineToLine: __webpack_require__(85), + LineToRectangle: __webpack_require__(435), + PointToLine: __webpack_require__(443), + PointToLineSegment: __webpack_require__(1127), + RectangleToRectangle: __webpack_require__(141), + RectangleToTriangle: __webpack_require__(436), + RectangleToValues: __webpack_require__(1128), + TriangleToCircle: __webpack_require__(438), + TriangleToLine: __webpack_require__(440), + TriangleToTriangle: __webpack_require__(441) }; @@ -96812,7 +96894,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector3 = __webpack_require__(94); +var Vector3 = __webpack_require__(80); /** * Checks for intersection between the two line segments and returns the intersection point as a Vector3, @@ -96873,6 +96955,154 @@ module.exports = GetLineToLine; /***/ }), /* 433 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Vector3 = __webpack_require__(80); +var GetLineToLine = __webpack_require__(432); +var Line = __webpack_require__(39); + +// Temp calculation segment +var segment = new Line(); + +// Temp vec3 +var tempIntersect = new Vector3(); + +/** + * Checks for the closest point of intersection between a line segment and an array of points, where each pair + * of points are converted to line segments for the intersection tests. + * + * If no intersection is found, this function returns `null`. + * + * If intersection was found, a Vector3 is returned with the following properties: + * + * The `x` and `y` components contain the point of the intersection. + * The `z` component contains the closest distance. + * + * @function Phaser.Geom.Intersects.GetLineToPoints + * @since 3.50.0 + * + * @param {Phaser.Geom.Line} line - The line segment to check. + * @param {Phaser.Math.Vector2[] | Phaser.Geom.Point[]} points - An array of points to check. + * @param {Phaser.Math.Vector3} [out] - A Vector3 to store the intersection results in. + * + * @return {Phaser.Math.Vector3} A Vector3 containing the intersection results, or `null`. + */ +var GetLineToPoints = function (line, points, out) +{ + if (out === undefined) { out = new Vector3(); } + + var closestIntersect = false; + + // Reset our vec3s + out.set(); + tempIntersect.set(); + + var prev = points[0]; + + for (var i = 1; i < points.length; i++) + { + var current = points[i]; + + segment.setTo(prev.x, prev.y, current.x, current.y); + + prev = current; + + if (GetLineToLine(line, segment, tempIntersect)) + { + if (!closestIntersect || tempIntersect.z < out.z) + { + out.copy(tempIntersect); + + closestIntersect = true; + } + } + } + + return (closestIntersect) ? out : null; +}; + +module.exports = GetLineToPoints; + + +/***/ }), +/* 434 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Vector3 = __webpack_require__(80); +var Vector4 = __webpack_require__(126); +var GetLineToPoints = __webpack_require__(433); + +// Temp vec3 +var tempIntersect = new Vector3(); + +/** + * Checks for the closest point of intersection between a line segment and an array of polygons. + * + * If no intersection is found, this function returns `null`. + * + * If intersection was found, a Vector4 is returned with the following properties: + * + * The `x` and `y` components contain the point of the intersection. + * The `z` component contains the closest distance. + * The `w` component contains the index of the polygon, in the given array, that triggered the intersection. + * + * @function Phaser.Geom.Intersects.GetLineToPolygon + * @since 3.50.0 + * + * @param {Phaser.Geom.Line} line - The line segment to check. + * @param {Phaser.Geom.Polygon | Phaser.Geom.Polygon[]} polygons - A single polygon, or array of polygons, to check. + * @param {Phaser.Math.Vector4} [out] - A Vector4 to store the intersection results in. + * + * @return {Phaser.Math.Vector4} A Vector4 containing the intersection results, or `null`. + */ +var GetLineToPolygon = function (line, polygons, out) +{ + if (out === undefined) { out = new Vector4(); } + + if (!Array.isArray(polygons)) + { + polygons = [ polygons ]; + } + + var closestIntersect = false; + + // Reset our vec4s + out.set(); + tempIntersect.set(); + + for (var i = 0; i < polygons.length; i++) + { + if (GetLineToPoints(line, polygons[i].points, tempIntersect)) + { + if (!closestIntersect || tempIntersect.z < out.z) + { + out.set(tempIntersect.x, tempIntersect.y, tempIntersect.z, i); + + closestIntersect = true; + } + } + } + + return (closestIntersect) ? out : null; +}; + +module.exports = GetLineToPolygon; + + +/***/ }), +/* 435 */ /***/ (function(module, exports) { /** @@ -96973,7 +97203,7 @@ module.exports = LineToRectangle; /***/ }), -/* 434 */ +/* 436 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96982,10 +97212,10 @@ module.exports = LineToRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var LineToLine = __webpack_require__(84); -var Contains = __webpack_require__(48); +var LineToLine = __webpack_require__(85); +var Contains = __webpack_require__(49); var ContainsArray = __webpack_require__(216); -var Decompose = __webpack_require__(435); +var Decompose = __webpack_require__(437); /** * Checks for intersection between Rectangle shape and Triangle shape. @@ -97066,7 +97296,7 @@ module.exports = RectangleToTriangle; /***/ }), -/* 435 */ +/* 437 */ /***/ (function(module, exports) { /** @@ -97103,7 +97333,7 @@ module.exports = Decompose; /***/ }), -/* 436 */ +/* 438 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97113,7 +97343,7 @@ module.exports = Decompose; */ var LineToCircle = __webpack_require__(214); -var Contains = __webpack_require__(83); +var Contains = __webpack_require__(84); /** * Checks if a Triangle and a Circle intersect. @@ -97168,7 +97398,7 @@ module.exports = TriangleToCircle; /***/ }), -/* 437 */ +/* 439 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97179,8 +97409,8 @@ module.exports = TriangleToCircle; */ var Point = __webpack_require__(4); -var TriangleToLine = __webpack_require__(438); -var LineToLine = __webpack_require__(84); +var TriangleToLine = __webpack_require__(440); +var LineToLine = __webpack_require__(85); /** * Checks if a Triangle and a Line intersect, and returns the intersection points as a Point object array. @@ -97227,7 +97457,7 @@ module.exports = GetTriangleToLine; /***/ }), -/* 438 */ +/* 440 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97236,8 +97466,8 @@ module.exports = GetTriangleToLine; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(83); -var LineToLine = __webpack_require__(84); +var Contains = __webpack_require__(84); +var LineToLine = __webpack_require__(85); /** * Checks if a Triangle and a Line intersect. @@ -97283,7 +97513,7 @@ module.exports = TriangleToLine; /***/ }), -/* 439 */ +/* 441 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97293,8 +97523,8 @@ module.exports = TriangleToLine; */ var ContainsArray = __webpack_require__(216); -var Decompose = __webpack_require__(440); -var LineToLine = __webpack_require__(84); +var Decompose = __webpack_require__(442); +var LineToLine = __webpack_require__(85); /** * Checks if two Triangles intersect. @@ -97373,7 +97603,7 @@ module.exports = TriangleToTriangle; /***/ }), -/* 440 */ +/* 442 */ /***/ (function(module, exports) { /** @@ -97408,7 +97638,7 @@ module.exports = Decompose; /***/ }), -/* 441 */ +/* 443 */ /***/ (function(module, exports) { /** @@ -97478,7 +97708,7 @@ module.exports = PointToLine; /***/ }), -/* 442 */ +/* 444 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97489,7 +97719,7 @@ module.exports = PointToLine; var MATH_CONST = __webpack_require__(13); var Wrap = __webpack_require__(58); -var Angle = __webpack_require__(85); +var Angle = __webpack_require__(86); /** * Get the angle of the normal of the given line in radians. @@ -97512,7 +97742,7 @@ module.exports = NormalAngle; /***/ }), -/* 443 */ +/* 445 */ /***/ (function(module, exports) { /** @@ -97540,7 +97770,7 @@ module.exports = GetMagnitude; /***/ }), -/* 444 */ +/* 446 */ /***/ (function(module, exports) { /** @@ -97568,7 +97798,7 @@ module.exports = GetMagnitudeSq; /***/ }), -/* 445 */ +/* 447 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97579,50 +97809,50 @@ module.exports = GetMagnitudeSq; var Rectangle = __webpack_require__(9); -Rectangle.Area = __webpack_require__(1166); -Rectangle.Ceil = __webpack_require__(1167); -Rectangle.CeilAll = __webpack_require__(1168); -Rectangle.CenterOn = __webpack_require__(173); -Rectangle.Clone = __webpack_require__(1169); -Rectangle.Contains = __webpack_require__(48); -Rectangle.ContainsPoint = __webpack_require__(1170); -Rectangle.ContainsRect = __webpack_require__(446); -Rectangle.CopyFrom = __webpack_require__(1171); -Rectangle.Decompose = __webpack_require__(435); -Rectangle.Equals = __webpack_require__(1172); -Rectangle.FitInside = __webpack_require__(1173); -Rectangle.FitOutside = __webpack_require__(1174); -Rectangle.Floor = __webpack_require__(1175); -Rectangle.FloorAll = __webpack_require__(1176); +Rectangle.Area = __webpack_require__(1172); +Rectangle.Ceil = __webpack_require__(1173); +Rectangle.CeilAll = __webpack_require__(1174); +Rectangle.CenterOn = __webpack_require__(174); +Rectangle.Clone = __webpack_require__(1175); +Rectangle.Contains = __webpack_require__(49); +Rectangle.ContainsPoint = __webpack_require__(1176); +Rectangle.ContainsRect = __webpack_require__(448); +Rectangle.CopyFrom = __webpack_require__(1177); +Rectangle.Decompose = __webpack_require__(437); +Rectangle.Equals = __webpack_require__(1178); +Rectangle.FitInside = __webpack_require__(1179); +Rectangle.FitOutside = __webpack_require__(1180); +Rectangle.Floor = __webpack_require__(1181); +Rectangle.FloorAll = __webpack_require__(1182); Rectangle.FromPoints = __webpack_require__(182); -Rectangle.FromXY = __webpack_require__(1177); +Rectangle.FromXY = __webpack_require__(1183); Rectangle.GetAspectRatio = __webpack_require__(218); -Rectangle.GetCenter = __webpack_require__(1178); -Rectangle.GetPoint = __webpack_require__(156); +Rectangle.GetCenter = __webpack_require__(1184); +Rectangle.GetPoint = __webpack_require__(157); Rectangle.GetPoints = __webpack_require__(278); -Rectangle.GetSize = __webpack_require__(1179); -Rectangle.Inflate = __webpack_require__(1180); -Rectangle.Intersection = __webpack_require__(1181); +Rectangle.GetSize = __webpack_require__(1185); +Rectangle.Inflate = __webpack_require__(1186); +Rectangle.Intersection = __webpack_require__(1187); Rectangle.MarchingAnts = __webpack_require__(289); -Rectangle.MergePoints = __webpack_require__(1182); -Rectangle.MergeRect = __webpack_require__(1183); -Rectangle.MergeXY = __webpack_require__(1184); -Rectangle.Offset = __webpack_require__(1185); -Rectangle.OffsetPoint = __webpack_require__(1186); -Rectangle.Overlaps = __webpack_require__(1187); -Rectangle.Perimeter = __webpack_require__(113); -Rectangle.PerimeterPoint = __webpack_require__(1188); -Rectangle.Random = __webpack_require__(159); -Rectangle.RandomOutside = __webpack_require__(1189); -Rectangle.SameDimensions = __webpack_require__(1190); -Rectangle.Scale = __webpack_require__(1191); +Rectangle.MergePoints = __webpack_require__(1188); +Rectangle.MergeRect = __webpack_require__(1189); +Rectangle.MergeXY = __webpack_require__(1190); +Rectangle.Offset = __webpack_require__(1191); +Rectangle.OffsetPoint = __webpack_require__(1192); +Rectangle.Overlaps = __webpack_require__(1193); +Rectangle.Perimeter = __webpack_require__(116); +Rectangle.PerimeterPoint = __webpack_require__(1194); +Rectangle.Random = __webpack_require__(160); +Rectangle.RandomOutside = __webpack_require__(1195); +Rectangle.SameDimensions = __webpack_require__(1196); +Rectangle.Scale = __webpack_require__(1197); Rectangle.Union = __webpack_require__(394); module.exports = Rectangle; /***/ }), -/* 446 */ +/* 448 */ /***/ (function(module, exports) { /** @@ -97662,7 +97892,7 @@ module.exports = ContainsRect; /***/ }), -/* 447 */ +/* 449 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97706,7 +97936,7 @@ module.exports = Centroid; /***/ }), -/* 448 */ +/* 450 */ /***/ (function(module, exports) { /** @@ -97747,7 +97977,7 @@ module.exports = Offset; /***/ }), -/* 449 */ +/* 451 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97812,7 +98042,7 @@ module.exports = InCenter; /***/ }), -/* 450 */ +/* 452 */ /***/ (function(module, exports) { /** @@ -97883,7 +98113,7 @@ module.exports = CreateInteractiveObject; /***/ }), -/* 451 */ +/* 453 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98008,7 +98238,7 @@ module.exports = Axis; /***/ }), -/* 452 */ +/* 454 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98154,7 +98384,7 @@ module.exports = Button; /***/ }), -/* 453 */ +/* 455 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98163,8 +98393,8 @@ module.exports = Button; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Axis = __webpack_require__(451); -var Button = __webpack_require__(452); +var Axis = __webpack_require__(453); +var Button = __webpack_require__(454); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(11); var Vector2 = __webpack_require__(3); @@ -98912,7 +99142,7 @@ module.exports = Gamepad; /***/ }), -/* 454 */ +/* 456 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98923,7 +99153,7 @@ module.exports = Gamepad; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(139); +var Events = __webpack_require__(143); /** * @classdesc @@ -99314,7 +99544,7 @@ module.exports = Key; /***/ }), -/* 455 */ +/* 457 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99324,10 +99554,10 @@ module.exports = Key; */ var Class = __webpack_require__(0); -var Events = __webpack_require__(139); +var Events = __webpack_require__(143); var GetFastValue = __webpack_require__(2); -var ProcessKeyCombo = __webpack_require__(1231); -var ResetKeyCombo = __webpack_require__(1233); +var ProcessKeyCombo = __webpack_require__(1237); +var ResetKeyCombo = __webpack_require__(1239); /** * @classdesc @@ -99607,7 +99837,7 @@ module.exports = KeyCombo; /***/ }), -/* 456 */ +/* 458 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99688,7 +99918,7 @@ module.exports = XHRLoader; /***/ }), -/* 457 */ +/* 459 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99702,7 +99932,7 @@ var CONST = __webpack_require__(18); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); -var HTML5AudioFile = __webpack_require__(458); +var HTML5AudioFile = __webpack_require__(460); var IsPlainObject = __webpack_require__(7); /** @@ -99962,7 +100192,7 @@ module.exports = AudioFile; /***/ }), -/* 458 */ +/* 460 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99972,10 +100202,10 @@ module.exports = AudioFile; */ var Class = __webpack_require__(0); -var Events = __webpack_require__(82); +var Events = __webpack_require__(83); var File = __webpack_require__(21); var GetFastValue = __webpack_require__(2); -var GetURL = __webpack_require__(140); +var GetURL = __webpack_require__(144); var IsPlainObject = __webpack_require__(7); /** @@ -100165,7 +100395,7 @@ module.exports = HTML5AudioFile; /***/ }), -/* 459 */ +/* 461 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100336,7 +100566,7 @@ module.exports = ScriptFile; /***/ }), -/* 460 */ +/* 462 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100511,7 +100741,7 @@ module.exports = TextFile; /***/ }), -/* 461 */ +/* 463 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100520,12 +100750,12 @@ module.exports = TextFile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeImage = __webpack_require__(462); -var ArcadeSprite = __webpack_require__(142); +var ArcadeImage = __webpack_require__(464); +var ArcadeSprite = __webpack_require__(146); var Class = __webpack_require__(0); var CONST = __webpack_require__(51); -var PhysicsGroup = __webpack_require__(463); -var StaticPhysicsGroup = __webpack_require__(464); +var PhysicsGroup = __webpack_require__(465); +var StaticPhysicsGroup = __webpack_require__(466); /** * @classdesc @@ -100784,7 +101014,7 @@ module.exports = Factory; /***/ }), -/* 462 */ +/* 464 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100795,7 +101025,7 @@ module.exports = Factory; var Class = __webpack_require__(0); var Components = __webpack_require__(223); -var Image = __webpack_require__(108); +var Image = __webpack_require__(111); /** * @classdesc @@ -100884,7 +101114,7 @@ module.exports = ArcadeImage; /***/ }), -/* 463 */ +/* 465 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100893,7 +101123,7 @@ module.exports = ArcadeImage; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeSprite = __webpack_require__(142); +var ArcadeSprite = __webpack_require__(146); var Class = __webpack_require__(0); var CONST = __webpack_require__(51); var GetFastValue = __webpack_require__(2); @@ -101169,7 +101399,7 @@ module.exports = PhysicsGroup; /***/ }), -/* 464 */ +/* 466 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101178,7 +101408,7 @@ module.exports = PhysicsGroup; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeSprite = __webpack_require__(142); +var ArcadeSprite = __webpack_require__(146); var Class = __webpack_require__(0); var CONST = __webpack_require__(51); var GetFastValue = __webpack_require__(2); @@ -101368,7 +101598,7 @@ module.exports = StaticPhysicsGroup; /***/ }), -/* 465 */ +/* 467 */ /***/ (function(module, exports) { /** @@ -101453,7 +101683,7 @@ module.exports = OverlapRect; /***/ }), -/* 466 */ +/* 468 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101463,10 +101693,10 @@ module.exports = OverlapRect; */ var AngleBetweenPoints = __webpack_require__(322); -var Body = __webpack_require__(467); +var Body = __webpack_require__(469); var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var Collider = __webpack_require__(468); +var Collider = __webpack_require__(470); var CONST = __webpack_require__(51); var DistanceBetween = __webpack_require__(54); var EventEmitter = __webpack_require__(11); @@ -101474,20 +101704,20 @@ var Events = __webpack_require__(224); var FuzzyEqual = __webpack_require__(107); var FuzzyGreaterThan = __webpack_require__(326); var FuzzyLessThan = __webpack_require__(327); -var GetOverlapX = __webpack_require__(469); -var GetOverlapY = __webpack_require__(470); +var GetOverlapX = __webpack_require__(471); +var GetOverlapY = __webpack_require__(472); var GetValue = __webpack_require__(6); var MATH_CONST = __webpack_require__(13); var ProcessQueue = __webpack_require__(192); -var ProcessTileCallbacks = __webpack_require__(1290); +var ProcessTileCallbacks = __webpack_require__(1296); var Rectangle = __webpack_require__(9); -var RTree = __webpack_require__(471); -var SeparateTile = __webpack_require__(1291); -var SeparateX = __webpack_require__(1296); -var SeparateY = __webpack_require__(1297); -var Set = __webpack_require__(135); -var StaticBody = __webpack_require__(473); -var TileIntersectsBody = __webpack_require__(472); +var RTree = __webpack_require__(473); +var SeparateTile = __webpack_require__(1297); +var SeparateX = __webpack_require__(1302); +var SeparateY = __webpack_require__(1303); +var Set = __webpack_require__(139); +var StaticBody = __webpack_require__(475); +var TileIntersectsBody = __webpack_require__(474); var TransformMatrix = __webpack_require__(30); var Vector2 = __webpack_require__(3); var Wrap = __webpack_require__(58); @@ -103887,7 +104117,7 @@ module.exports = World; /***/ }), -/* 467 */ +/* 469 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103900,9 +104130,9 @@ module.exports = World; var Class = __webpack_require__(0); var CONST = __webpack_require__(51); var Events = __webpack_require__(224); -var RadToDeg = __webpack_require__(178); +var RadToDeg = __webpack_require__(179); var Rectangle = __webpack_require__(9); -var RectangleContains = __webpack_require__(48); +var RectangleContains = __webpack_require__(49); var Vector2 = __webpack_require__(3); /** @@ -106245,7 +106475,7 @@ module.exports = Body; /***/ }), -/* 468 */ +/* 470 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106428,7 +106658,7 @@ module.exports = Collider; /***/ }), -/* 469 */ +/* 471 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106536,7 +106766,7 @@ module.exports = GetOverlapX; /***/ }), -/* 470 */ +/* 472 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106644,7 +106874,7 @@ module.exports = GetOverlapY; /***/ }), -/* 471 */ +/* 473 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107255,7 +107485,7 @@ function multiSelect (arr, left, right, n, compare) module.exports = rbush; /***/ }), -/* 472 */ +/* 474 */ /***/ (function(module, exports) { /** @@ -107291,7 +107521,7 @@ module.exports = TileIntersectsBody; /***/ }), -/* 473 */ +/* 475 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107303,7 +107533,7 @@ module.exports = TileIntersectsBody; var CircleContains = __webpack_require__(56); var Class = __webpack_require__(0); var CONST = __webpack_require__(51); -var RectangleContains = __webpack_require__(48); +var RectangleContains = __webpack_require__(49); var Vector2 = __webpack_require__(3); /** @@ -108280,7 +108510,7 @@ module.exports = StaticBody; /***/ }), -/* 474 */ +/* 476 */ /***/ (function(module, exports) { /** @@ -108406,7 +108636,7 @@ module.exports = Pair; /***/ }), -/* 475 */ +/* 477 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108536,7 +108766,7 @@ module.exports = BasePlugin; /***/ }), -/* 476 */ +/* 478 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108581,7 +108811,7 @@ module.exports = ReplaceByIndex; /***/ }), -/* 477 */ +/* 479 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108624,7 +108854,7 @@ module.exports = HasTileAt; /***/ }), -/* 478 */ +/* 480 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108687,7 +108917,7 @@ module.exports = RemoveTileAt; /***/ }), -/* 479 */ +/* 481 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108698,9 +108928,9 @@ module.exports = RemoveTileAt; var Formats = __webpack_require__(32); var Parse2DArray = __webpack_require__(229); -var ParseCSV = __webpack_require__(480); -var ParseJSONTiled = __webpack_require__(481); -var ParseWeltmeister = __webpack_require__(492); +var ParseCSV = __webpack_require__(482); +var ParseJSONTiled = __webpack_require__(483); +var ParseWeltmeister = __webpack_require__(494); /** * Parses raw data of a given Tilemap format into a new MapData object. If no recognized data format @@ -108757,7 +108987,7 @@ module.exports = Parse; /***/ }), -/* 480 */ +/* 482 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108805,7 +109035,7 @@ module.exports = ParseCSV; /***/ }), -/* 481 */ +/* 483 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108816,12 +109046,12 @@ module.exports = ParseCSV; var Formats = __webpack_require__(32); var MapData = __webpack_require__(104); -var ParseTileLayers = __webpack_require__(482); -var ParseImageLayers = __webpack_require__(484); -var ParseTilesets = __webpack_require__(485); -var ParseObjectLayers = __webpack_require__(488); -var BuildTilesetIndex = __webpack_require__(490); -var AssignTileProperties = __webpack_require__(491); +var ParseTileLayers = __webpack_require__(484); +var ParseImageLayers = __webpack_require__(486); +var ParseTilesets = __webpack_require__(487); +var ParseObjectLayers = __webpack_require__(490); +var BuildTilesetIndex = __webpack_require__(492); +var AssignTileProperties = __webpack_require__(493); /** * Parses a Tiled JSON object into a new MapData object. @@ -108883,7 +109113,7 @@ module.exports = ParseJSONTiled; /***/ }), -/* 482 */ +/* 484 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108892,7 +109122,7 @@ module.exports = ParseJSONTiled; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Base64Decode = __webpack_require__(483); +var Base64Decode = __webpack_require__(485); var GetFastValue = __webpack_require__(2); var LayerData = __webpack_require__(103); var ParseGID = __webpack_require__(230); @@ -109141,7 +109371,7 @@ module.exports = ParseTileLayers; /***/ }), -/* 483 */ +/* 485 */ /***/ (function(module, exports) { /** @@ -109184,7 +109414,7 @@ module.exports = Base64Decode; /***/ }), -/* 484 */ +/* 486 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109272,7 +109502,7 @@ module.exports = ParseImageLayers; /***/ }), -/* 485 */ +/* 487 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109282,7 +109512,7 @@ module.exports = ParseImageLayers; */ var Tileset = __webpack_require__(105); -var ImageCollection = __webpack_require__(486); +var ImageCollection = __webpack_require__(488); var ParseObject = __webpack_require__(232); /** @@ -109441,7 +109671,7 @@ module.exports = ParseTilesets; /***/ }), -/* 486 */ +/* 488 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109613,7 +109843,7 @@ module.exports = ImageCollection; /***/ }), -/* 487 */ +/* 489 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109622,7 +109852,7 @@ module.exports = ImageCollection; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HasValue = __webpack_require__(109); +var HasValue = __webpack_require__(112); /** * Returns a new object that only contains the `keys` that were found on the object provided. @@ -109657,7 +109887,7 @@ module.exports = Pick; /***/ }), -/* 488 */ +/* 490 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109668,7 +109898,7 @@ module.exports = Pick; var GetFastValue = __webpack_require__(2); var ParseObject = __webpack_require__(232); -var ObjectLayer = __webpack_require__(489); +var ObjectLayer = __webpack_require__(491); var CreateGroupLayer = __webpack_require__(231); /** @@ -109756,7 +109986,7 @@ module.exports = ParseObjectLayers; /***/ }), -/* 489 */ +/* 491 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109878,7 +110108,7 @@ module.exports = ObjectLayer; /***/ }), -/* 490 */ +/* 492 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109972,7 +110202,7 @@ module.exports = BuildTilesetIndex; /***/ }), -/* 491 */ +/* 493 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110045,7 +110275,7 @@ module.exports = AssignTileProperties; /***/ }), -/* 492 */ +/* 494 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110056,8 +110286,8 @@ module.exports = AssignTileProperties; var Formats = __webpack_require__(32); var MapData = __webpack_require__(104); -var ParseTileLayers = __webpack_require__(493); -var ParseTilesets = __webpack_require__(494); +var ParseTileLayers = __webpack_require__(495); +var ParseTilesets = __webpack_require__(496); /** * Parses a Weltmeister JSON object into a new MapData object. @@ -110112,7 +110342,7 @@ module.exports = ParseWeltmeister; /***/ }), -/* 493 */ +/* 495 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110198,7 +110428,7 @@ module.exports = ParseTileLayers; /***/ }), -/* 494 */ +/* 496 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110249,7 +110479,7 @@ module.exports = ParseTilesets; /***/ }), -/* 495 */ +/* 497 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110259,16 +110489,16 @@ module.exports = ParseTilesets; */ var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(39); -var DynamicTilemapLayer = __webpack_require__(496); +var DegToRad = __webpack_require__(40); +var DynamicTilemapLayer = __webpack_require__(498); var Extend = __webpack_require__(19); var Formats = __webpack_require__(32); var LayerData = __webpack_require__(103); var Rotate = __webpack_require__(335); -var SpliceOne = __webpack_require__(80); -var StaticTilemapLayer = __webpack_require__(497); +var SpliceOne = __webpack_require__(81); +var StaticTilemapLayer = __webpack_require__(499); var Tile = __webpack_require__(74); -var TilemapComponents = __webpack_require__(143); +var TilemapComponents = __webpack_require__(147); var Tileset = __webpack_require__(105); /** @@ -112806,7 +113036,7 @@ module.exports = Tilemap; /***/ }), -/* 496 */ +/* 498 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112817,9 +113047,9 @@ module.exports = Tilemap; var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var DynamicTilemapLayerRender = __webpack_require__(1351); +var DynamicTilemapLayerRender = __webpack_require__(1357); var GameObject = __webpack_require__(14); -var TilemapComponents = __webpack_require__(143); +var TilemapComponents = __webpack_require__(147); /** * @classdesc @@ -112829,7 +113059,7 @@ var TilemapComponents = __webpack_require__(143); * A Dynamic Tilemap Layer trades some speed for being able to apply powerful effects. Unlike a * Static Tilemap Layer, you can apply per-tile effects like tint or alpha, and you can change the * tiles in a DynamicTilemapLayer. - * + * * Use this over a Static Tilemap Layer when you need those features. * * @class DynamicTilemapLayer @@ -112925,7 +113155,7 @@ var DynamicTilemapLayer = new Class({ /** * The Tileset/s associated with this layer. - * + * * As of Phaser 3.14 this property is now an array of Tileset objects, previously it was a single reference. * * @name Phaser.Tilemaps.DynamicTilemapLayer#tileset @@ -113022,17 +113252,17 @@ var DynamicTilemapLayer = new Class({ /** * The rendering (draw) order of the tiles in this layer. - * + * * The default is 0 which is 'right-down', meaning it will draw the tiles starting from the top-left, * drawing to the right and then moving down to the next row. - * + * * The draw orders are: - * + * * 0 = right-down * 1 = left-down * 2 = right-up * 3 = left-up - * + * * This can be changed via the `setRenderOrder` method. * * @name Phaser.Tilemaps.DynamicTilemapLayer#_renderOrder @@ -113058,7 +113288,7 @@ var DynamicTilemapLayer = new Class({ this.setOrigin(); this.setSize(tilemap.tileWidth * this.layer.width, tilemap.tileHeight * this.layer.height); - this.initPipeline('TextureTintPipeline'); + this.initPipeline('MultiPipeline'); }, /** @@ -113067,7 +113297,7 @@ var DynamicTilemapLayer = new Class({ * @method Phaser.Tilemaps.DynamicTilemapLayer#setTilesets * @private * @since 3.14.0 - * + * * @param {(string|string[]|Phaser.Tilemaps.Tileset|Phaser.Tilemaps.Tileset[])} tileset - The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object. */ setTilesets: function (tilesets) @@ -113109,20 +113339,20 @@ var DynamicTilemapLayer = new Class({ /** * Sets the rendering (draw) order of the tiles in this layer. - * + * * The default is 'right-down', meaning it will order the tiles starting from the top-left, * drawing to the right and then moving down to the next row. - * + * * The draw orders are: - * + * * 0 = right-down * 1 = left-down * 2 = right-up * 3 = left-up - * + * * Setting the render order does not change the tiles or how they are stored in the layer, * it purely impacts the order in which they are rendered. - * + * * You can provide either an integer (0 to 3), or the string version of the order. * * @method Phaser.Tilemaps.DynamicTilemapLayer#setRenderOrder @@ -113262,7 +113492,7 @@ var DynamicTilemapLayer = new Class({ * * @method Phaser.Tilemaps.DynamicTilemapLayer#destroy * @since 3.0.0 - * + * * @param {boolean} [removeFromTilemap=true] - Remove this layer from the parent Tilemap? */ destroy: function (removeFromTilemap) @@ -114127,7 +114357,7 @@ module.exports = DynamicTilemapLayer; /***/ }), -/* 497 */ +/* 499 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -114140,9 +114370,9 @@ var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameEvents = __webpack_require__(20); var GameObject = __webpack_require__(14); -var ModelViewProjection = __webpack_require__(151); -var StaticTilemapLayerRender = __webpack_require__(1354); -var TilemapComponents = __webpack_require__(143); +var ModelViewProjection = __webpack_require__(110); +var StaticTilemapLayerRender = __webpack_require__(1360); +var TilemapComponents = __webpack_require__(147); var TransformMatrix = __webpack_require__(30); var Utils = __webpack_require__(10); @@ -114492,7 +114722,7 @@ var StaticTilemapLayer = new Class({ this.updateVBOData(); - this.initPipeline('TextureTintPipeline'); + this.initPipeline('MultiPipeline'); this.mvpInit(); @@ -115647,7 +115877,7 @@ module.exports = StaticTilemapLayer; /***/ }), -/* 498 */ +/* 500 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115960,7 +116190,7 @@ module.exports = TimerEvent; /***/ }), -/* 499 */ +/* 501 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115969,7 +116199,7 @@ module.exports = TimerEvent; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RESERVED = __webpack_require__(1368); +var RESERVED = __webpack_require__(1374); /** * Internal function used by the Tween Builder to return an array of properties @@ -116021,7 +116251,7 @@ module.exports = GetProps; /***/ }), -/* 500 */ +/* 502 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116069,7 +116299,7 @@ module.exports = GetTweens; /***/ }), -/* 501 */ +/* 503 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116080,9 +116310,9 @@ module.exports = GetTweens; var Defaults = __webpack_require__(236); var GetAdvancedValue = __webpack_require__(15); -var GetBoolean = __webpack_require__(88); +var GetBoolean = __webpack_require__(89); var GetEaseFunction = __webpack_require__(69); -var GetNewValue = __webpack_require__(147); +var GetNewValue = __webpack_require__(151); var GetValue = __webpack_require__(6); var GetValueOp = __webpack_require__(235); var Tween = __webpack_require__(237); @@ -116199,7 +116429,7 @@ module.exports = NumberTweenBuilder; /***/ }), -/* 502 */ +/* 504 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116445,7 +116675,7 @@ module.exports = StaggerBuilder; /***/ }), -/* 503 */ +/* 505 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116457,14 +116687,14 @@ module.exports = StaggerBuilder; var Clone = __webpack_require__(67); var Defaults = __webpack_require__(236); var GetAdvancedValue = __webpack_require__(15); -var GetBoolean = __webpack_require__(88); +var GetBoolean = __webpack_require__(89); var GetEaseFunction = __webpack_require__(69); -var GetNewValue = __webpack_require__(147); +var GetNewValue = __webpack_require__(151); var GetTargets = __webpack_require__(234); -var GetTweens = __webpack_require__(500); +var GetTweens = __webpack_require__(502); var GetValue = __webpack_require__(6); -var Timeline = __webpack_require__(504); -var TweenBuilder = __webpack_require__(148); +var Timeline = __webpack_require__(506); +var TweenBuilder = __webpack_require__(152); /** * Builds a Timeline of Tweens based on a configuration object. @@ -116599,7 +116829,7 @@ module.exports = TimelineBuilder; /***/ }), -/* 504 */ +/* 506 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116611,8 +116841,8 @@ module.exports = TimelineBuilder; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(11); var Events = __webpack_require__(238); -var TweenBuilder = __webpack_require__(148); -var TWEEN_CONST = __webpack_require__(89); +var TweenBuilder = __webpack_require__(152); +var TWEEN_CONST = __webpack_require__(90); /** * @classdesc @@ -117504,7 +117734,7 @@ module.exports = Timeline; /***/ }), -/* 505 */ +/* 507 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -117513,9 +117743,9 @@ module.exports = Timeline; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseAnimation = __webpack_require__(155); +var BaseAnimation = __webpack_require__(156); var Class = __webpack_require__(0); -var Events = __webpack_require__(112); +var Events = __webpack_require__(115); /** * @classdesc @@ -118699,7 +118929,7 @@ module.exports = Animation; /***/ }), -/* 506 */ +/* 508 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -118709,12 +118939,12 @@ module.exports = Animation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CanvasSnapshot = __webpack_require__(507); -var CameraEvents = __webpack_require__(40); +var CanvasSnapshot = __webpack_require__(509); +var CameraEvents = __webpack_require__(41); var Class = __webpack_require__(0); var CONST = __webpack_require__(33); -var GetBlendModes = __webpack_require__(508); -var ScaleEvents = __webpack_require__(92); +var GetBlendModes = __webpack_require__(510); +var ScaleEvents = __webpack_require__(93); var TransformMatrix = __webpack_require__(30); /** @@ -119506,7 +119736,7 @@ module.exports = CanvasRenderer; /***/ }), -/* 507 */ +/* 509 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119599,7 +119829,7 @@ module.exports = CanvasSnapshot; /***/ }), -/* 508 */ +/* 510 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119663,7 +119893,7 @@ module.exports = GetBlendModes; /***/ }), -/* 509 */ +/* 511 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119673,26 +119903,27 @@ module.exports = GetBlendModes; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseCamera = __webpack_require__(91); -var CameraEvents = __webpack_require__(40); +var BaseCamera = __webpack_require__(92); +var CameraEvents = __webpack_require__(41); var Class = __webpack_require__(0); var CONST = __webpack_require__(33); var GameEvents = __webpack_require__(20); -var IsSizePowerOfTwo = __webpack_require__(122); +var IsSizePowerOfTwo = __webpack_require__(125); var NOOP = __webpack_require__(1); var ProjectOrtho = __webpack_require__(181); -var ScaleEvents = __webpack_require__(92); -var SpliceOne = __webpack_require__(80); -var TextureEvents = __webpack_require__(123); +var ScaleEvents = __webpack_require__(93); +var SpliceOne = __webpack_require__(81); +var TextureEvents = __webpack_require__(127); var TransformMatrix = __webpack_require__(30); var Utils = __webpack_require__(10); -var WebGLSnapshot = __webpack_require__(510); +var WebGLSnapshot = __webpack_require__(512); // Default Pipelines -var BitmapMaskPipeline = __webpack_require__(511); -var ForwardDiffuseLightPipeline = __webpack_require__(512); -var TextureTintPipeline = __webpack_require__(150); -var TextureTintStripPipeline = __webpack_require__(513); +var BitmapMaskPipeline = __webpack_require__(513); +var LightPipeline = __webpack_require__(514); +var MultiPipeline = __webpack_require__(109); +var RopePipeline = __webpack_require__(515); +var SinglePipeline = __webpack_require__(516); /** * @callback WebGLContextCallback @@ -120472,11 +120703,6 @@ var WebGLRenderer = new Class({ // Clear previous pipelines and reload default ones this.pipelines = {}; - this.addPipeline('TextureTintPipeline', new TextureTintPipeline({ game: game, renderer: this })); - this.addPipeline('TextureTintStripPipeline', new TextureTintStripPipeline({ game: game, renderer: this })); - this.addPipeline('BitmapMaskPipeline', new BitmapMaskPipeline({ game: game, renderer: this })); - this.addPipeline('Light2D', new ForwardDiffuseLightPipeline({ game: game, renderer: this, maxLights: config.maxLights })); - this.setBlendMode(CONST.BlendModes.NORMAL); game.textures.once(TextureEvents.READY, this.boot, this); @@ -120493,14 +120719,18 @@ var WebGLRenderer = new Class({ */ boot: function () { - for (var pipelineName in this.pipelines) - { - this.pipelines[pipelineName].boot(); - } + var game = this.game; - var blank = this.game.textures.getFrame('__DEFAULT'); + var multi = this.addPipeline('MultiPipeline', new MultiPipeline({ game: game })); - this.pipelines.TextureTintPipeline.currentFrame = blank; + this.addPipeline('SinglePipeline', new SinglePipeline({ game: game })); + this.addPipeline('RopePipeline', new RopePipeline({ game: game })); + this.addPipeline('BitmapMaskPipeline', new BitmapMaskPipeline({ game: game })); + this.addPipeline('Light2D', new LightPipeline({ game: game })); + + var blank = game.textures.getFrame('__DEFAULT'); + + multi.currentFrame = blank; this.blankTexture = blank; @@ -120510,13 +120740,13 @@ var WebGLRenderer = new Class({ gl.enable(gl.SCISSOR_TEST); - this.setPipeline(this.pipelines.TextureTintPipeline); + this.setPipeline(multi); - this.game.scale.on(ScaleEvents.RESIZE, this.onResize, this); + game.scale.on(ScaleEvents.RESIZE, this.onResize, this); - var baseSize = this.game.scale.baseSize; + var baseSize = game.scale.baseSize; - this.resize(baseSize.width, baseSize.height, this.game.scale.resolution); + this.resize(baseSize.width, baseSize.height, game.scale.resolution); }, /** @@ -120699,6 +120929,11 @@ var WebGLRenderer = new Class({ pipelineInstance.name = pipelineName; + if (!pipelineInstance.hasBooted) + { + pipelineInstance.boot(); + } + this.pipelines[pipelineName].resize(this.width, this.height, this.config.resolution); return pipelineInstance; @@ -120886,9 +121121,6 @@ var WebGLRenderer = new Class({ this.resetTextures(true); - // gl.activeTexture(gl.TEXTURE1); - // gl.bindTexture(gl.TEXTURE_2D, this.blankTexture.glTexture); - this.currentActiveTexture = 1; this.startActiveTexture++; @@ -121057,6 +121289,13 @@ var WebGLRenderer = new Class({ */ setTextureSource: function (textureSource) { + if (this.currentPipeline.forceZero) + { + this.setTextureZero(textureSource.glTexture, true); + + return 0; + } + var gl = this.gl; var currentActiveTexture = this.currentActiveTexture; @@ -121121,11 +121360,17 @@ var WebGLRenderer = new Class({ * @since 3.50.0 * * @param {WebGLTexture} texture - The WebGL texture that needs to be bound. + * @param {boolean} [flush=false] - Flush the pipeline if the texture is different? */ - setTextureZero: function (texture) + setTextureZero: function (texture, flush) { if (this.textureZero !== texture) { + if (flush) + { + this.flush(); + } + var gl = this.gl; gl.activeTexture(gl.TEXTURE0); @@ -121274,6 +121519,13 @@ var WebGLRenderer = new Class({ */ setTexture2D: function (texture) { + if (this.currentPipeline.forceZero) + { + this.setTextureZero(texture, true); + + return 0; + } + var gl = this.gl; var currentActiveTexture = this.currentActiveTexture; @@ -121831,7 +122083,7 @@ var WebGLRenderer = new Class({ var cw = camera._cw; var ch = camera._ch; - var TextureTintPipeline = this.pipelines.TextureTintPipeline; + var MultiPipeline = this.pipelines.MultiPipeline; var color = camera.backgroundColor; @@ -121849,7 +122101,7 @@ var WebGLRenderer = new Class({ gl.clear(gl.COLOR_BUFFER_BIT); - ProjectOrtho(TextureTintPipeline, cx, cw + cx, cy, ch + cy, -1000, 1000); + ProjectOrtho(MultiPipeline, cx, cw + cx, cy, ch + cy, -1000, 1000); if (camera.mask) { @@ -121861,7 +122113,7 @@ var WebGLRenderer = new Class({ if (color.alphaGL > 0) { - TextureTintPipeline.drawFillRect( + MultiPipeline.drawFillRect( cx, cy, cw + cx, ch + cy, Utils.getTintFromFloats(color.redGL, color.greenGL, color.blueGL, 1), color.alphaGL @@ -121884,7 +122136,7 @@ var WebGLRenderer = new Class({ if (color.alphaGL > 0) { - TextureTintPipeline.drawFillRect( + MultiPipeline.drawFillRect( cx, cy, cw , ch, Utils.getTintFromFloats(color.redGL, color.greenGL, color.blueGL, 1), color.alphaGL @@ -121929,12 +122181,12 @@ var WebGLRenderer = new Class({ */ postRenderCamera: function (camera) { - this.setPipeline(this.pipelines.TextureTintPipeline); + this.setPipeline(this.pipelines.MultiPipeline); - var TextureTintPipeline = this.pipelines.TextureTintPipeline; + var MultiPipeline = this.pipelines.MultiPipeline; - camera.flashEffect.postRenderWebGL(TextureTintPipeline, Utils.getTintFromFloats); - camera.fadeEffect.postRenderWebGL(TextureTintPipeline, Utils.getTintFromFloats); + camera.flashEffect.postRenderWebGL(MultiPipeline, Utils.getTintFromFloats); + camera.fadeEffect.postRenderWebGL(MultiPipeline, Utils.getTintFromFloats); camera.dirty = false; @@ -121942,7 +122194,7 @@ var WebGLRenderer = new Class({ if (camera.renderToTexture) { - TextureTintPipeline.flush(); + MultiPipeline.flush(); this.setFramebuffer(null); @@ -121950,11 +122202,11 @@ var WebGLRenderer = new Class({ if (camera.renderToGame) { - ProjectOrtho(TextureTintPipeline, 0, TextureTintPipeline.width, TextureTintPipeline.height, 0, -1000.0, 1000.0); + ProjectOrtho(MultiPipeline, 0, MultiPipeline.width, MultiPipeline.height, 0, -1000.0, 1000.0); var getTint = Utils.getTintAppendFloatAlpha; - var pipeline = (camera.pipeline) ? camera.pipeline : TextureTintPipeline; + var pipeline = (camera.pipeline) ? camera.pipeline : MultiPipeline; pipeline.batchTexture( camera, @@ -122040,7 +122292,7 @@ var WebGLRenderer = new Class({ this.textureFlush = 0; - this.setPipeline(this.pipelines.TextureTintPipeline); + this.setPipeline(this.pipelines.MultiPipeline); }, /** @@ -123054,7 +123306,7 @@ module.exports = WebGLRenderer; /***/ }), -/* 510 */ +/* 512 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123164,7 +123416,7 @@ module.exports = WebGLSnapshot; /***/ }), -/* 511 */ +/* 513 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123175,23 +123427,18 @@ module.exports = WebGLSnapshot; */ var Class = __webpack_require__(0); -var ShaderSourceFS = __webpack_require__(787); -var ShaderSourceVS = __webpack_require__(788); -var WebGLPipeline = __webpack_require__(149); +var GetFastValue = __webpack_require__(2); +var ShaderSourceFS = __webpack_require__(790); +var ShaderSourceVS = __webpack_require__(791); +var WebGLPipeline = __webpack_require__(108); /** * @classdesc - * BitmapMaskPipeline handles all bitmap masking rendering in WebGL. It works by using + * + * + * + * BitmapMaskPipeline handles all bitmap masking rendering in WebGL. It works by using * sampling two texture on the fragment shader and using the fragment's alpha to clip the region. - * The config properties are: - * - game: Current game instance. - * - renderer: Current WebGL renderer. - * - topology: This indicates how the primitives are rendered. The default value is GL_TRIANGLES. - * Here is the full list of rendering primitives (https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants). - * - vertShader: Source for vertex shader as a string. - * - fragShader: Source for fragment shader as a string. - * - vertexCapacity: The amount of vertices that shall be allocated - * - vertexSize: The size of a single vertex in bytes. * * @class BitmapMaskPipeline * @extends Phaser.Renderer.WebGL.WebGLPipeline @@ -123199,42 +123446,34 @@ var WebGLPipeline = __webpack_require__(149); * @constructor * @since 3.0.0 * - * @param {object} config - Used for overriding shader an pipeline properties if extending this pipeline. + * @param {Phaser.Types.Renderer.WebGL.WebGLPipelineConfig} config - The configuration options for this pipeline. */ var BitmapMaskPipeline = new Class({ Extends: WebGLPipeline, - + initialize: function BitmapMaskPipeline (config) { - WebGLPipeline.call(this, { - game: config.game, - renderer: config.renderer, - gl: config.renderer.gl, - topology: (config.topology ? config.topology : config.renderer.gl.TRIANGLES), - vertShader: (config.vertShader ? config.vertShader : ShaderSourceVS), - fragShader: (config.fragShader ? config.fragShader : ShaderSourceFS), - vertexCapacity: (config.vertexCapacity ? config.vertexCapacity : 3), + config.fragShader = GetFastValue(config, 'fragShader', ShaderSourceFS), + config.vertShader = GetFastValue(config, 'vertShader', ShaderSourceVS), + config.vertexSize = GetFastValue(config, 'vertexSize', 8), + config.vertexCapacity = GetFastValue(config, 'vertexCapacity', 3), + config.vertices = GetFastValue(config, 'vertices', new Float32Array([ -1, 1, -1, -7, 7, 1 ]).buffer), + config.attributes = GetFastValue(config, 'attributes', [ + { + name: 'inPosition', + size: 2, + type: config.game.renderer.gl.FLOAT, + normalized: false, + offset: 0, + enabled: false, + location: -1 + } + ]); - vertexSize: (config.vertexSize ? config.vertexSize : - Float32Array.BYTES_PER_ELEMENT * 2), - - vertices: new Float32Array([ - -1, +1, -1, -7, +7, +1 - ]).buffer, - - attributes: [ - { - name: 'inPosition', - size: 2, - type: config.renderer.gl.FLOAT, - normalized: false, - offset: 0 - } - ] - }); + WebGLPipeline.call(this, config); /** * Float32 view of the array buffer containing the pipeline's vertices. @@ -123243,20 +123482,10 @@ var BitmapMaskPipeline = new Class({ * @type {Float32Array} * @since 3.0.0 */ - this.vertexViewF32 = new Float32Array(this.vertexData); + // this.vertexViewF32 = new Float32Array(this.vertexData); /** - * Size of the batch. - * - * @name Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#maxQuads - * @type {number} - * @default 1 - * @since 3.0.0 - */ - this.maxQuads = 1; - - /** - * Dirty flag to check if resolution properties need to be updated on the + * Dirty flag to check if resolution properties need to be updated on the * masking shader. * * @name Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#resolutionDirty @@ -123264,7 +123493,7 @@ var BitmapMaskPipeline = new Class({ * @default true * @since 3.0.0 */ - this.resolutionDirty = true; + // this.resolutionDirty = true; }, /** @@ -123275,14 +123504,13 @@ var BitmapMaskPipeline = new Class({ * @since 3.0.0 * * @return {this} This WebGLPipeline instance. - */ onBind: function () { WebGLPipeline.prototype.onBind.call(this); var renderer = this.renderer; var program = this.program; - + if (this.resolutionDirty) { renderer.setFloat2(program, 'uResolution', this.width, this.height); @@ -123293,6 +123521,31 @@ var BitmapMaskPipeline = new Class({ return this; }, + */ + + /** + * Called every time the pipeline is bound by the renderer. + * Sets the shader program, vertex buffer and other resources. + * Should only be called when changing pipeline. + * + * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#bind + * @since 3.50.0 + * + * @return {this} This WebGLPipeline instance. + */ + bind: function () + { + WebGLPipeline.prototype.bind.call(this); + + var renderer = this.renderer; + var program = this.program; + + renderer.setFloat2(program, 'uResolution', this.width, this.height); + renderer.setInt1(program, 'uMainSampler', 0); + renderer.setInt1(program, 'uMaskSampler', 1); + + return this; + }, /** * Resizes this pipeline and updates the projection. @@ -123357,10 +123610,10 @@ var BitmapMaskPipeline = new Class({ }, /** - * The masked game objects framebuffer is unbound and its texture - * is bound together with the mask texture and the mask shader and + * The masked game objects framebuffer is unbound and its texture + * is bound together with the mask texture and the mask shader and * a draw call with a single quad is processed. Here is where the - * masking effect is applied. + * masking effect is applied. * * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#endMask * @since 3.0.0 @@ -123429,7 +123682,7 @@ module.exports = BitmapMaskPipeline; /***/ }), -/* 512 */ +/* 514 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123440,47 +123693,81 @@ module.exports = BitmapMaskPipeline; */ var Class = __webpack_require__(0); -var ShaderSourceFS = __webpack_require__(789); -var TextureTintPipeline = __webpack_require__(150); -var WebGLPipeline = __webpack_require__(149); +var GetFastValue = __webpack_require__(2); +var ShaderSourceFS = __webpack_require__(792); +var MultiPipeline = __webpack_require__(109); +var WebGLPipeline = __webpack_require__(108); var LIGHT_COUNT = 10; /** * @classdesc - * ForwardDiffuseLightPipeline implements a forward rendering approach for 2D lights. * - * It works by using a custom shader, combined with Light Game Objects, that provides an ambient - * illumination effect in your games. + * The Light Pipeline is an extension of the Multi Pipeline and uses a custom shader + * designed to handle forward diffused rendering of 2D lights in a Scene. * - * This pipeline extends TextureTintPipeline so it implements all of its rendering functions and batching system. + * The shader works in tandem with Light Game Objects, and optionally texture normal maps, + * to provide an ambient illumination effect. * - * @class ForwardDiffuseLightPipeline - * @extends Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline + * If you wish to provide your own shader, you can use the `%LIGHT_COUNT%` declaration in the source, + * and it will be automatically replaced at run-time with the total number of configured lights. + * + * The maximum number of lights can be set in the Render Config `maxLights` property and defaults to 10. + * + * Prior to Phaser v3.50 this pipeline was called the `ForwardDiffuseLightPipeline`. + * + * The fragment shader it uses can be found in `shaders/src/Light.frag`. + * The vertex shader it uses can be found in `shaders/src/Multi.vert`. + * + * The default shader attributes for this pipeline are: + * + * `inPosition` (vec2, offset 0) + * `inTexCoord` (vec2, offset 8) + * `inTexId` (float, offset 16) + * `inTintEffect` (float, offset 20) + * `inTint` (vec4, offset 24, normalized) + * + * The default shader uniforms for this pipeline are: + * + * `uProjectionMatrix` (mat4) + * `uViewMatrix` (mat4) + * `uModelMatrix` (mat4) + * `uMainSampler` (sampler2D) + * `uNormSampler` (sampler2D) + * `uCamera` (vec4) + * `uResolution` (vec2) + * `uAmbientLightColor` (vec3) + * `uInverseRotationMatrix` (mat3) + * `uLights` (Light struct) + * + * @class LightPipeline + * @extends Phaser.Renderer.WebGL.Pipelines.MultiPipeline * @memberof Phaser.Renderer.WebGL.Pipelines * @constructor - * @since 3.0.0 + * @since 3.50.0 * - * @param {object} config - The configuration of the pipeline, same as the {@link Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline}. The fragment shader will be replaced with the lighting shader. + * @param {Phaser.Types.Renderer.WebGL.WebGLPipelineConfig} config - The configuration options for this pipeline. */ -var ForwardDiffuseLightPipeline = new Class({ +var LightPipeline = new Class({ - Extends: TextureTintPipeline, + Extends: MultiPipeline, initialize: - function ForwardDiffuseLightPipeline (config) + function LightPipeline (config) { - LIGHT_COUNT = config.maxLights; + LIGHT_COUNT = config.game.renderer.config.maxLights; - config.fragShader = ShaderSourceFS.replace('%LIGHT_COUNT%', LIGHT_COUNT.toString()); + var fragmentShaderSource = GetFastValue(config, 'fragShader', ShaderSourceFS); - TextureTintPipeline.call(this, config); + config.fragShader = fragmentShaderSource.replace('%LIGHT_COUNT%', LIGHT_COUNT.toString()); + + MultiPipeline.call(this, config); /** * Inverse rotation matrix for normal map rotations. * - * @name Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#inverseRotationMatrix + * @name Phaser.Renderer.WebGL.Pipelines.LightPipeline#inverseRotationMatrix * @type {Float32Array} * @private * @since 3.16.0 @@ -123495,7 +123782,7 @@ var ForwardDiffuseLightPipeline = new Class({ * Stores a default normal map, which is an object with a `glTexture` property that * maps to a 1x1 texture of the color #7f7fff created in the `boot` method. * - * @name Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#defaultNormalMap + * @name Phaser.Renderer.WebGL.Pipelines.LightPipeline#defaultNormalMap * @type {object} * @since 3.50.0 */ @@ -123504,7 +123791,7 @@ var ForwardDiffuseLightPipeline = new Class({ /** * Stores the previous number of lights rendered. * - * @name Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#lightCount + * @name Phaser.Renderer.WebGL.Pipelines.LightPipeline#lightCount * @type {number} * @since 3.50.0 */ @@ -123519,7 +123806,7 @@ var ForwardDiffuseLightPipeline = new Class({ * By this stage all Game level systems are now in place and you can perform any final * tasks that the pipeline may need that relied on game systems such as the Texture Manager. * - * @method Phaser.Renderer.WebGL.ForwardDiffuseLightPipeline#boot + * @method Phaser.Renderer.WebGL.LightPipeline#boot * @since 3.11.0 */ boot: function () @@ -123546,7 +123833,7 @@ var ForwardDiffuseLightPipeline = new Class({ * Sets the shader program, vertex buffer and other resources. * Should only be called when changing pipeline. * - * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#bind + * @method Phaser.Renderer.WebGL.Pipelines.LightPipeline#bind * @since 3.50.0 * * @return {this} This WebGLPipeline instance. @@ -123568,7 +123855,7 @@ var ForwardDiffuseLightPipeline = new Class({ /** * This function sets all the needed resources for each camera pass. * - * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#onRender + * @method Phaser.Renderer.WebGL.Pipelines.LightPipeline#onRender * @since 3.0.0 * * @param {Phaser.Scene} scene - The Scene being rendered. @@ -123652,7 +123939,7 @@ var ForwardDiffuseLightPipeline = new Class({ * Rotates the normal map vectors inversely by the given angle. * Only works in 2D space. * - * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#setNormalMapRotation + * @method Phaser.Renderer.WebGL.Pipelines.LightPipeline#setNormalMapRotation * @since 3.16.0 * * @param {number} rotation - The angle of rotation in radians. @@ -123693,7 +123980,7 @@ var ForwardDiffuseLightPipeline = new Class({ /** * Assigns a texture to the current batch. If a different texture is already set it creates a new batch object. * - * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#setTexture2D + * @method Phaser.Renderer.WebGL.Pipelines.LightPipeline#setTexture2D * @since 3.50.0 * * @param {WebGLTexture} [texture] - WebGLTexture that will be assigned to the current batch. If not given uses blankTexture. @@ -123728,7 +124015,7 @@ var ForwardDiffuseLightPipeline = new Class({ * Custom pipelines can use this method in order to perform any required pre-batch tasks * for the given Game Object. It must return the texture unit the Game Object was assigned. * - * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#setGameObject + * @method Phaser.Renderer.WebGL.Pipelines.LightPipeline#setGameObject * @since 3.50.0 * * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object being rendered or added to the batch. @@ -123763,7 +124050,7 @@ var ForwardDiffuseLightPipeline = new Class({ * Returns the normal map WebGLTexture from the given Game Object. * If the Game Object doesn't have one, it returns the default normal map from this pipeline instead. * - * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#getNormalMap + * @method Phaser.Renderer.WebGL.Pipelines.LightPipeline#getNormalMap * @since 3.50.0 * * @param {Phaser.GameObjects.GameObject} [gameObject] - The Game Object to get the normal map from. @@ -123808,42 +124095,65 @@ var ForwardDiffuseLightPipeline = new Class({ }); -ForwardDiffuseLightPipeline.LIGHT_COUNT = LIGHT_COUNT; +LightPipeline.LIGHT_COUNT = LIGHT_COUNT; -module.exports = ForwardDiffuseLightPipeline; +module.exports = LightPipeline; /***/ }), -/* 513 */ +/* 515 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @author Felipe Alfonso <@bitnenfer> * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var ModelViewProjection = __webpack_require__(151); -var TextureTintPipeline = __webpack_require__(150); +var ModelViewProjection = __webpack_require__(110); +var MultiPipeline = __webpack_require__(109); /** * @classdesc - * The Texture Tint Strip Pipeline is a variation of the Texture Tint Pipeline that uses a TRIANGLE_STRIP for - * its topology, instead of TRIANGLES. This is primarily used by the Rope Game Object any anything that extends it. * - * @class TextureTintStripPipeline - * @extends Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline + * The Rope Pipeline is a variation of the Multi Pipeline that uses a `TRIANGLE_STRIP` for + * its topology, instead of TRIANGLES. This is primarily used by the Rope Game Object, + * or anything that extends it. + * + * Prior to Phaser v3.50 this pipeline was called the `TextureTintStripPipeline`. + * + * The fragment shader it uses can be found in `shaders/src/Multi.frag`. + * The vertex shader it uses can be found in `shaders/src/Multi.vert`. + * + * The default shader attributes for this pipeline are: + * + * `inPosition` (vec2, offset 0) + * `inTexCoord` (vec2, offset 8) + * `inTexId` (float, offset 16) + * `inTintEffect` (float, offset 20) + * `inTint` (vec4, offset 24, normalized) + * + * The default shader uniforms for this pipeline are: + * + * `uProjectionMatrix` (mat4) + * `uViewMatrix` (mat4) + * `uModelMatrix` (mat4) + * `uMainSampler` (sampler2D array) + * + * The pipeline is structurally identical to the Multi Pipeline and should be treated as such. + * + * @class RopePipeline + * @extends Phaser.Renderer.WebGL.Pipelines.MultiPipeline * @memberof Phaser.Renderer.WebGL.Pipelines * @constructor - * @since 3.23.0 + * @since 3.50.0 * - * @param {object} config - The configuration options for this Texture Tint Pipeline, as described above. + * @param {Phaser.Types.Renderer.WebGL.WebGLPipelineConfig} config - The configuration options for this pipeline. */ -var TextureTintStripPipeline = new Class({ +var RopePipeline = new Class({ - Extends: TextureTintPipeline, + Extends: MultiPipeline, Mixins: [ ModelViewProjection @@ -123851,19 +124161,347 @@ var TextureTintStripPipeline = new Class({ initialize: - function TextureTintStripPipeline (config) + function RopePipeline (config) { - config.topology = config.renderer.gl.TRIANGLE_STRIP; + config.topology = config.game.renderer.gl.TRIANGLE_STRIP; - TextureTintPipeline.call(this, config); + MultiPipeline.call(this, config); } }); -module.exports = TextureTintStripPipeline; +module.exports = RopePipeline; /***/ }), -/* 514 */ +/* 516 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var GetFastValue = __webpack_require__(2); +var ModelViewProjection = __webpack_require__(110); +var MultiPipeline = __webpack_require__(109); +var ShaderSourceFS = __webpack_require__(795); +var ShaderSourceVS = __webpack_require__(796); +var WebGLPipeline = __webpack_require__(108); + +/** + * @classdesc + * + * The Single Pipeline is a special version of the Multi Pipeline that only ever + * uses one single texture, bound to texture unit zero. Although not as efficient as the + * Multi Pipeline, it provides an easier way to create custom pipelines that only require + * a single bound texture. + * + * Prior to Phaser v3.50 this pipeline didn't exist, but could be compared to the old `TextureTintPipeline`. + * + * The fragment shader it uses can be found in `shaders/src/Single.frag`. + * The vertex shader it uses can be found in `shaders/src/Single.vert`. + * + * The default shader attributes for this pipeline are: + * + * `inPosition` (vec2, offset 0) + * `inTexCoord` (vec2, offset 8) + * `inTintEffect` (float, offset 16) + * `inTint` (vec4, offset 20, normalized) + * + * The default shader uniforms for this pipeline are: + * + * `uProjectionMatrix` (mat4) + * `uViewMatrix` (mat4) + * `uModelMatrix` (mat4) + * `uMainSampler` (sampler2D) + * + * @class SinglePipeline + * @extends Phaser.Renderer.WebGL.Pipelines.MultiPipeline + * @memberof Phaser.Renderer.WebGL.Pipelines + * @constructor + * @since 3.50.0 + * + * @param {Phaser.Types.Renderer.WebGL.WebGLPipelineConfig} config - The configuration options for this pipeline. + */ +var SinglePipeline = new Class({ + + Extends: MultiPipeline, + + Mixins: [ + ModelViewProjection + ], + + initialize: + + function SinglePipeline (config) + { + var gl = config.game.renderer.gl; + + config.fragShader = GetFastValue(config, 'fragShader', ShaderSourceFS), + config.vertShader = GetFastValue(config, 'vertShader', ShaderSourceVS), + config.vertexSize = GetFastValue(config, 'vertexSize', 24), + config.attributes = GetFastValue(config, 'attributes', [ + { + name: 'inPosition', + size: 2, + type: gl.FLOAT, + normalized: false, + offset: 0, + enabled: false, + location: -1 + }, + { + name: 'inTexCoord', + size: 2, + type: gl.FLOAT, + normalized: false, + offset: 8, + enabled: false, + location: -1 + }, + { + name: 'inTintEffect', + size: 1, + type: gl.FLOAT, + normalized: false, + offset: 16, + enabled: false, + location: -1 + }, + { + name: 'inTint', + size: 4, + type: gl.UNSIGNED_BYTE, + normalized: true, + offset: 20, + enabled: false, + location: -1 + } + ]); + + MultiPipeline.call(this, config); + + this.forceZero = true; + }, + + /** + * Adds the vertices data into the batch and flushes if full. + * + * Assumes 6 vertices in the following arrangement: + * + * ``` + * 0----3 + * |\ B| + * | \ | + * | \ | + * | A \| + * | \ + * 1----2 + * ``` + * + * Where tx0/ty0 = 0, tx1/ty1 = 1, tx2/ty2 = 2 and tx3/ty3 = 3 + * + * @method Phaser.Renderer.WebGL.Pipelines.SinglePipeline#batchQuad + * @since 3.50.0 + * + * @param {number} x0 - The top-left x position. + * @param {number} y0 - The top-left y position. + * @param {number} x1 - The bottom-left x position. + * @param {number} y1 - The bottom-left y position. + * @param {number} x2 - The bottom-right x position. + * @param {number} y2 - The bottom-right y position. + * @param {number} x3 - The top-right x position. + * @param {number} y3 - The top-right y position. + * @param {number} u0 - UV u0 value. + * @param {number} v0 - UV v0 value. + * @param {number} u1 - UV u1 value. + * @param {number} v1 - UV v1 value. + * @param {number} tintTL - The top-left tint color value. + * @param {number} tintTR - The top-right tint color value. + * @param {number} tintBL - The bottom-left tint color value. + * @param {number} tintBR - The bottom-right tint color value. + * @param {(number|boolean)} tintEffect - The tint effect for the shader to use. + * @param {WebGLTexture} [texture] - WebGLTexture that will be assigned to the current batch if a flush occurs. + * @param {integer} [unit=0] - This parameter isn't used by this pipeline, but is retained for TTP support. + * + * @return {boolean} `true` if this method caused the batch to flush, otherwise `false`. + */ + batchQuad: function (x0, y0, x1, y1, x2, y2, x3, y3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, unit) + { + if (unit === undefined) { unit = this.currentUnit; } + + var hasFlushed = false; + + if (this.vertexCount + 6 > this.vertexCapacity) + { + this.flush(); + + hasFlushed = true; + + unit = this.setTexture2D(texture); + } + + var vertexViewF32 = this.vertexViewF32; + var vertexViewU32 = this.vertexViewU32; + + var vertexOffset = (this.vertexCount * this.vertexComponentCount) - 1; + + vertexViewF32[++vertexOffset] = x0; + vertexViewF32[++vertexOffset] = y0; + vertexViewF32[++vertexOffset] = u0; + vertexViewF32[++vertexOffset] = v0; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintTL; + + vertexViewF32[++vertexOffset] = x1; + vertexViewF32[++vertexOffset] = y1; + vertexViewF32[++vertexOffset] = u0; + vertexViewF32[++vertexOffset] = v1; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintBL; + + vertexViewF32[++vertexOffset] = x2; + vertexViewF32[++vertexOffset] = y2; + vertexViewF32[++vertexOffset] = u1; + vertexViewF32[++vertexOffset] = v1; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintBR; + + vertexViewF32[++vertexOffset] = x0; + vertexViewF32[++vertexOffset] = y0; + vertexViewF32[++vertexOffset] = u0; + vertexViewF32[++vertexOffset] = v0; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintTL; + + vertexViewF32[++vertexOffset] = x2; + vertexViewF32[++vertexOffset] = y2; + vertexViewF32[++vertexOffset] = u1; + vertexViewF32[++vertexOffset] = v1; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintBR; + + vertexViewF32[++vertexOffset] = x3; + vertexViewF32[++vertexOffset] = y3; + vertexViewF32[++vertexOffset] = u1; + vertexViewF32[++vertexOffset] = v0; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintTR; + + this.vertexCount += 6; + + return hasFlushed; + }, + + /** + * Adds the vertices data into the batch and flushes if full. + * + * Assumes 3 vertices in the following arrangement: + * + * ``` + * 0 + * |\ + * | \ + * | \ + * | \ + * | \ + * 1-----2 + * ``` + * + * @method Phaser.Renderer.WebGL.Pipelines.SinglePipeline#batchTri + * @since 3.50.0 + * + * @param {number} x1 - The bottom-left x position. + * @param {number} y1 - The bottom-left y position. + * @param {number} x2 - The bottom-right x position. + * @param {number} y2 - The bottom-right y position. + * @param {number} x3 - The top-right x position. + * @param {number} y3 - The top-right y position. + * @param {number} u0 - UV u0 value. + * @param {number} v0 - UV v0 value. + * @param {number} u1 - UV u1 value. + * @param {number} v1 - UV v1 value. + * @param {number} tintTL - The top-left tint color value. + * @param {number} tintTR - The top-right tint color value. + * @param {number} tintBL - The bottom-left tint color value. + * @param {(number|boolean)} tintEffect - The tint effect for the shader to use. + * @param {WebGLTexture} [texture] - WebGLTexture that will be assigned to the current batch if a flush occurs. + * @param {integer} [unit=0] - This parameter isn't used by this pipeline, but is retained for TTP support. + * + * @return {boolean} `true` if this method caused the batch to flush, otherwise `false`. + */ + batchTri: function (x1, y1, x2, y2, x3, y3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintEffect, texture, unit) + { + if (unit === undefined) { unit = this.currentUnit; } + + var hasFlushed = false; + + if (this.vertexCount + 3 > this.vertexCapacity) + { + this.flush(); + + hasFlushed = true; + + unit = this.setTexture2D(texture); + } + + var vertexViewF32 = this.vertexViewF32; + var vertexViewU32 = this.vertexViewU32; + + var vertexOffset = (this.vertexCount * this.vertexComponentCount) - 1; + + vertexViewF32[++vertexOffset] = x1; + vertexViewF32[++vertexOffset] = y1; + vertexViewF32[++vertexOffset] = u0; + vertexViewF32[++vertexOffset] = v0; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintTL; + + vertexViewF32[++vertexOffset] = x2; + vertexViewF32[++vertexOffset] = y2; + vertexViewF32[++vertexOffset] = u0; + vertexViewF32[++vertexOffset] = v1; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintTR; + + vertexViewF32[++vertexOffset] = x3; + vertexViewF32[++vertexOffset] = y3; + vertexViewF32[++vertexOffset] = u1; + vertexViewF32[++vertexOffset] = v1; + vertexViewF32[++vertexOffset] = tintEffect; + vertexViewU32[++vertexOffset] = tintBL; + + this.vertexCount += 3; + + return hasFlushed; + }, + + /** + * Called every time the pipeline is bound by the renderer. + * Sets the shader program, vertex buffer and other resources. + * Should only be called when changing pipeline. + * + * @method Phaser.Renderer.WebGL.Pipelines.SinglePipeline#bind + * @since 3.50.0 + * + * @return {this} This WebGLPipeline instance. + */ + bind: function () + { + WebGLPipeline.prototype.bind.call(this); + + return this; + } + +}); + +module.exports = SinglePipeline; + + +/***/ }), +/* 517 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123877,7 +124515,7 @@ var Axes = {}; module.exports = Axes; var Vector = __webpack_require__(100); -var Common = __webpack_require__(42); +var Common = __webpack_require__(43); (function() { @@ -123933,7 +124571,7 @@ var Common = __webpack_require__(42); /***/ }), -/* 515 */ +/* 518 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123948,24 +124586,24 @@ var Common = __webpack_require__(42); module.exports = { - Bounce: __webpack_require__(1409), - Collision: __webpack_require__(1410), - Force: __webpack_require__(1411), - Friction: __webpack_require__(1412), - Gravity: __webpack_require__(1413), - Mass: __webpack_require__(1414), - Static: __webpack_require__(1415), - Sensor: __webpack_require__(1416), - SetBody: __webpack_require__(1417), - Sleep: __webpack_require__(1418), - Transform: __webpack_require__(1435), - Velocity: __webpack_require__(1436) + Bounce: __webpack_require__(1415), + Collision: __webpack_require__(1416), + Force: __webpack_require__(1417), + Friction: __webpack_require__(1418), + Gravity: __webpack_require__(1419), + Mass: __webpack_require__(1420), + Static: __webpack_require__(1421), + Sensor: __webpack_require__(1422), + SetBody: __webpack_require__(1423), + Sleep: __webpack_require__(1424), + Transform: __webpack_require__(1441), + Velocity: __webpack_require__(1442) }; /***/ }), -/* 516 */ +/* 519 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123980,8 +124618,8 @@ var Detector = {}; module.exports = Detector; -var SAT = __webpack_require__(517); -var Pair = __webpack_require__(474); +var SAT = __webpack_require__(520); +var Pair = __webpack_require__(476); var Bounds = __webpack_require__(101); (function() { @@ -124078,7 +124716,7 @@ var Bounds = __webpack_require__(101); /***/ }), -/* 517 */ +/* 520 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124093,7 +124731,7 @@ var SAT = {}; module.exports = SAT; -var Vertices = __webpack_require__(86); +var Vertices = __webpack_require__(87); var Vector = __webpack_require__(100); (function() { @@ -124354,7 +124992,7 @@ var Vector = __webpack_require__(100); /***/ }), -/* 518 */ +/* 521 */ /***/ (function(module, exports) { var g; @@ -124380,21 +125018,21 @@ module.exports = g; /***/ }), -/* 519 */ +/* 522 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(520); -__webpack_require__(521); -__webpack_require__(522); __webpack_require__(523); __webpack_require__(524); __webpack_require__(525); __webpack_require__(526); __webpack_require__(527); +__webpack_require__(528); +__webpack_require__(529); +__webpack_require__(530); /***/ }), -/* 520 */ +/* 523 */ /***/ (function(module, exports) { /** @@ -124434,7 +125072,7 @@ if (!Array.prototype.forEach) /***/ }), -/* 521 */ +/* 524 */ /***/ (function(module, exports) { /** @@ -124450,7 +125088,7 @@ if (!Array.isArray) /***/ }), -/* 522 */ +/* 525 */ /***/ (function(module, exports) { /* Copyright 2013 Chris Wilson @@ -124637,7 +125275,7 @@ BiquadFilterNode.type and OscillatorNode.type. /***/ }), -/* 523 */ +/* 526 */ /***/ (function(module, exports) { /** @@ -124652,7 +125290,7 @@ if (!window.console) /***/ }), -/* 524 */ +/* 527 */ /***/ (function(module, exports) { // ES6 Math.trunc - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc @@ -124664,7 +125302,7 @@ if (!Math.trunc) { /***/ }), -/* 525 */ +/* 528 */ /***/ (function(module, exports) { /** @@ -124701,7 +125339,7 @@ if (!Math.trunc) { /***/ }), -/* 526 */ +/* 529 */ /***/ (function(module, exports) { // References: @@ -124758,7 +125396,7 @@ if (!window.cancelAnimationFrame) /***/ }), -/* 527 */ +/* 530 */ /***/ (function(module, exports) { /** @@ -124811,7 +125449,7 @@ if (typeof window.Uint32Array !== 'function' && typeof window.Uint32Array !== 'o /***/ }), -/* 528 */ +/* 531 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124859,7 +125497,7 @@ module.exports = AlignTo; /***/ }), -/* 529 */ +/* 532 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124900,7 +125538,7 @@ module.exports = Angle; /***/ }), -/* 530 */ +/* 533 */ /***/ (function(module, exports) { /** @@ -124939,7 +125577,7 @@ module.exports = Call; /***/ }), -/* 531 */ +/* 534 */ /***/ (function(module, exports) { /** @@ -124997,7 +125635,7 @@ module.exports = GetFirst; /***/ }), -/* 532 */ +/* 535 */ /***/ (function(module, exports) { /** @@ -125055,7 +125693,7 @@ module.exports = GetLast; /***/ }), -/* 533 */ +/* 536 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125068,7 +125706,7 @@ var AlignIn = __webpack_require__(259); var CONST = __webpack_require__(106); var GetFastValue = __webpack_require__(2); var NOOP = __webpack_require__(1); -var Zone = __webpack_require__(111); +var Zone = __webpack_require__(114); var tempZone = new Zone({ sys: { queueDepthSort: NOOP, events: { once: NOOP } } }, 0, 0, 1, 1); @@ -125154,7 +125792,7 @@ module.exports = GridAlign; /***/ }), -/* 534 */ +/* 537 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125449,7 +126087,7 @@ module.exports = Alpha; /***/ }), -/* 535 */ +/* 538 */ /***/ (function(module, exports) { /** @@ -125476,7 +126114,7 @@ module.exports = 'add'; /***/ }), -/* 536 */ +/* 539 */ /***/ (function(module, exports) { /** @@ -125504,7 +126142,7 @@ module.exports = 'complete'; /***/ }), -/* 537 */ +/* 540 */ /***/ (function(module, exports) { /** @@ -125531,7 +126169,7 @@ module.exports = 'repeat'; /***/ }), -/* 538 */ +/* 541 */ /***/ (function(module, exports) { /** @@ -125559,7 +126197,7 @@ module.exports = 'restart'; /***/ }), -/* 539 */ +/* 542 */ /***/ (function(module, exports) { /** @@ -125587,7 +126225,7 @@ module.exports = 'start'; /***/ }), -/* 540 */ +/* 543 */ /***/ (function(module, exports) { /** @@ -125611,7 +126249,7 @@ module.exports = 'pauseall'; /***/ }), -/* 541 */ +/* 544 */ /***/ (function(module, exports) { /** @@ -125635,7 +126273,7 @@ module.exports = 'remove'; /***/ }), -/* 542 */ +/* 545 */ /***/ (function(module, exports) { /** @@ -125658,7 +126296,7 @@ module.exports = 'resumeall'; /***/ }), -/* 543 */ +/* 546 */ /***/ (function(module, exports) { /** @@ -125687,7 +126325,7 @@ module.exports = 'animationcomplete'; /***/ }), -/* 544 */ +/* 547 */ /***/ (function(module, exports) { /** @@ -125715,7 +126353,7 @@ module.exports = 'animationcomplete-'; /***/ }), -/* 545 */ +/* 548 */ /***/ (function(module, exports) { /** @@ -125744,7 +126382,7 @@ module.exports = 'animationrepeat-'; /***/ }), -/* 546 */ +/* 549 */ /***/ (function(module, exports) { /** @@ -125772,7 +126410,7 @@ module.exports = 'animationrestart-'; /***/ }), -/* 547 */ +/* 550 */ /***/ (function(module, exports) { /** @@ -125800,7 +126438,7 @@ module.exports = 'animationstart-'; /***/ }), -/* 548 */ +/* 551 */ /***/ (function(module, exports) { /** @@ -125829,7 +126467,7 @@ module.exports = 'animationupdate-'; /***/ }), -/* 549 */ +/* 552 */ /***/ (function(module, exports) { /** @@ -125859,7 +126497,7 @@ module.exports = 'animationrepeat'; /***/ }), -/* 550 */ +/* 553 */ /***/ (function(module, exports) { /** @@ -125888,7 +126526,7 @@ module.exports = 'animationrestart'; /***/ }), -/* 551 */ +/* 554 */ /***/ (function(module, exports) { /** @@ -125917,7 +126555,7 @@ module.exports = 'animationstart'; /***/ }), -/* 552 */ +/* 555 */ /***/ (function(module, exports) { /** @@ -125947,7 +126585,7 @@ module.exports = 'animationupdate'; /***/ }), -/* 553 */ +/* 556 */ /***/ (function(module, exports) { /** @@ -126096,7 +126734,7 @@ module.exports = ComputedSize; /***/ }), -/* 554 */ +/* 557 */ /***/ (function(module, exports) { /** @@ -126221,7 +126859,7 @@ module.exports = Crop; /***/ }), -/* 555 */ +/* 558 */ /***/ (function(module, exports) { /** @@ -126385,7 +127023,7 @@ module.exports = Flip; /***/ }), -/* 556 */ +/* 559 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126744,7 +127382,7 @@ module.exports = GetBounds; /***/ }), -/* 557 */ +/* 560 */ /***/ (function(module, exports) { /** @@ -126767,7 +127405,7 @@ module.exports = 'blur'; /***/ }), -/* 558 */ +/* 561 */ /***/ (function(module, exports) { /** @@ -126789,7 +127427,7 @@ module.exports = 'boot'; /***/ }), -/* 559 */ +/* 562 */ /***/ (function(module, exports) { /** @@ -126812,7 +127450,7 @@ module.exports = 'contextlost'; /***/ }), -/* 560 */ +/* 563 */ /***/ (function(module, exports) { /** @@ -126835,7 +127473,7 @@ module.exports = 'contextrestored'; /***/ }), -/* 561 */ +/* 564 */ /***/ (function(module, exports) { /** @@ -126858,7 +127496,7 @@ module.exports = 'destroy'; /***/ }), -/* 562 */ +/* 565 */ /***/ (function(module, exports) { /** @@ -126880,7 +127518,7 @@ module.exports = 'focus'; /***/ }), -/* 563 */ +/* 566 */ /***/ (function(module, exports) { /** @@ -126906,7 +127544,7 @@ module.exports = 'hidden'; /***/ }), -/* 564 */ +/* 567 */ /***/ (function(module, exports) { /** @@ -126927,7 +127565,7 @@ module.exports = 'pause'; /***/ }), -/* 565 */ +/* 568 */ /***/ (function(module, exports) { /** @@ -126953,7 +127591,7 @@ module.exports = 'postrender'; /***/ }), -/* 566 */ +/* 569 */ /***/ (function(module, exports) { /** @@ -126978,7 +127616,7 @@ module.exports = 'poststep'; /***/ }), -/* 567 */ +/* 570 */ /***/ (function(module, exports) { /** @@ -127003,7 +127641,7 @@ module.exports = 'prerender'; /***/ }), -/* 568 */ +/* 571 */ /***/ (function(module, exports) { /** @@ -127028,7 +127666,7 @@ module.exports = 'prestep'; /***/ }), -/* 569 */ +/* 572 */ /***/ (function(module, exports) { /** @@ -127050,7 +127688,7 @@ module.exports = 'ready'; /***/ }), -/* 570 */ +/* 573 */ /***/ (function(module, exports) { /** @@ -127071,7 +127709,7 @@ module.exports = 'resume'; /***/ }), -/* 571 */ +/* 574 */ /***/ (function(module, exports) { /** @@ -127096,7 +127734,7 @@ module.exports = 'step'; /***/ }), -/* 572 */ +/* 575 */ /***/ (function(module, exports) { /** @@ -127120,7 +127758,7 @@ module.exports = 'visible'; /***/ }), -/* 573 */ +/* 576 */ /***/ (function(module, exports) { /** @@ -127323,7 +127961,7 @@ module.exports = Origin; /***/ }), -/* 574 */ +/* 577 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127332,10 +127970,10 @@ module.exports = Origin; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DegToRad = __webpack_require__(39); -var GetBoolean = __webpack_require__(88); +var DegToRad = __webpack_require__(40); +var GetBoolean = __webpack_require__(89); var GetValue = __webpack_require__(6); -var TWEEN_CONST = __webpack_require__(89); +var TWEEN_CONST = __webpack_require__(90); var Vector2 = __webpack_require__(3); /** @@ -127750,7 +128388,7 @@ module.exports = PathFollower; /***/ }), -/* 575 */ +/* 578 */ /***/ (function(module, exports) { /** @@ -127937,7 +128575,7 @@ module.exports = Size; /***/ }), -/* 576 */ +/* 579 */ /***/ (function(module, exports) { /** @@ -128067,7 +128705,7 @@ module.exports = Texture; /***/ }), -/* 577 */ +/* 580 */ /***/ (function(module, exports) { /** @@ -128275,7 +128913,7 @@ module.exports = TextureCrop; /***/ }), -/* 578 */ +/* 581 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128284,7 +128922,7 @@ module.exports = TextureCrop; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetColorFromValue = __webpack_require__(114); +var GetColorFromValue = __webpack_require__(117); /** * Provides methods used for setting the tint of a Game Object. @@ -128607,7 +129245,7 @@ module.exports = Tint; /***/ }), -/* 579 */ +/* 582 */ /***/ (function(module, exports) { /** @@ -128639,7 +129277,7 @@ module.exports = 'changedata'; /***/ }), -/* 580 */ +/* 583 */ /***/ (function(module, exports) { /** @@ -128669,7 +129307,7 @@ module.exports = 'changedata-'; /***/ }), -/* 581 */ +/* 584 */ /***/ (function(module, exports) { /** @@ -128697,7 +129335,7 @@ module.exports = 'removedata'; /***/ }), -/* 582 */ +/* 585 */ /***/ (function(module, exports) { /** @@ -128725,7 +129363,7 @@ module.exports = 'setdata'; /***/ }), -/* 583 */ +/* 586 */ /***/ (function(module, exports) { /** @@ -128750,7 +129388,7 @@ module.exports = 'destroy'; /***/ }), -/* 584 */ +/* 587 */ /***/ (function(module, exports) { /** @@ -128782,7 +129420,7 @@ module.exports = 'complete'; /***/ }), -/* 585 */ +/* 588 */ /***/ (function(module, exports) { /** @@ -128811,7 +129449,7 @@ module.exports = 'created'; /***/ }), -/* 586 */ +/* 589 */ /***/ (function(module, exports) { /** @@ -128837,7 +129475,7 @@ module.exports = 'error'; /***/ }), -/* 587 */ +/* 590 */ /***/ (function(module, exports) { /** @@ -128869,7 +129507,7 @@ module.exports = 'loop'; /***/ }), -/* 588 */ +/* 591 */ /***/ (function(module, exports) { /** @@ -128897,7 +129535,7 @@ module.exports = 'play'; /***/ }), -/* 589 */ +/* 592 */ /***/ (function(module, exports) { /** @@ -128922,7 +129560,7 @@ module.exports = 'seeked'; /***/ }), -/* 590 */ +/* 593 */ /***/ (function(module, exports) { /** @@ -128948,7 +129586,7 @@ module.exports = 'seeking'; /***/ }), -/* 591 */ +/* 594 */ /***/ (function(module, exports) { /** @@ -128974,7 +129612,7 @@ module.exports = 'stop'; /***/ }), -/* 592 */ +/* 595 */ /***/ (function(module, exports) { /** @@ -129000,7 +129638,7 @@ module.exports = 'timeout'; /***/ }), -/* 593 */ +/* 596 */ /***/ (function(module, exports) { /** @@ -129026,7 +129664,7 @@ module.exports = 'unlocked'; /***/ }), -/* 594 */ +/* 597 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129067,7 +129705,7 @@ module.exports = IncAlpha; /***/ }), -/* 595 */ +/* 598 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129108,7 +129746,7 @@ module.exports = IncX; /***/ }), -/* 596 */ +/* 599 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129155,7 +129793,7 @@ module.exports = IncXY; /***/ }), -/* 597 */ +/* 600 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129196,7 +129834,7 @@ module.exports = IncY; /***/ }), -/* 598 */ +/* 601 */ /***/ (function(module, exports) { /** @@ -129245,7 +129883,7 @@ module.exports = PlaceOnCircle; /***/ }), -/* 599 */ +/* 602 */ /***/ (function(module, exports) { /** @@ -129297,7 +129935,7 @@ module.exports = PlaceOnEllipse; /***/ }), -/* 600 */ +/* 603 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129306,7 +129944,7 @@ module.exports = PlaceOnEllipse; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetPoints = __webpack_require__(157); +var GetPoints = __webpack_require__(158); /** * Positions an array of Game Objects on evenly spaced points of a Line. @@ -129341,7 +129979,7 @@ module.exports = PlaceOnLine; /***/ }), -/* 601 */ +/* 604 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129399,7 +130037,7 @@ module.exports = PlaceOnRectangle; /***/ }), -/* 602 */ +/* 605 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129460,7 +130098,7 @@ module.exports = PlaceOnTriangle; /***/ }), -/* 603 */ +/* 606 */ /***/ (function(module, exports) { /** @@ -129497,7 +130135,7 @@ module.exports = PlayAnimation; /***/ }), -/* 604 */ +/* 607 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129506,7 +130144,7 @@ module.exports = PlayAnimation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(154); +var Random = __webpack_require__(155); /** * Takes an array of Game Objects and positions them at random locations within the Circle. @@ -129537,7 +130175,7 @@ module.exports = RandomCircle; /***/ }), -/* 605 */ +/* 608 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129546,7 +130184,7 @@ module.exports = RandomCircle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(162); +var Random = __webpack_require__(163); /** * Takes an array of Game Objects and positions them at random locations within the Ellipse. @@ -129577,7 +130215,7 @@ module.exports = RandomEllipse; /***/ }), -/* 606 */ +/* 609 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129586,7 +130224,7 @@ module.exports = RandomEllipse; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(158); +var Random = __webpack_require__(159); /** * Takes an array of Game Objects and positions them at random locations on the Line. @@ -129617,7 +130255,7 @@ module.exports = RandomLine; /***/ }), -/* 607 */ +/* 610 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129626,7 +130264,7 @@ module.exports = RandomLine; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(159); +var Random = __webpack_require__(160); /** * Takes an array of Game Objects and positions them at random locations within the Rectangle. @@ -129655,7 +130293,7 @@ module.exports = RandomRectangle; /***/ }), -/* 608 */ +/* 611 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129664,7 +130302,7 @@ module.exports = RandomRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(163); +var Random = __webpack_require__(164); /** * Takes an array of Game Objects and positions them at random locations within the Triangle. @@ -129695,7 +130333,7 @@ module.exports = RandomTriangle; /***/ }), -/* 609 */ +/* 612 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129736,7 +130374,7 @@ module.exports = Rotate; /***/ }), -/* 610 */ +/* 613 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129745,7 +130383,7 @@ module.exports = Rotate; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundDistance = __webpack_require__(164); +var RotateAroundDistance = __webpack_require__(165); var DistanceBetween = __webpack_require__(54); /** @@ -129782,7 +130420,7 @@ module.exports = RotateAround; /***/ }), -/* 611 */ +/* 614 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129791,7 +130429,7 @@ module.exports = RotateAround; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathRotateAroundDistance = __webpack_require__(164); +var MathRotateAroundDistance = __webpack_require__(165); /** * Rotates an array of Game Objects around a point by the given angle and distance. @@ -129831,7 +130469,7 @@ module.exports = RotateAroundDistance; /***/ }), -/* 612 */ +/* 615 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129872,7 +130510,7 @@ module.exports = ScaleX; /***/ }), -/* 613 */ +/* 616 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129919,7 +130557,7 @@ module.exports = ScaleXY; /***/ }), -/* 614 */ +/* 617 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129960,7 +130598,7 @@ module.exports = ScaleY; /***/ }), -/* 615 */ +/* 618 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130001,7 +130639,7 @@ module.exports = SetAlpha; /***/ }), -/* 616 */ +/* 619 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130041,7 +130679,7 @@ module.exports = SetBlendMode; /***/ }), -/* 617 */ +/* 620 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130082,7 +130720,7 @@ module.exports = SetDepth; /***/ }), -/* 618 */ +/* 621 */ /***/ (function(module, exports) { /** @@ -130121,7 +130759,7 @@ module.exports = SetHitArea; /***/ }), -/* 619 */ +/* 622 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130168,7 +130806,7 @@ module.exports = SetOrigin; /***/ }), -/* 620 */ +/* 623 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130209,7 +130847,7 @@ module.exports = SetRotation; /***/ }), -/* 621 */ +/* 624 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130256,7 +130894,7 @@ module.exports = SetScale; /***/ }), -/* 622 */ +/* 625 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130297,7 +130935,7 @@ module.exports = SetScaleX; /***/ }), -/* 623 */ +/* 626 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130338,7 +130976,7 @@ module.exports = SetScaleY; /***/ }), -/* 624 */ +/* 627 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130385,7 +131023,7 @@ module.exports = SetScrollFactor; /***/ }), -/* 625 */ +/* 628 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130426,7 +131064,7 @@ module.exports = SetScrollFactorX; /***/ }), -/* 626 */ +/* 629 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130467,7 +131105,7 @@ module.exports = SetScrollFactorY; /***/ }), -/* 627 */ +/* 630 */ /***/ (function(module, exports) { /** @@ -130506,7 +131144,7 @@ module.exports = SetTint; /***/ }), -/* 628 */ +/* 631 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130544,7 +131182,7 @@ module.exports = SetVisible; /***/ }), -/* 629 */ +/* 632 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130585,7 +131223,7 @@ module.exports = SetX; /***/ }), -/* 630 */ +/* 633 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130632,7 +131270,7 @@ module.exports = SetXY; /***/ }), -/* 631 */ +/* 634 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130673,7 +131311,7 @@ module.exports = SetY; /***/ }), -/* 632 */ +/* 635 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130803,7 +131441,7 @@ module.exports = ShiftPosition; /***/ }), -/* 633 */ +/* 636 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130812,7 +131450,7 @@ module.exports = ShiftPosition; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayShuffle = __webpack_require__(116); +var ArrayShuffle = __webpack_require__(119); /** * Shuffles the array in place. The shuffled array is both modified and returned. @@ -130836,7 +131474,7 @@ module.exports = Shuffle; /***/ }), -/* 634 */ +/* 637 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130845,7 +131483,7 @@ module.exports = Shuffle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathSmootherStep = __webpack_require__(165); +var MathSmootherStep = __webpack_require__(166); /** * Smootherstep is a sigmoid-like interpolation and clamping function. @@ -130894,7 +131532,7 @@ module.exports = SmootherStep; /***/ }), -/* 635 */ +/* 638 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130903,7 +131541,7 @@ module.exports = SmootherStep; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathSmoothStep = __webpack_require__(166); +var MathSmoothStep = __webpack_require__(167); /** * Smoothstep is a sigmoid-like interpolation and clamping function. @@ -130952,7 +131590,7 @@ module.exports = SmoothStep; /***/ }), -/* 636 */ +/* 639 */ /***/ (function(module, exports) { /** @@ -131015,7 +131653,7 @@ module.exports = Spread; /***/ }), -/* 637 */ +/* 640 */ /***/ (function(module, exports) { /** @@ -131051,7 +131689,7 @@ module.exports = ToggleVisible; /***/ }), -/* 638 */ +/* 641 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131100,7 +131738,7 @@ module.exports = WrapInRectangle; /***/ }), -/* 639 */ +/* 642 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131115,16 +131753,16 @@ module.exports = WrapInRectangle; module.exports = { - Animation: __webpack_require__(155), + Animation: __webpack_require__(156), AnimationFrame: __webpack_require__(275), AnimationManager: __webpack_require__(293), - Events: __webpack_require__(112) + Events: __webpack_require__(115) }; /***/ }), -/* 640 */ +/* 643 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131147,7 +131785,7 @@ module.exports = { /***/ }), -/* 641 */ +/* 644 */ /***/ (function(module, exports) { /** @@ -131172,7 +131810,7 @@ module.exports = 'add'; /***/ }), -/* 642 */ +/* 645 */ /***/ (function(module, exports) { /** @@ -131197,7 +131835,7 @@ module.exports = 'remove'; /***/ }), -/* 643 */ +/* 646 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131216,14 +131854,14 @@ module.exports = 'remove'; module.exports = { - Controls: __webpack_require__(644), - Scene2D: __webpack_require__(647) + Controls: __webpack_require__(647), + Scene2D: __webpack_require__(650) }; /***/ }), -/* 644 */ +/* 647 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131238,14 +131876,14 @@ module.exports = { module.exports = { - FixedKeyControl: __webpack_require__(645), - SmoothedKeyControl: __webpack_require__(646) + FixedKeyControl: __webpack_require__(648), + SmoothedKeyControl: __webpack_require__(649) }; /***/ }), -/* 645 */ +/* 648 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131551,7 +132189,7 @@ module.exports = FixedKeyControl; /***/ }), -/* 646 */ +/* 649 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132034,7 +132672,7 @@ module.exports = SmoothedKeyControl; /***/ }), -/* 647 */ +/* 650 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132050,16 +132688,16 @@ module.exports = SmoothedKeyControl; module.exports = { Camera: __webpack_require__(297), - BaseCamera: __webpack_require__(91), - CameraManager: __webpack_require__(703), + BaseCamera: __webpack_require__(92), + CameraManager: __webpack_require__(706), Effects: __webpack_require__(305), - Events: __webpack_require__(40) + Events: __webpack_require__(41) }; /***/ }), -/* 648 */ +/* 651 */ /***/ (function(module, exports) { /** @@ -132082,7 +132720,7 @@ module.exports = 'cameradestroy'; /***/ }), -/* 649 */ +/* 652 */ /***/ (function(module, exports) { /** @@ -132108,7 +132746,7 @@ module.exports = 'camerafadeincomplete'; /***/ }), -/* 650 */ +/* 653 */ /***/ (function(module, exports) { /** @@ -132138,7 +132776,7 @@ module.exports = 'camerafadeinstart'; /***/ }), -/* 651 */ +/* 654 */ /***/ (function(module, exports) { /** @@ -132164,7 +132802,7 @@ module.exports = 'camerafadeoutcomplete'; /***/ }), -/* 652 */ +/* 655 */ /***/ (function(module, exports) { /** @@ -132194,7 +132832,7 @@ module.exports = 'camerafadeoutstart'; /***/ }), -/* 653 */ +/* 656 */ /***/ (function(module, exports) { /** @@ -132218,7 +132856,7 @@ module.exports = 'cameraflashcomplete'; /***/ }), -/* 654 */ +/* 657 */ /***/ (function(module, exports) { /** @@ -132246,7 +132884,7 @@ module.exports = 'cameraflashstart'; /***/ }), -/* 655 */ +/* 658 */ /***/ (function(module, exports) { /** @@ -132270,7 +132908,7 @@ module.exports = 'camerapancomplete'; /***/ }), -/* 656 */ +/* 659 */ /***/ (function(module, exports) { /** @@ -132297,7 +132935,7 @@ module.exports = 'camerapanstart'; /***/ }), -/* 657 */ +/* 660 */ /***/ (function(module, exports) { /** @@ -132323,7 +132961,7 @@ module.exports = 'postrender'; /***/ }), -/* 658 */ +/* 661 */ /***/ (function(module, exports) { /** @@ -132349,7 +132987,7 @@ module.exports = 'prerender'; /***/ }), -/* 659 */ +/* 662 */ /***/ (function(module, exports) { /** @@ -132373,7 +133011,7 @@ module.exports = 'camerarotatecomplete'; /***/ }), -/* 660 */ +/* 663 */ /***/ (function(module, exports) { /** @@ -132399,7 +133037,7 @@ module.exports = 'camerarotatestart'; /***/ }), -/* 661 */ +/* 664 */ /***/ (function(module, exports) { /** @@ -132423,7 +133061,7 @@ module.exports = 'camerashakecomplete'; /***/ }), -/* 662 */ +/* 665 */ /***/ (function(module, exports) { /** @@ -132449,7 +133087,7 @@ module.exports = 'camerashakestart'; /***/ }), -/* 663 */ +/* 666 */ /***/ (function(module, exports) { /** @@ -132473,7 +133111,7 @@ module.exports = 'camerazoomcomplete'; /***/ }), -/* 664 */ +/* 667 */ /***/ (function(module, exports) { /** @@ -132499,7 +133137,7 @@ module.exports = 'camerazoomstart'; /***/ }), -/* 665 */ +/* 668 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132510,7 +133148,7 @@ module.exports = 'camerazoomstart'; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var Events = __webpack_require__(40); +var Events = __webpack_require__(41); /** * @classdesc @@ -132805,7 +133443,7 @@ var Fade = new Class({ * @method Phaser.Cameras.Scene2D.Effects.Fade#postRenderWebGL * @since 3.5.0 * - * @param {Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline} pipeline - The WebGL Pipeline to render to. + * @param {Phaser.Renderer.WebGL.Pipelines.MultiPipeline} pipeline - The WebGL Pipeline to render to. Must provide the `drawFillRect` method. * @param {function} getTintFunction - A function that will return the gl safe tint colors. * * @return {boolean} `true` if the effect drew to the renderer, otherwise `false`. @@ -132887,7 +133525,7 @@ module.exports = Fade; /***/ }), -/* 666 */ +/* 669 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132898,7 +133536,7 @@ module.exports = Fade; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var Events = __webpack_require__(40); +var Events = __webpack_require__(41); /** * @classdesc @@ -133161,7 +133799,7 @@ var Flash = new Class({ * @method Phaser.Cameras.Scene2D.Effects.Flash#postRenderWebGL * @since 3.5.0 * - * @param {Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline} pipeline - The WebGL Pipeline to render to. + * @param {Phaser.Renderer.WebGL.Pipelines.MultiPipeline} pipeline - The WebGL Pipeline to render to. Must provide the `drawFillRect` method. * @param {function} getTintFunction - A function that will return the gl safe tint colors. * * @return {boolean} `true` if the effect drew to the renderer, otherwise `false`. @@ -133238,7 +133876,7 @@ module.exports = Flash; /***/ }), -/* 667 */ +/* 670 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133249,8 +133887,8 @@ module.exports = Flash; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var EaseMap = __webpack_require__(117); -var Events = __webpack_require__(40); +var EaseMap = __webpack_require__(120); +var Events = __webpack_require__(41); var Vector2 = __webpack_require__(3); /** @@ -133563,7 +134201,7 @@ module.exports = Pan; /***/ }), -/* 668 */ +/* 671 */ /***/ (function(module, exports) { /** @@ -133594,7 +134232,7 @@ module.exports = In; /***/ }), -/* 669 */ +/* 672 */ /***/ (function(module, exports) { /** @@ -133625,7 +134263,7 @@ module.exports = Out; /***/ }), -/* 670 */ +/* 673 */ /***/ (function(module, exports) { /** @@ -133665,7 +134303,7 @@ module.exports = InOut; /***/ }), -/* 671 */ +/* 674 */ /***/ (function(module, exports) { /** @@ -133710,7 +134348,7 @@ module.exports = In; /***/ }), -/* 672 */ +/* 675 */ /***/ (function(module, exports) { /** @@ -133753,7 +134391,7 @@ module.exports = Out; /***/ }), -/* 673 */ +/* 676 */ /***/ (function(module, exports) { /** @@ -133817,7 +134455,7 @@ module.exports = InOut; /***/ }), -/* 674 */ +/* 677 */ /***/ (function(module, exports) { /** @@ -133845,7 +134483,7 @@ module.exports = In; /***/ }), -/* 675 */ +/* 678 */ /***/ (function(module, exports) { /** @@ -133873,7 +134511,7 @@ module.exports = Out; /***/ }), -/* 676 */ +/* 679 */ /***/ (function(module, exports) { /** @@ -133908,7 +134546,7 @@ module.exports = InOut; /***/ }), -/* 677 */ +/* 680 */ /***/ (function(module, exports) { /** @@ -133936,7 +134574,7 @@ module.exports = In; /***/ }), -/* 678 */ +/* 681 */ /***/ (function(module, exports) { /** @@ -133964,7 +134602,7 @@ module.exports = Out; /***/ }), -/* 679 */ +/* 682 */ /***/ (function(module, exports) { /** @@ -133999,7 +134637,7 @@ module.exports = InOut; /***/ }), -/* 680 */ +/* 683 */ /***/ (function(module, exports) { /** @@ -134054,7 +134692,7 @@ module.exports = In; /***/ }), -/* 681 */ +/* 684 */ /***/ (function(module, exports) { /** @@ -134109,7 +134747,7 @@ module.exports = Out; /***/ }), -/* 682 */ +/* 685 */ /***/ (function(module, exports) { /** @@ -134171,7 +134809,7 @@ module.exports = InOut; /***/ }), -/* 683 */ +/* 686 */ /***/ (function(module, exports) { /** @@ -134199,7 +134837,7 @@ module.exports = In; /***/ }), -/* 684 */ +/* 687 */ /***/ (function(module, exports) { /** @@ -134227,7 +134865,7 @@ module.exports = Out; /***/ }), -/* 685 */ +/* 688 */ /***/ (function(module, exports) { /** @@ -134262,7 +134900,7 @@ module.exports = InOut; /***/ }), -/* 686 */ +/* 689 */ /***/ (function(module, exports) { /** @@ -134290,7 +134928,7 @@ module.exports = Linear; /***/ }), -/* 687 */ +/* 690 */ /***/ (function(module, exports) { /** @@ -134318,7 +134956,7 @@ module.exports = In; /***/ }), -/* 688 */ +/* 691 */ /***/ (function(module, exports) { /** @@ -134346,7 +134984,7 @@ module.exports = Out; /***/ }), -/* 689 */ +/* 692 */ /***/ (function(module, exports) { /** @@ -134381,7 +135019,7 @@ module.exports = InOut; /***/ }), -/* 690 */ +/* 693 */ /***/ (function(module, exports) { /** @@ -134409,7 +135047,7 @@ module.exports = In; /***/ }), -/* 691 */ +/* 694 */ /***/ (function(module, exports) { /** @@ -134437,7 +135075,7 @@ module.exports = Out; /***/ }), -/* 692 */ +/* 695 */ /***/ (function(module, exports) { /** @@ -134472,7 +135110,7 @@ module.exports = InOut; /***/ }), -/* 693 */ +/* 696 */ /***/ (function(module, exports) { /** @@ -134500,7 +135138,7 @@ module.exports = In; /***/ }), -/* 694 */ +/* 697 */ /***/ (function(module, exports) { /** @@ -134528,7 +135166,7 @@ module.exports = Out; /***/ }), -/* 695 */ +/* 698 */ /***/ (function(module, exports) { /** @@ -134563,7 +135201,7 @@ module.exports = InOut; /***/ }), -/* 696 */ +/* 699 */ /***/ (function(module, exports) { /** @@ -134602,7 +135240,7 @@ module.exports = In; /***/ }), -/* 697 */ +/* 700 */ /***/ (function(module, exports) { /** @@ -134641,7 +135279,7 @@ module.exports = Out; /***/ }), -/* 698 */ +/* 701 */ /***/ (function(module, exports) { /** @@ -134680,7 +135318,7 @@ module.exports = InOut; /***/ }), -/* 699 */ +/* 702 */ /***/ (function(module, exports) { /** @@ -134722,7 +135360,7 @@ module.exports = Stepped; /***/ }), -/* 700 */ +/* 703 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134733,7 +135371,7 @@ module.exports = Stepped; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var Events = __webpack_require__(40); +var Events = __webpack_require__(41); var Vector2 = __webpack_require__(3); /** @@ -135041,7 +135679,7 @@ module.exports = Shake; /***/ }), -/* 701 */ +/* 704 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135052,8 +135690,8 @@ module.exports = Shake; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var Events = __webpack_require__(40); -var EaseMap = __webpack_require__(117); +var Events = __webpack_require__(41); +var EaseMap = __webpack_require__(120); /** * @classdesc @@ -135474,7 +136112,7 @@ module.exports = RotateTo; /***/ }), -/* 702 */ +/* 705 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135485,8 +136123,8 @@ module.exports = RotateTo; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var EaseMap = __webpack_require__(117); -var Events = __webpack_require__(40); +var EaseMap = __webpack_require__(120); +var Events = __webpack_require__(41); /** * @classdesc @@ -135767,7 +136405,7 @@ module.exports = Zoom; /***/ }), -/* 703 */ +/* 706 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135780,8 +136418,8 @@ var Camera = __webpack_require__(297); var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(2); var PluginCache = __webpack_require__(23); -var RectangleContains = __webpack_require__(48); -var ScaleEvents = __webpack_require__(92); +var RectangleContains = __webpack_require__(49); +var ScaleEvents = __webpack_require__(93); var SceneEvents = __webpack_require__(22); /** @@ -136515,7 +137153,7 @@ module.exports = CameraManager; /***/ }), -/* 704 */ +/* 707 */ /***/ (function(module, exports) { /** @@ -136534,7 +137172,7 @@ module.exports = 'enterfullscreen'; /***/ }), -/* 705 */ +/* 708 */ /***/ (function(module, exports) { /** @@ -136553,7 +137191,7 @@ module.exports = 'fullscreenfailed'; /***/ }), -/* 706 */ +/* 709 */ /***/ (function(module, exports) { /** @@ -136572,7 +137210,7 @@ module.exports = 'fullscreenunsupported'; /***/ }), -/* 707 */ +/* 710 */ /***/ (function(module, exports) { /** @@ -136592,7 +137230,7 @@ module.exports = 'leavefullscreen'; /***/ }), -/* 708 */ +/* 711 */ /***/ (function(module, exports) { /** @@ -136613,7 +137251,7 @@ module.exports = 'orientationchange'; /***/ }), -/* 709 */ +/* 712 */ /***/ (function(module, exports) { /** @@ -136644,7 +137282,7 @@ module.exports = 'resize'; /***/ }), -/* 710 */ +/* 713 */ /***/ (function(module, exports) { /** @@ -136669,7 +137307,7 @@ module.exports = 'boot'; /***/ }), -/* 711 */ +/* 714 */ /***/ (function(module, exports) { /** @@ -136698,7 +137336,7 @@ module.exports = 'create'; /***/ }), -/* 712 */ +/* 715 */ /***/ (function(module, exports) { /** @@ -136725,7 +137363,7 @@ module.exports = 'destroy'; /***/ }), -/* 713 */ +/* 716 */ /***/ (function(module, exports) { /** @@ -136752,7 +137390,7 @@ module.exports = 'pause'; /***/ }), -/* 714 */ +/* 717 */ /***/ (function(module, exports) { /** @@ -136789,7 +137427,7 @@ module.exports = 'postupdate'; /***/ }), -/* 715 */ +/* 718 */ /***/ (function(module, exports) { /** @@ -136826,7 +137464,7 @@ module.exports = 'preupdate'; /***/ }), -/* 716 */ +/* 719 */ /***/ (function(module, exports) { /** @@ -136854,7 +137492,7 @@ module.exports = 'ready'; /***/ }), -/* 717 */ +/* 720 */ /***/ (function(module, exports) { /** @@ -136890,7 +137528,7 @@ module.exports = 'render'; /***/ }), -/* 718 */ +/* 721 */ /***/ (function(module, exports) { /** @@ -136917,7 +137555,7 @@ module.exports = 'resume'; /***/ }), -/* 719 */ +/* 722 */ /***/ (function(module, exports) { /** @@ -136947,7 +137585,7 @@ module.exports = 'shutdown'; /***/ }), -/* 720 */ +/* 723 */ /***/ (function(module, exports) { /** @@ -136974,7 +137612,7 @@ module.exports = 'sleep'; /***/ }), -/* 721 */ +/* 724 */ /***/ (function(module, exports) { /** @@ -136999,7 +137637,7 @@ module.exports = 'start'; /***/ }), -/* 722 */ +/* 725 */ /***/ (function(module, exports) { /** @@ -137035,7 +137673,7 @@ module.exports = 'transitioncomplete'; /***/ }), -/* 723 */ +/* 726 */ /***/ (function(module, exports) { /** @@ -137072,7 +137710,7 @@ module.exports = 'transitioninit'; /***/ }), -/* 724 */ +/* 727 */ /***/ (function(module, exports) { /** @@ -137106,7 +137744,7 @@ module.exports = 'transitionout'; /***/ }), -/* 725 */ +/* 728 */ /***/ (function(module, exports) { /** @@ -137146,7 +137784,7 @@ module.exports = 'transitionstart'; /***/ }), -/* 726 */ +/* 729 */ /***/ (function(module, exports) { /** @@ -137181,7 +137819,7 @@ module.exports = 'transitionwake'; /***/ }), -/* 727 */ +/* 730 */ /***/ (function(module, exports) { /** @@ -137218,7 +137856,7 @@ module.exports = 'update'; /***/ }), -/* 728 */ +/* 731 */ /***/ (function(module, exports) { /** @@ -137245,7 +137883,7 @@ module.exports = 'wake'; /***/ }), -/* 729 */ +/* 732 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137271,7 +137909,7 @@ module.exports = { /***/ }), -/* 730 */ +/* 733 */ /***/ (function(module, exports) { // shim for using process in browser @@ -137461,7 +138099,7 @@ process.umask = function() { return 0; }; /***/ }), -/* 731 */ +/* 734 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137470,7 +138108,7 @@ process.umask = function() { return 0; }; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Browser = __webpack_require__(120); +var Browser = __webpack_require__(123); /** * Determines the input support of the browser running this Phaser Game instance. @@ -137536,7 +138174,7 @@ module.exports = init(); /***/ }), -/* 732 */ +/* 735 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137545,7 +138183,7 @@ module.exports = init(); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Browser = __webpack_require__(120); +var Browser = __webpack_require__(123); /** * Determines the audio playback capabilities of the device running this Phaser Game instance. @@ -137661,7 +138299,7 @@ module.exports = init(); /***/ }), -/* 733 */ +/* 736 */ /***/ (function(module, exports) { /** @@ -137748,7 +138386,7 @@ module.exports = init(); /***/ }), -/* 734 */ +/* 737 */ /***/ (function(module, exports) { /** @@ -137852,7 +138490,7 @@ module.exports = init(); /***/ }), -/* 735 */ +/* 738 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137869,15 +138507,15 @@ module.exports = { Between: __webpack_require__(321), BetweenPoints: __webpack_require__(322), - BetweenPointsY: __webpack_require__(736), - BetweenY: __webpack_require__(737), - CounterClockwise: __webpack_require__(738), + BetweenPointsY: __webpack_require__(739), + BetweenY: __webpack_require__(740), + CounterClockwise: __webpack_require__(741), Normalize: __webpack_require__(323), - Random: __webpack_require__(739), - RandomDegrees: __webpack_require__(740), - Reverse: __webpack_require__(741), - RotateTo: __webpack_require__(742), - ShortestBetween: __webpack_require__(743), + Random: __webpack_require__(742), + RandomDegrees: __webpack_require__(743), + Reverse: __webpack_require__(744), + RotateTo: __webpack_require__(745), + ShortestBetween: __webpack_require__(746), Wrap: __webpack_require__(241), WrapDegrees: __webpack_require__(242) @@ -137885,7 +138523,7 @@ module.exports = { /***/ }), -/* 736 */ +/* 739 */ /***/ (function(module, exports) { /** @@ -137917,7 +138555,7 @@ module.exports = BetweenPointsY; /***/ }), -/* 737 */ +/* 740 */ /***/ (function(module, exports) { /** @@ -137951,7 +138589,7 @@ module.exports = BetweenY; /***/ }), -/* 738 */ +/* 741 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137996,7 +138634,7 @@ module.exports = CounterClockwise; /***/ }), -/* 739 */ +/* 742 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138006,7 +138644,7 @@ module.exports = CounterClockwise; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FloatBetween = __webpack_require__(121); +var FloatBetween = __webpack_require__(124); /** * Returns a random angle in the range [-pi, pi]. @@ -138025,7 +138663,7 @@ module.exports = Random; /***/ }), -/* 740 */ +/* 743 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138035,7 +138673,7 @@ module.exports = Random; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FloatBetween = __webpack_require__(121); +var FloatBetween = __webpack_require__(124); /** * Returns a random angle in the range [-180, 180]. @@ -138054,7 +138692,7 @@ module.exports = RandomDegrees; /***/ }), -/* 741 */ +/* 744 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138084,7 +138722,7 @@ module.exports = Reverse; /***/ }), -/* 742 */ +/* 745 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138151,7 +138789,7 @@ module.exports = RotateTo; /***/ }), -/* 743 */ +/* 746 */ /***/ (function(module, exports) { /** @@ -138200,7 +138838,7 @@ module.exports = ShortestBetween; /***/ }), -/* 744 */ +/* 747 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138217,17 +138855,17 @@ module.exports = { Between: __webpack_require__(54), BetweenPoints: __webpack_require__(324), - BetweenPointsSquared: __webpack_require__(745), - Chebyshev: __webpack_require__(746), - Power: __webpack_require__(747), - Snake: __webpack_require__(748), + BetweenPointsSquared: __webpack_require__(748), + Chebyshev: __webpack_require__(749), + Power: __webpack_require__(750), + Snake: __webpack_require__(751), Squared: __webpack_require__(325) }; /***/ }), -/* 745 */ +/* 748 */ /***/ (function(module, exports) { /** @@ -138259,7 +138897,7 @@ module.exports = DistanceBetweenPointsSquared; /***/ }), -/* 746 */ +/* 749 */ /***/ (function(module, exports) { /** @@ -138293,7 +138931,7 @@ module.exports = ChebyshevDistance; /***/ }), -/* 747 */ +/* 750 */ /***/ (function(module, exports) { /** @@ -138327,7 +138965,7 @@ module.exports = DistancePower; /***/ }), -/* 748 */ +/* 751 */ /***/ (function(module, exports) { /** @@ -138361,7 +138999,7 @@ module.exports = SnakeDistance; /***/ }), -/* 749 */ +/* 752 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138393,7 +139031,7 @@ module.exports = { /***/ }), -/* 750 */ +/* 753 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138408,9 +139046,9 @@ module.exports = { module.exports = { - Ceil: __webpack_require__(751), + Ceil: __webpack_require__(754), Equal: __webpack_require__(107), - Floor: __webpack_require__(752), + Floor: __webpack_require__(755), GreaterThan: __webpack_require__(326), LessThan: __webpack_require__(327) @@ -138418,7 +139056,7 @@ module.exports = { /***/ }), -/* 751 */ +/* 754 */ /***/ (function(module, exports) { /** @@ -138449,7 +139087,7 @@ module.exports = Ceil; /***/ }), -/* 752 */ +/* 755 */ /***/ (function(module, exports) { /** @@ -138480,7 +139118,7 @@ module.exports = Floor; /***/ }), -/* 753 */ +/* 756 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138495,19 +139133,19 @@ module.exports = Floor; module.exports = { - Bezier: __webpack_require__(754), - CatmullRom: __webpack_require__(755), + Bezier: __webpack_require__(757), + CatmullRom: __webpack_require__(758), CubicBezier: __webpack_require__(330), - Linear: __webpack_require__(756), + Linear: __webpack_require__(759), QuadraticBezier: __webpack_require__(331), SmoothStep: __webpack_require__(332), - SmootherStep: __webpack_require__(757) + SmootherStep: __webpack_require__(760) }; /***/ }), -/* 754 */ +/* 757 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138546,7 +139184,7 @@ module.exports = BezierInterpolation; /***/ }), -/* 755 */ +/* 758 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138555,7 +139193,7 @@ module.exports = BezierInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CatmullRom = __webpack_require__(176); +var CatmullRom = __webpack_require__(177); /** * A Catmull-Rom interpolation method. @@ -138603,7 +139241,7 @@ module.exports = CatmullRomInterpolation; /***/ }), -/* 756 */ +/* 759 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138612,7 +139250,7 @@ module.exports = CatmullRomInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Linear = __webpack_require__(118); +var Linear = __webpack_require__(121); /** * A linear interpolation method. @@ -138650,7 +139288,7 @@ module.exports = LinearInterpolation; /***/ }), -/* 757 */ +/* 760 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138659,7 +139297,7 @@ module.exports = LinearInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmootherStep = __webpack_require__(165); +var SmootherStep = __webpack_require__(166); /** * A Smoother Step interpolation method. @@ -138683,7 +139321,7 @@ module.exports = SmootherStepInterpolation; /***/ }), -/* 758 */ +/* 761 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138699,14 +139337,14 @@ module.exports = SmootherStepInterpolation; module.exports = { GetNext: __webpack_require__(333), - IsSize: __webpack_require__(122), - IsValue: __webpack_require__(759) + IsSize: __webpack_require__(125), + IsValue: __webpack_require__(762) }; /***/ }), -/* 759 */ +/* 762 */ /***/ (function(module, exports) { /** @@ -138734,7 +139372,7 @@ module.exports = IsValuePowerOfTwo; /***/ }), -/* 760 */ +/* 763 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138750,14 +139388,14 @@ module.exports = IsValuePowerOfTwo; module.exports = { Ceil: __webpack_require__(334), - Floor: __webpack_require__(93), - To: __webpack_require__(761) + Floor: __webpack_require__(94), + To: __webpack_require__(764) }; /***/ }), -/* 761 */ +/* 764 */ /***/ (function(module, exports) { /** @@ -138800,7 +139438,7 @@ module.exports = SnapTo; /***/ }), -/* 762 */ +/* 765 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139310,7 +139948,7 @@ module.exports = RandomDataGenerator; /***/ }), -/* 763 */ +/* 766 */ /***/ (function(module, exports) { /** @@ -139345,7 +139983,7 @@ module.exports = Average; /***/ }), -/* 764 */ +/* 767 */ /***/ (function(module, exports) { /** @@ -139382,7 +140020,7 @@ module.exports = CeilTo; /***/ }), -/* 765 */ +/* 768 */ /***/ (function(module, exports) { /** @@ -139411,7 +140049,7 @@ module.exports = Difference; /***/ }), -/* 766 */ +/* 769 */ /***/ (function(module, exports) { /** @@ -139448,7 +140086,7 @@ module.exports = FloorTo; /***/ }), -/* 767 */ +/* 770 */ /***/ (function(module, exports) { /** @@ -139481,7 +140119,7 @@ module.exports = GetSpeed; /***/ }), -/* 768 */ +/* 771 */ /***/ (function(module, exports) { /** @@ -139512,7 +140150,7 @@ module.exports = IsEven; /***/ }), -/* 769 */ +/* 772 */ /***/ (function(module, exports) { /** @@ -139541,7 +140179,7 @@ module.exports = IsEvenStrict; /***/ }), -/* 770 */ +/* 773 */ /***/ (function(module, exports) { /** @@ -139571,7 +140209,7 @@ module.exports = MaxAdd; /***/ }), -/* 771 */ +/* 774 */ /***/ (function(module, exports) { /** @@ -139601,7 +140239,7 @@ module.exports = MinSub; /***/ }), -/* 772 */ +/* 775 */ /***/ (function(module, exports) { /** @@ -139660,7 +140298,7 @@ module.exports = Percent; /***/ }), -/* 773 */ +/* 776 */ /***/ (function(module, exports) { /** @@ -139700,7 +140338,7 @@ module.exports = RandomXY; /***/ }), -/* 774 */ +/* 777 */ /***/ (function(module, exports) { /** @@ -139739,7 +140377,7 @@ module.exports = RandomXYZ; /***/ }), -/* 775 */ +/* 778 */ /***/ (function(module, exports) { /** @@ -139776,7 +140414,7 @@ module.exports = RandomXYZW; /***/ }), -/* 776 */ +/* 779 */ /***/ (function(module, exports) { /** @@ -139813,7 +140451,7 @@ module.exports = RotateTo; /***/ }), -/* 777 */ +/* 780 */ /***/ (function(module, exports) { /** @@ -139865,7 +140503,7 @@ module.exports = RoundTo; /***/ }), -/* 778 */ +/* 781 */ /***/ (function(module, exports) { /** @@ -139918,7 +140556,7 @@ module.exports = SinCosTableGenerator; /***/ }), -/* 779 */ +/* 782 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139976,7 +140614,7 @@ module.exports = ToXY; /***/ }), -/* 780 */ +/* 783 */ /***/ (function(module, exports) { /** @@ -140006,7 +140644,7 @@ module.exports = Within; /***/ }), -/* 781 */ +/* 784 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140015,7 +140653,7 @@ module.exports = Within; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector3 = __webpack_require__(94); +var Vector3 = __webpack_require__(80); var Matrix4 = __webpack_require__(338); var Quaternion = __webpack_require__(339); @@ -140054,7 +140692,7 @@ module.exports = RotateVec3; /***/ }), -/* 782 */ +/* 785 */ /***/ (function(module, exports) { /** @@ -140080,7 +140718,7 @@ module.exports = 'addtexture'; /***/ }), -/* 783 */ +/* 786 */ /***/ (function(module, exports) { /** @@ -140106,7 +140744,7 @@ module.exports = 'onerror'; /***/ }), -/* 784 */ +/* 787 */ /***/ (function(module, exports) { /** @@ -140135,7 +140773,7 @@ module.exports = 'onload'; /***/ }), -/* 785 */ +/* 788 */ /***/ (function(module, exports) { /** @@ -140158,7 +140796,7 @@ module.exports = 'ready'; /***/ }), -/* 786 */ +/* 789 */ /***/ (function(module, exports) { /** @@ -140186,7 +140824,7 @@ module.exports = 'removetexture'; /***/ }), -/* 787 */ +/* 790 */ /***/ (function(module, exports) { module.exports = [ @@ -140222,7 +140860,7 @@ module.exports = [ /***/ }), -/* 788 */ +/* 791 */ /***/ (function(module, exports) { module.exports = [ @@ -140241,7 +140879,7 @@ module.exports = [ /***/ }), -/* 789 */ +/* 792 */ /***/ (function(module, exports) { module.exports = [ @@ -140300,7 +140938,7 @@ module.exports = [ /***/ }), -/* 790 */ +/* 793 */ /***/ (function(module, exports) { module.exports = [ @@ -140348,7 +140986,7 @@ module.exports = [ /***/ }), -/* 791 */ +/* 794 */ /***/ (function(module, exports) { module.exports = [ @@ -140386,7 +141024,85 @@ module.exports = [ /***/ }), -/* 792 */ +/* 795 */ +/***/ (function(module, exports) { + +module.exports = [ + '#define SHADER_NAME PHASER_SINGLE_TEXTURE_TINT_FS', + '', + 'precision mediump float;', + '', + 'uniform sampler2D uMainSampler;', + '', + 'varying vec2 outTexCoord;', + 'varying float outTintEffect;', + 'varying vec4 outTint;', + '', + 'void main()', + '{', + ' vec4 texture = texture2D(uMainSampler, outTexCoord);', + ' vec4 texel = vec4(outTint.rgb * outTint.a, outTint.a);', + ' vec4 color = texture;', + '', + ' if (outTintEffect == 0.0)', + ' {', + ' // Multiply texture tint', + ' color = texture * texel;', + ' }', + ' else if (outTintEffect == 1.0)', + ' {', + ' // Solid color + texture alpha', + ' color.rgb = mix(texture.rgb, outTint.rgb * outTint.a, texture.a);', + ' color.a = texture.a * texel.a;', + ' }', + ' else if (outTintEffect == 2.0)', + ' {', + ' // Solid color, no texture', + ' color = texel;', + ' }', + '', + ' gl_FragColor = color;', + '}', + '' +].join('\n'); + + +/***/ }), +/* 796 */ +/***/ (function(module, exports) { + +module.exports = [ + '#define SHADER_NAME PHASER_SINGLE_TEXTURE_TINT_VS', + '', + 'precision mediump float;', + '', + 'uniform mat4 uProjectionMatrix;', + 'uniform mat4 uViewMatrix;', + 'uniform mat4 uModelMatrix;', + '', + 'attribute vec2 inPosition;', + 'attribute vec2 inTexCoord;', + 'attribute float inTintEffect;', + 'attribute vec4 inTint;', + '', + 'varying vec2 outTexCoord;', + 'varying float outTintEffect;', + 'varying vec4 outTint;', + '', + 'void main ()', + '{', + ' gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);', + '', + ' outTexCoord = inTexCoord;', + ' outTint = inTint;', + ' outTintEffect = inTintEffect;', + '}', + '' +].join('\n'); + + +/***/ }), +/* 797 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140402,13 +141118,13 @@ module.exports = [ module.exports = { GenerateTexture: __webpack_require__(346), - Palettes: __webpack_require__(793) + Palettes: __webpack_require__(798) }; /***/ }), -/* 793 */ +/* 798 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140424,16 +141140,16 @@ module.exports = { module.exports = { ARNE16: __webpack_require__(347), - C64: __webpack_require__(794), - CGA: __webpack_require__(795), - JMP: __webpack_require__(796), - MSX: __webpack_require__(797) + C64: __webpack_require__(799), + CGA: __webpack_require__(800), + JMP: __webpack_require__(801), + MSX: __webpack_require__(802) }; /***/ }), -/* 794 */ +/* 799 */ /***/ (function(module, exports) { /** @@ -140471,7 +141187,7 @@ module.exports = { /***/ }), -/* 795 */ +/* 800 */ /***/ (function(module, exports) { /** @@ -140509,7 +141225,7 @@ module.exports = { /***/ }), -/* 796 */ +/* 801 */ /***/ (function(module, exports) { /** @@ -140547,7 +141263,7 @@ module.exports = { /***/ }), -/* 797 */ +/* 802 */ /***/ (function(module, exports) { /** @@ -140585,7 +141301,7 @@ module.exports = { /***/ }), -/* 798 */ +/* 803 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140599,10 +141315,10 @@ module.exports = { */ module.exports = { - Path: __webpack_require__(799), + Path: __webpack_require__(804), CubicBezier: __webpack_require__(348), - Curve: __webpack_require__(81), + Curve: __webpack_require__(82), Ellipse: __webpack_require__(349), Line: __webpack_require__(350), QuadraticBezier: __webpack_require__(351), @@ -140611,7 +141327,7 @@ module.exports = { /***/ }), -/* 799 */ +/* 804 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140627,7 +141343,7 @@ var CubicBezierCurve = __webpack_require__(348); var EllipseCurve = __webpack_require__(349); var GameObjectFactory = __webpack_require__(5); var LineCurve = __webpack_require__(350); -var MovePathTo = __webpack_require__(800); +var MovePathTo = __webpack_require__(805); var QuadraticBezierCurve = __webpack_require__(351); var Rectangle = __webpack_require__(9); var SplineCurve = __webpack_require__(352); @@ -141500,7 +142216,7 @@ module.exports = Path; /***/ }), -/* 800 */ +/* 805 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141640,7 +142356,7 @@ module.exports = MoveTo; /***/ }), -/* 801 */ +/* 806 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141655,15 +142371,15 @@ module.exports = MoveTo; module.exports = { - DataManager: __webpack_require__(115), - DataManagerPlugin: __webpack_require__(802), + DataManager: __webpack_require__(118), + DataManagerPlugin: __webpack_require__(807), Events: __webpack_require__(288) }; /***/ }), -/* 802 */ +/* 807 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141673,7 +142389,7 @@ module.exports = { */ var Class = __webpack_require__(0); -var DataManager = __webpack_require__(115); +var DataManager = __webpack_require__(118); var PluginCache = __webpack_require__(23); var SceneEvents = __webpack_require__(22); @@ -141790,7 +142506,7 @@ module.exports = DataManagerPlugin; /***/ }), -/* 803 */ +/* 808 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141805,18 +142521,18 @@ module.exports = DataManagerPlugin; module.exports = { - Align: __webpack_require__(804), + Align: __webpack_require__(809), BaseShader: __webpack_require__(353), - Bounds: __webpack_require__(807), - Canvas: __webpack_require__(811), + Bounds: __webpack_require__(812), + Canvas: __webpack_require__(816), Color: __webpack_require__(354), - Masks: __webpack_require__(820) + Masks: __webpack_require__(825) }; /***/ }), -/* 804 */ +/* 809 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141834,8 +142550,8 @@ var Extend = __webpack_require__(19); var Align = { - In: __webpack_require__(805), - To: __webpack_require__(806) + In: __webpack_require__(810), + To: __webpack_require__(811) }; @@ -141846,7 +142562,7 @@ module.exports = Align; /***/ }), -/* 805 */ +/* 810 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141876,7 +142592,7 @@ module.exports = { /***/ }), -/* 806 */ +/* 811 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141909,7 +142625,7 @@ module.exports = { /***/ }), -/* 807 */ +/* 812 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141926,26 +142642,26 @@ module.exports = { CenterOn: __webpack_require__(264), GetBottom: __webpack_require__(34), - GetBounds: __webpack_require__(808), + GetBounds: __webpack_require__(813), GetCenterX: __webpack_require__(76), GetCenterY: __webpack_require__(78), GetLeft: __webpack_require__(35), - GetOffsetX: __webpack_require__(809), - GetOffsetY: __webpack_require__(810), + GetOffsetX: __webpack_require__(814), + GetOffsetY: __webpack_require__(815), GetRight: __webpack_require__(36), GetTop: __webpack_require__(37), - SetBottom: __webpack_require__(46), + SetBottom: __webpack_require__(47), SetCenterX: __webpack_require__(77), SetCenterY: __webpack_require__(79), - SetLeft: __webpack_require__(44), - SetRight: __webpack_require__(45), - SetTop: __webpack_require__(43) + SetLeft: __webpack_require__(45), + SetRight: __webpack_require__(46), + SetTop: __webpack_require__(44) }; /***/ }), -/* 808 */ +/* 813 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141989,7 +142705,7 @@ module.exports = GetBounds; /***/ }), -/* 809 */ +/* 814 */ /***/ (function(module, exports) { /** @@ -142019,7 +142735,7 @@ module.exports = GetOffsetX; /***/ }), -/* 810 */ +/* 815 */ /***/ (function(module, exports) { /** @@ -142049,7 +142765,7 @@ module.exports = GetOffsetY; /***/ }), -/* 811 */ +/* 816 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142066,15 +142782,15 @@ module.exports = { CanvasInterpolation: __webpack_require__(341), CanvasPool: __webpack_require__(26), - Smoothing: __webpack_require__(172), - TouchAction: __webpack_require__(812), - UserSelect: __webpack_require__(813) + Smoothing: __webpack_require__(173), + TouchAction: __webpack_require__(817), + UserSelect: __webpack_require__(818) }; /***/ }), -/* 812 */ +/* 817 */ /***/ (function(module, exports) { /** @@ -142109,7 +142825,7 @@ module.exports = TouchAction; /***/ }), -/* 813 */ +/* 818 */ /***/ (function(module, exports) { /** @@ -142156,7 +142872,7 @@ module.exports = UserSelect; /***/ }), -/* 814 */ +/* 819 */ /***/ (function(module, exports) { /** @@ -142196,7 +142912,7 @@ module.exports = ColorToRGBA; /***/ }), -/* 815 */ +/* 820 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142246,7 +142962,7 @@ module.exports = HSLToColor; /***/ }), -/* 816 */ +/* 821 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142255,7 +142971,7 @@ module.exports = HSLToColor; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HSVToRGB = __webpack_require__(171); +var HSVToRGB = __webpack_require__(172); /** * Get HSV color wheel values in an array which will be 360 elements in size. @@ -142287,7 +143003,7 @@ module.exports = HSVColorWheel; /***/ }), -/* 817 */ +/* 822 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142296,7 +143012,7 @@ module.exports = HSVColorWheel; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Linear = __webpack_require__(118); +var Linear = __webpack_require__(121); /** * @namespace Phaser.Display.Color.Interpolate @@ -142395,7 +143111,7 @@ module.exports = { /***/ }), -/* 818 */ +/* 823 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142404,7 +143120,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Between = __webpack_require__(177); +var Between = __webpack_require__(178); var Color = __webpack_require__(31); /** @@ -142431,7 +143147,7 @@ module.exports = RandomRGB; /***/ }), -/* 819 */ +/* 824 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142475,7 +143191,7 @@ module.exports = RGBToString; /***/ }), -/* 820 */ +/* 825 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142497,7 +143213,7 @@ module.exports = { /***/ }), -/* 821 */ +/* 826 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142512,7 +143228,7 @@ module.exports = { var Dom = { - AddToDOM: __webpack_require__(124), + AddToDOM: __webpack_require__(128), DOMContentLoaded: __webpack_require__(357), GetScreenOrientation: __webpack_require__(358), GetTarget: __webpack_require__(363), @@ -142526,7 +143242,7 @@ module.exports = Dom; /***/ }), -/* 822 */ +/* 827 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142539,11 +143255,11 @@ module.exports = Dom; * @namespace Phaser.Events */ -module.exports = { EventEmitter: __webpack_require__(823) }; +module.exports = { EventEmitter: __webpack_require__(828) }; /***/ }), -/* 823 */ +/* 828 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142727,7 +143443,7 @@ module.exports = EventEmitter; /***/ }), -/* 824 */ +/* 829 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142736,15 +143452,15 @@ module.exports = EventEmitter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(124); +var AddToDOM = __webpack_require__(128); var AnimationManager = __webpack_require__(293); var CacheManager = __webpack_require__(296); var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); var Config = __webpack_require__(318); -var CreateDOMContainer = __webpack_require__(825); +var CreateDOMContainer = __webpack_require__(830); var CreateRenderer = __webpack_require__(340); -var DataManager = __webpack_require__(115); +var DataManager = __webpack_require__(118); var DebugHeader = __webpack_require__(342); var Device = __webpack_require__(319); var DOMContentLoaded = __webpack_require__(357); @@ -142755,7 +143471,7 @@ var PluginCache = __webpack_require__(23); var PluginManager = __webpack_require__(370); var ScaleManager = __webpack_require__(371); var SceneManager = __webpack_require__(373); -var TextureEvents = __webpack_require__(123); +var TextureEvents = __webpack_require__(127); var TextureManager = __webpack_require__(376); var TimeStep = __webpack_require__(343); var VisibilityHandler = __webpack_require__(345); @@ -143430,7 +144146,7 @@ module.exports = Game; /***/ }), -/* 825 */ +/* 830 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143439,7 +144155,7 @@ module.exports = Game; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(124); +var AddToDOM = __webpack_require__(128); var CreateDOMContainer = function (game) { @@ -143474,7 +144190,7 @@ module.exports = CreateDOMContainer; /***/ }), -/* 826 */ +/* 831 */ /***/ (function(module, exports) { /** @@ -143495,7 +144211,7 @@ module.exports = 'boot'; /***/ }), -/* 827 */ +/* 832 */ /***/ (function(module, exports) { /** @@ -143516,7 +144232,7 @@ module.exports = 'destroy'; /***/ }), -/* 828 */ +/* 833 */ /***/ (function(module, exports) { /** @@ -143544,7 +144260,7 @@ module.exports = 'dragend'; /***/ }), -/* 829 */ +/* 834 */ /***/ (function(module, exports) { /** @@ -143575,7 +144291,7 @@ module.exports = 'dragenter'; /***/ }), -/* 830 */ +/* 835 */ /***/ (function(module, exports) { /** @@ -143607,7 +144323,7 @@ module.exports = 'drag'; /***/ }), -/* 831 */ +/* 836 */ /***/ (function(module, exports) { /** @@ -143638,7 +144354,7 @@ module.exports = 'dragleave'; /***/ }), -/* 832 */ +/* 837 */ /***/ (function(module, exports) { /** @@ -143672,7 +144388,7 @@ module.exports = 'dragover'; /***/ }), -/* 833 */ +/* 838 */ /***/ (function(module, exports) { /** @@ -143702,7 +144418,7 @@ module.exports = 'dragstart'; /***/ }), -/* 834 */ +/* 839 */ /***/ (function(module, exports) { /** @@ -143731,7 +144447,7 @@ module.exports = 'drop'; /***/ }), -/* 835 */ +/* 840 */ /***/ (function(module, exports) { /** @@ -143758,7 +144474,7 @@ module.exports = 'gameout'; /***/ }), -/* 836 */ +/* 841 */ /***/ (function(module, exports) { /** @@ -143785,7 +144501,7 @@ module.exports = 'gameover'; /***/ }), -/* 837 */ +/* 842 */ /***/ (function(module, exports) { /** @@ -143826,7 +144542,7 @@ module.exports = 'gameobjectdown'; /***/ }), -/* 838 */ +/* 843 */ /***/ (function(module, exports) { /** @@ -143857,7 +144573,7 @@ module.exports = 'dragend'; /***/ }), -/* 839 */ +/* 844 */ /***/ (function(module, exports) { /** @@ -143887,7 +144603,7 @@ module.exports = 'dragenter'; /***/ }), -/* 840 */ +/* 845 */ /***/ (function(module, exports) { /** @@ -143918,7 +144634,7 @@ module.exports = 'drag'; /***/ }), -/* 841 */ +/* 846 */ /***/ (function(module, exports) { /** @@ -143948,7 +144664,7 @@ module.exports = 'dragleave'; /***/ }), -/* 842 */ +/* 847 */ /***/ (function(module, exports) { /** @@ -143981,7 +144697,7 @@ module.exports = 'dragover'; /***/ }), -/* 843 */ +/* 848 */ /***/ (function(module, exports) { /** @@ -144015,7 +144731,7 @@ module.exports = 'dragstart'; /***/ }), -/* 844 */ +/* 849 */ /***/ (function(module, exports) { /** @@ -144045,7 +144761,7 @@ module.exports = 'drop'; /***/ }), -/* 845 */ +/* 850 */ /***/ (function(module, exports) { /** @@ -144086,7 +144802,7 @@ module.exports = 'gameobjectmove'; /***/ }), -/* 846 */ +/* 851 */ /***/ (function(module, exports) { /** @@ -144127,7 +144843,7 @@ module.exports = 'gameobjectout'; /***/ }), -/* 847 */ +/* 852 */ /***/ (function(module, exports) { /** @@ -144168,7 +144884,7 @@ module.exports = 'gameobjectover'; /***/ }), -/* 848 */ +/* 853 */ /***/ (function(module, exports) { /** @@ -144209,7 +144925,7 @@ module.exports = 'pointerdown'; /***/ }), -/* 849 */ +/* 854 */ /***/ (function(module, exports) { /** @@ -144250,7 +144966,7 @@ module.exports = 'pointermove'; /***/ }), -/* 850 */ +/* 855 */ /***/ (function(module, exports) { /** @@ -144289,7 +145005,7 @@ module.exports = 'pointerout'; /***/ }), -/* 851 */ +/* 856 */ /***/ (function(module, exports) { /** @@ -144330,7 +145046,7 @@ module.exports = 'pointerover'; /***/ }), -/* 852 */ +/* 857 */ /***/ (function(module, exports) { /** @@ -144371,7 +145087,7 @@ module.exports = 'pointerup'; /***/ }), -/* 853 */ +/* 858 */ /***/ (function(module, exports) { /** @@ -144413,7 +145129,7 @@ module.exports = 'wheel'; /***/ }), -/* 854 */ +/* 859 */ /***/ (function(module, exports) { /** @@ -144454,7 +145170,7 @@ module.exports = 'gameobjectup'; /***/ }), -/* 855 */ +/* 860 */ /***/ (function(module, exports) { /** @@ -144498,7 +145214,7 @@ module.exports = 'gameobjectwheel'; /***/ }), -/* 856 */ +/* 861 */ /***/ (function(module, exports) { /** @@ -144519,7 +145235,7 @@ module.exports = 'boot'; /***/ }), -/* 857 */ +/* 862 */ /***/ (function(module, exports) { /** @@ -144544,7 +145260,7 @@ module.exports = 'process'; /***/ }), -/* 858 */ +/* 863 */ /***/ (function(module, exports) { /** @@ -144565,7 +145281,7 @@ module.exports = 'update'; /***/ }), -/* 859 */ +/* 864 */ /***/ (function(module, exports) { /** @@ -144600,7 +145316,7 @@ module.exports = 'pointerdown'; /***/ }), -/* 860 */ +/* 865 */ /***/ (function(module, exports) { /** @@ -144634,7 +145350,7 @@ module.exports = 'pointerdownoutside'; /***/ }), -/* 861 */ +/* 866 */ /***/ (function(module, exports) { /** @@ -144669,7 +145385,7 @@ module.exports = 'pointermove'; /***/ }), -/* 862 */ +/* 867 */ /***/ (function(module, exports) { /** @@ -144704,7 +145420,7 @@ module.exports = 'pointerout'; /***/ }), -/* 863 */ +/* 868 */ /***/ (function(module, exports) { /** @@ -144739,7 +145455,7 @@ module.exports = 'pointerover'; /***/ }), -/* 864 */ +/* 869 */ /***/ (function(module, exports) { /** @@ -144774,7 +145490,7 @@ module.exports = 'pointerup'; /***/ }), -/* 865 */ +/* 870 */ /***/ (function(module, exports) { /** @@ -144808,7 +145524,7 @@ module.exports = 'pointerupoutside'; /***/ }), -/* 866 */ +/* 871 */ /***/ (function(module, exports) { /** @@ -144846,7 +145562,7 @@ module.exports = 'wheel'; /***/ }), -/* 867 */ +/* 872 */ /***/ (function(module, exports) { /** @@ -144870,7 +145586,7 @@ module.exports = 'pointerlockchange'; /***/ }), -/* 868 */ +/* 873 */ /***/ (function(module, exports) { /** @@ -144892,7 +145608,7 @@ module.exports = 'preupdate'; /***/ }), -/* 869 */ +/* 874 */ /***/ (function(module, exports) { /** @@ -144913,7 +145629,7 @@ module.exports = 'shutdown'; /***/ }), -/* 870 */ +/* 875 */ /***/ (function(module, exports) { /** @@ -144935,7 +145651,7 @@ module.exports = 'start'; /***/ }), -/* 871 */ +/* 876 */ /***/ (function(module, exports) { /** @@ -144960,7 +145676,7 @@ module.exports = 'update'; /***/ }), -/* 872 */ +/* 877 */ /***/ (function(module, exports) { /** @@ -145019,7 +145735,7 @@ module.exports = GetInnerHeight; /***/ }), -/* 873 */ +/* 878 */ /***/ (function(module, exports) { /** @@ -145049,7 +145765,7 @@ module.exports = 'addfile'; /***/ }), -/* 874 */ +/* 879 */ /***/ (function(module, exports) { /** @@ -145077,7 +145793,7 @@ module.exports = 'complete'; /***/ }), -/* 875 */ +/* 880 */ /***/ (function(module, exports) { /** @@ -145106,7 +145822,7 @@ module.exports = 'filecomplete'; /***/ }), -/* 876 */ +/* 881 */ /***/ (function(module, exports) { /** @@ -145160,7 +145876,7 @@ module.exports = 'filecomplete-'; /***/ }), -/* 877 */ +/* 882 */ /***/ (function(module, exports) { /** @@ -145185,7 +145901,7 @@ module.exports = 'loaderror'; /***/ }), -/* 878 */ +/* 883 */ /***/ (function(module, exports) { /** @@ -145211,7 +145927,7 @@ module.exports = 'load'; /***/ }), -/* 879 */ +/* 884 */ /***/ (function(module, exports) { /** @@ -145238,7 +145954,7 @@ module.exports = 'fileprogress'; /***/ }), -/* 880 */ +/* 885 */ /***/ (function(module, exports) { /** @@ -145267,7 +145983,7 @@ module.exports = 'postprocess'; /***/ }), -/* 881 */ +/* 886 */ /***/ (function(module, exports) { /** @@ -145292,7 +146008,7 @@ module.exports = 'progress'; /***/ }), -/* 882 */ +/* 887 */ /***/ (function(module, exports) { /** @@ -145319,7 +146035,7 @@ module.exports = 'start'; /***/ }), -/* 883 */ +/* 888 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145381,7 +146097,7 @@ module.exports = GetPhysicsPlugins; /***/ }), -/* 884 */ +/* 889 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145428,7 +146144,7 @@ module.exports = GetScenePlugins; /***/ }), -/* 885 */ +/* 890 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145489,7 +146205,7 @@ module.exports = InjectionMap; /***/ }), -/* 886 */ +/* 891 */ /***/ (function(module, exports) { /** @@ -145570,7 +146286,7 @@ module.exports = AtlasXML; /***/ }), -/* 887 */ +/* 892 */ /***/ (function(module, exports) { /** @@ -145605,7 +146321,7 @@ module.exports = Canvas; /***/ }), -/* 888 */ +/* 893 */ /***/ (function(module, exports) { /** @@ -145640,7 +146356,7 @@ module.exports = Image; /***/ }), -/* 889 */ +/* 894 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145749,7 +146465,7 @@ module.exports = JSONArray; /***/ }), -/* 890 */ +/* 895 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145857,7 +146573,7 @@ module.exports = JSONHash; /***/ }), -/* 891 */ +/* 896 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145982,7 +146698,7 @@ module.exports = SpriteSheet; /***/ }), -/* 892 */ +/* 897 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146173,7 +146889,7 @@ module.exports = SpriteSheetFromAtlas; /***/ }), -/* 893 */ +/* 898 */ /***/ (function(module, exports) { /** @@ -146343,7 +147059,7 @@ TextureImporter: /***/ }), -/* 894 */ +/* 899 */ /***/ (function(module, exports) { /** @@ -146374,7 +147090,7 @@ module.exports = 'complete'; /***/ }), -/* 895 */ +/* 900 */ /***/ (function(module, exports) { /** @@ -146404,7 +147120,7 @@ module.exports = 'decoded'; /***/ }), -/* 896 */ +/* 901 */ /***/ (function(module, exports) { /** @@ -146436,7 +147152,7 @@ module.exports = 'decodedall'; /***/ }), -/* 897 */ +/* 902 */ /***/ (function(module, exports) { /** @@ -146468,7 +147184,7 @@ module.exports = 'destroy'; /***/ }), -/* 898 */ +/* 903 */ /***/ (function(module, exports) { /** @@ -146501,7 +147217,7 @@ module.exports = 'detune'; /***/ }), -/* 899 */ +/* 904 */ /***/ (function(module, exports) { /** @@ -146529,7 +147245,7 @@ module.exports = 'detune'; /***/ }), -/* 900 */ +/* 905 */ /***/ (function(module, exports) { /** @@ -146556,7 +147272,7 @@ module.exports = 'mute'; /***/ }), -/* 901 */ +/* 906 */ /***/ (function(module, exports) { /** @@ -146584,7 +147300,7 @@ module.exports = 'rate'; /***/ }), -/* 902 */ +/* 907 */ /***/ (function(module, exports) { /** @@ -146611,7 +147327,7 @@ module.exports = 'volume'; /***/ }), -/* 903 */ +/* 908 */ /***/ (function(module, exports) { /** @@ -146645,7 +147361,7 @@ module.exports = 'loop'; /***/ }), -/* 904 */ +/* 909 */ /***/ (function(module, exports) { /** @@ -146679,7 +147395,7 @@ module.exports = 'looped'; /***/ }), -/* 905 */ +/* 910 */ /***/ (function(module, exports) { /** @@ -146712,7 +147428,7 @@ module.exports = 'mute'; /***/ }), -/* 906 */ +/* 911 */ /***/ (function(module, exports) { /** @@ -146739,7 +147455,7 @@ module.exports = 'pauseall'; /***/ }), -/* 907 */ +/* 912 */ /***/ (function(module, exports) { /** @@ -146771,7 +147487,7 @@ module.exports = 'pause'; /***/ }), -/* 908 */ +/* 913 */ /***/ (function(module, exports) { /** @@ -146802,7 +147518,7 @@ module.exports = 'play'; /***/ }), -/* 909 */ +/* 914 */ /***/ (function(module, exports) { /** @@ -146835,7 +147551,7 @@ module.exports = 'rate'; /***/ }), -/* 910 */ +/* 915 */ /***/ (function(module, exports) { /** @@ -146862,7 +147578,7 @@ module.exports = 'resumeall'; /***/ }), -/* 911 */ +/* 916 */ /***/ (function(module, exports) { /** @@ -146895,7 +147611,7 @@ module.exports = 'resume'; /***/ }), -/* 912 */ +/* 917 */ /***/ (function(module, exports) { /** @@ -146928,7 +147644,7 @@ module.exports = 'seek'; /***/ }), -/* 913 */ +/* 918 */ /***/ (function(module, exports) { /** @@ -146955,7 +147671,7 @@ module.exports = 'stopall'; /***/ }), -/* 914 */ +/* 919 */ /***/ (function(module, exports) { /** @@ -146987,7 +147703,7 @@ module.exports = 'stop'; /***/ }), -/* 915 */ +/* 920 */ /***/ (function(module, exports) { /** @@ -147014,7 +147730,7 @@ module.exports = 'unlocked'; /***/ }), -/* 916 */ +/* 921 */ /***/ (function(module, exports) { /** @@ -147047,7 +147763,7 @@ module.exports = 'volume'; /***/ }), -/* 917 */ +/* 922 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147062,19 +147778,19 @@ module.exports = 'volume'; var GameObjects = { - Events: __webpack_require__(90), + Events: __webpack_require__(91), - DisplayList: __webpack_require__(918), + DisplayList: __webpack_require__(923), GameObjectCreator: __webpack_require__(16), GameObjectFactory: __webpack_require__(5), - UpdateList: __webpack_require__(944), + UpdateList: __webpack_require__(949), Components: __webpack_require__(12), BuildGameObject: __webpack_require__(27), BuildGameObjectAnimation: __webpack_require__(393), GameObject: __webpack_require__(14), - BitmapText: __webpack_require__(134), + BitmapText: __webpack_require__(138), Blitter: __webpack_require__(194), Container: __webpack_require__(195), DOMElement: __webpack_require__(395), @@ -147082,16 +147798,16 @@ var GameObjects = { Extern: __webpack_require__(397), Graphics: __webpack_require__(197), Group: __webpack_require__(98), - Image: __webpack_require__(108), - Particles: __webpack_require__(977), + Image: __webpack_require__(111), + Particles: __webpack_require__(982), PathFollower: __webpack_require__(409), RenderTexture: __webpack_require__(201), - RetroFont: __webpack_require__(986), + RetroFont: __webpack_require__(991), Rope: __webpack_require__(203), Sprite: __webpack_require__(75), Text: __webpack_require__(204), TileSprite: __webpack_require__(205), - Zone: __webpack_require__(111), + Zone: __webpack_require__(114), Video: __webpack_require__(206), // Shapes @@ -147112,55 +147828,55 @@ var GameObjects = { // Game Object Factories Factories: { - Blitter: __webpack_require__(1037), - Container: __webpack_require__(1038), - DOMElement: __webpack_require__(1039), - DynamicBitmapText: __webpack_require__(1040), - Extern: __webpack_require__(1041), - Graphics: __webpack_require__(1042), - Group: __webpack_require__(1043), - Image: __webpack_require__(1044), - Particles: __webpack_require__(1045), - PathFollower: __webpack_require__(1046), - RenderTexture: __webpack_require__(1047), - Rope: __webpack_require__(1048), - Sprite: __webpack_require__(1049), - StaticBitmapText: __webpack_require__(1050), - Text: __webpack_require__(1051), - TileSprite: __webpack_require__(1052), - Zone: __webpack_require__(1053), - Video: __webpack_require__(1054), + Blitter: __webpack_require__(1042), + Container: __webpack_require__(1043), + DOMElement: __webpack_require__(1044), + DynamicBitmapText: __webpack_require__(1045), + Extern: __webpack_require__(1046), + Graphics: __webpack_require__(1047), + Group: __webpack_require__(1048), + Image: __webpack_require__(1049), + Particles: __webpack_require__(1050), + PathFollower: __webpack_require__(1051), + RenderTexture: __webpack_require__(1052), + Rope: __webpack_require__(1053), + Sprite: __webpack_require__(1054), + StaticBitmapText: __webpack_require__(1055), + Text: __webpack_require__(1056), + TileSprite: __webpack_require__(1057), + Zone: __webpack_require__(1058), + Video: __webpack_require__(1059), // Shapes - Arc: __webpack_require__(1055), - Curve: __webpack_require__(1056), - Ellipse: __webpack_require__(1057), - Grid: __webpack_require__(1058), - IsoBox: __webpack_require__(1059), - IsoTriangle: __webpack_require__(1060), - Line: __webpack_require__(1061), - Polygon: __webpack_require__(1062), - Rectangle: __webpack_require__(1063), - Star: __webpack_require__(1064), - Triangle: __webpack_require__(1065) + Arc: __webpack_require__(1060), + Curve: __webpack_require__(1061), + Ellipse: __webpack_require__(1062), + Grid: __webpack_require__(1063), + IsoBox: __webpack_require__(1064), + IsoTriangle: __webpack_require__(1065), + Line: __webpack_require__(1066), + Polygon: __webpack_require__(1067), + Rectangle: __webpack_require__(1068), + Star: __webpack_require__(1069), + Triangle: __webpack_require__(1070) }, Creators: { - Blitter: __webpack_require__(1066), - Container: __webpack_require__(1067), - DynamicBitmapText: __webpack_require__(1068), - Graphics: __webpack_require__(1069), - Group: __webpack_require__(1070), - Image: __webpack_require__(1071), - Particles: __webpack_require__(1072), - RenderTexture: __webpack_require__(1073), - Rope: __webpack_require__(1074), - Sprite: __webpack_require__(1075), - StaticBitmapText: __webpack_require__(1076), - Text: __webpack_require__(1077), - TileSprite: __webpack_require__(1078), - Zone: __webpack_require__(1079), - Video: __webpack_require__(1080) + Blitter: __webpack_require__(1071), + Container: __webpack_require__(1072), + DynamicBitmapText: __webpack_require__(1073), + Graphics: __webpack_require__(1074), + Group: __webpack_require__(1075), + Image: __webpack_require__(1076), + Particles: __webpack_require__(1077), + RenderTexture: __webpack_require__(1078), + Rope: __webpack_require__(1079), + Sprite: __webpack_require__(1080), + StaticBitmapText: __webpack_require__(1081), + Text: __webpack_require__(1082), + TileSprite: __webpack_require__(1083), + Zone: __webpack_require__(1084), + Video: __webpack_require__(1085) } }; @@ -147168,29 +147884,29 @@ var GameObjects = { if (true) { // WebGL only Game Objects - GameObjects.Mesh = __webpack_require__(136); + GameObjects.Mesh = __webpack_require__(140); GameObjects.Quad = __webpack_require__(209); GameObjects.Shader = __webpack_require__(210); - GameObjects.Factories.Mesh = __webpack_require__(1087); - GameObjects.Factories.Quad = __webpack_require__(1088); - GameObjects.Factories.Shader = __webpack_require__(1089); + GameObjects.Factories.Mesh = __webpack_require__(1092); + GameObjects.Factories.Quad = __webpack_require__(1093); + GameObjects.Factories.Shader = __webpack_require__(1094); - GameObjects.Creators.Mesh = __webpack_require__(1090); - GameObjects.Creators.Quad = __webpack_require__(1091); - GameObjects.Creators.Shader = __webpack_require__(1092); + GameObjects.Creators.Mesh = __webpack_require__(1095); + GameObjects.Creators.Quad = __webpack_require__(1096); + GameObjects.Creators.Shader = __webpack_require__(1097); GameObjects.Light = __webpack_require__(428); __webpack_require__(429); - __webpack_require__(1093); + __webpack_require__(1098); } module.exports = GameObjects; /***/ }), -/* 918 */ +/* 923 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147200,10 +147916,10 @@ module.exports = GameObjects; */ var Class = __webpack_require__(0); -var List = __webpack_require__(131); +var List = __webpack_require__(135); var PluginCache = __webpack_require__(23); var SceneEvents = __webpack_require__(22); -var StableSort = __webpack_require__(133); +var StableSort = __webpack_require__(137); /** * @classdesc @@ -147395,7 +148111,7 @@ module.exports = DisplayList; /***/ }), -/* 919 */ +/* 924 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147411,20 +148127,20 @@ module.exports = DisplayList; module.exports = { CheckMatrix: __webpack_require__(190), - MatrixToString: __webpack_require__(920), - ReverseColumns: __webpack_require__(921), - ReverseRows: __webpack_require__(922), - Rotate180: __webpack_require__(923), - RotateLeft: __webpack_require__(924), - RotateMatrix: __webpack_require__(132), - RotateRight: __webpack_require__(925), + MatrixToString: __webpack_require__(925), + ReverseColumns: __webpack_require__(926), + ReverseRows: __webpack_require__(927), + Rotate180: __webpack_require__(928), + RotateLeft: __webpack_require__(929), + RotateMatrix: __webpack_require__(136), + RotateRight: __webpack_require__(930), TransposeMatrix: __webpack_require__(390) }; /***/ }), -/* 920 */ +/* 925 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147433,7 +148149,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Pad = __webpack_require__(168); +var Pad = __webpack_require__(169); var CheckMatrix = __webpack_require__(190); /** @@ -147505,7 +148221,7 @@ module.exports = MatrixToString; /***/ }), -/* 921 */ +/* 926 */ /***/ (function(module, exports) { /** @@ -147536,7 +148252,7 @@ module.exports = ReverseColumns; /***/ }), -/* 922 */ +/* 927 */ /***/ (function(module, exports) { /** @@ -147572,7 +148288,7 @@ module.exports = ReverseRows; /***/ }), -/* 923 */ +/* 928 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147581,7 +148297,7 @@ module.exports = ReverseRows; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(132); +var RotateMatrix = __webpack_require__(136); /** * Rotates the array matrix 180 degrees. @@ -147605,7 +148321,7 @@ module.exports = Rotate180; /***/ }), -/* 924 */ +/* 929 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147614,7 +148330,7 @@ module.exports = Rotate180; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(132); +var RotateMatrix = __webpack_require__(136); /** * Rotates the array matrix to the left (or 90 degrees) @@ -147638,7 +148354,7 @@ module.exports = RotateLeft; /***/ }), -/* 925 */ +/* 930 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147647,7 +148363,7 @@ module.exports = RotateLeft; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(132); +var RotateMatrix = __webpack_require__(136); /** * Rotates the array matrix to the left (or -90 degrees) @@ -147671,7 +148387,7 @@ module.exports = RotateRight; /***/ }), -/* 926 */ +/* 931 */ /***/ (function(module, exports) { /** @@ -147788,7 +148504,7 @@ module.exports = Add; /***/ }), -/* 927 */ +/* 932 */ /***/ (function(module, exports) { /** @@ -147910,7 +148626,7 @@ module.exports = AddAt; /***/ }), -/* 928 */ +/* 933 */ /***/ (function(module, exports) { /** @@ -147948,7 +148664,7 @@ module.exports = BringToTop; /***/ }), -/* 929 */ +/* 934 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148000,7 +148716,7 @@ module.exports = CountAllMatching; /***/ }), -/* 930 */ +/* 935 */ /***/ (function(module, exports) { /** @@ -148046,7 +148762,7 @@ module.exports = Each; /***/ }), -/* 931 */ +/* 936 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148102,7 +148818,7 @@ module.exports = EachInRange; /***/ }), -/* 932 */ +/* 937 */ /***/ (function(module, exports) { /** @@ -148144,7 +148860,7 @@ module.exports = MoveDown; /***/ }), -/* 933 */ +/* 938 */ /***/ (function(module, exports) { /** @@ -148191,7 +148907,7 @@ module.exports = MoveTo; /***/ }), -/* 934 */ +/* 939 */ /***/ (function(module, exports) { /** @@ -148233,7 +148949,7 @@ module.exports = MoveUp; /***/ }), -/* 935 */ +/* 940 */ /***/ (function(module, exports) { /** @@ -148297,7 +149013,7 @@ module.exports = NumberArray; /***/ }), -/* 936 */ +/* 941 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148374,7 +149090,7 @@ module.exports = NumberArrayStep; /***/ }), -/* 937 */ +/* 942 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148383,7 +149099,7 @@ module.exports = NumberArrayStep; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SpliceOne = __webpack_require__(80); +var SpliceOne = __webpack_require__(81); /** * Removes the item from the given position in the array. @@ -148425,7 +149141,7 @@ module.exports = RemoveAt; /***/ }), -/* 938 */ +/* 943 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148488,7 +149204,7 @@ module.exports = RemoveBetween; /***/ }), -/* 939 */ +/* 944 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148497,7 +149213,7 @@ module.exports = RemoveBetween; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SpliceOne = __webpack_require__(80); +var SpliceOne = __webpack_require__(81); /** * Removes a random object from the given array and returns it. @@ -148526,7 +149242,7 @@ module.exports = RemoveRandomElement; /***/ }), -/* 940 */ +/* 945 */ /***/ (function(module, exports) { /** @@ -148570,7 +149286,7 @@ module.exports = Replace; /***/ }), -/* 941 */ +/* 946 */ /***/ (function(module, exports) { /** @@ -148608,7 +149324,7 @@ module.exports = SendToBack; /***/ }), -/* 942 */ +/* 947 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148663,7 +149379,7 @@ module.exports = SetAll; /***/ }), -/* 943 */ +/* 948 */ /***/ (function(module, exports) { /** @@ -148711,7 +149427,7 @@ module.exports = Swap; /***/ }), -/* 944 */ +/* 949 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149012,7 +149728,7 @@ module.exports = UpdateList; /***/ }), -/* 945 */ +/* 950 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149027,14 +149743,14 @@ module.exports = UpdateList; module.exports = { - PROCESS_QUEUE_ADD: __webpack_require__(946), - PROCESS_QUEUE_REMOVE: __webpack_require__(947) + PROCESS_QUEUE_ADD: __webpack_require__(951), + PROCESS_QUEUE_REMOVE: __webpack_require__(952) }; /***/ }), -/* 946 */ +/* 951 */ /***/ (function(module, exports) { /** @@ -149061,7 +149777,7 @@ module.exports = 'add'; /***/ }), -/* 947 */ +/* 952 */ /***/ (function(module, exports) { /** @@ -149088,7 +149804,7 @@ module.exports = 'remove'; /***/ }), -/* 948 */ +/* 953 */ /***/ (function(module, exports) { /** @@ -149610,7 +150326,7 @@ module.exports = GetBitmapTextSize; /***/ }), -/* 949 */ +/* 954 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149664,7 +150380,7 @@ module.exports = ParseFromAtlas; /***/ }), -/* 950 */ +/* 955 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149678,12 +150394,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(951); + renderWebGL = __webpack_require__(956); } if (true) { - renderCanvas = __webpack_require__(953); + renderCanvas = __webpack_require__(958); } module.exports = { @@ -149695,7 +150411,7 @@ module.exports = { /***/ }), -/* 951 */ +/* 956 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149704,7 +150420,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BatchChar = __webpack_require__(952); +var BatchChar = __webpack_require__(957); var Utils = __webpack_require__(10); /** @@ -149855,7 +150571,7 @@ module.exports = BitmapTextWebGLRenderer; /***/ }), -/* 952 */ +/* 957 */ /***/ (function(module, exports) { /** @@ -149914,7 +150630,7 @@ module.exports = BatchChar; /***/ }), -/* 953 */ +/* 958 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150096,7 +150812,7 @@ module.exports = BitmapTextCanvasRenderer; /***/ }), -/* 954 */ +/* 959 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150110,12 +150826,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(955); + renderWebGL = __webpack_require__(960); } if (true) { - renderCanvas = __webpack_require__(956); + renderCanvas = __webpack_require__(961); } module.exports = { @@ -150127,7 +150843,7 @@ module.exports = { /***/ }), -/* 955 */ +/* 960 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150257,7 +150973,7 @@ module.exports = BlitterWebGLRenderer; /***/ }), -/* 956 */ +/* 961 */ /***/ (function(module, exports) { /** @@ -150387,7 +151103,7 @@ module.exports = BlitterCanvasRenderer; /***/ }), -/* 957 */ +/* 962 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150817,7 +151533,7 @@ module.exports = Bob; /***/ }), -/* 958 */ +/* 963 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150832,12 +151548,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(959); + renderWebGL = __webpack_require__(964); } if (true) { - renderCanvas = __webpack_require__(960); + renderCanvas = __webpack_require__(965); } module.exports = { @@ -150849,7 +151565,7 @@ module.exports = { /***/ }), -/* 959 */ +/* 964 */ /***/ (function(module, exports) { /** @@ -150998,7 +151714,7 @@ module.exports = ContainerWebGLRenderer; /***/ }), -/* 960 */ +/* 965 */ /***/ (function(module, exports) { /** @@ -151105,7 +151821,7 @@ module.exports = ContainerCanvasRenderer; /***/ }), -/* 961 */ +/* 966 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151136,7 +151852,7 @@ module.exports = { /***/ }), -/* 962 */ +/* 967 */ /***/ (function(module, exports) { /** @@ -151177,7 +151893,7 @@ module.exports = [ /***/ }), -/* 963 */ +/* 968 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151191,12 +151907,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(964); + renderWebGL = __webpack_require__(969); } if (true) { - renderCanvas = __webpack_require__(965); + renderCanvas = __webpack_require__(970); } module.exports = { @@ -151208,7 +151924,7 @@ module.exports = { /***/ }), -/* 964 */ +/* 969 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151218,7 +151934,7 @@ module.exports = { */ var Utils = __webpack_require__(10); -var GetColorFromValue = __webpack_require__(114); +var GetColorFromValue = __webpack_require__(117); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -151515,7 +152231,7 @@ module.exports = DynamicBitmapTextWebGLRenderer; /***/ }), -/* 965 */ +/* 970 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151726,7 +152442,7 @@ module.exports = DynamicBitmapTextCanvasRenderer; /***/ }), -/* 966 */ +/* 971 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151740,12 +152456,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(967); + renderWebGL = __webpack_require__(972); } if (true) { - renderCanvas = __webpack_require__(968); + renderCanvas = __webpack_require__(973); } module.exports = { @@ -151757,7 +152473,7 @@ module.exports = { /***/ }), -/* 967 */ +/* 972 */ /***/ (function(module, exports) { /** @@ -151826,13 +152542,13 @@ module.exports = ExternWebGLRenderer; /***/ }), -/* 968 */ +/* 973 */ /***/ (function(module, exports) { /***/ }), -/* 969 */ +/* 974 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151846,7 +152562,7 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(970); + renderWebGL = __webpack_require__(975); // Needed for Graphics.generateTexture renderCanvas = __webpack_require__(401); @@ -151866,7 +152582,7 @@ module.exports = { /***/ }), -/* 970 */ +/* 975 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152232,7 +152948,7 @@ module.exports = GraphicsWebGLRenderer; /***/ }), -/* 971 */ +/* 976 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152246,12 +152962,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(972); + renderWebGL = __webpack_require__(977); } if (true) { - renderCanvas = __webpack_require__(973); + renderCanvas = __webpack_require__(978); } module.exports = { @@ -152263,7 +152979,7 @@ module.exports = { /***/ }), -/* 972 */ +/* 977 */ /***/ (function(module, exports) { /** @@ -152296,7 +153012,7 @@ module.exports = SpriteWebGLRenderer; /***/ }), -/* 973 */ +/* 978 */ /***/ (function(module, exports) { /** @@ -152329,7 +153045,7 @@ module.exports = SpriteCanvasRenderer; /***/ }), -/* 974 */ +/* 979 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152343,12 +153059,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(975); + renderWebGL = __webpack_require__(980); } if (true) { - renderCanvas = __webpack_require__(976); + renderCanvas = __webpack_require__(981); } module.exports = { @@ -152360,7 +153076,7 @@ module.exports = { /***/ }), -/* 975 */ +/* 980 */ /***/ (function(module, exports) { /** @@ -152393,7 +153109,7 @@ module.exports = ImageWebGLRenderer; /***/ }), -/* 976 */ +/* 981 */ /***/ (function(module, exports) { /** @@ -152426,7 +153142,7 @@ module.exports = ImageCanvasRenderer; /***/ }), -/* 977 */ +/* 982 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152445,13 +153161,13 @@ module.exports = { Particle: __webpack_require__(403), ParticleEmitter: __webpack_require__(404), ParticleEmitterManager: __webpack_require__(200), - Zones: __webpack_require__(982) + Zones: __webpack_require__(987) }; /***/ }), -/* 978 */ +/* 983 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152461,7 +153177,7 @@ module.exports = { */ var Class = __webpack_require__(0); -var FloatBetween = __webpack_require__(121); +var FloatBetween = __webpack_require__(124); var GetEaseFunction = __webpack_require__(69); var GetFastValue = __webpack_require__(2); var Wrap = __webpack_require__(58); @@ -153042,7 +153758,7 @@ module.exports = EmitterOp; /***/ }), -/* 979 */ +/* 984 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153056,12 +153772,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(980); + renderWebGL = __webpack_require__(985); } if (true) { - renderCanvas = __webpack_require__(981); + renderCanvas = __webpack_require__(986); } module.exports = { @@ -153073,7 +153789,7 @@ module.exports = { /***/ }), -/* 980 */ +/* 985 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153234,7 +153950,7 @@ module.exports = ParticleManagerWebGLRenderer; /***/ }), -/* 981 */ +/* 986 */ /***/ (function(module, exports) { /** @@ -153357,7 +154073,7 @@ module.exports = ParticleManagerCanvasRenderer; /***/ }), -/* 982 */ +/* 987 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153380,7 +154096,7 @@ module.exports = { /***/ }), -/* 983 */ +/* 988 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153394,12 +154110,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(984); + renderWebGL = __webpack_require__(989); } if (true) { - renderCanvas = __webpack_require__(985); + renderCanvas = __webpack_require__(990); } module.exports = { @@ -153411,7 +154127,7 @@ module.exports = { /***/ }), -/* 984 */ +/* 989 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153478,7 +154194,7 @@ module.exports = RenderTextureWebGLRenderer; /***/ }), -/* 985 */ +/* 990 */ /***/ (function(module, exports) { /** @@ -153511,7 +154227,7 @@ module.exports = RenderTextureCanvasRenderer; /***/ }), -/* 986 */ +/* 991 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153520,7 +154236,7 @@ module.exports = RenderTextureCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RETRO_FONT_CONST = __webpack_require__(987); +var RETRO_FONT_CONST = __webpack_require__(992); var Extend = __webpack_require__(19); /** @@ -153528,7 +154244,7 @@ var Extend = __webpack_require__(19); * @since 3.6.0 */ -var RetroFont = { Parse: __webpack_require__(988) }; +var RetroFont = { Parse: __webpack_require__(993) }; // Merge in the consts RetroFont = Extend(false, RetroFont, RETRO_FONT_CONST); @@ -153537,7 +154253,7 @@ module.exports = RetroFont; /***/ }), -/* 987 */ +/* 992 */ /***/ (function(module, exports) { /** @@ -153653,7 +154369,7 @@ module.exports = RETRO_FONT_CONST; /***/ }), -/* 988 */ +/* 993 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153769,7 +154485,7 @@ module.exports = ParseRetroFont; /***/ }), -/* 989 */ +/* 994 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153783,12 +154499,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(990); + renderWebGL = __webpack_require__(995); } if (true) { - renderCanvas = __webpack_require__(991); + renderCanvas = __webpack_require__(996); } module.exports = { @@ -153800,7 +154516,7 @@ module.exports = { /***/ }), -/* 990 */ +/* 995 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153937,7 +154653,7 @@ module.exports = RopeWebGLRenderer; /***/ }), -/* 991 */ +/* 996 */ /***/ (function(module, exports) { /** @@ -153966,7 +154682,7 @@ module.exports = RopeCanvasRenderer; /***/ }), -/* 992 */ +/* 997 */ /***/ (function(module, exports) { /** @@ -154048,7 +154764,7 @@ module.exports = GetTextSize; /***/ }), -/* 993 */ +/* 998 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154062,12 +154778,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(994); + renderWebGL = __webpack_require__(999); } if (true) { - renderCanvas = __webpack_require__(995); + renderCanvas = __webpack_require__(1000); } module.exports = { @@ -154079,7 +154795,7 @@ module.exports = { /***/ }), -/* 994 */ +/* 999 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154151,7 +154867,7 @@ module.exports = TextWebGLRenderer; /***/ }), -/* 995 */ +/* 1000 */ /***/ (function(module, exports) { /** @@ -154189,7 +154905,7 @@ module.exports = TextCanvasRenderer; /***/ }), -/* 996 */ +/* 1001 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154201,7 +154917,7 @@ module.exports = TextCanvasRenderer; var Class = __webpack_require__(0); var GetAdvancedValue = __webpack_require__(15); var GetValue = __webpack_require__(6); -var MeasureText = __webpack_require__(997); +var MeasureText = __webpack_require__(1002); // Key: [ Object Key, Default Value ] @@ -155295,7 +156011,7 @@ module.exports = TextStyle; /***/ }), -/* 997 */ +/* 1002 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155430,7 +156146,7 @@ module.exports = MeasureText; /***/ }), -/* 998 */ +/* 1003 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155444,12 +156160,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(999); + renderWebGL = __webpack_require__(1004); } if (true) { - renderCanvas = __webpack_require__(1000); + renderCanvas = __webpack_require__(1005); } module.exports = { @@ -155461,7 +156177,7 @@ module.exports = { /***/ }), -/* 999 */ +/* 1004 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155535,7 +156251,7 @@ module.exports = TileSpriteWebGLRenderer; /***/ }), -/* 1000 */ +/* 1005 */ /***/ (function(module, exports) { /** @@ -155570,7 +156286,7 @@ module.exports = TileSpriteCanvasRenderer; /***/ }), -/* 1001 */ +/* 1006 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155584,12 +156300,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1002); + renderWebGL = __webpack_require__(1007); } if (true) { - renderCanvas = __webpack_require__(1003); + renderCanvas = __webpack_require__(1008); } module.exports = { @@ -155601,7 +156317,7 @@ module.exports = { /***/ }), -/* 1002 */ +/* 1007 */ /***/ (function(module, exports) { /** @@ -155637,7 +156353,7 @@ module.exports = VideoWebGLRenderer; /***/ }), -/* 1003 */ +/* 1008 */ /***/ (function(module, exports) { /** @@ -155673,7 +156389,7 @@ module.exports = VideoCanvasRenderer; /***/ }), -/* 1004 */ +/* 1009 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155687,12 +156403,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1005); + renderWebGL = __webpack_require__(1010); } if (true) { - renderCanvas = __webpack_require__(1006); + renderCanvas = __webpack_require__(1011); } module.exports = { @@ -155704,7 +156420,7 @@ module.exports = { /***/ }), -/* 1005 */ +/* 1010 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155782,7 +156498,7 @@ module.exports = ArcWebGLRenderer; /***/ }), -/* 1006 */ +/* 1011 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155791,8 +156507,8 @@ module.exports = ArcWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DegToRad = __webpack_require__(39); -var FillStyleCanvas = __webpack_require__(41); +var DegToRad = __webpack_require__(40); +var FillStyleCanvas = __webpack_require__(42); var LineStyleCanvas = __webpack_require__(50); var SetTransform = __webpack_require__(28); @@ -155858,7 +156574,7 @@ module.exports = ArcCanvasRenderer; /***/ }), -/* 1007 */ +/* 1012 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155872,12 +156588,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1008); + renderWebGL = __webpack_require__(1013); } if (true) { - renderCanvas = __webpack_require__(1009); + renderCanvas = __webpack_require__(1014); } module.exports = { @@ -155889,7 +156605,7 @@ module.exports = { /***/ }), -/* 1008 */ +/* 1013 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155967,7 +156683,7 @@ module.exports = CurveWebGLRenderer; /***/ }), -/* 1009 */ +/* 1014 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155976,7 +156692,7 @@ module.exports = CurveWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(41); +var FillStyleCanvas = __webpack_require__(42); var LineStyleCanvas = __webpack_require__(50); var SetTransform = __webpack_require__(28); @@ -156055,7 +156771,7 @@ module.exports = CurveCanvasRenderer; /***/ }), -/* 1010 */ +/* 1015 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156069,12 +156785,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1011); + renderWebGL = __webpack_require__(1016); } if (true) { - renderCanvas = __webpack_require__(1012); + renderCanvas = __webpack_require__(1017); } module.exports = { @@ -156086,7 +156802,7 @@ module.exports = { /***/ }), -/* 1011 */ +/* 1016 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156164,7 +156880,7 @@ module.exports = EllipseWebGLRenderer; /***/ }), -/* 1012 */ +/* 1017 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156173,7 +156889,7 @@ module.exports = EllipseWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(41); +var FillStyleCanvas = __webpack_require__(42); var LineStyleCanvas = __webpack_require__(50); var SetTransform = __webpack_require__(28); @@ -156249,7 +156965,7 @@ module.exports = EllipseCanvasRenderer; /***/ }), -/* 1013 */ +/* 1018 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156263,12 +156979,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1014); + renderWebGL = __webpack_require__(1019); } if (true) { - renderCanvas = __webpack_require__(1015); + renderCanvas = __webpack_require__(1020); } module.exports = { @@ -156280,7 +156996,7 @@ module.exports = { /***/ }), -/* 1014 */ +/* 1019 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156500,7 +157216,7 @@ module.exports = GridWebGLRenderer; /***/ }), -/* 1015 */ +/* 1020 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156509,7 +157225,7 @@ module.exports = GridWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(41); +var FillStyleCanvas = __webpack_require__(42); var LineStyleCanvas = __webpack_require__(50); var SetTransform = __webpack_require__(28); @@ -156689,7 +157405,7 @@ module.exports = GridCanvasRenderer; /***/ }), -/* 1016 */ +/* 1021 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156703,12 +157419,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1017); + renderWebGL = __webpack_require__(1022); } if (true) { - renderCanvas = __webpack_require__(1018); + renderCanvas = __webpack_require__(1023); } module.exports = { @@ -156720,7 +157436,7 @@ module.exports = { /***/ }), -/* 1017 */ +/* 1022 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156874,7 +157590,7 @@ module.exports = IsoBoxWebGLRenderer; /***/ }), -/* 1018 */ +/* 1023 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156883,7 +157599,7 @@ module.exports = IsoBoxWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(41); +var FillStyleCanvas = __webpack_require__(42); var SetTransform = __webpack_require__(28); /** @@ -156975,7 +157691,7 @@ module.exports = IsoBoxCanvasRenderer; /***/ }), -/* 1019 */ +/* 1024 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156989,12 +157705,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1020); + renderWebGL = __webpack_require__(1025); } if (true) { - renderCanvas = __webpack_require__(1021); + renderCanvas = __webpack_require__(1026); } module.exports = { @@ -157006,7 +157722,7 @@ module.exports = { /***/ }), -/* 1020 */ +/* 1025 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157181,7 +157897,7 @@ module.exports = IsoTriangleWebGLRenderer; /***/ }), -/* 1021 */ +/* 1026 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157190,7 +157906,7 @@ module.exports = IsoTriangleWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(41); +var FillStyleCanvas = __webpack_require__(42); var SetTransform = __webpack_require__(28); /** @@ -157295,7 +158011,7 @@ module.exports = IsoTriangleCanvasRenderer; /***/ }), -/* 1022 */ +/* 1027 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157309,12 +158025,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1023); + renderWebGL = __webpack_require__(1028); } if (true) { - renderCanvas = __webpack_require__(1024); + renderCanvas = __webpack_require__(1029); } module.exports = { @@ -157326,7 +158042,7 @@ module.exports = { /***/ }), -/* 1023 */ +/* 1028 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157419,7 +158135,7 @@ module.exports = LineWebGLRenderer; /***/ }), -/* 1024 */ +/* 1029 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157476,7 +158192,7 @@ module.exports = LineCanvasRenderer; /***/ }), -/* 1025 */ +/* 1030 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157490,12 +158206,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1026); + renderWebGL = __webpack_require__(1031); } if (true) { - renderCanvas = __webpack_require__(1027); + renderCanvas = __webpack_require__(1032); } module.exports = { @@ -157507,7 +158223,7 @@ module.exports = { /***/ }), -/* 1026 */ +/* 1031 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157585,7 +158301,7 @@ module.exports = PolygonWebGLRenderer; /***/ }), -/* 1027 */ +/* 1032 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157594,7 +158310,7 @@ module.exports = PolygonWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(41); +var FillStyleCanvas = __webpack_require__(42); var LineStyleCanvas = __webpack_require__(50); var SetTransform = __webpack_require__(28); @@ -157670,7 +158386,7 @@ module.exports = PolygonCanvasRenderer; /***/ }), -/* 1028 */ +/* 1033 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157684,12 +158400,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1029); + renderWebGL = __webpack_require__(1034); } if (true) { - renderCanvas = __webpack_require__(1030); + renderCanvas = __webpack_require__(1035); } module.exports = { @@ -157701,7 +158417,7 @@ module.exports = { /***/ }), -/* 1029 */ +/* 1034 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157793,7 +158509,7 @@ module.exports = RectangleWebGLRenderer; /***/ }), -/* 1030 */ +/* 1035 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157802,7 +158518,7 @@ module.exports = RectangleWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(41); +var FillStyleCanvas = __webpack_require__(42); var LineStyleCanvas = __webpack_require__(50); var SetTransform = __webpack_require__(28); @@ -157867,7 +158583,7 @@ module.exports = RectangleCanvasRenderer; /***/ }), -/* 1031 */ +/* 1036 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157881,12 +158597,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1032); + renderWebGL = __webpack_require__(1037); } if (true) { - renderCanvas = __webpack_require__(1033); + renderCanvas = __webpack_require__(1038); } module.exports = { @@ -157898,7 +158614,7 @@ module.exports = { /***/ }), -/* 1032 */ +/* 1037 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157976,7 +158692,7 @@ module.exports = StarWebGLRenderer; /***/ }), -/* 1033 */ +/* 1038 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157985,7 +158701,7 @@ module.exports = StarWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(41); +var FillStyleCanvas = __webpack_require__(42); var LineStyleCanvas = __webpack_require__(50); var SetTransform = __webpack_require__(28); @@ -158061,7 +158777,7 @@ module.exports = StarCanvasRenderer; /***/ }), -/* 1034 */ +/* 1039 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158075,12 +158791,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1035); + renderWebGL = __webpack_require__(1040); } if (true) { - renderCanvas = __webpack_require__(1036); + renderCanvas = __webpack_require__(1041); } module.exports = { @@ -158092,7 +158808,7 @@ module.exports = { /***/ }), -/* 1035 */ +/* 1040 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158195,7 +158911,7 @@ module.exports = TriangleWebGLRenderer; /***/ }), -/* 1036 */ +/* 1041 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158204,7 +158920,7 @@ module.exports = TriangleWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(41); +var FillStyleCanvas = __webpack_require__(42); var LineStyleCanvas = __webpack_require__(50); var SetTransform = __webpack_require__(28); @@ -158270,7 +158986,7 @@ module.exports = TriangleCanvasRenderer; /***/ }), -/* 1037 */ +/* 1042 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158312,7 +159028,7 @@ GameObjectFactory.register('blitter', function (x, y, key, frame) /***/ }), -/* 1038 */ +/* 1043 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158346,7 +159062,7 @@ GameObjectFactory.register('container', function (x, y, children) /***/ }), -/* 1039 */ +/* 1044 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158436,7 +159152,7 @@ GameObjectFactory.register('dom', function (x, y, element, style, innerText) /***/ }), -/* 1040 */ +/* 1045 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158505,7 +159221,7 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size /***/ }), -/* 1041 */ +/* 1046 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158547,7 +159263,7 @@ GameObjectFactory.register('extern', function () /***/ }), -/* 1042 */ +/* 1047 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158586,7 +159302,7 @@ GameObjectFactory.register('graphics', function (config) /***/ }), -/* 1043 */ +/* 1048 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158618,7 +159334,7 @@ GameObjectFactory.register('group', function (children, config) /***/ }), -/* 1044 */ +/* 1049 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158627,7 +159343,7 @@ GameObjectFactory.register('group', function (children, config) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Image = __webpack_require__(108); +var Image = __webpack_require__(111); var GameObjectFactory = __webpack_require__(5); /** @@ -158660,7 +159376,7 @@ GameObjectFactory.register('image', function (x, y, key, frame) /***/ }), -/* 1045 */ +/* 1050 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158706,7 +159422,7 @@ GameObjectFactory.register('particles', function (key, frame, emitters) /***/ }), -/* 1046 */ +/* 1051 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158754,7 +159470,7 @@ GameObjectFactory.register('follower', function (path, x, y, key, frame) /***/ }), -/* 1047 */ +/* 1052 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158794,7 +159510,7 @@ GameObjectFactory.register('renderTexture', function (x, y, width, height, key, /***/ }), -/* 1048 */ +/* 1053 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158848,7 +159564,7 @@ if (true) /***/ }), -/* 1049 */ +/* 1054 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158895,7 +159611,7 @@ GameObjectFactory.register('sprite', function (x, y, key, frame) /***/ }), -/* 1050 */ +/* 1055 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158904,7 +159620,7 @@ GameObjectFactory.register('sprite', function (x, y, key, frame) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(134); +var BitmapText = __webpack_require__(138); var GameObjectFactory = __webpack_require__(5); /** @@ -158959,7 +159675,7 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size, align /***/ }), -/* 1051 */ +/* 1056 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159024,7 +159740,7 @@ GameObjectFactory.register('text', function (x, y, text, style) /***/ }), -/* 1052 */ +/* 1057 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159068,7 +159784,7 @@ GameObjectFactory.register('tileSprite', function (x, y, width, height, key, fra /***/ }), -/* 1053 */ +/* 1058 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159077,7 +159793,7 @@ GameObjectFactory.register('tileSprite', function (x, y, width, height, key, fra * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Zone = __webpack_require__(111); +var Zone = __webpack_require__(114); var GameObjectFactory = __webpack_require__(5); /** @@ -159110,7 +159826,7 @@ GameObjectFactory.register('zone', function (x, y, width, height) /***/ }), -/* 1054 */ +/* 1059 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159156,7 +159872,7 @@ GameObjectFactory.register('video', function (x, y, key) /***/ }), -/* 1055 */ +/* 1060 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159229,7 +159945,7 @@ GameObjectFactory.register('circle', function (x, y, radius, fillColor, fillAlph /***/ }), -/* 1056 */ +/* 1061 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159279,7 +159995,7 @@ GameObjectFactory.register('curve', function (x, y, curve, fillColor, fillAlpha) /***/ }), -/* 1057 */ +/* 1062 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159331,7 +160047,7 @@ GameObjectFactory.register('ellipse', function (x, y, width, height, fillColor, /***/ }), -/* 1058 */ +/* 1063 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159386,7 +160102,7 @@ GameObjectFactory.register('grid', function (x, y, width, height, cellWidth, cel /***/ }), -/* 1059 */ +/* 1064 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159437,7 +160153,7 @@ GameObjectFactory.register('isobox', function (x, y, size, height, fillTop, fill /***/ }), -/* 1060 */ +/* 1065 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159490,7 +160206,7 @@ GameObjectFactory.register('isotriangle', function (x, y, size, height, reversed /***/ }), -/* 1061 */ +/* 1066 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159541,7 +160257,7 @@ GameObjectFactory.register('line', function (x, y, x1, y1, x2, y2, strokeColor, /***/ }), -/* 1062 */ +/* 1067 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159594,7 +160310,7 @@ GameObjectFactory.register('polygon', function (x, y, points, fillColor, fillAlp /***/ }), -/* 1063 */ +/* 1068 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159639,7 +160355,7 @@ GameObjectFactory.register('rectangle', function (x, y, width, height, fillColor /***/ }), -/* 1064 */ +/* 1069 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159691,7 +160407,7 @@ GameObjectFactory.register('star', function (x, y, points, innerRadius, outerRad /***/ }), -/* 1065 */ +/* 1070 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159742,7 +160458,7 @@ GameObjectFactory.register('triangle', function (x, y, x1, y1, x2, y2, x3, y3, f /***/ }), -/* 1066 */ +/* 1071 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159792,7 +160508,7 @@ GameObjectCreator.register('blitter', function (config, addToScene) /***/ }), -/* 1067 */ +/* 1072 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159841,7 +160557,7 @@ GameObjectCreator.register('container', function (config, addToScene) /***/ }), -/* 1068 */ +/* 1073 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159892,7 +160608,7 @@ GameObjectCreator.register('dynamicBitmapText', function (config, addToScene) /***/ }), -/* 1069 */ +/* 1074 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159940,7 +160656,7 @@ GameObjectCreator.register('graphics', function (config, addToScene) /***/ }), -/* 1070 */ +/* 1075 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159973,7 +160689,7 @@ GameObjectCreator.register('group', function (config) /***/ }), -/* 1071 */ +/* 1076 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159985,7 +160701,7 @@ GameObjectCreator.register('group', function (config) var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Image = __webpack_require__(108); +var Image = __webpack_require__(111); /** * Creates a new Image Game Object and returns it. @@ -160023,7 +160739,7 @@ GameObjectCreator.register('image', function (config, addToScene) /***/ }), -/* 1072 */ +/* 1077 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160080,7 +160796,7 @@ GameObjectCreator.register('particles', function (config, addToScene) /***/ }), -/* 1073 */ +/* 1078 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160132,7 +160848,7 @@ GameObjectCreator.register('renderTexture', function (config, addToScene) /***/ }), -/* 1074 */ +/* 1079 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160187,7 +160903,7 @@ GameObjectCreator.register('rope', function (config, addToScene) /***/ }), -/* 1075 */ +/* 1080 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160240,7 +160956,7 @@ GameObjectCreator.register('sprite', function (config, addToScene) /***/ }), -/* 1076 */ +/* 1081 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160249,7 +160965,7 @@ GameObjectCreator.register('sprite', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(134); +var BitmapText = __webpack_require__(138); var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); @@ -160293,7 +161009,7 @@ GameObjectCreator.register('bitmapText', function (config, addToScene) /***/ }), -/* 1077 */ +/* 1082 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160380,7 +161096,7 @@ GameObjectCreator.register('text', function (config, addToScene) /***/ }), -/* 1078 */ +/* 1083 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160432,7 +161148,7 @@ GameObjectCreator.register('tileSprite', function (config, addToScene) /***/ }), -/* 1079 */ +/* 1084 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160443,7 +161159,7 @@ GameObjectCreator.register('tileSprite', function (config, addToScene) var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Zone = __webpack_require__(111); +var Zone = __webpack_require__(114); /** * Creates a new Zone Game Object and returns it. @@ -160471,7 +161187,7 @@ GameObjectCreator.register('zone', function (config) /***/ }), -/* 1080 */ +/* 1085 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160520,7 +161236,7 @@ GameObjectCreator.register('video', function (config, addToScene) /***/ }), -/* 1081 */ +/* 1086 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160534,12 +161250,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1082); + renderWebGL = __webpack_require__(1087); } if (true) { - renderCanvas = __webpack_require__(1083); + renderCanvas = __webpack_require__(1088); } module.exports = { @@ -160551,7 +161267,7 @@ module.exports = { /***/ }), -/* 1082 */ +/* 1087 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160667,7 +161383,7 @@ module.exports = MeshWebGLRenderer; /***/ }), -/* 1083 */ +/* 1088 */ /***/ (function(module, exports) { /** @@ -160696,7 +161412,7 @@ module.exports = MeshCanvasRenderer; /***/ }), -/* 1084 */ +/* 1089 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160710,12 +161426,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1085); + renderWebGL = __webpack_require__(1090); } if (true) { - renderCanvas = __webpack_require__(1086); + renderCanvas = __webpack_require__(1091); } module.exports = { @@ -160727,7 +161443,7 @@ module.exports = { /***/ }), -/* 1085 */ +/* 1090 */ /***/ (function(module, exports) { /** @@ -160811,7 +161527,7 @@ module.exports = ShaderWebGLRenderer; /***/ }), -/* 1086 */ +/* 1091 */ /***/ (function(module, exports) { /** @@ -160840,7 +161556,7 @@ module.exports = ShaderCanvasRenderer; /***/ }), -/* 1087 */ +/* 1092 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160849,7 +161565,7 @@ module.exports = ShaderCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Mesh = __webpack_require__(136); +var Mesh = __webpack_require__(140); var GameObjectFactory = __webpack_require__(5); /** @@ -160890,7 +161606,7 @@ if (true) /***/ }), -/* 1088 */ +/* 1093 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160936,7 +161652,7 @@ if (true) /***/ }), -/* 1089 */ +/* 1094 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160977,7 +161693,7 @@ if (true) /***/ }), -/* 1090 */ +/* 1095 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160990,7 +161706,7 @@ var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); var GetValue = __webpack_require__(6); -var Mesh = __webpack_require__(136); +var Mesh = __webpack_require__(140); /** * Creates a new Mesh Game Object and returns it. @@ -161032,7 +161748,7 @@ GameObjectCreator.register('mesh', function (config, addToScene) /***/ }), -/* 1091 */ +/* 1096 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161082,7 +161798,7 @@ GameObjectCreator.register('quad', function (config, addToScene) /***/ }), -/* 1092 */ +/* 1097 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161135,7 +161851,7 @@ GameObjectCreator.register('shader', function (config, addToScene) /***/ }), -/* 1093 */ +/* 1098 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161251,7 +161967,7 @@ module.exports = LightsPlugin; /***/ }), -/* 1094 */ +/* 1099 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161262,27 +161978,27 @@ module.exports = LightsPlugin; var Circle = __webpack_require__(65); -Circle.Area = __webpack_require__(1095); +Circle.Area = __webpack_require__(1100); Circle.Circumference = __webpack_require__(272); -Circle.CircumferencePoint = __webpack_require__(153); -Circle.Clone = __webpack_require__(1096); +Circle.CircumferencePoint = __webpack_require__(154); +Circle.Clone = __webpack_require__(1101); Circle.Contains = __webpack_require__(56); -Circle.ContainsPoint = __webpack_require__(1097); -Circle.ContainsRect = __webpack_require__(1098); -Circle.CopyFrom = __webpack_require__(1099); -Circle.Equals = __webpack_require__(1100); -Circle.GetBounds = __webpack_require__(1101); +Circle.ContainsPoint = __webpack_require__(1102); +Circle.ContainsRect = __webpack_require__(1103); +Circle.CopyFrom = __webpack_require__(1104); +Circle.Equals = __webpack_require__(1105); +Circle.GetBounds = __webpack_require__(1106); Circle.GetPoint = __webpack_require__(270); Circle.GetPoints = __webpack_require__(271); -Circle.Offset = __webpack_require__(1102); -Circle.OffsetPoint = __webpack_require__(1103); -Circle.Random = __webpack_require__(154); +Circle.Offset = __webpack_require__(1107); +Circle.OffsetPoint = __webpack_require__(1108); +Circle.Random = __webpack_require__(155); module.exports = Circle; /***/ }), -/* 1095 */ +/* 1100 */ /***/ (function(module, exports) { /** @@ -161310,7 +162026,7 @@ module.exports = Area; /***/ }), -/* 1096 */ +/* 1101 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161340,7 +162056,7 @@ module.exports = Clone; /***/ }), -/* 1097 */ +/* 1102 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161371,7 +162087,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1098 */ +/* 1103 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161407,7 +162123,7 @@ module.exports = ContainsRect; /***/ }), -/* 1099 */ +/* 1104 */ /***/ (function(module, exports) { /** @@ -161439,7 +162155,7 @@ module.exports = CopyFrom; /***/ }), -/* 1100 */ +/* 1105 */ /***/ (function(module, exports) { /** @@ -161473,7 +162189,7 @@ module.exports = Equals; /***/ }), -/* 1101 */ +/* 1106 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161513,7 +162229,7 @@ module.exports = GetBounds; /***/ }), -/* 1102 */ +/* 1107 */ /***/ (function(module, exports) { /** @@ -161548,7 +162264,7 @@ module.exports = Offset; /***/ }), -/* 1103 */ +/* 1108 */ /***/ (function(module, exports) { /** @@ -161582,7 +162298,7 @@ module.exports = OffsetPoint; /***/ }), -/* 1104 */ +/* 1109 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161593,27 +162309,27 @@ module.exports = OffsetPoint; var Ellipse = __webpack_require__(96); -Ellipse.Area = __webpack_require__(1105); +Ellipse.Area = __webpack_require__(1110); Ellipse.Circumference = __webpack_require__(400); Ellipse.CircumferencePoint = __webpack_require__(199); -Ellipse.Clone = __webpack_require__(1106); +Ellipse.Clone = __webpack_require__(1111); Ellipse.Contains = __webpack_require__(97); -Ellipse.ContainsPoint = __webpack_require__(1107); -Ellipse.ContainsRect = __webpack_require__(1108); -Ellipse.CopyFrom = __webpack_require__(1109); -Ellipse.Equals = __webpack_require__(1110); -Ellipse.GetBounds = __webpack_require__(1111); +Ellipse.ContainsPoint = __webpack_require__(1112); +Ellipse.ContainsRect = __webpack_require__(1113); +Ellipse.CopyFrom = __webpack_require__(1114); +Ellipse.Equals = __webpack_require__(1115); +Ellipse.GetBounds = __webpack_require__(1116); Ellipse.GetPoint = __webpack_require__(398); Ellipse.GetPoints = __webpack_require__(399); -Ellipse.Offset = __webpack_require__(1112); -Ellipse.OffsetPoint = __webpack_require__(1113); -Ellipse.Random = __webpack_require__(162); +Ellipse.Offset = __webpack_require__(1117); +Ellipse.OffsetPoint = __webpack_require__(1118); +Ellipse.Random = __webpack_require__(163); module.exports = Ellipse; /***/ }), -/* 1105 */ +/* 1110 */ /***/ (function(module, exports) { /** @@ -161647,7 +162363,7 @@ module.exports = Area; /***/ }), -/* 1106 */ +/* 1111 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161677,7 +162393,7 @@ module.exports = Clone; /***/ }), -/* 1107 */ +/* 1112 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161708,7 +162424,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1108 */ +/* 1113 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161744,7 +162460,7 @@ module.exports = ContainsRect; /***/ }), -/* 1109 */ +/* 1114 */ /***/ (function(module, exports) { /** @@ -161776,7 +162492,7 @@ module.exports = CopyFrom; /***/ }), -/* 1110 */ +/* 1115 */ /***/ (function(module, exports) { /** @@ -161811,7 +162527,7 @@ module.exports = Equals; /***/ }), -/* 1111 */ +/* 1116 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161851,7 +162567,7 @@ module.exports = GetBounds; /***/ }), -/* 1112 */ +/* 1117 */ /***/ (function(module, exports) { /** @@ -161886,7 +162602,7 @@ module.exports = Offset; /***/ }), -/* 1113 */ +/* 1118 */ /***/ (function(module, exports) { /** @@ -161920,7 +162636,7 @@ module.exports = OffsetPoint; /***/ }), -/* 1114 */ +/* 1119 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162014,7 +162730,7 @@ module.exports = GetCircleToCircle; /***/ }), -/* 1115 */ +/* 1120 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162064,7 +162780,7 @@ module.exports = GetCircleToRectangle; /***/ }), -/* 1116 */ +/* 1121 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162073,91 +162789,100 @@ module.exports = GetCircleToRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector3 = __webpack_require__(94); -var Vector4 = __webpack_require__(179); -var GetLineToLine = __webpack_require__(432); -var Line = __webpack_require__(49); +var Vector4 = __webpack_require__(126); +var GetLineToPolygon = __webpack_require__(434); +var Line = __webpack_require__(39); // Temp calculation segment var segment = new Line(); -// Temp vec3 -var tempIntersect = new Vector3(); +/** + * @ignore + */ +function CheckIntersects (angle, x, y, polygons, intersects) +{ + var dx = Math.cos(angle); + var dy = Math.sin(angle); + + segment.setTo(x, y, x + dx, y + dy); + + var closestIntersect = GetLineToPolygon(segment, polygons); + + if (closestIntersect) + { + intersects.push(new Vector4(closestIntersect.x, closestIntersect.y, angle, closestIntersect.w)); + } +} /** - * Checks for the closest point of intersection between a line segment and an array of polygons. + * @ignore + */ +function SortIntersects (a, b) +{ + return a.z - b.z; +} + +/** + * Projects rays out from the given point to each line segment of the polygons. * - * If no intersection is found, this function returns `null`. + * If the rays intersect with the polygons, the points of intersection are returned in an array. * - * If intersection was found, a Vector4 is returned with the following properties: + * If no intersections are found, the returned array will be empty. + * + * Each Vector4 intersection result has the following properties: * * The `x` and `y` components contain the point of the intersection. - * The `z` component contains the closest distance. + * The `z` component contains the angle of intersection. * The `w` component contains the index of the polygon, in the given array, that triggered the intersection. * - * @function Phaser.Geom.Intersects.GetLineToPolygon + * @function Phaser.Geom.Intersects.GetRaysFromPointToPolygon * @since 3.50.0 * - * @param {Phaser.Geom.Line} line - The line segment to check. - * @param {Phaser.Geom.Polygon | Phaser.Geom.Polygon[]} polygons - A single polygon, or array of polygons, to check. - * @param {Phaser.Math.Vector4} [out] - A Vector4 to store the intersection results in. + * @param {number} x - The x coordinate to project the rays from. + * @param {number} y - The y coordinate to project the rays from. + * @param {Phaser.Geom.Polygon | Phaser.Geom.Polygon[]} polygons - A single polygon, or array of polygons, to check against the rays. * - * @return {Phaser.Math.Vector4} A Vector4 containing the intersection results, or `null`. + * @return {Phaser.Math.Vector4[]} An array containing all intersections in Vector4s. */ -var GetLineToPolygon = function (line, polygons, out) +var GetRaysFromPointToPolygon = function (x, y, polygons) { - if (out === undefined) - { - out = new Vector4(); - } - if (!Array.isArray(polygons)) { polygons = [ polygons ]; } - var closestIntersect = false; + var intersects = []; + var angles = []; - // Reset our temporary vec4 - tempIntersect.set(); - - for (var p = 0; p < polygons.length; p++) + for (var i = 0; i < polygons.length; i++) { - var points = polygons[p].points; + var points = polygons[i].points; - var prev = points[0]; - - for (var i = 1; i < points.length; i++) + for (var p = 0; p < points.length; p++) { - var current = points[i]; + var angle = Math.atan2(points[p].y - y, points[p].x - x); - segment.setTo(prev.x, prev.y, current.x, current.y); - - prev = current; - - if (!GetLineToLine(line, segment, tempIntersect)) + if (angles.indexOf(angle) === -1) { - // No intersection? Carry on ... - continue; - } + // +- 0.00001 rads to catch lines behind segment corners - if (!closestIntersect || tempIntersect.z < out.z) - { - out.set(tempIntersect.x, tempIntersect.y, tempIntersect.z, p); + CheckIntersects(angle, x, y, polygons, intersects); + CheckIntersects(angle - 0.00001, x, y, polygons, intersects); + CheckIntersects(angle + 0.00001, x, y, polygons, intersects); - closestIntersect = true; + angles.push(angle); } } } - return (closestIntersect) ? out : null; + return intersects.sort(SortIntersects); }; -module.exports = GetLineToPolygon; +module.exports = GetRaysFromPointToPolygon; /***/ }), -/* 1117 */ +/* 1122 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162167,7 +162892,7 @@ module.exports = GetLineToPolygon; */ var Rectangle = __webpack_require__(9); -var RectangleToRectangle = __webpack_require__(137); +var RectangleToRectangle = __webpack_require__(141); /** * Checks if two Rectangle shapes intersect and returns the area of this intersection as Rectangle object. @@ -162206,7 +162931,7 @@ module.exports = GetRectangleIntersection; /***/ }), -/* 1118 */ +/* 1123 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162217,7 +162942,7 @@ module.exports = GetRectangleIntersection; */ var GetLineToRectangle = __webpack_require__(215); -var RectangleToRectangle = __webpack_require__(137); +var RectangleToRectangle = __webpack_require__(141); /** * Checks if two Rectangles intersect and returns the intersection points as a Point object array. @@ -162257,7 +162982,7 @@ module.exports = GetRectangleToRectangle; /***/ }), -/* 1119 */ +/* 1124 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162267,7 +162992,7 @@ module.exports = GetRectangleToRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RectangleToTriangle = __webpack_require__(434); +var RectangleToTriangle = __webpack_require__(436); var GetLineToRectangle = __webpack_require__(215); /** @@ -162305,7 +163030,7 @@ module.exports = GetRectangleToTriangle; /***/ }), -/* 1120 */ +/* 1125 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162316,7 +163041,7 @@ module.exports = GetRectangleToTriangle; */ var GetLineToCircle = __webpack_require__(213); -var TriangleToCircle = __webpack_require__(436); +var TriangleToCircle = __webpack_require__(438); /** * Checks if a Triangle and a Circle intersect, and returns the intersection points as a Point object array. @@ -162354,7 +163079,7 @@ module.exports = GetTriangleToCircle; /***/ }), -/* 1121 */ +/* 1126 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162364,8 +163089,8 @@ module.exports = GetTriangleToCircle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TriangleToTriangle = __webpack_require__(439); -var GetTriangleToLine = __webpack_require__(437); +var TriangleToTriangle = __webpack_require__(441); +var GetTriangleToLine = __webpack_require__(439); /** * Checks if two Triangles intersect, and returns the intersection points as a Point object array. @@ -162403,7 +163128,7 @@ module.exports = GetTriangleToTriangle; /***/ }), -/* 1122 */ +/* 1127 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162412,7 +163137,7 @@ module.exports = GetTriangleToTriangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PointToLine = __webpack_require__(441); +var PointToLine = __webpack_require__(443); /** * Checks if a Point is located on the given line segment. @@ -162444,7 +163169,7 @@ module.exports = PointToLineSegment; /***/ }), -/* 1123 */ +/* 1128 */ /***/ (function(module, exports) { /** @@ -162484,7 +163209,7 @@ module.exports = RectangleToValues; /***/ }), -/* 1124 */ +/* 1129 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162493,43 +163218,43 @@ module.exports = RectangleToValues; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Line = __webpack_require__(49); +var Line = __webpack_require__(39); -Line.Angle = __webpack_require__(85); +Line.Angle = __webpack_require__(86); Line.BresenhamPoints = __webpack_require__(292); -Line.CenterOn = __webpack_require__(1125); -Line.Clone = __webpack_require__(1126); -Line.CopyFrom = __webpack_require__(1127); -Line.Equals = __webpack_require__(1128); -Line.Extend = __webpack_require__(1129); -Line.GetEasedPoints = __webpack_require__(1130); -Line.GetMidPoint = __webpack_require__(1131); -Line.GetNearestPoint = __webpack_require__(1132); -Line.GetNormal = __webpack_require__(1133); +Line.CenterOn = __webpack_require__(1130); +Line.Clone = __webpack_require__(1131); +Line.CopyFrom = __webpack_require__(1132); +Line.Equals = __webpack_require__(1133); +Line.Extend = __webpack_require__(1134); +Line.GetEasedPoints = __webpack_require__(1135); +Line.GetMidPoint = __webpack_require__(1136); +Line.GetNearestPoint = __webpack_require__(1137); +Line.GetNormal = __webpack_require__(1138); Line.GetPoint = __webpack_require__(279); -Line.GetPoints = __webpack_require__(157); -Line.GetShortestDistance = __webpack_require__(1134); -Line.Height = __webpack_require__(1135); +Line.GetPoints = __webpack_require__(158); +Line.GetShortestDistance = __webpack_require__(1139); +Line.Height = __webpack_require__(1140); Line.Length = __webpack_require__(57); -Line.NormalAngle = __webpack_require__(442); -Line.NormalX = __webpack_require__(1136); -Line.NormalY = __webpack_require__(1137); -Line.Offset = __webpack_require__(1138); -Line.PerpSlope = __webpack_require__(1139); -Line.Random = __webpack_require__(158); -Line.ReflectAngle = __webpack_require__(1140); -Line.Rotate = __webpack_require__(1141); -Line.RotateAroundPoint = __webpack_require__(1142); +Line.NormalAngle = __webpack_require__(444); +Line.NormalX = __webpack_require__(1141); +Line.NormalY = __webpack_require__(1142); +Line.Offset = __webpack_require__(1143); +Line.PerpSlope = __webpack_require__(1144); +Line.Random = __webpack_require__(159); +Line.ReflectAngle = __webpack_require__(1145); +Line.Rotate = __webpack_require__(1146); +Line.RotateAroundPoint = __webpack_require__(1147); Line.RotateAroundXY = __webpack_require__(217); -Line.SetToAngle = __webpack_require__(1143); -Line.Slope = __webpack_require__(1144); -Line.Width = __webpack_require__(1145); +Line.SetToAngle = __webpack_require__(1148); +Line.Slope = __webpack_require__(1149); +Line.Width = __webpack_require__(1150); module.exports = Line; /***/ }), -/* 1125 */ +/* 1130 */ /***/ (function(module, exports) { /** @@ -162569,7 +163294,7 @@ module.exports = CenterOn; /***/ }), -/* 1126 */ +/* 1131 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162578,7 +163303,7 @@ module.exports = CenterOn; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Line = __webpack_require__(49); +var Line = __webpack_require__(39); /** * Clone the given line. @@ -162599,7 +163324,7 @@ module.exports = Clone; /***/ }), -/* 1127 */ +/* 1132 */ /***/ (function(module, exports) { /** @@ -162630,7 +163355,7 @@ module.exports = CopyFrom; /***/ }), -/* 1128 */ +/* 1133 */ /***/ (function(module, exports) { /** @@ -162664,7 +163389,7 @@ module.exports = Equals; /***/ }), -/* 1129 */ +/* 1134 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162722,7 +163447,7 @@ module.exports = Extend; /***/ }), -/* 1130 */ +/* 1135 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162842,7 +163567,7 @@ module.exports = GetEasedPoints; /***/ }), -/* 1131 */ +/* 1136 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162880,7 +163605,7 @@ module.exports = GetMidPoint; /***/ }), -/* 1132 */ +/* 1137 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162935,7 +163660,7 @@ module.exports = GetNearestPoint; /***/ }), -/* 1133 */ +/* 1138 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162945,7 +163670,7 @@ module.exports = GetNearestPoint; */ var MATH_CONST = __webpack_require__(13); -var Angle = __webpack_require__(85); +var Angle = __webpack_require__(86); var Point = __webpack_require__(4); /** @@ -162979,7 +163704,7 @@ module.exports = GetNormal; /***/ }), -/* 1134 */ +/* 1139 */ /***/ (function(module, exports) { /** @@ -163026,7 +163751,7 @@ module.exports = GetShortestDistance; /***/ }), -/* 1135 */ +/* 1140 */ /***/ (function(module, exports) { /** @@ -163054,7 +163779,7 @@ module.exports = Height; /***/ }), -/* 1136 */ +/* 1141 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163064,7 +163789,7 @@ module.exports = Height; */ var MATH_CONST = __webpack_require__(13); -var Angle = __webpack_require__(85); +var Angle = __webpack_require__(86); /** * Returns the x component of the normal vector of the given line. @@ -163085,7 +163810,7 @@ module.exports = NormalX; /***/ }), -/* 1137 */ +/* 1142 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163095,7 +163820,7 @@ module.exports = NormalX; */ var MATH_CONST = __webpack_require__(13); -var Angle = __webpack_require__(85); +var Angle = __webpack_require__(86); /** * The Y value of the normal of the given line. @@ -163117,7 +163842,7 @@ module.exports = NormalY; /***/ }), -/* 1138 */ +/* 1143 */ /***/ (function(module, exports) { /** @@ -163155,7 +163880,7 @@ module.exports = Offset; /***/ }), -/* 1139 */ +/* 1144 */ /***/ (function(module, exports) { /** @@ -163183,7 +163908,7 @@ module.exports = PerpSlope; /***/ }), -/* 1140 */ +/* 1145 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163192,8 +163917,8 @@ module.exports = PerpSlope; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Angle = __webpack_require__(85); -var NormalAngle = __webpack_require__(442); +var Angle = __webpack_require__(86); +var NormalAngle = __webpack_require__(444); /** * Calculate the reflected angle between two lines. @@ -163217,7 +163942,7 @@ module.exports = ReflectAngle; /***/ }), -/* 1141 */ +/* 1146 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163253,7 +163978,7 @@ module.exports = Rotate; /***/ }), -/* 1142 */ +/* 1147 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163287,7 +164012,7 @@ module.exports = RotateAroundPoint; /***/ }), -/* 1143 */ +/* 1148 */ /***/ (function(module, exports) { /** @@ -163327,7 +164052,7 @@ module.exports = SetToAngle; /***/ }), -/* 1144 */ +/* 1149 */ /***/ (function(module, exports) { /** @@ -163355,7 +164080,7 @@ module.exports = Slope; /***/ }), -/* 1145 */ +/* 1150 */ /***/ (function(module, exports) { /** @@ -163383,7 +164108,7 @@ module.exports = Width; /***/ }), -/* 1146 */ +/* 1151 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163394,27 +164119,27 @@ module.exports = Width; var Point = __webpack_require__(4); -Point.Ceil = __webpack_require__(1147); -Point.Clone = __webpack_require__(1148); -Point.CopyFrom = __webpack_require__(1149); -Point.Equals = __webpack_require__(1150); -Point.Floor = __webpack_require__(1151); -Point.GetCentroid = __webpack_require__(1152); -Point.GetMagnitude = __webpack_require__(443); -Point.GetMagnitudeSq = __webpack_require__(444); -Point.GetRectangleFromPoints = __webpack_require__(1153); -Point.Interpolate = __webpack_require__(1154); -Point.Invert = __webpack_require__(1155); -Point.Negative = __webpack_require__(1156); -Point.Project = __webpack_require__(1157); -Point.ProjectUnit = __webpack_require__(1158); -Point.SetMagnitude = __webpack_require__(1159); +Point.Ceil = __webpack_require__(1152); +Point.Clone = __webpack_require__(1153); +Point.CopyFrom = __webpack_require__(1154); +Point.Equals = __webpack_require__(1155); +Point.Floor = __webpack_require__(1156); +Point.GetCentroid = __webpack_require__(1157); +Point.GetMagnitude = __webpack_require__(445); +Point.GetMagnitudeSq = __webpack_require__(446); +Point.GetRectangleFromPoints = __webpack_require__(1158); +Point.Interpolate = __webpack_require__(1159); +Point.Invert = __webpack_require__(1160); +Point.Negative = __webpack_require__(1161); +Point.Project = __webpack_require__(1162); +Point.ProjectUnit = __webpack_require__(1163); +Point.SetMagnitude = __webpack_require__(1164); module.exports = Point; /***/ }), -/* 1147 */ +/* 1152 */ /***/ (function(module, exports) { /** @@ -163444,7 +164169,7 @@ module.exports = Ceil; /***/ }), -/* 1148 */ +/* 1153 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163474,7 +164199,7 @@ module.exports = Clone; /***/ }), -/* 1149 */ +/* 1154 */ /***/ (function(module, exports) { /** @@ -163505,7 +164230,7 @@ module.exports = CopyFrom; /***/ }), -/* 1150 */ +/* 1155 */ /***/ (function(module, exports) { /** @@ -163534,7 +164259,7 @@ module.exports = Equals; /***/ }), -/* 1151 */ +/* 1156 */ /***/ (function(module, exports) { /** @@ -163564,7 +164289,7 @@ module.exports = Floor; /***/ }), -/* 1152 */ +/* 1157 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163628,7 +164353,7 @@ module.exports = GetCentroid; /***/ }), -/* 1153 */ +/* 1158 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163698,7 +164423,7 @@ module.exports = GetRectangleFromPoints; /***/ }), -/* 1154 */ +/* 1159 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163739,7 +164464,7 @@ module.exports = Interpolate; /***/ }), -/* 1155 */ +/* 1160 */ /***/ (function(module, exports) { /** @@ -163769,7 +164494,7 @@ module.exports = Invert; /***/ }), -/* 1156 */ +/* 1161 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163804,7 +164529,7 @@ module.exports = Negative; /***/ }), -/* 1157 */ +/* 1162 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163814,7 +164539,7 @@ module.exports = Negative; */ var Point = __webpack_require__(4); -var GetMagnitudeSq = __webpack_require__(444); +var GetMagnitudeSq = __webpack_require__(446); /** * Calculates the vector projection of `pointA` onto the nonzero `pointB`. This is the @@ -163851,7 +164576,7 @@ module.exports = Project; /***/ }), -/* 1158 */ +/* 1163 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163896,7 +164621,7 @@ module.exports = ProjectUnit; /***/ }), -/* 1159 */ +/* 1164 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163905,7 +164630,7 @@ module.exports = ProjectUnit; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetMagnitude = __webpack_require__(443); +var GetMagnitude = __webpack_require__(445); /** * Changes the magnitude (length) of a two-dimensional vector without changing its direction. @@ -163940,7 +164665,7 @@ module.exports = SetMagnitude; /***/ }), -/* 1160 */ +/* 1165 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163951,22 +164676,23 @@ module.exports = SetMagnitude; var Polygon = __webpack_require__(207); -Polygon.Clone = __webpack_require__(1161); +Polygon.Clone = __webpack_require__(1166); Polygon.Contains = __webpack_require__(208); -Polygon.ContainsPoint = __webpack_require__(1162); +Polygon.ContainsPoint = __webpack_require__(1167); Polygon.GetAABB = __webpack_require__(418); -Polygon.GetNumberArray = __webpack_require__(1163); +Polygon.GetNumberArray = __webpack_require__(1168); Polygon.GetPoints = __webpack_require__(419); Polygon.Perimeter = __webpack_require__(420); -Polygon.Reverse = __webpack_require__(1164); +Polygon.Reverse = __webpack_require__(1169); +Polygon.Simplify = __webpack_require__(1170); Polygon.Smooth = __webpack_require__(421); -Polygon.Translate = __webpack_require__(1165); +Polygon.Translate = __webpack_require__(1171); module.exports = Polygon; /***/ }), -/* 1161 */ +/* 1166 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163996,7 +164722,7 @@ module.exports = Clone; /***/ }), -/* 1162 */ +/* 1167 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164027,7 +164753,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1163 */ +/* 1168 */ /***/ (function(module, exports) { /** @@ -164070,7 +164796,7 @@ module.exports = GetNumberArray; /***/ }), -/* 1164 */ +/* 1169 */ /***/ (function(module, exports) { /** @@ -164102,7 +164828,217 @@ module.exports = Reverse; /***/ }), -/* 1165 */ +/* 1170 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * @author Richard Davey + * @author Vladimir Agafonkin + * @see Based on Simplify.js mourner.github.io/simplify-js + */ + +/** + * Copyright (c) 2017, Vladimir Agafonkin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + + +/** + * @ignore + */ +function getSqDist (p1, p2) +{ + var dx = p1.x - p2.x, + dy = p1.y - p2.y; + + return dx * dx + dy * dy; +} + +/** + * Square distance from a point to a segment + * + * @ignore + */ +function getSqSegDist (p, p1, p2) +{ + var x = p1.x, + y = p1.y, + dx = p2.x - x, + dy = p2.y - y; + + if (dx !== 0 || dy !== 0) + { + var t = ((p.x - x) * dx + (p.y - y) * dy) / (dx * dx + dy * dy); + + if (t > 1) + { + x = p2.x; + y = p2.y; + } + else if (t > 0) + { + x += dx * t; + y += dy * t; + } + } + + dx = p.x - x; + dy = p.y - y; + + return dx * dx + dy * dy; +} + +/** + * Basic distance-based simplification + * + * @ignore + */ +function simplifyRadialDist (points, sqTolerance) +{ + var prevPoint = points[0], + newPoints = [ prevPoint ], + point; + + for (var i = 1, len = points.length; i < len; i++) + { + point = points[i]; + + if (getSqDist(point, prevPoint) > sqTolerance) + { + newPoints.push(point); + prevPoint = point; + } + } + + if (prevPoint !== point) + { + newPoints.push(point); + } + + return newPoints; +} + +/** + * @ignore + */ +function simplifyDPStep (points, first, last, sqTolerance, simplified) +{ + var maxSqDist = sqTolerance, + index; + + for (var i = first + 1; i < last; i++) + { + var sqDist = getSqSegDist(points[i], points[first], points[last]); + + if (sqDist > maxSqDist) + { + index = i; + maxSqDist = sqDist; + } + } + + if (maxSqDist > sqTolerance) + { + if (index - first > 1) + { + simplifyDPStep(points, first, index, sqTolerance, simplified); + } + + simplified.push(points[index]); + + if (last - index > 1) + { + simplifyDPStep(points, index, last, sqTolerance, simplified); + } + } +} + +/** + * Simplification using Ramer-Douglas-Peucker algorithm + * + * @ignore + */ +function simplifyDouglasPeucker (points, sqTolerance) +{ + var last = points.length - 1; + + var simplified = [ points[0] ]; + + simplifyDPStep(points, 0, last, sqTolerance, simplified); + + simplified.push(points[last]); + + return simplified; +} + +/** + * Takes a Polygon object and simplifies the points by running them through a combination of + * Douglas-Peucker and Radial Distance algorithms. Simplification dramatically reduces the number of + * points in a polygon while retaining its shape, giving a huge performance boost when processing + * it and also reducing visual noise. + * + * @function Phaser.Geom.Polygon.Simplify + * @since 3.50.0 + * + * @generic {Phaser.Geom.Polygon} O - [polygon,$return] + * + * @param {Phaser.Geom.Polygon} polygon - The polygon to be simplified. The polygon will be modified in-place and returned. + * @param {number} [tolerance=1] - Affects the amount of simplification (in the same metric as the point coordinates). + * @param {boolean} [highestQuality=false] - Excludes distance-based preprocessing step which leads to highest quality simplification but runs ~10-20 times slower. + * + * @return {Phaser.Geom.Polygon} The input polygon. + */ +var Simplify = function (polygon, tolerance, highestQuality) +{ + if (tolerance === undefined) { tolerance = 1; } + if (highestQuality === undefined) { highestQuality = false; } + + var points = polygon.points; + + if (points.length <= 2) + { + return points; + } + + var sqTolerance = tolerance * tolerance; + + if (!highestQuality) + { + points = simplifyRadialDist(points, sqTolerance); + } + + polygon.setTo(simplifyDouglasPeucker(points, sqTolerance)); + + return polygon; +}; + +module.exports = Simplify; + + +/***/ }), +/* 1171 */ /***/ (function(module, exports) { /** @@ -164142,7 +165078,7 @@ module.exports = Translate; /***/ }), -/* 1166 */ +/* 1172 */ /***/ (function(module, exports) { /** @@ -164170,7 +165106,7 @@ module.exports = Area; /***/ }), -/* 1167 */ +/* 1173 */ /***/ (function(module, exports) { /** @@ -164203,7 +165139,7 @@ module.exports = Ceil; /***/ }), -/* 1168 */ +/* 1174 */ /***/ (function(module, exports) { /** @@ -164238,7 +165174,7 @@ module.exports = CeilAll; /***/ }), -/* 1169 */ +/* 1175 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164268,7 +165204,7 @@ module.exports = Clone; /***/ }), -/* 1170 */ +/* 1176 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164277,7 +165213,7 @@ module.exports = Clone; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(48); +var Contains = __webpack_require__(49); /** * Determines whether the specified point is contained within the rectangular region defined by this Rectangle object. @@ -164299,7 +165235,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1171 */ +/* 1177 */ /***/ (function(module, exports) { /** @@ -164330,7 +165266,7 @@ module.exports = CopyFrom; /***/ }), -/* 1172 */ +/* 1178 */ /***/ (function(module, exports) { /** @@ -164364,7 +165300,7 @@ module.exports = Equals; /***/ }), -/* 1173 */ +/* 1179 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164417,7 +165353,7 @@ module.exports = FitInside; /***/ }), -/* 1174 */ +/* 1180 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164470,7 +165406,7 @@ module.exports = FitOutside; /***/ }), -/* 1175 */ +/* 1181 */ /***/ (function(module, exports) { /** @@ -164503,7 +165439,7 @@ module.exports = Floor; /***/ }), -/* 1176 */ +/* 1182 */ /***/ (function(module, exports) { /** @@ -164538,7 +165474,7 @@ module.exports = FloorAll; /***/ }), -/* 1177 */ +/* 1183 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164581,7 +165517,7 @@ module.exports = FromXY; /***/ }), -/* 1178 */ +/* 1184 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164619,7 +165555,7 @@ module.exports = GetCenter; /***/ }), -/* 1179 */ +/* 1185 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164659,7 +165595,7 @@ module.exports = GetSize; /***/ }), -/* 1180 */ +/* 1186 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164668,7 +165604,7 @@ module.exports = GetSize; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CenterOn = __webpack_require__(173); +var CenterOn = __webpack_require__(174); /** @@ -164701,7 +165637,7 @@ module.exports = Inflate; /***/ }), -/* 1181 */ +/* 1187 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164711,7 +165647,7 @@ module.exports = Inflate; */ var Rectangle = __webpack_require__(9); -var Intersects = __webpack_require__(137); +var Intersects = __webpack_require__(141); /** * Takes two Rectangles and first checks to see if they intersect. @@ -164752,7 +165688,7 @@ module.exports = Intersection; /***/ }), -/* 1182 */ +/* 1188 */ /***/ (function(module, exports) { /** @@ -164801,7 +165737,7 @@ module.exports = MergePoints; /***/ }), -/* 1183 */ +/* 1189 */ /***/ (function(module, exports) { /** @@ -164848,7 +165784,7 @@ module.exports = MergeRect; /***/ }), -/* 1184 */ +/* 1190 */ /***/ (function(module, exports) { /** @@ -164892,7 +165828,7 @@ module.exports = MergeXY; /***/ }), -/* 1185 */ +/* 1191 */ /***/ (function(module, exports) { /** @@ -164927,7 +165863,7 @@ module.exports = Offset; /***/ }), -/* 1186 */ +/* 1192 */ /***/ (function(module, exports) { /** @@ -164961,7 +165897,7 @@ module.exports = OffsetPoint; /***/ }), -/* 1187 */ +/* 1193 */ /***/ (function(module, exports) { /** @@ -164995,7 +165931,7 @@ module.exports = Overlaps; /***/ }), -/* 1188 */ +/* 1194 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165005,7 +165941,7 @@ module.exports = Overlaps; */ var Point = __webpack_require__(4); -var DegToRad = __webpack_require__(39); +var DegToRad = __webpack_require__(40); /** * Returns a Point from the perimeter of a Rectangle based on the given angle. @@ -165052,7 +165988,7 @@ module.exports = PerimeterPoint; /***/ }), -/* 1189 */ +/* 1195 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165061,8 +165997,8 @@ module.exports = PerimeterPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Between = __webpack_require__(177); -var ContainsRect = __webpack_require__(446); +var Between = __webpack_require__(178); +var ContainsRect = __webpack_require__(448); var Point = __webpack_require__(4); /** @@ -165123,7 +166059,7 @@ module.exports = RandomOutside; /***/ }), -/* 1190 */ +/* 1196 */ /***/ (function(module, exports) { /** @@ -165152,7 +166088,7 @@ module.exports = SameDimensions; /***/ }), -/* 1191 */ +/* 1197 */ /***/ (function(module, exports) { /** @@ -165191,7 +166127,7 @@ module.exports = Scale; /***/ }), -/* 1192 */ +/* 1198 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165202,36 +166138,36 @@ module.exports = Scale; var Triangle = __webpack_require__(71); -Triangle.Area = __webpack_require__(1193); -Triangle.BuildEquilateral = __webpack_require__(1194); -Triangle.BuildFromPolygon = __webpack_require__(1195); -Triangle.BuildRight = __webpack_require__(1196); -Triangle.CenterOn = __webpack_require__(1197); -Triangle.Centroid = __webpack_require__(447); -Triangle.CircumCenter = __webpack_require__(1198); -Triangle.CircumCircle = __webpack_require__(1199); -Triangle.Clone = __webpack_require__(1200); -Triangle.Contains = __webpack_require__(83); +Triangle.Area = __webpack_require__(1199); +Triangle.BuildEquilateral = __webpack_require__(1200); +Triangle.BuildFromPolygon = __webpack_require__(1201); +Triangle.BuildRight = __webpack_require__(1202); +Triangle.CenterOn = __webpack_require__(1203); +Triangle.Centroid = __webpack_require__(449); +Triangle.CircumCenter = __webpack_require__(1204); +Triangle.CircumCircle = __webpack_require__(1205); +Triangle.Clone = __webpack_require__(1206); +Triangle.Contains = __webpack_require__(84); Triangle.ContainsArray = __webpack_require__(216); -Triangle.ContainsPoint = __webpack_require__(1201); -Triangle.CopyFrom = __webpack_require__(1202); -Triangle.Decompose = __webpack_require__(440); -Triangle.Equals = __webpack_require__(1203); +Triangle.ContainsPoint = __webpack_require__(1207); +Triangle.CopyFrom = __webpack_require__(1208); +Triangle.Decompose = __webpack_require__(442); +Triangle.Equals = __webpack_require__(1209); Triangle.GetPoint = __webpack_require__(425); Triangle.GetPoints = __webpack_require__(426); -Triangle.InCenter = __webpack_require__(449); -Triangle.Perimeter = __webpack_require__(1204); -Triangle.Offset = __webpack_require__(448); -Triangle.Random = __webpack_require__(163); -Triangle.Rotate = __webpack_require__(1205); -Triangle.RotateAroundPoint = __webpack_require__(1206); +Triangle.InCenter = __webpack_require__(451); +Triangle.Perimeter = __webpack_require__(1210); +Triangle.Offset = __webpack_require__(450); +Triangle.Random = __webpack_require__(164); +Triangle.Rotate = __webpack_require__(1211); +Triangle.RotateAroundPoint = __webpack_require__(1212); Triangle.RotateAroundXY = __webpack_require__(219); module.exports = Triangle; /***/ }), -/* 1193 */ +/* 1199 */ /***/ (function(module, exports) { /** @@ -165270,7 +166206,7 @@ module.exports = Area; /***/ }), -/* 1194 */ +/* 1200 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165314,7 +166250,7 @@ module.exports = BuildEquilateral; /***/ }), -/* 1195 */ +/* 1201 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165390,7 +166326,7 @@ module.exports = BuildFromPolygon; /***/ }), -/* 1196 */ +/* 1202 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165439,7 +166375,7 @@ module.exports = BuildRight; /***/ }), -/* 1197 */ +/* 1203 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165448,8 +166384,8 @@ module.exports = BuildRight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Centroid = __webpack_require__(447); -var Offset = __webpack_require__(448); +var Centroid = __webpack_require__(449); +var Offset = __webpack_require__(450); /** * @callback CenterFunction @@ -165492,7 +166428,7 @@ module.exports = CenterOn; /***/ }), -/* 1198 */ +/* 1204 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165568,7 +166504,7 @@ module.exports = CircumCenter; /***/ }), -/* 1199 */ +/* 1205 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165651,7 +166587,7 @@ module.exports = CircumCircle; /***/ }), -/* 1200 */ +/* 1206 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165681,7 +166617,7 @@ module.exports = Clone; /***/ }), -/* 1201 */ +/* 1207 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165690,7 +166626,7 @@ module.exports = Clone; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(83); +var Contains = __webpack_require__(84); /** * Tests if a triangle contains a point. @@ -165712,7 +166648,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1202 */ +/* 1208 */ /***/ (function(module, exports) { /** @@ -165743,7 +166679,7 @@ module.exports = CopyFrom; /***/ }), -/* 1203 */ +/* 1209 */ /***/ (function(module, exports) { /** @@ -165779,7 +166715,7 @@ module.exports = Equals; /***/ }), -/* 1204 */ +/* 1210 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165814,7 +166750,7 @@ module.exports = Perimeter; /***/ }), -/* 1205 */ +/* 1211 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165824,7 +166760,7 @@ module.exports = Perimeter; */ var RotateAroundXY = __webpack_require__(219); -var InCenter = __webpack_require__(449); +var InCenter = __webpack_require__(451); /** * Rotates a Triangle about its incenter, which is the point at which its three angle bisectors meet. @@ -165850,7 +166786,7 @@ module.exports = Rotate; /***/ }), -/* 1206 */ +/* 1212 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165884,7 +166820,7 @@ module.exports = RotateAroundPoint; /***/ }), -/* 1207 */ +/* 1213 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165902,16 +166838,16 @@ var Extend = __webpack_require__(19); var Input = { - CreateInteractiveObject: __webpack_require__(450), + CreateInteractiveObject: __webpack_require__(452), Events: __webpack_require__(55), - Gamepad: __webpack_require__(1208), + Gamepad: __webpack_require__(1214), InputManager: __webpack_require__(365), - InputPlugin: __webpack_require__(1220), - InputPluginCache: __webpack_require__(138), - Keyboard: __webpack_require__(1222), - Mouse: __webpack_require__(1239), + InputPlugin: __webpack_require__(1226), + InputPluginCache: __webpack_require__(142), + Keyboard: __webpack_require__(1228), + Mouse: __webpack_require__(1245), Pointer: __webpack_require__(368), - Touch: __webpack_require__(1240) + Touch: __webpack_require__(1246) }; @@ -165922,7 +166858,7 @@ module.exports = Input; /***/ }), -/* 1208 */ +/* 1214 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165937,18 +166873,18 @@ module.exports = Input; module.exports = { - Axis: __webpack_require__(451), - Button: __webpack_require__(452), + Axis: __webpack_require__(453), + Button: __webpack_require__(454), Events: __webpack_require__(220), - Gamepad: __webpack_require__(453), - GamepadPlugin: __webpack_require__(1215), + Gamepad: __webpack_require__(455), + GamepadPlugin: __webpack_require__(1221), - Configs: __webpack_require__(1216) + Configs: __webpack_require__(1222) }; /***/ }), -/* 1209 */ +/* 1215 */ /***/ (function(module, exports) { /** @@ -165977,7 +166913,7 @@ module.exports = 'down'; /***/ }), -/* 1210 */ +/* 1216 */ /***/ (function(module, exports) { /** @@ -166006,7 +166942,7 @@ module.exports = 'up'; /***/ }), -/* 1211 */ +/* 1217 */ /***/ (function(module, exports) { /** @@ -166037,7 +166973,7 @@ module.exports = 'connected'; /***/ }), -/* 1212 */ +/* 1218 */ /***/ (function(module, exports) { /** @@ -166063,7 +166999,7 @@ module.exports = 'disconnected'; /***/ }), -/* 1213 */ +/* 1219 */ /***/ (function(module, exports) { /** @@ -166095,7 +167031,7 @@ module.exports = 'down'; /***/ }), -/* 1214 */ +/* 1220 */ /***/ (function(module, exports) { /** @@ -166127,7 +167063,7 @@ module.exports = 'up'; /***/ }), -/* 1215 */ +/* 1221 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166139,9 +167075,9 @@ module.exports = 'up'; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(11); var Events = __webpack_require__(220); -var Gamepad = __webpack_require__(453); +var Gamepad = __webpack_require__(455); var GetValue = __webpack_require__(6); -var InputPluginCache = __webpack_require__(138); +var InputPluginCache = __webpack_require__(142); var InputEvents = __webpack_require__(55); /** @@ -166765,7 +167701,7 @@ module.exports = GamepadPlugin; /***/ }), -/* 1216 */ +/* 1222 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166780,15 +167716,15 @@ module.exports = GamepadPlugin; module.exports = { - DUALSHOCK_4: __webpack_require__(1217), - SNES_USB: __webpack_require__(1218), - XBOX_360: __webpack_require__(1219) + DUALSHOCK_4: __webpack_require__(1223), + SNES_USB: __webpack_require__(1224), + XBOX_360: __webpack_require__(1225) }; /***/ }), -/* 1217 */ +/* 1223 */ /***/ (function(module, exports) { /** @@ -166838,7 +167774,7 @@ module.exports = { /***/ }), -/* 1218 */ +/* 1224 */ /***/ (function(module, exports) { /** @@ -166877,7 +167813,7 @@ module.exports = { /***/ }), -/* 1219 */ +/* 1225 */ /***/ (function(module, exports) { /** @@ -166928,7 +167864,7 @@ module.exports = { /***/ }), -/* 1220 */ +/* 1226 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166941,23 +167877,23 @@ var Circle = __webpack_require__(65); var CircleContains = __webpack_require__(56); var Class = __webpack_require__(0); var CONST = __webpack_require__(185); -var CreateInteractiveObject = __webpack_require__(450); -var CreatePixelPerfectHandler = __webpack_require__(1221); +var CreateInteractiveObject = __webpack_require__(452); +var CreatePixelPerfectHandler = __webpack_require__(1227); var DistanceBetween = __webpack_require__(54); var Ellipse = __webpack_require__(96); var EllipseContains = __webpack_require__(97); var Events = __webpack_require__(55); var EventEmitter = __webpack_require__(11); var GetFastValue = __webpack_require__(2); -var GEOM_CONST = __webpack_require__(47); -var InputPluginCache = __webpack_require__(138); +var GEOM_CONST = __webpack_require__(48); +var InputPluginCache = __webpack_require__(142); var IsPlainObject = __webpack_require__(7); var PluginCache = __webpack_require__(23); var Rectangle = __webpack_require__(9); -var RectangleContains = __webpack_require__(48); +var RectangleContains = __webpack_require__(49); var SceneEvents = __webpack_require__(22); var Triangle = __webpack_require__(71); -var TriangleContains = __webpack_require__(83); +var TriangleContains = __webpack_require__(84); /** * @classdesc @@ -170109,7 +171045,7 @@ module.exports = InputPlugin; /***/ }), -/* 1221 */ +/* 1227 */ /***/ (function(module, exports) { /** @@ -170145,7 +171081,7 @@ module.exports = CreatePixelPerfectHandler; /***/ }), -/* 1222 */ +/* 1228 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170160,26 +171096,26 @@ module.exports = CreatePixelPerfectHandler; module.exports = { - Events: __webpack_require__(139), + Events: __webpack_require__(143), KeyboardManager: __webpack_require__(366), - KeyboardPlugin: __webpack_require__(1230), + KeyboardPlugin: __webpack_require__(1236), - Key: __webpack_require__(454), - KeyCodes: __webpack_require__(126), + Key: __webpack_require__(456), + KeyCodes: __webpack_require__(130), - KeyCombo: __webpack_require__(455), + KeyCombo: __webpack_require__(457), - JustDown: __webpack_require__(1235), - JustUp: __webpack_require__(1236), - DownDuration: __webpack_require__(1237), - UpDuration: __webpack_require__(1238) + JustDown: __webpack_require__(1241), + JustUp: __webpack_require__(1242), + DownDuration: __webpack_require__(1243), + UpDuration: __webpack_require__(1244) }; /***/ }), -/* 1223 */ +/* 1229 */ /***/ (function(module, exports) { /** @@ -170215,7 +171151,7 @@ module.exports = 'keydown'; /***/ }), -/* 1224 */ +/* 1230 */ /***/ (function(module, exports) { /** @@ -170244,7 +171180,7 @@ module.exports = 'keyup'; /***/ }), -/* 1225 */ +/* 1231 */ /***/ (function(module, exports) { /** @@ -170278,7 +171214,7 @@ module.exports = 'keycombomatch'; /***/ }), -/* 1226 */ +/* 1232 */ /***/ (function(module, exports) { /** @@ -170312,7 +171248,7 @@ module.exports = 'down'; /***/ }), -/* 1227 */ +/* 1233 */ /***/ (function(module, exports) { /** @@ -170351,7 +171287,7 @@ module.exports = 'keydown-'; /***/ }), -/* 1228 */ +/* 1234 */ /***/ (function(module, exports) { /** @@ -170383,7 +171319,7 @@ module.exports = 'keyup-'; /***/ }), -/* 1229 */ +/* 1235 */ /***/ (function(module, exports) { /** @@ -170417,7 +171353,7 @@ module.exports = 'up'; /***/ }), -/* 1230 */ +/* 1236 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170428,16 +171364,16 @@ module.exports = 'up'; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(139); +var Events = __webpack_require__(143); var GameEvents = __webpack_require__(20); var GetValue = __webpack_require__(6); var InputEvents = __webpack_require__(55); -var InputPluginCache = __webpack_require__(138); -var Key = __webpack_require__(454); -var KeyCodes = __webpack_require__(126); -var KeyCombo = __webpack_require__(455); -var KeyMap = __webpack_require__(1234); -var SnapFloor = __webpack_require__(93); +var InputPluginCache = __webpack_require__(142); +var Key = __webpack_require__(456); +var KeyCodes = __webpack_require__(130); +var KeyCombo = __webpack_require__(457); +var KeyMap = __webpack_require__(1240); +var SnapFloor = __webpack_require__(94); /** * @classdesc @@ -171345,7 +172281,7 @@ module.exports = KeyboardPlugin; /***/ }), -/* 1231 */ +/* 1237 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171354,7 +172290,7 @@ module.exports = KeyboardPlugin; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AdvanceKeyCombo = __webpack_require__(1232); +var AdvanceKeyCombo = __webpack_require__(1238); /** * Used internally by the KeyCombo class. @@ -171426,7 +172362,7 @@ module.exports = ProcessKeyCombo; /***/ }), -/* 1232 */ +/* 1238 */ /***/ (function(module, exports) { /** @@ -171468,7 +172404,7 @@ module.exports = AdvanceKeyCombo; /***/ }), -/* 1233 */ +/* 1239 */ /***/ (function(module, exports) { /** @@ -171503,7 +172439,7 @@ module.exports = ResetKeyCombo; /***/ }), -/* 1234 */ +/* 1240 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171512,7 +172448,7 @@ module.exports = ResetKeyCombo; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var KeyCodes = __webpack_require__(126); +var KeyCodes = __webpack_require__(130); var KeyMap = {}; @@ -171525,7 +172461,7 @@ module.exports = KeyMap; /***/ }), -/* 1235 */ +/* 1241 */ /***/ (function(module, exports) { /** @@ -171567,7 +172503,7 @@ module.exports = JustDown; /***/ }), -/* 1236 */ +/* 1242 */ /***/ (function(module, exports) { /** @@ -171609,7 +172545,7 @@ module.exports = JustUp; /***/ }), -/* 1237 */ +/* 1243 */ /***/ (function(module, exports) { /** @@ -171643,7 +172579,7 @@ module.exports = DownDuration; /***/ }), -/* 1238 */ +/* 1244 */ /***/ (function(module, exports) { /** @@ -171677,7 +172613,7 @@ module.exports = UpDuration; /***/ }), -/* 1239 */ +/* 1245 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171700,7 +172636,7 @@ module.exports = { /***/ }), -/* 1240 */ +/* 1246 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171723,7 +172659,7 @@ module.exports = { /***/ }), -/* 1241 */ +/* 1247 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171741,18 +172677,18 @@ var Extend = __webpack_require__(19); var Loader = { - Events: __webpack_require__(82), + Events: __webpack_require__(83), - FileTypes: __webpack_require__(1242), + FileTypes: __webpack_require__(1248), File: __webpack_require__(21), FileTypesManager: __webpack_require__(8), - GetURL: __webpack_require__(140), - LoaderPlugin: __webpack_require__(1266), + GetURL: __webpack_require__(144), + LoaderPlugin: __webpack_require__(1272), MergeXHRSettings: __webpack_require__(221), MultiFile: __webpack_require__(61), - XHRLoader: __webpack_require__(456), - XHRSettings: __webpack_require__(141) + XHRLoader: __webpack_require__(458), + XHRSettings: __webpack_require__(145) }; @@ -171763,7 +172699,7 @@ module.exports = Loader; /***/ }), -/* 1242 */ +/* 1248 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171778,42 +172714,42 @@ module.exports = Loader; module.exports = { - AnimationJSONFile: __webpack_require__(1243), - AtlasJSONFile: __webpack_require__(1244), - AtlasXMLFile: __webpack_require__(1245), - AudioFile: __webpack_require__(457), - AudioSpriteFile: __webpack_require__(1246), - BinaryFile: __webpack_require__(1247), - BitmapFontFile: __webpack_require__(1248), - CSSFile: __webpack_require__(1249), - GLSLFile: __webpack_require__(1250), - HTML5AudioFile: __webpack_require__(458), - HTMLFile: __webpack_require__(1251), - HTMLTextureFile: __webpack_require__(1252), + AnimationJSONFile: __webpack_require__(1249), + AtlasJSONFile: __webpack_require__(1250), + AtlasXMLFile: __webpack_require__(1251), + AudioFile: __webpack_require__(459), + AudioSpriteFile: __webpack_require__(1252), + BinaryFile: __webpack_require__(1253), + BitmapFontFile: __webpack_require__(1254), + CSSFile: __webpack_require__(1255), + GLSLFile: __webpack_require__(1256), + HTML5AudioFile: __webpack_require__(460), + HTMLFile: __webpack_require__(1257), + HTMLTextureFile: __webpack_require__(1258), ImageFile: __webpack_require__(72), JSONFile: __webpack_require__(60), - MultiAtlasFile: __webpack_require__(1253), - MultiScriptFile: __webpack_require__(1254), - PackFile: __webpack_require__(1255), - PluginFile: __webpack_require__(1256), - SceneFile: __webpack_require__(1257), - ScenePluginFile: __webpack_require__(1258), - ScriptFile: __webpack_require__(459), - SpriteSheetFile: __webpack_require__(1259), - SVGFile: __webpack_require__(1260), - TextFile: __webpack_require__(460), - TilemapCSVFile: __webpack_require__(1261), - TilemapImpactFile: __webpack_require__(1262), - TilemapJSONFile: __webpack_require__(1263), - UnityAtlasFile: __webpack_require__(1264), - VideoFile: __webpack_require__(1265), + MultiAtlasFile: __webpack_require__(1259), + MultiScriptFile: __webpack_require__(1260), + PackFile: __webpack_require__(1261), + PluginFile: __webpack_require__(1262), + SceneFile: __webpack_require__(1263), + ScenePluginFile: __webpack_require__(1264), + ScriptFile: __webpack_require__(461), + SpriteSheetFile: __webpack_require__(1265), + SVGFile: __webpack_require__(1266), + TextFile: __webpack_require__(462), + TilemapCSVFile: __webpack_require__(1267), + TilemapImpactFile: __webpack_require__(1268), + TilemapJSONFile: __webpack_require__(1269), + UnityAtlasFile: __webpack_require__(1270), + VideoFile: __webpack_require__(1271), XMLFile: __webpack_require__(222) }; /***/ }), -/* 1243 */ +/* 1249 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171825,7 +172761,7 @@ module.exports = { var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var JSONFile = __webpack_require__(60); -var LoaderEvents = __webpack_require__(82); +var LoaderEvents = __webpack_require__(83); /** * @classdesc @@ -172014,7 +172950,7 @@ module.exports = AnimationJSONFile; /***/ }), -/* 1244 */ +/* 1250 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172263,7 +173199,7 @@ module.exports = AtlasJSONFile; /***/ }), -/* 1245 */ +/* 1251 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172506,7 +173442,7 @@ module.exports = AtlasXMLFile; /***/ }), -/* 1246 */ +/* 1252 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172515,7 +173451,7 @@ module.exports = AtlasXMLFile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AudioFile = __webpack_require__(457); +var AudioFile = __webpack_require__(459); var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); @@ -172796,7 +173732,7 @@ FileTypesManager.register('audioSprite', function (key, jsonURL, audioURL, audio /***/ }), -/* 1247 */ +/* 1253 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172978,7 +173914,7 @@ module.exports = BinaryFile; /***/ }), -/* 1248 */ +/* 1254 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173225,7 +174161,7 @@ module.exports = BitmapFontFile; /***/ }), -/* 1249 */ +/* 1255 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173393,7 +174329,7 @@ module.exports = CSSFile; /***/ }), -/* 1250 */ +/* 1256 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173804,7 +174740,7 @@ module.exports = GLSLFile; /***/ }), -/* 1251 */ +/* 1257 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173979,7 +174915,7 @@ module.exports = HTMLFile; /***/ }), -/* 1252 */ +/* 1258 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174237,7 +175173,7 @@ module.exports = HTMLTextureFile; /***/ }), -/* 1253 */ +/* 1259 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174570,7 +175506,7 @@ module.exports = MultiAtlasFile; /***/ }), -/* 1254 */ +/* 1260 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174584,7 +175520,7 @@ var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); var MultiFile = __webpack_require__(61); -var ScriptFile = __webpack_require__(459); +var ScriptFile = __webpack_require__(461); /** * @classdesc @@ -174787,7 +175723,7 @@ module.exports = MultiScriptFile; /***/ }), -/* 1255 */ +/* 1261 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -175005,7 +175941,7 @@ module.exports = PackFile; /***/ }), -/* 1256 */ +/* 1262 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -175217,7 +176153,7 @@ module.exports = PluginFile; /***/ }), -/* 1257 */ +/* 1263 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -175438,7 +176374,7 @@ module.exports = SceneFile; /***/ }), -/* 1258 */ +/* 1264 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -175644,7 +176580,7 @@ module.exports = ScenePluginFile; /***/ }), -/* 1259 */ +/* 1265 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -175835,7 +176771,7 @@ module.exports = SpriteSheetFile; /***/ }), -/* 1260 */ +/* 1266 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -176174,7 +177110,7 @@ module.exports = SVGFile; /***/ }), -/* 1261 */ +/* 1267 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -176369,7 +177305,7 @@ module.exports = TilemapCSVFile; /***/ }), -/* 1262 */ +/* 1268 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -176525,7 +177461,7 @@ module.exports = TilemapImpactFile; /***/ }), -/* 1263 */ +/* 1269 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -176681,7 +177617,7 @@ module.exports = TilemapJSONFile; /***/ }), -/* 1264 */ +/* 1270 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -176696,7 +177632,7 @@ var GetFastValue = __webpack_require__(2); var ImageFile = __webpack_require__(72); var IsPlainObject = __webpack_require__(7); var MultiFile = __webpack_require__(61); -var TextFile = __webpack_require__(460); +var TextFile = __webpack_require__(462); /** * @classdesc @@ -176923,7 +177859,7 @@ module.exports = UnityAtlasFile; /***/ }), -/* 1265 */ +/* 1271 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -176936,7 +177872,7 @@ var Class = __webpack_require__(0); var CONST = __webpack_require__(18); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); -var GetURL = __webpack_require__(140); +var GetURL = __webpack_require__(144); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -177317,7 +178253,7 @@ module.exports = VideoFile; /***/ }), -/* 1266 */ +/* 1272 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177328,14 +178264,14 @@ module.exports = VideoFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var CustomSet = __webpack_require__(135); +var CustomSet = __webpack_require__(139); var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(82); +var Events = __webpack_require__(83); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var PluginCache = __webpack_require__(23); var SceneEvents = __webpack_require__(22); -var XHRSettings = __webpack_require__(141); +var XHRSettings = __webpack_require__(145); /** * @classdesc @@ -178400,7 +179336,7 @@ module.exports = LoaderPlugin; /***/ }), -/* 1267 */ +/* 1273 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178418,18 +179354,18 @@ var Extend = __webpack_require__(19); var Arcade = { - ArcadePhysics: __webpack_require__(1268), - Body: __webpack_require__(467), - Collider: __webpack_require__(468), + ArcadePhysics: __webpack_require__(1274), + Body: __webpack_require__(469), + Collider: __webpack_require__(470), Components: __webpack_require__(223), Events: __webpack_require__(224), - Factory: __webpack_require__(461), - Group: __webpack_require__(463), - Image: __webpack_require__(462), - Sprite: __webpack_require__(142), - StaticBody: __webpack_require__(473), - StaticGroup: __webpack_require__(464), - World: __webpack_require__(466) + Factory: __webpack_require__(463), + Group: __webpack_require__(465), + Image: __webpack_require__(464), + Sprite: __webpack_require__(146), + StaticBody: __webpack_require__(475), + StaticGroup: __webpack_require__(466), + World: __webpack_require__(468) }; @@ -178440,7 +179376,7 @@ module.exports = Arcade; /***/ }), -/* 1268 */ +/* 1274 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178450,18 +179386,18 @@ module.exports = Arcade; */ var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(39); +var DegToRad = __webpack_require__(40); var DistanceBetween = __webpack_require__(54); var DistanceSquared = __webpack_require__(325); -var Factory = __webpack_require__(461); +var Factory = __webpack_require__(463); var GetFastValue = __webpack_require__(2); -var Merge = __webpack_require__(128); -var OverlapCirc = __webpack_require__(1281); -var OverlapRect = __webpack_require__(465); +var Merge = __webpack_require__(132); +var OverlapCirc = __webpack_require__(1287); +var OverlapRect = __webpack_require__(467); var PluginCache = __webpack_require__(23); var SceneEvents = __webpack_require__(22); var Vector2 = __webpack_require__(3); -var World = __webpack_require__(466); +var World = __webpack_require__(468); /** * @classdesc @@ -179129,7 +180065,7 @@ module.exports = ArcadePhysics; /***/ }), -/* 1269 */ +/* 1275 */ /***/ (function(module, exports) { /** @@ -179204,7 +180140,7 @@ module.exports = Acceleration; /***/ }), -/* 1270 */ +/* 1276 */ /***/ (function(module, exports) { /** @@ -179286,7 +180222,7 @@ module.exports = Angular; /***/ }), -/* 1271 */ +/* 1277 */ /***/ (function(module, exports) { /** @@ -179385,7 +180321,7 @@ module.exports = Bounce; /***/ }), -/* 1272 */ +/* 1278 */ /***/ (function(module, exports) { /** @@ -179512,7 +180448,7 @@ module.exports = Debug; /***/ }), -/* 1273 */ +/* 1279 */ /***/ (function(module, exports) { /** @@ -179645,7 +180581,7 @@ module.exports = Drag; /***/ }), -/* 1274 */ +/* 1280 */ /***/ (function(module, exports) { /** @@ -179769,7 +180705,7 @@ module.exports = Enable; /***/ }), -/* 1275 */ +/* 1281 */ /***/ (function(module, exports) { /** @@ -179857,7 +180793,7 @@ module.exports = Friction; /***/ }), -/* 1276 */ +/* 1282 */ /***/ (function(module, exports) { /** @@ -179935,7 +180871,7 @@ module.exports = Gravity; /***/ }), -/* 1277 */ +/* 1283 */ /***/ (function(module, exports) { /** @@ -179977,7 +180913,7 @@ module.exports = Immovable; /***/ }), -/* 1278 */ +/* 1284 */ /***/ (function(module, exports) { /** @@ -180017,7 +180953,7 @@ module.exports = Mass; /***/ }), -/* 1279 */ +/* 1285 */ /***/ (function(module, exports) { /** @@ -180120,7 +181056,7 @@ module.exports = Size; /***/ }), -/* 1280 */ +/* 1286 */ /***/ (function(module, exports) { /** @@ -180219,10 +181155,10 @@ module.exports = Velocity; /***/ }), -/* 1281 */ +/* 1287 */ /***/ (function(module, exports, __webpack_require__) { -var OverlapRect = __webpack_require__(465); +var OverlapRect = __webpack_require__(467); var Circle = __webpack_require__(65); var CircleToCircle = __webpack_require__(211); var CircleToRectangle = __webpack_require__(212); @@ -180287,7 +181223,7 @@ module.exports = OverlapCirc; /***/ }), -/* 1282 */ +/* 1288 */ /***/ (function(module, exports) { /** @@ -180320,7 +181256,7 @@ module.exports = 'collide'; /***/ }), -/* 1283 */ +/* 1289 */ /***/ (function(module, exports) { /** @@ -180353,7 +181289,7 @@ module.exports = 'overlap'; /***/ }), -/* 1284 */ +/* 1290 */ /***/ (function(module, exports) { /** @@ -180376,7 +181312,7 @@ module.exports = 'pause'; /***/ }), -/* 1285 */ +/* 1291 */ /***/ (function(module, exports) { /** @@ -180399,7 +181335,7 @@ module.exports = 'resume'; /***/ }), -/* 1286 */ +/* 1292 */ /***/ (function(module, exports) { /** @@ -180431,7 +181367,7 @@ module.exports = 'tilecollide'; /***/ }), -/* 1287 */ +/* 1293 */ /***/ (function(module, exports) { /** @@ -180463,7 +181399,7 @@ module.exports = 'tileoverlap'; /***/ }), -/* 1288 */ +/* 1294 */ /***/ (function(module, exports) { /** @@ -180495,7 +181431,7 @@ module.exports = 'worldbounds'; /***/ }), -/* 1289 */ +/* 1295 */ /***/ (function(module, exports) { /** @@ -180521,7 +181457,7 @@ module.exports = 'worldstep'; /***/ }), -/* 1290 */ +/* 1296 */ /***/ (function(module, exports) { /** @@ -180562,7 +181498,7 @@ module.exports = ProcessTileCallbacks; /***/ }), -/* 1291 */ +/* 1297 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180571,9 +181507,9 @@ module.exports = ProcessTileCallbacks; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileCheckX = __webpack_require__(1292); -var TileCheckY = __webpack_require__(1294); -var TileIntersectsBody = __webpack_require__(472); +var TileCheckX = __webpack_require__(1298); +var TileCheckY = __webpack_require__(1300); +var TileIntersectsBody = __webpack_require__(474); /** * The core separation function to separate a physics body and a tile. @@ -180682,7 +181618,7 @@ module.exports = SeparateTile; /***/ }), -/* 1292 */ +/* 1298 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180691,7 +181627,7 @@ module.exports = SeparateTile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ProcessTileSeparationX = __webpack_require__(1293); +var ProcessTileSeparationX = __webpack_require__(1299); /** * Check the body against the given tile on the X axis. @@ -180772,7 +181708,7 @@ module.exports = TileCheckX; /***/ }), -/* 1293 */ +/* 1299 */ /***/ (function(module, exports) { /** @@ -180819,7 +181755,7 @@ module.exports = ProcessTileSeparationX; /***/ }), -/* 1294 */ +/* 1300 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180828,7 +181764,7 @@ module.exports = ProcessTileSeparationX; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ProcessTileSeparationY = __webpack_require__(1295); +var ProcessTileSeparationY = __webpack_require__(1301); /** * Check the body against the given tile on the Y axis. @@ -180909,7 +181845,7 @@ module.exports = TileCheckY; /***/ }), -/* 1295 */ +/* 1301 */ /***/ (function(module, exports) { /** @@ -180956,7 +181892,7 @@ module.exports = ProcessTileSeparationY; /***/ }), -/* 1296 */ +/* 1302 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180965,7 +181901,7 @@ module.exports = ProcessTileSeparationY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetOverlapX = __webpack_require__(469); +var GetOverlapX = __webpack_require__(471); /** * Separates two overlapping bodies on the X-axis (horizontally). @@ -181049,7 +181985,7 @@ module.exports = SeparateX; /***/ }), -/* 1297 */ +/* 1303 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181058,7 +181994,7 @@ module.exports = SeparateX; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetOverlapY = __webpack_require__(470); +var GetOverlapY = __webpack_require__(472); /** * Separates two overlapping bodies on the Y-axis (vertically). @@ -181142,7 +182078,7 @@ module.exports = SeparateY; /***/ }), -/* 1298 */ +/* 1304 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181158,11 +182094,11 @@ var Composites = {}; module.exports = Composites; -var Composite = __webpack_require__(152); +var Composite = __webpack_require__(153); var Constraint = __webpack_require__(225); -var Common = __webpack_require__(42); +var Common = __webpack_require__(43); var Body = __webpack_require__(62); -var Bodies = __webpack_require__(110); +var Bodies = __webpack_require__(113); (function() { @@ -181475,7 +182411,7 @@ var Bodies = __webpack_require__(110); /***/ }), -/* 1299 */ +/* 1305 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181493,7 +182429,7 @@ var Svg = {}; module.exports = Svg; var Bounds = __webpack_require__(101); -var Common = __webpack_require__(42); +var Common = __webpack_require__(43); (function() { @@ -181706,7 +182642,7 @@ var Common = __webpack_require__(42); })(); /***/ }), -/* 1300 */ +/* 1306 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181717,11 +182653,11 @@ var Common = __webpack_require__(42); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bodies = __webpack_require__(110); +var Bodies = __webpack_require__(113); var Body = __webpack_require__(62); -var Common = __webpack_require__(42); +var Common = __webpack_require__(43); var GetFastValue = __webpack_require__(2); -var Vertices = __webpack_require__(86); +var Vertices = __webpack_require__(87); /** * Use PhysicsEditorParser.parseBody() to build a Matter body object, based on a physics data file @@ -181848,7 +182784,7 @@ module.exports = PhysicsEditorParser; /***/ }), -/* 1301 */ +/* 1307 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181857,7 +182793,7 @@ module.exports = PhysicsEditorParser; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bodies = __webpack_require__(110); +var Bodies = __webpack_require__(113); var Body = __webpack_require__(62); /** @@ -181965,7 +182901,7 @@ module.exports = PhysicsJSONParser; /***/ }), -/* 1302 */ +/* 1308 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181980,28 +182916,28 @@ module.exports = PhysicsJSONParser; module.exports = { - AFTER_ADD: __webpack_require__(1419), - AFTER_REMOVE: __webpack_require__(1420), - AFTER_UPDATE: __webpack_require__(1421), - BEFORE_ADD: __webpack_require__(1422), - BEFORE_REMOVE: __webpack_require__(1423), - BEFORE_UPDATE: __webpack_require__(1424), - COLLISION_ACTIVE: __webpack_require__(1425), - COLLISION_END: __webpack_require__(1426), - COLLISION_START: __webpack_require__(1427), - DRAG_END: __webpack_require__(1428), - DRAG: __webpack_require__(1429), - DRAG_START: __webpack_require__(1430), - PAUSE: __webpack_require__(1431), - RESUME: __webpack_require__(1432), - SLEEP_END: __webpack_require__(1433), - SLEEP_START: __webpack_require__(1434) + AFTER_ADD: __webpack_require__(1425), + AFTER_REMOVE: __webpack_require__(1426), + AFTER_UPDATE: __webpack_require__(1427), + BEFORE_ADD: __webpack_require__(1428), + BEFORE_REMOVE: __webpack_require__(1429), + BEFORE_UPDATE: __webpack_require__(1430), + COLLISION_ACTIVE: __webpack_require__(1431), + COLLISION_END: __webpack_require__(1432), + COLLISION_START: __webpack_require__(1433), + DRAG_END: __webpack_require__(1434), + DRAG: __webpack_require__(1435), + DRAG_START: __webpack_require__(1436), + PAUSE: __webpack_require__(1437), + RESUME: __webpack_require__(1438), + SLEEP_END: __webpack_require__(1439), + SLEEP_START: __webpack_require__(1440) }; /***/ }), -/* 1303 */ +/* 1309 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182010,14 +182946,14 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bodies = __webpack_require__(110); +var Bodies = __webpack_require__(113); var Body = __webpack_require__(62); var Class = __webpack_require__(0); -var Components = __webpack_require__(515); +var Components = __webpack_require__(518); var EventEmitter = __webpack_require__(11); var GetFastValue = __webpack_require__(2); -var HasValue = __webpack_require__(109); -var Vertices = __webpack_require__(86); +var HasValue = __webpack_require__(112); +var Vertices = __webpack_require__(87); /** * @classdesc @@ -182321,7 +183257,7 @@ module.exports = MatterTileBody; /***/ }), -/* 1304 */ +/* 1310 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182334,36 +183270,36 @@ module.exports = MatterTileBody; * @namespace Phaser.Physics.Matter.Matter */ -var Matter = __webpack_require__(1401); +var Matter = __webpack_require__(1407); Matter.Body = __webpack_require__(62); -Matter.Composite = __webpack_require__(152); -Matter.World = __webpack_require__(1306); +Matter.Composite = __webpack_require__(153); +Matter.World = __webpack_require__(1312); -Matter.Detector = __webpack_require__(516); -Matter.Grid = __webpack_require__(1307); -Matter.Pairs = __webpack_require__(1308); -Matter.Pair = __webpack_require__(474); -Matter.Query = __webpack_require__(1402); -Matter.Resolver = __webpack_require__(1309); -Matter.SAT = __webpack_require__(517); +Matter.Detector = __webpack_require__(519); +Matter.Grid = __webpack_require__(1313); +Matter.Pairs = __webpack_require__(1314); +Matter.Pair = __webpack_require__(476); +Matter.Query = __webpack_require__(1408); +Matter.Resolver = __webpack_require__(1315); +Matter.SAT = __webpack_require__(520); Matter.Constraint = __webpack_require__(225); -Matter.Common = __webpack_require__(42); -Matter.Engine = __webpack_require__(1403); +Matter.Common = __webpack_require__(43); +Matter.Engine = __webpack_require__(1409); Matter.Events = __webpack_require__(244); Matter.Sleeping = __webpack_require__(243); -Matter.Plugin = __webpack_require__(1305); +Matter.Plugin = __webpack_require__(1311); -Matter.Bodies = __webpack_require__(110); -Matter.Composites = __webpack_require__(1298); +Matter.Bodies = __webpack_require__(113); +Matter.Composites = __webpack_require__(1304); -Matter.Axes = __webpack_require__(514); +Matter.Axes = __webpack_require__(517); Matter.Bounds = __webpack_require__(101); -Matter.Svg = __webpack_require__(1299); +Matter.Svg = __webpack_require__(1305); Matter.Vector = __webpack_require__(100); -Matter.Vertices = __webpack_require__(86); +Matter.Vertices = __webpack_require__(87); // aliases @@ -182378,7 +183314,7 @@ module.exports = Matter; /***/ }), -/* 1305 */ +/* 1311 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182391,7 +183327,7 @@ var Plugin = {}; module.exports = Plugin; -var Common = __webpack_require__(42); +var Common = __webpack_require__(43); (function() { @@ -182728,7 +183664,7 @@ var Common = __webpack_require__(42); /***/ }), -/* 1306 */ +/* 1312 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182748,9 +183684,9 @@ var World = {}; module.exports = World; -var Composite = __webpack_require__(152); +var Composite = __webpack_require__(153); var Constraint = __webpack_require__(225); -var Common = __webpack_require__(42); +var Common = __webpack_require__(43); (function() { @@ -182881,7 +183817,7 @@ var Common = __webpack_require__(42); /***/ }), -/* 1307 */ +/* 1313 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182894,9 +183830,9 @@ var Grid = {}; module.exports = Grid; -var Pair = __webpack_require__(474); -var Detector = __webpack_require__(516); -var Common = __webpack_require__(42); +var Pair = __webpack_require__(476); +var Detector = __webpack_require__(519); +var Common = __webpack_require__(43); (function() { @@ -183208,7 +184144,7 @@ var Common = __webpack_require__(42); /***/ }), -/* 1308 */ +/* 1314 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183221,8 +184157,8 @@ var Pairs = {}; module.exports = Pairs; -var Pair = __webpack_require__(474); -var Common = __webpack_require__(42); +var Pair = __webpack_require__(476); +var Common = __webpack_require__(43); (function() { @@ -183373,7 +184309,7 @@ var Common = __webpack_require__(42); /***/ }), -/* 1309 */ +/* 1315 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183386,9 +184322,9 @@ var Resolver = {}; module.exports = Resolver; -var Vertices = __webpack_require__(86); +var Vertices = __webpack_require__(87); var Vector = __webpack_require__(100); -var Common = __webpack_require__(42); +var Common = __webpack_require__(43); var Bounds = __webpack_require__(101); (function() { @@ -183729,7 +184665,7 @@ var Bounds = __webpack_require__(101); /***/ }), -/* 1310 */ +/* 1316 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183744,17 +184680,17 @@ var Bounds = __webpack_require__(101); module.exports = { - BasePlugin: __webpack_require__(475), + BasePlugin: __webpack_require__(477), DefaultPlugins: __webpack_require__(180), PluginCache: __webpack_require__(23), PluginManager: __webpack_require__(370), - ScenePlugin: __webpack_require__(1311) + ScenePlugin: __webpack_require__(1317) }; /***/ }), -/* 1311 */ +/* 1317 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183763,7 +184699,7 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ -var BasePlugin = __webpack_require__(475); +var BasePlugin = __webpack_require__(477); var Class = __webpack_require__(0); var SceneEvents = __webpack_require__(22); @@ -183882,7 +184818,7 @@ module.exports = ScenePlugin; /***/ }), -/* 1312 */ +/* 1318 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183921,7 +184857,7 @@ var CONST = __webpack_require__(183); var Scale = { Center: __webpack_require__(359), - Events: __webpack_require__(92), + Events: __webpack_require__(93), Orientation: __webpack_require__(360), ScaleManager: __webpack_require__(371), ScaleModes: __webpack_require__(361), @@ -183938,7 +184874,7 @@ module.exports = Scale; /***/ }), -/* 1313 */ +/* 1319 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183947,7 +184883,7 @@ module.exports = Scale; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(127); +var CONST = __webpack_require__(131); var Extend = __webpack_require__(19); /** @@ -183958,7 +184894,7 @@ var Scene = { Events: __webpack_require__(22), SceneManager: __webpack_require__(373), - ScenePlugin: __webpack_require__(1314), + ScenePlugin: __webpack_require__(1320), Settings: __webpack_require__(375), Systems: __webpack_require__(186) @@ -183971,7 +184907,7 @@ module.exports = Scene; /***/ }), -/* 1314 */ +/* 1320 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -184981,7 +185917,7 @@ module.exports = ScenePlugin; /***/ }), -/* 1315 */ +/* 1321 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -184996,18 +185932,18 @@ module.exports = ScenePlugin; module.exports = { - List: __webpack_require__(131), - Map: __webpack_require__(167), + List: __webpack_require__(135), + Map: __webpack_require__(168), ProcessQueue: __webpack_require__(192), - RTree: __webpack_require__(471), - Set: __webpack_require__(135), + RTree: __webpack_require__(473), + Set: __webpack_require__(139), Size: __webpack_require__(372) }; /***/ }), -/* 1316 */ +/* 1322 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -185017,7 +185953,7 @@ module.exports = { */ var Extend = __webpack_require__(19); -var FilterMode = __webpack_require__(1317); +var FilterMode = __webpack_require__(1323); /** * @namespace Phaser.Textures @@ -185044,7 +185980,7 @@ var FilterMode = __webpack_require__(1317); var Textures = { CanvasTexture: __webpack_require__(377), - Events: __webpack_require__(123), + Events: __webpack_require__(127), FilterMode: FilterMode, Frame: __webpack_require__(95), Parsers: __webpack_require__(379), @@ -185060,7 +185996,7 @@ module.exports = Textures; /***/ }), -/* 1317 */ +/* 1323 */ /***/ (function(module, exports) { /** @@ -185104,7 +186040,7 @@ module.exports = CONST; /***/ }), -/* 1318 */ +/* 1324 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -185119,30 +186055,30 @@ module.exports = CONST; module.exports = { - Components: __webpack_require__(143), - Parsers: __webpack_require__(1348), + Components: __webpack_require__(147), + Parsers: __webpack_require__(1354), Formats: __webpack_require__(32), - ImageCollection: __webpack_require__(486), + ImageCollection: __webpack_require__(488), ParseToTilemap: __webpack_require__(233), Tile: __webpack_require__(74), - Tilemap: __webpack_require__(495), - TilemapCreator: __webpack_require__(1362), - TilemapFactory: __webpack_require__(1363), + Tilemap: __webpack_require__(497), + TilemapCreator: __webpack_require__(1368), + TilemapFactory: __webpack_require__(1369), Tileset: __webpack_require__(105), LayerData: __webpack_require__(103), MapData: __webpack_require__(104), - ObjectLayer: __webpack_require__(489), + ObjectLayer: __webpack_require__(491), - DynamicTilemapLayer: __webpack_require__(496), - StaticTilemapLayer: __webpack_require__(497) + DynamicTilemapLayer: __webpack_require__(498), + StaticTilemapLayer: __webpack_require__(499) }; /***/ }), -/* 1319 */ +/* 1325 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -185207,7 +186143,7 @@ module.exports = Copy; /***/ }), -/* 1320 */ +/* 1326 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -185216,10 +186152,10 @@ module.exports = Copy; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileToWorldX = __webpack_require__(145); -var TileToWorldY = __webpack_require__(146); +var TileToWorldX = __webpack_require__(149); +var TileToWorldY = __webpack_require__(150); var GetTilesWithin = __webpack_require__(24); -var ReplaceByIndex = __webpack_require__(476); +var ReplaceByIndex = __webpack_require__(478); /** * Creates a Sprite for every object matching the given tile indexes in the layer. You can @@ -185292,7 +186228,7 @@ module.exports = CreateFromTiles; /***/ }), -/* 1321 */ +/* 1327 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -185301,7 +186237,7 @@ module.exports = CreateFromTiles; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SnapFloor = __webpack_require__(93); +var SnapFloor = __webpack_require__(94); var SnapCeil = __webpack_require__(334); /** @@ -185449,7 +186385,7 @@ module.exports = CullTiles; /***/ }), -/* 1322 */ +/* 1328 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -185503,7 +186439,7 @@ module.exports = Fill; /***/ }), -/* 1323 */ +/* 1329 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -185551,7 +186487,7 @@ module.exports = FilterTiles; /***/ }), -/* 1324 */ +/* 1330 */ /***/ (function(module, exports) { /** @@ -185639,7 +186575,7 @@ module.exports = FindByIndex; /***/ }), -/* 1325 */ +/* 1331 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -185693,7 +186629,7 @@ module.exports = FindTile; /***/ }), -/* 1326 */ +/* 1332 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -185743,7 +186679,7 @@ module.exports = ForEachTile; /***/ }), -/* 1327 */ +/* 1333 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -185752,7 +186688,7 @@ module.exports = ForEachTile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(144); +var GetTileAt = __webpack_require__(148); var WorldToTileX = __webpack_require__(63); var WorldToTileY = __webpack_require__(64); @@ -185784,7 +186720,7 @@ module.exports = GetTileAtWorldXY; /***/ }), -/* 1328 */ +/* 1334 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -185797,8 +186733,8 @@ var Geom = __webpack_require__(430); var GetTilesWithin = __webpack_require__(24); var Intersects = __webpack_require__(431); var NOOP = __webpack_require__(1); -var TileToWorldX = __webpack_require__(145); -var TileToWorldY = __webpack_require__(146); +var TileToWorldX = __webpack_require__(149); +var TileToWorldY = __webpack_require__(150); var WorldToTileX = __webpack_require__(63); var WorldToTileY = __webpack_require__(64); @@ -185881,7 +186817,7 @@ module.exports = GetTilesWithinShape; /***/ }), -/* 1329 */ +/* 1335 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -185931,7 +186867,7 @@ module.exports = GetTilesWithinWorldXY; /***/ }), -/* 1330 */ +/* 1336 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -185940,7 +186876,7 @@ module.exports = GetTilesWithinWorldXY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HasTileAt = __webpack_require__(477); +var HasTileAt = __webpack_require__(479); var WorldToTileX = __webpack_require__(63); var WorldToTileY = __webpack_require__(64); @@ -185971,7 +186907,7 @@ module.exports = HasTileAtWorldXY; /***/ }), -/* 1331 */ +/* 1337 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186014,7 +186950,7 @@ module.exports = PutTileAtWorldXY; /***/ }), -/* 1332 */ +/* 1338 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186078,7 +187014,7 @@ module.exports = PutTilesAt; /***/ }), -/* 1333 */ +/* 1339 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186136,7 +187072,7 @@ module.exports = Randomize; /***/ }), -/* 1334 */ +/* 1340 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186145,7 +187081,7 @@ module.exports = Randomize; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RemoveTileAt = __webpack_require__(478); +var RemoveTileAt = __webpack_require__(480); var WorldToTileX = __webpack_require__(63); var WorldToTileY = __webpack_require__(64); @@ -186177,7 +187113,7 @@ module.exports = RemoveTileAtWorldXY; /***/ }), -/* 1335 */ +/* 1341 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186266,7 +187202,7 @@ module.exports = RenderDebug; /***/ }), -/* 1336 */ +/* 1342 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186335,7 +187271,7 @@ module.exports = SetCollision; /***/ }), -/* 1337 */ +/* 1343 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186410,7 +187346,7 @@ module.exports = SetCollisionBetween; /***/ }), -/* 1338 */ +/* 1344 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186467,7 +187403,7 @@ module.exports = SetCollisionByExclusion; /***/ }), -/* 1339 */ +/* 1345 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186478,7 +187414,7 @@ module.exports = SetCollisionByExclusion; var SetTileCollision = __webpack_require__(73); var CalculateFacesWithin = __webpack_require__(52); -var HasValue = __webpack_require__(109); +var HasValue = __webpack_require__(112); /** * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property @@ -186542,7 +187478,7 @@ module.exports = SetCollisionByProperty; /***/ }), -/* 1340 */ +/* 1346 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186602,7 +187538,7 @@ module.exports = SetCollisionFromCollisionGroup; /***/ }), -/* 1341 */ +/* 1347 */ /***/ (function(module, exports) { /** @@ -186649,7 +187585,7 @@ module.exports = SetTileIndexCallback; /***/ }), -/* 1342 */ +/* 1348 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186692,7 +187628,7 @@ module.exports = SetTileLocationCallback; /***/ }), -/* 1343 */ +/* 1349 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186702,7 +187638,7 @@ module.exports = SetTileLocationCallback; */ var GetTilesWithin = __webpack_require__(24); -var ShuffleArray = __webpack_require__(116); +var ShuffleArray = __webpack_require__(119); /** * Shuffles the tiles in a rectangular region (specified in tile coordinates) within the given @@ -186737,7 +187673,7 @@ module.exports = Shuffle; /***/ }), -/* 1344 */ +/* 1350 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186788,7 +187724,7 @@ module.exports = SwapByIndex; /***/ }), -/* 1345 */ +/* 1351 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186797,8 +187733,8 @@ module.exports = SwapByIndex; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileToWorldX = __webpack_require__(145); -var TileToWorldY = __webpack_require__(146); +var TileToWorldX = __webpack_require__(149); +var TileToWorldY = __webpack_require__(150); var Vector2 = __webpack_require__(3); /** @@ -186832,7 +187768,7 @@ module.exports = TileToWorldXY; /***/ }), -/* 1346 */ +/* 1352 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186912,7 +187848,7 @@ module.exports = WeightedRandomize; /***/ }), -/* 1347 */ +/* 1353 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186957,7 +187893,7 @@ module.exports = WorldToTileXY; /***/ }), -/* 1348 */ +/* 1354 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186972,18 +187908,18 @@ module.exports = WorldToTileXY; module.exports = { - Parse: __webpack_require__(479), + Parse: __webpack_require__(481), Parse2DArray: __webpack_require__(229), - ParseCSV: __webpack_require__(480), + ParseCSV: __webpack_require__(482), - Impact: __webpack_require__(1349), - Tiled: __webpack_require__(1350) + Impact: __webpack_require__(1355), + Tiled: __webpack_require__(1356) }; /***/ }), -/* 1349 */ +/* 1355 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186998,15 +187934,15 @@ module.exports = { module.exports = { - ParseTileLayers: __webpack_require__(493), - ParseTilesets: __webpack_require__(494), - ParseWeltmeister: __webpack_require__(492) + ParseTileLayers: __webpack_require__(495), + ParseTilesets: __webpack_require__(496), + ParseWeltmeister: __webpack_require__(494) }; /***/ }), -/* 1350 */ +/* 1356 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187021,22 +187957,22 @@ module.exports = { module.exports = { - AssignTileProperties: __webpack_require__(491), - Base64Decode: __webpack_require__(483), - BuildTilesetIndex: __webpack_require__(490), + AssignTileProperties: __webpack_require__(493), + Base64Decode: __webpack_require__(485), + BuildTilesetIndex: __webpack_require__(492), ParseGID: __webpack_require__(230), - ParseImageLayers: __webpack_require__(484), - ParseJSONTiled: __webpack_require__(481), + ParseImageLayers: __webpack_require__(486), + ParseJSONTiled: __webpack_require__(483), ParseObject: __webpack_require__(232), - ParseObjectLayers: __webpack_require__(488), - ParseTileLayers: __webpack_require__(482), - ParseTilesets: __webpack_require__(485) + ParseObjectLayers: __webpack_require__(490), + ParseTileLayers: __webpack_require__(484), + ParseTilesets: __webpack_require__(487) }; /***/ }), -/* 1351 */ +/* 1357 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187050,12 +187986,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1352); + renderWebGL = __webpack_require__(1358); } if (true) { - renderCanvas = __webpack_require__(1353); + renderCanvas = __webpack_require__(1359); } module.exports = { @@ -187067,7 +188003,7 @@ module.exports = { /***/ }), -/* 1352 */ +/* 1358 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187188,7 +188124,7 @@ module.exports = DynamicTilemapLayerWebGLRenderer; /***/ }), -/* 1353 */ +/* 1359 */ /***/ (function(module, exports) { /** @@ -187320,7 +188256,7 @@ module.exports = DynamicTilemapLayerCanvasRenderer; /***/ }), -/* 1354 */ +/* 1360 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187334,12 +188270,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1355); + renderWebGL = __webpack_require__(1361); } if (true) { - renderCanvas = __webpack_require__(1361); + renderCanvas = __webpack_require__(1367); } module.exports = { @@ -187351,7 +188287,7 @@ module.exports = { /***/ }), -/* 1355 */ +/* 1361 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187360,10 +188296,10 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Identity = __webpack_require__(1356); -var Scale = __webpack_require__(1358); -var Translate = __webpack_require__(1359); -var ViewLoad2D = __webpack_require__(1360); +var Identity = __webpack_require__(1362); +var Scale = __webpack_require__(1364); +var Translate = __webpack_require__(1365); +var ViewLoad2D = __webpack_require__(1366); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -187446,7 +188382,7 @@ module.exports = StaticTilemapLayerWebGLRenderer; /***/ }), -/* 1356 */ +/* 1362 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187455,7 +188391,7 @@ module.exports = StaticTilemapLayerWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetIdentity = __webpack_require__(1357); +var SetIdentity = __webpack_require__(1363); /** * Loads an identity matrix into the model matrix. @@ -187480,7 +188416,7 @@ module.exports = Identity; /***/ }), -/* 1357 */ +/* 1363 */ /***/ (function(module, exports) { /** @@ -187521,7 +188457,7 @@ module.exports = SetIdentity; /***/ }), -/* 1358 */ +/* 1364 */ /***/ (function(module, exports) { /** @@ -187569,7 +188505,7 @@ module.exports = Scale; /***/ }), -/* 1359 */ +/* 1365 */ /***/ (function(module, exports) { /** @@ -187609,7 +188545,7 @@ module.exports = Translate; /***/ }), -/* 1360 */ +/* 1366 */ /***/ (function(module, exports) { /** @@ -187659,7 +188595,7 @@ module.exports = ViewLoad2D; /***/ }), -/* 1361 */ +/* 1367 */ /***/ (function(module, exports) { /** @@ -187793,7 +188729,7 @@ module.exports = StaticTilemapLayerCanvasRenderer; /***/ }), -/* 1362 */ +/* 1368 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187837,7 +188773,7 @@ GameObjectCreator.register('tilemap', function (config) /***/ }), -/* 1363 */ +/* 1369 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187903,7 +188839,7 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt /***/ }), -/* 1364 */ +/* 1370 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187918,14 +188854,14 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt module.exports = { - Clock: __webpack_require__(1365), - TimerEvent: __webpack_require__(498) + Clock: __webpack_require__(1371), + TimerEvent: __webpack_require__(500) }; /***/ }), -/* 1365 */ +/* 1371 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187937,7 +188873,7 @@ module.exports = { var Class = __webpack_require__(0); var PluginCache = __webpack_require__(23); var SceneEvents = __webpack_require__(22); -var TimerEvent = __webpack_require__(498); +var TimerEvent = __webpack_require__(500); /** * @classdesc @@ -188331,7 +189267,7 @@ module.exports = Clock; /***/ }), -/* 1366 */ +/* 1372 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -188340,7 +189276,7 @@ module.exports = Clock; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(89); +var CONST = __webpack_require__(90); var Extend = __webpack_require__(19); /** @@ -188349,13 +189285,13 @@ var Extend = __webpack_require__(19); var Tweens = { - Builders: __webpack_require__(1367), + Builders: __webpack_require__(1373), Events: __webpack_require__(238), - TweenManager: __webpack_require__(1383), + TweenManager: __webpack_require__(1389), Tween: __webpack_require__(237), TweenData: __webpack_require__(239), - Timeline: __webpack_require__(504) + Timeline: __webpack_require__(506) }; @@ -188366,7 +189302,7 @@ module.exports = Tweens; /***/ }), -/* 1367 */ +/* 1373 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -188381,23 +189317,23 @@ module.exports = Tweens; module.exports = { - GetBoolean: __webpack_require__(88), + GetBoolean: __webpack_require__(89), GetEaseFunction: __webpack_require__(69), - GetNewValue: __webpack_require__(147), - GetProps: __webpack_require__(499), + GetNewValue: __webpack_require__(151), + GetProps: __webpack_require__(501), GetTargets: __webpack_require__(234), - GetTweens: __webpack_require__(500), + GetTweens: __webpack_require__(502), GetValueOp: __webpack_require__(235), - NumberTweenBuilder: __webpack_require__(501), - StaggerBuilder: __webpack_require__(502), - TimelineBuilder: __webpack_require__(503), - TweenBuilder: __webpack_require__(148) + NumberTweenBuilder: __webpack_require__(503), + StaggerBuilder: __webpack_require__(504), + TimelineBuilder: __webpack_require__(505), + TweenBuilder: __webpack_require__(152) }; /***/ }), -/* 1368 */ +/* 1374 */ /***/ (function(module, exports) { /** @@ -188475,7 +189411,7 @@ module.exports = [ /***/ }), -/* 1369 */ +/* 1375 */ /***/ (function(module, exports) { /** @@ -188511,7 +189447,7 @@ module.exports = 'complete'; /***/ }), -/* 1370 */ +/* 1376 */ /***/ (function(module, exports) { /** @@ -188548,7 +189484,7 @@ module.exports = 'loop'; /***/ }), -/* 1371 */ +/* 1377 */ /***/ (function(module, exports) { /** @@ -188585,7 +189521,7 @@ module.exports = 'pause'; /***/ }), -/* 1372 */ +/* 1378 */ /***/ (function(module, exports) { /** @@ -188622,7 +189558,7 @@ module.exports = 'resume'; /***/ }), -/* 1373 */ +/* 1379 */ /***/ (function(module, exports) { /** @@ -188658,7 +189594,7 @@ module.exports = 'start'; /***/ }), -/* 1374 */ +/* 1380 */ /***/ (function(module, exports) { /** @@ -188695,7 +189631,7 @@ module.exports = 'update'; /***/ }), -/* 1375 */ +/* 1381 */ /***/ (function(module, exports) { /** @@ -188735,7 +189671,7 @@ module.exports = 'active'; /***/ }), -/* 1376 */ +/* 1382 */ /***/ (function(module, exports) { /** @@ -188776,7 +189712,7 @@ module.exports = 'complete'; /***/ }), -/* 1377 */ +/* 1383 */ /***/ (function(module, exports) { /** @@ -188820,7 +189756,7 @@ module.exports = 'loop'; /***/ }), -/* 1378 */ +/* 1384 */ /***/ (function(module, exports) { /** @@ -188865,7 +189801,7 @@ module.exports = 'repeat'; /***/ }), -/* 1379 */ +/* 1385 */ /***/ (function(module, exports) { /** @@ -188905,7 +189841,7 @@ module.exports = 'start'; /***/ }), -/* 1380 */ +/* 1386 */ /***/ (function(module, exports) { /** @@ -188941,7 +189877,7 @@ module.exports = 'stop'; /***/ }), -/* 1381 */ +/* 1387 */ /***/ (function(module, exports) { /** @@ -188984,7 +189920,7 @@ module.exports = 'update'; /***/ }), -/* 1382 */ +/* 1388 */ /***/ (function(module, exports) { /** @@ -189030,7 +189966,7 @@ module.exports = 'yoyo'; /***/ }), -/* 1383 */ +/* 1389 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -189039,15 +189975,15 @@ module.exports = 'yoyo'; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayRemove = __webpack_require__(125); +var ArrayRemove = __webpack_require__(129); var Class = __webpack_require__(0); -var NumberTweenBuilder = __webpack_require__(501); +var NumberTweenBuilder = __webpack_require__(503); var PluginCache = __webpack_require__(23); var SceneEvents = __webpack_require__(22); -var StaggerBuilder = __webpack_require__(502); -var TimelineBuilder = __webpack_require__(503); -var TWEEN_CONST = __webpack_require__(89); -var TweenBuilder = __webpack_require__(148); +var StaggerBuilder = __webpack_require__(504); +var TimelineBuilder = __webpack_require__(505); +var TWEEN_CONST = __webpack_require__(90); +var TweenBuilder = __webpack_require__(152); /** * @classdesc @@ -189301,14 +190237,14 @@ var TweenManager = new Class({ /** * Creates a Stagger function to be used by a Tween property. - * + * * The stagger function will allow you to stagger changes to the value of the property across all targets of the tween. - * + * * This is only worth using if the tween has multiple targets. - * + * * The following will stagger the delay by 100ms across all targets of the tween, causing them to scale down to 0.2 * over the duration specified: - * + * * ```javascript * this.tweens.add({ * targets: [ ... ], @@ -189318,10 +190254,10 @@ var TweenManager = new Class({ * delay: this.tweens.stagger(100) * }); * ``` - * + * * The following will stagger the delay by 500ms across all targets of the tween using a 10 x 6 grid, staggering * from the center out, using a cubic ease. - * + * * ```javascript * this.tweens.add({ * targets: [ ... ], @@ -189576,27 +190512,56 @@ var TweenManager = new Class({ /** * Returns an array of all Tweens or Timelines in the Tween Manager which affect the given target or array of targets. * + * Only the currently active tweens are tested. A tween that has completed and is + * awaiting removal will not be included in the results. + * + * If you wish to also search pending tweens, use the `includePending` flag. + * * @method Phaser.Tweens.TweenManager#getTweensOf * @since 3.0.0 * * @param {(object|array)} target - The target to look for. Provide an array to look for multiple targets. + * @param {boolean} [includePending=false] - Also check for pending tweens, not just active ones? * * @return {Phaser.Tweens.Tween[]} A new array containing all Tweens and Timelines which affect the given target(s). */ - getTweensOf: function (target) + getTweensOf: function (target, includePending) { + if (includePending === undefined) { includePending = false; } + var list = this._active; var tween; var output = []; var i; + var t; - if (Array.isArray(target)) + if (!Array.isArray(target)) { + target = [ target ]; + } + + for (i = 0; i < list.length; i++) + { + tween = list[i]; + + for (t = 0; t < target.length; t++) + { + if (tween.hasTarget(target[t])) + { + output.push(tween); + } + } + } + + if (includePending) + { + list = this._pending; + for (i = 0; i < list.length; i++) { tween = list[i]; - for (var t = 0; t < target.length; t++) + for (t = 0; t < target.length; t++) { if (tween.hasTarget(target[t])) { @@ -189605,18 +190570,6 @@ var TweenManager = new Class({ } } } - else - { - for (i = 0; i < list.length; i++) - { - tween = list[i]; - - if (tween.hasTarget(target)) - { - output.push(tween); - } - } - } return output; }, @@ -189802,7 +190755,7 @@ module.exports = TweenManager; /***/ }), -/* 1384 */ +/* 1390 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -189818,15 +190771,15 @@ module.exports = TweenManager; module.exports = { Array: __webpack_require__(189), - Base64: __webpack_require__(1385), - Objects: __webpack_require__(1387), - String: __webpack_require__(1391) + Base64: __webpack_require__(1391), + Objects: __webpack_require__(1393), + String: __webpack_require__(1397) }; /***/ }), -/* 1385 */ +/* 1391 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -189841,14 +190794,14 @@ module.exports = { module.exports = { - ArrayBufferToBase64: __webpack_require__(1386), + ArrayBufferToBase64: __webpack_require__(1392), Base64ToArrayBuffer: __webpack_require__(388) }; /***/ }), -/* 1386 */ +/* 1392 */ /***/ (function(module, exports) { /** @@ -189906,7 +190859,7 @@ module.exports = ArrayBufferToBase64; /***/ }), -/* 1387 */ +/* 1393 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -189925,22 +190878,22 @@ module.exports = { Extend: __webpack_require__(19), GetAdvancedValue: __webpack_require__(15), GetFastValue: __webpack_require__(2), - GetMinMaxValue: __webpack_require__(1388), + GetMinMaxValue: __webpack_require__(1394), GetValue: __webpack_require__(6), - HasAll: __webpack_require__(1389), + HasAll: __webpack_require__(1395), HasAny: __webpack_require__(407), - HasValue: __webpack_require__(109), + HasValue: __webpack_require__(112), IsPlainObject: __webpack_require__(7), - Merge: __webpack_require__(128), - MergeRight: __webpack_require__(1390), - Pick: __webpack_require__(487), + Merge: __webpack_require__(132), + MergeRight: __webpack_require__(1396), + Pick: __webpack_require__(489), SetValue: __webpack_require__(427) }; /***/ }), -/* 1388 */ +/* 1394 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -189979,7 +190932,7 @@ module.exports = GetMinMaxValue; /***/ }), -/* 1389 */ +/* 1395 */ /***/ (function(module, exports) { /** @@ -190016,7 +190969,7 @@ module.exports = HasAll; /***/ }), -/* 1390 */ +/* 1396 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -190059,7 +191012,7 @@ module.exports = MergeRight; /***/ }), -/* 1391 */ +/* 1397 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -190074,10 +191027,10 @@ module.exports = MergeRight; module.exports = { - Format: __webpack_require__(1392), - Pad: __webpack_require__(168), - RemoveAt: __webpack_require__(1393), - Reverse: __webpack_require__(1394), + Format: __webpack_require__(1398), + Pad: __webpack_require__(169), + RemoveAt: __webpack_require__(1399), + Reverse: __webpack_require__(1400), UppercaseFirst: __webpack_require__(187), UUID: __webpack_require__(202) @@ -190085,7 +191038,7 @@ module.exports = { /***/ }), -/* 1392 */ +/* 1398 */ /***/ (function(module, exports) { /** @@ -190120,7 +191073,7 @@ module.exports = Format; /***/ }), -/* 1393 */ +/* 1399 */ /***/ (function(module, exports) { /** @@ -190156,7 +191109,7 @@ module.exports = RemoveAt; /***/ }), -/* 1394 */ +/* 1400 */ /***/ (function(module, exports) { /** @@ -190185,7 +191138,7 @@ module.exports = Reverse; /***/ }), -/* 1395 */ +/* 1401 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -190205,8 +191158,8 @@ module.exports = { Events: __webpack_require__(59), - BaseSound: __webpack_require__(130), - BaseSoundManager: __webpack_require__(129), + BaseSound: __webpack_require__(134), + BaseSoundManager: __webpack_require__(133), WebAudioSound: __webpack_require__(389), WebAudioSoundManager: __webpack_require__(387), @@ -190221,7 +191174,7 @@ module.exports = { /***/ }), -/* 1396 */ +/* 1402 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -190627,7 +191580,7 @@ module.exports = BodyBounds; /***/ }), -/* 1397 */ +/* 1403 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -190636,19 +191589,19 @@ module.exports = BodyBounds; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bodies = __webpack_require__(110); +var Bodies = __webpack_require__(113); var Class = __webpack_require__(0); -var Composites = __webpack_require__(1298); +var Composites = __webpack_require__(1304); var Constraint = __webpack_require__(225); -var Svg = __webpack_require__(1299); -var MatterGameObject = __webpack_require__(1408); -var MatterImage = __webpack_require__(1399); -var MatterSprite = __webpack_require__(1400); -var MatterTileBody = __webpack_require__(1303); -var PhysicsEditorParser = __webpack_require__(1300); -var PhysicsJSONParser = __webpack_require__(1301); -var PointerConstraint = __webpack_require__(1437); -var Vertices = __webpack_require__(86); +var Svg = __webpack_require__(1305); +var MatterGameObject = __webpack_require__(1414); +var MatterImage = __webpack_require__(1405); +var MatterSprite = __webpack_require__(1406); +var MatterTileBody = __webpack_require__(1309); +var PhysicsEditorParser = __webpack_require__(1306); +var PhysicsJSONParser = __webpack_require__(1307); +var PointerConstraint = __webpack_require__(1443); +var Vertices = __webpack_require__(87); /** * @classdesc @@ -191557,7 +192510,7 @@ module.exports = Factory; /***/ }), -/* 1398 */ +/* 1404 */ /***/ (function(module, exports) { /** @@ -192227,7 +193180,7 @@ function points_eq(a,b,precision){ /***/ }), -/* 1399 */ +/* 1405 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -192237,11 +193190,11 @@ function points_eq(a,b,precision){ */ var Class = __webpack_require__(0); -var Components = __webpack_require__(515); +var Components = __webpack_require__(518); var GameObject = __webpack_require__(14); var GetFastValue = __webpack_require__(2); -var Image = __webpack_require__(108); -var Pipeline = __webpack_require__(160); +var Image = __webpack_require__(111); +var Pipeline = __webpack_require__(161); var Vector2 = __webpack_require__(3); /** @@ -192364,7 +193317,7 @@ var MatterImage = new Class({ this.setPosition(x, y); - this.initPipeline('TextureTintPipeline'); + this.initPipeline('MultiPipeline'); } }); @@ -192373,7 +193326,7 @@ module.exports = MatterImage; /***/ }), -/* 1400 */ +/* 1406 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -192382,12 +193335,12 @@ module.exports = MatterImage; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AnimationComponent = __webpack_require__(505); +var AnimationComponent = __webpack_require__(507); var Class = __webpack_require__(0); -var Components = __webpack_require__(515); +var Components = __webpack_require__(518); var GameObject = __webpack_require__(14); var GetFastValue = __webpack_require__(2); -var Pipeline = __webpack_require__(160); +var Pipeline = __webpack_require__(161); var Sprite = __webpack_require__(75); var Vector2 = __webpack_require__(3); @@ -192516,7 +193469,7 @@ var MatterSprite = new Class({ this.setPosition(x, y); - this.initPipeline('TextureTintPipeline'); + this.initPipeline('MultiPipeline'); } }); @@ -192525,7 +193478,7 @@ module.exports = MatterSprite; /***/ }), -/* 1401 */ +/* 1407 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -192538,8 +193491,8 @@ var Matter = {}; module.exports = Matter; -var Plugin = __webpack_require__(1305); -var Common = __webpack_require__(42); +var Plugin = __webpack_require__(1311); +var Common = __webpack_require__(43); (function() { @@ -192617,7 +193570,7 @@ var Common = __webpack_require__(42); /***/ }), -/* 1402 */ +/* 1408 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -192633,10 +193586,10 @@ var Query = {}; module.exports = Query; var Vector = __webpack_require__(100); -var SAT = __webpack_require__(517); +var SAT = __webpack_require__(520); var Bounds = __webpack_require__(101); -var Bodies = __webpack_require__(110); -var Vertices = __webpack_require__(86); +var Bodies = __webpack_require__(113); +var Vertices = __webpack_require__(87); (function() { @@ -192759,7 +193712,7 @@ var Vertices = __webpack_require__(86); /***/ }), -/* 1403 */ +/* 1409 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -192776,16 +193729,16 @@ var Engine = {}; module.exports = Engine; -var World = __webpack_require__(1306); +var World = __webpack_require__(1312); var Sleeping = __webpack_require__(243); -var Resolver = __webpack_require__(1309); -var Pairs = __webpack_require__(1308); -var Metrics = __webpack_require__(1438); -var Grid = __webpack_require__(1307); +var Resolver = __webpack_require__(1315); +var Pairs = __webpack_require__(1314); +var Metrics = __webpack_require__(1444); +var Grid = __webpack_require__(1313); var Events = __webpack_require__(244); -var Composite = __webpack_require__(152); +var Composite = __webpack_require__(153); var Constraint = __webpack_require__(225); -var Common = __webpack_require__(42); +var Common = __webpack_require__(43); var Body = __webpack_require__(62); (function() { @@ -193252,7 +194205,7 @@ var Body = __webpack_require__(62); /***/ }), -/* 1404 */ +/* 1410 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -193261,20 +194214,20 @@ var Body = __webpack_require__(62); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bodies = __webpack_require__(110); +var Bodies = __webpack_require__(113); var Body = __webpack_require__(62); var Class = __webpack_require__(0); -var Common = __webpack_require__(42); -var Composite = __webpack_require__(152); -var Engine = __webpack_require__(1403); +var Common = __webpack_require__(43); +var Composite = __webpack_require__(153); +var Engine = __webpack_require__(1409); var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(1302); +var Events = __webpack_require__(1308); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); var MatterBody = __webpack_require__(62); var MatterEvents = __webpack_require__(244); -var MatterTileBody = __webpack_require__(1303); -var MatterWorld = __webpack_require__(1306); +var MatterTileBody = __webpack_require__(1309); +var MatterWorld = __webpack_require__(1312); var Vector = __webpack_require__(100); /** @@ -195473,7 +196426,7 @@ module.exports = World; /***/ }), -/* 1405 */ +/* 1411 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -195482,7 +196435,7 @@ module.exports = World; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -__webpack_require__(519); +__webpack_require__(522); var CONST = __webpack_require__(33); var Extend = __webpack_require__(19); @@ -195494,37 +196447,37 @@ var Extend = __webpack_require__(19); var Phaser = { Actions: __webpack_require__(245), - Animations: __webpack_require__(639), + Animations: __webpack_require__(642), BlendModes: __webpack_require__(53), - Cache: __webpack_require__(640), - Cameras: __webpack_require__(643), - Core: __webpack_require__(729), + Cache: __webpack_require__(643), + Cameras: __webpack_require__(646), + Core: __webpack_require__(732), Class: __webpack_require__(0), - Create: __webpack_require__(792), - Curves: __webpack_require__(798), - Data: __webpack_require__(801), - Display: __webpack_require__(803), - DOM: __webpack_require__(821), - Events: __webpack_require__(822), - Game: __webpack_require__(824), - GameObjects: __webpack_require__(917), + Create: __webpack_require__(797), + Curves: __webpack_require__(803), + Data: __webpack_require__(806), + Display: __webpack_require__(808), + DOM: __webpack_require__(826), + Events: __webpack_require__(827), + Game: __webpack_require__(829), + GameObjects: __webpack_require__(922), Geom: __webpack_require__(430), - Input: __webpack_require__(1207), - Loader: __webpack_require__(1241), - Math: __webpack_require__(175), - Physics: __webpack_require__(1406), - Plugins: __webpack_require__(1310), - Renderer: __webpack_require__(1443), - Scale: __webpack_require__(1312), + Input: __webpack_require__(1213), + Loader: __webpack_require__(1247), + Math: __webpack_require__(176), + Physics: __webpack_require__(1412), + Plugins: __webpack_require__(1316), + Renderer: __webpack_require__(1449), + Scale: __webpack_require__(1318), ScaleModes: __webpack_require__(240), Scene: __webpack_require__(374), - Scenes: __webpack_require__(1313), - Structs: __webpack_require__(1315), - Textures: __webpack_require__(1316), - Tilemaps: __webpack_require__(1318), - Time: __webpack_require__(1364), - Tweens: __webpack_require__(1366), - Utils: __webpack_require__(1384) + Scenes: __webpack_require__(1319), + Structs: __webpack_require__(1321), + Textures: __webpack_require__(1322), + Tilemaps: __webpack_require__(1324), + Time: __webpack_require__(1370), + Tweens: __webpack_require__(1372), + Utils: __webpack_require__(1390) }; @@ -195532,7 +196485,7 @@ var Phaser = { if (true) { - Phaser.Sound = __webpack_require__(1395); + Phaser.Sound = __webpack_require__(1401); } if (false) @@ -195564,10 +196517,10 @@ global.Phaser = Phaser; * -- Dick Brandon */ -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(518))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(521))) /***/ }), -/* 1406 */ +/* 1412 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -195586,14 +196539,14 @@ global.Phaser = Phaser; module.exports = { - Arcade: __webpack_require__(1267), - Matter: __webpack_require__(1407) + Arcade: __webpack_require__(1273), + Matter: __webpack_require__(1413) }; /***/ }), -/* 1407 */ +/* 1413 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -195608,23 +196561,23 @@ module.exports = { module.exports = { - BodyBounds: __webpack_require__(1396), - Factory: __webpack_require__(1397), - Image: __webpack_require__(1399), - Matter: __webpack_require__(1304), - MatterPhysics: __webpack_require__(1439), - PolyDecomp: __webpack_require__(1398), - Sprite: __webpack_require__(1400), - TileBody: __webpack_require__(1303), - PhysicsEditorParser: __webpack_require__(1300), - PhysicsJSONParser: __webpack_require__(1301), - World: __webpack_require__(1404) + BodyBounds: __webpack_require__(1402), + Factory: __webpack_require__(1403), + Image: __webpack_require__(1405), + Matter: __webpack_require__(1310), + MatterPhysics: __webpack_require__(1445), + PolyDecomp: __webpack_require__(1404), + Sprite: __webpack_require__(1406), + TileBody: __webpack_require__(1309), + PhysicsEditorParser: __webpack_require__(1306), + PhysicsJSONParser: __webpack_require__(1307), + World: __webpack_require__(1410) }; /***/ }), -/* 1408 */ +/* 1414 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -195633,7 +196586,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Components = __webpack_require__(515); +var Components = __webpack_require__(518); var GetFastValue = __webpack_require__(2); var Vector2 = __webpack_require__(3); @@ -195750,7 +196703,7 @@ module.exports = MatterGameObject; /***/ }), -/* 1409 */ +/* 1415 */ /***/ (function(module, exports) { /** @@ -195790,7 +196743,7 @@ module.exports = Bounce; /***/ }), -/* 1410 */ +/* 1416 */ /***/ (function(module, exports) { /** @@ -195976,7 +196929,7 @@ module.exports = Collision; /***/ }), -/* 1411 */ +/* 1417 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -196132,7 +197085,7 @@ module.exports = Force; /***/ }), -/* 1412 */ +/* 1418 */ /***/ (function(module, exports) { /** @@ -196222,7 +197175,7 @@ module.exports = Friction; /***/ }), -/* 1413 */ +/* 1419 */ /***/ (function(module, exports) { /** @@ -196262,7 +197215,7 @@ module.exports = Gravity; /***/ }), -/* 1414 */ +/* 1420 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -196344,7 +197297,7 @@ module.exports = Mass; /***/ }), -/* 1415 */ +/* 1421 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -196399,7 +197352,7 @@ module.exports = Static; /***/ }), -/* 1416 */ +/* 1422 */ /***/ (function(module, exports) { /** @@ -196453,7 +197406,7 @@ module.exports = Sensor; /***/ }), -/* 1417 */ +/* 1423 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -196462,13 +197415,13 @@ module.exports = Sensor; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bodies = __webpack_require__(110); +var Bodies = __webpack_require__(113); var Body = __webpack_require__(62); var FuzzyEquals = __webpack_require__(107); var GetFastValue = __webpack_require__(2); -var PhysicsEditorParser = __webpack_require__(1300); -var PhysicsJSONParser = __webpack_require__(1301); -var Vertices = __webpack_require__(86); +var PhysicsEditorParser = __webpack_require__(1306); +var PhysicsJSONParser = __webpack_require__(1307); +var Vertices = __webpack_require__(87); /** * Enables a Matter-enabled Game Object to set its Body. Should be used as a mixin and not directly. @@ -196743,7 +197696,7 @@ module.exports = SetBody; /***/ }), -/* 1418 */ +/* 1424 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -196752,7 +197705,7 @@ module.exports = SetBody; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Events = __webpack_require__(1302); +var Events = __webpack_require__(1308); var Sleeping = __webpack_require__(243); var MatterEvents = __webpack_require__(244); @@ -196897,7 +197850,7 @@ module.exports = Sleep; /***/ }), -/* 1419 */ +/* 1425 */ /***/ (function(module, exports) { /** @@ -196931,7 +197884,7 @@ module.exports = 'afteradd'; /***/ }), -/* 1420 */ +/* 1426 */ /***/ (function(module, exports) { /** @@ -196965,7 +197918,7 @@ module.exports = 'afterremove'; /***/ }), -/* 1421 */ +/* 1427 */ /***/ (function(module, exports) { /** @@ -196998,7 +197951,7 @@ module.exports = 'afterupdate'; /***/ }), -/* 1422 */ +/* 1428 */ /***/ (function(module, exports) { /** @@ -197032,7 +197985,7 @@ module.exports = 'beforeadd'; /***/ }), -/* 1423 */ +/* 1429 */ /***/ (function(module, exports) { /** @@ -197066,7 +198019,7 @@ module.exports = 'beforeremove'; /***/ }), -/* 1424 */ +/* 1430 */ /***/ (function(module, exports) { /** @@ -197099,7 +198052,7 @@ module.exports = 'beforeupdate'; /***/ }), -/* 1425 */ +/* 1431 */ /***/ (function(module, exports) { /** @@ -197136,7 +198089,7 @@ module.exports = 'collisionactive'; /***/ }), -/* 1426 */ +/* 1432 */ /***/ (function(module, exports) { /** @@ -197173,7 +198126,7 @@ module.exports = 'collisionend'; /***/ }), -/* 1427 */ +/* 1433 */ /***/ (function(module, exports) { /** @@ -197210,7 +198163,7 @@ module.exports = 'collisionstart'; /***/ }), -/* 1428 */ +/* 1434 */ /***/ (function(module, exports) { /** @@ -197237,7 +198190,7 @@ module.exports = 'dragend'; /***/ }), -/* 1429 */ +/* 1435 */ /***/ (function(module, exports) { /** @@ -197264,7 +198217,7 @@ module.exports = 'drag'; /***/ }), -/* 1430 */ +/* 1436 */ /***/ (function(module, exports) { /** @@ -197292,7 +198245,7 @@ module.exports = 'dragstart'; /***/ }), -/* 1431 */ +/* 1437 */ /***/ (function(module, exports) { /** @@ -197315,7 +198268,7 @@ module.exports = 'pause'; /***/ }), -/* 1432 */ +/* 1438 */ /***/ (function(module, exports) { /** @@ -197338,7 +198291,7 @@ module.exports = 'resume'; /***/ }), -/* 1433 */ +/* 1439 */ /***/ (function(module, exports) { /** @@ -197371,7 +198324,7 @@ module.exports = 'sleepend'; /***/ }), -/* 1434 */ +/* 1440 */ /***/ (function(module, exports) { /** @@ -197404,7 +198357,7 @@ module.exports = 'sleepstart'; /***/ }), -/* 1435 */ +/* 1441 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -197719,7 +198672,7 @@ module.exports = Transform; /***/ }), -/* 1436 */ +/* 1442 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -197820,7 +198773,7 @@ module.exports = Velocity; /***/ }), -/* 1437 */ +/* 1443 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -197831,15 +198784,15 @@ module.exports = Velocity; var Bounds = __webpack_require__(101); var Class = __webpack_require__(0); -var Composite = __webpack_require__(152); +var Composite = __webpack_require__(153); var Constraint = __webpack_require__(225); -var Detector = __webpack_require__(516); -var Events = __webpack_require__(1302); +var Detector = __webpack_require__(519); +var Events = __webpack_require__(1308); var InputEvents = __webpack_require__(55); -var Merge = __webpack_require__(128); +var Merge = __webpack_require__(132); var Sleeping = __webpack_require__(243); var Vector2 = __webpack_require__(3); -var Vertices = __webpack_require__(86); +var Vertices = __webpack_require__(87); /** * @classdesc @@ -198208,7 +199161,7 @@ module.exports = PointerConstraint; /***/ }), -/* 1438 */ +/* 1444 */ /***/ (function(module, exports, __webpack_require__) { // @if DEBUG @@ -198221,8 +199174,8 @@ var Metrics = {}; module.exports = Metrics; -var Composite = __webpack_require__(152); -var Common = __webpack_require__(42); +var Composite = __webpack_require__(153); +var Common = __webpack_require__(43); (function() { @@ -198307,7 +199260,7 @@ var Common = __webpack_require__(42); /***/ }), -/* 1439 */ +/* 1445 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -198317,38 +199270,38 @@ var Common = __webpack_require__(42); */ var ALIGN_CONST = __webpack_require__(106); -var Axes = __webpack_require__(514); -var Bodies = __webpack_require__(110); +var Axes = __webpack_require__(517); +var Bodies = __webpack_require__(113); var Body = __webpack_require__(62); -var BodyBounds = __webpack_require__(1396); +var BodyBounds = __webpack_require__(1402); var Bounds = __webpack_require__(101); var Class = __webpack_require__(0); -var Composite = __webpack_require__(152); -var Composites = __webpack_require__(1298); +var Composite = __webpack_require__(153); +var Composites = __webpack_require__(1304); var Constraint = __webpack_require__(225); -var Detector = __webpack_require__(516); +var Detector = __webpack_require__(519); var DistanceBetween = __webpack_require__(54); -var Factory = __webpack_require__(1397); +var Factory = __webpack_require__(1403); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); -var Grid = __webpack_require__(1307); -var MatterAttractors = __webpack_require__(1440); -var MatterCollisionEvents = __webpack_require__(1441); -var MatterLib = __webpack_require__(1401); -var MatterWrap = __webpack_require__(1442); -var Merge = __webpack_require__(128); -var Pair = __webpack_require__(474); -var Pairs = __webpack_require__(1308); -var Plugin = __webpack_require__(1305); +var Grid = __webpack_require__(1313); +var MatterAttractors = __webpack_require__(1446); +var MatterCollisionEvents = __webpack_require__(1447); +var MatterLib = __webpack_require__(1407); +var MatterWrap = __webpack_require__(1448); +var Merge = __webpack_require__(132); +var Pair = __webpack_require__(476); +var Pairs = __webpack_require__(1314); +var Plugin = __webpack_require__(1311); var PluginCache = __webpack_require__(23); -var Query = __webpack_require__(1402); -var Resolver = __webpack_require__(1309); -var SAT = __webpack_require__(517); +var Query = __webpack_require__(1408); +var Resolver = __webpack_require__(1315); +var SAT = __webpack_require__(520); var SceneEvents = __webpack_require__(22); -var Svg = __webpack_require__(1299); +var Svg = __webpack_require__(1305); var Vector = __webpack_require__(100); -var Vertices = __webpack_require__(86); -var World = __webpack_require__(1404); +var Vertices = __webpack_require__(87); +var World = __webpack_require__(1410); /** * @classdesc @@ -199776,10 +200729,10 @@ module.exports = MatterPhysics; /***/ }), -/* 1440 */ +/* 1446 */ /***/ (function(module, exports, __webpack_require__) { -var Matter = __webpack_require__(1304); +var Matter = __webpack_require__(1310); /** * An attractors plugin for matter.js. @@ -199935,7 +200888,7 @@ module.exports = MatterAttractors; /***/ }), -/* 1441 */ +/* 1447 */ /***/ (function(module, exports) { /** @@ -200068,10 +201021,10 @@ module.exports = MatterCollisionEvents; /***/ }), -/* 1442 */ +/* 1448 */ /***/ (function(module, exports, __webpack_require__) { -var Matter = __webpack_require__(1304); +var Matter = __webpack_require__(1310); /** * A coordinate wrapping plugin for matter.js. @@ -200250,7 +201203,7 @@ module.exports = MatterWrap; */ /***/ }), -/* 1443 */ +/* 1449 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -200269,15 +201222,15 @@ module.exports = MatterWrap; module.exports = { - Canvas: __webpack_require__(1444), - Snapshot: __webpack_require__(1445), - WebGL: __webpack_require__(1446) + Canvas: __webpack_require__(1450), + Snapshot: __webpack_require__(1451), + WebGL: __webpack_require__(1452) }; /***/ }), -/* 1444 */ +/* 1450 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -200292,15 +201245,15 @@ module.exports = { module.exports = { - CanvasRenderer: __webpack_require__(506), - GetBlendModes: __webpack_require__(508), + CanvasRenderer: __webpack_require__(508), + GetBlendModes: __webpack_require__(510), SetTransform: __webpack_require__(28) }; /***/ }), -/* 1445 */ +/* 1451 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -200315,14 +201268,14 @@ module.exports = { module.exports = { - Canvas: __webpack_require__(507), - WebGL: __webpack_require__(510) + Canvas: __webpack_require__(509), + WebGL: __webpack_require__(512) }; /***/ }), -/* 1446 */ +/* 1452 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -200338,22 +201291,15 @@ module.exports = { module.exports = { Utils: __webpack_require__(10), - WebGLPipeline: __webpack_require__(149), - WebGLRenderer: __webpack_require__(509), - Pipelines: __webpack_require__(1447), - - // Constants - BYTE: 0, - SHORT: 1, - UNSIGNED_BYTE: 2, - UNSIGNED_SHORT: 3, - FLOAT: 4 + WebGLPipeline: __webpack_require__(108), + WebGLRenderer: __webpack_require__(511), + Pipelines: __webpack_require__(1453) }; /***/ }), -/* 1447 */ +/* 1453 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -200368,11 +201314,12 @@ module.exports = { module.exports = { - BitmapMaskPipeline: __webpack_require__(511), - ForwardDiffuseLightPipeline: __webpack_require__(512), - TextureTintPipeline: __webpack_require__(150), - TextureTintStripPipeline: __webpack_require__(513), - ModelViewProjection: __webpack_require__(151) + BitmapMaskPipeline: __webpack_require__(513), + LightPipeline: __webpack_require__(514), + SinglePipeline: __webpack_require__(516), + MultiPipeline: __webpack_require__(109), + RopePipeline: __webpack_require__(515), + ModelViewProjection: __webpack_require__(110) }; diff --git a/dist/phaser.min.js b/dist/phaser.min.js index 5e19e3b9d..e420c4e99 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()}(window,function(){return n={},s.m=i=[function(t,e){function r(t,e,i,n){for(var s in e)if(e.hasOwnProperty(s)){var r=(l=e,u=s,f=d=void 0,f=(c=i)?l[u]:Object.getOwnPropertyDescriptor(l,u),!c&&f.value&&"object"==typeof f.value&&(f=f.value),!(!f||!((d=f).get&&"function"==typeof d.get||d.set&&"function"==typeof d.set))&&(void 0===f.enumerable&&(f.enumerable=!0),void 0===f.configurable&&(f.configurable=!0),f));if(!1!==r){if(o=(n||t).prototype,a=s,h=void 0,(h=Object.getOwnPropertyDescriptor(o,a))&&(h.value&&"object"==typeof h.value&&(h=h.value),!1===h.configurable)){if(p.ignoreFinals)continue;throw new Error("cannot override final property '"+s+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,s,r)}else t.prototype[s]=e[s]}var o,a,h,l,u,c,d,f}function o(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i=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},function(t,e){t.exports={getTintFromFloats:function(t,e,i,n){return((255&(255*n|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]},getComponentCount:function(t,e){for(var i=0,n=0;nr.width&&(i=Math.max(r.width-t,0)),e+n>r.height&&(n=Math.max(r.height-e,0));for(var l=[],u=e;u>>16,a=(65280&s)>>>8,h=255&s;t.fillStyle="rgba("+o+","+a+","+h+","+r+")"}},function(t,e){var h={};t.exports=h,function(){h._nextId=0,h._seed=0,h._nowStartTime=+new Date,h.extend=function(t,e){for(var i,n="boolean"==typeof e?(i=2,e):(i=1,!0),s=i;s=e&&t.y<=i&&t.y+t.height>=i)}},function(t,e,i){var n=i(0),s=i(279),r=i(157),o=i(47),a=i(158),h=i(3),l=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=o.LINE,this.x1=t,this.y1=e,this.x2=i,this.y2=n},getPoint:function(t,e){return s(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,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,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},function(t,e){t.exports=function(t,e,i,n){var s=i||e.strokeColor,r=n||e.strokeAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.strokeStyle="rgba("+o+","+a+","+h+","+r+")",t.lineWidth=e.lineWidth}},function(t,e){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}},function(t,e,i){var d=i(144),f=i(24);t.exports=function(t,e,i,n,s){for(var r,o,a,h,l=f(t,e,i,n,null,s),u=0;u=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}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e,i){t.exports={COMPLETE:i(894),DECODED:i(895),DECODED_ALL:i(896),DESTROY:i(897),DETUNE:i(898),GLOBAL_DETUNE:i(899),GLOBAL_MUTE:i(900),GLOBAL_RATE:i(901),GLOBAL_VOLUME:i(902),LOOP:i(903),LOOPED:i(904),MUTE:i(905),PAUSE_ALL:i(906),PAUSE:i(907),PLAY:i(908),RATE:i(909),RESUME_ALL:i(910),RESUME:i(911),SEEK:i(912),STOP_ALL:i(913),STOP:i(914),UNLOCKED:i(915),VOLUME:i(916)}},function(t,e,i){var n=i(0),h=i(18),l=i(21),s=i(8),u=i(2),c=i(6),d=i(7),r=new n({Extends:l,initialize:function(t,e,i,n,s){var r,o="json";d(e)&&(e=u(r=e,"key"),i=u(r,"url"),n=u(r,"xhrSettings"),o=u(r,"extension",o),s=u(r,"dataKey",s));var a={type:"json",cache:t.cacheManager.json,extension:o,responseType:"text",key:e,url:i,xhrSettings:n,config:s};l.call(this,t,a),d(i)&&(this.data=s?c(i,s):i,this.state=h.FILE_POPULATED)},onProcess:function(){var t,e;this.state!==h.FILE_POPULATED&&(this.state=h.FILE_PROCESSING,t=JSON.parse(this.xhrLoader.responseText),e=this.config,this.data="string"==typeof e?c(t,e,t):t),this.onProcessComplete()}});s.register("json",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&o=n.x&&n.x>=u&&s!==n.x&&T(ri.x)&&b(n,t)&&(i=n,d=h),n=n.next;return i}(t,e))&&v(i=E(e,t),i.next)}}(l[s],i),i=v(i,i.next);return i}(t,e,d,i)),t.length>80*i){n=r=t[0],s=o=t[1];for(var p=i;pr.x?s.x>o.x?s.x:o.x:r.x>o.x?r.x:o.x,u=s.y>r.y?s.y>o.y?s.y:o.y:r.y>o.y?r.y:o.y,c=x(a,h,e,i,n),d=x(l,u,e,i,n),f=t.prevZ,p=t.nextZ;for(;f&&f.z>=c&&p&&p.z<=d;){if(f!==t.prev&&f!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,f.x,f.y)&&0<=w(f.prev,f,f.next))return!1;if(f=f.prevZ,p!==t.prev&&p!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&0<=w(p.prev,p,p.next))return!1;p=p.nextZ}for(;f&&f.z>=c;){if(f!==t.prev&&f!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,f.x,f.y)&&0<=w(f.prev,f,f.next))return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&0<=w(p.prev,p,p.next))return!1;p=p.nextZ}return!0}(t,n,s,r):function(t){var e=t.prev,i=t,n=t.next;if(0<=w(e,i,n))return!1;var s=t.next.next;for(;s!==t.prev;){if(T(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&0<=w(s.prev,s,s.next))return!1;s=s.next}return!0}(t))e.push(a.i/i),e.push(t.i/i),e.push(h.i/i),d(t),t=h.next,l=h.next;else if((t=h)===l){o?1===o?m(t=function(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!u(s,r)&&c(s,n,n.next,r)&&b(s,r)&&b(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),d(n),d(n.next),n=t=r),n=n.next}while(n!==t);return n}(t,e,i),e,i,n,s,r,2):2===o&&function(t,e,i,n,s,r){var o=t;do{for(var a=o.next.next;a!==o.prev;){if(o.i!==a.i&&function(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&&c(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&b(t,e)&&b(e,t)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;for(;i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next,i!==t;);return n}(t,e)}(o,a)){var h=E(o,a);return o=v(o,o.next),h=v(h,h.next),m(o,e,i,n,s,r),m(h,e,i,n,s,r)}a=a.next}o=o.next}while(o!==t)}(t,e,i,n,s,r):m(v(t),e,i,n,s,r,1);break}}}function y(t,e){return t.x-e.x}function x(t,e,i,n,s){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*s)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*s)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function T(t,e,i,n,s,r,o,a){return 0<=(s-o)*(e-a)-(t-o)*(r-a)&&0<=(t-o)*(n-a)-(i-o)*(e-a)&&0<=(i-o)*(r-a)-(s-o)*(n-a)}function w(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function u(t,e){return t.x===e.x&&t.y===e.y}function c(t,e,i,n){return u(t,e)&&u(i,n)||u(t,n)&&u(i,e)||0=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},function(t,e,i){var n=i(0),s=i(18),c=i(21),r=i(8),d=i(2),f=i(7),o=new n({Extends:c,initialize:function t(e,i,n,s,r){var o,a,h="png";f(i)&&(i=d(a=i,"key"),n=d(a,"url"),o=d(a,"normalMap"),s=d(a,"xhrSettings"),h=d(a,"extension",h),r=d(a,"frameConfig")),Array.isArray(n)&&(o=n[1],n=n[0]);var l,u={type:"image",cache:e.textureManager,extension:h,responseType:"blob",key:i,url:n,xhrSettings:s,config:r};c.call(this,e,u),o&&((l=new t(e,this.key,o,s,r)).type="normalMap",this.setLink(l),e.addFile(l))},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){c.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){c.revokeObjectURL(t.data),t.onProcessError()},c.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var t,e=this.linkFile;e&&e.state===s.FILE_COMPLETE?(t="image"===this.type?this.cache.addImage(this.key,this.data,e.data):this.cache.addImage(e.key,e.data,this.data),this.pendingDestroy(t),e.pendingDestroy(t)):e||(t=this.cache.addImage(this.key,this.data),this.pendingDestroy(t))}});r.register("image",function(t,e,i){if(Array.isArray(t))for(var n=0;nthis.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=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.tileToWorldX(this.x,t):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.tileToWorldY(this.y,t)-(this.height-this.baseHeight)*e.scaleY:this.y*this.baseHeight-(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 r),e.x=this.getLeft(),e.y=this.getTop(),e.width=this.getRight()-e.x,e.height=this.getBottom()-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},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=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){return 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),this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){return void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===s&&(s=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,s&&this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y),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,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight,this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||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=o},function(t,e,i){var n=i(0),r=i(12),o=i(14),s=i(971),a=new n({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,s],initialize:function(t,e,i,n,s){o.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new r.Animation(this),this.setTexture(n,s),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()},preUpdate:function(t,e){this.anims.update(t,e)},play:function(t,e,i){return this.anims.play(t,e,i),this},toJSON:function(){return r.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=a},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e){t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,n=t[e],s=e;sh||a.y>l)?(u=Math.max(a.x,e),c=Math.max(a.y,i),b=d=Math.min(a.r,h)-u,E=f=Math.min(a.b,l)-c,T=r?p+(v-(u-a.x)-d):p+(u-a.x),w=o?g+(m-(c-a.y)-f):g+(c-a.y),e=u,i=c,n=d,s=f):E=b=w=T=0):(r&&(T=p+(v-e-n)),o&&(w=g+(m-i-s)));var S=this.source.width,A=this.source.height;return t.u0=Math.max(0,T/S),t.v0=Math.max(0,w/A),t.u1=Math.min(1,(T+b)/S),t.v1=Math.min(1,(w+E)/A),t.x=e,t.y=i,t.cx=T,t.cy=w,t.cw=b,t.ch=E,t.width=n,t.height=s,t.flipX=r,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,n,s,r){var o=this.data.drawImage;return o.width=t,o.height=e,this.u0=i,this.v0=n,this.u1=s,this.v1=r,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.width=i,s.height=n;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+n)/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 r(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=s(!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=r},function(t,e,i){var n=i(0),s=i(97),r=i(398),o=i(399),a=i(47),h=i(162),l=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=a.ELLIPSE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(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,n){return this.x=t,this.y=e,this.width=i,this.height=n,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},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){var B=i(245),n=i(0),r=i(90),N=i(2),Y=i(6),s=i(7),X=i(392),o=i(135),a=i(75),h=new n({initialize:function(t,e,i){i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?s(e[0])&&(i=e,e=null):s(e)&&(i=e,e=null),this.scene=t,this.children=new o,this.isParent=!0,this.type="Group",this.classType=N(i,"classType",a),this.name=N(i,"name",""),this.active=N(i,"active",!0),this.maxSize=N(i,"maxSize",-1),this.defaultKey=N(i,"defaultKey",null),this.defaultFrame=N(i,"defaultFrame",null),this.runChildUpdate=N(i,"runChildUpdate",!1),this.createCallback=N(i,"createCallback",null),this.removeCallback=N(i,"removeCallback",null),this.createMultipleCallback=N(i,"createMultipleCallback",null),this.internalCreateCallback=N(i,"internalCreateCallback",null),this.internalRemoveCallback=N(i,"internalRemoveCallback",null),e&&this.addMultiple(e),i&&this.createMultiple(i)},create:function(t,e,i,n,s,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),void 0===r&&(r=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(o),o.preUpdate&&this.scene.sys.updateList.add(o),o.visible=s,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=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;it.max.x&&(t.max.x=s.x),s.xt.max.y&&(t.max.y=s.y),s.y=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},i.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},i.translate=function(t,e){t.min.x+=e.x,t.max.x+=e.x,t.min.y+=e.y,t.max.y+=e.y},i.shift=function(t,e){var i=t.max.x-t.min.x,n=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+n}},function(t,e){t.exports=function(t,e,i){return 0<=t&&t=this.firstgid&&t>16)+(65280&t)+((255&t)<<16)}},function(t,e,i){var n=i(0),a=i(288),s=new n({initialize:function(t,e){this.parent=t,(this.events=e)||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once("destroy",this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],n=0;ne.right||t.y>e.bottom)}},function(t,e,i){var l=i(6),u={},n={register:function(t,e,i,n,s){u[t]={plugin:e,mapping:i,settingsKey:n,configKey:s}},getPlugin:function(t){return u[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,n=e.game.config;for(var s in u){var r=u[s].plugin,o=u[s].mapping,a=u[s].settingsKey,h=u[s].configKey;l(i,a,n[h])&&(t[o]=new r(t))}},remove:function(t){u.hasOwnProperty(t)&&delete u[t]}};t.exports=n},function(t,e,i){t.exports={ANY_KEY_DOWN:i(1223),ANY_KEY_UP:i(1224),COMBO_MATCH:i(1225),DOWN:i(1226),KEY_DOWN:i(1227),KEY_UP:i(1228),UP:i(1229)}},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),void 0===r&&(r=!1),{responseType:t,async:e,user:i,password:n,timeout:s,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:r}}},function(t,e,i){var n=i(0),s=i(223),r=i(75),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s),this.body=null}});t.exports=o},function(t,e,i){t.exports={CalculateFacesAt:i(226),CalculateFacesWithin:i(52),Copy:i(1319),CreateFromTiles:i(1320),CullTiles:i(1321),Fill:i(1322),FilterTiles:i(1323),FindByIndex:i(1324),FindTile:i(1325),ForEachTile:i(1326),GetTileAt:i(144),GetTileAtWorldXY:i(1327),GetTilesWithin:i(24),GetTilesWithinShape:i(1328),GetTilesWithinWorldXY:i(1329),HasTileAt:i(477),HasTileAtWorldXY:i(1330),IsInLayerBounds:i(102),PutTileAt:i(227),PutTileAtWorldXY:i(1331),PutTilesAt:i(1332),Randomize:i(1333),RemoveTileAt:i(478),RemoveTileAtWorldXY:i(1334),RenderDebug:i(1335),ReplaceByIndex:i(476),SetCollision:i(1336),SetCollisionBetween:i(1337),SetCollisionByExclusion:i(1338),SetCollisionByProperty:i(1339),SetCollisionFromCollisionGroup:i(1340),SetTileIndexCallback:i(1341),SetTileLocationCallback:i(1342),Shuffle:i(1343),SwapByIndex:i(1344),TileToWorldX:i(145),TileToWorldXY:i(1345),TileToWorldY:i(146),WeightedRandomize:i(1346),WorldToTileX:i(63),WorldToTileXY:i(1347),WorldToTileY:i(64)}},function(t,e,i){var r=i(102);t.exports=function(t,e,i,n){if(void 0===i&&(i=!1),r(t,e,n)){var s=n.data[e][t]||null;return null!==s&&(-1!==s.index||i)?s:null}return null}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),n*=s.scaleX),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*n}},function(t,e){t.exports=function(o,a,t){return o.hasOwnProperty(a)?"function"==typeof o[a]?function(t,e,i,n,s,r){return o[a](t,e,i,n,s,r)}:function(){return o[a]}:"function"==typeof t?t:function(){return t}}},function(t,e,i){var R=i(236),L=i(15),F=i(88),k=i(69),D=i(147),I=i(499),B=i(234),N=i(6),Y=i(235),X=i(237),U=i(239);t.exports=function(t,e,i){void 0===i&&(i=R);for(var n=i.targets?i.targets:B(e),s=I(e),r=D(e,"delay",i.delay),o=D(e,"duration",i.duration),a=N(e,"easeParams",i.easeParams),h=k(N(e,"ease",i.ease),a),l=D(e,"hold",i.hold),u=D(e,"repeat",i.repeat),c=D(e,"repeatDelay",i.repeatDelay),d=F(e,"yoyo",i.yoyo),f=F(e,"flipX",i.flipX),p=F(e,"flipY",i.flipY),g=[],v=0;v=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this.resolution=i,this},bind:function(){var t=this.vertexBuffer,e=this.program,i=this.renderer;return i.setProgram(e),i.setVertexBuffer(t),this.setAttribPointers(),this},setAttribPointers:function(){for(var t=this.gl,e=this.attributes,i=this.vertexSize,n=0;nthis.vertexCapacity&&this.flush();var N=this.setGameObject(t),Y=t._isTinted&&t.tintFill;this.batchQuad(A,C,M,P,O,R,L,F,l,u,c,d,k,D,I,B,Y,h,N)},batchQuad:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,m,y){void 0===y&&(y=this.currentUnit);var x=!1;this.vertexCount+6>this.vertexCapacity&&(this.flush(),x=!0,y=this.setTexture2D(m));var T=this.vertexViewF32,w=this.vertexViewU32,b=this.vertexCount*this.vertexComponentCount-1;return T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=y,T[++b]=v,w[++b]=d,T[++b]=i,T[++b]=n,T[++b]=h,T[++b]=c,T[++b]=y,T[++b]=v,w[++b]=p,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=y,T[++b]=v,w[++b]=g,T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=y,T[++b]=v,w[++b]=d,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=y,T[++b]=v,w[++b]=g,T[++b]=o,T[++b]=a,T[++b]=u,T[++b]=l,T[++b]=y,T[++b]=v,w[++b]=f,this.vertexCount+=6,x},batchTri:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g){void 0===g&&(g=this.currentUnit);var v=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),v=!0,g=this.setTexture2D(p));var m=this.vertexViewF32,y=this.vertexViewU32,x=this.vertexCount*this.vertexComponentCount-1;return m[++x]=t,m[++x]=e,m[++x]=o,m[++x]=a,m[++x]=g,m[++x]=f,y[++x]=u,m[++x]=i,m[++x]=n,m[++x]=o,m[++x]=l,m[++x]=g,m[++x]=f,y[++x]=c,m[++x]=s,m[++x]=r,m[++x]=h,m[++x]=l,m[++x]=g,m[++x]=f,y[++x]=d,this.vertexCount+=3,v},batchTexture:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,m,y,x,T,w,b,E,_,S,A,C,M,P,O,R){this.renderer.setPipeline(this,t);var L,F,k,D=this._tempMatrix1,I=this._tempMatrix2,B=this._tempMatrix3,N=m/i+A,Y=y/n+C,X=(m+x)/i+A,U=(y+T)/n+C,z=o,G=a,W=-g,V=-v;t.isCropped&&(z=(L=t._crop).width,G=L.height,o=L.width,a=L.height,F=m=L.x,k=y=L.y,c&&(F=x-L.x-L.width),d&&!e.isRenderTexture&&(k=T-L.y-L.height),N=F/i+A,Y=k/n+C,X=(F+L.width)/i+A,U=(k+L.height)/n+C,W=-g+m,V=-v+y),c&&(z*=-1,W+=o),(d^=!O&&e.isRenderTexture?1:0)&&(G*=-1,V+=a);var H=W+z,j=V+G;I.applyITRS(s,r,u,h,l),D.copyFrom(M.matrix),P?(D.multiplyWithOffset(P,-M.scrollX*f,-M.scrollY*p),I.e=s,I.f=r):(I.e-=M.scrollX*f,I.f-=M.scrollY*p),D.multiply(I,B);var q=B.getX(W,V),K=B.getY(W,V),Z=B.getX(W,j),J=B.getY(W,j),Q=B.getX(H,j),$=B.getY(H,j),tt=B.getX(H,V),et=B.getY(H,V);M.roundPixels&&(q=Math.round(q),K=Math.round(K),Z=Math.round(Z),J=Math.round(J),Q=Math.round(Q),$=Math.round($),tt=Math.round(tt),et=Math.round(et)),void 0===R&&(R=this.renderer.setTexture2D(e)),this.batchQuad(q,K,Z,J,Q,$,tt,et,N,Y,X,U,w,b,E,_,S,e,R)},batchTextureFrame:function(t,e,i,n,s,r,o){this.renderer.setPipeline(this);var a=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2,l=e+t.width,u=i+t.height;o?a.multiply(o,h):h=a;var c=h.getX(e,i),d=h.getY(e,i),f=h.getX(e,u),p=h.getY(e,u),g=h.getX(l,u),v=h.getY(l,u),m=h.getX(l,i),y=h.getY(l,i),x=this.renderer.setTextureSource(t.source);n=X.getTintAppendFloatAlpha(n,s),this.batchQuad(c,d,f,p,g,v,m,y,t.u0,t.v0,t.u1,t.v1,n,n,n,n,0,t.glTexture,x)},drawFillRect:function(t,e,i,n,s,r){t=Math.floor(t),e=Math.floor(e);var o=Math.floor(t+i),a=Math.floor(e+n),h=this.renderer.blankTexture.glTexture,l=this.renderer.setTexture2D(h),u=X.getTintAppendFloatAlphaAndSwap(s,r);this.batchQuad(t,e,t,a,o,a,o,e,0,0,1,1,u,u,u,u,2,h,l)},batchFillRect:function(t,e,i,n,s,r){this.renderer.setPipeline(this);var o=this._tempMatrix3;r&&r.multiply(s,o);var a=t+i,h=e+n,l=o.getX(t,e),u=o.getY(t,e),c=o.getX(t,h),d=o.getY(t,h),f=o.getX(a,h),p=o.getY(a,h),g=o.getX(a,e),v=o.getY(a,e),m=this.currentFrame,y=m.u0,x=m.v0,T=m.u1,w=m.v1,b=this.fillTint;this.batchQuad(l,u,c,d,f,p,g,v,y,x,T,w,b.TL,b.TR,b.BL,b.BR,this.tintEffect)},batchFillTriangle:function(t,e,i,n,s,r,o,a){this.renderer.setPipeline(this);var h=this._tempMatrix3;a&&a.multiply(o,h);var l=h.getX(t,e),u=h.getY(t,e),c=h.getX(i,n),d=h.getY(i,n),f=h.getX(s,r),p=h.getY(s,r),g=this.currentFrame,v=g.u0,m=g.v0,y=g.u1,x=g.v1;this.batchTri(l,u,c,d,f,p,v,m,y,x,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.tintEffect)},batchStrokeTriangle:function(t,e,i,n,s,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=n,l[1].width=o,l[2].x=s,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.setPipeline(this);var n=this._tempMatrix3;i&&i.multiply(e,n);for(var s,r,o=t.length,a=this.polygonCache,h=this.fillTint.TL,l=this.fillTint.TR,u=this.fillTint.BL,c=this.tintEffect,d=0;d=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo);var i=this.frames[e];0!==e||t.forward||(i=this.getLastFrame()),t.updateFrame(i)},getFrameByProgress:function(t){return t=n(t,0,1),a(t,this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t._yoyo?this.handleYoyoFrame(t,!1):0=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2);t=new Array(1+(s-r)).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){var n=i(298),s=i(301),r=i(303),o=i(304);t.exports=function(t){switch(typeof t){case"string":return("rgb"===t.substr(0,3).toLowerCase()?o:n)(t);case"number":return s(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){var f=i(170);t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1);var s=Math.floor(6*t),r=6*t-s,o=Math.floor(i*(1-e)*255),a=Math.floor(i*(1-r*e)*255),h=Math.floor(i*(1-(1-r)*e)*255),l=i=Math.floor(i*=255),u=i,c=i,d=s%6;return 0==d?(u=h,c=o):1==d?(l=a,c=o):2==d?(l=o,c=h):3==d?(l=o,u=a):4==d?(l=h,u=o):5==d&&(u=o,c=a),n?n.setTo?n.setTo(l,u,c,n.alpha,!1):(n.r=l,n.g=u,n.b=c,n.color=f(l,u,c),n):{r:l,g:u,b:c,color:f(l,u,c)}}},function(t,e){var i="";function n(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;is.width&&(t=s.width-r.cutX),r.cutY+e>s.height&&(e=s.height-r.cutY),r.setSize(t,e,r.cutX,r.cutY)),this.updateDisplayOrigin();var a=this.input;return a&&!a.customHitArea&&(a.hitArea.width=t,a.hitArea.height=e),this},setGlobalTint:function(t){return this.globalTint=t,this},setGlobalAlpha:function(t){return this.globalAlpha=t,this},saveTexture:function(t){return this.textureManager.renameTexture(this.texture.key,t),this._saved=!0,this.texture},fill:function(t,e,i,n,s,r){void 0===e&&(e=1),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.frame.cutWidth),void 0===r&&(r=this.frame.cutHeight);var o,a,h,l,u,c=255&(t>>16|0),d=255&(t>>8|0),f=255&(0|t),p=this.gl,g=this.frame,v=this.camera,m=this.renderer;return v.preRender(1,1),p?(o=v._cx,a=v._cy,h=v._cw,l=v._ch,m.resetTextures(!0),m.setFramebuffer(this.framebuffer,!1),m.pushScissor(o,a,h,l,l),u=this.pipeline,y(u,0,this.texture.width,0,this.texture.height,-1e3,1e3),u.drawFillRect(i,n,s,r,x.getTintFromFloats(c/255,d/255,f/255,1),e),u.flush(),m.setFramebuffer(null,!1),m.popScissor(),y(u,0,u.width,u.height,0,-1e3,1e3)):(m.setContext(this.context),this.context.fillStyle="rgba("+c+","+d+","+f+","+e+")",this.context.fillRect(i+g.cutX,n+g.cutY,s,r),m.setContext()),this.dirty=!0,this},clear:function(){var t,e,i;return this.dirty&&((t=this.gl)?((e=this.renderer).setFramebuffer(this.framebuffer,!0),this.frame.cutWidth===this.canvas.width&&this.frame.cutHeight===this.canvas.height||t.scissor(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),e.setFramebuffer(null,!0)):((i=this.context).save(),i.setTransform(1,0,0,1,0,0),i.clearRect(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),i.restore()),this.dirty=!1),this},erase:function(t,e,i){this._eraseMode=!0;var n=this.renderer.currentBlendMode;return this.renderer.setBlendMode(o.ERASE),this.draw(t,e,i,1,16777215),this.renderer.setBlendMode(n),this._eraseMode=!1,this},draw:function(t,e,i,n,s){void 0===n&&(n=this.globalAlpha),s=void 0===s?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(s>>16)+(65280&s)+((255&s)<<16),Array.isArray(t)||(t=[t]);var r,o,a,h,l,u=this.gl,c=this.camera,d=this.renderer;return c.preRender(1,1),u?(r=c._cx,o=c._cy,a=c._cw,h=c._ch,d.resetTextures(!0),d.setFramebuffer(this.framebuffer,!1),d.pushScissor(r,o,a,h,h),l=this.pipeline,y(l,0,this.texture.width,0,this.texture.height,-1e3,1e3),this.batchList(t,e,i,n,s),d.setFramebuffer(null,!0),d.resetTextures(!0),y(l,0,l.width,l.height,0,-1e3,1e3)):(d.setContext(this.context),this.batchList(t,e,i,n,s),d.setContext()),this.dirty=!0,this},drawFrame:function(t,e,i,n,s,r){void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.globalAlpha),r=void 0===r?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(r>>16)+(65280&r)+((255&r)<<16);var o,a,h,l,u,c=this.gl,d=this.camera,f=this.renderer,p=this.textureManager.getFrame(t,e);return p&&(d.preRender(1,1),c?(o=d._cx,a=d._cy,h=d._cw,l=d._ch,f.resetTextures(!0),f.setFramebuffer(this.framebuffer,!1),f.pushScissor(o,a,h,l,l),u=this.pipeline,y(u,0,this.texture.width,0,this.texture.height,-1e3,1e3),u.batchTextureFrame(p,i+this.frame.cutX,n+this.frame.cutY,r,s,d.matrix,null),u.flush(),f.setFramebuffer(null,!1),f.popScissor(),y(u,0,u.width,u.height,0,-1e3,1e3)):this.batchTextureFrame(p,i+this.frame.cutX,n+this.frame.cutY,s,r),this.dirty=!0),this},batchList:function(t,e,i,n,s){for(var r=0;rs&&(r=t[s]),n[s]=r,t.length>s+1&&(r=t[s+1]),n[s+1]=r;return this},setColors:function(t){var e=this.points.length;if(e<1)return this;var i=this.colors;void 0===t?t=[16777215]:Array.isArray(t)||(t=[t]);var n=0;if(t.length===e)for(r=0;rn&&(s=t[n]),i[n]=s,t.length>n+1&&(s=t[n+1]),i[n+1]=s;return this},setPoints:function(t,e,i){if(void 0===t&&(t=2),"number"==typeof t){var n,s,r,o=t;if(o<2&&(o=2),t=[],this.horizontal)for(r=-this.frame.halfWidth,s=this.frame.width/(o-1),n=0;n=this._markerOut&&(e.loop?(e.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=t,this.emit(o.VIDEO_LOOP,this)):(this.emit(o.VIDEO_COMPLETE,this),this.stop())))},checkVideoProgress:function(){2<=this.video.readyState?this.updateTexture():(this.retry--,0t&&(t=s.totalDuration),s.delay=o.sleepThreshold&&u.set(o,!0)):0u._motionWakeThreshold*i&&u.set(a,!1)))}},u.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"))}},function(t,e,i){var n={};t.exports=n;var u=i(42);n.on=function(t,e,i){for(var n,s=e.split(" "),r=0;re.length&&(r=e.length),i?(n=e[r-1][i],(s=e[r][i])-t<=t-n?e[r]:e[r-1]):(n=e[r-1],(s=e[r])-t<=t-n?s:n)}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=n,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0}});t.exports=n},function(t,e,i){var n=i(53),s={_blendMode:n.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=n[t]),-1<=(t|=0)&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e,i){var o=i(156),a=i(113);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&0=t.right&&(o=1,r+=s-t.right,s=t.right);break;case 1:(r+=e)>=t.bottom&&(o=2,s-=r-t.bottom,r=t.bottom);break;case 2:(s-=e)<=t.left&&(o=3,r-=t.left-s,s=t.left);break;case 3:(r-=e)<=t.top&&(o=0,r=t.top)}return n}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;nd.right&&(f=T(f,f+(e-d.right),this.lerp.x)),id.bottom&&(p=T(p,p+(i-d.bottom),this.lerp.y))):(f=T(f,e-l,this.lerp.x),p=T(p,i-u,this.lerp.y))),this.useBounds&&(f=this.clampX(f),p=this.clampY(p)),this.roundPixels&&(l=Math.round(l),u=Math.round(u));var g=(this.scrollX=f)+r,v=(this.scrollY=p)+o;this.midPoint.set(g,v);var m=n/a,y=s/a;this.worldView.setTo(g-m/2,v-y/2,m,y),h.applyITRS(this.x+l,this.y+u,this.rotation,a,a),h.translate(-l,-u),this.shakeEffect.preRender()},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,n,s,r){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===n&&(n=i),void 0===s&&(s=0),void 0===r&&(r=s),this._follow=t,this.roundPixels=e,i=u(i,0,1),n=u(n,0,1),this.lerp.set(i,n),this.followOffset.set(s,r);var o=this.width/2,a=this.height/2,h=t.x-s,l=t.y-r;return this.midPoint.set(h,l),this.scrollX=h-o,this.scrollY=l-a,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.clearRenderToTexture(),this.resetFX(),s.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=c},function(t,e,i){var o=i(31);t.exports=function(t){var e=new o;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,n){return e+e+i+i+n+n});var i,n,s,r=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return r&&(i=parseInt(r[1],16),n=parseInt(r[2],16),s=parseInt(r[3],16),e.setTo(i,n,s)),e}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},function(t,e){t.exports=function(t,e,i,n){void 0===n&&(n={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var s=Math.min(t,e,i),r=Math.max(t,e,i),o=r-s,a=0,h=0===r?0:o/r,l=r;return r!==s&&(r===t?a=(e-i)/o+(e>>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}}},function(t,e,i){var n=i(31);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var a=i(31);t.exports=function(t){var e,i,n,s,r=new a,o=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());return o&&(e=parseInt(o[1],10),i=parseInt(o[2],10),n=parseInt(o[3],10),s=void 0!==o[4]?parseFloat(o[4]):1,r.setTo(e,i,n,255*s)),r}},function(t,e,i){t.exports={Fade:i(665),Flash:i(666),Pan:i(667),Shake:i(700),RotateTo:i(701),Zoom:i(702)}},function(t,e,i){t.exports={In:i(668),Out:i(669),InOut:i(670)}},function(t,e,i){t.exports={In:i(671),Out:i(672),InOut:i(673)}},function(t,e,i){t.exports={In:i(674),Out:i(675),InOut:i(676)}},function(t,e,i){t.exports={In:i(677),Out:i(678),InOut:i(679)}},function(t,e,i){t.exports={In:i(680),Out:i(681),InOut:i(682)}},function(t,e,i){t.exports={In:i(683),Out:i(684),InOut:i(685)}},function(t,e,i){t.exports=i(686)},function(t,e,i){t.exports={In:i(687),Out:i(688),InOut:i(689)}},function(t,e,i){t.exports={In:i(690),Out:i(691),InOut:i(692)}},function(t,e,i){t.exports={In:i(693),Out:i(694),InOut:i(695)}},function(t,e,i){t.exports={In:i(696),Out:i(697),InOut:i(698)}},function(t,e,i){t.exports=i(699)},function(t,e,i){var n=i(0),a=i(33),h=i(319),l=i(2),u=i(6),c=i(7),d=i(175),f=i(1),p=i(180),g=i(169),s=new n({initialize:function(t){void 0===t&&(t={});this.width=u(t,"width",1024),this.height=u(t,"height",768),this.zoom=u(t,"zoom",1),this.resolution=u(t,"resolution",1),this.parent=u(t,"parent",void 0),this.scaleMode=u(t,"scaleMode",0),this.expandParent=u(t,"expandParent",!0),this.autoRound=u(t,"autoRound",!1),this.autoCenter=u(t,"autoCenter",0),this.resizeInterval=u(t,"resizeInterval",500),this.fullscreenTarget=u(t,"fullscreenTarget",null),this.minWidth=u(t,"minWidth",0),this.maxWidth=u(t,"maxWidth",0),this.minHeight=u(t,"minHeight",0),this.maxHeight=u(t,"maxHeight",0);var e=u(t,"scale",null);e&&(this.width=u(e,"width",this.width),this.height=u(e,"height",this.height),this.zoom=u(e,"zoom",this.zoom),this.resolution=u(e,"resolution",this.resolution),this.parent=u(e,"parent",this.parent),this.scaleMode=u(e,"mode",this.scaleMode),this.expandParent=u(e,"expandParent",this.expandParent),this.autoRound=u(e,"autoRound",this.autoRound),this.autoCenter=u(e,"autoCenter",this.autoCenter),this.resizeInterval=u(e,"resizeInterval",this.resizeInterval),this.fullscreenTarget=u(e,"fullscreenTarget",this.fullscreenTarget),this.minWidth=u(e,"min.width",this.minWidth),this.maxWidth=u(e,"max.width",this.maxWidth),this.minHeight=u(e,"min.height",this.minHeight),this.maxHeight=u(e,"max.height",this.maxHeight)),this.renderType=u(t,"type",a.AUTO),this.canvas=u(t,"canvas",null),this.context=u(t,"context",null),this.canvasStyle=u(t,"canvasStyle",null),this.customEnvironment=u(t,"customEnvironment",!1),this.sceneConfig=u(t,"scene",null),this.seed=u(t,"seed",[(Date.now()*Math.random()).toString()]),d.RND=new d.RandomDataGenerator(this.seed),this.gameTitle=u(t,"title",""),this.gameURL=u(t,"url","https://phaser.io"),this.gameVersion=u(t,"version",""),this.autoFocus=u(t,"autoFocus",!0),this.domCreateContainer=u(t,"dom.createContainer",!1),this.domBehindCanvas=u(t,"dom.behindCanvas",!1),this.inputKeyboard=u(t,"input.keyboard",!0),this.inputKeyboardEventTarget=u(t,"input.keyboard.target",window),this.inputKeyboardCapture=u(t,"input.keyboard.capture",[]),this.inputMouse=u(t,"input.mouse",!0),this.inputMouseEventTarget=u(t,"input.mouse.target",null),this.inputMouseCapture=u(t,"input.mouse.capture",!0),this.inputTouch=u(t,"input.touch",h.input.touch),this.inputTouchEventTarget=u(t,"input.touch.target",null),this.inputTouchCapture=u(t,"input.touch.capture",!0),this.inputActivePointers=u(t,"input.activePointers",1),this.inputSmoothFactor=u(t,"input.smoothFactor",0),this.inputWindowEvents=u(t,"input.windowEvents",!0),this.inputGamepad=u(t,"input.gamepad",!1),this.inputGamepadEventTarget=u(t,"input.gamepad.target",window),this.disableContextMenu=u(t,"disableContextMenu",!1),this.audio=u(t,"audio"),this.hideBanner=!1===u(t,"banner",null),this.hidePhaser=u(t,"banner.hidePhaser",!1),this.bannerTextColor=u(t,"banner.text","#ffffff"),this.bannerBackgroundColor=u(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=u(t,"fps",null);var i=u(t,"render",t);this.antialias=u(i,"antialias",!0),this.antialiasGL=u(i,"antialiasGL",!0),this.mipmapFilter=u(i,"mipmapFilter","LINEAR"),this.desynchronized=u(i,"desynchronized",!1),this.roundPixels=u(i,"roundPixels",!1),this.pixelArt=u(i,"pixelArt",1!==this.zoom),this.pixelArt&&(this.antialias=!1,this.roundPixels=!0),this.transparent=u(i,"transparent",!1),this.clearBeforeRender=u(i,"clearBeforeRender",!0),this.premultipliedAlpha=u(i,"premultipliedAlpha",!0),this.failIfMajorPerformanceCaveat=u(i,"failIfMajorPerformanceCaveat",!1),this.powerPreference=u(i,"powerPreference","default"),this.batchSize=u(i,"batchSize",4096),this.maxTextures=u(i,"maxTextures",-1),this.maxLights=u(i,"maxLights",10);var n=u(t,"backgroundColor",0);this.backgroundColor=g(n),0===n&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=u(t,"callbacks.preBoot",f),this.postBoot=u(t,"callbacks.postBoot",f),this.physics=u(t,"physics",{}),this.defaultPhysicsSystem=u(this.physics,"default",!1),this.loaderBaseURL=u(t,"loader.baseURL",""),this.loaderPath=u(t,"loader.path",""),this.loaderMaxParallelDownloads=u(t,"loader.maxParallelDownloads",32),this.loaderCrossOrigin=u(t,"loader.crossOrigin",void 0),this.loaderResponseType=u(t,"loader.responseType",""),this.loaderAsync=u(t,"loader.async",!0),this.loaderUser=u(t,"loader.user",""),this.loaderPassword=u(t,"loader.password",""),this.loaderTimeout=u(t,"loader.timeout",0),this.loaderWithCredentials=u(t,"loader.withCredentials",!1),this.installGlobalPlugins=[],this.installScenePlugins=[];var s=u(t,"plugins",null),r=p.DefaultScene;s&&(Array.isArray(s)?this.defaultPlugins=s:c(s)&&(this.installGlobalPlugins=l(s,"global",[]),this.installScenePlugins=l(s,"scene",[]),Array.isArray(s.default)?r=s.default:Array.isArray(s.defaultMerge)&&(r=r.concat(s.defaultMerge)))),this.defaultPlugins=r;var o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=u(t,"images.default",o+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=u(t,"images.missing",o+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),window&&(window.FORCE_WEBGL?this.renderType=a.WEBGL:window.FORCE_CANVAS&&(this.renderType=a.CANVAS))}});t.exports=s},function(t,e,i){t.exports={os:i(119),browser:i(120),features:i(174),input:i(731),audio:i(732),video:i(733),fullscreen:i(734),canvasFeatures:i(320)}},function(t,e,i){var n,s,r,o=i(26),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var i=new Image;i.onload=function(){var t=o.create(i,6,1).getContext("2d");if(t.globalCompositeOperation="multiply",t.drawImage(r,0,0),t.drawImage(i,2,0),!t.getImageData(2,0,1,1))return!1;var e=t.getImageData(2,0,1,1).data;o.remove(i),a.supportNewBlendModes=255===e[0]&&0===e[1]&&0===e[2]},i.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");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);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},function(t,e){t.exports=function(t){return 0<=(t%=2*Math.PI)?t:t+2*Math.PI}},function(t,e){t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return s*s+r*r}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),e-ir[0]&&(e=1),r[8]>r[3*e+e]&&(e=2),i=a[e],n=a[i],s=Math.sqrt(r[3*e+e]-r[3*i+i]-r[3*n+n]+1),h[e]=.5*s,s=.5/s,h[i]=(r[3*i+e]+r[3*e+i])*s,h[n]=(r[3*n+e]+r[3*e+n])*s,this.x=h[0],this.y=h[1],this.z=h[2],this.w=(r[3*n+i]-r[3*i+n])*s),this}});t.exports=d},function(t,e,a){var h=a(341),l=a(26),u=a(33),c=a(174);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===u.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==u.HEADLESS)if(e.renderType===u.CANVAS||e.renderType!==u.CANVAS&&!c.webGL){if(!c.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");e.renderType=u.CANVAS}else e.renderType=u.WEBGL;e.antialias||l.disableSmoothing();var i,n,s=t.scale.baseSize,r=s.width,o=s.height;e.canvas?(t.canvas=e.canvas,t.canvas.width=r,t.canvas.height=o):t.canvas=l.create(t,r,o,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||h.setCrisp(t.canvas),e.renderType!==u.HEADLESS&&(i=a(506),n=a(509),e.renderType===u.WEBGL?t.renderer=new n(t):(t.renderer=new i(t),t.context=t.renderer.gameContext))}},function(t,e){t.exports={setCrisp:function(e){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach(function(t){e.style["image-rendering"]=t}),e.style.msInterpolationMode="nearest-neighbor",e},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},function(t,e,i){var l=i(33);t.exports=function(t){var e,i,n,s,r,o,a,h=t.config;h.hideBanner||(e="WebGL",h.renderType===l.CANVAS?e="Canvas":h.renderType===l.HEADLESS&&(e="Headless"),i=h.audio,a=!(n=t.device.audio).webAudio||i&&i.disableWebAudio?i&&i.noAudio||!n.webAudio&&!n.audioData?"No Audio":"HTML5 Audio":"Web Audio",t.device.browser.ie?window.console&&console.log("Phaser v"+l.VERSION+" / https://phaser.io"):(r=[s=""],Array.isArray(h.bannerBackgroundColor)?(h.bannerBackgroundColor.forEach(function(t){s=s.concat("%c "),r.push("background: "+t),o=t}),r[r.length-1]="color: "+h.bannerTextColor+"; background: "+o):(s=s.concat("%c "),r.push("color: "+h.bannerTextColor+"; background: "+h.bannerBackgroundColor)),r.push("background: #fff"),h.gameTitle&&(s=s.concat(h.gameTitle),h.gameVersion&&(s=s.concat(" v"+h.gameVersion)),h.hidePhaser||(s=s.concat(" / "))),h.hidePhaser||(s=s.concat("Phaser v"+l.VERSION+" ("+e+" | "+a+")")),s=s.concat(" %c "+h.gameURL),r[0]=s,console.log.apply(console,r)))}},function(t,e,i){var n=i(0),s=i(6),r=i(1),o=i(344),a=new n({initialize:function(t,e){this.game=t,this.raf=new o,this.started=!1,this.running=!1,this.minFps=s(e,"min",5),this.targetFps=s(e,"target",60),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=s(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=s(e,"deltaHistory",10),this.panicMax=s(e,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=s(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;for(var e=this.framesThisSecond=0;ethis._min&&(r=n[i],r=Math.min(r,this._min)),n[i]=r,this.deltaIndex++,this.deltaIndex>s&&(this.deltaIndex=0);for(var a=o=0;athis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var h=o/this._target;this.callback(t,o,h),this.lastTime=t,this.frame++},tick:function(){this.step()},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running||(t&&(this.startTime+=-this.lastTime+(this.lastTime+window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step())},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.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0,this.target=0;var n=this;this.step=function t(){var e=window.performance.now();n.lastTime=n.tick,n.tick=e,n.callback(e),n.timeOutID=window.requestAnimationFrame(t)},this.stepTimeout=function t(){var e=Date.now(),i=Math.min(Math.max(2*n.target+n.tick-e,0),n.target);n.lastTime=n.tick,n.tick=e,n.callback(e),n.timeOutID=window.setTimeout(t,i)}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.target=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=s}});t.exports=r},function(t,e,i){var n=i(20);t.exports=function(t){var e,i=t.events;void 0!==document.hidden?e="visibilitychange":["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(n.HIDDEN):i.emit(n.VISIBLE)},!1),window.onblur=function(){i.emit(n.BLUR)},window.onfocus=function(){i.emit(n.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},function(t,e,i){var m=i(347),y=i(26),x=i(6);t.exports=function(t){var e=x(t,"data",[]),i=x(t,"canvas",null),n=x(t,"palette",m),s=x(t,"pixelWidth",1),r=x(t,"pixelHeight",s),o=x(t,"resizeCanvas",!0),a=x(t,"clearCanvas",!0),h=x(t,"preRender",null),l=x(t,"postRender",null),u=Math.floor(Math.abs(e[0].length*s)),c=Math.floor(Math.abs(e.length*r));i||(i=y.create2D(this,u,c),a=o=!1),o&&(i.width=u,i.height=c);var d=i.getContext("2d");a&&d.clearRect(0,0,u,c),h&&h(i,d);for(var f=0;fi.length-2?i.length-1:s+1],l=i[s>i.length-3?i.length-1:s+2];return e.set(u(r,o.x,a.x,h.x,l.x),u(r,o.y,a.y,h.y,l.y))},toJSON:function(){for(var t=[],e=0;ei.width?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE;if("number"==typeof window.orientation)return 0===window.orientation||180===window.orientation?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return s.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return s.ORIENTATION.LANDSCAPE}return tthis.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var e=this.listeners;window.removeEventListener("orientationchange",e.orientationChange,!1),window.removeEventListener("resize",e.windowResize,!1);["webkit","moz",""].forEach(function(t){document.removeEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.removeEventListener(t+"fullscreenerror",e.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",e.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===c.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===c.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=v},function(t,e,i){var n=i(17),s=i(0),r=i(93),o=i(3),a=new s({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=null),this._width=t,this._height=e,this._parent=n,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=n(t,0,this.maxWidth),this.minHeight=n(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=n(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=n(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=n(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=n(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 n=this.snapTo,s=0===e?1:t/e;return i&&this.aspectRatio>s||!i&&this.aspectRatios)&&(t=(e=r(e,n.y))*this.aspectRatio,0r.START&&n.settings.status<=r.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e=r.LOADING&&i.settings.status=r.x&&t=r.y&&e=r.x&&t=r.y&&e=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s>4,l[a++]=(15&i)<<4|n>>2,l[a++]=(3&n)<<6|63&s;return h}},function(t,e,i){var n=i(130),s=i(0),r=i(59),o=new s({Extends:n,initialize:function(t,e,i){if(void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),!this.audioBuffer)throw new Error('There is no audio asset with key "'+e+'" in the audio cache');this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,n.call(this,t,e,i)},play:function(t,e){return!!n.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(r.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime>>16,v=(65280&d)>>>8,m=255&d,l.strokeStyle="rgba("+g+","+v+","+m+","+u+")",l.lineWidth=p,y+=3;break;case x.FILL_STYLE:f=a[y+1],c=a[y+2],g=(16711680&f)>>>16,v=(65280&f)>>>8,m=255&f,l.fillStyle="rgba("+g+","+v+","+m+","+c+")",y+=2;break;case x.BEGIN_PATH:l.beginPath();break;case x.CLOSE_PATH:l.closePath();break;case x.FILL_PATH:o||l.fill();break;case x.STROKE_PATH:o||l.stroke();break;case x.FILL_RECT:o?l.rect(a[y+1],a[y+2],a[y+3],a[y+4]):l.fillRect(a[y+1],a[y+2],a[y+3],a[y+4]),y+=4;break;case x.FILL_TRIANGLE:l.beginPath(),l.moveTo(a[y+1],a[y+2]),l.lineTo(a[y+3],a[y+4]),l.lineTo(a[y+5],a[y+6]),l.closePath(),o||l.fill(),y+=6;break;case x.STROKE_TRIANGLE:l.beginPath(),l.moveTo(a[y+1],a[y+2]),l.lineTo(a[y+3],a[y+4]),l.lineTo(a[y+5],a[y+6]),l.closePath(),o||l.stroke(),y+=6;break;case x.LINE_TO:l.lineTo(a[y+1],a[y+2]),y+=2;break;case x.MOVE_TO:l.moveTo(a[y+1],a[y+2]),y+=2;break;case x.LINE_FX_TO:l.lineTo(a[y+1],a[y+2]),y+=5;break;case x.MOVE_FX_TO:l.moveTo(a[y+1],a[y+2]),y+=5;break;case x.SAVE:l.save();break;case x.RESTORE:l.restore();break;case x.TRANSLATE:l.translate(a[y+1],a[y+2]),y+=2;break;case x.SCALE:l.scale(a[y+1],a[y+2]),y+=2;break;case x.ROTATE:l.rotate(a[y+1]),y+=1;break;case x.GRADIENT_FILL_STYLE:y+=5;break;case x.GRADIENT_LINE_STYLE:y+=6;break;case x.SET_TEXTURE:y+=2}}l.restore()}}},function(t,e,i){var n=i(0),o=i(2),s=new n({initialize:function(t,e,i,n,s){var r;"object"==typeof t?(t=o(r=t,"x",0),e=o(r,"y",0),i=o(r,"power",0),n=o(r,"epsilon",100),s=o(r,"gravity",50)):(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===s&&(s=50)),this.x=t,this.y=e,this.active=!0,this._gravity=s,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i,n,s=this.x-t.x,r=this.y-t.y,o=s*s+r*r;0!==o&&(i=Math.sqrt(o),oe.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(0this._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=n},function(t,e){t.exports=function(t,e){for(var i=0;id.PI2?s=d.PI2:s<0&&(s=d.PI2+s%d.PI2);for(var a,h=[r+Math.cos(n)*i,o+Math.sin(n)*i];e<1;)a=s*e+n,h.push(r+Math.cos(a)*i,o+Math.sin(a)*i),e+=t;return a=s+n,h.push(r+Math.cos(a)*i,o+Math.sin(a)*i),h.push(r+Math.cos(n)*i,o+Math.sin(n)*i),this.pathIndexes=u(h),this.pathData=h,this}});t.exports=r},function(t,e,i){var n=i(0),s=i(1007),r=i(66),o=i(9),a=i(29),h=new n({Extends:a,Mixins:[s],initialize:function(t,e,i,n,s,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Curve",n),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(e,i),void 0!==s&&this.setFillStyle(s,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=[],n=this.geom.getPoints(e),s=0;st.right||e.rightt.bottom||e.bottome.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottomt.width*t.height)&&(e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(s.BUTTON_DOWN,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(s.BUTTON_UP,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=r},function(t,e,i){var a=i(451),h=i(452),n=i(0),l=i(11),u=i(3),s=new n({Extends:l,initialize:function(t,e){l.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],n=0;n=s;for(this.fixedStep||(n=.001*e,o=!0,this._elapsed=0),h=0;h=s;)this._elapsed-=s,this.step(n)}},step:function(t){for(var e,i=this.bodies.entries,n=i.length,s=0;sc)&&(d.xu))return this.separateCircle(t,e,s)}var f=!1,p=!1;s?(f=A(t,e,s,this.OVERLAP_BIAS),p=C(t,e,s,this.OVERLAP_BIAS)):this.forceX||Math.abs(this.gravity.y+t.gravity.y)=e.right||t.position.y>=e.bottom))},circleBodyIntersects:function(t,e){var i=p(t.center.x,e.left,e.right),n=p(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o;t.isParent&&void 0===t.physicsType&&(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var a=Array.isArray(t),h=Array.isArray(e);if(this._total=0,a||h)if(!a&&h)for(o=0;od.baseTileWidth&&(h-=a=(d.tileWidth-d.baseTileWidth)*e.scaleX,u+=a),d.tileHeight>d.baseTileHeight&&(c+=(d.tileHeight-d.baseTileHeight)*e.scaleY);var f=e.getTilesWithinWorldXY(h,l,u,c);return 0!==f.length&&this.collideSpriteVsTilesHandler(t,f,i,n,s,r,!0)},collideSpriteVsTilesHandler:function(t,e,i,n,s,r,o){for(var a,h,l=t.body,u={left:0,right:0,top:0,bottom:0},c=!1,d=0;de.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,r=this.blocked.right=!0),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,r=this.blocked.down=!0),r&&(this.blocked.none=!1),r},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this.updateCenter(),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n,s,r=this.gameObject;return!t&&r.frame&&(t=r.frame.realWidth),!e&&r.frame&&(e=r.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&&r.getCenter&&(n=(r.width-t)/2,s=(r.height-e)/2,this.offset.set(n,s)),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),0=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 0e._dx?r<(s=t.right-e.x)&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?s=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0,e.physicsType===o.STATIC_BODY&&(t.blocked.none=!1,t.blocked.right=!0),t.physicsType===o.STATIC_BODY&&(e.blocked.none=!1,e.blocked.left=!0)):t._dxe._dy?r<(s=t.bottom-e.y)&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?s=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0,e.physicsType===o.STATIC_BODY&&(t.blocked.none=!1,t.blocked.down=!0),t.physicsType===o.STATIC_BODY&&(e.blocked.none=!1,e.blocked.up=!0)):t._dy=t.minX&&e.maxY>=t.minY}function p(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,s){for(var r,o=[e,i];o.length;)(i=o.pop())-(e=o.pop())<=n||(r=e+Math.ceil((i-e)/n/2)*n,a(t,r,e,i,s),o.push(e,r,r,i))}n.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!l(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;sthis._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),o=p(i.children.splice(r,i.children.length-r));o.height=i.height,o.leaf=i.leaf,f(i,this.toBBox),f(o,this.toBBox),e?t[e-1].children.push(o):this._splitRoot(i,o)},_splitRoot:function(t,e){this.data=p([t,e]),this.data.height=t.height+1,this.data.leaf=!1,f(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){for(var n,s,r,o,a,h,l,u,c,d,f,p,g=a=1/0,v=e;v<=i-e;v++)n=m(t,0,v,this.toBBox),s=m(t,v,i,this.toBBox),l=n,u=s,p=f=d=c=void 0,c=Math.max(l.minX,u.minX),d=Math.max(l.minY,u.minY),f=Math.min(l.maxX,u.maxX),p=Math.min(l.maxY,u.maxY),r=Math.max(0,f-c)*Math.max(0,p-d),o=y(n)+y(s),r=t.right||e.position.y>=t.bottom)}},function(t,e,i){var n=i(56),s=i(0),r=i(51),o=i(48),a=i(3),h=new s({initialize:function(t,e){var i=e.displayWidth?e.displayWidth:64,n=e.displayHeight?e.displayHeight:64;this.world=t,this.gameObject=e,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-n*e.originY),this.width=i,this.height=n,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.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).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 n,s,r=this.gameObject;return!t&&r.frame&&(t=r.frame.realWidth),!e&&r.frame&&(e=r.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&&r.getCenter&&(n=r.displayWidth/2,s=r.displayHeight/2,this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(n-this.halfWidth,s-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y),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),0=r.layers.length){if(s.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}r=s.pop()}else{var o,a=r.layers[r.i];if(r.i++,"tilelayer"===a.type)if(a.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+a.name+"'");else{if(a.encoding&&"base64"===a.encoding){if(a.chunks)for(var h=0;h>>0;return n}},function(t,e,i){var h=i(2),l=i(231);t.exports=function(t){for(var e=[],i=[],n=l(t);n.i=n.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}n=i.pop()}else{var s,r,o,a=n.layers[n.i];n.i++,"imagelayer"===a.type?(s=h(a,"offsetx",0)+h(a,"startx",0),r=h(a,"offsety",0)+h(a,"starty",0),e.push({name:n.name+a.name,image:a.image,x:n.x+s+a.x,y:n.y+r+a.y,alpha:n.opacity*a.opacity,visible:n.visible&&a.visible,properties:h(a,"properties",{})})):"group"===a.type&&(o=l(t,a,n),i.push(n),n=o)}return e}},function(t,e,i){var x=i(105),T=i(486),w=i(232);t.exports=function(t){for(var e,i=[],n=[],s=null,r=0;r=this.firstgid&&t=n.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}n=i.pop()}else{var s,r=n.layers[n.i];if(n.i++,r.opacity*=n.opacity,r.visible=n.visible&&r.visible,"objectgroup"===r.type){r.name=n.name+r.name;for(var o=n.x+d(r,"startx",0)+d(r,"offsetx",0),a=n.y+d(r,"starty",0)+d(r,"offsety",0),h=[],l=0;ln&&(n=e.layer[r].width),e.layer[r].height>s&&(s=e.layer[r].height);var o=new h({width:n,height:s,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:a.WELTMEISTER});return o.layers=l(e,i),o.tilesets=u(e),o}},function(t,e,i){var d=i(103),f=i(74);t.exports=function(t,e){for(var i=[],n=0;nx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(1===m)for(h=0;hx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(2===m)for(h=f-1;0<=h;h--)for(l=0;lx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(3===m)for(h=f-1;0<=h;h--)for(l=d-1;0<=l;l--)!(a=v[h][l])||a.indexx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));return this.dirty[e]=!1,null===r&&(r=n.createVertexBuffer(o,s.STATIC_DRAW),this.vertexBuffer[e]=r),n.setVertexBuffer(r),i.setAttribPointers(),s.bufferSubData(s.ARRAY_BUFFER,0,o),this},batchTile:function(t,e,i,n,s,r,o){var a=i.getTileTextureCoordinates(e.index);if(!a)return t;var h=i.tileWidth,l=i.tileHeight,u=h/2,c=l/2,d=a.x/n,f=a.y/s,p=(a.x+h)/n,g=(a.y+l)/s,v=this._tempMatrix,m=-u,y=-c;e.flipX&&(h*=-1,m+=i.tileWidth),e.flipY&&(l*=-1,y+=i.tileHeight);var x=m+h,T=y+l;v.applyITRS(u+e.pixelX,c+e.pixelY,e.rotation,1,1);var w=L.getTintAppendFloatAlpha(16777215,r.alpha*this.alpha*e.alpha),b=v.getX(m,y),E=v.getY(m,y),_=v.getX(m,T),S=v.getY(m,T),A=v.getX(x,T),C=v.getY(x,T),M=v.getX(x,y),P=v.getY(x,y);r.roundPixels&&(b=Math.round(b),E=Math.round(E),_=Math.round(_),S=Math.round(S),A=Math.round(A),C=Math.round(C),M=Math.round(M),P=Math.round(P));var O=this.vertexViewF32[o],R=this.vertexViewU32[o];return O[++t]=b,O[++t]=E,O[++t]=d,O[++t]=f,O[++t]=0,O[++t]=0,R[++t]=w,O[++t]=_,O[++t]=S,O[++t]=d,O[++t]=g,O[++t]=0,O[++t]=0,R[++t]=w,O[++t]=A,O[++t]=C,O[++t]=p,O[++t]=g,O[++t]=0,O[++t]=0,R[++t]=w,O[++t]=b,O[++t]=E,O[++t]=d,O[++t]=f,O[++t]=0,O[++t]=0,R[++t]=w,O[++t]=A,O[++t]=C,O[++t]=p,O[++t]=g,O[++t]=0,O[++t]=0,R[++t]=w,O[++t]=M,O[++t]=P,O[++t]=p,O[++t]=f,O[++t]=0,O[++t]=0,R[++t]=w,this.vertexCount[o]+=6,t},setRenderOrder:function(t){if("string"==typeof t&&(t=["right-down","left-down","right-up","left-up"].indexOf(t)),0<=t&&t<4){this._renderOrder=t;for(var e=0;e=this.nextTick&&this.currentAnim.setFrame(this)}},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),e.setSizeToFrame(),e._originComponent&&(t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin()),e},updateFrame:function(t){var e,i=this.setCurrentFrame(t);this.isPlaying&&(t.setAlpha&&(i.alpha=t.alpha),e=this.currentAnim,i.emit(r.SPRITE_ANIMATION_KEY_UPDATE+e.key,e,t,i),i.emit(r.SPRITE_ANIMATION_UPDATE,e,t,i),3===this._pendingStop&&this._pendingStopValue===t&&this.currentAnim.completeAnimation(this))},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},setYoyo:function(t){return void 0===t&&(t=!1),this._yoyo=t,this.parent},getYoyo:function(){return this._yoyo},destroy:function(){this.animationManager.off(r.REMOVE_ANIMATION,this.remove,this),this.animationManager=null,this.parent=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null}});t.exports=o},function(t,e,i){var u=i(507),p=i(40),n=i(0),s=i(33),r=i(508),o=i(92),a=i(30),h=new n({initialize:function(t){this.game=t,this.type=s.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.config={clearBeforeRender:t.config.clearBeforeRender,backgroundColor:t.config.backgroundColor,resolution:t.config.resolution,antialias:t.config.antialias,roundPixels:t.config.roundPixels},this.gameCanvas=t.canvas;var e={alpha:t.config.transparent,desynchronized:t.config.desynchronized};this.gameContext=this.game.config.context?this.game.config.context:this.gameCanvas.getContext("2d",e),this.currentContext=this.gameContext,this.antialias=t.config.antialias,this.blendModes=r(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new a,this._tempMatrix2=new a,this._tempMatrix3=new a,this._tempMatrix4=new a,this.init()},init:function(){this.game.scale.on(o.RESIZE,this.onResize,this);var t=this.game.scale.baseSize;this.resize(t.width,t.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},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,n=this.height;t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),e.clearBeforeRender&&t.clearRect(0,0,i,n),e.transparent||(t.fillStyle=e.backgroundColor.rgba,t.fillRect(0,0,i,n)),t.save(),this.drawCount=0},render:function(t,e,i,n){var s=e.list,r=s.length,o=n._cx,a=n._cy,h=n._cw,l=n._ch,u=n.renderToTexture?n.context:t.sys.context;u.save(),this.game.scene.customViewports&&(u.beginPath(),u.rect(o,a,h,l),u.clip()),this.currentContext=u;var c=n.mask;c&&c.preRenderCanvas(this,null,n._maskCamera),n.transparent||(u.fillStyle=n.backgroundColor.rgba,u.fillRect(o,a,h,l)),u.globalAlpha=n.alpha,u.globalCompositeOperation="source-over",this.drawCount+=s.length,n.renderToTexture&&n.emit(p.PRE_RENDER,n),n.matrix.copyToContext(u);for(var d=0;d>>0;if("function"!=typeof t)throw new TypeError;for(var n=2<=arguments.length?arguments[1]:void 0,s=0;sthis.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.zoom<.001&&(e.zoom=.001)))},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},function(t,e,i){t.exports={Camera:i(297),BaseCamera:i(91),CameraManager:i(703),Effects:i(305),Events:i(40)}},function(t,e){t.exports="cameradestroy"},function(t,e){t.exports="camerafadeincomplete"},function(t,e){t.exports="camerafadeinstart"},function(t,e){t.exports="camerafadeoutcomplete"},function(t,e){t.exports="camerafadeoutstart"},function(t,e){t.exports="cameraflashcomplete"},function(t,e){t.exports="cameraflashstart"},function(t,e){t.exports="camerapancomplete"},function(t,e){t.exports="camerapanstart"},function(t,e){t.exports="postrender"},function(t,e){t.exports="prerender"},function(t,e){t.exports="camerarotatecomplete"},function(t,e){t.exports="camerarotatestart"},function(t,e){t.exports="camerashakecomplete"},function(t,e){t.exports="camerashakestart"},function(t,e){t.exports="camerazoomcomplete"},function(t,e){t.exports="camerazoomstart"},function(t,e,i){var n=i(17),s=i(0),l=i(40),r=new s({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,n,s,r,o,a){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=!1),void 0===o&&(o=null),void 0===a&&(a=this.camera.scene),!r&&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=n,this.blue=s,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=o,this._onUpdateScope=a;var h=t?l.FADE_OUT_START:l.FADE_IN_START;return this.camera.emit(h,this.camera,this,e,i,n,s),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsedthis.source?Math.abs(this.destination-this.source):Math.abs(this.destination+h)-this.source)<(u=this.source>this.destination?Math.abs(this.source-this.destination):Math.abs(this.source+h)-this.destination)?this.clockwise=!0:uMath.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},function(t,e,i){var n=i(121);t.exports=function(){return n(-Math.PI,Math.PI)}},function(t,e,i){var n=i(121);t.exports=function(){return n(-180,180)}},function(t,e,i){var n=i(323);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(13);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(e>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return 2.3283064365386963e-10*((this.n=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;e=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}s++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getTangentAt(h,e)}s++}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 r([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 o(t.x,t.y)):this.add(new o(t,e))},toJSON:function(){for(var t=[],e=0;e>16&255,g:t>>8&255,b:255&t,a:255};return 16777215>>24),e}},function(t,e,i){var h=i(31),l=i(356);t.exports=function(t,e,i){var n,s,r=i,o=i,a=i;return 0!==e&&(r=l(s=2*i-(n=i<.5?i*(1+e):i+e-i*e),n,t+1/3),o=l(s,n,t),a=l(s,n,t-1/3)),(new h).setGLTo(r,o,a,1)}},function(t,e,i){var s=i(171);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}},function(t,e,i){function o(t,e,i,n,s,r,o,a){void 0===o&&(o=100),void 0===a&&(a=0);var h=a/o;return{r:l(t,n,h),g:l(e,s,h),b:l(i,r,h)}}var l=i(118);t.exports={RGBWithRGB:o,ColorWithRGB:function(t,e,i,n,s,r){return void 0===s&&(s=100),void 0===r&&(r=0),o(t.r,t.g,t.b,e,i,n,s,r)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),o(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(177),s=i(31);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new s(n(t,e),n(t,e),n(t,e))}},function(t,e,i){var r=i(355);t.exports=function(t,e,i,n,s){return void 0===n&&(n=255),void 0===s&&(s="#"),"#"===s?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1):"0x"+r(n)+r(t)+r(e)+r(i)}},function(t,e,i){t.exports={BitmapMask:i(282),GeometryMask:i(283)}},function(t,e,i){var n={AddToDOM:i(124),DOMContentLoaded:i(357),GetScreenOrientation:i(358),GetTarget:i(363),ParseXML:i(364),RemoveFromDOM:i(184),RequestAnimationFrame:i(344)};t.exports=n},function(t,e,i){t.exports={EventEmitter:i(823)}},function(t,e,i){var n=i(0),s=i(11),r=i(23),o=new n({Extends:s,initialize:function(){s.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",o,"events"),t.exports=o},function(t,e,i){var n=i(124),s=i(293),r=i(296),o=i(26),a=i(0),h=i(318),l=i(825),u=i(340),c=i(115),d=i(342),f=i(319),p=i(357),g=i(11),v=i(20),m=i(365),y=i(23),x=i(370),T=i(371),w=i(373),b=i(123),E=i(376),_=i(343),S=i(345),A=i(380),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 g,this.anims=new s(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=f,this.scale=new T(this,this.config),this.sound=null,this.sound=A.create(this),this.loop=new _(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),n(this.canvas,this.config.parent),this.textures.once(b.READY,this.texturesReady,this),this.events.emit(v.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(v.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)),S(this);var t=this.events;t.on(v.HIDDEN,this.onHidden,this),t.on(v.VISIBLE,this.onVisible,this),t.on(v.BLUR,this.onBlur,this),t.on(v.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e);var n=this.renderer;n.preRender(),i.emit(v.PRE_RENDER,n,t,e),this.scene.render(n),n.postRender(),i.emit(v.POST_RENDER,n,t,e)},headlessStep:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e),i.emit(v.PRE_RENDER),i.emit(v.POST_RENDER)},onHidden:function(){this.loop.pause(),this.events.emit(v.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(v.RESUME)},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(v.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},function(t,e,i){var n=i(124);t.exports=function(t){var e,i=t.config;i.parent&&i.domCreateContainer&&((e=document.createElement("div")).style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: none;","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=e,n(e,i.parent))}},function(t,e){t.exports="boot"},function(t,e){t.exports="destroy"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameout"},function(t,e){t.exports="gameover"},function(t,e){t.exports="gameobjectdown"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameobjectmove"},function(t,e){t.exports="gameobjectout"},function(t,e){t.exports="gameobjectover"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="wheel"},function(t,e){t.exports="gameobjectup"},function(t,e){t.exports="gameobjectwheel"},function(t,e){t.exports="boot"},function(t,e){t.exports="process"},function(t,e){t.exports="update"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointerdownoutside"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="pointerupoutside"},function(t,e){t.exports="wheel"},function(t,e){t.exports="pointerlockchange"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="start"},function(t,e){t.exports="update"},function(t,e){t.exports=function(t){if(!t)return window.innerHeight;var e=Math.abs(window.orientation),i={w:0,h:0},n=document.createElement("div");return n.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(n),i.w=90===e?n.offsetHeight:window.innerWidth,i.h=90===e?window.innerWidth:n.offsetHeight,document.documentElement.removeChild(n),n=null,90!==Math.abs(window.orientation)?i.h:i.w}},function(t,e){t.exports="addfile"},function(t,e){t.exports="complete"},function(t,e){t.exports="filecomplete"},function(t,e){t.exports="filecomplete-"},function(t,e){t.exports="loaderror"},function(t,e){t.exports="load"},function(t,e){t.exports="fileprogress"},function(t,e){t.exports="postprocess"},function(t,e){t.exports="progress"},function(t,e){t.exports="start"},function(t,e,i){var r=i(2),o=i(187);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=r(t.settings,"physics",!1);if(e||i){var n=[];if(e&&n.push(o(e+"Physics")),i)for(var s in i)s=o(s.concat("Physics")),-1===n.indexOf(s)&&n.push(s);return n}}},function(t,e,i){var n=i(2);t.exports=function(t){var e=t.plugins.getDefaultScenePlugins(),i=n(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},function(t,e,i){t.exports={game:"game",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"}},function(t,e){t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var s=i.getElementsByTagName("SubTexture"),r=0;r=t.length)throw new Error("Supplied index out of bounds");return n!==i&&(t.splice(n,1),t.splice(i,0,e)),e}},function(t,e){t.exports=function(t,e){var i,n,s=t.indexOf(e);return-1!==s&&st.length-1)throw new Error("Index out of bounds");var s=r(t,e);return i&&i.call(n,s),s}},function(t,e,i){var l=i(68);t.exports=function(t,e,i,n,s){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===s&&(s=t),l(t,e,i)){var r=i-e,o=t.splice(e,r);if(n)for(var a=0;a?@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"}},function(t,e,i){var T=i(6);t.exports=function(t,e){var i=e.width,n=e.height,s=Math.floor(i/2),r=Math.floor(n/2),o=T(e,"chars","");if(""!==o){var a=T(e,"image",""),h=T(e,"offset.x",0),l=T(e,"offset.y",0),u=T(e,"spacing.x",0),c=T(e,"spacing.y",0),d=T(e,"lineSpacing",0),f=T(e,"charsPerRow",null);null===f&&(f=t.sys.textures.getFrame(a).width/i)>o.length&&(f=o.length);for(var p=h,g=l,v={retroFont:!0,font:a,size:i,lineHeight:n+d,chars:{}},m=0,y=0;yr.vertexCapacity&&r.flush();for(var g=r.setGameObject(e),v=r.vertexViewF32,m=r.vertexViewU32,y=r.vertexCount*r.vertexComponentCount-1,x=0,T=e.tintFill,w=0;w=i&&t.x<=n&&t.y>=s&&t.y<=r}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===r&&(r=0),!(e>t.right+r||it.bottom+r||s=n&&(p.push(v),f=v)}var m=o[o.length-1];return y(f,m)i&&(i=a.x),a.xs&&(s=a.y),a.yn(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)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){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}},function(t,e,i){var r=i(9);t.exports=function(t,e,i,n,s){return void 0===s&&(s=new r),s.setTo(Math.min(t,i),Math.min(e,n),Math.abs(t-i),Math.abs(e-n))}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.centerX,e.y=t.centerY,e}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var r=i(173);t.exports=function(t,e,i){var n=t.centerX,s=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),r(t,n,s)}},function(t,e,i){var n=i(9),s=i(137);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(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}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){var a=i(4),h=i(39);t.exports=function(t,e,i){void 0===i&&(i=new a),e=h(e);var n=Math.sin(e),s=Math.cos(e),r=0=s||0=t.downTime+n)&&(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;it._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,n=0;n'),i.push(''),i.push(''),i.push(this.xhrLoader.responseText),i.push(""),i.push(""),i.push("");var n=[i.join("\n")],s=this;try{var r=new window.Blob(n,{type:"image/svg+xml;charset=utf-8"})}catch(t){return s.state=o.FILE_ERRORED,void s.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){l.revokeObjectURL(s.data),s.onProcessComplete()},this.data.onerror=function(){l.revokeObjectURL(s.data),s.onProcessError()},l.createObjectURL(this.data,r,"image/svg+xml")},addToCache:function(){var t=this.cache.addImage(this.key,this.data);this.pendingDestroy(t)}});s.register("htmlTexture",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;re.deltaAbsY()?g=-1:e.deltaAbsX()i&&s<(o=t.right-i)&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:c(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):0i&&s<(o=t.bottom-i)&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:c(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):0=n[2];if("^"===i.operator)return 0=i.number:0=n[2]:r[2]===n[2]}return t===e||"*"===t}},function(t,e,i){var n={};t.exports=n;var s=i(152),r=(i(225),i(42));n.create=function(t){var e=s.create(),i={label:"World",gravity:{x:0,y:1,scale:.001},bounds:{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}};return r.extend(e,i,t)}},function(t,e,i){var y={};t.exports=y;var a=i(474),n=i(516),r=i(42);y.create=function(t){var e={controller:y,detector:n.collisions,buckets:{},pairs:{},pairsList:[],bucketWidth:48,bucketHeight:48};return r.extend(e,t)},y.update=function(t,e,i,n){for(var s,r,o,a=i.world,h=t.buckets,l=!1,u=i.metrics,c=u.broadphaseTests=0;ca.bounds.max.x||d.bounds.max.ya.bounds.max.y)){var f=y._getRegion(t,d);if(!d.region||f.id!==d.region.id||n){u.broadphaseTests+=1,d.region&&!n||(d.region=f);for(var p=y._regionUnion(f,d.region),g=p.startCol;g<=p.endCol;g++)for(s=p.startRow;s<=p.endRow;s++){r=h[o=y._getBucketId(g,s)];var v=g>=f.startCol&&g<=f.endCol&&s>=f.startRow&&s<=f.endRow,m=g>=d.region.startCol&&g<=d.region.endCol&&s>=d.region.startRow&&s<=d.region.endRow;!v&&m&&m&&r&&y._bucketRemoveBody(t,r,d),(d.region===f||v&&!m||n)&&(r=r||y._createBucket(h,o),y._bucketAddBody(t,r,d))}d.region=f,l=!0}}}l&&(t.pairsList=y._createActivePairsList(t))},y.clear=function(t){t.buckets={},t.pairs={},t.pairsList=[]},y._regionUnion=function(t,e){var i=Math.min(t.startCol,e.startCol),n=Math.max(t.endCol,e.endCol),s=Math.min(t.startRow,e.startRow),r=Math.max(t.endRow,e.endRow);return y._createRegion(i,n,s,r)},y._getRegion=function(t,e){var i=e.bounds,n=Math.floor(i.min.x/t.bucketWidth),s=Math.floor(i.max.x/t.bucketWidth),r=Math.floor(i.min.y/t.bucketHeight),o=Math.floor(i.max.y/t.bucketHeight);return y._createRegion(n,s,r,o)},y._createRegion=function(t,e,i,n){return{id:t+","+e+","+i+","+n,startCol:t,endCol:e,startRow:i,endRow:n}},y._getBucketId=function(t,e){return"C"+t+"R"+e},y._createBucket=function(t,e){return t[e]=[]},y._bucketAddBody=function(t,e,i){for(var n=0;nl._pairMaxIdleLife&&a.push(h);for(h=0;hu.friction*u.frictionStatic*R*i&&(F=M,L=U.clamp(u.friction*P*i,-F,F));var k,D,I=X.cross(w,p),B=X.cross(b,p),N=m/(d.inverseMass+f.inverseMass+d.inverseInertia*I*I+f.inverseInertia*B*B);O*=N,L*=N,A<0&&A*A>Y._restingThresh*i?x.normalImpulse=0:(k=x.normalImpulse,x.normalImpulse=Math.min(x.normalImpulse+O,0),O=x.normalImpulse-k),C*C>Y._restingThreshTangent*i?x.tangentImpulse=0:(D=x.tangentImpulse,x.tangentImpulse=U.clamp(x.tangentImpulse+L,-F,F),L=x.tangentImpulse-D),n.x=p.x*O+g.x*L,n.y=p.y*O+g.y*L,d.isStatic||d.isSleeping||(d.positionPrev.x+=n.x*d.inverseMass,d.positionPrev.y+=n.y*d.inverseMass,d.anglePrev+=X.cross(w,n)*d.inverseInertia),f.isStatic||f.isSleeping||(f.positionPrev.x-=n.x*f.inverseMass,f.positionPrev.y-=n.y*f.inverseMass,f.anglePrev-=X.cross(b,n)*f.inverseInertia)}}}}},function(t,e,i){t.exports={BasePlugin:i(475),DefaultPlugins:i(180),PluginCache:i(23),PluginManager:i(370),ScenePlugin:i(1311)}},function(t,e,i){var n=i(475),s=i(0),r=i(22),o=new s({Extends:n,initialize:function(t,e){n.call(this,e),this.scene=t,this.systems=t.sys,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},function(t,e,i){var n=i(19),s=i(183),r=n(!1,r={Center:i(359),Events:i(92),Orientation:i(360),ScaleManager:i(371),ScaleModes:i(361),Zoom:i(362)},s.CENTER);r=n(!1,r,s.ORIENTATION),r=n(!1,r,s.SCALE_MODE),r=n(!1,r,s.ZOOM),t.exports=r},function(t,e,i){var n=i(127),s=i(19)(!1,s={Events:i(22),SceneManager:i(373),ScenePlugin:i(1314),Settings:i(375),Systems:i(186)},n);t.exports=s},function(t,e,i){var n=i(17),s=i(0),a=i(22),h=i(2),r=i(23),o=new s({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(a.BOOT,this.boot,this),t.sys.events.on(a.START,this.pluginStart,this)},boot:function(){this.systems.events.once(a.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(a.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=h(t,"target",!1),i=this.manager.getScene(e);if(!e||!this.checkValidTransition(i))return!1;var n=h(t,"duration",1e3);this._elapsed=0,this._target=i,this._duration=n,this._willSleep=h(t,"sleep",!1),this._willRemove=h(t,"remove",!1);var s=h(t,"onUpdate",null);s&&(this._onUpdate=s,this._onUpdateScope=h(t,"onUpdateScope",this.scene));var r=h(t,"allowInput",!1);this.settings.transitionAllowInput=r;var o=i.sys.settings;return o.isTransition=!0,o.transitionFrom=this.scene,o.transitionDuration=n,o.transitionAllowInput=r,h(t,"moveAbove",!1)?this.manager.moveAbove(this.key,e):h(t,"moveBelow",!1)&&this.manager.moveBelow(this.key,e),i.sys.isSleeping()?i.sys.wake(h(t,"data")):this.manager.start(e,h(t,"data")),this.systems.events.emit(a.TRANSITION_OUT,i,n),this.systems.events.on(a.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=n(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(a.UPDATE,this.step,this),t.events.emit(a.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,n){return this.manager.add(t,e,i,n)},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 n=this.manager.getScene(e);return n&&n.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)},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(a.SHUTDOWN,this.shutdown,this),t.off(a.POST_UPDATE,this.step,this),t.off(a.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(a.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});r.register("ScenePlugin",o,"scenePlugin"),t.exports=o},function(t,e,i){t.exports={List:i(131),Map:i(167),ProcessQueue:i(192),RTree:i(471),Set:i(135),Size:i(372)}},function(t,e,i){var n=i(19),s=i(1317),r=n(!1,r={CanvasTexture:i(377),Events:i(123),FilterMode:s,Frame:i(95),Parsers:i(379),Texture:i(188),TextureManager:i(376),TextureSource:i(378)},s);t.exports=r},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){t.exports={Components:i(143),Parsers:i(1348),Formats:i(32),ImageCollection:i(486),ParseToTilemap:i(233),Tile:i(74),Tilemap:i(495),TilemapCreator:i(1362),TilemapFactory:i(1363),Tileset:i(105),LayerData:i(103),MapData:i(104),ObjectLayer:i(489),DynamicTilemapLayer:i(496),StaticTilemapLayer:i(497)}},function(t,e,i){var p=i(24),g=i(52);t.exports=function(t,e,i,n,s,r,o,a){t<0&&(t=0),e<0&&(e=0),void 0===o&&(o=!0);for(var h=p(t,e,i,n,null,a),l=s-t,u=r-e,c=0;c=t&&l.index<=e&&u(l,i)}n&&c(0,0,s.width,s.height,s)}}},function(t,e,i){var a=i(73),h=i(52),l=i(228);t.exports=function(t,e,i,n){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var s=0;s=s.delay&&(n=s.elapsed-s.delay,s.elapsed=s.delay,!s.hasDispatched&&s.callback&&(s.hasDispatched=!0,s.callback.apply(s.callbackScope,s.args)),0>2],s+=o[(3&i[r])<<4|i[r+1]>>4],s+=o[(15&i[r+1])<<2|i[r+2]>>6],s+=o[63&i[r+2]];return n%3==2?s=s.substring(0,s.length-1)+"=":n%3==1&&(s=s.substring(0,s.length-2)+"=="),s}},function(t,e,i){t.exports={Clone:i(67),Extend:i(19),GetAdvancedValue:i(15),GetFastValue:i(2),GetMinMaxValue:i(1388),GetValue:i(6),HasAll:i(1389),HasAny:i(407),HasValue:i(109),IsPlainObject:i(7),Merge:i(128),MergeRight:i(1390),Pick:i(487),SetValue:i(427)}},function(t,e,i){var o=i(6),a=i(17);t.exports=function(t,e,i,n,s){void 0===s&&(s=i);var r=o(t,e,s);return a(r,i,n)}},function(t,e){t.exports=function(t,e){for(var i=0;ii[e][0])&&(e=n);return!_(P(t,e-1),P(t,e),P(t,e+1))&&(function(t){for(var e=[],i=t.length,n=0;n!==i;n++)e.push(t.pop());for(n=0;n!==i;n++)t[n]=e[n]}(t),!0)}};var u=[],c=[];function M(t,e){var i=e[0]-t[0],n=e[1]-t[1];return i*i+n*n}function P(t,e){var i=t.length;return t[e<0?e%i+i:e%i]}function O(t,e,i,n){for(var s=i;sn.deltaMax?n.deltaMax:e)/n.delta,n.delta=e),0!==n.timeScalePrev&&(r*=s.timeScale/n.timeScalePrev),0===s.timeScale&&(r=0),n.timeScalePrev=s.timeScale,n.correction=r,n.frameCounter+=1,1e3<=t-n.counterTimestamp&&(n.fps=n.frameCounter*((t-n.counterTimestamp)/1e3),n.counterTimestamp=t,n.frameCounter=0),T.update(i,e,r))},step:function(t,e){T.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!==u.get(this.localWorld,e.id,e.type)},getAllBodies:function(){return u.allBodies(this.localWorld)},getAllConstraints:function(){return u.allConstraints(this.localWorld)},getAllComposites:function(){return u.allComposites(this.localWorld)},postUpdate:function(){var t,e,i,n;this.drawDebug&&(t=this.debugConfig,e=this.engine,i=this.debugGraphic,n=u.allBodies(this.localWorld),this.debugGraphic.clear(),t.showBroadphase&&e.broadphase.controller&&this.renderGrid(e.broadphase,i,t.broadphaseColor,.5),t.showBounds&&this.renderBodyBounds(n,i,t.boundsColor,.5),(t.showBody||t.showStaticBody)&&this.renderBodies(n),t.showJoint&&this.renderJoints(),(t.showAxes||t.showAngleIndicator)&&this.renderBodyAxes(n,i,t.showAxes,t.angleColor,.5),t.showVelocity&&this.renderBodyVelocity(n,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,n){e.lineStyle(1,i,n);for(var s=y.keys(t.buckets),r=0;re.max.x?i=e.min.x-t.max.x:t.max.xe.max.y?n=e.min.y-t.max.y:t.max.y=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},function(t,e){t.exports={getTintFromFloats:function(t,e,i,n){return((255&(255*n|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]},getComponentCount:function(t,e){for(var i=0,n=0;nr.width&&(i=Math.max(r.width-t,0)),e+n>r.height&&(n=Math.max(r.height-e,0));for(var l=[],u=e;uthis.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},function(t,e,i){var n=i(13);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e,i){t.exports={DESTROY:i(651),FADE_IN_COMPLETE:i(652),FADE_IN_START:i(653),FADE_OUT_COMPLETE:i(654),FADE_OUT_START:i(655),FLASH_COMPLETE:i(656),FLASH_START:i(657),PAN_COMPLETE:i(658),PAN_START:i(659),POST_RENDER:i(660),PRE_RENDER:i(661),ROTATE_COMPLETE:i(662),ROTATE_START:i(663),SHAKE_COMPLETE:i(664),SHAKE_START:i(665),ZOOM_COMPLETE:i(666),ZOOM_START:i(667)}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.fillColor,r=n||e.fillAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.fillStyle="rgba("+o+","+a+","+h+","+r+")"}},function(t,e){var h={};t.exports=h,function(){h._nextId=0,h._seed=0,h._nowStartTime=+new Date,h.extend=function(t,e){for(var i,n="boolean"==typeof e?(i=2,e):(i=1,!0),s=i;s=e&&t.y<=i&&t.y+t.height>=i)}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.strokeColor,r=n||e.strokeAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.strokeStyle="rgba("+o+","+a+","+h+","+r+")",t.lineWidth=e.lineWidth}},function(t,e){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}},function(t,e,i){var d=i(148),f=i(24);t.exports=function(t,e,i,n,s){for(var r,o,a,h,l=f(t,e,i,n,null,s),u=0;u=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}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e,i){t.exports={COMPLETE:i(899),DECODED:i(900),DECODED_ALL:i(901),DESTROY:i(902),DETUNE:i(903),GLOBAL_DETUNE:i(904),GLOBAL_MUTE:i(905),GLOBAL_RATE:i(906),GLOBAL_VOLUME:i(907),LOOP:i(908),LOOPED:i(909),MUTE:i(910),PAUSE_ALL:i(911),PAUSE:i(912),PLAY:i(913),RATE:i(914),RESUME_ALL:i(915),RESUME:i(916),SEEK:i(917),STOP_ALL:i(918),STOP:i(919),UNLOCKED:i(920),VOLUME:i(921)}},function(t,e,i){var n=i(0),h=i(18),l=i(21),s=i(8),u=i(2),c=i(6),d=i(7),r=new n({Extends:l,initialize:function(t,e,i,n,s){var r,o="json";d(e)&&(e=u(r=e,"key"),i=u(r,"url"),n=u(r,"xhrSettings"),o=u(r,"extension",o),s=u(r,"dataKey",s));var a={type:"json",cache:t.cacheManager.json,extension:o,responseType:"text",key:e,url:i,xhrSettings:n,config:s};l.call(this,t,a),d(i)&&(this.data=s?c(i,s):i,this.state=h.FILE_POPULATED)},onProcess:function(){var t,e;this.state!==h.FILE_POPULATED&&(this.state=h.FILE_PROCESSING,t=JSON.parse(this.xhrLoader.responseText),e=this.config,this.data="string"==typeof e?c(t,e,t):t),this.onProcessComplete()}});s.register("json",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&o=n.x&&n.x>=u&&s!==n.x&&T(ri.x||n.x===i.x&&function(t,e){return w(t.prev,t,e.prev)<0&&w(e.next,t,t.next)<0}(i,n)))&&(i=n,d=h)),n=n.next,n!==l;);return i}(t,e))&&(i=E(e,t),v(e,e.next),v(i,i.next))}}(l[s],i),i=v(i,i.next);return i}(t,e,d,i)),t.length>80*i){n=r=t[0],s=o=t[1];for(var p=i;pr.x?s.x>o.x?s.x:o.x:r.x>o.x?r.x:o.x,u=s.y>r.y?s.y>o.y?s.y:o.y:r.y>o.y?r.y:o.y,c=x(a,h,e,i,n),d=x(l,u,e,i,n),f=t.prevZ,p=t.nextZ;for(;f&&f.z>=c&&p&&p.z<=d;){if(f!==t.prev&&f!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,f.x,f.y)&&0<=w(f.prev,f,f.next))return!1;if(f=f.prevZ,p!==t.prev&&p!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&0<=w(p.prev,p,p.next))return!1;p=p.nextZ}for(;f&&f.z>=c;){if(f!==t.prev&&f!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,f.x,f.y)&&0<=w(f.prev,f,f.next))return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&0<=w(p.prev,p,p.next))return!1;p=p.nextZ}return!0}(t,n,s,r):function(t){var e=t.prev,i=t,n=t.next;if(0<=w(e,i,n))return!1;var s=t.next.next;for(;s!==t.prev;){if(T(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&0<=w(s.prev,s,s.next))return!1;s=s.next}return!0}(t))e.push(a.i/i),e.push(t.i/i),e.push(h.i/i),d(t),t=h.next,l=h.next;else if((t=h)===l){o?1===o?m(t=function(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!u(s,r)&&c(s,n,n.next,r)&&b(s,r)&&b(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),d(n),d(n.next),n=t=r),n=n.next}while(n!==t);return v(n)}(v(t),e,i),e,i,n,s,r,2):2===o&&function(t,e,i,n,s,r){var o=t;do{for(var a=o.next.next;a!==o.prev;){if(o.i!==a.i&&function(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&&c(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&(b(t,e)&&b(e,t)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;for(;i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next,i!==t;);return n}(t,e)&&(w(t.prev,t,e.prev)||w(t,e.prev,e))||u(t,e)&&0=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function l(t){return 0=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},function(t,e,i){var n=i(0),s=i(18),c=i(21),r=i(8),d=i(2),f=i(7),o=new n({Extends:c,initialize:function t(e,i,n,s,r){var o,a,h="png";f(i)&&(i=d(a=i,"key"),n=d(a,"url"),o=d(a,"normalMap"),s=d(a,"xhrSettings"),h=d(a,"extension",h),r=d(a,"frameConfig")),Array.isArray(n)&&(o=n[1],n=n[0]);var l,u={type:"image",cache:e.textureManager,extension:h,responseType:"blob",key:i,url:n,xhrSettings:s,config:r};c.call(this,e,u),o&&((l=new t(e,this.key,o,s,r)).type="normalMap",this.setLink(l),e.addFile(l))},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){c.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){c.revokeObjectURL(t.data),t.onProcessError()},c.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var t,e=this.linkFile;e&&e.state===s.FILE_COMPLETE?(t="image"===this.type?this.cache.addImage(this.key,this.data,e.data):this.cache.addImage(e.key,e.data,this.data),this.pendingDestroy(t),e.pendingDestroy(t)):e||(t=this.cache.addImage(this.key,this.data),this.pendingDestroy(t))}});r.register("image",function(t,e,i){if(Array.isArray(t))for(var n=0;nthis.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=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.tileToWorldX(this.x,t):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.tileToWorldY(this.y,t)-(this.height-this.baseHeight)*e.scaleY:this.y*this.baseHeight-(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 r),e.x=this.getLeft(),e.y=this.getTop(),e.width=this.getRight()-e.x,e.height=this.getBottom()-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},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=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){return 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),this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){return void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===s&&(s=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,s&&this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y),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,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight,this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||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=o},function(t,e,i){var n=i(0),r=i(12),o=i(14),s=i(976),a=new n({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,s],initialize:function(t,e,i,n,s){o.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new r.Animation(this),this.setTexture(n,s),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()},preUpdate:function(t,e){this.anims.update(t,e)},play:function(t,e,i){return this.anims.play(t,e,i),this},toJSON:function(){return r.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=a},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e,i){var n=new(i(0))({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},clone:function(){return new n(this.x,this.y,this.z)},crossVectors:function(t,e){var i=t.x,n=t.y,s=t.z,r=e.x,o=e.y,a=e.z;return this.x=n*a-s*o,this.y=s*r-i*a,this.z=i*o-n*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},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||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,n=t.z-this.z||0;return Math.sqrt(e*e+i*i+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return e*e+i*i+n*n},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,n=t*t+e*e+i*i;return 0=t.length)){for(var i=t.length-1,n=t[e],s=e;sh||a.y>l)?(u=Math.max(a.x,e),c=Math.max(a.y,i),b=d=Math.min(a.r,h)-u,E=f=Math.min(a.b,l)-c,T=r?p+(v-(u-a.x)-d):p+(u-a.x),w=o?g+(m-(c-a.y)-f):g+(c-a.y),e=u,i=c,n=d,s=f):E=b=w=T=0):(r&&(T=p+(v-e-n)),o&&(w=g+(m-i-s)));var _=this.source.width,A=this.source.height;return t.u0=Math.max(0,T/_),t.v0=Math.max(0,w/A),t.u1=Math.min(1,(T+b)/_),t.v1=Math.min(1,(w+E)/A),t.x=e,t.y=i,t.cx=T,t.cy=w,t.cw=b,t.ch=E,t.width=n,t.height=s,t.flipX=r,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,n,s,r){var o=this.data.drawImage;return o.width=t,o.height=e,this.u0=i,this.v0=n,this.u1=s,this.v1=r,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.width=i,s.height=n;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+n)/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 r(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=s(!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=r},function(t,e,i){var n=i(0),s=i(97),r=i(398),o=i(399),a=i(48),h=i(163),l=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=a.ELLIPSE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(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,n){return this.x=t,this.y=e,this.width=i,this.height=n,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},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){var B=i(245),n=i(0),r=i(91),N=i(2),Y=i(6),s=i(7),X=i(392),o=i(139),a=i(75),h=new n({initialize:function(t,e,i){i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?s(e[0])&&(i=e,e=null):s(e)&&(i=e,e=null),this.scene=t,this.children=new o,this.isParent=!0,this.type="Group",this.classType=N(i,"classType",a),this.name=N(i,"name",""),this.active=N(i,"active",!0),this.maxSize=N(i,"maxSize",-1),this.defaultKey=N(i,"defaultKey",null),this.defaultFrame=N(i,"defaultFrame",null),this.runChildUpdate=N(i,"runChildUpdate",!1),this.createCallback=N(i,"createCallback",null),this.removeCallback=N(i,"removeCallback",null),this.createMultipleCallback=N(i,"createMultipleCallback",null),this.internalCreateCallback=N(i,"internalCreateCallback",null),this.internalRemoveCallback=N(i,"internalRemoveCallback",null),e&&this.addMultiple(e),i&&this.createMultiple(i)},create:function(t,e,i,n,s,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),void 0===r&&(r=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(o),o.preUpdate&&this.scene.sys.updateList.add(o),o.visible=s,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=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;it.max.x&&(t.max.x=s.x),s.xt.max.y&&(t.max.y=s.y),s.y=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},i.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},i.translate=function(t,e){t.min.x+=e.x,t.max.x+=e.x,t.min.y+=e.y,t.max.y+=e.y},i.shift=function(t,e){var i=t.max.x-t.min.x,n=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+n}},function(t,e){t.exports=function(t,e,i){return 0<=t&&t=this.firstgid&&t=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this.resolution=i,this},bind:function(){var t=this.vertexBuffer,e=this.program,i=this.renderer;return i.setProgram(e),i.setVertexBuffer(t),this.setAttribPointers(),this},setAttribPointers:function(){for(var t=this.gl,e=this.attributes,i=this.vertexSize,n=0;nthis.vertexCapacity&&this.flush();var N=this.setGameObject(t),Y=t._isTinted&&t.tintFill;this.batchQuad(A,C,M,P,O,R,L,F,l,u,c,d,k,D,I,B,Y,h,N)},batchQuad:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,m,y){void 0===y&&(y=this.currentUnit);var x=!1;this.vertexCount+6>this.vertexCapacity&&(this.flush(),x=!0,y=this.setTexture2D(m));var T=this.vertexViewF32,w=this.vertexViewU32,b=this.vertexCount*this.vertexComponentCount-1;return T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=y,T[++b]=v,w[++b]=d,T[++b]=i,T[++b]=n,T[++b]=h,T[++b]=c,T[++b]=y,T[++b]=v,w[++b]=p,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=y,T[++b]=v,w[++b]=g,T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=y,T[++b]=v,w[++b]=d,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=y,T[++b]=v,w[++b]=g,T[++b]=o,T[++b]=a,T[++b]=u,T[++b]=l,T[++b]=y,T[++b]=v,w[++b]=f,this.vertexCount+=6,x},batchTri:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g){void 0===g&&(g=this.currentUnit);var v=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),v=!0,g=this.setTexture2D(p));var m=this.vertexViewF32,y=this.vertexViewU32,x=this.vertexCount*this.vertexComponentCount-1;return m[++x]=t,m[++x]=e,m[++x]=o,m[++x]=a,m[++x]=g,m[++x]=f,y[++x]=u,m[++x]=i,m[++x]=n,m[++x]=o,m[++x]=l,m[++x]=g,m[++x]=f,y[++x]=c,m[++x]=s,m[++x]=r,m[++x]=h,m[++x]=l,m[++x]=g,m[++x]=f,y[++x]=d,this.vertexCount+=3,v},batchTexture:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,m,y,x,T,w,b,E,S,_,A,C,M,P,O,R){this.renderer.setPipeline(this,t);var L,F,k,D=this._tempMatrix1,I=this._tempMatrix2,B=this._tempMatrix3,N=m/i+A,Y=y/n+C,X=(m+x)/i+A,U=(y+T)/n+C,z=o,G=a,W=-g,V=-v;t.isCropped&&(z=(L=t._crop).width,G=L.height,o=L.width,a=L.height,F=m=L.x,k=y=L.y,c&&(F=x-L.x-L.width),d&&!e.isRenderTexture&&(k=T-L.y-L.height),N=F/i+A,Y=k/n+C,X=(F+L.width)/i+A,U=(k+L.height)/n+C,W=-g+m,V=-v+y),c&&(z*=-1,W+=o),(d^=!O&&e.isRenderTexture?1:0)&&(G*=-1,V+=a);var H=W+z,j=V+G;I.applyITRS(s,r,u,h,l),D.copyFrom(M.matrix),P?(D.multiplyWithOffset(P,-M.scrollX*f,-M.scrollY*p),I.e=s,I.f=r):(I.e-=M.scrollX*f,I.f-=M.scrollY*p),D.multiply(I,B);var q=B.getX(W,V),K=B.getY(W,V),Z=B.getX(W,j),J=B.getY(W,j),Q=B.getX(H,j),$=B.getY(H,j),tt=B.getX(H,V),et=B.getY(H,V);M.roundPixels&&(q=Math.round(q),K=Math.round(K),Z=Math.round(Z),J=Math.round(J),Q=Math.round(Q),$=Math.round($),tt=Math.round(tt),et=Math.round(et)),void 0===R&&(R=this.renderer.setTexture2D(e)),this.batchQuad(q,K,Z,J,Q,$,tt,et,N,Y,X,U,w,b,E,S,_,e,R)},batchTextureFrame:function(t,e,i,n,s,r,o){this.renderer.setPipeline(this);var a=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2,l=e+t.width,u=i+t.height;o?a.multiply(o,h):h=a;var c=h.getX(e,i),d=h.getY(e,i),f=h.getX(e,u),p=h.getY(e,u),g=h.getX(l,u),v=h.getY(l,u),m=h.getX(l,i),y=h.getY(l,i),x=this.renderer.setTextureSource(t.source);n=X.getTintAppendFloatAlpha(n,s),this.batchQuad(c,d,f,p,g,v,m,y,t.u0,t.v0,t.u1,t.v1,n,n,n,n,0,t.glTexture,x)},drawFillRect:function(t,e,i,n,s,r){t=Math.floor(t),e=Math.floor(e);var o=Math.floor(t+i),a=Math.floor(e+n),h=this.renderer.blankTexture.glTexture,l=this.renderer.setTexture2D(h),u=X.getTintAppendFloatAlphaAndSwap(s,r);this.batchQuad(t,e,t,a,o,a,o,e,0,0,1,1,u,u,u,u,2,h,l)},batchFillRect:function(t,e,i,n,s,r){this.renderer.setPipeline(this);var o=this._tempMatrix3;r&&r.multiply(s,o);var a=t+i,h=e+n,l=o.getX(t,e),u=o.getY(t,e),c=o.getX(t,h),d=o.getY(t,h),f=o.getX(a,h),p=o.getY(a,h),g=o.getX(a,e),v=o.getY(a,e),m=this.currentFrame,y=m.u0,x=m.v0,T=m.u1,w=m.v1,b=this.fillTint;this.batchQuad(l,u,c,d,f,p,g,v,y,x,T,w,b.TL,b.TR,b.BL,b.BR,this.tintEffect)},batchFillTriangle:function(t,e,i,n,s,r,o,a){this.renderer.setPipeline(this);var h=this._tempMatrix3;a&&a.multiply(o,h);var l=h.getX(t,e),u=h.getY(t,e),c=h.getX(i,n),d=h.getY(i,n),f=h.getX(s,r),p=h.getY(s,r),g=this.currentFrame,v=g.u0,m=g.v0,y=g.u1,x=g.v1;this.batchTri(l,u,c,d,f,p,v,m,y,x,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.tintEffect)},batchStrokeTriangle:function(t,e,i,n,s,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=n,l[1].width=o,l[2].x=s,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.setPipeline(this);var n=this._tempMatrix3;i&&i.multiply(e,n);for(var s,r,o=t.length,a=this.polygonCache,h=this.fillTint.TL,l=this.fillTint.TR,u=this.fillTint.BL,c=this.tintEffect,d=0;d>16)+(65280&t)+((255&t)<<16)}},function(t,e,i){var n=i(0),a=i(288),s=new n({initialize:function(t,e){this.parent=t,(this.events=e)||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once("destroy",this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],n=0;ne.right||t.y>e.bottom)}},function(t,e,i){var l=i(6),u={},n={register:function(t,e,i,n,s){u[t]={plugin:e,mapping:i,settingsKey:n,configKey:s}},getPlugin:function(t){return u[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,n=e.game.config;for(var s in u){var r=u[s].plugin,o=u[s].mapping,a=u[s].settingsKey,h=u[s].configKey;l(i,a,n[h])&&(t[o]=new r(t))}},remove:function(t){u.hasOwnProperty(t)&&delete u[t]}};t.exports=n},function(t,e,i){t.exports={ANY_KEY_DOWN:i(1229),ANY_KEY_UP:i(1230),COMBO_MATCH:i(1231),DOWN:i(1232),KEY_DOWN:i(1233),KEY_UP:i(1234),UP:i(1235)}},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),void 0===r&&(r=!1),{responseType:t,async:e,user:i,password:n,timeout:s,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:r}}},function(t,e,i){var n=i(0),s=i(223),r=i(75),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s),this.body=null}});t.exports=o},function(t,e,i){t.exports={CalculateFacesAt:i(226),CalculateFacesWithin:i(52),Copy:i(1325),CreateFromTiles:i(1326),CullTiles:i(1327),Fill:i(1328),FilterTiles:i(1329),FindByIndex:i(1330),FindTile:i(1331),ForEachTile:i(1332),GetTileAt:i(148),GetTileAtWorldXY:i(1333),GetTilesWithin:i(24),GetTilesWithinShape:i(1334),GetTilesWithinWorldXY:i(1335),HasTileAt:i(479),HasTileAtWorldXY:i(1336),IsInLayerBounds:i(102),PutTileAt:i(227),PutTileAtWorldXY:i(1337),PutTilesAt:i(1338),Randomize:i(1339),RemoveTileAt:i(480),RemoveTileAtWorldXY:i(1340),RenderDebug:i(1341),ReplaceByIndex:i(478),SetCollision:i(1342),SetCollisionBetween:i(1343),SetCollisionByExclusion:i(1344),SetCollisionByProperty:i(1345),SetCollisionFromCollisionGroup:i(1346),SetTileIndexCallback:i(1347),SetTileLocationCallback:i(1348),Shuffle:i(1349),SwapByIndex:i(1350),TileToWorldX:i(149),TileToWorldXY:i(1351),TileToWorldY:i(150),WeightedRandomize:i(1352),WorldToTileX:i(63),WorldToTileXY:i(1353),WorldToTileY:i(64)}},function(t,e,i){var r=i(102);t.exports=function(t,e,i,n){if(void 0===i&&(i=!1),r(t,e,n)){var s=n.data[e][t]||null;return null!==s&&(-1!==s.index||i)?s:null}return null}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),n*=s.scaleX),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*n}},function(t,e){t.exports=function(o,a,t){return o.hasOwnProperty(a)?"function"==typeof o[a]?function(t,e,i,n,s,r){return o[a](t,e,i,n,s,r)}:function(){return o[a]}:"function"==typeof t?t:function(){return t}}},function(t,e,i){var R=i(236),L=i(15),F=i(89),k=i(69),D=i(151),I=i(501),B=i(234),N=i(6),Y=i(235),X=i(237),U=i(239);t.exports=function(t,e,i){void 0===i&&(i=R);for(var n=i.targets?i.targets:B(e),s=I(e),r=D(e,"delay",i.delay),o=D(e,"duration",i.duration),a=N(e,"easeParams",i.easeParams),h=k(N(e,"ease",i.ease),a),l=D(e,"hold",i.hold),u=D(e,"repeat",i.repeat),c=D(e,"repeatDelay",i.repeatDelay),d=F(e,"yoyo",i.yoyo),f=F(e,"flipX",i.flipX),p=F(e,"flipY",i.flipY),g=[],v=0;v=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo);var i=this.frames[e];0!==e||t.forward||(i=this.getLastFrame()),t.updateFrame(i)},getFrameByProgress:function(t){return t=n(t,0,1),a(t,this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t._yoyo?this.handleYoyoFrame(t,!1):0=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2);t=new Array(1+(s-r)).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){var n=i(298),s=i(301),r=i(303),o=i(304);t.exports=function(t){switch(typeof t){case"string":return("rgb"===t.substr(0,3).toLowerCase()?o:n)(t);case"number":return s(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){var f=i(171);t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1);var s=Math.floor(6*t),r=6*t-s,o=Math.floor(i*(1-e)*255),a=Math.floor(i*(1-r*e)*255),h=Math.floor(i*(1-(1-r)*e)*255),l=i=Math.floor(i*=255),u=i,c=i,d=s%6;return 0==d?(u=h,c=o):1==d?(l=a,c=o):2==d?(l=o,c=h):3==d?(l=o,u=a):4==d?(l=h,u=o):5==d&&(u=o,c=a),n?n.setTo?n.setTo(l,u,c,n.alpha,!1):(n.r=l,n.g=u,n.b=c,n.color=f(l,u,c),n):{r:l,g:u,b:c,color:f(l,u,c)}}},function(t,e){var i="";function n(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;is.width&&(t=s.width-r.cutX),r.cutY+e>s.height&&(e=s.height-r.cutY),r.setSize(t,e,r.cutX,r.cutY)),this.updateDisplayOrigin();var a=this.input;return a&&!a.customHitArea&&(a.hitArea.width=t,a.hitArea.height=e),this},setGlobalTint:function(t){return this.globalTint=t,this},setGlobalAlpha:function(t){return this.globalAlpha=t,this},saveTexture:function(t){return this.textureManager.renameTexture(this.texture.key,t),this._saved=!0,this.texture},fill:function(t,e,i,n,s,r){var o=this.gl,a=this.frame,h=this.texture,l=this.camera,u=this.renderer;void 0===e&&(e=1),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=a.cutWidth),void 0===r&&(r=a.cutHeight);var c,d,f,p,g,v,m,y,x,T,w=255&(t>>16|0),b=255&(t>>8|0),E=255&(0|t);return l.preRender(1,1),o?(c=l._cx,d=l._cy,f=l._cw,p=l._ch,u.resetTextures(!0),u.pushScissor(c,d,f,-p),u.setFramebuffer(this.framebuffer,!1),g=this.pipeline,v=h.width,m=h.height,y=g.width/v,x=g.height/m,g.drawFillRect(i*y,(m-r-n)*x,s*y,r*x,S.getTintFromFloats(w/255,b/255,E/255,1),e),g.flush(),u.setFramebuffer(null,!1),u.popScissor()):(T=this.context,u.setContext(T),T.fillStyle="rgba("+w+","+b+","+E+","+e+")",T.fillRect(i+a.cutX,n+a.cutY,s,r),u.setContext()),this.dirty=!0,this},clear:function(){var t,e,i;return this.dirty&&((t=this.gl)?((e=this.renderer).setFramebuffer(this.framebuffer,!0),this.frame.cutWidth===this.canvas.width&&this.frame.cutHeight===this.canvas.height||t.scissor(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),e.setFramebuffer(null,!0)):((i=this.context).save(),i.setTransform(1,0,0,1,0,0),i.clearRect(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),i.restore()),this.dirty=!1),this},erase:function(t,e,i){this._eraseMode=!0;var n=this.renderer.currentBlendMode;return this.renderer.setBlendMode(o.ERASE),this.draw(t,e,i,1,16777215),this.renderer.setBlendMode(n),this._eraseMode=!1,this},draw:function(t,e,i,n,s){void 0===n&&(n=this.globalAlpha),s=void 0===s?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(s>>16)+(65280&s)+((255&s)<<16),Array.isArray(t)||(t=[t]);var r,o,a,h,l,u=this.gl,c=this.camera,d=this.renderer;return c.preRender(1,1),u?(r=c._cx,o=c._cy,a=c._cw,h=c._ch,d.resetTextures(!0),d.setFramebuffer(this.framebuffer,!1),d.pushScissor(r,o,a,h,h),l=this.pipeline,g(l,0,this.texture.width,0,this.texture.height,-1e3,1e3),this.batchList(t,e,i,n,s),d.setFramebuffer(null,!0),d.resetTextures(!0),g(l,0,l.width,l.height,0,-1e3,1e3)):(d.setContext(this.context),this.batchList(t,e,i,n,s),d.setContext()),this.dirty=!0,this},drawFrame:function(t,e,i,n,s,r){void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.globalAlpha),r=void 0===r?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(r>>16)+(65280&r)+((255&r)<<16);var o,a,h,l,u,c=this.gl,d=this.camera,f=this.renderer,p=this.textureManager.getFrame(t,e);return p&&(d.preRender(1,1),c?(o=d._cx,a=d._cy,h=d._cw,l=d._ch,f.resetTextures(!0),f.setFramebuffer(this.framebuffer,!1),f.pushScissor(o,a,h,l,l),u=this.pipeline,g(u,0,this.texture.width,0,this.texture.height,-1e3,1e3),u.batchTextureFrame(p,i+this.frame.cutX,n+this.frame.cutY,r,s,d.matrix,null),u.flush(),f.setFramebuffer(null,!1),f.popScissor(),g(u,0,u.width,u.height,0,-1e3,1e3)):this.batchTextureFrame(p,i+this.frame.cutX,n+this.frame.cutY,s,r),this.dirty=!0),this},batchList:function(t,e,i,n,s){for(var r=0;rs&&(r=t[s]),n[s]=r,t.length>s+1&&(r=t[s+1]),n[s+1]=r;return this},setColors:function(t){var e=this.points.length;if(e<1)return this;var i=this.colors;void 0===t?t=[16777215]:Array.isArray(t)||(t=[t]);var n=0;if(t.length===e)for(r=0;rn&&(s=t[n]),i[n]=s,t.length>n+1&&(s=t[n+1]),i[n+1]=s;return this},setPoints:function(t,e,i){if(void 0===t&&(t=2),"number"==typeof t){var n,s,r,o=t;if(o<2&&(o=2),t=[],this.horizontal)for(r=-this.frame.halfWidth,s=this.frame.width/(o-1),n=0;n=this._markerOut&&(e.loop?(e.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=t,this.emit(o.VIDEO_LOOP,this)):(this.emit(o.VIDEO_COMPLETE,this),this.stop())))},checkVideoProgress:function(){2<=this.video.readyState?this.updateTexture():(this.retry--,0t&&(t=s.totalDuration),s.delay=o.sleepThreshold&&u.set(o,!0)):0u._motionWakeThreshold*i&&u.set(a,!1)))}},u.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"))}},function(t,e,i){var n={};t.exports=n;var u=i(43);n.on=function(t,e,i){for(var n,s=e.split(" "),r=0;re.length&&(r=e.length),i?(n=e[r-1][i],(s=e[r][i])-t<=t-n?e[r]:e[r-1]):(n=e[r-1],(s=e[r])-t<=t-n?s:n)}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=n,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0}});t.exports=n},function(t,e,i){var n=i(53),s={_blendMode:n.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=n[t]),-1<=(t|=0)&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e,i){var o=i(157),a=i(116);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&0=t.right&&(o=1,r+=s-t.right,s=t.right);break;case 1:(r+=e)>=t.bottom&&(o=2,s-=r-t.bottom,r=t.bottom);break;case 2:(s-=e)<=t.left&&(o=3,r-=t.left-s,s=t.left);break;case 3:(r-=e)<=t.top&&(o=0,r=t.top)}return n}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;nd.right&&(f=T(f,f+(e-d.right),this.lerp.x)),id.bottom&&(p=T(p,p+(i-d.bottom),this.lerp.y))):(f=T(f,e-l,this.lerp.x),p=T(p,i-u,this.lerp.y))),this.useBounds&&(f=this.clampX(f),p=this.clampY(p)),this.roundPixels&&(l=Math.round(l),u=Math.round(u));var g=(this.scrollX=f)+r,v=(this.scrollY=p)+o;this.midPoint.set(g,v);var m=n/a,y=s/a;this.worldView.setTo(g-m/2,v-y/2,m,y),h.applyITRS(this.x+l,this.y+u,this.rotation,a,a),h.translate(-l,-u),this.shakeEffect.preRender()},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,n,s,r){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===n&&(n=i),void 0===s&&(s=0),void 0===r&&(r=s),this._follow=t,this.roundPixels=e,i=u(i,0,1),n=u(n,0,1),this.lerp.set(i,n),this.followOffset.set(s,r);var o=this.width/2,a=this.height/2,h=t.x-s,l=t.y-r;return this.midPoint.set(h,l),this.scrollX=h-o,this.scrollY=l-a,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.clearRenderToTexture(),this.resetFX(),s.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=c},function(t,e,i){var o=i(31);t.exports=function(t){var e=new o;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,n){return e+e+i+i+n+n});var i,n,s,r=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return r&&(i=parseInt(r[1],16),n=parseInt(r[2],16),s=parseInt(r[3],16),e.setTo(i,n,s)),e}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},function(t,e){t.exports=function(t,e,i,n){void 0===n&&(n={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var s=Math.min(t,e,i),r=Math.max(t,e,i),o=r-s,a=0,h=0===r?0:o/r,l=r;return r!==s&&(r===t?a=(e-i)/o+(e>>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}}},function(t,e,i){var n=i(31);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var a=i(31);t.exports=function(t){var e,i,n,s,r=new a,o=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());return o&&(e=parseInt(o[1],10),i=parseInt(o[2],10),n=parseInt(o[3],10),s=void 0!==o[4]?parseFloat(o[4]):1,r.setTo(e,i,n,255*s)),r}},function(t,e,i){t.exports={Fade:i(668),Flash:i(669),Pan:i(670),Shake:i(703),RotateTo:i(704),Zoom:i(705)}},function(t,e,i){t.exports={In:i(671),Out:i(672),InOut:i(673)}},function(t,e,i){t.exports={In:i(674),Out:i(675),InOut:i(676)}},function(t,e,i){t.exports={In:i(677),Out:i(678),InOut:i(679)}},function(t,e,i){t.exports={In:i(680),Out:i(681),InOut:i(682)}},function(t,e,i){t.exports={In:i(683),Out:i(684),InOut:i(685)}},function(t,e,i){t.exports={In:i(686),Out:i(687),InOut:i(688)}},function(t,e,i){t.exports=i(689)},function(t,e,i){t.exports={In:i(690),Out:i(691),InOut:i(692)}},function(t,e,i){t.exports={In:i(693),Out:i(694),InOut:i(695)}},function(t,e,i){t.exports={In:i(696),Out:i(697),InOut:i(698)}},function(t,e,i){t.exports={In:i(699),Out:i(700),InOut:i(701)}},function(t,e,i){t.exports=i(702)},function(t,e,i){var n=i(0),a=i(33),h=i(319),l=i(2),u=i(6),c=i(7),d=i(176),f=i(1),p=i(180),g=i(170),s=new n({initialize:function(t){void 0===t&&(t={});this.width=u(t,"width",1024),this.height=u(t,"height",768),this.zoom=u(t,"zoom",1),this.resolution=u(t,"resolution",1),this.parent=u(t,"parent",void 0),this.scaleMode=u(t,"scaleMode",0),this.expandParent=u(t,"expandParent",!0),this.autoRound=u(t,"autoRound",!1),this.autoCenter=u(t,"autoCenter",0),this.resizeInterval=u(t,"resizeInterval",500),this.fullscreenTarget=u(t,"fullscreenTarget",null),this.minWidth=u(t,"minWidth",0),this.maxWidth=u(t,"maxWidth",0),this.minHeight=u(t,"minHeight",0),this.maxHeight=u(t,"maxHeight",0);var e=u(t,"scale",null);e&&(this.width=u(e,"width",this.width),this.height=u(e,"height",this.height),this.zoom=u(e,"zoom",this.zoom),this.resolution=u(e,"resolution",this.resolution),this.parent=u(e,"parent",this.parent),this.scaleMode=u(e,"mode",this.scaleMode),this.expandParent=u(e,"expandParent",this.expandParent),this.autoRound=u(e,"autoRound",this.autoRound),this.autoCenter=u(e,"autoCenter",this.autoCenter),this.resizeInterval=u(e,"resizeInterval",this.resizeInterval),this.fullscreenTarget=u(e,"fullscreenTarget",this.fullscreenTarget),this.minWidth=u(e,"min.width",this.minWidth),this.maxWidth=u(e,"max.width",this.maxWidth),this.minHeight=u(e,"min.height",this.minHeight),this.maxHeight=u(e,"max.height",this.maxHeight)),this.renderType=u(t,"type",a.AUTO),this.canvas=u(t,"canvas",null),this.context=u(t,"context",null),this.canvasStyle=u(t,"canvasStyle",null),this.customEnvironment=u(t,"customEnvironment",!1),this.sceneConfig=u(t,"scene",null),this.seed=u(t,"seed",[(Date.now()*Math.random()).toString()]),d.RND=new d.RandomDataGenerator(this.seed),this.gameTitle=u(t,"title",""),this.gameURL=u(t,"url","https://phaser.io"),this.gameVersion=u(t,"version",""),this.autoFocus=u(t,"autoFocus",!0),this.domCreateContainer=u(t,"dom.createContainer",!1),this.domBehindCanvas=u(t,"dom.behindCanvas",!1),this.inputKeyboard=u(t,"input.keyboard",!0),this.inputKeyboardEventTarget=u(t,"input.keyboard.target",window),this.inputKeyboardCapture=u(t,"input.keyboard.capture",[]),this.inputMouse=u(t,"input.mouse",!0),this.inputMouseEventTarget=u(t,"input.mouse.target",null),this.inputMouseCapture=u(t,"input.mouse.capture",!0),this.inputTouch=u(t,"input.touch",h.input.touch),this.inputTouchEventTarget=u(t,"input.touch.target",null),this.inputTouchCapture=u(t,"input.touch.capture",!0),this.inputActivePointers=u(t,"input.activePointers",1),this.inputSmoothFactor=u(t,"input.smoothFactor",0),this.inputWindowEvents=u(t,"input.windowEvents",!0),this.inputGamepad=u(t,"input.gamepad",!1),this.inputGamepadEventTarget=u(t,"input.gamepad.target",window),this.disableContextMenu=u(t,"disableContextMenu",!1),this.audio=u(t,"audio"),this.hideBanner=!1===u(t,"banner",null),this.hidePhaser=u(t,"banner.hidePhaser",!1),this.bannerTextColor=u(t,"banner.text","#ffffff"),this.bannerBackgroundColor=u(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=u(t,"fps",null);var i=u(t,"render",t);this.antialias=u(i,"antialias",!0),this.antialiasGL=u(i,"antialiasGL",!0),this.mipmapFilter=u(i,"mipmapFilter","LINEAR"),this.desynchronized=u(i,"desynchronized",!1),this.roundPixels=u(i,"roundPixels",!1),this.pixelArt=u(i,"pixelArt",1!==this.zoom),this.pixelArt&&(this.antialias=!1,this.roundPixels=!0),this.transparent=u(i,"transparent",!1),this.clearBeforeRender=u(i,"clearBeforeRender",!0),this.premultipliedAlpha=u(i,"premultipliedAlpha",!0),this.failIfMajorPerformanceCaveat=u(i,"failIfMajorPerformanceCaveat",!1),this.powerPreference=u(i,"powerPreference","default"),this.batchSize=u(i,"batchSize",4096),this.maxTextures=u(i,"maxTextures",-1),this.maxLights=u(i,"maxLights",10);var n=u(t,"backgroundColor",0);this.backgroundColor=g(n),0===n&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=u(t,"callbacks.preBoot",f),this.postBoot=u(t,"callbacks.postBoot",f),this.physics=u(t,"physics",{}),this.defaultPhysicsSystem=u(this.physics,"default",!1),this.loaderBaseURL=u(t,"loader.baseURL",""),this.loaderPath=u(t,"loader.path",""),this.loaderMaxParallelDownloads=u(t,"loader.maxParallelDownloads",32),this.loaderCrossOrigin=u(t,"loader.crossOrigin",void 0),this.loaderResponseType=u(t,"loader.responseType",""),this.loaderAsync=u(t,"loader.async",!0),this.loaderUser=u(t,"loader.user",""),this.loaderPassword=u(t,"loader.password",""),this.loaderTimeout=u(t,"loader.timeout",0),this.loaderWithCredentials=u(t,"loader.withCredentials",!1),this.installGlobalPlugins=[],this.installScenePlugins=[];var s=u(t,"plugins",null),r=p.DefaultScene;s&&(Array.isArray(s)?this.defaultPlugins=s:c(s)&&(this.installGlobalPlugins=l(s,"global",[]),this.installScenePlugins=l(s,"scene",[]),Array.isArray(s.default)?r=s.default:Array.isArray(s.defaultMerge)&&(r=r.concat(s.defaultMerge)))),this.defaultPlugins=r;var o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=u(t,"images.default",o+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=u(t,"images.missing",o+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),window&&(window.FORCE_WEBGL?this.renderType=a.WEBGL:window.FORCE_CANVAS&&(this.renderType=a.CANVAS))}});t.exports=s},function(t,e,i){t.exports={os:i(122),browser:i(123),features:i(175),input:i(734),audio:i(735),video:i(736),fullscreen:i(737),canvasFeatures:i(320)}},function(t,e,i){var n,s,r,o=i(26),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var i=new Image;i.onload=function(){var t=o.create(i,6,1).getContext("2d");if(t.globalCompositeOperation="multiply",t.drawImage(r,0,0),t.drawImage(i,2,0),!t.getImageData(2,0,1,1))return!1;var e=t.getImageData(2,0,1,1).data;o.remove(i),a.supportNewBlendModes=255===e[0]&&0===e[1]&&0===e[2]},i.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");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);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},function(t,e){t.exports=function(t){return 0<=(t%=2*Math.PI)?t:t+2*Math.PI}},function(t,e){t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return s*s+r*r}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),e-ir[0]&&(e=1),r[8]>r[3*e+e]&&(e=2),i=a[e],n=a[i],s=Math.sqrt(r[3*e+e]-r[3*i+i]-r[3*n+n]+1),h[e]=.5*s,s=.5/s,h[i]=(r[3*i+e]+r[3*e+i])*s,h[n]=(r[3*n+e]+r[3*e+n])*s,this.x=h[0],this.y=h[1],this.z=h[2],this.w=(r[3*n+i]-r[3*i+n])*s),this}});t.exports=d},function(t,e,a){var h=a(341),l=a(26),u=a(33),c=a(175);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===u.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==u.HEADLESS)if(e.renderType===u.CANVAS||e.renderType!==u.CANVAS&&!c.webGL){if(!c.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");e.renderType=u.CANVAS}else e.renderType=u.WEBGL;e.antialias||l.disableSmoothing();var i,n,s=t.scale.baseSize,r=s.width,o=s.height;e.canvas?(t.canvas=e.canvas,t.canvas.width=r,t.canvas.height=o):t.canvas=l.create(t,r,o,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||h.setCrisp(t.canvas),e.renderType!==u.HEADLESS&&(i=a(508),n=a(511),e.renderType===u.WEBGL?t.renderer=new n(t):(t.renderer=new i(t),t.context=t.renderer.gameContext))}},function(t,e){t.exports={setCrisp:function(e){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach(function(t){e.style["image-rendering"]=t}),e.style.msInterpolationMode="nearest-neighbor",e},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},function(t,e,i){var l=i(33);t.exports=function(t){var e,i,n,s,r,o,a,h=t.config;h.hideBanner||(e="WebGL",h.renderType===l.CANVAS?e="Canvas":h.renderType===l.HEADLESS&&(e="Headless"),i=h.audio,a=!(n=t.device.audio).webAudio||i&&i.disableWebAudio?i&&i.noAudio||!n.webAudio&&!n.audioData?"No Audio":"HTML5 Audio":"Web Audio",t.device.browser.ie?window.console&&console.log("Phaser v"+l.VERSION+" / https://phaser.io"):(r=[s=""],Array.isArray(h.bannerBackgroundColor)?(h.bannerBackgroundColor.forEach(function(t){s=s.concat("%c "),r.push("background: "+t),o=t}),r[r.length-1]="color: "+h.bannerTextColor+"; background: "+o):(s=s.concat("%c "),r.push("color: "+h.bannerTextColor+"; background: "+h.bannerBackgroundColor)),r.push("background: #fff"),h.gameTitle&&(s=s.concat(h.gameTitle),h.gameVersion&&(s=s.concat(" v"+h.gameVersion)),h.hidePhaser||(s=s.concat(" / "))),h.hidePhaser||(s=s.concat("Phaser v"+l.VERSION+" ("+e+" | "+a+")")),s=s.concat(" %c "+h.gameURL),r[0]=s,console.log.apply(console,r)))}},function(t,e,i){var n=i(0),s=i(6),r=i(1),o=i(344),a=new n({initialize:function(t,e){this.game=t,this.raf=new o,this.started=!1,this.running=!1,this.minFps=s(e,"min",5),this.targetFps=s(e,"target",60),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=s(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=s(e,"deltaHistory",10),this.panicMax=s(e,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=s(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;for(var e=this.framesThisSecond=0;ethis._min&&(r=n[i],r=Math.min(r,this._min)),n[i]=r,this.deltaIndex++,this.deltaIndex>s&&(this.deltaIndex=0);for(var a=o=0;athis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var h=o/this._target;this.callback(t,o,h),this.lastTime=t,this.frame++},tick:function(){this.step()},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running||(t&&(this.startTime+=-this.lastTime+(this.lastTime+window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step())},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.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0,this.target=0;var n=this;this.step=function t(){var e=window.performance.now();n.lastTime=n.tick,n.tick=e,n.callback(e),n.timeOutID=window.requestAnimationFrame(t)},this.stepTimeout=function t(){var e=Date.now(),i=Math.min(Math.max(2*n.target+n.tick-e,0),n.target);n.lastTime=n.tick,n.tick=e,n.callback(e),n.timeOutID=window.setTimeout(t,i)}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.target=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=s}});t.exports=r},function(t,e,i){var n=i(20);t.exports=function(t){var e,i=t.events;void 0!==document.hidden?e="visibilitychange":["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(n.HIDDEN):i.emit(n.VISIBLE)},!1),window.onblur=function(){i.emit(n.BLUR)},window.onfocus=function(){i.emit(n.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},function(t,e,i){var m=i(347),y=i(26),x=i(6);t.exports=function(t){var e=x(t,"data",[]),i=x(t,"canvas",null),n=x(t,"palette",m),s=x(t,"pixelWidth",1),r=x(t,"pixelHeight",s),o=x(t,"resizeCanvas",!0),a=x(t,"clearCanvas",!0),h=x(t,"preRender",null),l=x(t,"postRender",null),u=Math.floor(Math.abs(e[0].length*s)),c=Math.floor(Math.abs(e.length*r));i||(i=y.create2D(this,u,c),a=o=!1),o&&(i.width=u,i.height=c);var d=i.getContext("2d");a&&d.clearRect(0,0,u,c),h&&h(i,d);for(var f=0;fi.length-2?i.length-1:s+1],l=i[s>i.length-3?i.length-1:s+2];return e.set(u(r,o.x,a.x,h.x,l.x),u(r,o.y,a.y,h.y,l.y))},toJSON:function(){for(var t=[],e=0;ei.width?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE;if("number"==typeof window.orientation)return 0===window.orientation||180===window.orientation?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return s.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return s.ORIENTATION.LANDSCAPE}return tthis.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var e=this.listeners;window.removeEventListener("orientationchange",e.orientationChange,!1),window.removeEventListener("resize",e.windowResize,!1);["webkit","moz",""].forEach(function(t){document.removeEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.removeEventListener(t+"fullscreenerror",e.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",e.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===c.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===c.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=v},function(t,e,i){var n=i(17),s=i(0),r=i(94),o=i(3),a=new s({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=null),this._width=t,this._height=e,this._parent=n,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=n(t,0,this.maxWidth),this.minHeight=n(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=n(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=n(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=n(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=n(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 n=this.snapTo,s=0===e?1:t/e;return i&&this.aspectRatio>s||!i&&this.aspectRatios)&&(t=(e=r(e,n.y))*this.aspectRatio,0r.START&&n.settings.status<=r.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e=r.LOADING&&i.settings.status=r.x&&t=r.y&&e=r.x&&t=r.y&&e=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s>4,l[a++]=(15&i)<<4|n>>2,l[a++]=(3&n)<<6|63&s;return h}},function(t,e,i){var n=i(134),s=i(0),r=i(59),o=new s({Extends:n,initialize:function(t,e,i){if(void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),!this.audioBuffer)throw new Error('There is no audio asset with key "'+e+'" in the audio cache');this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,n.call(this,t,e,i)},play:function(t,e){return!!n.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(r.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime>>16,v=(65280&d)>>>8,m=255&d,l.strokeStyle="rgba("+g+","+v+","+m+","+u+")",l.lineWidth=p,y+=3;break;case x.FILL_STYLE:f=a[y+1],c=a[y+2],g=(16711680&f)>>>16,v=(65280&f)>>>8,m=255&f,l.fillStyle="rgba("+g+","+v+","+m+","+c+")",y+=2;break;case x.BEGIN_PATH:l.beginPath();break;case x.CLOSE_PATH:l.closePath();break;case x.FILL_PATH:o||l.fill();break;case x.STROKE_PATH:o||l.stroke();break;case x.FILL_RECT:o?l.rect(a[y+1],a[y+2],a[y+3],a[y+4]):l.fillRect(a[y+1],a[y+2],a[y+3],a[y+4]),y+=4;break;case x.FILL_TRIANGLE:l.beginPath(),l.moveTo(a[y+1],a[y+2]),l.lineTo(a[y+3],a[y+4]),l.lineTo(a[y+5],a[y+6]),l.closePath(),o||l.fill(),y+=6;break;case x.STROKE_TRIANGLE:l.beginPath(),l.moveTo(a[y+1],a[y+2]),l.lineTo(a[y+3],a[y+4]),l.lineTo(a[y+5],a[y+6]),l.closePath(),o||l.stroke(),y+=6;break;case x.LINE_TO:l.lineTo(a[y+1],a[y+2]),y+=2;break;case x.MOVE_TO:l.moveTo(a[y+1],a[y+2]),y+=2;break;case x.LINE_FX_TO:l.lineTo(a[y+1],a[y+2]),y+=5;break;case x.MOVE_FX_TO:l.moveTo(a[y+1],a[y+2]),y+=5;break;case x.SAVE:l.save();break;case x.RESTORE:l.restore();break;case x.TRANSLATE:l.translate(a[y+1],a[y+2]),y+=2;break;case x.SCALE:l.scale(a[y+1],a[y+2]),y+=2;break;case x.ROTATE:l.rotate(a[y+1]),y+=1;break;case x.GRADIENT_FILL_STYLE:y+=5;break;case x.GRADIENT_LINE_STYLE:y+=6;break;case x.SET_TEXTURE:y+=2}}l.restore()}}},function(t,e,i){var n=i(0),o=i(2),s=new n({initialize:function(t,e,i,n,s){var r;"object"==typeof t?(t=o(r=t,"x",0),e=o(r,"y",0),i=o(r,"power",0),n=o(r,"epsilon",100),s=o(r,"gravity",50)):(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===s&&(s=50)),this.x=t,this.y=e,this.active=!0,this._gravity=s,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i,n,s=this.x-t.x,r=this.y-t.y,o=s*s+r*r;0!==o&&(i=Math.sqrt(o),oe.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(0this._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=n},function(t,e){t.exports=function(t,e){for(var i=0;id.PI2?s=d.PI2:s<0&&(s=d.PI2+s%d.PI2);for(var a,h=[r+Math.cos(n)*i,o+Math.sin(n)*i];e<1;)a=s*e+n,h.push(r+Math.cos(a)*i,o+Math.sin(a)*i),e+=t;return a=s+n,h.push(r+Math.cos(a)*i,o+Math.sin(a)*i),h.push(r+Math.cos(n)*i,o+Math.sin(n)*i),this.pathIndexes=u(h),this.pathData=h,this}});t.exports=r},function(t,e,i){var n=i(0),s=i(1012),r=i(66),o=i(9),a=i(29),h=new n({Extends:a,Mixins:[s],initialize:function(t,e,i,n,s,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Curve",n),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(e,i),void 0!==s&&this.setFillStyle(s,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=[],n=this.geom.getPoints(e),s=0;st.right||e.rightt.bottom||e.bottome.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottomt.width*t.height)&&(e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(s.BUTTON_DOWN,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(s.BUTTON_UP,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=r},function(t,e,i){var a=i(453),h=i(454),n=i(0),l=i(11),u=i(3),s=new n({Extends:l,initialize:function(t,e){l.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],n=0;n=s;for(this.fixedStep||(n=.001*e,o=!0,this._elapsed=0),h=0;h=s;)this._elapsed-=s,this.step(n)}},step:function(t){for(var e,i=this.bodies.entries,n=i.length,s=0;sc)&&(d.xu))return this.separateCircle(t,e,s)}var f=!1,p=!1;s?(f=A(t,e,s,this.OVERLAP_BIAS),p=C(t,e,s,this.OVERLAP_BIAS)):this.forceX||Math.abs(this.gravity.y+t.gravity.y)=e.right||t.position.y>=e.bottom))},circleBodyIntersects:function(t,e){var i=p(t.center.x,e.left,e.right),n=p(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o;t.isParent&&void 0===t.physicsType&&(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var a=Array.isArray(t),h=Array.isArray(e);if(this._total=0,a||h)if(!a&&h)for(o=0;od.baseTileWidth&&(h-=a=(d.tileWidth-d.baseTileWidth)*e.scaleX,u+=a),d.tileHeight>d.baseTileHeight&&(c+=(d.tileHeight-d.baseTileHeight)*e.scaleY);var f=e.getTilesWithinWorldXY(h,l,u,c);return 0!==f.length&&this.collideSpriteVsTilesHandler(t,f,i,n,s,r,!0)},collideSpriteVsTilesHandler:function(t,e,i,n,s,r,o){for(var a,h,l=t.body,u={left:0,right:0,top:0,bottom:0},c=!1,d=0;de.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,r=this.blocked.right=!0),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,r=this.blocked.down=!0),r&&(this.blocked.none=!1),r},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this.updateCenter(),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n,s,r=this.gameObject;return!t&&r.frame&&(t=r.frame.realWidth),!e&&r.frame&&(e=r.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&&r.getCenter&&(n=(r.width-t)/2,s=(r.height-e)/2,this.offset.set(n,s)),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),0=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 0e._dx?r<(s=t.right-e.x)&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?s=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0,e.physicsType===o.STATIC_BODY&&(t.blocked.none=!1,t.blocked.right=!0),t.physicsType===o.STATIC_BODY&&(e.blocked.none=!1,e.blocked.left=!0)):t._dxe._dy?r<(s=t.bottom-e.y)&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?s=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0,e.physicsType===o.STATIC_BODY&&(t.blocked.none=!1,t.blocked.down=!0),t.physicsType===o.STATIC_BODY&&(e.blocked.none=!1,e.blocked.up=!0)):t._dy=t.minX&&e.maxY>=t.minY}function p(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,s){for(var r,o=[e,i];o.length;)(i=o.pop())-(e=o.pop())<=n||(r=e+Math.ceil((i-e)/n/2)*n,a(t,r,e,i,s),o.push(e,r,r,i))}n.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!l(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;sthis._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),o=p(i.children.splice(r,i.children.length-r));o.height=i.height,o.leaf=i.leaf,f(i,this.toBBox),f(o,this.toBBox),e?t[e-1].children.push(o):this._splitRoot(i,o)},_splitRoot:function(t,e){this.data=p([t,e]),this.data.height=t.height+1,this.data.leaf=!1,f(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){for(var n,s,r,o,a,h,l,u,c,d,f,p,g=a=1/0,v=e;v<=i-e;v++)n=m(t,0,v,this.toBBox),s=m(t,v,i,this.toBBox),l=n,u=s,p=f=d=c=void 0,c=Math.max(l.minX,u.minX),d=Math.max(l.minY,u.minY),f=Math.min(l.maxX,u.maxX),p=Math.min(l.maxY,u.maxY),r=Math.max(0,f-c)*Math.max(0,p-d),o=y(n)+y(s),r=t.right||e.position.y>=t.bottom)}},function(t,e,i){var n=i(56),s=i(0),r=i(51),o=i(49),a=i(3),h=new s({initialize:function(t,e){var i=e.displayWidth?e.displayWidth:64,n=e.displayHeight?e.displayHeight:64;this.world=t,this.gameObject=e,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-n*e.originY),this.width=i,this.height=n,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.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).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 n,s,r=this.gameObject;return!t&&r.frame&&(t=r.frame.realWidth),!e&&r.frame&&(e=r.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&&r.getCenter&&(n=r.displayWidth/2,s=r.displayHeight/2,this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(n-this.halfWidth,s-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y),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),0=r.layers.length){if(s.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}r=s.pop()}else{var o,a=r.layers[r.i];if(r.i++,"tilelayer"===a.type)if(a.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+a.name+"'");else{if(a.encoding&&"base64"===a.encoding){if(a.chunks)for(var h=0;h>>0;return n}},function(t,e,i){var h=i(2),l=i(231);t.exports=function(t){for(var e=[],i=[],n=l(t);n.i=n.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}n=i.pop()}else{var s,r,o,a=n.layers[n.i];n.i++,"imagelayer"===a.type?(s=h(a,"offsetx",0)+h(a,"startx",0),r=h(a,"offsety",0)+h(a,"starty",0),e.push({name:n.name+a.name,image:a.image,x:n.x+s+a.x,y:n.y+r+a.y,alpha:n.opacity*a.opacity,visible:n.visible&&a.visible,properties:h(a,"properties",{})})):"group"===a.type&&(o=l(t,a,n),i.push(n),n=o)}return e}},function(t,e,i){var x=i(105),T=i(488),w=i(232);t.exports=function(t){for(var e,i=[],n=[],s=null,r=0;r=this.firstgid&&t=n.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}n=i.pop()}else{var s,r=n.layers[n.i];if(n.i++,r.opacity*=n.opacity,r.visible=n.visible&&r.visible,"objectgroup"===r.type){r.name=n.name+r.name;for(var o=n.x+d(r,"startx",0)+d(r,"offsetx",0),a=n.y+d(r,"starty",0)+d(r,"offsety",0),h=[],l=0;ln&&(n=e.layer[r].width),e.layer[r].height>s&&(s=e.layer[r].height);var o=new h({width:n,height:s,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:a.WELTMEISTER});return o.layers=l(e,i),o.tilesets=u(e),o}},function(t,e,i){var d=i(103),f=i(74);t.exports=function(t,e){for(var i=[],n=0;nx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(1===m)for(h=0;hx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(2===m)for(h=f-1;0<=h;h--)for(l=0;lx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(3===m)for(h=f-1;0<=h;h--)for(l=d-1;0<=l;l--)!(a=v[h][l])||a.indexx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));return this.dirty[e]=!1,null===r&&(r=n.createVertexBuffer(o,s.STATIC_DRAW),this.vertexBuffer[e]=r),n.setVertexBuffer(r),i.setAttribPointers(),s.bufferSubData(s.ARRAY_BUFFER,0,o),this},batchTile:function(t,e,i,n,s,r,o){var a=i.getTileTextureCoordinates(e.index);if(!a)return t;var h=i.tileWidth,l=i.tileHeight,u=h/2,c=l/2,d=a.x/n,f=a.y/s,p=(a.x+h)/n,g=(a.y+l)/s,v=this._tempMatrix,m=-u,y=-c;e.flipX&&(h*=-1,m+=i.tileWidth),e.flipY&&(l*=-1,y+=i.tileHeight);var x=m+h,T=y+l;v.applyITRS(u+e.pixelX,c+e.pixelY,e.rotation,1,1);var w=L.getTintAppendFloatAlpha(16777215,r.alpha*this.alpha*e.alpha),b=v.getX(m,y),E=v.getY(m,y),S=v.getX(m,T),_=v.getY(m,T),A=v.getX(x,T),C=v.getY(x,T),M=v.getX(x,y),P=v.getY(x,y);r.roundPixels&&(b=Math.round(b),E=Math.round(E),S=Math.round(S),_=Math.round(_),A=Math.round(A),C=Math.round(C),M=Math.round(M),P=Math.round(P));var O=this.vertexViewF32[o],R=this.vertexViewU32[o];return O[++t]=b,O[++t]=E,O[++t]=d,O[++t]=f,O[++t]=0,O[++t]=0,R[++t]=w,O[++t]=S,O[++t]=_,O[++t]=d,O[++t]=g,O[++t]=0,O[++t]=0,R[++t]=w,O[++t]=A,O[++t]=C,O[++t]=p,O[++t]=g,O[++t]=0,O[++t]=0,R[++t]=w,O[++t]=b,O[++t]=E,O[++t]=d,O[++t]=f,O[++t]=0,O[++t]=0,R[++t]=w,O[++t]=A,O[++t]=C,O[++t]=p,O[++t]=g,O[++t]=0,O[++t]=0,R[++t]=w,O[++t]=M,O[++t]=P,O[++t]=p,O[++t]=f,O[++t]=0,O[++t]=0,R[++t]=w,this.vertexCount[o]+=6,t},setRenderOrder:function(t){if("string"==typeof t&&(t=["right-down","left-down","right-up","left-up"].indexOf(t)),0<=t&&t<4){this._renderOrder=t;for(var e=0;e=this.nextTick&&this.currentAnim.setFrame(this)}},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),e.setSizeToFrame(),e._originComponent&&(t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin()),e},updateFrame:function(t){var e,i=this.setCurrentFrame(t);this.isPlaying&&(t.setAlpha&&(i.alpha=t.alpha),e=this.currentAnim,i.emit(r.SPRITE_ANIMATION_KEY_UPDATE+e.key,e,t,i),i.emit(r.SPRITE_ANIMATION_UPDATE,e,t,i),3===this._pendingStop&&this._pendingStopValue===t&&this.currentAnim.completeAnimation(this))},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},setYoyo:function(t){return void 0===t&&(t=!1),this._yoyo=t,this.parent},getYoyo:function(){return this._yoyo},destroy:function(){this.animationManager.off(r.REMOVE_ANIMATION,this.remove,this),this.animationManager=null,this.parent=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null}});t.exports=o},function(t,e,i){var u=i(509),p=i(41),n=i(0),s=i(33),r=i(510),o=i(93),a=i(30),h=new n({initialize:function(t){this.game=t,this.type=s.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.config={clearBeforeRender:t.config.clearBeforeRender,backgroundColor:t.config.backgroundColor,resolution:t.config.resolution,antialias:t.config.antialias,roundPixels:t.config.roundPixels},this.gameCanvas=t.canvas;var e={alpha:t.config.transparent,desynchronized:t.config.desynchronized};this.gameContext=this.game.config.context?this.game.config.context:this.gameCanvas.getContext("2d",e),this.currentContext=this.gameContext,this.antialias=t.config.antialias,this.blendModes=r(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new a,this._tempMatrix2=new a,this._tempMatrix3=new a,this._tempMatrix4=new a,this.init()},init:function(){this.game.scale.on(o.RESIZE,this.onResize,this);var t=this.game.scale.baseSize;this.resize(t.width,t.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},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,n=this.height;t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),e.clearBeforeRender&&t.clearRect(0,0,i,n),e.transparent||(t.fillStyle=e.backgroundColor.rgba,t.fillRect(0,0,i,n)),t.save(),this.drawCount=0},render:function(t,e,i,n){var s=e.list,r=s.length,o=n._cx,a=n._cy,h=n._cw,l=n._ch,u=n.renderToTexture?n.context:t.sys.context;u.save(),this.game.scene.customViewports&&(u.beginPath(),u.rect(o,a,h,l),u.clip()),this.currentContext=u;var c=n.mask;c&&c.preRenderCanvas(this,null,n._maskCamera),n.transparent||(u.fillStyle=n.backgroundColor.rgba,u.fillRect(o,a,h,l)),u.globalAlpha=n.alpha,u.globalCompositeOperation="source-over",this.drawCount+=s.length,n.renderToTexture&&n.emit(p.PRE_RENDER,n),n.matrix.copyToContext(u);for(var d=0;dthis.vertexCapacity&&(this.flush(),x=!0,y=this.setTexture2D(m));var T=this.vertexViewF32,w=this.vertexViewU32,b=this.vertexCount*this.vertexComponentCount-1;return T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=v,w[++b]=d,T[++b]=i,T[++b]=n,T[++b]=h,T[++b]=c,T[++b]=v,w[++b]=p,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=v,w[++b]=g,T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=v,w[++b]=d,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=v,w[++b]=g,T[++b]=o,T[++b]=a,T[++b]=u,T[++b]=l,T[++b]=v,w[++b]=f,this.vertexCount+=6,x},batchTri:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g){void 0===g&&(g=this.currentUnit);var v=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),v=!0,g=this.setTexture2D(p));var m=this.vertexViewF32,y=this.vertexViewU32,x=this.vertexCount*this.vertexComponentCount-1;return m[++x]=t,m[++x]=e,m[++x]=o,m[++x]=a,m[++x]=f,y[++x]=u,m[++x]=i,m[++x]=n,m[++x]=o,m[++x]=l,m[++x]=f,y[++x]=c,m[++x]=s,m[++x]=r,m[++x]=h,m[++x]=l,m[++x]=f,y[++x]=d,this.vertexCount+=3,v},bind:function(){return l.prototype.bind.call(this),this}});t.exports=u},function(t,e,i){var n={};t.exports=n;var r=i(100),o=i(43);n.fromVertices=function(t){for(var e={},i=0;i>>0;if("function"!=typeof t)throw new TypeError;for(var n=2<=arguments.length?arguments[1]:void 0,s=0;sthis.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.zoom<.001&&(e.zoom=.001)))},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},function(t,e,i){t.exports={Camera:i(297),BaseCamera:i(92),CameraManager:i(706),Effects:i(305),Events:i(41)}},function(t,e){t.exports="cameradestroy"},function(t,e){t.exports="camerafadeincomplete"},function(t,e){t.exports="camerafadeinstart"},function(t,e){t.exports="camerafadeoutcomplete"},function(t,e){t.exports="camerafadeoutstart"},function(t,e){t.exports="cameraflashcomplete"},function(t,e){t.exports="cameraflashstart"},function(t,e){t.exports="camerapancomplete"},function(t,e){t.exports="camerapanstart"},function(t,e){t.exports="postrender"},function(t,e){t.exports="prerender"},function(t,e){t.exports="camerarotatecomplete"},function(t,e){t.exports="camerarotatestart"},function(t,e){t.exports="camerashakecomplete"},function(t,e){t.exports="camerashakestart"},function(t,e){t.exports="camerazoomcomplete"},function(t,e){t.exports="camerazoomstart"},function(t,e,i){var n=i(17),s=i(0),l=i(41),r=new s({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,n,s,r,o,a){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=!1),void 0===o&&(o=null),void 0===a&&(a=this.camera.scene),!r&&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=n,this.blue=s,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=o,this._onUpdateScope=a;var h=t?l.FADE_OUT_START:l.FADE_IN_START;return this.camera.emit(h,this.camera,this,e,i,n,s),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsedthis.source?Math.abs(this.destination-this.source):Math.abs(this.destination+h)-this.source)<(u=this.source>this.destination?Math.abs(this.source-this.destination):Math.abs(this.source+h)-this.destination)?this.clockwise=!0:uMath.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},function(t,e,i){var n=i(124);t.exports=function(){return n(-Math.PI,Math.PI)}},function(t,e,i){var n=i(124);t.exports=function(){return n(-180,180)}},function(t,e,i){var n=i(323);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(13);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(e>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return 2.3283064365386963e-10*((this.n=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;e=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}s++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getTangentAt(h,e)}s++}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 r([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 o(t.x,t.y)):this.add(new o(t,e))},toJSON:function(){for(var t=[],e=0;e>16&255,g:t>>8&255,b:255&t,a:255};return 16777215>>24),e}},function(t,e,i){var h=i(31),l=i(356);t.exports=function(t,e,i){var n,s,r=i,o=i,a=i;return 0!==e&&(r=l(s=2*i-(n=i<.5?i*(1+e):i+e-i*e),n,t+1/3),o=l(s,n,t),a=l(s,n,t-1/3)),(new h).setGLTo(r,o,a,1)}},function(t,e,i){var s=i(172);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}},function(t,e,i){function o(t,e,i,n,s,r,o,a){void 0===o&&(o=100),void 0===a&&(a=0);var h=a/o;return{r:l(t,n,h),g:l(e,s,h),b:l(i,r,h)}}var l=i(121);t.exports={RGBWithRGB:o,ColorWithRGB:function(t,e,i,n,s,r){return void 0===s&&(s=100),void 0===r&&(r=0),o(t.r,t.g,t.b,e,i,n,s,r)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),o(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(178),s=i(31);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new s(n(t,e),n(t,e),n(t,e))}},function(t,e,i){var r=i(355);t.exports=function(t,e,i,n,s){return void 0===n&&(n=255),void 0===s&&(s="#"),"#"===s?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1):"0x"+r(n)+r(t)+r(e)+r(i)}},function(t,e,i){t.exports={BitmapMask:i(282),GeometryMask:i(283)}},function(t,e,i){var n={AddToDOM:i(128),DOMContentLoaded:i(357),GetScreenOrientation:i(358),GetTarget:i(363),ParseXML:i(364),RemoveFromDOM:i(184),RequestAnimationFrame:i(344)};t.exports=n},function(t,e,i){t.exports={EventEmitter:i(828)}},function(t,e,i){var n=i(0),s=i(11),r=i(23),o=new n({Extends:s,initialize:function(){s.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",o,"events"),t.exports=o},function(t,e,i){var n=i(128),s=i(293),r=i(296),o=i(26),a=i(0),h=i(318),l=i(830),u=i(340),c=i(118),d=i(342),f=i(319),p=i(357),g=i(11),v=i(20),m=i(365),y=i(23),x=i(370),T=i(371),w=i(373),b=i(127),E=i(376),S=i(343),_=i(345),A=i(380),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 g,this.anims=new s(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=f,this.scale=new T(this,this.config),this.sound=null,this.sound=A.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,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),n(this.canvas,this.config.parent),this.textures.once(b.READY,this.texturesReady,this),this.events.emit(v.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(v.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)),_(this);var t=this.events;t.on(v.HIDDEN,this.onHidden,this),t.on(v.VISIBLE,this.onVisible,this),t.on(v.BLUR,this.onBlur,this),t.on(v.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e);var n=this.renderer;n.preRender(),i.emit(v.PRE_RENDER,n,t,e),this.scene.render(n),n.postRender(),i.emit(v.POST_RENDER,n,t,e)},headlessStep:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e),i.emit(v.PRE_RENDER),i.emit(v.POST_RENDER)},onHidden:function(){this.loop.pause(),this.events.emit(v.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(v.RESUME)},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(v.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},function(t,e,i){var n=i(128);t.exports=function(t){var e,i=t.config;i.parent&&i.domCreateContainer&&((e=document.createElement("div")).style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: none;","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=e,n(e,i.parent))}},function(t,e){t.exports="boot"},function(t,e){t.exports="destroy"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameout"},function(t,e){t.exports="gameover"},function(t,e){t.exports="gameobjectdown"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameobjectmove"},function(t,e){t.exports="gameobjectout"},function(t,e){t.exports="gameobjectover"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="wheel"},function(t,e){t.exports="gameobjectup"},function(t,e){t.exports="gameobjectwheel"},function(t,e){t.exports="boot"},function(t,e){t.exports="process"},function(t,e){t.exports="update"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointerdownoutside"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="pointerupoutside"},function(t,e){t.exports="wheel"},function(t,e){t.exports="pointerlockchange"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="start"},function(t,e){t.exports="update"},function(t,e){t.exports=function(t){if(!t)return window.innerHeight;var e=Math.abs(window.orientation),i={w:0,h:0},n=document.createElement("div");return n.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(n),i.w=90===e?n.offsetHeight:window.innerWidth,i.h=90===e?window.innerWidth:n.offsetHeight,document.documentElement.removeChild(n),n=null,90!==Math.abs(window.orientation)?i.h:i.w}},function(t,e){t.exports="addfile"},function(t,e){t.exports="complete"},function(t,e){t.exports="filecomplete"},function(t,e){t.exports="filecomplete-"},function(t,e){t.exports="loaderror"},function(t,e){t.exports="load"},function(t,e){t.exports="fileprogress"},function(t,e){t.exports="postprocess"},function(t,e){t.exports="progress"},function(t,e){t.exports="start"},function(t,e,i){var r=i(2),o=i(187);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=r(t.settings,"physics",!1);if(e||i){var n=[];if(e&&n.push(o(e+"Physics")),i)for(var s in i)s=o(s.concat("Physics")),-1===n.indexOf(s)&&n.push(s);return n}}},function(t,e,i){var n=i(2);t.exports=function(t){var e=t.plugins.getDefaultScenePlugins(),i=n(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},function(t,e,i){t.exports={game:"game",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"}},function(t,e){t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var s=i.getElementsByTagName("SubTexture"),r=0;r=t.length)throw new Error("Supplied index out of bounds");return n!==i&&(t.splice(n,1),t.splice(i,0,e)),e}},function(t,e){t.exports=function(t,e){var i,n,s=t.indexOf(e);return-1!==s&&st.length-1)throw new Error("Index out of bounds");var s=r(t,e);return i&&i.call(n,s),s}},function(t,e,i){var l=i(68);t.exports=function(t,e,i,n,s){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===s&&(s=t),l(t,e,i)){var r=i-e,o=t.splice(e,r);if(n)for(var a=0;a?@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"}},function(t,e,i){var T=i(6);t.exports=function(t,e){var i=e.width,n=e.height,s=Math.floor(i/2),r=Math.floor(n/2),o=T(e,"chars","");if(""!==o){var a=T(e,"image",""),h=T(e,"offset.x",0),l=T(e,"offset.y",0),u=T(e,"spacing.x",0),c=T(e,"spacing.y",0),d=T(e,"lineSpacing",0),f=T(e,"charsPerRow",null);null===f&&(f=t.sys.textures.getFrame(a).width/i)>o.length&&(f=o.length);for(var p=h,g=l,v={retroFont:!0,font:a,size:i,lineHeight:n+d,chars:{}},m=0,y=0;yr.vertexCapacity&&r.flush();for(var g=r.setGameObject(e),v=r.vertexViewF32,m=r.vertexViewU32,y=r.vertexCount*r.vertexComponentCount-1,x=0,T=e.tintFill,w=0;w=i&&t.x<=n&&t.y>=s&&t.y<=r}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===r&&(r=0),!(e>t.right+r||it.bottom+r||s=n&&(p.push(v),f=v)}var m=o[o.length-1];return y(f,m)i&&(i=a.x),a.xs&&(s=a.y),a.yn(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)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){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}},function(t,e,i){var r=i(9);t.exports=function(t,e,i,n,s){return void 0===s&&(s=new r),s.setTo(Math.min(t,i),Math.min(e,n),Math.abs(t-i),Math.abs(e-n))}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.centerX,e.y=t.centerY,e}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var r=i(174);t.exports=function(t,e,i){var n=t.centerX,s=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),r(t,n,s)}},function(t,e,i){var n=i(9),s=i(141);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(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}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){var a=i(4),h=i(40);t.exports=function(t,e,i){void 0===i&&(i=new a),e=h(e);var n=Math.sin(e),s=Math.cos(e),r=0=s||0=t.downTime+n)&&(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;it._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,n=0;n'),i.push(''),i.push(''),i.push(this.xhrLoader.responseText),i.push(""),i.push(""),i.push("");var n=[i.join("\n")],s=this;try{var r=new window.Blob(n,{type:"image/svg+xml;charset=utf-8"})}catch(t){return s.state=o.FILE_ERRORED,void s.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){l.revokeObjectURL(s.data),s.onProcessComplete()},this.data.onerror=function(){l.revokeObjectURL(s.data),s.onProcessError()},l.createObjectURL(this.data,r,"image/svg+xml")},addToCache:function(){var t=this.cache.addImage(this.key,this.data);this.pendingDestroy(t)}});s.register("htmlTexture",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;re.deltaAbsY()?g=-1:e.deltaAbsX()i&&s<(o=t.right-i)&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:c(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):0i&&s<(o=t.bottom-i)&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:c(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):0=n[2];if("^"===i.operator)return 0=i.number:0=n[2]:r[2]===n[2]}return t===e||"*"===t}},function(t,e,i){var n={};t.exports=n;var s=i(153),r=(i(225),i(43));n.create=function(t){var e=s.create(),i={label:"World",gravity:{x:0,y:1,scale:.001},bounds:{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}};return r.extend(e,i,t)}},function(t,e,i){var y={};t.exports=y;var a=i(476),n=i(519),r=i(43);y.create=function(t){var e={controller:y,detector:n.collisions,buckets:{},pairs:{},pairsList:[],bucketWidth:48,bucketHeight:48};return r.extend(e,t)},y.update=function(t,e,i,n){for(var s,r,o,a=i.world,h=t.buckets,l=!1,u=i.metrics,c=u.broadphaseTests=0;ca.bounds.max.x||d.bounds.max.ya.bounds.max.y)){var f=y._getRegion(t,d);if(!d.region||f.id!==d.region.id||n){u.broadphaseTests+=1,d.region&&!n||(d.region=f);for(var p=y._regionUnion(f,d.region),g=p.startCol;g<=p.endCol;g++)for(s=p.startRow;s<=p.endRow;s++){r=h[o=y._getBucketId(g,s)];var v=g>=f.startCol&&g<=f.endCol&&s>=f.startRow&&s<=f.endRow,m=g>=d.region.startCol&&g<=d.region.endCol&&s>=d.region.startRow&&s<=d.region.endRow;!v&&m&&m&&r&&y._bucketRemoveBody(t,r,d),(d.region===f||v&&!m||n)&&(r=r||y._createBucket(h,o),y._bucketAddBody(t,r,d))}d.region=f,l=!0}}}l&&(t.pairsList=y._createActivePairsList(t))},y.clear=function(t){t.buckets={},t.pairs={},t.pairsList=[]},y._regionUnion=function(t,e){var i=Math.min(t.startCol,e.startCol),n=Math.max(t.endCol,e.endCol),s=Math.min(t.startRow,e.startRow),r=Math.max(t.endRow,e.endRow);return y._createRegion(i,n,s,r)},y._getRegion=function(t,e){var i=e.bounds,n=Math.floor(i.min.x/t.bucketWidth),s=Math.floor(i.max.x/t.bucketWidth),r=Math.floor(i.min.y/t.bucketHeight),o=Math.floor(i.max.y/t.bucketHeight);return y._createRegion(n,s,r,o)},y._createRegion=function(t,e,i,n){return{id:t+","+e+","+i+","+n,startCol:t,endCol:e,startRow:i,endRow:n}},y._getBucketId=function(t,e){return"C"+t+"R"+e},y._createBucket=function(t,e){return t[e]=[]},y._bucketAddBody=function(t,e,i){for(var n=0;nl._pairMaxIdleLife&&a.push(h);for(h=0;hu.friction*u.frictionStatic*R*i&&(F=M,L=U.clamp(u.friction*P*i,-F,F));var k,D,I=X.cross(w,p),B=X.cross(b,p),N=m/(d.inverseMass+f.inverseMass+d.inverseInertia*I*I+f.inverseInertia*B*B);O*=N,L*=N,A<0&&A*A>Y._restingThresh*i?x.normalImpulse=0:(k=x.normalImpulse,x.normalImpulse=Math.min(x.normalImpulse+O,0),O=x.normalImpulse-k),C*C>Y._restingThreshTangent*i?x.tangentImpulse=0:(D=x.tangentImpulse,x.tangentImpulse=U.clamp(x.tangentImpulse+L,-F,F),L=x.tangentImpulse-D),n.x=p.x*O+g.x*L,n.y=p.y*O+g.y*L,d.isStatic||d.isSleeping||(d.positionPrev.x+=n.x*d.inverseMass,d.positionPrev.y+=n.y*d.inverseMass,d.anglePrev+=X.cross(w,n)*d.inverseInertia),f.isStatic||f.isSleeping||(f.positionPrev.x-=n.x*f.inverseMass,f.positionPrev.y-=n.y*f.inverseMass,f.anglePrev-=X.cross(b,n)*f.inverseInertia)}}}}},function(t,e,i){t.exports={BasePlugin:i(477),DefaultPlugins:i(180),PluginCache:i(23),PluginManager:i(370),ScenePlugin:i(1317)}},function(t,e,i){var n=i(477),s=i(0),r=i(22),o=new s({Extends:n,initialize:function(t,e){n.call(this,e),this.scene=t,this.systems=t.sys,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},function(t,e,i){var n=i(19),s=i(183),r=n(!1,r={Center:i(359),Events:i(93),Orientation:i(360),ScaleManager:i(371),ScaleModes:i(361),Zoom:i(362)},s.CENTER);r=n(!1,r,s.ORIENTATION),r=n(!1,r,s.SCALE_MODE),r=n(!1,r,s.ZOOM),t.exports=r},function(t,e,i){var n=i(131),s=i(19)(!1,s={Events:i(22),SceneManager:i(373),ScenePlugin:i(1320),Settings:i(375),Systems:i(186)},n);t.exports=s},function(t,e,i){var n=i(17),s=i(0),a=i(22),h=i(2),r=i(23),o=new s({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(a.BOOT,this.boot,this),t.sys.events.on(a.START,this.pluginStart,this)},boot:function(){this.systems.events.once(a.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(a.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=h(t,"target",!1),i=this.manager.getScene(e);if(!e||!this.checkValidTransition(i))return!1;var n=h(t,"duration",1e3);this._elapsed=0,this._target=i,this._duration=n,this._willSleep=h(t,"sleep",!1),this._willRemove=h(t,"remove",!1);var s=h(t,"onUpdate",null);s&&(this._onUpdate=s,this._onUpdateScope=h(t,"onUpdateScope",this.scene));var r=h(t,"allowInput",!1);this.settings.transitionAllowInput=r;var o=i.sys.settings;return o.isTransition=!0,o.transitionFrom=this.scene,o.transitionDuration=n,o.transitionAllowInput=r,h(t,"moveAbove",!1)?this.manager.moveAbove(this.key,e):h(t,"moveBelow",!1)&&this.manager.moveBelow(this.key,e),i.sys.isSleeping()?i.sys.wake(h(t,"data")):this.manager.start(e,h(t,"data")),this.systems.events.emit(a.TRANSITION_OUT,i,n),this.systems.events.on(a.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=n(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(a.UPDATE,this.step,this),t.events.emit(a.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,n){return this.manager.add(t,e,i,n)},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 n=this.manager.getScene(e);return n&&n.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)},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(a.SHUTDOWN,this.shutdown,this),t.off(a.POST_UPDATE,this.step,this),t.off(a.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(a.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});r.register("ScenePlugin",o,"scenePlugin"),t.exports=o},function(t,e,i){t.exports={List:i(135),Map:i(168),ProcessQueue:i(192),RTree:i(473),Set:i(139),Size:i(372)}},function(t,e,i){var n=i(19),s=i(1323),r=n(!1,r={CanvasTexture:i(377),Events:i(127),FilterMode:s,Frame:i(95),Parsers:i(379),Texture:i(188),TextureManager:i(376),TextureSource:i(378)},s);t.exports=r},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){t.exports={Components:i(147),Parsers:i(1354),Formats:i(32),ImageCollection:i(488),ParseToTilemap:i(233),Tile:i(74),Tilemap:i(497),TilemapCreator:i(1368),TilemapFactory:i(1369),Tileset:i(105),LayerData:i(103),MapData:i(104),ObjectLayer:i(491),DynamicTilemapLayer:i(498),StaticTilemapLayer:i(499)}},function(t,e,i){var p=i(24),g=i(52);t.exports=function(t,e,i,n,s,r,o,a){t<0&&(t=0),e<0&&(e=0),void 0===o&&(o=!0);for(var h=p(t,e,i,n,null,a),l=s-t,u=r-e,c=0;c=t&&l.index<=e&&u(l,i)}n&&c(0,0,s.width,s.height,s)}}},function(t,e,i){var a=i(73),h=i(52),l=i(228);t.exports=function(t,e,i,n){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var s=0;s=s.delay&&(n=s.elapsed-s.delay,s.elapsed=s.delay,!s.hasDispatched&&s.callback&&(s.hasDispatched=!0,s.callback.apply(s.callbackScope,s.args)),0>2],s+=o[(3&i[r])<<4|i[r+1]>>4],s+=o[(15&i[r+1])<<2|i[r+2]>>6],s+=o[63&i[r+2]];return n%3==2?s=s.substring(0,s.length-1)+"=":n%3==1&&(s=s.substring(0,s.length-2)+"=="),s}},function(t,e,i){t.exports={Clone:i(67),Extend:i(19),GetAdvancedValue:i(15),GetFastValue:i(2),GetMinMaxValue:i(1394),GetValue:i(6),HasAll:i(1395),HasAny:i(407),HasValue:i(112),IsPlainObject:i(7),Merge:i(132),MergeRight:i(1396),Pick:i(489),SetValue:i(427)}},function(t,e,i){var o=i(6),a=i(17);t.exports=function(t,e,i,n,s){void 0===s&&(s=i);var r=o(t,e,s);return a(r,i,n)}},function(t,e){t.exports=function(t,e){for(var i=0;ii[e][0])&&(e=n);return!S(P(t,e-1),P(t,e),P(t,e+1))&&(function(t){for(var e=[],i=t.length,n=0;n!==i;n++)e.push(t.pop());for(n=0;n!==i;n++)t[n]=e[n]}(t),!0)}};var u=[],c=[];function M(t,e){var i=e[0]-t[0],n=e[1]-t[1];return i*i+n*n}function P(t,e){var i=t.length;return t[e<0?e%i+i:e%i]}function O(t,e,i,n){for(var s=i;sn.deltaMax?n.deltaMax:e)/n.delta,n.delta=e),0!==n.timeScalePrev&&(r*=s.timeScale/n.timeScalePrev),0===s.timeScale&&(r=0),n.timeScalePrev=s.timeScale,n.correction=r,n.frameCounter+=1,1e3<=t-n.counterTimestamp&&(n.fps=n.frameCounter*((t-n.counterTimestamp)/1e3),n.counterTimestamp=t,n.frameCounter=0),T.update(i,e,r))},step:function(t,e){T.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!==u.get(this.localWorld,e.id,e.type)},getAllBodies:function(){return u.allBodies(this.localWorld)},getAllConstraints:function(){return u.allConstraints(this.localWorld)},getAllComposites:function(){return u.allComposites(this.localWorld)},postUpdate:function(){var t,e,i,n;this.drawDebug&&(t=this.debugConfig,e=this.engine,i=this.debugGraphic,n=u.allBodies(this.localWorld),this.debugGraphic.clear(),t.showBroadphase&&e.broadphase.controller&&this.renderGrid(e.broadphase,i,t.broadphaseColor,.5),t.showBounds&&this.renderBodyBounds(n,i,t.boundsColor,.5),(t.showBody||t.showStaticBody)&&this.renderBodies(n),t.showJoint&&this.renderJoints(),(t.showAxes||t.showAngleIndicator)&&this.renderBodyAxes(n,i,t.showAxes,t.angleColor,.5),t.showVelocity&&this.renderBodyVelocity(n,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,n){e.lineStyle(1,i,n);for(var s=y.keys(t.buckets),r=0;re.max.x?i=e.min.x-t.max.x:t.max.xe.max.y?n=e.min.y-t.max.y:t.max.y Date: Fri, 21 Aug 2020 16:42:44 +0100 Subject: [PATCH 046/241] Update CHANGELOG.md --- CHANGELOG.md | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 55a3cc203..7427c3710 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ If you use a custom WebGL Pipeline in your game, you must update in order to use Phaser 3.50. -Due to the huge amount of work that has taken place in this area, all of the pipelines have been renamed. If you extend any of these pipelines, or use them in your game code (referenced by name), then please update accordingly. The name changes are: +Due to the huge amount of work that has taken place in this area, all of the pipelines have been renamed. If you extend any of these pipelines or use them in your game code (referenced by name), then please update accordingly. The name changes are: * `TextureTintPipeline` is now called the `MultiPipeline`. * `TextureTintStripPipeline` is now called the `RopePipeline`. @@ -22,14 +22,14 @@ Other pipeline changes are as follows: * `Types.Renderer.WebGL.WebGLPipelineConfig` is a new TypeDef that helps you easily configure your own Custom Pipeline when using TypeScript and also provides better JSDocs. * `Types.Renderer.WebGL.WebGLPipelineAttributesConfig` is a new TypeDef that helps you easily configure the attributes for your own Custom Pipelines when using TypeScript and also provides better JSDocs. -* All piplines will now work out the `renderer` property automatically, so it's no longer required in the config. -* All piplines will now work out the `gl` property automatically, so it's no longer required in the config. -* All piplines will now extract the `name` property from the config, allowing you to set it externally. -* All piplines will now extract the `vertexCapacity` property from the config, allowing you to set it externally. -* All piplines will now extract the `vertexSize` property from the config, allowing you to set it externally. -* All piplines will now extract the `vertexData` property from the config, allowing you to set it externally. -* All piplines will now extract the `attributes` property from the config, allowing you to set it externally. -* All piplines will now extract the `topology` property from the config, allowing you to set it externally. +* All pipelines will now work out the `renderer` property automatically, so it's no longer required in the config. +* All pipelines will now work out the `gl` property automatically, so it's no longer required in the config. +* All pipelines will now extract the `name` property from the config, allowing you to set it externally. +* All pipelines will now extract the `vertexCapacity` property from the config, allowing you to set it externally. +* All pipelines will now extract the `vertexSize` property from the config, allowing you to set it externally. +* All pipelines will now extract the `vertexData` property from the config, allowing you to set it externally. +* All pipelines will now extract the `attributes` property from the config, allowing you to set it externally. +* All pipelines will now extract the `topology` property from the config, allowing you to set it externally. #### Single Pipeline @@ -37,9 +37,9 @@ There is also a new pipeline called `SinglePipeline`, created to emulate the old ### WebGL Multi-Texture Rendering -The Multi Pipeline (previously the Texture Tint Pipeline) has had its core flow rewritten to eliminate the need for constantly creating `batch` objects. Instead, it now supports the new multi-texture shader, vastly increasing rendering performance, especially on drawcall-bound systems. +The Multi Pipeline (previously the Texture Tint Pipeline) has had its core flow rewritten to eliminate the need for constantly creating `batch` objects. Instead, it now supports the new multi-texture shader, vastly increasing rendering performance, especially on draw call-bound systems. -All of the internal functions, such as `batchQuad` and `batchSprite` have been updated to use the new method of texture setting. The method signatures all remain the same, unless indicated below. +All of the internal functions, such as `batchQuad` and `batchSprite` have been updated to use the new method of texture setting. The method signatures all remain the same unless indicated below. * `Config.render.maxTextures` is a new game config setting that allows you to control how many texture units will be used in WebGL. * `WebGL.Utils.checkShaderMax` is a new function, used internally by the renderer, to determine the maximum number of texture units the GPU + browser supports. @@ -71,14 +71,14 @@ All of the internal functions, such as `batchQuad` and `batchSprite` have been u * `WebGLRenderer.setTextureSource` is a new method, used by pipelines and Game Objects, that will assign a texture unit to the given Texture Source. * The `WebGLRenderer.setTexture2D` method has been updated to use the new texture unit assignment. It no longer takes the `textureUnit` or `flush` parameters and these have been removed from its method signature. * `WebGLRenderer.setTextureZero` is a new method that activates texture zero and binds the given texture to it. Useful for fbo backed game objects. -* `WebGLRenderer.clearTextureZero` is a new method that clears the texture tha was bound to unit zero. +* `WebGLRenderer.clearTextureZero` is a new method that clears the texture that was bound to unit zero. * `WebGLRenderer.textureZero` is a new property that holds the currently bound unit zero texture. * `WebGLRenderer.normalTexture` is a new property that holds the currently bound normal map (texture unit one). * `WebGLRenderer.setNormalMap` is a new method that sets the current normal map texture. * `WebGLRenderer.clearNormalMap` is a new method that clears the current normal map texture. -* `WebGLRenderer.resetTextures` is a new method that flushes the pipeline, resets all textures back to the temporary ones and resets the active texture counter. +* `WebGLRenderer.resetTextures` is a new method that flushes the pipeline, resets all textures back to the temporary ones, and resets the active texture counter. * `WebGLPipeline.boot` will now check all of the attributes and store the pointer location within the attribute entry. -* `WebGLPipeline.bind` no longer looks-up and enables every attribute, every frame. Instead it uses the cached pointer location stored in the attribute entry, cutting down on redundant WebGL operations. +* `WebGLPipeline.bind` no longer looks-up and enables every attribute, every frame. Instead, it uses the cached pointer location stored in the attribute entry, cutting down on redundant WebGL operations. * `WebGLRenderer.isNewNormalMap` is a new method that returns a boolean if the given parameters are not currently used. * `WebGLPipeline.forceZero` is a new property that informs Game Objects if the pipeline requires a zero bound texture unit. * `WebGLPipeline.setAttribPointers` is a new method that will set the vertex attribute pointers for the pipeline. @@ -147,11 +147,11 @@ If you used any of them in your code, please update to the new function names be ### BitmapText New Features, Updates and API Changes -* `BitmapText.setCharacterTint` is a new method that allows you to set a tint color (either additive, or fill) on a specific range of characters within a static Bitmap Text. You can specify the start and length offsets and a per-corner tint color. -* `BitmapText.setWordTint` is a new method that allows you to set a tint color (either additive, or fill) on all matching words within a static Bitmap Text. You can specify the word by string, or numeric offset, and the number of replacements to tint. +* `BitmapText.setCharacterTint` is a new method that allows you to set a tint color (either additive or fill) on a specific range of characters within a static Bitmap Text. You can specify the start and length offsets and per-corner tint colors. +* `BitmapText.setWordTint` is a new method that allows you to set a tint color (either additive or fill) on all matching words within a static Bitmap Text. You can specify the word by string, or numeric offset, and the number of replacements to tint. * `BitmapText.setDropShadow` is a new method that allows you to apply a drop shadow effect to a Bitmap Text object. You can set the horizontal and vertical offset of the shadow, as well as the color and alpha levels. Call this method with no parameters to clear a shadow. * `BitmapTextWebGLRenderer` has been rewritten from scratch to make use of the new pre-cached WebGL uv texture and character location data generated by `GetBitmapTextSize`. This has reduced the number of calculations made in the function dramatically, as it no longer has work out glyph advancing or offsets during render, but only when the text content updates. -* `BitmapText.getCharacterAt` is a new method that will return the character data from the BitmapText at the given `x` and `y` corodinates. The character data includes the code, position, dimensions and glyph information. +* `BitmapText.getCharacterAt` is a new method that will return the character data from the BitmapText at the given `x` and `y` coordinates. The character data includes the code, position, dimensions, and glyph information. * The `BitmapTextSize` object returned by `BitmapText.getTextBounds` has a new property called `characters` which is an array that contains the scaled position coordinates of each character in the BitmapText, which you could use for tasks such as determining which character in the BitmapText was clicked. * `ParseXMLBitmapFont` will now calculate the WebGL uv data for the glyphs during parsing. This avoids it having to be done during rendering, saving CPU cycles on an operation that never changes. * `ParseXMLBitmapFont` will now create a Frame object for each glyph. This means you could, for example, create a Sprite using the BitmapText texture and the glyph as the frame key, i.e.: `this.add.sprite(x, y, fontName, 'A')`. @@ -183,7 +183,7 @@ If you used any of them in your code, please update to the new function names be * `Phaser.Types.Math.Vector3Like` is a new data type representing as Vector 3 like object. * `Phaser.Types.Math.Vector4Like` is a new data type representing as Vector 4 like object. * `Transform.getLocalPoint` is a new method, available on all Game Objects, that takes an `x` / `y` pair and translates them into the local space of the Game Object, factoring in parent transforms and display origins. -* The `KeyboardPlugin` will now track the key code and timestamp of the previous key pressed and compare it to the current event. If they match, it will skip the event. On some systems if you were to type quickly, you would sometimes get duplicate key events firing (the exact same event firing more than once). This is now prevented from happening. +* The `KeyboardPlugin` will now track the key code and timestamp of the previous key pressed and compare it to the current event. If they match, it will skip the event. On some systems, if you were to type quickly, you would sometimes get duplicate key events firing (the exact same event firing more than once). This is now prevented from happening. * `Display.Color.GetColorFromValue` is a new function that will take a hex color value and return it as an integer, for use in WebGL. This is now used internally by the Tint component and other classes. * `Utils.String.RemoveAt` is a new function that will remove a character from the given index in a string and return the new string. * `Frame.setUVs` is a new method that allows you to directly set the canvas and UV data for a frame. Use this if you need to override the values set automatically during frame creation. @@ -219,11 +219,11 @@ If you used any of them in your code, please update to the new function names be * The `KeyboardManager` and `KeyboardPlugin` were both still checking for the `InputManager.useQueue` property, which was removed several versions ago. * In Arcade Physics, Dynamic bodies would no longer hit walls when riding on horizontally moving platforms. The horizontal (and vertical) friction is now re-applied correctly in these edge-cases. Fix #5210 (thanks @Dercetech @samme) * Calling `Rectangle.setSize()` wouldn't change the underlying geometry of the Shape Game Object, causing any stroke to be incorrectly rendered after a size change. -* The `ProcessQueue` was emiting the wrong events internally. It now emits 'add' and 'remove' correctly (thanks @halilcakar) +* The `ProcessQueue` was emitting the wrong events internally. It now emits 'add' and 'remove' correctly (thanks @halilcakar) ### Examples, Documentation and TypeScript -My thanks to the following for helping with the Phaser 3 Examples, Docs and TypeScript definitions, either by reporting errors, fixing them or helping author the docs: +My thanks to the following for helping with the Phaser 3 Examples, Docs, and TypeScript definitions, either by reporting errors, fixing them, or helping author the docs: @samme @16patsle @scott20145 @khasanovbi @mk360 From 3484ded2b7480c1c142613aca5648d61f081710f Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 22 Aug 2020 10:33:46 +0100 Subject: [PATCH 047/241] You can now use `this.renderer` from within a Scene, as it's now a Scene-level property and part of the Injection Map. --- src/scene/InjectionMap.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/scene/InjectionMap.js b/src/scene/InjectionMap.js index 1d5cec1d5..c36d6f273 100644 --- a/src/scene/InjectionMap.js +++ b/src/scene/InjectionMap.js @@ -17,6 +17,7 @@ var InjectionMap = { game: 'game', + renderer: 'renderer', anims: 'anims', cache: 'cache', From 2be33489eda79104f1748827a093d454f12e3aae Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 22 Aug 2020 10:33:49 +0100 Subject: [PATCH 048/241] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7427c3710..2854686e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -190,6 +190,7 @@ If you used any of them in your code, please update to the new function names be * `TweenManager.getTweensOf` has a new parameter `includePending`. If set, it will also check the pending tweens for the given targets and return those in the results as well. Fix #5260 (thanks @pcharest2000) * `WebGLPipeline.hasBooted` is a new boolean property that tracks if the pipeline has been booted or not, which is now far more important in 3.5 than in previous versions. This is checked in the `WebGLRenderer.addPipeline` method, and if not set, the pipeline is booted. Fix #5251 #5255 (thanks @telinc1 @rexrainbow) * The WebGL Renderer will now add the pipelines during the `boot` method, instead of `init`. +* You can now use `this.renderer` from within a Scene, as it's now a Scene-level property and part of the Injection Map. ### Updates and API Changes From f61040d98a056a40fd8c208e08a3cb48d1ab9e01 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 22 Aug 2020 10:33:55 +0100 Subject: [PATCH 049/241] Update package-lock.json --- package-lock.json | 40 ++++++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8f3c64dc1..74a1d907b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -431,7 +431,7 @@ "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "integrity": "sha1-vNZ5HqWuCXJeF+WtmIE0zUCz2RE=", "dev": true, "requires": { "sprintf-js": "~1.0.2" @@ -639,6 +639,16 @@ "dev": true, "optional": true }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "optional": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, "bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", @@ -654,7 +664,7 @@ "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", "dev": true, "requires": { "balanced-match": "^1.0.0", @@ -1155,7 +1165,7 @@ "concat-stream": { "version": "1.6.2", "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "integrity": "sha1-kEvfGUzTEi/Gdcd/xKw9T/D9GjQ=", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -1703,7 +1713,7 @@ "esrecurse": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "integrity": "sha1-AHo7n9vCs7uH5IeeoZyS/b05Qs8=", "dev": true, "requires": { "estraverse": "^4.1.0" @@ -1988,6 +1998,13 @@ "flat-cache": "^2.0.1" } }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true, + "optional": true + }, "fill-range": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", @@ -3032,7 +3049,7 @@ "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -3148,6 +3165,13 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "nan": { + "version": "2.14.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz", + "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==", + "dev": true, + "optional": true + }, "nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", @@ -4899,7 +4923,11 @@ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", "dev": true, - "optional": true + "optional": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + } }, "glob-parent": { "version": "3.1.0", From 5ab9e2e6772b85c5421f4fcf00e138d14b879882 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 24 Aug 2020 14:27:36 +0100 Subject: [PATCH 050/241] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2854686e5..e8bde4c52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -221,6 +221,7 @@ If you used any of them in your code, please update to the new function names be * In Arcade Physics, Dynamic bodies would no longer hit walls when riding on horizontally moving platforms. The horizontal (and vertical) friction is now re-applied correctly in these edge-cases. Fix #5210 (thanks @Dercetech @samme) * Calling `Rectangle.setSize()` wouldn't change the underlying geometry of the Shape Game Object, causing any stroke to be incorrectly rendered after a size change. * The `ProcessQueue` was emitting the wrong events internally. It now emits 'add' and 'remove' correctly (thanks @halilcakar) +* The `GridAlign` action didn't work if only the `height` parameter was set. Fix #5019 (thanks @halilcakar) ### Examples, Documentation and TypeScript From f586cd472a19cfb77e019d681ca37bb56d3e3269 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 24 Aug 2020 14:47:53 +0100 Subject: [PATCH 051/241] `global.Phaser = Phaser` has been removed, as it's no longer required by the UMD loader, which should make importing in Angular 10 easier. Fix #5212 --- src/phaser-arcade-physics.js | 4 +--- src/phaser-core.js | 4 +--- src/phaser.js | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/phaser-arcade-physics.js b/src/phaser-arcade-physics.js index d33ebc11d..bd46e044d 100644 --- a/src/phaser-arcade-physics.js +++ b/src/phaser-arcade-physics.js @@ -15,7 +15,7 @@ var Extend = require('./utils/object/Extend'); /** * The root types namespace. - * + * * @namespace Phaser.Types * @since 3.17.0 */ @@ -69,8 +69,6 @@ if (typeof FEATURE_SOUND) module.exports = Phaser; -global.Phaser = Phaser; - /* * "Documentation is like pizza: when it is good, it is very, very good; * and when it is bad, it is better than nothing." diff --git a/src/phaser-core.js b/src/phaser-core.js index 512d78118..f63fa1d4d 100644 --- a/src/phaser-core.js +++ b/src/phaser-core.js @@ -15,7 +15,7 @@ var Extend = require('./utils/object/Extend'); /** * The root types namespace. - * + * * @namespace Phaser.Types * @since 3.17.0 */ @@ -114,8 +114,6 @@ if (typeof FEATURE_SOUND) module.exports = Phaser; -global.Phaser = Phaser; - /* * "Documentation is like pizza: when it is good, it is very, very good; * and when it is bad, it is better than nothing." diff --git a/src/phaser.js b/src/phaser.js index e0635c19e..02d339990 100644 --- a/src/phaser.js +++ b/src/phaser.js @@ -76,7 +76,7 @@ Phaser = Extend(false, Phaser, CONST); /** * The root types namespace. - * + * * @namespace Phaser.Types * @since 3.17.0 */ @@ -85,8 +85,6 @@ Phaser = Extend(false, Phaser, CONST); module.exports = Phaser; -global.Phaser = Phaser; - /* * "Documentation is like pizza: when it is good, it is very, very good; * and when it is bad, it is better than nothing." From 16dbcfef2288b129a352478111bdc4ae1dac76a3 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 24 Aug 2020 14:47:55 +0100 Subject: [PATCH 052/241] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e8bde4c52..971d7abd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -211,6 +211,7 @@ If you used any of them in your code, please update to the new function names be * The constant `Phaser.Renderer.WebGL.UNSIGNED_BYTE` value has been removed as it wasn't used internally. * The constant `Phaser.Renderer.WebGL.UNSIGNED_SHORT` value has been removed as it wasn't used internally. * The constant `Phaser.Renderer.WebGL.FLOAT` value has been removed as it wasn't used internally. +* `global.Phaser = Phaser` has been removed, as it's no longer required by the UMD loader, which should make importing in Angular 10 easier. Fix #5212 (thanks @blackyale) ### Bug Fixes From 1766f66984a7ba2e7e23fa7e27f30cddcf4131f0 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 24 Aug 2020 14:58:24 +0100 Subject: [PATCH 053/241] Update JSDocs --- src/gameobjects/domelement/DOMElement.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gameobjects/domelement/DOMElement.js b/src/gameobjects/domelement/DOMElement.js index 4e672e11b..0171b6c84 100644 --- a/src/gameobjects/domelement/DOMElement.js +++ b/src/gameobjects/domelement/DOMElement.js @@ -30,6 +30,9 @@ var Vector4 = require('../../math/Vector4'); * of the game canvas. This div is sized to match the canvas, and if the canvas size changes, as a result of * settings within the Scale Manager, the dom container is resized accordingly. * + * If you have not already done so, you have to provide a `parent` in the Game Configuration, or the DOM + * Container will fail to be created. + * * You can create a DOM Element by either passing in DOMStrings, or by passing in a reference to an existing * Element that you wish to be placed under the control of Phaser. For example: * From 2af65b2a1de93d51c0c303ab955011f8a71c6c03 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 24 Aug 2020 15:04:00 +0100 Subject: [PATCH 054/241] Improved JSDocs and types. Fix #5217 --- src/animations/typedefs/Animation.js | 2 +- src/animations/typedefs/AnimationFrame.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/animations/typedefs/Animation.js b/src/animations/typedefs/Animation.js index 284c4eb73..61f57c290 100644 --- a/src/animations/typedefs/Animation.js +++ b/src/animations/typedefs/Animation.js @@ -3,7 +3,7 @@ * @since 3.0.0 * * @property {string} [key] - The key that the animation will be associated with. i.e. sprite.animations.play(key) - * @property {Phaser.Types.Animations.AnimationFrame[]} [frames] - An object containing data used to generate the frames for the animation + * @property {Phaser.Types.Animations.AnimationFrame[]} [frames] - An object containing data used to generate the frames for the animation. * @property {string} [defaultTextureKey=null] - The key of the texture all frames of the animation will use. Can be overridden on a per frame basis. * @property {integer} [frameRate] - The frame rate of playback in frames per second (default 24 if duration is null) * @property {integer} [duration] - How long the animation should play for in milliseconds. If not given its derived from frameRate. diff --git a/src/animations/typedefs/AnimationFrame.js b/src/animations/typedefs/AnimationFrame.js index 8b0126106..f19ccd637 100644 --- a/src/animations/typedefs/AnimationFrame.js +++ b/src/animations/typedefs/AnimationFrame.js @@ -2,8 +2,8 @@ * @typedef {object} Phaser.Types.Animations.AnimationFrame * @since 3.0.0 * - * @property {string} key - The key that the animation will be associated with. i.e. sprite.animations.play(key) - * @property {(string|number)} frame - The key, or index number, of the frame within the animation. + * @property {string} key - The key of the texture within the Texture Manager to use for this Animation Frame. + * @property {(string|number)} [frame] - The key, or index number, of the frame within the texture to use for this Animation Frame. * @property {number} [duration=0] - The duration, in ms, of this frame of the animation. * @property {boolean} [visible] - Should the parent Game Object be visible during this frame of the animation? */ From 97c2fc49ca7735c8bd6c17f09b84952750cb36d4 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 24 Aug 2020 15:04:03 +0100 Subject: [PATCH 055/241] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 971d7abd9..9cae5a48d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -228,7 +228,7 @@ If you used any of them in your code, please update to the new function names be My thanks to the following for helping with the Phaser 3 Examples, Docs, and TypeScript definitions, either by reporting errors, fixing them, or helping author the docs: -@samme @16patsle @scott20145 @khasanovbi @mk360 +@samme @16patsle @scott20145 @khasanovbi @mk360 @volkans80 From e93d36f38efb0c89b20b26de0319212046f19c39 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 24 Aug 2020 17:32:21 +0100 Subject: [PATCH 056/241] The `Pointer.getDuration` method now uses the new Pointer `downTime` and `upTime` values, meaning it will accurately report the duration of when any button is being held down, not just the primary one. Fix #5112 * `Pointer.downTime` now stores the event timestamp of when the first button on the input device was pressed down, not just when button 1 was pressed down. * `Pointer.upTime` now stores the event timestamp of when the final depressed button on the input device was released, not just when button 1 was released. --- src/input/Pointer.js | 105 +++++++++++++++++++++++-------------------- 1 file changed, 57 insertions(+), 48 deletions(-) diff --git a/src/input/Pointer.js b/src/input/Pointer.js index 3c2ee6fa7..401873f6c 100644 --- a/src/input/Pointer.js +++ b/src/input/Pointer.js @@ -92,7 +92,7 @@ var Pointer = new Class({ /** * The camera the Pointer interacted with during its last update. - * + * * A Pointer can only ever interact with one camera at once, which will be the top-most camera * in the list should multiple cameras be positioned on-top of each other. * @@ -106,9 +106,9 @@ var Pointer = new Class({ /** * A read-only property that indicates which button was pressed, or released, on the pointer * during the most recent event. It is only set during `up` and `down` events. - * + * * On Touch devices the value is always 0. - * + * * Users may change the configuration of buttons on their pointing device so that if an event's button property * is zero, it may not have been caused by the button that is physically left–most on the pointing device; * however, it should behave as if the left button was clicked in the standard button layout. @@ -128,7 +128,7 @@ var Pointer = new Class({ * 4: Wheel button or middle button * 8: 4th button (typically the "Browser Back" button) * 16: 5th button (typically the "Browser Forward" button) - * + * * For a mouse configured for left-handed use, the button actions are reversed. * In this case, the values are read from right to left. * @@ -151,9 +151,9 @@ var Pointer = new Class({ /** * The previous position of the Pointer in screen space. - * + * * The old x and y values are stored in here during the InputManager.transformPointer call. - * + * * Use the properties `velocity`, `angle` and `distance` to create your own gesture recognition. * * @name Phaser.Input.Pointer#prevPosition @@ -175,9 +175,9 @@ var Pointer = new Class({ /** * The current velocity of the Pointer, based on its current and previous positions. - * + * * This value is smoothed out each frame, according to the `motionFactor` property. - * + * * This property is updated whenever the Pointer moves, regardless of any button states. In other words, * it changes based on movement alone - a button doesn't have to be pressed first. * @@ -190,9 +190,9 @@ var Pointer = new Class({ /** * The current angle the Pointer is moving, in radians, based on its previous and current position. - * + * * The angle is based on the old position facing to the current position. - * + * * This property is updated whenever the Pointer moves, regardless of any button states. In other words, * it changes based on movement alone - a button doesn't have to be pressed first. * @@ -205,12 +205,12 @@ var Pointer = new Class({ /** * The distance the Pointer has moved, based on its previous and current position. - * + * * This value is smoothed out each frame, according to the `motionFactor` property. - * + * * This property is updated whenever the Pointer moves, regardless of any button states. In other words, * it changes based on movement alone - a button doesn't have to be pressed first. - * + * * If you need the total distance travelled since the primary buttons was pressed down, * then use the `Pointer.getDistance` method. * @@ -223,14 +223,14 @@ var Pointer = new Class({ /** * The smoothing factor to apply to the Pointer position. - * + * * Due to their nature, pointer positions are inherently noisy. While this is fine for lots of games, if you need cleaner positions * then you can set this value to apply an automatic smoothing to the positions as they are recorded. - * + * * The default value of zero means 'no smoothing'. * Set to a small value, such as 0.2, to apply an average level of smoothing between positions. You can do this by changing this * value directly, or by setting the `input.smoothFactor` property in the Game Config. - * + * * Positions are only smoothed when the pointer moves. If the primary button on this Pointer enters an Up or Down state, then the position * is always precise, and not smoothed. * @@ -243,7 +243,7 @@ var Pointer = new Class({ /** * The factor applied to the motion smoothing each frame. - * + * * This value is passed to the Smooth Step Interpolation that is used to calculate the velocity, * angle and distance of the Pointer. It's applied every frame, until the midPoint reaches the current * position of the Pointer. 0.2 provides a good average but can be increased if you need a @@ -259,7 +259,7 @@ var Pointer = new Class({ /** * The x position of this Pointer, translated into the coordinate space of the most recent Camera it interacted with. - * + * * If you wish to use this value _outside_ of an input event handler then you should update it first by calling * the `Pointer.updateWorldPoint` method. * @@ -272,7 +272,7 @@ var Pointer = new Class({ /** * The y position of this Pointer, translated into the coordinate space of the most recent Camera it interacted with. - * + * * If you wish to use this value _outside_ of an input event handler then you should update it first by calling * the `Pointer.updateWorldPoint` method. * @@ -314,7 +314,7 @@ var Pointer = new Class({ this.downY = 0; /** - * Time when Button 1 (left button), or Touch, was pressed, used for dragging objects. + * The Event timestamp when the first button, or Touch input, was pressed. Used for dragging objects. * * @name Phaser.Input.Pointer#downTime * @type {number} @@ -344,7 +344,7 @@ var Pointer = new Class({ this.upY = 0; /** - * Time when Button 1 (left button), or Touch, was released, used for dragging objects. + * The Event timestamp when the final button, or Touch input, was released. Used for dragging objects. * * @name Phaser.Input.Pointer#upTime * @type {number} @@ -385,7 +385,7 @@ var Pointer = new Class({ /** * Did this Pointer get canceled by a touchcancel event? - * + * * Note: "canceled" is the American-English spelling of "cancelled". Please don't submit PRs correcting it! * * @name Phaser.Input.Pointer#wasCanceled @@ -446,10 +446,10 @@ var Pointer = new Class({ /** * Is this pointer Pointer Locked? - * + * * Only a mouse pointer can be locked and it only becomes locked when requested via * the browsers Pointer Lock API. - * + * * You can request this by calling the `this.input.mouse.requestPointerLock()` method from * a `pointerdown` or `pointerup` event handler. * @@ -495,7 +495,7 @@ var Pointer = new Class({ /** * Takes a Camera and updates this Pointer's `worldX` and `worldY` values so they are * the result of a translation through the given Camera. - * + * * Note that the values will be automatically replaced the moment the Pointer is * updated by an input event, such as a mouse move, so should be used immediately. * @@ -622,12 +622,17 @@ var Pointer = new Class({ this.primaryDown = false; this.upX = this.x; this.upY = this.y; - this.upTime = event.timeStamp; } - this.isDown = false; + if (this.buttons === 0) + { + // No more buttons are still down + this.isDown = false; - this.wasTouch = false; + this.upTime = event.timeStamp; + + this.wasTouch = false; + } }, /** @@ -661,10 +666,14 @@ var Pointer = new Class({ this.primaryDown = true; this.downX = this.x; this.downY = this.y; - this.downTime = event.timeStamp; } - this.isDown = true; + if (!this.isDown) + { + this.isDown = true; + + this.downTime = event.timeStamp; + } this.wasTouch = false; }, @@ -827,7 +836,7 @@ var Pointer = new Class({ this.wasTouch = true; this.wasCanceled = false; - + this.active = false; this.updateMotion(); @@ -863,7 +872,7 @@ var Pointer = new Class({ this.wasTouch = true; this.wasCanceled = true; - + this.active = false; }, @@ -1013,10 +1022,10 @@ var Pointer = new Class({ /** * If the Pointer has a button pressed down at the time this method is called, it will return the * distance between the Pointer's `downX` and `downY` values and the current position. - * + * * If no button is held down, it will return the last recorded distance, based on where * the Pointer was when the button was released. - * + * * If you wish to get the distance being travelled currently, based on the velocity of the Pointer, * then see the `Pointer.distance` property. * @@ -1040,7 +1049,7 @@ var Pointer = new Class({ /** * If the Pointer has a button pressed down at the time this method is called, it will return the * horizontal distance between the Pointer's `downX` and `downY` values and the current position. - * + * * If no button is held down, it will return the last recorded horizontal distance, based on where * the Pointer was when the button was released. * @@ -1064,7 +1073,7 @@ var Pointer = new Class({ /** * If the Pointer has a button pressed down at the time this method is called, it will return the * vertical distance between the Pointer's `downX` and `downY` values and the current position. - * + * * If no button is held down, it will return the last recorded vertical distance, based on where * the Pointer was when the button was released. * @@ -1088,9 +1097,9 @@ var Pointer = new Class({ /** * If the Pointer has a button pressed down at the time this method is called, it will return the * duration since the button was pressed down. - * + * * If no button is held down, it will return the last recorded duration, based on the time - * the Pointer button was released. + * the last button on the Pointer was released. * * @method Phaser.Input.Pointer#getDuration * @since 3.16.0 @@ -1112,12 +1121,12 @@ var Pointer = new Class({ /** * If the Pointer has a button pressed down at the time this method is called, it will return the * angle between the Pointer's `downX` and `downY` values and the current position. - * + * * If no button is held down, it will return the last recorded angle, based on where * the Pointer was when the button was released. - * + * * The angle is based on the old position facing to the current position. - * + * * If you wish to get the current angle, based on the velocity of the Pointer, then * see the `Pointer.angle` property. * @@ -1141,31 +1150,31 @@ var Pointer = new Class({ /** * Takes the previous and current Pointer positions and then generates an array of interpolated values between * the two. The array will be populated up to the size of the `steps` argument. - * + * * ```javaScript * var points = pointer.getInterpolatedPosition(4); - * + * * // points[0] = { x: 0, y: 0 } * // points[1] = { x: 2, y: 1 } * // points[2] = { x: 3, y: 2 } * // points[3] = { x: 6, y: 3 } * ``` - * + * * Use this if you need to get smoothed values between the previous and current pointer positions. DOM pointer * events can often fire faster than the main browser loop, and this will help you avoid janky movement * especially if you have an object following a Pointer. - * + * * Note that if you provide an output array it will only be populated up to the number of steps provided. * It will not clear any previous data that may have existed beyond the range of the steps count. - * + * * Internally it uses the Smooth Step interpolation calculation. * * @method Phaser.Input.Pointer#getInterpolatedPosition * @since 3.11.0 - * + * * @param {integer} [steps=10] - The number of interpolation steps to use. * @param {array} [out] - An array to store the results in. If not provided a new one will be created. - * + * * @return {array} An array of interpolated values. */ getInterpolatedPosition: function (steps, out) From a273d69f2a1c86b8951cc3ba77e31bd73d5aaf8c Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 24 Aug 2020 17:32:24 +0100 Subject: [PATCH 057/241] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9cae5a48d..e6ddf1cfd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -212,6 +212,9 @@ If you used any of them in your code, please update to the new function names be * The constant `Phaser.Renderer.WebGL.UNSIGNED_SHORT` value has been removed as it wasn't used internally. * The constant `Phaser.Renderer.WebGL.FLOAT` value has been removed as it wasn't used internally. * `global.Phaser = Phaser` has been removed, as it's no longer required by the UMD loader, which should make importing in Angular 10 easier. Fix #5212 (thanks @blackyale) +* `Pointer.downTime` now stores the event timestamp of when the first button on the input device was pressed down, not just when button 1 was pressed down. +* `Pointer.upTime` now stores the event timestamp of when the final depressed button on the input device was released, not just when button 1 was released. +* The `Pointer.getDuration` method now uses the new Pointer `downTime` and `upTime` values, meaning it will accurately report the duration of when any button is being held down, not just the primary one. Fix #5112 (thanks @veleek) ### Bug Fixes From 9f1cd228827fd82c3666520f6c119092462d7d09 Mon Sep 17 00:00:00 2001 From: tobias Date: Tue, 25 Aug 2020 00:43:22 +0800 Subject: [PATCH 058/241] Fix typo for documentation on create method of AnimationManager on line 190 --- src/animations/AnimationManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/animations/AnimationManager.js b/src/animations/AnimationManager.js index 59866a5f4..f644a0888 100644 --- a/src/animations/AnimationManager.js +++ b/src/animations/AnimationManager.js @@ -187,7 +187,7 @@ var AnimationManager = new Class({ * * @param {Phaser.Types.Animations.Animation} config - The configuration settings for the Animation. * - * @return {(Phaser.Animations.Animation|false)} The Animation that was created, or `false` is the key is already in use. + * @return {(Phaser.Animations.Animation|false)} The Animation that was created, or `false` if the key is already in use. */ create: function (config) { From ef91518da521da25b5c691df9ac68e07d542db87 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 24 Aug 2020 19:10:50 +0100 Subject: [PATCH 059/241] `GameObjects.Events.ADDED_TO_SCENE` is a new event, emitted by a Game Object, when it is added to a Scene, or a Container that is part of the Scene. --- .../events/ADDED_TO_SCENE_EVENT.js | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/gameobjects/events/ADDED_TO_SCENE_EVENT.js diff --git a/src/gameobjects/events/ADDED_TO_SCENE_EVENT.js b/src/gameobjects/events/ADDED_TO_SCENE_EVENT.js new file mode 100644 index 000000000..345dd4196 --- /dev/null +++ b/src/gameobjects/events/ADDED_TO_SCENE_EVENT.js @@ -0,0 +1,20 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Object Added to Scene Event. + * + * This event is dispatched when a Game Object is added to a Scene. + * + * Listen for it on a Game Object instance using `GameObject.on('addedtoscene', listener)`. + * + * @event Phaser.GameObjects.Events#ADDED_TO_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene. + * @param {Phaser.Scene} scene - The Scene to which the Game Object was added. + */ +module.exports = 'addedtoscene'; From 98cd70cd6c3b59a73fa1d9a03e0deb1221bab8ff Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 24 Aug 2020 19:11:22 +0100 Subject: [PATCH 060/241] `GameObjects.Events.REMOVED_FROM_SCENE` is a new event, emitted by a Game Object, when it is removed from a Scene, or a Container that is part of the Scene. --- .../events/REMOVED_FROM_SCENE_EVENT.js | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js diff --git a/src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js b/src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js new file mode 100644 index 000000000..b1af9779e --- /dev/null +++ b/src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js @@ -0,0 +1,20 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Object Removed from Scene Event. + * + * This event is dispatched when a Game Object is removed from a Scene. + * + * Listen for it on a Game Object instance using `GameObject.on('removedfromscene', listener)`. + * + * @event Phaser.GameObjects.Events#REMOVED_FROM_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene. + * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed. + */ +module.exports = 'removedfromscene'; From 1423ade7b33245c7598430b1f2b3f1ef2a940a46 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 24 Aug 2020 19:12:54 +0100 Subject: [PATCH 061/241] `Scenes.Events.ADDED_TO_SCENE` is a new event, emitted by a Scene, when a new Game Object is added to the display list in the Scene, or a Container that is on the display list. --- src/scene/events/ADDED_TO_SCENE_EVENT.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/scene/events/ADDED_TO_SCENE_EVENT.js diff --git a/src/scene/events/ADDED_TO_SCENE_EVENT.js b/src/scene/events/ADDED_TO_SCENE_EVENT.js new file mode 100644 index 000000000..c813dc228 --- /dev/null +++ b/src/scene/events/ADDED_TO_SCENE_EVENT.js @@ -0,0 +1,20 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Object Added to Scene Event. + * + * This event is dispatched when a Game Object is added to a Scene. + * + * Listen for it from a Scene using `this.scene.events.on('addedtoscene', listener)`. + * + * @event Phaser.Scenes.Events#ADDED_TO_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene. + * @param {Phaser.Scene} scene - The Scene to which the Game Object was added. + */ +module.exports = 'addedtoscene'; From 48f94be44919db933a85222e9a92899730019975 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 24 Aug 2020 19:13:06 +0100 Subject: [PATCH 062/241] `Scenes.Events.REMOVED_FROM_SCENE` is a new event, emitted by a Scene, when it a Game Object is removed from the display list in the Scene, or a Container that is on the display list. --- src/scene/events/REMOVED_FROM_SCENE_EVENT.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/scene/events/REMOVED_FROM_SCENE_EVENT.js diff --git a/src/scene/events/REMOVED_FROM_SCENE_EVENT.js b/src/scene/events/REMOVED_FROM_SCENE_EVENT.js new file mode 100644 index 000000000..0e61136ec --- /dev/null +++ b/src/scene/events/REMOVED_FROM_SCENE_EVENT.js @@ -0,0 +1,20 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Object Removed from Scene Event. + * + * This event is dispatched when a Game Object is removed from a Scene. + * + * Listen for it from a Scene using `this.scene.events.on('removedfromscene', listener)`. + * + * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene. + * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed. + */ +module.exports = 'removedfromscene'; From ae4ed0ac54f46e7dc3a6796fff8e80f5db768a88 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 24 Aug 2020 19:13:18 +0100 Subject: [PATCH 063/241] Expose the new events --- src/gameobjects/events/index.js | 2 ++ src/scene/events/index.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/gameobjects/events/index.js b/src/gameobjects/events/index.js index 7a237c690..e92cf8d0b 100644 --- a/src/gameobjects/events/index.js +++ b/src/gameobjects/events/index.js @@ -10,7 +10,9 @@ module.exports = { + ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'), DESTROY: require('./DESTROY_EVENT'), + REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'), VIDEO_COMPLETE: require('./VIDEO_COMPLETE_EVENT'), VIDEO_CREATED: require('./VIDEO_CREATED_EVENT'), VIDEO_ERROR: require('./VIDEO_ERROR_EVENT'), diff --git a/src/scene/events/index.js b/src/scene/events/index.js index 78d88e885..4fb58f8a0 100644 --- a/src/scene/events/index.js +++ b/src/scene/events/index.js @@ -10,6 +10,7 @@ module.exports = { + ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'), BOOT: require('./BOOT_EVENT'), CREATE: require('./CREATE_EVENT'), DESTROY: require('./DESTROY_EVENT'), @@ -17,6 +18,7 @@ module.exports = { POST_UPDATE: require('./POST_UPDATE_EVENT'), PRE_UPDATE: require('./PRE_UPDATE_EVENT'), READY: require('./READY_EVENT'), + REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'), RENDER: require('./RENDER_EVENT'), RESUME: require('./RESUME_EVENT'), SHUTDOWN: require('./SHUTDOWN_EVENT'), From bc93416ec775e40c63ee47234d7064599b3b5490 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 24 Aug 2020 19:15:53 +0100 Subject: [PATCH 064/241] Added events property and new add and remove callbacks * `DisplayList.events` is a new property that references the Scene's Event Emitter. This is now used internally. * `DisplayList.addChildCallback` is a new method that overrides the List callback and fires the new ADDED events. * `DisplayList.removeChildCallback` is a new method that overrides the List callback and fires the new REMOVED events. --- src/gameobjects/DisplayList.js | 71 +++++++++++++++++++++++++++++----- 1 file changed, 62 insertions(+), 9 deletions(-) diff --git a/src/gameobjects/DisplayList.js b/src/gameobjects/DisplayList.js index fc4437411..7b01b6669 100644 --- a/src/gameobjects/DisplayList.js +++ b/src/gameobjects/DisplayList.js @@ -7,6 +7,7 @@ var Class = require('../utils/Class'); var List = require('../structs/List'); var PluginCache = require('../plugins/PluginCache'); +var GameObjectEvents = require('./events'); var SceneEvents = require('../scene/events'); var StableSort = require('../utils/array/StableSort'); @@ -64,8 +65,21 @@ var DisplayList = new Class({ */ this.systems = scene.sys; - scene.sys.events.once(SceneEvents.BOOT, this.boot, this); - scene.sys.events.on(SceneEvents.START, this.start, this); + /** + * The Scene's Event Emitter. + * + * @name Phaser.GameObjects.DisplayList#events + * @type {Phaser.Events.EventEmitter} + * @since 3.50.0 + */ + this.events = scene.sys.events; + + // Set the List callbacks + this.addCallback = this.addChildCallback; + this.removeCallback = this.removeChildCallback; + + this.events.once(SceneEvents.BOOT, this.boot, this); + this.events.on(SceneEvents.START, this.start, this); }, /** @@ -78,7 +92,43 @@ var DisplayList = new Class({ */ boot: function () { - this.systems.events.once(SceneEvents.DESTROY, this.destroy, this); + this.events.once(SceneEvents.DESTROY, this.destroy, this); + }, + + /** + * Internal method called from `List.addCallback`. + * + * @method Phaser.GameObjects.DisplayList#addChildCallback + * @private + * @fires Phaser.Scenes.Events#ADDED_TO_SCENE + * @fires Phaser.GameObjects.Events#ADDED_TO_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the list. + */ + addChildCallback: function (gameObject) + { + gameObject.emit(GameObjectEvents.ADDED_TO_SCENE, gameObject, this.scene); + + this.events.emit(SceneEvents.ADDED_TO_SCENE, gameObject, this.scene); + }, + + /** + * Internal method called from `List.removeCallback`. + * + * @method Phaser.GameObjects.DisplayList#removeChildCallback + * @private + * @fires Phaser.Scenes.Events#REMOVED_FROM_SCENE + * @fires Phaser.GameObjects.Events#REMOVED_FROM_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the list. + */ + removeChildCallback: function (gameObject) + { + gameObject.emit(GameObjectEvents.REMOVED_FROM_SCENE, gameObject, this.scene); + + this.events.emit(SceneEvents.REMOVED_FROM_SCENE, gameObject, this.scene); }, /** @@ -92,7 +142,7 @@ var DisplayList = new Class({ */ start: function () { - this.systems.events.once(SceneEvents.SHUTDOWN, this.shutdown, this); + this.events.once(SceneEvents.SHUTDOWN, this.shutdown, this); }, /** @@ -162,16 +212,18 @@ var DisplayList = new Class({ */ shutdown: function () { - var i = this.list.length; + var list = this.list; + + var i = list.length; while (i--) { - this.list[i].destroy(true); + list[i].destroy(true); } - this.list.length = 0; + list.length = 0; - this.systems.events.off(SceneEvents.SHUTDOWN, this.shutdown, this); + this.events.off(SceneEvents.SHUTDOWN, this.shutdown, this); }, /** @@ -186,10 +238,11 @@ var DisplayList = new Class({ { this.shutdown(); - this.scene.sys.events.off(SceneEvents.START, this.start, this); + this.events.off(SceneEvents.START, this.start, this); this.scene = null; this.systems = null; + this.events = null; } }); From 671c92e4509f8a6ee8e2ad8af7059a0091253429 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 24 Aug 2020 19:18:29 +0100 Subject: [PATCH 065/241] Added `addedToScene` and `removedFromScene` methods * `GameObject.addedToScene` is a new method that custom Game Objects can use to perform additional set-up when a Game Object is added to a Scene. For example, Sprite uses this to add itself to the Update List. * `GameObject.removedFromScene` is a new method that custom Game Objects can use to perform additional tear-down when a Game Object is removed from a Scene. For example, Sprite uses this to remove themselves from the Update List. * Game Objects no longer automatically remove themselves from the Update List during `preDestroy`. This should be handled directly in the `removedFromScene` method now. --- src/gameobjects/GameObject.js | 45 ++++++++++++++++++++++++++++------- 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/src/gameobjects/GameObject.js b/src/gameobjects/GameObject.js index 5399c3886..0bcf1d9a0 100644 --- a/src/gameobjects/GameObject.js +++ b/src/gameobjects/GameObject.js @@ -58,9 +58,9 @@ var GameObject = new Class({ /** * The current state of this Game Object. - * + * * Phaser itself will never modify this value, although plugins may do so. - * + * * Use this property to track the state of a Game Object during its lifetime. For example, it could change from * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons. @@ -230,9 +230,9 @@ var GameObject = new Class({ /** * Sets the current state of this Game Object. - * + * * Phaser itself will never modify the State of a Game Object, although plugins may do so. - * + * * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'. * The state value should typically be an integer (ideally mapped to a constant * in your game code), but could also be a string. It is recommended to keep it light and simple. @@ -337,7 +337,7 @@ var GameObject = new Class({ * before setting the value. * * If the key doesn't already exist in the Data Manager then it is created. - * + * * When the value is first set, a `setdata` event is emitted from this Game Object. * * @method Phaser.GameObjects.GameObject#incData @@ -367,7 +367,7 @@ var GameObject = new Class({ * before setting the value. * * If the key doesn't already exist in the Data Manager then it is created. - * + * * When the value is first set, a `setdata` event is emitted from this Game Object. * * @method Phaser.GameObjects.GameObject#toggleData @@ -505,7 +505,7 @@ var GameObject = new Class({ * If you wish to only temporarily stop an object from receiving input then use * `disableInteractive` instead, as that toggles the interactive state, where-as * this erases it completely. - * + * * If you wish to resize a hit area, don't remove and then set it as being * interactive. Instead, access the hitarea object directly and resize the shape * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the @@ -525,6 +525,36 @@ var GameObject = new Class({ return this; }, + /** + * This callback is invoked when this Game Object is added to a Scene. + * + * Can be overriden by custom Game Objects, but be aware of some Game Objects that + * will use this, such as Sprites, to add themselves into the Update List. + * + * You can also listen for the `ADDED_TO_SCENE` event from this Game Object. + * + * @method Phaser.GameObjects.GameObject#addedToScene + * @since 3.50.0 + */ + addedToScene: function () + { + }, + + /** + * This callback is invoked when this Game Object is removed from a Scene. + * + * Can be overriden by custom Game Objects, but be aware of some Game Objects that + * will use this, such as Sprites, to removed themselves from the Update List. + * + * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object. + * + * @method Phaser.GameObjects.GameObject#removedFromScene + * @since 3.50.0 + */ + removedFromScene: function () + { + }, + /** * To be overridden by custom GameObjects. Allows base objects to be used in a Pool. * @@ -651,7 +681,6 @@ var GameObject = new Class({ if (!fromScene) { sys.displayList.remove(this); - sys.updateList.remove(this); } if (this.input) From 0b9dd4aae71f377f543429e2ea24afa69df36fed Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 24 Aug 2020 19:19:19 +0100 Subject: [PATCH 066/241] `GameObjectCreator.events` is a new property that references the Scene's Event Emitter. This is now used internally. --- src/gameobjects/GameObjectCreator.js | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/gameobjects/GameObjectCreator.js b/src/gameobjects/GameObjectCreator.js index 368bf3656..52ffd1e55 100644 --- a/src/gameobjects/GameObjectCreator.js +++ b/src/gameobjects/GameObjectCreator.js @@ -50,6 +50,16 @@ var GameObjectCreator = new Class({ */ this.systems = scene.sys; + /** + * A reference to the Scene Event Emitter. + * + * @name Phaser.GameObjects.GameObjectCreator#events + * @type {Phaser.Events.EventEmitter} + * @protected + * @since 3.50.0 + */ + this.events = scene.sys.events; + /** * A reference to the Scene Display List. * @@ -70,8 +80,8 @@ var GameObjectCreator = new Class({ */ this.updateList; - scene.sys.events.once(SceneEvents.BOOT, this.boot, this); - scene.sys.events.on(SceneEvents.START, this.start, this); + this.events.once(SceneEvents.BOOT, this.boot, this); + this.events.on(SceneEvents.START, this.start, this); }, /** @@ -87,7 +97,7 @@ var GameObjectCreator = new Class({ this.displayList = this.systems.displayList; this.updateList = this.systems.updateList; - this.systems.events.once(SceneEvents.DESTROY, this.destroy, this); + this.events.once(SceneEvents.DESTROY, this.destroy, this); }, /** @@ -101,7 +111,7 @@ var GameObjectCreator = new Class({ */ start: function () { - this.systems.events.once(SceneEvents.SHUTDOWN, this.shutdown, this); + this.events.once(SceneEvents.SHUTDOWN, this.shutdown, this); }, /** @@ -114,7 +124,7 @@ var GameObjectCreator = new Class({ */ shutdown: function () { - this.systems.events.off(SceneEvents.SHUTDOWN, this.shutdown, this); + this.events.off(SceneEvents.SHUTDOWN, this.shutdown, this); }, /** @@ -129,10 +139,12 @@ var GameObjectCreator = new Class({ { this.shutdown(); - this.scene.sys.events.off(SceneEvents.START, this.start, this); + this.events.off(SceneEvents.START, this.start, this); this.scene = null; this.systems = null; + this.events = null; + this.displayList = null; this.updateList = null; } From 19c4980c5b58576516349be6cba526da734b398f Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 24 Aug 2020 19:20:20 +0100 Subject: [PATCH 067/241] `GameObjectFactory.events` is a new property that references the Scene's Event Emitter. This is now used internally. --- src/gameobjects/GameObjectFactory.js | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/src/gameobjects/GameObjectFactory.js b/src/gameobjects/GameObjectFactory.js index 97b65d7c0..61bf09d28 100644 --- a/src/gameobjects/GameObjectFactory.js +++ b/src/gameobjects/GameObjectFactory.js @@ -49,6 +49,16 @@ var GameObjectFactory = new Class({ */ this.systems = scene.sys; + /** + * A reference to the Scene Event Emitter. + * + * @name Phaser.GameObjects.GameObjectFactory#events + * @type {Phaser.Events.EventEmitter} + * @protected + * @since 3.50.0 + */ + this.events = scene.sys.events; + /** * A reference to the Scene Display List. * @@ -69,8 +79,8 @@ var GameObjectFactory = new Class({ */ this.updateList; - scene.sys.events.once(SceneEvents.BOOT, this.boot, this); - scene.sys.events.on(SceneEvents.START, this.start, this); + this.events.once(SceneEvents.BOOT, this.boot, this); + this.events.on(SceneEvents.START, this.start, this); }, /** @@ -86,7 +96,7 @@ var GameObjectFactory = new Class({ this.displayList = this.systems.displayList; this.updateList = this.systems.updateList; - this.systems.events.once(SceneEvents.DESTROY, this.destroy, this); + this.events.once(SceneEvents.DESTROY, this.destroy, this); }, /** @@ -100,7 +110,7 @@ var GameObjectFactory = new Class({ */ start: function () { - this.systems.events.once(SceneEvents.SHUTDOWN, this.shutdown, this); + this.events.once(SceneEvents.SHUTDOWN, this.shutdown, this); }, /** @@ -143,7 +153,7 @@ var GameObjectFactory = new Class({ */ shutdown: function () { - this.systems.events.off(SceneEvents.SHUTDOWN, this.shutdown, this); + this.events.off(SceneEvents.SHUTDOWN, this.shutdown, this); }, /** @@ -158,10 +168,11 @@ var GameObjectFactory = new Class({ { this.shutdown(); - this.scene.sys.events.off(SceneEvents.START, this.start, this); + this.events.off(SceneEvents.START, this.start, this); this.scene = null; this.systems = null; + this.events = null; this.displayList = null; this.updateList = null; From 7f5e4d453830a6da58dc0a1049a8143dcfd0dd79 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 24 Aug 2020 19:21:01 +0100 Subject: [PATCH 068/241] `ProcessQueue.checkQueue` is a new boolean property that will make sure only unique objects are added to the Process Queue. --- src/structs/ProcessQueue.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/structs/ProcessQueue.js b/src/structs/ProcessQueue.js index 9c38410e4..80f50e9a0 100644 --- a/src/structs/ProcessQueue.js +++ b/src/structs/ProcessQueue.js @@ -88,6 +88,15 @@ var ProcessQueue = new Class({ * @since 3.0.0 */ this._toProcess = 0; + + /** + * If `true` only unique objects will be allowed in the queue. + * + * @name Phaser.Structs.ProcessQueue#checkQueue + * @type {boolean} + * @since 3.50.0 + */ + this.checkQueue = false; }, /** @@ -217,9 +226,12 @@ var ProcessQueue = new Class({ { item = list[i]; - this._active.push(item); + if (!this.checkQueue || (this.checkQueue && active.indexOf(item) === -1)) + { + active.push(item); - this.emit(Events.PROCESS_QUEUE_ADD, item); + this.emit(Events.PROCESS_QUEUE_ADD, item); + } } list.length = 0; @@ -227,7 +239,7 @@ var ProcessQueue = new Class({ this._toProcess = 0; // The owner of this queue can now safely do whatever it needs to with the active list - return this._active; + return active; }, /** From 7b83d31cae624462226625278fe1dbc9d764256d Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 24 Aug 2020 19:21:35 +0100 Subject: [PATCH 069/241] The `Update List` now uses the new `checkQueue` property to ensure no duplicate objects are on the active list. --- src/gameobjects/UpdateList.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/gameobjects/UpdateList.js b/src/gameobjects/UpdateList.js index f9721230f..be2758be4 100644 --- a/src/gameobjects/UpdateList.js +++ b/src/gameobjects/UpdateList.js @@ -35,6 +35,9 @@ var UpdateList = new Class({ { ProcessQueue.call(this); + // No duplicates in this list + this.checkQueue = true; + /** * The Scene that the Update List belongs to. * @@ -157,7 +160,7 @@ var UpdateList = new Class({ /** * The Scene that owns this plugin is shutting down. - * + * * We need to kill and reset all internal properties as well as stop listening to Scene events. * * @method Phaser.GameObjects.UpdateList#shutdown @@ -203,7 +206,7 @@ var UpdateList = new Class({ /** * The Scene that owns this plugin is being destroyed. - * + * * We need to shutdown and then kill off all external references. * * @method Phaser.GameObjects.UpdateList#destroy @@ -221,7 +224,7 @@ var UpdateList = new Class({ /** * Adds a new item to the Update List. - * + * * The item is added to the pending list and made active in the next update. * * @method Phaser.GameObjects.UpdateList#add @@ -234,7 +237,7 @@ var UpdateList = new Class({ /** * Removes an item from the Update List. - * + * * The item is added to the pending destroy and fully removed in the next update. * * @method Phaser.GameObjects.UpdateList#remove @@ -247,7 +250,7 @@ var UpdateList = new Class({ /** * Removes all active items from this Update List. - * + * * All the items are marked as 'pending destroy' and fully removed in the next update. * * @method Phaser.GameObjects.UpdateList#removeAll @@ -258,7 +261,7 @@ var UpdateList = new Class({ /** * Update this queue. First it will process any items awaiting destruction, and remove them. - * + * * Then it will check to see if there are any items pending insertion, and move them to an * active state. Finally, it will return a list of active items for further processing. * @@ -270,7 +273,7 @@ var UpdateList = new Class({ /** * Returns the current list of active items. - * + * * This method returns a reference to the active list array, not a copy of it. * Therefore, be careful to not modify this array outside of the ProcessQueue. * From f4259deb37ef44a9ffb0c7f03eef6bc1f35f58f2 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 24 Aug 2020 19:22:58 +0100 Subject: [PATCH 070/241] `DOMElementFactory`, `ExternFactory`, `ParticleManagerFactor`, `RopeFactory` and `SpriteFactory` all no longer add the objects to the Update List, this is now handled by the ADDED events instead. --- .../domelement/DOMElementFactory.js | 25 +++++++++---------- src/gameobjects/extern/ExternFactory.js | 1 - .../particles/ParticleManagerFactory.js | 7 +----- src/gameobjects/rope/RopeFactory.js | 6 +---- src/gameobjects/sprite/SpriteFactory.js | 1 - 5 files changed, 14 insertions(+), 26 deletions(-) diff --git a/src/gameobjects/domelement/DOMElementFactory.js b/src/gameobjects/domelement/DOMElementFactory.js index e4fc9fe23..8dea9e48a 100644 --- a/src/gameobjects/domelement/DOMElementFactory.js +++ b/src/gameobjects/domelement/DOMElementFactory.js @@ -9,51 +9,51 @@ var GameObjectFactory = require('../GameObjectFactory'); /** * DOM Element Game Objects are a way to control and manipulate HTML Elements over the top of your game. - * + * * In order for DOM Elements to display you have to enable them by adding the following to your game * configuration object: - * + * * ```javascript * dom { * createContainer: true * } * ``` - * + * * When this is added, Phaser will automatically create a DOM Container div that is positioned over the top * of the game canvas. This div is sized to match the canvas, and if the canvas size changes, as a result of * settings within the Scale Manager, the dom container is resized accordingly. - * + * * You can create a DOM Element by either passing in DOMStrings, or by passing in a reference to an existing * Element that you wish to be placed under the control of Phaser. For example: - * + * * ```javascript * this.add.dom(x, y, 'div', 'background-color: lime; width: 220px; height: 100px; font: 48px Arial', 'Phaser'); * ``` - * + * * The above code will insert a div element into the DOM Container at the given x/y coordinate. The DOMString in * the 4th argument sets the initial CSS style of the div and the final argument is the inner text. In this case, * it will create a lime colored div that is 220px by 100px in size with the text Phaser in it, in an Arial font. - * + * * You should nearly always, without exception, use explicitly sized HTML Elements, in order to fully control * alignment and positioning of the elements next to regular game content. - * + * * Rather than specify the CSS and HTML directly you can use the `load.html` File Loader to load it into the * cache and then use the `createFromCache` method instead. You can also use `createFromHTML` and various other * methods available in this class to help construct your elements. - * + * * Once the element has been created you can then control it like you would any other Game Object. You can set its * position, scale, rotation, alpha and other properties. It will move as the main Scene Camera moves and be clipped * at the edge of the canvas. It's important to remember some limitations of DOM Elements: The obvious one is that * they appear above or below your game canvas. You cannot blend them into the display list, meaning you cannot have * a DOM Element, then a Sprite, then another DOM Element behind it. - * + * * They also cannot be enabled for input. To do that, you have to use the `addListener` method to add native event * listeners directly. The final limitation is to do with cameras. The DOM Container is sized to match the game canvas * entirely and clipped accordingly. DOM Elements respect camera scrolling and scrollFactor settings, but if you * change the size of the camera so it no longer matches the size of the canvas, they won't be clipped accordingly. - * + * * Also, all DOM Elements are inserted into the same DOM Container, regardless of which Scene they are created in. - * + * * DOM Elements are a powerful way to align native HTML with your Phaser Game Objects. For example, you can insert * a login form for a multiplayer game directly into your title screen. Or a text input box for a highscore table. * Or a banner ad from a 3rd party service. Or perhaps you'd like to use them for high resolution text display and @@ -78,7 +78,6 @@ GameObjectFactory.register('dom', function (x, y, element, style, innerText) var gameObject = new DOMElement(this.scene, x, y, element, style, innerText); this.displayList.add(gameObject); - this.updateList.add(gameObject); return gameObject; }); diff --git a/src/gameobjects/extern/ExternFactory.js b/src/gameobjects/extern/ExternFactory.js index 269e5b968..8549fb780 100644 --- a/src/gameobjects/extern/ExternFactory.js +++ b/src/gameobjects/extern/ExternFactory.js @@ -22,7 +22,6 @@ GameObjectFactory.register('extern', function () var extern = new Extern(this.scene); this.displayList.add(extern); - this.updateList.add(extern); return extern; }); diff --git a/src/gameobjects/particles/ParticleManagerFactory.js b/src/gameobjects/particles/ParticleManagerFactory.js index 622496ef5..39abbaf94 100644 --- a/src/gameobjects/particles/ParticleManagerFactory.js +++ b/src/gameobjects/particles/ParticleManagerFactory.js @@ -23,12 +23,7 @@ var ParticleEmitterManager = require('./ParticleEmitterManager'); */ GameObjectFactory.register('particles', function (key, frame, emitters) { - var manager = new ParticleEmitterManager(this.scene, key, frame, emitters); - - this.displayList.add(manager); - this.updateList.add(manager); - - return manager; + return this.displayList.add(new ParticleEmitterManager(this.scene, key, frame, emitters)); }); // When registering a factory function 'this' refers to the GameObjectFactory context. diff --git a/src/gameobjects/rope/RopeFactory.js b/src/gameobjects/rope/RopeFactory.js index 1420438c0..9d15be0c8 100644 --- a/src/gameobjects/rope/RopeFactory.js +++ b/src/gameobjects/rope/RopeFactory.js @@ -31,11 +31,7 @@ if (typeof WEBGL_RENDERER) { GameObjectFactory.register('rope', function (x, y, texture, frame, points, horizontal, colors, alphas) { - var rope = new Rope(this.scene, x, y, texture, frame, points, horizontal, colors, alphas); - - this.displayList.add(rope); - - return this.updateList.add(rope); + return this.displayList.add(new Rope(this.scene, x, y, texture, frame, points, horizontal, colors, alphas)); }); } diff --git a/src/gameobjects/sprite/SpriteFactory.js b/src/gameobjects/sprite/SpriteFactory.js index 66ba73f8d..d925e3933 100644 --- a/src/gameobjects/sprite/SpriteFactory.js +++ b/src/gameobjects/sprite/SpriteFactory.js @@ -27,7 +27,6 @@ GameObjectFactory.register('sprite', function (x, y, key, frame) var sprite = new Sprite(this.scene, x, y, key, frame); this.displayList.add(sprite); - this.updateList.add(sprite); return sprite; }); From a9072cadf25fbdf0622a724254fc8453a9ac608c Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 24 Aug 2020 19:24:02 +0100 Subject: [PATCH 071/241] `Sprite`, `Rope`, `ParticleEmitterManager`, `Extern` and `DOMElement` now all override the `addedToScene` and `removedFromScene` callbacks to handle further set-up tasks. --- src/gameobjects/domelement/DOMElement.js | 16 ++ src/gameobjects/extern/Extern.js | 24 +- .../particles/ParticleEmitterManager.js | 16 ++ src/gameobjects/rope/Rope.js | 226 ++++++++++-------- src/gameobjects/sprite/Sprite.js | 16 ++ 5 files changed, 189 insertions(+), 109 deletions(-) diff --git a/src/gameobjects/domelement/DOMElement.js b/src/gameobjects/domelement/DOMElement.js index 0171b6c84..978eb658b 100644 --- a/src/gameobjects/domelement/DOMElement.js +++ b/src/gameobjects/domelement/DOMElement.js @@ -8,6 +8,7 @@ var Class = require('../../utils/Class'); var Components = require('../components'); var DOMElementRender = require('./DOMElementRender'); var GameObject = require('../GameObject'); +var GameObjectEvents = require('../events'); var IsPlainObject = require('../../utils/object/IsPlainObject'); var RemoveFromDOM = require('../../dom/RemoveFromDOM'); var SCENE_EVENTS = require('../../scene/events'); @@ -290,6 +291,21 @@ var DOMElement = new Class({ scene.sys.events.on(SCENE_EVENTS.SLEEP, this.handleSceneEvent, this); scene.sys.events.on(SCENE_EVENTS.WAKE, this.handleSceneEvent, this); + + this.on(GameObjectEvents.ADDED_TO_SCENE, this.addedToScene, this); + this.on(GameObjectEvents.REMOVED_FROM_SCENE, this.removedFromScene, this); + }, + + // Overrides Game Object method + addedToScene: function () + { + this.scene.sys.updateList.add(this); + }, + + // Overrides Game Object method + removedFromScene: function () + { + this.scene.sys.updateList.remove(this); }, /** diff --git a/src/gameobjects/extern/Extern.js b/src/gameobjects/extern/Extern.js index 1fceab854..246a3247a 100644 --- a/src/gameobjects/extern/Extern.js +++ b/src/gameobjects/extern/Extern.js @@ -7,23 +7,24 @@ var Class = require('../../utils/Class'); var Components = require('../components'); var GameObject = require('../GameObject'); +var GameObjectEvents = require('../events'); var ExternRender = require('./ExternRender'); /** * @classdesc * An Extern Game Object is a special type of Game Object that allows you to pass * rendering off to a 3rd party. - * + * * When you create an Extern and place it in the display list of a Scene, the renderer will * process the list as usual. When it finds an Extern it will flush the current batch, * clear down the pipeline and prepare a transform matrix which your render function can * take advantage of, if required. - * + * * The WebGL context is then left is a 'clean' state, ready for you to bind your own shaders, * or draw to it, whatever you wish to do. Once you've finished, you should free-up any - * of your resources. The Extern will then rebind the Phaser pipeline and carry on + * of your resources. The Extern will then rebind the Phaser pipeline and carry on * rendering the display list. - * + * * Although this object has lots of properties such as Alpha, Blend Mode and Tint, none of * them are used during rendering unless you take advantage of them in your own render code. * @@ -71,6 +72,21 @@ var Extern = new Class({ function Extern (scene) { GameObject.call(this, scene, 'Extern'); + + this.on(GameObjectEvents.ADDED_TO_SCENE, this.addedToScene, this); + this.on(GameObjectEvents.REMOVED_FROM_SCENE, this.removedFromScene, this); + }, + + // Overrides Game Object method + addedToScene: function () + { + this.scene.sys.updateList.add(this); + }, + + // Overrides Game Object method + removedFromScene: function () + { + this.scene.sys.updateList.remove(this); }, preUpdate: function () diff --git a/src/gameobjects/particles/ParticleEmitterManager.js b/src/gameobjects/particles/ParticleEmitterManager.js index a4aa00b9a..5eee3c5a6 100644 --- a/src/gameobjects/particles/ParticleEmitterManager.js +++ b/src/gameobjects/particles/ParticleEmitterManager.js @@ -7,6 +7,7 @@ var Class = require('../../utils/Class'); var Components = require('../components'); var GameObject = require('../GameObject'); +var GameObjectEvents = require('../events'); var GravityWell = require('./GravityWell'); var List = require('../../structs/List'); var ParticleEmitter = require('./ParticleEmitter'); @@ -147,6 +148,21 @@ var ParticleEmitterManager = new Class({ this.createEmitter(emitters[i]); } } + + this.on(GameObjectEvents.ADDED_TO_SCENE, this.addedToScene, this); + this.on(GameObjectEvents.REMOVED_FROM_SCENE, this.removedFromScene, this); + }, + + // Overrides Game Object method + addedToScene: function () + { + this.scene.sys.updateList.add(this); + }, + + // Overrides Game Object method + removedFromScene: function () + { + this.scene.sys.updateList.remove(this); }, /** diff --git a/src/gameobjects/rope/Rope.js b/src/gameobjects/rope/Rope.js index 71b4db4d0..2eb2d483c 100644 --- a/src/gameobjects/rope/Rope.js +++ b/src/gameobjects/rope/Rope.js @@ -7,6 +7,7 @@ var Class = require('../../utils/Class'); var Components = require('../components'); var GameObject = require('../GameObject'); +var GameObjectEvents = require('../events'); var RopeRender = require('./RopeRender'); var Vector2 = require('../../math/Vector2'); @@ -20,7 +21,7 @@ var Vector2 = require('../../math/Vector2'); * Unlike a Sprite, it isn't restricted to using just a quad and can have as many vertices as you define * when creating it. The vertices can be arranged in a horizontal or vertical strip and have their own * color and alpha values as well. - * + * * A Ropes origin is always 0.5 x 0.5 and cannot be changed. * * @class Rope @@ -92,15 +93,15 @@ var Rope = new Class({ /** * An array containing the points data for this Rope. - * + * * Each point should be given as a Vector2Like object (i.e. a Vector2, Geom.Point or object with public x/y properties). - * + * * The point coordinates are given in local space, where 0 x 0 is the start of the Rope strip. - * + * * You can modify the contents of this array directly in real-time to create interesting effects. * If you do so, be sure to call `setDirty` _after_ modifying this array, so that the vertices data is * updated before the next render. Alternatively, you can use the `setPoints` method instead. - * + * * Should you need to change the _size_ of this array, then you should always use the `setPoints` method. * * @name Phaser.GameObjects.Rope#points @@ -111,7 +112,7 @@ var Rope = new Class({ /** * An array containing the vertices data for this Rope. - * + * * This data is calculated automatically in the `updateVertices` method, based on the points provided. * * @name Phaser.GameObjects.Rope#vertices @@ -122,7 +123,7 @@ var Rope = new Class({ /** * An array containing the uv data for this Rope. - * + * * This data is calculated automatically in the `setPoints` method, based on the points provided. * * @name Phaser.GameObjects.Rope#uv @@ -133,10 +134,10 @@ var Rope = new Class({ /** * An array containing the color data for this Rope. - * + * * Colors should be given as numeric RGB values, such as 0xff0000. * You should provide _two_ color values for every point in the Rope, one for the top and one for the bottom of each quad. - * + * * You can modify the contents of this array directly in real-time, however, should you need to change the _size_ * of the array, then you should use the `setColors` method instead. * @@ -148,10 +149,10 @@ var Rope = new Class({ /** * An array containing the alpha data for this Rope. - * + * * Alphas should be given as float values, such as 0.5. * You should provide _two_ alpha values for every point in the Rope, one for the top and one for the bottom of each quad. - * + * * You can modify the contents of this array directly in real-time, however, should you need to change the _size_ * of the array, then you should use the `setAlphas` method instead. * @@ -163,11 +164,11 @@ var Rope = new Class({ /** * The tint fill mode. - * + * * 0 = An additive tint (the default), where vertices colors are blended with the texture. * 1 = A fill tint, where the vertices colors replace the texture, but respects texture alpha. * 2 = A complete tint, where the vertices colors replace the texture, including alpha, entirely. - * + * * @name Phaser.GameObjects.Rope#tintFill * @type {integer} * @since 3.23.0 @@ -177,7 +178,7 @@ var Rope = new Class({ /** * If the Rope is marked as `dirty` it will automatically recalculate its vertices * the next time it renders. You can also force this by calling `updateVertices`. - * + * * @name Phaser.GameObjects.Rope#dirty * @type {boolean} * @since 3.23.0 @@ -186,10 +187,10 @@ var Rope = new Class({ /** * Are the Rope vertices aligned horizontally, in a strip, or vertically, in a column? - * + * * This property is set during instantiation and cannot be changed directly. * See the `setVertical` and `setHorizontal` methods. - * + * * @name Phaser.GameObjects.Rope#horizontal * @type {boolean} * @readonly @@ -199,11 +200,11 @@ var Rope = new Class({ /** * The horizontally flipped state of the Game Object. - * + * * A Game Object that is flipped horizontally will render inversed on the horizontal axis. * Flipping always takes place from the middle of the texture and does not impact the scale value. * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - * + * * @name Phaser.GameObjects.Rope#_flipX * @type {boolean} * @default false @@ -214,11 +215,11 @@ var Rope = new Class({ /** * The vertically flipped state of the Game Object. - * + * * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) * Flipping always takes place from the middle of the texture and does not impact the scale value. * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - * + * * @name Phaser.GameObjects.Rope#flipY * @type {boolean} * @default false @@ -229,7 +230,7 @@ var Rope = new Class({ /** * Internal Vector2 used for vertices updates. - * + * * @name Phaser.GameObjects.Rope#_perp * @type {Phaser.Math.Vector2} * @private @@ -239,21 +240,21 @@ var Rope = new Class({ /** * You can optionally choose to render the vertices of this Rope to a Graphics instance. - * + * * Achieve this by setting the `debugCallback` and the `debugGraphic` properties. - * + * * You can do this in a single call via the `Rope.setDebug` method, which will use the * built-in debug function. You can also set it to your own callback. The callback * will be invoked _once per render_ and sent the following parameters: - * + * * `debugCallback(src, meshLength, verts)` - * + * * `src` is the Rope instance being debugged. * `meshLength` is the number of mesh vertices in total. * `verts` is an array of the translated vertex coordinates. - * + * * To disable rendering, set this property back to `null`. - * + * * @name Phaser.GameObjects.Rope#debugCallback * @type {function} * @since 3.23.0 @@ -263,7 +264,7 @@ var Rope = new Class({ /** * The Graphics instance that the debug vertices will be drawn to, if `setDebug` has * been called. - * + * * @name Phaser.GameObjects.Rope#debugGraphic * @type {Phaser.GameObjects.Graphics} * @since 3.23.0 @@ -273,7 +274,7 @@ var Rope = new Class({ this.setTexture(texture, frame); this.setPosition(x, y); this.setSizeToFrame(); - this.initPipeline('TextureTintStripPipeline'); + this.initPipeline('RopePipeline'); if (Array.isArray(points)) { @@ -283,6 +284,21 @@ var Rope = new Class({ this.setPoints(points, colors, alphas); this.updateVertices(); + + this.on(GameObjectEvents.ADDED_TO_SCENE, this.addedToScene, this); + this.on(GameObjectEvents.REMOVED_FROM_SCENE, this.removedFromScene, this); + }, + + // Overrides Game Object method + addedToScene: function () + { + this.scene.sys.updateList.add(this); + }, + + // Overrides Game Object method + removedFromScene: function () + { + this.scene.sys.updateList.remove(this); }, /** @@ -331,10 +347,10 @@ var Rope = new Class({ * Flags this Rope as being dirty. A dirty rope will recalculate all of its vertices data * the _next_ time it renders. You should set this rope as dirty if you update the points * array directly. - * + * * @method Phaser.GameObjects.Rope#setDirty * @since 3.23.0 - * + * * @return {this} This Game Object instance. */ setDirty: function () @@ -346,17 +362,17 @@ var Rope = new Class({ /** * Sets the alignment of the points in this Rope to be horizontal, in a strip format. - * + * * Calling this method will reset this Rope. The current points, vertices, colors and alpha * values will be reset to thoes values given as parameters. - * + * * @method Phaser.GameObjects.Rope#setHorizontal * @since 3.23.0 - * + * * @param {(integer|Phaser.Types.Math.Vector2Like[])} [points] - An array containing the vertices data for this Rope, or a number that indicates how many segments to split the texture frame into. If none is provided the current points length is used. * @param {(number|number[])} [colors] - Either a single color value, or an array of values. * @param {(number|number[])} [alphas] - Either a single alpha value, or an array of values. - * + * * @return {this} This Game Object instance. */ setHorizontal: function (points, colors, alphas) @@ -375,17 +391,17 @@ var Rope = new Class({ /** * Sets the alignment of the points in this Rope to be vertical, in a column format. - * + * * Calling this method will reset this Rope. The current points, vertices, colors and alpha * values will be reset to thoes values given as parameters. - * + * * @method Phaser.GameObjects.Rope#setVertical * @since 3.23.0 - * + * * @param {(integer|Phaser.Types.Math.Vector2Like[])} [points] - An array containing the vertices data for this Rope, or a number that indicates how many segments to split the texture frame into. If none is provided the current points length is used. * @param {(number|number[])} [colors] - Either a single color value, or an array of values. * @param {(number|number[])} [alphas] - Either a single alpha value, or an array of values. - * + * * @return {this} This Game Object instance. */ setVertical: function (points, colors, alphas) @@ -404,16 +420,16 @@ var Rope = new Class({ /** * Sets the tint fill mode. - * + * * Mode 0 is an additive tint, the default, which blends the vertices colors with the texture. * This mode respects the texture alpha. - * + * * Mode 1 is a fill tint. Unlike an additive tint, a fill-tint literally replaces the pixel colors * from the texture with those in the tint. You can use this for effects such as making a player flash 'white' * if hit by something. This mode respects the texture alpha. - * + * * Mode 2 is a complete tint. The texture colors and alpha are replaced entirely by the vertices colors. - * + * * See the `setColors` method for details of how to color each of the vertices. * * @method Phaser.GameObjects.Rope#setTintFill @@ -421,7 +437,7 @@ var Rope = new Class({ * @since 3.23.0 * * @param {integer} [value=0] - Set to 0 for an Additive tint, 1 for a fill tint with alpha, or 2 for a fill tint without alpha. - * + * * @return {this} This Game Object instance. */ setTintFill: function (value) @@ -435,28 +451,28 @@ var Rope = new Class({ /** * Set the alpha values used by the Rope during rendering. - * + * * You can provide the values in a number of ways: - * + * * 1) One single numeric value: `setAlphas(0.5)` - This will set a single alpha for the whole Rope. * 2) Two numeric value: `setAlphas(1, 0.5)` - This will set a 'top' and 'bottom' alpha value across the whole Rope. * 3) An array of values: `setAlphas([ 1, 0.5, 0.2 ])` - * + * * If you provide an array of values and the array has exactly the same number of values as `points` in the Rope, it * will use each alpha value per rope segment. - * + * * If the provided array has a different number of values than `points` then it will use the values in order, from * the first Rope segment and on, until it runs out of values. This allows you to control the alpha values at all * vertices in the Rope. - * + * * Note this method is called `setAlphas` (plural) and not `setAlpha`. - * + * * @method Phaser.GameObjects.Rope#setAlphas * @since 3.23.0 - * + * * @param {(number|number[])} [alphas] - Either a single alpha value, or an array of values. If nothing is provided alpha is reset to 1. * @param {number} [bottomAlpha] - An optional bottom alpha value. See the method description for details. - * + * * @return {this} This Game Object instance. */ setAlphas: function (alphas, bottomAlpha) @@ -511,7 +527,7 @@ var Rope = new Class({ for (i = 0; i < total; i++) { index = i * 2; - + if (alphas.length > index) { prevAlpha = alphas[index]; @@ -534,26 +550,26 @@ var Rope = new Class({ /** * Set the color values used by the Rope during rendering. - * + * * Colors are used to control the level of tint applied across the Rope texture. - * + * * You can provide the values in a number of ways: - * + * * * One single numeric value: `setColors(0xff0000)` - This will set a single color tint for the whole Rope. * * An array of values: `setColors([ 0xff0000, 0x00ff00, 0x0000ff ])` - * + * * If you provide an array of values and the array has exactly the same number of values as `points` in the Rope, it * will use each color per rope segment. - * + * * If the provided array has a different number of values than `points` then it will use the values in order, from * the first Rope segment and on, until it runs out of values. This allows you to control the color values at all * vertices in the Rope. - * + * * @method Phaser.GameObjects.Rope#setColors * @since 3.23.0 - * + * * @param {(number|number[])} [colors] - Either a single color value, or an array of values. If nothing is provided color is reset to 0xffffff. - * + * * @return {this} This Game Object instance. */ setColors: function (colors) @@ -597,7 +613,7 @@ var Rope = new Class({ for (i = 0; i < total; i++) { index = i * 2; - + if (colors.length > index) { prevColor = colors[index]; @@ -619,16 +635,16 @@ var Rope = new Class({ /** * Sets the points used by this Rope. - * + * * The points should be provided as an array of Vector2, or vector2-like objects (i.e. those with public x/y properties). - * + * * Each point corresponds to one segment of the Rope. The more points in the array, the more segments the rope has. - * + * * Point coordinates are given in local-space, not world-space, and are directly related to the size of the texture * this Rope object is using. - * + * * For example, a Rope using a 512 px wide texture, split into 4 segments (128px each) would use the following points: - * + * * ```javascript * rope.setPoints([ * { x: 0, y: 0 }, @@ -637,25 +653,25 @@ var Rope = new Class({ * { x: 384, y: 0 } * ]); * ``` - * + * * Or, you can provide an integer to do the same thing: - * + * * ```javascript * rope.setPoints(4); * ``` - * + * * Which will divide the Rope into 4 equally sized segments based on the frame width. - * + * * Note that calling this method with a different number of points than the Rope has currently will * _reset_ the color and alpha values, unless you provide them as arguments to this method. - * + * * @method Phaser.GameObjects.Rope#setPoints * @since 3.23.0 - * + * * @param {(integer|Phaser.Types.Math.Vector2Like[])} [points=2] - An array containing the vertices data for this Rope, or a number that indicates how many segments to split the texture frame into. If none is provided a simple quad is created. * @param {(number|number[])} [colors] - Either a single color value, or an array of values. * @param {(number|number[])} [alphas] - Either a single alpha value, or an array of values. - * + * * @return {this} This Game Object instance. */ setPoints: function (points, colors, alphas) @@ -677,7 +693,7 @@ var Rope = new Class({ var s; var frameSegment; var offset; - + if (this.horizontal) { offset = -(this.frame.halfWidth); @@ -739,10 +755,10 @@ var Rope = new Class({ /** * Updates all of the UVs based on the Rope.points and `flipX` and `flipY` settings. - * + * * @method Phaser.GameObjects.Rope#updateUVs * @since 3.23.0 - * + * * @return {this} This Game Object instance. */ updateUVs: function () @@ -757,7 +773,7 @@ var Rope = new Class({ var partH = (u1 - u0) / (total - 1); var partV = (v1 - v0) / (total - 1); - + for (var i = 0; i < total; i++) { var index = i * 4; @@ -828,12 +844,12 @@ var Rope = new Class({ /** * Resizes all of the internal arrays: `vertices`, `uv`, `colors` and `alphas` to the new * given Rope segment total. - * + * * @method Phaser.GameObjects.Rope#resizeArrays * @since 3.23.0 - * + * * @param {integer} newSize - The amount of segments to split the Rope in to. - * + * * @return {this} This Game Object instance. */ resizeArrays: function (newSize) @@ -864,14 +880,14 @@ var Rope = new Class({ /** * Updates the vertices based on the Rope points. - * + * * This method is called automatically during rendering if `Rope.dirty` is `true`, which is set * by the `setPoints` and `setDirty` methods. You should flag the Rope as being dirty if you modify * the Rope points directly. - * + * * @method Phaser.GameObjects.Rope#updateVertices * @since 3.23.0 - * + * * @return {this} This Game Object instance. */ updateVertices: function () @@ -893,12 +909,12 @@ var Rope = new Class({ var lastPoint = points[0]; var frameSize = (this.horizontal) ? this.frame.halfHeight : this.frame.halfWidth; - + for (var i = 0; i < total; i++) { var point = points[i]; var index = i * 4; - + if (i < total - 1) { nextPoint = points[i + 1]; @@ -910,12 +926,12 @@ var Rope = new Class({ perp.x = nextPoint.y - lastPoint.y; perp.y = -(nextPoint.x - lastPoint.x); - + var perpLength = perp.length(); perp.x /= perpLength; perp.y /= perpLength; - + perp.x *= frameSize; perp.y *= frameSize; @@ -923,7 +939,7 @@ var Rope = new Class({ vertices[index + 1] = point.y + perp.y; vertices[index + 2] = point.x - perp.x; vertices[index + 3] = point.y - perp.y; - + lastPoint = point; } @@ -932,33 +948,33 @@ var Rope = new Class({ /** * This method enables rendering of the Rope vertices to the given Graphics instance. - * + * * If you enable this feature, you must call `Graphics.clear()` in your Scene `update`, * otherwise the Graphics instance will fill-in with draw calls. This is not done automatically * to allow for you to debug render multiple Rope objects to a single Graphics instance. - * + * * The Rope class has a built-in debug rendering callback `Rope.renderDebugVerts`, however * you can also provide your own callback to be used instead. Do this by setting the `callback` parameter. - * + * * The callback is invoked _once per render_ and sent the following parameters: - * + * * `callback(src, meshLength, verts)` - * + * * `src` is the Rope instance being debugged. * `meshLength` is the number of mesh vertices in total. * `verts` is an array of the translated vertex coordinates. - * + * * If using your own callback you do not have to provide a Graphics instance to this method. - * + * * To disable debug rendering, to either your own callback or the built-in one, call this method * with no arguments. - * + * * @method Phaser.GameObjects.Rope#setDebug * @since 3.23.0 - * + * * @param {Phaser.GameObjects.Graphics} [graphic] - The Graphic instance to render to if using the built-in callback. * @param {function} [callback] - The callback to invoke during debug render. Leave as undefined to use the built-in callback. - * + * * @return {this} This Game Object instance. */ setDebug: function (graphic, callback) @@ -983,12 +999,12 @@ var Rope = new Class({ /** * The built-in Rope vertices debug rendering method. - * + * * See `Rope.setDebug` for more details. * * @method Phaser.GameObjects.Rope#renderDebugVerts * @since 3.23.0 - * + * * @param {Phaser.GameObjects.Rope} src - The Rope object being rendered. * @param {integer} meshLength - The number of vertices in the mesh. * @param {number[]} verts - An array of translated vertex coordinates. @@ -1048,11 +1064,11 @@ var Rope = new Class({ /** * The horizontally flipped state of the Game Object. - * + * * A Game Object that is flipped horizontally will render inversed on the horizontal axis. * Flipping always takes place from the middle of the texture and does not impact the scale value. * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - * + * * @name Phaser.GameObjects.Rope#flipX * @type {boolean} * @default false @@ -1076,11 +1092,11 @@ var Rope = new Class({ /** * The vertically flipped state of the Game Object. - * + * * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) * Flipping always takes place from the middle of the texture and does not impact the scale value. * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - * + * * @name Phaser.GameObjects.Rope#flipY * @type {boolean} * @default false diff --git a/src/gameobjects/sprite/Sprite.js b/src/gameobjects/sprite/Sprite.js index 916df9144..663b0821b 100644 --- a/src/gameobjects/sprite/Sprite.js +++ b/src/gameobjects/sprite/Sprite.js @@ -7,6 +7,7 @@ var Class = require('../../utils/Class'); var Components = require('../components'); var GameObject = require('../GameObject'); +var GameObjectEvents = require('../events'); var SpriteRender = require('./SpriteRender'); /** @@ -100,6 +101,21 @@ var Sprite = new Class({ this.setSizeToFrame(); this.setOriginFromFrame(); this.initPipeline(); + + this.on(GameObjectEvents.ADDED_TO_SCENE, this.addedToScene, this); + this.on(GameObjectEvents.REMOVED_FROM_SCENE, this.removedFromScene, this); + }, + + // Overrides Game Object method + addedToScene: function () + { + this.scene.sys.updateList.add(this); + }, + + // Overrides Game Object method + removedFromScene: function () + { + this.scene.sys.updateList.remove(this); }, /** From 3bd91ea3dedf57fbacf2ef54cf20f96fec6252f6 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 24 Aug 2020 19:24:11 +0100 Subject: [PATCH 072/241] Update ParticleManagerCreator.js --- src/gameobjects/particles/ParticleManagerCreator.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/gameobjects/particles/ParticleManagerCreator.js b/src/gameobjects/particles/ParticleManagerCreator.js index 38272f7f8..b02d1a086 100644 --- a/src/gameobjects/particles/ParticleManagerCreator.js +++ b/src/gameobjects/particles/ParticleManagerCreator.js @@ -45,7 +45,5 @@ GameObjectCreator.register('particles', function (config, addToScene) this.displayList.add(manager); } - this.updateList.add(manager); - return manager; }); From 157be83f7ca90d02cf021a53559df94c7e3a71c8 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 24 Aug 2020 19:26:19 +0100 Subject: [PATCH 073/241] The `Container` will now test to see if any Game Object added to it is already on the display list, or not, and emit its ADDED and REMOVED events accordingly. Fix #5267 #3876 --- src/gameobjects/container/Container.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/gameobjects/container/Container.js b/src/gameobjects/container/Container.js index 09c5e1f56..8f4de4e29 100644 --- a/src/gameobjects/container/Container.js +++ b/src/gameobjects/container/Container.js @@ -11,6 +11,7 @@ var Class = require('../../utils/Class'); var Components = require('../components'); var Events = require('../events'); var GameObject = require('../GameObject'); +var GameObjectEvents = require('../events'); var Rectangle = require('../../geom/rectangle/Rectangle'); var Render = require('./ContainerRender'); var Union = require('../../geom/rectangle/Union'); @@ -452,6 +453,12 @@ var Container = new Class({ gameObject.parentContainer = this; } + + // Is only on the Display List via this Container + if (!this.scene.sys.displayList.exists(gameObject)) + { + gameObject.emit(GameObjectEvents.ADDED_TO_SCENE, gameObject, this.scene); + } }, /** @@ -471,6 +478,12 @@ var Container = new Class({ { gameObject.parentContainer = null; } + + // Is only on the Display List via this Container + if (!this.scene.sys.displayList.exists(gameObject)) + { + gameObject.emit(GameObjectEvents.REMOVED_FROM_SCENE, gameObject, this.scene); + } }, /** From 979ef9c71d024bde87f029219daf7203abc71e55 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 24 Aug 2020 19:26:23 +0100 Subject: [PATCH 074/241] Update CHANGELOG.md --- CHANGELOG.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6ddf1cfd..24a587d0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -171,6 +171,28 @@ If you used any of them in your code, please update to the new function names be * If you apply `setSize` to the Dynamic BitmapText the scissor is now calculated based on the parent transforms, not just the local ones, meaning you can crop Bitmap Text objects that exist within Containers. Fix #4653 (thanks @lgibson02) * `ParseXMLBitmapFont` has a new optional parameter `texture`. If defined, this Texture is populated with Frame data, one frame per glyph. This happens automatically when loading Bitmap Text data in Phaser. +### Update List Changes + +The way in which Game Objects add themselves to the Scene Update List has changed. Instead of being added by the Factory methods, they will now add and remove themselves based on the new `ADDED_TO_SCENE` and `REMOVED_FROM_SCENE` events. This means, you can now add Sprites directly to a Container, or Group, and they'll animate properly without first having to be part of the Display List. The full set of changes and new features relating to this follow: + +* `GameObjects.Events.ADDED_TO_SCENE` is a new event, emitted by a Game Object, when it is added to a Scene, or a Container that is part of the Scene. +* `GameObjects.Events.REMOVED_FROM_SCENE` is a new event, emitted by a Game Object, when it is removed from a Scene, or a Container that is part of the Scene. +* `Scenes.Events.ADDED_TO_SCENE` is a new event, emitted by a Scene, when a new Game Object is added to the display list in the Scene, or a Container that is on the display list. +* `Scenes.Events.REMOVED_FROM_SCENE` is a new event, emitted by a Scene, when it a Game Object is removed from the display list in the Scene, or a Container that is on the display list. +* `GameObject.addedToScene` is a new method that custom Game Objects can use to perform additional set-up when a Game Object is added to a Scene. For example, Sprite uses this to add itself to the Update List. +* `GameObject.removedFromScene` is a new method that custom Game Objects can use to perform additional tear-down when a Game Object is removed from a Scene. For example, Sprite uses this to remove themselves from the Update List. +* Game Objects no longer automatically remove themselves from the Update List during `preDestroy`. This should be handled directly in the `removedFromScene` method now. +* The `Container` will now test to see if any Game Object added to it is already on the display list, or not, and emit its ADDED and REMOVED events accordingly. Fix #5267 #3876 (thanks @halgorithm @mbpictures) +* `DisplayList.events` is a new property that references the Scene's Event Emitter. This is now used internally. +* `DisplayList.addChildCallback` is a new method that overrides the List callback and fires the new ADDED events. +* `DisplayList.removeChildCallback` is a new method that overrides the List callback and fires the new REMOVED events. +* `GameObjectCreator.events` is a new property that references the Scene's Event Emitter. This is now used internally. +* `GameObjectFactory.events` is a new property that references the Scene's Event Emitter. This is now used internally. +* `ProcessQueue.checkQueue` is a new boolean property that will make sure only unique objects are added to the Process Queue. +* The `Update List` now uses the new `checkQueue` property to ensure no duplicate objects are on the active list. +* `DOMElementFactory`, `ExternFactory`, `ParticleManagerFactor`, `RopeFactory` and `SpriteFactory` all no longer add the objects to the Update List, this is now handled by the ADDED events instead. +* `Sprite`, `Rope`, `ParticleEmitterManager`, `Extern` and `DOMElement` now all override the `addedToScene` and `removedFromScene` callbacks to handle further set-up tasks. + ### New Features * `Geom.Intersects.GetLineToLine` is a new function that will return a Vector3 containing the point of intersection between 2 line segments, with the `z` property holding the distance value. From 4d8cff1fb33f7cb237d4b8eb779f7e927a947881 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 24 Aug 2020 19:33:56 +0100 Subject: [PATCH 075/241] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24a587d0b..7134c180d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -253,7 +253,7 @@ The way in which Game Objects add themselves to the Scene Update List has change My thanks to the following for helping with the Phaser 3 Examples, Docs, and TypeScript definitions, either by reporting errors, fixing them, or helping author the docs: -@samme @16patsle @scott20145 @khasanovbi @mk360 @volkans80 +@samme @16patsle @scott20145 @khasanovbi @mk360 @volkans80 @jaabberwocky From 795a190ce3e85daac74cc99510e5fd7457d3356c Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 24 Aug 2020 19:51:20 +0100 Subject: [PATCH 076/241] The `BaseShader` default vertex shader now includes the `outTexCoord` vec2 varying, mapped to be the same as that found in the pipeline shaders. Fix #5120 --- src/display/shader/BaseShader.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/display/shader/BaseShader.js b/src/display/shader/BaseShader.js index 4a06ee495..469e7d869 100644 --- a/src/display/shader/BaseShader.js +++ b/src/display/shader/BaseShader.js @@ -9,16 +9,16 @@ var Class = require('../../utils/Class'); /** * @classdesc * A BaseShader is a small resource class that contains the data required for a WebGL Shader to be created. - * + * * It contains the raw source code to the fragment and vertex shader, as well as an object that defines * the uniforms the shader requires, if any. - * + * * BaseShaders are stored in the Shader Cache, available in a Scene via `this.cache.shaders` and are referenced * by a unique key-based string. Retrieve them via `this.cache.shaders.get(key)`. - * + * * BaseShaders are created automatically by the GLSL File Loader when loading an external shader resource. * They can also be created at runtime, allowing you to use dynamically generated shader source code. - * + * * Default fragment and vertex source is used if not provided in the constructor, setting-up a basic shader, * suitable for debug rendering. * @@ -66,10 +66,12 @@ var BaseShader = new Class({ '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);', + ' 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'); } From 408c828a6c0794ab907246207c9bec837a888efc Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 24 Aug 2020 19:51:22 +0100 Subject: [PATCH 077/241] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7134c180d..4aa6015a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -237,6 +237,7 @@ The way in which Game Objects add themselves to the Scene Update List has change * `Pointer.downTime` now stores the event timestamp of when the first button on the input device was pressed down, not just when button 1 was pressed down. * `Pointer.upTime` now stores the event timestamp of when the final depressed button on the input device was released, not just when button 1 was released. * The `Pointer.getDuration` method now uses the new Pointer `downTime` and `upTime` values, meaning it will accurately report the duration of when any button is being held down, not just the primary one. Fix #5112 (thanks @veleek) +* The `BaseShader` default vertex shader now includes the `outTexCoord` vec2 varying, mapped to be the same as that found in the pipeline shaders. Fix #5120 (@pavel-shirobok) ### Bug Fixes From 1f50b49eff08a114d4b5061d2a2d2529e84bcc83 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 25 Aug 2020 09:54:03 +0100 Subject: [PATCH 078/241] Earcut has now been exposed and is available via `Geom.Polygon.Earcut` and is fully documented. --- src/geom/polygon/Earcut.js | 59 ++++++++++++++++++++++++++++++++++++-- src/geom/polygon/index.js | 1 + 2 files changed, 57 insertions(+), 3 deletions(-) diff --git a/src/geom/polygon/Earcut.js b/src/geom/polygon/Earcut.js index 3e55e3a82..e469b4538 100644 --- a/src/geom/polygon/Earcut.js +++ b/src/geom/polygon/Earcut.js @@ -4,7 +4,60 @@ * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -// Earcut 2.2.2 (January 21st 2020) +/** + * This module implements a modified ear slicing algorithm, optimized by z-order curve hashing and extended to + * handle holes, twisted polygons, degeneracies and self-intersections in a way that doesn't guarantee correctness + * of triangulation, but attempts to always produce acceptable results for practical data. + * + * Example: + * + * ```javascript + * const triangles = Phaser.Geom.Polygon.Earcut([10,0, 0,50, 60,60, 70,10]); // returns [1,0,3, 3,2,1] + * ``` + * + * Each group of three vertex indices in the resulting array forms a triangle. + * + * ```javascript + * // triangulating a polygon with a hole + * earcut([0,0, 100,0, 100,100, 0,100, 20,20, 80,20, 80,80, 20,80], [4]); + * // [3,0,4, 5,4,0, 3,4,7, 5,0,1, 2,3,7, 6,5,1, 2,7,6, 6,1,2] + * + * // triangulating a polygon with 3d coords + * earcut([10,0,1, 0,50,2, 60,60,3, 70,10,4], null, 3); + * // [1,0,3, 3,2,1] + * ``` + * + * If you pass a single vertex as a hole, Earcut treats it as a Steiner point. + * + * If your input is a multi-dimensional array (e.g. GeoJSON Polygon), you can convert it to the format + * expected by Earcut with `Phaser.Geom.Polygon.Earcut.flatten`: + * + * ```javascript + * var data = earcut.flatten(geojson.geometry.coordinates); + * var triangles = earcut(data.vertices, data.holes, data.dimensions); + * ``` + * + * After getting a triangulation, you can verify its correctness with `Phaser.Geom.Polygon.Earcut.deviation`: + * + * ```javascript + * var deviation = earcut.deviation(vertices, holes, dimensions, triangles); + * ``` + * Returns the relative difference between the total area of triangles and the area of the input polygon. + * 0 means the triangulation is fully correct. + * + * For more information see https://github.com/mapbox/earcut + * + * @function Phaser.Geom.Polygon.Earcut + * @since 3.50.0 + * + * @param {number[]} data - A flat array of vertex coordinate, like [x0,y0, x1,y1, x2,y2, ...] + * @param {number[]} [holeIndices] - An array of hole indices if any (e.g. [5, 8] for a 12-vertex input would mean one hole with vertices 5–7 and another with 8–11). + * @param {number} [dimensions=2] - The number of coordinates per vertex in the input array (2 by default). + * + * @return {number[]} An array of triangulated data. + */ + + // Earcut 2.2.2 (January 21st 2020) /* * ISC License @@ -26,8 +79,6 @@ 'use strict'; -module.exports = earcut; - function earcut(data, holeIndices, dim) { dim = dim || 2; @@ -702,3 +753,5 @@ earcut.flatten = function (data) { } return result; }; + +module.exports = earcut; diff --git a/src/geom/polygon/index.js b/src/geom/polygon/index.js index ee31ab284..9de3aa96a 100644 --- a/src/geom/polygon/index.js +++ b/src/geom/polygon/index.js @@ -9,6 +9,7 @@ var Polygon = require('./Polygon'); Polygon.Clone = require('./Clone'); Polygon.Contains = require('./Contains'); Polygon.ContainsPoint = require('./ContainsPoint'); +Polygon.Earcut = require('./Earcut'); Polygon.GetAABB = require('./GetAABB'); Polygon.GetNumberArray = require('./GetNumberArray'); Polygon.GetPoints = require('./GetPoints'); From 7e572c35778e040e3160a439a05a7d05a9cbdec6 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 25 Aug 2020 09:54:09 +0100 Subject: [PATCH 079/241] Improves JSDocs --- .../bitmaptext/dynamic/DynamicBitmapText.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/gameobjects/bitmaptext/dynamic/DynamicBitmapText.js b/src/gameobjects/bitmaptext/dynamic/DynamicBitmapText.js index a1e99f1cc..51f8985ab 100644 --- a/src/gameobjects/bitmaptext/dynamic/DynamicBitmapText.js +++ b/src/gameobjects/bitmaptext/dynamic/DynamicBitmapText.js @@ -11,10 +11,10 @@ var Render = require('./DynamicBitmapTextRender'); /** * @classdesc * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure. - * + * * During rendering for each letter of the text is rendered to the display, proportionally spaced out and aligned to * match the font structure. - * + * * Dynamic Bitmap Text objects are different from Static Bitmap Text in that they invoke a callback for each * letter being rendered during the render pass. This callback allows you to manipulate the properties of * each letter being rendered, such as its position, scale or tint, allowing you to create interesting effects @@ -29,12 +29,12 @@ var Render = require('./DynamicBitmapTextRender'); * * To create a BitmapText data files you need a 3rd party app such as: * - * BMFont (Windows, free): http://www.angelcode.com/products/bmfont/ - * Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner - * Littera (Web-based, free): http://kvazars.com/littera/ + * BMFont (Windows, free): {@link http://www.angelcode.com/products/bmfont/|http://www.angelcode.com/products/bmfont/} + * Glyph Designer (OS X, commercial): {@link http://www.71squared.com/en/glyphdesigner|http://www.71squared.com/en/glyphdesigner} + * Littera (Web-based, free): {@link http://kvazars.com/littera/|http://kvazars.com/littera/} * * For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of - * converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson + * converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: {@link http://codebeautify.org/xmltojson|http://codebeautify.org/xmltojson} * * @class DynamicBitmapText * @extends Phaser.GameObjects.BitmapText @@ -119,7 +119,7 @@ var DynamicBitmapText = new Class({ * The data object that is populated during rendering, then passed to the displayCallback. * You should modify this object then return it back from the callback. It's updated values * will be used to render the specific glyph. - * + * * Please note that if you need a reference to this object locally in your game code then you * should shallow copy it, as it's updated and re-used for every glyph in the text. * From f6f7a257883678eb84ac64390ba1507017051b05 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 25 Aug 2020 09:54:12 +0100 Subject: [PATCH 080/241] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4aa6015a9..1a64ff1b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -217,6 +217,7 @@ The way in which Game Objects add themselves to the Scene Update List has change ### Updates and API Changes * Earcut, used for polygon triangulation, has been updated from 2.1.4 to 2.2.2. +* Earcut has now been exposed and is available via `Geom.Polygon.Earcut` and is fully documented. * `Config.batchSize` has been increased from 2000 to 4096. * Removed the Deferred Diffuse fragment and vertex shaders from the project, as they're not used. * `StaticTilemapLayer.upload` will now set the vertex attributes and buffer the data, and handles internal checks more efficiently. From 7d1ad38b4a4cfaf975b18f5d92628783b6959960 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 25 Aug 2020 13:23:59 +0100 Subject: [PATCH 081/241] Updated shader names --- src/renderer/webgl/shaders/Light-frag.js | 2 +- src/renderer/webgl/shaders/Multi-frag.js | 2 +- src/renderer/webgl/shaders/Multi-vert.js | 2 +- src/renderer/webgl/shaders/Single-frag.js | 2 +- src/renderer/webgl/shaders/Single-vert.js | 2 +- src/renderer/webgl/shaders/src/Light.frag | 2 +- src/renderer/webgl/shaders/src/Multi.frag | 2 +- src/renderer/webgl/shaders/src/Multi.vert | 2 +- src/renderer/webgl/shaders/src/Single.frag | 2 +- src/renderer/webgl/shaders/src/Single.vert | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/renderer/webgl/shaders/Light-frag.js b/src/renderer/webgl/shaders/Light-frag.js index c3858085f..fb19e26cf 100644 --- a/src/renderer/webgl/shaders/Light-frag.js +++ b/src/renderer/webgl/shaders/Light-frag.js @@ -1,5 +1,5 @@ module.exports = [ - '#define SHADER_NAME PHASER_FORWARD_DIFFUSE_FS', + '#define SHADER_NAME PHASER_LIGHT_FS', '', 'precision mediump float;', '', diff --git a/src/renderer/webgl/shaders/Multi-frag.js b/src/renderer/webgl/shaders/Multi-frag.js index e956899e6..582e2a05b 100644 --- a/src/renderer/webgl/shaders/Multi-frag.js +++ b/src/renderer/webgl/shaders/Multi-frag.js @@ -1,5 +1,5 @@ module.exports = [ - '#define SHADER_NAME PHASER_TEXTURE_TINT_FS', + '#define SHADER_NAME PHASER_MULTI_FS', '', 'precision mediump float;', '', diff --git a/src/renderer/webgl/shaders/Multi-vert.js b/src/renderer/webgl/shaders/Multi-vert.js index 253767e9f..afab5479e 100644 --- a/src/renderer/webgl/shaders/Multi-vert.js +++ b/src/renderer/webgl/shaders/Multi-vert.js @@ -1,5 +1,5 @@ module.exports = [ - '#define SHADER_NAME PHASER_TEXTURE_TINT_VS', + '#define SHADER_NAME PHASER_MULTI_VS', '', 'precision mediump float;', '', diff --git a/src/renderer/webgl/shaders/Single-frag.js b/src/renderer/webgl/shaders/Single-frag.js index f14eb511d..6476b2f14 100644 --- a/src/renderer/webgl/shaders/Single-frag.js +++ b/src/renderer/webgl/shaders/Single-frag.js @@ -1,5 +1,5 @@ module.exports = [ - '#define SHADER_NAME PHASER_SINGLE_TEXTURE_TINT_FS', + '#define SHADER_NAME PHASER_SINGLE_FS', '', 'precision mediump float;', '', diff --git a/src/renderer/webgl/shaders/Single-vert.js b/src/renderer/webgl/shaders/Single-vert.js index f96e5fdab..c376be1a1 100644 --- a/src/renderer/webgl/shaders/Single-vert.js +++ b/src/renderer/webgl/shaders/Single-vert.js @@ -1,5 +1,5 @@ module.exports = [ - '#define SHADER_NAME PHASER_SINGLE_TEXTURE_TINT_VS', + '#define SHADER_NAME PHASER_SINGLE_VS', '', 'precision mediump float;', '', diff --git a/src/renderer/webgl/shaders/src/Light.frag b/src/renderer/webgl/shaders/src/Light.frag index 1d251502a..67236b7b8 100644 --- a/src/renderer/webgl/shaders/src/Light.frag +++ b/src/renderer/webgl/shaders/src/Light.frag @@ -1,4 +1,4 @@ -#define SHADER_NAME PHASER_FORWARD_DIFFUSE_FS +#define SHADER_NAME PHASER_LIGHT_FS precision mediump float; diff --git a/src/renderer/webgl/shaders/src/Multi.frag b/src/renderer/webgl/shaders/src/Multi.frag index f0729f414..1b7f61203 100644 --- a/src/renderer/webgl/shaders/src/Multi.frag +++ b/src/renderer/webgl/shaders/src/Multi.frag @@ -1,4 +1,4 @@ -#define SHADER_NAME PHASER_TEXTURE_TINT_FS +#define SHADER_NAME PHASER_MULTI_FS precision mediump float; diff --git a/src/renderer/webgl/shaders/src/Multi.vert b/src/renderer/webgl/shaders/src/Multi.vert index bd4a91124..88f94b8e2 100644 --- a/src/renderer/webgl/shaders/src/Multi.vert +++ b/src/renderer/webgl/shaders/src/Multi.vert @@ -1,4 +1,4 @@ -#define SHADER_NAME PHASER_TEXTURE_TINT_VS +#define SHADER_NAME PHASER_MULTI_VS precision mediump float; diff --git a/src/renderer/webgl/shaders/src/Single.frag b/src/renderer/webgl/shaders/src/Single.frag index 080a56737..2a9c3648d 100644 --- a/src/renderer/webgl/shaders/src/Single.frag +++ b/src/renderer/webgl/shaders/src/Single.frag @@ -1,4 +1,4 @@ -#define SHADER_NAME PHASER_SINGLE_TEXTURE_TINT_FS +#define SHADER_NAME PHASER_SINGLE_FS precision mediump float; diff --git a/src/renderer/webgl/shaders/src/Single.vert b/src/renderer/webgl/shaders/src/Single.vert index 91236a6a3..f26c1d05b 100644 --- a/src/renderer/webgl/shaders/src/Single.vert +++ b/src/renderer/webgl/shaders/src/Single.vert @@ -1,4 +1,4 @@ -#define SHADER_NAME PHASER_SINGLE_TEXTURE_TINT_VS +#define SHADER_NAME PHASER_SINGLE_VS precision mediump float; From e4ec0bd182de623f1b72f1e45d521bf66d068f45 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 25 Aug 2020 13:24:20 +0100 Subject: [PATCH 082/241] Bumped version (and added source-map) --- package-lock.json | 93 ++++++++++++++++++++++++++++++++++++++++++----- package.json | 4 +- src/const.js | 2 +- 3 files changed, 87 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 74a1d907b..8c70f1db3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -109,6 +109,12 @@ "integrity": "sha512-K5K+yml8LTo9bWJI/rECfIPrGgxdpeNbj+d53lwN4QjW1MCwlkhUms+gtdzigTeUyBr09+u8BwOIY3MXvHdcsA==", "dev": true }, + "@types/source-map": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@types/source-map/-/source-map-0.5.2.tgz", + "integrity": "sha512-++w4WmMbk3dS3UeHGzAG+xJOSz5Xqtjys/TBkqG3qp3SeWE7Wwezqe5eB7B51cxUyh4PW7bwVotpsLdBK0D8cw==", + "dev": true + }, "@types/tapable": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/tapable/-/tapable-1.0.6.tgz", @@ -122,6 +128,14 @@ "dev": true, "requires": { "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "@types/webpack": { @@ -136,6 +150,14 @@ "@types/uglify-js": "*", "@types/webpack-sources": "*", "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "@types/webpack-sources": { @@ -431,7 +453,7 @@ "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha1-vNZ5HqWuCXJeF+WtmIE0zUCz2RE=", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "requires": { "sprintf-js": "~1.0.2" @@ -664,7 +686,7 @@ "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { "balanced-match": "^1.0.0", @@ -1165,7 +1187,7 @@ "concat-stream": { "version": "1.6.2", "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha1-kEvfGUzTEi/Gdcd/xKw9T/D9GjQ=", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -1713,7 +1735,7 @@ "esrecurse": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha1-AHo7n9vCs7uH5IeeoZyS/b05Qs8=", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", "dev": true, "requires": { "estraverse": "^4.1.0" @@ -1877,6 +1899,11 @@ "ajv": "^6.12.2", "ajv-keywords": "^3.4.1" } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" } } }, @@ -2498,6 +2525,11 @@ "ajv": "^6.12.2", "ajv-keywords": "^3.4.1" } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" } } }, @@ -3049,7 +3081,7 @@ "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -3824,6 +3856,14 @@ "@types/uglify-js": "*", "@types/webpack-sources": "*", "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } } } @@ -4209,11 +4249,6 @@ "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==", "dev": true }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, "source-map-resolve": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", @@ -4235,6 +4270,14 @@ "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "source-map-url": { @@ -4440,6 +4483,14 @@ "commander": "^2.20.0", "source-map": "~0.6.1", "source-map-support": "~0.5.12" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "terser-webpack-plugin": { @@ -4467,6 +4518,12 @@ "requires": { "randombytes": "^2.1.0" } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, @@ -4669,6 +4726,14 @@ "uglify-js": "^3.6.0", "webpack-sources": "^1.4.0", "worker-farm": "^1.7.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "underscore": { @@ -5203,6 +5268,14 @@ "requires": { "source-list-map": "^2.0.0", "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "which": { diff --git a/package.json b/package.json index e14081374..0af52b669 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "phaser", - "version": "3.50.0-beta.2", + "version": "3.50.0-beta.3", "release": "Subaru", "description": "A fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers.", "author": "Richard Davey (http://www.photonstorm.com)", @@ -30,6 +30,7 @@ "plugin.spine.dist": "webpack --config plugins/spine/webpack.auto.dist.config.js", "plugin.spine.watch": "webpack --config plugins/spine/webpack.auto.config.js --watch --display-modules", "plugin.spine.dev": "webpack --config plugins/spine/webpack.auto.config.js", + "plugin.spine.runtimes": "cd plugins/spine && tsc -p tsconfig.both.json && tsc -p tsconfig.canvas.json && tsc -p tsconfig.webgl.json", "plugin.spine.canvas.dist": "webpack --config plugins/spine/webpack.canvas.dist.config.js", "plugin.spine.canvas.watch": "webpack --config plugins/spine/webpack.canvas.config.js --watch --display-modules", "plugin.spine.canvas.dev": "webpack --config plugins/spine/webpack.canvas.config.js", @@ -61,6 +62,7 @@ "web audio" ], "devDependencies": { + "@types/source-map": "^0.5.2", "clean-webpack-plugin": "^3.0.0", "dts-dom": "^3.6.0", "eslint": "^7.7.0", diff --git a/src/const.js b/src/const.js index 7b70942a3..d4a3a58cc 100644 --- a/src/const.js +++ b/src/const.js @@ -20,7 +20,7 @@ var CONST = { * @type {string} * @since 3.0.0 */ - VERSION: '3.50.0-beta.2', + VERSION: '3.50.0-beta.3', BlendModes: require('./renderer/BlendModes'), From ca99c4564fda3dab5d6b4ae8b95b431475b72cdf Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 25 Aug 2020 13:24:56 +0100 Subject: [PATCH 083/241] Added `reset` property to Bind to get new vertex attrib locations --- src/renderer/webgl/WebGLPipeline.js | 60 ++++++++++--------- src/renderer/webgl/WebGLRenderer.js | 7 +-- .../webgl/pipelines/BitmapMaskPipeline.js | 8 ++- src/renderer/webgl/pipelines/LightPipeline.js | 8 ++- src/renderer/webgl/pipelines/MultiPipeline.js | 8 ++- .../webgl/pipelines/SinglePipeline.js | 8 ++- 6 files changed, 58 insertions(+), 41 deletions(-) diff --git a/src/renderer/webgl/WebGLPipeline.js b/src/renderer/webgl/WebGLPipeline.js index dd463d2d6..3bb95f4fa 100644 --- a/src/renderer/webgl/WebGLPipeline.js +++ b/src/renderer/webgl/WebGLPipeline.js @@ -277,33 +277,12 @@ var WebGLPipeline = new Class({ */ boot: function () { - var gl = this.gl; - var vertexBuffer = this.vertexBuffer; - var attributes = this.attributes; - var program = this.program; var renderer = this.renderer; - var vertexSize = this.vertexSize; - renderer.setProgram(program); - renderer.setVertexBuffer(vertexBuffer); + renderer.setProgram(this.program); + renderer.setVertexBuffer(this.vertexBuffer); - for (var i = 0; i < attributes.length; i++) - { - var element = attributes[i]; - var location = gl.getAttribLocation(program, element.name); - - if (location >= 0) - { - gl.enableVertexAttribArray(location); - gl.vertexAttribPointer(location, element.size, element.type, element.normalized, vertexSize, element.offset); - element.enabled = true; - element.location = location; - } - else if (location !== -1) - { - gl.disableVertexAttribArray(location); - } - } + this.setAttribPointers(true); this.hasBooted = true; @@ -404,10 +383,14 @@ var WebGLPipeline = new Class({ * @method Phaser.Renderer.WebGL.WebGLPipeline#bind * @since 3.0.0 * + * @param {boolean} [reset=false] - Should the pipeline be fully re-bound after a renderer pipeline clear? + * * @return {this} This WebGLPipeline instance. */ - bind: function () + bind: function (reset) { + if (reset === undefined) { reset = false; } + var vertexBuffer = this.vertexBuffer; var program = this.program; var renderer = this.renderer; @@ -415,7 +398,7 @@ var WebGLPipeline = new Class({ renderer.setProgram(program); renderer.setVertexBuffer(vertexBuffer); - this.setAttribPointers(); + this.setAttribPointers(reset); return this; }, @@ -427,19 +410,40 @@ var WebGLPipeline = new Class({ * @method Phaser.Renderer.WebGL.WebGLPipeline#setAttribPointers * @since 3.50.0 * + * @param {boolean} [reset=false] - Reset the vertex attribute locations? + * * @return {this} This WebGLPipeline instance. */ - setAttribPointers: function () + setAttribPointers: function (reset) { + if (reset === undefined) { reset = false; } + var gl = this.gl; var attributes = this.attributes; var vertexSize = this.vertexSize; + var program = this.program; for (var i = 0; i < attributes.length; i++) { var element = attributes[i]; - if (element.enabled) + if (reset) + { + var location = gl.getAttribLocation(program, element.name); + + if (location >= 0) + { + gl.enableVertexAttribArray(location); + gl.vertexAttribPointer(location, element.size, element.type, element.normalized, vertexSize, element.offset); + element.enabled = true; + element.location = location; + } + else if (location !== -1) + { + gl.disableVertexAttribArray(location); + } + } + else if (element.enabled) { gl.vertexAttribPointer(element.location, element.size, element.type, element.normalized, vertexSize, element.offset); } diff --git a/src/renderer/webgl/WebGLRenderer.js b/src/renderer/webgl/WebGLRenderer.js index e88cc12a5..9f32eb5e3 100644 --- a/src/renderer/webgl/WebGLRenderer.js +++ b/src/renderer/webgl/WebGLRenderer.js @@ -1221,13 +1221,10 @@ var WebGLRenderer = new Class({ this.setBlendMode(0, true); - this.resetTextures(true); - - this.currentActiveTexture = 1; - this.startActiveTexture++; + this.resetTextures(); this.currentPipeline = pipelineInstance; - this.currentPipeline.bind(); + this.currentPipeline.bind(true); this.currentPipeline.onBind(); }, diff --git a/src/renderer/webgl/pipelines/BitmapMaskPipeline.js b/src/renderer/webgl/pipelines/BitmapMaskPipeline.js index 9296e20c8..40bdd63f6 100644 --- a/src/renderer/webgl/pipelines/BitmapMaskPipeline.js +++ b/src/renderer/webgl/pipelines/BitmapMaskPipeline.js @@ -110,11 +110,15 @@ var BitmapMaskPipeline = new Class({ * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#bind * @since 3.50.0 * + * @param {boolean} [reset=false] - Should the pipeline be fully re-bound after a renderer pipeline clear? + * * @return {this} This WebGLPipeline instance. */ - bind: function () + bind: function (reset) { - WebGLPipeline.prototype.bind.call(this); + if (reset === undefined) { reset = false; } + + WebGLPipeline.prototype.bind.call(this, reset); var renderer = this.renderer; var program = this.program; diff --git a/src/renderer/webgl/pipelines/LightPipeline.js b/src/renderer/webgl/pipelines/LightPipeline.js index d46068882..4de2661a8 100644 --- a/src/renderer/webgl/pipelines/LightPipeline.js +++ b/src/renderer/webgl/pipelines/LightPipeline.js @@ -149,11 +149,15 @@ var LightPipeline = new Class({ * @method Phaser.Renderer.WebGL.Pipelines.LightPipeline#bind * @since 3.50.0 * + * @param {boolean} [reset=false] - Should the pipeline be fully re-bound after a renderer pipeline clear? + * * @return {this} This WebGLPipeline instance. */ - bind: function () + bind: function (reset) { - WebGLPipeline.prototype.bind.call(this); + if (reset === undefined) { reset = false; } + + WebGLPipeline.prototype.bind.call(this, reset); var renderer = this.renderer; var program = this.program; diff --git a/src/renderer/webgl/pipelines/MultiPipeline.js b/src/renderer/webgl/pipelines/MultiPipeline.js index 15074e101..4b509d460 100644 --- a/src/renderer/webgl/pipelines/MultiPipeline.js +++ b/src/renderer/webgl/pipelines/MultiPipeline.js @@ -298,11 +298,15 @@ var MultiPipeline = new Class({ * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#bind * @since 3.50.0 * + * @param {boolean} [reset=false] - Should the pipeline be fully re-bound after a renderer pipeline clear? + * * @return {this} This WebGLPipeline instance. */ - bind: function () + bind: function (reset) { - WebGLPipeline.prototype.bind.call(this); + if (reset === undefined) { reset = false; } + + WebGLPipeline.prototype.bind.call(this, reset); this.renderer.setInt1iv(this.program, 'uMainSampler', this.renderer.textureIndexes); diff --git a/src/renderer/webgl/pipelines/SinglePipeline.js b/src/renderer/webgl/pipelines/SinglePipeline.js index 6174aa3c6..8ad5d396e 100644 --- a/src/renderer/webgl/pipelines/SinglePipeline.js +++ b/src/renderer/webgl/pipelines/SinglePipeline.js @@ -308,11 +308,15 @@ var SinglePipeline = new Class({ * @method Phaser.Renderer.WebGL.Pipelines.SinglePipeline#bind * @since 3.50.0 * + * @param {boolean} [reset=false] - Should the pipeline be fully re-bound after a renderer pipeline clear? + * * @return {this} This WebGLPipeline instance. */ - bind: function () + bind: function (reset) { - WebGLPipeline.prototype.bind.call(this); + if (reset === undefined) { reset = false; } + + WebGLPipeline.prototype.bind.call(this, reset); return this; } From 1d7a576fd658d5072b4743d2a6f0cde9d657bea3 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 25 Aug 2020 13:27:14 +0100 Subject: [PATCH 084/241] Because of course a new webpack version means new config rules --- plugins/spine/webpack.auto.config.js | 12 ++++++++++-- plugins/spine/webpack.auto.dist.config.js | 12 ++++++++++-- plugins/spine/webpack.canvas.config.js | 12 ++++++++++-- plugins/spine/webpack.canvas.dist.config.js | 12 ++++++++++-- plugins/spine/webpack.webgl.config.js | 12 ++++++++++-- plugins/spine/webpack.webgl.dist.config.js | 12 ++++++++++-- 6 files changed, 60 insertions(+), 12 deletions(-) diff --git a/plugins/spine/webpack.auto.config.js b/plugins/spine/webpack.auto.config.js index ef4d92674..89759971c 100644 --- a/plugins/spine/webpack.auto.config.js +++ b/plugins/spine/webpack.auto.config.js @@ -30,11 +30,19 @@ module.exports = { rules: [ { test: require.resolve('./src/runtimes/spine-both.js'), - use: 'imports-loader?this=>window' + loader: 'imports-loader', + options: { + type: 'commonjs', + wrapper: 'window' + } }, { test: require.resolve('./src/runtimes/spine-both.js'), - use: 'exports-loader?spine' + loader: 'exports-loader', + options: { + type: 'commonjs', + exports: 'single spine' + } } ] }, diff --git a/plugins/spine/webpack.auto.dist.config.js b/plugins/spine/webpack.auto.dist.config.js index 78f60bd97..655ab50d6 100644 --- a/plugins/spine/webpack.auto.dist.config.js +++ b/plugins/spine/webpack.auto.dist.config.js @@ -28,11 +28,19 @@ module.exports = { rules: [ { test: require.resolve('./src/runtimes/spine-both.js'), - use: 'imports-loader?this=>window' + loader: 'imports-loader', + options: { + type: 'commonjs', + wrapper: 'window' + } }, { test: require.resolve('./src/runtimes/spine-both.js'), - use: 'exports-loader?spine' + loader: 'exports-loader', + options: { + type: 'commonjs', + exports: 'single spine' + } } ] }, diff --git a/plugins/spine/webpack.canvas.config.js b/plugins/spine/webpack.canvas.config.js index ac1730046..081528a29 100644 --- a/plugins/spine/webpack.canvas.config.js +++ b/plugins/spine/webpack.canvas.config.js @@ -30,11 +30,19 @@ module.exports = { rules: [ { test: require.resolve('./src/runtimes/spine-canvas.js'), - use: 'imports-loader?this=>window' + loader: 'imports-loader', + options: { + type: 'commonjs', + wrapper: 'window' + } }, { test: require.resolve('./src/runtimes/spine-canvas.js'), - use: 'exports-loader?spine' + loader: 'exports-loader', + options: { + type: 'commonjs', + exports: 'single spine' + } } ] }, diff --git a/plugins/spine/webpack.canvas.dist.config.js b/plugins/spine/webpack.canvas.dist.config.js index a67725ca6..4efa409f3 100644 --- a/plugins/spine/webpack.canvas.dist.config.js +++ b/plugins/spine/webpack.canvas.dist.config.js @@ -28,11 +28,19 @@ module.exports = { rules: [ { test: require.resolve('./src/runtimes/spine-canvas.js'), - use: 'imports-loader?this=>window' + loader: 'imports-loader', + options: { + type: 'commonjs', + wrapper: 'window' + } }, { test: require.resolve('./src/runtimes/spine-canvas.js'), - use: 'exports-loader?spine' + loader: 'exports-loader', + options: { + type: 'commonjs', + exports: 'single spine' + } } ] }, diff --git a/plugins/spine/webpack.webgl.config.js b/plugins/spine/webpack.webgl.config.js index ea483c81b..803a205d5 100644 --- a/plugins/spine/webpack.webgl.config.js +++ b/plugins/spine/webpack.webgl.config.js @@ -30,11 +30,19 @@ module.exports = { rules: [ { test: require.resolve('./src/runtimes/spine-webgl.js'), - use: 'imports-loader?this=>window' + loader: 'imports-loader', + options: { + type: 'commonjs', + wrapper: 'window' + } }, { test: require.resolve('./src/runtimes/spine-webgl.js'), - use: 'exports-loader?spine' + loader: 'exports-loader', + options: { + type: 'commonjs', + exports: 'single spine' + } } ] }, diff --git a/plugins/spine/webpack.webgl.dist.config.js b/plugins/spine/webpack.webgl.dist.config.js index 7ee50499f..cd86822b6 100644 --- a/plugins/spine/webpack.webgl.dist.config.js +++ b/plugins/spine/webpack.webgl.dist.config.js @@ -28,11 +28,19 @@ module.exports = { rules: [ { test: require.resolve('./src/runtimes/spine-webgl.js'), - use: 'imports-loader?this=>window' + loader: 'imports-loader', + options: { + type: 'commonjs', + wrapper: 'window' + } }, { test: require.resolve('./src/runtimes/spine-webgl.js'), - use: 'exports-loader?spine' + loader: 'exports-loader', + options: { + type: 'commonjs', + exports: 'single spine' + } } ] }, From 075ef7bb5ef3d7fbe61de1943414e457af3a21e8 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 25 Aug 2020 13:27:32 +0100 Subject: [PATCH 085/241] ESLint fix --- plugins/spine/src/SpineFile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/spine/src/SpineFile.js b/plugins/spine/src/SpineFile.js index 05d44667a..63f4b2ea3 100644 --- a/plugins/spine/src/SpineFile.js +++ b/plugins/spine/src/SpineFile.js @@ -218,7 +218,7 @@ var SpineFile = new Class({ if (file.type === 'text') { - atlasKey = file.key.replace(/_[\d]$/, ""); + atlasKey = file.key.replace(/_[\d]$/, ''); atlasCache = file.cache; From 0f1c917d6c11f8525635528203f3f34b5e2eee43 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 25 Aug 2020 13:27:38 +0100 Subject: [PATCH 086/241] Updated docs --- plugins/spine/src/SpinePlugin.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/spine/src/SpinePlugin.js b/plugins/spine/src/SpinePlugin.js index cc8928894..46cc81a76 100644 --- a/plugins/spine/src/SpinePlugin.js +++ b/plugins/spine/src/SpinePlugin.js @@ -17,12 +17,15 @@ var SpineGameObject = require('./gameobject/SpineGameObject'); * @classdesc * The Spine Plugin is a Scene based plugin that handles the creation and rendering of Spine Game Objects. * + * Find more details about Spine itself at http://esotericsoftware.com/. + * * All rendering and object creation is handled via the official Spine Runtimes. This version of the plugin - * uses the Spine 3.8.72 runtimes. Please note that due to the way the Spine runtimes use semver, you will + * uses the Spine 3.8.95 runtimes. Please note that due to the way the Spine runtimes use semver, you will * get breaking changes in point-releases. Therefore, files created in a different version of Spine may not * work as a result, without you first updating the runtimes and rebuilding the plugin. * - * You can find more details about Spine at http://esotericsoftware.com/. + * Esoteric themselves recommend that you freeze your Spine editor version against the runtime versions. + * You can find more information about this here: http://esotericsoftware.com/spine-settings#Version * * Please note that you require a Spine license in order to use Spine Runtimes in your games. * @@ -376,7 +379,7 @@ var SpinePlugin = new Class({ { this.sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true); - // Monkeypatch the Spine setBlendMode functions, or batching is destroyed + // Monkeypatch the Spine setBlendMode functions, or batching is destroyed! var setBlendMode = function (srcBlend, dstBlend) { From 4e28e4417e80bf825b7b7c3bb2d4b5008ff405c3 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 25 Aug 2020 13:27:57 +0100 Subject: [PATCH 087/241] Use MultiPipeline --- .../spine/src/gameobject/SpineGameObjectWebGLRenderer.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js b/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js index 949c39139..a192aef74 100644 --- a/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js +++ b/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js @@ -43,10 +43,10 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent { // The next object in the display list is not a Spine object, so we end the batch sceneRenderer.end(); - - renderer.rebindPipeline(renderer.pipelines.TextureTintPipeline); + + renderer.rebindPipeline(renderer.pipelines.MultiPipeline); } - + return; } @@ -155,7 +155,7 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent // The next object in the display list is not a Spine object, so we end the batch sceneRenderer.end(); - renderer.rebindPipeline(renderer.pipelines.TextureTintPipeline); + renderer.rebindPipeline(renderer.pipelines.MultiPipeline); } }; From 9bbdf8d0bcd57621c19d2454f2a718b52be2dd8b Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 25 Aug 2020 13:28:34 +0100 Subject: [PATCH 088/241] New Spine 3.8.95 runtimes --- plugins/spine/src/runtimes/spine-both.d.ts | 22 +- plugins/spine/src/runtimes/spine-both.js | 278 ++++++++++-------- plugins/spine/src/runtimes/spine-both.js.map | 2 +- plugins/spine/src/runtimes/spine-canvas.d.ts | 21 +- plugins/spine/src/runtimes/spine-canvas.js | 253 +++++++++------- .../spine/src/runtimes/spine-canvas.js.map | 2 +- plugins/spine/src/runtimes/spine-webgl.d.ts | 22 +- plugins/spine/src/runtimes/spine-webgl.js | 278 ++++++++++-------- plugins/spine/src/runtimes/spine-webgl.js.map | 2 +- 9 files changed, 510 insertions(+), 370 deletions(-) diff --git a/plugins/spine/src/runtimes/spine-both.d.ts b/plugins/spine/src/runtimes/spine-both.d.ts index 8684d62da..457ee9ce6 100644 --- a/plugins/spine/src/runtimes/spine-both.d.ts +++ b/plugins/spine/src/runtimes/spine-both.d.ts @@ -144,6 +144,7 @@ declare module spine { getFrameCount(): number; setFrame(frameIndex: number, time: number, attachmentName: string): void; apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + setAttachment(skeleton: Skeleton, slot: Slot, attachmentName: string): void; } class DeformTimeline extends CurveTimeline { slotIndex: number; @@ -248,12 +249,15 @@ declare module spine { static emptyAnimation: Animation; static SUBSEQUENT: number; static FIRST: number; - static HOLD: number; + static HOLD_SUBSEQUENT: number; + static HOLD_FIRST: number; static HOLD_MIX: number; - static NOT_LAST: number; + static SETUP: number; + static CURRENT: number; data: AnimationStateData; tracks: TrackEntry[]; timeScale: number; + unkeyedState: number; events: Event[]; listeners: AnimationStateListener[]; queue: EventQueue; @@ -265,6 +269,8 @@ declare module spine { updateMixingFrom(to: TrackEntry, delta: number): boolean; apply(skeleton: Skeleton): boolean; applyMixingFrom(to: TrackEntry, skeleton: Skeleton, blend: MixBlend): number; + applyAttachmentTimeline(timeline: AttachmentTimeline, skeleton: Skeleton, time: number, blend: MixBlend, attachments: boolean): void; + setAttachment(skeleton: Skeleton, slot: Slot, attachmentName: string, attachments: boolean): void; applyRotateTimeline(timeline: Timeline, skeleton: Skeleton, time: number, alpha: number, blend: MixBlend, timelinesRotation: Array, i: number, firstFrame: boolean): void; queueEvents(entry: TrackEntry, animationTime: number): void; clearTracks(): void; @@ -282,7 +288,6 @@ declare module spine { disposeNext(entry: TrackEntry): void; _animationsChanged(): void; computeHold(entry: TrackEntry): void; - computeNotLast(entry: TrackEntry): void; getCurrent(trackIndex: number): TrackEntry; addListener(listener: AnimationStateListener): void; removeListener(listener: AnimationStateListener): void; @@ -384,13 +389,14 @@ declare module spine { private errors; private toLoad; private loaded; + private rawDataUris; constructor(textureLoader: (image: HTMLImageElement) => any, pathPrefix?: string); - private static downloadText; - private static downloadBinary; + private downloadText; + private downloadBinary; + setRawDataURI(path: string, data: string): void; loadBinary(path: string, success?: (path: string, binary: Uint8Array) => void, error?: (path: string, error: string) => void): void; loadText(path: string, success?: (path: string, text: string) => void, error?: (path: string, error: string) => void): void; loadTexture(path: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void; - loadTextureData(path: string, data: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void; loadTextureAtlas(path: string, success?: (path: string, atlas: TextureAtlas) => void, error?: (path: string, error: string) => void): void; get(path: string): any; remove(path: string): void; @@ -848,8 +854,9 @@ declare module spine { bone: Bone; color: Color; darkColor: Color; - private attachment; + attachment: Attachment; private attachmentTime; + attachmentState: number; deform: number[]; constructor(data: SlotData, bone: Bone); getSkeleton(): Skeleton; @@ -1392,6 +1399,7 @@ declare module spine.webgl { private texture; private boundUnit; private useMipMaps; + static DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL: boolean; constructor(context: ManagedWebGLRenderingContext | WebGLRenderingContext, image: HTMLImageElement, useMipMaps?: boolean); setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void; static validateMagFilter(magFilter: TextureFilter): TextureFilter.Nearest | TextureFilter.Linear | TextureFilter.Linear; diff --git a/plugins/spine/src/runtimes/spine-both.js b/plugins/spine/src/runtimes/spine-both.js index c6e7db15d..6b111df90 100644 --- a/plugins/spine/src/runtimes/spine-both.js +++ b/plugins/spine/src/runtimes/spine-both.js @@ -2,7 +2,7 @@ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { @@ -675,17 +675,15 @@ var spine; var slot = skeleton.slots[this.slotIndex]; if (!slot.bone.active) return; - if (direction == MixDirection.mixOut && blend == MixBlend.setup) { - var attachmentName_1 = slot.data.attachmentName; - slot.setAttachment(attachmentName_1 == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName_1)); + if (direction == MixDirection.mixOut) { + if (blend == MixBlend.setup) + this.setAttachment(skeleton, slot, slot.data.attachmentName); return; } var frames = this.frames; if (time < frames[0]) { - if (blend == MixBlend.setup || blend == MixBlend.first) { - var attachmentName_2 = slot.data.attachmentName; - slot.setAttachment(attachmentName_2 == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName_2)); - } + if (blend == MixBlend.setup || blend == MixBlend.first) + this.setAttachment(skeleton, slot, slot.data.attachmentName); return; } var frameIndex = 0; @@ -697,6 +695,9 @@ var spine; skeleton.slots[this.slotIndex] .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName)); }; + AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) { + slot.attachment = attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName); + }; return AttachmentTimeline; }()); spine.AttachmentTimeline = AttachmentTimeline; @@ -798,6 +799,7 @@ var spine; case MixBlend.replace: for (var i_5 = 0; i_5 < vertexCount; i_5++) deform[i_5] += (lastVertices[i_5] - deform[i_5]) * alpha; + break; case MixBlend.add: var vertexAttachment = slotAttachment; if (vertexAttachment.bones == null) { @@ -954,8 +956,9 @@ var spine; DrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) { var drawOrder = skeleton.drawOrder; var slots = skeleton.slots; - if (direction == MixDirection.mixOut && blend == MixBlend.setup) { - spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length); + if (direction == MixDirection.mixOut) { + if (blend == MixBlend.setup) + spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length); return; } var frames = this.frames; @@ -1347,6 +1350,7 @@ var spine; function AnimationState(data) { this.tracks = new Array(); this.timeScale = 1; + this.unkeyedState = 0; this.events = new Array(); this.listeners = new Array(); this.queue = new EventQueue(this); @@ -1436,12 +1440,12 @@ var spine; var events = this.events; var tracks = this.tracks; var applied = false; - for (var i = 0, n = tracks.length; i < n; i++) { - var current = tracks[i]; + for (var i_16 = 0, n_1 = tracks.length; i_16 < n_1; i_16++) { + var current = tracks[i_16]; if (current == null || current.delay > 0) continue; applied = true; - var blend = i == 0 ? spine.MixBlend.first : current.mixBlend; + var blend = i_16 == 0 ? spine.MixBlend.first : current.mixBlend; var mix = current.alpha; if (current.mixingFrom != null) mix *= this.applyMixingFrom(current, skeleton, blend); @@ -1450,10 +1454,14 @@ var spine; var animationLast = current.animationLast, animationTime = current.getAnimationTime(); var timelineCount = current.animation.timelines.length; var timelines = current.animation.timelines; - if ((i == 0 && mix == 1) || blend == spine.MixBlend.add) { + if ((i_16 == 0 && mix == 1) || blend == spine.MixBlend.add) { for (var ii = 0; ii < timelineCount; ii++) { spine.Utils.webkit602BugfixHelper(mix, blend); - timelines[ii].apply(skeleton, animationLast, animationTime, events, mix, blend, spine.MixDirection.mixIn); + var timeline = timelines[ii]; + if (timeline instanceof spine.AttachmentTimeline) + this.applyAttachmentTimeline(timeline, skeleton, animationTime, blend, true); + else + timeline.apply(skeleton, animationLast, animationTime, events, mix, blend, spine.MixDirection.mixIn); } } else { @@ -1463,14 +1471,17 @@ var spine; spine.Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null); var timelinesRotation = current.timelinesRotation; for (var ii = 0; ii < timelineCount; ii++) { - var timeline = timelines[ii]; - var timelineBlend = (timelineMode[ii] & (AnimationState.NOT_LAST - 1)) == AnimationState.SUBSEQUENT ? blend : spine.MixBlend.setup; - if (timeline instanceof spine.RotateTimeline) { - this.applyRotateTimeline(timeline, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame); + var timeline_1 = timelines[ii]; + var timelineBlend = timelineMode[ii] == AnimationState.SUBSEQUENT ? blend : spine.MixBlend.setup; + if (timeline_1 instanceof spine.RotateTimeline) { + this.applyRotateTimeline(timeline_1, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame); + } + else if (timeline_1 instanceof spine.AttachmentTimeline) { + this.applyAttachmentTimeline(timeline_1, skeleton, animationTime, blend, true); } else { spine.Utils.webkit602BugfixHelper(mix, blend); - timeline.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, spine.MixDirection.mixIn); + timeline_1.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, spine.MixDirection.mixIn); } } } @@ -1479,6 +1490,16 @@ var spine; current.nextAnimationLast = animationTime; current.nextTrackLast = current.trackTime; } + var setupState = this.unkeyedState + AnimationState.SETUP; + var slots = skeleton.slots; + for (var i = 0, n = skeleton.slots.length; i < n; i++) { + var slot = slots[i]; + if (slot.attachmentState == setupState) { + var attachmentName = slot.data.attachmentName; + slot.attachment = (attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName)); + } + } + this.unkeyedState += 2; this.queue.drain(); return applied; }; @@ -1522,23 +1543,22 @@ var spine; var direction = spine.MixDirection.mixOut; var timelineBlend = void 0; var alpha = 0; - switch (timelineMode[i] & (AnimationState.NOT_LAST - 1)) { + switch (timelineMode[i]) { case AnimationState.SUBSEQUENT: - timelineBlend = blend; - if (!attachments && timeline instanceof spine.AttachmentTimeline) { - if ((timelineMode[i] & AnimationState.NOT_LAST) == AnimationState.NOT_LAST) - continue; - timelineBlend = spine.MixBlend.setup; - } if (!drawOrder && timeline instanceof spine.DrawOrderTimeline) continue; + timelineBlend = blend; alpha = alphaMix; break; case AnimationState.FIRST: timelineBlend = spine.MixBlend.setup; alpha = alphaMix; break; - case AnimationState.HOLD: + case AnimationState.HOLD_SUBSEQUENT: + timelineBlend = blend; + alpha = alphaHold; + break; + case AnimationState.HOLD_FIRST: timelineBlend = spine.MixBlend.setup; alpha = alphaHold; break; @@ -1551,18 +1571,12 @@ var spine; from.totalAlpha += alpha; if (timeline instanceof spine.RotateTimeline) this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame); + else if (timeline instanceof spine.AttachmentTimeline) + this.applyAttachmentTimeline(timeline, skeleton, animationTime, timelineBlend, attachments); else { spine.Utils.webkit602BugfixHelper(alpha, blend); - if (timelineBlend == spine.MixBlend.setup) { - if (timeline instanceof spine.AttachmentTimeline) { - if (attachments || (timelineMode[i] & AnimationState.NOT_LAST) == AnimationState.NOT_LAST) - direction = spine.MixDirection.mixIn; - } - else if (timeline instanceof spine.DrawOrderTimeline) { - if (drawOrder) - direction = spine.MixDirection.mixIn; - } - } + if (drawOrder && timeline instanceof spine.DrawOrderTimeline && timelineBlend == spine.MixBlend.setup) + direction = spine.MixDirection.mixIn; timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, direction); } } @@ -1574,6 +1588,31 @@ var spine; from.nextTrackLast = from.trackTime; return mix; }; + AnimationState.prototype.applyAttachmentTimeline = function (timeline, skeleton, time, blend, attachments) { + var slot = skeleton.slots[timeline.slotIndex]; + if (!slot.bone.active) + return; + var frames = timeline.frames; + if (time < frames[0]) { + if (blend == spine.MixBlend.setup || blend == spine.MixBlend.first) + this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments); + } + else { + var frameIndex; + if (time >= frames[frames.length - 1]) + frameIndex = frames.length - 1; + else + frameIndex = spine.Animation.binarySearch(frames, time) - 1; + this.setAttachment(skeleton, slot, timeline.attachmentNames[frameIndex], attachments); + } + if (slot.attachmentState <= this.unkeyedState) + slot.attachmentState = this.unkeyedState + AnimationState.SETUP; + }; + AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) { + slot.attachment = attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName); + if (attachments) + slot.attachmentState = this.unkeyedState + AnimationState.CURRENT; + }; AnimationState.prototype.applyRotateTimeline = function (timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) { if (firstFrame) timelinesRotation[i] = 0; @@ -1836,6 +1875,7 @@ var spine; entry.interruptAlpha = 1; entry.mixTime = 0; entry.mixDuration = last == null ? 0 : this.data.getMix(last.animation, animation); + entry.mixBlend = spine.MixBlend.replace; return entry; }; AnimationState.prototype.disposeNext = function (entry) { @@ -1861,14 +1901,6 @@ var spine; entry = entry.mixingTo; } while (entry != null); } - this.propertyIDs.clear(); - for (var i = this.tracks.length - 1; i >= 0; i--) { - var entry = this.tracks[i]; - while (entry != null) { - this.computeNotLast(entry); - entry = entry.mixingFrom; - } - } }; AnimationState.prototype.computeHold = function (entry) { var to = entry.mixingTo; @@ -1880,8 +1912,7 @@ var spine; var propertyIDs = this.propertyIDs; if (to != null && to.holdPrevious) { for (var i = 0; i < timelinesCount; i++) { - propertyIDs.add(timelines[i].getPropertyId()); - timelineMode[i] = AnimationState.HOLD; + timelineMode[i] = propertyIDs.add(timelines[i].getPropertyId()) ? AnimationState.HOLD_FIRST : AnimationState.HOLD_SUBSEQUENT; } return; } @@ -1905,20 +1936,7 @@ var spine; } break; } - timelineMode[i] = AnimationState.HOLD; - } - } - }; - AnimationState.prototype.computeNotLast = function (entry) { - var timelines = entry.animation.timelines; - var timelinesCount = entry.animation.timelines.length; - var timelineMode = entry.timelineMode; - var propertyIDs = this.propertyIDs; - for (var i = 0; i < timelinesCount; i++) { - if (timelines[i] instanceof spine.AttachmentTimeline) { - var timeline = timelines[i]; - if (!propertyIDs.add(timeline.slotIndex)) - timelineMode[i] |= AnimationState.NOT_LAST; + timelineMode[i] = AnimationState.HOLD_FIRST; } } }; @@ -1946,9 +1964,11 @@ var spine; AnimationState.emptyAnimation = new spine.Animation("", [], 0); AnimationState.SUBSEQUENT = 0; AnimationState.FIRST = 1; - AnimationState.HOLD = 2; - AnimationState.HOLD_MIX = 3; - AnimationState.NOT_LAST = 4; + AnimationState.HOLD_SUBSEQUENT = 2; + AnimationState.HOLD_FIRST = 3; + AnimationState.HOLD_MIX = 4; + AnimationState.SETUP = 1; + AnimationState.CURRENT = 2; return AnimationState; }()); spine.AnimationState = AnimationState; @@ -2161,11 +2181,15 @@ var spine; this.errors = {}; this.toLoad = 0; this.loaded = 0; + this.rawDataUris = {}; this.textureLoader = textureLoader; this.pathPrefix = pathPrefix; } - AssetManager.downloadText = function (url, success, error) { + AssetManager.prototype.downloadText = function (url, success, error) { var request = new XMLHttpRequest(); + request.overrideMimeType("text/html"); + if (this.rawDataUris[url]) + url = this.rawDataUris[url]; request.open("GET", url, true); request.onload = function () { if (request.status == 200) { @@ -2180,8 +2204,10 @@ var spine; }; request.send(); }; - AssetManager.downloadBinary = function (url, success, error) { + AssetManager.prototype.downloadBinary = function (url, success, error) { var request = new XMLHttpRequest(); + if (this.rawDataUris[url]) + url = this.rawDataUris[url]; request.open("GET", url, true); request.responseType = "arraybuffer"; request.onload = function () { @@ -2197,13 +2223,16 @@ var spine; }; request.send(); }; + AssetManager.prototype.setRawDataURI = function (path, data) { + this.rawDataUris[this.pathPrefix + path] = data; + }; AssetManager.prototype.loadBinary = function (path, success, error) { var _this = this; if (success === void 0) { success = null; } if (error === void 0) { error = null; } path = this.pathPrefix + path; this.toLoad++; - AssetManager.downloadBinary(path, function (data) { + this.downloadBinary(path, function (data) { _this.assets[path] = data; if (success) success(path, data); @@ -2223,7 +2252,7 @@ var spine; if (error === void 0) { error = null; } path = this.pathPrefix + path; this.toLoad++; - AssetManager.downloadText(path, function (data) { + this.downloadText(path, function (data) { _this.assets[path] = data; if (success) success(path, data); @@ -2242,12 +2271,13 @@ var spine; if (success === void 0) { success = null; } if (error === void 0) { error = null; } path = this.pathPrefix + path; + var storagePath = path; this.toLoad++; var img = new Image(); img.crossOrigin = "anonymous"; img.onload = function (ev) { var texture = _this.textureLoader(img); - _this.assets[path] = texture; + _this.assets[storagePath] = texture; _this.toLoad--; _this.loaded++; if (success) @@ -2260,32 +2290,10 @@ var spine; if (error) error(path, "Couldn't load image " + path); }; + if (this.rawDataUris[path]) + path = this.rawDataUris[path]; img.src = path; }; - AssetManager.prototype.loadTextureData = function (path, data, success, error) { - var _this = this; - if (success === void 0) { success = null; } - if (error === void 0) { error = null; } - path = this.pathPrefix + path; - this.toLoad++; - var img = new Image(); - img.onload = function (ev) { - var texture = _this.textureLoader(img); - _this.assets[path] = texture; - _this.toLoad--; - _this.loaded++; - if (success) - success(path, img); - }; - img.onerror = function (ev) { - _this.errors[path] = "Couldn't load image " + path; - _this.toLoad--; - _this.loaded++; - if (error) - error(path, "Couldn't load image " + path); - }; - img.src = data; - }; AssetManager.prototype.loadTextureAtlas = function (path, success, error) { var _this = this; if (success === void 0) { success = null; } @@ -2293,12 +2301,12 @@ var spine; var parent = path.lastIndexOf("/") >= 0 ? path.substring(0, path.lastIndexOf("/")) : ""; path = this.pathPrefix + path; this.toLoad++; - AssetManager.downloadText(path, function (atlasData) { + this.downloadText(path, function (atlasData) { var pagesLoaded = { count: 0 }; var atlasPages = new Array(); try { var atlas = new spine.TextureAtlas(atlasData, function (path) { - atlasPages.push(parent + "/" + path); + atlasPages.push(parent == "" ? path : parent + "/" + path); var image = document.createElement("img"); image.width = 16; image.height = 16; @@ -2322,7 +2330,7 @@ var spine; if (!pageLoadError) { try { var atlas = new spine.TextureAtlas(atlasData, function (path) { - return _this.get(parent + "/" + path); + return _this.get(parent == "" ? path : parent + "/" + path); }); _this.assets[path] = atlas; if (success) @@ -2560,6 +2568,8 @@ var spine; var prx = 0; if (s > 0.0001) { s = Math.abs(pa * pd - pb * pc) / s; + pa /= this.skeleton.scaleX; + pc /= this.skeleton.scaleY; pb = pc * s; pd = pa * s; prx = Math.atan2(pc, pa) * spine.MathUtils.radDeg; @@ -2830,10 +2840,27 @@ var spine; if (!bone.appliedValid) bone.updateAppliedTransform(); var p = bone.parent; - var id = 1 / (p.a * p.d - p.b * p.c); - var x = targetX - p.worldX, y = targetY - p.worldY; - var tx = (x * p.d - y * p.b) * id - bone.ax, ty = (y * p.a - x * p.c) * id - bone.ay; - var rotationIK = Math.atan2(ty, tx) * spine.MathUtils.radDeg - bone.ashearX - bone.arotation; + var pa = p.a, pb = p.b, pc = p.c, pd = p.d; + var rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0; + switch (bone.data.transformMode) { + case spine.TransformMode.OnlyTranslation: + tx = targetX - bone.worldX; + ty = targetY - bone.worldY; + break; + case spine.TransformMode.NoRotationOrReflection: + var s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc); + var sa = pa / bone.skeleton.scaleX; + var sc = pc / bone.skeleton.scaleY; + pb = -sc * s * bone.skeleton.scaleX; + pd = sa * s * bone.skeleton.scaleY; + rotationIK += Math.atan2(sc, sa) * spine.MathUtils.radDeg; + default: + var x = targetX - p.worldX, y = targetY - p.worldY; + var d = pa * pd - pb * pc; + tx = (x * pd - y * pb) / d - bone.ax; + ty = (y * pa - x * pc) / d - bone.ay; + } + rotationIK += Math.atan2(ty, tx) * spine.MathUtils.radDeg; if (bone.ascaleX < 0) rotationIK += 180; if (rotationIK > 180) @@ -2842,6 +2869,12 @@ var spine; rotationIK += 360; var sx = bone.ascaleX, sy = bone.ascaleY; if (compress || stretch) { + switch (bone.data.transformMode) { + case spine.TransformMode.NoScale: + case spine.TransformMode.NoScaleOrReflection: + tx = targetX - bone.worldX; + ty = targetY - bone.worldY; + } var b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty); if ((compress && dd < b) || (stretch && dd > b) && b > 0.0001) { var s = (dd / b - 1) * alpha + 1; @@ -3500,6 +3533,7 @@ var spine; if (!this.queueAsset(clientId, null, path)) return; var request = new XMLHttpRequest(); + request.overrideMimeType("text/html"); request.onreadystatechange = function () { if (request.readyState == XMLHttpRequest.DONE) { if (request.status >= 200 && request.status < 300) { @@ -3519,6 +3553,7 @@ var spine; if (!this.queueAsset(clientId, null, path)) return; var request = new XMLHttpRequest(); + request.overrideMimeType("text/html"); request.onreadystatechange = function () { if (request.readyState == XMLHttpRequest.DONE) { if (request.status >= 200 && request.status < 300) { @@ -3538,7 +3573,6 @@ var spine; if (!this.queueAsset(clientId, textureLoader, path)) return; var img = new Image(); - img.src = path; img.crossOrigin = "anonymous"; img.onload = function (ev) { _this.rawAssets[path] = img; @@ -3546,6 +3580,7 @@ var spine; img.onerror = function (ev) { _this.errors[path] = "Couldn't load image " + path; }; + img.src = path; }; SharedAssetManager.prototype.get = function (clientId, path) { path = this.pathPrefix + path; @@ -4071,6 +4106,8 @@ var spine; var input = new BinaryInput(binary); skeletonData.hash = input.readString(); skeletonData.version = input.readString(); + if ("3.8.75" == skeletonData.version) + throw new Error("Unsupported skeleton data, please export with a newer version of Spine."); skeletonData.x = input.readFloat(); skeletonData.y = input.readFloat(); skeletonData.width = input.readFloat(); @@ -5059,7 +5096,7 @@ var spine; var clippingPolygon = this.clippingPolygon; SkeletonClipping.makeClockwise(clippingPolygon); var clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon)); - for (var i = 0, n_1 = clippingPolygons.length; i < n_1; i++) { + for (var i = 0, n_2 = clippingPolygons.length; i < n_2; i++) { var polygon = clippingPolygons[i]; SkeletonClipping.makeClockwise(polygon); polygon.push(polygon[0]); @@ -5481,6 +5518,8 @@ var spine; if (skeletonMap != null) { skeletonData.hash = skeletonMap.hash; skeletonData.version = skeletonMap.spine; + if ("3.8.75" == skeletonData.version) + throw new Error("Unsupported skeleton data, please export with a newer version of Spine."); skeletonData.x = skeletonMap.x; skeletonData.y = skeletonMap.y; skeletonData.width = skeletonMap.width; @@ -6158,7 +6197,7 @@ var spine; skeletonData.animations.push(new spine.Animation(name, timelines, duration)); }; SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) { - if (!map.curve) + if (!map.hasOwnProperty("curve")) return; if (map.curve == "stepped") timeline.setStepped(frameIndex); @@ -7473,9 +7512,7 @@ var spine; }; Pool.prototype.freeAll = function (items) { for (var i = 0; i < items.length; i++) { - if (items[i].reset) - items[i].reset(); - this.items[i] = items[i]; + this.free(items[i]); } }; Pool.prototype.clear = function () { @@ -8017,7 +8054,7 @@ var spine; worldVertices[offset + 1] = offsetX * c + offsetY * d + y; }; RegionAttachment.prototype.copy = function () { - var copy = new RegionAttachment(name); + var copy = new RegionAttachment(this.name); copy.region = this.region; copy.rendererObject = this.rendererObject; copy.path = this.path; @@ -8521,6 +8558,8 @@ var spine; this.texture = this.context.gl.createTexture(); } this.bind(); + if (GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL) + gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false); gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this._image); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, useMipMaps ? gl.LINEAR_MIPMAP_LINEAR : gl.LINEAR); @@ -8550,6 +8589,7 @@ var spine; var gl = this.context.gl; gl.deleteTexture(this.texture); }; + GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL = false; return GLTexture; }(spine.Texture)); webgl.GLTexture = GLTexture; @@ -10279,11 +10319,11 @@ var spine; var nn = clip.worldVerticesLength; var world = this.temp = spine.Utils.setArraySize(this.temp, nn, 0); clip.computeWorldVertices(slot, 0, nn, world, 0, 2); - for (var i_16 = 0, n_2 = world.length; i_16 < n_2; i_16 += 2) { - var x = world[i_16]; - var y = world[i_16 + 1]; - var x2 = world[(i_16 + 2) % world.length]; - var y2 = world[(i_16 + 3) % world.length]; + for (var i_17 = 0, n_3 = world.length; i_17 < n_3; i_17 += 2) { + var x = world[i_17]; + var y = world[i_17 + 1]; + var x2 = world[(i_17 + 2) % world.length]; + var y2 = world[(i_17 + 3) % world.length]; shapes.line(x, y, x2, y2); } } @@ -10444,7 +10484,7 @@ var spine; var vertexEffect = this.vertexEffect; var verts = clippedVertices; if (!twoColorTint) { - for (var v = 0, n_3 = clippedVertices.length; v < n_3; v += vertexSize) { + for (var v = 0, n_4 = clippedVertices.length; v < n_4; v += vertexSize) { tempPos.x = verts[v]; tempPos.y = verts[v + 1]; tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]); @@ -10463,7 +10503,7 @@ var spine; } } else { - for (var v = 0, n_4 = clippedVertices.length; v < n_4; v += vertexSize) { + for (var v = 0, n_5 = clippedVertices.length; v < n_5; v += vertexSize) { tempPos.x = verts[v]; tempPos.y = verts[v + 1]; tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]); @@ -10493,7 +10533,7 @@ var spine; if (this.vertexEffect != null) { var vertexEffect = this.vertexEffect; if (!twoColorTint) { - for (var v = 0, u = 0, n_5 = renderable.numFloats; v < n_5; v += vertexSize, u += 2) { + for (var v = 0, u = 0, n_6 = renderable.numFloats; v < n_6; v += vertexSize, u += 2) { tempPos.x = verts[v]; tempPos.y = verts[v + 1]; tempUv.x = uvs[u]; @@ -10512,7 +10552,7 @@ var spine; } } else { - for (var v = 0, u = 0, n_6 = renderable.numFloats; v < n_6; v += vertexSize, u += 2) { + for (var v = 0, u = 0, n_7 = renderable.numFloats; v < n_7; v += vertexSize, u += 2) { tempPos.x = verts[v]; tempPos.y = verts[v + 1]; tempUv.x = uvs[u]; @@ -10537,7 +10577,7 @@ var spine; } else { if (!twoColorTint) { - for (var v = 2, u = 0, n_7 = renderable.numFloats; v < n_7; v += vertexSize, u += 2) { + for (var v = 2, u = 0, n_8 = renderable.numFloats; v < n_8; v += vertexSize, u += 2) { verts[v] = finalColor.r; verts[v + 1] = finalColor.g; verts[v + 2] = finalColor.b; @@ -10547,7 +10587,7 @@ var spine; } } else { - for (var v = 2, u = 0, n_8 = renderable.numFloats; v < n_8; v += vertexSize, u += 2) { + for (var v = 2, u = 0, n_9 = renderable.numFloats; v < n_9; v += vertexSize, u += 2) { verts[v] = finalColor.r; verts[v + 1] = finalColor.g; verts[v + 2] = finalColor.b; diff --git a/plugins/spine/src/runtimes/spine-both.js.map b/plugins/spine/src/runtimes/spine-both.js.map index 69b02c8f1..144b61c6d 100644 --- a/plugins/spine/src/runtimes/spine-both.js.map +++ b/plugins/spine/src/runtimes/spine-both.js.map @@ -1 +1 @@ -{"version":3,"file":"spine-both.js","sourceRoot":"","sources":["../../spine-runtimes/spine-ts/core/src/Animation.ts","../../spine-runtimes/spine-ts/core/src/AnimationState.ts","../../spine-runtimes/spine-ts/core/src/AnimationStateData.ts","../../spine-runtimes/spine-ts/core/src/AssetManager.ts","../../spine-runtimes/spine-ts/core/src/AtlasAttachmentLoader.ts","../../spine-runtimes/spine-ts/core/src/BlendMode.ts","../../spine-runtimes/spine-ts/core/src/Bone.ts","../../spine-runtimes/spine-ts/core/src/BoneData.ts","../../spine-runtimes/spine-ts/core/src/ConstraintData.ts","../../spine-runtimes/spine-ts/core/src/Event.ts","../../spine-runtimes/spine-ts/core/src/EventData.ts","../../spine-runtimes/spine-ts/core/src/IkConstraint.ts","../../spine-runtimes/spine-ts/core/src/IkConstraintData.ts","../../spine-runtimes/spine-ts/core/src/PathConstraint.ts","../../spine-runtimes/spine-ts/core/src/PathConstraintData.ts","../../spine-runtimes/spine-ts/core/src/SharedAssetManager.ts","../../spine-runtimes/spine-ts/core/src/Skeleton.ts","../../spine-runtimes/spine-ts/core/src/SkeletonBinary.ts","../../spine-runtimes/spine-ts/core/src/SkeletonBounds.ts","../../spine-runtimes/spine-ts/core/src/SkeletonClipping.ts","../../spine-runtimes/spine-ts/core/src/SkeletonData.ts","../../spine-runtimes/spine-ts/core/src/SkeletonJson.ts","../../spine-runtimes/spine-ts/core/src/Skin.ts","../../spine-runtimes/spine-ts/core/src/Slot.ts","../../spine-runtimes/spine-ts/core/src/SlotData.ts","../../spine-runtimes/spine-ts/core/src/Texture.ts","../../spine-runtimes/spine-ts/core/src/TextureAtlas.ts","../../spine-runtimes/spine-ts/core/src/TransformConstraint.ts","../../spine-runtimes/spine-ts/core/src/TransformConstraintData.ts","../../spine-runtimes/spine-ts/core/src/Triangulator.ts","../../spine-runtimes/spine-ts/core/src/Updatable.ts","../../spine-runtimes/spine-ts/core/src/Utils.ts","../../spine-runtimes/spine-ts/core/src/VertexEffect.ts","../../spine-runtimes/spine-ts/core/src/polyfills.ts","../../spine-runtimes/spine-ts/core/src/attachments/Attachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/AttachmentLoader.ts","../../spine-runtimes/spine-ts/core/src/attachments/AttachmentType.ts","../../spine-runtimes/spine-ts/core/src/attachments/BoundingBoxAttachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/ClippingAttachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/MeshAttachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/PathAttachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/PointAttachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/RegionAttachment.ts","../../spine-runtimes/spine-ts/core/src/vertexeffects/JitterEffect.ts","../../spine-runtimes/spine-ts/core/src/vertexeffects/SwirlEffect.ts","../../spine-runtimes/spine-ts/canvas/src/AssetManager.ts","../../spine-runtimes/spine-ts/canvas/src/CanvasTexture.ts","../../spine-runtimes/spine-ts/canvas/src/SkeletonRenderer.ts","../../spine-runtimes/spine-ts/webgl/src/AssetManager.ts","../../spine-runtimes/spine-ts/webgl/src/Camera.ts","../../spine-runtimes/spine-ts/webgl/src/GLTexture.ts","../../spine-runtimes/spine-ts/webgl/src/Matrix4.ts","../../spine-runtimes/spine-ts/webgl/src/Mesh.ts","../../spine-runtimes/spine-ts/webgl/src/PolygonBatcher.ts","../../spine-runtimes/spine-ts/webgl/src/SceneRenderer.ts","../../spine-runtimes/spine-ts/webgl/src/Shader.ts","../../spine-runtimes/spine-ts/webgl/src/ShapeRenderer.ts","../../spine-runtimes/spine-ts/webgl/src/SkeletonDebugRenderer.ts","../../spine-runtimes/spine-ts/webgl/src/SkeletonRenderer.ts","../../spine-runtimes/spine-ts/webgl/src/Vector3.ts","../../spine-runtimes/spine-ts/webgl/src/WebGL.ts"],"names":[],"mappings":";;;;;;;;;;;;;AA6BA,IAAO,KAAK,CAo/CX;AAp/CD,WAAO,KAAK;IAGX;QASC,mBAAa,IAAY,EAAE,SAA0B,EAAE,QAAgB;YACtE,IAAI,IAAI,IAAI,IAAI;gBAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;YAC1D,IAAI,SAAS,IAAI,IAAI;gBAAE,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;YACpE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;YAC3B,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC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C,CAAC,CAAC,uBAAuB,CAAC,SAAS,CAAC;oBACpH,KAAK,MAAA,SAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,uBAAuB,CAAC,SAAS,CAAC;oBAClE,KAAK,MAAA,SAAS,CAAC,MAAM,CAAC,CAAC,OAAO,uBAAuB,CAAC,GAAG,CAAC;oBAC1D,OAAO,CAAC,CAAC,MAAM,IAAI,KAAK,CAAC,sBAAsB,GAAG,SAAS,CAAC,CAAC;iBAC7D;YACF,CAAC;YA5BM,4BAAI,GAAG,CAAC,CAAC;YACT,2BAAG,GAAG,CAAC,CAAC;YACR,iCAAS,GAAG,MAAM,CAAC;YACnB,2CAAmB,GAAG,MAAM,CAAC;YAC7B,iCAAS,GAAG,MAAM,CAAC;YACnB,2CAAmB,GAAG,MAAM,CAAC;YAC7B,iCAAS,GAAG,MAAM,CAAC;YACnB,2CAAmB,GAAG,MAAM,CAAC;YAC7B,iCAAS,GAAG,MAAM,CAAA;YAqB1B,8BAAC;SAAA,AA9BD,IA8BC;QA9BY,6BAAuB,0BA8BnC,CAAA;IACF,CAAC,EAtEY,KAAK,GAAL,WAAK,KAAL,WAAK,QAsEjB;AAAD,CAAC,EAtEM,KAAK,KAAL,KAAK,QAsEX"} \ No newline at end of file +{"version":3,"file":"spine-both.js","sourceRoot":"","sources":["../../spine-runtimes/spine-ts/core/src/Animation.ts","../../spine-runtimes/spine-ts/core/src/AnimationState.ts","../../spine-runtimes/spine-ts/core/src/AnimationStateData.ts","../../spine-runtimes/spine-ts/core/src/AssetManager.ts","../../spine-runtimes/spine-ts/core/src/AtlasAttachmentLoader.ts","../../spine-runtimes/spine-ts/core/src/BlendMode.ts","../../spine-runtimes/spine-ts/core/src/Bone.ts","../../spine-runtimes/spine-ts/core/src/BoneData.ts","../../spine-runtimes/spine-ts/core/src/ConstraintData.ts","../../spine-runtimes/spine-ts/core/src/Event.ts","../../spine-runtimes/spine-ts/core/src/EventData.ts","../../spine-runtimes/spine-ts/core/src/IkConstraint.ts","../../spine-runtimes/spine-ts/core/src/IkConstraintData.ts","../../spine-runtimes/spine-ts/core/src/PathConstraint.ts","../../spine-runtimes/spine-ts/core/src/PathConstraintData.ts","../../spine-runtimes/spine-ts/core/src/SharedAssetManager.ts","../../spine-runtimes/spine-ts/core/src/Skeleton.ts","../../spine-runtimes/spine-ts/core/src/SkeletonBinary.ts","../../spine-runtimes/spine-ts/core/src/SkeletonBounds.ts","../../spine-runtimes/spine-ts/core/src/SkeletonClipping.ts","../../spine-runtimes/spine-ts/core/src/SkeletonData.ts","../../spine-runtimes/spine-ts/core/src/SkeletonJson.ts","../../spine-runtimes/spine-ts/core/src/Skin.ts","../../spine-runtimes/spine-ts/core/src/Slot.ts","../../spine-runtimes/spine-ts/core/src/SlotData.ts","../../spine-runtimes/spine-ts/core/src/Texture.ts","../../spine-runtimes/spine-ts/core/src/TextureAtlas.ts","../../spine-runtimes/spine-ts/core/src/TransformConstraint.ts","../../spine-runtimes/spine-ts/core/src/TransformConstraintData.ts","../../spine-runtimes/spine-ts/core/src/Triangulator.ts","../../spine-runtimes/spine-ts/core/src/Updatable.ts","../../spine-runtimes/spine-ts/core/src/Utils.ts","../../spine-runtimes/spine-ts/core/src/VertexEffect.ts","../../spine-runtimes/spine-ts/core/src/polyfills.ts","../../spine-runtimes/spine-ts/core/src/attachments/Attachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/AttachmentLoader.ts","../../spine-runtimes/spine-ts/core/src/attachments/AttachmentType.ts","../../spine-runtimes/spine-ts/core/src/attachments/BoundingBoxAttachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/ClippingAttachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/MeshAttachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/PathAttachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/PointAttachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/RegionAttachment.ts","../../spine-runtimes/spine-ts/core/src/vertexeffects/JitterEffect.ts","../../spine-runtimes/spine-ts/core/src/vertexeffects/SwirlEffect.ts","../../spine-runtimes/spine-ts/canvas/src/AssetManager.ts","../../spine-runtimes/spine-ts/canvas/src/CanvasTexture.ts","../../spine-runtimes/spine-ts/canvas/src/SkeletonRenderer.ts","../../spine-runtimes/spine-ts/webgl/src/AssetManager.ts","../../spine-runtimes/spine-ts/webgl/src/Camera.ts","../../spine-runtimes/spine-ts/webgl/src/GLTexture.ts","../../spine-runtimes/spine-ts/webgl/src/Matrix4.ts","../../spine-runtimes/spine-ts/webgl/src/Mesh.ts","../../spine-runtimes/spine-ts/webgl/src/PolygonBatcher.ts","../../spine-runtimes/spine-ts/webgl/src/SceneRenderer.ts","../../spine-runtimes/spine-ts/webgl/src/Shader.ts","../../spine-runtimes/spine-ts/webgl/src/ShapeRenderer.ts","../../spine-runtimes/spine-ts/webgl/src/SkeletonDebugRenderer.ts","../../spine-runtimes/spine-ts/webgl/src/SkeletonRenderer.ts","../../spine-runtimes/spine-ts/webgl/src/Vector3.ts","../../spine-runtimes/spine-ts/webgl/src/WebGL.ts"],"names":[],"mappings":";;;;;;;;;;;;;AA6BA,IAAO,KAAK,CAs/CX;AAt/CD,WAAO,KAAK;IAGX;QASC,mBAAa,IAAY,EAAE,SAA0B,EAAE,QAAgB;YACtE,IAAI,IAAI,IAAI,IAAI;gBAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;YAC1D,IAAI,SAAS,IAAI,IAAI;gBAAE,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;YACpE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;YAC3B,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;YACtB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE;gBACxC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,aAAa,EAAE,CAA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,CAAC,CAAC,OAAO,kBAAkB,CAAA,CAAC,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAC,CAAC,uBAAuB,CAAC,SAAS,CAAC;oBACpH,KAAK,MAAA,SAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,uBAAuB,CAAC,SAAS,CAAC;oBAClE,KAAK,MAAA,SAAS,CAAC,MAAM,CAAC,CAAC,OAAO,uBAAuB,CAAC,GAAG,CAAC;oBAC1D,OAAO,CAAC,CAAC,MAAM,IAAI,KAAK,CAAC,sBAAsB,GAAG,SAAS,CAAC,CAAC;iBAC7D;YACF,CAAC;YA5BM,4BAAI,GAAG,CAAC,CAAC;YACT,2BAAG,GAAG,CAAC,CAAC;YACR,iCAAS,GAAG,MAAM,CAAC;YACnB,2CAAmB,GAAG,MAAM,CAAC;YAC7B,iCAAS,GAAG,MAAM,CAAC;YACnB,2CAAmB,GAAG,MAAM,CAAC;YAC7B,iCAAS,GAAG,MAAM,CAAC;YACnB,2CAAmB,GAAG,MAAM,CAAC;YAC7B,iCAAS,GAAG,MAAM,CAAA;YAqB1B,8BAAC;SAAA,AA9BD,IA8BC;QA9BY,6BAAuB,0BA8BnC,CAAA;IACF,CAAC,EAtEY,KAAK,GAAL,WAAK,KAAL,WAAK,QAsEjB;AAAD,CAAC,EAtEM,KAAK,KAAL,KAAK,QAsEX"} \ No newline at end of file diff --git a/plugins/spine/src/runtimes/spine-canvas.d.ts b/plugins/spine/src/runtimes/spine-canvas.d.ts index 759d97e5f..7087776a4 100644 --- a/plugins/spine/src/runtimes/spine-canvas.d.ts +++ b/plugins/spine/src/runtimes/spine-canvas.d.ts @@ -144,6 +144,7 @@ declare module spine { getFrameCount(): number; setFrame(frameIndex: number, time: number, attachmentName: string): void; apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + setAttachment(skeleton: Skeleton, slot: Slot, attachmentName: string): void; } class DeformTimeline extends CurveTimeline { slotIndex: number; @@ -248,12 +249,15 @@ declare module spine { static emptyAnimation: Animation; static SUBSEQUENT: number; static FIRST: number; - static HOLD: number; + static HOLD_SUBSEQUENT: number; + static HOLD_FIRST: number; static HOLD_MIX: number; - static NOT_LAST: number; + static SETUP: number; + static CURRENT: number; data: AnimationStateData; tracks: TrackEntry[]; timeScale: number; + unkeyedState: number; events: Event[]; listeners: AnimationStateListener[]; queue: EventQueue; @@ -265,6 +269,8 @@ declare module spine { updateMixingFrom(to: TrackEntry, delta: number): boolean; apply(skeleton: Skeleton): boolean; applyMixingFrom(to: TrackEntry, skeleton: Skeleton, blend: MixBlend): number; + applyAttachmentTimeline(timeline: AttachmentTimeline, skeleton: Skeleton, time: number, blend: MixBlend, attachments: boolean): void; + setAttachment(skeleton: Skeleton, slot: Slot, attachmentName: string, attachments: boolean): void; applyRotateTimeline(timeline: Timeline, skeleton: Skeleton, time: number, alpha: number, blend: MixBlend, timelinesRotation: Array, i: number, firstFrame: boolean): void; queueEvents(entry: TrackEntry, animationTime: number): void; clearTracks(): void; @@ -282,7 +288,6 @@ declare module spine { disposeNext(entry: TrackEntry): void; _animationsChanged(): void; computeHold(entry: TrackEntry): void; - computeNotLast(entry: TrackEntry): void; getCurrent(trackIndex: number): TrackEntry; addListener(listener: AnimationStateListener): void; removeListener(listener: AnimationStateListener): void; @@ -384,13 +389,14 @@ declare module spine { private errors; private toLoad; private loaded; + private rawDataUris; constructor(textureLoader: (image: HTMLImageElement) => any, pathPrefix?: string); - private static downloadText; - private static downloadBinary; + private downloadText; + private downloadBinary; + setRawDataURI(path: string, data: string): void; loadBinary(path: string, success?: (path: string, binary: Uint8Array) => void, error?: (path: string, error: string) => void): void; loadText(path: string, success?: (path: string, text: string) => void, error?: (path: string, error: string) => void): void; loadTexture(path: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void; - loadTextureData(path: string, data: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void; loadTextureAtlas(path: string, success?: (path: string, atlas: TextureAtlas) => void, error?: (path: string, error: string) => void): void; get(path: string): any; remove(path: string): void; @@ -848,8 +854,9 @@ declare module spine { bone: Bone; color: Color; darkColor: Color; - private attachment; + attachment: Attachment; private attachmentTime; + attachmentState: number; deform: number[]; constructor(data: SlotData, bone: Bone); getSkeleton(): Skeleton; diff --git a/plugins/spine/src/runtimes/spine-canvas.js b/plugins/spine/src/runtimes/spine-canvas.js index 3df3c7f86..857507df4 100644 --- a/plugins/spine/src/runtimes/spine-canvas.js +++ b/plugins/spine/src/runtimes/spine-canvas.js @@ -2,7 +2,7 @@ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { @@ -675,17 +675,15 @@ var spine; var slot = skeleton.slots[this.slotIndex]; if (!slot.bone.active) return; - if (direction == MixDirection.mixOut && blend == MixBlend.setup) { - var attachmentName_1 = slot.data.attachmentName; - slot.setAttachment(attachmentName_1 == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName_1)); + if (direction == MixDirection.mixOut) { + if (blend == MixBlend.setup) + this.setAttachment(skeleton, slot, slot.data.attachmentName); return; } var frames = this.frames; if (time < frames[0]) { - if (blend == MixBlend.setup || blend == MixBlend.first) { - var attachmentName_2 = slot.data.attachmentName; - slot.setAttachment(attachmentName_2 == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName_2)); - } + if (blend == MixBlend.setup || blend == MixBlend.first) + this.setAttachment(skeleton, slot, slot.data.attachmentName); return; } var frameIndex = 0; @@ -697,6 +695,9 @@ var spine; skeleton.slots[this.slotIndex] .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName)); }; + AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) { + slot.attachment = attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName); + }; return AttachmentTimeline; }()); spine.AttachmentTimeline = AttachmentTimeline; @@ -798,6 +799,7 @@ var spine; case MixBlend.replace: for (var i_5 = 0; i_5 < vertexCount; i_5++) deform[i_5] += (lastVertices[i_5] - deform[i_5]) * alpha; + break; case MixBlend.add: var vertexAttachment = slotAttachment; if (vertexAttachment.bones == null) { @@ -954,8 +956,9 @@ var spine; DrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) { var drawOrder = skeleton.drawOrder; var slots = skeleton.slots; - if (direction == MixDirection.mixOut && blend == MixBlend.setup) { - spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length); + if (direction == MixDirection.mixOut) { + if (blend == MixBlend.setup) + spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length); return; } var frames = this.frames; @@ -1347,6 +1350,7 @@ var spine; function AnimationState(data) { this.tracks = new Array(); this.timeScale = 1; + this.unkeyedState = 0; this.events = new Array(); this.listeners = new Array(); this.queue = new EventQueue(this); @@ -1436,12 +1440,12 @@ var spine; var events = this.events; var tracks = this.tracks; var applied = false; - for (var i = 0, n = tracks.length; i < n; i++) { - var current = tracks[i]; + for (var i_16 = 0, n_1 = tracks.length; i_16 < n_1; i_16++) { + var current = tracks[i_16]; if (current == null || current.delay > 0) continue; applied = true; - var blend = i == 0 ? spine.MixBlend.first : current.mixBlend; + var blend = i_16 == 0 ? spine.MixBlend.first : current.mixBlend; var mix = current.alpha; if (current.mixingFrom != null) mix *= this.applyMixingFrom(current, skeleton, blend); @@ -1450,10 +1454,14 @@ var spine; var animationLast = current.animationLast, animationTime = current.getAnimationTime(); var timelineCount = current.animation.timelines.length; var timelines = current.animation.timelines; - if ((i == 0 && mix == 1) || blend == spine.MixBlend.add) { + if ((i_16 == 0 && mix == 1) || blend == spine.MixBlend.add) { for (var ii = 0; ii < timelineCount; ii++) { spine.Utils.webkit602BugfixHelper(mix, blend); - timelines[ii].apply(skeleton, animationLast, animationTime, events, mix, blend, spine.MixDirection.mixIn); + var timeline = timelines[ii]; + if (timeline instanceof spine.AttachmentTimeline) + this.applyAttachmentTimeline(timeline, skeleton, animationTime, blend, true); + else + timeline.apply(skeleton, animationLast, animationTime, events, mix, blend, spine.MixDirection.mixIn); } } else { @@ -1463,14 +1471,17 @@ var spine; spine.Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null); var timelinesRotation = current.timelinesRotation; for (var ii = 0; ii < timelineCount; ii++) { - var timeline = timelines[ii]; - var timelineBlend = (timelineMode[ii] & (AnimationState.NOT_LAST - 1)) == AnimationState.SUBSEQUENT ? blend : spine.MixBlend.setup; - if (timeline instanceof spine.RotateTimeline) { - this.applyRotateTimeline(timeline, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame); + var timeline_1 = timelines[ii]; + var timelineBlend = timelineMode[ii] == AnimationState.SUBSEQUENT ? blend : spine.MixBlend.setup; + if (timeline_1 instanceof spine.RotateTimeline) { + this.applyRotateTimeline(timeline_1, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame); + } + else if (timeline_1 instanceof spine.AttachmentTimeline) { + this.applyAttachmentTimeline(timeline_1, skeleton, animationTime, blend, true); } else { spine.Utils.webkit602BugfixHelper(mix, blend); - timeline.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, spine.MixDirection.mixIn); + timeline_1.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, spine.MixDirection.mixIn); } } } @@ -1479,6 +1490,16 @@ var spine; current.nextAnimationLast = animationTime; current.nextTrackLast = current.trackTime; } + var setupState = this.unkeyedState + AnimationState.SETUP; + var slots = skeleton.slots; + for (var i = 0, n = skeleton.slots.length; i < n; i++) { + var slot = slots[i]; + if (slot.attachmentState == setupState) { + var attachmentName = slot.data.attachmentName; + slot.attachment = (attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName)); + } + } + this.unkeyedState += 2; this.queue.drain(); return applied; }; @@ -1522,23 +1543,22 @@ var spine; var direction = spine.MixDirection.mixOut; var timelineBlend = void 0; var alpha = 0; - switch (timelineMode[i] & (AnimationState.NOT_LAST - 1)) { + switch (timelineMode[i]) { case AnimationState.SUBSEQUENT: - timelineBlend = blend; - if (!attachments && timeline instanceof spine.AttachmentTimeline) { - if ((timelineMode[i] & AnimationState.NOT_LAST) == AnimationState.NOT_LAST) - continue; - timelineBlend = spine.MixBlend.setup; - } if (!drawOrder && timeline instanceof spine.DrawOrderTimeline) continue; + timelineBlend = blend; alpha = alphaMix; break; case AnimationState.FIRST: timelineBlend = spine.MixBlend.setup; alpha = alphaMix; break; - case AnimationState.HOLD: + case AnimationState.HOLD_SUBSEQUENT: + timelineBlend = blend; + alpha = alphaHold; + break; + case AnimationState.HOLD_FIRST: timelineBlend = spine.MixBlend.setup; alpha = alphaHold; break; @@ -1551,18 +1571,12 @@ var spine; from.totalAlpha += alpha; if (timeline instanceof spine.RotateTimeline) this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame); + else if (timeline instanceof spine.AttachmentTimeline) + this.applyAttachmentTimeline(timeline, skeleton, animationTime, timelineBlend, attachments); else { spine.Utils.webkit602BugfixHelper(alpha, blend); - if (timelineBlend == spine.MixBlend.setup) { - if (timeline instanceof spine.AttachmentTimeline) { - if (attachments || (timelineMode[i] & AnimationState.NOT_LAST) == AnimationState.NOT_LAST) - direction = spine.MixDirection.mixIn; - } - else if (timeline instanceof spine.DrawOrderTimeline) { - if (drawOrder) - direction = spine.MixDirection.mixIn; - } - } + if (drawOrder && timeline instanceof spine.DrawOrderTimeline && timelineBlend == spine.MixBlend.setup) + direction = spine.MixDirection.mixIn; timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, direction); } } @@ -1574,6 +1588,31 @@ var spine; from.nextTrackLast = from.trackTime; return mix; }; + AnimationState.prototype.applyAttachmentTimeline = function (timeline, skeleton, time, blend, attachments) { + var slot = skeleton.slots[timeline.slotIndex]; + if (!slot.bone.active) + return; + var frames = timeline.frames; + if (time < frames[0]) { + if (blend == spine.MixBlend.setup || blend == spine.MixBlend.first) + this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments); + } + else { + var frameIndex; + if (time >= frames[frames.length - 1]) + frameIndex = frames.length - 1; + else + frameIndex = spine.Animation.binarySearch(frames, time) - 1; + this.setAttachment(skeleton, slot, timeline.attachmentNames[frameIndex], attachments); + } + if (slot.attachmentState <= this.unkeyedState) + slot.attachmentState = this.unkeyedState + AnimationState.SETUP; + }; + AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) { + slot.attachment = attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName); + if (attachments) + slot.attachmentState = this.unkeyedState + AnimationState.CURRENT; + }; AnimationState.prototype.applyRotateTimeline = function (timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) { if (firstFrame) timelinesRotation[i] = 0; @@ -1836,6 +1875,7 @@ var spine; entry.interruptAlpha = 1; entry.mixTime = 0; entry.mixDuration = last == null ? 0 : this.data.getMix(last.animation, animation); + entry.mixBlend = spine.MixBlend.replace; return entry; }; AnimationState.prototype.disposeNext = function (entry) { @@ -1861,14 +1901,6 @@ var spine; entry = entry.mixingTo; } while (entry != null); } - this.propertyIDs.clear(); - for (var i = this.tracks.length - 1; i >= 0; i--) { - var entry = this.tracks[i]; - while (entry != null) { - this.computeNotLast(entry); - entry = entry.mixingFrom; - } - } }; AnimationState.prototype.computeHold = function (entry) { var to = entry.mixingTo; @@ -1880,8 +1912,7 @@ var spine; var propertyIDs = this.propertyIDs; if (to != null && to.holdPrevious) { for (var i = 0; i < timelinesCount; i++) { - propertyIDs.add(timelines[i].getPropertyId()); - timelineMode[i] = AnimationState.HOLD; + timelineMode[i] = propertyIDs.add(timelines[i].getPropertyId()) ? AnimationState.HOLD_FIRST : AnimationState.HOLD_SUBSEQUENT; } return; } @@ -1905,20 +1936,7 @@ var spine; } break; } - timelineMode[i] = AnimationState.HOLD; - } - } - }; - AnimationState.prototype.computeNotLast = function (entry) { - var timelines = entry.animation.timelines; - var timelinesCount = entry.animation.timelines.length; - var timelineMode = entry.timelineMode; - var propertyIDs = this.propertyIDs; - for (var i = 0; i < timelinesCount; i++) { - if (timelines[i] instanceof spine.AttachmentTimeline) { - var timeline = timelines[i]; - if (!propertyIDs.add(timeline.slotIndex)) - timelineMode[i] |= AnimationState.NOT_LAST; + timelineMode[i] = AnimationState.HOLD_FIRST; } } }; @@ -1946,9 +1964,11 @@ var spine; AnimationState.emptyAnimation = new spine.Animation("", [], 0); AnimationState.SUBSEQUENT = 0; AnimationState.FIRST = 1; - AnimationState.HOLD = 2; - AnimationState.HOLD_MIX = 3; - AnimationState.NOT_LAST = 4; + AnimationState.HOLD_SUBSEQUENT = 2; + AnimationState.HOLD_FIRST = 3; + AnimationState.HOLD_MIX = 4; + AnimationState.SETUP = 1; + AnimationState.CURRENT = 2; return AnimationState; }()); spine.AnimationState = AnimationState; @@ -2161,11 +2181,15 @@ var spine; this.errors = {}; this.toLoad = 0; this.loaded = 0; + this.rawDataUris = {}; this.textureLoader = textureLoader; this.pathPrefix = pathPrefix; } - AssetManager.downloadText = function (url, success, error) { + AssetManager.prototype.downloadText = function (url, success, error) { var request = new XMLHttpRequest(); + request.overrideMimeType("text/html"); + if (this.rawDataUris[url]) + url = this.rawDataUris[url]; request.open("GET", url, true); request.onload = function () { if (request.status == 200) { @@ -2180,8 +2204,10 @@ var spine; }; request.send(); }; - AssetManager.downloadBinary = function (url, success, error) { + AssetManager.prototype.downloadBinary = function (url, success, error) { var request = new XMLHttpRequest(); + if (this.rawDataUris[url]) + url = this.rawDataUris[url]; request.open("GET", url, true); request.responseType = "arraybuffer"; request.onload = function () { @@ -2197,13 +2223,16 @@ var spine; }; request.send(); }; + AssetManager.prototype.setRawDataURI = function (path, data) { + this.rawDataUris[this.pathPrefix + path] = data; + }; AssetManager.prototype.loadBinary = function (path, success, error) { var _this = this; if (success === void 0) { success = null; } if (error === void 0) { error = null; } path = this.pathPrefix + path; this.toLoad++; - AssetManager.downloadBinary(path, function (data) { + this.downloadBinary(path, function (data) { _this.assets[path] = data; if (success) success(path, data); @@ -2223,7 +2252,7 @@ var spine; if (error === void 0) { error = null; } path = this.pathPrefix + path; this.toLoad++; - AssetManager.downloadText(path, function (data) { + this.downloadText(path, function (data) { _this.assets[path] = data; if (success) success(path, data); @@ -2242,12 +2271,13 @@ var spine; if (success === void 0) { success = null; } if (error === void 0) { error = null; } path = this.pathPrefix + path; + var storagePath = path; this.toLoad++; var img = new Image(); img.crossOrigin = "anonymous"; img.onload = function (ev) { var texture = _this.textureLoader(img); - _this.assets[path] = texture; + _this.assets[storagePath] = texture; _this.toLoad--; _this.loaded++; if (success) @@ -2260,32 +2290,10 @@ var spine; if (error) error(path, "Couldn't load image " + path); }; + if (this.rawDataUris[path]) + path = this.rawDataUris[path]; img.src = path; }; - AssetManager.prototype.loadTextureData = function (path, data, success, error) { - var _this = this; - if (success === void 0) { success = null; } - if (error === void 0) { error = null; } - path = this.pathPrefix + path; - this.toLoad++; - var img = new Image(); - img.onload = function (ev) { - var texture = _this.textureLoader(img); - _this.assets[path] = texture; - _this.toLoad--; - _this.loaded++; - if (success) - success(path, img); - }; - img.onerror = function (ev) { - _this.errors[path] = "Couldn't load image " + path; - _this.toLoad--; - _this.loaded++; - if (error) - error(path, "Couldn't load image " + path); - }; - img.src = data; - }; AssetManager.prototype.loadTextureAtlas = function (path, success, error) { var _this = this; if (success === void 0) { success = null; } @@ -2293,12 +2301,12 @@ var spine; var parent = path.lastIndexOf("/") >= 0 ? path.substring(0, path.lastIndexOf("/")) : ""; path = this.pathPrefix + path; this.toLoad++; - AssetManager.downloadText(path, function (atlasData) { + this.downloadText(path, function (atlasData) { var pagesLoaded = { count: 0 }; var atlasPages = new Array(); try { var atlas = new spine.TextureAtlas(atlasData, function (path) { - atlasPages.push(parent + "/" + path); + atlasPages.push(parent == "" ? path : parent + "/" + path); var image = document.createElement("img"); image.width = 16; image.height = 16; @@ -2322,7 +2330,7 @@ var spine; if (!pageLoadError) { try { var atlas = new spine.TextureAtlas(atlasData, function (path) { - return _this.get(parent + "/" + path); + return _this.get(parent == "" ? path : parent + "/" + path); }); _this.assets[path] = atlas; if (success) @@ -2560,6 +2568,8 @@ var spine; var prx = 0; if (s > 0.0001) { s = Math.abs(pa * pd - pb * pc) / s; + pa /= this.skeleton.scaleX; + pc /= this.skeleton.scaleY; pb = pc * s; pd = pa * s; prx = Math.atan2(pc, pa) * spine.MathUtils.radDeg; @@ -2830,10 +2840,27 @@ var spine; if (!bone.appliedValid) bone.updateAppliedTransform(); var p = bone.parent; - var id = 1 / (p.a * p.d - p.b * p.c); - var x = targetX - p.worldX, y = targetY - p.worldY; - var tx = (x * p.d - y * p.b) * id - bone.ax, ty = (y * p.a - x * p.c) * id - bone.ay; - var rotationIK = Math.atan2(ty, tx) * spine.MathUtils.radDeg - bone.ashearX - bone.arotation; + var pa = p.a, pb = p.b, pc = p.c, pd = p.d; + var rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0; + switch (bone.data.transformMode) { + case spine.TransformMode.OnlyTranslation: + tx = targetX - bone.worldX; + ty = targetY - bone.worldY; + break; + case spine.TransformMode.NoRotationOrReflection: + var s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc); + var sa = pa / bone.skeleton.scaleX; + var sc = pc / bone.skeleton.scaleY; + pb = -sc * s * bone.skeleton.scaleX; + pd = sa * s * bone.skeleton.scaleY; + rotationIK += Math.atan2(sc, sa) * spine.MathUtils.radDeg; + default: + var x = targetX - p.worldX, y = targetY - p.worldY; + var d = pa * pd - pb * pc; + tx = (x * pd - y * pb) / d - bone.ax; + ty = (y * pa - x * pc) / d - bone.ay; + } + rotationIK += Math.atan2(ty, tx) * spine.MathUtils.radDeg; if (bone.ascaleX < 0) rotationIK += 180; if (rotationIK > 180) @@ -2842,6 +2869,12 @@ var spine; rotationIK += 360; var sx = bone.ascaleX, sy = bone.ascaleY; if (compress || stretch) { + switch (bone.data.transformMode) { + case spine.TransformMode.NoScale: + case spine.TransformMode.NoScaleOrReflection: + tx = targetX - bone.worldX; + ty = targetY - bone.worldY; + } var b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty); if ((compress && dd < b) || (stretch && dd > b) && b > 0.0001) { var s = (dd / b - 1) * alpha + 1; @@ -3500,6 +3533,7 @@ var spine; if (!this.queueAsset(clientId, null, path)) return; var request = new XMLHttpRequest(); + request.overrideMimeType("text/html"); request.onreadystatechange = function () { if (request.readyState == XMLHttpRequest.DONE) { if (request.status >= 200 && request.status < 300) { @@ -3519,6 +3553,7 @@ var spine; if (!this.queueAsset(clientId, null, path)) return; var request = new XMLHttpRequest(); + request.overrideMimeType("text/html"); request.onreadystatechange = function () { if (request.readyState == XMLHttpRequest.DONE) { if (request.status >= 200 && request.status < 300) { @@ -3538,7 +3573,6 @@ var spine; if (!this.queueAsset(clientId, textureLoader, path)) return; var img = new Image(); - img.src = path; img.crossOrigin = "anonymous"; img.onload = function (ev) { _this.rawAssets[path] = img; @@ -3546,6 +3580,7 @@ var spine; img.onerror = function (ev) { _this.errors[path] = "Couldn't load image " + path; }; + img.src = path; }; SharedAssetManager.prototype.get = function (clientId, path) { path = this.pathPrefix + path; @@ -4071,6 +4106,8 @@ var spine; var input = new BinaryInput(binary); skeletonData.hash = input.readString(); skeletonData.version = input.readString(); + if ("3.8.75" == skeletonData.version) + throw new Error("Unsupported skeleton data, please export with a newer version of Spine."); skeletonData.x = input.readFloat(); skeletonData.y = input.readFloat(); skeletonData.width = input.readFloat(); @@ -5059,7 +5096,7 @@ var spine; var clippingPolygon = this.clippingPolygon; SkeletonClipping.makeClockwise(clippingPolygon); var clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon)); - for (var i = 0, n_1 = clippingPolygons.length; i < n_1; i++) { + for (var i = 0, n_2 = clippingPolygons.length; i < n_2; i++) { var polygon = clippingPolygons[i]; SkeletonClipping.makeClockwise(polygon); polygon.push(polygon[0]); @@ -5481,6 +5518,8 @@ var spine; if (skeletonMap != null) { skeletonData.hash = skeletonMap.hash; skeletonData.version = skeletonMap.spine; + if ("3.8.75" == skeletonData.version) + throw new Error("Unsupported skeleton data, please export with a newer version of Spine."); skeletonData.x = skeletonMap.x; skeletonData.y = skeletonMap.y; skeletonData.width = skeletonMap.width; @@ -6158,7 +6197,7 @@ var spine; skeletonData.animations.push(new spine.Animation(name, timelines, duration)); }; SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) { - if (!map.curve) + if (!map.hasOwnProperty("curve")) return; if (map.curve == "stepped") timeline.setStepped(frameIndex); @@ -7473,9 +7512,7 @@ var spine; }; Pool.prototype.freeAll = function (items) { for (var i = 0; i < items.length; i++) { - if (items[i].reset) - items[i].reset(); - this.items[i] = items[i]; + this.free(items[i]); } }; Pool.prototype.clear = function () { @@ -8017,7 +8054,7 @@ var spine; worldVertices[offset + 1] = offsetX * c + offsetY * d + y; }; RegionAttachment.prototype.copy = function () { - var copy = new RegionAttachment(name); + var copy = new RegionAttachment(this.name); copy.region = this.region; copy.rendererObject = this.rendererObject; copy.path = this.path; diff --git a/plugins/spine/src/runtimes/spine-canvas.js.map b/plugins/spine/src/runtimes/spine-canvas.js.map index 2da1cb2d2..0c96e775c 100644 --- a/plugins/spine/src/runtimes/spine-canvas.js.map +++ b/plugins/spine/src/runtimes/spine-canvas.js.map @@ -1 +1 @@ -{"version":3,"file":"spine-canvas.js","sourceRoot":"","sources":["../../spine-runtimes/spine-ts/core/src/Animation.ts","../../spine-runtimes/spine-ts/core/src/AnimationState.ts","../../spine-runtimes/spine-ts/core/src/AnimationStateData.ts","../../spine-runtimes/spine-ts/core/src/AssetManager.ts","../../spine-runtimes/spine-ts/core/src/AtlasAttachmentLoader.ts","../../spine-runtimes/spine-ts/core/src/BlendMode.ts","../../spine-runtimes/spine-ts/core/src/Bone.ts","../../spine-runtimes/spine-ts/core/src/BoneData.ts","../../spine-runtimes/spine-ts/core/src/ConstraintData.ts","../../spine-runtimes/spine-ts/core/src/Event.ts","../../spine-runtimes/spine-ts/core/src/EventData.ts","../../spine-runtimes/spine-ts/core/src/IkConstraint.ts","../../spine-runtimes/spine-ts/core/src/IkConstraintData.ts","../../spine-runtimes/spine-ts/core/src/PathConstraint.ts","../../spine-runtimes/spine-ts/core/src/PathConstraintData.ts","../../spine-runtimes/spine-ts/core/src/SharedAssetManager.ts","../../spine-runtimes/spine-ts/core/src/Skeleton.ts","../../spine-runtimes/spine-ts/core/src/SkeletonBinary.ts","../../spine-runtimes/spine-ts/core/src/SkeletonBounds.ts","../../spine-runtimes/spine-ts/core/src/SkeletonClipping.ts","../../spine-runtimes/spine-ts/core/src/SkeletonData.ts","../../spine-runtimes/spine-ts/core/src/SkeletonJson.ts","../../spine-runtimes/spine-ts/core/src/Skin.ts","../../spine-runtimes/spine-ts/core/src/Slot.ts","../../spine-runtimes/spine-ts/core/src/SlotData.ts","../../spine-runtimes/spine-ts/core/src/Texture.ts","../../spine-runtimes/spine-ts/core/src/TextureAtlas.ts","../../spine-runtimes/spine-ts/core/src/TransformConstraint.ts","../../spine-runtimes/spine-ts/core/src/TransformConstraintData.ts","../../spine-runtimes/spine-ts/core/src/Triangulator.ts","../../spine-runtimes/spine-ts/core/src/Updatable.ts","../../spine-runtimes/spine-ts/core/src/Utils.ts","../../spine-runtimes/spine-ts/core/src/VertexEffect.ts","../../spine-runtimes/spine-ts/core/src/polyfills.ts","../../spine-runtimes/spine-ts/core/src/attachments/Attachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/AttachmentLoader.ts","../../spine-runtimes/spine-ts/core/src/attachments/AttachmentType.ts","../../spine-runtimes/spine-ts/core/src/attachments/BoundingBoxAttachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/ClippingAttachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/MeshAttachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/PathAttachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/PointAttachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/RegionAttachment.ts","../../spine-runtimes/spine-ts/core/src/vertexeffects/JitterEffect.ts","../../spine-runtimes/spine-ts/core/src/vertexeffects/SwirlEffect.ts","../../spine-runtimes/spine-ts/canvas/src/AssetManager.ts","../../spine-runtimes/spine-ts/canvas/src/CanvasTexture.ts","../../spine-runtimes/spine-ts/canvas/src/SkeletonRenderer.ts"],"names":[],"mappings":";;;;;;;;;;;;;AA6BA,IAAO,KAAK,CAo/CX;AAp/CD,WAAO,KAAK;IAGX;QASC,mBAAa,IAAY,EAAE,SAA0B,EAAE,QAAgB;YACtE,IAAI,IAAI,IAAI,IAAI;gBAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;YAC1D,IAAI,SAAS,IAAI,IAAI;gBAAE,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;YACpE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;YAC3B,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;YACtB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE;gBACxC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC,GAAG,IAAI,CAAC;YACvD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAC1B,CAAC;QAED,+BAAW,GAAX,UAAa,EAAU;YACtB,OAAO,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC;QACrC,CAAC;QAOD,yBAAK,GAAL,UAAO,QAAkB,EAAE,QAAgB,EAAE,IAAY,EAAE,IAAa,EAAE,MAAoB,EAAE,KAAa,EAAE,KAAe,EAAE,SAAuB;Y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AI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;oBAC1D,QAAQ,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;oBACxB,QAAQ,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;oBACxB,QAAQ,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;oBACxB,QAAQ,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;oBACxB,QAAQ,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;oBACzB,QAAQ,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;oBACzB,CAAC,IAAI,CAAC,CAAC;iBACP;gBAED,OAAO,QAAQ,CAAC;YACjB,CAAC;YArSM,+BAAc,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;YACpC,4BAAW,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAqShC,uBAAC;SAAA,AAvSD,IAuSC;QAvSY,uBAAgB,mBAuS5B,CAAA;IACF,CAAC,EAzSY,MAAM,GAAN,YAAM,KAAN,YAAM,QAySlB;AAAD,CAAC,EAzSM,KAAK,KAAL,KAAK,QAySX"} \ No newline at end of file +{"version":3,"file":"spine-canvas.js","sourceRoot":"","sources":["../../spine-runtimes/spine-ts/core/src/Animation.ts","../../spine-runtimes/spine-ts/core/src/AnimationState.ts","../../spine-runtimes/spine-ts/core/src/AnimationStateData.ts","../../spine-runtimes/spine-ts/core/src/AssetManager.ts","../../spine-runtimes/spine-ts/core/src/AtlasAttachmentLoader.ts","../../spine-runtimes/spine-ts/core/src/BlendMode.ts","../../spine-runtimes/spine-ts/core/src/Bone.ts","../../spine-runtimes/spine-ts/core/src/BoneData.ts","../../spine-runtimes/spine-ts/core/src/ConstraintData.ts","../../spine-runtimes/spine-ts/core/src/Event.ts","../../spine-runtimes/spine-ts/core/src/EventData.ts","../../spine-runtimes/spine-ts/core/src/IkConstraint.ts","../../spine-runtimes/spine-ts/core/src/IkConstraintData.ts","../../spine-runtimes/spine-ts/core/src/PathConstraint.ts","../../spine-runtimes/spine-ts/core/src/PathConstraintData.ts","../../spine-runtimes/spine-ts/core/src/SharedAssetManager.ts","../../spine-runtimes/spine-ts/core/src/Skeleton.ts","../../spine-runtimes/spine-ts/core/src/SkeletonBinary.ts","../../spine-runtimes/spine-ts/core/src/SkeletonBounds.ts","../../spine-runtimes/spine-ts/core/src/SkeletonClipping.ts","../../spine-runtimes/spine-ts/core/src/SkeletonData.ts","../../spine-runtimes/spine-ts/core/src/SkeletonJson.ts","../../spine-runtimes/spine-ts/core/src/Skin.ts","../../spine-runtimes/spine-ts/core/src/Slot.ts","../../spine-runtimes/spine-ts/core/src/SlotData.ts","../../spine-runtimes/spine-ts/core/src/Texture.ts","../../spine-runtimes/spine-ts/core/src/TextureAtlas.ts","../../spine-runtimes/spine-ts/core/src/TransformConstraint.ts","../../spine-runtimes/spine-ts/core/src/TransformConstraintData.ts","../../spine-runtimes/spine-ts/core/src/Triangulator.ts","../../spine-runtimes/spine-ts/core/src/Updatable.ts","../../spine-runtimes/spine-ts/core/src/Utils.ts","../../spine-runtimes/spine-ts/core/src/VertexEffect.ts","../../spine-runtimes/spine-ts/core/src/polyfills.ts","../../spine-runtimes/spine-ts/core/src/attachments/Attachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/AttachmentLoader.ts","../../spine-runtimes/spine-ts/core/src/attachments/AttachmentType.ts","../../spine-runtimes/spine-ts/core/src/attachments/BoundingBoxAttachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/ClippingAttachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/MeshAttachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/PathAttachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/PointAttachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/RegionAttachment.ts","../../spine-runtimes/spine-ts/core/src/vertexeffects/JitterEffect.ts","../../spine-runtimes/spine-ts/core/src/vertexeffects/SwirlEffect.ts","../../spine-runtimes/spine-ts/canvas/src/AssetManager.ts","../../spine-runtimes/spine-ts/canvas/src/CanvasTexture.ts","../../spine-runtimes/spine-ts/canvas/src/SkeletonRenderer.ts"],"names":[],"mappings":";;;;;;;;;;;;;AA6BA,IAAO,KAAK,CAs/CX;AAt/CD,WAAO,KAAK;IAGX;QASC,mBAAa,IAAY,EAAE,SAA0B,EAAE,QAAgB;YACtE,IAAI,IAAI,IAAI,IAAI;gBAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;YAC1D,IAAI,SAAS,IAAI,IAAI;gBAAE,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;YACpE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;YAC3B,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;YACtB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE;gBACxC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC,GAAG,IAAI,CAAC;YACvD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAC1B,CAAC;QAED,+BAAW,GAAX,UAAa,EAAU;YACtB,OAAO,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC;QACrC,CAAC;QAOD,yBAAK,GAAL,UAAO,QAAkB,EAAE,QAAgB,EAAE,IAAY,EAAE,IAAa,EAAE,MAAoB,EAAE,KAAa,EA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Q,EAAE,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;gBAExG,IAAI,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;gBACnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;oBAC1D,QAAQ,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;oBACxB,QAAQ,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;oBACxB,QAAQ,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;oBACxB,QAAQ,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;oBACxB,QAAQ,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;oBACzB,QAAQ,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;oBACzB,CAAC,IAAI,CAAC,CAAC;iBACP;gBAED,OAAO,QAAQ,CAAC;YACjB,CAAC;YArSM,+BAAc,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;YACpC,4BAAW,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAqShC,uBAAC;SAAA,AAvSD,IAuSC;QAvSY,uBAAgB,mBAuS5B,CAAA;IACF,CAAC,EAzSY,MAAM,GAAN,YAAM,KAAN,YAAM,QAySlB;AAAD,CAAC,EAzSM,KAAK,KAAL,KAAK,QAySX"} \ No newline at end of file diff --git a/plugins/spine/src/runtimes/spine-webgl.d.ts b/plugins/spine/src/runtimes/spine-webgl.d.ts index 9c885b7af..b209496a9 100644 --- a/plugins/spine/src/runtimes/spine-webgl.d.ts +++ b/plugins/spine/src/runtimes/spine-webgl.d.ts @@ -144,6 +144,7 @@ declare module spine { getFrameCount(): number; setFrame(frameIndex: number, time: number, attachmentName: string): void; apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + setAttachment(skeleton: Skeleton, slot: Slot, attachmentName: string): void; } class DeformTimeline extends CurveTimeline { slotIndex: number; @@ -248,12 +249,15 @@ declare module spine { static emptyAnimation: Animation; static SUBSEQUENT: number; static FIRST: number; - static HOLD: number; + static HOLD_SUBSEQUENT: number; + static HOLD_FIRST: number; static HOLD_MIX: number; - static NOT_LAST: number; + static SETUP: number; + static CURRENT: number; data: AnimationStateData; tracks: TrackEntry[]; timeScale: number; + unkeyedState: number; events: Event[]; listeners: AnimationStateListener[]; queue: EventQueue; @@ -265,6 +269,8 @@ declare module spine { updateMixingFrom(to: TrackEntry, delta: number): boolean; apply(skeleton: Skeleton): boolean; applyMixingFrom(to: TrackEntry, skeleton: Skeleton, blend: MixBlend): number; + applyAttachmentTimeline(timeline: AttachmentTimeline, skeleton: Skeleton, time: number, blend: MixBlend, attachments: boolean): void; + setAttachment(skeleton: Skeleton, slot: Slot, attachmentName: string, attachments: boolean): void; applyRotateTimeline(timeline: Timeline, skeleton: Skeleton, time: number, alpha: number, blend: MixBlend, timelinesRotation: Array, i: number, firstFrame: boolean): void; queueEvents(entry: TrackEntry, animationTime: number): void; clearTracks(): void; @@ -282,7 +288,6 @@ declare module spine { disposeNext(entry: TrackEntry): void; _animationsChanged(): void; computeHold(entry: TrackEntry): void; - computeNotLast(entry: TrackEntry): void; getCurrent(trackIndex: number): TrackEntry; addListener(listener: AnimationStateListener): void; removeListener(listener: AnimationStateListener): void; @@ -384,13 +389,14 @@ declare module spine { private errors; private toLoad; private loaded; + private rawDataUris; constructor(textureLoader: (image: HTMLImageElement) => any, pathPrefix?: string); - private static downloadText; - private static downloadBinary; + private downloadText; + private downloadBinary; + setRawDataURI(path: string, data: string): void; loadBinary(path: string, success?: (path: string, binary: Uint8Array) => void, error?: (path: string, error: string) => void): void; loadText(path: string, success?: (path: string, text: string) => void, error?: (path: string, error: string) => void): void; loadTexture(path: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void; - loadTextureData(path: string, data: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void; loadTextureAtlas(path: string, success?: (path: string, atlas: TextureAtlas) => void, error?: (path: string, error: string) => void): void; get(path: string): any; remove(path: string): void; @@ -848,8 +854,9 @@ declare module spine { bone: Bone; color: Color; darkColor: Color; - private attachment; + attachment: Attachment; private attachmentTime; + attachmentState: number; deform: number[]; constructor(data: SlotData, bone: Bone); getSkeleton(): Skeleton; @@ -1361,6 +1368,7 @@ declare module spine.webgl { private texture; private boundUnit; private useMipMaps; + static DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL: boolean; constructor(context: ManagedWebGLRenderingContext | WebGLRenderingContext, image: HTMLImageElement, useMipMaps?: boolean); setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void; static validateMagFilter(magFilter: TextureFilter): TextureFilter.Nearest | TextureFilter.Linear | TextureFilter.Linear; diff --git a/plugins/spine/src/runtimes/spine-webgl.js b/plugins/spine/src/runtimes/spine-webgl.js index 04f1913a4..587d47435 100644 --- a/plugins/spine/src/runtimes/spine-webgl.js +++ b/plugins/spine/src/runtimes/spine-webgl.js @@ -2,7 +2,7 @@ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { @@ -675,17 +675,15 @@ var spine; var slot = skeleton.slots[this.slotIndex]; if (!slot.bone.active) return; - if (direction == MixDirection.mixOut && blend == MixBlend.setup) { - var attachmentName_1 = slot.data.attachmentName; - slot.setAttachment(attachmentName_1 == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName_1)); + if (direction == MixDirection.mixOut) { + if (blend == MixBlend.setup) + this.setAttachment(skeleton, slot, slot.data.attachmentName); return; } var frames = this.frames; if (time < frames[0]) { - if (blend == MixBlend.setup || blend == MixBlend.first) { - var attachmentName_2 = slot.data.attachmentName; - slot.setAttachment(attachmentName_2 == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName_2)); - } + if (blend == MixBlend.setup || blend == MixBlend.first) + this.setAttachment(skeleton, slot, slot.data.attachmentName); return; } var frameIndex = 0; @@ -697,6 +695,9 @@ var spine; skeleton.slots[this.slotIndex] .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName)); }; + AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) { + slot.attachment = attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName); + }; return AttachmentTimeline; }()); spine.AttachmentTimeline = AttachmentTimeline; @@ -798,6 +799,7 @@ var spine; case MixBlend.replace: for (var i_5 = 0; i_5 < vertexCount; i_5++) deform[i_5] += (lastVertices[i_5] - deform[i_5]) * alpha; + break; case MixBlend.add: var vertexAttachment = slotAttachment; if (vertexAttachment.bones == null) { @@ -954,8 +956,9 @@ var spine; DrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) { var drawOrder = skeleton.drawOrder; var slots = skeleton.slots; - if (direction == MixDirection.mixOut && blend == MixBlend.setup) { - spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length); + if (direction == MixDirection.mixOut) { + if (blend == MixBlend.setup) + spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length); return; } var frames = this.frames; @@ -1347,6 +1350,7 @@ var spine; function AnimationState(data) { this.tracks = new Array(); this.timeScale = 1; + this.unkeyedState = 0; this.events = new Array(); this.listeners = new Array(); this.queue = new EventQueue(this); @@ -1436,12 +1440,12 @@ var spine; var events = this.events; var tracks = this.tracks; var applied = false; - for (var i = 0, n = tracks.length; i < n; i++) { - var current = tracks[i]; + for (var i_16 = 0, n_1 = tracks.length; i_16 < n_1; i_16++) { + var current = tracks[i_16]; if (current == null || current.delay > 0) continue; applied = true; - var blend = i == 0 ? spine.MixBlend.first : current.mixBlend; + var blend = i_16 == 0 ? spine.MixBlend.first : current.mixBlend; var mix = current.alpha; if (current.mixingFrom != null) mix *= this.applyMixingFrom(current, skeleton, blend); @@ -1450,10 +1454,14 @@ var spine; var animationLast = current.animationLast, animationTime = current.getAnimationTime(); var timelineCount = current.animation.timelines.length; var timelines = current.animation.timelines; - if ((i == 0 && mix == 1) || blend == spine.MixBlend.add) { + if ((i_16 == 0 && mix == 1) || blend == spine.MixBlend.add) { for (var ii = 0; ii < timelineCount; ii++) { spine.Utils.webkit602BugfixHelper(mix, blend); - timelines[ii].apply(skeleton, animationLast, animationTime, events, mix, blend, spine.MixDirection.mixIn); + var timeline = timelines[ii]; + if (timeline instanceof spine.AttachmentTimeline) + this.applyAttachmentTimeline(timeline, skeleton, animationTime, blend, true); + else + timeline.apply(skeleton, animationLast, animationTime, events, mix, blend, spine.MixDirection.mixIn); } } else { @@ -1463,14 +1471,17 @@ var spine; spine.Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null); var timelinesRotation = current.timelinesRotation; for (var ii = 0; ii < timelineCount; ii++) { - var timeline = timelines[ii]; - var timelineBlend = (timelineMode[ii] & (AnimationState.NOT_LAST - 1)) == AnimationState.SUBSEQUENT ? blend : spine.MixBlend.setup; - if (timeline instanceof spine.RotateTimeline) { - this.applyRotateTimeline(timeline, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame); + var timeline_1 = timelines[ii]; + var timelineBlend = timelineMode[ii] == AnimationState.SUBSEQUENT ? blend : spine.MixBlend.setup; + if (timeline_1 instanceof spine.RotateTimeline) { + this.applyRotateTimeline(timeline_1, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame); + } + else if (timeline_1 instanceof spine.AttachmentTimeline) { + this.applyAttachmentTimeline(timeline_1, skeleton, animationTime, blend, true); } else { spine.Utils.webkit602BugfixHelper(mix, blend); - timeline.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, spine.MixDirection.mixIn); + timeline_1.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, spine.MixDirection.mixIn); } } } @@ -1479,6 +1490,16 @@ var spine; current.nextAnimationLast = animationTime; current.nextTrackLast = current.trackTime; } + var setupState = this.unkeyedState + AnimationState.SETUP; + var slots = skeleton.slots; + for (var i = 0, n = skeleton.slots.length; i < n; i++) { + var slot = slots[i]; + if (slot.attachmentState == setupState) { + var attachmentName = slot.data.attachmentName; + slot.attachment = (attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName)); + } + } + this.unkeyedState += 2; this.queue.drain(); return applied; }; @@ -1522,23 +1543,22 @@ var spine; var direction = spine.MixDirection.mixOut; var timelineBlend = void 0; var alpha = 0; - switch (timelineMode[i] & (AnimationState.NOT_LAST - 1)) { + switch (timelineMode[i]) { case AnimationState.SUBSEQUENT: - timelineBlend = blend; - if (!attachments && timeline instanceof spine.AttachmentTimeline) { - if ((timelineMode[i] & AnimationState.NOT_LAST) == AnimationState.NOT_LAST) - continue; - timelineBlend = spine.MixBlend.setup; - } if (!drawOrder && timeline instanceof spine.DrawOrderTimeline) continue; + timelineBlend = blend; alpha = alphaMix; break; case AnimationState.FIRST: timelineBlend = spine.MixBlend.setup; alpha = alphaMix; break; - case AnimationState.HOLD: + case AnimationState.HOLD_SUBSEQUENT: + timelineBlend = blend; + alpha = alphaHold; + break; + case AnimationState.HOLD_FIRST: timelineBlend = spine.MixBlend.setup; alpha = alphaHold; break; @@ -1551,18 +1571,12 @@ var spine; from.totalAlpha += alpha; if (timeline instanceof spine.RotateTimeline) this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame); + else if (timeline instanceof spine.AttachmentTimeline) + this.applyAttachmentTimeline(timeline, skeleton, animationTime, timelineBlend, attachments); else { spine.Utils.webkit602BugfixHelper(alpha, blend); - if (timelineBlend == spine.MixBlend.setup) { - if (timeline instanceof spine.AttachmentTimeline) { - if (attachments || (timelineMode[i] & AnimationState.NOT_LAST) == AnimationState.NOT_LAST) - direction = spine.MixDirection.mixIn; - } - else if (timeline instanceof spine.DrawOrderTimeline) { - if (drawOrder) - direction = spine.MixDirection.mixIn; - } - } + if (drawOrder && timeline instanceof spine.DrawOrderTimeline && timelineBlend == spine.MixBlend.setup) + direction = spine.MixDirection.mixIn; timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, direction); } } @@ -1574,6 +1588,31 @@ var spine; from.nextTrackLast = from.trackTime; return mix; }; + AnimationState.prototype.applyAttachmentTimeline = function (timeline, skeleton, time, blend, attachments) { + var slot = skeleton.slots[timeline.slotIndex]; + if (!slot.bone.active) + return; + var frames = timeline.frames; + if (time < frames[0]) { + if (blend == spine.MixBlend.setup || blend == spine.MixBlend.first) + this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments); + } + else { + var frameIndex; + if (time >= frames[frames.length - 1]) + frameIndex = frames.length - 1; + else + frameIndex = spine.Animation.binarySearch(frames, time) - 1; + this.setAttachment(skeleton, slot, timeline.attachmentNames[frameIndex], attachments); + } + if (slot.attachmentState <= this.unkeyedState) + slot.attachmentState = this.unkeyedState + AnimationState.SETUP; + }; + AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) { + slot.attachment = attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName); + if (attachments) + slot.attachmentState = this.unkeyedState + AnimationState.CURRENT; + }; AnimationState.prototype.applyRotateTimeline = function (timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) { if (firstFrame) timelinesRotation[i] = 0; @@ -1836,6 +1875,7 @@ var spine; entry.interruptAlpha = 1; entry.mixTime = 0; entry.mixDuration = last == null ? 0 : this.data.getMix(last.animation, animation); + entry.mixBlend = spine.MixBlend.replace; return entry; }; AnimationState.prototype.disposeNext = function (entry) { @@ -1861,14 +1901,6 @@ var spine; entry = entry.mixingTo; } while (entry != null); } - this.propertyIDs.clear(); - for (var i = this.tracks.length - 1; i >= 0; i--) { - var entry = this.tracks[i]; - while (entry != null) { - this.computeNotLast(entry); - entry = entry.mixingFrom; - } - } }; AnimationState.prototype.computeHold = function (entry) { var to = entry.mixingTo; @@ -1880,8 +1912,7 @@ var spine; var propertyIDs = this.propertyIDs; if (to != null && to.holdPrevious) { for (var i = 0; i < timelinesCount; i++) { - propertyIDs.add(timelines[i].getPropertyId()); - timelineMode[i] = AnimationState.HOLD; + timelineMode[i] = propertyIDs.add(timelines[i].getPropertyId()) ? AnimationState.HOLD_FIRST : AnimationState.HOLD_SUBSEQUENT; } return; } @@ -1905,20 +1936,7 @@ var spine; } break; } - timelineMode[i] = AnimationState.HOLD; - } - } - }; - AnimationState.prototype.computeNotLast = function (entry) { - var timelines = entry.animation.timelines; - var timelinesCount = entry.animation.timelines.length; - var timelineMode = entry.timelineMode; - var propertyIDs = this.propertyIDs; - for (var i = 0; i < timelinesCount; i++) { - if (timelines[i] instanceof spine.AttachmentTimeline) { - var timeline = timelines[i]; - if (!propertyIDs.add(timeline.slotIndex)) - timelineMode[i] |= AnimationState.NOT_LAST; + timelineMode[i] = AnimationState.HOLD_FIRST; } } }; @@ -1946,9 +1964,11 @@ var spine; AnimationState.emptyAnimation = new spine.Animation("", [], 0); AnimationState.SUBSEQUENT = 0; AnimationState.FIRST = 1; - AnimationState.HOLD = 2; - AnimationState.HOLD_MIX = 3; - AnimationState.NOT_LAST = 4; + AnimationState.HOLD_SUBSEQUENT = 2; + AnimationState.HOLD_FIRST = 3; + AnimationState.HOLD_MIX = 4; + AnimationState.SETUP = 1; + AnimationState.CURRENT = 2; return AnimationState; }()); spine.AnimationState = AnimationState; @@ -2161,11 +2181,15 @@ var spine; this.errors = {}; this.toLoad = 0; this.loaded = 0; + this.rawDataUris = {}; this.textureLoader = textureLoader; this.pathPrefix = pathPrefix; } - AssetManager.downloadText = function (url, success, error) { + AssetManager.prototype.downloadText = function (url, success, error) { var request = new XMLHttpRequest(); + request.overrideMimeType("text/html"); + if (this.rawDataUris[url]) + url = this.rawDataUris[url]; request.open("GET", url, true); request.onload = function () { if (request.status == 200) { @@ -2180,8 +2204,10 @@ var spine; }; request.send(); }; - AssetManager.downloadBinary = function (url, success, error) { + AssetManager.prototype.downloadBinary = function (url, success, error) { var request = new XMLHttpRequest(); + if (this.rawDataUris[url]) + url = this.rawDataUris[url]; request.open("GET", url, true); request.responseType = "arraybuffer"; request.onload = function () { @@ -2197,13 +2223,16 @@ var spine; }; request.send(); }; + AssetManager.prototype.setRawDataURI = function (path, data) { + this.rawDataUris[this.pathPrefix + path] = data; + }; AssetManager.prototype.loadBinary = function (path, success, error) { var _this = this; if (success === void 0) { success = null; } if (error === void 0) { error = null; } path = this.pathPrefix + path; this.toLoad++; - AssetManager.downloadBinary(path, function (data) { + this.downloadBinary(path, function (data) { _this.assets[path] = data; if (success) success(path, data); @@ -2223,7 +2252,7 @@ var spine; if (error === void 0) { error = null; } path = this.pathPrefix + path; this.toLoad++; - AssetManager.downloadText(path, function (data) { + this.downloadText(path, function (data) { _this.assets[path] = data; if (success) success(path, data); @@ -2242,12 +2271,13 @@ var spine; if (success === void 0) { success = null; } if (error === void 0) { error = null; } path = this.pathPrefix + path; + var storagePath = path; this.toLoad++; var img = new Image(); img.crossOrigin = "anonymous"; img.onload = function (ev) { var texture = _this.textureLoader(img); - _this.assets[path] = texture; + _this.assets[storagePath] = texture; _this.toLoad--; _this.loaded++; if (success) @@ -2260,32 +2290,10 @@ var spine; if (error) error(path, "Couldn't load image " + path); }; + if (this.rawDataUris[path]) + path = this.rawDataUris[path]; img.src = path; }; - AssetManager.prototype.loadTextureData = function (path, data, success, error) { - var _this = this; - if (success === void 0) { success = null; } - if (error === void 0) { error = null; } - path = this.pathPrefix + path; - this.toLoad++; - var img = new Image(); - img.onload = function (ev) { - var texture = _this.textureLoader(img); - _this.assets[path] = texture; - _this.toLoad--; - _this.loaded++; - if (success) - success(path, img); - }; - img.onerror = function (ev) { - _this.errors[path] = "Couldn't load image " + path; - _this.toLoad--; - _this.loaded++; - if (error) - error(path, "Couldn't load image " + path); - }; - img.src = data; - }; AssetManager.prototype.loadTextureAtlas = function (path, success, error) { var _this = this; if (success === void 0) { success = null; } @@ -2293,12 +2301,12 @@ var spine; var parent = path.lastIndexOf("/") >= 0 ? path.substring(0, path.lastIndexOf("/")) : ""; path = this.pathPrefix + path; this.toLoad++; - AssetManager.downloadText(path, function (atlasData) { + this.downloadText(path, function (atlasData) { var pagesLoaded = { count: 0 }; var atlasPages = new Array(); try { var atlas = new spine.TextureAtlas(atlasData, function (path) { - atlasPages.push(parent + "/" + path); + atlasPages.push(parent == "" ? path : parent + "/" + path); var image = document.createElement("img"); image.width = 16; image.height = 16; @@ -2322,7 +2330,7 @@ var spine; if (!pageLoadError) { try { var atlas = new spine.TextureAtlas(atlasData, function (path) { - return _this.get(parent + "/" + path); + return _this.get(parent == "" ? path : parent + "/" + path); }); _this.assets[path] = atlas; if (success) @@ -2560,6 +2568,8 @@ var spine; var prx = 0; if (s > 0.0001) { s = Math.abs(pa * pd - pb * pc) / s; + pa /= this.skeleton.scaleX; + pc /= this.skeleton.scaleY; pb = pc * s; pd = pa * s; prx = Math.atan2(pc, pa) * spine.MathUtils.radDeg; @@ -2830,10 +2840,27 @@ var spine; if (!bone.appliedValid) bone.updateAppliedTransform(); var p = bone.parent; - var id = 1 / (p.a * p.d - p.b * p.c); - var x = targetX - p.worldX, y = targetY - p.worldY; - var tx = (x * p.d - y * p.b) * id - bone.ax, ty = (y * p.a - x * p.c) * id - bone.ay; - var rotationIK = Math.atan2(ty, tx) * spine.MathUtils.radDeg - bone.ashearX - bone.arotation; + var pa = p.a, pb = p.b, pc = p.c, pd = p.d; + var rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0; + switch (bone.data.transformMode) { + case spine.TransformMode.OnlyTranslation: + tx = targetX - bone.worldX; + ty = targetY - bone.worldY; + break; + case spine.TransformMode.NoRotationOrReflection: + var s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc); + var sa = pa / bone.skeleton.scaleX; + var sc = pc / bone.skeleton.scaleY; + pb = -sc * s * bone.skeleton.scaleX; + pd = sa * s * bone.skeleton.scaleY; + rotationIK += Math.atan2(sc, sa) * spine.MathUtils.radDeg; + default: + var x = targetX - p.worldX, y = targetY - p.worldY; + var d = pa * pd - pb * pc; + tx = (x * pd - y * pb) / d - bone.ax; + ty = (y * pa - x * pc) / d - bone.ay; + } + rotationIK += Math.atan2(ty, tx) * spine.MathUtils.radDeg; if (bone.ascaleX < 0) rotationIK += 180; if (rotationIK > 180) @@ -2842,6 +2869,12 @@ var spine; rotationIK += 360; var sx = bone.ascaleX, sy = bone.ascaleY; if (compress || stretch) { + switch (bone.data.transformMode) { + case spine.TransformMode.NoScale: + case spine.TransformMode.NoScaleOrReflection: + tx = targetX - bone.worldX; + ty = targetY - bone.worldY; + } var b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty); if ((compress && dd < b) || (stretch && dd > b) && b > 0.0001) { var s = (dd / b - 1) * alpha + 1; @@ -3500,6 +3533,7 @@ var spine; if (!this.queueAsset(clientId, null, path)) return; var request = new XMLHttpRequest(); + request.overrideMimeType("text/html"); request.onreadystatechange = function () { if (request.readyState == XMLHttpRequest.DONE) { if (request.status >= 200 && request.status < 300) { @@ -3519,6 +3553,7 @@ var spine; if (!this.queueAsset(clientId, null, path)) return; var request = new XMLHttpRequest(); + request.overrideMimeType("text/html"); request.onreadystatechange = function () { if (request.readyState == XMLHttpRequest.DONE) { if (request.status >= 200 && request.status < 300) { @@ -3538,7 +3573,6 @@ var spine; if (!this.queueAsset(clientId, textureLoader, path)) return; var img = new Image(); - img.src = path; img.crossOrigin = "anonymous"; img.onload = function (ev) { _this.rawAssets[path] = img; @@ -3546,6 +3580,7 @@ var spine; img.onerror = function (ev) { _this.errors[path] = "Couldn't load image " + path; }; + img.src = path; }; SharedAssetManager.prototype.get = function (clientId, path) { path = this.pathPrefix + path; @@ -4071,6 +4106,8 @@ var spine; var input = new BinaryInput(binary); skeletonData.hash = input.readString(); skeletonData.version = input.readString(); + if ("3.8.75" == skeletonData.version) + throw new Error("Unsupported skeleton data, please export with a newer version of Spine."); skeletonData.x = input.readFloat(); skeletonData.y = input.readFloat(); skeletonData.width = input.readFloat(); @@ -5059,7 +5096,7 @@ var spine; var clippingPolygon = this.clippingPolygon; SkeletonClipping.makeClockwise(clippingPolygon); var clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon)); - for (var i = 0, n_1 = clippingPolygons.length; i < n_1; i++) { + for (var i = 0, n_2 = clippingPolygons.length; i < n_2; i++) { var polygon = clippingPolygons[i]; SkeletonClipping.makeClockwise(polygon); polygon.push(polygon[0]); @@ -5481,6 +5518,8 @@ var spine; if (skeletonMap != null) { skeletonData.hash = skeletonMap.hash; skeletonData.version = skeletonMap.spine; + if ("3.8.75" == skeletonData.version) + throw new Error("Unsupported skeleton data, please export with a newer version of Spine."); skeletonData.x = skeletonMap.x; skeletonData.y = skeletonMap.y; skeletonData.width = skeletonMap.width; @@ -6158,7 +6197,7 @@ var spine; skeletonData.animations.push(new spine.Animation(name, timelines, duration)); }; SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) { - if (!map.curve) + if (!map.hasOwnProperty("curve")) return; if (map.curve == "stepped") timeline.setStepped(frameIndex); @@ -7473,9 +7512,7 @@ var spine; }; Pool.prototype.freeAll = function (items) { for (var i = 0; i < items.length; i++) { - if (items[i].reset) - items[i].reset(); - this.items[i] = items[i]; + this.free(items[i]); } }; Pool.prototype.clear = function () { @@ -8017,7 +8054,7 @@ var spine; worldVertices[offset + 1] = offsetX * c + offsetY * d + y; }; RegionAttachment.prototype.copy = function () { - var copy = new RegionAttachment(name); + var copy = new RegionAttachment(this.name); copy.region = this.region; copy.rendererObject = this.rendererObject; copy.path = this.path; @@ -8253,6 +8290,8 @@ var spine; this.texture = this.context.gl.createTexture(); } this.bind(); + if (GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL) + gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false); gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this._image); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, useMipMaps ? gl.LINEAR_MIPMAP_LINEAR : gl.LINEAR); @@ -8282,6 +8321,7 @@ var spine; var gl = this.context.gl; gl.deleteTexture(this.texture); }; + GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL = false; return GLTexture; }(spine.Texture)); webgl.GLTexture = GLTexture; @@ -10011,11 +10051,11 @@ var spine; var nn = clip.worldVerticesLength; var world = this.temp = spine.Utils.setArraySize(this.temp, nn, 0); clip.computeWorldVertices(slot, 0, nn, world, 0, 2); - for (var i_16 = 0, n_2 = world.length; i_16 < n_2; i_16 += 2) { - var x = world[i_16]; - var y = world[i_16 + 1]; - var x2 = world[(i_16 + 2) % world.length]; - var y2 = world[(i_16 + 3) % world.length]; + for (var i_17 = 0, n_3 = world.length; i_17 < n_3; i_17 += 2) { + var x = world[i_17]; + var y = world[i_17 + 1]; + var x2 = world[(i_17 + 2) % world.length]; + var y2 = world[(i_17 + 3) % world.length]; shapes.line(x, y, x2, y2); } } @@ -10176,7 +10216,7 @@ var spine; var vertexEffect = this.vertexEffect; var verts = clippedVertices; if (!twoColorTint) { - for (var v = 0, n_3 = clippedVertices.length; v < n_3; v += vertexSize) { + for (var v = 0, n_4 = clippedVertices.length; v < n_4; v += vertexSize) { tempPos.x = verts[v]; tempPos.y = verts[v + 1]; tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]); @@ -10195,7 +10235,7 @@ var spine; } } else { - for (var v = 0, n_4 = clippedVertices.length; v < n_4; v += vertexSize) { + for (var v = 0, n_5 = clippedVertices.length; v < n_5; v += vertexSize) { tempPos.x = verts[v]; tempPos.y = verts[v + 1]; tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]); @@ -10225,7 +10265,7 @@ var spine; if (this.vertexEffect != null) { var vertexEffect = this.vertexEffect; if (!twoColorTint) { - for (var v = 0, u = 0, n_5 = renderable.numFloats; v < n_5; v += vertexSize, u += 2) { + for (var v = 0, u = 0, n_6 = renderable.numFloats; v < n_6; v += vertexSize, u += 2) { tempPos.x = verts[v]; tempPos.y = verts[v + 1]; tempUv.x = uvs[u]; @@ -10244,7 +10284,7 @@ var spine; } } else { - for (var v = 0, u = 0, n_6 = renderable.numFloats; v < n_6; v += vertexSize, u += 2) { + for (var v = 0, u = 0, n_7 = renderable.numFloats; v < n_7; v += vertexSize, u += 2) { tempPos.x = verts[v]; tempPos.y = verts[v + 1]; tempUv.x = uvs[u]; @@ -10269,7 +10309,7 @@ var spine; } else { if (!twoColorTint) { - for (var v = 2, u = 0, n_7 = renderable.numFloats; v < n_7; v += vertexSize, u += 2) { + for (var v = 2, u = 0, n_8 = renderable.numFloats; v < n_8; v += vertexSize, u += 2) { verts[v] = finalColor.r; verts[v + 1] = finalColor.g; verts[v + 2] = finalColor.b; @@ -10279,7 +10319,7 @@ var spine; } } else { - for (var v = 2, u = 0, n_8 = renderable.numFloats; v < n_8; v += vertexSize, u += 2) { + for (var v = 2, u = 0, n_9 = renderable.numFloats; v < n_9; v += vertexSize, u += 2) { verts[v] = finalColor.r; verts[v + 1] = finalColor.g; verts[v + 2] = finalColor.b; diff --git a/plugins/spine/src/runtimes/spine-webgl.js.map b/plugins/spine/src/runtimes/spine-webgl.js.map index d6f74b53d..75abe5be3 100644 --- a/plugins/spine/src/runtimes/spine-webgl.js.map +++ b/plugins/spine/src/runtimes/spine-webgl.js.map @@ -1 +1 @@ -{"version":3,"file":"spine-webgl.js","sourceRoot":"","sources":["../../spine-runtimes/spine-ts/core/src/Animation.ts","../../spine-runtimes/spine-ts/core/src/AnimationState.ts","../../spine-runtimes/spine-ts/core/src/AnimationStateData.ts","../../spine-runtimes/spine-ts/core/src/AssetManager.ts","../../spine-runtimes/spine-ts/core/src/AtlasAttachmentLoader.ts","../../spine-runtimes/spine-ts/core/src/BlendMode.ts","../../spine-runtimes/spine-ts/core/src/Bone.ts","../../spine-runtimes/spine-ts/core/src/BoneData.ts","../../spine-runtimes/spine-ts/core/src/ConstraintData.ts","../../spine-runtimes/spine-ts/core/src/Event.ts","../../spine-runtimes/spine-ts/core/src/EventData.ts","../../spine-runtimes/spine-ts/core/src/IkConstraint.ts","../../spine-runtimes/spine-ts/core/src/IkConstraintData.ts","../../spine-runtimes/spine-ts/core/src/PathConstraint.ts","../../spine-runtimes/spine-ts/core/src/PathConstraintData.ts","../../spine-runtimes/spine-ts/core/src/SharedAssetManager.ts","../../spine-runtimes/spine-ts/core/src/Skeleton.ts","../../spine-runtimes/spine-ts/core/src/SkeletonBinary.ts","../../spine-runtimes/spine-ts/core/src/SkeletonBounds.ts","../../spine-runtimes/spine-ts/core/src/SkeletonClipping.ts","../../spine-runtimes/spine-ts/core/src/SkeletonData.ts","../../spine-runtimes/spine-ts/core/src/SkeletonJson.ts","../../spine-runtimes/spine-ts/core/src/Skin.ts","../../spine-runtimes/spine-ts/core/src/Slot.ts","../../spine-runtimes/spine-ts/core/src/SlotData.ts","../../spine-runtimes/spine-ts/core/src/Texture.ts","../../spine-runtimes/spine-ts/core/src/TextureAtlas.ts","../../spine-runtimes/spine-ts/core/src/TransformConstraint.ts","../../spine-runtimes/spine-ts/core/src/TransformConstraintData.ts","../../spine-runtimes/spine-ts/core/src/Triangulator.ts","../../spine-runtimes/spine-ts/core/src/Updatable.ts","../../spine-runtimes/spine-ts/core/src/Utils.ts","../../spine-runtimes/spine-ts/core/src/VertexEffect.ts","../../spine-runtimes/spine-ts/core/src/polyfills.ts","../../spine-runtimes/spine-ts/core/src/attachments/Attachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/AttachmentLoader.ts","../../spine-runtimes/spine-ts/core/src/attachments/AttachmentType.ts","../../spine-runtimes/spine-ts/core/src/attachments/BoundingBoxAttachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/ClippingAttachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/MeshAttachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/PathAttachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/PointAttachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/RegionAttachment.ts","../../spine-runtimes/spine-ts/core/src/vertexeffects/JitterEffect.ts","../../spine-runtimes/spine-ts/core/src/vertexeffects/SwirlEffect.ts","../../spine-runtimes/spine-ts/webgl/src/AssetManager.ts","../../spine-runtimes/spine-ts/webgl/src/Camera.ts","../../spine-runtimes/spine-ts/webgl/src/GLTexture.ts","../../spine-runtimes/spine-ts/webgl/src/Matrix4.ts","../../spine-runtimes/spine-ts/webgl/src/Mesh.ts","../../spine-runtimes/spine-ts/webgl/src/PolygonBatcher.ts","../../spine-runtimes/spine-ts/webgl/src/SceneRenderer.ts","../../spine-runtimes/spine-ts/webgl/src/Shader.ts","../../spine-runtimes/spine-ts/webgl/src/ShapeRenderer.ts","../../spine-runtimes/spine-ts/webgl/src/SkeletonDebugRenderer.ts","../../spine-runtimes/spine-ts/webgl/src/SkeletonRenderer.ts","../../spine-runtimes/spine-ts/webgl/src/Vector3.ts","../../spine-runtimes/spine-ts/webgl/src/WebGL.ts"],"names":[],"mappings":";;;;;;;;;;;;;AA6BA,IAAO,KAAK,CAo/CX;AAp/CD,WAAO,KAAK;IAGX;QASC,mBAAa,IAAY,EAAE,SAA0B,EAAE,QAAgB;YACtE,IAAI,IAAI,IAAI,IAAI;gBAAE,MAAM,IAAI,KAAK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OAAO,kBAAkB,CAAA,CAAC,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAC,CAAC,uBAAuB,CAAC,SAAS,CAAC;oBACpH,KAAK,MAAA,SAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,uBAAuB,CAAC,SAAS,CAAC;oBAClE,KAAK,MAAA,SAAS,CAAC,MAAM,CAAC,CAAC,OAAO,uBAAuB,CAAC,GAAG,CAAC;oBAC1D,OAAO,CAAC,CAAC,MAAM,IAAI,KAAK,CAAC,sBAAsB,GAAG,SAAS,CAAC,CAAC;iBAC7D;YACF,CAAC;YA5BM,4BAAI,GAAG,CAAC,CAAC;YACT,2BAAG,GAAG,CAAC,CAAC;YACR,iCAAS,GAAG,MAAM,CAAC;YACnB,2CAAmB,GAAG,MAAM,CAAC;YAC7B,iCAAS,GAAG,MAAM,CAAC;YACnB,2CAAmB,GAAG,MAAM,CAAC;YAC7B,iCAAS,GAAG,MAAM,CAAC;YACnB,2CAAmB,GAAG,MAAM,CAAC;YAC7B,iCAAS,GAAG,MAAM,CAAA;YAqB1B,8BAAC;SAAA,AA9BD,IA8BC;QA9BY,6BAAuB,0BA8BnC,CAAA;IACF,CAAC,EAtEY,KAAK,GAAL,WAAK,KAAL,WAAK,QAsEjB;AAAD,CAAC,EAtEM,KAAK,KAAL,KAAK,QAsEX"} \ No newline at end of file +{"version":3,"file":"spine-webgl.js","sourceRoot":"","sources":["../../spine-runtimes/spine-ts/core/src/Animation.ts","../../spine-runtimes/spine-ts/core/src/AnimationState.ts","../../spine-runtimes/spine-ts/core/src/AnimationStateData.ts","../../spine-runtimes/spine-ts/core/src/AssetManager.ts","../../spine-runtimes/spine-ts/core/src/AtlasAttachmentLoader.ts","../../spine-runtimes/spine-ts/core/src/BlendMode.ts","../../spine-runtimes/spine-ts/core/src/Bone.ts","../../spine-runtimes/spine-ts/core/src/BoneData.ts","../../spine-runtimes/spine-ts/core/src/ConstraintData.ts","../../spine-runtimes/spine-ts/core/src/Event.ts","../../spine-runtimes/spine-ts/core/src/EventData.ts","../../spine-runtimes/spine-ts/core/src/IkConstraint.ts","../../spine-runtimes/spine-ts/core/src/IkConstraintData.ts","../../spine-runtimes/spine-ts/core/src/PathConstraint.ts","../../spine-runtimes/spine-ts/core/src/PathConstraintData.ts","../../spine-runtimes/spine-ts/core/src/SharedAssetManager.ts","../../spine-runtimes/spine-ts/core/src/Skeleton.ts","../../spine-runtimes/spine-ts/core/src/SkeletonBinary.ts","../../spine-runtimes/spine-ts/core/src/SkeletonBounds.ts","../../spine-runtimes/spine-ts/core/src/SkeletonClipping.ts","../../spine-runtimes/spine-ts/core/src/SkeletonData.ts","../../spine-runtimes/spine-ts/core/src/SkeletonJson.ts","../../spine-runtimes/spine-ts/core/src/Skin.ts","../../spine-runtimes/spine-ts/core/src/Slot.ts","../../spine-runtimes/spine-ts/core/src/SlotData.ts","../../spine-runtimes/spine-ts/core/src/Texture.ts","../../spine-runtimes/spine-ts/core/src/TextureAtlas.ts","../../spine-runtimes/spine-ts/core/src/TransformConstraint.ts","../../spine-runtimes/spine-ts/core/src/TransformConstraintData.ts","../../spine-runtimes/spine-ts/core/src/Triangulator.ts","../../spine-runtimes/spine-ts/core/src/Updatable.ts","../../spine-runtimes/spine-ts/core/src/Utils.ts","../../spine-runtimes/spine-ts/core/src/VertexEffect.ts","../../spine-runtimes/spine-ts/core/src/polyfills.ts","../../spine-runtimes/spine-ts/core/src/attachments/Attachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/AttachmentLoader.ts","../../spine-runtimes/spine-ts/core/src/attachments/AttachmentType.ts","../../spine-runtimes/spine-ts/core/src/attachments/BoundingBoxAttachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/ClippingAttachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/MeshAttachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/PathAttachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/PointAttachment.ts","../../spine-runtimes/spine-ts/core/src/attachments/RegionAttachment.ts","../../spine-runtimes/spine-ts/core/src/vertexeffects/JitterEffect.ts","../../spine-runtimes/spine-ts/core/src/vertexeffects/SwirlEffect.ts","../../spine-runtimes/spine-ts/webgl/src/AssetManager.ts","../../spine-runtimes/spine-ts/webgl/src/Camera.ts","../../spine-runtimes/spine-ts/webgl/src/GLTexture.ts","../../spine-runtimes/spine-ts/webgl/src/Matrix4.ts","../../spine-runtimes/spine-ts/webgl/src/Mesh.ts","../../spine-runtimes/spine-ts/webgl/src/PolygonBatcher.ts","../../spine-runtimes/spine-ts/webgl/src/SceneRenderer.ts","../../spine-runtimes/spine-ts/webgl/src/Shader.ts","../../spine-runtimes/spine-ts/webgl/src/ShapeRenderer.ts","../../spine-runtimes/spine-ts/webgl/src/SkeletonDebugRenderer.ts","../../spine-runtimes/spine-ts/webgl/src/SkeletonRenderer.ts","../../spine-runtimes/spine-ts/webgl/src/Vector3.ts","../../spine-runtimes/spine-ts/webgl/src/WebGL.ts"],"names":[],"mappings":";;;;;;;;;;;;;AA6BA,IAAO,KAAK,CAs/CX;AAt/CD,WAAO,KAAK;IAGX;QASC,mBAAa,IAAY,EAAE,SAA0B,EAAE,QAAgB;YACtE,IAAI,IAAI,IAAI,IAAI;gBAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;YAC1D,IAAI,SAAS,IAAI,IAAI;gBAAE,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;YACpE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;YAC3B,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;YACtB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE;gBACxC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC,GAAG,IAAI,CAAC;YACvD,IAAI,CAAC,QAAQ,GAAG,QAAQ,C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AC;oBAClE,KAAK,MAAA,SAAS,CAAC,MAAM,CAAC,CAAC,OAAO,uBAAuB,CAAC,GAAG,CAAC;oBAC1D,OAAO,CAAC,CAAC,MAAM,IAAI,KAAK,CAAC,sBAAsB,GAAG,SAAS,CAAC,CAAC;iBAC7D;YACF,CAAC;YA5BM,4BAAI,GAAG,CAAC,CAAC;YACT,2BAAG,GAAG,CAAC,CAAC;YACR,iCAAS,GAAG,MAAM,CAAC;YACnB,2CAAmB,GAAG,MAAM,CAAC;YAC7B,iCAAS,GAAG,MAAM,CAAC;YACnB,2CAAmB,GAAG,MAAM,CAAC;YAC7B,iCAAS,GAAG,MAAM,CAAC;YACnB,2CAAmB,GAAG,MAAM,CAAC;YAC7B,iCAAS,GAAG,MAAM,CAAA;YAqB1B,8BAAC;SAAA,AA9BD,IA8BC;QA9BY,6BAAuB,0BA8BnC,CAAA;IACF,CAAC,EAtEY,KAAK,GAAL,WAAK,KAAL,WAAK,QAsEjB;AAAD,CAAC,EAtEM,KAAK,KAAL,KAAK,QAsEX"} \ No newline at end of file From 2008035ca15d6c268bb5a6d3d43585b1aaec9bc5 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 25 Aug 2020 13:43:08 +0100 Subject: [PATCH 089/241] New Spine 3.8.95 plugin build --- plugins/spine/dist/SpineCanvasPlugin.js | 3325 +++++++++++------- plugins/spine/dist/SpineCanvasPlugin.min.js | 2 +- plugins/spine/dist/SpinePlugin.js | 3446 ++++++++++++------- plugins/spine/dist/SpinePlugin.min.js | 2 +- plugins/spine/dist/SpinePluginDebug.js | 2104 +++++++---- plugins/spine/dist/SpinePluginDebug.js.map | 2 +- plugins/spine/dist/SpineWebGLPlugin.js | 3358 +++++++++++------- plugins/spine/dist/SpineWebGLPlugin.min.js | 2 +- 8 files changed, 7877 insertions(+), 4364 deletions(-) diff --git a/plugins/spine/dist/SpineCanvasPlugin.js b/plugins/spine/dist/SpineCanvasPlugin.js index 945e9453e..e2509e710 100644 --- a/plugins/spine/dist/SpineCanvasPlugin.js +++ b/plugins/spine/dist/SpineCanvasPlugin.js @@ -82,7 +82,7 @@ window["SpinePlugin"] = /******/ /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 32); +/******/ return __webpack_require__(__webpack_require__.s = 35); /******/ }) /************************************************************************/ /******/ ([ @@ -91,7 +91,7 @@ window["SpinePlugin"] = /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -345,7 +345,7 @@ module.exports = Class; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -404,7 +404,27 @@ var MATH_CONST = { * @type {Phaser.Math.RandomDataGenerator} * @since 3.0.0 */ - RND: null + RND: null, + + /** + * The minimum safe integer this browser supports. + * We use a const for backward compatibility with Internet Explorer. + * + * @name Phaser.Math.MIN_SAFE_INTEGER + * @type {number} + * @since 3.21.0 + */ + MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991, + + /** + * The maximum safe integer this browser supports. + * We use a const for backward compatibility with Internet Explorer. + * + * @name Phaser.Math.MAX_SAFE_INTEGER + * @type {number} + * @since 3.21.0 + */ + MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991 }; @@ -417,7 +437,7 @@ module.exports = MATH_CONST; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -469,86 +489,11 @@ module.exports = IsPlainObject; /***/ }), /* 3 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Finds the key within the top level of the {@link source} object, or returns {@link defaultValue} - * - * @function Phaser.Utils.Objects.GetFastValue - * @since 3.0.0 - * - * @param {object} source - The object to search - * @param {string} key - The key for the property on source. Must exist at the top level of the source object (no periods) - * @param {*} [defaultValue] - The default value to use if the key does not exist. - * - * @return {*} The value if found; otherwise, defaultValue (null if none provided) - */ -var GetFastValue = function (source, key, defaultValue) -{ - var t = typeof(source); - - if (!source || t === 'number' || t === 'string') - { - return defaultValue; - } - else if (source.hasOwnProperty(key) && source[key] !== undefined) - { - return source[key]; - } - else - { - return defaultValue; - } -}; - -module.exports = GetFastValue; - - -/***/ }), -/* 4 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Wrap the given `value` between `min` and `max. - * - * @function Phaser.Math.Wrap - * @since 3.0.0 - * - * @param {number} value - The value to wrap. - * @param {number} min - The minimum value. - * @param {number} max - The maximum value. - * - * @return {number} The wrapped value. - */ -var Wrap = function (value, min, max) -{ - var range = max - min; - - return (min + ((((value - min) % range) + range) % range)); -}; - -module.exports = Wrap; - - -/***/ }), -/* 5 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -556,6 +501,7 @@ module.exports = Wrap; // and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl var Class = __webpack_require__(0); +var FuzzyEqual = __webpack_require__(20); /** * @classdesc @@ -735,6 +681,22 @@ var Vector2 = new Class({ return ((this.x === v.x) && (this.y === v.y)); }, + /** + * Check whether this Vector is approximately equal to a given Vector. + * + * @method Phaser.Math.Vector2#fuzzyEquals + * @since 3.23.0 + * + * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector. + * @param {number} [epsilon=0.0001] - The tolerance value. + * + * @return {boolean} Whether both absolute differences of the x and y components are smaller than `epsilon`. + */ + fuzzyEquals: function (v, epsilon) + { + return (FuzzyEqual(this.x, v.x, epsilon) && FuzzyEqual(this.y, v.y, epsilon)); + }, + /** * Calculate the angle between this Vector and the positive x-axis, in radians. * @@ -757,6 +719,21 @@ var Vector2 = new Class({ return angle; }, + /** + * Set the angle of this Vector. + * + * @method Phaser.Math.Vector2#setAngle + * @since 3.23.0 + * + * @param {number} angle - The angle, in radians. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + setAngle: function (angle) + { + return this.setToPolar(angle, this.length()); + }, + /** * Add a given Vector to this Vector. Addition is component-wise. * @@ -927,6 +904,21 @@ var Vector2 = new Class({ return Math.sqrt(x * x + y * y); }, + /** + * Set the length (or magnitude) of this Vector. + * + * @method Phaser.Math.Vector2#setLength + * @since 3.23.0 + * + * @param {number} length + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + setLength: function (length) + { + return this.normalize().scale(length); + }, + /** * Calculate the length of this Vector squared. * @@ -971,7 +963,7 @@ var Vector2 = new Class({ }, /** - * Right-hand normalize (make unit length) this Vector. + * Rotate this Vector to its perpendicular, in the positive direction. * * @method Phaser.Math.Vector2#normalizeRightHand * @since 3.0.0 @@ -988,6 +980,24 @@ var Vector2 = new Class({ return this; }, + /** + * Rotate this Vector to its perpendicular, in the negative direction. + * + * @method Phaser.Math.Vector2#normalizeLeftHand + * @since 3.23.0 + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + normalizeLeftHand: function () + { + var x = this.x; + + this.x = this.y; + this.y = x * -1; + + return this; + }, + /** * Calculate the dot product of this Vector and the given Vector. * @@ -1102,13 +1112,85 @@ var Vector2 = new Class({ this.y = 0; return this; + }, + + /** + * Limit the length (or magnitude) of this Vector. + * + * @method Phaser.Math.Vector2#limit + * @since 3.23.0 + * + * @param {number} max - The maximum length. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + limit: function (max) + { + var len = this.length(); + + if (len && len > max) + { + this.scale(max / len); + } + + return this; + }, + + /** + * Reflect this Vector off a line defined by a normal. + * + * @method Phaser.Math.Vector2#reflect + * @since 3.23.0 + * + * @param {Phaser.Math.Vector2} normal - A vector perpendicular to the line. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + reflect: function (normal) + { + normal = normal.clone().normalize(); + + return this.subtract(normal.scale(2 * this.dot(normal))); + }, + + /** + * Reflect this Vector across another. + * + * @method Phaser.Math.Vector2#mirror + * @since 3.23.0 + * + * @param {Phaser.Math.Vector2} axis - A vector to reflect across. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + mirror: function (axis) + { + return this.reflect(axis).negate(); + }, + + /** + * Rotate this Vector by an angle amount. + * + * @method Phaser.Math.Vector2#rotate + * @since 3.23.0 + * + * @param {number} delta - The angle to rotate by, in radians. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + rotate: function (delta) + { + var cos = Math.cos(delta); + var sin = Math.sin(delta); + + return this.set(cos * this.x - sin * this.y, sin * this.x + cos * this.y); } }); /** * A static zero Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -1120,7 +1202,7 @@ Vector2.ZERO = new Vector2(); /** * A static right Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -1132,7 +1214,7 @@ Vector2.RIGHT = new Vector2(1, 0); /** * A static left Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -1144,7 +1226,7 @@ Vector2.LEFT = new Vector2(-1, 0); /** * A static up Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -1156,7 +1238,7 @@ Vector2.UP = new Vector2(0, -1); /** * A static down Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -1168,7 +1250,7 @@ Vector2.DOWN = new Vector2(0, 1); /** * A static one Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -1181,13 +1263,88 @@ Vector2.ONE = new Vector2(1, 1); module.exports = Vector2; +/***/ }), +/* 4 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Finds the key within the top level of the {@link source} object, or returns {@link defaultValue} + * + * @function Phaser.Utils.Objects.GetFastValue + * @since 3.0.0 + * + * @param {object} source - The object to search + * @param {string} key - The key for the property on source. Must exist at the top level of the source object (no periods) + * @param {*} [defaultValue] - The default value to use if the key does not exist. + * + * @return {*} The value if found; otherwise, defaultValue (null if none provided) + */ +var GetFastValue = function (source, key, defaultValue) +{ + var t = typeof(source); + + if (!source || t === 'number' || t === 'string') + { + return defaultValue; + } + else if (source.hasOwnProperty(key) && source[key] !== undefined) + { + return source[key]; + } + else + { + return defaultValue; + } +}; + +module.exports = GetFastValue; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Wrap the given `value` between `min` and `max. + * + * @function Phaser.Math.Wrap + * @since 3.0.0 + * + * @param {number} value - The value to wrap. + * @param {number} min - The minimum value. + * @param {number} max - The maximum value. + * + * @return {number} The wrapped value. + */ +var Wrap = function (value, min, max) +{ + var range = max - min; + + return (min + ((((value - min) % range) + range) % range)); +}; + +module.exports = Wrap; + + /***/ }), /* 6 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1339,7 +1496,7 @@ module.exports = FILE_CONST; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1384,7 +1541,36 @@ module.exports = CounterClockwise; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive. + * + * @function Phaser.Math.FloatBetween + * @since 3.0.0 + * + * @param {number} min - The lower bound for the float, inclusive. + * @param {number} max - The upper bound for the float exclusive. + * + * @return {number} A random float within the given range. + */ +var FloatBetween = function (min, max) +{ + return Math.random() * (max - min) + min; +}; + +module.exports = FloatBetween; + + +/***/ }), +/* 9 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1409,12 +1595,12 @@ module.exports = Clamp; /***/ }), -/* 9 */ +/* 10 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1439,12 +1625,12 @@ module.exports = RadToDeg; /***/ }), -/* 10 */ +/* 11 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2249,12 +2435,12 @@ module.exports = Vector3; /***/ }), -/* 11 */ +/* 12 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2320,23 +2506,23 @@ module.exports = GetValue; /***/ }), -/* 12 */ +/* 13 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var CONST = __webpack_require__(6); -var Events = __webpack_require__(169); -var GetFastValue = __webpack_require__(3); -var GetURL = __webpack_require__(180); -var MergeXHRSettings = __webpack_require__(29); -var XHRLoader = __webpack_require__(181); -var XHRSettings = __webpack_require__(30); +var Events = __webpack_require__(178); +var GetFastValue = __webpack_require__(4); +var GetURL = __webpack_require__(189); +var MergeXHRSettings = __webpack_require__(32); +var XHRLoader = __webpack_require__(190); +var XHRSettings = __webpack_require__(33); /** * @classdesc @@ -2407,10 +2593,13 @@ var File = new Class({ /** * The URL of the file, not including baseURL. - * Automatically has Loader.path prepended to it. + * + * Automatically has Loader.path prepended to it if a string. + * + * Can also be a JavaScript Object, such as the results of parsing JSON data. * * @name Phaser.Loader.File#url - * @type {string} + * @type {object|string} * @since 3.0.0 */ this.url = GetFastValue(fileConfig, 'url'); @@ -2419,7 +2608,7 @@ var File = new Class({ { this.url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', ''); } - else if (typeof(this.url) !== 'function') + else if (typeof this.url === 'string' && this.url.indexOf('blob:') !== 0 && this.url.indexOf('data:') !== 0) { this.url = loader.path + this.url; } @@ -2597,6 +2786,8 @@ var File = new Class({ } else { + this.state = CONST.FILE_LOADING; + this.src = GetURL(this, this.loader.baseURL); if (this.src.indexOf('data:') === 0) @@ -2607,7 +2798,7 @@ var File = new Class({ { // The creation of this XHRLoader starts the load process going. // It will automatically call the following, based on the load outcome: - // + // // xhr.onload = this.onLoad // xhr.onerror = this.onError // xhr.onprogress = this.onProgress @@ -2638,6 +2829,8 @@ var File = new Class({ success = false; } + this.state = CONST.FILE_LOADED; + this.resetXHR(); this.loader.nextFile(this, success); @@ -2812,7 +3005,7 @@ var File = new Class({ * @method Phaser.Loader.File.createObjectURL * @static * @since 3.7.0 - * + * * @param {HTMLImageElement} image - Image object which 'src' attribute should be set to object URL. * @param {Blob} blob - A Blob object to create an object URL for. * @param {string} defaultType - Default mime type used if blob type is not available. @@ -2846,7 +3039,7 @@ File.createObjectURL = function (image, blob, defaultType) * @method Phaser.Loader.File.revokeObjectURL * @static * @since 3.7.0 - * + * * @param {HTMLImageElement} image - Image object which 'src' attribute should be revoked. */ File.revokeObjectURL = function (image) @@ -2861,12 +3054,12 @@ module.exports = File; /***/ }), -/* 13 */ +/* 14 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2930,12 +3123,12 @@ module.exports = FileTypesManager; /***/ }), -/* 14 */ +/* 15 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2951,6 +3144,8 @@ var IsPlainObject = __webpack_require__(2); * @function Phaser.Utils.Objects.Extend * @since 3.0.0 * + * @param {...*} [args] - The objects that will be mixed. + * * @return {object} The extended object. */ var Extend = function () @@ -3029,12 +3224,12 @@ module.exports = Extend; /***/ }), -/* 15 */ +/* 16 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3060,12 +3255,12 @@ module.exports = Between; /***/ }), -/* 16 */ +/* 17 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3097,16 +3292,16 @@ module.exports = Normalize; /***/ }), -/* 17 */ +/* 18 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathWrap = __webpack_require__(4); +var MathWrap = __webpack_require__(5); /** * Wrap an angle. @@ -3129,16 +3324,16 @@ module.exports = Wrap; /***/ }), -/* 18 */ +/* 19 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Wrap = __webpack_require__(4); +var Wrap = __webpack_require__(5); /** * Wrap an angle in degrees. @@ -3161,27 +3356,61 @@ module.exports = WrapDegrees; /***/ }), -/* 19 */ +/* 20 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Check whether the given values are fuzzily equal. + * + * Two numbers are fuzzily equal if their difference is less than `epsilon`. + * + * @function Phaser.Math.Fuzzy.Equal + * @since 3.0.0 + * + * @param {number} a - The first value. + * @param {number} b - The second value. + * @param {number} [epsilon=0.0001] - The epsilon. + * + * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`. + */ +var Equal = function (a, b, epsilon) +{ + if (epsilon === undefined) { epsilon = 0.0001; } + + return Math.abs(a - b) < epsilon; +}; + +module.exports = Equal; + + +/***/ }), +/* 21 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Factorial = __webpack_require__(20); +var Factorial = __webpack_require__(22); /** - * [description] + * Calculates the Bernstein basis from the three factorial coefficients. * * @function Phaser.Math.Bernstein * @since 3.0.0 * - * @param {number} n - [description] - * @param {number} i - [description] + * @param {number} n - The first value. + * @param {number} i - The second value. * - * @return {number} [description] + * @return {number} The Bernstein basis of Factorial(n) / Factorial(i) / Factorial(n - i) */ var Bernstein = function (n, i) { @@ -3192,12 +3421,12 @@ module.exports = Bernstein; /***/ }), -/* 20 */ +/* 22 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3232,26 +3461,26 @@ module.exports = Factorial; /***/ }), -/* 21 */ +/* 23 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * Calculates a Catmull-Rom value. + * Calculates a Catmull-Rom value from the given points, based on an alpha of 0.5. * * @function Phaser.Math.CatmullRom * @since 3.0.0 * - * @param {number} t - [description] - * @param {number} p0 - [description] - * @param {number} p1 - [description] - * @param {number} p2 - [description] - * @param {number} p3 - [description] + * @param {number} t - The amount to interpolate by. + * @param {number} p0 - The first control point. + * @param {number} p1 - The second control point. + * @param {number} p2 - The third control point. + * @param {number} p3 - The fourth control point. * * @return {number} The Catmull-Rom value. */ @@ -3269,12 +3498,12 @@ module.exports = CatmullRom; /***/ }), -/* 22 */ +/* 24 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3299,12 +3528,12 @@ module.exports = Linear; /***/ }), -/* 23 */ +/* 25 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3346,12 +3575,12 @@ module.exports = SmoothStep; /***/ }), -/* 24 */ +/* 26 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3385,12 +3614,12 @@ module.exports = SmootherStep; /***/ }), -/* 25 */ +/* 27 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3415,12 +3644,67 @@ module.exports = DegToRad; /***/ }), -/* 26 */ +/* 28 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Vector2 = __webpack_require__(3); + +/** + * Takes the `x` and `y` coordinates and transforms them into the same space as + * defined by the position, rotation and scale values. + * + * @function Phaser.Math.TransformXY + * @since 3.0.0 + * + * @param {number} x - The x coordinate to be transformed. + * @param {number} y - The y coordinate to be transformed. + * @param {number} positionX - Horizontal position of the transform point. + * @param {number} positionY - Vertical position of the transform point. + * @param {number} rotation - Rotation of the transform point, in radians. + * @param {number} scaleX - Horizontal scale of the transform point. + * @param {number} scaleY - Vertical scale of the transform point. + * @param {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} [output] - The output vector, point or object for the translated coordinates. + * + * @return {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} The translated point. + */ +var TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output) +{ + if (output === undefined) { output = new Vector2(); } + + var radianSin = Math.sin(rotation); + var radianCos = Math.cos(rotation); + + // Rotate and Scale + var a = radianCos * scaleX; + var b = radianSin * scaleX; + var c = -radianSin * scaleY; + var d = radianCos * scaleY; + + // Invert + var id = 1 / ((a * d) + (c * -b)); + + output.x = (d * id * x) + (-c * id * y) + (((positionY * c) - (positionX * d)) * id); + output.y = (a * id * y) + (-b * id * x) + (((-positionY * a) + (positionX * b)) * id); + + return output; +}; + +module.exports = TransformXY; + + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3928,12 +4212,12 @@ var Matrix3 = new Class({ }, /** - * [description] + * Set the values of this Matrix3 to be normalized from the given Matrix4. * * @method Phaser.Math.Matrix3#normalFromMat4 * @since 3.0.0 * - * @param {Phaser.Math.Matrix4} m - [description] + * @param {Phaser.Math.Matrix4} m - The Matrix4 to normalize the values from. * * @return {Phaser.Math.Matrix3} This Matrix3. */ @@ -4008,12 +4292,12 @@ module.exports = Matrix3; /***/ }), -/* 27 */ +/* 30 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4572,12 +4856,12 @@ var Matrix4 = new Class({ }, /** - * [description] + * Multiply the values of this Matrix4 by those given in the `src` argument. * * @method Phaser.Math.Matrix4#multiplyLocal * @since 3.0.0 * - * @param {Phaser.Math.Matrix4} src - [description] + * @param {Phaser.Math.Matrix4} src - The source Matrix4 that this Matrix4 is multiplied by. * * @return {Phaser.Math.Matrix4} This Matrix4. */ @@ -5369,9 +5653,9 @@ var Matrix4 = new Class({ * @method Phaser.Math.Matrix4#yawPitchRoll * @since 3.0.0 * - * @param {number} yaw - [description] - * @param {number} pitch - [description] - * @param {number} roll - [description] + * @param {number} yaw - The yaw value. + * @param {number} pitch - The pitch value. + * @param {number} roll - The roll value. * * @return {Phaser.Math.Matrix4} This Matrix4. */ @@ -5470,12 +5754,12 @@ module.exports = Matrix4; /***/ }), -/* 28 */ +/* 31 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -5483,8 +5767,8 @@ module.exports = Matrix4; // and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl var Class = __webpack_require__(0); -var Vector3 = __webpack_require__(10); -var Matrix3 = __webpack_require__(26); +var Vector3 = __webpack_require__(11); +var Matrix3 = __webpack_require__(29); var EPSILON = 0.000001; @@ -5792,13 +6076,13 @@ var Quaternion = new Class({ }, /** - * [description] + * Rotates this Quaternion based on the two given vectors. * * @method Phaser.Math.Quaternion#rotationTo * @since 3.0.0 * - * @param {Phaser.Math.Vector3} a - [description] - * @param {Phaser.Math.Vector3} b - [description] + * @param {Phaser.Math.Vector3} a - The transform rotation vector. + * @param {Phaser.Math.Vector3} b - The target rotation vector. * * @return {Phaser.Math.Quaternion} This Quaternion. */ @@ -6242,17 +6526,17 @@ module.exports = Quaternion; /***/ }), -/* 29 */ +/* 32 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Extend = __webpack_require__(14); -var XHRSettings = __webpack_require__(30); +var Extend = __webpack_require__(15); +var XHRSettings = __webpack_require__(33); /** * Takes two XHRSettings Objects and creates a new XHRSettings object from them. @@ -6290,12 +6574,12 @@ module.exports = MergeXHRSettings; /***/ }), -/* 30 */ +/* 33 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -6310,16 +6594,18 @@ module.exports = MergeXHRSettings; * @param {string} [user=''] - Optional username for the XHR request. * @param {string} [password=''] - Optional password for the XHR request. * @param {integer} [timeout=0] - Optional XHR timeout value. + * @param {boolean} [withCredentials=false] - Optional XHR withCredentials value. * * @return {Phaser.Types.Loader.XHRSettingsObject} The XHRSettings object as used by the Loader. */ -var XHRSettings = function (responseType, async, user, password, timeout) +var XHRSettings = function (responseType, async, user, password, timeout, withCredentials) { if (responseType === undefined) { responseType = ''; } if (async === undefined) { async = true; } if (user === undefined) { user = ''; } if (password === undefined) { password = ''; } if (timeout === undefined) { timeout = 0; } + if (withCredentials === undefined) { withCredentials = false; } // Before sending a request, set the xhr.responseType to "text", // "arraybuffer", "blob", or "document", depending on your data needs. @@ -6340,12 +6626,16 @@ var XHRSettings = function (responseType, async, user, password, timeout) timeout: timeout, // setRequestHeader + headers: undefined, header: undefined, headerValue: undefined, requestedWith: false, // overrideMimeType - overrideMimeType: undefined + overrideMimeType: undefined, + + // withCredentials + withCredentials: withCredentials }; }; @@ -6354,12 +6644,12 @@ module.exports = XHRSettings; /***/ }), -/* 31 */ +/* 34 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -6381,7 +6671,7 @@ module.exports = NOOP; /***/ }), -/* 32 */ +/* 35 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -6390,34 +6680,39 @@ module.exports = NOOP; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BuildGameObject = __webpack_require__(33); +var BuildGameObject = __webpack_require__(36); var Class = __webpack_require__(0); -var GetValue = __webpack_require__(11); -var ResizeEvent = __webpack_require__(143); -var ScenePlugin = __webpack_require__(144); -var Spine = __webpack_require__(166); -var SpineFile = __webpack_require__(167); -var SpineGameObject = __webpack_require__(185); +var GetValue = __webpack_require__(12); +var ResizeEvent = __webpack_require__(150); +var ScenePlugin = __webpack_require__(151); +var Spine = __webpack_require__(175); +var SpineFile = __webpack_require__(176); +var SpineGameObject = __webpack_require__(194); /** * @classdesc * The Spine Plugin is a Scene based plugin that handles the creation and rendering of Spine Game Objects. - * + * + * Find more details about Spine itself at http://esotericsoftware.com/. + * * All rendering and object creation is handled via the official Spine Runtimes. This version of the plugin - * uses the Spine 3.8 runtimes. Files created in a different version of Spine may not work as a result. - * - * You can find more details about Spine at http://esotericsoftware.com/. - * + * uses the Spine 3.8.95 runtimes. Please note that due to the way the Spine runtimes use semver, you will + * get breaking changes in point-releases. Therefore, files created in a different version of Spine may not + * work as a result, without you first updating the runtimes and rebuilding the plugin. + * + * Esoteric themselves recommend that you freeze your Spine editor version against the runtime versions. + * You can find more information about this here: http://esotericsoftware.com/spine-settings#Version + * * Please note that you require a Spine license in order to use Spine Runtimes in your games. - * + * * You can install this plugin into your Phaser game by either importing it, if you're using ES6: - * + * * ```javascript * import * as SpinePlugin from './SpinePlugin.js'; * ``` - * + * * and then adding it to your Phaser Game configuration: - * + * * ```javascript * plugins: { * scene: [ @@ -6425,10 +6720,10 @@ var SpineGameObject = __webpack_require__(185); * ] * } * ``` - * + * * If you're using ES5 then you can load the Spine Plugin in a Scene files payload, _within_ your * Game Configuration object, like this: - * + * * ```javascript * scene: { * preload: preload, @@ -6440,42 +6735,42 @@ var SpineGameObject = __webpack_require__(185); * } * } * ``` - * + * * Loading it like this allows you to then use commands such as `this.load.spine` from within the * same Scene. Alternatively, you can use the method `this.load.plugin` to load the plugin via the normal * Phaser Loader. However, doing so will not add it to the current Scene. It will be available from any * subsequent Scenes. - * + * * Assuming a default environment you access it from within a Scene by using the `this.spine` reference. - * + * * When this plugin is installed into a Scene it will add a Loader File Type, allowing you to load * Spine files directly, i.e.: - * + * * ```javascript * this.load.spine('stretchyman', 'stretchyman-pro.json', [ 'stretchyman-pma.atlas' ], true); * ``` - * - * It also installs a Game Object Factory method, allowin you to create Spine Game Objects: - * + * + * It also installs a Game Object Factory method, allowing you to create Spine Game Objects: + * * ```javascript * this.add.spine(512, 650, 'stretchyman') * ``` - * + * * The first argument is the key which you used when importing the Spine data. There are lots of * things you can specify, such as the animation name, skeleton, slot attachments and more. Please * see the respective documentation and examples for further details. - * + * * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary. * The associated atlas files are scanned for any texture files present in them, which are then loaded. - * If you have exported your Spine data with preMultipiedAlpha set, then you should enable this in the + * If you have exported your Spine data with preMultipliedAlpha set, then you should enable this in the * load arguments, or you may see black outlines around skeleton textures. - * + * * The Spine plugin is local to the Scene in which it is installed. This means a change to something, * such as the Skeleton Debug Renderer, in this Scene, will not impact the renderer in any other Scene. * The only exception to this is with the caches this plugin creates. Spine atlas and texture data are * stored in their own caches, which are global, meaning they're accessible from any Scene in your * game, regardless if the Scene loaded the Spine data or not. - * + * * For details about the Spine Runtime API see http://esotericsoftware.com/spine-api-reference * * @class SpinePlugin @@ -6510,7 +6805,7 @@ var SpinePlugin = new Class({ /** * A custom cache that stores the Spine atlas data. - * + * * This cache is global across your game, allowing you to access Spine data loaded from other Scenes, * no matter which Scene you are in. * @@ -6522,7 +6817,7 @@ var SpinePlugin = new Class({ /** * A custom cache that stores the Spine Textures. - * + * * This cache is global across your game, allowing you to access Spine data loaded from other Scenes, * no matter which Scene you are in. * @@ -6562,7 +6857,7 @@ var SpinePlugin = new Class({ /** * The underlying WebGL context of the Phaser renderer. - * + * * Only set if running in WebGL mode. * * @name SpinePlugin#gl @@ -6582,7 +6877,7 @@ var SpinePlugin = new Class({ /** * An instance of the Spine WebGL Scene Renderer. - * + * * Only set if running in WebGL mode. * * @name SpinePlugin#sceneRenderer @@ -6602,7 +6897,7 @@ var SpinePlugin = new Class({ /** * An instance of the Spine Skeleton Debug Renderer. - * + * * Only set if running in WebGL mode. * * @name SpinePlugin#skeletonDebugRenderer @@ -6664,46 +6959,46 @@ var SpinePlugin = new Class({ var add = function (x, y, key, animationName, loop) { var spineGO = new SpineGameObject(this.scene, _this, x, y, key, animationName, loop); - + this.displayList.add(spineGO); this.updateList.add(spineGO); - + return spineGO; }; var make = function (config, addToScene) { if (config === undefined) { config = {}; } - + var key = GetValue(config, 'key', null); var animationName = GetValue(config, 'animationName', null); var loop = GetValue(config, 'loop', false); - + var spineGO = new SpineGameObject(this.scene, _this, 0, 0, key, animationName, loop); - + if (addToScene !== undefined) { config.add = addToScene; } - + BuildGameObject(this.scene, spineGO, config); - + // Spine specific var skinName = GetValue(config, 'skinName', false); - + if (skinName) { spineGO.setSkinByName(skinName); } - + var slotName = GetValue(config, 'slotName', false); var attachmentName = GetValue(config, 'attachmentName', null); - + if (slotName) { spineGO.setAttachment(slotName, attachmentName); } - + return spineGO.refresh(); }; @@ -6760,7 +7055,7 @@ var SpinePlugin = new Class({ { this.sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true); - // Monkeypatch the Spine setBlendMode functions, or batching is destroyed + // Monkeypatch the Spine setBlendMode functions, or batching is destroyed! var setBlendMode = function (srcBlend, dstBlend) { @@ -6795,9 +7090,9 @@ var SpinePlugin = new Class({ * * @method SpinePlugin#getAtlasCanvas * @since 3.19.0 - * + * * @param {string} key - The key of the Spine Atlas to create. - * + * * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found. */ getAtlasCanvas: function (key) @@ -6823,7 +7118,7 @@ var SpinePlugin = new Class({ atlas = new Spine.TextureAtlas(atlasEntry.data, function (path) { - return new Spine.canvas.CanvasTexture(textures.get(path).getSourceImage()); + return new Spine.canvas.CanvasTexture(textures.get(atlasEntry.prefix + path).getSourceImage()); }); } @@ -6836,9 +7131,9 @@ var SpinePlugin = new Class({ * * @method SpinePlugin#getAtlasWebGL * @since 3.19.0 - * + * * @param {string} key - The key of the Spine Atlas to create. - * + * * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found. */ getAtlasWebGL: function (key) @@ -6868,7 +7163,7 @@ var SpinePlugin = new Class({ atlas = new Spine.TextureAtlas(atlasEntry.data, function (path) { - return new Spine.webgl.GLTexture(gl, textures.get(path).getSourceImage(), false); + return new Spine.webgl.GLTexture(gl, textures.get(atlasEntry.prefix + path).getSourceImage(), false); }); } @@ -6879,7 +7174,7 @@ var SpinePlugin = new Class({ * Adds a Spine Skeleton and Atlas file, or array of files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -6894,21 +7189,21 @@ var SpinePlugin = new Class({ * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been * loaded. - * + * * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. - * + * * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary. The associated * atlas files are scanned for any texture files present in them, which are then loaded. If you have exported - * your Spine data with preMultipiedAlpha set, then you should enable this in the arguments, or you may see black + * your Spine data with preMultipliedAlpha set, then you should enable this in the arguments, or you may see black * outlines around skeleton textures. - * + * * The key must be a unique String. It is used to add the file to the global Spine cache upon a successful load. * The key should be unique both in terms of files being loaded and files already present in the Spine cache. * Loading a file using a key that is already taken will result in a warning. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.spine({ * key: 'mainmenu', @@ -6917,9 +7212,9 @@ var SpinePlugin = new Class({ * preMultipliedAlpha: true * }); * ``` - * + * * If you need to load multiple Spine atlas files, provide them as an array: - * + * * ```javascript * function preload () * { @@ -6942,13 +7237,13 @@ var SpinePlugin = new Class({ * Note: The ability to load this type of file will only be available if the Spine Plugin has been built or loaded into Phaser. * * @method Phaser.Loader.LoaderPlugin#spine - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.19.0 * * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} jsonURL - The absolute or relative URL to load the Spine json file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". * @param {string|string[]} atlasURL - The absolute or relative URL to load the Spine atlas file from. If undefined or `null` it will be set to `.atlas`, i.e. if `key` was "alien" then the URL will be "alien.atlas". - * @param {boolean} [preMultipiedAlpha=false] - Do the texture files include pre-multiplied alpha or not? + * @param {boolean} [preMultipliedAlpha=false] - Do the texture files include pre-multiplied alpha or not? * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the Spine json file. Used in replacement of the Loaders default XHR Settings. * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the Spine atlas file. Used in replacement of the Loaders default XHR Settings. * @@ -6957,13 +7252,13 @@ var SpinePlugin = new Class({ spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings) { var multifile; - + if (Array.isArray(key)) { for (var i = 0; i < key.length; i++) { multifile = new SpineFile(this, key[i]); - + this.addFile(multifile.files); } } @@ -6973,23 +7268,23 @@ var SpinePlugin = new Class({ this.addFile(multifile.files); } - + return this; }, /** * Converts the given x and y screen coordinates into the world space of the given Skeleton. - * + * * Only works in WebGL. * * @method SpinePlugin#worldToLocal * @since 3.19.0 - * + * * @param {number} x - The screen space x coordinate to convert. * @param {number} y - The screen space y coordinate to convert. * @param {spine.Skeleton} skeleton - The Spine Skeleton to convert into. * @param {spine.Bone} [bone] - Optional bone of the Skeleton to convert into. - * + * * @return {spine.Vector2} A Vector2 containing the translated point. */ worldToLocal: function (x, y, skeleton, bone) @@ -7026,10 +7321,10 @@ var SpinePlugin = new Class({ * * @method SpinePlugin#getVector2 * @since 3.19.0 - * + * * @param {number} x - The Vector x value. * @param {number} y - The Vector y value. - * + * * @return {spine.Vector2} A Spine Vector2 based on the given values. */ getVector2: function (x, y) @@ -7039,16 +7334,16 @@ var SpinePlugin = new Class({ /** * Returns a Spine Vector2 based on the given x, y and z values. - * + * * Only works in WebGL. * * @method SpinePlugin#getVector3 * @since 3.19.0 - * + * * @param {number} x - The Vector x value. * @param {number} y - The Vector y value. * @param {number} z - The Vector z value. - * + * * @return {spine.Vector2} A Spine Vector2 based on the given values. */ getVector3: function (x, y, z) @@ -7058,14 +7353,14 @@ var SpinePlugin = new Class({ /** * Sets `drawBones` in the Spine Skeleton Debug Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setDebugBones * @since 3.19.0 - * + * * @param {boolean} [value=true] - The value to set in the debug property. - * + * * @return {this} This Spine Plugin. */ setDebugBones: function (value) @@ -7079,14 +7374,14 @@ var SpinePlugin = new Class({ /** * Sets `drawRegionAttachments` in the Spine Skeleton Debug Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setDebugRegionAttachments * @since 3.19.0 - * + * * @param {boolean} [value=true] - The value to set in the debug property. - * + * * @return {this} This Spine Plugin. */ setDebugRegionAttachments: function (value) @@ -7100,14 +7395,14 @@ var SpinePlugin = new Class({ /** * Sets `drawBoundingBoxes` in the Spine Skeleton Debug Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setDebugBoundingBoxes * @since 3.19.0 - * + * * @param {boolean} [value=true] - The value to set in the debug property. - * + * * @return {this} This Spine Plugin. */ setDebugBoundingBoxes: function (value) @@ -7121,14 +7416,14 @@ var SpinePlugin = new Class({ /** * Sets `drawMeshHull` in the Spine Skeleton Debug Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setDebugMeshHull * @since 3.19.0 - * + * * @param {boolean} [value=true] - The value to set in the debug property. - * + * * @return {this} This Spine Plugin. */ setDebugMeshHull: function (value) @@ -7142,14 +7437,14 @@ var SpinePlugin = new Class({ /** * Sets `drawMeshTriangles` in the Spine Skeleton Debug Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setDebugMeshTriangles * @since 3.19.0 - * + * * @param {boolean} [value=true] - The value to set in the debug property. - * + * * @return {this} This Spine Plugin. */ setDebugMeshTriangles: function (value) @@ -7163,14 +7458,14 @@ var SpinePlugin = new Class({ /** * Sets `drawPaths` in the Spine Skeleton Debug Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setDebugPaths * @since 3.19.0 - * + * * @param {boolean} [value=true] - The value to set in the debug property. - * + * * @return {this} This Spine Plugin. */ setDebugPaths: function (value) @@ -7184,14 +7479,14 @@ var SpinePlugin = new Class({ /** * Sets `drawSkeletonXY` in the Spine Skeleton Debug Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setDebugSkeletonXY * @since 3.19.0 - * + * * @param {boolean} [value=true] - The value to set in the debug property. - * + * * @return {this} This Spine Plugin. */ setDebugSkeletonXY: function (value) @@ -7205,14 +7500,14 @@ var SpinePlugin = new Class({ /** * Sets `drawClipping` in the Spine Skeleton Debug Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setDebugClipping * @since 3.19.0 - * + * * @param {boolean} [value=true] - The value to set in the debug property. - * + * * @return {this} This Spine Plugin. */ setDebugClipping: function (value) @@ -7226,14 +7521,14 @@ var SpinePlugin = new Class({ /** * Sets the given vertex effect on the Spine Skeleton Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setEffect * @since 3.19.0 - * + * * @param {spine.VertexEffect} [effect] - The vertex effect to set on the Skeleton Renderer. - * + * * @return {this} This Spine Plugin. */ setEffect: function (effect) @@ -7245,15 +7540,15 @@ var SpinePlugin = new Class({ /** * Creates a Spine Skeleton based on the given key and optional Skeleton JSON data. - * + * * The Skeleton data should have already been loaded before calling this method. * * @method SpinePlugin#createSkeleton * @since 3.19.0 - * + * * @param {string} key - The key of the Spine skeleton data, as loaded by the plugin. If the Spine JSON contains multiple skeletons, reference them with a period, i.e. `set.spineBoy`. * @param {object} [skeletonJSON] - Optional Skeleton JSON data to use, instead of getting it from the cache. - * + * * @return {(any|null)} This Spine Skeleton data object, or `null` if the key was invalid. */ createSkeleton: function (key, skeletonJSON) @@ -7286,7 +7581,7 @@ var SpinePlugin = new Class({ var preMultipliedAlpha = atlasData.preMultipliedAlpha; var atlasLoader = new Spine.AtlasAttachmentLoader(atlas); - + var skeletonJson = new Spine.SkeletonJson(atlasLoader); var data; @@ -7307,7 +7602,7 @@ var SpinePlugin = new Class({ var skeletonData = skeletonJson.readSkeletonData(data); var skeleton = new Spine.Skeleton(skeletonData); - + return { skeletonData: skeletonData, skeleton: skeleton, preMultipliedAlpha: preMultipliedAlpha }; } else @@ -7318,14 +7613,14 @@ var SpinePlugin = new Class({ /** * Creates a new Animation State and Animation State Data for the given skeleton. - * + * * The returned object contains two properties: `state` and `stateData` respectively. * * @method SpinePlugin#createAnimationState * @since 3.19.0 - * + * * @param {spine.Skeleton} skeleton - The Skeleton to create the Animation State for. - * + * * @return {any} An object containing the Animation State and Animation State Data instances. */ createAnimationState: function (skeleton) @@ -7339,17 +7634,17 @@ var SpinePlugin = new Class({ /** * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose. - * + * * The returned object contains two properties: `offset` and `size`: - * + * * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB. * `size` - The width and height of the AABB. * * @method SpinePlugin#getBounds * @since 3.19.0 - * + * * @param {spine.Skeleton} skeleton - The Skeleton to get the bounds from. - * + * * @return {any} The bounds object. */ getBounds: function (skeleton) @@ -7364,7 +7659,7 @@ var SpinePlugin = new Class({ /** * Internal handler for when the renderer resizes. - * + * * Only called if running in WebGL. * * @method SpinePlugin#onResize @@ -7380,14 +7675,14 @@ var SpinePlugin = new Class({ sceneRenderer.camera.position.x = viewportWidth / 2; sceneRenderer.camera.position.y = viewportHeight / 2; - + sceneRenderer.camera.viewportWidth = viewportWidth; sceneRenderer.camera.viewportHeight = viewportHeight; }, /** * The Scene that owns this plugin is shutting down. - * + * * We need to kill and reset all internal properties as well as stop listening to Scene events. * * @method SpinePlugin#shutdown @@ -7399,11 +7694,16 @@ var SpinePlugin = new Class({ var eventEmitter = this.systems.events; eventEmitter.off('shutdown', this.shutdown, this); + + if (this.isWebGL) + { + this.game.scale.off(ResizeEvent, this.onResize, this); + } }, /** * The Scene that owns this plugin is being destroyed. - * + * * We need to shutdown and then kill off all external references. * * @method SpinePlugin#destroy @@ -7439,30 +7739,30 @@ var SpinePlugin = new Class({ /** * Creates a new Spine Game Object and adds it to the Scene. - * + * * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects * do not have a Phaser origin. - * + * * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference * that. - * + * * ```javascript * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true); * ``` - * + * * The key is optional. If not passed here, you need to call `SpineGameObject.setSkeleton()` to use it. - * + * * The animation name is also optional and can be set later via `SpineGameObject.setAnimation`. - * + * * Should you wish for more control over the object creation, such as setting a slot attachment or skin * name, then use `SpinePlugin.make` instead. * * @method SpinePlugin#add * @since 3.19.0 - * + * * @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} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin. @@ -7474,16 +7774,16 @@ var SpinePlugin = new Class({ /** * Creates a new Spine Game Object from the given configuration file and optionally adds it to the Scene. - * + * * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects * do not have a Phaser origin. - * + * * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference * that. - * + * * ```javascript * let jelly = this.make.spine({ * x: 500, y: 500, key: 'jelly', @@ -7507,17 +7807,17 @@ module.exports = SpinePlugin; /***/ }), -/* 33 */ +/* 36 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlendModes = __webpack_require__(34); -var GetAdvancedValue = __webpack_require__(35); +var BlendModes = __webpack_require__(37); +var GetAdvancedValue = __webpack_require__(38); /** * Builds a Game Object using the provided configuration object. @@ -7635,12 +7935,12 @@ module.exports = BuildGameObject; /***/ }), -/* 34 */ +/* 37 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7974,17 +8274,17 @@ module.exports = { /***/ }), -/* 35 */ +/* 38 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH = __webpack_require__(36); -var GetValue = __webpack_require__(11); +var MATH = __webpack_require__(39); +var GetValue = __webpack_require__(12); /** * Retrieves a value from an object. Allows for more advanced selection options, including: @@ -8061,17 +8361,17 @@ module.exports = GetAdvancedValue; /***/ }), -/* 36 */ +/* 39 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var CONST = __webpack_require__(1); -var Extend = __webpack_require__(14); +var Extend = __webpack_require__(15); /** * @namespace Phaser.Math @@ -8080,62 +8380,63 @@ var Extend = __webpack_require__(14); var PhaserMath = { // Collections of functions - Angle: __webpack_require__(37), - Distance: __webpack_require__(44), - Easing: __webpack_require__(48), - Fuzzy: __webpack_require__(93), - Interpolation: __webpack_require__(99), - Pow2: __webpack_require__(107), - Snap: __webpack_require__(111), + Angle: __webpack_require__(40), + Distance: __webpack_require__(49), + Easing: __webpack_require__(57), + Fuzzy: __webpack_require__(102), + Interpolation: __webpack_require__(107), + Pow2: __webpack_require__(115), + Snap: __webpack_require__(119), // Expose the RNG Class - RandomDataGenerator: __webpack_require__(115), + RandomDataGenerator: __webpack_require__(123), // Single functions - Average: __webpack_require__(116), - Bernstein: __webpack_require__(19), - Between: __webpack_require__(117), - CatmullRom: __webpack_require__(21), - CeilTo: __webpack_require__(118), - Clamp: __webpack_require__(8), - DegToRad: __webpack_require__(25), - Difference: __webpack_require__(119), - Factorial: __webpack_require__(20), - FloatBetween: __webpack_require__(120), - FloorTo: __webpack_require__(121), - FromPercent: __webpack_require__(122), - GetSpeed: __webpack_require__(123), - IsEven: __webpack_require__(124), - IsEvenStrict: __webpack_require__(125), - Linear: __webpack_require__(22), - MaxAdd: __webpack_require__(126), - MinSub: __webpack_require__(127), - Percent: __webpack_require__(128), - RadToDeg: __webpack_require__(9), - RandomXY: __webpack_require__(129), - RandomXYZ: __webpack_require__(130), - RandomXYZW: __webpack_require__(131), - Rotate: __webpack_require__(132), - RotateAround: __webpack_require__(133), - RotateAroundDistance: __webpack_require__(134), - RoundAwayFromZero: __webpack_require__(135), - RoundTo: __webpack_require__(136), - SinCosTableGenerator: __webpack_require__(137), - SmootherStep: __webpack_require__(24), - SmoothStep: __webpack_require__(23), - ToXY: __webpack_require__(138), - TransformXY: __webpack_require__(139), - Within: __webpack_require__(140), - Wrap: __webpack_require__(4), + Average: __webpack_require__(124), + Bernstein: __webpack_require__(21), + Between: __webpack_require__(125), + CatmullRom: __webpack_require__(23), + CeilTo: __webpack_require__(126), + Clamp: __webpack_require__(9), + DegToRad: __webpack_require__(27), + Difference: __webpack_require__(127), + Factorial: __webpack_require__(22), + FloatBetween: __webpack_require__(8), + FloorTo: __webpack_require__(128), + FromPercent: __webpack_require__(129), + GetSpeed: __webpack_require__(130), + IsEven: __webpack_require__(131), + IsEvenStrict: __webpack_require__(132), + Linear: __webpack_require__(24), + MaxAdd: __webpack_require__(133), + MinSub: __webpack_require__(134), + Percent: __webpack_require__(135), + RadToDeg: __webpack_require__(10), + RandomXY: __webpack_require__(136), + RandomXYZ: __webpack_require__(137), + RandomXYZW: __webpack_require__(138), + Rotate: __webpack_require__(139), + RotateAround: __webpack_require__(140), + RotateAroundDistance: __webpack_require__(141), + RotateTo: __webpack_require__(142), + RoundAwayFromZero: __webpack_require__(143), + RoundTo: __webpack_require__(144), + SinCosTableGenerator: __webpack_require__(145), + SmootherStep: __webpack_require__(26), + SmoothStep: __webpack_require__(25), + ToXY: __webpack_require__(146), + TransformXY: __webpack_require__(28), + Within: __webpack_require__(147), + Wrap: __webpack_require__(5), // Vector classes - Vector2: __webpack_require__(5), - Vector3: __webpack_require__(10), - Vector4: __webpack_require__(141), - Matrix3: __webpack_require__(26), - Matrix4: __webpack_require__(27), - Quaternion: __webpack_require__(28), - RotateVec3: __webpack_require__(142) + Vector2: __webpack_require__(3), + Vector3: __webpack_require__(11), + Vector4: __webpack_require__(148), + Matrix3: __webpack_require__(29), + Matrix4: __webpack_require__(30), + Quaternion: __webpack_require__(31), + RotateVec3: __webpack_require__(149) }; @@ -8149,12 +8450,12 @@ module.exports = PhaserMath; /***/ }), -/* 37 */ +/* 40 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8164,28 +8465,30 @@ module.exports = PhaserMath; module.exports = { - Between: __webpack_require__(15), - BetweenPoints: __webpack_require__(38), - BetweenPointsY: __webpack_require__(39), - BetweenY: __webpack_require__(40), + Between: __webpack_require__(16), + BetweenPoints: __webpack_require__(41), + BetweenPointsY: __webpack_require__(42), + BetweenY: __webpack_require__(43), CounterClockwise: __webpack_require__(7), - Normalize: __webpack_require__(16), - Reverse: __webpack_require__(41), - RotateTo: __webpack_require__(42), - ShortestBetween: __webpack_require__(43), - Wrap: __webpack_require__(17), - WrapDegrees: __webpack_require__(18) + Normalize: __webpack_require__(17), + Random: __webpack_require__(44), + RandomDegrees: __webpack_require__(45), + Reverse: __webpack_require__(46), + RotateTo: __webpack_require__(47), + ShortestBetween: __webpack_require__(48), + Wrap: __webpack_require__(18), + WrapDegrees: __webpack_require__(19) }; /***/ }), -/* 38 */ +/* 41 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8197,8 +8500,8 @@ module.exports = { * @function Phaser.Math.Angle.BetweenPoints * @since 3.0.0 * - * @param {(Phaser.Geom.Point|object)} point1 - The first point. - * @param {(Phaser.Geom.Point|object)} point2 - The second point. + * @param {Phaser.Types.Math.Vector2Like} point1 - The first point. + * @param {Phaser.Types.Math.Vector2Like} point2 - The second point. * * @return {number} The angle in radians. */ @@ -8211,12 +8514,12 @@ module.exports = BetweenPoints; /***/ }), -/* 39 */ +/* 42 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8229,8 +8532,8 @@ module.exports = BetweenPoints; * @function Phaser.Math.Angle.BetweenPointsY * @since 3.0.0 * - * @param {(Phaser.Geom.Point|object)} point1 - The first point. - * @param {(Phaser.Geom.Point|object)} point2 - The second point. + * @param {Phaser.Types.Math.Vector2Like} point1 - The first point. + * @param {Phaser.Types.Math.Vector2Like} point2 - The second point. * * @return {number} The angle in radians. */ @@ -8243,12 +8546,12 @@ module.exports = BetweenPointsY; /***/ }), -/* 40 */ +/* 43 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8277,16 +8580,74 @@ module.exports = BetweenY; /***/ }), -/* 41 */ +/* 44 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @author @samme + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Normalize = __webpack_require__(16); +var FloatBetween = __webpack_require__(8); + +/** + * Returns a random angle in the range [-pi, pi]. + * + * @function Phaser.Math.Angle.Random + * @since 3.23.0 + * + * @return {number} The angle, in radians. + */ +var Random = function () +{ + return FloatBetween(-Math.PI, Math.PI); +}; + +module.exports = Random; + + +/***/ }), +/* 45 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author @samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var FloatBetween = __webpack_require__(8); + +/** + * Returns a random angle in the range [-180, 180]. + * + * @function Phaser.Math.Angle.RandomDegrees + * @since 3.23.0 + * + * @return {number} The angle, in degrees. + */ +var RandomDegrees = function () +{ + return FloatBetween(-180, 180); +}; + +module.exports = RandomDegrees; + + +/***/ }), +/* 46 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Normalize = __webpack_require__(17); /** * Reverse the given angle. @@ -8307,12 +8668,12 @@ module.exports = Reverse; /***/ }), -/* 42 */ +/* 47 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8374,12 +8735,12 @@ module.exports = RotateTo; /***/ }), -/* 43 */ +/* 48 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8423,12 +8784,12 @@ module.exports = ShortestBetween; /***/ }), -/* 44 */ +/* 49 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8438,20 +8799,24 @@ module.exports = ShortestBetween; module.exports = { - Between: __webpack_require__(45), - Power: __webpack_require__(46), - Squared: __webpack_require__(47) + Between: __webpack_require__(50), + BetweenPoints: __webpack_require__(51), + BetweenPointsSquared: __webpack_require__(52), + Chebyshev: __webpack_require__(53), + Power: __webpack_require__(54), + Snake: __webpack_require__(55), + Squared: __webpack_require__(56) }; /***/ }), -/* 45 */ +/* 50 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8480,12 +8845,110 @@ module.exports = DistanceBetween; /***/ }), -/* 46 */ +/* 51 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the distance between two points. + * + * @function Phaser.Math.Distance.BetweenPoints + * @since 3.22.0 + * + * @param {Phaser.Types.Math.Vector2Like} a - The first point. + * @param {Phaser.Types.Math.Vector2Like} b - The second point. + * + * @return {number} The distance between the points. + */ +var DistanceBetweenPoints = function (a, b) +{ + var dx = a.x - b.x; + var dy = a.y - b.y; + + return Math.sqrt(dx * dx + dy * dy); +}; + +module.exports = DistanceBetweenPoints; + + +/***/ }), +/* 52 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the squared distance between two points. + * + * @function Phaser.Math.Distance.BetweenPointsSquared + * @since 3.22.0 + * + * @param {Phaser.Types.Math.Vector2Like} a - The first point. + * @param {Phaser.Types.Math.Vector2Like} b - The second point. + * + * @return {number} The squared distance between the points. + */ +var DistanceBetweenPointsSquared = function (a, b) +{ + var dx = a.x - b.x; + var dy = a.y - b.y; + + return dx * dx + dy * dy; +}; + +module.exports = DistanceBetweenPointsSquared; + + +/***/ }), +/* 53 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the Chebyshev distance between two sets of coordinates (points). + * + * Chebyshev distance (or chessboard distance) is the maximum of the horizontal and vertical distances. + * It's the effective distance when movement can be horizontal, vertical, or diagonal. + * + * @function Phaser.Math.Distance.Chebyshev + * @since 3.22.0 + * + * @param {number} x1 - The x coordinate of the first point. + * @param {number} y1 - The y coordinate of the first point. + * @param {number} x2 - The x coordinate of the second point. + * @param {number} y2 - The y coordinate of the second point. + * + * @return {number} The distance between each point. + */ +var ChebyshevDistance = function (x1, y1, x2, y2) +{ + return Math.max(Math.abs(x1 - x2), Math.abs(y1 - y2)); +}; + +module.exports = ChebyshevDistance; + + +/***/ }), +/* 54 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8514,12 +8977,46 @@ module.exports = DistancePower; /***/ }), -/* 47 */ +/* 55 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the snake distance between two sets of coordinates (points). + * + * Snake distance (rectilinear distance, Manhattan distance) is the sum of the horizontal and vertical distances. + * It's the effective distance when movement is allowed only horizontally or vertically (but not both). + * + * @function Phaser.Math.Distance.Snake + * @since 3.22.0 + * + * @param {number} x1 - The x coordinate of the first point. + * @param {number} y1 - The y coordinate of the first point. + * @param {number} x2 - The x coordinate of the second point. + * @param {number} y2 - The y coordinate of the second point. + * + * @return {number} The distance between each point. + */ +var SnakeDistance = function (x1, y1, x2, y2) +{ + return Math.abs(x1 - x2) + Math.abs(y1 - y2); +}; + +module.exports = SnakeDistance; + + +/***/ }), +/* 56 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8548,12 +9045,12 @@ module.exports = DistanceSquared; /***/ }), -/* 48 */ +/* 57 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8563,29 +9060,29 @@ module.exports = DistanceSquared; module.exports = { - Back: __webpack_require__(49), - Bounce: __webpack_require__(53), - Circular: __webpack_require__(57), - Cubic: __webpack_require__(61), - Elastic: __webpack_require__(65), - Expo: __webpack_require__(69), - Linear: __webpack_require__(73), - Quadratic: __webpack_require__(75), - Quartic: __webpack_require__(79), - Quintic: __webpack_require__(83), - Sine: __webpack_require__(87), - Stepped: __webpack_require__(91) + Back: __webpack_require__(58), + Bounce: __webpack_require__(62), + Circular: __webpack_require__(66), + Cubic: __webpack_require__(70), + Elastic: __webpack_require__(74), + Expo: __webpack_require__(78), + Linear: __webpack_require__(82), + Quadratic: __webpack_require__(84), + Quartic: __webpack_require__(88), + Quintic: __webpack_require__(92), + Sine: __webpack_require__(96), + Stepped: __webpack_require__(100) }; /***/ }), -/* 49 */ +/* 58 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8595,20 +9092,20 @@ module.exports = { module.exports = { - In: __webpack_require__(50), - Out: __webpack_require__(51), - InOut: __webpack_require__(52) + In: __webpack_require__(59), + Out: __webpack_require__(60), + InOut: __webpack_require__(61) }; /***/ }), -/* 50 */ +/* 59 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8634,12 +9131,12 @@ module.exports = In; /***/ }), -/* 51 */ +/* 60 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8665,12 +9162,12 @@ module.exports = Out; /***/ }), -/* 52 */ +/* 61 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8705,12 +9202,12 @@ module.exports = InOut; /***/ }), -/* 53 */ +/* 62 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8720,20 +9217,20 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(54), - Out: __webpack_require__(55), - InOut: __webpack_require__(56) + In: __webpack_require__(63), + Out: __webpack_require__(64), + InOut: __webpack_require__(65) }; /***/ }), -/* 54 */ +/* 63 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8773,12 +9270,12 @@ module.exports = In; /***/ }), -/* 55 */ +/* 64 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8816,12 +9313,12 @@ module.exports = Out; /***/ }), -/* 56 */ +/* 65 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8880,12 +9377,12 @@ module.exports = InOut; /***/ }), -/* 57 */ +/* 66 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8895,20 +9392,20 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(58), - Out: __webpack_require__(59), - InOut: __webpack_require__(60) + In: __webpack_require__(67), + Out: __webpack_require__(68), + InOut: __webpack_require__(69) }; /***/ }), -/* 58 */ +/* 67 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8931,12 +9428,12 @@ module.exports = In; /***/ }), -/* 59 */ +/* 68 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8959,12 +9456,12 @@ module.exports = Out; /***/ }), -/* 60 */ +/* 69 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8994,12 +9491,12 @@ module.exports = InOut; /***/ }), -/* 61 */ +/* 70 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9009,20 +9506,20 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(62), - Out: __webpack_require__(63), - InOut: __webpack_require__(64) + In: __webpack_require__(71), + Out: __webpack_require__(72), + InOut: __webpack_require__(73) }; /***/ }), -/* 62 */ +/* 71 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9045,12 +9542,12 @@ module.exports = In; /***/ }), -/* 63 */ +/* 72 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9073,12 +9570,12 @@ module.exports = Out; /***/ }), -/* 64 */ +/* 73 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9108,12 +9605,12 @@ module.exports = InOut; /***/ }), -/* 65 */ +/* 74 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9123,20 +9620,20 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(66), - Out: __webpack_require__(67), - InOut: __webpack_require__(68) + In: __webpack_require__(75), + Out: __webpack_require__(76), + InOut: __webpack_require__(77) }; /***/ }), -/* 66 */ +/* 75 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9186,12 +9683,12 @@ module.exports = In; /***/ }), -/* 67 */ +/* 76 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9241,12 +9738,12 @@ module.exports = Out; /***/ }), -/* 68 */ +/* 77 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9303,12 +9800,12 @@ module.exports = InOut; /***/ }), -/* 69 */ +/* 78 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9318,20 +9815,20 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(70), - Out: __webpack_require__(71), - InOut: __webpack_require__(72) + In: __webpack_require__(79), + Out: __webpack_require__(80), + InOut: __webpack_require__(81) }; /***/ }), -/* 70 */ +/* 79 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9354,12 +9851,12 @@ module.exports = In; /***/ }), -/* 71 */ +/* 80 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9382,12 +9879,12 @@ module.exports = Out; /***/ }), -/* 72 */ +/* 81 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9417,36 +9914,32 @@ module.exports = InOut; /***/ }), -/* 73 */ +/* 82 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -/** - * @namespace Phaser.Math.Easing.Linear - */ - -module.exports = __webpack_require__(74); +module.exports = __webpack_require__(83); /***/ }), -/* 74 */ +/* 83 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * Linear easing (no variation). * - * @function Phaser.Math.Easing.Linear.Linear + * @function Phaser.Math.Easing.Linear * @since 3.0.0 * * @param {number} v - The value to be tweened. @@ -9462,12 +9955,12 @@ module.exports = Linear; /***/ }), -/* 75 */ +/* 84 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9477,20 +9970,20 @@ module.exports = Linear; module.exports = { - In: __webpack_require__(76), - Out: __webpack_require__(77), - InOut: __webpack_require__(78) + In: __webpack_require__(85), + Out: __webpack_require__(86), + InOut: __webpack_require__(87) }; /***/ }), -/* 76 */ +/* 85 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9513,12 +10006,12 @@ module.exports = In; /***/ }), -/* 77 */ +/* 86 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9541,12 +10034,12 @@ module.exports = Out; /***/ }), -/* 78 */ +/* 87 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9576,12 +10069,12 @@ module.exports = InOut; /***/ }), -/* 79 */ +/* 88 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9591,20 +10084,20 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(80), - Out: __webpack_require__(81), - InOut: __webpack_require__(82) + In: __webpack_require__(89), + Out: __webpack_require__(90), + InOut: __webpack_require__(91) }; /***/ }), -/* 80 */ +/* 89 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9627,12 +10120,12 @@ module.exports = In; /***/ }), -/* 81 */ +/* 90 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9655,12 +10148,12 @@ module.exports = Out; /***/ }), -/* 82 */ +/* 91 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9690,12 +10183,12 @@ module.exports = InOut; /***/ }), -/* 83 */ +/* 92 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9705,20 +10198,20 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(84), - Out: __webpack_require__(85), - InOut: __webpack_require__(86) + In: __webpack_require__(93), + Out: __webpack_require__(94), + InOut: __webpack_require__(95) }; /***/ }), -/* 84 */ +/* 93 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9741,12 +10234,12 @@ module.exports = In; /***/ }), -/* 85 */ +/* 94 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9769,12 +10262,12 @@ module.exports = Out; /***/ }), -/* 86 */ +/* 95 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9804,12 +10297,12 @@ module.exports = InOut; /***/ }), -/* 87 */ +/* 96 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9819,20 +10312,20 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(88), - Out: __webpack_require__(89), - InOut: __webpack_require__(90) + In: __webpack_require__(97), + Out: __webpack_require__(98), + InOut: __webpack_require__(99) }; /***/ }), -/* 88 */ +/* 97 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9866,12 +10359,12 @@ module.exports = In; /***/ }), -/* 89 */ +/* 98 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9905,12 +10398,12 @@ module.exports = Out; /***/ }), -/* 90 */ +/* 99 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9944,12 +10437,12 @@ module.exports = InOut; /***/ }), -/* 91 */ +/* 100 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9957,23 +10450,23 @@ module.exports = InOut; * @namespace Phaser.Math.Easing.Stepped */ -module.exports = __webpack_require__(92); +module.exports = __webpack_require__(101); /***/ }), -/* 92 */ +/* 101 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * Stepped easing. * - * @function Phaser.Math.Easing.Stepped.Stepped + * @function Phaser.Math.Easing.Stepped * @since 3.0.0 * * @param {number} v - The value to be tweened. @@ -10003,12 +10496,12 @@ module.exports = Stepped; /***/ }), -/* 93 */ +/* 102 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10018,22 +10511,22 @@ module.exports = Stepped; module.exports = { - Ceil: __webpack_require__(94), - Equal: __webpack_require__(95), - Floor: __webpack_require__(96), - GreaterThan: __webpack_require__(97), - LessThan: __webpack_require__(98) + Ceil: __webpack_require__(103), + Equal: __webpack_require__(20), + Floor: __webpack_require__(104), + GreaterThan: __webpack_require__(105), + LessThan: __webpack_require__(106) }; /***/ }), -/* 94 */ +/* 103 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10059,46 +10552,12 @@ module.exports = Ceil; /***/ }), -/* 95 */ +/* 104 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Check whether the given values are fuzzily equal. - * - * Two numbers are fuzzily equal if their difference is less than `epsilon`. - * - * @function Phaser.Math.Fuzzy.Equal - * @since 3.0.0 - * - * @param {number} a - The first value. - * @param {number} b - The second value. - * @param {number} [epsilon=0.0001] - The epsilon. - * - * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`. - */ -var Equal = function (a, b, epsilon) -{ - if (epsilon === undefined) { epsilon = 0.0001; } - - return Math.abs(a - b) < epsilon; -}; - -module.exports = Equal; - - -/***/ }), -/* 96 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10124,12 +10583,12 @@ module.exports = Floor; /***/ }), -/* 97 */ +/* 105 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10158,12 +10617,12 @@ module.exports = GreaterThan; /***/ }), -/* 98 */ +/* 106 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10192,12 +10651,12 @@ module.exports = LessThan; /***/ }), -/* 99 */ +/* 107 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10207,28 +10666,28 @@ module.exports = LessThan; module.exports = { - Bezier: __webpack_require__(100), - CatmullRom: __webpack_require__(101), - CubicBezier: __webpack_require__(102), - Linear: __webpack_require__(103), - QuadraticBezier: __webpack_require__(104), - SmoothStep: __webpack_require__(105), - SmootherStep: __webpack_require__(106) + Bezier: __webpack_require__(108), + CatmullRom: __webpack_require__(109), + CubicBezier: __webpack_require__(110), + Linear: __webpack_require__(111), + QuadraticBezier: __webpack_require__(112), + SmoothStep: __webpack_require__(113), + SmootherStep: __webpack_require__(114) }; /***/ }), -/* 100 */ +/* 108 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bernstein = __webpack_require__(19); +var Bernstein = __webpack_require__(21); /** * A bezier interpolation method. @@ -10258,16 +10717,16 @@ module.exports = BezierInterpolation; /***/ }), -/* 101 */ +/* 109 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CatmullRom = __webpack_require__(21); +var CatmullRom = __webpack_require__(23); /** * A Catmull-Rom interpolation method. @@ -10315,12 +10774,12 @@ module.exports = CatmullRomInterpolation; /***/ }), -/* 102 */ +/* 110 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10385,16 +10844,16 @@ module.exports = CubicBezierInterpolation; /***/ }), -/* 103 */ +/* 111 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Linear = __webpack_require__(22); +var Linear = __webpack_require__(24); /** * A linear interpolation method. @@ -10432,12 +10891,12 @@ module.exports = LinearInterpolation; /***/ }), -/* 104 */ +/* 112 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10491,16 +10950,16 @@ module.exports = QuadraticBezierInterpolation; /***/ }), -/* 105 */ +/* 113 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmoothStep = __webpack_require__(23); +var SmoothStep = __webpack_require__(25); /** * A Smooth Step interpolation method. @@ -10524,16 +10983,16 @@ module.exports = SmoothStepInterpolation; /***/ }), -/* 106 */ +/* 114 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmootherStep = __webpack_require__(24); +var SmootherStep = __webpack_require__(26); /** * A Smoother Step interpolation method. @@ -10557,12 +11016,12 @@ module.exports = SmootherStepInterpolation; /***/ }), -/* 107 */ +/* 115 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10572,27 +11031,27 @@ module.exports = SmootherStepInterpolation; module.exports = { - GetNext: __webpack_require__(108), - IsSize: __webpack_require__(109), - IsValue: __webpack_require__(110) + GetNext: __webpack_require__(116), + IsSize: __webpack_require__(117), + IsValue: __webpack_require__(118) }; /***/ }), -/* 108 */ +/* 116 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * Returns the nearest power of 2 to the given `value`. * - * @function Phaser.Math.Pow2.GetPowerOfTwo + * @function Phaser.Math.Pow2.GetNext * @since 3.0.0 * * @param {number} value - The value. @@ -10610,12 +11069,12 @@ module.exports = GetPowerOfTwo; /***/ }), -/* 109 */ +/* 117 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10623,7 +11082,7 @@ module.exports = GetPowerOfTwo; * Checks if the given `width` and `height` are a power of two. * Useful for checking texture dimensions. * - * @function Phaser.Math.Pow2.IsSizePowerOfTwo + * @function Phaser.Math.Pow2.IsSize * @since 3.0.0 * * @param {number} width - The width. @@ -10640,19 +11099,19 @@ module.exports = IsSizePowerOfTwo; /***/ }), -/* 110 */ +/* 118 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * Tests the value and returns `true` if it is a power of two. * - * @function Phaser.Math.Pow2.IsValuePowerOfTwo + * @function Phaser.Math.Pow2.IsValue * @since 3.0.0 * * @param {number} value - The value to check if it's a power of two. @@ -10668,12 +11127,12 @@ module.exports = IsValuePowerOfTwo; /***/ }), -/* 111 */ +/* 119 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10683,20 +11142,20 @@ module.exports = IsValuePowerOfTwo; module.exports = { - Ceil: __webpack_require__(112), - Floor: __webpack_require__(113), - To: __webpack_require__(114) + Ceil: __webpack_require__(120), + Floor: __webpack_require__(121), + To: __webpack_require__(122) }; /***/ }), -/* 112 */ +/* 120 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10735,12 +11194,12 @@ module.exports = SnapCeil; /***/ }), -/* 113 */ +/* 121 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10779,12 +11238,12 @@ module.exports = SnapFloor; /***/ }), -/* 114 */ +/* 122 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10822,12 +11281,12 @@ module.exports = SnapTo; /***/ }), -/* 115 */ +/* 123 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11174,10 +11633,14 @@ var RandomDataGenerator = new Class({ * * @method Phaser.Math.RandomDataGenerator#pick * @since 3.0.0 + * + * @generic T + * @genericUse {T[]} - [array] + * @genericUse {T} - [$return] * - * @param {array} array - The array to pick a random element from. + * @param {T[]} array - The array to pick a random element from. * - * @return {*} A random member of the array. + * @return {T} A random member of the array. */ pick: function (array) { @@ -11203,9 +11666,13 @@ var RandomDataGenerator = new Class({ * @method Phaser.Math.RandomDataGenerator#weightedPick * @since 3.0.0 * - * @param {array} array - The array to pick a random element from. + * @generic T + * @genericUse {T[]} - [array] + * @genericUse {T} - [$return] * - * @return {*} A random member of the array. + * @param {T[]} array - The array to pick a random element from. + * + * @return {T} A random member of the array. */ weightedPick: function (array) { @@ -11295,9 +11762,12 @@ var RandomDataGenerator = new Class({ * @method Phaser.Math.RandomDataGenerator#shuffle * @since 3.7.0 * - * @param {array} [array] - The array to be shuffled. + * @generic T + * @genericUse {T[]} - [array,$return] * - * @return {array} The shuffled array. + * @param {T[]} [array] - The array to be shuffled. + * + * @return {T[]} The shuffled array. */ shuffle: function (array) { @@ -11321,12 +11791,12 @@ module.exports = RandomDataGenerator; /***/ }), -/* 116 */ +/* 124 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11356,12 +11826,12 @@ module.exports = Average; /***/ }), -/* 117 */ +/* 125 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11385,12 +11855,12 @@ module.exports = Between; /***/ }), -/* 118 */ +/* 126 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11422,12 +11892,12 @@ module.exports = CeilTo; /***/ }), -/* 119 */ +/* 127 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11451,41 +11921,12 @@ module.exports = Difference; /***/ }), -/* 120 */ +/* 128 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive. - * - * @function Phaser.Math.FloatBetween - * @since 3.0.0 - * - * @param {number} min - The lower bound for the float, inclusive. - * @param {number} max - The upper bound for the float exclusive. - * - * @return {number} A random float within the given range. - */ -var FloatBetween = function (min, max) -{ - return Math.random() * (max - min) + min; -}; - -module.exports = FloatBetween; - - -/***/ }), -/* 121 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11517,16 +11958,16 @@ module.exports = FloorTo; /***/ }), -/* 122 */ +/* 129 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(8); +var Clamp = __webpack_require__(9); /** * Return a value based on the range between `min` and `max` and the percentage given. @@ -11551,25 +11992,29 @@ module.exports = FromPercent; /***/ }), -/* 123 */ +/* 130 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * Calculate the speed required to cover a distance in the time given. + * Calculate a per-ms speed from a distance and time (given in seconds). * * @function Phaser.Math.GetSpeed * @since 3.0.0 * - * @param {number} distance - The distance to travel in pixels. - * @param {integer} time - The time, in ms, to cover the distance in. + * @param {number} distance - The distance. + * @param {integer} time - The time, in seconds. * - * @return {number} The amount you will need to increment the position by each step in order to cover the distance in the time given. + * @return {number} The speed, in distance per ms. + * + * @example + * // 400px over 1 second is 0.4 px/ms + * Phaser.Math.GetSpeed(400, 1) // -> 0.4 */ var GetSpeed = function (distance, time) { @@ -11580,12 +12025,12 @@ module.exports = GetSpeed; /***/ }), -/* 124 */ +/* 131 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11611,12 +12056,12 @@ module.exports = IsEven; /***/ }), -/* 125 */ +/* 132 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11640,12 +12085,12 @@ module.exports = IsEvenStrict; /***/ }), -/* 126 */ +/* 133 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11670,12 +12115,12 @@ module.exports = MaxAdd; /***/ }), -/* 127 */ +/* 134 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11700,12 +12145,12 @@ module.exports = MinSub; /***/ }), -/* 128 */ +/* 135 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11759,12 +12204,12 @@ module.exports = Percent; /***/ }), -/* 129 */ +/* 136 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11799,12 +12244,12 @@ module.exports = RandomXY; /***/ }), -/* 130 */ +/* 137 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11838,12 +12283,12 @@ module.exports = RandomXYZ; /***/ }), -/* 131 */ +/* 138 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11875,12 +12320,12 @@ module.exports = RandomXYZW; /***/ }), -/* 132 */ +/* 139 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11910,27 +12355,31 @@ module.exports = Rotate; /***/ }), -/* 133 */ +/* 140 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * Rotate a `point` around `x` and `y` by the given `angle`. + * Rotate a `point` around `x` and `y` to the given `angle`, at the same distance. + * + * In polar notation, this maps a point from (r, t) to (r, angle), vs. the origin (x, y). * * @function Phaser.Math.RotateAround * @since 3.0.0 * + * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return] + * * @param {(Phaser.Geom.Point|object)} point - The point to be rotated. * @param {number} x - The horizontal coordinate to rotate around. * @param {number} y - The vertical coordinate to rotate around. * @param {number} angle - The angle of rotation in radians. * - * @return {Phaser.Geom.Point} The given point, rotated by the given angle around the given coordinates. + * @return {Phaser.Types.Math.Vector2Like} The given point. */ var RotateAround = function (point, x, y, angle) { @@ -11950,28 +12399,32 @@ module.exports = RotateAround; /***/ }), -/* 134 */ +/* 141 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * Rotate a `point` around `x` and `y` by the given `angle` and `distance`. * + * In polar notation, this maps a point from (r, t) to (distance, t + angle), vs. the origin (x, y). + * * @function Phaser.Math.RotateAroundDistance * @since 3.0.0 * + * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return] + * * @param {(Phaser.Geom.Point|object)} point - The point to be rotated. * @param {number} x - The horizontal coordinate to rotate around. * @param {number} y - The vertical coordinate to rotate around. * @param {number} angle - The angle of rotation in radians. * @param {number} distance - The distance from (x, y) to place the point at. * - * @return {Phaser.Geom.Point} The given point. + * @return {Phaser.Types.Math.Vector2Like} The given point. */ var RotateAroundDistance = function (point, x, y, angle, distance) { @@ -11987,12 +12440,49 @@ module.exports = RotateAroundDistance; /***/ }), -/* 135 */ +/* 142 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Position a `point` at the given `angle` and `distance` to (`x`, `y`). + * + * @function Phaser.Math.RotateTo + * @since 3.24.0 + * + * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return] + * + * @param {Phaser.Types.Math.Vector2Like} point - The point to be positioned. + * @param {number} x - The horizontal coordinate to position from. + * @param {number} y - The vertical coordinate to position from. + * @param {number} angle - The angle of rotation in radians. + * @param {number} distance - The distance from (x, y) to place the point at. + * + * @return {Phaser.Types.Math.Vector2Like} The given point. + */ +var RotateTo = function (point, x, y, angle, distance) +{ + point.x = x + (distance * Math.cos(angle)); + point.y = y + (distance * Math.sin(angle)); + + return point; +}; + +module.exports = RotateTo; + + +/***/ }), +/* 143 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12016,12 +12506,12 @@ module.exports = RoundAwayFromZero; /***/ }), -/* 136 */ +/* 144 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12068,12 +12558,12 @@ module.exports = RoundTo; /***/ }), -/* 137 */ +/* 145 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12121,23 +12611,23 @@ module.exports = SinCosTableGenerator; /***/ }), -/* 138 */ +/* 146 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector2 = __webpack_require__(5); +var Vector2 = __webpack_require__(3); /** - * Returns a Vec2 containing the x and y position of the given index in a `width` x `height` sized grid. + * Returns a Vector2 containing the x and y position of the given index in a `width` x `height` sized grid. * * For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2. * - * If the given index is out of range an empty Vec2 is returned. + * If the given index is out of range an empty Vector2 is returned. * * @function Phaser.Math.ToXY * @since 3.19.0 @@ -12179,67 +12669,12 @@ module.exports = ToXY; /***/ }), -/* 139 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Vector2 = __webpack_require__(5); - -/** - * Takes the `x` and `y` coordinates and transforms them into the same space as - * defined by the position, rotation and scale values. - * - * @function Phaser.Math.TransformXY - * @since 3.0.0 - * - * @param {number} x - The x coordinate to be transformed. - * @param {number} y - The y coordinate to be transformed. - * @param {number} positionX - Horizontal position of the transform point. - * @param {number} positionY - Vertical position of the transform point. - * @param {number} rotation - Rotation of the transform point, in radians. - * @param {number} scaleX - Horizontal scale of the transform point. - * @param {number} scaleY - Vertical scale of the transform point. - * @param {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} [output] - The output vector, point or object for the translated coordinates. - * - * @return {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} The translated point. - */ -var TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output) -{ - if (output === undefined) { output = new Vector2(); } - - var radianSin = Math.sin(rotation); - var radianCos = Math.cos(rotation); - - // Rotate and Scale - var a = radianCos * scaleX; - var b = radianSin * scaleX; - var c = -radianSin * scaleY; - var d = radianCos * scaleY; - - // Invert - var id = 1 / ((a * d) + (c * -b)); - - output.x = (d * id * x) + (-c * id * y) + (((positionY * c) - (positionX * d)) * id); - output.y = (a * id * y) + (-b * id * x) + (((-positionY * a) + (positionX * b)) * id); - - return output; -}; - -module.exports = TransformXY; - - -/***/ }), -/* 140 */ +/* 147 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12264,12 +12699,12 @@ module.exports = Within; /***/ }), -/* 141 */ +/* 148 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12809,18 +13244,18 @@ module.exports = Vector4; /***/ }), -/* 142 */ +/* 149 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector3 = __webpack_require__(10); -var Matrix4 = __webpack_require__(27); -var Quaternion = __webpack_require__(28); +var Vector3 = __webpack_require__(11); +var Matrix4 = __webpack_require__(30); +var Quaternion = __webpack_require__(31); var tmpMat4 = new Matrix4(); var tmpQuat = new Quaternion(); @@ -12857,12 +13292,12 @@ module.exports = RotateVec3; /***/ }), -/* 143 */ +/* 150 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12888,18 +13323,18 @@ module.exports = 'resize'; /***/ }), -/* 144 */ +/* 151 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey -* @copyright 2019 Photon Storm Ltd. +* @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ -var BasePlugin = __webpack_require__(145); +var BasePlugin = __webpack_require__(152); var Class = __webpack_require__(0); -var SceneEvents = __webpack_require__(146); +var SceneEvents = __webpack_require__(153); /** * @classdesc @@ -13016,12 +13451,12 @@ module.exports = ScenePlugin; /***/ }), -/* 145 */ +/* 152 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey -* @copyright 2019 Photon Storm Ltd. +* @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ @@ -13146,12 +13581,12 @@ module.exports = BasePlugin; /***/ }), -/* 146 */ +/* 153 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13161,36 +13596,64 @@ module.exports = BasePlugin; module.exports = { - BOOT: __webpack_require__(147), - CREATE: __webpack_require__(148), - DESTROY: __webpack_require__(149), - PAUSE: __webpack_require__(150), - POST_UPDATE: __webpack_require__(151), - PRE_UPDATE: __webpack_require__(152), - READY: __webpack_require__(153), - RENDER: __webpack_require__(154), - RESUME: __webpack_require__(155), - SHUTDOWN: __webpack_require__(156), - SLEEP: __webpack_require__(157), - START: __webpack_require__(158), - TRANSITION_COMPLETE: __webpack_require__(159), - TRANSITION_INIT: __webpack_require__(160), - TRANSITION_OUT: __webpack_require__(161), - TRANSITION_START: __webpack_require__(162), - TRANSITION_WAKE: __webpack_require__(163), - UPDATE: __webpack_require__(164), - WAKE: __webpack_require__(165) + ADDED_TO_SCENE: __webpack_require__(154), + BOOT: __webpack_require__(155), + CREATE: __webpack_require__(156), + DESTROY: __webpack_require__(157), + PAUSE: __webpack_require__(158), + POST_UPDATE: __webpack_require__(159), + PRE_UPDATE: __webpack_require__(160), + READY: __webpack_require__(161), + REMOVED_FROM_SCENE: __webpack_require__(162), + RENDER: __webpack_require__(163), + RESUME: __webpack_require__(164), + SHUTDOWN: __webpack_require__(165), + SLEEP: __webpack_require__(166), + START: __webpack_require__(167), + TRANSITION_COMPLETE: __webpack_require__(168), + TRANSITION_INIT: __webpack_require__(169), + TRANSITION_OUT: __webpack_require__(170), + TRANSITION_START: __webpack_require__(171), + TRANSITION_WAKE: __webpack_require__(172), + UPDATE: __webpack_require__(173), + WAKE: __webpack_require__(174) }; /***/ }), -/* 147 */ +/* 154 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Object Added to Scene Event. + * + * This event is dispatched when a Game Object is added to a Scene. + * + * Listen for it from a Scene using `this.scene.events.on('addedtoscene', listener)`. + * + * @event Phaser.Scenes.Events#ADDED_TO_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene. + * @param {Phaser.Scene} scene - The Scene to which the Game Object was added. + */ +module.exports = 'addedtoscene'; + + +/***/ }), +/* 155 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13210,12 +13673,12 @@ module.exports = 'boot'; /***/ }), -/* 148 */ +/* 156 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13239,12 +13702,12 @@ module.exports = 'create'; /***/ }), -/* 149 */ +/* 157 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13266,12 +13729,12 @@ module.exports = 'destroy'; /***/ }), -/* 150 */ +/* 158 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13293,12 +13756,12 @@ module.exports = 'pause'; /***/ }), -/* 151 */ +/* 159 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13330,12 +13793,12 @@ module.exports = 'postupdate'; /***/ }), -/* 152 */ +/* 160 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13367,12 +13830,12 @@ module.exports = 'preupdate'; /***/ }), -/* 153 */ +/* 161 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13395,12 +13858,38 @@ module.exports = 'ready'; /***/ }), -/* 154 */ +/* 162 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Object Removed from Scene Event. + * + * This event is dispatched when a Game Object is removed from a Scene. + * + * Listen for it from a Scene using `this.scene.events.on('removedfromscene', listener)`. + * + * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene. + * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed. + */ +module.exports = 'removedfromscene'; + + +/***/ }), +/* 163 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13431,12 +13920,12 @@ module.exports = 'render'; /***/ }), -/* 155 */ +/* 164 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13458,12 +13947,12 @@ module.exports = 'resume'; /***/ }), -/* 156 */ +/* 165 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13488,12 +13977,12 @@ module.exports = 'shutdown'; /***/ }), -/* 157 */ +/* 166 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13515,12 +14004,12 @@ module.exports = 'sleep'; /***/ }), -/* 158 */ +/* 167 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13540,12 +14029,12 @@ module.exports = 'start'; /***/ }), -/* 159 */ +/* 168 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13576,12 +14065,12 @@ module.exports = 'transitioncomplete'; /***/ }), -/* 160 */ +/* 169 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13613,12 +14102,12 @@ module.exports = 'transitioninit'; /***/ }), -/* 161 */ +/* 170 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13647,12 +14136,12 @@ module.exports = 'transitionout'; /***/ }), -/* 162 */ +/* 171 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13687,12 +14176,12 @@ module.exports = 'transitionstart'; /***/ }), -/* 163 */ +/* 172 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13722,12 +14211,12 @@ module.exports = 'transitionwake'; /***/ }), -/* 164 */ +/* 173 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13759,12 +14248,12 @@ module.exports = 'update'; /***/ }), -/* 165 */ +/* 174 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13786,17 +14275,17 @@ module.exports = 'wake'; /***/ }), -/* 166 */ +/* 175 */ /***/ (function(module, exports) { /*** IMPORTS FROM imports-loader ***/ -(function() { +(function() { var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { @@ -14469,17 +14958,15 @@ var spine; var slot = skeleton.slots[this.slotIndex]; if (!slot.bone.active) return; - if (direction == MixDirection.mixOut && blend == MixBlend.setup) { - var attachmentName_1 = slot.data.attachmentName; - slot.setAttachment(attachmentName_1 == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName_1)); + if (direction == MixDirection.mixOut) { + if (blend == MixBlend.setup) + this.setAttachment(skeleton, slot, slot.data.attachmentName); return; } var frames = this.frames; if (time < frames[0]) { - if (blend == MixBlend.setup || blend == MixBlend.first) { - var attachmentName_2 = slot.data.attachmentName; - slot.setAttachment(attachmentName_2 == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName_2)); - } + if (blend == MixBlend.setup || blend == MixBlend.first) + this.setAttachment(skeleton, slot, slot.data.attachmentName); return; } var frameIndex = 0; @@ -14491,6 +14978,9 @@ var spine; skeleton.slots[this.slotIndex] .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName)); }; + AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) { + slot.attachment = attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName); + }; return AttachmentTimeline; }()); spine.AttachmentTimeline = AttachmentTimeline; @@ -14592,6 +15082,7 @@ var spine; case MixBlend.replace: for (var i_5 = 0; i_5 < vertexCount; i_5++) deform[i_5] += (lastVertices[i_5] - deform[i_5]) * alpha; + break; case MixBlend.add: var vertexAttachment = slotAttachment; if (vertexAttachment.bones == null) { @@ -14748,8 +15239,9 @@ var spine; DrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) { var drawOrder = skeleton.drawOrder; var slots = skeleton.slots; - if (direction == MixDirection.mixOut && blend == MixBlend.setup) { - spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length); + if (direction == MixDirection.mixOut) { + if (blend == MixBlend.setup) + spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length); return; } var frames = this.frames; @@ -15141,6 +15633,7 @@ var spine; function AnimationState(data) { this.tracks = new Array(); this.timeScale = 1; + this.unkeyedState = 0; this.events = new Array(); this.listeners = new Array(); this.queue = new EventQueue(this); @@ -15230,12 +15723,12 @@ var spine; var events = this.events; var tracks = this.tracks; var applied = false; - for (var i = 0, n = tracks.length; i < n; i++) { - var current = tracks[i]; + for (var i_16 = 0, n_1 = tracks.length; i_16 < n_1; i_16++) { + var current = tracks[i_16]; if (current == null || current.delay > 0) continue; applied = true; - var blend = i == 0 ? spine.MixBlend.first : current.mixBlend; + var blend = i_16 == 0 ? spine.MixBlend.first : current.mixBlend; var mix = current.alpha; if (current.mixingFrom != null) mix *= this.applyMixingFrom(current, skeleton, blend); @@ -15244,10 +15737,14 @@ var spine; var animationLast = current.animationLast, animationTime = current.getAnimationTime(); var timelineCount = current.animation.timelines.length; var timelines = current.animation.timelines; - if ((i == 0 && mix == 1) || blend == spine.MixBlend.add) { + if ((i_16 == 0 && mix == 1) || blend == spine.MixBlend.add) { for (var ii = 0; ii < timelineCount; ii++) { spine.Utils.webkit602BugfixHelper(mix, blend); - timelines[ii].apply(skeleton, animationLast, animationTime, events, mix, blend, spine.MixDirection.mixIn); + var timeline = timelines[ii]; + if (timeline instanceof spine.AttachmentTimeline) + this.applyAttachmentTimeline(timeline, skeleton, animationTime, blend, true); + else + timeline.apply(skeleton, animationLast, animationTime, events, mix, blend, spine.MixDirection.mixIn); } } else { @@ -15257,14 +15754,17 @@ var spine; spine.Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null); var timelinesRotation = current.timelinesRotation; for (var ii = 0; ii < timelineCount; ii++) { - var timeline = timelines[ii]; - var timelineBlend = (timelineMode[ii] & (AnimationState.NOT_LAST - 1)) == AnimationState.SUBSEQUENT ? blend : spine.MixBlend.setup; - if (timeline instanceof spine.RotateTimeline) { - this.applyRotateTimeline(timeline, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame); + var timeline_1 = timelines[ii]; + var timelineBlend = timelineMode[ii] == AnimationState.SUBSEQUENT ? blend : spine.MixBlend.setup; + if (timeline_1 instanceof spine.RotateTimeline) { + this.applyRotateTimeline(timeline_1, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame); + } + else if (timeline_1 instanceof spine.AttachmentTimeline) { + this.applyAttachmentTimeline(timeline_1, skeleton, animationTime, blend, true); } else { spine.Utils.webkit602BugfixHelper(mix, blend); - timeline.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, spine.MixDirection.mixIn); + timeline_1.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, spine.MixDirection.mixIn); } } } @@ -15273,6 +15773,16 @@ var spine; current.nextAnimationLast = animationTime; current.nextTrackLast = current.trackTime; } + var setupState = this.unkeyedState + AnimationState.SETUP; + var slots = skeleton.slots; + for (var i = 0, n = skeleton.slots.length; i < n; i++) { + var slot = slots[i]; + if (slot.attachmentState == setupState) { + var attachmentName = slot.data.attachmentName; + slot.attachment = (attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName)); + } + } + this.unkeyedState += 2; this.queue.drain(); return applied; }; @@ -15316,23 +15826,22 @@ var spine; var direction = spine.MixDirection.mixOut; var timelineBlend = void 0; var alpha = 0; - switch (timelineMode[i] & (AnimationState.NOT_LAST - 1)) { + switch (timelineMode[i]) { case AnimationState.SUBSEQUENT: - timelineBlend = blend; - if (!attachments && timeline instanceof spine.AttachmentTimeline) { - if ((timelineMode[i] & AnimationState.NOT_LAST) == AnimationState.NOT_LAST) - continue; - timelineBlend = spine.MixBlend.setup; - } if (!drawOrder && timeline instanceof spine.DrawOrderTimeline) continue; + timelineBlend = blend; alpha = alphaMix; break; case AnimationState.FIRST: timelineBlend = spine.MixBlend.setup; alpha = alphaMix; break; - case AnimationState.HOLD: + case AnimationState.HOLD_SUBSEQUENT: + timelineBlend = blend; + alpha = alphaHold; + break; + case AnimationState.HOLD_FIRST: timelineBlend = spine.MixBlend.setup; alpha = alphaHold; break; @@ -15345,18 +15854,12 @@ var spine; from.totalAlpha += alpha; if (timeline instanceof spine.RotateTimeline) this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame); + else if (timeline instanceof spine.AttachmentTimeline) + this.applyAttachmentTimeline(timeline, skeleton, animationTime, timelineBlend, attachments); else { spine.Utils.webkit602BugfixHelper(alpha, blend); - if (timelineBlend == spine.MixBlend.setup) { - if (timeline instanceof spine.AttachmentTimeline) { - if (attachments || (timelineMode[i] & AnimationState.NOT_LAST) == AnimationState.NOT_LAST) - direction = spine.MixDirection.mixIn; - } - else if (timeline instanceof spine.DrawOrderTimeline) { - if (drawOrder) - direction = spine.MixDirection.mixIn; - } - } + if (drawOrder && timeline instanceof spine.DrawOrderTimeline && timelineBlend == spine.MixBlend.setup) + direction = spine.MixDirection.mixIn; timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, direction); } } @@ -15368,6 +15871,31 @@ var spine; from.nextTrackLast = from.trackTime; return mix; }; + AnimationState.prototype.applyAttachmentTimeline = function (timeline, skeleton, time, blend, attachments) { + var slot = skeleton.slots[timeline.slotIndex]; + if (!slot.bone.active) + return; + var frames = timeline.frames; + if (time < frames[0]) { + if (blend == spine.MixBlend.setup || blend == spine.MixBlend.first) + this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments); + } + else { + var frameIndex; + if (time >= frames[frames.length - 1]) + frameIndex = frames.length - 1; + else + frameIndex = spine.Animation.binarySearch(frames, time) - 1; + this.setAttachment(skeleton, slot, timeline.attachmentNames[frameIndex], attachments); + } + if (slot.attachmentState <= this.unkeyedState) + slot.attachmentState = this.unkeyedState + AnimationState.SETUP; + }; + AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) { + slot.attachment = attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName); + if (attachments) + slot.attachmentState = this.unkeyedState + AnimationState.CURRENT; + }; AnimationState.prototype.applyRotateTimeline = function (timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) { if (firstFrame) timelinesRotation[i] = 0; @@ -15630,6 +16158,7 @@ var spine; entry.interruptAlpha = 1; entry.mixTime = 0; entry.mixDuration = last == null ? 0 : this.data.getMix(last.animation, animation); + entry.mixBlend = spine.MixBlend.replace; return entry; }; AnimationState.prototype.disposeNext = function (entry) { @@ -15655,14 +16184,6 @@ var spine; entry = entry.mixingTo; } while (entry != null); } - this.propertyIDs.clear(); - for (var i = this.tracks.length - 1; i >= 0; i--) { - var entry = this.tracks[i]; - while (entry != null) { - this.computeNotLast(entry); - entry = entry.mixingFrom; - } - } }; AnimationState.prototype.computeHold = function (entry) { var to = entry.mixingTo; @@ -15674,8 +16195,7 @@ var spine; var propertyIDs = this.propertyIDs; if (to != null && to.holdPrevious) { for (var i = 0; i < timelinesCount; i++) { - propertyIDs.add(timelines[i].getPropertyId()); - timelineMode[i] = AnimationState.HOLD; + timelineMode[i] = propertyIDs.add(timelines[i].getPropertyId()) ? AnimationState.HOLD_FIRST : AnimationState.HOLD_SUBSEQUENT; } return; } @@ -15699,20 +16219,7 @@ var spine; } break; } - timelineMode[i] = AnimationState.HOLD; - } - } - }; - AnimationState.prototype.computeNotLast = function (entry) { - var timelines = entry.animation.timelines; - var timelinesCount = entry.animation.timelines.length; - var timelineMode = entry.timelineMode; - var propertyIDs = this.propertyIDs; - for (var i = 0; i < timelinesCount; i++) { - if (timelines[i] instanceof spine.AttachmentTimeline) { - var timeline = timelines[i]; - if (!propertyIDs.add(timeline.slotIndex)) - timelineMode[i] |= AnimationState.NOT_LAST; + timelineMode[i] = AnimationState.HOLD_FIRST; } } }; @@ -15740,9 +16247,11 @@ var spine; AnimationState.emptyAnimation = new spine.Animation("", [], 0); AnimationState.SUBSEQUENT = 0; AnimationState.FIRST = 1; - AnimationState.HOLD = 2; - AnimationState.HOLD_MIX = 3; - AnimationState.NOT_LAST = 4; + AnimationState.HOLD_SUBSEQUENT = 2; + AnimationState.HOLD_FIRST = 3; + AnimationState.HOLD_MIX = 4; + AnimationState.SETUP = 1; + AnimationState.CURRENT = 2; return AnimationState; }()); spine.AnimationState = AnimationState; @@ -15955,11 +16464,15 @@ var spine; this.errors = {}; this.toLoad = 0; this.loaded = 0; + this.rawDataUris = {}; this.textureLoader = textureLoader; this.pathPrefix = pathPrefix; } - AssetManager.downloadText = function (url, success, error) { + AssetManager.prototype.downloadText = function (url, success, error) { var request = new XMLHttpRequest(); + request.overrideMimeType("text/html"); + if (this.rawDataUris[url]) + url = this.rawDataUris[url]; request.open("GET", url, true); request.onload = function () { if (request.status == 200) { @@ -15974,8 +16487,10 @@ var spine; }; request.send(); }; - AssetManager.downloadBinary = function (url, success, error) { + AssetManager.prototype.downloadBinary = function (url, success, error) { var request = new XMLHttpRequest(); + if (this.rawDataUris[url]) + url = this.rawDataUris[url]; request.open("GET", url, true); request.responseType = "arraybuffer"; request.onload = function () { @@ -15991,13 +16506,16 @@ var spine; }; request.send(); }; + AssetManager.prototype.setRawDataURI = function (path, data) { + this.rawDataUris[this.pathPrefix + path] = data; + }; AssetManager.prototype.loadBinary = function (path, success, error) { var _this = this; if (success === void 0) { success = null; } if (error === void 0) { error = null; } path = this.pathPrefix + path; this.toLoad++; - AssetManager.downloadBinary(path, function (data) { + this.downloadBinary(path, function (data) { _this.assets[path] = data; if (success) success(path, data); @@ -16017,7 +16535,7 @@ var spine; if (error === void 0) { error = null; } path = this.pathPrefix + path; this.toLoad++; - AssetManager.downloadText(path, function (data) { + this.downloadText(path, function (data) { _this.assets[path] = data; if (success) success(path, data); @@ -16036,12 +16554,13 @@ var spine; if (success === void 0) { success = null; } if (error === void 0) { error = null; } path = this.pathPrefix + path; + var storagePath = path; this.toLoad++; var img = new Image(); img.crossOrigin = "anonymous"; img.onload = function (ev) { var texture = _this.textureLoader(img); - _this.assets[path] = texture; + _this.assets[storagePath] = texture; _this.toLoad--; _this.loaded++; if (success) @@ -16054,32 +16573,10 @@ var spine; if (error) error(path, "Couldn't load image " + path); }; + if (this.rawDataUris[path]) + path = this.rawDataUris[path]; img.src = path; }; - AssetManager.prototype.loadTextureData = function (path, data, success, error) { - var _this = this; - if (success === void 0) { success = null; } - if (error === void 0) { error = null; } - path = this.pathPrefix + path; - this.toLoad++; - var img = new Image(); - img.onload = function (ev) { - var texture = _this.textureLoader(img); - _this.assets[path] = texture; - _this.toLoad--; - _this.loaded++; - if (success) - success(path, img); - }; - img.onerror = function (ev) { - _this.errors[path] = "Couldn't load image " + path; - _this.toLoad--; - _this.loaded++; - if (error) - error(path, "Couldn't load image " + path); - }; - img.src = data; - }; AssetManager.prototype.loadTextureAtlas = function (path, success, error) { var _this = this; if (success === void 0) { success = null; } @@ -16087,12 +16584,12 @@ var spine; var parent = path.lastIndexOf("/") >= 0 ? path.substring(0, path.lastIndexOf("/")) : ""; path = this.pathPrefix + path; this.toLoad++; - AssetManager.downloadText(path, function (atlasData) { + this.downloadText(path, function (atlasData) { var pagesLoaded = { count: 0 }; var atlasPages = new Array(); try { var atlas = new spine.TextureAtlas(atlasData, function (path) { - atlasPages.push(parent + "/" + path); + atlasPages.push(parent == "" ? path : parent + "/" + path); var image = document.createElement("img"); image.width = 16; image.height = 16; @@ -16116,7 +16613,7 @@ var spine; if (!pageLoadError) { try { var atlas = new spine.TextureAtlas(atlasData, function (path) { - return _this.get(parent + "/" + path); + return _this.get(parent == "" ? path : parent + "/" + path); }); _this.assets[path] = atlas; if (success) @@ -16354,6 +16851,8 @@ var spine; var prx = 0; if (s > 0.0001) { s = Math.abs(pa * pd - pb * pc) / s; + pa /= this.skeleton.scaleX; + pc /= this.skeleton.scaleY; pb = pc * s; pd = pa * s; prx = Math.atan2(pc, pa) * spine.MathUtils.radDeg; @@ -16624,10 +17123,27 @@ var spine; if (!bone.appliedValid) bone.updateAppliedTransform(); var p = bone.parent; - var id = 1 / (p.a * p.d - p.b * p.c); - var x = targetX - p.worldX, y = targetY - p.worldY; - var tx = (x * p.d - y * p.b) * id - bone.ax, ty = (y * p.a - x * p.c) * id - bone.ay; - var rotationIK = Math.atan2(ty, tx) * spine.MathUtils.radDeg - bone.ashearX - bone.arotation; + var pa = p.a, pb = p.b, pc = p.c, pd = p.d; + var rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0; + switch (bone.data.transformMode) { + case spine.TransformMode.OnlyTranslation: + tx = targetX - bone.worldX; + ty = targetY - bone.worldY; + break; + case spine.TransformMode.NoRotationOrReflection: + var s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc); + var sa = pa / bone.skeleton.scaleX; + var sc = pc / bone.skeleton.scaleY; + pb = -sc * s * bone.skeleton.scaleX; + pd = sa * s * bone.skeleton.scaleY; + rotationIK += Math.atan2(sc, sa) * spine.MathUtils.radDeg; + default: + var x = targetX - p.worldX, y = targetY - p.worldY; + var d = pa * pd - pb * pc; + tx = (x * pd - y * pb) / d - bone.ax; + ty = (y * pa - x * pc) / d - bone.ay; + } + rotationIK += Math.atan2(ty, tx) * spine.MathUtils.radDeg; if (bone.ascaleX < 0) rotationIK += 180; if (rotationIK > 180) @@ -16636,6 +17152,12 @@ var spine; rotationIK += 360; var sx = bone.ascaleX, sy = bone.ascaleY; if (compress || stretch) { + switch (bone.data.transformMode) { + case spine.TransformMode.NoScale: + case spine.TransformMode.NoScaleOrReflection: + tx = targetX - bone.worldX; + ty = targetY - bone.worldY; + } var b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty); if ((compress && dd < b) || (stretch && dd > b) && b > 0.0001) { var s = (dd / b - 1) * alpha + 1; @@ -17294,6 +17816,7 @@ var spine; if (!this.queueAsset(clientId, null, path)) return; var request = new XMLHttpRequest(); + request.overrideMimeType("text/html"); request.onreadystatechange = function () { if (request.readyState == XMLHttpRequest.DONE) { if (request.status >= 200 && request.status < 300) { @@ -17313,6 +17836,7 @@ var spine; if (!this.queueAsset(clientId, null, path)) return; var request = new XMLHttpRequest(); + request.overrideMimeType("text/html"); request.onreadystatechange = function () { if (request.readyState == XMLHttpRequest.DONE) { if (request.status >= 200 && request.status < 300) { @@ -17332,7 +17856,6 @@ var spine; if (!this.queueAsset(clientId, textureLoader, path)) return; var img = new Image(); - img.src = path; img.crossOrigin = "anonymous"; img.onload = function (ev) { _this.rawAssets[path] = img; @@ -17340,6 +17863,7 @@ var spine; img.onerror = function (ev) { _this.errors[path] = "Couldn't load image " + path; }; + img.src = path; }; SharedAssetManager.prototype.get = function (clientId, path) { path = this.pathPrefix + path; @@ -17865,6 +18389,8 @@ var spine; var input = new BinaryInput(binary); skeletonData.hash = input.readString(); skeletonData.version = input.readString(); + if ("3.8.75" == skeletonData.version) + throw new Error("Unsupported skeleton data, please export with a newer version of Spine."); skeletonData.x = input.readFloat(); skeletonData.y = input.readFloat(); skeletonData.width = input.readFloat(); @@ -18853,7 +19379,7 @@ var spine; var clippingPolygon = this.clippingPolygon; SkeletonClipping.makeClockwise(clippingPolygon); var clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon)); - for (var i = 0, n_1 = clippingPolygons.length; i < n_1; i++) { + for (var i = 0, n_2 = clippingPolygons.length; i < n_2; i++) { var polygon = clippingPolygons[i]; SkeletonClipping.makeClockwise(polygon); polygon.push(polygon[0]); @@ -19275,6 +19801,8 @@ var spine; if (skeletonMap != null) { skeletonData.hash = skeletonMap.hash; skeletonData.version = skeletonMap.spine; + if ("3.8.75" == skeletonData.version) + throw new Error("Unsupported skeleton data, please export with a newer version of Spine."); skeletonData.x = skeletonMap.x; skeletonData.y = skeletonMap.y; skeletonData.width = skeletonMap.width; @@ -19952,7 +20480,7 @@ var spine; skeletonData.animations.push(new spine.Animation(name, timelines, duration)); }; SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) { - if (!map.curve) + if (!map.hasOwnProperty("curve")) return; if (map.curve == "stepped") timeline.setStepped(frameIndex); @@ -21267,9 +21795,7 @@ var spine; }; Pool.prototype.freeAll = function (items) { for (var i = 0; i < items.length; i++) { - if (items[i].reset) - items[i].reset(); - this.items[i] = items[i]; + this.free(items[i]); } }; Pool.prototype.clear = function () { @@ -21811,7 +22337,7 @@ var spine; worldVertices[offset + 1] = offsetX * c + offsetY * d + y; }; RegionAttachment.prototype.copy = function () { - var copy = new RegionAttachment(name); + var copy = new RegionAttachment(this.name); copy.region = this.region; copy.rendererObject = this.rendererObject; copy.path = this.path; @@ -22197,13 +22723,14 @@ var spine; })(canvas = spine.canvas || (spine.canvas = {})); })(spine || (spine = {})); //# sourceMappingURL=spine-canvas.js.map - /*** EXPORTS FROM exports-loader ***/ module.exports = spine; + }.call(window)); + /***/ }), -/* 167 */ +/* 176 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -22213,24 +22740,22 @@ module.exports = spine; */ var Class = __webpack_require__(0); -var GetFastValue = __webpack_require__(3); -var ImageFile = __webpack_require__(168); +var GetFastValue = __webpack_require__(4); +var ImageFile = __webpack_require__(177); var IsPlainObject = __webpack_require__(2); -var JSONFile = __webpack_require__(182); -var MultiFile = __webpack_require__(183); -var TextFile = __webpack_require__(184); +var JSONFile = __webpack_require__(191); +var MultiFile = __webpack_require__(192); +var TextFile = __webpack_require__(193); /** * @typedef {object} Phaser.Loader.FileTypes.SpineFileConfig * * @property {string} key - The key of the file. Must be unique within both the Loader and the Texture Manager. - * @property {string} [textureURL] - The absolute or relative URL to load the texture image file from. - * @property {string} [textureExtension='png'] - The default file extension to use for the image texture if no url is provided. - * @property {XHRSettingsObject} [textureXhrSettings] - Extra XHR Settings specifically for the texture image file. - * @property {string} [normalMap] - The filename of an associated normal map. It uses the same path and url to load as the texture image. - * @property {string} [atlasURL] - The absolute or relative URL to load the atlas data file from. - * @property {string} [atlasExtension='txt'] - The default file extension to use for the atlas data if no url is provided. - * @property {XHRSettingsObject} [atlasXhrSettings] - Extra XHR Settings specifically for the atlas data file. + * @property {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @property {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt". + * @property {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not? + * @property {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings. + * @property {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings. */ /** @@ -22238,7 +22763,7 @@ var TextFile = __webpack_require__(184); * A Spine File suitable for loading by the Loader. * * These are created when you use the Phaser.Loader.LoaderPlugin#spine method and are not typically created directly. - * + * * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#spine. * * @class SpineFile @@ -22294,7 +22819,7 @@ var SpineFile = new Class({ for (i = 0; i < atlasURL.length; i++) { atlas = new TextFile(loader, { - key: key, + key: key + '_' + i, url: atlasURL[i], extension: GetFastValue(config, 'atlasExtension', 'atlas'), xhrSettings: GetFastValue(config, 'atlasXhrSettings') @@ -22374,7 +22899,7 @@ var SpineFile = new Class({ var currentPrefix = loader.prefix; var baseURL = GetFastValue(config, 'baseURL', this.baseURL); - var path = GetFastValue(config, 'path', this.path); + var path = GetFastValue(config, 'path', file.src.match(/^.*\//))[0]; var prefix = GetFastValue(config, 'prefix', this.prefix); var textureXhrSettings = GetFastValue(config, 'textureXhrSettings'); @@ -22386,7 +22911,7 @@ var SpineFile = new Class({ { var textureURL = textures[i]; - var key = 'SP' + this.multiKeyIndex + '_' + textureURL; + var key = this.prefix + textureURL; var image = new ImageFile(loader, key, textureURL, textureXhrSettings); @@ -22428,7 +22953,7 @@ var SpineFile = new Class({ if (file.type === 'text') { - atlasKey = file.key.substr(0, file.key.length - 2); + atlasKey = file.key.replace(/_[\d]$/, ''); atlasCache = file.cache; @@ -22439,14 +22964,14 @@ var SpineFile = new Class({ var src = file.key.trim(); var pos = src.indexOf('_'); var key = src.substr(pos + 1); - + this.loader.textureManager.addImage(key, file.data); } file.pendingDestroy(); } - atlasCache.add(atlasKey, { preMultipliedAlpha: preMultipliedAlpha, data: combinedAtlasData }); + atlasCache.add(atlasKey, { preMultipliedAlpha: preMultipliedAlpha, data: combinedAtlasData, prefix: this.prefix }); this.complete = true; } @@ -22458,20 +22983,20 @@ module.exports = SpineFile; /***/ }), -/* 168 */ +/* 177 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var CONST = __webpack_require__(6); -var File = __webpack_require__(12); -var FileTypesManager = __webpack_require__(13); -var GetFastValue = __webpack_require__(3); +var File = __webpack_require__(13); +var FileTypesManager = __webpack_require__(14); +var GetFastValue = __webpack_require__(4); var IsPlainObject = __webpack_require__(2); /** @@ -22479,7 +23004,7 @@ var IsPlainObject = __webpack_require__(2); * A single Image File suitable for loading by the Loader. * * These are created when you use the Phaser.Loader.LoaderPlugin#image method and are not typically created directly. - * + * * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#image. * * @class ImageFile @@ -22623,7 +23148,7 @@ var ImageFile = new Class({ * Adds an Image, or array of Images, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -22638,7 +23163,7 @@ var ImageFile = new Class({ * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been * loaded. - * + * * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle. * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback * of animated gifs to Canvas elements. @@ -22649,7 +23174,7 @@ var ImageFile = new Class({ * then remove it from the Texture Manager first, before loading a new one. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.image({ * key: 'logo', @@ -22660,7 +23185,7 @@ var ImageFile = new Class({ * See the documentation for `Phaser.Types.Loader.FileTypes.ImageFileConfig` for more details. * * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key: - * + * * ```javascript * this.load.image('logo', 'images/AtariLogo.png'); * // and later in your game ... @@ -22679,13 +23204,13 @@ var ImageFile = new Class({ * * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image, * then you can specify it by providing an array as the `url` where the second element is the normal map: - * + * * ```javascript * this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]); * ``` * * Or, if you are using a config object use the `normalMap` property: - * + * * ```javascript * this.load.image({ * key: 'logo', @@ -22701,14 +23226,14 @@ var ImageFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#image - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig|Phaser.Types.Loader.FileTypes.ImageFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('image', function (key, url, xhrSettings) { @@ -22732,12 +23257,12 @@ module.exports = ImageFile; /***/ }), -/* 169 */ +/* 178 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22747,27 +23272,27 @@ module.exports = ImageFile; module.exports = { - ADD: __webpack_require__(170), - COMPLETE: __webpack_require__(171), - FILE_COMPLETE: __webpack_require__(172), - FILE_KEY_COMPLETE: __webpack_require__(173), - FILE_LOAD_ERROR: __webpack_require__(174), - FILE_LOAD: __webpack_require__(175), - FILE_PROGRESS: __webpack_require__(176), - POST_PROCESS: __webpack_require__(177), - PROGRESS: __webpack_require__(178), - START: __webpack_require__(179) + ADD: __webpack_require__(179), + COMPLETE: __webpack_require__(180), + FILE_COMPLETE: __webpack_require__(181), + FILE_KEY_COMPLETE: __webpack_require__(182), + FILE_LOAD_ERROR: __webpack_require__(183), + FILE_LOAD: __webpack_require__(184), + FILE_PROGRESS: __webpack_require__(185), + POST_PROCESS: __webpack_require__(186), + PROGRESS: __webpack_require__(187), + START: __webpack_require__(188) }; /***/ }), -/* 170 */ +/* 179 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22792,12 +23317,12 @@ module.exports = 'addfile'; /***/ }), -/* 171 */ +/* 180 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22820,12 +23345,12 @@ module.exports = 'complete'; /***/ }), -/* 172 */ +/* 181 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22849,12 +23374,12 @@ module.exports = 'filecomplete'; /***/ }), -/* 173 */ +/* 182 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22903,12 +23428,12 @@ module.exports = 'filecomplete-'; /***/ }), -/* 174 */ +/* 183 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22928,12 +23453,12 @@ module.exports = 'loaderror'; /***/ }), -/* 175 */ +/* 184 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22954,12 +23479,12 @@ module.exports = 'load'; /***/ }), -/* 176 */ +/* 185 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22981,12 +23506,12 @@ module.exports = 'fileprogress'; /***/ }), -/* 177 */ +/* 186 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23010,12 +23535,12 @@ module.exports = 'postprocess'; /***/ }), -/* 178 */ +/* 187 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23035,12 +23560,12 @@ module.exports = 'progress'; /***/ }), -/* 179 */ +/* 188 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23062,12 +23587,12 @@ module.exports = 'start'; /***/ }), -/* 180 */ +/* 189 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23103,16 +23628,16 @@ module.exports = GetURL; /***/ }), -/* 181 */ +/* 190 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MergeXHRSettings = __webpack_require__(29); +var MergeXHRSettings = __webpack_require__(32); /** * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings @@ -23138,6 +23663,14 @@ var XHRLoader = function (file, globalXHRSettings) xhr.responseType = file.xhrSettings.responseType; xhr.timeout = config.timeout; + if (config.headers) + { + for (var key in config.headers) + { + xhr.setRequestHeader(key, config.headers[key]); + } + } + if (config.header && config.headerValue) { xhr.setRequestHeader(config.header, config.headerValue); @@ -23153,6 +23686,11 @@ var XHRLoader = function (file, globalXHRSettings) xhr.overrideMimeType(config.overrideMimeType); } + if (config.withCredentials) + { + xhr.withCredentials = true; + } + // After a successful request, the xhr.response property will contain the requested data as a DOMString, ArrayBuffer, Blob, or Document (depending on what was set for responseType.) xhr.onload = file.onLoad.bind(file, xhr); @@ -23171,21 +23709,21 @@ module.exports = XHRLoader; /***/ }), -/* 182 */ +/* 191 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var CONST = __webpack_require__(6); -var File = __webpack_require__(12); -var FileTypesManager = __webpack_require__(13); -var GetFastValue = __webpack_require__(3); -var GetValue = __webpack_require__(11); +var File = __webpack_require__(13); +var FileTypesManager = __webpack_require__(14); +var GetFastValue = __webpack_require__(4); +var GetValue = __webpack_require__(12); var IsPlainObject = __webpack_require__(2); /** @@ -23193,7 +23731,7 @@ var IsPlainObject = __webpack_require__(2); * A single JSON File suitable for loading by the Loader. * * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly. - * + * * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json. * * @class JSONFile @@ -23204,7 +23742,7 @@ var IsPlainObject = __webpack_require__(2); * * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file. * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object. - * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, can be a fully formed JSON Object. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file. * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache. */ @@ -23297,7 +23835,7 @@ var JSONFile = new Class({ * Adds a JSON file, or array of JSON files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -23312,14 +23850,14 @@ var JSONFile = new Class({ * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been * loaded. - * + * * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load. * The key should be unique both in terms of files being loaded and files already present in the JSON Cache. * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file * then remove it from the JSON Cache first, before loading a new one. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.json({ * key: 'wavedata', @@ -23330,7 +23868,7 @@ var JSONFile = new Class({ * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details. * * Once the file has finished loading you can access it from its Cache using its key: - * + * * ```javascript * this.load.json('wavedata', 'files/AlienWaveData.json'); * // and later in your game ... @@ -23349,7 +23887,7 @@ var JSONFile = new Class({ * * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache, * rather than the whole file. For example, if your JSON data had a structure like this: - * + * * ```json * { * "level1": { @@ -23369,15 +23907,15 @@ var JSONFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#json - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. - * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, can be a fully formed JSON Object. * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('json', function (key, url, dataKey, xhrSettings) { @@ -23401,12 +23939,12 @@ module.exports = JSONFile; /***/ }), -/* 183 */ +/* 192 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23635,20 +24173,20 @@ module.exports = MultiFile; /***/ }), -/* 184 */ +/* 193 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var CONST = __webpack_require__(6); -var File = __webpack_require__(12); -var FileTypesManager = __webpack_require__(13); -var GetFastValue = __webpack_require__(3); +var File = __webpack_require__(13); +var FileTypesManager = __webpack_require__(14); +var GetFastValue = __webpack_require__(4); var IsPlainObject = __webpack_require__(2); /** @@ -23779,14 +24317,14 @@ var TextFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#text - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig|Phaser.Types.Loader.FileTypes.TextFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt". * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('text', function (key, url, xhrSettings) { @@ -23810,7 +24348,7 @@ module.exports = TextFile; /***/ }), -/* 185 */ +/* 194 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -23819,21 +24357,21 @@ module.exports = TextFile; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AngleBetween = __webpack_require__(15); -var Clamp = __webpack_require__(8); +var AngleBetween = __webpack_require__(16); +var Clamp = __webpack_require__(9); var Class = __webpack_require__(0); -var ComponentsComputedSize = __webpack_require__(186); -var ComponentsDepth = __webpack_require__(187); -var ComponentsFlip = __webpack_require__(188); -var ComponentsScrollFactor = __webpack_require__(189); -var ComponentsTransform = __webpack_require__(190); -var ComponentsVisible = __webpack_require__(192); +var ComponentsComputedSize = __webpack_require__(195); +var ComponentsDepth = __webpack_require__(196); +var ComponentsFlip = __webpack_require__(197); +var ComponentsScrollFactor = __webpack_require__(198); +var ComponentsTransform = __webpack_require__(199); +var ComponentsVisible = __webpack_require__(201); var CounterClockwise = __webpack_require__(7); -var DegToRad = __webpack_require__(25); -var GameObject = __webpack_require__(193); -var RadToDeg = __webpack_require__(9); -var SpineEvents = __webpack_require__(214); -var SpineGameObjectRender = __webpack_require__(221); +var DegToRad = __webpack_require__(27); +var GameObject = __webpack_require__(202); +var RadToDeg = __webpack_require__(10); +var SpineEvents = __webpack_require__(225); +var SpineGameObjectRender = __webpack_require__(232); /** * @classdesc @@ -25402,12 +25940,12 @@ module.exports = SpineGameObject; /***/ }), -/* 186 */ +/* 195 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25551,12 +26089,12 @@ module.exports = ComputedSize; /***/ }), -/* 187 */ +/* 196 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25587,7 +26125,7 @@ var Depth = { * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order * of Game Objects, without actually moving their position in the display list. * - * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * The default depth is zero. A Game Object with a higher depth * value will always render in front of one with a lower value. * * Setting the depth will queue a depth sort event within the Scene. @@ -25617,7 +26155,7 @@ var Depth = { * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order * of Game Objects, without actually moving their position in the display list. * - * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * The default depth is zero. A Game Object with a higher depth * value will always render in front of one with a lower value. * * Setting the depth will queue a depth sort event within the Scene. @@ -25644,12 +26182,12 @@ module.exports = Depth; /***/ }), -/* 188 */ +/* 197 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25808,12 +26346,12 @@ module.exports = Flip; /***/ }), -/* 189 */ +/* 198 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25915,19 +26453,21 @@ module.exports = ScrollFactor; /***/ }), -/* 190 */ +/* 199 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var MATH_CONST = __webpack_require__(1); -var TransformMatrix = __webpack_require__(191); -var WrapAngle = __webpack_require__(17); -var WrapAngleDegrees = __webpack_require__(18); +var TransformMatrix = __webpack_require__(200); +var TransformXY = __webpack_require__(28); +var WrapAngle = __webpack_require__(18); +var WrapAngleDegrees = __webpack_require__(19); +var Vector2 = __webpack_require__(3); // global bitmask flag for GameObject.renderMask (used by Scale) var _FLAG = 4; // 0100 @@ -25943,7 +26483,7 @@ var Transform = { /** * Private internal value. Holds the horizontal scale value. - * + * * @name Phaser.GameObjects.Components.Transform#_scaleX * @type {number} * @private @@ -25954,7 +26494,7 @@ var Transform = { /** * Private internal value. Holds the vertical scale value. - * + * * @name Phaser.GameObjects.Components.Transform#_scaleY * @type {number} * @private @@ -25965,7 +26505,7 @@ var Transform = { /** * Private internal value. Holds the rotation value in radians. - * + * * @name Phaser.GameObjects.Components.Transform#_rotation * @type {number} * @private @@ -25996,7 +26536,9 @@ var Transform = { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. * * @name Phaser.GameObjects.Components.Transform#z * @type {number} @@ -26018,7 +26560,7 @@ var Transform = { /** * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`. - * + * * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this * isn't the case, use the `scaleX` or `scaleY` properties instead. * @@ -26115,7 +26657,7 @@ var Transform = { /** * The angle of this Game Object as expressed in degrees. - * + * * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left * and -90 is up. * @@ -26142,9 +26684,9 @@ var Transform = { /** * The angle of this Game Object in radians. - * - * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left - * and -90 is up. + * + * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left + * and -PI/2 is up. * * If you prefer to work in degrees, see the `angle` property instead. * @@ -26198,7 +26740,7 @@ var Transform = { /** * Sets the position of this Game Object to be a random position within the confines of * the given area. - * + * * If no area is specified a random position between 0 x 0 and the game width x height is used instead. * * The position does not factor in the size of this Game Object, meaning that only the origin is @@ -26328,6 +26870,9 @@ var Transform = { /** * Sets the z position of this Game Object. * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. + * * @method Phaser.GameObjects.Components.Transform#setZ * @since 3.0.0 * @@ -26417,9 +26962,59 @@ var Transform = { return tempMatrix; }, + /** + * Takes the given `x` and `y` coordinates and converts them into local space for this + * Game Object, taking into account parent and local transforms, and the Display Origin. + * + * The returned Vector2 contains the translated point in its properties. + * + * A Camera needs to be provided in order to handle modified scroll factors. If no + * camera is specified, it will use the `main` camera from the Scene to which this + * Game Object belongs. + * + * @method Phaser.GameObjects.Components.Transform#getLocalPoint + * @since 3.50.0 + * + * @param {number} x - The x position to translate. + * @param {number} y - The y position to translate. + * @param {Phaser.Math.Vector2} [point] - A Vector2, or point-like object, to store the results in. + * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera which is being tested against. If not given will use the Scene default camera. + * + * @return {Phaser.Math.Vector2} The translated point. + */ + getLocalPoint: function (x, y, point, camera) + { + if (!point) { point = new Vector2(); } + if (!camera) { camera = this.scene.sys.cameras.main; } + + var csx = camera.scrollX; + var csy = camera.scrollY; + + var px = x + (csx * this.scrollFactorX) - csx; + var py = y + (csy * this.scrollFactorY) - csy; + + if (this.parentContainer) + { + this.getWorldTransformMatrix().applyInverse(px, py, point); + } + else + { + TransformXY(px, py, this.x, this.y, this.rotation, this.scaleX, this.scaleY, point); + } + + // Normalize origin + if (this._originComponent) + { + point.x += this._displayOriginX; + point.y += this._displayOriginY; + } + + return point; + }, + /** * Gets the sum total rotation of all of this Game Objects parent Containers. - * + * * The returned value is in radians and will be zero if this Game Object has no parent container. * * @method Phaser.GameObjects.Components.Transform#getParentRotation @@ -26449,18 +27044,18 @@ module.exports = Transform; /***/ }), -/* 191 */ +/* 200 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var MATH_CONST = __webpack_require__(1); -var Vector2 = __webpack_require__(5); +var Vector2 = __webpack_require__(3); /** * @classdesc @@ -26892,7 +27487,7 @@ var TransformMatrix = new Class({ * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by. * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in. * - * @return {Phaser.GameObjects.Components.TransformMatrix} Either this TransformMatrix, or the `out` Matrix, if given in the arguments. + * @return {(this|Phaser.GameObjects.Components.TransformMatrix)} Either this TransformMatrix, or the `out` Matrix, if given in the arguments. */ multiply: function (rhs, out) { @@ -27384,6 +27979,58 @@ var TransformMatrix = new Class({ return x * this.b + y * this.d + this.f; }, + /** + * Returns the X component of this matrix multiplied by the given values. + * + * This is the same as `x * a + y * c + e`, optionally passing via `Math.round`. + * + * @method Phaser.GameObjects.Components.TransformMatrix#getXRound + * @since 3.50.0 + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * @param {boolean} [round=false] - Math.round the resulting value? + * + * @return {number} The calculated x value. + */ + getXRound: function (x, y, round) + { + var v = this.getX(x, y); + + if (round) + { + v = Math.round(v); + } + + return v; + }, + + /** + * Returns the Y component of this matrix multiplied by the given values. + * + * This is the same as `x * b + y * d + f`, optionally passing via `Math.round`. + * + * @method Phaser.GameObjects.Components.TransformMatrix#getYRound + * @since 3.50.0 + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * @param {boolean} [round=false] - Math.round the resulting value? + * + * @return {number} The calculated y value. + */ + getYRound: function (x, y, round) + { + var v = this.getY(x, y); + + if (round) + { + v = Math.round(v); + } + + return v; + }, + /** * Returns a string that can be used in a CSS Transform call as a `matrix` property. * @@ -27417,12 +28064,12 @@ module.exports = TransformMatrix; /***/ }), -/* 192 */ +/* 201 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27506,20 +28153,20 @@ module.exports = Visible; /***/ }), -/* 193 */ +/* 202 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var ComponentsToJSON = __webpack_require__(194); -var DataManager = __webpack_require__(195); -var EventEmitter = __webpack_require__(201); -var Events = __webpack_require__(202); +var ComponentsToJSON = __webpack_require__(203); +var DataManager = __webpack_require__(204); +var EventEmitter = __webpack_require__(210); +var Events = __webpack_require__(211); /** * @classdesc @@ -27569,10 +28216,10 @@ var GameObject = new Class({ /** * The current state of this Game Object. - * + * * Phaser itself will never modify this value, although plugins may do so. - * - * Use this property to track the state of a Game Object during its lifetime. For example, it could move from + * + * Use this property to track the state of a Game Object during its lifetime. For example, it could change from * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons. * If you need to store complex data about your Game Object, look at using the Data Component instead. @@ -27677,10 +28324,10 @@ var GameObject = new Class({ this.input = null; /** - * If this Game Object is enabled for physics then this property will contain a reference to a Physics Body. + * If this Game Object is enabled for Arcade or Matter Physics then this property will contain a reference to a Physics Body. * * @name Phaser.GameObjects.GameObject#body - * @type {?(object|Phaser.Physics.Arcade.Body|Phaser.Physics.Impact.Body)} + * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|MatterJS.BodyType)} * @default null * @since 3.0.0 */ @@ -27741,9 +28388,9 @@ var GameObject = new Class({ /** * Sets the current state of this Game Object. - * + * * Phaser itself will never modify the State of a Game Object, although plugins may do so. - * + * * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'. * The state value should typically be an integer (ideally mapped to a constant * in your game code), but could also be a string. It is recommended to keep it light and simple. @@ -27841,6 +28488,65 @@ var GameObject = new Class({ return this; }, + /** + * Increase a value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is increased from 0. + * + * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled + * before setting the value. + * + * If the key doesn't already exist in the Data Manager then it is created. + * + * When the value is first set, a `setdata` event is emitted from this Game Object. + * + * @method Phaser.GameObjects.GameObject#incData + * @since 3.23.0 + * + * @param {(string|object)} key - The key to increase the value for. + * @param {*} [data] - The value to increase for the given key. + * + * @return {this} This GameObject. + */ + incData: function (key, value) + { + if (!this.data) + { + this.data = new DataManager(this); + } + + this.data.inc(key, value); + + return this; + }, + + /** + * Toggle a boolean value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is toggled from false. + * + * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled + * before setting the value. + * + * If the key doesn't already exist in the Data Manager then it is created. + * + * When the value is first set, a `setdata` event is emitted from this Game Object. + * + * @method Phaser.GameObjects.GameObject#toggleData + * @since 3.23.0 + * + * @param {(string|object)} key - The key to toggle the value for. + * + * @return {this} This GameObject. + */ + toggleData: function (key) + { + if (!this.data) + { + this.data = new DataManager(this); + } + + this.data.toggle(key); + + return this; + }, + /** * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist. * @@ -27894,18 +28600,27 @@ var GameObject = new Class({ * * You can also provide an Input Configuration Object as the only argument to this method. * + * @example + * sprite.setInteractive(); + * + * @example + * sprite.setInteractive(new Phaser.Geom.Circle(45, 46, 45), Phaser.Geom.Circle.Contains); + * + * @example + * graphics.setInteractive(new Phaser.Geom.Rectangle(0, 0, 128, 128), Phaser.Geom.Rectangle.Contains); + * * @method Phaser.GameObjects.GameObject#setInteractive * @since 3.0.0 * - * @param {(Phaser.Types.Input.InputConfiguration|any)} [shape] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used. - * @param {Phaser.Types.Input.HitAreaCallback} [callback] - A callback to be invoked when the Game Object is interacted with. If you provide a shape you must also provide a callback. + * @param {(Phaser.Types.Input.InputConfiguration|any)} [hitArea] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not given it will try to create a Rectangle based on the texture frame. + * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The callback that determines if the pointer is within the Hit Area shape or not. If you provide a shape you must also provide a callback. * @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target? * * @return {this} This GameObject. */ - setInteractive: function (shape, callback, dropZone) + setInteractive: function (hitArea, hitAreaCallback, dropZone) { - this.scene.sys.input.enable(this, shape, callback, dropZone); + this.scene.sys.input.enable(this, hitArea, hitAreaCallback, dropZone); return this; }, @@ -27948,7 +28663,7 @@ var GameObject = new Class({ * If you wish to only temporarily stop an object from receiving input then use * `disableInteractive` instead, as that toggles the interactive state, where-as * this erases it completely. - * + * * If you wish to resize a hit area, don't remove and then set it as being * interactive. Instead, access the hitarea object directly and resize the shape * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the @@ -27968,6 +28683,36 @@ var GameObject = new Class({ return this; }, + /** + * This callback is invoked when this Game Object is added to a Scene. + * + * Can be overriden by custom Game Objects, but be aware of some Game Objects that + * will use this, such as Sprites, to add themselves into the Update List. + * + * You can also listen for the `ADDED_TO_SCENE` event from this Game Object. + * + * @method Phaser.GameObjects.GameObject#addedToScene + * @since 3.50.0 + */ + addedToScene: function () + { + }, + + /** + * This callback is invoked when this Game Object is removed from a Scene. + * + * Can be overriden by custom Game Objects, but be aware of some Game Objects that + * will use this, such as Sprites, to removed themselves from the Update List. + * + * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object. + * + * @method Phaser.GameObjects.GameObject#removedFromScene + * @since 3.50.0 + */ + removedFromScene: function () + { + }, + /** * To be overridden by custom GameObjects. Allows base objects to be used in a Pool. * @@ -28094,7 +28839,6 @@ var GameObject = new Class({ if (!fromScene) { sys.displayList.remove(this); - sys.updateList.remove(this); } if (this.input) @@ -28147,12 +28891,12 @@ module.exports = GameObject; /***/ }), -/* 194 */ +/* 203 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28208,17 +28952,17 @@ module.exports = ToJSON; /***/ }), -/* 195 */ +/* 204 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Events = __webpack_require__(196); +var Events = __webpack_require__(205); /** * @callback DataEachCallback @@ -28241,7 +28985,7 @@ var Events = __webpack_require__(196); * @since 3.0.0 * * @param {object} parent - The object that this DataManager belongs to. - * @param {Phaser.Events.EventEmitter} eventEmitter - The DataManager's event emitter. + * @param {Phaser.Events.EventEmitter} [eventEmitter] - The DataManager's event emitter. */ var DataManager = new Class({ @@ -28468,7 +29212,7 @@ var DataManager = new Class({ * @param {(string|object)} key - The key to set the value for. Or an object or key value pairs. If an object the `data` argument is ignored. * @param {*} data - The value to set for the given key. If an object is provided as the key this argument is ignored. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ set: function (key, data) { @@ -28492,6 +29236,72 @@ var DataManager = new Class({ return this; }, + /** + * Increase a value for the given key. If the key doesn't already exist in the Data Manager then it is increased from 0. + * + * When the value is first set, a `setdata` event is emitted. + * + * @method Phaser.Data.DataManager#inc + * @fires Phaser.Data.Events#SET_DATA + * @fires Phaser.Data.Events#CHANGE_DATA + * @fires Phaser.Data.Events#CHANGE_DATA_KEY + * @since 3.23.0 + * + * @param {(string|object)} key - The key to increase the value for. + * @param {*} [data] - The value to increase for the given key. + * + * @return {Phaser.Data.DataManager} This DataManager object. + */ + inc: function (key, data) + { + if (this._frozen) + { + return this; + } + + if (data === undefined) + { + data = 1; + } + + var value = this.get(key); + if (value === undefined) + { + value = 0; + } + + this.set(key, (value + data)); + + return this; + }, + + /** + * Toggle a boolean value for the given key. If the key doesn't already exist in the Data Manager then it is toggled from false. + * + * When the value is first set, a `setdata` event is emitted. + * + * @method Phaser.Data.DataManager#toggle + * @fires Phaser.Data.Events#SET_DATA + * @fires Phaser.Data.Events#CHANGE_DATA + * @fires Phaser.Data.Events#CHANGE_DATA_KEY + * @since 3.23.0 + * + * @param {(string|object)} key - The key to toggle the value for. + * + * @return {Phaser.Data.DataManager} This DataManager object. + */ + toggle: function (key) + { + if (this._frozen) + { + return this; + } + + this.set(key, !this.get(key)); + + return this; + }, + /** * Internal value setter, called automatically by the `set` method. * @@ -28505,7 +29315,7 @@ var DataManager = new Class({ * @param {string} key - The key to set the value for. * @param {*} data - The value to set. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ setValue: function (key, data) { @@ -28569,7 +29379,7 @@ var DataManager = new Class({ * @param {*} [context] - Value to use as `this` when executing callback. * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ each: function (callback, context) { @@ -28606,7 +29416,7 @@ var DataManager = new Class({ * @param {Object.} data - The data to merge. * @param {boolean} [overwrite=true] - Whether to overwrite existing data. Defaults to true. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ merge: function (data, overwrite) { @@ -28642,7 +29452,7 @@ var DataManager = new Class({ * * @param {(string|string[])} key - The key to remove, or an array of keys to remove. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ remove: function (key) { @@ -28676,7 +29486,7 @@ var DataManager = new Class({ * * @param {string} key - The key to set the value for. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ removeValue: function (key) { @@ -28748,7 +29558,7 @@ var DataManager = new Class({ * * @param {boolean} value - Whether to freeze or unfreeze the Data Manager. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ setFreeze: function (value) { @@ -28763,7 +29573,7 @@ var DataManager = new Class({ * @method Phaser.Data.DataManager#reset * @since 3.0.0 * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ reset: function () { @@ -28849,12 +29659,12 @@ module.exports = DataManager; /***/ }), -/* 196 */ +/* 205 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28864,21 +29674,21 @@ module.exports = DataManager; module.exports = { - CHANGE_DATA: __webpack_require__(197), - CHANGE_DATA_KEY: __webpack_require__(198), - REMOVE_DATA: __webpack_require__(199), - SET_DATA: __webpack_require__(200) + CHANGE_DATA: __webpack_require__(206), + CHANGE_DATA_KEY: __webpack_require__(207), + REMOVE_DATA: __webpack_require__(208), + SET_DATA: __webpack_require__(209) }; /***/ }), -/* 197 */ +/* 206 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28905,12 +29715,12 @@ module.exports = 'changedata'; /***/ }), -/* 198 */ +/* 207 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28928,7 +29738,6 @@ module.exports = 'changedata'; * @since 3.16.1 * * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event. - * @param {string} key - The unique key of the data item within the Data Manager. * @param {any} value - The item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance. * @param {any} previousValue - The previous item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance. */ @@ -28936,12 +29745,12 @@ module.exports = 'changedata-'; /***/ }), -/* 199 */ +/* 208 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28964,12 +29773,12 @@ module.exports = 'removedata'; /***/ }), -/* 200 */ +/* 209 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28992,7 +29801,7 @@ module.exports = 'setdata'; /***/ }), -/* 201 */ +/* 210 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -29335,12 +30144,12 @@ if (true) { /***/ }), -/* 202 */ +/* 211 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29350,28 +30159,56 @@ if (true) { module.exports = { - DESTROY: __webpack_require__(203), - VIDEO_COMPLETE: __webpack_require__(204), - VIDEO_CREATED: __webpack_require__(205), - VIDEO_ERROR: __webpack_require__(206), - VIDEO_LOOP: __webpack_require__(207), - VIDEO_PLAY: __webpack_require__(208), - VIDEO_SEEKED: __webpack_require__(209), - VIDEO_SEEKING: __webpack_require__(210), - VIDEO_STOP: __webpack_require__(211), - VIDEO_TIMEOUT: __webpack_require__(212), - VIDEO_UNLOCKED: __webpack_require__(213) + ADDED_TO_SCENE: __webpack_require__(212), + DESTROY: __webpack_require__(213), + REMOVED_FROM_SCENE: __webpack_require__(214), + VIDEO_COMPLETE: __webpack_require__(215), + VIDEO_CREATED: __webpack_require__(216), + VIDEO_ERROR: __webpack_require__(217), + VIDEO_LOOP: __webpack_require__(218), + VIDEO_PLAY: __webpack_require__(219), + VIDEO_SEEKED: __webpack_require__(220), + VIDEO_SEEKING: __webpack_require__(221), + VIDEO_STOP: __webpack_require__(222), + VIDEO_TIMEOUT: __webpack_require__(223), + VIDEO_UNLOCKED: __webpack_require__(224) }; /***/ }), -/* 203 */ +/* 212 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Object Added to Scene Event. + * + * This event is dispatched when a Game Object is added to a Scene. + * + * Listen for it on a Game Object instance using `GameObject.on('addedtoscene', listener)`. + * + * @event Phaser.GameObjects.Events#ADDED_TO_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene. + * @param {Phaser.Scene} scene - The Scene to which the Game Object was added. + */ +module.exports = 'addedtoscene'; + + +/***/ }), +/* 213 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29391,12 +30228,38 @@ module.exports = 'destroy'; /***/ }), -/* 204 */ +/* 214 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Object Removed from Scene Event. + * + * This event is dispatched when a Game Object is removed from a Scene. + * + * Listen for it on a Game Object instance using `GameObject.on('removedfromscene', listener)`. + * + * @event Phaser.GameObjects.Events#REMOVED_FROM_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene. + * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed. + */ +module.exports = 'removedfromscene'; + + +/***/ }), +/* 215 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29423,12 +30286,12 @@ module.exports = 'complete'; /***/ }), -/* 205 */ +/* 216 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29452,12 +30315,12 @@ module.exports = 'created'; /***/ }), -/* 206 */ +/* 217 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29478,12 +30341,12 @@ module.exports = 'error'; /***/ }), -/* 207 */ +/* 218 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29510,12 +30373,12 @@ module.exports = 'loop'; /***/ }), -/* 208 */ +/* 219 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29538,12 +30401,12 @@ module.exports = 'play'; /***/ }), -/* 209 */ +/* 220 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29563,12 +30426,12 @@ module.exports = 'seeked'; /***/ }), -/* 210 */ +/* 221 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29589,12 +30452,12 @@ module.exports = 'seeking'; /***/ }), -/* 211 */ +/* 222 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29615,12 +30478,12 @@ module.exports = 'stop'; /***/ }), -/* 212 */ +/* 223 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29641,12 +30504,12 @@ module.exports = 'timeout'; /***/ }), -/* 213 */ +/* 224 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29667,7 +30530,7 @@ module.exports = 'unlocked'; /***/ }), -/* 214 */ +/* 225 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29682,18 +30545,18 @@ module.exports = 'unlocked'; module.exports = { - COMPLETE: __webpack_require__(215), - DISPOSE: __webpack_require__(216), - END: __webpack_require__(217), - EVENT: __webpack_require__(218), - INTERRUPTED: __webpack_require__(219), - START: __webpack_require__(220) + COMPLETE: __webpack_require__(226), + DISPOSE: __webpack_require__(227), + END: __webpack_require__(228), + EVENT: __webpack_require__(229), + INTERRUPTED: __webpack_require__(230), + START: __webpack_require__(231) }; /***/ }), -/* 215 */ +/* 226 */ /***/ (function(module, exports) { /** @@ -29712,7 +30575,7 @@ module.exports = 'complete'; /***/ }), -/* 216 */ +/* 227 */ /***/ (function(module, exports) { /** @@ -29731,7 +30594,7 @@ module.exports = 'dispose'; /***/ }), -/* 217 */ +/* 228 */ /***/ (function(module, exports) { /** @@ -29750,7 +30613,7 @@ module.exports = 'end'; /***/ }), -/* 218 */ +/* 229 */ /***/ (function(module, exports) { /** @@ -29769,7 +30632,7 @@ module.exports = 'event'; /***/ }), -/* 219 */ +/* 230 */ /***/ (function(module, exports) { /** @@ -29788,7 +30651,7 @@ module.exports = 'interrupted'; /***/ }), -/* 220 */ +/* 231 */ /***/ (function(module, exports) { /** @@ -29807,7 +30670,7 @@ module.exports = 'start'; /***/ }), -/* 221 */ +/* 232 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29816,15 +30679,15 @@ module.exports = 'start'; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var renderWebGL = __webpack_require__(31); -var renderCanvas = __webpack_require__(31); +var renderWebGL = __webpack_require__(34); +var renderCanvas = __webpack_require__(34); if (false) {} if (true) { - renderCanvas = __webpack_require__(222); + renderCanvas = __webpack_require__(233); } module.exports = { @@ -29836,7 +30699,7 @@ module.exports = { /***/ }), -/* 222 */ +/* 233 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29846,8 +30709,8 @@ module.exports = { */ var CounterClockwise = __webpack_require__(7); -var RadToDeg = __webpack_require__(9); -var Wrap = __webpack_require__(4); +var RadToDeg = __webpack_require__(10); +var Wrap = __webpack_require__(5); /** * Renders this Game Object with the Canvas Renderer to the given Camera. diff --git a/plugins/spine/dist/SpineCanvasPlugin.min.js b/plugins/spine/dist/SpineCanvasPlugin.min.js index dc652bc60..ca48e16b4 100644 --- a/plugins/spine/dist/SpineCanvasPlugin.min.js +++ b/plugins/spine/dist/SpineCanvasPlugin.min.js @@ -1 +1 @@ -window.SpinePlugin=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=32)}([function(t,e){function n(t,e,n){var i=n?t[e]:Object.getOwnPropertyDescriptor(t,e);return!n&&i.value&&"object"==typeof i.value&&(i=i.value),!(!i||!function(t){return!!t.get&&"function"==typeof t.get||!!t.set&&"function"==typeof t.set}(i))&&(void 0===i.enumerable&&(i.enumerable=!0),void 0===i.configurable&&(i.configurable=!0),i)}function i(t,e){var n=Object.getOwnPropertyDescriptor(t,e);return!!n&&(n.value&&"object"==typeof n.value&&(n=n.value),!1===n.configurable)}function r(t,e,r,s){for(var o in e)if(e.hasOwnProperty(o)){var h=n(e,o,r);if(!1!==h){if(i((s||t).prototype,o)){if(a.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]=e[o]}}function s(t,e){if(e){Array.isArray(e)||(e=[e]);for(var n=0;n0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=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 n=this.x,i=this.y;return this.x=n+e*(t.x-n),this.y=i+e*(t.y-i),this},transformMat3:function(t){var e=this.x,n=this.y,i=t.val;return this.x=i[0]*e+i[3]*n+i[6],this.y=i[1]*e+i[4]*n+i[7],this},transformMat4:function(t){var e=this.x,n=this.y,i=t.val;return this.x=i[0]*e+i[4]*n+i[12],this.y=i[1]*e+i[5]*n+i[13],this},reset:function(){return this.x=0,this.y=0,this}});i.ZERO=new i,i.RIGHT=new i(1,0),i.LEFT=new i(-1,0),i.UP=new i(0,-1),i.DOWN=new i(0,1),i.ONE=new i(1,1),t.exports=i},function(t,e){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}},function(t,e,n){var i=n(1);t.exports=function(t){return t>Math.PI&&(t-=i.PI2),Math.abs(((t+i.TAU)%i.PI2-i.PI2)%i.PI2)}},function(t,e){t.exports=function(t,e,n){return Math.max(e,Math.min(n,t))}},function(t,e,n){var i=n(1);t.exports=function(t){return t*i.RAD_TO_DEG}},function(t,e,n){var i=new(n(0))({initialize:function(t,e,n){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=n||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new i(this.x,this.y,this.z)},crossVectors:function(t,e){var n=t.x,i=t.y,r=t.z,s=e.x,a=e.y,o=e.z;return this.x=i*o-r*a,this.y=r*s-n*o,this.z=n*a-i*s,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,n){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=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||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,n=t.y-this.y,i=t.z-this.z||0;return Math.sqrt(e*e+n*n+i*i)},distanceSq:function(t){var e=t.x-this.x,n=t.y-this.y,i=t.z-this.z||0;return e*e+n*n+i*i},length:function(){var t=this.x,e=this.y,n=this.z;return Math.sqrt(t*t+e*e+n*n)},lengthSq:function(){var t=this.x,e=this.y,n=this.z;return t*t+e*e+n*n},normalize:function(){var t=this.x,e=this.y,n=this.z,i=t*t+e*e+n*n;return i>0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i,this.z=n*i),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,n=this.y,i=this.z,r=t.x,s=t.y,a=t.z;return this.x=n*a-i*s,this.y=i*r-e*a,this.z=e*s-n*r,this},lerp:function(t,e){void 0===e&&(e=0);var n=this.x,i=this.y,r=this.z;return this.x=n+e*(t.x-n),this.y=i+e*(t.y-i),this.z=r+e*(t.z-r),this},transformMat3:function(t){var e=this.x,n=this.y,i=this.z,r=t.val;return this.x=e*r[0]+n*r[3]+i*r[6],this.y=e*r[1]+n*r[4]+i*r[7],this.z=e*r[2]+n*r[5]+i*r[8],this},transformMat4:function(t){var e=this.x,n=this.y,i=this.z,r=t.val;return this.x=r[0]*e+r[4]*n+r[8]*i+r[12],this.y=r[1]*e+r[5]*n+r[9]*i+r[13],this.z=r[2]*e+r[6]*n+r[10]*i+r[14],this},transformCoordinates:function(t){var e=this.x,n=this.y,i=this.z,r=t.val,s=e*r[0]+n*r[4]+i*r[8]+r[12],a=e*r[1]+n*r[5]+i*r[9]+r[13],o=e*r[2]+n*r[6]+i*r[10]+r[14],h=e*r[3]+n*r[7]+i*r[11]+r[15];return this.x=s/h,this.y=a/h,this.z=o/h,this},transformQuat:function(t){var e=this.x,n=this.y,i=this.z,r=t.x,s=t.y,a=t.z,o=t.w,h=o*e+s*i-a*n,l=o*n+a*e-r*i,u=o*i+r*n-s*e,c=-r*e-s*n-a*i;return this.x=h*o+c*-r+l*-a-u*-s,this.y=l*o+c*-s+u*-r-h*-a,this.z=u*o+c*-a+h*-s-l*-r,this},project:function(t){var e=this.x,n=this.y,i=this.z,r=t.val,s=r[0],a=r[1],o=r[2],h=r[3],l=r[4],u=r[5],c=r[6],f=r[7],d=r[8],p=r[9],v=r[10],m=r[11],g=r[12],y=r[13],x=r[14],w=1/(e*h+n*f+i*m+r[15]);return this.x=(e*s+n*l+i*d+g)*w,this.y=(e*a+n*u+i*p+y)*w,this.z=(e*o+n*c+i*v+x)*w,this},unproject:function(t,e){var n=t.x,i=t.y,r=t.z,s=t.w,a=this.x-n,o=s-this.y-1-i,h=this.z;return this.x=2*a/r-1,this.y=2*o/s-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});i.ZERO=new i,i.RIGHT=new i(1,0,0),i.LEFT=new i(-1,0,0),i.UP=new i(0,-1,0),i.DOWN=new i(0,1,0),i.FORWARD=new i(0,0,1),i.BACK=new i(0,0,-1),i.ONE=new i(1,1,1),t.exports=i},function(t,e){t.exports=function(t,e,n){if(t&&"number"!=typeof t){if(t.hasOwnProperty(e))return t[e];if(-1!==e.indexOf(".")){for(var i=e.split("."),r=t,s=n,a=0;a=400&&t.status<=599&&(i=!1),this.resetXHR(),this.loader.nextFile(this,i)},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(s.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=r.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=r.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){this.state=r.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.cache.add(this.key,this.data),this.pendingDestroy()},pendingDestroy:function(t){void 0===t&&(t=this.data);var e=this.key,n=this.type;this.loader.emit(s.FILE_COMPLETE,e,n,t),this.loader.emit(s.FILE_KEY_COMPLETE+n+"-"+e,e,n,t),this.loader.flagForRemoval(this)},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,n){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var i=new FileReader;i.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||n)+";base64,"+i.result.split(",")[1]},i.onerror=t.onerror,i.readAsDataURL(e)}},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},function(t,e){var n={},i={install:function(t){for(var e in n)t[e]=n[e]},register:function(t,e){n[t]=e},destroy:function(){n={}}};t.exports=i},function(t,e,n){var i=n(2),r=function(){var t,e,n,s,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=0?t:t+2*Math.PI}},function(t,e,n){var i=n(4);t.exports=function(t){return i(t,-Math.PI,Math.PI)}},function(t,e,n){var i=n(4);t.exports=function(t){return i(t,-180,180)}},function(t,e,n){var i=n(20);t.exports=function(t,e){return i(t)/i(e)/i(t-e)}},function(t,e){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},function(t,e){t.exports=function(t,e,n,i,r){var s=.5*(i-e),a=.5*(r-n),o=t*t;return(2*n-2*i+s+a)*(t*o)+(-3*n+3*i-2*s-a)*o+s*t+n}},function(t,e){t.exports=function(t,e,n){return(e-t)*n+t}},function(t,e){t.exports=function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*(3-2*t)}},function(t,e){t.exports=function(t,e,n){return(t=Math.max(0,Math.min(1,(t-e)/(n-e))))*t*t*(t*(6*t-15)+10)}},function(t,e,n){var i=n(1);t.exports=function(t){return t*i.DEG_TO_RAD}},function(t,e,n){var i=new(n(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new i(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,n=t.val;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this},fromMat4:function(t){var e=t.val,n=this.val;return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[4],n[4]=e[5],n[5]=e[6],n[6]=e[8],n[7]=e[9],n[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],n=t[2],i=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=n,t[7]=i,this},invert:function(){var t=this.val,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=l*s-a*h,c=-l*r+a*o,f=h*r-s*o,d=e*u+n*c+i*f;return d?(d=1/d,t[0]=u*d,t[1]=(-l*n+i*h)*d,t[2]=(a*n-i*s)*d,t[3]=c*d,t[4]=(l*e-i*o)*d,t[5]=(-a*e+i*r)*d,t[6]=f*d,t[7]=(-h*e+n*o)*d,t[8]=(s*e-n*r)*d,this):null},adjoint:function(){var t=this.val,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],h=t[7],l=t[8];return t[0]=s*l-a*h,t[1]=i*h-n*l,t[2]=n*a-i*s,t[3]=a*o-r*l,t[4]=e*l-i*o,t[5]=i*r-e*a,t[6]=r*h-s*o,t[7]=n*o-e*h,t[8]=e*s-n*r,this},determinant:function(){var t=this.val,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],h=t[7],l=t[8];return e*(l*s-a*h)+n*(-l*r+a*o)+i*(h*r-s*o)},multiply:function(t){var e=this.val,n=e[0],i=e[1],r=e[2],s=e[3],a=e[4],o=e[5],h=e[6],l=e[7],u=e[8],c=t.val,f=c[0],d=c[1],p=c[2],v=c[3],m=c[4],g=c[5],y=c[6],x=c[7],w=c[8];return e[0]=f*n+d*s+p*h,e[1]=f*i+d*a+p*l,e[2]=f*r+d*o+p*u,e[3]=v*n+m*s+g*h,e[4]=v*i+m*a+g*l,e[5]=v*r+m*o+g*u,e[6]=y*n+x*s+w*h,e[7]=y*i+x*a+w*l,e[8]=y*r+x*o+w*u,this},translate:function(t){var e=this.val,n=t.x,i=t.y;return e[6]=n*e[0]+i*e[3]+e[6],e[7]=n*e[1]+i*e[4]+e[7],e[8]=n*e[2]+i*e[5]+e[8],this},rotate:function(t){var e=this.val,n=e[0],i=e[1],r=e[2],s=e[3],a=e[4],o=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*n+h*s,e[1]=l*i+h*a,e[2]=l*r+h*o,e[3]=l*s-h*n,e[4]=l*a-h*i,e[5]=l*o-h*r,this},scale:function(t){var e=this.val,n=t.x,i=t.y;return e[0]=n*e[0],e[1]=n*e[1],e[2]=n*e[2],e[3]=i*e[3],e[4]=i*e[4],e[5]=i*e[5],this},fromQuat:function(t){var e=t.x,n=t.y,i=t.z,r=t.w,s=e+e,a=n+n,o=i+i,h=e*s,l=e*a,u=e*o,c=n*a,f=n*o,d=i*o,p=r*s,v=r*a,m=r*o,g=this.val;return g[0]=1-(c+d),g[3]=l+m,g[6]=u-v,g[1]=l-m,g[4]=1-(h+d),g[7]=f+p,g[2]=u+v,g[5]=f-p,g[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,n=this.val,i=e[0],r=e[1],s=e[2],a=e[3],o=e[4],h=e[5],l=e[6],u=e[7],c=e[8],f=e[9],d=e[10],p=e[11],v=e[12],m=e[13],g=e[14],y=e[15],x=i*h-r*o,w=i*l-s*o,M=i*u-a*o,E=r*l-s*h,T=r*u-a*h,A=s*u-a*l,b=c*m-f*v,R=c*g-d*v,I=c*y-p*v,S=f*g-d*m,C=f*y-p*m,P=d*y-p*g,k=x*P-w*C+M*S+E*I-T*R+A*b;return k?(k=1/k,n[0]=(h*P-l*C+u*S)*k,n[1]=(l*I-o*P-u*R)*k,n[2]=(o*C-h*I+u*b)*k,n[3]=(s*C-r*P-a*S)*k,n[4]=(i*P-s*I+a*R)*k,n[5]=(r*I-i*C-a*b)*k,n[6]=(m*A-g*T+y*E)*k,n[7]=(g*M-v*A-y*w)*k,n[8]=(v*T-m*M+y*x)*k,this):null}});t.exports=i},function(t,e,n){var i=new(n(0))({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new i(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,n=t.val;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],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],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this},zero:function(){var t=this.val;return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=0,this},xyz:function(t,e,n){this.identity();var i=this.val;return i[12]=t,i[13]=e,i[14]=n,this},scaling:function(t,e,n){this.zero();var i=this.val;return i[0]=t,i[5]=e,i[10]=n,i[15]=1,this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},transpose:function(){var t=this.val,e=t[1],n=t[2],i=t[3],r=t[6],s=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]=n,t[9]=r,t[11]=t[14],t[12]=i,t[13]=s,t[14]=a,this},invert:function(){var t=this.val,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=t[9],c=t[10],f=t[11],d=t[12],p=t[13],v=t[14],m=t[15],g=e*a-n*s,y=e*o-i*s,x=e*h-r*s,w=n*o-i*a,M=n*h-r*a,E=i*h-r*o,T=l*p-u*d,A=l*v-c*d,b=l*m-f*d,R=u*v-c*p,I=u*m-f*p,S=c*m-f*v,C=g*S-y*I+x*R+w*b-M*A+E*T;return C?(C=1/C,t[0]=(a*S-o*I+h*R)*C,t[1]=(i*I-n*S-r*R)*C,t[2]=(p*E-v*M+m*w)*C,t[3]=(c*M-u*E-f*w)*C,t[4]=(o*b-s*S-h*A)*C,t[5]=(e*S-i*b+r*A)*C,t[6]=(v*x-d*E-m*y)*C,t[7]=(l*E-c*x+f*y)*C,t[8]=(s*I-a*b+h*T)*C,t[9]=(n*b-e*I-r*T)*C,t[10]=(d*M-p*x+m*g)*C,t[11]=(u*x-l*M-f*g)*C,t[12]=(a*A-s*R-o*T)*C,t[13]=(e*R-n*A+i*T)*C,t[14]=(p*y-d*w-v*g)*C,t[15]=(l*w-u*y+c*g)*C,this):null},adjoint:function(){var t=this.val,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=t[9],c=t[10],f=t[11],d=t[12],p=t[13],v=t[14],m=t[15];return t[0]=a*(c*m-f*v)-u*(o*m-h*v)+p*(o*f-h*c),t[1]=-(n*(c*m-f*v)-u*(i*m-r*v)+p*(i*f-r*c)),t[2]=n*(o*m-h*v)-a*(i*m-r*v)+p*(i*h-r*o),t[3]=-(n*(o*f-h*c)-a*(i*f-r*c)+u*(i*h-r*o)),t[4]=-(s*(c*m-f*v)-l*(o*m-h*v)+d*(o*f-h*c)),t[5]=e*(c*m-f*v)-l*(i*m-r*v)+d*(i*f-r*c),t[6]=-(e*(o*m-h*v)-s*(i*m-r*v)+d*(i*h-r*o)),t[7]=e*(o*f-h*c)-s*(i*f-r*c)+l*(i*h-r*o),t[8]=s*(u*m-f*p)-l*(a*m-h*p)+d*(a*f-h*u),t[9]=-(e*(u*m-f*p)-l*(n*m-r*p)+d*(n*f-r*u)),t[10]=e*(a*m-h*p)-s*(n*m-r*p)+d*(n*h-r*a),t[11]=-(e*(a*f-h*u)-s*(n*f-r*u)+l*(n*h-r*a)),t[12]=-(s*(u*v-c*p)-l*(a*v-o*p)+d*(a*c-o*u)),t[13]=e*(u*v-c*p)-l*(n*v-i*p)+d*(n*c-i*u),t[14]=-(e*(a*v-o*p)-s*(n*v-i*p)+d*(n*o-i*a)),t[15]=e*(a*c-o*u)-s*(n*c-i*u)+l*(n*o-i*a),this},determinant:function(){var t=this.val,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=t[9],c=t[10],f=t[11],d=t[12],p=t[13],v=t[14],m=t[15];return(e*a-n*s)*(c*m-f*v)-(e*o-i*s)*(u*m-f*p)+(e*h-r*s)*(u*v-c*p)+(n*o-i*a)*(l*m-f*d)-(n*h-r*a)*(l*v-c*d)+(i*h-r*o)*(l*p-u*d)},multiply:function(t){var e=this.val,n=e[0],i=e[1],r=e[2],s=e[3],a=e[4],o=e[5],h=e[6],l=e[7],u=e[8],c=e[9],f=e[10],d=e[11],p=e[12],v=e[13],m=e[14],g=e[15],y=t.val,x=y[0],w=y[1],M=y[2],E=y[3];return e[0]=x*n+w*a+M*u+E*p,e[1]=x*i+w*o+M*c+E*v,e[2]=x*r+w*h+M*f+E*m,e[3]=x*s+w*l+M*d+E*g,x=y[4],w=y[5],M=y[6],E=y[7],e[4]=x*n+w*a+M*u+E*p,e[5]=x*i+w*o+M*c+E*v,e[6]=x*r+w*h+M*f+E*m,e[7]=x*s+w*l+M*d+E*g,x=y[8],w=y[9],M=y[10],E=y[11],e[8]=x*n+w*a+M*u+E*p,e[9]=x*i+w*o+M*c+E*v,e[10]=x*r+w*h+M*f+E*m,e[11]=x*s+w*l+M*d+E*g,x=y[12],w=y[13],M=y[14],E=y[15],e[12]=x*n+w*a+M*u+E*p,e[13]=x*i+w*o+M*c+E*v,e[14]=x*r+w*h+M*f+E*m,e[15]=x*s+w*l+M*d+E*g,this},multiplyLocal:function(t){var e=[],n=this.val,i=t.val;return e[0]=n[0]*i[0]+n[1]*i[4]+n[2]*i[8]+n[3]*i[12],e[1]=n[0]*i[1]+n[1]*i[5]+n[2]*i[9]+n[3]*i[13],e[2]=n[0]*i[2]+n[1]*i[6]+n[2]*i[10]+n[3]*i[14],e[3]=n[0]*i[3]+n[1]*i[7]+n[2]*i[11]+n[3]*i[15],e[4]=n[4]*i[0]+n[5]*i[4]+n[6]*i[8]+n[7]*i[12],e[5]=n[4]*i[1]+n[5]*i[5]+n[6]*i[9]+n[7]*i[13],e[6]=n[4]*i[2]+n[5]*i[6]+n[6]*i[10]+n[7]*i[14],e[7]=n[4]*i[3]+n[5]*i[7]+n[6]*i[11]+n[7]*i[15],e[8]=n[8]*i[0]+n[9]*i[4]+n[10]*i[8]+n[11]*i[12],e[9]=n[8]*i[1]+n[9]*i[5]+n[10]*i[9]+n[11]*i[13],e[10]=n[8]*i[2]+n[9]*i[6]+n[10]*i[10]+n[11]*i[14],e[11]=n[8]*i[3]+n[9]*i[7]+n[10]*i[11]+n[11]*i[15],e[12]=n[12]*i[0]+n[13]*i[4]+n[14]*i[8]+n[15]*i[12],e[13]=n[12]*i[1]+n[13]*i[5]+n[14]*i[9]+n[15]*i[13],e[14]=n[12]*i[2]+n[13]*i[6]+n[14]*i[10]+n[15]*i[14],e[15]=n[12]*i[3]+n[13]*i[7]+n[14]*i[11]+n[15]*i[15],this.fromArray(e)},translate:function(t){var e=t.x,n=t.y,i=t.z,r=this.val;return r[12]=r[0]*e+r[4]*n+r[8]*i+r[12],r[13]=r[1]*e+r[5]*n+r[9]*i+r[13],r[14]=r[2]*e+r[6]*n+r[10]*i+r[14],r[15]=r[3]*e+r[7]*n+r[11]*i+r[15],this},translateXYZ:function(t,e,n){var i=this.val;return i[12]=i[0]*t+i[4]*e+i[8]*n+i[12],i[13]=i[1]*t+i[5]*e+i[9]*n+i[13],i[14]=i[2]*t+i[6]*e+i[10]*n+i[14],i[15]=i[3]*t+i[7]*e+i[11]*n+i[15],this},scale:function(t){var e=t.x,n=t.y,i=t.z,r=this.val;return r[0]=r[0]*e,r[1]=r[1]*e,r[2]=r[2]*e,r[3]=r[3]*e,r[4]=r[4]*n,r[5]=r[5]*n,r[6]=r[6]*n,r[7]=r[7]*n,r[8]=r[8]*i,r[9]=r[9]*i,r[10]=r[10]*i,r[11]=r[11]*i,this},scaleXYZ:function(t,e,n){var i=this.val;return i[0]=i[0]*t,i[1]=i[1]*t,i[2]=i[2]*t,i[3]=i[3]*t,i[4]=i[4]*e,i[5]=i[5]*e,i[6]=i[6]*e,i[7]=i[7]*e,i[8]=i[8]*n,i[9]=i[9]*n,i[10]=i[10]*n,i[11]=i[11]*n,this},makeRotationAxis:function(t,e){var n=Math.cos(e),i=Math.sin(e),r=1-n,s=t.x,a=t.y,o=t.z,h=r*s,l=r*a;return this.fromArray([h*s+n,h*a-i*o,h*o+i*a,0,h*a+i*o,l*a+n,l*o-i*s,0,h*o-i*a,l*o+i*s,r*o*o+n,0,0,0,0,1]),this},rotate:function(t,e){var n=this.val,i=e.x,r=e.y,s=e.z,a=Math.sqrt(i*i+r*r+s*s);if(Math.abs(a)<1e-6)return null;i*=a=1/a,r*=a,s*=a;var o=Math.sin(t),h=Math.cos(t),l=1-h,u=n[0],c=n[1],f=n[2],d=n[3],p=n[4],v=n[5],m=n[6],g=n[7],y=n[8],x=n[9],w=n[10],M=n[11],E=i*i*l+h,T=r*i*l+s*o,A=s*i*l-r*o,b=i*r*l-s*o,R=r*r*l+h,I=s*r*l+i*o,S=i*s*l+r*o,C=r*s*l-i*o,P=s*s*l+h;return n[0]=u*E+p*T+y*A,n[1]=c*E+v*T+x*A,n[2]=f*E+m*T+w*A,n[3]=d*E+g*T+M*A,n[4]=u*b+p*R+y*I,n[5]=c*b+v*R+x*I,n[6]=f*b+m*R+w*I,n[7]=d*b+g*R+M*I,n[8]=u*S+p*C+y*P,n[9]=c*S+v*C+x*P,n[10]=f*S+m*C+w*P,n[11]=d*S+g*C+M*P,this},rotateX:function(t){var e=this.val,n=Math.sin(t),i=Math.cos(t),r=e[4],s=e[5],a=e[6],o=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=r*i+h*n,e[5]=s*i+l*n,e[6]=a*i+u*n,e[7]=o*i+c*n,e[8]=h*i-r*n,e[9]=l*i-s*n,e[10]=u*i-a*n,e[11]=c*i-o*n,this},rotateY:function(t){var e=this.val,n=Math.sin(t),i=Math.cos(t),r=e[0],s=e[1],a=e[2],o=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=r*i-h*n,e[1]=s*i-l*n,e[2]=a*i-u*n,e[3]=o*i-c*n,e[8]=r*n+h*i,e[9]=s*n+l*i,e[10]=a*n+u*i,e[11]=o*n+c*i,this},rotateZ:function(t){var e=this.val,n=Math.sin(t),i=Math.cos(t),r=e[0],s=e[1],a=e[2],o=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=r*i+h*n,e[1]=s*i+l*n,e[2]=a*i+u*n,e[3]=o*i+c*n,e[4]=h*i-r*n,e[5]=l*i-s*n,e[6]=u*i-a*n,e[7]=c*i-o*n,this},fromRotationTranslation:function(t,e){var n=this.val,i=t.x,r=t.y,s=t.z,a=t.w,o=i+i,h=r+r,l=s+s,u=i*o,c=i*h,f=i*l,d=r*h,p=r*l,v=s*l,m=a*o,g=a*h,y=a*l;return n[0]=1-(d+v),n[1]=c+y,n[2]=f-g,n[3]=0,n[4]=c-y,n[5]=1-(u+v),n[6]=p+m,n[7]=0,n[8]=f+g,n[9]=p-m,n[10]=1-(u+d),n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,this},fromQuat:function(t){var e=this.val,n=t.x,i=t.y,r=t.z,s=t.w,a=n+n,o=i+i,h=r+r,l=n*a,u=n*o,c=n*h,f=i*o,d=i*h,p=r*h,v=s*a,m=s*o,g=s*h;return e[0]=1-(f+p),e[1]=u+g,e[2]=c-m,e[3]=0,e[4]=u-g,e[5]=1-(l+p),e[6]=d+v,e[7]=0,e[8]=c+m,e[9]=d-v,e[10]=1-(l+f),e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},frustum:function(t,e,n,i,r,s){var a=this.val,o=1/(e-t),h=1/(i-n),l=1/(r-s);return a[0]=2*r*o,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=2*r*h,a[6]=0,a[7]=0,a[8]=(e+t)*o,a[9]=(i+n)*h,a[10]=(s+r)*l,a[11]=-1,a[12]=0,a[13]=0,a[14]=s*r*2*l,a[15]=0,this},perspective:function(t,e,n,i){var r=this.val,s=1/Math.tan(t/2),a=1/(n-i);return r[0]=s/e,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=s,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=(i+n)*a,r[11]=-1,r[12]=0,r[13]=0,r[14]=2*i*n*a,r[15]=0,this},perspectiveLH:function(t,e,n,i){var r=this.val;return r[0]=2*n/t,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=2*n/e,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=-i/(n-i),r[11]=1,r[12]=0,r[13]=0,r[14]=n*i/(n-i),r[15]=0,this},ortho:function(t,e,n,i,r,s){var a=this.val,o=t-e,h=n-i,l=r-s;return o=0===o?o:1/o,h=0===h?h:1/h,l=0===l?l:1/l,a[0]=-2*o,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=-2*h,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=2*l,a[11]=0,a[12]=(t+e)*o,a[13]=(i+n)*h,a[14]=(s+r)*l,a[15]=1,this},lookAt:function(t,e,n){var i=this.val,r=t.x,s=t.y,a=t.z,o=n.x,h=n.y,l=n.z,u=e.x,c=e.y,f=e.z;if(Math.abs(r-u)<1e-6&&Math.abs(s-c)<1e-6&&Math.abs(a-f)<1e-6)return this.identity();var d=r-u,p=s-c,v=a-f,m=1/Math.sqrt(d*d+p*p+v*v),g=h*(v*=m)-l*(p*=m),y=l*(d*=m)-o*v,x=o*p-h*d;(m=Math.sqrt(g*g+y*y+x*x))?(g*=m=1/m,y*=m,x*=m):(g=0,y=0,x=0);var w=p*x-v*y,M=v*g-d*x,E=d*y-p*g;return(m=Math.sqrt(w*w+M*M+E*E))?(w*=m=1/m,M*=m,E*=m):(w=0,M=0,E=0),i[0]=g,i[1]=w,i[2]=d,i[3]=0,i[4]=y,i[5]=M,i[6]=p,i[7]=0,i[8]=x,i[9]=E,i[10]=v,i[11]=0,i[12]=-(g*r+y*s+x*a),i[13]=-(w*r+M*s+E*a),i[14]=-(d*r+p*s+v*a),i[15]=1,this},yawPitchRoll:function(t,e,n){this.zero(),r.zero(),s.zero();var i=this.val,a=r.val,o=s.val,h=Math.sin(n),l=Math.cos(n);return i[10]=1,i[15]=1,i[0]=l,i[1]=h,i[4]=-h,i[5]=l,h=Math.sin(e),l=Math.cos(e),a[0]=1,a[15]=1,a[5]=l,a[10]=l,a[9]=-h,a[6]=h,h=Math.sin(t),l=Math.cos(t),o[5]=1,o[15]=1,o[0]=l,o[2]=-h,o[8]=h,o[10]=l,this.multiplyLocal(r),this.multiplyLocal(s),this},setWorldMatrix:function(t,e,n,i,a){return this.yawPitchRoll(t.y,t.x,t.z),r.scaling(n.x,n.y,n.z),s.xyz(e.x,e.y,e.z),this.multiplyLocal(r),this.multiplyLocal(s),void 0!==i&&this.multiplyLocal(i),void 0!==a&&this.multiplyLocal(a),this}}),r=new i,s=new i;t.exports=i},function(t,e,n){var i=n(0),r=n(10),s=n(26),a=new Int8Array([1,2,0]),o=new Float32Array([0,0,0]),h=new r(1,0,0),l=new r(0,1,0),u=new r,c=new s,f=new i({initialize:function(t,e,n,i){"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=n||0,this.w=i||0)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},set:function(t,e,n,i){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=n||0,this.w=i||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,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,n=this.z,i=this.w;return Math.sqrt(t*t+e*e+n*n+i*i)},lengthSq:function(){var t=this.x,e=this.y,n=this.z,i=this.w;return t*t+e*e+n*n+i*i},normalize:function(){var t=this.x,e=this.y,n=this.z,i=this.w,r=t*t+e*e+n*n+i*i;return r>0&&(r=1/Math.sqrt(r),this.x=t*r,this.y=e*r,this.z=n*r,this.w=i*r),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 n=this.x,i=this.y,r=this.z,s=this.w;return this.x=n+e*(t.x-n),this.y=i+e*(t.y-i),this.z=r+e*(t.z-r),this.w=s+e*(t.w-s),this},rotationTo:function(t,e){var n=t.x*e.x+t.y*e.y+t.z*e.z;return n<-.999999?(u.copy(h).cross(t).length()<1e-6&&u.copy(l).cross(t),u.normalize(),this.setAxisAngle(u,Math.PI)):n>.999999?(this.x=0,this.y=0,this.z=0,this.w=1,this):(u.copy(t).cross(e),this.x=u.x,this.y=u.y,this.z=u.z,this.w=1+n,this.normalize())},setAxes:function(t,e,n){var i=c.val;return i[0]=e.x,i[3]=e.y,i[6]=e.z,i[1]=n.x,i[4]=n.y,i[7]=n.z,i[2]=-t.x,i[5]=-t.y,i[8]=-t.z,this.fromMat3(c).normalize()},identity:function(){return this.x=0,this.y=0,this.z=0,this.w=1,this},setAxisAngle:function(t,e){e*=.5;var n=Math.sin(e);return this.x=n*t.x,this.y=n*t.y,this.z=n*t.z,this.w=Math.cos(e),this},multiply:function(t){var e=this.x,n=this.y,i=this.z,r=this.w,s=t.x,a=t.y,o=t.z,h=t.w;return this.x=e*h+r*s+n*o-i*a,this.y=n*h+r*a+i*s-e*o,this.z=i*h+r*o+e*a-n*s,this.w=r*h-e*s-n*a-i*o,this},slerp:function(t,e){var n=this.x,i=this.y,r=this.z,s=this.w,a=t.x,o=t.y,h=t.z,l=t.w,u=n*a+i*o+r*h+s*l;u<0&&(u=-u,a=-a,o=-o,h=-h,l=-l);var c=1-e,f=e;if(1-u>1e-6){var d=Math.acos(u),p=Math.sin(d);c=Math.sin((1-e)*d)/p,f=Math.sin(e*d)/p}return this.x=c*n+f*a,this.y=c*i+f*o,this.z=c*r+f*h,this.w=c*s+f*l,this},invert:function(){var t=this.x,e=this.y,n=this.z,i=this.w,r=t*t+e*e+n*n+i*i,s=r?1/r:0;return this.x=-t*s,this.y=-e*s,this.z=-n*s,this.w=i*s,this},conjugate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},rotateX:function(t){t*=.5;var e=this.x,n=this.y,i=this.z,r=this.w,s=Math.sin(t),a=Math.cos(t);return this.x=e*a+r*s,this.y=n*a+i*s,this.z=i*a-n*s,this.w=r*a-e*s,this},rotateY:function(t){t*=.5;var e=this.x,n=this.y,i=this.z,r=this.w,s=Math.sin(t),a=Math.cos(t);return this.x=e*a-i*s,this.y=n*a+r*s,this.z=i*a+e*s,this.w=r*a-n*s,this},rotateZ:function(t){t*=.5;var e=this.x,n=this.y,i=this.z,r=this.w,s=Math.sin(t),a=Math.cos(t);return this.x=e*a+n*s,this.y=n*a-e*s,this.z=i*a+r*s,this.w=r*a-i*s,this},calculateW:function(){var t=this.x,e=this.y,n=this.z;return this.w=-Math.sqrt(1-t*t-e*e-n*n),this},fromMat3:function(t){var e,n=t.val,i=n[0]+n[4]+n[8];if(i>0)e=Math.sqrt(i+1),this.w=.5*e,e=.5/e,this.x=(n[7]-n[5])*e,this.y=(n[2]-n[6])*e,this.z=(n[3]-n[1])*e;else{var r=0;n[4]>n[0]&&(r=1),n[8]>n[3*r+r]&&(r=2);var s=a[r],h=a[s];e=Math.sqrt(n[3*r+r]-n[3*s+s]-n[3*h+h]+1),o[r]=.5*e,e=.5/e,o[s]=(n[3*s+r]+n[3*r+s])*e,o[h]=(n[3*h+r]+n[3*r+h])*e,this.x=o[0],this.y=o[1],this.z=o[2],this.w=(n[3*h+s]-n[3*s+h])*e}return this}});t.exports=f},function(t,e,n){var i=n(14),r=n(30);t.exports=function(t,e){var n=void 0===t?r():i({},t);if(e)for(var s in e)void 0!==e[s]&&(n[s]=e[s]);return n}},function(t,e){t.exports=function(t,e,n,i,r){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===n&&(n=""),void 0===i&&(i=""),void 0===r&&(r=0),{responseType:t,async:e,user:n,password:i,timeout:r,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0}}},function(t,e){t.exports=function(){}},function(t,e,n){var i=n(33),r=n(0),s=n(11),a=n(143),o=n(144),h=n(166),l=n(167),u=n(185),c=new r({Extends:o,initialize:function(t,e){o.call(this,t,e);var n=e.game;this.isWebGL=2===n.config.renderType,this.cache=n.cache.addCustom("spine"),this.spineTextures=n.cache.addCustom("spineTextures"),this.json=n.cache.json,this.textures=n.textures,this.drawDebug=!1,this.gl,this.renderer,this.sceneRenderer,this.skeletonRenderer,this.skeletonDebugRenderer,this.plugin=h,this.temp1,this.temp2,this.isWebGL?(this.runtime=h.webgl,this.renderer=n.renderer,this.gl=n.renderer.gl,this.getAtlas=this.getAtlasWebGL):(this.runtime=h.canvas,this.renderer=n.renderer,this.getAtlas=this.getAtlasCanvas);var r=this;e.registerFileType("spine",this.spineFileCallback,t),e.registerGameObject("spine",function(t,e,n,i,s){var a=new u(this.scene,r,t,e,n,i,s);return this.displayList.add(a),this.updateList.add(a),a},function(t,e){void 0===t&&(t={});var n=s(t,"key",null),a=s(t,"animationName",null),o=s(t,"loop",!1),h=new u(this.scene,r,0,0,n,a,o);void 0!==e&&(t.add=e),i(this.scene,h,t);var l=s(t,"skinName",!1);l&&h.setSkinByName(l);var c=s(t,"slotName",!1),f=s(t,"attachmentName",null);return c&&h.setAttachment(c,f),h.refresh()})},boot:function(){this.isWebGL?(this.bootWebGL(),this.onResize(),this.game.scale.on(a,this.onResize,this)):this.bootCanvas();var t=this.systems.events;t.once("shutdown",this.shutdown,this),t.once("destroy",this.destroy,this)},bootCanvas:function(){this.skeletonRenderer=new h.canvas.SkeletonRenderer(this.scene.sys.context)},bootWebGL:function(){this.sceneRenderer=new h.webgl.SceneRenderer(this.renderer.canvas,this.gl,!0);var t=function(t,e){if(t!==this.srcBlend||e!==this.dstBlend){var n=this.context.gl;this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),n.blendFunc(this.srcBlend,this.dstBlend))}};this.sceneRenderer.batcher.setBlendMode=t,this.sceneRenderer.shapes.setBlendMode=t,this.skeletonRenderer=this.sceneRenderer.skeletonRenderer,this.skeletonDebugRenderer=this.sceneRenderer.skeletonDebugRenderer,this.temp1=new h.webgl.Vector3(0,0,0),this.temp2=new h.webgl.Vector3(0,0,0)},getAtlasCanvas:function(t){var e=this.cache.get(t);if(e){var n,i=this.spineTextures;if(i.has(t))n=i.get(t);else{var r=this.textures;n=new h.TextureAtlas(e.data,function(t){return new h.canvas.CanvasTexture(r.get(t).getSourceImage())})}return n}console.warn("No atlas data for: "+t)},getAtlasWebGL:function(t){var e=this.cache.get(t);if(e){var n,i=this.spineTextures;if(i.has(t))n=i.get(t);else{var r=this.textures,s=this.sceneRenderer.context.gl;s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),n=new h.TextureAtlas(e.data,function(t){return new h.webgl.GLTexture(s,r.get(t).getSourceImage(),!1)})}return n}console.warn("No atlas data for: "+t)},spineFileCallback:function(t,e,n,i,r,s){var a;if(Array.isArray(t))for(var o=0;o=i.PI2-n?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=n:e=1?1:1/e*(1+(e*t|0))}},function(t,e,n){t.exports={Ceil:n(94),Equal:n(95),Floor:n(96),GreaterThan:n(97),LessThan:n(98)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.ceil(t-e)}},function(t,e){t.exports=function(t,e,n){return void 0===n&&(n=1e-4),Math.abs(t-e)e-n}},function(t,e){t.exports=function(t,e,n){return void 0===n&&(n=1e-4),t1?t[n]-(i(r-n,t[n],t[n],t[n-1],t[n-1])-t[n]):i(r-s,t[s?s-1:0],t[s],t[n1?i(t[n],t[n-1],n-r):i(t[s],t[s+1>n?n:s+1],r-s)}},function(t,e){t.exports=function(t,e,n,i){return function(t,e){var n=1-t;return n*n*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,n)+function(t,e){return t*t*e}(t,i)}},function(t,e,n){var i=n(23);t.exports=function(t,e,n){return e+(n-e)*i(t,0,1)}},function(t,e,n){var i=n(24);t.exports=function(t,e,n){return e+(n-e)*i(t,0,1)}},function(t,e,n){t.exports={GetNext:n(108),IsSize:n(109),IsValue:n(110)}},function(t,e){t.exports=function(t){var e=Math.log(t)/.6931471805599453;return 1<0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e){t.exports=function(t){return t>0&&0==(t&t-1)}},function(t,e,n){t.exports={Ceil:n(112),Floor:n(113),To:n(114)}},function(t,e){t.exports=function(t,e,n,i){return void 0===n&&(n=0),0===e?t:(t-=n,t=e*Math.ceil(t/e),i?(n+t)/e:n+t)}},function(t,e){t.exports=function(t,e,n,i){return void 0===n&&(n=0),0===e?t:(t-=n,t=e*Math.floor(t/e),i?(n+t)/e:n+t)}},function(t,e){t.exports=function(t,e,n,i){return void 0===n&&(n=0),0===e?t:(t-=n,t=e*Math.round(t/e),i?(n+t)/e:n+t)}},function(t,e,n){var i=new(n(0))({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,n=this.n;t=t.toString();for(var i=0;i>>0,n=(e*=n)>>>0,n+=4294967296*(e-=n);return this.n=n,2.3283064365386963e-10*(n>>>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 n=Math.floor(this.frac()*(e+1)),i=t[n];t[n]=t[e],t[e]=i}return t}});t.exports=i},function(t,e){t.exports=function(t){for(var e=0,n=0;n1?void 0!==i?(r=(i-t)/(i-n))<0&&(r=0):r=1:r<0&&(r=0),r}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var n=2*Math.random()*Math.PI;return t.x=Math.cos(n)*e,t.y=Math.sin(n)*e,t}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var n=2*Math.random()*Math.PI,i=2*Math.random()-1,r=Math.sqrt(1-i*i)*e;return t.x=Math.cos(n)*r,t.y=Math.sin(n)*r,t.z=i*e,t}},function(t,e){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}},function(t,e){t.exports=function(t,e){var n=t.x,i=t.y;return t.x=n*Math.cos(e)-i*Math.sin(e),t.y=n*Math.sin(e)+i*Math.cos(e),t}},function(t,e){t.exports=function(t,e,n,i){var r=Math.cos(i),s=Math.sin(i),a=t.x-e,o=t.y-n;return t.x=a*r-o*s+e,t.y=a*s+o*r+n,t}},function(t,e){t.exports=function(t,e,n,i,r){var s=i+Math.atan2(t.y-n,t.x-e);return t.x=e+r*Math.cos(s),t.y=n+r*Math.sin(s),t}},function(t,e){t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},function(t,e){t.exports=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=10);var i=Math.pow(n,-e);return Math.round(t*i)/i}},function(t,e){t.exports=function(t,e,n,i){void 0===e&&(e=1),void 0===n&&(n=1),void 0===i&&(i=1),i*=Math.PI/t;for(var r=[],s=[],a=0;a0&&t<=e*n&&(s=t>e-1?t-(a=Math.floor(t/e))*e:t,r.set(s,a)),r}},function(t,e,n){var i=n(5);t.exports=function(t,e,n,r,s,a,o,h){void 0===h&&(h=new i);var l=Math.sin(s),u=Math.cos(s),c=u*a,f=l*a,d=-l*o,p=u*o,v=1/(c*p+d*-f);return h.x=p*v*t+-d*v*e+(r*d-n*p)*v,h.y=c*v*e+-f*v*t+(-r*c+n*f)*v,h}},function(t,e){t.exports=function(t,e,n){return Math.abs(t-e)<=n}},function(t,e,n){var i=new(n(0))({initialize:function(t,e,n,i){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=n||0,this.w=i||0)},clone:function(){return new i(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,n,i){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=n||0,this.w=i||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,n=this.z,i=this.w;return Math.sqrt(t*t+e*e+n*n+i*i)},lengthSq:function(){var t=this.x,e=this.y,n=this.z,i=this.w;return t*t+e*e+n*n+i*i},normalize:function(){var t=this.x,e=this.y,n=this.z,i=this.w,r=t*t+e*e+n*n+i*i;return r>0&&(r=1/Math.sqrt(r),this.x=t*r,this.y=e*r,this.z=n*r,this.w=i*r),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 n=this.x,i=this.y,r=this.z,s=this.w;return this.x=n+e*(t.x-n),this.y=i+e*(t.y-i),this.z=r+e*(t.z-r),this.w=s+e*(t.w-s),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,n=t.y-this.y,i=t.z-this.z||0,r=t.w-this.w||0;return Math.sqrt(e*e+n*n+i*i+r*r)},distanceSq:function(t){var e=t.x-this.x,n=t.y-this.y,i=t.z-this.z||0,r=t.w-this.w||0;return e*e+n*n+i*i+r*r},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,n=this.y,i=this.z,r=this.w,s=t.val;return this.x=s[0]*e+s[4]*n+s[8]*i+s[12]*r,this.y=s[1]*e+s[5]*n+s[9]*i+s[13]*r,this.z=s[2]*e+s[6]*n+s[10]*i+s[14]*r,this.w=s[3]*e+s[7]*n+s[11]*i+s[15]*r,this},transformQuat:function(t){var e=this.x,n=this.y,i=this.z,r=t.x,s=t.y,a=t.z,o=t.w,h=o*e+s*i-a*n,l=o*n+a*e-r*i,u=o*i+r*n-s*e,c=-r*e-s*n-a*i;return this.x=h*o+c*-r+l*-a-u*-s,this.y=l*o+c*-s+u*-r-h*-a,this.z=u*o+c*-a+h*-s-l*-r,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});i.prototype.sub=i.prototype.subtract,i.prototype.mul=i.prototype.multiply,i.prototype.div=i.prototype.divide,i.prototype.dist=i.prototype.distance,i.prototype.distSq=i.prototype.distanceSq,i.prototype.len=i.prototype.length,i.prototype.lenSq=i.prototype.lengthSq,t.exports=i},function(t,e,n){var i=n(10),r=n(27),s=n(28),a=new r,o=new s,h=new i;t.exports=function(t,e,n){return o.setAxisAngle(e,n),a.fromRotationTranslation(o,h.set(0,0,0)),t.transformMat4(a)}},function(t,e){t.exports="resize"},function(t,e,n){var i=n(145),r=n(0),s=n(146),a=new r({Extends:i,initialize:function(t,e){i.call(this,e),this.scene=t,this.systems=t.sys,t.sys.events.once(s.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=a},function(t,e,n){var i=new(n(0))({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=i},function(t,e,n){t.exports={BOOT:n(147),CREATE:n(148),DESTROY:n(149),PAUSE:n(150),POST_UPDATE:n(151),PRE_UPDATE:n(152),READY:n(153),RENDER:n(154),RESUME:n(155),SHUTDOWN:n(156),SLEEP:n(157),START:n(158),TRANSITION_COMPLETE:n(159),TRANSITION_INIT:n(160),TRANSITION_OUT:n(161),TRANSITION_START:n(162),TRANSITION_WAKE:n(163),UPDATE:n(164),WAKE:n(165)}},function(t,e){t.exports="boot"},function(t,e){t.exports="create"},function(t,e){t.exports="destroy"},function(t,e){t.exports="pause"},function(t,e){t.exports="postupdate"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="ready"},function(t,e){t.exports="render"},function(t,e){t.exports="resume"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="sleep"},function(t,e){t.exports="start"},function(t,e){t.exports="transitioncomplete"},function(t,e){t.exports="transitioninit"},function(t,e){t.exports="transitionout"},function(t,e){t.exports="transitionstart"},function(t,e){t.exports="transitionwake"},function(t,e){t.exports="update"},function(t,e){t.exports="wake"},function(t,e){(function(){var e,n,i,r=this&&this.__extends||(e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,n)},function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)});!function(t){var e,n,i,s=function(){function t(t,e,n){if(null==t)throw new Error("name cannot be null.");if(null==e)throw new Error("timelines cannot be null.");this.name=t,this.timelines=e,this.timelineIds=[];for(var i=0;i0&&(e%=this.duration));for(var h=this.timelines,l=0,u=h.length;l>>1;;){if(t[(s+1)*n]<=e?i=s+1:r=s,i==r)return(i+1)*n;s=i+r>>>1}},t.linearSearch=function(t,e,n){for(var i=0,r=t.length-n;i<=r;i+=n)if(t[i]>e)return i;return-1},t}();t.Animation=s,function(t){t[t.setup=0]="setup",t[t.first=1]="first",t[t.replace=2]="replace",t[t.add=3]="add"}(e=t.MixBlend||(t.MixBlend={})),function(t){t[t.mixIn=0]="mixIn",t[t.mixOut=1]="mixOut"}(n=t.MixDirection||(t.MixDirection={})),function(t){t[t.rotate=0]="rotate",t[t.translate=1]="translate",t[t.scale=2]="scale",t[t.shear=3]="shear",t[t.attachment=4]="attachment",t[t.color=5]="color",t[t.deform=6]="deform",t[t.event=7]="event",t[t.drawOrder=8]="drawOrder",t[t.ikConstraint=9]="ikConstraint",t[t.transformConstraint=10]="transformConstraint",t[t.pathConstraintPosition=11]="pathConstraintPosition",t[t.pathConstraintSpacing=12]="pathConstraintSpacing",t[t.pathConstraintMix=13]="pathConstraintMix",t[t.twoColor=14]="twoColor"}(i=t.TimelineType||(t.TimelineType={}));var a=function(){function e(n){if(n<=0)throw new Error("frameCount must be > 0: "+n);this.curves=t.Utils.newFloatArray((n-1)*e.BEZIER_SIZE)}return e.prototype.getFrameCount=function(){return this.curves.length/e.BEZIER_SIZE+1},e.prototype.setLinear=function(t){this.curves[t*e.BEZIER_SIZE]=e.LINEAR},e.prototype.setStepped=function(t){this.curves[t*e.BEZIER_SIZE]=e.STEPPED},e.prototype.getCurveType=function(t){var n=t*e.BEZIER_SIZE;if(n==this.curves.length)return e.LINEAR;var i=this.curves[n];return i==e.LINEAR?e.LINEAR:i==e.STEPPED?e.STEPPED:e.BEZIER},e.prototype.setCurve=function(t,n,i,r,s){var a=.03*(2*-n+r),o=.03*(2*-i+s),h=.006*(3*(n-r)+1),l=.006*(3*(i-s)+1),u=2*a+h,c=2*o+l,f=.3*n+a+.16666667*h,d=.3*i+o+.16666667*l,p=t*e.BEZIER_SIZE,v=this.curves;v[p++]=e.BEZIER;for(var m=f,g=d,y=p+e.BEZIER_SIZE-1;p=i){var u=void 0,c=void 0;return s==h?(u=0,c=0):(u=r[s-2],c=r[s-1]),c+(r[s+1]-c)*(i-u)/(o-u)}var f=r[s-1];return f+(1-f)*(i-o)/(1-o)},e.LINEAR=0,e.STEPPED=1,e.BEZIER=2,e.BEZIER_SIZE=19,e}();t.CurveTimeline=a;var o=function(n){function a(e){var i=n.call(this,e)||this;return i.frames=t.Utils.newFloatArray(e<<1),i}return r(a,n),a.prototype.getPropertyId=function(){return(i.rotate<<24)+this.boneIndex},a.prototype.setFrame=function(t,e,n){t<<=1,this.frames[t]=e,this.frames[t+a.ROTATION]=n},a.prototype.apply=function(t,n,i,r,o,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(c.active)if(i=u[u.length-a.ENTRIES]){var d=u[u.length+a.PREV_ROTATION];switch(h){case e.setup:c.rotation=c.data.rotation+d*o;break;case e.first:case e.replace:d+=c.data.rotation-c.rotation,d-=360*(16384-(16384.499999999996-d/360|0));case e.add:c.rotation+=d*o}}else{var p=s.binarySearch(u,i,a.ENTRIES),v=u[p+a.PREV_ROTATION],m=u[p],g=this.getCurvePercent((p>>1)-1,1-(i-m)/(u[p+a.PREV_TIME]-m)),y=u[p+a.ROTATION]-v;switch(y=v+(y-360*(16384-(16384.499999999996-y/360|0)))*g,h){case e.setup:c.rotation=c.data.rotation+(y-360*(16384-(16384.499999999996-y/360|0)))*o;break;case e.first:case e.replace:y+=c.data.rotation-c.rotation;case e.add:c.rotation+=(y-360*(16384-(16384.499999999996-y/360|0)))*o}}},a.ENTRIES=2,a.PREV_TIME=-2,a.PREV_ROTATION=-1,a.ROTATION=1,a}(a);t.RotateTimeline=o;var h=function(n){function a(e){var i=n.call(this,e)||this;return i.frames=t.Utils.newFloatArray(e*a.ENTRIES),i}return r(a,n),a.prototype.getPropertyId=function(){return(i.translate<<24)+this.boneIndex},a.prototype.setFrame=function(t,e,n,i){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.X]=n,this.frames[t+a.Y]=i},a.prototype.apply=function(t,n,i,r,o,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(c.active)if(i=u[u.length-a.ENTRIES])f=u[u.length+a.PREV_X],d=u[u.length+a.PREV_Y];else{var p=s.binarySearch(u,i,a.ENTRIES);f=u[p+a.PREV_X],d=u[p+a.PREV_Y];var v=u[p],m=this.getCurvePercent(p/a.ENTRIES-1,1-(i-v)/(u[p+a.PREV_TIME]-v));f+=(u[p+a.X]-f)*m,d+=(u[p+a.Y]-d)*m}switch(h){case e.setup:c.x=c.data.x+f*o,c.y=c.data.y+d*o;break;case e.first:case e.replace:c.x+=(c.data.x+f-c.x)*o,c.y+=(c.data.y+d-c.y)*o;break;case e.add:c.x+=f*o,c.y+=d*o}}},a.ENTRIES=3,a.PREV_TIME=-3,a.PREV_X=-2,a.PREV_Y=-1,a.X=1,a.Y=2,a}(a);t.TranslateTimeline=h;var l=function(a){function o(t){return a.call(this,t)||this}return r(o,a),o.prototype.getPropertyId=function(){return(i.scale<<24)+this.boneIndex},o.prototype.apply=function(i,r,a,h,l,u,c){var f=this.frames,d=i.bones[this.boneIndex];if(d.active)if(a=f[f.length-o.ENTRIES])p=f[f.length+o.PREV_X]*d.data.scaleX,v=f[f.length+o.PREV_Y]*d.data.scaleY;else{var m=s.binarySearch(f,a,o.ENTRIES);p=f[m+o.PREV_X],v=f[m+o.PREV_Y];var g=f[m],y=this.getCurvePercent(m/o.ENTRIES-1,1-(a-g)/(f[m+o.PREV_TIME]-g));p=(p+(f[m+o.X]-p)*y)*d.data.scaleX,v=(v+(f[m+o.Y]-v)*y)*d.data.scaleY}if(1==l)u==e.add?(d.scaleX+=p-d.data.scaleX,d.scaleY+=v-d.data.scaleY):(d.scaleX=p,d.scaleY=v);else{var x=0,w=0;if(c==n.mixOut)switch(u){case e.setup:x=d.data.scaleX,w=d.data.scaleY,d.scaleX=x+(Math.abs(p)*t.MathUtils.signum(x)-x)*l,d.scaleY=w+(Math.abs(v)*t.MathUtils.signum(w)-w)*l;break;case e.first:case e.replace:x=d.scaleX,w=d.scaleY,d.scaleX=x+(Math.abs(p)*t.MathUtils.signum(x)-x)*l,d.scaleY=w+(Math.abs(v)*t.MathUtils.signum(w)-w)*l;break;case e.add:x=d.scaleX,w=d.scaleY,d.scaleX=x+(Math.abs(p)*t.MathUtils.signum(x)-d.data.scaleX)*l,d.scaleY=w+(Math.abs(v)*t.MathUtils.signum(w)-d.data.scaleY)*l}else switch(u){case e.setup:x=Math.abs(d.data.scaleX)*t.MathUtils.signum(p),w=Math.abs(d.data.scaleY)*t.MathUtils.signum(v),d.scaleX=x+(p-x)*l,d.scaleY=w+(v-w)*l;break;case e.first:case e.replace:x=Math.abs(d.scaleX)*t.MathUtils.signum(p),w=Math.abs(d.scaleY)*t.MathUtils.signum(v),d.scaleX=x+(p-x)*l,d.scaleY=w+(v-w)*l;break;case e.add:x=t.MathUtils.signum(p),w=t.MathUtils.signum(v),d.scaleX=Math.abs(d.scaleX)*x+(p-Math.abs(d.data.scaleX)*x)*l,d.scaleY=Math.abs(d.scaleY)*w+(v-Math.abs(d.data.scaleY)*w)*l}}}},o}(h);t.ScaleTimeline=l;var u=function(t){function n(e){return t.call(this,e)||this}return r(n,t),n.prototype.getPropertyId=function(){return(i.shear<<24)+this.boneIndex},n.prototype.apply=function(t,i,r,a,o,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(c.active)if(r=u[u.length-n.ENTRIES])f=u[u.length+n.PREV_X],d=u[u.length+n.PREV_Y];else{var p=s.binarySearch(u,r,n.ENTRIES);f=u[p+n.PREV_X],d=u[p+n.PREV_Y];var v=u[p],m=this.getCurvePercent(p/n.ENTRIES-1,1-(r-v)/(u[p+n.PREV_TIME]-v));f+=(u[p+n.X]-f)*m,d+=(u[p+n.Y]-d)*m}switch(h){case e.setup:c.shearX=c.data.shearX+f*o,c.shearY=c.data.shearY+d*o;break;case e.first:case e.replace:c.shearX+=(c.data.shearX+f-c.shearX)*o,c.shearY+=(c.data.shearY+d-c.shearY)*o;break;case e.add:c.shearX+=f*o,c.shearY+=d*o}}},n}(h);t.ShearTimeline=u;var c=function(n){function a(e){var i=n.call(this,e)||this;return i.frames=t.Utils.newFloatArray(e*a.ENTRIES),i}return r(a,n),a.prototype.getPropertyId=function(){return(i.color<<24)+this.slotIndex},a.prototype.setFrame=function(t,e,n,i,r,s){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.R]=n,this.frames[t+a.G]=i,this.frames[t+a.B]=r,this.frames[t+a.A]=s},a.prototype.apply=function(t,n,i,r,o,h,l){var u=t.slots[this.slotIndex];if(u.bone.active){var c=this.frames;if(i=c[c.length-a.ENTRIES]){var y=c.length;p=c[y+a.PREV_R],v=c[y+a.PREV_G],m=c[y+a.PREV_B],g=c[y+a.PREV_A]}else{var x=s.binarySearch(c,i,a.ENTRIES);p=c[x+a.PREV_R],v=c[x+a.PREV_G],m=c[x+a.PREV_B],g=c[x+a.PREV_A];var w=c[x],M=this.getCurvePercent(x/a.ENTRIES-1,1-(i-w)/(c[x+a.PREV_TIME]-w));p+=(c[x+a.R]-p)*M,v+=(c[x+a.G]-v)*M,m+=(c[x+a.B]-m)*M,g+=(c[x+a.A]-g)*M}if(1==o)u.color.set(p,v,m,g);else{f=u.color;h==e.setup&&f.setFromColor(u.data.color),f.add((p-f.r)*o,(v-f.g)*o,(m-f.b)*o,(g-f.a)*o)}}}},a.ENTRIES=5,a.PREV_TIME=-5,a.PREV_R=-4,a.PREV_G=-3,a.PREV_B=-2,a.PREV_A=-1,a.R=1,a.G=2,a.B=3,a.A=4,a}(a);t.ColorTimeline=c;var f=function(n){function a(e){var i=n.call(this,e)||this;return i.frames=t.Utils.newFloatArray(e*a.ENTRIES),i}return r(a,n),a.prototype.getPropertyId=function(){return(i.twoColor<<24)+this.slotIndex},a.prototype.setFrame=function(t,e,n,i,r,s,o,h,l){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.R]=n,this.frames[t+a.G]=i,this.frames[t+a.B]=r,this.frames[t+a.A]=s,this.frames[t+a.R2]=o,this.frames[t+a.G2]=h,this.frames[t+a.B2]=l},a.prototype.apply=function(t,n,i,r,o,h,l){var u=t.slots[this.slotIndex];if(u.bone.active){var c=this.frames;if(i=c[c.length-a.ENTRIES]){var T=c.length;m=c[T+a.PREV_R],g=c[T+a.PREV_G],y=c[T+a.PREV_B],x=c[T+a.PREV_A],w=c[T+a.PREV_R2],M=c[T+a.PREV_G2],E=c[T+a.PREV_B2]}else{var A=s.binarySearch(c,i,a.ENTRIES);m=c[A+a.PREV_R],g=c[A+a.PREV_G],y=c[A+a.PREV_B],x=c[A+a.PREV_A],w=c[A+a.PREV_R2],M=c[A+a.PREV_G2],E=c[A+a.PREV_B2];var b=c[A],R=this.getCurvePercent(A/a.ENTRIES-1,1-(i-b)/(c[A+a.PREV_TIME]-b));m+=(c[A+a.R]-m)*R,g+=(c[A+a.G]-g)*R,y+=(c[A+a.B]-y)*R,x+=(c[A+a.A]-x)*R,w+=(c[A+a.R2]-w)*R,M+=(c[A+a.G2]-M)*R,E+=(c[A+a.B2]-E)*R}if(1==o)u.color.set(m,g,y,x),u.darkColor.set(w,M,E,1);else{f=u.color,d=u.darkColor;h==e.setup&&(f.setFromColor(u.data.color),d.setFromColor(u.data.darkColor)),f.add((m-f.r)*o,(g-f.g)*o,(y-f.b)*o,(x-f.a)*o),d.add((w-d.r)*o,(M-d.g)*o,(E-d.b)*o,0)}}}},a.ENTRIES=8,a.PREV_TIME=-8,a.PREV_R=-7,a.PREV_G=-6,a.PREV_B=-5,a.PREV_A=-4,a.PREV_R2=-3,a.PREV_G2=-2,a.PREV_B2=-1,a.R=1,a.G=2,a.B=3,a.A=4,a.R2=5,a.G2=6,a.B2=7,a}(a);t.TwoColorTimeline=f;var d=function(){function r(e){this.frames=t.Utils.newFloatArray(e),this.attachmentNames=new Array(e)}return r.prototype.getPropertyId=function(){return(i.attachment<<24)+this.slotIndex},r.prototype.getFrameCount=function(){return this.frames.length},r.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.attachmentNames[t]=n},r.prototype.apply=function(t,i,r,a,o,h,l){var u=t.slots[this.slotIndex];if(u.bone.active)if(l!=n.mixOut||h!=e.setup){var c=this.frames;if(r=c[c.length-1]?c.length-1:s.binarySearch(c,r,1)-1;var p=this.attachmentNames[d];t.slots[this.slotIndex].setAttachment(null==p?null:t.getAttachment(this.slotIndex,p))}}else{var v=u.data.attachmentName;u.setAttachment(null==v?null:t.getAttachment(this.slotIndex,v))}},r}();t.AttachmentTimeline=d;var p=null,v=function(n){function a(e){var i=n.call(this,e)||this;return i.frames=t.Utils.newFloatArray(e),i.frameVertices=new Array(e),null==p&&(p=t.Utils.newFloatArray(64)),i}return r(a,n),a.prototype.getPropertyId=function(){return(i.deform<<27)+ +this.attachment.id+this.slotIndex},a.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.frameVertices[t]=n},a.prototype.apply=function(n,i,r,a,o,h,l){var u=n.slots[this.slotIndex];if(u.bone.active){var c=u.getAttachment();if(c instanceof t.VertexAttachment&&c.deformAttachment==this.attachment){var f=u.deform;0==f.length&&(h=e.setup);var d=this.frameVertices,p=d[0].length,v=this.frames;if(r=v[v.length-1]){var M=d[v.length-1];if(1==o)if(h==e.add)if(null==(m=c).bones){y=m.vertices;for(var E=0;En)this.apply(t,e,Number.MAX_VALUE,i,r,a,o),e=-1;else if(e>=h[l-1])return;if(!(n0&&h[u-1]==c;)u--;for(;u=h[u];u++)i.push(this.events[u])}}},e}();t.EventTimeline=m;var g=function(){function r(e){this.frames=t.Utils.newFloatArray(e),this.drawOrders=new Array(e)}return r.prototype.getPropertyId=function(){return i.drawOrder<<24},r.prototype.getFrameCount=function(){return this.frames.length},r.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.drawOrders[t]=n},r.prototype.apply=function(i,r,a,o,h,l,u){var c=i.drawOrder,f=i.slots;if(u!=n.mixOut||l!=e.setup){var d=this.frames;if(a=d[d.length-1]?d.length-1:s.binarySearch(d,a)-1;var v=this.drawOrders[p];if(null==v)t.Utils.arrayCopy(f,0,c,0,f.length);else for(var m=0,g=v.length;m=c[c.length-o.ENTRIES])l==e.setup?(f.mix=f.data.mix+(c[c.length+o.PREV_MIX]-f.data.mix)*h,f.softness=f.data.softness+(c[c.length+o.PREV_SOFTNESS]-f.data.softness)*h,u==n.mixOut?(f.bendDirection=f.data.bendDirection,f.compress=f.data.compress,f.stretch=f.data.stretch):(f.bendDirection=c[c.length+o.PREV_BEND_DIRECTION],f.compress=0!=c[c.length+o.PREV_COMPRESS],f.stretch=0!=c[c.length+o.PREV_STRETCH])):(f.mix+=(c[c.length+o.PREV_MIX]-f.mix)*h,f.softness+=(c[c.length+o.PREV_SOFTNESS]-f.softness)*h,u==n.mixIn&&(f.bendDirection=c[c.length+o.PREV_BEND_DIRECTION],f.compress=0!=c[c.length+o.PREV_COMPRESS],f.stretch=0!=c[c.length+o.PREV_STRETCH]));else{var d=s.binarySearch(c,r,o.ENTRIES),p=c[d+o.PREV_MIX],v=c[d+o.PREV_SOFTNESS],m=c[d],g=this.getCurvePercent(d/o.ENTRIES-1,1-(r-m)/(c[d+o.PREV_TIME]-m));l==e.setup?(f.mix=f.data.mix+(p+(c[d+o.MIX]-p)*g-f.data.mix)*h,f.softness=f.data.softness+(v+(c[d+o.SOFTNESS]-v)*g-f.data.softness)*h,u==n.mixOut?(f.bendDirection=f.data.bendDirection,f.compress=f.data.compress,f.stretch=f.data.stretch):(f.bendDirection=c[d+o.PREV_BEND_DIRECTION],f.compress=0!=c[d+o.PREV_COMPRESS],f.stretch=0!=c[d+o.PREV_STRETCH])):(f.mix+=(p+(c[d+o.MIX]-p)*g-f.mix)*h,f.softness+=(v+(c[d+o.SOFTNESS]-v)*g-f.softness)*h,u==n.mixIn&&(f.bendDirection=c[d+o.PREV_BEND_DIRECTION],f.compress=0!=c[d+o.PREV_COMPRESS],f.stretch=0!=c[d+o.PREV_STRETCH]))}},o.ENTRIES=6,o.PREV_TIME=-6,o.PREV_MIX=-5,o.PREV_SOFTNESS=-4,o.PREV_BEND_DIRECTION=-3,o.PREV_COMPRESS=-2,o.PREV_STRETCH=-1,o.MIX=1,o.SOFTNESS=2,o.BEND_DIRECTION=3,o.COMPRESS=4,o.STRETCH=5,o}(a);t.IkConstraintTimeline=y;var x=function(n){function a(e){var i=n.call(this,e)||this;return i.frames=t.Utils.newFloatArray(e*a.ENTRIES),i}return r(a,n),a.prototype.getPropertyId=function(){return(i.transformConstraint<<24)+this.transformConstraintIndex},a.prototype.setFrame=function(t,e,n,i,r,s){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.ROTATE]=n,this.frames[t+a.TRANSLATE]=i,this.frames[t+a.SCALE]=r,this.frames[t+a.SHEAR]=s},a.prototype.apply=function(t,n,i,r,o,h,l){var u=this.frames,c=t.transformConstraints[this.transformConstraintIndex];if(c.active)if(i=u[u.length-a.ENTRIES]){var g=u.length;d=u[g+a.PREV_ROTATE],p=u[g+a.PREV_TRANSLATE],v=u[g+a.PREV_SCALE],m=u[g+a.PREV_SHEAR]}else{var y=s.binarySearch(u,i,a.ENTRIES);d=u[y+a.PREV_ROTATE],p=u[y+a.PREV_TRANSLATE],v=u[y+a.PREV_SCALE],m=u[y+a.PREV_SHEAR];var x=u[y],w=this.getCurvePercent(y/a.ENTRIES-1,1-(i-x)/(u[y+a.PREV_TIME]-x));d+=(u[y+a.ROTATE]-d)*w,p+=(u[y+a.TRANSLATE]-p)*w,v+=(u[y+a.SCALE]-v)*w,m+=(u[y+a.SHEAR]-m)*w}if(h==e.setup){f=c.data;c.rotateMix=f.rotateMix+(d-f.rotateMix)*o,c.translateMix=f.translateMix+(p-f.translateMix)*o,c.scaleMix=f.scaleMix+(v-f.scaleMix)*o,c.shearMix=f.shearMix+(m-f.shearMix)*o}else c.rotateMix+=(d-c.rotateMix)*o,c.translateMix+=(p-c.translateMix)*o,c.scaleMix+=(v-c.scaleMix)*o,c.shearMix+=(m-c.shearMix)*o}},a.ENTRIES=5,a.PREV_TIME=-5,a.PREV_ROTATE=-4,a.PREV_TRANSLATE=-3,a.PREV_SCALE=-2,a.PREV_SHEAR=-1,a.ROTATE=1,a.TRANSLATE=2,a.SCALE=3,a.SHEAR=4,a}(a);t.TransformConstraintTimeline=x;var w=function(n){function a(e){var i=n.call(this,e)||this;return i.frames=t.Utils.newFloatArray(e*a.ENTRIES),i}return r(a,n),a.prototype.getPropertyId=function(){return(i.pathConstraintPosition<<24)+this.pathConstraintIndex},a.prototype.setFrame=function(t,e,n){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.VALUE]=n},a.prototype.apply=function(t,n,i,r,o,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(c.active)if(i=u[u.length-a.ENTRIES])f=u[u.length+a.PREV_VALUE];else{var d=s.binarySearch(u,i,a.ENTRIES);f=u[d+a.PREV_VALUE];var p=u[d],v=this.getCurvePercent(d/a.ENTRIES-1,1-(i-p)/(u[d+a.PREV_TIME]-p));f+=(u[d+a.VALUE]-f)*v}h==e.setup?c.position=c.data.position+(f-c.data.position)*o:c.position+=(f-c.position)*o}},a.ENTRIES=2,a.PREV_TIME=-2,a.PREV_VALUE=-1,a.VALUE=1,a}(a);t.PathConstraintPositionTimeline=w;var M=function(t){function n(e){return t.call(this,e)||this}return r(n,t),n.prototype.getPropertyId=function(){return(i.pathConstraintSpacing<<24)+this.pathConstraintIndex},n.prototype.apply=function(t,i,r,a,o,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(c.active)if(r=u[u.length-n.ENTRIES])f=u[u.length+n.PREV_VALUE];else{var d=s.binarySearch(u,r,n.ENTRIES);f=u[d+n.PREV_VALUE];var p=u[d],v=this.getCurvePercent(d/n.ENTRIES-1,1-(r-p)/(u[d+n.PREV_TIME]-p));f+=(u[d+n.VALUE]-f)*v}h==e.setup?c.spacing=c.data.spacing+(f-c.data.spacing)*o:c.spacing+=(f-c.spacing)*o}},n}(w);t.PathConstraintSpacingTimeline=M;var E=function(n){function a(e){var i=n.call(this,e)||this;return i.frames=t.Utils.newFloatArray(e*a.ENTRIES),i}return r(a,n),a.prototype.getPropertyId=function(){return(i.pathConstraintMix<<24)+this.pathConstraintIndex},a.prototype.setFrame=function(t,e,n,i){t*=a.ENTRIES,this.frames[t]=e,this.frames[t+a.ROTATE]=n,this.frames[t+a.TRANSLATE]=i},a.prototype.apply=function(t,n,i,r,o,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(c.active)if(i=u[u.length-a.ENTRIES])f=u[u.length+a.PREV_ROTATE],d=u[u.length+a.PREV_TRANSLATE];else{var p=s.binarySearch(u,i,a.ENTRIES);f=u[p+a.PREV_ROTATE],d=u[p+a.PREV_TRANSLATE];var v=u[p],m=this.getCurvePercent(p/a.ENTRIES-1,1-(i-v)/(u[p+a.PREV_TIME]-v));f+=(u[p+a.ROTATE]-f)*m,d+=(u[p+a.TRANSLATE]-d)*m}h==e.setup?(c.rotateMix=c.data.rotateMix+(f-c.data.rotateMix)*o,c.translateMix=c.data.translateMix+(d-c.data.translateMix)*o):(c.rotateMix+=(f-c.rotateMix)*o,c.translateMix+=(d-c.translateMix)*o)}},a.ENTRIES=3,a.PREV_TIME=-3,a.PREV_ROTATE=-2,a.PREV_TRANSLATE=-1,a.ROTATE=1,a.TRANSLATE=2,a}(a);t.PathConstraintMixTimeline=E}(i||(i={})),function(t){var e=function(){function e(e){this.tracks=new Array,this.timeScale=1,this.events=new Array,this.listeners=new Array,this.queue=new r(this),this.propertyIDs=new t.IntSet,this.animationsChanged=!1,this.trackEntryPool=new t.Pool(function(){return new n}),this.data=e}return e.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,n=0,i=e.length;n0){if(r.delay-=s,r.delay>0)continue;s=-r.delay,r.delay=0}var a=r.next;if(null!=a){var o=r.trackLast-a.delay;if(o>=0){for(a.delay=0,a.trackTime+=0==r.timeScale?0:(o/r.timeScale+t)*a.timeScale,r.trackTime+=s,this.setCurrent(n,a,!0);null!=a.mixingFrom;)a.mixTime+=t,a=a.mixingFrom;continue}}else if(r.trackLast>=r.trackEnd&&null==r.mixingFrom){e[n]=null,this.queue.end(r),this.disposeNext(r);continue}if(null!=r.mixingFrom&&this.updateMixingFrom(r,t)){var h=r.mixingFrom;for(r.mixingFrom=null,null!=h&&(h.mixingTo=null);null!=h;)this.queue.end(h),h=h.mixingFrom}r.trackTime+=s}}this.queue.drain()},e.prototype.updateMixingFrom=function(t,e){var n=t.mixingFrom;if(null==n)return!0;var i=this.updateMixingFrom(n,e);return n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,t.mixTime>0&&t.mixTime>=t.mixDuration?(0!=n.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=n.mixingFrom,null!=n.mixingFrom&&(n.mixingFrom.mixingTo=t),t.interruptAlpha=n.interruptAlpha,this.queue.end(n)),i):(n.trackTime+=e*n.timeScale,t.mixTime+=e,!1)},e.prototype.apply=function(n){if(null==n)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var i=this.events,r=this.tracks,s=!1,a=0,o=r.length;a0)){s=!0;var l=0==a?t.MixBlend.first:h.mixBlend,u=h.alpha;null!=h.mixingFrom?u*=this.applyMixingFrom(h,n,l):h.trackTime>=h.trackEnd&&null==h.next&&(u=0);var c=h.animationLast,f=h.getAnimationTime(),d=h.animation.timelines.length,p=h.animation.timelines;if(0==a&&1==u||l==t.MixBlend.add)for(var v=0;v1&&(a=1),r!=t.MixBlend.first&&(r=s.mixBlend));var o=a0&&this.queueEvents(s,c),this.events.length=0,s.nextAnimationLast=c,s.nextTrackLast=s.trackTime,a},e.prototype.applyRotateTimeline=function(e,n,i,r,s,a,o,h){if(h&&(a[o]=0),1!=r){var l=e,u=l.frames,c=n.bones[l.boneIndex];if(c.active){var f=0,d=0;if(i=u[u.length-t.RotateTimeline.ENTRIES])d=c.data.rotation+u[u.length+t.RotateTimeline.PREV_ROTATION];else{var p=t.Animation.binarySearch(u,i,t.RotateTimeline.ENTRIES),v=u[p+t.RotateTimeline.PREV_ROTATION],m=u[p],g=l.getCurvePercent((p>>1)-1,1-(i-m)/(u[p+t.RotateTimeline.PREV_TIME]-m));d=u[p+t.RotateTimeline.ROTATION]-v,d=v+(d-=360*(16384-(16384.499999999996-d/360|0)))*g+c.data.rotation,d-=360*(16384-(16384.499999999996-d/360|0))}var y=0,x=d-f;if(0==(x-=360*(16384-(16384.499999999996-x/360|0))))y=a[o];else{var w=0,M=0;h?(w=0,M=x):(w=a[o],M=a[o+1]);var E=x>0,T=w>=0;t.MathUtils.signum(M)!=t.MathUtils.signum(x)&&Math.abs(M)<=90&&(Math.abs(w)>180&&(w+=360*t.MathUtils.signum(w)),T=E),y=x+w-w%360,T!=E&&(y+=360*t.MathUtils.signum(w)),a[o]=y}a[o+1]=x,f+=y*r,c.rotation=f-360*(16384-(16384.499999999996-f/360|0))}}else e.apply(n,0,i,null,1,s,t.MixDirection.mixIn)},e.prototype.queueEvents=function(t,e){for(var n=t.animationStart,i=t.animationEnd,r=i-n,s=t.trackLast%r,a=this.events,o=0,h=a.length;oi||this.queue.event(t,l)}for((t.loop?0==r||s>t.trackTime%r:e>=i&&t.animationLast=this.tracks.length)){var e=this.tracks[t];if(null!=e){this.queue.end(e),this.disposeNext(e);for(var n=e;;){var i=n.mixingFrom;if(null==i)break;this.queue.end(i),n.mixingFrom=null,n.mixingTo=null,n=i}this.tracks[e.trackIndex]=null,this.queue.drain()}}},e.prototype.setCurrent=function(t,e,n){var i=this.expandToIndex(t);this.tracks[t]=e,null!=i&&(n&&this.queue.interrupt(i),e.mixingFrom=i,i.mixingTo=e,e.mixTime=0,null!=i.mixingFrom&&i.mixDuration>0&&(e.interruptAlpha*=Math.min(1,i.mixTime/i.mixDuration)),i.timelinesRotation.length=0),this.queue.start(e)},e.prototype.setAnimation=function(t,e,n){var i=this.data.skeletonData.findAnimation(e);if(null==i)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,i,n)},e.prototype.setAnimationWith=function(t,e,n){if(null==e)throw new Error("animation cannot be null.");var i=!0,r=this.expandToIndex(t);null!=r&&(-1==r.nextTrackLast?(this.tracks[t]=r.mixingFrom,this.queue.interrupt(r),this.queue.end(r),this.disposeNext(r),r=r.mixingFrom,i=!1):this.disposeNext(r));var s=this.trackEntry(t,e,n,r);return this.setCurrent(t,s,i),this.queue.drain(),s},e.prototype.addAnimation=function(t,e,n,i){var r=this.data.skeletonData.findAnimation(e);if(null==r)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,r,n,i)},e.prototype.addAnimationWith=function(t,e,n,i){if(null==e)throw new Error("animation cannot be null.");var r=this.expandToIndex(t);if(null!=r)for(;null!=r.next;)r=r.next;var s=this.trackEntry(t,e,n,r);if(null==r)this.setCurrent(t,s,!0),this.queue.drain();else if(r.next=s,i<=0){var a=r.animationEnd-r.animationStart;0!=a?(r.loop?i+=a*(1+(r.trackTime/a|0)):i+=Math.max(a,r.trackTime),i-=this.data.getMix(r.animation,e)):i=r.trackTime}return s.delay=i,s},e.prototype.setEmptyAnimation=function(t,n){var i=this.setAnimationWith(t,e.emptyAnimation,!1);return i.mixDuration=n,i.trackEnd=n,i},e.prototype.addEmptyAnimation=function(t,n,i){i<=0&&(i-=n);var r=this.addAnimationWith(t,e.emptyAnimation,!1,i);return r.mixDuration=n,r.trackEnd=n,r},e.prototype.setEmptyAnimations=function(t){var e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var n=0,i=this.tracks.length;n=0;e--)for(var i=this.tracks[e];null!=i;)this.computeNotLast(i),i=i.mixingFrom},e.prototype.computeHold=function(n){var i=n.mixingTo,r=n.animation.timelines,s=n.animation.timelines.length,a=t.Utils.setArraySize(n.timelineMode,s);n.timelineHoldMix.length=0;var o=t.Utils.setArraySize(n.timelineHoldMix,s),h=this.propertyIDs;if(null!=i&&i.holdPrevious)for(var l=0;l0){a[l]=e.HOLD_MIX,o[l]=f;continue t}break}a[l]=e.HOLD}else a[l]=e.SUBSEQUENT}},e.prototype.computeNotLast=function(n){for(var i=n.animation.timelines,r=n.animation.timelines.length,s=n.timelineMode,a=this.propertyIDs,o=0;o=this.tracks.length?null:this.tracks[t]},e.prototype.addListener=function(t){if(null==t)throw new Error("listener cannot be null.");this.listeners.push(t)},e.prototype.removeListener=function(t){var e=this.listeners.indexOf(t);e>=0&&this.listeners.splice(e,1)},e.prototype.clearListeners=function(){this.listeners.length=0},e.prototype.clearListenerNotifications=function(){this.queue.clear()},e.emptyAnimation=new t.Animation("",[],0),e.SUBSEQUENT=0,e.FIRST=1,e.HOLD=2,e.HOLD_MIX=3,e.NOT_LAST=4,e}();t.AnimationState=e;var n=function(){function e(){this.mixBlend=t.MixBlend.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}return e.prototype.reset=function(){this.next=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0},e.prototype.getAnimationTime=function(){if(this.loop){var t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)},e.prototype.setAnimationLast=function(t){this.animationLast=t,this.nextAnimationLast=t},e.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},e.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},e}();t.TrackEntry=n;var i,r=function(){function t(t){this.objects=[],this.drainDisabled=!1,this.animState=t}return t.prototype.start=function(t){this.objects.push(i.start),this.objects.push(t),this.animState.animationsChanged=!0},t.prototype.interrupt=function(t){this.objects.push(i.interrupt),this.objects.push(t)},t.prototype.end=function(t){this.objects.push(i.end),this.objects.push(t),this.animState.animationsChanged=!0},t.prototype.dispose=function(t){this.objects.push(i.dispose),this.objects.push(t)},t.prototype.complete=function(t){this.objects.push(i.complete),this.objects.push(t)},t.prototype.event=function(t,e){this.objects.push(i.event),this.objects.push(t),this.objects.push(e)},t.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var t=this.objects,e=this.animState.listeners,n=0;n=0?n.substring(0,n.lastIndexOf("/")):"";n=this.pathPrefix+n,this.toLoad++,e.downloadText(n,function(e){var o={count:0},h=new Array;try{new t.TextureAtlas(e,function(e){h.push(a+"/"+e);var n=document.createElement("img");return n.width=16,n.height=16,new t.FakeTexture(n)})}catch(t){var l=t;return s.errors[n]="Couldn't load texture atlas "+n+": "+l.message,r&&r(n,"Couldn't load texture atlas "+n+": "+l.message),s.toLoad--,void s.loaded++}for(var u=function(l){var u=!1;s.loadTexture(l,function(l,c){if(o.count++,o.count==h.length)if(u)s.errors[n]="Couldn't load texture atlas page "+l+"} of atlas "+n,r&&r(n,"Couldn't load texture atlas page "+l+" of atlas "+n),s.toLoad--,s.loaded++;else try{var f=new t.TextureAtlas(e,function(t){return s.get(a+"/"+t)});s.assets[n]=f,i&&i(n,f),s.toLoad--,s.loaded++}catch(t){var d=t;s.errors[n]="Couldn't load texture atlas "+n+": "+d.message,r&&r(n,"Couldn't load texture atlas "+n+": "+d.message),s.toLoad--,s.loaded++}},function(t,e){u=!0,o.count++,o.count==h.length&&(s.errors[n]="Couldn't load texture atlas page "+t+"} of atlas "+n,r&&r(n,"Couldn't load texture atlas page "+t+" of atlas "+n),s.toLoad--,s.loaded++)})},c=0,f=h;c0},e.prototype.getErrors=function(){return this.errors},e}();t.AssetManager=e}(i||(i={})),function(t){var e=function(){function e(t){this.atlas=t}return e.prototype.newRegionAttachment=function(e,n,i){var r=this.atlas.findRegion(i);if(null==r)throw new Error("Region not found in atlas: "+i+" (region attachment: "+n+")");r.renderObject=r;var s=new t.RegionAttachment(n);return s.setRegion(r),s},e.prototype.newMeshAttachment=function(e,n,i){var r=this.atlas.findRegion(i);if(null==r)throw new Error("Region not found in atlas: "+i+" (mesh attachment: "+n+")");r.renderObject=r;var s=new t.MeshAttachment(n);return s.region=r,s},e.prototype.newBoundingBoxAttachment=function(e,n){return new t.BoundingBoxAttachment(n)},e.prototype.newPathAttachment=function(e,n){return new t.PathAttachment(n)},e.prototype.newPointAttachment=function(e,n){return new t.PointAttachment(n)},e.prototype.newClippingAttachment=function(e,n){return new t.ClippingAttachment(n)},e}();t.AtlasAttachmentLoader=e}(i||(i={})),function(t){!function(t){t[t.Normal=0]="Normal",t[t.Additive=1]="Additive",t[t.Multiply=2]="Multiply",t[t.Screen=3]="Screen"}(t.BlendMode||(t.BlendMode={}))}(i||(i={})),function(t){var e=function(){function e(t,e,n){if(this.children=new Array,this.x=0,this.y=0,this.rotation=0,this.scaleX=0,this.scaleY=0,this.shearX=0,this.shearY=0,this.ax=0,this.ay=0,this.arotation=0,this.ascaleX=0,this.ascaleY=0,this.ashearX=0,this.ashearY=0,this.appliedValid=!1,this.a=0,this.b=0,this.c=0,this.d=0,this.worldY=0,this.worldX=0,this.sorted=!1,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.skeleton=e,this.parent=n,this.setToSetupPose()}return e.prototype.isActive=function(){return this.active},e.prototype.update=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},e.prototype.updateWorldTransform=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},e.prototype.updateWorldTransformWith=function(e,n,i,r,s,a,o){this.ax=e,this.ay=n,this.arotation=i,this.ascaleX=r,this.ascaleY=s,this.ashearX=a,this.ashearY=o,this.appliedValid=!0;var h=this.parent;if(null==h){var l=this.skeleton,u=i+90+o,c=l.scaleX,f=l.scaleY;return this.a=t.MathUtils.cosDeg(i+a)*r*c,this.b=t.MathUtils.cosDeg(u)*s*c,this.c=t.MathUtils.sinDeg(i+a)*r*f,this.d=t.MathUtils.sinDeg(u)*s*f,this.worldX=e*c+l.x,void(this.worldY=n*f+l.y)}var d=h.a,p=h.b,v=h.c,m=h.d;switch(this.worldX=d*e+p*n+h.worldX,this.worldY=v*e+m*n+h.worldY,this.data.transformMode){case t.TransformMode.Normal:u=i+90+o;var g=t.MathUtils.cosDeg(i+a)*r,y=t.MathUtils.cosDeg(u)*s,x=t.MathUtils.sinDeg(i+a)*r,w=t.MathUtils.sinDeg(u)*s;return this.a=d*g+p*x,this.b=d*y+p*w,this.c=v*g+m*x,void(this.d=v*y+m*w);case t.TransformMode.OnlyTranslation:u=i+90+o;this.a=t.MathUtils.cosDeg(i+a)*r,this.b=t.MathUtils.cosDeg(u)*s,this.c=t.MathUtils.sinDeg(i+a)*r,this.d=t.MathUtils.sinDeg(u)*s;break;case t.TransformMode.NoRotationOrReflection:var M=0;(A=d*d+v*v)>1e-4?(p=v*(A=Math.abs(d*m-p*v)/A),m=d*A,M=Math.atan2(v,d)*t.MathUtils.radDeg):(d=0,v=0,M=90-Math.atan2(m,p)*t.MathUtils.radDeg);var E=i+a-M,T=i+o-M+90;g=t.MathUtils.cosDeg(E)*r,y=t.MathUtils.cosDeg(T)*s,x=t.MathUtils.sinDeg(E)*r,w=t.MathUtils.sinDeg(T)*s;this.a=d*g-p*x,this.b=d*y-p*w,this.c=v*g+m*x,this.d=v*y+m*w;break;case t.TransformMode.NoScale:case t.TransformMode.NoScaleOrReflection:var A,b=t.MathUtils.cosDeg(i),R=t.MathUtils.sinDeg(i),I=(d*b+p*R)/this.skeleton.scaleX,S=(v*b+m*R)/this.skeleton.scaleY;(A=Math.sqrt(I*I+S*S))>1e-5&&(A=1/A),I*=A,S*=A,A=Math.sqrt(I*I+S*S),this.data.transformMode==t.TransformMode.NoScale&&d*m-p*v<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(A=-A);var C=Math.PI/2+Math.atan2(S,I),P=Math.cos(C)*A,k=Math.sin(C)*A;g=t.MathUtils.cosDeg(a)*r,y=t.MathUtils.cosDeg(90+o)*s,x=t.MathUtils.sinDeg(a)*r,w=t.MathUtils.sinDeg(90+o)*s;this.a=I*g+P*x,this.b=I*y+P*w,this.c=S*g+k*x,this.d=S*y+k*w}this.a*=this.skeleton.scaleX,this.b*=this.skeleton.scaleX,this.c*=this.skeleton.scaleY,this.d*=this.skeleton.scaleY},e.prototype.setToSetupPose=function(){var t=this.data;this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this.shearX=t.shearX,this.shearY=t.shearY},e.prototype.getWorldRotationX=function(){return Math.atan2(this.c,this.a)*t.MathUtils.radDeg},e.prototype.getWorldRotationY=function(){return Math.atan2(this.d,this.b)*t.MathUtils.radDeg},e.prototype.getWorldScaleX=function(){return Math.sqrt(this.a*this.a+this.c*this.c)},e.prototype.getWorldScaleY=function(){return Math.sqrt(this.b*this.b+this.d*this.d)},e.prototype.updateAppliedTransform=function(){this.appliedValid=!0;var e=this.parent;if(null==e)return this.ax=this.worldX,this.ay=this.worldY,this.arotation=Math.atan2(this.c,this.a)*t.MathUtils.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,void(this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*t.MathUtils.radDeg);var n=e.a,i=e.b,r=e.c,s=e.d,a=1/(n*s-i*r),o=this.worldX-e.worldX,h=this.worldY-e.worldY;this.ax=o*s*a-h*i*a,this.ay=h*n*a-o*r*a;var l=a*s,u=a*n,c=a*i,f=a*r,d=l*this.a-c*this.c,p=l*this.b-c*this.d,v=u*this.c-f*this.a,m=u*this.d-f*this.b;if(this.ashearX=0,this.ascaleX=Math.sqrt(d*d+v*v),this.ascaleX>1e-4){var g=d*m-p*v;this.ascaleY=g/this.ascaleX,this.ashearY=Math.atan2(d*p+v*m,g)*t.MathUtils.radDeg,this.arotation=Math.atan2(v,d)*t.MathUtils.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(p*p+m*m),this.ashearY=0,this.arotation=90-Math.atan2(m,p)*t.MathUtils.radDeg},e.prototype.worldToLocal=function(t){var e=this.a,n=this.b,i=this.c,r=this.d,s=1/(e*r-n*i),a=t.x-this.worldX,o=t.y-this.worldY;return t.x=a*r*s-o*n*s,t.y=o*e*s-a*i*s,t},e.prototype.localToWorld=function(t){var e=t.x,n=t.y;return t.x=e*this.a+n*this.b+this.worldX,t.y=e*this.c+n*this.d+this.worldY,t},e.prototype.worldToLocalRotation=function(e){var n=t.MathUtils.sinDeg(e),i=t.MathUtils.cosDeg(e);return Math.atan2(this.a*n-this.c*i,this.d*i-this.b*n)*t.MathUtils.radDeg+this.rotation-this.shearX},e.prototype.localToWorldRotation=function(e){e-=this.rotation-this.shearX;var n=t.MathUtils.sinDeg(e),i=t.MathUtils.cosDeg(e);return Math.atan2(i*this.c+n*this.d,i*this.a+n*this.b)*t.MathUtils.radDeg},e.prototype.rotateWorld=function(e){var n=this.a,i=this.b,r=this.c,s=this.d,a=t.MathUtils.cosDeg(e),o=t.MathUtils.sinDeg(e);this.a=a*n-o*r,this.b=a*i-o*s,this.c=o*n+a*r,this.d=o*i+a*s,this.appliedValid=!1},e}();t.Bone=e}(i||(i={})),function(t){var e,n=function(){return function(n,i,r){if(this.x=0,this.y=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.shearX=0,this.shearY=0,this.transformMode=e.Normal,this.skinRequired=!1,this.color=new t.Color,n<0)throw new Error("index must be >= 0.");if(null==i)throw new Error("name cannot be null.");this.index=n,this.name=i,this.parent=r}}();t.BoneData=n,function(t){t[t.Normal=0]="Normal",t[t.OnlyTranslation=1]="OnlyTranslation",t[t.NoRotationOrReflection=2]="NoRotationOrReflection",t[t.NoScale=3]="NoScale",t[t.NoScaleOrReflection=4]="NoScaleOrReflection"}(e=t.TransformMode||(t.TransformMode={}))}(i||(i={})),function(t){var e=function(){return function(t,e,n){this.name=t,this.order=e,this.skinRequired=n}}();t.ConstraintData=e}(i||(i={})),function(t){var e=function(){return function(t,e){if(null==e)throw new Error("data cannot be null.");this.time=t,this.data=e}}();t.Event=e}(i||(i={})),function(t){var e=function(){return function(t){this.name=t}}();t.EventData=e}(i||(i={})),function(t){var e=function(){function e(t,e){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.mix=t.mix,this.softness=t.softness,this.bendDirection=t.bendDirection,this.compress=t.compress,this.stretch=t.stretch,this.bones=new Array;for(var n=0;n180?p-=360:p<-180&&(p+=360);var v=e.ascaleX,m=e.ascaleY;if(r||s){var g=e.data.length*v,y=Math.sqrt(f*f+d*d);if(r&&yg&&g>1e-4){var x=(y/g-1)*o+1;v*=x,a&&(m*=x)}}e.updateWorldTransformWith(e.ax,e.ay,e.arotation+p*o,v,m,e.ashearX,e.ashearY)},e.prototype.apply2=function(e,n,i,r,s,a,o,h){if(0!=h){e.appliedValid||e.updateAppliedTransform(),n.appliedValid||n.updateAppliedTransform();var l=e.ax,u=e.ay,c=e.ascaleX,f=c,d=e.ascaleY,p=n.ascaleX,v=0,m=0,g=0;c<0?(c=-c,v=180,g=-1):(v=0,g=1),d<0&&(d=-d,g=-g),p<0?(p=-p,m=180):m=0;var y=n.ax,x=0,w=0,M=0,E=e.a,T=e.b,A=e.c,b=e.d,R=Math.abs(c-d)<=1e-4;R?(w=E*y+T*(x=n.ay)+e.worldX,M=A*y+b*x+e.worldY):(x=0,w=E*y+e.worldX,M=A*y+e.worldY);var I=e.parent;E=I.a,T=I.b,A=I.c;var S,C,P=1/(E*(b=I.d)-T*A),k=w-I.worldX,V=M-I.worldY,F=(k*b-V*T)*P-l,O=(V*E-k*A)*P-u,L=Math.sqrt(F*F+O*O),_=n.data.length*p;if(L<1e-4)return this.apply1(e,i,r,!1,a,!1,h),void n.updateWorldTransformWith(y,x,0,n.ascaleX,n.ascaleY,n.ashearX,n.ashearY);var N=((k=i-I.worldX)*b-(V=r-I.worldY)*T)*P-l,D=(V*E-k*A)*P-u,Y=N*N+D*D;if(0!=o){o*=c*(p+1)/2;var X=Math.sqrt(Y),U=X-L-_*c+o;if(U>0){var z=Math.min(1,U/(2*o))-1;Y=(N-=(z=(U-o*(1-z*z))/X)*N)*N+(D-=z*D)*D}}t:if(R){var B=(Y-L*L-(_*=c)*_)/(2*L*_);B<-1?B=-1:B>1&&(B=1,a&&(f*=(Math.sqrt(Y)/(L+_)-1)*h+1)),C=Math.acos(B)*s,E=L+_*B,T=_*Math.sin(C),S=Math.atan2(D*E-N*T,N*E+D*T)}else{var q=(E=c*_)*E,W=(T=d*_)*T,G=Math.atan2(D,N),j=-2*W*L,H=W-q;if((b=j*j-4*H*(A=W*L*L+q*Y-q*W))>=0){var Z=Math.sqrt(b);j<0&&(Z=-Z);var K=(Z=-(j+Z)/2)/H,Q=A/Z,J=Math.abs(K)=-1&&A<=1&&(A=Math.acos(A),(b=(k=E*Math.cos(A)+L)*k+(V=T*Math.sin(A))*V)st&&(it=A,st=b,rt=k,at=V)),Y<=(et+st)/2?(S=G-Math.atan2(nt*s,tt),C=$*s):(S=G-Math.atan2(at*s,rt),C=it*s)}var ot=Math.atan2(x,y)*g,ht=e.arotation;(S=(S-ot)*t.MathUtils.radDeg+v-ht)>180?S-=360:S<-180&&(S+=360),e.updateWorldTransformWith(l,u,ht+S*h,f,e.ascaleY,0,0),ht=n.arotation,(C=((C+ot)*t.MathUtils.radDeg-n.ashearX)*g+m-ht)>180?C-=360:C<-180&&(C+=360),n.updateWorldTransformWith(y,x,ht+C*h,n.ascaleX,n.ascaleY,n.ashearX,n.ashearY)}else n.updateWorldTransform()},e}();t.IkConstraint=e}(i||(i={})),function(t){var e=function(t){function e(e){var n=t.call(this,e,0,!1)||this;return n.bones=new Array,n.bendDirection=1,n.compress=!1,n.stretch=!1,n.uniform=!1,n.mix=1,n.softness=0,n}return r(e,t),e}(t.ConstraintData);t.IkConstraintData=e}(i||(i={})),function(t){var e=function(){function e(t,e){if(this.position=0,this.spacing=0,this.rotateMix=0,this.translateMix=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.bones=new Array;for(var n=0,i=t.bones.length;n0;if(r>0||s){var a=this.data,o=a.spacingMode==t.SpacingMode.Percent,h=a.rotateMode,l=h==t.RotateMode.Tangent,u=h==t.RotateMode.ChainScale,c=this.bones.length,f=l?c:c+1,d=this.bones,p=t.Utils.setArraySize(this.spaces,f),v=null,m=this.spacing;if(u||!o){u&&(v=t.Utils.setArraySize(this.lengths,c));for(var g=a.spacingMode==t.SpacingMode.Length,y=0,x=f-1;y0?t.MathUtils.degRad:-t.MathUtils.degRad;y=0;for(var P=3;yt.MathUtils.PI?X-=t.MathUtils.PI2:X<-t.MathUtils.PI&&(X+=t.MathUtils.PI2),X*=i,U=Math.cos(X),z=Math.sin(X),k.a=U*_-z*D,k.b=U*N-z*Y,k.c=z*_+U*D,k.d=z*N+U*Y}k.appliedValid=!1}}}},e.prototype.computeWorldPositions=function(n,i,r,s,a){var o=this.target,h=this.position,l=this.spaces,u=t.Utils.setArraySize(this.positions,3*i+2),c=null,f=n.closed,d=n.worldVerticesLength,p=d/6,v=e.NONE;if(!n.constantSpeed){var m=n.lengths,g=m[p-=f?1:2];if(s&&(h*=g),a)for(var y=1;yg){v!=e.AFTER&&(v=e.AFTER,n.computeWorldVertices(o,d-6,4,c,0,2)),this.addAfterPosition(M-g,c,0,u,x);continue}}for(;;w++){var E=m[w];if(!(M>E)){if(0==w)M/=E;else M=(M-(Z=m[w-1]))/(E-Z);break}}w!=v&&(v=w,f&&w==p?(n.computeWorldVertices(o,d-4,4,c,0,2),n.computeWorldVertices(o,0,4,c,4,2)):n.computeWorldVertices(o,6*w+2,8,c,0,2)),this.addCurvePosition(M,c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],u,x,r||y>0&&0==W)}return u}f?(d+=2,c=t.Utils.setArraySize(this.world,d),n.computeWorldVertices(o,2,d-4,c,0,2),n.computeWorldVertices(o,0,2,c,d-4,2),c[d-2]=c[0],c[d-1]=c[1]):(p--,d-=4,c=t.Utils.setArraySize(this.world,d),n.computeWorldVertices(o,2,d,c,0,2));for(var T=t.Utils.setArraySize(this.curves,p),A=0,b=c[0],R=c[1],I=0,S=0,C=0,P=0,k=0,V=0,F=0,O=0,L=0,_=0,N=0,D=0,Y=0,X=0,U=(y=0,2);yA){this.addAfterPosition(M-A,c,d-4,u,x);continue}}for(;;w++){var G=T[w];if(!(M>G)){if(0==w)M/=G;else M=(M-(Z=T[w-1]))/(G-Z);break}}if(w!=v){v=w;var j=6*w;for(b=c[j],R=c[j+1],I=c[j+2],S=c[j+3],C=c[j+4],P=c[j+5],k=c[j+6],V=c[j+7],N=2*(F=.03*(b-2*I+C))+(L=.006*(3*(I-C)-b+k)),D=2*(O=.03*(R-2*S+P))+(_=.006*(3*(S-P)-R+V)),Y=.3*(I-b)+F+.16666667*L,X=.3*(S-R)+O+.16666667*_,B=Math.sqrt(Y*Y+X*X),z[0]=B,j=1;j<8;j++)Y+=N,X+=D,N+=L,D+=_,B+=Math.sqrt(Y*Y+X*X),z[j]=B;Y+=N,X+=D,B+=Math.sqrt(Y*Y+X*X),z[8]=B,Y+=N+L,X+=D+_,B+=Math.sqrt(Y*Y+X*X),z[9]=B,q=0}for(M*=B;;q++){var H=z[q];if(!(M>H)){var Z;if(0==q)M/=H;else M=q+(M-(Z=z[q-1]))/(H-Z);break}}this.addCurvePosition(.1*M,b,R,I,S,C,P,k,V,u,x,r||y>0&&0==W)}return u},e.prototype.addBeforePosition=function(t,e,n,i,r){var s=e[n],a=e[n+1],o=e[n+2]-s,h=e[n+3]-a,l=Math.atan2(h,o);i[r]=s+t*Math.cos(l),i[r+1]=a+t*Math.sin(l),i[r+2]=l},e.prototype.addAfterPosition=function(t,e,n,i,r){var s=e[n+2],a=e[n+3],o=s-e[n],h=a-e[n+1],l=Math.atan2(h,o);i[r]=s+t*Math.cos(l),i[r+1]=a+t*Math.sin(l),i[r+2]=l},e.prototype.addCurvePosition=function(t,e,n,i,r,s,a,o,h,l,u,c){if(0==t||isNaN(t))return l[u]=e,l[u+1]=n,void(l[u+2]=Math.atan2(r-n,i-e));var f=t*t,d=f*t,p=1-t,v=p*p,m=v*p,g=p*t,y=3*g,x=p*y,w=y*t,M=e*m+i*x+s*w+o*d,E=n*m+r*x+a*w+h*d;l[u]=M,l[u+1]=E,c&&(l[u+2]=t<.001?Math.atan2(r-n,i-e):Math.atan2(E-(n*v+r*g*2+a*f),M-(e*v+i*g*2+s*f)))},e.NONE=-1,e.BEFORE=-2,e.AFTER=-3,e.epsilon=1e-5,e}();t.PathConstraint=e}(i||(i={})),function(t){var e=function(t){function e(e){var n=t.call(this,e,0,!1)||this;return n.bones=new Array,n}return r(e,t),e}(t.ConstraintData);t.PathConstraintData=e,function(t){t[t.Fixed=0]="Fixed",t[t.Percent=1]="Percent"}(t.PositionMode||(t.PositionMode={})),function(t){t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent"}(t.SpacingMode||(t.SpacingMode={})),function(t){t[t.Tangent=0]="Tangent",t[t.Chain=1]="Chain",t[t.ChainScale=2]="ChainScale"}(t.RotateMode||(t.RotateMode={}))}(i||(i={})),function(t){var e=function(){function t(t){this.toLoad=new Array,this.assets={},this.clientId=t}return t.prototype.loaded=function(){var t=0;for(var e in this.assets)t++;return t},t}(),n=function(){function t(t){void 0===t&&(t=""),this.clientAssets={},this.queuedAssets={},this.rawAssets={},this.errors={},this.pathPrefix=t}return t.prototype.queueAsset=function(t,n,i){var r=this.clientAssets[t];return null!==r&&void 0!==r||(r=new e(t),this.clientAssets[t]=r),null!==n&&(r.textureLoader=n),r.toLoad.push(i),this.queuedAssets[i]!==i&&(this.queuedAssets[i]=i,!0)},t.prototype.loadText=function(t,e){var n=this;if(e=this.pathPrefix+e,this.queueAsset(t,null,e)){var i=new XMLHttpRequest;i.onreadystatechange=function(){i.readyState==XMLHttpRequest.DONE&&(i.status>=200&&i.status<300?n.rawAssets[e]=i.responseText:n.errors[e]="Couldn't load text "+e+": status "+i.status+", "+i.responseText)},i.open("GET",e,!0),i.send()}},t.prototype.loadJson=function(t,e){var n=this;if(e=this.pathPrefix+e,this.queueAsset(t,null,e)){var i=new XMLHttpRequest;i.onreadystatechange=function(){i.readyState==XMLHttpRequest.DONE&&(i.status>=200&&i.status<300?n.rawAssets[e]=JSON.parse(i.responseText):n.errors[e]="Couldn't load text "+e+": status "+i.status+", "+i.responseText)},i.open("GET",e,!0),i.send()}},t.prototype.loadTexture=function(t,e,n){var i=this;if(n=this.pathPrefix+n,this.queueAsset(t,e,n)){var r=new Image;r.src=n,r.crossOrigin="anonymous",r.onload=function(t){i.rawAssets[n]=r},r.onerror=function(t){i.errors[n]="Couldn't load image "+n}}},t.prototype.get=function(t,e){e=this.pathPrefix+e;var n=this.clientAssets[t];return null===n||void 0===n||n.assets[e]},t.prototype.updateClientAssets=function(t){for(var e=0;e0},t.prototype.getErrors=function(){return this.errors},t}();t.SharedAssetManager=n}(i||(i={})),function(t){var e=function(){function e(e){if(this._updateCache=new Array,this.updateCacheReset=new Array,this.time=0,this.scaleX=1,this.scaleY=1,this.x=0,this.y=0,null==e)throw new Error("data cannot be null.");this.data=e,this.bones=new Array;for(var n=0;n1){var s=i[i.length-1];this._updateCache.indexOf(s)>-1||this.updateCacheReset.push(s)}this._updateCache.push(e),this.sortReset(r.children),i[i.length-1].sorted=!0}},e.prototype.sortPathConstraint=function(e){if(e.active=e.target.bone.isActive()&&(!e.data.skinRequired||null!=this.skin&&t.Utils.contains(this.skin.constraints,e.data,!0)),e.active){var n=e.target,i=n.data.index,r=n.bone;null!=this.skin&&this.sortPathConstraintAttachment(this.skin,i,r),null!=this.data.defaultSkin&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,i,r);for(var s=0,a=this.data.skins.length;s-1||this.updateCacheReset.push(s)}else for(r=0;r0){w=new t.DrawOrderTimeline(_);var N=r.slots.length;for(u=0;u<_;u++){y=n.readFloat();var D=n.readInt(!0),Y=t.Utils.newArray(N,0);for(d=N-1;d>=0;d--)Y[d]=-1;var X=t.Utils.newArray(N-D,0),U=0,z=0;for(d=0;d=0;d--)-1==Y[d]&&(Y[d]=X[--z]);w.setFrame(u,y,Y)}s.push(w),o=Math.max(o,w.frames[_-1])}var B=n.readInt(!0);if(B>0){for(w=new t.EventTimeline(B),u=0;u>>1^-(1&n)},t.prototype.readStringRef=function(){var t=this.readInt(!0);return 0==t?null:this.strings[t-1]},t.prototype.readString=function(){var t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;for(var e="",n=0;n>4){case 12:case 13:e+=String.fromCharCode((31&i)<<6|63&this.readByte()),n+=2;break;case 14:e+=String.fromCharCode((15&i)<<12|(63&this.readByte())<<6|63&this.readByte()),n+=3;break;default:e+=String.fromCharCode(i),n++}}return e},t.prototype.readFloat=function(){var t=this.buffer.getFloat32(this.index);return this.index+=4,t},t.prototype.readBoolean=function(){return 0!=this.readByte()},t}(),i=function(){return function(t,e,n,i,r){this.mesh=t,this.skin=e,this.slotIndex=n,this.parent=i,this.inheritDeform=r}}(),r=function(){return function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),this.bones=t,this.vertices=e}}()}(i||(i={})),function(t){var e=function(){function e(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.boundingBoxes=new Array,this.polygons=new Array,this.polygonPool=new t.Pool(function(){return t.Utils.newFloatArray(16)})}return e.prototype.update=function(e,n){if(null==e)throw new Error("skeleton cannot be null.");var i=this.boundingBoxes,r=this.polygons,s=this.polygonPool,a=e.slots,o=a.length;i.length=0,s.freeAll(r),r.length=0;for(var h=0;h=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},e.prototype.aabbIntersectsSegment=function(t,e,n,i){var r=this.minX,s=this.minY,a=this.maxX,o=this.maxY;if(t<=r&&n<=r||e<=s&&i<=s||t>=a&&n>=a||e>=o&&i>=o)return!1;var h=(i-e)/(n-t),l=h*(r-t)+e;if(l>s&&ls&&lr&&ur&&ut.minX&&this.minYt.minY},e.prototype.containsPoint=function(t,e){for(var n=this.polygons,i=0,r=n.length;i=n||l=n){var u=i[o];u+(n-h)/(l-h)*(i[s]-u)=u&&x<=d||x>=d&&x<=u)&&(x>=e&&x<=i||x>=i&&x<=e)){var w=(l*g-h*v)/y;if((w>=c&&w<=p||w>=p&&w<=c)&&(w>=n&&w<=r||w>=r&&w<=n))return!0}u=d,c=p}return!1},e.prototype.getPolygon=function(t){if(null==t)throw new Error("boundingBox cannot be null.");var e=this.boundingBoxes.indexOf(t);return-1==e?null:this.polygons[e]},e.prototype.getWidth=function(){return this.maxX-this.minX},e.prototype.getHeight=function(){return this.maxY-this.minY},e}();t.SkeletonBounds=e}(i||(i={})),function(t){var e=function(){function e(){this.triangulator=new t.Triangulator,this.clippingPolygon=new Array,this.clipOutput=new Array,this.clippedVertices=new Array,this.clippedTriangles=new Array,this.scratch=new Array}return e.prototype.clipStart=function(n,i){if(null!=this.clipAttachment)return 0;this.clipAttachment=i;var r=i.worldVerticesLength,s=t.Utils.setArraySize(this.clippingPolygon,r);i.computeWorldVertices(n,0,r,s,0,2);var a=this.clippingPolygon;e.makeClockwise(a);for(var o=this.clippingPolygons=this.triangulator.decompose(a,this.triangulator.triangulate(a)),h=0,l=o.length;h>1,Y=this.clipOutput,X=t.Utils.setArraySize(u,k+D*p),U=0;U=2?(u=o,o=this.scratch):u=this.scratch,u.length=0,u.push(t),u.push(e),u.push(n),u.push(i),u.push(r),u.push(s),u.push(t),u.push(e),o.length=0;for(var c=a,f=a.length-4,d=0;;d+=2){for(var p=c[d],v=c[d+1],m=c[d+2],g=c[d+3],y=p-m,x=v-g,w=u,M=u.length-2,E=o.length,T=0;T0;if(y*(b-g)-x*(A-m)>0){if(S){o.push(R),o.push(I);continue}var C=(k=I-b)*(m-p)-(V=R-A)*(g-v);if(Math.abs(C)>1e-6){var P=(V*(v-b)-k*(p-A))/C;o.push(p+(m-p)*P),o.push(v+(g-v)*P)}else o.push(p),o.push(v)}else if(S){var k,V;C=(k=I-b)*(m-p)-(V=R-A)*(g-v);if(Math.abs(C)>1e-6){P=(V*(v-b)-k*(p-A))/C;o.push(p+(m-p)*P),o.push(v+(g-v)*P)}else o.push(p),o.push(v);o.push(R),o.push(I)}l=!0}if(E==o.length)return h.length=0,!0;if(o.push(o[0]),o.push(o[1]),d==f)break;var F=o;(o=u).length=0,u=F}if(h!=o){h.length=0;d=0;for(var O=o.length-2;d>1;o=0;f--)-1==W[f]&&(W[f]=j[--Z])}w.setFrame(c++,this.getValue(q,"time",0),W)}s.push(w),a=Math.max(a,w.frames[w.getFrameCount()-1])}if(e.events){for(w=new t.EventTimeline(e.events.length),c=0,f=0;f=i.length&&(i.length=t+1),i[t]||(i[t]={}),i[t][e]=n},n.prototype.addSkin=function(t){for(var e=0;e= 0.");if(null==n)throw new Error("name cannot be null.");if(null==i)throw new Error("boneData cannot be null.");this.index=e,this.name=n,this.boneData=i}}();t.SlotData=e}(i||(i={})),function(t){var e,n,i=function(){function t(t){this._image=t}return t.prototype.getImage=function(){return this._image},t.filterFromString=function(t){switch(t.toLowerCase()){case"nearest":return e.Nearest;case"linear":return e.Linear;case"mipmap":return e.MipMap;case"mipmapnearestnearest":return e.MipMapNearestNearest;case"mipmaplinearnearest":return e.MipMapLinearNearest;case"mipmapnearestlinear":return e.MipMapNearestLinear;case"mipmaplinearlinear":return e.MipMapLinearLinear;default:throw new Error("Unknown texture filter "+t)}},t.wrapFromString=function(t){switch(t.toLowerCase()){case"mirroredtepeat":return n.MirroredRepeat;case"clamptoedge":return n.ClampToEdge;case"repeat":return n.Repeat;default:throw new Error("Unknown texture wrap "+t)}},t}();t.Texture=i,function(t){t[t.Nearest=9728]="Nearest",t[t.Linear=9729]="Linear",t[t.MipMap=9987]="MipMap",t[t.MipMapNearestNearest=9984]="MipMapNearestNearest",t[t.MipMapLinearNearest=9985]="MipMapLinearNearest",t[t.MipMapNearestLinear=9986]="MipMapNearestLinear",t[t.MipMapLinearLinear=9987]="MipMapLinearLinear"}(e=t.TextureFilter||(t.TextureFilter={})),function(t){t[t.MirroredRepeat=33648]="MirroredRepeat",t[t.ClampToEdge=33071]="ClampToEdge",t[t.Repeat=10497]="Repeat"}(n=t.TextureWrap||(t.TextureWrap={}));var s=function(){return function(){this.u=0,this.v=0,this.u2=0,this.v2=0,this.width=0,this.height=0,this.rotate=!1,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0}}();t.TextureRegion=s;var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.setFilters=function(t,e){},e.prototype.setWraps=function(t,e){},e.prototype.dispose=function(){},e}(i);t.FakeTexture=a}(i||(i={})),function(t){var e=function(){function e(t,e){this.pages=new Array,this.regions=new Array,this.load(t,e)}return e.prototype.load=function(e,r){if(null==r)throw new Error("textureLoader cannot be null.");for(var a=new n(e),o=new Array(4),h=null;;){var l=a.readLine();if(null==l)break;if(0==(l=l.trim()).length)h=null;else if(h){var u=new s;u.name=l,u.page=h;var c=a.readValue();"true"==c.toLocaleLowerCase()?u.degrees=90:"false"==c.toLocaleLowerCase()?u.degrees=0:u.degrees=parseFloat(c),u.rotate=90==u.degrees,a.readTuple(o);var f=parseInt(o[0]),d=parseInt(o[1]);a.readTuple(o);var p=parseInt(o[0]),v=parseInt(o[1]);u.u=f/h.width,u.v=d/h.height,u.rotate?(u.u2=(f+v)/h.width,u.v2=(d+p)/h.height):(u.u2=(f+p)/h.width,u.v2=(d+v)/h.height),u.x=f,u.y=d,u.width=Math.abs(p),u.height=Math.abs(v),4==a.readTuple(o)&&4==a.readTuple(o)&&a.readTuple(o),u.originalWidth=parseInt(o[0]),u.originalHeight=parseInt(o[1]),a.readTuple(o),u.offsetX=parseInt(o[0]),u.offsetY=parseInt(o[1]),u.index=parseInt(a.readValue()),u.texture=h.texture,this.regions.push(u)}else{(h=new i).name=l,2==a.readTuple(o)&&(h.width=parseInt(o[0]),h.height=parseInt(o[1]),a.readTuple(o)),a.readTuple(o),h.minFilter=t.Texture.filterFromString(o[0]),h.magFilter=t.Texture.filterFromString(o[1]);var m=a.readValue();h.uWrap=t.TextureWrap.ClampToEdge,h.vWrap=t.TextureWrap.ClampToEdge,"x"==m?h.uWrap=t.TextureWrap.Repeat:"y"==m?h.vWrap=t.TextureWrap.Repeat:"xy"==m&&(h.uWrap=h.vWrap=t.TextureWrap.Repeat),h.texture=r(l),h.texture.setFilters(h.minFilter,h.magFilter),h.texture.setWraps(h.uWrap,h.vWrap),h.width=h.texture.getImage().width,h.height=h.texture.getImage().height,this.pages.push(h)}}},e.prototype.findRegion=function(t){for(var e=0;e=this.lines.length?null:this.lines[this.index++]},t.prototype.readValue=function(){var t=this.readLine(),e=t.indexOf(":");if(-1==e)throw new Error("Invalid line: "+t);return t.substring(e+1).trim()},t.prototype.readTuple=function(t){var e=this.readLine(),n=e.indexOf(":");if(-1==n)throw new Error("Invalid line: "+e);for(var i=0,r=n+1;i<3;i++){var s=e.indexOf(",",r);if(-1==s)break;t[i]=e.substr(r,s-r).trim(),r=s+1}return t[i]=e.substring(r).trim(),i+1},t}(),i=function(){return function(){}}();t.TextureAtlasPage=i;var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e}(t.TextureRegion);t.TextureAtlasRegion=s}(i||(i={})),function(t){var e=function(){function e(e,n){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new t.Vector2,this.active=!1,null==e)throw new Error("data cannot be null.");if(null==n)throw new Error("skeleton cannot be null.");this.data=e,this.rotateMix=e.rotateMix,this.translateMix=e.translateMix,this.scaleMix=e.scaleMix,this.shearMix=e.shearMix,this.bones=new Array;for(var i=0;i0?t.MathUtils.degRad:-t.MathUtils.degRad,c=this.data.offsetRotation*u,f=this.data.offsetShearY*u,d=this.bones,p=0,v=d.length;pt.MathUtils.PI?I-=t.MathUtils.PI2:I<-t.MathUtils.PI&&(I+=t.MathUtils.PI2),I*=e;var E=Math.cos(I),T=Math.sin(I);m.a=E*y-T*w,m.b=E*x-T*M,m.c=T*y+E*w,m.d=T*x+E*M,g=!0}if(0!=n){var A=this.temp;s.localToWorld(A.set(this.data.offsetX,this.data.offsetY)),m.worldX+=(A.x-m.worldX)*n,m.worldY+=(A.y-m.worldY)*n,g=!0}if(i>0){var b=Math.sqrt(m.a*m.a+m.c*m.c),R=Math.sqrt(a*a+h*h);b>1e-5&&(b=(b+(R-b+this.data.offsetScaleX)*i)/b),m.a*=b,m.c*=b,b=Math.sqrt(m.b*m.b+m.d*m.d),R=Math.sqrt(o*o+l*l),b>1e-5&&(b=(b+(R-b+this.data.offsetScaleY)*i)/b),m.b*=b,m.d*=b,g=!0}if(r>0){x=m.b,M=m.d;var I,S=Math.atan2(M,x);(I=Math.atan2(l,o)-Math.atan2(h,a)-(S-Math.atan2(m.c,m.a)))>t.MathUtils.PI?I-=t.MathUtils.PI2:I<-t.MathUtils.PI&&(I+=t.MathUtils.PI2),I=S+(I+f)*r;b=Math.sqrt(x*x+M*M);m.b=Math.cos(I)*b,m.d=Math.sin(I)*b,g=!0}g&&(m.appliedValid=!1)}},e.prototype.applyRelativeWorld=function(){for(var e=this.rotateMix,n=this.translateMix,i=this.scaleMix,r=this.shearMix,s=this.target,a=s.a,o=s.b,h=s.c,l=s.d,u=a*l-o*h>0?t.MathUtils.degRad:-t.MathUtils.degRad,c=this.data.offsetRotation*u,f=this.data.offsetShearY*u,d=this.bones,p=0,v=d.length;pt.MathUtils.PI?R-=t.MathUtils.PI2:R<-t.MathUtils.PI&&(R+=t.MathUtils.PI2),R*=e;var E=Math.cos(R),T=Math.sin(R);m.a=E*y-T*w,m.b=E*x-T*M,m.c=T*y+E*w,m.d=T*x+E*M,g=!0}if(0!=n){var A=this.temp;s.localToWorld(A.set(this.data.offsetX,this.data.offsetY)),m.worldX+=A.x*n,m.worldY+=A.y*n,g=!0}if(i>0){var b=(Math.sqrt(a*a+h*h)-1+this.data.offsetScaleX)*i+1;m.a*=b,m.c*=b,b=(Math.sqrt(o*o+l*l)-1+this.data.offsetScaleY)*i+1,m.b*=b,m.d*=b,g=!0}if(r>0){var R;(R=Math.atan2(l,o)-Math.atan2(h,a))>t.MathUtils.PI?R-=t.MathUtils.PI2:R<-t.MathUtils.PI&&(R+=t.MathUtils.PI2);x=m.b,M=m.d;R=Math.atan2(M,x)+(R-t.MathUtils.PI/2+f)*r;b=Math.sqrt(x*x+M*M);m.b=Math.cos(R)*b,m.d=Math.sin(R)*b,g=!0}g&&(m.appliedValid=!1)}},e.prototype.applyAbsoluteLocal=function(){var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target;r.appliedValid||r.updateAppliedTransform();for(var s=this.bones,a=0,o=s.length;a1e-5&&(d=(d+(r.ascaleX-d+this.data.offsetScaleX)*n)/d),p>1e-5&&(p=(p+(r.ascaleY-p+this.data.offsetScaleY)*n)/p));var v=h.ashearY;if(0!=i){u=r.ashearY-v+this.data.offsetShearY;u-=360*(16384-(16384.499999999996-u/360|0)),h.shearY+=u*i}h.updateWorldTransformWith(c,f,l,d,p,h.ashearX,v)}},e.prototype.applyRelativeLocal=function(){var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target;r.appliedValid||r.updateAppliedTransform();for(var s=this.bones,a=0,o=s.length;a1e-5&&(f*=(r.ascaleX-1+this.data.offsetScaleX)*n+1),d>1e-5&&(d*=(r.ascaleY-1+this.data.offsetScaleY)*n+1));var p=h.ashearY;0!=i&&(p+=(r.ashearY+this.data.offsetShearY)*i),h.updateWorldTransformWith(u,c,l,f,d,h.ashearX,p)}},e}();t.TransformConstraint=e}(i||(i={})),function(t){var e=function(t){function e(e){var n=t.call(this,e,0,!1)||this;return n.bones=new Array,n.rotateMix=0,n.translateMix=0,n.scaleMix=0,n.shearMix=0,n.offsetRotation=0,n.offsetX=0,n.offsetY=0,n.offsetScaleX=0,n.offsetScaleY=0,n.offsetShearY=0,n.relative=!1,n.local=!1,n}return r(e,t),e}(t.ConstraintData);t.TransformConstraintData=e}(i||(i={})),function(t){var e=function(){function e(){this.convexPolygons=new Array,this.convexPolygonsIndices=new Array,this.indicesArray=new Array,this.isConcaveArray=new Array,this.triangles=new Array,this.polygonPool=new t.Pool(function(){return new Array}),this.polygonIndicesPool=new t.Pool(function(){return new Array})}return e.prototype.triangulate=function(t){var n=t,i=t.length>>1,r=this.indicesArray;r.length=0;for(var s=0;s3;){for(var l=i-1,u=(s=0,1);;){t:if(!a[s]){for(var c=r[l]<<1,f=r[s]<<1,d=r[u]<<1,p=n[c],v=n[c+1],m=n[f],g=n[f+1],y=n[d],x=n[d+1],w=(u+1)%i;w!=l;w=(w+1)%i)if(a[w]){var M=r[w]<<1,E=n[M],T=n[M+1];if(e.positiveArea(y,x,p,v,E,T)&&e.positiveArea(p,v,m,g,E,T)&&e.positiveArea(m,g,y,x,E,T))break t}break}if(0==u){do{if(!a[s])break;s--}while(s>0);break}l=s,s=u,u=(u+1)%i}h.push(r[(i+s-1)%i]),h.push(r[s]),h.push(r[(s+1)%i]),r.splice(s,1),a.splice(s,1);var A=(--i+s-1)%i,b=s==i?0:s;a[A]=e.isConcave(A,i,n,r),a[b]=e.isConcave(b,i,n,r)}return 3==i&&(h.push(r[2]),h.push(r[0]),h.push(r[1])),h},e.prototype.decompose=function(t,n){var i=t,r=this.convexPolygons;this.polygonPool.freeAll(r),r.length=0;var s=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(s),s.length=0;var a=this.polygonIndicesPool.obtain();a.length=0;var o=this.polygonPool.obtain();o.length=0;for(var h=-1,l=0,u=0,c=n.length;u0?(r.push(o),s.push(a)):(this.polygonPool.free(o),this.polygonIndicesPool.free(a)),(o=this.polygonPool.obtain()).length=0,o.push(v),o.push(m),o.push(g),o.push(y),o.push(x),o.push(w),(a=this.polygonIndicesPool.obtain()).length=0,a.push(f),a.push(d),a.push(p),l=e.winding(v,m,g,y,x,w),h=f)}o.length>0&&(r.push(o),s.push(a));for(u=0,c=r.length;u=0;u--)0==(o=r[u]).length&&(r.splice(u,1),this.polygonPool.free(o),a=s[u],s.splice(u,1),this.polygonIndicesPool.free(a));return r},e.isConcave=function(t,e,n,i){var r=i[(e+t-1)%e]<<1,s=i[t]<<1,a=i[(t+1)%e]<<1;return!this.positiveArea(n[r],n[r+1],n[s],n[s+1],n[a],n[a+1])},e.positiveArea=function(t,e,n,i,r,s){return t*(s-i)+n*(e-s)+r*(i-e)>=0},e.winding=function(t,e,n,i,r,s){var a=n-t,o=i-e;return r*o-s*a+a*e-t*o>=0?1:-1},e}();t.Triangulator=e}(i||(i={})),function(t){var e=function(){function t(){this.array=new Array}return t.prototype.add=function(t){var e=this.contains(t);return this.array[0|t]=0|t,!e},t.prototype.contains=function(t){return void 0!=this.array[0|t]},t.prototype.remove=function(t){this.array[0|t]=void 0},t.prototype.clear=function(){this.array.length=0},t}();t.IntSet=e;var n=function(){function t(t,e,n,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),this.r=t,this.g=e,this.b=n,this.a=i}return t.prototype.set=function(t,e,n,i){return this.r=t,this.g=e,this.b=n,this.a=i,this.clamp(),this},t.prototype.setFromColor=function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this},t.prototype.setFromString=function(t){return t="#"==t.charAt(0)?t.substr(1):t,this.r=parseInt(t.substr(0,2),16)/255,this.g=parseInt(t.substr(2,2),16)/255,this.b=parseInt(t.substr(4,2),16)/255,this.a=(8!=t.length?255:parseInt(t.substr(6,2),16))/255,this},t.prototype.add=function(t,e,n,i){return this.r+=t,this.g+=e,this.b+=n,this.a+=i,this.clamp(),this},t.prototype.clamp=function(){return this.r<0?this.r=0:this.r>1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this},t.rgba8888ToColor=function(t,e){t.r=((4278190080&e)>>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255},t.rgb888ToColor=function(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255},t.WHITE=new t(1,1,1,1),t.RED=new t(1,0,0,1),t.GREEN=new t(0,1,0,1),t.BLUE=new t(0,0,1,1),t.MAGENTA=new t(1,0,1,1),t}();t.Color=n;var i=function(){function t(){}return t.clamp=function(t,e,n){return tn?n:t},t.cosDeg=function(e){return Math.cos(e*t.degRad)},t.sinDeg=function(e){return Math.sin(e*t.degRad)},t.signum=function(t){return t>0?1:t<0?-1:0},t.toInt=function(t){return t>0?Math.floor(t):Math.ceil(t)},t.cbrt=function(t){var e=Math.pow(Math.abs(t),1/3);return t<0?-e:e},t.randomTriangular=function(e,n){return t.randomTriangularWith(e,n,.5*(e+n))},t.randomTriangularWith=function(t,e,n){var i=Math.random(),r=e-t;return i<=(n-t)/r?t+Math.sqrt(i*r*(n-t)):e-Math.sqrt((1-i)*r*(e-n))},t.PI=3.1415927,t.PI2=2*t.PI,t.radiansToDegrees=180/t.PI,t.radDeg=t.radiansToDegrees,t.degreesToRadians=t.PI/180,t.degRad=t.degreesToRadians,t}();t.MathUtils=i;var s=function(){function t(){}return t.prototype.apply=function(t,e,n){return t+(e-t)*this.applyInternal(n)},t}();t.Interpolation=s;var a=function(t){function e(e){var n=t.call(this)||this;return n.power=2,n.power=e,n}return r(e,t),e.prototype.applyInternal=function(t){return t<=.5?Math.pow(2*t,this.power)/2:Math.pow(2*(t-1),this.power)/(this.power%2==0?-2:2)+1},e}(s);t.Pow=a;var o=function(t){function e(e){return t.call(this,e)||this}return r(e,t),e.prototype.applyInternal=function(t){return Math.pow(t-1,this.power)*(this.power%2==0?-1:1)+1},e}(a);t.PowOut=o;var h=function(){function t(){}return t.arrayCopy=function(t,e,n,i,r){for(var s=e,a=i;s=n?e:t.setArraySize(e,n,i)},t.newArray=function(t,e){for(var n=new Array(t),i=0;i0?this.items.pop():this.instantiator()},t.prototype.free=function(t){t.reset&&t.reset(),this.items.push(t)},t.prototype.freeAll=function(t){for(var e=0;ethis.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,this.frameTime>1&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)},t}();t.TimeKeeper=f;var d=function(){function t(t){void 0===t&&(t=32),this.addedValues=0,this.lastValue=0,this.mean=0,this.dirty=!0,this.values=new Array(t)}return t.prototype.hasEnoughData=function(){return this.addedValues>=this.values.length},t.prototype.addValue=function(t){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0},t.prototype.getMean=function(){if(this.hasEnoughData()){if(this.dirty){for(var t=0,e=0;e>1)*s;var a=t.bone.skeleton,o=t.deform,h=this.vertices,l=this.bones;if(null!=l){for(var u=0,c=0,f=0;f0&&(h=o);for(var w,M=(w=t.bone).worldX,E=w.worldY,T=w.a,A=w.b,b=w.c,R=w.d,I=e,S=r;S>16&255)/255,i=(t>>8&255)/255,r=(255&t)/255,s=t>16777215?(t>>>24)/255:null,a=this.skeleton;if(e){var o=this.findSlot(e);o&&(a=o)}return a.color.r=n,a.color.g=i,a.color.b=r,null!==s&&(a.color.a=s),this},setSkeletonFromJSON:function(t,e,n,i){return this.setSkeleton(t,e,n,i)},setSkeleton:function(t,e,n,i){this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications());var r=this.plugin.createSkeleton(t,i);this.skeletonData=r.skeletonData,this.preMultipliedAlpha=r.preMultipliedAlpha;var s=r.skeleton;return s.setSkin(),s.setToSetupPose(),this.skeleton=s,r=this.plugin.createAnimationState(s),this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications()),this.state=r.state,this.stateData=r.stateData,this.state.addListener({event:this.onEvent.bind(this),complete:this.onComplete.bind(this),start:this.onStart.bind(this),end:this.onEnd.bind(this),dispose:this.onDispose.bind(this),interrupted:this.onInterrupted.bind(this)}),e&&this.setAnimation(0,e,n),this.root=this.getRootBone(),this.root&&(this.root.rotation=v(f(this.rotation))+90),this.state.apply(s),s.updateCache(),this.updateSize()},onComplete:function(t){this.emit(m.COMPLETE,t)},onDispose:function(t){this.emit(m.DISPOSE,t)},onEnd:function(t){this.emit(m.END,t)},onEvent:function(t,e){this.emit(m.EVENT,t,e)},onInterrupted:function(t){this.emit(m.INTERRUPTED,t)},onStart:function(t){this.emit(m.START,t)},refresh:function(){return this.root&&(this.root.rotation=v(f(this.rotation))+90),this.updateSize(),this.skeleton.updateCache(),this},setSize:function(t,e,n,i){var r=this.skeleton;return void 0===t&&(t=r.data.width),void 0===e&&(e=r.data.height),void 0===n&&(n=0),void 0===i&&(i=0),this.width=t,this.height=e,this.displayOriginX=r.x-n,this.displayOriginY=r.y-i,this},setOffset:function(t,e){var n=this.skeleton;return void 0===t&&(t=0),void 0===e&&(e=0),this.displayOriginX=n.x-t,this.displayOriginY=n.y-e,this},updateSize:function(){var t=this.skeleton,e=this.plugin.renderer.height,n=this.scaleX,i=this.scaleY;t.x=this.x,t.y=e-this.y,t.scaleX=1,t.scaleY=1,t.updateWorldTransform();var r=this.getBounds();return this.width=r.size.x,this.height=r.size.y,this.displayOriginX=this.x-r.offset.x,this.displayOriginY=this.y-(e-(this.height+r.offset.y)),t.scaleX=n,t.scaleY=i,t.updateWorldTransform(),this},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,this.refresh()}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,this.refresh()}},getBoneList:function(){var t=[],e=this.skeletonData;if(e)for(var n=0;n0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):i||s?r.TAU-(s>0?Math.acos(-i/this.scaleY):-Math.acos(i/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 n=this.matrix;return n[4]=n[0]*t+n[2]*e+n[4],n[5]=n[1]*t+n[3]*e+n[5],this},scale:function(t,e){var n=this.matrix;return n[0]*=t,n[1]*=t,n[2]*=e,n[3]*=e,this},rotate:function(t){var e=Math.sin(t),n=Math.cos(t),i=this.matrix,r=i[0],s=i[1],a=i[2],o=i[3];return i[0]=r*n+a*e,i[1]=s*n+o*e,i[2]=r*-e+a*n,i[3]=s*-e+o*n,this},multiply:function(t,e){var n=this.matrix,i=t.matrix,r=n[0],s=n[1],a=n[2],o=n[3],h=n[4],l=n[5],u=i[0],c=i[1],f=i[2],d=i[3],p=i[4],v=i[5],m=void 0===e?this:e;return m.a=u*r+c*a,m.b=u*s+c*o,m.c=f*r+d*a,m.d=f*s+d*o,m.e=p*r+v*a+h,m.f=p*s+v*o+l,m},multiplyWithOffset:function(t,e,n){var i=this.matrix,r=t.matrix,s=i[0],a=i[1],o=i[2],h=i[3],l=e*s+n*o+i[4],u=e*a+n*h+i[5],c=r[0],f=r[1],d=r[2],p=r[3],v=r[4],m=r[5];return i[0]=c*s+f*o,i[1]=c*a+f*h,i[2]=d*s+p*o,i[3]=d*a+p*h,i[4]=v*s+m*o+l,i[5]=v*a+m*h+u,this},transform:function(t,e,n,i,r,s){var a=this.matrix,o=a[0],h=a[1],l=a[2],u=a[3],c=a[4],f=a[5];return a[0]=t*o+e*l,a[1]=t*h+e*u,a[2]=n*o+i*l,a[3]=n*h+i*u,a[4]=r*o+s*l+c,a[5]=r*h+s*u+f,this},transformPoint:function(t,e,n){void 0===n&&(n={x:0,y:0});var i=this.matrix,r=i[0],s=i[1],a=i[2],o=i[3],h=i[4],l=i[5];return n.x=t*r+e*a+h,n.y=t*s+e*o+l,n},invert:function(){var t=this.matrix,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=e*r-n*i;return t[0]=r/o,t[1]=-n/o,t[2]=-i/o,t[3]=e/o,t[4]=(i*a-r*s)/o,t[5]=-(e*a-n*s)/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,n,i,r,s){var a=this.matrix;return a[0]=t,a[1]=e,a[2]=n,a[3]=i,a[4]=r,a[5]=s,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,n=e[0],i=e[1],r=e[2],s=e[3],a=n*s-i*r;if(t.translateX=e[4],t.translateY=e[5],n||i){var o=Math.sqrt(n*n+i*i);t.rotation=i>0?Math.acos(n/o):-Math.acos(n/o),t.scaleX=o,t.scaleY=a/o}else if(r||s){var h=Math.sqrt(r*r+s*s);t.rotation=.5*Math.PI-(s>0?Math.acos(-r/h):-Math.acos(r/h)),t.scaleX=a/h,t.scaleY=h}else t.rotation=0,t.scaleX=0,t.scaleY=0;return t},applyITRS:function(t,e,n,i,r){var s=this.matrix,a=Math.sin(n),o=Math.cos(n);return s[4]=t,s[5]=e,s[0]=o*i,s[1]=a*i,s[2]=-a*r,s[3]=o*r,this},applyInverse:function(t,e,n){void 0===n&&(n=new s);var i=this.matrix,r=i[0],a=i[1],o=i[2],h=i[3],l=i[4],u=i[5],c=1/(r*h+o*-a);return n.x=h*c*t+-o*c*e+(u*o-l*h)*c,n.y=r*c*e+-a*c*t+(-u*r+l*a)*c,n},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},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.decomposedMatrix=null}});t.exports=a},function(t,e){var n={_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=n},function(t,e,n){var i=n(0),r=n(194),s=n(195),a=n(201),o=n(202),h=new i({Extends:a,initialize:function(t,e){a.call(this),this.scene=t,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,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 s(this)),this},setData:function(t,e){return this.data||(this.data=new s(this)),this.data.set(t,e),this},getData:function(t){return this.data||(this.data=new s(this)),this.data.get(t)},setInteractive:function(t,e,n){return this.scene.sys.input.enable(this,t,e,n),this},disableInteractive:function(){return this.input&&(this.input.enabled=!1),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},update:function(){},toJSON:function(){return r(this)},willRender:function(t){return!(h.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,n=[];e&&(n.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return n.unshift(this.scene.sys.displayList.getIndex(t)),n},destroy:function(t){if(void 0===t&&(t=!1),this.scene&&!this.ignoreDestroy){this.preDestroy&&this.preDestroy.call(this),this.emit(o.DESTROY,this);var e=this.scene.sys;t||(e.displayList.remove(this),e.updateList.remove(this)),this.input&&(e.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),t||e.queueDepthSort(),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0,this.removeAllListeners()}}});h.RENDER_MASK=15,t.exports=h},function(t,e){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}},function(t,e,n){var i=n(0),r=n(196),s=new i({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("destroy",this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var n=[],i=0;iMath.PI&&(t-=i.PI2),Math.abs(((t+i.TAU)%i.PI2-i.PI2)%i.PI2)}},function(t,e){t.exports=function(t,e){return Math.random()*(e-t)+t}},function(t,e){t.exports=function(t,e,n){return Math.max(e,Math.min(n,t))}},function(t,e,n){var i=n(1);t.exports=function(t){return t*i.RAD_TO_DEG}},function(t,e,n){var i=new(n(0))({initialize:function(t,e,n){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=n||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new i(this.x,this.y,this.z)},crossVectors:function(t,e){var n=t.x,i=t.y,r=t.z,s=e.x,a=e.y,o=e.z;return this.x=i*o-r*a,this.y=r*s-n*o,this.z=n*a-i*s,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,n){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=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||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,n=t.y-this.y,i=t.z-this.z||0;return Math.sqrt(e*e+n*n+i*i)},distanceSq:function(t){var e=t.x-this.x,n=t.y-this.y,i=t.z-this.z||0;return e*e+n*n+i*i},length:function(){var t=this.x,e=this.y,n=this.z;return Math.sqrt(t*t+e*e+n*n)},lengthSq:function(){var t=this.x,e=this.y,n=this.z;return t*t+e*e+n*n},normalize:function(){var t=this.x,e=this.y,n=this.z,i=t*t+e*e+n*n;return 0s[0]&&(e=1),s[8]>s[3*e+e]&&(e=2),n=o[e],i=o[n],r=Math.sqrt(s[3*e+e]-s[3*n+n]-s[3*i+i]+1),h[e]=.5*r,r=.5/r,h[n]=(s[3*n+e]+s[3*e+n])*r,h[i]=(s[3*i+e]+s[3*e+i])*r,this.x=h[0],this.y=h[1],this.z=h[2],this.w=(s[3*i+n]-s[3*n+i])*r),this}});t.exports=f},function(t,e,n){var r=n(15),s=n(33);t.exports=function(t,e){var n=void 0===t?s():r({},t);if(e)for(var i in e)void 0!==e[i]&&(n[i]=e[i]);return n}},function(t,e){t.exports=function(t,e,n,i,r,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===n&&(n=""),void 0===i&&(i=""),void 0===r&&(r=0),void 0===s&&(s=!1),{responseType:t,async:e,user:n,password:i,timeout:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:s}}},function(t,e){t.exports=function(){}},function(t,e,n){var u=n(36),i=n(0),p=n(12),r=n(150),s=n(151),m=n(175),h=n(176),c=n(194),a=new i({Extends:s,initialize:function(t,e){s.call(this,t,e);var n=e.game;this.isWebGL=2===n.config.renderType,this.cache=n.cache.addCustom("spine"),this.spineTextures=n.cache.addCustom("spineTextures"),this.json=n.cache.json,this.textures=n.textures,this.drawDebug=!1,this.gl,this.renderer,this.sceneRenderer,this.skeletonRenderer,this.skeletonDebugRenderer,this.plugin=m,this.temp1,this.temp2,this.isWebGL?(this.runtime=m.webgl,this.renderer=n.renderer,this.gl=n.renderer.gl,this.getAtlas=this.getAtlasWebGL):(this.runtime=m.canvas,this.renderer=n.renderer,this.getAtlas=this.getAtlasCanvas);var l=this;e.registerFileType("spine",this.spineFileCallback,t),e.registerGameObject("spine",function(t,e,n,i,r){var s=new c(this.scene,l,t,e,n,i,r);return this.displayList.add(s),this.updateList.add(s),s},function(t,e){void 0===t&&(t={});var n=p(t,"key",null),i=p(t,"animationName",null),r=p(t,"loop",!1),s=new c(this.scene,l,0,0,n,i,r);void 0!==e&&(t.add=e),u(this.scene,s,t);var a=p(t,"skinName",!1);a&&s.setSkinByName(a);var o=p(t,"slotName",!1),h=p(t,"attachmentName",null);return o&&s.setAttachment(o,h),s.refresh()})},boot:function(){this.isWebGL?(this.bootWebGL(),this.onResize(),this.game.scale.on(r,this.onResize,this)):this.bootCanvas();var t=this.systems.events;t.once("shutdown",this.shutdown,this),t.once("destroy",this.destroy,this)},bootCanvas:function(){this.skeletonRenderer=new m.canvas.SkeletonRenderer(this.scene.sys.context)},bootWebGL:function(){this.sceneRenderer=new m.webgl.SceneRenderer(this.renderer.canvas,this.gl,!0);function t(t,e){var n;t===this.srcBlend&&e===this.dstBlend||(n=this.context.gl,this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),n.blendFunc(this.srcBlend,this.dstBlend)))}this.sceneRenderer.batcher.setBlendMode=t,this.sceneRenderer.shapes.setBlendMode=t,this.skeletonRenderer=this.sceneRenderer.skeletonRenderer,this.skeletonDebugRenderer=this.sceneRenderer.skeletonDebugRenderer,this.temp1=new m.webgl.Vector3(0,0,0),this.temp2=new m.webgl.Vector3(0,0,0)},getAtlasCanvas:function(t){var e=this.cache.get(t);if(e){var n,i=this.spineTextures;return i.has(t)?i.get(t):(n=this.textures,new m.TextureAtlas(e.data,function(t){return new m.canvas.CanvasTexture(n.get(e.prefix+t).getSourceImage())}))}console.warn("No atlas data for: "+t)},getAtlasWebGL:function(t){var e=this.cache.get(t);if(e){var n,i,r=this.spineTextures,s=r.has(t)?r.get(t):(n=this.textures,(i=this.sceneRenderer.context.gl).pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),new m.TextureAtlas(e.data,function(t){return new m.webgl.GLTexture(i,n.get(e.prefix+t).getSourceImage(),!1)}));return s}console.warn("No atlas data for: "+t)},spineFileCallback:function(t,e,n,i,r,s){var a;if(Array.isArray(t))for(var o=0;o=i.PI2-n?t=e:(Math.abs(e-t)>Math.PI&&(e>>0,n=(e*=n)>>>0,n+=4294967296*(e-=n);return 2.3283064365386963e-10*((this.n=n)>>>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;e= 0.");if(null==e)throw new Error("name cannot be null.");this.index=t,this.name=e,this.parent=n}function Dt(t,e){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.mix=t.mix,this.softness=t.softness,this.bendDirection=t.bendDirection,this.compress=t.compress,this.stretch=t.stretch,this.bones=new Array;for(var n=0;n= 0.");if(null==e)throw new Error("name cannot be null.");if(null==n)throw new Error("boneData cannot be null.");this.index=t,this.name=e,this.boneData=n}function Zt(t,e){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new N.Vector2,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.rotateMix=t.rotateMix,this.translateMix=t.translateMix,this.scaleMix=t.scaleMix,this.shearMix=t.shearMix,this.bones=new Array;for(var n=0;n>>1;;){if(t[(s+1)*n]<=e?i=s+1:r=s,i==r)return(i+1)*n;s=i+r>>>1}},r.linearSearch=function(t,e,n){for(var i=0,r=t.length-n;i<=r;i+=n)if(t[i]>e)return i;return-1},r);function r(t,e,n){if(null==t)throw new Error("name cannot be null.");if(null==e)throw new Error("timelines cannot be null.");this.name=t,this.timelines=e,this.timelineIds=[];for(var i=0;i 0: "+t);this.curves=U.Utils.newFloatArray((t-1)*y.BEZIER_SIZE)}U.CurveTimeline=s;var a,o=(kt(v,a=s),v.prototype.getPropertyId=function(){return(n.rotate<<24)+this.boneIndex},v.prototype.setFrame=function(t,e,n){t<<=1,this.frames[t]=e,this.frames[t+v.ROTATION]=n},v.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=o[o.length-v.ENTRIES]){var u=o[o.length+v.PREV_ROTATION];switch(s){case z.setup:h.rotation=h.data.rotation+u*r;break;case z.first:case z.replace:u+=h.data.rotation-h.rotation,u-=360*(16384-(16384.499999999996-u/360|0));case z.add:h.rotation+=u*r}}else{var c=B.binarySearch(o,n,v.ENTRIES),f=o[c+v.PREV_ROTATION],d=o[c],p=this.getCurvePercent((c>>1)-1,1-(n-d)/(o[c+v.PREV_TIME]-d)),m=f+((m=o[c+v.ROTATION]-f)-360*(16384-(16384.499999999996-m/360|0)))*p;switch(s){case z.setup:h.rotation=h.data.rotation+(m-360*(16384-(16384.499999999996-m/360|0)))*r;break;case z.first:case z.replace:m+=h.data.rotation-h.rotation;case z.add:h.rotation+=(m-360*(16384-(16384.499999999996-m/360|0)))*r}}},v.ENTRIES=2,v.PREV_TIME=-2,v.PREV_ROTATION=-1,v.ROTATION=1,v);function v(t){var e=a.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t<<1),e}U.RotateTimeline=o;var h,l=(kt(p,h=s),p.prototype.getPropertyId=function(){return(n.translate<<24)+this.boneIndex},p.prototype.setFrame=function(t,e,n,i){t*=p.ENTRIES,this.frames[t]=e,this.frames[t+p.X]=n,this.frames[t+p.Y]=i},p.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=o[o.length-p.ENTRIES]?(f=o[o.length+p.PREV_X],d=o[o.length+p.PREV_Y]):(f=o[(l=B.binarySearch(o,n,p.ENTRIES))+p.PREV_X],d=o[l+p.PREV_Y],u=o[l],c=this.getCurvePercent(l/p.ENTRIES-1,1-(n-u)/(o[l+p.PREV_TIME]-u)),f+=(o[l+p.X]-f)*c,d+=(o[l+p.Y]-d)*c),s){case z.setup:h.x=h.data.x+f*r,h.y=h.data.y+d*r;break;case z.first:case z.replace:h.x+=(h.data.x+f-h.x)*r,h.y+=(h.data.y+d-h.y)*r;break;case z.add:h.x+=f*r,h.y+=d*r}}},p.ENTRIES=3,p.PREV_TIME=-3,p.PREV_X=-2,p.PREV_Y=-1,p.X=1,p.Y=2,p);function p(t){var e=h.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t*p.ENTRIES),e}U.TranslateTimeline=l;var u,c=(kt(x,u=l),x.prototype.getPropertyId=function(){return(n.scale<<24)+this.boneIndex},x.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=o[o.length-x.ENTRIES]?(f=o[o.length+x.PREV_X]*h.data.scaleX,o[o.length+x.PREV_Y]*h.data.scaleY):(f=o[(l=B.binarySearch(o,n,x.ENTRIES))+x.PREV_X],d=o[l+x.PREV_Y],u=o[l],c=this.getCurvePercent(l/x.ENTRIES-1,1-(n-u)/(o[l+x.PREV_TIME]-u)),f=(f+(o[l+x.X]-f)*c)*h.data.scaleX,(d+(o[l+x.Y]-d)*c)*h.data.scaleY),1==r)s==z.add?(h.scaleX+=f-h.data.scaleX,h.scaleY+=d-h.data.scaleY):(h.scaleX=f,h.scaleY=d);else{var p=0,m=0;if(a==g.mixOut)switch(s){case z.setup:p=h.data.scaleX,m=h.data.scaleY,h.scaleX=p+(Math.abs(f)*U.MathUtils.signum(p)-p)*r,h.scaleY=m+(Math.abs(d)*U.MathUtils.signum(m)-m)*r;break;case z.first:case z.replace:p=h.scaleX,m=h.scaleY,h.scaleX=p+(Math.abs(f)*U.MathUtils.signum(p)-p)*r,h.scaleY=m+(Math.abs(d)*U.MathUtils.signum(m)-m)*r;break;case z.add:p=h.scaleX,m=h.scaleY,h.scaleX=p+(Math.abs(f)*U.MathUtils.signum(p)-h.data.scaleX)*r,h.scaleY=m+(Math.abs(d)*U.MathUtils.signum(m)-h.data.scaleY)*r}else switch(s){case z.setup:p=Math.abs(h.data.scaleX)*U.MathUtils.signum(f),m=Math.abs(h.data.scaleY)*U.MathUtils.signum(d),h.scaleX=p+(f-p)*r,h.scaleY=m+(d-m)*r;break;case z.first:case z.replace:p=Math.abs(h.scaleX)*U.MathUtils.signum(f),m=Math.abs(h.scaleY)*U.MathUtils.signum(d),h.scaleX=p+(f-p)*r,h.scaleY=m+(d-m)*r;break;case z.add:p=U.MathUtils.signum(f),m=U.MathUtils.signum(d),h.scaleX=Math.abs(h.scaleX)*p+(f-Math.abs(h.data.scaleX)*p)*r,h.scaleY=Math.abs(h.scaleY)*m+(d-Math.abs(h.data.scaleY)*m)*r}}}},x);function x(t){return u.call(this,t)||this}U.ScaleTimeline=c;var f,d=(kt(m,f=l),m.prototype.getPropertyId=function(){return(n.shear<<24)+this.boneIndex},m.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=o[o.length-m.ENTRIES]?(f=o[o.length+m.PREV_X],d=o[o.length+m.PREV_Y]):(f=o[(l=B.binarySearch(o,n,m.ENTRIES))+m.PREV_X],d=o[l+m.PREV_Y],u=o[l],c=this.getCurvePercent(l/m.ENTRIES-1,1-(n-u)/(o[l+m.PREV_TIME]-u)),f+=(o[l+m.X]-f)*c,d+=(o[l+m.Y]-d)*c),s){case z.setup:h.shearX=h.data.shearX+f*r,h.shearY=h.data.shearY+d*r;break;case z.first:case z.replace:h.shearX+=(h.data.shearX+f-h.shearX)*r,h.shearY+=(h.data.shearY+d-h.shearY)*r;break;case z.add:h.shearX+=f*r,h.shearY+=d*r}}},m);function m(t){return f.call(this,t)||this}U.ShearTimeline=d;var w,M=(kt(E,w=s),E.prototype.getPropertyId=function(){return(n.color<<24)+this.slotIndex},E.prototype.setFrame=function(t,e,n,i,r,s){t*=E.ENTRIES,this.frames[t]=e,this.frames[t+E.R]=n,this.frames[t+E.G]=i,this.frames[t+E.B]=r,this.frames[t+E.A]=s},E.prototype.apply=function(t,e,n,i,r,s,a){var o=t.slots[this.slotIndex];if(o.bone.active){var h=this.frames;if(n=h[h.length-E.ENTRIES]?(m=h[(c=h.length)+E.PREV_R],g=h[c+E.PREV_G],v=h[c+E.PREV_B],y=h[c+E.PREV_A]):(m=h[(f=B.binarySearch(h,n,E.ENTRIES))+E.PREV_R],g=h[f+E.PREV_G],v=h[f+E.PREV_B],y=h[f+E.PREV_A],d=h[f],p=this.getCurvePercent(f/E.ENTRIES-1,1-(n-d)/(h[f+E.PREV_TIME]-d)),m+=(h[f+E.R]-m)*p,g+=(h[f+E.G]-g)*p,v+=(h[f+E.B]-v)*p,y+=(h[f+E.A]-y)*p),1==r?o.color.set(m,g,v,y):(l=o.color,s==z.setup&&l.setFromColor(o.data.color),l.add((m-l.r)*r,(g-l.g)*r,(v-l.b)*r,(y-l.a)*r))}}},E.ENTRIES=5,E.PREV_TIME=-5,E.PREV_R=-4,E.PREV_G=-3,E.PREV_B=-2,E.PREV_A=-1,E.R=1,E.G=2,E.B=3,E.A=4,E);function E(t){var e=w.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t*E.ENTRIES),e}U.ColorTimeline=M;var T,A=(kt(b,T=s),b.prototype.getPropertyId=function(){return(n.twoColor<<24)+this.slotIndex},b.prototype.setFrame=function(t,e,n,i,r,s,a,o,h){t*=b.ENTRIES,this.frames[t]=e,this.frames[t+b.R]=n,this.frames[t+b.G]=i,this.frames[t+b.B]=r,this.frames[t+b.A]=s,this.frames[t+b.R2]=a,this.frames[t+b.G2]=o,this.frames[t+b.B2]=h},b.prototype.apply=function(t,e,n,i,r,s,a){var o=t.slots[this.slotIndex];if(o.bone.active){var h=this.frames;if(n=h[h.length-b.ENTRIES]?(v=h[(d=h.length)+b.PREV_R],y=h[d+b.PREV_G],x=h[d+b.PREV_B],w=h[d+b.PREV_A],M=h[d+b.PREV_R2],E=h[d+b.PREV_G2],T=h[d+b.PREV_B2]):(v=h[(p=B.binarySearch(h,n,b.ENTRIES))+b.PREV_R],y=h[p+b.PREV_G],x=h[p+b.PREV_B],w=h[p+b.PREV_A],M=h[p+b.PREV_R2],E=h[p+b.PREV_G2],T=h[p+b.PREV_B2],m=h[p],g=this.getCurvePercent(p/b.ENTRIES-1,1-(n-m)/(h[p+b.PREV_TIME]-m)),v+=(h[p+b.R]-v)*g,y+=(h[p+b.G]-y)*g,x+=(h[p+b.B]-x)*g,w+=(h[p+b.A]-w)*g,M+=(h[p+b.R2]-M)*g,E+=(h[p+b.G2]-E)*g,T+=(h[p+b.B2]-T)*g),1==r?(o.color.set(v,y,x,w),o.darkColor.set(M,E,T,1)):(l=o.color,u=o.darkColor,s==z.setup&&(l.setFromColor(o.data.color),u.setFromColor(o.data.darkColor)),l.add((v-l.r)*r,(y-l.g)*r,(x-l.b)*r,(w-l.a)*r),u.add((M-u.r)*r,(E-u.g)*r,(T-u.b)*r,0))}}},b.ENTRIES=8,b.PREV_TIME=-8,b.PREV_R=-7,b.PREV_G=-6,b.PREV_B=-5,b.PREV_A=-4,b.PREV_R2=-3,b.PREV_G2=-2,b.PREV_B2=-1,b.R=1,b.G=2,b.B=3,b.A=4,b.R2=5,b.G2=6,b.B2=7,b);function b(t){var e=T.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t*b.ENTRIES),e}U.TwoColorTimeline=A;var R=(S.prototype.getPropertyId=function(){return(n.attachment<<24)+this.slotIndex},S.prototype.getFrameCount=function(){return this.frames.length},S.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.attachmentNames[t]=n},S.prototype.apply=function(t,e,n,i,r,s,a){var o,h,l,u=t.slots[this.slotIndex];u.bone.active&&(a!=g.mixOut?n<(o=this.frames)[0]?s!=z.setup&&s!=z.first||this.setAttachment(t,u,u.data.attachmentName):(h=0,h=n>=o[o.length-1]?o.length-1:B.binarySearch(o,n,1)-1,l=this.attachmentNames[h],t.slots[this.slotIndex].setAttachment(null==l?null:t.getAttachment(this.slotIndex,l))):s==z.setup&&this.setAttachment(t,u,u.data.attachmentName))},S.prototype.setAttachment=function(t,e,n){e.attachment=null==n?null:t.getAttachment(this.slotIndex,n)},S);function S(t){this.frames=U.Utils.newFloatArray(t),this.attachmentNames=new Array(t)}U.AttachmentTimeline=R;var I,C=null,P=(kt(k,I=s),k.prototype.getPropertyId=function(){return(n.deform<<27)+ +this.attachment.id+this.slotIndex},k.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.frameVertices[t]=n},k.prototype.apply=function(t,e,n,i,r,s,a){var o=t.slots[this.slotIndex];if(o.bone.active){var h=o.getAttachment();if(h instanceof U.VertexAttachment&&h.deformAttachment==this.attachment){var l=o.deform;0==l.length&&(s=z.setup);var u=this.frameVertices,c=u[0].length,f=this.frames;if(n=f[f.length-1]){var y=u[f.length-1];if(1==r)if(s==z.add)if(null==(d=h).bones)for(var m=d.vertices,x=0;x=o[h-1])return;if(!(n=o[l];l++)i.push(this.events[l])}}},V);function V(t){this.frames=U.Utils.newFloatArray(t),this.events=new Array(t)}U.EventTimeline=F;var O=(_.prototype.getPropertyId=function(){return n.drawOrder<<24},_.prototype.getFrameCount=function(){return this.frames.length},_.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.drawOrders[t]=n},_.prototype.apply=function(t,e,n,i,r,s,a){var o=t.drawOrder,h=t.slots;if(a!=g.mixOut){var l=this.frames;if(n=l[l.length-1]?l.length-1:B.binarySearch(l,n)-1,c=this.drawOrders[u];if(null==c)U.Utils.arrayCopy(h,0,o,0,h.length);else for(var f=0,d=c.length;f=f[f.length-N.ENTRIES]?s==z.setup?(d.mix=d.data.mix+(f[f.length+N.PREV_MIX]-d.data.mix)*r,d.softness=d.data.softness+(f[f.length+N.PREV_SOFTNESS]-d.data.softness)*r,a==g.mixOut?(d.bendDirection=d.data.bendDirection,d.compress=d.data.compress,d.stretch=d.data.stretch):(d.bendDirection=f[f.length+N.PREV_BEND_DIRECTION],d.compress=0!=f[f.length+N.PREV_COMPRESS],d.stretch=0!=f[f.length+N.PREV_STRETCH])):(d.mix+=(f[f.length+N.PREV_MIX]-d.mix)*r,d.softness+=(f[f.length+N.PREV_SOFTNESS]-d.softness)*r,a==g.mixIn&&(d.bendDirection=f[f.length+N.PREV_BEND_DIRECTION],d.compress=0!=f[f.length+N.PREV_COMPRESS],d.stretch=0!=f[f.length+N.PREV_STRETCH])):(h=f[(o=B.binarySearch(f,n,N.ENTRIES))+N.PREV_MIX],l=f[o+N.PREV_SOFTNESS],u=f[o],c=this.getCurvePercent(o/N.ENTRIES-1,1-(n-u)/(f[o+N.PREV_TIME]-u)),s==z.setup?(d.mix=d.data.mix+(h+(f[o+N.MIX]-h)*c-d.data.mix)*r,d.softness=d.data.softness+(l+(f[o+N.SOFTNESS]-l)*c-d.data.softness)*r,a==g.mixOut?(d.bendDirection=d.data.bendDirection,d.compress=d.data.compress,d.stretch=d.data.stretch):(d.bendDirection=f[o+N.PREV_BEND_DIRECTION],d.compress=0!=f[o+N.PREV_COMPRESS],d.stretch=0!=f[o+N.PREV_STRETCH])):(d.mix+=(h+(f[o+N.MIX]-h)*c-d.mix)*r,d.softness+=(l+(f[o+N.SOFTNESS]-l)*c-d.softness)*r,a==g.mixIn&&(d.bendDirection=f[o+N.PREV_BEND_DIRECTION],d.compress=0!=f[o+N.PREV_COMPRESS],d.stretch=0!=f[o+N.PREV_STRETCH])))},N.ENTRIES=6,N.PREV_TIME=-6,N.PREV_MIX=-5,N.PREV_SOFTNESS=-4,N.PREV_BEND_DIRECTION=-3,N.PREV_COMPRESS=-2,N.PREV_STRETCH=-1,N.MIX=1,N.SOFTNESS=2,N.BEND_DIRECTION=3,N.COMPRESS=4,N.STRETCH=5,N);function N(t){var e=L.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t*N.ENTRIES),e}U.IkConstraintTimeline=D;var Y,X=(kt(q,Y=s),q.prototype.getPropertyId=function(){return(n.transformConstraint<<24)+this.transformConstraintIndex},q.prototype.setFrame=function(t,e,n,i,r,s){t*=q.ENTRIES,this.frames[t]=e,this.frames[t+q.ROTATE]=n,this.frames[t+q.TRANSLATE]=i,this.frames[t+q.SCALE]=r,this.frames[t+q.SHEAR]=s},q.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.transformConstraints[this.transformConstraintIndex];if(h.active)if(n=o[o.length-q.ENTRIES]?(p=o[(u=o.length)+q.PREV_ROTATE],m=o[u+q.PREV_TRANSLATE],g=o[u+q.PREV_SCALE],v=o[u+q.PREV_SHEAR]):(p=o[(c=B.binarySearch(o,n,q.ENTRIES))+q.PREV_ROTATE],m=o[c+q.PREV_TRANSLATE],g=o[c+q.PREV_SCALE],v=o[c+q.PREV_SHEAR],f=o[c],d=this.getCurvePercent(c/q.ENTRIES-1,1-(n-f)/(o[c+q.PREV_TIME]-f)),p+=(o[c+q.ROTATE]-p)*d,m+=(o[c+q.TRANSLATE]-m)*d,g+=(o[c+q.SCALE]-g)*d,v+=(o[c+q.SHEAR]-v)*d),s==z.setup?(l=h.data,h.rotateMix=l.rotateMix+(p-l.rotateMix)*r,h.translateMix=l.translateMix+(m-l.translateMix)*r,h.scaleMix=l.scaleMix+(g-l.scaleMix)*r,h.shearMix=l.shearMix+(v-l.shearMix)*r):(h.rotateMix+=(p-h.rotateMix)*r,h.translateMix+=(m-h.translateMix)*r,h.scaleMix+=(g-h.scaleMix)*r,h.shearMix+=(v-h.shearMix)*r)}},q.ENTRIES=5,q.PREV_TIME=-5,q.PREV_ROTATE=-4,q.PREV_TRANSLATE=-3,q.PREV_SCALE=-2,q.PREV_SHEAR=-1,q.ROTATE=1,q.TRANSLATE=2,q.SCALE=3,q.SHEAR=4,q);function q(t){var e=Y.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t*q.ENTRIES),e}U.TransformConstraintTimeline=X;var W,G=(kt(H,W=s),H.prototype.getPropertyId=function(){return(n.pathConstraintPosition<<24)+this.pathConstraintIndex},H.prototype.setFrame=function(t,e,n){t*=H.ENTRIES,this.frames[t]=e,this.frames[t+H.VALUE]=n},H.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n=o[o.length-H.ENTRIES]?f=o[o.length+H.PREV_VALUE]:(f=o[(l=B.binarySearch(o,n,H.ENTRIES))+H.PREV_VALUE],u=o[l],c=this.getCurvePercent(l/H.ENTRIES-1,1-(n-u)/(o[l+H.PREV_TIME]-u)),f+=(o[l+H.VALUE]-f)*c),s==z.setup?h.position=h.data.position+(f-h.data.position)*r:h.position+=(f-h.position)*r}},H.ENTRIES=2,H.PREV_TIME=-2,H.PREV_VALUE=-1,H.VALUE=1,H);function H(t){var e=W.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t*H.ENTRIES),e}U.PathConstraintPositionTimeline=G;var j,Z=(kt(K,j=G),K.prototype.getPropertyId=function(){return(n.pathConstraintSpacing<<24)+this.pathConstraintIndex},K.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n=o[o.length-K.ENTRIES]?f=o[o.length+K.PREV_VALUE]:(f=o[(l=B.binarySearch(o,n,K.ENTRIES))+K.PREV_VALUE],u=o[l],c=this.getCurvePercent(l/K.ENTRIES-1,1-(n-u)/(o[l+K.PREV_TIME]-u)),f+=(o[l+K.VALUE]-f)*c),s==z.setup?h.spacing=h.data.spacing+(f-h.data.spacing)*r:h.spacing+=(f-h.spacing)*r}},K);function K(t){return j.call(this,t)||this}U.PathConstraintSpacingTimeline=Z;var Q,J=(kt($,Q=s),$.prototype.getPropertyId=function(){return(n.pathConstraintMix<<24)+this.pathConstraintIndex},$.prototype.setFrame=function(t,e,n,i){t*=$.ENTRIES,this.frames[t]=e,this.frames[t+$.ROTATE]=n,this.frames[t+$.TRANSLATE]=i},$.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n=o[o.length-$.ENTRIES]?(f=o[o.length+$.PREV_ROTATE],d=o[o.length+$.PREV_TRANSLATE]):(f=o[(l=B.binarySearch(o,n,$.ENTRIES))+$.PREV_ROTATE],d=o[l+$.PREV_TRANSLATE],u=o[l],c=this.getCurvePercent(l/$.ENTRIES-1,1-(n-u)/(o[l+$.PREV_TIME]-u)),f+=(o[l+$.ROTATE]-f)*c,d+=(o[l+$.TRANSLATE]-d)*c),s==z.setup?(h.rotateMix=h.data.rotateMix+(f-h.data.rotateMix)*r,h.translateMix=h.data.translateMix+(d-h.data.translateMix)*r):(h.rotateMix+=(f-h.rotateMix)*r,h.translateMix+=(d-h.translateMix)*r)}},$.ENTRIES=3,$.PREV_TIME=-3,$.PREV_ROTATE=-2,$.PREV_TRANSLATE=-1,$.ROTATE=1,$.TRANSLATE=2,$);function $(t){var e=Q.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t*$.ENTRIES),e}U.PathConstraintMixTimeline=J}(St=St||{}),function(R){var t=(S.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,n=0,i=e.length;n=r.trackEnd&&null==r.mixingFrom){e[n]=null,this.queue.end(r),this.disposeNext(r);continue}if(null!=r.mixingFrom&&this.updateMixingFrom(r,t)){var h=r.mixingFrom;for((r.mixingFrom=null)!=h&&(h.mixingTo=null);null!=h;)this.queue.end(h),h=h.mixingFrom}r.trackTime+=s}}this.queue.drain()},S.prototype.updateMixingFrom=function(t,e){var n=t.mixingFrom;if(null==n)return!0;var i=this.updateMixingFrom(n,e);return n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,0=t.mixDuration?(0!=n.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=n.mixingFrom,null!=n.mixingFrom&&(n.mixingFrom.mixingTo=t),t.interruptAlpha=n.interruptAlpha,this.queue.end(n)),i):(n.trackTime+=e*n.timeScale,t.mixTime+=e,!1)},S.prototype.apply=function(t){if(null==t)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var e=this.events,n=this.tracks,i=!1,r=0,s=n.length;r=a.trackEnd&&null==a.next&&(h=0);var l=a.animationLast,u=a.getAnimationTime(),c=a.animation.timelines.length,f=a.animation.timelines;if(0==r&&1==h||o==R.MixBlend.add)for(var d=0;d=s[s.length-1]?s.length-1:R.Animation.binarySearch(s,n)-1,this.setAttachment(e,o,t.attachmentNames[a],r)),o.attachmentState<=this.unkeyedState&&(o.attachmentState=this.unkeyedState+S.SETUP))},S.prototype.setAttachment=function(t,e,n,i){e.attachment=null==n?null:t.getAttachment(e.data.index,n),i&&(e.attachmentState=this.unkeyedState+S.CURRENT)},S.prototype.applyRotateTimeline=function(t,e,n,i,r,s,a,o){if(o&&(s[a]=0),1!=i){var h=t,l=h.frames,u=e.bones[h.boneIndex];if(u.active){var c=0,f=0;if(n=l[l.length-R.RotateTimeline.ENTRIES]?f=u.data.rotation+l[l.length+R.RotateTimeline.PREV_ROTATION]:(p=l[(d=R.Animation.binarySearch(l,n,R.RotateTimeline.ENTRIES))+R.RotateTimeline.PREV_ROTATION],m=l[d],g=h.getCurvePercent((d>>1)-1,1-(n-m)/(l[d+R.RotateTimeline.PREV_TIME]-m)),f=l[d+R.RotateTimeline.ROTATION]-p,f=p+(f-=360*(16384-(16384.499999999996-f/360|0)))*g+u.data.rotation,f-=360*(16384-(16384.499999999996-f/360|0)))}var v,y,x,w,M=0,E=f-c;0==(E-=360*(16384-(16384.499999999996-E/360|0)))?M=s[a]:(y=v=0,y=o?(v=0,E):(v=s[a],s[a+1]),x=0i||this.queue.event(t,l)}for((t.loop?0==r||s>t.trackTime%r:i<=e&&t.animationLast=this.tracks.length)){var e=this.tracks[t];if(null!=e){this.queue.end(e),this.disposeNext(e);for(var n=e;;){var i=n.mixingFrom;if(null==i)break;this.queue.end(i),n.mixingFrom=null,n.mixingTo=null,n=i}this.tracks[e.trackIndex]=null,this.queue.drain()}}},S.prototype.setCurrent=function(t,e,n){var i=this.expandToIndex(t);this.tracks[t]=e,null!=i&&(n&&this.queue.interrupt(i),((e.mixingFrom=i).mixingTo=e).mixTime=0,null!=i.mixingFrom&&0=this.tracks.length?null:this.tracks[t]},S.prototype.addListener=function(t){if(null==t)throw new Error("listener cannot be null.");this.listeners.push(t)},S.prototype.removeListener=function(t){var e=this.listeners.indexOf(t);0<=e&&this.listeners.splice(e,1)},S.prototype.clearListeners=function(){this.listeners.length=0},S.prototype.clearListenerNotifications=function(){this.queue.clear()},S.emptyAnimation=new R.Animation("",[],0),S.SUBSEQUENT=0,S.FIRST=1,S.HOLD_SUBSEQUENT=2,S.HOLD_FIRST=3,S.HOLD_MIX=4,S.SETUP=1,S.CURRENT=2,S);function S(t){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new r(this),this.propertyIDs=new R.IntSet,this.animationsChanged=!1,this.trackEntryPool=new R.Pool(function(){return new e}),this.data=t}R.AnimationState=t;var e=(n.prototype.reset=function(){this.next=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0},n.prototype.getAnimationTime=function(){if(this.loop){var t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)},n.prototype.setAnimationLast=function(t){this.animationLast=t,this.nextAnimationLast=t},n.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},n.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},n);function n(){this.mixBlend=R.MixBlend.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}R.TrackEntry=e;var o,i,r=(s.prototype.start=function(t){this.objects.push(o.start),this.objects.push(t),this.animState.animationsChanged=!0},s.prototype.interrupt=function(t){this.objects.push(o.interrupt),this.objects.push(t)},s.prototype.end=function(t){this.objects.push(o.end),this.objects.push(t),this.animState.animationsChanged=!0},s.prototype.dispose=function(t){this.objects.push(o.dispose),this.objects.push(t)},s.prototype.complete=function(t){this.objects.push(o.complete),this.objects.push(t)},s.prototype.event=function(t,e){this.objects.push(o.event),this.objects.push(t),this.objects.push(e)},s.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var t=this.objects,e=this.animState.listeners,n=0;nj.MathUtils.PI?Y-=j.MathUtils.PI2:Y<-j.MathUtils.PI&&(Y+=j.MathUtils.PI2),Y*=e,L=Math.cos(Y),D=Math.sin(Y),R.a=L*F-D*O,R.b=L*V-D*_,R.c=D*F+L*O,R.d=D*V+L*_),R.appliedValid=!1}}}},Yt.prototype.computeWorldPositions=function(t,e,n,i,r){var s=this.target,a=this.position,o=this.spaces,h=j.Utils.setArraySize(this.positions,3*e+2),l=null,u=t.closed,c=t.worldVerticesLength,f=c/6,d=Yt.NONE;if(!t.constantSpeed){var p=t.lengths,m=p[f-=u?1:2];if(i&&(a*=m),r)for(var g=1;g>>1^-(1&n)},e.prototype.readStringRef=function(){var t=this.readInt(!0);return 0==t?null:this.strings[t-1]},e.prototype.readString=function(){var t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;for(var e="",n=0;n>4){case 12:case 13:e+=String.fromCharCode((31&i)<<6|63&this.readByte()),n+=2;break;case 14:e+=String.fromCharCode((15&i)<<12|(63&this.readByte())<<6|63&this.readByte()),n+=3;break;default:e+=String.fromCharCode(i),n++}}return e},e.prototype.readFloat=function(){var t=this.buffer.getFloat32(this.index);return this.index+=4,t},e.prototype.readBoolean=function(){return 0!=this.readByte()},e);function e(t,e,n,i){void 0===e&&(e=new Array),void 0===n&&(n=0),void 0===i&&(i=new DataView(t.buffer)),this.strings=e,this.index=n,this.buffer=i}var N=function(t,e,n,i,r){this.mesh=t,this.skin=e,this.slotIndex=n,this.parent=i,this.inheritDeform=r},u=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),this.bones=t,this.vertices=e}}(St=St||{}),C=St=St||{},qt.prototype.update=function(t,e){if(null==t)throw new Error("skeleton cannot be null.");var n=this.boundingBoxes,i=this.polygons,r=this.polygonPool,s=t.slots,a=s.length;n.length=0,r.freeAll(i);for(var o=i.length=0;o=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},qt.prototype.aabbIntersectsSegment=function(t,e,n,i){var r=this.minX,s=this.minY,a=this.maxX,o=this.maxY;if(t<=r&&n<=r||e<=s&&i<=s||a<=t&&a<=n||o<=e&&o<=i)return!1;var h=(i-e)/(n-t),l=h*(r-t)+e;if(st.minX&&this.minYt.minY},qt.prototype.containsPoint=function(t,e){for(var n=this.polygons,i=0,r=n.length;i>1,N=this.clipOutput,Y=Z.Utils.setArraySize(l,P+D*d),X=0;X>1;o=i.length&&(i.length=t+1),i[t]||(i[t]={}),i[t][e]=n},e.prototype.addSkin=function(t){for(var e=0;e=this.lines.length?null:this.lines[this.index++]},n.prototype.readValue=function(){var t=this.readLine(),e=t.indexOf(":");if(-1==e)throw new Error("Invalid line: "+t);return t.substring(e+1).trim()},n.prototype.readTuple=function(t){var e=this.readLine(),n=e.indexOf(":");if(-1==n)throw new Error("Invalid line: "+e);for(var i=0,r=n+1;i<3;i++){var s=e.indexOf(",",r);if(-1==s)break;t[i]=e.substr(r,s-r).trim(),r=s+1}return t[i]=e.substring(r).trim(),i+1},n);function n(t){this.index=0,this.lines=t.split(/\r\n|\r|\n/)}var m=function(){};d.TextureAtlasPage=m;var i,g=(i=d.TextureRegion,kt(r,i),r);function r(){return null!==i&&i.apply(this,arguments)||this}d.TextureAtlasRegion=g}(St=St||{}),N=St=St||{},Zt.prototype.isActive=function(){return this.active},Zt.prototype.apply=function(){this.update()},Zt.prototype.update=function(){this.data.local?this.data.relative?this.applyRelativeLocal():this.applyAbsoluteLocal():this.data.relative?this.applyRelativeWorld():this.applyAbsoluteWorld()},Zt.prototype.applyAbsoluteWorld=function(){for(var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target,s=r.a,a=r.b,o=r.c,h=r.d,l=0N.MathUtils.PI?A-=N.MathUtils.PI2:A<-N.MathUtils.PI&&(A+=N.MathUtils.PI2),A*=t,v=Math.cos(A),y=Math.sin(A),R.a=v*m-y*g,R.b=v*M-y*E,R.c=y*m+v*g,R.d=y*M+v*E,S=!0),0!=e&&(x=this.temp,r.localToWorld(x.set(this.data.offsetX,this.data.offsetY)),R.worldX+=(x.x-R.worldX)*e,R.worldY+=(x.y-R.worldY)*e,S=!0),0N.MathUtils.PI?A-=N.MathUtils.PI2:A<-N.MathUtils.PI&&(A+=N.MathUtils.PI2),A=T+(A+c)*i,b=Math.sqrt(M*M+E*E),R.b=Math.cos(A)*b,R.d=Math.sin(A)*b,S=!0),S&&(R.appliedValid=!1)}},Zt.prototype.applyRelativeWorld=function(){for(var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target,s=r.a,a=r.b,o=r.c,h=r.d,l=0N.MathUtils.PI?w-=N.MathUtils.PI2:w<-N.MathUtils.PI&&(w+=N.MathUtils.PI2),w*=t,v=Math.cos(w),y=Math.sin(w),A.a=v*m-y*g,A.b=v*M-y*E,A.c=y*m+v*g,A.d=y*M+v*E,b=!0),0!=e&&(x=this.temp,r.localToWorld(x.set(this.data.offsetX,this.data.offsetY)),A.worldX+=x.x*e,A.worldY+=x.y*e,b=!0),0N.MathUtils.PI?w-=N.MathUtils.PI2:w<-N.MathUtils.PI&&(w+=N.MathUtils.PI2),M=A.b,E=A.d,w=Math.atan2(E,M)+(w-N.MathUtils.PI/2+c)*i,T=Math.sqrt(M*M+E*E),A.b=Math.cos(w)*T,A.d=Math.sin(w)*T,b=!0),b&&(A.appliedValid=!1)}},Zt.prototype.applyAbsoluteLocal=function(){var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target;r.appliedValid||r.updateAppliedTransform();for(var s=this.bones,a=0,o=s.length;a>1,i=this.indicesArray,r=i.length=0;r>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255},r.rgb888ToColor=function(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255},r.WHITE=new r(1,1,1,1),r.RED=new r(1,0,0,1),r.GREEN=new r(0,1,0,1),r.BLUE=new r(0,0,1,1),r.MAGENTA=new r(1,0,1,1),r);function r(t,e,n,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),this.r=t,this.g=e,this.b=n,this.a=i}t.Color=i;var s=(a.clamp=function(t,e,n){return t=e?t:g.setArraySize(t,e,n)},g.newArray=function(t,e){for(var n=new Array(t),i=0;ithis.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,1=this.values.length},R.prototype.addValue=function(t){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0},R.prototype.getMean=function(){if(this.hasEnoughData()){if(this.dirty){for(var t=0,e=0;e>1)*s;var a=t.bone.skeleton,o=t.deform,h=this.vertices,l=this.bones;if(null!=l){for(var u=0,c=0,f=0;f>16&255)/255,r=(t>>8&255)/255,s=(255&t)/255,a=16777215>>24)/255:null,o=this.skeleton;return!e||(n=this.findSlot(e))&&(o=n),o.color.r=i,o.color.g=r,o.color.b=s,null!==a&&(o.color.a=a),this},setSkeletonFromJSON:function(t,e,n,i){return this.setSkeleton(t,e,n,i)},setSkeleton:function(t,e,n,i){this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications());var r=this.plugin.createSkeleton(t,i);this.skeletonData=r.skeletonData,this.preMultipliedAlpha=r.preMultipliedAlpha;var s=r.skeleton;return s.setSkin(),s.setToSetupPose(),this.skeleton=s,r=this.plugin.createAnimationState(s),this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications()),this.state=r.state,this.stateData=r.stateData,this.state.addListener({event:this.onEvent.bind(this),complete:this.onComplete.bind(this),start:this.onStart.bind(this),end:this.onEnd.bind(this),dispose:this.onDispose.bind(this),interrupted:this.onInterrupted.bind(this)}),e&&this.setAnimation(0,e,n),this.root=this.getRootBone(),this.root&&(this.root.rotation=m(f(this.rotation))+90),this.state.apply(s),s.updateCache(),this.updateSize()},onComplete:function(t){this.emit(g.COMPLETE,t)},onDispose:function(t){this.emit(g.DISPOSE,t)},onEnd:function(t){this.emit(g.END,t)},onEvent:function(t,e){this.emit(g.EVENT,t,e)},onInterrupted:function(t){this.emit(g.INTERRUPTED,t)},onStart:function(t){this.emit(g.START,t)},refresh:function(){return this.root&&(this.root.rotation=m(f(this.rotation))+90),this.updateSize(),this.skeleton.updateCache(),this},setSize:function(t,e,n,i){var r=this.skeleton;return void 0===t&&(t=r.data.width),void 0===e&&(e=r.data.height),void 0===n&&(n=0),void 0===i&&(i=0),this.width=t,this.height=e,this.displayOriginX=r.x-n,this.displayOriginY=r.y-i,this},setOffset:function(t,e){var n=this.skeleton;return void 0===t&&(t=0),void 0===e&&(e=0),this.displayOriginX=n.x-t,this.displayOriginY=n.y-e,this},updateSize:function(){var t=this.skeleton,e=this.plugin.renderer.height,n=this.scaleX,i=this.scaleY;t.x=this.x,t.y=e-this.y,t.scaleX=1,t.scaleY=1,t.updateWorldTransform();var r=this.getBounds();return this.width=r.size.x,this.height=r.size.y,this.displayOriginX=this.x-r.offset.x,this.displayOriginY=this.y-(e-(this.height+r.offset.y)),t.scaleX=n,t.scaleY=i,t.updateWorldTransform(),this},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,this.refresh()}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,this.refresh()}},getBoneList:function(){var t=[],e=this.skeletonData;if(e)for(var n=0;n - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -345,7 +345,7 @@ module.exports = Class; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -404,7 +404,27 @@ var MATH_CONST = { * @type {Phaser.Math.RandomDataGenerator} * @since 3.0.0 */ - RND: null + RND: null, + + /** + * The minimum safe integer this browser supports. + * We use a const for backward compatibility with Internet Explorer. + * + * @name Phaser.Math.MIN_SAFE_INTEGER + * @type {number} + * @since 3.21.0 + */ + MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991, + + /** + * The maximum safe integer this browser supports. + * We use a const for backward compatibility with Internet Explorer. + * + * @name Phaser.Math.MAX_SAFE_INTEGER + * @type {number} + * @since 3.21.0 + */ + MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991 }; @@ -417,7 +437,7 @@ module.exports = MATH_CONST; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -473,7 +493,7 @@ module.exports = IsPlainObject; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -501,129 +521,11 @@ module.exports = Wrap; /***/ }), /* 4 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Finds the key within the top level of the {@link source} object, or returns {@link defaultValue} - * - * @function Phaser.Utils.Objects.GetFastValue - * @since 3.0.0 - * - * @param {object} source - The object to search - * @param {string} key - The key for the property on source. Must exist at the top level of the source object (no periods) - * @param {*} [defaultValue] - The default value to use if the key does not exist. - * - * @return {*} The value if found; otherwise, defaultValue (null if none provided) - */ -var GetFastValue = function (source, key, defaultValue) -{ - var t = typeof(source); - - if (!source || t === 'number' || t === 'string') - { - return defaultValue; - } - else if (source.hasOwnProperty(key) && source[key] !== undefined) - { - return source[key]; - } - else - { - return defaultValue; - } -}; - -module.exports = GetFastValue; - - -/***/ }), -/* 5 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var CONST = __webpack_require__(1); - -/** - * Takes an angle in Phasers default clockwise format and converts it so that - * 0 is North, 90 is West, 180 is South and 270 is East, - * therefore running counter-clockwise instead of clockwise. - * - * You can pass in the angle from a Game Object using: - * - * ```javascript - * var converted = CounterClockwise(gameobject.rotation); - * ``` - * - * All values for this function are in radians. - * - * @function Phaser.Math.Angle.CounterClockwise - * @since 3.16.0 - * - * @param {number} angle - The angle to convert, in radians. - * - * @return {number} The converted angle, in radians. - */ -var CounterClockwise = function (angle) -{ - if (angle > Math.PI) - { - angle -= CONST.PI2; - } - - return Math.abs((((angle + CONST.TAU) % CONST.PI2) - CONST.PI2) % CONST.PI2); -}; - -module.exports = CounterClockwise; - - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var CONST = __webpack_require__(1); - -/** - * Convert the given angle in radians, to the equivalent angle in degrees. - * - * @function Phaser.Math.RadToDeg - * @since 3.0.0 - * - * @param {number} radians - The angle in radians to convert ot degrees. - * - * @return {integer} The given angle converted to degrees. - */ -var RadToDeg = function (radians) -{ - return radians * CONST.RAD_TO_DEG; -}; - -module.exports = RadToDeg; - - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -631,6 +533,7 @@ module.exports = RadToDeg; // and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl var Class = __webpack_require__(0); +var FuzzyEqual = __webpack_require__(20); /** * @classdesc @@ -810,6 +713,22 @@ var Vector2 = new Class({ return ((this.x === v.x) && (this.y === v.y)); }, + /** + * Check whether this Vector is approximately equal to a given Vector. + * + * @method Phaser.Math.Vector2#fuzzyEquals + * @since 3.23.0 + * + * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector. + * @param {number} [epsilon=0.0001] - The tolerance value. + * + * @return {boolean} Whether both absolute differences of the x and y components are smaller than `epsilon`. + */ + fuzzyEquals: function (v, epsilon) + { + return (FuzzyEqual(this.x, v.x, epsilon) && FuzzyEqual(this.y, v.y, epsilon)); + }, + /** * Calculate the angle between this Vector and the positive x-axis, in radians. * @@ -832,6 +751,21 @@ var Vector2 = new Class({ return angle; }, + /** + * Set the angle of this Vector. + * + * @method Phaser.Math.Vector2#setAngle + * @since 3.23.0 + * + * @param {number} angle - The angle, in radians. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + setAngle: function (angle) + { + return this.setToPolar(angle, this.length()); + }, + /** * Add a given Vector to this Vector. Addition is component-wise. * @@ -1002,6 +936,21 @@ var Vector2 = new Class({ return Math.sqrt(x * x + y * y); }, + /** + * Set the length (or magnitude) of this Vector. + * + * @method Phaser.Math.Vector2#setLength + * @since 3.23.0 + * + * @param {number} length + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + setLength: function (length) + { + return this.normalize().scale(length); + }, + /** * Calculate the length of this Vector squared. * @@ -1046,7 +995,7 @@ var Vector2 = new Class({ }, /** - * Right-hand normalize (make unit length) this Vector. + * Rotate this Vector to its perpendicular, in the positive direction. * * @method Phaser.Math.Vector2#normalizeRightHand * @since 3.0.0 @@ -1063,6 +1012,24 @@ var Vector2 = new Class({ return this; }, + /** + * Rotate this Vector to its perpendicular, in the negative direction. + * + * @method Phaser.Math.Vector2#normalizeLeftHand + * @since 3.23.0 + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + normalizeLeftHand: function () + { + var x = this.x; + + this.x = this.y; + this.y = x * -1; + + return this; + }, + /** * Calculate the dot product of this Vector and the given Vector. * @@ -1177,13 +1144,85 @@ var Vector2 = new Class({ this.y = 0; return this; + }, + + /** + * Limit the length (or magnitude) of this Vector. + * + * @method Phaser.Math.Vector2#limit + * @since 3.23.0 + * + * @param {number} max - The maximum length. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + limit: function (max) + { + var len = this.length(); + + if (len && len > max) + { + this.scale(max / len); + } + + return this; + }, + + /** + * Reflect this Vector off a line defined by a normal. + * + * @method Phaser.Math.Vector2#reflect + * @since 3.23.0 + * + * @param {Phaser.Math.Vector2} normal - A vector perpendicular to the line. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + reflect: function (normal) + { + normal = normal.clone().normalize(); + + return this.subtract(normal.scale(2 * this.dot(normal))); + }, + + /** + * Reflect this Vector across another. + * + * @method Phaser.Math.Vector2#mirror + * @since 3.23.0 + * + * @param {Phaser.Math.Vector2} axis - A vector to reflect across. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + mirror: function (axis) + { + return this.reflect(axis).negate(); + }, + + /** + * Rotate this Vector by an angle amount. + * + * @method Phaser.Math.Vector2#rotate + * @since 3.23.0 + * + * @param {number} delta - The angle to rotate by, in radians. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + rotate: function (delta) + { + var cos = Math.cos(delta); + var sin = Math.sin(delta); + + return this.set(cos * this.x - sin * this.y, sin * this.x + cos * this.y); } }); /** * A static zero Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -1195,7 +1234,7 @@ Vector2.ZERO = new Vector2(); /** * A static right Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -1207,7 +1246,7 @@ Vector2.RIGHT = new Vector2(1, 0); /** * A static left Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -1219,7 +1258,7 @@ Vector2.LEFT = new Vector2(-1, 0); /** * A static up Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -1231,7 +1270,7 @@ Vector2.UP = new Vector2(0, -1); /** * A static down Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -1243,7 +1282,7 @@ Vector2.DOWN = new Vector2(0, 1); /** * A static one Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -1256,13 +1295,131 @@ Vector2.ONE = new Vector2(1, 1); module.exports = Vector2; +/***/ }), +/* 5 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Finds the key within the top level of the {@link source} object, or returns {@link defaultValue} + * + * @function Phaser.Utils.Objects.GetFastValue + * @since 3.0.0 + * + * @param {object} source - The object to search + * @param {string} key - The key for the property on source. Must exist at the top level of the source object (no periods) + * @param {*} [defaultValue] - The default value to use if the key does not exist. + * + * @return {*} The value if found; otherwise, defaultValue (null if none provided) + */ +var GetFastValue = function (source, key, defaultValue) +{ + var t = typeof(source); + + if (!source || t === 'number' || t === 'string') + { + return defaultValue; + } + else if (source.hasOwnProperty(key) && source[key] !== undefined) + { + return source[key]; + } + else + { + return defaultValue; + } +}; + +module.exports = GetFastValue; + + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(1); + +/** + * Takes an angle in Phasers default clockwise format and converts it so that + * 0 is North, 90 is West, 180 is South and 270 is East, + * therefore running counter-clockwise instead of clockwise. + * + * You can pass in the angle from a Game Object using: + * + * ```javascript + * var converted = CounterClockwise(gameobject.rotation); + * ``` + * + * All values for this function are in radians. + * + * @function Phaser.Math.Angle.CounterClockwise + * @since 3.16.0 + * + * @param {number} angle - The angle to convert, in radians. + * + * @return {number} The converted angle, in radians. + */ +var CounterClockwise = function (angle) +{ + if (angle > Math.PI) + { + angle -= CONST.PI2; + } + + return Math.abs((((angle + CONST.TAU) % CONST.PI2) - CONST.PI2) % CONST.PI2); +}; + +module.exports = CounterClockwise; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(1); + +/** + * Convert the given angle in radians, to the equivalent angle in degrees. + * + * @function Phaser.Math.RadToDeg + * @since 3.0.0 + * + * @param {number} radians - The angle in radians to convert ot degrees. + * + * @return {integer} The given angle converted to degrees. + */ +var RadToDeg = function (radians) +{ + return radians * CONST.RAD_TO_DEG; +}; + +module.exports = RadToDeg; + + /***/ }), /* 8 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1414,7 +1571,36 @@ module.exports = FILE_CONST; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive. + * + * @function Phaser.Math.FloatBetween + * @since 3.0.0 + * + * @param {number} min - The lower bound for the float, inclusive. + * @param {number} max - The upper bound for the float exclusive. + * + * @return {number} A random float within the given range. + */ +var FloatBetween = function (min, max) +{ + return Math.random() * (max - min) + min; +}; + +module.exports = FloatBetween; + + +/***/ }), +/* 10 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1439,12 +1625,12 @@ module.exports = Clamp; /***/ }), -/* 10 */ +/* 11 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2249,12 +2435,12 @@ module.exports = Vector3; /***/ }), -/* 11 */ +/* 12 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2320,23 +2506,23 @@ module.exports = GetValue; /***/ }), -/* 12 */ +/* 13 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var CONST = __webpack_require__(8); -var Events = __webpack_require__(169); -var GetFastValue = __webpack_require__(4); -var GetURL = __webpack_require__(180); -var MergeXHRSettings = __webpack_require__(29); -var XHRLoader = __webpack_require__(181); -var XHRSettings = __webpack_require__(30); +var Events = __webpack_require__(178); +var GetFastValue = __webpack_require__(5); +var GetURL = __webpack_require__(189); +var MergeXHRSettings = __webpack_require__(32); +var XHRLoader = __webpack_require__(190); +var XHRSettings = __webpack_require__(33); /** * @classdesc @@ -2407,10 +2593,13 @@ var File = new Class({ /** * The URL of the file, not including baseURL. - * Automatically has Loader.path prepended to it. + * + * Automatically has Loader.path prepended to it if a string. + * + * Can also be a JavaScript Object, such as the results of parsing JSON data. * * @name Phaser.Loader.File#url - * @type {string} + * @type {object|string} * @since 3.0.0 */ this.url = GetFastValue(fileConfig, 'url'); @@ -2419,7 +2608,7 @@ var File = new Class({ { this.url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', ''); } - else if (typeof(this.url) !== 'function') + else if (typeof this.url === 'string' && this.url.indexOf('blob:') !== 0 && this.url.indexOf('data:') !== 0) { this.url = loader.path + this.url; } @@ -2597,6 +2786,8 @@ var File = new Class({ } else { + this.state = CONST.FILE_LOADING; + this.src = GetURL(this, this.loader.baseURL); if (this.src.indexOf('data:') === 0) @@ -2607,7 +2798,7 @@ var File = new Class({ { // The creation of this XHRLoader starts the load process going. // It will automatically call the following, based on the load outcome: - // + // // xhr.onload = this.onLoad // xhr.onerror = this.onError // xhr.onprogress = this.onProgress @@ -2638,6 +2829,8 @@ var File = new Class({ success = false; } + this.state = CONST.FILE_LOADED; + this.resetXHR(); this.loader.nextFile(this, success); @@ -2812,7 +3005,7 @@ var File = new Class({ * @method Phaser.Loader.File.createObjectURL * @static * @since 3.7.0 - * + * * @param {HTMLImageElement} image - Image object which 'src' attribute should be set to object URL. * @param {Blob} blob - A Blob object to create an object URL for. * @param {string} defaultType - Default mime type used if blob type is not available. @@ -2846,7 +3039,7 @@ File.createObjectURL = function (image, blob, defaultType) * @method Phaser.Loader.File.revokeObjectURL * @static * @since 3.7.0 - * + * * @param {HTMLImageElement} image - Image object which 'src' attribute should be revoked. */ File.revokeObjectURL = function (image) @@ -2861,12 +3054,12 @@ module.exports = File; /***/ }), -/* 13 */ +/* 14 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2930,12 +3123,12 @@ module.exports = FileTypesManager; /***/ }), -/* 14 */ +/* 15 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2951,6 +3144,8 @@ var IsPlainObject = __webpack_require__(2); * @function Phaser.Utils.Objects.Extend * @since 3.0.0 * + * @param {...*} [args] - The objects that will be mixed. + * * @return {object} The extended object. */ var Extend = function () @@ -3029,12 +3224,12 @@ module.exports = Extend; /***/ }), -/* 15 */ +/* 16 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3060,12 +3255,12 @@ module.exports = Between; /***/ }), -/* 16 */ +/* 17 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3097,12 +3292,12 @@ module.exports = Normalize; /***/ }), -/* 17 */ +/* 18 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3129,12 +3324,12 @@ module.exports = Wrap; /***/ }), -/* 18 */ +/* 19 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3161,27 +3356,61 @@ module.exports = WrapDegrees; /***/ }), -/* 19 */ +/* 20 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Check whether the given values are fuzzily equal. + * + * Two numbers are fuzzily equal if their difference is less than `epsilon`. + * + * @function Phaser.Math.Fuzzy.Equal + * @since 3.0.0 + * + * @param {number} a - The first value. + * @param {number} b - The second value. + * @param {number} [epsilon=0.0001] - The epsilon. + * + * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`. + */ +var Equal = function (a, b, epsilon) +{ + if (epsilon === undefined) { epsilon = 0.0001; } + + return Math.abs(a - b) < epsilon; +}; + +module.exports = Equal; + + +/***/ }), +/* 21 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Factorial = __webpack_require__(20); +var Factorial = __webpack_require__(22); /** - * [description] + * Calculates the Bernstein basis from the three factorial coefficients. * * @function Phaser.Math.Bernstein * @since 3.0.0 * - * @param {number} n - [description] - * @param {number} i - [description] + * @param {number} n - The first value. + * @param {number} i - The second value. * - * @return {number} [description] + * @return {number} The Bernstein basis of Factorial(n) / Factorial(i) / Factorial(n - i) */ var Bernstein = function (n, i) { @@ -3192,12 +3421,12 @@ module.exports = Bernstein; /***/ }), -/* 20 */ +/* 22 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3232,26 +3461,26 @@ module.exports = Factorial; /***/ }), -/* 21 */ +/* 23 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * Calculates a Catmull-Rom value. + * Calculates a Catmull-Rom value from the given points, based on an alpha of 0.5. * * @function Phaser.Math.CatmullRom * @since 3.0.0 * - * @param {number} t - [description] - * @param {number} p0 - [description] - * @param {number} p1 - [description] - * @param {number} p2 - [description] - * @param {number} p3 - [description] + * @param {number} t - The amount to interpolate by. + * @param {number} p0 - The first control point. + * @param {number} p1 - The second control point. + * @param {number} p2 - The third control point. + * @param {number} p3 - The fourth control point. * * @return {number} The Catmull-Rom value. */ @@ -3269,12 +3498,12 @@ module.exports = CatmullRom; /***/ }), -/* 22 */ +/* 24 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3299,12 +3528,12 @@ module.exports = Linear; /***/ }), -/* 23 */ +/* 25 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3346,12 +3575,12 @@ module.exports = SmoothStep; /***/ }), -/* 24 */ +/* 26 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3385,12 +3614,12 @@ module.exports = SmootherStep; /***/ }), -/* 25 */ +/* 27 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3415,12 +3644,67 @@ module.exports = DegToRad; /***/ }), -/* 26 */ +/* 28 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Vector2 = __webpack_require__(4); + +/** + * Takes the `x` and `y` coordinates and transforms them into the same space as + * defined by the position, rotation and scale values. + * + * @function Phaser.Math.TransformXY + * @since 3.0.0 + * + * @param {number} x - The x coordinate to be transformed. + * @param {number} y - The y coordinate to be transformed. + * @param {number} positionX - Horizontal position of the transform point. + * @param {number} positionY - Vertical position of the transform point. + * @param {number} rotation - Rotation of the transform point, in radians. + * @param {number} scaleX - Horizontal scale of the transform point. + * @param {number} scaleY - Vertical scale of the transform point. + * @param {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} [output] - The output vector, point or object for the translated coordinates. + * + * @return {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} The translated point. + */ +var TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output) +{ + if (output === undefined) { output = new Vector2(); } + + var radianSin = Math.sin(rotation); + var radianCos = Math.cos(rotation); + + // Rotate and Scale + var a = radianCos * scaleX; + var b = radianSin * scaleX; + var c = -radianSin * scaleY; + var d = radianCos * scaleY; + + // Invert + var id = 1 / ((a * d) + (c * -b)); + + output.x = (d * id * x) + (-c * id * y) + (((positionY * c) - (positionX * d)) * id); + output.y = (a * id * y) + (-b * id * x) + (((-positionY * a) + (positionX * b)) * id); + + return output; +}; + +module.exports = TransformXY; + + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3928,12 +4212,12 @@ var Matrix3 = new Class({ }, /** - * [description] + * Set the values of this Matrix3 to be normalized from the given Matrix4. * * @method Phaser.Math.Matrix3#normalFromMat4 * @since 3.0.0 * - * @param {Phaser.Math.Matrix4} m - [description] + * @param {Phaser.Math.Matrix4} m - The Matrix4 to normalize the values from. * * @return {Phaser.Math.Matrix3} This Matrix3. */ @@ -4008,12 +4292,12 @@ module.exports = Matrix3; /***/ }), -/* 27 */ +/* 30 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4572,12 +4856,12 @@ var Matrix4 = new Class({ }, /** - * [description] + * Multiply the values of this Matrix4 by those given in the `src` argument. * * @method Phaser.Math.Matrix4#multiplyLocal * @since 3.0.0 * - * @param {Phaser.Math.Matrix4} src - [description] + * @param {Phaser.Math.Matrix4} src - The source Matrix4 that this Matrix4 is multiplied by. * * @return {Phaser.Math.Matrix4} This Matrix4. */ @@ -5369,9 +5653,9 @@ var Matrix4 = new Class({ * @method Phaser.Math.Matrix4#yawPitchRoll * @since 3.0.0 * - * @param {number} yaw - [description] - * @param {number} pitch - [description] - * @param {number} roll - [description] + * @param {number} yaw - The yaw value. + * @param {number} pitch - The pitch value. + * @param {number} roll - The roll value. * * @return {Phaser.Math.Matrix4} This Matrix4. */ @@ -5470,12 +5754,12 @@ module.exports = Matrix4; /***/ }), -/* 28 */ +/* 31 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -5483,8 +5767,8 @@ module.exports = Matrix4; // and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl var Class = __webpack_require__(0); -var Vector3 = __webpack_require__(10); -var Matrix3 = __webpack_require__(26); +var Vector3 = __webpack_require__(11); +var Matrix3 = __webpack_require__(29); var EPSILON = 0.000001; @@ -5792,13 +6076,13 @@ var Quaternion = new Class({ }, /** - * [description] + * Rotates this Quaternion based on the two given vectors. * * @method Phaser.Math.Quaternion#rotationTo * @since 3.0.0 * - * @param {Phaser.Math.Vector3} a - [description] - * @param {Phaser.Math.Vector3} b - [description] + * @param {Phaser.Math.Vector3} a - The transform rotation vector. + * @param {Phaser.Math.Vector3} b - The target rotation vector. * * @return {Phaser.Math.Quaternion} This Quaternion. */ @@ -6242,17 +6526,17 @@ module.exports = Quaternion; /***/ }), -/* 29 */ +/* 32 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Extend = __webpack_require__(14); -var XHRSettings = __webpack_require__(30); +var Extend = __webpack_require__(15); +var XHRSettings = __webpack_require__(33); /** * Takes two XHRSettings Objects and creates a new XHRSettings object from them. @@ -6290,12 +6574,12 @@ module.exports = MergeXHRSettings; /***/ }), -/* 30 */ +/* 33 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -6310,16 +6594,18 @@ module.exports = MergeXHRSettings; * @param {string} [user=''] - Optional username for the XHR request. * @param {string} [password=''] - Optional password for the XHR request. * @param {integer} [timeout=0] - Optional XHR timeout value. + * @param {boolean} [withCredentials=false] - Optional XHR withCredentials value. * * @return {Phaser.Types.Loader.XHRSettingsObject} The XHRSettings object as used by the Loader. */ -var XHRSettings = function (responseType, async, user, password, timeout) +var XHRSettings = function (responseType, async, user, password, timeout, withCredentials) { if (responseType === undefined) { responseType = ''; } if (async === undefined) { async = true; } if (user === undefined) { user = ''; } if (password === undefined) { password = ''; } if (timeout === undefined) { timeout = 0; } + if (withCredentials === undefined) { withCredentials = false; } // Before sending a request, set the xhr.responseType to "text", // "arraybuffer", "blob", or "document", depending on your data needs. @@ -6340,12 +6626,16 @@ var XHRSettings = function (responseType, async, user, password, timeout) timeout: timeout, // setRequestHeader + headers: undefined, header: undefined, headerValue: undefined, requestedWith: false, // overrideMimeType - overrideMimeType: undefined + overrideMimeType: undefined, + + // withCredentials + withCredentials: withCredentials }; }; @@ -6354,12 +6644,12 @@ module.exports = XHRSettings; /***/ }), -/* 31 */ +/* 34 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -6381,7 +6671,7 @@ module.exports = NOOP; /***/ }), -/* 32 */ +/* 35 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -6390,34 +6680,39 @@ module.exports = NOOP; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BuildGameObject = __webpack_require__(33); +var BuildGameObject = __webpack_require__(36); var Class = __webpack_require__(0); -var GetValue = __webpack_require__(11); -var ResizeEvent = __webpack_require__(143); -var ScenePlugin = __webpack_require__(144); -var Spine = __webpack_require__(166); -var SpineFile = __webpack_require__(167); -var SpineGameObject = __webpack_require__(185); +var GetValue = __webpack_require__(12); +var ResizeEvent = __webpack_require__(150); +var ScenePlugin = __webpack_require__(151); +var Spine = __webpack_require__(175); +var SpineFile = __webpack_require__(176); +var SpineGameObject = __webpack_require__(194); /** * @classdesc * The Spine Plugin is a Scene based plugin that handles the creation and rendering of Spine Game Objects. - * + * + * Find more details about Spine itself at http://esotericsoftware.com/. + * * All rendering and object creation is handled via the official Spine Runtimes. This version of the plugin - * uses the Spine 3.8 runtimes. Files created in a different version of Spine may not work as a result. - * - * You can find more details about Spine at http://esotericsoftware.com/. - * + * uses the Spine 3.8.95 runtimes. Please note that due to the way the Spine runtimes use semver, you will + * get breaking changes in point-releases. Therefore, files created in a different version of Spine may not + * work as a result, without you first updating the runtimes and rebuilding the plugin. + * + * Esoteric themselves recommend that you freeze your Spine editor version against the runtime versions. + * You can find more information about this here: http://esotericsoftware.com/spine-settings#Version + * * Please note that you require a Spine license in order to use Spine Runtimes in your games. - * + * * You can install this plugin into your Phaser game by either importing it, if you're using ES6: - * + * * ```javascript * import * as SpinePlugin from './SpinePlugin.js'; * ``` - * + * * and then adding it to your Phaser Game configuration: - * + * * ```javascript * plugins: { * scene: [ @@ -6425,10 +6720,10 @@ var SpineGameObject = __webpack_require__(185); * ] * } * ``` - * + * * If you're using ES5 then you can load the Spine Plugin in a Scene files payload, _within_ your * Game Configuration object, like this: - * + * * ```javascript * scene: { * preload: preload, @@ -6440,42 +6735,42 @@ var SpineGameObject = __webpack_require__(185); * } * } * ``` - * + * * Loading it like this allows you to then use commands such as `this.load.spine` from within the * same Scene. Alternatively, you can use the method `this.load.plugin` to load the plugin via the normal * Phaser Loader. However, doing so will not add it to the current Scene. It will be available from any * subsequent Scenes. - * + * * Assuming a default environment you access it from within a Scene by using the `this.spine` reference. - * + * * When this plugin is installed into a Scene it will add a Loader File Type, allowing you to load * Spine files directly, i.e.: - * + * * ```javascript * this.load.spine('stretchyman', 'stretchyman-pro.json', [ 'stretchyman-pma.atlas' ], true); * ``` - * - * It also installs a Game Object Factory method, allowin you to create Spine Game Objects: - * + * + * It also installs a Game Object Factory method, allowing you to create Spine Game Objects: + * * ```javascript * this.add.spine(512, 650, 'stretchyman') * ``` - * + * * The first argument is the key which you used when importing the Spine data. There are lots of * things you can specify, such as the animation name, skeleton, slot attachments and more. Please * see the respective documentation and examples for further details. - * + * * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary. * The associated atlas files are scanned for any texture files present in them, which are then loaded. - * If you have exported your Spine data with preMultipiedAlpha set, then you should enable this in the + * If you have exported your Spine data with preMultipliedAlpha set, then you should enable this in the * load arguments, or you may see black outlines around skeleton textures. - * + * * The Spine plugin is local to the Scene in which it is installed. This means a change to something, * such as the Skeleton Debug Renderer, in this Scene, will not impact the renderer in any other Scene. * The only exception to this is with the caches this plugin creates. Spine atlas and texture data are * stored in their own caches, which are global, meaning they're accessible from any Scene in your * game, regardless if the Scene loaded the Spine data or not. - * + * * For details about the Spine Runtime API see http://esotericsoftware.com/spine-api-reference * * @class SpinePlugin @@ -6510,7 +6805,7 @@ var SpinePlugin = new Class({ /** * A custom cache that stores the Spine atlas data. - * + * * This cache is global across your game, allowing you to access Spine data loaded from other Scenes, * no matter which Scene you are in. * @@ -6522,7 +6817,7 @@ var SpinePlugin = new Class({ /** * A custom cache that stores the Spine Textures. - * + * * This cache is global across your game, allowing you to access Spine data loaded from other Scenes, * no matter which Scene you are in. * @@ -6562,7 +6857,7 @@ var SpinePlugin = new Class({ /** * The underlying WebGL context of the Phaser renderer. - * + * * Only set if running in WebGL mode. * * @name SpinePlugin#gl @@ -6582,7 +6877,7 @@ var SpinePlugin = new Class({ /** * An instance of the Spine WebGL Scene Renderer. - * + * * Only set if running in WebGL mode. * * @name SpinePlugin#sceneRenderer @@ -6602,7 +6897,7 @@ var SpinePlugin = new Class({ /** * An instance of the Spine Skeleton Debug Renderer. - * + * * Only set if running in WebGL mode. * * @name SpinePlugin#skeletonDebugRenderer @@ -6664,46 +6959,46 @@ var SpinePlugin = new Class({ var add = function (x, y, key, animationName, loop) { var spineGO = new SpineGameObject(this.scene, _this, x, y, key, animationName, loop); - + this.displayList.add(spineGO); this.updateList.add(spineGO); - + return spineGO; }; var make = function (config, addToScene) { if (config === undefined) { config = {}; } - + var key = GetValue(config, 'key', null); var animationName = GetValue(config, 'animationName', null); var loop = GetValue(config, 'loop', false); - + var spineGO = new SpineGameObject(this.scene, _this, 0, 0, key, animationName, loop); - + if (addToScene !== undefined) { config.add = addToScene; } - + BuildGameObject(this.scene, spineGO, config); - + // Spine specific var skinName = GetValue(config, 'skinName', false); - + if (skinName) { spineGO.setSkinByName(skinName); } - + var slotName = GetValue(config, 'slotName', false); var attachmentName = GetValue(config, 'attachmentName', null); - + if (slotName) { spineGO.setAttachment(slotName, attachmentName); } - + return spineGO.refresh(); }; @@ -6760,7 +7055,7 @@ var SpinePlugin = new Class({ { this.sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true); - // Monkeypatch the Spine setBlendMode functions, or batching is destroyed + // Monkeypatch the Spine setBlendMode functions, or batching is destroyed! var setBlendMode = function (srcBlend, dstBlend) { @@ -6795,9 +7090,9 @@ var SpinePlugin = new Class({ * * @method SpinePlugin#getAtlasCanvas * @since 3.19.0 - * + * * @param {string} key - The key of the Spine Atlas to create. - * + * * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found. */ getAtlasCanvas: function (key) @@ -6823,7 +7118,7 @@ var SpinePlugin = new Class({ atlas = new Spine.TextureAtlas(atlasEntry.data, function (path) { - return new Spine.canvas.CanvasTexture(textures.get(path).getSourceImage()); + return new Spine.canvas.CanvasTexture(textures.get(atlasEntry.prefix + path).getSourceImage()); }); } @@ -6836,9 +7131,9 @@ var SpinePlugin = new Class({ * * @method SpinePlugin#getAtlasWebGL * @since 3.19.0 - * + * * @param {string} key - The key of the Spine Atlas to create. - * + * * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found. */ getAtlasWebGL: function (key) @@ -6868,7 +7163,7 @@ var SpinePlugin = new Class({ atlas = new Spine.TextureAtlas(atlasEntry.data, function (path) { - return new Spine.webgl.GLTexture(gl, textures.get(path).getSourceImage(), false); + return new Spine.webgl.GLTexture(gl, textures.get(atlasEntry.prefix + path).getSourceImage(), false); }); } @@ -6879,7 +7174,7 @@ var SpinePlugin = new Class({ * Adds a Spine Skeleton and Atlas file, or array of files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -6894,21 +7189,21 @@ var SpinePlugin = new Class({ * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been * loaded. - * + * * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. - * + * * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary. The associated * atlas files are scanned for any texture files present in them, which are then loaded. If you have exported - * your Spine data with preMultipiedAlpha set, then you should enable this in the arguments, or you may see black + * your Spine data with preMultipliedAlpha set, then you should enable this in the arguments, or you may see black * outlines around skeleton textures. - * + * * The key must be a unique String. It is used to add the file to the global Spine cache upon a successful load. * The key should be unique both in terms of files being loaded and files already present in the Spine cache. * Loading a file using a key that is already taken will result in a warning. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.spine({ * key: 'mainmenu', @@ -6917,9 +7212,9 @@ var SpinePlugin = new Class({ * preMultipliedAlpha: true * }); * ``` - * + * * If you need to load multiple Spine atlas files, provide them as an array: - * + * * ```javascript * function preload () * { @@ -6942,13 +7237,13 @@ var SpinePlugin = new Class({ * Note: The ability to load this type of file will only be available if the Spine Plugin has been built or loaded into Phaser. * * @method Phaser.Loader.LoaderPlugin#spine - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.19.0 * * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} jsonURL - The absolute or relative URL to load the Spine json file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". * @param {string|string[]} atlasURL - The absolute or relative URL to load the Spine atlas file from. If undefined or `null` it will be set to `.atlas`, i.e. if `key` was "alien" then the URL will be "alien.atlas". - * @param {boolean} [preMultipiedAlpha=false] - Do the texture files include pre-multiplied alpha or not? + * @param {boolean} [preMultipliedAlpha=false] - Do the texture files include pre-multiplied alpha or not? * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the Spine json file. Used in replacement of the Loaders default XHR Settings. * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the Spine atlas file. Used in replacement of the Loaders default XHR Settings. * @@ -6957,13 +7252,13 @@ var SpinePlugin = new Class({ spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings) { var multifile; - + if (Array.isArray(key)) { for (var i = 0; i < key.length; i++) { multifile = new SpineFile(this, key[i]); - + this.addFile(multifile.files); } } @@ -6973,23 +7268,23 @@ var SpinePlugin = new Class({ this.addFile(multifile.files); } - + return this; }, /** * Converts the given x and y screen coordinates into the world space of the given Skeleton. - * + * * Only works in WebGL. * * @method SpinePlugin#worldToLocal * @since 3.19.0 - * + * * @param {number} x - The screen space x coordinate to convert. * @param {number} y - The screen space y coordinate to convert. * @param {spine.Skeleton} skeleton - The Spine Skeleton to convert into. * @param {spine.Bone} [bone] - Optional bone of the Skeleton to convert into. - * + * * @return {spine.Vector2} A Vector2 containing the translated point. */ worldToLocal: function (x, y, skeleton, bone) @@ -7026,10 +7321,10 @@ var SpinePlugin = new Class({ * * @method SpinePlugin#getVector2 * @since 3.19.0 - * + * * @param {number} x - The Vector x value. * @param {number} y - The Vector y value. - * + * * @return {spine.Vector2} A Spine Vector2 based on the given values. */ getVector2: function (x, y) @@ -7039,16 +7334,16 @@ var SpinePlugin = new Class({ /** * Returns a Spine Vector2 based on the given x, y and z values. - * + * * Only works in WebGL. * * @method SpinePlugin#getVector3 * @since 3.19.0 - * + * * @param {number} x - The Vector x value. * @param {number} y - The Vector y value. * @param {number} z - The Vector z value. - * + * * @return {spine.Vector2} A Spine Vector2 based on the given values. */ getVector3: function (x, y, z) @@ -7058,14 +7353,14 @@ var SpinePlugin = new Class({ /** * Sets `drawBones` in the Spine Skeleton Debug Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setDebugBones * @since 3.19.0 - * + * * @param {boolean} [value=true] - The value to set in the debug property. - * + * * @return {this} This Spine Plugin. */ setDebugBones: function (value) @@ -7079,14 +7374,14 @@ var SpinePlugin = new Class({ /** * Sets `drawRegionAttachments` in the Spine Skeleton Debug Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setDebugRegionAttachments * @since 3.19.0 - * + * * @param {boolean} [value=true] - The value to set in the debug property. - * + * * @return {this} This Spine Plugin. */ setDebugRegionAttachments: function (value) @@ -7100,14 +7395,14 @@ var SpinePlugin = new Class({ /** * Sets `drawBoundingBoxes` in the Spine Skeleton Debug Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setDebugBoundingBoxes * @since 3.19.0 - * + * * @param {boolean} [value=true] - The value to set in the debug property. - * + * * @return {this} This Spine Plugin. */ setDebugBoundingBoxes: function (value) @@ -7121,14 +7416,14 @@ var SpinePlugin = new Class({ /** * Sets `drawMeshHull` in the Spine Skeleton Debug Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setDebugMeshHull * @since 3.19.0 - * + * * @param {boolean} [value=true] - The value to set in the debug property. - * + * * @return {this} This Spine Plugin. */ setDebugMeshHull: function (value) @@ -7142,14 +7437,14 @@ var SpinePlugin = new Class({ /** * Sets `drawMeshTriangles` in the Spine Skeleton Debug Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setDebugMeshTriangles * @since 3.19.0 - * + * * @param {boolean} [value=true] - The value to set in the debug property. - * + * * @return {this} This Spine Plugin. */ setDebugMeshTriangles: function (value) @@ -7163,14 +7458,14 @@ var SpinePlugin = new Class({ /** * Sets `drawPaths` in the Spine Skeleton Debug Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setDebugPaths * @since 3.19.0 - * + * * @param {boolean} [value=true] - The value to set in the debug property. - * + * * @return {this} This Spine Plugin. */ setDebugPaths: function (value) @@ -7184,14 +7479,14 @@ var SpinePlugin = new Class({ /** * Sets `drawSkeletonXY` in the Spine Skeleton Debug Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setDebugSkeletonXY * @since 3.19.0 - * + * * @param {boolean} [value=true] - The value to set in the debug property. - * + * * @return {this} This Spine Plugin. */ setDebugSkeletonXY: function (value) @@ -7205,14 +7500,14 @@ var SpinePlugin = new Class({ /** * Sets `drawClipping` in the Spine Skeleton Debug Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setDebugClipping * @since 3.19.0 - * + * * @param {boolean} [value=true] - The value to set in the debug property. - * + * * @return {this} This Spine Plugin. */ setDebugClipping: function (value) @@ -7226,14 +7521,14 @@ var SpinePlugin = new Class({ /** * Sets the given vertex effect on the Spine Skeleton Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setEffect * @since 3.19.0 - * + * * @param {spine.VertexEffect} [effect] - The vertex effect to set on the Skeleton Renderer. - * + * * @return {this} This Spine Plugin. */ setEffect: function (effect) @@ -7245,15 +7540,15 @@ var SpinePlugin = new Class({ /** * Creates a Spine Skeleton based on the given key and optional Skeleton JSON data. - * + * * The Skeleton data should have already been loaded before calling this method. * * @method SpinePlugin#createSkeleton * @since 3.19.0 - * + * * @param {string} key - The key of the Spine skeleton data, as loaded by the plugin. If the Spine JSON contains multiple skeletons, reference them with a period, i.e. `set.spineBoy`. * @param {object} [skeletonJSON] - Optional Skeleton JSON data to use, instead of getting it from the cache. - * + * * @return {(any|null)} This Spine Skeleton data object, or `null` if the key was invalid. */ createSkeleton: function (key, skeletonJSON) @@ -7286,7 +7581,7 @@ var SpinePlugin = new Class({ var preMultipliedAlpha = atlasData.preMultipliedAlpha; var atlasLoader = new Spine.AtlasAttachmentLoader(atlas); - + var skeletonJson = new Spine.SkeletonJson(atlasLoader); var data; @@ -7307,7 +7602,7 @@ var SpinePlugin = new Class({ var skeletonData = skeletonJson.readSkeletonData(data); var skeleton = new Spine.Skeleton(skeletonData); - + return { skeletonData: skeletonData, skeleton: skeleton, preMultipliedAlpha: preMultipliedAlpha }; } else @@ -7318,14 +7613,14 @@ var SpinePlugin = new Class({ /** * Creates a new Animation State and Animation State Data for the given skeleton. - * + * * The returned object contains two properties: `state` and `stateData` respectively. * * @method SpinePlugin#createAnimationState * @since 3.19.0 - * + * * @param {spine.Skeleton} skeleton - The Skeleton to create the Animation State for. - * + * * @return {any} An object containing the Animation State and Animation State Data instances. */ createAnimationState: function (skeleton) @@ -7339,17 +7634,17 @@ var SpinePlugin = new Class({ /** * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose. - * + * * The returned object contains two properties: `offset` and `size`: - * + * * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB. * `size` - The width and height of the AABB. * * @method SpinePlugin#getBounds * @since 3.19.0 - * + * * @param {spine.Skeleton} skeleton - The Skeleton to get the bounds from. - * + * * @return {any} The bounds object. */ getBounds: function (skeleton) @@ -7364,7 +7659,7 @@ var SpinePlugin = new Class({ /** * Internal handler for when the renderer resizes. - * + * * Only called if running in WebGL. * * @method SpinePlugin#onResize @@ -7380,14 +7675,14 @@ var SpinePlugin = new Class({ sceneRenderer.camera.position.x = viewportWidth / 2; sceneRenderer.camera.position.y = viewportHeight / 2; - + sceneRenderer.camera.viewportWidth = viewportWidth; sceneRenderer.camera.viewportHeight = viewportHeight; }, /** * The Scene that owns this plugin is shutting down. - * + * * We need to kill and reset all internal properties as well as stop listening to Scene events. * * @method SpinePlugin#shutdown @@ -7399,11 +7694,16 @@ var SpinePlugin = new Class({ var eventEmitter = this.systems.events; eventEmitter.off('shutdown', this.shutdown, this); + + if (this.isWebGL) + { + this.game.scale.off(ResizeEvent, this.onResize, this); + } }, /** * The Scene that owns this plugin is being destroyed. - * + * * We need to shutdown and then kill off all external references. * * @method SpinePlugin#destroy @@ -7439,30 +7739,30 @@ var SpinePlugin = new Class({ /** * Creates a new Spine Game Object and adds it to the Scene. - * + * * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects * do not have a Phaser origin. - * + * * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference * that. - * + * * ```javascript * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true); * ``` - * + * * The key is optional. If not passed here, you need to call `SpineGameObject.setSkeleton()` to use it. - * + * * The animation name is also optional and can be set later via `SpineGameObject.setAnimation`. - * + * * Should you wish for more control over the object creation, such as setting a slot attachment or skin * name, then use `SpinePlugin.make` instead. * * @method SpinePlugin#add * @since 3.19.0 - * + * * @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} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin. @@ -7474,16 +7774,16 @@ var SpinePlugin = new Class({ /** * Creates a new Spine Game Object from the given configuration file and optionally adds it to the Scene. - * + * * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects * do not have a Phaser origin. - * + * * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference * that. - * + * * ```javascript * let jelly = this.make.spine({ * x: 500, y: 500, key: 'jelly', @@ -7507,17 +7807,17 @@ module.exports = SpinePlugin; /***/ }), -/* 33 */ +/* 36 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlendModes = __webpack_require__(34); -var GetAdvancedValue = __webpack_require__(35); +var BlendModes = __webpack_require__(37); +var GetAdvancedValue = __webpack_require__(38); /** * Builds a Game Object using the provided configuration object. @@ -7635,12 +7935,12 @@ module.exports = BuildGameObject; /***/ }), -/* 34 */ +/* 37 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7974,17 +8274,17 @@ module.exports = { /***/ }), -/* 35 */ +/* 38 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH = __webpack_require__(36); -var GetValue = __webpack_require__(11); +var MATH = __webpack_require__(39); +var GetValue = __webpack_require__(12); /** * Retrieves a value from an object. Allows for more advanced selection options, including: @@ -8061,17 +8361,17 @@ module.exports = GetAdvancedValue; /***/ }), -/* 36 */ +/* 39 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var CONST = __webpack_require__(1); -var Extend = __webpack_require__(14); +var Extend = __webpack_require__(15); /** * @namespace Phaser.Math @@ -8080,62 +8380,63 @@ var Extend = __webpack_require__(14); var PhaserMath = { // Collections of functions - Angle: __webpack_require__(37), - Distance: __webpack_require__(44), - Easing: __webpack_require__(48), - Fuzzy: __webpack_require__(93), - Interpolation: __webpack_require__(99), - Pow2: __webpack_require__(107), - Snap: __webpack_require__(111), + Angle: __webpack_require__(40), + Distance: __webpack_require__(49), + Easing: __webpack_require__(57), + Fuzzy: __webpack_require__(102), + Interpolation: __webpack_require__(107), + Pow2: __webpack_require__(115), + Snap: __webpack_require__(119), // Expose the RNG Class - RandomDataGenerator: __webpack_require__(115), + RandomDataGenerator: __webpack_require__(123), // Single functions - Average: __webpack_require__(116), - Bernstein: __webpack_require__(19), - Between: __webpack_require__(117), - CatmullRom: __webpack_require__(21), - CeilTo: __webpack_require__(118), - Clamp: __webpack_require__(9), - DegToRad: __webpack_require__(25), - Difference: __webpack_require__(119), - Factorial: __webpack_require__(20), - FloatBetween: __webpack_require__(120), - FloorTo: __webpack_require__(121), - FromPercent: __webpack_require__(122), - GetSpeed: __webpack_require__(123), - IsEven: __webpack_require__(124), - IsEvenStrict: __webpack_require__(125), - Linear: __webpack_require__(22), - MaxAdd: __webpack_require__(126), - MinSub: __webpack_require__(127), - Percent: __webpack_require__(128), - RadToDeg: __webpack_require__(6), - RandomXY: __webpack_require__(129), - RandomXYZ: __webpack_require__(130), - RandomXYZW: __webpack_require__(131), - Rotate: __webpack_require__(132), - RotateAround: __webpack_require__(133), - RotateAroundDistance: __webpack_require__(134), - RoundAwayFromZero: __webpack_require__(135), - RoundTo: __webpack_require__(136), - SinCosTableGenerator: __webpack_require__(137), - SmootherStep: __webpack_require__(24), - SmoothStep: __webpack_require__(23), - ToXY: __webpack_require__(138), - TransformXY: __webpack_require__(139), - Within: __webpack_require__(140), + Average: __webpack_require__(124), + Bernstein: __webpack_require__(21), + Between: __webpack_require__(125), + CatmullRom: __webpack_require__(23), + CeilTo: __webpack_require__(126), + Clamp: __webpack_require__(10), + DegToRad: __webpack_require__(27), + Difference: __webpack_require__(127), + Factorial: __webpack_require__(22), + FloatBetween: __webpack_require__(9), + FloorTo: __webpack_require__(128), + FromPercent: __webpack_require__(129), + GetSpeed: __webpack_require__(130), + IsEven: __webpack_require__(131), + IsEvenStrict: __webpack_require__(132), + Linear: __webpack_require__(24), + MaxAdd: __webpack_require__(133), + MinSub: __webpack_require__(134), + Percent: __webpack_require__(135), + RadToDeg: __webpack_require__(7), + RandomXY: __webpack_require__(136), + RandomXYZ: __webpack_require__(137), + RandomXYZW: __webpack_require__(138), + Rotate: __webpack_require__(139), + RotateAround: __webpack_require__(140), + RotateAroundDistance: __webpack_require__(141), + RotateTo: __webpack_require__(142), + RoundAwayFromZero: __webpack_require__(143), + RoundTo: __webpack_require__(144), + SinCosTableGenerator: __webpack_require__(145), + SmootherStep: __webpack_require__(26), + SmoothStep: __webpack_require__(25), + ToXY: __webpack_require__(146), + TransformXY: __webpack_require__(28), + Within: __webpack_require__(147), Wrap: __webpack_require__(3), // Vector classes - Vector2: __webpack_require__(7), - Vector3: __webpack_require__(10), - Vector4: __webpack_require__(141), - Matrix3: __webpack_require__(26), - Matrix4: __webpack_require__(27), - Quaternion: __webpack_require__(28), - RotateVec3: __webpack_require__(142) + Vector2: __webpack_require__(4), + Vector3: __webpack_require__(11), + Vector4: __webpack_require__(148), + Matrix3: __webpack_require__(29), + Matrix4: __webpack_require__(30), + Quaternion: __webpack_require__(31), + RotateVec3: __webpack_require__(149) }; @@ -8149,12 +8450,12 @@ module.exports = PhaserMath; /***/ }), -/* 37 */ +/* 40 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8164,28 +8465,30 @@ module.exports = PhaserMath; module.exports = { - Between: __webpack_require__(15), - BetweenPoints: __webpack_require__(38), - BetweenPointsY: __webpack_require__(39), - BetweenY: __webpack_require__(40), - CounterClockwise: __webpack_require__(5), - Normalize: __webpack_require__(16), - Reverse: __webpack_require__(41), - RotateTo: __webpack_require__(42), - ShortestBetween: __webpack_require__(43), - Wrap: __webpack_require__(17), - WrapDegrees: __webpack_require__(18) + Between: __webpack_require__(16), + BetweenPoints: __webpack_require__(41), + BetweenPointsY: __webpack_require__(42), + BetweenY: __webpack_require__(43), + CounterClockwise: __webpack_require__(6), + Normalize: __webpack_require__(17), + Random: __webpack_require__(44), + RandomDegrees: __webpack_require__(45), + Reverse: __webpack_require__(46), + RotateTo: __webpack_require__(47), + ShortestBetween: __webpack_require__(48), + Wrap: __webpack_require__(18), + WrapDegrees: __webpack_require__(19) }; /***/ }), -/* 38 */ +/* 41 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8197,8 +8500,8 @@ module.exports = { * @function Phaser.Math.Angle.BetweenPoints * @since 3.0.0 * - * @param {(Phaser.Geom.Point|object)} point1 - The first point. - * @param {(Phaser.Geom.Point|object)} point2 - The second point. + * @param {Phaser.Types.Math.Vector2Like} point1 - The first point. + * @param {Phaser.Types.Math.Vector2Like} point2 - The second point. * * @return {number} The angle in radians. */ @@ -8211,12 +8514,12 @@ module.exports = BetweenPoints; /***/ }), -/* 39 */ +/* 42 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8229,8 +8532,8 @@ module.exports = BetweenPoints; * @function Phaser.Math.Angle.BetweenPointsY * @since 3.0.0 * - * @param {(Phaser.Geom.Point|object)} point1 - The first point. - * @param {(Phaser.Geom.Point|object)} point2 - The second point. + * @param {Phaser.Types.Math.Vector2Like} point1 - The first point. + * @param {Phaser.Types.Math.Vector2Like} point2 - The second point. * * @return {number} The angle in radians. */ @@ -8243,12 +8546,12 @@ module.exports = BetweenPointsY; /***/ }), -/* 40 */ +/* 43 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8277,16 +8580,74 @@ module.exports = BetweenY; /***/ }), -/* 41 */ +/* 44 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @author @samme + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Normalize = __webpack_require__(16); +var FloatBetween = __webpack_require__(9); + +/** + * Returns a random angle in the range [-pi, pi]. + * + * @function Phaser.Math.Angle.Random + * @since 3.23.0 + * + * @return {number} The angle, in radians. + */ +var Random = function () +{ + return FloatBetween(-Math.PI, Math.PI); +}; + +module.exports = Random; + + +/***/ }), +/* 45 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author @samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var FloatBetween = __webpack_require__(9); + +/** + * Returns a random angle in the range [-180, 180]. + * + * @function Phaser.Math.Angle.RandomDegrees + * @since 3.23.0 + * + * @return {number} The angle, in degrees. + */ +var RandomDegrees = function () +{ + return FloatBetween(-180, 180); +}; + +module.exports = RandomDegrees; + + +/***/ }), +/* 46 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Normalize = __webpack_require__(17); /** * Reverse the given angle. @@ -8307,12 +8668,12 @@ module.exports = Reverse; /***/ }), -/* 42 */ +/* 47 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8374,12 +8735,12 @@ module.exports = RotateTo; /***/ }), -/* 43 */ +/* 48 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8423,12 +8784,12 @@ module.exports = ShortestBetween; /***/ }), -/* 44 */ +/* 49 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8438,20 +8799,24 @@ module.exports = ShortestBetween; module.exports = { - Between: __webpack_require__(45), - Power: __webpack_require__(46), - Squared: __webpack_require__(47) + Between: __webpack_require__(50), + BetweenPoints: __webpack_require__(51), + BetweenPointsSquared: __webpack_require__(52), + Chebyshev: __webpack_require__(53), + Power: __webpack_require__(54), + Snake: __webpack_require__(55), + Squared: __webpack_require__(56) }; /***/ }), -/* 45 */ +/* 50 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8480,12 +8845,110 @@ module.exports = DistanceBetween; /***/ }), -/* 46 */ +/* 51 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the distance between two points. + * + * @function Phaser.Math.Distance.BetweenPoints + * @since 3.22.0 + * + * @param {Phaser.Types.Math.Vector2Like} a - The first point. + * @param {Phaser.Types.Math.Vector2Like} b - The second point. + * + * @return {number} The distance between the points. + */ +var DistanceBetweenPoints = function (a, b) +{ + var dx = a.x - b.x; + var dy = a.y - b.y; + + return Math.sqrt(dx * dx + dy * dy); +}; + +module.exports = DistanceBetweenPoints; + + +/***/ }), +/* 52 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the squared distance between two points. + * + * @function Phaser.Math.Distance.BetweenPointsSquared + * @since 3.22.0 + * + * @param {Phaser.Types.Math.Vector2Like} a - The first point. + * @param {Phaser.Types.Math.Vector2Like} b - The second point. + * + * @return {number} The squared distance between the points. + */ +var DistanceBetweenPointsSquared = function (a, b) +{ + var dx = a.x - b.x; + var dy = a.y - b.y; + + return dx * dx + dy * dy; +}; + +module.exports = DistanceBetweenPointsSquared; + + +/***/ }), +/* 53 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the Chebyshev distance between two sets of coordinates (points). + * + * Chebyshev distance (or chessboard distance) is the maximum of the horizontal and vertical distances. + * It's the effective distance when movement can be horizontal, vertical, or diagonal. + * + * @function Phaser.Math.Distance.Chebyshev + * @since 3.22.0 + * + * @param {number} x1 - The x coordinate of the first point. + * @param {number} y1 - The y coordinate of the first point. + * @param {number} x2 - The x coordinate of the second point. + * @param {number} y2 - The y coordinate of the second point. + * + * @return {number} The distance between each point. + */ +var ChebyshevDistance = function (x1, y1, x2, y2) +{ + return Math.max(Math.abs(x1 - x2), Math.abs(y1 - y2)); +}; + +module.exports = ChebyshevDistance; + + +/***/ }), +/* 54 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8514,12 +8977,46 @@ module.exports = DistancePower; /***/ }), -/* 47 */ +/* 55 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the snake distance between two sets of coordinates (points). + * + * Snake distance (rectilinear distance, Manhattan distance) is the sum of the horizontal and vertical distances. + * It's the effective distance when movement is allowed only horizontally or vertically (but not both). + * + * @function Phaser.Math.Distance.Snake + * @since 3.22.0 + * + * @param {number} x1 - The x coordinate of the first point. + * @param {number} y1 - The y coordinate of the first point. + * @param {number} x2 - The x coordinate of the second point. + * @param {number} y2 - The y coordinate of the second point. + * + * @return {number} The distance between each point. + */ +var SnakeDistance = function (x1, y1, x2, y2) +{ + return Math.abs(x1 - x2) + Math.abs(y1 - y2); +}; + +module.exports = SnakeDistance; + + +/***/ }), +/* 56 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8548,12 +9045,12 @@ module.exports = DistanceSquared; /***/ }), -/* 48 */ +/* 57 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8563,29 +9060,29 @@ module.exports = DistanceSquared; module.exports = { - Back: __webpack_require__(49), - Bounce: __webpack_require__(53), - Circular: __webpack_require__(57), - Cubic: __webpack_require__(61), - Elastic: __webpack_require__(65), - Expo: __webpack_require__(69), - Linear: __webpack_require__(73), - Quadratic: __webpack_require__(75), - Quartic: __webpack_require__(79), - Quintic: __webpack_require__(83), - Sine: __webpack_require__(87), - Stepped: __webpack_require__(91) + Back: __webpack_require__(58), + Bounce: __webpack_require__(62), + Circular: __webpack_require__(66), + Cubic: __webpack_require__(70), + Elastic: __webpack_require__(74), + Expo: __webpack_require__(78), + Linear: __webpack_require__(82), + Quadratic: __webpack_require__(84), + Quartic: __webpack_require__(88), + Quintic: __webpack_require__(92), + Sine: __webpack_require__(96), + Stepped: __webpack_require__(100) }; /***/ }), -/* 49 */ +/* 58 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8595,20 +9092,20 @@ module.exports = { module.exports = { - In: __webpack_require__(50), - Out: __webpack_require__(51), - InOut: __webpack_require__(52) + In: __webpack_require__(59), + Out: __webpack_require__(60), + InOut: __webpack_require__(61) }; /***/ }), -/* 50 */ +/* 59 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8634,12 +9131,12 @@ module.exports = In; /***/ }), -/* 51 */ +/* 60 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8665,12 +9162,12 @@ module.exports = Out; /***/ }), -/* 52 */ +/* 61 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8705,12 +9202,12 @@ module.exports = InOut; /***/ }), -/* 53 */ +/* 62 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8720,20 +9217,20 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(54), - Out: __webpack_require__(55), - InOut: __webpack_require__(56) + In: __webpack_require__(63), + Out: __webpack_require__(64), + InOut: __webpack_require__(65) }; /***/ }), -/* 54 */ +/* 63 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8773,12 +9270,12 @@ module.exports = In; /***/ }), -/* 55 */ +/* 64 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8816,12 +9313,12 @@ module.exports = Out; /***/ }), -/* 56 */ +/* 65 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8880,12 +9377,12 @@ module.exports = InOut; /***/ }), -/* 57 */ +/* 66 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8895,20 +9392,20 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(58), - Out: __webpack_require__(59), - InOut: __webpack_require__(60) + In: __webpack_require__(67), + Out: __webpack_require__(68), + InOut: __webpack_require__(69) }; /***/ }), -/* 58 */ +/* 67 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8931,12 +9428,12 @@ module.exports = In; /***/ }), -/* 59 */ +/* 68 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8959,12 +9456,12 @@ module.exports = Out; /***/ }), -/* 60 */ +/* 69 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8994,12 +9491,12 @@ module.exports = InOut; /***/ }), -/* 61 */ +/* 70 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9009,20 +9506,20 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(62), - Out: __webpack_require__(63), - InOut: __webpack_require__(64) + In: __webpack_require__(71), + Out: __webpack_require__(72), + InOut: __webpack_require__(73) }; /***/ }), -/* 62 */ +/* 71 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9045,12 +9542,12 @@ module.exports = In; /***/ }), -/* 63 */ +/* 72 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9073,12 +9570,12 @@ module.exports = Out; /***/ }), -/* 64 */ +/* 73 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9108,12 +9605,12 @@ module.exports = InOut; /***/ }), -/* 65 */ +/* 74 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9123,20 +9620,20 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(66), - Out: __webpack_require__(67), - InOut: __webpack_require__(68) + In: __webpack_require__(75), + Out: __webpack_require__(76), + InOut: __webpack_require__(77) }; /***/ }), -/* 66 */ +/* 75 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9186,12 +9683,12 @@ module.exports = In; /***/ }), -/* 67 */ +/* 76 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9241,12 +9738,12 @@ module.exports = Out; /***/ }), -/* 68 */ +/* 77 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9303,12 +9800,12 @@ module.exports = InOut; /***/ }), -/* 69 */ +/* 78 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9318,20 +9815,20 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(70), - Out: __webpack_require__(71), - InOut: __webpack_require__(72) + In: __webpack_require__(79), + Out: __webpack_require__(80), + InOut: __webpack_require__(81) }; /***/ }), -/* 70 */ +/* 79 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9354,12 +9851,12 @@ module.exports = In; /***/ }), -/* 71 */ +/* 80 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9382,12 +9879,12 @@ module.exports = Out; /***/ }), -/* 72 */ +/* 81 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9417,36 +9914,32 @@ module.exports = InOut; /***/ }), -/* 73 */ +/* 82 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -/** - * @namespace Phaser.Math.Easing.Linear - */ - -module.exports = __webpack_require__(74); +module.exports = __webpack_require__(83); /***/ }), -/* 74 */ +/* 83 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * Linear easing (no variation). * - * @function Phaser.Math.Easing.Linear.Linear + * @function Phaser.Math.Easing.Linear * @since 3.0.0 * * @param {number} v - The value to be tweened. @@ -9462,12 +9955,12 @@ module.exports = Linear; /***/ }), -/* 75 */ +/* 84 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9477,20 +9970,20 @@ module.exports = Linear; module.exports = { - In: __webpack_require__(76), - Out: __webpack_require__(77), - InOut: __webpack_require__(78) + In: __webpack_require__(85), + Out: __webpack_require__(86), + InOut: __webpack_require__(87) }; /***/ }), -/* 76 */ +/* 85 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9513,12 +10006,12 @@ module.exports = In; /***/ }), -/* 77 */ +/* 86 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9541,12 +10034,12 @@ module.exports = Out; /***/ }), -/* 78 */ +/* 87 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9576,12 +10069,12 @@ module.exports = InOut; /***/ }), -/* 79 */ +/* 88 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9591,20 +10084,20 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(80), - Out: __webpack_require__(81), - InOut: __webpack_require__(82) + In: __webpack_require__(89), + Out: __webpack_require__(90), + InOut: __webpack_require__(91) }; /***/ }), -/* 80 */ +/* 89 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9627,12 +10120,12 @@ module.exports = In; /***/ }), -/* 81 */ +/* 90 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9655,12 +10148,12 @@ module.exports = Out; /***/ }), -/* 82 */ +/* 91 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9690,12 +10183,12 @@ module.exports = InOut; /***/ }), -/* 83 */ +/* 92 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9705,20 +10198,20 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(84), - Out: __webpack_require__(85), - InOut: __webpack_require__(86) + In: __webpack_require__(93), + Out: __webpack_require__(94), + InOut: __webpack_require__(95) }; /***/ }), -/* 84 */ +/* 93 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9741,12 +10234,12 @@ module.exports = In; /***/ }), -/* 85 */ +/* 94 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9769,12 +10262,12 @@ module.exports = Out; /***/ }), -/* 86 */ +/* 95 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9804,12 +10297,12 @@ module.exports = InOut; /***/ }), -/* 87 */ +/* 96 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9819,20 +10312,20 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(88), - Out: __webpack_require__(89), - InOut: __webpack_require__(90) + In: __webpack_require__(97), + Out: __webpack_require__(98), + InOut: __webpack_require__(99) }; /***/ }), -/* 88 */ +/* 97 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9866,12 +10359,12 @@ module.exports = In; /***/ }), -/* 89 */ +/* 98 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9905,12 +10398,12 @@ module.exports = Out; /***/ }), -/* 90 */ +/* 99 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9944,12 +10437,12 @@ module.exports = InOut; /***/ }), -/* 91 */ +/* 100 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9957,23 +10450,23 @@ module.exports = InOut; * @namespace Phaser.Math.Easing.Stepped */ -module.exports = __webpack_require__(92); +module.exports = __webpack_require__(101); /***/ }), -/* 92 */ +/* 101 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * Stepped easing. * - * @function Phaser.Math.Easing.Stepped.Stepped + * @function Phaser.Math.Easing.Stepped * @since 3.0.0 * * @param {number} v - The value to be tweened. @@ -10003,12 +10496,12 @@ module.exports = Stepped; /***/ }), -/* 93 */ +/* 102 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10018,22 +10511,22 @@ module.exports = Stepped; module.exports = { - Ceil: __webpack_require__(94), - Equal: __webpack_require__(95), - Floor: __webpack_require__(96), - GreaterThan: __webpack_require__(97), - LessThan: __webpack_require__(98) + Ceil: __webpack_require__(103), + Equal: __webpack_require__(20), + Floor: __webpack_require__(104), + GreaterThan: __webpack_require__(105), + LessThan: __webpack_require__(106) }; /***/ }), -/* 94 */ +/* 103 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10059,46 +10552,12 @@ module.exports = Ceil; /***/ }), -/* 95 */ +/* 104 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Check whether the given values are fuzzily equal. - * - * Two numbers are fuzzily equal if their difference is less than `epsilon`. - * - * @function Phaser.Math.Fuzzy.Equal - * @since 3.0.0 - * - * @param {number} a - The first value. - * @param {number} b - The second value. - * @param {number} [epsilon=0.0001] - The epsilon. - * - * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`. - */ -var Equal = function (a, b, epsilon) -{ - if (epsilon === undefined) { epsilon = 0.0001; } - - return Math.abs(a - b) < epsilon; -}; - -module.exports = Equal; - - -/***/ }), -/* 96 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10124,12 +10583,12 @@ module.exports = Floor; /***/ }), -/* 97 */ +/* 105 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10158,12 +10617,12 @@ module.exports = GreaterThan; /***/ }), -/* 98 */ +/* 106 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10192,12 +10651,12 @@ module.exports = LessThan; /***/ }), -/* 99 */ +/* 107 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10207,28 +10666,28 @@ module.exports = LessThan; module.exports = { - Bezier: __webpack_require__(100), - CatmullRom: __webpack_require__(101), - CubicBezier: __webpack_require__(102), - Linear: __webpack_require__(103), - QuadraticBezier: __webpack_require__(104), - SmoothStep: __webpack_require__(105), - SmootherStep: __webpack_require__(106) + Bezier: __webpack_require__(108), + CatmullRom: __webpack_require__(109), + CubicBezier: __webpack_require__(110), + Linear: __webpack_require__(111), + QuadraticBezier: __webpack_require__(112), + SmoothStep: __webpack_require__(113), + SmootherStep: __webpack_require__(114) }; /***/ }), -/* 100 */ +/* 108 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bernstein = __webpack_require__(19); +var Bernstein = __webpack_require__(21); /** * A bezier interpolation method. @@ -10258,16 +10717,16 @@ module.exports = BezierInterpolation; /***/ }), -/* 101 */ +/* 109 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CatmullRom = __webpack_require__(21); +var CatmullRom = __webpack_require__(23); /** * A Catmull-Rom interpolation method. @@ -10315,12 +10774,12 @@ module.exports = CatmullRomInterpolation; /***/ }), -/* 102 */ +/* 110 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10385,16 +10844,16 @@ module.exports = CubicBezierInterpolation; /***/ }), -/* 103 */ +/* 111 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Linear = __webpack_require__(22); +var Linear = __webpack_require__(24); /** * A linear interpolation method. @@ -10432,12 +10891,12 @@ module.exports = LinearInterpolation; /***/ }), -/* 104 */ +/* 112 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10491,16 +10950,16 @@ module.exports = QuadraticBezierInterpolation; /***/ }), -/* 105 */ +/* 113 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmoothStep = __webpack_require__(23); +var SmoothStep = __webpack_require__(25); /** * A Smooth Step interpolation method. @@ -10524,16 +10983,16 @@ module.exports = SmoothStepInterpolation; /***/ }), -/* 106 */ +/* 114 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmootherStep = __webpack_require__(24); +var SmootherStep = __webpack_require__(26); /** * A Smoother Step interpolation method. @@ -10557,12 +11016,12 @@ module.exports = SmootherStepInterpolation; /***/ }), -/* 107 */ +/* 115 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10572,27 +11031,27 @@ module.exports = SmootherStepInterpolation; module.exports = { - GetNext: __webpack_require__(108), - IsSize: __webpack_require__(109), - IsValue: __webpack_require__(110) + GetNext: __webpack_require__(116), + IsSize: __webpack_require__(117), + IsValue: __webpack_require__(118) }; /***/ }), -/* 108 */ +/* 116 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * Returns the nearest power of 2 to the given `value`. * - * @function Phaser.Math.Pow2.GetPowerOfTwo + * @function Phaser.Math.Pow2.GetNext * @since 3.0.0 * * @param {number} value - The value. @@ -10610,12 +11069,12 @@ module.exports = GetPowerOfTwo; /***/ }), -/* 109 */ +/* 117 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10623,7 +11082,7 @@ module.exports = GetPowerOfTwo; * Checks if the given `width` and `height` are a power of two. * Useful for checking texture dimensions. * - * @function Phaser.Math.Pow2.IsSizePowerOfTwo + * @function Phaser.Math.Pow2.IsSize * @since 3.0.0 * * @param {number} width - The width. @@ -10640,19 +11099,19 @@ module.exports = IsSizePowerOfTwo; /***/ }), -/* 110 */ +/* 118 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * Tests the value and returns `true` if it is a power of two. * - * @function Phaser.Math.Pow2.IsValuePowerOfTwo + * @function Phaser.Math.Pow2.IsValue * @since 3.0.0 * * @param {number} value - The value to check if it's a power of two. @@ -10668,12 +11127,12 @@ module.exports = IsValuePowerOfTwo; /***/ }), -/* 111 */ +/* 119 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10683,20 +11142,20 @@ module.exports = IsValuePowerOfTwo; module.exports = { - Ceil: __webpack_require__(112), - Floor: __webpack_require__(113), - To: __webpack_require__(114) + Ceil: __webpack_require__(120), + Floor: __webpack_require__(121), + To: __webpack_require__(122) }; /***/ }), -/* 112 */ +/* 120 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10735,12 +11194,12 @@ module.exports = SnapCeil; /***/ }), -/* 113 */ +/* 121 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10779,12 +11238,12 @@ module.exports = SnapFloor; /***/ }), -/* 114 */ +/* 122 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10822,12 +11281,12 @@ module.exports = SnapTo; /***/ }), -/* 115 */ +/* 123 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11174,10 +11633,14 @@ var RandomDataGenerator = new Class({ * * @method Phaser.Math.RandomDataGenerator#pick * @since 3.0.0 + * + * @generic T + * @genericUse {T[]} - [array] + * @genericUse {T} - [$return] * - * @param {array} array - The array to pick a random element from. + * @param {T[]} array - The array to pick a random element from. * - * @return {*} A random member of the array. + * @return {T} A random member of the array. */ pick: function (array) { @@ -11203,9 +11666,13 @@ var RandomDataGenerator = new Class({ * @method Phaser.Math.RandomDataGenerator#weightedPick * @since 3.0.0 * - * @param {array} array - The array to pick a random element from. + * @generic T + * @genericUse {T[]} - [array] + * @genericUse {T} - [$return] * - * @return {*} A random member of the array. + * @param {T[]} array - The array to pick a random element from. + * + * @return {T} A random member of the array. */ weightedPick: function (array) { @@ -11295,9 +11762,12 @@ var RandomDataGenerator = new Class({ * @method Phaser.Math.RandomDataGenerator#shuffle * @since 3.7.0 * - * @param {array} [array] - The array to be shuffled. + * @generic T + * @genericUse {T[]} - [array,$return] * - * @return {array} The shuffled array. + * @param {T[]} [array] - The array to be shuffled. + * + * @return {T[]} The shuffled array. */ shuffle: function (array) { @@ -11321,12 +11791,12 @@ module.exports = RandomDataGenerator; /***/ }), -/* 116 */ +/* 124 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11356,12 +11826,12 @@ module.exports = Average; /***/ }), -/* 117 */ +/* 125 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11385,12 +11855,12 @@ module.exports = Between; /***/ }), -/* 118 */ +/* 126 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11422,12 +11892,12 @@ module.exports = CeilTo; /***/ }), -/* 119 */ +/* 127 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11451,41 +11921,12 @@ module.exports = Difference; /***/ }), -/* 120 */ +/* 128 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive. - * - * @function Phaser.Math.FloatBetween - * @since 3.0.0 - * - * @param {number} min - The lower bound for the float, inclusive. - * @param {number} max - The upper bound for the float exclusive. - * - * @return {number} A random float within the given range. - */ -var FloatBetween = function (min, max) -{ - return Math.random() * (max - min) + min; -}; - -module.exports = FloatBetween; - - -/***/ }), -/* 121 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11517,16 +11958,16 @@ module.exports = FloorTo; /***/ }), -/* 122 */ +/* 129 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(9); +var Clamp = __webpack_require__(10); /** * Return a value based on the range between `min` and `max` and the percentage given. @@ -11551,25 +11992,29 @@ module.exports = FromPercent; /***/ }), -/* 123 */ +/* 130 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * Calculate the speed required to cover a distance in the time given. + * Calculate a per-ms speed from a distance and time (given in seconds). * * @function Phaser.Math.GetSpeed * @since 3.0.0 * - * @param {number} distance - The distance to travel in pixels. - * @param {integer} time - The time, in ms, to cover the distance in. + * @param {number} distance - The distance. + * @param {integer} time - The time, in seconds. * - * @return {number} The amount you will need to increment the position by each step in order to cover the distance in the time given. + * @return {number} The speed, in distance per ms. + * + * @example + * // 400px over 1 second is 0.4 px/ms + * Phaser.Math.GetSpeed(400, 1) // -> 0.4 */ var GetSpeed = function (distance, time) { @@ -11580,12 +12025,12 @@ module.exports = GetSpeed; /***/ }), -/* 124 */ +/* 131 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11611,12 +12056,12 @@ module.exports = IsEven; /***/ }), -/* 125 */ +/* 132 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11640,12 +12085,12 @@ module.exports = IsEvenStrict; /***/ }), -/* 126 */ +/* 133 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11670,12 +12115,12 @@ module.exports = MaxAdd; /***/ }), -/* 127 */ +/* 134 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11700,12 +12145,12 @@ module.exports = MinSub; /***/ }), -/* 128 */ +/* 135 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11759,12 +12204,12 @@ module.exports = Percent; /***/ }), -/* 129 */ +/* 136 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11799,12 +12244,12 @@ module.exports = RandomXY; /***/ }), -/* 130 */ +/* 137 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11838,12 +12283,12 @@ module.exports = RandomXYZ; /***/ }), -/* 131 */ +/* 138 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11875,12 +12320,12 @@ module.exports = RandomXYZW; /***/ }), -/* 132 */ +/* 139 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11910,27 +12355,31 @@ module.exports = Rotate; /***/ }), -/* 133 */ +/* 140 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * Rotate a `point` around `x` and `y` by the given `angle`. + * Rotate a `point` around `x` and `y` to the given `angle`, at the same distance. + * + * In polar notation, this maps a point from (r, t) to (r, angle), vs. the origin (x, y). * * @function Phaser.Math.RotateAround * @since 3.0.0 * + * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return] + * * @param {(Phaser.Geom.Point|object)} point - The point to be rotated. * @param {number} x - The horizontal coordinate to rotate around. * @param {number} y - The vertical coordinate to rotate around. * @param {number} angle - The angle of rotation in radians. * - * @return {Phaser.Geom.Point} The given point, rotated by the given angle around the given coordinates. + * @return {Phaser.Types.Math.Vector2Like} The given point. */ var RotateAround = function (point, x, y, angle) { @@ -11950,28 +12399,32 @@ module.exports = RotateAround; /***/ }), -/* 134 */ +/* 141 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * Rotate a `point` around `x` and `y` by the given `angle` and `distance`. * + * In polar notation, this maps a point from (r, t) to (distance, t + angle), vs. the origin (x, y). + * * @function Phaser.Math.RotateAroundDistance * @since 3.0.0 * + * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return] + * * @param {(Phaser.Geom.Point|object)} point - The point to be rotated. * @param {number} x - The horizontal coordinate to rotate around. * @param {number} y - The vertical coordinate to rotate around. * @param {number} angle - The angle of rotation in radians. * @param {number} distance - The distance from (x, y) to place the point at. * - * @return {Phaser.Geom.Point} The given point. + * @return {Phaser.Types.Math.Vector2Like} The given point. */ var RotateAroundDistance = function (point, x, y, angle, distance) { @@ -11987,12 +12440,49 @@ module.exports = RotateAroundDistance; /***/ }), -/* 135 */ +/* 142 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Position a `point` at the given `angle` and `distance` to (`x`, `y`). + * + * @function Phaser.Math.RotateTo + * @since 3.24.0 + * + * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return] + * + * @param {Phaser.Types.Math.Vector2Like} point - The point to be positioned. + * @param {number} x - The horizontal coordinate to position from. + * @param {number} y - The vertical coordinate to position from. + * @param {number} angle - The angle of rotation in radians. + * @param {number} distance - The distance from (x, y) to place the point at. + * + * @return {Phaser.Types.Math.Vector2Like} The given point. + */ +var RotateTo = function (point, x, y, angle, distance) +{ + point.x = x + (distance * Math.cos(angle)); + point.y = y + (distance * Math.sin(angle)); + + return point; +}; + +module.exports = RotateTo; + + +/***/ }), +/* 143 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12016,12 +12506,12 @@ module.exports = RoundAwayFromZero; /***/ }), -/* 136 */ +/* 144 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12068,12 +12558,12 @@ module.exports = RoundTo; /***/ }), -/* 137 */ +/* 145 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12121,23 +12611,23 @@ module.exports = SinCosTableGenerator; /***/ }), -/* 138 */ +/* 146 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector2 = __webpack_require__(7); +var Vector2 = __webpack_require__(4); /** - * Returns a Vec2 containing the x and y position of the given index in a `width` x `height` sized grid. + * Returns a Vector2 containing the x and y position of the given index in a `width` x `height` sized grid. * * For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2. * - * If the given index is out of range an empty Vec2 is returned. + * If the given index is out of range an empty Vector2 is returned. * * @function Phaser.Math.ToXY * @since 3.19.0 @@ -12179,67 +12669,12 @@ module.exports = ToXY; /***/ }), -/* 139 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Vector2 = __webpack_require__(7); - -/** - * Takes the `x` and `y` coordinates and transforms them into the same space as - * defined by the position, rotation and scale values. - * - * @function Phaser.Math.TransformXY - * @since 3.0.0 - * - * @param {number} x - The x coordinate to be transformed. - * @param {number} y - The y coordinate to be transformed. - * @param {number} positionX - Horizontal position of the transform point. - * @param {number} positionY - Vertical position of the transform point. - * @param {number} rotation - Rotation of the transform point, in radians. - * @param {number} scaleX - Horizontal scale of the transform point. - * @param {number} scaleY - Vertical scale of the transform point. - * @param {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} [output] - The output vector, point or object for the translated coordinates. - * - * @return {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} The translated point. - */ -var TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output) -{ - if (output === undefined) { output = new Vector2(); } - - var radianSin = Math.sin(rotation); - var radianCos = Math.cos(rotation); - - // Rotate and Scale - var a = radianCos * scaleX; - var b = radianSin * scaleX; - var c = -radianSin * scaleY; - var d = radianCos * scaleY; - - // Invert - var id = 1 / ((a * d) + (c * -b)); - - output.x = (d * id * x) + (-c * id * y) + (((positionY * c) - (positionX * d)) * id); - output.y = (a * id * y) + (-b * id * x) + (((-positionY * a) + (positionX * b)) * id); - - return output; -}; - -module.exports = TransformXY; - - -/***/ }), -/* 140 */ +/* 147 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12264,12 +12699,12 @@ module.exports = Within; /***/ }), -/* 141 */ +/* 148 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12809,18 +13244,18 @@ module.exports = Vector4; /***/ }), -/* 142 */ +/* 149 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector3 = __webpack_require__(10); -var Matrix4 = __webpack_require__(27); -var Quaternion = __webpack_require__(28); +var Vector3 = __webpack_require__(11); +var Matrix4 = __webpack_require__(30); +var Quaternion = __webpack_require__(31); var tmpMat4 = new Matrix4(); var tmpQuat = new Quaternion(); @@ -12857,12 +13292,12 @@ module.exports = RotateVec3; /***/ }), -/* 143 */ +/* 150 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12888,18 +13323,18 @@ module.exports = 'resize'; /***/ }), -/* 144 */ +/* 151 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey -* @copyright 2019 Photon Storm Ltd. +* @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ -var BasePlugin = __webpack_require__(145); +var BasePlugin = __webpack_require__(152); var Class = __webpack_require__(0); -var SceneEvents = __webpack_require__(146); +var SceneEvents = __webpack_require__(153); /** * @classdesc @@ -13016,12 +13451,12 @@ module.exports = ScenePlugin; /***/ }), -/* 145 */ +/* 152 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey -* @copyright 2019 Photon Storm Ltd. +* @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ @@ -13146,12 +13581,12 @@ module.exports = BasePlugin; /***/ }), -/* 146 */ +/* 153 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13161,36 +13596,64 @@ module.exports = BasePlugin; module.exports = { - BOOT: __webpack_require__(147), - CREATE: __webpack_require__(148), - DESTROY: __webpack_require__(149), - PAUSE: __webpack_require__(150), - POST_UPDATE: __webpack_require__(151), - PRE_UPDATE: __webpack_require__(152), - READY: __webpack_require__(153), - RENDER: __webpack_require__(154), - RESUME: __webpack_require__(155), - SHUTDOWN: __webpack_require__(156), - SLEEP: __webpack_require__(157), - START: __webpack_require__(158), - TRANSITION_COMPLETE: __webpack_require__(159), - TRANSITION_INIT: __webpack_require__(160), - TRANSITION_OUT: __webpack_require__(161), - TRANSITION_START: __webpack_require__(162), - TRANSITION_WAKE: __webpack_require__(163), - UPDATE: __webpack_require__(164), - WAKE: __webpack_require__(165) + ADDED_TO_SCENE: __webpack_require__(154), + BOOT: __webpack_require__(155), + CREATE: __webpack_require__(156), + DESTROY: __webpack_require__(157), + PAUSE: __webpack_require__(158), + POST_UPDATE: __webpack_require__(159), + PRE_UPDATE: __webpack_require__(160), + READY: __webpack_require__(161), + REMOVED_FROM_SCENE: __webpack_require__(162), + RENDER: __webpack_require__(163), + RESUME: __webpack_require__(164), + SHUTDOWN: __webpack_require__(165), + SLEEP: __webpack_require__(166), + START: __webpack_require__(167), + TRANSITION_COMPLETE: __webpack_require__(168), + TRANSITION_INIT: __webpack_require__(169), + TRANSITION_OUT: __webpack_require__(170), + TRANSITION_START: __webpack_require__(171), + TRANSITION_WAKE: __webpack_require__(172), + UPDATE: __webpack_require__(173), + WAKE: __webpack_require__(174) }; /***/ }), -/* 147 */ +/* 154 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Object Added to Scene Event. + * + * This event is dispatched when a Game Object is added to a Scene. + * + * Listen for it from a Scene using `this.scene.events.on('addedtoscene', listener)`. + * + * @event Phaser.Scenes.Events#ADDED_TO_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene. + * @param {Phaser.Scene} scene - The Scene to which the Game Object was added. + */ +module.exports = 'addedtoscene'; + + +/***/ }), +/* 155 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13210,12 +13673,12 @@ module.exports = 'boot'; /***/ }), -/* 148 */ +/* 156 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13239,12 +13702,12 @@ module.exports = 'create'; /***/ }), -/* 149 */ +/* 157 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13266,12 +13729,12 @@ module.exports = 'destroy'; /***/ }), -/* 150 */ +/* 158 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13293,12 +13756,12 @@ module.exports = 'pause'; /***/ }), -/* 151 */ +/* 159 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13330,12 +13793,12 @@ module.exports = 'postupdate'; /***/ }), -/* 152 */ +/* 160 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13367,12 +13830,12 @@ module.exports = 'preupdate'; /***/ }), -/* 153 */ +/* 161 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13395,12 +13858,38 @@ module.exports = 'ready'; /***/ }), -/* 154 */ +/* 162 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Object Removed from Scene Event. + * + * This event is dispatched when a Game Object is removed from a Scene. + * + * Listen for it from a Scene using `this.scene.events.on('removedfromscene', listener)`. + * + * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene. + * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed. + */ +module.exports = 'removedfromscene'; + + +/***/ }), +/* 163 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13431,12 +13920,12 @@ module.exports = 'render'; /***/ }), -/* 155 */ +/* 164 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13458,12 +13947,12 @@ module.exports = 'resume'; /***/ }), -/* 156 */ +/* 165 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13488,12 +13977,12 @@ module.exports = 'shutdown'; /***/ }), -/* 157 */ +/* 166 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13515,12 +14004,12 @@ module.exports = 'sleep'; /***/ }), -/* 158 */ +/* 167 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13540,12 +14029,12 @@ module.exports = 'start'; /***/ }), -/* 159 */ +/* 168 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13576,12 +14065,12 @@ module.exports = 'transitioncomplete'; /***/ }), -/* 160 */ +/* 169 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13613,12 +14102,12 @@ module.exports = 'transitioninit'; /***/ }), -/* 161 */ +/* 170 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13647,12 +14136,12 @@ module.exports = 'transitionout'; /***/ }), -/* 162 */ +/* 171 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13687,12 +14176,12 @@ module.exports = 'transitionstart'; /***/ }), -/* 163 */ +/* 172 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13722,12 +14211,12 @@ module.exports = 'transitionwake'; /***/ }), -/* 164 */ +/* 173 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13759,12 +14248,12 @@ module.exports = 'update'; /***/ }), -/* 165 */ +/* 174 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13786,17 +14275,17 @@ module.exports = 'wake'; /***/ }), -/* 166 */ +/* 175 */ /***/ (function(module, exports) { /*** IMPORTS FROM imports-loader ***/ -(function() { +(function() { var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { @@ -14469,17 +14958,15 @@ var spine; var slot = skeleton.slots[this.slotIndex]; if (!slot.bone.active) return; - if (direction == MixDirection.mixOut && blend == MixBlend.setup) { - var attachmentName_1 = slot.data.attachmentName; - slot.setAttachment(attachmentName_1 == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName_1)); + if (direction == MixDirection.mixOut) { + if (blend == MixBlend.setup) + this.setAttachment(skeleton, slot, slot.data.attachmentName); return; } var frames = this.frames; if (time < frames[0]) { - if (blend == MixBlend.setup || blend == MixBlend.first) { - var attachmentName_2 = slot.data.attachmentName; - slot.setAttachment(attachmentName_2 == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName_2)); - } + if (blend == MixBlend.setup || blend == MixBlend.first) + this.setAttachment(skeleton, slot, slot.data.attachmentName); return; } var frameIndex = 0; @@ -14491,6 +14978,9 @@ var spine; skeleton.slots[this.slotIndex] .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName)); }; + AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) { + slot.attachment = attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName); + }; return AttachmentTimeline; }()); spine.AttachmentTimeline = AttachmentTimeline; @@ -14592,6 +15082,7 @@ var spine; case MixBlend.replace: for (var i_5 = 0; i_5 < vertexCount; i_5++) deform[i_5] += (lastVertices[i_5] - deform[i_5]) * alpha; + break; case MixBlend.add: var vertexAttachment = slotAttachment; if (vertexAttachment.bones == null) { @@ -14748,8 +15239,9 @@ var spine; DrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) { var drawOrder = skeleton.drawOrder; var slots = skeleton.slots; - if (direction == MixDirection.mixOut && blend == MixBlend.setup) { - spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length); + if (direction == MixDirection.mixOut) { + if (blend == MixBlend.setup) + spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length); return; } var frames = this.frames; @@ -15141,6 +15633,7 @@ var spine; function AnimationState(data) { this.tracks = new Array(); this.timeScale = 1; + this.unkeyedState = 0; this.events = new Array(); this.listeners = new Array(); this.queue = new EventQueue(this); @@ -15230,12 +15723,12 @@ var spine; var events = this.events; var tracks = this.tracks; var applied = false; - for (var i = 0, n = tracks.length; i < n; i++) { - var current = tracks[i]; + for (var i_16 = 0, n_1 = tracks.length; i_16 < n_1; i_16++) { + var current = tracks[i_16]; if (current == null || current.delay > 0) continue; applied = true; - var blend = i == 0 ? spine.MixBlend.first : current.mixBlend; + var blend = i_16 == 0 ? spine.MixBlend.first : current.mixBlend; var mix = current.alpha; if (current.mixingFrom != null) mix *= this.applyMixingFrom(current, skeleton, blend); @@ -15244,10 +15737,14 @@ var spine; var animationLast = current.animationLast, animationTime = current.getAnimationTime(); var timelineCount = current.animation.timelines.length; var timelines = current.animation.timelines; - if ((i == 0 && mix == 1) || blend == spine.MixBlend.add) { + if ((i_16 == 0 && mix == 1) || blend == spine.MixBlend.add) { for (var ii = 0; ii < timelineCount; ii++) { spine.Utils.webkit602BugfixHelper(mix, blend); - timelines[ii].apply(skeleton, animationLast, animationTime, events, mix, blend, spine.MixDirection.mixIn); + var timeline = timelines[ii]; + if (timeline instanceof spine.AttachmentTimeline) + this.applyAttachmentTimeline(timeline, skeleton, animationTime, blend, true); + else + timeline.apply(skeleton, animationLast, animationTime, events, mix, blend, spine.MixDirection.mixIn); } } else { @@ -15257,14 +15754,17 @@ var spine; spine.Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null); var timelinesRotation = current.timelinesRotation; for (var ii = 0; ii < timelineCount; ii++) { - var timeline = timelines[ii]; - var timelineBlend = (timelineMode[ii] & (AnimationState.NOT_LAST - 1)) == AnimationState.SUBSEQUENT ? blend : spine.MixBlend.setup; - if (timeline instanceof spine.RotateTimeline) { - this.applyRotateTimeline(timeline, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame); + var timeline_1 = timelines[ii]; + var timelineBlend = timelineMode[ii] == AnimationState.SUBSEQUENT ? blend : spine.MixBlend.setup; + if (timeline_1 instanceof spine.RotateTimeline) { + this.applyRotateTimeline(timeline_1, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame); + } + else if (timeline_1 instanceof spine.AttachmentTimeline) { + this.applyAttachmentTimeline(timeline_1, skeleton, animationTime, blend, true); } else { spine.Utils.webkit602BugfixHelper(mix, blend); - timeline.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, spine.MixDirection.mixIn); + timeline_1.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, spine.MixDirection.mixIn); } } } @@ -15273,6 +15773,16 @@ var spine; current.nextAnimationLast = animationTime; current.nextTrackLast = current.trackTime; } + var setupState = this.unkeyedState + AnimationState.SETUP; + var slots = skeleton.slots; + for (var i = 0, n = skeleton.slots.length; i < n; i++) { + var slot = slots[i]; + if (slot.attachmentState == setupState) { + var attachmentName = slot.data.attachmentName; + slot.attachment = (attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName)); + } + } + this.unkeyedState += 2; this.queue.drain(); return applied; }; @@ -15316,23 +15826,22 @@ var spine; var direction = spine.MixDirection.mixOut; var timelineBlend = void 0; var alpha = 0; - switch (timelineMode[i] & (AnimationState.NOT_LAST - 1)) { + switch (timelineMode[i]) { case AnimationState.SUBSEQUENT: - timelineBlend = blend; - if (!attachments && timeline instanceof spine.AttachmentTimeline) { - if ((timelineMode[i] & AnimationState.NOT_LAST) == AnimationState.NOT_LAST) - continue; - timelineBlend = spine.MixBlend.setup; - } if (!drawOrder && timeline instanceof spine.DrawOrderTimeline) continue; + timelineBlend = blend; alpha = alphaMix; break; case AnimationState.FIRST: timelineBlend = spine.MixBlend.setup; alpha = alphaMix; break; - case AnimationState.HOLD: + case AnimationState.HOLD_SUBSEQUENT: + timelineBlend = blend; + alpha = alphaHold; + break; + case AnimationState.HOLD_FIRST: timelineBlend = spine.MixBlend.setup; alpha = alphaHold; break; @@ -15345,18 +15854,12 @@ var spine; from.totalAlpha += alpha; if (timeline instanceof spine.RotateTimeline) this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame); + else if (timeline instanceof spine.AttachmentTimeline) + this.applyAttachmentTimeline(timeline, skeleton, animationTime, timelineBlend, attachments); else { spine.Utils.webkit602BugfixHelper(alpha, blend); - if (timelineBlend == spine.MixBlend.setup) { - if (timeline instanceof spine.AttachmentTimeline) { - if (attachments || (timelineMode[i] & AnimationState.NOT_LAST) == AnimationState.NOT_LAST) - direction = spine.MixDirection.mixIn; - } - else if (timeline instanceof spine.DrawOrderTimeline) { - if (drawOrder) - direction = spine.MixDirection.mixIn; - } - } + if (drawOrder && timeline instanceof spine.DrawOrderTimeline && timelineBlend == spine.MixBlend.setup) + direction = spine.MixDirection.mixIn; timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, direction); } } @@ -15368,6 +15871,31 @@ var spine; from.nextTrackLast = from.trackTime; return mix; }; + AnimationState.prototype.applyAttachmentTimeline = function (timeline, skeleton, time, blend, attachments) { + var slot = skeleton.slots[timeline.slotIndex]; + if (!slot.bone.active) + return; + var frames = timeline.frames; + if (time < frames[0]) { + if (blend == spine.MixBlend.setup || blend == spine.MixBlend.first) + this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments); + } + else { + var frameIndex; + if (time >= frames[frames.length - 1]) + frameIndex = frames.length - 1; + else + frameIndex = spine.Animation.binarySearch(frames, time) - 1; + this.setAttachment(skeleton, slot, timeline.attachmentNames[frameIndex], attachments); + } + if (slot.attachmentState <= this.unkeyedState) + slot.attachmentState = this.unkeyedState + AnimationState.SETUP; + }; + AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) { + slot.attachment = attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName); + if (attachments) + slot.attachmentState = this.unkeyedState + AnimationState.CURRENT; + }; AnimationState.prototype.applyRotateTimeline = function (timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) { if (firstFrame) timelinesRotation[i] = 0; @@ -15630,6 +16158,7 @@ var spine; entry.interruptAlpha = 1; entry.mixTime = 0; entry.mixDuration = last == null ? 0 : this.data.getMix(last.animation, animation); + entry.mixBlend = spine.MixBlend.replace; return entry; }; AnimationState.prototype.disposeNext = function (entry) { @@ -15655,14 +16184,6 @@ var spine; entry = entry.mixingTo; } while (entry != null); } - this.propertyIDs.clear(); - for (var i = this.tracks.length - 1; i >= 0; i--) { - var entry = this.tracks[i]; - while (entry != null) { - this.computeNotLast(entry); - entry = entry.mixingFrom; - } - } }; AnimationState.prototype.computeHold = function (entry) { var to = entry.mixingTo; @@ -15674,8 +16195,7 @@ var spine; var propertyIDs = this.propertyIDs; if (to != null && to.holdPrevious) { for (var i = 0; i < timelinesCount; i++) { - propertyIDs.add(timelines[i].getPropertyId()); - timelineMode[i] = AnimationState.HOLD; + timelineMode[i] = propertyIDs.add(timelines[i].getPropertyId()) ? AnimationState.HOLD_FIRST : AnimationState.HOLD_SUBSEQUENT; } return; } @@ -15699,20 +16219,7 @@ var spine; } break; } - timelineMode[i] = AnimationState.HOLD; - } - } - }; - AnimationState.prototype.computeNotLast = function (entry) { - var timelines = entry.animation.timelines; - var timelinesCount = entry.animation.timelines.length; - var timelineMode = entry.timelineMode; - var propertyIDs = this.propertyIDs; - for (var i = 0; i < timelinesCount; i++) { - if (timelines[i] instanceof spine.AttachmentTimeline) { - var timeline = timelines[i]; - if (!propertyIDs.add(timeline.slotIndex)) - timelineMode[i] |= AnimationState.NOT_LAST; + timelineMode[i] = AnimationState.HOLD_FIRST; } } }; @@ -15740,9 +16247,11 @@ var spine; AnimationState.emptyAnimation = new spine.Animation("", [], 0); AnimationState.SUBSEQUENT = 0; AnimationState.FIRST = 1; - AnimationState.HOLD = 2; - AnimationState.HOLD_MIX = 3; - AnimationState.NOT_LAST = 4; + AnimationState.HOLD_SUBSEQUENT = 2; + AnimationState.HOLD_FIRST = 3; + AnimationState.HOLD_MIX = 4; + AnimationState.SETUP = 1; + AnimationState.CURRENT = 2; return AnimationState; }()); spine.AnimationState = AnimationState; @@ -15955,11 +16464,15 @@ var spine; this.errors = {}; this.toLoad = 0; this.loaded = 0; + this.rawDataUris = {}; this.textureLoader = textureLoader; this.pathPrefix = pathPrefix; } - AssetManager.downloadText = function (url, success, error) { + AssetManager.prototype.downloadText = function (url, success, error) { var request = new XMLHttpRequest(); + request.overrideMimeType("text/html"); + if (this.rawDataUris[url]) + url = this.rawDataUris[url]; request.open("GET", url, true); request.onload = function () { if (request.status == 200) { @@ -15974,8 +16487,10 @@ var spine; }; request.send(); }; - AssetManager.downloadBinary = function (url, success, error) { + AssetManager.prototype.downloadBinary = function (url, success, error) { var request = new XMLHttpRequest(); + if (this.rawDataUris[url]) + url = this.rawDataUris[url]; request.open("GET", url, true); request.responseType = "arraybuffer"; request.onload = function () { @@ -15991,13 +16506,16 @@ var spine; }; request.send(); }; + AssetManager.prototype.setRawDataURI = function (path, data) { + this.rawDataUris[this.pathPrefix + path] = data; + }; AssetManager.prototype.loadBinary = function (path, success, error) { var _this = this; if (success === void 0) { success = null; } if (error === void 0) { error = null; } path = this.pathPrefix + path; this.toLoad++; - AssetManager.downloadBinary(path, function (data) { + this.downloadBinary(path, function (data) { _this.assets[path] = data; if (success) success(path, data); @@ -16017,7 +16535,7 @@ var spine; if (error === void 0) { error = null; } path = this.pathPrefix + path; this.toLoad++; - AssetManager.downloadText(path, function (data) { + this.downloadText(path, function (data) { _this.assets[path] = data; if (success) success(path, data); @@ -16036,12 +16554,13 @@ var spine; if (success === void 0) { success = null; } if (error === void 0) { error = null; } path = this.pathPrefix + path; + var storagePath = path; this.toLoad++; var img = new Image(); img.crossOrigin = "anonymous"; img.onload = function (ev) { var texture = _this.textureLoader(img); - _this.assets[path] = texture; + _this.assets[storagePath] = texture; _this.toLoad--; _this.loaded++; if (success) @@ -16054,32 +16573,10 @@ var spine; if (error) error(path, "Couldn't load image " + path); }; + if (this.rawDataUris[path]) + path = this.rawDataUris[path]; img.src = path; }; - AssetManager.prototype.loadTextureData = function (path, data, success, error) { - var _this = this; - if (success === void 0) { success = null; } - if (error === void 0) { error = null; } - path = this.pathPrefix + path; - this.toLoad++; - var img = new Image(); - img.onload = function (ev) { - var texture = _this.textureLoader(img); - _this.assets[path] = texture; - _this.toLoad--; - _this.loaded++; - if (success) - success(path, img); - }; - img.onerror = function (ev) { - _this.errors[path] = "Couldn't load image " + path; - _this.toLoad--; - _this.loaded++; - if (error) - error(path, "Couldn't load image " + path); - }; - img.src = data; - }; AssetManager.prototype.loadTextureAtlas = function (path, success, error) { var _this = this; if (success === void 0) { success = null; } @@ -16087,12 +16584,12 @@ var spine; var parent = path.lastIndexOf("/") >= 0 ? path.substring(0, path.lastIndexOf("/")) : ""; path = this.pathPrefix + path; this.toLoad++; - AssetManager.downloadText(path, function (atlasData) { + this.downloadText(path, function (atlasData) { var pagesLoaded = { count: 0 }; var atlasPages = new Array(); try { var atlas = new spine.TextureAtlas(atlasData, function (path) { - atlasPages.push(parent + "/" + path); + atlasPages.push(parent == "" ? path : parent + "/" + path); var image = document.createElement("img"); image.width = 16; image.height = 16; @@ -16116,7 +16613,7 @@ var spine; if (!pageLoadError) { try { var atlas = new spine.TextureAtlas(atlasData, function (path) { - return _this.get(parent + "/" + path); + return _this.get(parent == "" ? path : parent + "/" + path); }); _this.assets[path] = atlas; if (success) @@ -16354,6 +16851,8 @@ var spine; var prx = 0; if (s > 0.0001) { s = Math.abs(pa * pd - pb * pc) / s; + pa /= this.skeleton.scaleX; + pc /= this.skeleton.scaleY; pb = pc * s; pd = pa * s; prx = Math.atan2(pc, pa) * spine.MathUtils.radDeg; @@ -16624,10 +17123,27 @@ var spine; if (!bone.appliedValid) bone.updateAppliedTransform(); var p = bone.parent; - var id = 1 / (p.a * p.d - p.b * p.c); - var x = targetX - p.worldX, y = targetY - p.worldY; - var tx = (x * p.d - y * p.b) * id - bone.ax, ty = (y * p.a - x * p.c) * id - bone.ay; - var rotationIK = Math.atan2(ty, tx) * spine.MathUtils.radDeg - bone.ashearX - bone.arotation; + var pa = p.a, pb = p.b, pc = p.c, pd = p.d; + var rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0; + switch (bone.data.transformMode) { + case spine.TransformMode.OnlyTranslation: + tx = targetX - bone.worldX; + ty = targetY - bone.worldY; + break; + case spine.TransformMode.NoRotationOrReflection: + var s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc); + var sa = pa / bone.skeleton.scaleX; + var sc = pc / bone.skeleton.scaleY; + pb = -sc * s * bone.skeleton.scaleX; + pd = sa * s * bone.skeleton.scaleY; + rotationIK += Math.atan2(sc, sa) * spine.MathUtils.radDeg; + default: + var x = targetX - p.worldX, y = targetY - p.worldY; + var d = pa * pd - pb * pc; + tx = (x * pd - y * pb) / d - bone.ax; + ty = (y * pa - x * pc) / d - bone.ay; + } + rotationIK += Math.atan2(ty, tx) * spine.MathUtils.radDeg; if (bone.ascaleX < 0) rotationIK += 180; if (rotationIK > 180) @@ -16636,6 +17152,12 @@ var spine; rotationIK += 360; var sx = bone.ascaleX, sy = bone.ascaleY; if (compress || stretch) { + switch (bone.data.transformMode) { + case spine.TransformMode.NoScale: + case spine.TransformMode.NoScaleOrReflection: + tx = targetX - bone.worldX; + ty = targetY - bone.worldY; + } var b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty); if ((compress && dd < b) || (stretch && dd > b) && b > 0.0001) { var s = (dd / b - 1) * alpha + 1; @@ -17294,6 +17816,7 @@ var spine; if (!this.queueAsset(clientId, null, path)) return; var request = new XMLHttpRequest(); + request.overrideMimeType("text/html"); request.onreadystatechange = function () { if (request.readyState == XMLHttpRequest.DONE) { if (request.status >= 200 && request.status < 300) { @@ -17313,6 +17836,7 @@ var spine; if (!this.queueAsset(clientId, null, path)) return; var request = new XMLHttpRequest(); + request.overrideMimeType("text/html"); request.onreadystatechange = function () { if (request.readyState == XMLHttpRequest.DONE) { if (request.status >= 200 && request.status < 300) { @@ -17332,7 +17856,6 @@ var spine; if (!this.queueAsset(clientId, textureLoader, path)) return; var img = new Image(); - img.src = path; img.crossOrigin = "anonymous"; img.onload = function (ev) { _this.rawAssets[path] = img; @@ -17340,6 +17863,7 @@ var spine; img.onerror = function (ev) { _this.errors[path] = "Couldn't load image " + path; }; + img.src = path; }; SharedAssetManager.prototype.get = function (clientId, path) { path = this.pathPrefix + path; @@ -17865,6 +18389,8 @@ var spine; var input = new BinaryInput(binary); skeletonData.hash = input.readString(); skeletonData.version = input.readString(); + if ("3.8.75" == skeletonData.version) + throw new Error("Unsupported skeleton data, please export with a newer version of Spine."); skeletonData.x = input.readFloat(); skeletonData.y = input.readFloat(); skeletonData.width = input.readFloat(); @@ -18853,7 +19379,7 @@ var spine; var clippingPolygon = this.clippingPolygon; SkeletonClipping.makeClockwise(clippingPolygon); var clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon)); - for (var i = 0, n_1 = clippingPolygons.length; i < n_1; i++) { + for (var i = 0, n_2 = clippingPolygons.length; i < n_2; i++) { var polygon = clippingPolygons[i]; SkeletonClipping.makeClockwise(polygon); polygon.push(polygon[0]); @@ -19275,6 +19801,8 @@ var spine; if (skeletonMap != null) { skeletonData.hash = skeletonMap.hash; skeletonData.version = skeletonMap.spine; + if ("3.8.75" == skeletonData.version) + throw new Error("Unsupported skeleton data, please export with a newer version of Spine."); skeletonData.x = skeletonMap.x; skeletonData.y = skeletonMap.y; skeletonData.width = skeletonMap.width; @@ -19952,7 +20480,7 @@ var spine; skeletonData.animations.push(new spine.Animation(name, timelines, duration)); }; SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) { - if (!map.curve) + if (!map.hasOwnProperty("curve")) return; if (map.curve == "stepped") timeline.setStepped(frameIndex); @@ -21267,9 +21795,7 @@ var spine; }; Pool.prototype.freeAll = function (items) { for (var i = 0; i < items.length; i++) { - if (items[i].reset) - items[i].reset(); - this.items[i] = items[i]; + this.free(items[i]); } }; Pool.prototype.clear = function () { @@ -21811,7 +22337,7 @@ var spine; worldVertices[offset + 1] = offsetX * c + offsetY * d + y; }; RegionAttachment.prototype.copy = function () { - var copy = new RegionAttachment(name); + var copy = new RegionAttachment(this.name); copy.region = this.region; copy.rendererObject = this.rendererObject; copy.path = this.path; @@ -22315,6 +22841,8 @@ var spine; this.texture = this.context.gl.createTexture(); } this.bind(); + if (GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL) + gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false); gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this._image); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, useMipMaps ? gl.LINEAR_MIPMAP_LINEAR : gl.LINEAR); @@ -22344,6 +22872,7 @@ var spine; var gl = this.context.gl; gl.deleteTexture(this.texture); }; + GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL = false; return GLTexture; }(spine.Texture)); webgl.GLTexture = GLTexture; @@ -24073,11 +24602,11 @@ var spine; var nn = clip.worldVerticesLength; var world = this.temp = spine.Utils.setArraySize(this.temp, nn, 0); clip.computeWorldVertices(slot, 0, nn, world, 0, 2); - for (var i_16 = 0, n_2 = world.length; i_16 < n_2; i_16 += 2) { - var x = world[i_16]; - var y = world[i_16 + 1]; - var x2 = world[(i_16 + 2) % world.length]; - var y2 = world[(i_16 + 3) % world.length]; + for (var i_17 = 0, n_3 = world.length; i_17 < n_3; i_17 += 2) { + var x = world[i_17]; + var y = world[i_17 + 1]; + var x2 = world[(i_17 + 2) % world.length]; + var y2 = world[(i_17 + 3) % world.length]; shapes.line(x, y, x2, y2); } } @@ -24238,7 +24767,7 @@ var spine; var vertexEffect = this.vertexEffect; var verts = clippedVertices; if (!twoColorTint) { - for (var v = 0, n_3 = clippedVertices.length; v < n_3; v += vertexSize) { + for (var v = 0, n_4 = clippedVertices.length; v < n_4; v += vertexSize) { tempPos.x = verts[v]; tempPos.y = verts[v + 1]; tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]); @@ -24257,7 +24786,7 @@ var spine; } } else { - for (var v = 0, n_4 = clippedVertices.length; v < n_4; v += vertexSize) { + for (var v = 0, n_5 = clippedVertices.length; v < n_5; v += vertexSize) { tempPos.x = verts[v]; tempPos.y = verts[v + 1]; tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]); @@ -24287,7 +24816,7 @@ var spine; if (this.vertexEffect != null) { var vertexEffect = this.vertexEffect; if (!twoColorTint) { - for (var v = 0, u = 0, n_5 = renderable.numFloats; v < n_5; v += vertexSize, u += 2) { + for (var v = 0, u = 0, n_6 = renderable.numFloats; v < n_6; v += vertexSize, u += 2) { tempPos.x = verts[v]; tempPos.y = verts[v + 1]; tempUv.x = uvs[u]; @@ -24306,7 +24835,7 @@ var spine; } } else { - for (var v = 0, u = 0, n_6 = renderable.numFloats; v < n_6; v += vertexSize, u += 2) { + for (var v = 0, u = 0, n_7 = renderable.numFloats; v < n_7; v += vertexSize, u += 2) { tempPos.x = verts[v]; tempPos.y = verts[v + 1]; tempUv.x = uvs[u]; @@ -24331,7 +24860,7 @@ var spine; } else { if (!twoColorTint) { - for (var v = 2, u = 0, n_7 = renderable.numFloats; v < n_7; v += vertexSize, u += 2) { + for (var v = 2, u = 0, n_8 = renderable.numFloats; v < n_8; v += vertexSize, u += 2) { verts[v] = finalColor.r; verts[v + 1] = finalColor.g; verts[v + 2] = finalColor.b; @@ -24341,7 +24870,7 @@ var spine; } } else { - for (var v = 2, u = 0, n_8 = renderable.numFloats; v < n_8; v += vertexSize, u += 2) { + for (var v = 2, u = 0, n_9 = renderable.numFloats; v < n_9; v += vertexSize, u += 2) { verts[v] = finalColor.r; verts[v + 1] = finalColor.g; verts[v + 2] = finalColor.b; @@ -24532,13 +25061,14 @@ var spine; })(webgl = spine.webgl || (spine.webgl = {})); })(spine || (spine = {})); //# sourceMappingURL=spine-both.js.map - /*** EXPORTS FROM exports-loader ***/ module.exports = spine; + }.call(window)); + /***/ }), -/* 167 */ +/* 176 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -24548,24 +25078,22 @@ module.exports = spine; */ var Class = __webpack_require__(0); -var GetFastValue = __webpack_require__(4); -var ImageFile = __webpack_require__(168); +var GetFastValue = __webpack_require__(5); +var ImageFile = __webpack_require__(177); var IsPlainObject = __webpack_require__(2); -var JSONFile = __webpack_require__(182); -var MultiFile = __webpack_require__(183); -var TextFile = __webpack_require__(184); +var JSONFile = __webpack_require__(191); +var MultiFile = __webpack_require__(192); +var TextFile = __webpack_require__(193); /** * @typedef {object} Phaser.Loader.FileTypes.SpineFileConfig * * @property {string} key - The key of the file. Must be unique within both the Loader and the Texture Manager. - * @property {string} [textureURL] - The absolute or relative URL to load the texture image file from. - * @property {string} [textureExtension='png'] - The default file extension to use for the image texture if no url is provided. - * @property {XHRSettingsObject} [textureXhrSettings] - Extra XHR Settings specifically for the texture image file. - * @property {string} [normalMap] - The filename of an associated normal map. It uses the same path and url to load as the texture image. - * @property {string} [atlasURL] - The absolute or relative URL to load the atlas data file from. - * @property {string} [atlasExtension='txt'] - The default file extension to use for the atlas data if no url is provided. - * @property {XHRSettingsObject} [atlasXhrSettings] - Extra XHR Settings specifically for the atlas data file. + * @property {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @property {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt". + * @property {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not? + * @property {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings. + * @property {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings. */ /** @@ -24573,7 +25101,7 @@ var TextFile = __webpack_require__(184); * A Spine File suitable for loading by the Loader. * * These are created when you use the Phaser.Loader.LoaderPlugin#spine method and are not typically created directly. - * + * * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#spine. * * @class SpineFile @@ -24629,7 +25157,7 @@ var SpineFile = new Class({ for (i = 0; i < atlasURL.length; i++) { atlas = new TextFile(loader, { - key: key, + key: key + '_' + i, url: atlasURL[i], extension: GetFastValue(config, 'atlasExtension', 'atlas'), xhrSettings: GetFastValue(config, 'atlasXhrSettings') @@ -24709,7 +25237,7 @@ var SpineFile = new Class({ var currentPrefix = loader.prefix; var baseURL = GetFastValue(config, 'baseURL', this.baseURL); - var path = GetFastValue(config, 'path', this.path); + var path = GetFastValue(config, 'path', file.src.match(/^.*\//))[0]; var prefix = GetFastValue(config, 'prefix', this.prefix); var textureXhrSettings = GetFastValue(config, 'textureXhrSettings'); @@ -24721,7 +25249,7 @@ var SpineFile = new Class({ { var textureURL = textures[i]; - var key = 'SP' + this.multiKeyIndex + '_' + textureURL; + var key = this.prefix + textureURL; var image = new ImageFile(loader, key, textureURL, textureXhrSettings); @@ -24763,7 +25291,7 @@ var SpineFile = new Class({ if (file.type === 'text') { - atlasKey = file.key.substr(0, file.key.length - 2); + atlasKey = file.key.replace(/_[\d]$/, ''); atlasCache = file.cache; @@ -24774,14 +25302,14 @@ var SpineFile = new Class({ var src = file.key.trim(); var pos = src.indexOf('_'); var key = src.substr(pos + 1); - + this.loader.textureManager.addImage(key, file.data); } file.pendingDestroy(); } - atlasCache.add(atlasKey, { preMultipliedAlpha: preMultipliedAlpha, data: combinedAtlasData }); + atlasCache.add(atlasKey, { preMultipliedAlpha: preMultipliedAlpha, data: combinedAtlasData, prefix: this.prefix }); this.complete = true; } @@ -24793,20 +25321,20 @@ module.exports = SpineFile; /***/ }), -/* 168 */ +/* 177 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var CONST = __webpack_require__(8); -var File = __webpack_require__(12); -var FileTypesManager = __webpack_require__(13); -var GetFastValue = __webpack_require__(4); +var File = __webpack_require__(13); +var FileTypesManager = __webpack_require__(14); +var GetFastValue = __webpack_require__(5); var IsPlainObject = __webpack_require__(2); /** @@ -24814,7 +25342,7 @@ var IsPlainObject = __webpack_require__(2); * A single Image File suitable for loading by the Loader. * * These are created when you use the Phaser.Loader.LoaderPlugin#image method and are not typically created directly. - * + * * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#image. * * @class ImageFile @@ -24958,7 +25486,7 @@ var ImageFile = new Class({ * Adds an Image, or array of Images, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -24973,7 +25501,7 @@ var ImageFile = new Class({ * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been * loaded. - * + * * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle. * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback * of animated gifs to Canvas elements. @@ -24984,7 +25512,7 @@ var ImageFile = new Class({ * then remove it from the Texture Manager first, before loading a new one. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.image({ * key: 'logo', @@ -24995,7 +25523,7 @@ var ImageFile = new Class({ * See the documentation for `Phaser.Types.Loader.FileTypes.ImageFileConfig` for more details. * * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key: - * + * * ```javascript * this.load.image('logo', 'images/AtariLogo.png'); * // and later in your game ... @@ -25014,13 +25542,13 @@ var ImageFile = new Class({ * * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image, * then you can specify it by providing an array as the `url` where the second element is the normal map: - * + * * ```javascript * this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]); * ``` * * Or, if you are using a config object use the `normalMap` property: - * + * * ```javascript * this.load.image({ * key: 'logo', @@ -25036,14 +25564,14 @@ var ImageFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#image - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig|Phaser.Types.Loader.FileTypes.ImageFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('image', function (key, url, xhrSettings) { @@ -25067,12 +25595,12 @@ module.exports = ImageFile; /***/ }), -/* 169 */ +/* 178 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25082,27 +25610,27 @@ module.exports = ImageFile; module.exports = { - ADD: __webpack_require__(170), - COMPLETE: __webpack_require__(171), - FILE_COMPLETE: __webpack_require__(172), - FILE_KEY_COMPLETE: __webpack_require__(173), - FILE_LOAD_ERROR: __webpack_require__(174), - FILE_LOAD: __webpack_require__(175), - FILE_PROGRESS: __webpack_require__(176), - POST_PROCESS: __webpack_require__(177), - PROGRESS: __webpack_require__(178), - START: __webpack_require__(179) + ADD: __webpack_require__(179), + COMPLETE: __webpack_require__(180), + FILE_COMPLETE: __webpack_require__(181), + FILE_KEY_COMPLETE: __webpack_require__(182), + FILE_LOAD_ERROR: __webpack_require__(183), + FILE_LOAD: __webpack_require__(184), + FILE_PROGRESS: __webpack_require__(185), + POST_PROCESS: __webpack_require__(186), + PROGRESS: __webpack_require__(187), + START: __webpack_require__(188) }; /***/ }), -/* 170 */ +/* 179 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25127,12 +25655,12 @@ module.exports = 'addfile'; /***/ }), -/* 171 */ +/* 180 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25155,12 +25683,12 @@ module.exports = 'complete'; /***/ }), -/* 172 */ +/* 181 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25184,12 +25712,12 @@ module.exports = 'filecomplete'; /***/ }), -/* 173 */ +/* 182 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25238,12 +25766,12 @@ module.exports = 'filecomplete-'; /***/ }), -/* 174 */ +/* 183 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25263,12 +25791,12 @@ module.exports = 'loaderror'; /***/ }), -/* 175 */ +/* 184 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25289,12 +25817,12 @@ module.exports = 'load'; /***/ }), -/* 176 */ +/* 185 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25316,12 +25844,12 @@ module.exports = 'fileprogress'; /***/ }), -/* 177 */ +/* 186 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25345,12 +25873,12 @@ module.exports = 'postprocess'; /***/ }), -/* 178 */ +/* 187 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25370,12 +25898,12 @@ module.exports = 'progress'; /***/ }), -/* 179 */ +/* 188 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25397,12 +25925,12 @@ module.exports = 'start'; /***/ }), -/* 180 */ +/* 189 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25438,16 +25966,16 @@ module.exports = GetURL; /***/ }), -/* 181 */ +/* 190 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MergeXHRSettings = __webpack_require__(29); +var MergeXHRSettings = __webpack_require__(32); /** * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings @@ -25473,6 +26001,14 @@ var XHRLoader = function (file, globalXHRSettings) xhr.responseType = file.xhrSettings.responseType; xhr.timeout = config.timeout; + if (config.headers) + { + for (var key in config.headers) + { + xhr.setRequestHeader(key, config.headers[key]); + } + } + if (config.header && config.headerValue) { xhr.setRequestHeader(config.header, config.headerValue); @@ -25488,6 +26024,11 @@ var XHRLoader = function (file, globalXHRSettings) xhr.overrideMimeType(config.overrideMimeType); } + if (config.withCredentials) + { + xhr.withCredentials = true; + } + // After a successful request, the xhr.response property will contain the requested data as a DOMString, ArrayBuffer, Blob, or Document (depending on what was set for responseType.) xhr.onload = file.onLoad.bind(file, xhr); @@ -25506,21 +26047,21 @@ module.exports = XHRLoader; /***/ }), -/* 182 */ +/* 191 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var CONST = __webpack_require__(8); -var File = __webpack_require__(12); -var FileTypesManager = __webpack_require__(13); -var GetFastValue = __webpack_require__(4); -var GetValue = __webpack_require__(11); +var File = __webpack_require__(13); +var FileTypesManager = __webpack_require__(14); +var GetFastValue = __webpack_require__(5); +var GetValue = __webpack_require__(12); var IsPlainObject = __webpack_require__(2); /** @@ -25528,7 +26069,7 @@ var IsPlainObject = __webpack_require__(2); * A single JSON File suitable for loading by the Loader. * * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly. - * + * * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json. * * @class JSONFile @@ -25539,7 +26080,7 @@ var IsPlainObject = __webpack_require__(2); * * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file. * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object. - * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, can be a fully formed JSON Object. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file. * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache. */ @@ -25632,7 +26173,7 @@ var JSONFile = new Class({ * Adds a JSON file, or array of JSON files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -25647,14 +26188,14 @@ var JSONFile = new Class({ * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been * loaded. - * + * * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load. * The key should be unique both in terms of files being loaded and files already present in the JSON Cache. * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file * then remove it from the JSON Cache first, before loading a new one. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.json({ * key: 'wavedata', @@ -25665,7 +26206,7 @@ var JSONFile = new Class({ * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details. * * Once the file has finished loading you can access it from its Cache using its key: - * + * * ```javascript * this.load.json('wavedata', 'files/AlienWaveData.json'); * // and later in your game ... @@ -25684,7 +26225,7 @@ var JSONFile = new Class({ * * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache, * rather than the whole file. For example, if your JSON data had a structure like this: - * + * * ```json * { * "level1": { @@ -25704,15 +26245,15 @@ var JSONFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#json - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. - * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, can be a fully formed JSON Object. * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('json', function (key, url, dataKey, xhrSettings) { @@ -25736,12 +26277,12 @@ module.exports = JSONFile; /***/ }), -/* 183 */ +/* 192 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25970,20 +26511,20 @@ module.exports = MultiFile; /***/ }), -/* 184 */ +/* 193 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var CONST = __webpack_require__(8); -var File = __webpack_require__(12); -var FileTypesManager = __webpack_require__(13); -var GetFastValue = __webpack_require__(4); +var File = __webpack_require__(13); +var FileTypesManager = __webpack_require__(14); +var GetFastValue = __webpack_require__(5); var IsPlainObject = __webpack_require__(2); /** @@ -26114,14 +26655,14 @@ var TextFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#text - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig|Phaser.Types.Loader.FileTypes.TextFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt". * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('text', function (key, url, xhrSettings) { @@ -26145,7 +26686,7 @@ module.exports = TextFile; /***/ }), -/* 185 */ +/* 194 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26154,21 +26695,21 @@ module.exports = TextFile; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AngleBetween = __webpack_require__(15); -var Clamp = __webpack_require__(9); +var AngleBetween = __webpack_require__(16); +var Clamp = __webpack_require__(10); var Class = __webpack_require__(0); -var ComponentsComputedSize = __webpack_require__(186); -var ComponentsDepth = __webpack_require__(187); -var ComponentsFlip = __webpack_require__(188); -var ComponentsScrollFactor = __webpack_require__(189); -var ComponentsTransform = __webpack_require__(190); -var ComponentsVisible = __webpack_require__(192); -var CounterClockwise = __webpack_require__(5); -var DegToRad = __webpack_require__(25); -var GameObject = __webpack_require__(193); -var RadToDeg = __webpack_require__(6); -var SpineEvents = __webpack_require__(214); -var SpineGameObjectRender = __webpack_require__(221); +var ComponentsComputedSize = __webpack_require__(195); +var ComponentsDepth = __webpack_require__(196); +var ComponentsFlip = __webpack_require__(197); +var ComponentsScrollFactor = __webpack_require__(198); +var ComponentsTransform = __webpack_require__(199); +var ComponentsVisible = __webpack_require__(201); +var CounterClockwise = __webpack_require__(6); +var DegToRad = __webpack_require__(27); +var GameObject = __webpack_require__(202); +var RadToDeg = __webpack_require__(7); +var SpineEvents = __webpack_require__(225); +var SpineGameObjectRender = __webpack_require__(232); /** * @classdesc @@ -27737,12 +28278,12 @@ module.exports = SpineGameObject; /***/ }), -/* 186 */ +/* 195 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27886,12 +28427,12 @@ module.exports = ComputedSize; /***/ }), -/* 187 */ +/* 196 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27922,7 +28463,7 @@ var Depth = { * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order * of Game Objects, without actually moving their position in the display list. * - * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * The default depth is zero. A Game Object with a higher depth * value will always render in front of one with a lower value. * * Setting the depth will queue a depth sort event within the Scene. @@ -27952,7 +28493,7 @@ var Depth = { * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order * of Game Objects, without actually moving their position in the display list. * - * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * The default depth is zero. A Game Object with a higher depth * value will always render in front of one with a lower value. * * Setting the depth will queue a depth sort event within the Scene. @@ -27979,12 +28520,12 @@ module.exports = Depth; /***/ }), -/* 188 */ +/* 197 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28143,12 +28684,12 @@ module.exports = Flip; /***/ }), -/* 189 */ +/* 198 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28250,19 +28791,21 @@ module.exports = ScrollFactor; /***/ }), -/* 190 */ +/* 199 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var MATH_CONST = __webpack_require__(1); -var TransformMatrix = __webpack_require__(191); -var WrapAngle = __webpack_require__(17); -var WrapAngleDegrees = __webpack_require__(18); +var TransformMatrix = __webpack_require__(200); +var TransformXY = __webpack_require__(28); +var WrapAngle = __webpack_require__(18); +var WrapAngleDegrees = __webpack_require__(19); +var Vector2 = __webpack_require__(4); // global bitmask flag for GameObject.renderMask (used by Scale) var _FLAG = 4; // 0100 @@ -28278,7 +28821,7 @@ var Transform = { /** * Private internal value. Holds the horizontal scale value. - * + * * @name Phaser.GameObjects.Components.Transform#_scaleX * @type {number} * @private @@ -28289,7 +28832,7 @@ var Transform = { /** * Private internal value. Holds the vertical scale value. - * + * * @name Phaser.GameObjects.Components.Transform#_scaleY * @type {number} * @private @@ -28300,7 +28843,7 @@ var Transform = { /** * Private internal value. Holds the rotation value in radians. - * + * * @name Phaser.GameObjects.Components.Transform#_rotation * @type {number} * @private @@ -28331,7 +28874,9 @@ var Transform = { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. * * @name Phaser.GameObjects.Components.Transform#z * @type {number} @@ -28353,7 +28898,7 @@ var Transform = { /** * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`. - * + * * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this * isn't the case, use the `scaleX` or `scaleY` properties instead. * @@ -28450,7 +28995,7 @@ var Transform = { /** * The angle of this Game Object as expressed in degrees. - * + * * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left * and -90 is up. * @@ -28477,9 +29022,9 @@ var Transform = { /** * The angle of this Game Object in radians. - * - * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left - * and -90 is up. + * + * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left + * and -PI/2 is up. * * If you prefer to work in degrees, see the `angle` property instead. * @@ -28533,7 +29078,7 @@ var Transform = { /** * Sets the position of this Game Object to be a random position within the confines of * the given area. - * + * * If no area is specified a random position between 0 x 0 and the game width x height is used instead. * * The position does not factor in the size of this Game Object, meaning that only the origin is @@ -28663,6 +29208,9 @@ var Transform = { /** * Sets the z position of this Game Object. * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. + * * @method Phaser.GameObjects.Components.Transform#setZ * @since 3.0.0 * @@ -28752,9 +29300,59 @@ var Transform = { return tempMatrix; }, + /** + * Takes the given `x` and `y` coordinates and converts them into local space for this + * Game Object, taking into account parent and local transforms, and the Display Origin. + * + * The returned Vector2 contains the translated point in its properties. + * + * A Camera needs to be provided in order to handle modified scroll factors. If no + * camera is specified, it will use the `main` camera from the Scene to which this + * Game Object belongs. + * + * @method Phaser.GameObjects.Components.Transform#getLocalPoint + * @since 3.50.0 + * + * @param {number} x - The x position to translate. + * @param {number} y - The y position to translate. + * @param {Phaser.Math.Vector2} [point] - A Vector2, or point-like object, to store the results in. + * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera which is being tested against. If not given will use the Scene default camera. + * + * @return {Phaser.Math.Vector2} The translated point. + */ + getLocalPoint: function (x, y, point, camera) + { + if (!point) { point = new Vector2(); } + if (!camera) { camera = this.scene.sys.cameras.main; } + + var csx = camera.scrollX; + var csy = camera.scrollY; + + var px = x + (csx * this.scrollFactorX) - csx; + var py = y + (csy * this.scrollFactorY) - csy; + + if (this.parentContainer) + { + this.getWorldTransformMatrix().applyInverse(px, py, point); + } + else + { + TransformXY(px, py, this.x, this.y, this.rotation, this.scaleX, this.scaleY, point); + } + + // Normalize origin + if (this._originComponent) + { + point.x += this._displayOriginX; + point.y += this._displayOriginY; + } + + return point; + }, + /** * Gets the sum total rotation of all of this Game Objects parent Containers. - * + * * The returned value is in radians and will be zero if this Game Object has no parent container. * * @method Phaser.GameObjects.Components.Transform#getParentRotation @@ -28784,18 +29382,18 @@ module.exports = Transform; /***/ }), -/* 191 */ +/* 200 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var MATH_CONST = __webpack_require__(1); -var Vector2 = __webpack_require__(7); +var Vector2 = __webpack_require__(4); /** * @classdesc @@ -29227,7 +29825,7 @@ var TransformMatrix = new Class({ * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by. * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in. * - * @return {Phaser.GameObjects.Components.TransformMatrix} Either this TransformMatrix, or the `out` Matrix, if given in the arguments. + * @return {(this|Phaser.GameObjects.Components.TransformMatrix)} Either this TransformMatrix, or the `out` Matrix, if given in the arguments. */ multiply: function (rhs, out) { @@ -29719,6 +30317,58 @@ var TransformMatrix = new Class({ return x * this.b + y * this.d + this.f; }, + /** + * Returns the X component of this matrix multiplied by the given values. + * + * This is the same as `x * a + y * c + e`, optionally passing via `Math.round`. + * + * @method Phaser.GameObjects.Components.TransformMatrix#getXRound + * @since 3.50.0 + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * @param {boolean} [round=false] - Math.round the resulting value? + * + * @return {number} The calculated x value. + */ + getXRound: function (x, y, round) + { + var v = this.getX(x, y); + + if (round) + { + v = Math.round(v); + } + + return v; + }, + + /** + * Returns the Y component of this matrix multiplied by the given values. + * + * This is the same as `x * b + y * d + f`, optionally passing via `Math.round`. + * + * @method Phaser.GameObjects.Components.TransformMatrix#getYRound + * @since 3.50.0 + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * @param {boolean} [round=false] - Math.round the resulting value? + * + * @return {number} The calculated y value. + */ + getYRound: function (x, y, round) + { + var v = this.getY(x, y); + + if (round) + { + v = Math.round(v); + } + + return v; + }, + /** * Returns a string that can be used in a CSS Transform call as a `matrix` property. * @@ -29752,12 +30402,12 @@ module.exports = TransformMatrix; /***/ }), -/* 192 */ +/* 201 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29841,20 +30491,20 @@ module.exports = Visible; /***/ }), -/* 193 */ +/* 202 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var ComponentsToJSON = __webpack_require__(194); -var DataManager = __webpack_require__(195); -var EventEmitter = __webpack_require__(201); -var Events = __webpack_require__(202); +var ComponentsToJSON = __webpack_require__(203); +var DataManager = __webpack_require__(204); +var EventEmitter = __webpack_require__(210); +var Events = __webpack_require__(211); /** * @classdesc @@ -29904,10 +30554,10 @@ var GameObject = new Class({ /** * The current state of this Game Object. - * + * * Phaser itself will never modify this value, although plugins may do so. - * - * Use this property to track the state of a Game Object during its lifetime. For example, it could move from + * + * Use this property to track the state of a Game Object during its lifetime. For example, it could change from * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons. * If you need to store complex data about your Game Object, look at using the Data Component instead. @@ -30012,10 +30662,10 @@ var GameObject = new Class({ this.input = null; /** - * If this Game Object is enabled for physics then this property will contain a reference to a Physics Body. + * If this Game Object is enabled for Arcade or Matter Physics then this property will contain a reference to a Physics Body. * * @name Phaser.GameObjects.GameObject#body - * @type {?(object|Phaser.Physics.Arcade.Body|Phaser.Physics.Impact.Body)} + * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|MatterJS.BodyType)} * @default null * @since 3.0.0 */ @@ -30076,9 +30726,9 @@ var GameObject = new Class({ /** * Sets the current state of this Game Object. - * + * * Phaser itself will never modify the State of a Game Object, although plugins may do so. - * + * * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'. * The state value should typically be an integer (ideally mapped to a constant * in your game code), but could also be a string. It is recommended to keep it light and simple. @@ -30176,6 +30826,65 @@ var GameObject = new Class({ return this; }, + /** + * Increase a value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is increased from 0. + * + * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled + * before setting the value. + * + * If the key doesn't already exist in the Data Manager then it is created. + * + * When the value is first set, a `setdata` event is emitted from this Game Object. + * + * @method Phaser.GameObjects.GameObject#incData + * @since 3.23.0 + * + * @param {(string|object)} key - The key to increase the value for. + * @param {*} [data] - The value to increase for the given key. + * + * @return {this} This GameObject. + */ + incData: function (key, value) + { + if (!this.data) + { + this.data = new DataManager(this); + } + + this.data.inc(key, value); + + return this; + }, + + /** + * Toggle a boolean value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is toggled from false. + * + * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled + * before setting the value. + * + * If the key doesn't already exist in the Data Manager then it is created. + * + * When the value is first set, a `setdata` event is emitted from this Game Object. + * + * @method Phaser.GameObjects.GameObject#toggleData + * @since 3.23.0 + * + * @param {(string|object)} key - The key to toggle the value for. + * + * @return {this} This GameObject. + */ + toggleData: function (key) + { + if (!this.data) + { + this.data = new DataManager(this); + } + + this.data.toggle(key); + + return this; + }, + /** * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist. * @@ -30229,18 +30938,27 @@ var GameObject = new Class({ * * You can also provide an Input Configuration Object as the only argument to this method. * + * @example + * sprite.setInteractive(); + * + * @example + * sprite.setInteractive(new Phaser.Geom.Circle(45, 46, 45), Phaser.Geom.Circle.Contains); + * + * @example + * graphics.setInteractive(new Phaser.Geom.Rectangle(0, 0, 128, 128), Phaser.Geom.Rectangle.Contains); + * * @method Phaser.GameObjects.GameObject#setInteractive * @since 3.0.0 * - * @param {(Phaser.Types.Input.InputConfiguration|any)} [shape] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used. - * @param {Phaser.Types.Input.HitAreaCallback} [callback] - A callback to be invoked when the Game Object is interacted with. If you provide a shape you must also provide a callback. + * @param {(Phaser.Types.Input.InputConfiguration|any)} [hitArea] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not given it will try to create a Rectangle based on the texture frame. + * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The callback that determines if the pointer is within the Hit Area shape or not. If you provide a shape you must also provide a callback. * @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target? * * @return {this} This GameObject. */ - setInteractive: function (shape, callback, dropZone) + setInteractive: function (hitArea, hitAreaCallback, dropZone) { - this.scene.sys.input.enable(this, shape, callback, dropZone); + this.scene.sys.input.enable(this, hitArea, hitAreaCallback, dropZone); return this; }, @@ -30283,7 +31001,7 @@ var GameObject = new Class({ * If you wish to only temporarily stop an object from receiving input then use * `disableInteractive` instead, as that toggles the interactive state, where-as * this erases it completely. - * + * * If you wish to resize a hit area, don't remove and then set it as being * interactive. Instead, access the hitarea object directly and resize the shape * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the @@ -30303,6 +31021,36 @@ var GameObject = new Class({ return this; }, + /** + * This callback is invoked when this Game Object is added to a Scene. + * + * Can be overriden by custom Game Objects, but be aware of some Game Objects that + * will use this, such as Sprites, to add themselves into the Update List. + * + * You can also listen for the `ADDED_TO_SCENE` event from this Game Object. + * + * @method Phaser.GameObjects.GameObject#addedToScene + * @since 3.50.0 + */ + addedToScene: function () + { + }, + + /** + * This callback is invoked when this Game Object is removed from a Scene. + * + * Can be overriden by custom Game Objects, but be aware of some Game Objects that + * will use this, such as Sprites, to removed themselves from the Update List. + * + * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object. + * + * @method Phaser.GameObjects.GameObject#removedFromScene + * @since 3.50.0 + */ + removedFromScene: function () + { + }, + /** * To be overridden by custom GameObjects. Allows base objects to be used in a Pool. * @@ -30429,7 +31177,6 @@ var GameObject = new Class({ if (!fromScene) { sys.displayList.remove(this); - sys.updateList.remove(this); } if (this.input) @@ -30482,12 +31229,12 @@ module.exports = GameObject; /***/ }), -/* 194 */ +/* 203 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30543,17 +31290,17 @@ module.exports = ToJSON; /***/ }), -/* 195 */ +/* 204 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Events = __webpack_require__(196); +var Events = __webpack_require__(205); /** * @callback DataEachCallback @@ -30576,7 +31323,7 @@ var Events = __webpack_require__(196); * @since 3.0.0 * * @param {object} parent - The object that this DataManager belongs to. - * @param {Phaser.Events.EventEmitter} eventEmitter - The DataManager's event emitter. + * @param {Phaser.Events.EventEmitter} [eventEmitter] - The DataManager's event emitter. */ var DataManager = new Class({ @@ -30803,7 +31550,7 @@ var DataManager = new Class({ * @param {(string|object)} key - The key to set the value for. Or an object or key value pairs. If an object the `data` argument is ignored. * @param {*} data - The value to set for the given key. If an object is provided as the key this argument is ignored. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ set: function (key, data) { @@ -30827,6 +31574,72 @@ var DataManager = new Class({ return this; }, + /** + * Increase a value for the given key. If the key doesn't already exist in the Data Manager then it is increased from 0. + * + * When the value is first set, a `setdata` event is emitted. + * + * @method Phaser.Data.DataManager#inc + * @fires Phaser.Data.Events#SET_DATA + * @fires Phaser.Data.Events#CHANGE_DATA + * @fires Phaser.Data.Events#CHANGE_DATA_KEY + * @since 3.23.0 + * + * @param {(string|object)} key - The key to increase the value for. + * @param {*} [data] - The value to increase for the given key. + * + * @return {Phaser.Data.DataManager} This DataManager object. + */ + inc: function (key, data) + { + if (this._frozen) + { + return this; + } + + if (data === undefined) + { + data = 1; + } + + var value = this.get(key); + if (value === undefined) + { + value = 0; + } + + this.set(key, (value + data)); + + return this; + }, + + /** + * Toggle a boolean value for the given key. If the key doesn't already exist in the Data Manager then it is toggled from false. + * + * When the value is first set, a `setdata` event is emitted. + * + * @method Phaser.Data.DataManager#toggle + * @fires Phaser.Data.Events#SET_DATA + * @fires Phaser.Data.Events#CHANGE_DATA + * @fires Phaser.Data.Events#CHANGE_DATA_KEY + * @since 3.23.0 + * + * @param {(string|object)} key - The key to toggle the value for. + * + * @return {Phaser.Data.DataManager} This DataManager object. + */ + toggle: function (key) + { + if (this._frozen) + { + return this; + } + + this.set(key, !this.get(key)); + + return this; + }, + /** * Internal value setter, called automatically by the `set` method. * @@ -30840,7 +31653,7 @@ var DataManager = new Class({ * @param {string} key - The key to set the value for. * @param {*} data - The value to set. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ setValue: function (key, data) { @@ -30904,7 +31717,7 @@ var DataManager = new Class({ * @param {*} [context] - Value to use as `this` when executing callback. * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ each: function (callback, context) { @@ -30941,7 +31754,7 @@ var DataManager = new Class({ * @param {Object.} data - The data to merge. * @param {boolean} [overwrite=true] - Whether to overwrite existing data. Defaults to true. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ merge: function (data, overwrite) { @@ -30977,7 +31790,7 @@ var DataManager = new Class({ * * @param {(string|string[])} key - The key to remove, or an array of keys to remove. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ remove: function (key) { @@ -31011,7 +31824,7 @@ var DataManager = new Class({ * * @param {string} key - The key to set the value for. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ removeValue: function (key) { @@ -31083,7 +31896,7 @@ var DataManager = new Class({ * * @param {boolean} value - Whether to freeze or unfreeze the Data Manager. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ setFreeze: function (value) { @@ -31098,7 +31911,7 @@ var DataManager = new Class({ * @method Phaser.Data.DataManager#reset * @since 3.0.0 * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ reset: function () { @@ -31184,12 +31997,12 @@ module.exports = DataManager; /***/ }), -/* 196 */ +/* 205 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31199,21 +32012,21 @@ module.exports = DataManager; module.exports = { - CHANGE_DATA: __webpack_require__(197), - CHANGE_DATA_KEY: __webpack_require__(198), - REMOVE_DATA: __webpack_require__(199), - SET_DATA: __webpack_require__(200) + CHANGE_DATA: __webpack_require__(206), + CHANGE_DATA_KEY: __webpack_require__(207), + REMOVE_DATA: __webpack_require__(208), + SET_DATA: __webpack_require__(209) }; /***/ }), -/* 197 */ +/* 206 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31240,12 +32053,12 @@ module.exports = 'changedata'; /***/ }), -/* 198 */ +/* 207 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31263,7 +32076,6 @@ module.exports = 'changedata'; * @since 3.16.1 * * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event. - * @param {string} key - The unique key of the data item within the Data Manager. * @param {any} value - The item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance. * @param {any} previousValue - The previous item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance. */ @@ -31271,12 +32083,12 @@ module.exports = 'changedata-'; /***/ }), -/* 199 */ +/* 208 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31299,12 +32111,12 @@ module.exports = 'removedata'; /***/ }), -/* 200 */ +/* 209 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31327,7 +32139,7 @@ module.exports = 'setdata'; /***/ }), -/* 201 */ +/* 210 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -31670,12 +32482,12 @@ if (true) { /***/ }), -/* 202 */ +/* 211 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31685,28 +32497,56 @@ if (true) { module.exports = { - DESTROY: __webpack_require__(203), - VIDEO_COMPLETE: __webpack_require__(204), - VIDEO_CREATED: __webpack_require__(205), - VIDEO_ERROR: __webpack_require__(206), - VIDEO_LOOP: __webpack_require__(207), - VIDEO_PLAY: __webpack_require__(208), - VIDEO_SEEKED: __webpack_require__(209), - VIDEO_SEEKING: __webpack_require__(210), - VIDEO_STOP: __webpack_require__(211), - VIDEO_TIMEOUT: __webpack_require__(212), - VIDEO_UNLOCKED: __webpack_require__(213) + ADDED_TO_SCENE: __webpack_require__(212), + DESTROY: __webpack_require__(213), + REMOVED_FROM_SCENE: __webpack_require__(214), + VIDEO_COMPLETE: __webpack_require__(215), + VIDEO_CREATED: __webpack_require__(216), + VIDEO_ERROR: __webpack_require__(217), + VIDEO_LOOP: __webpack_require__(218), + VIDEO_PLAY: __webpack_require__(219), + VIDEO_SEEKED: __webpack_require__(220), + VIDEO_SEEKING: __webpack_require__(221), + VIDEO_STOP: __webpack_require__(222), + VIDEO_TIMEOUT: __webpack_require__(223), + VIDEO_UNLOCKED: __webpack_require__(224) }; /***/ }), -/* 203 */ +/* 212 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Object Added to Scene Event. + * + * This event is dispatched when a Game Object is added to a Scene. + * + * Listen for it on a Game Object instance using `GameObject.on('addedtoscene', listener)`. + * + * @event Phaser.GameObjects.Events#ADDED_TO_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene. + * @param {Phaser.Scene} scene - The Scene to which the Game Object was added. + */ +module.exports = 'addedtoscene'; + + +/***/ }), +/* 213 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31726,12 +32566,38 @@ module.exports = 'destroy'; /***/ }), -/* 204 */ +/* 214 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Object Removed from Scene Event. + * + * This event is dispatched when a Game Object is removed from a Scene. + * + * Listen for it on a Game Object instance using `GameObject.on('removedfromscene', listener)`. + * + * @event Phaser.GameObjects.Events#REMOVED_FROM_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene. + * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed. + */ +module.exports = 'removedfromscene'; + + +/***/ }), +/* 215 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31758,12 +32624,12 @@ module.exports = 'complete'; /***/ }), -/* 205 */ +/* 216 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31787,12 +32653,12 @@ module.exports = 'created'; /***/ }), -/* 206 */ +/* 217 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31813,12 +32679,12 @@ module.exports = 'error'; /***/ }), -/* 207 */ +/* 218 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31845,12 +32711,12 @@ module.exports = 'loop'; /***/ }), -/* 208 */ +/* 219 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31873,12 +32739,12 @@ module.exports = 'play'; /***/ }), -/* 209 */ +/* 220 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31898,12 +32764,12 @@ module.exports = 'seeked'; /***/ }), -/* 210 */ +/* 221 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31924,12 +32790,12 @@ module.exports = 'seeking'; /***/ }), -/* 211 */ +/* 222 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31950,12 +32816,12 @@ module.exports = 'stop'; /***/ }), -/* 212 */ +/* 223 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31976,12 +32842,12 @@ module.exports = 'timeout'; /***/ }), -/* 213 */ +/* 224 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32002,7 +32868,7 @@ module.exports = 'unlocked'; /***/ }), -/* 214 */ +/* 225 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32017,18 +32883,18 @@ module.exports = 'unlocked'; module.exports = { - COMPLETE: __webpack_require__(215), - DISPOSE: __webpack_require__(216), - END: __webpack_require__(217), - EVENT: __webpack_require__(218), - INTERRUPTED: __webpack_require__(219), - START: __webpack_require__(220) + COMPLETE: __webpack_require__(226), + DISPOSE: __webpack_require__(227), + END: __webpack_require__(228), + EVENT: __webpack_require__(229), + INTERRUPTED: __webpack_require__(230), + START: __webpack_require__(231) }; /***/ }), -/* 215 */ +/* 226 */ /***/ (function(module, exports) { /** @@ -32047,7 +32913,7 @@ module.exports = 'complete'; /***/ }), -/* 216 */ +/* 227 */ /***/ (function(module, exports) { /** @@ -32066,7 +32932,7 @@ module.exports = 'dispose'; /***/ }), -/* 217 */ +/* 228 */ /***/ (function(module, exports) { /** @@ -32085,7 +32951,7 @@ module.exports = 'end'; /***/ }), -/* 218 */ +/* 229 */ /***/ (function(module, exports) { /** @@ -32104,7 +32970,7 @@ module.exports = 'event'; /***/ }), -/* 219 */ +/* 230 */ /***/ (function(module, exports) { /** @@ -32123,7 +32989,7 @@ module.exports = 'interrupted'; /***/ }), -/* 220 */ +/* 231 */ /***/ (function(module, exports) { /** @@ -32142,7 +33008,7 @@ module.exports = 'start'; /***/ }), -/* 221 */ +/* 232 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32151,17 +33017,17 @@ module.exports = 'start'; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var renderWebGL = __webpack_require__(31); -var renderCanvas = __webpack_require__(31); +var renderWebGL = __webpack_require__(34); +var renderCanvas = __webpack_require__(34); if (true) { - renderWebGL = __webpack_require__(222); + renderWebGL = __webpack_require__(233); } if (true) { - renderCanvas = __webpack_require__(223); + renderCanvas = __webpack_require__(234); } module.exports = { @@ -32173,7 +33039,7 @@ module.exports = { /***/ }), -/* 222 */ +/* 233 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32182,8 +33048,8 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CounterClockwise = __webpack_require__(5); -var RadToDeg = __webpack_require__(6); +var CounterClockwise = __webpack_require__(6); +var RadToDeg = __webpack_require__(7); var Wrap = __webpack_require__(3); /** @@ -32221,10 +33087,10 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent { // The next object in the display list is not a Spine object, so we end the batch sceneRenderer.end(); - - renderer.rebindPipeline(renderer.pipelines.TextureTintPipeline); + + renderer.rebindPipeline(renderer.pipelines.MultiPipeline); } - + return; } @@ -32333,7 +33199,7 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent // The next object in the display list is not a Spine object, so we end the batch sceneRenderer.end(); - renderer.rebindPipeline(renderer.pipelines.TextureTintPipeline); + renderer.rebindPipeline(renderer.pipelines.MultiPipeline); } }; @@ -32341,7 +33207,7 @@ module.exports = SpineGameObjectWebGLRenderer; /***/ }), -/* 223 */ +/* 234 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32350,8 +33216,8 @@ module.exports = SpineGameObjectWebGLRenderer; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CounterClockwise = __webpack_require__(5); -var RadToDeg = __webpack_require__(6); +var CounterClockwise = __webpack_require__(6); +var RadToDeg = __webpack_require__(7); var Wrap = __webpack_require__(3); /** diff --git a/plugins/spine/dist/SpinePlugin.min.js b/plugins/spine/dist/SpinePlugin.min.js index fe4acce1d..b9ef9e8ff 100644 --- a/plugins/spine/dist/SpinePlugin.min.js +++ b/plugins/spine/dist/SpinePlugin.min.js @@ -1 +1 @@ -window.SpinePlugin=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=32)}([function(t,e){function n(t,e,n){var i=n?t[e]:Object.getOwnPropertyDescriptor(t,e);return!n&&i.value&&"object"==typeof i.value&&(i=i.value),!(!i||!function(t){return!!t.get&&"function"==typeof t.get||!!t.set&&"function"==typeof t.set}(i))&&(void 0===i.enumerable&&(i.enumerable=!0),void 0===i.configurable&&(i.configurable=!0),i)}function i(t,e){var n=Object.getOwnPropertyDescriptor(t,e);return!!n&&(n.value&&"object"==typeof n.value&&(n=n.value),!1===n.configurable)}function r(t,e,r,s){for(var a in e)if(e.hasOwnProperty(a)){var h=n(e,a,r);if(!1!==h){if(i((s||t).prototype,a)){if(o.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]=e[a]}}function s(t,e){if(e){Array.isArray(e)||(e=[e]);for(var n=0;nMath.PI&&(t-=i.PI2),Math.abs(((t+i.TAU)%i.PI2-i.PI2)%i.PI2)}},function(t,e,n){var i=n(1);t.exports=function(t){return t*i.RAD_TO_DEG}},function(t,e,n){var i=new(n(0))({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 i(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},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},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,n=t.y-this.y;return Math.sqrt(e*e+n*n)},distanceSq:function(t){var e=t.x-this.x,n=t.y-this.y;return e*e+n*n},length:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},lengthSq:function(){var t=this.x,e=this.y;return t*t+e*e},normalize:function(){var t=this.x,e=this.y,n=t*t+e*e;return n>0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=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 n=this.x,i=this.y;return this.x=n+e*(t.x-n),this.y=i+e*(t.y-i),this},transformMat3:function(t){var e=this.x,n=this.y,i=t.val;return this.x=i[0]*e+i[3]*n+i[6],this.y=i[1]*e+i[4]*n+i[7],this},transformMat4:function(t){var e=this.x,n=this.y,i=t.val;return this.x=i[0]*e+i[4]*n+i[12],this.y=i[1]*e+i[5]*n+i[13],this},reset:function(){return this.x=0,this.y=0,this}});i.ZERO=new i,i.RIGHT=new i(1,0),i.LEFT=new i(-1,0),i.UP=new i(0,-1),i.DOWN=new i(0,1),i.ONE=new i(1,1),t.exports=i},function(t,e){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}},function(t,e){t.exports=function(t,e,n){return Math.max(e,Math.min(n,t))}},function(t,e,n){var i=new(n(0))({initialize:function(t,e,n){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=n||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new i(this.x,this.y,this.z)},crossVectors:function(t,e){var n=t.x,i=t.y,r=t.z,s=e.x,o=e.y,a=e.z;return this.x=i*a-r*o,this.y=r*s-n*a,this.z=n*o-i*s,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,n){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=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||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,n=t.y-this.y,i=t.z-this.z||0;return Math.sqrt(e*e+n*n+i*i)},distanceSq:function(t){var e=t.x-this.x,n=t.y-this.y,i=t.z-this.z||0;return e*e+n*n+i*i},length:function(){var t=this.x,e=this.y,n=this.z;return Math.sqrt(t*t+e*e+n*n)},lengthSq:function(){var t=this.x,e=this.y,n=this.z;return t*t+e*e+n*n},normalize:function(){var t=this.x,e=this.y,n=this.z,i=t*t+e*e+n*n;return i>0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i,this.z=n*i),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,n=this.y,i=this.z,r=t.x,s=t.y,o=t.z;return this.x=n*o-i*s,this.y=i*r-e*o,this.z=e*s-n*r,this},lerp:function(t,e){void 0===e&&(e=0);var n=this.x,i=this.y,r=this.z;return this.x=n+e*(t.x-n),this.y=i+e*(t.y-i),this.z=r+e*(t.z-r),this},transformMat3:function(t){var e=this.x,n=this.y,i=this.z,r=t.val;return this.x=e*r[0]+n*r[3]+i*r[6],this.y=e*r[1]+n*r[4]+i*r[7],this.z=e*r[2]+n*r[5]+i*r[8],this},transformMat4:function(t){var e=this.x,n=this.y,i=this.z,r=t.val;return this.x=r[0]*e+r[4]*n+r[8]*i+r[12],this.y=r[1]*e+r[5]*n+r[9]*i+r[13],this.z=r[2]*e+r[6]*n+r[10]*i+r[14],this},transformCoordinates:function(t){var e=this.x,n=this.y,i=this.z,r=t.val,s=e*r[0]+n*r[4]+i*r[8]+r[12],o=e*r[1]+n*r[5]+i*r[9]+r[13],a=e*r[2]+n*r[6]+i*r[10]+r[14],h=e*r[3]+n*r[7]+i*r[11]+r[15];return this.x=s/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,n=this.y,i=this.z,r=t.x,s=t.y,o=t.z,a=t.w,h=a*e+s*i-o*n,l=a*n+o*e-r*i,u=a*i+r*n-s*e,c=-r*e-s*n-o*i;return this.x=h*a+c*-r+l*-o-u*-s,this.y=l*a+c*-s+u*-r-h*-o,this.z=u*a+c*-o+h*-s-l*-r,this},project:function(t){var e=this.x,n=this.y,i=this.z,r=t.val,s=r[0],o=r[1],a=r[2],h=r[3],l=r[4],u=r[5],c=r[6],f=r[7],d=r[8],p=r[9],v=r[10],g=r[11],m=r[12],M=r[13],x=r[14],y=1/(e*h+n*f+i*g+r[15]);return this.x=(e*s+n*l+i*d+m)*y,this.y=(e*o+n*u+i*p+M)*y,this.z=(e*a+n*c+i*v+x)*y,this},unproject:function(t,e){var n=t.x,i=t.y,r=t.z,s=t.w,o=this.x-n,a=s-this.y-1-i,h=this.z;return this.x=2*o/r-1,this.y=2*a/s-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});i.ZERO=new i,i.RIGHT=new i(1,0,0),i.LEFT=new i(-1,0,0),i.UP=new i(0,-1,0),i.DOWN=new i(0,1,0),i.FORWARD=new i(0,0,1),i.BACK=new i(0,0,-1),i.ONE=new i(1,1,1),t.exports=i},function(t,e){t.exports=function(t,e,n){if(t&&"number"!=typeof t){if(t.hasOwnProperty(e))return t[e];if(-1!==e.indexOf(".")){for(var i=e.split("."),r=t,s=n,o=0;o=400&&t.status<=599&&(i=!1),this.resetXHR(),this.loader.nextFile(this,i)},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(s.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=r.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=r.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){this.state=r.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.cache.add(this.key,this.data),this.pendingDestroy()},pendingDestroy:function(t){void 0===t&&(t=this.data);var e=this.key,n=this.type;this.loader.emit(s.FILE_COMPLETE,e,n,t),this.loader.emit(s.FILE_KEY_COMPLETE+n+"-"+e,e,n,t),this.loader.flagForRemoval(this)},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,n){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var i=new FileReader;i.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||n)+";base64,"+i.result.split(",")[1]},i.onerror=t.onerror,i.readAsDataURL(e)}},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},function(t,e){var n={},i={install:function(t){for(var e in n)t[e]=n[e]},register:function(t,e){n[t]=e},destroy:function(){n={}}};t.exports=i},function(t,e,n){var i=n(2),r=function(){var t,e,n,s,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=0?t:t+2*Math.PI}},function(t,e,n){var i=n(3);t.exports=function(t){return i(t,-Math.PI,Math.PI)}},function(t,e,n){var i=n(3);t.exports=function(t){return i(t,-180,180)}},function(t,e,n){var i=n(20);t.exports=function(t,e){return i(t)/i(e)/i(t-e)}},function(t,e){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},function(t,e){t.exports=function(t,e,n,i,r){var s=.5*(i-e),o=.5*(r-n),a=t*t;return(2*n-2*i+s+o)*(t*a)+(-3*n+3*i-2*s-o)*a+s*t+n}},function(t,e){t.exports=function(t,e,n){return(e-t)*n+t}},function(t,e){t.exports=function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*(3-2*t)}},function(t,e){t.exports=function(t,e,n){return(t=Math.max(0,Math.min(1,(t-e)/(n-e))))*t*t*(t*(6*t-15)+10)}},function(t,e,n){var i=n(1);t.exports=function(t){return t*i.DEG_TO_RAD}},function(t,e,n){var i=new(n(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new i(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,n=t.val;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this},fromMat4:function(t){var e=t.val,n=this.val;return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[4],n[4]=e[5],n[5]=e[6],n[6]=e[8],n[7]=e[9],n[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],n=t[2],i=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=n,t[7]=i,this},invert:function(){var t=this.val,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=l*s-o*h,c=-l*r+o*a,f=h*r-s*a,d=e*u+n*c+i*f;return d?(d=1/d,t[0]=u*d,t[1]=(-l*n+i*h)*d,t[2]=(o*n-i*s)*d,t[3]=c*d,t[4]=(l*e-i*a)*d,t[5]=(-o*e+i*r)*d,t[6]=f*d,t[7]=(-h*e+n*a)*d,t[8]=(s*e-n*r)*d,this):null},adjoint:function(){var t=this.val,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return t[0]=s*l-o*h,t[1]=i*h-n*l,t[2]=n*o-i*s,t[3]=o*a-r*l,t[4]=e*l-i*a,t[5]=i*r-e*o,t[6]=r*h-s*a,t[7]=n*a-e*h,t[8]=e*s-n*r,this},determinant:function(){var t=this.val,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return e*(l*s-o*h)+n*(-l*r+o*a)+i*(h*r-s*a)},multiply:function(t){var e=this.val,n=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=t.val,f=c[0],d=c[1],p=c[2],v=c[3],g=c[4],m=c[5],M=c[6],x=c[7],y=c[8];return e[0]=f*n+d*s+p*h,e[1]=f*i+d*o+p*l,e[2]=f*r+d*a+p*u,e[3]=v*n+g*s+m*h,e[4]=v*i+g*o+m*l,e[5]=v*r+g*a+m*u,e[6]=M*n+x*s+y*h,e[7]=M*i+x*o+y*l,e[8]=M*r+x*a+y*u,this},translate:function(t){var e=this.val,n=t.x,i=t.y;return e[6]=n*e[0]+i*e[3]+e[6],e[7]=n*e[1]+i*e[4]+e[7],e[8]=n*e[2]+i*e[5]+e[8],this},rotate:function(t){var e=this.val,n=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*n+h*s,e[1]=l*i+h*o,e[2]=l*r+h*a,e[3]=l*s-h*n,e[4]=l*o-h*i,e[5]=l*a-h*r,this},scale:function(t){var e=this.val,n=t.x,i=t.y;return e[0]=n*e[0],e[1]=n*e[1],e[2]=n*e[2],e[3]=i*e[3],e[4]=i*e[4],e[5]=i*e[5],this},fromQuat:function(t){var e=t.x,n=t.y,i=t.z,r=t.w,s=e+e,o=n+n,a=i+i,h=e*s,l=e*o,u=e*a,c=n*o,f=n*a,d=i*a,p=r*s,v=r*o,g=r*a,m=this.val;return m[0]=1-(c+d),m[3]=l+g,m[6]=u-v,m[1]=l-g,m[4]=1-(h+d),m[7]=f+p,m[2]=u+v,m[5]=f-p,m[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,n=this.val,i=e[0],r=e[1],s=e[2],o=e[3],a=e[4],h=e[5],l=e[6],u=e[7],c=e[8],f=e[9],d=e[10],p=e[11],v=e[12],g=e[13],m=e[14],M=e[15],x=i*h-r*a,y=i*l-s*a,w=i*u-o*a,b=r*l-s*h,E=r*u-o*h,T=s*u-o*l,A=c*g-f*v,R=c*m-d*v,S=c*M-p*v,I=f*m-d*g,C=f*M-p*g,P=d*M-p*m,L=x*P-y*C+w*I+b*S-E*R+T*A;return L?(L=1/L,n[0]=(h*P-l*C+u*I)*L,n[1]=(l*S-a*P-u*R)*L,n[2]=(a*C-h*S+u*A)*L,n[3]=(s*C-r*P-o*I)*L,n[4]=(i*P-s*S+o*R)*L,n[5]=(r*S-i*C-o*A)*L,n[6]=(g*T-m*E+M*b)*L,n[7]=(m*w-v*T-M*y)*L,n[8]=(v*E-g*w+M*x)*L,this):null}});t.exports=i},function(t,e,n){var i=new(n(0))({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new i(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,n=t.val;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],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],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this},zero:function(){var t=this.val;return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=0,this},xyz:function(t,e,n){this.identity();var i=this.val;return i[12]=t,i[13]=e,i[14]=n,this},scaling:function(t,e,n){this.zero();var i=this.val;return i[0]=t,i[5]=e,i[10]=n,i[15]=1,this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},transpose:function(){var t=this.val,e=t[1],n=t[2],i=t[3],r=t[6],s=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]=n,t[9]=r,t[11]=t[14],t[12]=i,t[13]=s,t[14]=o,this},invert:function(){var t=this.val,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],f=t[11],d=t[12],p=t[13],v=t[14],g=t[15],m=e*o-n*s,M=e*a-i*s,x=e*h-r*s,y=n*a-i*o,w=n*h-r*o,b=i*h-r*a,E=l*p-u*d,T=l*v-c*d,A=l*g-f*d,R=u*v-c*p,S=u*g-f*p,I=c*g-f*v,C=m*I-M*S+x*R+y*A-w*T+b*E;return C?(C=1/C,t[0]=(o*I-a*S+h*R)*C,t[1]=(i*S-n*I-r*R)*C,t[2]=(p*b-v*w+g*y)*C,t[3]=(c*w-u*b-f*y)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l*(n*a-i*o),this},determinant:function(){var t=this.val,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],f=t[11],d=t[12],p=t[13],v=t[14],g=t[15];return(e*o-n*s)*(c*g-f*v)-(e*a-i*s)*(u*g-f*p)+(e*h-r*s)*(u*v-c*p)+(n*a-i*o)*(l*g-f*d)-(n*h-r*o)*(l*v-c*d)+(i*h-r*a)*(l*p-u*d)},multiply:function(t){var e=this.val,n=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=e[9],f=e[10],d=e[11],p=e[12],v=e[13],g=e[14],m=e[15],M=t.val,x=M[0],y=M[1],w=M[2],b=M[3];return e[0]=x*n+y*o+w*u+b*p,e[1]=x*i+y*a+w*c+b*v,e[2]=x*r+y*h+w*f+b*g,e[3]=x*s+y*l+w*d+b*m,x=M[4],y=M[5],w=M[6],b=M[7],e[4]=x*n+y*o+w*u+b*p,e[5]=x*i+y*a+w*c+b*v,e[6]=x*r+y*h+w*f+b*g,e[7]=x*s+y*l+w*d+b*m,x=M[8],y=M[9],w=M[10],b=M[11],e[8]=x*n+y*o+w*u+b*p,e[9]=x*i+y*a+w*c+b*v,e[10]=x*r+y*h+w*f+b*g,e[11]=x*s+y*l+w*d+b*m,x=M[12],y=M[13],w=M[14],b=M[15],e[12]=x*n+y*o+w*u+b*p,e[13]=x*i+y*a+w*c+b*v,e[14]=x*r+y*h+w*f+b*g,e[15]=x*s+y*l+w*d+b*m,this},multiplyLocal:function(t){var e=[],n=this.val,i=t.val;return e[0]=n[0]*i[0]+n[1]*i[4]+n[2]*i[8]+n[3]*i[12],e[1]=n[0]*i[1]+n[1]*i[5]+n[2]*i[9]+n[3]*i[13],e[2]=n[0]*i[2]+n[1]*i[6]+n[2]*i[10]+n[3]*i[14],e[3]=n[0]*i[3]+n[1]*i[7]+n[2]*i[11]+n[3]*i[15],e[4]=n[4]*i[0]+n[5]*i[4]+n[6]*i[8]+n[7]*i[12],e[5]=n[4]*i[1]+n[5]*i[5]+n[6]*i[9]+n[7]*i[13],e[6]=n[4]*i[2]+n[5]*i[6]+n[6]*i[10]+n[7]*i[14],e[7]=n[4]*i[3]+n[5]*i[7]+n[6]*i[11]+n[7]*i[15],e[8]=n[8]*i[0]+n[9]*i[4]+n[10]*i[8]+n[11]*i[12],e[9]=n[8]*i[1]+n[9]*i[5]+n[10]*i[9]+n[11]*i[13],e[10]=n[8]*i[2]+n[9]*i[6]+n[10]*i[10]+n[11]*i[14],e[11]=n[8]*i[3]+n[9]*i[7]+n[10]*i[11]+n[11]*i[15],e[12]=n[12]*i[0]+n[13]*i[4]+n[14]*i[8]+n[15]*i[12],e[13]=n[12]*i[1]+n[13]*i[5]+n[14]*i[9]+n[15]*i[13],e[14]=n[12]*i[2]+n[13]*i[6]+n[14]*i[10]+n[15]*i[14],e[15]=n[12]*i[3]+n[13]*i[7]+n[14]*i[11]+n[15]*i[15],this.fromArray(e)},translate:function(t){var e=t.x,n=t.y,i=t.z,r=this.val;return r[12]=r[0]*e+r[4]*n+r[8]*i+r[12],r[13]=r[1]*e+r[5]*n+r[9]*i+r[13],r[14]=r[2]*e+r[6]*n+r[10]*i+r[14],r[15]=r[3]*e+r[7]*n+r[11]*i+r[15],this},translateXYZ:function(t,e,n){var i=this.val;return i[12]=i[0]*t+i[4]*e+i[8]*n+i[12],i[13]=i[1]*t+i[5]*e+i[9]*n+i[13],i[14]=i[2]*t+i[6]*e+i[10]*n+i[14],i[15]=i[3]*t+i[7]*e+i[11]*n+i[15],this},scale:function(t){var e=t.x,n=t.y,i=t.z,r=this.val;return r[0]=r[0]*e,r[1]=r[1]*e,r[2]=r[2]*e,r[3]=r[3]*e,r[4]=r[4]*n,r[5]=r[5]*n,r[6]=r[6]*n,r[7]=r[7]*n,r[8]=r[8]*i,r[9]=r[9]*i,r[10]=r[10]*i,r[11]=r[11]*i,this},scaleXYZ:function(t,e,n){var i=this.val;return i[0]=i[0]*t,i[1]=i[1]*t,i[2]=i[2]*t,i[3]=i[3]*t,i[4]=i[4]*e,i[5]=i[5]*e,i[6]=i[6]*e,i[7]=i[7]*e,i[8]=i[8]*n,i[9]=i[9]*n,i[10]=i[10]*n,i[11]=i[11]*n,this},makeRotationAxis:function(t,e){var n=Math.cos(e),i=Math.sin(e),r=1-n,s=t.x,o=t.y,a=t.z,h=r*s,l=r*o;return this.fromArray([h*s+n,h*o-i*a,h*a+i*o,0,h*o+i*a,l*o+n,l*a-i*s,0,h*a-i*o,l*a+i*s,r*a*a+n,0,0,0,0,1]),this},rotate:function(t,e){var n=this.val,i=e.x,r=e.y,s=e.z,o=Math.sqrt(i*i+r*r+s*s);if(Math.abs(o)<1e-6)return null;i*=o=1/o,r*=o,s*=o;var a=Math.sin(t),h=Math.cos(t),l=1-h,u=n[0],c=n[1],f=n[2],d=n[3],p=n[4],v=n[5],g=n[6],m=n[7],M=n[8],x=n[9],y=n[10],w=n[11],b=i*i*l+h,E=r*i*l+s*a,T=s*i*l-r*a,A=i*r*l-s*a,R=r*r*l+h,S=s*r*l+i*a,I=i*s*l+r*a,C=r*s*l-i*a,P=s*s*l+h;return n[0]=u*b+p*E+M*T,n[1]=c*b+v*E+x*T,n[2]=f*b+g*E+y*T,n[3]=d*b+m*E+w*T,n[4]=u*A+p*R+M*S,n[5]=c*A+v*R+x*S,n[6]=f*A+g*R+y*S,n[7]=d*A+m*R+w*S,n[8]=u*I+p*C+M*P,n[9]=c*I+v*C+x*P,n[10]=f*I+g*C+y*P,n[11]=d*I+m*C+w*P,this},rotateX:function(t){var e=this.val,n=Math.sin(t),i=Math.cos(t),r=e[4],s=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=r*i+h*n,e[5]=s*i+l*n,e[6]=o*i+u*n,e[7]=a*i+c*n,e[8]=h*i-r*n,e[9]=l*i-s*n,e[10]=u*i-o*n,e[11]=c*i-a*n,this},rotateY:function(t){var e=this.val,n=Math.sin(t),i=Math.cos(t),r=e[0],s=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=r*i-h*n,e[1]=s*i-l*n,e[2]=o*i-u*n,e[3]=a*i-c*n,e[8]=r*n+h*i,e[9]=s*n+l*i,e[10]=o*n+u*i,e[11]=a*n+c*i,this},rotateZ:function(t){var e=this.val,n=Math.sin(t),i=Math.cos(t),r=e[0],s=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=r*i+h*n,e[1]=s*i+l*n,e[2]=o*i+u*n,e[3]=a*i+c*n,e[4]=h*i-r*n,e[5]=l*i-s*n,e[6]=u*i-o*n,e[7]=c*i-a*n,this},fromRotationTranslation:function(t,e){var n=this.val,i=t.x,r=t.y,s=t.z,o=t.w,a=i+i,h=r+r,l=s+s,u=i*a,c=i*h,f=i*l,d=r*h,p=r*l,v=s*l,g=o*a,m=o*h,M=o*l;return n[0]=1-(d+v),n[1]=c+M,n[2]=f-m,n[3]=0,n[4]=c-M,n[5]=1-(u+v),n[6]=p+g,n[7]=0,n[8]=f+m,n[9]=p-g,n[10]=1-(u+d),n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,this},fromQuat:function(t){var e=this.val,n=t.x,i=t.y,r=t.z,s=t.w,o=n+n,a=i+i,h=r+r,l=n*o,u=n*a,c=n*h,f=i*a,d=i*h,p=r*h,v=s*o,g=s*a,m=s*h;return e[0]=1-(f+p),e[1]=u+m,e[2]=c-g,e[3]=0,e[4]=u-m,e[5]=1-(l+p),e[6]=d+v,e[7]=0,e[8]=c+g,e[9]=d-v,e[10]=1-(l+f),e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},frustum:function(t,e,n,i,r,s){var o=this.val,a=1/(e-t),h=1/(i-n),l=1/(r-s);return o[0]=2*r*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=2*r*h,o[6]=0,o[7]=0,o[8]=(e+t)*a,o[9]=(i+n)*h,o[10]=(s+r)*l,o[11]=-1,o[12]=0,o[13]=0,o[14]=s*r*2*l,o[15]=0,this},perspective:function(t,e,n,i){var r=this.val,s=1/Math.tan(t/2),o=1/(n-i);return r[0]=s/e,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=s,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=(i+n)*o,r[11]=-1,r[12]=0,r[13]=0,r[14]=2*i*n*o,r[15]=0,this},perspectiveLH:function(t,e,n,i){var r=this.val;return r[0]=2*n/t,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=2*n/e,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=-i/(n-i),r[11]=1,r[12]=0,r[13]=0,r[14]=n*i/(n-i),r[15]=0,this},ortho:function(t,e,n,i,r,s){var o=this.val,a=t-e,h=n-i,l=r-s;return a=0===a?a:1/a,h=0===h?h:1/h,l=0===l?l:1/l,o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*l,o[11]=0,o[12]=(t+e)*a,o[13]=(i+n)*h,o[14]=(s+r)*l,o[15]=1,this},lookAt:function(t,e,n){var i=this.val,r=t.x,s=t.y,o=t.z,a=n.x,h=n.y,l=n.z,u=e.x,c=e.y,f=e.z;if(Math.abs(r-u)<1e-6&&Math.abs(s-c)<1e-6&&Math.abs(o-f)<1e-6)return this.identity();var d=r-u,p=s-c,v=o-f,g=1/Math.sqrt(d*d+p*p+v*v),m=h*(v*=g)-l*(p*=g),M=l*(d*=g)-a*v,x=a*p-h*d;(g=Math.sqrt(m*m+M*M+x*x))?(m*=g=1/g,M*=g,x*=g):(m=0,M=0,x=0);var y=p*x-v*M,w=v*m-d*x,b=d*M-p*m;return(g=Math.sqrt(y*y+w*w+b*b))?(y*=g=1/g,w*=g,b*=g):(y=0,w=0,b=0),i[0]=m,i[1]=y,i[2]=d,i[3]=0,i[4]=M,i[5]=w,i[6]=p,i[7]=0,i[8]=x,i[9]=b,i[10]=v,i[11]=0,i[12]=-(m*r+M*s+x*o),i[13]=-(y*r+w*s+b*o),i[14]=-(d*r+p*s+v*o),i[15]=1,this},yawPitchRoll:function(t,e,n){this.zero(),r.zero(),s.zero();var i=this.val,o=r.val,a=s.val,h=Math.sin(n),l=Math.cos(n);return i[10]=1,i[15]=1,i[0]=l,i[1]=h,i[4]=-h,i[5]=l,h=Math.sin(e),l=Math.cos(e),o[0]=1,o[15]=1,o[5]=l,o[10]=l,o[9]=-h,o[6]=h,h=Math.sin(t),l=Math.cos(t),a[5]=1,a[15]=1,a[0]=l,a[2]=-h,a[8]=h,a[10]=l,this.multiplyLocal(r),this.multiplyLocal(s),this},setWorldMatrix:function(t,e,n,i,o){return this.yawPitchRoll(t.y,t.x,t.z),r.scaling(n.x,n.y,n.z),s.xyz(e.x,e.y,e.z),this.multiplyLocal(r),this.multiplyLocal(s),void 0!==i&&this.multiplyLocal(i),void 0!==o&&this.multiplyLocal(o),this}}),r=new i,s=new i;t.exports=i},function(t,e,n){var i=n(0),r=n(10),s=n(26),o=new Int8Array([1,2,0]),a=new Float32Array([0,0,0]),h=new r(1,0,0),l=new r(0,1,0),u=new r,c=new s,f=new i({initialize:function(t,e,n,i){"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=n||0,this.w=i||0)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},set:function(t,e,n,i){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=n||0,this.w=i||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,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,n=this.z,i=this.w;return Math.sqrt(t*t+e*e+n*n+i*i)},lengthSq:function(){var t=this.x,e=this.y,n=this.z,i=this.w;return t*t+e*e+n*n+i*i},normalize:function(){var t=this.x,e=this.y,n=this.z,i=this.w,r=t*t+e*e+n*n+i*i;return r>0&&(r=1/Math.sqrt(r),this.x=t*r,this.y=e*r,this.z=n*r,this.w=i*r),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 n=this.x,i=this.y,r=this.z,s=this.w;return this.x=n+e*(t.x-n),this.y=i+e*(t.y-i),this.z=r+e*(t.z-r),this.w=s+e*(t.w-s),this},rotationTo:function(t,e){var n=t.x*e.x+t.y*e.y+t.z*e.z;return n<-.999999?(u.copy(h).cross(t).length()<1e-6&&u.copy(l).cross(t),u.normalize(),this.setAxisAngle(u,Math.PI)):n>.999999?(this.x=0,this.y=0,this.z=0,this.w=1,this):(u.copy(t).cross(e),this.x=u.x,this.y=u.y,this.z=u.z,this.w=1+n,this.normalize())},setAxes:function(t,e,n){var i=c.val;return i[0]=e.x,i[3]=e.y,i[6]=e.z,i[1]=n.x,i[4]=n.y,i[7]=n.z,i[2]=-t.x,i[5]=-t.y,i[8]=-t.z,this.fromMat3(c).normalize()},identity:function(){return this.x=0,this.y=0,this.z=0,this.w=1,this},setAxisAngle:function(t,e){e*=.5;var n=Math.sin(e);return this.x=n*t.x,this.y=n*t.y,this.z=n*t.z,this.w=Math.cos(e),this},multiply:function(t){var e=this.x,n=this.y,i=this.z,r=this.w,s=t.x,o=t.y,a=t.z,h=t.w;return this.x=e*h+r*s+n*a-i*o,this.y=n*h+r*o+i*s-e*a,this.z=i*h+r*a+e*o-n*s,this.w=r*h-e*s-n*o-i*a,this},slerp:function(t,e){var n=this.x,i=this.y,r=this.z,s=this.w,o=t.x,a=t.y,h=t.z,l=t.w,u=n*o+i*a+r*h+s*l;u<0&&(u=-u,o=-o,a=-a,h=-h,l=-l);var c=1-e,f=e;if(1-u>1e-6){var d=Math.acos(u),p=Math.sin(d);c=Math.sin((1-e)*d)/p,f=Math.sin(e*d)/p}return this.x=c*n+f*o,this.y=c*i+f*a,this.z=c*r+f*h,this.w=c*s+f*l,this},invert:function(){var t=this.x,e=this.y,n=this.z,i=this.w,r=t*t+e*e+n*n+i*i,s=r?1/r:0;return this.x=-t*s,this.y=-e*s,this.z=-n*s,this.w=i*s,this},conjugate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},rotateX:function(t){t*=.5;var e=this.x,n=this.y,i=this.z,r=this.w,s=Math.sin(t),o=Math.cos(t);return this.x=e*o+r*s,this.y=n*o+i*s,this.z=i*o-n*s,this.w=r*o-e*s,this},rotateY:function(t){t*=.5;var e=this.x,n=this.y,i=this.z,r=this.w,s=Math.sin(t),o=Math.cos(t);return this.x=e*o-i*s,this.y=n*o+r*s,this.z=i*o+e*s,this.w=r*o-n*s,this},rotateZ:function(t){t*=.5;var e=this.x,n=this.y,i=this.z,r=this.w,s=Math.sin(t),o=Math.cos(t);return this.x=e*o+n*s,this.y=n*o-e*s,this.z=i*o+r*s,this.w=r*o-i*s,this},calculateW:function(){var t=this.x,e=this.y,n=this.z;return this.w=-Math.sqrt(1-t*t-e*e-n*n),this},fromMat3:function(t){var e,n=t.val,i=n[0]+n[4]+n[8];if(i>0)e=Math.sqrt(i+1),this.w=.5*e,e=.5/e,this.x=(n[7]-n[5])*e,this.y=(n[2]-n[6])*e,this.z=(n[3]-n[1])*e;else{var r=0;n[4]>n[0]&&(r=1),n[8]>n[3*r+r]&&(r=2);var s=o[r],h=o[s];e=Math.sqrt(n[3*r+r]-n[3*s+s]-n[3*h+h]+1),a[r]=.5*e,e=.5/e,a[s]=(n[3*s+r]+n[3*r+s])*e,a[h]=(n[3*h+r]+n[3*r+h])*e,this.x=a[0],this.y=a[1],this.z=a[2],this.w=(n[3*h+s]-n[3*s+h])*e}return this}});t.exports=f},function(t,e,n){var i=n(14),r=n(30);t.exports=function(t,e){var n=void 0===t?r():i({},t);if(e)for(var s in e)void 0!==e[s]&&(n[s]=e[s]);return n}},function(t,e){t.exports=function(t,e,n,i,r){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===n&&(n=""),void 0===i&&(i=""),void 0===r&&(r=0),{responseType:t,async:e,user:n,password:i,timeout:r,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0}}},function(t,e){t.exports=function(){}},function(t,e,n){var i=n(33),r=n(0),s=n(11),o=n(143),a=n(144),h=n(166),l=n(167),u=n(185),c=new r({Extends:a,initialize:function(t,e){a.call(this,t,e);var n=e.game;this.isWebGL=2===n.config.renderType,this.cache=n.cache.addCustom("spine"),this.spineTextures=n.cache.addCustom("spineTextures"),this.json=n.cache.json,this.textures=n.textures,this.drawDebug=!1,this.gl,this.renderer,this.sceneRenderer,this.skeletonRenderer,this.skeletonDebugRenderer,this.plugin=h,this.temp1,this.temp2,this.isWebGL?(this.runtime=h.webgl,this.renderer=n.renderer,this.gl=n.renderer.gl,this.getAtlas=this.getAtlasWebGL):(this.runtime=h.canvas,this.renderer=n.renderer,this.getAtlas=this.getAtlasCanvas);var r=this;e.registerFileType("spine",this.spineFileCallback,t),e.registerGameObject("spine",function(t,e,n,i,s){var o=new u(this.scene,r,t,e,n,i,s);return this.displayList.add(o),this.updateList.add(o),o},function(t,e){void 0===t&&(t={});var n=s(t,"key",null),o=s(t,"animationName",null),a=s(t,"loop",!1),h=new u(this.scene,r,0,0,n,o,a);void 0!==e&&(t.add=e),i(this.scene,h,t);var l=s(t,"skinName",!1);l&&h.setSkinByName(l);var c=s(t,"slotName",!1),f=s(t,"attachmentName",null);return c&&h.setAttachment(c,f),h.refresh()})},boot:function(){this.isWebGL?(this.bootWebGL(),this.onResize(),this.game.scale.on(o,this.onResize,this)):this.bootCanvas();var t=this.systems.events;t.once("shutdown",this.shutdown,this),t.once("destroy",this.destroy,this)},bootCanvas:function(){this.skeletonRenderer=new h.canvas.SkeletonRenderer(this.scene.sys.context)},bootWebGL:function(){this.sceneRenderer=new h.webgl.SceneRenderer(this.renderer.canvas,this.gl,!0);var t=function(t,e){if(t!==this.srcBlend||e!==this.dstBlend){var n=this.context.gl;this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),n.blendFunc(this.srcBlend,this.dstBlend))}};this.sceneRenderer.batcher.setBlendMode=t,this.sceneRenderer.shapes.setBlendMode=t,this.skeletonRenderer=this.sceneRenderer.skeletonRenderer,this.skeletonDebugRenderer=this.sceneRenderer.skeletonDebugRenderer,this.temp1=new h.webgl.Vector3(0,0,0),this.temp2=new h.webgl.Vector3(0,0,0)},getAtlasCanvas:function(t){var e=this.cache.get(t);if(e){var n,i=this.spineTextures;if(i.has(t))n=i.get(t);else{var r=this.textures;n=new h.TextureAtlas(e.data,function(t){return new h.canvas.CanvasTexture(r.get(t).getSourceImage())})}return n}console.warn("No atlas data for: "+t)},getAtlasWebGL:function(t){var e=this.cache.get(t);if(e){var n,i=this.spineTextures;if(i.has(t))n=i.get(t);else{var r=this.textures,s=this.sceneRenderer.context.gl;s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),n=new h.TextureAtlas(e.data,function(t){return new h.webgl.GLTexture(s,r.get(t).getSourceImage(),!1)})}return n}console.warn("No atlas data for: "+t)},spineFileCallback:function(t,e,n,i,r,s){var o;if(Array.isArray(t))for(var a=0;a=i.PI2-n?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=n:e=1?1:1/e*(1+(e*t|0))}},function(t,e,n){t.exports={Ceil:n(94),Equal:n(95),Floor:n(96),GreaterThan:n(97),LessThan:n(98)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.ceil(t-e)}},function(t,e){t.exports=function(t,e,n){return void 0===n&&(n=1e-4),Math.abs(t-e)e-n}},function(t,e){t.exports=function(t,e,n){return void 0===n&&(n=1e-4),t1?t[n]-(i(r-n,t[n],t[n],t[n-1],t[n-1])-t[n]):i(r-s,t[s?s-1:0],t[s],t[n1?i(t[n],t[n-1],n-r):i(t[s],t[s+1>n?n:s+1],r-s)}},function(t,e){t.exports=function(t,e,n,i){return function(t,e){var n=1-t;return n*n*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,n)+function(t,e){return t*t*e}(t,i)}},function(t,e,n){var i=n(23);t.exports=function(t,e,n){return e+(n-e)*i(t,0,1)}},function(t,e,n){var i=n(24);t.exports=function(t,e,n){return e+(n-e)*i(t,0,1)}},function(t,e,n){t.exports={GetNext:n(108),IsSize:n(109),IsValue:n(110)}},function(t,e){t.exports=function(t){var e=Math.log(t)/.6931471805599453;return 1<0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e){t.exports=function(t){return t>0&&0==(t&t-1)}},function(t,e,n){t.exports={Ceil:n(112),Floor:n(113),To:n(114)}},function(t,e){t.exports=function(t,e,n,i){return void 0===n&&(n=0),0===e?t:(t-=n,t=e*Math.ceil(t/e),i?(n+t)/e:n+t)}},function(t,e){t.exports=function(t,e,n,i){return void 0===n&&(n=0),0===e?t:(t-=n,t=e*Math.floor(t/e),i?(n+t)/e:n+t)}},function(t,e){t.exports=function(t,e,n,i){return void 0===n&&(n=0),0===e?t:(t-=n,t=e*Math.round(t/e),i?(n+t)/e:n+t)}},function(t,e,n){var i=new(n(0))({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,n=this.n;t=t.toString();for(var i=0;i>>0,n=(e*=n)>>>0,n+=4294967296*(e-=n);return this.n=n,2.3283064365386963e-10*(n>>>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 n=Math.floor(this.frac()*(e+1)),i=t[n];t[n]=t[e],t[e]=i}return t}});t.exports=i},function(t,e){t.exports=function(t){for(var e=0,n=0;n1?void 0!==i?(r=(i-t)/(i-n))<0&&(r=0):r=1:r<0&&(r=0),r}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var n=2*Math.random()*Math.PI;return t.x=Math.cos(n)*e,t.y=Math.sin(n)*e,t}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var n=2*Math.random()*Math.PI,i=2*Math.random()-1,r=Math.sqrt(1-i*i)*e;return t.x=Math.cos(n)*r,t.y=Math.sin(n)*r,t.z=i*e,t}},function(t,e){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}},function(t,e){t.exports=function(t,e){var n=t.x,i=t.y;return t.x=n*Math.cos(e)-i*Math.sin(e),t.y=n*Math.sin(e)+i*Math.cos(e),t}},function(t,e){t.exports=function(t,e,n,i){var r=Math.cos(i),s=Math.sin(i),o=t.x-e,a=t.y-n;return t.x=o*r-a*s+e,t.y=o*s+a*r+n,t}},function(t,e){t.exports=function(t,e,n,i,r){var s=i+Math.atan2(t.y-n,t.x-e);return t.x=e+r*Math.cos(s),t.y=n+r*Math.sin(s),t}},function(t,e){t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},function(t,e){t.exports=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=10);var i=Math.pow(n,-e);return Math.round(t*i)/i}},function(t,e){t.exports=function(t,e,n,i){void 0===e&&(e=1),void 0===n&&(n=1),void 0===i&&(i=1),i*=Math.PI/t;for(var r=[],s=[],o=0;o0&&t<=e*n&&(s=t>e-1?t-(o=Math.floor(t/e))*e:t,r.set(s,o)),r}},function(t,e,n){var i=n(7);t.exports=function(t,e,n,r,s,o,a,h){void 0===h&&(h=new i);var l=Math.sin(s),u=Math.cos(s),c=u*o,f=l*o,d=-l*a,p=u*a,v=1/(c*p+d*-f);return h.x=p*v*t+-d*v*e+(r*d-n*p)*v,h.y=c*v*e+-f*v*t+(-r*c+n*f)*v,h}},function(t,e){t.exports=function(t,e,n){return Math.abs(t-e)<=n}},function(t,e,n){var i=new(n(0))({initialize:function(t,e,n,i){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=n||0,this.w=i||0)},clone:function(){return new i(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,n,i){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=n||0,this.w=i||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,n=this.z,i=this.w;return Math.sqrt(t*t+e*e+n*n+i*i)},lengthSq:function(){var t=this.x,e=this.y,n=this.z,i=this.w;return t*t+e*e+n*n+i*i},normalize:function(){var t=this.x,e=this.y,n=this.z,i=this.w,r=t*t+e*e+n*n+i*i;return r>0&&(r=1/Math.sqrt(r),this.x=t*r,this.y=e*r,this.z=n*r,this.w=i*r),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 n=this.x,i=this.y,r=this.z,s=this.w;return this.x=n+e*(t.x-n),this.y=i+e*(t.y-i),this.z=r+e*(t.z-r),this.w=s+e*(t.w-s),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,n=t.y-this.y,i=t.z-this.z||0,r=t.w-this.w||0;return Math.sqrt(e*e+n*n+i*i+r*r)},distanceSq:function(t){var e=t.x-this.x,n=t.y-this.y,i=t.z-this.z||0,r=t.w-this.w||0;return e*e+n*n+i*i+r*r},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,n=this.y,i=this.z,r=this.w,s=t.val;return this.x=s[0]*e+s[4]*n+s[8]*i+s[12]*r,this.y=s[1]*e+s[5]*n+s[9]*i+s[13]*r,this.z=s[2]*e+s[6]*n+s[10]*i+s[14]*r,this.w=s[3]*e+s[7]*n+s[11]*i+s[15]*r,this},transformQuat:function(t){var e=this.x,n=this.y,i=this.z,r=t.x,s=t.y,o=t.z,a=t.w,h=a*e+s*i-o*n,l=a*n+o*e-r*i,u=a*i+r*n-s*e,c=-r*e-s*n-o*i;return this.x=h*a+c*-r+l*-o-u*-s,this.y=l*a+c*-s+u*-r-h*-o,this.z=u*a+c*-o+h*-s-l*-r,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});i.prototype.sub=i.prototype.subtract,i.prototype.mul=i.prototype.multiply,i.prototype.div=i.prototype.divide,i.prototype.dist=i.prototype.distance,i.prototype.distSq=i.prototype.distanceSq,i.prototype.len=i.prototype.length,i.prototype.lenSq=i.prototype.lengthSq,t.exports=i},function(t,e,n){var i=n(10),r=n(27),s=n(28),o=new r,a=new s,h=new i;t.exports=function(t,e,n){return a.setAxisAngle(e,n),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},function(t,e){t.exports="resize"},function(t,e,n){var i=n(145),r=n(0),s=n(146),o=new r({Extends:i,initialize:function(t,e){i.call(this,e),this.scene=t,this.systems=t.sys,t.sys.events.once(s.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=o},function(t,e,n){var i=new(n(0))({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=i},function(t,e,n){t.exports={BOOT:n(147),CREATE:n(148),DESTROY:n(149),PAUSE:n(150),POST_UPDATE:n(151),PRE_UPDATE:n(152),READY:n(153),RENDER:n(154),RESUME:n(155),SHUTDOWN:n(156),SLEEP:n(157),START:n(158),TRANSITION_COMPLETE:n(159),TRANSITION_INIT:n(160),TRANSITION_OUT:n(161),TRANSITION_START:n(162),TRANSITION_WAKE:n(163),UPDATE:n(164),WAKE:n(165)}},function(t,e){t.exports="boot"},function(t,e){t.exports="create"},function(t,e){t.exports="destroy"},function(t,e){t.exports="pause"},function(t,e){t.exports="postupdate"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="ready"},function(t,e){t.exports="render"},function(t,e){t.exports="resume"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="sleep"},function(t,e){t.exports="start"},function(t,e){t.exports="transitioncomplete"},function(t,e){t.exports="transitioninit"},function(t,e){t.exports="transitionout"},function(t,e){t.exports="transitionstart"},function(t,e){t.exports="transitionwake"},function(t,e){t.exports="update"},function(t,e){t.exports="wake"},function(t,e){(function(){var e,n,i,r=this&&this.__extends||(e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,n)},function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)});!function(t){var e,n,i,s=function(){function t(t,e,n){if(null==t)throw new Error("name cannot be null.");if(null==e)throw new Error("timelines cannot be null.");this.name=t,this.timelines=e,this.timelineIds=[];for(var i=0;i0&&(e%=this.duration));for(var h=this.timelines,l=0,u=h.length;l>>1;;){if(t[(s+1)*n]<=e?i=s+1:r=s,i==r)return(i+1)*n;s=i+r>>>1}},t.linearSearch=function(t,e,n){for(var i=0,r=t.length-n;i<=r;i+=n)if(t[i]>e)return i;return-1},t}();t.Animation=s,function(t){t[t.setup=0]="setup",t[t.first=1]="first",t[t.replace=2]="replace",t[t.add=3]="add"}(e=t.MixBlend||(t.MixBlend={})),function(t){t[t.mixIn=0]="mixIn",t[t.mixOut=1]="mixOut"}(n=t.MixDirection||(t.MixDirection={})),function(t){t[t.rotate=0]="rotate",t[t.translate=1]="translate",t[t.scale=2]="scale",t[t.shear=3]="shear",t[t.attachment=4]="attachment",t[t.color=5]="color",t[t.deform=6]="deform",t[t.event=7]="event",t[t.drawOrder=8]="drawOrder",t[t.ikConstraint=9]="ikConstraint",t[t.transformConstraint=10]="transformConstraint",t[t.pathConstraintPosition=11]="pathConstraintPosition",t[t.pathConstraintSpacing=12]="pathConstraintSpacing",t[t.pathConstraintMix=13]="pathConstraintMix",t[t.twoColor=14]="twoColor"}(i=t.TimelineType||(t.TimelineType={}));var o=function(){function e(n){if(n<=0)throw new Error("frameCount must be > 0: "+n);this.curves=t.Utils.newFloatArray((n-1)*e.BEZIER_SIZE)}return e.prototype.getFrameCount=function(){return this.curves.length/e.BEZIER_SIZE+1},e.prototype.setLinear=function(t){this.curves[t*e.BEZIER_SIZE]=e.LINEAR},e.prototype.setStepped=function(t){this.curves[t*e.BEZIER_SIZE]=e.STEPPED},e.prototype.getCurveType=function(t){var n=t*e.BEZIER_SIZE;if(n==this.curves.length)return e.LINEAR;var i=this.curves[n];return i==e.LINEAR?e.LINEAR:i==e.STEPPED?e.STEPPED:e.BEZIER},e.prototype.setCurve=function(t,n,i,r,s){var o=.03*(2*-n+r),a=.03*(2*-i+s),h=.006*(3*(n-r)+1),l=.006*(3*(i-s)+1),u=2*o+h,c=2*a+l,f=.3*n+o+.16666667*h,d=.3*i+a+.16666667*l,p=t*e.BEZIER_SIZE,v=this.curves;v[p++]=e.BEZIER;for(var g=f,m=d,M=p+e.BEZIER_SIZE-1;p=i){var u=void 0,c=void 0;return s==h?(u=0,c=0):(u=r[s-2],c=r[s-1]),c+(r[s+1]-c)*(i-u)/(a-u)}var f=r[s-1];return f+(1-f)*(i-a)/(1-a)},e.LINEAR=0,e.STEPPED=1,e.BEZIER=2,e.BEZIER_SIZE=19,e}();t.CurveTimeline=o;var a=function(n){function o(e){var i=n.call(this,e)||this;return i.frames=t.Utils.newFloatArray(e<<1),i}return r(o,n),o.prototype.getPropertyId=function(){return(i.rotate<<24)+this.boneIndex},o.prototype.setFrame=function(t,e,n){t<<=1,this.frames[t]=e,this.frames[t+o.ROTATION]=n},o.prototype.apply=function(t,n,i,r,a,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(c.active)if(i=u[u.length-o.ENTRIES]){var d=u[u.length+o.PREV_ROTATION];switch(h){case e.setup:c.rotation=c.data.rotation+d*a;break;case e.first:case e.replace:d+=c.data.rotation-c.rotation,d-=360*(16384-(16384.499999999996-d/360|0));case e.add:c.rotation+=d*a}}else{var p=s.binarySearch(u,i,o.ENTRIES),v=u[p+o.PREV_ROTATION],g=u[p],m=this.getCurvePercent((p>>1)-1,1-(i-g)/(u[p+o.PREV_TIME]-g)),M=u[p+o.ROTATION]-v;switch(M=v+(M-360*(16384-(16384.499999999996-M/360|0)))*m,h){case e.setup:c.rotation=c.data.rotation+(M-360*(16384-(16384.499999999996-M/360|0)))*a;break;case e.first:case e.replace:M+=c.data.rotation-c.rotation;case e.add:c.rotation+=(M-360*(16384-(16384.499999999996-M/360|0)))*a}}},o.ENTRIES=2,o.PREV_TIME=-2,o.PREV_ROTATION=-1,o.ROTATION=1,o}(o);t.RotateTimeline=a;var h=function(n){function o(e){var i=n.call(this,e)||this;return i.frames=t.Utils.newFloatArray(e*o.ENTRIES),i}return r(o,n),o.prototype.getPropertyId=function(){return(i.translate<<24)+this.boneIndex},o.prototype.setFrame=function(t,e,n,i){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.X]=n,this.frames[t+o.Y]=i},o.prototype.apply=function(t,n,i,r,a,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(c.active)if(i=u[u.length-o.ENTRIES])f=u[u.length+o.PREV_X],d=u[u.length+o.PREV_Y];else{var p=s.binarySearch(u,i,o.ENTRIES);f=u[p+o.PREV_X],d=u[p+o.PREV_Y];var v=u[p],g=this.getCurvePercent(p/o.ENTRIES-1,1-(i-v)/(u[p+o.PREV_TIME]-v));f+=(u[p+o.X]-f)*g,d+=(u[p+o.Y]-d)*g}switch(h){case e.setup:c.x=c.data.x+f*a,c.y=c.data.y+d*a;break;case e.first:case e.replace:c.x+=(c.data.x+f-c.x)*a,c.y+=(c.data.y+d-c.y)*a;break;case e.add:c.x+=f*a,c.y+=d*a}}},o.ENTRIES=3,o.PREV_TIME=-3,o.PREV_X=-2,o.PREV_Y=-1,o.X=1,o.Y=2,o}(o);t.TranslateTimeline=h;var l=function(o){function a(t){return o.call(this,t)||this}return r(a,o),a.prototype.getPropertyId=function(){return(i.scale<<24)+this.boneIndex},a.prototype.apply=function(i,r,o,h,l,u,c){var f=this.frames,d=i.bones[this.boneIndex];if(d.active)if(o=f[f.length-a.ENTRIES])p=f[f.length+a.PREV_X]*d.data.scaleX,v=f[f.length+a.PREV_Y]*d.data.scaleY;else{var g=s.binarySearch(f,o,a.ENTRIES);p=f[g+a.PREV_X],v=f[g+a.PREV_Y];var m=f[g],M=this.getCurvePercent(g/a.ENTRIES-1,1-(o-m)/(f[g+a.PREV_TIME]-m));p=(p+(f[g+a.X]-p)*M)*d.data.scaleX,v=(v+(f[g+a.Y]-v)*M)*d.data.scaleY}if(1==l)u==e.add?(d.scaleX+=p-d.data.scaleX,d.scaleY+=v-d.data.scaleY):(d.scaleX=p,d.scaleY=v);else{var x=0,y=0;if(c==n.mixOut)switch(u){case e.setup:x=d.data.scaleX,y=d.data.scaleY,d.scaleX=x+(Math.abs(p)*t.MathUtils.signum(x)-x)*l,d.scaleY=y+(Math.abs(v)*t.MathUtils.signum(y)-y)*l;break;case e.first:case e.replace:x=d.scaleX,y=d.scaleY,d.scaleX=x+(Math.abs(p)*t.MathUtils.signum(x)-x)*l,d.scaleY=y+(Math.abs(v)*t.MathUtils.signum(y)-y)*l;break;case e.add:x=d.scaleX,y=d.scaleY,d.scaleX=x+(Math.abs(p)*t.MathUtils.signum(x)-d.data.scaleX)*l,d.scaleY=y+(Math.abs(v)*t.MathUtils.signum(y)-d.data.scaleY)*l}else switch(u){case e.setup:x=Math.abs(d.data.scaleX)*t.MathUtils.signum(p),y=Math.abs(d.data.scaleY)*t.MathUtils.signum(v),d.scaleX=x+(p-x)*l,d.scaleY=y+(v-y)*l;break;case e.first:case e.replace:x=Math.abs(d.scaleX)*t.MathUtils.signum(p),y=Math.abs(d.scaleY)*t.MathUtils.signum(v),d.scaleX=x+(p-x)*l,d.scaleY=y+(v-y)*l;break;case e.add:x=t.MathUtils.signum(p),y=t.MathUtils.signum(v),d.scaleX=Math.abs(d.scaleX)*x+(p-Math.abs(d.data.scaleX)*x)*l,d.scaleY=Math.abs(d.scaleY)*y+(v-Math.abs(d.data.scaleY)*y)*l}}}},a}(h);t.ScaleTimeline=l;var u=function(t){function n(e){return t.call(this,e)||this}return r(n,t),n.prototype.getPropertyId=function(){return(i.shear<<24)+this.boneIndex},n.prototype.apply=function(t,i,r,o,a,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(c.active)if(r=u[u.length-n.ENTRIES])f=u[u.length+n.PREV_X],d=u[u.length+n.PREV_Y];else{var p=s.binarySearch(u,r,n.ENTRIES);f=u[p+n.PREV_X],d=u[p+n.PREV_Y];var v=u[p],g=this.getCurvePercent(p/n.ENTRIES-1,1-(r-v)/(u[p+n.PREV_TIME]-v));f+=(u[p+n.X]-f)*g,d+=(u[p+n.Y]-d)*g}switch(h){case e.setup:c.shearX=c.data.shearX+f*a,c.shearY=c.data.shearY+d*a;break;case e.first:case e.replace:c.shearX+=(c.data.shearX+f-c.shearX)*a,c.shearY+=(c.data.shearY+d-c.shearY)*a;break;case e.add:c.shearX+=f*a,c.shearY+=d*a}}},n}(h);t.ShearTimeline=u;var c=function(n){function o(e){var i=n.call(this,e)||this;return i.frames=t.Utils.newFloatArray(e*o.ENTRIES),i}return r(o,n),o.prototype.getPropertyId=function(){return(i.color<<24)+this.slotIndex},o.prototype.setFrame=function(t,e,n,i,r,s){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.R]=n,this.frames[t+o.G]=i,this.frames[t+o.B]=r,this.frames[t+o.A]=s},o.prototype.apply=function(t,n,i,r,a,h,l){var u=t.slots[this.slotIndex];if(u.bone.active){var c=this.frames;if(i=c[c.length-o.ENTRIES]){var M=c.length;p=c[M+o.PREV_R],v=c[M+o.PREV_G],g=c[M+o.PREV_B],m=c[M+o.PREV_A]}else{var x=s.binarySearch(c,i,o.ENTRIES);p=c[x+o.PREV_R],v=c[x+o.PREV_G],g=c[x+o.PREV_B],m=c[x+o.PREV_A];var y=c[x],w=this.getCurvePercent(x/o.ENTRIES-1,1-(i-y)/(c[x+o.PREV_TIME]-y));p+=(c[x+o.R]-p)*w,v+=(c[x+o.G]-v)*w,g+=(c[x+o.B]-g)*w,m+=(c[x+o.A]-m)*w}if(1==a)u.color.set(p,v,g,m);else{f=u.color;h==e.setup&&f.setFromColor(u.data.color),f.add((p-f.r)*a,(v-f.g)*a,(g-f.b)*a,(m-f.a)*a)}}}},o.ENTRIES=5,o.PREV_TIME=-5,o.PREV_R=-4,o.PREV_G=-3,o.PREV_B=-2,o.PREV_A=-1,o.R=1,o.G=2,o.B=3,o.A=4,o}(o);t.ColorTimeline=c;var f=function(n){function o(e){var i=n.call(this,e)||this;return i.frames=t.Utils.newFloatArray(e*o.ENTRIES),i}return r(o,n),o.prototype.getPropertyId=function(){return(i.twoColor<<24)+this.slotIndex},o.prototype.setFrame=function(t,e,n,i,r,s,a,h,l){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.R]=n,this.frames[t+o.G]=i,this.frames[t+o.B]=r,this.frames[t+o.A]=s,this.frames[t+o.R2]=a,this.frames[t+o.G2]=h,this.frames[t+o.B2]=l},o.prototype.apply=function(t,n,i,r,a,h,l){var u=t.slots[this.slotIndex];if(u.bone.active){var c=this.frames;if(i=c[c.length-o.ENTRIES]){var E=c.length;g=c[E+o.PREV_R],m=c[E+o.PREV_G],M=c[E+o.PREV_B],x=c[E+o.PREV_A],y=c[E+o.PREV_R2],w=c[E+o.PREV_G2],b=c[E+o.PREV_B2]}else{var T=s.binarySearch(c,i,o.ENTRIES);g=c[T+o.PREV_R],m=c[T+o.PREV_G],M=c[T+o.PREV_B],x=c[T+o.PREV_A],y=c[T+o.PREV_R2],w=c[T+o.PREV_G2],b=c[T+o.PREV_B2];var A=c[T],R=this.getCurvePercent(T/o.ENTRIES-1,1-(i-A)/(c[T+o.PREV_TIME]-A));g+=(c[T+o.R]-g)*R,m+=(c[T+o.G]-m)*R,M+=(c[T+o.B]-M)*R,x+=(c[T+o.A]-x)*R,y+=(c[T+o.R2]-y)*R,w+=(c[T+o.G2]-w)*R,b+=(c[T+o.B2]-b)*R}if(1==a)u.color.set(g,m,M,x),u.darkColor.set(y,w,b,1);else{f=u.color,d=u.darkColor;h==e.setup&&(f.setFromColor(u.data.color),d.setFromColor(u.data.darkColor)),f.add((g-f.r)*a,(m-f.g)*a,(M-f.b)*a,(x-f.a)*a),d.add((y-d.r)*a,(w-d.g)*a,(b-d.b)*a,0)}}}},o.ENTRIES=8,o.PREV_TIME=-8,o.PREV_R=-7,o.PREV_G=-6,o.PREV_B=-5,o.PREV_A=-4,o.PREV_R2=-3,o.PREV_G2=-2,o.PREV_B2=-1,o.R=1,o.G=2,o.B=3,o.A=4,o.R2=5,o.G2=6,o.B2=7,o}(o);t.TwoColorTimeline=f;var d=function(){function r(e){this.frames=t.Utils.newFloatArray(e),this.attachmentNames=new Array(e)}return r.prototype.getPropertyId=function(){return(i.attachment<<24)+this.slotIndex},r.prototype.getFrameCount=function(){return this.frames.length},r.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.attachmentNames[t]=n},r.prototype.apply=function(t,i,r,o,a,h,l){var u=t.slots[this.slotIndex];if(u.bone.active)if(l!=n.mixOut||h!=e.setup){var c=this.frames;if(r=c[c.length-1]?c.length-1:s.binarySearch(c,r,1)-1;var p=this.attachmentNames[d];t.slots[this.slotIndex].setAttachment(null==p?null:t.getAttachment(this.slotIndex,p))}}else{var v=u.data.attachmentName;u.setAttachment(null==v?null:t.getAttachment(this.slotIndex,v))}},r}();t.AttachmentTimeline=d;var p=null,v=function(n){function o(e){var i=n.call(this,e)||this;return i.frames=t.Utils.newFloatArray(e),i.frameVertices=new Array(e),null==p&&(p=t.Utils.newFloatArray(64)),i}return r(o,n),o.prototype.getPropertyId=function(){return(i.deform<<27)+ +this.attachment.id+this.slotIndex},o.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.frameVertices[t]=n},o.prototype.apply=function(n,i,r,o,a,h,l){var u=n.slots[this.slotIndex];if(u.bone.active){var c=u.getAttachment();if(c instanceof t.VertexAttachment&&c.deformAttachment==this.attachment){var f=u.deform;0==f.length&&(h=e.setup);var d=this.frameVertices,p=d[0].length,v=this.frames;if(r=v[v.length-1]){var w=d[v.length-1];if(1==a)if(h==e.add)if(null==(g=c).bones){M=g.vertices;for(var b=0;bn)this.apply(t,e,Number.MAX_VALUE,i,r,o,a),e=-1;else if(e>=h[l-1])return;if(!(n0&&h[u-1]==c;)u--;for(;u=h[u];u++)i.push(this.events[u])}}},e}();t.EventTimeline=g;var m=function(){function r(e){this.frames=t.Utils.newFloatArray(e),this.drawOrders=new Array(e)}return r.prototype.getPropertyId=function(){return i.drawOrder<<24},r.prototype.getFrameCount=function(){return this.frames.length},r.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.drawOrders[t]=n},r.prototype.apply=function(i,r,o,a,h,l,u){var c=i.drawOrder,f=i.slots;if(u!=n.mixOut||l!=e.setup){var d=this.frames;if(o=d[d.length-1]?d.length-1:s.binarySearch(d,o)-1;var v=this.drawOrders[p];if(null==v)t.Utils.arrayCopy(f,0,c,0,f.length);else for(var g=0,m=v.length;g=c[c.length-a.ENTRIES])l==e.setup?(f.mix=f.data.mix+(c[c.length+a.PREV_MIX]-f.data.mix)*h,f.softness=f.data.softness+(c[c.length+a.PREV_SOFTNESS]-f.data.softness)*h,u==n.mixOut?(f.bendDirection=f.data.bendDirection,f.compress=f.data.compress,f.stretch=f.data.stretch):(f.bendDirection=c[c.length+a.PREV_BEND_DIRECTION],f.compress=0!=c[c.length+a.PREV_COMPRESS],f.stretch=0!=c[c.length+a.PREV_STRETCH])):(f.mix+=(c[c.length+a.PREV_MIX]-f.mix)*h,f.softness+=(c[c.length+a.PREV_SOFTNESS]-f.softness)*h,u==n.mixIn&&(f.bendDirection=c[c.length+a.PREV_BEND_DIRECTION],f.compress=0!=c[c.length+a.PREV_COMPRESS],f.stretch=0!=c[c.length+a.PREV_STRETCH]));else{var d=s.binarySearch(c,r,a.ENTRIES),p=c[d+a.PREV_MIX],v=c[d+a.PREV_SOFTNESS],g=c[d],m=this.getCurvePercent(d/a.ENTRIES-1,1-(r-g)/(c[d+a.PREV_TIME]-g));l==e.setup?(f.mix=f.data.mix+(p+(c[d+a.MIX]-p)*m-f.data.mix)*h,f.softness=f.data.softness+(v+(c[d+a.SOFTNESS]-v)*m-f.data.softness)*h,u==n.mixOut?(f.bendDirection=f.data.bendDirection,f.compress=f.data.compress,f.stretch=f.data.stretch):(f.bendDirection=c[d+a.PREV_BEND_DIRECTION],f.compress=0!=c[d+a.PREV_COMPRESS],f.stretch=0!=c[d+a.PREV_STRETCH])):(f.mix+=(p+(c[d+a.MIX]-p)*m-f.mix)*h,f.softness+=(v+(c[d+a.SOFTNESS]-v)*m-f.softness)*h,u==n.mixIn&&(f.bendDirection=c[d+a.PREV_BEND_DIRECTION],f.compress=0!=c[d+a.PREV_COMPRESS],f.stretch=0!=c[d+a.PREV_STRETCH]))}},a.ENTRIES=6,a.PREV_TIME=-6,a.PREV_MIX=-5,a.PREV_SOFTNESS=-4,a.PREV_BEND_DIRECTION=-3,a.PREV_COMPRESS=-2,a.PREV_STRETCH=-1,a.MIX=1,a.SOFTNESS=2,a.BEND_DIRECTION=3,a.COMPRESS=4,a.STRETCH=5,a}(o);t.IkConstraintTimeline=M;var x=function(n){function o(e){var i=n.call(this,e)||this;return i.frames=t.Utils.newFloatArray(e*o.ENTRIES),i}return r(o,n),o.prototype.getPropertyId=function(){return(i.transformConstraint<<24)+this.transformConstraintIndex},o.prototype.setFrame=function(t,e,n,i,r,s){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.ROTATE]=n,this.frames[t+o.TRANSLATE]=i,this.frames[t+o.SCALE]=r,this.frames[t+o.SHEAR]=s},o.prototype.apply=function(t,n,i,r,a,h,l){var u=this.frames,c=t.transformConstraints[this.transformConstraintIndex];if(c.active)if(i=u[u.length-o.ENTRIES]){var m=u.length;d=u[m+o.PREV_ROTATE],p=u[m+o.PREV_TRANSLATE],v=u[m+o.PREV_SCALE],g=u[m+o.PREV_SHEAR]}else{var M=s.binarySearch(u,i,o.ENTRIES);d=u[M+o.PREV_ROTATE],p=u[M+o.PREV_TRANSLATE],v=u[M+o.PREV_SCALE],g=u[M+o.PREV_SHEAR];var x=u[M],y=this.getCurvePercent(M/o.ENTRIES-1,1-(i-x)/(u[M+o.PREV_TIME]-x));d+=(u[M+o.ROTATE]-d)*y,p+=(u[M+o.TRANSLATE]-p)*y,v+=(u[M+o.SCALE]-v)*y,g+=(u[M+o.SHEAR]-g)*y}if(h==e.setup){f=c.data;c.rotateMix=f.rotateMix+(d-f.rotateMix)*a,c.translateMix=f.translateMix+(p-f.translateMix)*a,c.scaleMix=f.scaleMix+(v-f.scaleMix)*a,c.shearMix=f.shearMix+(g-f.shearMix)*a}else c.rotateMix+=(d-c.rotateMix)*a,c.translateMix+=(p-c.translateMix)*a,c.scaleMix+=(v-c.scaleMix)*a,c.shearMix+=(g-c.shearMix)*a}},o.ENTRIES=5,o.PREV_TIME=-5,o.PREV_ROTATE=-4,o.PREV_TRANSLATE=-3,o.PREV_SCALE=-2,o.PREV_SHEAR=-1,o.ROTATE=1,o.TRANSLATE=2,o.SCALE=3,o.SHEAR=4,o}(o);t.TransformConstraintTimeline=x;var y=function(n){function o(e){var i=n.call(this,e)||this;return i.frames=t.Utils.newFloatArray(e*o.ENTRIES),i}return r(o,n),o.prototype.getPropertyId=function(){return(i.pathConstraintPosition<<24)+this.pathConstraintIndex},o.prototype.setFrame=function(t,e,n){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.VALUE]=n},o.prototype.apply=function(t,n,i,r,a,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(c.active)if(i=u[u.length-o.ENTRIES])f=u[u.length+o.PREV_VALUE];else{var d=s.binarySearch(u,i,o.ENTRIES);f=u[d+o.PREV_VALUE];var p=u[d],v=this.getCurvePercent(d/o.ENTRIES-1,1-(i-p)/(u[d+o.PREV_TIME]-p));f+=(u[d+o.VALUE]-f)*v}h==e.setup?c.position=c.data.position+(f-c.data.position)*a:c.position+=(f-c.position)*a}},o.ENTRIES=2,o.PREV_TIME=-2,o.PREV_VALUE=-1,o.VALUE=1,o}(o);t.PathConstraintPositionTimeline=y;var w=function(t){function n(e){return t.call(this,e)||this}return r(n,t),n.prototype.getPropertyId=function(){return(i.pathConstraintSpacing<<24)+this.pathConstraintIndex},n.prototype.apply=function(t,i,r,o,a,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(c.active)if(r=u[u.length-n.ENTRIES])f=u[u.length+n.PREV_VALUE];else{var d=s.binarySearch(u,r,n.ENTRIES);f=u[d+n.PREV_VALUE];var p=u[d],v=this.getCurvePercent(d/n.ENTRIES-1,1-(r-p)/(u[d+n.PREV_TIME]-p));f+=(u[d+n.VALUE]-f)*v}h==e.setup?c.spacing=c.data.spacing+(f-c.data.spacing)*a:c.spacing+=(f-c.spacing)*a}},n}(y);t.PathConstraintSpacingTimeline=w;var b=function(n){function o(e){var i=n.call(this,e)||this;return i.frames=t.Utils.newFloatArray(e*o.ENTRIES),i}return r(o,n),o.prototype.getPropertyId=function(){return(i.pathConstraintMix<<24)+this.pathConstraintIndex},o.prototype.setFrame=function(t,e,n,i){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.ROTATE]=n,this.frames[t+o.TRANSLATE]=i},o.prototype.apply=function(t,n,i,r,a,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(c.active)if(i=u[u.length-o.ENTRIES])f=u[u.length+o.PREV_ROTATE],d=u[u.length+o.PREV_TRANSLATE];else{var p=s.binarySearch(u,i,o.ENTRIES);f=u[p+o.PREV_ROTATE],d=u[p+o.PREV_TRANSLATE];var v=u[p],g=this.getCurvePercent(p/o.ENTRIES-1,1-(i-v)/(u[p+o.PREV_TIME]-v));f+=(u[p+o.ROTATE]-f)*g,d+=(u[p+o.TRANSLATE]-d)*g}h==e.setup?(c.rotateMix=c.data.rotateMix+(f-c.data.rotateMix)*a,c.translateMix=c.data.translateMix+(d-c.data.translateMix)*a):(c.rotateMix+=(f-c.rotateMix)*a,c.translateMix+=(d-c.translateMix)*a)}},o.ENTRIES=3,o.PREV_TIME=-3,o.PREV_ROTATE=-2,o.PREV_TRANSLATE=-1,o.ROTATE=1,o.TRANSLATE=2,o}(o);t.PathConstraintMixTimeline=b}(i||(i={})),function(t){var e=function(){function e(e){this.tracks=new Array,this.timeScale=1,this.events=new Array,this.listeners=new Array,this.queue=new r(this),this.propertyIDs=new t.IntSet,this.animationsChanged=!1,this.trackEntryPool=new t.Pool(function(){return new n}),this.data=e}return e.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,n=0,i=e.length;n0){if(r.delay-=s,r.delay>0)continue;s=-r.delay,r.delay=0}var o=r.next;if(null!=o){var a=r.trackLast-o.delay;if(a>=0){for(o.delay=0,o.trackTime+=0==r.timeScale?0:(a/r.timeScale+t)*o.timeScale,r.trackTime+=s,this.setCurrent(n,o,!0);null!=o.mixingFrom;)o.mixTime+=t,o=o.mixingFrom;continue}}else if(r.trackLast>=r.trackEnd&&null==r.mixingFrom){e[n]=null,this.queue.end(r),this.disposeNext(r);continue}if(null!=r.mixingFrom&&this.updateMixingFrom(r,t)){var h=r.mixingFrom;for(r.mixingFrom=null,null!=h&&(h.mixingTo=null);null!=h;)this.queue.end(h),h=h.mixingFrom}r.trackTime+=s}}this.queue.drain()},e.prototype.updateMixingFrom=function(t,e){var n=t.mixingFrom;if(null==n)return!0;var i=this.updateMixingFrom(n,e);return n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,t.mixTime>0&&t.mixTime>=t.mixDuration?(0!=n.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=n.mixingFrom,null!=n.mixingFrom&&(n.mixingFrom.mixingTo=t),t.interruptAlpha=n.interruptAlpha,this.queue.end(n)),i):(n.trackTime+=e*n.timeScale,t.mixTime+=e,!1)},e.prototype.apply=function(n){if(null==n)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var i=this.events,r=this.tracks,s=!1,o=0,a=r.length;o0)){s=!0;var l=0==o?t.MixBlend.first:h.mixBlend,u=h.alpha;null!=h.mixingFrom?u*=this.applyMixingFrom(h,n,l):h.trackTime>=h.trackEnd&&null==h.next&&(u=0);var c=h.animationLast,f=h.getAnimationTime(),d=h.animation.timelines.length,p=h.animation.timelines;if(0==o&&1==u||l==t.MixBlend.add)for(var v=0;v1&&(o=1),r!=t.MixBlend.first&&(r=s.mixBlend));var a=o0&&this.queueEvents(s,c),this.events.length=0,s.nextAnimationLast=c,s.nextTrackLast=s.trackTime,o},e.prototype.applyRotateTimeline=function(e,n,i,r,s,o,a,h){if(h&&(o[a]=0),1!=r){var l=e,u=l.frames,c=n.bones[l.boneIndex];if(c.active){var f=0,d=0;if(i=u[u.length-t.RotateTimeline.ENTRIES])d=c.data.rotation+u[u.length+t.RotateTimeline.PREV_ROTATION];else{var p=t.Animation.binarySearch(u,i,t.RotateTimeline.ENTRIES),v=u[p+t.RotateTimeline.PREV_ROTATION],g=u[p],m=l.getCurvePercent((p>>1)-1,1-(i-g)/(u[p+t.RotateTimeline.PREV_TIME]-g));d=u[p+t.RotateTimeline.ROTATION]-v,d=v+(d-=360*(16384-(16384.499999999996-d/360|0)))*m+c.data.rotation,d-=360*(16384-(16384.499999999996-d/360|0))}var M=0,x=d-f;if(0==(x-=360*(16384-(16384.499999999996-x/360|0))))M=o[a];else{var y=0,w=0;h?(y=0,w=x):(y=o[a],w=o[a+1]);var b=x>0,E=y>=0;t.MathUtils.signum(w)!=t.MathUtils.signum(x)&&Math.abs(w)<=90&&(Math.abs(y)>180&&(y+=360*t.MathUtils.signum(y)),E=b),M=x+y-y%360,E!=b&&(M+=360*t.MathUtils.signum(y)),o[a]=M}o[a+1]=x,f+=M*r,c.rotation=f-360*(16384-(16384.499999999996-f/360|0))}}else e.apply(n,0,i,null,1,s,t.MixDirection.mixIn)},e.prototype.queueEvents=function(t,e){for(var n=t.animationStart,i=t.animationEnd,r=i-n,s=t.trackLast%r,o=this.events,a=0,h=o.length;ai||this.queue.event(t,l)}for((t.loop?0==r||s>t.trackTime%r:e>=i&&t.animationLast=this.tracks.length)){var e=this.tracks[t];if(null!=e){this.queue.end(e),this.disposeNext(e);for(var n=e;;){var i=n.mixingFrom;if(null==i)break;this.queue.end(i),n.mixingFrom=null,n.mixingTo=null,n=i}this.tracks[e.trackIndex]=null,this.queue.drain()}}},e.prototype.setCurrent=function(t,e,n){var i=this.expandToIndex(t);this.tracks[t]=e,null!=i&&(n&&this.queue.interrupt(i),e.mixingFrom=i,i.mixingTo=e,e.mixTime=0,null!=i.mixingFrom&&i.mixDuration>0&&(e.interruptAlpha*=Math.min(1,i.mixTime/i.mixDuration)),i.timelinesRotation.length=0),this.queue.start(e)},e.prototype.setAnimation=function(t,e,n){var i=this.data.skeletonData.findAnimation(e);if(null==i)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,i,n)},e.prototype.setAnimationWith=function(t,e,n){if(null==e)throw new Error("animation cannot be null.");var i=!0,r=this.expandToIndex(t);null!=r&&(-1==r.nextTrackLast?(this.tracks[t]=r.mixingFrom,this.queue.interrupt(r),this.queue.end(r),this.disposeNext(r),r=r.mixingFrom,i=!1):this.disposeNext(r));var s=this.trackEntry(t,e,n,r);return this.setCurrent(t,s,i),this.queue.drain(),s},e.prototype.addAnimation=function(t,e,n,i){var r=this.data.skeletonData.findAnimation(e);if(null==r)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,r,n,i)},e.prototype.addAnimationWith=function(t,e,n,i){if(null==e)throw new Error("animation cannot be null.");var r=this.expandToIndex(t);if(null!=r)for(;null!=r.next;)r=r.next;var s=this.trackEntry(t,e,n,r);if(null==r)this.setCurrent(t,s,!0),this.queue.drain();else if(r.next=s,i<=0){var o=r.animationEnd-r.animationStart;0!=o?(r.loop?i+=o*(1+(r.trackTime/o|0)):i+=Math.max(o,r.trackTime),i-=this.data.getMix(r.animation,e)):i=r.trackTime}return s.delay=i,s},e.prototype.setEmptyAnimation=function(t,n){var i=this.setAnimationWith(t,e.emptyAnimation,!1);return i.mixDuration=n,i.trackEnd=n,i},e.prototype.addEmptyAnimation=function(t,n,i){i<=0&&(i-=n);var r=this.addAnimationWith(t,e.emptyAnimation,!1,i);return r.mixDuration=n,r.trackEnd=n,r},e.prototype.setEmptyAnimations=function(t){var e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var n=0,i=this.tracks.length;n=0;e--)for(var i=this.tracks[e];null!=i;)this.computeNotLast(i),i=i.mixingFrom},e.prototype.computeHold=function(n){var i=n.mixingTo,r=n.animation.timelines,s=n.animation.timelines.length,o=t.Utils.setArraySize(n.timelineMode,s);n.timelineHoldMix.length=0;var a=t.Utils.setArraySize(n.timelineHoldMix,s),h=this.propertyIDs;if(null!=i&&i.holdPrevious)for(var l=0;l0){o[l]=e.HOLD_MIX,a[l]=f;continue t}break}o[l]=e.HOLD}else o[l]=e.SUBSEQUENT}},e.prototype.computeNotLast=function(n){for(var i=n.animation.timelines,r=n.animation.timelines.length,s=n.timelineMode,o=this.propertyIDs,a=0;a=this.tracks.length?null:this.tracks[t]},e.prototype.addListener=function(t){if(null==t)throw new Error("listener cannot be null.");this.listeners.push(t)},e.prototype.removeListener=function(t){var e=this.listeners.indexOf(t);e>=0&&this.listeners.splice(e,1)},e.prototype.clearListeners=function(){this.listeners.length=0},e.prototype.clearListenerNotifications=function(){this.queue.clear()},e.emptyAnimation=new t.Animation("",[],0),e.SUBSEQUENT=0,e.FIRST=1,e.HOLD=2,e.HOLD_MIX=3,e.NOT_LAST=4,e}();t.AnimationState=e;var n=function(){function e(){this.mixBlend=t.MixBlend.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}return e.prototype.reset=function(){this.next=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0},e.prototype.getAnimationTime=function(){if(this.loop){var t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)},e.prototype.setAnimationLast=function(t){this.animationLast=t,this.nextAnimationLast=t},e.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},e.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},e}();t.TrackEntry=n;var i,r=function(){function t(t){this.objects=[],this.drainDisabled=!1,this.animState=t}return t.prototype.start=function(t){this.objects.push(i.start),this.objects.push(t),this.animState.animationsChanged=!0},t.prototype.interrupt=function(t){this.objects.push(i.interrupt),this.objects.push(t)},t.prototype.end=function(t){this.objects.push(i.end),this.objects.push(t),this.animState.animationsChanged=!0},t.prototype.dispose=function(t){this.objects.push(i.dispose),this.objects.push(t)},t.prototype.complete=function(t){this.objects.push(i.complete),this.objects.push(t)},t.prototype.event=function(t,e){this.objects.push(i.event),this.objects.push(t),this.objects.push(e)},t.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var t=this.objects,e=this.animState.listeners,n=0;n=0?n.substring(0,n.lastIndexOf("/")):"";n=this.pathPrefix+n,this.toLoad++,e.downloadText(n,function(e){var a={count:0},h=new Array;try{new t.TextureAtlas(e,function(e){h.push(o+"/"+e);var n=document.createElement("img");return n.width=16,n.height=16,new t.FakeTexture(n)})}catch(t){var l=t;return s.errors[n]="Couldn't load texture atlas "+n+": "+l.message,r&&r(n,"Couldn't load texture atlas "+n+": "+l.message),s.toLoad--,void s.loaded++}for(var u=function(l){var u=!1;s.loadTexture(l,function(l,c){if(a.count++,a.count==h.length)if(u)s.errors[n]="Couldn't load texture atlas page "+l+"} of atlas "+n,r&&r(n,"Couldn't load texture atlas page "+l+" of atlas "+n),s.toLoad--,s.loaded++;else try{var f=new t.TextureAtlas(e,function(t){return s.get(o+"/"+t)});s.assets[n]=f,i&&i(n,f),s.toLoad--,s.loaded++}catch(t){var d=t;s.errors[n]="Couldn't load texture atlas "+n+": "+d.message,r&&r(n,"Couldn't load texture atlas "+n+": "+d.message),s.toLoad--,s.loaded++}},function(t,e){u=!0,a.count++,a.count==h.length&&(s.errors[n]="Couldn't load texture atlas page "+t+"} of atlas "+n,r&&r(n,"Couldn't load texture atlas page "+t+" of atlas "+n),s.toLoad--,s.loaded++)})},c=0,f=h;c0},e.prototype.getErrors=function(){return this.errors},e}();t.AssetManager=e}(i||(i={})),function(t){var e=function(){function e(t){this.atlas=t}return e.prototype.newRegionAttachment=function(e,n,i){var r=this.atlas.findRegion(i);if(null==r)throw new Error("Region not found in atlas: "+i+" (region attachment: "+n+")");r.renderObject=r;var s=new t.RegionAttachment(n);return s.setRegion(r),s},e.prototype.newMeshAttachment=function(e,n,i){var r=this.atlas.findRegion(i);if(null==r)throw new Error("Region not found in atlas: "+i+" (mesh attachment: "+n+")");r.renderObject=r;var s=new t.MeshAttachment(n);return s.region=r,s},e.prototype.newBoundingBoxAttachment=function(e,n){return new t.BoundingBoxAttachment(n)},e.prototype.newPathAttachment=function(e,n){return new t.PathAttachment(n)},e.prototype.newPointAttachment=function(e,n){return new t.PointAttachment(n)},e.prototype.newClippingAttachment=function(e,n){return new t.ClippingAttachment(n)},e}();t.AtlasAttachmentLoader=e}(i||(i={})),function(t){!function(t){t[t.Normal=0]="Normal",t[t.Additive=1]="Additive",t[t.Multiply=2]="Multiply",t[t.Screen=3]="Screen"}(t.BlendMode||(t.BlendMode={}))}(i||(i={})),function(t){var e=function(){function e(t,e,n){if(this.children=new Array,this.x=0,this.y=0,this.rotation=0,this.scaleX=0,this.scaleY=0,this.shearX=0,this.shearY=0,this.ax=0,this.ay=0,this.arotation=0,this.ascaleX=0,this.ascaleY=0,this.ashearX=0,this.ashearY=0,this.appliedValid=!1,this.a=0,this.b=0,this.c=0,this.d=0,this.worldY=0,this.worldX=0,this.sorted=!1,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.skeleton=e,this.parent=n,this.setToSetupPose()}return e.prototype.isActive=function(){return this.active},e.prototype.update=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},e.prototype.updateWorldTransform=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},e.prototype.updateWorldTransformWith=function(e,n,i,r,s,o,a){this.ax=e,this.ay=n,this.arotation=i,this.ascaleX=r,this.ascaleY=s,this.ashearX=o,this.ashearY=a,this.appliedValid=!0;var h=this.parent;if(null==h){var l=this.skeleton,u=i+90+a,c=l.scaleX,f=l.scaleY;return this.a=t.MathUtils.cosDeg(i+o)*r*c,this.b=t.MathUtils.cosDeg(u)*s*c,this.c=t.MathUtils.sinDeg(i+o)*r*f,this.d=t.MathUtils.sinDeg(u)*s*f,this.worldX=e*c+l.x,void(this.worldY=n*f+l.y)}var d=h.a,p=h.b,v=h.c,g=h.d;switch(this.worldX=d*e+p*n+h.worldX,this.worldY=v*e+g*n+h.worldY,this.data.transformMode){case t.TransformMode.Normal:u=i+90+a;var m=t.MathUtils.cosDeg(i+o)*r,M=t.MathUtils.cosDeg(u)*s,x=t.MathUtils.sinDeg(i+o)*r,y=t.MathUtils.sinDeg(u)*s;return this.a=d*m+p*x,this.b=d*M+p*y,this.c=v*m+g*x,void(this.d=v*M+g*y);case t.TransformMode.OnlyTranslation:u=i+90+a;this.a=t.MathUtils.cosDeg(i+o)*r,this.b=t.MathUtils.cosDeg(u)*s,this.c=t.MathUtils.sinDeg(i+o)*r,this.d=t.MathUtils.sinDeg(u)*s;break;case t.TransformMode.NoRotationOrReflection:var w=0;(T=d*d+v*v)>1e-4?(p=v*(T=Math.abs(d*g-p*v)/T),g=d*T,w=Math.atan2(v,d)*t.MathUtils.radDeg):(d=0,v=0,w=90-Math.atan2(g,p)*t.MathUtils.radDeg);var b=i+o-w,E=i+a-w+90;m=t.MathUtils.cosDeg(b)*r,M=t.MathUtils.cosDeg(E)*s,x=t.MathUtils.sinDeg(b)*r,y=t.MathUtils.sinDeg(E)*s;this.a=d*m-p*x,this.b=d*M-p*y,this.c=v*m+g*x,this.d=v*M+g*y;break;case t.TransformMode.NoScale:case t.TransformMode.NoScaleOrReflection:var T,A=t.MathUtils.cosDeg(i),R=t.MathUtils.sinDeg(i),S=(d*A+p*R)/this.skeleton.scaleX,I=(v*A+g*R)/this.skeleton.scaleY;(T=Math.sqrt(S*S+I*I))>1e-5&&(T=1/T),S*=T,I*=T,T=Math.sqrt(S*S+I*I),this.data.transformMode==t.TransformMode.NoScale&&d*g-p*v<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(T=-T);var C=Math.PI/2+Math.atan2(I,S),P=Math.cos(C)*T,L=Math.sin(C)*T;m=t.MathUtils.cosDeg(o)*r,M=t.MathUtils.cosDeg(90+a)*s,x=t.MathUtils.sinDeg(o)*r,y=t.MathUtils.sinDeg(90+a)*s;this.a=S*m+P*x,this.b=S*M+P*y,this.c=I*m+L*x,this.d=I*M+L*y}this.a*=this.skeleton.scaleX,this.b*=this.skeleton.scaleX,this.c*=this.skeleton.scaleY,this.d*=this.skeleton.scaleY},e.prototype.setToSetupPose=function(){var t=this.data;this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this.shearX=t.shearX,this.shearY=t.shearY},e.prototype.getWorldRotationX=function(){return Math.atan2(this.c,this.a)*t.MathUtils.radDeg},e.prototype.getWorldRotationY=function(){return Math.atan2(this.d,this.b)*t.MathUtils.radDeg},e.prototype.getWorldScaleX=function(){return Math.sqrt(this.a*this.a+this.c*this.c)},e.prototype.getWorldScaleY=function(){return Math.sqrt(this.b*this.b+this.d*this.d)},e.prototype.updateAppliedTransform=function(){this.appliedValid=!0;var e=this.parent;if(null==e)return this.ax=this.worldX,this.ay=this.worldY,this.arotation=Math.atan2(this.c,this.a)*t.MathUtils.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,void(this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*t.MathUtils.radDeg);var n=e.a,i=e.b,r=e.c,s=e.d,o=1/(n*s-i*r),a=this.worldX-e.worldX,h=this.worldY-e.worldY;this.ax=a*s*o-h*i*o,this.ay=h*n*o-a*r*o;var l=o*s,u=o*n,c=o*i,f=o*r,d=l*this.a-c*this.c,p=l*this.b-c*this.d,v=u*this.c-f*this.a,g=u*this.d-f*this.b;if(this.ashearX=0,this.ascaleX=Math.sqrt(d*d+v*v),this.ascaleX>1e-4){var m=d*g-p*v;this.ascaleY=m/this.ascaleX,this.ashearY=Math.atan2(d*p+v*g,m)*t.MathUtils.radDeg,this.arotation=Math.atan2(v,d)*t.MathUtils.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(p*p+g*g),this.ashearY=0,this.arotation=90-Math.atan2(g,p)*t.MathUtils.radDeg},e.prototype.worldToLocal=function(t){var e=this.a,n=this.b,i=this.c,r=this.d,s=1/(e*r-n*i),o=t.x-this.worldX,a=t.y-this.worldY;return t.x=o*r*s-a*n*s,t.y=a*e*s-o*i*s,t},e.prototype.localToWorld=function(t){var e=t.x,n=t.y;return t.x=e*this.a+n*this.b+this.worldX,t.y=e*this.c+n*this.d+this.worldY,t},e.prototype.worldToLocalRotation=function(e){var n=t.MathUtils.sinDeg(e),i=t.MathUtils.cosDeg(e);return Math.atan2(this.a*n-this.c*i,this.d*i-this.b*n)*t.MathUtils.radDeg+this.rotation-this.shearX},e.prototype.localToWorldRotation=function(e){e-=this.rotation-this.shearX;var n=t.MathUtils.sinDeg(e),i=t.MathUtils.cosDeg(e);return Math.atan2(i*this.c+n*this.d,i*this.a+n*this.b)*t.MathUtils.radDeg},e.prototype.rotateWorld=function(e){var n=this.a,i=this.b,r=this.c,s=this.d,o=t.MathUtils.cosDeg(e),a=t.MathUtils.sinDeg(e);this.a=o*n-a*r,this.b=o*i-a*s,this.c=a*n+o*r,this.d=a*i+o*s,this.appliedValid=!1},e}();t.Bone=e}(i||(i={})),function(t){var e,n=function(){return function(n,i,r){if(this.x=0,this.y=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.shearX=0,this.shearY=0,this.transformMode=e.Normal,this.skinRequired=!1,this.color=new t.Color,n<0)throw new Error("index must be >= 0.");if(null==i)throw new Error("name cannot be null.");this.index=n,this.name=i,this.parent=r}}();t.BoneData=n,function(t){t[t.Normal=0]="Normal",t[t.OnlyTranslation=1]="OnlyTranslation",t[t.NoRotationOrReflection=2]="NoRotationOrReflection",t[t.NoScale=3]="NoScale",t[t.NoScaleOrReflection=4]="NoScaleOrReflection"}(e=t.TransformMode||(t.TransformMode={}))}(i||(i={})),function(t){var e=function(){return function(t,e,n){this.name=t,this.order=e,this.skinRequired=n}}();t.ConstraintData=e}(i||(i={})),function(t){var e=function(){return function(t,e){if(null==e)throw new Error("data cannot be null.");this.time=t,this.data=e}}();t.Event=e}(i||(i={})),function(t){var e=function(){return function(t){this.name=t}}();t.EventData=e}(i||(i={})),function(t){var e=function(){function e(t,e){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.mix=t.mix,this.softness=t.softness,this.bendDirection=t.bendDirection,this.compress=t.compress,this.stretch=t.stretch,this.bones=new Array;for(var n=0;n180?p-=360:p<-180&&(p+=360);var v=e.ascaleX,g=e.ascaleY;if(r||s){var m=e.data.length*v,M=Math.sqrt(f*f+d*d);if(r&&Mm&&m>1e-4){var x=(M/m-1)*a+1;v*=x,o&&(g*=x)}}e.updateWorldTransformWith(e.ax,e.ay,e.arotation+p*a,v,g,e.ashearX,e.ashearY)},e.prototype.apply2=function(e,n,i,r,s,o,a,h){if(0!=h){e.appliedValid||e.updateAppliedTransform(),n.appliedValid||n.updateAppliedTransform();var l=e.ax,u=e.ay,c=e.ascaleX,f=c,d=e.ascaleY,p=n.ascaleX,v=0,g=0,m=0;c<0?(c=-c,v=180,m=-1):(v=0,m=1),d<0&&(d=-d,m=-m),p<0?(p=-p,g=180):g=0;var M=n.ax,x=0,y=0,w=0,b=e.a,E=e.b,T=e.c,A=e.d,R=Math.abs(c-d)<=1e-4;R?(y=b*M+E*(x=n.ay)+e.worldX,w=T*M+A*x+e.worldY):(x=0,y=b*M+e.worldX,w=T*M+e.worldY);var S=e.parent;b=S.a,E=S.b,T=S.c;var I,C,P=1/(b*(A=S.d)-E*T),L=y-S.worldX,k=w-S.worldY,_=(L*A-k*E)*P-l,F=(k*b-L*T)*P-u,V=Math.sqrt(_*_+F*F),O=n.data.length*p;if(V<1e-4)return this.apply1(e,i,r,!1,o,!1,h),void n.updateWorldTransformWith(M,x,0,n.ascaleX,n.ascaleY,n.ashearX,n.ashearY);var D=((L=i-S.worldX)*A-(k=r-S.worldY)*E)*P-l,N=(k*b-L*T)*P-u,U=D*D+N*N;if(0!=a){a*=c*(p+1)/2;var X=Math.sqrt(U),B=X-V-O*c+a;if(B>0){var Y=Math.min(1,B/(2*a))-1;U=(D-=(Y=(B-a*(1-Y*Y))/X)*D)*D+(N-=Y*N)*N}}t:if(R){var z=(U-V*V-(O*=c)*O)/(2*V*O);z<-1?z=-1:z>1&&(z=1,o&&(f*=(Math.sqrt(U)/(V+O)-1)*h+1)),C=Math.acos(z)*s,b=V+O*z,E=O*Math.sin(C),I=Math.atan2(N*b-D*E,D*b+N*E)}else{var W=(b=c*O)*b,q=(E=d*O)*E,G=Math.atan2(N,D),H=-2*q*V,j=q-W;if((A=H*H-4*j*(T=q*V*V+W*U-W*q))>=0){var Z=Math.sqrt(A);H<0&&(Z=-Z);var K=(Z=-(H+Z)/2)/j,Q=T/Z,J=Math.abs(K)=-1&&T<=1&&(T=Math.acos(T),(A=(L=b*Math.cos(T)+V)*L+(k=E*Math.sin(T))*k)st&&(it=T,st=A,rt=L,ot=k)),U<=(et+st)/2?(I=G-Math.atan2(nt*s,tt),C=$*s):(I=G-Math.atan2(ot*s,rt),C=it*s)}var at=Math.atan2(x,M)*m,ht=e.arotation;(I=(I-at)*t.MathUtils.radDeg+v-ht)>180?I-=360:I<-180&&(I+=360),e.updateWorldTransformWith(l,u,ht+I*h,f,e.ascaleY,0,0),ht=n.arotation,(C=((C+at)*t.MathUtils.radDeg-n.ashearX)*m+g-ht)>180?C-=360:C<-180&&(C+=360),n.updateWorldTransformWith(M,x,ht+C*h,n.ascaleX,n.ascaleY,n.ashearX,n.ashearY)}else n.updateWorldTransform()},e}();t.IkConstraint=e}(i||(i={})),function(t){var e=function(t){function e(e){var n=t.call(this,e,0,!1)||this;return n.bones=new Array,n.bendDirection=1,n.compress=!1,n.stretch=!1,n.uniform=!1,n.mix=1,n.softness=0,n}return r(e,t),e}(t.ConstraintData);t.IkConstraintData=e}(i||(i={})),function(t){var e=function(){function e(t,e){if(this.position=0,this.spacing=0,this.rotateMix=0,this.translateMix=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.bones=new Array;for(var n=0,i=t.bones.length;n0;if(r>0||s){var o=this.data,a=o.spacingMode==t.SpacingMode.Percent,h=o.rotateMode,l=h==t.RotateMode.Tangent,u=h==t.RotateMode.ChainScale,c=this.bones.length,f=l?c:c+1,d=this.bones,p=t.Utils.setArraySize(this.spaces,f),v=null,g=this.spacing;if(u||!a){u&&(v=t.Utils.setArraySize(this.lengths,c));for(var m=o.spacingMode==t.SpacingMode.Length,M=0,x=f-1;M0?t.MathUtils.degRad:-t.MathUtils.degRad;M=0;for(var P=3;Mt.MathUtils.PI?X-=t.MathUtils.PI2:X<-t.MathUtils.PI&&(X+=t.MathUtils.PI2),X*=i,B=Math.cos(X),Y=Math.sin(X),L.a=B*O-Y*N,L.b=B*D-Y*U,L.c=Y*O+B*N,L.d=Y*D+B*U}L.appliedValid=!1}}}},e.prototype.computeWorldPositions=function(n,i,r,s,o){var a=this.target,h=this.position,l=this.spaces,u=t.Utils.setArraySize(this.positions,3*i+2),c=null,f=n.closed,d=n.worldVerticesLength,p=d/6,v=e.NONE;if(!n.constantSpeed){var g=n.lengths,m=g[p-=f?1:2];if(s&&(h*=m),o)for(var M=1;Mm){v!=e.AFTER&&(v=e.AFTER,n.computeWorldVertices(a,d-6,4,c,0,2)),this.addAfterPosition(w-m,c,0,u,x);continue}}for(;;y++){var b=g[y];if(!(w>b)){if(0==y)w/=b;else w=(w-(Z=g[y-1]))/(b-Z);break}}y!=v&&(v=y,f&&y==p?(n.computeWorldVertices(a,d-4,4,c,0,2),n.computeWorldVertices(a,0,4,c,4,2)):n.computeWorldVertices(a,6*y+2,8,c,0,2)),this.addCurvePosition(w,c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],u,x,r||M>0&&0==q)}return u}f?(d+=2,c=t.Utils.setArraySize(this.world,d),n.computeWorldVertices(a,2,d-4,c,0,2),n.computeWorldVertices(a,0,2,c,d-4,2),c[d-2]=c[0],c[d-1]=c[1]):(p--,d-=4,c=t.Utils.setArraySize(this.world,d),n.computeWorldVertices(a,2,d,c,0,2));for(var E=t.Utils.setArraySize(this.curves,p),T=0,A=c[0],R=c[1],S=0,I=0,C=0,P=0,L=0,k=0,_=0,F=0,V=0,O=0,D=0,N=0,U=0,X=0,B=(M=0,2);MT){this.addAfterPosition(w-T,c,d-4,u,x);continue}}for(;;y++){var G=E[y];if(!(w>G)){if(0==y)w/=G;else w=(w-(Z=E[y-1]))/(G-Z);break}}if(y!=v){v=y;var H=6*y;for(A=c[H],R=c[H+1],S=c[H+2],I=c[H+3],C=c[H+4],P=c[H+5],L=c[H+6],k=c[H+7],D=2*(_=.03*(A-2*S+C))+(V=.006*(3*(S-C)-A+L)),N=2*(F=.03*(R-2*I+P))+(O=.006*(3*(I-P)-R+k)),U=.3*(S-A)+_+.16666667*V,X=.3*(I-R)+F+.16666667*O,z=Math.sqrt(U*U+X*X),Y[0]=z,H=1;H<8;H++)U+=D,X+=N,D+=V,N+=O,z+=Math.sqrt(U*U+X*X),Y[H]=z;U+=D,X+=N,z+=Math.sqrt(U*U+X*X),Y[8]=z,U+=D+V,X+=N+O,z+=Math.sqrt(U*U+X*X),Y[9]=z,W=0}for(w*=z;;W++){var j=Y[W];if(!(w>j)){var Z;if(0==W)w/=j;else w=W+(w-(Z=Y[W-1]))/(j-Z);break}}this.addCurvePosition(.1*w,A,R,S,I,C,P,L,k,u,x,r||M>0&&0==q)}return u},e.prototype.addBeforePosition=function(t,e,n,i,r){var s=e[n],o=e[n+1],a=e[n+2]-s,h=e[n+3]-o,l=Math.atan2(h,a);i[r]=s+t*Math.cos(l),i[r+1]=o+t*Math.sin(l),i[r+2]=l},e.prototype.addAfterPosition=function(t,e,n,i,r){var s=e[n+2],o=e[n+3],a=s-e[n],h=o-e[n+1],l=Math.atan2(h,a);i[r]=s+t*Math.cos(l),i[r+1]=o+t*Math.sin(l),i[r+2]=l},e.prototype.addCurvePosition=function(t,e,n,i,r,s,o,a,h,l,u,c){if(0==t||isNaN(t))return l[u]=e,l[u+1]=n,void(l[u+2]=Math.atan2(r-n,i-e));var f=t*t,d=f*t,p=1-t,v=p*p,g=v*p,m=p*t,M=3*m,x=p*M,y=M*t,w=e*g+i*x+s*y+a*d,b=n*g+r*x+o*y+h*d;l[u]=w,l[u+1]=b,c&&(l[u+2]=t<.001?Math.atan2(r-n,i-e):Math.atan2(b-(n*v+r*m*2+o*f),w-(e*v+i*m*2+s*f)))},e.NONE=-1,e.BEFORE=-2,e.AFTER=-3,e.epsilon=1e-5,e}();t.PathConstraint=e}(i||(i={})),function(t){var e=function(t){function e(e){var n=t.call(this,e,0,!1)||this;return n.bones=new Array,n}return r(e,t),e}(t.ConstraintData);t.PathConstraintData=e,function(t){t[t.Fixed=0]="Fixed",t[t.Percent=1]="Percent"}(t.PositionMode||(t.PositionMode={})),function(t){t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent"}(t.SpacingMode||(t.SpacingMode={})),function(t){t[t.Tangent=0]="Tangent",t[t.Chain=1]="Chain",t[t.ChainScale=2]="ChainScale"}(t.RotateMode||(t.RotateMode={}))}(i||(i={})),function(t){var e=function(){function t(t){this.toLoad=new Array,this.assets={},this.clientId=t}return t.prototype.loaded=function(){var t=0;for(var e in this.assets)t++;return t},t}(),n=function(){function t(t){void 0===t&&(t=""),this.clientAssets={},this.queuedAssets={},this.rawAssets={},this.errors={},this.pathPrefix=t}return t.prototype.queueAsset=function(t,n,i){var r=this.clientAssets[t];return null!==r&&void 0!==r||(r=new e(t),this.clientAssets[t]=r),null!==n&&(r.textureLoader=n),r.toLoad.push(i),this.queuedAssets[i]!==i&&(this.queuedAssets[i]=i,!0)},t.prototype.loadText=function(t,e){var n=this;if(e=this.pathPrefix+e,this.queueAsset(t,null,e)){var i=new XMLHttpRequest;i.onreadystatechange=function(){i.readyState==XMLHttpRequest.DONE&&(i.status>=200&&i.status<300?n.rawAssets[e]=i.responseText:n.errors[e]="Couldn't load text "+e+": status "+i.status+", "+i.responseText)},i.open("GET",e,!0),i.send()}},t.prototype.loadJson=function(t,e){var n=this;if(e=this.pathPrefix+e,this.queueAsset(t,null,e)){var i=new XMLHttpRequest;i.onreadystatechange=function(){i.readyState==XMLHttpRequest.DONE&&(i.status>=200&&i.status<300?n.rawAssets[e]=JSON.parse(i.responseText):n.errors[e]="Couldn't load text "+e+": status "+i.status+", "+i.responseText)},i.open("GET",e,!0),i.send()}},t.prototype.loadTexture=function(t,e,n){var i=this;if(n=this.pathPrefix+n,this.queueAsset(t,e,n)){var r=new Image;r.src=n,r.crossOrigin="anonymous",r.onload=function(t){i.rawAssets[n]=r},r.onerror=function(t){i.errors[n]="Couldn't load image "+n}}},t.prototype.get=function(t,e){e=this.pathPrefix+e;var n=this.clientAssets[t];return null===n||void 0===n||n.assets[e]},t.prototype.updateClientAssets=function(t){for(var e=0;e0},t.prototype.getErrors=function(){return this.errors},t}();t.SharedAssetManager=n}(i||(i={})),function(t){var e=function(){function e(e){if(this._updateCache=new Array,this.updateCacheReset=new Array,this.time=0,this.scaleX=1,this.scaleY=1,this.x=0,this.y=0,null==e)throw new Error("data cannot be null.");this.data=e,this.bones=new Array;for(var n=0;n1){var s=i[i.length-1];this._updateCache.indexOf(s)>-1||this.updateCacheReset.push(s)}this._updateCache.push(e),this.sortReset(r.children),i[i.length-1].sorted=!0}},e.prototype.sortPathConstraint=function(e){if(e.active=e.target.bone.isActive()&&(!e.data.skinRequired||null!=this.skin&&t.Utils.contains(this.skin.constraints,e.data,!0)),e.active){var n=e.target,i=n.data.index,r=n.bone;null!=this.skin&&this.sortPathConstraintAttachment(this.skin,i,r),null!=this.data.defaultSkin&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,i,r);for(var s=0,o=this.data.skins.length;s-1||this.updateCacheReset.push(s)}else for(r=0;r0){y=new t.DrawOrderTimeline(O);var D=r.slots.length;for(u=0;u=0;d--)U[d]=-1;var X=t.Utils.newArray(D-N,0),B=0,Y=0;for(d=0;d=0;d--)-1==U[d]&&(U[d]=X[--Y]);y.setFrame(u,M,U)}s.push(y),a=Math.max(a,y.frames[O-1])}var z=n.readInt(!0);if(z>0){for(y=new t.EventTimeline(z),u=0;u>>1^-(1&n)},t.prototype.readStringRef=function(){var t=this.readInt(!0);return 0==t?null:this.strings[t-1]},t.prototype.readString=function(){var t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;for(var e="",n=0;n>4){case 12:case 13:e+=String.fromCharCode((31&i)<<6|63&this.readByte()),n+=2;break;case 14:e+=String.fromCharCode((15&i)<<12|(63&this.readByte())<<6|63&this.readByte()),n+=3;break;default:e+=String.fromCharCode(i),n++}}return e},t.prototype.readFloat=function(){var t=this.buffer.getFloat32(this.index);return this.index+=4,t},t.prototype.readBoolean=function(){return 0!=this.readByte()},t}(),i=function(){return function(t,e,n,i,r){this.mesh=t,this.skin=e,this.slotIndex=n,this.parent=i,this.inheritDeform=r}}(),r=function(){return function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),this.bones=t,this.vertices=e}}()}(i||(i={})),function(t){var e=function(){function e(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.boundingBoxes=new Array,this.polygons=new Array,this.polygonPool=new t.Pool(function(){return t.Utils.newFloatArray(16)})}return e.prototype.update=function(e,n){if(null==e)throw new Error("skeleton cannot be null.");var i=this.boundingBoxes,r=this.polygons,s=this.polygonPool,o=e.slots,a=o.length;i.length=0,s.freeAll(r),r.length=0;for(var h=0;h=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},e.prototype.aabbIntersectsSegment=function(t,e,n,i){var r=this.minX,s=this.minY,o=this.maxX,a=this.maxY;if(t<=r&&n<=r||e<=s&&i<=s||t>=o&&n>=o||e>=a&&i>=a)return!1;var h=(i-e)/(n-t),l=h*(r-t)+e;if(l>s&&ls&&lr&&ur&&ut.minX&&this.minYt.minY},e.prototype.containsPoint=function(t,e){for(var n=this.polygons,i=0,r=n.length;i=n||l=n){var u=i[a];u+(n-h)/(l-h)*(i[s]-u)=u&&x<=d||x>=d&&x<=u)&&(x>=e&&x<=i||x>=i&&x<=e)){var y=(l*m-h*v)/M;if((y>=c&&y<=p||y>=p&&y<=c)&&(y>=n&&y<=r||y>=r&&y<=n))return!0}u=d,c=p}return!1},e.prototype.getPolygon=function(t){if(null==t)throw new Error("boundingBox cannot be null.");var e=this.boundingBoxes.indexOf(t);return-1==e?null:this.polygons[e]},e.prototype.getWidth=function(){return this.maxX-this.minX},e.prototype.getHeight=function(){return this.maxY-this.minY},e}();t.SkeletonBounds=e}(i||(i={})),function(t){var e=function(){function e(){this.triangulator=new t.Triangulator,this.clippingPolygon=new Array,this.clipOutput=new Array,this.clippedVertices=new Array,this.clippedTriangles=new Array,this.scratch=new Array}return e.prototype.clipStart=function(n,i){if(null!=this.clipAttachment)return 0;this.clipAttachment=i;var r=i.worldVerticesLength,s=t.Utils.setArraySize(this.clippingPolygon,r);i.computeWorldVertices(n,0,r,s,0,2);var o=this.clippingPolygon;e.makeClockwise(o);for(var a=this.clippingPolygons=this.triangulator.decompose(o,this.triangulator.triangulate(o)),h=0,l=a.length;h>1,U=this.clipOutput,X=t.Utils.setArraySize(u,L+N*p),B=0;B=2?(u=a,a=this.scratch):u=this.scratch,u.length=0,u.push(t),u.push(e),u.push(n),u.push(i),u.push(r),u.push(s),u.push(t),u.push(e),a.length=0;for(var c=o,f=o.length-4,d=0;;d+=2){for(var p=c[d],v=c[d+1],g=c[d+2],m=c[d+3],M=p-g,x=v-m,y=u,w=u.length-2,b=a.length,E=0;E0;if(M*(A-m)-x*(T-g)>0){if(I){a.push(R),a.push(S);continue}var C=(L=S-A)*(g-p)-(k=R-T)*(m-v);if(Math.abs(C)>1e-6){var P=(k*(v-A)-L*(p-T))/C;a.push(p+(g-p)*P),a.push(v+(m-v)*P)}else a.push(p),a.push(v)}else if(I){var L,k;C=(L=S-A)*(g-p)-(k=R-T)*(m-v);if(Math.abs(C)>1e-6){P=(k*(v-A)-L*(p-T))/C;a.push(p+(g-p)*P),a.push(v+(m-v)*P)}else a.push(p),a.push(v);a.push(R),a.push(S)}l=!0}if(b==a.length)return h.length=0,!0;if(a.push(a[0]),a.push(a[1]),d==f)break;var _=a;(a=u).length=0,u=_}if(h!=a){h.length=0;d=0;for(var F=a.length-2;d>1;a=0;f--)-1==q[f]&&(q[f]=H[--Z])}y.setFrame(c++,this.getValue(W,"time",0),q)}s.push(y),o=Math.max(o,y.frames[y.getFrameCount()-1])}if(e.events){for(y=new t.EventTimeline(e.events.length),c=0,f=0;f=i.length&&(i.length=t+1),i[t]||(i[t]={}),i[t][e]=n},n.prototype.addSkin=function(t){for(var e=0;e= 0.");if(null==n)throw new Error("name cannot be null.");if(null==i)throw new Error("boneData cannot be null.");this.index=e,this.name=n,this.boneData=i}}();t.SlotData=e}(i||(i={})),function(t){var e,n,i=function(){function t(t){this._image=t}return t.prototype.getImage=function(){return this._image},t.filterFromString=function(t){switch(t.toLowerCase()){case"nearest":return e.Nearest;case"linear":return e.Linear;case"mipmap":return e.MipMap;case"mipmapnearestnearest":return e.MipMapNearestNearest;case"mipmaplinearnearest":return e.MipMapLinearNearest;case"mipmapnearestlinear":return e.MipMapNearestLinear;case"mipmaplinearlinear":return e.MipMapLinearLinear;default:throw new Error("Unknown texture filter "+t)}},t.wrapFromString=function(t){switch(t.toLowerCase()){case"mirroredtepeat":return n.MirroredRepeat;case"clamptoedge":return n.ClampToEdge;case"repeat":return n.Repeat;default:throw new Error("Unknown texture wrap "+t)}},t}();t.Texture=i,function(t){t[t.Nearest=9728]="Nearest",t[t.Linear=9729]="Linear",t[t.MipMap=9987]="MipMap",t[t.MipMapNearestNearest=9984]="MipMapNearestNearest",t[t.MipMapLinearNearest=9985]="MipMapLinearNearest",t[t.MipMapNearestLinear=9986]="MipMapNearestLinear",t[t.MipMapLinearLinear=9987]="MipMapLinearLinear"}(e=t.TextureFilter||(t.TextureFilter={})),function(t){t[t.MirroredRepeat=33648]="MirroredRepeat",t[t.ClampToEdge=33071]="ClampToEdge",t[t.Repeat=10497]="Repeat"}(n=t.TextureWrap||(t.TextureWrap={}));var s=function(){return function(){this.u=0,this.v=0,this.u2=0,this.v2=0,this.width=0,this.height=0,this.rotate=!1,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0}}();t.TextureRegion=s;var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.setFilters=function(t,e){},e.prototype.setWraps=function(t,e){},e.prototype.dispose=function(){},e}(i);t.FakeTexture=o}(i||(i={})),function(t){var e=function(){function e(t,e){this.pages=new Array,this.regions=new Array,this.load(t,e)}return e.prototype.load=function(e,r){if(null==r)throw new Error("textureLoader cannot be null.");for(var o=new n(e),a=new Array(4),h=null;;){var l=o.readLine();if(null==l)break;if(0==(l=l.trim()).length)h=null;else if(h){var u=new s;u.name=l,u.page=h;var c=o.readValue();"true"==c.toLocaleLowerCase()?u.degrees=90:"false"==c.toLocaleLowerCase()?u.degrees=0:u.degrees=parseFloat(c),u.rotate=90==u.degrees,o.readTuple(a);var f=parseInt(a[0]),d=parseInt(a[1]);o.readTuple(a);var p=parseInt(a[0]),v=parseInt(a[1]);u.u=f/h.width,u.v=d/h.height,u.rotate?(u.u2=(f+v)/h.width,u.v2=(d+p)/h.height):(u.u2=(f+p)/h.width,u.v2=(d+v)/h.height),u.x=f,u.y=d,u.width=Math.abs(p),u.height=Math.abs(v),4==o.readTuple(a)&&4==o.readTuple(a)&&o.readTuple(a),u.originalWidth=parseInt(a[0]),u.originalHeight=parseInt(a[1]),o.readTuple(a),u.offsetX=parseInt(a[0]),u.offsetY=parseInt(a[1]),u.index=parseInt(o.readValue()),u.texture=h.texture,this.regions.push(u)}else{(h=new i).name=l,2==o.readTuple(a)&&(h.width=parseInt(a[0]),h.height=parseInt(a[1]),o.readTuple(a)),o.readTuple(a),h.minFilter=t.Texture.filterFromString(a[0]),h.magFilter=t.Texture.filterFromString(a[1]);var g=o.readValue();h.uWrap=t.TextureWrap.ClampToEdge,h.vWrap=t.TextureWrap.ClampToEdge,"x"==g?h.uWrap=t.TextureWrap.Repeat:"y"==g?h.vWrap=t.TextureWrap.Repeat:"xy"==g&&(h.uWrap=h.vWrap=t.TextureWrap.Repeat),h.texture=r(l),h.texture.setFilters(h.minFilter,h.magFilter),h.texture.setWraps(h.uWrap,h.vWrap),h.width=h.texture.getImage().width,h.height=h.texture.getImage().height,this.pages.push(h)}}},e.prototype.findRegion=function(t){for(var e=0;e=this.lines.length?null:this.lines[this.index++]},t.prototype.readValue=function(){var t=this.readLine(),e=t.indexOf(":");if(-1==e)throw new Error("Invalid line: "+t);return t.substring(e+1).trim()},t.prototype.readTuple=function(t){var e=this.readLine(),n=e.indexOf(":");if(-1==n)throw new Error("Invalid line: "+e);for(var i=0,r=n+1;i<3;i++){var s=e.indexOf(",",r);if(-1==s)break;t[i]=e.substr(r,s-r).trim(),r=s+1}return t[i]=e.substring(r).trim(),i+1},t}(),i=function(){return function(){}}();t.TextureAtlasPage=i;var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e}(t.TextureRegion);t.TextureAtlasRegion=s}(i||(i={})),function(t){var e=function(){function e(e,n){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new t.Vector2,this.active=!1,null==e)throw new Error("data cannot be null.");if(null==n)throw new Error("skeleton cannot be null.");this.data=e,this.rotateMix=e.rotateMix,this.translateMix=e.translateMix,this.scaleMix=e.scaleMix,this.shearMix=e.shearMix,this.bones=new Array;for(var i=0;i0?t.MathUtils.degRad:-t.MathUtils.degRad,c=this.data.offsetRotation*u,f=this.data.offsetShearY*u,d=this.bones,p=0,v=d.length;pt.MathUtils.PI?S-=t.MathUtils.PI2:S<-t.MathUtils.PI&&(S+=t.MathUtils.PI2),S*=e;var b=Math.cos(S),E=Math.sin(S);g.a=b*M-E*y,g.b=b*x-E*w,g.c=E*M+b*y,g.d=E*x+b*w,m=!0}if(0!=n){var T=this.temp;s.localToWorld(T.set(this.data.offsetX,this.data.offsetY)),g.worldX+=(T.x-g.worldX)*n,g.worldY+=(T.y-g.worldY)*n,m=!0}if(i>0){var A=Math.sqrt(g.a*g.a+g.c*g.c),R=Math.sqrt(o*o+h*h);A>1e-5&&(A=(A+(R-A+this.data.offsetScaleX)*i)/A),g.a*=A,g.c*=A,A=Math.sqrt(g.b*g.b+g.d*g.d),R=Math.sqrt(a*a+l*l),A>1e-5&&(A=(A+(R-A+this.data.offsetScaleY)*i)/A),g.b*=A,g.d*=A,m=!0}if(r>0){x=g.b,w=g.d;var S,I=Math.atan2(w,x);(S=Math.atan2(l,a)-Math.atan2(h,o)-(I-Math.atan2(g.c,g.a)))>t.MathUtils.PI?S-=t.MathUtils.PI2:S<-t.MathUtils.PI&&(S+=t.MathUtils.PI2),S=I+(S+f)*r;A=Math.sqrt(x*x+w*w);g.b=Math.cos(S)*A,g.d=Math.sin(S)*A,m=!0}m&&(g.appliedValid=!1)}},e.prototype.applyRelativeWorld=function(){for(var e=this.rotateMix,n=this.translateMix,i=this.scaleMix,r=this.shearMix,s=this.target,o=s.a,a=s.b,h=s.c,l=s.d,u=o*l-a*h>0?t.MathUtils.degRad:-t.MathUtils.degRad,c=this.data.offsetRotation*u,f=this.data.offsetShearY*u,d=this.bones,p=0,v=d.length;pt.MathUtils.PI?R-=t.MathUtils.PI2:R<-t.MathUtils.PI&&(R+=t.MathUtils.PI2),R*=e;var b=Math.cos(R),E=Math.sin(R);g.a=b*M-E*y,g.b=b*x-E*w,g.c=E*M+b*y,g.d=E*x+b*w,m=!0}if(0!=n){var T=this.temp;s.localToWorld(T.set(this.data.offsetX,this.data.offsetY)),g.worldX+=T.x*n,g.worldY+=T.y*n,m=!0}if(i>0){var A=(Math.sqrt(o*o+h*h)-1+this.data.offsetScaleX)*i+1;g.a*=A,g.c*=A,A=(Math.sqrt(a*a+l*l)-1+this.data.offsetScaleY)*i+1,g.b*=A,g.d*=A,m=!0}if(r>0){var R;(R=Math.atan2(l,a)-Math.atan2(h,o))>t.MathUtils.PI?R-=t.MathUtils.PI2:R<-t.MathUtils.PI&&(R+=t.MathUtils.PI2);x=g.b,w=g.d;R=Math.atan2(w,x)+(R-t.MathUtils.PI/2+f)*r;A=Math.sqrt(x*x+w*w);g.b=Math.cos(R)*A,g.d=Math.sin(R)*A,m=!0}m&&(g.appliedValid=!1)}},e.prototype.applyAbsoluteLocal=function(){var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target;r.appliedValid||r.updateAppliedTransform();for(var s=this.bones,o=0,a=s.length;o1e-5&&(d=(d+(r.ascaleX-d+this.data.offsetScaleX)*n)/d),p>1e-5&&(p=(p+(r.ascaleY-p+this.data.offsetScaleY)*n)/p));var v=h.ashearY;if(0!=i){u=r.ashearY-v+this.data.offsetShearY;u-=360*(16384-(16384.499999999996-u/360|0)),h.shearY+=u*i}h.updateWorldTransformWith(c,f,l,d,p,h.ashearX,v)}},e.prototype.applyRelativeLocal=function(){var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target;r.appliedValid||r.updateAppliedTransform();for(var s=this.bones,o=0,a=s.length;o1e-5&&(f*=(r.ascaleX-1+this.data.offsetScaleX)*n+1),d>1e-5&&(d*=(r.ascaleY-1+this.data.offsetScaleY)*n+1));var p=h.ashearY;0!=i&&(p+=(r.ashearY+this.data.offsetShearY)*i),h.updateWorldTransformWith(u,c,l,f,d,h.ashearX,p)}},e}();t.TransformConstraint=e}(i||(i={})),function(t){var e=function(t){function e(e){var n=t.call(this,e,0,!1)||this;return n.bones=new Array,n.rotateMix=0,n.translateMix=0,n.scaleMix=0,n.shearMix=0,n.offsetRotation=0,n.offsetX=0,n.offsetY=0,n.offsetScaleX=0,n.offsetScaleY=0,n.offsetShearY=0,n.relative=!1,n.local=!1,n}return r(e,t),e}(t.ConstraintData);t.TransformConstraintData=e}(i||(i={})),function(t){var e=function(){function e(){this.convexPolygons=new Array,this.convexPolygonsIndices=new Array,this.indicesArray=new Array,this.isConcaveArray=new Array,this.triangles=new Array,this.polygonPool=new t.Pool(function(){return new Array}),this.polygonIndicesPool=new t.Pool(function(){return new Array})}return e.prototype.triangulate=function(t){var n=t,i=t.length>>1,r=this.indicesArray;r.length=0;for(var s=0;s3;){for(var l=i-1,u=(s=0,1);;){t:if(!o[s]){for(var c=r[l]<<1,f=r[s]<<1,d=r[u]<<1,p=n[c],v=n[c+1],g=n[f],m=n[f+1],M=n[d],x=n[d+1],y=(u+1)%i;y!=l;y=(y+1)%i)if(o[y]){var w=r[y]<<1,b=n[w],E=n[w+1];if(e.positiveArea(M,x,p,v,b,E)&&e.positiveArea(p,v,g,m,b,E)&&e.positiveArea(g,m,M,x,b,E))break t}break}if(0==u){do{if(!o[s])break;s--}while(s>0);break}l=s,s=u,u=(u+1)%i}h.push(r[(i+s-1)%i]),h.push(r[s]),h.push(r[(s+1)%i]),r.splice(s,1),o.splice(s,1);var T=(--i+s-1)%i,A=s==i?0:s;o[T]=e.isConcave(T,i,n,r),o[A]=e.isConcave(A,i,n,r)}return 3==i&&(h.push(r[2]),h.push(r[0]),h.push(r[1])),h},e.prototype.decompose=function(t,n){var i=t,r=this.convexPolygons;this.polygonPool.freeAll(r),r.length=0;var s=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(s),s.length=0;var o=this.polygonIndicesPool.obtain();o.length=0;var a=this.polygonPool.obtain();a.length=0;for(var h=-1,l=0,u=0,c=n.length;u0?(r.push(a),s.push(o)):(this.polygonPool.free(a),this.polygonIndicesPool.free(o)),(a=this.polygonPool.obtain()).length=0,a.push(v),a.push(g),a.push(m),a.push(M),a.push(x),a.push(y),(o=this.polygonIndicesPool.obtain()).length=0,o.push(f),o.push(d),o.push(p),l=e.winding(v,g,m,M,x,y),h=f)}a.length>0&&(r.push(a),s.push(o));for(u=0,c=r.length;u=0;u--)0==(a=r[u]).length&&(r.splice(u,1),this.polygonPool.free(a),o=s[u],s.splice(u,1),this.polygonIndicesPool.free(o));return r},e.isConcave=function(t,e,n,i){var r=i[(e+t-1)%e]<<1,s=i[t]<<1,o=i[(t+1)%e]<<1;return!this.positiveArea(n[r],n[r+1],n[s],n[s+1],n[o],n[o+1])},e.positiveArea=function(t,e,n,i,r,s){return t*(s-i)+n*(e-s)+r*(i-e)>=0},e.winding=function(t,e,n,i,r,s){var o=n-t,a=i-e;return r*a-s*o+o*e-t*a>=0?1:-1},e}();t.Triangulator=e}(i||(i={})),function(t){var e=function(){function t(){this.array=new Array}return t.prototype.add=function(t){var e=this.contains(t);return this.array[0|t]=0|t,!e},t.prototype.contains=function(t){return void 0!=this.array[0|t]},t.prototype.remove=function(t){this.array[0|t]=void 0},t.prototype.clear=function(){this.array.length=0},t}();t.IntSet=e;var n=function(){function t(t,e,n,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),this.r=t,this.g=e,this.b=n,this.a=i}return t.prototype.set=function(t,e,n,i){return this.r=t,this.g=e,this.b=n,this.a=i,this.clamp(),this},t.prototype.setFromColor=function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this},t.prototype.setFromString=function(t){return t="#"==t.charAt(0)?t.substr(1):t,this.r=parseInt(t.substr(0,2),16)/255,this.g=parseInt(t.substr(2,2),16)/255,this.b=parseInt(t.substr(4,2),16)/255,this.a=(8!=t.length?255:parseInt(t.substr(6,2),16))/255,this},t.prototype.add=function(t,e,n,i){return this.r+=t,this.g+=e,this.b+=n,this.a+=i,this.clamp(),this},t.prototype.clamp=function(){return this.r<0?this.r=0:this.r>1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this},t.rgba8888ToColor=function(t,e){t.r=((4278190080&e)>>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255},t.rgb888ToColor=function(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255},t.WHITE=new t(1,1,1,1),t.RED=new t(1,0,0,1),t.GREEN=new t(0,1,0,1),t.BLUE=new t(0,0,1,1),t.MAGENTA=new t(1,0,1,1),t}();t.Color=n;var i=function(){function t(){}return t.clamp=function(t,e,n){return tn?n:t},t.cosDeg=function(e){return Math.cos(e*t.degRad)},t.sinDeg=function(e){return Math.sin(e*t.degRad)},t.signum=function(t){return t>0?1:t<0?-1:0},t.toInt=function(t){return t>0?Math.floor(t):Math.ceil(t)},t.cbrt=function(t){var e=Math.pow(Math.abs(t),1/3);return t<0?-e:e},t.randomTriangular=function(e,n){return t.randomTriangularWith(e,n,.5*(e+n))},t.randomTriangularWith=function(t,e,n){var i=Math.random(),r=e-t;return i<=(n-t)/r?t+Math.sqrt(i*r*(n-t)):e-Math.sqrt((1-i)*r*(e-n))},t.PI=3.1415927,t.PI2=2*t.PI,t.radiansToDegrees=180/t.PI,t.radDeg=t.radiansToDegrees,t.degreesToRadians=t.PI/180,t.degRad=t.degreesToRadians,t}();t.MathUtils=i;var s=function(){function t(){}return t.prototype.apply=function(t,e,n){return t+(e-t)*this.applyInternal(n)},t}();t.Interpolation=s;var o=function(t){function e(e){var n=t.call(this)||this;return n.power=2,n.power=e,n}return r(e,t),e.prototype.applyInternal=function(t){return t<=.5?Math.pow(2*t,this.power)/2:Math.pow(2*(t-1),this.power)/(this.power%2==0?-2:2)+1},e}(s);t.Pow=o;var a=function(t){function e(e){return t.call(this,e)||this}return r(e,t),e.prototype.applyInternal=function(t){return Math.pow(t-1,this.power)*(this.power%2==0?-1:1)+1},e}(o);t.PowOut=a;var h=function(){function t(){}return t.arrayCopy=function(t,e,n,i,r){for(var s=e,o=i;s=n?e:t.setArraySize(e,n,i)},t.newArray=function(t,e){for(var n=new Array(t),i=0;i0?this.items.pop():this.instantiator()},t.prototype.free=function(t){t.reset&&t.reset(),this.items.push(t)},t.prototype.freeAll=function(t){for(var e=0;ethis.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,this.frameTime>1&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)},t}();t.TimeKeeper=f;var d=function(){function t(t){void 0===t&&(t=32),this.addedValues=0,this.lastValue=0,this.mean=0,this.dirty=!0,this.values=new Array(t)}return t.prototype.hasEnoughData=function(){return this.addedValues>=this.values.length},t.prototype.addValue=function(t){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0},t.prototype.getMean=function(){if(this.hasEnoughData()){if(this.dirty){for(var t=0,e=0;e>1)*s;var o=t.bone.skeleton,a=t.deform,h=this.vertices,l=this.bones;if(null!=l){for(var u=0,c=0,f=0;f0&&(h=a);for(var y,w=(y=t.bone).worldX,b=y.worldY,E=y.a,T=y.b,A=y.c,R=y.d,S=e,I=r;Ithis.vertices.length)throw Error("Mesh can't store more than "+this.maxVertices()+" vertices");this.vertices.set(t,0),this.verticesLength=t.length},e.prototype.setIndices=function(t){if(this.dirtyIndices=!0,t.length>this.indices.length)throw Error("Mesh can't store more than "+this.maxIndices()+" indices");this.indices.set(t,0),this.indicesLength=t.length},e.prototype.draw=function(t,e){this.drawWithOffset(t,e,0,this.indicesLength>0?this.indicesLength:this.verticesLength/this.elementsPerVertex)},e.prototype.drawWithOffset=function(t,e,n,i){var r=this.context.gl;(this.dirtyVertices||this.dirtyIndices)&&this.update(),this.bind(t),this.indicesLength>0?r.drawElements(e,i,r.UNSIGNED_SHORT,2*n):r.drawArrays(e,n,i),this.unbind(t)},e.prototype.bind=function(t){var e=this.context.gl;e.bindBuffer(e.ARRAY_BUFFER,this.verticesBuffer);for(var n=0,i=0;i0&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.indicesBuffer)},e.prototype.unbind=function(t){for(var e=this.context.gl,n=0;n0&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null)},e.prototype.update=function(){var t=this.context.gl;this.dirtyVertices&&(this.verticesBuffer||(this.verticesBuffer=t.createBuffer()),t.bindBuffer(t.ARRAY_BUFFER,this.verticesBuffer),t.bufferData(t.ARRAY_BUFFER,this.vertices.subarray(0,this.verticesLength),t.DYNAMIC_DRAW),this.dirtyVertices=!1),this.dirtyIndices&&(this.indicesBuffer||(this.indicesBuffer=t.createBuffer()),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.indicesBuffer),t.bufferData(t.ELEMENT_ARRAY_BUFFER,this.indices.subarray(0,this.indicesLength),t.DYNAMIC_DRAW),this.dirtyIndices=!1)},e.prototype.restore=function(){this.verticesBuffer=null,this.indicesBuffer=null,this.update()},e.prototype.dispose=function(){this.context.removeRestorable(this);var t=this.context.gl;t.deleteBuffer(this.verticesBuffer),t.deleteBuffer(this.indicesBuffer)},e}();t.Mesh=e;var n=function(){return function(t,e,n){this.name=t,this.type=e,this.numElements=n}}();t.VertexAttribute=n;var i=function(e){function n(){return e.call(this,t.Shader.POSITION,h.Float,2)||this}return r(n,e),n}(n);t.Position2Attribute=i;var s=function(e){function n(){return e.call(this,t.Shader.POSITION,h.Float,3)||this}return r(n,e),n}(n);t.Position3Attribute=s;var o=function(e){function n(n){return void 0===n&&(n=0),e.call(this,t.Shader.TEXCOORDS+(0==n?"":n),h.Float,2)||this}return r(n,e),n}(n);t.TexCoordAttribute=o;var a=function(e){function n(){return e.call(this,t.Shader.COLOR,h.Float,4)||this}return r(n,e),n}(n);t.ColorAttribute=a;var h,l=function(e){function n(){return e.call(this,t.Shader.COLOR2,h.Float,4)||this}return r(n,e),n}(n);t.Color2Attribute=l,function(t){t[t.Float=0]="Float"}(h=t.VertexAttributeType||(t.VertexAttributeType={}))}(t.webgl||(t.webgl={}))}(i||(i={})),function(t){!function(t){var e=function(){function e(e,n,i){if(void 0===n&&(n=!0),void 0===i&&(i=10920),this.isDrawing=!1,this.shader=null,this.lastTexture=null,this.verticesLength=0,this.indicesLength=0,i>10920)throw new Error("Can't have more than 10920 triangles per batch: "+i);this.context=e instanceof t.ManagedWebGLRenderingContext?e:new t.ManagedWebGLRenderingContext(e);var r=n?[new t.Position2Attribute,new t.ColorAttribute,new t.TexCoordAttribute,new t.Color2Attribute]:[new t.Position2Attribute,new t.ColorAttribute,new t.TexCoordAttribute];this.mesh=new t.Mesh(e,r,i,3*i),this.srcBlend=this.context.gl.SRC_ALPHA,this.dstBlend=this.context.gl.ONE_MINUS_SRC_ALPHA}return e.prototype.begin=function(t){var e=this.context.gl;if(this.isDrawing)throw new Error("PolygonBatch is already drawing. Call PolygonBatch.end() before calling PolygonBatch.begin()");this.drawCalls=0,this.shader=t,this.lastTexture=null,this.isDrawing=!0,e.enable(e.BLEND),e.blendFunc(this.srcBlend,this.dstBlend)},e.prototype.setBlendMode=function(t,e){var n=this.context.gl;this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),n.blendFunc(this.srcBlend,this.dstBlend))},e.prototype.draw=function(t,e,n){t!=this.lastTexture?(this.flush(),this.lastTexture=t):(this.verticesLength+e.length>this.mesh.getVertices().length||this.indicesLength+n.length>this.mesh.getIndices().length)&&this.flush();var i=this.mesh.numVertices();this.mesh.getVertices().set(e,this.verticesLength),this.verticesLength+=e.length,this.mesh.setVerticesLength(this.verticesLength);for(var r=this.mesh.getIndices(),s=this.indicesLength,o=0;o0||this.indicesLength>0)&&this.flush(),this.shader=null,this.lastTexture=null,this.isDrawing=!1,t.disable(t.BLEND)},e.prototype.getDrawCalls=function(){return this.drawCalls},e.prototype.dispose=function(){this.mesh.dispose()},e}();t.PolygonBatcher=e}(t.webgl||(t.webgl={}))}(i||(i={})),function(t){!function(e){var n,i=function(){function i(n,i,r){void 0===r&&(r=!0),this.twoColorTint=!1,this.activeRenderer=null,this.QUAD=[0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0],this.QUAD_TRIANGLES=[0,1,2,2,3,0],this.WHITE=new t.Color(1,1,1,1),this.canvas=n,this.context=i instanceof e.ManagedWebGLRenderingContext?i:new e.ManagedWebGLRenderingContext(i),this.twoColorTint=r,this.camera=new e.OrthoCamera(n.width,n.height),this.batcherShader=r?e.Shader.newTwoColoredTextured(this.context):e.Shader.newColoredTextured(this.context),this.batcher=new e.PolygonBatcher(this.context,r),this.shapesShader=e.Shader.newColored(this.context),this.shapes=new e.ShapeRenderer(this.context),this.skeletonRenderer=new e.SkeletonRenderer(this.context,r),this.skeletonDebugRenderer=new e.SkeletonDebugRenderer(this.context)}return i.prototype.begin=function(){this.camera.update(),this.enableRenderer(this.batcher)},i.prototype.drawSkeleton=function(t,e,n,i){void 0===e&&(e=!1),void 0===n&&(n=-1),void 0===i&&(i=-1),this.enableRenderer(this.batcher),this.skeletonRenderer.premultipliedAlpha=e,this.skeletonRenderer.draw(this.batcher,t,n,i)},i.prototype.drawSkeletonDebug=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=null),this.enableRenderer(this.shapes),this.skeletonDebugRenderer.premultipliedAlpha=e,this.skeletonDebugRenderer.draw(this.shapes,t,n)},i.prototype.drawTexture=function(t,e,n,i,r,s){void 0===s&&(s=null),this.enableRenderer(this.batcher),null===s&&(s=this.WHITE);var o=this.QUAD,a=0;o[a++]=e,o[a++]=n,o[a++]=s.r,o[a++]=s.g,o[a++]=s.b,o[a++]=s.a,o[a++]=0,o[a++]=1,this.twoColorTint&&(o[a++]=0,o[a++]=0,o[a++]=0,o[a++]=0),o[a++]=e+i,o[a++]=n,o[a++]=s.r,o[a++]=s.g,o[a++]=s.b,o[a++]=s.a,o[a++]=1,o[a++]=1,this.twoColorTint&&(o[a++]=0,o[a++]=0,o[a++]=0,o[a++]=0),o[a++]=e+i,o[a++]=n+r,o[a++]=s.r,o[a++]=s.g,o[a++]=s.b,o[a++]=s.a,o[a++]=1,o[a++]=0,this.twoColorTint&&(o[a++]=0,o[a++]=0,o[a++]=0,o[a++]=0),o[a++]=e,o[a++]=n+r,o[a++]=s.r,o[a++]=s.g,o[a++]=s.b,o[a++]=s.a,o[a++]=0,o[a++]=0,this.twoColorTint&&(o[a++]=0,o[a++]=0,o[a++]=0,o[a++]=0),this.batcher.draw(t,o,this.QUAD_TRIANGLES)},i.prototype.drawTextureUV=function(t,e,n,i,r,s,o,a,h,l){void 0===l&&(l=null),this.enableRenderer(this.batcher),null===l&&(l=this.WHITE);var u=this.QUAD,c=0;u[c++]=e,u[c++]=n,u[c++]=l.r,u[c++]=l.g,u[c++]=l.b,u[c++]=l.a,u[c++]=s,u[c++]=o,this.twoColorTint&&(u[c++]=0,u[c++]=0,u[c++]=0,u[c++]=0),u[c++]=e+i,u[c++]=n,u[c++]=l.r,u[c++]=l.g,u[c++]=l.b,u[c++]=l.a,u[c++]=a,u[c++]=o,this.twoColorTint&&(u[c++]=0,u[c++]=0,u[c++]=0,u[c++]=0),u[c++]=e+i,u[c++]=n+r,u[c++]=l.r,u[c++]=l.g,u[c++]=l.b,u[c++]=l.a,u[c++]=a,u[c++]=h,this.twoColorTint&&(u[c++]=0,u[c++]=0,u[c++]=0,u[c++]=0),u[c++]=e,u[c++]=n+r,u[c++]=l.r,u[c++]=l.g,u[c++]=l.b,u[c++]=l.a,u[c++]=s,u[c++]=h,this.twoColorTint&&(u[c++]=0,u[c++]=0,u[c++]=0,u[c++]=0),this.batcher.draw(t,u,this.QUAD_TRIANGLES)},i.prototype.drawTextureRotated=function(e,n,i,r,s,o,a,h,l,u){void 0===l&&(l=null),void 0===u&&(u=!1),this.enableRenderer(this.batcher),null===l&&(l=this.WHITE);var c=this.QUAD,f=n+o,d=i+a,p=-o,v=-a,g=r-o,m=s-a,M=p,x=v,y=p,w=m,b=g,E=m,T=g,A=v,R=0,S=0,I=0,C=0,P=0,L=0,k=0,_=0;if(0!=h){var F=t.MathUtils.cosDeg(h),V=t.MathUtils.sinDeg(h);I=(P=F*b-V*E)+((R=F*M-V*x)-(k=F*y-V*w)),C=(L=V*b+F*E)+((S=V*M+F*x)-(_=V*y+F*w))}else R=M,S=x,k=y,_=w,P=b,L=E,I=T,C=A;R+=f,S+=d,I+=f,C+=d,P+=f,L+=d,k+=f,_+=d;var O=0;c[O++]=R,c[O++]=S,c[O++]=l.r,c[O++]=l.g,c[O++]=l.b,c[O++]=l.a,c[O++]=0,c[O++]=1,this.twoColorTint&&(c[O++]=0,c[O++]=0,c[O++]=0,c[O++]=0),c[O++]=I,c[O++]=C,c[O++]=l.r,c[O++]=l.g,c[O++]=l.b,c[O++]=l.a,c[O++]=1,c[O++]=1,this.twoColorTint&&(c[O++]=0,c[O++]=0,c[O++]=0,c[O++]=0),c[O++]=P,c[O++]=L,c[O++]=l.r,c[O++]=l.g,c[O++]=l.b,c[O++]=l.a,c[O++]=1,c[O++]=0,this.twoColorTint&&(c[O++]=0,c[O++]=0,c[O++]=0,c[O++]=0),c[O++]=k,c[O++]=_,c[O++]=l.r,c[O++]=l.g,c[O++]=l.b,c[O++]=l.a,c[O++]=0,c[O++]=0,this.twoColorTint&&(c[O++]=0,c[O++]=0,c[O++]=0,c[O++]=0),this.batcher.draw(e,c,this.QUAD_TRIANGLES)},i.prototype.drawRegion=function(t,e,n,i,r,s,o){void 0===s&&(s=null),void 0===o&&(o=!1),this.enableRenderer(this.batcher),null===s&&(s=this.WHITE);var a=this.QUAD,h=0;a[h++]=e,a[h++]=n,a[h++]=s.r,a[h++]=s.g,a[h++]=s.b,a[h++]=s.a,a[h++]=t.u,a[h++]=t.v2,this.twoColorTint&&(a[h++]=0,a[h++]=0,a[h++]=0,a[h++]=0),a[h++]=e+i,a[h++]=n,a[h++]=s.r,a[h++]=s.g,a[h++]=s.b,a[h++]=s.a,a[h++]=t.u2,a[h++]=t.v2,this.twoColorTint&&(a[h++]=0,a[h++]=0,a[h++]=0,a[h++]=0),a[h++]=e+i,a[h++]=n+r,a[h++]=s.r,a[h++]=s.g,a[h++]=s.b,a[h++]=s.a,a[h++]=t.u2,a[h++]=t.v,this.twoColorTint&&(a[h++]=0,a[h++]=0,a[h++]=0,a[h++]=0),a[h++]=e,a[h++]=n+r,a[h++]=s.r,a[h++]=s.g,a[h++]=s.b,a[h++]=s.a,a[h++]=t.u,a[h++]=t.v,this.twoColorTint&&(a[h++]=0,a[h++]=0,a[h++]=0,a[h++]=0),this.batcher.draw(t.texture,a,this.QUAD_TRIANGLES)},i.prototype.line=function(t,e,n,i,r,s){void 0===r&&(r=null),void 0===s&&(s=null),this.enableRenderer(this.shapes),this.shapes.line(t,e,n,i,r)},i.prototype.triangle=function(t,e,n,i,r,s,o,a,h,l){void 0===a&&(a=null),void 0===h&&(h=null),void 0===l&&(l=null),this.enableRenderer(this.shapes),this.shapes.triangle(t,e,n,i,r,s,o,a,h,l)},i.prototype.quad=function(t,e,n,i,r,s,o,a,h,l,u,c,f){void 0===l&&(l=null),void 0===u&&(u=null),void 0===c&&(c=null),void 0===f&&(f=null),this.enableRenderer(this.shapes),this.shapes.quad(t,e,n,i,r,s,o,a,h,l,u,c,f)},i.prototype.rect=function(t,e,n,i,r,s){void 0===s&&(s=null),this.enableRenderer(this.shapes),this.shapes.rect(t,e,n,i,r,s)},i.prototype.rectLine=function(t,e,n,i,r,s,o){void 0===o&&(o=null),this.enableRenderer(this.shapes),this.shapes.rectLine(t,e,n,i,r,s,o)},i.prototype.polygon=function(t,e,n,i){void 0===i&&(i=null),this.enableRenderer(this.shapes),this.shapes.polygon(t,e,n,i)},i.prototype.circle=function(t,e,n,i,r,s){void 0===r&&(r=null),void 0===s&&(s=0),this.enableRenderer(this.shapes),this.shapes.circle(t,e,n,i,r,s)},i.prototype.curve=function(t,e,n,i,r,s,o,a,h,l){void 0===l&&(l=null),this.enableRenderer(this.shapes),this.shapes.curve(t,e,n,i,r,s,o,a,h,l)},i.prototype.end=function(){this.activeRenderer===this.batcher?this.batcher.end():this.activeRenderer===this.shapes&&this.shapes.end(),this.activeRenderer=null},i.prototype.resize=function(t){var e=this.canvas,i=e.clientWidth,r=e.clientHeight;if(e.width==i&&e.height==r||(e.width=i,e.height=r),this.context.gl.viewport(0,0,e.width,e.height),t===n.Stretch);else if(t===n.Expand)this.camera.setViewport(i,r);else if(t===n.Fit){var s=e.width,o=e.height,a=this.camera.viewportWidth,h=this.camera.viewportHeight,l=h/a10920)throw new Error("Can't have more than 10920 triangles per batch: "+r);this.context=i instanceof e.ManagedWebGLRenderingContext?i:new e.ManagedWebGLRenderingContext(i),this.mesh=new e.Mesh(i,[new e.Position2Attribute,new e.ColorAttribute],r,0),this.srcBlend=this.context.gl.SRC_ALPHA,this.dstBlend=this.context.gl.ONE_MINUS_SRC_ALPHA}return i.prototype.begin=function(t){if(this.isDrawing)throw new Error("ShapeRenderer.begin() has already been called");this.shader=t,this.vertexIndex=0,this.isDrawing=!0;var e=this.context.gl;e.enable(e.BLEND),e.blendFunc(this.srcBlend,this.dstBlend)},i.prototype.setBlendMode=function(t,e){var n=this.context.gl;this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),n.blendFunc(this.srcBlend,this.dstBlend))},i.prototype.setColor=function(t){this.color.setFromColor(t)},i.prototype.setColorWith=function(t,e,n,i){this.color.set(t,e,n,i)},i.prototype.point=function(t,e,i){void 0===i&&(i=null),this.check(n.Point,1),null===i&&(i=this.color),this.vertex(t,e,i)},i.prototype.line=function(t,e,i,r,s){void 0===s&&(s=null),this.check(n.Line,2);this.mesh.getVertices(),this.vertexIndex;null===s&&(s=this.color),this.vertex(t,e,s),this.vertex(i,r,s)},i.prototype.triangle=function(t,e,i,r,s,o,a,h,l,u){void 0===h&&(h=null),void 0===l&&(l=null),void 0===u&&(u=null),this.check(t?n.Filled:n.Line,3);this.mesh.getVertices(),this.vertexIndex;null===h&&(h=this.color),null===l&&(l=this.color),null===u&&(u=this.color),t?(this.vertex(e,i,h),this.vertex(r,s,l),this.vertex(o,a,u)):(this.vertex(e,i,h),this.vertex(r,s,l),this.vertex(r,s,h),this.vertex(o,a,l),this.vertex(o,a,h),this.vertex(e,i,l))},i.prototype.quad=function(t,e,i,r,s,o,a,h,l,u,c,f,d){void 0===u&&(u=null),void 0===c&&(c=null),void 0===f&&(f=null),void 0===d&&(d=null),this.check(t?n.Filled:n.Line,3);this.mesh.getVertices(),this.vertexIndex;null===u&&(u=this.color),null===c&&(c=this.color),null===f&&(f=this.color),null===d&&(d=this.color),t?(this.vertex(e,i,u),this.vertex(r,s,c),this.vertex(o,a,f),this.vertex(o,a,f),this.vertex(h,l,d),this.vertex(e,i,u)):(this.vertex(e,i,u),this.vertex(r,s,c),this.vertex(r,s,c),this.vertex(o,a,f),this.vertex(o,a,f),this.vertex(h,l,d),this.vertex(h,l,d),this.vertex(e,i,u))},i.prototype.rect=function(t,e,n,i,r,s){void 0===s&&(s=null),this.quad(t,e,n,e+i,n,e+i,n+r,e,n+r,s,s,s,s)},i.prototype.rectLine=function(t,e,i,r,s,o,a){void 0===a&&(a=null),this.check(t?n.Filled:n.Line,8),null===a&&(a=this.color);var h=this.tmp.set(s-i,e-r);h.normalize(),o*=.5;var l=h.x*o,u=h.y*o;t?(this.vertex(e+l,i+u,a),this.vertex(e-l,i-u,a),this.vertex(r+l,s+u,a),this.vertex(r-l,s-u,a),this.vertex(r+l,s+u,a),this.vertex(e-l,i-u,a)):(this.vertex(e+l,i+u,a),this.vertex(e-l,i-u,a),this.vertex(r+l,s+u,a),this.vertex(r-l,s-u,a),this.vertex(r+l,s+u,a),this.vertex(e+l,i+u,a),this.vertex(r-l,s-u,a),this.vertex(e-l,i-u,a))},i.prototype.x=function(t,e,n){this.line(t-n,e-n,t+n,e+n),this.line(t-n,e+n,t+n,e-n)},i.prototype.polygon=function(t,e,i,r){if(void 0===r&&(r=null),i<3)throw new Error("Polygon must contain at least 3 vertices");this.check(n.Line,2*i),null===r&&(r=this.color);this.mesh.getVertices(),this.vertexIndex;i<<=1;for(var s=t[e<<=1],o=t[e+1],a=e+i,h=e,l=e+i-2;h=a?(f=s,d=o):(f=t[h+2],d=t[h+3]),this.vertex(u,c,r),this.vertex(f,d,r)}},i.prototype.circle=function(e,i,r,s,o,a){if(void 0===o&&(o=null),void 0===a&&(a=0),0===a&&(a=Math.max(1,6*t.MathUtils.cbrt(s)|0)),a<=0)throw new Error("segments must be > 0.");null===o&&(o=this.color);var h=2*t.MathUtils.PI/a,l=Math.cos(h),u=Math.sin(h),c=s,f=0;if(e){this.check(n.Filled,3*a+3),a--;for(p=0;p0;)this.vertex(b,E,u),b+=T,E+=A,T+=R,A+=S,R+=I,S+=C,this.vertex(b,E,u);this.vertex(b,E,u),this.vertex(a,h,u)},i.prototype.vertex=function(t,e,n){var i=this.vertexIndex,r=this.mesh.getVertices();r[i++]=t,r[i++]=e,r[i++]=n.r,r[i++]=n.g,r[i++]=n.b,r[i++]=n.a,this.vertexIndex=i},i.prototype.end=function(){if(!this.isDrawing)throw new Error("ShapeRenderer.begin() has not been called");this.flush(),this.context.gl.disable(this.context.gl.BLEND),this.isDrawing=!1},i.prototype.flush=function(){0!=this.vertexIndex&&(this.mesh.setVerticesLength(this.vertexIndex),this.mesh.draw(this.shader,this.shapeType),this.vertexIndex=0)},i.prototype.check=function(t,e){if(!this.isDrawing)throw new Error("ShapeRenderer.begin() has not been called");if(this.shapeType==t){if(!(this.mesh.maxVertices()-this.mesh.numVertices()-1)&&null!=f.parent){var d=s+f.data.length*f.a+f.worldX,p=o+f.data.length*f.c+f.worldY;e.rectLine(!0,s+f.worldX,o+f.worldY,d,p,this.boneWidth*this.scale)}}this.drawSkeletonXY&&e.x(s,o,4*this.scale)}if(this.drawRegionAttachments){e.setColor(this.attachmentLineColor);for(u=0,c=(Y=i.slots).length;u0){e.setColor(this.attachmentLineColor);var A=g[(x=2*(x>>1))-2],R=g[x-1];for(y=0,w=x;y-1||e.circle(!0,s+f.worldX,o+f.worldY,3*this.scale,n.GREEN,8)}}if(this.drawClipping){var Y=i.slots;e.setColor(this.clipColor);for(u=0,c=Y.length;u=0&&s==R.data.index&&(b=!0),b){o>=0&&o==R.data.index&&(b=!1);var S=R.getAttachment(),I=null;if(S instanceof t.RegionAttachment){var C=S;v.vertices=this.vertices,v.numVertices=4,v.numFloats=A<<2,C.computeWorldVertices(R.bone,v.vertices,0,A),m=i.QUAD_TRIANGLES,g=C.uvs,I=C.region.renderObject.texture,x=C.color}else{if(!(S instanceof t.MeshAttachment)){if(S instanceof t.ClippingAttachment){var P=S;a.clipStart(R,P);continue}a.clipEndWithSlot(R);continue}var L=S;v.vertices=this.vertices,v.numVertices=L.worldVerticesLength>>1,v.numFloats=v.numVertices*A,v.numFloats>v.vertices.length&&(v.vertices=this.vertices=t.Utils.newFloatArray(v.numFloats)),L.computeWorldVertices(R,0,L.worldVerticesLength,v.vertices,0,A),m=L.triangles,I=L.region.renderObject.texture,g=L.uvs,x=L.color}if(null!=I){var k=R.color,_=this.tempColor;_.r=y.r*k.r*x.r,_.g=y.g*k.g*x.g,_.b=y.b*k.b*x.b,_.a=y.a*k.a*x.a,h&&(_.r*=_.a,_.g*=_.a,_.b*=_.a);var F=this.tempColor2;null==R.darkColor?F.set(0,0,0,1):(h?(F.r=R.darkColor.r*_.a,F.g=R.darkColor.g*_.a,F.b=R.darkColor.b*_.a):F.setFromColor(R.darkColor),F.a=h?1:0);var V=R.data.blendMode;if(V!=u&&(u=V,n.setBlendMode(e.WebGLBlendModeConverter.getSourceGLBlendMode(u,h),e.WebGLBlendModeConverter.getDestGLBlendMode(u))),a.isClipping()){a.clipTriangles(v.vertices,v.numFloats,m,m.length,g,_,F,l);var O=new Float32Array(a.clippedVertices),D=a.clippedTriangles;if(null!=this.vertexEffect){var N=this.vertexEffect,U=O;if(l){B=0;for(var X=O.length;B-1&&this.restorables.splice(e,1)},t}();e.ManagedWebGLRenderingContext=n;var i=function(){function e(){}return e.getDestGLBlendMode=function(n){switch(n){case t.BlendMode.Normal:return e.ONE_MINUS_SRC_ALPHA;case t.BlendMode.Additive:return e.ONE;case t.BlendMode.Multiply:case t.BlendMode.Screen:return e.ONE_MINUS_SRC_ALPHA;default:throw new Error("Unknown blend mode: "+n)}},e.getSourceGLBlendMode=function(n,i){switch(void 0===i&&(i=!1),n){case t.BlendMode.Normal:case t.BlendMode.Additive:return i?e.ONE:e.SRC_ALPHA;case t.BlendMode.Multiply:return e.DST_COLOR;case t.BlendMode.Screen:return e.ONE;default:throw new Error("Unknown blend mode: "+n)}},e.ZERO=0,e.ONE=1,e.SRC_COLOR=768,e.ONE_MINUS_SRC_COLOR=769,e.SRC_ALPHA=770,e.ONE_MINUS_SRC_ALPHA=771,e.DST_ALPHA=772,e.ONE_MINUS_DST_ALPHA=773,e.DST_COLOR=774,e}();e.WebGLBlendModeConverter=i}(t.webgl||(t.webgl={}))}(i||(i={})),t.exports=i}).call(window)},function(t,e,n){var i=n(0),r=n(4),s=n(168),o=n(2),a=n(182),h=n(183),l=n(184),u=new i({Extends:h,initialize:function(t,e,n,i,s,u,c){var f,d,p,v=[],g=t.cacheManager.custom.spine;if(o(e)){var m=e;for(e=r(m,"key"),d=new a(t,{key:e,url:r(m,"jsonURL"),extension:r(m,"jsonExtension","json"),xhrSettings:r(m,"jsonXhrSettings")}),i=r(m,"atlasURL"),s=r(m,"preMultipliedAlpha"),Array.isArray(i)||(i=[i]),f=0;f>16&255)/255,i=(t>>8&255)/255,r=(255&t)/255,s=t>16777215?(t>>>24)/255:null,o=this.skeleton;if(e){var a=this.findSlot(e);a&&(o=a)}return o.color.r=n,o.color.g=i,o.color.b=r,null!==s&&(o.color.a=s),this},setSkeletonFromJSON:function(t,e,n,i){return this.setSkeleton(t,e,n,i)},setSkeleton:function(t,e,n,i){this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications());var r=this.plugin.createSkeleton(t,i);this.skeletonData=r.skeletonData,this.preMultipliedAlpha=r.preMultipliedAlpha;var s=r.skeleton;return s.setSkin(),s.setToSetupPose(),this.skeleton=s,r=this.plugin.createAnimationState(s),this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications()),this.state=r.state,this.stateData=r.stateData,this.state.addListener({event:this.onEvent.bind(this),complete:this.onComplete.bind(this),start:this.onStart.bind(this),end:this.onEnd.bind(this),dispose:this.onDispose.bind(this),interrupted:this.onInterrupted.bind(this)}),e&&this.setAnimation(0,e,n),this.root=this.getRootBone(),this.root&&(this.root.rotation=v(f(this.rotation))+90),this.state.apply(s),s.updateCache(),this.updateSize()},onComplete:function(t){this.emit(g.COMPLETE,t)},onDispose:function(t){this.emit(g.DISPOSE,t)},onEnd:function(t){this.emit(g.END,t)},onEvent:function(t,e){this.emit(g.EVENT,t,e)},onInterrupted:function(t){this.emit(g.INTERRUPTED,t)},onStart:function(t){this.emit(g.START,t)},refresh:function(){return this.root&&(this.root.rotation=v(f(this.rotation))+90),this.updateSize(),this.skeleton.updateCache(),this},setSize:function(t,e,n,i){var r=this.skeleton;return void 0===t&&(t=r.data.width),void 0===e&&(e=r.data.height),void 0===n&&(n=0),void 0===i&&(i=0),this.width=t,this.height=e,this.displayOriginX=r.x-n,this.displayOriginY=r.y-i,this},setOffset:function(t,e){var n=this.skeleton;return void 0===t&&(t=0),void 0===e&&(e=0),this.displayOriginX=n.x-t,this.displayOriginY=n.y-e,this},updateSize:function(){var t=this.skeleton,e=this.plugin.renderer.height,n=this.scaleX,i=this.scaleY;t.x=this.x,t.y=e-this.y,t.scaleX=1,t.scaleY=1,t.updateWorldTransform();var r=this.getBounds();return this.width=r.size.x,this.height=r.size.y,this.displayOriginX=this.x-r.offset.x,this.displayOriginY=this.y-(e-(this.height+r.offset.y)),t.scaleX=n,t.scaleY=i,t.updateWorldTransform(),this},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,this.refresh()}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,this.refresh()}},getBoneList:function(){var t=[],e=this.skeletonData;if(e)for(var n=0;n0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):i||s?r.TAU-(s>0?Math.acos(-i/this.scaleY):-Math.acos(i/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 n=this.matrix;return n[4]=n[0]*t+n[2]*e+n[4],n[5]=n[1]*t+n[3]*e+n[5],this},scale:function(t,e){var n=this.matrix;return n[0]*=t,n[1]*=t,n[2]*=e,n[3]*=e,this},rotate:function(t){var e=Math.sin(t),n=Math.cos(t),i=this.matrix,r=i[0],s=i[1],o=i[2],a=i[3];return i[0]=r*n+o*e,i[1]=s*n+a*e,i[2]=r*-e+o*n,i[3]=s*-e+a*n,this},multiply:function(t,e){var n=this.matrix,i=t.matrix,r=n[0],s=n[1],o=n[2],a=n[3],h=n[4],l=n[5],u=i[0],c=i[1],f=i[2],d=i[3],p=i[4],v=i[5],g=void 0===e?this:e;return g.a=u*r+c*o,g.b=u*s+c*a,g.c=f*r+d*o,g.d=f*s+d*a,g.e=p*r+v*o+h,g.f=p*s+v*a+l,g},multiplyWithOffset:function(t,e,n){var i=this.matrix,r=t.matrix,s=i[0],o=i[1],a=i[2],h=i[3],l=e*s+n*a+i[4],u=e*o+n*h+i[5],c=r[0],f=r[1],d=r[2],p=r[3],v=r[4],g=r[5];return i[0]=c*s+f*a,i[1]=c*o+f*h,i[2]=d*s+p*a,i[3]=d*o+p*h,i[4]=v*s+g*a+l,i[5]=v*o+g*h+u,this},transform:function(t,e,n,i,r,s){var o=this.matrix,a=o[0],h=o[1],l=o[2],u=o[3],c=o[4],f=o[5];return o[0]=t*a+e*l,o[1]=t*h+e*u,o[2]=n*a+i*l,o[3]=n*h+i*u,o[4]=r*a+s*l+c,o[5]=r*h+s*u+f,this},transformPoint:function(t,e,n){void 0===n&&(n={x:0,y:0});var i=this.matrix,r=i[0],s=i[1],o=i[2],a=i[3],h=i[4],l=i[5];return n.x=t*r+e*o+h,n.y=t*s+e*a+l,n},invert:function(){var t=this.matrix,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],o=t[5],a=e*r-n*i;return t[0]=r/a,t[1]=-n/a,t[2]=-i/a,t[3]=e/a,t[4]=(i*o-r*s)/a,t[5]=-(e*o-n*s)/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,n,i,r,s){var o=this.matrix;return o[0]=t,o[1]=e,o[2]=n,o[3]=i,o[4]=r,o[5]=s,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,n=e[0],i=e[1],r=e[2],s=e[3],o=n*s-i*r;if(t.translateX=e[4],t.translateY=e[5],n||i){var a=Math.sqrt(n*n+i*i);t.rotation=i>0?Math.acos(n/a):-Math.acos(n/a),t.scaleX=a,t.scaleY=o/a}else if(r||s){var h=Math.sqrt(r*r+s*s);t.rotation=.5*Math.PI-(s>0?Math.acos(-r/h):-Math.acos(r/h)),t.scaleX=o/h,t.scaleY=h}else t.rotation=0,t.scaleX=0,t.scaleY=0;return t},applyITRS:function(t,e,n,i,r){var s=this.matrix,o=Math.sin(n),a=Math.cos(n);return s[4]=t,s[5]=e,s[0]=a*i,s[1]=o*i,s[2]=-o*r,s[3]=a*r,this},applyInverse:function(t,e,n){void 0===n&&(n=new s);var i=this.matrix,r=i[0],o=i[1],a=i[2],h=i[3],l=i[4],u=i[5],c=1/(r*h+a*-o);return n.x=h*c*t+-a*c*e+(u*a-l*h)*c,n.y=r*c*e+-o*c*t+(-u*r+l*o)*c,n},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},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.decomposedMatrix=null}});t.exports=o},function(t,e){var n={_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=n},function(t,e,n){var i=n(0),r=n(194),s=n(195),o=n(201),a=n(202),h=new i({Extends:o,initialize:function(t,e){o.call(this),this.scene=t,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,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 s(this)),this},setData:function(t,e){return this.data||(this.data=new s(this)),this.data.set(t,e),this},getData:function(t){return this.data||(this.data=new s(this)),this.data.get(t)},setInteractive:function(t,e,n){return this.scene.sys.input.enable(this,t,e,n),this},disableInteractive:function(){return this.input&&(this.input.enabled=!1),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},update:function(){},toJSON:function(){return r(this)},willRender:function(t){return!(h.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,n=[];e&&(n.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return n.unshift(this.scene.sys.displayList.getIndex(t)),n},destroy:function(t){if(void 0===t&&(t=!1),this.scene&&!this.ignoreDestroy){this.preDestroy&&this.preDestroy.call(this),this.emit(a.DESTROY,this);var e=this.scene.sys;t||(e.displayList.remove(this),e.updateList.remove(this)),this.input&&(e.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),t||e.queueDepthSort(),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0,this.removeAllListeners()}}});h.RENDER_MASK=15,t.exports=h},function(t,e){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}},function(t,e,n){var i=n(0),r=n(196),s=new i({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("destroy",this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var n=[],i=0;iMath.PI&&(t-=i.PI2),Math.abs(((t+i.TAU)%i.PI2-i.PI2)%i.PI2)}},function(t,e,n){var i=n(1);t.exports=function(t){return t*i.RAD_TO_DEG}},function(t,e){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}},function(t,e){t.exports=function(t,e){return Math.random()*(e-t)+t}},function(t,e){t.exports=function(t,e,n){return Math.max(e,Math.min(n,t))}},function(t,e,n){var i=new(n(0))({initialize:function(t,e,n){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=n||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new i(this.x,this.y,this.z)},crossVectors:function(t,e){var n=t.x,i=t.y,r=t.z,s=e.x,o=e.y,a=e.z;return this.x=i*a-r*o,this.y=r*s-n*a,this.z=n*o-i*s,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,n){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=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||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,n=t.y-this.y,i=t.z-this.z||0;return Math.sqrt(e*e+n*n+i*i)},distanceSq:function(t){var e=t.x-this.x,n=t.y-this.y,i=t.z-this.z||0;return e*e+n*n+i*i},length:function(){var t=this.x,e=this.y,n=this.z;return Math.sqrt(t*t+e*e+n*n)},lengthSq:function(){var t=this.x,e=this.y,n=this.z;return t*t+e*e+n*n},normalize:function(){var t=this.x,e=this.y,n=this.z,i=t*t+e*e+n*n;return 0s[0]&&(e=1),s[8]>s[3*e+e]&&(e=2),n=a[e],i=a[n],r=Math.sqrt(s[3*e+e]-s[3*n+n]-s[3*i+i]+1),h[e]=.5*r,r=.5/r,h[n]=(s[3*n+e]+s[3*e+n])*r,h[i]=(s[3*i+e]+s[3*e+i])*r,this.x=h[0],this.y=h[1],this.z=h[2],this.w=(s[3*i+n]-s[3*n+i])*r),this}});t.exports=d},function(t,e,n){var r=n(15),s=n(33);t.exports=function(t,e){var n=void 0===t?s():r({},t);if(e)for(var i in e)void 0!==e[i]&&(n[i]=e[i]);return n}},function(t,e){t.exports=function(t,e,n,i,r,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===n&&(n=""),void 0===i&&(i=""),void 0===r&&(r=0),void 0===s&&(s=!1),{responseType:t,async:e,user:n,password:i,timeout:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:s}}},function(t,e){t.exports=function(){}},function(t,e,n){var u=n(36),i=n(0),p=n(12),r=n(150),s=n(151),g=n(175),h=n(176),c=n(194),o=new i({Extends:s,initialize:function(t,e){s.call(this,t,e);var n=e.game;this.isWebGL=2===n.config.renderType,this.cache=n.cache.addCustom("spine"),this.spineTextures=n.cache.addCustom("spineTextures"),this.json=n.cache.json,this.textures=n.textures,this.drawDebug=!1,this.gl,this.renderer,this.sceneRenderer,this.skeletonRenderer,this.skeletonDebugRenderer,this.plugin=g,this.temp1,this.temp2,this.isWebGL?(this.runtime=g.webgl,this.renderer=n.renderer,this.gl=n.renderer.gl,this.getAtlas=this.getAtlasWebGL):(this.runtime=g.canvas,this.renderer=n.renderer,this.getAtlas=this.getAtlasCanvas);var l=this;e.registerFileType("spine",this.spineFileCallback,t),e.registerGameObject("spine",function(t,e,n,i,r){var s=new c(this.scene,l,t,e,n,i,r);return this.displayList.add(s),this.updateList.add(s),s},function(t,e){void 0===t&&(t={});var n=p(t,"key",null),i=p(t,"animationName",null),r=p(t,"loop",!1),s=new c(this.scene,l,0,0,n,i,r);void 0!==e&&(t.add=e),u(this.scene,s,t);var o=p(t,"skinName",!1);o&&s.setSkinByName(o);var a=p(t,"slotName",!1),h=p(t,"attachmentName",null);return a&&s.setAttachment(a,h),s.refresh()})},boot:function(){this.isWebGL?(this.bootWebGL(),this.onResize(),this.game.scale.on(r,this.onResize,this)):this.bootCanvas();var t=this.systems.events;t.once("shutdown",this.shutdown,this),t.once("destroy",this.destroy,this)},bootCanvas:function(){this.skeletonRenderer=new g.canvas.SkeletonRenderer(this.scene.sys.context)},bootWebGL:function(){this.sceneRenderer=new g.webgl.SceneRenderer(this.renderer.canvas,this.gl,!0);function t(t,e){var n;t===this.srcBlend&&e===this.dstBlend||(n=this.context.gl,this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),n.blendFunc(this.srcBlend,this.dstBlend)))}this.sceneRenderer.batcher.setBlendMode=t,this.sceneRenderer.shapes.setBlendMode=t,this.skeletonRenderer=this.sceneRenderer.skeletonRenderer,this.skeletonDebugRenderer=this.sceneRenderer.skeletonDebugRenderer,this.temp1=new g.webgl.Vector3(0,0,0),this.temp2=new g.webgl.Vector3(0,0,0)},getAtlasCanvas:function(t){var e=this.cache.get(t);if(e){var n,i=this.spineTextures;return i.has(t)?i.get(t):(n=this.textures,new g.TextureAtlas(e.data,function(t){return new g.canvas.CanvasTexture(n.get(e.prefix+t).getSourceImage())}))}console.warn("No atlas data for: "+t)},getAtlasWebGL:function(t){var e=this.cache.get(t);if(e){var n,i,r=this.spineTextures,s=r.has(t)?r.get(t):(n=this.textures,(i=this.sceneRenderer.context.gl).pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),new g.TextureAtlas(e.data,function(t){return new g.webgl.GLTexture(i,n.get(e.prefix+t).getSourceImage(),!1)}));return s}console.warn("No atlas data for: "+t)},spineFileCallback:function(t,e,n,i,r,s){var o;if(Array.isArray(t))for(var a=0;a=i.PI2-n?t=e:(Math.abs(e-t)>Math.PI&&(e>>0,n=(e*=n)>>>0,n+=4294967296*(e-=n);return 2.3283064365386963e-10*((this.n=n)>>>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;e= 0.");if(null==e)throw new Error("name cannot be null.");this.index=t,this.name=e,this.parent=n}function be(t,e){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.mix=t.mix,this.softness=t.softness,this.bendDirection=t.bendDirection,this.compress=t.compress,this.stretch=t.stretch,this.bones=new Array;for(var n=0;n= 0.");if(null==e)throw new Error("name cannot be null.");if(null==n)throw new Error("boneData cannot be null.");this.index=t,this.name=e,this.boneData=n}function Oe(t,e){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new N.Vector2,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.rotateMix=t.rotateMix,this.translateMix=t.translateMix,this.scaleMix=t.scaleMix,this.shearMix=t.shearMix,this.bones=new Array;for(var n=0;n>>1;;){if(t[(s+1)*n]<=e?i=s+1:r=s,i==r)return(i+1)*n;s=i+r>>>1}},r.linearSearch=function(t,e,n){for(var i=0,r=t.length-n;i<=r;i+=n)if(t[i]>e)return i;return-1},r);function r(t,e,n){if(null==t)throw new Error("name cannot be null.");if(null==e)throw new Error("timelines cannot be null.");this.name=t,this.timelines=e,this.timelineIds=[];for(var i=0;i 0: "+t);this.curves=B.Utils.newFloatArray((t-1)*M.BEZIER_SIZE)}B.CurveTimeline=s;var o,a=(me(m,o=s),m.prototype.getPropertyId=function(){return(n.rotate<<24)+this.boneIndex},m.prototype.setFrame=function(t,e,n){t<<=1,this.frames[t]=e,this.frames[t+m.ROTATION]=n},m.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=a[a.length-m.ENTRIES]){var u=a[a.length+m.PREV_ROTATION];switch(s){case Y.setup:h.rotation=h.data.rotation+u*r;break;case Y.first:case Y.replace:u+=h.data.rotation-h.rotation,u-=360*(16384-(16384.499999999996-u/360|0));case Y.add:h.rotation+=u*r}}else{var c=z.binarySearch(a,n,m.ENTRIES),d=a[c+m.PREV_ROTATION],f=a[c],p=this.getCurvePercent((c>>1)-1,1-(n-f)/(a[c+m.PREV_TIME]-f)),g=d+((g=a[c+m.ROTATION]-d)-360*(16384-(16384.499999999996-g/360|0)))*p;switch(s){case Y.setup:h.rotation=h.data.rotation+(g-360*(16384-(16384.499999999996-g/360|0)))*r;break;case Y.first:case Y.replace:g+=h.data.rotation-h.rotation;case Y.add:h.rotation+=(g-360*(16384-(16384.499999999996-g/360|0)))*r}}},m.ENTRIES=2,m.PREV_TIME=-2,m.PREV_ROTATION=-1,m.ROTATION=1,m);function m(t){var e=o.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t<<1),e}B.RotateTimeline=a;var h,l=(me(p,h=s),p.prototype.getPropertyId=function(){return(n.translate<<24)+this.boneIndex},p.prototype.setFrame=function(t,e,n,i){t*=p.ENTRIES,this.frames[t]=e,this.frames[t+p.X]=n,this.frames[t+p.Y]=i},p.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=a[a.length-p.ENTRIES]?(d=a[a.length+p.PREV_X],f=a[a.length+p.PREV_Y]):(d=a[(l=z.binarySearch(a,n,p.ENTRIES))+p.PREV_X],f=a[l+p.PREV_Y],u=a[l],c=this.getCurvePercent(l/p.ENTRIES-1,1-(n-u)/(a[l+p.PREV_TIME]-u)),d+=(a[l+p.X]-d)*c,f+=(a[l+p.Y]-f)*c),s){case Y.setup:h.x=h.data.x+d*r,h.y=h.data.y+f*r;break;case Y.first:case Y.replace:h.x+=(h.data.x+d-h.x)*r,h.y+=(h.data.y+f-h.y)*r;break;case Y.add:h.x+=d*r,h.y+=f*r}}},p.ENTRIES=3,p.PREV_TIME=-3,p.PREV_X=-2,p.PREV_Y=-1,p.X=1,p.Y=2,p);function p(t){var e=h.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*p.ENTRIES),e}B.TranslateTimeline=l;var u,c=(me(x,u=l),x.prototype.getPropertyId=function(){return(n.scale<<24)+this.boneIndex},x.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=a[a.length-x.ENTRIES]?(d=a[a.length+x.PREV_X]*h.data.scaleX,a[a.length+x.PREV_Y]*h.data.scaleY):(d=a[(l=z.binarySearch(a,n,x.ENTRIES))+x.PREV_X],f=a[l+x.PREV_Y],u=a[l],c=this.getCurvePercent(l/x.ENTRIES-1,1-(n-u)/(a[l+x.PREV_TIME]-u)),d=(d+(a[l+x.X]-d)*c)*h.data.scaleX,(f+(a[l+x.Y]-f)*c)*h.data.scaleY),1==r)s==Y.add?(h.scaleX+=d-h.data.scaleX,h.scaleY+=f-h.data.scaleY):(h.scaleX=d,h.scaleY=f);else{var p=0,g=0;if(o==v.mixOut)switch(s){case Y.setup:p=h.data.scaleX,g=h.data.scaleY,h.scaleX=p+(Math.abs(d)*B.MathUtils.signum(p)-p)*r,h.scaleY=g+(Math.abs(f)*B.MathUtils.signum(g)-g)*r;break;case Y.first:case Y.replace:p=h.scaleX,g=h.scaleY,h.scaleX=p+(Math.abs(d)*B.MathUtils.signum(p)-p)*r,h.scaleY=g+(Math.abs(f)*B.MathUtils.signum(g)-g)*r;break;case Y.add:p=h.scaleX,g=h.scaleY,h.scaleX=p+(Math.abs(d)*B.MathUtils.signum(p)-h.data.scaleX)*r,h.scaleY=g+(Math.abs(f)*B.MathUtils.signum(g)-h.data.scaleY)*r}else switch(s){case Y.setup:p=Math.abs(h.data.scaleX)*B.MathUtils.signum(d),g=Math.abs(h.data.scaleY)*B.MathUtils.signum(f),h.scaleX=p+(d-p)*r,h.scaleY=g+(f-g)*r;break;case Y.first:case Y.replace:p=Math.abs(h.scaleX)*B.MathUtils.signum(d),g=Math.abs(h.scaleY)*B.MathUtils.signum(f),h.scaleX=p+(d-p)*r,h.scaleY=g+(f-g)*r;break;case Y.add:p=B.MathUtils.signum(d),g=B.MathUtils.signum(f),h.scaleX=Math.abs(h.scaleX)*p+(d-Math.abs(h.data.scaleX)*p)*r,h.scaleY=Math.abs(h.scaleY)*g+(f-Math.abs(h.data.scaleY)*g)*r}}}},x);function x(t){return u.call(this,t)||this}B.ScaleTimeline=c;var d,f=(me(g,d=l),g.prototype.getPropertyId=function(){return(n.shear<<24)+this.boneIndex},g.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=a[a.length-g.ENTRIES]?(d=a[a.length+g.PREV_X],f=a[a.length+g.PREV_Y]):(d=a[(l=z.binarySearch(a,n,g.ENTRIES))+g.PREV_X],f=a[l+g.PREV_Y],u=a[l],c=this.getCurvePercent(l/g.ENTRIES-1,1-(n-u)/(a[l+g.PREV_TIME]-u)),d+=(a[l+g.X]-d)*c,f+=(a[l+g.Y]-f)*c),s){case Y.setup:h.shearX=h.data.shearX+d*r,h.shearY=h.data.shearY+f*r;break;case Y.first:case Y.replace:h.shearX+=(h.data.shearX+d-h.shearX)*r,h.shearY+=(h.data.shearY+f-h.shearY)*r;break;case Y.add:h.shearX+=d*r,h.shearY+=f*r}}},g);function g(t){return d.call(this,t)||this}B.ShearTimeline=f;var y,w=(me(E,y=s),E.prototype.getPropertyId=function(){return(n.color<<24)+this.slotIndex},E.prototype.setFrame=function(t,e,n,i,r,s){t*=E.ENTRIES,this.frames[t]=e,this.frames[t+E.R]=n,this.frames[t+E.G]=i,this.frames[t+E.B]=r,this.frames[t+E.A]=s},E.prototype.apply=function(t,e,n,i,r,s,o){var a=t.slots[this.slotIndex];if(a.bone.active){var h=this.frames;if(n=h[h.length-E.ENTRIES]?(g=h[(c=h.length)+E.PREV_R],v=h[c+E.PREV_G],m=h[c+E.PREV_B],M=h[c+E.PREV_A]):(g=h[(d=z.binarySearch(h,n,E.ENTRIES))+E.PREV_R],v=h[d+E.PREV_G],m=h[d+E.PREV_B],M=h[d+E.PREV_A],f=h[d],p=this.getCurvePercent(d/E.ENTRIES-1,1-(n-f)/(h[d+E.PREV_TIME]-f)),g+=(h[d+E.R]-g)*p,v+=(h[d+E.G]-v)*p,m+=(h[d+E.B]-m)*p,M+=(h[d+E.A]-M)*p),1==r?a.color.set(g,v,m,M):(l=a.color,s==Y.setup&&l.setFromColor(a.data.color),l.add((g-l.r)*r,(v-l.g)*r,(m-l.b)*r,(M-l.a)*r))}}},E.ENTRIES=5,E.PREV_TIME=-5,E.PREV_R=-4,E.PREV_G=-3,E.PREV_B=-2,E.PREV_A=-1,E.R=1,E.G=2,E.B=3,E.A=4,E);function E(t){var e=y.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*E.ENTRIES),e}B.ColorTimeline=w;var b,T=(me(A,b=s),A.prototype.getPropertyId=function(){return(n.twoColor<<24)+this.slotIndex},A.prototype.setFrame=function(t,e,n,i,r,s,o,a,h){t*=A.ENTRIES,this.frames[t]=e,this.frames[t+A.R]=n,this.frames[t+A.G]=i,this.frames[t+A.B]=r,this.frames[t+A.A]=s,this.frames[t+A.R2]=o,this.frames[t+A.G2]=a,this.frames[t+A.B2]=h},A.prototype.apply=function(t,e,n,i,r,s,o){var a=t.slots[this.slotIndex];if(a.bone.active){var h=this.frames;if(n=h[h.length-A.ENTRIES]?(m=h[(f=h.length)+A.PREV_R],M=h[f+A.PREV_G],x=h[f+A.PREV_B],y=h[f+A.PREV_A],w=h[f+A.PREV_R2],E=h[f+A.PREV_G2],b=h[f+A.PREV_B2]):(m=h[(p=z.binarySearch(h,n,A.ENTRIES))+A.PREV_R],M=h[p+A.PREV_G],x=h[p+A.PREV_B],y=h[p+A.PREV_A],w=h[p+A.PREV_R2],E=h[p+A.PREV_G2],b=h[p+A.PREV_B2],g=h[p],v=this.getCurvePercent(p/A.ENTRIES-1,1-(n-g)/(h[p+A.PREV_TIME]-g)),m+=(h[p+A.R]-m)*v,M+=(h[p+A.G]-M)*v,x+=(h[p+A.B]-x)*v,y+=(h[p+A.A]-y)*v,w+=(h[p+A.R2]-w)*v,E+=(h[p+A.G2]-E)*v,b+=(h[p+A.B2]-b)*v),1==r?(a.color.set(m,M,x,y),a.darkColor.set(w,E,b,1)):(l=a.color,u=a.darkColor,s==Y.setup&&(l.setFromColor(a.data.color),u.setFromColor(a.data.darkColor)),l.add((m-l.r)*r,(M-l.g)*r,(x-l.b)*r,(y-l.a)*r),u.add((w-u.r)*r,(E-u.g)*r,(b-u.b)*r,0))}}},A.ENTRIES=8,A.PREV_TIME=-8,A.PREV_R=-7,A.PREV_G=-6,A.PREV_B=-5,A.PREV_A=-4,A.PREV_R2=-3,A.PREV_G2=-2,A.PREV_B2=-1,A.R=1,A.G=2,A.B=3,A.A=4,A.R2=5,A.G2=6,A.B2=7,A);function A(t){var e=b.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*A.ENTRIES),e}B.TwoColorTimeline=T;var R=(S.prototype.getPropertyId=function(){return(n.attachment<<24)+this.slotIndex},S.prototype.getFrameCount=function(){return this.frames.length},S.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.attachmentNames[t]=n},S.prototype.apply=function(t,e,n,i,r,s,o){var a,h,l,u=t.slots[this.slotIndex];u.bone.active&&(o!=v.mixOut?n<(a=this.frames)[0]?s!=Y.setup&&s!=Y.first||this.setAttachment(t,u,u.data.attachmentName):(h=0,h=n>=a[a.length-1]?a.length-1:z.binarySearch(a,n,1)-1,l=this.attachmentNames[h],t.slots[this.slotIndex].setAttachment(null==l?null:t.getAttachment(this.slotIndex,l))):s==Y.setup&&this.setAttachment(t,u,u.data.attachmentName))},S.prototype.setAttachment=function(t,e,n){e.attachment=null==n?null:t.getAttachment(this.slotIndex,n)},S);function S(t){this.frames=B.Utils.newFloatArray(t),this.attachmentNames=new Array(t)}B.AttachmentTimeline=R;var I,C=null,P=(me(L,I=s),L.prototype.getPropertyId=function(){return(n.deform<<27)+ +this.attachment.id+this.slotIndex},L.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.frameVertices[t]=n},L.prototype.apply=function(t,e,n,i,r,s,o){var a=t.slots[this.slotIndex];if(a.bone.active){var h=a.getAttachment();if(h instanceof B.VertexAttachment&&h.deformAttachment==this.attachment){var l=a.deform;0==l.length&&(s=Y.setup);var u=this.frameVertices,c=u[0].length,d=this.frames;if(n=d[d.length-1]){var M=u[d.length-1];if(1==r)if(s==Y.add)if(null==(f=h).bones)for(var g=f.vertices,x=0;x=a[h-1])return;if(!(n=a[l];l++)i.push(this.events[l])}}},k);function k(t){this.frames=B.Utils.newFloatArray(t),this.events=new Array(t)}B.EventTimeline=_;var F=(O.prototype.getPropertyId=function(){return n.drawOrder<<24},O.prototype.getFrameCount=function(){return this.frames.length},O.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.drawOrders[t]=n},O.prototype.apply=function(t,e,n,i,r,s,o){var a=t.drawOrder,h=t.slots;if(o!=v.mixOut){var l=this.frames;if(n=l[l.length-1]?l.length-1:z.binarySearch(l,n)-1,c=this.drawOrders[u];if(null==c)B.Utils.arrayCopy(h,0,a,0,h.length);else for(var d=0,f=c.length;d=d[d.length-N.ENTRIES]?s==Y.setup?(f.mix=f.data.mix+(d[d.length+N.PREV_MIX]-f.data.mix)*r,f.softness=f.data.softness+(d[d.length+N.PREV_SOFTNESS]-f.data.softness)*r,o==v.mixOut?(f.bendDirection=f.data.bendDirection,f.compress=f.data.compress,f.stretch=f.data.stretch):(f.bendDirection=d[d.length+N.PREV_BEND_DIRECTION],f.compress=0!=d[d.length+N.PREV_COMPRESS],f.stretch=0!=d[d.length+N.PREV_STRETCH])):(f.mix+=(d[d.length+N.PREV_MIX]-f.mix)*r,f.softness+=(d[d.length+N.PREV_SOFTNESS]-f.softness)*r,o==v.mixIn&&(f.bendDirection=d[d.length+N.PREV_BEND_DIRECTION],f.compress=0!=d[d.length+N.PREV_COMPRESS],f.stretch=0!=d[d.length+N.PREV_STRETCH])):(h=d[(a=z.binarySearch(d,n,N.ENTRIES))+N.PREV_MIX],l=d[a+N.PREV_SOFTNESS],u=d[a],c=this.getCurvePercent(a/N.ENTRIES-1,1-(n-u)/(d[a+N.PREV_TIME]-u)),s==Y.setup?(f.mix=f.data.mix+(h+(d[a+N.MIX]-h)*c-f.data.mix)*r,f.softness=f.data.softness+(l+(d[a+N.SOFTNESS]-l)*c-f.data.softness)*r,o==v.mixOut?(f.bendDirection=f.data.bendDirection,f.compress=f.data.compress,f.stretch=f.data.stretch):(f.bendDirection=d[a+N.PREV_BEND_DIRECTION],f.compress=0!=d[a+N.PREV_COMPRESS],f.stretch=0!=d[a+N.PREV_STRETCH])):(f.mix+=(h+(d[a+N.MIX]-h)*c-f.mix)*r,f.softness+=(l+(d[a+N.SOFTNESS]-l)*c-f.softness)*r,o==v.mixIn&&(f.bendDirection=d[a+N.PREV_BEND_DIRECTION],f.compress=0!=d[a+N.PREV_COMPRESS],f.stretch=0!=d[a+N.PREV_STRETCH])))},N.ENTRIES=6,N.PREV_TIME=-6,N.PREV_MIX=-5,N.PREV_SOFTNESS=-4,N.PREV_BEND_DIRECTION=-3,N.PREV_COMPRESS=-2,N.PREV_STRETCH=-1,N.MIX=1,N.SOFTNESS=2,N.BEND_DIRECTION=3,N.COMPRESS=4,N.STRETCH=5,N);function N(t){var e=V.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*N.ENTRIES),e}B.IkConstraintTimeline=D;var U,X=(me(W,U=s),W.prototype.getPropertyId=function(){return(n.transformConstraint<<24)+this.transformConstraintIndex},W.prototype.setFrame=function(t,e,n,i,r,s){t*=W.ENTRIES,this.frames[t]=e,this.frames[t+W.ROTATE]=n,this.frames[t+W.TRANSLATE]=i,this.frames[t+W.SCALE]=r,this.frames[t+W.SHEAR]=s},W.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.transformConstraints[this.transformConstraintIndex];if(h.active)if(n=a[a.length-W.ENTRIES]?(p=a[(u=a.length)+W.PREV_ROTATE],g=a[u+W.PREV_TRANSLATE],v=a[u+W.PREV_SCALE],m=a[u+W.PREV_SHEAR]):(p=a[(c=z.binarySearch(a,n,W.ENTRIES))+W.PREV_ROTATE],g=a[c+W.PREV_TRANSLATE],v=a[c+W.PREV_SCALE],m=a[c+W.PREV_SHEAR],d=a[c],f=this.getCurvePercent(c/W.ENTRIES-1,1-(n-d)/(a[c+W.PREV_TIME]-d)),p+=(a[c+W.ROTATE]-p)*f,g+=(a[c+W.TRANSLATE]-g)*f,v+=(a[c+W.SCALE]-v)*f,m+=(a[c+W.SHEAR]-m)*f),s==Y.setup?(l=h.data,h.rotateMix=l.rotateMix+(p-l.rotateMix)*r,h.translateMix=l.translateMix+(g-l.translateMix)*r,h.scaleMix=l.scaleMix+(v-l.scaleMix)*r,h.shearMix=l.shearMix+(m-l.shearMix)*r):(h.rotateMix+=(p-h.rotateMix)*r,h.translateMix+=(g-h.translateMix)*r,h.scaleMix+=(v-h.scaleMix)*r,h.shearMix+=(m-h.shearMix)*r)}},W.ENTRIES=5,W.PREV_TIME=-5,W.PREV_ROTATE=-4,W.PREV_TRANSLATE=-3,W.PREV_SCALE=-2,W.PREV_SHEAR=-1,W.ROTATE=1,W.TRANSLATE=2,W.SCALE=3,W.SHEAR=4,W);function W(t){var e=U.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*W.ENTRIES),e}B.TransformConstraintTimeline=X;var q,G=(me(H,q=s),H.prototype.getPropertyId=function(){return(n.pathConstraintPosition<<24)+this.pathConstraintIndex},H.prototype.setFrame=function(t,e,n){t*=H.ENTRIES,this.frames[t]=e,this.frames[t+H.VALUE]=n},H.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n=a[a.length-H.ENTRIES]?d=a[a.length+H.PREV_VALUE]:(d=a[(l=z.binarySearch(a,n,H.ENTRIES))+H.PREV_VALUE],u=a[l],c=this.getCurvePercent(l/H.ENTRIES-1,1-(n-u)/(a[l+H.PREV_TIME]-u)),d+=(a[l+H.VALUE]-d)*c),s==Y.setup?h.position=h.data.position+(d-h.data.position)*r:h.position+=(d-h.position)*r}},H.ENTRIES=2,H.PREV_TIME=-2,H.PREV_VALUE=-1,H.VALUE=1,H);function H(t){var e=q.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*H.ENTRIES),e}B.PathConstraintPositionTimeline=G;var j,Z=(me(K,j=G),K.prototype.getPropertyId=function(){return(n.pathConstraintSpacing<<24)+this.pathConstraintIndex},K.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n=a[a.length-K.ENTRIES]?d=a[a.length+K.PREV_VALUE]:(d=a[(l=z.binarySearch(a,n,K.ENTRIES))+K.PREV_VALUE],u=a[l],c=this.getCurvePercent(l/K.ENTRIES-1,1-(n-u)/(a[l+K.PREV_TIME]-u)),d+=(a[l+K.VALUE]-d)*c),s==Y.setup?h.spacing=h.data.spacing+(d-h.data.spacing)*r:h.spacing+=(d-h.spacing)*r}},K);function K(t){return j.call(this,t)||this}B.PathConstraintSpacingTimeline=Z;var Q,J=(me($,Q=s),$.prototype.getPropertyId=function(){return(n.pathConstraintMix<<24)+this.pathConstraintIndex},$.prototype.setFrame=function(t,e,n,i){t*=$.ENTRIES,this.frames[t]=e,this.frames[t+$.ROTATE]=n,this.frames[t+$.TRANSLATE]=i},$.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n=a[a.length-$.ENTRIES]?(d=a[a.length+$.PREV_ROTATE],f=a[a.length+$.PREV_TRANSLATE]):(d=a[(l=z.binarySearch(a,n,$.ENTRIES))+$.PREV_ROTATE],f=a[l+$.PREV_TRANSLATE],u=a[l],c=this.getCurvePercent(l/$.ENTRIES-1,1-(n-u)/(a[l+$.PREV_TIME]-u)),d+=(a[l+$.ROTATE]-d)*c,f+=(a[l+$.TRANSLATE]-f)*c),s==Y.setup?(h.rotateMix=h.data.rotateMix+(d-h.data.rotateMix)*r,h.translateMix=h.data.translateMix+(f-h.data.translateMix)*r):(h.rotateMix+=(d-h.rotateMix)*r,h.translateMix+=(f-h.translateMix)*r)}},$.ENTRIES=3,$.PREV_TIME=-3,$.PREV_ROTATE=-2,$.PREV_TRANSLATE=-1,$.ROTATE=1,$.TRANSLATE=2,$);function $(t){var e=Q.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*$.ENTRIES),e}B.PathConstraintMixTimeline=J}(ge=ge||{}),function(R){var t=(S.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,n=0,i=e.length;n=r.trackEnd&&null==r.mixingFrom){e[n]=null,this.queue.end(r),this.disposeNext(r);continue}if(null!=r.mixingFrom&&this.updateMixingFrom(r,t)){var h=r.mixingFrom;for((r.mixingFrom=null)!=h&&(h.mixingTo=null);null!=h;)this.queue.end(h),h=h.mixingFrom}r.trackTime+=s}}this.queue.drain()},S.prototype.updateMixingFrom=function(t,e){var n=t.mixingFrom;if(null==n)return!0;var i=this.updateMixingFrom(n,e);return n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,0=t.mixDuration?(0!=n.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=n.mixingFrom,null!=n.mixingFrom&&(n.mixingFrom.mixingTo=t),t.interruptAlpha=n.interruptAlpha,this.queue.end(n)),i):(n.trackTime+=e*n.timeScale,t.mixTime+=e,!1)},S.prototype.apply=function(t){if(null==t)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var e=this.events,n=this.tracks,i=!1,r=0,s=n.length;r=o.trackEnd&&null==o.next&&(h=0);var l=o.animationLast,u=o.getAnimationTime(),c=o.animation.timelines.length,d=o.animation.timelines;if(0==r&&1==h||a==R.MixBlend.add)for(var f=0;f=s[s.length-1]?s.length-1:R.Animation.binarySearch(s,n)-1,this.setAttachment(e,a,t.attachmentNames[o],r)),a.attachmentState<=this.unkeyedState&&(a.attachmentState=this.unkeyedState+S.SETUP))},S.prototype.setAttachment=function(t,e,n,i){e.attachment=null==n?null:t.getAttachment(e.data.index,n),i&&(e.attachmentState=this.unkeyedState+S.CURRENT)},S.prototype.applyRotateTimeline=function(t,e,n,i,r,s,o,a){if(a&&(s[o]=0),1!=i){var h=t,l=h.frames,u=e.bones[h.boneIndex];if(u.active){var c=0,d=0;if(n=l[l.length-R.RotateTimeline.ENTRIES]?d=u.data.rotation+l[l.length+R.RotateTimeline.PREV_ROTATION]:(p=l[(f=R.Animation.binarySearch(l,n,R.RotateTimeline.ENTRIES))+R.RotateTimeline.PREV_ROTATION],g=l[f],v=h.getCurvePercent((f>>1)-1,1-(n-g)/(l[f+R.RotateTimeline.PREV_TIME]-g)),d=l[f+R.RotateTimeline.ROTATION]-p,d=p+(d-=360*(16384-(16384.499999999996-d/360|0)))*v+u.data.rotation,d-=360*(16384-(16384.499999999996-d/360|0)))}var m,M,x,y,w=0,E=d-c;0==(E-=360*(16384-(16384.499999999996-E/360|0)))?w=s[o]:(M=m=0,M=a?(m=0,E):(m=s[o],s[o+1]),x=0i||this.queue.event(t,l)}for((t.loop?0==r||s>t.trackTime%r:i<=e&&t.animationLast=this.tracks.length)){var e=this.tracks[t];if(null!=e){this.queue.end(e),this.disposeNext(e);for(var n=e;;){var i=n.mixingFrom;if(null==i)break;this.queue.end(i),n.mixingFrom=null,n.mixingTo=null,n=i}this.tracks[e.trackIndex]=null,this.queue.drain()}}},S.prototype.setCurrent=function(t,e,n){var i=this.expandToIndex(t);this.tracks[t]=e,null!=i&&(n&&this.queue.interrupt(i),((e.mixingFrom=i).mixingTo=e).mixTime=0,null!=i.mixingFrom&&0=this.tracks.length?null:this.tracks[t]},S.prototype.addListener=function(t){if(null==t)throw new Error("listener cannot be null.");this.listeners.push(t)},S.prototype.removeListener=function(t){var e=this.listeners.indexOf(t);0<=e&&this.listeners.splice(e,1)},S.prototype.clearListeners=function(){this.listeners.length=0},S.prototype.clearListenerNotifications=function(){this.queue.clear()},S.emptyAnimation=new R.Animation("",[],0),S.SUBSEQUENT=0,S.FIRST=1,S.HOLD_SUBSEQUENT=2,S.HOLD_FIRST=3,S.HOLD_MIX=4,S.SETUP=1,S.CURRENT=2,S);function S(t){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new r(this),this.propertyIDs=new R.IntSet,this.animationsChanged=!1,this.trackEntryPool=new R.Pool(function(){return new e}),this.data=t}R.AnimationState=t;var e=(n.prototype.reset=function(){this.next=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0},n.prototype.getAnimationTime=function(){if(this.loop){var t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)},n.prototype.setAnimationLast=function(t){this.animationLast=t,this.nextAnimationLast=t},n.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},n.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},n);function n(){this.mixBlend=R.MixBlend.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}R.TrackEntry=e;var a,i,r=(s.prototype.start=function(t){this.objects.push(a.start),this.objects.push(t),this.animState.animationsChanged=!0},s.prototype.interrupt=function(t){this.objects.push(a.interrupt),this.objects.push(t)},s.prototype.end=function(t){this.objects.push(a.end),this.objects.push(t),this.animState.animationsChanged=!0},s.prototype.dispose=function(t){this.objects.push(a.dispose),this.objects.push(t)},s.prototype.complete=function(t){this.objects.push(a.complete),this.objects.push(t)},s.prototype.event=function(t,e){this.objects.push(a.event),this.objects.push(t),this.objects.push(e)},s.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var t=this.objects,e=this.animState.listeners,n=0;nj.MathUtils.PI?U-=j.MathUtils.PI2:U<-j.MathUtils.PI&&(U+=j.MathUtils.PI2),U*=e,V=Math.cos(U),D=Math.sin(U),R.a=V*_-D*F,R.b=V*k-D*O,R.c=D*_+V*F,R.d=D*k+V*O),R.appliedValid=!1}}}},Ae.prototype.computeWorldPositions=function(t,e,n,i,r){var s=this.target,o=this.position,a=this.spaces,h=j.Utils.setArraySize(this.positions,3*e+2),l=null,u=t.closed,c=t.worldVerticesLength,d=c/6,f=Ae.NONE;if(!t.constantSpeed){var p=t.lengths,g=p[d-=u?1:2];if(i&&(o*=g),r)for(var v=1;v>>1^-(1&n)},e.prototype.readStringRef=function(){var t=this.readInt(!0);return 0==t?null:this.strings[t-1]},e.prototype.readString=function(){var t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;for(var e="",n=0;n>4){case 12:case 13:e+=String.fromCharCode((31&i)<<6|63&this.readByte()),n+=2;break;case 14:e+=String.fromCharCode((15&i)<<12|(63&this.readByte())<<6|63&this.readByte()),n+=3;break;default:e+=String.fromCharCode(i),n++}}return e},e.prototype.readFloat=function(){var t=this.buffer.getFloat32(this.index);return this.index+=4,t},e.prototype.readBoolean=function(){return 0!=this.readByte()},e);function e(t,e,n,i){void 0===e&&(e=new Array),void 0===n&&(n=0),void 0===i&&(i=new DataView(t.buffer)),this.strings=e,this.index=n,this.buffer=i}var N=function(t,e,n,i,r){this.mesh=t,this.skin=e,this.slotIndex=n,this.parent=i,this.inheritDeform=r},u=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),this.bones=t,this.vertices=e}}(ge=ge||{}),C=ge=ge||{},Pe.prototype.update=function(t,e){if(null==t)throw new Error("skeleton cannot be null.");var n=this.boundingBoxes,i=this.polygons,r=this.polygonPool,s=t.slots,o=s.length;n.length=0,r.freeAll(i);for(var a=i.length=0;a=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},Pe.prototype.aabbIntersectsSegment=function(t,e,n,i){var r=this.minX,s=this.minY,o=this.maxX,a=this.maxY;if(t<=r&&n<=r||e<=s&&i<=s||o<=t&&o<=n||a<=e&&a<=i)return!1;var h=(i-e)/(n-t),l=h*(r-t)+e;if(st.minX&&this.minYt.minY},Pe.prototype.containsPoint=function(t,e){for(var n=this.polygons,i=0,r=n.length;i>1,N=this.clipOutput,U=Z.Utils.setArraySize(l,P+D*f),X=0;X>1;a=i.length&&(i.length=t+1),i[t]||(i[t]={}),i[t][e]=n},e.prototype.addSkin=function(t){for(var e=0;e=this.lines.length?null:this.lines[this.index++]},n.prototype.readValue=function(){var t=this.readLine(),e=t.indexOf(":");if(-1==e)throw new Error("Invalid line: "+t);return t.substring(e+1).trim()},n.prototype.readTuple=function(t){var e=this.readLine(),n=e.indexOf(":");if(-1==n)throw new Error("Invalid line: "+e);for(var i=0,r=n+1;i<3;i++){var s=e.indexOf(",",r);if(-1==s)break;t[i]=e.substr(r,s-r).trim(),r=s+1}return t[i]=e.substring(r).trim(),i+1},n);function n(t){this.index=0,this.lines=t.split(/\r\n|\r|\n/)}var g=function(){};f.TextureAtlasPage=g;var i,v=(i=f.TextureRegion,me(r,i),r);function r(){return null!==i&&i.apply(this,arguments)||this}f.TextureAtlasRegion=v}(ge=ge||{}),N=ge=ge||{},Oe.prototype.isActive=function(){return this.active},Oe.prototype.apply=function(){this.update()},Oe.prototype.update=function(){this.data.local?this.data.relative?this.applyRelativeLocal():this.applyAbsoluteLocal():this.data.relative?this.applyRelativeWorld():this.applyAbsoluteWorld()},Oe.prototype.applyAbsoluteWorld=function(){for(var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target,s=r.a,o=r.b,a=r.c,h=r.d,l=0N.MathUtils.PI?T-=N.MathUtils.PI2:T<-N.MathUtils.PI&&(T+=N.MathUtils.PI2),T*=t,m=Math.cos(T),M=Math.sin(T),R.a=m*g-M*v,R.b=m*w-M*E,R.c=M*g+m*v,R.d=M*w+m*E,S=!0),0!=e&&(x=this.temp,r.localToWorld(x.set(this.data.offsetX,this.data.offsetY)),R.worldX+=(x.x-R.worldX)*e,R.worldY+=(x.y-R.worldY)*e,S=!0),0N.MathUtils.PI?T-=N.MathUtils.PI2:T<-N.MathUtils.PI&&(T+=N.MathUtils.PI2),T=b+(T+c)*i,A=Math.sqrt(w*w+E*E),R.b=Math.cos(T)*A,R.d=Math.sin(T)*A,S=!0),S&&(R.appliedValid=!1)}},Oe.prototype.applyRelativeWorld=function(){for(var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target,s=r.a,o=r.b,a=r.c,h=r.d,l=0N.MathUtils.PI?y-=N.MathUtils.PI2:y<-N.MathUtils.PI&&(y+=N.MathUtils.PI2),y*=t,m=Math.cos(y),M=Math.sin(y),T.a=m*g-M*v,T.b=m*w-M*E,T.c=M*g+m*v,T.d=M*w+m*E,A=!0),0!=e&&(x=this.temp,r.localToWorld(x.set(this.data.offsetX,this.data.offsetY)),T.worldX+=x.x*e,T.worldY+=x.y*e,A=!0),0N.MathUtils.PI?y-=N.MathUtils.PI2:y<-N.MathUtils.PI&&(y+=N.MathUtils.PI2),w=T.b,E=T.d,y=Math.atan2(E,w)+(y-N.MathUtils.PI/2+c)*i,b=Math.sqrt(w*w+E*E),T.b=Math.cos(y)*b,T.d=Math.sin(y)*b,A=!0),A&&(T.appliedValid=!1)}},Oe.prototype.applyAbsoluteLocal=function(){var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target;r.appliedValid||r.updateAppliedTransform();for(var s=this.bones,o=0,a=s.length;o>1,i=this.indicesArray,r=i.length=0;r>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255},r.rgb888ToColor=function(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255},r.WHITE=new r(1,1,1,1),r.RED=new r(1,0,0,1),r.GREEN=new r(0,1,0,1),r.BLUE=new r(0,0,1,1),r.MAGENTA=new r(1,0,1,1),r);function r(t,e,n,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),this.r=t,this.g=e,this.b=n,this.a=i}t.Color=i;var s=(o.clamp=function(t,e,n){return t=e?t:v.setArraySize(t,e,n)},v.newArray=function(t,e){for(var n=new Array(t),i=0;ithis.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,1=this.values.length},R.prototype.addValue=function(t){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0},R.prototype.getMean=function(){if(this.hasEnoughData()){if(this.dirty){for(var t=0,e=0;e>1)*s;var o=t.bone.skeleton,a=t.deform,h=this.vertices,l=this.bones;if(null!=l){for(var u=0,c=0,d=0;dthis.vertices.length)throw Error("Mesh can't store more than "+this.maxVertices()+" vertices");this.vertices.set(t,0),this.verticesLength=t.length},e.prototype.setIndices=function(t){if(this.dirtyIndices=!0,t.length>this.indices.length)throw Error("Mesh can't store more than "+this.maxIndices()+" indices");this.indices.set(t,0),this.indicesLength=t.length},e.prototype.draw=function(t,e){this.drawWithOffset(t,e,0,0this.mesh.getVertices().length||this.indicesLength+n.length>this.mesh.getIndices().length)&&this.flush();var i=this.mesh.numVertices();this.mesh.getVertices().set(e,this.verticesLength),this.verticesLength+=e.length,this.mesh.setVerticesLength(this.verticesLength);for(var r=this.mesh.getIndices(),s=this.indicesLength,o=0;o 0.");null===r&&(r=this.color);var o=2*te.MathUtils.PI/s,a=Math.cos(o),h=Math.sin(o),l=i,u=0;if(t){for(this.check(ne.Filled,3*s+3),s--,d=0;d>1))-2],w=d[p-1],g=0,v=p;g>1,d.numFloats=d.numVertices*E,d.numFloats>d.vertices.length&&(d.vertices=this.vertices=he.Utils.newFloatArray(d.numFloats)),S.computeWorldVertices(b,0,S.worldVerticesLength,d.vertices,0,E),p=S.triangles,A=S.region.renderObject.texture,f=S.uvs,v=S.color}if(null!=A){var I=b.color,C=this.tempColor;C.r=m.r*I.r*v.r,C.g=m.g*I.g*v.g,C.b=m.b*I.b*v.b,C.a=m.a*I.a*v.a,s&&(C.r*=C.a,C.g*=C.a,C.b*=C.a);var P=this.tempColor2;null==b.darkColor?P.set(0,0,0,1):(s?(P.r=b.darkColor.r*C.a,P.g=b.darkColor.g*C.a,P.b=b.darkColor.b*C.a):P.setFromColor(b.darkColor),P.a=s?1:0);var L=b.data.blendMode;if(L!=a&&(a=L,t.setBlendMode(le.WebGLBlendModeConverter.getSourceGLBlendMode(a,s),le.WebGLBlendModeConverter.getDestGLBlendMode(a))),r.isClipping()){r.clipTriangles(d.vertices,d.numFloats,p,p.length,f,C,P,o);var _=new Float32Array(r.clippedVertices),k=r.clippedTriangles;if(null!=this.vertexEffect){var F=this.vertexEffect,O=_;if(o)for(var V=0,D=_.length;V>16&255)/255,r=(t>>8&255)/255,s=(255&t)/255,o=16777215>>24)/255:null,a=this.skeleton;return!e||(n=this.findSlot(e))&&(a=n),a.color.r=i,a.color.g=r,a.color.b=s,null!==o&&(a.color.a=o),this},setSkeletonFromJSON:function(t,e,n,i){return this.setSkeleton(t,e,n,i)},setSkeleton:function(t,e,n,i){this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications());var r=this.plugin.createSkeleton(t,i);this.skeletonData=r.skeletonData,this.preMultipliedAlpha=r.preMultipliedAlpha;var s=r.skeleton;return s.setSkin(),s.setToSetupPose(),this.skeleton=s,r=this.plugin.createAnimationState(s),this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications()),this.state=r.state,this.stateData=r.stateData,this.state.addListener({event:this.onEvent.bind(this),complete:this.onComplete.bind(this),start:this.onStart.bind(this),end:this.onEnd.bind(this),dispose:this.onDispose.bind(this),interrupted:this.onInterrupted.bind(this)}),e&&this.setAnimation(0,e,n),this.root=this.getRootBone(),this.root&&(this.root.rotation=g(d(this.rotation))+90),this.state.apply(s),s.updateCache(),this.updateSize()},onComplete:function(t){this.emit(v.COMPLETE,t)},onDispose:function(t){this.emit(v.DISPOSE,t)},onEnd:function(t){this.emit(v.END,t)},onEvent:function(t,e){this.emit(v.EVENT,t,e)},onInterrupted:function(t){this.emit(v.INTERRUPTED,t)},onStart:function(t){this.emit(v.START,t)},refresh:function(){return this.root&&(this.root.rotation=g(d(this.rotation))+90),this.updateSize(),this.skeleton.updateCache(),this},setSize:function(t,e,n,i){var r=this.skeleton;return void 0===t&&(t=r.data.width),void 0===e&&(e=r.data.height),void 0===n&&(n=0),void 0===i&&(i=0),this.width=t,this.height=e,this.displayOriginX=r.x-n,this.displayOriginY=r.y-i,this},setOffset:function(t,e){var n=this.skeleton;return void 0===t&&(t=0),void 0===e&&(e=0),this.displayOriginX=n.x-t,this.displayOriginY=n.y-e,this},updateSize:function(){var t=this.skeleton,e=this.plugin.renderer.height,n=this.scaleX,i=this.scaleY;t.x=this.x,t.y=e-this.y,t.scaleX=1,t.scaleY=1,t.updateWorldTransform();var r=this.getBounds();return this.width=r.size.x,this.height=r.size.y,this.displayOriginX=this.x-r.offset.x,this.displayOriginY=this.y-(e-(this.height+r.offset.y)),t.scaleX=n,t.scaleY=i,t.updateWorldTransform(),this},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,this.refresh()}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,this.refresh()}},getBoneList:function(){var t=[],e=this.skeletonData;if(e)for(var n=0;n - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -472,7 +472,7 @@ var Events = __webpack_require__(/*! ./events */ "../../../src/data/events/index * @since 3.0.0 * * @param {object} parent - The object that this DataManager belongs to. - * @param {Phaser.Events.EventEmitter} eventEmitter - The DataManager's event emitter. + * @param {Phaser.Events.EventEmitter} [eventEmitter] - The DataManager's event emitter. */ var DataManager = new Class({ @@ -699,7 +699,7 @@ var DataManager = new Class({ * @param {(string|object)} key - The key to set the value for. Or an object or key value pairs. If an object the `data` argument is ignored. * @param {*} data - The value to set for the given key. If an object is provided as the key this argument is ignored. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ set: function (key, data) { @@ -723,6 +723,72 @@ var DataManager = new Class({ return this; }, + /** + * Increase a value for the given key. If the key doesn't already exist in the Data Manager then it is increased from 0. + * + * When the value is first set, a `setdata` event is emitted. + * + * @method Phaser.Data.DataManager#inc + * @fires Phaser.Data.Events#SET_DATA + * @fires Phaser.Data.Events#CHANGE_DATA + * @fires Phaser.Data.Events#CHANGE_DATA_KEY + * @since 3.23.0 + * + * @param {(string|object)} key - The key to increase the value for. + * @param {*} [data] - The value to increase for the given key. + * + * @return {Phaser.Data.DataManager} This DataManager object. + */ + inc: function (key, data) + { + if (this._frozen) + { + return this; + } + + if (data === undefined) + { + data = 1; + } + + var value = this.get(key); + if (value === undefined) + { + value = 0; + } + + this.set(key, (value + data)); + + return this; + }, + + /** + * Toggle a boolean value for the given key. If the key doesn't already exist in the Data Manager then it is toggled from false. + * + * When the value is first set, a `setdata` event is emitted. + * + * @method Phaser.Data.DataManager#toggle + * @fires Phaser.Data.Events#SET_DATA + * @fires Phaser.Data.Events#CHANGE_DATA + * @fires Phaser.Data.Events#CHANGE_DATA_KEY + * @since 3.23.0 + * + * @param {(string|object)} key - The key to toggle the value for. + * + * @return {Phaser.Data.DataManager} This DataManager object. + */ + toggle: function (key) + { + if (this._frozen) + { + return this; + } + + this.set(key, !this.get(key)); + + return this; + }, + /** * Internal value setter, called automatically by the `set` method. * @@ -736,7 +802,7 @@ var DataManager = new Class({ * @param {string} key - The key to set the value for. * @param {*} data - The value to set. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ setValue: function (key, data) { @@ -800,7 +866,7 @@ var DataManager = new Class({ * @param {*} [context] - Value to use as `this` when executing callback. * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ each: function (callback, context) { @@ -837,7 +903,7 @@ var DataManager = new Class({ * @param {Object.} data - The data to merge. * @param {boolean} [overwrite=true] - Whether to overwrite existing data. Defaults to true. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ merge: function (data, overwrite) { @@ -873,7 +939,7 @@ var DataManager = new Class({ * * @param {(string|string[])} key - The key to remove, or an array of keys to remove. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ remove: function (key) { @@ -907,7 +973,7 @@ var DataManager = new Class({ * * @param {string} key - The key to set the value for. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ removeValue: function (key) { @@ -979,7 +1045,7 @@ var DataManager = new Class({ * * @param {boolean} value - Whether to freeze or unfreeze the Data Manager. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ setFreeze: function (value) { @@ -994,7 +1060,7 @@ var DataManager = new Class({ * @method Phaser.Data.DataManager#reset * @since 3.0.0 * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ reset: function () { @@ -1090,7 +1156,7 @@ module.exports = DataManager; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1127,7 +1193,7 @@ module.exports = 'changedata'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1145,7 +1211,6 @@ module.exports = 'changedata'; * @since 3.16.1 * * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event. - * @param {string} key - The unique key of the data item within the Data Manager. * @param {any} value - The item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance. * @param {any} previousValue - The previous item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance. */ @@ -1163,7 +1228,7 @@ module.exports = 'changedata-'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1196,7 +1261,7 @@ module.exports = 'removedata'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1229,7 +1294,7 @@ module.exports = 'setdata'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1258,7 +1323,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1391,7 +1456,7 @@ module.exports = BuildGameObject; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1449,10 +1514,10 @@ var GameObject = new Class({ /** * The current state of this Game Object. - * + * * Phaser itself will never modify this value, although plugins may do so. - * - * Use this property to track the state of a Game Object during its lifetime. For example, it could move from + * + * Use this property to track the state of a Game Object during its lifetime. For example, it could change from * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons. * If you need to store complex data about your Game Object, look at using the Data Component instead. @@ -1557,10 +1622,10 @@ var GameObject = new Class({ this.input = null; /** - * If this Game Object is enabled for physics then this property will contain a reference to a Physics Body. + * If this Game Object is enabled for Arcade or Matter Physics then this property will contain a reference to a Physics Body. * * @name Phaser.GameObjects.GameObject#body - * @type {?(object|Phaser.Physics.Arcade.Body|Phaser.Physics.Impact.Body)} + * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|MatterJS.BodyType)} * @default null * @since 3.0.0 */ @@ -1621,9 +1686,9 @@ var GameObject = new Class({ /** * Sets the current state of this Game Object. - * + * * Phaser itself will never modify the State of a Game Object, although plugins may do so. - * + * * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'. * The state value should typically be an integer (ideally mapped to a constant * in your game code), but could also be a string. It is recommended to keep it light and simple. @@ -1721,6 +1786,65 @@ var GameObject = new Class({ return this; }, + /** + * Increase a value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is increased from 0. + * + * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled + * before setting the value. + * + * If the key doesn't already exist in the Data Manager then it is created. + * + * When the value is first set, a `setdata` event is emitted from this Game Object. + * + * @method Phaser.GameObjects.GameObject#incData + * @since 3.23.0 + * + * @param {(string|object)} key - The key to increase the value for. + * @param {*} [data] - The value to increase for the given key. + * + * @return {this} This GameObject. + */ + incData: function (key, value) + { + if (!this.data) + { + this.data = new DataManager(this); + } + + this.data.inc(key, value); + + return this; + }, + + /** + * Toggle a boolean value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is toggled from false. + * + * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled + * before setting the value. + * + * If the key doesn't already exist in the Data Manager then it is created. + * + * When the value is first set, a `setdata` event is emitted from this Game Object. + * + * @method Phaser.GameObjects.GameObject#toggleData + * @since 3.23.0 + * + * @param {(string|object)} key - The key to toggle the value for. + * + * @return {this} This GameObject. + */ + toggleData: function (key) + { + if (!this.data) + { + this.data = new DataManager(this); + } + + this.data.toggle(key); + + return this; + }, + /** * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist. * @@ -1774,18 +1898,27 @@ var GameObject = new Class({ * * You can also provide an Input Configuration Object as the only argument to this method. * + * @example + * sprite.setInteractive(); + * + * @example + * sprite.setInteractive(new Phaser.Geom.Circle(45, 46, 45), Phaser.Geom.Circle.Contains); + * + * @example + * graphics.setInteractive(new Phaser.Geom.Rectangle(0, 0, 128, 128), Phaser.Geom.Rectangle.Contains); + * * @method Phaser.GameObjects.GameObject#setInteractive * @since 3.0.0 * - * @param {(Phaser.Types.Input.InputConfiguration|any)} [shape] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used. - * @param {Phaser.Types.Input.HitAreaCallback} [callback] - A callback to be invoked when the Game Object is interacted with. If you provide a shape you must also provide a callback. + * @param {(Phaser.Types.Input.InputConfiguration|any)} [hitArea] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not given it will try to create a Rectangle based on the texture frame. + * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The callback that determines if the pointer is within the Hit Area shape or not. If you provide a shape you must also provide a callback. * @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target? * * @return {this} This GameObject. */ - setInteractive: function (shape, callback, dropZone) + setInteractive: function (hitArea, hitAreaCallback, dropZone) { - this.scene.sys.input.enable(this, shape, callback, dropZone); + this.scene.sys.input.enable(this, hitArea, hitAreaCallback, dropZone); return this; }, @@ -1828,7 +1961,7 @@ var GameObject = new Class({ * If you wish to only temporarily stop an object from receiving input then use * `disableInteractive` instead, as that toggles the interactive state, where-as * this erases it completely. - * + * * If you wish to resize a hit area, don't remove and then set it as being * interactive. Instead, access the hitarea object directly and resize the shape * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the @@ -1848,6 +1981,36 @@ var GameObject = new Class({ return this; }, + /** + * This callback is invoked when this Game Object is added to a Scene. + * + * Can be overriden by custom Game Objects, but be aware of some Game Objects that + * will use this, such as Sprites, to add themselves into the Update List. + * + * You can also listen for the `ADDED_TO_SCENE` event from this Game Object. + * + * @method Phaser.GameObjects.GameObject#addedToScene + * @since 3.50.0 + */ + addedToScene: function () + { + }, + + /** + * This callback is invoked when this Game Object is removed from a Scene. + * + * Can be overriden by custom Game Objects, but be aware of some Game Objects that + * will use this, such as Sprites, to removed themselves from the Update List. + * + * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object. + * + * @method Phaser.GameObjects.GameObject#removedFromScene + * @since 3.50.0 + */ + removedFromScene: function () + { + }, + /** * To be overridden by custom GameObjects. Allows base objects to be used in a Pool. * @@ -1974,7 +2137,6 @@ var GameObject = new Class({ if (!fromScene) { sys.displayList.remove(this); - sys.updateList.remove(this); } if (this.input) @@ -2037,7 +2199,7 @@ module.exports = GameObject; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2191,7 +2353,7 @@ module.exports = ComputedSize; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2222,7 +2384,7 @@ var Depth = { * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order * of Game Objects, without actually moving their position in the display list. * - * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * The default depth is zero. A Game Object with a higher depth * value will always render in front of one with a lower value. * * Setting the depth will queue a depth sort event within the Scene. @@ -2252,7 +2414,7 @@ var Depth = { * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order * of Game Objects, without actually moving their position in the display list. * - * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * The default depth is zero. A Game Object with a higher depth * value will always render in front of one with a lower value. * * Setting the depth will queue a depth sort event within the Scene. @@ -2289,7 +2451,7 @@ module.exports = Depth; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2458,7 +2620,7 @@ module.exports = Flip; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2570,7 +2732,7 @@ module.exports = ScrollFactor; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2636,14 +2798,16 @@ module.exports = ToJSON; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var MATH_CONST = __webpack_require__(/*! ../../math/const */ "../../../src/math/const.js"); var TransformMatrix = __webpack_require__(/*! ./TransformMatrix */ "../../../src/gameobjects/components/TransformMatrix.js"); +var TransformXY = __webpack_require__(/*! ../../math/TransformXY */ "../../../src/math/TransformXY.js"); var WrapAngle = __webpack_require__(/*! ../../math/angle/Wrap */ "../../../src/math/angle/Wrap.js"); var WrapAngleDegrees = __webpack_require__(/*! ../../math/angle/WrapDegrees */ "../../../src/math/angle/WrapDegrees.js"); +var Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "../../../src/math/Vector2.js"); // global bitmask flag for GameObject.renderMask (used by Scale) var _FLAG = 4; // 0100 @@ -2659,7 +2823,7 @@ var Transform = { /** * Private internal value. Holds the horizontal scale value. - * + * * @name Phaser.GameObjects.Components.Transform#_scaleX * @type {number} * @private @@ -2670,7 +2834,7 @@ var Transform = { /** * Private internal value. Holds the vertical scale value. - * + * * @name Phaser.GameObjects.Components.Transform#_scaleY * @type {number} * @private @@ -2681,7 +2845,7 @@ var Transform = { /** * Private internal value. Holds the rotation value in radians. - * + * * @name Phaser.GameObjects.Components.Transform#_rotation * @type {number} * @private @@ -2712,7 +2876,9 @@ var Transform = { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. * * @name Phaser.GameObjects.Components.Transform#z * @type {number} @@ -2734,7 +2900,7 @@ var Transform = { /** * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`. - * + * * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this * isn't the case, use the `scaleX` or `scaleY` properties instead. * @@ -2831,7 +2997,7 @@ var Transform = { /** * The angle of this Game Object as expressed in degrees. - * + * * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left * and -90 is up. * @@ -2858,9 +3024,9 @@ var Transform = { /** * The angle of this Game Object in radians. - * - * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left - * and -90 is up. + * + * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left + * and -PI/2 is up. * * If you prefer to work in degrees, see the `angle` property instead. * @@ -2914,7 +3080,7 @@ var Transform = { /** * Sets the position of this Game Object to be a random position within the confines of * the given area. - * + * * If no area is specified a random position between 0 x 0 and the game width x height is used instead. * * The position does not factor in the size of this Game Object, meaning that only the origin is @@ -3044,6 +3210,9 @@ var Transform = { /** * Sets the z position of this Game Object. * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. + * * @method Phaser.GameObjects.Components.Transform#setZ * @since 3.0.0 * @@ -3133,9 +3302,59 @@ var Transform = { return tempMatrix; }, + /** + * Takes the given `x` and `y` coordinates and converts them into local space for this + * Game Object, taking into account parent and local transforms, and the Display Origin. + * + * The returned Vector2 contains the translated point in its properties. + * + * A Camera needs to be provided in order to handle modified scroll factors. If no + * camera is specified, it will use the `main` camera from the Scene to which this + * Game Object belongs. + * + * @method Phaser.GameObjects.Components.Transform#getLocalPoint + * @since 3.50.0 + * + * @param {number} x - The x position to translate. + * @param {number} y - The y position to translate. + * @param {Phaser.Math.Vector2} [point] - A Vector2, or point-like object, to store the results in. + * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera which is being tested against. If not given will use the Scene default camera. + * + * @return {Phaser.Math.Vector2} The translated point. + */ + getLocalPoint: function (x, y, point, camera) + { + if (!point) { point = new Vector2(); } + if (!camera) { camera = this.scene.sys.cameras.main; } + + var csx = camera.scrollX; + var csy = camera.scrollY; + + var px = x + (csx * this.scrollFactorX) - csx; + var py = y + (csy * this.scrollFactorY) - csy; + + if (this.parentContainer) + { + this.getWorldTransformMatrix().applyInverse(px, py, point); + } + else + { + TransformXY(px, py, this.x, this.y, this.rotation, this.scaleX, this.scaleY, point); + } + + // Normalize origin + if (this._originComponent) + { + point.x += this._displayOriginX; + point.y += this._displayOriginY; + } + + return point; + }, + /** * Gets the sum total rotation of all of this Game Objects parent Containers. - * + * * The returned value is in radians and will be zero if this Game Object has no parent container. * * @method Phaser.GameObjects.Components.Transform#getParentRotation @@ -3175,7 +3394,7 @@ module.exports = Transform; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3613,7 +3832,7 @@ var TransformMatrix = new Class({ * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by. * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in. * - * @return {Phaser.GameObjects.Components.TransformMatrix} Either this TransformMatrix, or the `out` Matrix, if given in the arguments. + * @return {(this|Phaser.GameObjects.Components.TransformMatrix)} Either this TransformMatrix, or the `out` Matrix, if given in the arguments. */ multiply: function (rhs, out) { @@ -4105,6 +4324,58 @@ var TransformMatrix = new Class({ return x * this.b + y * this.d + this.f; }, + /** + * Returns the X component of this matrix multiplied by the given values. + * + * This is the same as `x * a + y * c + e`, optionally passing via `Math.round`. + * + * @method Phaser.GameObjects.Components.TransformMatrix#getXRound + * @since 3.50.0 + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * @param {boolean} [round=false] - Math.round the resulting value? + * + * @return {number} The calculated x value. + */ + getXRound: function (x, y, round) + { + var v = this.getX(x, y); + + if (round) + { + v = Math.round(v); + } + + return v; + }, + + /** + * Returns the Y component of this matrix multiplied by the given values. + * + * This is the same as `x * b + y * d + f`, optionally passing via `Math.round`. + * + * @method Phaser.GameObjects.Components.TransformMatrix#getYRound + * @since 3.50.0 + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * @param {boolean} [round=false] - Math.round the resulting value? + * + * @return {number} The calculated y value. + */ + getYRound: function (x, y, round) + { + var v = this.getY(x, y); + + if (round) + { + v = Math.round(v); + } + + return v; + }, + /** * Returns a string that can be used in a CSS Transform call as a `matrix` property. * @@ -4148,7 +4419,7 @@ module.exports = TransformMatrix; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4231,6 +4502,37 @@ var Visible = { module.exports = Visible; +/***/ }), + +/***/ "../../../src/gameobjects/events/ADDED_TO_SCENE_EVENT.js": +/*!*************************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/events/ADDED_TO_SCENE_EVENT.js ***! + \*************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Object Added to Scene Event. + * + * This event is dispatched when a Game Object is added to a Scene. + * + * Listen for it on a Game Object instance using `GameObject.on('addedtoscene', listener)`. + * + * @event Phaser.GameObjects.Events#ADDED_TO_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene. + * @param {Phaser.Scene} scene - The Scene to which the Game Object was added. + */ +module.exports = 'addedtoscene'; + + /***/ }), /***/ "../../../src/gameobjects/events/DESTROY_EVENT.js": @@ -4242,7 +4544,7 @@ module.exports = Visible; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4261,6 +4563,37 @@ module.exports = Visible; module.exports = 'destroy'; +/***/ }), + +/***/ "../../../src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js": +/*!*****************************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js ***! + \*****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Object Removed from Scene Event. + * + * This event is dispatched when a Game Object is removed from a Scene. + * + * Listen for it on a Game Object instance using `GameObject.on('removedfromscene', listener)`. + * + * @event Phaser.GameObjects.Events#REMOVED_FROM_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene. + * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed. + */ +module.exports = 'removedfromscene'; + + /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_COMPLETE_EVENT.js": @@ -4272,7 +4605,7 @@ module.exports = 'destroy'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4309,7 +4642,7 @@ module.exports = 'complete'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4343,7 +4676,7 @@ module.exports = 'created'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4374,7 +4707,7 @@ module.exports = 'error'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4411,7 +4744,7 @@ module.exports = 'loop'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4444,7 +4777,7 @@ module.exports = 'play'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4474,7 +4807,7 @@ module.exports = 'seeked'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4505,7 +4838,7 @@ module.exports = 'seeking'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4536,7 +4869,7 @@ module.exports = 'stop'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4567,7 +4900,7 @@ module.exports = 'timeout'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4598,7 +4931,7 @@ module.exports = 'unlocked'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4608,7 +4941,9 @@ module.exports = 'unlocked'; module.exports = { + ADDED_TO_SCENE: __webpack_require__(/*! ./ADDED_TO_SCENE_EVENT */ "../../../src/gameobjects/events/ADDED_TO_SCENE_EVENT.js"), DESTROY: __webpack_require__(/*! ./DESTROY_EVENT */ "../../../src/gameobjects/events/DESTROY_EVENT.js"), + REMOVED_FROM_SCENE: __webpack_require__(/*! ./REMOVED_FROM_SCENE_EVENT */ "../../../src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js"), VIDEO_COMPLETE: __webpack_require__(/*! ./VIDEO_COMPLETE_EVENT */ "../../../src/gameobjects/events/VIDEO_COMPLETE_EVENT.js"), VIDEO_CREATED: __webpack_require__(/*! ./VIDEO_CREATED_EVENT */ "../../../src/gameobjects/events/VIDEO_CREATED_EVENT.js"), VIDEO_ERROR: __webpack_require__(/*! ./VIDEO_ERROR_EVENT */ "../../../src/gameobjects/events/VIDEO_ERROR_EVENT.js"), @@ -4634,7 +4969,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4716,10 +5051,13 @@ var File = new Class({ /** * The URL of the file, not including baseURL. - * Automatically has Loader.path prepended to it. + * + * Automatically has Loader.path prepended to it if a string. + * + * Can also be a JavaScript Object, such as the results of parsing JSON data. * * @name Phaser.Loader.File#url - * @type {string} + * @type {object|string} * @since 3.0.0 */ this.url = GetFastValue(fileConfig, 'url'); @@ -4728,7 +5066,7 @@ var File = new Class({ { this.url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', ''); } - else if (typeof(this.url) !== 'function') + else if (typeof this.url === 'string' && this.url.indexOf('blob:') !== 0 && this.url.indexOf('data:') !== 0) { this.url = loader.path + this.url; } @@ -4906,6 +5244,8 @@ var File = new Class({ } else { + this.state = CONST.FILE_LOADING; + this.src = GetURL(this, this.loader.baseURL); if (this.src.indexOf('data:') === 0) @@ -4916,7 +5256,7 @@ var File = new Class({ { // The creation of this XHRLoader starts the load process going. // It will automatically call the following, based on the load outcome: - // + // // xhr.onload = this.onLoad // xhr.onerror = this.onError // xhr.onprogress = this.onProgress @@ -4947,6 +5287,8 @@ var File = new Class({ success = false; } + this.state = CONST.FILE_LOADED; + this.resetXHR(); this.loader.nextFile(this, success); @@ -5121,7 +5463,7 @@ var File = new Class({ * @method Phaser.Loader.File.createObjectURL * @static * @since 3.7.0 - * + * * @param {HTMLImageElement} image - Image object which 'src' attribute should be set to object URL. * @param {Blob} blob - A Blob object to create an object URL for. * @param {string} defaultType - Default mime type used if blob type is not available. @@ -5155,7 +5497,7 @@ File.createObjectURL = function (image, blob, defaultType) * @method Phaser.Loader.File.revokeObjectURL * @static * @since 3.7.0 - * + * * @param {HTMLImageElement} image - Image object which 'src' attribute should be revoked. */ File.revokeObjectURL = function (image) @@ -5180,7 +5522,7 @@ module.exports = File; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -5254,7 +5596,7 @@ module.exports = FileTypesManager; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -5300,7 +5642,7 @@ module.exports = GetURL; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -5353,7 +5695,7 @@ module.exports = MergeXHRSettings; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -5592,7 +5934,7 @@ module.exports = MultiFile; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -5622,6 +5964,14 @@ var XHRLoader = function (file, globalXHRSettings) xhr.responseType = file.xhrSettings.responseType; xhr.timeout = config.timeout; + if (config.headers) + { + for (var key in config.headers) + { + xhr.setRequestHeader(key, config.headers[key]); + } + } + if (config.header && config.headerValue) { xhr.setRequestHeader(config.header, config.headerValue); @@ -5637,6 +5987,11 @@ var XHRLoader = function (file, globalXHRSettings) xhr.overrideMimeType(config.overrideMimeType); } + if (config.withCredentials) + { + xhr.withCredentials = true; + } + // After a successful request, the xhr.response property will contain the requested data as a DOMString, ArrayBuffer, Blob, or Document (depending on what was set for responseType.) xhr.onload = file.onLoad.bind(file, xhr); @@ -5665,7 +6020,7 @@ module.exports = XHRLoader; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -5680,16 +6035,18 @@ module.exports = XHRLoader; * @param {string} [user=''] - Optional username for the XHR request. * @param {string} [password=''] - Optional password for the XHR request. * @param {integer} [timeout=0] - Optional XHR timeout value. + * @param {boolean} [withCredentials=false] - Optional XHR withCredentials value. * * @return {Phaser.Types.Loader.XHRSettingsObject} The XHRSettings object as used by the Loader. */ -var XHRSettings = function (responseType, async, user, password, timeout) +var XHRSettings = function (responseType, async, user, password, timeout, withCredentials) { if (responseType === undefined) { responseType = ''; } if (async === undefined) { async = true; } if (user === undefined) { user = ''; } if (password === undefined) { password = ''; } if (timeout === undefined) { timeout = 0; } + if (withCredentials === undefined) { withCredentials = false; } // Before sending a request, set the xhr.responseType to "text", // "arraybuffer", "blob", or "document", depending on your data needs. @@ -5710,12 +6067,16 @@ var XHRSettings = function (responseType, async, user, password, timeout) timeout: timeout, // setRequestHeader + headers: undefined, header: undefined, headerValue: undefined, requestedWith: false, // overrideMimeType - overrideMimeType: undefined + overrideMimeType: undefined, + + // withCredentials + withCredentials: withCredentials }; }; @@ -5734,7 +6095,7 @@ module.exports = XHRSettings; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -5891,7 +6252,7 @@ module.exports = FILE_CONST; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -5926,7 +6287,7 @@ module.exports = 'addfile'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -5959,7 +6320,7 @@ module.exports = 'complete'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -5993,7 +6354,7 @@ module.exports = 'filecomplete'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -6052,7 +6413,7 @@ module.exports = 'filecomplete-'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -6082,7 +6443,7 @@ module.exports = 'loaderror'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -6113,7 +6474,7 @@ module.exports = 'load'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -6145,7 +6506,7 @@ module.exports = 'fileprogress'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -6179,7 +6540,7 @@ module.exports = 'postprocess'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -6209,7 +6570,7 @@ module.exports = 'progress'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -6241,7 +6602,7 @@ module.exports = 'start'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -6276,7 +6637,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -6292,7 +6653,7 @@ var IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ * A single Image File suitable for loading by the Loader. * * These are created when you use the Phaser.Loader.LoaderPlugin#image method and are not typically created directly. - * + * * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#image. * * @class ImageFile @@ -6436,7 +6797,7 @@ var ImageFile = new Class({ * Adds an Image, or array of Images, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -6451,7 +6812,7 @@ var ImageFile = new Class({ * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been * loaded. - * + * * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle. * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback * of animated gifs to Canvas elements. @@ -6462,7 +6823,7 @@ var ImageFile = new Class({ * then remove it from the Texture Manager first, before loading a new one. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.image({ * key: 'logo', @@ -6473,7 +6834,7 @@ var ImageFile = new Class({ * See the documentation for `Phaser.Types.Loader.FileTypes.ImageFileConfig` for more details. * * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key: - * + * * ```javascript * this.load.image('logo', 'images/AtariLogo.png'); * // and later in your game ... @@ -6492,13 +6853,13 @@ var ImageFile = new Class({ * * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image, * then you can specify it by providing an array as the `url` where the second element is the normal map: - * + * * ```javascript * this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]); * ``` * * Or, if you are using a config object use the `normalMap` property: - * + * * ```javascript * this.load.image({ * key: 'logo', @@ -6514,14 +6875,14 @@ var ImageFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#image - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig|Phaser.Types.Loader.FileTypes.ImageFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('image', function (key, url, xhrSettings) { @@ -6555,7 +6916,7 @@ module.exports = ImageFile; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -6572,7 +6933,7 @@ var IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ * A single JSON File suitable for loading by the Loader. * * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly. - * + * * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json. * * @class JSONFile @@ -6583,7 +6944,7 @@ var IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ * * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file. * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object. - * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, can be a fully formed JSON Object. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file. * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache. */ @@ -6676,7 +7037,7 @@ var JSONFile = new Class({ * Adds a JSON file, or array of JSON files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -6691,14 +7052,14 @@ var JSONFile = new Class({ * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been * loaded. - * + * * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load. * The key should be unique both in terms of files being loaded and files already present in the JSON Cache. * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file * then remove it from the JSON Cache first, before loading a new one. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.json({ * key: 'wavedata', @@ -6709,7 +7070,7 @@ var JSONFile = new Class({ * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details. * * Once the file has finished loading you can access it from its Cache using its key: - * + * * ```javascript * this.load.json('wavedata', 'files/AlienWaveData.json'); * // and later in your game ... @@ -6728,7 +7089,7 @@ var JSONFile = new Class({ * * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache, * rather than the whole file. For example, if your JSON data had a structure like this: - * + * * ```json * { * "level1": { @@ -6748,15 +7109,15 @@ var JSONFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#json - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. - * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, can be a fully formed JSON Object. * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('json', function (key, url, dataKey, xhrSettings) { @@ -6790,7 +7151,7 @@ module.exports = JSONFile; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -6929,14 +7290,14 @@ var TextFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#text - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig|Phaser.Types.Loader.FileTypes.TextFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt". * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('text', function (key, url, xhrSettings) { @@ -6970,7 +7331,7 @@ module.exports = TextFile; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7010,22 +7371,22 @@ module.exports = Average; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Factorial = __webpack_require__(/*! ./Factorial */ "../../../src/math/Factorial.js"); /** - * [description] + * Calculates the Bernstein basis from the three factorial coefficients. * * @function Phaser.Math.Bernstein * @since 3.0.0 * - * @param {number} n - [description] - * @param {number} i - [description] + * @param {number} n - The first value. + * @param {number} i - The second value. * - * @return {number} [description] + * @return {number} The Bernstein basis of Factorial(n) / Factorial(i) / Factorial(n - i) */ var Bernstein = function (n, i) { @@ -7046,7 +7407,7 @@ module.exports = Bernstein; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7080,21 +7441,21 @@ module.exports = Between; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * Calculates a Catmull-Rom value. + * Calculates a Catmull-Rom value from the given points, based on an alpha of 0.5. * * @function Phaser.Math.CatmullRom * @since 3.0.0 * - * @param {number} t - [description] - * @param {number} p0 - [description] - * @param {number} p1 - [description] - * @param {number} p2 - [description] - * @param {number} p3 - [description] + * @param {number} t - The amount to interpolate by. + * @param {number} p0 - The first control point. + * @param {number} p1 - The second control point. + * @param {number} p2 - The third control point. + * @param {number} p3 - The fourth control point. * * @return {number} The Catmull-Rom value. */ @@ -7122,7 +7483,7 @@ module.exports = CatmullRom; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7164,7 +7525,7 @@ module.exports = CeilTo; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7199,7 +7560,7 @@ module.exports = Clamp; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7234,7 +7595,7 @@ module.exports = DegToRad; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7268,7 +7629,7 @@ module.exports = Difference; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7313,7 +7674,7 @@ module.exports = Factorial; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7347,7 +7708,7 @@ module.exports = FloatBetween; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7389,7 +7750,7 @@ module.exports = FloorTo; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7428,20 +7789,24 @@ module.exports = FromPercent; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * Calculate the speed required to cover a distance in the time given. + * Calculate a per-ms speed from a distance and time (given in seconds). * * @function Phaser.Math.GetSpeed * @since 3.0.0 * - * @param {number} distance - The distance to travel in pixels. - * @param {integer} time - The time, in ms, to cover the distance in. + * @param {number} distance - The distance. + * @param {integer} time - The time, in seconds. * - * @return {number} The amount you will need to increment the position by each step in order to cover the distance in the time given. + * @return {number} The speed, in distance per ms. + * + * @example + * // 400px over 1 second is 0.4 px/ms + * Phaser.Math.GetSpeed(400, 1) // -> 0.4 */ var GetSpeed = function (distance, time) { @@ -7462,7 +7827,7 @@ module.exports = GetSpeed; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7498,7 +7863,7 @@ module.exports = IsEven; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7532,7 +7897,7 @@ module.exports = IsEvenStrict; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7567,7 +7932,7 @@ module.exports = Linear; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8075,12 +8440,12 @@ var Matrix3 = new Class({ }, /** - * [description] + * Set the values of this Matrix3 to be normalized from the given Matrix4. * * @method Phaser.Math.Matrix3#normalFromMat4 * @since 3.0.0 * - * @param {Phaser.Math.Matrix4} m - [description] + * @param {Phaser.Math.Matrix4} m - The Matrix4 to normalize the values from. * * @return {Phaser.Math.Matrix3} This Matrix3. */ @@ -8165,7 +8530,7 @@ module.exports = Matrix3; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8724,12 +9089,12 @@ var Matrix4 = new Class({ }, /** - * [description] + * Multiply the values of this Matrix4 by those given in the `src` argument. * * @method Phaser.Math.Matrix4#multiplyLocal * @since 3.0.0 * - * @param {Phaser.Math.Matrix4} src - [description] + * @param {Phaser.Math.Matrix4} src - The source Matrix4 that this Matrix4 is multiplied by. * * @return {Phaser.Math.Matrix4} This Matrix4. */ @@ -9521,9 +9886,9 @@ var Matrix4 = new Class({ * @method Phaser.Math.Matrix4#yawPitchRoll * @since 3.0.0 * - * @param {number} yaw - [description] - * @param {number} pitch - [description] - * @param {number} roll - [description] + * @param {number} yaw - The yaw value. + * @param {number} pitch - The pitch value. + * @param {number} roll - The roll value. * * @return {Phaser.Math.Matrix4} This Matrix4. */ @@ -9632,7 +9997,7 @@ module.exports = Matrix4; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9667,7 +10032,7 @@ module.exports = MaxAdd; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9702,7 +10067,7 @@ module.exports = MinSub; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9766,7 +10131,7 @@ module.exports = Percent; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10083,13 +10448,13 @@ var Quaternion = new Class({ }, /** - * [description] + * Rotates this Quaternion based on the two given vectors. * * @method Phaser.Math.Quaternion#rotationTo * @since 3.0.0 * - * @param {Phaser.Math.Vector3} a - [description] - * @param {Phaser.Math.Vector3} b - [description] + * @param {Phaser.Math.Vector3} a - The transform rotation vector. + * @param {Phaser.Math.Vector3} b - The target rotation vector. * * @return {Phaser.Math.Quaternion} This Quaternion. */ @@ -10543,7 +10908,7 @@ module.exports = Quaternion; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10578,7 +10943,7 @@ module.exports = RadToDeg; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10623,7 +10988,7 @@ module.exports = RandomXY; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10667,7 +11032,7 @@ module.exports = RandomXYZ; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10709,7 +11074,7 @@ module.exports = RandomXYZW; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10749,22 +11114,26 @@ module.exports = Rotate; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * Rotate a `point` around `x` and `y` by the given `angle`. + * Rotate a `point` around `x` and `y` to the given `angle`, at the same distance. + * + * In polar notation, this maps a point from (r, t) to (r, angle), vs. the origin (x, y). * * @function Phaser.Math.RotateAround * @since 3.0.0 * + * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return] + * * @param {(Phaser.Geom.Point|object)} point - The point to be rotated. * @param {number} x - The horizontal coordinate to rotate around. * @param {number} y - The vertical coordinate to rotate around. * @param {number} angle - The angle of rotation in radians. * - * @return {Phaser.Geom.Point} The given point, rotated by the given angle around the given coordinates. + * @return {Phaser.Types.Math.Vector2Like} The given point. */ var RotateAround = function (point, x, y, angle) { @@ -10794,23 +11163,27 @@ module.exports = RotateAround; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * Rotate a `point` around `x` and `y` by the given `angle` and `distance`. * + * In polar notation, this maps a point from (r, t) to (distance, t + angle), vs. the origin (x, y). + * * @function Phaser.Math.RotateAroundDistance * @since 3.0.0 * + * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return] + * * @param {(Phaser.Geom.Point|object)} point - The point to be rotated. * @param {number} x - The horizontal coordinate to rotate around. * @param {number} y - The vertical coordinate to rotate around. * @param {number} angle - The angle of rotation in radians. * @param {number} distance - The distance from (x, y) to place the point at. * - * @return {Phaser.Geom.Point} The given point. + * @return {Phaser.Types.Math.Vector2Like} The given point. */ var RotateAroundDistance = function (point, x, y, angle, distance) { @@ -10825,6 +11198,48 @@ var RotateAroundDistance = function (point, x, y, angle, distance) module.exports = RotateAroundDistance; +/***/ }), + +/***/ "../../../src/math/RotateTo.js": +/*!***********************************************!*\ + !*** D:/wamp/www/phaser/src/math/RotateTo.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Position a `point` at the given `angle` and `distance` to (`x`, `y`). + * + * @function Phaser.Math.RotateTo + * @since 3.24.0 + * + * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return] + * + * @param {Phaser.Types.Math.Vector2Like} point - The point to be positioned. + * @param {number} x - The horizontal coordinate to position from. + * @param {number} y - The vertical coordinate to position from. + * @param {number} angle - The angle of rotation in radians. + * @param {number} distance - The distance from (x, y) to place the point at. + * + * @return {Phaser.Types.Math.Vector2Like} The given point. + */ +var RotateTo = function (point, x, y, angle, distance) +{ + point.x = x + (distance * Math.cos(angle)); + point.y = y + (distance * Math.sin(angle)); + + return point; +}; + +module.exports = RotateTo; + + /***/ }), /***/ "../../../src/math/RotateVec3.js": @@ -10836,7 +11251,7 @@ module.exports = RotateAroundDistance; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10889,7 +11304,7 @@ module.exports = RotateVec3; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10923,7 +11338,7 @@ module.exports = RoundAwayFromZero; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10980,7 +11395,7 @@ module.exports = RoundTo; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11038,7 +11453,7 @@ module.exports = SinCosTableGenerator; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11090,7 +11505,7 @@ module.exports = SmoothStep; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11134,18 +11549,18 @@ module.exports = SmootherStep; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Vector2 = __webpack_require__(/*! ./Vector2 */ "../../../src/math/Vector2.js"); /** - * Returns a Vec2 containing the x and y position of the given index in a `width` x `height` sized grid. + * Returns a Vector2 containing the x and y position of the given index in a `width` x `height` sized grid. * * For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2. * - * If the given index is out of range an empty Vec2 is returned. + * If the given index is out of range an empty Vector2 is returned. * * @function Phaser.Math.ToXY * @since 3.19.0 @@ -11197,7 +11612,7 @@ module.exports = ToXY; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11257,7 +11672,7 @@ module.exports = TransformXY; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11265,6 +11680,7 @@ module.exports = TransformXY; // and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl var Class = __webpack_require__(/*! ../utils/Class */ "../../../src/utils/Class.js"); +var FuzzyEqual = __webpack_require__(/*! ../math/fuzzy/Equal */ "../../../src/math/fuzzy/Equal.js"); /** * @classdesc @@ -11444,6 +11860,22 @@ var Vector2 = new Class({ return ((this.x === v.x) && (this.y === v.y)); }, + /** + * Check whether this Vector is approximately equal to a given Vector. + * + * @method Phaser.Math.Vector2#fuzzyEquals + * @since 3.23.0 + * + * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector. + * @param {number} [epsilon=0.0001] - The tolerance value. + * + * @return {boolean} Whether both absolute differences of the x and y components are smaller than `epsilon`. + */ + fuzzyEquals: function (v, epsilon) + { + return (FuzzyEqual(this.x, v.x, epsilon) && FuzzyEqual(this.y, v.y, epsilon)); + }, + /** * Calculate the angle between this Vector and the positive x-axis, in radians. * @@ -11466,6 +11898,21 @@ var Vector2 = new Class({ return angle; }, + /** + * Set the angle of this Vector. + * + * @method Phaser.Math.Vector2#setAngle + * @since 3.23.0 + * + * @param {number} angle - The angle, in radians. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + setAngle: function (angle) + { + return this.setToPolar(angle, this.length()); + }, + /** * Add a given Vector to this Vector. Addition is component-wise. * @@ -11636,6 +12083,21 @@ var Vector2 = new Class({ return Math.sqrt(x * x + y * y); }, + /** + * Set the length (or magnitude) of this Vector. + * + * @method Phaser.Math.Vector2#setLength + * @since 3.23.0 + * + * @param {number} length + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + setLength: function (length) + { + return this.normalize().scale(length); + }, + /** * Calculate the length of this Vector squared. * @@ -11680,7 +12142,7 @@ var Vector2 = new Class({ }, /** - * Right-hand normalize (make unit length) this Vector. + * Rotate this Vector to its perpendicular, in the positive direction. * * @method Phaser.Math.Vector2#normalizeRightHand * @since 3.0.0 @@ -11697,6 +12159,24 @@ var Vector2 = new Class({ return this; }, + /** + * Rotate this Vector to its perpendicular, in the negative direction. + * + * @method Phaser.Math.Vector2#normalizeLeftHand + * @since 3.23.0 + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + normalizeLeftHand: function () + { + var x = this.x; + + this.x = this.y; + this.y = x * -1; + + return this; + }, + /** * Calculate the dot product of this Vector and the given Vector. * @@ -11811,13 +12291,85 @@ var Vector2 = new Class({ this.y = 0; return this; + }, + + /** + * Limit the length (or magnitude) of this Vector. + * + * @method Phaser.Math.Vector2#limit + * @since 3.23.0 + * + * @param {number} max - The maximum length. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + limit: function (max) + { + var len = this.length(); + + if (len && len > max) + { + this.scale(max / len); + } + + return this; + }, + + /** + * Reflect this Vector off a line defined by a normal. + * + * @method Phaser.Math.Vector2#reflect + * @since 3.23.0 + * + * @param {Phaser.Math.Vector2} normal - A vector perpendicular to the line. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + reflect: function (normal) + { + normal = normal.clone().normalize(); + + return this.subtract(normal.scale(2 * this.dot(normal))); + }, + + /** + * Reflect this Vector across another. + * + * @method Phaser.Math.Vector2#mirror + * @since 3.23.0 + * + * @param {Phaser.Math.Vector2} axis - A vector to reflect across. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + mirror: function (axis) + { + return this.reflect(axis).negate(); + }, + + /** + * Rotate this Vector by an angle amount. + * + * @method Phaser.Math.Vector2#rotate + * @since 3.23.0 + * + * @param {number} delta - The angle to rotate by, in radians. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + rotate: function (delta) + { + var cos = Math.cos(delta); + var sin = Math.sin(delta); + + return this.set(cos * this.x - sin * this.y, sin * this.x + cos * this.y); } }); /** * A static zero Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -11829,7 +12381,7 @@ Vector2.ZERO = new Vector2(); /** * A static right Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -11841,7 +12393,7 @@ Vector2.RIGHT = new Vector2(1, 0); /** * A static left Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -11853,7 +12405,7 @@ Vector2.LEFT = new Vector2(-1, 0); /** * A static up Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -11865,7 +12417,7 @@ Vector2.UP = new Vector2(0, -1); /** * A static down Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -11877,7 +12429,7 @@ Vector2.DOWN = new Vector2(0, 1); /** * A static one Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -11901,7 +12453,7 @@ module.exports = Vector2; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12716,7 +13268,7 @@ module.exports = Vector3; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13266,7 +13818,7 @@ module.exports = Vector4; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13301,7 +13853,7 @@ module.exports = Within; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13338,7 +13890,7 @@ module.exports = Wrap; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13374,7 +13926,7 @@ module.exports = Between; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13386,8 +13938,8 @@ module.exports = Between; * @function Phaser.Math.Angle.BetweenPoints * @since 3.0.0 * - * @param {(Phaser.Geom.Point|object)} point1 - The first point. - * @param {(Phaser.Geom.Point|object)} point2 - The second point. + * @param {Phaser.Types.Math.Vector2Like} point1 - The first point. + * @param {Phaser.Types.Math.Vector2Like} point2 - The second point. * * @return {number} The angle in radians. */ @@ -13410,7 +13962,7 @@ module.exports = BetweenPoints; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13423,8 +13975,8 @@ module.exports = BetweenPoints; * @function Phaser.Math.Angle.BetweenPointsY * @since 3.0.0 * - * @param {(Phaser.Geom.Point|object)} point1 - The first point. - * @param {(Phaser.Geom.Point|object)} point2 - The second point. + * @param {Phaser.Types.Math.Vector2Like} point1 - The first point. + * @param {Phaser.Types.Math.Vector2Like} point2 - The second point. * * @return {number} The angle in radians. */ @@ -13447,7 +13999,7 @@ module.exports = BetweenPointsY; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13486,7 +14038,7 @@ module.exports = BetweenY; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13536,7 +14088,7 @@ module.exports = CounterClockwise; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13567,6 +14119,74 @@ var Normalize = function (angle) module.exports = Normalize; +/***/ }), + +/***/ "../../../src/math/angle/Random.js": +/*!***************************************************!*\ + !*** D:/wamp/www/phaser/src/math/angle/Random.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author @samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var FloatBetween = __webpack_require__(/*! ../FloatBetween */ "../../../src/math/FloatBetween.js"); + +/** + * Returns a random angle in the range [-pi, pi]. + * + * @function Phaser.Math.Angle.Random + * @since 3.23.0 + * + * @return {number} The angle, in radians. + */ +var Random = function () +{ + return FloatBetween(-Math.PI, Math.PI); +}; + +module.exports = Random; + + +/***/ }), + +/***/ "../../../src/math/angle/RandomDegrees.js": +/*!**********************************************************!*\ + !*** D:/wamp/www/phaser/src/math/angle/RandomDegrees.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author @samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var FloatBetween = __webpack_require__(/*! ../FloatBetween */ "../../../src/math/FloatBetween.js"); + +/** + * Returns a random angle in the range [-180, 180]. + * + * @function Phaser.Math.Angle.RandomDegrees + * @since 3.23.0 + * + * @return {number} The angle, in degrees. + */ +var RandomDegrees = function () +{ + return FloatBetween(-180, 180); +}; + +module.exports = RandomDegrees; + + /***/ }), /***/ "../../../src/math/angle/Reverse.js": @@ -13578,7 +14198,7 @@ module.exports = Normalize; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13613,7 +14233,7 @@ module.exports = Reverse; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13685,7 +14305,7 @@ module.exports = RotateTo; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13739,7 +14359,7 @@ module.exports = ShortestBetween; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13776,7 +14396,7 @@ module.exports = Wrap; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13813,7 +14433,7 @@ module.exports = WrapDegrees; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13829,6 +14449,8 @@ module.exports = { BetweenY: __webpack_require__(/*! ./BetweenY */ "../../../src/math/angle/BetweenY.js"), CounterClockwise: __webpack_require__(/*! ./CounterClockwise */ "../../../src/math/angle/CounterClockwise.js"), Normalize: __webpack_require__(/*! ./Normalize */ "../../../src/math/angle/Normalize.js"), + Random: __webpack_require__(/*! ./Random */ "../../../src/math/angle/Random.js"), + RandomDegrees: __webpack_require__(/*! ./RandomDegrees */ "../../../src/math/angle/RandomDegrees.js"), Reverse: __webpack_require__(/*! ./Reverse */ "../../../src/math/angle/Reverse.js"), RotateTo: __webpack_require__(/*! ./RotateTo */ "../../../src/math/angle/RotateTo.js"), ShortestBetween: __webpack_require__(/*! ./ShortestBetween */ "../../../src/math/angle/ShortestBetween.js"), @@ -13849,7 +14471,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13908,7 +14530,27 @@ var MATH_CONST = { * @type {Phaser.Math.RandomDataGenerator} * @since 3.0.0 */ - RND: null + RND: null, + + /** + * The minimum safe integer this browser supports. + * We use a const for backward compatibility with Internet Explorer. + * + * @name Phaser.Math.MIN_SAFE_INTEGER + * @type {number} + * @since 3.21.0 + */ + MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991, + + /** + * The maximum safe integer this browser supports. + * We use a const for backward compatibility with Internet Explorer. + * + * @name Phaser.Math.MAX_SAFE_INTEGER + * @type {number} + * @since 3.21.0 + */ + MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991 }; @@ -13926,7 +14568,7 @@ module.exports = MATH_CONST; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13954,6 +14596,119 @@ var DistanceBetween = function (x1, y1, x2, y2) module.exports = DistanceBetween; +/***/ }), + +/***/ "../../../src/math/distance/DistanceBetweenPoints.js": +/*!*********************************************************************!*\ + !*** D:/wamp/www/phaser/src/math/distance/DistanceBetweenPoints.js ***! + \*********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the distance between two points. + * + * @function Phaser.Math.Distance.BetweenPoints + * @since 3.22.0 + * + * @param {Phaser.Types.Math.Vector2Like} a - The first point. + * @param {Phaser.Types.Math.Vector2Like} b - The second point. + * + * @return {number} The distance between the points. + */ +var DistanceBetweenPoints = function (a, b) +{ + var dx = a.x - b.x; + var dy = a.y - b.y; + + return Math.sqrt(dx * dx + dy * dy); +}; + +module.exports = DistanceBetweenPoints; + + +/***/ }), + +/***/ "../../../src/math/distance/DistanceBetweenPointsSquared.js": +/*!****************************************************************************!*\ + !*** D:/wamp/www/phaser/src/math/distance/DistanceBetweenPointsSquared.js ***! + \****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the squared distance between two points. + * + * @function Phaser.Math.Distance.BetweenPointsSquared + * @since 3.22.0 + * + * @param {Phaser.Types.Math.Vector2Like} a - The first point. + * @param {Phaser.Types.Math.Vector2Like} b - The second point. + * + * @return {number} The squared distance between the points. + */ +var DistanceBetweenPointsSquared = function (a, b) +{ + var dx = a.x - b.x; + var dy = a.y - b.y; + + return dx * dx + dy * dy; +}; + +module.exports = DistanceBetweenPointsSquared; + + +/***/ }), + +/***/ "../../../src/math/distance/DistanceChebyshev.js": +/*!*****************************************************************!*\ + !*** D:/wamp/www/phaser/src/math/distance/DistanceChebyshev.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the Chebyshev distance between two sets of coordinates (points). + * + * Chebyshev distance (or chessboard distance) is the maximum of the horizontal and vertical distances. + * It's the effective distance when movement can be horizontal, vertical, or diagonal. + * + * @function Phaser.Math.Distance.Chebyshev + * @since 3.22.0 + * + * @param {number} x1 - The x coordinate of the first point. + * @param {number} y1 - The y coordinate of the first point. + * @param {number} x2 - The x coordinate of the second point. + * @param {number} y2 - The y coordinate of the second point. + * + * @return {number} The distance between each point. + */ +var ChebyshevDistance = function (x1, y1, x2, y2) +{ + return Math.max(Math.abs(x1 - x2), Math.abs(y1 - y2)); +}; + +module.exports = ChebyshevDistance; + + /***/ }), /***/ "../../../src/math/distance/DistancePower.js": @@ -13965,7 +14720,7 @@ module.exports = DistanceBetween; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13993,6 +14748,45 @@ var DistancePower = function (x1, y1, x2, y2, pow) module.exports = DistancePower; +/***/ }), + +/***/ "../../../src/math/distance/DistanceSnake.js": +/*!*************************************************************!*\ + !*** D:/wamp/www/phaser/src/math/distance/DistanceSnake.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the snake distance between two sets of coordinates (points). + * + * Snake distance (rectilinear distance, Manhattan distance) is the sum of the horizontal and vertical distances. + * It's the effective distance when movement is allowed only horizontally or vertically (but not both). + * + * @function Phaser.Math.Distance.Snake + * @since 3.22.0 + * + * @param {number} x1 - The x coordinate of the first point. + * @param {number} y1 - The y coordinate of the first point. + * @param {number} x2 - The x coordinate of the second point. + * @param {number} y2 - The y coordinate of the second point. + * + * @return {number} The distance between each point. + */ +var SnakeDistance = function (x1, y1, x2, y2) +{ + return Math.abs(x1 - x2) + Math.abs(y1 - y2); +}; + +module.exports = SnakeDistance; + + /***/ }), /***/ "../../../src/math/distance/DistanceSquared.js": @@ -14004,7 +14798,7 @@ module.exports = DistancePower; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14043,7 +14837,7 @@ module.exports = DistanceSquared; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14054,7 +14848,11 @@ module.exports = DistanceSquared; module.exports = { Between: __webpack_require__(/*! ./DistanceBetween */ "../../../src/math/distance/DistanceBetween.js"), + BetweenPoints: __webpack_require__(/*! ./DistanceBetweenPoints */ "../../../src/math/distance/DistanceBetweenPoints.js"), + BetweenPointsSquared: __webpack_require__(/*! ./DistanceBetweenPointsSquared */ "../../../src/math/distance/DistanceBetweenPointsSquared.js"), + Chebyshev: __webpack_require__(/*! ./DistanceChebyshev */ "../../../src/math/distance/DistanceChebyshev.js"), Power: __webpack_require__(/*! ./DistancePower */ "../../../src/math/distance/DistancePower.js"), + Snake: __webpack_require__(/*! ./DistanceSnake */ "../../../src/math/distance/DistanceSnake.js"), Squared: __webpack_require__(/*! ./DistanceSquared */ "../../../src/math/distance/DistanceSquared.js") }; @@ -14071,7 +14869,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14107,7 +14905,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14152,7 +14950,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14188,7 +14986,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14216,7 +15014,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14266,7 +15064,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14335,7 +15133,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14383,7 +15181,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14411,7 +15209,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14444,7 +15242,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14484,7 +15282,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14517,7 +15315,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14545,7 +15343,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14578,7 +15376,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14618,7 +15416,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14651,7 +15449,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14679,7 +15477,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14739,7 +15537,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14806,7 +15604,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14866,7 +15664,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14894,7 +15692,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14927,7 +15725,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14967,7 +15765,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15000,7 +15798,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15028,7 +15826,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15065,14 +15863,14 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * Linear easing (no variation). * - * @function Phaser.Math.Easing.Linear.Linear + * @function Phaser.Math.Easing.Linear * @since 3.0.0 * * @param {number} v - The value to be tweened. @@ -15098,14 +15896,10 @@ module.exports = Linear; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -/** - * @namespace Phaser.Math.Easing.Linear - */ - module.exports = __webpack_require__(/*! ./Linear */ "../../../src/math/easing/linear/Linear.js"); @@ -15120,7 +15914,7 @@ module.exports = __webpack_require__(/*! ./Linear */ "../../../src/math/easing/l /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15153,7 +15947,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15193,7 +15987,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15226,7 +16020,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15254,7 +16048,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15287,7 +16081,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15327,7 +16121,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15360,7 +16154,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15388,7 +16182,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15421,7 +16215,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15461,7 +16255,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15494,7 +16288,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15522,7 +16316,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15566,7 +16360,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15610,7 +16404,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15654,7 +16448,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15682,14 +16476,14 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * Stepped easing. * - * @function Phaser.Math.Easing.Stepped.Stepped + * @function Phaser.Math.Easing.Stepped * @since 3.0.0 * * @param {number} v - The value to be tweened. @@ -15729,7 +16523,7 @@ module.exports = Stepped; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15751,7 +16545,7 @@ module.exports = __webpack_require__(/*! ./Stepped */ "../../../src/math/easing/ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15787,7 +16581,7 @@ module.exports = Ceil; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15826,7 +16620,7 @@ module.exports = Equal; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15862,7 +16656,7 @@ module.exports = Floor; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15901,7 +16695,7 @@ module.exports = GreaterThan; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15940,7 +16734,7 @@ module.exports = LessThan; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15970,7 +16764,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16022,6 +16816,7 @@ var PhaserMath = { Rotate: __webpack_require__(/*! ./Rotate */ "../../../src/math/Rotate.js"), RotateAround: __webpack_require__(/*! ./RotateAround */ "../../../src/math/RotateAround.js"), RotateAroundDistance: __webpack_require__(/*! ./RotateAroundDistance */ "../../../src/math/RotateAroundDistance.js"), + RotateTo: __webpack_require__(/*! ./RotateTo */ "../../../src/math/RotateTo.js"), RoundAwayFromZero: __webpack_require__(/*! ./RoundAwayFromZero */ "../../../src/math/RoundAwayFromZero.js"), RoundTo: __webpack_require__(/*! ./RoundTo */ "../../../src/math/RoundTo.js"), SinCosTableGenerator: __webpack_require__(/*! ./SinCosTableGenerator */ "../../../src/math/SinCosTableGenerator.js"), @@ -16063,7 +16858,7 @@ module.exports = PhaserMath; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16107,7 +16902,7 @@ module.exports = BezierInterpolation; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16169,7 +16964,7 @@ module.exports = CatmullRomInterpolation; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16244,7 +17039,7 @@ module.exports = CubicBezierInterpolation; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16296,7 +17091,7 @@ module.exports = LinearInterpolation; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16360,7 +17155,7 @@ module.exports = QuadraticBezierInterpolation; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16398,7 +17193,7 @@ module.exports = SmoothStepInterpolation; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16436,7 +17231,7 @@ module.exports = SmootherStepInterpolation; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16468,14 +17263,14 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * Returns the nearest power of 2 to the given `value`. * - * @function Phaser.Math.Pow2.GetPowerOfTwo + * @function Phaser.Math.Pow2.GetNext * @since 3.0.0 * * @param {number} value - The value. @@ -16503,7 +17298,7 @@ module.exports = GetPowerOfTwo; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16511,7 +17306,7 @@ module.exports = GetPowerOfTwo; * Checks if the given `width` and `height` are a power of two. * Useful for checking texture dimensions. * - * @function Phaser.Math.Pow2.IsSizePowerOfTwo + * @function Phaser.Math.Pow2.IsSize * @since 3.0.0 * * @param {number} width - The width. @@ -16538,14 +17333,14 @@ module.exports = IsSizePowerOfTwo; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * Tests the value and returns `true` if it is a power of two. * - * @function Phaser.Math.Pow2.IsValuePowerOfTwo + * @function Phaser.Math.Pow2.IsValue * @since 3.0.0 * * @param {number} value - The value to check if it's a power of two. @@ -16571,7 +17366,7 @@ module.exports = IsValuePowerOfTwo; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16599,7 +17394,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16946,10 +17741,14 @@ var RandomDataGenerator = new Class({ * * @method Phaser.Math.RandomDataGenerator#pick * @since 3.0.0 + * + * @generic T + * @genericUse {T[]} - [array] + * @genericUse {T} - [$return] * - * @param {array} array - The array to pick a random element from. + * @param {T[]} array - The array to pick a random element from. * - * @return {*} A random member of the array. + * @return {T} A random member of the array. */ pick: function (array) { @@ -16975,9 +17774,13 @@ var RandomDataGenerator = new Class({ * @method Phaser.Math.RandomDataGenerator#weightedPick * @since 3.0.0 * - * @param {array} array - The array to pick a random element from. + * @generic T + * @genericUse {T[]} - [array] + * @genericUse {T} - [$return] * - * @return {*} A random member of the array. + * @param {T[]} array - The array to pick a random element from. + * + * @return {T} A random member of the array. */ weightedPick: function (array) { @@ -17067,9 +17870,12 @@ var RandomDataGenerator = new Class({ * @method Phaser.Math.RandomDataGenerator#shuffle * @since 3.7.0 * - * @param {array} [array] - The array to be shuffled. + * @generic T + * @genericUse {T[]} - [array,$return] * - * @return {array} The shuffled array. + * @param {T[]} [array] - The array to be shuffled. + * + * @return {T[]} The shuffled array. */ shuffle: function (array) { @@ -17103,7 +17909,7 @@ module.exports = RandomDataGenerator; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -17152,7 +17958,7 @@ module.exports = SnapCeil; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -17201,7 +18007,7 @@ module.exports = SnapFloor; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -17249,7 +18055,7 @@ module.exports = SnapTo; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -17277,7 +18083,7 @@ module.exports = { /** * @author Richard Davey -* @copyright 2019 Photon Storm Ltd. +* @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ @@ -17412,7 +18218,7 @@ module.exports = BasePlugin; /** * @author Richard Davey -* @copyright 2019 Photon Storm Ltd. +* @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ @@ -17545,7 +18351,7 @@ module.exports = ScenePlugin; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -17889,7 +18695,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -17914,6 +18720,37 @@ module.exports = { module.exports = 'resize'; +/***/ }), + +/***/ "../../../src/scene/events/ADDED_TO_SCENE_EVENT.js": +/*!*******************************************************************!*\ + !*** D:/wamp/www/phaser/src/scene/events/ADDED_TO_SCENE_EVENT.js ***! + \*******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Object Added to Scene Event. + * + * This event is dispatched when a Game Object is added to a Scene. + * + * Listen for it from a Scene using `this.scene.events.on('addedtoscene', listener)`. + * + * @event Phaser.Scenes.Events#ADDED_TO_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene. + * @param {Phaser.Scene} scene - The Scene to which the Game Object was added. + */ +module.exports = 'addedtoscene'; + + /***/ }), /***/ "../../../src/scene/events/BOOT_EVENT.js": @@ -17925,7 +18762,7 @@ module.exports = 'resize'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -17955,7 +18792,7 @@ module.exports = 'boot'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -17989,7 +18826,7 @@ module.exports = 'create'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18021,7 +18858,7 @@ module.exports = 'destroy'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18053,7 +18890,7 @@ module.exports = 'pause'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18095,7 +18932,7 @@ module.exports = 'postupdate'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18137,7 +18974,7 @@ module.exports = 'preupdate'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18159,6 +18996,37 @@ module.exports = 'preupdate'; module.exports = 'ready'; +/***/ }), + +/***/ "../../../src/scene/events/REMOVED_FROM_SCENE_EVENT.js": +/*!***********************************************************************!*\ + !*** D:/wamp/www/phaser/src/scene/events/REMOVED_FROM_SCENE_EVENT.js ***! + \***********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Object Removed from Scene Event. + * + * This event is dispatched when a Game Object is removed from a Scene. + * + * Listen for it from a Scene using `this.scene.events.on('removedfromscene', listener)`. + * + * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene. + * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed. + */ +module.exports = 'removedfromscene'; + + /***/ }), /***/ "../../../src/scene/events/RENDER_EVENT.js": @@ -18170,7 +19038,7 @@ module.exports = 'ready'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18211,7 +19079,7 @@ module.exports = 'render'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18243,7 +19111,7 @@ module.exports = 'resume'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18278,7 +19146,7 @@ module.exports = 'shutdown'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18310,7 +19178,7 @@ module.exports = 'sleep'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18340,7 +19208,7 @@ module.exports = 'start'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18381,7 +19249,7 @@ module.exports = 'transitioncomplete'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18423,7 +19291,7 @@ module.exports = 'transitioninit'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18462,7 +19330,7 @@ module.exports = 'transitionout'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18507,7 +19375,7 @@ module.exports = 'transitionstart'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18547,7 +19415,7 @@ module.exports = 'transitionwake'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18589,7 +19457,7 @@ module.exports = 'update'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18621,7 +19489,7 @@ module.exports = 'wake'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18631,6 +19499,7 @@ module.exports = 'wake'; module.exports = { + ADDED_TO_SCENE: __webpack_require__(/*! ./ADDED_TO_SCENE_EVENT */ "../../../src/scene/events/ADDED_TO_SCENE_EVENT.js"), BOOT: __webpack_require__(/*! ./BOOT_EVENT */ "../../../src/scene/events/BOOT_EVENT.js"), CREATE: __webpack_require__(/*! ./CREATE_EVENT */ "../../../src/scene/events/CREATE_EVENT.js"), DESTROY: __webpack_require__(/*! ./DESTROY_EVENT */ "../../../src/scene/events/DESTROY_EVENT.js"), @@ -18638,6 +19507,7 @@ module.exports = { POST_UPDATE: __webpack_require__(/*! ./POST_UPDATE_EVENT */ "../../../src/scene/events/POST_UPDATE_EVENT.js"), PRE_UPDATE: __webpack_require__(/*! ./PRE_UPDATE_EVENT */ "../../../src/scene/events/PRE_UPDATE_EVENT.js"), READY: __webpack_require__(/*! ./READY_EVENT */ "../../../src/scene/events/READY_EVENT.js"), + REMOVED_FROM_SCENE: __webpack_require__(/*! ./REMOVED_FROM_SCENE_EVENT */ "../../../src/scene/events/REMOVED_FROM_SCENE_EVENT.js"), RENDER: __webpack_require__(/*! ./RENDER_EVENT */ "../../../src/scene/events/RENDER_EVENT.js"), RESUME: __webpack_require__(/*! ./RESUME_EVENT */ "../../../src/scene/events/RESUME_EVENT.js"), SHUTDOWN: __webpack_require__(/*! ./SHUTDOWN_EVENT */ "../../../src/scene/events/SHUTDOWN_EVENT.js"), @@ -18665,7 +19535,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18924,7 +19794,7 @@ module.exports = Class; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18956,7 +19826,7 @@ module.exports = NOOP; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18972,6 +19842,8 @@ var IsPlainObject = __webpack_require__(/*! ./IsPlainObject */ "../../../src/uti * @function Phaser.Utils.Objects.Extend * @since 3.0.0 * + * @param {...*} [args] - The objects that will be mixed. + * * @return {object} The extended object. */ var Extend = function () @@ -19060,7 +19932,7 @@ module.exports = Extend; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19152,7 +20024,7 @@ module.exports = GetAdvancedValue; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19200,7 +20072,7 @@ module.exports = GetFastValue; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19276,7 +20148,7 @@ module.exports = GetValue; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19353,13 +20225,11 @@ var TextFile = __webpack_require__(/*! ../../../src/loader/filetypes/TextFile.js * @typedef {object} Phaser.Loader.FileTypes.SpineFileConfig * * @property {string} key - The key of the file. Must be unique within both the Loader and the Texture Manager. - * @property {string} [textureURL] - The absolute or relative URL to load the texture image file from. - * @property {string} [textureExtension='png'] - The default file extension to use for the image texture if no url is provided. - * @property {XHRSettingsObject} [textureXhrSettings] - Extra XHR Settings specifically for the texture image file. - * @property {string} [normalMap] - The filename of an associated normal map. It uses the same path and url to load as the texture image. - * @property {string} [atlasURL] - The absolute or relative URL to load the atlas data file from. - * @property {string} [atlasExtension='txt'] - The default file extension to use for the atlas data if no url is provided. - * @property {XHRSettingsObject} [atlasXhrSettings] - Extra XHR Settings specifically for the atlas data file. + * @property {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @property {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt". + * @property {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not? + * @property {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings. + * @property {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings. */ /** @@ -19367,7 +20237,7 @@ var TextFile = __webpack_require__(/*! ../../../src/loader/filetypes/TextFile.js * A Spine File suitable for loading by the Loader. * * These are created when you use the Phaser.Loader.LoaderPlugin#spine method and are not typically created directly. - * + * * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#spine. * * @class SpineFile @@ -19423,7 +20293,7 @@ var SpineFile = new Class({ for (i = 0; i < atlasURL.length; i++) { atlas = new TextFile(loader, { - key: key, + key: key + '_' + i, url: atlasURL[i], extension: GetFastValue(config, 'atlasExtension', 'atlas'), xhrSettings: GetFastValue(config, 'atlasXhrSettings') @@ -19503,7 +20373,7 @@ var SpineFile = new Class({ var currentPrefix = loader.prefix; var baseURL = GetFastValue(config, 'baseURL', this.baseURL); - var path = GetFastValue(config, 'path', this.path); + var path = GetFastValue(config, 'path', file.src.match(/^.*\//))[0]; var prefix = GetFastValue(config, 'prefix', this.prefix); var textureXhrSettings = GetFastValue(config, 'textureXhrSettings'); @@ -19515,7 +20385,7 @@ var SpineFile = new Class({ { var textureURL = textures[i]; - var key = 'SP' + this.multiKeyIndex + '_' + textureURL; + var key = this.prefix + textureURL; var image = new ImageFile(loader, key, textureURL, textureXhrSettings); @@ -19557,7 +20427,7 @@ var SpineFile = new Class({ if (file.type === 'text') { - atlasKey = file.key.substr(0, file.key.length - 2); + atlasKey = file.key.replace(/_[\d]$/, ''); atlasCache = file.cache; @@ -19568,14 +20438,14 @@ var SpineFile = new Class({ var src = file.key.trim(); var pos = src.indexOf('_'); var key = src.substr(pos + 1); - + this.loader.textureManager.addImage(key, file.data); } file.pendingDestroy(); } - atlasCache.add(atlasKey, { preMultipliedAlpha: preMultipliedAlpha, data: combinedAtlasData }); + atlasCache.add(atlasKey, { preMultipliedAlpha: preMultipliedAlpha, data: combinedAtlasData, prefix: this.prefix }); this.complete = true; } @@ -19613,22 +20483,27 @@ var SpineGameObject = __webpack_require__(/*! ./gameobject/SpineGameObject */ ". /** * @classdesc * The Spine Plugin is a Scene based plugin that handles the creation and rendering of Spine Game Objects. - * + * + * Find more details about Spine itself at http://esotericsoftware.com/. + * * All rendering and object creation is handled via the official Spine Runtimes. This version of the plugin - * uses the Spine 3.8 runtimes. Files created in a different version of Spine may not work as a result. - * - * You can find more details about Spine at http://esotericsoftware.com/. - * + * uses the Spine 3.8.95 runtimes. Please note that due to the way the Spine runtimes use semver, you will + * get breaking changes in point-releases. Therefore, files created in a different version of Spine may not + * work as a result, without you first updating the runtimes and rebuilding the plugin. + * + * Esoteric themselves recommend that you freeze your Spine editor version against the runtime versions. + * You can find more information about this here: http://esotericsoftware.com/spine-settings#Version + * * Please note that you require a Spine license in order to use Spine Runtimes in your games. - * + * * You can install this plugin into your Phaser game by either importing it, if you're using ES6: - * + * * ```javascript * import * as SpinePlugin from './SpinePlugin.js'; * ``` - * + * * and then adding it to your Phaser Game configuration: - * + * * ```javascript * plugins: { * scene: [ @@ -19636,10 +20511,10 @@ var SpineGameObject = __webpack_require__(/*! ./gameobject/SpineGameObject */ ". * ] * } * ``` - * + * * If you're using ES5 then you can load the Spine Plugin in a Scene files payload, _within_ your * Game Configuration object, like this: - * + * * ```javascript * scene: { * preload: preload, @@ -19651,42 +20526,42 @@ var SpineGameObject = __webpack_require__(/*! ./gameobject/SpineGameObject */ ". * } * } * ``` - * + * * Loading it like this allows you to then use commands such as `this.load.spine` from within the * same Scene. Alternatively, you can use the method `this.load.plugin` to load the plugin via the normal * Phaser Loader. However, doing so will not add it to the current Scene. It will be available from any * subsequent Scenes. - * + * * Assuming a default environment you access it from within a Scene by using the `this.spine` reference. - * + * * When this plugin is installed into a Scene it will add a Loader File Type, allowing you to load * Spine files directly, i.e.: - * + * * ```javascript * this.load.spine('stretchyman', 'stretchyman-pro.json', [ 'stretchyman-pma.atlas' ], true); * ``` - * - * It also installs a Game Object Factory method, allowin you to create Spine Game Objects: - * + * + * It also installs a Game Object Factory method, allowing you to create Spine Game Objects: + * * ```javascript * this.add.spine(512, 650, 'stretchyman') * ``` - * + * * The first argument is the key which you used when importing the Spine data. There are lots of * things you can specify, such as the animation name, skeleton, slot attachments and more. Please * see the respective documentation and examples for further details. - * + * * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary. * The associated atlas files are scanned for any texture files present in them, which are then loaded. - * If you have exported your Spine data with preMultipiedAlpha set, then you should enable this in the + * If you have exported your Spine data with preMultipliedAlpha set, then you should enable this in the * load arguments, or you may see black outlines around skeleton textures. - * + * * The Spine plugin is local to the Scene in which it is installed. This means a change to something, * such as the Skeleton Debug Renderer, in this Scene, will not impact the renderer in any other Scene. * The only exception to this is with the caches this plugin creates. Spine atlas and texture data are * stored in their own caches, which are global, meaning they're accessible from any Scene in your * game, regardless if the Scene loaded the Spine data or not. - * + * * For details about the Spine Runtime API see http://esotericsoftware.com/spine-api-reference * * @class SpinePlugin @@ -19721,7 +20596,7 @@ var SpinePlugin = new Class({ /** * A custom cache that stores the Spine atlas data. - * + * * This cache is global across your game, allowing you to access Spine data loaded from other Scenes, * no matter which Scene you are in. * @@ -19733,7 +20608,7 @@ var SpinePlugin = new Class({ /** * A custom cache that stores the Spine Textures. - * + * * This cache is global across your game, allowing you to access Spine data loaded from other Scenes, * no matter which Scene you are in. * @@ -19773,7 +20648,7 @@ var SpinePlugin = new Class({ /** * The underlying WebGL context of the Phaser renderer. - * + * * Only set if running in WebGL mode. * * @name SpinePlugin#gl @@ -19793,7 +20668,7 @@ var SpinePlugin = new Class({ /** * An instance of the Spine WebGL Scene Renderer. - * + * * Only set if running in WebGL mode. * * @name SpinePlugin#sceneRenderer @@ -19813,7 +20688,7 @@ var SpinePlugin = new Class({ /** * An instance of the Spine Skeleton Debug Renderer. - * + * * Only set if running in WebGL mode. * * @name SpinePlugin#skeletonDebugRenderer @@ -19875,46 +20750,46 @@ var SpinePlugin = new Class({ var add = function (x, y, key, animationName, loop) { var spineGO = new SpineGameObject(this.scene, _this, x, y, key, animationName, loop); - + this.displayList.add(spineGO); this.updateList.add(spineGO); - + return spineGO; }; var make = function (config, addToScene) { if (config === undefined) { config = {}; } - + var key = GetValue(config, 'key', null); var animationName = GetValue(config, 'animationName', null); var loop = GetValue(config, 'loop', false); - + var spineGO = new SpineGameObject(this.scene, _this, 0, 0, key, animationName, loop); - + if (addToScene !== undefined) { config.add = addToScene; } - + BuildGameObject(this.scene, spineGO, config); - + // Spine specific var skinName = GetValue(config, 'skinName', false); - + if (skinName) { spineGO.setSkinByName(skinName); } - + var slotName = GetValue(config, 'slotName', false); var attachmentName = GetValue(config, 'attachmentName', null); - + if (slotName) { spineGO.setAttachment(slotName, attachmentName); } - + return spineGO.refresh(); }; @@ -19971,7 +20846,7 @@ var SpinePlugin = new Class({ { this.sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true); - // Monkeypatch the Spine setBlendMode functions, or batching is destroyed + // Monkeypatch the Spine setBlendMode functions, or batching is destroyed! var setBlendMode = function (srcBlend, dstBlend) { @@ -20006,9 +20881,9 @@ var SpinePlugin = new Class({ * * @method SpinePlugin#getAtlasCanvas * @since 3.19.0 - * + * * @param {string} key - The key of the Spine Atlas to create. - * + * * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found. */ getAtlasCanvas: function (key) @@ -20034,7 +20909,7 @@ var SpinePlugin = new Class({ atlas = new Spine.TextureAtlas(atlasEntry.data, function (path) { - return new Spine.canvas.CanvasTexture(textures.get(path).getSourceImage()); + return new Spine.canvas.CanvasTexture(textures.get(atlasEntry.prefix + path).getSourceImage()); }); } @@ -20047,9 +20922,9 @@ var SpinePlugin = new Class({ * * @method SpinePlugin#getAtlasWebGL * @since 3.19.0 - * + * * @param {string} key - The key of the Spine Atlas to create. - * + * * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found. */ getAtlasWebGL: function (key) @@ -20079,7 +20954,7 @@ var SpinePlugin = new Class({ atlas = new Spine.TextureAtlas(atlasEntry.data, function (path) { - return new Spine.webgl.GLTexture(gl, textures.get(path).getSourceImage(), false); + return new Spine.webgl.GLTexture(gl, textures.get(atlasEntry.prefix + path).getSourceImage(), false); }); } @@ -20090,7 +20965,7 @@ var SpinePlugin = new Class({ * Adds a Spine Skeleton and Atlas file, or array of files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -20105,21 +20980,21 @@ var SpinePlugin = new Class({ * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been * loaded. - * + * * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. - * + * * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary. The associated * atlas files are scanned for any texture files present in them, which are then loaded. If you have exported - * your Spine data with preMultipiedAlpha set, then you should enable this in the arguments, or you may see black + * your Spine data with preMultipliedAlpha set, then you should enable this in the arguments, or you may see black * outlines around skeleton textures. - * + * * The key must be a unique String. It is used to add the file to the global Spine cache upon a successful load. * The key should be unique both in terms of files being loaded and files already present in the Spine cache. * Loading a file using a key that is already taken will result in a warning. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.spine({ * key: 'mainmenu', @@ -20128,9 +21003,9 @@ var SpinePlugin = new Class({ * preMultipliedAlpha: true * }); * ``` - * + * * If you need to load multiple Spine atlas files, provide them as an array: - * + * * ```javascript * function preload () * { @@ -20153,13 +21028,13 @@ var SpinePlugin = new Class({ * Note: The ability to load this type of file will only be available if the Spine Plugin has been built or loaded into Phaser. * * @method Phaser.Loader.LoaderPlugin#spine - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.19.0 * * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} jsonURL - The absolute or relative URL to load the Spine json file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". * @param {string|string[]} atlasURL - The absolute or relative URL to load the Spine atlas file from. If undefined or `null` it will be set to `.atlas`, i.e. if `key` was "alien" then the URL will be "alien.atlas". - * @param {boolean} [preMultipiedAlpha=false] - Do the texture files include pre-multiplied alpha or not? + * @param {boolean} [preMultipliedAlpha=false] - Do the texture files include pre-multiplied alpha or not? * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the Spine json file. Used in replacement of the Loaders default XHR Settings. * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the Spine atlas file. Used in replacement of the Loaders default XHR Settings. * @@ -20168,13 +21043,13 @@ var SpinePlugin = new Class({ spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings) { var multifile; - + if (Array.isArray(key)) { for (var i = 0; i < key.length; i++) { multifile = new SpineFile(this, key[i]); - + this.addFile(multifile.files); } } @@ -20184,23 +21059,23 @@ var SpinePlugin = new Class({ this.addFile(multifile.files); } - + return this; }, /** * Converts the given x and y screen coordinates into the world space of the given Skeleton. - * + * * Only works in WebGL. * * @method SpinePlugin#worldToLocal * @since 3.19.0 - * + * * @param {number} x - The screen space x coordinate to convert. * @param {number} y - The screen space y coordinate to convert. * @param {spine.Skeleton} skeleton - The Spine Skeleton to convert into. * @param {spine.Bone} [bone] - Optional bone of the Skeleton to convert into. - * + * * @return {spine.Vector2} A Vector2 containing the translated point. */ worldToLocal: function (x, y, skeleton, bone) @@ -20237,10 +21112,10 @@ var SpinePlugin = new Class({ * * @method SpinePlugin#getVector2 * @since 3.19.0 - * + * * @param {number} x - The Vector x value. * @param {number} y - The Vector y value. - * + * * @return {spine.Vector2} A Spine Vector2 based on the given values. */ getVector2: function (x, y) @@ -20250,16 +21125,16 @@ var SpinePlugin = new Class({ /** * Returns a Spine Vector2 based on the given x, y and z values. - * + * * Only works in WebGL. * * @method SpinePlugin#getVector3 * @since 3.19.0 - * + * * @param {number} x - The Vector x value. * @param {number} y - The Vector y value. * @param {number} z - The Vector z value. - * + * * @return {spine.Vector2} A Spine Vector2 based on the given values. */ getVector3: function (x, y, z) @@ -20269,14 +21144,14 @@ var SpinePlugin = new Class({ /** * Sets `drawBones` in the Spine Skeleton Debug Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setDebugBones * @since 3.19.0 - * + * * @param {boolean} [value=true] - The value to set in the debug property. - * + * * @return {this} This Spine Plugin. */ setDebugBones: function (value) @@ -20290,14 +21165,14 @@ var SpinePlugin = new Class({ /** * Sets `drawRegionAttachments` in the Spine Skeleton Debug Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setDebugRegionAttachments * @since 3.19.0 - * + * * @param {boolean} [value=true] - The value to set in the debug property. - * + * * @return {this} This Spine Plugin. */ setDebugRegionAttachments: function (value) @@ -20311,14 +21186,14 @@ var SpinePlugin = new Class({ /** * Sets `drawBoundingBoxes` in the Spine Skeleton Debug Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setDebugBoundingBoxes * @since 3.19.0 - * + * * @param {boolean} [value=true] - The value to set in the debug property. - * + * * @return {this} This Spine Plugin. */ setDebugBoundingBoxes: function (value) @@ -20332,14 +21207,14 @@ var SpinePlugin = new Class({ /** * Sets `drawMeshHull` in the Spine Skeleton Debug Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setDebugMeshHull * @since 3.19.0 - * + * * @param {boolean} [value=true] - The value to set in the debug property. - * + * * @return {this} This Spine Plugin. */ setDebugMeshHull: function (value) @@ -20353,14 +21228,14 @@ var SpinePlugin = new Class({ /** * Sets `drawMeshTriangles` in the Spine Skeleton Debug Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setDebugMeshTriangles * @since 3.19.0 - * + * * @param {boolean} [value=true] - The value to set in the debug property. - * + * * @return {this} This Spine Plugin. */ setDebugMeshTriangles: function (value) @@ -20374,14 +21249,14 @@ var SpinePlugin = new Class({ /** * Sets `drawPaths` in the Spine Skeleton Debug Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setDebugPaths * @since 3.19.0 - * + * * @param {boolean} [value=true] - The value to set in the debug property. - * + * * @return {this} This Spine Plugin. */ setDebugPaths: function (value) @@ -20395,14 +21270,14 @@ var SpinePlugin = new Class({ /** * Sets `drawSkeletonXY` in the Spine Skeleton Debug Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setDebugSkeletonXY * @since 3.19.0 - * + * * @param {boolean} [value=true] - The value to set in the debug property. - * + * * @return {this} This Spine Plugin. */ setDebugSkeletonXY: function (value) @@ -20416,14 +21291,14 @@ var SpinePlugin = new Class({ /** * Sets `drawClipping` in the Spine Skeleton Debug Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setDebugClipping * @since 3.19.0 - * + * * @param {boolean} [value=true] - The value to set in the debug property. - * + * * @return {this} This Spine Plugin. */ setDebugClipping: function (value) @@ -20437,14 +21312,14 @@ var SpinePlugin = new Class({ /** * Sets the given vertex effect on the Spine Skeleton Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setEffect * @since 3.19.0 - * + * * @param {spine.VertexEffect} [effect] - The vertex effect to set on the Skeleton Renderer. - * + * * @return {this} This Spine Plugin. */ setEffect: function (effect) @@ -20456,15 +21331,15 @@ var SpinePlugin = new Class({ /** * Creates a Spine Skeleton based on the given key and optional Skeleton JSON data. - * + * * The Skeleton data should have already been loaded before calling this method. * * @method SpinePlugin#createSkeleton * @since 3.19.0 - * + * * @param {string} key - The key of the Spine skeleton data, as loaded by the plugin. If the Spine JSON contains multiple skeletons, reference them with a period, i.e. `set.spineBoy`. * @param {object} [skeletonJSON] - Optional Skeleton JSON data to use, instead of getting it from the cache. - * + * * @return {(any|null)} This Spine Skeleton data object, or `null` if the key was invalid. */ createSkeleton: function (key, skeletonJSON) @@ -20497,7 +21372,7 @@ var SpinePlugin = new Class({ var preMultipliedAlpha = atlasData.preMultipliedAlpha; var atlasLoader = new Spine.AtlasAttachmentLoader(atlas); - + var skeletonJson = new Spine.SkeletonJson(atlasLoader); var data; @@ -20518,7 +21393,7 @@ var SpinePlugin = new Class({ var skeletonData = skeletonJson.readSkeletonData(data); var skeleton = new Spine.Skeleton(skeletonData); - + return { skeletonData: skeletonData, skeleton: skeleton, preMultipliedAlpha: preMultipliedAlpha }; } else @@ -20529,14 +21404,14 @@ var SpinePlugin = new Class({ /** * Creates a new Animation State and Animation State Data for the given skeleton. - * + * * The returned object contains two properties: `state` and `stateData` respectively. * * @method SpinePlugin#createAnimationState * @since 3.19.0 - * + * * @param {spine.Skeleton} skeleton - The Skeleton to create the Animation State for. - * + * * @return {any} An object containing the Animation State and Animation State Data instances. */ createAnimationState: function (skeleton) @@ -20550,17 +21425,17 @@ var SpinePlugin = new Class({ /** * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose. - * + * * The returned object contains two properties: `offset` and `size`: - * + * * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB. * `size` - The width and height of the AABB. * * @method SpinePlugin#getBounds * @since 3.19.0 - * + * * @param {spine.Skeleton} skeleton - The Skeleton to get the bounds from. - * + * * @return {any} The bounds object. */ getBounds: function (skeleton) @@ -20575,7 +21450,7 @@ var SpinePlugin = new Class({ /** * Internal handler for when the renderer resizes. - * + * * Only called if running in WebGL. * * @method SpinePlugin#onResize @@ -20591,14 +21466,14 @@ var SpinePlugin = new Class({ sceneRenderer.camera.position.x = viewportWidth / 2; sceneRenderer.camera.position.y = viewportHeight / 2; - + sceneRenderer.camera.viewportWidth = viewportWidth; sceneRenderer.camera.viewportHeight = viewportHeight; }, /** * The Scene that owns this plugin is shutting down. - * + * * We need to kill and reset all internal properties as well as stop listening to Scene events. * * @method SpinePlugin#shutdown @@ -20610,11 +21485,16 @@ var SpinePlugin = new Class({ var eventEmitter = this.systems.events; eventEmitter.off('shutdown', this.shutdown, this); + + if (this.isWebGL) + { + this.game.scale.off(ResizeEvent, this.onResize, this); + } }, /** * The Scene that owns this plugin is being destroyed. - * + * * We need to shutdown and then kill off all external references. * * @method SpinePlugin#destroy @@ -20650,30 +21530,30 @@ var SpinePlugin = new Class({ /** * Creates a new Spine Game Object and adds it to the Scene. - * + * * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects * do not have a Phaser origin. - * + * * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference * that. - * + * * ```javascript * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true); * ``` - * + * * The key is optional. If not passed here, you need to call `SpineGameObject.setSkeleton()` to use it. - * + * * The animation name is also optional and can be set later via `SpineGameObject.setAnimation`. - * + * * Should you wish for more control over the object creation, such as setting a slot attachment or skin * name, then use `SpinePlugin.make` instead. * * @method SpinePlugin#add * @since 3.19.0 - * + * * @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} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin. @@ -20685,16 +21565,16 @@ var SpinePlugin = new Class({ /** * Creates a new Spine Game Object from the given configuration file and optionally adds it to the Scene. - * + * * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects * do not have a Phaser origin. - * + * * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference * that. - * + * * ```javascript * let jelly = this.make.spine({ * x: 500, y: 500, key: 'jelly', @@ -22715,10 +23595,10 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent { // The next object in the display list is not a Spine object, so we end the batch sceneRenderer.end(); - - renderer.rebindPipeline(renderer.pipelines.TextureTintPipeline); + + renderer.rebindPipeline(renderer.pipelines.MultiPipeline); } - + return; } @@ -22805,9 +23685,6 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent } // Draw the current skeleton - - // console.log('draw', src.name); - sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha); if (plugin.drawDebug || src.drawDebug) @@ -22830,7 +23707,7 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent // The next object in the display list is not a Spine object, so we end the batch sceneRenderer.end(); - renderer.rebindPipeline(renderer.pipelines.TextureTintPipeline); + renderer.rebindPipeline(renderer.pipelines.MultiPipeline); } }; @@ -22847,13 +23724,13 @@ module.exports = SpineGameObjectWebGLRenderer; /***/ (function(module, exports) { /*** IMPORTS FROM imports-loader ***/ -(function() { +(function() { var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { @@ -23526,17 +24403,15 @@ var spine; var slot = skeleton.slots[this.slotIndex]; if (!slot.bone.active) return; - if (direction == MixDirection.mixOut && blend == MixBlend.setup) { - var attachmentName_1 = slot.data.attachmentName; - slot.setAttachment(attachmentName_1 == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName_1)); + if (direction == MixDirection.mixOut) { + if (blend == MixBlend.setup) + this.setAttachment(skeleton, slot, slot.data.attachmentName); return; } var frames = this.frames; if (time < frames[0]) { - if (blend == MixBlend.setup || blend == MixBlend.first) { - var attachmentName_2 = slot.data.attachmentName; - slot.setAttachment(attachmentName_2 == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName_2)); - } + if (blend == MixBlend.setup || blend == MixBlend.first) + this.setAttachment(skeleton, slot, slot.data.attachmentName); return; } var frameIndex = 0; @@ -23548,6 +24423,9 @@ var spine; skeleton.slots[this.slotIndex] .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName)); }; + AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) { + slot.attachment = attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName); + }; return AttachmentTimeline; }()); spine.AttachmentTimeline = AttachmentTimeline; @@ -23649,6 +24527,7 @@ var spine; case MixBlend.replace: for (var i_5 = 0; i_5 < vertexCount; i_5++) deform[i_5] += (lastVertices[i_5] - deform[i_5]) * alpha; + break; case MixBlend.add: var vertexAttachment = slotAttachment; if (vertexAttachment.bones == null) { @@ -23805,8 +24684,9 @@ var spine; DrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) { var drawOrder = skeleton.drawOrder; var slots = skeleton.slots; - if (direction == MixDirection.mixOut && blend == MixBlend.setup) { - spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length); + if (direction == MixDirection.mixOut) { + if (blend == MixBlend.setup) + spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length); return; } var frames = this.frames; @@ -24198,6 +25078,7 @@ var spine; function AnimationState(data) { this.tracks = new Array(); this.timeScale = 1; + this.unkeyedState = 0; this.events = new Array(); this.listeners = new Array(); this.queue = new EventQueue(this); @@ -24287,12 +25168,12 @@ var spine; var events = this.events; var tracks = this.tracks; var applied = false; - for (var i = 0, n = tracks.length; i < n; i++) { - var current = tracks[i]; + for (var i_16 = 0, n_1 = tracks.length; i_16 < n_1; i_16++) { + var current = tracks[i_16]; if (current == null || current.delay > 0) continue; applied = true; - var blend = i == 0 ? spine.MixBlend.first : current.mixBlend; + var blend = i_16 == 0 ? spine.MixBlend.first : current.mixBlend; var mix = current.alpha; if (current.mixingFrom != null) mix *= this.applyMixingFrom(current, skeleton, blend); @@ -24301,10 +25182,14 @@ var spine; var animationLast = current.animationLast, animationTime = current.getAnimationTime(); var timelineCount = current.animation.timelines.length; var timelines = current.animation.timelines; - if ((i == 0 && mix == 1) || blend == spine.MixBlend.add) { + if ((i_16 == 0 && mix == 1) || blend == spine.MixBlend.add) { for (var ii = 0; ii < timelineCount; ii++) { spine.Utils.webkit602BugfixHelper(mix, blend); - timelines[ii].apply(skeleton, animationLast, animationTime, events, mix, blend, spine.MixDirection.mixIn); + var timeline = timelines[ii]; + if (timeline instanceof spine.AttachmentTimeline) + this.applyAttachmentTimeline(timeline, skeleton, animationTime, blend, true); + else + timeline.apply(skeleton, animationLast, animationTime, events, mix, blend, spine.MixDirection.mixIn); } } else { @@ -24314,14 +25199,17 @@ var spine; spine.Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null); var timelinesRotation = current.timelinesRotation; for (var ii = 0; ii < timelineCount; ii++) { - var timeline = timelines[ii]; - var timelineBlend = (timelineMode[ii] & (AnimationState.NOT_LAST - 1)) == AnimationState.SUBSEQUENT ? blend : spine.MixBlend.setup; - if (timeline instanceof spine.RotateTimeline) { - this.applyRotateTimeline(timeline, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame); + var timeline_1 = timelines[ii]; + var timelineBlend = timelineMode[ii] == AnimationState.SUBSEQUENT ? blend : spine.MixBlend.setup; + if (timeline_1 instanceof spine.RotateTimeline) { + this.applyRotateTimeline(timeline_1, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame); + } + else if (timeline_1 instanceof spine.AttachmentTimeline) { + this.applyAttachmentTimeline(timeline_1, skeleton, animationTime, blend, true); } else { spine.Utils.webkit602BugfixHelper(mix, blend); - timeline.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, spine.MixDirection.mixIn); + timeline_1.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, spine.MixDirection.mixIn); } } } @@ -24330,6 +25218,16 @@ var spine; current.nextAnimationLast = animationTime; current.nextTrackLast = current.trackTime; } + var setupState = this.unkeyedState + AnimationState.SETUP; + var slots = skeleton.slots; + for (var i = 0, n = skeleton.slots.length; i < n; i++) { + var slot = slots[i]; + if (slot.attachmentState == setupState) { + var attachmentName = slot.data.attachmentName; + slot.attachment = (attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName)); + } + } + this.unkeyedState += 2; this.queue.drain(); return applied; }; @@ -24373,23 +25271,22 @@ var spine; var direction = spine.MixDirection.mixOut; var timelineBlend = void 0; var alpha = 0; - switch (timelineMode[i] & (AnimationState.NOT_LAST - 1)) { + switch (timelineMode[i]) { case AnimationState.SUBSEQUENT: - timelineBlend = blend; - if (!attachments && timeline instanceof spine.AttachmentTimeline) { - if ((timelineMode[i] & AnimationState.NOT_LAST) == AnimationState.NOT_LAST) - continue; - timelineBlend = spine.MixBlend.setup; - } if (!drawOrder && timeline instanceof spine.DrawOrderTimeline) continue; + timelineBlend = blend; alpha = alphaMix; break; case AnimationState.FIRST: timelineBlend = spine.MixBlend.setup; alpha = alphaMix; break; - case AnimationState.HOLD: + case AnimationState.HOLD_SUBSEQUENT: + timelineBlend = blend; + alpha = alphaHold; + break; + case AnimationState.HOLD_FIRST: timelineBlend = spine.MixBlend.setup; alpha = alphaHold; break; @@ -24402,18 +25299,12 @@ var spine; from.totalAlpha += alpha; if (timeline instanceof spine.RotateTimeline) this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame); + else if (timeline instanceof spine.AttachmentTimeline) + this.applyAttachmentTimeline(timeline, skeleton, animationTime, timelineBlend, attachments); else { spine.Utils.webkit602BugfixHelper(alpha, blend); - if (timelineBlend == spine.MixBlend.setup) { - if (timeline instanceof spine.AttachmentTimeline) { - if (attachments || (timelineMode[i] & AnimationState.NOT_LAST) == AnimationState.NOT_LAST) - direction = spine.MixDirection.mixIn; - } - else if (timeline instanceof spine.DrawOrderTimeline) { - if (drawOrder) - direction = spine.MixDirection.mixIn; - } - } + if (drawOrder && timeline instanceof spine.DrawOrderTimeline && timelineBlend == spine.MixBlend.setup) + direction = spine.MixDirection.mixIn; timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, direction); } } @@ -24425,6 +25316,31 @@ var spine; from.nextTrackLast = from.trackTime; return mix; }; + AnimationState.prototype.applyAttachmentTimeline = function (timeline, skeleton, time, blend, attachments) { + var slot = skeleton.slots[timeline.slotIndex]; + if (!slot.bone.active) + return; + var frames = timeline.frames; + if (time < frames[0]) { + if (blend == spine.MixBlend.setup || blend == spine.MixBlend.first) + this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments); + } + else { + var frameIndex; + if (time >= frames[frames.length - 1]) + frameIndex = frames.length - 1; + else + frameIndex = spine.Animation.binarySearch(frames, time) - 1; + this.setAttachment(skeleton, slot, timeline.attachmentNames[frameIndex], attachments); + } + if (slot.attachmentState <= this.unkeyedState) + slot.attachmentState = this.unkeyedState + AnimationState.SETUP; + }; + AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) { + slot.attachment = attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName); + if (attachments) + slot.attachmentState = this.unkeyedState + AnimationState.CURRENT; + }; AnimationState.prototype.applyRotateTimeline = function (timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) { if (firstFrame) timelinesRotation[i] = 0; @@ -24687,6 +25603,7 @@ var spine; entry.interruptAlpha = 1; entry.mixTime = 0; entry.mixDuration = last == null ? 0 : this.data.getMix(last.animation, animation); + entry.mixBlend = spine.MixBlend.replace; return entry; }; AnimationState.prototype.disposeNext = function (entry) { @@ -24712,14 +25629,6 @@ var spine; entry = entry.mixingTo; } while (entry != null); } - this.propertyIDs.clear(); - for (var i = this.tracks.length - 1; i >= 0; i--) { - var entry = this.tracks[i]; - while (entry != null) { - this.computeNotLast(entry); - entry = entry.mixingFrom; - } - } }; AnimationState.prototype.computeHold = function (entry) { var to = entry.mixingTo; @@ -24731,8 +25640,7 @@ var spine; var propertyIDs = this.propertyIDs; if (to != null && to.holdPrevious) { for (var i = 0; i < timelinesCount; i++) { - propertyIDs.add(timelines[i].getPropertyId()); - timelineMode[i] = AnimationState.HOLD; + timelineMode[i] = propertyIDs.add(timelines[i].getPropertyId()) ? AnimationState.HOLD_FIRST : AnimationState.HOLD_SUBSEQUENT; } return; } @@ -24756,20 +25664,7 @@ var spine; } break; } - timelineMode[i] = AnimationState.HOLD; - } - } - }; - AnimationState.prototype.computeNotLast = function (entry) { - var timelines = entry.animation.timelines; - var timelinesCount = entry.animation.timelines.length; - var timelineMode = entry.timelineMode; - var propertyIDs = this.propertyIDs; - for (var i = 0; i < timelinesCount; i++) { - if (timelines[i] instanceof spine.AttachmentTimeline) { - var timeline = timelines[i]; - if (!propertyIDs.add(timeline.slotIndex)) - timelineMode[i] |= AnimationState.NOT_LAST; + timelineMode[i] = AnimationState.HOLD_FIRST; } } }; @@ -24797,9 +25692,11 @@ var spine; AnimationState.emptyAnimation = new spine.Animation("", [], 0); AnimationState.SUBSEQUENT = 0; AnimationState.FIRST = 1; - AnimationState.HOLD = 2; - AnimationState.HOLD_MIX = 3; - AnimationState.NOT_LAST = 4; + AnimationState.HOLD_SUBSEQUENT = 2; + AnimationState.HOLD_FIRST = 3; + AnimationState.HOLD_MIX = 4; + AnimationState.SETUP = 1; + AnimationState.CURRENT = 2; return AnimationState; }()); spine.AnimationState = AnimationState; @@ -25012,11 +25909,15 @@ var spine; this.errors = {}; this.toLoad = 0; this.loaded = 0; + this.rawDataUris = {}; this.textureLoader = textureLoader; this.pathPrefix = pathPrefix; } - AssetManager.downloadText = function (url, success, error) { + AssetManager.prototype.downloadText = function (url, success, error) { var request = new XMLHttpRequest(); + request.overrideMimeType("text/html"); + if (this.rawDataUris[url]) + url = this.rawDataUris[url]; request.open("GET", url, true); request.onload = function () { if (request.status == 200) { @@ -25031,8 +25932,10 @@ var spine; }; request.send(); }; - AssetManager.downloadBinary = function (url, success, error) { + AssetManager.prototype.downloadBinary = function (url, success, error) { var request = new XMLHttpRequest(); + if (this.rawDataUris[url]) + url = this.rawDataUris[url]; request.open("GET", url, true); request.responseType = "arraybuffer"; request.onload = function () { @@ -25048,13 +25951,16 @@ var spine; }; request.send(); }; + AssetManager.prototype.setRawDataURI = function (path, data) { + this.rawDataUris[this.pathPrefix + path] = data; + }; AssetManager.prototype.loadBinary = function (path, success, error) { var _this = this; if (success === void 0) { success = null; } if (error === void 0) { error = null; } path = this.pathPrefix + path; this.toLoad++; - AssetManager.downloadBinary(path, function (data) { + this.downloadBinary(path, function (data) { _this.assets[path] = data; if (success) success(path, data); @@ -25074,7 +25980,7 @@ var spine; if (error === void 0) { error = null; } path = this.pathPrefix + path; this.toLoad++; - AssetManager.downloadText(path, function (data) { + this.downloadText(path, function (data) { _this.assets[path] = data; if (success) success(path, data); @@ -25093,12 +25999,13 @@ var spine; if (success === void 0) { success = null; } if (error === void 0) { error = null; } path = this.pathPrefix + path; + var storagePath = path; this.toLoad++; var img = new Image(); img.crossOrigin = "anonymous"; img.onload = function (ev) { var texture = _this.textureLoader(img); - _this.assets[path] = texture; + _this.assets[storagePath] = texture; _this.toLoad--; _this.loaded++; if (success) @@ -25111,32 +26018,10 @@ var spine; if (error) error(path, "Couldn't load image " + path); }; + if (this.rawDataUris[path]) + path = this.rawDataUris[path]; img.src = path; }; - AssetManager.prototype.loadTextureData = function (path, data, success, error) { - var _this = this; - if (success === void 0) { success = null; } - if (error === void 0) { error = null; } - path = this.pathPrefix + path; - this.toLoad++; - var img = new Image(); - img.onload = function (ev) { - var texture = _this.textureLoader(img); - _this.assets[path] = texture; - _this.toLoad--; - _this.loaded++; - if (success) - success(path, img); - }; - img.onerror = function (ev) { - _this.errors[path] = "Couldn't load image " + path; - _this.toLoad--; - _this.loaded++; - if (error) - error(path, "Couldn't load image " + path); - }; - img.src = data; - }; AssetManager.prototype.loadTextureAtlas = function (path, success, error) { var _this = this; if (success === void 0) { success = null; } @@ -25144,12 +26029,12 @@ var spine; var parent = path.lastIndexOf("/") >= 0 ? path.substring(0, path.lastIndexOf("/")) : ""; path = this.pathPrefix + path; this.toLoad++; - AssetManager.downloadText(path, function (atlasData) { + this.downloadText(path, function (atlasData) { var pagesLoaded = { count: 0 }; var atlasPages = new Array(); try { var atlas = new spine.TextureAtlas(atlasData, function (path) { - atlasPages.push(parent + "/" + path); + atlasPages.push(parent == "" ? path : parent + "/" + path); var image = document.createElement("img"); image.width = 16; image.height = 16; @@ -25173,7 +26058,7 @@ var spine; if (!pageLoadError) { try { var atlas = new spine.TextureAtlas(atlasData, function (path) { - return _this.get(parent + "/" + path); + return _this.get(parent == "" ? path : parent + "/" + path); }); _this.assets[path] = atlas; if (success) @@ -25411,6 +26296,8 @@ var spine; var prx = 0; if (s > 0.0001) { s = Math.abs(pa * pd - pb * pc) / s; + pa /= this.skeleton.scaleX; + pc /= this.skeleton.scaleY; pb = pc * s; pd = pa * s; prx = Math.atan2(pc, pa) * spine.MathUtils.radDeg; @@ -25681,10 +26568,27 @@ var spine; if (!bone.appliedValid) bone.updateAppliedTransform(); var p = bone.parent; - var id = 1 / (p.a * p.d - p.b * p.c); - var x = targetX - p.worldX, y = targetY - p.worldY; - var tx = (x * p.d - y * p.b) * id - bone.ax, ty = (y * p.a - x * p.c) * id - bone.ay; - var rotationIK = Math.atan2(ty, tx) * spine.MathUtils.radDeg - bone.ashearX - bone.arotation; + var pa = p.a, pb = p.b, pc = p.c, pd = p.d; + var rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0; + switch (bone.data.transformMode) { + case spine.TransformMode.OnlyTranslation: + tx = targetX - bone.worldX; + ty = targetY - bone.worldY; + break; + case spine.TransformMode.NoRotationOrReflection: + var s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc); + var sa = pa / bone.skeleton.scaleX; + var sc = pc / bone.skeleton.scaleY; + pb = -sc * s * bone.skeleton.scaleX; + pd = sa * s * bone.skeleton.scaleY; + rotationIK += Math.atan2(sc, sa) * spine.MathUtils.radDeg; + default: + var x = targetX - p.worldX, y = targetY - p.worldY; + var d = pa * pd - pb * pc; + tx = (x * pd - y * pb) / d - bone.ax; + ty = (y * pa - x * pc) / d - bone.ay; + } + rotationIK += Math.atan2(ty, tx) * spine.MathUtils.radDeg; if (bone.ascaleX < 0) rotationIK += 180; if (rotationIK > 180) @@ -25693,6 +26597,12 @@ var spine; rotationIK += 360; var sx = bone.ascaleX, sy = bone.ascaleY; if (compress || stretch) { + switch (bone.data.transformMode) { + case spine.TransformMode.NoScale: + case spine.TransformMode.NoScaleOrReflection: + tx = targetX - bone.worldX; + ty = targetY - bone.worldY; + } var b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty); if ((compress && dd < b) || (stretch && dd > b) && b > 0.0001) { var s = (dd / b - 1) * alpha + 1; @@ -26351,6 +27261,7 @@ var spine; if (!this.queueAsset(clientId, null, path)) return; var request = new XMLHttpRequest(); + request.overrideMimeType("text/html"); request.onreadystatechange = function () { if (request.readyState == XMLHttpRequest.DONE) { if (request.status >= 200 && request.status < 300) { @@ -26370,6 +27281,7 @@ var spine; if (!this.queueAsset(clientId, null, path)) return; var request = new XMLHttpRequest(); + request.overrideMimeType("text/html"); request.onreadystatechange = function () { if (request.readyState == XMLHttpRequest.DONE) { if (request.status >= 200 && request.status < 300) { @@ -26389,7 +27301,6 @@ var spine; if (!this.queueAsset(clientId, textureLoader, path)) return; var img = new Image(); - img.src = path; img.crossOrigin = "anonymous"; img.onload = function (ev) { _this.rawAssets[path] = img; @@ -26397,6 +27308,7 @@ var spine; img.onerror = function (ev) { _this.errors[path] = "Couldn't load image " + path; }; + img.src = path; }; SharedAssetManager.prototype.get = function (clientId, path) { path = this.pathPrefix + path; @@ -26922,6 +27834,8 @@ var spine; var input = new BinaryInput(binary); skeletonData.hash = input.readString(); skeletonData.version = input.readString(); + if ("3.8.75" == skeletonData.version) + throw new Error("Unsupported skeleton data, please export with a newer version of Spine."); skeletonData.x = input.readFloat(); skeletonData.y = input.readFloat(); skeletonData.width = input.readFloat(); @@ -27910,7 +28824,7 @@ var spine; var clippingPolygon = this.clippingPolygon; SkeletonClipping.makeClockwise(clippingPolygon); var clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon)); - for (var i = 0, n_1 = clippingPolygons.length; i < n_1; i++) { + for (var i = 0, n_2 = clippingPolygons.length; i < n_2; i++) { var polygon = clippingPolygons[i]; SkeletonClipping.makeClockwise(polygon); polygon.push(polygon[0]); @@ -28332,6 +29246,8 @@ var spine; if (skeletonMap != null) { skeletonData.hash = skeletonMap.hash; skeletonData.version = skeletonMap.spine; + if ("3.8.75" == skeletonData.version) + throw new Error("Unsupported skeleton data, please export with a newer version of Spine."); skeletonData.x = skeletonMap.x; skeletonData.y = skeletonMap.y; skeletonData.width = skeletonMap.width; @@ -29009,7 +29925,7 @@ var spine; skeletonData.animations.push(new spine.Animation(name, timelines, duration)); }; SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) { - if (!map.curve) + if (!map.hasOwnProperty("curve")) return; if (map.curve == "stepped") timeline.setStepped(frameIndex); @@ -30324,9 +31240,7 @@ var spine; }; Pool.prototype.freeAll = function (items) { for (var i = 0; i < items.length; i++) { - if (items[i].reset) - items[i].reset(); - this.items[i] = items[i]; + this.free(items[i]); } }; Pool.prototype.clear = function () { @@ -30868,7 +31782,7 @@ var spine; worldVertices[offset + 1] = offsetX * c + offsetY * d + y; }; RegionAttachment.prototype.copy = function () { - var copy = new RegionAttachment(name); + var copy = new RegionAttachment(this.name); copy.region = this.region; copy.rendererObject = this.rendererObject; copy.path = this.path; @@ -31372,6 +32286,8 @@ var spine; this.texture = this.context.gl.createTexture(); } this.bind(); + if (GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL) + gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false); gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this._image); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, useMipMaps ? gl.LINEAR_MIPMAP_LINEAR : gl.LINEAR); @@ -31401,6 +32317,7 @@ var spine; var gl = this.context.gl; gl.deleteTexture(this.texture); }; + GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL = false; return GLTexture; }(spine.Texture)); webgl.GLTexture = GLTexture; @@ -33130,11 +34047,11 @@ var spine; var nn = clip.worldVerticesLength; var world = this.temp = spine.Utils.setArraySize(this.temp, nn, 0); clip.computeWorldVertices(slot, 0, nn, world, 0, 2); - for (var i_16 = 0, n_2 = world.length; i_16 < n_2; i_16 += 2) { - var x = world[i_16]; - var y = world[i_16 + 1]; - var x2 = world[(i_16 + 2) % world.length]; - var y2 = world[(i_16 + 3) % world.length]; + for (var i_17 = 0, n_3 = world.length; i_17 < n_3; i_17 += 2) { + var x = world[i_17]; + var y = world[i_17 + 1]; + var x2 = world[(i_17 + 2) % world.length]; + var y2 = world[(i_17 + 3) % world.length]; shapes.line(x, y, x2, y2); } } @@ -33295,7 +34212,7 @@ var spine; var vertexEffect = this.vertexEffect; var verts = clippedVertices; if (!twoColorTint) { - for (var v = 0, n_3 = clippedVertices.length; v < n_3; v += vertexSize) { + for (var v = 0, n_4 = clippedVertices.length; v < n_4; v += vertexSize) { tempPos.x = verts[v]; tempPos.y = verts[v + 1]; tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]); @@ -33314,7 +34231,7 @@ var spine; } } else { - for (var v = 0, n_4 = clippedVertices.length; v < n_4; v += vertexSize) { + for (var v = 0, n_5 = clippedVertices.length; v < n_5; v += vertexSize) { tempPos.x = verts[v]; tempPos.y = verts[v + 1]; tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]); @@ -33344,7 +34261,7 @@ var spine; if (this.vertexEffect != null) { var vertexEffect = this.vertexEffect; if (!twoColorTint) { - for (var v = 0, u = 0, n_5 = renderable.numFloats; v < n_5; v += vertexSize, u += 2) { + for (var v = 0, u = 0, n_6 = renderable.numFloats; v < n_6; v += vertexSize, u += 2) { tempPos.x = verts[v]; tempPos.y = verts[v + 1]; tempUv.x = uvs[u]; @@ -33363,7 +34280,7 @@ var spine; } } else { - for (var v = 0, u = 0, n_6 = renderable.numFloats; v < n_6; v += vertexSize, u += 2) { + for (var v = 0, u = 0, n_7 = renderable.numFloats; v < n_7; v += vertexSize, u += 2) { tempPos.x = verts[v]; tempPos.y = verts[v + 1]; tempUv.x = uvs[u]; @@ -33388,7 +34305,7 @@ var spine; } else { if (!twoColorTint) { - for (var v = 2, u = 0, n_7 = renderable.numFloats; v < n_7; v += vertexSize, u += 2) { + for (var v = 2, u = 0, n_8 = renderable.numFloats; v < n_8; v += vertexSize, u += 2) { verts[v] = finalColor.r; verts[v + 1] = finalColor.g; verts[v + 2] = finalColor.b; @@ -33398,7 +34315,7 @@ var spine; } } else { - for (var v = 2, u = 0, n_8 = renderable.numFloats; v < n_8; v += vertexSize, u += 2) { + for (var v = 2, u = 0, n_9 = renderable.numFloats; v < n_9; v += vertexSize, u += 2) { verts[v] = finalColor.r; verts[v + 1] = finalColor.g; verts[v + 2] = finalColor.b; @@ -33589,11 +34506,12 @@ var spine; })(webgl = spine.webgl || (spine.webgl = {})); })(spine || (spine = {})); //# sourceMappingURL=spine-both.js.map - /*** EXPORTS FROM exports-loader ***/ module.exports = spine; + }.call(window)); + /***/ }) /******/ }); diff --git a/plugins/spine/dist/SpinePluginDebug.js.map b/plugins/spine/dist/SpinePluginDebug.js.map index 25e60225b..0f700eb41 100644 --- a/plugins/spine/dist/SpinePluginDebug.js.map +++ b/plugins/spine/dist/SpinePluginDebug.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///D:/wamp/www/phaser/node_modules/eventemitter3/index.js","webpack:///D:/wamp/www/phaser/src/data/DataManager.js","webpack:///D:/wamp/www/phaser/src/data/events/CHANGE_DATA_EVENT.js","webpack:///D:/wamp/www/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js","webpack:///D:/wamp/www/phaser/src/data/events/REMOVE_DATA_EVENT.js","webpack:///D:/wamp/www/phaser/src/data/events/SET_DATA_EVENT.js","webpack:///D:/wamp/www/phaser/src/data/events/index.js","webpack:///D:/wamp/www/phaser/src/gameobjects/BuildGameObject.js","webpack:///D:/wamp/www/phaser/src/gameobjects/GameObject.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/ComputedSize.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Depth.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Flip.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/ScrollFactor.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/ToJSON.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Transform.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/TransformMatrix.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Visible.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/DESTROY_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_CREATED_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_ERROR_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_LOOP_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_PLAY_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_SEEKED_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_SEEKING_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_STOP_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/index.js","webpack:///D:/wamp/www/phaser/src/loader/File.js","webpack:///D:/wamp/www/phaser/src/loader/FileTypesManager.js","webpack:///D:/wamp/www/phaser/src/loader/GetURL.js","webpack:///D:/wamp/www/phaser/src/loader/MergeXHRSettings.js","webpack:///D:/wamp/www/phaser/src/loader/MultiFile.js","webpack:///D:/wamp/www/phaser/src/loader/XHRLoader.js","webpack:///D:/wamp/www/phaser/src/loader/XHRSettings.js","webpack:///D:/wamp/www/phaser/src/loader/const.js","webpack:///D:/wamp/www/phaser/src/loader/events/ADD_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/FILE_COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/FILE_LOAD_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/FILE_PROGRESS_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/POST_PROCESS_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/PROGRESS_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/START_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/index.js","webpack:///D:/wamp/www/phaser/src/loader/filetypes/ImageFile.js","webpack:///D:/wamp/www/phaser/src/loader/filetypes/JSONFile.js","webpack:///D:/wamp/www/phaser/src/loader/filetypes/TextFile.js","webpack:///D:/wamp/www/phaser/src/math/Average.js","webpack:///D:/wamp/www/phaser/src/math/Bernstein.js","webpack:///D:/wamp/www/phaser/src/math/Between.js","webpack:///D:/wamp/www/phaser/src/math/CatmullRom.js","webpack:///D:/wamp/www/phaser/src/math/CeilTo.js","webpack:///D:/wamp/www/phaser/src/math/Clamp.js","webpack:///D:/wamp/www/phaser/src/math/DegToRad.js","webpack:///D:/wamp/www/phaser/src/math/Difference.js","webpack:///D:/wamp/www/phaser/src/math/Factorial.js","webpack:///D:/wamp/www/phaser/src/math/FloatBetween.js","webpack:///D:/wamp/www/phaser/src/math/FloorTo.js","webpack:///D:/wamp/www/phaser/src/math/FromPercent.js","webpack:///D:/wamp/www/phaser/src/math/GetSpeed.js","webpack:///D:/wamp/www/phaser/src/math/IsEven.js","webpack:///D:/wamp/www/phaser/src/math/IsEvenStrict.js","webpack:///D:/wamp/www/phaser/src/math/Linear.js","webpack:///D:/wamp/www/phaser/src/math/Matrix3.js","webpack:///D:/wamp/www/phaser/src/math/Matrix4.js","webpack:///D:/wamp/www/phaser/src/math/MaxAdd.js","webpack:///D:/wamp/www/phaser/src/math/MinSub.js","webpack:///D:/wamp/www/phaser/src/math/Percent.js","webpack:///D:/wamp/www/phaser/src/math/Quaternion.js","webpack:///D:/wamp/www/phaser/src/math/RadToDeg.js","webpack:///D:/wamp/www/phaser/src/math/RandomXY.js","webpack:///D:/wamp/www/phaser/src/math/RandomXYZ.js","webpack:///D:/wamp/www/phaser/src/math/RandomXYZW.js","webpack:///D:/wamp/www/phaser/src/math/Rotate.js","webpack:///D:/wamp/www/phaser/src/math/RotateAround.js","webpack:///D:/wamp/www/phaser/src/math/RotateAroundDistance.js","webpack:///D:/wamp/www/phaser/src/math/RotateVec3.js","webpack:///D:/wamp/www/phaser/src/math/RoundAwayFromZero.js","webpack:///D:/wamp/www/phaser/src/math/RoundTo.js","webpack:///D:/wamp/www/phaser/src/math/SinCosTableGenerator.js","webpack:///D:/wamp/www/phaser/src/math/SmoothStep.js","webpack:///D:/wamp/www/phaser/src/math/SmootherStep.js","webpack:///D:/wamp/www/phaser/src/math/ToXY.js","webpack:///D:/wamp/www/phaser/src/math/TransformXY.js","webpack:///D:/wamp/www/phaser/src/math/Vector2.js","webpack:///D:/wamp/www/phaser/src/math/Vector3.js","webpack:///D:/wamp/www/phaser/src/math/Vector4.js","webpack:///D:/wamp/www/phaser/src/math/Within.js","webpack:///D:/wamp/www/phaser/src/math/Wrap.js","webpack:///D:/wamp/www/phaser/src/math/angle/Between.js","webpack:///D:/wamp/www/phaser/src/math/angle/BetweenPoints.js","webpack:///D:/wamp/www/phaser/src/math/angle/BetweenPointsY.js","webpack:///D:/wamp/www/phaser/src/math/angle/BetweenY.js","webpack:///D:/wamp/www/phaser/src/math/angle/CounterClockwise.js","webpack:///D:/wamp/www/phaser/src/math/angle/Normalize.js","webpack:///D:/wamp/www/phaser/src/math/angle/Reverse.js","webpack:///D:/wamp/www/phaser/src/math/angle/RotateTo.js","webpack:///D:/wamp/www/phaser/src/math/angle/ShortestBetween.js","webpack:///D:/wamp/www/phaser/src/math/angle/Wrap.js","webpack:///D:/wamp/www/phaser/src/math/angle/WrapDegrees.js","webpack:///D:/wamp/www/phaser/src/math/angle/index.js","webpack:///D:/wamp/www/phaser/src/math/const.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistanceBetween.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistancePower.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistanceSquared.js","webpack:///D:/wamp/www/phaser/src/math/distance/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/back/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/back/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/back/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/back/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/bounce/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/bounce/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/bounce/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/bounce/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/circular/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/circular/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/circular/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/circular/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/cubic/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/cubic/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/cubic/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/cubic/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/elastic/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/elastic/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/elastic/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/elastic/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/expo/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/expo/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/expo/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/expo/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/linear/Linear.js","webpack:///D:/wamp/www/phaser/src/math/easing/linear/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/quadratic/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/quadratic/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/quadratic/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/quadratic/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/quartic/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/quartic/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/quartic/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/quartic/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/quintic/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/quintic/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/quintic/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/quintic/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/sine/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/sine/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/sine/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/sine/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/stepped/Stepped.js","webpack:///D:/wamp/www/phaser/src/math/easing/stepped/index.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/Ceil.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/Equal.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/Floor.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/GreaterThan.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/LessThan.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/index.js","webpack:///D:/wamp/www/phaser/src/math/index.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/BezierInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/CatmullRomInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/CubicBezierInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/LinearInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/QuadraticBezierInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/SmoothStepInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/SmootherStepInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/index.js","webpack:///D:/wamp/www/phaser/src/math/pow2/GetPowerOfTwo.js","webpack:///D:/wamp/www/phaser/src/math/pow2/IsSizePowerOfTwo.js","webpack:///D:/wamp/www/phaser/src/math/pow2/IsValuePowerOfTwo.js","webpack:///D:/wamp/www/phaser/src/math/pow2/index.js","webpack:///D:/wamp/www/phaser/src/math/random-data-generator/RandomDataGenerator.js","webpack:///D:/wamp/www/phaser/src/math/snap/SnapCeil.js","webpack:///D:/wamp/www/phaser/src/math/snap/SnapFloor.js","webpack:///D:/wamp/www/phaser/src/math/snap/SnapTo.js","webpack:///D:/wamp/www/phaser/src/math/snap/index.js","webpack:///D:/wamp/www/phaser/src/plugins/BasePlugin.js","webpack:///D:/wamp/www/phaser/src/plugins/ScenePlugin.js","webpack:///D:/wamp/www/phaser/src/renderer/BlendModes.js","webpack:///D:/wamp/www/phaser/src/scale/events/RESIZE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/BOOT_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/CREATE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/DESTROY_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/PAUSE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/POST_UPDATE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/PRE_UPDATE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/READY_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/RENDER_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/RESUME_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/SHUTDOWN_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/SLEEP_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/START_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/TRANSITION_INIT_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/TRANSITION_OUT_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/TRANSITION_START_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/UPDATE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/WAKE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/index.js","webpack:///D:/wamp/www/phaser/src/utils/Class.js","webpack:///D:/wamp/www/phaser/src/utils/NOOP.js","webpack:///D:/wamp/www/phaser/src/utils/object/Extend.js","webpack:///D:/wamp/www/phaser/src/utils/object/GetAdvancedValue.js","webpack:///D:/wamp/www/phaser/src/utils/object/GetFastValue.js","webpack:///D:/wamp/www/phaser/src/utils/object/GetValue.js","webpack:///D:/wamp/www/phaser/src/utils/object/IsPlainObject.js","webpack:///./SpineFile.js","webpack:///./SpinePlugin.js","webpack:///./events/COMPLETE_EVENT.js","webpack:///./events/DISPOSE_EVENT.js","webpack:///./events/END_EVENT.js","webpack:///./events/EVENT_EVENT.js","webpack:///./events/INTERRUPTED_EVENT.js","webpack:///./events/START_EVENT.js","webpack:///./events/index.js","webpack:///./gameobject/SpineGameObject.js","webpack:///./gameobject/SpineGameObjectCanvasRenderer.js","webpack:///./gameobject/SpineGameObjectRender.js","webpack:///./gameobject/SpineGameObjectWebGLRenderer.js","webpack:///./runtimes/spine-both.js"],"names":[],"mappings":";;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;;AClFa;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,yDAAyD,OAAO;AAChE;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yCAAyC,SAAS;AAClD;AACA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA,eAAe,YAAY;AAC3B;;AAEA;AACA,2DAA2D;AAC3D,+DAA+D;AAC/D,mEAAmE;AACnE,uEAAuE;AACvE;AACA,0DAA0D,SAAS;AACnE;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,aAAa,aAAa;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,2DAA2D,YAAY;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,aAAa;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI,IAA6B;AACjC;AACA;;;;;;;;;;;;AC/UA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,aAAa,mBAAO,CAAC,mDAAU;;AAE/B;AACA;AACA;AACA,WAAW,EAAE;AACb,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,KAAK;AAChB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,2BAA2B;AACtC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2BAA2B,gBAAgB;AAC3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,2DAA2D;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,EAAE;AACjB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,aAAa;;AAEb;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,EAAE;AACjB,eAAe,KAAK;AACpB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;;AAEA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA,sCAAsC,kBAAkB;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC1nBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA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AW,OAAO;AAClB;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,2DAA2D;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4CAA4C;AAC3D,eAAe,mCAAmC;AAClD,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wCAAwC;AACxD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA,sCAAsC,mBAAmB;;AAEzD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1nBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC9IA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC7JA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA,YAAY,wCAAwC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,sBAAsB,mBAAO,CAAC,iFAAmB;AACjD,gBAAgB,mBAAO,CAAC,8DAAuB;AAC/C,uBAAuB,mBAAO,CAAC,4EAA8B;;AAE7D;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,kCAAkC,oCAAoC;AACtE,mCAAmC,sCAAsC;;AAEzE;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,8CAA8C;AAC9D;AACA;AACA;AACA,uCAAuC,oCAAoC;;AAE3E;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,8CAA8C;AAC9D;AACA;AACA;AACA,uCAAuC,oCAAoC;AAC3E,yCAAyC,sCAAsC;;AAE/E;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC/gBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;;AAEvC;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,8CAA8C;AAC9D;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,kCAAkC,UAAU,cAAc;;AAE1D;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,mCAAmC,wBAAwB;;AAE3D;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACj8BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,MAAM;AACjB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,aAAa,mBAAO,CAAC,yEAAiB;AACtC,oBAAoB,mBAAO,CAAC,uFAAwB;AACpD,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,iBAAiB,mBAAO,CAAC,iFAAqB;AAC9C,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,kBAAkB,mBAAO,CAAC,mFAAsB;AAChD,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,oBAAoB,mBAAO,CAAC,uFAAwB;;AAEpD;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;AAC/B,mBAAmB,mBAAO,CAAC,+EAA8B;AACzD,aAAa,mBAAO,CAAC,+CAAU;AAC/B,uBAAuB,mBAAO,CAAC,mEAAoB;AACnD,gBAAgB,mBAAO,CAAC,qDAAa;AACrC,kBAAkB,mBAAO,CAAC,yDAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,+BAA+B;AAC1C;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA,4GAA4G;AAC5G;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,2DAA2D;;AAE3D;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B,eAAe,cAAc;AAC7B;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B,eAAe,cAAc;AAC7B;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,kBAAkB;;AAEnD;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iEAAiE;AACjE;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,eAAe,2BAA2B;AAC1C;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACthBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2BAA2B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC9DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,mEAAwB;AAC7C,kBAAkB,mBAAO,CAAC,yDAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,sCAAsC;AACjD;AACA,YAAY,sCAAsC;AAClD;AACA;AACA;AACA,mEAAmE;;AAEnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACnOA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,uBAAuB,mBAAO,CAAC,mEAAoB;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,sCAAsC;AACjD;AACA,YAAY,eAAe;AAC3B;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,sCAAsC;AAClD;AACA;AACA;AACA,qCAAqC,mBAAmB;AACxD,8BAA8B,cAAc;AAC5C,6BAA6B,WAAW;AACxC,iCAAiC,eAAe;AAChD,gCAAgC,aAAa;;AAE7C;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACjJA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,2BAA2B;AACtC,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,uDAAuD;AACjJ;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,oFAAoF,mDAAmD;AACvI;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;AC/CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;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A;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uGAAuG;AAClH,WAAW,gBAAgB;AAC3B,WAAW,sCAAsC;AACjD;AACA,YAAY,2BAA2B;AACvC;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;;;;;;;;;;;AC3QA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,eAAe,mBAAO,CAAC,0EAA6B;AACpD,oBAAoB,mBAAO,CAAC,oFAAkC;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,sDAAsD;AACjE,WAAW,OAAO;AAClB,WAAW,sCAAsC;AACjD,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA,QAAQ;AACR,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qGAAqG;AAChH,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,sCAAsC;AACjD;AACA,YAAY,2BAA2B;AACvC;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;;;;;;;;;;;AC/NA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,oBAAoB,mBAAO,CAAC,oFAAkC;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,sDAAsD;AACjE,WAAW,OAAO;AAClB,WAAW,sCAAsC;AACjD;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qGAAqG;AAChH,WAAW,OAAO;AAClB,WAAW,sCAAsC;AACjD;AACA,YAAY,2BAA2B;AACvC;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;;;;;;;;;;;ACxKA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,mDAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,6BAA6B,WAAW;;AAExC;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,6BAA6B,WAAW;;AAExC;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC1kBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;;AAEA;;;;;;;;;;;;AC/6CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,4BAA4B,eAAe;;AAE3C;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,4CAA4C;;AAE5C;;AAEA,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC7vBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,+BAA+B,YAAY;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,qDAAiB;AACvC,cAAc,mBAAO,CAAC,qDAAiB;AACvC,iBAAiB,mBAAO,CAAC,2DAAoB;;AAE7C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,6BAA6B,WAAW;;AAExC;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA;AACA,+BAA+B,YAAY;AAC3C,+BAA+B,YAAY;AAC3C,kCAAkC,eAAe;;AAEjD;;AAEA;AACA;;AAEA,mBAAmB,YAAY;AAC/B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,6BAA6B;AAC9E;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,oBAAoB;AAC/B;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,4BAA4B,qBAAqB;;AAEjD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,+CAA+C;AAC1D;AACA,YAAY,+CAA+C;AAC3D;AACA;AACA;AACA,+BAA+B,wBAAwB;;AAEvD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,OAAO;;AAEzC;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,6BAA6B,YAAY;;AAEzC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;;;;;;;;;;;;ACxnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;;;;;;;;;;;;ACnyBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1hBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,2BAA2B;AACtC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA,2CAA2C,sCAAsC;AACjF;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,2BAA2B;AACtC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA,2CAA2C,gCAAgC;AAC3E;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,4CAAU;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,yDAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,4CAAU;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,6BAA6B,aAAa;;AAE1C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;AC1CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,0CAAS;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,WAAW,mBAAO,CAAC,0CAAS;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,aAAa,mBAAO,CAAC,qDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAiB;AAC5C,oBAAoB,mBAAO,CAAC,mEAAkB;AAC9C,cAAc,mBAAO,CAAC,uDAAY;AAClC,sBAAsB,mBAAO,CAAC,uEAAoB;AAClD,eAAe,mBAAO,CAAC,yDAAa;AACpC,aAAa,mBAAO,CAAC,qDAAW;AAChC,cAAc,mBAAO,CAAC,uDAAY;AAClC,qBAAqB,mBAAO,CAAC,qEAAmB;AAChD,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,iBAAiB,mBAAO,CAAC,6DAAe;;AAExC;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACjEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,4BAA4B,SAAS;;AAErC;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,aAAa,mBAAO,CAAC,wEAAmB;AACxC,WAAW,mBAAO,CAAC,oEAAiB;AACpC,aAAa,mBAAO,CAAC,wEAAmB;;AAExC;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,qBAAqB;;AAEvD;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,qBAAqB;;AAEvD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,qBAAqB;;AAEvD;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,mDAAM;AACtB,SAAS,mBAAO,CAAC,qDAAO;AACxB,WAAW,mBAAO,CAAC,yDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,qDAAM;AACtB,SAAS,mBAAO,CAAC,uDAAO;AACxB,WAAW,mBAAO,CAAC,2DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,kDAAM;AACtB,SAAS,mBAAO,CAAC,oDAAO;AACxB,WAAW,mBAAO,CAAC,wDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD,+BAA+B,cAAc;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD,+BAA+B,cAAc;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD,+BAA+B,cAAc;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,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AClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,sDAAM;AACtB,SAAS,mBAAO,CAAC,wDAAO;AACxB,WAAW,mBAAO,CAAC,4DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA,iBAAiB,mBAAO,CAAC,8DAAW;;;;;;;;;;;;ACVpC;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,gCAAgC,kBAAkB;;AAElD;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,gCAAgC,kBAAkB;;AAElD;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,gCAAgC,kBAAkB;;AAElD;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;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;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,oDAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,QAAQ;AAC3B;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,sDAAe;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,8CAAW;;AAEhC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA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AAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,aAAa,mBAAO,CAAC,gEAAiB;AACtC,YAAY,mBAAO,CAAC,sEAAoB;AACxC,aAAa,mBAAO,CAAC,wEAAqB;;AAE1C;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;;AAEA;;AAEA;AACA;AACA,kCAAkC,qDAAqD;;AAEvF;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,oEAAoE;;AAEpE;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;;AAEA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;;AAEA;;AAEA,kDAAkD;AAClD,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,wCAAwC;AAC/D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA,wBAAwB,UAAU;AAClC;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;;AAEA,yBAAyB,OAAO;AAChC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC5eA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,UAAU,mBAAO,CAAC,sDAAY;AAC9B,WAAW,mBAAO,CAAC,wDAAa;AAChC,QAAQ,mBAAO,CAAC,kDAAU;;AAE1B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,6BAA6B;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,4DAA4D,sCAAsC;AAClG;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC3HA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA,iBAAiB,mBAAO,CAAC,wDAAc;AACvC,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,2DAAiB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,6BAA6B;AACxC;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,mCAAmC,wCAAwC;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACzHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5UA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,6CAA6C;AACpF;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;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AC,yEAAoB;AAC5C,WAAW,mBAAO,CAAC,+DAAe;AAClC,YAAY,mBAAO,CAAC,iEAAgB;AACpC,YAAY,mBAAO,CAAC,iEAAgB;AACpC,cAAc,mBAAO,CAAC,qEAAkB;AACxC,WAAW,mBAAO,CAAC,+DAAe;AAClC,WAAW,mBAAO,CAAC,+DAAe;AAClC,yBAAyB,mBAAO,CAAC,2FAA6B;AAC9D,qBAAqB,mBAAO,CAAC,mFAAyB;AACtD,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,sBAAsB,mBAAO,CAAC,qFAA0B;AACxD,qBAAqB,mBAAO,CAAC,mFAAyB;AACtD,YAAY,mBAAO,CAAC,iEAAgB;AACpC,UAAU,mBAAO,CAAC,6DAAc;;AAEhC;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvPA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,oBAAoB,mBAAO,CAAC,mEAAiB;;AAE7C,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,YAAY,OAAO;;AAEnB;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,UAAU,YAAY;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,WAAW,mBAAO,CAAC,8CAAY;AAC/B,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA,8CAA8C,aAAa,qBAAqB;AAChF;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb;AACA,YAAY,EAAE,oBAAoB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB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A;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,+BAA+B,oBAAoB;AACnD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,+BAA+B,qBAAqB;AACpD;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,2BAA2B,uBAAuB;AAClD;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,sCAAsC,kEAAkE;;AAExG;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACxPA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,sBAAsB,mBAAO,CAAC,6FAA0C;AACxE,YAAY,mBAAO,CAAC,6DAA0B;AAC9C,eAAe,mBAAO,CAAC,iFAAoC;AAC3D,kBAAkB,mBAAO,CAAC,yFAAwC;AAClE,kBAAkB,mBAAO,CAAC,6EAAkC;AAC5D,YAAY,mBAAO,CAAC,uCAAO;AAC3B,gBAAgB,mBAAO,CAAC,mCAAa;AACrC,sBAAsB,mBAAO,CAAC,qEAA8B;;AAE5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,6BAA6B;AACxC;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qGAAqG;AACpH,eAAe,OAAO;AACtB,eAAe,gBAAgB;AAC/B,eAAe,QAAQ;AACvB,eAAe,sCAAsC;AACrD,eAAe,sCAAsC;AACrD;AACA,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,eAAe;AAC9B,eAAe,WAAW;AAC1B;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;;AAEA;;AAEA,gBAAgB;AAChB,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;AACA;;AAEA;;AAEA,gBAAgB;AAChB,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,gBAAgB;AAC5B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,QAAQ;AACnB;AACA,YAAY,gBAAgB;AAC5B;;AAEA;;;;;;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;AACtD,iBAAiB,mBAAO,CAAC,sFAAwC;AACjE,eAAe,mBAAO,CAAC,oEAA+B;AACtD,kBAAkB,mBAAO,CAAC,qCAAY;AACtC,4BAA4B,mBAAO,CAAC,sEAAyB;;AAE7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,YAAY;AACvB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,kBAAkB;;AAEpD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB,eAAe,YAAY;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,kCAAkC,6BAA6B;AAC/D,mCAAmC,+BAA+B;AAClE,oCAAoC,aAAa;AACjD,oCAAoC,aAAa;;AAEjD;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,oCAAoC,aAAa;AACjD,oCAAoC,aAAa;;AAEjD;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA,uBAAuB,2BAA2B;AAClD;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,oCAAoC;AAC/D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,uCAAuC,gBAAgB;;AAEvD;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C,4CAA4C,yBAAyB;;AAErE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA,2BAA2B,qBAAqB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,YAAY;AAC/C,qCAAqC,cAAc;AACnD,qCAAqC,gBAAgB;;AAErD;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACjjDA;AACA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AgB;AAC3B,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpKA;AACA;;AAEA;AACA;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,uDAAuD;AACpF;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA,kCAAkC,UAAU;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,mDAAmD;AACxD;AACA;AACA;AACA;AACA,KAAK,+DAA+D;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,+DAA+D;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,OAAO;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,OAAO;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,iBAAiB;AAC5D;AACA;AACA;AACA;AACA,2CAA2C,iBAAiB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,mBAAmB;AAC5D;AACA;AACA;AACA;AACA;AACA,yCAAyC,mBAAmB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,oBAAoB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,oBAAoB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,6CAA6C;AAC/D;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,OAAO;AACxE;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,yBAAyB,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,oBAAoB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,oBAAoB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,gDAAgD,QAAQ;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA;AACA;AACA,kCAAkC,oBAAoB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,cAAc;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,sDAAsD;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA,wCAAwC,iBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yGAAyG;AACzG;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,qGAAqG;AACrG;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,2DAA2D,0BAA0B;AACrF;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,sDAAsD;AAC3D,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,kEAAkE;AACvE,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,OAAO;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,iBAAiB;AACpD;AACA;AACA;AACA,iDAAiD,iBAAiB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,gBAAgB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA,0DAA0D,iBAAiB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK,+DAA+D;AACpE;AACA;AACA;AACA;AACA;AACA,KAAK,4DAA4D;AACjE;AACA;AACA;AACA;AACA;AACA,KAAK,yDAAyD;AAC9D,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,wCAAwC,iBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,gCAAgC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;AACA,2BAA2B,sCAAsC;AACjE;AACA;AACA;AACA;AACA,2BAA2B,iCAAiC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,OAAO;AAClE;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qBAAqB;AACvD,gCAAgC,cAAc;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,qBAAqB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,eAAe;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,eAAe;AAC9C;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qBAAqB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,OAAO;AAC7B;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA,wDAAwD,OAAO;AAC/D;AACA,wDAAwD,OAAO;AAC/D;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,OAAO;AACtC;AACA;AACA;AACA,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA;AACA;AACA,wCAAwC,yBAAyB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA;AACA;AACA,wCAAwC,yBAAyB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA,0DAA0D,SAAS;AACnE;AACA,gEAAgE,WAAW;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,yBAAyB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,SAAS;AAChE;AACA;AACA;AACA,uDAAuD,SAAS;AAChE;AACA;AACA;AACA,uEAAuE,QAAQ;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;AACA;AACA;AACA,oCAAoC,kBAAkB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,qCAAqC,uBAAuB;AAC5D,mCAAmC,WAAW;AAC9C,oCAAoC,oCAAoC;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,mCAAmC,cAAc;AACjD,sCAAsC,iBAAiB;AACvD;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA,qDAAqD,SAAS;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qBAAqB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,sBAAsB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA,gCAAgC,0BAA0B;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,OAAO;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,OAAO;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,2BAA2B;AAC1D;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA,wCAAwC,2BAA2B;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,wBAAwB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,+BAA+B;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,0BAA0B;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,OAAO;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,wBAAwB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA,gDAAgD,QAAQ;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0BAA0B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0BAA0B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yFAAyF,OAAO;AAChG;AACA;AACA;AACA,uDAAuD,kBAAkB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,0BAA0B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,oBAAoB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6BAA6B;AACxD;AACA;AACA,+BAA+B,6BAA6B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,wBAAwB;AACnD;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6BAA6B;AACxD;AACA;AACA,+BAA+B,6BAA6B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,wBAAwB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6BAA6B;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,kEAAkE;AACvE;AACA;AACA;AACA;AACA;AACA,KAAK,4DAA4D;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E;AAC5E,kEAAkE;AAClE,qDAAqD;AACrD;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,yBAAyB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,gBAAgB;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,oDAAoD,+BAA+B;AACnF;AACA;AACA;AACA;AACA,mCAAmC,WAAW;AAC9C;AACA;AACA;AACA;AACA;AACA,qCAAqC,UAAU;AAC/C;AACA;AACA;AACA;AACA;AACA,mCAAmC,WAAW;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,UAAU;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,iBAAiB;AACvD,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,wCAAwC,iBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,wBAAwB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,WAAW;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,WAAW;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,WAAW;AAC7D;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,WAAW;AAC5E;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,qEAAqE;AAC1E,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,iBAAiB;AAC7D,2DAA2D,8CAA8C,EAAE;AAC3G;AACA;AACA,SAAS;AACT;AACA,KAAK,6CAA6C;AAClD,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kFAAkF;AAClF,wEAAwE;AACxE,2DAA2D;AAC3D;AACA,SAAS;AACT;AACA,KAAK,6CAA6C;AAClD,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,sBAAsB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,OAAO;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,6CAA6C;AAClD,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,iBAAiB;AAC7D;AACA;AACA,iBAAiB;AACjB;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,oBAAoB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,UAAU;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,wBAAwB;AAChF,sDAAsD,sDAAsD;AAC5G,sDAAsD,qDAAqD;AAC3G;AACA;AACA;AACA;AACA,sDAAsD,sBAAsB;AAC5E,qDAAqD,4BAA4B;AACjF,qDAAqD,2BAA2B;AAChF;AACA;AACA;AACA;AACA,qDAAqD,qBAAqB;AAC1E;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,sCAAsC,UAAU;AAChD;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS,oFAAoF;AAC7F,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE,6CAA6C,qBAAqB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,oBAAoB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,uBAAuB;AACxF;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF,gDAAgD,qBAAqB;AACrE,8CAA8C,mBAAmB;AACjE;AACA;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,0CAA0C,cAAc;AACxD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,yDAAyD;AAClE,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,qBAAqB;AAC5E,4DAA4D,0BAA0B;AACtF,8DAA8D,4BAA4B;AAC1F,kEAAkE,sBAAsB;AACxF,8DAA8D,sBAAsB;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,8CAA8C,kDAAkD,iDAAiD,+BAA+B,mCAAmC,0BAA0B,2CAA2C,mDAAmD,8EAA8E,WAAW;AAC/e,iHAAiH,2FAA2F,mCAAmC,sCAAsC,0BAA0B,uEAAuE,WAAW;AACjY;AACA;AACA;AACA,2EAA2E,8CAA8C,+CAA+C,kDAAkD,iDAAiD,+BAA+B,8BAA8B,mCAAmC,0BAA0B,2CAA2C,2CAA2C,mDAAmD,8EAA8E,WAAW;AACvmB,iHAAiH,2FAA2F,mCAAmC,mCAAmC,sCAAsC,0BAA0B,8DAA8D,oDAAoD,8HAA8H,WAAW;AAC7kB;AACA;AACA;AACA,2EAA2E,8CAA8C,iDAAiD,+BAA+B,0BAA0B,2CAA2C,8EAA8E,WAAW;AACvW,iHAAiH,2FAA2F,0BAA0B,mCAAmC,WAAW;AACpR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,qBAAqB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,0CAA0C,cAAc;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,sDAAsD;AAC/D,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,SAAS;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,SAAS;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,YAAY;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,qBAAqB;AACrE,8CAA8C,mBAAmB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,SAAS;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,SAAS;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,OAAO;AAC1C,mCAAmC,OAAO;AAC1C,mCAAmC,OAAO;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,kBAAkB,iBAAiB;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,qEAAqE,OAAO;AAC5E;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;;AAEA;AACA;AACA,CAAC,e","file":"SpinePluginDebug.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./SpinePlugin.js\");\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Events = require('./events');\r\n\r\n/**\r\n * @callback DataEachCallback\r\n *\r\n * @param {*} parent - The parent object of the DataManager.\r\n * @param {string} key - The key of the value.\r\n * @param {*} value - The value.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The Data Manager Component features a means to store pieces of data specific to a Game Object, System or Plugin.\r\n * You can then search, query it, and retrieve the data. The parent must either extend EventEmitter,\r\n * or have a property called `events` that is an instance of it.\r\n *\r\n * @class DataManager\r\n * @memberof Phaser.Data\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {object} parent - The object that this DataManager belongs to.\r\n * @param {Phaser.Events.EventEmitter} eventEmitter - The DataManager's event emitter.\r\n */\r\nvar DataManager = new Class({\r\n\r\n initialize:\r\n\r\n function DataManager (parent, eventEmitter)\r\n {\r\n /**\r\n * The object that this DataManager belongs to.\r\n *\r\n * @name Phaser.Data.DataManager#parent\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.parent = parent;\r\n\r\n /**\r\n * The DataManager's event emitter.\r\n *\r\n * @name Phaser.Data.DataManager#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events = eventEmitter;\r\n\r\n if (!eventEmitter)\r\n {\r\n this.events = (parent.events) ? parent.events : parent;\r\n }\r\n\r\n /**\r\n * The data list.\r\n *\r\n * @name Phaser.Data.DataManager#list\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.0.0\r\n */\r\n this.list = {};\r\n\r\n /**\r\n * The public values list. You can use this to access anything you have stored\r\n * in this Data Manager. For example, if you set a value called `gold` you can\r\n * access it via:\r\n *\r\n * ```javascript\r\n * this.data.values.gold;\r\n * ```\r\n *\r\n * You can also modify it directly:\r\n * \r\n * ```javascript\r\n * this.data.values.gold += 1000;\r\n * ```\r\n *\r\n * Doing so will emit a `setdata` event from the parent of this Data Manager.\r\n * \r\n * Do not modify this object directly. Adding properties directly to this object will not\r\n * emit any events. Always use `DataManager.set` to create new items the first time around.\r\n *\r\n * @name Phaser.Data.DataManager#values\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.10.0\r\n */\r\n this.values = {};\r\n\r\n /**\r\n * Whether setting data is frozen for this DataManager.\r\n *\r\n * @name Phaser.Data.DataManager#_frozen\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._frozen = false;\r\n\r\n if (!parent.hasOwnProperty('sys') && this.events)\r\n {\r\n this.events.once('destroy', this.destroy, this);\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves the value for the given key, or undefined if it doesn't exist.\r\n *\r\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\r\n * \r\n * ```javascript\r\n * this.data.get('gold');\r\n * ```\r\n *\r\n * Or access the value directly:\r\n * \r\n * ```javascript\r\n * this.data.values.gold;\r\n * ```\r\n *\r\n * You can also pass in an array of keys, in which case an array of values will be returned:\r\n * \r\n * ```javascript\r\n * this.data.get([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * This approach is useful for destructuring arrays in ES6.\r\n *\r\n * @method Phaser.Data.DataManager#get\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\r\n *\r\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\r\n */\r\n get: function (key)\r\n {\r\n var list = this.list;\r\n\r\n if (Array.isArray(key))\r\n {\r\n var output = [];\r\n\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n output.push(list[key[i]]);\r\n }\r\n\r\n return output;\r\n }\r\n else\r\n {\r\n return list[key];\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves all data values in a new object.\r\n *\r\n * @method Phaser.Data.DataManager#getAll\r\n * @since 3.0.0\r\n *\r\n * @return {Object.} All data values.\r\n */\r\n getAll: function ()\r\n {\r\n var results = {};\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list.hasOwnProperty(key))\r\n {\r\n results[key] = this.list[key];\r\n }\r\n }\r\n\r\n return results;\r\n },\r\n\r\n /**\r\n * Queries the DataManager for the values of keys matching the given regular expression.\r\n *\r\n * @method Phaser.Data.DataManager#query\r\n * @since 3.0.0\r\n *\r\n * @param {RegExp} search - A regular expression object. If a non-RegExp object obj is passed, it is implicitly converted to a RegExp by using new RegExp(obj).\r\n *\r\n * @return {Object.} The values of the keys matching the search string.\r\n */\r\n query: function (search)\r\n {\r\n var results = {};\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list.hasOwnProperty(key) && key.match(search))\r\n {\r\n results[key] = this.list[key];\r\n }\r\n }\r\n\r\n return results;\r\n },\r\n\r\n /**\r\n * Sets a value for the given key. If the key doesn't already exist in the Data Manager then it is created.\r\n * \r\n * ```javascript\r\n * data.set('name', 'Red Gem Stone');\r\n * ```\r\n *\r\n * You can also pass in an object of key value pairs as the first argument:\r\n *\r\n * ```javascript\r\n * data.set({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\r\n * ```\r\n *\r\n * To get a value back again you can call `get`:\r\n * \r\n * ```javascript\r\n * data.get('gold');\r\n * ```\r\n * \r\n * Or you can access the value directly via the `values` property, where it works like any other variable:\r\n * \r\n * ```javascript\r\n * data.values.gold += 50;\r\n * ```\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\r\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\r\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\r\n *\r\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.Data.DataManager#set\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.0.0\r\n *\r\n * @param {(string|object)} key - The key to set the value for. Or an object or key value pairs. If an object the `data` argument is ignored.\r\n * @param {*} data - The value to set for the given key. If an object is provided as the key this argument is ignored.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n set: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (typeof key === 'string')\r\n {\r\n return this.setValue(key, data);\r\n }\r\n else\r\n {\r\n for (var entry in key)\r\n {\r\n this.setValue(entry, key[entry]);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal value setter, called automatically by the `set` method.\r\n *\r\n * @method Phaser.Data.DataManager#setValue\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @private\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The key to set the value for.\r\n * @param {*} data - The value to set.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n setValue: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (this.has(key))\r\n {\r\n // Hit the key getter, which will in turn emit the events.\r\n this.values[key] = data;\r\n }\r\n else\r\n {\r\n var _this = this;\r\n var list = this.list;\r\n var events = this.events;\r\n var parent = this.parent;\r\n\r\n Object.defineProperty(this.values, key, {\r\n\r\n enumerable: true,\r\n \r\n configurable: true,\r\n\r\n get: function ()\r\n {\r\n return list[key];\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (!_this._frozen)\r\n {\r\n var previousValue = list[key];\r\n list[key] = value;\r\n\r\n events.emit(Events.CHANGE_DATA, parent, key, value, previousValue);\r\n events.emit(Events.CHANGE_DATA_KEY + key, parent, value, previousValue);\r\n }\r\n }\r\n\r\n });\r\n\r\n list[key] = data;\r\n\r\n events.emit(Events.SET_DATA, parent, key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all data entries to the given callback.\r\n *\r\n * @method Phaser.Data.DataManager#each\r\n * @since 3.0.0\r\n *\r\n * @param {DataEachCallback} callback - The function to call.\r\n * @param {*} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ this.parent, null, undefined ];\r\n\r\n for (var i = 1; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (var key in this.list)\r\n {\r\n args[1] = key;\r\n args[2] = this.list[key];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Merge the given object of key value pairs into this DataManager.\r\n *\r\n * Any newly created values will emit a `setdata` event. Any updated values (see the `overwrite` argument)\r\n * will emit a `changedata` event.\r\n *\r\n * @method Phaser.Data.DataManager#merge\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.0.0\r\n *\r\n * @param {Object.} data - The data to merge.\r\n * @param {boolean} [overwrite=true] - Whether to overwrite existing data. Defaults to true.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n merge: function (data, overwrite)\r\n {\r\n if (overwrite === undefined) { overwrite = true; }\r\n\r\n // Merge data from another component into this one\r\n for (var key in data)\r\n {\r\n if (data.hasOwnProperty(key) && (overwrite || (!overwrite && !this.has(key))))\r\n {\r\n this.setValue(key, data[key]);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Remove the value for the given key.\r\n *\r\n * If the key is found in this Data Manager it is removed from the internal lists and a\r\n * `removedata` event is emitted.\r\n * \r\n * You can also pass in an array of keys, in which case all keys in the array will be removed:\r\n * \r\n * ```javascript\r\n * this.data.remove([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * @method Phaser.Data.DataManager#remove\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key to remove, or an array of keys to remove.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n remove: function (key)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n this.removeValue(key[i]);\r\n }\r\n }\r\n else\r\n {\r\n return this.removeValue(key);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal value remover, called automatically by the `remove` method.\r\n *\r\n * @method Phaser.Data.DataManager#removeValue\r\n * @private\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The key to set the value for.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n removeValue: function (key)\r\n {\r\n if (this.has(key))\r\n {\r\n var data = this.list[key];\r\n\r\n delete this.list[key];\r\n delete this.values[key];\r\n\r\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves the data associated with the given 'key', deletes it from this Data Manager, then returns it.\r\n *\r\n * @method Phaser.Data.DataManager#pop\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the value to retrieve and delete.\r\n *\r\n * @return {*} The value of the given key.\r\n */\r\n pop: function (key)\r\n {\r\n var data = undefined;\r\n\r\n if (!this._frozen && this.has(key))\r\n {\r\n data = this.list[key];\r\n\r\n delete this.list[key];\r\n delete this.values[key];\r\n\r\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\r\n }\r\n\r\n return data;\r\n },\r\n\r\n /**\r\n * Determines whether the given key is set in this Data Manager.\r\n * \r\n * Please note that the keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.Data.DataManager#has\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key to check.\r\n *\r\n * @return {boolean} Returns `true` if the key exists, otherwise `false`.\r\n */\r\n has: function (key)\r\n {\r\n return this.list.hasOwnProperty(key);\r\n },\r\n\r\n /**\r\n * Freeze or unfreeze this Data Manager. A frozen Data Manager will block all attempts\r\n * to create new values or update existing ones.\r\n *\r\n * @method Phaser.Data.DataManager#setFreeze\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Whether to freeze or unfreeze the Data Manager.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n setFreeze: function (value)\r\n {\r\n this._frozen = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Delete all data in this Data Manager and unfreeze it.\r\n *\r\n * @method Phaser.Data.DataManager#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n reset: function ()\r\n {\r\n for (var key in this.list)\r\n {\r\n delete this.list[key];\r\n delete this.values[key];\r\n }\r\n\r\n this._frozen = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroy this data manager.\r\n *\r\n * @method Phaser.Data.DataManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.reset();\r\n\r\n this.events.off(Events.CHANGE_DATA);\r\n this.events.off(Events.SET_DATA);\r\n this.events.off(Events.REMOVE_DATA);\r\n\r\n this.parent = null;\r\n },\r\n\r\n /**\r\n * Gets or sets the frozen state of this Data Manager.\r\n * A frozen Data Manager will block all attempts to create new values or update existing ones.\r\n *\r\n * @name Phaser.Data.DataManager#freeze\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n freeze: {\r\n\r\n get: function ()\r\n {\r\n return this._frozen;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._frozen = (value) ? true : false;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Return the total number of entries in this Data Manager.\r\n *\r\n * @name Phaser.Data.DataManager#count\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n count: {\r\n\r\n get: function ()\r\n {\r\n var i = 0;\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list[key] !== undefined)\r\n {\r\n i++;\r\n }\r\n }\r\n\r\n return i;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = DataManager;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Change Data Event.\r\n * \r\n * This event is dispatched by a Data Manager when an item in the data store is changed.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * a change data event from a Game Object you would use: `sprite.data.on('changedata', listener)`.\r\n * \r\n * This event is dispatched for all items that change in the Data Manager.\r\n * To listen for the change of a specific item, use the `CHANGE_DATA_KEY_EVENT` event.\r\n *\r\n * @event Phaser.Data.Events#CHANGE_DATA\r\n * @since 3.0.0\r\n * \r\n * @param {any} parent - A reference to the object that the Data Manager responsible for this event belongs to.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} value - The new value of the item in the Data Manager.\r\n * @param {any} previousValue - The previous value of the item in the Data Manager.\r\n */\r\nmodule.exports = 'changedata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Change Data Key Event.\r\n * \r\n * This event is dispatched by a Data Manager when an item in the data store is changed.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the change of a specific data item from a Game Object you would use: `sprite.data.on('changedata-key', listener)`,\r\n * where `key` is the unique string key of the data item. For example, if you have a data item stored called `gold`\r\n * then you can listen for `sprite.data.on('changedata-gold')`.\r\n *\r\n * @event Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.16.1\r\n * \r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} value - The item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n * @param {any} previousValue - The previous item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'changedata-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Remove Data Event.\r\n * \r\n * This event is dispatched by a Data Manager when an item is removed from it.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the removal of a data item on a Game Object you would use: `sprite.data.on('removedata', listener)`.\r\n *\r\n * @event Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n * \r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} data - The item that was removed from the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'removedata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Set Data Event.\r\n * \r\n * This event is dispatched by a Data Manager when a new item is added to the data store.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the addition of a new data item on a Game Object you would use: `sprite.data.on('setdata', listener)`.\r\n *\r\n * @event Phaser.Data.Events#SET_DATA\r\n * @since 3.0.0\r\n * \r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} data - The item that was added to the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'setdata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Data.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CHANGE_DATA: require('./CHANGE_DATA_EVENT'),\r\n CHANGE_DATA_KEY: require('./CHANGE_DATA_KEY_EVENT'),\r\n REMOVE_DATA: require('./REMOVE_DATA_EVENT'),\r\n SET_DATA: require('./SET_DATA_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = require('../renderer/BlendModes');\r\nvar GetAdvancedValue = require('../utils/object/GetAdvancedValue');\r\n\r\n/**\r\n * Builds a Game Object using the provided configuration object.\r\n *\r\n * @function Phaser.GameObjects.BuildGameObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The initial GameObject.\r\n * @param {Phaser.Types.GameObjects.GameObjectConfig} config - The config to build the GameObject with.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The built Game Object.\r\n */\r\nvar BuildGameObject = function (scene, gameObject, config)\r\n{\r\n // Position\r\n\r\n gameObject.x = GetAdvancedValue(config, 'x', 0);\r\n gameObject.y = GetAdvancedValue(config, 'y', 0);\r\n gameObject.depth = GetAdvancedValue(config, 'depth', 0);\r\n\r\n // Flip\r\n\r\n gameObject.flipX = GetAdvancedValue(config, 'flipX', false);\r\n gameObject.flipY = GetAdvancedValue(config, 'flipY', false);\r\n\r\n // Scale\r\n // Either: { scale: 2 } or { scale: { x: 2, y: 2 }}\r\n\r\n var scale = GetAdvancedValue(config, 'scale', null);\r\n\r\n if (typeof scale === 'number')\r\n {\r\n gameObject.setScale(scale);\r\n }\r\n else if (scale !== null)\r\n {\r\n gameObject.scaleX = GetAdvancedValue(scale, 'x', 1);\r\n gameObject.scaleY = GetAdvancedValue(scale, 'y', 1);\r\n }\r\n\r\n // ScrollFactor\r\n // Either: { scrollFactor: 2 } or { scrollFactor: { x: 2, y: 2 }}\r\n\r\n var scrollFactor = GetAdvancedValue(config, 'scrollFactor', null);\r\n\r\n if (typeof scrollFactor === 'number')\r\n {\r\n gameObject.setScrollFactor(scrollFactor);\r\n }\r\n else if (scrollFactor !== null)\r\n {\r\n gameObject.scrollFactorX = GetAdvancedValue(scrollFactor, 'x', 1);\r\n gameObject.scrollFactorY = GetAdvancedValue(scrollFactor, 'y', 1);\r\n }\r\n\r\n // Rotation\r\n\r\n gameObject.rotation = GetAdvancedValue(config, 'rotation', 0);\r\n\r\n var angle = GetAdvancedValue(config, 'angle', null);\r\n\r\n if (angle !== null)\r\n {\r\n gameObject.angle = angle;\r\n }\r\n\r\n // Alpha\r\n\r\n gameObject.alpha = GetAdvancedValue(config, 'alpha', 1);\r\n\r\n // Origin\r\n // Either: { origin: 0.5 } or { origin: { x: 0.5, y: 0.5 }}\r\n\r\n var origin = GetAdvancedValue(config, 'origin', null);\r\n\r\n if (typeof origin === 'number')\r\n {\r\n gameObject.setOrigin(origin);\r\n }\r\n else if (origin !== null)\r\n {\r\n var ox = GetAdvancedValue(origin, 'x', 0.5);\r\n var oy = GetAdvancedValue(origin, 'y', 0.5);\r\n\r\n gameObject.setOrigin(ox, oy);\r\n }\r\n\r\n // BlendMode\r\n\r\n gameObject.blendMode = GetAdvancedValue(config, 'blendMode', BlendModes.NORMAL);\r\n\r\n // Visible\r\n\r\n gameObject.visible = GetAdvancedValue(config, 'visible', true);\r\n\r\n // Add to Scene\r\n\r\n var add = GetAdvancedValue(config, 'add', true);\r\n\r\n if (add)\r\n {\r\n scene.sys.displayList.add(gameObject);\r\n }\r\n\r\n if (gameObject.preUpdate)\r\n {\r\n scene.sys.updateList.add(gameObject);\r\n }\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BuildGameObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar ComponentsToJSON = require('./components/ToJSON');\r\nvar DataManager = require('../data/DataManager');\r\nvar EventEmitter = require('eventemitter3');\r\nvar Events = require('./events');\r\n\r\n/**\r\n * @classdesc\r\n * The base class that all Game Objects extend.\r\n * You don't create GameObjects directly and they cannot be added to the display list.\r\n * Instead, use them as the base for your own custom classes.\r\n *\r\n * @class GameObject\r\n * @memberof Phaser.GameObjects\r\n * @extends Phaser.Events.EventEmitter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs.\r\n * @param {string} type - A textual representation of the type of Game Object, i.e. `sprite`.\r\n */\r\nvar GameObject = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function GameObject (scene, type)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * The Scene to which this Game Object belongs.\r\n * Game Objects can only belong to one Scene.\r\n *\r\n * @name Phaser.GameObjects.GameObject#scene\r\n * @type {Phaser.Scene}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A textual representation of this Game Object, i.e. `sprite`.\r\n * Used internally by Phaser but is available for your own custom classes to populate.\r\n *\r\n * @name Phaser.GameObjects.GameObject#type\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * The current state of this Game Object.\r\n * \r\n * Phaser itself will never modify this value, although plugins may do so.\r\n * \r\n * Use this property to track the state of a Game Object during its lifetime. For example, it could move from\r\n * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant\r\n * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons.\r\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\r\n *\r\n * @name Phaser.GameObjects.GameObject#state\r\n * @type {(integer|string)}\r\n * @since 3.16.0\r\n */\r\n this.state = 0;\r\n\r\n /**\r\n * The parent Container of this Game Object, if it has one.\r\n *\r\n * @name Phaser.GameObjects.GameObject#parentContainer\r\n * @type {Phaser.GameObjects.Container}\r\n * @since 3.4.0\r\n */\r\n this.parentContainer = null;\r\n\r\n /**\r\n * The name of this Game Object.\r\n * Empty by default and never populated by Phaser, this is left for developers to use.\r\n *\r\n * @name Phaser.GameObjects.GameObject#name\r\n * @type {string}\r\n * @default ''\r\n * @since 3.0.0\r\n */\r\n this.name = '';\r\n\r\n /**\r\n * The active state of this Game Object.\r\n * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it.\r\n * An active object is one which is having its logic and internal systems updated.\r\n *\r\n * @name Phaser.GameObjects.GameObject#active\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.active = true;\r\n\r\n /**\r\n * The Tab Index of the Game Object.\r\n * Reserved for future use by plugins and the Input Manager.\r\n *\r\n * @name Phaser.GameObjects.GameObject#tabIndex\r\n * @type {integer}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.tabIndex = -1;\r\n\r\n /**\r\n * A Data Manager.\r\n * It allows you to store, query and get key/value paired information specific to this Game Object.\r\n * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`.\r\n *\r\n * @name Phaser.GameObjects.GameObject#data\r\n * @type {Phaser.Data.DataManager}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.data = null;\r\n\r\n /**\r\n * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not.\r\n * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively.\r\n * If those components are not used by your custom class then you can use this bitmask as you wish.\r\n *\r\n * @name Phaser.GameObjects.GameObject#renderFlags\r\n * @type {integer}\r\n * @default 15\r\n * @since 3.0.0\r\n */\r\n this.renderFlags = 15;\r\n\r\n /**\r\n * A bitmask that controls if this Game Object is drawn by a Camera or not.\r\n * Not usually set directly, instead call `Camera.ignore`, however you can\r\n * set this property directly using the Camera.id property:\r\n *\r\n * @example\r\n * this.cameraFilter |= camera.id\r\n *\r\n * @name Phaser.GameObjects.GameObject#cameraFilter\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.cameraFilter = 0;\r\n\r\n /**\r\n * If this Game Object is enabled for input then this property will contain an InteractiveObject instance.\r\n * Not usually set directly. Instead call `GameObject.setInteractive()`.\r\n *\r\n * @name Phaser.GameObjects.GameObject#input\r\n * @type {?Phaser.Types.Input.InteractiveObject}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.input = null;\r\n\r\n /**\r\n * If this Game Object is enabled for physics then this property will contain a reference to a Physics Body.\r\n *\r\n * @name Phaser.GameObjects.GameObject#body\r\n * @type {?(object|Phaser.Physics.Arcade.Body|Phaser.Physics.Impact.Body)}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.body = null;\r\n\r\n /**\r\n * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`.\r\n * This includes calls that may come from a Group, Container or the Scene itself.\r\n * While it allows you to persist a Game Object across Scenes, please understand you are entirely\r\n * responsible for managing references to and from this Game Object.\r\n *\r\n * @name Phaser.GameObjects.GameObject#ignoreDestroy\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.5.0\r\n */\r\n this.ignoreDestroy = false;\r\n\r\n // Tell the Scene to re-sort the children\r\n scene.sys.queueDepthSort();\r\n },\r\n\r\n /**\r\n * Sets the `active` property of this Game Object and returns this Game Object for further chaining.\r\n * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setActive\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - True if this Game Object should be set as active, false if not.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setActive: function (value)\r\n {\r\n this.active = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the `name` property of this Game Object and returns this Game Object for further chaining.\r\n * The `name` property is not populated by Phaser and is presented for your own use.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setName\r\n * @since 3.0.0\r\n *\r\n * @param {string} value - The name to be given to this Game Object.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setName: function (value)\r\n {\r\n this.name = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current state of this Game Object.\r\n * \r\n * Phaser itself will never modify the State of a Game Object, although plugins may do so.\r\n * \r\n * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'.\r\n * The state value should typically be an integer (ideally mapped to a constant\r\n * in your game code), but could also be a string. It is recommended to keep it light and simple.\r\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setState\r\n * @since 3.16.0\r\n *\r\n * @param {(integer|string)} value - The state of the Game Object.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setState: function (value)\r\n {\r\n this.state = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds a Data Manager component to this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setDataEnabled\r\n * @since 3.0.0\r\n * @see Phaser.Data.DataManager\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setDataEnabled: function ()\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Allows you to store a key value pair within this Game Objects Data Manager.\r\n *\r\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\r\n * before setting the value.\r\n *\r\n * If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * ```javascript\r\n * sprite.setData('name', 'Red Gem Stone');\r\n * ```\r\n *\r\n * You can also pass in an object of key value pairs as the first argument:\r\n *\r\n * ```javascript\r\n * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\r\n * ```\r\n *\r\n * To get a value back again you can call `getData`:\r\n *\r\n * ```javascript\r\n * sprite.getData('gold');\r\n * ```\r\n *\r\n * Or you can access the value directly via the `values` property, where it works like any other variable:\r\n *\r\n * ```javascript\r\n * sprite.data.values.gold += 50;\r\n * ```\r\n *\r\n * When the value is first set, a `setdata` event is emitted from this Game Object.\r\n *\r\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\r\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\r\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\r\n *\r\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setData\r\n * @since 3.0.0\r\n *\r\n * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored.\r\n * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setData: function (key, value)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n this.data.set(key, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist.\r\n *\r\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\r\n *\r\n * ```javascript\r\n * sprite.getData('gold');\r\n * ```\r\n *\r\n * Or access the value directly:\r\n *\r\n * ```javascript\r\n * sprite.data.values.gold;\r\n * ```\r\n *\r\n * You can also pass in an array of keys, in which case an array of values will be returned:\r\n *\r\n * ```javascript\r\n * sprite.getData([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * This approach is useful for destructuring arrays in ES6.\r\n *\r\n * @method Phaser.GameObjects.GameObject#getData\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\r\n *\r\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\r\n */\r\n getData: function (key)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n return this.data.get(key);\r\n },\r\n\r\n /**\r\n * Pass this Game Object to the Input Manager to enable it for Input.\r\n *\r\n * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area\r\n * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced\r\n * input detection.\r\n *\r\n * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If\r\n * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific\r\n * shape for it to use.\r\n *\r\n * You can also provide an Input Configuration Object as the only argument to this method.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setInteractive\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Types.Input.InputConfiguration|any)} [shape] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used.\r\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - A callback to be invoked when the Game Object is interacted with. If you provide a shape you must also provide a callback.\r\n * @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target?\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setInteractive: function (shape, callback, dropZone)\r\n {\r\n this.scene.sys.input.enable(this, shape, callback, dropZone);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * If this Game Object has previously been enabled for input, this will disable it.\r\n *\r\n * An object that is disabled for input stops processing or being considered for\r\n * input events, but can be turned back on again at any time by simply calling\r\n * `setInteractive()` with no arguments provided.\r\n *\r\n * If want to completely remove interaction from this Game Object then use `removeInteractive` instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#disableInteractive\r\n * @since 3.7.0\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n disableInteractive: function ()\r\n {\r\n if (this.input)\r\n {\r\n this.input.enabled = false;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * If this Game Object has previously been enabled for input, this will queue it\r\n * for removal, causing it to no longer be interactive. The removal happens on\r\n * the next game step, it is not immediate.\r\n *\r\n * The Interactive Object that was assigned to this Game Object will be destroyed,\r\n * removed from the Input Manager and cleared from this Game Object.\r\n *\r\n * If you wish to re-enable this Game Object at a later date you will need to\r\n * re-create its InteractiveObject by calling `setInteractive` again.\r\n *\r\n * If you wish to only temporarily stop an object from receiving input then use\r\n * `disableInteractive` instead, as that toggles the interactive state, where-as\r\n * this erases it completely.\r\n * \r\n * If you wish to resize a hit area, don't remove and then set it as being\r\n * interactive. Instead, access the hitarea object directly and resize the shape\r\n * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the\r\n * shape is a Rectangle, which it is by default.)\r\n *\r\n * @method Phaser.GameObjects.GameObject#removeInteractive\r\n * @since 3.7.0\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n removeInteractive: function ()\r\n {\r\n this.scene.sys.input.clear(this);\r\n\r\n this.input = undefined;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * To be overridden by custom GameObjects. Allows base objects to be used in a Pool.\r\n *\r\n * @method Phaser.GameObjects.GameObject#update\r\n * @since 3.0.0\r\n *\r\n * @param {...*} [args] - args\r\n */\r\n update: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Returns a JSON representation of the Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\r\n */\r\n toJSON: function ()\r\n {\r\n return ComponentsToJSON(this);\r\n },\r\n\r\n /**\r\n * Compares the renderMask with the renderFlags to see if this Game Object will render or not.\r\n * Also checks the Game Object against the given Cameras exclusion list.\r\n *\r\n * @method Phaser.GameObjects.GameObject#willRender\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to check against this Game Object.\r\n *\r\n * @return {boolean} True if the Game Object should be rendered, otherwise false.\r\n */\r\n willRender: function (camera)\r\n {\r\n return !(GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id)));\r\n },\r\n\r\n /**\r\n * Returns an array containing the display list index of either this Game Object, or if it has one,\r\n * its parent Container. It then iterates up through all of the parent containers until it hits the\r\n * root of the display list (which is index 0 in the returned array).\r\n *\r\n * Used internally by the InputPlugin but also useful if you wish to find out the display depth of\r\n * this Game Object and all of its ancestors.\r\n *\r\n * @method Phaser.GameObjects.GameObject#getIndexList\r\n * @since 3.4.0\r\n *\r\n * @return {integer[]} An array of display list position indexes.\r\n */\r\n getIndexList: function ()\r\n {\r\n // eslint-disable-next-line consistent-this\r\n var child = this;\r\n var parent = this.parentContainer;\r\n\r\n var indexes = [];\r\n\r\n while (parent)\r\n {\r\n // indexes.unshift([parent.getIndex(child), parent.name]);\r\n indexes.unshift(parent.getIndex(child));\r\n\r\n child = parent;\r\n\r\n if (!parent.parentContainer)\r\n {\r\n break;\r\n }\r\n else\r\n {\r\n parent = parent.parentContainer;\r\n }\r\n }\r\n\r\n // indexes.unshift([this.scene.sys.displayList.getIndex(child), 'root']);\r\n indexes.unshift(this.scene.sys.displayList.getIndex(child));\r\n\r\n return indexes;\r\n },\r\n\r\n /**\r\n * Destroys this Game Object removing it from the Display List and Update List and\r\n * severing all ties to parent resources.\r\n *\r\n * Also removes itself from the Input Manager and Physics Manager if previously enabled.\r\n *\r\n * Use this to remove a Game Object from your game if you don't ever plan to use it again.\r\n * As long as no reference to it exists within your own code it should become free for\r\n * garbage collection by the browser.\r\n *\r\n * If you just want to temporarily disable an object then look at using the\r\n * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected.\r\n *\r\n * @method Phaser.GameObjects.GameObject#destroy\r\n * @fires Phaser.GameObjects.Events#DESTROY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [fromScene=false] - Is this Game Object being destroyed as the result of a Scene shutdown?\r\n */\r\n destroy: function (fromScene)\r\n {\r\n if (fromScene === undefined) { fromScene = false; }\r\n\r\n // This Game Object has already been destroyed\r\n if (!this.scene || this.ignoreDestroy)\r\n {\r\n return;\r\n }\r\n\r\n if (this.preDestroy)\r\n {\r\n this.preDestroy.call(this);\r\n }\r\n\r\n this.emit(Events.DESTROY, this);\r\n\r\n var sys = this.scene.sys;\r\n\r\n if (!fromScene)\r\n {\r\n sys.displayList.remove(this);\r\n sys.updateList.remove(this);\r\n }\r\n\r\n if (this.input)\r\n {\r\n sys.input.clear(this);\r\n this.input = undefined;\r\n }\r\n\r\n if (this.data)\r\n {\r\n this.data.destroy();\r\n\r\n this.data = undefined;\r\n }\r\n\r\n if (this.body)\r\n {\r\n this.body.destroy();\r\n this.body = undefined;\r\n }\r\n\r\n // Tell the Scene to re-sort the children\r\n if (!fromScene)\r\n {\r\n sys.queueDepthSort();\r\n }\r\n\r\n this.active = false;\r\n this.visible = false;\r\n\r\n this.scene = undefined;\r\n\r\n this.parentContainer = undefined;\r\n\r\n this.removeAllListeners();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not.\r\n *\r\n * @constant {integer} RENDER_MASK\r\n * @memberof Phaser.GameObjects.GameObject\r\n * @default\r\n */\r\nGameObject.RENDER_MASK = 15;\r\n\r\nmodule.exports = GameObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for calculating and setting the size of a non-Frame based Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.ComputedSize\r\n * @since 3.0.0\r\n */\r\n\r\nvar ComputedSize = {\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n * \r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayWidth` property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n width: 0,\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n * \r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayHeight` property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n height: 0,\r\n\r\n /**\r\n * The displayed width of this Game Object.\r\n * \r\n * This value takes into account the scale factor.\r\n * \r\n * Setting this value will adjust the Game Object's scale property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#displayWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleX * this.width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleX = value / this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of this Game Object.\r\n * \r\n * This value takes into account the scale factor.\r\n * \r\n * Setting this value will adjust the Game Object's scale property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#displayHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleY * this.height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleY = value / this.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\r\n * \r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n * \r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n * \r\n * @method Phaser.GameObjects.Components.ComputedSize#setSize\r\n * @since 3.4.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the display size of this Game Object.\r\n * \r\n * Calling this will adjust the scale.\r\n * \r\n * @method Phaser.GameObjects.Components.ComputedSize#setDisplaySize\r\n * @since 3.4.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplaySize: function (width, height)\r\n {\r\n this.displayWidth = width;\r\n this.displayHeight = height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = ComputedSize;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for setting the depth of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Depth\r\n * @since 3.0.0\r\n */\r\n\r\nvar Depth = {\r\n\r\n /**\r\n * Private internal value. Holds the depth of the Game Object.\r\n * \r\n * @name Phaser.GameObjects.Components.Depth#_depth\r\n * @type {integer}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _depth: 0,\r\n\r\n /**\r\n * The depth of this Game Object within the Scene.\r\n * \r\n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\r\n * of Game Objects, without actually moving their position in the display list.\r\n *\r\n * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth\r\n * value will always render in front of one with a lower value.\r\n *\r\n * Setting the depth will queue a depth sort event within the Scene.\r\n * \r\n * @name Phaser.GameObjects.Components.Depth#depth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n depth: {\r\n\r\n get: function ()\r\n {\r\n return this._depth;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scene.sys.queueDepthSort();\r\n this._depth = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The depth of this Game Object within the Scene.\r\n * \r\n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\r\n * of Game Objects, without actually moving their position in the display list.\r\n *\r\n * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth\r\n * value will always render in front of one with a lower value.\r\n *\r\n * Setting the depth will queue a depth sort event within the Scene.\r\n * \r\n * @method Phaser.GameObjects.Components.Depth#setDepth\r\n * @since 3.0.0\r\n *\r\n * @param {integer} value - The depth of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setDepth: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.depth = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Depth;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for visually flipping a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Flip\r\n * @since 3.0.0\r\n */\r\n\r\nvar Flip = {\r\n\r\n /**\r\n * The horizontally flipped state of the Game Object.\r\n * \r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @name Phaser.GameObjects.Components.Flip#flipX\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n flipX: false,\r\n\r\n /**\r\n * The vertically flipped state of the Game Object.\r\n * \r\n * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down)\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @name Phaser.GameObjects.Components.Flip#flipY\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n flipY: false,\r\n\r\n /**\r\n * Toggles the horizontal flipped state of this Game Object.\r\n * \r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#toggleFlipX\r\n * @since 3.0.0\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n toggleFlipX: function ()\r\n {\r\n this.flipX = !this.flipX;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggles the vertical flipped state of this Game Object.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#toggleFlipY\r\n * @since 3.0.0\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n toggleFlipY: function ()\r\n {\r\n this.flipY = !this.flipY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal flipped state of this Game Object.\r\n * \r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#setFlipX\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setFlipX: function (value)\r\n {\r\n this.flipX = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical flipped state of this Game Object.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#setFlipY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setFlipY: function (value)\r\n {\r\n this.flipY = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal and vertical flipped state of this Game Object.\r\n * \r\n * A Game Object that is flipped will render inversed on the flipped axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#setFlip\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setFlip: function (x, y)\r\n {\r\n this.flipX = x;\r\n this.flipY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#resetFlip\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n resetFlip: function ()\r\n {\r\n this.flipX = false;\r\n this.flipY = false;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Flip;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the Scroll Factor of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.ScrollFactor\r\n * @since 3.0.0\r\n */\r\n\r\nvar ScrollFactor = {\r\n\r\n /**\r\n * The horizontal scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scrollFactorX: 1,\r\n\r\n /**\r\n * The vertical scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scrollFactorY: 1,\r\n\r\n /**\r\n * Sets the scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @method Phaser.GameObjects.Components.ScrollFactor#setScrollFactor\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scroll factor of this Game Object.\r\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScrollFactor: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = ScrollFactor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Build a JSON representation of the given Game Object.\r\n *\r\n * This is typically extended further by Game Object specific implementations.\r\n *\r\n * @method Phaser.GameObjects.Components.ToJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to export as JSON.\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\r\n */\r\nvar ToJSON = function (gameObject)\r\n{\r\n var out = {\r\n name: gameObject.name,\r\n type: gameObject.type,\r\n x: gameObject.x,\r\n y: gameObject.y,\r\n depth: gameObject.depth,\r\n scale: {\r\n x: gameObject.scaleX,\r\n y: gameObject.scaleY\r\n },\r\n origin: {\r\n x: gameObject.originX,\r\n y: gameObject.originY\r\n },\r\n flipX: gameObject.flipX,\r\n flipY: gameObject.flipY,\r\n rotation: gameObject.rotation,\r\n alpha: gameObject.alpha,\r\n visible: gameObject.visible,\r\n blendMode: gameObject.blendMode,\r\n textureKey: '',\r\n frameKey: '',\r\n data: {}\r\n };\r\n\r\n if (gameObject.texture)\r\n {\r\n out.textureKey = gameObject.texture.key;\r\n out.frameKey = gameObject.frame.name;\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = ToJSON;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = require('../../math/const');\r\nvar TransformMatrix = require('./TransformMatrix');\r\nvar WrapAngle = require('../../math/angle/Wrap');\r\nvar WrapAngleDegrees = require('../../math/angle/WrapDegrees');\r\n\r\n// global bitmask flag for GameObject.renderMask (used by Scale)\r\nvar _FLAG = 4; // 0100\r\n\r\n/**\r\n * Provides methods used for getting and setting the position, scale and rotation of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Transform\r\n * @since 3.0.0\r\n */\r\n\r\nvar Transform = {\r\n\r\n /**\r\n * Private internal value. Holds the horizontal scale value.\r\n * \r\n * @name Phaser.GameObjects.Components.Transform#_scaleX\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _scaleX: 1,\r\n\r\n /**\r\n * Private internal value. Holds the vertical scale value.\r\n * \r\n * @name Phaser.GameObjects.Components.Transform#_scaleY\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _scaleY: 1,\r\n\r\n /**\r\n * Private internal value. Holds the rotation value in radians.\r\n * \r\n * @name Phaser.GameObjects.Components.Transform#_rotation\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _rotation: 0,\r\n\r\n /**\r\n * The x position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n x: 0,\r\n\r\n /**\r\n * The y position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n y: 0,\r\n\r\n /**\r\n * The z position of this Game Object.\r\n * Note: Do not use this value to set the z-index, instead see the `depth` property.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n z: 0,\r\n\r\n /**\r\n * The w position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n w: 0,\r\n\r\n /**\r\n * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object\r\n * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.\r\n * \r\n * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this\r\n * isn't the case, use the `scaleX` or `scaleY` properties instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.18.0\r\n */\r\n scale: {\r\n\r\n get: function ()\r\n {\r\n return (this._scaleX + this._scaleY) / 2;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n this._scaleY = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The horizontal scale of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scaleX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scale of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scaleY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleY = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The angle of this Game Object as expressed in degrees.\r\n * \r\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left\r\n * and -90 is up.\r\n *\r\n * If you prefer to work in radians, see the `rotation` property instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#angle\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n angle: {\r\n\r\n get: function ()\r\n {\r\n return WrapAngleDegrees(this._rotation * MATH_CONST.RAD_TO_DEG);\r\n },\r\n\r\n set: function (value)\r\n {\r\n // value is in degrees\r\n this.rotation = WrapAngleDegrees(value) * MATH_CONST.DEG_TO_RAD;\r\n }\r\n },\r\n\r\n /**\r\n * The angle of this Game Object in radians.\r\n * \r\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left\r\n * and -90 is up.\r\n *\r\n * If you prefer to work in degrees, see the `angle` property instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#rotation\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return this._rotation;\r\n },\r\n\r\n set: function (value)\r\n {\r\n // value is in radians\r\n this._rotation = WrapAngle(value);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x position of this Game Object.\r\n * @param {number} [y=x] - The y position of this Game Object. If not set it will use the `x` value.\r\n * @param {number} [z=0] - The z position of this Game Object.\r\n * @param {number} [w=0] - The w position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPosition: function (x, y, z, w)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n if (z === undefined) { z = 0; }\r\n if (w === undefined) { w = 0; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n this.w = w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the position of this Game Object to be a random position within the confines of\r\n * the given area.\r\n * \r\n * If no area is specified a random position between 0 x 0 and the game width x height is used instead.\r\n *\r\n * The position does not factor in the size of this Game Object, meaning that only the origin is\r\n * guaranteed to be within the area.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setRandomPosition\r\n * @since 3.8.0\r\n *\r\n * @param {number} [x=0] - The x position of the top-left of the random area.\r\n * @param {number} [y=0] - The y position of the top-left of the random area.\r\n * @param {number} [width] - The width of the random area.\r\n * @param {number} [height] - The height of the random area.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setRandomPosition: function (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = this.scene.sys.scale.width; }\r\n if (height === undefined) { height = this.scene.sys.scale.height; }\r\n\r\n this.x = x + (Math.random() * width);\r\n this.y = y + (Math.random() * height);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the rotation of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setRotation\r\n * @since 3.0.0\r\n *\r\n * @param {number} [radians=0] - The rotation of this Game Object, in radians.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setRotation: function (radians)\r\n {\r\n if (radians === undefined) { radians = 0; }\r\n\r\n this.rotation = radians;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the angle of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setAngle\r\n * @since 3.0.0\r\n *\r\n * @param {number} [degrees=0] - The rotation of this Game Object, in degrees.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAngle: function (degrees)\r\n {\r\n if (degrees === undefined) { degrees = 0; }\r\n\r\n this.angle = degrees;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scale of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scale of this Game Object.\r\n * @param {number} [y=x] - The vertical scale of this Game Object. If not set it will use the `x` value.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScale: function (x, y)\r\n {\r\n if (x === undefined) { x = 1; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.scaleX = x;\r\n this.scaleY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the x position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setX\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The x position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setX: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.x = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the y position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setY\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The y position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setY: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.y = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the z position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The z position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setZ: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.z = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the w position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setW\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The w position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setW: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.w = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the local transform matrix for this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getLocalTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\r\n */\r\n getLocalTransformMatrix: function (tempMatrix)\r\n {\r\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\r\n\r\n return tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\r\n },\r\n\r\n /**\r\n * Gets the world transform matrix for this Game Object, factoring in any parent Containers.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getWorldTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A temporary matrix to hold parent values during the calculations.\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\r\n */\r\n getWorldTransformMatrix: function (tempMatrix, parentMatrix)\r\n {\r\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\r\n if (parentMatrix === undefined) { parentMatrix = new TransformMatrix(); }\r\n\r\n var parent = this.parentContainer;\r\n\r\n if (!parent)\r\n {\r\n return this.getLocalTransformMatrix(tempMatrix);\r\n }\r\n\r\n tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\r\n\r\n while (parent)\r\n {\r\n parentMatrix.applyITRS(parent.x, parent.y, parent._rotation, parent._scaleX, parent._scaleY);\r\n\r\n parentMatrix.multiply(tempMatrix, tempMatrix);\r\n\r\n parent = parent.parentContainer;\r\n }\r\n\r\n return tempMatrix;\r\n },\r\n\r\n /**\r\n * Gets the sum total rotation of all of this Game Objects parent Containers.\r\n * \r\n * The returned value is in radians and will be zero if this Game Object has no parent container.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getParentRotation\r\n * @since 3.18.0\r\n *\r\n * @return {number} The sum total rotation, in radians, of all parent containers of this Game Object.\r\n */\r\n getParentRotation: function ()\r\n {\r\n var rotation = 0;\r\n\r\n var parent = this.parentContainer;\r\n\r\n while (parent)\r\n {\r\n rotation += parent.rotation;\r\n\r\n parent = parent.parentContainer;\r\n }\r\n\r\n return rotation;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Transform;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar MATH_CONST = require('../../math/const');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * A Matrix used for display transformations for rendering.\r\n *\r\n * It is represented like so:\r\n *\r\n * ```\r\n * | a | c | tx |\r\n * | b | d | ty |\r\n * | 0 | 0 | 1 |\r\n * ```\r\n *\r\n * @class TransformMatrix\r\n * @memberof Phaser.GameObjects.Components\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [a=1] - The Scale X value.\r\n * @param {number} [b=0] - The Skew Y value.\r\n * @param {number} [c=0] - The Skew X value.\r\n * @param {number} [d=1] - The Scale Y value.\r\n * @param {number} [tx=0] - The Translate X value.\r\n * @param {number} [ty=0] - The Translate Y value.\r\n */\r\nvar TransformMatrix = new Class({\r\n\r\n initialize:\r\n\r\n function TransformMatrix (a, b, c, d, tx, ty)\r\n {\r\n if (a === undefined) { a = 1; }\r\n if (b === undefined) { b = 0; }\r\n if (c === undefined) { c = 0; }\r\n if (d === undefined) { d = 1; }\r\n if (tx === undefined) { tx = 0; }\r\n if (ty === undefined) { ty = 0; }\r\n\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#matrix\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.matrix = new Float32Array([ a, b, c, d, tx, ty, 0, 0, 1 ]);\r\n\r\n /**\r\n * The decomposed matrix.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#decomposedMatrix\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.decomposedMatrix = {\r\n translateX: 0,\r\n translateY: 0,\r\n scaleX: 1,\r\n scaleY: 1,\r\n rotation: 0\r\n };\r\n },\r\n\r\n /**\r\n * The Scale X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#a\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n a: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[0];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[0] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Skew Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#b\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n b: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[1];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[1] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Skew X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#c\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n c: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[2];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[2] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Scale Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#d\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n d: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[3];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[3] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#e\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n e: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#f\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n f: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#tx\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n tx: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#ty\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n ty: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Matrix. Value is in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#rotation\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return Math.acos(this.a / this.scaleX) * ((Math.atan(-this.c / this.a) < 0) ? -1 : 1);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Matrix, normalized to be within the Phaser right-handed\r\n * clockwise rotation space. Value is in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#rotationNormalized\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n rotationNormalized: {\r\n\r\n get: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n if (a || b)\r\n {\r\n // var r = Math.sqrt(a * a + b * b);\r\n \r\n return (b > 0) ? Math.acos(a / this.scaleX) : -Math.acos(a / this.scaleX);\r\n }\r\n else if (c || d)\r\n {\r\n // var s = Math.sqrt(c * c + d * d);\r\n \r\n return MATH_CONST.TAU - ((d > 0) ? Math.acos(-c / this.scaleY) : -Math.acos(c / this.scaleY));\r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The decomposed horizontal scale of the Matrix. This value is always positive.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleX\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt((this.a * this.a) + (this.b * this.b));\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The decomposed vertical scale of the Matrix. This value is always positive.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleY\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt((this.c * this.c) + (this.d * this.d));\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Reset the Matrix to an identity matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#loadIdentity\r\n * @since 3.0.0\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n loadIdentity: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = 1;\r\n matrix[1] = 0;\r\n matrix[2] = 0;\r\n matrix[3] = 1;\r\n matrix[4] = 0;\r\n matrix[5] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#translate\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation value.\r\n * @param {number} y - The vertical translation value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n translate: function (x, y)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[4] = matrix[0] * x + matrix[2] * y + matrix[4];\r\n matrix[5] = matrix[1] * x + matrix[3] * y + matrix[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scale value.\r\n * @param {number} y - The vertical scale value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n scale: function (x, y)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] *= x;\r\n matrix[1] *= x;\r\n matrix[2] *= y;\r\n matrix[3] *= y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n rotate: function (angle)\r\n {\r\n var sin = Math.sin(angle);\r\n var cos = Math.cos(angle);\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n matrix[0] = a * cos + c * sin;\r\n matrix[1] = b * cos + d * sin;\r\n matrix[2] = a * -sin + c * cos;\r\n matrix[3] = b * -sin + d * cos;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n * \r\n * If an `out` Matrix is given then the results will be stored in it.\r\n * If it is not given, this matrix will be updated in place instead.\r\n * Use an `out` Matrix if you do not wish to mutate this matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in.\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} Either this TransformMatrix, or the `out` Matrix, if given in the arguments.\r\n */\r\n multiply: function (rhs, out)\r\n {\r\n var matrix = this.matrix;\r\n var source = rhs.matrix;\r\n\r\n var localA = matrix[0];\r\n var localB = matrix[1];\r\n var localC = matrix[2];\r\n var localD = matrix[3];\r\n var localE = matrix[4];\r\n var localF = matrix[5];\r\n\r\n var sourceA = source[0];\r\n var sourceB = source[1];\r\n var sourceC = source[2];\r\n var sourceD = source[3];\r\n var sourceE = source[4];\r\n var sourceF = source[5];\r\n\r\n var destinationMatrix = (out === undefined) ? this : out;\r\n\r\n destinationMatrix.a = (sourceA * localA) + (sourceB * localC);\r\n destinationMatrix.b = (sourceA * localB) + (sourceB * localD);\r\n destinationMatrix.c = (sourceC * localA) + (sourceD * localC);\r\n destinationMatrix.d = (sourceC * localB) + (sourceD * localD);\r\n destinationMatrix.e = (sourceE * localA) + (sourceF * localC) + localE;\r\n destinationMatrix.f = (sourceE * localB) + (sourceF * localD) + localF;\r\n\r\n return destinationMatrix;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the matrix given, including the offset.\r\n * \r\n * The offsetX is added to the tx value: `offsetX * a + offsetY * c + tx`.\r\n * The offsetY is added to the ty value: `offsetY * b + offsetY * d + ty`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#multiplyWithOffset\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\r\n * @param {number} offsetX - Horizontal offset to factor in to the multiplication.\r\n * @param {number} offsetY - Vertical offset to factor in to the multiplication.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n multiplyWithOffset: function (src, offsetX, offsetY)\r\n {\r\n var matrix = this.matrix;\r\n var otherMatrix = src.matrix;\r\n\r\n var a0 = matrix[0];\r\n var b0 = matrix[1];\r\n var c0 = matrix[2];\r\n var d0 = matrix[3];\r\n var tx0 = matrix[4];\r\n var ty0 = matrix[5];\r\n\r\n var pse = offsetX * a0 + offsetY * c0 + tx0;\r\n var psf = offsetX * b0 + offsetY * d0 + ty0;\r\n\r\n var a1 = otherMatrix[0];\r\n var b1 = otherMatrix[1];\r\n var c1 = otherMatrix[2];\r\n var d1 = otherMatrix[3];\r\n var tx1 = otherMatrix[4];\r\n var ty1 = otherMatrix[5];\r\n\r\n matrix[0] = a1 * a0 + b1 * c0;\r\n matrix[1] = a1 * b0 + b1 * d0;\r\n matrix[2] = c1 * a0 + d1 * c0;\r\n matrix[3] = c1 * b0 + d1 * d0;\r\n matrix[4] = tx1 * a0 + ty1 * c0 + pse;\r\n matrix[5] = tx1 * b0 + ty1 * d0 + psf;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#transform\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The Scale X value.\r\n * @param {number} b - The Shear Y value.\r\n * @param {number} c - The Shear X value.\r\n * @param {number} d - The Scale Y value.\r\n * @param {number} tx - The Translate X value.\r\n * @param {number} ty - The Translate Y value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n transform: function (a, b, c, d, tx, ty)\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a0 = matrix[0];\r\n var b0 = matrix[1];\r\n var c0 = matrix[2];\r\n var d0 = matrix[3];\r\n var tx0 = matrix[4];\r\n var ty0 = matrix[5];\r\n\r\n matrix[0] = a * a0 + b * c0;\r\n matrix[1] = a * b0 + b * d0;\r\n matrix[2] = c * a0 + d * c0;\r\n matrix[3] = c * b0 + d * d0;\r\n matrix[4] = tx * a0 + ty * c0 + tx0;\r\n matrix[5] = tx * b0 + ty * d0 + ty0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform a point using this Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#transformPoint\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the point to transform.\r\n * @param {number} y - The y coordinate of the point to transform.\r\n * @param {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} point - The Point object to store the transformed coordinates.\r\n *\r\n * @return {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} The Point containing the transformed coordinates.\r\n */\r\n transformPoint: function (x, y, point)\r\n {\r\n if (point === undefined) { point = { x: 0, y: 0 }; }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n point.x = x * a + y * c + tx;\r\n point.y = x * b + y * d + ty;\r\n\r\n return point;\r\n },\r\n\r\n /**\r\n * Invert the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#invert\r\n * @since 3.0.0\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n invert: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n var n = a * d - b * c;\r\n\r\n matrix[0] = d / n;\r\n matrix[1] = -b / n;\r\n matrix[2] = -c / n;\r\n matrix[3] = a / n;\r\n matrix[4] = (c * ty - d * tx) / n;\r\n matrix[5] = -(a * ty - b * tx) / n;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix to copy those of the matrix given.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFrom\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n copyFrom: function (src)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = src.a;\r\n matrix[1] = src.b;\r\n matrix[2] = src.c;\r\n matrix[3] = src.d;\r\n matrix[4] = src.e;\r\n matrix[5] = src.f;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix to copy those of the array given.\r\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFromArray\r\n * @since 3.11.0\r\n *\r\n * @param {array} src - The array of values to set into this matrix.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n copyFromArray: function (src)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = src[0];\r\n matrix[1] = src[1];\r\n matrix[2] = src[2];\r\n matrix[3] = src[3];\r\n matrix[4] = src[4];\r\n matrix[5] = src[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values from this Matrix to the given Canvas Rendering Context.\r\n * This will use the Context.transform method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToContext\r\n * @since 3.12.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\r\n */\r\n copyToContext: function (ctx)\r\n {\r\n var matrix = this.matrix;\r\n\r\n ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n return ctx;\r\n },\r\n\r\n /**\r\n * Copy the values from this Matrix to the given Canvas Rendering Context.\r\n * This will use the Context.setTransform method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setToContext\r\n * @since 3.12.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\r\n */\r\n setToContext: function (ctx)\r\n {\r\n var matrix = this.matrix;\r\n\r\n ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n return ctx;\r\n },\r\n\r\n /**\r\n * Copy the values in this Matrix to the array given.\r\n * \r\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToArray\r\n * @since 3.12.0\r\n *\r\n * @param {array} [out] - The array to copy the matrix values in to.\r\n *\r\n * @return {array} An array where elements 0 to 5 contain the values from this matrix.\r\n */\r\n copyToArray: function (out)\r\n {\r\n var matrix = this.matrix;\r\n\r\n if (out === undefined)\r\n {\r\n out = [ matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5] ];\r\n }\r\n else\r\n {\r\n out[0] = matrix[0];\r\n out[1] = matrix[1];\r\n out[2] = matrix[2];\r\n out[3] = matrix[3];\r\n out[4] = matrix[4];\r\n out[5] = matrix[5];\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setTransform\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The Scale X value.\r\n * @param {number} b - The Shear Y value.\r\n * @param {number} c - The Shear X value.\r\n * @param {number} d - The Scale Y value.\r\n * @param {number} tx - The Translate X value.\r\n * @param {number} ty - The Translate Y value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n setTransform: function (a, b, c, d, tx, ty)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = a;\r\n matrix[1] = b;\r\n matrix[2] = c;\r\n matrix[3] = d;\r\n matrix[4] = tx;\r\n matrix[5] = ty;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Decompose this Matrix into its translation, scale and rotation values using QR decomposition.\r\n * \r\n * The result must be applied in the following order to reproduce the current matrix:\r\n * \r\n * translate -> rotate -> scale\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#decomposeMatrix\r\n * @since 3.0.0\r\n *\r\n * @return {object} The decomposed Matrix.\r\n */\r\n decomposeMatrix: function ()\r\n {\r\n var decomposedMatrix = this.decomposedMatrix;\r\n\r\n var matrix = this.matrix;\r\n\r\n // a = scale X (1)\r\n // b = shear Y (0)\r\n // c = shear X (0)\r\n // d = scale Y (1)\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n var determ = a * d - b * c;\r\n\r\n decomposedMatrix.translateX = matrix[4];\r\n decomposedMatrix.translateY = matrix[5];\r\n\r\n if (a || b)\r\n {\r\n var r = Math.sqrt(a * a + b * b);\r\n\r\n decomposedMatrix.rotation = (b > 0) ? Math.acos(a / r) : -Math.acos(a / r);\r\n decomposedMatrix.scaleX = r;\r\n decomposedMatrix.scaleY = determ / r;\r\n }\r\n else if (c || d)\r\n {\r\n var s = Math.sqrt(c * c + d * d);\r\n\r\n decomposedMatrix.rotation = Math.PI * 0.5 - (d > 0 ? Math.acos(-c / s) : -Math.acos(c / s));\r\n decomposedMatrix.scaleX = determ / s;\r\n decomposedMatrix.scaleY = s;\r\n }\r\n else\r\n {\r\n decomposedMatrix.rotation = 0;\r\n decomposedMatrix.scaleX = 0;\r\n decomposedMatrix.scaleY = 0;\r\n }\r\n\r\n return decomposedMatrix;\r\n },\r\n\r\n /**\r\n * Apply the identity, translate, rotate and scale operations on the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#applyITRS\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation.\r\n * @param {number} y - The vertical translation.\r\n * @param {number} rotation - The angle of rotation in radians.\r\n * @param {number} scaleX - The horizontal scale.\r\n * @param {number} scaleY - The vertical scale.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n applyITRS: function (x, y, rotation, scaleX, scaleY)\r\n {\r\n var matrix = this.matrix;\r\n\r\n var radianSin = Math.sin(rotation);\r\n var radianCos = Math.cos(rotation);\r\n\r\n // Translate\r\n matrix[4] = x;\r\n matrix[5] = y;\r\n\r\n // Rotate and Scale\r\n matrix[0] = radianCos * scaleX;\r\n matrix[1] = radianSin * scaleX;\r\n matrix[2] = -radianSin * scaleY;\r\n matrix[3] = radianCos * scaleY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes the `x` and `y` values and returns a new position in the `output` vector that is the inverse of\r\n * the current matrix with its transformation applied.\r\n * \r\n * Can be used to translate points from world to local space.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#applyInverse\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - The x position to translate.\r\n * @param {number} y - The y position to translate.\r\n * @param {Phaser.Math.Vector2} [output] - A Vector2, or point-like object, to store the results in.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates, inverse-transformed through this matrix.\r\n */\r\n applyInverse: function (x, y, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n var id = 1 / ((a * d) + (c * -b));\r\n\r\n output.x = (d * id * x) + (-c * id * y) + (((ty * c) - (tx * d)) * id);\r\n output.y = (a * id * y) + (-b * id * x) + (((-ty * a) + (tx * b)) * id);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the X component of this matrix multiplied by the given values.\r\n * This is the same as `x * a + y * c + e`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getX\r\n * @since 3.12.0\r\n * \r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n *\r\n * @return {number} The calculated x value.\r\n */\r\n getX: function (x, y)\r\n {\r\n return x * this.a + y * this.c + this.e;\r\n },\r\n\r\n /**\r\n * Returns the Y component of this matrix multiplied by the given values.\r\n * This is the same as `x * b + y * d + f`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getY\r\n * @since 3.12.0\r\n * \r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n *\r\n * @return {number} The calculated y value.\r\n */\r\n getY: function (x, y)\r\n {\r\n return x * this.b + y * this.d + this.f;\r\n },\r\n\r\n /**\r\n * Returns a string that can be used in a CSS Transform call as a `matrix` property.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getCSSMatrix\r\n * @since 3.12.0\r\n *\r\n * @return {string} A string containing the CSS Transform matrix values.\r\n */\r\n getCSSMatrix: function ()\r\n {\r\n var m = this.matrix;\r\n\r\n return 'matrix(' + m[0] + ',' + m[1] + ',' + m[2] + ',' + m[3] + ',' + m[4] + ',' + m[5] + ')';\r\n },\r\n\r\n /**\r\n * Destroys this Transform Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#destroy\r\n * @since 3.4.0\r\n */\r\n destroy: function ()\r\n {\r\n this.matrix = null;\r\n this.decomposedMatrix = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TransformMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 1; // 0001\r\n\r\n/**\r\n * Provides methods used for setting the visibility of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Visible\r\n * @since 3.0.0\r\n */\r\n\r\nvar Visible = {\r\n\r\n /**\r\n * Private internal value. Holds the visible value.\r\n * \r\n * @name Phaser.GameObjects.Components.Visible#_visible\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n _visible: true,\r\n\r\n /**\r\n * The visible state of the Game Object.\r\n * \r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n * \r\n * @name Phaser.GameObjects.Components.Visible#visible\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n visible: {\r\n\r\n get: function ()\r\n {\r\n return this._visible;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value)\r\n {\r\n this._visible = true;\r\n this.renderFlags |= _FLAG;\r\n }\r\n else\r\n {\r\n this._visible = false;\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the visibility of this Game Object.\r\n * \r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n *\r\n * @method Phaser.GameObjects.Components.Visible#setVisible\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The visible state of the Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setVisible: function (value)\r\n {\r\n this.visible = value;\r\n\r\n return this;\r\n }\r\n};\r\n\r\nmodule.exports = Visible;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Destroy Event.\r\n * \r\n * This event is dispatched when a Game Object instance is being destroyed.\r\n * \r\n * Listen for it on a Game Object instance using `GameObject.on('destroy', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#DESTROY\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed.\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Complete Event.\r\n * \r\n * This event is dispatched when a Video finishes playback by reaching the end of its duration. It\r\n * is also dispatched if a video marker sequence is being played and reaches the end.\r\n * \r\n * Note that not all videos can fire this event. Live streams, for example, have no fixed duration,\r\n * so never technically 'complete'.\r\n * \r\n * If a video is stopped from playback, via the `Video.stop` method, it will emit the\r\n * `VIDEO_STOP` event instead of this one.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('complete', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_COMPLETE\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed playback.\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Created Event.\r\n * \r\n * This event is dispatched when the texture for a Video has been created. This happens\r\n * when enough of the video source has been loaded that the browser is able to render a\r\n * frame from it.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('created', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_CREATED\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\r\n * @param {integer} width - The width of the video.\r\n * @param {integer} height - The height of the video.\r\n */\r\nmodule.exports = 'created';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Error Event.\r\n * \r\n * This event is dispatched when a Video tries to play a source that does not exist, or is the wrong file type.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('error', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_ERROR\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which threw the error.\r\n * @param {Event} event - The native DOM event the browser raised during playback.\r\n */\r\nmodule.exports = 'error';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Loop Event.\r\n * \r\n * This event is dispatched when a Video that is currently playing has looped. This only\r\n * happens if the `loop` parameter was specified, or the `setLoop` method was called,\r\n * and if the video has a fixed duration. Video streams, for example, cannot loop, as\r\n * they have no duration.\r\n * \r\n * Looping is based on the result of the Video `timeupdate` event. This event is not\r\n * frame-accurate, due to the way browsers work, so please do not rely on this loop\r\n * event to be time or frame precise.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('loop', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_LOOP\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which has looped.\r\n */\r\nmodule.exports = 'loop';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Play Event.\r\n * \r\n * This event is dispatched when a Video begins playback. For videos that do not require\r\n * interaction unlocking, this is usually as soon as the `Video.play` method is called.\r\n * However, for videos that require unlocking, it is fired once playback begins after\r\n * they've been unlocked.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('play', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_PLAY\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started playback.\r\n */\r\nmodule.exports = 'play';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Seeked Event.\r\n * \r\n * This event is dispatched when a Video completes seeking to a new point in its timeline.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('seeked', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_SEEKED\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed seeking.\r\n */\r\nmodule.exports = 'seeked';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Seeking Event.\r\n * \r\n * This event is dispatched when a Video _begins_ seeking to a new point in its timeline.\r\n * When the seek is complete, it will dispatch the `VIDEO_SEEKED` event to conclude.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('seeking', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_SEEKING\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started seeking.\r\n */\r\nmodule.exports = 'seeking';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Stopped Event.\r\n * \r\n * This event is dispatched when a Video is stopped from playback via a call to the `Video.stop` method,\r\n * either directly via game code, or indirectly as the result of changing a video source or destroying it.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('stop', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_STOP\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which stopped playback.\r\n */\r\nmodule.exports = 'stop';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Timeout Event.\r\n * \r\n * This event is dispatched when a Video has exhausted its allocated time while trying to connect to a video\r\n * source to start playback.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('timeout', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_TIMEOUT\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which timed out.\r\n */\r\nmodule.exports = 'timeout';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Unlocked Event.\r\n * \r\n * This event is dispatched when a Video that was prevented from playback due to the browsers\r\n * Media Engagement Interaction policy, is unlocked by a user gesture.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('unlocked', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_UNLOCKED\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\r\n */\r\nmodule.exports = 'unlocked';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.GameObjects.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n DESTROY: require('./DESTROY_EVENT'),\r\n VIDEO_COMPLETE: require('./VIDEO_COMPLETE_EVENT'),\r\n VIDEO_CREATED: require('./VIDEO_CREATED_EVENT'),\r\n VIDEO_ERROR: require('./VIDEO_ERROR_EVENT'),\r\n VIDEO_LOOP: require('./VIDEO_LOOP_EVENT'),\r\n VIDEO_PLAY: require('./VIDEO_PLAY_EVENT'),\r\n VIDEO_SEEKED: require('./VIDEO_SEEKED_EVENT'),\r\n VIDEO_SEEKING: require('./VIDEO_SEEKING_EVENT'),\r\n VIDEO_STOP: require('./VIDEO_STOP_EVENT'),\r\n VIDEO_TIMEOUT: require('./VIDEO_TIMEOUT_EVENT'),\r\n VIDEO_UNLOCKED: require('./VIDEO_UNLOCKED_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar CONST = require('./const');\r\nvar Events = require('./events');\r\nvar GetFastValue = require('../utils/object/GetFastValue');\r\nvar GetURL = require('./GetURL');\r\nvar MergeXHRSettings = require('./MergeXHRSettings');\r\nvar XHRLoader = require('./XHRLoader');\r\nvar XHRSettings = require('./XHRSettings');\r\n\r\n/**\r\n * @classdesc\r\n * The base File class used by all File Types that the Loader can support.\r\n * You shouldn't create an instance of a File directly, but should extend it with your own class, setting a custom type and processing methods.\r\n *\r\n * @class File\r\n * @memberof Phaser.Loader\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\r\n * @param {Phaser.Types.Loader.FileConfig} fileConfig - The file configuration object, as created by the file type.\r\n */\r\nvar File = new Class({\r\n\r\n initialize:\r\n\r\n function File (loader, fileConfig)\r\n {\r\n /**\r\n * A reference to the Loader that is going to load this file.\r\n *\r\n * @name Phaser.Loader.File#loader\r\n * @type {Phaser.Loader.LoaderPlugin}\r\n * @since 3.0.0\r\n */\r\n this.loader = loader;\r\n\r\n /**\r\n * A reference to the Cache, or Texture Manager, that is going to store this file if it loads.\r\n *\r\n * @name Phaser.Loader.File#cache\r\n * @type {(Phaser.Cache.BaseCache|Phaser.Textures.TextureManager)}\r\n * @since 3.7.0\r\n */\r\n this.cache = GetFastValue(fileConfig, 'cache', false);\r\n\r\n /**\r\n * The file type string (image, json, etc) for sorting within the Loader.\r\n *\r\n * @name Phaser.Loader.File#type\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.type = GetFastValue(fileConfig, 'type', false);\r\n\r\n /**\r\n * Unique cache key (unique within its file type)\r\n *\r\n * @name Phaser.Loader.File#key\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.key = GetFastValue(fileConfig, 'key', false);\r\n\r\n var loadKey = this.key;\r\n\r\n if (loader.prefix && loader.prefix !== '')\r\n {\r\n this.key = loader.prefix + loadKey;\r\n }\r\n\r\n if (!this.type || !this.key)\r\n {\r\n throw new Error('Error calling \\'Loader.' + this.type + '\\' invalid key provided.');\r\n }\r\n\r\n /**\r\n * The URL of the file, not including baseURL.\r\n * Automatically has Loader.path prepended to it.\r\n *\r\n * @name Phaser.Loader.File#url\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.url = GetFastValue(fileConfig, 'url');\r\n\r\n if (this.url === undefined)\r\n {\r\n this.url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', '');\r\n }\r\n else if (typeof(this.url) !== 'function')\r\n {\r\n this.url = loader.path + this.url;\r\n }\r\n\r\n /**\r\n * The final URL this file will load from, including baseURL and path.\r\n * Set automatically when the Loader calls 'load' on this file.\r\n *\r\n * @name Phaser.Loader.File#src\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.src = '';\r\n\r\n /**\r\n * The merged XHRSettings for this file.\r\n *\r\n * @name Phaser.Loader.File#xhrSettings\r\n * @type {Phaser.Types.Loader.XHRSettingsObject}\r\n * @since 3.0.0\r\n */\r\n this.xhrSettings = XHRSettings(GetFastValue(fileConfig, 'responseType', undefined));\r\n\r\n if (GetFastValue(fileConfig, 'xhrSettings', false))\r\n {\r\n this.xhrSettings = MergeXHRSettings(this.xhrSettings, GetFastValue(fileConfig, 'xhrSettings', {}));\r\n }\r\n\r\n /**\r\n * The XMLHttpRequest instance (as created by XHR Loader) that is loading this File.\r\n *\r\n * @name Phaser.Loader.File#xhrLoader\r\n * @type {?XMLHttpRequest}\r\n * @since 3.0.0\r\n */\r\n this.xhrLoader = null;\r\n\r\n /**\r\n * The current state of the file. One of the FILE_CONST values.\r\n *\r\n * @name Phaser.Loader.File#state\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.state = (typeof(this.url) === 'function') ? CONST.FILE_POPULATED : CONST.FILE_PENDING;\r\n\r\n /**\r\n * The total size of this file.\r\n * Set by onProgress and only if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#bytesTotal\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.bytesTotal = 0;\r\n\r\n /**\r\n * Updated as the file loads.\r\n * Only set if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#bytesLoaded\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.bytesLoaded = -1;\r\n\r\n /**\r\n * A percentage value between 0 and 1 indicating how much of this file has loaded.\r\n * Only set if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#percentComplete\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.percentComplete = -1;\r\n\r\n /**\r\n * For CORs based loading.\r\n * If this is undefined then the File will check BaseLoader.crossOrigin and use that (if set)\r\n *\r\n * @name Phaser.Loader.File#crossOrigin\r\n * @type {(string|undefined)}\r\n * @since 3.0.0\r\n */\r\n this.crossOrigin = undefined;\r\n\r\n /**\r\n * The processed file data, stored here after the file has loaded.\r\n *\r\n * @name Phaser.Loader.File#data\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.data = undefined;\r\n\r\n /**\r\n * A config object that can be used by file types to store transitional data.\r\n *\r\n * @name Phaser.Loader.File#config\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.config = GetFastValue(fileConfig, 'config', {});\r\n\r\n /**\r\n * If this is a multipart file, i.e. an atlas and its json together, then this is a reference\r\n * to the parent MultiFile. Set and used internally by the Loader or specific file types.\r\n *\r\n * @name Phaser.Loader.File#multiFile\r\n * @type {?Phaser.Loader.MultiFile}\r\n * @since 3.7.0\r\n */\r\n this.multiFile;\r\n\r\n /**\r\n * Does this file have an associated linked file? Such as an image and a normal map.\r\n * Atlases and Bitmap Fonts use the multiFile, because those files need loading together but aren't\r\n * actually bound by data, where-as a linkFile is.\r\n *\r\n * @name Phaser.Loader.File#linkFile\r\n * @type {?Phaser.Loader.File}\r\n * @since 3.7.0\r\n */\r\n this.linkFile;\r\n },\r\n\r\n /**\r\n * Links this File with another, so they depend upon each other for loading and processing.\r\n *\r\n * @method Phaser.Loader.File#setLink\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} fileB - The file to link to this one.\r\n */\r\n setLink: function (fileB)\r\n {\r\n this.linkFile = fileB;\r\n\r\n fileB.linkFile = this;\r\n },\r\n\r\n /**\r\n * Resets the XHRLoader instance this file is using.\r\n *\r\n * @method Phaser.Loader.File#resetXHR\r\n * @since 3.0.0\r\n */\r\n resetXHR: function ()\r\n {\r\n if (this.xhrLoader)\r\n {\r\n this.xhrLoader.onload = undefined;\r\n this.xhrLoader.onerror = undefined;\r\n this.xhrLoader.onprogress = undefined;\r\n }\r\n },\r\n\r\n /**\r\n * Called by the Loader, starts the actual file downloading.\r\n * During the load the methods onLoad, onError and onProgress are called, based on the XHR events.\r\n * You shouldn't normally call this method directly, it's meant to be invoked by the Loader.\r\n *\r\n * @method Phaser.Loader.File#load\r\n * @since 3.0.0\r\n */\r\n load: function ()\r\n {\r\n if (this.state === CONST.FILE_POPULATED)\r\n {\r\n // Can happen for example in a JSONFile if they've provided a JSON object instead of a URL\r\n this.loader.nextFile(this, true);\r\n }\r\n else\r\n {\r\n this.src = GetURL(this, this.loader.baseURL);\r\n\r\n if (this.src.indexOf('data:') === 0)\r\n {\r\n console.warn('Local data URIs are not supported: ' + this.key);\r\n }\r\n else\r\n {\r\n // The creation of this XHRLoader starts the load process going.\r\n // It will automatically call the following, based on the load outcome:\r\n // \r\n // xhr.onload = this.onLoad\r\n // xhr.onerror = this.onError\r\n // xhr.onprogress = this.onProgress\r\n\r\n this.xhrLoader = XHRLoader(this, this.loader.xhr);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Called when the file finishes loading, is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onLoad\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\r\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this load.\r\n */\r\n onLoad: function (xhr, event)\r\n {\r\n var localFileOk = ((xhr.responseURL && xhr.responseURL.indexOf('file://') === 0 && event.target.status === 0));\r\n\r\n var success = !(event.target && event.target.status !== 200) || localFileOk;\r\n\r\n // Handle HTTP status codes of 4xx and 5xx as errors, even if xhr.onerror was not called.\r\n if (xhr.readyState === 4 && xhr.status >= 400 && xhr.status <= 599)\r\n {\r\n success = false;\r\n }\r\n\r\n this.resetXHR();\r\n\r\n this.loader.nextFile(this, success);\r\n },\r\n\r\n /**\r\n * Called if the file errors while loading, is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onError\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\r\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this error.\r\n */\r\n onError: function ()\r\n {\r\n this.resetXHR();\r\n\r\n this.loader.nextFile(this, false);\r\n },\r\n\r\n /**\r\n * Called during the file load progress. Is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onProgress\r\n * @fires Phaser.Loader.Events#FILE_PROGRESS\r\n * @since 3.0.0\r\n *\r\n * @param {ProgressEvent} event - The DOM ProgressEvent.\r\n */\r\n onProgress: function (event)\r\n {\r\n if (event.lengthComputable)\r\n {\r\n this.bytesLoaded = event.loaded;\r\n this.bytesTotal = event.total;\r\n\r\n this.percentComplete = Math.min((this.bytesLoaded / this.bytesTotal), 1);\r\n\r\n this.loader.emit(Events.FILE_PROGRESS, this, this.percentComplete);\r\n }\r\n },\r\n\r\n /**\r\n * Usually overridden by the FileTypes and is called by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data, for example a JSON file will parse itself during this stage.\r\n *\r\n * @method Phaser.Loader.File#onProcess\r\n * @since 3.0.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.onProcessComplete();\r\n },\r\n\r\n /**\r\n * Called when the File has completed processing.\r\n * Checks on the state of its multifile, if set.\r\n *\r\n * @method Phaser.Loader.File#onProcessComplete\r\n * @since 3.7.0\r\n */\r\n onProcessComplete: function ()\r\n {\r\n this.state = CONST.FILE_COMPLETE;\r\n\r\n if (this.multiFile)\r\n {\r\n this.multiFile.onFileComplete(this);\r\n }\r\n\r\n this.loader.fileProcessComplete(this);\r\n },\r\n\r\n /**\r\n * Called when the File has completed processing but it generated an error.\r\n * Checks on the state of its multifile, if set.\r\n *\r\n * @method Phaser.Loader.File#onProcessError\r\n * @since 3.7.0\r\n */\r\n onProcessError: function ()\r\n {\r\n this.state = CONST.FILE_ERRORED;\r\n\r\n if (this.multiFile)\r\n {\r\n this.multiFile.onFileFailed(this);\r\n }\r\n\r\n this.loader.fileProcessComplete(this);\r\n },\r\n\r\n /**\r\n * Checks if a key matching the one used by this file exists in the target Cache or not.\r\n * This is called automatically by the LoaderPlugin to decide if the file can be safely\r\n * loaded or will conflict.\r\n *\r\n * @method Phaser.Loader.File#hasCacheConflict\r\n * @since 3.7.0\r\n *\r\n * @return {boolean} `true` if adding this file will cause a conflict, otherwise `false`.\r\n */\r\n hasCacheConflict: function ()\r\n {\r\n return (this.cache && this.cache.exists(this.key));\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n * This method is often overridden by specific file types.\r\n *\r\n * @method Phaser.Loader.File#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.cache)\r\n {\r\n this.cache.add(this.key, this.data);\r\n }\r\n\r\n this.pendingDestroy();\r\n },\r\n\r\n /**\r\n * Called once the file has been added to its cache and is now ready for deletion from the Loader.\r\n * It will emit a `filecomplete` event from the LoaderPlugin.\r\n *\r\n * @method Phaser.Loader.File#pendingDestroy\r\n * @fires Phaser.Loader.Events#FILE_COMPLETE\r\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @since 3.7.0\r\n */\r\n pendingDestroy: function (data)\r\n {\r\n if (data === undefined) { data = this.data; }\r\n\r\n var key = this.key;\r\n var type = this.type;\r\n\r\n this.loader.emit(Events.FILE_COMPLETE, key, type, data);\r\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type, data);\r\n\r\n this.loader.flagForRemoval(this);\r\n },\r\n\r\n /**\r\n * Destroy this File and any references it holds.\r\n *\r\n * @method Phaser.Loader.File#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.loader = null;\r\n this.cache = null;\r\n this.xhrSettings = null;\r\n this.multiFile = null;\r\n this.linkFile = null;\r\n this.data = null;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Static method for creating object URL using URL API and setting it as image 'src' attribute.\r\n * If URL API is not supported (usually on old browsers) it falls back to creating Base64 encoded url using FileReader.\r\n *\r\n * @method Phaser.Loader.File.createObjectURL\r\n * @static\r\n * @since 3.7.0\r\n * \r\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be set to object URL.\r\n * @param {Blob} blob - A Blob object to create an object URL for.\r\n * @param {string} defaultType - Default mime type used if blob type is not available.\r\n */\r\nFile.createObjectURL = function (image, blob, defaultType)\r\n{\r\n if (typeof URL === 'function')\r\n {\r\n image.src = URL.createObjectURL(blob);\r\n }\r\n else\r\n {\r\n var reader = new FileReader();\r\n\r\n reader.onload = function ()\r\n {\r\n image.removeAttribute('crossOrigin');\r\n image.src = 'data:' + (blob.type || defaultType) + ';base64,' + reader.result.split(',')[1];\r\n };\r\n\r\n reader.onerror = image.onerror;\r\n\r\n reader.readAsDataURL(blob);\r\n }\r\n};\r\n\r\n/**\r\n * Static method for releasing an existing object URL which was previously created\r\n * by calling {@link File#createObjectURL} method.\r\n *\r\n * @method Phaser.Loader.File.revokeObjectURL\r\n * @static\r\n * @since 3.7.0\r\n * \r\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be revoked.\r\n */\r\nFile.revokeObjectURL = function (image)\r\n{\r\n if (typeof URL === 'function')\r\n {\r\n URL.revokeObjectURL(image.src);\r\n }\r\n};\r\n\r\nmodule.exports = File;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar types = {};\r\n\r\n/**\r\n * @namespace Phaser.Loader.FileTypesManager\r\n */\r\n\r\nvar FileTypesManager = {\r\n\r\n /**\r\n * Static method called when a LoaderPlugin is created.\r\n * \r\n * Loops through the local types object and injects all of them as\r\n * properties into the LoaderPlugin instance.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.install\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - The LoaderPlugin to install the types into.\r\n */\r\n install: function (loader)\r\n {\r\n for (var key in types)\r\n {\r\n loader[key] = types[key];\r\n }\r\n },\r\n\r\n /**\r\n * Static method called directly by the File Types.\r\n * \r\n * The key is a reference to the function used to load the files via the Loader, i.e. `image`.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.register\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key that will be used as the method name in the LoaderPlugin.\r\n * @param {function} factoryFunction - The function that will be called when LoaderPlugin.key is invoked.\r\n */\r\n register: function (key, factoryFunction)\r\n {\r\n types[key] = factoryFunction;\r\n },\r\n\r\n /**\r\n * Removed all associated file types.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n types = {};\r\n }\r\n\r\n};\r\n\r\nmodule.exports = FileTypesManager;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Given a File and a baseURL value this returns the URL the File will use to download from.\r\n *\r\n * @function Phaser.Loader.GetURL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File object.\r\n * @param {string} baseURL - A default base URL.\r\n *\r\n * @return {string} The URL the File will use.\r\n */\r\nvar GetURL = function (file, baseURL)\r\n{\r\n if (!file.url)\r\n {\r\n return false;\r\n }\r\n\r\n if (file.url.match(/^(?:blob:|data:|http:\\/\\/|https:\\/\\/|\\/\\/)/))\r\n {\r\n return file.url;\r\n }\r\n else\r\n {\r\n return baseURL + file.url;\r\n }\r\n};\r\n\r\nmodule.exports = GetURL;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extend = require('../utils/object/Extend');\r\nvar XHRSettings = require('./XHRSettings');\r\n\r\n/**\r\n * Takes two XHRSettings Objects and creates a new XHRSettings object from them.\r\n *\r\n * The new object is seeded by the values given in the global settings, but any setting in\r\n * the local object overrides the global ones.\r\n *\r\n * @function Phaser.Loader.MergeXHRSettings\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} global - The global XHRSettings object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} local - The local XHRSettings object.\r\n *\r\n * @return {Phaser.Types.Loader.XHRSettingsObject} A newly formed XHRSettings object.\r\n */\r\nvar MergeXHRSettings = function (global, local)\r\n{\r\n var output = (global === undefined) ? XHRSettings() : Extend({}, global);\r\n\r\n if (local)\r\n {\r\n for (var setting in local)\r\n {\r\n if (local[setting] !== undefined)\r\n {\r\n output[setting] = local[setting];\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = MergeXHRSettings;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A MultiFile is a special kind of parent that contains two, or more, Files as children and looks after\r\n * the loading and processing of them all. It is commonly extended and used as a base class for file types such as AtlasJSON or BitmapFont.\r\n * \r\n * You shouldn't create an instance of a MultiFile directly, but should extend it with your own class, setting a custom type and processing methods.\r\n *\r\n * @class MultiFile\r\n * @memberof Phaser.Loader\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\r\n * @param {string} type - The file type string for sorting within the Loader.\r\n * @param {string} key - The key of the file within the loader.\r\n * @param {Phaser.Loader.File[]} files - An array of Files that make-up this MultiFile.\r\n */\r\nvar MultiFile = new Class({\r\n\r\n initialize:\r\n\r\n function MultiFile (loader, type, key, files)\r\n {\r\n /**\r\n * A reference to the Loader that is going to load this file.\r\n *\r\n * @name Phaser.Loader.MultiFile#loader\r\n * @type {Phaser.Loader.LoaderPlugin}\r\n * @since 3.7.0\r\n */\r\n this.loader = loader;\r\n\r\n /**\r\n * The file type string for sorting within the Loader.\r\n *\r\n * @name Phaser.Loader.MultiFile#type\r\n * @type {string}\r\n * @since 3.7.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * Unique cache key (unique within its file type)\r\n *\r\n * @name Phaser.Loader.MultiFile#key\r\n * @type {string}\r\n * @since 3.7.0\r\n */\r\n this.key = key;\r\n\r\n /**\r\n * The current index being used by multi-file loaders to avoid key clashes.\r\n *\r\n * @name Phaser.Loader.MultiFile#multiKeyIndex\r\n * @type {integer}\r\n * @private\r\n * @since 3.20.0\r\n */\r\n this.multiKeyIndex = loader.multiKeyIndex++;\r\n\r\n /**\r\n * Array of files that make up this MultiFile.\r\n *\r\n * @name Phaser.Loader.MultiFile#files\r\n * @type {Phaser.Loader.File[]}\r\n * @since 3.7.0\r\n */\r\n this.files = files;\r\n\r\n /**\r\n * The completion status of this MultiFile.\r\n *\r\n * @name Phaser.Loader.MultiFile#complete\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.7.0\r\n */\r\n this.complete = false;\r\n\r\n /**\r\n * The number of files to load.\r\n *\r\n * @name Phaser.Loader.MultiFile#pending\r\n * @type {integer}\r\n * @since 3.7.0\r\n */\r\n\r\n this.pending = files.length;\r\n\r\n /**\r\n * The number of files that failed to load.\r\n *\r\n * @name Phaser.Loader.MultiFile#failed\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.7.0\r\n */\r\n this.failed = 0;\r\n\r\n /**\r\n * A storage container for transient data that the loading files need.\r\n *\r\n * @name Phaser.Loader.MultiFile#config\r\n * @type {any}\r\n * @since 3.7.0\r\n */\r\n this.config = {};\r\n\r\n /**\r\n * A reference to the Loaders baseURL at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#baseURL\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.baseURL = loader.baseURL;\r\n\r\n /**\r\n * A reference to the Loaders path at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#path\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.path = loader.path;\r\n\r\n /**\r\n * A reference to the Loaders prefix at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#prefix\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.prefix = loader.prefix;\r\n\r\n // Link the files\r\n for (var i = 0; i < files.length; i++)\r\n {\r\n files[i].multiFile = this;\r\n }\r\n },\r\n\r\n /**\r\n * Checks if this MultiFile is ready to process its children or not.\r\n *\r\n * @method Phaser.Loader.MultiFile#isReadyToProcess\r\n * @since 3.7.0\r\n *\r\n * @return {boolean} `true` if all children of this MultiFile have loaded, otherwise `false`.\r\n */\r\n isReadyToProcess: function ()\r\n {\r\n return (this.pending === 0 && this.failed === 0 && !this.complete);\r\n },\r\n\r\n /**\r\n * Adds another child to this MultiFile, increases the pending count and resets the completion status.\r\n *\r\n * @method Phaser.Loader.MultiFile#addToMultiFile\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} files - The File to add to this MultiFile.\r\n *\r\n * @return {Phaser.Loader.MultiFile} This MultiFile instance.\r\n */\r\n addToMultiFile: function (file)\r\n {\r\n this.files.push(file);\r\n\r\n file.multiFile = this;\r\n\r\n this.pending++;\r\n\r\n this.complete = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Called by each File when it finishes loading.\r\n *\r\n * @method Phaser.Loader.MultiFile#onFileComplete\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has completed processing.\r\n */\r\n onFileComplete: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.pending--;\r\n }\r\n },\r\n\r\n /**\r\n * Called by each File that fails to load.\r\n *\r\n * @method Phaser.Loader.MultiFile#onFileFailed\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has failed to load.\r\n */\r\n onFileFailed: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.failed++;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MultiFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MergeXHRSettings = require('./MergeXHRSettings');\r\n\r\n/**\r\n * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings\r\n * and starts the download of it. It uses the Files own XHRSettings and merges them\r\n * with the global XHRSettings object to set the xhr values before download.\r\n *\r\n * @function Phaser.Loader.XHRLoader\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File to download.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} globalXHRSettings - The global XHRSettings object.\r\n *\r\n * @return {XMLHttpRequest} The XHR object.\r\n */\r\nvar XHRLoader = function (file, globalXHRSettings)\r\n{\r\n var config = MergeXHRSettings(globalXHRSettings, file.xhrSettings);\r\n\r\n var xhr = new XMLHttpRequest();\r\n\r\n xhr.open('GET', file.src, config.async, config.user, config.password);\r\n\r\n xhr.responseType = file.xhrSettings.responseType;\r\n xhr.timeout = config.timeout;\r\n\r\n if (config.header && config.headerValue)\r\n {\r\n xhr.setRequestHeader(config.header, config.headerValue);\r\n }\r\n\r\n if (config.requestedWith)\r\n {\r\n xhr.setRequestHeader('X-Requested-With', config.requestedWith);\r\n }\r\n\r\n if (config.overrideMimeType)\r\n {\r\n xhr.overrideMimeType(config.overrideMimeType);\r\n }\r\n\r\n // After a successful request, the xhr.response property will contain the requested data as a DOMString, ArrayBuffer, Blob, or Document (depending on what was set for responseType.)\r\n\r\n xhr.onload = file.onLoad.bind(file, xhr);\r\n xhr.onerror = file.onError.bind(file, xhr);\r\n xhr.onprogress = file.onProgress.bind(file);\r\n\r\n // This is the only standard method, the ones above are browser additions (maybe not universal?)\r\n // xhr.onreadystatechange\r\n\r\n xhr.send();\r\n\r\n return xhr;\r\n};\r\n\r\nmodule.exports = XHRLoader;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Creates an XHRSettings Object with default values.\r\n *\r\n * @function Phaser.Loader.XHRSettings\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequestResponseType} [responseType=''] - The responseType, such as 'text'.\r\n * @param {boolean} [async=true] - Should the XHR request use async or not?\r\n * @param {string} [user=''] - Optional username for the XHR request.\r\n * @param {string} [password=''] - Optional password for the XHR request.\r\n * @param {integer} [timeout=0] - Optional XHR timeout value.\r\n *\r\n * @return {Phaser.Types.Loader.XHRSettingsObject} The XHRSettings object as used by the Loader.\r\n */\r\nvar XHRSettings = function (responseType, async, user, password, timeout)\r\n{\r\n if (responseType === undefined) { responseType = ''; }\r\n if (async === undefined) { async = true; }\r\n if (user === undefined) { user = ''; }\r\n if (password === undefined) { password = ''; }\r\n if (timeout === undefined) { timeout = 0; }\r\n\r\n // Before sending a request, set the xhr.responseType to \"text\",\r\n // \"arraybuffer\", \"blob\", or \"document\", depending on your data needs.\r\n // Note, setting xhr.responseType = '' (or omitting) will default the response to \"text\".\r\n\r\n return {\r\n\r\n // Ignored by the Loader, only used by File.\r\n responseType: responseType,\r\n\r\n async: async,\r\n\r\n // credentials\r\n user: user,\r\n password: password,\r\n\r\n // timeout in ms (0 = no timeout)\r\n timeout: timeout,\r\n\r\n // setRequestHeader\r\n header: undefined,\r\n headerValue: undefined,\r\n requestedWith: false,\r\n\r\n // overrideMimeType\r\n overrideMimeType: undefined\r\n\r\n };\r\n};\r\n\r\nmodule.exports = XHRSettings;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FILE_CONST = {\r\n\r\n /**\r\n * The Loader is idle.\r\n * \r\n * @name Phaser.Loader.LOADER_IDLE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_IDLE: 0,\r\n\r\n /**\r\n * The Loader is actively loading.\r\n * \r\n * @name Phaser.Loader.LOADER_LOADING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_LOADING: 1,\r\n\r\n /**\r\n * The Loader is processing files is has loaded.\r\n * \r\n * @name Phaser.Loader.LOADER_PROCESSING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_PROCESSING: 2,\r\n\r\n /**\r\n * The Loader has completed loading and processing.\r\n * \r\n * @name Phaser.Loader.LOADER_COMPLETE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_COMPLETE: 3,\r\n\r\n /**\r\n * The Loader is shutting down.\r\n * \r\n * @name Phaser.Loader.LOADER_SHUTDOWN\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_SHUTDOWN: 4,\r\n\r\n /**\r\n * The Loader has been destroyed.\r\n * \r\n * @name Phaser.Loader.LOADER_DESTROYED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_DESTROYED: 5,\r\n\r\n /**\r\n * File is in the load queue but not yet started\r\n * \r\n * @name Phaser.Loader.FILE_PENDING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_PENDING: 10,\r\n\r\n /**\r\n * File has been started to load by the loader (onLoad called)\r\n * \r\n * @name Phaser.Loader.FILE_LOADING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_LOADING: 11,\r\n\r\n /**\r\n * File has loaded successfully, awaiting processing \r\n * \r\n * @name Phaser.Loader.FILE_LOADED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_LOADED: 12,\r\n\r\n /**\r\n * File failed to load\r\n * \r\n * @name Phaser.Loader.FILE_FAILED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_FAILED: 13,\r\n\r\n /**\r\n * File is being processed (onProcess callback)\r\n * \r\n * @name Phaser.Loader.FILE_PROCESSING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_PROCESSING: 14,\r\n\r\n /**\r\n * The File has errored somehow during processing.\r\n * \r\n * @name Phaser.Loader.FILE_ERRORED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_ERRORED: 16,\r\n\r\n /**\r\n * File has finished processing.\r\n * \r\n * @name Phaser.Loader.FILE_COMPLETE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_COMPLETE: 17,\r\n\r\n /**\r\n * File has been destroyed\r\n * \r\n * @name Phaser.Loader.FILE_DESTROYED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_DESTROYED: 18,\r\n\r\n /**\r\n * File was populated from local data and doesn't need an HTTP request\r\n * \r\n * @name Phaser.Loader.FILE_POPULATED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_POPULATED: 19\r\n\r\n};\r\n\r\nmodule.exports = FILE_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Add File Event.\r\n * \r\n * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('addfile', listener)`.\r\n * \r\n * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them.\r\n *\r\n * @event Phaser.Loader.Events#ADD\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The unique key of the file that was added to the Loader.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} string of the file that was added to the Loader, i.e. `image`.\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n * @param {Phaser.Loader.File} file - A reference to the File which was added to the Loader.\r\n */\r\nmodule.exports = 'addfile';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Complete Event.\r\n * \r\n * This event is dispatched when the Loader has fully processed everything in the load queue.\r\n * By this point every loaded file will now be in its associated cache and ready for use.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('complete', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#COMPLETE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n * @param {integer} totalComplete - The total number of files that successfully loaded.\r\n * @param {integer} totalFailed - The total number of files that failed to load.\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Complete Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`.\r\n * \r\n * You can also listen for the completion of a specific file. See the [FILE_KEY_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_KEY_COMPLETE} event.\r\n *\r\n * @event Phaser.Loader.Events#FILE_COMPLETE\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the file that just loaded and finished processing.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\r\n * @param {any} data - The raw data the file contained.\r\n */\r\nmodule.exports = 'filecomplete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Complete Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.\r\n * \r\n * It uses a special dynamic event name constructed from the key and type of the file.\r\n * \r\n * For example, if you have loaded an `image` with a key of `monster`, you can listen for it\r\n * using the following:\r\n *\r\n * ```javascript\r\n * this.load.on('filecomplete-image-monster', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n *\r\n * Or, if you have loaded a texture `atlas` with a key of `Level1`:\r\n * \r\n * ```javascript\r\n * this.load.on('filecomplete-atlas-Level1', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n * \r\n * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`:\r\n * \r\n * ```javascript\r\n * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n * \r\n * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event.\r\n *\r\n * @event Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the file that just loaded and finished processing.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\r\n * @param {any} data - The raw data the file contained.\r\n */\r\nmodule.exports = 'filecomplete-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Error Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when a file fails to load.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('loaderror', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_LOAD_ERROR\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\r\n */\r\nmodule.exports = 'loaderror';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when a file finishes loading,\r\n * but _before_ it is processed and added to the internal Phaser caches.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('load', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_LOAD\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.File} file - A reference to the File which just finished loading.\r\n */\r\nmodule.exports = 'load';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Progress Event.\r\n * \r\n * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and\r\n * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_PROGRESS\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\r\n * @param {number} percentComplete - A value between 0 and 1 indicating how 'complete' this file is.\r\n */\r\nmodule.exports = 'fileprogress';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Post Process Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue.\r\n * It is dispatched before the internal lists are cleared and each File is destroyed.\r\n * \r\n * Use this hook to perform any last minute processing of files that can only happen once the\r\n * Loader has completed, but prior to it emitting the `complete` event.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('postprocess', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#POST_PROCESS\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n */\r\nmodule.exports = 'postprocess';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Progress Event.\r\n * \r\n * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('progress', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#PROGRESS\r\n * @since 3.0.0\r\n * \r\n * @param {number} progress - The current progress of the load. A value between 0 and 1.\r\n */\r\nmodule.exports = 'progress';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Start Event.\r\n * \r\n * This event is dispatched when the Loader starts running. At this point load progress is zero.\r\n * \r\n * This event is dispatched even if there aren't any files in the load queue.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('start', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#START\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Loader.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADD: require('./ADD_EVENT'),\r\n COMPLETE: require('./COMPLETE_EVENT'),\r\n FILE_COMPLETE: require('./FILE_COMPLETE_EVENT'),\r\n FILE_KEY_COMPLETE: require('./FILE_KEY_COMPLETE_EVENT'),\r\n FILE_LOAD_ERROR: require('./FILE_LOAD_ERROR_EVENT'),\r\n FILE_LOAD: require('./FILE_LOAD_EVENT'),\r\n FILE_PROGRESS: require('./FILE_PROGRESS_EVENT'),\r\n POST_PROCESS: require('./POST_PROCESS_EVENT'),\r\n PROGRESS: require('./PROGRESS_EVENT'),\r\n START: require('./START_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\n\r\n/**\r\n * @classdesc\r\n * A single Image File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#image method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#image.\r\n *\r\n * @class ImageFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. Only provided for, and used by, Sprite Sheets.\r\n */\r\nvar ImageFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function ImageFile (loader, key, url, xhrSettings, frameConfig)\r\n {\r\n var extension = 'png';\r\n var normalMapURL;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n normalMapURL = GetFastValue(config, 'normalMap');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n frameConfig = GetFastValue(config, 'frameConfig');\r\n }\r\n\r\n if (Array.isArray(url))\r\n {\r\n normalMapURL = url[1];\r\n url = url[0];\r\n }\r\n\r\n var fileConfig = {\r\n type: 'image',\r\n cache: loader.textureManager,\r\n extension: extension,\r\n responseType: 'blob',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: frameConfig\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n // Do we have a normal map to load as well?\r\n if (normalMapURL)\r\n {\r\n var normalMap = new ImageFile(loader, this.key, normalMapURL, xhrSettings, frameConfig);\r\n\r\n normalMap.type = 'normalMap';\r\n\r\n this.setLink(normalMap);\r\n\r\n loader.addFile(normalMap);\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = new Image();\r\n\r\n this.data.crossOrigin = this.crossOrigin;\r\n\r\n var _this = this;\r\n\r\n this.data.onload = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessComplete();\r\n };\r\n\r\n this.data.onerror = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessError();\r\n };\r\n\r\n File.createObjectURL(this.data, this.xhrLoader.response, 'image/png');\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n var texture;\r\n var linkFile = this.linkFile;\r\n\r\n if (linkFile && linkFile.state === CONST.FILE_COMPLETE)\r\n {\r\n if (this.type === 'image')\r\n {\r\n texture = this.cache.addImage(this.key, this.data, linkFile.data);\r\n }\r\n else\r\n {\r\n texture = this.cache.addImage(linkFile.key, linkFile.data, this.data);\r\n }\r\n\r\n this.pendingDestroy(texture);\r\n\r\n linkFile.pendingDestroy(texture);\r\n }\r\n else if (!linkFile)\r\n {\r\n texture = this.cache.addImage(this.key, this.data);\r\n\r\n this.pendingDestroy(texture);\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an Image, or array of Images, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.image('logo', 'images/phaserLogo.png');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\r\n * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback\r\n * of animated gifs to Canvas elements.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.image({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.ImageFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:\r\n * \r\n * ```javascript\r\n * this.load.image('logo', 'images/AtariLogo.png');\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'logo');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\r\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\r\n * \r\n * ```javascript\r\n * this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]);\r\n * ```\r\n *\r\n * Or, if you are using a config object use the `normalMap` property:\r\n * \r\n * ```javascript\r\n * this.load.image({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png',\r\n * normalMap: 'images/AtariLogo-n.png'\r\n * });\r\n * ```\r\n *\r\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\r\n * Normal maps are a WebGL only feature.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Image File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#image\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig|Phaser.Types.Loader.FileTypes.ImageFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('image', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new ImageFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new ImageFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = ImageFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar GetValue = require('../../utils/object/GetValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\n\r\n/**\r\n * @classdesc\r\n * A single JSON File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json.\r\n *\r\n * @class JSONFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\r\n */\r\nvar JSONFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object\r\n // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing\r\n\r\n function JSONFile (loader, key, url, xhrSettings, dataKey)\r\n {\r\n var extension = 'json';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n dataKey = GetFastValue(config, 'dataKey', dataKey);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'json',\r\n cache: loader.cacheManager.json,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: dataKey\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n if (IsPlainObject(url))\r\n {\r\n // Object provided instead of a URL, so no need to actually load it (populate data with value)\r\n if (dataKey)\r\n {\r\n this.data = GetValue(url, dataKey);\r\n }\r\n else\r\n {\r\n this.data = url;\r\n }\r\n\r\n this.state = CONST.FILE_POPULATED;\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.JSONFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n if (this.state !== CONST.FILE_POPULATED)\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n var json = JSON.parse(this.xhrLoader.responseText);\r\n\r\n var key = this.config;\r\n\r\n if (typeof key === 'string')\r\n {\r\n this.data = GetValue(json, key, json);\r\n }\r\n else\r\n {\r\n this.data = json;\r\n }\r\n }\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a JSON file, or array of JSON files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.json('wavedata', 'files/AlienWaveData.json');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the JSON Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the JSON Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.json({\r\n * key: 'wavedata',\r\n * url: 'files/AlienWaveData.json'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n * \r\n * ```javascript\r\n * this.load.json('wavedata', 'files/AlienWaveData.json');\r\n * // and later in your game ...\r\n * var data = this.cache.json.get('wavedata');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and\r\n * this is what you would use to retrieve the text from the JSON Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"data\"\r\n * and no URL is given then the Loader will set the URL to be \"data.json\". It will always add `.json` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache,\r\n * rather than the whole file. For example, if your JSON data had a structure like this:\r\n * \r\n * ```json\r\n * {\r\n * \"level1\": {\r\n * \"baddies\": {\r\n * \"aliens\": {},\r\n * \"boss\": {}\r\n * }\r\n * },\r\n * \"level2\": {},\r\n * \"level3\": {}\r\n * }\r\n * ```\r\n *\r\n * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`.\r\n *\r\n * Note: The ability to load this type of file will only be available if the JSON File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#json\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('json', function (key, url, dataKey, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new JSONFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new JSONFile(this, key, url, xhrSettings, dataKey));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = JSONFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\n\r\n/**\r\n * @classdesc\r\n * A single Text File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text.\r\n *\r\n * @class TextFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar TextFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function TextFile (loader, key, url, xhrSettings)\r\n {\r\n var extension = 'txt';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'text',\r\n cache: loader.cacheManager.text,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.TextFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = this.xhrLoader.responseText;\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Text file, or array of Text files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.text('story', 'files/IntroStory.txt');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Text Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Text Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Text Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.text({\r\n * key: 'story',\r\n * url: 'files/IntroStory.txt'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.TextFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.text('story', 'files/IntroStory.txt');\r\n * // and later in your game ...\r\n * var data = this.cache.text.get('story');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and\r\n * this is what you would use to retrieve the text from the Text Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"story\"\r\n * and no URL is given then the Loader will set the URL to be \"story.txt\". It will always add `.txt` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Text File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#text\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig|Phaser.Types.Loader.FileTypes.TextFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('text', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new TextFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new TextFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = TextFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the mean average of the given values.\r\n *\r\n * @function Phaser.Math.Average\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} values - The values to average.\r\n *\r\n * @return {number} The average value.\r\n */\r\nvar Average = function (values)\r\n{\r\n var sum = 0;\r\n\r\n for (var i = 0; i < values.length; i++)\r\n {\r\n sum += (+values[i]);\r\n }\r\n\r\n return sum / values.length;\r\n};\r\n\r\nmodule.exports = Average;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Factorial = require('./Factorial');\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Math.Bernstein\r\n * @since 3.0.0\r\n *\r\n * @param {number} n - [description]\r\n * @param {number} i - [description]\r\n *\r\n * @return {number} [description]\r\n */\r\nvar Bernstein = function (n, i)\r\n{\r\n return Factorial(n) / Factorial(i) / Factorial(n - i);\r\n};\r\n\r\nmodule.exports = Bernstein;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random integer between the `min` and `max` values, inclusive.\r\n *\r\n * @function Phaser.Math.Between\r\n * @since 3.0.0\r\n *\r\n * @param {integer} min - The minimum value.\r\n * @param {integer} max - The maximum value.\r\n *\r\n * @return {integer} The random integer.\r\n */\r\nvar Between = function (min, max)\r\n{\r\n return Math.floor(Math.random() * (max - min + 1) + min);\r\n};\r\n\r\nmodule.exports = Between;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates a Catmull-Rom value.\r\n *\r\n * @function Phaser.Math.CatmullRom\r\n * @since 3.0.0\r\n *\r\n * @param {number} t - [description]\r\n * @param {number} p0 - [description]\r\n * @param {number} p1 - [description]\r\n * @param {number} p2 - [description]\r\n * @param {number} p3 - [description]\r\n *\r\n * @return {number} The Catmull-Rom value.\r\n */\r\nvar CatmullRom = function (t, p0, p1, p2, p3)\r\n{\r\n var v0 = (p2 - p0) * 0.5;\r\n var v1 = (p3 - p1) * 0.5;\r\n var t2 = t * t;\r\n var t3 = t * t2;\r\n\r\n return (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1;\r\n};\r\n\r\nmodule.exports = CatmullRom;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Ceils to some place comparative to a `base`, default is 10 for decimal place.\r\n *\r\n * The `place` is represented by the power applied to `base` to get that place.\r\n *\r\n * @function Phaser.Math.CeilTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {number} [place=0] - The place to round to.\r\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar CeilTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.ceil(value * p) / p;\r\n};\r\n\r\nmodule.exports = CeilTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Force a value within the boundaries by clamping it to the range `min`, `max`.\r\n *\r\n * @function Phaser.Math.Clamp\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to be clamped.\r\n * @param {number} min - The minimum bounds.\r\n * @param {number} max - The maximum bounds.\r\n *\r\n * @return {number} The clamped value.\r\n */\r\nvar Clamp = function (value, min, max)\r\n{\r\n return Math.max(min, Math.min(max, value));\r\n};\r\n\r\nmodule.exports = Clamp;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\n\r\n/**\r\n * Convert the given angle from degrees, to the equivalent angle in radians.\r\n *\r\n * @function Phaser.Math.DegToRad\r\n * @since 3.0.0\r\n *\r\n * @param {integer} degrees - The angle (in degrees) to convert to radians.\r\n *\r\n * @return {number} The given angle converted to radians.\r\n */\r\nvar DegToRad = function (degrees)\r\n{\r\n return degrees * CONST.DEG_TO_RAD;\r\n};\r\n\r\nmodule.exports = DegToRad;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the positive difference of two given numbers.\r\n *\r\n * @function Phaser.Math.Difference\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first number in the calculation.\r\n * @param {number} b - The second number in the calculation.\r\n *\r\n * @return {number} The positive difference of the two given numbers.\r\n */\r\nvar Difference = function (a, b)\r\n{\r\n return Math.abs(a - b);\r\n};\r\n\r\nmodule.exports = Difference;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the factorial of a given number for integer values greater than 0.\r\n *\r\n * @function Phaser.Math.Factorial\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - A positive integer to calculate the factorial of.\r\n *\r\n * @return {number} The factorial of the given number.\r\n */\r\nvar Factorial = function (value)\r\n{\r\n if (value === 0)\r\n {\r\n return 1;\r\n }\r\n\r\n var res = value;\r\n\r\n while (--value)\r\n {\r\n res *= value;\r\n }\r\n\r\n return res;\r\n};\r\n\r\nmodule.exports = Factorial;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive.\r\n *\r\n * @function Phaser.Math.FloatBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The lower bound for the float, inclusive.\r\n * @param {number} max - The upper bound for the float exclusive.\r\n *\r\n * @return {number} A random float within the given range.\r\n */\r\nvar FloatBetween = function (min, max)\r\n{\r\n return Math.random() * (max - min) + min;\r\n};\r\n\r\nmodule.exports = FloatBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Floors to some place comparative to a `base`, default is 10 for decimal place.\r\n *\r\n * The `place` is represented by the power applied to `base` to get that place.\r\n *\r\n * @function Phaser.Math.FloorTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {integer} [place=0] - The place to round to.\r\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar FloorTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.floor(value * p) / p;\r\n};\r\n\r\nmodule.exports = FloorTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('./Clamp');\r\n\r\n/**\r\n * Return a value based on the range between `min` and `max` and the percentage given.\r\n *\r\n * @function Phaser.Math.FromPercent\r\n * @since 3.0.0\r\n *\r\n * @param {number} percent - A value between 0 and 1 representing the percentage.\r\n * @param {number} min - The minimum value.\r\n * @param {number} [max] - The maximum value.\r\n *\r\n * @return {number} The value that is `percent` percent between `min` and `max`.\r\n */\r\nvar FromPercent = function (percent, min, max)\r\n{\r\n percent = Clamp(percent, 0, 1);\r\n\r\n return (max - min) * percent;\r\n};\r\n\r\nmodule.exports = FromPercent;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the speed required to cover a distance in the time given.\r\n *\r\n * @function Phaser.Math.GetSpeed\r\n * @since 3.0.0\r\n *\r\n * @param {number} distance - The distance to travel in pixels.\r\n * @param {integer} time - The time, in ms, to cover the distance in.\r\n *\r\n * @return {number} The amount you will need to increment the position by each step in order to cover the distance in the time given.\r\n */\r\nvar GetSpeed = function (distance, time)\r\n{\r\n return (distance / time) / 1000;\r\n};\r\n\r\nmodule.exports = GetSpeed;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if a given value is an even number.\r\n *\r\n * @function Phaser.Math.IsEven\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to perform the check with.\r\n *\r\n * @return {boolean} Whether the number is even or not.\r\n */\r\nvar IsEven = function (value)\r\n{\r\n // Use abstract equality == for \"is number\" test\r\n\r\n // eslint-disable-next-line eqeqeq\r\n return (value == parseFloat(value)) ? !(value % 2) : void 0;\r\n};\r\n\r\nmodule.exports = IsEven;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if a given value is an even number using a strict type check.\r\n *\r\n * @function Phaser.Math.IsEvenStrict\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to perform the check with.\r\n *\r\n * @return {boolean} Whether the number is even or not.\r\n */\r\nvar IsEvenStrict = function (value)\r\n{\r\n // Use strict equality === for \"is number\" test\r\n return (value === parseFloat(value)) ? !(value % 2) : void 0;\r\n};\r\n\r\nmodule.exports = IsEvenStrict;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates a linear (interpolation) value over t.\r\n *\r\n * @function Phaser.Math.Linear\r\n * @since 3.0.0\r\n *\r\n * @param {number} p0 - The first point.\r\n * @param {number} p1 - The second point.\r\n * @param {number} t - The percentage between p0 and p1 to return, represented as a number between 0 and 1.\r\n *\r\n * @return {number} The step t% of the way between p0 and p1.\r\n */\r\nvar Linear = function (p0, p1, t)\r\n{\r\n return (p1 - p0) * t + p0;\r\n};\r\n\r\nmodule.exports = Linear;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A three-dimensional matrix.\r\n *\r\n * Defaults to the identity matrix when instantiated.\r\n *\r\n * @class Matrix3\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} [m] - Optional Matrix3 to copy values from.\r\n */\r\nvar Matrix3 = new Class({\r\n\r\n initialize:\r\n\r\n function Matrix3 (m)\r\n {\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.Math.Matrix3#val\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.val = new Float32Array(9);\r\n\r\n if (m)\r\n {\r\n // Assume Matrix3 with val:\r\n this.copy(m);\r\n }\r\n else\r\n {\r\n // Default to identity\r\n this.identity();\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Matrix3.\r\n *\r\n * @method Phaser.Math.Matrix3#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} A clone of this Matrix3.\r\n */\r\n clone: function ()\r\n {\r\n return new Matrix3(this);\r\n },\r\n\r\n /**\r\n * This method is an alias for `Matrix3.copy`.\r\n *\r\n * @method Phaser.Math.Matrix3#set\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to set the values of this Matrix's from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n set: function (src)\r\n {\r\n return this.copy(src);\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix into this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n copy: function (src)\r\n {\r\n var out = this.val;\r\n var a = src.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix4 into this Matrix3.\r\n *\r\n * @method Phaser.Math.Matrix3#fromMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromMat4: function (m)\r\n {\r\n var a = m.val;\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[4];\r\n out[4] = a[5];\r\n out[5] = a[6];\r\n out[6] = a[8];\r\n out[7] = a[9];\r\n out[8] = a[10];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given array.\r\n *\r\n * @method Phaser.Math.Matrix3#fromArray\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The array to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromArray: function (a)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n identity: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 1;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 1;\r\n out[5] = 0;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transpose this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#transpose\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n transpose: function ()\r\n {\r\n var a = this.val;\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a12 = a[5];\r\n\r\n a[1] = a[3];\r\n a[2] = a[6];\r\n a[3] = a01;\r\n a[5] = a[7];\r\n a[6] = a02;\r\n a[7] = a12;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n invert: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n var b01 = a22 * a11 - a12 * a21;\r\n var b11 = -a22 * a10 + a12 * a20;\r\n var b21 = a21 * a10 - a11 * a20;\r\n\r\n // Calculate the determinant\r\n var det = a00 * b01 + a01 * b11 + a02 * b21;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n a[0] = b01 * det;\r\n a[1] = (-a22 * a01 + a02 * a21) * det;\r\n a[2] = (a12 * a01 - a02 * a11) * det;\r\n a[3] = b11 * det;\r\n a[4] = (a22 * a00 - a02 * a20) * det;\r\n a[5] = (-a12 * a00 + a02 * a10) * det;\r\n a[6] = b21 * det;\r\n a[7] = (-a21 * a00 + a01 * a20) * det;\r\n a[8] = (a11 * a00 - a01 * a10) * det;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the adjoint, or adjugate, of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#adjoint\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n adjoint: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n a[0] = (a11 * a22 - a12 * a21);\r\n a[1] = (a02 * a21 - a01 * a22);\r\n a[2] = (a01 * a12 - a02 * a11);\r\n a[3] = (a12 * a20 - a10 * a22);\r\n a[4] = (a00 * a22 - a02 * a20);\r\n a[5] = (a02 * a10 - a00 * a12);\r\n a[6] = (a10 * a21 - a11 * a20);\r\n a[7] = (a01 * a20 - a00 * a21);\r\n a[8] = (a00 * a11 - a01 * a10);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the determinant of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#determinant\r\n * @since 3.0.0\r\n *\r\n * @return {number} The determinant of this Matrix.\r\n */\r\n determinant: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to multiply this Matrix by.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n multiply: function (src)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n var b = src.val;\r\n\r\n var b00 = b[0];\r\n var b01 = b[1];\r\n var b02 = b[2];\r\n var b10 = b[3];\r\n var b11 = b[4];\r\n var b12 = b[5];\r\n var b20 = b[6];\r\n var b21 = b[7];\r\n var b22 = b[8];\r\n\r\n a[0] = b00 * a00 + b01 * a10 + b02 * a20;\r\n a[1] = b00 * a01 + b01 * a11 + b02 * a21;\r\n a[2] = b00 * a02 + b01 * a12 + b02 * a22;\r\n\r\n a[3] = b10 * a00 + b11 * a10 + b12 * a20;\r\n a[4] = b10 * a01 + b11 * a11 + b12 * a21;\r\n a[5] = b10 * a02 + b11 * a12 + b12 * a22;\r\n\r\n a[6] = b20 * a00 + b21 * a10 + b22 * a20;\r\n a[7] = b20 * a01 + b21 * a11 + b22 * a21;\r\n a[8] = b20 * a02 + b21 * a12 + b22 * a22;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given Vector.\r\n *\r\n * @method Phaser.Math.Matrix3#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n translate: function (v)\r\n {\r\n var a = this.val;\r\n var x = v.x;\r\n var y = v.y;\r\n\r\n a[6] = x * a[0] + y * a[3] + a[6];\r\n a[7] = x * a[1] + y * a[4] + a[7];\r\n a[8] = x * a[2] + y * a[5] + a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a rotation transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n rotate: function (rad)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n a[0] = c * a00 + s * a10;\r\n a[1] = c * a01 + s * a11;\r\n a[2] = c * a02 + s * a12;\r\n\r\n a[3] = c * a10 - s * a00;\r\n a[4] = c * a11 - s * a01;\r\n a[5] = c * a12 - s * a02;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * Uses the `x` and `y` components of the given Vector to scale the Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#scale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n scale: function (v)\r\n {\r\n var a = this.val;\r\n var x = v.x;\r\n var y = v.y;\r\n\r\n a[0] = x * a[0];\r\n a[1] = x * a[1];\r\n a[2] = x * a[2];\r\n\r\n a[3] = y * a[3];\r\n a[4] = y * a[4];\r\n a[5] = y * a[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given Quaternion.\r\n *\r\n * @method Phaser.Math.Matrix3#fromQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromQuat: function (q)\r\n {\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n var out = this.val;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[3] = xy + wz;\r\n out[6] = xz - wy;\r\n\r\n out[1] = xy - wz;\r\n out[4] = 1 - (xx + zz);\r\n out[7] = yz + wx;\r\n\r\n out[2] = xz + wy;\r\n out[5] = yz - wx;\r\n out[8] = 1 - (xx + yy);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Math.Matrix3#normalFromMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - [description]\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n normalFromMat4: function (m)\r\n {\r\n var a = m.val;\r\n var out = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\r\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\r\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\r\n\r\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\r\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\r\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\r\n\r\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\r\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\r\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Matrix3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\nvar EPSILON = 0.000001;\r\n\r\n/**\r\n * @classdesc\r\n * A four-dimensional matrix.\r\n *\r\n * @class Matrix4\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} [m] - Optional Matrix4 to copy values from.\r\n */\r\nvar Matrix4 = new Class({\r\n\r\n initialize:\r\n\r\n function Matrix4 (m)\r\n {\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.Math.Matrix4#val\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.val = new Float32Array(16);\r\n\r\n if (m)\r\n {\r\n // Assume Matrix4 with val:\r\n this.copy(m);\r\n }\r\n else\r\n {\r\n // Default to identity\r\n this.identity();\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} A clone of this Matrix4.\r\n */\r\n clone: function ()\r\n {\r\n return new Matrix4(this);\r\n },\r\n\r\n // TODO - Should work with basic values\r\n\r\n /**\r\n * This method is an alias for `Matrix4.copy`.\r\n *\r\n * @method Phaser.Math.Matrix4#set\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to set the values of this Matrix's from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n set: function (src)\r\n {\r\n return this.copy(src);\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix into this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n copy: function (src)\r\n {\r\n var out = this.val;\r\n var a = src.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n out[9] = a[9];\r\n out[10] = a[10];\r\n out[11] = a[11];\r\n out[12] = a[12];\r\n out[13] = a[13];\r\n out[14] = a[14];\r\n out[15] = a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given array.\r\n *\r\n * @method Phaser.Math.Matrix4#fromArray\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The array to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n fromArray: function (a)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n out[9] = a[9];\r\n out[10] = a[10];\r\n out[11] = a[11];\r\n out[12] = a[12];\r\n out[13] = a[13];\r\n out[14] = a[14];\r\n out[15] = a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix.\r\n *\r\n * Sets all values to `0`.\r\n *\r\n * @method Phaser.Math.Matrix4#zero\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n zero: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 0;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 0;\r\n out[5] = 0;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = 0;\r\n out[11] = 0;\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = 0;\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x`, `y` and `z` values of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#xyz\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {number} z - The z value.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n xyz: function (x, y, z)\r\n {\r\n this.identity();\r\n\r\n var out = this.val;\r\n\r\n out[12] = x;\r\n out[13] = y;\r\n out[14] = z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the scaling values of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scaling\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x scaling value.\r\n * @param {number} y - The y scaling value.\r\n * @param {number} z - The z scaling value.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n scaling: function (x, y, z)\r\n {\r\n this.zero();\r\n\r\n var out = this.val;\r\n\r\n out[0] = x;\r\n out[5] = y;\r\n out[10] = z;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n identity: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 1;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 0;\r\n out[5] = 1;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = 1;\r\n out[11] = 0;\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = 0;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transpose this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#transpose\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n transpose: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n var a23 = a[11];\r\n\r\n a[1] = a[4];\r\n a[2] = a[8];\r\n a[3] = a[12];\r\n a[4] = a01;\r\n a[6] = a[9];\r\n a[7] = a[13];\r\n a[8] = a02;\r\n a[9] = a12;\r\n a[11] = a[14];\r\n a[12] = a03;\r\n a[13] = a13;\r\n a[14] = a23;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n invert: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n a[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\r\n a[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\r\n a[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\r\n a[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\r\n a[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\r\n a[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\r\n a[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\r\n a[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\r\n a[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\r\n a[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\r\n a[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\r\n a[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\r\n a[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\r\n a[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\r\n a[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\r\n a[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the adjoint, or adjugate, of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#adjoint\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n adjoint: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n a[0] = (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22));\r\n a[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));\r\n a[2] = (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12));\r\n a[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));\r\n a[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));\r\n a[5] = (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22));\r\n a[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));\r\n a[7] = (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12));\r\n a[8] = (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21));\r\n a[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));\r\n a[10] = (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11));\r\n a[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));\r\n a[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));\r\n a[13] = (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21));\r\n a[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));\r\n a[15] = (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the determinant of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#determinant\r\n * @since 3.0.0\r\n *\r\n * @return {number} The determinant of this Matrix.\r\n */\r\n determinant: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to multiply this Matrix by.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n multiply: function (src)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b = src.val;\r\n\r\n // Cache only the current line of the second matrix\r\n var b0 = b[0];\r\n var b1 = b[1];\r\n var b2 = b[2];\r\n var b3 = b[3];\r\n\r\n a[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[4];\r\n b1 = b[5];\r\n b2 = b[6];\r\n b3 = b[7];\r\n\r\n a[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[8];\r\n b1 = b[9];\r\n b2 = b[10];\r\n b3 = b[11];\r\n\r\n a[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[12];\r\n b1 = b[13];\r\n b2 = b[14];\r\n b3 = b[15];\r\n\r\n a[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyLocal\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - [description]\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n multiplyLocal: function (src)\r\n {\r\n var a = [];\r\n var m1 = this.val;\r\n var m2 = src.val;\r\n\r\n a[0] = m1[0] * m2[0] + m1[1] * m2[4] + m1[2] * m2[8] + m1[3] * m2[12];\r\n a[1] = m1[0] * m2[1] + m1[1] * m2[5] + m1[2] * m2[9] + m1[3] * m2[13];\r\n a[2] = m1[0] * m2[2] + m1[1] * m2[6] + m1[2] * m2[10] + m1[3] * m2[14];\r\n a[3] = m1[0] * m2[3] + m1[1] * m2[7] + m1[2] * m2[11] + m1[3] * m2[15];\r\n\r\n a[4] = m1[4] * m2[0] + m1[5] * m2[4] + m1[6] * m2[8] + m1[7] * m2[12];\r\n a[5] = m1[4] * m2[1] + m1[5] * m2[5] + m1[6] * m2[9] + m1[7] * m2[13];\r\n a[6] = m1[4] * m2[2] + m1[5] * m2[6] + m1[6] * m2[10] + m1[7] * m2[14];\r\n a[7] = m1[4] * m2[3] + m1[5] * m2[7] + m1[6] * m2[11] + m1[7] * m2[15];\r\n\r\n a[8] = m1[8] * m2[0] + m1[9] * m2[4] + m1[10] * m2[8] + m1[11] * m2[12];\r\n a[9] = m1[8] * m2[1] + m1[9] * m2[5] + m1[10] * m2[9] + m1[11] * m2[13];\r\n a[10] = m1[8] * m2[2] + m1[9] * m2[6] + m1[10] * m2[10] + m1[11] * m2[14];\r\n a[11] = m1[8] * m2[3] + m1[9] * m2[7] + m1[10] * m2[11] + m1[11] * m2[15];\r\n\r\n a[12] = m1[12] * m2[0] + m1[13] * m2[4] + m1[14] * m2[8] + m1[15] * m2[12];\r\n a[13] = m1[12] * m2[1] + m1[13] * m2[5] + m1[14] * m2[9] + m1[15] * m2[13];\r\n a[14] = m1[12] * m2[2] + m1[13] * m2[6] + m1[14] * m2[10] + m1[15] * m2[14];\r\n a[15] = m1[12] * m2[3] + m1[13] * m2[7] + m1[14] * m2[11] + m1[15] * m2[15];\r\n\r\n return this.fromArray(a);\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given Vector.\r\n *\r\n * @method Phaser.Math.Matrix4#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n translate: function (v)\r\n {\r\n var x = v.x;\r\n var y = v.y;\r\n var z = v.z;\r\n var a = this.val;\r\n\r\n a[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\r\n a[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\r\n a[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\r\n a[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given values.\r\n *\r\n * @method Phaser.Math.Matrix4#translateXYZ\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n translateXYZ: function (x, y, z)\r\n {\r\n var a = this.val;\r\n\r\n a[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\r\n a[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\r\n a[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\r\n a[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * Uses the `x`, `y` and `z` components of the given Vector to scale the Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n scale: function (v)\r\n {\r\n var x = v.x;\r\n var y = v.y;\r\n var z = v.z;\r\n var a = this.val;\r\n\r\n a[0] = a[0] * x;\r\n a[1] = a[1] * x;\r\n a[2] = a[2] * x;\r\n a[3] = a[3] * x;\r\n\r\n a[4] = a[4] * y;\r\n a[5] = a[5] * y;\r\n a[6] = a[6] * y;\r\n a[7] = a[7] * y;\r\n\r\n a[8] = a[8] * z;\r\n a[9] = a[9] * z;\r\n a[10] = a[10] * z;\r\n a[11] = a[11] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scaleXYZ\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n scaleXYZ: function (x, y, z)\r\n {\r\n var a = this.val;\r\n\r\n a[0] = a[0] * x;\r\n a[1] = a[1] * x;\r\n a[2] = a[2] * x;\r\n a[3] = a[3] * x;\r\n\r\n a[4] = a[4] * y;\r\n a[5] = a[5] * y;\r\n a[6] = a[6] * y;\r\n a[7] = a[7] * y;\r\n\r\n a[8] = a[8] * z;\r\n a[9] = a[9] * z;\r\n a[10] = a[10] * z;\r\n a[11] = a[11] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Derive a rotation matrix around the given axis.\r\n *\r\n * @method Phaser.Math.Matrix4#makeRotationAxis\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} axis - The rotation axis.\r\n * @param {number} angle - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n makeRotationAxis: function (axis, angle)\r\n {\r\n // Based on http://www.gamedev.net/reference/articles/article1199.asp\r\n\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n var t = 1 - c;\r\n var x = axis.x;\r\n var y = axis.y;\r\n var z = axis.z;\r\n var tx = t * x;\r\n var ty = t * y;\r\n\r\n this.fromArray([\r\n tx * x + c, tx * y - s * z, tx * z + s * y, 0,\r\n tx * y + s * z, ty * y + c, ty * z - s * x, 0,\r\n tx * z - s * y, ty * z + s * x, t * z * z + c, 0,\r\n 0, 0, 0, 1\r\n ]);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a rotation transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n * @param {Phaser.Math.Vector3} axis - The axis to rotate upon.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotate: function (rad, axis)\r\n {\r\n var a = this.val;\r\n var x = axis.x;\r\n var y = axis.y;\r\n var z = axis.z;\r\n var len = Math.sqrt(x * x + y * y + z * z);\r\n\r\n if (Math.abs(len) < EPSILON)\r\n {\r\n return null;\r\n }\r\n\r\n len = 1 / len;\r\n x *= len;\r\n y *= len;\r\n z *= len;\r\n\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n var t = 1 - c;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Construct the elements of the rotation matrix\r\n var b00 = x * x * t + c;\r\n var b01 = y * x * t + z * s;\r\n var b02 = z * x * t - y * s;\r\n\r\n var b10 = x * y * t - z * s;\r\n var b11 = y * y * t + c;\r\n var b12 = z * y * t + x * s;\r\n\r\n var b20 = x * z * t + y * s;\r\n var b21 = y * z * t - x * s;\r\n var b22 = z * z * t + c;\r\n\r\n // Perform rotation-specific matrix multiplication\r\n a[0] = a00 * b00 + a10 * b01 + a20 * b02;\r\n a[1] = a01 * b00 + a11 * b01 + a21 * b02;\r\n a[2] = a02 * b00 + a12 * b01 + a22 * b02;\r\n a[3] = a03 * b00 + a13 * b01 + a23 * b02;\r\n a[4] = a00 * b10 + a10 * b11 + a20 * b12;\r\n a[5] = a01 * b10 + a11 * b11 + a21 * b12;\r\n a[6] = a02 * b10 + a12 * b11 + a22 * b12;\r\n a[7] = a03 * b10 + a13 * b11 + a23 * b12;\r\n a[8] = a00 * b20 + a10 * b21 + a20 * b22;\r\n a[9] = a01 * b20 + a11 * b21 + a21 * b22;\r\n a[10] = a02 * b20 + a12 * b21 + a22 * b22;\r\n a[11] = a03 * b20 + a13 * b21 + a23 * b22;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its X axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotateX: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[4] = a10 * c + a20 * s;\r\n a[5] = a11 * c + a21 * s;\r\n a[6] = a12 * c + a22 * s;\r\n a[7] = a13 * c + a23 * s;\r\n a[8] = a20 * c - a10 * s;\r\n a[9] = a21 * c - a11 * s;\r\n a[10] = a22 * c - a12 * s;\r\n a[11] = a23 * c - a13 * s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its Y axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle to rotate by, in radians.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotateY: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[0] = a00 * c - a20 * s;\r\n a[1] = a01 * c - a21 * s;\r\n a[2] = a02 * c - a22 * s;\r\n a[3] = a03 * c - a23 * s;\r\n a[8] = a00 * s + a20 * c;\r\n a[9] = a01 * s + a21 * c;\r\n a[10] = a02 * s + a22 * c;\r\n a[11] = a03 * s + a23 * c;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its Z axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle to rotate by, in radians.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotateZ: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[0] = a00 * c + a10 * s;\r\n a[1] = a01 * c + a11 * s;\r\n a[2] = a02 * c + a12 * s;\r\n a[3] = a03 * c + a13 * s;\r\n a[4] = a10 * c - a00 * s;\r\n a[5] = a11 * c - a01 * s;\r\n a[6] = a12 * c - a02 * s;\r\n a[7] = a13 * c - a03 * s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given rotation Quaternion and translation Vector.\r\n *\r\n * @method Phaser.Math.Matrix4#fromRotationTranslation\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set rotation from.\r\n * @param {Phaser.Math.Vector3} v - The Vector to set translation from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n fromRotationTranslation: function (q, v)\r\n {\r\n // Quaternion math\r\n var out = this.val;\r\n\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[1] = xy + wz;\r\n out[2] = xz - wy;\r\n out[3] = 0;\r\n\r\n out[4] = xy - wz;\r\n out[5] = 1 - (xx + zz);\r\n out[6] = yz + wx;\r\n out[7] = 0;\r\n\r\n out[8] = xz + wy;\r\n out[9] = yz - wx;\r\n out[10] = 1 - (xx + yy);\r\n out[11] = 0;\r\n\r\n out[12] = v.x;\r\n out[13] = v.y;\r\n out[14] = v.z;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given Quaternion.\r\n *\r\n * @method Phaser.Math.Matrix4#fromQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n fromQuat: function (q)\r\n {\r\n var out = this.val;\r\n\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[1] = xy + wz;\r\n out[2] = xz - wy;\r\n out[3] = 0;\r\n\r\n out[4] = xy - wz;\r\n out[5] = 1 - (xx + zz);\r\n out[6] = yz + wx;\r\n out[7] = 0;\r\n\r\n out[8] = xz + wy;\r\n out[9] = yz - wx;\r\n out[10] = 1 - (xx + yy);\r\n out[11] = 0;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = 0;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a frustum matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#frustum\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left bound of the frustum.\r\n * @param {number} right - The right bound of the frustum.\r\n * @param {number} bottom - The bottom bound of the frustum.\r\n * @param {number} top - The top bound of the frustum.\r\n * @param {number} near - The near bound of the frustum.\r\n * @param {number} far - The far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n frustum: function (left, right, bottom, top, near, far)\r\n {\r\n var out = this.val;\r\n\r\n var rl = 1 / (right - left);\r\n var tb = 1 / (top - bottom);\r\n var nf = 1 / (near - far);\r\n\r\n out[0] = (near * 2) * rl;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = (near * 2) * tb;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = (right + left) * rl;\r\n out[9] = (top + bottom) * tb;\r\n out[10] = (far + near) * nf;\r\n out[11] = -1;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = (far * near * 2) * nf;\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a perspective projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#perspective\r\n * @since 3.0.0\r\n *\r\n * @param {number} fovy - Vertical field of view in radians\r\n * @param {number} aspect - Aspect ratio. Typically viewport width /height.\r\n * @param {number} near - Near bound of the frustum.\r\n * @param {number} far - Far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n perspective: function (fovy, aspect, near, far)\r\n {\r\n var out = this.val;\r\n var f = 1.0 / Math.tan(fovy / 2);\r\n var nf = 1 / (near - far);\r\n\r\n out[0] = f / aspect;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = f;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = (far + near) * nf;\r\n out[11] = -1;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = (2 * far * near) * nf;\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a perspective projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#perspectiveLH\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of the frustum.\r\n * @param {number} height - The height of the frustum.\r\n * @param {number} near - Near bound of the frustum.\r\n * @param {number} far - Far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n perspectiveLH: function (width, height, near, far)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = (2 * near) / width;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = (2 * near) / height;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = -far / (near - far);\r\n out[11] = 1;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = (near * far) / (near - far);\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate an orthogonal projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#ortho\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left bound of the frustum.\r\n * @param {number} right - The right bound of the frustum.\r\n * @param {number} bottom - The bottom bound of the frustum.\r\n * @param {number} top - The top bound of the frustum.\r\n * @param {number} near - The near bound of the frustum.\r\n * @param {number} far - The far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n ortho: function (left, right, bottom, top, near, far)\r\n {\r\n var out = this.val;\r\n var lr = left - right;\r\n var bt = bottom - top;\r\n var nf = near - far;\r\n\r\n // Avoid division by zero\r\n lr = (lr === 0) ? lr : 1 / lr;\r\n bt = (bt === 0) ? bt : 1 / bt;\r\n nf = (nf === 0) ? nf : 1 / nf;\r\n\r\n out[0] = -2 * lr;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = -2 * bt;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = 2 * nf;\r\n out[11] = 0;\r\n\r\n out[12] = (left + right) * lr;\r\n out[13] = (top + bottom) * bt;\r\n out[14] = (far + near) * nf;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a look-at matrix with the given eye position, focal point, and up axis.\r\n *\r\n * @method Phaser.Math.Matrix4#lookAt\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} eye - Position of the viewer\r\n * @param {Phaser.Math.Vector3} center - Point the viewer is looking at\r\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n lookAt: function (eye, center, up)\r\n {\r\n var out = this.val;\r\n\r\n var eyex = eye.x;\r\n var eyey = eye.y;\r\n var eyez = eye.z;\r\n\r\n var upx = up.x;\r\n var upy = up.y;\r\n var upz = up.z;\r\n\r\n var centerx = center.x;\r\n var centery = center.y;\r\n var centerz = center.z;\r\n\r\n if (Math.abs(eyex - centerx) < EPSILON &&\r\n Math.abs(eyey - centery) < EPSILON &&\r\n Math.abs(eyez - centerz) < EPSILON)\r\n {\r\n return this.identity();\r\n }\r\n\r\n var z0 = eyex - centerx;\r\n var z1 = eyey - centery;\r\n var z2 = eyez - centerz;\r\n\r\n var len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);\r\n\r\n z0 *= len;\r\n z1 *= len;\r\n z2 *= len;\r\n\r\n var x0 = upy * z2 - upz * z1;\r\n var x1 = upz * z0 - upx * z2;\r\n var x2 = upx * z1 - upy * z0;\r\n\r\n len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);\r\n\r\n if (!len)\r\n {\r\n x0 = 0;\r\n x1 = 0;\r\n x2 = 0;\r\n }\r\n else\r\n {\r\n len = 1 / len;\r\n x0 *= len;\r\n x1 *= len;\r\n x2 *= len;\r\n }\r\n\r\n var y0 = z1 * x2 - z2 * x1;\r\n var y1 = z2 * x0 - z0 * x2;\r\n var y2 = z0 * x1 - z1 * x0;\r\n\r\n len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);\r\n\r\n if (!len)\r\n {\r\n y0 = 0;\r\n y1 = 0;\r\n y2 = 0;\r\n }\r\n else\r\n {\r\n len = 1 / len;\r\n y0 *= len;\r\n y1 *= len;\r\n y2 *= len;\r\n }\r\n\r\n out[0] = x0;\r\n out[1] = y0;\r\n out[2] = z0;\r\n out[3] = 0;\r\n\r\n out[4] = x1;\r\n out[5] = y1;\r\n out[6] = z1;\r\n out[7] = 0;\r\n\r\n out[8] = x2;\r\n out[9] = y2;\r\n out[10] = z2;\r\n out[11] = 0;\r\n\r\n out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\r\n out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\r\n out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this matrix from the given `yaw`, `pitch` and `roll` values.\r\n *\r\n * @method Phaser.Math.Matrix4#yawPitchRoll\r\n * @since 3.0.0\r\n *\r\n * @param {number} yaw - [description]\r\n * @param {number} pitch - [description]\r\n * @param {number} roll - [description]\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n yawPitchRoll: function (yaw, pitch, roll)\r\n {\r\n this.zero();\r\n _tempMat1.zero();\r\n _tempMat2.zero();\r\n\r\n var m0 = this.val;\r\n var m1 = _tempMat1.val;\r\n var m2 = _tempMat2.val;\r\n\r\n // Rotate Z\r\n var s = Math.sin(roll);\r\n var c = Math.cos(roll);\r\n\r\n m0[10] = 1;\r\n m0[15] = 1;\r\n m0[0] = c;\r\n m0[1] = s;\r\n m0[4] = -s;\r\n m0[5] = c;\r\n\r\n // Rotate X\r\n s = Math.sin(pitch);\r\n c = Math.cos(pitch);\r\n\r\n m1[0] = 1;\r\n m1[15] = 1;\r\n m1[5] = c;\r\n m1[10] = c;\r\n m1[9] = -s;\r\n m1[6] = s;\r\n\r\n // Rotate Y\r\n s = Math.sin(yaw);\r\n c = Math.cos(yaw);\r\n\r\n m2[5] = 1;\r\n m2[15] = 1;\r\n m2[0] = c;\r\n m2[2] = -s;\r\n m2[8] = s;\r\n m2[10] = c;\r\n\r\n this.multiplyLocal(_tempMat1);\r\n this.multiplyLocal(_tempMat2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a world matrix from the given rotation, position, scale, view matrix and projection matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#setWorldMatrix\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} rotation - The rotation of the world matrix.\r\n * @param {Phaser.Math.Vector3} position - The position of the world matrix.\r\n * @param {Phaser.Math.Vector3} scale - The scale of the world matrix.\r\n * @param {Phaser.Math.Matrix4} [viewMatrix] - The view matrix.\r\n * @param {Phaser.Math.Matrix4} [projectionMatrix] - The projection matrix.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n setWorldMatrix: function (rotation, position, scale, viewMatrix, projectionMatrix)\r\n {\r\n this.yawPitchRoll(rotation.y, rotation.x, rotation.z);\r\n\r\n _tempMat1.scaling(scale.x, scale.y, scale.z);\r\n _tempMat2.xyz(position.x, position.y, position.z);\r\n\r\n this.multiplyLocal(_tempMat1);\r\n this.multiplyLocal(_tempMat2);\r\n\r\n if (viewMatrix !== undefined)\r\n {\r\n this.multiplyLocal(viewMatrix);\r\n }\r\n\r\n if (projectionMatrix !== undefined)\r\n {\r\n this.multiplyLocal(projectionMatrix);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nvar _tempMat1 = new Matrix4();\r\nvar _tempMat2 = new Matrix4();\r\n\r\nmodule.exports = Matrix4;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Add an `amount` to a `value`, limiting the maximum result to `max`.\r\n *\r\n * @function Phaser.Math.MaxAdd\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to add to.\r\n * @param {number} amount - The amount to add.\r\n * @param {number} max - The maximum value to return.\r\n *\r\n * @return {number} The resulting value.\r\n */\r\nvar MaxAdd = function (value, amount, max)\r\n{\r\n return Math.min(value + amount, max);\r\n};\r\n\r\nmodule.exports = MaxAdd;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Subtract an `amount` from `value`, limiting the minimum result to `min`.\r\n *\r\n * @function Phaser.Math.MinSub\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to subtract from.\r\n * @param {number} amount - The amount to subtract.\r\n * @param {number} min - The minimum value to return.\r\n *\r\n * @return {number} The resulting value.\r\n */\r\nvar MinSub = function (value, amount, min)\r\n{\r\n return Math.max(value - amount, min);\r\n};\r\n\r\nmodule.exports = MinSub;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Work out what percentage `value` is of the range between `min` and `max`.\r\n * If `max` isn't given then it will return the percentage of `value` to `min`.\r\n *\r\n * You can optionally specify an `upperMax` value, which is a mid-way point in the range that represents 100%, after which the % starts to go down to zero again.\r\n *\r\n * @function Phaser.Math.Percent\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to determine the percentage of.\r\n * @param {number} min - The minimum value.\r\n * @param {number} [max] - The maximum value.\r\n * @param {number} [upperMax] - The mid-way point in the range that represents 100%.\r\n *\r\n * @return {number} A value between 0 and 1 representing the percentage.\r\n */\r\nvar Percent = function (value, min, max, upperMax)\r\n{\r\n if (max === undefined) { max = min + 1; }\r\n\r\n var percentage = (value - min) / (max - min);\r\n\r\n if (percentage > 1)\r\n {\r\n if (upperMax !== undefined)\r\n {\r\n percentage = ((upperMax - value)) / (upperMax - max);\r\n\r\n if (percentage < 0)\r\n {\r\n percentage = 0;\r\n }\r\n }\r\n else\r\n {\r\n percentage = 1;\r\n }\r\n }\r\n else if (percentage < 0)\r\n {\r\n percentage = 0;\r\n }\r\n\r\n return percentage;\r\n};\r\n\r\nmodule.exports = Percent;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\nvar Vector3 = require('./Vector3');\r\nvar Matrix3 = require('./Matrix3');\r\n\r\nvar EPSILON = 0.000001;\r\n\r\n// Some shared 'private' arrays\r\nvar siNext = new Int8Array([ 1, 2, 0 ]);\r\nvar tmp = new Float32Array([ 0, 0, 0 ]);\r\n\r\nvar xUnitVec3 = new Vector3(1, 0, 0);\r\nvar yUnitVec3 = new Vector3(0, 1, 0);\r\n\r\nvar tmpvec = new Vector3();\r\nvar tmpMat3 = new Matrix3();\r\n\r\n/**\r\n * @classdesc\r\n * A quaternion.\r\n *\r\n * @class Quaternion\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n * @param {number} [w] - The w component.\r\n */\r\nvar Quaternion = new Class({\r\n\r\n initialize:\r\n\r\n function Quaternion (x, y, z, w)\r\n {\r\n /**\r\n * The x component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n /**\r\n * The y component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n /**\r\n * The z component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n /**\r\n * The w component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Copy the components of a given Quaternion or Vector into this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#copy\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} src - The Quaternion or Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z;\r\n this.w = src.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the components of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} [x=0] - The x component, or an object containing x, y, z, and w components.\r\n * @param {number} [y=0] - The y component.\r\n * @param {number} [z=0] - The z component.\r\n * @param {number} [w=0] - The w component.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n set: function (x, y, z, w)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Quaternion or Vector to this Quaternion. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Quaternion#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to add to this Quaternion.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z;\r\n this.w += v.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract a given Quaternion or Vector from this Quaternion. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Quaternion#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to subtract from this Quaternion.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z;\r\n this.w -= v.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Quaternion by the given value.\r\n *\r\n * @method Phaser.Math.Quaternion#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Quaternion by.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n scale: function (scale)\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n this.w *= scale;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the length of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Quaternion.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return Math.sqrt(x * x + y * y + z * z + w * w);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Quaternion squared.\r\n *\r\n * @method Phaser.Math.Quaternion#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Quaternion, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n },\r\n\r\n /**\r\n * Normalize this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var len = x * x + y * y + z * z + w * w;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n this.w = w * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Quaternion and the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#dot\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to dot product with this Quaternion.\r\n *\r\n * @return {number} The dot product of this Quaternion and the given Quaternion or Vector.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\r\n },\r\n\r\n /**\r\n * Linearly interpolate this Quaternion towards the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to interpolate towards.\r\n * @param {number} [t=0] - The percentage of interpolation.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n this.w = aw + t * (v.w - aw);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Math.Quaternion#rotationTo\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - [description]\r\n * @param {Phaser.Math.Vector3} b - [description]\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotationTo: function (a, b)\r\n {\r\n var dot = a.x * b.x + a.y * b.y + a.z * b.z;\r\n\r\n if (dot < -0.999999)\r\n {\r\n if (tmpvec.copy(xUnitVec3).cross(a).length() < EPSILON)\r\n {\r\n tmpvec.copy(yUnitVec3).cross(a);\r\n }\r\n\r\n tmpvec.normalize();\r\n\r\n return this.setAxisAngle(tmpvec, Math.PI);\r\n\r\n }\r\n else if (dot > 0.999999)\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 1;\r\n\r\n return this;\r\n }\r\n else\r\n {\r\n tmpvec.copy(a).cross(b);\r\n\r\n this.x = tmpvec.x;\r\n this.y = tmpvec.y;\r\n this.z = tmpvec.z;\r\n this.w = 1 + dot;\r\n\r\n return this.normalize();\r\n }\r\n },\r\n\r\n /**\r\n * Set the axes of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#setAxes\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} view - The view axis.\r\n * @param {Phaser.Math.Vector3} right - The right axis.\r\n * @param {Phaser.Math.Vector3} up - The upwards axis.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setAxes: function (view, right, up)\r\n {\r\n var m = tmpMat3.val;\r\n\r\n m[0] = right.x;\r\n m[3] = right.y;\r\n m[6] = right.z;\r\n\r\n m[1] = up.x;\r\n m[4] = up.y;\r\n m[7] = up.z;\r\n\r\n m[2] = -view.x;\r\n m[5] = -view.y;\r\n m[8] = -view.z;\r\n\r\n return this.fromMat3(tmpMat3).normalize();\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n identity: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the axis angle of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#setAxisAngle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} axis - The axis.\r\n * @param {number} rad - The angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setAxisAngle: function (axis, rad)\r\n {\r\n rad = rad * 0.5;\r\n\r\n var s = Math.sin(rad);\r\n\r\n this.x = s * axis.x;\r\n this.y = s * axis.y;\r\n this.z = s * axis.z;\r\n this.w = Math.cos(rad);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply this Quaternion by the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to multiply this Quaternion by.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n multiply: function (b)\r\n {\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n var bw = b.w;\r\n\r\n this.x = ax * bw + aw * bx + ay * bz - az * by;\r\n this.y = ay * bw + aw * by + az * bx - ax * bz;\r\n this.z = az * bw + aw * bz + ax * by - ay * bx;\r\n this.w = aw * bw - ax * bx - ay * by - az * bz;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Smoothly linearly interpolate this Quaternion towards the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#slerp\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to interpolate towards.\r\n * @param {number} t - The percentage of interpolation.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n slerp: function (b, t)\r\n {\r\n // benchmarks: http://jsperf.com/quaternion-slerp-implementations\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n var bw = b.w;\r\n\r\n // calc cosine\r\n var cosom = ax * bx + ay * by + az * bz + aw * bw;\r\n\r\n // adjust signs (if necessary)\r\n if (cosom < 0)\r\n {\r\n cosom = -cosom;\r\n bx = - bx;\r\n by = - by;\r\n bz = - bz;\r\n bw = - bw;\r\n }\r\n\r\n // \"from\" and \"to\" quaternions are very close\r\n // ... so we can do a linear interpolation\r\n var scale0 = 1 - t;\r\n var scale1 = t;\r\n\r\n // calculate coefficients\r\n if ((1 - cosom) > EPSILON)\r\n {\r\n // standard case (slerp)\r\n var omega = Math.acos(cosom);\r\n var sinom = Math.sin(omega);\r\n\r\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\r\n scale1 = Math.sin(t * omega) / sinom;\r\n }\r\n\r\n // calculate final values\r\n this.x = scale0 * ax + scale1 * bx;\r\n this.y = scale0 * ay + scale1 * by;\r\n this.z = scale0 * az + scale1 * bz;\r\n this.w = scale0 * aw + scale1 * bw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n invert: function ()\r\n {\r\n var a0 = this.x;\r\n var a1 = this.y;\r\n var a2 = this.z;\r\n var a3 = this.w;\r\n\r\n var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;\r\n var invDot = (dot) ? 1 / dot : 0;\r\n\r\n // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0\r\n\r\n this.x = -a0 * invDot;\r\n this.y = -a1 * invDot;\r\n this.z = -a2 * invDot;\r\n this.w = a3 * invDot;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Convert this Quaternion into its conjugate.\r\n *\r\n * Sets the x, y and z components.\r\n *\r\n * @method Phaser.Math.Quaternion#conjugate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n conjugate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the X axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateX: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n this.x = ax * bw + aw * bx;\r\n this.y = ay * bw + az * bx;\r\n this.z = az * bw - ay * bx;\r\n this.w = aw * bw - ax * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the Y axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateY: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var by = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n this.x = ax * bw - az * by;\r\n this.y = ay * bw + aw * by;\r\n this.z = az * bw + ax * by;\r\n this.w = aw * bw - ay * by;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the Z axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateZ: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bz = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n this.x = ax * bw + ay * bz;\r\n this.y = ay * bw - ax * bz;\r\n this.z = az * bw + aw * bz;\r\n this.w = aw * bw - az * bz;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Create a unit (or rotation) Quaternion from its x, y, and z components.\r\n *\r\n * Sets the w component.\r\n *\r\n * @method Phaser.Math.Quaternion#calculateW\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n calculateW: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n this.w = -Math.sqrt(1.0 - x * x - y * y - z * z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Convert the given Matrix into this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#fromMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix to convert from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n fromMat3: function (mat)\r\n {\r\n // benchmarks:\r\n // http://jsperf.com/typed-array-access-speed\r\n // http://jsperf.com/conversion-of-3x3-matrix-to-quaternion\r\n\r\n // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\r\n // article \"Quaternion Calculus and Fast Animation\".\r\n var m = mat.val;\r\n var fTrace = m[0] + m[4] + m[8];\r\n var fRoot;\r\n\r\n if (fTrace > 0)\r\n {\r\n // |w| > 1/2, may as well choose w > 1/2\r\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\r\n\r\n this.w = 0.5 * fRoot;\r\n\r\n fRoot = 0.5 / fRoot; // 1/(4w)\r\n\r\n this.x = (m[7] - m[5]) * fRoot;\r\n this.y = (m[2] - m[6]) * fRoot;\r\n this.z = (m[3] - m[1]) * fRoot;\r\n }\r\n else\r\n {\r\n // |w| <= 1/2\r\n var i = 0;\r\n\r\n if (m[4] > m[0])\r\n {\r\n i = 1;\r\n }\r\n\r\n if (m[8] > m[i * 3 + i])\r\n {\r\n i = 2;\r\n }\r\n\r\n var j = siNext[i];\r\n var k = siNext[j];\r\n\r\n // This isn't quite as clean without array access\r\n fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1);\r\n tmp[i] = 0.5 * fRoot;\r\n\r\n fRoot = 0.5 / fRoot;\r\n\r\n tmp[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;\r\n tmp[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;\r\n\r\n this.x = tmp[0];\r\n this.y = tmp[1];\r\n this.z = tmp[2];\r\n this.w = (m[k * 3 + j] - m[j * 3 + k]) * fRoot;\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Quaternion;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\n\r\n/**\r\n * Convert the given angle in radians, to the equivalent angle in degrees.\r\n *\r\n * @function Phaser.Math.RadToDeg\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The angle in radians to convert ot degrees.\r\n *\r\n * @return {integer} The given angle converted to degrees.\r\n */\r\nvar RadToDeg = function (radians)\r\n{\r\n return radians * CONST.RAD_TO_DEG;\r\n};\r\n\r\nmodule.exports = RadToDeg;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random unit vector.\r\n *\r\n * Computes random values for the given vector between -1 and 1 that can be used to represent a direction.\r\n *\r\n * Optionally accepts a scale value to scale the resulting vector by.\r\n *\r\n * @function Phaser.Math.RandomXY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} vector - The Vector to compute random values for.\r\n * @param {number} [scale=1] - The scale of the random values.\r\n *\r\n * @return {Phaser.Math.Vector2} The given Vector.\r\n */\r\nvar RandomXY = function (vector, scale)\r\n{\r\n if (scale === undefined) { scale = 1; }\r\n\r\n var r = Math.random() * 2 * Math.PI;\r\n\r\n vector.x = Math.cos(r) * scale;\r\n vector.y = Math.sin(r) * scale;\r\n\r\n return vector;\r\n};\r\n\r\nmodule.exports = RandomXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random position vector in a spherical area, optionally defined by the given radius.\r\n *\r\n * @function Phaser.Math.RandomXYZ\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec3 - The Vector to compute random values for.\r\n * @param {number} [radius=1] - The radius.\r\n *\r\n * @return {Phaser.Math.Vector3} The given Vector.\r\n */\r\nvar RandomXYZ = function (vec3, radius)\r\n{\r\n if (radius === undefined) { radius = 1; }\r\n\r\n var r = Math.random() * 2 * Math.PI;\r\n var z = (Math.random() * 2) - 1;\r\n var zScale = Math.sqrt(1 - z * z) * radius;\r\n\r\n vec3.x = Math.cos(r) * zScale;\r\n vec3.y = Math.sin(r) * zScale;\r\n vec3.z = z * radius;\r\n\r\n return vec3;\r\n};\r\n\r\nmodule.exports = RandomXYZ;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random four-dimensional vector.\r\n *\r\n * @function Phaser.Math.RandomXYZW\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} vec4 - The Vector to compute random values for.\r\n * @param {number} [scale=1] - The scale of the random values.\r\n *\r\n * @return {Phaser.Math.Vector4} The given Vector.\r\n */\r\nvar RandomXYZW = function (vec4, scale)\r\n{\r\n if (scale === undefined) { scale = 1; }\r\n\r\n // TODO: Not spherical; should fix this for more uniform distribution\r\n vec4.x = (Math.random() * 2 - 1) * scale;\r\n vec4.y = (Math.random() * 2 - 1) * scale;\r\n vec4.z = (Math.random() * 2 - 1) * scale;\r\n vec4.w = (Math.random() * 2 - 1) * scale;\r\n\r\n return vec4;\r\n};\r\n\r\nmodule.exports = RandomXYZW;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a given point by a given angle around the origin (0, 0), in an anti-clockwise direction.\r\n *\r\n * @function Phaser.Math.Rotate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} angle - The angle to be rotated by in an anticlockwise direction.\r\n *\r\n * @return {Phaser.Geom.Point} The given point, rotated by the given angle in an anticlockwise direction.\r\n */\r\nvar Rotate = function (point, angle)\r\n{\r\n var x = point.x;\r\n var y = point.y;\r\n\r\n point.x = (x * Math.cos(angle)) - (y * Math.sin(angle));\r\n point.y = (x * Math.sin(angle)) + (y * Math.cos(angle));\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = Rotate;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a `point` around `x` and `y` by the given `angle`.\r\n *\r\n * @function Phaser.Math.RotateAround\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} x - The horizontal coordinate to rotate around.\r\n * @param {number} y - The vertical coordinate to rotate around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Geom.Point} The given point, rotated by the given angle around the given coordinates.\r\n */\r\nvar RotateAround = function (point, x, y, angle)\r\n{\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n\r\n var tx = point.x - x;\r\n var ty = point.y - y;\r\n\r\n point.x = tx * c - ty * s + x;\r\n point.y = tx * s + ty * c + y;\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = RotateAround;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a `point` around `x` and `y` by the given `angle` and `distance`.\r\n *\r\n * @function Phaser.Math.RotateAroundDistance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} x - The horizontal coordinate to rotate around.\r\n * @param {number} y - The vertical coordinate to rotate around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n * @param {number} distance - The distance from (x, y) to place the point at.\r\n *\r\n * @return {Phaser.Geom.Point} The given point.\r\n */\r\nvar RotateAroundDistance = function (point, x, y, angle, distance)\r\n{\r\n var t = angle + Math.atan2(point.y - y, point.x - x);\r\n\r\n point.x = x + (distance * Math.cos(t));\r\n point.y = y + (distance * Math.sin(t));\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = RotateAroundDistance;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector3 = require('../math/Vector3');\r\nvar Matrix4 = require('../math/Matrix4');\r\nvar Quaternion = require('../math/Quaternion');\r\n\r\nvar tmpMat4 = new Matrix4();\r\nvar tmpQuat = new Quaternion();\r\nvar tmpVec3 = new Vector3();\r\n\r\n/**\r\n * Rotates a vector in place by axis angle.\r\n *\r\n * This is the same as transforming a point by an\r\n * axis-angle quaternion, but it has higher precision.\r\n *\r\n * @function Phaser.Math.RotateVec3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec - The vector to be rotated.\r\n * @param {Phaser.Math.Vector3} axis - The axis to rotate around.\r\n * @param {number} radians - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Math.Vector3} The given vector.\r\n */\r\nvar RotateVec3 = function (vec, axis, radians)\r\n{\r\n // Set the quaternion to our axis angle\r\n tmpQuat.setAxisAngle(axis, radians);\r\n\r\n // Create a rotation matrix from the axis angle\r\n tmpMat4.fromRotationTranslation(tmpQuat, tmpVec3.set(0, 0, 0));\r\n\r\n // Multiply our vector by the rotation matrix\r\n return vec.transformMat4(tmpMat4);\r\n};\r\n\r\nmodule.exports = RotateVec3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Round a given number so it is further away from zero. That is, positive numbers are rounded up, and negative numbers are rounded down.\r\n *\r\n * @function Phaser.Math.RoundAwayFromZero\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to round.\r\n *\r\n * @return {number} The rounded number, rounded away from zero.\r\n */\r\nvar RoundAwayFromZero = function (value)\r\n{\r\n // \"Opposite\" of truncate.\r\n return (value > 0) ? Math.ceil(value) : Math.floor(value);\r\n};\r\n\r\nmodule.exports = RoundAwayFromZero;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Round a value to the given precision.\r\n * \r\n * For example:\r\n * \r\n * ```javascript\r\n * RoundTo(123.456, 0) = 123\r\n * RoundTo(123.456, 1) = 120\r\n * RoundTo(123.456, 2) = 100\r\n * ```\r\n * \r\n * To round the decimal, i.e. to round to precision, pass in a negative `place`:\r\n * \r\n * ```javascript\r\n * RoundTo(123.456789, 0) = 123\r\n * RoundTo(123.456789, -1) = 123.5\r\n * RoundTo(123.456789, -2) = 123.46\r\n * RoundTo(123.456789, -3) = 123.457\r\n * ```\r\n *\r\n * @function Phaser.Math.RoundTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {integer} [place=0] - The place to round to. Positive to round the units, negative to round the decimal.\r\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar RoundTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.round(value * p) / p;\r\n};\r\n\r\nmodule.exports = RoundTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Generate a series of sine and cosine values.\r\n *\r\n * @function Phaser.Math.SinCosTableGenerator\r\n * @since 3.0.0\r\n *\r\n * @param {number} length - The number of values to generate.\r\n * @param {number} [sinAmp=1] - The sine value amplitude.\r\n * @param {number} [cosAmp=1] - The cosine value amplitude.\r\n * @param {number} [frequency=1] - The frequency of the values.\r\n *\r\n * @return {Phaser.Types.Math.SinCosTable} The generated values.\r\n */\r\nvar SinCosTableGenerator = function (length, sinAmp, cosAmp, frequency)\r\n{\r\n if (sinAmp === undefined) { sinAmp = 1; }\r\n if (cosAmp === undefined) { cosAmp = 1; }\r\n if (frequency === undefined) { frequency = 1; }\r\n\r\n frequency *= Math.PI / length;\r\n\r\n var cos = [];\r\n var sin = [];\r\n\r\n for (var c = 0; c < length; c++)\r\n {\r\n cosAmp -= sinAmp * frequency;\r\n sinAmp += cosAmp * frequency;\r\n\r\n cos[c] = cosAmp;\r\n sin[c] = sinAmp;\r\n }\r\n\r\n return {\r\n sin: sin,\r\n cos: cos,\r\n length: length\r\n };\r\n};\r\n\r\nmodule.exports = SinCosTableGenerator;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a smooth interpolation percentage of `x` between `min` and `max`.\r\n *\r\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\r\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\r\n * between 0 and 1 otherwise.\r\n *\r\n * @function Phaser.Math.SmoothStep\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\r\n *\r\n * @param {number} x - The input value.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The percentage of interpolation, between 0 and 1.\r\n */\r\nvar SmoothStep = function (x, min, max)\r\n{\r\n if (x <= min)\r\n {\r\n return 0;\r\n }\r\n\r\n if (x >= max)\r\n {\r\n return 1;\r\n }\r\n\r\n x = (x - min) / (max - min);\r\n\r\n return x * x * (3 - 2 * x);\r\n};\r\n\r\nmodule.exports = SmoothStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a smoother interpolation percentage of `x` between `min` and `max`.\r\n *\r\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\r\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\r\n * between 0 and 1 otherwise.\r\n *\r\n * Produces an even smoother interpolation than {@link Phaser.Math.SmoothStep}.\r\n *\r\n * @function Phaser.Math.SmootherStep\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\r\n *\r\n * @param {number} x - The input value.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The percentage of interpolation, between 0 and 1.\r\n */\r\nvar SmootherStep = function (x, min, max)\r\n{\r\n x = Math.max(0, Math.min(1, (x - min) / (max - min)));\r\n\r\n return x * x * x * (x * (x * 6 - 15) + 10);\r\n};\r\n\r\nmodule.exports = SmootherStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = require('./Vector2');\r\n\r\n/**\r\n * Returns a Vec2 containing the x and y position of the given index in a `width` x `height` sized grid.\r\n * \r\n * For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2.\r\n * \r\n * If the given index is out of range an empty Vec2 is returned.\r\n *\r\n * @function Phaser.Math.ToXY\r\n * @since 3.19.0\r\n *\r\n * @param {integer} index - The position within the grid to get the x/y value for.\r\n * @param {integer} width - The width of the grid.\r\n * @param {integer} height - The height of the grid.\r\n * @param {Phaser.Math.Vector2} [out] - An optional Vector2 to store the result in. If not given, a new Vector2 instance will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 where the x and y properties contain the given grid index.\r\n */\r\nvar ToXY = function (index, width, height, out)\r\n{\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var x = 0;\r\n var y = 0;\r\n var total = width * height;\r\n\r\n if (index > 0 && index <= total)\r\n {\r\n if (index > width - 1)\r\n {\r\n y = Math.floor(index / width);\r\n x = index - (y * width);\r\n }\r\n else\r\n {\r\n x = index;\r\n }\r\n\r\n out.set(x, y);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = ToXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = require('./Vector2');\r\n\r\n/**\r\n * Takes the `x` and `y` coordinates and transforms them into the same space as\r\n * defined by the position, rotation and scale values.\r\n *\r\n * @function Phaser.Math.TransformXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to be transformed.\r\n * @param {number} y - The y coordinate to be transformed.\r\n * @param {number} positionX - Horizontal position of the transform point.\r\n * @param {number} positionY - Vertical position of the transform point.\r\n * @param {number} rotation - Rotation of the transform point, in radians.\r\n * @param {number} scaleX - Horizontal scale of the transform point.\r\n * @param {number} scaleY - Vertical scale of the transform point.\r\n * @param {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} [output] - The output vector, point or object for the translated coordinates.\r\n *\r\n * @return {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} The translated point.\r\n */\r\nvar TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output)\r\n{\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var radianSin = Math.sin(rotation);\r\n var radianCos = Math.cos(rotation);\r\n\r\n // Rotate and Scale\r\n var a = radianCos * scaleX;\r\n var b = radianSin * scaleX;\r\n var c = -radianSin * scaleY;\r\n var d = radianCos * scaleY;\r\n\r\n // Invert\r\n var id = 1 / ((a * d) + (c * -b));\r\n\r\n output.x = (d * id * x) + (-c * id * y) + (((positionY * c) - (positionX * d)) * id);\r\n output.y = (a * id * y) + (-b * id * x) + (((-positionY * a) + (positionX * b)) * id);\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = TransformXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 2D space.\r\n *\r\n * A two-component vector.\r\n *\r\n * @class Vector2\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number|Phaser.Types.Math.Vector2Like} [x] - The x component, or an object with `x` and `y` properties.\r\n * @param {number} [y] - The y component.\r\n */\r\nvar Vector2 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector2 (x, y)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector2#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector2#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n }\r\n else\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector2.\r\n *\r\n * @method Phaser.Math.Vector2#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} A clone of this Vector2.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector2(this.x, this.y);\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x || 0;\r\n this.y = src.y || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the component values of this Vector from a given Vector2Like object.\r\n *\r\n * @method Phaser.Math.Vector2#setFromObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} obj - The object containing the component values to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setFromObject: function (obj)\r\n {\r\n this.x = obj.x || 0;\r\n this.y = obj.y || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x` and `y` components of the this Vector to the given `x` and `y` values.\r\n *\r\n * @method Phaser.Math.Vector2#set\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x value to set for this Vector.\r\n * @param {number} [y=x] - The y value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n set: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This method is an alias for `Vector2.set`.\r\n *\r\n * @method Phaser.Math.Vector2#setTo\r\n * @since 3.4.0\r\n *\r\n * @param {number} x - The x value to set for this Vector.\r\n * @param {number} [y=x] - The y value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setTo: function (x, y)\r\n {\r\n return this.set(x, y);\r\n },\r\n\r\n /**\r\n * Sets the `x` and `y` values of this object from a given polar coordinate.\r\n *\r\n * @method Phaser.Math.Vector2#setToPolar\r\n * @since 3.0.0\r\n *\r\n * @param {number} azimuth - The angular coordinate, in radians.\r\n * @param {number} [radius=1] - The radial coordinate (length).\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setToPolar: function (azimuth, radius)\r\n {\r\n if (radius == null) { radius = 1; }\r\n\r\n this.x = Math.cos(azimuth) * radius;\r\n this.y = Math.sin(azimuth) * radius;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict equality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector2#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector.\r\n *\r\n * @return {boolean} Whether the given Vector is equal to this Vector.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y));\r\n },\r\n\r\n /**\r\n * Calculate the angle between this Vector and the positive x-axis, in radians.\r\n *\r\n * @method Phaser.Math.Vector2#angle\r\n * @since 3.0.0\r\n *\r\n * @return {number} The angle between this Vector, and the positive x-axis, given in radians.\r\n */\r\n angle: function ()\r\n {\r\n // computes the angle in radians with respect to the positive x-axis\r\n\r\n var angle = Math.atan2(this.y, this.x);\r\n\r\n if (angle < 0)\r\n {\r\n angle += 2 * Math.PI;\r\n }\r\n\r\n return angle;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector2#add\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n add: function (src)\r\n {\r\n this.x += src.x;\r\n this.y += src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector2#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n subtract: function (src)\r\n {\r\n this.x -= src.x;\r\n this.y -= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n multiply: function (src)\r\n {\r\n this.x *= src.x;\r\n this.y *= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector2#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n scale: function (value)\r\n {\r\n if (isFinite(value))\r\n {\r\n this.x *= value;\r\n this.y *= value;\r\n }\r\n else\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#divide\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n divide: function (src)\r\n {\r\n this.x /= src.x;\r\n this.y /= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Negate the `x` and `y` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#distance\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (src)\r\n {\r\n var dx = src.x - this.x;\r\n var dy = src.y - this.y;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector2#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (src)\r\n {\r\n var dx = src.x - this.x;\r\n var dy = src.y - this.y;\r\n\r\n return dx * dx + dy * dy;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n return Math.sqrt(x * x + y * y);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector2#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n return x * x + y * y;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var len = x * x + y * y;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Right-hand normalize (make unit length) this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#normalizeRightHand\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalizeRightHand: function ()\r\n {\r\n var x = this.x;\r\n\r\n this.x = this.y * -1;\r\n this.y = x;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector2 to dot product with this Vector2.\r\n *\r\n * @return {number} The dot product of this Vector and the given Vector.\r\n */\r\n dot: function (src)\r\n {\r\n return this.x * src.x + this.y * src.y;\r\n },\r\n\r\n /**\r\n * Calculate the cross product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#cross\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector2 to cross with this Vector2.\r\n *\r\n * @return {number} The cross product of this Vector and the given Vector.\r\n */\r\n cross: function (src)\r\n {\r\n return this.x * src.y - this.y * src.x;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector2 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n lerp: function (src, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n\r\n this.x = ax + t * (src.x - ax);\r\n this.y = ay + t * (src.y - ay);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector2#transformMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector2 with.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n transformMat3: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[3] * y + m[6];\r\n this.y = m[1] * x + m[4] * y + m[7];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector2#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector2 with.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[12];\r\n this.y = m[1] * x + m[5] * y + m[13];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0).\r\n *\r\n * @method Phaser.Math.Vector2#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A static zero Vector2 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.ZERO\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.1.0\r\n */\r\nVector2.ZERO = new Vector2();\r\n\r\n/**\r\n * A static right Vector2 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.RIGHT\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.RIGHT = new Vector2(1, 0);\r\n\r\n/**\r\n * A static left Vector2 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.LEFT\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.LEFT = new Vector2(-1, 0);\r\n\r\n/**\r\n * A static up Vector2 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.UP\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.UP = new Vector2(0, -1);\r\n\r\n/**\r\n * A static down Vector2 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.DOWN\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.DOWN = new Vector2(0, 1);\r\n\r\n/**\r\n * A static one Vector2 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.ONE\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.ONE = new Vector2(1, 1);\r\n\r\nmodule.exports = Vector2;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 3D space.\r\n *\r\n * A three-component vector.\r\n *\r\n * @class Vector3\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n */\r\nvar Vector3 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector3 (x, y, z)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The z component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.z = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Set this Vector to point up.\r\n *\r\n * Sets the y component of the vector to 1, and the others to 0.\r\n *\r\n * @method Phaser.Math.Vector3#up\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n up: function ()\r\n {\r\n this.x = 0;\r\n this.y = 1;\r\n this.z = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} A new Vector3 object containing this Vectors values.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector3(this.x, this.y, this.z);\r\n },\r\n\r\n /**\r\n * Calculate the cross (vector) product of two given Vectors.\r\n *\r\n * @method Phaser.Math.Vector3#crossVectors\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The first Vector to multiply.\r\n * @param {Phaser.Math.Vector3} b - The second Vector to multiply.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n crossVectors: function (a, b)\r\n {\r\n var ax = a.x;\r\n var ay = a.y;\r\n var az = a.z;\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n\r\n this.x = ay * bz - az * by;\r\n this.y = az * bx - ax * bz;\r\n this.z = ax * by - ay * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict equality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector3#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to compare against.\r\n *\r\n * @return {boolean} True if the two vectors strictly match, otherwise false.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z));\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#copy\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x`, `y`, and `z` components of this Vector to the given `x`, `y`, and `z` values.\r\n *\r\n * @method Phaser.Math.Vector3#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y and z components.\r\n * @param {number} [y] - The y value to set for this Vector.\r\n * @param {number} [z] - The z value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n set: function (x, y, z)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n multiply: function (v)\r\n {\r\n this.x *= v.x;\r\n this.y *= v.y;\r\n this.z *= v.z || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector3#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n scale: function (scale)\r\n {\r\n if (isFinite(scale))\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n }\r\n else\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#divide\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n divide: function (v)\r\n {\r\n this.x /= v.x;\r\n this.y /= v.y;\r\n this.z /= v.z || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Negate the `x`, `y` and `z` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#distance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n\r\n return Math.sqrt(dx * dx + dy * dy + dz * dz);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector3#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n\r\n return dx * dx + dy * dy + dz * dz;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n return Math.sqrt(x * x + y * y + z * z);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector3#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n return x * x + y * y + z * z;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector3#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var len = x * x + y * y + z * z;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to dot product with this Vector3.\r\n *\r\n * @return {number} The dot product of this Vector and `v`.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z;\r\n },\r\n\r\n /**\r\n * Calculate the cross (vector) product of this Vector (which will be modified) and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#cross\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector to cross product with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n cross: function (v)\r\n {\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var bx = v.x;\r\n var by = v.y;\r\n var bz = v.z;\r\n\r\n this.x = ay * bz - az * by;\r\n this.y = az * bx - ax * bz;\r\n this.z = ax * by - ay * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector3#transformMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformMat3: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n this.x = x * m[0] + y * m[3] + z * m[6];\r\n this.y = x * m[1] + y * m[4] + z * m[7];\r\n this.z = x * m[2] + y * m[5] + z * m[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector3#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12];\r\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13];\r\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transforms the coordinates of this Vector3 with the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#transformCoordinates\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformCoordinates: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n var tx = (x * m[0]) + (y * m[4]) + (z * m[8]) + m[12];\r\n var ty = (x * m[1]) + (y * m[5]) + (z * m[9]) + m[13];\r\n var tz = (x * m[2]) + (y * m[6]) + (z * m[10]) + m[14];\r\n var tw = (x * m[3]) + (y * m[7]) + (z * m[11]) + m[15];\r\n\r\n this.x = tx / tw;\r\n this.y = ty / tw;\r\n this.z = tz / tw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Quaternion.\r\n *\r\n * @method Phaser.Math.Vector3#transformQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformQuat: function (q)\r\n {\r\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var qx = q.x;\r\n var qy = q.y;\r\n var qz = q.z;\r\n var qw = q.w;\r\n\r\n // calculate quat * vec\r\n var ix = qw * x + qy * z - qz * y;\r\n var iy = qw * y + qz * x - qx * z;\r\n var iz = qw * z + qx * y - qy * x;\r\n var iw = -qx * x - qy * y - qz * z;\r\n\r\n // calculate result * inverse quat\r\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\r\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\r\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the specified matrix, applying a W divide. This is useful for projection,\r\n * e.g. unprojecting a 2D point into 3D space.\r\n *\r\n * @method Phaser.Math.Vector3#project\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to multiply this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n project: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n var a00 = m[0];\r\n var a01 = m[1];\r\n var a02 = m[2];\r\n var a03 = m[3];\r\n var a10 = m[4];\r\n var a11 = m[5];\r\n var a12 = m[6];\r\n var a13 = m[7];\r\n var a20 = m[8];\r\n var a21 = m[9];\r\n var a22 = m[10];\r\n var a23 = m[11];\r\n var a30 = m[12];\r\n var a31 = m[13];\r\n var a32 = m[14];\r\n var a33 = m[15];\r\n\r\n var lw = 1 / (x * a03 + y * a13 + z * a23 + a33);\r\n\r\n this.x = (x * a00 + y * a10 + z * a20 + a30) * lw;\r\n this.y = (x * a01 + y * a11 + z * a21 + a31) * lw;\r\n this.z = (x * a02 + y * a12 + z * a22 + a32) * lw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Unproject this point from 2D space to 3D space.\r\n * The point should have its x and y properties set to\r\n * 2D screen space, and the z either at 0 (near plane)\r\n * or 1 (far plane). The provided matrix is assumed to already\r\n * be combined, i.e. projection * view * model.\r\n *\r\n * After this operation, this vector's (x, y, z) components will\r\n * represent the unprojected 3D coordinate.\r\n *\r\n * @method Phaser.Math.Vector3#unproject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} viewport - Screen x, y, width and height in pixels.\r\n * @param {Phaser.Math.Matrix4} invProjectionView - Combined projection and view matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n unproject: function (viewport, invProjectionView)\r\n {\r\n var viewX = viewport.x;\r\n var viewY = viewport.y;\r\n var viewWidth = viewport.z;\r\n var viewHeight = viewport.w;\r\n\r\n var x = this.x - viewX;\r\n var y = (viewHeight - this.y - 1) - viewY;\r\n var z = this.z;\r\n\r\n this.x = (2 * x) / viewWidth - 1;\r\n this.y = (2 * y) / viewHeight - 1;\r\n this.z = 2 * z - 1;\r\n\r\n return this.project(invProjectionView);\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0, 0).\r\n *\r\n * @method Phaser.Math.Vector3#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A static zero Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.ZERO\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.ZERO = new Vector3();\r\n\r\n/**\r\n * A static right Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.RIGHT\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.RIGHT = new Vector3(1, 0, 0);\r\n\r\n/**\r\n * A static left Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.LEFT\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.LEFT = new Vector3(-1, 0, 0);\r\n\r\n/**\r\n * A static up Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.UP\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.UP = new Vector3(0, -1, 0);\r\n\r\n/**\r\n * A static down Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.DOWN\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.DOWN = new Vector3(0, 1, 0);\r\n\r\n/**\r\n * A static forward Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.FORWARD\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.FORWARD = new Vector3(0, 0, 1);\r\n\r\n/**\r\n * A static back Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.BACK\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.BACK = new Vector3(0, 0, -1);\r\n\r\n/**\r\n * A static one Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.ONE\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.ONE = new Vector3(1, 1, 1);\r\n\r\nmodule.exports = Vector3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 4D space.\r\n *\r\n * A four-component vector.\r\n *\r\n * @class Vector4\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n * @param {number} [w] - The w component.\r\n */\r\nvar Vector4 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector4 (x, y, z, w)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The z component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.z = 0;\r\n\r\n /**\r\n * The w component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.w = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector4.\r\n *\r\n * @method Phaser.Math.Vector4#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} A clone of this Vector4.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector4(this.x, this.y, this.z, this.w);\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z || 0;\r\n this.w = src.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict quality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector4#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The vector to check equality with.\r\n *\r\n * @return {boolean} A boolean indicating whether the two Vectors are equal or not.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z) && (this.w === v.w));\r\n },\r\n\r\n /**\r\n * Set the `x`, `y`, `z` and `w` components of the this Vector to the given `x`, `y`, `z` and `w` values.\r\n *\r\n * @method Phaser.Math.Vector4#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y, z and w components.\r\n * @param {number} y - The y value to set for this Vector.\r\n * @param {number} z - The z value to set for this Vector.\r\n * @param {number} w - The z value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n set: function (x, y, z, w)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector4#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z || 0;\r\n this.w += v.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector4#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z || 0;\r\n this.w -= v.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector4#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n scale: function (scale)\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n this.w *= scale;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return Math.sqrt(x * x + y * y + z * z + w * w);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector4#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector4#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var len = x * x + y * y + z * z + w * w;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n this.w = w * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The Vector4 to dot product with this Vector4.\r\n *\r\n * @return {number} The dot product of this Vector and the given Vector.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The Vector4 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n this.w = aw + t * (v.w - aw);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n multiply: function (v)\r\n {\r\n this.x *= v.x;\r\n this.y *= v.y;\r\n this.z *= v.z || 1;\r\n this.w *= v.w || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#divide\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n divide: function (v)\r\n {\r\n this.x /= v.x;\r\n this.y /= v.y;\r\n this.z /= v.z || 1;\r\n this.w /= v.w || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#distance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n var dw = v.w - this.w || 0;\r\n\r\n return Math.sqrt(dx * dx + dy * dy + dz * dz + dw * dw);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector4#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n var dw = v.w - this.w || 0;\r\n\r\n return dx * dx + dy * dy + dz * dz + dw * dw;\r\n },\r\n\r\n /**\r\n * Negate the `x`, `y`, `z` and `w` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n this.w = -this.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector4#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector4 with.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\r\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\r\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\r\n this.w = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Quaternion.\r\n *\r\n * @method Phaser.Math.Vector4#transformQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n transformQuat: function (q)\r\n {\r\n // TODO: is this really the same as Vector3?\r\n // Also, what about this: http://molecularmusings.wordpress.com/2013/05/24/a-faster-quaternion-vector-multiplication/\r\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var qx = q.x;\r\n var qy = q.y;\r\n var qz = q.z;\r\n var qw = q.w;\r\n\r\n // calculate quat * vec\r\n var ix = qw * x + qy * z - qz * y;\r\n var iy = qw * y + qz * x - qx * z;\r\n var iz = qw * z + qx * y - qy * x;\r\n var iw = -qx * x - qy * y - qz * z;\r\n\r\n // calculate result * inverse quat\r\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\r\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\r\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0, 0, 0).\r\n *\r\n * @method Phaser.Math.Vector4#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n// TODO: Check if these are required internally, if not, remove.\r\nVector4.prototype.sub = Vector4.prototype.subtract;\r\nVector4.prototype.mul = Vector4.prototype.multiply;\r\nVector4.prototype.div = Vector4.prototype.divide;\r\nVector4.prototype.dist = Vector4.prototype.distance;\r\nVector4.prototype.distSq = Vector4.prototype.distanceSq;\r\nVector4.prototype.len = Vector4.prototype.length;\r\nVector4.prototype.lenSq = Vector4.prototype.lengthSq;\r\n\r\nmodule.exports = Vector4;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the two values are within the given `tolerance` of each other.\r\n *\r\n * @function Phaser.Math.Within\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value to use in the calculation.\r\n * @param {number} b - The second value to use in the calculation.\r\n * @param {number} tolerance - The tolerance. Anything equal to or less than this value is considered as being within range.\r\n *\r\n * @return {boolean} Returns `true` if `a` is less than or equal to the tolerance of `b`.\r\n */\r\nvar Within = function (a, b, tolerance)\r\n{\r\n return (Math.abs(a - b) <= tolerance);\r\n};\r\n\r\nmodule.exports = Within;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Wrap the given `value` between `min` and `max.\r\n *\r\n * @function Phaser.Math.Wrap\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to wrap.\r\n * @param {number} min - The minimum value.\r\n * @param {number} max - The maximum value.\r\n *\r\n * @return {number} The wrapped value.\r\n */\r\nvar Wrap = function (value, min, max)\r\n{\r\n var range = max - min;\r\n\r\n return (min + ((((value - min) % range) + range) % range));\r\n};\r\n\r\nmodule.exports = Wrap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\r\n *\r\n * @function Phaser.Math.Angle.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar Between = function (x1, y1, x2, y2)\r\n{\r\n return Math.atan2(y2 - y1, x2 - x1);\r\n};\r\n\r\nmodule.exports = Between;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\r\n *\r\n * Calculates the angle of the vector from the first point to the second point.\r\n *\r\n * @function Phaser.Math.Angle.BetweenPoints\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point1 - The first point.\r\n * @param {(Phaser.Geom.Point|object)} point2 - The second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenPoints = function (point1, point2)\r\n{\r\n return Math.atan2(point2.y - point1.y, point2.x - point1.x);\r\n};\r\n\r\nmodule.exports = BetweenPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\r\n *\r\n * The difference between this method and {@link Phaser.Math.Angle.BetweenPoints} is that this assumes the y coordinate\r\n * travels down the screen.\r\n *\r\n * @function Phaser.Math.Angle.BetweenPointsY\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point1 - The first point.\r\n * @param {(Phaser.Geom.Point|object)} point2 - The second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenPointsY = function (point1, point2)\r\n{\r\n return Math.atan2(point2.x - point1.x, point2.y - point1.y);\r\n};\r\n\r\nmodule.exports = BetweenPointsY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\r\n *\r\n * The difference between this method and {@link Phaser.Math.Angle.Between} is that this assumes the y coordinate\r\n * travels down the screen.\r\n *\r\n * @function Phaser.Math.Angle.BetweenY\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenY = function (x1, y1, x2, y2)\r\n{\r\n return Math.atan2(x2 - x1, y2 - y1);\r\n};\r\n\r\nmodule.exports = BetweenY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('../const');\r\n\r\n/**\r\n * Takes an angle in Phasers default clockwise format and converts it so that\r\n * 0 is North, 90 is West, 180 is South and 270 is East,\r\n * therefore running counter-clockwise instead of clockwise.\r\n * \r\n * You can pass in the angle from a Game Object using:\r\n * \r\n * ```javascript\r\n * var converted = CounterClockwise(gameobject.rotation);\r\n * ```\r\n * \r\n * All values for this function are in radians.\r\n *\r\n * @function Phaser.Math.Angle.CounterClockwise\r\n * @since 3.16.0\r\n *\r\n * @param {number} angle - The angle to convert, in radians.\r\n *\r\n * @return {number} The converted angle, in radians.\r\n */\r\nvar CounterClockwise = function (angle)\r\n{\r\n if (angle > Math.PI)\r\n {\r\n angle -= CONST.PI2;\r\n }\r\n\r\n return Math.abs((((angle + CONST.TAU) % CONST.PI2) - CONST.PI2) % CONST.PI2);\r\n};\r\n\r\nmodule.exports = CounterClockwise;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Normalize an angle to the [0, 2pi] range.\r\n *\r\n * @function Phaser.Math.Angle.Normalize\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to normalize, in radians.\r\n *\r\n * @return {number} The normalized angle, in radians.\r\n */\r\nvar Normalize = function (angle)\r\n{\r\n angle = angle % (2 * Math.PI);\r\n\r\n if (angle >= 0)\r\n {\r\n return angle;\r\n }\r\n else\r\n {\r\n return angle + 2 * Math.PI;\r\n }\r\n};\r\n\r\nmodule.exports = Normalize;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Normalize = require('./Normalize');\r\n\r\n/**\r\n * Reverse the given angle.\r\n *\r\n * @function Phaser.Math.Angle.Reverse\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to reverse, in radians.\r\n *\r\n * @return {number} The reversed angle, in radians.\r\n */\r\nvar Reverse = function (angle)\r\n{\r\n return Normalize(angle + Math.PI);\r\n};\r\n\r\nmodule.exports = Reverse;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = require('../const');\r\n\r\n/**\r\n * Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call.\r\n *\r\n * @function Phaser.Math.Angle.RotateTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} currentAngle - The current angle, in radians.\r\n * @param {number} targetAngle - The target angle to rotate to, in radians.\r\n * @param {number} [lerp=0.05] - The lerp value to add to the current angle.\r\n *\r\n * @return {number} The adjusted angle.\r\n */\r\nvar RotateTo = function (currentAngle, targetAngle, lerp)\r\n{\r\n if (lerp === undefined) { lerp = 0.05; }\r\n\r\n if (currentAngle === targetAngle)\r\n {\r\n return currentAngle;\r\n }\r\n\r\n if (Math.abs(targetAngle - currentAngle) <= lerp || Math.abs(targetAngle - currentAngle) >= (MATH_CONST.PI2 - lerp))\r\n {\r\n currentAngle = targetAngle;\r\n }\r\n else\r\n {\r\n if (Math.abs(targetAngle - currentAngle) > Math.PI)\r\n {\r\n if (targetAngle < currentAngle)\r\n {\r\n targetAngle += MATH_CONST.PI2;\r\n }\r\n else\r\n {\r\n targetAngle -= MATH_CONST.PI2;\r\n }\r\n }\r\n\r\n if (targetAngle > currentAngle)\r\n {\r\n currentAngle += lerp;\r\n }\r\n else if (targetAngle < currentAngle)\r\n {\r\n currentAngle -= lerp;\r\n }\r\n }\r\n\r\n return currentAngle;\r\n};\r\n\r\nmodule.exports = RotateTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Gets the shortest angle between `angle1` and `angle2`.\r\n *\r\n * Both angles must be in the range -180 to 180, which is the same clamped\r\n * range that `sprite.angle` uses, so you can pass in two sprite angles to\r\n * this method and get the shortest angle back between the two of them.\r\n *\r\n * The angle returned will be in the same range. If the returned angle is\r\n * greater than 0 then it's a counter-clockwise rotation, if < 0 then it's\r\n * a clockwise rotation.\r\n *\r\n * TODO: Wrap the angles in this function?\r\n *\r\n * @function Phaser.Math.Angle.ShortestBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle1 - The first angle in the range -180 to 180.\r\n * @param {number} angle2 - The second angle in the range -180 to 180.\r\n *\r\n * @return {number} The shortest angle, in degrees. If greater than zero it's a counter-clockwise rotation.\r\n */\r\nvar ShortestBetween = function (angle1, angle2)\r\n{\r\n var difference = angle2 - angle1;\r\n\r\n if (difference === 0)\r\n {\r\n return 0;\r\n }\r\n\r\n var times = Math.floor((difference - (-180)) / 360);\r\n\r\n return difference - (times * 360);\r\n\r\n};\r\n\r\nmodule.exports = ShortestBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MathWrap = require('../Wrap');\r\n\r\n/**\r\n * Wrap an angle.\r\n *\r\n * Wraps the angle to a value in the range of -PI to PI.\r\n *\r\n * @function Phaser.Math.Angle.Wrap\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to wrap, in radians.\r\n *\r\n * @return {number} The wrapped angle, in radians.\r\n */\r\nvar Wrap = function (angle)\r\n{\r\n return MathWrap(angle, -Math.PI, Math.PI);\r\n};\r\n\r\nmodule.exports = Wrap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Wrap = require('../Wrap');\r\n\r\n/**\r\n * Wrap an angle in degrees.\r\n *\r\n * Wraps the angle to a value in the range of -180 to 180.\r\n *\r\n * @function Phaser.Math.Angle.WrapDegrees\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to wrap, in degrees.\r\n *\r\n * @return {number} The wrapped angle, in degrees.\r\n */\r\nvar WrapDegrees = function (angle)\r\n{\r\n return Wrap(angle, -180, 180);\r\n};\r\n\r\nmodule.exports = WrapDegrees;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Angle\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Between: require('./Between'),\r\n BetweenPoints: require('./BetweenPoints'),\r\n BetweenPointsY: require('./BetweenPointsY'),\r\n BetweenY: require('./BetweenY'),\r\n CounterClockwise: require('./CounterClockwise'),\r\n Normalize: require('./Normalize'),\r\n Reverse: require('./Reverse'),\r\n RotateTo: require('./RotateTo'),\r\n ShortestBetween: require('./ShortestBetween'),\r\n Wrap: require('./Wrap'),\r\n WrapDegrees: require('./WrapDegrees')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = {\r\n\r\n /**\r\n * The value of PI * 2.\r\n * \r\n * @name Phaser.Math.PI2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n PI2: Math.PI * 2,\r\n\r\n /**\r\n * The value of PI * 0.5.\r\n * \r\n * @name Phaser.Math.TAU\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n TAU: Math.PI * 0.5,\r\n\r\n /**\r\n * An epsilon value (1.0e-6)\r\n * \r\n * @name Phaser.Math.EPSILON\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n EPSILON: 1.0e-6,\r\n\r\n /**\r\n * For converting degrees to radians (PI / 180)\r\n * \r\n * @name Phaser.Math.DEG_TO_RAD\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n DEG_TO_RAD: Math.PI / 180,\r\n\r\n /**\r\n * For converting radians to degrees (180 / PI)\r\n * \r\n * @name Phaser.Math.RAD_TO_DEG\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n RAD_TO_DEG: 180 / Math.PI,\r\n\r\n /**\r\n * An instance of the Random Number Generator.\r\n * This is not set until the Game boots.\r\n * \r\n * @name Phaser.Math.RND\r\n * @type {Phaser.Math.RandomDataGenerator}\r\n * @since 3.0.0\r\n */\r\n RND: null\r\n\r\n};\r\n\r\nmodule.exports = MATH_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points).\r\n *\r\n * @function Phaser.Math.Distance.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar DistanceBetween = function (x1, y1, x2, y2)\r\n{\r\n var dx = x1 - x2;\r\n var dy = y1 - y2;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n};\r\n\r\nmodule.exports = DistanceBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points) to the power of `pow`.\r\n *\r\n * @function Phaser.Math.Distance.Power\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n * @param {number} pow - The exponent.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar DistancePower = function (x1, y1, x2, y2, pow)\r\n{\r\n if (pow === undefined) { pow = 2; }\r\n\r\n return Math.sqrt(Math.pow(x2 - x1, pow) + Math.pow(y2 - y1, pow));\r\n};\r\n\r\nmodule.exports = DistancePower;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points), squared.\r\n *\r\n * @function Phaser.Math.Distance.Squared\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point, squared.\r\n */\r\nvar DistanceSquared = function (x1, y1, x2, y2)\r\n{\r\n var dx = x1 - x2;\r\n var dy = y1 - y2;\r\n\r\n return dx * dx + dy * dy;\r\n};\r\n\r\nmodule.exports = DistanceSquared;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Distance\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Between: require('./DistanceBetween'),\r\n Power: require('./DistancePower'),\r\n Squared: require('./DistanceSquared')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Back.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n return v * v * ((overshoot + 1) * v - overshoot);\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Back.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n var s = overshoot * 1.525;\r\n\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * (v * v * ((s + 1) * v - s));\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * ((s + 1) * v + s) + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Back.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n return --v * v * ((overshoot + 1) * v + overshoot) + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Back\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n v = 1 - v;\r\n\r\n if (v < 1 / 2.75)\r\n {\r\n return 1 - (7.5625 * v * v);\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n return 1 - (7.5625 * (v -= 1.5 / 2.75) * v + 0.75);\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n return 1 - (7.5625 * (v -= 2.25 / 2.75) * v + 0.9375);\r\n }\r\n else\r\n {\r\n return 1 - (7.5625 * (v -= 2.625 / 2.75) * v + 0.984375);\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n var reverse = false;\r\n\r\n if (v < 0.5)\r\n {\r\n v = 1 - (v * 2);\r\n reverse = true;\r\n }\r\n else\r\n {\r\n v = (v * 2) - 1;\r\n }\r\n\r\n if (v < 1 / 2.75)\r\n {\r\n v = 7.5625 * v * v;\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n v = 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n v = 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\r\n }\r\n else\r\n {\r\n v = 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\r\n }\r\n\r\n if (reverse)\r\n {\r\n return (1 - v) * 0.5;\r\n }\r\n else\r\n {\r\n return v * 0.5 + 0.5;\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n if (v < 1 / 2.75)\r\n {\r\n return 7.5625 * v * v;\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n return 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n return 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\r\n }\r\n else\r\n {\r\n return 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Bounce\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Circular.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return 1 - Math.sqrt(1 - v * v);\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Circular.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return -0.5 * (Math.sqrt(1 - v * v) - 1);\r\n }\r\n else\r\n {\r\n return 0.5 * (Math.sqrt(1 - (v -= 2) * v) + 1);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Circular.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return Math.sqrt(1 - (--v * v));\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Circular\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v;\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * v + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return --v * v * v + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Cubic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n return -(amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n if ((v *= 2) < 1)\r\n {\r\n return -0.5 * (amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\r\n }\r\n else\r\n {\r\n return amplitude * Math.pow(2, -10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period) * 0.5 + 1;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n return (amplitude * Math.pow(2, -10 * v) * Math.sin((v - s) * (2 * Math.PI) / period) + 1);\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Elastic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Expo.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return Math.pow(2, 10 * (v - 1)) - 0.001;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Expo.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * Math.pow(2, 10 * (v - 1));\r\n }\r\n else\r\n {\r\n return 0.5 * (2 - Math.pow(2, -10 * (v - 1)));\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Expo.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return 1 - Math.pow(2, -10 * v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Expo\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Back: require('./back'),\r\n Bounce: require('./bounce'),\r\n Circular: require('./circular'),\r\n Cubic: require('./cubic'),\r\n Elastic: require('./elastic'),\r\n Expo: require('./expo'),\r\n Linear: require('./linear'),\r\n Quadratic: require('./quadratic'),\r\n Quartic: require('./quartic'),\r\n Quintic: require('./quintic'),\r\n Sine: require('./sine'),\r\n Stepped: require('./stepped')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Linear easing (no variation).\r\n *\r\n * @function Phaser.Math.Easing.Linear.Linear\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Linear = function (v)\r\n{\r\n return v;\r\n};\r\n\r\nmodule.exports = Linear;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Linear\r\n */\r\n\r\nmodule.exports = require('./Linear');\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v;\r\n }\r\n else\r\n {\r\n return -0.5 * (--v * (v - 2) - 1);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return v * (2 - v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quadratic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v * v;\r\n }\r\n else\r\n {\r\n return -0.5 * ((v -= 2) * v * v * v - 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return 1 - (--v * v * v * v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quartic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v * v * v;\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * v * v * v + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return --v * v * v * v * v + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quintic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Sine.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 1 - Math.cos(v * Math.PI / 2);\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Sine.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 0.5 * (1 - Math.cos(Math.PI * v));\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Sine.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return Math.sin(v * Math.PI / 2);\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Sine\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Stepped easing.\r\n *\r\n * @function Phaser.Math.Easing.Stepped.Stepped\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [steps=1] - The number of steps in the ease.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Stepped = function (v, steps)\r\n{\r\n if (steps === undefined) { steps = 1; }\r\n\r\n if (v <= 0)\r\n {\r\n return 0;\r\n }\r\n else if (v >= 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return (((steps * v) | 0) + 1) * (1 / steps);\r\n }\r\n};\r\n\r\nmodule.exports = Stepped;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Stepped\r\n */\r\n\r\nmodule.exports = require('./Stepped');\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the fuzzy ceiling of the given value.\r\n *\r\n * @function Phaser.Math.Fuzzy.Ceil\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {number} The fuzzy ceiling of the value.\r\n */\r\nvar Ceil = function (value, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.ceil(value - epsilon);\r\n};\r\n\r\nmodule.exports = Ceil;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether the given values are fuzzily equal.\r\n *\r\n * Two numbers are fuzzily equal if their difference is less than `epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.Equal\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`.\r\n */\r\nvar Equal = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.abs(a - b) < epsilon;\r\n};\r\n\r\nmodule.exports = Equal;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the fuzzy floor of the given value.\r\n *\r\n * @function Phaser.Math.Fuzzy.Floor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {number} The floor of the value.\r\n */\r\nvar Floor = function (value, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.floor(value + epsilon);\r\n};\r\n\r\nmodule.exports = Floor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether `a` is fuzzily greater than `b`.\r\n *\r\n * `a` is fuzzily greater than `b` if it is more than `b - epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.GreaterThan\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if `a` is fuzzily greater than than `b`, otherwise `false`.\r\n */\r\nvar GreaterThan = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return a > b - epsilon;\r\n};\r\n\r\nmodule.exports = GreaterThan;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether `a` is fuzzily less than `b`.\r\n *\r\n * `a` is fuzzily less than `b` if it is less than `b + epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.LessThan\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if `a` is fuzzily less than `b`, otherwise `false`.\r\n */\r\nvar LessThan = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return a < b + epsilon;\r\n};\r\n\r\nmodule.exports = LessThan;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Fuzzy\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Ceil: require('./Ceil'),\r\n Equal: require('./Equal'),\r\n Floor: require('./Floor'),\r\n GreaterThan: require('./GreaterThan'),\r\n LessThan: require('./LessThan')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\nvar Extend = require('../utils/object/Extend');\r\n\r\n/**\r\n * @namespace Phaser.Math\r\n */\r\n\r\nvar PhaserMath = {\r\n\r\n // Collections of functions\r\n Angle: require('./angle/'),\r\n Distance: require('./distance/'),\r\n Easing: require('./easing/'),\r\n Fuzzy: require('./fuzzy/'),\r\n Interpolation: require('./interpolation/'),\r\n Pow2: require('./pow2/'),\r\n Snap: require('./snap/'),\r\n\r\n // Expose the RNG Class\r\n RandomDataGenerator: require('./random-data-generator/RandomDataGenerator'),\r\n\r\n // Single functions\r\n Average: require('./Average'),\r\n Bernstein: require('./Bernstein'),\r\n Between: require('./Between'),\r\n CatmullRom: require('./CatmullRom'),\r\n CeilTo: require('./CeilTo'),\r\n Clamp: require('./Clamp'),\r\n DegToRad: require('./DegToRad'),\r\n Difference: require('./Difference'),\r\n Factorial: require('./Factorial'),\r\n FloatBetween: require('./FloatBetween'),\r\n FloorTo: require('./FloorTo'),\r\n FromPercent: require('./FromPercent'),\r\n GetSpeed: require('./GetSpeed'),\r\n IsEven: require('./IsEven'),\r\n IsEvenStrict: require('./IsEvenStrict'),\r\n Linear: require('./Linear'),\r\n MaxAdd: require('./MaxAdd'),\r\n MinSub: require('./MinSub'),\r\n Percent: require('./Percent'),\r\n RadToDeg: require('./RadToDeg'),\r\n RandomXY: require('./RandomXY'),\r\n RandomXYZ: require('./RandomXYZ'),\r\n RandomXYZW: require('./RandomXYZW'),\r\n Rotate: require('./Rotate'),\r\n RotateAround: require('./RotateAround'),\r\n RotateAroundDistance: require('./RotateAroundDistance'),\r\n RoundAwayFromZero: require('./RoundAwayFromZero'),\r\n RoundTo: require('./RoundTo'),\r\n SinCosTableGenerator: require('./SinCosTableGenerator'),\r\n SmootherStep: require('./SmootherStep'),\r\n SmoothStep: require('./SmoothStep'),\r\n ToXY: require('./ToXY'),\r\n TransformXY: require('./TransformXY'),\r\n Within: require('./Within'),\r\n Wrap: require('./Wrap'),\r\n\r\n // Vector classes\r\n Vector2: require('./Vector2'),\r\n Vector3: require('./Vector3'),\r\n Vector4: require('./Vector4'),\r\n Matrix3: require('./Matrix3'),\r\n Matrix4: require('./Matrix4'),\r\n Quaternion: require('./Quaternion'),\r\n RotateVec3: require('./RotateVec3')\r\n\r\n};\r\n\r\n// Merge in the consts\r\n\r\nPhaserMath = Extend(false, PhaserMath, CONST);\r\n\r\n// Export it\r\n\r\nmodule.exports = PhaserMath;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bernstein = require('../Bernstein');\r\n\r\n/**\r\n * A bezier interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.Bezier\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar BezierInterpolation = function (v, k)\r\n{\r\n var b = 0;\r\n var n = v.length - 1;\r\n\r\n for (var i = 0; i <= n; i++)\r\n {\r\n b += Math.pow(1 - k, n - i) * Math.pow(k, i) * v[i] * Bernstein(n, i);\r\n }\r\n\r\n return b;\r\n};\r\n\r\nmodule.exports = BezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CatmullRom = require('../CatmullRom');\r\n\r\n/**\r\n * A Catmull-Rom interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.CatmullRom\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar CatmullRomInterpolation = function (v, k)\r\n{\r\n var m = v.length - 1;\r\n var f = m * k;\r\n var i = Math.floor(f);\r\n\r\n if (v[0] === v[m])\r\n {\r\n if (k < 0)\r\n {\r\n i = Math.floor(f = m * (1 + k));\r\n }\r\n\r\n return CatmullRom(f - i, v[(i - 1 + m) % m], v[i], v[(i + 1) % m], v[(i + 2) % m]);\r\n }\r\n else\r\n {\r\n if (k < 0)\r\n {\r\n return v[0] - (CatmullRom(-f, v[0], v[0], v[1], v[1]) - v[0]);\r\n }\r\n\r\n if (k > 1)\r\n {\r\n return v[m] - (CatmullRom(f - m, v[m], v[m], v[m - 1], v[m - 1]) - v[m]);\r\n }\r\n\r\n return CatmullRom(f - i, v[i ? i - 1 : 0], v[i], v[m < i + 1 ? m : i + 1], v[m < i + 2 ? m : i + 2]);\r\n }\r\n};\r\n\r\nmodule.exports = CatmullRomInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P0 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return k * k * k * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P1 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return 3 * k * k * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P2 (t, p)\r\n{\r\n return 3 * (1 - t) * t * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P3 (t, p)\r\n{\r\n return t * t * t * p;\r\n}\r\n\r\n/**\r\n * A cubic bezier interpolation method.\r\n *\r\n * https://medium.com/@adrian_cooney/bezier-interpolation-13b68563313a\r\n *\r\n * @function Phaser.Math.Interpolation.CubicBezier\r\n * @since 3.0.0\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} p0 - The start point.\r\n * @param {number} p1 - The first control point.\r\n * @param {number} p2 - The second control point.\r\n * @param {number} p3 - The end point.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar CubicBezierInterpolation = function (t, p0, p1, p2, p3)\r\n{\r\n return P0(t, p0) + P1(t, p1) + P2(t, p2) + P3(t, p3);\r\n};\r\n\r\nmodule.exports = CubicBezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Linear = require('../Linear');\r\n\r\n/**\r\n * A linear interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.Linear\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Linear_interpolation}\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {!number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {!number} The interpolated value.\r\n */\r\nvar LinearInterpolation = function (v, k)\r\n{\r\n var m = v.length - 1;\r\n var f = m * k;\r\n var i = Math.floor(f);\r\n\r\n if (k < 0)\r\n {\r\n return Linear(v[0], v[1], f);\r\n }\r\n else if (k > 1)\r\n {\r\n return Linear(v[m], v[m - 1], m - f);\r\n }\r\n else\r\n {\r\n return Linear(v[i], v[(i + 1 > m) ? m : i + 1], f - i);\r\n }\r\n};\r\n\r\nmodule.exports = LinearInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P0 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return k * k * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P1 (t, p)\r\n{\r\n return 2 * (1 - t) * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P2 (t, p)\r\n{\r\n return t * t * p;\r\n}\r\n\r\n// https://github.com/mrdoob/three.js/blob/master/src/extras/core/Interpolations.js\r\n\r\n/**\r\n * A quadratic bezier interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.QuadraticBezier\r\n * @since 3.2.0\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} p0 - The start point.\r\n * @param {number} p1 - The control point.\r\n * @param {number} p2 - The end point.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar QuadraticBezierInterpolation = function (t, p0, p1, p2)\r\n{\r\n return P0(t, p0) + P1(t, p1) + P2(t, p2);\r\n};\r\n\r\nmodule.exports = QuadraticBezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SmoothStep = require('../SmoothStep');\r\n\r\n/**\r\n * A Smooth Step interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.SmoothStep\r\n * @since 3.9.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar SmoothStepInterpolation = function (t, min, max)\r\n{\r\n return min + (max - min) * SmoothStep(t, 0, 1);\r\n};\r\n\r\nmodule.exports = SmoothStepInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SmootherStep = require('../SmootherStep');\r\n\r\n/**\r\n * A Smoother Step interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.SmootherStep\r\n * @since 3.9.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar SmootherStepInterpolation = function (t, min, max)\r\n{\r\n return min + (max - min) * SmootherStep(t, 0, 1);\r\n};\r\n\r\nmodule.exports = SmootherStepInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Interpolation\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Bezier: require('./BezierInterpolation'),\r\n CatmullRom: require('./CatmullRomInterpolation'),\r\n CubicBezier: require('./CubicBezierInterpolation'),\r\n Linear: require('./LinearInterpolation'),\r\n QuadraticBezier: require('./QuadraticBezierInterpolation'),\r\n SmoothStep: require('./SmoothStepInterpolation'),\r\n SmootherStep: require('./SmootherStepInterpolation')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the nearest power of 2 to the given `value`.\r\n *\r\n * @function Phaser.Math.Pow2.GetPowerOfTwo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n *\r\n * @return {integer} The nearest power of 2 to `value`.\r\n */\r\nvar GetPowerOfTwo = function (value)\r\n{\r\n var index = Math.log(value) / 0.6931471805599453;\r\n\r\n return (1 << Math.ceil(index));\r\n};\r\n\r\nmodule.exports = GetPowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the given `width` and `height` are a power of two.\r\n * Useful for checking texture dimensions.\r\n *\r\n * @function Phaser.Math.Pow2.IsSizePowerOfTwo\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width.\r\n * @param {number} height - The height.\r\n *\r\n * @return {boolean} `true` if `width` and `height` are a power of two, otherwise `false`.\r\n */\r\nvar IsSizePowerOfTwo = function (width, height)\r\n{\r\n return (width > 0 && (width & (width - 1)) === 0 && height > 0 && (height & (height - 1)) === 0);\r\n};\r\n\r\nmodule.exports = IsSizePowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tests the value and returns `true` if it is a power of two.\r\n *\r\n * @function Phaser.Math.Pow2.IsValuePowerOfTwo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to check if it's a power of two.\r\n *\r\n * @return {boolean} Returns `true` if `value` is a power of two, otherwise `false`.\r\n */\r\nvar IsValuePowerOfTwo = function (value)\r\n{\r\n return (value > 0 && (value & (value - 1)) === 0);\r\n};\r\n\r\nmodule.exports = IsValuePowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Pow2\r\n */\r\n\r\nmodule.exports = {\r\n\r\n GetNext: require('./GetPowerOfTwo'),\r\n IsSize: require('./IsSizePowerOfTwo'),\r\n IsValue: require('./IsValuePowerOfTwo')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A seeded Random Data Generator.\r\n * \r\n * Access via `Phaser.Math.RND` which is an instance of this class pre-defined\r\n * by Phaser. Or, create your own instance to use as you require.\r\n * \r\n * The `Math.RND` generator is seeded by the Game Config property value `seed`.\r\n * If no such config property exists, a random number is used.\r\n * \r\n * If you create your own instance of this class you should provide a seed for it.\r\n * If no seed is given it will use a 'random' one based on Date.now.\r\n *\r\n * @class RandomDataGenerator\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} [seeds] - The seeds to use for the random number generator.\r\n */\r\nvar RandomDataGenerator = new Class({\r\n\r\n initialize:\r\n\r\n function RandomDataGenerator (seeds)\r\n {\r\n if (seeds === undefined) { seeds = [ (Date.now() * Math.random()).toString() ]; }\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#c\r\n * @type {number}\r\n * @default 1\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.c = 1;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s0\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s0 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s1\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s1 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s2\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s2 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#n\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.2.0\r\n */\r\n this.n = 0;\r\n\r\n /**\r\n * Signs to choose from.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#signs\r\n * @type {number[]}\r\n * @since 3.0.0\r\n */\r\n this.signs = [ -1, 1 ];\r\n\r\n if (seeds)\r\n {\r\n this.init(seeds);\r\n }\r\n },\r\n\r\n /**\r\n * Private random helper.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#rnd\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @return {number} A random number.\r\n */\r\n rnd: function ()\r\n {\r\n var t = 2091639 * this.s0 + this.c * 2.3283064365386963e-10; // 2^-32\r\n\r\n this.c = t | 0;\r\n this.s0 = this.s1;\r\n this.s1 = this.s2;\r\n this.s2 = t - this.c;\r\n\r\n return this.s2;\r\n },\r\n\r\n /**\r\n * Internal method that creates a seed hash.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#hash\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {string} data - The value to hash.\r\n *\r\n * @return {number} The hashed value.\r\n */\r\n hash: function (data)\r\n {\r\n var h;\r\n var n = this.n;\r\n\r\n data = data.toString();\r\n\r\n for (var i = 0; i < data.length; i++)\r\n {\r\n n += data.charCodeAt(i);\r\n h = 0.02519603282416938 * n;\r\n n = h >>> 0;\r\n h -= n;\r\n h *= n;\r\n n = h >>> 0;\r\n h -= n;\r\n n += h * 0x100000000;// 2^32\r\n }\r\n\r\n this.n = n;\r\n\r\n return (n >>> 0) * 2.3283064365386963e-10;// 2^-32\r\n },\r\n\r\n /**\r\n * Initialize the state of the random data generator.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#init\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} seeds - The seeds to initialize the random data generator with.\r\n */\r\n init: function (seeds)\r\n {\r\n if (typeof seeds === 'string')\r\n {\r\n this.state(seeds);\r\n }\r\n else\r\n {\r\n this.sow(seeds);\r\n }\r\n },\r\n\r\n /**\r\n * Reset the seed of the random data generator.\r\n *\r\n * _Note_: the seed array is only processed up to the first `undefined` (or `null`) value, should such be present.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#sow\r\n * @since 3.0.0\r\n *\r\n * @param {string[]} seeds - The array of seeds: the `toString()` of each value is used.\r\n */\r\n sow: function (seeds)\r\n {\r\n // Always reset to default seed\r\n this.n = 0xefc8249d;\r\n this.s0 = this.hash(' ');\r\n this.s1 = this.hash(' ');\r\n this.s2 = this.hash(' ');\r\n this.c = 1;\r\n\r\n if (!seeds)\r\n {\r\n return;\r\n }\r\n\r\n // Apply any seeds\r\n for (var i = 0; i < seeds.length && (seeds[i] != null); i++)\r\n {\r\n var seed = seeds[i];\r\n\r\n this.s0 -= this.hash(seed);\r\n this.s0 += ~~(this.s0 < 0);\r\n this.s1 -= this.hash(seed);\r\n this.s1 += ~~(this.s1 < 0);\r\n this.s2 -= this.hash(seed);\r\n this.s2 += ~~(this.s2 < 0);\r\n }\r\n },\r\n\r\n /**\r\n * Returns a random integer between 0 and 2^32.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#integer\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random integer between 0 and 2^32.\r\n */\r\n integer: function ()\r\n {\r\n // 2^32\r\n return this.rnd() * 0x100000000;\r\n },\r\n\r\n /**\r\n * Returns a random real number between 0 and 1.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#frac\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between 0 and 1.\r\n */\r\n frac: function ()\r\n {\r\n // 2^-53\r\n return this.rnd() + (this.rnd() * 0x200000 | 0) * 1.1102230246251565e-16;\r\n },\r\n\r\n /**\r\n * Returns a random real number between 0 and 2^32.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#real\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between 0 and 2^32.\r\n */\r\n real: function ()\r\n {\r\n return this.integer() + this.frac();\r\n },\r\n\r\n /**\r\n * Returns a random integer between and including min and max.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#integerInRange\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n integerInRange: function (min, max)\r\n {\r\n return Math.floor(this.realInRange(0, max - min + 1) + min);\r\n },\r\n\r\n /**\r\n * Returns a random integer between and including min and max.\r\n * This method is an alias for RandomDataGenerator.integerInRange.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#between\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n between: function (min, max)\r\n {\r\n return Math.floor(this.realInRange(0, max - min + 1) + min);\r\n },\r\n\r\n /**\r\n * Returns a random real number between min and max.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#realInRange\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n realInRange: function (min, max)\r\n {\r\n return this.frac() * (max - min) + min;\r\n },\r\n\r\n /**\r\n * Returns a random real number between -1 and 1.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#normal\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between -1 and 1.\r\n */\r\n normal: function ()\r\n {\r\n return 1 - (2 * this.frac());\r\n },\r\n\r\n /**\r\n * Returns a valid RFC4122 version4 ID hex string from https://gist.github.com/1308368\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#uuid\r\n * @since 3.0.0\r\n *\r\n * @return {string} A valid RFC4122 version4 ID hex string\r\n */\r\n uuid: function ()\r\n {\r\n var a = '';\r\n var b = '';\r\n\r\n for (b = a = ''; a++ < 36; b += ~a % 5 | a * 3 & 4 ? (a ^ 15 ? 8 ^ this.frac() * (a ^ 20 ? 16 : 4) : 4).toString(16) : '-')\r\n {\r\n // eslint-disable-next-line no-empty\r\n }\r\n\r\n return b;\r\n },\r\n\r\n /**\r\n * Returns a random element from within the given array.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#pick\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to pick a random element from.\r\n *\r\n * @return {*} A random member of the array.\r\n */\r\n pick: function (array)\r\n {\r\n return array[this.integerInRange(0, array.length - 1)];\r\n },\r\n\r\n /**\r\n * Returns a sign to be used with multiplication operator.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#sign\r\n * @since 3.0.0\r\n *\r\n * @return {number} -1 or +1.\r\n */\r\n sign: function ()\r\n {\r\n return this.pick(this.signs);\r\n },\r\n\r\n /**\r\n * Returns a random element from within the given array, favoring the earlier entries.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#weightedPick\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to pick a random element from.\r\n *\r\n * @return {*} A random member of the array.\r\n */\r\n weightedPick: function (array)\r\n {\r\n return array[~~(Math.pow(this.frac(), 2) * (array.length - 1) + 0.5)];\r\n },\r\n\r\n /**\r\n * Returns a random timestamp between min and max, or between the beginning of 2000 and the end of 2020 if min and max aren't specified.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#timestamp\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random timestamp between min and max.\r\n */\r\n timestamp: function (min, max)\r\n {\r\n return this.realInRange(min || 946684800000, max || 1577862000000);\r\n },\r\n\r\n /**\r\n * Returns a random angle between -180 and 180.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#angle\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random number between -180 and 180.\r\n */\r\n angle: function ()\r\n {\r\n return this.integerInRange(-180, 180);\r\n },\r\n\r\n /**\r\n * Returns a random rotation in radians, between -3.141 and 3.141\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#rotation\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random number between -3.141 and 3.141\r\n */\r\n rotation: function ()\r\n {\r\n return this.realInRange(-3.1415926, 3.1415926);\r\n },\r\n\r\n /**\r\n * Gets or Sets the state of the generator. This allows you to retain the values\r\n * that the generator is using between games, i.e. in a game save file.\r\n *\r\n * To seed this generator with a previously saved state you can pass it as the\r\n * `seed` value in your game config, or call this method directly after Phaser has booted.\r\n *\r\n * Call this method with no parameters to return the current state.\r\n *\r\n * If providing a state it should match the same format that this method\r\n * returns, which is a string with a header `!rnd` followed by the `c`,\r\n * `s0`, `s1` and `s2` values respectively, each comma-delimited.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#state\r\n * @since 3.0.0\r\n *\r\n * @param {string} [state] - Generator state to be set.\r\n *\r\n * @return {string} The current state of the generator.\r\n */\r\n state: function (state)\r\n {\r\n if (typeof state === 'string' && state.match(/^!rnd/))\r\n {\r\n state = state.split(',');\r\n\r\n this.c = parseFloat(state[1]);\r\n this.s0 = parseFloat(state[2]);\r\n this.s1 = parseFloat(state[3]);\r\n this.s2 = parseFloat(state[4]);\r\n }\r\n\r\n return [ '!rnd', this.c, this.s0, this.s1, this.s2 ].join(',');\r\n },\r\n\r\n /**\r\n * Shuffles the given array, using the current seed.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#shuffle\r\n * @since 3.7.0\r\n *\r\n * @param {array} [array] - The array to be shuffled.\r\n *\r\n * @return {array} The shuffled array.\r\n */\r\n shuffle: function (array)\r\n {\r\n var len = array.length - 1;\r\n\r\n for (var i = len; i > 0; i--)\r\n {\r\n var randomIndex = Math.floor(this.frac() * (i + 1));\r\n var itemAtIndex = array[randomIndex];\r\n\r\n array[randomIndex] = array[i];\r\n array[i] = itemAtIndex;\r\n }\r\n\r\n return array;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = RandomDataGenerator;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using ceil.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `15`.\r\n * As will `14` snap to `15`... but `16` will snap to `20`.\r\n *\r\n * @function Phaser.Math.Snap.Ceil\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapCeil = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.ceil(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapCeil;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using floor.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10`.\r\n * As will `14` snap to `10`... but `16` will snap to `15`.\r\n *\r\n * @function Phaser.Math.Snap.Floor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapFloor = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.floor(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapFloor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using rounding.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10` whereas `14` will snap to `15`.\r\n *\r\n * @function Phaser.Math.Snap.To\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapTo = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.round(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Snap\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Ceil: require('./SnapCeil'),\r\n Floor: require('./SnapFloor'),\r\n To: require('./SnapTo')\r\n\r\n};\r\n","/**\r\n* @author Richard Davey \r\n* @copyright 2019 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A Global Plugin is installed just once into the Game owned Plugin Manager.\r\n * It can listen for Game events and respond to them.\r\n *\r\n * @class BasePlugin\r\n * @memberof Phaser.Plugins\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n */\r\nvar BasePlugin = new Class({\r\n\r\n initialize:\r\n\r\n function BasePlugin (pluginManager)\r\n {\r\n /**\r\n * A handy reference to the Plugin Manager that is responsible for this plugin.\r\n * Can be used as a route to gain access to game systems and events.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#pluginManager\r\n * @type {Phaser.Plugins.PluginManager}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.pluginManager = pluginManager;\r\n\r\n /**\r\n * A reference to the Game instance this plugin is running under.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#game\r\n * @type {Phaser.Game}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.game = pluginManager.game;\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is first instantiated.\r\n * It will never be called again on this instance.\r\n * In here you can set-up whatever you need for this plugin to run.\r\n * If a plugin is set to automatically start then `BasePlugin.start` will be called immediately after this.\r\n * On a Scene Plugin, this method is never called. Use {@link Phaser.Plugins.ScenePlugin#boot} instead.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#init\r\n * @since 3.8.0\r\n *\r\n * @param {?any} [data] - A value specified by the user, if any, from the `data` property of the plugin's configuration object (if started at game boot) or passed in the PluginManager's `install` method (if started manually).\r\n */\r\n init: function ()\r\n {\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is started.\r\n * If a plugin is stopped, and then started again, this will get called again.\r\n * Typically called immediately after `BasePlugin.init`.\r\n * On a Scene Plugin, this method is never called.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#start\r\n * @since 3.8.0\r\n */\r\n start: function ()\r\n {\r\n // Here are the game-level events you can listen to.\r\n // At the very least you should offer a destroy handler for when the game closes down.\r\n\r\n // var eventEmitter = this.game.events;\r\n\r\n // eventEmitter.once('destroy', this.gameDestroy, this);\r\n // eventEmitter.on('pause', this.gamePause, this);\r\n // eventEmitter.on('resume', this.gameResume, this);\r\n // eventEmitter.on('resize', this.gameResize, this);\r\n // eventEmitter.on('prestep', this.gamePreStep, this);\r\n // eventEmitter.on('step', this.gameStep, this);\r\n // eventEmitter.on('poststep', this.gamePostStep, this);\r\n // eventEmitter.on('prerender', this.gamePreRender, this);\r\n // eventEmitter.on('postrender', this.gamePostRender, this);\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is stopped.\r\n * The game code has requested that your plugin stop doing whatever it does.\r\n * It is now considered as 'inactive' by the PluginManager.\r\n * Handle that process here (i.e. stop listening for events, etc)\r\n * If the plugin is started again then `BasePlugin.start` will be called again.\r\n * On a Scene Plugin, this method is never called.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#stop\r\n * @since 3.8.0\r\n */\r\n stop: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Game instance has been destroyed.\r\n * You must release everything in here, all references, all objects, free it all up.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pluginManager = null;\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BasePlugin;\r\n","/**\r\n* @author Richard Davey \r\n* @copyright 2019 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar BasePlugin = require('./BasePlugin');\r\nvar Class = require('../utils/Class');\r\nvar SceneEvents = require('../scene/events');\r\n\r\n/**\r\n * @classdesc\r\n * A Scene Level Plugin is installed into every Scene and belongs to that Scene.\r\n * It can listen for Scene events and respond to them.\r\n * It can map itself to a Scene property, or into the Scene Systems, or both.\r\n *\r\n * @class ScenePlugin\r\n * @memberof Phaser.Plugins\r\n * @extends Phaser.Plugins.BasePlugin\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n */\r\nvar ScenePlugin = new Class({\r\n\r\n Extends: BasePlugin,\r\n\r\n initialize:\r\n\r\n function ScenePlugin (scene, pluginManager)\r\n {\r\n BasePlugin.call(this, pluginManager);\r\n\r\n /**\r\n * A reference to the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#scene\r\n * @type {?Phaser.Scene}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene Systems of the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#systems\r\n * @type {?Phaser.Scenes.Systems}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * This method is called when the Scene boots. It is only ever called once.\r\n *\r\n * By this point the plugin properties `scene` and `systems` will have already been set.\r\n *\r\n * In here you can listen for {@link Phaser.Scenes.Events Scene events} and set-up whatever you need for this plugin to run.\r\n * Here are the Scene events you can listen to:\r\n *\r\n * - start\r\n * - ready\r\n * - preupdate\r\n * - update\r\n * - postupdate\r\n * - resize\r\n * - pause\r\n * - resume\r\n * - sleep\r\n * - wake\r\n * - transitioninit\r\n * - transitionstart\r\n * - transitioncomplete\r\n * - transitionout\r\n * - shutdown\r\n * - destroy\r\n *\r\n * At the very least you should offer a destroy handler for when the Scene closes down, i.e:\r\n *\r\n * ```javascript\r\n * var eventEmitter = this.systems.events;\r\n * eventEmitter.once('destroy', this.sceneDestroy, this);\r\n * ```\r\n *\r\n * @method Phaser.Plugins.ScenePlugin#boot\r\n * @since 3.8.0\r\n */\r\n boot: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Game instance has been destroyed.\r\n * \r\n * You must release everything in here, all references, all objects, free it all up.\r\n *\r\n * @method Phaser.Plugins.ScenePlugin#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pluginManager = null;\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ScenePlugin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Blend Modes.\r\n * \r\n * @namespace Phaser.BlendModes\r\n * @since 3.0.0\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * Skips the Blend Mode check in the renderer.\r\n * \r\n * @name Phaser.BlendModes.SKIP_CHECK\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SKIP_CHECK: -1,\r\n\r\n /**\r\n * Normal blend mode. For Canvas and WebGL.\r\n * This is the default setting and draws new shapes on top of the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.NORMAL\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n NORMAL: 0,\r\n\r\n /**\r\n * Add blend mode. For Canvas and WebGL.\r\n * Where both shapes overlap the color is determined by adding color values.\r\n * \r\n * @name Phaser.BlendModes.ADD\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ADD: 1,\r\n\r\n /**\r\n * Multiply blend mode. For Canvas and WebGL.\r\n * The pixels are of the top layer are multiplied with the corresponding pixel of the bottom layer. A darker picture is the result.\r\n * \r\n * @name Phaser.BlendModes.MULTIPLY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n MULTIPLY: 2,\r\n\r\n /**\r\n * Screen blend mode. For Canvas and WebGL.\r\n * The pixels are inverted, multiplied, and inverted again. A lighter picture is the result (opposite of multiply)\r\n * \r\n * @name Phaser.BlendModes.SCREEN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SCREEN: 3,\r\n\r\n /**\r\n * Overlay blend mode. For Canvas only.\r\n * A combination of multiply and screen. Dark parts on the base layer become darker, and light parts become lighter.\r\n * \r\n * @name Phaser.BlendModes.OVERLAY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n OVERLAY: 4,\r\n\r\n /**\r\n * Darken blend mode. For Canvas only.\r\n * Retains the darkest pixels of both layers.\r\n * \r\n * @name Phaser.BlendModes.DARKEN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DARKEN: 5,\r\n\r\n /**\r\n * Lighten blend mode. For Canvas only.\r\n * Retains the lightest pixels of both layers.\r\n * \r\n * @name Phaser.BlendModes.LIGHTEN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LIGHTEN: 6,\r\n\r\n /**\r\n * Color Dodge blend mode. For Canvas only.\r\n * Divides the bottom layer by the inverted top layer.\r\n * \r\n * @name Phaser.BlendModes.COLOR_DODGE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR_DODGE: 7,\r\n\r\n /**\r\n * Color Burn blend mode. For Canvas only.\r\n * Divides the inverted bottom layer by the top layer, and then inverts the result.\r\n * \r\n * @name Phaser.BlendModes.COLOR_BURN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR_BURN: 8,\r\n\r\n /**\r\n * Hard Light blend mode. For Canvas only.\r\n * A combination of multiply and screen like overlay, but with top and bottom layer swapped.\r\n * \r\n * @name Phaser.BlendModes.HARD_LIGHT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HARD_LIGHT: 9,\r\n\r\n /**\r\n * Soft Light blend mode. For Canvas only.\r\n * A softer version of hard-light. Pure black or white does not result in pure black or white.\r\n * \r\n * @name Phaser.BlendModes.SOFT_LIGHT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOFT_LIGHT: 10,\r\n\r\n /**\r\n * Difference blend mode. For Canvas only.\r\n * Subtracts the bottom layer from the top layer or the other way round to always get a positive value.\r\n * \r\n * @name Phaser.BlendModes.DIFFERENCE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DIFFERENCE: 11,\r\n\r\n /**\r\n * Exclusion blend mode. For Canvas only.\r\n * Like difference, but with lower contrast.\r\n * \r\n * @name Phaser.BlendModes.EXCLUSION\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n EXCLUSION: 12,\r\n\r\n /**\r\n * Hue blend mode. For Canvas only.\r\n * Preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer.\r\n * \r\n * @name Phaser.BlendModes.HUE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HUE: 13,\r\n\r\n /**\r\n * Saturation blend mode. For Canvas only.\r\n * Preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer.\r\n * \r\n * @name Phaser.BlendModes.SATURATION\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SATURATION: 14,\r\n\r\n /**\r\n * Color blend mode. For Canvas only.\r\n * Preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer.\r\n * \r\n * @name Phaser.BlendModes.COLOR\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR: 15,\r\n\r\n /**\r\n * Luminosity blend mode. For Canvas only.\r\n * Preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer.\r\n * \r\n * @name Phaser.BlendModes.LUMINOSITY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LUMINOSITY: 16,\r\n\r\n /**\r\n * Alpha erase blend mode. For Canvas and WebGL.\r\n * \r\n * @name Phaser.BlendModes.ERASE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ERASE: 17,\r\n\r\n /**\r\n * Source-in blend mode. For Canvas only.\r\n * The new shape is drawn only where both the new shape and the destination canvas overlap. Everything else is made transparent.\r\n * \r\n * @name Phaser.BlendModes.SOURCE_IN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_IN: 18,\r\n\r\n /**\r\n * Source-out blend mode. For Canvas only.\r\n * The new shape is drawn where it doesn't overlap the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.SOURCE_OUT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_OUT: 19,\r\n\r\n /**\r\n * Source-out blend mode. For Canvas only.\r\n * The new shape is only drawn where it overlaps the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.SOURCE_ATOP\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_ATOP: 20,\r\n\r\n /**\r\n * Destination-over blend mode. For Canvas only.\r\n * New shapes are drawn behind the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_OVER\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_OVER: 21,\r\n\r\n /**\r\n * Destination-in blend mode. For Canvas only.\r\n * The existing canvas content is kept where both the new shape and existing canvas content overlap. Everything else is made transparent.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_IN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_IN: 22,\r\n\r\n /**\r\n * Destination-out blend mode. For Canvas only.\r\n * The existing content is kept where it doesn't overlap the new shape.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_OUT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_OUT: 23,\r\n\r\n /**\r\n * Destination-out blend mode. For Canvas only.\r\n * The existing canvas is only kept where it overlaps the new shape. The new shape is drawn behind the canvas content.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_ATOP\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_ATOP: 24,\r\n\r\n /**\r\n * Lighten blend mode. For Canvas only.\r\n * Where both shapes overlap the color is determined by adding color values.\r\n * \r\n * @name Phaser.BlendModes.LIGHTER\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LIGHTER: 25,\r\n\r\n /**\r\n * Copy blend mode. For Canvas only.\r\n * Only the new shape is shown.\r\n * \r\n * @name Phaser.BlendModes.COPY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COPY: 26,\r\n\r\n /**\r\n * Xor blend mode. For Canvas only.\r\n * Shapes are made transparent where both overlap and drawn normal everywhere else.\r\n * \r\n * @name Phaser.BlendModes.XOR\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n XOR: 27\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scale Manager Resize Event.\r\n * \r\n * This event is dispatched whenever the Scale Manager detects a resize event from the browser.\r\n * It sends three parameters to the callback, each of them being Size components. You can read\r\n * the `width`, `height`, `aspectRatio` and other properties of these components to help with\r\n * scaling your own game content.\r\n *\r\n * @event Phaser.Scale.Events#RESIZE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Structs.Size} gameSize - A reference to the Game Size component. This is the un-scaled size of your game canvas.\r\n * @param {Phaser.Structs.Size} baseSize - A reference to the Base Size component. This is the game size multiplied by resolution.\r\n * @param {Phaser.Structs.Size} displaySize - A reference to the Display Size component. This is the scaled canvas size, after applying zoom and scale mode.\r\n * @param {number} resolution - The current resolution. Defaults to 1 at the moment.\r\n * @param {number} previousWidth - If the `gameSize` has changed, this value contains its previous width, otherwise it contains the current width.\r\n * @param {number} previousHeight - If the `gameSize` has changed, this value contains its previous height, otherwise it contains the current height.\r\n */\r\nmodule.exports = 'resize';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Boot Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems boot process. Primarily used by Scene Plugins.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('boot', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#BOOT\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'boot';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Create Event.\r\n * \r\n * This event is dispatched by a Scene after it has been created by the Scene Manager.\r\n * \r\n * If a Scene has a `create` method then this event is emitted _after_ that has run.\r\n * \r\n * If there is a transition, this event will be fired after the `TRANSITION_START` event.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('create', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#CREATE\r\n * @since 3.17.0\r\n * \r\n * @param {Phaser.Scene} scene - A reference to the Scene that emitted this event.\r\n */\r\nmodule.exports = 'create';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Destroy Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems destroy process.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('destroy', listener)`.\r\n * \r\n * You should destroy any resources that may be in use by your Scene in this event handler.\r\n * \r\n * @event Phaser.Scenes.Events#DESTROY\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pause Event.\r\n * \r\n * This event is dispatched by a Scene when it is paused, either directly via the `pause` method, or as an\r\n * action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('pause', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#PAUSE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was paused.\r\n */\r\nmodule.exports = 'pause';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Post Update Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('postupdate', listener)`.\r\n * \r\n * A Scene will only run its step if it is active.\r\n * \r\n * @event Phaser.Scenes.Events#POST_UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'postupdate';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pre Update Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('preupdate', listener)`.\r\n * \r\n * A Scene will only run its step if it is active.\r\n * \r\n * @event Phaser.Scenes.Events#PRE_UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'preupdate';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Ready Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems start process.\r\n * By this point in the process the Scene is now fully active and rendering.\r\n * This event is meant for your game code to use, as all plugins have responded to the earlier 'start' event.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('ready', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#READY\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was started.\r\n */\r\nmodule.exports = 'ready';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Render Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('render', listener)`.\r\n * \r\n * A Scene will only render if it is visible and active.\r\n * By the time this event is dispatched, the Scene will have already been rendered.\r\n * \r\n * @event Phaser.Scenes.Events#RENDER\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\r\n */\r\nmodule.exports = 'render';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Resume Event.\r\n * \r\n * This event is dispatched by a Scene when it is resumed from a paused state, either directly via the `resume` method,\r\n * or as an action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('resume', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#RESUME\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was resumed.\r\n */\r\nmodule.exports = 'resume';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Shutdown Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems shutdown process.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('shutdown', listener)`.\r\n * \r\n * You should free-up any resources that may be in use by your Scene in this event handler, on the understanding\r\n * that the Scene may, at any time, become active again. A shutdown Scene is not 'destroyed', it's simply not\r\n * currently active. Use the [DESTROY]{@linkcode Phaser.Scenes.Events#event:DESTROY} event to completely clear resources.\r\n * \r\n * @event Phaser.Scenes.Events#SHUTDOWN\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was shutdown.\r\n */\r\nmodule.exports = 'shutdown';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Sleep Event.\r\n * \r\n * This event is dispatched by a Scene when it is sent to sleep, either directly via the `sleep` method,\r\n * or as an action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('sleep', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#SLEEP\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was sent to sleep.\r\n */\r\nmodule.exports = 'sleep';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Start Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems start process. Primarily used by Scene Plugins.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('start', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#START\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Complete Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition.\r\n * \r\n * It happens when the transition process has completed. This occurs when the duration timer equals or exceeds the duration\r\n * of the transition.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitioncomplete', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_COMPLETE\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} scene -The Scene on which the transitioned completed.\r\n */\r\nmodule.exports = 'transitioncomplete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Init Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition.\r\n * \r\n * It happens immediately after the `Scene.init` method is called. If the Scene does not have an `init` method,\r\n * this event is not dispatched.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitioninit', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_INIT\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitioninit';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Out Event.\r\n * \r\n * This event is dispatched by a Scene when it initiates a transition to another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitionout', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_OUT\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} target - A reference to the Scene that is being transitioned to.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionout';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Start Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition, only if that Scene was not asleep.\r\n * \r\n * It happens immediately after the `Scene.create` method is called. If the Scene does not have a `create` method,\r\n * this event is dispatched anyway.\r\n * \r\n * If the Target Scene was sleeping then the [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} event is\r\n * dispatched instead of this event.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitionstart', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_START\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionstart';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Wake Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition, only if that Scene was asleep before\r\n * the transition began. If the Scene was not asleep the [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} event is dispatched instead.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitionwake', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_WAKE\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionwake';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Update Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('update', listener)`.\r\n * \r\n * A Scene will only run its step if it is active.\r\n * \r\n * @event Phaser.Scenes.Events#UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'update';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Wake Event.\r\n * \r\n * This event is dispatched by a Scene when it is woken from sleep, either directly via the `wake` method,\r\n * or as an action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('wake', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#WAKE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was woken up.\r\n */\r\nmodule.exports = 'wake';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Scenes.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n BOOT: require('./BOOT_EVENT'),\r\n CREATE: require('./CREATE_EVENT'),\r\n DESTROY: require('./DESTROY_EVENT'),\r\n PAUSE: require('./PAUSE_EVENT'),\r\n POST_UPDATE: require('./POST_UPDATE_EVENT'),\r\n PRE_UPDATE: require('./PRE_UPDATE_EVENT'),\r\n READY: require('./READY_EVENT'),\r\n RENDER: require('./RENDER_EVENT'),\r\n RESUME: require('./RESUME_EVENT'),\r\n SHUTDOWN: require('./SHUTDOWN_EVENT'),\r\n SLEEP: require('./SLEEP_EVENT'),\r\n START: require('./START_EVENT'),\r\n TRANSITION_COMPLETE: require('./TRANSITION_COMPLETE_EVENT'),\r\n TRANSITION_INIT: require('./TRANSITION_INIT_EVENT'),\r\n TRANSITION_OUT: require('./TRANSITION_OUT_EVENT'),\r\n TRANSITION_START: require('./TRANSITION_START_EVENT'),\r\n TRANSITION_WAKE: require('./TRANSITION_WAKE_EVENT'),\r\n UPDATE: require('./UPDATE_EVENT'),\r\n WAKE: require('./WAKE_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Taken from klasse by mattdesl https://github.com/mattdesl/klasse\r\n\r\nfunction hasGetterOrSetter (def)\r\n{\r\n return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function');\r\n}\r\n\r\nfunction getProperty (definition, k, isClassDescriptor)\r\n{\r\n // This may be a lightweight object, OR it might be a property that was defined previously.\r\n\r\n // For simple class descriptors we can just assume its NOT previously defined.\r\n var def = (isClassDescriptor) ? definition[k] : Object.getOwnPropertyDescriptor(definition, k);\r\n\r\n if (!isClassDescriptor && def.value && typeof def.value === 'object')\r\n {\r\n def = def.value;\r\n }\r\n\r\n // This might be a regular property, or it may be a getter/setter the user defined in a class.\r\n if (def && hasGetterOrSetter(def))\r\n {\r\n if (typeof def.enumerable === 'undefined')\r\n {\r\n def.enumerable = true;\r\n }\r\n\r\n if (typeof def.configurable === 'undefined')\r\n {\r\n def.configurable = true;\r\n }\r\n\r\n return def;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n}\r\n\r\nfunction hasNonConfigurable (obj, k)\r\n{\r\n var prop = Object.getOwnPropertyDescriptor(obj, k);\r\n\r\n if (!prop)\r\n {\r\n return false;\r\n }\r\n\r\n if (prop.value && typeof prop.value === 'object')\r\n {\r\n prop = prop.value;\r\n }\r\n\r\n if (prop.configurable === false)\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\n/**\r\n * Extends the given `myClass` object's prototype with the properties of `definition`.\r\n *\r\n * @function extend\r\n * @param {Object} ctor The constructor object to mix into.\r\n * @param {Object} definition A dictionary of functions for the class.\r\n * @param {boolean} isClassDescriptor Is the definition a class descriptor?\r\n * @param {Object} [extend] The parent constructor object.\r\n */\r\nfunction extend (ctor, definition, isClassDescriptor, extend)\r\n{\r\n for (var k in definition)\r\n {\r\n if (!definition.hasOwnProperty(k))\r\n {\r\n continue;\r\n }\r\n\r\n var def = getProperty(definition, k, isClassDescriptor);\r\n\r\n if (def !== false)\r\n {\r\n // If Extends is used, we will check its prototype to see if the final variable exists.\r\n\r\n var parent = extend || ctor;\r\n\r\n if (hasNonConfigurable(parent.prototype, k))\r\n {\r\n // Just skip the final property\r\n if (Class.ignoreFinals)\r\n {\r\n continue;\r\n }\r\n\r\n // We cannot re-define a property that is configurable=false.\r\n // So we will consider them final and throw an error. This is by\r\n // default so it is clear to the developer what is happening.\r\n // You can set ignoreFinals to true if you need to extend a class\r\n // which has configurable=false; it will simply not re-define final properties.\r\n throw new Error('cannot override final property \\'' + k + '\\', set Class.ignoreFinals = true to skip');\r\n }\r\n\r\n Object.defineProperty(ctor.prototype, k, def);\r\n }\r\n else\r\n {\r\n ctor.prototype[k] = definition[k];\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Applies the given `mixins` to the prototype of `myClass`.\r\n *\r\n * @function mixin\r\n * @param {Object} myClass The constructor object to mix into.\r\n * @param {Object|Array} mixins The mixins to apply to the constructor.\r\n */\r\nfunction mixin (myClass, mixins)\r\n{\r\n if (!mixins)\r\n {\r\n return;\r\n }\r\n\r\n if (!Array.isArray(mixins))\r\n {\r\n mixins = [ mixins ];\r\n }\r\n\r\n for (var i = 0; i < mixins.length; i++)\r\n {\r\n extend(myClass, mixins[i].prototype || mixins[i]);\r\n }\r\n}\r\n\r\n/**\r\n * Creates a new class with the given descriptor.\r\n * The constructor, defined by the name `initialize`,\r\n * is an optional function. If unspecified, an anonymous\r\n * function will be used which calls the parent class (if\r\n * one exists).\r\n *\r\n * You can also use `Extends` and `Mixins` to provide subclassing\r\n * and inheritance.\r\n *\r\n * @class Phaser.Class\r\n * @constructor\r\n * @param {Object} definition a dictionary of functions for the class\r\n * @example\r\n *\r\n * var MyClass = new Phaser.Class({\r\n *\r\n * initialize: function() {\r\n * this.foo = 2.0;\r\n * },\r\n *\r\n * bar: function() {\r\n * return this.foo + 5;\r\n * }\r\n * });\r\n */\r\nfunction Class (definition)\r\n{\r\n if (!definition)\r\n {\r\n definition = {};\r\n }\r\n\r\n // The variable name here dictates what we see in Chrome debugger\r\n var initialize;\r\n var Extends;\r\n\r\n if (definition.initialize)\r\n {\r\n if (typeof definition.initialize !== 'function')\r\n {\r\n throw new Error('initialize must be a function');\r\n }\r\n\r\n initialize = definition.initialize;\r\n\r\n // Usually we should avoid 'delete' in V8 at all costs.\r\n // However, its unlikely to make any performance difference\r\n // here since we only call this on class creation (i.e. not object creation).\r\n delete definition.initialize;\r\n }\r\n else if (definition.Extends)\r\n {\r\n var base = definition.Extends;\r\n\r\n initialize = function ()\r\n {\r\n base.apply(this, arguments);\r\n };\r\n }\r\n else\r\n {\r\n initialize = function () {};\r\n }\r\n\r\n if (definition.Extends)\r\n {\r\n initialize.prototype = Object.create(definition.Extends.prototype);\r\n initialize.prototype.constructor = initialize;\r\n\r\n // For getOwnPropertyDescriptor to work, we need to act directly on the Extends (or Mixin)\r\n\r\n Extends = definition.Extends;\r\n\r\n delete definition.Extends;\r\n }\r\n else\r\n {\r\n initialize.prototype.constructor = initialize;\r\n }\r\n\r\n // Grab the mixins, if they are specified...\r\n var mixins = null;\r\n\r\n if (definition.Mixins)\r\n {\r\n mixins = definition.Mixins;\r\n delete definition.Mixins;\r\n }\r\n\r\n // First, mixin if we can.\r\n mixin(initialize, mixins);\r\n\r\n // Now we grab the actual definition which defines the overrides.\r\n extend(initialize, definition, true, Extends);\r\n\r\n return initialize;\r\n}\r\n\r\nClass.extend = extend;\r\nClass.mixin = mixin;\r\nClass.ignoreFinals = false;\r\n\r\nmodule.exports = Class;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A NOOP (No Operation) callback function.\r\n *\r\n * Used internally by Phaser when it's more expensive to determine if a callback exists\r\n * than it is to just invoke an empty function.\r\n *\r\n * @function Phaser.Utils.NOOP\r\n * @since 3.0.0\r\n */\r\nvar NOOP = function ()\r\n{\r\n // NOOP\r\n};\r\n\r\nmodule.exports = NOOP;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar IsPlainObject = require('./IsPlainObject');\r\n\r\n// @param {boolean} deep - Perform a deep copy?\r\n// @param {object} target - The target object to copy to.\r\n// @return {object} The extended object.\r\n\r\n/**\r\n * This is a slightly modified version of http://api.jquery.com/jQuery.extend/\r\n *\r\n * @function Phaser.Utils.Objects.Extend\r\n * @since 3.0.0\r\n *\r\n * @return {object} The extended object.\r\n */\r\nvar Extend = function ()\r\n{\r\n var options, name, src, copy, copyIsArray, clone,\r\n target = arguments[0] || {},\r\n i = 1,\r\n length = arguments.length,\r\n deep = false;\r\n\r\n // Handle a deep copy situation\r\n if (typeof target === 'boolean')\r\n {\r\n deep = target;\r\n target = arguments[1] || {};\r\n\r\n // skip the boolean and the target\r\n i = 2;\r\n }\r\n\r\n // extend Phaser if only one argument is passed\r\n if (length === i)\r\n {\r\n target = this;\r\n --i;\r\n }\r\n\r\n for (; i < length; i++)\r\n {\r\n // Only deal with non-null/undefined values\r\n if ((options = arguments[i]) != null)\r\n {\r\n // Extend the base object\r\n for (name in options)\r\n {\r\n src = target[name];\r\n copy = options[name];\r\n\r\n // Prevent never-ending loop\r\n if (target === copy)\r\n {\r\n continue;\r\n }\r\n\r\n // Recurse if we're merging plain objects or arrays\r\n if (deep && copy && (IsPlainObject(copy) || (copyIsArray = Array.isArray(copy))))\r\n {\r\n if (copyIsArray)\r\n {\r\n copyIsArray = false;\r\n clone = src && Array.isArray(src) ? src : [];\r\n }\r\n else\r\n {\r\n clone = src && IsPlainObject(src) ? src : {};\r\n }\r\n\r\n // Never move original objects, clone them\r\n target[name] = Extend(deep, clone, copy);\r\n\r\n // Don't bring in undefined values\r\n }\r\n else if (copy !== undefined)\r\n {\r\n target[name] = copy;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Return the modified object\r\n return target;\r\n};\r\n\r\nmodule.exports = Extend;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH = require('../../math');\r\nvar GetValue = require('./GetValue');\r\n\r\n/**\r\n * Retrieves a value from an object. Allows for more advanced selection options, including:\r\n *\r\n * Allowed types:\r\n * \r\n * Implicit\r\n * {\r\n * x: 4\r\n * }\r\n *\r\n * From function\r\n * {\r\n * x: function ()\r\n * }\r\n *\r\n * Randomly pick one element from the array\r\n * {\r\n * x: [a, b, c, d, e, f]\r\n * }\r\n *\r\n * Random integer between min and max:\r\n * {\r\n * x: { randInt: [min, max] }\r\n * }\r\n *\r\n * Random float between min and max:\r\n * {\r\n * x: { randFloat: [min, max] }\r\n * }\r\n * \r\n *\r\n * @function Phaser.Utils.Objects.GetAdvancedValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\r\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetAdvancedValue = function (source, key, defaultValue)\r\n{\r\n var value = GetValue(source, key, null);\r\n\r\n if (value === null)\r\n {\r\n return defaultValue;\r\n }\r\n else if (Array.isArray(value))\r\n {\r\n return MATH.RND.pick(value);\r\n }\r\n else if (typeof value === 'object')\r\n {\r\n if (value.hasOwnProperty('randInt'))\r\n {\r\n return MATH.RND.integerInRange(value.randInt[0], value.randInt[1]);\r\n }\r\n else if (value.hasOwnProperty('randFloat'))\r\n {\r\n return MATH.RND.realInRange(value.randFloat[0], value.randFloat[1]);\r\n }\r\n }\r\n else if (typeof value === 'function')\r\n {\r\n return value(key);\r\n }\r\n\r\n return value;\r\n};\r\n\r\nmodule.exports = GetAdvancedValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Finds the key within the top level of the {@link source} object, or returns {@link defaultValue}\r\n *\r\n * @function Phaser.Utils.Objects.GetFastValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to search\r\n * @param {string} key - The key for the property on source. Must exist at the top level of the source object (no periods)\r\n * @param {*} [defaultValue] - The default value to use if the key does not exist.\r\n *\r\n * @return {*} The value if found; otherwise, defaultValue (null if none provided)\r\n */\r\nvar GetFastValue = function (source, key, defaultValue)\r\n{\r\n var t = typeof(source);\r\n\r\n if (!source || t === 'number' || t === 'string')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key) && source[key] !== undefined)\r\n {\r\n return source[key];\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetFastValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Source object\r\n// The key as a string, or an array of keys, i.e. 'banner', or 'banner.hideBanner'\r\n// The default value to use if the key doesn't exist\r\n\r\n/**\r\n * Retrieves a value from an object.\r\n *\r\n * @function Phaser.Utils.Objects.GetValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\r\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetValue = function (source, key, defaultValue)\r\n{\r\n if (!source || typeof source === 'number')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key))\r\n {\r\n return source[key];\r\n }\r\n else if (key.indexOf('.') !== -1)\r\n {\r\n var keys = key.split('.');\r\n var parent = source;\r\n var value = defaultValue;\r\n\r\n // Use for loop here so we can break early\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n if (parent.hasOwnProperty(keys[i]))\r\n {\r\n // Yes it has a key property, let's carry on down\r\n value = parent[keys[i]];\r\n\r\n parent = parent[keys[i]];\r\n }\r\n else\r\n {\r\n // Can't go any further, so reset to default\r\n value = defaultValue;\r\n break;\r\n }\r\n }\r\n\r\n return value;\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * This is a slightly modified version of jQuery.isPlainObject.\r\n * A plain object is an object whose internal class property is [object Object].\r\n *\r\n * @function Phaser.Utils.Objects.IsPlainObject\r\n * @since 3.0.0\r\n *\r\n * @param {object} obj - The object to inspect.\r\n *\r\n * @return {boolean} `true` if the object is plain, otherwise `false`.\r\n */\r\nvar IsPlainObject = function (obj)\r\n{\r\n // Not plain objects:\r\n // - Any object or value whose internal [[Class]] property is not \"[object Object]\"\r\n // - DOM nodes\r\n // - window\r\n if (typeof(obj) !== 'object' || obj.nodeType || obj === obj.window)\r\n {\r\n return false;\r\n }\r\n\r\n // Support: Firefox <20\r\n // The try/catch suppresses exceptions thrown when attempting to access\r\n // the \"constructor\" property of certain host objects, ie. |window.location|\r\n // https://bugzilla.mozilla.org/show_bug.cgi?id=814622\r\n try\r\n {\r\n if (obj.constructor && !({}).hasOwnProperty.call(obj.constructor.prototype, 'isPrototypeOf'))\r\n {\r\n return false;\r\n }\r\n }\r\n catch (e)\r\n {\r\n return false;\r\n }\r\n\r\n // If the function hasn't returned already, we're confident that\r\n // |obj| is a plain object, created by {} or constructed with new Object\r\n return true;\r\n};\r\n\r\nmodule.exports = IsPlainObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Class = require('../../../src/utils/Class');\r\nvar GetFastValue = require('../../../src/utils/object/GetFastValue');\r\nvar ImageFile = require('../../../src/loader/filetypes/ImageFile.js');\r\nvar IsPlainObject = require('../../../src/utils/object/IsPlainObject');\r\nvar JSONFile = require('../../../src/loader/filetypes/JSONFile.js');\r\nvar MultiFile = require('../../../src/loader/MultiFile.js');\r\nvar TextFile = require('../../../src/loader/filetypes/TextFile.js');\r\n\r\n/**\r\n * @typedef {object} Phaser.Loader.FileTypes.SpineFileConfig\r\n *\r\n * @property {string} key - The key of the file. Must be unique within both the Loader and the Texture Manager.\r\n * @property {string} [textureURL] - The absolute or relative URL to load the texture image file from.\r\n * @property {string} [textureExtension='png'] - The default file extension to use for the image texture if no url is provided.\r\n * @property {XHRSettingsObject} [textureXhrSettings] - Extra XHR Settings specifically for the texture image file.\r\n * @property {string} [normalMap] - The filename of an associated normal map. It uses the same path and url to load as the texture image.\r\n * @property {string} [atlasURL] - The absolute or relative URL to load the atlas data file from.\r\n * @property {string} [atlasExtension='txt'] - The default file extension to use for the atlas data if no url is provided.\r\n * @property {XHRSettingsObject} [atlasXhrSettings] - Extra XHR Settings specifically for the atlas data file.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * A Spine File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#spine method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#spine.\r\n *\r\n * @class SpineFile\r\n * @extends Phaser.Loader.MultiFile\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Loader.FileTypes.SpineFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\r\n * @param {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\r\n */\r\nvar SpineFile = new Class({\r\n\r\n Extends: MultiFile,\r\n\r\n initialize:\r\n\r\n function SpineFile (loader, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings)\r\n {\r\n var i;\r\n var json;\r\n var atlas;\r\n var files = [];\r\n var cache = loader.cacheManager.custom.spine;\r\n\r\n // atlas can be an array of atlas files, not just a single one\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n\r\n json = new JSONFile(loader, {\r\n key: key,\r\n url: GetFastValue(config, 'jsonURL'),\r\n extension: GetFastValue(config, 'jsonExtension', 'json'),\r\n xhrSettings: GetFastValue(config, 'jsonXhrSettings')\r\n });\r\n\r\n atlasURL = GetFastValue(config, 'atlasURL');\r\n preMultipliedAlpha = GetFastValue(config, 'preMultipliedAlpha');\r\n\r\n if (!Array.isArray(atlasURL))\r\n {\r\n atlasURL = [ atlasURL ];\r\n }\r\n\r\n for (i = 0; i < atlasURL.length; i++)\r\n {\r\n atlas = new TextFile(loader, {\r\n key: key,\r\n url: atlasURL[i],\r\n extension: GetFastValue(config, 'atlasExtension', 'atlas'),\r\n xhrSettings: GetFastValue(config, 'atlasXhrSettings')\r\n });\r\n\r\n atlas.cache = cache;\r\n\r\n files.push(atlas);\r\n }\r\n }\r\n else\r\n {\r\n json = new JSONFile(loader, key, jsonURL, jsonXhrSettings);\r\n\r\n if (!Array.isArray(atlasURL))\r\n {\r\n atlasURL = [ atlasURL ];\r\n }\r\n\r\n for (i = 0; i < atlasURL.length; i++)\r\n {\r\n atlas = new TextFile(loader, key + '_' + i, atlasURL[i], atlasXhrSettings);\r\n atlas.cache = cache;\r\n\r\n files.push(atlas);\r\n }\r\n }\r\n\r\n files.unshift(json);\r\n\r\n MultiFile.call(this, loader, 'spine', key, files);\r\n\r\n this.config.preMultipliedAlpha = preMultipliedAlpha;\r\n },\r\n\r\n /**\r\n * Called by each File when it finishes loading.\r\n *\r\n * @method Phaser.Loader.FileTypes.SpineFile#onFileComplete\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has completed processing.\r\n */\r\n onFileComplete: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.pending--;\r\n\r\n if (file.type === 'text')\r\n {\r\n // Inspect the data for the files to now load\r\n var content = file.data.split('\\n');\r\n\r\n // Extract the textures\r\n var textures = [];\r\n\r\n for (var t = 0; t < content.length; t++)\r\n {\r\n var line = content[t];\r\n\r\n if (line.trim() === '' && t < content.length - 1)\r\n {\r\n line = content[t + 1];\r\n\r\n textures.push(line);\r\n }\r\n }\r\n\r\n var config = this.config;\r\n var loader = this.loader;\r\n\r\n var currentBaseURL = loader.baseURL;\r\n var currentPath = loader.path;\r\n var currentPrefix = loader.prefix;\r\n\r\n var baseURL = GetFastValue(config, 'baseURL', this.baseURL);\r\n var path = GetFastValue(config, 'path', this.path);\r\n var prefix = GetFastValue(config, 'prefix', this.prefix);\r\n var textureXhrSettings = GetFastValue(config, 'textureXhrSettings');\r\n\r\n loader.setBaseURL(baseURL);\r\n loader.setPath(path);\r\n loader.setPrefix(prefix);\r\n\r\n for (var i = 0; i < textures.length; i++)\r\n {\r\n var textureURL = textures[i];\r\n\r\n var key = 'SP' + this.multiKeyIndex + '_' + textureURL;\r\n\r\n var image = new ImageFile(loader, key, textureURL, textureXhrSettings);\r\n\r\n this.addToMultiFile(image);\r\n\r\n loader.addFile(image);\r\n }\r\n\r\n // Reset the loader settings\r\n loader.setBaseURL(currentBaseURL);\r\n loader.setPath(currentPath);\r\n loader.setPrefix(currentPrefix);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.SpineFile#addToCache\r\n * @since 3.19.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.isReadyToProcess())\r\n {\r\n var fileJSON = this.files[0];\r\n\r\n fileJSON.addToCache();\r\n\r\n var atlasCache;\r\n var atlasKey = '';\r\n var combinedAtlasData = '';\r\n var preMultipliedAlpha = (this.config.preMultipliedAlpha) ? true : false;\r\n\r\n for (var i = 1; i < this.files.length; i++)\r\n {\r\n var file = this.files[i];\r\n\r\n if (file.type === 'text')\r\n {\r\n atlasKey = file.key.substr(0, file.key.length - 2);\r\n\r\n atlasCache = file.cache;\r\n\r\n combinedAtlasData = combinedAtlasData.concat(file.data);\r\n }\r\n else\r\n {\r\n var src = file.key.trim();\r\n var pos = src.indexOf('_');\r\n var key = src.substr(pos + 1);\r\n \r\n this.loader.textureManager.addImage(key, file.data);\r\n }\r\n\r\n file.pendingDestroy();\r\n }\r\n\r\n atlasCache.add(atlasKey, { preMultipliedAlpha: preMultipliedAlpha, data: combinedAtlasData });\r\n\r\n this.complete = true;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpineFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar BuildGameObject = require('../../../src/gameobjects/BuildGameObject');\r\nvar Class = require('../../../src/utils/Class');\r\nvar GetValue = require('../../../src/utils/object/GetValue');\r\nvar ResizeEvent = require('../../../src/scale/events/RESIZE_EVENT');\r\nvar ScenePlugin = require('../../../src/plugins/ScenePlugin');\r\nvar Spine = require('Spine');\r\nvar SpineFile = require('./SpineFile');\r\nvar SpineGameObject = require('./gameobject/SpineGameObject');\r\n\r\n/**\r\n * @classdesc\r\n * The Spine Plugin is a Scene based plugin that handles the creation and rendering of Spine Game Objects.\r\n * \r\n * All rendering and object creation is handled via the official Spine Runtimes. This version of the plugin\r\n * uses the Spine 3.8 runtimes. Files created in a different version of Spine may not work as a result.\r\n * \r\n * You can find more details about Spine at http://esotericsoftware.com/.\r\n * \r\n * Please note that you require a Spine license in order to use Spine Runtimes in your games.\r\n * \r\n * You can install this plugin into your Phaser game by either importing it, if you're using ES6:\r\n * \r\n * ```javascript\r\n * import * as SpinePlugin from './SpinePlugin.js';\r\n * ```\r\n * \r\n * and then adding it to your Phaser Game configuration:\r\n * \r\n * ```javascript\r\n * plugins: {\r\n * scene: [\r\n * { key: 'SpinePlugin', plugin: window.SpinePlugin, mapping: 'spine' }\r\n * ]\r\n * }\r\n * ```\r\n * \r\n * If you're using ES5 then you can load the Spine Plugin in a Scene files payload, _within_ your\r\n * Game Configuration object, like this:\r\n * \r\n * ```javascript\r\n * scene: {\r\n * preload: preload,\r\n * create: create,\r\n * pack: {\r\n * files: [\r\n * { type: 'scenePlugin', key: 'SpinePlugin', url: 'plugins/SpinePlugin.js', sceneKey: 'spine' }\r\n * ]\r\n * }\r\n * }\r\n * ```\r\n * \r\n * Loading it like this allows you to then use commands such as `this.load.spine` from within the\r\n * same Scene. Alternatively, you can use the method `this.load.plugin` to load the plugin via the normal\r\n * Phaser Loader. However, doing so will not add it to the current Scene. It will be available from any\r\n * subsequent Scenes.\r\n * \r\n * Assuming a default environment you access it from within a Scene by using the `this.spine` reference.\r\n * \r\n * When this plugin is installed into a Scene it will add a Loader File Type, allowing you to load\r\n * Spine files directly, i.e.:\r\n * \r\n * ```javascript\r\n * this.load.spine('stretchyman', 'stretchyman-pro.json', [ 'stretchyman-pma.atlas' ], true);\r\n * ```\r\n * \r\n * It also installs a Game Object Factory method, allowin you to create Spine Game Objects:\r\n * \r\n * ```javascript\r\n * this.add.spine(512, 650, 'stretchyman')\r\n * ```\r\n * \r\n * The first argument is the key which you used when importing the Spine data. There are lots of\r\n * things you can specify, such as the animation name, skeleton, slot attachments and more. Please\r\n * see the respective documentation and examples for further details.\r\n * \r\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary.\r\n * The associated atlas files are scanned for any texture files present in them, which are then loaded.\r\n * If you have exported your Spine data with preMultipiedAlpha set, then you should enable this in the\r\n * load arguments, or you may see black outlines around skeleton textures.\r\n * \r\n * The Spine plugin is local to the Scene in which it is installed. This means a change to something,\r\n * such as the Skeleton Debug Renderer, in this Scene, will not impact the renderer in any other Scene.\r\n * The only exception to this is with the caches this plugin creates. Spine atlas and texture data are\r\n * stored in their own caches, which are global, meaning they're accessible from any Scene in your\r\n * game, regardless if the Scene loaded the Spine data or not.\r\n * \r\n * For details about the Spine Runtime API see http://esotericsoftware.com/spine-api-reference\r\n *\r\n * @class SpinePlugin\r\n * @extends Phaser.Plugins.ScenePlugin\r\n * @constructor\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Phaser Plugin Manager.\r\n */\r\nvar SpinePlugin = new Class({\r\n\r\n Extends: ScenePlugin,\r\n\r\n initialize:\r\n\r\n function SpinePlugin (scene, pluginManager)\r\n {\r\n ScenePlugin.call(this, scene, pluginManager);\r\n\r\n var game = pluginManager.game;\r\n\r\n /**\r\n * A read-only flag that indicates if the game is running under WebGL or Canvas.\r\n *\r\n * @name SpinePlugin#isWebGL\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.isWebGL = (game.config.renderType === 2);\r\n\r\n /**\r\n * A custom cache that stores the Spine atlas data.\r\n * \r\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\r\n * no matter which Scene you are in.\r\n *\r\n * @name SpinePlugin#cache\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.19.0\r\n */\r\n this.cache = game.cache.addCustom('spine');\r\n\r\n /**\r\n * A custom cache that stores the Spine Textures.\r\n * \r\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\r\n * no matter which Scene you are in.\r\n *\r\n * @name SpinePlugin#spineTextures\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.19.0\r\n */\r\n this.spineTextures = game.cache.addCustom('spineTextures');\r\n\r\n /**\r\n * A reference to the global JSON Cache.\r\n *\r\n * @name SpinePlugin#json\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.19.0\r\n */\r\n this.json = game.cache.json;\r\n\r\n /**\r\n * A reference to the global Texture Manager.\r\n *\r\n * @name SpinePlugin#textures\r\n * @type {Phaser.Textures.TextureManager}\r\n * @since 3.19.0\r\n */\r\n this.textures = game.textures;\r\n\r\n /**\r\n * A flag that sets if the Skeleton Renderers will render debug information over the top\r\n * of the skeleton or not.\r\n *\r\n * @name SpinePlugin#drawDebug\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.drawDebug = false;\r\n\r\n /**\r\n * The underlying WebGL context of the Phaser renderer.\r\n * \r\n * Only set if running in WebGL mode.\r\n *\r\n * @name SpinePlugin#gl\r\n * @type {WebGLRenderingContext}\r\n * @since 3.19.0\r\n */\r\n this.gl;\r\n\r\n /**\r\n * A reference to either the Canvas or WebGL Renderer that this Game is using.\r\n *\r\n * @name SpinePlugin#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.19.0\r\n */\r\n this.renderer;\r\n\r\n /**\r\n * An instance of the Spine WebGL Scene Renderer.\r\n * \r\n * Only set if running in WebGL mode.\r\n *\r\n * @name SpinePlugin#sceneRenderer\r\n * @type {spine.webgl.SceneRenderer}\r\n * @since 3.19.0\r\n */\r\n this.sceneRenderer;\r\n\r\n /**\r\n * An instance of the Spine Skeleton Renderer.\r\n *\r\n * @name SpinePlugin#skeletonRenderer\r\n * @type {(spine.canvas.SkeletonRenderer|spine.webgl.SkeletonRenderer)}\r\n * @since 3.19.0\r\n */\r\n this.skeletonRenderer;\r\n\r\n /**\r\n * An instance of the Spine Skeleton Debug Renderer.\r\n * \r\n * Only set if running in WebGL mode.\r\n *\r\n * @name SpinePlugin#skeletonDebugRenderer\r\n * @type {spine.webgl.skeletonDebugRenderer}\r\n * @since 3.19.0\r\n */\r\n this.skeletonDebugRenderer;\r\n\r\n /**\r\n * A reference to the Spine runtime.\r\n * This is the runtime created by Esoteric Software\r\n *\r\n * @name SpinePlugin#plugin\r\n * @type {spine}\r\n * @since 3.19.0\r\n */\r\n this.plugin = Spine;\r\n\r\n /**\r\n * An internal vector3 used by the screen to world method.\r\n *\r\n * @name SpinePlugin#temp1\r\n * @private\r\n * @type {spine.webgl.Vector3}\r\n * @since 3.19.0\r\n */\r\n this.temp1;\r\n\r\n /**\r\n * An internal vector3 used by the screen to world method.\r\n *\r\n * @name SpinePlugin#temp2\r\n * @private\r\n * @type {spine.webgl.Vector3}\r\n * @since 3.19.0\r\n */\r\n this.temp2;\r\n\r\n if (this.isWebGL)\r\n {\r\n this.runtime = Spine.webgl;\r\n\r\n this.renderer = game.renderer;\r\n this.gl = game.renderer.gl;\r\n\r\n this.getAtlas = this.getAtlasWebGL;\r\n }\r\n else\r\n {\r\n this.runtime = Spine.canvas;\r\n\r\n this.renderer = game.renderer;\r\n\r\n this.getAtlas = this.getAtlasCanvas;\r\n }\r\n\r\n var _this = this;\r\n\r\n var add = function (x, y, key, animationName, loop)\r\n {\r\n var spineGO = new SpineGameObject(this.scene, _this, x, y, key, animationName, loop);\r\n \r\n this.displayList.add(spineGO);\r\n this.updateList.add(spineGO);\r\n \r\n return spineGO;\r\n };\r\n\r\n var make = function (config, addToScene)\r\n {\r\n if (config === undefined) { config = {}; }\r\n \r\n var key = GetValue(config, 'key', null);\r\n var animationName = GetValue(config, 'animationName', null);\r\n var loop = GetValue(config, 'loop', false);\r\n \r\n var spineGO = new SpineGameObject(this.scene, _this, 0, 0, key, animationName, loop);\r\n \r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n \r\n BuildGameObject(this.scene, spineGO, config);\r\n \r\n // Spine specific\r\n var skinName = GetValue(config, 'skinName', false);\r\n \r\n if (skinName)\r\n {\r\n spineGO.setSkinByName(skinName);\r\n }\r\n \r\n var slotName = GetValue(config, 'slotName', false);\r\n var attachmentName = GetValue(config, 'attachmentName', null);\r\n \r\n if (slotName)\r\n {\r\n spineGO.setAttachment(slotName, attachmentName);\r\n }\r\n \r\n return spineGO.refresh();\r\n };\r\n\r\n pluginManager.registerFileType('spine', this.spineFileCallback, scene);\r\n pluginManager.registerGameObject('spine', add, make);\r\n },\r\n\r\n /**\r\n * Internal boot handler.\r\n *\r\n * @method SpinePlugin#boot\r\n * @private\r\n * @since 3.19.0\r\n */\r\n boot: function ()\r\n {\r\n if (this.isWebGL)\r\n {\r\n this.bootWebGL();\r\n this.onResize();\r\n this.game.scale.on(ResizeEvent, this.onResize, this);\r\n }\r\n else\r\n {\r\n this.bootCanvas();\r\n }\r\n\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.once('shutdown', this.shutdown, this);\r\n eventEmitter.once('destroy', this.destroy, this);\r\n },\r\n\r\n /**\r\n * Internal boot handler for the Canvas Renderer.\r\n *\r\n * @method SpinePlugin#bootCanvas\r\n * @private\r\n * @since 3.19.0\r\n */\r\n bootCanvas: function ()\r\n {\r\n this.skeletonRenderer = new Spine.canvas.SkeletonRenderer(this.scene.sys.context);\r\n },\r\n\r\n /**\r\n * Internal boot handler for the WebGL Renderer.\r\n *\r\n * @method SpinePlugin#bootWebGL\r\n * @private\r\n * @since 3.19.0\r\n */\r\n bootWebGL: function ()\r\n {\r\n this.sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true);\r\n\r\n // Monkeypatch the Spine setBlendMode functions, or batching is destroyed\r\n\r\n var setBlendMode = function (srcBlend, dstBlend)\r\n {\r\n if (srcBlend !== this.srcBlend || dstBlend !== this.dstBlend)\r\n {\r\n var gl = this.context.gl;\r\n\r\n this.srcBlend = srcBlend;\r\n this.dstBlend = dstBlend;\r\n\r\n if (this.isDrawing)\r\n {\r\n this.flush();\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n }\r\n }\r\n };\r\n\r\n this.sceneRenderer.batcher.setBlendMode = setBlendMode;\r\n this.sceneRenderer.shapes.setBlendMode = setBlendMode;\r\n\r\n this.skeletonRenderer = this.sceneRenderer.skeletonRenderer;\r\n this.skeletonDebugRenderer = this.sceneRenderer.skeletonDebugRenderer;\r\n\r\n this.temp1 = new Spine.webgl.Vector3(0, 0, 0);\r\n this.temp2 = new Spine.webgl.Vector3(0, 0, 0);\r\n },\r\n\r\n /**\r\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\r\n * then returns it. You do not normally need to invoke this method directly.\r\n *\r\n * @method SpinePlugin#getAtlasCanvas\r\n * @since 3.19.0\r\n * \r\n * @param {string} key - The key of the Spine Atlas to create.\r\n * \r\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\r\n */\r\n getAtlasCanvas: function (key)\r\n {\r\n var atlasEntry = this.cache.get(key);\r\n\r\n if (!atlasEntry)\r\n {\r\n console.warn('No atlas data for: ' + key);\r\n return;\r\n }\r\n\r\n var atlas;\r\n var spineTextures = this.spineTextures;\r\n\r\n if (spineTextures.has(key))\r\n {\r\n atlas = spineTextures.get(key);\r\n }\r\n else\r\n {\r\n var textures = this.textures;\r\n\r\n atlas = new Spine.TextureAtlas(atlasEntry.data, function (path)\r\n {\r\n return new Spine.canvas.CanvasTexture(textures.get(path).getSourceImage());\r\n });\r\n }\r\n\r\n return atlas;\r\n },\r\n\r\n /**\r\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\r\n * then returns it. You do not normally need to invoke this method directly.\r\n *\r\n * @method SpinePlugin#getAtlasWebGL\r\n * @since 3.19.0\r\n * \r\n * @param {string} key - The key of the Spine Atlas to create.\r\n * \r\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\r\n */\r\n getAtlasWebGL: function (key)\r\n {\r\n var atlasEntry = this.cache.get(key);\r\n\r\n if (!atlasEntry)\r\n {\r\n console.warn('No atlas data for: ' + key);\r\n return;\r\n }\r\n\r\n var atlas;\r\n var spineTextures = this.spineTextures;\r\n\r\n if (spineTextures.has(key))\r\n {\r\n atlas = spineTextures.get(key);\r\n }\r\n else\r\n {\r\n var textures = this.textures;\r\n\r\n var gl = this.sceneRenderer.context.gl;\r\n\r\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\r\n\r\n atlas = new Spine.TextureAtlas(atlasEntry.data, function (path)\r\n {\r\n return new Spine.webgl.GLTexture(gl, textures.get(path).getSourceImage(), false);\r\n });\r\n }\r\n\r\n return atlas;\r\n },\r\n\r\n /**\r\n * Adds a Spine Skeleton and Atlas file, or array of files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.spine('spineBoy', 'boy.json', 'boy.atlas', true);\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\r\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\r\n * \r\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary. The associated\r\n * atlas files are scanned for any texture files present in them, which are then loaded. If you have exported\r\n * your Spine data with preMultipiedAlpha set, then you should enable this in the arguments, or you may see black\r\n * outlines around skeleton textures.\r\n * \r\n * The key must be a unique String. It is used to add the file to the global Spine cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Spine cache.\r\n * Loading a file using a key that is already taken will result in a warning.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.spine({\r\n * key: 'mainmenu',\r\n * jsonURL: 'boy.json',\r\n * atlasURL: 'boy.atlas',\r\n * preMultipliedAlpha: true\r\n * });\r\n * ```\r\n * \r\n * If you need to load multiple Spine atlas files, provide them as an array:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.spine('demos', 'demos.json', [ 'atlas1.atlas', 'atlas2.atlas' ], true);\r\n * }\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.SpineFileConfig` for more details.\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the data from the Spine plugin.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.json\". It will always add `.json` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Spine Plugin has been built or loaded into Phaser.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#spine\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.19.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} jsonURL - The absolute or relative URL to load the Spine json file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {string|string[]} atlasURL - The absolute or relative URL to load the Spine atlas file from. If undefined or `null` it will be set to `.atlas`, i.e. if `key` was \"alien\" then the URL will be \"alien.atlas\".\r\n * @param {boolean} [preMultipiedAlpha=false] - Do the texture files include pre-multiplied alpha or not?\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the Spine json file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the Spine atlas file. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\n spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings)\r\n {\r\n var multifile;\r\n \r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n multifile = new SpineFile(this, key[i]);\r\n \r\n this.addFile(multifile.files);\r\n }\r\n }\r\n else\r\n {\r\n multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n \r\n return this;\r\n },\r\n\r\n /**\r\n * Converts the given x and y screen coordinates into the world space of the given Skeleton.\r\n * \r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#worldToLocal\r\n * @since 3.19.0\r\n * \r\n * @param {number} x - The screen space x coordinate to convert.\r\n * @param {number} y - The screen space y coordinate to convert.\r\n * @param {spine.Skeleton} skeleton - The Spine Skeleton to convert into.\r\n * @param {spine.Bone} [bone] - Optional bone of the Skeleton to convert into.\r\n * \r\n * @return {spine.Vector2} A Vector2 containing the translated point.\r\n */\r\n worldToLocal: function (x, y, skeleton, bone)\r\n {\r\n var temp1 = this.temp1;\r\n var temp2 = this.temp2;\r\n var camera = this.sceneRenderer.camera;\r\n\r\n temp1.set(x + skeleton.x, y - skeleton.y, 0);\r\n\r\n var width = camera.viewportWidth;\r\n var height = camera.viewportHeight;\r\n\r\n camera.screenToWorld(temp1, width, height);\r\n\r\n if (bone && bone.parent !== null)\r\n {\r\n bone.parent.worldToLocal(temp2.set(temp1.x - skeleton.x, temp1.y - skeleton.y, 0));\r\n\r\n return new Spine.Vector2(temp2.x, temp2.y);\r\n }\r\n else if (bone)\r\n {\r\n return new Spine.Vector2(temp1.x - skeleton.x, temp1.y - skeleton.y);\r\n }\r\n else\r\n {\r\n return new Spine.Vector2(temp1.x, temp1.y);\r\n }\r\n },\r\n\r\n /**\r\n * Returns a Spine Vector2 based on the given x and y values.\r\n *\r\n * @method SpinePlugin#getVector2\r\n * @since 3.19.0\r\n * \r\n * @param {number} x - The Vector x value.\r\n * @param {number} y - The Vector y value.\r\n * \r\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\r\n */\r\n getVector2: function (x, y)\r\n {\r\n return new Spine.Vector2(x, y);\r\n },\r\n\r\n /**\r\n * Returns a Spine Vector2 based on the given x, y and z values.\r\n * \r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#getVector3\r\n * @since 3.19.0\r\n * \r\n * @param {number} x - The Vector x value.\r\n * @param {number} y - The Vector y value.\r\n * @param {number} z - The Vector z value.\r\n * \r\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\r\n */\r\n getVector3: function (x, y, z)\r\n {\r\n return new Spine.webgl.Vector3(x, y, z);\r\n },\r\n\r\n /**\r\n * Sets `drawBones` in the Spine Skeleton Debug Renderer.\r\n * \r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugBones\r\n * @since 3.19.0\r\n * \r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n * \r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugBones: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawBones = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawRegionAttachments` in the Spine Skeleton Debug Renderer.\r\n * \r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugRegionAttachments\r\n * @since 3.19.0\r\n * \r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n * \r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugRegionAttachments: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawRegionAttachments = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawBoundingBoxes` in the Spine Skeleton Debug Renderer.\r\n * \r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugBoundingBoxes\r\n * @since 3.19.0\r\n * \r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n * \r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugBoundingBoxes: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawBoundingBoxes = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawMeshHull` in the Spine Skeleton Debug Renderer.\r\n * \r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugMeshHull\r\n * @since 3.19.0\r\n * \r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n * \r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugMeshHull: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawMeshHull = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawMeshTriangles` in the Spine Skeleton Debug Renderer.\r\n * \r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugMeshTriangles\r\n * @since 3.19.0\r\n * \r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n * \r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugMeshTriangles: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawMeshTriangles = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawPaths` in the Spine Skeleton Debug Renderer.\r\n * \r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugPaths\r\n * @since 3.19.0\r\n * \r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n * \r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugPaths: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawPaths = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawSkeletonXY` in the Spine Skeleton Debug Renderer.\r\n * \r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugSkeletonXY\r\n * @since 3.19.0\r\n * \r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n * \r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugSkeletonXY: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawSkeletonXY = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets `drawClipping` in the Spine Skeleton Debug Renderer.\r\n * \r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setDebugClipping\r\n * @since 3.19.0\r\n * \r\n * @param {boolean} [value=true] - The value to set in the debug property.\r\n * \r\n * @return {this} This Spine Plugin.\r\n */\r\n setDebugClipping: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skeletonDebugRenderer.drawClipping = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the given vertex effect on the Spine Skeleton Renderer.\r\n * \r\n * Only works in WebGL.\r\n *\r\n * @method SpinePlugin#setEffect\r\n * @since 3.19.0\r\n * \r\n * @param {spine.VertexEffect} [effect] - The vertex effect to set on the Skeleton Renderer.\r\n * \r\n * @return {this} This Spine Plugin.\r\n */\r\n setEffect: function (effect)\r\n {\r\n this.sceneRenderer.skeletonRenderer.vertexEffect = effect;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a Spine Skeleton based on the given key and optional Skeleton JSON data.\r\n * \r\n * The Skeleton data should have already been loaded before calling this method.\r\n *\r\n * @method SpinePlugin#createSkeleton\r\n * @since 3.19.0\r\n * \r\n * @param {string} key - The key of the Spine skeleton data, as loaded by the plugin. If the Spine JSON contains multiple skeletons, reference them with a period, i.e. `set.spineBoy`.\r\n * @param {object} [skeletonJSON] - Optional Skeleton JSON data to use, instead of getting it from the cache.\r\n * \r\n * @return {(any|null)} This Spine Skeleton data object, or `null` if the key was invalid.\r\n */\r\n createSkeleton: function (key, skeletonJSON)\r\n {\r\n var atlasKey = key;\r\n var jsonKey = key;\r\n var split = (key.indexOf('.') !== -1);\r\n\r\n if (split)\r\n {\r\n var parts = key.split('.');\r\n\r\n atlasKey = parts.shift();\r\n jsonKey = parts.join('.');\r\n }\r\n\r\n var atlasData = this.cache.get(atlasKey);\r\n var atlas = this.getAtlas(atlasKey);\r\n\r\n if (!atlas)\r\n {\r\n return null;\r\n }\r\n\r\n if (!this.spineTextures.has(atlasKey))\r\n {\r\n this.spineTextures.add(atlasKey, atlas);\r\n }\r\n\r\n var preMultipliedAlpha = atlasData.preMultipliedAlpha;\r\n\r\n var atlasLoader = new Spine.AtlasAttachmentLoader(atlas);\r\n \r\n var skeletonJson = new Spine.SkeletonJson(atlasLoader);\r\n\r\n var data;\r\n\r\n if (skeletonJSON)\r\n {\r\n data = skeletonJSON;\r\n }\r\n else\r\n {\r\n var json = this.json.get(atlasKey);\r\n\r\n data = (split) ? GetValue(json, jsonKey) : json;\r\n }\r\n\r\n if (data)\r\n {\r\n var skeletonData = skeletonJson.readSkeletonData(data);\r\n\r\n var skeleton = new Spine.Skeleton(skeletonData);\r\n \r\n return { skeletonData: skeletonData, skeleton: skeleton, preMultipliedAlpha: preMultipliedAlpha };\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n },\r\n\r\n /**\r\n * Creates a new Animation State and Animation State Data for the given skeleton.\r\n * \r\n * The returned object contains two properties: `state` and `stateData` respectively.\r\n *\r\n * @method SpinePlugin#createAnimationState\r\n * @since 3.19.0\r\n * \r\n * @param {spine.Skeleton} skeleton - The Skeleton to create the Animation State for.\r\n * \r\n * @return {any} An object containing the Animation State and Animation State Data instances.\r\n */\r\n createAnimationState: function (skeleton)\r\n {\r\n var stateData = new Spine.AnimationStateData(skeleton.data);\r\n\r\n var state = new Spine.AnimationState(stateData);\r\n\r\n return { stateData: stateData, state: state };\r\n },\r\n\r\n /**\r\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\r\n * \r\n * The returned object contains two properties: `offset` and `size`:\r\n * \r\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\r\n * `size` - The width and height of the AABB.\r\n *\r\n * @method SpinePlugin#getBounds\r\n * @since 3.19.0\r\n * \r\n * @param {spine.Skeleton} skeleton - The Skeleton to get the bounds from.\r\n * \r\n * @return {any} The bounds object.\r\n */\r\n getBounds: function (skeleton)\r\n {\r\n var offset = new Spine.Vector2();\r\n var size = new Spine.Vector2();\r\n\r\n skeleton.getBounds(offset, size, []);\r\n\r\n return { offset: offset, size: size };\r\n },\r\n\r\n /**\r\n * Internal handler for when the renderer resizes.\r\n * \r\n * Only called if running in WebGL.\r\n *\r\n * @method SpinePlugin#onResize\r\n * @since 3.19.0\r\n */\r\n onResize: function ()\r\n {\r\n var renderer = this.renderer;\r\n var sceneRenderer = this.sceneRenderer;\r\n\r\n var viewportWidth = renderer.width;\r\n var viewportHeight = renderer.height;\r\n\r\n sceneRenderer.camera.position.x = viewportWidth / 2;\r\n sceneRenderer.camera.position.y = viewportHeight / 2;\r\n \r\n sceneRenderer.camera.viewportWidth = viewportWidth;\r\n sceneRenderer.camera.viewportHeight = viewportHeight;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * \r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method SpinePlugin#shutdown\r\n * @private\r\n * @since 3.19.0\r\n */\r\n shutdown: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off('shutdown', this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * \r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method SpinePlugin#destroy\r\n * @private\r\n * @since 3.19.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n if (this.sceneRenderer)\r\n {\r\n this.sceneRenderer.dispose();\r\n }\r\n\r\n this.pluginManager.removeGameObject('spine', true, true);\r\n\r\n this.pluginManager = null;\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n\r\n this.cache = null;\r\n this.spineTextures = null;\r\n this.json = null;\r\n this.textures = null;\r\n this.sceneRenderer = null;\r\n this.skeletonRenderer = null;\r\n this.gl = null;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Creates a new Spine Game Object and adds it to the Scene.\r\n * \r\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\r\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\r\n * do not have a Phaser origin.\r\n * \r\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\r\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\r\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\r\n * that.\r\n * \r\n * ```javascript\r\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\r\n * ```\r\n * \r\n * The key is optional. If not passed here, you need to call `SpineGameObject.setSkeleton()` to use it.\r\n * \r\n * The animation name is also optional and can be set later via `SpineGameObject.setAnimation`.\r\n * \r\n * Should you wish for more control over the object creation, such as setting a slot attachment or skin\r\n * name, then use `SpinePlugin.make` instead.\r\n *\r\n * @method SpinePlugin#add\r\n * @since 3.19.0\r\n * \r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\r\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\r\n *\r\n * @return {SpineGameObject} The Game Object that was created.\r\n */\r\n\r\n/**\r\n * Creates a new Spine Game Object from the given configuration file and optionally adds it to the Scene.\r\n * \r\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\r\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\r\n * do not have a Phaser origin.\r\n * \r\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\r\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\r\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\r\n * that.\r\n * \r\n * ```javascript\r\n * let jelly = this.make.spine({\r\n * x: 500, y: 500, key: 'jelly',\r\n * scale: 1.5,\r\n * skinName: 'square_Green',\r\n * animationName: 'jelly-idle', loop: true,\r\n * slotName: 'hat', attachmentName: 'images/La_14'\r\n * });\r\n * ```\r\n *\r\n * @method SpinePlugin#make\r\n * @since 3.19.0\r\n *\r\n * @param {any} config - The configuration object this Game Object will use to create itself.\r\n * @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.\r\n *\r\n * @return {SpineGameObject} The Game Object that was created.\r\n */\r\n\r\nmodule.exports = SpinePlugin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Complete Event.\r\n *\r\n * @event SpinePluginEvents#COMPLETE\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Dispose Event.\r\n *\r\n * @event SpinePluginEvents#DISPOSE\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'dispose';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The End Event.\r\n *\r\n * @event SpinePluginEvents#END\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'end';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Custom Event Event.\r\n *\r\n * @event SpinePluginEvents#EVENT\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'event';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Interrupted Event.\r\n *\r\n * @event SpinePluginEvents#INTERRUPTED\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'interrupted';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Start Event.\r\n *\r\n * @event SpinePluginEvents#START\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace SpinePluginEvents\r\n */\r\n\r\nmodule.exports = {\r\n\r\n COMPLETE: require('./COMPLETE_EVENT'),\r\n DISPOSE: require('./DISPOSE_EVENT'),\r\n END: require('./END_EVENT'),\r\n EVENT: require('./EVENT_EVENT'),\r\n INTERRUPTED: require('./INTERRUPTED_EVENT'),\r\n START: require('./START_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar AngleBetween = require('../../../../src/math/angle/Between');\r\nvar Clamp = require('../../../../src/math/Clamp');\r\nvar Class = require('../../../../src/utils/Class');\r\nvar ComponentsComputedSize = require('../../../../src/gameobjects/components/ComputedSize');\r\nvar ComponentsDepth = require('../../../../src/gameobjects/components/Depth');\r\nvar ComponentsFlip = require('../../../../src/gameobjects/components/Flip');\r\nvar ComponentsScrollFactor = require('../../../../src/gameobjects/components/ScrollFactor');\r\nvar ComponentsTransform = require('../../../../src/gameobjects/components/Transform');\r\nvar ComponentsVisible = require('../../../../src/gameobjects/components/Visible');\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar DegToRad = require('../../../../src/math/DegToRad');\r\nvar GameObject = require('../../../../src/gameobjects/GameObject');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar SpineEvents = require('../events/');\r\nvar SpineGameObjectRender = require('./SpineGameObjectRender');\r\n\r\n/**\r\n * @classdesc\r\n * A Spine Game Object is a Phaser level object that can be added to your Phaser Scenes. It encapsulates\r\n * a Spine Skeleton with Spine Animation Data and Animation State, with helper methods to allow you to\r\n * easily change the skin, slot attachment, bone positions and more.\r\n * \r\n * Spine Game Objects can be created via the Game Object Factory, Game Object Creator, or directly.\r\n * You can only create them if the Spine plugin has been loaded into Phaser.\r\n * \r\n * The quickest way is the Game Object Factory:\r\n * \r\n * ```javascript\r\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\r\n * ```\r\n * \r\n * Here we are creating a new Spine Game Object positioned at 512 x 550. It's using the `jelly`\r\n * Spine data, which has previously been loaded into your Scene. The `jelly-think` argument is\r\n * an optional animation to start playing on the skeleton. The final argument `true` sets the\r\n * animation to loop. Look at the documentation for further details on each of these options.\r\n * \r\n * For more control, you can use the Game Object Creator, passing in a Spine Game Object\r\n * Configuration object:\r\n * \r\n * ```javascript\r\n * let jelly = this.make.spine({\r\n * x: 512, y: 550, key: 'jelly',\r\n * scale: 1.5,\r\n * skinName: 'square_Green',\r\n * animationName: 'jelly-think', loop: true,\r\n * slotName: 'hat', attachmentName: 'images/La_14'\r\n * });\r\n * ```\r\n * \r\n * Here, you've got the ability to specify extra details, such as the slot name, attachments or\r\n * overall scale.\r\n * \r\n * If you wish to instantiate a Spine Game Object directly you can do so, but in order for it to\r\n * update and render, it must be added to the display and update lists of your Scene:\r\n * \r\n * ```javascript\r\n * let jelly = new SpineGameObject(this, this.spine, 512, 550, 'jelly', 'jelly-think', true);\r\n * this.sys.displayList.add(jelly);\r\n * this.sys.updateList.add(jelly);\r\n * ```\r\n * \r\n * It's possible to enable Spine Game Objects for input, but you should be aware that it will use\r\n * the bounds of the skeletons current pose to create the hit area from. Sometimes this is ok, but\r\n * often not. Make use of the `InputPlugin.enableDebug` method to view the input shape being created.\r\n * If it's not suitable, provide your own shape to the `setInteractive` method.\r\n * \r\n * Due to the way Spine handles scaling, it's not recommended to enable a Spine Game Object for\r\n * physics directly. Instead, you should look at creating a proxy body and syncing the Spine Game\r\n * Object position with it. See the examples for further details.\r\n * \r\n * If your Spine Game Object has black outlines around the different parts of the texture when it\r\n * renders then you have exported the files from Spine with pre-multiplied alpha enabled, but have\r\n * forgotten to set that flag when loading the Spine data. Please see the loader docs for more details.\r\n *\r\n * @class SpineGameObject\r\n * @constructor\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to.\r\n * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\r\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\r\n */\r\nvar SpineGameObject = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n ComponentsComputedSize,\r\n ComponentsDepth,\r\n ComponentsFlip,\r\n ComponentsScrollFactor,\r\n ComponentsTransform,\r\n ComponentsVisible,\r\n SpineGameObjectRender\r\n ],\r\n\r\n initialize:\r\n\r\n function SpineGameObject (scene, plugin, x, y, key, animationName, loop)\r\n {\r\n GameObject.call(this, scene, 'Spine');\r\n\r\n /**\r\n * A reference to the Spine Plugin.\r\n *\r\n * @name SpineGameObject#plugin\r\n * @type {SpinePlugin}\r\n * @since 3.19.0\r\n */\r\n this.plugin = plugin;\r\n\r\n /**\r\n * The Spine Skeleton this Game Object is using.\r\n *\r\n * @name SpineGameObject#skeleton\r\n * @type {spine.Skeleton}\r\n * @since 3.19.0\r\n */\r\n this.skeleton = null;\r\n\r\n /**\r\n * The Spine Skeleton Data associated with the Skeleton this Game Object is using.\r\n *\r\n * @name SpineGameObject#skeletonData\r\n * @type {spine.SkeletonData}\r\n * @since 3.19.0\r\n */\r\n this.skeletonData = null;\r\n\r\n /**\r\n * The Spine Animation State this Game Object is using.\r\n *\r\n * @name SpineGameObject#state\r\n * @type {spine.AnimationState}\r\n * @since 3.19.0\r\n */\r\n this.state = null;\r\n\r\n /**\r\n * The Spine Animation State Data associated with the Animation State this Game Object is using.\r\n *\r\n * @name SpineGameObject#stateData\r\n * @type {spine.AnimationStateData}\r\n * @since 3.19.0\r\n */\r\n this.stateData = null;\r\n\r\n /**\r\n * A reference to the root bone of the Skeleton.\r\n *\r\n * @name SpineGameObject#root\r\n * @type {spine.Bone}\r\n * @since 3.19.0\r\n */\r\n this.root = null;\r\n\r\n /**\r\n * This object holds the calculated bounds of the current\r\n * pose, as set when a new Skeleton is applied.\r\n *\r\n * @name SpineGameObject#bounds\r\n * @type {any}\r\n * @since 3.19.0\r\n */\r\n this.bounds = null;\r\n \r\n /**\r\n * A Game Object level flag that allows you to enable debug drawing\r\n * to the Skeleton Debug Renderer by toggling it.\r\n *\r\n * @name SpineGameObject#drawDebug\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.drawDebug = false;\r\n\r\n /**\r\n * The factor to scale the Animation update time by.\r\n *\r\n * @name SpineGameObject#timeScale\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.timeScale = 1;\r\n\r\n /**\r\n * The calculated Display Origin of this Game Object.\r\n *\r\n * @name SpineGameObject#displayOriginX\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.displayOriginX = 0;\r\n\r\n /**\r\n * The calculated Display Origin of this Game Object.\r\n *\r\n * @name SpineGameObject#displayOriginY\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.displayOriginY = 0;\r\n\r\n /**\r\n * A flag that stores if the texture associated with the current\r\n * Skin being used by this Game Object, has its alpha pre-multiplied\r\n * into it, or not.\r\n *\r\n * @name SpineGameObject#preMultipliedAlpha\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.preMultipliedAlpha = false;\r\n\r\n /**\r\n * A default Blend Mode. You cannot change the blend mode of a\r\n * Spine Game Object.\r\n *\r\n * @name SpineGameObject#blendMode\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.blendMode = 0;\r\n\r\n this.setPosition(x, y);\r\n\r\n if (key)\r\n {\r\n this.setSkeleton(key, animationName, loop);\r\n }\r\n },\r\n\r\n /**\r\n * Overrides the default Game Object method and always returns true.\r\n * Rendering is decided in the renderer functions.\r\n *\r\n * @method SpineGameObject#willRender\r\n * @since 3.19.0\r\n *\r\n * @return {boolean} Always returns `true`.\r\n */\r\n willRender: function ()\r\n {\r\n return true;\r\n },\r\n\r\n /**\r\n * Set the Alpha level for the whole Skeleton of this Game Object.\r\n * \r\n * The alpha controls the opacity of the Game Object as it renders.\r\n * \r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * @method SpineGameObject#setAlpha\r\n * @since 3.19.0\r\n *\r\n * @param {number} [value=1] - The alpha value used for the whole Skeleton.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (value, slotName)\r\n {\r\n if (value === undefined) { value = 1; }\r\n\r\n if (slotName)\r\n {\r\n var slot = this.findSlot(slotName);\r\n\r\n if (slot)\r\n {\r\n slot.color.a = Clamp(value, 0, 1);\r\n }\r\n }\r\n else\r\n {\r\n this.alpha = value;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Skeleton.\r\n * \r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#alpha\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.a;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.a = v;\r\n }\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~2;\r\n }\r\n else\r\n {\r\n this.renderFlags |= 2;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of red used when rendering the Skeleton.\r\n * \r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#red\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n red: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.r;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.r = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of green used when rendering the Skeleton.\r\n * \r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#green\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n green: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.g;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.g = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of blue used when rendering the Skeleton.\r\n * \r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#blue\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n blue: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.b;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.b = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the color on the given attachment slot. Or, if no slot is given, on the whole skeleton.\r\n *\r\n * @method SpineGameObject#setColor\r\n * @since 3.19.0\r\n *\r\n * @param {integer} [color=0xffffff] - The color being applied to the Skeleton or named Slot. Set to white to disable any previously set color.\r\n * @param {string} [slotName] - The name of the slot to set the color on. If not give, will be set on the whole skeleton.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setColor: function (color, slotName)\r\n {\r\n if (color === undefined) { color = 0xffffff; }\r\n\r\n var red = (color >> 16 & 0xFF) / 255;\r\n var green = (color >> 8 & 0xFF) / 255;\r\n var blue = (color & 0xFF) / 255;\r\n var alpha = (color > 16777215) ? (color >>> 24) / 255 : null;\r\n\r\n var target = this.skeleton;\r\n\r\n if (slotName)\r\n {\r\n var slot = this.findSlot(slotName);\r\n\r\n if (slot)\r\n {\r\n target = slot;\r\n }\r\n }\r\n\r\n target.color.r = red;\r\n target.color.g = green;\r\n target.color.b = blue;\r\n\r\n if (alpha !== null)\r\n {\r\n target.color.a = alpha;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets this Game Object to use the given Skeleton based on the Atlas Data Key and a provided JSON object\r\n * that contains the Skeleton data.\r\n *\r\n * @method SpineGameObject#setSkeletonFromJSON\r\n * @since 3.19.0\r\n * \r\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\r\n * @param {object} skeletonJSON - The JSON data for the Skeleton.\r\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkeletonFromJSON: function (atlasDataKey, skeletonJSON, animationName, loop)\r\n {\r\n return this.setSkeleton(atlasDataKey, skeletonJSON, animationName, loop);\r\n },\r\n\r\n /**\r\n * Sets this Game Object to use the given Skeleton based on its cache key.\r\n * \r\n * Typically, once set, the Skeleton doesn't change. Instead, you change the skin,\r\n * or slot attachment, or any other property to adjust it.\r\n *\r\n * @method SpineGameObject#setSkeleton\r\n * @since 3.19.0\r\n * \r\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\r\n * @param {object} skeletonJSON - The JSON data for the Skeleton.\r\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkeleton: function (atlasDataKey, animationName, loop, skeletonJSON)\r\n {\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n var data = this.plugin.createSkeleton(atlasDataKey, skeletonJSON);\r\n\r\n this.skeletonData = data.skeletonData;\r\n\r\n this.preMultipliedAlpha = data.preMultipliedAlpha;\r\n\r\n var skeleton = data.skeleton;\r\n\r\n skeleton.setSkin();\r\n skeleton.setToSetupPose();\r\n\r\n this.skeleton = skeleton;\r\n\r\n // AnimationState\r\n data = this.plugin.createAnimationState(skeleton);\r\n\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n this.state = data.state;\r\n this.stateData = data.stateData;\r\n\r\n this.state.addListener({\r\n event: this.onEvent.bind(this),\r\n complete: this.onComplete.bind(this),\r\n start: this.onStart.bind(this),\r\n end: this.onEnd.bind(this),\r\n dispose: this.onDispose.bind(this),\r\n interrupted: this.onInterrupted.bind(this)\r\n });\r\n\r\n if (animationName)\r\n {\r\n this.setAnimation(0, animationName, loop);\r\n }\r\n\r\n this.root = this.getRootBone();\r\n\r\n if (this.root)\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\r\n }\r\n\r\n this.state.apply(skeleton);\r\n\r\n skeleton.updateCache();\r\n\r\n return this.updateSize();\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onComplete event via this Game Object.\r\n *\r\n * @method SpineGameObject#onComplete\r\n * @fires SpinePluginEvents#COMPLETE\r\n * @private\r\n * @since 3.19.0\r\n * \r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onComplete: function (entry)\r\n {\r\n this.emit(SpineEvents.COMPLETE, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onDispose event via this Game Object.\r\n *\r\n * @method SpineGameObject#onDispose\r\n * @fires SpinePluginEvents#DISPOSE\r\n * @private\r\n * @since 3.19.0\r\n * \r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onDispose: function (entry)\r\n {\r\n this.emit(SpineEvents.DISPOSE, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onEnd event via this Game Object.\r\n *\r\n * @method SpineGameObject#onEnd\r\n * @fires SpinePluginEvents#END\r\n * @private\r\n * @since 3.19.0\r\n * \r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onEnd: function (entry)\r\n {\r\n this.emit(SpineEvents.END, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine Event event via this Game Object.\r\n *\r\n * @method SpineGameObject#onEvent\r\n * @fires SpinePluginEvents#EVENT\r\n * @private\r\n * @since 3.19.0\r\n * \r\n * @param {any} entry - The event data from Spine.\r\n * @param {spine.Event} event - The Spine event.\r\n */\r\n onEvent: function (entry, event)\r\n {\r\n this.emit(SpineEvents.EVENT, entry, event);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onInterrupted event via this Game Object.\r\n *\r\n * @method SpineGameObject#onInterrupted\r\n * @fires SpinePluginEvents#INTERRUPTED\r\n * @private\r\n * @since 3.19.0\r\n * \r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onInterrupted: function (entry)\r\n {\r\n this.emit(SpineEvents.INTERRUPTED, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onStart event via this Game Object.\r\n *\r\n * @method SpineGameObject#onStart\r\n * @fires SpinePluginEvents#START\r\n * @private\r\n * @since 3.19.0\r\n * \r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onStart: function (entry)\r\n {\r\n this.emit(SpineEvents.START, entry);\r\n },\r\n\r\n /**\r\n * Refreshes the data about the current Skeleton.\r\n * \r\n * This will reset the rotation, position and size of the Skeleton to match this Game Object.\r\n * \r\n * Call this method if you need to access the Skeleton data directly, and it may have changed\r\n * recently.\r\n *\r\n * @method SpineGameObject#refresh\r\n * @since 3.19.0\r\n * \r\n * @return {this} This Game Object.\r\n */\r\n refresh: function ()\r\n {\r\n if (this.root)\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\r\n }\r\n\r\n this.updateSize();\r\n\r\n this.skeleton.updateCache();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the size of this Game Object.\r\n * \r\n * If no arguments are given it uses the current skeleton data dimensions.\r\n * \r\n * You can use this method to set a fixed size of this Game Object, such as for input detection,\r\n * when the skeleton data doesn't match what is required in-game.\r\n *\r\n * @method SpineGameObject#setSize\r\n * @since 3.19.0\r\n * \r\n * @param {number} [width] - The width of the Skeleton. If not given it defaults to the Skeleton Data width.\r\n * @param {number} [height] - The height of the Skeleton. If not given it defaults to the Skeleton Data height.\r\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\r\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\r\n * \r\n * @return {this} This Game Object.\r\n */\r\n setSize: function (width, height, offsetX, offsetY)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n if (width === undefined) { width = skeleton.data.width; }\r\n if (height === undefined) { height = skeleton.data.height; }\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n this.displayOriginX = skeleton.x - offsetX;\r\n this.displayOriginY = skeleton.y - offsetY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the offset of this Game Object from the Skeleton position.\r\n * \r\n * You can use this method to adjust how the position of this Game Object relates to the Skeleton it is using.\r\n *\r\n * @method SpineGameObject#setOffset\r\n * @since 3.19.0\r\n * \r\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\r\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\r\n * \r\n * @return {this} This Game Object.\r\n */\r\n setOffset: function (offsetX, offsetY)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n this.displayOriginX = skeleton.x - offsetX;\r\n this.displayOriginY = skeleton.y - offsetY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that syncs all of the Game Object position and scale data to the Skeleton.\r\n * It then syncs the skeleton bounds back to this Game Object.\r\n * \r\n * This method is called automatically as needed internally, however, it's also exposed should\r\n * you require overriding the size settings.\r\n *\r\n * @method SpineGameObject#updateSize\r\n * @since 3.19.0\r\n * \r\n * @return {this} This Game Object.\r\n */\r\n updateSize: function ()\r\n {\r\n var skeleton = this.skeleton;\r\n var renderer = this.plugin.renderer;\r\n\r\n var height = renderer.height;\r\n\r\n var oldScaleX = this.scaleX;\r\n var oldScaleY = this.scaleY;\r\n\r\n skeleton.x = this.x;\r\n skeleton.y = height - this.y;\r\n skeleton.scaleX = 1;\r\n skeleton.scaleY = 1;\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n var bounds = this.getBounds();\r\n\r\n this.width = bounds.size.x;\r\n this.height = bounds.size.y;\r\n\r\n this.displayOriginX = this.x - bounds.offset.x;\r\n this.displayOriginY = this.y - (height - (this.height + bounds.offset.y));\r\n\r\n skeleton.scaleX = oldScaleX;\r\n skeleton.scaleY = oldScaleY;\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The horizontal scale of this Game Object, as applied to the Skeleton it is using.\r\n *\r\n * @name SpineGameObject#scaleX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.19.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n\r\n this.refresh();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scale of this Game Object, as applied to the Skeleton it is using.\r\n *\r\n * @name SpineGameObject#scaleY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.19.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleY = value;\r\n\r\n this.refresh();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the bones in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getBoneList\r\n * @since 3.19.0\r\n * \r\n * @return {string[]} An array containing the names of all the bones in the Skeleton Data.\r\n */\r\n getBoneList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.bones.length; i++)\r\n {\r\n output.push(skeletonData.bones[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the skins in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getSkinList\r\n * @since 3.19.0\r\n * \r\n * @return {string[]} An array containing the names of all the skins in the Skeleton Data.\r\n */\r\n getSkinList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.skins.length; i++)\r\n {\r\n output.push(skeletonData.skins[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the slots in the Skeleton.\r\n *\r\n * @method SpineGameObject#getSlotList\r\n * @since 3.19.0\r\n * \r\n * @return {string[]} An array containing the names of all the slots in the Skeleton.\r\n */\r\n getSlotList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeleton = this.skeleton;\r\n\r\n for (var i = 0; i < skeleton.slots.length; i++)\r\n {\r\n output.push(skeleton.slots[i].data.name);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the animations in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getAnimationList\r\n * @since 3.19.0\r\n * \r\n * @return {string[]} An array containing the names of all the animations in the Skeleton Data.\r\n */\r\n getAnimationList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.animations.length; i++)\r\n {\r\n output.push(skeletonData.animations[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the current animation being played on the given track, if any.\r\n *\r\n * @method SpineGameObject#getCurrentAnimation\r\n * @since 3.19.0\r\n * \r\n * @param {integer} [trackIndex=0] - The track to return the current animation on.\r\n * \r\n * @return {?spine.Animation} The current Animation on the given track, or `undefined` if there is no current animation.\r\n */\r\n getCurrentAnimation: function (trackIndex)\r\n {\r\n if (trackIndex === undefined) { trackIndex = 0; }\r\n\r\n var current = this.state.getCurrent(trackIndex);\r\n\r\n if (current)\r\n {\r\n return current.animation;\r\n }\r\n },\r\n\r\n /**\r\n * Sets the current animation for a track, discarding any queued animations.\r\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\r\n * \r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n *\r\n * @method SpineGameObject#play\r\n * @fires SpinePluginEvents#START\r\n * @since 3.19.0\r\n *\r\n * @param {string} animationName - The string-based key of the animation to play.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call.\r\n *\r\n * @return {this} This Game Object. If you need the TrackEntry, see `setAnimation` instead.\r\n */\r\n play: function (animationName, loop, ignoreIfPlaying)\r\n {\r\n this.setAnimation(0, animationName, loop, ignoreIfPlaying);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current animation for a track, discarding any queued animations.\r\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\r\n * \r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n *\r\n * @method SpineGameObject#setAnimation\r\n * @fires SpinePluginEvents#START\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to play the animation on.\r\n * @param {string} animationName - The string-based key of the animation to play.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call.\r\n *\r\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\r\n */\r\n setAnimation: function (trackIndex, animationName, loop, ignoreIfPlaying)\r\n {\r\n if (loop === undefined) { loop = false; }\r\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\r\n\r\n if (ignoreIfPlaying && this.state)\r\n {\r\n var currentTrack = this.state.getCurrent(0);\r\n \r\n if (currentTrack && currentTrack.animation.name === animationName && !currentTrack.isComplete())\r\n {\r\n return;\r\n }\r\n }\r\n\r\n if (this.findAnimation(animationName))\r\n {\r\n return this.state.setAnimation(trackIndex, animationName, loop);\r\n }\r\n },\r\n\r\n /**\r\n * Adds an animation to be played after the current or last queued animation for a track.\r\n * If the track is empty, it is equivalent to calling setAnimation.\r\n * \r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n * \r\n * The delay is a float. If > 0, sets delay. If <= 0, the delay set is the duration of the previous\r\n * track entry minus any mix duration (from the AnimationStateData) plus the specified delay\r\n * (ie the mix ends at (delay = 0) or before (delay < 0) the previous track entry duration).\r\n * If the previous entry is looping, its next loop completion is used instead of its duration.\r\n *\r\n * @method SpineGameObject#addAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n * @param {string} animationName - The string-based key of the animation to add.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {integer} [delay=0] - A delay, in ms, before which this animation will start when played.\r\n *\r\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\r\n */\r\n addAnimation: function (trackIndex, animationName, loop, delay)\r\n {\r\n return this.state.addAnimation(trackIndex, animationName, loop, delay);\r\n },\r\n\r\n /**\r\n * Sets an empty animation for a track, discarding any queued animations, and sets the track\r\n * entry's mixDuration. An empty animation has no timelines and serves as a placeholder for mixing in or out.\r\n * \r\n * Mixing out is done by setting an empty animation with a mix duration using either setEmptyAnimation,\r\n * setEmptyAnimations, or addEmptyAnimation. Mixing to an empty animation causes the previous animation to be\r\n * applied less and less over the mix duration. Properties keyed in the previous animation transition to\r\n * the value from lower tracks or to the setup pose value if no lower tracks key the property.\r\n * A mix duration of 0 still mixes out over one frame.\r\n * \r\n * Mixing in is done by first setting an empty animation, then adding an animation using addAnimation\r\n * and on the returned track entry, set the mixDuration. Mixing from an empty animation causes the new\r\n * animation to be applied more and more over the mix duration. Properties keyed in the new animation\r\n * transition from the value from lower tracks or from the setup pose value if no lower tracks key the\r\n * property to the value keyed in the new animation.\r\n *\r\n * @method SpineGameObject#setEmptyAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n * @param {integer} [mixDuration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\r\n *\r\n * @return {spine.TrackEntry} The returned Track Entry.\r\n */\r\n setEmptyAnimation: function (trackIndex, mixDuration)\r\n {\r\n return this.state.setEmptyAnimation(trackIndex, mixDuration);\r\n },\r\n\r\n /**\r\n * Removes all animations from the track, leaving skeletons in their current pose.\r\n * \r\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\r\n * rather than leaving them in their current pose.\r\n *\r\n * @method SpineGameObject#clearTrack\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n clearTrack: function (trackIndex)\r\n {\r\n this.state.clearTrack(trackIndex);\r\n\r\n return this;\r\n },\r\n \r\n /**\r\n * Removes all animations from all tracks, leaving skeletons in their current pose.\r\n * \r\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\r\n * rather than leaving them in their current pose.\r\n *\r\n * @method SpineGameObject#clearTracks\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n clearTracks: function ()\r\n {\r\n this.state.clearTracks();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the skin used to look up attachments before looking in the defaultSkin.\r\n * \r\n * Attachments from the new skin are attached if the corresponding attachment from the\r\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\r\n * attached from the new skin.\r\n * \r\n * After changing the skin, the visible attachments can be reset to those attached in the\r\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\r\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\r\n * or show attachments from the new skin.\r\n *\r\n * @method SpineGameObject#setSkinByName\r\n * @since 3.19.0\r\n * \r\n * @param {string} skinName - The name of the skin to set.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkinByName: function (skinName)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n skeleton.setSkinByName(skinName);\r\n\r\n skeleton.setSlotsToSetupPose();\r\n\r\n this.state.apply(skeleton);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the skin used to look up attachments before looking in the defaultSkin.\r\n * \r\n * Attachments from the new skin are attached if the corresponding attachment from the\r\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\r\n * attached from the new skin.\r\n * \r\n * After changing the skin, the visible attachments can be reset to those attached in the\r\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\r\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\r\n * or show attachments from the new skin.\r\n *\r\n * @method SpineGameObject#setSkin\r\n * @since 3.19.0\r\n * \r\n * @param {?spine.Skin} newSkin - The Skin to set. May be `null`.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkin: function (newSkin)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n skeleton.setSkin(newSkin);\r\n\r\n skeleton.setSlotsToSetupPose();\r\n\r\n this.state.apply(skeleton);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the mix duration when changing from the specified animation to the other.\r\n *\r\n * @method SpineGameObject#setMix\r\n * @since 3.19.0\r\n * \r\n * @param {string} fromName - The animation to mix from.\r\n * @param {string} toName - The animation to mix to.\r\n * @param {number} [duration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setMix: function (fromName, toName, duration)\r\n {\r\n this.stateData.setMix(fromName, toName, duration);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Finds an attachment by looking in the skin and defaultSkin using the slot\r\n * index and attachment name. First the skin is checked and if the attachment was not found,\r\n * the default skin is checked.\r\n *\r\n * @method SpineGameObject#getAttachment\r\n * @since 3.19.0\r\n * \r\n * @param {integer} slotIndex - The slot index to search.\r\n * @param {string} attachmentName - The attachment name to look for.\r\n *\r\n * @return {?spine.Attachment} The Attachment, if found. May be null.\r\n */\r\n getAttachment: function (slotIndex, attachmentName)\r\n {\r\n return this.skeleton.getAttachment(slotIndex, attachmentName);\r\n },\r\n\r\n /**\r\n * Finds an attachment by looking in the skin and defaultSkin using the slot name and attachment name.\r\n *\r\n * @method SpineGameObject#getAttachmentByName\r\n * @since 3.19.0\r\n * \r\n * @param {string} slotName - The slot name to search.\r\n * @param {string} attachmentName - The attachment name to look for.\r\n *\r\n * @return {?spine.Attachment} The Attachment, if found. May be null.\r\n */\r\n getAttachmentByName: function (slotName, attachmentName)\r\n {\r\n return this.skeleton.getAttachmentByName(slotName, attachmentName);\r\n },\r\n\r\n /**\r\n * A convenience method to set an attachment by finding the slot with findSlot,\r\n * finding the attachment with getAttachment, then setting the slot's attachment.\r\n *\r\n * @method SpineGameObject#setAttachment\r\n * @since 3.19.0\r\n * \r\n * @param {string} slotName - The slot name to add the attachment to.\r\n * @param {string} attachmentName - The attachment name to add.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setAttachment: function (slotName, attachmentName)\r\n {\r\n if (Array.isArray(slotName) && Array.isArray(attachmentName) && slotName.length === attachmentName.length)\r\n {\r\n for (var i = 0; i < slotName.length; i++)\r\n {\r\n this.skeleton.setAttachment(slotName[i], attachmentName[i]);\r\n }\r\n }\r\n else\r\n {\r\n this.skeleton.setAttachment(slotName, attachmentName);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the bones, constraints, slots, and draw order to their setup pose values.\r\n *\r\n * @method SpineGameObject#setToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setToSetupPose: function ()\r\n {\r\n this.skeleton.setToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the slots and draw order to their setup pose values.\r\n *\r\n * @method SpineGameObject#setSlotsToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSlotsToSetupPose: function ()\r\n {\r\n this.skeleton.setSlotsToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the bones and constraints to their setup pose values.\r\n *\r\n * @method SpineGameObject#setBonesToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setBonesToSetupPose: function ()\r\n {\r\n this.skeleton.setBonesToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the root bone, or null.\r\n *\r\n * @method SpineGameObject#getRootBone\r\n * @since 3.19.0\r\n *\r\n * @return {spine.Bone} The root bone, or null.\r\n */\r\n getRootBone: function ()\r\n {\r\n return this.skeleton.getRootBone();\r\n },\r\n\r\n /**\r\n * Takes a Bone object and a position in world space and rotates the Bone so it is angled\r\n * towards the given position. You can set an optional angle offset, should the bone be\r\n * designed at a specific angle already. You can also set a minimum and maximum range for the angle.\r\n *\r\n * @method SpineGameObject#angleBoneToXY\r\n * @since 3.19.0\r\n * \r\n * @param {spine.Bone} bone - The bone to rotate towards the world position.\r\n * @param {number} worldX - The world x coordinate to rotate the bone towards.\r\n * @param {number} worldY - The world y coordinate to rotate the bone towards.\r\n * @param {number} [offset=0] - An offset to add to the rotation angle.\r\n * @param {number} [minAngle=0] - The minimum range of the rotation angle.\r\n * @param {number} [maxAngle=360] - The maximum range of the rotation angle.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n angleBoneToXY: function (bone, worldX, worldY, offset, minAngle, maxAngle)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n if (minAngle === undefined) { minAngle = 0; }\r\n if (maxAngle === undefined) { maxAngle = 360; }\r\n\r\n var renderer = this.plugin.renderer;\r\n var height = renderer.height;\r\n\r\n var angle = CounterClockwise(AngleBetween(bone.worldX, height - bone.worldY, worldX, worldY) + DegToRad(offset));\r\n\r\n bone.rotation = Clamp(RadToDeg(angle), minAngle, maxAngle);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Finds a bone by comparing each bone's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findBone\r\n * @since 3.19.0\r\n * \r\n * @param {string} boneName - The name of the bone to find.\r\n *\r\n * @return {spine.Bone} The bone, or null.\r\n */\r\n findBone: function (boneName)\r\n {\r\n return this.skeleton.findBone(boneName);\r\n },\r\n\r\n /**\r\n * Finds the index of a bone by comparing each bone's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findBoneIndex\r\n * @since 3.19.0\r\n * \r\n * @param {string} boneName - The name of the bone to find.\r\n *\r\n * @return {integer} The bone index. Or -1 if the bone was not found.\r\n */\r\n findBoneIndex: function (boneName)\r\n {\r\n return this.skeleton.findBoneIndex(boneName);\r\n },\r\n\r\n /**\r\n * Finds a slot by comparing each slot's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSlot\r\n * @since 3.19.0\r\n * \r\n * @param {string} slotName - The name of the slot to find.\r\n *\r\n * @return {spine.Slot} The Slot. May be null.\r\n */\r\n findSlot: function (slotName)\r\n {\r\n return this.skeleton.findSlot(slotName);\r\n },\r\n\r\n /**\r\n * Finds the index of a slot by comparing each slot's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSlotIndex\r\n * @since 3.19.0\r\n * \r\n * @param {string} slotName - The name of the slot to find.\r\n *\r\n * @return {integer} The slot index. Or -1 if the Slot was not found.\r\n */\r\n findSlotIndex: function (slotName)\r\n {\r\n return this.skeleton.findSlotIndex(slotName);\r\n },\r\n\r\n /**\r\n * Finds a skin by comparing each skin's name. It is more efficient to cache the results of\r\n * this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSkin\r\n * @since 3.19.0\r\n * \r\n * @param {string} skinName - The name of the skin to find.\r\n *\r\n * @return {spine.Skin} The Skin. May be null.\r\n */\r\n findSkin: function (skinName)\r\n {\r\n return this.skeletonData.findSkin(skinName);\r\n },\r\n\r\n /**\r\n * Finds an event by comparing each events's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findEvent\r\n * @since 3.19.0\r\n * \r\n * @param {string} eventDataName - The name of the event to find.\r\n *\r\n * @return {spine.EventData} The Event Data. May be null.\r\n */\r\n findEvent: function (eventDataName)\r\n {\r\n return this.skeletonData.findEvent(eventDataName);\r\n },\r\n\r\n /**\r\n * Finds an animation by comparing each animation's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findAnimation\r\n * @since 3.19.0\r\n * \r\n * @param {string} animationName - The name of the animation to find.\r\n *\r\n * @return {spine.Animation} The Animation. May be null.\r\n */\r\n findAnimation: function (animationName)\r\n {\r\n return this.skeletonData.findAnimation(animationName);\r\n },\r\n\r\n /**\r\n * Finds an IK constraint by comparing each IK constraint's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findIkConstraint\r\n * @since 3.19.0\r\n * \r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.IkConstraintData} The IK constraint. May be null.\r\n */\r\n findIkConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findIkConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds an transform constraint by comparing each transform constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findTransformConstraint\r\n * @since 3.19.0\r\n * \r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.TransformConstraintData} The transform constraint. May be null.\r\n */\r\n findTransformConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findTransformConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds a path constraint by comparing each path constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findPathConstraint\r\n * @since 3.19.0\r\n * \r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.PathConstraintData} The path constraint. May be null.\r\n */\r\n findPathConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findPathConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds the index of a path constraint by comparing each path constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findPathConstraintIndex\r\n * @since 3.19.0\r\n * \r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {integer} The constraint index. Or -1 if the constraint was not found.\r\n */\r\n findPathConstraintIndex: function (constraintName)\r\n {\r\n return this.skeletonData.findPathConstraintIndex(constraintName);\r\n },\r\n\r\n /**\r\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\r\n * \r\n * The returned object contains two properties: `offset` and `size`:\r\n * \r\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\r\n * `size` - The width and height of the AABB.\r\n *\r\n * @method SpineGameObject#getBounds\r\n * @since 3.19.0\r\n * \r\n * @return {any} The bounds object.\r\n */\r\n getBounds: function ()\r\n {\r\n return this.plugin.getBounds(this.skeleton);\r\n },\r\n\r\n /**\r\n * Internal update handler.\r\n *\r\n * @method SpineGameObject#preUpdate\r\n * @protected\r\n * @since 3.19.0\r\n * \r\n * @param {number} time - The current timestamp.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n preUpdate: function (time, delta)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n this.state.update((delta / 1000) * this.timeScale);\r\n\r\n this.state.apply(skeleton);\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method SpineGameObject#preDestroy\r\n * @protected\r\n * @since 3.19.0\r\n */\r\n preDestroy: function ()\r\n {\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n this.plugin = null;\r\n\r\n this.skeleton = null;\r\n this.skeletonData = null;\r\n\r\n this.state = null;\r\n this.stateData = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpineGameObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar Wrap = require('../../../../src/math/Wrap');\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method SpineGameObject#renderCanvas\r\n * @since 3.19.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar SpineGameObjectCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var context = renderer.currentContext;\r\n\r\n var plugin = src.plugin;\r\n var skeleton = src.skeleton;\r\n var skeletonRenderer = plugin.skeletonRenderer;\r\n\r\n var GameObjectRenderMask = 15;\r\n\r\n var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)));\r\n\r\n if (!skeleton || !willRender)\r\n {\r\n return;\r\n }\r\n\r\n var camMatrix = renderer._tempMatrix1;\r\n var spriteMatrix = renderer._tempMatrix2;\r\n var calcMatrix = renderer._tempMatrix3;\r\n\r\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = src.x;\r\n spriteMatrix.f = src.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n skeleton.x = calcMatrix.tx;\r\n skeleton.y = calcMatrix.ty;\r\n\r\n skeleton.scaleX = calcMatrix.scaleX;\r\n\r\n // Inverse or we get upside-down skeletons\r\n skeleton.scaleY = calcMatrix.scaleY * -1;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n skeleton.scaleX *= -1;\r\n\r\n src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);\r\n }\r\n else\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\r\n }\r\n\r\n if (src.scaleY < 0)\r\n {\r\n skeleton.scaleY *= -1;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n else\r\n {\r\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n }\r\n\r\n if (camera.renderToTexture)\r\n {\r\n skeleton.y = calcMatrix.ty;\r\n skeleton.scaleY *= -1;\r\n }\r\n\r\n // Add autoUpdate option\r\n skeleton.updateWorldTransform();\r\n\r\n skeletonRenderer.ctx = context;\r\n skeletonRenderer.debugRendering = (plugin.drawDebug || src.drawDebug);\r\n\r\n context.save();\r\n\r\n skeletonRenderer.draw(skeleton);\r\n\r\n context.restore();\r\n};\r\n\r\nmodule.exports = SpineGameObjectCanvasRenderer;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar renderWebGL = require('../../../../src/utils/NOOP');\r\nvar renderCanvas = require('../../../../src/utils/NOOP');\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = require('./SpineGameObjectWebGLRenderer');\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = require('./SpineGameObjectCanvasRenderer');\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar Wrap = require('../../../../src/math/Wrap');\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method SpineGameObject#renderWebGL\r\n * @since 3.19.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var plugin = src.plugin;\r\n var skeleton = src.skeleton;\r\n var sceneRenderer = plugin.sceneRenderer;\r\n\r\n var GameObjectRenderMask = 15;\r\n\r\n var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)));\r\n\r\n if (!skeleton || !willRender)\r\n {\r\n // Reset the current type\r\n renderer.currentType = '';\r\n\r\n // If there is already a batch running, we need to close it\r\n if (!renderer.nextTypeMatch)\r\n {\r\n // The next object in the display list is not a Spine object, so we end the batch\r\n sceneRenderer.end();\r\n \r\n renderer.rebindPipeline(renderer.pipelines.TextureTintPipeline);\r\n }\r\n \r\n return;\r\n }\r\n\r\n if (renderer.newType)\r\n {\r\n renderer.clearPipeline();\r\n }\r\n\r\n var camMatrix = renderer._tempMatrix1;\r\n var spriteMatrix = renderer._tempMatrix2;\r\n var calcMatrix = renderer._tempMatrix3;\r\n\r\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = src.x;\r\n spriteMatrix.f = src.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n var viewportHeight = renderer.height;\r\n\r\n skeleton.x = calcMatrix.tx;\r\n skeleton.y = viewportHeight - calcMatrix.ty;\r\n\r\n skeleton.scaleX = calcMatrix.scaleX;\r\n skeleton.scaleY = calcMatrix.scaleY;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n skeleton.scaleX *= -1;\r\n\r\n src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);\r\n }\r\n else\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\r\n }\r\n\r\n if (src.scaleY < 0)\r\n {\r\n skeleton.scaleY *= -1;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n else\r\n {\r\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n }\r\n\r\n if (camera.renderToTexture)\r\n {\r\n skeleton.y = calcMatrix.ty;\r\n skeleton.scaleY *= -1;\r\n }\r\n\r\n // Add autoUpdate option\r\n skeleton.updateWorldTransform();\r\n\r\n if (renderer.newType)\r\n {\r\n sceneRenderer.begin();\r\n }\r\n\r\n // Draw the current skeleton\r\n\r\n // console.log('draw', src.name);\r\n\r\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\r\n\r\n if (plugin.drawDebug || src.drawDebug)\r\n {\r\n // Because if we don't, the bones render positions are completely wrong (*sigh*)\r\n var oldX = skeleton.x;\r\n var oldY = skeleton.y;\r\n\r\n skeleton.x = 0;\r\n skeleton.y = 0;\r\n\r\n sceneRenderer.drawSkeletonDebug(skeleton, src.preMultipliedAlpha);\r\n\r\n skeleton.x = oldX;\r\n skeleton.y = oldY;\r\n }\r\n\r\n if (!renderer.nextTypeMatch)\r\n {\r\n // The next object in the display list is not a Spine object, so we end the batch\r\n sceneRenderer.end();\r\n\r\n renderer.rebindPipeline(renderer.pipelines.TextureTintPipeline);\r\n }\r\n};\r\n\r\nmodule.exports = SpineGameObjectWebGLRenderer;\r\n","/*** IMPORTS FROM imports-loader ***/\n(function() {\n\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar spine;\r\n(function (spine) {\r\n var Animation = (function () {\r\n function Animation(name, timelines, duration) {\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n if (timelines == null)\r\n throw new Error(\"timelines cannot be null.\");\r\n this.name = name;\r\n this.timelines = timelines;\r\n this.timelineIds = [];\r\n for (var i = 0; i < timelines.length; i++)\r\n this.timelineIds[timelines[i].getPropertyId()] = true;\r\n this.duration = duration;\r\n }\r\n Animation.prototype.hasTimeline = function (id) {\r\n return this.timelineIds[id] == true;\r\n };\r\n Animation.prototype.apply = function (skeleton, lastTime, time, loop, events, alpha, blend, direction) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n if (loop && this.duration != 0) {\r\n time %= this.duration;\r\n if (lastTime > 0)\r\n lastTime %= this.duration;\r\n }\r\n var timelines = this.timelines;\r\n for (var i = 0, n = timelines.length; i < n; i++)\r\n timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\r\n };\r\n Animation.binarySearch = function (values, target, step) {\r\n if (step === void 0) { step = 1; }\r\n var low = 0;\r\n var high = values.length / step - 2;\r\n if (high == 0)\r\n return step;\r\n var current = high >>> 1;\r\n while (true) {\r\n if (values[(current + 1) * step] <= target)\r\n low = current + 1;\r\n else\r\n high = current;\r\n if (low == high)\r\n return (low + 1) * step;\r\n current = (low + high) >>> 1;\r\n }\r\n };\r\n Animation.linearSearch = function (values, target, step) {\r\n for (var i = 0, last = values.length - step; i <= last; i += step)\r\n if (values[i] > target)\r\n return i;\r\n return -1;\r\n };\r\n return Animation;\r\n }());\r\n spine.Animation = Animation;\r\n var MixBlend;\r\n (function (MixBlend) {\r\n MixBlend[MixBlend[\"setup\"] = 0] = \"setup\";\r\n MixBlend[MixBlend[\"first\"] = 1] = \"first\";\r\n MixBlend[MixBlend[\"replace\"] = 2] = \"replace\";\r\n MixBlend[MixBlend[\"add\"] = 3] = \"add\";\r\n })(MixBlend = spine.MixBlend || (spine.MixBlend = {}));\r\n var MixDirection;\r\n (function (MixDirection) {\r\n MixDirection[MixDirection[\"mixIn\"] = 0] = \"mixIn\";\r\n MixDirection[MixDirection[\"mixOut\"] = 1] = \"mixOut\";\r\n })(MixDirection = spine.MixDirection || (spine.MixDirection = {}));\r\n var TimelineType;\r\n (function (TimelineType) {\r\n TimelineType[TimelineType[\"rotate\"] = 0] = \"rotate\";\r\n TimelineType[TimelineType[\"translate\"] = 1] = \"translate\";\r\n TimelineType[TimelineType[\"scale\"] = 2] = \"scale\";\r\n TimelineType[TimelineType[\"shear\"] = 3] = \"shear\";\r\n TimelineType[TimelineType[\"attachment\"] = 4] = \"attachment\";\r\n TimelineType[TimelineType[\"color\"] = 5] = \"color\";\r\n TimelineType[TimelineType[\"deform\"] = 6] = \"deform\";\r\n TimelineType[TimelineType[\"event\"] = 7] = \"event\";\r\n TimelineType[TimelineType[\"drawOrder\"] = 8] = \"drawOrder\";\r\n TimelineType[TimelineType[\"ikConstraint\"] = 9] = \"ikConstraint\";\r\n TimelineType[TimelineType[\"transformConstraint\"] = 10] = \"transformConstraint\";\r\n TimelineType[TimelineType[\"pathConstraintPosition\"] = 11] = \"pathConstraintPosition\";\r\n TimelineType[TimelineType[\"pathConstraintSpacing\"] = 12] = \"pathConstraintSpacing\";\r\n TimelineType[TimelineType[\"pathConstraintMix\"] = 13] = \"pathConstraintMix\";\r\n TimelineType[TimelineType[\"twoColor\"] = 14] = \"twoColor\";\r\n })(TimelineType = spine.TimelineType || (spine.TimelineType = {}));\r\n var CurveTimeline = (function () {\r\n function CurveTimeline(frameCount) {\r\n if (frameCount <= 0)\r\n throw new Error(\"frameCount must be > 0: \" + frameCount);\r\n this.curves = spine.Utils.newFloatArray((frameCount - 1) * CurveTimeline.BEZIER_SIZE);\r\n }\r\n CurveTimeline.prototype.getFrameCount = function () {\r\n return this.curves.length / CurveTimeline.BEZIER_SIZE + 1;\r\n };\r\n CurveTimeline.prototype.setLinear = function (frameIndex) {\r\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.LINEAR;\r\n };\r\n CurveTimeline.prototype.setStepped = function (frameIndex) {\r\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.STEPPED;\r\n };\r\n CurveTimeline.prototype.getCurveType = function (frameIndex) {\r\n var index = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n if (index == this.curves.length)\r\n return CurveTimeline.LINEAR;\r\n var type = this.curves[index];\r\n if (type == CurveTimeline.LINEAR)\r\n return CurveTimeline.LINEAR;\r\n if (type == CurveTimeline.STEPPED)\r\n return CurveTimeline.STEPPED;\r\n return CurveTimeline.BEZIER;\r\n };\r\n CurveTimeline.prototype.setCurve = function (frameIndex, cx1, cy1, cx2, cy2) {\r\n var tmpx = (-cx1 * 2 + cx2) * 0.03, tmpy = (-cy1 * 2 + cy2) * 0.03;\r\n var dddfx = ((cx1 - cx2) * 3 + 1) * 0.006, dddfy = ((cy1 - cy2) * 3 + 1) * 0.006;\r\n var ddfx = tmpx * 2 + dddfx, ddfy = tmpy * 2 + dddfy;\r\n var dfx = cx1 * 0.3 + tmpx + dddfx * 0.16666667, dfy = cy1 * 0.3 + tmpy + dddfy * 0.16666667;\r\n var i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n var curves = this.curves;\r\n curves[i++] = CurveTimeline.BEZIER;\r\n var x = dfx, y = dfy;\r\n for (var n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n curves[i] = x;\r\n curves[i + 1] = y;\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n x += dfx;\r\n y += dfy;\r\n }\r\n };\r\n CurveTimeline.prototype.getCurvePercent = function (frameIndex, percent) {\r\n percent = spine.MathUtils.clamp(percent, 0, 1);\r\n var curves = this.curves;\r\n var i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n var type = curves[i];\r\n if (type == CurveTimeline.LINEAR)\r\n return percent;\r\n if (type == CurveTimeline.STEPPED)\r\n return 0;\r\n i++;\r\n var x = 0;\r\n for (var start = i, n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n x = curves[i];\r\n if (x >= percent) {\r\n var prevX = void 0, prevY = void 0;\r\n if (i == start) {\r\n prevX = 0;\r\n prevY = 0;\r\n }\r\n else {\r\n prevX = curves[i - 2];\r\n prevY = curves[i - 1];\r\n }\r\n return prevY + (curves[i + 1] - prevY) * (percent - prevX) / (x - prevX);\r\n }\r\n }\r\n var y = curves[i - 1];\r\n return y + (1 - y) * (percent - x) / (1 - x);\r\n };\r\n CurveTimeline.LINEAR = 0;\r\n CurveTimeline.STEPPED = 1;\r\n CurveTimeline.BEZIER = 2;\r\n CurveTimeline.BEZIER_SIZE = 10 * 2 - 1;\r\n return CurveTimeline;\r\n }());\r\n spine.CurveTimeline = CurveTimeline;\r\n var RotateTimeline = (function (_super) {\r\n __extends(RotateTimeline, _super);\r\n function RotateTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount << 1);\r\n return _this;\r\n }\r\n RotateTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.rotate << 24) + this.boneIndex;\r\n };\r\n RotateTimeline.prototype.setFrame = function (frameIndex, time, degrees) {\r\n frameIndex <<= 1;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + RotateTimeline.ROTATION] = degrees;\r\n };\r\n RotateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation;\r\n return;\r\n case MixBlend.first:\r\n var r_1 = bone.data.rotation - bone.rotation;\r\n bone.rotation += (r_1 - (16384 - ((16384.499999999996 - r_1 / 360) | 0)) * 360) * alpha;\r\n }\r\n return;\r\n }\r\n if (time >= frames[frames.length - RotateTimeline.ENTRIES]) {\r\n var r_2 = frames[frames.length + RotateTimeline.PREV_ROTATION];\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation + r_2 * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n r_2 += bone.data.rotation - bone.rotation;\r\n r_2 -= (16384 - ((16384.499999999996 - r_2 / 360) | 0)) * 360;\r\n case MixBlend.add:\r\n bone.rotation += r_2 * alpha;\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time, RotateTimeline.ENTRIES);\r\n var prevRotation = frames[frame + RotateTimeline.PREV_ROTATION];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime));\r\n var r = frames[frame + RotateTimeline.ROTATION] - prevRotation;\r\n r = prevRotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * percent;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n r += bone.data.rotation - bone.rotation;\r\n case MixBlend.add:\r\n bone.rotation += (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n }\r\n };\r\n RotateTimeline.ENTRIES = 2;\r\n RotateTimeline.PREV_TIME = -2;\r\n RotateTimeline.PREV_ROTATION = -1;\r\n RotateTimeline.ROTATION = 1;\r\n return RotateTimeline;\r\n }(CurveTimeline));\r\n spine.RotateTimeline = RotateTimeline;\r\n var TranslateTimeline = (function (_super) {\r\n __extends(TranslateTimeline, _super);\r\n function TranslateTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TranslateTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.translate << 24) + this.boneIndex;\r\n };\r\n TranslateTimeline.prototype.setFrame = function (frameIndex, time, x, y) {\r\n frameIndex *= TranslateTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TranslateTimeline.X] = x;\r\n this.frames[frameIndex + TranslateTimeline.Y] = y;\r\n };\r\n TranslateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.x = bone.data.x;\r\n bone.y = bone.data.y;\r\n return;\r\n case MixBlend.first:\r\n bone.x += (bone.data.x - bone.x) * alpha;\r\n bone.y += (bone.data.y - bone.y) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - TranslateTimeline.ENTRIES]) {\r\n x = frames[frames.length + TranslateTimeline.PREV_X];\r\n y = frames[frames.length + TranslateTimeline.PREV_Y];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TranslateTimeline.ENTRIES);\r\n x = frames[frame + TranslateTimeline.PREV_X];\r\n y = frames[frame + TranslateTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TranslateTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TranslateTimeline.PREV_TIME] - frameTime));\r\n x += (frames[frame + TranslateTimeline.X] - x) * percent;\r\n y += (frames[frame + TranslateTimeline.Y] - y) * percent;\r\n }\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.x = bone.data.x + x * alpha;\r\n bone.y = bone.data.y + y * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bone.x += (bone.data.x + x - bone.x) * alpha;\r\n bone.y += (bone.data.y + y - bone.y) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bone.x += x * alpha;\r\n bone.y += y * alpha;\r\n }\r\n };\r\n TranslateTimeline.ENTRIES = 3;\r\n TranslateTimeline.PREV_TIME = -3;\r\n TranslateTimeline.PREV_X = -2;\r\n TranslateTimeline.PREV_Y = -1;\r\n TranslateTimeline.X = 1;\r\n TranslateTimeline.Y = 2;\r\n return TranslateTimeline;\r\n }(CurveTimeline));\r\n spine.TranslateTimeline = TranslateTimeline;\r\n var ScaleTimeline = (function (_super) {\r\n __extends(ScaleTimeline, _super);\r\n function ScaleTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n ScaleTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.scale << 24) + this.boneIndex;\r\n };\r\n ScaleTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.scaleX = bone.data.scaleX;\r\n bone.scaleY = bone.data.scaleY;\r\n return;\r\n case MixBlend.first:\r\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\r\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - ScaleTimeline.ENTRIES]) {\r\n x = frames[frames.length + ScaleTimeline.PREV_X] * bone.data.scaleX;\r\n y = frames[frames.length + ScaleTimeline.PREV_Y] * bone.data.scaleY;\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ScaleTimeline.ENTRIES);\r\n x = frames[frame + ScaleTimeline.PREV_X];\r\n y = frames[frame + ScaleTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ScaleTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ScaleTimeline.PREV_TIME] - frameTime));\r\n x = (x + (frames[frame + ScaleTimeline.X] - x) * percent) * bone.data.scaleX;\r\n y = (y + (frames[frame + ScaleTimeline.Y] - y) * percent) * bone.data.scaleY;\r\n }\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n bone.scaleX += x - bone.data.scaleX;\r\n bone.scaleY += y - bone.data.scaleY;\r\n }\r\n else {\r\n bone.scaleX = x;\r\n bone.scaleY = y;\r\n }\r\n }\r\n else {\r\n var bx = 0, by = 0;\r\n if (direction == MixDirection.mixOut) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bx = bone.data.scaleX;\r\n by = bone.data.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bx = bone.scaleX;\r\n by = bone.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bx = bone.scaleX;\r\n by = bone.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bone.data.scaleX) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - bone.data.scaleY) * alpha;\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bx = Math.abs(bone.data.scaleX) * spine.MathUtils.signum(x);\r\n by = Math.abs(bone.data.scaleY) * spine.MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bx = Math.abs(bone.scaleX) * spine.MathUtils.signum(x);\r\n by = Math.abs(bone.scaleY) * spine.MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bx = spine.MathUtils.signum(x);\r\n by = spine.MathUtils.signum(y);\r\n bone.scaleX = Math.abs(bone.scaleX) * bx + (x - Math.abs(bone.data.scaleX) * bx) * alpha;\r\n bone.scaleY = Math.abs(bone.scaleY) * by + (y - Math.abs(bone.data.scaleY) * by) * alpha;\r\n }\r\n }\r\n }\r\n };\r\n return ScaleTimeline;\r\n }(TranslateTimeline));\r\n spine.ScaleTimeline = ScaleTimeline;\r\n var ShearTimeline = (function (_super) {\r\n __extends(ShearTimeline, _super);\r\n function ShearTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n ShearTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.shear << 24) + this.boneIndex;\r\n };\r\n ShearTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.shearX = bone.data.shearX;\r\n bone.shearY = bone.data.shearY;\r\n return;\r\n case MixBlend.first:\r\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - ShearTimeline.ENTRIES]) {\r\n x = frames[frames.length + ShearTimeline.PREV_X];\r\n y = frames[frames.length + ShearTimeline.PREV_Y];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ShearTimeline.ENTRIES);\r\n x = frames[frame + ShearTimeline.PREV_X];\r\n y = frames[frame + ShearTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ShearTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ShearTimeline.PREV_TIME] - frameTime));\r\n x = x + (frames[frame + ShearTimeline.X] - x) * percent;\r\n y = y + (frames[frame + ShearTimeline.Y] - y) * percent;\r\n }\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.shearX = bone.data.shearX + x * alpha;\r\n bone.shearY = bone.data.shearY + y * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bone.shearX += x * alpha;\r\n bone.shearY += y * alpha;\r\n }\r\n };\r\n return ShearTimeline;\r\n }(TranslateTimeline));\r\n spine.ShearTimeline = ShearTimeline;\r\n var ColorTimeline = (function (_super) {\r\n __extends(ColorTimeline, _super);\r\n function ColorTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES);\r\n return _this;\r\n }\r\n ColorTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.color << 24) + this.slotIndex;\r\n };\r\n ColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a) {\r\n frameIndex *= ColorTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + ColorTimeline.R] = r;\r\n this.frames[frameIndex + ColorTimeline.G] = g;\r\n this.frames[frameIndex + ColorTimeline.B] = b;\r\n this.frames[frameIndex + ColorTimeline.A] = a;\r\n };\r\n ColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n slot.color.setFromColor(slot.data.color);\r\n return;\r\n case MixBlend.first:\r\n var color = slot.color, setup = slot.data.color;\r\n color.add((setup.r - color.r) * alpha, (setup.g - color.g) * alpha, (setup.b - color.b) * alpha, (setup.a - color.a) * alpha);\r\n }\r\n return;\r\n }\r\n var r = 0, g = 0, b = 0, a = 0;\r\n if (time >= frames[frames.length - ColorTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n r = frames[i + ColorTimeline.PREV_R];\r\n g = frames[i + ColorTimeline.PREV_G];\r\n b = frames[i + ColorTimeline.PREV_B];\r\n a = frames[i + ColorTimeline.PREV_A];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ColorTimeline.ENTRIES);\r\n r = frames[frame + ColorTimeline.PREV_R];\r\n g = frames[frame + ColorTimeline.PREV_G];\r\n b = frames[frame + ColorTimeline.PREV_B];\r\n a = frames[frame + ColorTimeline.PREV_A];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ColorTimeline.PREV_TIME] - frameTime));\r\n r += (frames[frame + ColorTimeline.R] - r) * percent;\r\n g += (frames[frame + ColorTimeline.G] - g) * percent;\r\n b += (frames[frame + ColorTimeline.B] - b) * percent;\r\n a += (frames[frame + ColorTimeline.A] - a) * percent;\r\n }\r\n if (alpha == 1)\r\n slot.color.set(r, g, b, a);\r\n else {\r\n var color = slot.color;\r\n if (blend == MixBlend.setup)\r\n color.setFromColor(slot.data.color);\r\n color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);\r\n }\r\n };\r\n ColorTimeline.ENTRIES = 5;\r\n ColorTimeline.PREV_TIME = -5;\r\n ColorTimeline.PREV_R = -4;\r\n ColorTimeline.PREV_G = -3;\r\n ColorTimeline.PREV_B = -2;\r\n ColorTimeline.PREV_A = -1;\r\n ColorTimeline.R = 1;\r\n ColorTimeline.G = 2;\r\n ColorTimeline.B = 3;\r\n ColorTimeline.A = 4;\r\n return ColorTimeline;\r\n }(CurveTimeline));\r\n spine.ColorTimeline = ColorTimeline;\r\n var TwoColorTimeline = (function (_super) {\r\n __extends(TwoColorTimeline, _super);\r\n function TwoColorTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TwoColorTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TwoColorTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.twoColor << 24) + this.slotIndex;\r\n };\r\n TwoColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a, r2, g2, b2) {\r\n frameIndex *= TwoColorTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TwoColorTimeline.R] = r;\r\n this.frames[frameIndex + TwoColorTimeline.G] = g;\r\n this.frames[frameIndex + TwoColorTimeline.B] = b;\r\n this.frames[frameIndex + TwoColorTimeline.A] = a;\r\n this.frames[frameIndex + TwoColorTimeline.R2] = r2;\r\n this.frames[frameIndex + TwoColorTimeline.G2] = g2;\r\n this.frames[frameIndex + TwoColorTimeline.B2] = b2;\r\n };\r\n TwoColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n slot.color.setFromColor(slot.data.color);\r\n slot.darkColor.setFromColor(slot.data.darkColor);\r\n return;\r\n case MixBlend.first:\r\n var light = slot.color, dark = slot.darkColor, setupLight = slot.data.color, setupDark = slot.data.darkColor;\r\n light.add((setupLight.r - light.r) * alpha, (setupLight.g - light.g) * alpha, (setupLight.b - light.b) * alpha, (setupLight.a - light.a) * alpha);\r\n dark.add((setupDark.r - dark.r) * alpha, (setupDark.g - dark.g) * alpha, (setupDark.b - dark.b) * alpha, 0);\r\n }\r\n return;\r\n }\r\n var r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\r\n if (time >= frames[frames.length - TwoColorTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n r = frames[i + TwoColorTimeline.PREV_R];\r\n g = frames[i + TwoColorTimeline.PREV_G];\r\n b = frames[i + TwoColorTimeline.PREV_B];\r\n a = frames[i + TwoColorTimeline.PREV_A];\r\n r2 = frames[i + TwoColorTimeline.PREV_R2];\r\n g2 = frames[i + TwoColorTimeline.PREV_G2];\r\n b2 = frames[i + TwoColorTimeline.PREV_B2];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TwoColorTimeline.ENTRIES);\r\n r = frames[frame + TwoColorTimeline.PREV_R];\r\n g = frames[frame + TwoColorTimeline.PREV_G];\r\n b = frames[frame + TwoColorTimeline.PREV_B];\r\n a = frames[frame + TwoColorTimeline.PREV_A];\r\n r2 = frames[frame + TwoColorTimeline.PREV_R2];\r\n g2 = frames[frame + TwoColorTimeline.PREV_G2];\r\n b2 = frames[frame + TwoColorTimeline.PREV_B2];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TwoColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TwoColorTimeline.PREV_TIME] - frameTime));\r\n r += (frames[frame + TwoColorTimeline.R] - r) * percent;\r\n g += (frames[frame + TwoColorTimeline.G] - g) * percent;\r\n b += (frames[frame + TwoColorTimeline.B] - b) * percent;\r\n a += (frames[frame + TwoColorTimeline.A] - a) * percent;\r\n r2 += (frames[frame + TwoColorTimeline.R2] - r2) * percent;\r\n g2 += (frames[frame + TwoColorTimeline.G2] - g2) * percent;\r\n b2 += (frames[frame + TwoColorTimeline.B2] - b2) * percent;\r\n }\r\n if (alpha == 1) {\r\n slot.color.set(r, g, b, a);\r\n slot.darkColor.set(r2, g2, b2, 1);\r\n }\r\n else {\r\n var light = slot.color, dark = slot.darkColor;\r\n if (blend == MixBlend.setup) {\r\n light.setFromColor(slot.data.color);\r\n dark.setFromColor(slot.data.darkColor);\r\n }\r\n light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\r\n dark.add((r2 - dark.r) * alpha, (g2 - dark.g) * alpha, (b2 - dark.b) * alpha, 0);\r\n }\r\n };\r\n TwoColorTimeline.ENTRIES = 8;\r\n TwoColorTimeline.PREV_TIME = -8;\r\n TwoColorTimeline.PREV_R = -7;\r\n TwoColorTimeline.PREV_G = -6;\r\n TwoColorTimeline.PREV_B = -5;\r\n TwoColorTimeline.PREV_A = -4;\r\n TwoColorTimeline.PREV_R2 = -3;\r\n TwoColorTimeline.PREV_G2 = -2;\r\n TwoColorTimeline.PREV_B2 = -1;\r\n TwoColorTimeline.R = 1;\r\n TwoColorTimeline.G = 2;\r\n TwoColorTimeline.B = 3;\r\n TwoColorTimeline.A = 4;\r\n TwoColorTimeline.R2 = 5;\r\n TwoColorTimeline.G2 = 6;\r\n TwoColorTimeline.B2 = 7;\r\n return TwoColorTimeline;\r\n }(CurveTimeline));\r\n spine.TwoColorTimeline = TwoColorTimeline;\r\n var AttachmentTimeline = (function () {\r\n function AttachmentTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.attachmentNames = new Array(frameCount);\r\n }\r\n AttachmentTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.attachment << 24) + this.slotIndex;\r\n };\r\n AttachmentTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n AttachmentTimeline.prototype.setFrame = function (frameIndex, time, attachmentName) {\r\n this.frames[frameIndex] = time;\r\n this.attachmentNames[frameIndex] = attachmentName;\r\n };\r\n AttachmentTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n if (direction == MixDirection.mixOut && blend == MixBlend.setup) {\r\n var attachmentName_1 = slot.data.attachmentName;\r\n slot.setAttachment(attachmentName_1 == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName_1));\r\n return;\r\n }\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n if (blend == MixBlend.setup || blend == MixBlend.first) {\r\n var attachmentName_2 = slot.data.attachmentName;\r\n slot.setAttachment(attachmentName_2 == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName_2));\r\n }\r\n return;\r\n }\r\n var frameIndex = 0;\r\n if (time >= frames[frames.length - 1])\r\n frameIndex = frames.length - 1;\r\n else\r\n frameIndex = Animation.binarySearch(frames, time, 1) - 1;\r\n var attachmentName = this.attachmentNames[frameIndex];\r\n skeleton.slots[this.slotIndex]\r\n .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\r\n };\r\n return AttachmentTimeline;\r\n }());\r\n spine.AttachmentTimeline = AttachmentTimeline;\r\n var zeros = null;\r\n var DeformTimeline = (function (_super) {\r\n __extends(DeformTimeline, _super);\r\n function DeformTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount);\r\n _this.frameVertices = new Array(frameCount);\r\n if (zeros == null)\r\n zeros = spine.Utils.newFloatArray(64);\r\n return _this;\r\n }\r\n DeformTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.deform << 27) + +this.attachment.id + this.slotIndex;\r\n };\r\n DeformTimeline.prototype.setFrame = function (frameIndex, time, vertices) {\r\n this.frames[frameIndex] = time;\r\n this.frameVertices[frameIndex] = vertices;\r\n };\r\n DeformTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var slotAttachment = slot.getAttachment();\r\n if (!(slotAttachment instanceof spine.VertexAttachment) || !(slotAttachment.deformAttachment == this.attachment))\r\n return;\r\n var deformArray = slot.deform;\r\n if (deformArray.length == 0)\r\n blend = MixBlend.setup;\r\n var frameVertices = this.frameVertices;\r\n var vertexCount = frameVertices[0].length;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n var vertexAttachment = slotAttachment;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n deformArray.length = 0;\r\n return;\r\n case MixBlend.first:\r\n if (alpha == 1) {\r\n deformArray.length = 0;\r\n break;\r\n }\r\n var deform_1 = spine.Utils.setArraySize(deformArray, vertexCount);\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform_1[i] += (setupVertices[i] - deform_1[i]) * alpha;\r\n }\r\n else {\r\n alpha = 1 - alpha;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform_1[i] *= alpha;\r\n }\r\n }\r\n return;\r\n }\r\n var deform = spine.Utils.setArraySize(deformArray, vertexCount);\r\n if (time >= frames[frames.length - 1]) {\r\n var lastVertices = frameVertices[frames.length - 1];\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_1 = 0; i_1 < vertexCount; i_1++) {\r\n deform[i_1] += lastVertices[i_1] - setupVertices[i_1];\r\n }\r\n }\r\n else {\r\n for (var i_2 = 0; i_2 < vertexCount; i_2++)\r\n deform[i_2] += lastVertices[i_2];\r\n }\r\n }\r\n else {\r\n spine.Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup: {\r\n var vertexAttachment_1 = slotAttachment;\r\n if (vertexAttachment_1.bones == null) {\r\n var setupVertices = vertexAttachment_1.vertices;\r\n for (var i_3 = 0; i_3 < vertexCount; i_3++) {\r\n var setup = setupVertices[i_3];\r\n deform[i_3] = setup + (lastVertices[i_3] - setup) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_4 = 0; i_4 < vertexCount; i_4++)\r\n deform[i_4] = lastVertices[i_4] * alpha;\r\n }\r\n break;\r\n }\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n for (var i_5 = 0; i_5 < vertexCount; i_5++)\r\n deform[i_5] += (lastVertices[i_5] - deform[i_5]) * alpha;\r\n case MixBlend.add:\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_6 = 0; i_6 < vertexCount; i_6++) {\r\n deform[i_6] += (lastVertices[i_6] - setupVertices[i_6]) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_7 = 0; i_7 < vertexCount; i_7++)\r\n deform[i_7] += lastVertices[i_7] * alpha;\r\n }\r\n }\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time);\r\n var prevVertices = frameVertices[frame - 1];\r\n var nextVertices = frameVertices[frame];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame - 1, 1 - (time - frameTime) / (frames[frame - 1] - frameTime));\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_8 = 0; i_8 < vertexCount; i_8++) {\r\n var prev = prevVertices[i_8];\r\n deform[i_8] += prev + (nextVertices[i_8] - prev) * percent - setupVertices[i_8];\r\n }\r\n }\r\n else {\r\n for (var i_9 = 0; i_9 < vertexCount; i_9++) {\r\n var prev = prevVertices[i_9];\r\n deform[i_9] += prev + (nextVertices[i_9] - prev) * percent;\r\n }\r\n }\r\n }\r\n else {\r\n for (var i_10 = 0; i_10 < vertexCount; i_10++) {\r\n var prev = prevVertices[i_10];\r\n deform[i_10] = prev + (nextVertices[i_10] - prev) * percent;\r\n }\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup: {\r\n var vertexAttachment_2 = slotAttachment;\r\n if (vertexAttachment_2.bones == null) {\r\n var setupVertices = vertexAttachment_2.vertices;\r\n for (var i_11 = 0; i_11 < vertexCount; i_11++) {\r\n var prev = prevVertices[i_11], setup = setupVertices[i_11];\r\n deform[i_11] = setup + (prev + (nextVertices[i_11] - prev) * percent - setup) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_12 = 0; i_12 < vertexCount; i_12++) {\r\n var prev = prevVertices[i_12];\r\n deform[i_12] = (prev + (nextVertices[i_12] - prev) * percent) * alpha;\r\n }\r\n }\r\n break;\r\n }\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n for (var i_13 = 0; i_13 < vertexCount; i_13++) {\r\n var prev = prevVertices[i_13];\r\n deform[i_13] += (prev + (nextVertices[i_13] - prev) * percent - deform[i_13]) * alpha;\r\n }\r\n break;\r\n case MixBlend.add:\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_14 = 0; i_14 < vertexCount; i_14++) {\r\n var prev = prevVertices[i_14];\r\n deform[i_14] += (prev + (nextVertices[i_14] - prev) * percent - setupVertices[i_14]) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_15 = 0; i_15 < vertexCount; i_15++) {\r\n var prev = prevVertices[i_15];\r\n deform[i_15] += (prev + (nextVertices[i_15] - prev) * percent) * alpha;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n return DeformTimeline;\r\n }(CurveTimeline));\r\n spine.DeformTimeline = DeformTimeline;\r\n var EventTimeline = (function () {\r\n function EventTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.events = new Array(frameCount);\r\n }\r\n EventTimeline.prototype.getPropertyId = function () {\r\n return TimelineType.event << 24;\r\n };\r\n EventTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n EventTimeline.prototype.setFrame = function (frameIndex, event) {\r\n this.frames[frameIndex] = event.time;\r\n this.events[frameIndex] = event;\r\n };\r\n EventTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n if (firedEvents == null)\r\n return;\r\n var frames = this.frames;\r\n var frameCount = this.frames.length;\r\n if (lastTime > time) {\r\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\r\n lastTime = -1;\r\n }\r\n else if (lastTime >= frames[frameCount - 1])\r\n return;\r\n if (time < frames[0])\r\n return;\r\n var frame = 0;\r\n if (lastTime < frames[0])\r\n frame = 0;\r\n else {\r\n frame = Animation.binarySearch(frames, lastTime);\r\n var frameTime = frames[frame];\r\n while (frame > 0) {\r\n if (frames[frame - 1] != frameTime)\r\n break;\r\n frame--;\r\n }\r\n }\r\n for (; frame < frameCount && time >= frames[frame]; frame++)\r\n firedEvents.push(this.events[frame]);\r\n };\r\n return EventTimeline;\r\n }());\r\n spine.EventTimeline = EventTimeline;\r\n var DrawOrderTimeline = (function () {\r\n function DrawOrderTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.drawOrders = new Array(frameCount);\r\n }\r\n DrawOrderTimeline.prototype.getPropertyId = function () {\r\n return TimelineType.drawOrder << 24;\r\n };\r\n DrawOrderTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n DrawOrderTimeline.prototype.setFrame = function (frameIndex, time, drawOrder) {\r\n this.frames[frameIndex] = time;\r\n this.drawOrders[frameIndex] = drawOrder;\r\n };\r\n DrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var drawOrder = skeleton.drawOrder;\r\n var slots = skeleton.slots;\r\n if (direction == MixDirection.mixOut && blend == MixBlend.setup) {\r\n spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n if (blend == MixBlend.setup || blend == MixBlend.first)\r\n spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n var frame = 0;\r\n if (time >= frames[frames.length - 1])\r\n frame = frames.length - 1;\r\n else\r\n frame = Animation.binarySearch(frames, time) - 1;\r\n var drawOrderToSetupIndex = this.drawOrders[frame];\r\n if (drawOrderToSetupIndex == null)\r\n spine.Utils.arrayCopy(slots, 0, drawOrder, 0, slots.length);\r\n else {\r\n for (var i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\r\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\r\n }\r\n };\r\n return DrawOrderTimeline;\r\n }());\r\n spine.DrawOrderTimeline = DrawOrderTimeline;\r\n var IkConstraintTimeline = (function (_super) {\r\n __extends(IkConstraintTimeline, _super);\r\n function IkConstraintTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES);\r\n return _this;\r\n }\r\n IkConstraintTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.ikConstraint << 24) + this.ikConstraintIndex;\r\n };\r\n IkConstraintTimeline.prototype.setFrame = function (frameIndex, time, mix, softness, bendDirection, compress, stretch) {\r\n frameIndex *= IkConstraintTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + IkConstraintTimeline.MIX] = mix;\r\n this.frames[frameIndex + IkConstraintTimeline.SOFTNESS] = softness;\r\n this.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection;\r\n this.frames[frameIndex + IkConstraintTimeline.COMPRESS] = compress ? 1 : 0;\r\n this.frames[frameIndex + IkConstraintTimeline.STRETCH] = stretch ? 1 : 0;\r\n };\r\n IkConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.ikConstraints[this.ikConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n return;\r\n case MixBlend.first:\r\n constraint.mix += (constraint.data.mix - constraint.mix) * alpha;\r\n constraint.softness += (constraint.data.softness - constraint.softness) * alpha;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n return;\r\n }\r\n if (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) {\r\n if (blend == MixBlend.setup) {\r\n constraint.mix = constraint.data.mix + (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.data.mix) * alpha;\r\n constraint.softness = constraint.data.softness\r\n + (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.data.softness) * alpha;\r\n if (direction == MixDirection.mixOut) {\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n else {\r\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n else {\r\n constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha;\r\n constraint.softness += (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.softness) * alpha;\r\n if (direction == MixDirection.mixIn) {\r\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time, IkConstraintTimeline.ENTRIES);\r\n var mix = frames[frame + IkConstraintTimeline.PREV_MIX];\r\n var softness = frames[frame + IkConstraintTimeline.PREV_SOFTNESS];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime));\r\n if (blend == MixBlend.setup) {\r\n constraint.mix = constraint.data.mix + (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.data.mix) * alpha;\r\n constraint.softness = constraint.data.softness\r\n + (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.data.softness) * alpha;\r\n if (direction == MixDirection.mixOut) {\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n else {\r\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n else {\r\n constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha;\r\n constraint.softness += (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.softness) * alpha;\r\n if (direction == MixDirection.mixIn) {\r\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n };\r\n IkConstraintTimeline.ENTRIES = 6;\r\n IkConstraintTimeline.PREV_TIME = -6;\r\n IkConstraintTimeline.PREV_MIX = -5;\r\n IkConstraintTimeline.PREV_SOFTNESS = -4;\r\n IkConstraintTimeline.PREV_BEND_DIRECTION = -3;\r\n IkConstraintTimeline.PREV_COMPRESS = -2;\r\n IkConstraintTimeline.PREV_STRETCH = -1;\r\n IkConstraintTimeline.MIX = 1;\r\n IkConstraintTimeline.SOFTNESS = 2;\r\n IkConstraintTimeline.BEND_DIRECTION = 3;\r\n IkConstraintTimeline.COMPRESS = 4;\r\n IkConstraintTimeline.STRETCH = 5;\r\n return IkConstraintTimeline;\r\n }(CurveTimeline));\r\n spine.IkConstraintTimeline = IkConstraintTimeline;\r\n var TransformConstraintTimeline = (function (_super) {\r\n __extends(TransformConstraintTimeline, _super);\r\n function TransformConstraintTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TransformConstraintTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.transformConstraint << 24) + this.transformConstraintIndex;\r\n };\r\n TransformConstraintTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix, scaleMix, shearMix) {\r\n frameIndex *= TransformConstraintTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TransformConstraintTimeline.ROTATE] = rotateMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.TRANSLATE] = translateMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.SCALE] = scaleMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.SHEAR] = shearMix;\r\n };\r\n TransformConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.transformConstraints[this.transformConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n var data = constraint.data;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n constraint.scaleMix = data.scaleMix;\r\n constraint.shearMix = data.shearMix;\r\n return;\r\n case MixBlend.first:\r\n constraint.rotateMix += (data.rotateMix - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (data.translateMix - constraint.translateMix) * alpha;\r\n constraint.scaleMix += (data.scaleMix - constraint.scaleMix) * alpha;\r\n constraint.shearMix += (data.shearMix - constraint.shearMix) * alpha;\r\n }\r\n return;\r\n }\r\n var rotate = 0, translate = 0, scale = 0, shear = 0;\r\n if (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n rotate = frames[i + TransformConstraintTimeline.PREV_ROTATE];\r\n translate = frames[i + TransformConstraintTimeline.PREV_TRANSLATE];\r\n scale = frames[i + TransformConstraintTimeline.PREV_SCALE];\r\n shear = frames[i + TransformConstraintTimeline.PREV_SHEAR];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES);\r\n rotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE];\r\n translate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE];\r\n scale = frames[frame + TransformConstraintTimeline.PREV_SCALE];\r\n shear = frames[frame + TransformConstraintTimeline.PREV_SHEAR];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime));\r\n rotate += (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent;\r\n translate += (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent;\r\n scale += (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent;\r\n shear += (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent;\r\n }\r\n if (blend == MixBlend.setup) {\r\n var data = constraint.data;\r\n constraint.rotateMix = data.rotateMix + (rotate - data.rotateMix) * alpha;\r\n constraint.translateMix = data.translateMix + (translate - data.translateMix) * alpha;\r\n constraint.scaleMix = data.scaleMix + (scale - data.scaleMix) * alpha;\r\n constraint.shearMix = data.shearMix + (shear - data.shearMix) * alpha;\r\n }\r\n else {\r\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n constraint.scaleMix += (scale - constraint.scaleMix) * alpha;\r\n constraint.shearMix += (shear - constraint.shearMix) * alpha;\r\n }\r\n };\r\n TransformConstraintTimeline.ENTRIES = 5;\r\n TransformConstraintTimeline.PREV_TIME = -5;\r\n TransformConstraintTimeline.PREV_ROTATE = -4;\r\n TransformConstraintTimeline.PREV_TRANSLATE = -3;\r\n TransformConstraintTimeline.PREV_SCALE = -2;\r\n TransformConstraintTimeline.PREV_SHEAR = -1;\r\n TransformConstraintTimeline.ROTATE = 1;\r\n TransformConstraintTimeline.TRANSLATE = 2;\r\n TransformConstraintTimeline.SCALE = 3;\r\n TransformConstraintTimeline.SHEAR = 4;\r\n return TransformConstraintTimeline;\r\n }(CurveTimeline));\r\n spine.TransformConstraintTimeline = TransformConstraintTimeline;\r\n var PathConstraintPositionTimeline = (function (_super) {\r\n __extends(PathConstraintPositionTimeline, _super);\r\n function PathConstraintPositionTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES);\r\n return _this;\r\n }\r\n PathConstraintPositionTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintPosition << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintPositionTimeline.prototype.setFrame = function (frameIndex, time, value) {\r\n frameIndex *= PathConstraintPositionTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + PathConstraintPositionTimeline.VALUE] = value;\r\n };\r\n PathConstraintPositionTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.position = constraint.data.position;\r\n return;\r\n case MixBlend.first:\r\n constraint.position += (constraint.data.position - constraint.position) * alpha;\r\n }\r\n return;\r\n }\r\n var position = 0;\r\n if (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES])\r\n position = frames[frames.length + PathConstraintPositionTimeline.PREV_VALUE];\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES);\r\n position = frames[frame + PathConstraintPositionTimeline.PREV_VALUE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintPositionTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintPositionTimeline.PREV_TIME] - frameTime));\r\n position += (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent;\r\n }\r\n if (blend == MixBlend.setup)\r\n constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\r\n else\r\n constraint.position += (position - constraint.position) * alpha;\r\n };\r\n PathConstraintPositionTimeline.ENTRIES = 2;\r\n PathConstraintPositionTimeline.PREV_TIME = -2;\r\n PathConstraintPositionTimeline.PREV_VALUE = -1;\r\n PathConstraintPositionTimeline.VALUE = 1;\r\n return PathConstraintPositionTimeline;\r\n }(CurveTimeline));\r\n spine.PathConstraintPositionTimeline = PathConstraintPositionTimeline;\r\n var PathConstraintSpacingTimeline = (function (_super) {\r\n __extends(PathConstraintSpacingTimeline, _super);\r\n function PathConstraintSpacingTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n PathConstraintSpacingTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintSpacing << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintSpacingTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.spacing = constraint.data.spacing;\r\n return;\r\n case MixBlend.first:\r\n constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\r\n }\r\n return;\r\n }\r\n var spacing = 0;\r\n if (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES])\r\n spacing = frames[frames.length + PathConstraintSpacingTimeline.PREV_VALUE];\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES);\r\n spacing = frames[frame + PathConstraintSpacingTimeline.PREV_VALUE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintSpacingTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintSpacingTimeline.PREV_TIME] - frameTime));\r\n spacing += (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent;\r\n }\r\n if (blend == MixBlend.setup)\r\n constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\r\n else\r\n constraint.spacing += (spacing - constraint.spacing) * alpha;\r\n };\r\n return PathConstraintSpacingTimeline;\r\n }(PathConstraintPositionTimeline));\r\n spine.PathConstraintSpacingTimeline = PathConstraintSpacingTimeline;\r\n var PathConstraintMixTimeline = (function (_super) {\r\n __extends(PathConstraintMixTimeline, _super);\r\n function PathConstraintMixTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES);\r\n return _this;\r\n }\r\n PathConstraintMixTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintMix << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintMixTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix) {\r\n frameIndex *= PathConstraintMixTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + PathConstraintMixTimeline.ROTATE] = rotateMix;\r\n this.frames[frameIndex + PathConstraintMixTimeline.TRANSLATE] = translateMix;\r\n };\r\n PathConstraintMixTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.rotateMix = constraint.data.rotateMix;\r\n constraint.translateMix = constraint.data.translateMix;\r\n return;\r\n case MixBlend.first:\r\n constraint.rotateMix += (constraint.data.rotateMix - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (constraint.data.translateMix - constraint.translateMix) * alpha;\r\n }\r\n return;\r\n }\r\n var rotate = 0, translate = 0;\r\n if (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) {\r\n rotate = frames[frames.length + PathConstraintMixTimeline.PREV_ROTATE];\r\n translate = frames[frames.length + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES);\r\n rotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE];\r\n translate = frames[frame + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintMixTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintMixTimeline.PREV_TIME] - frameTime));\r\n rotate += (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent;\r\n translate += (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent;\r\n }\r\n if (blend == MixBlend.setup) {\r\n constraint.rotateMix = constraint.data.rotateMix + (rotate - constraint.data.rotateMix) * alpha;\r\n constraint.translateMix = constraint.data.translateMix + (translate - constraint.data.translateMix) * alpha;\r\n }\r\n else {\r\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n }\r\n };\r\n PathConstraintMixTimeline.ENTRIES = 3;\r\n PathConstraintMixTimeline.PREV_TIME = -3;\r\n PathConstraintMixTimeline.PREV_ROTATE = -2;\r\n PathConstraintMixTimeline.PREV_TRANSLATE = -1;\r\n PathConstraintMixTimeline.ROTATE = 1;\r\n PathConstraintMixTimeline.TRANSLATE = 2;\r\n return PathConstraintMixTimeline;\r\n }(CurveTimeline));\r\n spine.PathConstraintMixTimeline = PathConstraintMixTimeline;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AnimationState = (function () {\r\n function AnimationState(data) {\r\n this.tracks = new Array();\r\n this.timeScale = 1;\r\n this.events = new Array();\r\n this.listeners = new Array();\r\n this.queue = new EventQueue(this);\r\n this.propertyIDs = new spine.IntSet();\r\n this.animationsChanged = false;\r\n this.trackEntryPool = new spine.Pool(function () { return new TrackEntry(); });\r\n this.data = data;\r\n }\r\n AnimationState.prototype.update = function (delta) {\r\n delta *= this.timeScale;\r\n var tracks = this.tracks;\r\n for (var i = 0, n = tracks.length; i < n; i++) {\r\n var current = tracks[i];\r\n if (current == null)\r\n continue;\r\n current.animationLast = current.nextAnimationLast;\r\n current.trackLast = current.nextTrackLast;\r\n var currentDelta = delta * current.timeScale;\r\n if (current.delay > 0) {\r\n current.delay -= currentDelta;\r\n if (current.delay > 0)\r\n continue;\r\n currentDelta = -current.delay;\r\n current.delay = 0;\r\n }\r\n var next = current.next;\r\n if (next != null) {\r\n var nextTime = current.trackLast - next.delay;\r\n if (nextTime >= 0) {\r\n next.delay = 0;\r\n next.trackTime += current.timeScale == 0 ? 0 : (nextTime / current.timeScale + delta) * next.timeScale;\r\n current.trackTime += currentDelta;\r\n this.setCurrent(i, next, true);\r\n while (next.mixingFrom != null) {\r\n next.mixTime += delta;\r\n next = next.mixingFrom;\r\n }\r\n continue;\r\n }\r\n }\r\n else if (current.trackLast >= current.trackEnd && current.mixingFrom == null) {\r\n tracks[i] = null;\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n continue;\r\n }\r\n if (current.mixingFrom != null && this.updateMixingFrom(current, delta)) {\r\n var from = current.mixingFrom;\r\n current.mixingFrom = null;\r\n if (from != null)\r\n from.mixingTo = null;\r\n while (from != null) {\r\n this.queue.end(from);\r\n from = from.mixingFrom;\r\n }\r\n }\r\n current.trackTime += currentDelta;\r\n }\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.updateMixingFrom = function (to, delta) {\r\n var from = to.mixingFrom;\r\n if (from == null)\r\n return true;\r\n var finished = this.updateMixingFrom(from, delta);\r\n from.animationLast = from.nextAnimationLast;\r\n from.trackLast = from.nextTrackLast;\r\n if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {\r\n if (from.totalAlpha == 0 || to.mixDuration == 0) {\r\n to.mixingFrom = from.mixingFrom;\r\n if (from.mixingFrom != null)\r\n from.mixingFrom.mixingTo = to;\r\n to.interruptAlpha = from.interruptAlpha;\r\n this.queue.end(from);\r\n }\r\n return finished;\r\n }\r\n from.trackTime += delta * from.timeScale;\r\n to.mixTime += delta;\r\n return false;\r\n };\r\n AnimationState.prototype.apply = function (skeleton) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n if (this.animationsChanged)\r\n this._animationsChanged();\r\n var events = this.events;\r\n var tracks = this.tracks;\r\n var applied = false;\r\n for (var i = 0, n = tracks.length; i < n; i++) {\r\n var current = tracks[i];\r\n if (current == null || current.delay > 0)\r\n continue;\r\n applied = true;\r\n var blend = i == 0 ? spine.MixBlend.first : current.mixBlend;\r\n var mix = current.alpha;\r\n if (current.mixingFrom != null)\r\n mix *= this.applyMixingFrom(current, skeleton, blend);\r\n else if (current.trackTime >= current.trackEnd && current.next == null)\r\n mix = 0;\r\n var animationLast = current.animationLast, animationTime = current.getAnimationTime();\r\n var timelineCount = current.animation.timelines.length;\r\n var timelines = current.animation.timelines;\r\n if ((i == 0 && mix == 1) || blend == spine.MixBlend.add) {\r\n for (var ii = 0; ii < timelineCount; ii++) {\r\n spine.Utils.webkit602BugfixHelper(mix, blend);\r\n timelines[ii].apply(skeleton, animationLast, animationTime, events, mix, blend, spine.MixDirection.mixIn);\r\n }\r\n }\r\n else {\r\n var timelineMode = current.timelineMode;\r\n var firstFrame = current.timelinesRotation.length == 0;\r\n if (firstFrame)\r\n spine.Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null);\r\n var timelinesRotation = current.timelinesRotation;\r\n for (var ii = 0; ii < timelineCount; ii++) {\r\n var timeline = timelines[ii];\r\n var timelineBlend = (timelineMode[ii] & (AnimationState.NOT_LAST - 1)) == AnimationState.SUBSEQUENT ? blend : spine.MixBlend.setup;\r\n if (timeline instanceof spine.RotateTimeline) {\r\n this.applyRotateTimeline(timeline, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame);\r\n }\r\n else {\r\n spine.Utils.webkit602BugfixHelper(mix, blend);\r\n timeline.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, spine.MixDirection.mixIn);\r\n }\r\n }\r\n }\r\n this.queueEvents(current, animationTime);\r\n events.length = 0;\r\n current.nextAnimationLast = animationTime;\r\n current.nextTrackLast = current.trackTime;\r\n }\r\n this.queue.drain();\r\n return applied;\r\n };\r\n AnimationState.prototype.applyMixingFrom = function (to, skeleton, blend) {\r\n var from = to.mixingFrom;\r\n if (from.mixingFrom != null)\r\n this.applyMixingFrom(from, skeleton, blend);\r\n var mix = 0;\r\n if (to.mixDuration == 0) {\r\n mix = 1;\r\n if (blend == spine.MixBlend.first)\r\n blend = spine.MixBlend.setup;\r\n }\r\n else {\r\n mix = to.mixTime / to.mixDuration;\r\n if (mix > 1)\r\n mix = 1;\r\n if (blend != spine.MixBlend.first)\r\n blend = from.mixBlend;\r\n }\r\n var events = mix < from.eventThreshold ? this.events : null;\r\n var attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\r\n var animationLast = from.animationLast, animationTime = from.getAnimationTime();\r\n var timelineCount = from.animation.timelines.length;\r\n var timelines = from.animation.timelines;\r\n var alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\r\n if (blend == spine.MixBlend.add) {\r\n for (var i = 0; i < timelineCount; i++)\r\n timelines[i].apply(skeleton, animationLast, animationTime, events, alphaMix, blend, spine.MixDirection.mixOut);\r\n }\r\n else {\r\n var timelineMode = from.timelineMode;\r\n var timelineHoldMix = from.timelineHoldMix;\r\n var firstFrame = from.timelinesRotation.length == 0;\r\n if (firstFrame)\r\n spine.Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null);\r\n var timelinesRotation = from.timelinesRotation;\r\n from.totalAlpha = 0;\r\n for (var i = 0; i < timelineCount; i++) {\r\n var timeline = timelines[i];\r\n var direction = spine.MixDirection.mixOut;\r\n var timelineBlend = void 0;\r\n var alpha = 0;\r\n switch (timelineMode[i] & (AnimationState.NOT_LAST - 1)) {\r\n case AnimationState.SUBSEQUENT:\r\n timelineBlend = blend;\r\n if (!attachments && timeline instanceof spine.AttachmentTimeline) {\r\n if ((timelineMode[i] & AnimationState.NOT_LAST) == AnimationState.NOT_LAST)\r\n continue;\r\n timelineBlend = spine.MixBlend.setup;\r\n }\r\n if (!drawOrder && timeline instanceof spine.DrawOrderTimeline)\r\n continue;\r\n alpha = alphaMix;\r\n break;\r\n case AnimationState.FIRST:\r\n timelineBlend = spine.MixBlend.setup;\r\n alpha = alphaMix;\r\n break;\r\n case AnimationState.HOLD:\r\n timelineBlend = spine.MixBlend.setup;\r\n alpha = alphaHold;\r\n break;\r\n default:\r\n timelineBlend = spine.MixBlend.setup;\r\n var holdMix = timelineHoldMix[i];\r\n alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\r\n break;\r\n }\r\n from.totalAlpha += alpha;\r\n if (timeline instanceof spine.RotateTimeline)\r\n this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame);\r\n else {\r\n spine.Utils.webkit602BugfixHelper(alpha, blend);\r\n if (timelineBlend == spine.MixBlend.setup) {\r\n if (timeline instanceof spine.AttachmentTimeline) {\r\n if (attachments || (timelineMode[i] & AnimationState.NOT_LAST) == AnimationState.NOT_LAST)\r\n direction = spine.MixDirection.mixIn;\r\n }\r\n else if (timeline instanceof spine.DrawOrderTimeline) {\r\n if (drawOrder)\r\n direction = spine.MixDirection.mixIn;\r\n }\r\n }\r\n timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, direction);\r\n }\r\n }\r\n }\r\n if (to.mixDuration > 0)\r\n this.queueEvents(from, animationTime);\r\n this.events.length = 0;\r\n from.nextAnimationLast = animationTime;\r\n from.nextTrackLast = from.trackTime;\r\n return mix;\r\n };\r\n AnimationState.prototype.applyRotateTimeline = function (timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) {\r\n if (firstFrame)\r\n timelinesRotation[i] = 0;\r\n if (alpha == 1) {\r\n timeline.apply(skeleton, 0, time, null, 1, blend, spine.MixDirection.mixIn);\r\n return;\r\n }\r\n var rotateTimeline = timeline;\r\n var frames = rotateTimeline.frames;\r\n var bone = skeleton.bones[rotateTimeline.boneIndex];\r\n if (!bone.active)\r\n return;\r\n var r1 = 0, r2 = 0;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case spine.MixBlend.setup:\r\n bone.rotation = bone.data.rotation;\r\n default:\r\n return;\r\n case spine.MixBlend.first:\r\n r1 = bone.rotation;\r\n r2 = bone.data.rotation;\r\n }\r\n }\r\n else {\r\n r1 = blend == spine.MixBlend.setup ? bone.data.rotation : bone.rotation;\r\n if (time >= frames[frames.length - spine.RotateTimeline.ENTRIES])\r\n r2 = bone.data.rotation + frames[frames.length + spine.RotateTimeline.PREV_ROTATION];\r\n else {\r\n var frame = spine.Animation.binarySearch(frames, time, spine.RotateTimeline.ENTRIES);\r\n var prevRotation = frames[frame + spine.RotateTimeline.PREV_ROTATION];\r\n var frameTime = frames[frame];\r\n var percent = rotateTimeline.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + spine.RotateTimeline.PREV_TIME] - frameTime));\r\n r2 = frames[frame + spine.RotateTimeline.ROTATION] - prevRotation;\r\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n r2 = prevRotation + r2 * percent + bone.data.rotation;\r\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n }\r\n }\r\n var total = 0, diff = r2 - r1;\r\n diff -= (16384 - ((16384.499999999996 - diff / 360) | 0)) * 360;\r\n if (diff == 0) {\r\n total = timelinesRotation[i];\r\n }\r\n else {\r\n var lastTotal = 0, lastDiff = 0;\r\n if (firstFrame) {\r\n lastTotal = 0;\r\n lastDiff = diff;\r\n }\r\n else {\r\n lastTotal = timelinesRotation[i];\r\n lastDiff = timelinesRotation[i + 1];\r\n }\r\n var current = diff > 0, dir = lastTotal >= 0;\r\n if (spine.MathUtils.signum(lastDiff) != spine.MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\r\n if (Math.abs(lastTotal) > 180)\r\n lastTotal += 360 * spine.MathUtils.signum(lastTotal);\r\n dir = current;\r\n }\r\n total = diff + lastTotal - lastTotal % 360;\r\n if (dir != current)\r\n total += 360 * spine.MathUtils.signum(lastTotal);\r\n timelinesRotation[i] = total;\r\n }\r\n timelinesRotation[i + 1] = diff;\r\n r1 += total * alpha;\r\n bone.rotation = r1 - (16384 - ((16384.499999999996 - r1 / 360) | 0)) * 360;\r\n };\r\n AnimationState.prototype.queueEvents = function (entry, animationTime) {\r\n var animationStart = entry.animationStart, animationEnd = entry.animationEnd;\r\n var duration = animationEnd - animationStart;\r\n var trackLastWrapped = entry.trackLast % duration;\r\n var events = this.events;\r\n var i = 0, n = events.length;\r\n for (; i < n; i++) {\r\n var event_1 = events[i];\r\n if (event_1.time < trackLastWrapped)\r\n break;\r\n if (event_1.time > animationEnd)\r\n continue;\r\n this.queue.event(entry, event_1);\r\n }\r\n var complete = false;\r\n if (entry.loop)\r\n complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;\r\n else\r\n complete = animationTime >= animationEnd && entry.animationLast < animationEnd;\r\n if (complete)\r\n this.queue.complete(entry);\r\n for (; i < n; i++) {\r\n var event_2 = events[i];\r\n if (event_2.time < animationStart)\r\n continue;\r\n this.queue.event(entry, events[i]);\r\n }\r\n };\r\n AnimationState.prototype.clearTracks = function () {\r\n var oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (var i = 0, n = this.tracks.length; i < n; i++)\r\n this.clearTrack(i);\r\n this.tracks.length = 0;\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.clearTrack = function (trackIndex) {\r\n if (trackIndex >= this.tracks.length)\r\n return;\r\n var current = this.tracks[trackIndex];\r\n if (current == null)\r\n return;\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n var entry = current;\r\n while (true) {\r\n var from = entry.mixingFrom;\r\n if (from == null)\r\n break;\r\n this.queue.end(from);\r\n entry.mixingFrom = null;\r\n entry.mixingTo = null;\r\n entry = from;\r\n }\r\n this.tracks[current.trackIndex] = null;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.setCurrent = function (index, current, interrupt) {\r\n var from = this.expandToIndex(index);\r\n this.tracks[index] = current;\r\n if (from != null) {\r\n if (interrupt)\r\n this.queue.interrupt(from);\r\n current.mixingFrom = from;\r\n from.mixingTo = current;\r\n current.mixTime = 0;\r\n if (from.mixingFrom != null && from.mixDuration > 0)\r\n current.interruptAlpha *= Math.min(1, from.mixTime / from.mixDuration);\r\n from.timelinesRotation.length = 0;\r\n }\r\n this.queue.start(current);\r\n };\r\n AnimationState.prototype.setAnimation = function (trackIndex, animationName, loop) {\r\n var animation = this.data.skeletonData.findAnimation(animationName);\r\n if (animation == null)\r\n throw new Error(\"Animation not found: \" + animationName);\r\n return this.setAnimationWith(trackIndex, animation, loop);\r\n };\r\n AnimationState.prototype.setAnimationWith = function (trackIndex, animation, loop) {\r\n if (animation == null)\r\n throw new Error(\"animation cannot be null.\");\r\n var interrupt = true;\r\n var current = this.expandToIndex(trackIndex);\r\n if (current != null) {\r\n if (current.nextTrackLast == -1) {\r\n this.tracks[trackIndex] = current.mixingFrom;\r\n this.queue.interrupt(current);\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n current = current.mixingFrom;\r\n interrupt = false;\r\n }\r\n else\r\n this.disposeNext(current);\r\n }\r\n var entry = this.trackEntry(trackIndex, animation, loop, current);\r\n this.setCurrent(trackIndex, entry, interrupt);\r\n this.queue.drain();\r\n return entry;\r\n };\r\n AnimationState.prototype.addAnimation = function (trackIndex, animationName, loop, delay) {\r\n var animation = this.data.skeletonData.findAnimation(animationName);\r\n if (animation == null)\r\n throw new Error(\"Animation not found: \" + animationName);\r\n return this.addAnimationWith(trackIndex, animation, loop, delay);\r\n };\r\n AnimationState.prototype.addAnimationWith = function (trackIndex, animation, loop, delay) {\r\n if (animation == null)\r\n throw new Error(\"animation cannot be null.\");\r\n var last = this.expandToIndex(trackIndex);\r\n if (last != null) {\r\n while (last.next != null)\r\n last = last.next;\r\n }\r\n var entry = this.trackEntry(trackIndex, animation, loop, last);\r\n if (last == null) {\r\n this.setCurrent(trackIndex, entry, true);\r\n this.queue.drain();\r\n }\r\n else {\r\n last.next = entry;\r\n if (delay <= 0) {\r\n var duration = last.animationEnd - last.animationStart;\r\n if (duration != 0) {\r\n if (last.loop)\r\n delay += duration * (1 + ((last.trackTime / duration) | 0));\r\n else\r\n delay += Math.max(duration, last.trackTime);\r\n delay -= this.data.getMix(last.animation, animation);\r\n }\r\n else\r\n delay = last.trackTime;\r\n }\r\n }\r\n entry.delay = delay;\r\n return entry;\r\n };\r\n AnimationState.prototype.setEmptyAnimation = function (trackIndex, mixDuration) {\r\n var entry = this.setAnimationWith(trackIndex, AnimationState.emptyAnimation, false);\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n };\r\n AnimationState.prototype.addEmptyAnimation = function (trackIndex, mixDuration, delay) {\r\n if (delay <= 0)\r\n delay -= mixDuration;\r\n var entry = this.addAnimationWith(trackIndex, AnimationState.emptyAnimation, false, delay);\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n };\r\n AnimationState.prototype.setEmptyAnimations = function (mixDuration) {\r\n var oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (var i = 0, n = this.tracks.length; i < n; i++) {\r\n var current = this.tracks[i];\r\n if (current != null)\r\n this.setEmptyAnimation(current.trackIndex, mixDuration);\r\n }\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.expandToIndex = function (index) {\r\n if (index < this.tracks.length)\r\n return this.tracks[index];\r\n spine.Utils.ensureArrayCapacity(this.tracks, index + 1, null);\r\n this.tracks.length = index + 1;\r\n return null;\r\n };\r\n AnimationState.prototype.trackEntry = function (trackIndex, animation, loop, last) {\r\n var entry = this.trackEntryPool.obtain();\r\n entry.trackIndex = trackIndex;\r\n entry.animation = animation;\r\n entry.loop = loop;\r\n entry.holdPrevious = false;\r\n entry.eventThreshold = 0;\r\n entry.attachmentThreshold = 0;\r\n entry.drawOrderThreshold = 0;\r\n entry.animationStart = 0;\r\n entry.animationEnd = animation.duration;\r\n entry.animationLast = -1;\r\n entry.nextAnimationLast = -1;\r\n entry.delay = 0;\r\n entry.trackTime = 0;\r\n entry.trackLast = -1;\r\n entry.nextTrackLast = -1;\r\n entry.trackEnd = Number.MAX_VALUE;\r\n entry.timeScale = 1;\r\n entry.alpha = 1;\r\n entry.interruptAlpha = 1;\r\n entry.mixTime = 0;\r\n entry.mixDuration = last == null ? 0 : this.data.getMix(last.animation, animation);\r\n return entry;\r\n };\r\n AnimationState.prototype.disposeNext = function (entry) {\r\n var next = entry.next;\r\n while (next != null) {\r\n this.queue.dispose(next);\r\n next = next.next;\r\n }\r\n entry.next = null;\r\n };\r\n AnimationState.prototype._animationsChanged = function () {\r\n this.animationsChanged = false;\r\n this.propertyIDs.clear();\r\n for (var i = 0, n = this.tracks.length; i < n; i++) {\r\n var entry = this.tracks[i];\r\n if (entry == null)\r\n continue;\r\n while (entry.mixingFrom != null)\r\n entry = entry.mixingFrom;\r\n do {\r\n if (entry.mixingFrom == null || entry.mixBlend != spine.MixBlend.add)\r\n this.computeHold(entry);\r\n entry = entry.mixingTo;\r\n } while (entry != null);\r\n }\r\n this.propertyIDs.clear();\r\n for (var i = this.tracks.length - 1; i >= 0; i--) {\r\n var entry = this.tracks[i];\r\n while (entry != null) {\r\n this.computeNotLast(entry);\r\n entry = entry.mixingFrom;\r\n }\r\n }\r\n };\r\n AnimationState.prototype.computeHold = function (entry) {\r\n var to = entry.mixingTo;\r\n var timelines = entry.animation.timelines;\r\n var timelinesCount = entry.animation.timelines.length;\r\n var timelineMode = spine.Utils.setArraySize(entry.timelineMode, timelinesCount);\r\n entry.timelineHoldMix.length = 0;\r\n var timelineDipMix = spine.Utils.setArraySize(entry.timelineHoldMix, timelinesCount);\r\n var propertyIDs = this.propertyIDs;\r\n if (to != null && to.holdPrevious) {\r\n for (var i = 0; i < timelinesCount; i++) {\r\n propertyIDs.add(timelines[i].getPropertyId());\r\n timelineMode[i] = AnimationState.HOLD;\r\n }\r\n return;\r\n }\r\n outer: for (var i = 0; i < timelinesCount; i++) {\r\n var timeline = timelines[i];\r\n var id = timeline.getPropertyId();\r\n if (!propertyIDs.add(id))\r\n timelineMode[i] = AnimationState.SUBSEQUENT;\r\n else if (to == null || timeline instanceof spine.AttachmentTimeline || timeline instanceof spine.DrawOrderTimeline\r\n || timeline instanceof spine.EventTimeline || !to.animation.hasTimeline(id)) {\r\n timelineMode[i] = AnimationState.FIRST;\r\n }\r\n else {\r\n for (var next = to.mixingTo; next != null; next = next.mixingTo) {\r\n if (next.animation.hasTimeline(id))\r\n continue;\r\n if (entry.mixDuration > 0) {\r\n timelineMode[i] = AnimationState.HOLD_MIX;\r\n timelineDipMix[i] = next;\r\n continue outer;\r\n }\r\n break;\r\n }\r\n timelineMode[i] = AnimationState.HOLD;\r\n }\r\n }\r\n };\r\n AnimationState.prototype.computeNotLast = function (entry) {\r\n var timelines = entry.animation.timelines;\r\n var timelinesCount = entry.animation.timelines.length;\r\n var timelineMode = entry.timelineMode;\r\n var propertyIDs = this.propertyIDs;\r\n for (var i = 0; i < timelinesCount; i++) {\r\n if (timelines[i] instanceof spine.AttachmentTimeline) {\r\n var timeline = timelines[i];\r\n if (!propertyIDs.add(timeline.slotIndex))\r\n timelineMode[i] |= AnimationState.NOT_LAST;\r\n }\r\n }\r\n };\r\n AnimationState.prototype.getCurrent = function (trackIndex) {\r\n if (trackIndex >= this.tracks.length)\r\n return null;\r\n return this.tracks[trackIndex];\r\n };\r\n AnimationState.prototype.addListener = function (listener) {\r\n if (listener == null)\r\n throw new Error(\"listener cannot be null.\");\r\n this.listeners.push(listener);\r\n };\r\n AnimationState.prototype.removeListener = function (listener) {\r\n var index = this.listeners.indexOf(listener);\r\n if (index >= 0)\r\n this.listeners.splice(index, 1);\r\n };\r\n AnimationState.prototype.clearListeners = function () {\r\n this.listeners.length = 0;\r\n };\r\n AnimationState.prototype.clearListenerNotifications = function () {\r\n this.queue.clear();\r\n };\r\n AnimationState.emptyAnimation = new spine.Animation(\"\", [], 0);\r\n AnimationState.SUBSEQUENT = 0;\r\n AnimationState.FIRST = 1;\r\n AnimationState.HOLD = 2;\r\n AnimationState.HOLD_MIX = 3;\r\n AnimationState.NOT_LAST = 4;\r\n return AnimationState;\r\n }());\r\n spine.AnimationState = AnimationState;\r\n var TrackEntry = (function () {\r\n function TrackEntry() {\r\n this.mixBlend = spine.MixBlend.replace;\r\n this.timelineMode = new Array();\r\n this.timelineHoldMix = new Array();\r\n this.timelinesRotation = new Array();\r\n }\r\n TrackEntry.prototype.reset = function () {\r\n this.next = null;\r\n this.mixingFrom = null;\r\n this.mixingTo = null;\r\n this.animation = null;\r\n this.listener = null;\r\n this.timelineMode.length = 0;\r\n this.timelineHoldMix.length = 0;\r\n this.timelinesRotation.length = 0;\r\n };\r\n TrackEntry.prototype.getAnimationTime = function () {\r\n if (this.loop) {\r\n var duration = this.animationEnd - this.animationStart;\r\n if (duration == 0)\r\n return this.animationStart;\r\n return (this.trackTime % duration) + this.animationStart;\r\n }\r\n return Math.min(this.trackTime + this.animationStart, this.animationEnd);\r\n };\r\n TrackEntry.prototype.setAnimationLast = function (animationLast) {\r\n this.animationLast = animationLast;\r\n this.nextAnimationLast = animationLast;\r\n };\r\n TrackEntry.prototype.isComplete = function () {\r\n return this.trackTime >= this.animationEnd - this.animationStart;\r\n };\r\n TrackEntry.prototype.resetRotationDirections = function () {\r\n this.timelinesRotation.length = 0;\r\n };\r\n return TrackEntry;\r\n }());\r\n spine.TrackEntry = TrackEntry;\r\n var EventQueue = (function () {\r\n function EventQueue(animState) {\r\n this.objects = [];\r\n this.drainDisabled = false;\r\n this.animState = animState;\r\n }\r\n EventQueue.prototype.start = function (entry) {\r\n this.objects.push(EventType.start);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n };\r\n EventQueue.prototype.interrupt = function (entry) {\r\n this.objects.push(EventType.interrupt);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.end = function (entry) {\r\n this.objects.push(EventType.end);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n };\r\n EventQueue.prototype.dispose = function (entry) {\r\n this.objects.push(EventType.dispose);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.complete = function (entry) {\r\n this.objects.push(EventType.complete);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.event = function (entry, event) {\r\n this.objects.push(EventType.event);\r\n this.objects.push(entry);\r\n this.objects.push(event);\r\n };\r\n EventQueue.prototype.drain = function () {\r\n if (this.drainDisabled)\r\n return;\r\n this.drainDisabled = true;\r\n var objects = this.objects;\r\n var listeners = this.animState.listeners;\r\n for (var i = 0; i < objects.length; i += 2) {\r\n var type = objects[i];\r\n var entry = objects[i + 1];\r\n switch (type) {\r\n case EventType.start:\r\n if (entry.listener != null && entry.listener.start)\r\n entry.listener.start(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].start)\r\n listeners[ii].start(entry);\r\n break;\r\n case EventType.interrupt:\r\n if (entry.listener != null && entry.listener.interrupt)\r\n entry.listener.interrupt(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].interrupt)\r\n listeners[ii].interrupt(entry);\r\n break;\r\n case EventType.end:\r\n if (entry.listener != null && entry.listener.end)\r\n entry.listener.end(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].end)\r\n listeners[ii].end(entry);\r\n case EventType.dispose:\r\n if (entry.listener != null && entry.listener.dispose)\r\n entry.listener.dispose(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].dispose)\r\n listeners[ii].dispose(entry);\r\n this.animState.trackEntryPool.free(entry);\r\n break;\r\n case EventType.complete:\r\n if (entry.listener != null && entry.listener.complete)\r\n entry.listener.complete(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].complete)\r\n listeners[ii].complete(entry);\r\n break;\r\n case EventType.event:\r\n var event_3 = objects[i++ + 2];\r\n if (entry.listener != null && entry.listener.event)\r\n entry.listener.event(entry, event_3);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].event)\r\n listeners[ii].event(entry, event_3);\r\n break;\r\n }\r\n }\r\n this.clear();\r\n this.drainDisabled = false;\r\n };\r\n EventQueue.prototype.clear = function () {\r\n this.objects.length = 0;\r\n };\r\n return EventQueue;\r\n }());\r\n spine.EventQueue = EventQueue;\r\n var EventType;\r\n (function (EventType) {\r\n EventType[EventType[\"start\"] = 0] = \"start\";\r\n EventType[EventType[\"interrupt\"] = 1] = \"interrupt\";\r\n EventType[EventType[\"end\"] = 2] = \"end\";\r\n EventType[EventType[\"dispose\"] = 3] = \"dispose\";\r\n EventType[EventType[\"complete\"] = 4] = \"complete\";\r\n EventType[EventType[\"event\"] = 5] = \"event\";\r\n })(EventType = spine.EventType || (spine.EventType = {}));\r\n var AnimationStateAdapter = (function () {\r\n function AnimationStateAdapter() {\r\n }\r\n AnimationStateAdapter.prototype.start = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.interrupt = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.end = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.dispose = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.complete = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.event = function (entry, event) {\r\n };\r\n return AnimationStateAdapter;\r\n }());\r\n spine.AnimationStateAdapter = AnimationStateAdapter;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AnimationStateData = (function () {\r\n function AnimationStateData(skeletonData) {\r\n this.animationToMixTime = {};\r\n this.defaultMix = 0;\r\n if (skeletonData == null)\r\n throw new Error(\"skeletonData cannot be null.\");\r\n this.skeletonData = skeletonData;\r\n }\r\n AnimationStateData.prototype.setMix = function (fromName, toName, duration) {\r\n var from = this.skeletonData.findAnimation(fromName);\r\n if (from == null)\r\n throw new Error(\"Animation not found: \" + fromName);\r\n var to = this.skeletonData.findAnimation(toName);\r\n if (to == null)\r\n throw new Error(\"Animation not found: \" + toName);\r\n this.setMixWith(from, to, duration);\r\n };\r\n AnimationStateData.prototype.setMixWith = function (from, to, duration) {\r\n if (from == null)\r\n throw new Error(\"from cannot be null.\");\r\n if (to == null)\r\n throw new Error(\"to cannot be null.\");\r\n var key = from.name + \".\" + to.name;\r\n this.animationToMixTime[key] = duration;\r\n };\r\n AnimationStateData.prototype.getMix = function (from, to) {\r\n var key = from.name + \".\" + to.name;\r\n var value = this.animationToMixTime[key];\r\n return value === undefined ? this.defaultMix : value;\r\n };\r\n return AnimationStateData;\r\n }());\r\n spine.AnimationStateData = AnimationStateData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AssetManager = (function () {\r\n function AssetManager(textureLoader, pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n this.assets = {};\r\n this.errors = {};\r\n this.toLoad = 0;\r\n this.loaded = 0;\r\n this.textureLoader = textureLoader;\r\n this.pathPrefix = pathPrefix;\r\n }\r\n AssetManager.downloadText = function (url, success, error) {\r\n var request = new XMLHttpRequest();\r\n request.open(\"GET\", url, true);\r\n request.onload = function () {\r\n if (request.status == 200) {\r\n success(request.responseText);\r\n }\r\n else {\r\n error(request.status, request.responseText);\r\n }\r\n };\r\n request.onerror = function () {\r\n error(request.status, request.responseText);\r\n };\r\n request.send();\r\n };\r\n AssetManager.downloadBinary = function (url, success, error) {\r\n var request = new XMLHttpRequest();\r\n request.open(\"GET\", url, true);\r\n request.responseType = \"arraybuffer\";\r\n request.onload = function () {\r\n if (request.status == 200) {\r\n success(new Uint8Array(request.response));\r\n }\r\n else {\r\n error(request.status, request.responseText);\r\n }\r\n };\r\n request.onerror = function () {\r\n error(request.status, request.responseText);\r\n };\r\n request.send();\r\n };\r\n AssetManager.prototype.loadBinary = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n AssetManager.downloadBinary(path, function (data) {\r\n _this.assets[path] = data;\r\n if (success)\r\n success(path, data);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load binary \" + path + \": status \" + status + \", \" + responseText;\r\n if (error)\r\n error(path, \"Couldn't load binary \" + path + \": status \" + status + \", \" + responseText);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.loadText = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n AssetManager.downloadText(path, function (data) {\r\n _this.assets[path] = data;\r\n if (success)\r\n success(path, data);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load text \" + path + \": status \" + status + \", \" + responseText;\r\n if (error)\r\n error(path, \"Couldn't load text \" + path + \": status \" + status + \", \" + responseText);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.loadTexture = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n var img = new Image();\r\n img.crossOrigin = \"anonymous\";\r\n img.onload = function (ev) {\r\n var texture = _this.textureLoader(img);\r\n _this.assets[path] = texture;\r\n _this.toLoad--;\r\n _this.loaded++;\r\n if (success)\r\n success(path, img);\r\n };\r\n img.onerror = function (ev) {\r\n _this.errors[path] = \"Couldn't load image \" + path;\r\n _this.toLoad--;\r\n _this.loaded++;\r\n if (error)\r\n error(path, \"Couldn't load image \" + path);\r\n };\r\n img.src = path;\r\n };\r\n AssetManager.prototype.loadTextureData = function (path, data, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n var img = new Image();\r\n img.onload = function (ev) {\r\n var texture = _this.textureLoader(img);\r\n _this.assets[path] = texture;\r\n _this.toLoad--;\r\n _this.loaded++;\r\n if (success)\r\n success(path, img);\r\n };\r\n img.onerror = function (ev) {\r\n _this.errors[path] = \"Couldn't load image \" + path;\r\n _this.toLoad--;\r\n _this.loaded++;\r\n if (error)\r\n error(path, \"Couldn't load image \" + path);\r\n };\r\n img.src = data;\r\n };\r\n AssetManager.prototype.loadTextureAtlas = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n var parent = path.lastIndexOf(\"/\") >= 0 ? path.substring(0, path.lastIndexOf(\"/\")) : \"\";\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n AssetManager.downloadText(path, function (atlasData) {\r\n var pagesLoaded = { count: 0 };\r\n var atlasPages = new Array();\r\n try {\r\n var atlas = new spine.TextureAtlas(atlasData, function (path) {\r\n atlasPages.push(parent + \"/\" + path);\r\n var image = document.createElement(\"img\");\r\n image.width = 16;\r\n image.height = 16;\r\n return new spine.FakeTexture(image);\r\n });\r\n }\r\n catch (e) {\r\n var ex = e;\r\n _this.errors[path] = \"Couldn't load texture atlas \" + path + \": \" + ex.message;\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \" + path + \": \" + ex.message);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n return;\r\n }\r\n var _loop_1 = function (atlasPage) {\r\n var pageLoadError = false;\r\n _this.loadTexture(atlasPage, function (imagePath, image) {\r\n pagesLoaded.count++;\r\n if (pagesLoaded.count == atlasPages.length) {\r\n if (!pageLoadError) {\r\n try {\r\n var atlas = new spine.TextureAtlas(atlasData, function (path) {\r\n return _this.get(parent + \"/\" + path);\r\n });\r\n _this.assets[path] = atlas;\r\n if (success)\r\n success(path, atlas);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n catch (e) {\r\n var ex = e;\r\n _this.errors[path] = \"Couldn't load texture atlas \" + path + \": \" + ex.message;\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \" + path + \": \" + ex.message);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load texture atlas page \" + imagePath + \"} of atlas \" + path;\r\n if (error)\r\n error(path, \"Couldn't load texture atlas page \" + imagePath + \" of atlas \" + path);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n }\r\n }, function (imagePath, errorMessage) {\r\n pageLoadError = true;\r\n pagesLoaded.count++;\r\n if (pagesLoaded.count == atlasPages.length) {\r\n _this.errors[path] = \"Couldn't load texture atlas page \" + imagePath + \"} of atlas \" + path;\r\n if (error)\r\n error(path, \"Couldn't load texture atlas page \" + imagePath + \" of atlas \" + path);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n });\r\n };\r\n for (var _i = 0, atlasPages_1 = atlasPages; _i < atlasPages_1.length; _i++) {\r\n var atlasPage = atlasPages_1[_i];\r\n _loop_1(atlasPage);\r\n }\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load texture atlas \" + path + \": status \" + status + \", \" + responseText;\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \" + path + \": status \" + status + \", \" + responseText);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.get = function (path) {\r\n path = this.pathPrefix + path;\r\n return this.assets[path];\r\n };\r\n AssetManager.prototype.remove = function (path) {\r\n path = this.pathPrefix + path;\r\n var asset = this.assets[path];\r\n if (asset.dispose)\r\n asset.dispose();\r\n this.assets[path] = null;\r\n };\r\n AssetManager.prototype.removeAll = function () {\r\n for (var key in this.assets) {\r\n var asset = this.assets[key];\r\n if (asset.dispose)\r\n asset.dispose();\r\n }\r\n this.assets = {};\r\n };\r\n AssetManager.prototype.isLoadingComplete = function () {\r\n return this.toLoad == 0;\r\n };\r\n AssetManager.prototype.getToLoad = function () {\r\n return this.toLoad;\r\n };\r\n AssetManager.prototype.getLoaded = function () {\r\n return this.loaded;\r\n };\r\n AssetManager.prototype.dispose = function () {\r\n this.removeAll();\r\n };\r\n AssetManager.prototype.hasErrors = function () {\r\n return Object.keys(this.errors).length > 0;\r\n };\r\n AssetManager.prototype.getErrors = function () {\r\n return this.errors;\r\n };\r\n return AssetManager;\r\n }());\r\n spine.AssetManager = AssetManager;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AtlasAttachmentLoader = (function () {\r\n function AtlasAttachmentLoader(atlas) {\r\n this.atlas = atlas;\r\n }\r\n AtlasAttachmentLoader.prototype.newRegionAttachment = function (skin, name, path) {\r\n var region = this.atlas.findRegion(path);\r\n if (region == null)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\r\n region.renderObject = region;\r\n var attachment = new spine.RegionAttachment(name);\r\n attachment.setRegion(region);\r\n return attachment;\r\n };\r\n AtlasAttachmentLoader.prototype.newMeshAttachment = function (skin, name, path) {\r\n var region = this.atlas.findRegion(path);\r\n if (region == null)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\r\n region.renderObject = region;\r\n var attachment = new spine.MeshAttachment(name);\r\n attachment.region = region;\r\n return attachment;\r\n };\r\n AtlasAttachmentLoader.prototype.newBoundingBoxAttachment = function (skin, name) {\r\n return new spine.BoundingBoxAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newPathAttachment = function (skin, name) {\r\n return new spine.PathAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newPointAttachment = function (skin, name) {\r\n return new spine.PointAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newClippingAttachment = function (skin, name) {\r\n return new spine.ClippingAttachment(name);\r\n };\r\n return AtlasAttachmentLoader;\r\n }());\r\n spine.AtlasAttachmentLoader = AtlasAttachmentLoader;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BlendMode;\r\n (function (BlendMode) {\r\n BlendMode[BlendMode[\"Normal\"] = 0] = \"Normal\";\r\n BlendMode[BlendMode[\"Additive\"] = 1] = \"Additive\";\r\n BlendMode[BlendMode[\"Multiply\"] = 2] = \"Multiply\";\r\n BlendMode[BlendMode[\"Screen\"] = 3] = \"Screen\";\r\n })(BlendMode = spine.BlendMode || (spine.BlendMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Bone = (function () {\r\n function Bone(data, skeleton, parent) {\r\n this.children = new Array();\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.scaleX = 0;\r\n this.scaleY = 0;\r\n this.shearX = 0;\r\n this.shearY = 0;\r\n this.ax = 0;\r\n this.ay = 0;\r\n this.arotation = 0;\r\n this.ascaleX = 0;\r\n this.ascaleY = 0;\r\n this.ashearX = 0;\r\n this.ashearY = 0;\r\n this.appliedValid = false;\r\n this.a = 0;\r\n this.b = 0;\r\n this.c = 0;\r\n this.d = 0;\r\n this.worldY = 0;\r\n this.worldX = 0;\r\n this.sorted = false;\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.skeleton = skeleton;\r\n this.parent = parent;\r\n this.setToSetupPose();\r\n }\r\n Bone.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n Bone.prototype.update = function () {\r\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n };\r\n Bone.prototype.updateWorldTransform = function () {\r\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n };\r\n Bone.prototype.updateWorldTransformWith = function (x, y, rotation, scaleX, scaleY, shearX, shearY) {\r\n this.ax = x;\r\n this.ay = y;\r\n this.arotation = rotation;\r\n this.ascaleX = scaleX;\r\n this.ascaleY = scaleY;\r\n this.ashearX = shearX;\r\n this.ashearY = shearY;\r\n this.appliedValid = true;\r\n var parent = this.parent;\r\n if (parent == null) {\r\n var skeleton = this.skeleton;\r\n var rotationY = rotation + 90 + shearY;\r\n var sx = skeleton.scaleX;\r\n var sy = skeleton.scaleY;\r\n this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\r\n this.b = spine.MathUtils.cosDeg(rotationY) * scaleY * sx;\r\n this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\r\n this.d = spine.MathUtils.sinDeg(rotationY) * scaleY * sy;\r\n this.worldX = x * sx + skeleton.x;\r\n this.worldY = y * sy + skeleton.y;\r\n return;\r\n }\r\n var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n this.worldX = pa * x + pb * y + parent.worldX;\r\n this.worldY = pc * x + pd * y + parent.worldY;\r\n switch (this.data.transformMode) {\r\n case spine.TransformMode.Normal: {\r\n var rotationY = rotation + 90 + shearY;\r\n var la = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(rotationY) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(rotationY) * scaleY;\r\n this.a = pa * la + pb * lc;\r\n this.b = pa * lb + pb * ld;\r\n this.c = pc * la + pd * lc;\r\n this.d = pc * lb + pd * ld;\r\n return;\r\n }\r\n case spine.TransformMode.OnlyTranslation: {\r\n var rotationY = rotation + 90 + shearY;\r\n this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n this.b = spine.MathUtils.cosDeg(rotationY) * scaleY;\r\n this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n this.d = spine.MathUtils.sinDeg(rotationY) * scaleY;\r\n break;\r\n }\r\n case spine.TransformMode.NoRotationOrReflection: {\r\n var s = pa * pa + pc * pc;\r\n var prx = 0;\r\n if (s > 0.0001) {\r\n s = Math.abs(pa * pd - pb * pc) / s;\r\n pb = pc * s;\r\n pd = pa * s;\r\n prx = Math.atan2(pc, pa) * spine.MathUtils.radDeg;\r\n }\r\n else {\r\n pa = 0;\r\n pc = 0;\r\n prx = 90 - Math.atan2(pd, pb) * spine.MathUtils.radDeg;\r\n }\r\n var rx = rotation + shearX - prx;\r\n var ry = rotation + shearY - prx + 90;\r\n var la = spine.MathUtils.cosDeg(rx) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(ry) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(rx) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(ry) * scaleY;\r\n this.a = pa * la - pb * lc;\r\n this.b = pa * lb - pb * ld;\r\n this.c = pc * la + pd * lc;\r\n this.d = pc * lb + pd * ld;\r\n break;\r\n }\r\n case spine.TransformMode.NoScale:\r\n case spine.TransformMode.NoScaleOrReflection: {\r\n var cos = spine.MathUtils.cosDeg(rotation);\r\n var sin = spine.MathUtils.sinDeg(rotation);\r\n var za = (pa * cos + pb * sin) / this.skeleton.scaleX;\r\n var zc = (pc * cos + pd * sin) / this.skeleton.scaleY;\r\n var s = Math.sqrt(za * za + zc * zc);\r\n if (s > 0.00001)\r\n s = 1 / s;\r\n za *= s;\r\n zc *= s;\r\n s = Math.sqrt(za * za + zc * zc);\r\n if (this.data.transformMode == spine.TransformMode.NoScale\r\n && (pa * pd - pb * pc < 0) != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))\r\n s = -s;\r\n var r = Math.PI / 2 + Math.atan2(zc, za);\r\n var zb = Math.cos(r) * s;\r\n var zd = Math.sin(r) * s;\r\n var la = spine.MathUtils.cosDeg(shearX) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(shearX) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;\r\n this.a = za * la + zb * lc;\r\n this.b = za * lb + zb * ld;\r\n this.c = zc * la + zd * lc;\r\n this.d = zc * lb + zd * ld;\r\n break;\r\n }\r\n }\r\n this.a *= this.skeleton.scaleX;\r\n this.b *= this.skeleton.scaleX;\r\n this.c *= this.skeleton.scaleY;\r\n this.d *= this.skeleton.scaleY;\r\n };\r\n Bone.prototype.setToSetupPose = function () {\r\n var data = this.data;\r\n this.x = data.x;\r\n this.y = data.y;\r\n this.rotation = data.rotation;\r\n this.scaleX = data.scaleX;\r\n this.scaleY = data.scaleY;\r\n this.shearX = data.shearX;\r\n this.shearY = data.shearY;\r\n };\r\n Bone.prototype.getWorldRotationX = function () {\r\n return Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.getWorldRotationY = function () {\r\n return Math.atan2(this.d, this.b) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.getWorldScaleX = function () {\r\n return Math.sqrt(this.a * this.a + this.c * this.c);\r\n };\r\n Bone.prototype.getWorldScaleY = function () {\r\n return Math.sqrt(this.b * this.b + this.d * this.d);\r\n };\r\n Bone.prototype.updateAppliedTransform = function () {\r\n this.appliedValid = true;\r\n var parent = this.parent;\r\n if (parent == null) {\r\n this.ax = this.worldX;\r\n this.ay = this.worldY;\r\n this.arotation = Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\r\n this.ascaleX = Math.sqrt(this.a * this.a + this.c * this.c);\r\n this.ascaleY = Math.sqrt(this.b * this.b + this.d * this.d);\r\n this.ashearX = 0;\r\n this.ashearY = Math.atan2(this.a * this.b + this.c * this.d, this.a * this.d - this.b * this.c) * spine.MathUtils.radDeg;\r\n return;\r\n }\r\n var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n var pid = 1 / (pa * pd - pb * pc);\r\n var dx = this.worldX - parent.worldX, dy = this.worldY - parent.worldY;\r\n this.ax = (dx * pd * pid - dy * pb * pid);\r\n this.ay = (dy * pa * pid - dx * pc * pid);\r\n var ia = pid * pd;\r\n var id = pid * pa;\r\n var ib = pid * pb;\r\n var ic = pid * pc;\r\n var ra = ia * this.a - ib * this.c;\r\n var rb = ia * this.b - ib * this.d;\r\n var rc = id * this.c - ic * this.a;\r\n var rd = id * this.d - ic * this.b;\r\n this.ashearX = 0;\r\n this.ascaleX = Math.sqrt(ra * ra + rc * rc);\r\n if (this.ascaleX > 0.0001) {\r\n var det = ra * rd - rb * rc;\r\n this.ascaleY = det / this.ascaleX;\r\n this.ashearY = Math.atan2(ra * rb + rc * rd, det) * spine.MathUtils.radDeg;\r\n this.arotation = Math.atan2(rc, ra) * spine.MathUtils.radDeg;\r\n }\r\n else {\r\n this.ascaleX = 0;\r\n this.ascaleY = Math.sqrt(rb * rb + rd * rd);\r\n this.ashearY = 0;\r\n this.arotation = 90 - Math.atan2(rd, rb) * spine.MathUtils.radDeg;\r\n }\r\n };\r\n Bone.prototype.worldToLocal = function (world) {\r\n var a = this.a, b = this.b, c = this.c, d = this.d;\r\n var invDet = 1 / (a * d - b * c);\r\n var x = world.x - this.worldX, y = world.y - this.worldY;\r\n world.x = (x * d * invDet - y * b * invDet);\r\n world.y = (y * a * invDet - x * c * invDet);\r\n return world;\r\n };\r\n Bone.prototype.localToWorld = function (local) {\r\n var x = local.x, y = local.y;\r\n local.x = x * this.a + y * this.b + this.worldX;\r\n local.y = x * this.c + y * this.d + this.worldY;\r\n return local;\r\n };\r\n Bone.prototype.worldToLocalRotation = function (worldRotation) {\r\n var sin = spine.MathUtils.sinDeg(worldRotation), cos = spine.MathUtils.cosDeg(worldRotation);\r\n return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * spine.MathUtils.radDeg + this.rotation - this.shearX;\r\n };\r\n Bone.prototype.localToWorldRotation = function (localRotation) {\r\n localRotation -= this.rotation - this.shearX;\r\n var sin = spine.MathUtils.sinDeg(localRotation), cos = spine.MathUtils.cosDeg(localRotation);\r\n return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.rotateWorld = function (degrees) {\r\n var a = this.a, b = this.b, c = this.c, d = this.d;\r\n var cos = spine.MathUtils.cosDeg(degrees), sin = spine.MathUtils.sinDeg(degrees);\r\n this.a = cos * a - sin * c;\r\n this.b = cos * b - sin * d;\r\n this.c = sin * a + cos * c;\r\n this.d = sin * b + cos * d;\r\n this.appliedValid = false;\r\n };\r\n return Bone;\r\n }());\r\n spine.Bone = Bone;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BoneData = (function () {\r\n function BoneData(index, name, parent) {\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.scaleX = 1;\r\n this.scaleY = 1;\r\n this.shearX = 0;\r\n this.shearY = 0;\r\n this.transformMode = TransformMode.Normal;\r\n this.skinRequired = false;\r\n this.color = new spine.Color();\r\n if (index < 0)\r\n throw new Error(\"index must be >= 0.\");\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.parent = parent;\r\n }\r\n return BoneData;\r\n }());\r\n spine.BoneData = BoneData;\r\n var TransformMode;\r\n (function (TransformMode) {\r\n TransformMode[TransformMode[\"Normal\"] = 0] = \"Normal\";\r\n TransformMode[TransformMode[\"OnlyTranslation\"] = 1] = \"OnlyTranslation\";\r\n TransformMode[TransformMode[\"NoRotationOrReflection\"] = 2] = \"NoRotationOrReflection\";\r\n TransformMode[TransformMode[\"NoScale\"] = 3] = \"NoScale\";\r\n TransformMode[TransformMode[\"NoScaleOrReflection\"] = 4] = \"NoScaleOrReflection\";\r\n })(TransformMode = spine.TransformMode || (spine.TransformMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var ConstraintData = (function () {\r\n function ConstraintData(name, order, skinRequired) {\r\n this.name = name;\r\n this.order = order;\r\n this.skinRequired = skinRequired;\r\n }\r\n return ConstraintData;\r\n }());\r\n spine.ConstraintData = ConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Event = (function () {\r\n function Event(time, data) {\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n this.time = time;\r\n this.data = data;\r\n }\r\n return Event;\r\n }());\r\n spine.Event = Event;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var EventData = (function () {\r\n function EventData(name) {\r\n this.name = name;\r\n }\r\n return EventData;\r\n }());\r\n spine.EventData = EventData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IkConstraint = (function () {\r\n function IkConstraint(data, skeleton) {\r\n this.bendDirection = 0;\r\n this.compress = false;\r\n this.stretch = false;\r\n this.mix = 1;\r\n this.softness = 0;\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.mix = data.mix;\r\n this.softness = data.softness;\r\n this.bendDirection = data.bendDirection;\r\n this.compress = data.compress;\r\n this.stretch = data.stretch;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findBone(data.target.name);\r\n }\r\n IkConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n IkConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n IkConstraint.prototype.update = function () {\r\n var target = this.target;\r\n var bones = this.bones;\r\n switch (bones.length) {\r\n case 1:\r\n this.apply1(bones[0], target.worldX, target.worldY, this.compress, this.stretch, this.data.uniform, this.mix);\r\n break;\r\n case 2:\r\n this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.stretch, this.softness, this.mix);\r\n break;\r\n }\r\n };\r\n IkConstraint.prototype.apply1 = function (bone, targetX, targetY, compress, stretch, uniform, alpha) {\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var p = bone.parent;\r\n var id = 1 / (p.a * p.d - p.b * p.c);\r\n var x = targetX - p.worldX, y = targetY - p.worldY;\r\n var tx = (x * p.d - y * p.b) * id - bone.ax, ty = (y * p.a - x * p.c) * id - bone.ay;\r\n var rotationIK = Math.atan2(ty, tx) * spine.MathUtils.radDeg - bone.ashearX - bone.arotation;\r\n if (bone.ascaleX < 0)\r\n rotationIK += 180;\r\n if (rotationIK > 180)\r\n rotationIK -= 360;\r\n else if (rotationIK < -180)\r\n rotationIK += 360;\r\n var sx = bone.ascaleX, sy = bone.ascaleY;\r\n if (compress || stretch) {\r\n var b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\r\n if ((compress && dd < b) || (stretch && dd > b) && b > 0.0001) {\r\n var s = (dd / b - 1) * alpha + 1;\r\n sx *= s;\r\n if (uniform)\r\n sy *= s;\r\n }\r\n }\r\n bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, sx, sy, bone.ashearX, bone.ashearY);\r\n };\r\n IkConstraint.prototype.apply2 = function (parent, child, targetX, targetY, bendDir, stretch, softness, alpha) {\r\n if (alpha == 0) {\r\n child.updateWorldTransform();\r\n return;\r\n }\r\n if (!parent.appliedValid)\r\n parent.updateAppliedTransform();\r\n if (!child.appliedValid)\r\n child.updateAppliedTransform();\r\n var px = parent.ax, py = parent.ay, psx = parent.ascaleX, sx = psx, psy = parent.ascaleY, csx = child.ascaleX;\r\n var os1 = 0, os2 = 0, s2 = 0;\r\n if (psx < 0) {\r\n psx = -psx;\r\n os1 = 180;\r\n s2 = -1;\r\n }\r\n else {\r\n os1 = 0;\r\n s2 = 1;\r\n }\r\n if (psy < 0) {\r\n psy = -psy;\r\n s2 = -s2;\r\n }\r\n if (csx < 0) {\r\n csx = -csx;\r\n os2 = 180;\r\n }\r\n else\r\n os2 = 0;\r\n var cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d;\r\n var u = Math.abs(psx - psy) <= 0.0001;\r\n if (!u) {\r\n cy = 0;\r\n cwx = a * cx + parent.worldX;\r\n cwy = c * cx + parent.worldY;\r\n }\r\n else {\r\n cy = child.ay;\r\n cwx = a * cx + b * cy + parent.worldX;\r\n cwy = c * cx + d * cy + parent.worldY;\r\n }\r\n var pp = parent.parent;\r\n a = pp.a;\r\n b = pp.b;\r\n c = pp.c;\r\n d = pp.d;\r\n var id = 1 / (a * d - b * c), x = cwx - pp.worldX, y = cwy - pp.worldY;\r\n var dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\r\n var l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\r\n if (l1 < 0.0001) {\r\n this.apply1(parent, targetX, targetY, false, stretch, false, alpha);\r\n child.updateWorldTransformWith(cx, cy, 0, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n return;\r\n }\r\n x = targetX - pp.worldX;\r\n y = targetY - pp.worldY;\r\n var tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\r\n var dd = tx * tx + ty * ty;\r\n if (softness != 0) {\r\n softness *= psx * (csx + 1) / 2;\r\n var td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\r\n if (sd > 0) {\r\n var p = Math.min(1, sd / (softness * 2)) - 1;\r\n p = (sd - softness * (1 - p * p)) / td;\r\n tx -= p * tx;\r\n ty -= p * ty;\r\n dd = tx * tx + ty * ty;\r\n }\r\n }\r\n outer: if (u) {\r\n l2 *= psx;\r\n var cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\r\n if (cos < -1)\r\n cos = -1;\r\n else if (cos > 1) {\r\n cos = 1;\r\n if (stretch)\r\n sx *= (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\r\n }\r\n a2 = Math.acos(cos) * bendDir;\r\n a = l1 + l2 * cos;\r\n b = l2 * Math.sin(a2);\r\n a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b);\r\n }\r\n else {\r\n a = psx * l2;\r\n b = psy * l2;\r\n var aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\r\n c = bb * l1 * l1 + aa * dd - aa * bb;\r\n var c1 = -2 * bb * l1, c2 = bb - aa;\r\n d = c1 * c1 - 4 * c2 * c;\r\n if (d >= 0) {\r\n var q = Math.sqrt(d);\r\n if (c1 < 0)\r\n q = -q;\r\n q = -(c1 + q) / 2;\r\n var r0 = q / c2, r1 = c / q;\r\n var r = Math.abs(r0) < Math.abs(r1) ? r0 : r1;\r\n if (r * r <= dd) {\r\n y = Math.sqrt(dd - r * r) * bendDir;\r\n a1 = ta - Math.atan2(y, r);\r\n a2 = Math.atan2(y / psy, (r - l1) / psx);\r\n break outer;\r\n }\r\n }\r\n var minAngle = spine.MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\r\n var maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;\r\n c = -a * l1 / (aa - bb);\r\n if (c >= -1 && c <= 1) {\r\n c = Math.acos(c);\r\n x = a * Math.cos(c) + l1;\r\n y = b * Math.sin(c);\r\n d = x * x + y * y;\r\n if (d < minDist) {\r\n minAngle = c;\r\n minDist = d;\r\n minX = x;\r\n minY = y;\r\n }\r\n if (d > maxDist) {\r\n maxAngle = c;\r\n maxDist = d;\r\n maxX = x;\r\n maxY = y;\r\n }\r\n }\r\n if (dd <= (minDist + maxDist) / 2) {\r\n a1 = ta - Math.atan2(minY * bendDir, minX);\r\n a2 = minAngle * bendDir;\r\n }\r\n else {\r\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\r\n a2 = maxAngle * bendDir;\r\n }\r\n }\r\n var os = Math.atan2(cy, cx) * s2;\r\n var rotation = parent.arotation;\r\n a1 = (a1 - os) * spine.MathUtils.radDeg + os1 - rotation;\r\n if (a1 > 180)\r\n a1 -= 360;\r\n else if (a1 < -180)\r\n a1 += 360;\r\n parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, sx, parent.ascaleY, 0, 0);\r\n rotation = child.arotation;\r\n a2 = ((a2 + os) * spine.MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation;\r\n if (a2 > 180)\r\n a2 -= 360;\r\n else if (a2 < -180)\r\n a2 += 360;\r\n child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n };\r\n return IkConstraint;\r\n }());\r\n spine.IkConstraint = IkConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IkConstraintData = (function (_super) {\r\n __extends(IkConstraintData, _super);\r\n function IkConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n _this.bendDirection = 1;\r\n _this.compress = false;\r\n _this.stretch = false;\r\n _this.uniform = false;\r\n _this.mix = 1;\r\n _this.softness = 0;\r\n return _this;\r\n }\r\n return IkConstraintData;\r\n }(spine.ConstraintData));\r\n spine.IkConstraintData = IkConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathConstraint = (function () {\r\n function PathConstraint(data, skeleton) {\r\n this.position = 0;\r\n this.spacing = 0;\r\n this.rotateMix = 0;\r\n this.translateMix = 0;\r\n this.spaces = new Array();\r\n this.positions = new Array();\r\n this.world = new Array();\r\n this.curves = new Array();\r\n this.lengths = new Array();\r\n this.segments = new Array();\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (var i = 0, n = data.bones.length; i < n; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findSlot(data.target.name);\r\n this.position = data.position;\r\n this.spacing = data.spacing;\r\n this.rotateMix = data.rotateMix;\r\n this.translateMix = data.translateMix;\r\n }\r\n PathConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n PathConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n PathConstraint.prototype.update = function () {\r\n var attachment = this.target.getAttachment();\r\n if (!(attachment instanceof spine.PathAttachment))\r\n return;\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix;\r\n var translate = translateMix > 0, rotate = rotateMix > 0;\r\n if (!translate && !rotate)\r\n return;\r\n var data = this.data;\r\n var percentSpacing = data.spacingMode == spine.SpacingMode.Percent;\r\n var rotateMode = data.rotateMode;\r\n var tangents = rotateMode == spine.RotateMode.Tangent, scale = rotateMode == spine.RotateMode.ChainScale;\r\n var boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\r\n var bones = this.bones;\r\n var spaces = spine.Utils.setArraySize(this.spaces, spacesCount), lengths = null;\r\n var spacing = this.spacing;\r\n if (scale || !percentSpacing) {\r\n if (scale)\r\n lengths = spine.Utils.setArraySize(this.lengths, boneCount);\r\n var lengthSpacing = data.spacingMode == spine.SpacingMode.Length;\r\n for (var i = 0, n = spacesCount - 1; i < n;) {\r\n var bone = bones[i];\r\n var setupLength = bone.data.length;\r\n if (setupLength < PathConstraint.epsilon) {\r\n if (scale)\r\n lengths[i] = 0;\r\n spaces[++i] = 0;\r\n }\r\n else if (percentSpacing) {\r\n if (scale) {\r\n var x = setupLength * bone.a, y = setupLength * bone.c;\r\n var length_1 = Math.sqrt(x * x + y * y);\r\n lengths[i] = length_1;\r\n }\r\n spaces[++i] = spacing;\r\n }\r\n else {\r\n var x = setupLength * bone.a, y = setupLength * bone.c;\r\n var length_2 = Math.sqrt(x * x + y * y);\r\n if (scale)\r\n lengths[i] = length_2;\r\n spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length_2 / setupLength;\r\n }\r\n }\r\n }\r\n else {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] = spacing;\r\n }\r\n var positions = this.computeWorldPositions(attachment, spacesCount, tangents, data.positionMode == spine.PositionMode.Percent, percentSpacing);\r\n var boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\r\n var tip = false;\r\n if (offsetRotation == 0)\r\n tip = rotateMode == spine.RotateMode.Chain;\r\n else {\r\n tip = false;\r\n var p = this.target.bone;\r\n offsetRotation *= p.a * p.d - p.b * p.c > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n }\r\n for (var i = 0, p = 3; i < boneCount; i++, p += 3) {\r\n var bone = bones[i];\r\n bone.worldX += (boneX - bone.worldX) * translateMix;\r\n bone.worldY += (boneY - bone.worldY) * translateMix;\r\n var x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\r\n if (scale) {\r\n var length_3 = lengths[i];\r\n if (length_3 != 0) {\r\n var s = (Math.sqrt(dx * dx + dy * dy) / length_3 - 1) * rotateMix + 1;\r\n bone.a *= s;\r\n bone.c *= s;\r\n }\r\n }\r\n boneX = x;\r\n boneY = y;\r\n if (rotate) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d, r = 0, cos = 0, sin = 0;\r\n if (tangents)\r\n r = positions[p - 1];\r\n else if (spaces[i + 1] == 0)\r\n r = positions[p + 2];\r\n else\r\n r = Math.atan2(dy, dx);\r\n r -= Math.atan2(c, a);\r\n if (tip) {\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n var length_4 = bone.data.length;\r\n boneX += (length_4 * (cos * a - sin * c) - dx) * rotateMix;\r\n boneY += (length_4 * (sin * a + cos * c) - dy) * rotateMix;\r\n }\r\n else {\r\n r += offsetRotation;\r\n }\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n }\r\n bone.appliedValid = false;\r\n }\r\n };\r\n PathConstraint.prototype.computeWorldPositions = function (path, spacesCount, tangents, percentPosition, percentSpacing) {\r\n var target = this.target;\r\n var position = this.position;\r\n var spaces = this.spaces, out = spine.Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = null;\r\n var closed = path.closed;\r\n var verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = PathConstraint.NONE;\r\n if (!path.constantSpeed) {\r\n var lengths = path.lengths;\r\n curveCount -= closed ? 1 : 2;\r\n var pathLength_1 = lengths[curveCount];\r\n if (percentPosition)\r\n position *= pathLength_1;\r\n if (percentSpacing) {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] *= pathLength_1;\r\n }\r\n world = spine.Utils.setArraySize(this.world, 8);\r\n for (var i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\r\n var space = spaces[i];\r\n position += space;\r\n var p = position;\r\n if (closed) {\r\n p %= pathLength_1;\r\n if (p < 0)\r\n p += pathLength_1;\r\n curve = 0;\r\n }\r\n else if (p < 0) {\r\n if (prevCurve != PathConstraint.BEFORE) {\r\n prevCurve = PathConstraint.BEFORE;\r\n path.computeWorldVertices(target, 2, 4, world, 0, 2);\r\n }\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n }\r\n else if (p > pathLength_1) {\r\n if (prevCurve != PathConstraint.AFTER) {\r\n prevCurve = PathConstraint.AFTER;\r\n path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\r\n }\r\n this.addAfterPosition(p - pathLength_1, world, 0, out, o);\r\n continue;\r\n }\r\n for (;; curve++) {\r\n var length_5 = lengths[curve];\r\n if (p > length_5)\r\n continue;\r\n if (curve == 0)\r\n p /= length_5;\r\n else {\r\n var prev = lengths[curve - 1];\r\n p = (p - prev) / (length_5 - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n if (closed && curve == curveCount) {\r\n path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 4, world, 4, 2);\r\n }\r\n else\r\n path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\r\n }\r\n this.addCurvePosition(p, world[0], world[1], world[2], world[3], world[4], world[5], world[6], world[7], out, o, tangents || (i > 0 && space == 0));\r\n }\r\n return out;\r\n }\r\n if (closed) {\r\n verticesLength += 2;\r\n world = spine.Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength - 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 2, world, verticesLength - 4, 2);\r\n world[verticesLength - 2] = world[0];\r\n world[verticesLength - 1] = world[1];\r\n }\r\n else {\r\n curveCount--;\r\n verticesLength -= 4;\r\n world = spine.Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\r\n }\r\n var curves = spine.Utils.setArraySize(this.curves, curveCount);\r\n var pathLength = 0;\r\n var x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\r\n var tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\r\n for (var i = 0, w = 2; i < curveCount; i++, w += 6) {\r\n cx1 = world[w];\r\n cy1 = world[w + 1];\r\n cx2 = world[w + 2];\r\n cy2 = world[w + 3];\r\n x2 = world[w + 4];\r\n y2 = world[w + 5];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.1875;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.1875;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n curves[i] = pathLength;\r\n x1 = x2;\r\n y1 = y2;\r\n }\r\n if (percentPosition)\r\n position *= pathLength;\r\n else\r\n position *= pathLength / path.lengths[curveCount - 1];\r\n if (percentSpacing) {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] *= pathLength;\r\n }\r\n var segments = this.segments;\r\n var curveLength = 0;\r\n for (var i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\r\n var space = spaces[i];\r\n position += space;\r\n var p = position;\r\n if (closed) {\r\n p %= pathLength;\r\n if (p < 0)\r\n p += pathLength;\r\n curve = 0;\r\n }\r\n else if (p < 0) {\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n }\r\n else if (p > pathLength) {\r\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\r\n continue;\r\n }\r\n for (;; curve++) {\r\n var length_6 = curves[curve];\r\n if (p > length_6)\r\n continue;\r\n if (curve == 0)\r\n p /= length_6;\r\n else {\r\n var prev = curves[curve - 1];\r\n p = (p - prev) / (length_6 - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n var ii = curve * 6;\r\n x1 = world[ii];\r\n y1 = world[ii + 1];\r\n cx1 = world[ii + 2];\r\n cy1 = world[ii + 3];\r\n cx2 = world[ii + 4];\r\n cy2 = world[ii + 5];\r\n x2 = world[ii + 6];\r\n y2 = world[ii + 7];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.03;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.03;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.006;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.006;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667;\r\n curveLength = Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[0] = curveLength;\r\n for (ii = 1; ii < 8; ii++) {\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[ii] = curveLength;\r\n }\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[8] = curveLength;\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[9] = curveLength;\r\n segment = 0;\r\n }\r\n p *= curveLength;\r\n for (;; segment++) {\r\n var length_7 = segments[segment];\r\n if (p > length_7)\r\n continue;\r\n if (segment == 0)\r\n p /= length_7;\r\n else {\r\n var prev = segments[segment - 1];\r\n p = segment + (p - prev) / (length_7 - prev);\r\n }\r\n break;\r\n }\r\n this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || (i > 0 && space == 0));\r\n }\r\n return out;\r\n };\r\n PathConstraint.prototype.addBeforePosition = function (p, temp, i, out, o) {\r\n var x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n };\r\n PathConstraint.prototype.addAfterPosition = function (p, temp, i, out, o) {\r\n var x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n };\r\n PathConstraint.prototype.addCurvePosition = function (p, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents) {\r\n if (p == 0 || isNaN(p)) {\r\n out[o] = x1;\r\n out[o + 1] = y1;\r\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\r\n return;\r\n }\r\n var tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\r\n var ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\r\n var x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt;\r\n out[o] = x;\r\n out[o + 1] = y;\r\n if (tangents) {\r\n if (p < 0.001)\r\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\r\n else\r\n out[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt));\r\n }\r\n };\r\n PathConstraint.NONE = -1;\r\n PathConstraint.BEFORE = -2;\r\n PathConstraint.AFTER = -3;\r\n PathConstraint.epsilon = 0.00001;\r\n return PathConstraint;\r\n }());\r\n spine.PathConstraint = PathConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathConstraintData = (function (_super) {\r\n __extends(PathConstraintData, _super);\r\n function PathConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n return _this;\r\n }\r\n return PathConstraintData;\r\n }(spine.ConstraintData));\r\n spine.PathConstraintData = PathConstraintData;\r\n var PositionMode;\r\n (function (PositionMode) {\r\n PositionMode[PositionMode[\"Fixed\"] = 0] = \"Fixed\";\r\n PositionMode[PositionMode[\"Percent\"] = 1] = \"Percent\";\r\n })(PositionMode = spine.PositionMode || (spine.PositionMode = {}));\r\n var SpacingMode;\r\n (function (SpacingMode) {\r\n SpacingMode[SpacingMode[\"Length\"] = 0] = \"Length\";\r\n SpacingMode[SpacingMode[\"Fixed\"] = 1] = \"Fixed\";\r\n SpacingMode[SpacingMode[\"Percent\"] = 2] = \"Percent\";\r\n })(SpacingMode = spine.SpacingMode || (spine.SpacingMode = {}));\r\n var RotateMode;\r\n (function (RotateMode) {\r\n RotateMode[RotateMode[\"Tangent\"] = 0] = \"Tangent\";\r\n RotateMode[RotateMode[\"Chain\"] = 1] = \"Chain\";\r\n RotateMode[RotateMode[\"ChainScale\"] = 2] = \"ChainScale\";\r\n })(RotateMode = spine.RotateMode || (spine.RotateMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Assets = (function () {\r\n function Assets(clientId) {\r\n this.toLoad = new Array();\r\n this.assets = {};\r\n this.clientId = clientId;\r\n }\r\n Assets.prototype.loaded = function () {\r\n var i = 0;\r\n for (var v in this.assets)\r\n i++;\r\n return i;\r\n };\r\n return Assets;\r\n }());\r\n var SharedAssetManager = (function () {\r\n function SharedAssetManager(pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n this.clientAssets = {};\r\n this.queuedAssets = {};\r\n this.rawAssets = {};\r\n this.errors = {};\r\n this.pathPrefix = pathPrefix;\r\n }\r\n SharedAssetManager.prototype.queueAsset = function (clientId, textureLoader, path) {\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined) {\r\n clientAssets = new Assets(clientId);\r\n this.clientAssets[clientId] = clientAssets;\r\n }\r\n if (textureLoader !== null)\r\n clientAssets.textureLoader = textureLoader;\r\n clientAssets.toLoad.push(path);\r\n if (this.queuedAssets[path] === path) {\r\n return false;\r\n }\r\n else {\r\n this.queuedAssets[path] = path;\r\n return true;\r\n }\r\n };\r\n SharedAssetManager.prototype.loadText = function (clientId, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, null, path))\r\n return;\r\n var request = new XMLHttpRequest();\r\n request.onreadystatechange = function () {\r\n if (request.readyState == XMLHttpRequest.DONE) {\r\n if (request.status >= 200 && request.status < 300) {\r\n _this.rawAssets[path] = request.responseText;\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load text \" + path + \": status \" + request.status + \", \" + request.responseText;\r\n }\r\n }\r\n };\r\n request.open(\"GET\", path, true);\r\n request.send();\r\n };\r\n SharedAssetManager.prototype.loadJson = function (clientId, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, null, path))\r\n return;\r\n var request = new XMLHttpRequest();\r\n request.onreadystatechange = function () {\r\n if (request.readyState == XMLHttpRequest.DONE) {\r\n if (request.status >= 200 && request.status < 300) {\r\n _this.rawAssets[path] = JSON.parse(request.responseText);\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load text \" + path + \": status \" + request.status + \", \" + request.responseText;\r\n }\r\n }\r\n };\r\n request.open(\"GET\", path, true);\r\n request.send();\r\n };\r\n SharedAssetManager.prototype.loadTexture = function (clientId, textureLoader, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, textureLoader, path))\r\n return;\r\n var img = new Image();\r\n img.src = path;\r\n img.crossOrigin = \"anonymous\";\r\n img.onload = function (ev) {\r\n _this.rawAssets[path] = img;\r\n };\r\n img.onerror = function (ev) {\r\n _this.errors[path] = \"Couldn't load image \" + path;\r\n };\r\n };\r\n SharedAssetManager.prototype.get = function (clientId, path) {\r\n path = this.pathPrefix + path;\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined)\r\n return true;\r\n return clientAssets.assets[path];\r\n };\r\n SharedAssetManager.prototype.updateClientAssets = function (clientAssets) {\r\n for (var i = 0; i < clientAssets.toLoad.length; i++) {\r\n var path = clientAssets.toLoad[i];\r\n var asset = clientAssets.assets[path];\r\n if (asset === null || asset === undefined) {\r\n var rawAsset = this.rawAssets[path];\r\n if (rawAsset === null || rawAsset === undefined)\r\n continue;\r\n if (rawAsset instanceof HTMLImageElement) {\r\n clientAssets.assets[path] = clientAssets.textureLoader(rawAsset);\r\n }\r\n else {\r\n clientAssets.assets[path] = rawAsset;\r\n }\r\n }\r\n }\r\n };\r\n SharedAssetManager.prototype.isLoadingComplete = function (clientId) {\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined)\r\n return true;\r\n this.updateClientAssets(clientAssets);\r\n return clientAssets.toLoad.length == clientAssets.loaded();\r\n };\r\n SharedAssetManager.prototype.dispose = function () {\r\n };\r\n SharedAssetManager.prototype.hasErrors = function () {\r\n return Object.keys(this.errors).length > 0;\r\n };\r\n SharedAssetManager.prototype.getErrors = function () {\r\n return this.errors;\r\n };\r\n return SharedAssetManager;\r\n }());\r\n spine.SharedAssetManager = SharedAssetManager;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Skeleton = (function () {\r\n function Skeleton(data) {\r\n this._updateCache = new Array();\r\n this.updateCacheReset = new Array();\r\n this.time = 0;\r\n this.scaleX = 1;\r\n this.scaleY = 1;\r\n this.x = 0;\r\n this.y = 0;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++) {\r\n var boneData = data.bones[i];\r\n var bone = void 0;\r\n if (boneData.parent == null)\r\n bone = new spine.Bone(boneData, this, null);\r\n else {\r\n var parent_1 = this.bones[boneData.parent.index];\r\n bone = new spine.Bone(boneData, this, parent_1);\r\n parent_1.children.push(bone);\r\n }\r\n this.bones.push(bone);\r\n }\r\n this.slots = new Array();\r\n this.drawOrder = new Array();\r\n for (var i = 0; i < data.slots.length; i++) {\r\n var slotData = data.slots[i];\r\n var bone = this.bones[slotData.boneData.index];\r\n var slot = new spine.Slot(slotData, bone);\r\n this.slots.push(slot);\r\n this.drawOrder.push(slot);\r\n }\r\n this.ikConstraints = new Array();\r\n for (var i = 0; i < data.ikConstraints.length; i++) {\r\n var ikConstraintData = data.ikConstraints[i];\r\n this.ikConstraints.push(new spine.IkConstraint(ikConstraintData, this));\r\n }\r\n this.transformConstraints = new Array();\r\n for (var i = 0; i < data.transformConstraints.length; i++) {\r\n var transformConstraintData = data.transformConstraints[i];\r\n this.transformConstraints.push(new spine.TransformConstraint(transformConstraintData, this));\r\n }\r\n this.pathConstraints = new Array();\r\n for (var i = 0; i < data.pathConstraints.length; i++) {\r\n var pathConstraintData = data.pathConstraints[i];\r\n this.pathConstraints.push(new spine.PathConstraint(pathConstraintData, this));\r\n }\r\n this.color = new spine.Color(1, 1, 1, 1);\r\n this.updateCache();\r\n }\r\n Skeleton.prototype.updateCache = function () {\r\n var updateCache = this._updateCache;\r\n updateCache.length = 0;\r\n this.updateCacheReset.length = 0;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n bone.sorted = bone.data.skinRequired;\r\n bone.active = !bone.sorted;\r\n }\r\n if (this.skin != null) {\r\n var skinBones = this.skin.bones;\r\n for (var i = 0, n = this.skin.bones.length; i < n; i++) {\r\n var bone = this.bones[skinBones[i].index];\r\n do {\r\n bone.sorted = false;\r\n bone.active = true;\r\n bone = bone.parent;\r\n } while (bone != null);\r\n }\r\n }\r\n var ikConstraints = this.ikConstraints;\r\n var transformConstraints = this.transformConstraints;\r\n var pathConstraints = this.pathConstraints;\r\n var ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\r\n var constraintCount = ikCount + transformCount + pathCount;\r\n outer: for (var i = 0; i < constraintCount; i++) {\r\n for (var ii = 0; ii < ikCount; ii++) {\r\n var constraint = ikConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortIkConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (var ii = 0; ii < transformCount; ii++) {\r\n var constraint = transformConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortTransformConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (var ii = 0; ii < pathCount; ii++) {\r\n var constraint = pathConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortPathConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n }\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n this.sortBone(bones[i]);\r\n };\r\n Skeleton.prototype.sortIkConstraint = function (constraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n var target = constraint.target;\r\n this.sortBone(target);\r\n var constrained = constraint.bones;\r\n var parent = constrained[0];\r\n this.sortBone(parent);\r\n if (constrained.length > 1) {\r\n var child = constrained[constrained.length - 1];\r\n if (!(this._updateCache.indexOf(child) > -1))\r\n this.updateCacheReset.push(child);\r\n }\r\n this._updateCache.push(constraint);\r\n this.sortReset(parent.children);\r\n constrained[constrained.length - 1].sorted = true;\r\n };\r\n Skeleton.prototype.sortPathConstraint = function (constraint) {\r\n constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n var slot = constraint.target;\r\n var slotIndex = slot.data.index;\r\n var slotBone = slot.bone;\r\n if (this.skin != null)\r\n this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\r\n if (this.data.defaultSkin != null && this.data.defaultSkin != this.skin)\r\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\r\n for (var i = 0, n = this.data.skins.length; i < n; i++)\r\n this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.PathAttachment)\r\n this.sortPathConstraintAttachmentWith(attachment, slotBone);\r\n var constrained = constraint.bones;\r\n var boneCount = constrained.length;\r\n for (var i = 0; i < boneCount; i++)\r\n this.sortBone(constrained[i]);\r\n this._updateCache.push(constraint);\r\n for (var i = 0; i < boneCount; i++)\r\n this.sortReset(constrained[i].children);\r\n for (var i = 0; i < boneCount; i++)\r\n constrained[i].sorted = true;\r\n };\r\n Skeleton.prototype.sortTransformConstraint = function (constraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n this.sortBone(constraint.target);\r\n var constrained = constraint.bones;\r\n var boneCount = constrained.length;\r\n if (constraint.data.local) {\r\n for (var i = 0; i < boneCount; i++) {\r\n var child = constrained[i];\r\n this.sortBone(child.parent);\r\n if (!(this._updateCache.indexOf(child) > -1))\r\n this.updateCacheReset.push(child);\r\n }\r\n }\r\n else {\r\n for (var i = 0; i < boneCount; i++) {\r\n this.sortBone(constrained[i]);\r\n }\r\n }\r\n this._updateCache.push(constraint);\r\n for (var ii = 0; ii < boneCount; ii++)\r\n this.sortReset(constrained[ii].children);\r\n for (var ii = 0; ii < boneCount; ii++)\r\n constrained[ii].sorted = true;\r\n };\r\n Skeleton.prototype.sortPathConstraintAttachment = function (skin, slotIndex, slotBone) {\r\n var attachments = skin.attachments[slotIndex];\r\n if (!attachments)\r\n return;\r\n for (var key in attachments) {\r\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\r\n }\r\n };\r\n Skeleton.prototype.sortPathConstraintAttachmentWith = function (attachment, slotBone) {\r\n if (!(attachment instanceof spine.PathAttachment))\r\n return;\r\n var pathBones = attachment.bones;\r\n if (pathBones == null)\r\n this.sortBone(slotBone);\r\n else {\r\n var bones = this.bones;\r\n var i = 0;\r\n while (i < pathBones.length) {\r\n var boneCount = pathBones[i++];\r\n for (var n = i + boneCount; i < n; i++) {\r\n var boneIndex = pathBones[i];\r\n this.sortBone(bones[boneIndex]);\r\n }\r\n }\r\n }\r\n };\r\n Skeleton.prototype.sortBone = function (bone) {\r\n if (bone.sorted)\r\n return;\r\n var parent = bone.parent;\r\n if (parent != null)\r\n this.sortBone(parent);\r\n bone.sorted = true;\r\n this._updateCache.push(bone);\r\n };\r\n Skeleton.prototype.sortReset = function (bones) {\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.active)\r\n continue;\r\n if (bone.sorted)\r\n this.sortReset(bone.children);\r\n bone.sorted = false;\r\n }\r\n };\r\n Skeleton.prototype.updateWorldTransform = function () {\r\n var updateCacheReset = this.updateCacheReset;\r\n for (var i = 0, n = updateCacheReset.length; i < n; i++) {\r\n var bone = updateCacheReset[i];\r\n bone.ax = bone.x;\r\n bone.ay = bone.y;\r\n bone.arotation = bone.rotation;\r\n bone.ascaleX = bone.scaleX;\r\n bone.ascaleY = bone.scaleY;\r\n bone.ashearX = bone.shearX;\r\n bone.ashearY = bone.shearY;\r\n bone.appliedValid = true;\r\n }\r\n var updateCache = this._updateCache;\r\n for (var i = 0, n = updateCache.length; i < n; i++)\r\n updateCache[i].update();\r\n };\r\n Skeleton.prototype.setToSetupPose = function () {\r\n this.setBonesToSetupPose();\r\n this.setSlotsToSetupPose();\r\n };\r\n Skeleton.prototype.setBonesToSetupPose = function () {\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n bones[i].setToSetupPose();\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var constraint = ikConstraints[i];\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n var data = constraint.data;\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n constraint.scaleMix = data.scaleMix;\r\n constraint.shearMix = data.shearMix;\r\n }\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n var data = constraint.data;\r\n constraint.position = data.position;\r\n constraint.spacing = data.spacing;\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n }\r\n };\r\n Skeleton.prototype.setSlotsToSetupPose = function () {\r\n var slots = this.slots;\r\n spine.Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n slots[i].setToSetupPose();\r\n };\r\n Skeleton.prototype.getRootBone = function () {\r\n if (this.bones.length == 0)\r\n return null;\r\n return this.bones[0];\r\n };\r\n Skeleton.prototype.findBone = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (bone.data.name == boneName)\r\n return bone;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findBoneIndex = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n if (bones[i].data.name == boneName)\r\n return i;\r\n return -1;\r\n };\r\n Skeleton.prototype.findSlot = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.data.name == slotName)\r\n return slot;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findSlotIndex = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n if (slots[i].data.name == slotName)\r\n return i;\r\n return -1;\r\n };\r\n Skeleton.prototype.setSkinByName = function (skinName) {\r\n var skin = this.data.findSkin(skinName);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + skinName);\r\n this.setSkin(skin);\r\n };\r\n Skeleton.prototype.setSkin = function (newSkin) {\r\n if (newSkin == this.skin)\r\n return;\r\n if (newSkin != null) {\r\n if (this.skin != null)\r\n newSkin.attachAll(this, this.skin);\r\n else {\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n var name_1 = slot.data.attachmentName;\r\n if (name_1 != null) {\r\n var attachment = newSkin.getAttachment(i, name_1);\r\n if (attachment != null)\r\n slot.setAttachment(attachment);\r\n }\r\n }\r\n }\r\n }\r\n this.skin = newSkin;\r\n this.updateCache();\r\n };\r\n Skeleton.prototype.getAttachmentByName = function (slotName, attachmentName) {\r\n return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName);\r\n };\r\n Skeleton.prototype.getAttachment = function (slotIndex, attachmentName) {\r\n if (attachmentName == null)\r\n throw new Error(\"attachmentName cannot be null.\");\r\n if (this.skin != null) {\r\n var attachment = this.skin.getAttachment(slotIndex, attachmentName);\r\n if (attachment != null)\r\n return attachment;\r\n }\r\n if (this.data.defaultSkin != null)\r\n return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\r\n return null;\r\n };\r\n Skeleton.prototype.setAttachment = function (slotName, attachmentName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.data.name == slotName) {\r\n var attachment = null;\r\n if (attachmentName != null) {\r\n attachment = this.getAttachment(i, attachmentName);\r\n if (attachment == null)\r\n throw new Error(\"Attachment not found: \" + attachmentName + \", for slot: \" + slotName);\r\n }\r\n slot.setAttachment(attachment);\r\n return;\r\n }\r\n }\r\n throw new Error(\"Slot not found: \" + slotName);\r\n };\r\n Skeleton.prototype.findIkConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var ikConstraint = ikConstraints[i];\r\n if (ikConstraint.data.name == constraintName)\r\n return ikConstraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findTransformConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n if (constraint.data.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findPathConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n if (constraint.data.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.getBounds = function (offset, size, temp) {\r\n if (temp === void 0) { temp = new Array(2); }\r\n if (offset == null)\r\n throw new Error(\"offset cannot be null.\");\r\n if (size == null)\r\n throw new Error(\"size cannot be null.\");\r\n var drawOrder = this.drawOrder;\r\n var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var slot = drawOrder[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var verticesLength = 0;\r\n var vertices = null;\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.RegionAttachment) {\r\n verticesLength = 8;\r\n vertices = spine.Utils.setArraySize(temp, verticesLength, 0);\r\n attachment.computeWorldVertices(slot.bone, vertices, 0, 2);\r\n }\r\n else if (attachment instanceof spine.MeshAttachment) {\r\n var mesh = attachment;\r\n verticesLength = mesh.worldVerticesLength;\r\n vertices = spine.Utils.setArraySize(temp, verticesLength, 0);\r\n mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\r\n }\r\n if (vertices != null) {\r\n for (var ii = 0, nn = vertices.length; ii < nn; ii += 2) {\r\n var x = vertices[ii], y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n }\r\n offset.set(minX, minY);\r\n size.set(maxX - minX, maxY - minY);\r\n };\r\n Skeleton.prototype.update = function (delta) {\r\n this.time += delta;\r\n };\r\n return Skeleton;\r\n }());\r\n spine.Skeleton = Skeleton;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonBinary = (function () {\r\n function SkeletonBinary(attachmentLoader) {\r\n this.scale = 1;\r\n this.linkedMeshes = new Array();\r\n this.attachmentLoader = attachmentLoader;\r\n }\r\n SkeletonBinary.prototype.readSkeletonData = function (binary) {\r\n var scale = this.scale;\r\n var skeletonData = new spine.SkeletonData();\r\n skeletonData.name = \"\";\r\n var input = new BinaryInput(binary);\r\n skeletonData.hash = input.readString();\r\n skeletonData.version = input.readString();\r\n skeletonData.x = input.readFloat();\r\n skeletonData.y = input.readFloat();\r\n skeletonData.width = input.readFloat();\r\n skeletonData.height = input.readFloat();\r\n var nonessential = input.readBoolean();\r\n if (nonessential) {\r\n skeletonData.fps = input.readFloat();\r\n skeletonData.imagesPath = input.readString();\r\n skeletonData.audioPath = input.readString();\r\n }\r\n var n = 0;\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++)\r\n input.strings.push(input.readString());\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var name_2 = input.readString();\r\n var parent_2 = i == 0 ? null : skeletonData.bones[input.readInt(true)];\r\n var data = new spine.BoneData(i, name_2, parent_2);\r\n data.rotation = input.readFloat();\r\n data.x = input.readFloat() * scale;\r\n data.y = input.readFloat() * scale;\r\n data.scaleX = input.readFloat();\r\n data.scaleY = input.readFloat();\r\n data.shearX = input.readFloat();\r\n data.shearY = input.readFloat();\r\n data.length = input.readFloat() * scale;\r\n data.transformMode = SkeletonBinary.TransformModeValues[input.readInt(true)];\r\n data.skinRequired = input.readBoolean();\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(data.color, input.readInt32());\r\n skeletonData.bones.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var slotName = input.readString();\r\n var boneData = skeletonData.bones[input.readInt(true)];\r\n var data = new spine.SlotData(i, slotName, boneData);\r\n spine.Color.rgba8888ToColor(data.color, input.readInt32());\r\n var darkColor = input.readInt32();\r\n if (darkColor != -1)\r\n spine.Color.rgb888ToColor(data.darkColor = new spine.Color(), darkColor);\r\n data.attachmentName = input.readStringRef();\r\n data.blendMode = SkeletonBinary.BlendModeValues[input.readInt(true)];\r\n skeletonData.slots.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.IkConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.bones[input.readInt(true)];\r\n data.mix = input.readFloat();\r\n data.softness = input.readFloat() * scale;\r\n data.bendDirection = input.readByte();\r\n data.compress = input.readBoolean();\r\n data.stretch = input.readBoolean();\r\n data.uniform = input.readBoolean();\r\n skeletonData.ikConstraints.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.TransformConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.bones[input.readInt(true)];\r\n data.local = input.readBoolean();\r\n data.relative = input.readBoolean();\r\n data.offsetRotation = input.readFloat();\r\n data.offsetX = input.readFloat() * scale;\r\n data.offsetY = input.readFloat() * scale;\r\n data.offsetScaleX = input.readFloat();\r\n data.offsetScaleY = input.readFloat();\r\n data.offsetShearY = input.readFloat();\r\n data.rotateMix = input.readFloat();\r\n data.translateMix = input.readFloat();\r\n data.scaleMix = input.readFloat();\r\n data.shearMix = input.readFloat();\r\n skeletonData.transformConstraints.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.PathConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.slots[input.readInt(true)];\r\n data.positionMode = SkeletonBinary.PositionModeValues[input.readInt(true)];\r\n data.spacingMode = SkeletonBinary.SpacingModeValues[input.readInt(true)];\r\n data.rotateMode = SkeletonBinary.RotateModeValues[input.readInt(true)];\r\n data.offsetRotation = input.readFloat();\r\n data.position = input.readFloat();\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n data.position *= scale;\r\n data.spacing = input.readFloat();\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n data.spacing *= scale;\r\n data.rotateMix = input.readFloat();\r\n data.translateMix = input.readFloat();\r\n skeletonData.pathConstraints.push(data);\r\n }\r\n var defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\r\n if (defaultSkin != null) {\r\n skeletonData.defaultSkin = defaultSkin;\r\n skeletonData.skins.push(defaultSkin);\r\n }\r\n {\r\n var i = skeletonData.skins.length;\r\n spine.Utils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\r\n for (; i < n; i++)\r\n skeletonData.skins[i] = this.readSkin(input, skeletonData, false, nonessential);\r\n }\r\n n = this.linkedMeshes.length;\r\n for (var i = 0; i < n; i++) {\r\n var linkedMesh = this.linkedMeshes[i];\r\n var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + linkedMesh.skin);\r\n var parent_3 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n if (parent_3 == null)\r\n throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\r\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_3 : linkedMesh.mesh;\r\n linkedMesh.mesh.setParentMesh(parent_3);\r\n linkedMesh.mesh.updateUVs();\r\n }\r\n this.linkedMeshes.length = 0;\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var data = new spine.EventData(input.readStringRef());\r\n data.intValue = input.readInt(false);\r\n data.floatValue = input.readFloat();\r\n data.stringValue = input.readString();\r\n data.audioPath = input.readString();\r\n if (data.audioPath != null) {\r\n data.volume = input.readFloat();\r\n data.balance = input.readFloat();\r\n }\r\n skeletonData.events.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++)\r\n skeletonData.animations.push(this.readAnimation(input, input.readString(), skeletonData));\r\n return skeletonData;\r\n };\r\n SkeletonBinary.prototype.readSkin = function (input, skeletonData, defaultSkin, nonessential) {\r\n var skin = null;\r\n var slotCount = 0;\r\n if (defaultSkin) {\r\n slotCount = input.readInt(true);\r\n if (slotCount == 0)\r\n return null;\r\n skin = new spine.Skin(\"default\");\r\n }\r\n else {\r\n skin = new spine.Skin(input.readStringRef());\r\n skin.bones.length = input.readInt(true);\r\n for (var i = 0, n = skin.bones.length; i < n; i++)\r\n skin.bones[i] = skeletonData.bones[input.readInt(true)];\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.pathConstraints[input.readInt(true)]);\r\n slotCount = input.readInt(true);\r\n }\r\n for (var i = 0; i < slotCount; i++) {\r\n var slotIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var name_3 = input.readStringRef();\r\n var attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name_3, nonessential);\r\n if (attachment != null)\r\n skin.setAttachment(slotIndex, name_3, attachment);\r\n }\r\n }\r\n return skin;\r\n };\r\n SkeletonBinary.prototype.readAttachment = function (input, skeletonData, skin, slotIndex, attachmentName, nonessential) {\r\n var scale = this.scale;\r\n var name = input.readStringRef();\r\n if (name == null)\r\n name = attachmentName;\r\n var typeIndex = input.readByte();\r\n var type = SkeletonBinary.AttachmentTypeValues[typeIndex];\r\n switch (type) {\r\n case spine.AttachmentType.Region: {\r\n var path = input.readStringRef();\r\n var rotation = input.readFloat();\r\n var x = input.readFloat();\r\n var y = input.readFloat();\r\n var scaleX = input.readFloat();\r\n var scaleY = input.readFloat();\r\n var width = input.readFloat();\r\n var height = input.readFloat();\r\n var color = input.readInt32();\r\n if (path == null)\r\n path = name;\r\n var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\r\n if (region == null)\r\n return null;\r\n region.path = path;\r\n region.x = x * scale;\r\n region.y = y * scale;\r\n region.scaleX = scaleX;\r\n region.scaleY = scaleY;\r\n region.rotation = rotation;\r\n region.width = width * scale;\r\n region.height = height * scale;\r\n spine.Color.rgba8888ToColor(region.color, color);\r\n region.updateOffset();\r\n return region;\r\n }\r\n case spine.AttachmentType.BoundingBox: {\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var color = nonessential ? input.readInt32() : 0;\r\n var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n if (box == null)\r\n return null;\r\n box.worldVerticesLength = vertexCount << 1;\r\n box.vertices = vertices.vertices;\r\n box.bones = vertices.bones;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(box.color, color);\r\n return box;\r\n }\r\n case spine.AttachmentType.Mesh: {\r\n var path = input.readStringRef();\r\n var color = input.readInt32();\r\n var vertexCount = input.readInt(true);\r\n var uvs = this.readFloatArray(input, vertexCount << 1, 1);\r\n var triangles = this.readShortArray(input);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var hullLength = input.readInt(true);\r\n var edges = null;\r\n var width = 0, height = 0;\r\n if (nonessential) {\r\n edges = this.readShortArray(input);\r\n width = input.readFloat();\r\n height = input.readFloat();\r\n }\r\n if (path == null)\r\n path = name;\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n spine.Color.rgba8888ToColor(mesh.color, color);\r\n mesh.bones = vertices.bones;\r\n mesh.vertices = vertices.vertices;\r\n mesh.worldVerticesLength = vertexCount << 1;\r\n mesh.triangles = triangles;\r\n mesh.regionUVs = uvs;\r\n mesh.updateUVs();\r\n mesh.hullLength = hullLength << 1;\r\n if (nonessential) {\r\n mesh.edges = edges;\r\n mesh.width = width * scale;\r\n mesh.height = height * scale;\r\n }\r\n return mesh;\r\n }\r\n case spine.AttachmentType.LinkedMesh: {\r\n var path = input.readStringRef();\r\n var color = input.readInt32();\r\n var skinName = input.readStringRef();\r\n var parent_4 = input.readStringRef();\r\n var inheritDeform = input.readBoolean();\r\n var width = 0, height = 0;\r\n if (nonessential) {\r\n width = input.readFloat();\r\n height = input.readFloat();\r\n }\r\n if (path == null)\r\n path = name;\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n spine.Color.rgba8888ToColor(mesh.color, color);\r\n if (nonessential) {\r\n mesh.width = width * scale;\r\n mesh.height = height * scale;\r\n }\r\n this.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent_4, inheritDeform));\r\n return mesh;\r\n }\r\n case spine.AttachmentType.Path: {\r\n var closed_1 = input.readBoolean();\r\n var constantSpeed = input.readBoolean();\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var lengths = spine.Utils.newArray(vertexCount / 3, 0);\r\n for (var i = 0, n = lengths.length; i < n; i++)\r\n lengths[i] = input.readFloat() * scale;\r\n var color = nonessential ? input.readInt32() : 0;\r\n var path = this.attachmentLoader.newPathAttachment(skin, name);\r\n if (path == null)\r\n return null;\r\n path.closed = closed_1;\r\n path.constantSpeed = constantSpeed;\r\n path.worldVerticesLength = vertexCount << 1;\r\n path.vertices = vertices.vertices;\r\n path.bones = vertices.bones;\r\n path.lengths = lengths;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(path.color, color);\r\n return path;\r\n }\r\n case spine.AttachmentType.Point: {\r\n var rotation = input.readFloat();\r\n var x = input.readFloat();\r\n var y = input.readFloat();\r\n var color = nonessential ? input.readInt32() : 0;\r\n var point = this.attachmentLoader.newPointAttachment(skin, name);\r\n if (point == null)\r\n return null;\r\n point.x = x * scale;\r\n point.y = y * scale;\r\n point.rotation = rotation;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(point.color, color);\r\n return point;\r\n }\r\n case spine.AttachmentType.Clipping: {\r\n var endSlotIndex = input.readInt(true);\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var color = nonessential ? input.readInt32() : 0;\r\n var clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n if (clip == null)\r\n return null;\r\n clip.endSlot = skeletonData.slots[endSlotIndex];\r\n clip.worldVerticesLength = vertexCount << 1;\r\n clip.vertices = vertices.vertices;\r\n clip.bones = vertices.bones;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(clip.color, color);\r\n return clip;\r\n }\r\n }\r\n return null;\r\n };\r\n SkeletonBinary.prototype.readVertices = function (input, vertexCount) {\r\n var verticesLength = vertexCount << 1;\r\n var vertices = new Vertices();\r\n var scale = this.scale;\r\n if (!input.readBoolean()) {\r\n vertices.vertices = this.readFloatArray(input, verticesLength, scale);\r\n return vertices;\r\n }\r\n var weights = new Array();\r\n var bonesArray = new Array();\r\n for (var i = 0; i < vertexCount; i++) {\r\n var boneCount = input.readInt(true);\r\n bonesArray.push(boneCount);\r\n for (var ii = 0; ii < boneCount; ii++) {\r\n bonesArray.push(input.readInt(true));\r\n weights.push(input.readFloat() * scale);\r\n weights.push(input.readFloat() * scale);\r\n weights.push(input.readFloat());\r\n }\r\n }\r\n vertices.vertices = spine.Utils.toFloatArray(weights);\r\n vertices.bones = bonesArray;\r\n return vertices;\r\n };\r\n SkeletonBinary.prototype.readFloatArray = function (input, n, scale) {\r\n var array = new Array(n);\r\n if (scale == 1) {\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readFloat();\r\n }\r\n else {\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readFloat() * scale;\r\n }\r\n return array;\r\n };\r\n SkeletonBinary.prototype.readShortArray = function (input) {\r\n var n = input.readInt(true);\r\n var array = new Array(n);\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readShort();\r\n return array;\r\n };\r\n SkeletonBinary.prototype.readAnimation = function (input, name, skeletonData) {\r\n var timelines = new Array();\r\n var scale = this.scale;\r\n var duration = 0;\r\n var tempColor1 = new spine.Color();\r\n var tempColor2 = new spine.Color();\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var slotIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.SLOT_ATTACHMENT: {\r\n var timeline = new spine.AttachmentTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++)\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readStringRef());\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[frameCount - 1]);\r\n break;\r\n }\r\n case SkeletonBinary.SLOT_COLOR: {\r\n var timeline = new spine.ColorTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n spine.Color.rgba8888ToColor(tempColor1, input.readInt32());\r\n timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.ColorTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.SLOT_TWO_COLOR: {\r\n var timeline = new spine.TwoColorTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n spine.Color.rgba8888ToColor(tempColor1, input.readInt32());\r\n spine.Color.rgb888ToColor(tempColor2, input.readInt32());\r\n timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a, tempColor2.r, tempColor2.g, tempColor2.b);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TwoColorTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var boneIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.BONE_ROTATE: {\r\n var timeline = new spine.RotateTimeline(frameCount);\r\n timeline.boneIndex = boneIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.RotateTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.BONE_TRANSLATE:\r\n case SkeletonBinary.BONE_SCALE:\r\n case SkeletonBinary.BONE_SHEAR: {\r\n var timeline = void 0;\r\n var timelineScale = 1;\r\n if (timelineType == SkeletonBinary.BONE_SCALE)\r\n timeline = new spine.ScaleTimeline(frameCount);\r\n else if (timelineType == SkeletonBinary.BONE_SHEAR)\r\n timeline = new spine.ShearTimeline(frameCount);\r\n else {\r\n timeline = new spine.TranslateTimeline(frameCount);\r\n timelineScale = scale;\r\n }\r\n timeline.boneIndex = boneIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale, input.readFloat() * timelineScale);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TranslateTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.IkConstraintTimeline(frameCount);\r\n timeline.ikConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat() * scale, input.readByte(), input.readBoolean(), input.readBoolean());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.IkConstraintTimeline.ENTRIES]);\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.TransformConstraintTimeline(frameCount);\r\n timeline.transformConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TransformConstraintTimeline.ENTRIES]);\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var data = skeletonData.pathConstraints[index];\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.PATH_POSITION:\r\n case SkeletonBinary.PATH_SPACING: {\r\n var timeline = void 0;\r\n var timelineScale = 1;\r\n if (timelineType == SkeletonBinary.PATH_SPACING) {\r\n timeline = new spine.PathConstraintSpacingTimeline(frameCount);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n else {\r\n timeline = new spine.PathConstraintPositionTimeline(frameCount);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n timeline.pathConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.PATH_MIX: {\r\n var timeline = new spine.PathConstraintMixTimeline(frameCount);\r\n timeline.pathConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var skin = skeletonData.skins[input.readInt(true)];\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var slotIndex = input.readInt(true);\r\n for (var iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\r\n var attachment = skin.getAttachment(slotIndex, input.readStringRef());\r\n var weighted = attachment.bones != null;\r\n var vertices = attachment.vertices;\r\n var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.DeformTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n timeline.attachment = attachment;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n var deform = void 0;\r\n var end = input.readInt(true);\r\n if (end == 0)\r\n deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\r\n else {\r\n deform = spine.Utils.newFloatArray(deformLength);\r\n var start = input.readInt(true);\r\n end += start;\r\n if (scale == 1) {\r\n for (var v = start; v < end; v++)\r\n deform[v] = input.readFloat();\r\n }\r\n else {\r\n for (var v = start; v < end; v++)\r\n deform[v] = input.readFloat() * scale;\r\n }\r\n if (!weighted) {\r\n for (var v = 0, vn = deform.length; v < vn; v++)\r\n deform[v] += vertices[v];\r\n }\r\n }\r\n timeline.setFrame(frameIndex, time, deform);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[frameCount - 1]);\r\n }\r\n }\r\n }\r\n var drawOrderCount = input.readInt(true);\r\n if (drawOrderCount > 0) {\r\n var timeline = new spine.DrawOrderTimeline(drawOrderCount);\r\n var slotCount = skeletonData.slots.length;\r\n for (var i = 0; i < drawOrderCount; i++) {\r\n var time = input.readFloat();\r\n var offsetCount = input.readInt(true);\r\n var drawOrder = spine.Utils.newArray(slotCount, 0);\r\n for (var ii = slotCount - 1; ii >= 0; ii--)\r\n drawOrder[ii] = -1;\r\n var unchanged = spine.Utils.newArray(slotCount - offsetCount, 0);\r\n var originalIndex = 0, unchangedIndex = 0;\r\n for (var ii = 0; ii < offsetCount; ii++) {\r\n var slotIndex = input.readInt(true);\r\n while (originalIndex != slotIndex)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n drawOrder[originalIndex + input.readInt(true)] = originalIndex++;\r\n }\r\n while (originalIndex < slotCount)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n for (var ii = slotCount - 1; ii >= 0; ii--)\r\n if (drawOrder[ii] == -1)\r\n drawOrder[ii] = unchanged[--unchangedIndex];\r\n timeline.setFrame(i, time, drawOrder);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[drawOrderCount - 1]);\r\n }\r\n var eventCount = input.readInt(true);\r\n if (eventCount > 0) {\r\n var timeline = new spine.EventTimeline(eventCount);\r\n for (var i = 0; i < eventCount; i++) {\r\n var time = input.readFloat();\r\n var eventData = skeletonData.events[input.readInt(true)];\r\n var event_4 = new spine.Event(time, eventData);\r\n event_4.intValue = input.readInt(false);\r\n event_4.floatValue = input.readFloat();\r\n event_4.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\r\n if (event_4.data.audioPath != null) {\r\n event_4.volume = input.readFloat();\r\n event_4.balance = input.readFloat();\r\n }\r\n timeline.setFrame(i, event_4);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[eventCount - 1]);\r\n }\r\n return new spine.Animation(name, timelines, duration);\r\n };\r\n SkeletonBinary.prototype.readCurve = function (input, frameIndex, timeline) {\r\n switch (input.readByte()) {\r\n case SkeletonBinary.CURVE_STEPPED:\r\n timeline.setStepped(frameIndex);\r\n break;\r\n case SkeletonBinary.CURVE_BEZIER:\r\n this.setCurve(timeline, frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\r\n break;\r\n }\r\n };\r\n SkeletonBinary.prototype.setCurve = function (timeline, frameIndex, cx1, cy1, cx2, cy2) {\r\n timeline.setCurve(frameIndex, cx1, cy1, cx2, cy2);\r\n };\r\n SkeletonBinary.AttachmentTypeValues = [0, 1, 2, 3, 4, 5, 6];\r\n SkeletonBinary.TransformModeValues = [spine.TransformMode.Normal, spine.TransformMode.OnlyTranslation, spine.TransformMode.NoRotationOrReflection, spine.TransformMode.NoScale, spine.TransformMode.NoScaleOrReflection];\r\n SkeletonBinary.PositionModeValues = [spine.PositionMode.Fixed, spine.PositionMode.Percent];\r\n SkeletonBinary.SpacingModeValues = [spine.SpacingMode.Length, spine.SpacingMode.Fixed, spine.SpacingMode.Percent];\r\n SkeletonBinary.RotateModeValues = [spine.RotateMode.Tangent, spine.RotateMode.Chain, spine.RotateMode.ChainScale];\r\n SkeletonBinary.BlendModeValues = [spine.BlendMode.Normal, spine.BlendMode.Additive, spine.BlendMode.Multiply, spine.BlendMode.Screen];\r\n SkeletonBinary.BONE_ROTATE = 0;\r\n SkeletonBinary.BONE_TRANSLATE = 1;\r\n SkeletonBinary.BONE_SCALE = 2;\r\n SkeletonBinary.BONE_SHEAR = 3;\r\n SkeletonBinary.SLOT_ATTACHMENT = 0;\r\n SkeletonBinary.SLOT_COLOR = 1;\r\n SkeletonBinary.SLOT_TWO_COLOR = 2;\r\n SkeletonBinary.PATH_POSITION = 0;\r\n SkeletonBinary.PATH_SPACING = 1;\r\n SkeletonBinary.PATH_MIX = 2;\r\n SkeletonBinary.CURVE_LINEAR = 0;\r\n SkeletonBinary.CURVE_STEPPED = 1;\r\n SkeletonBinary.CURVE_BEZIER = 2;\r\n return SkeletonBinary;\r\n }());\r\n spine.SkeletonBinary = SkeletonBinary;\r\n var BinaryInput = (function () {\r\n function BinaryInput(data, strings, index, buffer) {\r\n if (strings === void 0) { strings = new Array(); }\r\n if (index === void 0) { index = 0; }\r\n if (buffer === void 0) { buffer = new DataView(data.buffer); }\r\n this.strings = strings;\r\n this.index = index;\r\n this.buffer = buffer;\r\n }\r\n BinaryInput.prototype.readByte = function () {\r\n return this.buffer.getInt8(this.index++);\r\n };\r\n BinaryInput.prototype.readShort = function () {\r\n var value = this.buffer.getInt16(this.index);\r\n this.index += 2;\r\n return value;\r\n };\r\n BinaryInput.prototype.readInt32 = function () {\r\n var value = this.buffer.getInt32(this.index);\r\n this.index += 4;\r\n return value;\r\n };\r\n BinaryInput.prototype.readInt = function (optimizePositive) {\r\n var b = this.readByte();\r\n var result = b & 0x7F;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 7;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 14;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 21;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 28;\r\n }\r\n }\r\n }\r\n }\r\n return optimizePositive ? result : ((result >>> 1) ^ -(result & 1));\r\n };\r\n BinaryInput.prototype.readStringRef = function () {\r\n var index = this.readInt(true);\r\n return index == 0 ? null : this.strings[index - 1];\r\n };\r\n BinaryInput.prototype.readString = function () {\r\n var byteCount = this.readInt(true);\r\n switch (byteCount) {\r\n case 0:\r\n return null;\r\n case 1:\r\n return \"\";\r\n }\r\n byteCount--;\r\n var chars = \"\";\r\n var charCount = 0;\r\n for (var i = 0; i < byteCount;) {\r\n var b = this.readByte();\r\n switch (b >> 4) {\r\n case 12:\r\n case 13:\r\n chars += String.fromCharCode(((b & 0x1F) << 6 | this.readByte() & 0x3F));\r\n i += 2;\r\n break;\r\n case 14:\r\n chars += String.fromCharCode(((b & 0x0F) << 12 | (this.readByte() & 0x3F) << 6 | this.readByte() & 0x3F));\r\n i += 3;\r\n break;\r\n default:\r\n chars += String.fromCharCode(b);\r\n i++;\r\n }\r\n }\r\n return chars;\r\n };\r\n BinaryInput.prototype.readFloat = function () {\r\n var value = this.buffer.getFloat32(this.index);\r\n this.index += 4;\r\n return value;\r\n };\r\n BinaryInput.prototype.readBoolean = function () {\r\n return this.readByte() != 0;\r\n };\r\n return BinaryInput;\r\n }());\r\n var LinkedMesh = (function () {\r\n function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\r\n this.mesh = mesh;\r\n this.skin = skin;\r\n this.slotIndex = slotIndex;\r\n this.parent = parent;\r\n this.inheritDeform = inheritDeform;\r\n }\r\n return LinkedMesh;\r\n }());\r\n var Vertices = (function () {\r\n function Vertices(bones, vertices) {\r\n if (bones === void 0) { bones = null; }\r\n if (vertices === void 0) { vertices = null; }\r\n this.bones = bones;\r\n this.vertices = vertices;\r\n }\r\n return Vertices;\r\n }());\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonBounds = (function () {\r\n function SkeletonBounds() {\r\n this.minX = 0;\r\n this.minY = 0;\r\n this.maxX = 0;\r\n this.maxY = 0;\r\n this.boundingBoxes = new Array();\r\n this.polygons = new Array();\r\n this.polygonPool = new spine.Pool(function () {\r\n return spine.Utils.newFloatArray(16);\r\n });\r\n }\r\n SkeletonBounds.prototype.update = function (skeleton, updateAabb) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n var boundingBoxes = this.boundingBoxes;\r\n var polygons = this.polygons;\r\n var polygonPool = this.polygonPool;\r\n var slots = skeleton.slots;\r\n var slotCount = slots.length;\r\n boundingBoxes.length = 0;\r\n polygonPool.freeAll(polygons);\r\n polygons.length = 0;\r\n for (var i = 0; i < slotCount; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.BoundingBoxAttachment) {\r\n var boundingBox = attachment;\r\n boundingBoxes.push(boundingBox);\r\n var polygon = polygonPool.obtain();\r\n if (polygon.length != boundingBox.worldVerticesLength) {\r\n polygon = spine.Utils.newFloatArray(boundingBox.worldVerticesLength);\r\n }\r\n polygons.push(polygon);\r\n boundingBox.computeWorldVertices(slot, 0, boundingBox.worldVerticesLength, polygon, 0, 2);\r\n }\r\n }\r\n if (updateAabb) {\r\n this.aabbCompute();\r\n }\r\n else {\r\n this.minX = Number.POSITIVE_INFINITY;\r\n this.minY = Number.POSITIVE_INFINITY;\r\n this.maxX = Number.NEGATIVE_INFINITY;\r\n this.maxY = Number.NEGATIVE_INFINITY;\r\n }\r\n };\r\n SkeletonBounds.prototype.aabbCompute = function () {\r\n var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++) {\r\n var polygon = polygons[i];\r\n var vertices = polygon;\r\n for (var ii = 0, nn = polygon.length; ii < nn; ii += 2) {\r\n var x = vertices[ii];\r\n var y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n this.minX = minX;\r\n this.minY = minY;\r\n this.maxX = maxX;\r\n this.maxY = maxY;\r\n };\r\n SkeletonBounds.prototype.aabbContainsPoint = function (x, y) {\r\n return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\r\n };\r\n SkeletonBounds.prototype.aabbIntersectsSegment = function (x1, y1, x2, y2) {\r\n var minX = this.minX;\r\n var minY = this.minY;\r\n var maxX = this.maxX;\r\n var maxY = this.maxY;\r\n if ((x1 <= minX && x2 <= minX) || (y1 <= minY && y2 <= minY) || (x1 >= maxX && x2 >= maxX) || (y1 >= maxY && y2 >= maxY))\r\n return false;\r\n var m = (y2 - y1) / (x2 - x1);\r\n var y = m * (minX - x1) + y1;\r\n if (y > minY && y < maxY)\r\n return true;\r\n y = m * (maxX - x1) + y1;\r\n if (y > minY && y < maxY)\r\n return true;\r\n var x = (minY - y1) / m + x1;\r\n if (x > minX && x < maxX)\r\n return true;\r\n x = (maxY - y1) / m + x1;\r\n if (x > minX && x < maxX)\r\n return true;\r\n return false;\r\n };\r\n SkeletonBounds.prototype.aabbIntersectsSkeleton = function (bounds) {\r\n return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\r\n };\r\n SkeletonBounds.prototype.containsPoint = function (x, y) {\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++)\r\n if (this.containsPointPolygon(polygons[i], x, y))\r\n return this.boundingBoxes[i];\r\n return null;\r\n };\r\n SkeletonBounds.prototype.containsPointPolygon = function (polygon, x, y) {\r\n var vertices = polygon;\r\n var nn = polygon.length;\r\n var prevIndex = nn - 2;\r\n var inside = false;\r\n for (var ii = 0; ii < nn; ii += 2) {\r\n var vertexY = vertices[ii + 1];\r\n var prevY = vertices[prevIndex + 1];\r\n if ((vertexY < y && prevY >= y) || (prevY < y && vertexY >= y)) {\r\n var vertexX = vertices[ii];\r\n if (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x)\r\n inside = !inside;\r\n }\r\n prevIndex = ii;\r\n }\r\n return inside;\r\n };\r\n SkeletonBounds.prototype.intersectsSegment = function (x1, y1, x2, y2) {\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++)\r\n if (this.intersectsSegmentPolygon(polygons[i], x1, y1, x2, y2))\r\n return this.boundingBoxes[i];\r\n return null;\r\n };\r\n SkeletonBounds.prototype.intersectsSegmentPolygon = function (polygon, x1, y1, x2, y2) {\r\n var vertices = polygon;\r\n var nn = polygon.length;\r\n var width12 = x1 - x2, height12 = y1 - y2;\r\n var det1 = x1 * y2 - y1 * x2;\r\n var x3 = vertices[nn - 2], y3 = vertices[nn - 1];\r\n for (var ii = 0; ii < nn; ii += 2) {\r\n var x4 = vertices[ii], y4 = vertices[ii + 1];\r\n var det2 = x3 * y4 - y3 * x4;\r\n var width34 = x3 - x4, height34 = y3 - y4;\r\n var det3 = width12 * height34 - height12 * width34;\r\n var x = (det1 * width34 - width12 * det2) / det3;\r\n if (((x >= x3 && x <= x4) || (x >= x4 && x <= x3)) && ((x >= x1 && x <= x2) || (x >= x2 && x <= x1))) {\r\n var y = (det1 * height34 - height12 * det2) / det3;\r\n if (((y >= y3 && y <= y4) || (y >= y4 && y <= y3)) && ((y >= y1 && y <= y2) || (y >= y2 && y <= y1)))\r\n return true;\r\n }\r\n x3 = x4;\r\n y3 = y4;\r\n }\r\n return false;\r\n };\r\n SkeletonBounds.prototype.getPolygon = function (boundingBox) {\r\n if (boundingBox == null)\r\n throw new Error(\"boundingBox cannot be null.\");\r\n var index = this.boundingBoxes.indexOf(boundingBox);\r\n return index == -1 ? null : this.polygons[index];\r\n };\r\n SkeletonBounds.prototype.getWidth = function () {\r\n return this.maxX - this.minX;\r\n };\r\n SkeletonBounds.prototype.getHeight = function () {\r\n return this.maxY - this.minY;\r\n };\r\n return SkeletonBounds;\r\n }());\r\n spine.SkeletonBounds = SkeletonBounds;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonClipping = (function () {\r\n function SkeletonClipping() {\r\n this.triangulator = new spine.Triangulator();\r\n this.clippingPolygon = new Array();\r\n this.clipOutput = new Array();\r\n this.clippedVertices = new Array();\r\n this.clippedTriangles = new Array();\r\n this.scratch = new Array();\r\n }\r\n SkeletonClipping.prototype.clipStart = function (slot, clip) {\r\n if (this.clipAttachment != null)\r\n return 0;\r\n this.clipAttachment = clip;\r\n var n = clip.worldVerticesLength;\r\n var vertices = spine.Utils.setArraySize(this.clippingPolygon, n);\r\n clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\r\n var clippingPolygon = this.clippingPolygon;\r\n SkeletonClipping.makeClockwise(clippingPolygon);\r\n var clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon));\r\n for (var i = 0, n_1 = clippingPolygons.length; i < n_1; i++) {\r\n var polygon = clippingPolygons[i];\r\n SkeletonClipping.makeClockwise(polygon);\r\n polygon.push(polygon[0]);\r\n polygon.push(polygon[1]);\r\n }\r\n return clippingPolygons.length;\r\n };\r\n SkeletonClipping.prototype.clipEndWithSlot = function (slot) {\r\n if (this.clipAttachment != null && this.clipAttachment.endSlot == slot.data)\r\n this.clipEnd();\r\n };\r\n SkeletonClipping.prototype.clipEnd = function () {\r\n if (this.clipAttachment == null)\r\n return;\r\n this.clipAttachment = null;\r\n this.clippingPolygons = null;\r\n this.clippedVertices.length = 0;\r\n this.clippedTriangles.length = 0;\r\n this.clippingPolygon.length = 0;\r\n };\r\n SkeletonClipping.prototype.isClipping = function () {\r\n return this.clipAttachment != null;\r\n };\r\n SkeletonClipping.prototype.clipTriangles = function (vertices, verticesLength, triangles, trianglesLength, uvs, light, dark, twoColor) {\r\n var clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;\r\n var clippedTriangles = this.clippedTriangles;\r\n var polygons = this.clippingPolygons;\r\n var polygonsCount = this.clippingPolygons.length;\r\n var vertexSize = twoColor ? 12 : 8;\r\n var index = 0;\r\n clippedVertices.length = 0;\r\n clippedTriangles.length = 0;\r\n outer: for (var i = 0; i < trianglesLength; i += 3) {\r\n var vertexOffset = triangles[i] << 1;\r\n var x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\r\n var u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];\r\n vertexOffset = triangles[i + 1] << 1;\r\n var x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\r\n var u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];\r\n vertexOffset = triangles[i + 2] << 1;\r\n var x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\r\n var u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];\r\n for (var p = 0; p < polygonsCount; p++) {\r\n var s = clippedVertices.length;\r\n if (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) {\r\n var clipOutputLength = clipOutput.length;\r\n if (clipOutputLength == 0)\r\n continue;\r\n var d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\r\n var d = 1 / (d0 * d2 + d1 * (y1 - y3));\r\n var clipOutputCount = clipOutputLength >> 1;\r\n var clipOutputItems = this.clipOutput;\r\n var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);\r\n for (var ii = 0; ii < clipOutputLength; ii += 2) {\r\n var x = clipOutputItems[ii], y = clipOutputItems[ii + 1];\r\n clippedVerticesItems[s] = x;\r\n clippedVerticesItems[s + 1] = y;\r\n clippedVerticesItems[s + 2] = light.r;\r\n clippedVerticesItems[s + 3] = light.g;\r\n clippedVerticesItems[s + 4] = light.b;\r\n clippedVerticesItems[s + 5] = light.a;\r\n var c0 = x - x3, c1 = y - y3;\r\n var a = (d0 * c0 + d1 * c1) * d;\r\n var b = (d4 * c0 + d2 * c1) * d;\r\n var c = 1 - a - b;\r\n clippedVerticesItems[s + 6] = u1 * a + u2 * b + u3 * c;\r\n clippedVerticesItems[s + 7] = v1 * a + v2 * b + v3 * c;\r\n if (twoColor) {\r\n clippedVerticesItems[s + 8] = dark.r;\r\n clippedVerticesItems[s + 9] = dark.g;\r\n clippedVerticesItems[s + 10] = dark.b;\r\n clippedVerticesItems[s + 11] = dark.a;\r\n }\r\n s += vertexSize;\r\n }\r\n s = clippedTriangles.length;\r\n var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));\r\n clipOutputCount--;\r\n for (var ii = 1; ii < clipOutputCount; ii++) {\r\n clippedTrianglesItems[s] = index;\r\n clippedTrianglesItems[s + 1] = (index + ii);\r\n clippedTrianglesItems[s + 2] = (index + ii + 1);\r\n s += 3;\r\n }\r\n index += clipOutputCount + 1;\r\n }\r\n else {\r\n var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + 3 * vertexSize);\r\n clippedVerticesItems[s] = x1;\r\n clippedVerticesItems[s + 1] = y1;\r\n clippedVerticesItems[s + 2] = light.r;\r\n clippedVerticesItems[s + 3] = light.g;\r\n clippedVerticesItems[s + 4] = light.b;\r\n clippedVerticesItems[s + 5] = light.a;\r\n if (!twoColor) {\r\n clippedVerticesItems[s + 6] = u1;\r\n clippedVerticesItems[s + 7] = v1;\r\n clippedVerticesItems[s + 8] = x2;\r\n clippedVerticesItems[s + 9] = y2;\r\n clippedVerticesItems[s + 10] = light.r;\r\n clippedVerticesItems[s + 11] = light.g;\r\n clippedVerticesItems[s + 12] = light.b;\r\n clippedVerticesItems[s + 13] = light.a;\r\n clippedVerticesItems[s + 14] = u2;\r\n clippedVerticesItems[s + 15] = v2;\r\n clippedVerticesItems[s + 16] = x3;\r\n clippedVerticesItems[s + 17] = y3;\r\n clippedVerticesItems[s + 18] = light.r;\r\n clippedVerticesItems[s + 19] = light.g;\r\n clippedVerticesItems[s + 20] = light.b;\r\n clippedVerticesItems[s + 21] = light.a;\r\n clippedVerticesItems[s + 22] = u3;\r\n clippedVerticesItems[s + 23] = v3;\r\n }\r\n else {\r\n clippedVerticesItems[s + 6] = u1;\r\n clippedVerticesItems[s + 7] = v1;\r\n clippedVerticesItems[s + 8] = dark.r;\r\n clippedVerticesItems[s + 9] = dark.g;\r\n clippedVerticesItems[s + 10] = dark.b;\r\n clippedVerticesItems[s + 11] = dark.a;\r\n clippedVerticesItems[s + 12] = x2;\r\n clippedVerticesItems[s + 13] = y2;\r\n clippedVerticesItems[s + 14] = light.r;\r\n clippedVerticesItems[s + 15] = light.g;\r\n clippedVerticesItems[s + 16] = light.b;\r\n clippedVerticesItems[s + 17] = light.a;\r\n clippedVerticesItems[s + 18] = u2;\r\n clippedVerticesItems[s + 19] = v2;\r\n clippedVerticesItems[s + 20] = dark.r;\r\n clippedVerticesItems[s + 21] = dark.g;\r\n clippedVerticesItems[s + 22] = dark.b;\r\n clippedVerticesItems[s + 23] = dark.a;\r\n clippedVerticesItems[s + 24] = x3;\r\n clippedVerticesItems[s + 25] = y3;\r\n clippedVerticesItems[s + 26] = light.r;\r\n clippedVerticesItems[s + 27] = light.g;\r\n clippedVerticesItems[s + 28] = light.b;\r\n clippedVerticesItems[s + 29] = light.a;\r\n clippedVerticesItems[s + 30] = u3;\r\n clippedVerticesItems[s + 31] = v3;\r\n clippedVerticesItems[s + 32] = dark.r;\r\n clippedVerticesItems[s + 33] = dark.g;\r\n clippedVerticesItems[s + 34] = dark.b;\r\n clippedVerticesItems[s + 35] = dark.a;\r\n }\r\n s = clippedTriangles.length;\r\n var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3);\r\n clippedTrianglesItems[s] = index;\r\n clippedTrianglesItems[s + 1] = (index + 1);\r\n clippedTrianglesItems[s + 2] = (index + 2);\r\n index += 3;\r\n continue outer;\r\n }\r\n }\r\n }\r\n };\r\n SkeletonClipping.prototype.clip = function (x1, y1, x2, y2, x3, y3, clippingArea, output) {\r\n var originalOutput = output;\r\n var clipped = false;\r\n var input = null;\r\n if (clippingArea.length % 4 >= 2) {\r\n input = output;\r\n output = this.scratch;\r\n }\r\n else\r\n input = this.scratch;\r\n input.length = 0;\r\n input.push(x1);\r\n input.push(y1);\r\n input.push(x2);\r\n input.push(y2);\r\n input.push(x3);\r\n input.push(y3);\r\n input.push(x1);\r\n input.push(y1);\r\n output.length = 0;\r\n var clippingVertices = clippingArea;\r\n var clippingVerticesLast = clippingArea.length - 4;\r\n for (var i = 0;; i += 2) {\r\n var edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\r\n var edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];\r\n var deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;\r\n var inputVertices = input;\r\n var inputVerticesLength = input.length - 2, outputStart = output.length;\r\n for (var ii = 0; ii < inputVerticesLength; ii += 2) {\r\n var inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\r\n var inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];\r\n var side2 = deltaX * (inputY2 - edgeY2) - deltaY * (inputX2 - edgeX2) > 0;\r\n if (deltaX * (inputY - edgeY2) - deltaY * (inputX - edgeX2) > 0) {\r\n if (side2) {\r\n output.push(inputX2);\r\n output.push(inputY2);\r\n continue;\r\n }\r\n var c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n var s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\r\n if (Math.abs(s) > 0.000001) {\r\n var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\r\n output.push(edgeX + (edgeX2 - edgeX) * ua);\r\n output.push(edgeY + (edgeY2 - edgeY) * ua);\r\n }\r\n else {\r\n output.push(edgeX);\r\n output.push(edgeY);\r\n }\r\n }\r\n else if (side2) {\r\n var c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n var s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\r\n if (Math.abs(s) > 0.000001) {\r\n var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\r\n output.push(edgeX + (edgeX2 - edgeX) * ua);\r\n output.push(edgeY + (edgeY2 - edgeY) * ua);\r\n }\r\n else {\r\n output.push(edgeX);\r\n output.push(edgeY);\r\n }\r\n output.push(inputX2);\r\n output.push(inputY2);\r\n }\r\n clipped = true;\r\n }\r\n if (outputStart == output.length) {\r\n originalOutput.length = 0;\r\n return true;\r\n }\r\n output.push(output[0]);\r\n output.push(output[1]);\r\n if (i == clippingVerticesLast)\r\n break;\r\n var temp = output;\r\n output = input;\r\n output.length = 0;\r\n input = temp;\r\n }\r\n if (originalOutput != output) {\r\n originalOutput.length = 0;\r\n for (var i = 0, n = output.length - 2; i < n; i++)\r\n originalOutput[i] = output[i];\r\n }\r\n else\r\n originalOutput.length = originalOutput.length - 2;\r\n return clipped;\r\n };\r\n SkeletonClipping.makeClockwise = function (polygon) {\r\n var vertices = polygon;\r\n var verticeslength = polygon.length;\r\n var area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0;\r\n for (var i = 0, n = verticeslength - 3; i < n; i += 2) {\r\n p1x = vertices[i];\r\n p1y = vertices[i + 1];\r\n p2x = vertices[i + 2];\r\n p2y = vertices[i + 3];\r\n area += p1x * p2y - p2x * p1y;\r\n }\r\n if (area < 0)\r\n return;\r\n for (var i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\r\n var x = vertices[i], y = vertices[i + 1];\r\n var other = lastX - i;\r\n vertices[i] = vertices[other];\r\n vertices[i + 1] = vertices[other + 1];\r\n vertices[other] = x;\r\n vertices[other + 1] = y;\r\n }\r\n };\r\n return SkeletonClipping;\r\n }());\r\n spine.SkeletonClipping = SkeletonClipping;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonData = (function () {\r\n function SkeletonData() {\r\n this.bones = new Array();\r\n this.slots = new Array();\r\n this.skins = new Array();\r\n this.events = new Array();\r\n this.animations = new Array();\r\n this.ikConstraints = new Array();\r\n this.transformConstraints = new Array();\r\n this.pathConstraints = new Array();\r\n this.fps = 0;\r\n }\r\n SkeletonData.prototype.findBone = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (bone.name == boneName)\r\n return bone;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findBoneIndex = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n if (bones[i].name == boneName)\r\n return i;\r\n return -1;\r\n };\r\n SkeletonData.prototype.findSlot = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.name == slotName)\r\n return slot;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findSlotIndex = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n if (slots[i].name == slotName)\r\n return i;\r\n return -1;\r\n };\r\n SkeletonData.prototype.findSkin = function (skinName) {\r\n if (skinName == null)\r\n throw new Error(\"skinName cannot be null.\");\r\n var skins = this.skins;\r\n for (var i = 0, n = skins.length; i < n; i++) {\r\n var skin = skins[i];\r\n if (skin.name == skinName)\r\n return skin;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findEvent = function (eventDataName) {\r\n if (eventDataName == null)\r\n throw new Error(\"eventDataName cannot be null.\");\r\n var events = this.events;\r\n for (var i = 0, n = events.length; i < n; i++) {\r\n var event_5 = events[i];\r\n if (event_5.name == eventDataName)\r\n return event_5;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findAnimation = function (animationName) {\r\n if (animationName == null)\r\n throw new Error(\"animationName cannot be null.\");\r\n var animations = this.animations;\r\n for (var i = 0, n = animations.length; i < n; i++) {\r\n var animation = animations[i];\r\n if (animation.name == animationName)\r\n return animation;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findIkConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var constraint = ikConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findTransformConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findPathConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findPathConstraintIndex = function (pathConstraintName) {\r\n if (pathConstraintName == null)\r\n throw new Error(\"pathConstraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++)\r\n if (pathConstraints[i].name == pathConstraintName)\r\n return i;\r\n return -1;\r\n };\r\n return SkeletonData;\r\n }());\r\n spine.SkeletonData = SkeletonData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonJson = (function () {\r\n function SkeletonJson(attachmentLoader) {\r\n this.scale = 1;\r\n this.linkedMeshes = new Array();\r\n this.attachmentLoader = attachmentLoader;\r\n }\r\n SkeletonJson.prototype.readSkeletonData = function (json) {\r\n var scale = this.scale;\r\n var skeletonData = new spine.SkeletonData();\r\n var root = typeof (json) === \"string\" ? JSON.parse(json) : json;\r\n var skeletonMap = root.skeleton;\r\n if (skeletonMap != null) {\r\n skeletonData.hash = skeletonMap.hash;\r\n skeletonData.version = skeletonMap.spine;\r\n skeletonData.x = skeletonMap.x;\r\n skeletonData.y = skeletonMap.y;\r\n skeletonData.width = skeletonMap.width;\r\n skeletonData.height = skeletonMap.height;\r\n skeletonData.fps = skeletonMap.fps;\r\n skeletonData.imagesPath = skeletonMap.images;\r\n }\r\n if (root.bones) {\r\n for (var i = 0; i < root.bones.length; i++) {\r\n var boneMap = root.bones[i];\r\n var parent_5 = null;\r\n var parentName = this.getValue(boneMap, \"parent\", null);\r\n if (parentName != null) {\r\n parent_5 = skeletonData.findBone(parentName);\r\n if (parent_5 == null)\r\n throw new Error(\"Parent bone not found: \" + parentName);\r\n }\r\n var data = new spine.BoneData(skeletonData.bones.length, boneMap.name, parent_5);\r\n data.length = this.getValue(boneMap, \"length\", 0) * scale;\r\n data.x = this.getValue(boneMap, \"x\", 0) * scale;\r\n data.y = this.getValue(boneMap, \"y\", 0) * scale;\r\n data.rotation = this.getValue(boneMap, \"rotation\", 0);\r\n data.scaleX = this.getValue(boneMap, \"scaleX\", 1);\r\n data.scaleY = this.getValue(boneMap, \"scaleY\", 1);\r\n data.shearX = this.getValue(boneMap, \"shearX\", 0);\r\n data.shearY = this.getValue(boneMap, \"shearY\", 0);\r\n data.transformMode = SkeletonJson.transformModeFromString(this.getValue(boneMap, \"transform\", \"normal\"));\r\n data.skinRequired = this.getValue(boneMap, \"skin\", false);\r\n skeletonData.bones.push(data);\r\n }\r\n }\r\n if (root.slots) {\r\n for (var i = 0; i < root.slots.length; i++) {\r\n var slotMap = root.slots[i];\r\n var slotName = slotMap.name;\r\n var boneName = slotMap.bone;\r\n var boneData = skeletonData.findBone(boneName);\r\n if (boneData == null)\r\n throw new Error(\"Slot bone not found: \" + boneName);\r\n var data = new spine.SlotData(skeletonData.slots.length, slotName, boneData);\r\n var color = this.getValue(slotMap, \"color\", null);\r\n if (color != null)\r\n data.color.setFromString(color);\r\n var dark = this.getValue(slotMap, \"dark\", null);\r\n if (dark != null) {\r\n data.darkColor = new spine.Color(1, 1, 1, 1);\r\n data.darkColor.setFromString(dark);\r\n }\r\n data.attachmentName = this.getValue(slotMap, \"attachment\", null);\r\n data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, \"blend\", \"normal\"));\r\n skeletonData.slots.push(data);\r\n }\r\n }\r\n if (root.ik) {\r\n for (var i = 0; i < root.ik.length; i++) {\r\n var constraintMap = root.ik[i];\r\n var data = new spine.IkConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"IK bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findBone(targetName);\r\n if (data.target == null)\r\n throw new Error(\"IK target bone not found: \" + targetName);\r\n data.mix = this.getValue(constraintMap, \"mix\", 1);\r\n data.softness = this.getValue(constraintMap, \"softness\", 0) * scale;\r\n data.bendDirection = this.getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\r\n data.compress = this.getValue(constraintMap, \"compress\", false);\r\n data.stretch = this.getValue(constraintMap, \"stretch\", false);\r\n data.uniform = this.getValue(constraintMap, \"uniform\", false);\r\n skeletonData.ikConstraints.push(data);\r\n }\r\n }\r\n if (root.transform) {\r\n for (var i = 0; i < root.transform.length; i++) {\r\n var constraintMap = root.transform[i];\r\n var data = new spine.TransformConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"Transform constraint bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findBone(targetName);\r\n if (data.target == null)\r\n throw new Error(\"Transform constraint target bone not found: \" + targetName);\r\n data.local = this.getValue(constraintMap, \"local\", false);\r\n data.relative = this.getValue(constraintMap, \"relative\", false);\r\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\r\n data.offsetX = this.getValue(constraintMap, \"x\", 0) * scale;\r\n data.offsetY = this.getValue(constraintMap, \"y\", 0) * scale;\r\n data.offsetScaleX = this.getValue(constraintMap, \"scaleX\", 0);\r\n data.offsetScaleY = this.getValue(constraintMap, \"scaleY\", 0);\r\n data.offsetShearY = this.getValue(constraintMap, \"shearY\", 0);\r\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\r\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\r\n data.scaleMix = this.getValue(constraintMap, \"scaleMix\", 1);\r\n data.shearMix = this.getValue(constraintMap, \"shearMix\", 1);\r\n skeletonData.transformConstraints.push(data);\r\n }\r\n }\r\n if (root.path) {\r\n for (var i = 0; i < root.path.length; i++) {\r\n var constraintMap = root.path[i];\r\n var data = new spine.PathConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"Transform constraint bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findSlot(targetName);\r\n if (data.target == null)\r\n throw new Error(\"Path target slot not found: \" + targetName);\r\n data.positionMode = SkeletonJson.positionModeFromString(this.getValue(constraintMap, \"positionMode\", \"percent\"));\r\n data.spacingMode = SkeletonJson.spacingModeFromString(this.getValue(constraintMap, \"spacingMode\", \"length\"));\r\n data.rotateMode = SkeletonJson.rotateModeFromString(this.getValue(constraintMap, \"rotateMode\", \"tangent\"));\r\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\r\n data.position = this.getValue(constraintMap, \"position\", 0);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n data.position *= scale;\r\n data.spacing = this.getValue(constraintMap, \"spacing\", 0);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n data.spacing *= scale;\r\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\r\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\r\n skeletonData.pathConstraints.push(data);\r\n }\r\n }\r\n if (root.skins) {\r\n for (var i = 0; i < root.skins.length; i++) {\r\n var skinMap = root.skins[i];\r\n var skin = new spine.Skin(skinMap.name);\r\n if (skinMap.bones) {\r\n for (var ii = 0; ii < skinMap.bones.length; ii++) {\r\n var bone = skeletonData.findBone(skinMap.bones[ii]);\r\n if (bone == null)\r\n throw new Error(\"Skin bone not found: \" + skinMap.bones[i]);\r\n skin.bones.push(bone);\r\n }\r\n }\r\n if (skinMap.ik) {\r\n for (var ii = 0; ii < skinMap.ik.length; ii++) {\r\n var constraint = skeletonData.findIkConstraint(skinMap.ik[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin IK constraint not found: \" + skinMap.ik[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n if (skinMap.transform) {\r\n for (var ii = 0; ii < skinMap.transform.length; ii++) {\r\n var constraint = skeletonData.findTransformConstraint(skinMap.transform[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin transform constraint not found: \" + skinMap.transform[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n if (skinMap.path) {\r\n for (var ii = 0; ii < skinMap.path.length; ii++) {\r\n var constraint = skeletonData.findPathConstraint(skinMap.path[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin path constraint not found: \" + skinMap.path[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n for (var slotName in skinMap.attachments) {\r\n var slot = skeletonData.findSlot(slotName);\r\n if (slot == null)\r\n throw new Error(\"Slot not found: \" + slotName);\r\n var slotMap = skinMap.attachments[slotName];\r\n for (var entryName in slotMap) {\r\n var attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\r\n if (attachment != null)\r\n skin.setAttachment(slot.index, entryName, attachment);\r\n }\r\n }\r\n skeletonData.skins.push(skin);\r\n if (skin.name == \"default\")\r\n skeletonData.defaultSkin = skin;\r\n }\r\n }\r\n for (var i = 0, n = this.linkedMeshes.length; i < n; i++) {\r\n var linkedMesh = this.linkedMeshes[i];\r\n var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + linkedMesh.skin);\r\n var parent_6 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n if (parent_6 == null)\r\n throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\r\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_6 : linkedMesh.mesh;\r\n linkedMesh.mesh.setParentMesh(parent_6);\r\n linkedMesh.mesh.updateUVs();\r\n }\r\n this.linkedMeshes.length = 0;\r\n if (root.events) {\r\n for (var eventName in root.events) {\r\n var eventMap = root.events[eventName];\r\n var data = new spine.EventData(eventName);\r\n data.intValue = this.getValue(eventMap, \"int\", 0);\r\n data.floatValue = this.getValue(eventMap, \"float\", 0);\r\n data.stringValue = this.getValue(eventMap, \"string\", \"\");\r\n data.audioPath = this.getValue(eventMap, \"audio\", null);\r\n if (data.audioPath != null) {\r\n data.volume = this.getValue(eventMap, \"volume\", 1);\r\n data.balance = this.getValue(eventMap, \"balance\", 0);\r\n }\r\n skeletonData.events.push(data);\r\n }\r\n }\r\n if (root.animations) {\r\n for (var animationName in root.animations) {\r\n var animationMap = root.animations[animationName];\r\n this.readAnimation(animationMap, animationName, skeletonData);\r\n }\r\n }\r\n return skeletonData;\r\n };\r\n SkeletonJson.prototype.readAttachment = function (map, skin, slotIndex, name, skeletonData) {\r\n var scale = this.scale;\r\n name = this.getValue(map, \"name\", name);\r\n var type = this.getValue(map, \"type\", \"region\");\r\n switch (type) {\r\n case \"region\": {\r\n var path = this.getValue(map, \"path\", name);\r\n var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\r\n if (region == null)\r\n return null;\r\n region.path = path;\r\n region.x = this.getValue(map, \"x\", 0) * scale;\r\n region.y = this.getValue(map, \"y\", 0) * scale;\r\n region.scaleX = this.getValue(map, \"scaleX\", 1);\r\n region.scaleY = this.getValue(map, \"scaleY\", 1);\r\n region.rotation = this.getValue(map, \"rotation\", 0);\r\n region.width = map.width * scale;\r\n region.height = map.height * scale;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n region.color.setFromString(color);\r\n region.updateOffset();\r\n return region;\r\n }\r\n case \"boundingbox\": {\r\n var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n if (box == null)\r\n return null;\r\n this.readVertices(map, box, map.vertexCount << 1);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n box.color.setFromString(color);\r\n return box;\r\n }\r\n case \"mesh\":\r\n case \"linkedmesh\": {\r\n var path = this.getValue(map, \"path\", name);\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n mesh.color.setFromString(color);\r\n mesh.width = this.getValue(map, \"width\", 0) * scale;\r\n mesh.height = this.getValue(map, \"height\", 0) * scale;\r\n var parent_7 = this.getValue(map, \"parent\", null);\r\n if (parent_7 != null) {\r\n this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, \"skin\", null), slotIndex, parent_7, this.getValue(map, \"deform\", true)));\r\n return mesh;\r\n }\r\n var uvs = map.uvs;\r\n this.readVertices(map, mesh, uvs.length);\r\n mesh.triangles = map.triangles;\r\n mesh.regionUVs = uvs;\r\n mesh.updateUVs();\r\n mesh.edges = this.getValue(map, \"edges\", null);\r\n mesh.hullLength = this.getValue(map, \"hull\", 0) * 2;\r\n return mesh;\r\n }\r\n case \"path\": {\r\n var path = this.attachmentLoader.newPathAttachment(skin, name);\r\n if (path == null)\r\n return null;\r\n path.closed = this.getValue(map, \"closed\", false);\r\n path.constantSpeed = this.getValue(map, \"constantSpeed\", true);\r\n var vertexCount = map.vertexCount;\r\n this.readVertices(map, path, vertexCount << 1);\r\n var lengths = spine.Utils.newArray(vertexCount / 3, 0);\r\n for (var i = 0; i < map.lengths.length; i++)\r\n lengths[i] = map.lengths[i] * scale;\r\n path.lengths = lengths;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n path.color.setFromString(color);\r\n return path;\r\n }\r\n case \"point\": {\r\n var point = this.attachmentLoader.newPointAttachment(skin, name);\r\n if (point == null)\r\n return null;\r\n point.x = this.getValue(map, \"x\", 0) * scale;\r\n point.y = this.getValue(map, \"y\", 0) * scale;\r\n point.rotation = this.getValue(map, \"rotation\", 0);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n point.color.setFromString(color);\r\n return point;\r\n }\r\n case \"clipping\": {\r\n var clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n if (clip == null)\r\n return null;\r\n var end = this.getValue(map, \"end\", null);\r\n if (end != null) {\r\n var slot = skeletonData.findSlot(end);\r\n if (slot == null)\r\n throw new Error(\"Clipping end slot not found: \" + end);\r\n clip.endSlot = slot;\r\n }\r\n var vertexCount = map.vertexCount;\r\n this.readVertices(map, clip, vertexCount << 1);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n clip.color.setFromString(color);\r\n return clip;\r\n }\r\n }\r\n return null;\r\n };\r\n SkeletonJson.prototype.readVertices = function (map, attachment, verticesLength) {\r\n var scale = this.scale;\r\n attachment.worldVerticesLength = verticesLength;\r\n var vertices = map.vertices;\r\n if (verticesLength == vertices.length) {\r\n var scaledVertices = spine.Utils.toFloatArray(vertices);\r\n if (scale != 1) {\r\n for (var i = 0, n = vertices.length; i < n; i++)\r\n scaledVertices[i] *= scale;\r\n }\r\n attachment.vertices = scaledVertices;\r\n return;\r\n }\r\n var weights = new Array();\r\n var bones = new Array();\r\n for (var i = 0, n = vertices.length; i < n;) {\r\n var boneCount = vertices[i++];\r\n bones.push(boneCount);\r\n for (var nn = i + boneCount * 4; i < nn; i += 4) {\r\n bones.push(vertices[i]);\r\n weights.push(vertices[i + 1] * scale);\r\n weights.push(vertices[i + 2] * scale);\r\n weights.push(vertices[i + 3]);\r\n }\r\n }\r\n attachment.bones = bones;\r\n attachment.vertices = spine.Utils.toFloatArray(weights);\r\n };\r\n SkeletonJson.prototype.readAnimation = function (map, name, skeletonData) {\r\n var scale = this.scale;\r\n var timelines = new Array();\r\n var duration = 0;\r\n if (map.slots) {\r\n for (var slotName in map.slots) {\r\n var slotMap = map.slots[slotName];\r\n var slotIndex = skeletonData.findSlotIndex(slotName);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + slotName);\r\n for (var timelineName in slotMap) {\r\n var timelineMap = slotMap[timelineName];\r\n if (timelineName == \"attachment\") {\r\n var timeline = new spine.AttachmentTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex++, this.getValue(valueMap, \"time\", 0), valueMap.name);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n else if (timelineName == \"color\") {\r\n var timeline = new spine.ColorTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var color = new spine.Color();\r\n color.setFromString(valueMap.color);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), color.r, color.g, color.b, color.a);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.ColorTimeline.ENTRIES]);\r\n }\r\n else if (timelineName == \"twoColor\") {\r\n var timeline = new spine.TwoColorTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var light = new spine.Color();\r\n var dark = new spine.Color();\r\n light.setFromString(valueMap.light);\r\n dark.setFromString(valueMap.dark);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), light.r, light.g, light.b, light.a, dark.r, dark.g, dark.b);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TwoColorTimeline.ENTRIES]);\r\n }\r\n else\r\n throw new Error(\"Invalid timeline type for a slot: \" + timelineName + \" (\" + slotName + \")\");\r\n }\r\n }\r\n }\r\n if (map.bones) {\r\n for (var boneName in map.bones) {\r\n var boneMap = map.bones[boneName];\r\n var boneIndex = skeletonData.findBoneIndex(boneName);\r\n if (boneIndex == -1)\r\n throw new Error(\"Bone not found: \" + boneName);\r\n for (var timelineName in boneMap) {\r\n var timelineMap = boneMap[timelineName];\r\n if (timelineName === \"rotate\") {\r\n var timeline = new spine.RotateTimeline(timelineMap.length);\r\n timeline.boneIndex = boneIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"angle\", 0));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.RotateTimeline.ENTRIES]);\r\n }\r\n else if (timelineName === \"translate\" || timelineName === \"scale\" || timelineName === \"shear\") {\r\n var timeline = null;\r\n var timelineScale = 1, defaultValue = 0;\r\n if (timelineName === \"scale\") {\r\n timeline = new spine.ScaleTimeline(timelineMap.length);\r\n defaultValue = 1;\r\n }\r\n else if (timelineName === \"shear\")\r\n timeline = new spine.ShearTimeline(timelineMap.length);\r\n else {\r\n timeline = new spine.TranslateTimeline(timelineMap.length);\r\n timelineScale = scale;\r\n }\r\n timeline.boneIndex = boneIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var x = this.getValue(valueMap, \"x\", defaultValue), y = this.getValue(valueMap, \"y\", defaultValue);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), x * timelineScale, y * timelineScale);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TranslateTimeline.ENTRIES]);\r\n }\r\n else\r\n throw new Error(\"Invalid timeline type for a bone: \" + timelineName + \" (\" + boneName + \")\");\r\n }\r\n }\r\n }\r\n if (map.ik) {\r\n for (var constraintName in map.ik) {\r\n var constraintMap = map.ik[constraintName];\r\n var constraint = skeletonData.findIkConstraint(constraintName);\r\n var timeline = new spine.IkConstraintTimeline(constraintMap.length);\r\n timeline.ikConstraintIndex = skeletonData.ikConstraints.indexOf(constraint);\r\n var frameIndex = 0;\r\n for (var i = 0; i < constraintMap.length; i++) {\r\n var valueMap = constraintMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"mix\", 1), this.getValue(valueMap, \"softness\", 0) * scale, this.getValue(valueMap, \"bendPositive\", true) ? 1 : -1, this.getValue(valueMap, \"compress\", false), this.getValue(valueMap, \"stretch\", false));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.IkConstraintTimeline.ENTRIES]);\r\n }\r\n }\r\n if (map.transform) {\r\n for (var constraintName in map.transform) {\r\n var constraintMap = map.transform[constraintName];\r\n var constraint = skeletonData.findTransformConstraint(constraintName);\r\n var timeline = new spine.TransformConstraintTimeline(constraintMap.length);\r\n timeline.transformConstraintIndex = skeletonData.transformConstraints.indexOf(constraint);\r\n var frameIndex = 0;\r\n for (var i = 0; i < constraintMap.length; i++) {\r\n var valueMap = constraintMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1), this.getValue(valueMap, \"scaleMix\", 1), this.getValue(valueMap, \"shearMix\", 1));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TransformConstraintTimeline.ENTRIES]);\r\n }\r\n }\r\n if (map.path) {\r\n for (var constraintName in map.path) {\r\n var constraintMap = map.path[constraintName];\r\n var index = skeletonData.findPathConstraintIndex(constraintName);\r\n if (index == -1)\r\n throw new Error(\"Path constraint not found: \" + constraintName);\r\n var data = skeletonData.pathConstraints[index];\r\n for (var timelineName in constraintMap) {\r\n var timelineMap = constraintMap[timelineName];\r\n if (timelineName === \"position\" || timelineName === \"spacing\") {\r\n var timeline = null;\r\n var timelineScale = 1;\r\n if (timelineName === \"spacing\") {\r\n timeline = new spine.PathConstraintSpacingTimeline(timelineMap.length);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n else {\r\n timeline = new spine.PathConstraintPositionTimeline(timelineMap.length);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n timeline.pathConstraintIndex = index;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, timelineName, 0) * timelineScale);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\r\n }\r\n else if (timelineName === \"mix\") {\r\n var timeline = new spine.PathConstraintMixTimeline(timelineMap.length);\r\n timeline.pathConstraintIndex = index;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\r\n }\r\n }\r\n }\r\n }\r\n if (map.deform) {\r\n for (var deformName in map.deform) {\r\n var deformMap = map.deform[deformName];\r\n var skin = skeletonData.findSkin(deformName);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + deformName);\r\n for (var slotName in deformMap) {\r\n var slotMap = deformMap[slotName];\r\n var slotIndex = skeletonData.findSlotIndex(slotName);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + slotMap.name);\r\n for (var timelineName in slotMap) {\r\n var timelineMap = slotMap[timelineName];\r\n var attachment = skin.getAttachment(slotIndex, timelineName);\r\n if (attachment == null)\r\n throw new Error(\"Deform attachment not found: \" + timelineMap.name);\r\n var weighted = attachment.bones != null;\r\n var vertices = attachment.vertices;\r\n var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n var timeline = new spine.DeformTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n timeline.attachment = attachment;\r\n var frameIndex = 0;\r\n for (var j = 0; j < timelineMap.length; j++) {\r\n var valueMap = timelineMap[j];\r\n var deform = void 0;\r\n var verticesValue = this.getValue(valueMap, \"vertices\", null);\r\n if (verticesValue == null)\r\n deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\r\n else {\r\n deform = spine.Utils.newFloatArray(deformLength);\r\n var start = this.getValue(valueMap, \"offset\", 0);\r\n spine.Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\r\n if (scale != 1) {\r\n for (var i = start, n = i + verticesValue.length; i < n; i++)\r\n deform[i] *= scale;\r\n }\r\n if (!weighted) {\r\n for (var i = 0; i < deformLength; i++)\r\n deform[i] += vertices[i];\r\n }\r\n }\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), deform);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n }\r\n }\r\n }\r\n var drawOrderNode = map.drawOrder;\r\n if (drawOrderNode == null)\r\n drawOrderNode = map.draworder;\r\n if (drawOrderNode != null) {\r\n var timeline = new spine.DrawOrderTimeline(drawOrderNode.length);\r\n var slotCount = skeletonData.slots.length;\r\n var frameIndex = 0;\r\n for (var j = 0; j < drawOrderNode.length; j++) {\r\n var drawOrderMap = drawOrderNode[j];\r\n var drawOrder = null;\r\n var offsets = this.getValue(drawOrderMap, \"offsets\", null);\r\n if (offsets != null) {\r\n drawOrder = spine.Utils.newArray(slotCount, -1);\r\n var unchanged = spine.Utils.newArray(slotCount - offsets.length, 0);\r\n var originalIndex = 0, unchangedIndex = 0;\r\n for (var i = 0; i < offsets.length; i++) {\r\n var offsetMap = offsets[i];\r\n var slotIndex = skeletonData.findSlotIndex(offsetMap.slot);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + offsetMap.slot);\r\n while (originalIndex != slotIndex)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n drawOrder[originalIndex + offsetMap.offset] = originalIndex++;\r\n }\r\n while (originalIndex < slotCount)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n for (var i = slotCount - 1; i >= 0; i--)\r\n if (drawOrder[i] == -1)\r\n drawOrder[i] = unchanged[--unchangedIndex];\r\n }\r\n timeline.setFrame(frameIndex++, this.getValue(drawOrderMap, \"time\", 0), drawOrder);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n if (map.events) {\r\n var timeline = new spine.EventTimeline(map.events.length);\r\n var frameIndex = 0;\r\n for (var i = 0; i < map.events.length; i++) {\r\n var eventMap = map.events[i];\r\n var eventData = skeletonData.findEvent(eventMap.name);\r\n if (eventData == null)\r\n throw new Error(\"Event not found: \" + eventMap.name);\r\n var event_6 = new spine.Event(spine.Utils.toSinglePrecision(this.getValue(eventMap, \"time\", 0)), eventData);\r\n event_6.intValue = this.getValue(eventMap, \"int\", eventData.intValue);\r\n event_6.floatValue = this.getValue(eventMap, \"float\", eventData.floatValue);\r\n event_6.stringValue = this.getValue(eventMap, \"string\", eventData.stringValue);\r\n if (event_6.data.audioPath != null) {\r\n event_6.volume = this.getValue(eventMap, \"volume\", 1);\r\n event_6.balance = this.getValue(eventMap, \"balance\", 0);\r\n }\r\n timeline.setFrame(frameIndex++, event_6);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n if (isNaN(duration)) {\r\n throw new Error(\"Error while parsing animation, duration is NaN\");\r\n }\r\n skeletonData.animations.push(new spine.Animation(name, timelines, duration));\r\n };\r\n SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) {\r\n if (!map.curve)\r\n return;\r\n if (map.curve == \"stepped\")\r\n timeline.setStepped(frameIndex);\r\n else {\r\n var curve = map.curve;\r\n timeline.setCurve(frameIndex, curve, this.getValue(map, \"c2\", 0), this.getValue(map, \"c3\", 1), this.getValue(map, \"c4\", 1));\r\n }\r\n };\r\n SkeletonJson.prototype.getValue = function (map, prop, defaultValue) {\r\n return map[prop] !== undefined ? map[prop] : defaultValue;\r\n };\r\n SkeletonJson.blendModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"normal\")\r\n return spine.BlendMode.Normal;\r\n if (str == \"additive\")\r\n return spine.BlendMode.Additive;\r\n if (str == \"multiply\")\r\n return spine.BlendMode.Multiply;\r\n if (str == \"screen\")\r\n return spine.BlendMode.Screen;\r\n throw new Error(\"Unknown blend mode: \" + str);\r\n };\r\n SkeletonJson.positionModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"fixed\")\r\n return spine.PositionMode.Fixed;\r\n if (str == \"percent\")\r\n return spine.PositionMode.Percent;\r\n throw new Error(\"Unknown position mode: \" + str);\r\n };\r\n SkeletonJson.spacingModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"length\")\r\n return spine.SpacingMode.Length;\r\n if (str == \"fixed\")\r\n return spine.SpacingMode.Fixed;\r\n if (str == \"percent\")\r\n return spine.SpacingMode.Percent;\r\n throw new Error(\"Unknown position mode: \" + str);\r\n };\r\n SkeletonJson.rotateModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"tangent\")\r\n return spine.RotateMode.Tangent;\r\n if (str == \"chain\")\r\n return spine.RotateMode.Chain;\r\n if (str == \"chainscale\")\r\n return spine.RotateMode.ChainScale;\r\n throw new Error(\"Unknown rotate mode: \" + str);\r\n };\r\n SkeletonJson.transformModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"normal\")\r\n return spine.TransformMode.Normal;\r\n if (str == \"onlytranslation\")\r\n return spine.TransformMode.OnlyTranslation;\r\n if (str == \"norotationorreflection\")\r\n return spine.TransformMode.NoRotationOrReflection;\r\n if (str == \"noscale\")\r\n return spine.TransformMode.NoScale;\r\n if (str == \"noscaleorreflection\")\r\n return spine.TransformMode.NoScaleOrReflection;\r\n throw new Error(\"Unknown transform mode: \" + str);\r\n };\r\n return SkeletonJson;\r\n }());\r\n spine.SkeletonJson = SkeletonJson;\r\n var LinkedMesh = (function () {\r\n function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\r\n this.mesh = mesh;\r\n this.skin = skin;\r\n this.slotIndex = slotIndex;\r\n this.parent = parent;\r\n this.inheritDeform = inheritDeform;\r\n }\r\n return LinkedMesh;\r\n }());\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkinEntry = (function () {\r\n function SkinEntry(slotIndex, name, attachment) {\r\n this.slotIndex = slotIndex;\r\n this.name = name;\r\n this.attachment = attachment;\r\n }\r\n return SkinEntry;\r\n }());\r\n spine.SkinEntry = SkinEntry;\r\n var Skin = (function () {\r\n function Skin(name) {\r\n this.attachments = new Array();\r\n this.bones = Array();\r\n this.constraints = new Array();\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n Skin.prototype.setAttachment = function (slotIndex, name, attachment) {\r\n if (attachment == null)\r\n throw new Error(\"attachment cannot be null.\");\r\n var attachments = this.attachments;\r\n if (slotIndex >= attachments.length)\r\n attachments.length = slotIndex + 1;\r\n if (!attachments[slotIndex])\r\n attachments[slotIndex] = {};\r\n attachments[slotIndex][name] = attachment;\r\n };\r\n Skin.prototype.addSkin = function (skin) {\r\n for (var i = 0; i < skin.bones.length; i++) {\r\n var bone = skin.bones[i];\r\n var contained = false;\r\n for (var j = 0; j < this.bones.length; j++) {\r\n if (this.bones[j] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.bones.push(bone);\r\n }\r\n for (var i = 0; i < skin.constraints.length; i++) {\r\n var constraint = skin.constraints[i];\r\n var contained = false;\r\n for (var j = 0; j < this.constraints.length; j++) {\r\n if (this.constraints[j] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.constraints.push(constraint);\r\n }\r\n var attachments = skin.getAttachments();\r\n for (var i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n };\r\n Skin.prototype.copySkin = function (skin) {\r\n for (var i = 0; i < skin.bones.length; i++) {\r\n var bone = skin.bones[i];\r\n var contained = false;\r\n for (var j = 0; j < this.bones.length; j++) {\r\n if (this.bones[j] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.bones.push(bone);\r\n }\r\n for (var i = 0; i < skin.constraints.length; i++) {\r\n var constraint = skin.constraints[i];\r\n var contained = false;\r\n for (var j = 0; j < this.constraints.length; j++) {\r\n if (this.constraints[j] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.constraints.push(constraint);\r\n }\r\n var attachments = skin.getAttachments();\r\n for (var i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n if (attachment.attachment == null)\r\n continue;\r\n if (attachment.attachment instanceof spine.MeshAttachment) {\r\n attachment.attachment = attachment.attachment.newLinkedMesh();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n else {\r\n attachment.attachment = attachment.attachment.copy();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n }\r\n };\r\n Skin.prototype.getAttachment = function (slotIndex, name) {\r\n var dictionary = this.attachments[slotIndex];\r\n return dictionary ? dictionary[name] : null;\r\n };\r\n Skin.prototype.removeAttachment = function (slotIndex, name) {\r\n var dictionary = this.attachments[slotIndex];\r\n if (dictionary)\r\n dictionary[name] = null;\r\n };\r\n Skin.prototype.getAttachments = function () {\r\n var entries = new Array();\r\n for (var i = 0; i < this.attachments.length; i++) {\r\n var slotAttachments = this.attachments[i];\r\n if (slotAttachments) {\r\n for (var name_4 in slotAttachments) {\r\n var attachment = slotAttachments[name_4];\r\n if (attachment)\r\n entries.push(new SkinEntry(i, name_4, attachment));\r\n }\r\n }\r\n }\r\n return entries;\r\n };\r\n Skin.prototype.getAttachmentsForSlot = function (slotIndex, attachments) {\r\n var slotAttachments = this.attachments[slotIndex];\r\n if (slotAttachments) {\r\n for (var name_5 in slotAttachments) {\r\n var attachment = slotAttachments[name_5];\r\n if (attachment)\r\n attachments.push(new SkinEntry(slotIndex, name_5, attachment));\r\n }\r\n }\r\n };\r\n Skin.prototype.clear = function () {\r\n this.attachments.length = 0;\r\n this.bones.length = 0;\r\n this.constraints.length = 0;\r\n };\r\n Skin.prototype.attachAll = function (skeleton, oldSkin) {\r\n var slotIndex = 0;\r\n for (var i = 0; i < skeleton.slots.length; i++) {\r\n var slot = skeleton.slots[i];\r\n var slotAttachment = slot.getAttachment();\r\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\r\n var dictionary = oldSkin.attachments[slotIndex];\r\n for (var key in dictionary) {\r\n var skinAttachment = dictionary[key];\r\n if (slotAttachment == skinAttachment) {\r\n var attachment = this.getAttachment(slotIndex, key);\r\n if (attachment != null)\r\n slot.setAttachment(attachment);\r\n break;\r\n }\r\n }\r\n }\r\n slotIndex++;\r\n }\r\n };\r\n return Skin;\r\n }());\r\n spine.Skin = Skin;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Slot = (function () {\r\n function Slot(data, bone) {\r\n this.deform = new Array();\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (bone == null)\r\n throw new Error(\"bone cannot be null.\");\r\n this.data = data;\r\n this.bone = bone;\r\n this.color = new spine.Color();\r\n this.darkColor = data.darkColor == null ? null : new spine.Color();\r\n this.setToSetupPose();\r\n }\r\n Slot.prototype.getSkeleton = function () {\r\n return this.bone.skeleton;\r\n };\r\n Slot.prototype.getAttachment = function () {\r\n return this.attachment;\r\n };\r\n Slot.prototype.setAttachment = function (attachment) {\r\n if (this.attachment == attachment)\r\n return;\r\n this.attachment = attachment;\r\n this.attachmentTime = this.bone.skeleton.time;\r\n this.deform.length = 0;\r\n };\r\n Slot.prototype.setAttachmentTime = function (time) {\r\n this.attachmentTime = this.bone.skeleton.time - time;\r\n };\r\n Slot.prototype.getAttachmentTime = function () {\r\n return this.bone.skeleton.time - this.attachmentTime;\r\n };\r\n Slot.prototype.setToSetupPose = function () {\r\n this.color.setFromColor(this.data.color);\r\n if (this.darkColor != null)\r\n this.darkColor.setFromColor(this.data.darkColor);\r\n if (this.data.attachmentName == null)\r\n this.attachment = null;\r\n else {\r\n this.attachment = null;\r\n this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName));\r\n }\r\n };\r\n return Slot;\r\n }());\r\n spine.Slot = Slot;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SlotData = (function () {\r\n function SlotData(index, name, boneData) {\r\n this.color = new spine.Color(1, 1, 1, 1);\r\n if (index < 0)\r\n throw new Error(\"index must be >= 0.\");\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n if (boneData == null)\r\n throw new Error(\"boneData cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.boneData = boneData;\r\n }\r\n return SlotData;\r\n }());\r\n spine.SlotData = SlotData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Texture = (function () {\r\n function Texture(image) {\r\n this._image = image;\r\n }\r\n Texture.prototype.getImage = function () {\r\n return this._image;\r\n };\r\n Texture.filterFromString = function (text) {\r\n switch (text.toLowerCase()) {\r\n case \"nearest\": return TextureFilter.Nearest;\r\n case \"linear\": return TextureFilter.Linear;\r\n case \"mipmap\": return TextureFilter.MipMap;\r\n case \"mipmapnearestnearest\": return TextureFilter.MipMapNearestNearest;\r\n case \"mipmaplinearnearest\": return TextureFilter.MipMapLinearNearest;\r\n case \"mipmapnearestlinear\": return TextureFilter.MipMapNearestLinear;\r\n case \"mipmaplinearlinear\": return TextureFilter.MipMapLinearLinear;\r\n default: throw new Error(\"Unknown texture filter \" + text);\r\n }\r\n };\r\n Texture.wrapFromString = function (text) {\r\n switch (text.toLowerCase()) {\r\n case \"mirroredtepeat\": return TextureWrap.MirroredRepeat;\r\n case \"clamptoedge\": return TextureWrap.ClampToEdge;\r\n case \"repeat\": return TextureWrap.Repeat;\r\n default: throw new Error(\"Unknown texture wrap \" + text);\r\n }\r\n };\r\n return Texture;\r\n }());\r\n spine.Texture = Texture;\r\n var TextureFilter;\r\n (function (TextureFilter) {\r\n TextureFilter[TextureFilter[\"Nearest\"] = 9728] = \"Nearest\";\r\n TextureFilter[TextureFilter[\"Linear\"] = 9729] = \"Linear\";\r\n TextureFilter[TextureFilter[\"MipMap\"] = 9987] = \"MipMap\";\r\n TextureFilter[TextureFilter[\"MipMapNearestNearest\"] = 9984] = \"MipMapNearestNearest\";\r\n TextureFilter[TextureFilter[\"MipMapLinearNearest\"] = 9985] = \"MipMapLinearNearest\";\r\n TextureFilter[TextureFilter[\"MipMapNearestLinear\"] = 9986] = \"MipMapNearestLinear\";\r\n TextureFilter[TextureFilter[\"MipMapLinearLinear\"] = 9987] = \"MipMapLinearLinear\";\r\n })(TextureFilter = spine.TextureFilter || (spine.TextureFilter = {}));\r\n var TextureWrap;\r\n (function (TextureWrap) {\r\n TextureWrap[TextureWrap[\"MirroredRepeat\"] = 33648] = \"MirroredRepeat\";\r\n TextureWrap[TextureWrap[\"ClampToEdge\"] = 33071] = \"ClampToEdge\";\r\n TextureWrap[TextureWrap[\"Repeat\"] = 10497] = \"Repeat\";\r\n })(TextureWrap = spine.TextureWrap || (spine.TextureWrap = {}));\r\n var TextureRegion = (function () {\r\n function TextureRegion() {\r\n this.u = 0;\r\n this.v = 0;\r\n this.u2 = 0;\r\n this.v2 = 0;\r\n this.width = 0;\r\n this.height = 0;\r\n this.rotate = false;\r\n this.offsetX = 0;\r\n this.offsetY = 0;\r\n this.originalWidth = 0;\r\n this.originalHeight = 0;\r\n }\r\n return TextureRegion;\r\n }());\r\n spine.TextureRegion = TextureRegion;\r\n var FakeTexture = (function (_super) {\r\n __extends(FakeTexture, _super);\r\n function FakeTexture() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n FakeTexture.prototype.setFilters = function (minFilter, magFilter) { };\r\n FakeTexture.prototype.setWraps = function (uWrap, vWrap) { };\r\n FakeTexture.prototype.dispose = function () { };\r\n return FakeTexture;\r\n }(Texture));\r\n spine.FakeTexture = FakeTexture;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TextureAtlas = (function () {\r\n function TextureAtlas(atlasText, textureLoader) {\r\n this.pages = new Array();\r\n this.regions = new Array();\r\n this.load(atlasText, textureLoader);\r\n }\r\n TextureAtlas.prototype.load = function (atlasText, textureLoader) {\r\n if (textureLoader == null)\r\n throw new Error(\"textureLoader cannot be null.\");\r\n var reader = new TextureAtlasReader(atlasText);\r\n var tuple = new Array(4);\r\n var page = null;\r\n while (true) {\r\n var line = reader.readLine();\r\n if (line == null)\r\n break;\r\n line = line.trim();\r\n if (line.length == 0)\r\n page = null;\r\n else if (!page) {\r\n page = new TextureAtlasPage();\r\n page.name = line;\r\n if (reader.readTuple(tuple) == 2) {\r\n page.width = parseInt(tuple[0]);\r\n page.height = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n }\r\n reader.readTuple(tuple);\r\n page.minFilter = spine.Texture.filterFromString(tuple[0]);\r\n page.magFilter = spine.Texture.filterFromString(tuple[1]);\r\n var direction = reader.readValue();\r\n page.uWrap = spine.TextureWrap.ClampToEdge;\r\n page.vWrap = spine.TextureWrap.ClampToEdge;\r\n if (direction == \"x\")\r\n page.uWrap = spine.TextureWrap.Repeat;\r\n else if (direction == \"y\")\r\n page.vWrap = spine.TextureWrap.Repeat;\r\n else if (direction == \"xy\")\r\n page.uWrap = page.vWrap = spine.TextureWrap.Repeat;\r\n page.texture = textureLoader(line);\r\n page.texture.setFilters(page.minFilter, page.magFilter);\r\n page.texture.setWraps(page.uWrap, page.vWrap);\r\n page.width = page.texture.getImage().width;\r\n page.height = page.texture.getImage().height;\r\n this.pages.push(page);\r\n }\r\n else {\r\n var region = new TextureAtlasRegion();\r\n region.name = line;\r\n region.page = page;\r\n var rotateValue = reader.readValue();\r\n if (rotateValue.toLocaleLowerCase() == \"true\") {\r\n region.degrees = 90;\r\n }\r\n else if (rotateValue.toLocaleLowerCase() == \"false\") {\r\n region.degrees = 0;\r\n }\r\n else {\r\n region.degrees = parseFloat(rotateValue);\r\n }\r\n region.rotate = region.degrees == 90;\r\n reader.readTuple(tuple);\r\n var x = parseInt(tuple[0]);\r\n var y = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n var width = parseInt(tuple[0]);\r\n var height = parseInt(tuple[1]);\r\n region.u = x / page.width;\r\n region.v = y / page.height;\r\n if (region.rotate) {\r\n region.u2 = (x + height) / page.width;\r\n region.v2 = (y + width) / page.height;\r\n }\r\n else {\r\n region.u2 = (x + width) / page.width;\r\n region.v2 = (y + height) / page.height;\r\n }\r\n region.x = x;\r\n region.y = y;\r\n region.width = Math.abs(width);\r\n region.height = Math.abs(height);\r\n if (reader.readTuple(tuple) == 4) {\r\n if (reader.readTuple(tuple) == 4) {\r\n reader.readTuple(tuple);\r\n }\r\n }\r\n region.originalWidth = parseInt(tuple[0]);\r\n region.originalHeight = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n region.offsetX = parseInt(tuple[0]);\r\n region.offsetY = parseInt(tuple[1]);\r\n region.index = parseInt(reader.readValue());\r\n region.texture = page.texture;\r\n this.regions.push(region);\r\n }\r\n }\r\n };\r\n TextureAtlas.prototype.findRegion = function (name) {\r\n for (var i = 0; i < this.regions.length; i++) {\r\n if (this.regions[i].name == name) {\r\n return this.regions[i];\r\n }\r\n }\r\n return null;\r\n };\r\n TextureAtlas.prototype.dispose = function () {\r\n for (var i = 0; i < this.pages.length; i++) {\r\n this.pages[i].texture.dispose();\r\n }\r\n };\r\n return TextureAtlas;\r\n }());\r\n spine.TextureAtlas = TextureAtlas;\r\n var TextureAtlasReader = (function () {\r\n function TextureAtlasReader(text) {\r\n this.index = 0;\r\n this.lines = text.split(/\\r\\n|\\r|\\n/);\r\n }\r\n TextureAtlasReader.prototype.readLine = function () {\r\n if (this.index >= this.lines.length)\r\n return null;\r\n return this.lines[this.index++];\r\n };\r\n TextureAtlasReader.prototype.readValue = function () {\r\n var line = this.readLine();\r\n var colon = line.indexOf(\":\");\r\n if (colon == -1)\r\n throw new Error(\"Invalid line: \" + line);\r\n return line.substring(colon + 1).trim();\r\n };\r\n TextureAtlasReader.prototype.readTuple = function (tuple) {\r\n var line = this.readLine();\r\n var colon = line.indexOf(\":\");\r\n if (colon == -1)\r\n throw new Error(\"Invalid line: \" + line);\r\n var i = 0, lastMatch = colon + 1;\r\n for (; i < 3; i++) {\r\n var comma = line.indexOf(\",\", lastMatch);\r\n if (comma == -1)\r\n break;\r\n tuple[i] = line.substr(lastMatch, comma - lastMatch).trim();\r\n lastMatch = comma + 1;\r\n }\r\n tuple[i] = line.substring(lastMatch).trim();\r\n return i + 1;\r\n };\r\n return TextureAtlasReader;\r\n }());\r\n var TextureAtlasPage = (function () {\r\n function TextureAtlasPage() {\r\n }\r\n return TextureAtlasPage;\r\n }());\r\n spine.TextureAtlasPage = TextureAtlasPage;\r\n var TextureAtlasRegion = (function (_super) {\r\n __extends(TextureAtlasRegion, _super);\r\n function TextureAtlasRegion() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return TextureAtlasRegion;\r\n }(spine.TextureRegion));\r\n spine.TextureAtlasRegion = TextureAtlasRegion;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TransformConstraint = (function () {\r\n function TransformConstraint(data, skeleton) {\r\n this.rotateMix = 0;\r\n this.translateMix = 0;\r\n this.scaleMix = 0;\r\n this.shearMix = 0;\r\n this.temp = new spine.Vector2();\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.rotateMix = data.rotateMix;\r\n this.translateMix = data.translateMix;\r\n this.scaleMix = data.scaleMix;\r\n this.shearMix = data.shearMix;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findBone(data.target.name);\r\n }\r\n TransformConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n TransformConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n TransformConstraint.prototype.update = function () {\r\n if (this.data.local) {\r\n if (this.data.relative)\r\n this.applyRelativeLocal();\r\n else\r\n this.applyAbsoluteLocal();\r\n }\r\n else {\r\n if (this.data.relative)\r\n this.applyRelativeWorld();\r\n else\r\n this.applyAbsoluteWorld();\r\n }\r\n };\r\n TransformConstraint.prototype.applyAbsoluteWorld = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n var ta = target.a, tb = target.b, tc = target.c, td = target.d;\r\n var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n var offsetRotation = this.data.offsetRotation * degRadReflect;\r\n var offsetShearY = this.data.offsetShearY * degRadReflect;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n var modified = false;\r\n if (rotateMix != 0) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n var cos = Math.cos(r), sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n modified = true;\r\n }\r\n if (translateMix != 0) {\r\n var temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n bone.worldX += (temp.x - bone.worldX) * translateMix;\r\n bone.worldY += (temp.y - bone.worldY) * translateMix;\r\n modified = true;\r\n }\r\n if (scaleMix > 0) {\r\n var s = Math.sqrt(bone.a * bone.a + bone.c * bone.c);\r\n var ts = Math.sqrt(ta * ta + tc * tc);\r\n if (s > 0.00001)\r\n s = (s + (ts - s + this.data.offsetScaleX) * scaleMix) / s;\r\n bone.a *= s;\r\n bone.c *= s;\r\n s = Math.sqrt(bone.b * bone.b + bone.d * bone.d);\r\n ts = Math.sqrt(tb * tb + td * td);\r\n if (s > 0.00001)\r\n s = (s + (ts - s + this.data.offsetScaleY) * scaleMix) / s;\r\n bone.b *= s;\r\n bone.d *= s;\r\n modified = true;\r\n }\r\n if (shearMix > 0) {\r\n var b = bone.b, d = bone.d;\r\n var by = Math.atan2(d, b);\r\n var r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a));\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r = by + (r + offsetShearY) * shearMix;\r\n var s = Math.sqrt(b * b + d * d);\r\n bone.b = Math.cos(r) * s;\r\n bone.d = Math.sin(r) * s;\r\n modified = true;\r\n }\r\n if (modified)\r\n bone.appliedValid = false;\r\n }\r\n };\r\n TransformConstraint.prototype.applyRelativeWorld = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n var ta = target.a, tb = target.b, tc = target.c, td = target.d;\r\n var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n var offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n var modified = false;\r\n if (rotateMix != 0) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var r = Math.atan2(tc, ta) + offsetRotation;\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n var cos = Math.cos(r), sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n modified = true;\r\n }\r\n if (translateMix != 0) {\r\n var temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n bone.worldX += temp.x * translateMix;\r\n bone.worldY += temp.y * translateMix;\r\n modified = true;\r\n }\r\n if (scaleMix > 0) {\r\n var s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * scaleMix + 1;\r\n bone.a *= s;\r\n bone.c *= s;\r\n s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * scaleMix + 1;\r\n bone.b *= s;\r\n bone.d *= s;\r\n modified = true;\r\n }\r\n if (shearMix > 0) {\r\n var r = Math.atan2(td, tb) - Math.atan2(tc, ta);\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n var b = bone.b, d = bone.d;\r\n r = Math.atan2(d, b) + (r - spine.MathUtils.PI / 2 + offsetShearY) * shearMix;\r\n var s = Math.sqrt(b * b + d * d);\r\n bone.b = Math.cos(r) * s;\r\n bone.d = Math.sin(r) * s;\r\n modified = true;\r\n }\r\n if (modified)\r\n bone.appliedValid = false;\r\n }\r\n };\r\n TransformConstraint.prototype.applyAbsoluteLocal = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n if (!target.appliedValid)\r\n target.updateAppliedTransform();\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var rotation = bone.arotation;\r\n if (rotateMix != 0) {\r\n var r = target.arotation - rotation + this.data.offsetRotation;\r\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n rotation += r * rotateMix;\r\n }\r\n var x = bone.ax, y = bone.ay;\r\n if (translateMix != 0) {\r\n x += (target.ax - x + this.data.offsetX) * translateMix;\r\n y += (target.ay - y + this.data.offsetY) * translateMix;\r\n }\r\n var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n if (scaleMix != 0) {\r\n if (scaleX > 0.00001)\r\n scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * scaleMix) / scaleX;\r\n if (scaleY > 0.00001)\r\n scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * scaleMix) / scaleY;\r\n }\r\n var shearY = bone.ashearY;\r\n if (shearMix != 0) {\r\n var r = target.ashearY - shearY + this.data.offsetShearY;\r\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n bone.shearY += r * shearMix;\r\n }\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n };\r\n TransformConstraint.prototype.applyRelativeLocal = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n if (!target.appliedValid)\r\n target.updateAppliedTransform();\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var rotation = bone.arotation;\r\n if (rotateMix != 0)\r\n rotation += (target.arotation + this.data.offsetRotation) * rotateMix;\r\n var x = bone.ax, y = bone.ay;\r\n if (translateMix != 0) {\r\n x += (target.ax + this.data.offsetX) * translateMix;\r\n y += (target.ay + this.data.offsetY) * translateMix;\r\n }\r\n var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n if (scaleMix != 0) {\r\n if (scaleX > 0.00001)\r\n scaleX *= ((target.ascaleX - 1 + this.data.offsetScaleX) * scaleMix) + 1;\r\n if (scaleY > 0.00001)\r\n scaleY *= ((target.ascaleY - 1 + this.data.offsetScaleY) * scaleMix) + 1;\r\n }\r\n var shearY = bone.ashearY;\r\n if (shearMix != 0)\r\n shearY += (target.ashearY + this.data.offsetShearY) * shearMix;\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n };\r\n return TransformConstraint;\r\n }());\r\n spine.TransformConstraint = TransformConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TransformConstraintData = (function (_super) {\r\n __extends(TransformConstraintData, _super);\r\n function TransformConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n _this.rotateMix = 0;\r\n _this.translateMix = 0;\r\n _this.scaleMix = 0;\r\n _this.shearMix = 0;\r\n _this.offsetRotation = 0;\r\n _this.offsetX = 0;\r\n _this.offsetY = 0;\r\n _this.offsetScaleX = 0;\r\n _this.offsetScaleY = 0;\r\n _this.offsetShearY = 0;\r\n _this.relative = false;\r\n _this.local = false;\r\n return _this;\r\n }\r\n return TransformConstraintData;\r\n }(spine.ConstraintData));\r\n spine.TransformConstraintData = TransformConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Triangulator = (function () {\r\n function Triangulator() {\r\n this.convexPolygons = new Array();\r\n this.convexPolygonsIndices = new Array();\r\n this.indicesArray = new Array();\r\n this.isConcaveArray = new Array();\r\n this.triangles = new Array();\r\n this.polygonPool = new spine.Pool(function () {\r\n return new Array();\r\n });\r\n this.polygonIndicesPool = new spine.Pool(function () {\r\n return new Array();\r\n });\r\n }\r\n Triangulator.prototype.triangulate = function (verticesArray) {\r\n var vertices = verticesArray;\r\n var vertexCount = verticesArray.length >> 1;\r\n var indices = this.indicesArray;\r\n indices.length = 0;\r\n for (var i = 0; i < vertexCount; i++)\r\n indices[i] = i;\r\n var isConcave = this.isConcaveArray;\r\n isConcave.length = 0;\r\n for (var i = 0, n = vertexCount; i < n; ++i)\r\n isConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices);\r\n var triangles = this.triangles;\r\n triangles.length = 0;\r\n while (vertexCount > 3) {\r\n var previous = vertexCount - 1, i = 0, next = 1;\r\n while (true) {\r\n outer: if (!isConcave[i]) {\r\n var p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\r\n var p1x = vertices[p1], p1y = vertices[p1 + 1];\r\n var p2x = vertices[p2], p2y = vertices[p2 + 1];\r\n var p3x = vertices[p3], p3y = vertices[p3 + 1];\r\n for (var ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\r\n if (!isConcave[ii])\r\n continue;\r\n var v = indices[ii] << 1;\r\n var vx = vertices[v], vy = vertices[v + 1];\r\n if (Triangulator.positiveArea(p3x, p3y, p1x, p1y, vx, vy)) {\r\n if (Triangulator.positiveArea(p1x, p1y, p2x, p2y, vx, vy)) {\r\n if (Triangulator.positiveArea(p2x, p2y, p3x, p3y, vx, vy))\r\n break outer;\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n if (next == 0) {\r\n do {\r\n if (!isConcave[i])\r\n break;\r\n i--;\r\n } while (i > 0);\r\n break;\r\n }\r\n previous = i;\r\n i = next;\r\n next = (next + 1) % vertexCount;\r\n }\r\n triangles.push(indices[(vertexCount + i - 1) % vertexCount]);\r\n triangles.push(indices[i]);\r\n triangles.push(indices[(i + 1) % vertexCount]);\r\n indices.splice(i, 1);\r\n isConcave.splice(i, 1);\r\n vertexCount--;\r\n var previousIndex = (vertexCount + i - 1) % vertexCount;\r\n var nextIndex = i == vertexCount ? 0 : i;\r\n isConcave[previousIndex] = Triangulator.isConcave(previousIndex, vertexCount, vertices, indices);\r\n isConcave[nextIndex] = Triangulator.isConcave(nextIndex, vertexCount, vertices, indices);\r\n }\r\n if (vertexCount == 3) {\r\n triangles.push(indices[2]);\r\n triangles.push(indices[0]);\r\n triangles.push(indices[1]);\r\n }\r\n return triangles;\r\n };\r\n Triangulator.prototype.decompose = function (verticesArray, triangles) {\r\n var vertices = verticesArray;\r\n var convexPolygons = this.convexPolygons;\r\n this.polygonPool.freeAll(convexPolygons);\r\n convexPolygons.length = 0;\r\n var convexPolygonsIndices = this.convexPolygonsIndices;\r\n this.polygonIndicesPool.freeAll(convexPolygonsIndices);\r\n convexPolygonsIndices.length = 0;\r\n var polygonIndices = this.polygonIndicesPool.obtain();\r\n polygonIndices.length = 0;\r\n var polygon = this.polygonPool.obtain();\r\n polygon.length = 0;\r\n var fanBaseIndex = -1, lastWinding = 0;\r\n for (var i = 0, n = triangles.length; i < n; i += 3) {\r\n var t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\r\n var x1 = vertices[t1], y1 = vertices[t1 + 1];\r\n var x2 = vertices[t2], y2 = vertices[t2 + 1];\r\n var x3 = vertices[t3], y3 = vertices[t3 + 1];\r\n var merged = false;\r\n if (fanBaseIndex == t1) {\r\n var o = polygon.length - 4;\r\n var winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3);\r\n var winding2 = Triangulator.winding(x3, y3, polygon[0], polygon[1], polygon[2], polygon[3]);\r\n if (winding1 == lastWinding && winding2 == lastWinding) {\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices.push(t3);\r\n merged = true;\r\n }\r\n }\r\n if (!merged) {\r\n if (polygon.length > 0) {\r\n convexPolygons.push(polygon);\r\n convexPolygonsIndices.push(polygonIndices);\r\n }\r\n else {\r\n this.polygonPool.free(polygon);\r\n this.polygonIndicesPool.free(polygonIndices);\r\n }\r\n polygon = this.polygonPool.obtain();\r\n polygon.length = 0;\r\n polygon.push(x1);\r\n polygon.push(y1);\r\n polygon.push(x2);\r\n polygon.push(y2);\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices = this.polygonIndicesPool.obtain();\r\n polygonIndices.length = 0;\r\n polygonIndices.push(t1);\r\n polygonIndices.push(t2);\r\n polygonIndices.push(t3);\r\n lastWinding = Triangulator.winding(x1, y1, x2, y2, x3, y3);\r\n fanBaseIndex = t1;\r\n }\r\n }\r\n if (polygon.length > 0) {\r\n convexPolygons.push(polygon);\r\n convexPolygonsIndices.push(polygonIndices);\r\n }\r\n for (var i = 0, n = convexPolygons.length; i < n; i++) {\r\n polygonIndices = convexPolygonsIndices[i];\r\n if (polygonIndices.length == 0)\r\n continue;\r\n var firstIndex = polygonIndices[0];\r\n var lastIndex = polygonIndices[polygonIndices.length - 1];\r\n polygon = convexPolygons[i];\r\n var o = polygon.length - 4;\r\n var prevPrevX = polygon[o], prevPrevY = polygon[o + 1];\r\n var prevX = polygon[o + 2], prevY = polygon[o + 3];\r\n var firstX = polygon[0], firstY = polygon[1];\r\n var secondX = polygon[2], secondY = polygon[3];\r\n var winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\r\n for (var ii = 0; ii < n; ii++) {\r\n if (ii == i)\r\n continue;\r\n var otherIndices = convexPolygonsIndices[ii];\r\n if (otherIndices.length != 3)\r\n continue;\r\n var otherFirstIndex = otherIndices[0];\r\n var otherSecondIndex = otherIndices[1];\r\n var otherLastIndex = otherIndices[2];\r\n var otherPoly = convexPolygons[ii];\r\n var x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1];\r\n if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex)\r\n continue;\r\n var winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\r\n var winding2 = Triangulator.winding(x3, y3, firstX, firstY, secondX, secondY);\r\n if (winding1 == winding && winding2 == winding) {\r\n otherPoly.length = 0;\r\n otherIndices.length = 0;\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices.push(otherLastIndex);\r\n prevPrevX = prevX;\r\n prevPrevY = prevY;\r\n prevX = x3;\r\n prevY = y3;\r\n ii = 0;\r\n }\r\n }\r\n }\r\n for (var i = convexPolygons.length - 1; i >= 0; i--) {\r\n polygon = convexPolygons[i];\r\n if (polygon.length == 0) {\r\n convexPolygons.splice(i, 1);\r\n this.polygonPool.free(polygon);\r\n polygonIndices = convexPolygonsIndices[i];\r\n convexPolygonsIndices.splice(i, 1);\r\n this.polygonIndicesPool.free(polygonIndices);\r\n }\r\n }\r\n return convexPolygons;\r\n };\r\n Triangulator.isConcave = function (index, vertexCount, vertices, indices) {\r\n var previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\r\n var current = indices[index] << 1;\r\n var next = indices[(index + 1) % vertexCount] << 1;\r\n return !this.positiveArea(vertices[previous], vertices[previous + 1], vertices[current], vertices[current + 1], vertices[next], vertices[next + 1]);\r\n };\r\n Triangulator.positiveArea = function (p1x, p1y, p2x, p2y, p3x, p3y) {\r\n return p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\r\n };\r\n Triangulator.winding = function (p1x, p1y, p2x, p2y, p3x, p3y) {\r\n var px = p2x - p1x, py = p2y - p1y;\r\n return p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\r\n };\r\n return Triangulator;\r\n }());\r\n spine.Triangulator = Triangulator;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IntSet = (function () {\r\n function IntSet() {\r\n this.array = new Array();\r\n }\r\n IntSet.prototype.add = function (value) {\r\n var contains = this.contains(value);\r\n this.array[value | 0] = value | 0;\r\n return !contains;\r\n };\r\n IntSet.prototype.contains = function (value) {\r\n return this.array[value | 0] != undefined;\r\n };\r\n IntSet.prototype.remove = function (value) {\r\n this.array[value | 0] = undefined;\r\n };\r\n IntSet.prototype.clear = function () {\r\n this.array.length = 0;\r\n };\r\n return IntSet;\r\n }());\r\n spine.IntSet = IntSet;\r\n var Color = (function () {\r\n function Color(r, g, b, a) {\r\n if (r === void 0) { r = 0; }\r\n if (g === void 0) { g = 0; }\r\n if (b === void 0) { b = 0; }\r\n if (a === void 0) { a = 0; }\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n }\r\n Color.prototype.set = function (r, g, b, a) {\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n this.clamp();\r\n return this;\r\n };\r\n Color.prototype.setFromColor = function (c) {\r\n this.r = c.r;\r\n this.g = c.g;\r\n this.b = c.b;\r\n this.a = c.a;\r\n return this;\r\n };\r\n Color.prototype.setFromString = function (hex) {\r\n hex = hex.charAt(0) == '#' ? hex.substr(1) : hex;\r\n this.r = parseInt(hex.substr(0, 2), 16) / 255.0;\r\n this.g = parseInt(hex.substr(2, 2), 16) / 255.0;\r\n this.b = parseInt(hex.substr(4, 2), 16) / 255.0;\r\n this.a = (hex.length != 8 ? 255 : parseInt(hex.substr(6, 2), 16)) / 255.0;\r\n return this;\r\n };\r\n Color.prototype.add = function (r, g, b, a) {\r\n this.r += r;\r\n this.g += g;\r\n this.b += b;\r\n this.a += a;\r\n this.clamp();\r\n return this;\r\n };\r\n Color.prototype.clamp = function () {\r\n if (this.r < 0)\r\n this.r = 0;\r\n else if (this.r > 1)\r\n this.r = 1;\r\n if (this.g < 0)\r\n this.g = 0;\r\n else if (this.g > 1)\r\n this.g = 1;\r\n if (this.b < 0)\r\n this.b = 0;\r\n else if (this.b > 1)\r\n this.b = 1;\r\n if (this.a < 0)\r\n this.a = 0;\r\n else if (this.a > 1)\r\n this.a = 1;\r\n return this;\r\n };\r\n Color.rgba8888ToColor = function (color, value) {\r\n color.r = ((value & 0xff000000) >>> 24) / 255;\r\n color.g = ((value & 0x00ff0000) >>> 16) / 255;\r\n color.b = ((value & 0x0000ff00) >>> 8) / 255;\r\n color.a = ((value & 0x000000ff)) / 255;\r\n };\r\n Color.rgb888ToColor = function (color, value) {\r\n color.r = ((value & 0x00ff0000) >>> 16) / 255;\r\n color.g = ((value & 0x0000ff00) >>> 8) / 255;\r\n color.b = ((value & 0x000000ff)) / 255;\r\n };\r\n Color.WHITE = new Color(1, 1, 1, 1);\r\n Color.RED = new Color(1, 0, 0, 1);\r\n Color.GREEN = new Color(0, 1, 0, 1);\r\n Color.BLUE = new Color(0, 0, 1, 1);\r\n Color.MAGENTA = new Color(1, 0, 1, 1);\r\n return Color;\r\n }());\r\n spine.Color = Color;\r\n var MathUtils = (function () {\r\n function MathUtils() {\r\n }\r\n MathUtils.clamp = function (value, min, max) {\r\n if (value < min)\r\n return min;\r\n if (value > max)\r\n return max;\r\n return value;\r\n };\r\n MathUtils.cosDeg = function (degrees) {\r\n return Math.cos(degrees * MathUtils.degRad);\r\n };\r\n MathUtils.sinDeg = function (degrees) {\r\n return Math.sin(degrees * MathUtils.degRad);\r\n };\r\n MathUtils.signum = function (value) {\r\n return value > 0 ? 1 : value < 0 ? -1 : 0;\r\n };\r\n MathUtils.toInt = function (x) {\r\n return x > 0 ? Math.floor(x) : Math.ceil(x);\r\n };\r\n MathUtils.cbrt = function (x) {\r\n var y = Math.pow(Math.abs(x), 1 / 3);\r\n return x < 0 ? -y : y;\r\n };\r\n MathUtils.randomTriangular = function (min, max) {\r\n return MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\r\n };\r\n MathUtils.randomTriangularWith = function (min, max, mode) {\r\n var u = Math.random();\r\n var d = max - min;\r\n if (u <= (mode - min) / d)\r\n return min + Math.sqrt(u * d * (mode - min));\r\n return max - Math.sqrt((1 - u) * d * (max - mode));\r\n };\r\n MathUtils.PI = 3.1415927;\r\n MathUtils.PI2 = MathUtils.PI * 2;\r\n MathUtils.radiansToDegrees = 180 / MathUtils.PI;\r\n MathUtils.radDeg = MathUtils.radiansToDegrees;\r\n MathUtils.degreesToRadians = MathUtils.PI / 180;\r\n MathUtils.degRad = MathUtils.degreesToRadians;\r\n return MathUtils;\r\n }());\r\n spine.MathUtils = MathUtils;\r\n var Interpolation = (function () {\r\n function Interpolation() {\r\n }\r\n Interpolation.prototype.apply = function (start, end, a) {\r\n return start + (end - start) * this.applyInternal(a);\r\n };\r\n return Interpolation;\r\n }());\r\n spine.Interpolation = Interpolation;\r\n var Pow = (function (_super) {\r\n __extends(Pow, _super);\r\n function Pow(power) {\r\n var _this = _super.call(this) || this;\r\n _this.power = 2;\r\n _this.power = power;\r\n return _this;\r\n }\r\n Pow.prototype.applyInternal = function (a) {\r\n if (a <= 0.5)\r\n return Math.pow(a * 2, this.power) / 2;\r\n return Math.pow((a - 1) * 2, this.power) / (this.power % 2 == 0 ? -2 : 2) + 1;\r\n };\r\n return Pow;\r\n }(Interpolation));\r\n spine.Pow = Pow;\r\n var PowOut = (function (_super) {\r\n __extends(PowOut, _super);\r\n function PowOut(power) {\r\n return _super.call(this, power) || this;\r\n }\r\n PowOut.prototype.applyInternal = function (a) {\r\n return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\r\n };\r\n return PowOut;\r\n }(Pow));\r\n spine.PowOut = PowOut;\r\n var Utils = (function () {\r\n function Utils() {\r\n }\r\n Utils.arrayCopy = function (source, sourceStart, dest, destStart, numElements) {\r\n for (var i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\r\n dest[j] = source[i];\r\n }\r\n };\r\n Utils.setArraySize = function (array, size, value) {\r\n if (value === void 0) { value = 0; }\r\n var oldSize = array.length;\r\n if (oldSize == size)\r\n return array;\r\n array.length = size;\r\n if (oldSize < size) {\r\n for (var i = oldSize; i < size; i++)\r\n array[i] = value;\r\n }\r\n return array;\r\n };\r\n Utils.ensureArrayCapacity = function (array, size, value) {\r\n if (value === void 0) { value = 0; }\r\n if (array.length >= size)\r\n return array;\r\n return Utils.setArraySize(array, size, value);\r\n };\r\n Utils.newArray = function (size, defaultValue) {\r\n var array = new Array(size);\r\n for (var i = 0; i < size; i++)\r\n array[i] = defaultValue;\r\n return array;\r\n };\r\n Utils.newFloatArray = function (size) {\r\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\r\n return new Float32Array(size);\r\n }\r\n else {\r\n var array = new Array(size);\r\n for (var i = 0; i < array.length; i++)\r\n array[i] = 0;\r\n return array;\r\n }\r\n };\r\n Utils.newShortArray = function (size) {\r\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\r\n return new Int16Array(size);\r\n }\r\n else {\r\n var array = new Array(size);\r\n for (var i = 0; i < array.length; i++)\r\n array[i] = 0;\r\n return array;\r\n }\r\n };\r\n Utils.toFloatArray = function (array) {\r\n return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\r\n };\r\n Utils.toSinglePrecision = function (value) {\r\n return Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;\r\n };\r\n Utils.webkit602BugfixHelper = function (alpha, blend) {\r\n };\r\n Utils.contains = function (array, element, identity) {\r\n if (identity === void 0) { identity = true; }\r\n for (var i = 0; i < array.length; i++) {\r\n if (array[i] == element)\r\n return true;\r\n }\r\n return false;\r\n };\r\n Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== \"undefined\";\r\n return Utils;\r\n }());\r\n spine.Utils = Utils;\r\n var DebugUtils = (function () {\r\n function DebugUtils() {\r\n }\r\n DebugUtils.logBones = function (skeleton) {\r\n for (var i = 0; i < skeleton.bones.length; i++) {\r\n var bone = skeleton.bones[i];\r\n console.log(bone.data.name + \", \" + bone.a + \", \" + bone.b + \", \" + bone.c + \", \" + bone.d + \", \" + bone.worldX + \", \" + bone.worldY);\r\n }\r\n };\r\n return DebugUtils;\r\n }());\r\n spine.DebugUtils = DebugUtils;\r\n var Pool = (function () {\r\n function Pool(instantiator) {\r\n this.items = new Array();\r\n this.instantiator = instantiator;\r\n }\r\n Pool.prototype.obtain = function () {\r\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\r\n };\r\n Pool.prototype.free = function (item) {\r\n if (item.reset)\r\n item.reset();\r\n this.items.push(item);\r\n };\r\n Pool.prototype.freeAll = function (items) {\r\n for (var i = 0; i < items.length; i++) {\r\n if (items[i].reset)\r\n items[i].reset();\r\n this.items[i] = items[i];\r\n }\r\n };\r\n Pool.prototype.clear = function () {\r\n this.items.length = 0;\r\n };\r\n return Pool;\r\n }());\r\n spine.Pool = Pool;\r\n var Vector2 = (function () {\r\n function Vector2(x, y) {\r\n if (x === void 0) { x = 0; }\r\n if (y === void 0) { y = 0; }\r\n this.x = x;\r\n this.y = y;\r\n }\r\n Vector2.prototype.set = function (x, y) {\r\n this.x = x;\r\n this.y = y;\r\n return this;\r\n };\r\n Vector2.prototype.length = function () {\r\n var x = this.x;\r\n var y = this.y;\r\n return Math.sqrt(x * x + y * y);\r\n };\r\n Vector2.prototype.normalize = function () {\r\n var len = this.length();\r\n if (len != 0) {\r\n this.x /= len;\r\n this.y /= len;\r\n }\r\n return this;\r\n };\r\n return Vector2;\r\n }());\r\n spine.Vector2 = Vector2;\r\n var TimeKeeper = (function () {\r\n function TimeKeeper() {\r\n this.maxDelta = 0.064;\r\n this.framesPerSecond = 0;\r\n this.delta = 0;\r\n this.totalTime = 0;\r\n this.lastTime = Date.now() / 1000;\r\n this.frameCount = 0;\r\n this.frameTime = 0;\r\n }\r\n TimeKeeper.prototype.update = function () {\r\n var now = Date.now() / 1000;\r\n this.delta = now - this.lastTime;\r\n this.frameTime += this.delta;\r\n this.totalTime += this.delta;\r\n if (this.delta > this.maxDelta)\r\n this.delta = this.maxDelta;\r\n this.lastTime = now;\r\n this.frameCount++;\r\n if (this.frameTime > 1) {\r\n this.framesPerSecond = this.frameCount / this.frameTime;\r\n this.frameTime = 0;\r\n this.frameCount = 0;\r\n }\r\n };\r\n return TimeKeeper;\r\n }());\r\n spine.TimeKeeper = TimeKeeper;\r\n var WindowedMean = (function () {\r\n function WindowedMean(windowSize) {\r\n if (windowSize === void 0) { windowSize = 32; }\r\n this.addedValues = 0;\r\n this.lastValue = 0;\r\n this.mean = 0;\r\n this.dirty = true;\r\n this.values = new Array(windowSize);\r\n }\r\n WindowedMean.prototype.hasEnoughData = function () {\r\n return this.addedValues >= this.values.length;\r\n };\r\n WindowedMean.prototype.addValue = function (value) {\r\n if (this.addedValues < this.values.length)\r\n this.addedValues++;\r\n this.values[this.lastValue++] = value;\r\n if (this.lastValue > this.values.length - 1)\r\n this.lastValue = 0;\r\n this.dirty = true;\r\n };\r\n WindowedMean.prototype.getMean = function () {\r\n if (this.hasEnoughData()) {\r\n if (this.dirty) {\r\n var mean = 0;\r\n for (var i = 0; i < this.values.length; i++) {\r\n mean += this.values[i];\r\n }\r\n this.mean = mean / this.values.length;\r\n this.dirty = false;\r\n }\r\n return this.mean;\r\n }\r\n else {\r\n return 0;\r\n }\r\n };\r\n return WindowedMean;\r\n }());\r\n spine.WindowedMean = WindowedMean;\r\n})(spine || (spine = {}));\r\n(function () {\r\n if (!Math.fround) {\r\n Math.fround = (function (array) {\r\n return function (x) {\r\n return array[0] = x, array[0];\r\n };\r\n })(new Float32Array(1));\r\n }\r\n})();\r\nvar spine;\r\n(function (spine) {\r\n var Attachment = (function () {\r\n function Attachment(name) {\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n return Attachment;\r\n }());\r\n spine.Attachment = Attachment;\r\n var VertexAttachment = (function (_super) {\r\n __extends(VertexAttachment, _super);\r\n function VertexAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.id = (VertexAttachment.nextID++ & 65535) << 11;\r\n _this.worldVerticesLength = 0;\r\n _this.deformAttachment = _this;\r\n return _this;\r\n }\r\n VertexAttachment.prototype.computeWorldVertices = function (slot, start, count, worldVertices, offset, stride) {\r\n count = offset + (count >> 1) * stride;\r\n var skeleton = slot.bone.skeleton;\r\n var deformArray = slot.deform;\r\n var vertices = this.vertices;\r\n var bones = this.bones;\r\n if (bones == null) {\r\n if (deformArray.length > 0)\r\n vertices = deformArray;\r\n var bone = slot.bone;\r\n var x = bone.worldX;\r\n var y = bone.worldY;\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n for (var v_1 = start, w = offset; w < count; v_1 += 2, w += stride) {\r\n var vx = vertices[v_1], vy = vertices[v_1 + 1];\r\n worldVertices[w] = vx * a + vy * b + x;\r\n worldVertices[w + 1] = vx * c + vy * d + y;\r\n }\r\n return;\r\n }\r\n var v = 0, skip = 0;\r\n for (var i = 0; i < start; i += 2) {\r\n var n = bones[v];\r\n v += n + 1;\r\n skip += n;\r\n }\r\n var skeletonBones = skeleton.bones;\r\n if (deformArray.length == 0) {\r\n for (var w = offset, b = skip * 3; w < count; w += stride) {\r\n var wx = 0, wy = 0;\r\n var n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3) {\r\n var bone = skeletonBones[bones[v]];\r\n var vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];\r\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\r\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\r\n }\r\n worldVertices[w] = wx;\r\n worldVertices[w + 1] = wy;\r\n }\r\n }\r\n else {\r\n var deform = deformArray;\r\n for (var w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\r\n var wx = 0, wy = 0;\r\n var n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3, f += 2) {\r\n var bone = skeletonBones[bones[v]];\r\n var vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];\r\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\r\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\r\n }\r\n worldVertices[w] = wx;\r\n worldVertices[w + 1] = wy;\r\n }\r\n }\r\n };\r\n VertexAttachment.prototype.copyTo = function (attachment) {\r\n if (this.bones != null) {\r\n attachment.bones = new Array(this.bones.length);\r\n spine.Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\r\n }\r\n else\r\n attachment.bones = null;\r\n if (this.vertices != null) {\r\n attachment.vertices = spine.Utils.newFloatArray(this.vertices.length);\r\n spine.Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\r\n }\r\n else\r\n attachment.vertices = null;\r\n attachment.worldVerticesLength = this.worldVerticesLength;\r\n attachment.deformAttachment = this.deformAttachment;\r\n };\r\n VertexAttachment.nextID = 0;\r\n return VertexAttachment;\r\n }(Attachment));\r\n spine.VertexAttachment = VertexAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AttachmentType;\r\n (function (AttachmentType) {\r\n AttachmentType[AttachmentType[\"Region\"] = 0] = \"Region\";\r\n AttachmentType[AttachmentType[\"BoundingBox\"] = 1] = \"BoundingBox\";\r\n AttachmentType[AttachmentType[\"Mesh\"] = 2] = \"Mesh\";\r\n AttachmentType[AttachmentType[\"LinkedMesh\"] = 3] = \"LinkedMesh\";\r\n AttachmentType[AttachmentType[\"Path\"] = 4] = \"Path\";\r\n AttachmentType[AttachmentType[\"Point\"] = 5] = \"Point\";\r\n AttachmentType[AttachmentType[\"Clipping\"] = 6] = \"Clipping\";\r\n })(AttachmentType = spine.AttachmentType || (spine.AttachmentType = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BoundingBoxAttachment = (function (_super) {\r\n __extends(BoundingBoxAttachment, _super);\r\n function BoundingBoxAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n BoundingBoxAttachment.prototype.copy = function () {\r\n var copy = new BoundingBoxAttachment(name);\r\n this.copyTo(copy);\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return BoundingBoxAttachment;\r\n }(spine.VertexAttachment));\r\n spine.BoundingBoxAttachment = BoundingBoxAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var ClippingAttachment = (function (_super) {\r\n __extends(ClippingAttachment, _super);\r\n function ClippingAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(0.2275, 0.2275, 0.8078, 1);\r\n return _this;\r\n }\r\n ClippingAttachment.prototype.copy = function () {\r\n var copy = new ClippingAttachment(name);\r\n this.copyTo(copy);\r\n copy.endSlot = this.endSlot;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return ClippingAttachment;\r\n }(spine.VertexAttachment));\r\n spine.ClippingAttachment = ClippingAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var MeshAttachment = (function (_super) {\r\n __extends(MeshAttachment, _super);\r\n function MeshAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n _this.tempColor = new spine.Color(0, 0, 0, 0);\r\n return _this;\r\n }\r\n MeshAttachment.prototype.updateUVs = function () {\r\n var regionUVs = this.regionUVs;\r\n if (this.uvs == null || this.uvs.length != regionUVs.length)\r\n this.uvs = spine.Utils.newFloatArray(regionUVs.length);\r\n var uvs = this.uvs;\r\n var n = this.uvs.length;\r\n var u = this.region.u, v = this.region.v, width = 0, height = 0;\r\n if (this.region instanceof spine.TextureAtlasRegion) {\r\n var region = this.region;\r\n var textureWidth = region.texture.getImage().width, textureHeight = region.texture.getImage().height;\r\n switch (region.degrees) {\r\n case 90:\r\n u -= (region.originalHeight - region.offsetY - region.height) / textureWidth;\r\n v -= (region.originalWidth - region.offsetX - region.width) / textureHeight;\r\n width = region.originalHeight / textureWidth;\r\n height = region.originalWidth / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + regionUVs[i + 1] * width;\r\n uvs[i + 1] = v + (1 - regionUVs[i]) * height;\r\n }\r\n return;\r\n case 180:\r\n u -= (region.originalWidth - region.offsetX - region.width) / textureWidth;\r\n v -= region.offsetY / textureHeight;\r\n width = region.originalWidth / textureWidth;\r\n height = region.originalHeight / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + (1 - regionUVs[i]) * width;\r\n uvs[i + 1] = v + (1 - regionUVs[i + 1]) * height;\r\n }\r\n return;\r\n case 270:\r\n u -= region.offsetY / textureWidth;\r\n v -= region.offsetX / textureHeight;\r\n width = region.originalHeight / textureWidth;\r\n height = region.originalWidth / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + (1 - regionUVs[i + 1]) * width;\r\n uvs[i + 1] = v + regionUVs[i] * height;\r\n }\r\n return;\r\n }\r\n u -= region.offsetX / textureWidth;\r\n v -= (region.originalHeight - region.offsetY - region.height) / textureHeight;\r\n width = region.originalWidth / textureWidth;\r\n height = region.originalHeight / textureHeight;\r\n }\r\n else if (this.region == null) {\r\n u = v = 0;\r\n width = height = 1;\r\n }\r\n else {\r\n width = this.region.u2 - u;\r\n height = this.region.v2 - v;\r\n }\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + regionUVs[i] * width;\r\n uvs[i + 1] = v + regionUVs[i + 1] * height;\r\n }\r\n };\r\n MeshAttachment.prototype.getParentMesh = function () {\r\n return this.parentMesh;\r\n };\r\n MeshAttachment.prototype.setParentMesh = function (parentMesh) {\r\n this.parentMesh = parentMesh;\r\n if (parentMesh != null) {\r\n this.bones = parentMesh.bones;\r\n this.vertices = parentMesh.vertices;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n this.regionUVs = parentMesh.regionUVs;\r\n this.triangles = parentMesh.triangles;\r\n this.hullLength = parentMesh.hullLength;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n }\r\n };\r\n MeshAttachment.prototype.copy = function () {\r\n if (this.parentMesh != null)\r\n return this.newLinkedMesh();\r\n var copy = new MeshAttachment(this.name);\r\n copy.region = this.region;\r\n copy.path = this.path;\r\n copy.color.setFromColor(this.color);\r\n this.copyTo(copy);\r\n copy.regionUVs = new Array(this.regionUVs.length);\r\n spine.Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\r\n copy.uvs = new Array(this.uvs.length);\r\n spine.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);\r\n copy.triangles = new Array(this.triangles.length);\r\n spine.Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\r\n copy.hullLength = this.hullLength;\r\n if (this.edges != null) {\r\n copy.edges = new Array(this.edges.length);\r\n spine.Utils.arrayCopy(this.edges, 0, copy.edges, 0, this.edges.length);\r\n }\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n return copy;\r\n };\r\n MeshAttachment.prototype.newLinkedMesh = function () {\r\n var copy = new MeshAttachment(this.name);\r\n copy.region = this.region;\r\n copy.path = this.path;\r\n copy.color.setFromColor(this.color);\r\n copy.deformAttachment = this.deformAttachment;\r\n copy.setParentMesh(this.parentMesh != null ? this.parentMesh : this);\r\n copy.updateUVs();\r\n return copy;\r\n };\r\n return MeshAttachment;\r\n }(spine.VertexAttachment));\r\n spine.MeshAttachment = MeshAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathAttachment = (function (_super) {\r\n __extends(PathAttachment, _super);\r\n function PathAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.closed = false;\r\n _this.constantSpeed = false;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n PathAttachment.prototype.copy = function () {\r\n var copy = new PathAttachment(name);\r\n this.copyTo(copy);\r\n copy.lengths = new Array(this.lengths.length);\r\n spine.Utils.arrayCopy(this.lengths, 0, copy.lengths, 0, this.lengths.length);\r\n copy.closed = closed;\r\n copy.constantSpeed = this.constantSpeed;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return PathAttachment;\r\n }(spine.VertexAttachment));\r\n spine.PathAttachment = PathAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PointAttachment = (function (_super) {\r\n __extends(PointAttachment, _super);\r\n function PointAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(0.38, 0.94, 0, 1);\r\n return _this;\r\n }\r\n PointAttachment.prototype.computeWorldPosition = function (bone, point) {\r\n point.x = this.x * bone.a + this.y * bone.b + bone.worldX;\r\n point.y = this.x * bone.c + this.y * bone.d + bone.worldY;\r\n return point;\r\n };\r\n PointAttachment.prototype.computeWorldRotation = function (bone) {\r\n var cos = spine.MathUtils.cosDeg(this.rotation), sin = spine.MathUtils.sinDeg(this.rotation);\r\n var x = cos * bone.a + sin * bone.b;\r\n var y = cos * bone.c + sin * bone.d;\r\n return Math.atan2(y, x) * spine.MathUtils.radDeg;\r\n };\r\n PointAttachment.prototype.copy = function () {\r\n var copy = new PointAttachment(name);\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.rotation = this.rotation;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return PointAttachment;\r\n }(spine.VertexAttachment));\r\n spine.PointAttachment = PointAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var RegionAttachment = (function (_super) {\r\n __extends(RegionAttachment, _super);\r\n function RegionAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.x = 0;\r\n _this.y = 0;\r\n _this.scaleX = 1;\r\n _this.scaleY = 1;\r\n _this.rotation = 0;\r\n _this.width = 0;\r\n _this.height = 0;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n _this.offset = spine.Utils.newFloatArray(8);\r\n _this.uvs = spine.Utils.newFloatArray(8);\r\n _this.tempColor = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n RegionAttachment.prototype.updateOffset = function () {\r\n var regionScaleX = this.width / this.region.originalWidth * this.scaleX;\r\n var regionScaleY = this.height / this.region.originalHeight * this.scaleY;\r\n var localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\r\n var localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\r\n var localX2 = localX + this.region.width * regionScaleX;\r\n var localY2 = localY + this.region.height * regionScaleY;\r\n var radians = this.rotation * Math.PI / 180;\r\n var cos = Math.cos(radians);\r\n var sin = Math.sin(radians);\r\n var localXCos = localX * cos + this.x;\r\n var localXSin = localX * sin;\r\n var localYCos = localY * cos + this.y;\r\n var localYSin = localY * sin;\r\n var localX2Cos = localX2 * cos + this.x;\r\n var localX2Sin = localX2 * sin;\r\n var localY2Cos = localY2 * cos + this.y;\r\n var localY2Sin = localY2 * sin;\r\n var offset = this.offset;\r\n offset[RegionAttachment.OX1] = localXCos - localYSin;\r\n offset[RegionAttachment.OY1] = localYCos + localXSin;\r\n offset[RegionAttachment.OX2] = localXCos - localY2Sin;\r\n offset[RegionAttachment.OY2] = localY2Cos + localXSin;\r\n offset[RegionAttachment.OX3] = localX2Cos - localY2Sin;\r\n offset[RegionAttachment.OY3] = localY2Cos + localX2Sin;\r\n offset[RegionAttachment.OX4] = localX2Cos - localYSin;\r\n offset[RegionAttachment.OY4] = localYCos + localX2Sin;\r\n };\r\n RegionAttachment.prototype.setRegion = function (region) {\r\n this.region = region;\r\n var uvs = this.uvs;\r\n if (region.rotate) {\r\n uvs[2] = region.u;\r\n uvs[3] = region.v2;\r\n uvs[4] = region.u;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v;\r\n uvs[0] = region.u2;\r\n uvs[1] = region.v2;\r\n }\r\n else {\r\n uvs[0] = region.u;\r\n uvs[1] = region.v2;\r\n uvs[2] = region.u;\r\n uvs[3] = region.v;\r\n uvs[4] = region.u2;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v2;\r\n }\r\n };\r\n RegionAttachment.prototype.computeWorldVertices = function (bone, worldVertices, offset, stride) {\r\n var vertexOffset = this.offset;\r\n var x = bone.worldX, y = bone.worldY;\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var offsetX = 0, offsetY = 0;\r\n offsetX = vertexOffset[RegionAttachment.OX1];\r\n offsetY = vertexOffset[RegionAttachment.OY1];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX2];\r\n offsetY = vertexOffset[RegionAttachment.OY2];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX3];\r\n offsetY = vertexOffset[RegionAttachment.OY3];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX4];\r\n offsetY = vertexOffset[RegionAttachment.OY4];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n };\r\n RegionAttachment.prototype.copy = function () {\r\n var copy = new RegionAttachment(name);\r\n copy.region = this.region;\r\n copy.rendererObject = this.rendererObject;\r\n copy.path = this.path;\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.scaleX = this.scaleX;\r\n copy.scaleY = this.scaleY;\r\n copy.rotation = this.rotation;\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n spine.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\r\n spine.Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n RegionAttachment.OX1 = 0;\r\n RegionAttachment.OY1 = 1;\r\n RegionAttachment.OX2 = 2;\r\n RegionAttachment.OY2 = 3;\r\n RegionAttachment.OX3 = 4;\r\n RegionAttachment.OY3 = 5;\r\n RegionAttachment.OX4 = 6;\r\n RegionAttachment.OY4 = 7;\r\n RegionAttachment.X1 = 0;\r\n RegionAttachment.Y1 = 1;\r\n RegionAttachment.C1R = 2;\r\n RegionAttachment.C1G = 3;\r\n RegionAttachment.C1B = 4;\r\n RegionAttachment.C1A = 5;\r\n RegionAttachment.U1 = 6;\r\n RegionAttachment.V1 = 7;\r\n RegionAttachment.X2 = 8;\r\n RegionAttachment.Y2 = 9;\r\n RegionAttachment.C2R = 10;\r\n RegionAttachment.C2G = 11;\r\n RegionAttachment.C2B = 12;\r\n RegionAttachment.C2A = 13;\r\n RegionAttachment.U2 = 14;\r\n RegionAttachment.V2 = 15;\r\n RegionAttachment.X3 = 16;\r\n RegionAttachment.Y3 = 17;\r\n RegionAttachment.C3R = 18;\r\n RegionAttachment.C3G = 19;\r\n RegionAttachment.C3B = 20;\r\n RegionAttachment.C3A = 21;\r\n RegionAttachment.U3 = 22;\r\n RegionAttachment.V3 = 23;\r\n RegionAttachment.X4 = 24;\r\n RegionAttachment.Y4 = 25;\r\n RegionAttachment.C4R = 26;\r\n RegionAttachment.C4G = 27;\r\n RegionAttachment.C4B = 28;\r\n RegionAttachment.C4A = 29;\r\n RegionAttachment.U4 = 30;\r\n RegionAttachment.V4 = 31;\r\n return RegionAttachment;\r\n }(spine.Attachment));\r\n spine.RegionAttachment = RegionAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var JitterEffect = (function () {\r\n function JitterEffect(jitterX, jitterY) {\r\n this.jitterX = 0;\r\n this.jitterY = 0;\r\n this.jitterX = jitterX;\r\n this.jitterY = jitterY;\r\n }\r\n JitterEffect.prototype.begin = function (skeleton) {\r\n };\r\n JitterEffect.prototype.transform = function (position, uv, light, dark) {\r\n position.x += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n position.y += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n };\r\n JitterEffect.prototype.end = function () {\r\n };\r\n return JitterEffect;\r\n }());\r\n spine.JitterEffect = JitterEffect;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SwirlEffect = (function () {\r\n function SwirlEffect(radius) {\r\n this.centerX = 0;\r\n this.centerY = 0;\r\n this.radius = 0;\r\n this.angle = 0;\r\n this.worldX = 0;\r\n this.worldY = 0;\r\n this.radius = radius;\r\n }\r\n SwirlEffect.prototype.begin = function (skeleton) {\r\n this.worldX = skeleton.x + this.centerX;\r\n this.worldY = skeleton.y + this.centerY;\r\n };\r\n SwirlEffect.prototype.transform = function (position, uv, light, dark) {\r\n var radAngle = this.angle * spine.MathUtils.degreesToRadians;\r\n var x = position.x - this.worldX;\r\n var y = position.y - this.worldY;\r\n var dist = Math.sqrt(x * x + y * y);\r\n if (dist < this.radius) {\r\n var theta = SwirlEffect.interpolation.apply(0, radAngle, (this.radius - dist) / this.radius);\r\n var cos = Math.cos(theta);\r\n var sin = Math.sin(theta);\r\n position.x = cos * x - sin * y + this.worldX;\r\n position.y = sin * x + cos * y + this.worldY;\r\n }\r\n };\r\n SwirlEffect.prototype.end = function () {\r\n };\r\n SwirlEffect.interpolation = new spine.PowOut(2);\r\n return SwirlEffect;\r\n }());\r\n spine.SwirlEffect = SwirlEffect;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var canvas;\r\n (function (canvas) {\r\n var AssetManager = (function (_super) {\r\n __extends(AssetManager, _super);\r\n function AssetManager(pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n return _super.call(this, function (image) { return new spine.canvas.CanvasTexture(image); }, pathPrefix) || this;\r\n }\r\n return AssetManager;\r\n }(spine.AssetManager));\r\n canvas.AssetManager = AssetManager;\r\n })(canvas = spine.canvas || (spine.canvas = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var canvas;\r\n (function (canvas) {\r\n var CanvasTexture = (function (_super) {\r\n __extends(CanvasTexture, _super);\r\n function CanvasTexture(image) {\r\n return _super.call(this, image) || this;\r\n }\r\n CanvasTexture.prototype.setFilters = function (minFilter, magFilter) { };\r\n CanvasTexture.prototype.setWraps = function (uWrap, vWrap) { };\r\n CanvasTexture.prototype.dispose = function () { };\r\n return CanvasTexture;\r\n }(spine.Texture));\r\n canvas.CanvasTexture = CanvasTexture;\r\n })(canvas = spine.canvas || (spine.canvas = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var canvas;\r\n (function (canvas) {\r\n var SkeletonRenderer = (function () {\r\n function SkeletonRenderer(context) {\r\n this.triangleRendering = false;\r\n this.debugRendering = false;\r\n this.vertices = spine.Utils.newFloatArray(8 * 1024);\r\n this.tempColor = new spine.Color();\r\n this.ctx = context;\r\n }\r\n SkeletonRenderer.prototype.draw = function (skeleton) {\r\n if (this.triangleRendering)\r\n this.drawTriangles(skeleton);\r\n else\r\n this.drawImages(skeleton);\r\n };\r\n SkeletonRenderer.prototype.drawImages = function (skeleton) {\r\n var ctx = this.ctx;\r\n var drawOrder = skeleton.drawOrder;\r\n if (this.debugRendering)\r\n ctx.strokeStyle = \"green\";\r\n ctx.save();\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var slot = drawOrder[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n var regionAttachment = null;\r\n var region = null;\r\n var image = null;\r\n if (attachment instanceof spine.RegionAttachment) {\r\n regionAttachment = attachment;\r\n region = regionAttachment.region;\r\n image = region.texture.getImage();\r\n }\r\n else\r\n continue;\r\n var skeleton_1 = slot.bone.skeleton;\r\n var skeletonColor = skeleton_1.color;\r\n var slotColor = slot.color;\r\n var regionColor = regionAttachment.color;\r\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * regionColor.r, skeletonColor.g * slotColor.g * regionColor.g, skeletonColor.b * slotColor.b * regionColor.b, alpha);\r\n var att = attachment;\r\n var bone = slot.bone;\r\n var w = region.width;\r\n var h = region.height;\r\n ctx.save();\r\n ctx.transform(bone.a, bone.c, bone.b, bone.d, bone.worldX, bone.worldY);\r\n ctx.translate(attachment.offset[0], attachment.offset[1]);\r\n ctx.rotate(attachment.rotation * Math.PI / 180);\r\n var atlasScale = att.width / w;\r\n ctx.scale(atlasScale * attachment.scaleX, atlasScale * attachment.scaleY);\r\n ctx.translate(w / 2, h / 2);\r\n if (attachment.region.rotate) {\r\n var t = w;\r\n w = h;\r\n h = t;\r\n ctx.rotate(-Math.PI / 2);\r\n }\r\n ctx.scale(1, -1);\r\n ctx.translate(-w / 2, -h / 2);\r\n if (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) {\r\n ctx.globalAlpha = color.a;\r\n }\r\n ctx.drawImage(image, region.x, region.y, w, h, 0, 0, w, h);\r\n if (this.debugRendering)\r\n ctx.strokeRect(0, 0, w, h);\r\n ctx.restore();\r\n }\r\n ctx.restore();\r\n };\r\n SkeletonRenderer.prototype.drawTriangles = function (skeleton) {\r\n var blendMode = null;\r\n var vertices = this.vertices;\r\n var triangles = null;\r\n var drawOrder = skeleton.drawOrder;\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var slot = drawOrder[i];\r\n var attachment = slot.getAttachment();\r\n var texture = null;\r\n var region = null;\r\n if (attachment instanceof spine.RegionAttachment) {\r\n var regionAttachment = attachment;\r\n vertices = this.computeRegionVertices(slot, regionAttachment, false);\r\n triangles = SkeletonRenderer.QUAD_TRIANGLES;\r\n region = regionAttachment.region;\r\n texture = region.texture.getImage();\r\n }\r\n else if (attachment instanceof spine.MeshAttachment) {\r\n var mesh = attachment;\r\n vertices = this.computeMeshVertices(slot, mesh, false);\r\n triangles = mesh.triangles;\r\n texture = mesh.region.renderObject.texture.getImage();\r\n }\r\n else\r\n continue;\r\n if (texture != null) {\r\n var slotBlendMode = slot.data.blendMode;\r\n if (slotBlendMode != blendMode) {\r\n blendMode = slotBlendMode;\r\n }\r\n var skeleton_2 = slot.bone.skeleton;\r\n var skeletonColor = skeleton_2.color;\r\n var slotColor = slot.color;\r\n var attachmentColor = attachment.color;\r\n var alpha = skeletonColor.a * slotColor.a * attachmentColor.a;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * attachmentColor.r, skeletonColor.g * slotColor.g * attachmentColor.g, skeletonColor.b * slotColor.b * attachmentColor.b, alpha);\r\n var ctx = this.ctx;\r\n if (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) {\r\n ctx.globalAlpha = color.a;\r\n }\r\n for (var j = 0; j < triangles.length; j += 3) {\r\n var t1 = triangles[j] * 8, t2 = triangles[j + 1] * 8, t3 = triangles[j + 2] * 8;\r\n var x0 = vertices[t1], y0 = vertices[t1 + 1], u0 = vertices[t1 + 6], v0 = vertices[t1 + 7];\r\n var x1 = vertices[t2], y1 = vertices[t2 + 1], u1 = vertices[t2 + 6], v1 = vertices[t2 + 7];\r\n var x2 = vertices[t3], y2 = vertices[t3 + 1], u2 = vertices[t3 + 6], v2 = vertices[t3 + 7];\r\n this.drawTriangle(texture, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2);\r\n if (this.debugRendering) {\r\n ctx.strokeStyle = \"green\";\r\n ctx.beginPath();\r\n ctx.moveTo(x0, y0);\r\n ctx.lineTo(x1, y1);\r\n ctx.lineTo(x2, y2);\r\n ctx.lineTo(x0, y0);\r\n ctx.stroke();\r\n }\r\n }\r\n }\r\n }\r\n this.ctx.globalAlpha = 1;\r\n };\r\n SkeletonRenderer.prototype.drawTriangle = function (img, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2) {\r\n var ctx = this.ctx;\r\n u0 *= img.width;\r\n v0 *= img.height;\r\n u1 *= img.width;\r\n v1 *= img.height;\r\n u2 *= img.width;\r\n v2 *= img.height;\r\n ctx.beginPath();\r\n ctx.moveTo(x0, y0);\r\n ctx.lineTo(x1, y1);\r\n ctx.lineTo(x2, y2);\r\n ctx.closePath();\r\n x1 -= x0;\r\n y1 -= y0;\r\n x2 -= x0;\r\n y2 -= y0;\r\n u1 -= u0;\r\n v1 -= v0;\r\n u2 -= u0;\r\n v2 -= v0;\r\n var det = 1 / (u1 * v2 - u2 * v1), a = (v2 * x1 - v1 * x2) * det, b = (v2 * y1 - v1 * y2) * det, c = (u1 * x2 - u2 * x1) * det, d = (u1 * y2 - u2 * y1) * det, e = x0 - a * u0 - c * v0, f = y0 - b * u0 - d * v0;\r\n ctx.save();\r\n ctx.transform(a, b, c, d, e, f);\r\n ctx.clip();\r\n ctx.drawImage(img, 0, 0);\r\n ctx.restore();\r\n };\r\n SkeletonRenderer.prototype.computeRegionVertices = function (slot, region, pma) {\r\n var skeleton = slot.bone.skeleton;\r\n var skeletonColor = skeleton.color;\r\n var slotColor = slot.color;\r\n var regionColor = region.color;\r\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n var multiplier = pma ? alpha : 1;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha);\r\n region.computeWorldVertices(slot.bone, this.vertices, 0, SkeletonRenderer.VERTEX_SIZE);\r\n var vertices = this.vertices;\r\n var uvs = region.uvs;\r\n vertices[spine.RegionAttachment.C1R] = color.r;\r\n vertices[spine.RegionAttachment.C1G] = color.g;\r\n vertices[spine.RegionAttachment.C1B] = color.b;\r\n vertices[spine.RegionAttachment.C1A] = color.a;\r\n vertices[spine.RegionAttachment.U1] = uvs[0];\r\n vertices[spine.RegionAttachment.V1] = uvs[1];\r\n vertices[spine.RegionAttachment.C2R] = color.r;\r\n vertices[spine.RegionAttachment.C2G] = color.g;\r\n vertices[spine.RegionAttachment.C2B] = color.b;\r\n vertices[spine.RegionAttachment.C2A] = color.a;\r\n vertices[spine.RegionAttachment.U2] = uvs[2];\r\n vertices[spine.RegionAttachment.V2] = uvs[3];\r\n vertices[spine.RegionAttachment.C3R] = color.r;\r\n vertices[spine.RegionAttachment.C3G] = color.g;\r\n vertices[spine.RegionAttachment.C3B] = color.b;\r\n vertices[spine.RegionAttachment.C3A] = color.a;\r\n vertices[spine.RegionAttachment.U3] = uvs[4];\r\n vertices[spine.RegionAttachment.V3] = uvs[5];\r\n vertices[spine.RegionAttachment.C4R] = color.r;\r\n vertices[spine.RegionAttachment.C4G] = color.g;\r\n vertices[spine.RegionAttachment.C4B] = color.b;\r\n vertices[spine.RegionAttachment.C4A] = color.a;\r\n vertices[spine.RegionAttachment.U4] = uvs[6];\r\n vertices[spine.RegionAttachment.V4] = uvs[7];\r\n return vertices;\r\n };\r\n SkeletonRenderer.prototype.computeMeshVertices = function (slot, mesh, pma) {\r\n var skeleton = slot.bone.skeleton;\r\n var skeletonColor = skeleton.color;\r\n var slotColor = slot.color;\r\n var regionColor = mesh.color;\r\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n var multiplier = pma ? alpha : 1;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha);\r\n var numVertices = mesh.worldVerticesLength / 2;\r\n if (this.vertices.length < mesh.worldVerticesLength) {\r\n this.vertices = spine.Utils.newFloatArray(mesh.worldVerticesLength);\r\n }\r\n var vertices = this.vertices;\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, SkeletonRenderer.VERTEX_SIZE);\r\n var uvs = mesh.uvs;\r\n for (var i = 0, n = numVertices, u = 0, v = 2; i < n; i++) {\r\n vertices[v++] = color.r;\r\n vertices[v++] = color.g;\r\n vertices[v++] = color.b;\r\n vertices[v++] = color.a;\r\n vertices[v++] = uvs[u++];\r\n vertices[v++] = uvs[u++];\r\n v += 2;\r\n }\r\n return vertices;\r\n };\r\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n SkeletonRenderer.VERTEX_SIZE = 2 + 2 + 4;\r\n return SkeletonRenderer;\r\n }());\r\n canvas.SkeletonRenderer = SkeletonRenderer;\r\n })(canvas = spine.canvas || (spine.canvas = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var AssetManager = (function (_super) {\r\n __extends(AssetManager, _super);\r\n function AssetManager(context, pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n return _super.call(this, function (image) {\r\n return new spine.webgl.GLTexture(context, image);\r\n }, pathPrefix) || this;\r\n }\r\n return AssetManager;\r\n }(spine.AssetManager));\r\n webgl.AssetManager = AssetManager;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var OrthoCamera = (function () {\r\n function OrthoCamera(viewportWidth, viewportHeight) {\r\n this.position = new webgl.Vector3(0, 0, 0);\r\n this.direction = new webgl.Vector3(0, 0, -1);\r\n this.up = new webgl.Vector3(0, 1, 0);\r\n this.near = 0;\r\n this.far = 100;\r\n this.zoom = 1;\r\n this.viewportWidth = 0;\r\n this.viewportHeight = 0;\r\n this.projectionView = new webgl.Matrix4();\r\n this.inverseProjectionView = new webgl.Matrix4();\r\n this.projection = new webgl.Matrix4();\r\n this.view = new webgl.Matrix4();\r\n this.tmp = new webgl.Vector3();\r\n this.viewportWidth = viewportWidth;\r\n this.viewportHeight = viewportHeight;\r\n this.update();\r\n }\r\n OrthoCamera.prototype.update = function () {\r\n var projection = this.projection;\r\n var view = this.view;\r\n var projectionView = this.projectionView;\r\n var inverseProjectionView = this.inverseProjectionView;\r\n var zoom = this.zoom, viewportWidth = this.viewportWidth, viewportHeight = this.viewportHeight;\r\n projection.ortho(zoom * (-viewportWidth / 2), zoom * (viewportWidth / 2), zoom * (-viewportHeight / 2), zoom * (viewportHeight / 2), this.near, this.far);\r\n view.lookAt(this.position, this.direction, this.up);\r\n projectionView.set(projection.values);\r\n projectionView.multiply(view);\r\n inverseProjectionView.set(projectionView.values).invert();\r\n };\r\n OrthoCamera.prototype.screenToWorld = function (screenCoords, screenWidth, screenHeight) {\r\n var x = screenCoords.x, y = screenHeight - screenCoords.y - 1;\r\n var tmp = this.tmp;\r\n tmp.x = (2 * x) / screenWidth - 1;\r\n tmp.y = (2 * y) / screenHeight - 1;\r\n tmp.z = (2 * screenCoords.z) - 1;\r\n tmp.project(this.inverseProjectionView);\r\n screenCoords.set(tmp.x, tmp.y, tmp.z);\r\n return screenCoords;\r\n };\r\n OrthoCamera.prototype.setViewport = function (viewportWidth, viewportHeight) {\r\n this.viewportWidth = viewportWidth;\r\n this.viewportHeight = viewportHeight;\r\n };\r\n return OrthoCamera;\r\n }());\r\n webgl.OrthoCamera = OrthoCamera;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var GLTexture = (function (_super) {\r\n __extends(GLTexture, _super);\r\n function GLTexture(context, image, useMipMaps) {\r\n if (useMipMaps === void 0) { useMipMaps = false; }\r\n var _this = _super.call(this, image) || this;\r\n _this.texture = null;\r\n _this.boundUnit = 0;\r\n _this.useMipMaps = false;\r\n _this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n _this.useMipMaps = useMipMaps;\r\n _this.restore();\r\n _this.context.addRestorable(_this);\r\n return _this;\r\n }\r\n GLTexture.prototype.setFilters = function (minFilter, magFilter) {\r\n var gl = this.context.gl;\r\n this.bind();\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, minFilter);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, GLTexture.validateMagFilter(magFilter));\r\n };\r\n GLTexture.validateMagFilter = function (magFilter) {\r\n switch (magFilter) {\r\n case spine.TextureFilter.MipMap:\r\n case spine.TextureFilter.MipMapLinearLinear:\r\n case spine.TextureFilter.MipMapLinearNearest:\r\n case spine.TextureFilter.MipMapNearestLinear:\r\n case spine.TextureFilter.MipMapNearestNearest:\r\n return spine.TextureFilter.Linear;\r\n default:\r\n return magFilter;\r\n }\r\n };\r\n GLTexture.prototype.setWraps = function (uWrap, vWrap) {\r\n var gl = this.context.gl;\r\n this.bind();\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, uWrap);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, vWrap);\r\n };\r\n GLTexture.prototype.update = function (useMipMaps) {\r\n var gl = this.context.gl;\r\n if (!this.texture) {\r\n this.texture = this.context.gl.createTexture();\r\n }\r\n this.bind();\r\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this._image);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, useMipMaps ? gl.LINEAR_MIPMAP_LINEAR : gl.LINEAR);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\r\n if (useMipMaps)\r\n gl.generateMipmap(gl.TEXTURE_2D);\r\n };\r\n GLTexture.prototype.restore = function () {\r\n this.texture = null;\r\n this.update(this.useMipMaps);\r\n };\r\n GLTexture.prototype.bind = function (unit) {\r\n if (unit === void 0) { unit = 0; }\r\n var gl = this.context.gl;\r\n this.boundUnit = unit;\r\n gl.activeTexture(gl.TEXTURE0 + unit);\r\n gl.bindTexture(gl.TEXTURE_2D, this.texture);\r\n };\r\n GLTexture.prototype.unbind = function () {\r\n var gl = this.context.gl;\r\n gl.activeTexture(gl.TEXTURE0 + this.boundUnit);\r\n gl.bindTexture(gl.TEXTURE_2D, null);\r\n };\r\n GLTexture.prototype.dispose = function () {\r\n this.context.removeRestorable(this);\r\n var gl = this.context.gl;\r\n gl.deleteTexture(this.texture);\r\n };\r\n return GLTexture;\r\n }(spine.Texture));\r\n webgl.GLTexture = GLTexture;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n webgl.M00 = 0;\r\n webgl.M01 = 4;\r\n webgl.M02 = 8;\r\n webgl.M03 = 12;\r\n webgl.M10 = 1;\r\n webgl.M11 = 5;\r\n webgl.M12 = 9;\r\n webgl.M13 = 13;\r\n webgl.M20 = 2;\r\n webgl.M21 = 6;\r\n webgl.M22 = 10;\r\n webgl.M23 = 14;\r\n webgl.M30 = 3;\r\n webgl.M31 = 7;\r\n webgl.M32 = 11;\r\n webgl.M33 = 15;\r\n var Matrix4 = (function () {\r\n function Matrix4() {\r\n this.temp = new Float32Array(16);\r\n this.values = new Float32Array(16);\r\n var v = this.values;\r\n v[webgl.M00] = 1;\r\n v[webgl.M11] = 1;\r\n v[webgl.M22] = 1;\r\n v[webgl.M33] = 1;\r\n }\r\n Matrix4.prototype.set = function (values) {\r\n this.values.set(values);\r\n return this;\r\n };\r\n Matrix4.prototype.transpose = function () {\r\n var t = this.temp;\r\n var v = this.values;\r\n t[webgl.M00] = v[webgl.M00];\r\n t[webgl.M01] = v[webgl.M10];\r\n t[webgl.M02] = v[webgl.M20];\r\n t[webgl.M03] = v[webgl.M30];\r\n t[webgl.M10] = v[webgl.M01];\r\n t[webgl.M11] = v[webgl.M11];\r\n t[webgl.M12] = v[webgl.M21];\r\n t[webgl.M13] = v[webgl.M31];\r\n t[webgl.M20] = v[webgl.M02];\r\n t[webgl.M21] = v[webgl.M12];\r\n t[webgl.M22] = v[webgl.M22];\r\n t[webgl.M23] = v[webgl.M32];\r\n t[webgl.M30] = v[webgl.M03];\r\n t[webgl.M31] = v[webgl.M13];\r\n t[webgl.M32] = v[webgl.M23];\r\n t[webgl.M33] = v[webgl.M33];\r\n return this.set(t);\r\n };\r\n Matrix4.prototype.identity = function () {\r\n var v = this.values;\r\n v[webgl.M00] = 1;\r\n v[webgl.M01] = 0;\r\n v[webgl.M02] = 0;\r\n v[webgl.M03] = 0;\r\n v[webgl.M10] = 0;\r\n v[webgl.M11] = 1;\r\n v[webgl.M12] = 0;\r\n v[webgl.M13] = 0;\r\n v[webgl.M20] = 0;\r\n v[webgl.M21] = 0;\r\n v[webgl.M22] = 1;\r\n v[webgl.M23] = 0;\r\n v[webgl.M30] = 0;\r\n v[webgl.M31] = 0;\r\n v[webgl.M32] = 0;\r\n v[webgl.M33] = 1;\r\n return this;\r\n };\r\n Matrix4.prototype.invert = function () {\r\n var v = this.values;\r\n var t = this.temp;\r\n var l_det = v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03]\r\n + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03]\r\n - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13]\r\n - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13]\r\n + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23]\r\n + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23]\r\n - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33]\r\n - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\r\n if (l_det == 0)\r\n throw new Error(\"non-invertible matrix\");\r\n var inv_det = 1.0 / l_det;\r\n t[webgl.M00] = v[webgl.M12] * v[webgl.M23] * v[webgl.M31] - v[webgl.M13] * v[webgl.M22] * v[webgl.M31] + v[webgl.M13] * v[webgl.M21] * v[webgl.M32]\r\n - v[webgl.M11] * v[webgl.M23] * v[webgl.M32] - v[webgl.M12] * v[webgl.M21] * v[webgl.M33] + v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M01] = v[webgl.M03] * v[webgl.M22] * v[webgl.M31] - v[webgl.M02] * v[webgl.M23] * v[webgl.M31] - v[webgl.M03] * v[webgl.M21] * v[webgl.M32]\r\n + v[webgl.M01] * v[webgl.M23] * v[webgl.M32] + v[webgl.M02] * v[webgl.M21] * v[webgl.M33] - v[webgl.M01] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M02] = v[webgl.M02] * v[webgl.M13] * v[webgl.M31] - v[webgl.M03] * v[webgl.M12] * v[webgl.M31] + v[webgl.M03] * v[webgl.M11] * v[webgl.M32]\r\n - v[webgl.M01] * v[webgl.M13] * v[webgl.M32] - v[webgl.M02] * v[webgl.M11] * v[webgl.M33] + v[webgl.M01] * v[webgl.M12] * v[webgl.M33];\r\n t[webgl.M03] = v[webgl.M03] * v[webgl.M12] * v[webgl.M21] - v[webgl.M02] * v[webgl.M13] * v[webgl.M21] - v[webgl.M03] * v[webgl.M11] * v[webgl.M22]\r\n + v[webgl.M01] * v[webgl.M13] * v[webgl.M22] + v[webgl.M02] * v[webgl.M11] * v[webgl.M23] - v[webgl.M01] * v[webgl.M12] * v[webgl.M23];\r\n t[webgl.M10] = v[webgl.M13] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M20] * v[webgl.M32]\r\n + v[webgl.M10] * v[webgl.M23] * v[webgl.M32] + v[webgl.M12] * v[webgl.M20] * v[webgl.M33] - v[webgl.M10] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M11] = v[webgl.M02] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M22] * v[webgl.M30] + v[webgl.M03] * v[webgl.M20] * v[webgl.M32]\r\n - v[webgl.M00] * v[webgl.M23] * v[webgl.M32] - v[webgl.M02] * v[webgl.M20] * v[webgl.M33] + v[webgl.M00] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M12] = v[webgl.M03] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M10] * v[webgl.M32]\r\n + v[webgl.M00] * v[webgl.M13] * v[webgl.M32] + v[webgl.M02] * v[webgl.M10] * v[webgl.M33] - v[webgl.M00] * v[webgl.M12] * v[webgl.M33];\r\n t[webgl.M13] = v[webgl.M02] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M12] * v[webgl.M20] + v[webgl.M03] * v[webgl.M10] * v[webgl.M22]\r\n - v[webgl.M00] * v[webgl.M13] * v[webgl.M22] - v[webgl.M02] * v[webgl.M10] * v[webgl.M23] + v[webgl.M00] * v[webgl.M12] * v[webgl.M23];\r\n t[webgl.M20] = v[webgl.M11] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M21] * v[webgl.M30] + v[webgl.M13] * v[webgl.M20] * v[webgl.M31]\r\n - v[webgl.M10] * v[webgl.M23] * v[webgl.M31] - v[webgl.M11] * v[webgl.M20] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M33];\r\n t[webgl.M21] = v[webgl.M03] * v[webgl.M21] * v[webgl.M30] - v[webgl.M01] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M20] * v[webgl.M31]\r\n + v[webgl.M00] * v[webgl.M23] * v[webgl.M31] + v[webgl.M01] * v[webgl.M20] * v[webgl.M33] - v[webgl.M00] * v[webgl.M21] * v[webgl.M33];\r\n t[webgl.M22] = v[webgl.M01] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M11] * v[webgl.M30] + v[webgl.M03] * v[webgl.M10] * v[webgl.M31]\r\n - v[webgl.M00] * v[webgl.M13] * v[webgl.M31] - v[webgl.M01] * v[webgl.M10] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M33];\r\n t[webgl.M23] = v[webgl.M03] * v[webgl.M11] * v[webgl.M20] - v[webgl.M01] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M10] * v[webgl.M21]\r\n + v[webgl.M00] * v[webgl.M13] * v[webgl.M21] + v[webgl.M01] * v[webgl.M10] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M23];\r\n t[webgl.M30] = v[webgl.M12] * v[webgl.M21] * v[webgl.M30] - v[webgl.M11] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M20] * v[webgl.M31]\r\n + v[webgl.M10] * v[webgl.M22] * v[webgl.M31] + v[webgl.M11] * v[webgl.M20] * v[webgl.M32] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32];\r\n t[webgl.M31] = v[webgl.M01] * v[webgl.M22] * v[webgl.M30] - v[webgl.M02] * v[webgl.M21] * v[webgl.M30] + v[webgl.M02] * v[webgl.M20] * v[webgl.M31]\r\n - v[webgl.M00] * v[webgl.M22] * v[webgl.M31] - v[webgl.M01] * v[webgl.M20] * v[webgl.M32] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32];\r\n t[webgl.M32] = v[webgl.M02] * v[webgl.M11] * v[webgl.M30] - v[webgl.M01] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M10] * v[webgl.M31]\r\n + v[webgl.M00] * v[webgl.M12] * v[webgl.M31] + v[webgl.M01] * v[webgl.M10] * v[webgl.M32] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32];\r\n t[webgl.M33] = v[webgl.M01] * v[webgl.M12] * v[webgl.M20] - v[webgl.M02] * v[webgl.M11] * v[webgl.M20] + v[webgl.M02] * v[webgl.M10] * v[webgl.M21]\r\n - v[webgl.M00] * v[webgl.M12] * v[webgl.M21] - v[webgl.M01] * v[webgl.M10] * v[webgl.M22] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22];\r\n v[webgl.M00] = t[webgl.M00] * inv_det;\r\n v[webgl.M01] = t[webgl.M01] * inv_det;\r\n v[webgl.M02] = t[webgl.M02] * inv_det;\r\n v[webgl.M03] = t[webgl.M03] * inv_det;\r\n v[webgl.M10] = t[webgl.M10] * inv_det;\r\n v[webgl.M11] = t[webgl.M11] * inv_det;\r\n v[webgl.M12] = t[webgl.M12] * inv_det;\r\n v[webgl.M13] = t[webgl.M13] * inv_det;\r\n v[webgl.M20] = t[webgl.M20] * inv_det;\r\n v[webgl.M21] = t[webgl.M21] * inv_det;\r\n v[webgl.M22] = t[webgl.M22] * inv_det;\r\n v[webgl.M23] = t[webgl.M23] * inv_det;\r\n v[webgl.M30] = t[webgl.M30] * inv_det;\r\n v[webgl.M31] = t[webgl.M31] * inv_det;\r\n v[webgl.M32] = t[webgl.M32] * inv_det;\r\n v[webgl.M33] = t[webgl.M33] * inv_det;\r\n return this;\r\n };\r\n Matrix4.prototype.determinant = function () {\r\n var v = this.values;\r\n return v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03]\r\n + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03]\r\n - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13]\r\n - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13]\r\n + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23]\r\n + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23]\r\n - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33]\r\n - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\r\n };\r\n Matrix4.prototype.translate = function (x, y, z) {\r\n var v = this.values;\r\n v[webgl.M03] += x;\r\n v[webgl.M13] += y;\r\n v[webgl.M23] += z;\r\n return this;\r\n };\r\n Matrix4.prototype.copy = function () {\r\n return new Matrix4().set(this.values);\r\n };\r\n Matrix4.prototype.projection = function (near, far, fovy, aspectRatio) {\r\n this.identity();\r\n var l_fd = (1.0 / Math.tan((fovy * (Math.PI / 180)) / 2.0));\r\n var l_a1 = (far + near) / (near - far);\r\n var l_a2 = (2 * far * near) / (near - far);\r\n var v = this.values;\r\n v[webgl.M00] = l_fd / aspectRatio;\r\n v[webgl.M10] = 0;\r\n v[webgl.M20] = 0;\r\n v[webgl.M30] = 0;\r\n v[webgl.M01] = 0;\r\n v[webgl.M11] = l_fd;\r\n v[webgl.M21] = 0;\r\n v[webgl.M31] = 0;\r\n v[webgl.M02] = 0;\r\n v[webgl.M12] = 0;\r\n v[webgl.M22] = l_a1;\r\n v[webgl.M32] = -1;\r\n v[webgl.M03] = 0;\r\n v[webgl.M13] = 0;\r\n v[webgl.M23] = l_a2;\r\n v[webgl.M33] = 0;\r\n return this;\r\n };\r\n Matrix4.prototype.ortho2d = function (x, y, width, height) {\r\n return this.ortho(x, x + width, y, y + height, 0, 1);\r\n };\r\n Matrix4.prototype.ortho = function (left, right, bottom, top, near, far) {\r\n this.identity();\r\n var x_orth = 2 / (right - left);\r\n var y_orth = 2 / (top - bottom);\r\n var z_orth = -2 / (far - near);\r\n var tx = -(right + left) / (right - left);\r\n var ty = -(top + bottom) / (top - bottom);\r\n var tz = -(far + near) / (far - near);\r\n var v = this.values;\r\n v[webgl.M00] = x_orth;\r\n v[webgl.M10] = 0;\r\n v[webgl.M20] = 0;\r\n v[webgl.M30] = 0;\r\n v[webgl.M01] = 0;\r\n v[webgl.M11] = y_orth;\r\n v[webgl.M21] = 0;\r\n v[webgl.M31] = 0;\r\n v[webgl.M02] = 0;\r\n v[webgl.M12] = 0;\r\n v[webgl.M22] = z_orth;\r\n v[webgl.M32] = 0;\r\n v[webgl.M03] = tx;\r\n v[webgl.M13] = ty;\r\n v[webgl.M23] = tz;\r\n v[webgl.M33] = 1;\r\n return this;\r\n };\r\n Matrix4.prototype.multiply = function (matrix) {\r\n var t = this.temp;\r\n var v = this.values;\r\n var m = matrix.values;\r\n t[webgl.M00] = v[webgl.M00] * m[webgl.M00] + v[webgl.M01] * m[webgl.M10] + v[webgl.M02] * m[webgl.M20] + v[webgl.M03] * m[webgl.M30];\r\n t[webgl.M01] = v[webgl.M00] * m[webgl.M01] + v[webgl.M01] * m[webgl.M11] + v[webgl.M02] * m[webgl.M21] + v[webgl.M03] * m[webgl.M31];\r\n t[webgl.M02] = v[webgl.M00] * m[webgl.M02] + v[webgl.M01] * m[webgl.M12] + v[webgl.M02] * m[webgl.M22] + v[webgl.M03] * m[webgl.M32];\r\n t[webgl.M03] = v[webgl.M00] * m[webgl.M03] + v[webgl.M01] * m[webgl.M13] + v[webgl.M02] * m[webgl.M23] + v[webgl.M03] * m[webgl.M33];\r\n t[webgl.M10] = v[webgl.M10] * m[webgl.M00] + v[webgl.M11] * m[webgl.M10] + v[webgl.M12] * m[webgl.M20] + v[webgl.M13] * m[webgl.M30];\r\n t[webgl.M11] = v[webgl.M10] * m[webgl.M01] + v[webgl.M11] * m[webgl.M11] + v[webgl.M12] * m[webgl.M21] + v[webgl.M13] * m[webgl.M31];\r\n t[webgl.M12] = v[webgl.M10] * m[webgl.M02] + v[webgl.M11] * m[webgl.M12] + v[webgl.M12] * m[webgl.M22] + v[webgl.M13] * m[webgl.M32];\r\n t[webgl.M13] = v[webgl.M10] * m[webgl.M03] + v[webgl.M11] * m[webgl.M13] + v[webgl.M12] * m[webgl.M23] + v[webgl.M13] * m[webgl.M33];\r\n t[webgl.M20] = v[webgl.M20] * m[webgl.M00] + v[webgl.M21] * m[webgl.M10] + v[webgl.M22] * m[webgl.M20] + v[webgl.M23] * m[webgl.M30];\r\n t[webgl.M21] = v[webgl.M20] * m[webgl.M01] + v[webgl.M21] * m[webgl.M11] + v[webgl.M22] * m[webgl.M21] + v[webgl.M23] * m[webgl.M31];\r\n t[webgl.M22] = v[webgl.M20] * m[webgl.M02] + v[webgl.M21] * m[webgl.M12] + v[webgl.M22] * m[webgl.M22] + v[webgl.M23] * m[webgl.M32];\r\n t[webgl.M23] = v[webgl.M20] * m[webgl.M03] + v[webgl.M21] * m[webgl.M13] + v[webgl.M22] * m[webgl.M23] + v[webgl.M23] * m[webgl.M33];\r\n t[webgl.M30] = v[webgl.M30] * m[webgl.M00] + v[webgl.M31] * m[webgl.M10] + v[webgl.M32] * m[webgl.M20] + v[webgl.M33] * m[webgl.M30];\r\n t[webgl.M31] = v[webgl.M30] * m[webgl.M01] + v[webgl.M31] * m[webgl.M11] + v[webgl.M32] * m[webgl.M21] + v[webgl.M33] * m[webgl.M31];\r\n t[webgl.M32] = v[webgl.M30] * m[webgl.M02] + v[webgl.M31] * m[webgl.M12] + v[webgl.M32] * m[webgl.M22] + v[webgl.M33] * m[webgl.M32];\r\n t[webgl.M33] = v[webgl.M30] * m[webgl.M03] + v[webgl.M31] * m[webgl.M13] + v[webgl.M32] * m[webgl.M23] + v[webgl.M33] * m[webgl.M33];\r\n return this.set(this.temp);\r\n };\r\n Matrix4.prototype.multiplyLeft = function (matrix) {\r\n var t = this.temp;\r\n var v = this.values;\r\n var m = matrix.values;\r\n t[webgl.M00] = m[webgl.M00] * v[webgl.M00] + m[webgl.M01] * v[webgl.M10] + m[webgl.M02] * v[webgl.M20] + m[webgl.M03] * v[webgl.M30];\r\n t[webgl.M01] = m[webgl.M00] * v[webgl.M01] + m[webgl.M01] * v[webgl.M11] + m[webgl.M02] * v[webgl.M21] + m[webgl.M03] * v[webgl.M31];\r\n t[webgl.M02] = m[webgl.M00] * v[webgl.M02] + m[webgl.M01] * v[webgl.M12] + m[webgl.M02] * v[webgl.M22] + m[webgl.M03] * v[webgl.M32];\r\n t[webgl.M03] = m[webgl.M00] * v[webgl.M03] + m[webgl.M01] * v[webgl.M13] + m[webgl.M02] * v[webgl.M23] + m[webgl.M03] * v[webgl.M33];\r\n t[webgl.M10] = m[webgl.M10] * v[webgl.M00] + m[webgl.M11] * v[webgl.M10] + m[webgl.M12] * v[webgl.M20] + m[webgl.M13] * v[webgl.M30];\r\n t[webgl.M11] = m[webgl.M10] * v[webgl.M01] + m[webgl.M11] * v[webgl.M11] + m[webgl.M12] * v[webgl.M21] + m[webgl.M13] * v[webgl.M31];\r\n t[webgl.M12] = m[webgl.M10] * v[webgl.M02] + m[webgl.M11] * v[webgl.M12] + m[webgl.M12] * v[webgl.M22] + m[webgl.M13] * v[webgl.M32];\r\n t[webgl.M13] = m[webgl.M10] * v[webgl.M03] + m[webgl.M11] * v[webgl.M13] + m[webgl.M12] * v[webgl.M23] + m[webgl.M13] * v[webgl.M33];\r\n t[webgl.M20] = m[webgl.M20] * v[webgl.M00] + m[webgl.M21] * v[webgl.M10] + m[webgl.M22] * v[webgl.M20] + m[webgl.M23] * v[webgl.M30];\r\n t[webgl.M21] = m[webgl.M20] * v[webgl.M01] + m[webgl.M21] * v[webgl.M11] + m[webgl.M22] * v[webgl.M21] + m[webgl.M23] * v[webgl.M31];\r\n t[webgl.M22] = m[webgl.M20] * v[webgl.M02] + m[webgl.M21] * v[webgl.M12] + m[webgl.M22] * v[webgl.M22] + m[webgl.M23] * v[webgl.M32];\r\n t[webgl.M23] = m[webgl.M20] * v[webgl.M03] + m[webgl.M21] * v[webgl.M13] + m[webgl.M22] * v[webgl.M23] + m[webgl.M23] * v[webgl.M33];\r\n t[webgl.M30] = m[webgl.M30] * v[webgl.M00] + m[webgl.M31] * v[webgl.M10] + m[webgl.M32] * v[webgl.M20] + m[webgl.M33] * v[webgl.M30];\r\n t[webgl.M31] = m[webgl.M30] * v[webgl.M01] + m[webgl.M31] * v[webgl.M11] + m[webgl.M32] * v[webgl.M21] + m[webgl.M33] * v[webgl.M31];\r\n t[webgl.M32] = m[webgl.M30] * v[webgl.M02] + m[webgl.M31] * v[webgl.M12] + m[webgl.M32] * v[webgl.M22] + m[webgl.M33] * v[webgl.M32];\r\n t[webgl.M33] = m[webgl.M30] * v[webgl.M03] + m[webgl.M31] * v[webgl.M13] + m[webgl.M32] * v[webgl.M23] + m[webgl.M33] * v[webgl.M33];\r\n return this.set(this.temp);\r\n };\r\n Matrix4.prototype.lookAt = function (position, direction, up) {\r\n Matrix4.initTemps();\r\n var xAxis = Matrix4.xAxis, yAxis = Matrix4.yAxis, zAxis = Matrix4.zAxis;\r\n zAxis.setFrom(direction).normalize();\r\n xAxis.setFrom(direction).normalize();\r\n xAxis.cross(up).normalize();\r\n yAxis.setFrom(xAxis).cross(zAxis).normalize();\r\n this.identity();\r\n var val = this.values;\r\n val[webgl.M00] = xAxis.x;\r\n val[webgl.M01] = xAxis.y;\r\n val[webgl.M02] = xAxis.z;\r\n val[webgl.M10] = yAxis.x;\r\n val[webgl.M11] = yAxis.y;\r\n val[webgl.M12] = yAxis.z;\r\n val[webgl.M20] = -zAxis.x;\r\n val[webgl.M21] = -zAxis.y;\r\n val[webgl.M22] = -zAxis.z;\r\n Matrix4.tmpMatrix.identity();\r\n Matrix4.tmpMatrix.values[webgl.M03] = -position.x;\r\n Matrix4.tmpMatrix.values[webgl.M13] = -position.y;\r\n Matrix4.tmpMatrix.values[webgl.M23] = -position.z;\r\n this.multiply(Matrix4.tmpMatrix);\r\n return this;\r\n };\r\n Matrix4.initTemps = function () {\r\n if (Matrix4.xAxis === null)\r\n Matrix4.xAxis = new webgl.Vector3();\r\n if (Matrix4.yAxis === null)\r\n Matrix4.yAxis = new webgl.Vector3();\r\n if (Matrix4.zAxis === null)\r\n Matrix4.zAxis = new webgl.Vector3();\r\n };\r\n Matrix4.xAxis = null;\r\n Matrix4.yAxis = null;\r\n Matrix4.zAxis = null;\r\n Matrix4.tmpMatrix = new Matrix4();\r\n return Matrix4;\r\n }());\r\n webgl.Matrix4 = Matrix4;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Mesh = (function () {\r\n function Mesh(context, attributes, maxVertices, maxIndices) {\r\n this.attributes = attributes;\r\n this.verticesLength = 0;\r\n this.dirtyVertices = false;\r\n this.indicesLength = 0;\r\n this.dirtyIndices = false;\r\n this.elementsPerVertex = 0;\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.elementsPerVertex = 0;\r\n for (var i = 0; i < attributes.length; i++) {\r\n this.elementsPerVertex += attributes[i].numElements;\r\n }\r\n this.vertices = new Float32Array(maxVertices * this.elementsPerVertex);\r\n this.indices = new Uint16Array(maxIndices);\r\n this.context.addRestorable(this);\r\n }\r\n Mesh.prototype.getAttributes = function () { return this.attributes; };\r\n Mesh.prototype.maxVertices = function () { return this.vertices.length / this.elementsPerVertex; };\r\n Mesh.prototype.numVertices = function () { return this.verticesLength / this.elementsPerVertex; };\r\n Mesh.prototype.setVerticesLength = function (length) {\r\n this.dirtyVertices = true;\r\n this.verticesLength = length;\r\n };\r\n Mesh.prototype.getVertices = function () { return this.vertices; };\r\n Mesh.prototype.maxIndices = function () { return this.indices.length; };\r\n Mesh.prototype.numIndices = function () { return this.indicesLength; };\r\n Mesh.prototype.setIndicesLength = function (length) {\r\n this.dirtyIndices = true;\r\n this.indicesLength = length;\r\n };\r\n Mesh.prototype.getIndices = function () { return this.indices; };\r\n ;\r\n Mesh.prototype.getVertexSizeInFloats = function () {\r\n var size = 0;\r\n for (var i = 0; i < this.attributes.length; i++) {\r\n var attribute = this.attributes[i];\r\n size += attribute.numElements;\r\n }\r\n return size;\r\n };\r\n Mesh.prototype.setVertices = function (vertices) {\r\n this.dirtyVertices = true;\r\n if (vertices.length > this.vertices.length)\r\n throw Error(\"Mesh can't store more than \" + this.maxVertices() + \" vertices\");\r\n this.vertices.set(vertices, 0);\r\n this.verticesLength = vertices.length;\r\n };\r\n Mesh.prototype.setIndices = function (indices) {\r\n this.dirtyIndices = true;\r\n if (indices.length > this.indices.length)\r\n throw Error(\"Mesh can't store more than \" + this.maxIndices() + \" indices\");\r\n this.indices.set(indices, 0);\r\n this.indicesLength = indices.length;\r\n };\r\n Mesh.prototype.draw = function (shader, primitiveType) {\r\n this.drawWithOffset(shader, primitiveType, 0, this.indicesLength > 0 ? this.indicesLength : this.verticesLength / this.elementsPerVertex);\r\n };\r\n Mesh.prototype.drawWithOffset = function (shader, primitiveType, offset, count) {\r\n var gl = this.context.gl;\r\n if (this.dirtyVertices || this.dirtyIndices)\r\n this.update();\r\n this.bind(shader);\r\n if (this.indicesLength > 0) {\r\n gl.drawElements(primitiveType, count, gl.UNSIGNED_SHORT, offset * 2);\r\n }\r\n else {\r\n gl.drawArrays(primitiveType, offset, count);\r\n }\r\n this.unbind(shader);\r\n };\r\n Mesh.prototype.bind = function (shader) {\r\n var gl = this.context.gl;\r\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\r\n var offset = 0;\r\n for (var i = 0; i < this.attributes.length; i++) {\r\n var attrib = this.attributes[i];\r\n var location_1 = shader.getAttributeLocation(attrib.name);\r\n gl.enableVertexAttribArray(location_1);\r\n gl.vertexAttribPointer(location_1, attrib.numElements, gl.FLOAT, false, this.elementsPerVertex * 4, offset * 4);\r\n offset += attrib.numElements;\r\n }\r\n if (this.indicesLength > 0)\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\r\n };\r\n Mesh.prototype.unbind = function (shader) {\r\n var gl = this.context.gl;\r\n for (var i = 0; i < this.attributes.length; i++) {\r\n var attrib = this.attributes[i];\r\n var location_2 = shader.getAttributeLocation(attrib.name);\r\n gl.disableVertexAttribArray(location_2);\r\n }\r\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\r\n if (this.indicesLength > 0)\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);\r\n };\r\n Mesh.prototype.update = function () {\r\n var gl = this.context.gl;\r\n if (this.dirtyVertices) {\r\n if (!this.verticesBuffer) {\r\n this.verticesBuffer = gl.createBuffer();\r\n }\r\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\r\n gl.bufferData(gl.ARRAY_BUFFER, this.vertices.subarray(0, this.verticesLength), gl.DYNAMIC_DRAW);\r\n this.dirtyVertices = false;\r\n }\r\n if (this.dirtyIndices) {\r\n if (!this.indicesBuffer) {\r\n this.indicesBuffer = gl.createBuffer();\r\n }\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\r\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, this.indices.subarray(0, this.indicesLength), gl.DYNAMIC_DRAW);\r\n this.dirtyIndices = false;\r\n }\r\n };\r\n Mesh.prototype.restore = function () {\r\n this.verticesBuffer = null;\r\n this.indicesBuffer = null;\r\n this.update();\r\n };\r\n Mesh.prototype.dispose = function () {\r\n this.context.removeRestorable(this);\r\n var gl = this.context.gl;\r\n gl.deleteBuffer(this.verticesBuffer);\r\n gl.deleteBuffer(this.indicesBuffer);\r\n };\r\n return Mesh;\r\n }());\r\n webgl.Mesh = Mesh;\r\n var VertexAttribute = (function () {\r\n function VertexAttribute(name, type, numElements) {\r\n this.name = name;\r\n this.type = type;\r\n this.numElements = numElements;\r\n }\r\n return VertexAttribute;\r\n }());\r\n webgl.VertexAttribute = VertexAttribute;\r\n var Position2Attribute = (function (_super) {\r\n __extends(Position2Attribute, _super);\r\n function Position2Attribute() {\r\n return _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 2) || this;\r\n }\r\n return Position2Attribute;\r\n }(VertexAttribute));\r\n webgl.Position2Attribute = Position2Attribute;\r\n var Position3Attribute = (function (_super) {\r\n __extends(Position3Attribute, _super);\r\n function Position3Attribute() {\r\n return _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 3) || this;\r\n }\r\n return Position3Attribute;\r\n }(VertexAttribute));\r\n webgl.Position3Attribute = Position3Attribute;\r\n var TexCoordAttribute = (function (_super) {\r\n __extends(TexCoordAttribute, _super);\r\n function TexCoordAttribute(unit) {\r\n if (unit === void 0) { unit = 0; }\r\n return _super.call(this, webgl.Shader.TEXCOORDS + (unit == 0 ? \"\" : unit), VertexAttributeType.Float, 2) || this;\r\n }\r\n return TexCoordAttribute;\r\n }(VertexAttribute));\r\n webgl.TexCoordAttribute = TexCoordAttribute;\r\n var ColorAttribute = (function (_super) {\r\n __extends(ColorAttribute, _super);\r\n function ColorAttribute() {\r\n return _super.call(this, webgl.Shader.COLOR, VertexAttributeType.Float, 4) || this;\r\n }\r\n return ColorAttribute;\r\n }(VertexAttribute));\r\n webgl.ColorAttribute = ColorAttribute;\r\n var Color2Attribute = (function (_super) {\r\n __extends(Color2Attribute, _super);\r\n function Color2Attribute() {\r\n return _super.call(this, webgl.Shader.COLOR2, VertexAttributeType.Float, 4) || this;\r\n }\r\n return Color2Attribute;\r\n }(VertexAttribute));\r\n webgl.Color2Attribute = Color2Attribute;\r\n var VertexAttributeType;\r\n (function (VertexAttributeType) {\r\n VertexAttributeType[VertexAttributeType[\"Float\"] = 0] = \"Float\";\r\n })(VertexAttributeType = webgl.VertexAttributeType || (webgl.VertexAttributeType = {}));\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var PolygonBatcher = (function () {\r\n function PolygonBatcher(context, twoColorTint, maxVertices) {\r\n if (twoColorTint === void 0) { twoColorTint = true; }\r\n if (maxVertices === void 0) { maxVertices = 10920; }\r\n this.isDrawing = false;\r\n this.shader = null;\r\n this.lastTexture = null;\r\n this.verticesLength = 0;\r\n this.indicesLength = 0;\r\n if (maxVertices > 10920)\r\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n var attributes = twoColorTint ?\r\n [new webgl.Position2Attribute(), new webgl.ColorAttribute(), new webgl.TexCoordAttribute(), new webgl.Color2Attribute()] :\r\n [new webgl.Position2Attribute(), new webgl.ColorAttribute(), new webgl.TexCoordAttribute()];\r\n this.mesh = new webgl.Mesh(context, attributes, maxVertices, maxVertices * 3);\r\n this.srcBlend = this.context.gl.SRC_ALPHA;\r\n this.dstBlend = this.context.gl.ONE_MINUS_SRC_ALPHA;\r\n }\r\n PolygonBatcher.prototype.begin = function (shader) {\r\n var gl = this.context.gl;\r\n if (this.isDrawing)\r\n throw new Error(\"PolygonBatch is already drawing. Call PolygonBatch.end() before calling PolygonBatch.begin()\");\r\n this.drawCalls = 0;\r\n this.shader = shader;\r\n this.lastTexture = null;\r\n this.isDrawing = true;\r\n gl.enable(gl.BLEND);\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n };\r\n PolygonBatcher.prototype.setBlendMode = function (srcBlend, dstBlend) {\r\n var gl = this.context.gl;\r\n this.srcBlend = srcBlend;\r\n this.dstBlend = dstBlend;\r\n if (this.isDrawing) {\r\n this.flush();\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n }\r\n };\r\n PolygonBatcher.prototype.draw = function (texture, vertices, indices) {\r\n if (texture != this.lastTexture) {\r\n this.flush();\r\n this.lastTexture = texture;\r\n }\r\n else if (this.verticesLength + vertices.length > this.mesh.getVertices().length ||\r\n this.indicesLength + indices.length > this.mesh.getIndices().length) {\r\n this.flush();\r\n }\r\n var indexStart = this.mesh.numVertices();\r\n this.mesh.getVertices().set(vertices, this.verticesLength);\r\n this.verticesLength += vertices.length;\r\n this.mesh.setVerticesLength(this.verticesLength);\r\n var indicesArray = this.mesh.getIndices();\r\n for (var i = this.indicesLength, j = 0; j < indices.length; i++, j++)\r\n indicesArray[i] = indices[j] + indexStart;\r\n this.indicesLength += indices.length;\r\n this.mesh.setIndicesLength(this.indicesLength);\r\n };\r\n PolygonBatcher.prototype.flush = function () {\r\n var gl = this.context.gl;\r\n if (this.verticesLength == 0)\r\n return;\r\n this.lastTexture.bind();\r\n this.mesh.draw(this.shader, gl.TRIANGLES);\r\n this.verticesLength = 0;\r\n this.indicesLength = 0;\r\n this.mesh.setVerticesLength(0);\r\n this.mesh.setIndicesLength(0);\r\n this.drawCalls++;\r\n };\r\n PolygonBatcher.prototype.end = function () {\r\n var gl = this.context.gl;\r\n if (!this.isDrawing)\r\n throw new Error(\"PolygonBatch is not drawing. Call PolygonBatch.begin() before calling PolygonBatch.end()\");\r\n if (this.verticesLength > 0 || this.indicesLength > 0)\r\n this.flush();\r\n this.shader = null;\r\n this.lastTexture = null;\r\n this.isDrawing = false;\r\n gl.disable(gl.BLEND);\r\n };\r\n PolygonBatcher.prototype.getDrawCalls = function () { return this.drawCalls; };\r\n PolygonBatcher.prototype.dispose = function () {\r\n this.mesh.dispose();\r\n };\r\n return PolygonBatcher;\r\n }());\r\n webgl.PolygonBatcher = PolygonBatcher;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var SceneRenderer = (function () {\r\n function SceneRenderer(canvas, context, twoColorTint) {\r\n if (twoColorTint === void 0) { twoColorTint = true; }\r\n this.twoColorTint = false;\r\n this.activeRenderer = null;\r\n this.QUAD = [\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n ];\r\n this.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n this.WHITE = new spine.Color(1, 1, 1, 1);\r\n this.canvas = canvas;\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.twoColorTint = twoColorTint;\r\n this.camera = new webgl.OrthoCamera(canvas.width, canvas.height);\r\n this.batcherShader = twoColorTint ? webgl.Shader.newTwoColoredTextured(this.context) : webgl.Shader.newColoredTextured(this.context);\r\n this.batcher = new webgl.PolygonBatcher(this.context, twoColorTint);\r\n this.shapesShader = webgl.Shader.newColored(this.context);\r\n this.shapes = new webgl.ShapeRenderer(this.context);\r\n this.skeletonRenderer = new webgl.SkeletonRenderer(this.context, twoColorTint);\r\n this.skeletonDebugRenderer = new webgl.SkeletonDebugRenderer(this.context);\r\n }\r\n SceneRenderer.prototype.begin = function () {\r\n this.camera.update();\r\n this.enableRenderer(this.batcher);\r\n };\r\n SceneRenderer.prototype.drawSkeleton = function (skeleton, premultipliedAlpha, slotRangeStart, slotRangeEnd) {\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n if (slotRangeStart === void 0) { slotRangeStart = -1; }\r\n if (slotRangeEnd === void 0) { slotRangeEnd = -1; }\r\n this.enableRenderer(this.batcher);\r\n this.skeletonRenderer.premultipliedAlpha = premultipliedAlpha;\r\n this.skeletonRenderer.draw(this.batcher, skeleton, slotRangeStart, slotRangeEnd);\r\n };\r\n SceneRenderer.prototype.drawSkeletonDebug = function (skeleton, premultipliedAlpha, ignoredBones) {\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n if (ignoredBones === void 0) { ignoredBones = null; }\r\n this.enableRenderer(this.shapes);\r\n this.skeletonDebugRenderer.premultipliedAlpha = premultipliedAlpha;\r\n this.skeletonDebugRenderer.draw(this.shapes, skeleton, ignoredBones);\r\n };\r\n SceneRenderer.prototype.drawTexture = function (texture, x, y, width, height, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.drawTextureUV = function (texture, x, y, width, height, u, v, u2, v2, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u;\r\n quad[i++] = v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u2;\r\n quad[i++] = v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u2;\r\n quad[i++] = v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u;\r\n quad[i++] = v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.drawTextureRotated = function (texture, x, y, width, height, pivotX, pivotY, angle, color, premultipliedAlpha) {\r\n if (color === void 0) { color = null; }\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var worldOriginX = x + pivotX;\r\n var worldOriginY = y + pivotY;\r\n var fx = -pivotX;\r\n var fy = -pivotY;\r\n var fx2 = width - pivotX;\r\n var fy2 = height - pivotY;\r\n var p1x = fx;\r\n var p1y = fy;\r\n var p2x = fx;\r\n var p2y = fy2;\r\n var p3x = fx2;\r\n var p3y = fy2;\r\n var p4x = fx2;\r\n var p4y = fy;\r\n var x1 = 0;\r\n var y1 = 0;\r\n var x2 = 0;\r\n var y2 = 0;\r\n var x3 = 0;\r\n var y3 = 0;\r\n var x4 = 0;\r\n var y4 = 0;\r\n if (angle != 0) {\r\n var cos = spine.MathUtils.cosDeg(angle);\r\n var sin = spine.MathUtils.sinDeg(angle);\r\n x1 = cos * p1x - sin * p1y;\r\n y1 = sin * p1x + cos * p1y;\r\n x4 = cos * p2x - sin * p2y;\r\n y4 = sin * p2x + cos * p2y;\r\n x3 = cos * p3x - sin * p3y;\r\n y3 = sin * p3x + cos * p3y;\r\n x2 = x3 + (x1 - x4);\r\n y2 = y3 + (y1 - y4);\r\n }\r\n else {\r\n x1 = p1x;\r\n y1 = p1y;\r\n x4 = p2x;\r\n y4 = p2y;\r\n x3 = p3x;\r\n y3 = p3y;\r\n x2 = p4x;\r\n y2 = p4y;\r\n }\r\n x1 += worldOriginX;\r\n y1 += worldOriginY;\r\n x2 += worldOriginX;\r\n y2 += worldOriginY;\r\n x3 += worldOriginX;\r\n y3 += worldOriginY;\r\n x4 += worldOriginX;\r\n y4 += worldOriginY;\r\n var i = 0;\r\n quad[i++] = x1;\r\n quad[i++] = y1;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x2;\r\n quad[i++] = y2;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x3;\r\n quad[i++] = y3;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x4;\r\n quad[i++] = y4;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.drawRegion = function (region, x, y, width, height, color, premultipliedAlpha) {\r\n if (color === void 0) { color = null; }\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u;\r\n quad[i++] = region.v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u2;\r\n quad[i++] = region.v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u2;\r\n quad[i++] = region.v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u;\r\n quad[i++] = region.v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(region.texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.line = function (x, y, x2, y2, color, color2) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.line(x, y, x2, y2, color);\r\n };\r\n SceneRenderer.prototype.triangle = function (filled, x, y, x2, y2, x3, y3, color, color2, color3) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.triangle(filled, x, y, x2, y2, x3, y3, color, color2, color3);\r\n };\r\n SceneRenderer.prototype.quad = function (filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n if (color4 === void 0) { color4 = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.quad(filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4);\r\n };\r\n SceneRenderer.prototype.rect = function (filled, x, y, width, height, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.rect(filled, x, y, width, height, color);\r\n };\r\n SceneRenderer.prototype.rectLine = function (filled, x1, y1, x2, y2, width, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.rectLine(filled, x1, y1, x2, y2, width, color);\r\n };\r\n SceneRenderer.prototype.polygon = function (polygonVertices, offset, count, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.polygon(polygonVertices, offset, count, color);\r\n };\r\n SceneRenderer.prototype.circle = function (filled, x, y, radius, color, segments) {\r\n if (color === void 0) { color = null; }\r\n if (segments === void 0) { segments = 0; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.circle(filled, x, y, radius, color, segments);\r\n };\r\n SceneRenderer.prototype.curve = function (x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color);\r\n };\r\n SceneRenderer.prototype.end = function () {\r\n if (this.activeRenderer === this.batcher)\r\n this.batcher.end();\r\n else if (this.activeRenderer === this.shapes)\r\n this.shapes.end();\r\n this.activeRenderer = null;\r\n };\r\n SceneRenderer.prototype.resize = function (resizeMode) {\r\n var canvas = this.canvas;\r\n var w = canvas.clientWidth;\r\n var h = canvas.clientHeight;\r\n if (canvas.width != w || canvas.height != h) {\r\n canvas.width = w;\r\n canvas.height = h;\r\n }\r\n this.context.gl.viewport(0, 0, canvas.width, canvas.height);\r\n if (resizeMode === ResizeMode.Stretch) {\r\n }\r\n else if (resizeMode === ResizeMode.Expand) {\r\n this.camera.setViewport(w, h);\r\n }\r\n else if (resizeMode === ResizeMode.Fit) {\r\n var sourceWidth = canvas.width, sourceHeight = canvas.height;\r\n var targetWidth = this.camera.viewportWidth, targetHeight = this.camera.viewportHeight;\r\n var targetRatio = targetHeight / targetWidth;\r\n var sourceRatio = sourceHeight / sourceWidth;\r\n var scale = targetRatio < sourceRatio ? targetWidth / sourceWidth : targetHeight / sourceHeight;\r\n this.camera.viewportWidth = sourceWidth * scale;\r\n this.camera.viewportHeight = sourceHeight * scale;\r\n }\r\n this.camera.update();\r\n };\r\n SceneRenderer.prototype.enableRenderer = function (renderer) {\r\n if (this.activeRenderer === renderer)\r\n return;\r\n this.end();\r\n if (renderer instanceof webgl.PolygonBatcher) {\r\n this.batcherShader.bind();\r\n this.batcherShader.setUniform4x4f(webgl.Shader.MVP_MATRIX, this.camera.projectionView.values);\r\n this.batcherShader.setUniformi(\"u_texture\", 0);\r\n this.batcher.begin(this.batcherShader);\r\n this.activeRenderer = this.batcher;\r\n }\r\n else if (renderer instanceof webgl.ShapeRenderer) {\r\n this.shapesShader.bind();\r\n this.shapesShader.setUniform4x4f(webgl.Shader.MVP_MATRIX, this.camera.projectionView.values);\r\n this.shapes.begin(this.shapesShader);\r\n this.activeRenderer = this.shapes;\r\n }\r\n else {\r\n this.activeRenderer = this.skeletonDebugRenderer;\r\n }\r\n };\r\n SceneRenderer.prototype.dispose = function () {\r\n this.batcher.dispose();\r\n this.batcherShader.dispose();\r\n this.shapes.dispose();\r\n this.shapesShader.dispose();\r\n this.skeletonDebugRenderer.dispose();\r\n };\r\n return SceneRenderer;\r\n }());\r\n webgl.SceneRenderer = SceneRenderer;\r\n var ResizeMode;\r\n (function (ResizeMode) {\r\n ResizeMode[ResizeMode[\"Stretch\"] = 0] = \"Stretch\";\r\n ResizeMode[ResizeMode[\"Expand\"] = 1] = \"Expand\";\r\n ResizeMode[ResizeMode[\"Fit\"] = 2] = \"Fit\";\r\n })(ResizeMode = webgl.ResizeMode || (webgl.ResizeMode = {}));\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Shader = (function () {\r\n function Shader(context, vertexShader, fragmentShader) {\r\n this.vertexShader = vertexShader;\r\n this.fragmentShader = fragmentShader;\r\n this.vs = null;\r\n this.fs = null;\r\n this.program = null;\r\n this.tmp2x2 = new Float32Array(2 * 2);\r\n this.tmp3x3 = new Float32Array(3 * 3);\r\n this.tmp4x4 = new Float32Array(4 * 4);\r\n this.vsSource = vertexShader;\r\n this.fsSource = fragmentShader;\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.context.addRestorable(this);\r\n this.compile();\r\n }\r\n Shader.prototype.getProgram = function () { return this.program; };\r\n Shader.prototype.getVertexShader = function () { return this.vertexShader; };\r\n Shader.prototype.getFragmentShader = function () { return this.fragmentShader; };\r\n Shader.prototype.getVertexShaderSource = function () { return this.vsSource; };\r\n Shader.prototype.getFragmentSource = function () { return this.fsSource; };\r\n Shader.prototype.compile = function () {\r\n var gl = this.context.gl;\r\n try {\r\n this.vs = this.compileShader(gl.VERTEX_SHADER, this.vertexShader);\r\n this.fs = this.compileShader(gl.FRAGMENT_SHADER, this.fragmentShader);\r\n this.program = this.compileProgram(this.vs, this.fs);\r\n }\r\n catch (e) {\r\n this.dispose();\r\n throw e;\r\n }\r\n };\r\n Shader.prototype.compileShader = function (type, source) {\r\n var gl = this.context.gl;\r\n var shader = gl.createShader(type);\r\n gl.shaderSource(shader, source);\r\n gl.compileShader(shader);\r\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\r\n var error = \"Couldn't compile shader: \" + gl.getShaderInfoLog(shader);\r\n gl.deleteShader(shader);\r\n if (!gl.isContextLost())\r\n throw new Error(error);\r\n }\r\n return shader;\r\n };\r\n Shader.prototype.compileProgram = function (vs, fs) {\r\n var gl = this.context.gl;\r\n var program = gl.createProgram();\r\n gl.attachShader(program, vs);\r\n gl.attachShader(program, fs);\r\n gl.linkProgram(program);\r\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\r\n var error = \"Couldn't compile shader program: \" + gl.getProgramInfoLog(program);\r\n gl.deleteProgram(program);\r\n if (!gl.isContextLost())\r\n throw new Error(error);\r\n }\r\n return program;\r\n };\r\n Shader.prototype.restore = function () {\r\n this.compile();\r\n };\r\n Shader.prototype.bind = function () {\r\n this.context.gl.useProgram(this.program);\r\n };\r\n Shader.prototype.unbind = function () {\r\n this.context.gl.useProgram(null);\r\n };\r\n Shader.prototype.setUniformi = function (uniform, value) {\r\n this.context.gl.uniform1i(this.getUniformLocation(uniform), value);\r\n };\r\n Shader.prototype.setUniformf = function (uniform, value) {\r\n this.context.gl.uniform1f(this.getUniformLocation(uniform), value);\r\n };\r\n Shader.prototype.setUniform2f = function (uniform, value, value2) {\r\n this.context.gl.uniform2f(this.getUniformLocation(uniform), value, value2);\r\n };\r\n Shader.prototype.setUniform3f = function (uniform, value, value2, value3) {\r\n this.context.gl.uniform3f(this.getUniformLocation(uniform), value, value2, value3);\r\n };\r\n Shader.prototype.setUniform4f = function (uniform, value, value2, value3, value4) {\r\n this.context.gl.uniform4f(this.getUniformLocation(uniform), value, value2, value3, value4);\r\n };\r\n Shader.prototype.setUniform2x2f = function (uniform, value) {\r\n var gl = this.context.gl;\r\n this.tmp2x2.set(value);\r\n gl.uniformMatrix2fv(this.getUniformLocation(uniform), false, this.tmp2x2);\r\n };\r\n Shader.prototype.setUniform3x3f = function (uniform, value) {\r\n var gl = this.context.gl;\r\n this.tmp3x3.set(value);\r\n gl.uniformMatrix3fv(this.getUniformLocation(uniform), false, this.tmp3x3);\r\n };\r\n Shader.prototype.setUniform4x4f = function (uniform, value) {\r\n var gl = this.context.gl;\r\n this.tmp4x4.set(value);\r\n gl.uniformMatrix4fv(this.getUniformLocation(uniform), false, this.tmp4x4);\r\n };\r\n Shader.prototype.getUniformLocation = function (uniform) {\r\n var gl = this.context.gl;\r\n var location = gl.getUniformLocation(this.program, uniform);\r\n if (!location && !gl.isContextLost())\r\n throw new Error(\"Couldn't find location for uniform \" + uniform);\r\n return location;\r\n };\r\n Shader.prototype.getAttributeLocation = function (attribute) {\r\n var gl = this.context.gl;\r\n var location = gl.getAttribLocation(this.program, attribute);\r\n if (location == -1 && !gl.isContextLost())\r\n throw new Error(\"Couldn't find location for attribute \" + attribute);\r\n return location;\r\n };\r\n Shader.prototype.dispose = function () {\r\n this.context.removeRestorable(this);\r\n var gl = this.context.gl;\r\n if (this.vs) {\r\n gl.deleteShader(this.vs);\r\n this.vs = null;\r\n }\r\n if (this.fs) {\r\n gl.deleteShader(this.fs);\r\n this.fs = null;\r\n }\r\n if (this.program) {\r\n gl.deleteProgram(this.program);\r\n this.program = null;\r\n }\r\n };\r\n Shader.newColoredTextured = function (context) {\r\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \" + Shader.POSITION + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR + \";\\n\\t\\t\\t\\tattribute vec2 \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\tuniform mat4 \" + Shader.MVP_MATRIX + \";\\n\\t\\t\\t\\tvarying vec4 v_color;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_color = \" + Shader.COLOR + \";\\n\\t\\t\\t\\t\\tv_texCoords = \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\t\\tgl_Position = \" + Shader.MVP_MATRIX + \" * \" + Shader.POSITION + \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_color;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\t\\t\\t\\tuniform sampler2D u_texture;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tgl_FragColor = v_color * texture2D(u_texture, v_texCoords);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n return new Shader(context, vs, fs);\r\n };\r\n Shader.newTwoColoredTextured = function (context) {\r\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \" + Shader.POSITION + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR2 + \";\\n\\t\\t\\t\\tattribute vec2 \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\tuniform mat4 \" + Shader.MVP_MATRIX + \";\\n\\t\\t\\t\\tvarying vec4 v_light;\\n\\t\\t\\t\\tvarying vec4 v_dark;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_light = \" + Shader.COLOR + \";\\n\\t\\t\\t\\t\\tv_dark = \" + Shader.COLOR2 + \";\\n\\t\\t\\t\\t\\tv_texCoords = \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\t\\tgl_Position = \" + Shader.MVP_MATRIX + \" * \" + Shader.POSITION + \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_light;\\n\\t\\t\\t\\tvarying LOWP vec4 v_dark;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\t\\t\\t\\tuniform sampler2D u_texture;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tvec4 texColor = texture2D(u_texture, v_texCoords);\\n\\t\\t\\t\\t\\tgl_FragColor.a = texColor.a * v_light.a;\\n\\t\\t\\t\\t\\tgl_FragColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n return new Shader(context, vs, fs);\r\n };\r\n Shader.newColored = function (context) {\r\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \" + Shader.POSITION + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR + \";\\n\\t\\t\\t\\tuniform mat4 \" + Shader.MVP_MATRIX + \";\\n\\t\\t\\t\\tvarying vec4 v_color;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_color = \" + Shader.COLOR + \";\\n\\t\\t\\t\\t\\tgl_Position = \" + Shader.MVP_MATRIX + \" * \" + Shader.POSITION + \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_color;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tgl_FragColor = v_color;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n return new Shader(context, vs, fs);\r\n };\r\n Shader.MVP_MATRIX = \"u_projTrans\";\r\n Shader.POSITION = \"a_position\";\r\n Shader.COLOR = \"a_color\";\r\n Shader.COLOR2 = \"a_color2\";\r\n Shader.TEXCOORDS = \"a_texCoords\";\r\n Shader.SAMPLER = \"u_texture\";\r\n return Shader;\r\n }());\r\n webgl.Shader = Shader;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var ShapeRenderer = (function () {\r\n function ShapeRenderer(context, maxVertices) {\r\n if (maxVertices === void 0) { maxVertices = 10920; }\r\n this.isDrawing = false;\r\n this.shapeType = ShapeType.Filled;\r\n this.color = new spine.Color(1, 1, 1, 1);\r\n this.vertexIndex = 0;\r\n this.tmp = new spine.Vector2();\r\n if (maxVertices > 10920)\r\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.mesh = new webgl.Mesh(context, [new webgl.Position2Attribute(), new webgl.ColorAttribute()], maxVertices, 0);\r\n this.srcBlend = this.context.gl.SRC_ALPHA;\r\n this.dstBlend = this.context.gl.ONE_MINUS_SRC_ALPHA;\r\n }\r\n ShapeRenderer.prototype.begin = function (shader) {\r\n if (this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has already been called\");\r\n this.shader = shader;\r\n this.vertexIndex = 0;\r\n this.isDrawing = true;\r\n var gl = this.context.gl;\r\n gl.enable(gl.BLEND);\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n };\r\n ShapeRenderer.prototype.setBlendMode = function (srcBlend, dstBlend) {\r\n var gl = this.context.gl;\r\n this.srcBlend = srcBlend;\r\n this.dstBlend = dstBlend;\r\n if (this.isDrawing) {\r\n this.flush();\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n }\r\n };\r\n ShapeRenderer.prototype.setColor = function (color) {\r\n this.color.setFromColor(color);\r\n };\r\n ShapeRenderer.prototype.setColorWith = function (r, g, b, a) {\r\n this.color.set(r, g, b, a);\r\n };\r\n ShapeRenderer.prototype.point = function (x, y, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(ShapeType.Point, 1);\r\n if (color === null)\r\n color = this.color;\r\n this.vertex(x, y, color);\r\n };\r\n ShapeRenderer.prototype.line = function (x, y, x2, y2, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(ShapeType.Line, 2);\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n if (color === null)\r\n color = this.color;\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color);\r\n };\r\n ShapeRenderer.prototype.triangle = function (filled, x, y, x2, y2, x3, y3, color, color2, color3) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n if (color === null)\r\n color = this.color;\r\n if (color2 === null)\r\n color2 = this.color;\r\n if (color3 === null)\r\n color3 = this.color;\r\n if (filled) {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n }\r\n else {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x2, y2, color);\r\n this.vertex(x3, y3, color2);\r\n this.vertex(x3, y3, color);\r\n this.vertex(x, y, color2);\r\n }\r\n };\r\n ShapeRenderer.prototype.quad = function (filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n if (color4 === void 0) { color4 = null; }\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n if (color === null)\r\n color = this.color;\r\n if (color2 === null)\r\n color2 = this.color;\r\n if (color3 === null)\r\n color3 = this.color;\r\n if (color4 === null)\r\n color4 = this.color;\r\n if (filled) {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x, y, color);\r\n }\r\n else {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x, y, color);\r\n }\r\n };\r\n ShapeRenderer.prototype.rect = function (filled, x, y, width, height, color) {\r\n if (color === void 0) { color = null; }\r\n this.quad(filled, x, y, x + width, y, x + width, y + height, x, y + height, color, color, color, color);\r\n };\r\n ShapeRenderer.prototype.rectLine = function (filled, x1, y1, x2, y2, width, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 8);\r\n if (color === null)\r\n color = this.color;\r\n var t = this.tmp.set(y2 - y1, x1 - x2);\r\n t.normalize();\r\n width *= 0.5;\r\n var tx = t.x * width;\r\n var ty = t.y * width;\r\n if (!filled) {\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n }\r\n else {\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n }\r\n };\r\n ShapeRenderer.prototype.x = function (x, y, size) {\r\n this.line(x - size, y - size, x + size, y + size);\r\n this.line(x - size, y + size, x + size, y - size);\r\n };\r\n ShapeRenderer.prototype.polygon = function (polygonVertices, offset, count, color) {\r\n if (color === void 0) { color = null; }\r\n if (count < 3)\r\n throw new Error(\"Polygon must contain at least 3 vertices\");\r\n this.check(ShapeType.Line, count * 2);\r\n if (color === null)\r\n color = this.color;\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n offset <<= 1;\r\n count <<= 1;\r\n var firstX = polygonVertices[offset];\r\n var firstY = polygonVertices[offset + 1];\r\n var last = offset + count;\r\n for (var i = offset, n = offset + count - 2; i < n; i += 2) {\r\n var x1 = polygonVertices[i];\r\n var y1 = polygonVertices[i + 1];\r\n var x2 = 0;\r\n var y2 = 0;\r\n if (i + 2 >= last) {\r\n x2 = firstX;\r\n y2 = firstY;\r\n }\r\n else {\r\n x2 = polygonVertices[i + 2];\r\n y2 = polygonVertices[i + 3];\r\n }\r\n this.vertex(x1, y1, color);\r\n this.vertex(x2, y2, color);\r\n }\r\n };\r\n ShapeRenderer.prototype.circle = function (filled, x, y, radius, color, segments) {\r\n if (color === void 0) { color = null; }\r\n if (segments === void 0) { segments = 0; }\r\n if (segments === 0)\r\n segments = Math.max(1, (6 * spine.MathUtils.cbrt(radius)) | 0);\r\n if (segments <= 0)\r\n throw new Error(\"segments must be > 0.\");\r\n if (color === null)\r\n color = this.color;\r\n var angle = 2 * spine.MathUtils.PI / segments;\r\n var cos = Math.cos(angle);\r\n var sin = Math.sin(angle);\r\n var cx = radius, cy = 0;\r\n if (!filled) {\r\n this.check(ShapeType.Line, segments * 2 + 2);\r\n for (var i = 0; i < segments; i++) {\r\n this.vertex(x + cx, y + cy, color);\r\n var temp_1 = cx;\r\n cx = cos * cx - sin * cy;\r\n cy = sin * temp_1 + cos * cy;\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n else {\r\n this.check(ShapeType.Filled, segments * 3 + 3);\r\n segments--;\r\n for (var i = 0; i < segments; i++) {\r\n this.vertex(x, y, color);\r\n this.vertex(x + cx, y + cy, color);\r\n var temp_2 = cx;\r\n cx = cos * cx - sin * cy;\r\n cy = sin * temp_2 + cos * cy;\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n this.vertex(x, y, color);\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n var temp = cx;\r\n cx = radius;\r\n cy = 0;\r\n this.vertex(x + cx, y + cy, color);\r\n };\r\n ShapeRenderer.prototype.curve = function (x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(ShapeType.Line, segments * 2 + 2);\r\n if (color === null)\r\n color = this.color;\r\n var subdiv_step = 1 / segments;\r\n var subdiv_step2 = subdiv_step * subdiv_step;\r\n var subdiv_step3 = subdiv_step * subdiv_step * subdiv_step;\r\n var pre1 = 3 * subdiv_step;\r\n var pre2 = 3 * subdiv_step2;\r\n var pre4 = 6 * subdiv_step2;\r\n var pre5 = 6 * subdiv_step3;\r\n var tmp1x = x1 - cx1 * 2 + cx2;\r\n var tmp1y = y1 - cy1 * 2 + cy2;\r\n var tmp2x = (cx1 - cx2) * 3 - x1 + x2;\r\n var tmp2y = (cy1 - cy2) * 3 - y1 + y2;\r\n var fx = x1;\r\n var fy = y1;\r\n var dfx = (cx1 - x1) * pre1 + tmp1x * pre2 + tmp2x * subdiv_step3;\r\n var dfy = (cy1 - y1) * pre1 + tmp1y * pre2 + tmp2y * subdiv_step3;\r\n var ddfx = tmp1x * pre4 + tmp2x * pre5;\r\n var ddfy = tmp1y * pre4 + tmp2y * pre5;\r\n var dddfx = tmp2x * pre5;\r\n var dddfy = tmp2y * pre5;\r\n while (segments-- > 0) {\r\n this.vertex(fx, fy, color);\r\n fx += dfx;\r\n fy += dfy;\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n this.vertex(fx, fy, color);\r\n }\r\n this.vertex(fx, fy, color);\r\n this.vertex(x2, y2, color);\r\n };\r\n ShapeRenderer.prototype.vertex = function (x, y, color) {\r\n var idx = this.vertexIndex;\r\n var vertices = this.mesh.getVertices();\r\n vertices[idx++] = x;\r\n vertices[idx++] = y;\r\n vertices[idx++] = color.r;\r\n vertices[idx++] = color.g;\r\n vertices[idx++] = color.b;\r\n vertices[idx++] = color.a;\r\n this.vertexIndex = idx;\r\n };\r\n ShapeRenderer.prototype.end = function () {\r\n if (!this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has not been called\");\r\n this.flush();\r\n this.context.gl.disable(this.context.gl.BLEND);\r\n this.isDrawing = false;\r\n };\r\n ShapeRenderer.prototype.flush = function () {\r\n if (this.vertexIndex == 0)\r\n return;\r\n this.mesh.setVerticesLength(this.vertexIndex);\r\n this.mesh.draw(this.shader, this.shapeType);\r\n this.vertexIndex = 0;\r\n };\r\n ShapeRenderer.prototype.check = function (shapeType, numVertices) {\r\n if (!this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has not been called\");\r\n if (this.shapeType == shapeType) {\r\n if (this.mesh.maxVertices() - this.mesh.numVertices() < numVertices)\r\n this.flush();\r\n else\r\n return;\r\n }\r\n else {\r\n this.flush();\r\n this.shapeType = shapeType;\r\n }\r\n };\r\n ShapeRenderer.prototype.dispose = function () {\r\n this.mesh.dispose();\r\n };\r\n return ShapeRenderer;\r\n }());\r\n webgl.ShapeRenderer = ShapeRenderer;\r\n var ShapeType;\r\n (function (ShapeType) {\r\n ShapeType[ShapeType[\"Point\"] = 0] = \"Point\";\r\n ShapeType[ShapeType[\"Line\"] = 1] = \"Line\";\r\n ShapeType[ShapeType[\"Filled\"] = 4] = \"Filled\";\r\n })(ShapeType = webgl.ShapeType || (webgl.ShapeType = {}));\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var SkeletonDebugRenderer = (function () {\r\n function SkeletonDebugRenderer(context) {\r\n this.boneLineColor = new spine.Color(1, 0, 0, 1);\r\n this.boneOriginColor = new spine.Color(0, 1, 0, 1);\r\n this.attachmentLineColor = new spine.Color(0, 0, 1, 0.5);\r\n this.triangleLineColor = new spine.Color(1, 0.64, 0, 0.5);\r\n this.pathColor = new spine.Color().setFromString(\"FF7F00\");\r\n this.clipColor = new spine.Color(0.8, 0, 0, 2);\r\n this.aabbColor = new spine.Color(0, 1, 0, 0.5);\r\n this.drawBones = true;\r\n this.drawRegionAttachments = true;\r\n this.drawBoundingBoxes = true;\r\n this.drawMeshHull = true;\r\n this.drawMeshTriangles = true;\r\n this.drawPaths = true;\r\n this.drawSkeletonXY = false;\r\n this.drawClipping = true;\r\n this.premultipliedAlpha = false;\r\n this.scale = 1;\r\n this.boneWidth = 2;\r\n this.bounds = new spine.SkeletonBounds();\r\n this.temp = new Array();\r\n this.vertices = spine.Utils.newFloatArray(2 * 1024);\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n }\r\n SkeletonDebugRenderer.prototype.draw = function (shapes, skeleton, ignoredBones) {\r\n if (ignoredBones === void 0) { ignoredBones = null; }\r\n var skeletonX = skeleton.x;\r\n var skeletonY = skeleton.y;\r\n var gl = this.context.gl;\r\n var srcFunc = this.premultipliedAlpha ? gl.ONE : gl.SRC_ALPHA;\r\n shapes.setBlendMode(srcFunc, gl.ONE_MINUS_SRC_ALPHA);\r\n var bones = skeleton.bones;\r\n if (this.drawBones) {\r\n shapes.setColor(this.boneLineColor);\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\r\n continue;\r\n if (bone.parent == null)\r\n continue;\r\n var x = skeletonX + bone.data.length * bone.a + bone.worldX;\r\n var y = skeletonY + bone.data.length * bone.c + bone.worldY;\r\n shapes.rectLine(true, skeletonX + bone.worldX, skeletonY + bone.worldY, x, y, this.boneWidth * this.scale);\r\n }\r\n if (this.drawSkeletonXY)\r\n shapes.x(skeletonX, skeletonY, 4 * this.scale);\r\n }\r\n if (this.drawRegionAttachments) {\r\n shapes.setColor(this.attachmentLineColor);\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.RegionAttachment) {\r\n var regionAttachment = attachment;\r\n var vertices = this.vertices;\r\n regionAttachment.computeWorldVertices(slot.bone, vertices, 0, 2);\r\n shapes.line(vertices[0], vertices[1], vertices[2], vertices[3]);\r\n shapes.line(vertices[2], vertices[3], vertices[4], vertices[5]);\r\n shapes.line(vertices[4], vertices[5], vertices[6], vertices[7]);\r\n shapes.line(vertices[6], vertices[7], vertices[0], vertices[1]);\r\n }\r\n }\r\n }\r\n if (this.drawMeshHull || this.drawMeshTriangles) {\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (!(attachment instanceof spine.MeshAttachment))\r\n continue;\r\n var mesh = attachment;\r\n var vertices = this.vertices;\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, 2);\r\n var triangles = mesh.triangles;\r\n var hullLength = mesh.hullLength;\r\n if (this.drawMeshTriangles) {\r\n shapes.setColor(this.triangleLineColor);\r\n for (var ii = 0, nn = triangles.length; ii < nn; ii += 3) {\r\n var v1 = triangles[ii] * 2, v2 = triangles[ii + 1] * 2, v3 = triangles[ii + 2] * 2;\r\n shapes.triangle(false, vertices[v1], vertices[v1 + 1], vertices[v2], vertices[v2 + 1], vertices[v3], vertices[v3 + 1]);\r\n }\r\n }\r\n if (this.drawMeshHull && hullLength > 0) {\r\n shapes.setColor(this.attachmentLineColor);\r\n hullLength = (hullLength >> 1) * 2;\r\n var lastX = vertices[hullLength - 2], lastY = vertices[hullLength - 1];\r\n for (var ii = 0, nn = hullLength; ii < nn; ii += 2) {\r\n var x = vertices[ii], y = vertices[ii + 1];\r\n shapes.line(x, y, lastX, lastY);\r\n lastX = x;\r\n lastY = y;\r\n }\r\n }\r\n }\r\n }\r\n if (this.drawBoundingBoxes) {\r\n var bounds = this.bounds;\r\n bounds.update(skeleton, true);\r\n shapes.setColor(this.aabbColor);\r\n shapes.rect(false, bounds.minX, bounds.minY, bounds.getWidth(), bounds.getHeight());\r\n var polygons = bounds.polygons;\r\n var boxes = bounds.boundingBoxes;\r\n for (var i = 0, n = polygons.length; i < n; i++) {\r\n var polygon = polygons[i];\r\n shapes.setColor(boxes[i].color);\r\n shapes.polygon(polygon, 0, polygon.length);\r\n }\r\n }\r\n if (this.drawPaths) {\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (!(attachment instanceof spine.PathAttachment))\r\n continue;\r\n var path = attachment;\r\n var nn = path.worldVerticesLength;\r\n var world = this.temp = spine.Utils.setArraySize(this.temp, nn, 0);\r\n path.computeWorldVertices(slot, 0, nn, world, 0, 2);\r\n var color = this.pathColor;\r\n var x1 = world[2], y1 = world[3], x2 = 0, y2 = 0;\r\n if (path.closed) {\r\n shapes.setColor(color);\r\n var cx1 = world[0], cy1 = world[1], cx2 = world[nn - 2], cy2 = world[nn - 1];\r\n x2 = world[nn - 4];\r\n y2 = world[nn - 3];\r\n shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, 32);\r\n shapes.setColor(SkeletonDebugRenderer.LIGHT_GRAY);\r\n shapes.line(x1, y1, cx1, cy1);\r\n shapes.line(x2, y2, cx2, cy2);\r\n }\r\n nn -= 4;\r\n for (var ii = 4; ii < nn; ii += 6) {\r\n var cx1 = world[ii], cy1 = world[ii + 1], cx2 = world[ii + 2], cy2 = world[ii + 3];\r\n x2 = world[ii + 4];\r\n y2 = world[ii + 5];\r\n shapes.setColor(color);\r\n shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, 32);\r\n shapes.setColor(SkeletonDebugRenderer.LIGHT_GRAY);\r\n shapes.line(x1, y1, cx1, cy1);\r\n shapes.line(x2, y2, cx2, cy2);\r\n x1 = x2;\r\n y1 = y2;\r\n }\r\n }\r\n }\r\n if (this.drawBones) {\r\n shapes.setColor(this.boneOriginColor);\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\r\n continue;\r\n shapes.circle(true, skeletonX + bone.worldX, skeletonY + bone.worldY, 3 * this.scale, SkeletonDebugRenderer.GREEN, 8);\r\n }\r\n }\r\n if (this.drawClipping) {\r\n var slots = skeleton.slots;\r\n shapes.setColor(this.clipColor);\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (!(attachment instanceof spine.ClippingAttachment))\r\n continue;\r\n var clip = attachment;\r\n var nn = clip.worldVerticesLength;\r\n var world = this.temp = spine.Utils.setArraySize(this.temp, nn, 0);\r\n clip.computeWorldVertices(slot, 0, nn, world, 0, 2);\r\n for (var i_16 = 0, n_2 = world.length; i_16 < n_2; i_16 += 2) {\r\n var x = world[i_16];\r\n var y = world[i_16 + 1];\r\n var x2 = world[(i_16 + 2) % world.length];\r\n var y2 = world[(i_16 + 3) % world.length];\r\n shapes.line(x, y, x2, y2);\r\n }\r\n }\r\n }\r\n };\r\n SkeletonDebugRenderer.prototype.dispose = function () {\r\n };\r\n SkeletonDebugRenderer.LIGHT_GRAY = new spine.Color(192 / 255, 192 / 255, 192 / 255, 1);\r\n SkeletonDebugRenderer.GREEN = new spine.Color(0, 1, 0, 1);\r\n return SkeletonDebugRenderer;\r\n }());\r\n webgl.SkeletonDebugRenderer = SkeletonDebugRenderer;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Renderable = (function () {\r\n function Renderable(vertices, numVertices, numFloats) {\r\n this.vertices = vertices;\r\n this.numVertices = numVertices;\r\n this.numFloats = numFloats;\r\n }\r\n return Renderable;\r\n }());\r\n ;\r\n var SkeletonRenderer = (function () {\r\n function SkeletonRenderer(context, twoColorTint) {\r\n if (twoColorTint === void 0) { twoColorTint = true; }\r\n this.premultipliedAlpha = false;\r\n this.vertexEffect = null;\r\n this.tempColor = new spine.Color();\r\n this.tempColor2 = new spine.Color();\r\n this.vertexSize = 2 + 2 + 4;\r\n this.twoColorTint = false;\r\n this.renderable = new Renderable(null, 0, 0);\r\n this.clipper = new spine.SkeletonClipping();\r\n this.temp = new spine.Vector2();\r\n this.temp2 = new spine.Vector2();\r\n this.temp3 = new spine.Color();\r\n this.temp4 = new spine.Color();\r\n this.twoColorTint = twoColorTint;\r\n if (twoColorTint)\r\n this.vertexSize += 4;\r\n this.vertices = spine.Utils.newFloatArray(this.vertexSize * 1024);\r\n }\r\n SkeletonRenderer.prototype.draw = function (batcher, skeleton, slotRangeStart, slotRangeEnd) {\r\n if (slotRangeStart === void 0) { slotRangeStart = -1; }\r\n if (slotRangeEnd === void 0) { slotRangeEnd = -1; }\r\n var clipper = this.clipper;\r\n var premultipliedAlpha = this.premultipliedAlpha;\r\n var twoColorTint = this.twoColorTint;\r\n var blendMode = null;\r\n var tempPos = this.temp;\r\n var tempUv = this.temp2;\r\n var tempLight = this.temp3;\r\n var tempDark = this.temp4;\r\n var renderable = this.renderable;\r\n var uvs = null;\r\n var triangles = null;\r\n var drawOrder = skeleton.drawOrder;\r\n var attachmentColor = null;\r\n var skeletonColor = skeleton.color;\r\n var vertexSize = twoColorTint ? 12 : 8;\r\n var inRange = false;\r\n if (slotRangeStart == -1)\r\n inRange = true;\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var clippedVertexSize = clipper.isClipping() ? 2 : vertexSize;\r\n var slot = drawOrder[i];\r\n if (!slot.bone.active) {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (slotRangeStart >= 0 && slotRangeStart == slot.data.index) {\r\n inRange = true;\r\n }\r\n if (!inRange) {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (slotRangeEnd >= 0 && slotRangeEnd == slot.data.index) {\r\n inRange = false;\r\n }\r\n var attachment = slot.getAttachment();\r\n var texture = null;\r\n if (attachment instanceof spine.RegionAttachment) {\r\n var region = attachment;\r\n renderable.vertices = this.vertices;\r\n renderable.numVertices = 4;\r\n renderable.numFloats = clippedVertexSize << 2;\r\n region.computeWorldVertices(slot.bone, renderable.vertices, 0, clippedVertexSize);\r\n triangles = SkeletonRenderer.QUAD_TRIANGLES;\r\n uvs = region.uvs;\r\n texture = region.region.renderObject.texture;\r\n attachmentColor = region.color;\r\n }\r\n else if (attachment instanceof spine.MeshAttachment) {\r\n var mesh = attachment;\r\n renderable.vertices = this.vertices;\r\n renderable.numVertices = (mesh.worldVerticesLength >> 1);\r\n renderable.numFloats = renderable.numVertices * clippedVertexSize;\r\n if (renderable.numFloats > renderable.vertices.length) {\r\n renderable.vertices = this.vertices = spine.Utils.newFloatArray(renderable.numFloats);\r\n }\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, renderable.vertices, 0, clippedVertexSize);\r\n triangles = mesh.triangles;\r\n texture = mesh.region.renderObject.texture;\r\n uvs = mesh.uvs;\r\n attachmentColor = mesh.color;\r\n }\r\n else if (attachment instanceof spine.ClippingAttachment) {\r\n var clip = (attachment);\r\n clipper.clipStart(slot, clip);\r\n continue;\r\n }\r\n else {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (texture != null) {\r\n var slotColor = slot.color;\r\n var finalColor = this.tempColor;\r\n finalColor.r = skeletonColor.r * slotColor.r * attachmentColor.r;\r\n finalColor.g = skeletonColor.g * slotColor.g * attachmentColor.g;\r\n finalColor.b = skeletonColor.b * slotColor.b * attachmentColor.b;\r\n finalColor.a = skeletonColor.a * slotColor.a * attachmentColor.a;\r\n if (premultipliedAlpha) {\r\n finalColor.r *= finalColor.a;\r\n finalColor.g *= finalColor.a;\r\n finalColor.b *= finalColor.a;\r\n }\r\n var darkColor = this.tempColor2;\r\n if (slot.darkColor == null)\r\n darkColor.set(0, 0, 0, 1.0);\r\n else {\r\n if (premultipliedAlpha) {\r\n darkColor.r = slot.darkColor.r * finalColor.a;\r\n darkColor.g = slot.darkColor.g * finalColor.a;\r\n darkColor.b = slot.darkColor.b * finalColor.a;\r\n }\r\n else {\r\n darkColor.setFromColor(slot.darkColor);\r\n }\r\n darkColor.a = premultipliedAlpha ? 1.0 : 0.0;\r\n }\r\n var slotBlendMode = slot.data.blendMode;\r\n if (slotBlendMode != blendMode) {\r\n blendMode = slotBlendMode;\r\n batcher.setBlendMode(webgl.WebGLBlendModeConverter.getSourceGLBlendMode(blendMode, premultipliedAlpha), webgl.WebGLBlendModeConverter.getDestGLBlendMode(blendMode));\r\n }\r\n if (clipper.isClipping()) {\r\n clipper.clipTriangles(renderable.vertices, renderable.numFloats, triangles, triangles.length, uvs, finalColor, darkColor, twoColorTint);\r\n var clippedVertices = new Float32Array(clipper.clippedVertices);\r\n var clippedTriangles = clipper.clippedTriangles;\r\n if (this.vertexEffect != null) {\r\n var vertexEffect = this.vertexEffect;\r\n var verts = clippedVertices;\r\n if (!twoColorTint) {\r\n for (var v = 0, n_3 = clippedVertices.length; v < n_3; v += vertexSize) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]);\r\n tempUv.x = verts[v + 6];\r\n tempUv.y = verts[v + 7];\r\n tempDark.set(0, 0, 0, 0);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n }\r\n }\r\n else {\r\n for (var v = 0, n_4 = clippedVertices.length; v < n_4; v += vertexSize) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]);\r\n tempUv.x = verts[v + 6];\r\n tempUv.y = verts[v + 7];\r\n tempDark.set(verts[v + 8], verts[v + 9], verts[v + 10], verts[v + 11]);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n verts[v + 8] = tempDark.r;\r\n verts[v + 9] = tempDark.g;\r\n verts[v + 10] = tempDark.b;\r\n verts[v + 11] = tempDark.a;\r\n }\r\n }\r\n }\r\n batcher.draw(texture, clippedVertices, clippedTriangles);\r\n }\r\n else {\r\n var verts = renderable.vertices;\r\n if (this.vertexEffect != null) {\r\n var vertexEffect = this.vertexEffect;\r\n if (!twoColorTint) {\r\n for (var v = 0, u = 0, n_5 = renderable.numFloats; v < n_5; v += vertexSize, u += 2) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempUv.x = uvs[u];\r\n tempUv.y = uvs[u + 1];\r\n tempLight.setFromColor(finalColor);\r\n tempDark.set(0, 0, 0, 0);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n }\r\n }\r\n else {\r\n for (var v = 0, u = 0, n_6 = renderable.numFloats; v < n_6; v += vertexSize, u += 2) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempUv.x = uvs[u];\r\n tempUv.y = uvs[u + 1];\r\n tempLight.setFromColor(finalColor);\r\n tempDark.setFromColor(darkColor);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n verts[v + 8] = tempDark.r;\r\n verts[v + 9] = tempDark.g;\r\n verts[v + 10] = tempDark.b;\r\n verts[v + 11] = tempDark.a;\r\n }\r\n }\r\n }\r\n else {\r\n if (!twoColorTint) {\r\n for (var v = 2, u = 0, n_7 = renderable.numFloats; v < n_7; v += vertexSize, u += 2) {\r\n verts[v] = finalColor.r;\r\n verts[v + 1] = finalColor.g;\r\n verts[v + 2] = finalColor.b;\r\n verts[v + 3] = finalColor.a;\r\n verts[v + 4] = uvs[u];\r\n verts[v + 5] = uvs[u + 1];\r\n }\r\n }\r\n else {\r\n for (var v = 2, u = 0, n_8 = renderable.numFloats; v < n_8; v += vertexSize, u += 2) {\r\n verts[v] = finalColor.r;\r\n verts[v + 1] = finalColor.g;\r\n verts[v + 2] = finalColor.b;\r\n verts[v + 3] = finalColor.a;\r\n verts[v + 4] = uvs[u];\r\n verts[v + 5] = uvs[u + 1];\r\n verts[v + 6] = darkColor.r;\r\n verts[v + 7] = darkColor.g;\r\n verts[v + 8] = darkColor.b;\r\n verts[v + 9] = darkColor.a;\r\n }\r\n }\r\n }\r\n var view = renderable.vertices.subarray(0, renderable.numFloats);\r\n batcher.draw(texture, view, triangles);\r\n }\r\n }\r\n clipper.clipEndWithSlot(slot);\r\n }\r\n clipper.clipEnd();\r\n };\r\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n return SkeletonRenderer;\r\n }());\r\n webgl.SkeletonRenderer = SkeletonRenderer;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Vector3 = (function () {\r\n function Vector3(x, y, z) {\r\n if (x === void 0) { x = 0; }\r\n if (y === void 0) { y = 0; }\r\n if (z === void 0) { z = 0; }\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n }\r\n Vector3.prototype.setFrom = function (v) {\r\n this.x = v.x;\r\n this.y = v.y;\r\n this.z = v.z;\r\n return this;\r\n };\r\n Vector3.prototype.set = function (x, y, z) {\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n return this;\r\n };\r\n Vector3.prototype.add = function (v) {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z;\r\n return this;\r\n };\r\n Vector3.prototype.sub = function (v) {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z;\r\n return this;\r\n };\r\n Vector3.prototype.scale = function (s) {\r\n this.x *= s;\r\n this.y *= s;\r\n this.z *= s;\r\n return this;\r\n };\r\n Vector3.prototype.normalize = function () {\r\n var len = this.length();\r\n if (len == 0)\r\n return this;\r\n len = 1 / len;\r\n this.x *= len;\r\n this.y *= len;\r\n this.z *= len;\r\n return this;\r\n };\r\n Vector3.prototype.cross = function (v) {\r\n return this.set(this.y * v.z - this.z * v.y, this.z * v.x - this.x * v.z, this.x * v.y - this.y * v.x);\r\n };\r\n Vector3.prototype.multiply = function (matrix) {\r\n var l_mat = matrix.values;\r\n return this.set(this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03], this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13], this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]);\r\n };\r\n Vector3.prototype.project = function (matrix) {\r\n var l_mat = matrix.values;\r\n var l_w = 1 / (this.x * l_mat[webgl.M30] + this.y * l_mat[webgl.M31] + this.z * l_mat[webgl.M32] + l_mat[webgl.M33]);\r\n return this.set((this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03]) * l_w, (this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13]) * l_w, (this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]) * l_w);\r\n };\r\n Vector3.prototype.dot = function (v) {\r\n return this.x * v.x + this.y * v.y + this.z * v.z;\r\n };\r\n Vector3.prototype.length = function () {\r\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\r\n };\r\n Vector3.prototype.distance = function (v) {\r\n var a = v.x - this.x;\r\n var b = v.y - this.y;\r\n var c = v.z - this.z;\r\n return Math.sqrt(a * a + b * b + c * c);\r\n };\r\n return Vector3;\r\n }());\r\n webgl.Vector3 = Vector3;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var ManagedWebGLRenderingContext = (function () {\r\n function ManagedWebGLRenderingContext(canvasOrContext, contextConfig) {\r\n var _this = this;\r\n if (contextConfig === void 0) { contextConfig = { alpha: \"true\" }; }\r\n this.restorables = new Array();\r\n if (canvasOrContext instanceof HTMLCanvasElement) {\r\n var canvas_1 = canvasOrContext;\r\n this.gl = (canvas_1.getContext(\"webgl2\", contextConfig) || canvas_1.getContext(\"webgl\", contextConfig));\r\n this.canvas = canvas_1;\r\n canvas_1.addEventListener(\"webglcontextlost\", function (e) {\r\n var event = e;\r\n if (e) {\r\n e.preventDefault();\r\n }\r\n });\r\n canvas_1.addEventListener(\"webglcontextrestored\", function (e) {\r\n for (var i = 0, n = _this.restorables.length; i < n; i++) {\r\n _this.restorables[i].restore();\r\n }\r\n });\r\n }\r\n else {\r\n this.gl = canvasOrContext;\r\n this.canvas = this.gl.canvas;\r\n }\r\n }\r\n ManagedWebGLRenderingContext.prototype.addRestorable = function (restorable) {\r\n this.restorables.push(restorable);\r\n };\r\n ManagedWebGLRenderingContext.prototype.removeRestorable = function (restorable) {\r\n var index = this.restorables.indexOf(restorable);\r\n if (index > -1)\r\n this.restorables.splice(index, 1);\r\n };\r\n return ManagedWebGLRenderingContext;\r\n }());\r\n webgl.ManagedWebGLRenderingContext = ManagedWebGLRenderingContext;\r\n var WebGLBlendModeConverter = (function () {\r\n function WebGLBlendModeConverter() {\r\n }\r\n WebGLBlendModeConverter.getDestGLBlendMode = function (blendMode) {\r\n switch (blendMode) {\r\n case spine.BlendMode.Normal: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\r\n case spine.BlendMode.Additive: return WebGLBlendModeConverter.ONE;\r\n case spine.BlendMode.Multiply: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\r\n case spine.BlendMode.Screen: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\r\n default: throw new Error(\"Unknown blend mode: \" + blendMode);\r\n }\r\n };\r\n WebGLBlendModeConverter.getSourceGLBlendMode = function (blendMode, premultipliedAlpha) {\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n switch (blendMode) {\r\n case spine.BlendMode.Normal: return premultipliedAlpha ? WebGLBlendModeConverter.ONE : WebGLBlendModeConverter.SRC_ALPHA;\r\n case spine.BlendMode.Additive: return premultipliedAlpha ? WebGLBlendModeConverter.ONE : WebGLBlendModeConverter.SRC_ALPHA;\r\n case spine.BlendMode.Multiply: return WebGLBlendModeConverter.DST_COLOR;\r\n case spine.BlendMode.Screen: return WebGLBlendModeConverter.ONE;\r\n default: throw new Error(\"Unknown blend mode: \" + blendMode);\r\n }\r\n };\r\n WebGLBlendModeConverter.ZERO = 0;\r\n WebGLBlendModeConverter.ONE = 1;\r\n WebGLBlendModeConverter.SRC_COLOR = 0x0300;\r\n WebGLBlendModeConverter.ONE_MINUS_SRC_COLOR = 0x0301;\r\n WebGLBlendModeConverter.SRC_ALPHA = 0x0302;\r\n WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA = 0x0303;\r\n WebGLBlendModeConverter.DST_ALPHA = 0x0304;\r\n WebGLBlendModeConverter.ONE_MINUS_DST_ALPHA = 0x0305;\r\n WebGLBlendModeConverter.DST_COLOR = 0x0306;\r\n return WebGLBlendModeConverter;\r\n }());\r\n webgl.WebGLBlendModeConverter = WebGLBlendModeConverter;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\n//# sourceMappingURL=spine-both.js.map\n\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = spine;\n}.call(window));"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///D:/wamp/www/phaser/node_modules/eventemitter3/index.js","webpack:///D:/wamp/www/phaser/src/data/DataManager.js","webpack:///D:/wamp/www/phaser/src/data/events/CHANGE_DATA_EVENT.js","webpack:///D:/wamp/www/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js","webpack:///D:/wamp/www/phaser/src/data/events/REMOVE_DATA_EVENT.js","webpack:///D:/wamp/www/phaser/src/data/events/SET_DATA_EVENT.js","webpack:///D:/wamp/www/phaser/src/data/events/index.js","webpack:///D:/wamp/www/phaser/src/gameobjects/BuildGameObject.js","webpack:///D:/wamp/www/phaser/src/gameobjects/GameObject.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/ComputedSize.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Depth.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Flip.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/ScrollFactor.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/ToJSON.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Transform.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/TransformMatrix.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Visible.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/ADDED_TO_SCENE_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/DESTROY_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_CREATED_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_ERROR_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_LOOP_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_PLAY_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_SEEKED_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_SEEKING_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_STOP_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/index.js","webpack:///D:/wamp/www/phaser/src/loader/File.js","webpack:///D:/wamp/www/phaser/src/loader/FileTypesManager.js","webpack:///D:/wamp/www/phaser/src/loader/GetURL.js","webpack:///D:/wamp/www/phaser/src/loader/MergeXHRSettings.js","webpack:///D:/wamp/www/phaser/src/loader/MultiFile.js","webpack:///D:/wamp/www/phaser/src/loader/XHRLoader.js","webpack:///D:/wamp/www/phaser/src/loader/XHRSettings.js","webpack:///D:/wamp/www/phaser/src/loader/const.js","webpack:///D:/wamp/www/phaser/src/loader/events/ADD_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/FILE_COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/FILE_LOAD_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/FILE_PROGRESS_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/POST_PROCESS_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/PROGRESS_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/START_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/index.js","webpack:///D:/wamp/www/phaser/src/loader/filetypes/ImageFile.js","webpack:///D:/wamp/www/phaser/src/loader/filetypes/JSONFile.js","webpack:///D:/wamp/www/phaser/src/loader/filetypes/TextFile.js","webpack:///D:/wamp/www/phaser/src/math/Average.js","webpack:///D:/wamp/www/phaser/src/math/Bernstein.js","webpack:///D:/wamp/www/phaser/src/math/Between.js","webpack:///D:/wamp/www/phaser/src/math/CatmullRom.js","webpack:///D:/wamp/www/phaser/src/math/CeilTo.js","webpack:///D:/wamp/www/phaser/src/math/Clamp.js","webpack:///D:/wamp/www/phaser/src/math/DegToRad.js","webpack:///D:/wamp/www/phaser/src/math/Difference.js","webpack:///D:/wamp/www/phaser/src/math/Factorial.js","webpack:///D:/wamp/www/phaser/src/math/FloatBetween.js","webpack:///D:/wamp/www/phaser/src/math/FloorTo.js","webpack:///D:/wamp/www/phaser/src/math/FromPercent.js","webpack:///D:/wamp/www/phaser/src/math/GetSpeed.js","webpack:///D:/wamp/www/phaser/src/math/IsEven.js","webpack:///D:/wamp/www/phaser/src/math/IsEvenStrict.js","webpack:///D:/wamp/www/phaser/src/math/Linear.js","webpack:///D:/wamp/www/phaser/src/math/Matrix3.js","webpack:///D:/wamp/www/phaser/src/math/Matrix4.js","webpack:///D:/wamp/www/phaser/src/math/MaxAdd.js","webpack:///D:/wamp/www/phaser/src/math/MinSub.js","webpack:///D:/wamp/www/phaser/src/math/Percent.js","webpack:///D:/wamp/www/phaser/src/math/Quaternion.js","webpack:///D:/wamp/www/phaser/src/math/RadToDeg.js","webpack:///D:/wamp/www/phaser/src/math/RandomXY.js","webpack:///D:/wamp/www/phaser/src/math/RandomXYZ.js","webpack:///D:/wamp/www/phaser/src/math/RandomXYZW.js","webpack:///D:/wamp/www/phaser/src/math/Rotate.js","webpack:///D:/wamp/www/phaser/src/math/RotateAround.js","webpack:///D:/wamp/www/phaser/src/math/RotateAroundDistance.js","webpack:///D:/wamp/www/phaser/src/math/RotateTo.js","webpack:///D:/wamp/www/phaser/src/math/RotateVec3.js","webpack:///D:/wamp/www/phaser/src/math/RoundAwayFromZero.js","webpack:///D:/wamp/www/phaser/src/math/RoundTo.js","webpack:///D:/wamp/www/phaser/src/math/SinCosTableGenerator.js","webpack:///D:/wamp/www/phaser/src/math/SmoothStep.js","webpack:///D:/wamp/www/phaser/src/math/SmootherStep.js","webpack:///D:/wamp/www/phaser/src/math/ToXY.js","webpack:///D:/wamp/www/phaser/src/math/TransformXY.js","webpack:///D:/wamp/www/phaser/src/math/Vector2.js","webpack:///D:/wamp/www/phaser/src/math/Vector3.js","webpack:///D:/wamp/www/phaser/src/math/Vector4.js","webpack:///D:/wamp/www/phaser/src/math/Within.js","webpack:///D:/wamp/www/phaser/src/math/Wrap.js","webpack:///D:/wamp/www/phaser/src/math/angle/Between.js","webpack:///D:/wamp/www/phaser/src/math/angle/BetweenPoints.js","webpack:///D:/wamp/www/phaser/src/math/angle/BetweenPointsY.js","webpack:///D:/wamp/www/phaser/src/math/angle/BetweenY.js","webpack:///D:/wamp/www/phaser/src/math/angle/CounterClockwise.js","webpack:///D:/wamp/www/phaser/src/math/angle/Normalize.js","webpack:///D:/wamp/www/phaser/src/math/angle/Random.js","webpack:///D:/wamp/www/phaser/src/math/angle/RandomDegrees.js","webpack:///D:/wamp/www/phaser/src/math/angle/Reverse.js","webpack:///D:/wamp/www/phaser/src/math/angle/RotateTo.js","webpack:///D:/wamp/www/phaser/src/math/angle/ShortestBetween.js","webpack:///D:/wamp/www/phaser/src/math/angle/Wrap.js","webpack:///D:/wamp/www/phaser/src/math/angle/WrapDegrees.js","webpack:///D:/wamp/www/phaser/src/math/angle/index.js","webpack:///D:/wamp/www/phaser/src/math/const.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistanceBetween.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistanceBetweenPoints.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistanceBetweenPointsSquared.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistanceChebyshev.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistancePower.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistanceSnake.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistanceSquared.js","webpack:///D:/wamp/www/phaser/src/math/distance/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/back/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/back/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/back/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/back/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/bounce/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/bounce/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/bounce/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/bounce/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/circular/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/circular/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/circular/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/circular/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/cubic/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/cubic/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/cubic/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/cubic/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/elastic/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/elastic/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/elastic/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/elastic/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/expo/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/expo/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/expo/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/expo/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/linear/Linear.js","webpack:///D:/wamp/www/phaser/src/math/easing/linear/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/quadratic/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/quadratic/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/quadratic/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/quadratic/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/quartic/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/quartic/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/quartic/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/quartic/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/quintic/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/quintic/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/quintic/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/quintic/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/sine/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/sine/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/sine/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/sine/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/stepped/Stepped.js","webpack:///D:/wamp/www/phaser/src/math/easing/stepped/index.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/Ceil.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/Equal.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/Floor.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/GreaterThan.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/LessThan.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/index.js","webpack:///D:/wamp/www/phaser/src/math/index.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/BezierInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/CatmullRomInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/CubicBezierInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/LinearInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/QuadraticBezierInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/SmoothStepInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/SmootherStepInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/index.js","webpack:///D:/wamp/www/phaser/src/math/pow2/GetPowerOfTwo.js","webpack:///D:/wamp/www/phaser/src/math/pow2/IsSizePowerOfTwo.js","webpack:///D:/wamp/www/phaser/src/math/pow2/IsValuePowerOfTwo.js","webpack:///D:/wamp/www/phaser/src/math/pow2/index.js","webpack:///D:/wamp/www/phaser/src/math/random-data-generator/RandomDataGenerator.js","webpack:///D:/wamp/www/phaser/src/math/snap/SnapCeil.js","webpack:///D:/wamp/www/phaser/src/math/snap/SnapFloor.js","webpack:///D:/wamp/www/phaser/src/math/snap/SnapTo.js","webpack:///D:/wamp/www/phaser/src/math/snap/index.js","webpack:///D:/wamp/www/phaser/src/plugins/BasePlugin.js","webpack:///D:/wamp/www/phaser/src/plugins/ScenePlugin.js","webpack:///D:/wamp/www/phaser/src/renderer/BlendModes.js","webpack:///D:/wamp/www/phaser/src/scale/events/RESIZE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/ADDED_TO_SCENE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/BOOT_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/CREATE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/DESTROY_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/PAUSE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/POST_UPDATE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/PRE_UPDATE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/READY_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/REMOVED_FROM_SCENE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/RENDER_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/RESUME_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/SHUTDOWN_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/SLEEP_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/START_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/TRANSITION_INIT_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/TRANSITION_OUT_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/TRANSITION_START_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/UPDATE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/WAKE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/index.js","webpack:///D:/wamp/www/phaser/src/utils/Class.js","webpack:///D:/wamp/www/phaser/src/utils/NOOP.js","webpack:///D:/wamp/www/phaser/src/utils/object/Extend.js","webpack:///D:/wamp/www/phaser/src/utils/object/GetAdvancedValue.js","webpack:///D:/wamp/www/phaser/src/utils/object/GetFastValue.js","webpack:///D:/wamp/www/phaser/src/utils/object/GetValue.js","webpack:///D:/wamp/www/phaser/src/utils/object/IsPlainObject.js","webpack:///./SpineFile.js","webpack:///./SpinePlugin.js","webpack:///./events/COMPLETE_EVENT.js","webpack:///./events/DISPOSE_EVENT.js","webpack:///./events/END_EVENT.js","webpack:///./events/EVENT_EVENT.js","webpack:///./events/INTERRUPTED_EVENT.js","webpack:///./events/START_EVENT.js","webpack:///./events/index.js","webpack:///./gameobject/SpineGameObject.js","webpack:///./gameobject/SpineGameObjectCanvasRenderer.js","webpack:///./gameobject/SpineGameObjectRender.js","webpack:///./gameobject/SpineGameObjectWebGLRenderer.js","webpack:///./runtimes/spine-both.js"],"names":[],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFa;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,yDAAyD,OAAO;AAChE;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yCAAyC,SAAS;AAClD;AACA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA,eAAe,YAAY;AAC3B;;AAEA;AACA,2DAA2D;AAC3D,+DAA+D;AAC/D,mEAAmE;AACnE,uEAAuE;AACvE;AACA,0DAA0D,SAAS;AACnE;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,aAAa,aAAa;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,2DAA2D,YAAY;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,aAAa;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI,IAA6B;AACjC;AACA;;;;;;;;;;;;AC/UA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,aAAa,mBAAO,CAAC,mDAAU;;AAE/B;AACA;AACA;AACA,WAAW,EAAE;AACb,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,KAAK;AAChB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,2BAA2B;AACtC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2BAA2B,gBAAgB;AAC3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,2DAA2D;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,aAAa;;AAEb;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,EAAE;AACjB,eAAe,KAAK;AACpB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,sCAAsC,kBAAkB;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC5rBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WA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AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,uBAAuB,mBAAO,CAAC,0EAAqB;AACpD,kBAAkB,mBAAO,CAAC,6DAAqB;AAC/C,mBAAmB,mBAAO,CAAC,mEAAe;AAC1C,aAAa,mBAAO,CAAC,0DAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,2DAA2D;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4CAA4C;AAC3D,eAAe,mCAAmC;AAClD,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wCAAwC;AACxD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA,sCAAsC,mBAAmB;;AAEzD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3tBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC9IA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC7JA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA,YAAY,wCAAwC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,sBAAsB,mBAAO,CAAC,iFAAmB;AACjD,kBAAkB,mBAAO,CAAC,gEAAwB;AAClD,gBAAgB,mBAAO,CAAC,8DAAuB;AAC/C,uBAAuB,mBAAO,CAAC,4EAA8B;AAC7D,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ,gDAAgD;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,kCAAkC,oCAAoC;AACtE,mCAAmC,sCAAsC;;AAEzE;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,QAAQ,mDAAmD;AAC3D;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,8CAA8C;AAC9D;AACA;AACA;AACA,uCAAuC,oCAAoC;;AAE3E;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,8CAA8C;AAC9D;AACA;AACA;AACA,uCAAuC,oCAAoC;AAC3E,yCAAyC,sCAAsC;;AAE/E;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C,sBAAsB,sCAAsC;;AAE5D;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACxkBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;;AAEvC;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,qDAAqD;AACrE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,kCAAkC,UAAU,cAAc;;AAE1D;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,mCAAmC,wBAAwB;;AAE3D;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACr/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,MAAM;AACjB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB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yDAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,+BAA+B;AAC1C;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA,4GAA4G;AAC5G;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,2DAA2D;;AAE3D;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B,eAAe,cAAc;AAC7B;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B,eAAe,cAAc;AAC7B;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,kBAAkB;;AAEnD;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iEAAiE;AACjE;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,eAAe,2BAA2B;AAC1C;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC7hBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2BAA2B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC9DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,mEAAwB;AAC7C,kBAAkB,mBAAO,CAAC,yDAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,sCAAsC;AACjD;AACA,YAAY,sCAAsC;AAClD;AACA;AACA;AACA,mEAAmE;;AAEnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACnOA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,uBAAuB,mBAAO,CAAC,mEAAoB;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,sCAAsC;AACjD;AACA,YAAY,eAAe;AAC3B;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,sCAAsC;AAClD;AACA;AACA;AACA,qCAAqC,mBAAmB;AACxD,8BAA8B,cAAc;AAC5C,6BAA6B,WAAW;AACxC,iCAAiC,eAAe;AAChD,gCAAgC,aAAa;AAC7C,wCAAwC,yBAAyB;;AAEjE;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACjJA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,2BAA2B;AACtC,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,uDAAuD;AACjJ;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,oFAAoF,mDAAmD;AACvI;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;AC/CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA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ACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uGAAuG;AAClH,WAAW,gBAAgB;AAC3B,WAAW,sCAAsC;AACjD;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;;;;;;;;;;;AC3QA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,eAAe,mBAAO,CAAC,0EAA6B;AACpD,oBAAoB,mBAAO,CAAC,oFAAkC;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,sDAAsD;AACjE,WAAW,gBAAgB;AAC3B,WAAW,sCAAsC;AACjD,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA,QAAQ;AACR,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qGAAqG;AAChH,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,WAAW,sCAAsC;AACjD;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;;;;;;;;;;;AC/NA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,oBAAoB,mBAAO,CAAC,oFAAkC;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,sDAAsD;AACjE,WAAW,OAAO;AAClB,WAAW,sCAAsC;AACjD;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qGAAqG;AAChH,WAAW,OAAO;AAClB,WAAW,sCAAsC;AACjD;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;;;;;;;;;;;ACxKA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,mDAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,6BAA6B,WAAW;;AAExC;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,6BAA6B,WAAW;;AAExC;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC1kBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;;AAEA;;;;;;;;;;;;AC/6CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,4BAA4B,eAAe;;AAE3C;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,4CAA4C;;AAE5C;;AAEA,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC7vBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,+BAA+B,YAAY;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,8BAA8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;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,6BAA6B,WAAW;;AAExC;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA;AACA,+BAA+B,YAAY;AAC3C,+BAA+B,YAAY;AAC3C,kCAAkC,eAAe;;AAEjD;;AAEA;AACA;;AAEA,mBAAmB,YAAY;AAC/B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,6BAA6B;AAC9E;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,oBAAoB;AAC/B;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,4BAA4B,qBAAqB;;AAEjD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,+CAA+C;AAC1D;AACA,YAAY,+CAA+C;AAC3D;AACA;AACA;AACA,+BAA+B,wBAAwB;;AAEvD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,6DAAqB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,OAAO;;AAEzC;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,6BAA6B,YAAY;;AAEzC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;;;;;;;;;;;;ACjwBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;;;;;;;;;;;;ACnyBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1hBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA,2CAA2C,sCAAsC;AACjF;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA,2CAA2C,gCAAgC;AAC3E;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,4CAAU;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,0DAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,0DAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,yDAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,4CAAU;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,6BAA6B,aAAa;;AAE1C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;AC1CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,0CAAS;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,WAAW,mBAAO,CAAC,0CAAS;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AAC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A;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,4BAA4B,SAAS;;AAErC;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;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AAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,mDAAM;AACtB,SAAS,mBAAO,CAAC,qDAAO;AACxB,WAAW,mBAAO,CAAC,yDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,qDAAM;AACtB,SAAS,mBAAO,CAAC,uDAAO;AACxB,WAAW,mBAAO,CAAC,2DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,kDAAM;AACtB,SAAS,mBAAO,CAAC,oDAAO;AACxB,WAAW,mBAAO,CAAC,wDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD,+BAA+B,cAAc;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD,+BAA+B,cAAc;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD,+BAA+B,cAAc;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA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AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,sDAAM;AACtB,SAAS,mBAAO,CAAC,wDAAO;AACxB,WAAW,mBAAO,CAAC,4DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA,iBAAiB,mBAAO,CAAC,8DAAW;;;;;;;;;;;;ACVpC;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,gCAAgC,kBAAkB;;AAElD;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,gCAAgC,kBAAkB;;AAElD;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,gCAAgC,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AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,gBAAgB,mBAAO,CAAC,qDAAc;;AAEtC;;AAEA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,oDAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,QAAQ;AAC3B;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,sDAAe;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,8CAAW;;AAEhC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,sDAAe;;AAExC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,0DAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,YAAY,mBAAO,CAAC,qFAAuB;AAC3C,gBAAgB,mBAAO,CAAC,6FAA2B;AACnD,iBAAiB,mBAAO,CAAC,+FAA4B;AACrD,YAAY,mBAAO,CAAC,qFAAuB;AAC3C,qBAAqB,mBAAO,CAAC,uGAAgC;AAC7D,gBAAgB,mBAAO,CAAC,6FAA2B;AACnD,kBAAkB,mBAAO,CAAC,iGAA6B;;AAEvD;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,aAAa,mBAAO,CAAC,gEAAiB;AACtC,YAAY,mBAAO,CAAC,sEAAoB;AACxC,aAAa,mBAAO,CAAC,wEAAqB;;AAE1C;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;;AAEA;;AAEA;AACA;AACA,kCAAkC,qDAAqD;;AAEvF;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,oEAAoE;;AAEpE;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;;AAEA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;;AAEA;;AAEA,kDAAkD;AAClD,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,wCAAwC;AAC/D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA,wBAAwB,UAAU;AAClC;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,IAAI;AACxB,oBAAoB,EAAE;AACtB;AACA,eAAe,IAAI;AACnB;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,IAAI;AACxB,oBAAoB,EAAE;AACtB;AACA,eAAe,IAAI;AACnB;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,IAAI;AACxB;AACA,eAAe,IAAI;AACnB;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;;AAEA,yBAAyB,OAAO;AAChC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACvfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,UAAU,mBAAO,CAAC,sDAAY;AAC9B,WAAW,mBAAO,CAAC,wDAAa;AAChC,QAAQ,mBAAO,CAAC,kDAAU;;AAE1B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,6BAA6B;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,4DAA4D,sCAAsC;AAClG;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC3HA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA,iBAAiB,mBAAO,CAAC,wDAAc;AACvC,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,2DAAiB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,6BAA6B;AACxC;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,mCAAmC,wCAAwC;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACzHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5UA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,6CAA6C;AACpF;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AAC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A,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvPA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,oBAAoB,mBAAO,CAAC,mEAAiB;;AAE7C,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,YAAY,OAAO;;AAEnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,UAAU,YAAY;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,WAAW,mBAAO,CAAC,8CAAY;AAC/B,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA,8CAA8C,aAAa,qBAAqB;AAChF;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb;AACA,YAAY,EAAE,oBAAoB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;;AAEA;;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,6DAA0B;AAC9C,mBAAmB,mBAAO,CAAC,yFAAwC;AACnE,gBAAgB,mBAAO,CAAC,8FAA4C;AACpE,oBAAoB,mBAAO,CAAC,2FAAyC;AACrE,eAAe,mBAAO,CAAC,4FAA2C;AAClE,gBAAgB,mBAAO,CAAC,0EAAkC;AAC1D,eAAe,mBAAO,CAAC,4FAA2C;;AAElE;AACA,aAAa,OAAO;AACpB;AACA,cAAc,OAAO;AACrB,cAAc,gBAAgB;AAC9B,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,cAAc,kBAAkB;AAChC,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,iDAAiD;AAC5D,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,kBAAkB;AAC7B,WAAW,kBAAkB;AAC7B;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;AACA;;AAEA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;;AAEjB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,+BAA+B,oBAAoB;AACnD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,+BAA+B,qBAAqB;AACpD;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,2BAA2B,uBAAuB;AAClD;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,sCAAsC,uFAAuF;;AAE7H;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACtPA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,sBAAsB,mBAAO,CAAC,6FAA0C;AACxE,YAAY,mBAAO,CAAC,6DAA0B;AAC9C,eAAe,mBAAO,CAAC,iFAAoC;AAC3D,kBAAkB,mBAAO,CAAC,yFAAwC;AAClE,kBAAkB,mBAAO,CAAC,6EAAkC;AAC5D,YAAY,mBAAO,CAAC,uCAAO;AAC3B,gBAAgB,mBAAO,CAAC,mCAAa;AACrC,sBAAsB,mBAAO,CAAC,qEAA8B;;AAE5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,6BAA6B;AACxC;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qGAAqG;AACpH,eAAe,OAAO;AACtB,eAAe,gBAAgB;AAC/B,eAAe,QAAQ;AACvB,eAAe,sCAAsC;AACrD,eAAe,sCAAsC;AACrD;AACA,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,eAAe;AAC9B,eAAe,WAAW;AAC1B;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;;AAEA;;AAEA,gBAAgB;AAChB,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;AACA;;AAEA;;AAEA,gBAAgB;AAChB,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,gBAAgB;AAC5B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,QAAQ;AACnB;AACA,YAAY,gBAAgB;AAC5B;;AAEA;;;;;;;;;;;;ACzmCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;A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,aAAa;AACxB,WAAW,YAAY;AACvB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,kBAAkB;;AAEpD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB,eAAe,YAAY;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,kCAAkC,6BAA6B;AAC/D,mCAAmC,+BAA+B;AAClE,oCAAoC,aAAa;AACjD,oCAAoC,aAAa;;AAEjD;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,oCAAoC,aAAa;AACjD,oCAAoC,aAAa;;AAEjD;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA,uBAAuB,2BAA2B;AAClD;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,oCAAoC;AAC/D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,uCAAuC,gBAAgB;;AAEvD;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C,4CAA4C,yBAAyB;;AAErE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA,2BAA2B,qBAAqB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,YAAY;AAC/C,qCAAqC,cAAc;AACnD,qCAAqC,gBAAgB;;AAErD;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACjjDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5HA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,oFAAgC;AAC1D;;AAEA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,sFAAiC;AAC5D;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACjKA;;AAEA;AACA;AACA;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA,kCAAkC,UAAU;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,mDAAmD;AACxD;AACA;AACA;AACA;AACA,KAAK,+DAA+D;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,+DAA+D;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,OAAO;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,OAAO;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,iBAAiB;AAC5D;AACA;AACA;AACA;AACA,2CAA2C,iBAAiB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,mBAAmB;AAC5D;AACA;AACA;AACA;AACA;AACA,yCAAyC,mBAAmB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,oBAAoB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,oBAAoB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,6CAA6C;AAC/D;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,OAAO;AACxE;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,yBAAyB,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,YAAY;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,oBAAoB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,oBAAoB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA;AACA,kCAAkC,oBAAoB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,cAAc;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,sDAAsD;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA,wCAAwC,iBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yGAAyG;AACzG;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,qGAAqG;AACrG;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,2DAA2D,0BAA0B;AACrF;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,sDAAsD;AAC3D,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,kEAAkE;AACvE,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,OAAO;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,iBAAiB;AACpD;AACA;AACA;AACA,iDAAiD,iBAAiB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,gBAAgB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA,0DAA0D,iBAAiB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK,+DAA+D;AACpE;AACA;AACA;AACA;AACA;AACA,KAAK,4DAA4D;AACjE;AACA;AACA;AACA;AACA;AACA,KAAK,yDAAyD;AAC9D,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,wCAAwC,iBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,gCAAgC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;AACA,2BAA2B,sCAAsC;AACjE;AACA;AACA;AACA;AACA,2BAA2B,iCAAiC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,OAAO;AAClE;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qBAAqB;AACvD,gCAAgC,cAAc;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,qBAAqB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,eAAe;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,eAAe;AAC9C;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qBAAqB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,OAAO;AAC7B;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA,wDAAwD,OAAO;AAC/D;AACA,wDAAwD,OAAO;AAC/D;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,OAAO;AACtC;AACA;AACA;AACA,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA;AACA;AACA,wCAAwC,yBAAyB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA;AACA;AACA,wCAAwC,yBAAyB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA,0DAA0D,SAAS;AACnE;AACA,gEAAgE,WAAW;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,yBAAyB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,SAAS;AAChE;AACA;AACA;AACA,uDAAuD,SAAS;AAChE;AACA;AACA;AACA,uEAAuE,QAAQ;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;AACA;AACA;AACA,oCAAoC,kBAAkB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,qCAAqC,uBAAuB;AAC5D,mCAAmC,WAAW;AAC9C,oCAAoC,oCAAoC;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,mCAAmC,cAAc;AACjD,sCAAsC,iBAAiB;AACvD;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA,qDAAqD,SAAS;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qBAAqB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,sBAAsB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA,gCAAgC,0BAA0B;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,OAAO;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,OAAO;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,2BAA2B;AAC1D;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA,wCAAwC,2BAA2B;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,wBAAwB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,+BAA+B;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,0BAA0B;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,OAAO;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,wBAAwB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA,gDAAgD,QAAQ;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0BAA0B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0BAA0B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yFAAyF,OAAO;AAChG;AACA;AACA;AACA,uDAAuD,kBAAkB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,0BAA0B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,oBAAoB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6BAA6B;AACxD;AACA;AACA,+BAA+B,6BAA6B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,wBAAwB;AACnD;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6BAA6B;AACxD;AACA;AACA,+BAA+B,6BAA6B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,wBAAwB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6BAA6B;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,kEAAkE;AACvE;AACA;AACA;AACA;AACA;AACA,KAAK,4DAA4D;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E;AAC5E,kEAAkE;AAClE,qDAAqD;AACrD;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,yBAAyB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,gBAAgB;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,oDAAoD,+BAA+B;AACnF;AACA;AACA;AACA;AACA,mCAAmC,WAAW;AAC9C;AACA;AACA;AACA;AACA;AACA,qCAAqC,UAAU;AAC/C;AACA;AACA;AACA;AACA;AACA,mCAAmC,WAAW;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,UAAU;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,iBAAiB;AACvD,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,wCAAwC,iBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,wBAAwB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,WAAW;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,WAAW;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,WAAW;AAC7D;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,WAAW;AAC5E;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,qEAAqE;AAC1E,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,iBAAiB;AAC7D,2DAA2D,8CAA8C,EAAE;AAC3G;AACA;AACA,SAAS;AACT;AACA,KAAK,6CAA6C;AAClD,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kFAAkF;AAClF,wEAAwE;AACxE,2DAA2D;AAC3D;AACA,SAAS;AACT;AACA,KAAK,6CAA6C;AAClD,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,sBAAsB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,OAAO;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,6CAA6C;AAClD,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,iBAAiB;AAC7D;AACA;AACA,iBAAiB;AACjB;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,oBAAoB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,UAAU;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,wBAAwB;AAChF,sDAAsD,sDAAsD;AAC5G,sDAAsD,qDAAqD;AAC3G;AACA;AACA;AACA;AACA,sDAAsD,sBAAsB;AAC5E,qDAAqD,4BAA4B;AACjF,qDAAqD,2BAA2B;AAChF;AACA;AACA;AACA;AACA,qDAAqD,qBAAqB;AAC1E;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,sCAAsC,UAAU;AAChD;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS,oFAAoF;AAC7F,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE,6CAA6C,qBAAqB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,oBAAoB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,uBAAuB;AACxF;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF,gDAAgD,qBAAqB;AACrE,8CAA8C,mBAAmB;AACjE;AACA;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,0CAA0C,cAAc;AACxD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,yDAAyD;AAClE,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,qBAAqB;AAC5E,4DAA4D,0BAA0B;AACtF,8DAA8D,4BAA4B;AAC1F,kEAAkE,sBAAsB;AACxF,8DAA8D,sBAAsB;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,8CAA8C,kDAAkD,iDAAiD,+BAA+B,mCAAmC,0BAA0B,2CAA2C,mDAAmD,8EAA8E,WAAW;AAC/e,iHAAiH,2FAA2F,mCAAmC,sCAAsC,0BAA0B,uEAAuE,WAAW;AACjY;AACA;AACA;AACA,2EAA2E,8CAA8C,+CAA+C,kDAAkD,iDAAiD,+BAA+B,8BAA8B,mCAAmC,0BAA0B,2CAA2C,2CAA2C,mDAAmD,8EAA8E,WAAW;AACvmB,iHAAiH,2FAA2F,mCAAmC,mCAAmC,sCAAsC,0BAA0B,8DAA8D,oDAAoD,8HAA8H,WAAW;AAC7kB;AACA;AACA;AACA,2EAA2E,8CAA8C,iDAAiD,+BAA+B,0BAA0B,2CAA2C,8EAA8E,WAAW;AACvW,iHAAiH,2FAA2F,0BAA0B,mCAAmC,WAAW;AACpR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,qBAAqB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,0CAA0C,cAAc;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,sDAAsD;AAC/D,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,SAAS;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,SAAS;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,YAAY;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,qBAAqB;AACrE,8CAA8C,mBAAmB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,SAAS;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,SAAS;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,OAAO;AAC1C,mCAAmC,OAAO;AAC1C,mCAAmC,OAAO;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,kBAAkB,iBAAiB;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,qEAAqE,OAAO;AAC5E;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;;AAEA,CAAC","file":"SpinePluginDebug.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./SpinePlugin.js\");\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Events = require('./events');\r\n\r\n/**\r\n * @callback DataEachCallback\r\n *\r\n * @param {*} parent - The parent object of the DataManager.\r\n * @param {string} key - The key of the value.\r\n * @param {*} value - The value.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The Data Manager Component features a means to store pieces of data specific to a Game Object, System or Plugin.\r\n * You can then search, query it, and retrieve the data. The parent must either extend EventEmitter,\r\n * or have a property called `events` that is an instance of it.\r\n *\r\n * @class DataManager\r\n * @memberof Phaser.Data\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {object} parent - The object that this DataManager belongs to.\r\n * @param {Phaser.Events.EventEmitter} [eventEmitter] - The DataManager's event emitter.\r\n */\r\nvar DataManager = new Class({\r\n\r\n initialize:\r\n\r\n function DataManager (parent, eventEmitter)\r\n {\r\n /**\r\n * The object that this DataManager belongs to.\r\n *\r\n * @name Phaser.Data.DataManager#parent\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.parent = parent;\r\n\r\n /**\r\n * The DataManager's event emitter.\r\n *\r\n * @name Phaser.Data.DataManager#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events = eventEmitter;\r\n\r\n if (!eventEmitter)\r\n {\r\n this.events = (parent.events) ? parent.events : parent;\r\n }\r\n\r\n /**\r\n * The data list.\r\n *\r\n * @name Phaser.Data.DataManager#list\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.0.0\r\n */\r\n this.list = {};\r\n\r\n /**\r\n * The public values list. You can use this to access anything you have stored\r\n * in this Data Manager. For example, if you set a value called `gold` you can\r\n * access it via:\r\n *\r\n * ```javascript\r\n * this.data.values.gold;\r\n * ```\r\n *\r\n * You can also modify it directly:\r\n * \r\n * ```javascript\r\n * this.data.values.gold += 1000;\r\n * ```\r\n *\r\n * Doing so will emit a `setdata` event from the parent of this Data Manager.\r\n * \r\n * Do not modify this object directly. Adding properties directly to this object will not\r\n * emit any events. Always use `DataManager.set` to create new items the first time around.\r\n *\r\n * @name Phaser.Data.DataManager#values\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.10.0\r\n */\r\n this.values = {};\r\n\r\n /**\r\n * Whether setting data is frozen for this DataManager.\r\n *\r\n * @name Phaser.Data.DataManager#_frozen\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._frozen = false;\r\n\r\n if (!parent.hasOwnProperty('sys') && this.events)\r\n {\r\n this.events.once('destroy', this.destroy, this);\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves the value for the given key, or undefined if it doesn't exist.\r\n *\r\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\r\n * \r\n * ```javascript\r\n * this.data.get('gold');\r\n * ```\r\n *\r\n * Or access the value directly:\r\n * \r\n * ```javascript\r\n * this.data.values.gold;\r\n * ```\r\n *\r\n * You can also pass in an array of keys, in which case an array of values will be returned:\r\n * \r\n * ```javascript\r\n * this.data.get([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * This approach is useful for destructuring arrays in ES6.\r\n *\r\n * @method Phaser.Data.DataManager#get\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\r\n *\r\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\r\n */\r\n get: function (key)\r\n {\r\n var list = this.list;\r\n\r\n if (Array.isArray(key))\r\n {\r\n var output = [];\r\n\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n output.push(list[key[i]]);\r\n }\r\n\r\n return output;\r\n }\r\n else\r\n {\r\n return list[key];\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves all data values in a new object.\r\n *\r\n * @method Phaser.Data.DataManager#getAll\r\n * @since 3.0.0\r\n *\r\n * @return {Object.} All data values.\r\n */\r\n getAll: function ()\r\n {\r\n var results = {};\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list.hasOwnProperty(key))\r\n {\r\n results[key] = this.list[key];\r\n }\r\n }\r\n\r\n return results;\r\n },\r\n\r\n /**\r\n * Queries the DataManager for the values of keys matching the given regular expression.\r\n *\r\n * @method Phaser.Data.DataManager#query\r\n * @since 3.0.0\r\n *\r\n * @param {RegExp} search - A regular expression object. If a non-RegExp object obj is passed, it is implicitly converted to a RegExp by using new RegExp(obj).\r\n *\r\n * @return {Object.} The values of the keys matching the search string.\r\n */\r\n query: function (search)\r\n {\r\n var results = {};\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list.hasOwnProperty(key) && key.match(search))\r\n {\r\n results[key] = this.list[key];\r\n }\r\n }\r\n\r\n return results;\r\n },\r\n\r\n /**\r\n * Sets a value for the given key. If the key doesn't already exist in the Data Manager then it is created.\r\n * \r\n * ```javascript\r\n * data.set('name', 'Red Gem Stone');\r\n * ```\r\n *\r\n * You can also pass in an object of key value pairs as the first argument:\r\n *\r\n * ```javascript\r\n * data.set({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\r\n * ```\r\n *\r\n * To get a value back again you can call `get`:\r\n * \r\n * ```javascript\r\n * data.get('gold');\r\n * ```\r\n * \r\n * Or you can access the value directly via the `values` property, where it works like any other variable:\r\n * \r\n * ```javascript\r\n * data.values.gold += 50;\r\n * ```\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\r\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\r\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\r\n *\r\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.Data.DataManager#set\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.0.0\r\n *\r\n * @param {(string|object)} key - The key to set the value for. Or an object or key value pairs. If an object the `data` argument is ignored.\r\n * @param {*} data - The value to set for the given key. If an object is provided as the key this argument is ignored.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n set: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (typeof key === 'string')\r\n {\r\n return this.setValue(key, data);\r\n }\r\n else\r\n {\r\n for (var entry in key)\r\n {\r\n this.setValue(entry, key[entry]);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Increase a value for the given key. If the key doesn't already exist in the Data Manager then it is increased from 0.\r\n * \r\n * When the value is first set, a `setdata` event is emitted.\r\n * \r\n * @method Phaser.Data.DataManager#inc\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.23.0\r\n *\r\n * @param {(string|object)} key - The key to increase the value for.\r\n * @param {*} [data] - The value to increase for the given key.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n inc: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (data === undefined)\r\n {\r\n data = 1;\r\n }\r\n\r\n var value = this.get(key);\r\n if (value === undefined)\r\n {\r\n value = 0;\r\n }\r\n\r\n this.set(key, (value + data));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggle a boolean value for the given key. If the key doesn't already exist in the Data Manager then it is toggled from false.\r\n * \r\n * When the value is first set, a `setdata` event is emitted.\r\n * \r\n * @method Phaser.Data.DataManager#toggle\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.23.0\r\n *\r\n * @param {(string|object)} key - The key to toggle the value for.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n toggle: function (key)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n this.set(key, !this.get(key));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal value setter, called automatically by the `set` method.\r\n *\r\n * @method Phaser.Data.DataManager#setValue\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @private\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The key to set the value for.\r\n * @param {*} data - The value to set.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n setValue: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (this.has(key))\r\n {\r\n // Hit the key getter, which will in turn emit the events.\r\n this.values[key] = data;\r\n }\r\n else\r\n {\r\n var _this = this;\r\n var list = this.list;\r\n var events = this.events;\r\n var parent = this.parent;\r\n\r\n Object.defineProperty(this.values, key, {\r\n\r\n enumerable: true,\r\n \r\n configurable: true,\r\n\r\n get: function ()\r\n {\r\n return list[key];\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (!_this._frozen)\r\n {\r\n var previousValue = list[key];\r\n list[key] = value;\r\n\r\n events.emit(Events.CHANGE_DATA, parent, key, value, previousValue);\r\n events.emit(Events.CHANGE_DATA_KEY + key, parent, value, previousValue);\r\n }\r\n }\r\n\r\n });\r\n\r\n list[key] = data;\r\n\r\n events.emit(Events.SET_DATA, parent, key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all data entries to the given callback.\r\n *\r\n * @method Phaser.Data.DataManager#each\r\n * @since 3.0.0\r\n *\r\n * @param {DataEachCallback} callback - The function to call.\r\n * @param {*} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ this.parent, null, undefined ];\r\n\r\n for (var i = 1; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (var key in this.list)\r\n {\r\n args[1] = key;\r\n args[2] = this.list[key];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Merge the given object of key value pairs into this DataManager.\r\n *\r\n * Any newly created values will emit a `setdata` event. Any updated values (see the `overwrite` argument)\r\n * will emit a `changedata` event.\r\n *\r\n * @method Phaser.Data.DataManager#merge\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.0.0\r\n *\r\n * @param {Object.} data - The data to merge.\r\n * @param {boolean} [overwrite=true] - Whether to overwrite existing data. Defaults to true.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n merge: function (data, overwrite)\r\n {\r\n if (overwrite === undefined) { overwrite = true; }\r\n\r\n // Merge data from another component into this one\r\n for (var key in data)\r\n {\r\n if (data.hasOwnProperty(key) && (overwrite || (!overwrite && !this.has(key))))\r\n {\r\n this.setValue(key, data[key]);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Remove the value for the given key.\r\n *\r\n * If the key is found in this Data Manager it is removed from the internal lists and a\r\n * `removedata` event is emitted.\r\n * \r\n * You can also pass in an array of keys, in which case all keys in the array will be removed:\r\n * \r\n * ```javascript\r\n * this.data.remove([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * @method Phaser.Data.DataManager#remove\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key to remove, or an array of keys to remove.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n remove: function (key)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n this.removeValue(key[i]);\r\n }\r\n }\r\n else\r\n {\r\n return this.removeValue(key);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal value remover, called automatically by the `remove` method.\r\n *\r\n * @method Phaser.Data.DataManager#removeValue\r\n * @private\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The key to set the value for.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n removeValue: function (key)\r\n {\r\n if (this.has(key))\r\n {\r\n var data = this.list[key];\r\n\r\n delete this.list[key];\r\n delete this.values[key];\r\n\r\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves the data associated with the given 'key', deletes it from this Data Manager, then returns it.\r\n *\r\n * @method Phaser.Data.DataManager#pop\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the value to retrieve and delete.\r\n *\r\n * @return {*} The value of the given key.\r\n */\r\n pop: function (key)\r\n {\r\n var data = undefined;\r\n\r\n if (!this._frozen && this.has(key))\r\n {\r\n data = this.list[key];\r\n\r\n delete this.list[key];\r\n delete this.values[key];\r\n\r\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\r\n }\r\n\r\n return data;\r\n },\r\n\r\n /**\r\n * Determines whether the given key is set in this Data Manager.\r\n * \r\n * Please note that the keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.Data.DataManager#has\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key to check.\r\n *\r\n * @return {boolean} Returns `true` if the key exists, otherwise `false`.\r\n */\r\n has: function (key)\r\n {\r\n return this.list.hasOwnProperty(key);\r\n },\r\n\r\n /**\r\n * Freeze or unfreeze this Data Manager. A frozen Data Manager will block all attempts\r\n * to create new values or update existing ones.\r\n *\r\n * @method Phaser.Data.DataManager#setFreeze\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Whether to freeze or unfreeze the Data Manager.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n setFreeze: function (value)\r\n {\r\n this._frozen = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Delete all data in this Data Manager and unfreeze it.\r\n *\r\n * @method Phaser.Data.DataManager#reset\r\n * @since 3.0.0\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n reset: function ()\r\n {\r\n for (var key in this.list)\r\n {\r\n delete this.list[key];\r\n delete this.values[key];\r\n }\r\n\r\n this._frozen = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroy this data manager.\r\n *\r\n * @method Phaser.Data.DataManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.reset();\r\n\r\n this.events.off(Events.CHANGE_DATA);\r\n this.events.off(Events.SET_DATA);\r\n this.events.off(Events.REMOVE_DATA);\r\n\r\n this.parent = null;\r\n },\r\n\r\n /**\r\n * Gets or sets the frozen state of this Data Manager.\r\n * A frozen Data Manager will block all attempts to create new values or update existing ones.\r\n *\r\n * @name Phaser.Data.DataManager#freeze\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n freeze: {\r\n\r\n get: function ()\r\n {\r\n return this._frozen;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._frozen = (value) ? true : false;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Return the total number of entries in this Data Manager.\r\n *\r\n * @name Phaser.Data.DataManager#count\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n count: {\r\n\r\n get: function ()\r\n {\r\n var i = 0;\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list[key] !== undefined)\r\n {\r\n i++;\r\n }\r\n }\r\n\r\n return i;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = DataManager;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Change Data Event.\r\n * \r\n * This event is dispatched by a Data Manager when an item in the data store is changed.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * a change data event from a Game Object you would use: `sprite.data.on('changedata', listener)`.\r\n * \r\n * This event is dispatched for all items that change in the Data Manager.\r\n * To listen for the change of a specific item, use the `CHANGE_DATA_KEY_EVENT` event.\r\n *\r\n * @event Phaser.Data.Events#CHANGE_DATA\r\n * @since 3.0.0\r\n * \r\n * @param {any} parent - A reference to the object that the Data Manager responsible for this event belongs to.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} value - The new value of the item in the Data Manager.\r\n * @param {any} previousValue - The previous value of the item in the Data Manager.\r\n */\r\nmodule.exports = 'changedata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Change Data Key Event.\r\n * \r\n * This event is dispatched by a Data Manager when an item in the data store is changed.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the change of a specific data item from a Game Object you would use: `sprite.data.on('changedata-key', listener)`,\r\n * where `key` is the unique string key of the data item. For example, if you have a data item stored called `gold`\r\n * then you can listen for `sprite.data.on('changedata-gold')`.\r\n *\r\n * @event Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.16.1\r\n * \r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {any} value - The item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n * @param {any} previousValue - The previous item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'changedata-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Remove Data Event.\r\n * \r\n * This event is dispatched by a Data Manager when an item is removed from it.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the removal of a data item on a Game Object you would use: `sprite.data.on('removedata', listener)`.\r\n *\r\n * @event Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n * \r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} data - The item that was removed from the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'removedata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Set Data Event.\r\n * \r\n * This event is dispatched by a Data Manager when a new item is added to the data store.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the addition of a new data item on a Game Object you would use: `sprite.data.on('setdata', listener)`.\r\n *\r\n * @event Phaser.Data.Events#SET_DATA\r\n * @since 3.0.0\r\n * \r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} data - The item that was added to the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'setdata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Data.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CHANGE_DATA: require('./CHANGE_DATA_EVENT'),\r\n CHANGE_DATA_KEY: require('./CHANGE_DATA_KEY_EVENT'),\r\n REMOVE_DATA: require('./REMOVE_DATA_EVENT'),\r\n SET_DATA: require('./SET_DATA_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = require('../renderer/BlendModes');\r\nvar GetAdvancedValue = require('../utils/object/GetAdvancedValue');\r\n\r\n/**\r\n * Builds a Game Object using the provided configuration object.\r\n *\r\n * @function Phaser.GameObjects.BuildGameObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The initial GameObject.\r\n * @param {Phaser.Types.GameObjects.GameObjectConfig} config - The config to build the GameObject with.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The built Game Object.\r\n */\r\nvar BuildGameObject = function (scene, gameObject, config)\r\n{\r\n // Position\r\n\r\n gameObject.x = GetAdvancedValue(config, 'x', 0);\r\n gameObject.y = GetAdvancedValue(config, 'y', 0);\r\n gameObject.depth = GetAdvancedValue(config, 'depth', 0);\r\n\r\n // Flip\r\n\r\n gameObject.flipX = GetAdvancedValue(config, 'flipX', false);\r\n gameObject.flipY = GetAdvancedValue(config, 'flipY', false);\r\n\r\n // Scale\r\n // Either: { scale: 2 } or { scale: { x: 2, y: 2 }}\r\n\r\n var scale = GetAdvancedValue(config, 'scale', null);\r\n\r\n if (typeof scale === 'number')\r\n {\r\n gameObject.setScale(scale);\r\n }\r\n else if (scale !== null)\r\n {\r\n gameObject.scaleX = GetAdvancedValue(scale, 'x', 1);\r\n gameObject.scaleY = GetAdvancedValue(scale, 'y', 1);\r\n }\r\n\r\n // ScrollFactor\r\n // Either: { scrollFactor: 2 } or { scrollFactor: { x: 2, y: 2 }}\r\n\r\n var scrollFactor = GetAdvancedValue(config, 'scrollFactor', null);\r\n\r\n if (typeof scrollFactor === 'number')\r\n {\r\n gameObject.setScrollFactor(scrollFactor);\r\n }\r\n else if (scrollFactor !== null)\r\n {\r\n gameObject.scrollFactorX = GetAdvancedValue(scrollFactor, 'x', 1);\r\n gameObject.scrollFactorY = GetAdvancedValue(scrollFactor, 'y', 1);\r\n }\r\n\r\n // Rotation\r\n\r\n gameObject.rotation = GetAdvancedValue(config, 'rotation', 0);\r\n\r\n var angle = GetAdvancedValue(config, 'angle', null);\r\n\r\n if (angle !== null)\r\n {\r\n gameObject.angle = angle;\r\n }\r\n\r\n // Alpha\r\n\r\n gameObject.alpha = GetAdvancedValue(config, 'alpha', 1);\r\n\r\n // Origin\r\n // Either: { origin: 0.5 } or { origin: { x: 0.5, y: 0.5 }}\r\n\r\n var origin = GetAdvancedValue(config, 'origin', null);\r\n\r\n if (typeof origin === 'number')\r\n {\r\n gameObject.setOrigin(origin);\r\n }\r\n else if (origin !== null)\r\n {\r\n var ox = GetAdvancedValue(origin, 'x', 0.5);\r\n var oy = GetAdvancedValue(origin, 'y', 0.5);\r\n\r\n gameObject.setOrigin(ox, oy);\r\n }\r\n\r\n // BlendMode\r\n\r\n gameObject.blendMode = GetAdvancedValue(config, 'blendMode', BlendModes.NORMAL);\r\n\r\n // Visible\r\n\r\n gameObject.visible = GetAdvancedValue(config, 'visible', true);\r\n\r\n // Add to Scene\r\n\r\n var add = GetAdvancedValue(config, 'add', true);\r\n\r\n if (add)\r\n {\r\n scene.sys.displayList.add(gameObject);\r\n }\r\n\r\n if (gameObject.preUpdate)\r\n {\r\n scene.sys.updateList.add(gameObject);\r\n }\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BuildGameObject;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar ComponentsToJSON = require('./components/ToJSON');\nvar DataManager = require('../data/DataManager');\nvar EventEmitter = require('eventemitter3');\nvar Events = require('./events');\n\n/**\n * @classdesc\n * The base class that all Game Objects extend.\n * You don't create GameObjects directly and they cannot be added to the display list.\n * Instead, use them as the base for your own custom classes.\n *\n * @class GameObject\n * @memberof Phaser.GameObjects\n * @extends Phaser.Events.EventEmitter\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs.\n * @param {string} type - A textual representation of the type of Game Object, i.e. `sprite`.\n */\nvar GameObject = new Class({\n\n Extends: EventEmitter,\n\n initialize:\n\n function GameObject (scene, type)\n {\n EventEmitter.call(this);\n\n /**\n * The Scene to which this Game Object belongs.\n * Game Objects can only belong to one Scene.\n *\n * @name Phaser.GameObjects.GameObject#scene\n * @type {Phaser.Scene}\n * @protected\n * @since 3.0.0\n */\n this.scene = scene;\n\n /**\n * A textual representation of this Game Object, i.e. `sprite`.\n * Used internally by Phaser but is available for your own custom classes to populate.\n *\n * @name Phaser.GameObjects.GameObject#type\n * @type {string}\n * @since 3.0.0\n */\n this.type = type;\n\n /**\n * The current state of this Game Object.\n *\n * Phaser itself will never modify this value, although plugins may do so.\n *\n * Use this property to track the state of a Game Object during its lifetime. For example, it could change from\n * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant\n * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons.\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\n *\n * @name Phaser.GameObjects.GameObject#state\n * @type {(integer|string)}\n * @since 3.16.0\n */\n this.state = 0;\n\n /**\n * The parent Container of this Game Object, if it has one.\n *\n * @name Phaser.GameObjects.GameObject#parentContainer\n * @type {Phaser.GameObjects.Container}\n * @since 3.4.0\n */\n this.parentContainer = null;\n\n /**\n * The name of this Game Object.\n * Empty by default and never populated by Phaser, this is left for developers to use.\n *\n * @name Phaser.GameObjects.GameObject#name\n * @type {string}\n * @default ''\n * @since 3.0.0\n */\n this.name = '';\n\n /**\n * The active state of this Game Object.\n * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it.\n * An active object is one which is having its logic and internal systems updated.\n *\n * @name Phaser.GameObjects.GameObject#active\n * @type {boolean}\n * @default true\n * @since 3.0.0\n */\n this.active = true;\n\n /**\n * The Tab Index of the Game Object.\n * Reserved for future use by plugins and the Input Manager.\n *\n * @name Phaser.GameObjects.GameObject#tabIndex\n * @type {integer}\n * @default -1\n * @since 3.0.0\n */\n this.tabIndex = -1;\n\n /**\n * A Data Manager.\n * It allows you to store, query and get key/value paired information specific to this Game Object.\n * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`.\n *\n * @name Phaser.GameObjects.GameObject#data\n * @type {Phaser.Data.DataManager}\n * @default null\n * @since 3.0.0\n */\n this.data = null;\n\n /**\n * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not.\n * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively.\n * If those components are not used by your custom class then you can use this bitmask as you wish.\n *\n * @name Phaser.GameObjects.GameObject#renderFlags\n * @type {integer}\n * @default 15\n * @since 3.0.0\n */\n this.renderFlags = 15;\n\n /**\n * A bitmask that controls if this Game Object is drawn by a Camera or not.\n * Not usually set directly, instead call `Camera.ignore`, however you can\n * set this property directly using the Camera.id property:\n *\n * @example\n * this.cameraFilter |= camera.id\n *\n * @name Phaser.GameObjects.GameObject#cameraFilter\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.cameraFilter = 0;\n\n /**\n * If this Game Object is enabled for input then this property will contain an InteractiveObject instance.\n * Not usually set directly. Instead call `GameObject.setInteractive()`.\n *\n * @name Phaser.GameObjects.GameObject#input\n * @type {?Phaser.Types.Input.InteractiveObject}\n * @default null\n * @since 3.0.0\n */\n this.input = null;\n\n /**\n * If this Game Object is enabled for Arcade or Matter Physics then this property will contain a reference to a Physics Body.\n *\n * @name Phaser.GameObjects.GameObject#body\n * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|MatterJS.BodyType)}\n * @default null\n * @since 3.0.0\n */\n this.body = null;\n\n /**\n * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`.\n * This includes calls that may come from a Group, Container or the Scene itself.\n * While it allows you to persist a Game Object across Scenes, please understand you are entirely\n * responsible for managing references to and from this Game Object.\n *\n * @name Phaser.GameObjects.GameObject#ignoreDestroy\n * @type {boolean}\n * @default false\n * @since 3.5.0\n */\n this.ignoreDestroy = false;\n\n // Tell the Scene to re-sort the children\n scene.sys.queueDepthSort();\n },\n\n /**\n * Sets the `active` property of this Game Object and returns this Game Object for further chaining.\n * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList.\n *\n * @method Phaser.GameObjects.GameObject#setActive\n * @since 3.0.0\n *\n * @param {boolean} value - True if this Game Object should be set as active, false if not.\n *\n * @return {this} This GameObject.\n */\n setActive: function (value)\n {\n this.active = value;\n\n return this;\n },\n\n /**\n * Sets the `name` property of this Game Object and returns this Game Object for further chaining.\n * The `name` property is not populated by Phaser and is presented for your own use.\n *\n * @method Phaser.GameObjects.GameObject#setName\n * @since 3.0.0\n *\n * @param {string} value - The name to be given to this Game Object.\n *\n * @return {this} This GameObject.\n */\n setName: function (value)\n {\n this.name = value;\n\n return this;\n },\n\n /**\n * Sets the current state of this Game Object.\n *\n * Phaser itself will never modify the State of a Game Object, although plugins may do so.\n *\n * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'.\n * The state value should typically be an integer (ideally mapped to a constant\n * in your game code), but could also be a string. It is recommended to keep it light and simple.\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\n *\n * @method Phaser.GameObjects.GameObject#setState\n * @since 3.16.0\n *\n * @param {(integer|string)} value - The state of the Game Object.\n *\n * @return {this} This GameObject.\n */\n setState: function (value)\n {\n this.state = value;\n\n return this;\n },\n\n /**\n * Adds a Data Manager component to this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#setDataEnabled\n * @since 3.0.0\n * @see Phaser.Data.DataManager\n *\n * @return {this} This GameObject.\n */\n setDataEnabled: function ()\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n return this;\n },\n\n /**\n * Allows you to store a key value pair within this Game Objects Data Manager.\n *\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\n * before setting the value.\n *\n * If the key doesn't already exist in the Data Manager then it is created.\n *\n * ```javascript\n * sprite.setData('name', 'Red Gem Stone');\n * ```\n *\n * You can also pass in an object of key value pairs as the first argument:\n *\n * ```javascript\n * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\n * ```\n *\n * To get a value back again you can call `getData`:\n *\n * ```javascript\n * sprite.getData('gold');\n * ```\n *\n * Or you can access the value directly via the `values` property, where it works like any other variable:\n *\n * ```javascript\n * sprite.data.values.gold += 50;\n * ```\n *\n * When the value is first set, a `setdata` event is emitted from this Game Object.\n *\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\n *\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\n *\n * @method Phaser.GameObjects.GameObject#setData\n * @since 3.0.0\n *\n * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored.\n * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored.\n *\n * @return {this} This GameObject.\n */\n setData: function (key, value)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n this.data.set(key, value);\n\n return this;\n },\n\n /**\n * Increase a value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is increased from 0.\n *\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\n * before setting the value.\n *\n * If the key doesn't already exist in the Data Manager then it is created.\n *\n * When the value is first set, a `setdata` event is emitted from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#incData\n * @since 3.23.0\n *\n * @param {(string|object)} key - The key to increase the value for.\n * @param {*} [data] - The value to increase for the given key.\n *\n * @return {this} This GameObject.\n */\n incData: function (key, value)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n this.data.inc(key, value);\n\n return this;\n },\n\n /**\n * Toggle a boolean value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is toggled from false.\n *\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\n * before setting the value.\n *\n * If the key doesn't already exist in the Data Manager then it is created.\n *\n * When the value is first set, a `setdata` event is emitted from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#toggleData\n * @since 3.23.0\n *\n * @param {(string|object)} key - The key to toggle the value for.\n *\n * @return {this} This GameObject.\n */\n toggleData: function (key)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n this.data.toggle(key);\n\n return this;\n },\n\n /**\n * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist.\n *\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\n *\n * ```javascript\n * sprite.getData('gold');\n * ```\n *\n * Or access the value directly:\n *\n * ```javascript\n * sprite.data.values.gold;\n * ```\n *\n * You can also pass in an array of keys, in which case an array of values will be returned:\n *\n * ```javascript\n * sprite.getData([ 'gold', 'armor', 'health' ]);\n * ```\n *\n * This approach is useful for destructuring arrays in ES6.\n *\n * @method Phaser.GameObjects.GameObject#getData\n * @since 3.0.0\n *\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\n *\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\n */\n getData: function (key)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n return this.data.get(key);\n },\n\n /**\n * Pass this Game Object to the Input Manager to enable it for Input.\n *\n * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area\n * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced\n * input detection.\n *\n * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If\n * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific\n * shape for it to use.\n *\n * You can also provide an Input Configuration Object as the only argument to this method.\n *\n * @example\n * sprite.setInteractive();\n *\n * @example\n * sprite.setInteractive(new Phaser.Geom.Circle(45, 46, 45), Phaser.Geom.Circle.Contains);\n *\n * @example\n * graphics.setInteractive(new Phaser.Geom.Rectangle(0, 0, 128, 128), Phaser.Geom.Rectangle.Contains);\n *\n * @method Phaser.GameObjects.GameObject#setInteractive\n * @since 3.0.0\n *\n * @param {(Phaser.Types.Input.InputConfiguration|any)} [hitArea] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not given it will try to create a Rectangle based on the texture frame.\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The callback that determines if the pointer is within the Hit Area shape or not. If you provide a shape you must also provide a callback.\n * @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target?\n *\n * @return {this} This GameObject.\n */\n setInteractive: function (hitArea, hitAreaCallback, dropZone)\n {\n this.scene.sys.input.enable(this, hitArea, hitAreaCallback, dropZone);\n\n return this;\n },\n\n /**\n * If this Game Object has previously been enabled for input, this will disable it.\n *\n * An object that is disabled for input stops processing or being considered for\n * input events, but can be turned back on again at any time by simply calling\n * `setInteractive()` with no arguments provided.\n *\n * If want to completely remove interaction from this Game Object then use `removeInteractive` instead.\n *\n * @method Phaser.GameObjects.GameObject#disableInteractive\n * @since 3.7.0\n *\n * @return {this} This GameObject.\n */\n disableInteractive: function ()\n {\n if (this.input)\n {\n this.input.enabled = false;\n }\n\n return this;\n },\n\n /**\n * If this Game Object has previously been enabled for input, this will queue it\n * for removal, causing it to no longer be interactive. The removal happens on\n * the next game step, it is not immediate.\n *\n * The Interactive Object that was assigned to this Game Object will be destroyed,\n * removed from the Input Manager and cleared from this Game Object.\n *\n * If you wish to re-enable this Game Object at a later date you will need to\n * re-create its InteractiveObject by calling `setInteractive` again.\n *\n * If you wish to only temporarily stop an object from receiving input then use\n * `disableInteractive` instead, as that toggles the interactive state, where-as\n * this erases it completely.\n *\n * If you wish to resize a hit area, don't remove and then set it as being\n * interactive. Instead, access the hitarea object directly and resize the shape\n * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the\n * shape is a Rectangle, which it is by default.)\n *\n * @method Phaser.GameObjects.GameObject#removeInteractive\n * @since 3.7.0\n *\n * @return {this} This GameObject.\n */\n removeInteractive: function ()\n {\n this.scene.sys.input.clear(this);\n\n this.input = undefined;\n\n return this;\n },\n\n /**\n * This callback is invoked when this Game Object is added to a Scene.\n *\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\n * will use this, such as Sprites, to add themselves into the Update List.\n *\n * You can also listen for the `ADDED_TO_SCENE` event from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#addedToScene\n * @since 3.50.0\n */\n addedToScene: function ()\n {\n },\n\n /**\n * This callback is invoked when this Game Object is removed from a Scene.\n *\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\n * will use this, such as Sprites, to removed themselves from the Update List.\n *\n * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#removedFromScene\n * @since 3.50.0\n */\n removedFromScene: function ()\n {\n },\n\n /**\n * To be overridden by custom GameObjects. Allows base objects to be used in a Pool.\n *\n * @method Phaser.GameObjects.GameObject#update\n * @since 3.0.0\n *\n * @param {...*} [args] - args\n */\n update: function ()\n {\n },\n\n /**\n * Returns a JSON representation of the Game Object.\n *\n * @method Phaser.GameObjects.GameObject#toJSON\n * @since 3.0.0\n *\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\n */\n toJSON: function ()\n {\n return ComponentsToJSON(this);\n },\n\n /**\n * Compares the renderMask with the renderFlags to see if this Game Object will render or not.\n * Also checks the Game Object against the given Cameras exclusion list.\n *\n * @method Phaser.GameObjects.GameObject#willRender\n * @since 3.0.0\n *\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to check against this Game Object.\n *\n * @return {boolean} True if the Game Object should be rendered, otherwise false.\n */\n willRender: function (camera)\n {\n return !(GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id)));\n },\n\n /**\n * Returns an array containing the display list index of either this Game Object, or if it has one,\n * its parent Container. It then iterates up through all of the parent containers until it hits the\n * root of the display list (which is index 0 in the returned array).\n *\n * Used internally by the InputPlugin but also useful if you wish to find out the display depth of\n * this Game Object and all of its ancestors.\n *\n * @method Phaser.GameObjects.GameObject#getIndexList\n * @since 3.4.0\n *\n * @return {integer[]} An array of display list position indexes.\n */\n getIndexList: function ()\n {\n // eslint-disable-next-line consistent-this\n var child = this;\n var parent = this.parentContainer;\n\n var indexes = [];\n\n while (parent)\n {\n // indexes.unshift([parent.getIndex(child), parent.name]);\n indexes.unshift(parent.getIndex(child));\n\n child = parent;\n\n if (!parent.parentContainer)\n {\n break;\n }\n else\n {\n parent = parent.parentContainer;\n }\n }\n\n // indexes.unshift([this.scene.sys.displayList.getIndex(child), 'root']);\n indexes.unshift(this.scene.sys.displayList.getIndex(child));\n\n return indexes;\n },\n\n /**\n * Destroys this Game Object removing it from the Display List and Update List and\n * severing all ties to parent resources.\n *\n * Also removes itself from the Input Manager and Physics Manager if previously enabled.\n *\n * Use this to remove a Game Object from your game if you don't ever plan to use it again.\n * As long as no reference to it exists within your own code it should become free for\n * garbage collection by the browser.\n *\n * If you just want to temporarily disable an object then look at using the\n * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected.\n *\n * @method Phaser.GameObjects.GameObject#destroy\n * @fires Phaser.GameObjects.Events#DESTROY\n * @since 3.0.0\n *\n * @param {boolean} [fromScene=false] - Is this Game Object being destroyed as the result of a Scene shutdown?\n */\n destroy: function (fromScene)\n {\n if (fromScene === undefined) { fromScene = false; }\n\n // This Game Object has already been destroyed\n if (!this.scene || this.ignoreDestroy)\n {\n return;\n }\n\n if (this.preDestroy)\n {\n this.preDestroy.call(this);\n }\n\n this.emit(Events.DESTROY, this);\n\n var sys = this.scene.sys;\n\n if (!fromScene)\n {\n sys.displayList.remove(this);\n }\n\n if (this.input)\n {\n sys.input.clear(this);\n this.input = undefined;\n }\n\n if (this.data)\n {\n this.data.destroy();\n\n this.data = undefined;\n }\n\n if (this.body)\n {\n this.body.destroy();\n this.body = undefined;\n }\n\n // Tell the Scene to re-sort the children\n if (!fromScene)\n {\n sys.queueDepthSort();\n }\n\n this.active = false;\n this.visible = false;\n\n this.scene = undefined;\n\n this.parentContainer = undefined;\n\n this.removeAllListeners();\n }\n\n});\n\n/**\n * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not.\n *\n * @constant {integer} RENDER_MASK\n * @memberof Phaser.GameObjects.GameObject\n * @default\n */\nGameObject.RENDER_MASK = 15;\n\nmodule.exports = GameObject;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for calculating and setting the size of a non-Frame based Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.ComputedSize\r\n * @since 3.0.0\r\n */\r\n\r\nvar ComputedSize = {\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n * \r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayWidth` property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n width: 0,\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n * \r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayHeight` property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n height: 0,\r\n\r\n /**\r\n * The displayed width of this Game Object.\r\n * \r\n * This value takes into account the scale factor.\r\n * \r\n * Setting this value will adjust the Game Object's scale property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#displayWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleX * this.width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleX = value / this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of this Game Object.\r\n * \r\n * This value takes into account the scale factor.\r\n * \r\n * Setting this value will adjust the Game Object's scale property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#displayHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleY * this.height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleY = value / this.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\r\n * \r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n * \r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n * \r\n * @method Phaser.GameObjects.Components.ComputedSize#setSize\r\n * @since 3.4.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the display size of this Game Object.\r\n * \r\n * Calling this will adjust the scale.\r\n * \r\n * @method Phaser.GameObjects.Components.ComputedSize#setDisplaySize\r\n * @since 3.4.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplaySize: function (width, height)\r\n {\r\n this.displayWidth = width;\r\n this.displayHeight = height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = ComputedSize;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for setting the depth of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Depth\r\n * @since 3.0.0\r\n */\r\n\r\nvar Depth = {\r\n\r\n /**\r\n * Private internal value. Holds the depth of the Game Object.\r\n * \r\n * @name Phaser.GameObjects.Components.Depth#_depth\r\n * @type {integer}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _depth: 0,\r\n\r\n /**\r\n * The depth of this Game Object within the Scene.\r\n * \r\n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\r\n * of Game Objects, without actually moving their position in the display list.\r\n *\r\n * The default depth is zero. A Game Object with a higher depth\r\n * value will always render in front of one with a lower value.\r\n *\r\n * Setting the depth will queue a depth sort event within the Scene.\r\n * \r\n * @name Phaser.GameObjects.Components.Depth#depth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n depth: {\r\n\r\n get: function ()\r\n {\r\n return this._depth;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scene.sys.queueDepthSort();\r\n this._depth = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The depth of this Game Object within the Scene.\r\n * \r\n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\r\n * of Game Objects, without actually moving their position in the display list.\r\n *\r\n * The default depth is zero. A Game Object with a higher depth\r\n * value will always render in front of one with a lower value.\r\n *\r\n * Setting the depth will queue a depth sort event within the Scene.\r\n * \r\n * @method Phaser.GameObjects.Components.Depth#setDepth\r\n * @since 3.0.0\r\n *\r\n * @param {integer} value - The depth of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setDepth: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.depth = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Depth;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for visually flipping a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Flip\r\n * @since 3.0.0\r\n */\r\n\r\nvar Flip = {\r\n\r\n /**\r\n * The horizontally flipped state of the Game Object.\r\n * \r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @name Phaser.GameObjects.Components.Flip#flipX\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n flipX: false,\r\n\r\n /**\r\n * The vertically flipped state of the Game Object.\r\n * \r\n * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down)\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @name Phaser.GameObjects.Components.Flip#flipY\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n flipY: false,\r\n\r\n /**\r\n * Toggles the horizontal flipped state of this Game Object.\r\n * \r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#toggleFlipX\r\n * @since 3.0.0\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n toggleFlipX: function ()\r\n {\r\n this.flipX = !this.flipX;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggles the vertical flipped state of this Game Object.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#toggleFlipY\r\n * @since 3.0.0\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n toggleFlipY: function ()\r\n {\r\n this.flipY = !this.flipY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal flipped state of this Game Object.\r\n * \r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#setFlipX\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setFlipX: function (value)\r\n {\r\n this.flipX = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical flipped state of this Game Object.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#setFlipY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setFlipY: function (value)\r\n {\r\n this.flipY = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal and vertical flipped state of this Game Object.\r\n * \r\n * A Game Object that is flipped will render inversed on the flipped axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#setFlip\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setFlip: function (x, y)\r\n {\r\n this.flipX = x;\r\n this.flipY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#resetFlip\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n resetFlip: function ()\r\n {\r\n this.flipX = false;\r\n this.flipY = false;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Flip;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the Scroll Factor of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.ScrollFactor\r\n * @since 3.0.0\r\n */\r\n\r\nvar ScrollFactor = {\r\n\r\n /**\r\n * The horizontal scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scrollFactorX: 1,\r\n\r\n /**\r\n * The vertical scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scrollFactorY: 1,\r\n\r\n /**\r\n * Sets the scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @method Phaser.GameObjects.Components.ScrollFactor#setScrollFactor\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scroll factor of this Game Object.\r\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScrollFactor: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = ScrollFactor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Build a JSON representation of the given Game Object.\r\n *\r\n * This is typically extended further by Game Object specific implementations.\r\n *\r\n * @method Phaser.GameObjects.Components.ToJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to export as JSON.\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\r\n */\r\nvar ToJSON = function (gameObject)\r\n{\r\n var out = {\r\n name: gameObject.name,\r\n type: gameObject.type,\r\n x: gameObject.x,\r\n y: gameObject.y,\r\n depth: gameObject.depth,\r\n scale: {\r\n x: gameObject.scaleX,\r\n y: gameObject.scaleY\r\n },\r\n origin: {\r\n x: gameObject.originX,\r\n y: gameObject.originY\r\n },\r\n flipX: gameObject.flipX,\r\n flipY: gameObject.flipY,\r\n rotation: gameObject.rotation,\r\n alpha: gameObject.alpha,\r\n visible: gameObject.visible,\r\n blendMode: gameObject.blendMode,\r\n textureKey: '',\r\n frameKey: '',\r\n data: {}\r\n };\r\n\r\n if (gameObject.texture)\r\n {\r\n out.textureKey = gameObject.texture.key;\r\n out.frameKey = gameObject.frame.name;\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = ToJSON;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar MATH_CONST = require('../../math/const');\nvar TransformMatrix = require('./TransformMatrix');\nvar TransformXY = require('../../math/TransformXY');\nvar WrapAngle = require('../../math/angle/Wrap');\nvar WrapAngleDegrees = require('../../math/angle/WrapDegrees');\nvar Vector2 = require('../../math/Vector2');\n\n// global bitmask flag for GameObject.renderMask (used by Scale)\nvar _FLAG = 4; // 0100\n\n/**\n * Provides methods used for getting and setting the position, scale and rotation of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.Transform\n * @since 3.0.0\n */\n\nvar Transform = {\n\n /**\n * Private internal value. Holds the horizontal scale value.\n *\n * @name Phaser.GameObjects.Components.Transform#_scaleX\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _scaleX: 1,\n\n /**\n * Private internal value. Holds the vertical scale value.\n *\n * @name Phaser.GameObjects.Components.Transform#_scaleY\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _scaleY: 1,\n\n /**\n * Private internal value. Holds the rotation value in radians.\n *\n * @name Phaser.GameObjects.Components.Transform#_rotation\n * @type {number}\n * @private\n * @default 0\n * @since 3.0.0\n */\n _rotation: 0,\n\n /**\n * The x position of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n x: 0,\n\n /**\n * The y position of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n y: 0,\n\n /**\n * The z position of this Game Object.\n *\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\n * {@link Phaser.GameObjects.Components.Depth#depth} instead.\n *\n * @name Phaser.GameObjects.Components.Transform#z\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n z: 0,\n\n /**\n * The w position of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#w\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n w: 0,\n\n /**\n * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object\n * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.\n *\n * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this\n * isn't the case, use the `scaleX` or `scaleY` properties instead.\n *\n * @name Phaser.GameObjects.Components.Transform#scale\n * @type {number}\n * @default 1\n * @since 3.18.0\n */\n scale: {\n\n get: function ()\n {\n return (this._scaleX + this._scaleY) / 2;\n },\n\n set: function (value)\n {\n this._scaleX = value;\n this._scaleY = value;\n\n if (value === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The horizontal scale of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#scaleX\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n scaleX: {\n\n get: function ()\n {\n return this._scaleX;\n },\n\n set: function (value)\n {\n this._scaleX = value;\n\n if (value === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The vertical scale of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#scaleY\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n scaleY: {\n\n get: function ()\n {\n return this._scaleY;\n },\n\n set: function (value)\n {\n this._scaleY = value;\n\n if (value === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The angle of this Game Object as expressed in degrees.\n *\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left\n * and -90 is up.\n *\n * If you prefer to work in radians, see the `rotation` property instead.\n *\n * @name Phaser.GameObjects.Components.Transform#angle\n * @type {integer}\n * @default 0\n * @since 3.0.0\n */\n angle: {\n\n get: function ()\n {\n return WrapAngleDegrees(this._rotation * MATH_CONST.RAD_TO_DEG);\n },\n\n set: function (value)\n {\n // value is in degrees\n this.rotation = WrapAngleDegrees(value) * MATH_CONST.DEG_TO_RAD;\n }\n },\n\n /**\n * The angle of this Game Object in radians.\n *\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left\n * and -PI/2 is up.\n *\n * If you prefer to work in degrees, see the `angle` property instead.\n *\n * @name Phaser.GameObjects.Components.Transform#rotation\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n rotation: {\n\n get: function ()\n {\n return this._rotation;\n },\n\n set: function (value)\n {\n // value is in radians\n this._rotation = WrapAngle(value);\n }\n },\n\n /**\n * Sets the position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setPosition\n * @since 3.0.0\n *\n * @param {number} [x=0] - The x position of this Game Object.\n * @param {number} [y=x] - The y position of this Game Object. If not set it will use the `x` value.\n * @param {number} [z=0] - The z position of this Game Object.\n * @param {number} [w=0] - The w position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setPosition: function (x, y, z, w)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = x; }\n if (z === undefined) { z = 0; }\n if (w === undefined) { w = 0; }\n\n this.x = x;\n this.y = y;\n this.z = z;\n this.w = w;\n\n return this;\n },\n\n /**\n * Sets the position of this Game Object to be a random position within the confines of\n * the given area.\n *\n * If no area is specified a random position between 0 x 0 and the game width x height is used instead.\n *\n * The position does not factor in the size of this Game Object, meaning that only the origin is\n * guaranteed to be within the area.\n *\n * @method Phaser.GameObjects.Components.Transform#setRandomPosition\n * @since 3.8.0\n *\n * @param {number} [x=0] - The x position of the top-left of the random area.\n * @param {number} [y=0] - The y position of the top-left of the random area.\n * @param {number} [width] - The width of the random area.\n * @param {number} [height] - The height of the random area.\n *\n * @return {this} This Game Object instance.\n */\n setRandomPosition: function (x, y, width, height)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n if (width === undefined) { width = this.scene.sys.scale.width; }\n if (height === undefined) { height = this.scene.sys.scale.height; }\n\n this.x = x + (Math.random() * width);\n this.y = y + (Math.random() * height);\n\n return this;\n },\n\n /**\n * Sets the rotation of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setRotation\n * @since 3.0.0\n *\n * @param {number} [radians=0] - The rotation of this Game Object, in radians.\n *\n * @return {this} This Game Object instance.\n */\n setRotation: function (radians)\n {\n if (radians === undefined) { radians = 0; }\n\n this.rotation = radians;\n\n return this;\n },\n\n /**\n * Sets the angle of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setAngle\n * @since 3.0.0\n *\n * @param {number} [degrees=0] - The rotation of this Game Object, in degrees.\n *\n * @return {this} This Game Object instance.\n */\n setAngle: function (degrees)\n {\n if (degrees === undefined) { degrees = 0; }\n\n this.angle = degrees;\n\n return this;\n },\n\n /**\n * Sets the scale of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setScale\n * @since 3.0.0\n *\n * @param {number} x - The horizontal scale of this Game Object.\n * @param {number} [y=x] - The vertical scale of this Game Object. If not set it will use the `x` value.\n *\n * @return {this} This Game Object instance.\n */\n setScale: function (x, y)\n {\n if (x === undefined) { x = 1; }\n if (y === undefined) { y = x; }\n\n this.scaleX = x;\n this.scaleY = y;\n\n return this;\n },\n\n /**\n * Sets the x position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setX\n * @since 3.0.0\n *\n * @param {number} [value=0] - The x position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setX: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.x = value;\n\n return this;\n },\n\n /**\n * Sets the y position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setY\n * @since 3.0.0\n *\n * @param {number} [value=0] - The y position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setY: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.y = value;\n\n return this;\n },\n\n /**\n * Sets the z position of this Game Object.\n *\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\n * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.\n *\n * @method Phaser.GameObjects.Components.Transform#setZ\n * @since 3.0.0\n *\n * @param {number} [value=0] - The z position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setZ: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.z = value;\n\n return this;\n },\n\n /**\n * Sets the w position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setW\n * @since 3.0.0\n *\n * @param {number} [value=0] - The w position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setW: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.w = value;\n\n return this;\n },\n\n /**\n * Gets the local transform matrix for this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#getLocalTransformMatrix\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\n *\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\n */\n getLocalTransformMatrix: function (tempMatrix)\n {\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\n\n return tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\n },\n\n /**\n * Gets the world transform matrix for this Game Object, factoring in any parent Containers.\n *\n * @method Phaser.GameObjects.Components.Transform#getWorldTransformMatrix\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A temporary matrix to hold parent values during the calculations.\n *\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\n */\n getWorldTransformMatrix: function (tempMatrix, parentMatrix)\n {\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\n if (parentMatrix === undefined) { parentMatrix = new TransformMatrix(); }\n\n var parent = this.parentContainer;\n\n if (!parent)\n {\n return this.getLocalTransformMatrix(tempMatrix);\n }\n\n tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\n\n while (parent)\n {\n parentMatrix.applyITRS(parent.x, parent.y, parent._rotation, parent._scaleX, parent._scaleY);\n\n parentMatrix.multiply(tempMatrix, tempMatrix);\n\n parent = parent.parentContainer;\n }\n\n return tempMatrix;\n },\n\n /**\n * Takes the given `x` and `y` coordinates and converts them into local space for this\n * Game Object, taking into account parent and local transforms, and the Display Origin.\n *\n * The returned Vector2 contains the translated point in its properties.\n *\n * A Camera needs to be provided in order to handle modified scroll factors. If no\n * camera is specified, it will use the `main` camera from the Scene to which this\n * Game Object belongs.\n *\n * @method Phaser.GameObjects.Components.Transform#getLocalPoint\n * @since 3.50.0\n *\n * @param {number} x - The x position to translate.\n * @param {number} y - The y position to translate.\n * @param {Phaser.Math.Vector2} [point] - A Vector2, or point-like object, to store the results in.\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera which is being tested against. If not given will use the Scene default camera.\n *\n * @return {Phaser.Math.Vector2} The translated point.\n */\n getLocalPoint: function (x, y, point, camera)\n {\n if (!point) { point = new Vector2(); }\n if (!camera) { camera = this.scene.sys.cameras.main; }\n\n var csx = camera.scrollX;\n var csy = camera.scrollY;\n\n var px = x + (csx * this.scrollFactorX) - csx;\n var py = y + (csy * this.scrollFactorY) - csy;\n\n if (this.parentContainer)\n {\n this.getWorldTransformMatrix().applyInverse(px, py, point);\n }\n else\n {\n TransformXY(px, py, this.x, this.y, this.rotation, this.scaleX, this.scaleY, point);\n }\n\n // Normalize origin\n if (this._originComponent)\n {\n point.x += this._displayOriginX;\n point.y += this._displayOriginY;\n }\n\n return point;\n },\n\n /**\n * Gets the sum total rotation of all of this Game Objects parent Containers.\n *\n * The returned value is in radians and will be zero if this Game Object has no parent container.\n *\n * @method Phaser.GameObjects.Components.Transform#getParentRotation\n * @since 3.18.0\n *\n * @return {number} The sum total rotation, in radians, of all parent containers of this Game Object.\n */\n getParentRotation: function ()\n {\n var rotation = 0;\n\n var parent = this.parentContainer;\n\n while (parent)\n {\n rotation += parent.rotation;\n\n parent = parent.parentContainer;\n }\n\n return rotation;\n }\n\n};\n\nmodule.exports = Transform;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar MATH_CONST = require('../../math/const');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * A Matrix used for display transformations for rendering.\r\n *\r\n * It is represented like so:\r\n *\r\n * ```\r\n * | a | c | tx |\r\n * | b | d | ty |\r\n * | 0 | 0 | 1 |\r\n * ```\r\n *\r\n * @class TransformMatrix\r\n * @memberof Phaser.GameObjects.Components\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [a=1] - The Scale X value.\r\n * @param {number} [b=0] - The Skew Y value.\r\n * @param {number} [c=0] - The Skew X value.\r\n * @param {number} [d=1] - The Scale Y value.\r\n * @param {number} [tx=0] - The Translate X value.\r\n * @param {number} [ty=0] - The Translate Y value.\r\n */\r\nvar TransformMatrix = new Class({\r\n\r\n initialize:\r\n\r\n function TransformMatrix (a, b, c, d, tx, ty)\r\n {\r\n if (a === undefined) { a = 1; }\r\n if (b === undefined) { b = 0; }\r\n if (c === undefined) { c = 0; }\r\n if (d === undefined) { d = 1; }\r\n if (tx === undefined) { tx = 0; }\r\n if (ty === undefined) { ty = 0; }\r\n\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#matrix\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.matrix = new Float32Array([ a, b, c, d, tx, ty, 0, 0, 1 ]);\r\n\r\n /**\r\n * The decomposed matrix.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#decomposedMatrix\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.decomposedMatrix = {\r\n translateX: 0,\r\n translateY: 0,\r\n scaleX: 1,\r\n scaleY: 1,\r\n rotation: 0\r\n };\r\n },\r\n\r\n /**\r\n * The Scale X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#a\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n a: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[0];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[0] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Skew Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#b\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n b: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[1];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[1] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Skew X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#c\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n c: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[2];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[2] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Scale Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#d\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n d: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[3];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[3] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#e\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n e: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#f\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n f: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#tx\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n tx: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#ty\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n ty: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Matrix. Value is in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#rotation\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return Math.acos(this.a / this.scaleX) * ((Math.atan(-this.c / this.a) < 0) ? -1 : 1);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Matrix, normalized to be within the Phaser right-handed\r\n * clockwise rotation space. Value is in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#rotationNormalized\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n rotationNormalized: {\r\n\r\n get: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n if (a || b)\r\n {\r\n // var r = Math.sqrt(a * a + b * b);\r\n \r\n return (b > 0) ? Math.acos(a / this.scaleX) : -Math.acos(a / this.scaleX);\r\n }\r\n else if (c || d)\r\n {\r\n // var s = Math.sqrt(c * c + d * d);\r\n \r\n return MATH_CONST.TAU - ((d > 0) ? Math.acos(-c / this.scaleY) : -Math.acos(c / this.scaleY));\r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The decomposed horizontal scale of the Matrix. This value is always positive.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleX\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt((this.a * this.a) + (this.b * this.b));\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The decomposed vertical scale of the Matrix. This value is always positive.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleY\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt((this.c * this.c) + (this.d * this.d));\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Reset the Matrix to an identity matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#loadIdentity\r\n * @since 3.0.0\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n loadIdentity: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = 1;\r\n matrix[1] = 0;\r\n matrix[2] = 0;\r\n matrix[3] = 1;\r\n matrix[4] = 0;\r\n matrix[5] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#translate\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation value.\r\n * @param {number} y - The vertical translation value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n translate: function (x, y)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[4] = matrix[0] * x + matrix[2] * y + matrix[4];\r\n matrix[5] = matrix[1] * x + matrix[3] * y + matrix[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scale value.\r\n * @param {number} y - The vertical scale value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n scale: function (x, y)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] *= x;\r\n matrix[1] *= x;\r\n matrix[2] *= y;\r\n matrix[3] *= y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n rotate: function (angle)\r\n {\r\n var sin = Math.sin(angle);\r\n var cos = Math.cos(angle);\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n matrix[0] = a * cos + c * sin;\r\n matrix[1] = b * cos + d * sin;\r\n matrix[2] = a * -sin + c * cos;\r\n matrix[3] = b * -sin + d * cos;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n * \r\n * If an `out` Matrix is given then the results will be stored in it.\r\n * If it is not given, this matrix will be updated in place instead.\r\n * Use an `out` Matrix if you do not wish to mutate this matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in.\r\n *\r\n * @return {(this|Phaser.GameObjects.Components.TransformMatrix)} Either this TransformMatrix, or the `out` Matrix, if given in the arguments.\r\n */\r\n multiply: function (rhs, out)\r\n {\r\n var matrix = this.matrix;\r\n var source = rhs.matrix;\r\n\r\n var localA = matrix[0];\r\n var localB = matrix[1];\r\n var localC = matrix[2];\r\n var localD = matrix[3];\r\n var localE = matrix[4];\r\n var localF = matrix[5];\r\n\r\n var sourceA = source[0];\r\n var sourceB = source[1];\r\n var sourceC = source[2];\r\n var sourceD = source[3];\r\n var sourceE = source[4];\r\n var sourceF = source[5];\r\n\r\n var destinationMatrix = (out === undefined) ? this : out;\r\n\r\n destinationMatrix.a = (sourceA * localA) + (sourceB * localC);\r\n destinationMatrix.b = (sourceA * localB) + (sourceB * localD);\r\n destinationMatrix.c = (sourceC * localA) + (sourceD * localC);\r\n destinationMatrix.d = (sourceC * localB) + (sourceD * localD);\r\n destinationMatrix.e = (sourceE * localA) + (sourceF * localC) + localE;\r\n destinationMatrix.f = (sourceE * localB) + (sourceF * localD) + localF;\r\n\r\n return destinationMatrix;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the matrix given, including the offset.\r\n * \r\n * The offsetX is added to the tx value: `offsetX * a + offsetY * c + tx`.\r\n * The offsetY is added to the ty value: `offsetY * b + offsetY * d + ty`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#multiplyWithOffset\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\r\n * @param {number} offsetX - Horizontal offset to factor in to the multiplication.\r\n * @param {number} offsetY - Vertical offset to factor in to the multiplication.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n multiplyWithOffset: function (src, offsetX, offsetY)\r\n {\r\n var matrix = this.matrix;\r\n var otherMatrix = src.matrix;\r\n\r\n var a0 = matrix[0];\r\n var b0 = matrix[1];\r\n var c0 = matrix[2];\r\n var d0 = matrix[3];\r\n var tx0 = matrix[4];\r\n var ty0 = matrix[5];\r\n\r\n var pse = offsetX * a0 + offsetY * c0 + tx0;\r\n var psf = offsetX * b0 + offsetY * d0 + ty0;\r\n\r\n var a1 = otherMatrix[0];\r\n var b1 = otherMatrix[1];\r\n var c1 = otherMatrix[2];\r\n var d1 = otherMatrix[3];\r\n var tx1 = otherMatrix[4];\r\n var ty1 = otherMatrix[5];\r\n\r\n matrix[0] = a1 * a0 + b1 * c0;\r\n matrix[1] = a1 * b0 + b1 * d0;\r\n matrix[2] = c1 * a0 + d1 * c0;\r\n matrix[3] = c1 * b0 + d1 * d0;\r\n matrix[4] = tx1 * a0 + ty1 * c0 + pse;\r\n matrix[5] = tx1 * b0 + ty1 * d0 + psf;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#transform\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The Scale X value.\r\n * @param {number} b - The Shear Y value.\r\n * @param {number} c - The Shear X value.\r\n * @param {number} d - The Scale Y value.\r\n * @param {number} tx - The Translate X value.\r\n * @param {number} ty - The Translate Y value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n transform: function (a, b, c, d, tx, ty)\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a0 = matrix[0];\r\n var b0 = matrix[1];\r\n var c0 = matrix[2];\r\n var d0 = matrix[3];\r\n var tx0 = matrix[4];\r\n var ty0 = matrix[5];\r\n\r\n matrix[0] = a * a0 + b * c0;\r\n matrix[1] = a * b0 + b * d0;\r\n matrix[2] = c * a0 + d * c0;\r\n matrix[3] = c * b0 + d * d0;\r\n matrix[4] = tx * a0 + ty * c0 + tx0;\r\n matrix[5] = tx * b0 + ty * d0 + ty0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform a point using this Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#transformPoint\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the point to transform.\r\n * @param {number} y - The y coordinate of the point to transform.\r\n * @param {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} point - The Point object to store the transformed coordinates.\r\n *\r\n * @return {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} The Point containing the transformed coordinates.\r\n */\r\n transformPoint: function (x, y, point)\r\n {\r\n if (point === undefined) { point = { x: 0, y: 0 }; }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n point.x = x * a + y * c + tx;\r\n point.y = x * b + y * d + ty;\r\n\r\n return point;\r\n },\r\n\r\n /**\r\n * Invert the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#invert\r\n * @since 3.0.0\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n invert: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n var n = a * d - b * c;\r\n\r\n matrix[0] = d / n;\r\n matrix[1] = -b / n;\r\n matrix[2] = -c / n;\r\n matrix[3] = a / n;\r\n matrix[4] = (c * ty - d * tx) / n;\r\n matrix[5] = -(a * ty - b * tx) / n;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix to copy those of the matrix given.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFrom\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n copyFrom: function (src)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = src.a;\r\n matrix[1] = src.b;\r\n matrix[2] = src.c;\r\n matrix[3] = src.d;\r\n matrix[4] = src.e;\r\n matrix[5] = src.f;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix to copy those of the array given.\r\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFromArray\r\n * @since 3.11.0\r\n *\r\n * @param {array} src - The array of values to set into this matrix.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n copyFromArray: function (src)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = src[0];\r\n matrix[1] = src[1];\r\n matrix[2] = src[2];\r\n matrix[3] = src[3];\r\n matrix[4] = src[4];\r\n matrix[5] = src[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values from this Matrix to the given Canvas Rendering Context.\r\n * This will use the Context.transform method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToContext\r\n * @since 3.12.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\r\n */\r\n copyToContext: function (ctx)\r\n {\r\n var matrix = this.matrix;\r\n\r\n ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n return ctx;\r\n },\r\n\r\n /**\r\n * Copy the values from this Matrix to the given Canvas Rendering Context.\r\n * This will use the Context.setTransform method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setToContext\r\n * @since 3.12.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\r\n */\r\n setToContext: function (ctx)\r\n {\r\n var matrix = this.matrix;\r\n\r\n ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n return ctx;\r\n },\r\n\r\n /**\r\n * Copy the values in this Matrix to the array given.\r\n * \r\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToArray\r\n * @since 3.12.0\r\n *\r\n * @param {array} [out] - The array to copy the matrix values in to.\r\n *\r\n * @return {array} An array where elements 0 to 5 contain the values from this matrix.\r\n */\r\n copyToArray: function (out)\r\n {\r\n var matrix = this.matrix;\r\n\r\n if (out === undefined)\r\n {\r\n out = [ matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5] ];\r\n }\r\n else\r\n {\r\n out[0] = matrix[0];\r\n out[1] = matrix[1];\r\n out[2] = matrix[2];\r\n out[3] = matrix[3];\r\n out[4] = matrix[4];\r\n out[5] = matrix[5];\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setTransform\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The Scale X value.\r\n * @param {number} b - The Shear Y value.\r\n * @param {number} c - The Shear X value.\r\n * @param {number} d - The Scale Y value.\r\n * @param {number} tx - The Translate X value.\r\n * @param {number} ty - The Translate Y value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n setTransform: function (a, b, c, d, tx, ty)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = a;\r\n matrix[1] = b;\r\n matrix[2] = c;\r\n matrix[3] = d;\r\n matrix[4] = tx;\r\n matrix[5] = ty;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Decompose this Matrix into its translation, scale and rotation values using QR decomposition.\r\n * \r\n * The result must be applied in the following order to reproduce the current matrix:\r\n * \r\n * translate -> rotate -> scale\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#decomposeMatrix\r\n * @since 3.0.0\r\n *\r\n * @return {object} The decomposed Matrix.\r\n */\r\n decomposeMatrix: function ()\r\n {\r\n var decomposedMatrix = this.decomposedMatrix;\r\n\r\n var matrix = this.matrix;\r\n\r\n // a = scale X (1)\r\n // b = shear Y (0)\r\n // c = shear X (0)\r\n // d = scale Y (1)\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n var determ = a * d - b * c;\r\n\r\n decomposedMatrix.translateX = matrix[4];\r\n decomposedMatrix.translateY = matrix[5];\r\n\r\n if (a || b)\r\n {\r\n var r = Math.sqrt(a * a + b * b);\r\n\r\n decomposedMatrix.rotation = (b > 0) ? Math.acos(a / r) : -Math.acos(a / r);\r\n decomposedMatrix.scaleX = r;\r\n decomposedMatrix.scaleY = determ / r;\r\n }\r\n else if (c || d)\r\n {\r\n var s = Math.sqrt(c * c + d * d);\r\n\r\n decomposedMatrix.rotation = Math.PI * 0.5 - (d > 0 ? Math.acos(-c / s) : -Math.acos(c / s));\r\n decomposedMatrix.scaleX = determ / s;\r\n decomposedMatrix.scaleY = s;\r\n }\r\n else\r\n {\r\n decomposedMatrix.rotation = 0;\r\n decomposedMatrix.scaleX = 0;\r\n decomposedMatrix.scaleY = 0;\r\n }\r\n\r\n return decomposedMatrix;\r\n },\r\n\r\n /**\r\n * Apply the identity, translate, rotate and scale operations on the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#applyITRS\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation.\r\n * @param {number} y - The vertical translation.\r\n * @param {number} rotation - The angle of rotation in radians.\r\n * @param {number} scaleX - The horizontal scale.\r\n * @param {number} scaleY - The vertical scale.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n applyITRS: function (x, y, rotation, scaleX, scaleY)\r\n {\r\n var matrix = this.matrix;\r\n\r\n var radianSin = Math.sin(rotation);\r\n var radianCos = Math.cos(rotation);\r\n\r\n // Translate\r\n matrix[4] = x;\r\n matrix[5] = y;\r\n\r\n // Rotate and Scale\r\n matrix[0] = radianCos * scaleX;\r\n matrix[1] = radianSin * scaleX;\r\n matrix[2] = -radianSin * scaleY;\r\n matrix[3] = radianCos * scaleY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes the `x` and `y` values and returns a new position in the `output` vector that is the inverse of\r\n * the current matrix with its transformation applied.\r\n * \r\n * Can be used to translate points from world to local space.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#applyInverse\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - The x position to translate.\r\n * @param {number} y - The y position to translate.\r\n * @param {Phaser.Math.Vector2} [output] - A Vector2, or point-like object, to store the results in.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates, inverse-transformed through this matrix.\r\n */\r\n applyInverse: function (x, y, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n var id = 1 / ((a * d) + (c * -b));\r\n\r\n output.x = (d * id * x) + (-c * id * y) + (((ty * c) - (tx * d)) * id);\r\n output.y = (a * id * y) + (-b * id * x) + (((-ty * a) + (tx * b)) * id);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the X component of this matrix multiplied by the given values.\r\n * This is the same as `x * a + y * c + e`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getX\r\n * @since 3.12.0\r\n * \r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n *\r\n * @return {number} The calculated x value.\r\n */\r\n getX: function (x, y)\r\n {\r\n return x * this.a + y * this.c + this.e;\r\n },\r\n\r\n /**\r\n * Returns the Y component of this matrix multiplied by the given values.\r\n * This is the same as `x * b + y * d + f`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getY\r\n * @since 3.12.0\r\n * \r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n *\r\n * @return {number} The calculated y value.\r\n */\r\n getY: function (x, y)\r\n {\r\n return x * this.b + y * this.d + this.f;\r\n },\r\n\r\n /**\r\n * Returns the X component of this matrix multiplied by the given values.\r\n * \r\n * This is the same as `x * a + y * c + e`, optionally passing via `Math.round`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getXRound\r\n * @since 3.50.0\r\n * \r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {boolean} [round=false] - Math.round the resulting value?\r\n *\r\n * @return {number} The calculated x value.\r\n */\r\n getXRound: function (x, y, round)\r\n {\r\n var v = this.getX(x, y);\r\n\r\n if (round)\r\n {\r\n v = Math.round(v);\r\n }\r\n\r\n return v;\r\n },\r\n\r\n /**\r\n * Returns the Y component of this matrix multiplied by the given values.\r\n * \r\n * This is the same as `x * b + y * d + f`, optionally passing via `Math.round`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getYRound\r\n * @since 3.50.0\r\n * \r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {boolean} [round=false] - Math.round the resulting value?\r\n *\r\n * @return {number} The calculated y value.\r\n */\r\n getYRound: function (x, y, round)\r\n {\r\n var v = this.getY(x, y);\r\n\r\n if (round)\r\n {\r\n v = Math.round(v);\r\n }\r\n\r\n return v;\r\n },\r\n\r\n /**\r\n * Returns a string that can be used in a CSS Transform call as a `matrix` property.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getCSSMatrix\r\n * @since 3.12.0\r\n *\r\n * @return {string} A string containing the CSS Transform matrix values.\r\n */\r\n getCSSMatrix: function ()\r\n {\r\n var m = this.matrix;\r\n\r\n return 'matrix(' + m[0] + ',' + m[1] + ',' + m[2] + ',' + m[3] + ',' + m[4] + ',' + m[5] + ')';\r\n },\r\n\r\n /**\r\n * Destroys this Transform Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#destroy\r\n * @since 3.4.0\r\n */\r\n destroy: function ()\r\n {\r\n this.matrix = null;\r\n this.decomposedMatrix = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TransformMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 1; // 0001\r\n\r\n/**\r\n * Provides methods used for setting the visibility of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Visible\r\n * @since 3.0.0\r\n */\r\n\r\nvar Visible = {\r\n\r\n /**\r\n * Private internal value. Holds the visible value.\r\n * \r\n * @name Phaser.GameObjects.Components.Visible#_visible\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n _visible: true,\r\n\r\n /**\r\n * The visible state of the Game Object.\r\n * \r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n * \r\n * @name Phaser.GameObjects.Components.Visible#visible\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n visible: {\r\n\r\n get: function ()\r\n {\r\n return this._visible;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value)\r\n {\r\n this._visible = true;\r\n this.renderFlags |= _FLAG;\r\n }\r\n else\r\n {\r\n this._visible = false;\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the visibility of this Game Object.\r\n * \r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n *\r\n * @method Phaser.GameObjects.Components.Visible#setVisible\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The visible state of the Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setVisible: function (value)\r\n {\r\n this.visible = value;\r\n\r\n return this;\r\n }\r\n};\r\n\r\nmodule.exports = Visible;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Added to Scene Event.\n *\n * This event is dispatched when a Game Object is added to a Scene.\n *\n * Listen for it on a Game Object instance using `GameObject.on('addedtoscene', listener)`.\n *\n * @event Phaser.GameObjects.Events#ADDED_TO_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\n */\nmodule.exports = 'addedtoscene';\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Destroy Event.\r\n * \r\n * This event is dispatched when a Game Object instance is being destroyed.\r\n * \r\n * Listen for it on a Game Object instance using `GameObject.on('destroy', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#DESTROY\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed.\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Removed from Scene Event.\n *\n * This event is dispatched when a Game Object is removed from a Scene.\n *\n * Listen for it on a Game Object instance using `GameObject.on('removedfromscene', listener)`.\n *\n * @event Phaser.GameObjects.Events#REMOVED_FROM_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\n */\nmodule.exports = 'removedfromscene';\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Complete Event.\r\n * \r\n * This event is dispatched when a Video finishes playback by reaching the end of its duration. It\r\n * is also dispatched if a video marker sequence is being played and reaches the end.\r\n * \r\n * Note that not all videos can fire this event. Live streams, for example, have no fixed duration,\r\n * so never technically 'complete'.\r\n * \r\n * If a video is stopped from playback, via the `Video.stop` method, it will emit the\r\n * `VIDEO_STOP` event instead of this one.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('complete', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_COMPLETE\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed playback.\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Created Event.\r\n * \r\n * This event is dispatched when the texture for a Video has been created. This happens\r\n * when enough of the video source has been loaded that the browser is able to render a\r\n * frame from it.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('created', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_CREATED\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\r\n * @param {integer} width - The width of the video.\r\n * @param {integer} height - The height of the video.\r\n */\r\nmodule.exports = 'created';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Error Event.\r\n * \r\n * This event is dispatched when a Video tries to play a source that does not exist, or is the wrong file type.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('error', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_ERROR\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which threw the error.\r\n * @param {Event} event - The native DOM event the browser raised during playback.\r\n */\r\nmodule.exports = 'error';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Loop Event.\r\n * \r\n * This event is dispatched when a Video that is currently playing has looped. This only\r\n * happens if the `loop` parameter was specified, or the `setLoop` method was called,\r\n * and if the video has a fixed duration. Video streams, for example, cannot loop, as\r\n * they have no duration.\r\n * \r\n * Looping is based on the result of the Video `timeupdate` event. This event is not\r\n * frame-accurate, due to the way browsers work, so please do not rely on this loop\r\n * event to be time or frame precise.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('loop', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_LOOP\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which has looped.\r\n */\r\nmodule.exports = 'loop';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Play Event.\r\n * \r\n * This event is dispatched when a Video begins playback. For videos that do not require\r\n * interaction unlocking, this is usually as soon as the `Video.play` method is called.\r\n * However, for videos that require unlocking, it is fired once playback begins after\r\n * they've been unlocked.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('play', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_PLAY\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started playback.\r\n */\r\nmodule.exports = 'play';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Seeked Event.\r\n * \r\n * This event is dispatched when a Video completes seeking to a new point in its timeline.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('seeked', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_SEEKED\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed seeking.\r\n */\r\nmodule.exports = 'seeked';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Seeking Event.\r\n * \r\n * This event is dispatched when a Video _begins_ seeking to a new point in its timeline.\r\n * When the seek is complete, it will dispatch the `VIDEO_SEEKED` event to conclude.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('seeking', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_SEEKING\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started seeking.\r\n */\r\nmodule.exports = 'seeking';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Stopped Event.\r\n * \r\n * This event is dispatched when a Video is stopped from playback via a call to the `Video.stop` method,\r\n * either directly via game code, or indirectly as the result of changing a video source or destroying it.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('stop', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_STOP\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which stopped playback.\r\n */\r\nmodule.exports = 'stop';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Timeout Event.\r\n * \r\n * This event is dispatched when a Video has exhausted its allocated time while trying to connect to a video\r\n * source to start playback.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('timeout', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_TIMEOUT\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which timed out.\r\n */\r\nmodule.exports = 'timeout';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Unlocked Event.\r\n * \r\n * This event is dispatched when a Video that was prevented from playback due to the browsers\r\n * Media Engagement Interaction policy, is unlocked by a user gesture.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('unlocked', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_UNLOCKED\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\r\n */\r\nmodule.exports = 'unlocked';\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.GameObjects.Events\n */\n\nmodule.exports = {\n\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\n DESTROY: require('./DESTROY_EVENT'),\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'),\n VIDEO_COMPLETE: require('./VIDEO_COMPLETE_EVENT'),\n VIDEO_CREATED: require('./VIDEO_CREATED_EVENT'),\n VIDEO_ERROR: require('./VIDEO_ERROR_EVENT'),\n VIDEO_LOOP: require('./VIDEO_LOOP_EVENT'),\n VIDEO_PLAY: require('./VIDEO_PLAY_EVENT'),\n VIDEO_SEEKED: require('./VIDEO_SEEKED_EVENT'),\n VIDEO_SEEKING: require('./VIDEO_SEEKING_EVENT'),\n VIDEO_STOP: require('./VIDEO_STOP_EVENT'),\n VIDEO_TIMEOUT: require('./VIDEO_TIMEOUT_EVENT'),\n VIDEO_UNLOCKED: require('./VIDEO_UNLOCKED_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar CONST = require('./const');\nvar Events = require('./events');\nvar GetFastValue = require('../utils/object/GetFastValue');\nvar GetURL = require('./GetURL');\nvar MergeXHRSettings = require('./MergeXHRSettings');\nvar XHRLoader = require('./XHRLoader');\nvar XHRSettings = require('./XHRSettings');\n\n/**\n * @classdesc\n * The base File class used by all File Types that the Loader can support.\n * You shouldn't create an instance of a File directly, but should extend it with your own class, setting a custom type and processing methods.\n *\n * @class File\n * @memberof Phaser.Loader\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\n * @param {Phaser.Types.Loader.FileConfig} fileConfig - The file configuration object, as created by the file type.\n */\nvar File = new Class({\n\n initialize:\n\n function File (loader, fileConfig)\n {\n /**\n * A reference to the Loader that is going to load this file.\n *\n * @name Phaser.Loader.File#loader\n * @type {Phaser.Loader.LoaderPlugin}\n * @since 3.0.0\n */\n this.loader = loader;\n\n /**\n * A reference to the Cache, or Texture Manager, that is going to store this file if it loads.\n *\n * @name Phaser.Loader.File#cache\n * @type {(Phaser.Cache.BaseCache|Phaser.Textures.TextureManager)}\n * @since 3.7.0\n */\n this.cache = GetFastValue(fileConfig, 'cache', false);\n\n /**\n * The file type string (image, json, etc) for sorting within the Loader.\n *\n * @name Phaser.Loader.File#type\n * @type {string}\n * @since 3.0.0\n */\n this.type = GetFastValue(fileConfig, 'type', false);\n\n /**\n * Unique cache key (unique within its file type)\n *\n * @name Phaser.Loader.File#key\n * @type {string}\n * @since 3.0.0\n */\n this.key = GetFastValue(fileConfig, 'key', false);\n\n var loadKey = this.key;\n\n if (loader.prefix && loader.prefix !== '')\n {\n this.key = loader.prefix + loadKey;\n }\n\n if (!this.type || !this.key)\n {\n throw new Error('Error calling \\'Loader.' + this.type + '\\' invalid key provided.');\n }\n\n /**\n * The URL of the file, not including baseURL.\n *\n * Automatically has Loader.path prepended to it if a string.\n *\n * Can also be a JavaScript Object, such as the results of parsing JSON data.\n *\n * @name Phaser.Loader.File#url\n * @type {object|string}\n * @since 3.0.0\n */\n this.url = GetFastValue(fileConfig, 'url');\n\n if (this.url === undefined)\n {\n this.url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', '');\n }\n else if (typeof this.url === 'string' && this.url.indexOf('blob:') !== 0 && this.url.indexOf('data:') !== 0)\n {\n this.url = loader.path + this.url;\n }\n\n /**\n * The final URL this file will load from, including baseURL and path.\n * Set automatically when the Loader calls 'load' on this file.\n *\n * @name Phaser.Loader.File#src\n * @type {string}\n * @since 3.0.0\n */\n this.src = '';\n\n /**\n * The merged XHRSettings for this file.\n *\n * @name Phaser.Loader.File#xhrSettings\n * @type {Phaser.Types.Loader.XHRSettingsObject}\n * @since 3.0.0\n */\n this.xhrSettings = XHRSettings(GetFastValue(fileConfig, 'responseType', undefined));\n\n if (GetFastValue(fileConfig, 'xhrSettings', false))\n {\n this.xhrSettings = MergeXHRSettings(this.xhrSettings, GetFastValue(fileConfig, 'xhrSettings', {}));\n }\n\n /**\n * The XMLHttpRequest instance (as created by XHR Loader) that is loading this File.\n *\n * @name Phaser.Loader.File#xhrLoader\n * @type {?XMLHttpRequest}\n * @since 3.0.0\n */\n this.xhrLoader = null;\n\n /**\n * The current state of the file. One of the FILE_CONST values.\n *\n * @name Phaser.Loader.File#state\n * @type {integer}\n * @since 3.0.0\n */\n this.state = (typeof(this.url) === 'function') ? CONST.FILE_POPULATED : CONST.FILE_PENDING;\n\n /**\n * The total size of this file.\n * Set by onProgress and only if loading via XHR.\n *\n * @name Phaser.Loader.File#bytesTotal\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.bytesTotal = 0;\n\n /**\n * Updated as the file loads.\n * Only set if loading via XHR.\n *\n * @name Phaser.Loader.File#bytesLoaded\n * @type {number}\n * @default -1\n * @since 3.0.0\n */\n this.bytesLoaded = -1;\n\n /**\n * A percentage value between 0 and 1 indicating how much of this file has loaded.\n * Only set if loading via XHR.\n *\n * @name Phaser.Loader.File#percentComplete\n * @type {number}\n * @default -1\n * @since 3.0.0\n */\n this.percentComplete = -1;\n\n /**\n * For CORs based loading.\n * If this is undefined then the File will check BaseLoader.crossOrigin and use that (if set)\n *\n * @name Phaser.Loader.File#crossOrigin\n * @type {(string|undefined)}\n * @since 3.0.0\n */\n this.crossOrigin = undefined;\n\n /**\n * The processed file data, stored here after the file has loaded.\n *\n * @name Phaser.Loader.File#data\n * @type {*}\n * @since 3.0.0\n */\n this.data = undefined;\n\n /**\n * A config object that can be used by file types to store transitional data.\n *\n * @name Phaser.Loader.File#config\n * @type {*}\n * @since 3.0.0\n */\n this.config = GetFastValue(fileConfig, 'config', {});\n\n /**\n * If this is a multipart file, i.e. an atlas and its json together, then this is a reference\n * to the parent MultiFile. Set and used internally by the Loader or specific file types.\n *\n * @name Phaser.Loader.File#multiFile\n * @type {?Phaser.Loader.MultiFile}\n * @since 3.7.0\n */\n this.multiFile;\n\n /**\n * Does this file have an associated linked file? Such as an image and a normal map.\n * Atlases and Bitmap Fonts use the multiFile, because those files need loading together but aren't\n * actually bound by data, where-as a linkFile is.\n *\n * @name Phaser.Loader.File#linkFile\n * @type {?Phaser.Loader.File}\n * @since 3.7.0\n */\n this.linkFile;\n },\n\n /**\n * Links this File with another, so they depend upon each other for loading and processing.\n *\n * @method Phaser.Loader.File#setLink\n * @since 3.7.0\n *\n * @param {Phaser.Loader.File} fileB - The file to link to this one.\n */\n setLink: function (fileB)\n {\n this.linkFile = fileB;\n\n fileB.linkFile = this;\n },\n\n /**\n * Resets the XHRLoader instance this file is using.\n *\n * @method Phaser.Loader.File#resetXHR\n * @since 3.0.0\n */\n resetXHR: function ()\n {\n if (this.xhrLoader)\n {\n this.xhrLoader.onload = undefined;\n this.xhrLoader.onerror = undefined;\n this.xhrLoader.onprogress = undefined;\n }\n },\n\n /**\n * Called by the Loader, starts the actual file downloading.\n * During the load the methods onLoad, onError and onProgress are called, based on the XHR events.\n * You shouldn't normally call this method directly, it's meant to be invoked by the Loader.\n *\n * @method Phaser.Loader.File#load\n * @since 3.0.0\n */\n load: function ()\n {\n if (this.state === CONST.FILE_POPULATED)\n {\n // Can happen for example in a JSONFile if they've provided a JSON object instead of a URL\n this.loader.nextFile(this, true);\n }\n else\n {\n this.state = CONST.FILE_LOADING;\n\n this.src = GetURL(this, this.loader.baseURL);\n\n if (this.src.indexOf('data:') === 0)\n {\n console.warn('Local data URIs are not supported: ' + this.key);\n }\n else\n {\n // The creation of this XHRLoader starts the load process going.\n // It will automatically call the following, based on the load outcome:\n //\n // xhr.onload = this.onLoad\n // xhr.onerror = this.onError\n // xhr.onprogress = this.onProgress\n\n this.xhrLoader = XHRLoader(this, this.loader.xhr);\n }\n }\n },\n\n /**\n * Called when the file finishes loading, is sent a DOM ProgressEvent.\n *\n * @method Phaser.Loader.File#onLoad\n * @since 3.0.0\n *\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this load.\n */\n onLoad: function (xhr, event)\n {\n var localFileOk = ((xhr.responseURL && xhr.responseURL.indexOf('file://') === 0 && event.target.status === 0));\n\n var success = !(event.target && event.target.status !== 200) || localFileOk;\n\n // Handle HTTP status codes of 4xx and 5xx as errors, even if xhr.onerror was not called.\n if (xhr.readyState === 4 && xhr.status >= 400 && xhr.status <= 599)\n {\n success = false;\n }\n\n this.state = CONST.FILE_LOADED;\n\n this.resetXHR();\n\n this.loader.nextFile(this, success);\n },\n\n /**\n * Called if the file errors while loading, is sent a DOM ProgressEvent.\n *\n * @method Phaser.Loader.File#onError\n * @since 3.0.0\n *\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this error.\n */\n onError: function ()\n {\n this.resetXHR();\n\n this.loader.nextFile(this, false);\n },\n\n /**\n * Called during the file load progress. Is sent a DOM ProgressEvent.\n *\n * @method Phaser.Loader.File#onProgress\n * @fires Phaser.Loader.Events#FILE_PROGRESS\n * @since 3.0.0\n *\n * @param {ProgressEvent} event - The DOM ProgressEvent.\n */\n onProgress: function (event)\n {\n if (event.lengthComputable)\n {\n this.bytesLoaded = event.loaded;\n this.bytesTotal = event.total;\n\n this.percentComplete = Math.min((this.bytesLoaded / this.bytesTotal), 1);\n\n this.loader.emit(Events.FILE_PROGRESS, this, this.percentComplete);\n }\n },\n\n /**\n * Usually overridden by the FileTypes and is called by Loader.nextFile.\n * This method controls what extra work this File does with its loaded data, for example a JSON file will parse itself during this stage.\n *\n * @method Phaser.Loader.File#onProcess\n * @since 3.0.0\n */\n onProcess: function ()\n {\n this.state = CONST.FILE_PROCESSING;\n\n this.onProcessComplete();\n },\n\n /**\n * Called when the File has completed processing.\n * Checks on the state of its multifile, if set.\n *\n * @method Phaser.Loader.File#onProcessComplete\n * @since 3.7.0\n */\n onProcessComplete: function ()\n {\n this.state = CONST.FILE_COMPLETE;\n\n if (this.multiFile)\n {\n this.multiFile.onFileComplete(this);\n }\n\n this.loader.fileProcessComplete(this);\n },\n\n /**\n * Called when the File has completed processing but it generated an error.\n * Checks on the state of its multifile, if set.\n *\n * @method Phaser.Loader.File#onProcessError\n * @since 3.7.0\n */\n onProcessError: function ()\n {\n this.state = CONST.FILE_ERRORED;\n\n if (this.multiFile)\n {\n this.multiFile.onFileFailed(this);\n }\n\n this.loader.fileProcessComplete(this);\n },\n\n /**\n * Checks if a key matching the one used by this file exists in the target Cache or not.\n * This is called automatically by the LoaderPlugin to decide if the file can be safely\n * loaded or will conflict.\n *\n * @method Phaser.Loader.File#hasCacheConflict\n * @since 3.7.0\n *\n * @return {boolean} `true` if adding this file will cause a conflict, otherwise `false`.\n */\n hasCacheConflict: function ()\n {\n return (this.cache && this.cache.exists(this.key));\n },\n\n /**\n * Adds this file to its target cache upon successful loading and processing.\n * This method is often overridden by specific file types.\n *\n * @method Phaser.Loader.File#addToCache\n * @since 3.7.0\n */\n addToCache: function ()\n {\n if (this.cache)\n {\n this.cache.add(this.key, this.data);\n }\n\n this.pendingDestroy();\n },\n\n /**\n * Called once the file has been added to its cache and is now ready for deletion from the Loader.\n * It will emit a `filecomplete` event from the LoaderPlugin.\n *\n * @method Phaser.Loader.File#pendingDestroy\n * @fires Phaser.Loader.Events#FILE_COMPLETE\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\n * @since 3.7.0\n */\n pendingDestroy: function (data)\n {\n if (data === undefined) { data = this.data; }\n\n var key = this.key;\n var type = this.type;\n\n this.loader.emit(Events.FILE_COMPLETE, key, type, data);\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type, data);\n\n this.loader.flagForRemoval(this);\n },\n\n /**\n * Destroy this File and any references it holds.\n *\n * @method Phaser.Loader.File#destroy\n * @since 3.7.0\n */\n destroy: function ()\n {\n this.loader = null;\n this.cache = null;\n this.xhrSettings = null;\n this.multiFile = null;\n this.linkFile = null;\n this.data = null;\n }\n\n});\n\n/**\n * Static method for creating object URL using URL API and setting it as image 'src' attribute.\n * If URL API is not supported (usually on old browsers) it falls back to creating Base64 encoded url using FileReader.\n *\n * @method Phaser.Loader.File.createObjectURL\n * @static\n * @since 3.7.0\n *\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be set to object URL.\n * @param {Blob} blob - A Blob object to create an object URL for.\n * @param {string} defaultType - Default mime type used if blob type is not available.\n */\nFile.createObjectURL = function (image, blob, defaultType)\n{\n if (typeof URL === 'function')\n {\n image.src = URL.createObjectURL(blob);\n }\n else\n {\n var reader = new FileReader();\n\n reader.onload = function ()\n {\n image.removeAttribute('crossOrigin');\n image.src = 'data:' + (blob.type || defaultType) + ';base64,' + reader.result.split(',')[1];\n };\n\n reader.onerror = image.onerror;\n\n reader.readAsDataURL(blob);\n }\n};\n\n/**\n * Static method for releasing an existing object URL which was previously created\n * by calling {@link File#createObjectURL} method.\n *\n * @method Phaser.Loader.File.revokeObjectURL\n * @static\n * @since 3.7.0\n *\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be revoked.\n */\nFile.revokeObjectURL = function (image)\n{\n if (typeof URL === 'function')\n {\n URL.revokeObjectURL(image.src);\n }\n};\n\nmodule.exports = File;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar types = {};\r\n\r\n/**\r\n * @namespace Phaser.Loader.FileTypesManager\r\n */\r\n\r\nvar FileTypesManager = {\r\n\r\n /**\r\n * Static method called when a LoaderPlugin is created.\r\n * \r\n * Loops through the local types object and injects all of them as\r\n * properties into the LoaderPlugin instance.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.install\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - The LoaderPlugin to install the types into.\r\n */\r\n install: function (loader)\r\n {\r\n for (var key in types)\r\n {\r\n loader[key] = types[key];\r\n }\r\n },\r\n\r\n /**\r\n * Static method called directly by the File Types.\r\n * \r\n * The key is a reference to the function used to load the files via the Loader, i.e. `image`.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.register\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key that will be used as the method name in the LoaderPlugin.\r\n * @param {function} factoryFunction - The function that will be called when LoaderPlugin.key is invoked.\r\n */\r\n register: function (key, factoryFunction)\r\n {\r\n types[key] = factoryFunction;\r\n },\r\n\r\n /**\r\n * Removed all associated file types.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n types = {};\r\n }\r\n\r\n};\r\n\r\nmodule.exports = FileTypesManager;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Given a File and a baseURL value this returns the URL the File will use to download from.\r\n *\r\n * @function Phaser.Loader.GetURL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File object.\r\n * @param {string} baseURL - A default base URL.\r\n *\r\n * @return {string} The URL the File will use.\r\n */\r\nvar GetURL = function (file, baseURL)\r\n{\r\n if (!file.url)\r\n {\r\n return false;\r\n }\r\n\r\n if (file.url.match(/^(?:blob:|data:|http:\\/\\/|https:\\/\\/|\\/\\/)/))\r\n {\r\n return file.url;\r\n }\r\n else\r\n {\r\n return baseURL + file.url;\r\n }\r\n};\r\n\r\nmodule.exports = GetURL;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extend = require('../utils/object/Extend');\r\nvar XHRSettings = require('./XHRSettings');\r\n\r\n/**\r\n * Takes two XHRSettings Objects and creates a new XHRSettings object from them.\r\n *\r\n * The new object is seeded by the values given in the global settings, but any setting in\r\n * the local object overrides the global ones.\r\n *\r\n * @function Phaser.Loader.MergeXHRSettings\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} global - The global XHRSettings object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} local - The local XHRSettings object.\r\n *\r\n * @return {Phaser.Types.Loader.XHRSettingsObject} A newly formed XHRSettings object.\r\n */\r\nvar MergeXHRSettings = function (global, local)\r\n{\r\n var output = (global === undefined) ? XHRSettings() : Extend({}, global);\r\n\r\n if (local)\r\n {\r\n for (var setting in local)\r\n {\r\n if (local[setting] !== undefined)\r\n {\r\n output[setting] = local[setting];\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = MergeXHRSettings;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A MultiFile is a special kind of parent that contains two, or more, Files as children and looks after\r\n * the loading and processing of them all. It is commonly extended and used as a base class for file types such as AtlasJSON or BitmapFont.\r\n * \r\n * You shouldn't create an instance of a MultiFile directly, but should extend it with your own class, setting a custom type and processing methods.\r\n *\r\n * @class MultiFile\r\n * @memberof Phaser.Loader\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\r\n * @param {string} type - The file type string for sorting within the Loader.\r\n * @param {string} key - The key of the file within the loader.\r\n * @param {Phaser.Loader.File[]} files - An array of Files that make-up this MultiFile.\r\n */\r\nvar MultiFile = new Class({\r\n\r\n initialize:\r\n\r\n function MultiFile (loader, type, key, files)\r\n {\r\n /**\r\n * A reference to the Loader that is going to load this file.\r\n *\r\n * @name Phaser.Loader.MultiFile#loader\r\n * @type {Phaser.Loader.LoaderPlugin}\r\n * @since 3.7.0\r\n */\r\n this.loader = loader;\r\n\r\n /**\r\n * The file type string for sorting within the Loader.\r\n *\r\n * @name Phaser.Loader.MultiFile#type\r\n * @type {string}\r\n * @since 3.7.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * Unique cache key (unique within its file type)\r\n *\r\n * @name Phaser.Loader.MultiFile#key\r\n * @type {string}\r\n * @since 3.7.0\r\n */\r\n this.key = key;\r\n\r\n /**\r\n * The current index being used by multi-file loaders to avoid key clashes.\r\n *\r\n * @name Phaser.Loader.MultiFile#multiKeyIndex\r\n * @type {integer}\r\n * @private\r\n * @since 3.20.0\r\n */\r\n this.multiKeyIndex = loader.multiKeyIndex++;\r\n\r\n /**\r\n * Array of files that make up this MultiFile.\r\n *\r\n * @name Phaser.Loader.MultiFile#files\r\n * @type {Phaser.Loader.File[]}\r\n * @since 3.7.0\r\n */\r\n this.files = files;\r\n\r\n /**\r\n * The completion status of this MultiFile.\r\n *\r\n * @name Phaser.Loader.MultiFile#complete\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.7.0\r\n */\r\n this.complete = false;\r\n\r\n /**\r\n * The number of files to load.\r\n *\r\n * @name Phaser.Loader.MultiFile#pending\r\n * @type {integer}\r\n * @since 3.7.0\r\n */\r\n\r\n this.pending = files.length;\r\n\r\n /**\r\n * The number of files that failed to load.\r\n *\r\n * @name Phaser.Loader.MultiFile#failed\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.7.0\r\n */\r\n this.failed = 0;\r\n\r\n /**\r\n * A storage container for transient data that the loading files need.\r\n *\r\n * @name Phaser.Loader.MultiFile#config\r\n * @type {any}\r\n * @since 3.7.0\r\n */\r\n this.config = {};\r\n\r\n /**\r\n * A reference to the Loaders baseURL at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#baseURL\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.baseURL = loader.baseURL;\r\n\r\n /**\r\n * A reference to the Loaders path at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#path\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.path = loader.path;\r\n\r\n /**\r\n * A reference to the Loaders prefix at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#prefix\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.prefix = loader.prefix;\r\n\r\n // Link the files\r\n for (var i = 0; i < files.length; i++)\r\n {\r\n files[i].multiFile = this;\r\n }\r\n },\r\n\r\n /**\r\n * Checks if this MultiFile is ready to process its children or not.\r\n *\r\n * @method Phaser.Loader.MultiFile#isReadyToProcess\r\n * @since 3.7.0\r\n *\r\n * @return {boolean} `true` if all children of this MultiFile have loaded, otherwise `false`.\r\n */\r\n isReadyToProcess: function ()\r\n {\r\n return (this.pending === 0 && this.failed === 0 && !this.complete);\r\n },\r\n\r\n /**\r\n * Adds another child to this MultiFile, increases the pending count and resets the completion status.\r\n *\r\n * @method Phaser.Loader.MultiFile#addToMultiFile\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} files - The File to add to this MultiFile.\r\n *\r\n * @return {Phaser.Loader.MultiFile} This MultiFile instance.\r\n */\r\n addToMultiFile: function (file)\r\n {\r\n this.files.push(file);\r\n\r\n file.multiFile = this;\r\n\r\n this.pending++;\r\n\r\n this.complete = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Called by each File when it finishes loading.\r\n *\r\n * @method Phaser.Loader.MultiFile#onFileComplete\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has completed processing.\r\n */\r\n onFileComplete: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.pending--;\r\n }\r\n },\r\n\r\n /**\r\n * Called by each File that fails to load.\r\n *\r\n * @method Phaser.Loader.MultiFile#onFileFailed\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has failed to load.\r\n */\r\n onFileFailed: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.failed++;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MultiFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MergeXHRSettings = require('./MergeXHRSettings');\r\n\r\n/**\r\n * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings\r\n * and starts the download of it. It uses the Files own XHRSettings and merges them\r\n * with the global XHRSettings object to set the xhr values before download.\r\n *\r\n * @function Phaser.Loader.XHRLoader\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File to download.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} globalXHRSettings - The global XHRSettings object.\r\n *\r\n * @return {XMLHttpRequest} The XHR object.\r\n */\r\nvar XHRLoader = function (file, globalXHRSettings)\r\n{\r\n var config = MergeXHRSettings(globalXHRSettings, file.xhrSettings);\r\n\r\n var xhr = new XMLHttpRequest();\r\n\r\n xhr.open('GET', file.src, config.async, config.user, config.password);\r\n\r\n xhr.responseType = file.xhrSettings.responseType;\r\n xhr.timeout = config.timeout;\r\n\r\n if (config.headers)\r\n {\r\n for (var key in config.headers)\r\n {\r\n xhr.setRequestHeader(key, config.headers[key]);\r\n }\r\n }\r\n\r\n if (config.header && config.headerValue)\r\n {\r\n xhr.setRequestHeader(config.header, config.headerValue);\r\n }\r\n\r\n if (config.requestedWith)\r\n {\r\n xhr.setRequestHeader('X-Requested-With', config.requestedWith);\r\n }\r\n\r\n if (config.overrideMimeType)\r\n {\r\n xhr.overrideMimeType(config.overrideMimeType);\r\n }\r\n\r\n if (config.withCredentials)\r\n {\r\n xhr.withCredentials = true;\r\n }\r\n\r\n // After a successful request, the xhr.response property will contain the requested data as a DOMString, ArrayBuffer, Blob, or Document (depending on what was set for responseType.)\r\n\r\n xhr.onload = file.onLoad.bind(file, xhr);\r\n xhr.onerror = file.onError.bind(file, xhr);\r\n xhr.onprogress = file.onProgress.bind(file);\r\n\r\n // This is the only standard method, the ones above are browser additions (maybe not universal?)\r\n // xhr.onreadystatechange\r\n\r\n xhr.send();\r\n\r\n return xhr;\r\n};\r\n\r\nmodule.exports = XHRLoader;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Creates an XHRSettings Object with default values.\r\n *\r\n * @function Phaser.Loader.XHRSettings\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequestResponseType} [responseType=''] - The responseType, such as 'text'.\r\n * @param {boolean} [async=true] - Should the XHR request use async or not?\r\n * @param {string} [user=''] - Optional username for the XHR request.\r\n * @param {string} [password=''] - Optional password for the XHR request.\r\n * @param {integer} [timeout=0] - Optional XHR timeout value.\r\n * @param {boolean} [withCredentials=false] - Optional XHR withCredentials value.\r\n *\r\n * @return {Phaser.Types.Loader.XHRSettingsObject} The XHRSettings object as used by the Loader.\r\n */\r\nvar XHRSettings = function (responseType, async, user, password, timeout, withCredentials)\r\n{\r\n if (responseType === undefined) { responseType = ''; }\r\n if (async === undefined) { async = true; }\r\n if (user === undefined) { user = ''; }\r\n if (password === undefined) { password = ''; }\r\n if (timeout === undefined) { timeout = 0; }\r\n if (withCredentials === undefined) { withCredentials = false; }\r\n\r\n // Before sending a request, set the xhr.responseType to \"text\",\r\n // \"arraybuffer\", \"blob\", or \"document\", depending on your data needs.\r\n // Note, setting xhr.responseType = '' (or omitting) will default the response to \"text\".\r\n\r\n return {\r\n\r\n // Ignored by the Loader, only used by File.\r\n responseType: responseType,\r\n\r\n async: async,\r\n\r\n // credentials\r\n user: user,\r\n password: password,\r\n\r\n // timeout in ms (0 = no timeout)\r\n timeout: timeout,\r\n\r\n // setRequestHeader\r\n headers: undefined,\r\n header: undefined,\r\n headerValue: undefined,\r\n requestedWith: false,\r\n\r\n // overrideMimeType\r\n overrideMimeType: undefined,\r\n\r\n // withCredentials\r\n withCredentials: withCredentials\r\n\r\n };\r\n};\r\n\r\nmodule.exports = XHRSettings;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FILE_CONST = {\r\n\r\n /**\r\n * The Loader is idle.\r\n * \r\n * @name Phaser.Loader.LOADER_IDLE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_IDLE: 0,\r\n\r\n /**\r\n * The Loader is actively loading.\r\n * \r\n * @name Phaser.Loader.LOADER_LOADING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_LOADING: 1,\r\n\r\n /**\r\n * The Loader is processing files is has loaded.\r\n * \r\n * @name Phaser.Loader.LOADER_PROCESSING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_PROCESSING: 2,\r\n\r\n /**\r\n * The Loader has completed loading and processing.\r\n * \r\n * @name Phaser.Loader.LOADER_COMPLETE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_COMPLETE: 3,\r\n\r\n /**\r\n * The Loader is shutting down.\r\n * \r\n * @name Phaser.Loader.LOADER_SHUTDOWN\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_SHUTDOWN: 4,\r\n\r\n /**\r\n * The Loader has been destroyed.\r\n * \r\n * @name Phaser.Loader.LOADER_DESTROYED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_DESTROYED: 5,\r\n\r\n /**\r\n * File is in the load queue but not yet started\r\n * \r\n * @name Phaser.Loader.FILE_PENDING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_PENDING: 10,\r\n\r\n /**\r\n * File has been started to load by the loader (onLoad called)\r\n * \r\n * @name Phaser.Loader.FILE_LOADING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_LOADING: 11,\r\n\r\n /**\r\n * File has loaded successfully, awaiting processing \r\n * \r\n * @name Phaser.Loader.FILE_LOADED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_LOADED: 12,\r\n\r\n /**\r\n * File failed to load\r\n * \r\n * @name Phaser.Loader.FILE_FAILED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_FAILED: 13,\r\n\r\n /**\r\n * File is being processed (onProcess callback)\r\n * \r\n * @name Phaser.Loader.FILE_PROCESSING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_PROCESSING: 14,\r\n\r\n /**\r\n * The File has errored somehow during processing.\r\n * \r\n * @name Phaser.Loader.FILE_ERRORED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_ERRORED: 16,\r\n\r\n /**\r\n * File has finished processing.\r\n * \r\n * @name Phaser.Loader.FILE_COMPLETE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_COMPLETE: 17,\r\n\r\n /**\r\n * File has been destroyed\r\n * \r\n * @name Phaser.Loader.FILE_DESTROYED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_DESTROYED: 18,\r\n\r\n /**\r\n * File was populated from local data and doesn't need an HTTP request\r\n * \r\n * @name Phaser.Loader.FILE_POPULATED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_POPULATED: 19\r\n\r\n};\r\n\r\nmodule.exports = FILE_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Add File Event.\r\n * \r\n * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('addfile', listener)`.\r\n * \r\n * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them.\r\n *\r\n * @event Phaser.Loader.Events#ADD\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The unique key of the file that was added to the Loader.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} string of the file that was added to the Loader, i.e. `image`.\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n * @param {Phaser.Loader.File} file - A reference to the File which was added to the Loader.\r\n */\r\nmodule.exports = 'addfile';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Complete Event.\r\n * \r\n * This event is dispatched when the Loader has fully processed everything in the load queue.\r\n * By this point every loaded file will now be in its associated cache and ready for use.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('complete', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#COMPLETE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n * @param {integer} totalComplete - The total number of files that successfully loaded.\r\n * @param {integer} totalFailed - The total number of files that failed to load.\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Complete Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`.\r\n * \r\n * You can also listen for the completion of a specific file. See the [FILE_KEY_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_KEY_COMPLETE} event.\r\n *\r\n * @event Phaser.Loader.Events#FILE_COMPLETE\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the file that just loaded and finished processing.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\r\n * @param {any} data - The raw data the file contained.\r\n */\r\nmodule.exports = 'filecomplete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Complete Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.\r\n * \r\n * It uses a special dynamic event name constructed from the key and type of the file.\r\n * \r\n * For example, if you have loaded an `image` with a key of `monster`, you can listen for it\r\n * using the following:\r\n *\r\n * ```javascript\r\n * this.load.on('filecomplete-image-monster', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n *\r\n * Or, if you have loaded a texture `atlas` with a key of `Level1`:\r\n * \r\n * ```javascript\r\n * this.load.on('filecomplete-atlas-Level1', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n * \r\n * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`:\r\n * \r\n * ```javascript\r\n * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n * \r\n * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event.\r\n *\r\n * @event Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the file that just loaded and finished processing.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\r\n * @param {any} data - The raw data the file contained.\r\n */\r\nmodule.exports = 'filecomplete-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Error Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when a file fails to load.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('loaderror', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_LOAD_ERROR\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\r\n */\r\nmodule.exports = 'loaderror';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when a file finishes loading,\r\n * but _before_ it is processed and added to the internal Phaser caches.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('load', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_LOAD\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.File} file - A reference to the File which just finished loading.\r\n */\r\nmodule.exports = 'load';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Progress Event.\r\n * \r\n * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and\r\n * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_PROGRESS\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\r\n * @param {number} percentComplete - A value between 0 and 1 indicating how 'complete' this file is.\r\n */\r\nmodule.exports = 'fileprogress';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Post Process Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue.\r\n * It is dispatched before the internal lists are cleared and each File is destroyed.\r\n * \r\n * Use this hook to perform any last minute processing of files that can only happen once the\r\n * Loader has completed, but prior to it emitting the `complete` event.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('postprocess', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#POST_PROCESS\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n */\r\nmodule.exports = 'postprocess';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Progress Event.\r\n * \r\n * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('progress', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#PROGRESS\r\n * @since 3.0.0\r\n * \r\n * @param {number} progress - The current progress of the load. A value between 0 and 1.\r\n */\r\nmodule.exports = 'progress';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Start Event.\r\n * \r\n * This event is dispatched when the Loader starts running. At this point load progress is zero.\r\n * \r\n * This event is dispatched even if there aren't any files in the load queue.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('start', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#START\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Loader.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADD: require('./ADD_EVENT'),\r\n COMPLETE: require('./COMPLETE_EVENT'),\r\n FILE_COMPLETE: require('./FILE_COMPLETE_EVENT'),\r\n FILE_KEY_COMPLETE: require('./FILE_KEY_COMPLETE_EVENT'),\r\n FILE_LOAD_ERROR: require('./FILE_LOAD_ERROR_EVENT'),\r\n FILE_LOAD: require('./FILE_LOAD_EVENT'),\r\n FILE_PROGRESS: require('./FILE_PROGRESS_EVENT'),\r\n POST_PROCESS: require('./POST_PROCESS_EVENT'),\r\n PROGRESS: require('./PROGRESS_EVENT'),\r\n START: require('./START_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\n\r\n/**\r\n * @classdesc\r\n * A single Image File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#image method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#image.\r\n *\r\n * @class ImageFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. Only provided for, and used by, Sprite Sheets.\r\n */\r\nvar ImageFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function ImageFile (loader, key, url, xhrSettings, frameConfig)\r\n {\r\n var extension = 'png';\r\n var normalMapURL;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n normalMapURL = GetFastValue(config, 'normalMap');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n frameConfig = GetFastValue(config, 'frameConfig');\r\n }\r\n\r\n if (Array.isArray(url))\r\n {\r\n normalMapURL = url[1];\r\n url = url[0];\r\n }\r\n\r\n var fileConfig = {\r\n type: 'image',\r\n cache: loader.textureManager,\r\n extension: extension,\r\n responseType: 'blob',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: frameConfig\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n // Do we have a normal map to load as well?\r\n if (normalMapURL)\r\n {\r\n var normalMap = new ImageFile(loader, this.key, normalMapURL, xhrSettings, frameConfig);\r\n\r\n normalMap.type = 'normalMap';\r\n\r\n this.setLink(normalMap);\r\n\r\n loader.addFile(normalMap);\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = new Image();\r\n\r\n this.data.crossOrigin = this.crossOrigin;\r\n\r\n var _this = this;\r\n\r\n this.data.onload = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessComplete();\r\n };\r\n\r\n this.data.onerror = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessError();\r\n };\r\n\r\n File.createObjectURL(this.data, this.xhrLoader.response, 'image/png');\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n var texture;\r\n var linkFile = this.linkFile;\r\n\r\n if (linkFile && linkFile.state === CONST.FILE_COMPLETE)\r\n {\r\n if (this.type === 'image')\r\n {\r\n texture = this.cache.addImage(this.key, this.data, linkFile.data);\r\n }\r\n else\r\n {\r\n texture = this.cache.addImage(linkFile.key, linkFile.data, this.data);\r\n }\r\n\r\n this.pendingDestroy(texture);\r\n\r\n linkFile.pendingDestroy(texture);\r\n }\r\n else if (!linkFile)\r\n {\r\n texture = this.cache.addImage(this.key, this.data);\r\n\r\n this.pendingDestroy(texture);\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an Image, or array of Images, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.image('logo', 'images/phaserLogo.png');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\r\n * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback\r\n * of animated gifs to Canvas elements.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.image({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.ImageFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:\r\n *\r\n * ```javascript\r\n * this.load.image('logo', 'images/AtariLogo.png');\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'logo');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\r\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\r\n *\r\n * ```javascript\r\n * this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]);\r\n * ```\r\n *\r\n * Or, if you are using a config object use the `normalMap` property:\r\n *\r\n * ```javascript\r\n * this.load.image({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png',\r\n * normalMap: 'images/AtariLogo-n.png'\r\n * });\r\n * ```\r\n *\r\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\r\n * Normal maps are a WebGL only feature.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Image File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#image\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig|Phaser.Types.Loader.FileTypes.ImageFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {this} The Loader instance.\r\n */\r\nFileTypesManager.register('image', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new ImageFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new ImageFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = ImageFile;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar CONST = require('../const');\nvar File = require('../File');\nvar FileTypesManager = require('../FileTypesManager');\nvar GetFastValue = require('../../utils/object/GetFastValue');\nvar GetValue = require('../../utils/object/GetValue');\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\n\n/**\n * @classdesc\n * A single JSON File suitable for loading by the Loader.\n *\n * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly.\n *\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json.\n *\n * @class JSONFile\n * @extends Phaser.Loader.File\n * @memberof Phaser.Loader.FileTypes\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object.\n * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\n */\nvar JSONFile = new Class({\n\n Extends: File,\n\n initialize:\n\n // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object\n // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing\n\n function JSONFile (loader, key, url, xhrSettings, dataKey)\n {\n var extension = 'json';\n\n if (IsPlainObject(key))\n {\n var config = key;\n\n key = GetFastValue(config, 'key');\n url = GetFastValue(config, 'url');\n xhrSettings = GetFastValue(config, 'xhrSettings');\n extension = GetFastValue(config, 'extension', extension);\n dataKey = GetFastValue(config, 'dataKey', dataKey);\n }\n\n var fileConfig = {\n type: 'json',\n cache: loader.cacheManager.json,\n extension: extension,\n responseType: 'text',\n key: key,\n url: url,\n xhrSettings: xhrSettings,\n config: dataKey\n };\n\n File.call(this, loader, fileConfig);\n\n if (IsPlainObject(url))\n {\n // Object provided instead of a URL, so no need to actually load it (populate data with value)\n if (dataKey)\n {\n this.data = GetValue(url, dataKey);\n }\n else\n {\n this.data = url;\n }\n\n this.state = CONST.FILE_POPULATED;\n }\n },\n\n /**\n * Called automatically by Loader.nextFile.\n * This method controls what extra work this File does with its loaded data.\n *\n * @method Phaser.Loader.FileTypes.JSONFile#onProcess\n * @since 3.7.0\n */\n onProcess: function ()\n {\n if (this.state !== CONST.FILE_POPULATED)\n {\n this.state = CONST.FILE_PROCESSING;\n\n var json = JSON.parse(this.xhrLoader.responseText);\n\n var key = this.config;\n\n if (typeof key === 'string')\n {\n this.data = GetValue(json, key, json);\n }\n else\n {\n this.data = json;\n }\n }\n\n this.onProcessComplete();\n }\n\n});\n\n/**\n * Adds a JSON file, or array of JSON files, to the current load queue.\n *\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\n *\n * ```javascript\n * function preload ()\n * {\n * this.load.json('wavedata', 'files/AlienWaveData.json');\n * }\n * ```\n *\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\n * loaded.\n *\n * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.\n * The key should be unique both in terms of files being loaded and files already present in the JSON Cache.\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\n * then remove it from the JSON Cache first, before loading a new one.\n *\n * Instead of passing arguments you can pass a configuration object, such as:\n *\n * ```javascript\n * this.load.json({\n * key: 'wavedata',\n * url: 'files/AlienWaveData.json'\n * });\n * ```\n *\n * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details.\n *\n * Once the file has finished loading you can access it from its Cache using its key:\n *\n * ```javascript\n * this.load.json('wavedata', 'files/AlienWaveData.json');\n * // and later in your game ...\n * var data = this.cache.json.get('wavedata');\n * ```\n *\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\n * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and\n * this is what you would use to retrieve the text from the JSON Cache.\n *\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\n *\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"data\"\n * and no URL is given then the Loader will set the URL to be \"data.json\". It will always add `.json` as the extension, although\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\n *\n * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache,\n * rather than the whole file. For example, if your JSON data had a structure like this:\n *\n * ```json\n * {\n * \"level1\": {\n * \"baddies\": {\n * \"aliens\": {},\n * \"boss\": {}\n * }\n * },\n * \"level2\": {},\n * \"level3\": {}\n * }\n * ```\n *\n * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`.\n *\n * Note: The ability to load this type of file will only be available if the JSON File type has been built into Phaser.\n * It is available in the default build but can be excluded from custom builds.\n *\n * @method Phaser.Loader.LoaderPlugin#json\n * @fires Phaser.Loader.LoaderPlugin#ADD\n * @since 3.0.0\n *\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\n * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\n *\n * @return {this} The Loader instance.\n */\nFileTypesManager.register('json', function (key, url, dataKey, xhrSettings)\n{\n if (Array.isArray(key))\n {\n for (var i = 0; i < key.length; i++)\n {\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\n this.addFile(new JSONFile(this, key[i]));\n }\n }\n else\n {\n this.addFile(new JSONFile(this, key, url, xhrSettings, dataKey));\n }\n\n return this;\n});\n\nmodule.exports = JSONFile;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\n\r\n/**\r\n * @classdesc\r\n * A single Text File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text.\r\n *\r\n * @class TextFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar TextFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function TextFile (loader, key, url, xhrSettings)\r\n {\r\n var extension = 'txt';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'text',\r\n cache: loader.cacheManager.text,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.TextFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = this.xhrLoader.responseText;\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Text file, or array of Text files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.text('story', 'files/IntroStory.txt');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Text Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Text Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Text Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.text({\r\n * key: 'story',\r\n * url: 'files/IntroStory.txt'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.TextFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.text('story', 'files/IntroStory.txt');\r\n * // and later in your game ...\r\n * var data = this.cache.text.get('story');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and\r\n * this is what you would use to retrieve the text from the Text Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"story\"\r\n * and no URL is given then the Loader will set the URL to be \"story.txt\". It will always add `.txt` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Text File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#text\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig|Phaser.Types.Loader.FileTypes.TextFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {this} The Loader instance.\r\n */\r\nFileTypesManager.register('text', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new TextFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new TextFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = TextFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the mean average of the given values.\r\n *\r\n * @function Phaser.Math.Average\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} values - The values to average.\r\n *\r\n * @return {number} The average value.\r\n */\r\nvar Average = function (values)\r\n{\r\n var sum = 0;\r\n\r\n for (var i = 0; i < values.length; i++)\r\n {\r\n sum += (+values[i]);\r\n }\r\n\r\n return sum / values.length;\r\n};\r\n\r\nmodule.exports = Average;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Factorial = require('./Factorial');\r\n\r\n/**\r\n * Calculates the Bernstein basis from the three factorial coefficients.\r\n *\r\n * @function Phaser.Math.Bernstein\r\n * @since 3.0.0\r\n *\r\n * @param {number} n - The first value.\r\n * @param {number} i - The second value.\r\n *\r\n * @return {number} The Bernstein basis of Factorial(n) / Factorial(i) / Factorial(n - i)\r\n */\r\nvar Bernstein = function (n, i)\r\n{\r\n return Factorial(n) / Factorial(i) / Factorial(n - i);\r\n};\r\n\r\nmodule.exports = Bernstein;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random integer between the `min` and `max` values, inclusive.\r\n *\r\n * @function Phaser.Math.Between\r\n * @since 3.0.0\r\n *\r\n * @param {integer} min - The minimum value.\r\n * @param {integer} max - The maximum value.\r\n *\r\n * @return {integer} The random integer.\r\n */\r\nvar Between = function (min, max)\r\n{\r\n return Math.floor(Math.random() * (max - min + 1) + min);\r\n};\r\n\r\nmodule.exports = Between;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates a Catmull-Rom value from the given points, based on an alpha of 0.5.\r\n *\r\n * @function Phaser.Math.CatmullRom\r\n * @since 3.0.0\r\n *\r\n * @param {number} t - The amount to interpolate by.\r\n * @param {number} p0 - The first control point.\r\n * @param {number} p1 - The second control point.\r\n * @param {number} p2 - The third control point.\r\n * @param {number} p3 - The fourth control point.\r\n *\r\n * @return {number} The Catmull-Rom value.\r\n */\r\nvar CatmullRom = function (t, p0, p1, p2, p3)\r\n{\r\n var v0 = (p2 - p0) * 0.5;\r\n var v1 = (p3 - p1) * 0.5;\r\n var t2 = t * t;\r\n var t3 = t * t2;\r\n\r\n return (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1;\r\n};\r\n\r\nmodule.exports = CatmullRom;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Ceils to some place comparative to a `base`, default is 10 for decimal place.\r\n *\r\n * The `place` is represented by the power applied to `base` to get that place.\r\n *\r\n * @function Phaser.Math.CeilTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {number} [place=0] - The place to round to.\r\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar CeilTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.ceil(value * p) / p;\r\n};\r\n\r\nmodule.exports = CeilTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Force a value within the boundaries by clamping it to the range `min`, `max`.\r\n *\r\n * @function Phaser.Math.Clamp\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to be clamped.\r\n * @param {number} min - The minimum bounds.\r\n * @param {number} max - The maximum bounds.\r\n *\r\n * @return {number} The clamped value.\r\n */\r\nvar Clamp = function (value, min, max)\r\n{\r\n return Math.max(min, Math.min(max, value));\r\n};\r\n\r\nmodule.exports = Clamp;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\n\r\n/**\r\n * Convert the given angle from degrees, to the equivalent angle in radians.\r\n *\r\n * @function Phaser.Math.DegToRad\r\n * @since 3.0.0\r\n *\r\n * @param {integer} degrees - The angle (in degrees) to convert to radians.\r\n *\r\n * @return {number} The given angle converted to radians.\r\n */\r\nvar DegToRad = function (degrees)\r\n{\r\n return degrees * CONST.DEG_TO_RAD;\r\n};\r\n\r\nmodule.exports = DegToRad;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the positive difference of two given numbers.\r\n *\r\n * @function Phaser.Math.Difference\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first number in the calculation.\r\n * @param {number} b - The second number in the calculation.\r\n *\r\n * @return {number} The positive difference of the two given numbers.\r\n */\r\nvar Difference = function (a, b)\r\n{\r\n return Math.abs(a - b);\r\n};\r\n\r\nmodule.exports = Difference;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the factorial of a given number for integer values greater than 0.\r\n *\r\n * @function Phaser.Math.Factorial\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - A positive integer to calculate the factorial of.\r\n *\r\n * @return {number} The factorial of the given number.\r\n */\r\nvar Factorial = function (value)\r\n{\r\n if (value === 0)\r\n {\r\n return 1;\r\n }\r\n\r\n var res = value;\r\n\r\n while (--value)\r\n {\r\n res *= value;\r\n }\r\n\r\n return res;\r\n};\r\n\r\nmodule.exports = Factorial;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive.\r\n *\r\n * @function Phaser.Math.FloatBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The lower bound for the float, inclusive.\r\n * @param {number} max - The upper bound for the float exclusive.\r\n *\r\n * @return {number} A random float within the given range.\r\n */\r\nvar FloatBetween = function (min, max)\r\n{\r\n return Math.random() * (max - min) + min;\r\n};\r\n\r\nmodule.exports = FloatBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Floors to some place comparative to a `base`, default is 10 for decimal place.\r\n *\r\n * The `place` is represented by the power applied to `base` to get that place.\r\n *\r\n * @function Phaser.Math.FloorTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {integer} [place=0] - The place to round to.\r\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar FloorTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.floor(value * p) / p;\r\n};\r\n\r\nmodule.exports = FloorTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('./Clamp');\r\n\r\n/**\r\n * Return a value based on the range between `min` and `max` and the percentage given.\r\n *\r\n * @function Phaser.Math.FromPercent\r\n * @since 3.0.0\r\n *\r\n * @param {number} percent - A value between 0 and 1 representing the percentage.\r\n * @param {number} min - The minimum value.\r\n * @param {number} [max] - The maximum value.\r\n *\r\n * @return {number} The value that is `percent` percent between `min` and `max`.\r\n */\r\nvar FromPercent = function (percent, min, max)\r\n{\r\n percent = Clamp(percent, 0, 1);\r\n\r\n return (max - min) * percent;\r\n};\r\n\r\nmodule.exports = FromPercent;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a per-ms speed from a distance and time (given in seconds).\r\n *\r\n * @function Phaser.Math.GetSpeed\r\n * @since 3.0.0\r\n *\r\n * @param {number} distance - The distance.\r\n * @param {integer} time - The time, in seconds.\r\n *\r\n * @return {number} The speed, in distance per ms.\r\n *\r\n * @example\r\n * // 400px over 1 second is 0.4 px/ms\r\n * Phaser.Math.GetSpeed(400, 1) // -> 0.4\r\n */\r\nvar GetSpeed = function (distance, time)\r\n{\r\n return (distance / time) / 1000;\r\n};\r\n\r\nmodule.exports = GetSpeed;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if a given value is an even number.\r\n *\r\n * @function Phaser.Math.IsEven\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to perform the check with.\r\n *\r\n * @return {boolean} Whether the number is even or not.\r\n */\r\nvar IsEven = function (value)\r\n{\r\n // Use abstract equality == for \"is number\" test\r\n\r\n // eslint-disable-next-line eqeqeq\r\n return (value == parseFloat(value)) ? !(value % 2) : void 0;\r\n};\r\n\r\nmodule.exports = IsEven;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if a given value is an even number using a strict type check.\r\n *\r\n * @function Phaser.Math.IsEvenStrict\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to perform the check with.\r\n *\r\n * @return {boolean} Whether the number is even or not.\r\n */\r\nvar IsEvenStrict = function (value)\r\n{\r\n // Use strict equality === for \"is number\" test\r\n return (value === parseFloat(value)) ? !(value % 2) : void 0;\r\n};\r\n\r\nmodule.exports = IsEvenStrict;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates a linear (interpolation) value over t.\r\n *\r\n * @function Phaser.Math.Linear\r\n * @since 3.0.0\r\n *\r\n * @param {number} p0 - The first point.\r\n * @param {number} p1 - The second point.\r\n * @param {number} t - The percentage between p0 and p1 to return, represented as a number between 0 and 1.\r\n *\r\n * @return {number} The step t% of the way between p0 and p1.\r\n */\r\nvar Linear = function (p0, p1, t)\r\n{\r\n return (p1 - p0) * t + p0;\r\n};\r\n\r\nmodule.exports = Linear;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A three-dimensional matrix.\r\n *\r\n * Defaults to the identity matrix when instantiated.\r\n *\r\n * @class Matrix3\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} [m] - Optional Matrix3 to copy values from.\r\n */\r\nvar Matrix3 = new Class({\r\n\r\n initialize:\r\n\r\n function Matrix3 (m)\r\n {\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.Math.Matrix3#val\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.val = new Float32Array(9);\r\n\r\n if (m)\r\n {\r\n // Assume Matrix3 with val:\r\n this.copy(m);\r\n }\r\n else\r\n {\r\n // Default to identity\r\n this.identity();\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Matrix3.\r\n *\r\n * @method Phaser.Math.Matrix3#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} A clone of this Matrix3.\r\n */\r\n clone: function ()\r\n {\r\n return new Matrix3(this);\r\n },\r\n\r\n /**\r\n * This method is an alias for `Matrix3.copy`.\r\n *\r\n * @method Phaser.Math.Matrix3#set\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to set the values of this Matrix's from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n set: function (src)\r\n {\r\n return this.copy(src);\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix into this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n copy: function (src)\r\n {\r\n var out = this.val;\r\n var a = src.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix4 into this Matrix3.\r\n *\r\n * @method Phaser.Math.Matrix3#fromMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromMat4: function (m)\r\n {\r\n var a = m.val;\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[4];\r\n out[4] = a[5];\r\n out[5] = a[6];\r\n out[6] = a[8];\r\n out[7] = a[9];\r\n out[8] = a[10];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given array.\r\n *\r\n * @method Phaser.Math.Matrix3#fromArray\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The array to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromArray: function (a)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n identity: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 1;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 1;\r\n out[5] = 0;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transpose this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#transpose\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n transpose: function ()\r\n {\r\n var a = this.val;\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a12 = a[5];\r\n\r\n a[1] = a[3];\r\n a[2] = a[6];\r\n a[3] = a01;\r\n a[5] = a[7];\r\n a[6] = a02;\r\n a[7] = a12;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n invert: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n var b01 = a22 * a11 - a12 * a21;\r\n var b11 = -a22 * a10 + a12 * a20;\r\n var b21 = a21 * a10 - a11 * a20;\r\n\r\n // Calculate the determinant\r\n var det = a00 * b01 + a01 * b11 + a02 * b21;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n a[0] = b01 * det;\r\n a[1] = (-a22 * a01 + a02 * a21) * det;\r\n a[2] = (a12 * a01 - a02 * a11) * det;\r\n a[3] = b11 * det;\r\n a[4] = (a22 * a00 - a02 * a20) * det;\r\n a[5] = (-a12 * a00 + a02 * a10) * det;\r\n a[6] = b21 * det;\r\n a[7] = (-a21 * a00 + a01 * a20) * det;\r\n a[8] = (a11 * a00 - a01 * a10) * det;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the adjoint, or adjugate, of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#adjoint\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n adjoint: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n a[0] = (a11 * a22 - a12 * a21);\r\n a[1] = (a02 * a21 - a01 * a22);\r\n a[2] = (a01 * a12 - a02 * a11);\r\n a[3] = (a12 * a20 - a10 * a22);\r\n a[4] = (a00 * a22 - a02 * a20);\r\n a[5] = (a02 * a10 - a00 * a12);\r\n a[6] = (a10 * a21 - a11 * a20);\r\n a[7] = (a01 * a20 - a00 * a21);\r\n a[8] = (a00 * a11 - a01 * a10);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the determinant of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#determinant\r\n * @since 3.0.0\r\n *\r\n * @return {number} The determinant of this Matrix.\r\n */\r\n determinant: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to multiply this Matrix by.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n multiply: function (src)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n var b = src.val;\r\n\r\n var b00 = b[0];\r\n var b01 = b[1];\r\n var b02 = b[2];\r\n var b10 = b[3];\r\n var b11 = b[4];\r\n var b12 = b[5];\r\n var b20 = b[6];\r\n var b21 = b[7];\r\n var b22 = b[8];\r\n\r\n a[0] = b00 * a00 + b01 * a10 + b02 * a20;\r\n a[1] = b00 * a01 + b01 * a11 + b02 * a21;\r\n a[2] = b00 * a02 + b01 * a12 + b02 * a22;\r\n\r\n a[3] = b10 * a00 + b11 * a10 + b12 * a20;\r\n a[4] = b10 * a01 + b11 * a11 + b12 * a21;\r\n a[5] = b10 * a02 + b11 * a12 + b12 * a22;\r\n\r\n a[6] = b20 * a00 + b21 * a10 + b22 * a20;\r\n a[7] = b20 * a01 + b21 * a11 + b22 * a21;\r\n a[8] = b20 * a02 + b21 * a12 + b22 * a22;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given Vector.\r\n *\r\n * @method Phaser.Math.Matrix3#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n translate: function (v)\r\n {\r\n var a = this.val;\r\n var x = v.x;\r\n var y = v.y;\r\n\r\n a[6] = x * a[0] + y * a[3] + a[6];\r\n a[7] = x * a[1] + y * a[4] + a[7];\r\n a[8] = x * a[2] + y * a[5] + a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a rotation transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n rotate: function (rad)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n a[0] = c * a00 + s * a10;\r\n a[1] = c * a01 + s * a11;\r\n a[2] = c * a02 + s * a12;\r\n\r\n a[3] = c * a10 - s * a00;\r\n a[4] = c * a11 - s * a01;\r\n a[5] = c * a12 - s * a02;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * Uses the `x` and `y` components of the given Vector to scale the Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#scale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n scale: function (v)\r\n {\r\n var a = this.val;\r\n var x = v.x;\r\n var y = v.y;\r\n\r\n a[0] = x * a[0];\r\n a[1] = x * a[1];\r\n a[2] = x * a[2];\r\n\r\n a[3] = y * a[3];\r\n a[4] = y * a[4];\r\n a[5] = y * a[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given Quaternion.\r\n *\r\n * @method Phaser.Math.Matrix3#fromQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromQuat: function (q)\r\n {\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n var out = this.val;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[3] = xy + wz;\r\n out[6] = xz - wy;\r\n\r\n out[1] = xy - wz;\r\n out[4] = 1 - (xx + zz);\r\n out[7] = yz + wx;\r\n\r\n out[2] = xz + wy;\r\n out[5] = yz - wx;\r\n out[8] = 1 - (xx + yy);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix3 to be normalized from the given Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix3#normalFromMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to normalize the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n normalFromMat4: function (m)\r\n {\r\n var a = m.val;\r\n var out = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\r\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\r\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\r\n\r\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\r\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\r\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\r\n\r\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\r\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\r\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Matrix3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\nvar EPSILON = 0.000001;\r\n\r\n/**\r\n * @classdesc\r\n * A four-dimensional matrix.\r\n *\r\n * @class Matrix4\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} [m] - Optional Matrix4 to copy values from.\r\n */\r\nvar Matrix4 = new Class({\r\n\r\n initialize:\r\n\r\n function Matrix4 (m)\r\n {\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.Math.Matrix4#val\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.val = new Float32Array(16);\r\n\r\n if (m)\r\n {\r\n // Assume Matrix4 with val:\r\n this.copy(m);\r\n }\r\n else\r\n {\r\n // Default to identity\r\n this.identity();\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} A clone of this Matrix4.\r\n */\r\n clone: function ()\r\n {\r\n return new Matrix4(this);\r\n },\r\n\r\n // TODO - Should work with basic values\r\n\r\n /**\r\n * This method is an alias for `Matrix4.copy`.\r\n *\r\n * @method Phaser.Math.Matrix4#set\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to set the values of this Matrix's from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n set: function (src)\r\n {\r\n return this.copy(src);\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix into this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n copy: function (src)\r\n {\r\n var out = this.val;\r\n var a = src.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n out[9] = a[9];\r\n out[10] = a[10];\r\n out[11] = a[11];\r\n out[12] = a[12];\r\n out[13] = a[13];\r\n out[14] = a[14];\r\n out[15] = a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given array.\r\n *\r\n * @method Phaser.Math.Matrix4#fromArray\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The array to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n fromArray: function (a)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n out[9] = a[9];\r\n out[10] = a[10];\r\n out[11] = a[11];\r\n out[12] = a[12];\r\n out[13] = a[13];\r\n out[14] = a[14];\r\n out[15] = a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix.\r\n *\r\n * Sets all values to `0`.\r\n *\r\n * @method Phaser.Math.Matrix4#zero\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n zero: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 0;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 0;\r\n out[5] = 0;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = 0;\r\n out[11] = 0;\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = 0;\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x`, `y` and `z` values of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#xyz\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {number} z - The z value.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n xyz: function (x, y, z)\r\n {\r\n this.identity();\r\n\r\n var out = this.val;\r\n\r\n out[12] = x;\r\n out[13] = y;\r\n out[14] = z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the scaling values of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scaling\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x scaling value.\r\n * @param {number} y - The y scaling value.\r\n * @param {number} z - The z scaling value.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n scaling: function (x, y, z)\r\n {\r\n this.zero();\r\n\r\n var out = this.val;\r\n\r\n out[0] = x;\r\n out[5] = y;\r\n out[10] = z;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n identity: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 1;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 0;\r\n out[5] = 1;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = 1;\r\n out[11] = 0;\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = 0;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transpose this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#transpose\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n transpose: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n var a23 = a[11];\r\n\r\n a[1] = a[4];\r\n a[2] = a[8];\r\n a[3] = a[12];\r\n a[4] = a01;\r\n a[6] = a[9];\r\n a[7] = a[13];\r\n a[8] = a02;\r\n a[9] = a12;\r\n a[11] = a[14];\r\n a[12] = a03;\r\n a[13] = a13;\r\n a[14] = a23;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n invert: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n a[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\r\n a[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\r\n a[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\r\n a[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\r\n a[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\r\n a[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\r\n a[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\r\n a[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\r\n a[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\r\n a[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\r\n a[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\r\n a[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\r\n a[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\r\n a[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\r\n a[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\r\n a[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the adjoint, or adjugate, of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#adjoint\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n adjoint: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n a[0] = (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22));\r\n a[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));\r\n a[2] = (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12));\r\n a[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));\r\n a[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));\r\n a[5] = (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22));\r\n a[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));\r\n a[7] = (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12));\r\n a[8] = (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21));\r\n a[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));\r\n a[10] = (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11));\r\n a[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));\r\n a[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));\r\n a[13] = (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21));\r\n a[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));\r\n a[15] = (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the determinant of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#determinant\r\n * @since 3.0.0\r\n *\r\n * @return {number} The determinant of this Matrix.\r\n */\r\n determinant: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to multiply this Matrix by.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n multiply: function (src)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b = src.val;\r\n\r\n // Cache only the current line of the second matrix\r\n var b0 = b[0];\r\n var b1 = b[1];\r\n var b2 = b[2];\r\n var b3 = b[3];\r\n\r\n a[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[4];\r\n b1 = b[5];\r\n b2 = b[6];\r\n b3 = b[7];\r\n\r\n a[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[8];\r\n b1 = b[9];\r\n b2 = b[10];\r\n b3 = b[11];\r\n\r\n a[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[12];\r\n b1 = b[13];\r\n b2 = b[14];\r\n b3 = b[15];\r\n\r\n a[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply the values of this Matrix4 by those given in the `src` argument.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyLocal\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The source Matrix4 that this Matrix4 is multiplied by.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n multiplyLocal: function (src)\r\n {\r\n var a = [];\r\n var m1 = this.val;\r\n var m2 = src.val;\r\n\r\n a[0] = m1[0] * m2[0] + m1[1] * m2[4] + m1[2] * m2[8] + m1[3] * m2[12];\r\n a[1] = m1[0] * m2[1] + m1[1] * m2[5] + m1[2] * m2[9] + m1[3] * m2[13];\r\n a[2] = m1[0] * m2[2] + m1[1] * m2[6] + m1[2] * m2[10] + m1[3] * m2[14];\r\n a[3] = m1[0] * m2[3] + m1[1] * m2[7] + m1[2] * m2[11] + m1[3] * m2[15];\r\n\r\n a[4] = m1[4] * m2[0] + m1[5] * m2[4] + m1[6] * m2[8] + m1[7] * m2[12];\r\n a[5] = m1[4] * m2[1] + m1[5] * m2[5] + m1[6] * m2[9] + m1[7] * m2[13];\r\n a[6] = m1[4] * m2[2] + m1[5] * m2[6] + m1[6] * m2[10] + m1[7] * m2[14];\r\n a[7] = m1[4] * m2[3] + m1[5] * m2[7] + m1[6] * m2[11] + m1[7] * m2[15];\r\n\r\n a[8] = m1[8] * m2[0] + m1[9] * m2[4] + m1[10] * m2[8] + m1[11] * m2[12];\r\n a[9] = m1[8] * m2[1] + m1[9] * m2[5] + m1[10] * m2[9] + m1[11] * m2[13];\r\n a[10] = m1[8] * m2[2] + m1[9] * m2[6] + m1[10] * m2[10] + m1[11] * m2[14];\r\n a[11] = m1[8] * m2[3] + m1[9] * m2[7] + m1[10] * m2[11] + m1[11] * m2[15];\r\n\r\n a[12] = m1[12] * m2[0] + m1[13] * m2[4] + m1[14] * m2[8] + m1[15] * m2[12];\r\n a[13] = m1[12] * m2[1] + m1[13] * m2[5] + m1[14] * m2[9] + m1[15] * m2[13];\r\n a[14] = m1[12] * m2[2] + m1[13] * m2[6] + m1[14] * m2[10] + m1[15] * m2[14];\r\n a[15] = m1[12] * m2[3] + m1[13] * m2[7] + m1[14] * m2[11] + m1[15] * m2[15];\r\n\r\n return this.fromArray(a);\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given Vector.\r\n *\r\n * @method Phaser.Math.Matrix4#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n translate: function (v)\r\n {\r\n var x = v.x;\r\n var y = v.y;\r\n var z = v.z;\r\n var a = this.val;\r\n\r\n a[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\r\n a[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\r\n a[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\r\n a[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given values.\r\n *\r\n * @method Phaser.Math.Matrix4#translateXYZ\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n translateXYZ: function (x, y, z)\r\n {\r\n var a = this.val;\r\n\r\n a[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\r\n a[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\r\n a[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\r\n a[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * Uses the `x`, `y` and `z` components of the given Vector to scale the Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n scale: function (v)\r\n {\r\n var x = v.x;\r\n var y = v.y;\r\n var z = v.z;\r\n var a = this.val;\r\n\r\n a[0] = a[0] * x;\r\n a[1] = a[1] * x;\r\n a[2] = a[2] * x;\r\n a[3] = a[3] * x;\r\n\r\n a[4] = a[4] * y;\r\n a[5] = a[5] * y;\r\n a[6] = a[6] * y;\r\n a[7] = a[7] * y;\r\n\r\n a[8] = a[8] * z;\r\n a[9] = a[9] * z;\r\n a[10] = a[10] * z;\r\n a[11] = a[11] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scaleXYZ\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n scaleXYZ: function (x, y, z)\r\n {\r\n var a = this.val;\r\n\r\n a[0] = a[0] * x;\r\n a[1] = a[1] * x;\r\n a[2] = a[2] * x;\r\n a[3] = a[3] * x;\r\n\r\n a[4] = a[4] * y;\r\n a[5] = a[5] * y;\r\n a[6] = a[6] * y;\r\n a[7] = a[7] * y;\r\n\r\n a[8] = a[8] * z;\r\n a[9] = a[9] * z;\r\n a[10] = a[10] * z;\r\n a[11] = a[11] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Derive a rotation matrix around the given axis.\r\n *\r\n * @method Phaser.Math.Matrix4#makeRotationAxis\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} axis - The rotation axis.\r\n * @param {number} angle - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n makeRotationAxis: function (axis, angle)\r\n {\r\n // Based on http://www.gamedev.net/reference/articles/article1199.asp\r\n\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n var t = 1 - c;\r\n var x = axis.x;\r\n var y = axis.y;\r\n var z = axis.z;\r\n var tx = t * x;\r\n var ty = t * y;\r\n\r\n this.fromArray([\r\n tx * x + c, tx * y - s * z, tx * z + s * y, 0,\r\n tx * y + s * z, ty * y + c, ty * z - s * x, 0,\r\n tx * z - s * y, ty * z + s * x, t * z * z + c, 0,\r\n 0, 0, 0, 1\r\n ]);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a rotation transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n * @param {Phaser.Math.Vector3} axis - The axis to rotate upon.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotate: function (rad, axis)\r\n {\r\n var a = this.val;\r\n var x = axis.x;\r\n var y = axis.y;\r\n var z = axis.z;\r\n var len = Math.sqrt(x * x + y * y + z * z);\r\n\r\n if (Math.abs(len) < EPSILON)\r\n {\r\n return null;\r\n }\r\n\r\n len = 1 / len;\r\n x *= len;\r\n y *= len;\r\n z *= len;\r\n\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n var t = 1 - c;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Construct the elements of the rotation matrix\r\n var b00 = x * x * t + c;\r\n var b01 = y * x * t + z * s;\r\n var b02 = z * x * t - y * s;\r\n\r\n var b10 = x * y * t - z * s;\r\n var b11 = y * y * t + c;\r\n var b12 = z * y * t + x * s;\r\n\r\n var b20 = x * z * t + y * s;\r\n var b21 = y * z * t - x * s;\r\n var b22 = z * z * t + c;\r\n\r\n // Perform rotation-specific matrix multiplication\r\n a[0] = a00 * b00 + a10 * b01 + a20 * b02;\r\n a[1] = a01 * b00 + a11 * b01 + a21 * b02;\r\n a[2] = a02 * b00 + a12 * b01 + a22 * b02;\r\n a[3] = a03 * b00 + a13 * b01 + a23 * b02;\r\n a[4] = a00 * b10 + a10 * b11 + a20 * b12;\r\n a[5] = a01 * b10 + a11 * b11 + a21 * b12;\r\n a[6] = a02 * b10 + a12 * b11 + a22 * b12;\r\n a[7] = a03 * b10 + a13 * b11 + a23 * b12;\r\n a[8] = a00 * b20 + a10 * b21 + a20 * b22;\r\n a[9] = a01 * b20 + a11 * b21 + a21 * b22;\r\n a[10] = a02 * b20 + a12 * b21 + a22 * b22;\r\n a[11] = a03 * b20 + a13 * b21 + a23 * b22;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its X axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotateX: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[4] = a10 * c + a20 * s;\r\n a[5] = a11 * c + a21 * s;\r\n a[6] = a12 * c + a22 * s;\r\n a[7] = a13 * c + a23 * s;\r\n a[8] = a20 * c - a10 * s;\r\n a[9] = a21 * c - a11 * s;\r\n a[10] = a22 * c - a12 * s;\r\n a[11] = a23 * c - a13 * s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its Y axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle to rotate by, in radians.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotateY: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[0] = a00 * c - a20 * s;\r\n a[1] = a01 * c - a21 * s;\r\n a[2] = a02 * c - a22 * s;\r\n a[3] = a03 * c - a23 * s;\r\n a[8] = a00 * s + a20 * c;\r\n a[9] = a01 * s + a21 * c;\r\n a[10] = a02 * s + a22 * c;\r\n a[11] = a03 * s + a23 * c;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its Z axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle to rotate by, in radians.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotateZ: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[0] = a00 * c + a10 * s;\r\n a[1] = a01 * c + a11 * s;\r\n a[2] = a02 * c + a12 * s;\r\n a[3] = a03 * c + a13 * s;\r\n a[4] = a10 * c - a00 * s;\r\n a[5] = a11 * c - a01 * s;\r\n a[6] = a12 * c - a02 * s;\r\n a[7] = a13 * c - a03 * s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given rotation Quaternion and translation Vector.\r\n *\r\n * @method Phaser.Math.Matrix4#fromRotationTranslation\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set rotation from.\r\n * @param {Phaser.Math.Vector3} v - The Vector to set translation from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n fromRotationTranslation: function (q, v)\r\n {\r\n // Quaternion math\r\n var out = this.val;\r\n\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[1] = xy + wz;\r\n out[2] = xz - wy;\r\n out[3] = 0;\r\n\r\n out[4] = xy - wz;\r\n out[5] = 1 - (xx + zz);\r\n out[6] = yz + wx;\r\n out[7] = 0;\r\n\r\n out[8] = xz + wy;\r\n out[9] = yz - wx;\r\n out[10] = 1 - (xx + yy);\r\n out[11] = 0;\r\n\r\n out[12] = v.x;\r\n out[13] = v.y;\r\n out[14] = v.z;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given Quaternion.\r\n *\r\n * @method Phaser.Math.Matrix4#fromQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n fromQuat: function (q)\r\n {\r\n var out = this.val;\r\n\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[1] = xy + wz;\r\n out[2] = xz - wy;\r\n out[3] = 0;\r\n\r\n out[4] = xy - wz;\r\n out[5] = 1 - (xx + zz);\r\n out[6] = yz + wx;\r\n out[7] = 0;\r\n\r\n out[8] = xz + wy;\r\n out[9] = yz - wx;\r\n out[10] = 1 - (xx + yy);\r\n out[11] = 0;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = 0;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a frustum matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#frustum\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left bound of the frustum.\r\n * @param {number} right - The right bound of the frustum.\r\n * @param {number} bottom - The bottom bound of the frustum.\r\n * @param {number} top - The top bound of the frustum.\r\n * @param {number} near - The near bound of the frustum.\r\n * @param {number} far - The far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n frustum: function (left, right, bottom, top, near, far)\r\n {\r\n var out = this.val;\r\n\r\n var rl = 1 / (right - left);\r\n var tb = 1 / (top - bottom);\r\n var nf = 1 / (near - far);\r\n\r\n out[0] = (near * 2) * rl;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = (near * 2) * tb;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = (right + left) * rl;\r\n out[9] = (top + bottom) * tb;\r\n out[10] = (far + near) * nf;\r\n out[11] = -1;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = (far * near * 2) * nf;\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a perspective projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#perspective\r\n * @since 3.0.0\r\n *\r\n * @param {number} fovy - Vertical field of view in radians\r\n * @param {number} aspect - Aspect ratio. Typically viewport width /height.\r\n * @param {number} near - Near bound of the frustum.\r\n * @param {number} far - Far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n perspective: function (fovy, aspect, near, far)\r\n {\r\n var out = this.val;\r\n var f = 1.0 / Math.tan(fovy / 2);\r\n var nf = 1 / (near - far);\r\n\r\n out[0] = f / aspect;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = f;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = (far + near) * nf;\r\n out[11] = -1;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = (2 * far * near) * nf;\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a perspective projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#perspectiveLH\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of the frustum.\r\n * @param {number} height - The height of the frustum.\r\n * @param {number} near - Near bound of the frustum.\r\n * @param {number} far - Far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n perspectiveLH: function (width, height, near, far)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = (2 * near) / width;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = (2 * near) / height;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = -far / (near - far);\r\n out[11] = 1;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = (near * far) / (near - far);\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate an orthogonal projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#ortho\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left bound of the frustum.\r\n * @param {number} right - The right bound of the frustum.\r\n * @param {number} bottom - The bottom bound of the frustum.\r\n * @param {number} top - The top bound of the frustum.\r\n * @param {number} near - The near bound of the frustum.\r\n * @param {number} far - The far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n ortho: function (left, right, bottom, top, near, far)\r\n {\r\n var out = this.val;\r\n var lr = left - right;\r\n var bt = bottom - top;\r\n var nf = near - far;\r\n\r\n // Avoid division by zero\r\n lr = (lr === 0) ? lr : 1 / lr;\r\n bt = (bt === 0) ? bt : 1 / bt;\r\n nf = (nf === 0) ? nf : 1 / nf;\r\n\r\n out[0] = -2 * lr;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = -2 * bt;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = 2 * nf;\r\n out[11] = 0;\r\n\r\n out[12] = (left + right) * lr;\r\n out[13] = (top + bottom) * bt;\r\n out[14] = (far + near) * nf;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a look-at matrix with the given eye position, focal point, and up axis.\r\n *\r\n * @method Phaser.Math.Matrix4#lookAt\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} eye - Position of the viewer\r\n * @param {Phaser.Math.Vector3} center - Point the viewer is looking at\r\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n lookAt: function (eye, center, up)\r\n {\r\n var out = this.val;\r\n\r\n var eyex = eye.x;\r\n var eyey = eye.y;\r\n var eyez = eye.z;\r\n\r\n var upx = up.x;\r\n var upy = up.y;\r\n var upz = up.z;\r\n\r\n var centerx = center.x;\r\n var centery = center.y;\r\n var centerz = center.z;\r\n\r\n if (Math.abs(eyex - centerx) < EPSILON &&\r\n Math.abs(eyey - centery) < EPSILON &&\r\n Math.abs(eyez - centerz) < EPSILON)\r\n {\r\n return this.identity();\r\n }\r\n\r\n var z0 = eyex - centerx;\r\n var z1 = eyey - centery;\r\n var z2 = eyez - centerz;\r\n\r\n var len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);\r\n\r\n z0 *= len;\r\n z1 *= len;\r\n z2 *= len;\r\n\r\n var x0 = upy * z2 - upz * z1;\r\n var x1 = upz * z0 - upx * z2;\r\n var x2 = upx * z1 - upy * z0;\r\n\r\n len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);\r\n\r\n if (!len)\r\n {\r\n x0 = 0;\r\n x1 = 0;\r\n x2 = 0;\r\n }\r\n else\r\n {\r\n len = 1 / len;\r\n x0 *= len;\r\n x1 *= len;\r\n x2 *= len;\r\n }\r\n\r\n var y0 = z1 * x2 - z2 * x1;\r\n var y1 = z2 * x0 - z0 * x2;\r\n var y2 = z0 * x1 - z1 * x0;\r\n\r\n len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);\r\n\r\n if (!len)\r\n {\r\n y0 = 0;\r\n y1 = 0;\r\n y2 = 0;\r\n }\r\n else\r\n {\r\n len = 1 / len;\r\n y0 *= len;\r\n y1 *= len;\r\n y2 *= len;\r\n }\r\n\r\n out[0] = x0;\r\n out[1] = y0;\r\n out[2] = z0;\r\n out[3] = 0;\r\n\r\n out[4] = x1;\r\n out[5] = y1;\r\n out[6] = z1;\r\n out[7] = 0;\r\n\r\n out[8] = x2;\r\n out[9] = y2;\r\n out[10] = z2;\r\n out[11] = 0;\r\n\r\n out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\r\n out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\r\n out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this matrix from the given `yaw`, `pitch` and `roll` values.\r\n *\r\n * @method Phaser.Math.Matrix4#yawPitchRoll\r\n * @since 3.0.0\r\n *\r\n * @param {number} yaw - The yaw value.\r\n * @param {number} pitch - The pitch value.\r\n * @param {number} roll - The roll value.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n yawPitchRoll: function (yaw, pitch, roll)\r\n {\r\n this.zero();\r\n _tempMat1.zero();\r\n _tempMat2.zero();\r\n\r\n var m0 = this.val;\r\n var m1 = _tempMat1.val;\r\n var m2 = _tempMat2.val;\r\n\r\n // Rotate Z\r\n var s = Math.sin(roll);\r\n var c = Math.cos(roll);\r\n\r\n m0[10] = 1;\r\n m0[15] = 1;\r\n m0[0] = c;\r\n m0[1] = s;\r\n m0[4] = -s;\r\n m0[5] = c;\r\n\r\n // Rotate X\r\n s = Math.sin(pitch);\r\n c = Math.cos(pitch);\r\n\r\n m1[0] = 1;\r\n m1[15] = 1;\r\n m1[5] = c;\r\n m1[10] = c;\r\n m1[9] = -s;\r\n m1[6] = s;\r\n\r\n // Rotate Y\r\n s = Math.sin(yaw);\r\n c = Math.cos(yaw);\r\n\r\n m2[5] = 1;\r\n m2[15] = 1;\r\n m2[0] = c;\r\n m2[2] = -s;\r\n m2[8] = s;\r\n m2[10] = c;\r\n\r\n this.multiplyLocal(_tempMat1);\r\n this.multiplyLocal(_tempMat2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a world matrix from the given rotation, position, scale, view matrix and projection matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#setWorldMatrix\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} rotation - The rotation of the world matrix.\r\n * @param {Phaser.Math.Vector3} position - The position of the world matrix.\r\n * @param {Phaser.Math.Vector3} scale - The scale of the world matrix.\r\n * @param {Phaser.Math.Matrix4} [viewMatrix] - The view matrix.\r\n * @param {Phaser.Math.Matrix4} [projectionMatrix] - The projection matrix.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n setWorldMatrix: function (rotation, position, scale, viewMatrix, projectionMatrix)\r\n {\r\n this.yawPitchRoll(rotation.y, rotation.x, rotation.z);\r\n\r\n _tempMat1.scaling(scale.x, scale.y, scale.z);\r\n _tempMat2.xyz(position.x, position.y, position.z);\r\n\r\n this.multiplyLocal(_tempMat1);\r\n this.multiplyLocal(_tempMat2);\r\n\r\n if (viewMatrix !== undefined)\r\n {\r\n this.multiplyLocal(viewMatrix);\r\n }\r\n\r\n if (projectionMatrix !== undefined)\r\n {\r\n this.multiplyLocal(projectionMatrix);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nvar _tempMat1 = new Matrix4();\r\nvar _tempMat2 = new Matrix4();\r\n\r\nmodule.exports = Matrix4;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Add an `amount` to a `value`, limiting the maximum result to `max`.\r\n *\r\n * @function Phaser.Math.MaxAdd\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to add to.\r\n * @param {number} amount - The amount to add.\r\n * @param {number} max - The maximum value to return.\r\n *\r\n * @return {number} The resulting value.\r\n */\r\nvar MaxAdd = function (value, amount, max)\r\n{\r\n return Math.min(value + amount, max);\r\n};\r\n\r\nmodule.exports = MaxAdd;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Subtract an `amount` from `value`, limiting the minimum result to `min`.\r\n *\r\n * @function Phaser.Math.MinSub\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to subtract from.\r\n * @param {number} amount - The amount to subtract.\r\n * @param {number} min - The minimum value to return.\r\n *\r\n * @return {number} The resulting value.\r\n */\r\nvar MinSub = function (value, amount, min)\r\n{\r\n return Math.max(value - amount, min);\r\n};\r\n\r\nmodule.exports = MinSub;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Work out what percentage `value` is of the range between `min` and `max`.\r\n * If `max` isn't given then it will return the percentage of `value` to `min`.\r\n *\r\n * You can optionally specify an `upperMax` value, which is a mid-way point in the range that represents 100%, after which the % starts to go down to zero again.\r\n *\r\n * @function Phaser.Math.Percent\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to determine the percentage of.\r\n * @param {number} min - The minimum value.\r\n * @param {number} [max] - The maximum value.\r\n * @param {number} [upperMax] - The mid-way point in the range that represents 100%.\r\n *\r\n * @return {number} A value between 0 and 1 representing the percentage.\r\n */\r\nvar Percent = function (value, min, max, upperMax)\r\n{\r\n if (max === undefined) { max = min + 1; }\r\n\r\n var percentage = (value - min) / (max - min);\r\n\r\n if (percentage > 1)\r\n {\r\n if (upperMax !== undefined)\r\n {\r\n percentage = ((upperMax - value)) / (upperMax - max);\r\n\r\n if (percentage < 0)\r\n {\r\n percentage = 0;\r\n }\r\n }\r\n else\r\n {\r\n percentage = 1;\r\n }\r\n }\r\n else if (percentage < 0)\r\n {\r\n percentage = 0;\r\n }\r\n\r\n return percentage;\r\n};\r\n\r\nmodule.exports = Percent;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\nvar Vector3 = require('./Vector3');\r\nvar Matrix3 = require('./Matrix3');\r\n\r\nvar EPSILON = 0.000001;\r\n\r\n// Some shared 'private' arrays\r\nvar siNext = new Int8Array([ 1, 2, 0 ]);\r\nvar tmp = new Float32Array([ 0, 0, 0 ]);\r\n\r\nvar xUnitVec3 = new Vector3(1, 0, 0);\r\nvar yUnitVec3 = new Vector3(0, 1, 0);\r\n\r\nvar tmpvec = new Vector3();\r\nvar tmpMat3 = new Matrix3();\r\n\r\n/**\r\n * @classdesc\r\n * A quaternion.\r\n *\r\n * @class Quaternion\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n * @param {number} [w] - The w component.\r\n */\r\nvar Quaternion = new Class({\r\n\r\n initialize:\r\n\r\n function Quaternion (x, y, z, w)\r\n {\r\n /**\r\n * The x component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n /**\r\n * The y component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n /**\r\n * The z component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n /**\r\n * The w component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Copy the components of a given Quaternion or Vector into this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#copy\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} src - The Quaternion or Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z;\r\n this.w = src.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the components of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} [x=0] - The x component, or an object containing x, y, z, and w components.\r\n * @param {number} [y=0] - The y component.\r\n * @param {number} [z=0] - The z component.\r\n * @param {number} [w=0] - The w component.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n set: function (x, y, z, w)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Quaternion or Vector to this Quaternion. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Quaternion#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to add to this Quaternion.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z;\r\n this.w += v.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract a given Quaternion or Vector from this Quaternion. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Quaternion#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to subtract from this Quaternion.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z;\r\n this.w -= v.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Quaternion by the given value.\r\n *\r\n * @method Phaser.Math.Quaternion#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Quaternion by.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n scale: function (scale)\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n this.w *= scale;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the length of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Quaternion.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return Math.sqrt(x * x + y * y + z * z + w * w);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Quaternion squared.\r\n *\r\n * @method Phaser.Math.Quaternion#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Quaternion, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n },\r\n\r\n /**\r\n * Normalize this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var len = x * x + y * y + z * z + w * w;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n this.w = w * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Quaternion and the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#dot\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to dot product with this Quaternion.\r\n *\r\n * @return {number} The dot product of this Quaternion and the given Quaternion or Vector.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\r\n },\r\n\r\n /**\r\n * Linearly interpolate this Quaternion towards the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to interpolate towards.\r\n * @param {number} [t=0] - The percentage of interpolation.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n this.w = aw + t * (v.w - aw);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotates this Quaternion based on the two given vectors.\r\n *\r\n * @method Phaser.Math.Quaternion#rotationTo\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The transform rotation vector.\r\n * @param {Phaser.Math.Vector3} b - The target rotation vector.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotationTo: function (a, b)\r\n {\r\n var dot = a.x * b.x + a.y * b.y + a.z * b.z;\r\n\r\n if (dot < -0.999999)\r\n {\r\n if (tmpvec.copy(xUnitVec3).cross(a).length() < EPSILON)\r\n {\r\n tmpvec.copy(yUnitVec3).cross(a);\r\n }\r\n\r\n tmpvec.normalize();\r\n\r\n return this.setAxisAngle(tmpvec, Math.PI);\r\n\r\n }\r\n else if (dot > 0.999999)\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 1;\r\n\r\n return this;\r\n }\r\n else\r\n {\r\n tmpvec.copy(a).cross(b);\r\n\r\n this.x = tmpvec.x;\r\n this.y = tmpvec.y;\r\n this.z = tmpvec.z;\r\n this.w = 1 + dot;\r\n\r\n return this.normalize();\r\n }\r\n },\r\n\r\n /**\r\n * Set the axes of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#setAxes\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} view - The view axis.\r\n * @param {Phaser.Math.Vector3} right - The right axis.\r\n * @param {Phaser.Math.Vector3} up - The upwards axis.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setAxes: function (view, right, up)\r\n {\r\n var m = tmpMat3.val;\r\n\r\n m[0] = right.x;\r\n m[3] = right.y;\r\n m[6] = right.z;\r\n\r\n m[1] = up.x;\r\n m[4] = up.y;\r\n m[7] = up.z;\r\n\r\n m[2] = -view.x;\r\n m[5] = -view.y;\r\n m[8] = -view.z;\r\n\r\n return this.fromMat3(tmpMat3).normalize();\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n identity: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the axis angle of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#setAxisAngle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} axis - The axis.\r\n * @param {number} rad - The angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setAxisAngle: function (axis, rad)\r\n {\r\n rad = rad * 0.5;\r\n\r\n var s = Math.sin(rad);\r\n\r\n this.x = s * axis.x;\r\n this.y = s * axis.y;\r\n this.z = s * axis.z;\r\n this.w = Math.cos(rad);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply this Quaternion by the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to multiply this Quaternion by.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n multiply: function (b)\r\n {\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n var bw = b.w;\r\n\r\n this.x = ax * bw + aw * bx + ay * bz - az * by;\r\n this.y = ay * bw + aw * by + az * bx - ax * bz;\r\n this.z = az * bw + aw * bz + ax * by - ay * bx;\r\n this.w = aw * bw - ax * bx - ay * by - az * bz;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Smoothly linearly interpolate this Quaternion towards the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#slerp\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to interpolate towards.\r\n * @param {number} t - The percentage of interpolation.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n slerp: function (b, t)\r\n {\r\n // benchmarks: http://jsperf.com/quaternion-slerp-implementations\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n var bw = b.w;\r\n\r\n // calc cosine\r\n var cosom = ax * bx + ay * by + az * bz + aw * bw;\r\n\r\n // adjust signs (if necessary)\r\n if (cosom < 0)\r\n {\r\n cosom = -cosom;\r\n bx = - bx;\r\n by = - by;\r\n bz = - bz;\r\n bw = - bw;\r\n }\r\n\r\n // \"from\" and \"to\" quaternions are very close\r\n // ... so we can do a linear interpolation\r\n var scale0 = 1 - t;\r\n var scale1 = t;\r\n\r\n // calculate coefficients\r\n if ((1 - cosom) > EPSILON)\r\n {\r\n // standard case (slerp)\r\n var omega = Math.acos(cosom);\r\n var sinom = Math.sin(omega);\r\n\r\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\r\n scale1 = Math.sin(t * omega) / sinom;\r\n }\r\n\r\n // calculate final values\r\n this.x = scale0 * ax + scale1 * bx;\r\n this.y = scale0 * ay + scale1 * by;\r\n this.z = scale0 * az + scale1 * bz;\r\n this.w = scale0 * aw + scale1 * bw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n invert: function ()\r\n {\r\n var a0 = this.x;\r\n var a1 = this.y;\r\n var a2 = this.z;\r\n var a3 = this.w;\r\n\r\n var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;\r\n var invDot = (dot) ? 1 / dot : 0;\r\n\r\n // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0\r\n\r\n this.x = -a0 * invDot;\r\n this.y = -a1 * invDot;\r\n this.z = -a2 * invDot;\r\n this.w = a3 * invDot;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Convert this Quaternion into its conjugate.\r\n *\r\n * Sets the x, y and z components.\r\n *\r\n * @method Phaser.Math.Quaternion#conjugate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n conjugate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the X axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateX: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n this.x = ax * bw + aw * bx;\r\n this.y = ay * bw + az * bx;\r\n this.z = az * bw - ay * bx;\r\n this.w = aw * bw - ax * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the Y axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateY: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var by = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n this.x = ax * bw - az * by;\r\n this.y = ay * bw + aw * by;\r\n this.z = az * bw + ax * by;\r\n this.w = aw * bw - ay * by;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the Z axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateZ: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bz = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n this.x = ax * bw + ay * bz;\r\n this.y = ay * bw - ax * bz;\r\n this.z = az * bw + aw * bz;\r\n this.w = aw * bw - az * bz;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Create a unit (or rotation) Quaternion from its x, y, and z components.\r\n *\r\n * Sets the w component.\r\n *\r\n * @method Phaser.Math.Quaternion#calculateW\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n calculateW: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n this.w = -Math.sqrt(1.0 - x * x - y * y - z * z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Convert the given Matrix into this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#fromMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix to convert from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n fromMat3: function (mat)\r\n {\r\n // benchmarks:\r\n // http://jsperf.com/typed-array-access-speed\r\n // http://jsperf.com/conversion-of-3x3-matrix-to-quaternion\r\n\r\n // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\r\n // article \"Quaternion Calculus and Fast Animation\".\r\n var m = mat.val;\r\n var fTrace = m[0] + m[4] + m[8];\r\n var fRoot;\r\n\r\n if (fTrace > 0)\r\n {\r\n // |w| > 1/2, may as well choose w > 1/2\r\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\r\n\r\n this.w = 0.5 * fRoot;\r\n\r\n fRoot = 0.5 / fRoot; // 1/(4w)\r\n\r\n this.x = (m[7] - m[5]) * fRoot;\r\n this.y = (m[2] - m[6]) * fRoot;\r\n this.z = (m[3] - m[1]) * fRoot;\r\n }\r\n else\r\n {\r\n // |w| <= 1/2\r\n var i = 0;\r\n\r\n if (m[4] > m[0])\r\n {\r\n i = 1;\r\n }\r\n\r\n if (m[8] > m[i * 3 + i])\r\n {\r\n i = 2;\r\n }\r\n\r\n var j = siNext[i];\r\n var k = siNext[j];\r\n\r\n // This isn't quite as clean without array access\r\n fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1);\r\n tmp[i] = 0.5 * fRoot;\r\n\r\n fRoot = 0.5 / fRoot;\r\n\r\n tmp[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;\r\n tmp[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;\r\n\r\n this.x = tmp[0];\r\n this.y = tmp[1];\r\n this.z = tmp[2];\r\n this.w = (m[k * 3 + j] - m[j * 3 + k]) * fRoot;\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Quaternion;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\n\r\n/**\r\n * Convert the given angle in radians, to the equivalent angle in degrees.\r\n *\r\n * @function Phaser.Math.RadToDeg\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The angle in radians to convert ot degrees.\r\n *\r\n * @return {integer} The given angle converted to degrees.\r\n */\r\nvar RadToDeg = function (radians)\r\n{\r\n return radians * CONST.RAD_TO_DEG;\r\n};\r\n\r\nmodule.exports = RadToDeg;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random unit vector.\r\n *\r\n * Computes random values for the given vector between -1 and 1 that can be used to represent a direction.\r\n *\r\n * Optionally accepts a scale value to scale the resulting vector by.\r\n *\r\n * @function Phaser.Math.RandomXY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} vector - The Vector to compute random values for.\r\n * @param {number} [scale=1] - The scale of the random values.\r\n *\r\n * @return {Phaser.Math.Vector2} The given Vector.\r\n */\r\nvar RandomXY = function (vector, scale)\r\n{\r\n if (scale === undefined) { scale = 1; }\r\n\r\n var r = Math.random() * 2 * Math.PI;\r\n\r\n vector.x = Math.cos(r) * scale;\r\n vector.y = Math.sin(r) * scale;\r\n\r\n return vector;\r\n};\r\n\r\nmodule.exports = RandomXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random position vector in a spherical area, optionally defined by the given radius.\r\n *\r\n * @function Phaser.Math.RandomXYZ\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec3 - The Vector to compute random values for.\r\n * @param {number} [radius=1] - The radius.\r\n *\r\n * @return {Phaser.Math.Vector3} The given Vector.\r\n */\r\nvar RandomXYZ = function (vec3, radius)\r\n{\r\n if (radius === undefined) { radius = 1; }\r\n\r\n var r = Math.random() * 2 * Math.PI;\r\n var z = (Math.random() * 2) - 1;\r\n var zScale = Math.sqrt(1 - z * z) * radius;\r\n\r\n vec3.x = Math.cos(r) * zScale;\r\n vec3.y = Math.sin(r) * zScale;\r\n vec3.z = z * radius;\r\n\r\n return vec3;\r\n};\r\n\r\nmodule.exports = RandomXYZ;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random four-dimensional vector.\r\n *\r\n * @function Phaser.Math.RandomXYZW\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} vec4 - The Vector to compute random values for.\r\n * @param {number} [scale=1] - The scale of the random values.\r\n *\r\n * @return {Phaser.Math.Vector4} The given Vector.\r\n */\r\nvar RandomXYZW = function (vec4, scale)\r\n{\r\n if (scale === undefined) { scale = 1; }\r\n\r\n // TODO: Not spherical; should fix this for more uniform distribution\r\n vec4.x = (Math.random() * 2 - 1) * scale;\r\n vec4.y = (Math.random() * 2 - 1) * scale;\r\n vec4.z = (Math.random() * 2 - 1) * scale;\r\n vec4.w = (Math.random() * 2 - 1) * scale;\r\n\r\n return vec4;\r\n};\r\n\r\nmodule.exports = RandomXYZW;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a given point by a given angle around the origin (0, 0), in an anti-clockwise direction.\r\n *\r\n * @function Phaser.Math.Rotate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} angle - The angle to be rotated by in an anticlockwise direction.\r\n *\r\n * @return {Phaser.Geom.Point} The given point, rotated by the given angle in an anticlockwise direction.\r\n */\r\nvar Rotate = function (point, angle)\r\n{\r\n var x = point.x;\r\n var y = point.y;\r\n\r\n point.x = (x * Math.cos(angle)) - (y * Math.sin(angle));\r\n point.y = (x * Math.sin(angle)) + (y * Math.cos(angle));\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = Rotate;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a `point` around `x` and `y` to the given `angle`, at the same distance.\r\n *\r\n * In polar notation, this maps a point from (r, t) to (r, angle), vs. the origin (x, y).\r\n *\r\n * @function Phaser.Math.RotateAround\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} x - The horizontal coordinate to rotate around.\r\n * @param {number} y - The vertical coordinate to rotate around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The given point.\r\n */\r\nvar RotateAround = function (point, x, y, angle)\r\n{\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n\r\n var tx = point.x - x;\r\n var ty = point.y - y;\r\n\r\n point.x = tx * c - ty * s + x;\r\n point.y = tx * s + ty * c + y;\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = RotateAround;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a `point` around `x` and `y` by the given `angle` and `distance`.\r\n *\r\n * In polar notation, this maps a point from (r, t) to (distance, t + angle), vs. the origin (x, y).\r\n *\r\n * @function Phaser.Math.RotateAroundDistance\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} x - The horizontal coordinate to rotate around.\r\n * @param {number} y - The vertical coordinate to rotate around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n * @param {number} distance - The distance from (x, y) to place the point at.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The given point.\r\n */\r\nvar RotateAroundDistance = function (point, x, y, angle, distance)\r\n{\r\n var t = angle + Math.atan2(point.y - y, point.x - x);\r\n\r\n point.x = x + (distance * Math.cos(t));\r\n point.y = y + (distance * Math.sin(t));\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = RotateAroundDistance;\r\n","/**\n * @author samme\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Position a `point` at the given `angle` and `distance` to (`x`, `y`).\n *\n * @function Phaser.Math.RotateTo\n * @since 3.24.0\n *\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\n *\n * @param {Phaser.Types.Math.Vector2Like} point - The point to be positioned.\n * @param {number} x - The horizontal coordinate to position from.\n * @param {number} y - The vertical coordinate to position from.\n * @param {number} angle - The angle of rotation in radians.\n * @param {number} distance - The distance from (x, y) to place the point at.\n *\n * @return {Phaser.Types.Math.Vector2Like} The given point.\n */\nvar RotateTo = function (point, x, y, angle, distance)\n{\n point.x = x + (distance * Math.cos(angle));\n point.y = y + (distance * Math.sin(angle));\n\n return point;\n};\n\nmodule.exports = RotateTo;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector3 = require('../math/Vector3');\r\nvar Matrix4 = require('../math/Matrix4');\r\nvar Quaternion = require('../math/Quaternion');\r\n\r\nvar tmpMat4 = new Matrix4();\r\nvar tmpQuat = new Quaternion();\r\nvar tmpVec3 = new Vector3();\r\n\r\n/**\r\n * Rotates a vector in place by axis angle.\r\n *\r\n * This is the same as transforming a point by an\r\n * axis-angle quaternion, but it has higher precision.\r\n *\r\n * @function Phaser.Math.RotateVec3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec - The vector to be rotated.\r\n * @param {Phaser.Math.Vector3} axis - The axis to rotate around.\r\n * @param {number} radians - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Math.Vector3} The given vector.\r\n */\r\nvar RotateVec3 = function (vec, axis, radians)\r\n{\r\n // Set the quaternion to our axis angle\r\n tmpQuat.setAxisAngle(axis, radians);\r\n\r\n // Create a rotation matrix from the axis angle\r\n tmpMat4.fromRotationTranslation(tmpQuat, tmpVec3.set(0, 0, 0));\r\n\r\n // Multiply our vector by the rotation matrix\r\n return vec.transformMat4(tmpMat4);\r\n};\r\n\r\nmodule.exports = RotateVec3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Round a given number so it is further away from zero. That is, positive numbers are rounded up, and negative numbers are rounded down.\r\n *\r\n * @function Phaser.Math.RoundAwayFromZero\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to round.\r\n *\r\n * @return {number} The rounded number, rounded away from zero.\r\n */\r\nvar RoundAwayFromZero = function (value)\r\n{\r\n // \"Opposite\" of truncate.\r\n return (value > 0) ? Math.ceil(value) : Math.floor(value);\r\n};\r\n\r\nmodule.exports = RoundAwayFromZero;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Round a value to the given precision.\r\n * \r\n * For example:\r\n * \r\n * ```javascript\r\n * RoundTo(123.456, 0) = 123\r\n * RoundTo(123.456, 1) = 120\r\n * RoundTo(123.456, 2) = 100\r\n * ```\r\n * \r\n * To round the decimal, i.e. to round to precision, pass in a negative `place`:\r\n * \r\n * ```javascript\r\n * RoundTo(123.456789, 0) = 123\r\n * RoundTo(123.456789, -1) = 123.5\r\n * RoundTo(123.456789, -2) = 123.46\r\n * RoundTo(123.456789, -3) = 123.457\r\n * ```\r\n *\r\n * @function Phaser.Math.RoundTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {integer} [place=0] - The place to round to. Positive to round the units, negative to round the decimal.\r\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar RoundTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.round(value * p) / p;\r\n};\r\n\r\nmodule.exports = RoundTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Generate a series of sine and cosine values.\r\n *\r\n * @function Phaser.Math.SinCosTableGenerator\r\n * @since 3.0.0\r\n *\r\n * @param {number} length - The number of values to generate.\r\n * @param {number} [sinAmp=1] - The sine value amplitude.\r\n * @param {number} [cosAmp=1] - The cosine value amplitude.\r\n * @param {number} [frequency=1] - The frequency of the values.\r\n *\r\n * @return {Phaser.Types.Math.SinCosTable} The generated values.\r\n */\r\nvar SinCosTableGenerator = function (length, sinAmp, cosAmp, frequency)\r\n{\r\n if (sinAmp === undefined) { sinAmp = 1; }\r\n if (cosAmp === undefined) { cosAmp = 1; }\r\n if (frequency === undefined) { frequency = 1; }\r\n\r\n frequency *= Math.PI / length;\r\n\r\n var cos = [];\r\n var sin = [];\r\n\r\n for (var c = 0; c < length; c++)\r\n {\r\n cosAmp -= sinAmp * frequency;\r\n sinAmp += cosAmp * frequency;\r\n\r\n cos[c] = cosAmp;\r\n sin[c] = sinAmp;\r\n }\r\n\r\n return {\r\n sin: sin,\r\n cos: cos,\r\n length: length\r\n };\r\n};\r\n\r\nmodule.exports = SinCosTableGenerator;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a smooth interpolation percentage of `x` between `min` and `max`.\r\n *\r\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\r\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\r\n * between 0 and 1 otherwise.\r\n *\r\n * @function Phaser.Math.SmoothStep\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\r\n *\r\n * @param {number} x - The input value.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The percentage of interpolation, between 0 and 1.\r\n */\r\nvar SmoothStep = function (x, min, max)\r\n{\r\n if (x <= min)\r\n {\r\n return 0;\r\n }\r\n\r\n if (x >= max)\r\n {\r\n return 1;\r\n }\r\n\r\n x = (x - min) / (max - min);\r\n\r\n return x * x * (3 - 2 * x);\r\n};\r\n\r\nmodule.exports = SmoothStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a smoother interpolation percentage of `x` between `min` and `max`.\r\n *\r\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\r\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\r\n * between 0 and 1 otherwise.\r\n *\r\n * Produces an even smoother interpolation than {@link Phaser.Math.SmoothStep}.\r\n *\r\n * @function Phaser.Math.SmootherStep\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\r\n *\r\n * @param {number} x - The input value.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The percentage of interpolation, between 0 and 1.\r\n */\r\nvar SmootherStep = function (x, min, max)\r\n{\r\n x = Math.max(0, Math.min(1, (x - min) / (max - min)));\r\n\r\n return x * x * x * (x * (x * 6 - 15) + 10);\r\n};\r\n\r\nmodule.exports = SmootherStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = require('./Vector2');\r\n\r\n/**\r\n * Returns a Vector2 containing the x and y position of the given index in a `width` x `height` sized grid.\r\n * \r\n * For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2.\r\n * \r\n * If the given index is out of range an empty Vector2 is returned.\r\n *\r\n * @function Phaser.Math.ToXY\r\n * @since 3.19.0\r\n *\r\n * @param {integer} index - The position within the grid to get the x/y value for.\r\n * @param {integer} width - The width of the grid.\r\n * @param {integer} height - The height of the grid.\r\n * @param {Phaser.Math.Vector2} [out] - An optional Vector2 to store the result in. If not given, a new Vector2 instance will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 where the x and y properties contain the given grid index.\r\n */\r\nvar ToXY = function (index, width, height, out)\r\n{\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var x = 0;\r\n var y = 0;\r\n var total = width * height;\r\n\r\n if (index > 0 && index <= total)\r\n {\r\n if (index > width - 1)\r\n {\r\n y = Math.floor(index / width);\r\n x = index - (y * width);\r\n }\r\n else\r\n {\r\n x = index;\r\n }\r\n\r\n out.set(x, y);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = ToXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = require('./Vector2');\r\n\r\n/**\r\n * Takes the `x` and `y` coordinates and transforms them into the same space as\r\n * defined by the position, rotation and scale values.\r\n *\r\n * @function Phaser.Math.TransformXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to be transformed.\r\n * @param {number} y - The y coordinate to be transformed.\r\n * @param {number} positionX - Horizontal position of the transform point.\r\n * @param {number} positionY - Vertical position of the transform point.\r\n * @param {number} rotation - Rotation of the transform point, in radians.\r\n * @param {number} scaleX - Horizontal scale of the transform point.\r\n * @param {number} scaleY - Vertical scale of the transform point.\r\n * @param {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} [output] - The output vector, point or object for the translated coordinates.\r\n *\r\n * @return {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} The translated point.\r\n */\r\nvar TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output)\r\n{\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var radianSin = Math.sin(rotation);\r\n var radianCos = Math.cos(rotation);\r\n\r\n // Rotate and Scale\r\n var a = radianCos * scaleX;\r\n var b = radianSin * scaleX;\r\n var c = -radianSin * scaleY;\r\n var d = radianCos * scaleY;\r\n\r\n // Invert\r\n var id = 1 / ((a * d) + (c * -b));\r\n\r\n output.x = (d * id * x) + (-c * id * y) + (((positionY * c) - (positionX * d)) * id);\r\n output.y = (a * id * y) + (-b * id * x) + (((-positionY * a) + (positionX * b)) * id);\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = TransformXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\nvar FuzzyEqual = require('../math/fuzzy/Equal');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 2D space.\r\n *\r\n * A two-component vector.\r\n *\r\n * @class Vector2\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number|Phaser.Types.Math.Vector2Like} [x] - The x component, or an object with `x` and `y` properties.\r\n * @param {number} [y] - The y component.\r\n */\r\nvar Vector2 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector2 (x, y)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector2#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector2#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n }\r\n else\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector2.\r\n *\r\n * @method Phaser.Math.Vector2#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} A clone of this Vector2.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector2(this.x, this.y);\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x || 0;\r\n this.y = src.y || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the component values of this Vector from a given Vector2Like object.\r\n *\r\n * @method Phaser.Math.Vector2#setFromObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} obj - The object containing the component values to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setFromObject: function (obj)\r\n {\r\n this.x = obj.x || 0;\r\n this.y = obj.y || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x` and `y` components of the this Vector to the given `x` and `y` values.\r\n *\r\n * @method Phaser.Math.Vector2#set\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x value to set for this Vector.\r\n * @param {number} [y=x] - The y value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n set: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This method is an alias for `Vector2.set`.\r\n *\r\n * @method Phaser.Math.Vector2#setTo\r\n * @since 3.4.0\r\n *\r\n * @param {number} x - The x value to set for this Vector.\r\n * @param {number} [y=x] - The y value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setTo: function (x, y)\r\n {\r\n return this.set(x, y);\r\n },\r\n\r\n /**\r\n * Sets the `x` and `y` values of this object from a given polar coordinate.\r\n *\r\n * @method Phaser.Math.Vector2#setToPolar\r\n * @since 3.0.0\r\n *\r\n * @param {number} azimuth - The angular coordinate, in radians.\r\n * @param {number} [radius=1] - The radial coordinate (length).\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setToPolar: function (azimuth, radius)\r\n {\r\n if (radius == null) { radius = 1; }\r\n\r\n this.x = Math.cos(azimuth) * radius;\r\n this.y = Math.sin(azimuth) * radius;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict equality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector2#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector.\r\n *\r\n * @return {boolean} Whether the given Vector is equal to this Vector.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y));\r\n },\r\n\r\n /**\r\n * Check whether this Vector is approximately equal to a given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#fuzzyEquals\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector.\r\n * @param {number} [epsilon=0.0001] - The tolerance value.\r\n *\r\n * @return {boolean} Whether both absolute differences of the x and y components are smaller than `epsilon`.\r\n */\r\n fuzzyEquals: function (v, epsilon)\r\n {\r\n return (FuzzyEqual(this.x, v.x, epsilon) && FuzzyEqual(this.y, v.y, epsilon));\r\n },\r\n\r\n /**\r\n * Calculate the angle between this Vector and the positive x-axis, in radians.\r\n *\r\n * @method Phaser.Math.Vector2#angle\r\n * @since 3.0.0\r\n *\r\n * @return {number} The angle between this Vector, and the positive x-axis, given in radians.\r\n */\r\n angle: function ()\r\n {\r\n // computes the angle in radians with respect to the positive x-axis\r\n\r\n var angle = Math.atan2(this.y, this.x);\r\n\r\n if (angle < 0)\r\n {\r\n angle += 2 * Math.PI;\r\n }\r\n\r\n return angle;\r\n },\r\n\r\n /**\r\n * Set the angle of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#setAngle\r\n * @since 3.23.0\r\n *\r\n * @param {number} angle - The angle, in radians.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setAngle: function (angle)\r\n {\r\n return this.setToPolar(angle, this.length());\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector2#add\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n add: function (src)\r\n {\r\n this.x += src.x;\r\n this.y += src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector2#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n subtract: function (src)\r\n {\r\n this.x -= src.x;\r\n this.y -= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n multiply: function (src)\r\n {\r\n this.x *= src.x;\r\n this.y *= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector2#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n scale: function (value)\r\n {\r\n if (isFinite(value))\r\n {\r\n this.x *= value;\r\n this.y *= value;\r\n }\r\n else\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#divide\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n divide: function (src)\r\n {\r\n this.x /= src.x;\r\n this.y /= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Negate the `x` and `y` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#distance\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (src)\r\n {\r\n var dx = src.x - this.x;\r\n var dy = src.y - this.y;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector2#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (src)\r\n {\r\n var dx = src.x - this.x;\r\n var dy = src.y - this.y;\r\n\r\n return dx * dx + dy * dy;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n return Math.sqrt(x * x + y * y);\r\n },\r\n\r\n /**\r\n * Set the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#setLength\r\n * @since 3.23.0\r\n *\r\n * @param {number} length\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setLength: function (length)\r\n {\r\n return this.normalize().scale(length);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector2#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n return x * x + y * y;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var len = x * x + y * y;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Vector to its perpendicular, in the positive direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalizeRightHand\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalizeRightHand: function ()\r\n {\r\n var x = this.x;\r\n\r\n this.x = this.y * -1;\r\n this.y = x;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Vector to its perpendicular, in the negative direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalizeLeftHand\r\n * @since 3.23.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalizeLeftHand: function ()\r\n {\r\n var x = this.x;\r\n\r\n this.x = this.y;\r\n this.y = x * -1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector2 to dot product with this Vector2.\r\n *\r\n * @return {number} The dot product of this Vector and the given Vector.\r\n */\r\n dot: function (src)\r\n {\r\n return this.x * src.x + this.y * src.y;\r\n },\r\n\r\n /**\r\n * Calculate the cross product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#cross\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector2 to cross with this Vector2.\r\n *\r\n * @return {number} The cross product of this Vector and the given Vector.\r\n */\r\n cross: function (src)\r\n {\r\n return this.x * src.y - this.y * src.x;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector2 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n lerp: function (src, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n\r\n this.x = ax + t * (src.x - ax);\r\n this.y = ay + t * (src.y - ay);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector2#transformMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector2 with.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n transformMat3: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[3] * y + m[6];\r\n this.y = m[1] * x + m[4] * y + m[7];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector2#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector2 with.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[12];\r\n this.y = m[1] * x + m[5] * y + m[13];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0).\r\n *\r\n * @method Phaser.Math.Vector2#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Limit the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#limit\r\n * @since 3.23.0\r\n *\r\n * @param {number} max - The maximum length.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n limit: function (max)\r\n {\r\n var len = this.length();\r\n\r\n if (len && len > max)\r\n {\r\n this.scale(max / len);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reflect this Vector off a line defined by a normal.\r\n *\r\n * @method Phaser.Math.Vector2#reflect\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Math.Vector2} normal - A vector perpendicular to the line.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n reflect: function (normal)\r\n {\r\n normal = normal.clone().normalize();\r\n\r\n return this.subtract(normal.scale(2 * this.dot(normal)));\r\n },\r\n\r\n /**\r\n * Reflect this Vector across another.\r\n *\r\n * @method Phaser.Math.Vector2#mirror\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Math.Vector2} axis - A vector to reflect across.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n mirror: function (axis)\r\n {\r\n return this.reflect(axis).negate();\r\n },\r\n\r\n /**\r\n * Rotate this Vector by an angle amount.\r\n *\r\n * @method Phaser.Math.Vector2#rotate\r\n * @since 3.23.0\r\n *\r\n * @param {number} delta - The angle to rotate by, in radians.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n rotate: function (delta)\r\n {\r\n var cos = Math.cos(delta);\r\n var sin = Math.sin(delta);\r\n\r\n return this.set(cos * this.x - sin * this.y, sin * this.x + cos * this.y);\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A static zero Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.ZERO\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.1.0\r\n */\r\nVector2.ZERO = new Vector2();\r\n\r\n/**\r\n * A static right Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.RIGHT\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.RIGHT = new Vector2(1, 0);\r\n\r\n/**\r\n * A static left Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.LEFT\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.LEFT = new Vector2(-1, 0);\r\n\r\n/**\r\n * A static up Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.UP\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.UP = new Vector2(0, -1);\r\n\r\n/**\r\n * A static down Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.DOWN\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.DOWN = new Vector2(0, 1);\r\n\r\n/**\r\n * A static one Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.ONE\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.ONE = new Vector2(1, 1);\r\n\r\nmodule.exports = Vector2;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 3D space.\r\n *\r\n * A three-component vector.\r\n *\r\n * @class Vector3\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n */\r\nvar Vector3 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector3 (x, y, z)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The z component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.z = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Set this Vector to point up.\r\n *\r\n * Sets the y component of the vector to 1, and the others to 0.\r\n *\r\n * @method Phaser.Math.Vector3#up\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n up: function ()\r\n {\r\n this.x = 0;\r\n this.y = 1;\r\n this.z = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} A new Vector3 object containing this Vectors values.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector3(this.x, this.y, this.z);\r\n },\r\n\r\n /**\r\n * Calculate the cross (vector) product of two given Vectors.\r\n *\r\n * @method Phaser.Math.Vector3#crossVectors\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The first Vector to multiply.\r\n * @param {Phaser.Math.Vector3} b - The second Vector to multiply.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n crossVectors: function (a, b)\r\n {\r\n var ax = a.x;\r\n var ay = a.y;\r\n var az = a.z;\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n\r\n this.x = ay * bz - az * by;\r\n this.y = az * bx - ax * bz;\r\n this.z = ax * by - ay * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict equality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector3#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to compare against.\r\n *\r\n * @return {boolean} True if the two vectors strictly match, otherwise false.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z));\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#copy\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x`, `y`, and `z` components of this Vector to the given `x`, `y`, and `z` values.\r\n *\r\n * @method Phaser.Math.Vector3#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y and z components.\r\n * @param {number} [y] - The y value to set for this Vector.\r\n * @param {number} [z] - The z value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n set: function (x, y, z)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n multiply: function (v)\r\n {\r\n this.x *= v.x;\r\n this.y *= v.y;\r\n this.z *= v.z || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector3#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n scale: function (scale)\r\n {\r\n if (isFinite(scale))\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n }\r\n else\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#divide\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n divide: function (v)\r\n {\r\n this.x /= v.x;\r\n this.y /= v.y;\r\n this.z /= v.z || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Negate the `x`, `y` and `z` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#distance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n\r\n return Math.sqrt(dx * dx + dy * dy + dz * dz);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector3#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n\r\n return dx * dx + dy * dy + dz * dz;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n return Math.sqrt(x * x + y * y + z * z);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector3#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n return x * x + y * y + z * z;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector3#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var len = x * x + y * y + z * z;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to dot product with this Vector3.\r\n *\r\n * @return {number} The dot product of this Vector and `v`.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z;\r\n },\r\n\r\n /**\r\n * Calculate the cross (vector) product of this Vector (which will be modified) and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#cross\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector to cross product with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n cross: function (v)\r\n {\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var bx = v.x;\r\n var by = v.y;\r\n var bz = v.z;\r\n\r\n this.x = ay * bz - az * by;\r\n this.y = az * bx - ax * bz;\r\n this.z = ax * by - ay * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector3#transformMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformMat3: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n this.x = x * m[0] + y * m[3] + z * m[6];\r\n this.y = x * m[1] + y * m[4] + z * m[7];\r\n this.z = x * m[2] + y * m[5] + z * m[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector3#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12];\r\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13];\r\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transforms the coordinates of this Vector3 with the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#transformCoordinates\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformCoordinates: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n var tx = (x * m[0]) + (y * m[4]) + (z * m[8]) + m[12];\r\n var ty = (x * m[1]) + (y * m[5]) + (z * m[9]) + m[13];\r\n var tz = (x * m[2]) + (y * m[6]) + (z * m[10]) + m[14];\r\n var tw = (x * m[3]) + (y * m[7]) + (z * m[11]) + m[15];\r\n\r\n this.x = tx / tw;\r\n this.y = ty / tw;\r\n this.z = tz / tw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Quaternion.\r\n *\r\n * @method Phaser.Math.Vector3#transformQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformQuat: function (q)\r\n {\r\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var qx = q.x;\r\n var qy = q.y;\r\n var qz = q.z;\r\n var qw = q.w;\r\n\r\n // calculate quat * vec\r\n var ix = qw * x + qy * z - qz * y;\r\n var iy = qw * y + qz * x - qx * z;\r\n var iz = qw * z + qx * y - qy * x;\r\n var iw = -qx * x - qy * y - qz * z;\r\n\r\n // calculate result * inverse quat\r\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\r\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\r\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the specified matrix, applying a W divide. This is useful for projection,\r\n * e.g. unprojecting a 2D point into 3D space.\r\n *\r\n * @method Phaser.Math.Vector3#project\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to multiply this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n project: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n var a00 = m[0];\r\n var a01 = m[1];\r\n var a02 = m[2];\r\n var a03 = m[3];\r\n var a10 = m[4];\r\n var a11 = m[5];\r\n var a12 = m[6];\r\n var a13 = m[7];\r\n var a20 = m[8];\r\n var a21 = m[9];\r\n var a22 = m[10];\r\n var a23 = m[11];\r\n var a30 = m[12];\r\n var a31 = m[13];\r\n var a32 = m[14];\r\n var a33 = m[15];\r\n\r\n var lw = 1 / (x * a03 + y * a13 + z * a23 + a33);\r\n\r\n this.x = (x * a00 + y * a10 + z * a20 + a30) * lw;\r\n this.y = (x * a01 + y * a11 + z * a21 + a31) * lw;\r\n this.z = (x * a02 + y * a12 + z * a22 + a32) * lw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Unproject this point from 2D space to 3D space.\r\n * The point should have its x and y properties set to\r\n * 2D screen space, and the z either at 0 (near plane)\r\n * or 1 (far plane). The provided matrix is assumed to already\r\n * be combined, i.e. projection * view * model.\r\n *\r\n * After this operation, this vector's (x, y, z) components will\r\n * represent the unprojected 3D coordinate.\r\n *\r\n * @method Phaser.Math.Vector3#unproject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} viewport - Screen x, y, width and height in pixels.\r\n * @param {Phaser.Math.Matrix4} invProjectionView - Combined projection and view matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n unproject: function (viewport, invProjectionView)\r\n {\r\n var viewX = viewport.x;\r\n var viewY = viewport.y;\r\n var viewWidth = viewport.z;\r\n var viewHeight = viewport.w;\r\n\r\n var x = this.x - viewX;\r\n var y = (viewHeight - this.y - 1) - viewY;\r\n var z = this.z;\r\n\r\n this.x = (2 * x) / viewWidth - 1;\r\n this.y = (2 * y) / viewHeight - 1;\r\n this.z = 2 * z - 1;\r\n\r\n return this.project(invProjectionView);\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0, 0).\r\n *\r\n * @method Phaser.Math.Vector3#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A static zero Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.ZERO\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.ZERO = new Vector3();\r\n\r\n/**\r\n * A static right Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.RIGHT\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.RIGHT = new Vector3(1, 0, 0);\r\n\r\n/**\r\n * A static left Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.LEFT\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.LEFT = new Vector3(-1, 0, 0);\r\n\r\n/**\r\n * A static up Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.UP\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.UP = new Vector3(0, -1, 0);\r\n\r\n/**\r\n * A static down Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.DOWN\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.DOWN = new Vector3(0, 1, 0);\r\n\r\n/**\r\n * A static forward Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.FORWARD\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.FORWARD = new Vector3(0, 0, 1);\r\n\r\n/**\r\n * A static back Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.BACK\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.BACK = new Vector3(0, 0, -1);\r\n\r\n/**\r\n * A static one Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.ONE\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.ONE = new Vector3(1, 1, 1);\r\n\r\nmodule.exports = Vector3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 4D space.\r\n *\r\n * A four-component vector.\r\n *\r\n * @class Vector4\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n * @param {number} [w] - The w component.\r\n */\r\nvar Vector4 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector4 (x, y, z, w)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The z component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.z = 0;\r\n\r\n /**\r\n * The w component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.w = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector4.\r\n *\r\n * @method Phaser.Math.Vector4#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} A clone of this Vector4.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector4(this.x, this.y, this.z, this.w);\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z || 0;\r\n this.w = src.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict quality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector4#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The vector to check equality with.\r\n *\r\n * @return {boolean} A boolean indicating whether the two Vectors are equal or not.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z) && (this.w === v.w));\r\n },\r\n\r\n /**\r\n * Set the `x`, `y`, `z` and `w` components of the this Vector to the given `x`, `y`, `z` and `w` values.\r\n *\r\n * @method Phaser.Math.Vector4#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y, z and w components.\r\n * @param {number} y - The y value to set for this Vector.\r\n * @param {number} z - The z value to set for this Vector.\r\n * @param {number} w - The z value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n set: function (x, y, z, w)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector4#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z || 0;\r\n this.w += v.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector4#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z || 0;\r\n this.w -= v.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector4#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n scale: function (scale)\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n this.w *= scale;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return Math.sqrt(x * x + y * y + z * z + w * w);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector4#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector4#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var len = x * x + y * y + z * z + w * w;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n this.w = w * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The Vector4 to dot product with this Vector4.\r\n *\r\n * @return {number} The dot product of this Vector and the given Vector.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The Vector4 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n this.w = aw + t * (v.w - aw);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n multiply: function (v)\r\n {\r\n this.x *= v.x;\r\n this.y *= v.y;\r\n this.z *= v.z || 1;\r\n this.w *= v.w || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#divide\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n divide: function (v)\r\n {\r\n this.x /= v.x;\r\n this.y /= v.y;\r\n this.z /= v.z || 1;\r\n this.w /= v.w || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#distance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n var dw = v.w - this.w || 0;\r\n\r\n return Math.sqrt(dx * dx + dy * dy + dz * dz + dw * dw);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector4#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n var dw = v.w - this.w || 0;\r\n\r\n return dx * dx + dy * dy + dz * dz + dw * dw;\r\n },\r\n\r\n /**\r\n * Negate the `x`, `y`, `z` and `w` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n this.w = -this.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector4#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector4 with.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\r\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\r\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\r\n this.w = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Quaternion.\r\n *\r\n * @method Phaser.Math.Vector4#transformQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n transformQuat: function (q)\r\n {\r\n // TODO: is this really the same as Vector3?\r\n // Also, what about this: http://molecularmusings.wordpress.com/2013/05/24/a-faster-quaternion-vector-multiplication/\r\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var qx = q.x;\r\n var qy = q.y;\r\n var qz = q.z;\r\n var qw = q.w;\r\n\r\n // calculate quat * vec\r\n var ix = qw * x + qy * z - qz * y;\r\n var iy = qw * y + qz * x - qx * z;\r\n var iz = qw * z + qx * y - qy * x;\r\n var iw = -qx * x - qy * y - qz * z;\r\n\r\n // calculate result * inverse quat\r\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\r\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\r\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0, 0, 0).\r\n *\r\n * @method Phaser.Math.Vector4#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n// TODO: Check if these are required internally, if not, remove.\r\nVector4.prototype.sub = Vector4.prototype.subtract;\r\nVector4.prototype.mul = Vector4.prototype.multiply;\r\nVector4.prototype.div = Vector4.prototype.divide;\r\nVector4.prototype.dist = Vector4.prototype.distance;\r\nVector4.prototype.distSq = Vector4.prototype.distanceSq;\r\nVector4.prototype.len = Vector4.prototype.length;\r\nVector4.prototype.lenSq = Vector4.prototype.lengthSq;\r\n\r\nmodule.exports = Vector4;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the two values are within the given `tolerance` of each other.\r\n *\r\n * @function Phaser.Math.Within\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value to use in the calculation.\r\n * @param {number} b - The second value to use in the calculation.\r\n * @param {number} tolerance - The tolerance. Anything equal to or less than this value is considered as being within range.\r\n *\r\n * @return {boolean} Returns `true` if `a` is less than or equal to the tolerance of `b`.\r\n */\r\nvar Within = function (a, b, tolerance)\r\n{\r\n return (Math.abs(a - b) <= tolerance);\r\n};\r\n\r\nmodule.exports = Within;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Wrap the given `value` between `min` and `max.\r\n *\r\n * @function Phaser.Math.Wrap\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to wrap.\r\n * @param {number} min - The minimum value.\r\n * @param {number} max - The maximum value.\r\n *\r\n * @return {number} The wrapped value.\r\n */\r\nvar Wrap = function (value, min, max)\r\n{\r\n var range = max - min;\r\n\r\n return (min + ((((value - min) % range) + range) % range));\r\n};\r\n\r\nmodule.exports = Wrap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\r\n *\r\n * @function Phaser.Math.Angle.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar Between = function (x1, y1, x2, y2)\r\n{\r\n return Math.atan2(y2 - y1, x2 - x1);\r\n};\r\n\r\nmodule.exports = Between;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\r\n *\r\n * Calculates the angle of the vector from the first point to the second point.\r\n *\r\n * @function Phaser.Math.Angle.BetweenPoints\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} point1 - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} point2 - The second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenPoints = function (point1, point2)\r\n{\r\n return Math.atan2(point2.y - point1.y, point2.x - point1.x);\r\n};\r\n\r\nmodule.exports = BetweenPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\r\n *\r\n * The difference between this method and {@link Phaser.Math.Angle.BetweenPoints} is that this assumes the y coordinate\r\n * travels down the screen.\r\n *\r\n * @function Phaser.Math.Angle.BetweenPointsY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} point1 - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} point2 - The second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenPointsY = function (point1, point2)\r\n{\r\n return Math.atan2(point2.x - point1.x, point2.y - point1.y);\r\n};\r\n\r\nmodule.exports = BetweenPointsY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\r\n *\r\n * The difference between this method and {@link Phaser.Math.Angle.Between} is that this assumes the y coordinate\r\n * travels down the screen.\r\n *\r\n * @function Phaser.Math.Angle.BetweenY\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenY = function (x1, y1, x2, y2)\r\n{\r\n return Math.atan2(x2 - x1, y2 - y1);\r\n};\r\n\r\nmodule.exports = BetweenY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('../const');\r\n\r\n/**\r\n * Takes an angle in Phasers default clockwise format and converts it so that\r\n * 0 is North, 90 is West, 180 is South and 270 is East,\r\n * therefore running counter-clockwise instead of clockwise.\r\n * \r\n * You can pass in the angle from a Game Object using:\r\n * \r\n * ```javascript\r\n * var converted = CounterClockwise(gameobject.rotation);\r\n * ```\r\n * \r\n * All values for this function are in radians.\r\n *\r\n * @function Phaser.Math.Angle.CounterClockwise\r\n * @since 3.16.0\r\n *\r\n * @param {number} angle - The angle to convert, in radians.\r\n *\r\n * @return {number} The converted angle, in radians.\r\n */\r\nvar CounterClockwise = function (angle)\r\n{\r\n if (angle > Math.PI)\r\n {\r\n angle -= CONST.PI2;\r\n }\r\n\r\n return Math.abs((((angle + CONST.TAU) % CONST.PI2) - CONST.PI2) % CONST.PI2);\r\n};\r\n\r\nmodule.exports = CounterClockwise;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Normalize an angle to the [0, 2pi] range.\r\n *\r\n * @function Phaser.Math.Angle.Normalize\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to normalize, in radians.\r\n *\r\n * @return {number} The normalized angle, in radians.\r\n */\r\nvar Normalize = function (angle)\r\n{\r\n angle = angle % (2 * Math.PI);\r\n\r\n if (angle >= 0)\r\n {\r\n return angle;\r\n }\r\n else\r\n {\r\n return angle + 2 * Math.PI;\r\n }\r\n};\r\n\r\nmodule.exports = Normalize;\r\n","/**\r\n * @author Richard Davey \r\n * @author @samme\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FloatBetween = require('../FloatBetween');\r\n\r\n/**\r\n * Returns a random angle in the range [-pi, pi].\r\n *\r\n * @function Phaser.Math.Angle.Random\r\n * @since 3.23.0\r\n *\r\n * @return {number} The angle, in radians.\r\n */\r\nvar Random = function ()\r\n{\r\n return FloatBetween(-Math.PI, Math.PI);\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @author @samme\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FloatBetween = require('../FloatBetween');\r\n\r\n/**\r\n * Returns a random angle in the range [-180, 180].\r\n *\r\n * @function Phaser.Math.Angle.RandomDegrees\r\n * @since 3.23.0\r\n *\r\n * @return {number} The angle, in degrees.\r\n */\r\nvar RandomDegrees = function ()\r\n{\r\n return FloatBetween(-180, 180);\r\n};\r\n\r\nmodule.exports = RandomDegrees;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Normalize = require('./Normalize');\r\n\r\n/**\r\n * Reverse the given angle.\r\n *\r\n * @function Phaser.Math.Angle.Reverse\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to reverse, in radians.\r\n *\r\n * @return {number} The reversed angle, in radians.\r\n */\r\nvar Reverse = function (angle)\r\n{\r\n return Normalize(angle + Math.PI);\r\n};\r\n\r\nmodule.exports = Reverse;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = require('../const');\r\n\r\n/**\r\n * Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call.\r\n *\r\n * @function Phaser.Math.Angle.RotateTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} currentAngle - The current angle, in radians.\r\n * @param {number} targetAngle - The target angle to rotate to, in radians.\r\n * @param {number} [lerp=0.05] - The lerp value to add to the current angle.\r\n *\r\n * @return {number} The adjusted angle.\r\n */\r\nvar RotateTo = function (currentAngle, targetAngle, lerp)\r\n{\r\n if (lerp === undefined) { lerp = 0.05; }\r\n\r\n if (currentAngle === targetAngle)\r\n {\r\n return currentAngle;\r\n }\r\n\r\n if (Math.abs(targetAngle - currentAngle) <= lerp || Math.abs(targetAngle - currentAngle) >= (MATH_CONST.PI2 - lerp))\r\n {\r\n currentAngle = targetAngle;\r\n }\r\n else\r\n {\r\n if (Math.abs(targetAngle - currentAngle) > Math.PI)\r\n {\r\n if (targetAngle < currentAngle)\r\n {\r\n targetAngle += MATH_CONST.PI2;\r\n }\r\n else\r\n {\r\n targetAngle -= MATH_CONST.PI2;\r\n }\r\n }\r\n\r\n if (targetAngle > currentAngle)\r\n {\r\n currentAngle += lerp;\r\n }\r\n else if (targetAngle < currentAngle)\r\n {\r\n currentAngle -= lerp;\r\n }\r\n }\r\n\r\n return currentAngle;\r\n};\r\n\r\nmodule.exports = RotateTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Gets the shortest angle between `angle1` and `angle2`.\r\n *\r\n * Both angles must be in the range -180 to 180, which is the same clamped\r\n * range that `sprite.angle` uses, so you can pass in two sprite angles to\r\n * this method and get the shortest angle back between the two of them.\r\n *\r\n * The angle returned will be in the same range. If the returned angle is\r\n * greater than 0 then it's a counter-clockwise rotation, if < 0 then it's\r\n * a clockwise rotation.\r\n *\r\n * TODO: Wrap the angles in this function?\r\n *\r\n * @function Phaser.Math.Angle.ShortestBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle1 - The first angle in the range -180 to 180.\r\n * @param {number} angle2 - The second angle in the range -180 to 180.\r\n *\r\n * @return {number} The shortest angle, in degrees. If greater than zero it's a counter-clockwise rotation.\r\n */\r\nvar ShortestBetween = function (angle1, angle2)\r\n{\r\n var difference = angle2 - angle1;\r\n\r\n if (difference === 0)\r\n {\r\n return 0;\r\n }\r\n\r\n var times = Math.floor((difference - (-180)) / 360);\r\n\r\n return difference - (times * 360);\r\n\r\n};\r\n\r\nmodule.exports = ShortestBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MathWrap = require('../Wrap');\r\n\r\n/**\r\n * Wrap an angle.\r\n *\r\n * Wraps the angle to a value in the range of -PI to PI.\r\n *\r\n * @function Phaser.Math.Angle.Wrap\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to wrap, in radians.\r\n *\r\n * @return {number} The wrapped angle, in radians.\r\n */\r\nvar Wrap = function (angle)\r\n{\r\n return MathWrap(angle, -Math.PI, Math.PI);\r\n};\r\n\r\nmodule.exports = Wrap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Wrap = require('../Wrap');\r\n\r\n/**\r\n * Wrap an angle in degrees.\r\n *\r\n * Wraps the angle to a value in the range of -180 to 180.\r\n *\r\n * @function Phaser.Math.Angle.WrapDegrees\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to wrap, in degrees.\r\n *\r\n * @return {number} The wrapped angle, in degrees.\r\n */\r\nvar WrapDegrees = function (angle)\r\n{\r\n return Wrap(angle, -180, 180);\r\n};\r\n\r\nmodule.exports = WrapDegrees;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Angle\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Between: require('./Between'),\r\n BetweenPoints: require('./BetweenPoints'),\r\n BetweenPointsY: require('./BetweenPointsY'),\r\n BetweenY: require('./BetweenY'),\r\n CounterClockwise: require('./CounterClockwise'),\r\n Normalize: require('./Normalize'),\r\n Random: require('./Random'),\r\n RandomDegrees: require('./RandomDegrees'),\r\n Reverse: require('./Reverse'),\r\n RotateTo: require('./RotateTo'),\r\n ShortestBetween: require('./ShortestBetween'),\r\n Wrap: require('./Wrap'),\r\n WrapDegrees: require('./WrapDegrees')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = {\r\n\r\n /**\r\n * The value of PI * 2.\r\n * \r\n * @name Phaser.Math.PI2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n PI2: Math.PI * 2,\r\n\r\n /**\r\n * The value of PI * 0.5.\r\n * \r\n * @name Phaser.Math.TAU\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n TAU: Math.PI * 0.5,\r\n\r\n /**\r\n * An epsilon value (1.0e-6)\r\n * \r\n * @name Phaser.Math.EPSILON\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n EPSILON: 1.0e-6,\r\n\r\n /**\r\n * For converting degrees to radians (PI / 180)\r\n * \r\n * @name Phaser.Math.DEG_TO_RAD\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n DEG_TO_RAD: Math.PI / 180,\r\n\r\n /**\r\n * For converting radians to degrees (180 / PI)\r\n * \r\n * @name Phaser.Math.RAD_TO_DEG\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n RAD_TO_DEG: 180 / Math.PI,\r\n\r\n /**\r\n * An instance of the Random Number Generator.\r\n * This is not set until the Game boots.\r\n * \r\n * @name Phaser.Math.RND\r\n * @type {Phaser.Math.RandomDataGenerator}\r\n * @since 3.0.0\r\n */\r\n RND: null,\r\n\r\n /**\r\n * The minimum safe integer this browser supports.\r\n * We use a const for backward compatibility with Internet Explorer.\r\n * \r\n * @name Phaser.Math.MIN_SAFE_INTEGER\r\n * @type {number}\r\n * @since 3.21.0\r\n */\r\n MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991,\r\n\r\n /**\r\n * The maximum safe integer this browser supports.\r\n * We use a const for backward compatibility with Internet Explorer.\r\n * \r\n * @name Phaser.Math.MAX_SAFE_INTEGER\r\n * @type {number}\r\n * @since 3.21.0\r\n */\r\n MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991\r\n\r\n};\r\n\r\nmodule.exports = MATH_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points).\r\n *\r\n * @function Phaser.Math.Distance.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar DistanceBetween = function (x1, y1, x2, y2)\r\n{\r\n var dx = x1 - x2;\r\n var dy = y1 - y2;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n};\r\n\r\nmodule.exports = DistanceBetween;\r\n","/**\r\n * @author samme\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two points.\r\n *\r\n * @function Phaser.Math.Distance.BetweenPoints\r\n * @since 3.22.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} a - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} b - The second point.\r\n *\r\n * @return {number} The distance between the points.\r\n */\r\nvar DistanceBetweenPoints = function (a, b)\r\n{\r\n var dx = a.x - b.x;\r\n var dy = a.y - b.y;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n};\r\n\r\nmodule.exports = DistanceBetweenPoints;\r\n","/**\r\n * @author samme\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the squared distance between two points.\r\n *\r\n * @function Phaser.Math.Distance.BetweenPointsSquared\r\n * @since 3.22.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} a - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} b - The second point.\r\n *\r\n * @return {number} The squared distance between the points.\r\n */\r\nvar DistanceBetweenPointsSquared = function (a, b)\r\n{\r\n var dx = a.x - b.x;\r\n var dy = a.y - b.y;\r\n\r\n return dx * dx + dy * dy;\r\n};\r\n\r\nmodule.exports = DistanceBetweenPointsSquared;\r\n","/**\r\n * @author samme\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the Chebyshev distance between two sets of coordinates (points).\r\n *\r\n * Chebyshev distance (or chessboard distance) is the maximum of the horizontal and vertical distances.\r\n * It's the effective distance when movement can be horizontal, vertical, or diagonal.\r\n *\r\n * @function Phaser.Math.Distance.Chebyshev\r\n * @since 3.22.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar ChebyshevDistance = function (x1, y1, x2, y2)\r\n{\r\n return Math.max(Math.abs(x1 - x2), Math.abs(y1 - y2));\r\n};\r\n\r\nmodule.exports = ChebyshevDistance;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points) to the power of `pow`.\r\n *\r\n * @function Phaser.Math.Distance.Power\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n * @param {number} pow - The exponent.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar DistancePower = function (x1, y1, x2, y2, pow)\r\n{\r\n if (pow === undefined) { pow = 2; }\r\n\r\n return Math.sqrt(Math.pow(x2 - x1, pow) + Math.pow(y2 - y1, pow));\r\n};\r\n\r\nmodule.exports = DistancePower;\r\n","/**\r\n * @author samme\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the snake distance between two sets of coordinates (points).\r\n *\r\n * Snake distance (rectilinear distance, Manhattan distance) is the sum of the horizontal and vertical distances.\r\n * It's the effective distance when movement is allowed only horizontally or vertically (but not both).\r\n *\r\n * @function Phaser.Math.Distance.Snake\r\n * @since 3.22.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar SnakeDistance = function (x1, y1, x2, y2)\r\n{\r\n return Math.abs(x1 - x2) + Math.abs(y1 - y2);\r\n};\r\n\r\nmodule.exports = SnakeDistance;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points), squared.\r\n *\r\n * @function Phaser.Math.Distance.Squared\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point, squared.\r\n */\r\nvar DistanceSquared = function (x1, y1, x2, y2)\r\n{\r\n var dx = x1 - x2;\r\n var dy = y1 - y2;\r\n\r\n return dx * dx + dy * dy;\r\n};\r\n\r\nmodule.exports = DistanceSquared;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Distance\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Between: require('./DistanceBetween'),\r\n BetweenPoints: require('./DistanceBetweenPoints'),\r\n BetweenPointsSquared: require('./DistanceBetweenPointsSquared'),\r\n Chebyshev: require('./DistanceChebyshev'),\r\n Power: require('./DistancePower'),\r\n Snake: require('./DistanceSnake'),\r\n Squared: require('./DistanceSquared')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Back.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n return v * v * ((overshoot + 1) * v - overshoot);\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Back.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n var s = overshoot * 1.525;\r\n\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * (v * v * ((s + 1) * v - s));\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * ((s + 1) * v + s) + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Back.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n return --v * v * ((overshoot + 1) * v + overshoot) + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Back\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n v = 1 - v;\r\n\r\n if (v < 1 / 2.75)\r\n {\r\n return 1 - (7.5625 * v * v);\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n return 1 - (7.5625 * (v -= 1.5 / 2.75) * v + 0.75);\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n return 1 - (7.5625 * (v -= 2.25 / 2.75) * v + 0.9375);\r\n }\r\n else\r\n {\r\n return 1 - (7.5625 * (v -= 2.625 / 2.75) * v + 0.984375);\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n var reverse = false;\r\n\r\n if (v < 0.5)\r\n {\r\n v = 1 - (v * 2);\r\n reverse = true;\r\n }\r\n else\r\n {\r\n v = (v * 2) - 1;\r\n }\r\n\r\n if (v < 1 / 2.75)\r\n {\r\n v = 7.5625 * v * v;\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n v = 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n v = 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\r\n }\r\n else\r\n {\r\n v = 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\r\n }\r\n\r\n if (reverse)\r\n {\r\n return (1 - v) * 0.5;\r\n }\r\n else\r\n {\r\n return v * 0.5 + 0.5;\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n if (v < 1 / 2.75)\r\n {\r\n return 7.5625 * v * v;\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n return 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n return 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\r\n }\r\n else\r\n {\r\n return 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Bounce\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Circular.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return 1 - Math.sqrt(1 - v * v);\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Circular.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return -0.5 * (Math.sqrt(1 - v * v) - 1);\r\n }\r\n else\r\n {\r\n return 0.5 * (Math.sqrt(1 - (v -= 2) * v) + 1);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Circular.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return Math.sqrt(1 - (--v * v));\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Circular\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v;\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * v + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return --v * v * v + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Cubic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n return -(amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n if ((v *= 2) < 1)\r\n {\r\n return -0.5 * (amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\r\n }\r\n else\r\n {\r\n return amplitude * Math.pow(2, -10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period) * 0.5 + 1;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n return (amplitude * Math.pow(2, -10 * v) * Math.sin((v - s) * (2 * Math.PI) / period) + 1);\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Elastic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Expo.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return Math.pow(2, 10 * (v - 1)) - 0.001;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Expo.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * Math.pow(2, 10 * (v - 1));\r\n }\r\n else\r\n {\r\n return 0.5 * (2 - Math.pow(2, -10 * (v - 1)));\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Expo.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return 1 - Math.pow(2, -10 * v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Expo\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Back: require('./back'),\r\n Bounce: require('./bounce'),\r\n Circular: require('./circular'),\r\n Cubic: require('./cubic'),\r\n Elastic: require('./elastic'),\r\n Expo: require('./expo'),\r\n Linear: require('./linear'),\r\n Quadratic: require('./quadratic'),\r\n Quartic: require('./quartic'),\r\n Quintic: require('./quintic'),\r\n Sine: require('./sine'),\r\n Stepped: require('./stepped')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Linear easing (no variation).\r\n *\r\n * @function Phaser.Math.Easing.Linear\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Linear = function (v)\r\n{\r\n return v;\r\n};\r\n\r\nmodule.exports = Linear;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nmodule.exports = require('./Linear');\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v;\r\n }\r\n else\r\n {\r\n return -0.5 * (--v * (v - 2) - 1);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return v * (2 - v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quadratic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v * v;\r\n }\r\n else\r\n {\r\n return -0.5 * ((v -= 2) * v * v * v - 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return 1 - (--v * v * v * v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quartic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v * v * v;\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * v * v * v + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return --v * v * v * v * v + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quintic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Sine.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 1 - Math.cos(v * Math.PI / 2);\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Sine.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 0.5 * (1 - Math.cos(Math.PI * v));\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Sine.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return Math.sin(v * Math.PI / 2);\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Sine\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Stepped easing.\r\n *\r\n * @function Phaser.Math.Easing.Stepped\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [steps=1] - The number of steps in the ease.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Stepped = function (v, steps)\r\n{\r\n if (steps === undefined) { steps = 1; }\r\n\r\n if (v <= 0)\r\n {\r\n return 0;\r\n }\r\n else if (v >= 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return (((steps * v) | 0) + 1) * (1 / steps);\r\n }\r\n};\r\n\r\nmodule.exports = Stepped;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Stepped\r\n */\r\n\r\nmodule.exports = require('./Stepped');\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the fuzzy ceiling of the given value.\r\n *\r\n * @function Phaser.Math.Fuzzy.Ceil\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {number} The fuzzy ceiling of the value.\r\n */\r\nvar Ceil = function (value, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.ceil(value - epsilon);\r\n};\r\n\r\nmodule.exports = Ceil;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether the given values are fuzzily equal.\r\n *\r\n * Two numbers are fuzzily equal if their difference is less than `epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.Equal\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`.\r\n */\r\nvar Equal = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.abs(a - b) < epsilon;\r\n};\r\n\r\nmodule.exports = Equal;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the fuzzy floor of the given value.\r\n *\r\n * @function Phaser.Math.Fuzzy.Floor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {number} The floor of the value.\r\n */\r\nvar Floor = function (value, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.floor(value + epsilon);\r\n};\r\n\r\nmodule.exports = Floor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether `a` is fuzzily greater than `b`.\r\n *\r\n * `a` is fuzzily greater than `b` if it is more than `b - epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.GreaterThan\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if `a` is fuzzily greater than than `b`, otherwise `false`.\r\n */\r\nvar GreaterThan = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return a > b - epsilon;\r\n};\r\n\r\nmodule.exports = GreaterThan;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether `a` is fuzzily less than `b`.\r\n *\r\n * `a` is fuzzily less than `b` if it is less than `b + epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.LessThan\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if `a` is fuzzily less than `b`, otherwise `false`.\r\n */\r\nvar LessThan = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return a < b + epsilon;\r\n};\r\n\r\nmodule.exports = LessThan;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Fuzzy\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Ceil: require('./Ceil'),\r\n Equal: require('./Equal'),\r\n Floor: require('./Floor'),\r\n GreaterThan: require('./GreaterThan'),\r\n LessThan: require('./LessThan')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\nvar Extend = require('../utils/object/Extend');\r\n\r\n/**\r\n * @namespace Phaser.Math\r\n */\r\n\r\nvar PhaserMath = {\r\n\r\n // Collections of functions\r\n Angle: require('./angle/'),\r\n Distance: require('./distance/'),\r\n Easing: require('./easing/'),\r\n Fuzzy: require('./fuzzy/'),\r\n Interpolation: require('./interpolation/'),\r\n Pow2: require('./pow2/'),\r\n Snap: require('./snap/'),\r\n\r\n // Expose the RNG Class\r\n RandomDataGenerator: require('./random-data-generator/RandomDataGenerator'),\r\n\r\n // Single functions\r\n Average: require('./Average'),\r\n Bernstein: require('./Bernstein'),\r\n Between: require('./Between'),\r\n CatmullRom: require('./CatmullRom'),\r\n CeilTo: require('./CeilTo'),\r\n Clamp: require('./Clamp'),\r\n DegToRad: require('./DegToRad'),\r\n Difference: require('./Difference'),\r\n Factorial: require('./Factorial'),\r\n FloatBetween: require('./FloatBetween'),\r\n FloorTo: require('./FloorTo'),\r\n FromPercent: require('./FromPercent'),\r\n GetSpeed: require('./GetSpeed'),\r\n IsEven: require('./IsEven'),\r\n IsEvenStrict: require('./IsEvenStrict'),\r\n Linear: require('./Linear'),\r\n MaxAdd: require('./MaxAdd'),\r\n MinSub: require('./MinSub'),\r\n Percent: require('./Percent'),\r\n RadToDeg: require('./RadToDeg'),\r\n RandomXY: require('./RandomXY'),\r\n RandomXYZ: require('./RandomXYZ'),\r\n RandomXYZW: require('./RandomXYZW'),\r\n Rotate: require('./Rotate'),\r\n RotateAround: require('./RotateAround'),\r\n RotateAroundDistance: require('./RotateAroundDistance'),\r\n RotateTo: require('./RotateTo'),\r\n RoundAwayFromZero: require('./RoundAwayFromZero'),\r\n RoundTo: require('./RoundTo'),\r\n SinCosTableGenerator: require('./SinCosTableGenerator'),\r\n SmootherStep: require('./SmootherStep'),\r\n SmoothStep: require('./SmoothStep'),\r\n ToXY: require('./ToXY'),\r\n TransformXY: require('./TransformXY'),\r\n Within: require('./Within'),\r\n Wrap: require('./Wrap'),\r\n\r\n // Vector classes\r\n Vector2: require('./Vector2'),\r\n Vector3: require('./Vector3'),\r\n Vector4: require('./Vector4'),\r\n Matrix3: require('./Matrix3'),\r\n Matrix4: require('./Matrix4'),\r\n Quaternion: require('./Quaternion'),\r\n RotateVec3: require('./RotateVec3')\r\n\r\n};\r\n\r\n// Merge in the consts\r\n\r\nPhaserMath = Extend(false, PhaserMath, CONST);\r\n\r\n// Export it\r\n\r\nmodule.exports = PhaserMath;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bernstein = require('../Bernstein');\r\n\r\n/**\r\n * A bezier interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.Bezier\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar BezierInterpolation = function (v, k)\r\n{\r\n var b = 0;\r\n var n = v.length - 1;\r\n\r\n for (var i = 0; i <= n; i++)\r\n {\r\n b += Math.pow(1 - k, n - i) * Math.pow(k, i) * v[i] * Bernstein(n, i);\r\n }\r\n\r\n return b;\r\n};\r\n\r\nmodule.exports = BezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CatmullRom = require('../CatmullRom');\r\n\r\n/**\r\n * A Catmull-Rom interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.CatmullRom\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar CatmullRomInterpolation = function (v, k)\r\n{\r\n var m = v.length - 1;\r\n var f = m * k;\r\n var i = Math.floor(f);\r\n\r\n if (v[0] === v[m])\r\n {\r\n if (k < 0)\r\n {\r\n i = Math.floor(f = m * (1 + k));\r\n }\r\n\r\n return CatmullRom(f - i, v[(i - 1 + m) % m], v[i], v[(i + 1) % m], v[(i + 2) % m]);\r\n }\r\n else\r\n {\r\n if (k < 0)\r\n {\r\n return v[0] - (CatmullRom(-f, v[0], v[0], v[1], v[1]) - v[0]);\r\n }\r\n\r\n if (k > 1)\r\n {\r\n return v[m] - (CatmullRom(f - m, v[m], v[m], v[m - 1], v[m - 1]) - v[m]);\r\n }\r\n\r\n return CatmullRom(f - i, v[i ? i - 1 : 0], v[i], v[m < i + 1 ? m : i + 1], v[m < i + 2 ? m : i + 2]);\r\n }\r\n};\r\n\r\nmodule.exports = CatmullRomInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P0 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return k * k * k * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P1 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return 3 * k * k * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P2 (t, p)\r\n{\r\n return 3 * (1 - t) * t * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P3 (t, p)\r\n{\r\n return t * t * t * p;\r\n}\r\n\r\n/**\r\n * A cubic bezier interpolation method.\r\n *\r\n * https://medium.com/@adrian_cooney/bezier-interpolation-13b68563313a\r\n *\r\n * @function Phaser.Math.Interpolation.CubicBezier\r\n * @since 3.0.0\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} p0 - The start point.\r\n * @param {number} p1 - The first control point.\r\n * @param {number} p2 - The second control point.\r\n * @param {number} p3 - The end point.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar CubicBezierInterpolation = function (t, p0, p1, p2, p3)\r\n{\r\n return P0(t, p0) + P1(t, p1) + P2(t, p2) + P3(t, p3);\r\n};\r\n\r\nmodule.exports = CubicBezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Linear = require('../Linear');\r\n\r\n/**\r\n * A linear interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.Linear\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Linear_interpolation}\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {!number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {!number} The interpolated value.\r\n */\r\nvar LinearInterpolation = function (v, k)\r\n{\r\n var m = v.length - 1;\r\n var f = m * k;\r\n var i = Math.floor(f);\r\n\r\n if (k < 0)\r\n {\r\n return Linear(v[0], v[1], f);\r\n }\r\n else if (k > 1)\r\n {\r\n return Linear(v[m], v[m - 1], m - f);\r\n }\r\n else\r\n {\r\n return Linear(v[i], v[(i + 1 > m) ? m : i + 1], f - i);\r\n }\r\n};\r\n\r\nmodule.exports = LinearInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P0 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return k * k * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P1 (t, p)\r\n{\r\n return 2 * (1 - t) * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P2 (t, p)\r\n{\r\n return t * t * p;\r\n}\r\n\r\n// https://github.com/mrdoob/three.js/blob/master/src/extras/core/Interpolations.js\r\n\r\n/**\r\n * A quadratic bezier interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.QuadraticBezier\r\n * @since 3.2.0\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} p0 - The start point.\r\n * @param {number} p1 - The control point.\r\n * @param {number} p2 - The end point.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar QuadraticBezierInterpolation = function (t, p0, p1, p2)\r\n{\r\n return P0(t, p0) + P1(t, p1) + P2(t, p2);\r\n};\r\n\r\nmodule.exports = QuadraticBezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SmoothStep = require('../SmoothStep');\r\n\r\n/**\r\n * A Smooth Step interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.SmoothStep\r\n * @since 3.9.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar SmoothStepInterpolation = function (t, min, max)\r\n{\r\n return min + (max - min) * SmoothStep(t, 0, 1);\r\n};\r\n\r\nmodule.exports = SmoothStepInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SmootherStep = require('../SmootherStep');\r\n\r\n/**\r\n * A Smoother Step interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.SmootherStep\r\n * @since 3.9.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar SmootherStepInterpolation = function (t, min, max)\r\n{\r\n return min + (max - min) * SmootherStep(t, 0, 1);\r\n};\r\n\r\nmodule.exports = SmootherStepInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Interpolation\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Bezier: require('./BezierInterpolation'),\r\n CatmullRom: require('./CatmullRomInterpolation'),\r\n CubicBezier: require('./CubicBezierInterpolation'),\r\n Linear: require('./LinearInterpolation'),\r\n QuadraticBezier: require('./QuadraticBezierInterpolation'),\r\n SmoothStep: require('./SmoothStepInterpolation'),\r\n SmootherStep: require('./SmootherStepInterpolation')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the nearest power of 2 to the given `value`.\r\n *\r\n * @function Phaser.Math.Pow2.GetNext\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n *\r\n * @return {integer} The nearest power of 2 to `value`.\r\n */\r\nvar GetPowerOfTwo = function (value)\r\n{\r\n var index = Math.log(value) / 0.6931471805599453;\r\n\r\n return (1 << Math.ceil(index));\r\n};\r\n\r\nmodule.exports = GetPowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the given `width` and `height` are a power of two.\r\n * Useful for checking texture dimensions.\r\n *\r\n * @function Phaser.Math.Pow2.IsSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width.\r\n * @param {number} height - The height.\r\n *\r\n * @return {boolean} `true` if `width` and `height` are a power of two, otherwise `false`.\r\n */\r\nvar IsSizePowerOfTwo = function (width, height)\r\n{\r\n return (width > 0 && (width & (width - 1)) === 0 && height > 0 && (height & (height - 1)) === 0);\r\n};\r\n\r\nmodule.exports = IsSizePowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tests the value and returns `true` if it is a power of two.\r\n *\r\n * @function Phaser.Math.Pow2.IsValue\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to check if it's a power of two.\r\n *\r\n * @return {boolean} Returns `true` if `value` is a power of two, otherwise `false`.\r\n */\r\nvar IsValuePowerOfTwo = function (value)\r\n{\r\n return (value > 0 && (value & (value - 1)) === 0);\r\n};\r\n\r\nmodule.exports = IsValuePowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Pow2\r\n */\r\n\r\nmodule.exports = {\r\n\r\n GetNext: require('./GetPowerOfTwo'),\r\n IsSize: require('./IsSizePowerOfTwo'),\r\n IsValue: require('./IsValuePowerOfTwo')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A seeded Random Data Generator.\r\n * \r\n * Access via `Phaser.Math.RND` which is an instance of this class pre-defined\r\n * by Phaser. Or, create your own instance to use as you require.\r\n * \r\n * The `Math.RND` generator is seeded by the Game Config property value `seed`.\r\n * If no such config property exists, a random number is used.\r\n * \r\n * If you create your own instance of this class you should provide a seed for it.\r\n * If no seed is given it will use a 'random' one based on Date.now.\r\n *\r\n * @class RandomDataGenerator\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} [seeds] - The seeds to use for the random number generator.\r\n */\r\nvar RandomDataGenerator = new Class({\r\n\r\n initialize:\r\n\r\n function RandomDataGenerator (seeds)\r\n {\r\n if (seeds === undefined) { seeds = [ (Date.now() * Math.random()).toString() ]; }\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#c\r\n * @type {number}\r\n * @default 1\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.c = 1;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s0\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s0 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s1\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s1 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s2\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s2 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#n\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.2.0\r\n */\r\n this.n = 0;\r\n\r\n /**\r\n * Signs to choose from.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#signs\r\n * @type {number[]}\r\n * @since 3.0.0\r\n */\r\n this.signs = [ -1, 1 ];\r\n\r\n if (seeds)\r\n {\r\n this.init(seeds);\r\n }\r\n },\r\n\r\n /**\r\n * Private random helper.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#rnd\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @return {number} A random number.\r\n */\r\n rnd: function ()\r\n {\r\n var t = 2091639 * this.s0 + this.c * 2.3283064365386963e-10; // 2^-32\r\n\r\n this.c = t | 0;\r\n this.s0 = this.s1;\r\n this.s1 = this.s2;\r\n this.s2 = t - this.c;\r\n\r\n return this.s2;\r\n },\r\n\r\n /**\r\n * Internal method that creates a seed hash.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#hash\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {string} data - The value to hash.\r\n *\r\n * @return {number} The hashed value.\r\n */\r\n hash: function (data)\r\n {\r\n var h;\r\n var n = this.n;\r\n\r\n data = data.toString();\r\n\r\n for (var i = 0; i < data.length; i++)\r\n {\r\n n += data.charCodeAt(i);\r\n h = 0.02519603282416938 * n;\r\n n = h >>> 0;\r\n h -= n;\r\n h *= n;\r\n n = h >>> 0;\r\n h -= n;\r\n n += h * 0x100000000;// 2^32\r\n }\r\n\r\n this.n = n;\r\n\r\n return (n >>> 0) * 2.3283064365386963e-10;// 2^-32\r\n },\r\n\r\n /**\r\n * Initialize the state of the random data generator.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#init\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} seeds - The seeds to initialize the random data generator with.\r\n */\r\n init: function (seeds)\r\n {\r\n if (typeof seeds === 'string')\r\n {\r\n this.state(seeds);\r\n }\r\n else\r\n {\r\n this.sow(seeds);\r\n }\r\n },\r\n\r\n /**\r\n * Reset the seed of the random data generator.\r\n *\r\n * _Note_: the seed array is only processed up to the first `undefined` (or `null`) value, should such be present.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#sow\r\n * @since 3.0.0\r\n *\r\n * @param {string[]} seeds - The array of seeds: the `toString()` of each value is used.\r\n */\r\n sow: function (seeds)\r\n {\r\n // Always reset to default seed\r\n this.n = 0xefc8249d;\r\n this.s0 = this.hash(' ');\r\n this.s1 = this.hash(' ');\r\n this.s2 = this.hash(' ');\r\n this.c = 1;\r\n\r\n if (!seeds)\r\n {\r\n return;\r\n }\r\n\r\n // Apply any seeds\r\n for (var i = 0; i < seeds.length && (seeds[i] != null); i++)\r\n {\r\n var seed = seeds[i];\r\n\r\n this.s0 -= this.hash(seed);\r\n this.s0 += ~~(this.s0 < 0);\r\n this.s1 -= this.hash(seed);\r\n this.s1 += ~~(this.s1 < 0);\r\n this.s2 -= this.hash(seed);\r\n this.s2 += ~~(this.s2 < 0);\r\n }\r\n },\r\n\r\n /**\r\n * Returns a random integer between 0 and 2^32.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#integer\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random integer between 0 and 2^32.\r\n */\r\n integer: function ()\r\n {\r\n // 2^32\r\n return this.rnd() * 0x100000000;\r\n },\r\n\r\n /**\r\n * Returns a random real number between 0 and 1.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#frac\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between 0 and 1.\r\n */\r\n frac: function ()\r\n {\r\n // 2^-53\r\n return this.rnd() + (this.rnd() * 0x200000 | 0) * 1.1102230246251565e-16;\r\n },\r\n\r\n /**\r\n * Returns a random real number between 0 and 2^32.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#real\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between 0 and 2^32.\r\n */\r\n real: function ()\r\n {\r\n return this.integer() + this.frac();\r\n },\r\n\r\n /**\r\n * Returns a random integer between and including min and max.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#integerInRange\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n integerInRange: function (min, max)\r\n {\r\n return Math.floor(this.realInRange(0, max - min + 1) + min);\r\n },\r\n\r\n /**\r\n * Returns a random integer between and including min and max.\r\n * This method is an alias for RandomDataGenerator.integerInRange.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#between\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n between: function (min, max)\r\n {\r\n return Math.floor(this.realInRange(0, max - min + 1) + min);\r\n },\r\n\r\n /**\r\n * Returns a random real number between min and max.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#realInRange\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n realInRange: function (min, max)\r\n {\r\n return this.frac() * (max - min) + min;\r\n },\r\n\r\n /**\r\n * Returns a random real number between -1 and 1.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#normal\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between -1 and 1.\r\n */\r\n normal: function ()\r\n {\r\n return 1 - (2 * this.frac());\r\n },\r\n\r\n /**\r\n * Returns a valid RFC4122 version4 ID hex string from https://gist.github.com/1308368\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#uuid\r\n * @since 3.0.0\r\n *\r\n * @return {string} A valid RFC4122 version4 ID hex string\r\n */\r\n uuid: function ()\r\n {\r\n var a = '';\r\n var b = '';\r\n\r\n for (b = a = ''; a++ < 36; b += ~a % 5 | a * 3 & 4 ? (a ^ 15 ? 8 ^ this.frac() * (a ^ 20 ? 16 : 4) : 4).toString(16) : '-')\r\n {\r\n // eslint-disable-next-line no-empty\r\n }\r\n\r\n return b;\r\n },\r\n\r\n /**\r\n * Returns a random element from within the given array.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#pick\r\n * @since 3.0.0\r\n * \r\n * @generic T\r\n * @genericUse {T[]} - [array]\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {T[]} array - The array to pick a random element from.\r\n *\r\n * @return {T} A random member of the array.\r\n */\r\n pick: function (array)\r\n {\r\n return array[this.integerInRange(0, array.length - 1)];\r\n },\r\n\r\n /**\r\n * Returns a sign to be used with multiplication operator.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#sign\r\n * @since 3.0.0\r\n *\r\n * @return {number} -1 or +1.\r\n */\r\n sign: function ()\r\n {\r\n return this.pick(this.signs);\r\n },\r\n\r\n /**\r\n * Returns a random element from within the given array, favoring the earlier entries.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#weightedPick\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array]\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {T[]} array - The array to pick a random element from.\r\n *\r\n * @return {T} A random member of the array.\r\n */\r\n weightedPick: function (array)\r\n {\r\n return array[~~(Math.pow(this.frac(), 2) * (array.length - 1) + 0.5)];\r\n },\r\n\r\n /**\r\n * Returns a random timestamp between min and max, or between the beginning of 2000 and the end of 2020 if min and max aren't specified.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#timestamp\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random timestamp between min and max.\r\n */\r\n timestamp: function (min, max)\r\n {\r\n return this.realInRange(min || 946684800000, max || 1577862000000);\r\n },\r\n\r\n /**\r\n * Returns a random angle between -180 and 180.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#angle\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random number between -180 and 180.\r\n */\r\n angle: function ()\r\n {\r\n return this.integerInRange(-180, 180);\r\n },\r\n\r\n /**\r\n * Returns a random rotation in radians, between -3.141 and 3.141\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#rotation\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random number between -3.141 and 3.141\r\n */\r\n rotation: function ()\r\n {\r\n return this.realInRange(-3.1415926, 3.1415926);\r\n },\r\n\r\n /**\r\n * Gets or Sets the state of the generator. This allows you to retain the values\r\n * that the generator is using between games, i.e. in a game save file.\r\n *\r\n * To seed this generator with a previously saved state you can pass it as the\r\n * `seed` value in your game config, or call this method directly after Phaser has booted.\r\n *\r\n * Call this method with no parameters to return the current state.\r\n *\r\n * If providing a state it should match the same format that this method\r\n * returns, which is a string with a header `!rnd` followed by the `c`,\r\n * `s0`, `s1` and `s2` values respectively, each comma-delimited.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#state\r\n * @since 3.0.0\r\n *\r\n * @param {string} [state] - Generator state to be set.\r\n *\r\n * @return {string} The current state of the generator.\r\n */\r\n state: function (state)\r\n {\r\n if (typeof state === 'string' && state.match(/^!rnd/))\r\n {\r\n state = state.split(',');\r\n\r\n this.c = parseFloat(state[1]);\r\n this.s0 = parseFloat(state[2]);\r\n this.s1 = parseFloat(state[3]);\r\n this.s2 = parseFloat(state[4]);\r\n }\r\n\r\n return [ '!rnd', this.c, this.s0, this.s1, this.s2 ].join(',');\r\n },\r\n\r\n /**\r\n * Shuffles the given array, using the current seed.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#shuffle\r\n * @since 3.7.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array,$return]\r\n *\r\n * @param {T[]} [array] - The array to be shuffled.\r\n *\r\n * @return {T[]} The shuffled array.\r\n */\r\n shuffle: function (array)\r\n {\r\n var len = array.length - 1;\r\n\r\n for (var i = len; i > 0; i--)\r\n {\r\n var randomIndex = Math.floor(this.frac() * (i + 1));\r\n var itemAtIndex = array[randomIndex];\r\n\r\n array[randomIndex] = array[i];\r\n array[i] = itemAtIndex;\r\n }\r\n\r\n return array;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = RandomDataGenerator;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using ceil.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `15`.\r\n * As will `14` snap to `15`... but `16` will snap to `20`.\r\n *\r\n * @function Phaser.Math.Snap.Ceil\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapCeil = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.ceil(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapCeil;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using floor.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10`.\r\n * As will `14` snap to `10`... but `16` will snap to `15`.\r\n *\r\n * @function Phaser.Math.Snap.Floor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapFloor = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.floor(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapFloor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using rounding.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10` whereas `14` will snap to `15`.\r\n *\r\n * @function Phaser.Math.Snap.To\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapTo = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.round(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Snap\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Ceil: require('./SnapCeil'),\r\n Floor: require('./SnapFloor'),\r\n To: require('./SnapTo')\r\n\r\n};\r\n","/**\r\n* @author Richard Davey \r\n* @copyright 2020 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A Global Plugin is installed just once into the Game owned Plugin Manager.\r\n * It can listen for Game events and respond to them.\r\n *\r\n * @class BasePlugin\r\n * @memberof Phaser.Plugins\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n */\r\nvar BasePlugin = new Class({\r\n\r\n initialize:\r\n\r\n function BasePlugin (pluginManager)\r\n {\r\n /**\r\n * A handy reference to the Plugin Manager that is responsible for this plugin.\r\n * Can be used as a route to gain access to game systems and events.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#pluginManager\r\n * @type {Phaser.Plugins.PluginManager}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.pluginManager = pluginManager;\r\n\r\n /**\r\n * A reference to the Game instance this plugin is running under.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#game\r\n * @type {Phaser.Game}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.game = pluginManager.game;\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is first instantiated.\r\n * It will never be called again on this instance.\r\n * In here you can set-up whatever you need for this plugin to run.\r\n * If a plugin is set to automatically start then `BasePlugin.start` will be called immediately after this.\r\n * On a Scene Plugin, this method is never called. Use {@link Phaser.Plugins.ScenePlugin#boot} instead.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#init\r\n * @since 3.8.0\r\n *\r\n * @param {?any} [data] - A value specified by the user, if any, from the `data` property of the plugin's configuration object (if started at game boot) or passed in the PluginManager's `install` method (if started manually).\r\n */\r\n init: function ()\r\n {\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is started.\r\n * If a plugin is stopped, and then started again, this will get called again.\r\n * Typically called immediately after `BasePlugin.init`.\r\n * On a Scene Plugin, this method is never called.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#start\r\n * @since 3.8.0\r\n */\r\n start: function ()\r\n {\r\n // Here are the game-level events you can listen to.\r\n // At the very least you should offer a destroy handler for when the game closes down.\r\n\r\n // var eventEmitter = this.game.events;\r\n\r\n // eventEmitter.once('destroy', this.gameDestroy, this);\r\n // eventEmitter.on('pause', this.gamePause, this);\r\n // eventEmitter.on('resume', this.gameResume, this);\r\n // eventEmitter.on('resize', this.gameResize, this);\r\n // eventEmitter.on('prestep', this.gamePreStep, this);\r\n // eventEmitter.on('step', this.gameStep, this);\r\n // eventEmitter.on('poststep', this.gamePostStep, this);\r\n // eventEmitter.on('prerender', this.gamePreRender, this);\r\n // eventEmitter.on('postrender', this.gamePostRender, this);\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is stopped.\r\n * The game code has requested that your plugin stop doing whatever it does.\r\n * It is now considered as 'inactive' by the PluginManager.\r\n * Handle that process here (i.e. stop listening for events, etc)\r\n * If the plugin is started again then `BasePlugin.start` will be called again.\r\n * On a Scene Plugin, this method is never called.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#stop\r\n * @since 3.8.0\r\n */\r\n stop: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Game instance has been destroyed.\r\n * You must release everything in here, all references, all objects, free it all up.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pluginManager = null;\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BasePlugin;\r\n","/**\r\n* @author Richard Davey \r\n* @copyright 2020 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar BasePlugin = require('./BasePlugin');\r\nvar Class = require('../utils/Class');\r\nvar SceneEvents = require('../scene/events');\r\n\r\n/**\r\n * @classdesc\r\n * A Scene Level Plugin is installed into every Scene and belongs to that Scene.\r\n * It can listen for Scene events and respond to them.\r\n * It can map itself to a Scene property, or into the Scene Systems, or both.\r\n *\r\n * @class ScenePlugin\r\n * @memberof Phaser.Plugins\r\n * @extends Phaser.Plugins.BasePlugin\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n */\r\nvar ScenePlugin = new Class({\r\n\r\n Extends: BasePlugin,\r\n\r\n initialize:\r\n\r\n function ScenePlugin (scene, pluginManager)\r\n {\r\n BasePlugin.call(this, pluginManager);\r\n\r\n /**\r\n * A reference to the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#scene\r\n * @type {?Phaser.Scene}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene Systems of the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#systems\r\n * @type {?Phaser.Scenes.Systems}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * This method is called when the Scene boots. It is only ever called once.\r\n *\r\n * By this point the plugin properties `scene` and `systems` will have already been set.\r\n *\r\n * In here you can listen for {@link Phaser.Scenes.Events Scene events} and set-up whatever you need for this plugin to run.\r\n * Here are the Scene events you can listen to:\r\n *\r\n * - start\r\n * - ready\r\n * - preupdate\r\n * - update\r\n * - postupdate\r\n * - resize\r\n * - pause\r\n * - resume\r\n * - sleep\r\n * - wake\r\n * - transitioninit\r\n * - transitionstart\r\n * - transitioncomplete\r\n * - transitionout\r\n * - shutdown\r\n * - destroy\r\n *\r\n * At the very least you should offer a destroy handler for when the Scene closes down, i.e:\r\n *\r\n * ```javascript\r\n * var eventEmitter = this.systems.events;\r\n * eventEmitter.once('destroy', this.sceneDestroy, this);\r\n * ```\r\n *\r\n * @method Phaser.Plugins.ScenePlugin#boot\r\n * @since 3.8.0\r\n */\r\n boot: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Game instance has been destroyed.\r\n * \r\n * You must release everything in here, all references, all objects, free it all up.\r\n *\r\n * @method Phaser.Plugins.ScenePlugin#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pluginManager = null;\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ScenePlugin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Blend Modes.\r\n * \r\n * @namespace Phaser.BlendModes\r\n * @since 3.0.0\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * Skips the Blend Mode check in the renderer.\r\n * \r\n * @name Phaser.BlendModes.SKIP_CHECK\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SKIP_CHECK: -1,\r\n\r\n /**\r\n * Normal blend mode. For Canvas and WebGL.\r\n * This is the default setting and draws new shapes on top of the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.NORMAL\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n NORMAL: 0,\r\n\r\n /**\r\n * Add blend mode. For Canvas and WebGL.\r\n * Where both shapes overlap the color is determined by adding color values.\r\n * \r\n * @name Phaser.BlendModes.ADD\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ADD: 1,\r\n\r\n /**\r\n * Multiply blend mode. For Canvas and WebGL.\r\n * The pixels are of the top layer are multiplied with the corresponding pixel of the bottom layer. A darker picture is the result.\r\n * \r\n * @name Phaser.BlendModes.MULTIPLY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n MULTIPLY: 2,\r\n\r\n /**\r\n * Screen blend mode. For Canvas and WebGL.\r\n * The pixels are inverted, multiplied, and inverted again. A lighter picture is the result (opposite of multiply)\r\n * \r\n * @name Phaser.BlendModes.SCREEN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SCREEN: 3,\r\n\r\n /**\r\n * Overlay blend mode. For Canvas only.\r\n * A combination of multiply and screen. Dark parts on the base layer become darker, and light parts become lighter.\r\n * \r\n * @name Phaser.BlendModes.OVERLAY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n OVERLAY: 4,\r\n\r\n /**\r\n * Darken blend mode. For Canvas only.\r\n * Retains the darkest pixels of both layers.\r\n * \r\n * @name Phaser.BlendModes.DARKEN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DARKEN: 5,\r\n\r\n /**\r\n * Lighten blend mode. For Canvas only.\r\n * Retains the lightest pixels of both layers.\r\n * \r\n * @name Phaser.BlendModes.LIGHTEN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LIGHTEN: 6,\r\n\r\n /**\r\n * Color Dodge blend mode. For Canvas only.\r\n * Divides the bottom layer by the inverted top layer.\r\n * \r\n * @name Phaser.BlendModes.COLOR_DODGE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR_DODGE: 7,\r\n\r\n /**\r\n * Color Burn blend mode. For Canvas only.\r\n * Divides the inverted bottom layer by the top layer, and then inverts the result.\r\n * \r\n * @name Phaser.BlendModes.COLOR_BURN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR_BURN: 8,\r\n\r\n /**\r\n * Hard Light blend mode. For Canvas only.\r\n * A combination of multiply and screen like overlay, but with top and bottom layer swapped.\r\n * \r\n * @name Phaser.BlendModes.HARD_LIGHT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HARD_LIGHT: 9,\r\n\r\n /**\r\n * Soft Light blend mode. For Canvas only.\r\n * A softer version of hard-light. Pure black or white does not result in pure black or white.\r\n * \r\n * @name Phaser.BlendModes.SOFT_LIGHT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOFT_LIGHT: 10,\r\n\r\n /**\r\n * Difference blend mode. For Canvas only.\r\n * Subtracts the bottom layer from the top layer or the other way round to always get a positive value.\r\n * \r\n * @name Phaser.BlendModes.DIFFERENCE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DIFFERENCE: 11,\r\n\r\n /**\r\n * Exclusion blend mode. For Canvas only.\r\n * Like difference, but with lower contrast.\r\n * \r\n * @name Phaser.BlendModes.EXCLUSION\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n EXCLUSION: 12,\r\n\r\n /**\r\n * Hue blend mode. For Canvas only.\r\n * Preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer.\r\n * \r\n * @name Phaser.BlendModes.HUE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HUE: 13,\r\n\r\n /**\r\n * Saturation blend mode. For Canvas only.\r\n * Preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer.\r\n * \r\n * @name Phaser.BlendModes.SATURATION\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SATURATION: 14,\r\n\r\n /**\r\n * Color blend mode. For Canvas only.\r\n * Preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer.\r\n * \r\n * @name Phaser.BlendModes.COLOR\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR: 15,\r\n\r\n /**\r\n * Luminosity blend mode. For Canvas only.\r\n * Preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer.\r\n * \r\n * @name Phaser.BlendModes.LUMINOSITY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LUMINOSITY: 16,\r\n\r\n /**\r\n * Alpha erase blend mode. For Canvas and WebGL.\r\n * \r\n * @name Phaser.BlendModes.ERASE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ERASE: 17,\r\n\r\n /**\r\n * Source-in blend mode. For Canvas only.\r\n * The new shape is drawn only where both the new shape and the destination canvas overlap. Everything else is made transparent.\r\n * \r\n * @name Phaser.BlendModes.SOURCE_IN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_IN: 18,\r\n\r\n /**\r\n * Source-out blend mode. For Canvas only.\r\n * The new shape is drawn where it doesn't overlap the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.SOURCE_OUT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_OUT: 19,\r\n\r\n /**\r\n * Source-out blend mode. For Canvas only.\r\n * The new shape is only drawn where it overlaps the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.SOURCE_ATOP\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_ATOP: 20,\r\n\r\n /**\r\n * Destination-over blend mode. For Canvas only.\r\n * New shapes are drawn behind the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_OVER\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_OVER: 21,\r\n\r\n /**\r\n * Destination-in blend mode. For Canvas only.\r\n * The existing canvas content is kept where both the new shape and existing canvas content overlap. Everything else is made transparent.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_IN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_IN: 22,\r\n\r\n /**\r\n * Destination-out blend mode. For Canvas only.\r\n * The existing content is kept where it doesn't overlap the new shape.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_OUT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_OUT: 23,\r\n\r\n /**\r\n * Destination-out blend mode. For Canvas only.\r\n * The existing canvas is only kept where it overlaps the new shape. The new shape is drawn behind the canvas content.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_ATOP\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_ATOP: 24,\r\n\r\n /**\r\n * Lighten blend mode. For Canvas only.\r\n * Where both shapes overlap the color is determined by adding color values.\r\n * \r\n * @name Phaser.BlendModes.LIGHTER\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LIGHTER: 25,\r\n\r\n /**\r\n * Copy blend mode. For Canvas only.\r\n * Only the new shape is shown.\r\n * \r\n * @name Phaser.BlendModes.COPY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COPY: 26,\r\n\r\n /**\r\n * Xor blend mode. For Canvas only.\r\n * Shapes are made transparent where both overlap and drawn normal everywhere else.\r\n * \r\n * @name Phaser.BlendModes.XOR\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n XOR: 27\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scale Manager Resize Event.\r\n * \r\n * This event is dispatched whenever the Scale Manager detects a resize event from the browser.\r\n * It sends three parameters to the callback, each of them being Size components. You can read\r\n * the `width`, `height`, `aspectRatio` and other properties of these components to help with\r\n * scaling your own game content.\r\n *\r\n * @event Phaser.Scale.Events#RESIZE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Structs.Size} gameSize - A reference to the Game Size component. This is the un-scaled size of your game canvas.\r\n * @param {Phaser.Structs.Size} baseSize - A reference to the Base Size component. This is the game size multiplied by resolution.\r\n * @param {Phaser.Structs.Size} displaySize - A reference to the Display Size component. This is the scaled canvas size, after applying zoom and scale mode.\r\n * @param {number} resolution - The current resolution. Defaults to 1 at the moment.\r\n * @param {number} previousWidth - If the `gameSize` has changed, this value contains its previous width, otherwise it contains the current width.\r\n * @param {number} previousHeight - If the `gameSize` has changed, this value contains its previous height, otherwise it contains the current height.\r\n */\r\nmodule.exports = 'resize';\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Added to Scene Event.\n *\n * This event is dispatched when a Game Object is added to a Scene.\n *\n * Listen for it from a Scene using `this.scene.events.on('addedtoscene', listener)`.\n *\n * @event Phaser.Scenes.Events#ADDED_TO_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\n */\nmodule.exports = 'addedtoscene';\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Boot Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems boot process. Primarily used by Scene Plugins.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('boot', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#BOOT\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'boot';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Create Event.\r\n * \r\n * This event is dispatched by a Scene after it has been created by the Scene Manager.\r\n * \r\n * If a Scene has a `create` method then this event is emitted _after_ that has run.\r\n * \r\n * If there is a transition, this event will be fired after the `TRANSITION_START` event.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('create', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#CREATE\r\n * @since 3.17.0\r\n * \r\n * @param {Phaser.Scene} scene - A reference to the Scene that emitted this event.\r\n */\r\nmodule.exports = 'create';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Destroy Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems destroy process.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('destroy', listener)`.\r\n * \r\n * You should destroy any resources that may be in use by your Scene in this event handler.\r\n * \r\n * @event Phaser.Scenes.Events#DESTROY\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pause Event.\r\n * \r\n * This event is dispatched by a Scene when it is paused, either directly via the `pause` method, or as an\r\n * action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('pause', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#PAUSE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was paused.\r\n */\r\nmodule.exports = 'pause';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Post Update Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('postupdate', listener)`.\r\n * \r\n * A Scene will only run its step if it is active.\r\n * \r\n * @event Phaser.Scenes.Events#POST_UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'postupdate';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pre Update Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('preupdate', listener)`.\r\n * \r\n * A Scene will only run its step if it is active.\r\n * \r\n * @event Phaser.Scenes.Events#PRE_UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'preupdate';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Ready Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems start process.\r\n * By this point in the process the Scene is now fully active and rendering.\r\n * This event is meant for your game code to use, as all plugins have responded to the earlier 'start' event.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('ready', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#READY\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was started.\r\n */\r\nmodule.exports = 'ready';\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Removed from Scene Event.\n *\n * This event is dispatched when a Game Object is removed from a Scene.\n *\n * Listen for it from a Scene using `this.scene.events.on('removedfromscene', listener)`.\n *\n * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\n */\nmodule.exports = 'removedfromscene';\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Render Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('render', listener)`.\r\n * \r\n * A Scene will only render if it is visible and active.\r\n * By the time this event is dispatched, the Scene will have already been rendered.\r\n * \r\n * @event Phaser.Scenes.Events#RENDER\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\r\n */\r\nmodule.exports = 'render';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Resume Event.\r\n * \r\n * This event is dispatched by a Scene when it is resumed from a paused state, either directly via the `resume` method,\r\n * or as an action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('resume', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#RESUME\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was resumed.\r\n */\r\nmodule.exports = 'resume';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Shutdown Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems shutdown process.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('shutdown', listener)`.\r\n * \r\n * You should free-up any resources that may be in use by your Scene in this event handler, on the understanding\r\n * that the Scene may, at any time, become active again. A shutdown Scene is not 'destroyed', it's simply not\r\n * currently active. Use the [DESTROY]{@linkcode Phaser.Scenes.Events#event:DESTROY} event to completely clear resources.\r\n * \r\n * @event Phaser.Scenes.Events#SHUTDOWN\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was shutdown.\r\n */\r\nmodule.exports = 'shutdown';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Sleep Event.\r\n * \r\n * This event is dispatched by a Scene when it is sent to sleep, either directly via the `sleep` method,\r\n * or as an action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('sleep', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#SLEEP\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was sent to sleep.\r\n */\r\nmodule.exports = 'sleep';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Start Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems start process. Primarily used by Scene Plugins.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('start', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#START\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Complete Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition.\r\n * \r\n * It happens when the transition process has completed. This occurs when the duration timer equals or exceeds the duration\r\n * of the transition.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitioncomplete', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_COMPLETE\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} scene -The Scene on which the transitioned completed.\r\n */\r\nmodule.exports = 'transitioncomplete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Init Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition.\r\n * \r\n * It happens immediately after the `Scene.init` method is called. If the Scene does not have an `init` method,\r\n * this event is not dispatched.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitioninit', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_INIT\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitioninit';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Out Event.\r\n * \r\n * This event is dispatched by a Scene when it initiates a transition to another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitionout', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_OUT\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} target - A reference to the Scene that is being transitioned to.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionout';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Start Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition, only if that Scene was not asleep.\r\n * \r\n * It happens immediately after the `Scene.create` method is called. If the Scene does not have a `create` method,\r\n * this event is dispatched anyway.\r\n * \r\n * If the Target Scene was sleeping then the [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} event is\r\n * dispatched instead of this event.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitionstart', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_START\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionstart';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Wake Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition, only if that Scene was asleep before\r\n * the transition began. If the Scene was not asleep the [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} event is dispatched instead.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitionwake', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_WAKE\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionwake';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Update Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('update', listener)`.\r\n * \r\n * A Scene will only run its step if it is active.\r\n * \r\n * @event Phaser.Scenes.Events#UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'update';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Wake Event.\r\n * \r\n * This event is dispatched by a Scene when it is woken from sleep, either directly via the `wake` method,\r\n * or as an action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('wake', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#WAKE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was woken up.\r\n */\r\nmodule.exports = 'wake';\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Scenes.Events\n */\n\nmodule.exports = {\n\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\n BOOT: require('./BOOT_EVENT'),\n CREATE: require('./CREATE_EVENT'),\n DESTROY: require('./DESTROY_EVENT'),\n PAUSE: require('./PAUSE_EVENT'),\n POST_UPDATE: require('./POST_UPDATE_EVENT'),\n PRE_UPDATE: require('./PRE_UPDATE_EVENT'),\n READY: require('./READY_EVENT'),\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'),\n RENDER: require('./RENDER_EVENT'),\n RESUME: require('./RESUME_EVENT'),\n SHUTDOWN: require('./SHUTDOWN_EVENT'),\n SLEEP: require('./SLEEP_EVENT'),\n START: require('./START_EVENT'),\n TRANSITION_COMPLETE: require('./TRANSITION_COMPLETE_EVENT'),\n TRANSITION_INIT: require('./TRANSITION_INIT_EVENT'),\n TRANSITION_OUT: require('./TRANSITION_OUT_EVENT'),\n TRANSITION_START: require('./TRANSITION_START_EVENT'),\n TRANSITION_WAKE: require('./TRANSITION_WAKE_EVENT'),\n UPDATE: require('./UPDATE_EVENT'),\n WAKE: require('./WAKE_EVENT')\n\n};\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Taken from klasse by mattdesl https://github.com/mattdesl/klasse\r\n\r\nfunction hasGetterOrSetter (def)\r\n{\r\n return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function');\r\n}\r\n\r\nfunction getProperty (definition, k, isClassDescriptor)\r\n{\r\n // This may be a lightweight object, OR it might be a property that was defined previously.\r\n\r\n // For simple class descriptors we can just assume its NOT previously defined.\r\n var def = (isClassDescriptor) ? definition[k] : Object.getOwnPropertyDescriptor(definition, k);\r\n\r\n if (!isClassDescriptor && def.value && typeof def.value === 'object')\r\n {\r\n def = def.value;\r\n }\r\n\r\n // This might be a regular property, or it may be a getter/setter the user defined in a class.\r\n if (def && hasGetterOrSetter(def))\r\n {\r\n if (typeof def.enumerable === 'undefined')\r\n {\r\n def.enumerable = true;\r\n }\r\n\r\n if (typeof def.configurable === 'undefined')\r\n {\r\n def.configurable = true;\r\n }\r\n\r\n return def;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n}\r\n\r\nfunction hasNonConfigurable (obj, k)\r\n{\r\n var prop = Object.getOwnPropertyDescriptor(obj, k);\r\n\r\n if (!prop)\r\n {\r\n return false;\r\n }\r\n\r\n if (prop.value && typeof prop.value === 'object')\r\n {\r\n prop = prop.value;\r\n }\r\n\r\n if (prop.configurable === false)\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\n/**\r\n * Extends the given `myClass` object's prototype with the properties of `definition`.\r\n *\r\n * @function extend\r\n * @param {Object} ctor The constructor object to mix into.\r\n * @param {Object} definition A dictionary of functions for the class.\r\n * @param {boolean} isClassDescriptor Is the definition a class descriptor?\r\n * @param {Object} [extend] The parent constructor object.\r\n */\r\nfunction extend (ctor, definition, isClassDescriptor, extend)\r\n{\r\n for (var k in definition)\r\n {\r\n if (!definition.hasOwnProperty(k))\r\n {\r\n continue;\r\n }\r\n\r\n var def = getProperty(definition, k, isClassDescriptor);\r\n\r\n if (def !== false)\r\n {\r\n // If Extends is used, we will check its prototype to see if the final variable exists.\r\n\r\n var parent = extend || ctor;\r\n\r\n if (hasNonConfigurable(parent.prototype, k))\r\n {\r\n // Just skip the final property\r\n if (Class.ignoreFinals)\r\n {\r\n continue;\r\n }\r\n\r\n // We cannot re-define a property that is configurable=false.\r\n // So we will consider them final and throw an error. This is by\r\n // default so it is clear to the developer what is happening.\r\n // You can set ignoreFinals to true if you need to extend a class\r\n // which has configurable=false; it will simply not re-define final properties.\r\n throw new Error('cannot override final property \\'' + k + '\\', set Class.ignoreFinals = true to skip');\r\n }\r\n\r\n Object.defineProperty(ctor.prototype, k, def);\r\n }\r\n else\r\n {\r\n ctor.prototype[k] = definition[k];\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Applies the given `mixins` to the prototype of `myClass`.\r\n *\r\n * @function mixin\r\n * @param {Object} myClass The constructor object to mix into.\r\n * @param {Object|Array} mixins The mixins to apply to the constructor.\r\n */\r\nfunction mixin (myClass, mixins)\r\n{\r\n if (!mixins)\r\n {\r\n return;\r\n }\r\n\r\n if (!Array.isArray(mixins))\r\n {\r\n mixins = [ mixins ];\r\n }\r\n\r\n for (var i = 0; i < mixins.length; i++)\r\n {\r\n extend(myClass, mixins[i].prototype || mixins[i]);\r\n }\r\n}\r\n\r\n/**\r\n * Creates a new class with the given descriptor.\r\n * The constructor, defined by the name `initialize`,\r\n * is an optional function. If unspecified, an anonymous\r\n * function will be used which calls the parent class (if\r\n * one exists).\r\n *\r\n * You can also use `Extends` and `Mixins` to provide subclassing\r\n * and inheritance.\r\n *\r\n * @class Phaser.Class\r\n * @constructor\r\n * @param {Object} definition a dictionary of functions for the class\r\n * @example\r\n *\r\n * var MyClass = new Phaser.Class({\r\n *\r\n * initialize: function() {\r\n * this.foo = 2.0;\r\n * },\r\n *\r\n * bar: function() {\r\n * return this.foo + 5;\r\n * }\r\n * });\r\n */\r\nfunction Class (definition)\r\n{\r\n if (!definition)\r\n {\r\n definition = {};\r\n }\r\n\r\n // The variable name here dictates what we see in Chrome debugger\r\n var initialize;\r\n var Extends;\r\n\r\n if (definition.initialize)\r\n {\r\n if (typeof definition.initialize !== 'function')\r\n {\r\n throw new Error('initialize must be a function');\r\n }\r\n\r\n initialize = definition.initialize;\r\n\r\n // Usually we should avoid 'delete' in V8 at all costs.\r\n // However, its unlikely to make any performance difference\r\n // here since we only call this on class creation (i.e. not object creation).\r\n delete definition.initialize;\r\n }\r\n else if (definition.Extends)\r\n {\r\n var base = definition.Extends;\r\n\r\n initialize = function ()\r\n {\r\n base.apply(this, arguments);\r\n };\r\n }\r\n else\r\n {\r\n initialize = function () {};\r\n }\r\n\r\n if (definition.Extends)\r\n {\r\n initialize.prototype = Object.create(definition.Extends.prototype);\r\n initialize.prototype.constructor = initialize;\r\n\r\n // For getOwnPropertyDescriptor to work, we need to act directly on the Extends (or Mixin)\r\n\r\n Extends = definition.Extends;\r\n\r\n delete definition.Extends;\r\n }\r\n else\r\n {\r\n initialize.prototype.constructor = initialize;\r\n }\r\n\r\n // Grab the mixins, if they are specified...\r\n var mixins = null;\r\n\r\n if (definition.Mixins)\r\n {\r\n mixins = definition.Mixins;\r\n delete definition.Mixins;\r\n }\r\n\r\n // First, mixin if we can.\r\n mixin(initialize, mixins);\r\n\r\n // Now we grab the actual definition which defines the overrides.\r\n extend(initialize, definition, true, Extends);\r\n\r\n return initialize;\r\n}\r\n\r\nClass.extend = extend;\r\nClass.mixin = mixin;\r\nClass.ignoreFinals = false;\r\n\r\nmodule.exports = Class;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A NOOP (No Operation) callback function.\r\n *\r\n * Used internally by Phaser when it's more expensive to determine if a callback exists\r\n * than it is to just invoke an empty function.\r\n *\r\n * @function Phaser.Utils.NOOP\r\n * @since 3.0.0\r\n */\r\nvar NOOP = function ()\r\n{\r\n // NOOP\r\n};\r\n\r\nmodule.exports = NOOP;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar IsPlainObject = require('./IsPlainObject');\r\n\r\n// @param {boolean} deep - Perform a deep copy?\r\n// @param {object} target - The target object to copy to.\r\n// @return {object} The extended object.\r\n\r\n/**\r\n * This is a slightly modified version of http://api.jquery.com/jQuery.extend/\r\n *\r\n * @function Phaser.Utils.Objects.Extend\r\n * @since 3.0.0\r\n *\r\n * @param {...*} [args] - The objects that will be mixed.\r\n *\r\n * @return {object} The extended object.\r\n */\r\nvar Extend = function ()\r\n{\r\n var options, name, src, copy, copyIsArray, clone,\r\n target = arguments[0] || {},\r\n i = 1,\r\n length = arguments.length,\r\n deep = false;\r\n\r\n // Handle a deep copy situation\r\n if (typeof target === 'boolean')\r\n {\r\n deep = target;\r\n target = arguments[1] || {};\r\n\r\n // skip the boolean and the target\r\n i = 2;\r\n }\r\n\r\n // extend Phaser if only one argument is passed\r\n if (length === i)\r\n {\r\n target = this;\r\n --i;\r\n }\r\n\r\n for (; i < length; i++)\r\n {\r\n // Only deal with non-null/undefined values\r\n if ((options = arguments[i]) != null)\r\n {\r\n // Extend the base object\r\n for (name in options)\r\n {\r\n src = target[name];\r\n copy = options[name];\r\n\r\n // Prevent never-ending loop\r\n if (target === copy)\r\n {\r\n continue;\r\n }\r\n\r\n // Recurse if we're merging plain objects or arrays\r\n if (deep && copy && (IsPlainObject(copy) || (copyIsArray = Array.isArray(copy))))\r\n {\r\n if (copyIsArray)\r\n {\r\n copyIsArray = false;\r\n clone = src && Array.isArray(src) ? src : [];\r\n }\r\n else\r\n {\r\n clone = src && IsPlainObject(src) ? src : {};\r\n }\r\n\r\n // Never move original objects, clone them\r\n target[name] = Extend(deep, clone, copy);\r\n\r\n // Don't bring in undefined values\r\n }\r\n else if (copy !== undefined)\r\n {\r\n target[name] = copy;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Return the modified object\r\n return target;\r\n};\r\n\r\nmodule.exports = Extend;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH = require('../../math');\r\nvar GetValue = require('./GetValue');\r\n\r\n/**\r\n * Retrieves a value from an object. Allows for more advanced selection options, including:\r\n *\r\n * Allowed types:\r\n * \r\n * Implicit\r\n * {\r\n * x: 4\r\n * }\r\n *\r\n * From function\r\n * {\r\n * x: function ()\r\n * }\r\n *\r\n * Randomly pick one element from the array\r\n * {\r\n * x: [a, b, c, d, e, f]\r\n * }\r\n *\r\n * Random integer between min and max:\r\n * {\r\n * x: { randInt: [min, max] }\r\n * }\r\n *\r\n * Random float between min and max:\r\n * {\r\n * x: { randFloat: [min, max] }\r\n * }\r\n * \r\n *\r\n * @function Phaser.Utils.Objects.GetAdvancedValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\r\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetAdvancedValue = function (source, key, defaultValue)\r\n{\r\n var value = GetValue(source, key, null);\r\n\r\n if (value === null)\r\n {\r\n return defaultValue;\r\n }\r\n else if (Array.isArray(value))\r\n {\r\n return MATH.RND.pick(value);\r\n }\r\n else if (typeof value === 'object')\r\n {\r\n if (value.hasOwnProperty('randInt'))\r\n {\r\n return MATH.RND.integerInRange(value.randInt[0], value.randInt[1]);\r\n }\r\n else if (value.hasOwnProperty('randFloat'))\r\n {\r\n return MATH.RND.realInRange(value.randFloat[0], value.randFloat[1]);\r\n }\r\n }\r\n else if (typeof value === 'function')\r\n {\r\n return value(key);\r\n }\r\n\r\n return value;\r\n};\r\n\r\nmodule.exports = GetAdvancedValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Finds the key within the top level of the {@link source} object, or returns {@link defaultValue}\r\n *\r\n * @function Phaser.Utils.Objects.GetFastValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to search\r\n * @param {string} key - The key for the property on source. Must exist at the top level of the source object (no periods)\r\n * @param {*} [defaultValue] - The default value to use if the key does not exist.\r\n *\r\n * @return {*} The value if found; otherwise, defaultValue (null if none provided)\r\n */\r\nvar GetFastValue = function (source, key, defaultValue)\r\n{\r\n var t = typeof(source);\r\n\r\n if (!source || t === 'number' || t === 'string')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key) && source[key] !== undefined)\r\n {\r\n return source[key];\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetFastValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Source object\r\n// The key as a string, or an array of keys, i.e. 'banner', or 'banner.hideBanner'\r\n// The default value to use if the key doesn't exist\r\n\r\n/**\r\n * Retrieves a value from an object.\r\n *\r\n * @function Phaser.Utils.Objects.GetValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\r\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetValue = function (source, key, defaultValue)\r\n{\r\n if (!source || typeof source === 'number')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key))\r\n {\r\n return source[key];\r\n }\r\n else if (key.indexOf('.') !== -1)\r\n {\r\n var keys = key.split('.');\r\n var parent = source;\r\n var value = defaultValue;\r\n\r\n // Use for loop here so we can break early\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n if (parent.hasOwnProperty(keys[i]))\r\n {\r\n // Yes it has a key property, let's carry on down\r\n value = parent[keys[i]];\r\n\r\n parent = parent[keys[i]];\r\n }\r\n else\r\n {\r\n // Can't go any further, so reset to default\r\n value = defaultValue;\r\n break;\r\n }\r\n }\r\n\r\n return value;\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * This is a slightly modified version of jQuery.isPlainObject.\r\n * A plain object is an object whose internal class property is [object Object].\r\n *\r\n * @function Phaser.Utils.Objects.IsPlainObject\r\n * @since 3.0.0\r\n *\r\n * @param {object} obj - The object to inspect.\r\n *\r\n * @return {boolean} `true` if the object is plain, otherwise `false`.\r\n */\r\nvar IsPlainObject = function (obj)\r\n{\r\n // Not plain objects:\r\n // - Any object or value whose internal [[Class]] property is not \"[object Object]\"\r\n // - DOM nodes\r\n // - window\r\n if (typeof(obj) !== 'object' || obj.nodeType || obj === obj.window)\r\n {\r\n return false;\r\n }\r\n\r\n // Support: Firefox <20\r\n // The try/catch suppresses exceptions thrown when attempting to access\r\n // the \"constructor\" property of certain host objects, ie. |window.location|\r\n // https://bugzilla.mozilla.org/show_bug.cgi?id=814622\r\n try\r\n {\r\n if (obj.constructor && !({}).hasOwnProperty.call(obj.constructor.prototype, 'isPrototypeOf'))\r\n {\r\n return false;\r\n }\r\n }\r\n catch (e)\r\n {\r\n return false;\r\n }\r\n\r\n // If the function hasn't returned already, we're confident that\r\n // |obj| is a plain object, created by {} or constructed with new Object\r\n return true;\r\n};\r\n\r\nmodule.exports = IsPlainObject;\r\n","/**\n * @author Richard Davey \n * @copyright 2018 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar Class = require('../../../src/utils/Class');\nvar GetFastValue = require('../../../src/utils/object/GetFastValue');\nvar ImageFile = require('../../../src/loader/filetypes/ImageFile.js');\nvar IsPlainObject = require('../../../src/utils/object/IsPlainObject');\nvar JSONFile = require('../../../src/loader/filetypes/JSONFile.js');\nvar MultiFile = require('../../../src/loader/MultiFile.js');\nvar TextFile = require('../../../src/loader/filetypes/TextFile.js');\n\n/**\n * @typedef {object} Phaser.Loader.FileTypes.SpineFileConfig\n *\n * @property {string} key - The key of the file. Must be unique within both the Loader and the Texture Manager.\n * @property {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\n * @property {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\n * @property {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\n * @property {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\n * @property {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\n */\n\n/**\n * @classdesc\n * A Spine File suitable for loading by the Loader.\n *\n * These are created when you use the Phaser.Loader.LoaderPlugin#spine method and are not typically created directly.\n *\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#spine.\n *\n * @class SpineFile\n * @extends Phaser.Loader.MultiFile\n * @memberof Phaser.Loader.FileTypes\n * @constructor\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\n * @param {(string|Phaser.Loader.FileTypes.SpineFileConfig)} key - The key to use for this file, or a file configuration object.\n * @param {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\n * @param {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\n * @param {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\n * @param {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\n */\nvar SpineFile = new Class({\n\n Extends: MultiFile,\n\n initialize:\n\n function SpineFile (loader, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings)\n {\n var i;\n var json;\n var atlas;\n var files = [];\n var cache = loader.cacheManager.custom.spine;\n\n // atlas can be an array of atlas files, not just a single one\n\n if (IsPlainObject(key))\n {\n var config = key;\n\n key = GetFastValue(config, 'key');\n\n json = new JSONFile(loader, {\n key: key,\n url: GetFastValue(config, 'jsonURL'),\n extension: GetFastValue(config, 'jsonExtension', 'json'),\n xhrSettings: GetFastValue(config, 'jsonXhrSettings')\n });\n\n atlasURL = GetFastValue(config, 'atlasURL');\n preMultipliedAlpha = GetFastValue(config, 'preMultipliedAlpha');\n\n if (!Array.isArray(atlasURL))\n {\n atlasURL = [ atlasURL ];\n }\n\n for (i = 0; i < atlasURL.length; i++)\n {\n atlas = new TextFile(loader, {\n key: key + '_' + i,\n url: atlasURL[i],\n extension: GetFastValue(config, 'atlasExtension', 'atlas'),\n xhrSettings: GetFastValue(config, 'atlasXhrSettings')\n });\n\n atlas.cache = cache;\n\n files.push(atlas);\n }\n }\n else\n {\n json = new JSONFile(loader, key, jsonURL, jsonXhrSettings);\n\n if (!Array.isArray(atlasURL))\n {\n atlasURL = [ atlasURL ];\n }\n\n for (i = 0; i < atlasURL.length; i++)\n {\n atlas = new TextFile(loader, key + '_' + i, atlasURL[i], atlasXhrSettings);\n atlas.cache = cache;\n\n files.push(atlas);\n }\n }\n\n files.unshift(json);\n\n MultiFile.call(this, loader, 'spine', key, files);\n\n this.config.preMultipliedAlpha = preMultipliedAlpha;\n },\n\n /**\n * Called by each File when it finishes loading.\n *\n * @method Phaser.Loader.FileTypes.SpineFile#onFileComplete\n * @since 3.19.0\n *\n * @param {Phaser.Loader.File} file - The File that has completed processing.\n */\n onFileComplete: function (file)\n {\n var index = this.files.indexOf(file);\n\n if (index !== -1)\n {\n this.pending--;\n\n if (file.type === 'text')\n {\n // Inspect the data for the files to now load\n var content = file.data.split('\\n');\n\n // Extract the textures\n var textures = [];\n\n for (var t = 0; t < content.length; t++)\n {\n var line = content[t];\n\n if (line.trim() === '' && t < content.length - 1)\n {\n line = content[t + 1];\n\n textures.push(line);\n }\n }\n\n var config = this.config;\n var loader = this.loader;\n\n var currentBaseURL = loader.baseURL;\n var currentPath = loader.path;\n var currentPrefix = loader.prefix;\n\n var baseURL = GetFastValue(config, 'baseURL', this.baseURL);\n var path = GetFastValue(config, 'path', file.src.match(/^.*\\//))[0];\n var prefix = GetFastValue(config, 'prefix', this.prefix);\n var textureXhrSettings = GetFastValue(config, 'textureXhrSettings');\n\n loader.setBaseURL(baseURL);\n loader.setPath(path);\n loader.setPrefix(prefix);\n\n for (var i = 0; i < textures.length; i++)\n {\n var textureURL = textures[i];\n\n var key = this.prefix + textureURL;\n\n var image = new ImageFile(loader, key, textureURL, textureXhrSettings);\n\n this.addToMultiFile(image);\n\n loader.addFile(image);\n }\n\n // Reset the loader settings\n loader.setBaseURL(currentBaseURL);\n loader.setPath(currentPath);\n loader.setPrefix(currentPrefix);\n }\n }\n },\n\n /**\n * Adds this file to its target cache upon successful loading and processing.\n *\n * @method Phaser.Loader.FileTypes.SpineFile#addToCache\n * @since 3.19.0\n */\n addToCache: function ()\n {\n if (this.isReadyToProcess())\n {\n var fileJSON = this.files[0];\n\n fileJSON.addToCache();\n\n var atlasCache;\n var atlasKey = '';\n var combinedAtlasData = '';\n var preMultipliedAlpha = (this.config.preMultipliedAlpha) ? true : false;\n\n for (var i = 1; i < this.files.length; i++)\n {\n var file = this.files[i];\n\n if (file.type === 'text')\n {\n atlasKey = file.key.replace(/_[\\d]$/, '');\n\n atlasCache = file.cache;\n\n combinedAtlasData = combinedAtlasData.concat(file.data);\n }\n else\n {\n var src = file.key.trim();\n var pos = src.indexOf('_');\n var key = src.substr(pos + 1);\n\n this.loader.textureManager.addImage(key, file.data);\n }\n\n file.pendingDestroy();\n }\n\n atlasCache.add(atlasKey, { preMultipliedAlpha: preMultipliedAlpha, data: combinedAtlasData, prefix: this.prefix });\n\n this.complete = true;\n }\n }\n\n});\n\nmodule.exports = SpineFile;\n","/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar BuildGameObject = require('../../../src/gameobjects/BuildGameObject');\nvar Class = require('../../../src/utils/Class');\nvar GetValue = require('../../../src/utils/object/GetValue');\nvar ResizeEvent = require('../../../src/scale/events/RESIZE_EVENT');\nvar ScenePlugin = require('../../../src/plugins/ScenePlugin');\nvar Spine = require('Spine');\nvar SpineFile = require('./SpineFile');\nvar SpineGameObject = require('./gameobject/SpineGameObject');\n\n/**\n * @classdesc\n * The Spine Plugin is a Scene based plugin that handles the creation and rendering of Spine Game Objects.\n *\n * Find more details about Spine itself at http://esotericsoftware.com/.\n *\n * All rendering and object creation is handled via the official Spine Runtimes. This version of the plugin\n * uses the Spine 3.8.95 runtimes. Please note that due to the way the Spine runtimes use semver, you will\n * get breaking changes in point-releases. Therefore, files created in a different version of Spine may not\n * work as a result, without you first updating the runtimes and rebuilding the plugin.\n *\n * Esoteric themselves recommend that you freeze your Spine editor version against the runtime versions.\n * You can find more information about this here: http://esotericsoftware.com/spine-settings#Version\n *\n * Please note that you require a Spine license in order to use Spine Runtimes in your games.\n *\n * You can install this plugin into your Phaser game by either importing it, if you're using ES6:\n *\n * ```javascript\n * import * as SpinePlugin from './SpinePlugin.js';\n * ```\n *\n * and then adding it to your Phaser Game configuration:\n *\n * ```javascript\n * plugins: {\n * scene: [\n * { key: 'SpinePlugin', plugin: window.SpinePlugin, mapping: 'spine' }\n * ]\n * }\n * ```\n *\n * If you're using ES5 then you can load the Spine Plugin in a Scene files payload, _within_ your\n * Game Configuration object, like this:\n *\n * ```javascript\n * scene: {\n * preload: preload,\n * create: create,\n * pack: {\n * files: [\n * { type: 'scenePlugin', key: 'SpinePlugin', url: 'plugins/SpinePlugin.js', sceneKey: 'spine' }\n * ]\n * }\n * }\n * ```\n *\n * Loading it like this allows you to then use commands such as `this.load.spine` from within the\n * same Scene. Alternatively, you can use the method `this.load.plugin` to load the plugin via the normal\n * Phaser Loader. However, doing so will not add it to the current Scene. It will be available from any\n * subsequent Scenes.\n *\n * Assuming a default environment you access it from within a Scene by using the `this.spine` reference.\n *\n * When this plugin is installed into a Scene it will add a Loader File Type, allowing you to load\n * Spine files directly, i.e.:\n *\n * ```javascript\n * this.load.spine('stretchyman', 'stretchyman-pro.json', [ 'stretchyman-pma.atlas' ], true);\n * ```\n *\n * It also installs a Game Object Factory method, allowing you to create Spine Game Objects:\n *\n * ```javascript\n * this.add.spine(512, 650, 'stretchyman')\n * ```\n *\n * The first argument is the key which you used when importing the Spine data. There are lots of\n * things you can specify, such as the animation name, skeleton, slot attachments and more. Please\n * see the respective documentation and examples for further details.\n *\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary.\n * The associated atlas files are scanned for any texture files present in them, which are then loaded.\n * If you have exported your Spine data with preMultipliedAlpha set, then you should enable this in the\n * load arguments, or you may see black outlines around skeleton textures.\n *\n * The Spine plugin is local to the Scene in which it is installed. This means a change to something,\n * such as the Skeleton Debug Renderer, in this Scene, will not impact the renderer in any other Scene.\n * The only exception to this is with the caches this plugin creates. Spine atlas and texture data are\n * stored in their own caches, which are global, meaning they're accessible from any Scene in your\n * game, regardless if the Scene loaded the Spine data or not.\n *\n * For details about the Spine Runtime API see http://esotericsoftware.com/spine-api-reference\n *\n * @class SpinePlugin\n * @extends Phaser.Plugins.ScenePlugin\n * @constructor\n * @since 3.19.0\n *\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Phaser Plugin Manager.\n */\nvar SpinePlugin = new Class({\n\n Extends: ScenePlugin,\n\n initialize:\n\n function SpinePlugin (scene, pluginManager)\n {\n ScenePlugin.call(this, scene, pluginManager);\n\n var game = pluginManager.game;\n\n /**\n * A read-only flag that indicates if the game is running under WebGL or Canvas.\n *\n * @name SpinePlugin#isWebGL\n * @type {boolean}\n * @readonly\n * @since 3.19.0\n */\n this.isWebGL = (game.config.renderType === 2);\n\n /**\n * A custom cache that stores the Spine atlas data.\n *\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\n * no matter which Scene you are in.\n *\n * @name SpinePlugin#cache\n * @type {Phaser.Cache.BaseCache}\n * @since 3.19.0\n */\n this.cache = game.cache.addCustom('spine');\n\n /**\n * A custom cache that stores the Spine Textures.\n *\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\n * no matter which Scene you are in.\n *\n * @name SpinePlugin#spineTextures\n * @type {Phaser.Cache.BaseCache}\n * @since 3.19.0\n */\n this.spineTextures = game.cache.addCustom('spineTextures');\n\n /**\n * A reference to the global JSON Cache.\n *\n * @name SpinePlugin#json\n * @type {Phaser.Cache.BaseCache}\n * @since 3.19.0\n */\n this.json = game.cache.json;\n\n /**\n * A reference to the global Texture Manager.\n *\n * @name SpinePlugin#textures\n * @type {Phaser.Textures.TextureManager}\n * @since 3.19.0\n */\n this.textures = game.textures;\n\n /**\n * A flag that sets if the Skeleton Renderers will render debug information over the top\n * of the skeleton or not.\n *\n * @name SpinePlugin#drawDebug\n * @type {boolean}\n * @since 3.19.0\n */\n this.drawDebug = false;\n\n /**\n * The underlying WebGL context of the Phaser renderer.\n *\n * Only set if running in WebGL mode.\n *\n * @name SpinePlugin#gl\n * @type {WebGLRenderingContext}\n * @since 3.19.0\n */\n this.gl;\n\n /**\n * A reference to either the Canvas or WebGL Renderer that this Game is using.\n *\n * @name SpinePlugin#renderer\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\n * @since 3.19.0\n */\n this.renderer;\n\n /**\n * An instance of the Spine WebGL Scene Renderer.\n *\n * Only set if running in WebGL mode.\n *\n * @name SpinePlugin#sceneRenderer\n * @type {spine.webgl.SceneRenderer}\n * @since 3.19.0\n */\n this.sceneRenderer;\n\n /**\n * An instance of the Spine Skeleton Renderer.\n *\n * @name SpinePlugin#skeletonRenderer\n * @type {(spine.canvas.SkeletonRenderer|spine.webgl.SkeletonRenderer)}\n * @since 3.19.0\n */\n this.skeletonRenderer;\n\n /**\n * An instance of the Spine Skeleton Debug Renderer.\n *\n * Only set if running in WebGL mode.\n *\n * @name SpinePlugin#skeletonDebugRenderer\n * @type {spine.webgl.skeletonDebugRenderer}\n * @since 3.19.0\n */\n this.skeletonDebugRenderer;\n\n /**\n * A reference to the Spine runtime.\n * This is the runtime created by Esoteric Software\n *\n * @name SpinePlugin#plugin\n * @type {spine}\n * @since 3.19.0\n */\n this.plugin = Spine;\n\n /**\n * An internal vector3 used by the screen to world method.\n *\n * @name SpinePlugin#temp1\n * @private\n * @type {spine.webgl.Vector3}\n * @since 3.19.0\n */\n this.temp1;\n\n /**\n * An internal vector3 used by the screen to world method.\n *\n * @name SpinePlugin#temp2\n * @private\n * @type {spine.webgl.Vector3}\n * @since 3.19.0\n */\n this.temp2;\n\n if (this.isWebGL)\n {\n this.runtime = Spine.webgl;\n\n this.renderer = game.renderer;\n this.gl = game.renderer.gl;\n\n this.getAtlas = this.getAtlasWebGL;\n }\n else\n {\n this.runtime = Spine.canvas;\n\n this.renderer = game.renderer;\n\n this.getAtlas = this.getAtlasCanvas;\n }\n\n var _this = this;\n\n var add = function (x, y, key, animationName, loop)\n {\n var spineGO = new SpineGameObject(this.scene, _this, x, y, key, animationName, loop);\n\n this.displayList.add(spineGO);\n this.updateList.add(spineGO);\n\n return spineGO;\n };\n\n var make = function (config, addToScene)\n {\n if (config === undefined) { config = {}; }\n\n var key = GetValue(config, 'key', null);\n var animationName = GetValue(config, 'animationName', null);\n var loop = GetValue(config, 'loop', false);\n\n var spineGO = new SpineGameObject(this.scene, _this, 0, 0, key, animationName, loop);\n\n if (addToScene !== undefined)\n {\n config.add = addToScene;\n }\n\n BuildGameObject(this.scene, spineGO, config);\n\n // Spine specific\n var skinName = GetValue(config, 'skinName', false);\n\n if (skinName)\n {\n spineGO.setSkinByName(skinName);\n }\n\n var slotName = GetValue(config, 'slotName', false);\n var attachmentName = GetValue(config, 'attachmentName', null);\n\n if (slotName)\n {\n spineGO.setAttachment(slotName, attachmentName);\n }\n\n return spineGO.refresh();\n };\n\n pluginManager.registerFileType('spine', this.spineFileCallback, scene);\n pluginManager.registerGameObject('spine', add, make);\n },\n\n /**\n * Internal boot handler.\n *\n * @method SpinePlugin#boot\n * @private\n * @since 3.19.0\n */\n boot: function ()\n {\n if (this.isWebGL)\n {\n this.bootWebGL();\n this.onResize();\n this.game.scale.on(ResizeEvent, this.onResize, this);\n }\n else\n {\n this.bootCanvas();\n }\n\n var eventEmitter = this.systems.events;\n\n eventEmitter.once('shutdown', this.shutdown, this);\n eventEmitter.once('destroy', this.destroy, this);\n },\n\n /**\n * Internal boot handler for the Canvas Renderer.\n *\n * @method SpinePlugin#bootCanvas\n * @private\n * @since 3.19.0\n */\n bootCanvas: function ()\n {\n this.skeletonRenderer = new Spine.canvas.SkeletonRenderer(this.scene.sys.context);\n },\n\n /**\n * Internal boot handler for the WebGL Renderer.\n *\n * @method SpinePlugin#bootWebGL\n * @private\n * @since 3.19.0\n */\n bootWebGL: function ()\n {\n this.sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true);\n\n // Monkeypatch the Spine setBlendMode functions, or batching is destroyed!\n\n var setBlendMode = function (srcBlend, dstBlend)\n {\n if (srcBlend !== this.srcBlend || dstBlend !== this.dstBlend)\n {\n var gl = this.context.gl;\n\n this.srcBlend = srcBlend;\n this.dstBlend = dstBlend;\n\n if (this.isDrawing)\n {\n this.flush();\n gl.blendFunc(this.srcBlend, this.dstBlend);\n }\n }\n };\n\n this.sceneRenderer.batcher.setBlendMode = setBlendMode;\n this.sceneRenderer.shapes.setBlendMode = setBlendMode;\n\n this.skeletonRenderer = this.sceneRenderer.skeletonRenderer;\n this.skeletonDebugRenderer = this.sceneRenderer.skeletonDebugRenderer;\n\n this.temp1 = new Spine.webgl.Vector3(0, 0, 0);\n this.temp2 = new Spine.webgl.Vector3(0, 0, 0);\n },\n\n /**\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\n * then returns it. You do not normally need to invoke this method directly.\n *\n * @method SpinePlugin#getAtlasCanvas\n * @since 3.19.0\n *\n * @param {string} key - The key of the Spine Atlas to create.\n *\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\n */\n getAtlasCanvas: function (key)\n {\n var atlasEntry = this.cache.get(key);\n\n if (!atlasEntry)\n {\n console.warn('No atlas data for: ' + key);\n return;\n }\n\n var atlas;\n var spineTextures = this.spineTextures;\n\n if (spineTextures.has(key))\n {\n atlas = spineTextures.get(key);\n }\n else\n {\n var textures = this.textures;\n\n atlas = new Spine.TextureAtlas(atlasEntry.data, function (path)\n {\n return new Spine.canvas.CanvasTexture(textures.get(atlasEntry.prefix + path).getSourceImage());\n });\n }\n\n return atlas;\n },\n\n /**\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\n * then returns it. You do not normally need to invoke this method directly.\n *\n * @method SpinePlugin#getAtlasWebGL\n * @since 3.19.0\n *\n * @param {string} key - The key of the Spine Atlas to create.\n *\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\n */\n getAtlasWebGL: function (key)\n {\n var atlasEntry = this.cache.get(key);\n\n if (!atlasEntry)\n {\n console.warn('No atlas data for: ' + key);\n return;\n }\n\n var atlas;\n var spineTextures = this.spineTextures;\n\n if (spineTextures.has(key))\n {\n atlas = spineTextures.get(key);\n }\n else\n {\n var textures = this.textures;\n\n var gl = this.sceneRenderer.context.gl;\n\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\n\n atlas = new Spine.TextureAtlas(atlasEntry.data, function (path)\n {\n return new Spine.webgl.GLTexture(gl, textures.get(atlasEntry.prefix + path).getSourceImage(), false);\n });\n }\n\n return atlas;\n },\n\n /**\n * Adds a Spine Skeleton and Atlas file, or array of files, to the current load queue.\n *\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\n *\n * ```javascript\n * function preload ()\n * {\n * this.load.spine('spineBoy', 'boy.json', 'boy.atlas', true);\n * }\n * ```\n *\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\n * loaded.\n *\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\n *\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary. The associated\n * atlas files are scanned for any texture files present in them, which are then loaded. If you have exported\n * your Spine data with preMultipliedAlpha set, then you should enable this in the arguments, or you may see black\n * outlines around skeleton textures.\n *\n * The key must be a unique String. It is used to add the file to the global Spine cache upon a successful load.\n * The key should be unique both in terms of files being loaded and files already present in the Spine cache.\n * Loading a file using a key that is already taken will result in a warning.\n *\n * Instead of passing arguments you can pass a configuration object, such as:\n *\n * ```javascript\n * this.load.spine({\n * key: 'mainmenu',\n * jsonURL: 'boy.json',\n * atlasURL: 'boy.atlas',\n * preMultipliedAlpha: true\n * });\n * ```\n *\n * If you need to load multiple Spine atlas files, provide them as an array:\n *\n * ```javascript\n * function preload ()\n * {\n * this.load.spine('demos', 'demos.json', [ 'atlas1.atlas', 'atlas2.atlas' ], true);\n * }\n * ```\n *\n * See the documentation for `Phaser.Types.Loader.FileTypes.SpineFileConfig` for more details.\n *\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\n * this is what you would use to retrieve the data from the Spine plugin.\n *\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\n *\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\n * and no URL is given then the Loader will set the URL to be \"alien.json\". It will always add `.json` as the extension, although\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\n *\n * Note: The ability to load this type of file will only be available if the Spine Plugin has been built or loaded into Phaser.\n *\n * @method Phaser.Loader.LoaderPlugin#spine\n * @fires Phaser.Loader.LoaderPlugin#ADD\n * @since 3.19.0\n *\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\n * @param {string} jsonURL - The absolute or relative URL to load the Spine json file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\n * @param {string|string[]} atlasURL - The absolute or relative URL to load the Spine atlas file from. If undefined or `null` it will be set to `.atlas`, i.e. if `key` was \"alien\" then the URL will be \"alien.atlas\".\n * @param {boolean} [preMultipliedAlpha=false] - Do the texture files include pre-multiplied alpha or not?\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the Spine json file. Used in replacement of the Loaders default XHR Settings.\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the Spine atlas file. Used in replacement of the Loaders default XHR Settings.\n *\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\n */\n spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings)\n {\n var multifile;\n\n if (Array.isArray(key))\n {\n for (var i = 0; i < key.length; i++)\n {\n multifile = new SpineFile(this, key[i]);\n\n this.addFile(multifile.files);\n }\n }\n else\n {\n multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings);\n\n this.addFile(multifile.files);\n }\n\n return this;\n },\n\n /**\n * Converts the given x and y screen coordinates into the world space of the given Skeleton.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#worldToLocal\n * @since 3.19.0\n *\n * @param {number} x - The screen space x coordinate to convert.\n * @param {number} y - The screen space y coordinate to convert.\n * @param {spine.Skeleton} skeleton - The Spine Skeleton to convert into.\n * @param {spine.Bone} [bone] - Optional bone of the Skeleton to convert into.\n *\n * @return {spine.Vector2} A Vector2 containing the translated point.\n */\n worldToLocal: function (x, y, skeleton, bone)\n {\n var temp1 = this.temp1;\n var temp2 = this.temp2;\n var camera = this.sceneRenderer.camera;\n\n temp1.set(x + skeleton.x, y - skeleton.y, 0);\n\n var width = camera.viewportWidth;\n var height = camera.viewportHeight;\n\n camera.screenToWorld(temp1, width, height);\n\n if (bone && bone.parent !== null)\n {\n bone.parent.worldToLocal(temp2.set(temp1.x - skeleton.x, temp1.y - skeleton.y, 0));\n\n return new Spine.Vector2(temp2.x, temp2.y);\n }\n else if (bone)\n {\n return new Spine.Vector2(temp1.x - skeleton.x, temp1.y - skeleton.y);\n }\n else\n {\n return new Spine.Vector2(temp1.x, temp1.y);\n }\n },\n\n /**\n * Returns a Spine Vector2 based on the given x and y values.\n *\n * @method SpinePlugin#getVector2\n * @since 3.19.0\n *\n * @param {number} x - The Vector x value.\n * @param {number} y - The Vector y value.\n *\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\n */\n getVector2: function (x, y)\n {\n return new Spine.Vector2(x, y);\n },\n\n /**\n * Returns a Spine Vector2 based on the given x, y and z values.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#getVector3\n * @since 3.19.0\n *\n * @param {number} x - The Vector x value.\n * @param {number} y - The Vector y value.\n * @param {number} z - The Vector z value.\n *\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\n */\n getVector3: function (x, y, z)\n {\n return new Spine.webgl.Vector3(x, y, z);\n },\n\n /**\n * Sets `drawBones` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugBones\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugBones: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawBones = value;\n\n return this;\n },\n\n /**\n * Sets `drawRegionAttachments` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugRegionAttachments\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugRegionAttachments: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawRegionAttachments = value;\n\n return this;\n },\n\n /**\n * Sets `drawBoundingBoxes` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugBoundingBoxes\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugBoundingBoxes: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawBoundingBoxes = value;\n\n return this;\n },\n\n /**\n * Sets `drawMeshHull` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugMeshHull\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugMeshHull: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawMeshHull = value;\n\n return this;\n },\n\n /**\n * Sets `drawMeshTriangles` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugMeshTriangles\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugMeshTriangles: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawMeshTriangles = value;\n\n return this;\n },\n\n /**\n * Sets `drawPaths` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugPaths\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugPaths: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawPaths = value;\n\n return this;\n },\n\n /**\n * Sets `drawSkeletonXY` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugSkeletonXY\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugSkeletonXY: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawSkeletonXY = value;\n\n return this;\n },\n\n /**\n * Sets `drawClipping` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugClipping\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugClipping: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawClipping = value;\n\n return this;\n },\n\n /**\n * Sets the given vertex effect on the Spine Skeleton Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setEffect\n * @since 3.19.0\n *\n * @param {spine.VertexEffect} [effect] - The vertex effect to set on the Skeleton Renderer.\n *\n * @return {this} This Spine Plugin.\n */\n setEffect: function (effect)\n {\n this.sceneRenderer.skeletonRenderer.vertexEffect = effect;\n\n return this;\n },\n\n /**\n * Creates a Spine Skeleton based on the given key and optional Skeleton JSON data.\n *\n * The Skeleton data should have already been loaded before calling this method.\n *\n * @method SpinePlugin#createSkeleton\n * @since 3.19.0\n *\n * @param {string} key - The key of the Spine skeleton data, as loaded by the plugin. If the Spine JSON contains multiple skeletons, reference them with a period, i.e. `set.spineBoy`.\n * @param {object} [skeletonJSON] - Optional Skeleton JSON data to use, instead of getting it from the cache.\n *\n * @return {(any|null)} This Spine Skeleton data object, or `null` if the key was invalid.\n */\n createSkeleton: function (key, skeletonJSON)\n {\n var atlasKey = key;\n var jsonKey = key;\n var split = (key.indexOf('.') !== -1);\n\n if (split)\n {\n var parts = key.split('.');\n\n atlasKey = parts.shift();\n jsonKey = parts.join('.');\n }\n\n var atlasData = this.cache.get(atlasKey);\n var atlas = this.getAtlas(atlasKey);\n\n if (!atlas)\n {\n return null;\n }\n\n if (!this.spineTextures.has(atlasKey))\n {\n this.spineTextures.add(atlasKey, atlas);\n }\n\n var preMultipliedAlpha = atlasData.preMultipliedAlpha;\n\n var atlasLoader = new Spine.AtlasAttachmentLoader(atlas);\n\n var skeletonJson = new Spine.SkeletonJson(atlasLoader);\n\n var data;\n\n if (skeletonJSON)\n {\n data = skeletonJSON;\n }\n else\n {\n var json = this.json.get(atlasKey);\n\n data = (split) ? GetValue(json, jsonKey) : json;\n }\n\n if (data)\n {\n var skeletonData = skeletonJson.readSkeletonData(data);\n\n var skeleton = new Spine.Skeleton(skeletonData);\n\n return { skeletonData: skeletonData, skeleton: skeleton, preMultipliedAlpha: preMultipliedAlpha };\n }\n else\n {\n return null;\n }\n },\n\n /**\n * Creates a new Animation State and Animation State Data for the given skeleton.\n *\n * The returned object contains two properties: `state` and `stateData` respectively.\n *\n * @method SpinePlugin#createAnimationState\n * @since 3.19.0\n *\n * @param {spine.Skeleton} skeleton - The Skeleton to create the Animation State for.\n *\n * @return {any} An object containing the Animation State and Animation State Data instances.\n */\n createAnimationState: function (skeleton)\n {\n var stateData = new Spine.AnimationStateData(skeleton.data);\n\n var state = new Spine.AnimationState(stateData);\n\n return { stateData: stateData, state: state };\n },\n\n /**\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\n *\n * The returned object contains two properties: `offset` and `size`:\n *\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\n * `size` - The width and height of the AABB.\n *\n * @method SpinePlugin#getBounds\n * @since 3.19.0\n *\n * @param {spine.Skeleton} skeleton - The Skeleton to get the bounds from.\n *\n * @return {any} The bounds object.\n */\n getBounds: function (skeleton)\n {\n var offset = new Spine.Vector2();\n var size = new Spine.Vector2();\n\n skeleton.getBounds(offset, size, []);\n\n return { offset: offset, size: size };\n },\n\n /**\n * Internal handler for when the renderer resizes.\n *\n * Only called if running in WebGL.\n *\n * @method SpinePlugin#onResize\n * @since 3.19.0\n */\n onResize: function ()\n {\n var renderer = this.renderer;\n var sceneRenderer = this.sceneRenderer;\n\n var viewportWidth = renderer.width;\n var viewportHeight = renderer.height;\n\n sceneRenderer.camera.position.x = viewportWidth / 2;\n sceneRenderer.camera.position.y = viewportHeight / 2;\n\n sceneRenderer.camera.viewportWidth = viewportWidth;\n sceneRenderer.camera.viewportHeight = viewportHeight;\n },\n\n /**\n * The Scene that owns this plugin is shutting down.\n *\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\n *\n * @method SpinePlugin#shutdown\n * @private\n * @since 3.19.0\n */\n shutdown: function ()\n {\n var eventEmitter = this.systems.events;\n\n eventEmitter.off('shutdown', this.shutdown, this);\n\n if (this.isWebGL)\n {\n this.game.scale.off(ResizeEvent, this.onResize, this);\n }\n },\n\n /**\n * The Scene that owns this plugin is being destroyed.\n *\n * We need to shutdown and then kill off all external references.\n *\n * @method SpinePlugin#destroy\n * @private\n * @since 3.19.0\n */\n destroy: function ()\n {\n this.shutdown();\n\n if (this.sceneRenderer)\n {\n this.sceneRenderer.dispose();\n }\n\n this.pluginManager.removeGameObject('spine', true, true);\n\n this.pluginManager = null;\n this.game = null;\n this.scene = null;\n this.systems = null;\n\n this.cache = null;\n this.spineTextures = null;\n this.json = null;\n this.textures = null;\n this.sceneRenderer = null;\n this.skeletonRenderer = null;\n this.gl = null;\n }\n\n});\n\n/**\n * Creates a new Spine Game Object and adds it to the Scene.\n *\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\n * do not have a Phaser origin.\n *\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\n * that.\n *\n * ```javascript\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\n * ```\n *\n * The key is optional. If not passed here, you need to call `SpineGameObject.setSkeleton()` to use it.\n *\n * The animation name is also optional and can be set later via `SpineGameObject.setAnimation`.\n *\n * Should you wish for more control over the object creation, such as setting a slot attachment or skin\n * name, then use `SpinePlugin.make` instead.\n *\n * @method SpinePlugin#add\n * @since 3.19.0\n *\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\n *\n * @return {SpineGameObject} The Game Object that was created.\n */\n\n/**\n * Creates a new Spine Game Object from the given configuration file and optionally adds it to the Scene.\n *\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\n * do not have a Phaser origin.\n *\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\n * that.\n *\n * ```javascript\n * let jelly = this.make.spine({\n * x: 500, y: 500, key: 'jelly',\n * scale: 1.5,\n * skinName: 'square_Green',\n * animationName: 'jelly-idle', loop: true,\n * slotName: 'hat', attachmentName: 'images/La_14'\n * });\n * ```\n *\n * @method SpinePlugin#make\n * @since 3.19.0\n *\n * @param {any} config - The configuration object this Game Object will use to create itself.\n * @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.\n *\n * @return {SpineGameObject} The Game Object that was created.\n */\n\nmodule.exports = SpinePlugin;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Complete Event.\r\n *\r\n * @event SpinePluginEvents#COMPLETE\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Dispose Event.\r\n *\r\n * @event SpinePluginEvents#DISPOSE\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'dispose';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The End Event.\r\n *\r\n * @event SpinePluginEvents#END\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'end';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Custom Event Event.\r\n *\r\n * @event SpinePluginEvents#EVENT\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'event';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Interrupted Event.\r\n *\r\n * @event SpinePluginEvents#INTERRUPTED\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'interrupted';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Start Event.\r\n *\r\n * @event SpinePluginEvents#START\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace SpinePluginEvents\r\n */\r\n\r\nmodule.exports = {\r\n\r\n COMPLETE: require('./COMPLETE_EVENT'),\r\n DISPOSE: require('./DISPOSE_EVENT'),\r\n END: require('./END_EVENT'),\r\n EVENT: require('./EVENT_EVENT'),\r\n INTERRUPTED: require('./INTERRUPTED_EVENT'),\r\n START: require('./START_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar AngleBetween = require('../../../../src/math/angle/Between');\r\nvar Clamp = require('../../../../src/math/Clamp');\r\nvar Class = require('../../../../src/utils/Class');\r\nvar ComponentsComputedSize = require('../../../../src/gameobjects/components/ComputedSize');\r\nvar ComponentsDepth = require('../../../../src/gameobjects/components/Depth');\r\nvar ComponentsFlip = require('../../../../src/gameobjects/components/Flip');\r\nvar ComponentsScrollFactor = require('../../../../src/gameobjects/components/ScrollFactor');\r\nvar ComponentsTransform = require('../../../../src/gameobjects/components/Transform');\r\nvar ComponentsVisible = require('../../../../src/gameobjects/components/Visible');\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar DegToRad = require('../../../../src/math/DegToRad');\r\nvar GameObject = require('../../../../src/gameobjects/GameObject');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar SpineEvents = require('../events/');\r\nvar SpineGameObjectRender = require('./SpineGameObjectRender');\r\n\r\n/**\r\n * @classdesc\r\n * A Spine Game Object is a Phaser level object that can be added to your Phaser Scenes. It encapsulates\r\n * a Spine Skeleton with Spine Animation Data and Animation State, with helper methods to allow you to\r\n * easily change the skin, slot attachment, bone positions and more.\r\n * \r\n * Spine Game Objects can be created via the Game Object Factory, Game Object Creator, or directly.\r\n * You can only create them if the Spine plugin has been loaded into Phaser.\r\n * \r\n * The quickest way is the Game Object Factory:\r\n * \r\n * ```javascript\r\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\r\n * ```\r\n * \r\n * Here we are creating a new Spine Game Object positioned at 512 x 550. It's using the `jelly`\r\n * Spine data, which has previously been loaded into your Scene. The `jelly-think` argument is\r\n * an optional animation to start playing on the skeleton. The final argument `true` sets the\r\n * animation to loop. Look at the documentation for further details on each of these options.\r\n * \r\n * For more control, you can use the Game Object Creator, passing in a Spine Game Object\r\n * Configuration object:\r\n * \r\n * ```javascript\r\n * let jelly = this.make.spine({\r\n * x: 512, y: 550, key: 'jelly',\r\n * scale: 1.5,\r\n * skinName: 'square_Green',\r\n * animationName: 'jelly-think', loop: true,\r\n * slotName: 'hat', attachmentName: 'images/La_14'\r\n * });\r\n * ```\r\n * \r\n * Here, you've got the ability to specify extra details, such as the slot name, attachments or\r\n * overall scale.\r\n * \r\n * If you wish to instantiate a Spine Game Object directly you can do so, but in order for it to\r\n * update and render, it must be added to the display and update lists of your Scene:\r\n * \r\n * ```javascript\r\n * let jelly = new SpineGameObject(this, this.spine, 512, 550, 'jelly', 'jelly-think', true);\r\n * this.sys.displayList.add(jelly);\r\n * this.sys.updateList.add(jelly);\r\n * ```\r\n * \r\n * It's possible to enable Spine Game Objects for input, but you should be aware that it will use\r\n * the bounds of the skeletons current pose to create the hit area from. Sometimes this is ok, but\r\n * often not. Make use of the `InputPlugin.enableDebug` method to view the input shape being created.\r\n * If it's not suitable, provide your own shape to the `setInteractive` method.\r\n * \r\n * Due to the way Spine handles scaling, it's not recommended to enable a Spine Game Object for\r\n * physics directly. Instead, you should look at creating a proxy body and syncing the Spine Game\r\n * Object position with it. See the examples for further details.\r\n * \r\n * If your Spine Game Object has black outlines around the different parts of the texture when it\r\n * renders then you have exported the files from Spine with pre-multiplied alpha enabled, but have\r\n * forgotten to set that flag when loading the Spine data. Please see the loader docs for more details.\r\n *\r\n * @class SpineGameObject\r\n * @constructor\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to.\r\n * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\r\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\r\n */\r\nvar SpineGameObject = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n ComponentsComputedSize,\r\n ComponentsDepth,\r\n ComponentsFlip,\r\n ComponentsScrollFactor,\r\n ComponentsTransform,\r\n ComponentsVisible,\r\n SpineGameObjectRender\r\n ],\r\n\r\n initialize:\r\n\r\n function SpineGameObject (scene, plugin, x, y, key, animationName, loop)\r\n {\r\n GameObject.call(this, scene, 'Spine');\r\n\r\n /**\r\n * A reference to the Spine Plugin.\r\n *\r\n * @name SpineGameObject#plugin\r\n * @type {SpinePlugin}\r\n * @since 3.19.0\r\n */\r\n this.plugin = plugin;\r\n\r\n /**\r\n * The Spine Skeleton this Game Object is using.\r\n *\r\n * @name SpineGameObject#skeleton\r\n * @type {spine.Skeleton}\r\n * @since 3.19.0\r\n */\r\n this.skeleton = null;\r\n\r\n /**\r\n * The Spine Skeleton Data associated with the Skeleton this Game Object is using.\r\n *\r\n * @name SpineGameObject#skeletonData\r\n * @type {spine.SkeletonData}\r\n * @since 3.19.0\r\n */\r\n this.skeletonData = null;\r\n\r\n /**\r\n * The Spine Animation State this Game Object is using.\r\n *\r\n * @name SpineGameObject#state\r\n * @type {spine.AnimationState}\r\n * @since 3.19.0\r\n */\r\n this.state = null;\r\n\r\n /**\r\n * The Spine Animation State Data associated with the Animation State this Game Object is using.\r\n *\r\n * @name SpineGameObject#stateData\r\n * @type {spine.AnimationStateData}\r\n * @since 3.19.0\r\n */\r\n this.stateData = null;\r\n\r\n /**\r\n * A reference to the root bone of the Skeleton.\r\n *\r\n * @name SpineGameObject#root\r\n * @type {spine.Bone}\r\n * @since 3.19.0\r\n */\r\n this.root = null;\r\n\r\n /**\r\n * This object holds the calculated bounds of the current\r\n * pose, as set when a new Skeleton is applied.\r\n *\r\n * @name SpineGameObject#bounds\r\n * @type {any}\r\n * @since 3.19.0\r\n */\r\n this.bounds = null;\r\n \r\n /**\r\n * A Game Object level flag that allows you to enable debug drawing\r\n * to the Skeleton Debug Renderer by toggling it.\r\n *\r\n * @name SpineGameObject#drawDebug\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.drawDebug = false;\r\n\r\n /**\r\n * The factor to scale the Animation update time by.\r\n *\r\n * @name SpineGameObject#timeScale\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.timeScale = 1;\r\n\r\n /**\r\n * The calculated Display Origin of this Game Object.\r\n *\r\n * @name SpineGameObject#displayOriginX\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.displayOriginX = 0;\r\n\r\n /**\r\n * The calculated Display Origin of this Game Object.\r\n *\r\n * @name SpineGameObject#displayOriginY\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.displayOriginY = 0;\r\n\r\n /**\r\n * A flag that stores if the texture associated with the current\r\n * Skin being used by this Game Object, has its alpha pre-multiplied\r\n * into it, or not.\r\n *\r\n * @name SpineGameObject#preMultipliedAlpha\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.preMultipliedAlpha = false;\r\n\r\n /**\r\n * A default Blend Mode. You cannot change the blend mode of a\r\n * Spine Game Object.\r\n *\r\n * @name SpineGameObject#blendMode\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.blendMode = 0;\r\n\r\n this.setPosition(x, y);\r\n\r\n if (key)\r\n {\r\n this.setSkeleton(key, animationName, loop);\r\n }\r\n },\r\n\r\n /**\r\n * Overrides the default Game Object method and always returns true.\r\n * Rendering is decided in the renderer functions.\r\n *\r\n * @method SpineGameObject#willRender\r\n * @since 3.19.0\r\n *\r\n * @return {boolean} Always returns `true`.\r\n */\r\n willRender: function ()\r\n {\r\n return true;\r\n },\r\n\r\n /**\r\n * Set the Alpha level for the whole Skeleton of this Game Object.\r\n * \r\n * The alpha controls the opacity of the Game Object as it renders.\r\n * \r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * @method SpineGameObject#setAlpha\r\n * @since 3.19.0\r\n *\r\n * @param {number} [value=1] - The alpha value used for the whole Skeleton.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (value, slotName)\r\n {\r\n if (value === undefined) { value = 1; }\r\n\r\n if (slotName)\r\n {\r\n var slot = this.findSlot(slotName);\r\n\r\n if (slot)\r\n {\r\n slot.color.a = Clamp(value, 0, 1);\r\n }\r\n }\r\n else\r\n {\r\n this.alpha = value;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Skeleton.\r\n * \r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#alpha\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.a;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.a = v;\r\n }\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~2;\r\n }\r\n else\r\n {\r\n this.renderFlags |= 2;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of red used when rendering the Skeleton.\r\n * \r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#red\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n red: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.r;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.r = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of green used when rendering the Skeleton.\r\n * \r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#green\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n green: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.g;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.g = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of blue used when rendering the Skeleton.\r\n * \r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#blue\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n blue: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.b;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.b = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the color on the given attachment slot. Or, if no slot is given, on the whole skeleton.\r\n *\r\n * @method SpineGameObject#setColor\r\n * @since 3.19.0\r\n *\r\n * @param {integer} [color=0xffffff] - The color being applied to the Skeleton or named Slot. Set to white to disable any previously set color.\r\n * @param {string} [slotName] - The name of the slot to set the color on. If not give, will be set on the whole skeleton.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setColor: function (color, slotName)\r\n {\r\n if (color === undefined) { color = 0xffffff; }\r\n\r\n var red = (color >> 16 & 0xFF) / 255;\r\n var green = (color >> 8 & 0xFF) / 255;\r\n var blue = (color & 0xFF) / 255;\r\n var alpha = (color > 16777215) ? (color >>> 24) / 255 : null;\r\n\r\n var target = this.skeleton;\r\n\r\n if (slotName)\r\n {\r\n var slot = this.findSlot(slotName);\r\n\r\n if (slot)\r\n {\r\n target = slot;\r\n }\r\n }\r\n\r\n target.color.r = red;\r\n target.color.g = green;\r\n target.color.b = blue;\r\n\r\n if (alpha !== null)\r\n {\r\n target.color.a = alpha;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets this Game Object to use the given Skeleton based on the Atlas Data Key and a provided JSON object\r\n * that contains the Skeleton data.\r\n *\r\n * @method SpineGameObject#setSkeletonFromJSON\r\n * @since 3.19.0\r\n * \r\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\r\n * @param {object} skeletonJSON - The JSON data for the Skeleton.\r\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkeletonFromJSON: function (atlasDataKey, skeletonJSON, animationName, loop)\r\n {\r\n return this.setSkeleton(atlasDataKey, skeletonJSON, animationName, loop);\r\n },\r\n\r\n /**\r\n * Sets this Game Object to use the given Skeleton based on its cache key.\r\n * \r\n * Typically, once set, the Skeleton doesn't change. Instead, you change the skin,\r\n * or slot attachment, or any other property to adjust it.\r\n *\r\n * @method SpineGameObject#setSkeleton\r\n * @since 3.19.0\r\n * \r\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\r\n * @param {object} skeletonJSON - The JSON data for the Skeleton.\r\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkeleton: function (atlasDataKey, animationName, loop, skeletonJSON)\r\n {\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n var data = this.plugin.createSkeleton(atlasDataKey, skeletonJSON);\r\n\r\n this.skeletonData = data.skeletonData;\r\n\r\n this.preMultipliedAlpha = data.preMultipliedAlpha;\r\n\r\n var skeleton = data.skeleton;\r\n\r\n skeleton.setSkin();\r\n skeleton.setToSetupPose();\r\n\r\n this.skeleton = skeleton;\r\n\r\n // AnimationState\r\n data = this.plugin.createAnimationState(skeleton);\r\n\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n this.state = data.state;\r\n this.stateData = data.stateData;\r\n\r\n this.state.addListener({\r\n event: this.onEvent.bind(this),\r\n complete: this.onComplete.bind(this),\r\n start: this.onStart.bind(this),\r\n end: this.onEnd.bind(this),\r\n dispose: this.onDispose.bind(this),\r\n interrupted: this.onInterrupted.bind(this)\r\n });\r\n\r\n if (animationName)\r\n {\r\n this.setAnimation(0, animationName, loop);\r\n }\r\n\r\n this.root = this.getRootBone();\r\n\r\n if (this.root)\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\r\n }\r\n\r\n this.state.apply(skeleton);\r\n\r\n skeleton.updateCache();\r\n\r\n return this.updateSize();\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onComplete event via this Game Object.\r\n *\r\n * @method SpineGameObject#onComplete\r\n * @fires SpinePluginEvents#COMPLETE\r\n * @private\r\n * @since 3.19.0\r\n * \r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onComplete: function (entry)\r\n {\r\n this.emit(SpineEvents.COMPLETE, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onDispose event via this Game Object.\r\n *\r\n * @method SpineGameObject#onDispose\r\n * @fires SpinePluginEvents#DISPOSE\r\n * @private\r\n * @since 3.19.0\r\n * \r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onDispose: function (entry)\r\n {\r\n this.emit(SpineEvents.DISPOSE, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onEnd event via this Game Object.\r\n *\r\n * @method SpineGameObject#onEnd\r\n * @fires SpinePluginEvents#END\r\n * @private\r\n * @since 3.19.0\r\n * \r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onEnd: function (entry)\r\n {\r\n this.emit(SpineEvents.END, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine Event event via this Game Object.\r\n *\r\n * @method SpineGameObject#onEvent\r\n * @fires SpinePluginEvents#EVENT\r\n * @private\r\n * @since 3.19.0\r\n * \r\n * @param {any} entry - The event data from Spine.\r\n * @param {spine.Event} event - The Spine event.\r\n */\r\n onEvent: function (entry, event)\r\n {\r\n this.emit(SpineEvents.EVENT, entry, event);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onInterrupted event via this Game Object.\r\n *\r\n * @method SpineGameObject#onInterrupted\r\n * @fires SpinePluginEvents#INTERRUPTED\r\n * @private\r\n * @since 3.19.0\r\n * \r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onInterrupted: function (entry)\r\n {\r\n this.emit(SpineEvents.INTERRUPTED, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onStart event via this Game Object.\r\n *\r\n * @method SpineGameObject#onStart\r\n * @fires SpinePluginEvents#START\r\n * @private\r\n * @since 3.19.0\r\n * \r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onStart: function (entry)\r\n {\r\n this.emit(SpineEvents.START, entry);\r\n },\r\n\r\n /**\r\n * Refreshes the data about the current Skeleton.\r\n * \r\n * This will reset the rotation, position and size of the Skeleton to match this Game Object.\r\n * \r\n * Call this method if you need to access the Skeleton data directly, and it may have changed\r\n * recently.\r\n *\r\n * @method SpineGameObject#refresh\r\n * @since 3.19.0\r\n * \r\n * @return {this} This Game Object.\r\n */\r\n refresh: function ()\r\n {\r\n if (this.root)\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\r\n }\r\n\r\n this.updateSize();\r\n\r\n this.skeleton.updateCache();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the size of this Game Object.\r\n * \r\n * If no arguments are given it uses the current skeleton data dimensions.\r\n * \r\n * You can use this method to set a fixed size of this Game Object, such as for input detection,\r\n * when the skeleton data doesn't match what is required in-game.\r\n *\r\n * @method SpineGameObject#setSize\r\n * @since 3.19.0\r\n * \r\n * @param {number} [width] - The width of the Skeleton. If not given it defaults to the Skeleton Data width.\r\n * @param {number} [height] - The height of the Skeleton. If not given it defaults to the Skeleton Data height.\r\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\r\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\r\n * \r\n * @return {this} This Game Object.\r\n */\r\n setSize: function (width, height, offsetX, offsetY)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n if (width === undefined) { width = skeleton.data.width; }\r\n if (height === undefined) { height = skeleton.data.height; }\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n this.displayOriginX = skeleton.x - offsetX;\r\n this.displayOriginY = skeleton.y - offsetY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the offset of this Game Object from the Skeleton position.\r\n * \r\n * You can use this method to adjust how the position of this Game Object relates to the Skeleton it is using.\r\n *\r\n * @method SpineGameObject#setOffset\r\n * @since 3.19.0\r\n * \r\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\r\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\r\n * \r\n * @return {this} This Game Object.\r\n */\r\n setOffset: function (offsetX, offsetY)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n this.displayOriginX = skeleton.x - offsetX;\r\n this.displayOriginY = skeleton.y - offsetY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that syncs all of the Game Object position and scale data to the Skeleton.\r\n * It then syncs the skeleton bounds back to this Game Object.\r\n * \r\n * This method is called automatically as needed internally, however, it's also exposed should\r\n * you require overriding the size settings.\r\n *\r\n * @method SpineGameObject#updateSize\r\n * @since 3.19.0\r\n * \r\n * @return {this} This Game Object.\r\n */\r\n updateSize: function ()\r\n {\r\n var skeleton = this.skeleton;\r\n var renderer = this.plugin.renderer;\r\n\r\n var height = renderer.height;\r\n\r\n var oldScaleX = this.scaleX;\r\n var oldScaleY = this.scaleY;\r\n\r\n skeleton.x = this.x;\r\n skeleton.y = height - this.y;\r\n skeleton.scaleX = 1;\r\n skeleton.scaleY = 1;\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n var bounds = this.getBounds();\r\n\r\n this.width = bounds.size.x;\r\n this.height = bounds.size.y;\r\n\r\n this.displayOriginX = this.x - bounds.offset.x;\r\n this.displayOriginY = this.y - (height - (this.height + bounds.offset.y));\r\n\r\n skeleton.scaleX = oldScaleX;\r\n skeleton.scaleY = oldScaleY;\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The horizontal scale of this Game Object, as applied to the Skeleton it is using.\r\n *\r\n * @name SpineGameObject#scaleX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.19.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n\r\n this.refresh();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scale of this Game Object, as applied to the Skeleton it is using.\r\n *\r\n * @name SpineGameObject#scaleY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.19.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleY = value;\r\n\r\n this.refresh();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the bones in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getBoneList\r\n * @since 3.19.0\r\n * \r\n * @return {string[]} An array containing the names of all the bones in the Skeleton Data.\r\n */\r\n getBoneList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.bones.length; i++)\r\n {\r\n output.push(skeletonData.bones[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the skins in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getSkinList\r\n * @since 3.19.0\r\n * \r\n * @return {string[]} An array containing the names of all the skins in the Skeleton Data.\r\n */\r\n getSkinList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.skins.length; i++)\r\n {\r\n output.push(skeletonData.skins[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the slots in the Skeleton.\r\n *\r\n * @method SpineGameObject#getSlotList\r\n * @since 3.19.0\r\n * \r\n * @return {string[]} An array containing the names of all the slots in the Skeleton.\r\n */\r\n getSlotList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeleton = this.skeleton;\r\n\r\n for (var i = 0; i < skeleton.slots.length; i++)\r\n {\r\n output.push(skeleton.slots[i].data.name);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the animations in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getAnimationList\r\n * @since 3.19.0\r\n * \r\n * @return {string[]} An array containing the names of all the animations in the Skeleton Data.\r\n */\r\n getAnimationList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.animations.length; i++)\r\n {\r\n output.push(skeletonData.animations[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the current animation being played on the given track, if any.\r\n *\r\n * @method SpineGameObject#getCurrentAnimation\r\n * @since 3.19.0\r\n * \r\n * @param {integer} [trackIndex=0] - The track to return the current animation on.\r\n * \r\n * @return {?spine.Animation} The current Animation on the given track, or `undefined` if there is no current animation.\r\n */\r\n getCurrentAnimation: function (trackIndex)\r\n {\r\n if (trackIndex === undefined) { trackIndex = 0; }\r\n\r\n var current = this.state.getCurrent(trackIndex);\r\n\r\n if (current)\r\n {\r\n return current.animation;\r\n }\r\n },\r\n\r\n /**\r\n * Sets the current animation for a track, discarding any queued animations.\r\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\r\n * \r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n *\r\n * @method SpineGameObject#play\r\n * @fires SpinePluginEvents#START\r\n * @since 3.19.0\r\n *\r\n * @param {string} animationName - The string-based key of the animation to play.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call.\r\n *\r\n * @return {this} This Game Object. If you need the TrackEntry, see `setAnimation` instead.\r\n */\r\n play: function (animationName, loop, ignoreIfPlaying)\r\n {\r\n this.setAnimation(0, animationName, loop, ignoreIfPlaying);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current animation for a track, discarding any queued animations.\r\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\r\n * \r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n *\r\n * @method SpineGameObject#setAnimation\r\n * @fires SpinePluginEvents#START\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to play the animation on.\r\n * @param {string} animationName - The string-based key of the animation to play.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call.\r\n *\r\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\r\n */\r\n setAnimation: function (trackIndex, animationName, loop, ignoreIfPlaying)\r\n {\r\n if (loop === undefined) { loop = false; }\r\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\r\n\r\n if (ignoreIfPlaying && this.state)\r\n {\r\n var currentTrack = this.state.getCurrent(0);\r\n \r\n if (currentTrack && currentTrack.animation.name === animationName && !currentTrack.isComplete())\r\n {\r\n return;\r\n }\r\n }\r\n\r\n if (this.findAnimation(animationName))\r\n {\r\n return this.state.setAnimation(trackIndex, animationName, loop);\r\n }\r\n },\r\n\r\n /**\r\n * Adds an animation to be played after the current or last queued animation for a track.\r\n * If the track is empty, it is equivalent to calling setAnimation.\r\n * \r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n * \r\n * The delay is a float. If > 0, sets delay. If <= 0, the delay set is the duration of the previous\r\n * track entry minus any mix duration (from the AnimationStateData) plus the specified delay\r\n * (ie the mix ends at (delay = 0) or before (delay < 0) the previous track entry duration).\r\n * If the previous entry is looping, its next loop completion is used instead of its duration.\r\n *\r\n * @method SpineGameObject#addAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n * @param {string} animationName - The string-based key of the animation to add.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {integer} [delay=0] - A delay, in ms, before which this animation will start when played.\r\n *\r\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\r\n */\r\n addAnimation: function (trackIndex, animationName, loop, delay)\r\n {\r\n return this.state.addAnimation(trackIndex, animationName, loop, delay);\r\n },\r\n\r\n /**\r\n * Sets an empty animation for a track, discarding any queued animations, and sets the track\r\n * entry's mixDuration. An empty animation has no timelines and serves as a placeholder for mixing in or out.\r\n * \r\n * Mixing out is done by setting an empty animation with a mix duration using either setEmptyAnimation,\r\n * setEmptyAnimations, or addEmptyAnimation. Mixing to an empty animation causes the previous animation to be\r\n * applied less and less over the mix duration. Properties keyed in the previous animation transition to\r\n * the value from lower tracks or to the setup pose value if no lower tracks key the property.\r\n * A mix duration of 0 still mixes out over one frame.\r\n * \r\n * Mixing in is done by first setting an empty animation, then adding an animation using addAnimation\r\n * and on the returned track entry, set the mixDuration. Mixing from an empty animation causes the new\r\n * animation to be applied more and more over the mix duration. Properties keyed in the new animation\r\n * transition from the value from lower tracks or from the setup pose value if no lower tracks key the\r\n * property to the value keyed in the new animation.\r\n *\r\n * @method SpineGameObject#setEmptyAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n * @param {integer} [mixDuration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\r\n *\r\n * @return {spine.TrackEntry} The returned Track Entry.\r\n */\r\n setEmptyAnimation: function (trackIndex, mixDuration)\r\n {\r\n return this.state.setEmptyAnimation(trackIndex, mixDuration);\r\n },\r\n\r\n /**\r\n * Removes all animations from the track, leaving skeletons in their current pose.\r\n * \r\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\r\n * rather than leaving them in their current pose.\r\n *\r\n * @method SpineGameObject#clearTrack\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n clearTrack: function (trackIndex)\r\n {\r\n this.state.clearTrack(trackIndex);\r\n\r\n return this;\r\n },\r\n \r\n /**\r\n * Removes all animations from all tracks, leaving skeletons in their current pose.\r\n * \r\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\r\n * rather than leaving them in their current pose.\r\n *\r\n * @method SpineGameObject#clearTracks\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n clearTracks: function ()\r\n {\r\n this.state.clearTracks();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the skin used to look up attachments before looking in the defaultSkin.\r\n * \r\n * Attachments from the new skin are attached if the corresponding attachment from the\r\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\r\n * attached from the new skin.\r\n * \r\n * After changing the skin, the visible attachments can be reset to those attached in the\r\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\r\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\r\n * or show attachments from the new skin.\r\n *\r\n * @method SpineGameObject#setSkinByName\r\n * @since 3.19.0\r\n * \r\n * @param {string} skinName - The name of the skin to set.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkinByName: function (skinName)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n skeleton.setSkinByName(skinName);\r\n\r\n skeleton.setSlotsToSetupPose();\r\n\r\n this.state.apply(skeleton);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the skin used to look up attachments before looking in the defaultSkin.\r\n * \r\n * Attachments from the new skin are attached if the corresponding attachment from the\r\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\r\n * attached from the new skin.\r\n * \r\n * After changing the skin, the visible attachments can be reset to those attached in the\r\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\r\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\r\n * or show attachments from the new skin.\r\n *\r\n * @method SpineGameObject#setSkin\r\n * @since 3.19.0\r\n * \r\n * @param {?spine.Skin} newSkin - The Skin to set. May be `null`.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkin: function (newSkin)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n skeleton.setSkin(newSkin);\r\n\r\n skeleton.setSlotsToSetupPose();\r\n\r\n this.state.apply(skeleton);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the mix duration when changing from the specified animation to the other.\r\n *\r\n * @method SpineGameObject#setMix\r\n * @since 3.19.0\r\n * \r\n * @param {string} fromName - The animation to mix from.\r\n * @param {string} toName - The animation to mix to.\r\n * @param {number} [duration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setMix: function (fromName, toName, duration)\r\n {\r\n this.stateData.setMix(fromName, toName, duration);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Finds an attachment by looking in the skin and defaultSkin using the slot\r\n * index and attachment name. First the skin is checked and if the attachment was not found,\r\n * the default skin is checked.\r\n *\r\n * @method SpineGameObject#getAttachment\r\n * @since 3.19.0\r\n * \r\n * @param {integer} slotIndex - The slot index to search.\r\n * @param {string} attachmentName - The attachment name to look for.\r\n *\r\n * @return {?spine.Attachment} The Attachment, if found. May be null.\r\n */\r\n getAttachment: function (slotIndex, attachmentName)\r\n {\r\n return this.skeleton.getAttachment(slotIndex, attachmentName);\r\n },\r\n\r\n /**\r\n * Finds an attachment by looking in the skin and defaultSkin using the slot name and attachment name.\r\n *\r\n * @method SpineGameObject#getAttachmentByName\r\n * @since 3.19.0\r\n * \r\n * @param {string} slotName - The slot name to search.\r\n * @param {string} attachmentName - The attachment name to look for.\r\n *\r\n * @return {?spine.Attachment} The Attachment, if found. May be null.\r\n */\r\n getAttachmentByName: function (slotName, attachmentName)\r\n {\r\n return this.skeleton.getAttachmentByName(slotName, attachmentName);\r\n },\r\n\r\n /**\r\n * A convenience method to set an attachment by finding the slot with findSlot,\r\n * finding the attachment with getAttachment, then setting the slot's attachment.\r\n *\r\n * @method SpineGameObject#setAttachment\r\n * @since 3.19.0\r\n * \r\n * @param {string} slotName - The slot name to add the attachment to.\r\n * @param {string} attachmentName - The attachment name to add.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setAttachment: function (slotName, attachmentName)\r\n {\r\n if (Array.isArray(slotName) && Array.isArray(attachmentName) && slotName.length === attachmentName.length)\r\n {\r\n for (var i = 0; i < slotName.length; i++)\r\n {\r\n this.skeleton.setAttachment(slotName[i], attachmentName[i]);\r\n }\r\n }\r\n else\r\n {\r\n this.skeleton.setAttachment(slotName, attachmentName);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the bones, constraints, slots, and draw order to their setup pose values.\r\n *\r\n * @method SpineGameObject#setToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setToSetupPose: function ()\r\n {\r\n this.skeleton.setToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the slots and draw order to their setup pose values.\r\n *\r\n * @method SpineGameObject#setSlotsToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSlotsToSetupPose: function ()\r\n {\r\n this.skeleton.setSlotsToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the bones and constraints to their setup pose values.\r\n *\r\n * @method SpineGameObject#setBonesToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setBonesToSetupPose: function ()\r\n {\r\n this.skeleton.setBonesToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the root bone, or null.\r\n *\r\n * @method SpineGameObject#getRootBone\r\n * @since 3.19.0\r\n *\r\n * @return {spine.Bone} The root bone, or null.\r\n */\r\n getRootBone: function ()\r\n {\r\n return this.skeleton.getRootBone();\r\n },\r\n\r\n /**\r\n * Takes a Bone object and a position in world space and rotates the Bone so it is angled\r\n * towards the given position. You can set an optional angle offset, should the bone be\r\n * designed at a specific angle already. You can also set a minimum and maximum range for the angle.\r\n *\r\n * @method SpineGameObject#angleBoneToXY\r\n * @since 3.19.0\r\n * \r\n * @param {spine.Bone} bone - The bone to rotate towards the world position.\r\n * @param {number} worldX - The world x coordinate to rotate the bone towards.\r\n * @param {number} worldY - The world y coordinate to rotate the bone towards.\r\n * @param {number} [offset=0] - An offset to add to the rotation angle.\r\n * @param {number} [minAngle=0] - The minimum range of the rotation angle.\r\n * @param {number} [maxAngle=360] - The maximum range of the rotation angle.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n angleBoneToXY: function (bone, worldX, worldY, offset, minAngle, maxAngle)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n if (minAngle === undefined) { minAngle = 0; }\r\n if (maxAngle === undefined) { maxAngle = 360; }\r\n\r\n var renderer = this.plugin.renderer;\r\n var height = renderer.height;\r\n\r\n var angle = CounterClockwise(AngleBetween(bone.worldX, height - bone.worldY, worldX, worldY) + DegToRad(offset));\r\n\r\n bone.rotation = Clamp(RadToDeg(angle), minAngle, maxAngle);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Finds a bone by comparing each bone's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findBone\r\n * @since 3.19.0\r\n * \r\n * @param {string} boneName - The name of the bone to find.\r\n *\r\n * @return {spine.Bone} The bone, or null.\r\n */\r\n findBone: function (boneName)\r\n {\r\n return this.skeleton.findBone(boneName);\r\n },\r\n\r\n /**\r\n * Finds the index of a bone by comparing each bone's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findBoneIndex\r\n * @since 3.19.0\r\n * \r\n * @param {string} boneName - The name of the bone to find.\r\n *\r\n * @return {integer} The bone index. Or -1 if the bone was not found.\r\n */\r\n findBoneIndex: function (boneName)\r\n {\r\n return this.skeleton.findBoneIndex(boneName);\r\n },\r\n\r\n /**\r\n * Finds a slot by comparing each slot's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSlot\r\n * @since 3.19.0\r\n * \r\n * @param {string} slotName - The name of the slot to find.\r\n *\r\n * @return {spine.Slot} The Slot. May be null.\r\n */\r\n findSlot: function (slotName)\r\n {\r\n return this.skeleton.findSlot(slotName);\r\n },\r\n\r\n /**\r\n * Finds the index of a slot by comparing each slot's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSlotIndex\r\n * @since 3.19.0\r\n * \r\n * @param {string} slotName - The name of the slot to find.\r\n *\r\n * @return {integer} The slot index. Or -1 if the Slot was not found.\r\n */\r\n findSlotIndex: function (slotName)\r\n {\r\n return this.skeleton.findSlotIndex(slotName);\r\n },\r\n\r\n /**\r\n * Finds a skin by comparing each skin's name. It is more efficient to cache the results of\r\n * this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSkin\r\n * @since 3.19.0\r\n * \r\n * @param {string} skinName - The name of the skin to find.\r\n *\r\n * @return {spine.Skin} The Skin. May be null.\r\n */\r\n findSkin: function (skinName)\r\n {\r\n return this.skeletonData.findSkin(skinName);\r\n },\r\n\r\n /**\r\n * Finds an event by comparing each events's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findEvent\r\n * @since 3.19.0\r\n * \r\n * @param {string} eventDataName - The name of the event to find.\r\n *\r\n * @return {spine.EventData} The Event Data. May be null.\r\n */\r\n findEvent: function (eventDataName)\r\n {\r\n return this.skeletonData.findEvent(eventDataName);\r\n },\r\n\r\n /**\r\n * Finds an animation by comparing each animation's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findAnimation\r\n * @since 3.19.0\r\n * \r\n * @param {string} animationName - The name of the animation to find.\r\n *\r\n * @return {spine.Animation} The Animation. May be null.\r\n */\r\n findAnimation: function (animationName)\r\n {\r\n return this.skeletonData.findAnimation(animationName);\r\n },\r\n\r\n /**\r\n * Finds an IK constraint by comparing each IK constraint's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findIkConstraint\r\n * @since 3.19.0\r\n * \r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.IkConstraintData} The IK constraint. May be null.\r\n */\r\n findIkConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findIkConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds an transform constraint by comparing each transform constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findTransformConstraint\r\n * @since 3.19.0\r\n * \r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.TransformConstraintData} The transform constraint. May be null.\r\n */\r\n findTransformConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findTransformConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds a path constraint by comparing each path constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findPathConstraint\r\n * @since 3.19.0\r\n * \r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.PathConstraintData} The path constraint. May be null.\r\n */\r\n findPathConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findPathConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds the index of a path constraint by comparing each path constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findPathConstraintIndex\r\n * @since 3.19.0\r\n * \r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {integer} The constraint index. Or -1 if the constraint was not found.\r\n */\r\n findPathConstraintIndex: function (constraintName)\r\n {\r\n return this.skeletonData.findPathConstraintIndex(constraintName);\r\n },\r\n\r\n /**\r\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\r\n * \r\n * The returned object contains two properties: `offset` and `size`:\r\n * \r\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\r\n * `size` - The width and height of the AABB.\r\n *\r\n * @method SpineGameObject#getBounds\r\n * @since 3.19.0\r\n * \r\n * @return {any} The bounds object.\r\n */\r\n getBounds: function ()\r\n {\r\n return this.plugin.getBounds(this.skeleton);\r\n },\r\n\r\n /**\r\n * Internal update handler.\r\n *\r\n * @method SpineGameObject#preUpdate\r\n * @protected\r\n * @since 3.19.0\r\n * \r\n * @param {number} time - The current timestamp.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n preUpdate: function (time, delta)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n this.state.update((delta / 1000) * this.timeScale);\r\n\r\n this.state.apply(skeleton);\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method SpineGameObject#preDestroy\r\n * @protected\r\n * @since 3.19.0\r\n */\r\n preDestroy: function ()\r\n {\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n this.plugin = null;\r\n\r\n this.skeleton = null;\r\n this.skeletonData = null;\r\n\r\n this.state = null;\r\n this.stateData = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpineGameObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar Wrap = require('../../../../src/math/Wrap');\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method SpineGameObject#renderCanvas\r\n * @since 3.19.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar SpineGameObjectCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var context = renderer.currentContext;\r\n\r\n var plugin = src.plugin;\r\n var skeleton = src.skeleton;\r\n var skeletonRenderer = plugin.skeletonRenderer;\r\n\r\n var GameObjectRenderMask = 15;\r\n\r\n var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)));\r\n\r\n if (!skeleton || !willRender)\r\n {\r\n return;\r\n }\r\n\r\n var camMatrix = renderer._tempMatrix1;\r\n var spriteMatrix = renderer._tempMatrix2;\r\n var calcMatrix = renderer._tempMatrix3;\r\n\r\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = src.x;\r\n spriteMatrix.f = src.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n skeleton.x = calcMatrix.tx;\r\n skeleton.y = calcMatrix.ty;\r\n\r\n skeleton.scaleX = calcMatrix.scaleX;\r\n\r\n // Inverse or we get upside-down skeletons\r\n skeleton.scaleY = calcMatrix.scaleY * -1;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n skeleton.scaleX *= -1;\r\n\r\n src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);\r\n }\r\n else\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\r\n }\r\n\r\n if (src.scaleY < 0)\r\n {\r\n skeleton.scaleY *= -1;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n else\r\n {\r\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n }\r\n\r\n if (camera.renderToTexture)\r\n {\r\n skeleton.y = calcMatrix.ty;\r\n skeleton.scaleY *= -1;\r\n }\r\n\r\n // Add autoUpdate option\r\n skeleton.updateWorldTransform();\r\n\r\n skeletonRenderer.ctx = context;\r\n skeletonRenderer.debugRendering = (plugin.drawDebug || src.drawDebug);\r\n\r\n context.save();\r\n\r\n skeletonRenderer.draw(skeleton);\r\n\r\n context.restore();\r\n};\r\n\r\nmodule.exports = SpineGameObjectCanvasRenderer;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar renderWebGL = require('../../../../src/utils/NOOP');\r\nvar renderCanvas = require('../../../../src/utils/NOOP');\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = require('./SpineGameObjectWebGLRenderer');\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = require('./SpineGameObjectCanvasRenderer');\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n","/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar RadToDeg = require('../../../../src/math/RadToDeg');\nvar Wrap = require('../../../../src/math/Wrap');\n\n/**\n * Renders this Game Object with the WebGL Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method SpineGameObject#renderWebGL\n * @since 3.19.0\n * @private\n *\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\n{\n var plugin = src.plugin;\n var skeleton = src.skeleton;\n var sceneRenderer = plugin.sceneRenderer;\n\n var GameObjectRenderMask = 15;\n\n var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)));\n\n if (!skeleton || !willRender)\n {\n // Reset the current type\n renderer.currentType = '';\n\n // If there is already a batch running, we need to close it\n if (!renderer.nextTypeMatch)\n {\n // The next object in the display list is not a Spine object, so we end the batch\n sceneRenderer.end();\n\n renderer.rebindPipeline(renderer.pipelines.MultiPipeline);\n }\n\n return;\n }\n\n if (renderer.newType)\n {\n renderer.clearPipeline();\n }\n\n var camMatrix = renderer._tempMatrix1;\n var spriteMatrix = renderer._tempMatrix2;\n var calcMatrix = renderer._tempMatrix3;\n\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));\n\n camMatrix.copyFrom(camera.matrix);\n\n if (parentMatrix)\n {\n // Multiply the camera by the parent matrix\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\n\n // Undo the camera scroll\n spriteMatrix.e = src.x;\n spriteMatrix.f = src.y;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n }\n else\n {\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n }\n\n var viewportHeight = renderer.height;\n\n skeleton.x = calcMatrix.tx;\n skeleton.y = viewportHeight - calcMatrix.ty;\n\n skeleton.scaleX = calcMatrix.scaleX;\n skeleton.scaleY = calcMatrix.scaleY;\n\n if (src.scaleX < 0)\n {\n skeleton.scaleX *= -1;\n\n src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);\n }\n else\n {\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\n }\n\n if (src.scaleY < 0)\n {\n skeleton.scaleY *= -1;\n\n if (src.scaleX < 0)\n {\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n else\n {\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n }\n\n if (camera.renderToTexture)\n {\n skeleton.y = calcMatrix.ty;\n skeleton.scaleY *= -1;\n }\n\n // Add autoUpdate option\n skeleton.updateWorldTransform();\n\n if (renderer.newType)\n {\n sceneRenderer.begin();\n }\n\n // Draw the current skeleton\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\n\n if (plugin.drawDebug || src.drawDebug)\n {\n // Because if we don't, the bones render positions are completely wrong (*sigh*)\n var oldX = skeleton.x;\n var oldY = skeleton.y;\n\n skeleton.x = 0;\n skeleton.y = 0;\n\n sceneRenderer.drawSkeletonDebug(skeleton, src.preMultipliedAlpha);\n\n skeleton.x = oldX;\n skeleton.y = oldY;\n }\n\n if (!renderer.nextTypeMatch)\n {\n // The next object in the display list is not a Spine object, so we end the batch\n sceneRenderer.end();\n\n renderer.rebindPipeline(renderer.pipelines.MultiPipeline);\n }\n};\n\nmodule.exports = SpineGameObjectWebGLRenderer;\n","/*** IMPORTS FROM imports-loader ***/\n\n(function() {\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar spine;\r\n(function (spine) {\r\n var Animation = (function () {\r\n function Animation(name, timelines, duration) {\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n if (timelines == null)\r\n throw new Error(\"timelines cannot be null.\");\r\n this.name = name;\r\n this.timelines = timelines;\r\n this.timelineIds = [];\r\n for (var i = 0; i < timelines.length; i++)\r\n this.timelineIds[timelines[i].getPropertyId()] = true;\r\n this.duration = duration;\r\n }\r\n Animation.prototype.hasTimeline = function (id) {\r\n return this.timelineIds[id] == true;\r\n };\r\n Animation.prototype.apply = function (skeleton, lastTime, time, loop, events, alpha, blend, direction) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n if (loop && this.duration != 0) {\r\n time %= this.duration;\r\n if (lastTime > 0)\r\n lastTime %= this.duration;\r\n }\r\n var timelines = this.timelines;\r\n for (var i = 0, n = timelines.length; i < n; i++)\r\n timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\r\n };\r\n Animation.binarySearch = function (values, target, step) {\r\n if (step === void 0) { step = 1; }\r\n var low = 0;\r\n var high = values.length / step - 2;\r\n if (high == 0)\r\n return step;\r\n var current = high >>> 1;\r\n while (true) {\r\n if (values[(current + 1) * step] <= target)\r\n low = current + 1;\r\n else\r\n high = current;\r\n if (low == high)\r\n return (low + 1) * step;\r\n current = (low + high) >>> 1;\r\n }\r\n };\r\n Animation.linearSearch = function (values, target, step) {\r\n for (var i = 0, last = values.length - step; i <= last; i += step)\r\n if (values[i] > target)\r\n return i;\r\n return -1;\r\n };\r\n return Animation;\r\n }());\r\n spine.Animation = Animation;\r\n var MixBlend;\r\n (function (MixBlend) {\r\n MixBlend[MixBlend[\"setup\"] = 0] = \"setup\";\r\n MixBlend[MixBlend[\"first\"] = 1] = \"first\";\r\n MixBlend[MixBlend[\"replace\"] = 2] = \"replace\";\r\n MixBlend[MixBlend[\"add\"] = 3] = \"add\";\r\n })(MixBlend = spine.MixBlend || (spine.MixBlend = {}));\r\n var MixDirection;\r\n (function (MixDirection) {\r\n MixDirection[MixDirection[\"mixIn\"] = 0] = \"mixIn\";\r\n MixDirection[MixDirection[\"mixOut\"] = 1] = \"mixOut\";\r\n })(MixDirection = spine.MixDirection || (spine.MixDirection = {}));\r\n var TimelineType;\r\n (function (TimelineType) {\r\n TimelineType[TimelineType[\"rotate\"] = 0] = \"rotate\";\r\n TimelineType[TimelineType[\"translate\"] = 1] = \"translate\";\r\n TimelineType[TimelineType[\"scale\"] = 2] = \"scale\";\r\n TimelineType[TimelineType[\"shear\"] = 3] = \"shear\";\r\n TimelineType[TimelineType[\"attachment\"] = 4] = \"attachment\";\r\n TimelineType[TimelineType[\"color\"] = 5] = \"color\";\r\n TimelineType[TimelineType[\"deform\"] = 6] = \"deform\";\r\n TimelineType[TimelineType[\"event\"] = 7] = \"event\";\r\n TimelineType[TimelineType[\"drawOrder\"] = 8] = \"drawOrder\";\r\n TimelineType[TimelineType[\"ikConstraint\"] = 9] = \"ikConstraint\";\r\n TimelineType[TimelineType[\"transformConstraint\"] = 10] = \"transformConstraint\";\r\n TimelineType[TimelineType[\"pathConstraintPosition\"] = 11] = \"pathConstraintPosition\";\r\n TimelineType[TimelineType[\"pathConstraintSpacing\"] = 12] = \"pathConstraintSpacing\";\r\n TimelineType[TimelineType[\"pathConstraintMix\"] = 13] = \"pathConstraintMix\";\r\n TimelineType[TimelineType[\"twoColor\"] = 14] = \"twoColor\";\r\n })(TimelineType = spine.TimelineType || (spine.TimelineType = {}));\r\n var CurveTimeline = (function () {\r\n function CurveTimeline(frameCount) {\r\n if (frameCount <= 0)\r\n throw new Error(\"frameCount must be > 0: \" + frameCount);\r\n this.curves = spine.Utils.newFloatArray((frameCount - 1) * CurveTimeline.BEZIER_SIZE);\r\n }\r\n CurveTimeline.prototype.getFrameCount = function () {\r\n return this.curves.length / CurveTimeline.BEZIER_SIZE + 1;\r\n };\r\n CurveTimeline.prototype.setLinear = function (frameIndex) {\r\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.LINEAR;\r\n };\r\n CurveTimeline.prototype.setStepped = function (frameIndex) {\r\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.STEPPED;\r\n };\r\n CurveTimeline.prototype.getCurveType = function (frameIndex) {\r\n var index = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n if (index == this.curves.length)\r\n return CurveTimeline.LINEAR;\r\n var type = this.curves[index];\r\n if (type == CurveTimeline.LINEAR)\r\n return CurveTimeline.LINEAR;\r\n if (type == CurveTimeline.STEPPED)\r\n return CurveTimeline.STEPPED;\r\n return CurveTimeline.BEZIER;\r\n };\r\n CurveTimeline.prototype.setCurve = function (frameIndex, cx1, cy1, cx2, cy2) {\r\n var tmpx = (-cx1 * 2 + cx2) * 0.03, tmpy = (-cy1 * 2 + cy2) * 0.03;\r\n var dddfx = ((cx1 - cx2) * 3 + 1) * 0.006, dddfy = ((cy1 - cy2) * 3 + 1) * 0.006;\r\n var ddfx = tmpx * 2 + dddfx, ddfy = tmpy * 2 + dddfy;\r\n var dfx = cx1 * 0.3 + tmpx + dddfx * 0.16666667, dfy = cy1 * 0.3 + tmpy + dddfy * 0.16666667;\r\n var i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n var curves = this.curves;\r\n curves[i++] = CurveTimeline.BEZIER;\r\n var x = dfx, y = dfy;\r\n for (var n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n curves[i] = x;\r\n curves[i + 1] = y;\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n x += dfx;\r\n y += dfy;\r\n }\r\n };\r\n CurveTimeline.prototype.getCurvePercent = function (frameIndex, percent) {\r\n percent = spine.MathUtils.clamp(percent, 0, 1);\r\n var curves = this.curves;\r\n var i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n var type = curves[i];\r\n if (type == CurveTimeline.LINEAR)\r\n return percent;\r\n if (type == CurveTimeline.STEPPED)\r\n return 0;\r\n i++;\r\n var x = 0;\r\n for (var start = i, n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n x = curves[i];\r\n if (x >= percent) {\r\n var prevX = void 0, prevY = void 0;\r\n if (i == start) {\r\n prevX = 0;\r\n prevY = 0;\r\n }\r\n else {\r\n prevX = curves[i - 2];\r\n prevY = curves[i - 1];\r\n }\r\n return prevY + (curves[i + 1] - prevY) * (percent - prevX) / (x - prevX);\r\n }\r\n }\r\n var y = curves[i - 1];\r\n return y + (1 - y) * (percent - x) / (1 - x);\r\n };\r\n CurveTimeline.LINEAR = 0;\r\n CurveTimeline.STEPPED = 1;\r\n CurveTimeline.BEZIER = 2;\r\n CurveTimeline.BEZIER_SIZE = 10 * 2 - 1;\r\n return CurveTimeline;\r\n }());\r\n spine.CurveTimeline = CurveTimeline;\r\n var RotateTimeline = (function (_super) {\r\n __extends(RotateTimeline, _super);\r\n function RotateTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount << 1);\r\n return _this;\r\n }\r\n RotateTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.rotate << 24) + this.boneIndex;\r\n };\r\n RotateTimeline.prototype.setFrame = function (frameIndex, time, degrees) {\r\n frameIndex <<= 1;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + RotateTimeline.ROTATION] = degrees;\r\n };\r\n RotateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation;\r\n return;\r\n case MixBlend.first:\r\n var r_1 = bone.data.rotation - bone.rotation;\r\n bone.rotation += (r_1 - (16384 - ((16384.499999999996 - r_1 / 360) | 0)) * 360) * alpha;\r\n }\r\n return;\r\n }\r\n if (time >= frames[frames.length - RotateTimeline.ENTRIES]) {\r\n var r_2 = frames[frames.length + RotateTimeline.PREV_ROTATION];\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation + r_2 * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n r_2 += bone.data.rotation - bone.rotation;\r\n r_2 -= (16384 - ((16384.499999999996 - r_2 / 360) | 0)) * 360;\r\n case MixBlend.add:\r\n bone.rotation += r_2 * alpha;\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time, RotateTimeline.ENTRIES);\r\n var prevRotation = frames[frame + RotateTimeline.PREV_ROTATION];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime));\r\n var r = frames[frame + RotateTimeline.ROTATION] - prevRotation;\r\n r = prevRotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * percent;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n r += bone.data.rotation - bone.rotation;\r\n case MixBlend.add:\r\n bone.rotation += (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n }\r\n };\r\n RotateTimeline.ENTRIES = 2;\r\n RotateTimeline.PREV_TIME = -2;\r\n RotateTimeline.PREV_ROTATION = -1;\r\n RotateTimeline.ROTATION = 1;\r\n return RotateTimeline;\r\n }(CurveTimeline));\r\n spine.RotateTimeline = RotateTimeline;\r\n var TranslateTimeline = (function (_super) {\r\n __extends(TranslateTimeline, _super);\r\n function TranslateTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TranslateTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.translate << 24) + this.boneIndex;\r\n };\r\n TranslateTimeline.prototype.setFrame = function (frameIndex, time, x, y) {\r\n frameIndex *= TranslateTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TranslateTimeline.X] = x;\r\n this.frames[frameIndex + TranslateTimeline.Y] = y;\r\n };\r\n TranslateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.x = bone.data.x;\r\n bone.y = bone.data.y;\r\n return;\r\n case MixBlend.first:\r\n bone.x += (bone.data.x - bone.x) * alpha;\r\n bone.y += (bone.data.y - bone.y) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - TranslateTimeline.ENTRIES]) {\r\n x = frames[frames.length + TranslateTimeline.PREV_X];\r\n y = frames[frames.length + TranslateTimeline.PREV_Y];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TranslateTimeline.ENTRIES);\r\n x = frames[frame + TranslateTimeline.PREV_X];\r\n y = frames[frame + TranslateTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TranslateTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TranslateTimeline.PREV_TIME] - frameTime));\r\n x += (frames[frame + TranslateTimeline.X] - x) * percent;\r\n y += (frames[frame + TranslateTimeline.Y] - y) * percent;\r\n }\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.x = bone.data.x + x * alpha;\r\n bone.y = bone.data.y + y * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bone.x += (bone.data.x + x - bone.x) * alpha;\r\n bone.y += (bone.data.y + y - bone.y) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bone.x += x * alpha;\r\n bone.y += y * alpha;\r\n }\r\n };\r\n TranslateTimeline.ENTRIES = 3;\r\n TranslateTimeline.PREV_TIME = -3;\r\n TranslateTimeline.PREV_X = -2;\r\n TranslateTimeline.PREV_Y = -1;\r\n TranslateTimeline.X = 1;\r\n TranslateTimeline.Y = 2;\r\n return TranslateTimeline;\r\n }(CurveTimeline));\r\n spine.TranslateTimeline = TranslateTimeline;\r\n var ScaleTimeline = (function (_super) {\r\n __extends(ScaleTimeline, _super);\r\n function ScaleTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n ScaleTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.scale << 24) + this.boneIndex;\r\n };\r\n ScaleTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.scaleX = bone.data.scaleX;\r\n bone.scaleY = bone.data.scaleY;\r\n return;\r\n case MixBlend.first:\r\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\r\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - ScaleTimeline.ENTRIES]) {\r\n x = frames[frames.length + ScaleTimeline.PREV_X] * bone.data.scaleX;\r\n y = frames[frames.length + ScaleTimeline.PREV_Y] * bone.data.scaleY;\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ScaleTimeline.ENTRIES);\r\n x = frames[frame + ScaleTimeline.PREV_X];\r\n y = frames[frame + ScaleTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ScaleTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ScaleTimeline.PREV_TIME] - frameTime));\r\n x = (x + (frames[frame + ScaleTimeline.X] - x) * percent) * bone.data.scaleX;\r\n y = (y + (frames[frame + ScaleTimeline.Y] - y) * percent) * bone.data.scaleY;\r\n }\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n bone.scaleX += x - bone.data.scaleX;\r\n bone.scaleY += y - bone.data.scaleY;\r\n }\r\n else {\r\n bone.scaleX = x;\r\n bone.scaleY = y;\r\n }\r\n }\r\n else {\r\n var bx = 0, by = 0;\r\n if (direction == MixDirection.mixOut) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bx = bone.data.scaleX;\r\n by = bone.data.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bx = bone.scaleX;\r\n by = bone.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bx = bone.scaleX;\r\n by = bone.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bone.data.scaleX) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - bone.data.scaleY) * alpha;\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bx = Math.abs(bone.data.scaleX) * spine.MathUtils.signum(x);\r\n by = Math.abs(bone.data.scaleY) * spine.MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bx = Math.abs(bone.scaleX) * spine.MathUtils.signum(x);\r\n by = Math.abs(bone.scaleY) * spine.MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bx = spine.MathUtils.signum(x);\r\n by = spine.MathUtils.signum(y);\r\n bone.scaleX = Math.abs(bone.scaleX) * bx + (x - Math.abs(bone.data.scaleX) * bx) * alpha;\r\n bone.scaleY = Math.abs(bone.scaleY) * by + (y - Math.abs(bone.data.scaleY) * by) * alpha;\r\n }\r\n }\r\n }\r\n };\r\n return ScaleTimeline;\r\n }(TranslateTimeline));\r\n spine.ScaleTimeline = ScaleTimeline;\r\n var ShearTimeline = (function (_super) {\r\n __extends(ShearTimeline, _super);\r\n function ShearTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n ShearTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.shear << 24) + this.boneIndex;\r\n };\r\n ShearTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.shearX = bone.data.shearX;\r\n bone.shearY = bone.data.shearY;\r\n return;\r\n case MixBlend.first:\r\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - ShearTimeline.ENTRIES]) {\r\n x = frames[frames.length + ShearTimeline.PREV_X];\r\n y = frames[frames.length + ShearTimeline.PREV_Y];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ShearTimeline.ENTRIES);\r\n x = frames[frame + ShearTimeline.PREV_X];\r\n y = frames[frame + ShearTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ShearTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ShearTimeline.PREV_TIME] - frameTime));\r\n x = x + (frames[frame + ShearTimeline.X] - x) * percent;\r\n y = y + (frames[frame + ShearTimeline.Y] - y) * percent;\r\n }\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.shearX = bone.data.shearX + x * alpha;\r\n bone.shearY = bone.data.shearY + y * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bone.shearX += x * alpha;\r\n bone.shearY += y * alpha;\r\n }\r\n };\r\n return ShearTimeline;\r\n }(TranslateTimeline));\r\n spine.ShearTimeline = ShearTimeline;\r\n var ColorTimeline = (function (_super) {\r\n __extends(ColorTimeline, _super);\r\n function ColorTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES);\r\n return _this;\r\n }\r\n ColorTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.color << 24) + this.slotIndex;\r\n };\r\n ColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a) {\r\n frameIndex *= ColorTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + ColorTimeline.R] = r;\r\n this.frames[frameIndex + ColorTimeline.G] = g;\r\n this.frames[frameIndex + ColorTimeline.B] = b;\r\n this.frames[frameIndex + ColorTimeline.A] = a;\r\n };\r\n ColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n slot.color.setFromColor(slot.data.color);\r\n return;\r\n case MixBlend.first:\r\n var color = slot.color, setup = slot.data.color;\r\n color.add((setup.r - color.r) * alpha, (setup.g - color.g) * alpha, (setup.b - color.b) * alpha, (setup.a - color.a) * alpha);\r\n }\r\n return;\r\n }\r\n var r = 0, g = 0, b = 0, a = 0;\r\n if (time >= frames[frames.length - ColorTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n r = frames[i + ColorTimeline.PREV_R];\r\n g = frames[i + ColorTimeline.PREV_G];\r\n b = frames[i + ColorTimeline.PREV_B];\r\n a = frames[i + ColorTimeline.PREV_A];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ColorTimeline.ENTRIES);\r\n r = frames[frame + ColorTimeline.PREV_R];\r\n g = frames[frame + ColorTimeline.PREV_G];\r\n b = frames[frame + ColorTimeline.PREV_B];\r\n a = frames[frame + ColorTimeline.PREV_A];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ColorTimeline.PREV_TIME] - frameTime));\r\n r += (frames[frame + ColorTimeline.R] - r) * percent;\r\n g += (frames[frame + ColorTimeline.G] - g) * percent;\r\n b += (frames[frame + ColorTimeline.B] - b) * percent;\r\n a += (frames[frame + ColorTimeline.A] - a) * percent;\r\n }\r\n if (alpha == 1)\r\n slot.color.set(r, g, b, a);\r\n else {\r\n var color = slot.color;\r\n if (blend == MixBlend.setup)\r\n color.setFromColor(slot.data.color);\r\n color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);\r\n }\r\n };\r\n ColorTimeline.ENTRIES = 5;\r\n ColorTimeline.PREV_TIME = -5;\r\n ColorTimeline.PREV_R = -4;\r\n ColorTimeline.PREV_G = -3;\r\n ColorTimeline.PREV_B = -2;\r\n ColorTimeline.PREV_A = -1;\r\n ColorTimeline.R = 1;\r\n ColorTimeline.G = 2;\r\n ColorTimeline.B = 3;\r\n ColorTimeline.A = 4;\r\n return ColorTimeline;\r\n }(CurveTimeline));\r\n spine.ColorTimeline = ColorTimeline;\r\n var TwoColorTimeline = (function (_super) {\r\n __extends(TwoColorTimeline, _super);\r\n function TwoColorTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TwoColorTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TwoColorTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.twoColor << 24) + this.slotIndex;\r\n };\r\n TwoColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a, r2, g2, b2) {\r\n frameIndex *= TwoColorTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TwoColorTimeline.R] = r;\r\n this.frames[frameIndex + TwoColorTimeline.G] = g;\r\n this.frames[frameIndex + TwoColorTimeline.B] = b;\r\n this.frames[frameIndex + TwoColorTimeline.A] = a;\r\n this.frames[frameIndex + TwoColorTimeline.R2] = r2;\r\n this.frames[frameIndex + TwoColorTimeline.G2] = g2;\r\n this.frames[frameIndex + TwoColorTimeline.B2] = b2;\r\n };\r\n TwoColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n slot.color.setFromColor(slot.data.color);\r\n slot.darkColor.setFromColor(slot.data.darkColor);\r\n return;\r\n case MixBlend.first:\r\n var light = slot.color, dark = slot.darkColor, setupLight = slot.data.color, setupDark = slot.data.darkColor;\r\n light.add((setupLight.r - light.r) * alpha, (setupLight.g - light.g) * alpha, (setupLight.b - light.b) * alpha, (setupLight.a - light.a) * alpha);\r\n dark.add((setupDark.r - dark.r) * alpha, (setupDark.g - dark.g) * alpha, (setupDark.b - dark.b) * alpha, 0);\r\n }\r\n return;\r\n }\r\n var r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\r\n if (time >= frames[frames.length - TwoColorTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n r = frames[i + TwoColorTimeline.PREV_R];\r\n g = frames[i + TwoColorTimeline.PREV_G];\r\n b = frames[i + TwoColorTimeline.PREV_B];\r\n a = frames[i + TwoColorTimeline.PREV_A];\r\n r2 = frames[i + TwoColorTimeline.PREV_R2];\r\n g2 = frames[i + TwoColorTimeline.PREV_G2];\r\n b2 = frames[i + TwoColorTimeline.PREV_B2];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TwoColorTimeline.ENTRIES);\r\n r = frames[frame + TwoColorTimeline.PREV_R];\r\n g = frames[frame + TwoColorTimeline.PREV_G];\r\n b = frames[frame + TwoColorTimeline.PREV_B];\r\n a = frames[frame + TwoColorTimeline.PREV_A];\r\n r2 = frames[frame + TwoColorTimeline.PREV_R2];\r\n g2 = frames[frame + TwoColorTimeline.PREV_G2];\r\n b2 = frames[frame + TwoColorTimeline.PREV_B2];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TwoColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TwoColorTimeline.PREV_TIME] - frameTime));\r\n r += (frames[frame + TwoColorTimeline.R] - r) * percent;\r\n g += (frames[frame + TwoColorTimeline.G] - g) * percent;\r\n b += (frames[frame + TwoColorTimeline.B] - b) * percent;\r\n a += (frames[frame + TwoColorTimeline.A] - a) * percent;\r\n r2 += (frames[frame + TwoColorTimeline.R2] - r2) * percent;\r\n g2 += (frames[frame + TwoColorTimeline.G2] - g2) * percent;\r\n b2 += (frames[frame + TwoColorTimeline.B2] - b2) * percent;\r\n }\r\n if (alpha == 1) {\r\n slot.color.set(r, g, b, a);\r\n slot.darkColor.set(r2, g2, b2, 1);\r\n }\r\n else {\r\n var light = slot.color, dark = slot.darkColor;\r\n if (blend == MixBlend.setup) {\r\n light.setFromColor(slot.data.color);\r\n dark.setFromColor(slot.data.darkColor);\r\n }\r\n light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\r\n dark.add((r2 - dark.r) * alpha, (g2 - dark.g) * alpha, (b2 - dark.b) * alpha, 0);\r\n }\r\n };\r\n TwoColorTimeline.ENTRIES = 8;\r\n TwoColorTimeline.PREV_TIME = -8;\r\n TwoColorTimeline.PREV_R = -7;\r\n TwoColorTimeline.PREV_G = -6;\r\n TwoColorTimeline.PREV_B = -5;\r\n TwoColorTimeline.PREV_A = -4;\r\n TwoColorTimeline.PREV_R2 = -3;\r\n TwoColorTimeline.PREV_G2 = -2;\r\n TwoColorTimeline.PREV_B2 = -1;\r\n TwoColorTimeline.R = 1;\r\n TwoColorTimeline.G = 2;\r\n TwoColorTimeline.B = 3;\r\n TwoColorTimeline.A = 4;\r\n TwoColorTimeline.R2 = 5;\r\n TwoColorTimeline.G2 = 6;\r\n TwoColorTimeline.B2 = 7;\r\n return TwoColorTimeline;\r\n }(CurveTimeline));\r\n spine.TwoColorTimeline = TwoColorTimeline;\r\n var AttachmentTimeline = (function () {\r\n function AttachmentTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.attachmentNames = new Array(frameCount);\r\n }\r\n AttachmentTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.attachment << 24) + this.slotIndex;\r\n };\r\n AttachmentTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n AttachmentTimeline.prototype.setFrame = function (frameIndex, time, attachmentName) {\r\n this.frames[frameIndex] = time;\r\n this.attachmentNames[frameIndex] = attachmentName;\r\n };\r\n AttachmentTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n if (direction == MixDirection.mixOut) {\r\n if (blend == MixBlend.setup)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n return;\r\n }\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n if (blend == MixBlend.setup || blend == MixBlend.first)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n return;\r\n }\r\n var frameIndex = 0;\r\n if (time >= frames[frames.length - 1])\r\n frameIndex = frames.length - 1;\r\n else\r\n frameIndex = Animation.binarySearch(frames, time, 1) - 1;\r\n var attachmentName = this.attachmentNames[frameIndex];\r\n skeleton.slots[this.slotIndex]\r\n .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\r\n };\r\n AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) {\r\n slot.attachment = attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName);\r\n };\r\n return AttachmentTimeline;\r\n }());\r\n spine.AttachmentTimeline = AttachmentTimeline;\r\n var zeros = null;\r\n var DeformTimeline = (function (_super) {\r\n __extends(DeformTimeline, _super);\r\n function DeformTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount);\r\n _this.frameVertices = new Array(frameCount);\r\n if (zeros == null)\r\n zeros = spine.Utils.newFloatArray(64);\r\n return _this;\r\n }\r\n DeformTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.deform << 27) + +this.attachment.id + this.slotIndex;\r\n };\r\n DeformTimeline.prototype.setFrame = function (frameIndex, time, vertices) {\r\n this.frames[frameIndex] = time;\r\n this.frameVertices[frameIndex] = vertices;\r\n };\r\n DeformTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var slotAttachment = slot.getAttachment();\r\n if (!(slotAttachment instanceof spine.VertexAttachment) || !(slotAttachment.deformAttachment == this.attachment))\r\n return;\r\n var deformArray = slot.deform;\r\n if (deformArray.length == 0)\r\n blend = MixBlend.setup;\r\n var frameVertices = this.frameVertices;\r\n var vertexCount = frameVertices[0].length;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n var vertexAttachment = slotAttachment;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n deformArray.length = 0;\r\n return;\r\n case MixBlend.first:\r\n if (alpha == 1) {\r\n deformArray.length = 0;\r\n break;\r\n }\r\n var deform_1 = spine.Utils.setArraySize(deformArray, vertexCount);\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform_1[i] += (setupVertices[i] - deform_1[i]) * alpha;\r\n }\r\n else {\r\n alpha = 1 - alpha;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform_1[i] *= alpha;\r\n }\r\n }\r\n return;\r\n }\r\n var deform = spine.Utils.setArraySize(deformArray, vertexCount);\r\n if (time >= frames[frames.length - 1]) {\r\n var lastVertices = frameVertices[frames.length - 1];\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_1 = 0; i_1 < vertexCount; i_1++) {\r\n deform[i_1] += lastVertices[i_1] - setupVertices[i_1];\r\n }\r\n }\r\n else {\r\n for (var i_2 = 0; i_2 < vertexCount; i_2++)\r\n deform[i_2] += lastVertices[i_2];\r\n }\r\n }\r\n else {\r\n spine.Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup: {\r\n var vertexAttachment_1 = slotAttachment;\r\n if (vertexAttachment_1.bones == null) {\r\n var setupVertices = vertexAttachment_1.vertices;\r\n for (var i_3 = 0; i_3 < vertexCount; i_3++) {\r\n var setup = setupVertices[i_3];\r\n deform[i_3] = setup + (lastVertices[i_3] - setup) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_4 = 0; i_4 < vertexCount; i_4++)\r\n deform[i_4] = lastVertices[i_4] * alpha;\r\n }\r\n break;\r\n }\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n for (var i_5 = 0; i_5 < vertexCount; i_5++)\r\n deform[i_5] += (lastVertices[i_5] - deform[i_5]) * alpha;\r\n break;\r\n case MixBlend.add:\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_6 = 0; i_6 < vertexCount; i_6++) {\r\n deform[i_6] += (lastVertices[i_6] - setupVertices[i_6]) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_7 = 0; i_7 < vertexCount; i_7++)\r\n deform[i_7] += lastVertices[i_7] * alpha;\r\n }\r\n }\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time);\r\n var prevVertices = frameVertices[frame - 1];\r\n var nextVertices = frameVertices[frame];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame - 1, 1 - (time - frameTime) / (frames[frame - 1] - frameTime));\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_8 = 0; i_8 < vertexCount; i_8++) {\r\n var prev = prevVertices[i_8];\r\n deform[i_8] += prev + (nextVertices[i_8] - prev) * percent - setupVertices[i_8];\r\n }\r\n }\r\n else {\r\n for (var i_9 = 0; i_9 < vertexCount; i_9++) {\r\n var prev = prevVertices[i_9];\r\n deform[i_9] += prev + (nextVertices[i_9] - prev) * percent;\r\n }\r\n }\r\n }\r\n else {\r\n for (var i_10 = 0; i_10 < vertexCount; i_10++) {\r\n var prev = prevVertices[i_10];\r\n deform[i_10] = prev + (nextVertices[i_10] - prev) * percent;\r\n }\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup: {\r\n var vertexAttachment_2 = slotAttachment;\r\n if (vertexAttachment_2.bones == null) {\r\n var setupVertices = vertexAttachment_2.vertices;\r\n for (var i_11 = 0; i_11 < vertexCount; i_11++) {\r\n var prev = prevVertices[i_11], setup = setupVertices[i_11];\r\n deform[i_11] = setup + (prev + (nextVertices[i_11] - prev) * percent - setup) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_12 = 0; i_12 < vertexCount; i_12++) {\r\n var prev = prevVertices[i_12];\r\n deform[i_12] = (prev + (nextVertices[i_12] - prev) * percent) * alpha;\r\n }\r\n }\r\n break;\r\n }\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n for (var i_13 = 0; i_13 < vertexCount; i_13++) {\r\n var prev = prevVertices[i_13];\r\n deform[i_13] += (prev + (nextVertices[i_13] - prev) * percent - deform[i_13]) * alpha;\r\n }\r\n break;\r\n case MixBlend.add:\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_14 = 0; i_14 < vertexCount; i_14++) {\r\n var prev = prevVertices[i_14];\r\n deform[i_14] += (prev + (nextVertices[i_14] - prev) * percent - setupVertices[i_14]) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_15 = 0; i_15 < vertexCount; i_15++) {\r\n var prev = prevVertices[i_15];\r\n deform[i_15] += (prev + (nextVertices[i_15] - prev) * percent) * alpha;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n return DeformTimeline;\r\n }(CurveTimeline));\r\n spine.DeformTimeline = DeformTimeline;\r\n var EventTimeline = (function () {\r\n function EventTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.events = new Array(frameCount);\r\n }\r\n EventTimeline.prototype.getPropertyId = function () {\r\n return TimelineType.event << 24;\r\n };\r\n EventTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n EventTimeline.prototype.setFrame = function (frameIndex, event) {\r\n this.frames[frameIndex] = event.time;\r\n this.events[frameIndex] = event;\r\n };\r\n EventTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n if (firedEvents == null)\r\n return;\r\n var frames = this.frames;\r\n var frameCount = this.frames.length;\r\n if (lastTime > time) {\r\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\r\n lastTime = -1;\r\n }\r\n else if (lastTime >= frames[frameCount - 1])\r\n return;\r\n if (time < frames[0])\r\n return;\r\n var frame = 0;\r\n if (lastTime < frames[0])\r\n frame = 0;\r\n else {\r\n frame = Animation.binarySearch(frames, lastTime);\r\n var frameTime = frames[frame];\r\n while (frame > 0) {\r\n if (frames[frame - 1] != frameTime)\r\n break;\r\n frame--;\r\n }\r\n }\r\n for (; frame < frameCount && time >= frames[frame]; frame++)\r\n firedEvents.push(this.events[frame]);\r\n };\r\n return EventTimeline;\r\n }());\r\n spine.EventTimeline = EventTimeline;\r\n var DrawOrderTimeline = (function () {\r\n function DrawOrderTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.drawOrders = new Array(frameCount);\r\n }\r\n DrawOrderTimeline.prototype.getPropertyId = function () {\r\n return TimelineType.drawOrder << 24;\r\n };\r\n DrawOrderTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n DrawOrderTimeline.prototype.setFrame = function (frameIndex, time, drawOrder) {\r\n this.frames[frameIndex] = time;\r\n this.drawOrders[frameIndex] = drawOrder;\r\n };\r\n DrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var drawOrder = skeleton.drawOrder;\r\n var slots = skeleton.slots;\r\n if (direction == MixDirection.mixOut) {\r\n if (blend == MixBlend.setup)\r\n spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n if (blend == MixBlend.setup || blend == MixBlend.first)\r\n spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n var frame = 0;\r\n if (time >= frames[frames.length - 1])\r\n frame = frames.length - 1;\r\n else\r\n frame = Animation.binarySearch(frames, time) - 1;\r\n var drawOrderToSetupIndex = this.drawOrders[frame];\r\n if (drawOrderToSetupIndex == null)\r\n spine.Utils.arrayCopy(slots, 0, drawOrder, 0, slots.length);\r\n else {\r\n for (var i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\r\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\r\n }\r\n };\r\n return DrawOrderTimeline;\r\n }());\r\n spine.DrawOrderTimeline = DrawOrderTimeline;\r\n var IkConstraintTimeline = (function (_super) {\r\n __extends(IkConstraintTimeline, _super);\r\n function IkConstraintTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES);\r\n return _this;\r\n }\r\n IkConstraintTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.ikConstraint << 24) + this.ikConstraintIndex;\r\n };\r\n IkConstraintTimeline.prototype.setFrame = function (frameIndex, time, mix, softness, bendDirection, compress, stretch) {\r\n frameIndex *= IkConstraintTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + IkConstraintTimeline.MIX] = mix;\r\n this.frames[frameIndex + IkConstraintTimeline.SOFTNESS] = softness;\r\n this.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection;\r\n this.frames[frameIndex + IkConstraintTimeline.COMPRESS] = compress ? 1 : 0;\r\n this.frames[frameIndex + IkConstraintTimeline.STRETCH] = stretch ? 1 : 0;\r\n };\r\n IkConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.ikConstraints[this.ikConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n return;\r\n case MixBlend.first:\r\n constraint.mix += (constraint.data.mix - constraint.mix) * alpha;\r\n constraint.softness += (constraint.data.softness - constraint.softness) * alpha;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n return;\r\n }\r\n if (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) {\r\n if (blend == MixBlend.setup) {\r\n constraint.mix = constraint.data.mix + (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.data.mix) * alpha;\r\n constraint.softness = constraint.data.softness\r\n + (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.data.softness) * alpha;\r\n if (direction == MixDirection.mixOut) {\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n else {\r\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n else {\r\n constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha;\r\n constraint.softness += (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.softness) * alpha;\r\n if (direction == MixDirection.mixIn) {\r\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time, IkConstraintTimeline.ENTRIES);\r\n var mix = frames[frame + IkConstraintTimeline.PREV_MIX];\r\n var softness = frames[frame + IkConstraintTimeline.PREV_SOFTNESS];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime));\r\n if (blend == MixBlend.setup) {\r\n constraint.mix = constraint.data.mix + (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.data.mix) * alpha;\r\n constraint.softness = constraint.data.softness\r\n + (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.data.softness) * alpha;\r\n if (direction == MixDirection.mixOut) {\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n else {\r\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n else {\r\n constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha;\r\n constraint.softness += (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.softness) * alpha;\r\n if (direction == MixDirection.mixIn) {\r\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n };\r\n IkConstraintTimeline.ENTRIES = 6;\r\n IkConstraintTimeline.PREV_TIME = -6;\r\n IkConstraintTimeline.PREV_MIX = -5;\r\n IkConstraintTimeline.PREV_SOFTNESS = -4;\r\n IkConstraintTimeline.PREV_BEND_DIRECTION = -3;\r\n IkConstraintTimeline.PREV_COMPRESS = -2;\r\n IkConstraintTimeline.PREV_STRETCH = -1;\r\n IkConstraintTimeline.MIX = 1;\r\n IkConstraintTimeline.SOFTNESS = 2;\r\n IkConstraintTimeline.BEND_DIRECTION = 3;\r\n IkConstraintTimeline.COMPRESS = 4;\r\n IkConstraintTimeline.STRETCH = 5;\r\n return IkConstraintTimeline;\r\n }(CurveTimeline));\r\n spine.IkConstraintTimeline = IkConstraintTimeline;\r\n var TransformConstraintTimeline = (function (_super) {\r\n __extends(TransformConstraintTimeline, _super);\r\n function TransformConstraintTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TransformConstraintTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.transformConstraint << 24) + this.transformConstraintIndex;\r\n };\r\n TransformConstraintTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix, scaleMix, shearMix) {\r\n frameIndex *= TransformConstraintTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TransformConstraintTimeline.ROTATE] = rotateMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.TRANSLATE] = translateMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.SCALE] = scaleMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.SHEAR] = shearMix;\r\n };\r\n TransformConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.transformConstraints[this.transformConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n var data = constraint.data;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n constraint.scaleMix = data.scaleMix;\r\n constraint.shearMix = data.shearMix;\r\n return;\r\n case MixBlend.first:\r\n constraint.rotateMix += (data.rotateMix - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (data.translateMix - constraint.translateMix) * alpha;\r\n constraint.scaleMix += (data.scaleMix - constraint.scaleMix) * alpha;\r\n constraint.shearMix += (data.shearMix - constraint.shearMix) * alpha;\r\n }\r\n return;\r\n }\r\n var rotate = 0, translate = 0, scale = 0, shear = 0;\r\n if (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n rotate = frames[i + TransformConstraintTimeline.PREV_ROTATE];\r\n translate = frames[i + TransformConstraintTimeline.PREV_TRANSLATE];\r\n scale = frames[i + TransformConstraintTimeline.PREV_SCALE];\r\n shear = frames[i + TransformConstraintTimeline.PREV_SHEAR];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES);\r\n rotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE];\r\n translate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE];\r\n scale = frames[frame + TransformConstraintTimeline.PREV_SCALE];\r\n shear = frames[frame + TransformConstraintTimeline.PREV_SHEAR];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime));\r\n rotate += (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent;\r\n translate += (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent;\r\n scale += (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent;\r\n shear += (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent;\r\n }\r\n if (blend == MixBlend.setup) {\r\n var data = constraint.data;\r\n constraint.rotateMix = data.rotateMix + (rotate - data.rotateMix) * alpha;\r\n constraint.translateMix = data.translateMix + (translate - data.translateMix) * alpha;\r\n constraint.scaleMix = data.scaleMix + (scale - data.scaleMix) * alpha;\r\n constraint.shearMix = data.shearMix + (shear - data.shearMix) * alpha;\r\n }\r\n else {\r\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n constraint.scaleMix += (scale - constraint.scaleMix) * alpha;\r\n constraint.shearMix += (shear - constraint.shearMix) * alpha;\r\n }\r\n };\r\n TransformConstraintTimeline.ENTRIES = 5;\r\n TransformConstraintTimeline.PREV_TIME = -5;\r\n TransformConstraintTimeline.PREV_ROTATE = -4;\r\n TransformConstraintTimeline.PREV_TRANSLATE = -3;\r\n TransformConstraintTimeline.PREV_SCALE = -2;\r\n TransformConstraintTimeline.PREV_SHEAR = -1;\r\n TransformConstraintTimeline.ROTATE = 1;\r\n TransformConstraintTimeline.TRANSLATE = 2;\r\n TransformConstraintTimeline.SCALE = 3;\r\n TransformConstraintTimeline.SHEAR = 4;\r\n return TransformConstraintTimeline;\r\n }(CurveTimeline));\r\n spine.TransformConstraintTimeline = TransformConstraintTimeline;\r\n var PathConstraintPositionTimeline = (function (_super) {\r\n __extends(PathConstraintPositionTimeline, _super);\r\n function PathConstraintPositionTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES);\r\n return _this;\r\n }\r\n PathConstraintPositionTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintPosition << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintPositionTimeline.prototype.setFrame = function (frameIndex, time, value) {\r\n frameIndex *= PathConstraintPositionTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + PathConstraintPositionTimeline.VALUE] = value;\r\n };\r\n PathConstraintPositionTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.position = constraint.data.position;\r\n return;\r\n case MixBlend.first:\r\n constraint.position += (constraint.data.position - constraint.position) * alpha;\r\n }\r\n return;\r\n }\r\n var position = 0;\r\n if (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES])\r\n position = frames[frames.length + PathConstraintPositionTimeline.PREV_VALUE];\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES);\r\n position = frames[frame + PathConstraintPositionTimeline.PREV_VALUE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintPositionTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintPositionTimeline.PREV_TIME] - frameTime));\r\n position += (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent;\r\n }\r\n if (blend == MixBlend.setup)\r\n constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\r\n else\r\n constraint.position += (position - constraint.position) * alpha;\r\n };\r\n PathConstraintPositionTimeline.ENTRIES = 2;\r\n PathConstraintPositionTimeline.PREV_TIME = -2;\r\n PathConstraintPositionTimeline.PREV_VALUE = -1;\r\n PathConstraintPositionTimeline.VALUE = 1;\r\n return PathConstraintPositionTimeline;\r\n }(CurveTimeline));\r\n spine.PathConstraintPositionTimeline = PathConstraintPositionTimeline;\r\n var PathConstraintSpacingTimeline = (function (_super) {\r\n __extends(PathConstraintSpacingTimeline, _super);\r\n function PathConstraintSpacingTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n PathConstraintSpacingTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintSpacing << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintSpacingTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.spacing = constraint.data.spacing;\r\n return;\r\n case MixBlend.first:\r\n constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\r\n }\r\n return;\r\n }\r\n var spacing = 0;\r\n if (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES])\r\n spacing = frames[frames.length + PathConstraintSpacingTimeline.PREV_VALUE];\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES);\r\n spacing = frames[frame + PathConstraintSpacingTimeline.PREV_VALUE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintSpacingTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintSpacingTimeline.PREV_TIME] - frameTime));\r\n spacing += (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent;\r\n }\r\n if (blend == MixBlend.setup)\r\n constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\r\n else\r\n constraint.spacing += (spacing - constraint.spacing) * alpha;\r\n };\r\n return PathConstraintSpacingTimeline;\r\n }(PathConstraintPositionTimeline));\r\n spine.PathConstraintSpacingTimeline = PathConstraintSpacingTimeline;\r\n var PathConstraintMixTimeline = (function (_super) {\r\n __extends(PathConstraintMixTimeline, _super);\r\n function PathConstraintMixTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES);\r\n return _this;\r\n }\r\n PathConstraintMixTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintMix << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintMixTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix) {\r\n frameIndex *= PathConstraintMixTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + PathConstraintMixTimeline.ROTATE] = rotateMix;\r\n this.frames[frameIndex + PathConstraintMixTimeline.TRANSLATE] = translateMix;\r\n };\r\n PathConstraintMixTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.rotateMix = constraint.data.rotateMix;\r\n constraint.translateMix = constraint.data.translateMix;\r\n return;\r\n case MixBlend.first:\r\n constraint.rotateMix += (constraint.data.rotateMix - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (constraint.data.translateMix - constraint.translateMix) * alpha;\r\n }\r\n return;\r\n }\r\n var rotate = 0, translate = 0;\r\n if (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) {\r\n rotate = frames[frames.length + PathConstraintMixTimeline.PREV_ROTATE];\r\n translate = frames[frames.length + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES);\r\n rotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE];\r\n translate = frames[frame + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintMixTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintMixTimeline.PREV_TIME] - frameTime));\r\n rotate += (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent;\r\n translate += (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent;\r\n }\r\n if (blend == MixBlend.setup) {\r\n constraint.rotateMix = constraint.data.rotateMix + (rotate - constraint.data.rotateMix) * alpha;\r\n constraint.translateMix = constraint.data.translateMix + (translate - constraint.data.translateMix) * alpha;\r\n }\r\n else {\r\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n }\r\n };\r\n PathConstraintMixTimeline.ENTRIES = 3;\r\n PathConstraintMixTimeline.PREV_TIME = -3;\r\n PathConstraintMixTimeline.PREV_ROTATE = -2;\r\n PathConstraintMixTimeline.PREV_TRANSLATE = -1;\r\n PathConstraintMixTimeline.ROTATE = 1;\r\n PathConstraintMixTimeline.TRANSLATE = 2;\r\n return PathConstraintMixTimeline;\r\n }(CurveTimeline));\r\n spine.PathConstraintMixTimeline = PathConstraintMixTimeline;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AnimationState = (function () {\r\n function AnimationState(data) {\r\n this.tracks = new Array();\r\n this.timeScale = 1;\r\n this.unkeyedState = 0;\r\n this.events = new Array();\r\n this.listeners = new Array();\r\n this.queue = new EventQueue(this);\r\n this.propertyIDs = new spine.IntSet();\r\n this.animationsChanged = false;\r\n this.trackEntryPool = new spine.Pool(function () { return new TrackEntry(); });\r\n this.data = data;\r\n }\r\n AnimationState.prototype.update = function (delta) {\r\n delta *= this.timeScale;\r\n var tracks = this.tracks;\r\n for (var i = 0, n = tracks.length; i < n; i++) {\r\n var current = tracks[i];\r\n if (current == null)\r\n continue;\r\n current.animationLast = current.nextAnimationLast;\r\n current.trackLast = current.nextTrackLast;\r\n var currentDelta = delta * current.timeScale;\r\n if (current.delay > 0) {\r\n current.delay -= currentDelta;\r\n if (current.delay > 0)\r\n continue;\r\n currentDelta = -current.delay;\r\n current.delay = 0;\r\n }\r\n var next = current.next;\r\n if (next != null) {\r\n var nextTime = current.trackLast - next.delay;\r\n if (nextTime >= 0) {\r\n next.delay = 0;\r\n next.trackTime += current.timeScale == 0 ? 0 : (nextTime / current.timeScale + delta) * next.timeScale;\r\n current.trackTime += currentDelta;\r\n this.setCurrent(i, next, true);\r\n while (next.mixingFrom != null) {\r\n next.mixTime += delta;\r\n next = next.mixingFrom;\r\n }\r\n continue;\r\n }\r\n }\r\n else if (current.trackLast >= current.trackEnd && current.mixingFrom == null) {\r\n tracks[i] = null;\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n continue;\r\n }\r\n if (current.mixingFrom != null && this.updateMixingFrom(current, delta)) {\r\n var from = current.mixingFrom;\r\n current.mixingFrom = null;\r\n if (from != null)\r\n from.mixingTo = null;\r\n while (from != null) {\r\n this.queue.end(from);\r\n from = from.mixingFrom;\r\n }\r\n }\r\n current.trackTime += currentDelta;\r\n }\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.updateMixingFrom = function (to, delta) {\r\n var from = to.mixingFrom;\r\n if (from == null)\r\n return true;\r\n var finished = this.updateMixingFrom(from, delta);\r\n from.animationLast = from.nextAnimationLast;\r\n from.trackLast = from.nextTrackLast;\r\n if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {\r\n if (from.totalAlpha == 0 || to.mixDuration == 0) {\r\n to.mixingFrom = from.mixingFrom;\r\n if (from.mixingFrom != null)\r\n from.mixingFrom.mixingTo = to;\r\n to.interruptAlpha = from.interruptAlpha;\r\n this.queue.end(from);\r\n }\r\n return finished;\r\n }\r\n from.trackTime += delta * from.timeScale;\r\n to.mixTime += delta;\r\n return false;\r\n };\r\n AnimationState.prototype.apply = function (skeleton) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n if (this.animationsChanged)\r\n this._animationsChanged();\r\n var events = this.events;\r\n var tracks = this.tracks;\r\n var applied = false;\r\n for (var i_16 = 0, n_1 = tracks.length; i_16 < n_1; i_16++) {\r\n var current = tracks[i_16];\r\n if (current == null || current.delay > 0)\r\n continue;\r\n applied = true;\r\n var blend = i_16 == 0 ? spine.MixBlend.first : current.mixBlend;\r\n var mix = current.alpha;\r\n if (current.mixingFrom != null)\r\n mix *= this.applyMixingFrom(current, skeleton, blend);\r\n else if (current.trackTime >= current.trackEnd && current.next == null)\r\n mix = 0;\r\n var animationLast = current.animationLast, animationTime = current.getAnimationTime();\r\n var timelineCount = current.animation.timelines.length;\r\n var timelines = current.animation.timelines;\r\n if ((i_16 == 0 && mix == 1) || blend == spine.MixBlend.add) {\r\n for (var ii = 0; ii < timelineCount; ii++) {\r\n spine.Utils.webkit602BugfixHelper(mix, blend);\r\n var timeline = timelines[ii];\r\n if (timeline instanceof spine.AttachmentTimeline)\r\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, blend, true);\r\n else\r\n timeline.apply(skeleton, animationLast, animationTime, events, mix, blend, spine.MixDirection.mixIn);\r\n }\r\n }\r\n else {\r\n var timelineMode = current.timelineMode;\r\n var firstFrame = current.timelinesRotation.length == 0;\r\n if (firstFrame)\r\n spine.Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null);\r\n var timelinesRotation = current.timelinesRotation;\r\n for (var ii = 0; ii < timelineCount; ii++) {\r\n var timeline_1 = timelines[ii];\r\n var timelineBlend = timelineMode[ii] == AnimationState.SUBSEQUENT ? blend : spine.MixBlend.setup;\r\n if (timeline_1 instanceof spine.RotateTimeline) {\r\n this.applyRotateTimeline(timeline_1, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame);\r\n }\r\n else if (timeline_1 instanceof spine.AttachmentTimeline) {\r\n this.applyAttachmentTimeline(timeline_1, skeleton, animationTime, blend, true);\r\n }\r\n else {\r\n spine.Utils.webkit602BugfixHelper(mix, blend);\r\n timeline_1.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, spine.MixDirection.mixIn);\r\n }\r\n }\r\n }\r\n this.queueEvents(current, animationTime);\r\n events.length = 0;\r\n current.nextAnimationLast = animationTime;\r\n current.nextTrackLast = current.trackTime;\r\n }\r\n var setupState = this.unkeyedState + AnimationState.SETUP;\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = skeleton.slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.attachmentState == setupState) {\r\n var attachmentName = slot.data.attachmentName;\r\n slot.attachment = (attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));\r\n }\r\n }\r\n this.unkeyedState += 2;\r\n this.queue.drain();\r\n return applied;\r\n };\r\n AnimationState.prototype.applyMixingFrom = function (to, skeleton, blend) {\r\n var from = to.mixingFrom;\r\n if (from.mixingFrom != null)\r\n this.applyMixingFrom(from, skeleton, blend);\r\n var mix = 0;\r\n if (to.mixDuration == 0) {\r\n mix = 1;\r\n if (blend == spine.MixBlend.first)\r\n blend = spine.MixBlend.setup;\r\n }\r\n else {\r\n mix = to.mixTime / to.mixDuration;\r\n if (mix > 1)\r\n mix = 1;\r\n if (blend != spine.MixBlend.first)\r\n blend = from.mixBlend;\r\n }\r\n var events = mix < from.eventThreshold ? this.events : null;\r\n var attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\r\n var animationLast = from.animationLast, animationTime = from.getAnimationTime();\r\n var timelineCount = from.animation.timelines.length;\r\n var timelines = from.animation.timelines;\r\n var alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\r\n if (blend == spine.MixBlend.add) {\r\n for (var i = 0; i < timelineCount; i++)\r\n timelines[i].apply(skeleton, animationLast, animationTime, events, alphaMix, blend, spine.MixDirection.mixOut);\r\n }\r\n else {\r\n var timelineMode = from.timelineMode;\r\n var timelineHoldMix = from.timelineHoldMix;\r\n var firstFrame = from.timelinesRotation.length == 0;\r\n if (firstFrame)\r\n spine.Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null);\r\n var timelinesRotation = from.timelinesRotation;\r\n from.totalAlpha = 0;\r\n for (var i = 0; i < timelineCount; i++) {\r\n var timeline = timelines[i];\r\n var direction = spine.MixDirection.mixOut;\r\n var timelineBlend = void 0;\r\n var alpha = 0;\r\n switch (timelineMode[i]) {\r\n case AnimationState.SUBSEQUENT:\r\n if (!drawOrder && timeline instanceof spine.DrawOrderTimeline)\r\n continue;\r\n timelineBlend = blend;\r\n alpha = alphaMix;\r\n break;\r\n case AnimationState.FIRST:\r\n timelineBlend = spine.MixBlend.setup;\r\n alpha = alphaMix;\r\n break;\r\n case AnimationState.HOLD_SUBSEQUENT:\r\n timelineBlend = blend;\r\n alpha = alphaHold;\r\n break;\r\n case AnimationState.HOLD_FIRST:\r\n timelineBlend = spine.MixBlend.setup;\r\n alpha = alphaHold;\r\n break;\r\n default:\r\n timelineBlend = spine.MixBlend.setup;\r\n var holdMix = timelineHoldMix[i];\r\n alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\r\n break;\r\n }\r\n from.totalAlpha += alpha;\r\n if (timeline instanceof spine.RotateTimeline)\r\n this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame);\r\n else if (timeline instanceof spine.AttachmentTimeline)\r\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, timelineBlend, attachments);\r\n else {\r\n spine.Utils.webkit602BugfixHelper(alpha, blend);\r\n if (drawOrder && timeline instanceof spine.DrawOrderTimeline && timelineBlend == spine.MixBlend.setup)\r\n direction = spine.MixDirection.mixIn;\r\n timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, direction);\r\n }\r\n }\r\n }\r\n if (to.mixDuration > 0)\r\n this.queueEvents(from, animationTime);\r\n this.events.length = 0;\r\n from.nextAnimationLast = animationTime;\r\n from.nextTrackLast = from.trackTime;\r\n return mix;\r\n };\r\n AnimationState.prototype.applyAttachmentTimeline = function (timeline, skeleton, time, blend, attachments) {\r\n var slot = skeleton.slots[timeline.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = timeline.frames;\r\n if (time < frames[0]) {\r\n if (blend == spine.MixBlend.setup || blend == spine.MixBlend.first)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments);\r\n }\r\n else {\r\n var frameIndex;\r\n if (time >= frames[frames.length - 1])\r\n frameIndex = frames.length - 1;\r\n else\r\n frameIndex = spine.Animation.binarySearch(frames, time) - 1;\r\n this.setAttachment(skeleton, slot, timeline.attachmentNames[frameIndex], attachments);\r\n }\r\n if (slot.attachmentState <= this.unkeyedState)\r\n slot.attachmentState = this.unkeyedState + AnimationState.SETUP;\r\n };\r\n AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) {\r\n slot.attachment = attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName);\r\n if (attachments)\r\n slot.attachmentState = this.unkeyedState + AnimationState.CURRENT;\r\n };\r\n AnimationState.prototype.applyRotateTimeline = function (timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) {\r\n if (firstFrame)\r\n timelinesRotation[i] = 0;\r\n if (alpha == 1) {\r\n timeline.apply(skeleton, 0, time, null, 1, blend, spine.MixDirection.mixIn);\r\n return;\r\n }\r\n var rotateTimeline = timeline;\r\n var frames = rotateTimeline.frames;\r\n var bone = skeleton.bones[rotateTimeline.boneIndex];\r\n if (!bone.active)\r\n return;\r\n var r1 = 0, r2 = 0;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case spine.MixBlend.setup:\r\n bone.rotation = bone.data.rotation;\r\n default:\r\n return;\r\n case spine.MixBlend.first:\r\n r1 = bone.rotation;\r\n r2 = bone.data.rotation;\r\n }\r\n }\r\n else {\r\n r1 = blend == spine.MixBlend.setup ? bone.data.rotation : bone.rotation;\r\n if (time >= frames[frames.length - spine.RotateTimeline.ENTRIES])\r\n r2 = bone.data.rotation + frames[frames.length + spine.RotateTimeline.PREV_ROTATION];\r\n else {\r\n var frame = spine.Animation.binarySearch(frames, time, spine.RotateTimeline.ENTRIES);\r\n var prevRotation = frames[frame + spine.RotateTimeline.PREV_ROTATION];\r\n var frameTime = frames[frame];\r\n var percent = rotateTimeline.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + spine.RotateTimeline.PREV_TIME] - frameTime));\r\n r2 = frames[frame + spine.RotateTimeline.ROTATION] - prevRotation;\r\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n r2 = prevRotation + r2 * percent + bone.data.rotation;\r\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n }\r\n }\r\n var total = 0, diff = r2 - r1;\r\n diff -= (16384 - ((16384.499999999996 - diff / 360) | 0)) * 360;\r\n if (diff == 0) {\r\n total = timelinesRotation[i];\r\n }\r\n else {\r\n var lastTotal = 0, lastDiff = 0;\r\n if (firstFrame) {\r\n lastTotal = 0;\r\n lastDiff = diff;\r\n }\r\n else {\r\n lastTotal = timelinesRotation[i];\r\n lastDiff = timelinesRotation[i + 1];\r\n }\r\n var current = diff > 0, dir = lastTotal >= 0;\r\n if (spine.MathUtils.signum(lastDiff) != spine.MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\r\n if (Math.abs(lastTotal) > 180)\r\n lastTotal += 360 * spine.MathUtils.signum(lastTotal);\r\n dir = current;\r\n }\r\n total = diff + lastTotal - lastTotal % 360;\r\n if (dir != current)\r\n total += 360 * spine.MathUtils.signum(lastTotal);\r\n timelinesRotation[i] = total;\r\n }\r\n timelinesRotation[i + 1] = diff;\r\n r1 += total * alpha;\r\n bone.rotation = r1 - (16384 - ((16384.499999999996 - r1 / 360) | 0)) * 360;\r\n };\r\n AnimationState.prototype.queueEvents = function (entry, animationTime) {\r\n var animationStart = entry.animationStart, animationEnd = entry.animationEnd;\r\n var duration = animationEnd - animationStart;\r\n var trackLastWrapped = entry.trackLast % duration;\r\n var events = this.events;\r\n var i = 0, n = events.length;\r\n for (; i < n; i++) {\r\n var event_1 = events[i];\r\n if (event_1.time < trackLastWrapped)\r\n break;\r\n if (event_1.time > animationEnd)\r\n continue;\r\n this.queue.event(entry, event_1);\r\n }\r\n var complete = false;\r\n if (entry.loop)\r\n complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;\r\n else\r\n complete = animationTime >= animationEnd && entry.animationLast < animationEnd;\r\n if (complete)\r\n this.queue.complete(entry);\r\n for (; i < n; i++) {\r\n var event_2 = events[i];\r\n if (event_2.time < animationStart)\r\n continue;\r\n this.queue.event(entry, events[i]);\r\n }\r\n };\r\n AnimationState.prototype.clearTracks = function () {\r\n var oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (var i = 0, n = this.tracks.length; i < n; i++)\r\n this.clearTrack(i);\r\n this.tracks.length = 0;\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.clearTrack = function (trackIndex) {\r\n if (trackIndex >= this.tracks.length)\r\n return;\r\n var current = this.tracks[trackIndex];\r\n if (current == null)\r\n return;\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n var entry = current;\r\n while (true) {\r\n var from = entry.mixingFrom;\r\n if (from == null)\r\n break;\r\n this.queue.end(from);\r\n entry.mixingFrom = null;\r\n entry.mixingTo = null;\r\n entry = from;\r\n }\r\n this.tracks[current.trackIndex] = null;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.setCurrent = function (index, current, interrupt) {\r\n var from = this.expandToIndex(index);\r\n this.tracks[index] = current;\r\n if (from != null) {\r\n if (interrupt)\r\n this.queue.interrupt(from);\r\n current.mixingFrom = from;\r\n from.mixingTo = current;\r\n current.mixTime = 0;\r\n if (from.mixingFrom != null && from.mixDuration > 0)\r\n current.interruptAlpha *= Math.min(1, from.mixTime / from.mixDuration);\r\n from.timelinesRotation.length = 0;\r\n }\r\n this.queue.start(current);\r\n };\r\n AnimationState.prototype.setAnimation = function (trackIndex, animationName, loop) {\r\n var animation = this.data.skeletonData.findAnimation(animationName);\r\n if (animation == null)\r\n throw new Error(\"Animation not found: \" + animationName);\r\n return this.setAnimationWith(trackIndex, animation, loop);\r\n };\r\n AnimationState.prototype.setAnimationWith = function (trackIndex, animation, loop) {\r\n if (animation == null)\r\n throw new Error(\"animation cannot be null.\");\r\n var interrupt = true;\r\n var current = this.expandToIndex(trackIndex);\r\n if (current != null) {\r\n if (current.nextTrackLast == -1) {\r\n this.tracks[trackIndex] = current.mixingFrom;\r\n this.queue.interrupt(current);\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n current = current.mixingFrom;\r\n interrupt = false;\r\n }\r\n else\r\n this.disposeNext(current);\r\n }\r\n var entry = this.trackEntry(trackIndex, animation, loop, current);\r\n this.setCurrent(trackIndex, entry, interrupt);\r\n this.queue.drain();\r\n return entry;\r\n };\r\n AnimationState.prototype.addAnimation = function (trackIndex, animationName, loop, delay) {\r\n var animation = this.data.skeletonData.findAnimation(animationName);\r\n if (animation == null)\r\n throw new Error(\"Animation not found: \" + animationName);\r\n return this.addAnimationWith(trackIndex, animation, loop, delay);\r\n };\r\n AnimationState.prototype.addAnimationWith = function (trackIndex, animation, loop, delay) {\r\n if (animation == null)\r\n throw new Error(\"animation cannot be null.\");\r\n var last = this.expandToIndex(trackIndex);\r\n if (last != null) {\r\n while (last.next != null)\r\n last = last.next;\r\n }\r\n var entry = this.trackEntry(trackIndex, animation, loop, last);\r\n if (last == null) {\r\n this.setCurrent(trackIndex, entry, true);\r\n this.queue.drain();\r\n }\r\n else {\r\n last.next = entry;\r\n if (delay <= 0) {\r\n var duration = last.animationEnd - last.animationStart;\r\n if (duration != 0) {\r\n if (last.loop)\r\n delay += duration * (1 + ((last.trackTime / duration) | 0));\r\n else\r\n delay += Math.max(duration, last.trackTime);\r\n delay -= this.data.getMix(last.animation, animation);\r\n }\r\n else\r\n delay = last.trackTime;\r\n }\r\n }\r\n entry.delay = delay;\r\n return entry;\r\n };\r\n AnimationState.prototype.setEmptyAnimation = function (trackIndex, mixDuration) {\r\n var entry = this.setAnimationWith(trackIndex, AnimationState.emptyAnimation, false);\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n };\r\n AnimationState.prototype.addEmptyAnimation = function (trackIndex, mixDuration, delay) {\r\n if (delay <= 0)\r\n delay -= mixDuration;\r\n var entry = this.addAnimationWith(trackIndex, AnimationState.emptyAnimation, false, delay);\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n };\r\n AnimationState.prototype.setEmptyAnimations = function (mixDuration) {\r\n var oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (var i = 0, n = this.tracks.length; i < n; i++) {\r\n var current = this.tracks[i];\r\n if (current != null)\r\n this.setEmptyAnimation(current.trackIndex, mixDuration);\r\n }\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.expandToIndex = function (index) {\r\n if (index < this.tracks.length)\r\n return this.tracks[index];\r\n spine.Utils.ensureArrayCapacity(this.tracks, index + 1, null);\r\n this.tracks.length = index + 1;\r\n return null;\r\n };\r\n AnimationState.prototype.trackEntry = function (trackIndex, animation, loop, last) {\r\n var entry = this.trackEntryPool.obtain();\r\n entry.trackIndex = trackIndex;\r\n entry.animation = animation;\r\n entry.loop = loop;\r\n entry.holdPrevious = false;\r\n entry.eventThreshold = 0;\r\n entry.attachmentThreshold = 0;\r\n entry.drawOrderThreshold = 0;\r\n entry.animationStart = 0;\r\n entry.animationEnd = animation.duration;\r\n entry.animationLast = -1;\r\n entry.nextAnimationLast = -1;\r\n entry.delay = 0;\r\n entry.trackTime = 0;\r\n entry.trackLast = -1;\r\n entry.nextTrackLast = -1;\r\n entry.trackEnd = Number.MAX_VALUE;\r\n entry.timeScale = 1;\r\n entry.alpha = 1;\r\n entry.interruptAlpha = 1;\r\n entry.mixTime = 0;\r\n entry.mixDuration = last == null ? 0 : this.data.getMix(last.animation, animation);\r\n entry.mixBlend = spine.MixBlend.replace;\r\n return entry;\r\n };\r\n AnimationState.prototype.disposeNext = function (entry) {\r\n var next = entry.next;\r\n while (next != null) {\r\n this.queue.dispose(next);\r\n next = next.next;\r\n }\r\n entry.next = null;\r\n };\r\n AnimationState.prototype._animationsChanged = function () {\r\n this.animationsChanged = false;\r\n this.propertyIDs.clear();\r\n for (var i = 0, n = this.tracks.length; i < n; i++) {\r\n var entry = this.tracks[i];\r\n if (entry == null)\r\n continue;\r\n while (entry.mixingFrom != null)\r\n entry = entry.mixingFrom;\r\n do {\r\n if (entry.mixingFrom == null || entry.mixBlend != spine.MixBlend.add)\r\n this.computeHold(entry);\r\n entry = entry.mixingTo;\r\n } while (entry != null);\r\n }\r\n };\r\n AnimationState.prototype.computeHold = function (entry) {\r\n var to = entry.mixingTo;\r\n var timelines = entry.animation.timelines;\r\n var timelinesCount = entry.animation.timelines.length;\r\n var timelineMode = spine.Utils.setArraySize(entry.timelineMode, timelinesCount);\r\n entry.timelineHoldMix.length = 0;\r\n var timelineDipMix = spine.Utils.setArraySize(entry.timelineHoldMix, timelinesCount);\r\n var propertyIDs = this.propertyIDs;\r\n if (to != null && to.holdPrevious) {\r\n for (var i = 0; i < timelinesCount; i++) {\r\n timelineMode[i] = propertyIDs.add(timelines[i].getPropertyId()) ? AnimationState.HOLD_FIRST : AnimationState.HOLD_SUBSEQUENT;\r\n }\r\n return;\r\n }\r\n outer: for (var i = 0; i < timelinesCount; i++) {\r\n var timeline = timelines[i];\r\n var id = timeline.getPropertyId();\r\n if (!propertyIDs.add(id))\r\n timelineMode[i] = AnimationState.SUBSEQUENT;\r\n else if (to == null || timeline instanceof spine.AttachmentTimeline || timeline instanceof spine.DrawOrderTimeline\r\n || timeline instanceof spine.EventTimeline || !to.animation.hasTimeline(id)) {\r\n timelineMode[i] = AnimationState.FIRST;\r\n }\r\n else {\r\n for (var next = to.mixingTo; next != null; next = next.mixingTo) {\r\n if (next.animation.hasTimeline(id))\r\n continue;\r\n if (entry.mixDuration > 0) {\r\n timelineMode[i] = AnimationState.HOLD_MIX;\r\n timelineDipMix[i] = next;\r\n continue outer;\r\n }\r\n break;\r\n }\r\n timelineMode[i] = AnimationState.HOLD_FIRST;\r\n }\r\n }\r\n };\r\n AnimationState.prototype.getCurrent = function (trackIndex) {\r\n if (trackIndex >= this.tracks.length)\r\n return null;\r\n return this.tracks[trackIndex];\r\n };\r\n AnimationState.prototype.addListener = function (listener) {\r\n if (listener == null)\r\n throw new Error(\"listener cannot be null.\");\r\n this.listeners.push(listener);\r\n };\r\n AnimationState.prototype.removeListener = function (listener) {\r\n var index = this.listeners.indexOf(listener);\r\n if (index >= 0)\r\n this.listeners.splice(index, 1);\r\n };\r\n AnimationState.prototype.clearListeners = function () {\r\n this.listeners.length = 0;\r\n };\r\n AnimationState.prototype.clearListenerNotifications = function () {\r\n this.queue.clear();\r\n };\r\n AnimationState.emptyAnimation = new spine.Animation(\"\", [], 0);\r\n AnimationState.SUBSEQUENT = 0;\r\n AnimationState.FIRST = 1;\r\n AnimationState.HOLD_SUBSEQUENT = 2;\r\n AnimationState.HOLD_FIRST = 3;\r\n AnimationState.HOLD_MIX = 4;\r\n AnimationState.SETUP = 1;\r\n AnimationState.CURRENT = 2;\r\n return AnimationState;\r\n }());\r\n spine.AnimationState = AnimationState;\r\n var TrackEntry = (function () {\r\n function TrackEntry() {\r\n this.mixBlend = spine.MixBlend.replace;\r\n this.timelineMode = new Array();\r\n this.timelineHoldMix = new Array();\r\n this.timelinesRotation = new Array();\r\n }\r\n TrackEntry.prototype.reset = function () {\r\n this.next = null;\r\n this.mixingFrom = null;\r\n this.mixingTo = null;\r\n this.animation = null;\r\n this.listener = null;\r\n this.timelineMode.length = 0;\r\n this.timelineHoldMix.length = 0;\r\n this.timelinesRotation.length = 0;\r\n };\r\n TrackEntry.prototype.getAnimationTime = function () {\r\n if (this.loop) {\r\n var duration = this.animationEnd - this.animationStart;\r\n if (duration == 0)\r\n return this.animationStart;\r\n return (this.trackTime % duration) + this.animationStart;\r\n }\r\n return Math.min(this.trackTime + this.animationStart, this.animationEnd);\r\n };\r\n TrackEntry.prototype.setAnimationLast = function (animationLast) {\r\n this.animationLast = animationLast;\r\n this.nextAnimationLast = animationLast;\r\n };\r\n TrackEntry.prototype.isComplete = function () {\r\n return this.trackTime >= this.animationEnd - this.animationStart;\r\n };\r\n TrackEntry.prototype.resetRotationDirections = function () {\r\n this.timelinesRotation.length = 0;\r\n };\r\n return TrackEntry;\r\n }());\r\n spine.TrackEntry = TrackEntry;\r\n var EventQueue = (function () {\r\n function EventQueue(animState) {\r\n this.objects = [];\r\n this.drainDisabled = false;\r\n this.animState = animState;\r\n }\r\n EventQueue.prototype.start = function (entry) {\r\n this.objects.push(EventType.start);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n };\r\n EventQueue.prototype.interrupt = function (entry) {\r\n this.objects.push(EventType.interrupt);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.end = function (entry) {\r\n this.objects.push(EventType.end);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n };\r\n EventQueue.prototype.dispose = function (entry) {\r\n this.objects.push(EventType.dispose);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.complete = function (entry) {\r\n this.objects.push(EventType.complete);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.event = function (entry, event) {\r\n this.objects.push(EventType.event);\r\n this.objects.push(entry);\r\n this.objects.push(event);\r\n };\r\n EventQueue.prototype.drain = function () {\r\n if (this.drainDisabled)\r\n return;\r\n this.drainDisabled = true;\r\n var objects = this.objects;\r\n var listeners = this.animState.listeners;\r\n for (var i = 0; i < objects.length; i += 2) {\r\n var type = objects[i];\r\n var entry = objects[i + 1];\r\n switch (type) {\r\n case EventType.start:\r\n if (entry.listener != null && entry.listener.start)\r\n entry.listener.start(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].start)\r\n listeners[ii].start(entry);\r\n break;\r\n case EventType.interrupt:\r\n if (entry.listener != null && entry.listener.interrupt)\r\n entry.listener.interrupt(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].interrupt)\r\n listeners[ii].interrupt(entry);\r\n break;\r\n case EventType.end:\r\n if (entry.listener != null && entry.listener.end)\r\n entry.listener.end(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].end)\r\n listeners[ii].end(entry);\r\n case EventType.dispose:\r\n if (entry.listener != null && entry.listener.dispose)\r\n entry.listener.dispose(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].dispose)\r\n listeners[ii].dispose(entry);\r\n this.animState.trackEntryPool.free(entry);\r\n break;\r\n case EventType.complete:\r\n if (entry.listener != null && entry.listener.complete)\r\n entry.listener.complete(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].complete)\r\n listeners[ii].complete(entry);\r\n break;\r\n case EventType.event:\r\n var event_3 = objects[i++ + 2];\r\n if (entry.listener != null && entry.listener.event)\r\n entry.listener.event(entry, event_3);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].event)\r\n listeners[ii].event(entry, event_3);\r\n break;\r\n }\r\n }\r\n this.clear();\r\n this.drainDisabled = false;\r\n };\r\n EventQueue.prototype.clear = function () {\r\n this.objects.length = 0;\r\n };\r\n return EventQueue;\r\n }());\r\n spine.EventQueue = EventQueue;\r\n var EventType;\r\n (function (EventType) {\r\n EventType[EventType[\"start\"] = 0] = \"start\";\r\n EventType[EventType[\"interrupt\"] = 1] = \"interrupt\";\r\n EventType[EventType[\"end\"] = 2] = \"end\";\r\n EventType[EventType[\"dispose\"] = 3] = \"dispose\";\r\n EventType[EventType[\"complete\"] = 4] = \"complete\";\r\n EventType[EventType[\"event\"] = 5] = \"event\";\r\n })(EventType = spine.EventType || (spine.EventType = {}));\r\n var AnimationStateAdapter = (function () {\r\n function AnimationStateAdapter() {\r\n }\r\n AnimationStateAdapter.prototype.start = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.interrupt = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.end = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.dispose = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.complete = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.event = function (entry, event) {\r\n };\r\n return AnimationStateAdapter;\r\n }());\r\n spine.AnimationStateAdapter = AnimationStateAdapter;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AnimationStateData = (function () {\r\n function AnimationStateData(skeletonData) {\r\n this.animationToMixTime = {};\r\n this.defaultMix = 0;\r\n if (skeletonData == null)\r\n throw new Error(\"skeletonData cannot be null.\");\r\n this.skeletonData = skeletonData;\r\n }\r\n AnimationStateData.prototype.setMix = function (fromName, toName, duration) {\r\n var from = this.skeletonData.findAnimation(fromName);\r\n if (from == null)\r\n throw new Error(\"Animation not found: \" + fromName);\r\n var to = this.skeletonData.findAnimation(toName);\r\n if (to == null)\r\n throw new Error(\"Animation not found: \" + toName);\r\n this.setMixWith(from, to, duration);\r\n };\r\n AnimationStateData.prototype.setMixWith = function (from, to, duration) {\r\n if (from == null)\r\n throw new Error(\"from cannot be null.\");\r\n if (to == null)\r\n throw new Error(\"to cannot be null.\");\r\n var key = from.name + \".\" + to.name;\r\n this.animationToMixTime[key] = duration;\r\n };\r\n AnimationStateData.prototype.getMix = function (from, to) {\r\n var key = from.name + \".\" + to.name;\r\n var value = this.animationToMixTime[key];\r\n return value === undefined ? this.defaultMix : value;\r\n };\r\n return AnimationStateData;\r\n }());\r\n spine.AnimationStateData = AnimationStateData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AssetManager = (function () {\r\n function AssetManager(textureLoader, pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n this.assets = {};\r\n this.errors = {};\r\n this.toLoad = 0;\r\n this.loaded = 0;\r\n this.rawDataUris = {};\r\n this.textureLoader = textureLoader;\r\n this.pathPrefix = pathPrefix;\r\n }\r\n AssetManager.prototype.downloadText = function (url, success, error) {\r\n var request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n if (this.rawDataUris[url])\r\n url = this.rawDataUris[url];\r\n request.open(\"GET\", url, true);\r\n request.onload = function () {\r\n if (request.status == 200) {\r\n success(request.responseText);\r\n }\r\n else {\r\n error(request.status, request.responseText);\r\n }\r\n };\r\n request.onerror = function () {\r\n error(request.status, request.responseText);\r\n };\r\n request.send();\r\n };\r\n AssetManager.prototype.downloadBinary = function (url, success, error) {\r\n var request = new XMLHttpRequest();\r\n if (this.rawDataUris[url])\r\n url = this.rawDataUris[url];\r\n request.open(\"GET\", url, true);\r\n request.responseType = \"arraybuffer\";\r\n request.onload = function () {\r\n if (request.status == 200) {\r\n success(new Uint8Array(request.response));\r\n }\r\n else {\r\n error(request.status, request.responseText);\r\n }\r\n };\r\n request.onerror = function () {\r\n error(request.status, request.responseText);\r\n };\r\n request.send();\r\n };\r\n AssetManager.prototype.setRawDataURI = function (path, data) {\r\n this.rawDataUris[this.pathPrefix + path] = data;\r\n };\r\n AssetManager.prototype.loadBinary = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n this.downloadBinary(path, function (data) {\r\n _this.assets[path] = data;\r\n if (success)\r\n success(path, data);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load binary \" + path + \": status \" + status + \", \" + responseText;\r\n if (error)\r\n error(path, \"Couldn't load binary \" + path + \": status \" + status + \", \" + responseText);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.loadText = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n this.downloadText(path, function (data) {\r\n _this.assets[path] = data;\r\n if (success)\r\n success(path, data);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load text \" + path + \": status \" + status + \", \" + responseText;\r\n if (error)\r\n error(path, \"Couldn't load text \" + path + \": status \" + status + \", \" + responseText);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.loadTexture = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n var storagePath = path;\r\n this.toLoad++;\r\n var img = new Image();\r\n img.crossOrigin = \"anonymous\";\r\n img.onload = function (ev) {\r\n var texture = _this.textureLoader(img);\r\n _this.assets[storagePath] = texture;\r\n _this.toLoad--;\r\n _this.loaded++;\r\n if (success)\r\n success(path, img);\r\n };\r\n img.onerror = function (ev) {\r\n _this.errors[path] = \"Couldn't load image \" + path;\r\n _this.toLoad--;\r\n _this.loaded++;\r\n if (error)\r\n error(path, \"Couldn't load image \" + path);\r\n };\r\n if (this.rawDataUris[path])\r\n path = this.rawDataUris[path];\r\n img.src = path;\r\n };\r\n AssetManager.prototype.loadTextureAtlas = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n var parent = path.lastIndexOf(\"/\") >= 0 ? path.substring(0, path.lastIndexOf(\"/\")) : \"\";\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n this.downloadText(path, function (atlasData) {\r\n var pagesLoaded = { count: 0 };\r\n var atlasPages = new Array();\r\n try {\r\n var atlas = new spine.TextureAtlas(atlasData, function (path) {\r\n atlasPages.push(parent == \"\" ? path : parent + \"/\" + path);\r\n var image = document.createElement(\"img\");\r\n image.width = 16;\r\n image.height = 16;\r\n return new spine.FakeTexture(image);\r\n });\r\n }\r\n catch (e) {\r\n var ex = e;\r\n _this.errors[path] = \"Couldn't load texture atlas \" + path + \": \" + ex.message;\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \" + path + \": \" + ex.message);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n return;\r\n }\r\n var _loop_1 = function (atlasPage) {\r\n var pageLoadError = false;\r\n _this.loadTexture(atlasPage, function (imagePath, image) {\r\n pagesLoaded.count++;\r\n if (pagesLoaded.count == atlasPages.length) {\r\n if (!pageLoadError) {\r\n try {\r\n var atlas = new spine.TextureAtlas(atlasData, function (path) {\r\n return _this.get(parent == \"\" ? path : parent + \"/\" + path);\r\n });\r\n _this.assets[path] = atlas;\r\n if (success)\r\n success(path, atlas);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n catch (e) {\r\n var ex = e;\r\n _this.errors[path] = \"Couldn't load texture atlas \" + path + \": \" + ex.message;\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \" + path + \": \" + ex.message);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load texture atlas page \" + imagePath + \"} of atlas \" + path;\r\n if (error)\r\n error(path, \"Couldn't load texture atlas page \" + imagePath + \" of atlas \" + path);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n }\r\n }, function (imagePath, errorMessage) {\r\n pageLoadError = true;\r\n pagesLoaded.count++;\r\n if (pagesLoaded.count == atlasPages.length) {\r\n _this.errors[path] = \"Couldn't load texture atlas page \" + imagePath + \"} of atlas \" + path;\r\n if (error)\r\n error(path, \"Couldn't load texture atlas page \" + imagePath + \" of atlas \" + path);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n });\r\n };\r\n for (var _i = 0, atlasPages_1 = atlasPages; _i < atlasPages_1.length; _i++) {\r\n var atlasPage = atlasPages_1[_i];\r\n _loop_1(atlasPage);\r\n }\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load texture atlas \" + path + \": status \" + status + \", \" + responseText;\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \" + path + \": status \" + status + \", \" + responseText);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.get = function (path) {\r\n path = this.pathPrefix + path;\r\n return this.assets[path];\r\n };\r\n AssetManager.prototype.remove = function (path) {\r\n path = this.pathPrefix + path;\r\n var asset = this.assets[path];\r\n if (asset.dispose)\r\n asset.dispose();\r\n this.assets[path] = null;\r\n };\r\n AssetManager.prototype.removeAll = function () {\r\n for (var key in this.assets) {\r\n var asset = this.assets[key];\r\n if (asset.dispose)\r\n asset.dispose();\r\n }\r\n this.assets = {};\r\n };\r\n AssetManager.prototype.isLoadingComplete = function () {\r\n return this.toLoad == 0;\r\n };\r\n AssetManager.prototype.getToLoad = function () {\r\n return this.toLoad;\r\n };\r\n AssetManager.prototype.getLoaded = function () {\r\n return this.loaded;\r\n };\r\n AssetManager.prototype.dispose = function () {\r\n this.removeAll();\r\n };\r\n AssetManager.prototype.hasErrors = function () {\r\n return Object.keys(this.errors).length > 0;\r\n };\r\n AssetManager.prototype.getErrors = function () {\r\n return this.errors;\r\n };\r\n return AssetManager;\r\n }());\r\n spine.AssetManager = AssetManager;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AtlasAttachmentLoader = (function () {\r\n function AtlasAttachmentLoader(atlas) {\r\n this.atlas = atlas;\r\n }\r\n AtlasAttachmentLoader.prototype.newRegionAttachment = function (skin, name, path) {\r\n var region = this.atlas.findRegion(path);\r\n if (region == null)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\r\n region.renderObject = region;\r\n var attachment = new spine.RegionAttachment(name);\r\n attachment.setRegion(region);\r\n return attachment;\r\n };\r\n AtlasAttachmentLoader.prototype.newMeshAttachment = function (skin, name, path) {\r\n var region = this.atlas.findRegion(path);\r\n if (region == null)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\r\n region.renderObject = region;\r\n var attachment = new spine.MeshAttachment(name);\r\n attachment.region = region;\r\n return attachment;\r\n };\r\n AtlasAttachmentLoader.prototype.newBoundingBoxAttachment = function (skin, name) {\r\n return new spine.BoundingBoxAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newPathAttachment = function (skin, name) {\r\n return new spine.PathAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newPointAttachment = function (skin, name) {\r\n return new spine.PointAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newClippingAttachment = function (skin, name) {\r\n return new spine.ClippingAttachment(name);\r\n };\r\n return AtlasAttachmentLoader;\r\n }());\r\n spine.AtlasAttachmentLoader = AtlasAttachmentLoader;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BlendMode;\r\n (function (BlendMode) {\r\n BlendMode[BlendMode[\"Normal\"] = 0] = \"Normal\";\r\n BlendMode[BlendMode[\"Additive\"] = 1] = \"Additive\";\r\n BlendMode[BlendMode[\"Multiply\"] = 2] = \"Multiply\";\r\n BlendMode[BlendMode[\"Screen\"] = 3] = \"Screen\";\r\n })(BlendMode = spine.BlendMode || (spine.BlendMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Bone = (function () {\r\n function Bone(data, skeleton, parent) {\r\n this.children = new Array();\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.scaleX = 0;\r\n this.scaleY = 0;\r\n this.shearX = 0;\r\n this.shearY = 0;\r\n this.ax = 0;\r\n this.ay = 0;\r\n this.arotation = 0;\r\n this.ascaleX = 0;\r\n this.ascaleY = 0;\r\n this.ashearX = 0;\r\n this.ashearY = 0;\r\n this.appliedValid = false;\r\n this.a = 0;\r\n this.b = 0;\r\n this.c = 0;\r\n this.d = 0;\r\n this.worldY = 0;\r\n this.worldX = 0;\r\n this.sorted = false;\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.skeleton = skeleton;\r\n this.parent = parent;\r\n this.setToSetupPose();\r\n }\r\n Bone.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n Bone.prototype.update = function () {\r\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n };\r\n Bone.prototype.updateWorldTransform = function () {\r\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n };\r\n Bone.prototype.updateWorldTransformWith = function (x, y, rotation, scaleX, scaleY, shearX, shearY) {\r\n this.ax = x;\r\n this.ay = y;\r\n this.arotation = rotation;\r\n this.ascaleX = scaleX;\r\n this.ascaleY = scaleY;\r\n this.ashearX = shearX;\r\n this.ashearY = shearY;\r\n this.appliedValid = true;\r\n var parent = this.parent;\r\n if (parent == null) {\r\n var skeleton = this.skeleton;\r\n var rotationY = rotation + 90 + shearY;\r\n var sx = skeleton.scaleX;\r\n var sy = skeleton.scaleY;\r\n this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\r\n this.b = spine.MathUtils.cosDeg(rotationY) * scaleY * sx;\r\n this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\r\n this.d = spine.MathUtils.sinDeg(rotationY) * scaleY * sy;\r\n this.worldX = x * sx + skeleton.x;\r\n this.worldY = y * sy + skeleton.y;\r\n return;\r\n }\r\n var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n this.worldX = pa * x + pb * y + parent.worldX;\r\n this.worldY = pc * x + pd * y + parent.worldY;\r\n switch (this.data.transformMode) {\r\n case spine.TransformMode.Normal: {\r\n var rotationY = rotation + 90 + shearY;\r\n var la = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(rotationY) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(rotationY) * scaleY;\r\n this.a = pa * la + pb * lc;\r\n this.b = pa * lb + pb * ld;\r\n this.c = pc * la + pd * lc;\r\n this.d = pc * lb + pd * ld;\r\n return;\r\n }\r\n case spine.TransformMode.OnlyTranslation: {\r\n var rotationY = rotation + 90 + shearY;\r\n this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n this.b = spine.MathUtils.cosDeg(rotationY) * scaleY;\r\n this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n this.d = spine.MathUtils.sinDeg(rotationY) * scaleY;\r\n break;\r\n }\r\n case spine.TransformMode.NoRotationOrReflection: {\r\n var s = pa * pa + pc * pc;\r\n var prx = 0;\r\n if (s > 0.0001) {\r\n s = Math.abs(pa * pd - pb * pc) / s;\r\n pa /= this.skeleton.scaleX;\r\n pc /= this.skeleton.scaleY;\r\n pb = pc * s;\r\n pd = pa * s;\r\n prx = Math.atan2(pc, pa) * spine.MathUtils.radDeg;\r\n }\r\n else {\r\n pa = 0;\r\n pc = 0;\r\n prx = 90 - Math.atan2(pd, pb) * spine.MathUtils.radDeg;\r\n }\r\n var rx = rotation + shearX - prx;\r\n var ry = rotation + shearY - prx + 90;\r\n var la = spine.MathUtils.cosDeg(rx) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(ry) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(rx) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(ry) * scaleY;\r\n this.a = pa * la - pb * lc;\r\n this.b = pa * lb - pb * ld;\r\n this.c = pc * la + pd * lc;\r\n this.d = pc * lb + pd * ld;\r\n break;\r\n }\r\n case spine.TransformMode.NoScale:\r\n case spine.TransformMode.NoScaleOrReflection: {\r\n var cos = spine.MathUtils.cosDeg(rotation);\r\n var sin = spine.MathUtils.sinDeg(rotation);\r\n var za = (pa * cos + pb * sin) / this.skeleton.scaleX;\r\n var zc = (pc * cos + pd * sin) / this.skeleton.scaleY;\r\n var s = Math.sqrt(za * za + zc * zc);\r\n if (s > 0.00001)\r\n s = 1 / s;\r\n za *= s;\r\n zc *= s;\r\n s = Math.sqrt(za * za + zc * zc);\r\n if (this.data.transformMode == spine.TransformMode.NoScale\r\n && (pa * pd - pb * pc < 0) != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))\r\n s = -s;\r\n var r = Math.PI / 2 + Math.atan2(zc, za);\r\n var zb = Math.cos(r) * s;\r\n var zd = Math.sin(r) * s;\r\n var la = spine.MathUtils.cosDeg(shearX) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(shearX) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;\r\n this.a = za * la + zb * lc;\r\n this.b = za * lb + zb * ld;\r\n this.c = zc * la + zd * lc;\r\n this.d = zc * lb + zd * ld;\r\n break;\r\n }\r\n }\r\n this.a *= this.skeleton.scaleX;\r\n this.b *= this.skeleton.scaleX;\r\n this.c *= this.skeleton.scaleY;\r\n this.d *= this.skeleton.scaleY;\r\n };\r\n Bone.prototype.setToSetupPose = function () {\r\n var data = this.data;\r\n this.x = data.x;\r\n this.y = data.y;\r\n this.rotation = data.rotation;\r\n this.scaleX = data.scaleX;\r\n this.scaleY = data.scaleY;\r\n this.shearX = data.shearX;\r\n this.shearY = data.shearY;\r\n };\r\n Bone.prototype.getWorldRotationX = function () {\r\n return Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.getWorldRotationY = function () {\r\n return Math.atan2(this.d, this.b) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.getWorldScaleX = function () {\r\n return Math.sqrt(this.a * this.a + this.c * this.c);\r\n };\r\n Bone.prototype.getWorldScaleY = function () {\r\n return Math.sqrt(this.b * this.b + this.d * this.d);\r\n };\r\n Bone.prototype.updateAppliedTransform = function () {\r\n this.appliedValid = true;\r\n var parent = this.parent;\r\n if (parent == null) {\r\n this.ax = this.worldX;\r\n this.ay = this.worldY;\r\n this.arotation = Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\r\n this.ascaleX = Math.sqrt(this.a * this.a + this.c * this.c);\r\n this.ascaleY = Math.sqrt(this.b * this.b + this.d * this.d);\r\n this.ashearX = 0;\r\n this.ashearY = Math.atan2(this.a * this.b + this.c * this.d, this.a * this.d - this.b * this.c) * spine.MathUtils.radDeg;\r\n return;\r\n }\r\n var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n var pid = 1 / (pa * pd - pb * pc);\r\n var dx = this.worldX - parent.worldX, dy = this.worldY - parent.worldY;\r\n this.ax = (dx * pd * pid - dy * pb * pid);\r\n this.ay = (dy * pa * pid - dx * pc * pid);\r\n var ia = pid * pd;\r\n var id = pid * pa;\r\n var ib = pid * pb;\r\n var ic = pid * pc;\r\n var ra = ia * this.a - ib * this.c;\r\n var rb = ia * this.b - ib * this.d;\r\n var rc = id * this.c - ic * this.a;\r\n var rd = id * this.d - ic * this.b;\r\n this.ashearX = 0;\r\n this.ascaleX = Math.sqrt(ra * ra + rc * rc);\r\n if (this.ascaleX > 0.0001) {\r\n var det = ra * rd - rb * rc;\r\n this.ascaleY = det / this.ascaleX;\r\n this.ashearY = Math.atan2(ra * rb + rc * rd, det) * spine.MathUtils.radDeg;\r\n this.arotation = Math.atan2(rc, ra) * spine.MathUtils.radDeg;\r\n }\r\n else {\r\n this.ascaleX = 0;\r\n this.ascaleY = Math.sqrt(rb * rb + rd * rd);\r\n this.ashearY = 0;\r\n this.arotation = 90 - Math.atan2(rd, rb) * spine.MathUtils.radDeg;\r\n }\r\n };\r\n Bone.prototype.worldToLocal = function (world) {\r\n var a = this.a, b = this.b, c = this.c, d = this.d;\r\n var invDet = 1 / (a * d - b * c);\r\n var x = world.x - this.worldX, y = world.y - this.worldY;\r\n world.x = (x * d * invDet - y * b * invDet);\r\n world.y = (y * a * invDet - x * c * invDet);\r\n return world;\r\n };\r\n Bone.prototype.localToWorld = function (local) {\r\n var x = local.x, y = local.y;\r\n local.x = x * this.a + y * this.b + this.worldX;\r\n local.y = x * this.c + y * this.d + this.worldY;\r\n return local;\r\n };\r\n Bone.prototype.worldToLocalRotation = function (worldRotation) {\r\n var sin = spine.MathUtils.sinDeg(worldRotation), cos = spine.MathUtils.cosDeg(worldRotation);\r\n return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * spine.MathUtils.radDeg + this.rotation - this.shearX;\r\n };\r\n Bone.prototype.localToWorldRotation = function (localRotation) {\r\n localRotation -= this.rotation - this.shearX;\r\n var sin = spine.MathUtils.sinDeg(localRotation), cos = spine.MathUtils.cosDeg(localRotation);\r\n return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.rotateWorld = function (degrees) {\r\n var a = this.a, b = this.b, c = this.c, d = this.d;\r\n var cos = spine.MathUtils.cosDeg(degrees), sin = spine.MathUtils.sinDeg(degrees);\r\n this.a = cos * a - sin * c;\r\n this.b = cos * b - sin * d;\r\n this.c = sin * a + cos * c;\r\n this.d = sin * b + cos * d;\r\n this.appliedValid = false;\r\n };\r\n return Bone;\r\n }());\r\n spine.Bone = Bone;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BoneData = (function () {\r\n function BoneData(index, name, parent) {\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.scaleX = 1;\r\n this.scaleY = 1;\r\n this.shearX = 0;\r\n this.shearY = 0;\r\n this.transformMode = TransformMode.Normal;\r\n this.skinRequired = false;\r\n this.color = new spine.Color();\r\n if (index < 0)\r\n throw new Error(\"index must be >= 0.\");\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.parent = parent;\r\n }\r\n return BoneData;\r\n }());\r\n spine.BoneData = BoneData;\r\n var TransformMode;\r\n (function (TransformMode) {\r\n TransformMode[TransformMode[\"Normal\"] = 0] = \"Normal\";\r\n TransformMode[TransformMode[\"OnlyTranslation\"] = 1] = \"OnlyTranslation\";\r\n TransformMode[TransformMode[\"NoRotationOrReflection\"] = 2] = \"NoRotationOrReflection\";\r\n TransformMode[TransformMode[\"NoScale\"] = 3] = \"NoScale\";\r\n TransformMode[TransformMode[\"NoScaleOrReflection\"] = 4] = \"NoScaleOrReflection\";\r\n })(TransformMode = spine.TransformMode || (spine.TransformMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var ConstraintData = (function () {\r\n function ConstraintData(name, order, skinRequired) {\r\n this.name = name;\r\n this.order = order;\r\n this.skinRequired = skinRequired;\r\n }\r\n return ConstraintData;\r\n }());\r\n spine.ConstraintData = ConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Event = (function () {\r\n function Event(time, data) {\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n this.time = time;\r\n this.data = data;\r\n }\r\n return Event;\r\n }());\r\n spine.Event = Event;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var EventData = (function () {\r\n function EventData(name) {\r\n this.name = name;\r\n }\r\n return EventData;\r\n }());\r\n spine.EventData = EventData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IkConstraint = (function () {\r\n function IkConstraint(data, skeleton) {\r\n this.bendDirection = 0;\r\n this.compress = false;\r\n this.stretch = false;\r\n this.mix = 1;\r\n this.softness = 0;\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.mix = data.mix;\r\n this.softness = data.softness;\r\n this.bendDirection = data.bendDirection;\r\n this.compress = data.compress;\r\n this.stretch = data.stretch;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findBone(data.target.name);\r\n }\r\n IkConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n IkConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n IkConstraint.prototype.update = function () {\r\n var target = this.target;\r\n var bones = this.bones;\r\n switch (bones.length) {\r\n case 1:\r\n this.apply1(bones[0], target.worldX, target.worldY, this.compress, this.stretch, this.data.uniform, this.mix);\r\n break;\r\n case 2:\r\n this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.stretch, this.softness, this.mix);\r\n break;\r\n }\r\n };\r\n IkConstraint.prototype.apply1 = function (bone, targetX, targetY, compress, stretch, uniform, alpha) {\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var p = bone.parent;\r\n var pa = p.a, pb = p.b, pc = p.c, pd = p.d;\r\n var rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;\r\n switch (bone.data.transformMode) {\r\n case spine.TransformMode.OnlyTranslation:\r\n tx = targetX - bone.worldX;\r\n ty = targetY - bone.worldY;\r\n break;\r\n case spine.TransformMode.NoRotationOrReflection:\r\n var s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);\r\n var sa = pa / bone.skeleton.scaleX;\r\n var sc = pc / bone.skeleton.scaleY;\r\n pb = -sc * s * bone.skeleton.scaleX;\r\n pd = sa * s * bone.skeleton.scaleY;\r\n rotationIK += Math.atan2(sc, sa) * spine.MathUtils.radDeg;\r\n default:\r\n var x = targetX - p.worldX, y = targetY - p.worldY;\r\n var d = pa * pd - pb * pc;\r\n tx = (x * pd - y * pb) / d - bone.ax;\r\n ty = (y * pa - x * pc) / d - bone.ay;\r\n }\r\n rotationIK += Math.atan2(ty, tx) * spine.MathUtils.radDeg;\r\n if (bone.ascaleX < 0)\r\n rotationIK += 180;\r\n if (rotationIK > 180)\r\n rotationIK -= 360;\r\n else if (rotationIK < -180)\r\n rotationIK += 360;\r\n var sx = bone.ascaleX, sy = bone.ascaleY;\r\n if (compress || stretch) {\r\n switch (bone.data.transformMode) {\r\n case spine.TransformMode.NoScale:\r\n case spine.TransformMode.NoScaleOrReflection:\r\n tx = targetX - bone.worldX;\r\n ty = targetY - bone.worldY;\r\n }\r\n var b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\r\n if ((compress && dd < b) || (stretch && dd > b) && b > 0.0001) {\r\n var s = (dd / b - 1) * alpha + 1;\r\n sx *= s;\r\n if (uniform)\r\n sy *= s;\r\n }\r\n }\r\n bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, sx, sy, bone.ashearX, bone.ashearY);\r\n };\r\n IkConstraint.prototype.apply2 = function (parent, child, targetX, targetY, bendDir, stretch, softness, alpha) {\r\n if (alpha == 0) {\r\n child.updateWorldTransform();\r\n return;\r\n }\r\n if (!parent.appliedValid)\r\n parent.updateAppliedTransform();\r\n if (!child.appliedValid)\r\n child.updateAppliedTransform();\r\n var px = parent.ax, py = parent.ay, psx = parent.ascaleX, sx = psx, psy = parent.ascaleY, csx = child.ascaleX;\r\n var os1 = 0, os2 = 0, s2 = 0;\r\n if (psx < 0) {\r\n psx = -psx;\r\n os1 = 180;\r\n s2 = -1;\r\n }\r\n else {\r\n os1 = 0;\r\n s2 = 1;\r\n }\r\n if (psy < 0) {\r\n psy = -psy;\r\n s2 = -s2;\r\n }\r\n if (csx < 0) {\r\n csx = -csx;\r\n os2 = 180;\r\n }\r\n else\r\n os2 = 0;\r\n var cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d;\r\n var u = Math.abs(psx - psy) <= 0.0001;\r\n if (!u) {\r\n cy = 0;\r\n cwx = a * cx + parent.worldX;\r\n cwy = c * cx + parent.worldY;\r\n }\r\n else {\r\n cy = child.ay;\r\n cwx = a * cx + b * cy + parent.worldX;\r\n cwy = c * cx + d * cy + parent.worldY;\r\n }\r\n var pp = parent.parent;\r\n a = pp.a;\r\n b = pp.b;\r\n c = pp.c;\r\n d = pp.d;\r\n var id = 1 / (a * d - b * c), x = cwx - pp.worldX, y = cwy - pp.worldY;\r\n var dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\r\n var l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\r\n if (l1 < 0.0001) {\r\n this.apply1(parent, targetX, targetY, false, stretch, false, alpha);\r\n child.updateWorldTransformWith(cx, cy, 0, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n return;\r\n }\r\n x = targetX - pp.worldX;\r\n y = targetY - pp.worldY;\r\n var tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\r\n var dd = tx * tx + ty * ty;\r\n if (softness != 0) {\r\n softness *= psx * (csx + 1) / 2;\r\n var td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\r\n if (sd > 0) {\r\n var p = Math.min(1, sd / (softness * 2)) - 1;\r\n p = (sd - softness * (1 - p * p)) / td;\r\n tx -= p * tx;\r\n ty -= p * ty;\r\n dd = tx * tx + ty * ty;\r\n }\r\n }\r\n outer: if (u) {\r\n l2 *= psx;\r\n var cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\r\n if (cos < -1)\r\n cos = -1;\r\n else if (cos > 1) {\r\n cos = 1;\r\n if (stretch)\r\n sx *= (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\r\n }\r\n a2 = Math.acos(cos) * bendDir;\r\n a = l1 + l2 * cos;\r\n b = l2 * Math.sin(a2);\r\n a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b);\r\n }\r\n else {\r\n a = psx * l2;\r\n b = psy * l2;\r\n var aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\r\n c = bb * l1 * l1 + aa * dd - aa * bb;\r\n var c1 = -2 * bb * l1, c2 = bb - aa;\r\n d = c1 * c1 - 4 * c2 * c;\r\n if (d >= 0) {\r\n var q = Math.sqrt(d);\r\n if (c1 < 0)\r\n q = -q;\r\n q = -(c1 + q) / 2;\r\n var r0 = q / c2, r1 = c / q;\r\n var r = Math.abs(r0) < Math.abs(r1) ? r0 : r1;\r\n if (r * r <= dd) {\r\n y = Math.sqrt(dd - r * r) * bendDir;\r\n a1 = ta - Math.atan2(y, r);\r\n a2 = Math.atan2(y / psy, (r - l1) / psx);\r\n break outer;\r\n }\r\n }\r\n var minAngle = spine.MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\r\n var maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;\r\n c = -a * l1 / (aa - bb);\r\n if (c >= -1 && c <= 1) {\r\n c = Math.acos(c);\r\n x = a * Math.cos(c) + l1;\r\n y = b * Math.sin(c);\r\n d = x * x + y * y;\r\n if (d < minDist) {\r\n minAngle = c;\r\n minDist = d;\r\n minX = x;\r\n minY = y;\r\n }\r\n if (d > maxDist) {\r\n maxAngle = c;\r\n maxDist = d;\r\n maxX = x;\r\n maxY = y;\r\n }\r\n }\r\n if (dd <= (minDist + maxDist) / 2) {\r\n a1 = ta - Math.atan2(minY * bendDir, minX);\r\n a2 = minAngle * bendDir;\r\n }\r\n else {\r\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\r\n a2 = maxAngle * bendDir;\r\n }\r\n }\r\n var os = Math.atan2(cy, cx) * s2;\r\n var rotation = parent.arotation;\r\n a1 = (a1 - os) * spine.MathUtils.radDeg + os1 - rotation;\r\n if (a1 > 180)\r\n a1 -= 360;\r\n else if (a1 < -180)\r\n a1 += 360;\r\n parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, sx, parent.ascaleY, 0, 0);\r\n rotation = child.arotation;\r\n a2 = ((a2 + os) * spine.MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation;\r\n if (a2 > 180)\r\n a2 -= 360;\r\n else if (a2 < -180)\r\n a2 += 360;\r\n child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n };\r\n return IkConstraint;\r\n }());\r\n spine.IkConstraint = IkConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IkConstraintData = (function (_super) {\r\n __extends(IkConstraintData, _super);\r\n function IkConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n _this.bendDirection = 1;\r\n _this.compress = false;\r\n _this.stretch = false;\r\n _this.uniform = false;\r\n _this.mix = 1;\r\n _this.softness = 0;\r\n return _this;\r\n }\r\n return IkConstraintData;\r\n }(spine.ConstraintData));\r\n spine.IkConstraintData = IkConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathConstraint = (function () {\r\n function PathConstraint(data, skeleton) {\r\n this.position = 0;\r\n this.spacing = 0;\r\n this.rotateMix = 0;\r\n this.translateMix = 0;\r\n this.spaces = new Array();\r\n this.positions = new Array();\r\n this.world = new Array();\r\n this.curves = new Array();\r\n this.lengths = new Array();\r\n this.segments = new Array();\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (var i = 0, n = data.bones.length; i < n; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findSlot(data.target.name);\r\n this.position = data.position;\r\n this.spacing = data.spacing;\r\n this.rotateMix = data.rotateMix;\r\n this.translateMix = data.translateMix;\r\n }\r\n PathConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n PathConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n PathConstraint.prototype.update = function () {\r\n var attachment = this.target.getAttachment();\r\n if (!(attachment instanceof spine.PathAttachment))\r\n return;\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix;\r\n var translate = translateMix > 0, rotate = rotateMix > 0;\r\n if (!translate && !rotate)\r\n return;\r\n var data = this.data;\r\n var percentSpacing = data.spacingMode == spine.SpacingMode.Percent;\r\n var rotateMode = data.rotateMode;\r\n var tangents = rotateMode == spine.RotateMode.Tangent, scale = rotateMode == spine.RotateMode.ChainScale;\r\n var boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\r\n var bones = this.bones;\r\n var spaces = spine.Utils.setArraySize(this.spaces, spacesCount), lengths = null;\r\n var spacing = this.spacing;\r\n if (scale || !percentSpacing) {\r\n if (scale)\r\n lengths = spine.Utils.setArraySize(this.lengths, boneCount);\r\n var lengthSpacing = data.spacingMode == spine.SpacingMode.Length;\r\n for (var i = 0, n = spacesCount - 1; i < n;) {\r\n var bone = bones[i];\r\n var setupLength = bone.data.length;\r\n if (setupLength < PathConstraint.epsilon) {\r\n if (scale)\r\n lengths[i] = 0;\r\n spaces[++i] = 0;\r\n }\r\n else if (percentSpacing) {\r\n if (scale) {\r\n var x = setupLength * bone.a, y = setupLength * bone.c;\r\n var length_1 = Math.sqrt(x * x + y * y);\r\n lengths[i] = length_1;\r\n }\r\n spaces[++i] = spacing;\r\n }\r\n else {\r\n var x = setupLength * bone.a, y = setupLength * bone.c;\r\n var length_2 = Math.sqrt(x * x + y * y);\r\n if (scale)\r\n lengths[i] = length_2;\r\n spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length_2 / setupLength;\r\n }\r\n }\r\n }\r\n else {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] = spacing;\r\n }\r\n var positions = this.computeWorldPositions(attachment, spacesCount, tangents, data.positionMode == spine.PositionMode.Percent, percentSpacing);\r\n var boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\r\n var tip = false;\r\n if (offsetRotation == 0)\r\n tip = rotateMode == spine.RotateMode.Chain;\r\n else {\r\n tip = false;\r\n var p = this.target.bone;\r\n offsetRotation *= p.a * p.d - p.b * p.c > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n }\r\n for (var i = 0, p = 3; i < boneCount; i++, p += 3) {\r\n var bone = bones[i];\r\n bone.worldX += (boneX - bone.worldX) * translateMix;\r\n bone.worldY += (boneY - bone.worldY) * translateMix;\r\n var x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\r\n if (scale) {\r\n var length_3 = lengths[i];\r\n if (length_3 != 0) {\r\n var s = (Math.sqrt(dx * dx + dy * dy) / length_3 - 1) * rotateMix + 1;\r\n bone.a *= s;\r\n bone.c *= s;\r\n }\r\n }\r\n boneX = x;\r\n boneY = y;\r\n if (rotate) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d, r = 0, cos = 0, sin = 0;\r\n if (tangents)\r\n r = positions[p - 1];\r\n else if (spaces[i + 1] == 0)\r\n r = positions[p + 2];\r\n else\r\n r = Math.atan2(dy, dx);\r\n r -= Math.atan2(c, a);\r\n if (tip) {\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n var length_4 = bone.data.length;\r\n boneX += (length_4 * (cos * a - sin * c) - dx) * rotateMix;\r\n boneY += (length_4 * (sin * a + cos * c) - dy) * rotateMix;\r\n }\r\n else {\r\n r += offsetRotation;\r\n }\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n }\r\n bone.appliedValid = false;\r\n }\r\n };\r\n PathConstraint.prototype.computeWorldPositions = function (path, spacesCount, tangents, percentPosition, percentSpacing) {\r\n var target = this.target;\r\n var position = this.position;\r\n var spaces = this.spaces, out = spine.Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = null;\r\n var closed = path.closed;\r\n var verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = PathConstraint.NONE;\r\n if (!path.constantSpeed) {\r\n var lengths = path.lengths;\r\n curveCount -= closed ? 1 : 2;\r\n var pathLength_1 = lengths[curveCount];\r\n if (percentPosition)\r\n position *= pathLength_1;\r\n if (percentSpacing) {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] *= pathLength_1;\r\n }\r\n world = spine.Utils.setArraySize(this.world, 8);\r\n for (var i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\r\n var space = spaces[i];\r\n position += space;\r\n var p = position;\r\n if (closed) {\r\n p %= pathLength_1;\r\n if (p < 0)\r\n p += pathLength_1;\r\n curve = 0;\r\n }\r\n else if (p < 0) {\r\n if (prevCurve != PathConstraint.BEFORE) {\r\n prevCurve = PathConstraint.BEFORE;\r\n path.computeWorldVertices(target, 2, 4, world, 0, 2);\r\n }\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n }\r\n else if (p > pathLength_1) {\r\n if (prevCurve != PathConstraint.AFTER) {\r\n prevCurve = PathConstraint.AFTER;\r\n path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\r\n }\r\n this.addAfterPosition(p - pathLength_1, world, 0, out, o);\r\n continue;\r\n }\r\n for (;; curve++) {\r\n var length_5 = lengths[curve];\r\n if (p > length_5)\r\n continue;\r\n if (curve == 0)\r\n p /= length_5;\r\n else {\r\n var prev = lengths[curve - 1];\r\n p = (p - prev) / (length_5 - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n if (closed && curve == curveCount) {\r\n path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 4, world, 4, 2);\r\n }\r\n else\r\n path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\r\n }\r\n this.addCurvePosition(p, world[0], world[1], world[2], world[3], world[4], world[5], world[6], world[7], out, o, tangents || (i > 0 && space == 0));\r\n }\r\n return out;\r\n }\r\n if (closed) {\r\n verticesLength += 2;\r\n world = spine.Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength - 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 2, world, verticesLength - 4, 2);\r\n world[verticesLength - 2] = world[0];\r\n world[verticesLength - 1] = world[1];\r\n }\r\n else {\r\n curveCount--;\r\n verticesLength -= 4;\r\n world = spine.Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\r\n }\r\n var curves = spine.Utils.setArraySize(this.curves, curveCount);\r\n var pathLength = 0;\r\n var x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\r\n var tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\r\n for (var i = 0, w = 2; i < curveCount; i++, w += 6) {\r\n cx1 = world[w];\r\n cy1 = world[w + 1];\r\n cx2 = world[w + 2];\r\n cy2 = world[w + 3];\r\n x2 = world[w + 4];\r\n y2 = world[w + 5];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.1875;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.1875;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n curves[i] = pathLength;\r\n x1 = x2;\r\n y1 = y2;\r\n }\r\n if (percentPosition)\r\n position *= pathLength;\r\n else\r\n position *= pathLength / path.lengths[curveCount - 1];\r\n if (percentSpacing) {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] *= pathLength;\r\n }\r\n var segments = this.segments;\r\n var curveLength = 0;\r\n for (var i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\r\n var space = spaces[i];\r\n position += space;\r\n var p = position;\r\n if (closed) {\r\n p %= pathLength;\r\n if (p < 0)\r\n p += pathLength;\r\n curve = 0;\r\n }\r\n else if (p < 0) {\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n }\r\n else if (p > pathLength) {\r\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\r\n continue;\r\n }\r\n for (;; curve++) {\r\n var length_6 = curves[curve];\r\n if (p > length_6)\r\n continue;\r\n if (curve == 0)\r\n p /= length_6;\r\n else {\r\n var prev = curves[curve - 1];\r\n p = (p - prev) / (length_6 - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n var ii = curve * 6;\r\n x1 = world[ii];\r\n y1 = world[ii + 1];\r\n cx1 = world[ii + 2];\r\n cy1 = world[ii + 3];\r\n cx2 = world[ii + 4];\r\n cy2 = world[ii + 5];\r\n x2 = world[ii + 6];\r\n y2 = world[ii + 7];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.03;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.03;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.006;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.006;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667;\r\n curveLength = Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[0] = curveLength;\r\n for (ii = 1; ii < 8; ii++) {\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[ii] = curveLength;\r\n }\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[8] = curveLength;\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[9] = curveLength;\r\n segment = 0;\r\n }\r\n p *= curveLength;\r\n for (;; segment++) {\r\n var length_7 = segments[segment];\r\n if (p > length_7)\r\n continue;\r\n if (segment == 0)\r\n p /= length_7;\r\n else {\r\n var prev = segments[segment - 1];\r\n p = segment + (p - prev) / (length_7 - prev);\r\n }\r\n break;\r\n }\r\n this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || (i > 0 && space == 0));\r\n }\r\n return out;\r\n };\r\n PathConstraint.prototype.addBeforePosition = function (p, temp, i, out, o) {\r\n var x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n };\r\n PathConstraint.prototype.addAfterPosition = function (p, temp, i, out, o) {\r\n var x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n };\r\n PathConstraint.prototype.addCurvePosition = function (p, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents) {\r\n if (p == 0 || isNaN(p)) {\r\n out[o] = x1;\r\n out[o + 1] = y1;\r\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\r\n return;\r\n }\r\n var tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\r\n var ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\r\n var x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt;\r\n out[o] = x;\r\n out[o + 1] = y;\r\n if (tangents) {\r\n if (p < 0.001)\r\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\r\n else\r\n out[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt));\r\n }\r\n };\r\n PathConstraint.NONE = -1;\r\n PathConstraint.BEFORE = -2;\r\n PathConstraint.AFTER = -3;\r\n PathConstraint.epsilon = 0.00001;\r\n return PathConstraint;\r\n }());\r\n spine.PathConstraint = PathConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathConstraintData = (function (_super) {\r\n __extends(PathConstraintData, _super);\r\n function PathConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n return _this;\r\n }\r\n return PathConstraintData;\r\n }(spine.ConstraintData));\r\n spine.PathConstraintData = PathConstraintData;\r\n var PositionMode;\r\n (function (PositionMode) {\r\n PositionMode[PositionMode[\"Fixed\"] = 0] = \"Fixed\";\r\n PositionMode[PositionMode[\"Percent\"] = 1] = \"Percent\";\r\n })(PositionMode = spine.PositionMode || (spine.PositionMode = {}));\r\n var SpacingMode;\r\n (function (SpacingMode) {\r\n SpacingMode[SpacingMode[\"Length\"] = 0] = \"Length\";\r\n SpacingMode[SpacingMode[\"Fixed\"] = 1] = \"Fixed\";\r\n SpacingMode[SpacingMode[\"Percent\"] = 2] = \"Percent\";\r\n })(SpacingMode = spine.SpacingMode || (spine.SpacingMode = {}));\r\n var RotateMode;\r\n (function (RotateMode) {\r\n RotateMode[RotateMode[\"Tangent\"] = 0] = \"Tangent\";\r\n RotateMode[RotateMode[\"Chain\"] = 1] = \"Chain\";\r\n RotateMode[RotateMode[\"ChainScale\"] = 2] = \"ChainScale\";\r\n })(RotateMode = spine.RotateMode || (spine.RotateMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Assets = (function () {\r\n function Assets(clientId) {\r\n this.toLoad = new Array();\r\n this.assets = {};\r\n this.clientId = clientId;\r\n }\r\n Assets.prototype.loaded = function () {\r\n var i = 0;\r\n for (var v in this.assets)\r\n i++;\r\n return i;\r\n };\r\n return Assets;\r\n }());\r\n var SharedAssetManager = (function () {\r\n function SharedAssetManager(pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n this.clientAssets = {};\r\n this.queuedAssets = {};\r\n this.rawAssets = {};\r\n this.errors = {};\r\n this.pathPrefix = pathPrefix;\r\n }\r\n SharedAssetManager.prototype.queueAsset = function (clientId, textureLoader, path) {\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined) {\r\n clientAssets = new Assets(clientId);\r\n this.clientAssets[clientId] = clientAssets;\r\n }\r\n if (textureLoader !== null)\r\n clientAssets.textureLoader = textureLoader;\r\n clientAssets.toLoad.push(path);\r\n if (this.queuedAssets[path] === path) {\r\n return false;\r\n }\r\n else {\r\n this.queuedAssets[path] = path;\r\n return true;\r\n }\r\n };\r\n SharedAssetManager.prototype.loadText = function (clientId, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, null, path))\r\n return;\r\n var request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n request.onreadystatechange = function () {\r\n if (request.readyState == XMLHttpRequest.DONE) {\r\n if (request.status >= 200 && request.status < 300) {\r\n _this.rawAssets[path] = request.responseText;\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load text \" + path + \": status \" + request.status + \", \" + request.responseText;\r\n }\r\n }\r\n };\r\n request.open(\"GET\", path, true);\r\n request.send();\r\n };\r\n SharedAssetManager.prototype.loadJson = function (clientId, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, null, path))\r\n return;\r\n var request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n request.onreadystatechange = function () {\r\n if (request.readyState == XMLHttpRequest.DONE) {\r\n if (request.status >= 200 && request.status < 300) {\r\n _this.rawAssets[path] = JSON.parse(request.responseText);\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load text \" + path + \": status \" + request.status + \", \" + request.responseText;\r\n }\r\n }\r\n };\r\n request.open(\"GET\", path, true);\r\n request.send();\r\n };\r\n SharedAssetManager.prototype.loadTexture = function (clientId, textureLoader, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, textureLoader, path))\r\n return;\r\n var img = new Image();\r\n img.crossOrigin = \"anonymous\";\r\n img.onload = function (ev) {\r\n _this.rawAssets[path] = img;\r\n };\r\n img.onerror = function (ev) {\r\n _this.errors[path] = \"Couldn't load image \" + path;\r\n };\r\n img.src = path;\r\n };\r\n SharedAssetManager.prototype.get = function (clientId, path) {\r\n path = this.pathPrefix + path;\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined)\r\n return true;\r\n return clientAssets.assets[path];\r\n };\r\n SharedAssetManager.prototype.updateClientAssets = function (clientAssets) {\r\n for (var i = 0; i < clientAssets.toLoad.length; i++) {\r\n var path = clientAssets.toLoad[i];\r\n var asset = clientAssets.assets[path];\r\n if (asset === null || asset === undefined) {\r\n var rawAsset = this.rawAssets[path];\r\n if (rawAsset === null || rawAsset === undefined)\r\n continue;\r\n if (rawAsset instanceof HTMLImageElement) {\r\n clientAssets.assets[path] = clientAssets.textureLoader(rawAsset);\r\n }\r\n else {\r\n clientAssets.assets[path] = rawAsset;\r\n }\r\n }\r\n }\r\n };\r\n SharedAssetManager.prototype.isLoadingComplete = function (clientId) {\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined)\r\n return true;\r\n this.updateClientAssets(clientAssets);\r\n return clientAssets.toLoad.length == clientAssets.loaded();\r\n };\r\n SharedAssetManager.prototype.dispose = function () {\r\n };\r\n SharedAssetManager.prototype.hasErrors = function () {\r\n return Object.keys(this.errors).length > 0;\r\n };\r\n SharedAssetManager.prototype.getErrors = function () {\r\n return this.errors;\r\n };\r\n return SharedAssetManager;\r\n }());\r\n spine.SharedAssetManager = SharedAssetManager;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Skeleton = (function () {\r\n function Skeleton(data) {\r\n this._updateCache = new Array();\r\n this.updateCacheReset = new Array();\r\n this.time = 0;\r\n this.scaleX = 1;\r\n this.scaleY = 1;\r\n this.x = 0;\r\n this.y = 0;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++) {\r\n var boneData = data.bones[i];\r\n var bone = void 0;\r\n if (boneData.parent == null)\r\n bone = new spine.Bone(boneData, this, null);\r\n else {\r\n var parent_1 = this.bones[boneData.parent.index];\r\n bone = new spine.Bone(boneData, this, parent_1);\r\n parent_1.children.push(bone);\r\n }\r\n this.bones.push(bone);\r\n }\r\n this.slots = new Array();\r\n this.drawOrder = new Array();\r\n for (var i = 0; i < data.slots.length; i++) {\r\n var slotData = data.slots[i];\r\n var bone = this.bones[slotData.boneData.index];\r\n var slot = new spine.Slot(slotData, bone);\r\n this.slots.push(slot);\r\n this.drawOrder.push(slot);\r\n }\r\n this.ikConstraints = new Array();\r\n for (var i = 0; i < data.ikConstraints.length; i++) {\r\n var ikConstraintData = data.ikConstraints[i];\r\n this.ikConstraints.push(new spine.IkConstraint(ikConstraintData, this));\r\n }\r\n this.transformConstraints = new Array();\r\n for (var i = 0; i < data.transformConstraints.length; i++) {\r\n var transformConstraintData = data.transformConstraints[i];\r\n this.transformConstraints.push(new spine.TransformConstraint(transformConstraintData, this));\r\n }\r\n this.pathConstraints = new Array();\r\n for (var i = 0; i < data.pathConstraints.length; i++) {\r\n var pathConstraintData = data.pathConstraints[i];\r\n this.pathConstraints.push(new spine.PathConstraint(pathConstraintData, this));\r\n }\r\n this.color = new spine.Color(1, 1, 1, 1);\r\n this.updateCache();\r\n }\r\n Skeleton.prototype.updateCache = function () {\r\n var updateCache = this._updateCache;\r\n updateCache.length = 0;\r\n this.updateCacheReset.length = 0;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n bone.sorted = bone.data.skinRequired;\r\n bone.active = !bone.sorted;\r\n }\r\n if (this.skin != null) {\r\n var skinBones = this.skin.bones;\r\n for (var i = 0, n = this.skin.bones.length; i < n; i++) {\r\n var bone = this.bones[skinBones[i].index];\r\n do {\r\n bone.sorted = false;\r\n bone.active = true;\r\n bone = bone.parent;\r\n } while (bone != null);\r\n }\r\n }\r\n var ikConstraints = this.ikConstraints;\r\n var transformConstraints = this.transformConstraints;\r\n var pathConstraints = this.pathConstraints;\r\n var ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\r\n var constraintCount = ikCount + transformCount + pathCount;\r\n outer: for (var i = 0; i < constraintCount; i++) {\r\n for (var ii = 0; ii < ikCount; ii++) {\r\n var constraint = ikConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortIkConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (var ii = 0; ii < transformCount; ii++) {\r\n var constraint = transformConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortTransformConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (var ii = 0; ii < pathCount; ii++) {\r\n var constraint = pathConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortPathConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n }\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n this.sortBone(bones[i]);\r\n };\r\n Skeleton.prototype.sortIkConstraint = function (constraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n var target = constraint.target;\r\n this.sortBone(target);\r\n var constrained = constraint.bones;\r\n var parent = constrained[0];\r\n this.sortBone(parent);\r\n if (constrained.length > 1) {\r\n var child = constrained[constrained.length - 1];\r\n if (!(this._updateCache.indexOf(child) > -1))\r\n this.updateCacheReset.push(child);\r\n }\r\n this._updateCache.push(constraint);\r\n this.sortReset(parent.children);\r\n constrained[constrained.length - 1].sorted = true;\r\n };\r\n Skeleton.prototype.sortPathConstraint = function (constraint) {\r\n constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n var slot = constraint.target;\r\n var slotIndex = slot.data.index;\r\n var slotBone = slot.bone;\r\n if (this.skin != null)\r\n this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\r\n if (this.data.defaultSkin != null && this.data.defaultSkin != this.skin)\r\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\r\n for (var i = 0, n = this.data.skins.length; i < n; i++)\r\n this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.PathAttachment)\r\n this.sortPathConstraintAttachmentWith(attachment, slotBone);\r\n var constrained = constraint.bones;\r\n var boneCount = constrained.length;\r\n for (var i = 0; i < boneCount; i++)\r\n this.sortBone(constrained[i]);\r\n this._updateCache.push(constraint);\r\n for (var i = 0; i < boneCount; i++)\r\n this.sortReset(constrained[i].children);\r\n for (var i = 0; i < boneCount; i++)\r\n constrained[i].sorted = true;\r\n };\r\n Skeleton.prototype.sortTransformConstraint = function (constraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n this.sortBone(constraint.target);\r\n var constrained = constraint.bones;\r\n var boneCount = constrained.length;\r\n if (constraint.data.local) {\r\n for (var i = 0; i < boneCount; i++) {\r\n var child = constrained[i];\r\n this.sortBone(child.parent);\r\n if (!(this._updateCache.indexOf(child) > -1))\r\n this.updateCacheReset.push(child);\r\n }\r\n }\r\n else {\r\n for (var i = 0; i < boneCount; i++) {\r\n this.sortBone(constrained[i]);\r\n }\r\n }\r\n this._updateCache.push(constraint);\r\n for (var ii = 0; ii < boneCount; ii++)\r\n this.sortReset(constrained[ii].children);\r\n for (var ii = 0; ii < boneCount; ii++)\r\n constrained[ii].sorted = true;\r\n };\r\n Skeleton.prototype.sortPathConstraintAttachment = function (skin, slotIndex, slotBone) {\r\n var attachments = skin.attachments[slotIndex];\r\n if (!attachments)\r\n return;\r\n for (var key in attachments) {\r\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\r\n }\r\n };\r\n Skeleton.prototype.sortPathConstraintAttachmentWith = function (attachment, slotBone) {\r\n if (!(attachment instanceof spine.PathAttachment))\r\n return;\r\n var pathBones = attachment.bones;\r\n if (pathBones == null)\r\n this.sortBone(slotBone);\r\n else {\r\n var bones = this.bones;\r\n var i = 0;\r\n while (i < pathBones.length) {\r\n var boneCount = pathBones[i++];\r\n for (var n = i + boneCount; i < n; i++) {\r\n var boneIndex = pathBones[i];\r\n this.sortBone(bones[boneIndex]);\r\n }\r\n }\r\n }\r\n };\r\n Skeleton.prototype.sortBone = function (bone) {\r\n if (bone.sorted)\r\n return;\r\n var parent = bone.parent;\r\n if (parent != null)\r\n this.sortBone(parent);\r\n bone.sorted = true;\r\n this._updateCache.push(bone);\r\n };\r\n Skeleton.prototype.sortReset = function (bones) {\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.active)\r\n continue;\r\n if (bone.sorted)\r\n this.sortReset(bone.children);\r\n bone.sorted = false;\r\n }\r\n };\r\n Skeleton.prototype.updateWorldTransform = function () {\r\n var updateCacheReset = this.updateCacheReset;\r\n for (var i = 0, n = updateCacheReset.length; i < n; i++) {\r\n var bone = updateCacheReset[i];\r\n bone.ax = bone.x;\r\n bone.ay = bone.y;\r\n bone.arotation = bone.rotation;\r\n bone.ascaleX = bone.scaleX;\r\n bone.ascaleY = bone.scaleY;\r\n bone.ashearX = bone.shearX;\r\n bone.ashearY = bone.shearY;\r\n bone.appliedValid = true;\r\n }\r\n var updateCache = this._updateCache;\r\n for (var i = 0, n = updateCache.length; i < n; i++)\r\n updateCache[i].update();\r\n };\r\n Skeleton.prototype.setToSetupPose = function () {\r\n this.setBonesToSetupPose();\r\n this.setSlotsToSetupPose();\r\n };\r\n Skeleton.prototype.setBonesToSetupPose = function () {\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n bones[i].setToSetupPose();\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var constraint = ikConstraints[i];\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n var data = constraint.data;\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n constraint.scaleMix = data.scaleMix;\r\n constraint.shearMix = data.shearMix;\r\n }\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n var data = constraint.data;\r\n constraint.position = data.position;\r\n constraint.spacing = data.spacing;\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n }\r\n };\r\n Skeleton.prototype.setSlotsToSetupPose = function () {\r\n var slots = this.slots;\r\n spine.Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n slots[i].setToSetupPose();\r\n };\r\n Skeleton.prototype.getRootBone = function () {\r\n if (this.bones.length == 0)\r\n return null;\r\n return this.bones[0];\r\n };\r\n Skeleton.prototype.findBone = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (bone.data.name == boneName)\r\n return bone;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findBoneIndex = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n if (bones[i].data.name == boneName)\r\n return i;\r\n return -1;\r\n };\r\n Skeleton.prototype.findSlot = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.data.name == slotName)\r\n return slot;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findSlotIndex = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n if (slots[i].data.name == slotName)\r\n return i;\r\n return -1;\r\n };\r\n Skeleton.prototype.setSkinByName = function (skinName) {\r\n var skin = this.data.findSkin(skinName);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + skinName);\r\n this.setSkin(skin);\r\n };\r\n Skeleton.prototype.setSkin = function (newSkin) {\r\n if (newSkin == this.skin)\r\n return;\r\n if (newSkin != null) {\r\n if (this.skin != null)\r\n newSkin.attachAll(this, this.skin);\r\n else {\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n var name_1 = slot.data.attachmentName;\r\n if (name_1 != null) {\r\n var attachment = newSkin.getAttachment(i, name_1);\r\n if (attachment != null)\r\n slot.setAttachment(attachment);\r\n }\r\n }\r\n }\r\n }\r\n this.skin = newSkin;\r\n this.updateCache();\r\n };\r\n Skeleton.prototype.getAttachmentByName = function (slotName, attachmentName) {\r\n return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName);\r\n };\r\n Skeleton.prototype.getAttachment = function (slotIndex, attachmentName) {\r\n if (attachmentName == null)\r\n throw new Error(\"attachmentName cannot be null.\");\r\n if (this.skin != null) {\r\n var attachment = this.skin.getAttachment(slotIndex, attachmentName);\r\n if (attachment != null)\r\n return attachment;\r\n }\r\n if (this.data.defaultSkin != null)\r\n return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\r\n return null;\r\n };\r\n Skeleton.prototype.setAttachment = function (slotName, attachmentName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.data.name == slotName) {\r\n var attachment = null;\r\n if (attachmentName != null) {\r\n attachment = this.getAttachment(i, attachmentName);\r\n if (attachment == null)\r\n throw new Error(\"Attachment not found: \" + attachmentName + \", for slot: \" + slotName);\r\n }\r\n slot.setAttachment(attachment);\r\n return;\r\n }\r\n }\r\n throw new Error(\"Slot not found: \" + slotName);\r\n };\r\n Skeleton.prototype.findIkConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var ikConstraint = ikConstraints[i];\r\n if (ikConstraint.data.name == constraintName)\r\n return ikConstraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findTransformConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n if (constraint.data.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findPathConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n if (constraint.data.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.getBounds = function (offset, size, temp) {\r\n if (temp === void 0) { temp = new Array(2); }\r\n if (offset == null)\r\n throw new Error(\"offset cannot be null.\");\r\n if (size == null)\r\n throw new Error(\"size cannot be null.\");\r\n var drawOrder = this.drawOrder;\r\n var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var slot = drawOrder[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var verticesLength = 0;\r\n var vertices = null;\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.RegionAttachment) {\r\n verticesLength = 8;\r\n vertices = spine.Utils.setArraySize(temp, verticesLength, 0);\r\n attachment.computeWorldVertices(slot.bone, vertices, 0, 2);\r\n }\r\n else if (attachment instanceof spine.MeshAttachment) {\r\n var mesh = attachment;\r\n verticesLength = mesh.worldVerticesLength;\r\n vertices = spine.Utils.setArraySize(temp, verticesLength, 0);\r\n mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\r\n }\r\n if (vertices != null) {\r\n for (var ii = 0, nn = vertices.length; ii < nn; ii += 2) {\r\n var x = vertices[ii], y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n }\r\n offset.set(minX, minY);\r\n size.set(maxX - minX, maxY - minY);\r\n };\r\n Skeleton.prototype.update = function (delta) {\r\n this.time += delta;\r\n };\r\n return Skeleton;\r\n }());\r\n spine.Skeleton = Skeleton;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonBinary = (function () {\r\n function SkeletonBinary(attachmentLoader) {\r\n this.scale = 1;\r\n this.linkedMeshes = new Array();\r\n this.attachmentLoader = attachmentLoader;\r\n }\r\n SkeletonBinary.prototype.readSkeletonData = function (binary) {\r\n var scale = this.scale;\r\n var skeletonData = new spine.SkeletonData();\r\n skeletonData.name = \"\";\r\n var input = new BinaryInput(binary);\r\n skeletonData.hash = input.readString();\r\n skeletonData.version = input.readString();\r\n if (\"3.8.75\" == skeletonData.version)\r\n throw new Error(\"Unsupported skeleton data, please export with a newer version of Spine.\");\r\n skeletonData.x = input.readFloat();\r\n skeletonData.y = input.readFloat();\r\n skeletonData.width = input.readFloat();\r\n skeletonData.height = input.readFloat();\r\n var nonessential = input.readBoolean();\r\n if (nonessential) {\r\n skeletonData.fps = input.readFloat();\r\n skeletonData.imagesPath = input.readString();\r\n skeletonData.audioPath = input.readString();\r\n }\r\n var n = 0;\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++)\r\n input.strings.push(input.readString());\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var name_2 = input.readString();\r\n var parent_2 = i == 0 ? null : skeletonData.bones[input.readInt(true)];\r\n var data = new spine.BoneData(i, name_2, parent_2);\r\n data.rotation = input.readFloat();\r\n data.x = input.readFloat() * scale;\r\n data.y = input.readFloat() * scale;\r\n data.scaleX = input.readFloat();\r\n data.scaleY = input.readFloat();\r\n data.shearX = input.readFloat();\r\n data.shearY = input.readFloat();\r\n data.length = input.readFloat() * scale;\r\n data.transformMode = SkeletonBinary.TransformModeValues[input.readInt(true)];\r\n data.skinRequired = input.readBoolean();\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(data.color, input.readInt32());\r\n skeletonData.bones.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var slotName = input.readString();\r\n var boneData = skeletonData.bones[input.readInt(true)];\r\n var data = new spine.SlotData(i, slotName, boneData);\r\n spine.Color.rgba8888ToColor(data.color, input.readInt32());\r\n var darkColor = input.readInt32();\r\n if (darkColor != -1)\r\n spine.Color.rgb888ToColor(data.darkColor = new spine.Color(), darkColor);\r\n data.attachmentName = input.readStringRef();\r\n data.blendMode = SkeletonBinary.BlendModeValues[input.readInt(true)];\r\n skeletonData.slots.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.IkConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.bones[input.readInt(true)];\r\n data.mix = input.readFloat();\r\n data.softness = input.readFloat() * scale;\r\n data.bendDirection = input.readByte();\r\n data.compress = input.readBoolean();\r\n data.stretch = input.readBoolean();\r\n data.uniform = input.readBoolean();\r\n skeletonData.ikConstraints.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.TransformConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.bones[input.readInt(true)];\r\n data.local = input.readBoolean();\r\n data.relative = input.readBoolean();\r\n data.offsetRotation = input.readFloat();\r\n data.offsetX = input.readFloat() * scale;\r\n data.offsetY = input.readFloat() * scale;\r\n data.offsetScaleX = input.readFloat();\r\n data.offsetScaleY = input.readFloat();\r\n data.offsetShearY = input.readFloat();\r\n data.rotateMix = input.readFloat();\r\n data.translateMix = input.readFloat();\r\n data.scaleMix = input.readFloat();\r\n data.shearMix = input.readFloat();\r\n skeletonData.transformConstraints.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.PathConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.slots[input.readInt(true)];\r\n data.positionMode = SkeletonBinary.PositionModeValues[input.readInt(true)];\r\n data.spacingMode = SkeletonBinary.SpacingModeValues[input.readInt(true)];\r\n data.rotateMode = SkeletonBinary.RotateModeValues[input.readInt(true)];\r\n data.offsetRotation = input.readFloat();\r\n data.position = input.readFloat();\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n data.position *= scale;\r\n data.spacing = input.readFloat();\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n data.spacing *= scale;\r\n data.rotateMix = input.readFloat();\r\n data.translateMix = input.readFloat();\r\n skeletonData.pathConstraints.push(data);\r\n }\r\n var defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\r\n if (defaultSkin != null) {\r\n skeletonData.defaultSkin = defaultSkin;\r\n skeletonData.skins.push(defaultSkin);\r\n }\r\n {\r\n var i = skeletonData.skins.length;\r\n spine.Utils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\r\n for (; i < n; i++)\r\n skeletonData.skins[i] = this.readSkin(input, skeletonData, false, nonessential);\r\n }\r\n n = this.linkedMeshes.length;\r\n for (var i = 0; i < n; i++) {\r\n var linkedMesh = this.linkedMeshes[i];\r\n var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + linkedMesh.skin);\r\n var parent_3 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n if (parent_3 == null)\r\n throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\r\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_3 : linkedMesh.mesh;\r\n linkedMesh.mesh.setParentMesh(parent_3);\r\n linkedMesh.mesh.updateUVs();\r\n }\r\n this.linkedMeshes.length = 0;\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var data = new spine.EventData(input.readStringRef());\r\n data.intValue = input.readInt(false);\r\n data.floatValue = input.readFloat();\r\n data.stringValue = input.readString();\r\n data.audioPath = input.readString();\r\n if (data.audioPath != null) {\r\n data.volume = input.readFloat();\r\n data.balance = input.readFloat();\r\n }\r\n skeletonData.events.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++)\r\n skeletonData.animations.push(this.readAnimation(input, input.readString(), skeletonData));\r\n return skeletonData;\r\n };\r\n SkeletonBinary.prototype.readSkin = function (input, skeletonData, defaultSkin, nonessential) {\r\n var skin = null;\r\n var slotCount = 0;\r\n if (defaultSkin) {\r\n slotCount = input.readInt(true);\r\n if (slotCount == 0)\r\n return null;\r\n skin = new spine.Skin(\"default\");\r\n }\r\n else {\r\n skin = new spine.Skin(input.readStringRef());\r\n skin.bones.length = input.readInt(true);\r\n for (var i = 0, n = skin.bones.length; i < n; i++)\r\n skin.bones[i] = skeletonData.bones[input.readInt(true)];\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.pathConstraints[input.readInt(true)]);\r\n slotCount = input.readInt(true);\r\n }\r\n for (var i = 0; i < slotCount; i++) {\r\n var slotIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var name_3 = input.readStringRef();\r\n var attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name_3, nonessential);\r\n if (attachment != null)\r\n skin.setAttachment(slotIndex, name_3, attachment);\r\n }\r\n }\r\n return skin;\r\n };\r\n SkeletonBinary.prototype.readAttachment = function (input, skeletonData, skin, slotIndex, attachmentName, nonessential) {\r\n var scale = this.scale;\r\n var name = input.readStringRef();\r\n if (name == null)\r\n name = attachmentName;\r\n var typeIndex = input.readByte();\r\n var type = SkeletonBinary.AttachmentTypeValues[typeIndex];\r\n switch (type) {\r\n case spine.AttachmentType.Region: {\r\n var path = input.readStringRef();\r\n var rotation = input.readFloat();\r\n var x = input.readFloat();\r\n var y = input.readFloat();\r\n var scaleX = input.readFloat();\r\n var scaleY = input.readFloat();\r\n var width = input.readFloat();\r\n var height = input.readFloat();\r\n var color = input.readInt32();\r\n if (path == null)\r\n path = name;\r\n var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\r\n if (region == null)\r\n return null;\r\n region.path = path;\r\n region.x = x * scale;\r\n region.y = y * scale;\r\n region.scaleX = scaleX;\r\n region.scaleY = scaleY;\r\n region.rotation = rotation;\r\n region.width = width * scale;\r\n region.height = height * scale;\r\n spine.Color.rgba8888ToColor(region.color, color);\r\n region.updateOffset();\r\n return region;\r\n }\r\n case spine.AttachmentType.BoundingBox: {\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var color = nonessential ? input.readInt32() : 0;\r\n var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n if (box == null)\r\n return null;\r\n box.worldVerticesLength = vertexCount << 1;\r\n box.vertices = vertices.vertices;\r\n box.bones = vertices.bones;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(box.color, color);\r\n return box;\r\n }\r\n case spine.AttachmentType.Mesh: {\r\n var path = input.readStringRef();\r\n var color = input.readInt32();\r\n var vertexCount = input.readInt(true);\r\n var uvs = this.readFloatArray(input, vertexCount << 1, 1);\r\n var triangles = this.readShortArray(input);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var hullLength = input.readInt(true);\r\n var edges = null;\r\n var width = 0, height = 0;\r\n if (nonessential) {\r\n edges = this.readShortArray(input);\r\n width = input.readFloat();\r\n height = input.readFloat();\r\n }\r\n if (path == null)\r\n path = name;\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n spine.Color.rgba8888ToColor(mesh.color, color);\r\n mesh.bones = vertices.bones;\r\n mesh.vertices = vertices.vertices;\r\n mesh.worldVerticesLength = vertexCount << 1;\r\n mesh.triangles = triangles;\r\n mesh.regionUVs = uvs;\r\n mesh.updateUVs();\r\n mesh.hullLength = hullLength << 1;\r\n if (nonessential) {\r\n mesh.edges = edges;\r\n mesh.width = width * scale;\r\n mesh.height = height * scale;\r\n }\r\n return mesh;\r\n }\r\n case spine.AttachmentType.LinkedMesh: {\r\n var path = input.readStringRef();\r\n var color = input.readInt32();\r\n var skinName = input.readStringRef();\r\n var parent_4 = input.readStringRef();\r\n var inheritDeform = input.readBoolean();\r\n var width = 0, height = 0;\r\n if (nonessential) {\r\n width = input.readFloat();\r\n height = input.readFloat();\r\n }\r\n if (path == null)\r\n path = name;\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n spine.Color.rgba8888ToColor(mesh.color, color);\r\n if (nonessential) {\r\n mesh.width = width * scale;\r\n mesh.height = height * scale;\r\n }\r\n this.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent_4, inheritDeform));\r\n return mesh;\r\n }\r\n case spine.AttachmentType.Path: {\r\n var closed_1 = input.readBoolean();\r\n var constantSpeed = input.readBoolean();\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var lengths = spine.Utils.newArray(vertexCount / 3, 0);\r\n for (var i = 0, n = lengths.length; i < n; i++)\r\n lengths[i] = input.readFloat() * scale;\r\n var color = nonessential ? input.readInt32() : 0;\r\n var path = this.attachmentLoader.newPathAttachment(skin, name);\r\n if (path == null)\r\n return null;\r\n path.closed = closed_1;\r\n path.constantSpeed = constantSpeed;\r\n path.worldVerticesLength = vertexCount << 1;\r\n path.vertices = vertices.vertices;\r\n path.bones = vertices.bones;\r\n path.lengths = lengths;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(path.color, color);\r\n return path;\r\n }\r\n case spine.AttachmentType.Point: {\r\n var rotation = input.readFloat();\r\n var x = input.readFloat();\r\n var y = input.readFloat();\r\n var color = nonessential ? input.readInt32() : 0;\r\n var point = this.attachmentLoader.newPointAttachment(skin, name);\r\n if (point == null)\r\n return null;\r\n point.x = x * scale;\r\n point.y = y * scale;\r\n point.rotation = rotation;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(point.color, color);\r\n return point;\r\n }\r\n case spine.AttachmentType.Clipping: {\r\n var endSlotIndex = input.readInt(true);\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var color = nonessential ? input.readInt32() : 0;\r\n var clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n if (clip == null)\r\n return null;\r\n clip.endSlot = skeletonData.slots[endSlotIndex];\r\n clip.worldVerticesLength = vertexCount << 1;\r\n clip.vertices = vertices.vertices;\r\n clip.bones = vertices.bones;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(clip.color, color);\r\n return clip;\r\n }\r\n }\r\n return null;\r\n };\r\n SkeletonBinary.prototype.readVertices = function (input, vertexCount) {\r\n var verticesLength = vertexCount << 1;\r\n var vertices = new Vertices();\r\n var scale = this.scale;\r\n if (!input.readBoolean()) {\r\n vertices.vertices = this.readFloatArray(input, verticesLength, scale);\r\n return vertices;\r\n }\r\n var weights = new Array();\r\n var bonesArray = new Array();\r\n for (var i = 0; i < vertexCount; i++) {\r\n var boneCount = input.readInt(true);\r\n bonesArray.push(boneCount);\r\n for (var ii = 0; ii < boneCount; ii++) {\r\n bonesArray.push(input.readInt(true));\r\n weights.push(input.readFloat() * scale);\r\n weights.push(input.readFloat() * scale);\r\n weights.push(input.readFloat());\r\n }\r\n }\r\n vertices.vertices = spine.Utils.toFloatArray(weights);\r\n vertices.bones = bonesArray;\r\n return vertices;\r\n };\r\n SkeletonBinary.prototype.readFloatArray = function (input, n, scale) {\r\n var array = new Array(n);\r\n if (scale == 1) {\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readFloat();\r\n }\r\n else {\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readFloat() * scale;\r\n }\r\n return array;\r\n };\r\n SkeletonBinary.prototype.readShortArray = function (input) {\r\n var n = input.readInt(true);\r\n var array = new Array(n);\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readShort();\r\n return array;\r\n };\r\n SkeletonBinary.prototype.readAnimation = function (input, name, skeletonData) {\r\n var timelines = new Array();\r\n var scale = this.scale;\r\n var duration = 0;\r\n var tempColor1 = new spine.Color();\r\n var tempColor2 = new spine.Color();\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var slotIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.SLOT_ATTACHMENT: {\r\n var timeline = new spine.AttachmentTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++)\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readStringRef());\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[frameCount - 1]);\r\n break;\r\n }\r\n case SkeletonBinary.SLOT_COLOR: {\r\n var timeline = new spine.ColorTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n spine.Color.rgba8888ToColor(tempColor1, input.readInt32());\r\n timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.ColorTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.SLOT_TWO_COLOR: {\r\n var timeline = new spine.TwoColorTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n spine.Color.rgba8888ToColor(tempColor1, input.readInt32());\r\n spine.Color.rgb888ToColor(tempColor2, input.readInt32());\r\n timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a, tempColor2.r, tempColor2.g, tempColor2.b);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TwoColorTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var boneIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.BONE_ROTATE: {\r\n var timeline = new spine.RotateTimeline(frameCount);\r\n timeline.boneIndex = boneIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.RotateTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.BONE_TRANSLATE:\r\n case SkeletonBinary.BONE_SCALE:\r\n case SkeletonBinary.BONE_SHEAR: {\r\n var timeline = void 0;\r\n var timelineScale = 1;\r\n if (timelineType == SkeletonBinary.BONE_SCALE)\r\n timeline = new spine.ScaleTimeline(frameCount);\r\n else if (timelineType == SkeletonBinary.BONE_SHEAR)\r\n timeline = new spine.ShearTimeline(frameCount);\r\n else {\r\n timeline = new spine.TranslateTimeline(frameCount);\r\n timelineScale = scale;\r\n }\r\n timeline.boneIndex = boneIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale, input.readFloat() * timelineScale);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TranslateTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.IkConstraintTimeline(frameCount);\r\n timeline.ikConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat() * scale, input.readByte(), input.readBoolean(), input.readBoolean());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.IkConstraintTimeline.ENTRIES]);\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.TransformConstraintTimeline(frameCount);\r\n timeline.transformConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TransformConstraintTimeline.ENTRIES]);\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var data = skeletonData.pathConstraints[index];\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.PATH_POSITION:\r\n case SkeletonBinary.PATH_SPACING: {\r\n var timeline = void 0;\r\n var timelineScale = 1;\r\n if (timelineType == SkeletonBinary.PATH_SPACING) {\r\n timeline = new spine.PathConstraintSpacingTimeline(frameCount);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n else {\r\n timeline = new spine.PathConstraintPositionTimeline(frameCount);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n timeline.pathConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.PATH_MIX: {\r\n var timeline = new spine.PathConstraintMixTimeline(frameCount);\r\n timeline.pathConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var skin = skeletonData.skins[input.readInt(true)];\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var slotIndex = input.readInt(true);\r\n for (var iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\r\n var attachment = skin.getAttachment(slotIndex, input.readStringRef());\r\n var weighted = attachment.bones != null;\r\n var vertices = attachment.vertices;\r\n var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.DeformTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n timeline.attachment = attachment;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n var deform = void 0;\r\n var end = input.readInt(true);\r\n if (end == 0)\r\n deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\r\n else {\r\n deform = spine.Utils.newFloatArray(deformLength);\r\n var start = input.readInt(true);\r\n end += start;\r\n if (scale == 1) {\r\n for (var v = start; v < end; v++)\r\n deform[v] = input.readFloat();\r\n }\r\n else {\r\n for (var v = start; v < end; v++)\r\n deform[v] = input.readFloat() * scale;\r\n }\r\n if (!weighted) {\r\n for (var v = 0, vn = deform.length; v < vn; v++)\r\n deform[v] += vertices[v];\r\n }\r\n }\r\n timeline.setFrame(frameIndex, time, deform);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[frameCount - 1]);\r\n }\r\n }\r\n }\r\n var drawOrderCount = input.readInt(true);\r\n if (drawOrderCount > 0) {\r\n var timeline = new spine.DrawOrderTimeline(drawOrderCount);\r\n var slotCount = skeletonData.slots.length;\r\n for (var i = 0; i < drawOrderCount; i++) {\r\n var time = input.readFloat();\r\n var offsetCount = input.readInt(true);\r\n var drawOrder = spine.Utils.newArray(slotCount, 0);\r\n for (var ii = slotCount - 1; ii >= 0; ii--)\r\n drawOrder[ii] = -1;\r\n var unchanged = spine.Utils.newArray(slotCount - offsetCount, 0);\r\n var originalIndex = 0, unchangedIndex = 0;\r\n for (var ii = 0; ii < offsetCount; ii++) {\r\n var slotIndex = input.readInt(true);\r\n while (originalIndex != slotIndex)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n drawOrder[originalIndex + input.readInt(true)] = originalIndex++;\r\n }\r\n while (originalIndex < slotCount)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n for (var ii = slotCount - 1; ii >= 0; ii--)\r\n if (drawOrder[ii] == -1)\r\n drawOrder[ii] = unchanged[--unchangedIndex];\r\n timeline.setFrame(i, time, drawOrder);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[drawOrderCount - 1]);\r\n }\r\n var eventCount = input.readInt(true);\r\n if (eventCount > 0) {\r\n var timeline = new spine.EventTimeline(eventCount);\r\n for (var i = 0; i < eventCount; i++) {\r\n var time = input.readFloat();\r\n var eventData = skeletonData.events[input.readInt(true)];\r\n var event_4 = new spine.Event(time, eventData);\r\n event_4.intValue = input.readInt(false);\r\n event_4.floatValue = input.readFloat();\r\n event_4.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\r\n if (event_4.data.audioPath != null) {\r\n event_4.volume = input.readFloat();\r\n event_4.balance = input.readFloat();\r\n }\r\n timeline.setFrame(i, event_4);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[eventCount - 1]);\r\n }\r\n return new spine.Animation(name, timelines, duration);\r\n };\r\n SkeletonBinary.prototype.readCurve = function (input, frameIndex, timeline) {\r\n switch (input.readByte()) {\r\n case SkeletonBinary.CURVE_STEPPED:\r\n timeline.setStepped(frameIndex);\r\n break;\r\n case SkeletonBinary.CURVE_BEZIER:\r\n this.setCurve(timeline, frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\r\n break;\r\n }\r\n };\r\n SkeletonBinary.prototype.setCurve = function (timeline, frameIndex, cx1, cy1, cx2, cy2) {\r\n timeline.setCurve(frameIndex, cx1, cy1, cx2, cy2);\r\n };\r\n SkeletonBinary.AttachmentTypeValues = [0, 1, 2, 3, 4, 5, 6];\r\n SkeletonBinary.TransformModeValues = [spine.TransformMode.Normal, spine.TransformMode.OnlyTranslation, spine.TransformMode.NoRotationOrReflection, spine.TransformMode.NoScale, spine.TransformMode.NoScaleOrReflection];\r\n SkeletonBinary.PositionModeValues = [spine.PositionMode.Fixed, spine.PositionMode.Percent];\r\n SkeletonBinary.SpacingModeValues = [spine.SpacingMode.Length, spine.SpacingMode.Fixed, spine.SpacingMode.Percent];\r\n SkeletonBinary.RotateModeValues = [spine.RotateMode.Tangent, spine.RotateMode.Chain, spine.RotateMode.ChainScale];\r\n SkeletonBinary.BlendModeValues = [spine.BlendMode.Normal, spine.BlendMode.Additive, spine.BlendMode.Multiply, spine.BlendMode.Screen];\r\n SkeletonBinary.BONE_ROTATE = 0;\r\n SkeletonBinary.BONE_TRANSLATE = 1;\r\n SkeletonBinary.BONE_SCALE = 2;\r\n SkeletonBinary.BONE_SHEAR = 3;\r\n SkeletonBinary.SLOT_ATTACHMENT = 0;\r\n SkeletonBinary.SLOT_COLOR = 1;\r\n SkeletonBinary.SLOT_TWO_COLOR = 2;\r\n SkeletonBinary.PATH_POSITION = 0;\r\n SkeletonBinary.PATH_SPACING = 1;\r\n SkeletonBinary.PATH_MIX = 2;\r\n SkeletonBinary.CURVE_LINEAR = 0;\r\n SkeletonBinary.CURVE_STEPPED = 1;\r\n SkeletonBinary.CURVE_BEZIER = 2;\r\n return SkeletonBinary;\r\n }());\r\n spine.SkeletonBinary = SkeletonBinary;\r\n var BinaryInput = (function () {\r\n function BinaryInput(data, strings, index, buffer) {\r\n if (strings === void 0) { strings = new Array(); }\r\n if (index === void 0) { index = 0; }\r\n if (buffer === void 0) { buffer = new DataView(data.buffer); }\r\n this.strings = strings;\r\n this.index = index;\r\n this.buffer = buffer;\r\n }\r\n BinaryInput.prototype.readByte = function () {\r\n return this.buffer.getInt8(this.index++);\r\n };\r\n BinaryInput.prototype.readShort = function () {\r\n var value = this.buffer.getInt16(this.index);\r\n this.index += 2;\r\n return value;\r\n };\r\n BinaryInput.prototype.readInt32 = function () {\r\n var value = this.buffer.getInt32(this.index);\r\n this.index += 4;\r\n return value;\r\n };\r\n BinaryInput.prototype.readInt = function (optimizePositive) {\r\n var b = this.readByte();\r\n var result = b & 0x7F;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 7;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 14;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 21;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 28;\r\n }\r\n }\r\n }\r\n }\r\n return optimizePositive ? result : ((result >>> 1) ^ -(result & 1));\r\n };\r\n BinaryInput.prototype.readStringRef = function () {\r\n var index = this.readInt(true);\r\n return index == 0 ? null : this.strings[index - 1];\r\n };\r\n BinaryInput.prototype.readString = function () {\r\n var byteCount = this.readInt(true);\r\n switch (byteCount) {\r\n case 0:\r\n return null;\r\n case 1:\r\n return \"\";\r\n }\r\n byteCount--;\r\n var chars = \"\";\r\n var charCount = 0;\r\n for (var i = 0; i < byteCount;) {\r\n var b = this.readByte();\r\n switch (b >> 4) {\r\n case 12:\r\n case 13:\r\n chars += String.fromCharCode(((b & 0x1F) << 6 | this.readByte() & 0x3F));\r\n i += 2;\r\n break;\r\n case 14:\r\n chars += String.fromCharCode(((b & 0x0F) << 12 | (this.readByte() & 0x3F) << 6 | this.readByte() & 0x3F));\r\n i += 3;\r\n break;\r\n default:\r\n chars += String.fromCharCode(b);\r\n i++;\r\n }\r\n }\r\n return chars;\r\n };\r\n BinaryInput.prototype.readFloat = function () {\r\n var value = this.buffer.getFloat32(this.index);\r\n this.index += 4;\r\n return value;\r\n };\r\n BinaryInput.prototype.readBoolean = function () {\r\n return this.readByte() != 0;\r\n };\r\n return BinaryInput;\r\n }());\r\n var LinkedMesh = (function () {\r\n function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\r\n this.mesh = mesh;\r\n this.skin = skin;\r\n this.slotIndex = slotIndex;\r\n this.parent = parent;\r\n this.inheritDeform = inheritDeform;\r\n }\r\n return LinkedMesh;\r\n }());\r\n var Vertices = (function () {\r\n function Vertices(bones, vertices) {\r\n if (bones === void 0) { bones = null; }\r\n if (vertices === void 0) { vertices = null; }\r\n this.bones = bones;\r\n this.vertices = vertices;\r\n }\r\n return Vertices;\r\n }());\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonBounds = (function () {\r\n function SkeletonBounds() {\r\n this.minX = 0;\r\n this.minY = 0;\r\n this.maxX = 0;\r\n this.maxY = 0;\r\n this.boundingBoxes = new Array();\r\n this.polygons = new Array();\r\n this.polygonPool = new spine.Pool(function () {\r\n return spine.Utils.newFloatArray(16);\r\n });\r\n }\r\n SkeletonBounds.prototype.update = function (skeleton, updateAabb) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n var boundingBoxes = this.boundingBoxes;\r\n var polygons = this.polygons;\r\n var polygonPool = this.polygonPool;\r\n var slots = skeleton.slots;\r\n var slotCount = slots.length;\r\n boundingBoxes.length = 0;\r\n polygonPool.freeAll(polygons);\r\n polygons.length = 0;\r\n for (var i = 0; i < slotCount; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.BoundingBoxAttachment) {\r\n var boundingBox = attachment;\r\n boundingBoxes.push(boundingBox);\r\n var polygon = polygonPool.obtain();\r\n if (polygon.length != boundingBox.worldVerticesLength) {\r\n polygon = spine.Utils.newFloatArray(boundingBox.worldVerticesLength);\r\n }\r\n polygons.push(polygon);\r\n boundingBox.computeWorldVertices(slot, 0, boundingBox.worldVerticesLength, polygon, 0, 2);\r\n }\r\n }\r\n if (updateAabb) {\r\n this.aabbCompute();\r\n }\r\n else {\r\n this.minX = Number.POSITIVE_INFINITY;\r\n this.minY = Number.POSITIVE_INFINITY;\r\n this.maxX = Number.NEGATIVE_INFINITY;\r\n this.maxY = Number.NEGATIVE_INFINITY;\r\n }\r\n };\r\n SkeletonBounds.prototype.aabbCompute = function () {\r\n var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++) {\r\n var polygon = polygons[i];\r\n var vertices = polygon;\r\n for (var ii = 0, nn = polygon.length; ii < nn; ii += 2) {\r\n var x = vertices[ii];\r\n var y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n this.minX = minX;\r\n this.minY = minY;\r\n this.maxX = maxX;\r\n this.maxY = maxY;\r\n };\r\n SkeletonBounds.prototype.aabbContainsPoint = function (x, y) {\r\n return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\r\n };\r\n SkeletonBounds.prototype.aabbIntersectsSegment = function (x1, y1, x2, y2) {\r\n var minX = this.minX;\r\n var minY = this.minY;\r\n var maxX = this.maxX;\r\n var maxY = this.maxY;\r\n if ((x1 <= minX && x2 <= minX) || (y1 <= minY && y2 <= minY) || (x1 >= maxX && x2 >= maxX) || (y1 >= maxY && y2 >= maxY))\r\n return false;\r\n var m = (y2 - y1) / (x2 - x1);\r\n var y = m * (minX - x1) + y1;\r\n if (y > minY && y < maxY)\r\n return true;\r\n y = m * (maxX - x1) + y1;\r\n if (y > minY && y < maxY)\r\n return true;\r\n var x = (minY - y1) / m + x1;\r\n if (x > minX && x < maxX)\r\n return true;\r\n x = (maxY - y1) / m + x1;\r\n if (x > minX && x < maxX)\r\n return true;\r\n return false;\r\n };\r\n SkeletonBounds.prototype.aabbIntersectsSkeleton = function (bounds) {\r\n return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\r\n };\r\n SkeletonBounds.prototype.containsPoint = function (x, y) {\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++)\r\n if (this.containsPointPolygon(polygons[i], x, y))\r\n return this.boundingBoxes[i];\r\n return null;\r\n };\r\n SkeletonBounds.prototype.containsPointPolygon = function (polygon, x, y) {\r\n var vertices = polygon;\r\n var nn = polygon.length;\r\n var prevIndex = nn - 2;\r\n var inside = false;\r\n for (var ii = 0; ii < nn; ii += 2) {\r\n var vertexY = vertices[ii + 1];\r\n var prevY = vertices[prevIndex + 1];\r\n if ((vertexY < y && prevY >= y) || (prevY < y && vertexY >= y)) {\r\n var vertexX = vertices[ii];\r\n if (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x)\r\n inside = !inside;\r\n }\r\n prevIndex = ii;\r\n }\r\n return inside;\r\n };\r\n SkeletonBounds.prototype.intersectsSegment = function (x1, y1, x2, y2) {\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++)\r\n if (this.intersectsSegmentPolygon(polygons[i], x1, y1, x2, y2))\r\n return this.boundingBoxes[i];\r\n return null;\r\n };\r\n SkeletonBounds.prototype.intersectsSegmentPolygon = function (polygon, x1, y1, x2, y2) {\r\n var vertices = polygon;\r\n var nn = polygon.length;\r\n var width12 = x1 - x2, height12 = y1 - y2;\r\n var det1 = x1 * y2 - y1 * x2;\r\n var x3 = vertices[nn - 2], y3 = vertices[nn - 1];\r\n for (var ii = 0; ii < nn; ii += 2) {\r\n var x4 = vertices[ii], y4 = vertices[ii + 1];\r\n var det2 = x3 * y4 - y3 * x4;\r\n var width34 = x3 - x4, height34 = y3 - y4;\r\n var det3 = width12 * height34 - height12 * width34;\r\n var x = (det1 * width34 - width12 * det2) / det3;\r\n if (((x >= x3 && x <= x4) || (x >= x4 && x <= x3)) && ((x >= x1 && x <= x2) || (x >= x2 && x <= x1))) {\r\n var y = (det1 * height34 - height12 * det2) / det3;\r\n if (((y >= y3 && y <= y4) || (y >= y4 && y <= y3)) && ((y >= y1 && y <= y2) || (y >= y2 && y <= y1)))\r\n return true;\r\n }\r\n x3 = x4;\r\n y3 = y4;\r\n }\r\n return false;\r\n };\r\n SkeletonBounds.prototype.getPolygon = function (boundingBox) {\r\n if (boundingBox == null)\r\n throw new Error(\"boundingBox cannot be null.\");\r\n var index = this.boundingBoxes.indexOf(boundingBox);\r\n return index == -1 ? null : this.polygons[index];\r\n };\r\n SkeletonBounds.prototype.getWidth = function () {\r\n return this.maxX - this.minX;\r\n };\r\n SkeletonBounds.prototype.getHeight = function () {\r\n return this.maxY - this.minY;\r\n };\r\n return SkeletonBounds;\r\n }());\r\n spine.SkeletonBounds = SkeletonBounds;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonClipping = (function () {\r\n function SkeletonClipping() {\r\n this.triangulator = new spine.Triangulator();\r\n this.clippingPolygon = new Array();\r\n this.clipOutput = new Array();\r\n this.clippedVertices = new Array();\r\n this.clippedTriangles = new Array();\r\n this.scratch = new Array();\r\n }\r\n SkeletonClipping.prototype.clipStart = function (slot, clip) {\r\n if (this.clipAttachment != null)\r\n return 0;\r\n this.clipAttachment = clip;\r\n var n = clip.worldVerticesLength;\r\n var vertices = spine.Utils.setArraySize(this.clippingPolygon, n);\r\n clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\r\n var clippingPolygon = this.clippingPolygon;\r\n SkeletonClipping.makeClockwise(clippingPolygon);\r\n var clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon));\r\n for (var i = 0, n_2 = clippingPolygons.length; i < n_2; i++) {\r\n var polygon = clippingPolygons[i];\r\n SkeletonClipping.makeClockwise(polygon);\r\n polygon.push(polygon[0]);\r\n polygon.push(polygon[1]);\r\n }\r\n return clippingPolygons.length;\r\n };\r\n SkeletonClipping.prototype.clipEndWithSlot = function (slot) {\r\n if (this.clipAttachment != null && this.clipAttachment.endSlot == slot.data)\r\n this.clipEnd();\r\n };\r\n SkeletonClipping.prototype.clipEnd = function () {\r\n if (this.clipAttachment == null)\r\n return;\r\n this.clipAttachment = null;\r\n this.clippingPolygons = null;\r\n this.clippedVertices.length = 0;\r\n this.clippedTriangles.length = 0;\r\n this.clippingPolygon.length = 0;\r\n };\r\n SkeletonClipping.prototype.isClipping = function () {\r\n return this.clipAttachment != null;\r\n };\r\n SkeletonClipping.prototype.clipTriangles = function (vertices, verticesLength, triangles, trianglesLength, uvs, light, dark, twoColor) {\r\n var clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;\r\n var clippedTriangles = this.clippedTriangles;\r\n var polygons = this.clippingPolygons;\r\n var polygonsCount = this.clippingPolygons.length;\r\n var vertexSize = twoColor ? 12 : 8;\r\n var index = 0;\r\n clippedVertices.length = 0;\r\n clippedTriangles.length = 0;\r\n outer: for (var i = 0; i < trianglesLength; i += 3) {\r\n var vertexOffset = triangles[i] << 1;\r\n var x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\r\n var u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];\r\n vertexOffset = triangles[i + 1] << 1;\r\n var x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\r\n var u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];\r\n vertexOffset = triangles[i + 2] << 1;\r\n var x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\r\n var u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];\r\n for (var p = 0; p < polygonsCount; p++) {\r\n var s = clippedVertices.length;\r\n if (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) {\r\n var clipOutputLength = clipOutput.length;\r\n if (clipOutputLength == 0)\r\n continue;\r\n var d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\r\n var d = 1 / (d0 * d2 + d1 * (y1 - y3));\r\n var clipOutputCount = clipOutputLength >> 1;\r\n var clipOutputItems = this.clipOutput;\r\n var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);\r\n for (var ii = 0; ii < clipOutputLength; ii += 2) {\r\n var x = clipOutputItems[ii], y = clipOutputItems[ii + 1];\r\n clippedVerticesItems[s] = x;\r\n clippedVerticesItems[s + 1] = y;\r\n clippedVerticesItems[s + 2] = light.r;\r\n clippedVerticesItems[s + 3] = light.g;\r\n clippedVerticesItems[s + 4] = light.b;\r\n clippedVerticesItems[s + 5] = light.a;\r\n var c0 = x - x3, c1 = y - y3;\r\n var a = (d0 * c0 + d1 * c1) * d;\r\n var b = (d4 * c0 + d2 * c1) * d;\r\n var c = 1 - a - b;\r\n clippedVerticesItems[s + 6] = u1 * a + u2 * b + u3 * c;\r\n clippedVerticesItems[s + 7] = v1 * a + v2 * b + v3 * c;\r\n if (twoColor) {\r\n clippedVerticesItems[s + 8] = dark.r;\r\n clippedVerticesItems[s + 9] = dark.g;\r\n clippedVerticesItems[s + 10] = dark.b;\r\n clippedVerticesItems[s + 11] = dark.a;\r\n }\r\n s += vertexSize;\r\n }\r\n s = clippedTriangles.length;\r\n var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));\r\n clipOutputCount--;\r\n for (var ii = 1; ii < clipOutputCount; ii++) {\r\n clippedTrianglesItems[s] = index;\r\n clippedTrianglesItems[s + 1] = (index + ii);\r\n clippedTrianglesItems[s + 2] = (index + ii + 1);\r\n s += 3;\r\n }\r\n index += clipOutputCount + 1;\r\n }\r\n else {\r\n var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + 3 * vertexSize);\r\n clippedVerticesItems[s] = x1;\r\n clippedVerticesItems[s + 1] = y1;\r\n clippedVerticesItems[s + 2] = light.r;\r\n clippedVerticesItems[s + 3] = light.g;\r\n clippedVerticesItems[s + 4] = light.b;\r\n clippedVerticesItems[s + 5] = light.a;\r\n if (!twoColor) {\r\n clippedVerticesItems[s + 6] = u1;\r\n clippedVerticesItems[s + 7] = v1;\r\n clippedVerticesItems[s + 8] = x2;\r\n clippedVerticesItems[s + 9] = y2;\r\n clippedVerticesItems[s + 10] = light.r;\r\n clippedVerticesItems[s + 11] = light.g;\r\n clippedVerticesItems[s + 12] = light.b;\r\n clippedVerticesItems[s + 13] = light.a;\r\n clippedVerticesItems[s + 14] = u2;\r\n clippedVerticesItems[s + 15] = v2;\r\n clippedVerticesItems[s + 16] = x3;\r\n clippedVerticesItems[s + 17] = y3;\r\n clippedVerticesItems[s + 18] = light.r;\r\n clippedVerticesItems[s + 19] = light.g;\r\n clippedVerticesItems[s + 20] = light.b;\r\n clippedVerticesItems[s + 21] = light.a;\r\n clippedVerticesItems[s + 22] = u3;\r\n clippedVerticesItems[s + 23] = v3;\r\n }\r\n else {\r\n clippedVerticesItems[s + 6] = u1;\r\n clippedVerticesItems[s + 7] = v1;\r\n clippedVerticesItems[s + 8] = dark.r;\r\n clippedVerticesItems[s + 9] = dark.g;\r\n clippedVerticesItems[s + 10] = dark.b;\r\n clippedVerticesItems[s + 11] = dark.a;\r\n clippedVerticesItems[s + 12] = x2;\r\n clippedVerticesItems[s + 13] = y2;\r\n clippedVerticesItems[s + 14] = light.r;\r\n clippedVerticesItems[s + 15] = light.g;\r\n clippedVerticesItems[s + 16] = light.b;\r\n clippedVerticesItems[s + 17] = light.a;\r\n clippedVerticesItems[s + 18] = u2;\r\n clippedVerticesItems[s + 19] = v2;\r\n clippedVerticesItems[s + 20] = dark.r;\r\n clippedVerticesItems[s + 21] = dark.g;\r\n clippedVerticesItems[s + 22] = dark.b;\r\n clippedVerticesItems[s + 23] = dark.a;\r\n clippedVerticesItems[s + 24] = x3;\r\n clippedVerticesItems[s + 25] = y3;\r\n clippedVerticesItems[s + 26] = light.r;\r\n clippedVerticesItems[s + 27] = light.g;\r\n clippedVerticesItems[s + 28] = light.b;\r\n clippedVerticesItems[s + 29] = light.a;\r\n clippedVerticesItems[s + 30] = u3;\r\n clippedVerticesItems[s + 31] = v3;\r\n clippedVerticesItems[s + 32] = dark.r;\r\n clippedVerticesItems[s + 33] = dark.g;\r\n clippedVerticesItems[s + 34] = dark.b;\r\n clippedVerticesItems[s + 35] = dark.a;\r\n }\r\n s = clippedTriangles.length;\r\n var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3);\r\n clippedTrianglesItems[s] = index;\r\n clippedTrianglesItems[s + 1] = (index + 1);\r\n clippedTrianglesItems[s + 2] = (index + 2);\r\n index += 3;\r\n continue outer;\r\n }\r\n }\r\n }\r\n };\r\n SkeletonClipping.prototype.clip = function (x1, y1, x2, y2, x3, y3, clippingArea, output) {\r\n var originalOutput = output;\r\n var clipped = false;\r\n var input = null;\r\n if (clippingArea.length % 4 >= 2) {\r\n input = output;\r\n output = this.scratch;\r\n }\r\n else\r\n input = this.scratch;\r\n input.length = 0;\r\n input.push(x1);\r\n input.push(y1);\r\n input.push(x2);\r\n input.push(y2);\r\n input.push(x3);\r\n input.push(y3);\r\n input.push(x1);\r\n input.push(y1);\r\n output.length = 0;\r\n var clippingVertices = clippingArea;\r\n var clippingVerticesLast = clippingArea.length - 4;\r\n for (var i = 0;; i += 2) {\r\n var edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\r\n var edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];\r\n var deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;\r\n var inputVertices = input;\r\n var inputVerticesLength = input.length - 2, outputStart = output.length;\r\n for (var ii = 0; ii < inputVerticesLength; ii += 2) {\r\n var inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\r\n var inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];\r\n var side2 = deltaX * (inputY2 - edgeY2) - deltaY * (inputX2 - edgeX2) > 0;\r\n if (deltaX * (inputY - edgeY2) - deltaY * (inputX - edgeX2) > 0) {\r\n if (side2) {\r\n output.push(inputX2);\r\n output.push(inputY2);\r\n continue;\r\n }\r\n var c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n var s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\r\n if (Math.abs(s) > 0.000001) {\r\n var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\r\n output.push(edgeX + (edgeX2 - edgeX) * ua);\r\n output.push(edgeY + (edgeY2 - edgeY) * ua);\r\n }\r\n else {\r\n output.push(edgeX);\r\n output.push(edgeY);\r\n }\r\n }\r\n else if (side2) {\r\n var c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n var s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\r\n if (Math.abs(s) > 0.000001) {\r\n var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\r\n output.push(edgeX + (edgeX2 - edgeX) * ua);\r\n output.push(edgeY + (edgeY2 - edgeY) * ua);\r\n }\r\n else {\r\n output.push(edgeX);\r\n output.push(edgeY);\r\n }\r\n output.push(inputX2);\r\n output.push(inputY2);\r\n }\r\n clipped = true;\r\n }\r\n if (outputStart == output.length) {\r\n originalOutput.length = 0;\r\n return true;\r\n }\r\n output.push(output[0]);\r\n output.push(output[1]);\r\n if (i == clippingVerticesLast)\r\n break;\r\n var temp = output;\r\n output = input;\r\n output.length = 0;\r\n input = temp;\r\n }\r\n if (originalOutput != output) {\r\n originalOutput.length = 0;\r\n for (var i = 0, n = output.length - 2; i < n; i++)\r\n originalOutput[i] = output[i];\r\n }\r\n else\r\n originalOutput.length = originalOutput.length - 2;\r\n return clipped;\r\n };\r\n SkeletonClipping.makeClockwise = function (polygon) {\r\n var vertices = polygon;\r\n var verticeslength = polygon.length;\r\n var area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0;\r\n for (var i = 0, n = verticeslength - 3; i < n; i += 2) {\r\n p1x = vertices[i];\r\n p1y = vertices[i + 1];\r\n p2x = vertices[i + 2];\r\n p2y = vertices[i + 3];\r\n area += p1x * p2y - p2x * p1y;\r\n }\r\n if (area < 0)\r\n return;\r\n for (var i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\r\n var x = vertices[i], y = vertices[i + 1];\r\n var other = lastX - i;\r\n vertices[i] = vertices[other];\r\n vertices[i + 1] = vertices[other + 1];\r\n vertices[other] = x;\r\n vertices[other + 1] = y;\r\n }\r\n };\r\n return SkeletonClipping;\r\n }());\r\n spine.SkeletonClipping = SkeletonClipping;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonData = (function () {\r\n function SkeletonData() {\r\n this.bones = new Array();\r\n this.slots = new Array();\r\n this.skins = new Array();\r\n this.events = new Array();\r\n this.animations = new Array();\r\n this.ikConstraints = new Array();\r\n this.transformConstraints = new Array();\r\n this.pathConstraints = new Array();\r\n this.fps = 0;\r\n }\r\n SkeletonData.prototype.findBone = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (bone.name == boneName)\r\n return bone;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findBoneIndex = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n if (bones[i].name == boneName)\r\n return i;\r\n return -1;\r\n };\r\n SkeletonData.prototype.findSlot = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.name == slotName)\r\n return slot;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findSlotIndex = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n if (slots[i].name == slotName)\r\n return i;\r\n return -1;\r\n };\r\n SkeletonData.prototype.findSkin = function (skinName) {\r\n if (skinName == null)\r\n throw new Error(\"skinName cannot be null.\");\r\n var skins = this.skins;\r\n for (var i = 0, n = skins.length; i < n; i++) {\r\n var skin = skins[i];\r\n if (skin.name == skinName)\r\n return skin;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findEvent = function (eventDataName) {\r\n if (eventDataName == null)\r\n throw new Error(\"eventDataName cannot be null.\");\r\n var events = this.events;\r\n for (var i = 0, n = events.length; i < n; i++) {\r\n var event_5 = events[i];\r\n if (event_5.name == eventDataName)\r\n return event_5;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findAnimation = function (animationName) {\r\n if (animationName == null)\r\n throw new Error(\"animationName cannot be null.\");\r\n var animations = this.animations;\r\n for (var i = 0, n = animations.length; i < n; i++) {\r\n var animation = animations[i];\r\n if (animation.name == animationName)\r\n return animation;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findIkConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var constraint = ikConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findTransformConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findPathConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findPathConstraintIndex = function (pathConstraintName) {\r\n if (pathConstraintName == null)\r\n throw new Error(\"pathConstraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++)\r\n if (pathConstraints[i].name == pathConstraintName)\r\n return i;\r\n return -1;\r\n };\r\n return SkeletonData;\r\n }());\r\n spine.SkeletonData = SkeletonData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonJson = (function () {\r\n function SkeletonJson(attachmentLoader) {\r\n this.scale = 1;\r\n this.linkedMeshes = new Array();\r\n this.attachmentLoader = attachmentLoader;\r\n }\r\n SkeletonJson.prototype.readSkeletonData = function (json) {\r\n var scale = this.scale;\r\n var skeletonData = new spine.SkeletonData();\r\n var root = typeof (json) === \"string\" ? JSON.parse(json) : json;\r\n var skeletonMap = root.skeleton;\r\n if (skeletonMap != null) {\r\n skeletonData.hash = skeletonMap.hash;\r\n skeletonData.version = skeletonMap.spine;\r\n if (\"3.8.75\" == skeletonData.version)\r\n throw new Error(\"Unsupported skeleton data, please export with a newer version of Spine.\");\r\n skeletonData.x = skeletonMap.x;\r\n skeletonData.y = skeletonMap.y;\r\n skeletonData.width = skeletonMap.width;\r\n skeletonData.height = skeletonMap.height;\r\n skeletonData.fps = skeletonMap.fps;\r\n skeletonData.imagesPath = skeletonMap.images;\r\n }\r\n if (root.bones) {\r\n for (var i = 0; i < root.bones.length; i++) {\r\n var boneMap = root.bones[i];\r\n var parent_5 = null;\r\n var parentName = this.getValue(boneMap, \"parent\", null);\r\n if (parentName != null) {\r\n parent_5 = skeletonData.findBone(parentName);\r\n if (parent_5 == null)\r\n throw new Error(\"Parent bone not found: \" + parentName);\r\n }\r\n var data = new spine.BoneData(skeletonData.bones.length, boneMap.name, parent_5);\r\n data.length = this.getValue(boneMap, \"length\", 0) * scale;\r\n data.x = this.getValue(boneMap, \"x\", 0) * scale;\r\n data.y = this.getValue(boneMap, \"y\", 0) * scale;\r\n data.rotation = this.getValue(boneMap, \"rotation\", 0);\r\n data.scaleX = this.getValue(boneMap, \"scaleX\", 1);\r\n data.scaleY = this.getValue(boneMap, \"scaleY\", 1);\r\n data.shearX = this.getValue(boneMap, \"shearX\", 0);\r\n data.shearY = this.getValue(boneMap, \"shearY\", 0);\r\n data.transformMode = SkeletonJson.transformModeFromString(this.getValue(boneMap, \"transform\", \"normal\"));\r\n data.skinRequired = this.getValue(boneMap, \"skin\", false);\r\n skeletonData.bones.push(data);\r\n }\r\n }\r\n if (root.slots) {\r\n for (var i = 0; i < root.slots.length; i++) {\r\n var slotMap = root.slots[i];\r\n var slotName = slotMap.name;\r\n var boneName = slotMap.bone;\r\n var boneData = skeletonData.findBone(boneName);\r\n if (boneData == null)\r\n throw new Error(\"Slot bone not found: \" + boneName);\r\n var data = new spine.SlotData(skeletonData.slots.length, slotName, boneData);\r\n var color = this.getValue(slotMap, \"color\", null);\r\n if (color != null)\r\n data.color.setFromString(color);\r\n var dark = this.getValue(slotMap, \"dark\", null);\r\n if (dark != null) {\r\n data.darkColor = new spine.Color(1, 1, 1, 1);\r\n data.darkColor.setFromString(dark);\r\n }\r\n data.attachmentName = this.getValue(slotMap, \"attachment\", null);\r\n data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, \"blend\", \"normal\"));\r\n skeletonData.slots.push(data);\r\n }\r\n }\r\n if (root.ik) {\r\n for (var i = 0; i < root.ik.length; i++) {\r\n var constraintMap = root.ik[i];\r\n var data = new spine.IkConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"IK bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findBone(targetName);\r\n if (data.target == null)\r\n throw new Error(\"IK target bone not found: \" + targetName);\r\n data.mix = this.getValue(constraintMap, \"mix\", 1);\r\n data.softness = this.getValue(constraintMap, \"softness\", 0) * scale;\r\n data.bendDirection = this.getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\r\n data.compress = this.getValue(constraintMap, \"compress\", false);\r\n data.stretch = this.getValue(constraintMap, \"stretch\", false);\r\n data.uniform = this.getValue(constraintMap, \"uniform\", false);\r\n skeletonData.ikConstraints.push(data);\r\n }\r\n }\r\n if (root.transform) {\r\n for (var i = 0; i < root.transform.length; i++) {\r\n var constraintMap = root.transform[i];\r\n var data = new spine.TransformConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"Transform constraint bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findBone(targetName);\r\n if (data.target == null)\r\n throw new Error(\"Transform constraint target bone not found: \" + targetName);\r\n data.local = this.getValue(constraintMap, \"local\", false);\r\n data.relative = this.getValue(constraintMap, \"relative\", false);\r\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\r\n data.offsetX = this.getValue(constraintMap, \"x\", 0) * scale;\r\n data.offsetY = this.getValue(constraintMap, \"y\", 0) * scale;\r\n data.offsetScaleX = this.getValue(constraintMap, \"scaleX\", 0);\r\n data.offsetScaleY = this.getValue(constraintMap, \"scaleY\", 0);\r\n data.offsetShearY = this.getValue(constraintMap, \"shearY\", 0);\r\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\r\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\r\n data.scaleMix = this.getValue(constraintMap, \"scaleMix\", 1);\r\n data.shearMix = this.getValue(constraintMap, \"shearMix\", 1);\r\n skeletonData.transformConstraints.push(data);\r\n }\r\n }\r\n if (root.path) {\r\n for (var i = 0; i < root.path.length; i++) {\r\n var constraintMap = root.path[i];\r\n var data = new spine.PathConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"Transform constraint bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findSlot(targetName);\r\n if (data.target == null)\r\n throw new Error(\"Path target slot not found: \" + targetName);\r\n data.positionMode = SkeletonJson.positionModeFromString(this.getValue(constraintMap, \"positionMode\", \"percent\"));\r\n data.spacingMode = SkeletonJson.spacingModeFromString(this.getValue(constraintMap, \"spacingMode\", \"length\"));\r\n data.rotateMode = SkeletonJson.rotateModeFromString(this.getValue(constraintMap, \"rotateMode\", \"tangent\"));\r\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\r\n data.position = this.getValue(constraintMap, \"position\", 0);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n data.position *= scale;\r\n data.spacing = this.getValue(constraintMap, \"spacing\", 0);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n data.spacing *= scale;\r\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\r\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\r\n skeletonData.pathConstraints.push(data);\r\n }\r\n }\r\n if (root.skins) {\r\n for (var i = 0; i < root.skins.length; i++) {\r\n var skinMap = root.skins[i];\r\n var skin = new spine.Skin(skinMap.name);\r\n if (skinMap.bones) {\r\n for (var ii = 0; ii < skinMap.bones.length; ii++) {\r\n var bone = skeletonData.findBone(skinMap.bones[ii]);\r\n if (bone == null)\r\n throw new Error(\"Skin bone not found: \" + skinMap.bones[i]);\r\n skin.bones.push(bone);\r\n }\r\n }\r\n if (skinMap.ik) {\r\n for (var ii = 0; ii < skinMap.ik.length; ii++) {\r\n var constraint = skeletonData.findIkConstraint(skinMap.ik[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin IK constraint not found: \" + skinMap.ik[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n if (skinMap.transform) {\r\n for (var ii = 0; ii < skinMap.transform.length; ii++) {\r\n var constraint = skeletonData.findTransformConstraint(skinMap.transform[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin transform constraint not found: \" + skinMap.transform[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n if (skinMap.path) {\r\n for (var ii = 0; ii < skinMap.path.length; ii++) {\r\n var constraint = skeletonData.findPathConstraint(skinMap.path[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin path constraint not found: \" + skinMap.path[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n for (var slotName in skinMap.attachments) {\r\n var slot = skeletonData.findSlot(slotName);\r\n if (slot == null)\r\n throw new Error(\"Slot not found: \" + slotName);\r\n var slotMap = skinMap.attachments[slotName];\r\n for (var entryName in slotMap) {\r\n var attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\r\n if (attachment != null)\r\n skin.setAttachment(slot.index, entryName, attachment);\r\n }\r\n }\r\n skeletonData.skins.push(skin);\r\n if (skin.name == \"default\")\r\n skeletonData.defaultSkin = skin;\r\n }\r\n }\r\n for (var i = 0, n = this.linkedMeshes.length; i < n; i++) {\r\n var linkedMesh = this.linkedMeshes[i];\r\n var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + linkedMesh.skin);\r\n var parent_6 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n if (parent_6 == null)\r\n throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\r\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_6 : linkedMesh.mesh;\r\n linkedMesh.mesh.setParentMesh(parent_6);\r\n linkedMesh.mesh.updateUVs();\r\n }\r\n this.linkedMeshes.length = 0;\r\n if (root.events) {\r\n for (var eventName in root.events) {\r\n var eventMap = root.events[eventName];\r\n var data = new spine.EventData(eventName);\r\n data.intValue = this.getValue(eventMap, \"int\", 0);\r\n data.floatValue = this.getValue(eventMap, \"float\", 0);\r\n data.stringValue = this.getValue(eventMap, \"string\", \"\");\r\n data.audioPath = this.getValue(eventMap, \"audio\", null);\r\n if (data.audioPath != null) {\r\n data.volume = this.getValue(eventMap, \"volume\", 1);\r\n data.balance = this.getValue(eventMap, \"balance\", 0);\r\n }\r\n skeletonData.events.push(data);\r\n }\r\n }\r\n if (root.animations) {\r\n for (var animationName in root.animations) {\r\n var animationMap = root.animations[animationName];\r\n this.readAnimation(animationMap, animationName, skeletonData);\r\n }\r\n }\r\n return skeletonData;\r\n };\r\n SkeletonJson.prototype.readAttachment = function (map, skin, slotIndex, name, skeletonData) {\r\n var scale = this.scale;\r\n name = this.getValue(map, \"name\", name);\r\n var type = this.getValue(map, \"type\", \"region\");\r\n switch (type) {\r\n case \"region\": {\r\n var path = this.getValue(map, \"path\", name);\r\n var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\r\n if (region == null)\r\n return null;\r\n region.path = path;\r\n region.x = this.getValue(map, \"x\", 0) * scale;\r\n region.y = this.getValue(map, \"y\", 0) * scale;\r\n region.scaleX = this.getValue(map, \"scaleX\", 1);\r\n region.scaleY = this.getValue(map, \"scaleY\", 1);\r\n region.rotation = this.getValue(map, \"rotation\", 0);\r\n region.width = map.width * scale;\r\n region.height = map.height * scale;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n region.color.setFromString(color);\r\n region.updateOffset();\r\n return region;\r\n }\r\n case \"boundingbox\": {\r\n var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n if (box == null)\r\n return null;\r\n this.readVertices(map, box, map.vertexCount << 1);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n box.color.setFromString(color);\r\n return box;\r\n }\r\n case \"mesh\":\r\n case \"linkedmesh\": {\r\n var path = this.getValue(map, \"path\", name);\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n mesh.color.setFromString(color);\r\n mesh.width = this.getValue(map, \"width\", 0) * scale;\r\n mesh.height = this.getValue(map, \"height\", 0) * scale;\r\n var parent_7 = this.getValue(map, \"parent\", null);\r\n if (parent_7 != null) {\r\n this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, \"skin\", null), slotIndex, parent_7, this.getValue(map, \"deform\", true)));\r\n return mesh;\r\n }\r\n var uvs = map.uvs;\r\n this.readVertices(map, mesh, uvs.length);\r\n mesh.triangles = map.triangles;\r\n mesh.regionUVs = uvs;\r\n mesh.updateUVs();\r\n mesh.edges = this.getValue(map, \"edges\", null);\r\n mesh.hullLength = this.getValue(map, \"hull\", 0) * 2;\r\n return mesh;\r\n }\r\n case \"path\": {\r\n var path = this.attachmentLoader.newPathAttachment(skin, name);\r\n if (path == null)\r\n return null;\r\n path.closed = this.getValue(map, \"closed\", false);\r\n path.constantSpeed = this.getValue(map, \"constantSpeed\", true);\r\n var vertexCount = map.vertexCount;\r\n this.readVertices(map, path, vertexCount << 1);\r\n var lengths = spine.Utils.newArray(vertexCount / 3, 0);\r\n for (var i = 0; i < map.lengths.length; i++)\r\n lengths[i] = map.lengths[i] * scale;\r\n path.lengths = lengths;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n path.color.setFromString(color);\r\n return path;\r\n }\r\n case \"point\": {\r\n var point = this.attachmentLoader.newPointAttachment(skin, name);\r\n if (point == null)\r\n return null;\r\n point.x = this.getValue(map, \"x\", 0) * scale;\r\n point.y = this.getValue(map, \"y\", 0) * scale;\r\n point.rotation = this.getValue(map, \"rotation\", 0);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n point.color.setFromString(color);\r\n return point;\r\n }\r\n case \"clipping\": {\r\n var clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n if (clip == null)\r\n return null;\r\n var end = this.getValue(map, \"end\", null);\r\n if (end != null) {\r\n var slot = skeletonData.findSlot(end);\r\n if (slot == null)\r\n throw new Error(\"Clipping end slot not found: \" + end);\r\n clip.endSlot = slot;\r\n }\r\n var vertexCount = map.vertexCount;\r\n this.readVertices(map, clip, vertexCount << 1);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n clip.color.setFromString(color);\r\n return clip;\r\n }\r\n }\r\n return null;\r\n };\r\n SkeletonJson.prototype.readVertices = function (map, attachment, verticesLength) {\r\n var scale = this.scale;\r\n attachment.worldVerticesLength = verticesLength;\r\n var vertices = map.vertices;\r\n if (verticesLength == vertices.length) {\r\n var scaledVertices = spine.Utils.toFloatArray(vertices);\r\n if (scale != 1) {\r\n for (var i = 0, n = vertices.length; i < n; i++)\r\n scaledVertices[i] *= scale;\r\n }\r\n attachment.vertices = scaledVertices;\r\n return;\r\n }\r\n var weights = new Array();\r\n var bones = new Array();\r\n for (var i = 0, n = vertices.length; i < n;) {\r\n var boneCount = vertices[i++];\r\n bones.push(boneCount);\r\n for (var nn = i + boneCount * 4; i < nn; i += 4) {\r\n bones.push(vertices[i]);\r\n weights.push(vertices[i + 1] * scale);\r\n weights.push(vertices[i + 2] * scale);\r\n weights.push(vertices[i + 3]);\r\n }\r\n }\r\n attachment.bones = bones;\r\n attachment.vertices = spine.Utils.toFloatArray(weights);\r\n };\r\n SkeletonJson.prototype.readAnimation = function (map, name, skeletonData) {\r\n var scale = this.scale;\r\n var timelines = new Array();\r\n var duration = 0;\r\n if (map.slots) {\r\n for (var slotName in map.slots) {\r\n var slotMap = map.slots[slotName];\r\n var slotIndex = skeletonData.findSlotIndex(slotName);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + slotName);\r\n for (var timelineName in slotMap) {\r\n var timelineMap = slotMap[timelineName];\r\n if (timelineName == \"attachment\") {\r\n var timeline = new spine.AttachmentTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex++, this.getValue(valueMap, \"time\", 0), valueMap.name);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n else if (timelineName == \"color\") {\r\n var timeline = new spine.ColorTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var color = new spine.Color();\r\n color.setFromString(valueMap.color);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), color.r, color.g, color.b, color.a);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.ColorTimeline.ENTRIES]);\r\n }\r\n else if (timelineName == \"twoColor\") {\r\n var timeline = new spine.TwoColorTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var light = new spine.Color();\r\n var dark = new spine.Color();\r\n light.setFromString(valueMap.light);\r\n dark.setFromString(valueMap.dark);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), light.r, light.g, light.b, light.a, dark.r, dark.g, dark.b);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TwoColorTimeline.ENTRIES]);\r\n }\r\n else\r\n throw new Error(\"Invalid timeline type for a slot: \" + timelineName + \" (\" + slotName + \")\");\r\n }\r\n }\r\n }\r\n if (map.bones) {\r\n for (var boneName in map.bones) {\r\n var boneMap = map.bones[boneName];\r\n var boneIndex = skeletonData.findBoneIndex(boneName);\r\n if (boneIndex == -1)\r\n throw new Error(\"Bone not found: \" + boneName);\r\n for (var timelineName in boneMap) {\r\n var timelineMap = boneMap[timelineName];\r\n if (timelineName === \"rotate\") {\r\n var timeline = new spine.RotateTimeline(timelineMap.length);\r\n timeline.boneIndex = boneIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"angle\", 0));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.RotateTimeline.ENTRIES]);\r\n }\r\n else if (timelineName === \"translate\" || timelineName === \"scale\" || timelineName === \"shear\") {\r\n var timeline = null;\r\n var timelineScale = 1, defaultValue = 0;\r\n if (timelineName === \"scale\") {\r\n timeline = new spine.ScaleTimeline(timelineMap.length);\r\n defaultValue = 1;\r\n }\r\n else if (timelineName === \"shear\")\r\n timeline = new spine.ShearTimeline(timelineMap.length);\r\n else {\r\n timeline = new spine.TranslateTimeline(timelineMap.length);\r\n timelineScale = scale;\r\n }\r\n timeline.boneIndex = boneIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var x = this.getValue(valueMap, \"x\", defaultValue), y = this.getValue(valueMap, \"y\", defaultValue);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), x * timelineScale, y * timelineScale);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TranslateTimeline.ENTRIES]);\r\n }\r\n else\r\n throw new Error(\"Invalid timeline type for a bone: \" + timelineName + \" (\" + boneName + \")\");\r\n }\r\n }\r\n }\r\n if (map.ik) {\r\n for (var constraintName in map.ik) {\r\n var constraintMap = map.ik[constraintName];\r\n var constraint = skeletonData.findIkConstraint(constraintName);\r\n var timeline = new spine.IkConstraintTimeline(constraintMap.length);\r\n timeline.ikConstraintIndex = skeletonData.ikConstraints.indexOf(constraint);\r\n var frameIndex = 0;\r\n for (var i = 0; i < constraintMap.length; i++) {\r\n var valueMap = constraintMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"mix\", 1), this.getValue(valueMap, \"softness\", 0) * scale, this.getValue(valueMap, \"bendPositive\", true) ? 1 : -1, this.getValue(valueMap, \"compress\", false), this.getValue(valueMap, \"stretch\", false));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.IkConstraintTimeline.ENTRIES]);\r\n }\r\n }\r\n if (map.transform) {\r\n for (var constraintName in map.transform) {\r\n var constraintMap = map.transform[constraintName];\r\n var constraint = skeletonData.findTransformConstraint(constraintName);\r\n var timeline = new spine.TransformConstraintTimeline(constraintMap.length);\r\n timeline.transformConstraintIndex = skeletonData.transformConstraints.indexOf(constraint);\r\n var frameIndex = 0;\r\n for (var i = 0; i < constraintMap.length; i++) {\r\n var valueMap = constraintMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1), this.getValue(valueMap, \"scaleMix\", 1), this.getValue(valueMap, \"shearMix\", 1));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TransformConstraintTimeline.ENTRIES]);\r\n }\r\n }\r\n if (map.path) {\r\n for (var constraintName in map.path) {\r\n var constraintMap = map.path[constraintName];\r\n var index = skeletonData.findPathConstraintIndex(constraintName);\r\n if (index == -1)\r\n throw new Error(\"Path constraint not found: \" + constraintName);\r\n var data = skeletonData.pathConstraints[index];\r\n for (var timelineName in constraintMap) {\r\n var timelineMap = constraintMap[timelineName];\r\n if (timelineName === \"position\" || timelineName === \"spacing\") {\r\n var timeline = null;\r\n var timelineScale = 1;\r\n if (timelineName === \"spacing\") {\r\n timeline = new spine.PathConstraintSpacingTimeline(timelineMap.length);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n else {\r\n timeline = new spine.PathConstraintPositionTimeline(timelineMap.length);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n timeline.pathConstraintIndex = index;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, timelineName, 0) * timelineScale);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\r\n }\r\n else if (timelineName === \"mix\") {\r\n var timeline = new spine.PathConstraintMixTimeline(timelineMap.length);\r\n timeline.pathConstraintIndex = index;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\r\n }\r\n }\r\n }\r\n }\r\n if (map.deform) {\r\n for (var deformName in map.deform) {\r\n var deformMap = map.deform[deformName];\r\n var skin = skeletonData.findSkin(deformName);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + deformName);\r\n for (var slotName in deformMap) {\r\n var slotMap = deformMap[slotName];\r\n var slotIndex = skeletonData.findSlotIndex(slotName);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + slotMap.name);\r\n for (var timelineName in slotMap) {\r\n var timelineMap = slotMap[timelineName];\r\n var attachment = skin.getAttachment(slotIndex, timelineName);\r\n if (attachment == null)\r\n throw new Error(\"Deform attachment not found: \" + timelineMap.name);\r\n var weighted = attachment.bones != null;\r\n var vertices = attachment.vertices;\r\n var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n var timeline = new spine.DeformTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n timeline.attachment = attachment;\r\n var frameIndex = 0;\r\n for (var j = 0; j < timelineMap.length; j++) {\r\n var valueMap = timelineMap[j];\r\n var deform = void 0;\r\n var verticesValue = this.getValue(valueMap, \"vertices\", null);\r\n if (verticesValue == null)\r\n deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\r\n else {\r\n deform = spine.Utils.newFloatArray(deformLength);\r\n var start = this.getValue(valueMap, \"offset\", 0);\r\n spine.Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\r\n if (scale != 1) {\r\n for (var i = start, n = i + verticesValue.length; i < n; i++)\r\n deform[i] *= scale;\r\n }\r\n if (!weighted) {\r\n for (var i = 0; i < deformLength; i++)\r\n deform[i] += vertices[i];\r\n }\r\n }\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), deform);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n }\r\n }\r\n }\r\n var drawOrderNode = map.drawOrder;\r\n if (drawOrderNode == null)\r\n drawOrderNode = map.draworder;\r\n if (drawOrderNode != null) {\r\n var timeline = new spine.DrawOrderTimeline(drawOrderNode.length);\r\n var slotCount = skeletonData.slots.length;\r\n var frameIndex = 0;\r\n for (var j = 0; j < drawOrderNode.length; j++) {\r\n var drawOrderMap = drawOrderNode[j];\r\n var drawOrder = null;\r\n var offsets = this.getValue(drawOrderMap, \"offsets\", null);\r\n if (offsets != null) {\r\n drawOrder = spine.Utils.newArray(slotCount, -1);\r\n var unchanged = spine.Utils.newArray(slotCount - offsets.length, 0);\r\n var originalIndex = 0, unchangedIndex = 0;\r\n for (var i = 0; i < offsets.length; i++) {\r\n var offsetMap = offsets[i];\r\n var slotIndex = skeletonData.findSlotIndex(offsetMap.slot);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + offsetMap.slot);\r\n while (originalIndex != slotIndex)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n drawOrder[originalIndex + offsetMap.offset] = originalIndex++;\r\n }\r\n while (originalIndex < slotCount)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n for (var i = slotCount - 1; i >= 0; i--)\r\n if (drawOrder[i] == -1)\r\n drawOrder[i] = unchanged[--unchangedIndex];\r\n }\r\n timeline.setFrame(frameIndex++, this.getValue(drawOrderMap, \"time\", 0), drawOrder);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n if (map.events) {\r\n var timeline = new spine.EventTimeline(map.events.length);\r\n var frameIndex = 0;\r\n for (var i = 0; i < map.events.length; i++) {\r\n var eventMap = map.events[i];\r\n var eventData = skeletonData.findEvent(eventMap.name);\r\n if (eventData == null)\r\n throw new Error(\"Event not found: \" + eventMap.name);\r\n var event_6 = new spine.Event(spine.Utils.toSinglePrecision(this.getValue(eventMap, \"time\", 0)), eventData);\r\n event_6.intValue = this.getValue(eventMap, \"int\", eventData.intValue);\r\n event_6.floatValue = this.getValue(eventMap, \"float\", eventData.floatValue);\r\n event_6.stringValue = this.getValue(eventMap, \"string\", eventData.stringValue);\r\n if (event_6.data.audioPath != null) {\r\n event_6.volume = this.getValue(eventMap, \"volume\", 1);\r\n event_6.balance = this.getValue(eventMap, \"balance\", 0);\r\n }\r\n timeline.setFrame(frameIndex++, event_6);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n if (isNaN(duration)) {\r\n throw new Error(\"Error while parsing animation, duration is NaN\");\r\n }\r\n skeletonData.animations.push(new spine.Animation(name, timelines, duration));\r\n };\r\n SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) {\r\n if (!map.hasOwnProperty(\"curve\"))\r\n return;\r\n if (map.curve == \"stepped\")\r\n timeline.setStepped(frameIndex);\r\n else {\r\n var curve = map.curve;\r\n timeline.setCurve(frameIndex, curve, this.getValue(map, \"c2\", 0), this.getValue(map, \"c3\", 1), this.getValue(map, \"c4\", 1));\r\n }\r\n };\r\n SkeletonJson.prototype.getValue = function (map, prop, defaultValue) {\r\n return map[prop] !== undefined ? map[prop] : defaultValue;\r\n };\r\n SkeletonJson.blendModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"normal\")\r\n return spine.BlendMode.Normal;\r\n if (str == \"additive\")\r\n return spine.BlendMode.Additive;\r\n if (str == \"multiply\")\r\n return spine.BlendMode.Multiply;\r\n if (str == \"screen\")\r\n return spine.BlendMode.Screen;\r\n throw new Error(\"Unknown blend mode: \" + str);\r\n };\r\n SkeletonJson.positionModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"fixed\")\r\n return spine.PositionMode.Fixed;\r\n if (str == \"percent\")\r\n return spine.PositionMode.Percent;\r\n throw new Error(\"Unknown position mode: \" + str);\r\n };\r\n SkeletonJson.spacingModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"length\")\r\n return spine.SpacingMode.Length;\r\n if (str == \"fixed\")\r\n return spine.SpacingMode.Fixed;\r\n if (str == \"percent\")\r\n return spine.SpacingMode.Percent;\r\n throw new Error(\"Unknown position mode: \" + str);\r\n };\r\n SkeletonJson.rotateModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"tangent\")\r\n return spine.RotateMode.Tangent;\r\n if (str == \"chain\")\r\n return spine.RotateMode.Chain;\r\n if (str == \"chainscale\")\r\n return spine.RotateMode.ChainScale;\r\n throw new Error(\"Unknown rotate mode: \" + str);\r\n };\r\n SkeletonJson.transformModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"normal\")\r\n return spine.TransformMode.Normal;\r\n if (str == \"onlytranslation\")\r\n return spine.TransformMode.OnlyTranslation;\r\n if (str == \"norotationorreflection\")\r\n return spine.TransformMode.NoRotationOrReflection;\r\n if (str == \"noscale\")\r\n return spine.TransformMode.NoScale;\r\n if (str == \"noscaleorreflection\")\r\n return spine.TransformMode.NoScaleOrReflection;\r\n throw new Error(\"Unknown transform mode: \" + str);\r\n };\r\n return SkeletonJson;\r\n }());\r\n spine.SkeletonJson = SkeletonJson;\r\n var LinkedMesh = (function () {\r\n function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\r\n this.mesh = mesh;\r\n this.skin = skin;\r\n this.slotIndex = slotIndex;\r\n this.parent = parent;\r\n this.inheritDeform = inheritDeform;\r\n }\r\n return LinkedMesh;\r\n }());\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkinEntry = (function () {\r\n function SkinEntry(slotIndex, name, attachment) {\r\n this.slotIndex = slotIndex;\r\n this.name = name;\r\n this.attachment = attachment;\r\n }\r\n return SkinEntry;\r\n }());\r\n spine.SkinEntry = SkinEntry;\r\n var Skin = (function () {\r\n function Skin(name) {\r\n this.attachments = new Array();\r\n this.bones = Array();\r\n this.constraints = new Array();\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n Skin.prototype.setAttachment = function (slotIndex, name, attachment) {\r\n if (attachment == null)\r\n throw new Error(\"attachment cannot be null.\");\r\n var attachments = this.attachments;\r\n if (slotIndex >= attachments.length)\r\n attachments.length = slotIndex + 1;\r\n if (!attachments[slotIndex])\r\n attachments[slotIndex] = {};\r\n attachments[slotIndex][name] = attachment;\r\n };\r\n Skin.prototype.addSkin = function (skin) {\r\n for (var i = 0; i < skin.bones.length; i++) {\r\n var bone = skin.bones[i];\r\n var contained = false;\r\n for (var j = 0; j < this.bones.length; j++) {\r\n if (this.bones[j] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.bones.push(bone);\r\n }\r\n for (var i = 0; i < skin.constraints.length; i++) {\r\n var constraint = skin.constraints[i];\r\n var contained = false;\r\n for (var j = 0; j < this.constraints.length; j++) {\r\n if (this.constraints[j] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.constraints.push(constraint);\r\n }\r\n var attachments = skin.getAttachments();\r\n for (var i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n };\r\n Skin.prototype.copySkin = function (skin) {\r\n for (var i = 0; i < skin.bones.length; i++) {\r\n var bone = skin.bones[i];\r\n var contained = false;\r\n for (var j = 0; j < this.bones.length; j++) {\r\n if (this.bones[j] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.bones.push(bone);\r\n }\r\n for (var i = 0; i < skin.constraints.length; i++) {\r\n var constraint = skin.constraints[i];\r\n var contained = false;\r\n for (var j = 0; j < this.constraints.length; j++) {\r\n if (this.constraints[j] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.constraints.push(constraint);\r\n }\r\n var attachments = skin.getAttachments();\r\n for (var i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n if (attachment.attachment == null)\r\n continue;\r\n if (attachment.attachment instanceof spine.MeshAttachment) {\r\n attachment.attachment = attachment.attachment.newLinkedMesh();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n else {\r\n attachment.attachment = attachment.attachment.copy();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n }\r\n };\r\n Skin.prototype.getAttachment = function (slotIndex, name) {\r\n var dictionary = this.attachments[slotIndex];\r\n return dictionary ? dictionary[name] : null;\r\n };\r\n Skin.prototype.removeAttachment = function (slotIndex, name) {\r\n var dictionary = this.attachments[slotIndex];\r\n if (dictionary)\r\n dictionary[name] = null;\r\n };\r\n Skin.prototype.getAttachments = function () {\r\n var entries = new Array();\r\n for (var i = 0; i < this.attachments.length; i++) {\r\n var slotAttachments = this.attachments[i];\r\n if (slotAttachments) {\r\n for (var name_4 in slotAttachments) {\r\n var attachment = slotAttachments[name_4];\r\n if (attachment)\r\n entries.push(new SkinEntry(i, name_4, attachment));\r\n }\r\n }\r\n }\r\n return entries;\r\n };\r\n Skin.prototype.getAttachmentsForSlot = function (slotIndex, attachments) {\r\n var slotAttachments = this.attachments[slotIndex];\r\n if (slotAttachments) {\r\n for (var name_5 in slotAttachments) {\r\n var attachment = slotAttachments[name_5];\r\n if (attachment)\r\n attachments.push(new SkinEntry(slotIndex, name_5, attachment));\r\n }\r\n }\r\n };\r\n Skin.prototype.clear = function () {\r\n this.attachments.length = 0;\r\n this.bones.length = 0;\r\n this.constraints.length = 0;\r\n };\r\n Skin.prototype.attachAll = function (skeleton, oldSkin) {\r\n var slotIndex = 0;\r\n for (var i = 0; i < skeleton.slots.length; i++) {\r\n var slot = skeleton.slots[i];\r\n var slotAttachment = slot.getAttachment();\r\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\r\n var dictionary = oldSkin.attachments[slotIndex];\r\n for (var key in dictionary) {\r\n var skinAttachment = dictionary[key];\r\n if (slotAttachment == skinAttachment) {\r\n var attachment = this.getAttachment(slotIndex, key);\r\n if (attachment != null)\r\n slot.setAttachment(attachment);\r\n break;\r\n }\r\n }\r\n }\r\n slotIndex++;\r\n }\r\n };\r\n return Skin;\r\n }());\r\n spine.Skin = Skin;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Slot = (function () {\r\n function Slot(data, bone) {\r\n this.deform = new Array();\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (bone == null)\r\n throw new Error(\"bone cannot be null.\");\r\n this.data = data;\r\n this.bone = bone;\r\n this.color = new spine.Color();\r\n this.darkColor = data.darkColor == null ? null : new spine.Color();\r\n this.setToSetupPose();\r\n }\r\n Slot.prototype.getSkeleton = function () {\r\n return this.bone.skeleton;\r\n };\r\n Slot.prototype.getAttachment = function () {\r\n return this.attachment;\r\n };\r\n Slot.prototype.setAttachment = function (attachment) {\r\n if (this.attachment == attachment)\r\n return;\r\n this.attachment = attachment;\r\n this.attachmentTime = this.bone.skeleton.time;\r\n this.deform.length = 0;\r\n };\r\n Slot.prototype.setAttachmentTime = function (time) {\r\n this.attachmentTime = this.bone.skeleton.time - time;\r\n };\r\n Slot.prototype.getAttachmentTime = function () {\r\n return this.bone.skeleton.time - this.attachmentTime;\r\n };\r\n Slot.prototype.setToSetupPose = function () {\r\n this.color.setFromColor(this.data.color);\r\n if (this.darkColor != null)\r\n this.darkColor.setFromColor(this.data.darkColor);\r\n if (this.data.attachmentName == null)\r\n this.attachment = null;\r\n else {\r\n this.attachment = null;\r\n this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName));\r\n }\r\n };\r\n return Slot;\r\n }());\r\n spine.Slot = Slot;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SlotData = (function () {\r\n function SlotData(index, name, boneData) {\r\n this.color = new spine.Color(1, 1, 1, 1);\r\n if (index < 0)\r\n throw new Error(\"index must be >= 0.\");\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n if (boneData == null)\r\n throw new Error(\"boneData cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.boneData = boneData;\r\n }\r\n return SlotData;\r\n }());\r\n spine.SlotData = SlotData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Texture = (function () {\r\n function Texture(image) {\r\n this._image = image;\r\n }\r\n Texture.prototype.getImage = function () {\r\n return this._image;\r\n };\r\n Texture.filterFromString = function (text) {\r\n switch (text.toLowerCase()) {\r\n case \"nearest\": return TextureFilter.Nearest;\r\n case \"linear\": return TextureFilter.Linear;\r\n case \"mipmap\": return TextureFilter.MipMap;\r\n case \"mipmapnearestnearest\": return TextureFilter.MipMapNearestNearest;\r\n case \"mipmaplinearnearest\": return TextureFilter.MipMapLinearNearest;\r\n case \"mipmapnearestlinear\": return TextureFilter.MipMapNearestLinear;\r\n case \"mipmaplinearlinear\": return TextureFilter.MipMapLinearLinear;\r\n default: throw new Error(\"Unknown texture filter \" + text);\r\n }\r\n };\r\n Texture.wrapFromString = function (text) {\r\n switch (text.toLowerCase()) {\r\n case \"mirroredtepeat\": return TextureWrap.MirroredRepeat;\r\n case \"clamptoedge\": return TextureWrap.ClampToEdge;\r\n case \"repeat\": return TextureWrap.Repeat;\r\n default: throw new Error(\"Unknown texture wrap \" + text);\r\n }\r\n };\r\n return Texture;\r\n }());\r\n spine.Texture = Texture;\r\n var TextureFilter;\r\n (function (TextureFilter) {\r\n TextureFilter[TextureFilter[\"Nearest\"] = 9728] = \"Nearest\";\r\n TextureFilter[TextureFilter[\"Linear\"] = 9729] = \"Linear\";\r\n TextureFilter[TextureFilter[\"MipMap\"] = 9987] = \"MipMap\";\r\n TextureFilter[TextureFilter[\"MipMapNearestNearest\"] = 9984] = \"MipMapNearestNearest\";\r\n TextureFilter[TextureFilter[\"MipMapLinearNearest\"] = 9985] = \"MipMapLinearNearest\";\r\n TextureFilter[TextureFilter[\"MipMapNearestLinear\"] = 9986] = \"MipMapNearestLinear\";\r\n TextureFilter[TextureFilter[\"MipMapLinearLinear\"] = 9987] = \"MipMapLinearLinear\";\r\n })(TextureFilter = spine.TextureFilter || (spine.TextureFilter = {}));\r\n var TextureWrap;\r\n (function (TextureWrap) {\r\n TextureWrap[TextureWrap[\"MirroredRepeat\"] = 33648] = \"MirroredRepeat\";\r\n TextureWrap[TextureWrap[\"ClampToEdge\"] = 33071] = \"ClampToEdge\";\r\n TextureWrap[TextureWrap[\"Repeat\"] = 10497] = \"Repeat\";\r\n })(TextureWrap = spine.TextureWrap || (spine.TextureWrap = {}));\r\n var TextureRegion = (function () {\r\n function TextureRegion() {\r\n this.u = 0;\r\n this.v = 0;\r\n this.u2 = 0;\r\n this.v2 = 0;\r\n this.width = 0;\r\n this.height = 0;\r\n this.rotate = false;\r\n this.offsetX = 0;\r\n this.offsetY = 0;\r\n this.originalWidth = 0;\r\n this.originalHeight = 0;\r\n }\r\n return TextureRegion;\r\n }());\r\n spine.TextureRegion = TextureRegion;\r\n var FakeTexture = (function (_super) {\r\n __extends(FakeTexture, _super);\r\n function FakeTexture() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n FakeTexture.prototype.setFilters = function (minFilter, magFilter) { };\r\n FakeTexture.prototype.setWraps = function (uWrap, vWrap) { };\r\n FakeTexture.prototype.dispose = function () { };\r\n return FakeTexture;\r\n }(Texture));\r\n spine.FakeTexture = FakeTexture;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TextureAtlas = (function () {\r\n function TextureAtlas(atlasText, textureLoader) {\r\n this.pages = new Array();\r\n this.regions = new Array();\r\n this.load(atlasText, textureLoader);\r\n }\r\n TextureAtlas.prototype.load = function (atlasText, textureLoader) {\r\n if (textureLoader == null)\r\n throw new Error(\"textureLoader cannot be null.\");\r\n var reader = new TextureAtlasReader(atlasText);\r\n var tuple = new Array(4);\r\n var page = null;\r\n while (true) {\r\n var line = reader.readLine();\r\n if (line == null)\r\n break;\r\n line = line.trim();\r\n if (line.length == 0)\r\n page = null;\r\n else if (!page) {\r\n page = new TextureAtlasPage();\r\n page.name = line;\r\n if (reader.readTuple(tuple) == 2) {\r\n page.width = parseInt(tuple[0]);\r\n page.height = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n }\r\n reader.readTuple(tuple);\r\n page.minFilter = spine.Texture.filterFromString(tuple[0]);\r\n page.magFilter = spine.Texture.filterFromString(tuple[1]);\r\n var direction = reader.readValue();\r\n page.uWrap = spine.TextureWrap.ClampToEdge;\r\n page.vWrap = spine.TextureWrap.ClampToEdge;\r\n if (direction == \"x\")\r\n page.uWrap = spine.TextureWrap.Repeat;\r\n else if (direction == \"y\")\r\n page.vWrap = spine.TextureWrap.Repeat;\r\n else if (direction == \"xy\")\r\n page.uWrap = page.vWrap = spine.TextureWrap.Repeat;\r\n page.texture = textureLoader(line);\r\n page.texture.setFilters(page.minFilter, page.magFilter);\r\n page.texture.setWraps(page.uWrap, page.vWrap);\r\n page.width = page.texture.getImage().width;\r\n page.height = page.texture.getImage().height;\r\n this.pages.push(page);\r\n }\r\n else {\r\n var region = new TextureAtlasRegion();\r\n region.name = line;\r\n region.page = page;\r\n var rotateValue = reader.readValue();\r\n if (rotateValue.toLocaleLowerCase() == \"true\") {\r\n region.degrees = 90;\r\n }\r\n else if (rotateValue.toLocaleLowerCase() == \"false\") {\r\n region.degrees = 0;\r\n }\r\n else {\r\n region.degrees = parseFloat(rotateValue);\r\n }\r\n region.rotate = region.degrees == 90;\r\n reader.readTuple(tuple);\r\n var x = parseInt(tuple[0]);\r\n var y = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n var width = parseInt(tuple[0]);\r\n var height = parseInt(tuple[1]);\r\n region.u = x / page.width;\r\n region.v = y / page.height;\r\n if (region.rotate) {\r\n region.u2 = (x + height) / page.width;\r\n region.v2 = (y + width) / page.height;\r\n }\r\n else {\r\n region.u2 = (x + width) / page.width;\r\n region.v2 = (y + height) / page.height;\r\n }\r\n region.x = x;\r\n region.y = y;\r\n region.width = Math.abs(width);\r\n region.height = Math.abs(height);\r\n if (reader.readTuple(tuple) == 4) {\r\n if (reader.readTuple(tuple) == 4) {\r\n reader.readTuple(tuple);\r\n }\r\n }\r\n region.originalWidth = parseInt(tuple[0]);\r\n region.originalHeight = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n region.offsetX = parseInt(tuple[0]);\r\n region.offsetY = parseInt(tuple[1]);\r\n region.index = parseInt(reader.readValue());\r\n region.texture = page.texture;\r\n this.regions.push(region);\r\n }\r\n }\r\n };\r\n TextureAtlas.prototype.findRegion = function (name) {\r\n for (var i = 0; i < this.regions.length; i++) {\r\n if (this.regions[i].name == name) {\r\n return this.regions[i];\r\n }\r\n }\r\n return null;\r\n };\r\n TextureAtlas.prototype.dispose = function () {\r\n for (var i = 0; i < this.pages.length; i++) {\r\n this.pages[i].texture.dispose();\r\n }\r\n };\r\n return TextureAtlas;\r\n }());\r\n spine.TextureAtlas = TextureAtlas;\r\n var TextureAtlasReader = (function () {\r\n function TextureAtlasReader(text) {\r\n this.index = 0;\r\n this.lines = text.split(/\\r\\n|\\r|\\n/);\r\n }\r\n TextureAtlasReader.prototype.readLine = function () {\r\n if (this.index >= this.lines.length)\r\n return null;\r\n return this.lines[this.index++];\r\n };\r\n TextureAtlasReader.prototype.readValue = function () {\r\n var line = this.readLine();\r\n var colon = line.indexOf(\":\");\r\n if (colon == -1)\r\n throw new Error(\"Invalid line: \" + line);\r\n return line.substring(colon + 1).trim();\r\n };\r\n TextureAtlasReader.prototype.readTuple = function (tuple) {\r\n var line = this.readLine();\r\n var colon = line.indexOf(\":\");\r\n if (colon == -1)\r\n throw new Error(\"Invalid line: \" + line);\r\n var i = 0, lastMatch = colon + 1;\r\n for (; i < 3; i++) {\r\n var comma = line.indexOf(\",\", lastMatch);\r\n if (comma == -1)\r\n break;\r\n tuple[i] = line.substr(lastMatch, comma - lastMatch).trim();\r\n lastMatch = comma + 1;\r\n }\r\n tuple[i] = line.substring(lastMatch).trim();\r\n return i + 1;\r\n };\r\n return TextureAtlasReader;\r\n }());\r\n var TextureAtlasPage = (function () {\r\n function TextureAtlasPage() {\r\n }\r\n return TextureAtlasPage;\r\n }());\r\n spine.TextureAtlasPage = TextureAtlasPage;\r\n var TextureAtlasRegion = (function (_super) {\r\n __extends(TextureAtlasRegion, _super);\r\n function TextureAtlasRegion() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return TextureAtlasRegion;\r\n }(spine.TextureRegion));\r\n spine.TextureAtlasRegion = TextureAtlasRegion;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TransformConstraint = (function () {\r\n function TransformConstraint(data, skeleton) {\r\n this.rotateMix = 0;\r\n this.translateMix = 0;\r\n this.scaleMix = 0;\r\n this.shearMix = 0;\r\n this.temp = new spine.Vector2();\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.rotateMix = data.rotateMix;\r\n this.translateMix = data.translateMix;\r\n this.scaleMix = data.scaleMix;\r\n this.shearMix = data.shearMix;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findBone(data.target.name);\r\n }\r\n TransformConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n TransformConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n TransformConstraint.prototype.update = function () {\r\n if (this.data.local) {\r\n if (this.data.relative)\r\n this.applyRelativeLocal();\r\n else\r\n this.applyAbsoluteLocal();\r\n }\r\n else {\r\n if (this.data.relative)\r\n this.applyRelativeWorld();\r\n else\r\n this.applyAbsoluteWorld();\r\n }\r\n };\r\n TransformConstraint.prototype.applyAbsoluteWorld = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n var ta = target.a, tb = target.b, tc = target.c, td = target.d;\r\n var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n var offsetRotation = this.data.offsetRotation * degRadReflect;\r\n var offsetShearY = this.data.offsetShearY * degRadReflect;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n var modified = false;\r\n if (rotateMix != 0) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n var cos = Math.cos(r), sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n modified = true;\r\n }\r\n if (translateMix != 0) {\r\n var temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n bone.worldX += (temp.x - bone.worldX) * translateMix;\r\n bone.worldY += (temp.y - bone.worldY) * translateMix;\r\n modified = true;\r\n }\r\n if (scaleMix > 0) {\r\n var s = Math.sqrt(bone.a * bone.a + bone.c * bone.c);\r\n var ts = Math.sqrt(ta * ta + tc * tc);\r\n if (s > 0.00001)\r\n s = (s + (ts - s + this.data.offsetScaleX) * scaleMix) / s;\r\n bone.a *= s;\r\n bone.c *= s;\r\n s = Math.sqrt(bone.b * bone.b + bone.d * bone.d);\r\n ts = Math.sqrt(tb * tb + td * td);\r\n if (s > 0.00001)\r\n s = (s + (ts - s + this.data.offsetScaleY) * scaleMix) / s;\r\n bone.b *= s;\r\n bone.d *= s;\r\n modified = true;\r\n }\r\n if (shearMix > 0) {\r\n var b = bone.b, d = bone.d;\r\n var by = Math.atan2(d, b);\r\n var r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a));\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r = by + (r + offsetShearY) * shearMix;\r\n var s = Math.sqrt(b * b + d * d);\r\n bone.b = Math.cos(r) * s;\r\n bone.d = Math.sin(r) * s;\r\n modified = true;\r\n }\r\n if (modified)\r\n bone.appliedValid = false;\r\n }\r\n };\r\n TransformConstraint.prototype.applyRelativeWorld = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n var ta = target.a, tb = target.b, tc = target.c, td = target.d;\r\n var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n var offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n var modified = false;\r\n if (rotateMix != 0) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var r = Math.atan2(tc, ta) + offsetRotation;\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n var cos = Math.cos(r), sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n modified = true;\r\n }\r\n if (translateMix != 0) {\r\n var temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n bone.worldX += temp.x * translateMix;\r\n bone.worldY += temp.y * translateMix;\r\n modified = true;\r\n }\r\n if (scaleMix > 0) {\r\n var s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * scaleMix + 1;\r\n bone.a *= s;\r\n bone.c *= s;\r\n s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * scaleMix + 1;\r\n bone.b *= s;\r\n bone.d *= s;\r\n modified = true;\r\n }\r\n if (shearMix > 0) {\r\n var r = Math.atan2(td, tb) - Math.atan2(tc, ta);\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n var b = bone.b, d = bone.d;\r\n r = Math.atan2(d, b) + (r - spine.MathUtils.PI / 2 + offsetShearY) * shearMix;\r\n var s = Math.sqrt(b * b + d * d);\r\n bone.b = Math.cos(r) * s;\r\n bone.d = Math.sin(r) * s;\r\n modified = true;\r\n }\r\n if (modified)\r\n bone.appliedValid = false;\r\n }\r\n };\r\n TransformConstraint.prototype.applyAbsoluteLocal = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n if (!target.appliedValid)\r\n target.updateAppliedTransform();\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var rotation = bone.arotation;\r\n if (rotateMix != 0) {\r\n var r = target.arotation - rotation + this.data.offsetRotation;\r\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n rotation += r * rotateMix;\r\n }\r\n var x = bone.ax, y = bone.ay;\r\n if (translateMix != 0) {\r\n x += (target.ax - x + this.data.offsetX) * translateMix;\r\n y += (target.ay - y + this.data.offsetY) * translateMix;\r\n }\r\n var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n if (scaleMix != 0) {\r\n if (scaleX > 0.00001)\r\n scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * scaleMix) / scaleX;\r\n if (scaleY > 0.00001)\r\n scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * scaleMix) / scaleY;\r\n }\r\n var shearY = bone.ashearY;\r\n if (shearMix != 0) {\r\n var r = target.ashearY - shearY + this.data.offsetShearY;\r\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n bone.shearY += r * shearMix;\r\n }\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n };\r\n TransformConstraint.prototype.applyRelativeLocal = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n if (!target.appliedValid)\r\n target.updateAppliedTransform();\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var rotation = bone.arotation;\r\n if (rotateMix != 0)\r\n rotation += (target.arotation + this.data.offsetRotation) * rotateMix;\r\n var x = bone.ax, y = bone.ay;\r\n if (translateMix != 0) {\r\n x += (target.ax + this.data.offsetX) * translateMix;\r\n y += (target.ay + this.data.offsetY) * translateMix;\r\n }\r\n var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n if (scaleMix != 0) {\r\n if (scaleX > 0.00001)\r\n scaleX *= ((target.ascaleX - 1 + this.data.offsetScaleX) * scaleMix) + 1;\r\n if (scaleY > 0.00001)\r\n scaleY *= ((target.ascaleY - 1 + this.data.offsetScaleY) * scaleMix) + 1;\r\n }\r\n var shearY = bone.ashearY;\r\n if (shearMix != 0)\r\n shearY += (target.ashearY + this.data.offsetShearY) * shearMix;\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n };\r\n return TransformConstraint;\r\n }());\r\n spine.TransformConstraint = TransformConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TransformConstraintData = (function (_super) {\r\n __extends(TransformConstraintData, _super);\r\n function TransformConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n _this.rotateMix = 0;\r\n _this.translateMix = 0;\r\n _this.scaleMix = 0;\r\n _this.shearMix = 0;\r\n _this.offsetRotation = 0;\r\n _this.offsetX = 0;\r\n _this.offsetY = 0;\r\n _this.offsetScaleX = 0;\r\n _this.offsetScaleY = 0;\r\n _this.offsetShearY = 0;\r\n _this.relative = false;\r\n _this.local = false;\r\n return _this;\r\n }\r\n return TransformConstraintData;\r\n }(spine.ConstraintData));\r\n spine.TransformConstraintData = TransformConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Triangulator = (function () {\r\n function Triangulator() {\r\n this.convexPolygons = new Array();\r\n this.convexPolygonsIndices = new Array();\r\n this.indicesArray = new Array();\r\n this.isConcaveArray = new Array();\r\n this.triangles = new Array();\r\n this.polygonPool = new spine.Pool(function () {\r\n return new Array();\r\n });\r\n this.polygonIndicesPool = new spine.Pool(function () {\r\n return new Array();\r\n });\r\n }\r\n Triangulator.prototype.triangulate = function (verticesArray) {\r\n var vertices = verticesArray;\r\n var vertexCount = verticesArray.length >> 1;\r\n var indices = this.indicesArray;\r\n indices.length = 0;\r\n for (var i = 0; i < vertexCount; i++)\r\n indices[i] = i;\r\n var isConcave = this.isConcaveArray;\r\n isConcave.length = 0;\r\n for (var i = 0, n = vertexCount; i < n; ++i)\r\n isConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices);\r\n var triangles = this.triangles;\r\n triangles.length = 0;\r\n while (vertexCount > 3) {\r\n var previous = vertexCount - 1, i = 0, next = 1;\r\n while (true) {\r\n outer: if (!isConcave[i]) {\r\n var p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\r\n var p1x = vertices[p1], p1y = vertices[p1 + 1];\r\n var p2x = vertices[p2], p2y = vertices[p2 + 1];\r\n var p3x = vertices[p3], p3y = vertices[p3 + 1];\r\n for (var ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\r\n if (!isConcave[ii])\r\n continue;\r\n var v = indices[ii] << 1;\r\n var vx = vertices[v], vy = vertices[v + 1];\r\n if (Triangulator.positiveArea(p3x, p3y, p1x, p1y, vx, vy)) {\r\n if (Triangulator.positiveArea(p1x, p1y, p2x, p2y, vx, vy)) {\r\n if (Triangulator.positiveArea(p2x, p2y, p3x, p3y, vx, vy))\r\n break outer;\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n if (next == 0) {\r\n do {\r\n if (!isConcave[i])\r\n break;\r\n i--;\r\n } while (i > 0);\r\n break;\r\n }\r\n previous = i;\r\n i = next;\r\n next = (next + 1) % vertexCount;\r\n }\r\n triangles.push(indices[(vertexCount + i - 1) % vertexCount]);\r\n triangles.push(indices[i]);\r\n triangles.push(indices[(i + 1) % vertexCount]);\r\n indices.splice(i, 1);\r\n isConcave.splice(i, 1);\r\n vertexCount--;\r\n var previousIndex = (vertexCount + i - 1) % vertexCount;\r\n var nextIndex = i == vertexCount ? 0 : i;\r\n isConcave[previousIndex] = Triangulator.isConcave(previousIndex, vertexCount, vertices, indices);\r\n isConcave[nextIndex] = Triangulator.isConcave(nextIndex, vertexCount, vertices, indices);\r\n }\r\n if (vertexCount == 3) {\r\n triangles.push(indices[2]);\r\n triangles.push(indices[0]);\r\n triangles.push(indices[1]);\r\n }\r\n return triangles;\r\n };\r\n Triangulator.prototype.decompose = function (verticesArray, triangles) {\r\n var vertices = verticesArray;\r\n var convexPolygons = this.convexPolygons;\r\n this.polygonPool.freeAll(convexPolygons);\r\n convexPolygons.length = 0;\r\n var convexPolygonsIndices = this.convexPolygonsIndices;\r\n this.polygonIndicesPool.freeAll(convexPolygonsIndices);\r\n convexPolygonsIndices.length = 0;\r\n var polygonIndices = this.polygonIndicesPool.obtain();\r\n polygonIndices.length = 0;\r\n var polygon = this.polygonPool.obtain();\r\n polygon.length = 0;\r\n var fanBaseIndex = -1, lastWinding = 0;\r\n for (var i = 0, n = triangles.length; i < n; i += 3) {\r\n var t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\r\n var x1 = vertices[t1], y1 = vertices[t1 + 1];\r\n var x2 = vertices[t2], y2 = vertices[t2 + 1];\r\n var x3 = vertices[t3], y3 = vertices[t3 + 1];\r\n var merged = false;\r\n if (fanBaseIndex == t1) {\r\n var o = polygon.length - 4;\r\n var winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3);\r\n var winding2 = Triangulator.winding(x3, y3, polygon[0], polygon[1], polygon[2], polygon[3]);\r\n if (winding1 == lastWinding && winding2 == lastWinding) {\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices.push(t3);\r\n merged = true;\r\n }\r\n }\r\n if (!merged) {\r\n if (polygon.length > 0) {\r\n convexPolygons.push(polygon);\r\n convexPolygonsIndices.push(polygonIndices);\r\n }\r\n else {\r\n this.polygonPool.free(polygon);\r\n this.polygonIndicesPool.free(polygonIndices);\r\n }\r\n polygon = this.polygonPool.obtain();\r\n polygon.length = 0;\r\n polygon.push(x1);\r\n polygon.push(y1);\r\n polygon.push(x2);\r\n polygon.push(y2);\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices = this.polygonIndicesPool.obtain();\r\n polygonIndices.length = 0;\r\n polygonIndices.push(t1);\r\n polygonIndices.push(t2);\r\n polygonIndices.push(t3);\r\n lastWinding = Triangulator.winding(x1, y1, x2, y2, x3, y3);\r\n fanBaseIndex = t1;\r\n }\r\n }\r\n if (polygon.length > 0) {\r\n convexPolygons.push(polygon);\r\n convexPolygonsIndices.push(polygonIndices);\r\n }\r\n for (var i = 0, n = convexPolygons.length; i < n; i++) {\r\n polygonIndices = convexPolygonsIndices[i];\r\n if (polygonIndices.length == 0)\r\n continue;\r\n var firstIndex = polygonIndices[0];\r\n var lastIndex = polygonIndices[polygonIndices.length - 1];\r\n polygon = convexPolygons[i];\r\n var o = polygon.length - 4;\r\n var prevPrevX = polygon[o], prevPrevY = polygon[o + 1];\r\n var prevX = polygon[o + 2], prevY = polygon[o + 3];\r\n var firstX = polygon[0], firstY = polygon[1];\r\n var secondX = polygon[2], secondY = polygon[3];\r\n var winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\r\n for (var ii = 0; ii < n; ii++) {\r\n if (ii == i)\r\n continue;\r\n var otherIndices = convexPolygonsIndices[ii];\r\n if (otherIndices.length != 3)\r\n continue;\r\n var otherFirstIndex = otherIndices[0];\r\n var otherSecondIndex = otherIndices[1];\r\n var otherLastIndex = otherIndices[2];\r\n var otherPoly = convexPolygons[ii];\r\n var x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1];\r\n if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex)\r\n continue;\r\n var winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\r\n var winding2 = Triangulator.winding(x3, y3, firstX, firstY, secondX, secondY);\r\n if (winding1 == winding && winding2 == winding) {\r\n otherPoly.length = 0;\r\n otherIndices.length = 0;\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices.push(otherLastIndex);\r\n prevPrevX = prevX;\r\n prevPrevY = prevY;\r\n prevX = x3;\r\n prevY = y3;\r\n ii = 0;\r\n }\r\n }\r\n }\r\n for (var i = convexPolygons.length - 1; i >= 0; i--) {\r\n polygon = convexPolygons[i];\r\n if (polygon.length == 0) {\r\n convexPolygons.splice(i, 1);\r\n this.polygonPool.free(polygon);\r\n polygonIndices = convexPolygonsIndices[i];\r\n convexPolygonsIndices.splice(i, 1);\r\n this.polygonIndicesPool.free(polygonIndices);\r\n }\r\n }\r\n return convexPolygons;\r\n };\r\n Triangulator.isConcave = function (index, vertexCount, vertices, indices) {\r\n var previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\r\n var current = indices[index] << 1;\r\n var next = indices[(index + 1) % vertexCount] << 1;\r\n return !this.positiveArea(vertices[previous], vertices[previous + 1], vertices[current], vertices[current + 1], vertices[next], vertices[next + 1]);\r\n };\r\n Triangulator.positiveArea = function (p1x, p1y, p2x, p2y, p3x, p3y) {\r\n return p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\r\n };\r\n Triangulator.winding = function (p1x, p1y, p2x, p2y, p3x, p3y) {\r\n var px = p2x - p1x, py = p2y - p1y;\r\n return p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\r\n };\r\n return Triangulator;\r\n }());\r\n spine.Triangulator = Triangulator;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IntSet = (function () {\r\n function IntSet() {\r\n this.array = new Array();\r\n }\r\n IntSet.prototype.add = function (value) {\r\n var contains = this.contains(value);\r\n this.array[value | 0] = value | 0;\r\n return !contains;\r\n };\r\n IntSet.prototype.contains = function (value) {\r\n return this.array[value | 0] != undefined;\r\n };\r\n IntSet.prototype.remove = function (value) {\r\n this.array[value | 0] = undefined;\r\n };\r\n IntSet.prototype.clear = function () {\r\n this.array.length = 0;\r\n };\r\n return IntSet;\r\n }());\r\n spine.IntSet = IntSet;\r\n var Color = (function () {\r\n function Color(r, g, b, a) {\r\n if (r === void 0) { r = 0; }\r\n if (g === void 0) { g = 0; }\r\n if (b === void 0) { b = 0; }\r\n if (a === void 0) { a = 0; }\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n }\r\n Color.prototype.set = function (r, g, b, a) {\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n this.clamp();\r\n return this;\r\n };\r\n Color.prototype.setFromColor = function (c) {\r\n this.r = c.r;\r\n this.g = c.g;\r\n this.b = c.b;\r\n this.a = c.a;\r\n return this;\r\n };\r\n Color.prototype.setFromString = function (hex) {\r\n hex = hex.charAt(0) == '#' ? hex.substr(1) : hex;\r\n this.r = parseInt(hex.substr(0, 2), 16) / 255.0;\r\n this.g = parseInt(hex.substr(2, 2), 16) / 255.0;\r\n this.b = parseInt(hex.substr(4, 2), 16) / 255.0;\r\n this.a = (hex.length != 8 ? 255 : parseInt(hex.substr(6, 2), 16)) / 255.0;\r\n return this;\r\n };\r\n Color.prototype.add = function (r, g, b, a) {\r\n this.r += r;\r\n this.g += g;\r\n this.b += b;\r\n this.a += a;\r\n this.clamp();\r\n return this;\r\n };\r\n Color.prototype.clamp = function () {\r\n if (this.r < 0)\r\n this.r = 0;\r\n else if (this.r > 1)\r\n this.r = 1;\r\n if (this.g < 0)\r\n this.g = 0;\r\n else if (this.g > 1)\r\n this.g = 1;\r\n if (this.b < 0)\r\n this.b = 0;\r\n else if (this.b > 1)\r\n this.b = 1;\r\n if (this.a < 0)\r\n this.a = 0;\r\n else if (this.a > 1)\r\n this.a = 1;\r\n return this;\r\n };\r\n Color.rgba8888ToColor = function (color, value) {\r\n color.r = ((value & 0xff000000) >>> 24) / 255;\r\n color.g = ((value & 0x00ff0000) >>> 16) / 255;\r\n color.b = ((value & 0x0000ff00) >>> 8) / 255;\r\n color.a = ((value & 0x000000ff)) / 255;\r\n };\r\n Color.rgb888ToColor = function (color, value) {\r\n color.r = ((value & 0x00ff0000) >>> 16) / 255;\r\n color.g = ((value & 0x0000ff00) >>> 8) / 255;\r\n color.b = ((value & 0x000000ff)) / 255;\r\n };\r\n Color.WHITE = new Color(1, 1, 1, 1);\r\n Color.RED = new Color(1, 0, 0, 1);\r\n Color.GREEN = new Color(0, 1, 0, 1);\r\n Color.BLUE = new Color(0, 0, 1, 1);\r\n Color.MAGENTA = new Color(1, 0, 1, 1);\r\n return Color;\r\n }());\r\n spine.Color = Color;\r\n var MathUtils = (function () {\r\n function MathUtils() {\r\n }\r\n MathUtils.clamp = function (value, min, max) {\r\n if (value < min)\r\n return min;\r\n if (value > max)\r\n return max;\r\n return value;\r\n };\r\n MathUtils.cosDeg = function (degrees) {\r\n return Math.cos(degrees * MathUtils.degRad);\r\n };\r\n MathUtils.sinDeg = function (degrees) {\r\n return Math.sin(degrees * MathUtils.degRad);\r\n };\r\n MathUtils.signum = function (value) {\r\n return value > 0 ? 1 : value < 0 ? -1 : 0;\r\n };\r\n MathUtils.toInt = function (x) {\r\n return x > 0 ? Math.floor(x) : Math.ceil(x);\r\n };\r\n MathUtils.cbrt = function (x) {\r\n var y = Math.pow(Math.abs(x), 1 / 3);\r\n return x < 0 ? -y : y;\r\n };\r\n MathUtils.randomTriangular = function (min, max) {\r\n return MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\r\n };\r\n MathUtils.randomTriangularWith = function (min, max, mode) {\r\n var u = Math.random();\r\n var d = max - min;\r\n if (u <= (mode - min) / d)\r\n return min + Math.sqrt(u * d * (mode - min));\r\n return max - Math.sqrt((1 - u) * d * (max - mode));\r\n };\r\n MathUtils.PI = 3.1415927;\r\n MathUtils.PI2 = MathUtils.PI * 2;\r\n MathUtils.radiansToDegrees = 180 / MathUtils.PI;\r\n MathUtils.radDeg = MathUtils.radiansToDegrees;\r\n MathUtils.degreesToRadians = MathUtils.PI / 180;\r\n MathUtils.degRad = MathUtils.degreesToRadians;\r\n return MathUtils;\r\n }());\r\n spine.MathUtils = MathUtils;\r\n var Interpolation = (function () {\r\n function Interpolation() {\r\n }\r\n Interpolation.prototype.apply = function (start, end, a) {\r\n return start + (end - start) * this.applyInternal(a);\r\n };\r\n return Interpolation;\r\n }());\r\n spine.Interpolation = Interpolation;\r\n var Pow = (function (_super) {\r\n __extends(Pow, _super);\r\n function Pow(power) {\r\n var _this = _super.call(this) || this;\r\n _this.power = 2;\r\n _this.power = power;\r\n return _this;\r\n }\r\n Pow.prototype.applyInternal = function (a) {\r\n if (a <= 0.5)\r\n return Math.pow(a * 2, this.power) / 2;\r\n return Math.pow((a - 1) * 2, this.power) / (this.power % 2 == 0 ? -2 : 2) + 1;\r\n };\r\n return Pow;\r\n }(Interpolation));\r\n spine.Pow = Pow;\r\n var PowOut = (function (_super) {\r\n __extends(PowOut, _super);\r\n function PowOut(power) {\r\n return _super.call(this, power) || this;\r\n }\r\n PowOut.prototype.applyInternal = function (a) {\r\n return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\r\n };\r\n return PowOut;\r\n }(Pow));\r\n spine.PowOut = PowOut;\r\n var Utils = (function () {\r\n function Utils() {\r\n }\r\n Utils.arrayCopy = function (source, sourceStart, dest, destStart, numElements) {\r\n for (var i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\r\n dest[j] = source[i];\r\n }\r\n };\r\n Utils.setArraySize = function (array, size, value) {\r\n if (value === void 0) { value = 0; }\r\n var oldSize = array.length;\r\n if (oldSize == size)\r\n return array;\r\n array.length = size;\r\n if (oldSize < size) {\r\n for (var i = oldSize; i < size; i++)\r\n array[i] = value;\r\n }\r\n return array;\r\n };\r\n Utils.ensureArrayCapacity = function (array, size, value) {\r\n if (value === void 0) { value = 0; }\r\n if (array.length >= size)\r\n return array;\r\n return Utils.setArraySize(array, size, value);\r\n };\r\n Utils.newArray = function (size, defaultValue) {\r\n var array = new Array(size);\r\n for (var i = 0; i < size; i++)\r\n array[i] = defaultValue;\r\n return array;\r\n };\r\n Utils.newFloatArray = function (size) {\r\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\r\n return new Float32Array(size);\r\n }\r\n else {\r\n var array = new Array(size);\r\n for (var i = 0; i < array.length; i++)\r\n array[i] = 0;\r\n return array;\r\n }\r\n };\r\n Utils.newShortArray = function (size) {\r\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\r\n return new Int16Array(size);\r\n }\r\n else {\r\n var array = new Array(size);\r\n for (var i = 0; i < array.length; i++)\r\n array[i] = 0;\r\n return array;\r\n }\r\n };\r\n Utils.toFloatArray = function (array) {\r\n return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\r\n };\r\n Utils.toSinglePrecision = function (value) {\r\n return Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;\r\n };\r\n Utils.webkit602BugfixHelper = function (alpha, blend) {\r\n };\r\n Utils.contains = function (array, element, identity) {\r\n if (identity === void 0) { identity = true; }\r\n for (var i = 0; i < array.length; i++) {\r\n if (array[i] == element)\r\n return true;\r\n }\r\n return false;\r\n };\r\n Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== \"undefined\";\r\n return Utils;\r\n }());\r\n spine.Utils = Utils;\r\n var DebugUtils = (function () {\r\n function DebugUtils() {\r\n }\r\n DebugUtils.logBones = function (skeleton) {\r\n for (var i = 0; i < skeleton.bones.length; i++) {\r\n var bone = skeleton.bones[i];\r\n console.log(bone.data.name + \", \" + bone.a + \", \" + bone.b + \", \" + bone.c + \", \" + bone.d + \", \" + bone.worldX + \", \" + bone.worldY);\r\n }\r\n };\r\n return DebugUtils;\r\n }());\r\n spine.DebugUtils = DebugUtils;\r\n var Pool = (function () {\r\n function Pool(instantiator) {\r\n this.items = new Array();\r\n this.instantiator = instantiator;\r\n }\r\n Pool.prototype.obtain = function () {\r\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\r\n };\r\n Pool.prototype.free = function (item) {\r\n if (item.reset)\r\n item.reset();\r\n this.items.push(item);\r\n };\r\n Pool.prototype.freeAll = function (items) {\r\n for (var i = 0; i < items.length; i++) {\r\n this.free(items[i]);\r\n }\r\n };\r\n Pool.prototype.clear = function () {\r\n this.items.length = 0;\r\n };\r\n return Pool;\r\n }());\r\n spine.Pool = Pool;\r\n var Vector2 = (function () {\r\n function Vector2(x, y) {\r\n if (x === void 0) { x = 0; }\r\n if (y === void 0) { y = 0; }\r\n this.x = x;\r\n this.y = y;\r\n }\r\n Vector2.prototype.set = function (x, y) {\r\n this.x = x;\r\n this.y = y;\r\n return this;\r\n };\r\n Vector2.prototype.length = function () {\r\n var x = this.x;\r\n var y = this.y;\r\n return Math.sqrt(x * x + y * y);\r\n };\r\n Vector2.prototype.normalize = function () {\r\n var len = this.length();\r\n if (len != 0) {\r\n this.x /= len;\r\n this.y /= len;\r\n }\r\n return this;\r\n };\r\n return Vector2;\r\n }());\r\n spine.Vector2 = Vector2;\r\n var TimeKeeper = (function () {\r\n function TimeKeeper() {\r\n this.maxDelta = 0.064;\r\n this.framesPerSecond = 0;\r\n this.delta = 0;\r\n this.totalTime = 0;\r\n this.lastTime = Date.now() / 1000;\r\n this.frameCount = 0;\r\n this.frameTime = 0;\r\n }\r\n TimeKeeper.prototype.update = function () {\r\n var now = Date.now() / 1000;\r\n this.delta = now - this.lastTime;\r\n this.frameTime += this.delta;\r\n this.totalTime += this.delta;\r\n if (this.delta > this.maxDelta)\r\n this.delta = this.maxDelta;\r\n this.lastTime = now;\r\n this.frameCount++;\r\n if (this.frameTime > 1) {\r\n this.framesPerSecond = this.frameCount / this.frameTime;\r\n this.frameTime = 0;\r\n this.frameCount = 0;\r\n }\r\n };\r\n return TimeKeeper;\r\n }());\r\n spine.TimeKeeper = TimeKeeper;\r\n var WindowedMean = (function () {\r\n function WindowedMean(windowSize) {\r\n if (windowSize === void 0) { windowSize = 32; }\r\n this.addedValues = 0;\r\n this.lastValue = 0;\r\n this.mean = 0;\r\n this.dirty = true;\r\n this.values = new Array(windowSize);\r\n }\r\n WindowedMean.prototype.hasEnoughData = function () {\r\n return this.addedValues >= this.values.length;\r\n };\r\n WindowedMean.prototype.addValue = function (value) {\r\n if (this.addedValues < this.values.length)\r\n this.addedValues++;\r\n this.values[this.lastValue++] = value;\r\n if (this.lastValue > this.values.length - 1)\r\n this.lastValue = 0;\r\n this.dirty = true;\r\n };\r\n WindowedMean.prototype.getMean = function () {\r\n if (this.hasEnoughData()) {\r\n if (this.dirty) {\r\n var mean = 0;\r\n for (var i = 0; i < this.values.length; i++) {\r\n mean += this.values[i];\r\n }\r\n this.mean = mean / this.values.length;\r\n this.dirty = false;\r\n }\r\n return this.mean;\r\n }\r\n else {\r\n return 0;\r\n }\r\n };\r\n return WindowedMean;\r\n }());\r\n spine.WindowedMean = WindowedMean;\r\n})(spine || (spine = {}));\r\n(function () {\r\n if (!Math.fround) {\r\n Math.fround = (function (array) {\r\n return function (x) {\r\n return array[0] = x, array[0];\r\n };\r\n })(new Float32Array(1));\r\n }\r\n})();\r\nvar spine;\r\n(function (spine) {\r\n var Attachment = (function () {\r\n function Attachment(name) {\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n return Attachment;\r\n }());\r\n spine.Attachment = Attachment;\r\n var VertexAttachment = (function (_super) {\r\n __extends(VertexAttachment, _super);\r\n function VertexAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.id = (VertexAttachment.nextID++ & 65535) << 11;\r\n _this.worldVerticesLength = 0;\r\n _this.deformAttachment = _this;\r\n return _this;\r\n }\r\n VertexAttachment.prototype.computeWorldVertices = function (slot, start, count, worldVertices, offset, stride) {\r\n count = offset + (count >> 1) * stride;\r\n var skeleton = slot.bone.skeleton;\r\n var deformArray = slot.deform;\r\n var vertices = this.vertices;\r\n var bones = this.bones;\r\n if (bones == null) {\r\n if (deformArray.length > 0)\r\n vertices = deformArray;\r\n var bone = slot.bone;\r\n var x = bone.worldX;\r\n var y = bone.worldY;\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n for (var v_1 = start, w = offset; w < count; v_1 += 2, w += stride) {\r\n var vx = vertices[v_1], vy = vertices[v_1 + 1];\r\n worldVertices[w] = vx * a + vy * b + x;\r\n worldVertices[w + 1] = vx * c + vy * d + y;\r\n }\r\n return;\r\n }\r\n var v = 0, skip = 0;\r\n for (var i = 0; i < start; i += 2) {\r\n var n = bones[v];\r\n v += n + 1;\r\n skip += n;\r\n }\r\n var skeletonBones = skeleton.bones;\r\n if (deformArray.length == 0) {\r\n for (var w = offset, b = skip * 3; w < count; w += stride) {\r\n var wx = 0, wy = 0;\r\n var n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3) {\r\n var bone = skeletonBones[bones[v]];\r\n var vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];\r\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\r\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\r\n }\r\n worldVertices[w] = wx;\r\n worldVertices[w + 1] = wy;\r\n }\r\n }\r\n else {\r\n var deform = deformArray;\r\n for (var w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\r\n var wx = 0, wy = 0;\r\n var n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3, f += 2) {\r\n var bone = skeletonBones[bones[v]];\r\n var vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];\r\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\r\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\r\n }\r\n worldVertices[w] = wx;\r\n worldVertices[w + 1] = wy;\r\n }\r\n }\r\n };\r\n VertexAttachment.prototype.copyTo = function (attachment) {\r\n if (this.bones != null) {\r\n attachment.bones = new Array(this.bones.length);\r\n spine.Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\r\n }\r\n else\r\n attachment.bones = null;\r\n if (this.vertices != null) {\r\n attachment.vertices = spine.Utils.newFloatArray(this.vertices.length);\r\n spine.Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\r\n }\r\n else\r\n attachment.vertices = null;\r\n attachment.worldVerticesLength = this.worldVerticesLength;\r\n attachment.deformAttachment = this.deformAttachment;\r\n };\r\n VertexAttachment.nextID = 0;\r\n return VertexAttachment;\r\n }(Attachment));\r\n spine.VertexAttachment = VertexAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AttachmentType;\r\n (function (AttachmentType) {\r\n AttachmentType[AttachmentType[\"Region\"] = 0] = \"Region\";\r\n AttachmentType[AttachmentType[\"BoundingBox\"] = 1] = \"BoundingBox\";\r\n AttachmentType[AttachmentType[\"Mesh\"] = 2] = \"Mesh\";\r\n AttachmentType[AttachmentType[\"LinkedMesh\"] = 3] = \"LinkedMesh\";\r\n AttachmentType[AttachmentType[\"Path\"] = 4] = \"Path\";\r\n AttachmentType[AttachmentType[\"Point\"] = 5] = \"Point\";\r\n AttachmentType[AttachmentType[\"Clipping\"] = 6] = \"Clipping\";\r\n })(AttachmentType = spine.AttachmentType || (spine.AttachmentType = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BoundingBoxAttachment = (function (_super) {\r\n __extends(BoundingBoxAttachment, _super);\r\n function BoundingBoxAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n BoundingBoxAttachment.prototype.copy = function () {\r\n var copy = new BoundingBoxAttachment(name);\r\n this.copyTo(copy);\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return BoundingBoxAttachment;\r\n }(spine.VertexAttachment));\r\n spine.BoundingBoxAttachment = BoundingBoxAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var ClippingAttachment = (function (_super) {\r\n __extends(ClippingAttachment, _super);\r\n function ClippingAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(0.2275, 0.2275, 0.8078, 1);\r\n return _this;\r\n }\r\n ClippingAttachment.prototype.copy = function () {\r\n var copy = new ClippingAttachment(name);\r\n this.copyTo(copy);\r\n copy.endSlot = this.endSlot;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return ClippingAttachment;\r\n }(spine.VertexAttachment));\r\n spine.ClippingAttachment = ClippingAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var MeshAttachment = (function (_super) {\r\n __extends(MeshAttachment, _super);\r\n function MeshAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n _this.tempColor = new spine.Color(0, 0, 0, 0);\r\n return _this;\r\n }\r\n MeshAttachment.prototype.updateUVs = function () {\r\n var regionUVs = this.regionUVs;\r\n if (this.uvs == null || this.uvs.length != regionUVs.length)\r\n this.uvs = spine.Utils.newFloatArray(regionUVs.length);\r\n var uvs = this.uvs;\r\n var n = this.uvs.length;\r\n var u = this.region.u, v = this.region.v, width = 0, height = 0;\r\n if (this.region instanceof spine.TextureAtlasRegion) {\r\n var region = this.region;\r\n var textureWidth = region.texture.getImage().width, textureHeight = region.texture.getImage().height;\r\n switch (region.degrees) {\r\n case 90:\r\n u -= (region.originalHeight - region.offsetY - region.height) / textureWidth;\r\n v -= (region.originalWidth - region.offsetX - region.width) / textureHeight;\r\n width = region.originalHeight / textureWidth;\r\n height = region.originalWidth / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + regionUVs[i + 1] * width;\r\n uvs[i + 1] = v + (1 - regionUVs[i]) * height;\r\n }\r\n return;\r\n case 180:\r\n u -= (region.originalWidth - region.offsetX - region.width) / textureWidth;\r\n v -= region.offsetY / textureHeight;\r\n width = region.originalWidth / textureWidth;\r\n height = region.originalHeight / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + (1 - regionUVs[i]) * width;\r\n uvs[i + 1] = v + (1 - regionUVs[i + 1]) * height;\r\n }\r\n return;\r\n case 270:\r\n u -= region.offsetY / textureWidth;\r\n v -= region.offsetX / textureHeight;\r\n width = region.originalHeight / textureWidth;\r\n height = region.originalWidth / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + (1 - regionUVs[i + 1]) * width;\r\n uvs[i + 1] = v + regionUVs[i] * height;\r\n }\r\n return;\r\n }\r\n u -= region.offsetX / textureWidth;\r\n v -= (region.originalHeight - region.offsetY - region.height) / textureHeight;\r\n width = region.originalWidth / textureWidth;\r\n height = region.originalHeight / textureHeight;\r\n }\r\n else if (this.region == null) {\r\n u = v = 0;\r\n width = height = 1;\r\n }\r\n else {\r\n width = this.region.u2 - u;\r\n height = this.region.v2 - v;\r\n }\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + regionUVs[i] * width;\r\n uvs[i + 1] = v + regionUVs[i + 1] * height;\r\n }\r\n };\r\n MeshAttachment.prototype.getParentMesh = function () {\r\n return this.parentMesh;\r\n };\r\n MeshAttachment.prototype.setParentMesh = function (parentMesh) {\r\n this.parentMesh = parentMesh;\r\n if (parentMesh != null) {\r\n this.bones = parentMesh.bones;\r\n this.vertices = parentMesh.vertices;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n this.regionUVs = parentMesh.regionUVs;\r\n this.triangles = parentMesh.triangles;\r\n this.hullLength = parentMesh.hullLength;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n }\r\n };\r\n MeshAttachment.prototype.copy = function () {\r\n if (this.parentMesh != null)\r\n return this.newLinkedMesh();\r\n var copy = new MeshAttachment(this.name);\r\n copy.region = this.region;\r\n copy.path = this.path;\r\n copy.color.setFromColor(this.color);\r\n this.copyTo(copy);\r\n copy.regionUVs = new Array(this.regionUVs.length);\r\n spine.Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\r\n copy.uvs = new Array(this.uvs.length);\r\n spine.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);\r\n copy.triangles = new Array(this.triangles.length);\r\n spine.Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\r\n copy.hullLength = this.hullLength;\r\n if (this.edges != null) {\r\n copy.edges = new Array(this.edges.length);\r\n spine.Utils.arrayCopy(this.edges, 0, copy.edges, 0, this.edges.length);\r\n }\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n return copy;\r\n };\r\n MeshAttachment.prototype.newLinkedMesh = function () {\r\n var copy = new MeshAttachment(this.name);\r\n copy.region = this.region;\r\n copy.path = this.path;\r\n copy.color.setFromColor(this.color);\r\n copy.deformAttachment = this.deformAttachment;\r\n copy.setParentMesh(this.parentMesh != null ? this.parentMesh : this);\r\n copy.updateUVs();\r\n return copy;\r\n };\r\n return MeshAttachment;\r\n }(spine.VertexAttachment));\r\n spine.MeshAttachment = MeshAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathAttachment = (function (_super) {\r\n __extends(PathAttachment, _super);\r\n function PathAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.closed = false;\r\n _this.constantSpeed = false;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n PathAttachment.prototype.copy = function () {\r\n var copy = new PathAttachment(name);\r\n this.copyTo(copy);\r\n copy.lengths = new Array(this.lengths.length);\r\n spine.Utils.arrayCopy(this.lengths, 0, copy.lengths, 0, this.lengths.length);\r\n copy.closed = closed;\r\n copy.constantSpeed = this.constantSpeed;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return PathAttachment;\r\n }(spine.VertexAttachment));\r\n spine.PathAttachment = PathAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PointAttachment = (function (_super) {\r\n __extends(PointAttachment, _super);\r\n function PointAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(0.38, 0.94, 0, 1);\r\n return _this;\r\n }\r\n PointAttachment.prototype.computeWorldPosition = function (bone, point) {\r\n point.x = this.x * bone.a + this.y * bone.b + bone.worldX;\r\n point.y = this.x * bone.c + this.y * bone.d + bone.worldY;\r\n return point;\r\n };\r\n PointAttachment.prototype.computeWorldRotation = function (bone) {\r\n var cos = spine.MathUtils.cosDeg(this.rotation), sin = spine.MathUtils.sinDeg(this.rotation);\r\n var x = cos * bone.a + sin * bone.b;\r\n var y = cos * bone.c + sin * bone.d;\r\n return Math.atan2(y, x) * spine.MathUtils.radDeg;\r\n };\r\n PointAttachment.prototype.copy = function () {\r\n var copy = new PointAttachment(name);\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.rotation = this.rotation;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return PointAttachment;\r\n }(spine.VertexAttachment));\r\n spine.PointAttachment = PointAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var RegionAttachment = (function (_super) {\r\n __extends(RegionAttachment, _super);\r\n function RegionAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.x = 0;\r\n _this.y = 0;\r\n _this.scaleX = 1;\r\n _this.scaleY = 1;\r\n _this.rotation = 0;\r\n _this.width = 0;\r\n _this.height = 0;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n _this.offset = spine.Utils.newFloatArray(8);\r\n _this.uvs = spine.Utils.newFloatArray(8);\r\n _this.tempColor = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n RegionAttachment.prototype.updateOffset = function () {\r\n var regionScaleX = this.width / this.region.originalWidth * this.scaleX;\r\n var regionScaleY = this.height / this.region.originalHeight * this.scaleY;\r\n var localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\r\n var localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\r\n var localX2 = localX + this.region.width * regionScaleX;\r\n var localY2 = localY + this.region.height * regionScaleY;\r\n var radians = this.rotation * Math.PI / 180;\r\n var cos = Math.cos(radians);\r\n var sin = Math.sin(radians);\r\n var localXCos = localX * cos + this.x;\r\n var localXSin = localX * sin;\r\n var localYCos = localY * cos + this.y;\r\n var localYSin = localY * sin;\r\n var localX2Cos = localX2 * cos + this.x;\r\n var localX2Sin = localX2 * sin;\r\n var localY2Cos = localY2 * cos + this.y;\r\n var localY2Sin = localY2 * sin;\r\n var offset = this.offset;\r\n offset[RegionAttachment.OX1] = localXCos - localYSin;\r\n offset[RegionAttachment.OY1] = localYCos + localXSin;\r\n offset[RegionAttachment.OX2] = localXCos - localY2Sin;\r\n offset[RegionAttachment.OY2] = localY2Cos + localXSin;\r\n offset[RegionAttachment.OX3] = localX2Cos - localY2Sin;\r\n offset[RegionAttachment.OY3] = localY2Cos + localX2Sin;\r\n offset[RegionAttachment.OX4] = localX2Cos - localYSin;\r\n offset[RegionAttachment.OY4] = localYCos + localX2Sin;\r\n };\r\n RegionAttachment.prototype.setRegion = function (region) {\r\n this.region = region;\r\n var uvs = this.uvs;\r\n if (region.rotate) {\r\n uvs[2] = region.u;\r\n uvs[3] = region.v2;\r\n uvs[4] = region.u;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v;\r\n uvs[0] = region.u2;\r\n uvs[1] = region.v2;\r\n }\r\n else {\r\n uvs[0] = region.u;\r\n uvs[1] = region.v2;\r\n uvs[2] = region.u;\r\n uvs[3] = region.v;\r\n uvs[4] = region.u2;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v2;\r\n }\r\n };\r\n RegionAttachment.prototype.computeWorldVertices = function (bone, worldVertices, offset, stride) {\r\n var vertexOffset = this.offset;\r\n var x = bone.worldX, y = bone.worldY;\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var offsetX = 0, offsetY = 0;\r\n offsetX = vertexOffset[RegionAttachment.OX1];\r\n offsetY = vertexOffset[RegionAttachment.OY1];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX2];\r\n offsetY = vertexOffset[RegionAttachment.OY2];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX3];\r\n offsetY = vertexOffset[RegionAttachment.OY3];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX4];\r\n offsetY = vertexOffset[RegionAttachment.OY4];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n };\r\n RegionAttachment.prototype.copy = function () {\r\n var copy = new RegionAttachment(this.name);\r\n copy.region = this.region;\r\n copy.rendererObject = this.rendererObject;\r\n copy.path = this.path;\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.scaleX = this.scaleX;\r\n copy.scaleY = this.scaleY;\r\n copy.rotation = this.rotation;\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n spine.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\r\n spine.Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n RegionAttachment.OX1 = 0;\r\n RegionAttachment.OY1 = 1;\r\n RegionAttachment.OX2 = 2;\r\n RegionAttachment.OY2 = 3;\r\n RegionAttachment.OX3 = 4;\r\n RegionAttachment.OY3 = 5;\r\n RegionAttachment.OX4 = 6;\r\n RegionAttachment.OY4 = 7;\r\n RegionAttachment.X1 = 0;\r\n RegionAttachment.Y1 = 1;\r\n RegionAttachment.C1R = 2;\r\n RegionAttachment.C1G = 3;\r\n RegionAttachment.C1B = 4;\r\n RegionAttachment.C1A = 5;\r\n RegionAttachment.U1 = 6;\r\n RegionAttachment.V1 = 7;\r\n RegionAttachment.X2 = 8;\r\n RegionAttachment.Y2 = 9;\r\n RegionAttachment.C2R = 10;\r\n RegionAttachment.C2G = 11;\r\n RegionAttachment.C2B = 12;\r\n RegionAttachment.C2A = 13;\r\n RegionAttachment.U2 = 14;\r\n RegionAttachment.V2 = 15;\r\n RegionAttachment.X3 = 16;\r\n RegionAttachment.Y3 = 17;\r\n RegionAttachment.C3R = 18;\r\n RegionAttachment.C3G = 19;\r\n RegionAttachment.C3B = 20;\r\n RegionAttachment.C3A = 21;\r\n RegionAttachment.U3 = 22;\r\n RegionAttachment.V3 = 23;\r\n RegionAttachment.X4 = 24;\r\n RegionAttachment.Y4 = 25;\r\n RegionAttachment.C4R = 26;\r\n RegionAttachment.C4G = 27;\r\n RegionAttachment.C4B = 28;\r\n RegionAttachment.C4A = 29;\r\n RegionAttachment.U4 = 30;\r\n RegionAttachment.V4 = 31;\r\n return RegionAttachment;\r\n }(spine.Attachment));\r\n spine.RegionAttachment = RegionAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var JitterEffect = (function () {\r\n function JitterEffect(jitterX, jitterY) {\r\n this.jitterX = 0;\r\n this.jitterY = 0;\r\n this.jitterX = jitterX;\r\n this.jitterY = jitterY;\r\n }\r\n JitterEffect.prototype.begin = function (skeleton) {\r\n };\r\n JitterEffect.prototype.transform = function (position, uv, light, dark) {\r\n position.x += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n position.y += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n };\r\n JitterEffect.prototype.end = function () {\r\n };\r\n return JitterEffect;\r\n }());\r\n spine.JitterEffect = JitterEffect;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SwirlEffect = (function () {\r\n function SwirlEffect(radius) {\r\n this.centerX = 0;\r\n this.centerY = 0;\r\n this.radius = 0;\r\n this.angle = 0;\r\n this.worldX = 0;\r\n this.worldY = 0;\r\n this.radius = radius;\r\n }\r\n SwirlEffect.prototype.begin = function (skeleton) {\r\n this.worldX = skeleton.x + this.centerX;\r\n this.worldY = skeleton.y + this.centerY;\r\n };\r\n SwirlEffect.prototype.transform = function (position, uv, light, dark) {\r\n var radAngle = this.angle * spine.MathUtils.degreesToRadians;\r\n var x = position.x - this.worldX;\r\n var y = position.y - this.worldY;\r\n var dist = Math.sqrt(x * x + y * y);\r\n if (dist < this.radius) {\r\n var theta = SwirlEffect.interpolation.apply(0, radAngle, (this.radius - dist) / this.radius);\r\n var cos = Math.cos(theta);\r\n var sin = Math.sin(theta);\r\n position.x = cos * x - sin * y + this.worldX;\r\n position.y = sin * x + cos * y + this.worldY;\r\n }\r\n };\r\n SwirlEffect.prototype.end = function () {\r\n };\r\n SwirlEffect.interpolation = new spine.PowOut(2);\r\n return SwirlEffect;\r\n }());\r\n spine.SwirlEffect = SwirlEffect;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var canvas;\r\n (function (canvas) {\r\n var AssetManager = (function (_super) {\r\n __extends(AssetManager, _super);\r\n function AssetManager(pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n return _super.call(this, function (image) { return new spine.canvas.CanvasTexture(image); }, pathPrefix) || this;\r\n }\r\n return AssetManager;\r\n }(spine.AssetManager));\r\n canvas.AssetManager = AssetManager;\r\n })(canvas = spine.canvas || (spine.canvas = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var canvas;\r\n (function (canvas) {\r\n var CanvasTexture = (function (_super) {\r\n __extends(CanvasTexture, _super);\r\n function CanvasTexture(image) {\r\n return _super.call(this, image) || this;\r\n }\r\n CanvasTexture.prototype.setFilters = function (minFilter, magFilter) { };\r\n CanvasTexture.prototype.setWraps = function (uWrap, vWrap) { };\r\n CanvasTexture.prototype.dispose = function () { };\r\n return CanvasTexture;\r\n }(spine.Texture));\r\n canvas.CanvasTexture = CanvasTexture;\r\n })(canvas = spine.canvas || (spine.canvas = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var canvas;\r\n (function (canvas) {\r\n var SkeletonRenderer = (function () {\r\n function SkeletonRenderer(context) {\r\n this.triangleRendering = false;\r\n this.debugRendering = false;\r\n this.vertices = spine.Utils.newFloatArray(8 * 1024);\r\n this.tempColor = new spine.Color();\r\n this.ctx = context;\r\n }\r\n SkeletonRenderer.prototype.draw = function (skeleton) {\r\n if (this.triangleRendering)\r\n this.drawTriangles(skeleton);\r\n else\r\n this.drawImages(skeleton);\r\n };\r\n SkeletonRenderer.prototype.drawImages = function (skeleton) {\r\n var ctx = this.ctx;\r\n var drawOrder = skeleton.drawOrder;\r\n if (this.debugRendering)\r\n ctx.strokeStyle = \"green\";\r\n ctx.save();\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var slot = drawOrder[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n var regionAttachment = null;\r\n var region = null;\r\n var image = null;\r\n if (attachment instanceof spine.RegionAttachment) {\r\n regionAttachment = attachment;\r\n region = regionAttachment.region;\r\n image = region.texture.getImage();\r\n }\r\n else\r\n continue;\r\n var skeleton_1 = slot.bone.skeleton;\r\n var skeletonColor = skeleton_1.color;\r\n var slotColor = slot.color;\r\n var regionColor = regionAttachment.color;\r\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * regionColor.r, skeletonColor.g * slotColor.g * regionColor.g, skeletonColor.b * slotColor.b * regionColor.b, alpha);\r\n var att = attachment;\r\n var bone = slot.bone;\r\n var w = region.width;\r\n var h = region.height;\r\n ctx.save();\r\n ctx.transform(bone.a, bone.c, bone.b, bone.d, bone.worldX, bone.worldY);\r\n ctx.translate(attachment.offset[0], attachment.offset[1]);\r\n ctx.rotate(attachment.rotation * Math.PI / 180);\r\n var atlasScale = att.width / w;\r\n ctx.scale(atlasScale * attachment.scaleX, atlasScale * attachment.scaleY);\r\n ctx.translate(w / 2, h / 2);\r\n if (attachment.region.rotate) {\r\n var t = w;\r\n w = h;\r\n h = t;\r\n ctx.rotate(-Math.PI / 2);\r\n }\r\n ctx.scale(1, -1);\r\n ctx.translate(-w / 2, -h / 2);\r\n if (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) {\r\n ctx.globalAlpha = color.a;\r\n }\r\n ctx.drawImage(image, region.x, region.y, w, h, 0, 0, w, h);\r\n if (this.debugRendering)\r\n ctx.strokeRect(0, 0, w, h);\r\n ctx.restore();\r\n }\r\n ctx.restore();\r\n };\r\n SkeletonRenderer.prototype.drawTriangles = function (skeleton) {\r\n var blendMode = null;\r\n var vertices = this.vertices;\r\n var triangles = null;\r\n var drawOrder = skeleton.drawOrder;\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var slot = drawOrder[i];\r\n var attachment = slot.getAttachment();\r\n var texture = null;\r\n var region = null;\r\n if (attachment instanceof spine.RegionAttachment) {\r\n var regionAttachment = attachment;\r\n vertices = this.computeRegionVertices(slot, regionAttachment, false);\r\n triangles = SkeletonRenderer.QUAD_TRIANGLES;\r\n region = regionAttachment.region;\r\n texture = region.texture.getImage();\r\n }\r\n else if (attachment instanceof spine.MeshAttachment) {\r\n var mesh = attachment;\r\n vertices = this.computeMeshVertices(slot, mesh, false);\r\n triangles = mesh.triangles;\r\n texture = mesh.region.renderObject.texture.getImage();\r\n }\r\n else\r\n continue;\r\n if (texture != null) {\r\n var slotBlendMode = slot.data.blendMode;\r\n if (slotBlendMode != blendMode) {\r\n blendMode = slotBlendMode;\r\n }\r\n var skeleton_2 = slot.bone.skeleton;\r\n var skeletonColor = skeleton_2.color;\r\n var slotColor = slot.color;\r\n var attachmentColor = attachment.color;\r\n var alpha = skeletonColor.a * slotColor.a * attachmentColor.a;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * attachmentColor.r, skeletonColor.g * slotColor.g * attachmentColor.g, skeletonColor.b * slotColor.b * attachmentColor.b, alpha);\r\n var ctx = this.ctx;\r\n if (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) {\r\n ctx.globalAlpha = color.a;\r\n }\r\n for (var j = 0; j < triangles.length; j += 3) {\r\n var t1 = triangles[j] * 8, t2 = triangles[j + 1] * 8, t3 = triangles[j + 2] * 8;\r\n var x0 = vertices[t1], y0 = vertices[t1 + 1], u0 = vertices[t1 + 6], v0 = vertices[t1 + 7];\r\n var x1 = vertices[t2], y1 = vertices[t2 + 1], u1 = vertices[t2 + 6], v1 = vertices[t2 + 7];\r\n var x2 = vertices[t3], y2 = vertices[t3 + 1], u2 = vertices[t3 + 6], v2 = vertices[t3 + 7];\r\n this.drawTriangle(texture, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2);\r\n if (this.debugRendering) {\r\n ctx.strokeStyle = \"green\";\r\n ctx.beginPath();\r\n ctx.moveTo(x0, y0);\r\n ctx.lineTo(x1, y1);\r\n ctx.lineTo(x2, y2);\r\n ctx.lineTo(x0, y0);\r\n ctx.stroke();\r\n }\r\n }\r\n }\r\n }\r\n this.ctx.globalAlpha = 1;\r\n };\r\n SkeletonRenderer.prototype.drawTriangle = function (img, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2) {\r\n var ctx = this.ctx;\r\n u0 *= img.width;\r\n v0 *= img.height;\r\n u1 *= img.width;\r\n v1 *= img.height;\r\n u2 *= img.width;\r\n v2 *= img.height;\r\n ctx.beginPath();\r\n ctx.moveTo(x0, y0);\r\n ctx.lineTo(x1, y1);\r\n ctx.lineTo(x2, y2);\r\n ctx.closePath();\r\n x1 -= x0;\r\n y1 -= y0;\r\n x2 -= x0;\r\n y2 -= y0;\r\n u1 -= u0;\r\n v1 -= v0;\r\n u2 -= u0;\r\n v2 -= v0;\r\n var det = 1 / (u1 * v2 - u2 * v1), a = (v2 * x1 - v1 * x2) * det, b = (v2 * y1 - v1 * y2) * det, c = (u1 * x2 - u2 * x1) * det, d = (u1 * y2 - u2 * y1) * det, e = x0 - a * u0 - c * v0, f = y0 - b * u0 - d * v0;\r\n ctx.save();\r\n ctx.transform(a, b, c, d, e, f);\r\n ctx.clip();\r\n ctx.drawImage(img, 0, 0);\r\n ctx.restore();\r\n };\r\n SkeletonRenderer.prototype.computeRegionVertices = function (slot, region, pma) {\r\n var skeleton = slot.bone.skeleton;\r\n var skeletonColor = skeleton.color;\r\n var slotColor = slot.color;\r\n var regionColor = region.color;\r\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n var multiplier = pma ? alpha : 1;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha);\r\n region.computeWorldVertices(slot.bone, this.vertices, 0, SkeletonRenderer.VERTEX_SIZE);\r\n var vertices = this.vertices;\r\n var uvs = region.uvs;\r\n vertices[spine.RegionAttachment.C1R] = color.r;\r\n vertices[spine.RegionAttachment.C1G] = color.g;\r\n vertices[spine.RegionAttachment.C1B] = color.b;\r\n vertices[spine.RegionAttachment.C1A] = color.a;\r\n vertices[spine.RegionAttachment.U1] = uvs[0];\r\n vertices[spine.RegionAttachment.V1] = uvs[1];\r\n vertices[spine.RegionAttachment.C2R] = color.r;\r\n vertices[spine.RegionAttachment.C2G] = color.g;\r\n vertices[spine.RegionAttachment.C2B] = color.b;\r\n vertices[spine.RegionAttachment.C2A] = color.a;\r\n vertices[spine.RegionAttachment.U2] = uvs[2];\r\n vertices[spine.RegionAttachment.V2] = uvs[3];\r\n vertices[spine.RegionAttachment.C3R] = color.r;\r\n vertices[spine.RegionAttachment.C3G] = color.g;\r\n vertices[spine.RegionAttachment.C3B] = color.b;\r\n vertices[spine.RegionAttachment.C3A] = color.a;\r\n vertices[spine.RegionAttachment.U3] = uvs[4];\r\n vertices[spine.RegionAttachment.V3] = uvs[5];\r\n vertices[spine.RegionAttachment.C4R] = color.r;\r\n vertices[spine.RegionAttachment.C4G] = color.g;\r\n vertices[spine.RegionAttachment.C4B] = color.b;\r\n vertices[spine.RegionAttachment.C4A] = color.a;\r\n vertices[spine.RegionAttachment.U4] = uvs[6];\r\n vertices[spine.RegionAttachment.V4] = uvs[7];\r\n return vertices;\r\n };\r\n SkeletonRenderer.prototype.computeMeshVertices = function (slot, mesh, pma) {\r\n var skeleton = slot.bone.skeleton;\r\n var skeletonColor = skeleton.color;\r\n var slotColor = slot.color;\r\n var regionColor = mesh.color;\r\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n var multiplier = pma ? alpha : 1;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha);\r\n var numVertices = mesh.worldVerticesLength / 2;\r\n if (this.vertices.length < mesh.worldVerticesLength) {\r\n this.vertices = spine.Utils.newFloatArray(mesh.worldVerticesLength);\r\n }\r\n var vertices = this.vertices;\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, SkeletonRenderer.VERTEX_SIZE);\r\n var uvs = mesh.uvs;\r\n for (var i = 0, n = numVertices, u = 0, v = 2; i < n; i++) {\r\n vertices[v++] = color.r;\r\n vertices[v++] = color.g;\r\n vertices[v++] = color.b;\r\n vertices[v++] = color.a;\r\n vertices[v++] = uvs[u++];\r\n vertices[v++] = uvs[u++];\r\n v += 2;\r\n }\r\n return vertices;\r\n };\r\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n SkeletonRenderer.VERTEX_SIZE = 2 + 2 + 4;\r\n return SkeletonRenderer;\r\n }());\r\n canvas.SkeletonRenderer = SkeletonRenderer;\r\n })(canvas = spine.canvas || (spine.canvas = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var AssetManager = (function (_super) {\r\n __extends(AssetManager, _super);\r\n function AssetManager(context, pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n return _super.call(this, function (image) {\r\n return new spine.webgl.GLTexture(context, image);\r\n }, pathPrefix) || this;\r\n }\r\n return AssetManager;\r\n }(spine.AssetManager));\r\n webgl.AssetManager = AssetManager;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var OrthoCamera = (function () {\r\n function OrthoCamera(viewportWidth, viewportHeight) {\r\n this.position = new webgl.Vector3(0, 0, 0);\r\n this.direction = new webgl.Vector3(0, 0, -1);\r\n this.up = new webgl.Vector3(0, 1, 0);\r\n this.near = 0;\r\n this.far = 100;\r\n this.zoom = 1;\r\n this.viewportWidth = 0;\r\n this.viewportHeight = 0;\r\n this.projectionView = new webgl.Matrix4();\r\n this.inverseProjectionView = new webgl.Matrix4();\r\n this.projection = new webgl.Matrix4();\r\n this.view = new webgl.Matrix4();\r\n this.tmp = new webgl.Vector3();\r\n this.viewportWidth = viewportWidth;\r\n this.viewportHeight = viewportHeight;\r\n this.update();\r\n }\r\n OrthoCamera.prototype.update = function () {\r\n var projection = this.projection;\r\n var view = this.view;\r\n var projectionView = this.projectionView;\r\n var inverseProjectionView = this.inverseProjectionView;\r\n var zoom = this.zoom, viewportWidth = this.viewportWidth, viewportHeight = this.viewportHeight;\r\n projection.ortho(zoom * (-viewportWidth / 2), zoom * (viewportWidth / 2), zoom * (-viewportHeight / 2), zoom * (viewportHeight / 2), this.near, this.far);\r\n view.lookAt(this.position, this.direction, this.up);\r\n projectionView.set(projection.values);\r\n projectionView.multiply(view);\r\n inverseProjectionView.set(projectionView.values).invert();\r\n };\r\n OrthoCamera.prototype.screenToWorld = function (screenCoords, screenWidth, screenHeight) {\r\n var x = screenCoords.x, y = screenHeight - screenCoords.y - 1;\r\n var tmp = this.tmp;\r\n tmp.x = (2 * x) / screenWidth - 1;\r\n tmp.y = (2 * y) / screenHeight - 1;\r\n tmp.z = (2 * screenCoords.z) - 1;\r\n tmp.project(this.inverseProjectionView);\r\n screenCoords.set(tmp.x, tmp.y, tmp.z);\r\n return screenCoords;\r\n };\r\n OrthoCamera.prototype.setViewport = function (viewportWidth, viewportHeight) {\r\n this.viewportWidth = viewportWidth;\r\n this.viewportHeight = viewportHeight;\r\n };\r\n return OrthoCamera;\r\n }());\r\n webgl.OrthoCamera = OrthoCamera;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var GLTexture = (function (_super) {\r\n __extends(GLTexture, _super);\r\n function GLTexture(context, image, useMipMaps) {\r\n if (useMipMaps === void 0) { useMipMaps = false; }\r\n var _this = _super.call(this, image) || this;\r\n _this.texture = null;\r\n _this.boundUnit = 0;\r\n _this.useMipMaps = false;\r\n _this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n _this.useMipMaps = useMipMaps;\r\n _this.restore();\r\n _this.context.addRestorable(_this);\r\n return _this;\r\n }\r\n GLTexture.prototype.setFilters = function (minFilter, magFilter) {\r\n var gl = this.context.gl;\r\n this.bind();\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, minFilter);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, GLTexture.validateMagFilter(magFilter));\r\n };\r\n GLTexture.validateMagFilter = function (magFilter) {\r\n switch (magFilter) {\r\n case spine.TextureFilter.MipMap:\r\n case spine.TextureFilter.MipMapLinearLinear:\r\n case spine.TextureFilter.MipMapLinearNearest:\r\n case spine.TextureFilter.MipMapNearestLinear:\r\n case spine.TextureFilter.MipMapNearestNearest:\r\n return spine.TextureFilter.Linear;\r\n default:\r\n return magFilter;\r\n }\r\n };\r\n GLTexture.prototype.setWraps = function (uWrap, vWrap) {\r\n var gl = this.context.gl;\r\n this.bind();\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, uWrap);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, vWrap);\r\n };\r\n GLTexture.prototype.update = function (useMipMaps) {\r\n var gl = this.context.gl;\r\n if (!this.texture) {\r\n this.texture = this.context.gl.createTexture();\r\n }\r\n this.bind();\r\n if (GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL)\r\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\r\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this._image);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, useMipMaps ? gl.LINEAR_MIPMAP_LINEAR : gl.LINEAR);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\r\n if (useMipMaps)\r\n gl.generateMipmap(gl.TEXTURE_2D);\r\n };\r\n GLTexture.prototype.restore = function () {\r\n this.texture = null;\r\n this.update(this.useMipMaps);\r\n };\r\n GLTexture.prototype.bind = function (unit) {\r\n if (unit === void 0) { unit = 0; }\r\n var gl = this.context.gl;\r\n this.boundUnit = unit;\r\n gl.activeTexture(gl.TEXTURE0 + unit);\r\n gl.bindTexture(gl.TEXTURE_2D, this.texture);\r\n };\r\n GLTexture.prototype.unbind = function () {\r\n var gl = this.context.gl;\r\n gl.activeTexture(gl.TEXTURE0 + this.boundUnit);\r\n gl.bindTexture(gl.TEXTURE_2D, null);\r\n };\r\n GLTexture.prototype.dispose = function () {\r\n this.context.removeRestorable(this);\r\n var gl = this.context.gl;\r\n gl.deleteTexture(this.texture);\r\n };\r\n GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL = false;\r\n return GLTexture;\r\n }(spine.Texture));\r\n webgl.GLTexture = GLTexture;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n webgl.M00 = 0;\r\n webgl.M01 = 4;\r\n webgl.M02 = 8;\r\n webgl.M03 = 12;\r\n webgl.M10 = 1;\r\n webgl.M11 = 5;\r\n webgl.M12 = 9;\r\n webgl.M13 = 13;\r\n webgl.M20 = 2;\r\n webgl.M21 = 6;\r\n webgl.M22 = 10;\r\n webgl.M23 = 14;\r\n webgl.M30 = 3;\r\n webgl.M31 = 7;\r\n webgl.M32 = 11;\r\n webgl.M33 = 15;\r\n var Matrix4 = (function () {\r\n function Matrix4() {\r\n this.temp = new Float32Array(16);\r\n this.values = new Float32Array(16);\r\n var v = this.values;\r\n v[webgl.M00] = 1;\r\n v[webgl.M11] = 1;\r\n v[webgl.M22] = 1;\r\n v[webgl.M33] = 1;\r\n }\r\n Matrix4.prototype.set = function (values) {\r\n this.values.set(values);\r\n return this;\r\n };\r\n Matrix4.prototype.transpose = function () {\r\n var t = this.temp;\r\n var v = this.values;\r\n t[webgl.M00] = v[webgl.M00];\r\n t[webgl.M01] = v[webgl.M10];\r\n t[webgl.M02] = v[webgl.M20];\r\n t[webgl.M03] = v[webgl.M30];\r\n t[webgl.M10] = v[webgl.M01];\r\n t[webgl.M11] = v[webgl.M11];\r\n t[webgl.M12] = v[webgl.M21];\r\n t[webgl.M13] = v[webgl.M31];\r\n t[webgl.M20] = v[webgl.M02];\r\n t[webgl.M21] = v[webgl.M12];\r\n t[webgl.M22] = v[webgl.M22];\r\n t[webgl.M23] = v[webgl.M32];\r\n t[webgl.M30] = v[webgl.M03];\r\n t[webgl.M31] = v[webgl.M13];\r\n t[webgl.M32] = v[webgl.M23];\r\n t[webgl.M33] = v[webgl.M33];\r\n return this.set(t);\r\n };\r\n Matrix4.prototype.identity = function () {\r\n var v = this.values;\r\n v[webgl.M00] = 1;\r\n v[webgl.M01] = 0;\r\n v[webgl.M02] = 0;\r\n v[webgl.M03] = 0;\r\n v[webgl.M10] = 0;\r\n v[webgl.M11] = 1;\r\n v[webgl.M12] = 0;\r\n v[webgl.M13] = 0;\r\n v[webgl.M20] = 0;\r\n v[webgl.M21] = 0;\r\n v[webgl.M22] = 1;\r\n v[webgl.M23] = 0;\r\n v[webgl.M30] = 0;\r\n v[webgl.M31] = 0;\r\n v[webgl.M32] = 0;\r\n v[webgl.M33] = 1;\r\n return this;\r\n };\r\n Matrix4.prototype.invert = function () {\r\n var v = this.values;\r\n var t = this.temp;\r\n var l_det = v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03]\r\n + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03]\r\n - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13]\r\n - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13]\r\n + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23]\r\n + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23]\r\n - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33]\r\n - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\r\n if (l_det == 0)\r\n throw new Error(\"non-invertible matrix\");\r\n var inv_det = 1.0 / l_det;\r\n t[webgl.M00] = v[webgl.M12] * v[webgl.M23] * v[webgl.M31] - v[webgl.M13] * v[webgl.M22] * v[webgl.M31] + v[webgl.M13] * v[webgl.M21] * v[webgl.M32]\r\n - v[webgl.M11] * v[webgl.M23] * v[webgl.M32] - v[webgl.M12] * v[webgl.M21] * v[webgl.M33] + v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M01] = v[webgl.M03] * v[webgl.M22] * v[webgl.M31] - v[webgl.M02] * v[webgl.M23] * v[webgl.M31] - v[webgl.M03] * v[webgl.M21] * v[webgl.M32]\r\n + v[webgl.M01] * v[webgl.M23] * v[webgl.M32] + v[webgl.M02] * v[webgl.M21] * v[webgl.M33] - v[webgl.M01] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M02] = v[webgl.M02] * v[webgl.M13] * v[webgl.M31] - v[webgl.M03] * v[webgl.M12] * v[webgl.M31] + v[webgl.M03] * v[webgl.M11] * v[webgl.M32]\r\n - v[webgl.M01] * v[webgl.M13] * v[webgl.M32] - v[webgl.M02] * v[webgl.M11] * v[webgl.M33] + v[webgl.M01] * v[webgl.M12] * v[webgl.M33];\r\n t[webgl.M03] = v[webgl.M03] * v[webgl.M12] * v[webgl.M21] - v[webgl.M02] * v[webgl.M13] * v[webgl.M21] - v[webgl.M03] * v[webgl.M11] * v[webgl.M22]\r\n + v[webgl.M01] * v[webgl.M13] * v[webgl.M22] + v[webgl.M02] * v[webgl.M11] * v[webgl.M23] - v[webgl.M01] * v[webgl.M12] * v[webgl.M23];\r\n t[webgl.M10] = v[webgl.M13] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M20] * v[webgl.M32]\r\n + v[webgl.M10] * v[webgl.M23] * v[webgl.M32] + v[webgl.M12] * v[webgl.M20] * v[webgl.M33] - v[webgl.M10] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M11] = v[webgl.M02] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M22] * v[webgl.M30] + v[webgl.M03] * v[webgl.M20] * v[webgl.M32]\r\n - v[webgl.M00] * v[webgl.M23] * v[webgl.M32] - v[webgl.M02] * v[webgl.M20] * v[webgl.M33] + v[webgl.M00] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M12] = v[webgl.M03] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M10] * v[webgl.M32]\r\n + v[webgl.M00] * v[webgl.M13] * v[webgl.M32] + v[webgl.M02] * v[webgl.M10] * v[webgl.M33] - v[webgl.M00] * v[webgl.M12] * v[webgl.M33];\r\n t[webgl.M13] = v[webgl.M02] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M12] * v[webgl.M20] + v[webgl.M03] * v[webgl.M10] * v[webgl.M22]\r\n - v[webgl.M00] * v[webgl.M13] * v[webgl.M22] - v[webgl.M02] * v[webgl.M10] * v[webgl.M23] + v[webgl.M00] * v[webgl.M12] * v[webgl.M23];\r\n t[webgl.M20] = v[webgl.M11] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M21] * v[webgl.M30] + v[webgl.M13] * v[webgl.M20] * v[webgl.M31]\r\n - v[webgl.M10] * v[webgl.M23] * v[webgl.M31] - v[webgl.M11] * v[webgl.M20] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M33];\r\n t[webgl.M21] = v[webgl.M03] * v[webgl.M21] * v[webgl.M30] - v[webgl.M01] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M20] * v[webgl.M31]\r\n + v[webgl.M00] * v[webgl.M23] * v[webgl.M31] + v[webgl.M01] * v[webgl.M20] * v[webgl.M33] - v[webgl.M00] * v[webgl.M21] * v[webgl.M33];\r\n t[webgl.M22] = v[webgl.M01] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M11] * v[webgl.M30] + v[webgl.M03] * v[webgl.M10] * v[webgl.M31]\r\n - v[webgl.M00] * v[webgl.M13] * v[webgl.M31] - v[webgl.M01] * v[webgl.M10] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M33];\r\n t[webgl.M23] = v[webgl.M03] * v[webgl.M11] * v[webgl.M20] - v[webgl.M01] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M10] * v[webgl.M21]\r\n + v[webgl.M00] * v[webgl.M13] * v[webgl.M21] + v[webgl.M01] * v[webgl.M10] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M23];\r\n t[webgl.M30] = v[webgl.M12] * v[webgl.M21] * v[webgl.M30] - v[webgl.M11] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M20] * v[webgl.M31]\r\n + v[webgl.M10] * v[webgl.M22] * v[webgl.M31] + v[webgl.M11] * v[webgl.M20] * v[webgl.M32] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32];\r\n t[webgl.M31] = v[webgl.M01] * v[webgl.M22] * v[webgl.M30] - v[webgl.M02] * v[webgl.M21] * v[webgl.M30] + v[webgl.M02] * v[webgl.M20] * v[webgl.M31]\r\n - v[webgl.M00] * v[webgl.M22] * v[webgl.M31] - v[webgl.M01] * v[webgl.M20] * v[webgl.M32] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32];\r\n t[webgl.M32] = v[webgl.M02] * v[webgl.M11] * v[webgl.M30] - v[webgl.M01] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M10] * v[webgl.M31]\r\n + v[webgl.M00] * v[webgl.M12] * v[webgl.M31] + v[webgl.M01] * v[webgl.M10] * v[webgl.M32] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32];\r\n t[webgl.M33] = v[webgl.M01] * v[webgl.M12] * v[webgl.M20] - v[webgl.M02] * v[webgl.M11] * v[webgl.M20] + v[webgl.M02] * v[webgl.M10] * v[webgl.M21]\r\n - v[webgl.M00] * v[webgl.M12] * v[webgl.M21] - v[webgl.M01] * v[webgl.M10] * v[webgl.M22] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22];\r\n v[webgl.M00] = t[webgl.M00] * inv_det;\r\n v[webgl.M01] = t[webgl.M01] * inv_det;\r\n v[webgl.M02] = t[webgl.M02] * inv_det;\r\n v[webgl.M03] = t[webgl.M03] * inv_det;\r\n v[webgl.M10] = t[webgl.M10] * inv_det;\r\n v[webgl.M11] = t[webgl.M11] * inv_det;\r\n v[webgl.M12] = t[webgl.M12] * inv_det;\r\n v[webgl.M13] = t[webgl.M13] * inv_det;\r\n v[webgl.M20] = t[webgl.M20] * inv_det;\r\n v[webgl.M21] = t[webgl.M21] * inv_det;\r\n v[webgl.M22] = t[webgl.M22] * inv_det;\r\n v[webgl.M23] = t[webgl.M23] * inv_det;\r\n v[webgl.M30] = t[webgl.M30] * inv_det;\r\n v[webgl.M31] = t[webgl.M31] * inv_det;\r\n v[webgl.M32] = t[webgl.M32] * inv_det;\r\n v[webgl.M33] = t[webgl.M33] * inv_det;\r\n return this;\r\n };\r\n Matrix4.prototype.determinant = function () {\r\n var v = this.values;\r\n return v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03]\r\n + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03]\r\n - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13]\r\n - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13]\r\n + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23]\r\n + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23]\r\n - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33]\r\n - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\r\n };\r\n Matrix4.prototype.translate = function (x, y, z) {\r\n var v = this.values;\r\n v[webgl.M03] += x;\r\n v[webgl.M13] += y;\r\n v[webgl.M23] += z;\r\n return this;\r\n };\r\n Matrix4.prototype.copy = function () {\r\n return new Matrix4().set(this.values);\r\n };\r\n Matrix4.prototype.projection = function (near, far, fovy, aspectRatio) {\r\n this.identity();\r\n var l_fd = (1.0 / Math.tan((fovy * (Math.PI / 180)) / 2.0));\r\n var l_a1 = (far + near) / (near - far);\r\n var l_a2 = (2 * far * near) / (near - far);\r\n var v = this.values;\r\n v[webgl.M00] = l_fd / aspectRatio;\r\n v[webgl.M10] = 0;\r\n v[webgl.M20] = 0;\r\n v[webgl.M30] = 0;\r\n v[webgl.M01] = 0;\r\n v[webgl.M11] = l_fd;\r\n v[webgl.M21] = 0;\r\n v[webgl.M31] = 0;\r\n v[webgl.M02] = 0;\r\n v[webgl.M12] = 0;\r\n v[webgl.M22] = l_a1;\r\n v[webgl.M32] = -1;\r\n v[webgl.M03] = 0;\r\n v[webgl.M13] = 0;\r\n v[webgl.M23] = l_a2;\r\n v[webgl.M33] = 0;\r\n return this;\r\n };\r\n Matrix4.prototype.ortho2d = function (x, y, width, height) {\r\n return this.ortho(x, x + width, y, y + height, 0, 1);\r\n };\r\n Matrix4.prototype.ortho = function (left, right, bottom, top, near, far) {\r\n this.identity();\r\n var x_orth = 2 / (right - left);\r\n var y_orth = 2 / (top - bottom);\r\n var z_orth = -2 / (far - near);\r\n var tx = -(right + left) / (right - left);\r\n var ty = -(top + bottom) / (top - bottom);\r\n var tz = -(far + near) / (far - near);\r\n var v = this.values;\r\n v[webgl.M00] = x_orth;\r\n v[webgl.M10] = 0;\r\n v[webgl.M20] = 0;\r\n v[webgl.M30] = 0;\r\n v[webgl.M01] = 0;\r\n v[webgl.M11] = y_orth;\r\n v[webgl.M21] = 0;\r\n v[webgl.M31] = 0;\r\n v[webgl.M02] = 0;\r\n v[webgl.M12] = 0;\r\n v[webgl.M22] = z_orth;\r\n v[webgl.M32] = 0;\r\n v[webgl.M03] = tx;\r\n v[webgl.M13] = ty;\r\n v[webgl.M23] = tz;\r\n v[webgl.M33] = 1;\r\n return this;\r\n };\r\n Matrix4.prototype.multiply = function (matrix) {\r\n var t = this.temp;\r\n var v = this.values;\r\n var m = matrix.values;\r\n t[webgl.M00] = v[webgl.M00] * m[webgl.M00] + v[webgl.M01] * m[webgl.M10] + v[webgl.M02] * m[webgl.M20] + v[webgl.M03] * m[webgl.M30];\r\n t[webgl.M01] = v[webgl.M00] * m[webgl.M01] + v[webgl.M01] * m[webgl.M11] + v[webgl.M02] * m[webgl.M21] + v[webgl.M03] * m[webgl.M31];\r\n t[webgl.M02] = v[webgl.M00] * m[webgl.M02] + v[webgl.M01] * m[webgl.M12] + v[webgl.M02] * m[webgl.M22] + v[webgl.M03] * m[webgl.M32];\r\n t[webgl.M03] = v[webgl.M00] * m[webgl.M03] + v[webgl.M01] * m[webgl.M13] + v[webgl.M02] * m[webgl.M23] + v[webgl.M03] * m[webgl.M33];\r\n t[webgl.M10] = v[webgl.M10] * m[webgl.M00] + v[webgl.M11] * m[webgl.M10] + v[webgl.M12] * m[webgl.M20] + v[webgl.M13] * m[webgl.M30];\r\n t[webgl.M11] = v[webgl.M10] * m[webgl.M01] + v[webgl.M11] * m[webgl.M11] + v[webgl.M12] * m[webgl.M21] + v[webgl.M13] * m[webgl.M31];\r\n t[webgl.M12] = v[webgl.M10] * m[webgl.M02] + v[webgl.M11] * m[webgl.M12] + v[webgl.M12] * m[webgl.M22] + v[webgl.M13] * m[webgl.M32];\r\n t[webgl.M13] = v[webgl.M10] * m[webgl.M03] + v[webgl.M11] * m[webgl.M13] + v[webgl.M12] * m[webgl.M23] + v[webgl.M13] * m[webgl.M33];\r\n t[webgl.M20] = v[webgl.M20] * m[webgl.M00] + v[webgl.M21] * m[webgl.M10] + v[webgl.M22] * m[webgl.M20] + v[webgl.M23] * m[webgl.M30];\r\n t[webgl.M21] = v[webgl.M20] * m[webgl.M01] + v[webgl.M21] * m[webgl.M11] + v[webgl.M22] * m[webgl.M21] + v[webgl.M23] * m[webgl.M31];\r\n t[webgl.M22] = v[webgl.M20] * m[webgl.M02] + v[webgl.M21] * m[webgl.M12] + v[webgl.M22] * m[webgl.M22] + v[webgl.M23] * m[webgl.M32];\r\n t[webgl.M23] = v[webgl.M20] * m[webgl.M03] + v[webgl.M21] * m[webgl.M13] + v[webgl.M22] * m[webgl.M23] + v[webgl.M23] * m[webgl.M33];\r\n t[webgl.M30] = v[webgl.M30] * m[webgl.M00] + v[webgl.M31] * m[webgl.M10] + v[webgl.M32] * m[webgl.M20] + v[webgl.M33] * m[webgl.M30];\r\n t[webgl.M31] = v[webgl.M30] * m[webgl.M01] + v[webgl.M31] * m[webgl.M11] + v[webgl.M32] * m[webgl.M21] + v[webgl.M33] * m[webgl.M31];\r\n t[webgl.M32] = v[webgl.M30] * m[webgl.M02] + v[webgl.M31] * m[webgl.M12] + v[webgl.M32] * m[webgl.M22] + v[webgl.M33] * m[webgl.M32];\r\n t[webgl.M33] = v[webgl.M30] * m[webgl.M03] + v[webgl.M31] * m[webgl.M13] + v[webgl.M32] * m[webgl.M23] + v[webgl.M33] * m[webgl.M33];\r\n return this.set(this.temp);\r\n };\r\n Matrix4.prototype.multiplyLeft = function (matrix) {\r\n var t = this.temp;\r\n var v = this.values;\r\n var m = matrix.values;\r\n t[webgl.M00] = m[webgl.M00] * v[webgl.M00] + m[webgl.M01] * v[webgl.M10] + m[webgl.M02] * v[webgl.M20] + m[webgl.M03] * v[webgl.M30];\r\n t[webgl.M01] = m[webgl.M00] * v[webgl.M01] + m[webgl.M01] * v[webgl.M11] + m[webgl.M02] * v[webgl.M21] + m[webgl.M03] * v[webgl.M31];\r\n t[webgl.M02] = m[webgl.M00] * v[webgl.M02] + m[webgl.M01] * v[webgl.M12] + m[webgl.M02] * v[webgl.M22] + m[webgl.M03] * v[webgl.M32];\r\n t[webgl.M03] = m[webgl.M00] * v[webgl.M03] + m[webgl.M01] * v[webgl.M13] + m[webgl.M02] * v[webgl.M23] + m[webgl.M03] * v[webgl.M33];\r\n t[webgl.M10] = m[webgl.M10] * v[webgl.M00] + m[webgl.M11] * v[webgl.M10] + m[webgl.M12] * v[webgl.M20] + m[webgl.M13] * v[webgl.M30];\r\n t[webgl.M11] = m[webgl.M10] * v[webgl.M01] + m[webgl.M11] * v[webgl.M11] + m[webgl.M12] * v[webgl.M21] + m[webgl.M13] * v[webgl.M31];\r\n t[webgl.M12] = m[webgl.M10] * v[webgl.M02] + m[webgl.M11] * v[webgl.M12] + m[webgl.M12] * v[webgl.M22] + m[webgl.M13] * v[webgl.M32];\r\n t[webgl.M13] = m[webgl.M10] * v[webgl.M03] + m[webgl.M11] * v[webgl.M13] + m[webgl.M12] * v[webgl.M23] + m[webgl.M13] * v[webgl.M33];\r\n t[webgl.M20] = m[webgl.M20] * v[webgl.M00] + m[webgl.M21] * v[webgl.M10] + m[webgl.M22] * v[webgl.M20] + m[webgl.M23] * v[webgl.M30];\r\n t[webgl.M21] = m[webgl.M20] * v[webgl.M01] + m[webgl.M21] * v[webgl.M11] + m[webgl.M22] * v[webgl.M21] + m[webgl.M23] * v[webgl.M31];\r\n t[webgl.M22] = m[webgl.M20] * v[webgl.M02] + m[webgl.M21] * v[webgl.M12] + m[webgl.M22] * v[webgl.M22] + m[webgl.M23] * v[webgl.M32];\r\n t[webgl.M23] = m[webgl.M20] * v[webgl.M03] + m[webgl.M21] * v[webgl.M13] + m[webgl.M22] * v[webgl.M23] + m[webgl.M23] * v[webgl.M33];\r\n t[webgl.M30] = m[webgl.M30] * v[webgl.M00] + m[webgl.M31] * v[webgl.M10] + m[webgl.M32] * v[webgl.M20] + m[webgl.M33] * v[webgl.M30];\r\n t[webgl.M31] = m[webgl.M30] * v[webgl.M01] + m[webgl.M31] * v[webgl.M11] + m[webgl.M32] * v[webgl.M21] + m[webgl.M33] * v[webgl.M31];\r\n t[webgl.M32] = m[webgl.M30] * v[webgl.M02] + m[webgl.M31] * v[webgl.M12] + m[webgl.M32] * v[webgl.M22] + m[webgl.M33] * v[webgl.M32];\r\n t[webgl.M33] = m[webgl.M30] * v[webgl.M03] + m[webgl.M31] * v[webgl.M13] + m[webgl.M32] * v[webgl.M23] + m[webgl.M33] * v[webgl.M33];\r\n return this.set(this.temp);\r\n };\r\n Matrix4.prototype.lookAt = function (position, direction, up) {\r\n Matrix4.initTemps();\r\n var xAxis = Matrix4.xAxis, yAxis = Matrix4.yAxis, zAxis = Matrix4.zAxis;\r\n zAxis.setFrom(direction).normalize();\r\n xAxis.setFrom(direction).normalize();\r\n xAxis.cross(up).normalize();\r\n yAxis.setFrom(xAxis).cross(zAxis).normalize();\r\n this.identity();\r\n var val = this.values;\r\n val[webgl.M00] = xAxis.x;\r\n val[webgl.M01] = xAxis.y;\r\n val[webgl.M02] = xAxis.z;\r\n val[webgl.M10] = yAxis.x;\r\n val[webgl.M11] = yAxis.y;\r\n val[webgl.M12] = yAxis.z;\r\n val[webgl.M20] = -zAxis.x;\r\n val[webgl.M21] = -zAxis.y;\r\n val[webgl.M22] = -zAxis.z;\r\n Matrix4.tmpMatrix.identity();\r\n Matrix4.tmpMatrix.values[webgl.M03] = -position.x;\r\n Matrix4.tmpMatrix.values[webgl.M13] = -position.y;\r\n Matrix4.tmpMatrix.values[webgl.M23] = -position.z;\r\n this.multiply(Matrix4.tmpMatrix);\r\n return this;\r\n };\r\n Matrix4.initTemps = function () {\r\n if (Matrix4.xAxis === null)\r\n Matrix4.xAxis = new webgl.Vector3();\r\n if (Matrix4.yAxis === null)\r\n Matrix4.yAxis = new webgl.Vector3();\r\n if (Matrix4.zAxis === null)\r\n Matrix4.zAxis = new webgl.Vector3();\r\n };\r\n Matrix4.xAxis = null;\r\n Matrix4.yAxis = null;\r\n Matrix4.zAxis = null;\r\n Matrix4.tmpMatrix = new Matrix4();\r\n return Matrix4;\r\n }());\r\n webgl.Matrix4 = Matrix4;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Mesh = (function () {\r\n function Mesh(context, attributes, maxVertices, maxIndices) {\r\n this.attributes = attributes;\r\n this.verticesLength = 0;\r\n this.dirtyVertices = false;\r\n this.indicesLength = 0;\r\n this.dirtyIndices = false;\r\n this.elementsPerVertex = 0;\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.elementsPerVertex = 0;\r\n for (var i = 0; i < attributes.length; i++) {\r\n this.elementsPerVertex += attributes[i].numElements;\r\n }\r\n this.vertices = new Float32Array(maxVertices * this.elementsPerVertex);\r\n this.indices = new Uint16Array(maxIndices);\r\n this.context.addRestorable(this);\r\n }\r\n Mesh.prototype.getAttributes = function () { return this.attributes; };\r\n Mesh.prototype.maxVertices = function () { return this.vertices.length / this.elementsPerVertex; };\r\n Mesh.prototype.numVertices = function () { return this.verticesLength / this.elementsPerVertex; };\r\n Mesh.prototype.setVerticesLength = function (length) {\r\n this.dirtyVertices = true;\r\n this.verticesLength = length;\r\n };\r\n Mesh.prototype.getVertices = function () { return this.vertices; };\r\n Mesh.prototype.maxIndices = function () { return this.indices.length; };\r\n Mesh.prototype.numIndices = function () { return this.indicesLength; };\r\n Mesh.prototype.setIndicesLength = function (length) {\r\n this.dirtyIndices = true;\r\n this.indicesLength = length;\r\n };\r\n Mesh.prototype.getIndices = function () { return this.indices; };\r\n ;\r\n Mesh.prototype.getVertexSizeInFloats = function () {\r\n var size = 0;\r\n for (var i = 0; i < this.attributes.length; i++) {\r\n var attribute = this.attributes[i];\r\n size += attribute.numElements;\r\n }\r\n return size;\r\n };\r\n Mesh.prototype.setVertices = function (vertices) {\r\n this.dirtyVertices = true;\r\n if (vertices.length > this.vertices.length)\r\n throw Error(\"Mesh can't store more than \" + this.maxVertices() + \" vertices\");\r\n this.vertices.set(vertices, 0);\r\n this.verticesLength = vertices.length;\r\n };\r\n Mesh.prototype.setIndices = function (indices) {\r\n this.dirtyIndices = true;\r\n if (indices.length > this.indices.length)\r\n throw Error(\"Mesh can't store more than \" + this.maxIndices() + \" indices\");\r\n this.indices.set(indices, 0);\r\n this.indicesLength = indices.length;\r\n };\r\n Mesh.prototype.draw = function (shader, primitiveType) {\r\n this.drawWithOffset(shader, primitiveType, 0, this.indicesLength > 0 ? this.indicesLength : this.verticesLength / this.elementsPerVertex);\r\n };\r\n Mesh.prototype.drawWithOffset = function (shader, primitiveType, offset, count) {\r\n var gl = this.context.gl;\r\n if (this.dirtyVertices || this.dirtyIndices)\r\n this.update();\r\n this.bind(shader);\r\n if (this.indicesLength > 0) {\r\n gl.drawElements(primitiveType, count, gl.UNSIGNED_SHORT, offset * 2);\r\n }\r\n else {\r\n gl.drawArrays(primitiveType, offset, count);\r\n }\r\n this.unbind(shader);\r\n };\r\n Mesh.prototype.bind = function (shader) {\r\n var gl = this.context.gl;\r\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\r\n var offset = 0;\r\n for (var i = 0; i < this.attributes.length; i++) {\r\n var attrib = this.attributes[i];\r\n var location_1 = shader.getAttributeLocation(attrib.name);\r\n gl.enableVertexAttribArray(location_1);\r\n gl.vertexAttribPointer(location_1, attrib.numElements, gl.FLOAT, false, this.elementsPerVertex * 4, offset * 4);\r\n offset += attrib.numElements;\r\n }\r\n if (this.indicesLength > 0)\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\r\n };\r\n Mesh.prototype.unbind = function (shader) {\r\n var gl = this.context.gl;\r\n for (var i = 0; i < this.attributes.length; i++) {\r\n var attrib = this.attributes[i];\r\n var location_2 = shader.getAttributeLocation(attrib.name);\r\n gl.disableVertexAttribArray(location_2);\r\n }\r\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\r\n if (this.indicesLength > 0)\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);\r\n };\r\n Mesh.prototype.update = function () {\r\n var gl = this.context.gl;\r\n if (this.dirtyVertices) {\r\n if (!this.verticesBuffer) {\r\n this.verticesBuffer = gl.createBuffer();\r\n }\r\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\r\n gl.bufferData(gl.ARRAY_BUFFER, this.vertices.subarray(0, this.verticesLength), gl.DYNAMIC_DRAW);\r\n this.dirtyVertices = false;\r\n }\r\n if (this.dirtyIndices) {\r\n if (!this.indicesBuffer) {\r\n this.indicesBuffer = gl.createBuffer();\r\n }\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\r\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, this.indices.subarray(0, this.indicesLength), gl.DYNAMIC_DRAW);\r\n this.dirtyIndices = false;\r\n }\r\n };\r\n Mesh.prototype.restore = function () {\r\n this.verticesBuffer = null;\r\n this.indicesBuffer = null;\r\n this.update();\r\n };\r\n Mesh.prototype.dispose = function () {\r\n this.context.removeRestorable(this);\r\n var gl = this.context.gl;\r\n gl.deleteBuffer(this.verticesBuffer);\r\n gl.deleteBuffer(this.indicesBuffer);\r\n };\r\n return Mesh;\r\n }());\r\n webgl.Mesh = Mesh;\r\n var VertexAttribute = (function () {\r\n function VertexAttribute(name, type, numElements) {\r\n this.name = name;\r\n this.type = type;\r\n this.numElements = numElements;\r\n }\r\n return VertexAttribute;\r\n }());\r\n webgl.VertexAttribute = VertexAttribute;\r\n var Position2Attribute = (function (_super) {\r\n __extends(Position2Attribute, _super);\r\n function Position2Attribute() {\r\n return _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 2) || this;\r\n }\r\n return Position2Attribute;\r\n }(VertexAttribute));\r\n webgl.Position2Attribute = Position2Attribute;\r\n var Position3Attribute = (function (_super) {\r\n __extends(Position3Attribute, _super);\r\n function Position3Attribute() {\r\n return _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 3) || this;\r\n }\r\n return Position3Attribute;\r\n }(VertexAttribute));\r\n webgl.Position3Attribute = Position3Attribute;\r\n var TexCoordAttribute = (function (_super) {\r\n __extends(TexCoordAttribute, _super);\r\n function TexCoordAttribute(unit) {\r\n if (unit === void 0) { unit = 0; }\r\n return _super.call(this, webgl.Shader.TEXCOORDS + (unit == 0 ? \"\" : unit), VertexAttributeType.Float, 2) || this;\r\n }\r\n return TexCoordAttribute;\r\n }(VertexAttribute));\r\n webgl.TexCoordAttribute = TexCoordAttribute;\r\n var ColorAttribute = (function (_super) {\r\n __extends(ColorAttribute, _super);\r\n function ColorAttribute() {\r\n return _super.call(this, webgl.Shader.COLOR, VertexAttributeType.Float, 4) || this;\r\n }\r\n return ColorAttribute;\r\n }(VertexAttribute));\r\n webgl.ColorAttribute = ColorAttribute;\r\n var Color2Attribute = (function (_super) {\r\n __extends(Color2Attribute, _super);\r\n function Color2Attribute() {\r\n return _super.call(this, webgl.Shader.COLOR2, VertexAttributeType.Float, 4) || this;\r\n }\r\n return Color2Attribute;\r\n }(VertexAttribute));\r\n webgl.Color2Attribute = Color2Attribute;\r\n var VertexAttributeType;\r\n (function (VertexAttributeType) {\r\n VertexAttributeType[VertexAttributeType[\"Float\"] = 0] = \"Float\";\r\n })(VertexAttributeType = webgl.VertexAttributeType || (webgl.VertexAttributeType = {}));\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var PolygonBatcher = (function () {\r\n function PolygonBatcher(context, twoColorTint, maxVertices) {\r\n if (twoColorTint === void 0) { twoColorTint = true; }\r\n if (maxVertices === void 0) { maxVertices = 10920; }\r\n this.isDrawing = false;\r\n this.shader = null;\r\n this.lastTexture = null;\r\n this.verticesLength = 0;\r\n this.indicesLength = 0;\r\n if (maxVertices > 10920)\r\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n var attributes = twoColorTint ?\r\n [new webgl.Position2Attribute(), new webgl.ColorAttribute(), new webgl.TexCoordAttribute(), new webgl.Color2Attribute()] :\r\n [new webgl.Position2Attribute(), new webgl.ColorAttribute(), new webgl.TexCoordAttribute()];\r\n this.mesh = new webgl.Mesh(context, attributes, maxVertices, maxVertices * 3);\r\n this.srcBlend = this.context.gl.SRC_ALPHA;\r\n this.dstBlend = this.context.gl.ONE_MINUS_SRC_ALPHA;\r\n }\r\n PolygonBatcher.prototype.begin = function (shader) {\r\n var gl = this.context.gl;\r\n if (this.isDrawing)\r\n throw new Error(\"PolygonBatch is already drawing. Call PolygonBatch.end() before calling PolygonBatch.begin()\");\r\n this.drawCalls = 0;\r\n this.shader = shader;\r\n this.lastTexture = null;\r\n this.isDrawing = true;\r\n gl.enable(gl.BLEND);\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n };\r\n PolygonBatcher.prototype.setBlendMode = function (srcBlend, dstBlend) {\r\n var gl = this.context.gl;\r\n this.srcBlend = srcBlend;\r\n this.dstBlend = dstBlend;\r\n if (this.isDrawing) {\r\n this.flush();\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n }\r\n };\r\n PolygonBatcher.prototype.draw = function (texture, vertices, indices) {\r\n if (texture != this.lastTexture) {\r\n this.flush();\r\n this.lastTexture = texture;\r\n }\r\n else if (this.verticesLength + vertices.length > this.mesh.getVertices().length ||\r\n this.indicesLength + indices.length > this.mesh.getIndices().length) {\r\n this.flush();\r\n }\r\n var indexStart = this.mesh.numVertices();\r\n this.mesh.getVertices().set(vertices, this.verticesLength);\r\n this.verticesLength += vertices.length;\r\n this.mesh.setVerticesLength(this.verticesLength);\r\n var indicesArray = this.mesh.getIndices();\r\n for (var i = this.indicesLength, j = 0; j < indices.length; i++, j++)\r\n indicesArray[i] = indices[j] + indexStart;\r\n this.indicesLength += indices.length;\r\n this.mesh.setIndicesLength(this.indicesLength);\r\n };\r\n PolygonBatcher.prototype.flush = function () {\r\n var gl = this.context.gl;\r\n if (this.verticesLength == 0)\r\n return;\r\n this.lastTexture.bind();\r\n this.mesh.draw(this.shader, gl.TRIANGLES);\r\n this.verticesLength = 0;\r\n this.indicesLength = 0;\r\n this.mesh.setVerticesLength(0);\r\n this.mesh.setIndicesLength(0);\r\n this.drawCalls++;\r\n };\r\n PolygonBatcher.prototype.end = function () {\r\n var gl = this.context.gl;\r\n if (!this.isDrawing)\r\n throw new Error(\"PolygonBatch is not drawing. Call PolygonBatch.begin() before calling PolygonBatch.end()\");\r\n if (this.verticesLength > 0 || this.indicesLength > 0)\r\n this.flush();\r\n this.shader = null;\r\n this.lastTexture = null;\r\n this.isDrawing = false;\r\n gl.disable(gl.BLEND);\r\n };\r\n PolygonBatcher.prototype.getDrawCalls = function () { return this.drawCalls; };\r\n PolygonBatcher.prototype.dispose = function () {\r\n this.mesh.dispose();\r\n };\r\n return PolygonBatcher;\r\n }());\r\n webgl.PolygonBatcher = PolygonBatcher;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var SceneRenderer = (function () {\r\n function SceneRenderer(canvas, context, twoColorTint) {\r\n if (twoColorTint === void 0) { twoColorTint = true; }\r\n this.twoColorTint = false;\r\n this.activeRenderer = null;\r\n this.QUAD = [\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n ];\r\n this.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n this.WHITE = new spine.Color(1, 1, 1, 1);\r\n this.canvas = canvas;\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.twoColorTint = twoColorTint;\r\n this.camera = new webgl.OrthoCamera(canvas.width, canvas.height);\r\n this.batcherShader = twoColorTint ? webgl.Shader.newTwoColoredTextured(this.context) : webgl.Shader.newColoredTextured(this.context);\r\n this.batcher = new webgl.PolygonBatcher(this.context, twoColorTint);\r\n this.shapesShader = webgl.Shader.newColored(this.context);\r\n this.shapes = new webgl.ShapeRenderer(this.context);\r\n this.skeletonRenderer = new webgl.SkeletonRenderer(this.context, twoColorTint);\r\n this.skeletonDebugRenderer = new webgl.SkeletonDebugRenderer(this.context);\r\n }\r\n SceneRenderer.prototype.begin = function () {\r\n this.camera.update();\r\n this.enableRenderer(this.batcher);\r\n };\r\n SceneRenderer.prototype.drawSkeleton = function (skeleton, premultipliedAlpha, slotRangeStart, slotRangeEnd) {\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n if (slotRangeStart === void 0) { slotRangeStart = -1; }\r\n if (slotRangeEnd === void 0) { slotRangeEnd = -1; }\r\n this.enableRenderer(this.batcher);\r\n this.skeletonRenderer.premultipliedAlpha = premultipliedAlpha;\r\n this.skeletonRenderer.draw(this.batcher, skeleton, slotRangeStart, slotRangeEnd);\r\n };\r\n SceneRenderer.prototype.drawSkeletonDebug = function (skeleton, premultipliedAlpha, ignoredBones) {\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n if (ignoredBones === void 0) { ignoredBones = null; }\r\n this.enableRenderer(this.shapes);\r\n this.skeletonDebugRenderer.premultipliedAlpha = premultipliedAlpha;\r\n this.skeletonDebugRenderer.draw(this.shapes, skeleton, ignoredBones);\r\n };\r\n SceneRenderer.prototype.drawTexture = function (texture, x, y, width, height, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.drawTextureUV = function (texture, x, y, width, height, u, v, u2, v2, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u;\r\n quad[i++] = v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u2;\r\n quad[i++] = v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u2;\r\n quad[i++] = v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u;\r\n quad[i++] = v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.drawTextureRotated = function (texture, x, y, width, height, pivotX, pivotY, angle, color, premultipliedAlpha) {\r\n if (color === void 0) { color = null; }\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var worldOriginX = x + pivotX;\r\n var worldOriginY = y + pivotY;\r\n var fx = -pivotX;\r\n var fy = -pivotY;\r\n var fx2 = width - pivotX;\r\n var fy2 = height - pivotY;\r\n var p1x = fx;\r\n var p1y = fy;\r\n var p2x = fx;\r\n var p2y = fy2;\r\n var p3x = fx2;\r\n var p3y = fy2;\r\n var p4x = fx2;\r\n var p4y = fy;\r\n var x1 = 0;\r\n var y1 = 0;\r\n var x2 = 0;\r\n var y2 = 0;\r\n var x3 = 0;\r\n var y3 = 0;\r\n var x4 = 0;\r\n var y4 = 0;\r\n if (angle != 0) {\r\n var cos = spine.MathUtils.cosDeg(angle);\r\n var sin = spine.MathUtils.sinDeg(angle);\r\n x1 = cos * p1x - sin * p1y;\r\n y1 = sin * p1x + cos * p1y;\r\n x4 = cos * p2x - sin * p2y;\r\n y4 = sin * p2x + cos * p2y;\r\n x3 = cos * p3x - sin * p3y;\r\n y3 = sin * p3x + cos * p3y;\r\n x2 = x3 + (x1 - x4);\r\n y2 = y3 + (y1 - y4);\r\n }\r\n else {\r\n x1 = p1x;\r\n y1 = p1y;\r\n x4 = p2x;\r\n y4 = p2y;\r\n x3 = p3x;\r\n y3 = p3y;\r\n x2 = p4x;\r\n y2 = p4y;\r\n }\r\n x1 += worldOriginX;\r\n y1 += worldOriginY;\r\n x2 += worldOriginX;\r\n y2 += worldOriginY;\r\n x3 += worldOriginX;\r\n y3 += worldOriginY;\r\n x4 += worldOriginX;\r\n y4 += worldOriginY;\r\n var i = 0;\r\n quad[i++] = x1;\r\n quad[i++] = y1;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x2;\r\n quad[i++] = y2;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x3;\r\n quad[i++] = y3;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x4;\r\n quad[i++] = y4;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.drawRegion = function (region, x, y, width, height, color, premultipliedAlpha) {\r\n if (color === void 0) { color = null; }\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u;\r\n quad[i++] = region.v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u2;\r\n quad[i++] = region.v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u2;\r\n quad[i++] = region.v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u;\r\n quad[i++] = region.v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(region.texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.line = function (x, y, x2, y2, color, color2) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.line(x, y, x2, y2, color);\r\n };\r\n SceneRenderer.prototype.triangle = function (filled, x, y, x2, y2, x3, y3, color, color2, color3) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.triangle(filled, x, y, x2, y2, x3, y3, color, color2, color3);\r\n };\r\n SceneRenderer.prototype.quad = function (filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n if (color4 === void 0) { color4 = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.quad(filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4);\r\n };\r\n SceneRenderer.prototype.rect = function (filled, x, y, width, height, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.rect(filled, x, y, width, height, color);\r\n };\r\n SceneRenderer.prototype.rectLine = function (filled, x1, y1, x2, y2, width, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.rectLine(filled, x1, y1, x2, y2, width, color);\r\n };\r\n SceneRenderer.prototype.polygon = function (polygonVertices, offset, count, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.polygon(polygonVertices, offset, count, color);\r\n };\r\n SceneRenderer.prototype.circle = function (filled, x, y, radius, color, segments) {\r\n if (color === void 0) { color = null; }\r\n if (segments === void 0) { segments = 0; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.circle(filled, x, y, radius, color, segments);\r\n };\r\n SceneRenderer.prototype.curve = function (x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color);\r\n };\r\n SceneRenderer.prototype.end = function () {\r\n if (this.activeRenderer === this.batcher)\r\n this.batcher.end();\r\n else if (this.activeRenderer === this.shapes)\r\n this.shapes.end();\r\n this.activeRenderer = null;\r\n };\r\n SceneRenderer.prototype.resize = function (resizeMode) {\r\n var canvas = this.canvas;\r\n var w = canvas.clientWidth;\r\n var h = canvas.clientHeight;\r\n if (canvas.width != w || canvas.height != h) {\r\n canvas.width = w;\r\n canvas.height = h;\r\n }\r\n this.context.gl.viewport(0, 0, canvas.width, canvas.height);\r\n if (resizeMode === ResizeMode.Stretch) {\r\n }\r\n else if (resizeMode === ResizeMode.Expand) {\r\n this.camera.setViewport(w, h);\r\n }\r\n else if (resizeMode === ResizeMode.Fit) {\r\n var sourceWidth = canvas.width, sourceHeight = canvas.height;\r\n var targetWidth = this.camera.viewportWidth, targetHeight = this.camera.viewportHeight;\r\n var targetRatio = targetHeight / targetWidth;\r\n var sourceRatio = sourceHeight / sourceWidth;\r\n var scale = targetRatio < sourceRatio ? targetWidth / sourceWidth : targetHeight / sourceHeight;\r\n this.camera.viewportWidth = sourceWidth * scale;\r\n this.camera.viewportHeight = sourceHeight * scale;\r\n }\r\n this.camera.update();\r\n };\r\n SceneRenderer.prototype.enableRenderer = function (renderer) {\r\n if (this.activeRenderer === renderer)\r\n return;\r\n this.end();\r\n if (renderer instanceof webgl.PolygonBatcher) {\r\n this.batcherShader.bind();\r\n this.batcherShader.setUniform4x4f(webgl.Shader.MVP_MATRIX, this.camera.projectionView.values);\r\n this.batcherShader.setUniformi(\"u_texture\", 0);\r\n this.batcher.begin(this.batcherShader);\r\n this.activeRenderer = this.batcher;\r\n }\r\n else if (renderer instanceof webgl.ShapeRenderer) {\r\n this.shapesShader.bind();\r\n this.shapesShader.setUniform4x4f(webgl.Shader.MVP_MATRIX, this.camera.projectionView.values);\r\n this.shapes.begin(this.shapesShader);\r\n this.activeRenderer = this.shapes;\r\n }\r\n else {\r\n this.activeRenderer = this.skeletonDebugRenderer;\r\n }\r\n };\r\n SceneRenderer.prototype.dispose = function () {\r\n this.batcher.dispose();\r\n this.batcherShader.dispose();\r\n this.shapes.dispose();\r\n this.shapesShader.dispose();\r\n this.skeletonDebugRenderer.dispose();\r\n };\r\n return SceneRenderer;\r\n }());\r\n webgl.SceneRenderer = SceneRenderer;\r\n var ResizeMode;\r\n (function (ResizeMode) {\r\n ResizeMode[ResizeMode[\"Stretch\"] = 0] = \"Stretch\";\r\n ResizeMode[ResizeMode[\"Expand\"] = 1] = \"Expand\";\r\n ResizeMode[ResizeMode[\"Fit\"] = 2] = \"Fit\";\r\n })(ResizeMode = webgl.ResizeMode || (webgl.ResizeMode = {}));\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Shader = (function () {\r\n function Shader(context, vertexShader, fragmentShader) {\r\n this.vertexShader = vertexShader;\r\n this.fragmentShader = fragmentShader;\r\n this.vs = null;\r\n this.fs = null;\r\n this.program = null;\r\n this.tmp2x2 = new Float32Array(2 * 2);\r\n this.tmp3x3 = new Float32Array(3 * 3);\r\n this.tmp4x4 = new Float32Array(4 * 4);\r\n this.vsSource = vertexShader;\r\n this.fsSource = fragmentShader;\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.context.addRestorable(this);\r\n this.compile();\r\n }\r\n Shader.prototype.getProgram = function () { return this.program; };\r\n Shader.prototype.getVertexShader = function () { return this.vertexShader; };\r\n Shader.prototype.getFragmentShader = function () { return this.fragmentShader; };\r\n Shader.prototype.getVertexShaderSource = function () { return this.vsSource; };\r\n Shader.prototype.getFragmentSource = function () { return this.fsSource; };\r\n Shader.prototype.compile = function () {\r\n var gl = this.context.gl;\r\n try {\r\n this.vs = this.compileShader(gl.VERTEX_SHADER, this.vertexShader);\r\n this.fs = this.compileShader(gl.FRAGMENT_SHADER, this.fragmentShader);\r\n this.program = this.compileProgram(this.vs, this.fs);\r\n }\r\n catch (e) {\r\n this.dispose();\r\n throw e;\r\n }\r\n };\r\n Shader.prototype.compileShader = function (type, source) {\r\n var gl = this.context.gl;\r\n var shader = gl.createShader(type);\r\n gl.shaderSource(shader, source);\r\n gl.compileShader(shader);\r\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\r\n var error = \"Couldn't compile shader: \" + gl.getShaderInfoLog(shader);\r\n gl.deleteShader(shader);\r\n if (!gl.isContextLost())\r\n throw new Error(error);\r\n }\r\n return shader;\r\n };\r\n Shader.prototype.compileProgram = function (vs, fs) {\r\n var gl = this.context.gl;\r\n var program = gl.createProgram();\r\n gl.attachShader(program, vs);\r\n gl.attachShader(program, fs);\r\n gl.linkProgram(program);\r\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\r\n var error = \"Couldn't compile shader program: \" + gl.getProgramInfoLog(program);\r\n gl.deleteProgram(program);\r\n if (!gl.isContextLost())\r\n throw new Error(error);\r\n }\r\n return program;\r\n };\r\n Shader.prototype.restore = function () {\r\n this.compile();\r\n };\r\n Shader.prototype.bind = function () {\r\n this.context.gl.useProgram(this.program);\r\n };\r\n Shader.prototype.unbind = function () {\r\n this.context.gl.useProgram(null);\r\n };\r\n Shader.prototype.setUniformi = function (uniform, value) {\r\n this.context.gl.uniform1i(this.getUniformLocation(uniform), value);\r\n };\r\n Shader.prototype.setUniformf = function (uniform, value) {\r\n this.context.gl.uniform1f(this.getUniformLocation(uniform), value);\r\n };\r\n Shader.prototype.setUniform2f = function (uniform, value, value2) {\r\n this.context.gl.uniform2f(this.getUniformLocation(uniform), value, value2);\r\n };\r\n Shader.prototype.setUniform3f = function (uniform, value, value2, value3) {\r\n this.context.gl.uniform3f(this.getUniformLocation(uniform), value, value2, value3);\r\n };\r\n Shader.prototype.setUniform4f = function (uniform, value, value2, value3, value4) {\r\n this.context.gl.uniform4f(this.getUniformLocation(uniform), value, value2, value3, value4);\r\n };\r\n Shader.prototype.setUniform2x2f = function (uniform, value) {\r\n var gl = this.context.gl;\r\n this.tmp2x2.set(value);\r\n gl.uniformMatrix2fv(this.getUniformLocation(uniform), false, this.tmp2x2);\r\n };\r\n Shader.prototype.setUniform3x3f = function (uniform, value) {\r\n var gl = this.context.gl;\r\n this.tmp3x3.set(value);\r\n gl.uniformMatrix3fv(this.getUniformLocation(uniform), false, this.tmp3x3);\r\n };\r\n Shader.prototype.setUniform4x4f = function (uniform, value) {\r\n var gl = this.context.gl;\r\n this.tmp4x4.set(value);\r\n gl.uniformMatrix4fv(this.getUniformLocation(uniform), false, this.tmp4x4);\r\n };\r\n Shader.prototype.getUniformLocation = function (uniform) {\r\n var gl = this.context.gl;\r\n var location = gl.getUniformLocation(this.program, uniform);\r\n if (!location && !gl.isContextLost())\r\n throw new Error(\"Couldn't find location for uniform \" + uniform);\r\n return location;\r\n };\r\n Shader.prototype.getAttributeLocation = function (attribute) {\r\n var gl = this.context.gl;\r\n var location = gl.getAttribLocation(this.program, attribute);\r\n if (location == -1 && !gl.isContextLost())\r\n throw new Error(\"Couldn't find location for attribute \" + attribute);\r\n return location;\r\n };\r\n Shader.prototype.dispose = function () {\r\n this.context.removeRestorable(this);\r\n var gl = this.context.gl;\r\n if (this.vs) {\r\n gl.deleteShader(this.vs);\r\n this.vs = null;\r\n }\r\n if (this.fs) {\r\n gl.deleteShader(this.fs);\r\n this.fs = null;\r\n }\r\n if (this.program) {\r\n gl.deleteProgram(this.program);\r\n this.program = null;\r\n }\r\n };\r\n Shader.newColoredTextured = function (context) {\r\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \" + Shader.POSITION + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR + \";\\n\\t\\t\\t\\tattribute vec2 \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\tuniform mat4 \" + Shader.MVP_MATRIX + \";\\n\\t\\t\\t\\tvarying vec4 v_color;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_color = \" + Shader.COLOR + \";\\n\\t\\t\\t\\t\\tv_texCoords = \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\t\\tgl_Position = \" + Shader.MVP_MATRIX + \" * \" + Shader.POSITION + \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_color;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\t\\t\\t\\tuniform sampler2D u_texture;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tgl_FragColor = v_color * texture2D(u_texture, v_texCoords);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n return new Shader(context, vs, fs);\r\n };\r\n Shader.newTwoColoredTextured = function (context) {\r\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \" + Shader.POSITION + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR2 + \";\\n\\t\\t\\t\\tattribute vec2 \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\tuniform mat4 \" + Shader.MVP_MATRIX + \";\\n\\t\\t\\t\\tvarying vec4 v_light;\\n\\t\\t\\t\\tvarying vec4 v_dark;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_light = \" + Shader.COLOR + \";\\n\\t\\t\\t\\t\\tv_dark = \" + Shader.COLOR2 + \";\\n\\t\\t\\t\\t\\tv_texCoords = \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\t\\tgl_Position = \" + Shader.MVP_MATRIX + \" * \" + Shader.POSITION + \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_light;\\n\\t\\t\\t\\tvarying LOWP vec4 v_dark;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\t\\t\\t\\tuniform sampler2D u_texture;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tvec4 texColor = texture2D(u_texture, v_texCoords);\\n\\t\\t\\t\\t\\tgl_FragColor.a = texColor.a * v_light.a;\\n\\t\\t\\t\\t\\tgl_FragColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n return new Shader(context, vs, fs);\r\n };\r\n Shader.newColored = function (context) {\r\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \" + Shader.POSITION + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR + \";\\n\\t\\t\\t\\tuniform mat4 \" + Shader.MVP_MATRIX + \";\\n\\t\\t\\t\\tvarying vec4 v_color;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_color = \" + Shader.COLOR + \";\\n\\t\\t\\t\\t\\tgl_Position = \" + Shader.MVP_MATRIX + \" * \" + Shader.POSITION + \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_color;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tgl_FragColor = v_color;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n return new Shader(context, vs, fs);\r\n };\r\n Shader.MVP_MATRIX = \"u_projTrans\";\r\n Shader.POSITION = \"a_position\";\r\n Shader.COLOR = \"a_color\";\r\n Shader.COLOR2 = \"a_color2\";\r\n Shader.TEXCOORDS = \"a_texCoords\";\r\n Shader.SAMPLER = \"u_texture\";\r\n return Shader;\r\n }());\r\n webgl.Shader = Shader;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var ShapeRenderer = (function () {\r\n function ShapeRenderer(context, maxVertices) {\r\n if (maxVertices === void 0) { maxVertices = 10920; }\r\n this.isDrawing = false;\r\n this.shapeType = ShapeType.Filled;\r\n this.color = new spine.Color(1, 1, 1, 1);\r\n this.vertexIndex = 0;\r\n this.tmp = new spine.Vector2();\r\n if (maxVertices > 10920)\r\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.mesh = new webgl.Mesh(context, [new webgl.Position2Attribute(), new webgl.ColorAttribute()], maxVertices, 0);\r\n this.srcBlend = this.context.gl.SRC_ALPHA;\r\n this.dstBlend = this.context.gl.ONE_MINUS_SRC_ALPHA;\r\n }\r\n ShapeRenderer.prototype.begin = function (shader) {\r\n if (this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has already been called\");\r\n this.shader = shader;\r\n this.vertexIndex = 0;\r\n this.isDrawing = true;\r\n var gl = this.context.gl;\r\n gl.enable(gl.BLEND);\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n };\r\n ShapeRenderer.prototype.setBlendMode = function (srcBlend, dstBlend) {\r\n var gl = this.context.gl;\r\n this.srcBlend = srcBlend;\r\n this.dstBlend = dstBlend;\r\n if (this.isDrawing) {\r\n this.flush();\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n }\r\n };\r\n ShapeRenderer.prototype.setColor = function (color) {\r\n this.color.setFromColor(color);\r\n };\r\n ShapeRenderer.prototype.setColorWith = function (r, g, b, a) {\r\n this.color.set(r, g, b, a);\r\n };\r\n ShapeRenderer.prototype.point = function (x, y, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(ShapeType.Point, 1);\r\n if (color === null)\r\n color = this.color;\r\n this.vertex(x, y, color);\r\n };\r\n ShapeRenderer.prototype.line = function (x, y, x2, y2, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(ShapeType.Line, 2);\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n if (color === null)\r\n color = this.color;\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color);\r\n };\r\n ShapeRenderer.prototype.triangle = function (filled, x, y, x2, y2, x3, y3, color, color2, color3) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n if (color === null)\r\n color = this.color;\r\n if (color2 === null)\r\n color2 = this.color;\r\n if (color3 === null)\r\n color3 = this.color;\r\n if (filled) {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n }\r\n else {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x2, y2, color);\r\n this.vertex(x3, y3, color2);\r\n this.vertex(x3, y3, color);\r\n this.vertex(x, y, color2);\r\n }\r\n };\r\n ShapeRenderer.prototype.quad = function (filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n if (color4 === void 0) { color4 = null; }\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n if (color === null)\r\n color = this.color;\r\n if (color2 === null)\r\n color2 = this.color;\r\n if (color3 === null)\r\n color3 = this.color;\r\n if (color4 === null)\r\n color4 = this.color;\r\n if (filled) {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x, y, color);\r\n }\r\n else {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x, y, color);\r\n }\r\n };\r\n ShapeRenderer.prototype.rect = function (filled, x, y, width, height, color) {\r\n if (color === void 0) { color = null; }\r\n this.quad(filled, x, y, x + width, y, x + width, y + height, x, y + height, color, color, color, color);\r\n };\r\n ShapeRenderer.prototype.rectLine = function (filled, x1, y1, x2, y2, width, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 8);\r\n if (color === null)\r\n color = this.color;\r\n var t = this.tmp.set(y2 - y1, x1 - x2);\r\n t.normalize();\r\n width *= 0.5;\r\n var tx = t.x * width;\r\n var ty = t.y * width;\r\n if (!filled) {\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n }\r\n else {\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n }\r\n };\r\n ShapeRenderer.prototype.x = function (x, y, size) {\r\n this.line(x - size, y - size, x + size, y + size);\r\n this.line(x - size, y + size, x + size, y - size);\r\n };\r\n ShapeRenderer.prototype.polygon = function (polygonVertices, offset, count, color) {\r\n if (color === void 0) { color = null; }\r\n if (count < 3)\r\n throw new Error(\"Polygon must contain at least 3 vertices\");\r\n this.check(ShapeType.Line, count * 2);\r\n if (color === null)\r\n color = this.color;\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n offset <<= 1;\r\n count <<= 1;\r\n var firstX = polygonVertices[offset];\r\n var firstY = polygonVertices[offset + 1];\r\n var last = offset + count;\r\n for (var i = offset, n = offset + count - 2; i < n; i += 2) {\r\n var x1 = polygonVertices[i];\r\n var y1 = polygonVertices[i + 1];\r\n var x2 = 0;\r\n var y2 = 0;\r\n if (i + 2 >= last) {\r\n x2 = firstX;\r\n y2 = firstY;\r\n }\r\n else {\r\n x2 = polygonVertices[i + 2];\r\n y2 = polygonVertices[i + 3];\r\n }\r\n this.vertex(x1, y1, color);\r\n this.vertex(x2, y2, color);\r\n }\r\n };\r\n ShapeRenderer.prototype.circle = function (filled, x, y, radius, color, segments) {\r\n if (color === void 0) { color = null; }\r\n if (segments === void 0) { segments = 0; }\r\n if (segments === 0)\r\n segments = Math.max(1, (6 * spine.MathUtils.cbrt(radius)) | 0);\r\n if (segments <= 0)\r\n throw new Error(\"segments must be > 0.\");\r\n if (color === null)\r\n color = this.color;\r\n var angle = 2 * spine.MathUtils.PI / segments;\r\n var cos = Math.cos(angle);\r\n var sin = Math.sin(angle);\r\n var cx = radius, cy = 0;\r\n if (!filled) {\r\n this.check(ShapeType.Line, segments * 2 + 2);\r\n for (var i = 0; i < segments; i++) {\r\n this.vertex(x + cx, y + cy, color);\r\n var temp_1 = cx;\r\n cx = cos * cx - sin * cy;\r\n cy = sin * temp_1 + cos * cy;\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n else {\r\n this.check(ShapeType.Filled, segments * 3 + 3);\r\n segments--;\r\n for (var i = 0; i < segments; i++) {\r\n this.vertex(x, y, color);\r\n this.vertex(x + cx, y + cy, color);\r\n var temp_2 = cx;\r\n cx = cos * cx - sin * cy;\r\n cy = sin * temp_2 + cos * cy;\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n this.vertex(x, y, color);\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n var temp = cx;\r\n cx = radius;\r\n cy = 0;\r\n this.vertex(x + cx, y + cy, color);\r\n };\r\n ShapeRenderer.prototype.curve = function (x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(ShapeType.Line, segments * 2 + 2);\r\n if (color === null)\r\n color = this.color;\r\n var subdiv_step = 1 / segments;\r\n var subdiv_step2 = subdiv_step * subdiv_step;\r\n var subdiv_step3 = subdiv_step * subdiv_step * subdiv_step;\r\n var pre1 = 3 * subdiv_step;\r\n var pre2 = 3 * subdiv_step2;\r\n var pre4 = 6 * subdiv_step2;\r\n var pre5 = 6 * subdiv_step3;\r\n var tmp1x = x1 - cx1 * 2 + cx2;\r\n var tmp1y = y1 - cy1 * 2 + cy2;\r\n var tmp2x = (cx1 - cx2) * 3 - x1 + x2;\r\n var tmp2y = (cy1 - cy2) * 3 - y1 + y2;\r\n var fx = x1;\r\n var fy = y1;\r\n var dfx = (cx1 - x1) * pre1 + tmp1x * pre2 + tmp2x * subdiv_step3;\r\n var dfy = (cy1 - y1) * pre1 + tmp1y * pre2 + tmp2y * subdiv_step3;\r\n var ddfx = tmp1x * pre4 + tmp2x * pre5;\r\n var ddfy = tmp1y * pre4 + tmp2y * pre5;\r\n var dddfx = tmp2x * pre5;\r\n var dddfy = tmp2y * pre5;\r\n while (segments-- > 0) {\r\n this.vertex(fx, fy, color);\r\n fx += dfx;\r\n fy += dfy;\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n this.vertex(fx, fy, color);\r\n }\r\n this.vertex(fx, fy, color);\r\n this.vertex(x2, y2, color);\r\n };\r\n ShapeRenderer.prototype.vertex = function (x, y, color) {\r\n var idx = this.vertexIndex;\r\n var vertices = this.mesh.getVertices();\r\n vertices[idx++] = x;\r\n vertices[idx++] = y;\r\n vertices[idx++] = color.r;\r\n vertices[idx++] = color.g;\r\n vertices[idx++] = color.b;\r\n vertices[idx++] = color.a;\r\n this.vertexIndex = idx;\r\n };\r\n ShapeRenderer.prototype.end = function () {\r\n if (!this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has not been called\");\r\n this.flush();\r\n this.context.gl.disable(this.context.gl.BLEND);\r\n this.isDrawing = false;\r\n };\r\n ShapeRenderer.prototype.flush = function () {\r\n if (this.vertexIndex == 0)\r\n return;\r\n this.mesh.setVerticesLength(this.vertexIndex);\r\n this.mesh.draw(this.shader, this.shapeType);\r\n this.vertexIndex = 0;\r\n };\r\n ShapeRenderer.prototype.check = function (shapeType, numVertices) {\r\n if (!this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has not been called\");\r\n if (this.shapeType == shapeType) {\r\n if (this.mesh.maxVertices() - this.mesh.numVertices() < numVertices)\r\n this.flush();\r\n else\r\n return;\r\n }\r\n else {\r\n this.flush();\r\n this.shapeType = shapeType;\r\n }\r\n };\r\n ShapeRenderer.prototype.dispose = function () {\r\n this.mesh.dispose();\r\n };\r\n return ShapeRenderer;\r\n }());\r\n webgl.ShapeRenderer = ShapeRenderer;\r\n var ShapeType;\r\n (function (ShapeType) {\r\n ShapeType[ShapeType[\"Point\"] = 0] = \"Point\";\r\n ShapeType[ShapeType[\"Line\"] = 1] = \"Line\";\r\n ShapeType[ShapeType[\"Filled\"] = 4] = \"Filled\";\r\n })(ShapeType = webgl.ShapeType || (webgl.ShapeType = {}));\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var SkeletonDebugRenderer = (function () {\r\n function SkeletonDebugRenderer(context) {\r\n this.boneLineColor = new spine.Color(1, 0, 0, 1);\r\n this.boneOriginColor = new spine.Color(0, 1, 0, 1);\r\n this.attachmentLineColor = new spine.Color(0, 0, 1, 0.5);\r\n this.triangleLineColor = new spine.Color(1, 0.64, 0, 0.5);\r\n this.pathColor = new spine.Color().setFromString(\"FF7F00\");\r\n this.clipColor = new spine.Color(0.8, 0, 0, 2);\r\n this.aabbColor = new spine.Color(0, 1, 0, 0.5);\r\n this.drawBones = true;\r\n this.drawRegionAttachments = true;\r\n this.drawBoundingBoxes = true;\r\n this.drawMeshHull = true;\r\n this.drawMeshTriangles = true;\r\n this.drawPaths = true;\r\n this.drawSkeletonXY = false;\r\n this.drawClipping = true;\r\n this.premultipliedAlpha = false;\r\n this.scale = 1;\r\n this.boneWidth = 2;\r\n this.bounds = new spine.SkeletonBounds();\r\n this.temp = new Array();\r\n this.vertices = spine.Utils.newFloatArray(2 * 1024);\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n }\r\n SkeletonDebugRenderer.prototype.draw = function (shapes, skeleton, ignoredBones) {\r\n if (ignoredBones === void 0) { ignoredBones = null; }\r\n var skeletonX = skeleton.x;\r\n var skeletonY = skeleton.y;\r\n var gl = this.context.gl;\r\n var srcFunc = this.premultipliedAlpha ? gl.ONE : gl.SRC_ALPHA;\r\n shapes.setBlendMode(srcFunc, gl.ONE_MINUS_SRC_ALPHA);\r\n var bones = skeleton.bones;\r\n if (this.drawBones) {\r\n shapes.setColor(this.boneLineColor);\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\r\n continue;\r\n if (bone.parent == null)\r\n continue;\r\n var x = skeletonX + bone.data.length * bone.a + bone.worldX;\r\n var y = skeletonY + bone.data.length * bone.c + bone.worldY;\r\n shapes.rectLine(true, skeletonX + bone.worldX, skeletonY + bone.worldY, x, y, this.boneWidth * this.scale);\r\n }\r\n if (this.drawSkeletonXY)\r\n shapes.x(skeletonX, skeletonY, 4 * this.scale);\r\n }\r\n if (this.drawRegionAttachments) {\r\n shapes.setColor(this.attachmentLineColor);\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.RegionAttachment) {\r\n var regionAttachment = attachment;\r\n var vertices = this.vertices;\r\n regionAttachment.computeWorldVertices(slot.bone, vertices, 0, 2);\r\n shapes.line(vertices[0], vertices[1], vertices[2], vertices[3]);\r\n shapes.line(vertices[2], vertices[3], vertices[4], vertices[5]);\r\n shapes.line(vertices[4], vertices[5], vertices[6], vertices[7]);\r\n shapes.line(vertices[6], vertices[7], vertices[0], vertices[1]);\r\n }\r\n }\r\n }\r\n if (this.drawMeshHull || this.drawMeshTriangles) {\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (!(attachment instanceof spine.MeshAttachment))\r\n continue;\r\n var mesh = attachment;\r\n var vertices = this.vertices;\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, 2);\r\n var triangles = mesh.triangles;\r\n var hullLength = mesh.hullLength;\r\n if (this.drawMeshTriangles) {\r\n shapes.setColor(this.triangleLineColor);\r\n for (var ii = 0, nn = triangles.length; ii < nn; ii += 3) {\r\n var v1 = triangles[ii] * 2, v2 = triangles[ii + 1] * 2, v3 = triangles[ii + 2] * 2;\r\n shapes.triangle(false, vertices[v1], vertices[v1 + 1], vertices[v2], vertices[v2 + 1], vertices[v3], vertices[v3 + 1]);\r\n }\r\n }\r\n if (this.drawMeshHull && hullLength > 0) {\r\n shapes.setColor(this.attachmentLineColor);\r\n hullLength = (hullLength >> 1) * 2;\r\n var lastX = vertices[hullLength - 2], lastY = vertices[hullLength - 1];\r\n for (var ii = 0, nn = hullLength; ii < nn; ii += 2) {\r\n var x = vertices[ii], y = vertices[ii + 1];\r\n shapes.line(x, y, lastX, lastY);\r\n lastX = x;\r\n lastY = y;\r\n }\r\n }\r\n }\r\n }\r\n if (this.drawBoundingBoxes) {\r\n var bounds = this.bounds;\r\n bounds.update(skeleton, true);\r\n shapes.setColor(this.aabbColor);\r\n shapes.rect(false, bounds.minX, bounds.minY, bounds.getWidth(), bounds.getHeight());\r\n var polygons = bounds.polygons;\r\n var boxes = bounds.boundingBoxes;\r\n for (var i = 0, n = polygons.length; i < n; i++) {\r\n var polygon = polygons[i];\r\n shapes.setColor(boxes[i].color);\r\n shapes.polygon(polygon, 0, polygon.length);\r\n }\r\n }\r\n if (this.drawPaths) {\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (!(attachment instanceof spine.PathAttachment))\r\n continue;\r\n var path = attachment;\r\n var nn = path.worldVerticesLength;\r\n var world = this.temp = spine.Utils.setArraySize(this.temp, nn, 0);\r\n path.computeWorldVertices(slot, 0, nn, world, 0, 2);\r\n var color = this.pathColor;\r\n var x1 = world[2], y1 = world[3], x2 = 0, y2 = 0;\r\n if (path.closed) {\r\n shapes.setColor(color);\r\n var cx1 = world[0], cy1 = world[1], cx2 = world[nn - 2], cy2 = world[nn - 1];\r\n x2 = world[nn - 4];\r\n y2 = world[nn - 3];\r\n shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, 32);\r\n shapes.setColor(SkeletonDebugRenderer.LIGHT_GRAY);\r\n shapes.line(x1, y1, cx1, cy1);\r\n shapes.line(x2, y2, cx2, cy2);\r\n }\r\n nn -= 4;\r\n for (var ii = 4; ii < nn; ii += 6) {\r\n var cx1 = world[ii], cy1 = world[ii + 1], cx2 = world[ii + 2], cy2 = world[ii + 3];\r\n x2 = world[ii + 4];\r\n y2 = world[ii + 5];\r\n shapes.setColor(color);\r\n shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, 32);\r\n shapes.setColor(SkeletonDebugRenderer.LIGHT_GRAY);\r\n shapes.line(x1, y1, cx1, cy1);\r\n shapes.line(x2, y2, cx2, cy2);\r\n x1 = x2;\r\n y1 = y2;\r\n }\r\n }\r\n }\r\n if (this.drawBones) {\r\n shapes.setColor(this.boneOriginColor);\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\r\n continue;\r\n shapes.circle(true, skeletonX + bone.worldX, skeletonY + bone.worldY, 3 * this.scale, SkeletonDebugRenderer.GREEN, 8);\r\n }\r\n }\r\n if (this.drawClipping) {\r\n var slots = skeleton.slots;\r\n shapes.setColor(this.clipColor);\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (!(attachment instanceof spine.ClippingAttachment))\r\n continue;\r\n var clip = attachment;\r\n var nn = clip.worldVerticesLength;\r\n var world = this.temp = spine.Utils.setArraySize(this.temp, nn, 0);\r\n clip.computeWorldVertices(slot, 0, nn, world, 0, 2);\r\n for (var i_17 = 0, n_3 = world.length; i_17 < n_3; i_17 += 2) {\r\n var x = world[i_17];\r\n var y = world[i_17 + 1];\r\n var x2 = world[(i_17 + 2) % world.length];\r\n var y2 = world[(i_17 + 3) % world.length];\r\n shapes.line(x, y, x2, y2);\r\n }\r\n }\r\n }\r\n };\r\n SkeletonDebugRenderer.prototype.dispose = function () {\r\n };\r\n SkeletonDebugRenderer.LIGHT_GRAY = new spine.Color(192 / 255, 192 / 255, 192 / 255, 1);\r\n SkeletonDebugRenderer.GREEN = new spine.Color(0, 1, 0, 1);\r\n return SkeletonDebugRenderer;\r\n }());\r\n webgl.SkeletonDebugRenderer = SkeletonDebugRenderer;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Renderable = (function () {\r\n function Renderable(vertices, numVertices, numFloats) {\r\n this.vertices = vertices;\r\n this.numVertices = numVertices;\r\n this.numFloats = numFloats;\r\n }\r\n return Renderable;\r\n }());\r\n ;\r\n var SkeletonRenderer = (function () {\r\n function SkeletonRenderer(context, twoColorTint) {\r\n if (twoColorTint === void 0) { twoColorTint = true; }\r\n this.premultipliedAlpha = false;\r\n this.vertexEffect = null;\r\n this.tempColor = new spine.Color();\r\n this.tempColor2 = new spine.Color();\r\n this.vertexSize = 2 + 2 + 4;\r\n this.twoColorTint = false;\r\n this.renderable = new Renderable(null, 0, 0);\r\n this.clipper = new spine.SkeletonClipping();\r\n this.temp = new spine.Vector2();\r\n this.temp2 = new spine.Vector2();\r\n this.temp3 = new spine.Color();\r\n this.temp4 = new spine.Color();\r\n this.twoColorTint = twoColorTint;\r\n if (twoColorTint)\r\n this.vertexSize += 4;\r\n this.vertices = spine.Utils.newFloatArray(this.vertexSize * 1024);\r\n }\r\n SkeletonRenderer.prototype.draw = function (batcher, skeleton, slotRangeStart, slotRangeEnd) {\r\n if (slotRangeStart === void 0) { slotRangeStart = -1; }\r\n if (slotRangeEnd === void 0) { slotRangeEnd = -1; }\r\n var clipper = this.clipper;\r\n var premultipliedAlpha = this.premultipliedAlpha;\r\n var twoColorTint = this.twoColorTint;\r\n var blendMode = null;\r\n var tempPos = this.temp;\r\n var tempUv = this.temp2;\r\n var tempLight = this.temp3;\r\n var tempDark = this.temp4;\r\n var renderable = this.renderable;\r\n var uvs = null;\r\n var triangles = null;\r\n var drawOrder = skeleton.drawOrder;\r\n var attachmentColor = null;\r\n var skeletonColor = skeleton.color;\r\n var vertexSize = twoColorTint ? 12 : 8;\r\n var inRange = false;\r\n if (slotRangeStart == -1)\r\n inRange = true;\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var clippedVertexSize = clipper.isClipping() ? 2 : vertexSize;\r\n var slot = drawOrder[i];\r\n if (!slot.bone.active) {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (slotRangeStart >= 0 && slotRangeStart == slot.data.index) {\r\n inRange = true;\r\n }\r\n if (!inRange) {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (slotRangeEnd >= 0 && slotRangeEnd == slot.data.index) {\r\n inRange = false;\r\n }\r\n var attachment = slot.getAttachment();\r\n var texture = null;\r\n if (attachment instanceof spine.RegionAttachment) {\r\n var region = attachment;\r\n renderable.vertices = this.vertices;\r\n renderable.numVertices = 4;\r\n renderable.numFloats = clippedVertexSize << 2;\r\n region.computeWorldVertices(slot.bone, renderable.vertices, 0, clippedVertexSize);\r\n triangles = SkeletonRenderer.QUAD_TRIANGLES;\r\n uvs = region.uvs;\r\n texture = region.region.renderObject.texture;\r\n attachmentColor = region.color;\r\n }\r\n else if (attachment instanceof spine.MeshAttachment) {\r\n var mesh = attachment;\r\n renderable.vertices = this.vertices;\r\n renderable.numVertices = (mesh.worldVerticesLength >> 1);\r\n renderable.numFloats = renderable.numVertices * clippedVertexSize;\r\n if (renderable.numFloats > renderable.vertices.length) {\r\n renderable.vertices = this.vertices = spine.Utils.newFloatArray(renderable.numFloats);\r\n }\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, renderable.vertices, 0, clippedVertexSize);\r\n triangles = mesh.triangles;\r\n texture = mesh.region.renderObject.texture;\r\n uvs = mesh.uvs;\r\n attachmentColor = mesh.color;\r\n }\r\n else if (attachment instanceof spine.ClippingAttachment) {\r\n var clip = (attachment);\r\n clipper.clipStart(slot, clip);\r\n continue;\r\n }\r\n else {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (texture != null) {\r\n var slotColor = slot.color;\r\n var finalColor = this.tempColor;\r\n finalColor.r = skeletonColor.r * slotColor.r * attachmentColor.r;\r\n finalColor.g = skeletonColor.g * slotColor.g * attachmentColor.g;\r\n finalColor.b = skeletonColor.b * slotColor.b * attachmentColor.b;\r\n finalColor.a = skeletonColor.a * slotColor.a * attachmentColor.a;\r\n if (premultipliedAlpha) {\r\n finalColor.r *= finalColor.a;\r\n finalColor.g *= finalColor.a;\r\n finalColor.b *= finalColor.a;\r\n }\r\n var darkColor = this.tempColor2;\r\n if (slot.darkColor == null)\r\n darkColor.set(0, 0, 0, 1.0);\r\n else {\r\n if (premultipliedAlpha) {\r\n darkColor.r = slot.darkColor.r * finalColor.a;\r\n darkColor.g = slot.darkColor.g * finalColor.a;\r\n darkColor.b = slot.darkColor.b * finalColor.a;\r\n }\r\n else {\r\n darkColor.setFromColor(slot.darkColor);\r\n }\r\n darkColor.a = premultipliedAlpha ? 1.0 : 0.0;\r\n }\r\n var slotBlendMode = slot.data.blendMode;\r\n if (slotBlendMode != blendMode) {\r\n blendMode = slotBlendMode;\r\n batcher.setBlendMode(webgl.WebGLBlendModeConverter.getSourceGLBlendMode(blendMode, premultipliedAlpha), webgl.WebGLBlendModeConverter.getDestGLBlendMode(blendMode));\r\n }\r\n if (clipper.isClipping()) {\r\n clipper.clipTriangles(renderable.vertices, renderable.numFloats, triangles, triangles.length, uvs, finalColor, darkColor, twoColorTint);\r\n var clippedVertices = new Float32Array(clipper.clippedVertices);\r\n var clippedTriangles = clipper.clippedTriangles;\r\n if (this.vertexEffect != null) {\r\n var vertexEffect = this.vertexEffect;\r\n var verts = clippedVertices;\r\n if (!twoColorTint) {\r\n for (var v = 0, n_4 = clippedVertices.length; v < n_4; v += vertexSize) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]);\r\n tempUv.x = verts[v + 6];\r\n tempUv.y = verts[v + 7];\r\n tempDark.set(0, 0, 0, 0);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n }\r\n }\r\n else {\r\n for (var v = 0, n_5 = clippedVertices.length; v < n_5; v += vertexSize) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]);\r\n tempUv.x = verts[v + 6];\r\n tempUv.y = verts[v + 7];\r\n tempDark.set(verts[v + 8], verts[v + 9], verts[v + 10], verts[v + 11]);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n verts[v + 8] = tempDark.r;\r\n verts[v + 9] = tempDark.g;\r\n verts[v + 10] = tempDark.b;\r\n verts[v + 11] = tempDark.a;\r\n }\r\n }\r\n }\r\n batcher.draw(texture, clippedVertices, clippedTriangles);\r\n }\r\n else {\r\n var verts = renderable.vertices;\r\n if (this.vertexEffect != null) {\r\n var vertexEffect = this.vertexEffect;\r\n if (!twoColorTint) {\r\n for (var v = 0, u = 0, n_6 = renderable.numFloats; v < n_6; v += vertexSize, u += 2) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempUv.x = uvs[u];\r\n tempUv.y = uvs[u + 1];\r\n tempLight.setFromColor(finalColor);\r\n tempDark.set(0, 0, 0, 0);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n }\r\n }\r\n else {\r\n for (var v = 0, u = 0, n_7 = renderable.numFloats; v < n_7; v += vertexSize, u += 2) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempUv.x = uvs[u];\r\n tempUv.y = uvs[u + 1];\r\n tempLight.setFromColor(finalColor);\r\n tempDark.setFromColor(darkColor);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n verts[v + 8] = tempDark.r;\r\n verts[v + 9] = tempDark.g;\r\n verts[v + 10] = tempDark.b;\r\n verts[v + 11] = tempDark.a;\r\n }\r\n }\r\n }\r\n else {\r\n if (!twoColorTint) {\r\n for (var v = 2, u = 0, n_8 = renderable.numFloats; v < n_8; v += vertexSize, u += 2) {\r\n verts[v] = finalColor.r;\r\n verts[v + 1] = finalColor.g;\r\n verts[v + 2] = finalColor.b;\r\n verts[v + 3] = finalColor.a;\r\n verts[v + 4] = uvs[u];\r\n verts[v + 5] = uvs[u + 1];\r\n }\r\n }\r\n else {\r\n for (var v = 2, u = 0, n_9 = renderable.numFloats; v < n_9; v += vertexSize, u += 2) {\r\n verts[v] = finalColor.r;\r\n verts[v + 1] = finalColor.g;\r\n verts[v + 2] = finalColor.b;\r\n verts[v + 3] = finalColor.a;\r\n verts[v + 4] = uvs[u];\r\n verts[v + 5] = uvs[u + 1];\r\n verts[v + 6] = darkColor.r;\r\n verts[v + 7] = darkColor.g;\r\n verts[v + 8] = darkColor.b;\r\n verts[v + 9] = darkColor.a;\r\n }\r\n }\r\n }\r\n var view = renderable.vertices.subarray(0, renderable.numFloats);\r\n batcher.draw(texture, view, triangles);\r\n }\r\n }\r\n clipper.clipEndWithSlot(slot);\r\n }\r\n clipper.clipEnd();\r\n };\r\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n return SkeletonRenderer;\r\n }());\r\n webgl.SkeletonRenderer = SkeletonRenderer;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Vector3 = (function () {\r\n function Vector3(x, y, z) {\r\n if (x === void 0) { x = 0; }\r\n if (y === void 0) { y = 0; }\r\n if (z === void 0) { z = 0; }\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n }\r\n Vector3.prototype.setFrom = function (v) {\r\n this.x = v.x;\r\n this.y = v.y;\r\n this.z = v.z;\r\n return this;\r\n };\r\n Vector3.prototype.set = function (x, y, z) {\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n return this;\r\n };\r\n Vector3.prototype.add = function (v) {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z;\r\n return this;\r\n };\r\n Vector3.prototype.sub = function (v) {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z;\r\n return this;\r\n };\r\n Vector3.prototype.scale = function (s) {\r\n this.x *= s;\r\n this.y *= s;\r\n this.z *= s;\r\n return this;\r\n };\r\n Vector3.prototype.normalize = function () {\r\n var len = this.length();\r\n if (len == 0)\r\n return this;\r\n len = 1 / len;\r\n this.x *= len;\r\n this.y *= len;\r\n this.z *= len;\r\n return this;\r\n };\r\n Vector3.prototype.cross = function (v) {\r\n return this.set(this.y * v.z - this.z * v.y, this.z * v.x - this.x * v.z, this.x * v.y - this.y * v.x);\r\n };\r\n Vector3.prototype.multiply = function (matrix) {\r\n var l_mat = matrix.values;\r\n return this.set(this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03], this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13], this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]);\r\n };\r\n Vector3.prototype.project = function (matrix) {\r\n var l_mat = matrix.values;\r\n var l_w = 1 / (this.x * l_mat[webgl.M30] + this.y * l_mat[webgl.M31] + this.z * l_mat[webgl.M32] + l_mat[webgl.M33]);\r\n return this.set((this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03]) * l_w, (this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13]) * l_w, (this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]) * l_w);\r\n };\r\n Vector3.prototype.dot = function (v) {\r\n return this.x * v.x + this.y * v.y + this.z * v.z;\r\n };\r\n Vector3.prototype.length = function () {\r\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\r\n };\r\n Vector3.prototype.distance = function (v) {\r\n var a = v.x - this.x;\r\n var b = v.y - this.y;\r\n var c = v.z - this.z;\r\n return Math.sqrt(a * a + b * b + c * c);\r\n };\r\n return Vector3;\r\n }());\r\n webgl.Vector3 = Vector3;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var ManagedWebGLRenderingContext = (function () {\r\n function ManagedWebGLRenderingContext(canvasOrContext, contextConfig) {\r\n var _this = this;\r\n if (contextConfig === void 0) { contextConfig = { alpha: \"true\" }; }\r\n this.restorables = new Array();\r\n if (canvasOrContext instanceof HTMLCanvasElement) {\r\n var canvas_1 = canvasOrContext;\r\n this.gl = (canvas_1.getContext(\"webgl2\", contextConfig) || canvas_1.getContext(\"webgl\", contextConfig));\r\n this.canvas = canvas_1;\r\n canvas_1.addEventListener(\"webglcontextlost\", function (e) {\r\n var event = e;\r\n if (e) {\r\n e.preventDefault();\r\n }\r\n });\r\n canvas_1.addEventListener(\"webglcontextrestored\", function (e) {\r\n for (var i = 0, n = _this.restorables.length; i < n; i++) {\r\n _this.restorables[i].restore();\r\n }\r\n });\r\n }\r\n else {\r\n this.gl = canvasOrContext;\r\n this.canvas = this.gl.canvas;\r\n }\r\n }\r\n ManagedWebGLRenderingContext.prototype.addRestorable = function (restorable) {\r\n this.restorables.push(restorable);\r\n };\r\n ManagedWebGLRenderingContext.prototype.removeRestorable = function (restorable) {\r\n var index = this.restorables.indexOf(restorable);\r\n if (index > -1)\r\n this.restorables.splice(index, 1);\r\n };\r\n return ManagedWebGLRenderingContext;\r\n }());\r\n webgl.ManagedWebGLRenderingContext = ManagedWebGLRenderingContext;\r\n var WebGLBlendModeConverter = (function () {\r\n function WebGLBlendModeConverter() {\r\n }\r\n WebGLBlendModeConverter.getDestGLBlendMode = function (blendMode) {\r\n switch (blendMode) {\r\n case spine.BlendMode.Normal: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\r\n case spine.BlendMode.Additive: return WebGLBlendModeConverter.ONE;\r\n case spine.BlendMode.Multiply: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\r\n case spine.BlendMode.Screen: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\r\n default: throw new Error(\"Unknown blend mode: \" + blendMode);\r\n }\r\n };\r\n WebGLBlendModeConverter.getSourceGLBlendMode = function (blendMode, premultipliedAlpha) {\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n switch (blendMode) {\r\n case spine.BlendMode.Normal: return premultipliedAlpha ? WebGLBlendModeConverter.ONE : WebGLBlendModeConverter.SRC_ALPHA;\r\n case spine.BlendMode.Additive: return premultipliedAlpha ? WebGLBlendModeConverter.ONE : WebGLBlendModeConverter.SRC_ALPHA;\r\n case spine.BlendMode.Multiply: return WebGLBlendModeConverter.DST_COLOR;\r\n case spine.BlendMode.Screen: return WebGLBlendModeConverter.ONE;\r\n default: throw new Error(\"Unknown blend mode: \" + blendMode);\r\n }\r\n };\r\n WebGLBlendModeConverter.ZERO = 0;\r\n WebGLBlendModeConverter.ONE = 1;\r\n WebGLBlendModeConverter.SRC_COLOR = 0x0300;\r\n WebGLBlendModeConverter.ONE_MINUS_SRC_COLOR = 0x0301;\r\n WebGLBlendModeConverter.SRC_ALPHA = 0x0302;\r\n WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA = 0x0303;\r\n WebGLBlendModeConverter.DST_ALPHA = 0x0304;\r\n WebGLBlendModeConverter.ONE_MINUS_DST_ALPHA = 0x0305;\r\n WebGLBlendModeConverter.DST_COLOR = 0x0306;\r\n return WebGLBlendModeConverter;\r\n }());\r\n webgl.WebGLBlendModeConverter = WebGLBlendModeConverter;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\n//# sourceMappingURL=spine-both.js.map\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = spine;\n\n}.call(window));\n"],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/spine/dist/SpineWebGLPlugin.js b/plugins/spine/dist/SpineWebGLPlugin.js index 2334b40b4..b600c7e5f 100644 --- a/plugins/spine/dist/SpineWebGLPlugin.js +++ b/plugins/spine/dist/SpineWebGLPlugin.js @@ -82,7 +82,7 @@ window["SpinePlugin"] = /******/ /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 32); +/******/ return __webpack_require__(__webpack_require__.s = 35); /******/ }) /************************************************************************/ /******/ ([ @@ -91,7 +91,7 @@ window["SpinePlugin"] = /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -345,7 +345,7 @@ module.exports = Class; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -404,7 +404,27 @@ var MATH_CONST = { * @type {Phaser.Math.RandomDataGenerator} * @since 3.0.0 */ - RND: null + RND: null, + + /** + * The minimum safe integer this browser supports. + * We use a const for backward compatibility with Internet Explorer. + * + * @name Phaser.Math.MIN_SAFE_INTEGER + * @type {number} + * @since 3.21.0 + */ + MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991, + + /** + * The maximum safe integer this browser supports. + * We use a const for backward compatibility with Internet Explorer. + * + * @name Phaser.Math.MAX_SAFE_INTEGER + * @type {number} + * @since 3.21.0 + */ + MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991 }; @@ -417,7 +437,7 @@ module.exports = MATH_CONST; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -469,86 +489,11 @@ module.exports = IsPlainObject; /***/ }), /* 3 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Finds the key within the top level of the {@link source} object, or returns {@link defaultValue} - * - * @function Phaser.Utils.Objects.GetFastValue - * @since 3.0.0 - * - * @param {object} source - The object to search - * @param {string} key - The key for the property on source. Must exist at the top level of the source object (no periods) - * @param {*} [defaultValue] - The default value to use if the key does not exist. - * - * @return {*} The value if found; otherwise, defaultValue (null if none provided) - */ -var GetFastValue = function (source, key, defaultValue) -{ - var t = typeof(source); - - if (!source || t === 'number' || t === 'string') - { - return defaultValue; - } - else if (source.hasOwnProperty(key) && source[key] !== undefined) - { - return source[key]; - } - else - { - return defaultValue; - } -}; - -module.exports = GetFastValue; - - -/***/ }), -/* 4 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Wrap the given `value` between `min` and `max. - * - * @function Phaser.Math.Wrap - * @since 3.0.0 - * - * @param {number} value - The value to wrap. - * @param {number} min - The minimum value. - * @param {number} max - The maximum value. - * - * @return {number} The wrapped value. - */ -var Wrap = function (value, min, max) -{ - var range = max - min; - - return (min + ((((value - min) % range) + range) % range)); -}; - -module.exports = Wrap; - - -/***/ }), -/* 5 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -556,6 +501,7 @@ module.exports = Wrap; // and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl var Class = __webpack_require__(0); +var FuzzyEqual = __webpack_require__(20); /** * @classdesc @@ -735,6 +681,22 @@ var Vector2 = new Class({ return ((this.x === v.x) && (this.y === v.y)); }, + /** + * Check whether this Vector is approximately equal to a given Vector. + * + * @method Phaser.Math.Vector2#fuzzyEquals + * @since 3.23.0 + * + * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector. + * @param {number} [epsilon=0.0001] - The tolerance value. + * + * @return {boolean} Whether both absolute differences of the x and y components are smaller than `epsilon`. + */ + fuzzyEquals: function (v, epsilon) + { + return (FuzzyEqual(this.x, v.x, epsilon) && FuzzyEqual(this.y, v.y, epsilon)); + }, + /** * Calculate the angle between this Vector and the positive x-axis, in radians. * @@ -757,6 +719,21 @@ var Vector2 = new Class({ return angle; }, + /** + * Set the angle of this Vector. + * + * @method Phaser.Math.Vector2#setAngle + * @since 3.23.0 + * + * @param {number} angle - The angle, in radians. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + setAngle: function (angle) + { + return this.setToPolar(angle, this.length()); + }, + /** * Add a given Vector to this Vector. Addition is component-wise. * @@ -927,6 +904,21 @@ var Vector2 = new Class({ return Math.sqrt(x * x + y * y); }, + /** + * Set the length (or magnitude) of this Vector. + * + * @method Phaser.Math.Vector2#setLength + * @since 3.23.0 + * + * @param {number} length + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + setLength: function (length) + { + return this.normalize().scale(length); + }, + /** * Calculate the length of this Vector squared. * @@ -971,7 +963,7 @@ var Vector2 = new Class({ }, /** - * Right-hand normalize (make unit length) this Vector. + * Rotate this Vector to its perpendicular, in the positive direction. * * @method Phaser.Math.Vector2#normalizeRightHand * @since 3.0.0 @@ -988,6 +980,24 @@ var Vector2 = new Class({ return this; }, + /** + * Rotate this Vector to its perpendicular, in the negative direction. + * + * @method Phaser.Math.Vector2#normalizeLeftHand + * @since 3.23.0 + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + normalizeLeftHand: function () + { + var x = this.x; + + this.x = this.y; + this.y = x * -1; + + return this; + }, + /** * Calculate the dot product of this Vector and the given Vector. * @@ -1102,13 +1112,85 @@ var Vector2 = new Class({ this.y = 0; return this; + }, + + /** + * Limit the length (or magnitude) of this Vector. + * + * @method Phaser.Math.Vector2#limit + * @since 3.23.0 + * + * @param {number} max - The maximum length. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + limit: function (max) + { + var len = this.length(); + + if (len && len > max) + { + this.scale(max / len); + } + + return this; + }, + + /** + * Reflect this Vector off a line defined by a normal. + * + * @method Phaser.Math.Vector2#reflect + * @since 3.23.0 + * + * @param {Phaser.Math.Vector2} normal - A vector perpendicular to the line. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + reflect: function (normal) + { + normal = normal.clone().normalize(); + + return this.subtract(normal.scale(2 * this.dot(normal))); + }, + + /** + * Reflect this Vector across another. + * + * @method Phaser.Math.Vector2#mirror + * @since 3.23.0 + * + * @param {Phaser.Math.Vector2} axis - A vector to reflect across. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + mirror: function (axis) + { + return this.reflect(axis).negate(); + }, + + /** + * Rotate this Vector by an angle amount. + * + * @method Phaser.Math.Vector2#rotate + * @since 3.23.0 + * + * @param {number} delta - The angle to rotate by, in radians. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + rotate: function (delta) + { + var cos = Math.cos(delta); + var sin = Math.sin(delta); + + return this.set(cos * this.x - sin * this.y, sin * this.x + cos * this.y); } }); /** * A static zero Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -1120,7 +1202,7 @@ Vector2.ZERO = new Vector2(); /** * A static right Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -1132,7 +1214,7 @@ Vector2.RIGHT = new Vector2(1, 0); /** * A static left Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -1144,7 +1226,7 @@ Vector2.LEFT = new Vector2(-1, 0); /** * A static up Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -1156,7 +1238,7 @@ Vector2.UP = new Vector2(0, -1); /** * A static down Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -1168,7 +1250,7 @@ Vector2.DOWN = new Vector2(0, 1); /** * A static one Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -1181,13 +1263,88 @@ Vector2.ONE = new Vector2(1, 1); module.exports = Vector2; +/***/ }), +/* 4 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Finds the key within the top level of the {@link source} object, or returns {@link defaultValue} + * + * @function Phaser.Utils.Objects.GetFastValue + * @since 3.0.0 + * + * @param {object} source - The object to search + * @param {string} key - The key for the property on source. Must exist at the top level of the source object (no periods) + * @param {*} [defaultValue] - The default value to use if the key does not exist. + * + * @return {*} The value if found; otherwise, defaultValue (null if none provided) + */ +var GetFastValue = function (source, key, defaultValue) +{ + var t = typeof(source); + + if (!source || t === 'number' || t === 'string') + { + return defaultValue; + } + else if (source.hasOwnProperty(key) && source[key] !== undefined) + { + return source[key]; + } + else + { + return defaultValue; + } +}; + +module.exports = GetFastValue; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Wrap the given `value` between `min` and `max. + * + * @function Phaser.Math.Wrap + * @since 3.0.0 + * + * @param {number} value - The value to wrap. + * @param {number} min - The minimum value. + * @param {number} max - The maximum value. + * + * @return {number} The wrapped value. + */ +var Wrap = function (value, min, max) +{ + var range = max - min; + + return (min + ((((value - min) % range) + range) % range)); +}; + +module.exports = Wrap; + + /***/ }), /* 6 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1339,7 +1496,7 @@ module.exports = FILE_CONST; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1384,7 +1541,36 @@ module.exports = CounterClockwise; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive. + * + * @function Phaser.Math.FloatBetween + * @since 3.0.0 + * + * @param {number} min - The lower bound for the float, inclusive. + * @param {number} max - The upper bound for the float exclusive. + * + * @return {number} A random float within the given range. + */ +var FloatBetween = function (min, max) +{ + return Math.random() * (max - min) + min; +}; + +module.exports = FloatBetween; + + +/***/ }), +/* 9 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1409,12 +1595,12 @@ module.exports = Clamp; /***/ }), -/* 9 */ +/* 10 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1439,12 +1625,12 @@ module.exports = RadToDeg; /***/ }), -/* 10 */ +/* 11 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2249,12 +2435,12 @@ module.exports = Vector3; /***/ }), -/* 11 */ +/* 12 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2320,23 +2506,23 @@ module.exports = GetValue; /***/ }), -/* 12 */ +/* 13 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var CONST = __webpack_require__(6); -var Events = __webpack_require__(169); -var GetFastValue = __webpack_require__(3); -var GetURL = __webpack_require__(180); -var MergeXHRSettings = __webpack_require__(29); -var XHRLoader = __webpack_require__(181); -var XHRSettings = __webpack_require__(30); +var Events = __webpack_require__(178); +var GetFastValue = __webpack_require__(4); +var GetURL = __webpack_require__(189); +var MergeXHRSettings = __webpack_require__(32); +var XHRLoader = __webpack_require__(190); +var XHRSettings = __webpack_require__(33); /** * @classdesc @@ -2407,10 +2593,13 @@ var File = new Class({ /** * The URL of the file, not including baseURL. - * Automatically has Loader.path prepended to it. + * + * Automatically has Loader.path prepended to it if a string. + * + * Can also be a JavaScript Object, such as the results of parsing JSON data. * * @name Phaser.Loader.File#url - * @type {string} + * @type {object|string} * @since 3.0.0 */ this.url = GetFastValue(fileConfig, 'url'); @@ -2419,7 +2608,7 @@ var File = new Class({ { this.url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', ''); } - else if (typeof(this.url) !== 'function') + else if (typeof this.url === 'string' && this.url.indexOf('blob:') !== 0 && this.url.indexOf('data:') !== 0) { this.url = loader.path + this.url; } @@ -2597,6 +2786,8 @@ var File = new Class({ } else { + this.state = CONST.FILE_LOADING; + this.src = GetURL(this, this.loader.baseURL); if (this.src.indexOf('data:') === 0) @@ -2607,7 +2798,7 @@ var File = new Class({ { // The creation of this XHRLoader starts the load process going. // It will automatically call the following, based on the load outcome: - // + // // xhr.onload = this.onLoad // xhr.onerror = this.onError // xhr.onprogress = this.onProgress @@ -2638,6 +2829,8 @@ var File = new Class({ success = false; } + this.state = CONST.FILE_LOADED; + this.resetXHR(); this.loader.nextFile(this, success); @@ -2812,7 +3005,7 @@ var File = new Class({ * @method Phaser.Loader.File.createObjectURL * @static * @since 3.7.0 - * + * * @param {HTMLImageElement} image - Image object which 'src' attribute should be set to object URL. * @param {Blob} blob - A Blob object to create an object URL for. * @param {string} defaultType - Default mime type used if blob type is not available. @@ -2846,7 +3039,7 @@ File.createObjectURL = function (image, blob, defaultType) * @method Phaser.Loader.File.revokeObjectURL * @static * @since 3.7.0 - * + * * @param {HTMLImageElement} image - Image object which 'src' attribute should be revoked. */ File.revokeObjectURL = function (image) @@ -2861,12 +3054,12 @@ module.exports = File; /***/ }), -/* 13 */ +/* 14 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2930,12 +3123,12 @@ module.exports = FileTypesManager; /***/ }), -/* 14 */ +/* 15 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2951,6 +3144,8 @@ var IsPlainObject = __webpack_require__(2); * @function Phaser.Utils.Objects.Extend * @since 3.0.0 * + * @param {...*} [args] - The objects that will be mixed. + * * @return {object} The extended object. */ var Extend = function () @@ -3029,12 +3224,12 @@ module.exports = Extend; /***/ }), -/* 15 */ +/* 16 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3060,12 +3255,12 @@ module.exports = Between; /***/ }), -/* 16 */ +/* 17 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3097,16 +3292,16 @@ module.exports = Normalize; /***/ }), -/* 17 */ +/* 18 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathWrap = __webpack_require__(4); +var MathWrap = __webpack_require__(5); /** * Wrap an angle. @@ -3129,16 +3324,16 @@ module.exports = Wrap; /***/ }), -/* 18 */ +/* 19 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Wrap = __webpack_require__(4); +var Wrap = __webpack_require__(5); /** * Wrap an angle in degrees. @@ -3161,27 +3356,61 @@ module.exports = WrapDegrees; /***/ }), -/* 19 */ +/* 20 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Check whether the given values are fuzzily equal. + * + * Two numbers are fuzzily equal if their difference is less than `epsilon`. + * + * @function Phaser.Math.Fuzzy.Equal + * @since 3.0.0 + * + * @param {number} a - The first value. + * @param {number} b - The second value. + * @param {number} [epsilon=0.0001] - The epsilon. + * + * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`. + */ +var Equal = function (a, b, epsilon) +{ + if (epsilon === undefined) { epsilon = 0.0001; } + + return Math.abs(a - b) < epsilon; +}; + +module.exports = Equal; + + +/***/ }), +/* 21 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Factorial = __webpack_require__(20); +var Factorial = __webpack_require__(22); /** - * [description] + * Calculates the Bernstein basis from the three factorial coefficients. * * @function Phaser.Math.Bernstein * @since 3.0.0 * - * @param {number} n - [description] - * @param {number} i - [description] + * @param {number} n - The first value. + * @param {number} i - The second value. * - * @return {number} [description] + * @return {number} The Bernstein basis of Factorial(n) / Factorial(i) / Factorial(n - i) */ var Bernstein = function (n, i) { @@ -3192,12 +3421,12 @@ module.exports = Bernstein; /***/ }), -/* 20 */ +/* 22 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3232,26 +3461,26 @@ module.exports = Factorial; /***/ }), -/* 21 */ +/* 23 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * Calculates a Catmull-Rom value. + * Calculates a Catmull-Rom value from the given points, based on an alpha of 0.5. * * @function Phaser.Math.CatmullRom * @since 3.0.0 * - * @param {number} t - [description] - * @param {number} p0 - [description] - * @param {number} p1 - [description] - * @param {number} p2 - [description] - * @param {number} p3 - [description] + * @param {number} t - The amount to interpolate by. + * @param {number} p0 - The first control point. + * @param {number} p1 - The second control point. + * @param {number} p2 - The third control point. + * @param {number} p3 - The fourth control point. * * @return {number} The Catmull-Rom value. */ @@ -3269,12 +3498,12 @@ module.exports = CatmullRom; /***/ }), -/* 22 */ +/* 24 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3299,12 +3528,12 @@ module.exports = Linear; /***/ }), -/* 23 */ +/* 25 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3346,12 +3575,12 @@ module.exports = SmoothStep; /***/ }), -/* 24 */ +/* 26 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3385,12 +3614,12 @@ module.exports = SmootherStep; /***/ }), -/* 25 */ +/* 27 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3415,12 +3644,67 @@ module.exports = DegToRad; /***/ }), -/* 26 */ +/* 28 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Vector2 = __webpack_require__(3); + +/** + * Takes the `x` and `y` coordinates and transforms them into the same space as + * defined by the position, rotation and scale values. + * + * @function Phaser.Math.TransformXY + * @since 3.0.0 + * + * @param {number} x - The x coordinate to be transformed. + * @param {number} y - The y coordinate to be transformed. + * @param {number} positionX - Horizontal position of the transform point. + * @param {number} positionY - Vertical position of the transform point. + * @param {number} rotation - Rotation of the transform point, in radians. + * @param {number} scaleX - Horizontal scale of the transform point. + * @param {number} scaleY - Vertical scale of the transform point. + * @param {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} [output] - The output vector, point or object for the translated coordinates. + * + * @return {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} The translated point. + */ +var TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output) +{ + if (output === undefined) { output = new Vector2(); } + + var radianSin = Math.sin(rotation); + var radianCos = Math.cos(rotation); + + // Rotate and Scale + var a = radianCos * scaleX; + var b = radianSin * scaleX; + var c = -radianSin * scaleY; + var d = radianCos * scaleY; + + // Invert + var id = 1 / ((a * d) + (c * -b)); + + output.x = (d * id * x) + (-c * id * y) + (((positionY * c) - (positionX * d)) * id); + output.y = (a * id * y) + (-b * id * x) + (((-positionY * a) + (positionX * b)) * id); + + return output; +}; + +module.exports = TransformXY; + + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3928,12 +4212,12 @@ var Matrix3 = new Class({ }, /** - * [description] + * Set the values of this Matrix3 to be normalized from the given Matrix4. * * @method Phaser.Math.Matrix3#normalFromMat4 * @since 3.0.0 * - * @param {Phaser.Math.Matrix4} m - [description] + * @param {Phaser.Math.Matrix4} m - The Matrix4 to normalize the values from. * * @return {Phaser.Math.Matrix3} This Matrix3. */ @@ -4008,12 +4292,12 @@ module.exports = Matrix3; /***/ }), -/* 27 */ +/* 30 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4572,12 +4856,12 @@ var Matrix4 = new Class({ }, /** - * [description] + * Multiply the values of this Matrix4 by those given in the `src` argument. * * @method Phaser.Math.Matrix4#multiplyLocal * @since 3.0.0 * - * @param {Phaser.Math.Matrix4} src - [description] + * @param {Phaser.Math.Matrix4} src - The source Matrix4 that this Matrix4 is multiplied by. * * @return {Phaser.Math.Matrix4} This Matrix4. */ @@ -5369,9 +5653,9 @@ var Matrix4 = new Class({ * @method Phaser.Math.Matrix4#yawPitchRoll * @since 3.0.0 * - * @param {number} yaw - [description] - * @param {number} pitch - [description] - * @param {number} roll - [description] + * @param {number} yaw - The yaw value. + * @param {number} pitch - The pitch value. + * @param {number} roll - The roll value. * * @return {Phaser.Math.Matrix4} This Matrix4. */ @@ -5470,12 +5754,12 @@ module.exports = Matrix4; /***/ }), -/* 28 */ +/* 31 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -5483,8 +5767,8 @@ module.exports = Matrix4; // and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl var Class = __webpack_require__(0); -var Vector3 = __webpack_require__(10); -var Matrix3 = __webpack_require__(26); +var Vector3 = __webpack_require__(11); +var Matrix3 = __webpack_require__(29); var EPSILON = 0.000001; @@ -5792,13 +6076,13 @@ var Quaternion = new Class({ }, /** - * [description] + * Rotates this Quaternion based on the two given vectors. * * @method Phaser.Math.Quaternion#rotationTo * @since 3.0.0 * - * @param {Phaser.Math.Vector3} a - [description] - * @param {Phaser.Math.Vector3} b - [description] + * @param {Phaser.Math.Vector3} a - The transform rotation vector. + * @param {Phaser.Math.Vector3} b - The target rotation vector. * * @return {Phaser.Math.Quaternion} This Quaternion. */ @@ -6242,17 +6526,17 @@ module.exports = Quaternion; /***/ }), -/* 29 */ +/* 32 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Extend = __webpack_require__(14); -var XHRSettings = __webpack_require__(30); +var Extend = __webpack_require__(15); +var XHRSettings = __webpack_require__(33); /** * Takes two XHRSettings Objects and creates a new XHRSettings object from them. @@ -6290,12 +6574,12 @@ module.exports = MergeXHRSettings; /***/ }), -/* 30 */ +/* 33 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -6310,16 +6594,18 @@ module.exports = MergeXHRSettings; * @param {string} [user=''] - Optional username for the XHR request. * @param {string} [password=''] - Optional password for the XHR request. * @param {integer} [timeout=0] - Optional XHR timeout value. + * @param {boolean} [withCredentials=false] - Optional XHR withCredentials value. * * @return {Phaser.Types.Loader.XHRSettingsObject} The XHRSettings object as used by the Loader. */ -var XHRSettings = function (responseType, async, user, password, timeout) +var XHRSettings = function (responseType, async, user, password, timeout, withCredentials) { if (responseType === undefined) { responseType = ''; } if (async === undefined) { async = true; } if (user === undefined) { user = ''; } if (password === undefined) { password = ''; } if (timeout === undefined) { timeout = 0; } + if (withCredentials === undefined) { withCredentials = false; } // Before sending a request, set the xhr.responseType to "text", // "arraybuffer", "blob", or "document", depending on your data needs. @@ -6340,12 +6626,16 @@ var XHRSettings = function (responseType, async, user, password, timeout) timeout: timeout, // setRequestHeader + headers: undefined, header: undefined, headerValue: undefined, requestedWith: false, // overrideMimeType - overrideMimeType: undefined + overrideMimeType: undefined, + + // withCredentials + withCredentials: withCredentials }; }; @@ -6354,12 +6644,12 @@ module.exports = XHRSettings; /***/ }), -/* 31 */ +/* 34 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -6381,7 +6671,7 @@ module.exports = NOOP; /***/ }), -/* 32 */ +/* 35 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -6390,34 +6680,39 @@ module.exports = NOOP; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BuildGameObject = __webpack_require__(33); +var BuildGameObject = __webpack_require__(36); var Class = __webpack_require__(0); -var GetValue = __webpack_require__(11); -var ResizeEvent = __webpack_require__(143); -var ScenePlugin = __webpack_require__(144); -var Spine = __webpack_require__(166); -var SpineFile = __webpack_require__(167); -var SpineGameObject = __webpack_require__(185); +var GetValue = __webpack_require__(12); +var ResizeEvent = __webpack_require__(150); +var ScenePlugin = __webpack_require__(151); +var Spine = __webpack_require__(175); +var SpineFile = __webpack_require__(176); +var SpineGameObject = __webpack_require__(194); /** * @classdesc * The Spine Plugin is a Scene based plugin that handles the creation and rendering of Spine Game Objects. - * + * + * Find more details about Spine itself at http://esotericsoftware.com/. + * * All rendering and object creation is handled via the official Spine Runtimes. This version of the plugin - * uses the Spine 3.8 runtimes. Files created in a different version of Spine may not work as a result. - * - * You can find more details about Spine at http://esotericsoftware.com/. - * + * uses the Spine 3.8.95 runtimes. Please note that due to the way the Spine runtimes use semver, you will + * get breaking changes in point-releases. Therefore, files created in a different version of Spine may not + * work as a result, without you first updating the runtimes and rebuilding the plugin. + * + * Esoteric themselves recommend that you freeze your Spine editor version against the runtime versions. + * You can find more information about this here: http://esotericsoftware.com/spine-settings#Version + * * Please note that you require a Spine license in order to use Spine Runtimes in your games. - * + * * You can install this plugin into your Phaser game by either importing it, if you're using ES6: - * + * * ```javascript * import * as SpinePlugin from './SpinePlugin.js'; * ``` - * + * * and then adding it to your Phaser Game configuration: - * + * * ```javascript * plugins: { * scene: [ @@ -6425,10 +6720,10 @@ var SpineGameObject = __webpack_require__(185); * ] * } * ``` - * + * * If you're using ES5 then you can load the Spine Plugin in a Scene files payload, _within_ your * Game Configuration object, like this: - * + * * ```javascript * scene: { * preload: preload, @@ -6440,42 +6735,42 @@ var SpineGameObject = __webpack_require__(185); * } * } * ``` - * + * * Loading it like this allows you to then use commands such as `this.load.spine` from within the * same Scene. Alternatively, you can use the method `this.load.plugin` to load the plugin via the normal * Phaser Loader. However, doing so will not add it to the current Scene. It will be available from any * subsequent Scenes. - * + * * Assuming a default environment you access it from within a Scene by using the `this.spine` reference. - * + * * When this plugin is installed into a Scene it will add a Loader File Type, allowing you to load * Spine files directly, i.e.: - * + * * ```javascript * this.load.spine('stretchyman', 'stretchyman-pro.json', [ 'stretchyman-pma.atlas' ], true); * ``` - * - * It also installs a Game Object Factory method, allowin you to create Spine Game Objects: - * + * + * It also installs a Game Object Factory method, allowing you to create Spine Game Objects: + * * ```javascript * this.add.spine(512, 650, 'stretchyman') * ``` - * + * * The first argument is the key which you used when importing the Spine data. There are lots of * things you can specify, such as the animation name, skeleton, slot attachments and more. Please * see the respective documentation and examples for further details. - * + * * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary. * The associated atlas files are scanned for any texture files present in them, which are then loaded. - * If you have exported your Spine data with preMultipiedAlpha set, then you should enable this in the + * If you have exported your Spine data with preMultipliedAlpha set, then you should enable this in the * load arguments, or you may see black outlines around skeleton textures. - * + * * The Spine plugin is local to the Scene in which it is installed. This means a change to something, * such as the Skeleton Debug Renderer, in this Scene, will not impact the renderer in any other Scene. * The only exception to this is with the caches this plugin creates. Spine atlas and texture data are * stored in their own caches, which are global, meaning they're accessible from any Scene in your * game, regardless if the Scene loaded the Spine data or not. - * + * * For details about the Spine Runtime API see http://esotericsoftware.com/spine-api-reference * * @class SpinePlugin @@ -6510,7 +6805,7 @@ var SpinePlugin = new Class({ /** * A custom cache that stores the Spine atlas data. - * + * * This cache is global across your game, allowing you to access Spine data loaded from other Scenes, * no matter which Scene you are in. * @@ -6522,7 +6817,7 @@ var SpinePlugin = new Class({ /** * A custom cache that stores the Spine Textures. - * + * * This cache is global across your game, allowing you to access Spine data loaded from other Scenes, * no matter which Scene you are in. * @@ -6562,7 +6857,7 @@ var SpinePlugin = new Class({ /** * The underlying WebGL context of the Phaser renderer. - * + * * Only set if running in WebGL mode. * * @name SpinePlugin#gl @@ -6582,7 +6877,7 @@ var SpinePlugin = new Class({ /** * An instance of the Spine WebGL Scene Renderer. - * + * * Only set if running in WebGL mode. * * @name SpinePlugin#sceneRenderer @@ -6602,7 +6897,7 @@ var SpinePlugin = new Class({ /** * An instance of the Spine Skeleton Debug Renderer. - * + * * Only set if running in WebGL mode. * * @name SpinePlugin#skeletonDebugRenderer @@ -6664,46 +6959,46 @@ var SpinePlugin = new Class({ var add = function (x, y, key, animationName, loop) { var spineGO = new SpineGameObject(this.scene, _this, x, y, key, animationName, loop); - + this.displayList.add(spineGO); this.updateList.add(spineGO); - + return spineGO; }; var make = function (config, addToScene) { if (config === undefined) { config = {}; } - + var key = GetValue(config, 'key', null); var animationName = GetValue(config, 'animationName', null); var loop = GetValue(config, 'loop', false); - + var spineGO = new SpineGameObject(this.scene, _this, 0, 0, key, animationName, loop); - + if (addToScene !== undefined) { config.add = addToScene; } - + BuildGameObject(this.scene, spineGO, config); - + // Spine specific var skinName = GetValue(config, 'skinName', false); - + if (skinName) { spineGO.setSkinByName(skinName); } - + var slotName = GetValue(config, 'slotName', false); var attachmentName = GetValue(config, 'attachmentName', null); - + if (slotName) { spineGO.setAttachment(slotName, attachmentName); } - + return spineGO.refresh(); }; @@ -6760,7 +7055,7 @@ var SpinePlugin = new Class({ { this.sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true); - // Monkeypatch the Spine setBlendMode functions, or batching is destroyed + // Monkeypatch the Spine setBlendMode functions, or batching is destroyed! var setBlendMode = function (srcBlend, dstBlend) { @@ -6795,9 +7090,9 @@ var SpinePlugin = new Class({ * * @method SpinePlugin#getAtlasCanvas * @since 3.19.0 - * + * * @param {string} key - The key of the Spine Atlas to create. - * + * * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found. */ getAtlasCanvas: function (key) @@ -6823,7 +7118,7 @@ var SpinePlugin = new Class({ atlas = new Spine.TextureAtlas(atlasEntry.data, function (path) { - return new Spine.canvas.CanvasTexture(textures.get(path).getSourceImage()); + return new Spine.canvas.CanvasTexture(textures.get(atlasEntry.prefix + path).getSourceImage()); }); } @@ -6836,9 +7131,9 @@ var SpinePlugin = new Class({ * * @method SpinePlugin#getAtlasWebGL * @since 3.19.0 - * + * * @param {string} key - The key of the Spine Atlas to create. - * + * * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found. */ getAtlasWebGL: function (key) @@ -6868,7 +7163,7 @@ var SpinePlugin = new Class({ atlas = new Spine.TextureAtlas(atlasEntry.data, function (path) { - return new Spine.webgl.GLTexture(gl, textures.get(path).getSourceImage(), false); + return new Spine.webgl.GLTexture(gl, textures.get(atlasEntry.prefix + path).getSourceImage(), false); }); } @@ -6879,7 +7174,7 @@ var SpinePlugin = new Class({ * Adds a Spine Skeleton and Atlas file, or array of files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -6894,21 +7189,21 @@ var SpinePlugin = new Class({ * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been * loaded. - * + * * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. - * + * * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary. The associated * atlas files are scanned for any texture files present in them, which are then loaded. If you have exported - * your Spine data with preMultipiedAlpha set, then you should enable this in the arguments, or you may see black + * your Spine data with preMultipliedAlpha set, then you should enable this in the arguments, or you may see black * outlines around skeleton textures. - * + * * The key must be a unique String. It is used to add the file to the global Spine cache upon a successful load. * The key should be unique both in terms of files being loaded and files already present in the Spine cache. * Loading a file using a key that is already taken will result in a warning. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.spine({ * key: 'mainmenu', @@ -6917,9 +7212,9 @@ var SpinePlugin = new Class({ * preMultipliedAlpha: true * }); * ``` - * + * * If you need to load multiple Spine atlas files, provide them as an array: - * + * * ```javascript * function preload () * { @@ -6942,13 +7237,13 @@ var SpinePlugin = new Class({ * Note: The ability to load this type of file will only be available if the Spine Plugin has been built or loaded into Phaser. * * @method Phaser.Loader.LoaderPlugin#spine - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.19.0 * * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} jsonURL - The absolute or relative URL to load the Spine json file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". * @param {string|string[]} atlasURL - The absolute or relative URL to load the Spine atlas file from. If undefined or `null` it will be set to `.atlas`, i.e. if `key` was "alien" then the URL will be "alien.atlas". - * @param {boolean} [preMultipiedAlpha=false] - Do the texture files include pre-multiplied alpha or not? + * @param {boolean} [preMultipliedAlpha=false] - Do the texture files include pre-multiplied alpha or not? * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the Spine json file. Used in replacement of the Loaders default XHR Settings. * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the Spine atlas file. Used in replacement of the Loaders default XHR Settings. * @@ -6957,13 +7252,13 @@ var SpinePlugin = new Class({ spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings) { var multifile; - + if (Array.isArray(key)) { for (var i = 0; i < key.length; i++) { multifile = new SpineFile(this, key[i]); - + this.addFile(multifile.files); } } @@ -6973,23 +7268,23 @@ var SpinePlugin = new Class({ this.addFile(multifile.files); } - + return this; }, /** * Converts the given x and y screen coordinates into the world space of the given Skeleton. - * + * * Only works in WebGL. * * @method SpinePlugin#worldToLocal * @since 3.19.0 - * + * * @param {number} x - The screen space x coordinate to convert. * @param {number} y - The screen space y coordinate to convert. * @param {spine.Skeleton} skeleton - The Spine Skeleton to convert into. * @param {spine.Bone} [bone] - Optional bone of the Skeleton to convert into. - * + * * @return {spine.Vector2} A Vector2 containing the translated point. */ worldToLocal: function (x, y, skeleton, bone) @@ -7026,10 +7321,10 @@ var SpinePlugin = new Class({ * * @method SpinePlugin#getVector2 * @since 3.19.0 - * + * * @param {number} x - The Vector x value. * @param {number} y - The Vector y value. - * + * * @return {spine.Vector2} A Spine Vector2 based on the given values. */ getVector2: function (x, y) @@ -7039,16 +7334,16 @@ var SpinePlugin = new Class({ /** * Returns a Spine Vector2 based on the given x, y and z values. - * + * * Only works in WebGL. * * @method SpinePlugin#getVector3 * @since 3.19.0 - * + * * @param {number} x - The Vector x value. * @param {number} y - The Vector y value. * @param {number} z - The Vector z value. - * + * * @return {spine.Vector2} A Spine Vector2 based on the given values. */ getVector3: function (x, y, z) @@ -7058,14 +7353,14 @@ var SpinePlugin = new Class({ /** * Sets `drawBones` in the Spine Skeleton Debug Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setDebugBones * @since 3.19.0 - * + * * @param {boolean} [value=true] - The value to set in the debug property. - * + * * @return {this} This Spine Plugin. */ setDebugBones: function (value) @@ -7079,14 +7374,14 @@ var SpinePlugin = new Class({ /** * Sets `drawRegionAttachments` in the Spine Skeleton Debug Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setDebugRegionAttachments * @since 3.19.0 - * + * * @param {boolean} [value=true] - The value to set in the debug property. - * + * * @return {this} This Spine Plugin. */ setDebugRegionAttachments: function (value) @@ -7100,14 +7395,14 @@ var SpinePlugin = new Class({ /** * Sets `drawBoundingBoxes` in the Spine Skeleton Debug Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setDebugBoundingBoxes * @since 3.19.0 - * + * * @param {boolean} [value=true] - The value to set in the debug property. - * + * * @return {this} This Spine Plugin. */ setDebugBoundingBoxes: function (value) @@ -7121,14 +7416,14 @@ var SpinePlugin = new Class({ /** * Sets `drawMeshHull` in the Spine Skeleton Debug Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setDebugMeshHull * @since 3.19.0 - * + * * @param {boolean} [value=true] - The value to set in the debug property. - * + * * @return {this} This Spine Plugin. */ setDebugMeshHull: function (value) @@ -7142,14 +7437,14 @@ var SpinePlugin = new Class({ /** * Sets `drawMeshTriangles` in the Spine Skeleton Debug Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setDebugMeshTriangles * @since 3.19.0 - * + * * @param {boolean} [value=true] - The value to set in the debug property. - * + * * @return {this} This Spine Plugin. */ setDebugMeshTriangles: function (value) @@ -7163,14 +7458,14 @@ var SpinePlugin = new Class({ /** * Sets `drawPaths` in the Spine Skeleton Debug Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setDebugPaths * @since 3.19.0 - * + * * @param {boolean} [value=true] - The value to set in the debug property. - * + * * @return {this} This Spine Plugin. */ setDebugPaths: function (value) @@ -7184,14 +7479,14 @@ var SpinePlugin = new Class({ /** * Sets `drawSkeletonXY` in the Spine Skeleton Debug Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setDebugSkeletonXY * @since 3.19.0 - * + * * @param {boolean} [value=true] - The value to set in the debug property. - * + * * @return {this} This Spine Plugin. */ setDebugSkeletonXY: function (value) @@ -7205,14 +7500,14 @@ var SpinePlugin = new Class({ /** * Sets `drawClipping` in the Spine Skeleton Debug Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setDebugClipping * @since 3.19.0 - * + * * @param {boolean} [value=true] - The value to set in the debug property. - * + * * @return {this} This Spine Plugin. */ setDebugClipping: function (value) @@ -7226,14 +7521,14 @@ var SpinePlugin = new Class({ /** * Sets the given vertex effect on the Spine Skeleton Renderer. - * + * * Only works in WebGL. * * @method SpinePlugin#setEffect * @since 3.19.0 - * + * * @param {spine.VertexEffect} [effect] - The vertex effect to set on the Skeleton Renderer. - * + * * @return {this} This Spine Plugin. */ setEffect: function (effect) @@ -7245,15 +7540,15 @@ var SpinePlugin = new Class({ /** * Creates a Spine Skeleton based on the given key and optional Skeleton JSON data. - * + * * The Skeleton data should have already been loaded before calling this method. * * @method SpinePlugin#createSkeleton * @since 3.19.0 - * + * * @param {string} key - The key of the Spine skeleton data, as loaded by the plugin. If the Spine JSON contains multiple skeletons, reference them with a period, i.e. `set.spineBoy`. * @param {object} [skeletonJSON] - Optional Skeleton JSON data to use, instead of getting it from the cache. - * + * * @return {(any|null)} This Spine Skeleton data object, or `null` if the key was invalid. */ createSkeleton: function (key, skeletonJSON) @@ -7286,7 +7581,7 @@ var SpinePlugin = new Class({ var preMultipliedAlpha = atlasData.preMultipliedAlpha; var atlasLoader = new Spine.AtlasAttachmentLoader(atlas); - + var skeletonJson = new Spine.SkeletonJson(atlasLoader); var data; @@ -7307,7 +7602,7 @@ var SpinePlugin = new Class({ var skeletonData = skeletonJson.readSkeletonData(data); var skeleton = new Spine.Skeleton(skeletonData); - + return { skeletonData: skeletonData, skeleton: skeleton, preMultipliedAlpha: preMultipliedAlpha }; } else @@ -7318,14 +7613,14 @@ var SpinePlugin = new Class({ /** * Creates a new Animation State and Animation State Data for the given skeleton. - * + * * The returned object contains two properties: `state` and `stateData` respectively. * * @method SpinePlugin#createAnimationState * @since 3.19.0 - * + * * @param {spine.Skeleton} skeleton - The Skeleton to create the Animation State for. - * + * * @return {any} An object containing the Animation State and Animation State Data instances. */ createAnimationState: function (skeleton) @@ -7339,17 +7634,17 @@ var SpinePlugin = new Class({ /** * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose. - * + * * The returned object contains two properties: `offset` and `size`: - * + * * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB. * `size` - The width and height of the AABB. * * @method SpinePlugin#getBounds * @since 3.19.0 - * + * * @param {spine.Skeleton} skeleton - The Skeleton to get the bounds from. - * + * * @return {any} The bounds object. */ getBounds: function (skeleton) @@ -7364,7 +7659,7 @@ var SpinePlugin = new Class({ /** * Internal handler for when the renderer resizes. - * + * * Only called if running in WebGL. * * @method SpinePlugin#onResize @@ -7380,14 +7675,14 @@ var SpinePlugin = new Class({ sceneRenderer.camera.position.x = viewportWidth / 2; sceneRenderer.camera.position.y = viewportHeight / 2; - + sceneRenderer.camera.viewportWidth = viewportWidth; sceneRenderer.camera.viewportHeight = viewportHeight; }, /** * The Scene that owns this plugin is shutting down. - * + * * We need to kill and reset all internal properties as well as stop listening to Scene events. * * @method SpinePlugin#shutdown @@ -7399,11 +7694,16 @@ var SpinePlugin = new Class({ var eventEmitter = this.systems.events; eventEmitter.off('shutdown', this.shutdown, this); + + if (this.isWebGL) + { + this.game.scale.off(ResizeEvent, this.onResize, this); + } }, /** * The Scene that owns this plugin is being destroyed. - * + * * We need to shutdown and then kill off all external references. * * @method SpinePlugin#destroy @@ -7439,30 +7739,30 @@ var SpinePlugin = new Class({ /** * Creates a new Spine Game Object and adds it to the Scene. - * + * * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects * do not have a Phaser origin. - * + * * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference * that. - * + * * ```javascript * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true); * ``` - * + * * The key is optional. If not passed here, you need to call `SpineGameObject.setSkeleton()` to use it. - * + * * The animation name is also optional and can be set later via `SpineGameObject.setAnimation`. - * + * * Should you wish for more control over the object creation, such as setting a slot attachment or skin * name, then use `SpinePlugin.make` instead. * * @method SpinePlugin#add * @since 3.19.0 - * + * * @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} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin. @@ -7474,16 +7774,16 @@ var SpinePlugin = new Class({ /** * Creates a new Spine Game Object from the given configuration file and optionally adds it to the Scene. - * + * * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects * do not have a Phaser origin. - * + * * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference * that. - * + * * ```javascript * let jelly = this.make.spine({ * x: 500, y: 500, key: 'jelly', @@ -7507,17 +7807,17 @@ module.exports = SpinePlugin; /***/ }), -/* 33 */ +/* 36 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlendModes = __webpack_require__(34); -var GetAdvancedValue = __webpack_require__(35); +var BlendModes = __webpack_require__(37); +var GetAdvancedValue = __webpack_require__(38); /** * Builds a Game Object using the provided configuration object. @@ -7635,12 +7935,12 @@ module.exports = BuildGameObject; /***/ }), -/* 34 */ +/* 37 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7974,17 +8274,17 @@ module.exports = { /***/ }), -/* 35 */ +/* 38 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH = __webpack_require__(36); -var GetValue = __webpack_require__(11); +var MATH = __webpack_require__(39); +var GetValue = __webpack_require__(12); /** * Retrieves a value from an object. Allows for more advanced selection options, including: @@ -8061,17 +8361,17 @@ module.exports = GetAdvancedValue; /***/ }), -/* 36 */ +/* 39 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var CONST = __webpack_require__(1); -var Extend = __webpack_require__(14); +var Extend = __webpack_require__(15); /** * @namespace Phaser.Math @@ -8080,62 +8380,63 @@ var Extend = __webpack_require__(14); var PhaserMath = { // Collections of functions - Angle: __webpack_require__(37), - Distance: __webpack_require__(44), - Easing: __webpack_require__(48), - Fuzzy: __webpack_require__(93), - Interpolation: __webpack_require__(99), - Pow2: __webpack_require__(107), - Snap: __webpack_require__(111), + Angle: __webpack_require__(40), + Distance: __webpack_require__(49), + Easing: __webpack_require__(57), + Fuzzy: __webpack_require__(102), + Interpolation: __webpack_require__(107), + Pow2: __webpack_require__(115), + Snap: __webpack_require__(119), // Expose the RNG Class - RandomDataGenerator: __webpack_require__(115), + RandomDataGenerator: __webpack_require__(123), // Single functions - Average: __webpack_require__(116), - Bernstein: __webpack_require__(19), - Between: __webpack_require__(117), - CatmullRom: __webpack_require__(21), - CeilTo: __webpack_require__(118), - Clamp: __webpack_require__(8), - DegToRad: __webpack_require__(25), - Difference: __webpack_require__(119), - Factorial: __webpack_require__(20), - FloatBetween: __webpack_require__(120), - FloorTo: __webpack_require__(121), - FromPercent: __webpack_require__(122), - GetSpeed: __webpack_require__(123), - IsEven: __webpack_require__(124), - IsEvenStrict: __webpack_require__(125), - Linear: __webpack_require__(22), - MaxAdd: __webpack_require__(126), - MinSub: __webpack_require__(127), - Percent: __webpack_require__(128), - RadToDeg: __webpack_require__(9), - RandomXY: __webpack_require__(129), - RandomXYZ: __webpack_require__(130), - RandomXYZW: __webpack_require__(131), - Rotate: __webpack_require__(132), - RotateAround: __webpack_require__(133), - RotateAroundDistance: __webpack_require__(134), - RoundAwayFromZero: __webpack_require__(135), - RoundTo: __webpack_require__(136), - SinCosTableGenerator: __webpack_require__(137), - SmootherStep: __webpack_require__(24), - SmoothStep: __webpack_require__(23), - ToXY: __webpack_require__(138), - TransformXY: __webpack_require__(139), - Within: __webpack_require__(140), - Wrap: __webpack_require__(4), + Average: __webpack_require__(124), + Bernstein: __webpack_require__(21), + Between: __webpack_require__(125), + CatmullRom: __webpack_require__(23), + CeilTo: __webpack_require__(126), + Clamp: __webpack_require__(9), + DegToRad: __webpack_require__(27), + Difference: __webpack_require__(127), + Factorial: __webpack_require__(22), + FloatBetween: __webpack_require__(8), + FloorTo: __webpack_require__(128), + FromPercent: __webpack_require__(129), + GetSpeed: __webpack_require__(130), + IsEven: __webpack_require__(131), + IsEvenStrict: __webpack_require__(132), + Linear: __webpack_require__(24), + MaxAdd: __webpack_require__(133), + MinSub: __webpack_require__(134), + Percent: __webpack_require__(135), + RadToDeg: __webpack_require__(10), + RandomXY: __webpack_require__(136), + RandomXYZ: __webpack_require__(137), + RandomXYZW: __webpack_require__(138), + Rotate: __webpack_require__(139), + RotateAround: __webpack_require__(140), + RotateAroundDistance: __webpack_require__(141), + RotateTo: __webpack_require__(142), + RoundAwayFromZero: __webpack_require__(143), + RoundTo: __webpack_require__(144), + SinCosTableGenerator: __webpack_require__(145), + SmootherStep: __webpack_require__(26), + SmoothStep: __webpack_require__(25), + ToXY: __webpack_require__(146), + TransformXY: __webpack_require__(28), + Within: __webpack_require__(147), + Wrap: __webpack_require__(5), // Vector classes - Vector2: __webpack_require__(5), - Vector3: __webpack_require__(10), - Vector4: __webpack_require__(141), - Matrix3: __webpack_require__(26), - Matrix4: __webpack_require__(27), - Quaternion: __webpack_require__(28), - RotateVec3: __webpack_require__(142) + Vector2: __webpack_require__(3), + Vector3: __webpack_require__(11), + Vector4: __webpack_require__(148), + Matrix3: __webpack_require__(29), + Matrix4: __webpack_require__(30), + Quaternion: __webpack_require__(31), + RotateVec3: __webpack_require__(149) }; @@ -8149,12 +8450,12 @@ module.exports = PhaserMath; /***/ }), -/* 37 */ +/* 40 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8164,28 +8465,30 @@ module.exports = PhaserMath; module.exports = { - Between: __webpack_require__(15), - BetweenPoints: __webpack_require__(38), - BetweenPointsY: __webpack_require__(39), - BetweenY: __webpack_require__(40), + Between: __webpack_require__(16), + BetweenPoints: __webpack_require__(41), + BetweenPointsY: __webpack_require__(42), + BetweenY: __webpack_require__(43), CounterClockwise: __webpack_require__(7), - Normalize: __webpack_require__(16), - Reverse: __webpack_require__(41), - RotateTo: __webpack_require__(42), - ShortestBetween: __webpack_require__(43), - Wrap: __webpack_require__(17), - WrapDegrees: __webpack_require__(18) + Normalize: __webpack_require__(17), + Random: __webpack_require__(44), + RandomDegrees: __webpack_require__(45), + Reverse: __webpack_require__(46), + RotateTo: __webpack_require__(47), + ShortestBetween: __webpack_require__(48), + Wrap: __webpack_require__(18), + WrapDegrees: __webpack_require__(19) }; /***/ }), -/* 38 */ +/* 41 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8197,8 +8500,8 @@ module.exports = { * @function Phaser.Math.Angle.BetweenPoints * @since 3.0.0 * - * @param {(Phaser.Geom.Point|object)} point1 - The first point. - * @param {(Phaser.Geom.Point|object)} point2 - The second point. + * @param {Phaser.Types.Math.Vector2Like} point1 - The first point. + * @param {Phaser.Types.Math.Vector2Like} point2 - The second point. * * @return {number} The angle in radians. */ @@ -8211,12 +8514,12 @@ module.exports = BetweenPoints; /***/ }), -/* 39 */ +/* 42 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8229,8 +8532,8 @@ module.exports = BetweenPoints; * @function Phaser.Math.Angle.BetweenPointsY * @since 3.0.0 * - * @param {(Phaser.Geom.Point|object)} point1 - The first point. - * @param {(Phaser.Geom.Point|object)} point2 - The second point. + * @param {Phaser.Types.Math.Vector2Like} point1 - The first point. + * @param {Phaser.Types.Math.Vector2Like} point2 - The second point. * * @return {number} The angle in radians. */ @@ -8243,12 +8546,12 @@ module.exports = BetweenPointsY; /***/ }), -/* 40 */ +/* 43 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8277,16 +8580,74 @@ module.exports = BetweenY; /***/ }), -/* 41 */ +/* 44 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @author @samme + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Normalize = __webpack_require__(16); +var FloatBetween = __webpack_require__(8); + +/** + * Returns a random angle in the range [-pi, pi]. + * + * @function Phaser.Math.Angle.Random + * @since 3.23.0 + * + * @return {number} The angle, in radians. + */ +var Random = function () +{ + return FloatBetween(-Math.PI, Math.PI); +}; + +module.exports = Random; + + +/***/ }), +/* 45 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author @samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var FloatBetween = __webpack_require__(8); + +/** + * Returns a random angle in the range [-180, 180]. + * + * @function Phaser.Math.Angle.RandomDegrees + * @since 3.23.0 + * + * @return {number} The angle, in degrees. + */ +var RandomDegrees = function () +{ + return FloatBetween(-180, 180); +}; + +module.exports = RandomDegrees; + + +/***/ }), +/* 46 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Normalize = __webpack_require__(17); /** * Reverse the given angle. @@ -8307,12 +8668,12 @@ module.exports = Reverse; /***/ }), -/* 42 */ +/* 47 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8374,12 +8735,12 @@ module.exports = RotateTo; /***/ }), -/* 43 */ +/* 48 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8423,12 +8784,12 @@ module.exports = ShortestBetween; /***/ }), -/* 44 */ +/* 49 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8438,20 +8799,24 @@ module.exports = ShortestBetween; module.exports = { - Between: __webpack_require__(45), - Power: __webpack_require__(46), - Squared: __webpack_require__(47) + Between: __webpack_require__(50), + BetweenPoints: __webpack_require__(51), + BetweenPointsSquared: __webpack_require__(52), + Chebyshev: __webpack_require__(53), + Power: __webpack_require__(54), + Snake: __webpack_require__(55), + Squared: __webpack_require__(56) }; /***/ }), -/* 45 */ +/* 50 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8480,12 +8845,110 @@ module.exports = DistanceBetween; /***/ }), -/* 46 */ +/* 51 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the distance between two points. + * + * @function Phaser.Math.Distance.BetweenPoints + * @since 3.22.0 + * + * @param {Phaser.Types.Math.Vector2Like} a - The first point. + * @param {Phaser.Types.Math.Vector2Like} b - The second point. + * + * @return {number} The distance between the points. + */ +var DistanceBetweenPoints = function (a, b) +{ + var dx = a.x - b.x; + var dy = a.y - b.y; + + return Math.sqrt(dx * dx + dy * dy); +}; + +module.exports = DistanceBetweenPoints; + + +/***/ }), +/* 52 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the squared distance between two points. + * + * @function Phaser.Math.Distance.BetweenPointsSquared + * @since 3.22.0 + * + * @param {Phaser.Types.Math.Vector2Like} a - The first point. + * @param {Phaser.Types.Math.Vector2Like} b - The second point. + * + * @return {number} The squared distance between the points. + */ +var DistanceBetweenPointsSquared = function (a, b) +{ + var dx = a.x - b.x; + var dy = a.y - b.y; + + return dx * dx + dy * dy; +}; + +module.exports = DistanceBetweenPointsSquared; + + +/***/ }), +/* 53 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the Chebyshev distance between two sets of coordinates (points). + * + * Chebyshev distance (or chessboard distance) is the maximum of the horizontal and vertical distances. + * It's the effective distance when movement can be horizontal, vertical, or diagonal. + * + * @function Phaser.Math.Distance.Chebyshev + * @since 3.22.0 + * + * @param {number} x1 - The x coordinate of the first point. + * @param {number} y1 - The y coordinate of the first point. + * @param {number} x2 - The x coordinate of the second point. + * @param {number} y2 - The y coordinate of the second point. + * + * @return {number} The distance between each point. + */ +var ChebyshevDistance = function (x1, y1, x2, y2) +{ + return Math.max(Math.abs(x1 - x2), Math.abs(y1 - y2)); +}; + +module.exports = ChebyshevDistance; + + +/***/ }), +/* 54 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8514,12 +8977,46 @@ module.exports = DistancePower; /***/ }), -/* 47 */ +/* 55 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the snake distance between two sets of coordinates (points). + * + * Snake distance (rectilinear distance, Manhattan distance) is the sum of the horizontal and vertical distances. + * It's the effective distance when movement is allowed only horizontally or vertically (but not both). + * + * @function Phaser.Math.Distance.Snake + * @since 3.22.0 + * + * @param {number} x1 - The x coordinate of the first point. + * @param {number} y1 - The y coordinate of the first point. + * @param {number} x2 - The x coordinate of the second point. + * @param {number} y2 - The y coordinate of the second point. + * + * @return {number} The distance between each point. + */ +var SnakeDistance = function (x1, y1, x2, y2) +{ + return Math.abs(x1 - x2) + Math.abs(y1 - y2); +}; + +module.exports = SnakeDistance; + + +/***/ }), +/* 56 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8548,12 +9045,12 @@ module.exports = DistanceSquared; /***/ }), -/* 48 */ +/* 57 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8563,29 +9060,29 @@ module.exports = DistanceSquared; module.exports = { - Back: __webpack_require__(49), - Bounce: __webpack_require__(53), - Circular: __webpack_require__(57), - Cubic: __webpack_require__(61), - Elastic: __webpack_require__(65), - Expo: __webpack_require__(69), - Linear: __webpack_require__(73), - Quadratic: __webpack_require__(75), - Quartic: __webpack_require__(79), - Quintic: __webpack_require__(83), - Sine: __webpack_require__(87), - Stepped: __webpack_require__(91) + Back: __webpack_require__(58), + Bounce: __webpack_require__(62), + Circular: __webpack_require__(66), + Cubic: __webpack_require__(70), + Elastic: __webpack_require__(74), + Expo: __webpack_require__(78), + Linear: __webpack_require__(82), + Quadratic: __webpack_require__(84), + Quartic: __webpack_require__(88), + Quintic: __webpack_require__(92), + Sine: __webpack_require__(96), + Stepped: __webpack_require__(100) }; /***/ }), -/* 49 */ +/* 58 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8595,20 +9092,20 @@ module.exports = { module.exports = { - In: __webpack_require__(50), - Out: __webpack_require__(51), - InOut: __webpack_require__(52) + In: __webpack_require__(59), + Out: __webpack_require__(60), + InOut: __webpack_require__(61) }; /***/ }), -/* 50 */ +/* 59 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8634,12 +9131,12 @@ module.exports = In; /***/ }), -/* 51 */ +/* 60 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8665,12 +9162,12 @@ module.exports = Out; /***/ }), -/* 52 */ +/* 61 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8705,12 +9202,12 @@ module.exports = InOut; /***/ }), -/* 53 */ +/* 62 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8720,20 +9217,20 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(54), - Out: __webpack_require__(55), - InOut: __webpack_require__(56) + In: __webpack_require__(63), + Out: __webpack_require__(64), + InOut: __webpack_require__(65) }; /***/ }), -/* 54 */ +/* 63 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8773,12 +9270,12 @@ module.exports = In; /***/ }), -/* 55 */ +/* 64 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8816,12 +9313,12 @@ module.exports = Out; /***/ }), -/* 56 */ +/* 65 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8880,12 +9377,12 @@ module.exports = InOut; /***/ }), -/* 57 */ +/* 66 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8895,20 +9392,20 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(58), - Out: __webpack_require__(59), - InOut: __webpack_require__(60) + In: __webpack_require__(67), + Out: __webpack_require__(68), + InOut: __webpack_require__(69) }; /***/ }), -/* 58 */ +/* 67 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8931,12 +9428,12 @@ module.exports = In; /***/ }), -/* 59 */ +/* 68 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8959,12 +9456,12 @@ module.exports = Out; /***/ }), -/* 60 */ +/* 69 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8994,12 +9491,12 @@ module.exports = InOut; /***/ }), -/* 61 */ +/* 70 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9009,20 +9506,20 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(62), - Out: __webpack_require__(63), - InOut: __webpack_require__(64) + In: __webpack_require__(71), + Out: __webpack_require__(72), + InOut: __webpack_require__(73) }; /***/ }), -/* 62 */ +/* 71 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9045,12 +9542,12 @@ module.exports = In; /***/ }), -/* 63 */ +/* 72 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9073,12 +9570,12 @@ module.exports = Out; /***/ }), -/* 64 */ +/* 73 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9108,12 +9605,12 @@ module.exports = InOut; /***/ }), -/* 65 */ +/* 74 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9123,20 +9620,20 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(66), - Out: __webpack_require__(67), - InOut: __webpack_require__(68) + In: __webpack_require__(75), + Out: __webpack_require__(76), + InOut: __webpack_require__(77) }; /***/ }), -/* 66 */ +/* 75 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9186,12 +9683,12 @@ module.exports = In; /***/ }), -/* 67 */ +/* 76 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9241,12 +9738,12 @@ module.exports = Out; /***/ }), -/* 68 */ +/* 77 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9303,12 +9800,12 @@ module.exports = InOut; /***/ }), -/* 69 */ +/* 78 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9318,20 +9815,20 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(70), - Out: __webpack_require__(71), - InOut: __webpack_require__(72) + In: __webpack_require__(79), + Out: __webpack_require__(80), + InOut: __webpack_require__(81) }; /***/ }), -/* 70 */ +/* 79 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9354,12 +9851,12 @@ module.exports = In; /***/ }), -/* 71 */ +/* 80 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9382,12 +9879,12 @@ module.exports = Out; /***/ }), -/* 72 */ +/* 81 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9417,36 +9914,32 @@ module.exports = InOut; /***/ }), -/* 73 */ +/* 82 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -/** - * @namespace Phaser.Math.Easing.Linear - */ - -module.exports = __webpack_require__(74); +module.exports = __webpack_require__(83); /***/ }), -/* 74 */ +/* 83 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * Linear easing (no variation). * - * @function Phaser.Math.Easing.Linear.Linear + * @function Phaser.Math.Easing.Linear * @since 3.0.0 * * @param {number} v - The value to be tweened. @@ -9462,12 +9955,12 @@ module.exports = Linear; /***/ }), -/* 75 */ +/* 84 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9477,20 +9970,20 @@ module.exports = Linear; module.exports = { - In: __webpack_require__(76), - Out: __webpack_require__(77), - InOut: __webpack_require__(78) + In: __webpack_require__(85), + Out: __webpack_require__(86), + InOut: __webpack_require__(87) }; /***/ }), -/* 76 */ +/* 85 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9513,12 +10006,12 @@ module.exports = In; /***/ }), -/* 77 */ +/* 86 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9541,12 +10034,12 @@ module.exports = Out; /***/ }), -/* 78 */ +/* 87 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9576,12 +10069,12 @@ module.exports = InOut; /***/ }), -/* 79 */ +/* 88 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9591,20 +10084,20 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(80), - Out: __webpack_require__(81), - InOut: __webpack_require__(82) + In: __webpack_require__(89), + Out: __webpack_require__(90), + InOut: __webpack_require__(91) }; /***/ }), -/* 80 */ +/* 89 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9627,12 +10120,12 @@ module.exports = In; /***/ }), -/* 81 */ +/* 90 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9655,12 +10148,12 @@ module.exports = Out; /***/ }), -/* 82 */ +/* 91 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9690,12 +10183,12 @@ module.exports = InOut; /***/ }), -/* 83 */ +/* 92 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9705,20 +10198,20 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(84), - Out: __webpack_require__(85), - InOut: __webpack_require__(86) + In: __webpack_require__(93), + Out: __webpack_require__(94), + InOut: __webpack_require__(95) }; /***/ }), -/* 84 */ +/* 93 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9741,12 +10234,12 @@ module.exports = In; /***/ }), -/* 85 */ +/* 94 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9769,12 +10262,12 @@ module.exports = Out; /***/ }), -/* 86 */ +/* 95 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9804,12 +10297,12 @@ module.exports = InOut; /***/ }), -/* 87 */ +/* 96 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9819,20 +10312,20 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(88), - Out: __webpack_require__(89), - InOut: __webpack_require__(90) + In: __webpack_require__(97), + Out: __webpack_require__(98), + InOut: __webpack_require__(99) }; /***/ }), -/* 88 */ +/* 97 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9866,12 +10359,12 @@ module.exports = In; /***/ }), -/* 89 */ +/* 98 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9905,12 +10398,12 @@ module.exports = Out; /***/ }), -/* 90 */ +/* 99 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9944,12 +10437,12 @@ module.exports = InOut; /***/ }), -/* 91 */ +/* 100 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -9957,23 +10450,23 @@ module.exports = InOut; * @namespace Phaser.Math.Easing.Stepped */ -module.exports = __webpack_require__(92); +module.exports = __webpack_require__(101); /***/ }), -/* 92 */ +/* 101 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * Stepped easing. * - * @function Phaser.Math.Easing.Stepped.Stepped + * @function Phaser.Math.Easing.Stepped * @since 3.0.0 * * @param {number} v - The value to be tweened. @@ -10003,12 +10496,12 @@ module.exports = Stepped; /***/ }), -/* 93 */ +/* 102 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10018,22 +10511,22 @@ module.exports = Stepped; module.exports = { - Ceil: __webpack_require__(94), - Equal: __webpack_require__(95), - Floor: __webpack_require__(96), - GreaterThan: __webpack_require__(97), - LessThan: __webpack_require__(98) + Ceil: __webpack_require__(103), + Equal: __webpack_require__(20), + Floor: __webpack_require__(104), + GreaterThan: __webpack_require__(105), + LessThan: __webpack_require__(106) }; /***/ }), -/* 94 */ +/* 103 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10059,46 +10552,12 @@ module.exports = Ceil; /***/ }), -/* 95 */ +/* 104 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Check whether the given values are fuzzily equal. - * - * Two numbers are fuzzily equal if their difference is less than `epsilon`. - * - * @function Phaser.Math.Fuzzy.Equal - * @since 3.0.0 - * - * @param {number} a - The first value. - * @param {number} b - The second value. - * @param {number} [epsilon=0.0001] - The epsilon. - * - * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`. - */ -var Equal = function (a, b, epsilon) -{ - if (epsilon === undefined) { epsilon = 0.0001; } - - return Math.abs(a - b) < epsilon; -}; - -module.exports = Equal; - - -/***/ }), -/* 96 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10124,12 +10583,12 @@ module.exports = Floor; /***/ }), -/* 97 */ +/* 105 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10158,12 +10617,12 @@ module.exports = GreaterThan; /***/ }), -/* 98 */ +/* 106 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10192,12 +10651,12 @@ module.exports = LessThan; /***/ }), -/* 99 */ +/* 107 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10207,28 +10666,28 @@ module.exports = LessThan; module.exports = { - Bezier: __webpack_require__(100), - CatmullRom: __webpack_require__(101), - CubicBezier: __webpack_require__(102), - Linear: __webpack_require__(103), - QuadraticBezier: __webpack_require__(104), - SmoothStep: __webpack_require__(105), - SmootherStep: __webpack_require__(106) + Bezier: __webpack_require__(108), + CatmullRom: __webpack_require__(109), + CubicBezier: __webpack_require__(110), + Linear: __webpack_require__(111), + QuadraticBezier: __webpack_require__(112), + SmoothStep: __webpack_require__(113), + SmootherStep: __webpack_require__(114) }; /***/ }), -/* 100 */ +/* 108 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bernstein = __webpack_require__(19); +var Bernstein = __webpack_require__(21); /** * A bezier interpolation method. @@ -10258,16 +10717,16 @@ module.exports = BezierInterpolation; /***/ }), -/* 101 */ +/* 109 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CatmullRom = __webpack_require__(21); +var CatmullRom = __webpack_require__(23); /** * A Catmull-Rom interpolation method. @@ -10315,12 +10774,12 @@ module.exports = CatmullRomInterpolation; /***/ }), -/* 102 */ +/* 110 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10385,16 +10844,16 @@ module.exports = CubicBezierInterpolation; /***/ }), -/* 103 */ +/* 111 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Linear = __webpack_require__(22); +var Linear = __webpack_require__(24); /** * A linear interpolation method. @@ -10432,12 +10891,12 @@ module.exports = LinearInterpolation; /***/ }), -/* 104 */ +/* 112 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10491,16 +10950,16 @@ module.exports = QuadraticBezierInterpolation; /***/ }), -/* 105 */ +/* 113 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmoothStep = __webpack_require__(23); +var SmoothStep = __webpack_require__(25); /** * A Smooth Step interpolation method. @@ -10524,16 +10983,16 @@ module.exports = SmoothStepInterpolation; /***/ }), -/* 106 */ +/* 114 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmootherStep = __webpack_require__(24); +var SmootherStep = __webpack_require__(26); /** * A Smoother Step interpolation method. @@ -10557,12 +11016,12 @@ module.exports = SmootherStepInterpolation; /***/ }), -/* 107 */ +/* 115 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10572,27 +11031,27 @@ module.exports = SmootherStepInterpolation; module.exports = { - GetNext: __webpack_require__(108), - IsSize: __webpack_require__(109), - IsValue: __webpack_require__(110) + GetNext: __webpack_require__(116), + IsSize: __webpack_require__(117), + IsValue: __webpack_require__(118) }; /***/ }), -/* 108 */ +/* 116 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * Returns the nearest power of 2 to the given `value`. * - * @function Phaser.Math.Pow2.GetPowerOfTwo + * @function Phaser.Math.Pow2.GetNext * @since 3.0.0 * * @param {number} value - The value. @@ -10610,12 +11069,12 @@ module.exports = GetPowerOfTwo; /***/ }), -/* 109 */ +/* 117 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10623,7 +11082,7 @@ module.exports = GetPowerOfTwo; * Checks if the given `width` and `height` are a power of two. * Useful for checking texture dimensions. * - * @function Phaser.Math.Pow2.IsSizePowerOfTwo + * @function Phaser.Math.Pow2.IsSize * @since 3.0.0 * * @param {number} width - The width. @@ -10640,19 +11099,19 @@ module.exports = IsSizePowerOfTwo; /***/ }), -/* 110 */ +/* 118 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * Tests the value and returns `true` if it is a power of two. * - * @function Phaser.Math.Pow2.IsValuePowerOfTwo + * @function Phaser.Math.Pow2.IsValue * @since 3.0.0 * * @param {number} value - The value to check if it's a power of two. @@ -10668,12 +11127,12 @@ module.exports = IsValuePowerOfTwo; /***/ }), -/* 111 */ +/* 119 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10683,20 +11142,20 @@ module.exports = IsValuePowerOfTwo; module.exports = { - Ceil: __webpack_require__(112), - Floor: __webpack_require__(113), - To: __webpack_require__(114) + Ceil: __webpack_require__(120), + Floor: __webpack_require__(121), + To: __webpack_require__(122) }; /***/ }), -/* 112 */ +/* 120 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10735,12 +11194,12 @@ module.exports = SnapCeil; /***/ }), -/* 113 */ +/* 121 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10779,12 +11238,12 @@ module.exports = SnapFloor; /***/ }), -/* 114 */ +/* 122 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10822,12 +11281,12 @@ module.exports = SnapTo; /***/ }), -/* 115 */ +/* 123 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11174,10 +11633,14 @@ var RandomDataGenerator = new Class({ * * @method Phaser.Math.RandomDataGenerator#pick * @since 3.0.0 + * + * @generic T + * @genericUse {T[]} - [array] + * @genericUse {T} - [$return] * - * @param {array} array - The array to pick a random element from. + * @param {T[]} array - The array to pick a random element from. * - * @return {*} A random member of the array. + * @return {T} A random member of the array. */ pick: function (array) { @@ -11203,9 +11666,13 @@ var RandomDataGenerator = new Class({ * @method Phaser.Math.RandomDataGenerator#weightedPick * @since 3.0.0 * - * @param {array} array - The array to pick a random element from. + * @generic T + * @genericUse {T[]} - [array] + * @genericUse {T} - [$return] * - * @return {*} A random member of the array. + * @param {T[]} array - The array to pick a random element from. + * + * @return {T} A random member of the array. */ weightedPick: function (array) { @@ -11295,9 +11762,12 @@ var RandomDataGenerator = new Class({ * @method Phaser.Math.RandomDataGenerator#shuffle * @since 3.7.0 * - * @param {array} [array] - The array to be shuffled. + * @generic T + * @genericUse {T[]} - [array,$return] * - * @return {array} The shuffled array. + * @param {T[]} [array] - The array to be shuffled. + * + * @return {T[]} The shuffled array. */ shuffle: function (array) { @@ -11321,12 +11791,12 @@ module.exports = RandomDataGenerator; /***/ }), -/* 116 */ +/* 124 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11356,12 +11826,12 @@ module.exports = Average; /***/ }), -/* 117 */ +/* 125 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11385,12 +11855,12 @@ module.exports = Between; /***/ }), -/* 118 */ +/* 126 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11422,12 +11892,12 @@ module.exports = CeilTo; /***/ }), -/* 119 */ +/* 127 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11451,41 +11921,12 @@ module.exports = Difference; /***/ }), -/* 120 */ +/* 128 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive. - * - * @function Phaser.Math.FloatBetween - * @since 3.0.0 - * - * @param {number} min - The lower bound for the float, inclusive. - * @param {number} max - The upper bound for the float exclusive. - * - * @return {number} A random float within the given range. - */ -var FloatBetween = function (min, max) -{ - return Math.random() * (max - min) + min; -}; - -module.exports = FloatBetween; - - -/***/ }), -/* 121 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11517,16 +11958,16 @@ module.exports = FloorTo; /***/ }), -/* 122 */ +/* 129 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(8); +var Clamp = __webpack_require__(9); /** * Return a value based on the range between `min` and `max` and the percentage given. @@ -11551,25 +11992,29 @@ module.exports = FromPercent; /***/ }), -/* 123 */ +/* 130 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * Calculate the speed required to cover a distance in the time given. + * Calculate a per-ms speed from a distance and time (given in seconds). * * @function Phaser.Math.GetSpeed * @since 3.0.0 * - * @param {number} distance - The distance to travel in pixels. - * @param {integer} time - The time, in ms, to cover the distance in. + * @param {number} distance - The distance. + * @param {integer} time - The time, in seconds. * - * @return {number} The amount you will need to increment the position by each step in order to cover the distance in the time given. + * @return {number} The speed, in distance per ms. + * + * @example + * // 400px over 1 second is 0.4 px/ms + * Phaser.Math.GetSpeed(400, 1) // -> 0.4 */ var GetSpeed = function (distance, time) { @@ -11580,12 +12025,12 @@ module.exports = GetSpeed; /***/ }), -/* 124 */ +/* 131 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11611,12 +12056,12 @@ module.exports = IsEven; /***/ }), -/* 125 */ +/* 132 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11640,12 +12085,12 @@ module.exports = IsEvenStrict; /***/ }), -/* 126 */ +/* 133 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11670,12 +12115,12 @@ module.exports = MaxAdd; /***/ }), -/* 127 */ +/* 134 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11700,12 +12145,12 @@ module.exports = MinSub; /***/ }), -/* 128 */ +/* 135 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11759,12 +12204,12 @@ module.exports = Percent; /***/ }), -/* 129 */ +/* 136 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11799,12 +12244,12 @@ module.exports = RandomXY; /***/ }), -/* 130 */ +/* 137 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11838,12 +12283,12 @@ module.exports = RandomXYZ; /***/ }), -/* 131 */ +/* 138 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11875,12 +12320,12 @@ module.exports = RandomXYZW; /***/ }), -/* 132 */ +/* 139 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11910,27 +12355,31 @@ module.exports = Rotate; /***/ }), -/* 133 */ +/* 140 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * Rotate a `point` around `x` and `y` by the given `angle`. + * Rotate a `point` around `x` and `y` to the given `angle`, at the same distance. + * + * In polar notation, this maps a point from (r, t) to (r, angle), vs. the origin (x, y). * * @function Phaser.Math.RotateAround * @since 3.0.0 * + * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return] + * * @param {(Phaser.Geom.Point|object)} point - The point to be rotated. * @param {number} x - The horizontal coordinate to rotate around. * @param {number} y - The vertical coordinate to rotate around. * @param {number} angle - The angle of rotation in radians. * - * @return {Phaser.Geom.Point} The given point, rotated by the given angle around the given coordinates. + * @return {Phaser.Types.Math.Vector2Like} The given point. */ var RotateAround = function (point, x, y, angle) { @@ -11950,28 +12399,32 @@ module.exports = RotateAround; /***/ }), -/* 134 */ +/* 141 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * Rotate a `point` around `x` and `y` by the given `angle` and `distance`. * + * In polar notation, this maps a point from (r, t) to (distance, t + angle), vs. the origin (x, y). + * * @function Phaser.Math.RotateAroundDistance * @since 3.0.0 * + * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return] + * * @param {(Phaser.Geom.Point|object)} point - The point to be rotated. * @param {number} x - The horizontal coordinate to rotate around. * @param {number} y - The vertical coordinate to rotate around. * @param {number} angle - The angle of rotation in radians. * @param {number} distance - The distance from (x, y) to place the point at. * - * @return {Phaser.Geom.Point} The given point. + * @return {Phaser.Types.Math.Vector2Like} The given point. */ var RotateAroundDistance = function (point, x, y, angle, distance) { @@ -11987,12 +12440,49 @@ module.exports = RotateAroundDistance; /***/ }), -/* 135 */ +/* 142 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Position a `point` at the given `angle` and `distance` to (`x`, `y`). + * + * @function Phaser.Math.RotateTo + * @since 3.24.0 + * + * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return] + * + * @param {Phaser.Types.Math.Vector2Like} point - The point to be positioned. + * @param {number} x - The horizontal coordinate to position from. + * @param {number} y - The vertical coordinate to position from. + * @param {number} angle - The angle of rotation in radians. + * @param {number} distance - The distance from (x, y) to place the point at. + * + * @return {Phaser.Types.Math.Vector2Like} The given point. + */ +var RotateTo = function (point, x, y, angle, distance) +{ + point.x = x + (distance * Math.cos(angle)); + point.y = y + (distance * Math.sin(angle)); + + return point; +}; + +module.exports = RotateTo; + + +/***/ }), +/* 143 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12016,12 +12506,12 @@ module.exports = RoundAwayFromZero; /***/ }), -/* 136 */ +/* 144 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12068,12 +12558,12 @@ module.exports = RoundTo; /***/ }), -/* 137 */ +/* 145 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12121,23 +12611,23 @@ module.exports = SinCosTableGenerator; /***/ }), -/* 138 */ +/* 146 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector2 = __webpack_require__(5); +var Vector2 = __webpack_require__(3); /** - * Returns a Vec2 containing the x and y position of the given index in a `width` x `height` sized grid. + * Returns a Vector2 containing the x and y position of the given index in a `width` x `height` sized grid. * * For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2. * - * If the given index is out of range an empty Vec2 is returned. + * If the given index is out of range an empty Vector2 is returned. * * @function Phaser.Math.ToXY * @since 3.19.0 @@ -12179,67 +12669,12 @@ module.exports = ToXY; /***/ }), -/* 139 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Vector2 = __webpack_require__(5); - -/** - * Takes the `x` and `y` coordinates and transforms them into the same space as - * defined by the position, rotation and scale values. - * - * @function Phaser.Math.TransformXY - * @since 3.0.0 - * - * @param {number} x - The x coordinate to be transformed. - * @param {number} y - The y coordinate to be transformed. - * @param {number} positionX - Horizontal position of the transform point. - * @param {number} positionY - Vertical position of the transform point. - * @param {number} rotation - Rotation of the transform point, in radians. - * @param {number} scaleX - Horizontal scale of the transform point. - * @param {number} scaleY - Vertical scale of the transform point. - * @param {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} [output] - The output vector, point or object for the translated coordinates. - * - * @return {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} The translated point. - */ -var TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output) -{ - if (output === undefined) { output = new Vector2(); } - - var radianSin = Math.sin(rotation); - var radianCos = Math.cos(rotation); - - // Rotate and Scale - var a = radianCos * scaleX; - var b = radianSin * scaleX; - var c = -radianSin * scaleY; - var d = radianCos * scaleY; - - // Invert - var id = 1 / ((a * d) + (c * -b)); - - output.x = (d * id * x) + (-c * id * y) + (((positionY * c) - (positionX * d)) * id); - output.y = (a * id * y) + (-b * id * x) + (((-positionY * a) + (positionX * b)) * id); - - return output; -}; - -module.exports = TransformXY; - - -/***/ }), -/* 140 */ +/* 147 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12264,12 +12699,12 @@ module.exports = Within; /***/ }), -/* 141 */ +/* 148 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12809,18 +13244,18 @@ module.exports = Vector4; /***/ }), -/* 142 */ +/* 149 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector3 = __webpack_require__(10); -var Matrix4 = __webpack_require__(27); -var Quaternion = __webpack_require__(28); +var Vector3 = __webpack_require__(11); +var Matrix4 = __webpack_require__(30); +var Quaternion = __webpack_require__(31); var tmpMat4 = new Matrix4(); var tmpQuat = new Quaternion(); @@ -12857,12 +13292,12 @@ module.exports = RotateVec3; /***/ }), -/* 143 */ +/* 150 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12888,18 +13323,18 @@ module.exports = 'resize'; /***/ }), -/* 144 */ +/* 151 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey -* @copyright 2019 Photon Storm Ltd. +* @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ -var BasePlugin = __webpack_require__(145); +var BasePlugin = __webpack_require__(152); var Class = __webpack_require__(0); -var SceneEvents = __webpack_require__(146); +var SceneEvents = __webpack_require__(153); /** * @classdesc @@ -13016,12 +13451,12 @@ module.exports = ScenePlugin; /***/ }), -/* 145 */ +/* 152 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey -* @copyright 2019 Photon Storm Ltd. +* @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ @@ -13146,12 +13581,12 @@ module.exports = BasePlugin; /***/ }), -/* 146 */ +/* 153 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13161,36 +13596,64 @@ module.exports = BasePlugin; module.exports = { - BOOT: __webpack_require__(147), - CREATE: __webpack_require__(148), - DESTROY: __webpack_require__(149), - PAUSE: __webpack_require__(150), - POST_UPDATE: __webpack_require__(151), - PRE_UPDATE: __webpack_require__(152), - READY: __webpack_require__(153), - RENDER: __webpack_require__(154), - RESUME: __webpack_require__(155), - SHUTDOWN: __webpack_require__(156), - SLEEP: __webpack_require__(157), - START: __webpack_require__(158), - TRANSITION_COMPLETE: __webpack_require__(159), - TRANSITION_INIT: __webpack_require__(160), - TRANSITION_OUT: __webpack_require__(161), - TRANSITION_START: __webpack_require__(162), - TRANSITION_WAKE: __webpack_require__(163), - UPDATE: __webpack_require__(164), - WAKE: __webpack_require__(165) + ADDED_TO_SCENE: __webpack_require__(154), + BOOT: __webpack_require__(155), + CREATE: __webpack_require__(156), + DESTROY: __webpack_require__(157), + PAUSE: __webpack_require__(158), + POST_UPDATE: __webpack_require__(159), + PRE_UPDATE: __webpack_require__(160), + READY: __webpack_require__(161), + REMOVED_FROM_SCENE: __webpack_require__(162), + RENDER: __webpack_require__(163), + RESUME: __webpack_require__(164), + SHUTDOWN: __webpack_require__(165), + SLEEP: __webpack_require__(166), + START: __webpack_require__(167), + TRANSITION_COMPLETE: __webpack_require__(168), + TRANSITION_INIT: __webpack_require__(169), + TRANSITION_OUT: __webpack_require__(170), + TRANSITION_START: __webpack_require__(171), + TRANSITION_WAKE: __webpack_require__(172), + UPDATE: __webpack_require__(173), + WAKE: __webpack_require__(174) }; /***/ }), -/* 147 */ +/* 154 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Object Added to Scene Event. + * + * This event is dispatched when a Game Object is added to a Scene. + * + * Listen for it from a Scene using `this.scene.events.on('addedtoscene', listener)`. + * + * @event Phaser.Scenes.Events#ADDED_TO_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene. + * @param {Phaser.Scene} scene - The Scene to which the Game Object was added. + */ +module.exports = 'addedtoscene'; + + +/***/ }), +/* 155 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13210,12 +13673,12 @@ module.exports = 'boot'; /***/ }), -/* 148 */ +/* 156 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13239,12 +13702,12 @@ module.exports = 'create'; /***/ }), -/* 149 */ +/* 157 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13266,12 +13729,12 @@ module.exports = 'destroy'; /***/ }), -/* 150 */ +/* 158 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13293,12 +13756,12 @@ module.exports = 'pause'; /***/ }), -/* 151 */ +/* 159 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13330,12 +13793,12 @@ module.exports = 'postupdate'; /***/ }), -/* 152 */ +/* 160 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13367,12 +13830,12 @@ module.exports = 'preupdate'; /***/ }), -/* 153 */ +/* 161 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13395,12 +13858,38 @@ module.exports = 'ready'; /***/ }), -/* 154 */ +/* 162 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Object Removed from Scene Event. + * + * This event is dispatched when a Game Object is removed from a Scene. + * + * Listen for it from a Scene using `this.scene.events.on('removedfromscene', listener)`. + * + * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene. + * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed. + */ +module.exports = 'removedfromscene'; + + +/***/ }), +/* 163 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13431,12 +13920,12 @@ module.exports = 'render'; /***/ }), -/* 155 */ +/* 164 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13458,12 +13947,12 @@ module.exports = 'resume'; /***/ }), -/* 156 */ +/* 165 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13488,12 +13977,12 @@ module.exports = 'shutdown'; /***/ }), -/* 157 */ +/* 166 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13515,12 +14004,12 @@ module.exports = 'sleep'; /***/ }), -/* 158 */ +/* 167 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13540,12 +14029,12 @@ module.exports = 'start'; /***/ }), -/* 159 */ +/* 168 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13576,12 +14065,12 @@ module.exports = 'transitioncomplete'; /***/ }), -/* 160 */ +/* 169 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13613,12 +14102,12 @@ module.exports = 'transitioninit'; /***/ }), -/* 161 */ +/* 170 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13647,12 +14136,12 @@ module.exports = 'transitionout'; /***/ }), -/* 162 */ +/* 171 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13687,12 +14176,12 @@ module.exports = 'transitionstart'; /***/ }), -/* 163 */ +/* 172 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13722,12 +14211,12 @@ module.exports = 'transitionwake'; /***/ }), -/* 164 */ +/* 173 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13759,12 +14248,12 @@ module.exports = 'update'; /***/ }), -/* 165 */ +/* 174 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13786,17 +14275,17 @@ module.exports = 'wake'; /***/ }), -/* 166 */ +/* 175 */ /***/ (function(module, exports) { /*** IMPORTS FROM imports-loader ***/ -(function() { +(function() { var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { @@ -14469,17 +14958,15 @@ var spine; var slot = skeleton.slots[this.slotIndex]; if (!slot.bone.active) return; - if (direction == MixDirection.mixOut && blend == MixBlend.setup) { - var attachmentName_1 = slot.data.attachmentName; - slot.setAttachment(attachmentName_1 == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName_1)); + if (direction == MixDirection.mixOut) { + if (blend == MixBlend.setup) + this.setAttachment(skeleton, slot, slot.data.attachmentName); return; } var frames = this.frames; if (time < frames[0]) { - if (blend == MixBlend.setup || blend == MixBlend.first) { - var attachmentName_2 = slot.data.attachmentName; - slot.setAttachment(attachmentName_2 == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName_2)); - } + if (blend == MixBlend.setup || blend == MixBlend.first) + this.setAttachment(skeleton, slot, slot.data.attachmentName); return; } var frameIndex = 0; @@ -14491,6 +14978,9 @@ var spine; skeleton.slots[this.slotIndex] .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName)); }; + AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) { + slot.attachment = attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName); + }; return AttachmentTimeline; }()); spine.AttachmentTimeline = AttachmentTimeline; @@ -14592,6 +15082,7 @@ var spine; case MixBlend.replace: for (var i_5 = 0; i_5 < vertexCount; i_5++) deform[i_5] += (lastVertices[i_5] - deform[i_5]) * alpha; + break; case MixBlend.add: var vertexAttachment = slotAttachment; if (vertexAttachment.bones == null) { @@ -14748,8 +15239,9 @@ var spine; DrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) { var drawOrder = skeleton.drawOrder; var slots = skeleton.slots; - if (direction == MixDirection.mixOut && blend == MixBlend.setup) { - spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length); + if (direction == MixDirection.mixOut) { + if (blend == MixBlend.setup) + spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length); return; } var frames = this.frames; @@ -15141,6 +15633,7 @@ var spine; function AnimationState(data) { this.tracks = new Array(); this.timeScale = 1; + this.unkeyedState = 0; this.events = new Array(); this.listeners = new Array(); this.queue = new EventQueue(this); @@ -15230,12 +15723,12 @@ var spine; var events = this.events; var tracks = this.tracks; var applied = false; - for (var i = 0, n = tracks.length; i < n; i++) { - var current = tracks[i]; + for (var i_16 = 0, n_1 = tracks.length; i_16 < n_1; i_16++) { + var current = tracks[i_16]; if (current == null || current.delay > 0) continue; applied = true; - var blend = i == 0 ? spine.MixBlend.first : current.mixBlend; + var blend = i_16 == 0 ? spine.MixBlend.first : current.mixBlend; var mix = current.alpha; if (current.mixingFrom != null) mix *= this.applyMixingFrom(current, skeleton, blend); @@ -15244,10 +15737,14 @@ var spine; var animationLast = current.animationLast, animationTime = current.getAnimationTime(); var timelineCount = current.animation.timelines.length; var timelines = current.animation.timelines; - if ((i == 0 && mix == 1) || blend == spine.MixBlend.add) { + if ((i_16 == 0 && mix == 1) || blend == spine.MixBlend.add) { for (var ii = 0; ii < timelineCount; ii++) { spine.Utils.webkit602BugfixHelper(mix, blend); - timelines[ii].apply(skeleton, animationLast, animationTime, events, mix, blend, spine.MixDirection.mixIn); + var timeline = timelines[ii]; + if (timeline instanceof spine.AttachmentTimeline) + this.applyAttachmentTimeline(timeline, skeleton, animationTime, blend, true); + else + timeline.apply(skeleton, animationLast, animationTime, events, mix, blend, spine.MixDirection.mixIn); } } else { @@ -15257,14 +15754,17 @@ var spine; spine.Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null); var timelinesRotation = current.timelinesRotation; for (var ii = 0; ii < timelineCount; ii++) { - var timeline = timelines[ii]; - var timelineBlend = (timelineMode[ii] & (AnimationState.NOT_LAST - 1)) == AnimationState.SUBSEQUENT ? blend : spine.MixBlend.setup; - if (timeline instanceof spine.RotateTimeline) { - this.applyRotateTimeline(timeline, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame); + var timeline_1 = timelines[ii]; + var timelineBlend = timelineMode[ii] == AnimationState.SUBSEQUENT ? blend : spine.MixBlend.setup; + if (timeline_1 instanceof spine.RotateTimeline) { + this.applyRotateTimeline(timeline_1, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame); + } + else if (timeline_1 instanceof spine.AttachmentTimeline) { + this.applyAttachmentTimeline(timeline_1, skeleton, animationTime, blend, true); } else { spine.Utils.webkit602BugfixHelper(mix, blend); - timeline.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, spine.MixDirection.mixIn); + timeline_1.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, spine.MixDirection.mixIn); } } } @@ -15273,6 +15773,16 @@ var spine; current.nextAnimationLast = animationTime; current.nextTrackLast = current.trackTime; } + var setupState = this.unkeyedState + AnimationState.SETUP; + var slots = skeleton.slots; + for (var i = 0, n = skeleton.slots.length; i < n; i++) { + var slot = slots[i]; + if (slot.attachmentState == setupState) { + var attachmentName = slot.data.attachmentName; + slot.attachment = (attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName)); + } + } + this.unkeyedState += 2; this.queue.drain(); return applied; }; @@ -15316,23 +15826,22 @@ var spine; var direction = spine.MixDirection.mixOut; var timelineBlend = void 0; var alpha = 0; - switch (timelineMode[i] & (AnimationState.NOT_LAST - 1)) { + switch (timelineMode[i]) { case AnimationState.SUBSEQUENT: - timelineBlend = blend; - if (!attachments && timeline instanceof spine.AttachmentTimeline) { - if ((timelineMode[i] & AnimationState.NOT_LAST) == AnimationState.NOT_LAST) - continue; - timelineBlend = spine.MixBlend.setup; - } if (!drawOrder && timeline instanceof spine.DrawOrderTimeline) continue; + timelineBlend = blend; alpha = alphaMix; break; case AnimationState.FIRST: timelineBlend = spine.MixBlend.setup; alpha = alphaMix; break; - case AnimationState.HOLD: + case AnimationState.HOLD_SUBSEQUENT: + timelineBlend = blend; + alpha = alphaHold; + break; + case AnimationState.HOLD_FIRST: timelineBlend = spine.MixBlend.setup; alpha = alphaHold; break; @@ -15345,18 +15854,12 @@ var spine; from.totalAlpha += alpha; if (timeline instanceof spine.RotateTimeline) this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame); + else if (timeline instanceof spine.AttachmentTimeline) + this.applyAttachmentTimeline(timeline, skeleton, animationTime, timelineBlend, attachments); else { spine.Utils.webkit602BugfixHelper(alpha, blend); - if (timelineBlend == spine.MixBlend.setup) { - if (timeline instanceof spine.AttachmentTimeline) { - if (attachments || (timelineMode[i] & AnimationState.NOT_LAST) == AnimationState.NOT_LAST) - direction = spine.MixDirection.mixIn; - } - else if (timeline instanceof spine.DrawOrderTimeline) { - if (drawOrder) - direction = spine.MixDirection.mixIn; - } - } + if (drawOrder && timeline instanceof spine.DrawOrderTimeline && timelineBlend == spine.MixBlend.setup) + direction = spine.MixDirection.mixIn; timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, direction); } } @@ -15368,6 +15871,31 @@ var spine; from.nextTrackLast = from.trackTime; return mix; }; + AnimationState.prototype.applyAttachmentTimeline = function (timeline, skeleton, time, blend, attachments) { + var slot = skeleton.slots[timeline.slotIndex]; + if (!slot.bone.active) + return; + var frames = timeline.frames; + if (time < frames[0]) { + if (blend == spine.MixBlend.setup || blend == spine.MixBlend.first) + this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments); + } + else { + var frameIndex; + if (time >= frames[frames.length - 1]) + frameIndex = frames.length - 1; + else + frameIndex = spine.Animation.binarySearch(frames, time) - 1; + this.setAttachment(skeleton, slot, timeline.attachmentNames[frameIndex], attachments); + } + if (slot.attachmentState <= this.unkeyedState) + slot.attachmentState = this.unkeyedState + AnimationState.SETUP; + }; + AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) { + slot.attachment = attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName); + if (attachments) + slot.attachmentState = this.unkeyedState + AnimationState.CURRENT; + }; AnimationState.prototype.applyRotateTimeline = function (timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) { if (firstFrame) timelinesRotation[i] = 0; @@ -15630,6 +16158,7 @@ var spine; entry.interruptAlpha = 1; entry.mixTime = 0; entry.mixDuration = last == null ? 0 : this.data.getMix(last.animation, animation); + entry.mixBlend = spine.MixBlend.replace; return entry; }; AnimationState.prototype.disposeNext = function (entry) { @@ -15655,14 +16184,6 @@ var spine; entry = entry.mixingTo; } while (entry != null); } - this.propertyIDs.clear(); - for (var i = this.tracks.length - 1; i >= 0; i--) { - var entry = this.tracks[i]; - while (entry != null) { - this.computeNotLast(entry); - entry = entry.mixingFrom; - } - } }; AnimationState.prototype.computeHold = function (entry) { var to = entry.mixingTo; @@ -15674,8 +16195,7 @@ var spine; var propertyIDs = this.propertyIDs; if (to != null && to.holdPrevious) { for (var i = 0; i < timelinesCount; i++) { - propertyIDs.add(timelines[i].getPropertyId()); - timelineMode[i] = AnimationState.HOLD; + timelineMode[i] = propertyIDs.add(timelines[i].getPropertyId()) ? AnimationState.HOLD_FIRST : AnimationState.HOLD_SUBSEQUENT; } return; } @@ -15699,20 +16219,7 @@ var spine; } break; } - timelineMode[i] = AnimationState.HOLD; - } - } - }; - AnimationState.prototype.computeNotLast = function (entry) { - var timelines = entry.animation.timelines; - var timelinesCount = entry.animation.timelines.length; - var timelineMode = entry.timelineMode; - var propertyIDs = this.propertyIDs; - for (var i = 0; i < timelinesCount; i++) { - if (timelines[i] instanceof spine.AttachmentTimeline) { - var timeline = timelines[i]; - if (!propertyIDs.add(timeline.slotIndex)) - timelineMode[i] |= AnimationState.NOT_LAST; + timelineMode[i] = AnimationState.HOLD_FIRST; } } }; @@ -15740,9 +16247,11 @@ var spine; AnimationState.emptyAnimation = new spine.Animation("", [], 0); AnimationState.SUBSEQUENT = 0; AnimationState.FIRST = 1; - AnimationState.HOLD = 2; - AnimationState.HOLD_MIX = 3; - AnimationState.NOT_LAST = 4; + AnimationState.HOLD_SUBSEQUENT = 2; + AnimationState.HOLD_FIRST = 3; + AnimationState.HOLD_MIX = 4; + AnimationState.SETUP = 1; + AnimationState.CURRENT = 2; return AnimationState; }()); spine.AnimationState = AnimationState; @@ -15955,11 +16464,15 @@ var spine; this.errors = {}; this.toLoad = 0; this.loaded = 0; + this.rawDataUris = {}; this.textureLoader = textureLoader; this.pathPrefix = pathPrefix; } - AssetManager.downloadText = function (url, success, error) { + AssetManager.prototype.downloadText = function (url, success, error) { var request = new XMLHttpRequest(); + request.overrideMimeType("text/html"); + if (this.rawDataUris[url]) + url = this.rawDataUris[url]; request.open("GET", url, true); request.onload = function () { if (request.status == 200) { @@ -15974,8 +16487,10 @@ var spine; }; request.send(); }; - AssetManager.downloadBinary = function (url, success, error) { + AssetManager.prototype.downloadBinary = function (url, success, error) { var request = new XMLHttpRequest(); + if (this.rawDataUris[url]) + url = this.rawDataUris[url]; request.open("GET", url, true); request.responseType = "arraybuffer"; request.onload = function () { @@ -15991,13 +16506,16 @@ var spine; }; request.send(); }; + AssetManager.prototype.setRawDataURI = function (path, data) { + this.rawDataUris[this.pathPrefix + path] = data; + }; AssetManager.prototype.loadBinary = function (path, success, error) { var _this = this; if (success === void 0) { success = null; } if (error === void 0) { error = null; } path = this.pathPrefix + path; this.toLoad++; - AssetManager.downloadBinary(path, function (data) { + this.downloadBinary(path, function (data) { _this.assets[path] = data; if (success) success(path, data); @@ -16017,7 +16535,7 @@ var spine; if (error === void 0) { error = null; } path = this.pathPrefix + path; this.toLoad++; - AssetManager.downloadText(path, function (data) { + this.downloadText(path, function (data) { _this.assets[path] = data; if (success) success(path, data); @@ -16036,12 +16554,13 @@ var spine; if (success === void 0) { success = null; } if (error === void 0) { error = null; } path = this.pathPrefix + path; + var storagePath = path; this.toLoad++; var img = new Image(); img.crossOrigin = "anonymous"; img.onload = function (ev) { var texture = _this.textureLoader(img); - _this.assets[path] = texture; + _this.assets[storagePath] = texture; _this.toLoad--; _this.loaded++; if (success) @@ -16054,32 +16573,10 @@ var spine; if (error) error(path, "Couldn't load image " + path); }; + if (this.rawDataUris[path]) + path = this.rawDataUris[path]; img.src = path; }; - AssetManager.prototype.loadTextureData = function (path, data, success, error) { - var _this = this; - if (success === void 0) { success = null; } - if (error === void 0) { error = null; } - path = this.pathPrefix + path; - this.toLoad++; - var img = new Image(); - img.onload = function (ev) { - var texture = _this.textureLoader(img); - _this.assets[path] = texture; - _this.toLoad--; - _this.loaded++; - if (success) - success(path, img); - }; - img.onerror = function (ev) { - _this.errors[path] = "Couldn't load image " + path; - _this.toLoad--; - _this.loaded++; - if (error) - error(path, "Couldn't load image " + path); - }; - img.src = data; - }; AssetManager.prototype.loadTextureAtlas = function (path, success, error) { var _this = this; if (success === void 0) { success = null; } @@ -16087,12 +16584,12 @@ var spine; var parent = path.lastIndexOf("/") >= 0 ? path.substring(0, path.lastIndexOf("/")) : ""; path = this.pathPrefix + path; this.toLoad++; - AssetManager.downloadText(path, function (atlasData) { + this.downloadText(path, function (atlasData) { var pagesLoaded = { count: 0 }; var atlasPages = new Array(); try { var atlas = new spine.TextureAtlas(atlasData, function (path) { - atlasPages.push(parent + "/" + path); + atlasPages.push(parent == "" ? path : parent + "/" + path); var image = document.createElement("img"); image.width = 16; image.height = 16; @@ -16116,7 +16613,7 @@ var spine; if (!pageLoadError) { try { var atlas = new spine.TextureAtlas(atlasData, function (path) { - return _this.get(parent + "/" + path); + return _this.get(parent == "" ? path : parent + "/" + path); }); _this.assets[path] = atlas; if (success) @@ -16354,6 +16851,8 @@ var spine; var prx = 0; if (s > 0.0001) { s = Math.abs(pa * pd - pb * pc) / s; + pa /= this.skeleton.scaleX; + pc /= this.skeleton.scaleY; pb = pc * s; pd = pa * s; prx = Math.atan2(pc, pa) * spine.MathUtils.radDeg; @@ -16624,10 +17123,27 @@ var spine; if (!bone.appliedValid) bone.updateAppliedTransform(); var p = bone.parent; - var id = 1 / (p.a * p.d - p.b * p.c); - var x = targetX - p.worldX, y = targetY - p.worldY; - var tx = (x * p.d - y * p.b) * id - bone.ax, ty = (y * p.a - x * p.c) * id - bone.ay; - var rotationIK = Math.atan2(ty, tx) * spine.MathUtils.radDeg - bone.ashearX - bone.arotation; + var pa = p.a, pb = p.b, pc = p.c, pd = p.d; + var rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0; + switch (bone.data.transformMode) { + case spine.TransformMode.OnlyTranslation: + tx = targetX - bone.worldX; + ty = targetY - bone.worldY; + break; + case spine.TransformMode.NoRotationOrReflection: + var s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc); + var sa = pa / bone.skeleton.scaleX; + var sc = pc / bone.skeleton.scaleY; + pb = -sc * s * bone.skeleton.scaleX; + pd = sa * s * bone.skeleton.scaleY; + rotationIK += Math.atan2(sc, sa) * spine.MathUtils.radDeg; + default: + var x = targetX - p.worldX, y = targetY - p.worldY; + var d = pa * pd - pb * pc; + tx = (x * pd - y * pb) / d - bone.ax; + ty = (y * pa - x * pc) / d - bone.ay; + } + rotationIK += Math.atan2(ty, tx) * spine.MathUtils.radDeg; if (bone.ascaleX < 0) rotationIK += 180; if (rotationIK > 180) @@ -16636,6 +17152,12 @@ var spine; rotationIK += 360; var sx = bone.ascaleX, sy = bone.ascaleY; if (compress || stretch) { + switch (bone.data.transformMode) { + case spine.TransformMode.NoScale: + case spine.TransformMode.NoScaleOrReflection: + tx = targetX - bone.worldX; + ty = targetY - bone.worldY; + } var b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty); if ((compress && dd < b) || (stretch && dd > b) && b > 0.0001) { var s = (dd / b - 1) * alpha + 1; @@ -17294,6 +17816,7 @@ var spine; if (!this.queueAsset(clientId, null, path)) return; var request = new XMLHttpRequest(); + request.overrideMimeType("text/html"); request.onreadystatechange = function () { if (request.readyState == XMLHttpRequest.DONE) { if (request.status >= 200 && request.status < 300) { @@ -17313,6 +17836,7 @@ var spine; if (!this.queueAsset(clientId, null, path)) return; var request = new XMLHttpRequest(); + request.overrideMimeType("text/html"); request.onreadystatechange = function () { if (request.readyState == XMLHttpRequest.DONE) { if (request.status >= 200 && request.status < 300) { @@ -17332,7 +17856,6 @@ var spine; if (!this.queueAsset(clientId, textureLoader, path)) return; var img = new Image(); - img.src = path; img.crossOrigin = "anonymous"; img.onload = function (ev) { _this.rawAssets[path] = img; @@ -17340,6 +17863,7 @@ var spine; img.onerror = function (ev) { _this.errors[path] = "Couldn't load image " + path; }; + img.src = path; }; SharedAssetManager.prototype.get = function (clientId, path) { path = this.pathPrefix + path; @@ -17865,6 +18389,8 @@ var spine; var input = new BinaryInput(binary); skeletonData.hash = input.readString(); skeletonData.version = input.readString(); + if ("3.8.75" == skeletonData.version) + throw new Error("Unsupported skeleton data, please export with a newer version of Spine."); skeletonData.x = input.readFloat(); skeletonData.y = input.readFloat(); skeletonData.width = input.readFloat(); @@ -18853,7 +19379,7 @@ var spine; var clippingPolygon = this.clippingPolygon; SkeletonClipping.makeClockwise(clippingPolygon); var clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon)); - for (var i = 0, n_1 = clippingPolygons.length; i < n_1; i++) { + for (var i = 0, n_2 = clippingPolygons.length; i < n_2; i++) { var polygon = clippingPolygons[i]; SkeletonClipping.makeClockwise(polygon); polygon.push(polygon[0]); @@ -19275,6 +19801,8 @@ var spine; if (skeletonMap != null) { skeletonData.hash = skeletonMap.hash; skeletonData.version = skeletonMap.spine; + if ("3.8.75" == skeletonData.version) + throw new Error("Unsupported skeleton data, please export with a newer version of Spine."); skeletonData.x = skeletonMap.x; skeletonData.y = skeletonMap.y; skeletonData.width = skeletonMap.width; @@ -19952,7 +20480,7 @@ var spine; skeletonData.animations.push(new spine.Animation(name, timelines, duration)); }; SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) { - if (!map.curve) + if (!map.hasOwnProperty("curve")) return; if (map.curve == "stepped") timeline.setStepped(frameIndex); @@ -21267,9 +21795,7 @@ var spine; }; Pool.prototype.freeAll = function (items) { for (var i = 0; i < items.length; i++) { - if (items[i].reset) - items[i].reset(); - this.items[i] = items[i]; + this.free(items[i]); } }; Pool.prototype.clear = function () { @@ -21811,7 +22337,7 @@ var spine; worldVertices[offset + 1] = offsetX * c + offsetY * d + y; }; RegionAttachment.prototype.copy = function () { - var copy = new RegionAttachment(name); + var copy = new RegionAttachment(this.name); copy.region = this.region; copy.rendererObject = this.rendererObject; copy.path = this.path; @@ -22047,6 +22573,8 @@ var spine; this.texture = this.context.gl.createTexture(); } this.bind(); + if (GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL) + gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false); gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this._image); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, useMipMaps ? gl.LINEAR_MIPMAP_LINEAR : gl.LINEAR); @@ -22076,6 +22604,7 @@ var spine; var gl = this.context.gl; gl.deleteTexture(this.texture); }; + GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL = false; return GLTexture; }(spine.Texture)); webgl.GLTexture = GLTexture; @@ -23805,11 +24334,11 @@ var spine; var nn = clip.worldVerticesLength; var world = this.temp = spine.Utils.setArraySize(this.temp, nn, 0); clip.computeWorldVertices(slot, 0, nn, world, 0, 2); - for (var i_16 = 0, n_2 = world.length; i_16 < n_2; i_16 += 2) { - var x = world[i_16]; - var y = world[i_16 + 1]; - var x2 = world[(i_16 + 2) % world.length]; - var y2 = world[(i_16 + 3) % world.length]; + for (var i_17 = 0, n_3 = world.length; i_17 < n_3; i_17 += 2) { + var x = world[i_17]; + var y = world[i_17 + 1]; + var x2 = world[(i_17 + 2) % world.length]; + var y2 = world[(i_17 + 3) % world.length]; shapes.line(x, y, x2, y2); } } @@ -23970,7 +24499,7 @@ var spine; var vertexEffect = this.vertexEffect; var verts = clippedVertices; if (!twoColorTint) { - for (var v = 0, n_3 = clippedVertices.length; v < n_3; v += vertexSize) { + for (var v = 0, n_4 = clippedVertices.length; v < n_4; v += vertexSize) { tempPos.x = verts[v]; tempPos.y = verts[v + 1]; tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]); @@ -23989,7 +24518,7 @@ var spine; } } else { - for (var v = 0, n_4 = clippedVertices.length; v < n_4; v += vertexSize) { + for (var v = 0, n_5 = clippedVertices.length; v < n_5; v += vertexSize) { tempPos.x = verts[v]; tempPos.y = verts[v + 1]; tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]); @@ -24019,7 +24548,7 @@ var spine; if (this.vertexEffect != null) { var vertexEffect = this.vertexEffect; if (!twoColorTint) { - for (var v = 0, u = 0, n_5 = renderable.numFloats; v < n_5; v += vertexSize, u += 2) { + for (var v = 0, u = 0, n_6 = renderable.numFloats; v < n_6; v += vertexSize, u += 2) { tempPos.x = verts[v]; tempPos.y = verts[v + 1]; tempUv.x = uvs[u]; @@ -24038,7 +24567,7 @@ var spine; } } else { - for (var v = 0, u = 0, n_6 = renderable.numFloats; v < n_6; v += vertexSize, u += 2) { + for (var v = 0, u = 0, n_7 = renderable.numFloats; v < n_7; v += vertexSize, u += 2) { tempPos.x = verts[v]; tempPos.y = verts[v + 1]; tempUv.x = uvs[u]; @@ -24063,7 +24592,7 @@ var spine; } else { if (!twoColorTint) { - for (var v = 2, u = 0, n_7 = renderable.numFloats; v < n_7; v += vertexSize, u += 2) { + for (var v = 2, u = 0, n_8 = renderable.numFloats; v < n_8; v += vertexSize, u += 2) { verts[v] = finalColor.r; verts[v + 1] = finalColor.g; verts[v + 2] = finalColor.b; @@ -24073,7 +24602,7 @@ var spine; } } else { - for (var v = 2, u = 0, n_8 = renderable.numFloats; v < n_8; v += vertexSize, u += 2) { + for (var v = 2, u = 0, n_9 = renderable.numFloats; v < n_9; v += vertexSize, u += 2) { verts[v] = finalColor.r; verts[v + 1] = finalColor.g; verts[v + 2] = finalColor.b; @@ -24264,13 +24793,14 @@ var spine; })(webgl = spine.webgl || (spine.webgl = {})); })(spine || (spine = {})); //# sourceMappingURL=spine-webgl.js.map - /*** EXPORTS FROM exports-loader ***/ module.exports = spine; + }.call(window)); + /***/ }), -/* 167 */ +/* 176 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -24280,24 +24810,22 @@ module.exports = spine; */ var Class = __webpack_require__(0); -var GetFastValue = __webpack_require__(3); -var ImageFile = __webpack_require__(168); +var GetFastValue = __webpack_require__(4); +var ImageFile = __webpack_require__(177); var IsPlainObject = __webpack_require__(2); -var JSONFile = __webpack_require__(182); -var MultiFile = __webpack_require__(183); -var TextFile = __webpack_require__(184); +var JSONFile = __webpack_require__(191); +var MultiFile = __webpack_require__(192); +var TextFile = __webpack_require__(193); /** * @typedef {object} Phaser.Loader.FileTypes.SpineFileConfig * * @property {string} key - The key of the file. Must be unique within both the Loader and the Texture Manager. - * @property {string} [textureURL] - The absolute or relative URL to load the texture image file from. - * @property {string} [textureExtension='png'] - The default file extension to use for the image texture if no url is provided. - * @property {XHRSettingsObject} [textureXhrSettings] - Extra XHR Settings specifically for the texture image file. - * @property {string} [normalMap] - The filename of an associated normal map. It uses the same path and url to load as the texture image. - * @property {string} [atlasURL] - The absolute or relative URL to load the atlas data file from. - * @property {string} [atlasExtension='txt'] - The default file extension to use for the atlas data if no url is provided. - * @property {XHRSettingsObject} [atlasXhrSettings] - Extra XHR Settings specifically for the atlas data file. + * @property {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @property {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt". + * @property {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not? + * @property {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings. + * @property {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings. */ /** @@ -24305,7 +24833,7 @@ var TextFile = __webpack_require__(184); * A Spine File suitable for loading by the Loader. * * These are created when you use the Phaser.Loader.LoaderPlugin#spine method and are not typically created directly. - * + * * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#spine. * * @class SpineFile @@ -24361,7 +24889,7 @@ var SpineFile = new Class({ for (i = 0; i < atlasURL.length; i++) { atlas = new TextFile(loader, { - key: key, + key: key + '_' + i, url: atlasURL[i], extension: GetFastValue(config, 'atlasExtension', 'atlas'), xhrSettings: GetFastValue(config, 'atlasXhrSettings') @@ -24441,7 +24969,7 @@ var SpineFile = new Class({ var currentPrefix = loader.prefix; var baseURL = GetFastValue(config, 'baseURL', this.baseURL); - var path = GetFastValue(config, 'path', this.path); + var path = GetFastValue(config, 'path', file.src.match(/^.*\//))[0]; var prefix = GetFastValue(config, 'prefix', this.prefix); var textureXhrSettings = GetFastValue(config, 'textureXhrSettings'); @@ -24453,7 +24981,7 @@ var SpineFile = new Class({ { var textureURL = textures[i]; - var key = 'SP' + this.multiKeyIndex + '_' + textureURL; + var key = this.prefix + textureURL; var image = new ImageFile(loader, key, textureURL, textureXhrSettings); @@ -24495,7 +25023,7 @@ var SpineFile = new Class({ if (file.type === 'text') { - atlasKey = file.key.substr(0, file.key.length - 2); + atlasKey = file.key.replace(/_[\d]$/, ''); atlasCache = file.cache; @@ -24506,14 +25034,14 @@ var SpineFile = new Class({ var src = file.key.trim(); var pos = src.indexOf('_'); var key = src.substr(pos + 1); - + this.loader.textureManager.addImage(key, file.data); } file.pendingDestroy(); } - atlasCache.add(atlasKey, { preMultipliedAlpha: preMultipliedAlpha, data: combinedAtlasData }); + atlasCache.add(atlasKey, { preMultipliedAlpha: preMultipliedAlpha, data: combinedAtlasData, prefix: this.prefix }); this.complete = true; } @@ -24525,20 +25053,20 @@ module.exports = SpineFile; /***/ }), -/* 168 */ +/* 177 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var CONST = __webpack_require__(6); -var File = __webpack_require__(12); -var FileTypesManager = __webpack_require__(13); -var GetFastValue = __webpack_require__(3); +var File = __webpack_require__(13); +var FileTypesManager = __webpack_require__(14); +var GetFastValue = __webpack_require__(4); var IsPlainObject = __webpack_require__(2); /** @@ -24546,7 +25074,7 @@ var IsPlainObject = __webpack_require__(2); * A single Image File suitable for loading by the Loader. * * These are created when you use the Phaser.Loader.LoaderPlugin#image method and are not typically created directly. - * + * * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#image. * * @class ImageFile @@ -24690,7 +25218,7 @@ var ImageFile = new Class({ * Adds an Image, or array of Images, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -24705,7 +25233,7 @@ var ImageFile = new Class({ * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been * loaded. - * + * * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle. * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback * of animated gifs to Canvas elements. @@ -24716,7 +25244,7 @@ var ImageFile = new Class({ * then remove it from the Texture Manager first, before loading a new one. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.image({ * key: 'logo', @@ -24727,7 +25255,7 @@ var ImageFile = new Class({ * See the documentation for `Phaser.Types.Loader.FileTypes.ImageFileConfig` for more details. * * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key: - * + * * ```javascript * this.load.image('logo', 'images/AtariLogo.png'); * // and later in your game ... @@ -24746,13 +25274,13 @@ var ImageFile = new Class({ * * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image, * then you can specify it by providing an array as the `url` where the second element is the normal map: - * + * * ```javascript * this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]); * ``` * * Or, if you are using a config object use the `normalMap` property: - * + * * ```javascript * this.load.image({ * key: 'logo', @@ -24768,14 +25296,14 @@ var ImageFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#image - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig|Phaser.Types.Loader.FileTypes.ImageFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was "alien" then the URL will be "alien.png". * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('image', function (key, url, xhrSettings) { @@ -24799,12 +25327,12 @@ module.exports = ImageFile; /***/ }), -/* 169 */ +/* 178 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24814,27 +25342,27 @@ module.exports = ImageFile; module.exports = { - ADD: __webpack_require__(170), - COMPLETE: __webpack_require__(171), - FILE_COMPLETE: __webpack_require__(172), - FILE_KEY_COMPLETE: __webpack_require__(173), - FILE_LOAD_ERROR: __webpack_require__(174), - FILE_LOAD: __webpack_require__(175), - FILE_PROGRESS: __webpack_require__(176), - POST_PROCESS: __webpack_require__(177), - PROGRESS: __webpack_require__(178), - START: __webpack_require__(179) + ADD: __webpack_require__(179), + COMPLETE: __webpack_require__(180), + FILE_COMPLETE: __webpack_require__(181), + FILE_KEY_COMPLETE: __webpack_require__(182), + FILE_LOAD_ERROR: __webpack_require__(183), + FILE_LOAD: __webpack_require__(184), + FILE_PROGRESS: __webpack_require__(185), + POST_PROCESS: __webpack_require__(186), + PROGRESS: __webpack_require__(187), + START: __webpack_require__(188) }; /***/ }), -/* 170 */ +/* 179 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24859,12 +25387,12 @@ module.exports = 'addfile'; /***/ }), -/* 171 */ +/* 180 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24887,12 +25415,12 @@ module.exports = 'complete'; /***/ }), -/* 172 */ +/* 181 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24916,12 +25444,12 @@ module.exports = 'filecomplete'; /***/ }), -/* 173 */ +/* 182 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24970,12 +25498,12 @@ module.exports = 'filecomplete-'; /***/ }), -/* 174 */ +/* 183 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24995,12 +25523,12 @@ module.exports = 'loaderror'; /***/ }), -/* 175 */ +/* 184 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25021,12 +25549,12 @@ module.exports = 'load'; /***/ }), -/* 176 */ +/* 185 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25048,12 +25576,12 @@ module.exports = 'fileprogress'; /***/ }), -/* 177 */ +/* 186 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25077,12 +25605,12 @@ module.exports = 'postprocess'; /***/ }), -/* 178 */ +/* 187 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25102,12 +25630,12 @@ module.exports = 'progress'; /***/ }), -/* 179 */ +/* 188 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25129,12 +25657,12 @@ module.exports = 'start'; /***/ }), -/* 180 */ +/* 189 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25170,16 +25698,16 @@ module.exports = GetURL; /***/ }), -/* 181 */ +/* 190 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MergeXHRSettings = __webpack_require__(29); +var MergeXHRSettings = __webpack_require__(32); /** * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings @@ -25205,6 +25733,14 @@ var XHRLoader = function (file, globalXHRSettings) xhr.responseType = file.xhrSettings.responseType; xhr.timeout = config.timeout; + if (config.headers) + { + for (var key in config.headers) + { + xhr.setRequestHeader(key, config.headers[key]); + } + } + if (config.header && config.headerValue) { xhr.setRequestHeader(config.header, config.headerValue); @@ -25220,6 +25756,11 @@ var XHRLoader = function (file, globalXHRSettings) xhr.overrideMimeType(config.overrideMimeType); } + if (config.withCredentials) + { + xhr.withCredentials = true; + } + // After a successful request, the xhr.response property will contain the requested data as a DOMString, ArrayBuffer, Blob, or Document (depending on what was set for responseType.) xhr.onload = file.onLoad.bind(file, xhr); @@ -25238,21 +25779,21 @@ module.exports = XHRLoader; /***/ }), -/* 182 */ +/* 191 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var CONST = __webpack_require__(6); -var File = __webpack_require__(12); -var FileTypesManager = __webpack_require__(13); -var GetFastValue = __webpack_require__(3); -var GetValue = __webpack_require__(11); +var File = __webpack_require__(13); +var FileTypesManager = __webpack_require__(14); +var GetFastValue = __webpack_require__(4); +var GetValue = __webpack_require__(12); var IsPlainObject = __webpack_require__(2); /** @@ -25260,7 +25801,7 @@ var IsPlainObject = __webpack_require__(2); * A single JSON File suitable for loading by the Loader. * * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly. - * + * * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json. * * @class JSONFile @@ -25271,7 +25812,7 @@ var IsPlainObject = __webpack_require__(2); * * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file. * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object. - * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, can be a fully formed JSON Object. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file. * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache. */ @@ -25364,7 +25905,7 @@ var JSONFile = new Class({ * Adds a JSON file, or array of JSON files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -25379,14 +25920,14 @@ var JSONFile = new Class({ * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been * loaded. - * + * * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load. * The key should be unique both in terms of files being loaded and files already present in the JSON Cache. * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file * then remove it from the JSON Cache first, before loading a new one. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.json({ * key: 'wavedata', @@ -25397,7 +25938,7 @@ var JSONFile = new Class({ * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details. * * Once the file has finished loading you can access it from its Cache using its key: - * + * * ```javascript * this.load.json('wavedata', 'files/AlienWaveData.json'); * // and later in your game ... @@ -25416,7 +25957,7 @@ var JSONFile = new Class({ * * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache, * rather than the whole file. For example, if your JSON data had a structure like this: - * + * * ```json * { * "level1": { @@ -25436,15 +25977,15 @@ var JSONFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#json - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. - * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". + * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, can be a fully formed JSON Object. * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('json', function (key, url, dataKey, xhrSettings) { @@ -25468,12 +26009,12 @@ module.exports = JSONFile; /***/ }), -/* 183 */ +/* 192 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25702,20 +26243,20 @@ module.exports = MultiFile; /***/ }), -/* 184 */ +/* 193 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var CONST = __webpack_require__(6); -var File = __webpack_require__(12); -var FileTypesManager = __webpack_require__(13); -var GetFastValue = __webpack_require__(3); +var File = __webpack_require__(13); +var FileTypesManager = __webpack_require__(14); +var GetFastValue = __webpack_require__(4); var IsPlainObject = __webpack_require__(2); /** @@ -25846,14 +26387,14 @@ var TextFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#text - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig|Phaser.Types.Loader.FileTypes.TextFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt". * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('text', function (key, url, xhrSettings) { @@ -25877,7 +26418,7 @@ module.exports = TextFile; /***/ }), -/* 185 */ +/* 194 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25886,21 +26427,21 @@ module.exports = TextFile; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AngleBetween = __webpack_require__(15); -var Clamp = __webpack_require__(8); +var AngleBetween = __webpack_require__(16); +var Clamp = __webpack_require__(9); var Class = __webpack_require__(0); -var ComponentsComputedSize = __webpack_require__(186); -var ComponentsDepth = __webpack_require__(187); -var ComponentsFlip = __webpack_require__(188); -var ComponentsScrollFactor = __webpack_require__(189); -var ComponentsTransform = __webpack_require__(190); -var ComponentsVisible = __webpack_require__(192); +var ComponentsComputedSize = __webpack_require__(195); +var ComponentsDepth = __webpack_require__(196); +var ComponentsFlip = __webpack_require__(197); +var ComponentsScrollFactor = __webpack_require__(198); +var ComponentsTransform = __webpack_require__(199); +var ComponentsVisible = __webpack_require__(201); var CounterClockwise = __webpack_require__(7); -var DegToRad = __webpack_require__(25); -var GameObject = __webpack_require__(193); -var RadToDeg = __webpack_require__(9); -var SpineEvents = __webpack_require__(214); -var SpineGameObjectRender = __webpack_require__(221); +var DegToRad = __webpack_require__(27); +var GameObject = __webpack_require__(202); +var RadToDeg = __webpack_require__(10); +var SpineEvents = __webpack_require__(225); +var SpineGameObjectRender = __webpack_require__(232); /** * @classdesc @@ -27469,12 +28010,12 @@ module.exports = SpineGameObject; /***/ }), -/* 186 */ +/* 195 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27618,12 +28159,12 @@ module.exports = ComputedSize; /***/ }), -/* 187 */ +/* 196 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27654,7 +28195,7 @@ var Depth = { * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order * of Game Objects, without actually moving their position in the display list. * - * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * The default depth is zero. A Game Object with a higher depth * value will always render in front of one with a lower value. * * Setting the depth will queue a depth sort event within the Scene. @@ -27684,7 +28225,7 @@ var Depth = { * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order * of Game Objects, without actually moving their position in the display list. * - * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth + * The default depth is zero. A Game Object with a higher depth * value will always render in front of one with a lower value. * * Setting the depth will queue a depth sort event within the Scene. @@ -27711,12 +28252,12 @@ module.exports = Depth; /***/ }), -/* 188 */ +/* 197 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27875,12 +28416,12 @@ module.exports = Flip; /***/ }), -/* 189 */ +/* 198 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27982,19 +28523,21 @@ module.exports = ScrollFactor; /***/ }), -/* 190 */ +/* 199 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var MATH_CONST = __webpack_require__(1); -var TransformMatrix = __webpack_require__(191); -var WrapAngle = __webpack_require__(17); -var WrapAngleDegrees = __webpack_require__(18); +var TransformMatrix = __webpack_require__(200); +var TransformXY = __webpack_require__(28); +var WrapAngle = __webpack_require__(18); +var WrapAngleDegrees = __webpack_require__(19); +var Vector2 = __webpack_require__(3); // global bitmask flag for GameObject.renderMask (used by Scale) var _FLAG = 4; // 0100 @@ -28010,7 +28553,7 @@ var Transform = { /** * Private internal value. Holds the horizontal scale value. - * + * * @name Phaser.GameObjects.Components.Transform#_scaleX * @type {number} * @private @@ -28021,7 +28564,7 @@ var Transform = { /** * Private internal value. Holds the vertical scale value. - * + * * @name Phaser.GameObjects.Components.Transform#_scaleY * @type {number} * @private @@ -28032,7 +28575,7 @@ var Transform = { /** * Private internal value. Holds the rotation value in radians. - * + * * @name Phaser.GameObjects.Components.Transform#_rotation * @type {number} * @private @@ -28063,7 +28606,9 @@ var Transform = { /** * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. * * @name Phaser.GameObjects.Components.Transform#z * @type {number} @@ -28085,7 +28630,7 @@ var Transform = { /** * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`. - * + * * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this * isn't the case, use the `scaleX` or `scaleY` properties instead. * @@ -28182,7 +28727,7 @@ var Transform = { /** * The angle of this Game Object as expressed in degrees. - * + * * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left * and -90 is up. * @@ -28209,9 +28754,9 @@ var Transform = { /** * The angle of this Game Object in radians. - * - * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left - * and -90 is up. + * + * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left + * and -PI/2 is up. * * If you prefer to work in degrees, see the `angle` property instead. * @@ -28265,7 +28810,7 @@ var Transform = { /** * Sets the position of this Game Object to be a random position within the confines of * the given area. - * + * * If no area is specified a random position between 0 x 0 and the game width x height is used instead. * * The position does not factor in the size of this Game Object, meaning that only the origin is @@ -28395,6 +28940,9 @@ var Transform = { /** * Sets the z position of this Game Object. * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. + * * @method Phaser.GameObjects.Components.Transform#setZ * @since 3.0.0 * @@ -28484,9 +29032,59 @@ var Transform = { return tempMatrix; }, + /** + * Takes the given `x` and `y` coordinates and converts them into local space for this + * Game Object, taking into account parent and local transforms, and the Display Origin. + * + * The returned Vector2 contains the translated point in its properties. + * + * A Camera needs to be provided in order to handle modified scroll factors. If no + * camera is specified, it will use the `main` camera from the Scene to which this + * Game Object belongs. + * + * @method Phaser.GameObjects.Components.Transform#getLocalPoint + * @since 3.50.0 + * + * @param {number} x - The x position to translate. + * @param {number} y - The y position to translate. + * @param {Phaser.Math.Vector2} [point] - A Vector2, or point-like object, to store the results in. + * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera which is being tested against. If not given will use the Scene default camera. + * + * @return {Phaser.Math.Vector2} The translated point. + */ + getLocalPoint: function (x, y, point, camera) + { + if (!point) { point = new Vector2(); } + if (!camera) { camera = this.scene.sys.cameras.main; } + + var csx = camera.scrollX; + var csy = camera.scrollY; + + var px = x + (csx * this.scrollFactorX) - csx; + var py = y + (csy * this.scrollFactorY) - csy; + + if (this.parentContainer) + { + this.getWorldTransformMatrix().applyInverse(px, py, point); + } + else + { + TransformXY(px, py, this.x, this.y, this.rotation, this.scaleX, this.scaleY, point); + } + + // Normalize origin + if (this._originComponent) + { + point.x += this._displayOriginX; + point.y += this._displayOriginY; + } + + return point; + }, + /** * Gets the sum total rotation of all of this Game Objects parent Containers. - * + * * The returned value is in radians and will be zero if this Game Object has no parent container. * * @method Phaser.GameObjects.Components.Transform#getParentRotation @@ -28516,18 +29114,18 @@ module.exports = Transform; /***/ }), -/* 191 */ +/* 200 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); var MATH_CONST = __webpack_require__(1); -var Vector2 = __webpack_require__(5); +var Vector2 = __webpack_require__(3); /** * @classdesc @@ -28959,7 +29557,7 @@ var TransformMatrix = new Class({ * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by. * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in. * - * @return {Phaser.GameObjects.Components.TransformMatrix} Either this TransformMatrix, or the `out` Matrix, if given in the arguments. + * @return {(this|Phaser.GameObjects.Components.TransformMatrix)} Either this TransformMatrix, or the `out` Matrix, if given in the arguments. */ multiply: function (rhs, out) { @@ -29451,6 +30049,58 @@ var TransformMatrix = new Class({ return x * this.b + y * this.d + this.f; }, + /** + * Returns the X component of this matrix multiplied by the given values. + * + * This is the same as `x * a + y * c + e`, optionally passing via `Math.round`. + * + * @method Phaser.GameObjects.Components.TransformMatrix#getXRound + * @since 3.50.0 + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * @param {boolean} [round=false] - Math.round the resulting value? + * + * @return {number} The calculated x value. + */ + getXRound: function (x, y, round) + { + var v = this.getX(x, y); + + if (round) + { + v = Math.round(v); + } + + return v; + }, + + /** + * Returns the Y component of this matrix multiplied by the given values. + * + * This is the same as `x * b + y * d + f`, optionally passing via `Math.round`. + * + * @method Phaser.GameObjects.Components.TransformMatrix#getYRound + * @since 3.50.0 + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * @param {boolean} [round=false] - Math.round the resulting value? + * + * @return {number} The calculated y value. + */ + getYRound: function (x, y, round) + { + var v = this.getY(x, y); + + if (round) + { + v = Math.round(v); + } + + return v; + }, + /** * Returns a string that can be used in a CSS Transform call as a `matrix` property. * @@ -29484,12 +30134,12 @@ module.exports = TransformMatrix; /***/ }), -/* 192 */ +/* 201 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29573,20 +30223,20 @@ module.exports = Visible; /***/ }), -/* 193 */ +/* 202 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var ComponentsToJSON = __webpack_require__(194); -var DataManager = __webpack_require__(195); -var EventEmitter = __webpack_require__(201); -var Events = __webpack_require__(202); +var ComponentsToJSON = __webpack_require__(203); +var DataManager = __webpack_require__(204); +var EventEmitter = __webpack_require__(210); +var Events = __webpack_require__(211); /** * @classdesc @@ -29636,10 +30286,10 @@ var GameObject = new Class({ /** * The current state of this Game Object. - * + * * Phaser itself will never modify this value, although plugins may do so. - * - * Use this property to track the state of a Game Object during its lifetime. For example, it could move from + * + * Use this property to track the state of a Game Object during its lifetime. For example, it could change from * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons. * If you need to store complex data about your Game Object, look at using the Data Component instead. @@ -29744,10 +30394,10 @@ var GameObject = new Class({ this.input = null; /** - * If this Game Object is enabled for physics then this property will contain a reference to a Physics Body. + * If this Game Object is enabled for Arcade or Matter Physics then this property will contain a reference to a Physics Body. * * @name Phaser.GameObjects.GameObject#body - * @type {?(object|Phaser.Physics.Arcade.Body|Phaser.Physics.Impact.Body)} + * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|MatterJS.BodyType)} * @default null * @since 3.0.0 */ @@ -29808,9 +30458,9 @@ var GameObject = new Class({ /** * Sets the current state of this Game Object. - * + * * Phaser itself will never modify the State of a Game Object, although plugins may do so. - * + * * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'. * The state value should typically be an integer (ideally mapped to a constant * in your game code), but could also be a string. It is recommended to keep it light and simple. @@ -29908,6 +30558,65 @@ var GameObject = new Class({ return this; }, + /** + * Increase a value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is increased from 0. + * + * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled + * before setting the value. + * + * If the key doesn't already exist in the Data Manager then it is created. + * + * When the value is first set, a `setdata` event is emitted from this Game Object. + * + * @method Phaser.GameObjects.GameObject#incData + * @since 3.23.0 + * + * @param {(string|object)} key - The key to increase the value for. + * @param {*} [data] - The value to increase for the given key. + * + * @return {this} This GameObject. + */ + incData: function (key, value) + { + if (!this.data) + { + this.data = new DataManager(this); + } + + this.data.inc(key, value); + + return this; + }, + + /** + * Toggle a boolean value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is toggled from false. + * + * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled + * before setting the value. + * + * If the key doesn't already exist in the Data Manager then it is created. + * + * When the value is first set, a `setdata` event is emitted from this Game Object. + * + * @method Phaser.GameObjects.GameObject#toggleData + * @since 3.23.0 + * + * @param {(string|object)} key - The key to toggle the value for. + * + * @return {this} This GameObject. + */ + toggleData: function (key) + { + if (!this.data) + { + this.data = new DataManager(this); + } + + this.data.toggle(key); + + return this; + }, + /** * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist. * @@ -29961,18 +30670,27 @@ var GameObject = new Class({ * * You can also provide an Input Configuration Object as the only argument to this method. * + * @example + * sprite.setInteractive(); + * + * @example + * sprite.setInteractive(new Phaser.Geom.Circle(45, 46, 45), Phaser.Geom.Circle.Contains); + * + * @example + * graphics.setInteractive(new Phaser.Geom.Rectangle(0, 0, 128, 128), Phaser.Geom.Rectangle.Contains); + * * @method Phaser.GameObjects.GameObject#setInteractive * @since 3.0.0 * - * @param {(Phaser.Types.Input.InputConfiguration|any)} [shape] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used. - * @param {Phaser.Types.Input.HitAreaCallback} [callback] - A callback to be invoked when the Game Object is interacted with. If you provide a shape you must also provide a callback. + * @param {(Phaser.Types.Input.InputConfiguration|any)} [hitArea] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not given it will try to create a Rectangle based on the texture frame. + * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The callback that determines if the pointer is within the Hit Area shape or not. If you provide a shape you must also provide a callback. * @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target? * * @return {this} This GameObject. */ - setInteractive: function (shape, callback, dropZone) + setInteractive: function (hitArea, hitAreaCallback, dropZone) { - this.scene.sys.input.enable(this, shape, callback, dropZone); + this.scene.sys.input.enable(this, hitArea, hitAreaCallback, dropZone); return this; }, @@ -30015,7 +30733,7 @@ var GameObject = new Class({ * If you wish to only temporarily stop an object from receiving input then use * `disableInteractive` instead, as that toggles the interactive state, where-as * this erases it completely. - * + * * If you wish to resize a hit area, don't remove and then set it as being * interactive. Instead, access the hitarea object directly and resize the shape * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the @@ -30035,6 +30753,36 @@ var GameObject = new Class({ return this; }, + /** + * This callback is invoked when this Game Object is added to a Scene. + * + * Can be overriden by custom Game Objects, but be aware of some Game Objects that + * will use this, such as Sprites, to add themselves into the Update List. + * + * You can also listen for the `ADDED_TO_SCENE` event from this Game Object. + * + * @method Phaser.GameObjects.GameObject#addedToScene + * @since 3.50.0 + */ + addedToScene: function () + { + }, + + /** + * This callback is invoked when this Game Object is removed from a Scene. + * + * Can be overriden by custom Game Objects, but be aware of some Game Objects that + * will use this, such as Sprites, to removed themselves from the Update List. + * + * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object. + * + * @method Phaser.GameObjects.GameObject#removedFromScene + * @since 3.50.0 + */ + removedFromScene: function () + { + }, + /** * To be overridden by custom GameObjects. Allows base objects to be used in a Pool. * @@ -30161,7 +30909,6 @@ var GameObject = new Class({ if (!fromScene) { sys.displayList.remove(this); - sys.updateList.remove(this); } if (this.input) @@ -30214,12 +30961,12 @@ module.exports = GameObject; /***/ }), -/* 194 */ +/* 203 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30275,17 +31022,17 @@ module.exports = ToJSON; /***/ }), -/* 195 */ +/* 204 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); -var Events = __webpack_require__(196); +var Events = __webpack_require__(205); /** * @callback DataEachCallback @@ -30308,7 +31055,7 @@ var Events = __webpack_require__(196); * @since 3.0.0 * * @param {object} parent - The object that this DataManager belongs to. - * @param {Phaser.Events.EventEmitter} eventEmitter - The DataManager's event emitter. + * @param {Phaser.Events.EventEmitter} [eventEmitter] - The DataManager's event emitter. */ var DataManager = new Class({ @@ -30535,7 +31282,7 @@ var DataManager = new Class({ * @param {(string|object)} key - The key to set the value for. Or an object or key value pairs. If an object the `data` argument is ignored. * @param {*} data - The value to set for the given key. If an object is provided as the key this argument is ignored. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ set: function (key, data) { @@ -30559,6 +31306,72 @@ var DataManager = new Class({ return this; }, + /** + * Increase a value for the given key. If the key doesn't already exist in the Data Manager then it is increased from 0. + * + * When the value is first set, a `setdata` event is emitted. + * + * @method Phaser.Data.DataManager#inc + * @fires Phaser.Data.Events#SET_DATA + * @fires Phaser.Data.Events#CHANGE_DATA + * @fires Phaser.Data.Events#CHANGE_DATA_KEY + * @since 3.23.0 + * + * @param {(string|object)} key - The key to increase the value for. + * @param {*} [data] - The value to increase for the given key. + * + * @return {Phaser.Data.DataManager} This DataManager object. + */ + inc: function (key, data) + { + if (this._frozen) + { + return this; + } + + if (data === undefined) + { + data = 1; + } + + var value = this.get(key); + if (value === undefined) + { + value = 0; + } + + this.set(key, (value + data)); + + return this; + }, + + /** + * Toggle a boolean value for the given key. If the key doesn't already exist in the Data Manager then it is toggled from false. + * + * When the value is first set, a `setdata` event is emitted. + * + * @method Phaser.Data.DataManager#toggle + * @fires Phaser.Data.Events#SET_DATA + * @fires Phaser.Data.Events#CHANGE_DATA + * @fires Phaser.Data.Events#CHANGE_DATA_KEY + * @since 3.23.0 + * + * @param {(string|object)} key - The key to toggle the value for. + * + * @return {Phaser.Data.DataManager} This DataManager object. + */ + toggle: function (key) + { + if (this._frozen) + { + return this; + } + + this.set(key, !this.get(key)); + + return this; + }, + /** * Internal value setter, called automatically by the `set` method. * @@ -30572,7 +31385,7 @@ var DataManager = new Class({ * @param {string} key - The key to set the value for. * @param {*} data - The value to set. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ setValue: function (key, data) { @@ -30636,7 +31449,7 @@ var DataManager = new Class({ * @param {*} [context] - Value to use as `this` when executing callback. * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ each: function (callback, context) { @@ -30673,7 +31486,7 @@ var DataManager = new Class({ * @param {Object.} data - The data to merge. * @param {boolean} [overwrite=true] - Whether to overwrite existing data. Defaults to true. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ merge: function (data, overwrite) { @@ -30709,7 +31522,7 @@ var DataManager = new Class({ * * @param {(string|string[])} key - The key to remove, or an array of keys to remove. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ remove: function (key) { @@ -30743,7 +31556,7 @@ var DataManager = new Class({ * * @param {string} key - The key to set the value for. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ removeValue: function (key) { @@ -30815,7 +31628,7 @@ var DataManager = new Class({ * * @param {boolean} value - Whether to freeze or unfreeze the Data Manager. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ setFreeze: function (value) { @@ -30830,7 +31643,7 @@ var DataManager = new Class({ * @method Phaser.Data.DataManager#reset * @since 3.0.0 * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ reset: function () { @@ -30916,12 +31729,12 @@ module.exports = DataManager; /***/ }), -/* 196 */ +/* 205 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30931,21 +31744,21 @@ module.exports = DataManager; module.exports = { - CHANGE_DATA: __webpack_require__(197), - CHANGE_DATA_KEY: __webpack_require__(198), - REMOVE_DATA: __webpack_require__(199), - SET_DATA: __webpack_require__(200) + CHANGE_DATA: __webpack_require__(206), + CHANGE_DATA_KEY: __webpack_require__(207), + REMOVE_DATA: __webpack_require__(208), + SET_DATA: __webpack_require__(209) }; /***/ }), -/* 197 */ +/* 206 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30972,12 +31785,12 @@ module.exports = 'changedata'; /***/ }), -/* 198 */ +/* 207 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30995,7 +31808,6 @@ module.exports = 'changedata'; * @since 3.16.1 * * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event. - * @param {string} key - The unique key of the data item within the Data Manager. * @param {any} value - The item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance. * @param {any} previousValue - The previous item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance. */ @@ -31003,12 +31815,12 @@ module.exports = 'changedata-'; /***/ }), -/* 199 */ +/* 208 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31031,12 +31843,12 @@ module.exports = 'removedata'; /***/ }), -/* 200 */ +/* 209 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31059,7 +31871,7 @@ module.exports = 'setdata'; /***/ }), -/* 201 */ +/* 210 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -31402,12 +32214,12 @@ if (true) { /***/ }), -/* 202 */ +/* 211 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31417,28 +32229,56 @@ if (true) { module.exports = { - DESTROY: __webpack_require__(203), - VIDEO_COMPLETE: __webpack_require__(204), - VIDEO_CREATED: __webpack_require__(205), - VIDEO_ERROR: __webpack_require__(206), - VIDEO_LOOP: __webpack_require__(207), - VIDEO_PLAY: __webpack_require__(208), - VIDEO_SEEKED: __webpack_require__(209), - VIDEO_SEEKING: __webpack_require__(210), - VIDEO_STOP: __webpack_require__(211), - VIDEO_TIMEOUT: __webpack_require__(212), - VIDEO_UNLOCKED: __webpack_require__(213) + ADDED_TO_SCENE: __webpack_require__(212), + DESTROY: __webpack_require__(213), + REMOVED_FROM_SCENE: __webpack_require__(214), + VIDEO_COMPLETE: __webpack_require__(215), + VIDEO_CREATED: __webpack_require__(216), + VIDEO_ERROR: __webpack_require__(217), + VIDEO_LOOP: __webpack_require__(218), + VIDEO_PLAY: __webpack_require__(219), + VIDEO_SEEKED: __webpack_require__(220), + VIDEO_SEEKING: __webpack_require__(221), + VIDEO_STOP: __webpack_require__(222), + VIDEO_TIMEOUT: __webpack_require__(223), + VIDEO_UNLOCKED: __webpack_require__(224) }; /***/ }), -/* 203 */ +/* 212 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Object Added to Scene Event. + * + * This event is dispatched when a Game Object is added to a Scene. + * + * Listen for it on a Game Object instance using `GameObject.on('addedtoscene', listener)`. + * + * @event Phaser.GameObjects.Events#ADDED_TO_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene. + * @param {Phaser.Scene} scene - The Scene to which the Game Object was added. + */ +module.exports = 'addedtoscene'; + + +/***/ }), +/* 213 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31458,12 +32298,38 @@ module.exports = 'destroy'; /***/ }), -/* 204 */ +/* 214 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Object Removed from Scene Event. + * + * This event is dispatched when a Game Object is removed from a Scene. + * + * Listen for it on a Game Object instance using `GameObject.on('removedfromscene', listener)`. + * + * @event Phaser.GameObjects.Events#REMOVED_FROM_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene. + * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed. + */ +module.exports = 'removedfromscene'; + + +/***/ }), +/* 215 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31490,12 +32356,12 @@ module.exports = 'complete'; /***/ }), -/* 205 */ +/* 216 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31519,12 +32385,12 @@ module.exports = 'created'; /***/ }), -/* 206 */ +/* 217 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31545,12 +32411,12 @@ module.exports = 'error'; /***/ }), -/* 207 */ +/* 218 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31577,12 +32443,12 @@ module.exports = 'loop'; /***/ }), -/* 208 */ +/* 219 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31605,12 +32471,12 @@ module.exports = 'play'; /***/ }), -/* 209 */ +/* 220 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31630,12 +32496,12 @@ module.exports = 'seeked'; /***/ }), -/* 210 */ +/* 221 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31656,12 +32522,12 @@ module.exports = 'seeking'; /***/ }), -/* 211 */ +/* 222 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31682,12 +32548,12 @@ module.exports = 'stop'; /***/ }), -/* 212 */ +/* 223 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31708,12 +32574,12 @@ module.exports = 'timeout'; /***/ }), -/* 213 */ +/* 224 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31734,7 +32600,7 @@ module.exports = 'unlocked'; /***/ }), -/* 214 */ +/* 225 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31749,18 +32615,18 @@ module.exports = 'unlocked'; module.exports = { - COMPLETE: __webpack_require__(215), - DISPOSE: __webpack_require__(216), - END: __webpack_require__(217), - EVENT: __webpack_require__(218), - INTERRUPTED: __webpack_require__(219), - START: __webpack_require__(220) + COMPLETE: __webpack_require__(226), + DISPOSE: __webpack_require__(227), + END: __webpack_require__(228), + EVENT: __webpack_require__(229), + INTERRUPTED: __webpack_require__(230), + START: __webpack_require__(231) }; /***/ }), -/* 215 */ +/* 226 */ /***/ (function(module, exports) { /** @@ -31779,7 +32645,7 @@ module.exports = 'complete'; /***/ }), -/* 216 */ +/* 227 */ /***/ (function(module, exports) { /** @@ -31798,7 +32664,7 @@ module.exports = 'dispose'; /***/ }), -/* 217 */ +/* 228 */ /***/ (function(module, exports) { /** @@ -31817,7 +32683,7 @@ module.exports = 'end'; /***/ }), -/* 218 */ +/* 229 */ /***/ (function(module, exports) { /** @@ -31836,7 +32702,7 @@ module.exports = 'event'; /***/ }), -/* 219 */ +/* 230 */ /***/ (function(module, exports) { /** @@ -31855,7 +32721,7 @@ module.exports = 'interrupted'; /***/ }), -/* 220 */ +/* 231 */ /***/ (function(module, exports) { /** @@ -31874,7 +32740,7 @@ module.exports = 'start'; /***/ }), -/* 221 */ +/* 232 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31883,12 +32749,12 @@ module.exports = 'start'; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var renderWebGL = __webpack_require__(31); -var renderCanvas = __webpack_require__(31); +var renderWebGL = __webpack_require__(34); +var renderCanvas = __webpack_require__(34); if (true) { - renderWebGL = __webpack_require__(222); + renderWebGL = __webpack_require__(233); } if (false) @@ -31903,7 +32769,7 @@ module.exports = { /***/ }), -/* 222 */ +/* 233 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31913,8 +32779,8 @@ module.exports = { */ var CounterClockwise = __webpack_require__(7); -var RadToDeg = __webpack_require__(9); -var Wrap = __webpack_require__(4); +var RadToDeg = __webpack_require__(10); +var Wrap = __webpack_require__(5); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -31951,10 +32817,10 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent { // The next object in the display list is not a Spine object, so we end the batch sceneRenderer.end(); - - renderer.rebindPipeline(renderer.pipelines.TextureTintPipeline); + + renderer.rebindPipeline(renderer.pipelines.MultiPipeline); } - + return; } @@ -32063,7 +32929,7 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent // The next object in the display list is not a Spine object, so we end the batch sceneRenderer.end(); - renderer.rebindPipeline(renderer.pipelines.TextureTintPipeline); + renderer.rebindPipeline(renderer.pipelines.MultiPipeline); } }; diff --git a/plugins/spine/dist/SpineWebGLPlugin.min.js b/plugins/spine/dist/SpineWebGLPlugin.min.js index d99c7bb47..265582e24 100644 --- a/plugins/spine/dist/SpineWebGLPlugin.min.js +++ b/plugins/spine/dist/SpineWebGLPlugin.min.js @@ -1 +1 @@ -window.SpinePlugin=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=32)}([function(t,e){function n(t,e,n){var i=n?t[e]:Object.getOwnPropertyDescriptor(t,e);return!n&&i.value&&"object"==typeof i.value&&(i=i.value),!(!i||!function(t){return!!t.get&&"function"==typeof t.get||!!t.set&&"function"==typeof t.set}(i))&&(void 0===i.enumerable&&(i.enumerable=!0),void 0===i.configurable&&(i.configurable=!0),i)}function i(t,e){var n=Object.getOwnPropertyDescriptor(t,e);return!!n&&(n.value&&"object"==typeof n.value&&(n=n.value),!1===n.configurable)}function r(t,e,r,s){for(var a in e)if(e.hasOwnProperty(a)){var h=n(e,a,r);if(!1!==h){if(i((s||t).prototype,a)){if(o.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]=e[a]}}function s(t,e){if(e){Array.isArray(e)||(e=[e]);for(var n=0;n0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=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 n=this.x,i=this.y;return this.x=n+e*(t.x-n),this.y=i+e*(t.y-i),this},transformMat3:function(t){var e=this.x,n=this.y,i=t.val;return this.x=i[0]*e+i[3]*n+i[6],this.y=i[1]*e+i[4]*n+i[7],this},transformMat4:function(t){var e=this.x,n=this.y,i=t.val;return this.x=i[0]*e+i[4]*n+i[12],this.y=i[1]*e+i[5]*n+i[13],this},reset:function(){return this.x=0,this.y=0,this}});i.ZERO=new i,i.RIGHT=new i(1,0),i.LEFT=new i(-1,0),i.UP=new i(0,-1),i.DOWN=new i(0,1),i.ONE=new i(1,1),t.exports=i},function(t,e){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}},function(t,e,n){var i=n(1);t.exports=function(t){return t>Math.PI&&(t-=i.PI2),Math.abs(((t+i.TAU)%i.PI2-i.PI2)%i.PI2)}},function(t,e){t.exports=function(t,e,n){return Math.max(e,Math.min(n,t))}},function(t,e,n){var i=n(1);t.exports=function(t){return t*i.RAD_TO_DEG}},function(t,e,n){var i=new(n(0))({initialize:function(t,e,n){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=n||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new i(this.x,this.y,this.z)},crossVectors:function(t,e){var n=t.x,i=t.y,r=t.z,s=e.x,o=e.y,a=e.z;return this.x=i*a-r*o,this.y=r*s-n*a,this.z=n*o-i*s,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,n){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=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||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,n=t.y-this.y,i=t.z-this.z||0;return Math.sqrt(e*e+n*n+i*i)},distanceSq:function(t){var e=t.x-this.x,n=t.y-this.y,i=t.z-this.z||0;return e*e+n*n+i*i},length:function(){var t=this.x,e=this.y,n=this.z;return Math.sqrt(t*t+e*e+n*n)},lengthSq:function(){var t=this.x,e=this.y,n=this.z;return t*t+e*e+n*n},normalize:function(){var t=this.x,e=this.y,n=this.z,i=t*t+e*e+n*n;return i>0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i,this.z=n*i),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,n=this.y,i=this.z,r=t.x,s=t.y,o=t.z;return this.x=n*o-i*s,this.y=i*r-e*o,this.z=e*s-n*r,this},lerp:function(t,e){void 0===e&&(e=0);var n=this.x,i=this.y,r=this.z;return this.x=n+e*(t.x-n),this.y=i+e*(t.y-i),this.z=r+e*(t.z-r),this},transformMat3:function(t){var e=this.x,n=this.y,i=this.z,r=t.val;return this.x=e*r[0]+n*r[3]+i*r[6],this.y=e*r[1]+n*r[4]+i*r[7],this.z=e*r[2]+n*r[5]+i*r[8],this},transformMat4:function(t){var e=this.x,n=this.y,i=this.z,r=t.val;return this.x=r[0]*e+r[4]*n+r[8]*i+r[12],this.y=r[1]*e+r[5]*n+r[9]*i+r[13],this.z=r[2]*e+r[6]*n+r[10]*i+r[14],this},transformCoordinates:function(t){var e=this.x,n=this.y,i=this.z,r=t.val,s=e*r[0]+n*r[4]+i*r[8]+r[12],o=e*r[1]+n*r[5]+i*r[9]+r[13],a=e*r[2]+n*r[6]+i*r[10]+r[14],h=e*r[3]+n*r[7]+i*r[11]+r[15];return this.x=s/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,n=this.y,i=this.z,r=t.x,s=t.y,o=t.z,a=t.w,h=a*e+s*i-o*n,l=a*n+o*e-r*i,u=a*i+r*n-s*e,c=-r*e-s*n-o*i;return this.x=h*a+c*-r+l*-o-u*-s,this.y=l*a+c*-s+u*-r-h*-o,this.z=u*a+c*-o+h*-s-l*-r,this},project:function(t){var e=this.x,n=this.y,i=this.z,r=t.val,s=r[0],o=r[1],a=r[2],h=r[3],l=r[4],u=r[5],c=r[6],f=r[7],d=r[8],p=r[9],v=r[10],g=r[11],M=r[12],m=r[13],x=r[14],y=1/(e*h+n*f+i*g+r[15]);return this.x=(e*s+n*l+i*d+M)*y,this.y=(e*o+n*u+i*p+m)*y,this.z=(e*a+n*c+i*v+x)*y,this},unproject:function(t,e){var n=t.x,i=t.y,r=t.z,s=t.w,o=this.x-n,a=s-this.y-1-i,h=this.z;return this.x=2*o/r-1,this.y=2*a/s-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});i.ZERO=new i,i.RIGHT=new i(1,0,0),i.LEFT=new i(-1,0,0),i.UP=new i(0,-1,0),i.DOWN=new i(0,1,0),i.FORWARD=new i(0,0,1),i.BACK=new i(0,0,-1),i.ONE=new i(1,1,1),t.exports=i},function(t,e){t.exports=function(t,e,n){if(t&&"number"!=typeof t){if(t.hasOwnProperty(e))return t[e];if(-1!==e.indexOf(".")){for(var i=e.split("."),r=t,s=n,o=0;o=400&&t.status<=599&&(i=!1),this.resetXHR(),this.loader.nextFile(this,i)},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(s.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=r.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=r.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){this.state=r.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.cache.add(this.key,this.data),this.pendingDestroy()},pendingDestroy:function(t){void 0===t&&(t=this.data);var e=this.key,n=this.type;this.loader.emit(s.FILE_COMPLETE,e,n,t),this.loader.emit(s.FILE_KEY_COMPLETE+n+"-"+e,e,n,t),this.loader.flagForRemoval(this)},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,n){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var i=new FileReader;i.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||n)+";base64,"+i.result.split(",")[1]},i.onerror=t.onerror,i.readAsDataURL(e)}},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},function(t,e){var n={},i={install:function(t){for(var e in n)t[e]=n[e]},register:function(t,e){n[t]=e},destroy:function(){n={}}};t.exports=i},function(t,e,n){var i=n(2),r=function(){var t,e,n,s,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=0?t:t+2*Math.PI}},function(t,e,n){var i=n(4);t.exports=function(t){return i(t,-Math.PI,Math.PI)}},function(t,e,n){var i=n(4);t.exports=function(t){return i(t,-180,180)}},function(t,e,n){var i=n(20);t.exports=function(t,e){return i(t)/i(e)/i(t-e)}},function(t,e){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},function(t,e){t.exports=function(t,e,n,i,r){var s=.5*(i-e),o=.5*(r-n),a=t*t;return(2*n-2*i+s+o)*(t*a)+(-3*n+3*i-2*s-o)*a+s*t+n}},function(t,e){t.exports=function(t,e,n){return(e-t)*n+t}},function(t,e){t.exports=function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*(3-2*t)}},function(t,e){t.exports=function(t,e,n){return(t=Math.max(0,Math.min(1,(t-e)/(n-e))))*t*t*(t*(6*t-15)+10)}},function(t,e,n){var i=n(1);t.exports=function(t){return t*i.DEG_TO_RAD}},function(t,e,n){var i=new(n(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new i(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,n=t.val;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this},fromMat4:function(t){var e=t.val,n=this.val;return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[4],n[4]=e[5],n[5]=e[6],n[6]=e[8],n[7]=e[9],n[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],n=t[2],i=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=n,t[7]=i,this},invert:function(){var t=this.val,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=l*s-o*h,c=-l*r+o*a,f=h*r-s*a,d=e*u+n*c+i*f;return d?(d=1/d,t[0]=u*d,t[1]=(-l*n+i*h)*d,t[2]=(o*n-i*s)*d,t[3]=c*d,t[4]=(l*e-i*a)*d,t[5]=(-o*e+i*r)*d,t[6]=f*d,t[7]=(-h*e+n*a)*d,t[8]=(s*e-n*r)*d,this):null},adjoint:function(){var t=this.val,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return t[0]=s*l-o*h,t[1]=i*h-n*l,t[2]=n*o-i*s,t[3]=o*a-r*l,t[4]=e*l-i*a,t[5]=i*r-e*o,t[6]=r*h-s*a,t[7]=n*a-e*h,t[8]=e*s-n*r,this},determinant:function(){var t=this.val,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return e*(l*s-o*h)+n*(-l*r+o*a)+i*(h*r-s*a)},multiply:function(t){var e=this.val,n=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=t.val,f=c[0],d=c[1],p=c[2],v=c[3],g=c[4],M=c[5],m=c[6],x=c[7],y=c[8];return e[0]=f*n+d*s+p*h,e[1]=f*i+d*o+p*l,e[2]=f*r+d*a+p*u,e[3]=v*n+g*s+M*h,e[4]=v*i+g*o+M*l,e[5]=v*r+g*a+M*u,e[6]=m*n+x*s+y*h,e[7]=m*i+x*o+y*l,e[8]=m*r+x*a+y*u,this},translate:function(t){var e=this.val,n=t.x,i=t.y;return e[6]=n*e[0]+i*e[3]+e[6],e[7]=n*e[1]+i*e[4]+e[7],e[8]=n*e[2]+i*e[5]+e[8],this},rotate:function(t){var e=this.val,n=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*n+h*s,e[1]=l*i+h*o,e[2]=l*r+h*a,e[3]=l*s-h*n,e[4]=l*o-h*i,e[5]=l*a-h*r,this},scale:function(t){var e=this.val,n=t.x,i=t.y;return e[0]=n*e[0],e[1]=n*e[1],e[2]=n*e[2],e[3]=i*e[3],e[4]=i*e[4],e[5]=i*e[5],this},fromQuat:function(t){var e=t.x,n=t.y,i=t.z,r=t.w,s=e+e,o=n+n,a=i+i,h=e*s,l=e*o,u=e*a,c=n*o,f=n*a,d=i*a,p=r*s,v=r*o,g=r*a,M=this.val;return M[0]=1-(c+d),M[3]=l+g,M[6]=u-v,M[1]=l-g,M[4]=1-(h+d),M[7]=f+p,M[2]=u+v,M[5]=f-p,M[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,n=this.val,i=e[0],r=e[1],s=e[2],o=e[3],a=e[4],h=e[5],l=e[6],u=e[7],c=e[8],f=e[9],d=e[10],p=e[11],v=e[12],g=e[13],M=e[14],m=e[15],x=i*h-r*a,y=i*l-s*a,w=i*u-o*a,E=r*l-s*h,T=r*u-o*h,b=s*u-o*l,A=c*g-f*v,R=c*M-d*v,S=c*m-p*v,I=f*M-d*g,C=f*m-p*g,P=d*m-p*M,L=x*P-y*C+w*I+E*S-T*R+b*A;return L?(L=1/L,n[0]=(h*P-l*C+u*I)*L,n[1]=(l*S-a*P-u*R)*L,n[2]=(a*C-h*S+u*A)*L,n[3]=(s*C-r*P-o*I)*L,n[4]=(i*P-s*S+o*R)*L,n[5]=(r*S-i*C-o*A)*L,n[6]=(g*b-M*T+m*E)*L,n[7]=(M*w-v*b-m*y)*L,n[8]=(v*T-g*w+m*x)*L,this):null}});t.exports=i},function(t,e,n){var i=new(n(0))({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new i(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,n=t.val;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],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],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this},zero:function(){var t=this.val;return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=0,this},xyz:function(t,e,n){this.identity();var i=this.val;return i[12]=t,i[13]=e,i[14]=n,this},scaling:function(t,e,n){this.zero();var i=this.val;return i[0]=t,i[5]=e,i[10]=n,i[15]=1,this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},transpose:function(){var t=this.val,e=t[1],n=t[2],i=t[3],r=t[6],s=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]=n,t[9]=r,t[11]=t[14],t[12]=i,t[13]=s,t[14]=o,this},invert:function(){var t=this.val,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],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f*p)-l*(n*g-r*p)+d*(n*f-r*u)),t[10]=e*(o*g-h*p)-s*(n*g-r*p)+d*(n*h-r*o),t[11]=-(e*(o*f-h*u)-s*(n*f-r*u)+l*(n*h-r*o)),t[12]=-(s*(u*v-c*p)-l*(o*v-a*p)+d*(o*c-a*u)),t[13]=e*(u*v-c*p)-l*(n*v-i*p)+d*(n*c-i*u),t[14]=-(e*(o*v-a*p)-s*(n*v-i*p)+d*(n*a-i*o)),t[15]=e*(o*c-a*u)-s*(n*c-i*u)+l*(n*a-i*o),this},determinant:function(){var t=this.val,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],f=t[11],d=t[12],p=t[13],v=t[14],g=t[15];return(e*o-n*s)*(c*g-f*v)-(e*a-i*s)*(u*g-f*p)+(e*h-r*s)*(u*v-c*p)+(n*a-i*o)*(l*g-f*d)-(n*h-r*o)*(l*v-c*d)+(i*h-r*a)*(l*p-u*d)},multiply:function(t){var e=this.val,n=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=e[9],f=e[10],d=e[11],p=e[12],v=e[13],g=e[14],M=e[15],m=t.val,x=m[0],y=m[1],w=m[2],E=m[3];return e[0]=x*n+y*o+w*u+E*p,e[1]=x*i+y*a+w*c+E*v,e[2]=x*r+y*h+w*f+E*g,e[3]=x*s+y*l+w*d+E*M,x=m[4],y=m[5],w=m[6],E=m[7],e[4]=x*n+y*o+w*u+E*p,e[5]=x*i+y*a+w*c+E*v,e[6]=x*r+y*h+w*f+E*g,e[7]=x*s+y*l+w*d+E*M,x=m[8],y=m[9],w=m[10],E=m[11],e[8]=x*n+y*o+w*u+E*p,e[9]=x*i+y*a+w*c+E*v,e[10]=x*r+y*h+w*f+E*g,e[11]=x*s+y*l+w*d+E*M,x=m[12],y=m[13],w=m[14],E=m[15],e[12]=x*n+y*o+w*u+E*p,e[13]=x*i+y*a+w*c+E*v,e[14]=x*r+y*h+w*f+E*g,e[15]=x*s+y*l+w*d+E*M,this},multiplyLocal:function(t){var e=[],n=this.val,i=t.val;return e[0]=n[0]*i[0]+n[1]*i[4]+n[2]*i[8]+n[3]*i[12],e[1]=n[0]*i[1]+n[1]*i[5]+n[2]*i[9]+n[3]*i[13],e[2]=n[0]*i[2]+n[1]*i[6]+n[2]*i[10]+n[3]*i[14],e[3]=n[0]*i[3]+n[1]*i[7]+n[2]*i[11]+n[3]*i[15],e[4]=n[4]*i[0]+n[5]*i[4]+n[6]*i[8]+n[7]*i[12],e[5]=n[4]*i[1]+n[5]*i[5]+n[6]*i[9]+n[7]*i[13],e[6]=n[4]*i[2]+n[5]*i[6]+n[6]*i[10]+n[7]*i[14],e[7]=n[4]*i[3]+n[5]*i[7]+n[6]*i[11]+n[7]*i[15],e[8]=n[8]*i[0]+n[9]*i[4]+n[10]*i[8]+n[11]*i[12],e[9]=n[8]*i[1]+n[9]*i[5]+n[10]*i[9]+n[11]*i[13],e[10]=n[8]*i[2]+n[9]*i[6]+n[10]*i[10]+n[11]*i[14],e[11]=n[8]*i[3]+n[9]*i[7]+n[10]*i[11]+n[11]*i[15],e[12]=n[12]*i[0]+n[13]*i[4]+n[14]*i[8]+n[15]*i[12],e[13]=n[12]*i[1]+n[13]*i[5]+n[14]*i[9]+n[15]*i[13],e[14]=n[12]*i[2]+n[13]*i[6]+n[14]*i[10]+n[15]*i[14],e[15]=n[12]*i[3]+n[13]*i[7]+n[14]*i[11]+n[15]*i[15],this.fromArray(e)},translate:function(t){var e=t.x,n=t.y,i=t.z,r=this.val;return r[12]=r[0]*e+r[4]*n+r[8]*i+r[12],r[13]=r[1]*e+r[5]*n+r[9]*i+r[13],r[14]=r[2]*e+r[6]*n+r[10]*i+r[14],r[15]=r[3]*e+r[7]*n+r[11]*i+r[15],this},translateXYZ:function(t,e,n){var i=this.val;return i[12]=i[0]*t+i[4]*e+i[8]*n+i[12],i[13]=i[1]*t+i[5]*e+i[9]*n+i[13],i[14]=i[2]*t+i[6]*e+i[10]*n+i[14],i[15]=i[3]*t+i[7]*e+i[11]*n+i[15],this},scale:function(t){var e=t.x,n=t.y,i=t.z,r=this.val;return r[0]=r[0]*e,r[1]=r[1]*e,r[2]=r[2]*e,r[3]=r[3]*e,r[4]=r[4]*n,r[5]=r[5]*n,r[6]=r[6]*n,r[7]=r[7]*n,r[8]=r[8]*i,r[9]=r[9]*i,r[10]=r[10]*i,r[11]=r[11]*i,this},scaleXYZ:function(t,e,n){var i=this.val;return i[0]=i[0]*t,i[1]=i[1]*t,i[2]=i[2]*t,i[3]=i[3]*t,i[4]=i[4]*e,i[5]=i[5]*e,i[6]=i[6]*e,i[7]=i[7]*e,i[8]=i[8]*n,i[9]=i[9]*n,i[10]=i[10]*n,i[11]=i[11]*n,this},makeRotationAxis:function(t,e){var n=Math.cos(e),i=Math.sin(e),r=1-n,s=t.x,o=t.y,a=t.z,h=r*s,l=r*o;return this.fromArray([h*s+n,h*o-i*a,h*a+i*o,0,h*o+i*a,l*o+n,l*a-i*s,0,h*a-i*o,l*a+i*s,r*a*a+n,0,0,0,0,1]),this},rotate:function(t,e){var n=this.val,i=e.x,r=e.y,s=e.z,o=Math.sqrt(i*i+r*r+s*s);if(Math.abs(o)<1e-6)return null;i*=o=1/o,r*=o,s*=o;var a=Math.sin(t),h=Math.cos(t),l=1-h,u=n[0],c=n[1],f=n[2],d=n[3],p=n[4],v=n[5],g=n[6],M=n[7],m=n[8],x=n[9],y=n[10],w=n[11],E=i*i*l+h,T=r*i*l+s*a,b=s*i*l-r*a,A=i*r*l-s*a,R=r*r*l+h,S=s*r*l+i*a,I=i*s*l+r*a,C=r*s*l-i*a,P=s*s*l+h;return n[0]=u*E+p*T+m*b,n[1]=c*E+v*T+x*b,n[2]=f*E+g*T+y*b,n[3]=d*E+M*T+w*b,n[4]=u*A+p*R+m*S,n[5]=c*A+v*R+x*S,n[6]=f*A+g*R+y*S,n[7]=d*A+M*R+w*S,n[8]=u*I+p*C+m*P,n[9]=c*I+v*C+x*P,n[10]=f*I+g*C+y*P,n[11]=d*I+M*C+w*P,this},rotateX:function(t){var e=this.val,n=Math.sin(t),i=Math.cos(t),r=e[4],s=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=r*i+h*n,e[5]=s*i+l*n,e[6]=o*i+u*n,e[7]=a*i+c*n,e[8]=h*i-r*n,e[9]=l*i-s*n,e[10]=u*i-o*n,e[11]=c*i-a*n,this},rotateY:function(t){var e=this.val,n=Math.sin(t),i=Math.cos(t),r=e[0],s=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=r*i-h*n,e[1]=s*i-l*n,e[2]=o*i-u*n,e[3]=a*i-c*n,e[8]=r*n+h*i,e[9]=s*n+l*i,e[10]=o*n+u*i,e[11]=a*n+c*i,this},rotateZ:function(t){var e=this.val,n=Math.sin(t),i=Math.cos(t),r=e[0],s=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=r*i+h*n,e[1]=s*i+l*n,e[2]=o*i+u*n,e[3]=a*i+c*n,e[4]=h*i-r*n,e[5]=l*i-s*n,e[6]=u*i-o*n,e[7]=c*i-a*n,this},fromRotationTranslation:function(t,e){var n=this.val,i=t.x,r=t.y,s=t.z,o=t.w,a=i+i,h=r+r,l=s+s,u=i*a,c=i*h,f=i*l,d=r*h,p=r*l,v=s*l,g=o*a,M=o*h,m=o*l;return n[0]=1-(d+v),n[1]=c+m,n[2]=f-M,n[3]=0,n[4]=c-m,n[5]=1-(u+v),n[6]=p+g,n[7]=0,n[8]=f+M,n[9]=p-g,n[10]=1-(u+d),n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,this},fromQuat:function(t){var e=this.val,n=t.x,i=t.y,r=t.z,s=t.w,o=n+n,a=i+i,h=r+r,l=n*o,u=n*a,c=n*h,f=i*a,d=i*h,p=r*h,v=s*o,g=s*a,M=s*h;return e[0]=1-(f+p),e[1]=u+M,e[2]=c-g,e[3]=0,e[4]=u-M,e[5]=1-(l+p),e[6]=d+v,e[7]=0,e[8]=c+g,e[9]=d-v,e[10]=1-(l+f),e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},frustum:function(t,e,n,i,r,s){var o=this.val,a=1/(e-t),h=1/(i-n),l=1/(r-s);return o[0]=2*r*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=2*r*h,o[6]=0,o[7]=0,o[8]=(e+t)*a,o[9]=(i+n)*h,o[10]=(s+r)*l,o[11]=-1,o[12]=0,o[13]=0,o[14]=s*r*2*l,o[15]=0,this},perspective:function(t,e,n,i){var r=this.val,s=1/Math.tan(t/2),o=1/(n-i);return r[0]=s/e,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=s,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=(i+n)*o,r[11]=-1,r[12]=0,r[13]=0,r[14]=2*i*n*o,r[15]=0,this},perspectiveLH:function(t,e,n,i){var r=this.val;return r[0]=2*n/t,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=2*n/e,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=-i/(n-i),r[11]=1,r[12]=0,r[13]=0,r[14]=n*i/(n-i),r[15]=0,this},ortho:function(t,e,n,i,r,s){var o=this.val,a=t-e,h=n-i,l=r-s;return a=0===a?a:1/a,h=0===h?h:1/h,l=0===l?l:1/l,o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*l,o[11]=0,o[12]=(t+e)*a,o[13]=(i+n)*h,o[14]=(s+r)*l,o[15]=1,this},lookAt:function(t,e,n){var i=this.val,r=t.x,s=t.y,o=t.z,a=n.x,h=n.y,l=n.z,u=e.x,c=e.y,f=e.z;if(Math.abs(r-u)<1e-6&&Math.abs(s-c)<1e-6&&Math.abs(o-f)<1e-6)return this.identity();var d=r-u,p=s-c,v=o-f,g=1/Math.sqrt(d*d+p*p+v*v),M=h*(v*=g)-l*(p*=g),m=l*(d*=g)-a*v,x=a*p-h*d;(g=Math.sqrt(M*M+m*m+x*x))?(M*=g=1/g,m*=g,x*=g):(M=0,m=0,x=0);var y=p*x-v*m,w=v*M-d*x,E=d*m-p*M;return(g=Math.sqrt(y*y+w*w+E*E))?(y*=g=1/g,w*=g,E*=g):(y=0,w=0,E=0),i[0]=M,i[1]=y,i[2]=d,i[3]=0,i[4]=m,i[5]=w,i[6]=p,i[7]=0,i[8]=x,i[9]=E,i[10]=v,i[11]=0,i[12]=-(M*r+m*s+x*o),i[13]=-(y*r+w*s+E*o),i[14]=-(d*r+p*s+v*o),i[15]=1,this},yawPitchRoll:function(t,e,n){this.zero(),r.zero(),s.zero();var i=this.val,o=r.val,a=s.val,h=Math.sin(n),l=Math.cos(n);return i[10]=1,i[15]=1,i[0]=l,i[1]=h,i[4]=-h,i[5]=l,h=Math.sin(e),l=Math.cos(e),o[0]=1,o[15]=1,o[5]=l,o[10]=l,o[9]=-h,o[6]=h,h=Math.sin(t),l=Math.cos(t),a[5]=1,a[15]=1,a[0]=l,a[2]=-h,a[8]=h,a[10]=l,this.multiplyLocal(r),this.multiplyLocal(s),this},setWorldMatrix:function(t,e,n,i,o){return this.yawPitchRoll(t.y,t.x,t.z),r.scaling(n.x,n.y,n.z),s.xyz(e.x,e.y,e.z),this.multiplyLocal(r),this.multiplyLocal(s),void 0!==i&&this.multiplyLocal(i),void 0!==o&&this.multiplyLocal(o),this}}),r=new i,s=new i;t.exports=i},function(t,e,n){var i=n(0),r=n(10),s=n(26),o=new Int8Array([1,2,0]),a=new Float32Array([0,0,0]),h=new r(1,0,0),l=new r(0,1,0),u=new r,c=new s,f=new i({initialize:function(t,e,n,i){"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=n||0,this.w=i||0)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},set:function(t,e,n,i){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=n||0,this.w=i||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,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,n=this.z,i=this.w;return Math.sqrt(t*t+e*e+n*n+i*i)},lengthSq:function(){var t=this.x,e=this.y,n=this.z,i=this.w;return t*t+e*e+n*n+i*i},normalize:function(){var t=this.x,e=this.y,n=this.z,i=this.w,r=t*t+e*e+n*n+i*i;return r>0&&(r=1/Math.sqrt(r),this.x=t*r,this.y=e*r,this.z=n*r,this.w=i*r),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 n=this.x,i=this.y,r=this.z,s=this.w;return this.x=n+e*(t.x-n),this.y=i+e*(t.y-i),this.z=r+e*(t.z-r),this.w=s+e*(t.w-s),this},rotationTo:function(t,e){var n=t.x*e.x+t.y*e.y+t.z*e.z;return n<-.999999?(u.copy(h).cross(t).length()<1e-6&&u.copy(l).cross(t),u.normalize(),this.setAxisAngle(u,Math.PI)):n>.999999?(this.x=0,this.y=0,this.z=0,this.w=1,this):(u.copy(t).cross(e),this.x=u.x,this.y=u.y,this.z=u.z,this.w=1+n,this.normalize())},setAxes:function(t,e,n){var i=c.val;return i[0]=e.x,i[3]=e.y,i[6]=e.z,i[1]=n.x,i[4]=n.y,i[7]=n.z,i[2]=-t.x,i[5]=-t.y,i[8]=-t.z,this.fromMat3(c).normalize()},identity:function(){return this.x=0,this.y=0,this.z=0,this.w=1,this},setAxisAngle:function(t,e){e*=.5;var n=Math.sin(e);return this.x=n*t.x,this.y=n*t.y,this.z=n*t.z,this.w=Math.cos(e),this},multiply:function(t){var e=this.x,n=this.y,i=this.z,r=this.w,s=t.x,o=t.y,a=t.z,h=t.w;return this.x=e*h+r*s+n*a-i*o,this.y=n*h+r*o+i*s-e*a,this.z=i*h+r*a+e*o-n*s,this.w=r*h-e*s-n*o-i*a,this},slerp:function(t,e){var n=this.x,i=this.y,r=this.z,s=this.w,o=t.x,a=t.y,h=t.z,l=t.w,u=n*o+i*a+r*h+s*l;u<0&&(u=-u,o=-o,a=-a,h=-h,l=-l);var c=1-e,f=e;if(1-u>1e-6){var d=Math.acos(u),p=Math.sin(d);c=Math.sin((1-e)*d)/p,f=Math.sin(e*d)/p}return this.x=c*n+f*o,this.y=c*i+f*a,this.z=c*r+f*h,this.w=c*s+f*l,this},invert:function(){var t=this.x,e=this.y,n=this.z,i=this.w,r=t*t+e*e+n*n+i*i,s=r?1/r:0;return this.x=-t*s,this.y=-e*s,this.z=-n*s,this.w=i*s,this},conjugate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},rotateX:function(t){t*=.5;var e=this.x,n=this.y,i=this.z,r=this.w,s=Math.sin(t),o=Math.cos(t);return this.x=e*o+r*s,this.y=n*o+i*s,this.z=i*o-n*s,this.w=r*o-e*s,this},rotateY:function(t){t*=.5;var e=this.x,n=this.y,i=this.z,r=this.w,s=Math.sin(t),o=Math.cos(t);return this.x=e*o-i*s,this.y=n*o+r*s,this.z=i*o+e*s,this.w=r*o-n*s,this},rotateZ:function(t){t*=.5;var e=this.x,n=this.y,i=this.z,r=this.w,s=Math.sin(t),o=Math.cos(t);return this.x=e*o+n*s,this.y=n*o-e*s,this.z=i*o+r*s,this.w=r*o-i*s,this},calculateW:function(){var t=this.x,e=this.y,n=this.z;return this.w=-Math.sqrt(1-t*t-e*e-n*n),this},fromMat3:function(t){var e,n=t.val,i=n[0]+n[4]+n[8];if(i>0)e=Math.sqrt(i+1),this.w=.5*e,e=.5/e,this.x=(n[7]-n[5])*e,this.y=(n[2]-n[6])*e,this.z=(n[3]-n[1])*e;else{var r=0;n[4]>n[0]&&(r=1),n[8]>n[3*r+r]&&(r=2);var s=o[r],h=o[s];e=Math.sqrt(n[3*r+r]-n[3*s+s]-n[3*h+h]+1),a[r]=.5*e,e=.5/e,a[s]=(n[3*s+r]+n[3*r+s])*e,a[h]=(n[3*h+r]+n[3*r+h])*e,this.x=a[0],this.y=a[1],this.z=a[2],this.w=(n[3*h+s]-n[3*s+h])*e}return this}});t.exports=f},function(t,e,n){var i=n(14),r=n(30);t.exports=function(t,e){var n=void 0===t?r():i({},t);if(e)for(var s in e)void 0!==e[s]&&(n[s]=e[s]);return n}},function(t,e){t.exports=function(t,e,n,i,r){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===n&&(n=""),void 0===i&&(i=""),void 0===r&&(r=0),{responseType:t,async:e,user:n,password:i,timeout:r,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0}}},function(t,e){t.exports=function(){}},function(t,e,n){var i=n(33),r=n(0),s=n(11),o=n(143),a=n(144),h=n(166),l=n(167),u=n(185),c=new r({Extends:a,initialize:function(t,e){a.call(this,t,e);var n=e.game;this.isWebGL=2===n.config.renderType,this.cache=n.cache.addCustom("spine"),this.spineTextures=n.cache.addCustom("spineTextures"),this.json=n.cache.json,this.textures=n.textures,this.drawDebug=!1,this.gl,this.renderer,this.sceneRenderer,this.skeletonRenderer,this.skeletonDebugRenderer,this.plugin=h,this.temp1,this.temp2,this.isWebGL?(this.runtime=h.webgl,this.renderer=n.renderer,this.gl=n.renderer.gl,this.getAtlas=this.getAtlasWebGL):(this.runtime=h.canvas,this.renderer=n.renderer,this.getAtlas=this.getAtlasCanvas);var r=this;e.registerFileType("spine",this.spineFileCallback,t),e.registerGameObject("spine",function(t,e,n,i,s){var o=new u(this.scene,r,t,e,n,i,s);return this.displayList.add(o),this.updateList.add(o),o},function(t,e){void 0===t&&(t={});var n=s(t,"key",null),o=s(t,"animationName",null),a=s(t,"loop",!1),h=new u(this.scene,r,0,0,n,o,a);void 0!==e&&(t.add=e),i(this.scene,h,t);var l=s(t,"skinName",!1);l&&h.setSkinByName(l);var c=s(t,"slotName",!1),f=s(t,"attachmentName",null);return c&&h.setAttachment(c,f),h.refresh()})},boot:function(){this.isWebGL?(this.bootWebGL(),this.onResize(),this.game.scale.on(o,this.onResize,this)):this.bootCanvas();var t=this.systems.events;t.once("shutdown",this.shutdown,this),t.once("destroy",this.destroy,this)},bootCanvas:function(){this.skeletonRenderer=new h.canvas.SkeletonRenderer(this.scene.sys.context)},bootWebGL:function(){this.sceneRenderer=new h.webgl.SceneRenderer(this.renderer.canvas,this.gl,!0);var t=function(t,e){if(t!==this.srcBlend||e!==this.dstBlend){var n=this.context.gl;this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),n.blendFunc(this.srcBlend,this.dstBlend))}};this.sceneRenderer.batcher.setBlendMode=t,this.sceneRenderer.shapes.setBlendMode=t,this.skeletonRenderer=this.sceneRenderer.skeletonRenderer,this.skeletonDebugRenderer=this.sceneRenderer.skeletonDebugRenderer,this.temp1=new h.webgl.Vector3(0,0,0),this.temp2=new h.webgl.Vector3(0,0,0)},getAtlasCanvas:function(t){var e=this.cache.get(t);if(e){var n,i=this.spineTextures;if(i.has(t))n=i.get(t);else{var r=this.textures;n=new h.TextureAtlas(e.data,function(t){return new h.canvas.CanvasTexture(r.get(t).getSourceImage())})}return n}console.warn("No atlas data for: "+t)},getAtlasWebGL:function(t){var e=this.cache.get(t);if(e){var n,i=this.spineTextures;if(i.has(t))n=i.get(t);else{var r=this.textures,s=this.sceneRenderer.context.gl;s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),n=new h.TextureAtlas(e.data,function(t){return new h.webgl.GLTexture(s,r.get(t).getSourceImage(),!1)})}return n}console.warn("No atlas data for: "+t)},spineFileCallback:function(t,e,n,i,r,s){var o;if(Array.isArray(t))for(var a=0;a=i.PI2-n?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=n:e=1?1:1/e*(1+(e*t|0))}},function(t,e,n){t.exports={Ceil:n(94),Equal:n(95),Floor:n(96),GreaterThan:n(97),LessThan:n(98)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.ceil(t-e)}},function(t,e){t.exports=function(t,e,n){return void 0===n&&(n=1e-4),Math.abs(t-e)e-n}},function(t,e){t.exports=function(t,e,n){return void 0===n&&(n=1e-4),t1?t[n]-(i(r-n,t[n],t[n],t[n-1],t[n-1])-t[n]):i(r-s,t[s?s-1:0],t[s],t[n1?i(t[n],t[n-1],n-r):i(t[s],t[s+1>n?n:s+1],r-s)}},function(t,e){t.exports=function(t,e,n,i){return function(t,e){var n=1-t;return n*n*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,n)+function(t,e){return t*t*e}(t,i)}},function(t,e,n){var i=n(23);t.exports=function(t,e,n){return e+(n-e)*i(t,0,1)}},function(t,e,n){var i=n(24);t.exports=function(t,e,n){return e+(n-e)*i(t,0,1)}},function(t,e,n){t.exports={GetNext:n(108),IsSize:n(109),IsValue:n(110)}},function(t,e){t.exports=function(t){var e=Math.log(t)/.6931471805599453;return 1<0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e){t.exports=function(t){return t>0&&0==(t&t-1)}},function(t,e,n){t.exports={Ceil:n(112),Floor:n(113),To:n(114)}},function(t,e){t.exports=function(t,e,n,i){return void 0===n&&(n=0),0===e?t:(t-=n,t=e*Math.ceil(t/e),i?(n+t)/e:n+t)}},function(t,e){t.exports=function(t,e,n,i){return void 0===n&&(n=0),0===e?t:(t-=n,t=e*Math.floor(t/e),i?(n+t)/e:n+t)}},function(t,e){t.exports=function(t,e,n,i){return void 0===n&&(n=0),0===e?t:(t-=n,t=e*Math.round(t/e),i?(n+t)/e:n+t)}},function(t,e,n){var i=new(n(0))({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,n=this.n;t=t.toString();for(var i=0;i>>0,n=(e*=n)>>>0,n+=4294967296*(e-=n);return this.n=n,2.3283064365386963e-10*(n>>>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 n=Math.floor(this.frac()*(e+1)),i=t[n];t[n]=t[e],t[e]=i}return t}});t.exports=i},function(t,e){t.exports=function(t){for(var e=0,n=0;n1?void 0!==i?(r=(i-t)/(i-n))<0&&(r=0):r=1:r<0&&(r=0),r}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var n=2*Math.random()*Math.PI;return t.x=Math.cos(n)*e,t.y=Math.sin(n)*e,t}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var n=2*Math.random()*Math.PI,i=2*Math.random()-1,r=Math.sqrt(1-i*i)*e;return t.x=Math.cos(n)*r,t.y=Math.sin(n)*r,t.z=i*e,t}},function(t,e){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}},function(t,e){t.exports=function(t,e){var n=t.x,i=t.y;return t.x=n*Math.cos(e)-i*Math.sin(e),t.y=n*Math.sin(e)+i*Math.cos(e),t}},function(t,e){t.exports=function(t,e,n,i){var r=Math.cos(i),s=Math.sin(i),o=t.x-e,a=t.y-n;return t.x=o*r-a*s+e,t.y=o*s+a*r+n,t}},function(t,e){t.exports=function(t,e,n,i,r){var s=i+Math.atan2(t.y-n,t.x-e);return t.x=e+r*Math.cos(s),t.y=n+r*Math.sin(s),t}},function(t,e){t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},function(t,e){t.exports=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=10);var i=Math.pow(n,-e);return Math.round(t*i)/i}},function(t,e){t.exports=function(t,e,n,i){void 0===e&&(e=1),void 0===n&&(n=1),void 0===i&&(i=1),i*=Math.PI/t;for(var r=[],s=[],o=0;o0&&t<=e*n&&(s=t>e-1?t-(o=Math.floor(t/e))*e:t,r.set(s,o)),r}},function(t,e,n){var i=n(5);t.exports=function(t,e,n,r,s,o,a,h){void 0===h&&(h=new i);var l=Math.sin(s),u=Math.cos(s),c=u*o,f=l*o,d=-l*a,p=u*a,v=1/(c*p+d*-f);return h.x=p*v*t+-d*v*e+(r*d-n*p)*v,h.y=c*v*e+-f*v*t+(-r*c+n*f)*v,h}},function(t,e){t.exports=function(t,e,n){return Math.abs(t-e)<=n}},function(t,e,n){var i=new(n(0))({initialize:function(t,e,n,i){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=n||0,this.w=i||0)},clone:function(){return new i(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,n,i){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=n||0,this.w=i||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,n=this.z,i=this.w;return Math.sqrt(t*t+e*e+n*n+i*i)},lengthSq:function(){var t=this.x,e=this.y,n=this.z,i=this.w;return t*t+e*e+n*n+i*i},normalize:function(){var t=this.x,e=this.y,n=this.z,i=this.w,r=t*t+e*e+n*n+i*i;return r>0&&(r=1/Math.sqrt(r),this.x=t*r,this.y=e*r,this.z=n*r,this.w=i*r),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 n=this.x,i=this.y,r=this.z,s=this.w;return this.x=n+e*(t.x-n),this.y=i+e*(t.y-i),this.z=r+e*(t.z-r),this.w=s+e*(t.w-s),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,n=t.y-this.y,i=t.z-this.z||0,r=t.w-this.w||0;return Math.sqrt(e*e+n*n+i*i+r*r)},distanceSq:function(t){var e=t.x-this.x,n=t.y-this.y,i=t.z-this.z||0,r=t.w-this.w||0;return e*e+n*n+i*i+r*r},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,n=this.y,i=this.z,r=this.w,s=t.val;return this.x=s[0]*e+s[4]*n+s[8]*i+s[12]*r,this.y=s[1]*e+s[5]*n+s[9]*i+s[13]*r,this.z=s[2]*e+s[6]*n+s[10]*i+s[14]*r,this.w=s[3]*e+s[7]*n+s[11]*i+s[15]*r,this},transformQuat:function(t){var e=this.x,n=this.y,i=this.z,r=t.x,s=t.y,o=t.z,a=t.w,h=a*e+s*i-o*n,l=a*n+o*e-r*i,u=a*i+r*n-s*e,c=-r*e-s*n-o*i;return this.x=h*a+c*-r+l*-o-u*-s,this.y=l*a+c*-s+u*-r-h*-o,this.z=u*a+c*-o+h*-s-l*-r,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});i.prototype.sub=i.prototype.subtract,i.prototype.mul=i.prototype.multiply,i.prototype.div=i.prototype.divide,i.prototype.dist=i.prototype.distance,i.prototype.distSq=i.prototype.distanceSq,i.prototype.len=i.prototype.length,i.prototype.lenSq=i.prototype.lengthSq,t.exports=i},function(t,e,n){var i=n(10),r=n(27),s=n(28),o=new r,a=new s,h=new i;t.exports=function(t,e,n){return a.setAxisAngle(e,n),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},function(t,e){t.exports="resize"},function(t,e,n){var i=n(145),r=n(0),s=n(146),o=new r({Extends:i,initialize:function(t,e){i.call(this,e),this.scene=t,this.systems=t.sys,t.sys.events.once(s.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=o},function(t,e,n){var i=new(n(0))({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=i},function(t,e,n){t.exports={BOOT:n(147),CREATE:n(148),DESTROY:n(149),PAUSE:n(150),POST_UPDATE:n(151),PRE_UPDATE:n(152),READY:n(153),RENDER:n(154),RESUME:n(155),SHUTDOWN:n(156),SLEEP:n(157),START:n(158),TRANSITION_COMPLETE:n(159),TRANSITION_INIT:n(160),TRANSITION_OUT:n(161),TRANSITION_START:n(162),TRANSITION_WAKE:n(163),UPDATE:n(164),WAKE:n(165)}},function(t,e){t.exports="boot"},function(t,e){t.exports="create"},function(t,e){t.exports="destroy"},function(t,e){t.exports="pause"},function(t,e){t.exports="postupdate"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="ready"},function(t,e){t.exports="render"},function(t,e){t.exports="resume"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="sleep"},function(t,e){t.exports="start"},function(t,e){t.exports="transitioncomplete"},function(t,e){t.exports="transitioninit"},function(t,e){t.exports="transitionout"},function(t,e){t.exports="transitionstart"},function(t,e){t.exports="transitionwake"},function(t,e){t.exports="update"},function(t,e){t.exports="wake"},function(t,e){(function(){var e,n,i,r=this&&this.__extends||(e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,n)},function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)});!function(t){var e,n,i,s=function(){function t(t,e,n){if(null==t)throw new Error("name cannot be null.");if(null==e)throw new Error("timelines cannot be null.");this.name=t,this.timelines=e,this.timelineIds=[];for(var i=0;i0&&(e%=this.duration));for(var h=this.timelines,l=0,u=h.length;l>>1;;){if(t[(s+1)*n]<=e?i=s+1:r=s,i==r)return(i+1)*n;s=i+r>>>1}},t.linearSearch=function(t,e,n){for(var i=0,r=t.length-n;i<=r;i+=n)if(t[i]>e)return i;return-1},t}();t.Animation=s,function(t){t[t.setup=0]="setup",t[t.first=1]="first",t[t.replace=2]="replace",t[t.add=3]="add"}(e=t.MixBlend||(t.MixBlend={})),function(t){t[t.mixIn=0]="mixIn",t[t.mixOut=1]="mixOut"}(n=t.MixDirection||(t.MixDirection={})),function(t){t[t.rotate=0]="rotate",t[t.translate=1]="translate",t[t.scale=2]="scale",t[t.shear=3]="shear",t[t.attachment=4]="attachment",t[t.color=5]="color",t[t.deform=6]="deform",t[t.event=7]="event",t[t.drawOrder=8]="drawOrder",t[t.ikConstraint=9]="ikConstraint",t[t.transformConstraint=10]="transformConstraint",t[t.pathConstraintPosition=11]="pathConstraintPosition",t[t.pathConstraintSpacing=12]="pathConstraintSpacing",t[t.pathConstraintMix=13]="pathConstraintMix",t[t.twoColor=14]="twoColor"}(i=t.TimelineType||(t.TimelineType={}));var o=function(){function e(n){if(n<=0)throw new Error("frameCount must be > 0: "+n);this.curves=t.Utils.newFloatArray((n-1)*e.BEZIER_SIZE)}return e.prototype.getFrameCount=function(){return this.curves.length/e.BEZIER_SIZE+1},e.prototype.setLinear=function(t){this.curves[t*e.BEZIER_SIZE]=e.LINEAR},e.prototype.setStepped=function(t){this.curves[t*e.BEZIER_SIZE]=e.STEPPED},e.prototype.getCurveType=function(t){var n=t*e.BEZIER_SIZE;if(n==this.curves.length)return e.LINEAR;var i=this.curves[n];return i==e.LINEAR?e.LINEAR:i==e.STEPPED?e.STEPPED:e.BEZIER},e.prototype.setCurve=function(t,n,i,r,s){var o=.03*(2*-n+r),a=.03*(2*-i+s),h=.006*(3*(n-r)+1),l=.006*(3*(i-s)+1),u=2*o+h,c=2*a+l,f=.3*n+o+.16666667*h,d=.3*i+a+.16666667*l,p=t*e.BEZIER_SIZE,v=this.curves;v[p++]=e.BEZIER;for(var g=f,M=d,m=p+e.BEZIER_SIZE-1;p=i){var u=void 0,c=void 0;return s==h?(u=0,c=0):(u=r[s-2],c=r[s-1]),c+(r[s+1]-c)*(i-u)/(a-u)}var f=r[s-1];return f+(1-f)*(i-a)/(1-a)},e.LINEAR=0,e.STEPPED=1,e.BEZIER=2,e.BEZIER_SIZE=19,e}();t.CurveTimeline=o;var a=function(n){function o(e){var i=n.call(this,e)||this;return i.frames=t.Utils.newFloatArray(e<<1),i}return r(o,n),o.prototype.getPropertyId=function(){return(i.rotate<<24)+this.boneIndex},o.prototype.setFrame=function(t,e,n){t<<=1,this.frames[t]=e,this.frames[t+o.ROTATION]=n},o.prototype.apply=function(t,n,i,r,a,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(c.active)if(i=u[u.length-o.ENTRIES]){var d=u[u.length+o.PREV_ROTATION];switch(h){case e.setup:c.rotation=c.data.rotation+d*a;break;case e.first:case e.replace:d+=c.data.rotation-c.rotation,d-=360*(16384-(16384.499999999996-d/360|0));case e.add:c.rotation+=d*a}}else{var p=s.binarySearch(u,i,o.ENTRIES),v=u[p+o.PREV_ROTATION],g=u[p],M=this.getCurvePercent((p>>1)-1,1-(i-g)/(u[p+o.PREV_TIME]-g)),m=u[p+o.ROTATION]-v;switch(m=v+(m-360*(16384-(16384.499999999996-m/360|0)))*M,h){case e.setup:c.rotation=c.data.rotation+(m-360*(16384-(16384.499999999996-m/360|0)))*a;break;case e.first:case e.replace:m+=c.data.rotation-c.rotation;case e.add:c.rotation+=(m-360*(16384-(16384.499999999996-m/360|0)))*a}}},o.ENTRIES=2,o.PREV_TIME=-2,o.PREV_ROTATION=-1,o.ROTATION=1,o}(o);t.RotateTimeline=a;var h=function(n){function o(e){var i=n.call(this,e)||this;return i.frames=t.Utils.newFloatArray(e*o.ENTRIES),i}return r(o,n),o.prototype.getPropertyId=function(){return(i.translate<<24)+this.boneIndex},o.prototype.setFrame=function(t,e,n,i){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.X]=n,this.frames[t+o.Y]=i},o.prototype.apply=function(t,n,i,r,a,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(c.active)if(i=u[u.length-o.ENTRIES])f=u[u.length+o.PREV_X],d=u[u.length+o.PREV_Y];else{var p=s.binarySearch(u,i,o.ENTRIES);f=u[p+o.PREV_X],d=u[p+o.PREV_Y];var v=u[p],g=this.getCurvePercent(p/o.ENTRIES-1,1-(i-v)/(u[p+o.PREV_TIME]-v));f+=(u[p+o.X]-f)*g,d+=(u[p+o.Y]-d)*g}switch(h){case e.setup:c.x=c.data.x+f*a,c.y=c.data.y+d*a;break;case e.first:case e.replace:c.x+=(c.data.x+f-c.x)*a,c.y+=(c.data.y+d-c.y)*a;break;case e.add:c.x+=f*a,c.y+=d*a}}},o.ENTRIES=3,o.PREV_TIME=-3,o.PREV_X=-2,o.PREV_Y=-1,o.X=1,o.Y=2,o}(o);t.TranslateTimeline=h;var l=function(o){function a(t){return o.call(this,t)||this}return r(a,o),a.prototype.getPropertyId=function(){return(i.scale<<24)+this.boneIndex},a.prototype.apply=function(i,r,o,h,l,u,c){var f=this.frames,d=i.bones[this.boneIndex];if(d.active)if(o=f[f.length-a.ENTRIES])p=f[f.length+a.PREV_X]*d.data.scaleX,v=f[f.length+a.PREV_Y]*d.data.scaleY;else{var g=s.binarySearch(f,o,a.ENTRIES);p=f[g+a.PREV_X],v=f[g+a.PREV_Y];var M=f[g],m=this.getCurvePercent(g/a.ENTRIES-1,1-(o-M)/(f[g+a.PREV_TIME]-M));p=(p+(f[g+a.X]-p)*m)*d.data.scaleX,v=(v+(f[g+a.Y]-v)*m)*d.data.scaleY}if(1==l)u==e.add?(d.scaleX+=p-d.data.scaleX,d.scaleY+=v-d.data.scaleY):(d.scaleX=p,d.scaleY=v);else{var x=0,y=0;if(c==n.mixOut)switch(u){case e.setup:x=d.data.scaleX,y=d.data.scaleY,d.scaleX=x+(Math.abs(p)*t.MathUtils.signum(x)-x)*l,d.scaleY=y+(Math.abs(v)*t.MathUtils.signum(y)-y)*l;break;case e.first:case e.replace:x=d.scaleX,y=d.scaleY,d.scaleX=x+(Math.abs(p)*t.MathUtils.signum(x)-x)*l,d.scaleY=y+(Math.abs(v)*t.MathUtils.signum(y)-y)*l;break;case e.add:x=d.scaleX,y=d.scaleY,d.scaleX=x+(Math.abs(p)*t.MathUtils.signum(x)-d.data.scaleX)*l,d.scaleY=y+(Math.abs(v)*t.MathUtils.signum(y)-d.data.scaleY)*l}else switch(u){case e.setup:x=Math.abs(d.data.scaleX)*t.MathUtils.signum(p),y=Math.abs(d.data.scaleY)*t.MathUtils.signum(v),d.scaleX=x+(p-x)*l,d.scaleY=y+(v-y)*l;break;case e.first:case e.replace:x=Math.abs(d.scaleX)*t.MathUtils.signum(p),y=Math.abs(d.scaleY)*t.MathUtils.signum(v),d.scaleX=x+(p-x)*l,d.scaleY=y+(v-y)*l;break;case e.add:x=t.MathUtils.signum(p),y=t.MathUtils.signum(v),d.scaleX=Math.abs(d.scaleX)*x+(p-Math.abs(d.data.scaleX)*x)*l,d.scaleY=Math.abs(d.scaleY)*y+(v-Math.abs(d.data.scaleY)*y)*l}}}},a}(h);t.ScaleTimeline=l;var u=function(t){function n(e){return t.call(this,e)||this}return r(n,t),n.prototype.getPropertyId=function(){return(i.shear<<24)+this.boneIndex},n.prototype.apply=function(t,i,r,o,a,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(c.active)if(r=u[u.length-n.ENTRIES])f=u[u.length+n.PREV_X],d=u[u.length+n.PREV_Y];else{var p=s.binarySearch(u,r,n.ENTRIES);f=u[p+n.PREV_X],d=u[p+n.PREV_Y];var v=u[p],g=this.getCurvePercent(p/n.ENTRIES-1,1-(r-v)/(u[p+n.PREV_TIME]-v));f+=(u[p+n.X]-f)*g,d+=(u[p+n.Y]-d)*g}switch(h){case e.setup:c.shearX=c.data.shearX+f*a,c.shearY=c.data.shearY+d*a;break;case e.first:case e.replace:c.shearX+=(c.data.shearX+f-c.shearX)*a,c.shearY+=(c.data.shearY+d-c.shearY)*a;break;case e.add:c.shearX+=f*a,c.shearY+=d*a}}},n}(h);t.ShearTimeline=u;var c=function(n){function o(e){var i=n.call(this,e)||this;return i.frames=t.Utils.newFloatArray(e*o.ENTRIES),i}return r(o,n),o.prototype.getPropertyId=function(){return(i.color<<24)+this.slotIndex},o.prototype.setFrame=function(t,e,n,i,r,s){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.R]=n,this.frames[t+o.G]=i,this.frames[t+o.B]=r,this.frames[t+o.A]=s},o.prototype.apply=function(t,n,i,r,a,h,l){var u=t.slots[this.slotIndex];if(u.bone.active){var c=this.frames;if(i=c[c.length-o.ENTRIES]){var m=c.length;p=c[m+o.PREV_R],v=c[m+o.PREV_G],g=c[m+o.PREV_B],M=c[m+o.PREV_A]}else{var x=s.binarySearch(c,i,o.ENTRIES);p=c[x+o.PREV_R],v=c[x+o.PREV_G],g=c[x+o.PREV_B],M=c[x+o.PREV_A];var y=c[x],w=this.getCurvePercent(x/o.ENTRIES-1,1-(i-y)/(c[x+o.PREV_TIME]-y));p+=(c[x+o.R]-p)*w,v+=(c[x+o.G]-v)*w,g+=(c[x+o.B]-g)*w,M+=(c[x+o.A]-M)*w}if(1==a)u.color.set(p,v,g,M);else{f=u.color;h==e.setup&&f.setFromColor(u.data.color),f.add((p-f.r)*a,(v-f.g)*a,(g-f.b)*a,(M-f.a)*a)}}}},o.ENTRIES=5,o.PREV_TIME=-5,o.PREV_R=-4,o.PREV_G=-3,o.PREV_B=-2,o.PREV_A=-1,o.R=1,o.G=2,o.B=3,o.A=4,o}(o);t.ColorTimeline=c;var f=function(n){function o(e){var i=n.call(this,e)||this;return i.frames=t.Utils.newFloatArray(e*o.ENTRIES),i}return r(o,n),o.prototype.getPropertyId=function(){return(i.twoColor<<24)+this.slotIndex},o.prototype.setFrame=function(t,e,n,i,r,s,a,h,l){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.R]=n,this.frames[t+o.G]=i,this.frames[t+o.B]=r,this.frames[t+o.A]=s,this.frames[t+o.R2]=a,this.frames[t+o.G2]=h,this.frames[t+o.B2]=l},o.prototype.apply=function(t,n,i,r,a,h,l){var u=t.slots[this.slotIndex];if(u.bone.active){var c=this.frames;if(i=c[c.length-o.ENTRIES]){var T=c.length;g=c[T+o.PREV_R],M=c[T+o.PREV_G],m=c[T+o.PREV_B],x=c[T+o.PREV_A],y=c[T+o.PREV_R2],w=c[T+o.PREV_G2],E=c[T+o.PREV_B2]}else{var b=s.binarySearch(c,i,o.ENTRIES);g=c[b+o.PREV_R],M=c[b+o.PREV_G],m=c[b+o.PREV_B],x=c[b+o.PREV_A],y=c[b+o.PREV_R2],w=c[b+o.PREV_G2],E=c[b+o.PREV_B2];var A=c[b],R=this.getCurvePercent(b/o.ENTRIES-1,1-(i-A)/(c[b+o.PREV_TIME]-A));g+=(c[b+o.R]-g)*R,M+=(c[b+o.G]-M)*R,m+=(c[b+o.B]-m)*R,x+=(c[b+o.A]-x)*R,y+=(c[b+o.R2]-y)*R,w+=(c[b+o.G2]-w)*R,E+=(c[b+o.B2]-E)*R}if(1==a)u.color.set(g,M,m,x),u.darkColor.set(y,w,E,1);else{f=u.color,d=u.darkColor;h==e.setup&&(f.setFromColor(u.data.color),d.setFromColor(u.data.darkColor)),f.add((g-f.r)*a,(M-f.g)*a,(m-f.b)*a,(x-f.a)*a),d.add((y-d.r)*a,(w-d.g)*a,(E-d.b)*a,0)}}}},o.ENTRIES=8,o.PREV_TIME=-8,o.PREV_R=-7,o.PREV_G=-6,o.PREV_B=-5,o.PREV_A=-4,o.PREV_R2=-3,o.PREV_G2=-2,o.PREV_B2=-1,o.R=1,o.G=2,o.B=3,o.A=4,o.R2=5,o.G2=6,o.B2=7,o}(o);t.TwoColorTimeline=f;var d=function(){function r(e){this.frames=t.Utils.newFloatArray(e),this.attachmentNames=new Array(e)}return r.prototype.getPropertyId=function(){return(i.attachment<<24)+this.slotIndex},r.prototype.getFrameCount=function(){return this.frames.length},r.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.attachmentNames[t]=n},r.prototype.apply=function(t,i,r,o,a,h,l){var u=t.slots[this.slotIndex];if(u.bone.active)if(l!=n.mixOut||h!=e.setup){var c=this.frames;if(r=c[c.length-1]?c.length-1:s.binarySearch(c,r,1)-1;var p=this.attachmentNames[d];t.slots[this.slotIndex].setAttachment(null==p?null:t.getAttachment(this.slotIndex,p))}}else{var v=u.data.attachmentName;u.setAttachment(null==v?null:t.getAttachment(this.slotIndex,v))}},r}();t.AttachmentTimeline=d;var p=null,v=function(n){function o(e){var i=n.call(this,e)||this;return i.frames=t.Utils.newFloatArray(e),i.frameVertices=new Array(e),null==p&&(p=t.Utils.newFloatArray(64)),i}return r(o,n),o.prototype.getPropertyId=function(){return(i.deform<<27)+ +this.attachment.id+this.slotIndex},o.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.frameVertices[t]=n},o.prototype.apply=function(n,i,r,o,a,h,l){var u=n.slots[this.slotIndex];if(u.bone.active){var c=u.getAttachment();if(c instanceof t.VertexAttachment&&c.deformAttachment==this.attachment){var f=u.deform;0==f.length&&(h=e.setup);var d=this.frameVertices,p=d[0].length,v=this.frames;if(r=v[v.length-1]){var w=d[v.length-1];if(1==a)if(h==e.add)if(null==(g=c).bones){m=g.vertices;for(var E=0;En)this.apply(t,e,Number.MAX_VALUE,i,r,o,a),e=-1;else if(e>=h[l-1])return;if(!(n0&&h[u-1]==c;)u--;for(;u=h[u];u++)i.push(this.events[u])}}},e}();t.EventTimeline=g;var M=function(){function r(e){this.frames=t.Utils.newFloatArray(e),this.drawOrders=new Array(e)}return r.prototype.getPropertyId=function(){return i.drawOrder<<24},r.prototype.getFrameCount=function(){return this.frames.length},r.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.drawOrders[t]=n},r.prototype.apply=function(i,r,o,a,h,l,u){var c=i.drawOrder,f=i.slots;if(u!=n.mixOut||l!=e.setup){var d=this.frames;if(o=d[d.length-1]?d.length-1:s.binarySearch(d,o)-1;var v=this.drawOrders[p];if(null==v)t.Utils.arrayCopy(f,0,c,0,f.length);else for(var g=0,M=v.length;g=c[c.length-a.ENTRIES])l==e.setup?(f.mix=f.data.mix+(c[c.length+a.PREV_MIX]-f.data.mix)*h,f.softness=f.data.softness+(c[c.length+a.PREV_SOFTNESS]-f.data.softness)*h,u==n.mixOut?(f.bendDirection=f.data.bendDirection,f.compress=f.data.compress,f.stretch=f.data.stretch):(f.bendDirection=c[c.length+a.PREV_BEND_DIRECTION],f.compress=0!=c[c.length+a.PREV_COMPRESS],f.stretch=0!=c[c.length+a.PREV_STRETCH])):(f.mix+=(c[c.length+a.PREV_MIX]-f.mix)*h,f.softness+=(c[c.length+a.PREV_SOFTNESS]-f.softness)*h,u==n.mixIn&&(f.bendDirection=c[c.length+a.PREV_BEND_DIRECTION],f.compress=0!=c[c.length+a.PREV_COMPRESS],f.stretch=0!=c[c.length+a.PREV_STRETCH]));else{var d=s.binarySearch(c,r,a.ENTRIES),p=c[d+a.PREV_MIX],v=c[d+a.PREV_SOFTNESS],g=c[d],M=this.getCurvePercent(d/a.ENTRIES-1,1-(r-g)/(c[d+a.PREV_TIME]-g));l==e.setup?(f.mix=f.data.mix+(p+(c[d+a.MIX]-p)*M-f.data.mix)*h,f.softness=f.data.softness+(v+(c[d+a.SOFTNESS]-v)*M-f.data.softness)*h,u==n.mixOut?(f.bendDirection=f.data.bendDirection,f.compress=f.data.compress,f.stretch=f.data.stretch):(f.bendDirection=c[d+a.PREV_BEND_DIRECTION],f.compress=0!=c[d+a.PREV_COMPRESS],f.stretch=0!=c[d+a.PREV_STRETCH])):(f.mix+=(p+(c[d+a.MIX]-p)*M-f.mix)*h,f.softness+=(v+(c[d+a.SOFTNESS]-v)*M-f.softness)*h,u==n.mixIn&&(f.bendDirection=c[d+a.PREV_BEND_DIRECTION],f.compress=0!=c[d+a.PREV_COMPRESS],f.stretch=0!=c[d+a.PREV_STRETCH]))}},a.ENTRIES=6,a.PREV_TIME=-6,a.PREV_MIX=-5,a.PREV_SOFTNESS=-4,a.PREV_BEND_DIRECTION=-3,a.PREV_COMPRESS=-2,a.PREV_STRETCH=-1,a.MIX=1,a.SOFTNESS=2,a.BEND_DIRECTION=3,a.COMPRESS=4,a.STRETCH=5,a}(o);t.IkConstraintTimeline=m;var x=function(n){function o(e){var i=n.call(this,e)||this;return i.frames=t.Utils.newFloatArray(e*o.ENTRIES),i}return r(o,n),o.prototype.getPropertyId=function(){return(i.transformConstraint<<24)+this.transformConstraintIndex},o.prototype.setFrame=function(t,e,n,i,r,s){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.ROTATE]=n,this.frames[t+o.TRANSLATE]=i,this.frames[t+o.SCALE]=r,this.frames[t+o.SHEAR]=s},o.prototype.apply=function(t,n,i,r,a,h,l){var u=this.frames,c=t.transformConstraints[this.transformConstraintIndex];if(c.active)if(i=u[u.length-o.ENTRIES]){var M=u.length;d=u[M+o.PREV_ROTATE],p=u[M+o.PREV_TRANSLATE],v=u[M+o.PREV_SCALE],g=u[M+o.PREV_SHEAR]}else{var m=s.binarySearch(u,i,o.ENTRIES);d=u[m+o.PREV_ROTATE],p=u[m+o.PREV_TRANSLATE],v=u[m+o.PREV_SCALE],g=u[m+o.PREV_SHEAR];var x=u[m],y=this.getCurvePercent(m/o.ENTRIES-1,1-(i-x)/(u[m+o.PREV_TIME]-x));d+=(u[m+o.ROTATE]-d)*y,p+=(u[m+o.TRANSLATE]-p)*y,v+=(u[m+o.SCALE]-v)*y,g+=(u[m+o.SHEAR]-g)*y}if(h==e.setup){f=c.data;c.rotateMix=f.rotateMix+(d-f.rotateMix)*a,c.translateMix=f.translateMix+(p-f.translateMix)*a,c.scaleMix=f.scaleMix+(v-f.scaleMix)*a,c.shearMix=f.shearMix+(g-f.shearMix)*a}else c.rotateMix+=(d-c.rotateMix)*a,c.translateMix+=(p-c.translateMix)*a,c.scaleMix+=(v-c.scaleMix)*a,c.shearMix+=(g-c.shearMix)*a}},o.ENTRIES=5,o.PREV_TIME=-5,o.PREV_ROTATE=-4,o.PREV_TRANSLATE=-3,o.PREV_SCALE=-2,o.PREV_SHEAR=-1,o.ROTATE=1,o.TRANSLATE=2,o.SCALE=3,o.SHEAR=4,o}(o);t.TransformConstraintTimeline=x;var y=function(n){function o(e){var i=n.call(this,e)||this;return i.frames=t.Utils.newFloatArray(e*o.ENTRIES),i}return r(o,n),o.prototype.getPropertyId=function(){return(i.pathConstraintPosition<<24)+this.pathConstraintIndex},o.prototype.setFrame=function(t,e,n){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.VALUE]=n},o.prototype.apply=function(t,n,i,r,a,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(c.active)if(i=u[u.length-o.ENTRIES])f=u[u.length+o.PREV_VALUE];else{var d=s.binarySearch(u,i,o.ENTRIES);f=u[d+o.PREV_VALUE];var p=u[d],v=this.getCurvePercent(d/o.ENTRIES-1,1-(i-p)/(u[d+o.PREV_TIME]-p));f+=(u[d+o.VALUE]-f)*v}h==e.setup?c.position=c.data.position+(f-c.data.position)*a:c.position+=(f-c.position)*a}},o.ENTRIES=2,o.PREV_TIME=-2,o.PREV_VALUE=-1,o.VALUE=1,o}(o);t.PathConstraintPositionTimeline=y;var w=function(t){function n(e){return t.call(this,e)||this}return r(n,t),n.prototype.getPropertyId=function(){return(i.pathConstraintSpacing<<24)+this.pathConstraintIndex},n.prototype.apply=function(t,i,r,o,a,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(c.active)if(r=u[u.length-n.ENTRIES])f=u[u.length+n.PREV_VALUE];else{var d=s.binarySearch(u,r,n.ENTRIES);f=u[d+n.PREV_VALUE];var p=u[d],v=this.getCurvePercent(d/n.ENTRIES-1,1-(r-p)/(u[d+n.PREV_TIME]-p));f+=(u[d+n.VALUE]-f)*v}h==e.setup?c.spacing=c.data.spacing+(f-c.data.spacing)*a:c.spacing+=(f-c.spacing)*a}},n}(y);t.PathConstraintSpacingTimeline=w;var E=function(n){function o(e){var i=n.call(this,e)||this;return i.frames=t.Utils.newFloatArray(e*o.ENTRIES),i}return r(o,n),o.prototype.getPropertyId=function(){return(i.pathConstraintMix<<24)+this.pathConstraintIndex},o.prototype.setFrame=function(t,e,n,i){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.ROTATE]=n,this.frames[t+o.TRANSLATE]=i},o.prototype.apply=function(t,n,i,r,a,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(c.active)if(i=u[u.length-o.ENTRIES])f=u[u.length+o.PREV_ROTATE],d=u[u.length+o.PREV_TRANSLATE];else{var p=s.binarySearch(u,i,o.ENTRIES);f=u[p+o.PREV_ROTATE],d=u[p+o.PREV_TRANSLATE];var v=u[p],g=this.getCurvePercent(p/o.ENTRIES-1,1-(i-v)/(u[p+o.PREV_TIME]-v));f+=(u[p+o.ROTATE]-f)*g,d+=(u[p+o.TRANSLATE]-d)*g}h==e.setup?(c.rotateMix=c.data.rotateMix+(f-c.data.rotateMix)*a,c.translateMix=c.data.translateMix+(d-c.data.translateMix)*a):(c.rotateMix+=(f-c.rotateMix)*a,c.translateMix+=(d-c.translateMix)*a)}},o.ENTRIES=3,o.PREV_TIME=-3,o.PREV_ROTATE=-2,o.PREV_TRANSLATE=-1,o.ROTATE=1,o.TRANSLATE=2,o}(o);t.PathConstraintMixTimeline=E}(i||(i={})),function(t){var e=function(){function e(e){this.tracks=new Array,this.timeScale=1,this.events=new Array,this.listeners=new Array,this.queue=new r(this),this.propertyIDs=new t.IntSet,this.animationsChanged=!1,this.trackEntryPool=new t.Pool(function(){return new n}),this.data=e}return e.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,n=0,i=e.length;n0){if(r.delay-=s,r.delay>0)continue;s=-r.delay,r.delay=0}var o=r.next;if(null!=o){var a=r.trackLast-o.delay;if(a>=0){for(o.delay=0,o.trackTime+=0==r.timeScale?0:(a/r.timeScale+t)*o.timeScale,r.trackTime+=s,this.setCurrent(n,o,!0);null!=o.mixingFrom;)o.mixTime+=t,o=o.mixingFrom;continue}}else if(r.trackLast>=r.trackEnd&&null==r.mixingFrom){e[n]=null,this.queue.end(r),this.disposeNext(r);continue}if(null!=r.mixingFrom&&this.updateMixingFrom(r,t)){var h=r.mixingFrom;for(r.mixingFrom=null,null!=h&&(h.mixingTo=null);null!=h;)this.queue.end(h),h=h.mixingFrom}r.trackTime+=s}}this.queue.drain()},e.prototype.updateMixingFrom=function(t,e){var n=t.mixingFrom;if(null==n)return!0;var i=this.updateMixingFrom(n,e);return n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,t.mixTime>0&&t.mixTime>=t.mixDuration?(0!=n.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=n.mixingFrom,null!=n.mixingFrom&&(n.mixingFrom.mixingTo=t),t.interruptAlpha=n.interruptAlpha,this.queue.end(n)),i):(n.trackTime+=e*n.timeScale,t.mixTime+=e,!1)},e.prototype.apply=function(n){if(null==n)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var i=this.events,r=this.tracks,s=!1,o=0,a=r.length;o0)){s=!0;var l=0==o?t.MixBlend.first:h.mixBlend,u=h.alpha;null!=h.mixingFrom?u*=this.applyMixingFrom(h,n,l):h.trackTime>=h.trackEnd&&null==h.next&&(u=0);var c=h.animationLast,f=h.getAnimationTime(),d=h.animation.timelines.length,p=h.animation.timelines;if(0==o&&1==u||l==t.MixBlend.add)for(var v=0;v1&&(o=1),r!=t.MixBlend.first&&(r=s.mixBlend));var a=o0&&this.queueEvents(s,c),this.events.length=0,s.nextAnimationLast=c,s.nextTrackLast=s.trackTime,o},e.prototype.applyRotateTimeline=function(e,n,i,r,s,o,a,h){if(h&&(o[a]=0),1!=r){var l=e,u=l.frames,c=n.bones[l.boneIndex];if(c.active){var f=0,d=0;if(i=u[u.length-t.RotateTimeline.ENTRIES])d=c.data.rotation+u[u.length+t.RotateTimeline.PREV_ROTATION];else{var p=t.Animation.binarySearch(u,i,t.RotateTimeline.ENTRIES),v=u[p+t.RotateTimeline.PREV_ROTATION],g=u[p],M=l.getCurvePercent((p>>1)-1,1-(i-g)/(u[p+t.RotateTimeline.PREV_TIME]-g));d=u[p+t.RotateTimeline.ROTATION]-v,d=v+(d-=360*(16384-(16384.499999999996-d/360|0)))*M+c.data.rotation,d-=360*(16384-(16384.499999999996-d/360|0))}var m=0,x=d-f;if(0==(x-=360*(16384-(16384.499999999996-x/360|0))))m=o[a];else{var y=0,w=0;h?(y=0,w=x):(y=o[a],w=o[a+1]);var E=x>0,T=y>=0;t.MathUtils.signum(w)!=t.MathUtils.signum(x)&&Math.abs(w)<=90&&(Math.abs(y)>180&&(y+=360*t.MathUtils.signum(y)),T=E),m=x+y-y%360,T!=E&&(m+=360*t.MathUtils.signum(y)),o[a]=m}o[a+1]=x,f+=m*r,c.rotation=f-360*(16384-(16384.499999999996-f/360|0))}}else e.apply(n,0,i,null,1,s,t.MixDirection.mixIn)},e.prototype.queueEvents=function(t,e){for(var n=t.animationStart,i=t.animationEnd,r=i-n,s=t.trackLast%r,o=this.events,a=0,h=o.length;ai||this.queue.event(t,l)}for((t.loop?0==r||s>t.trackTime%r:e>=i&&t.animationLast=this.tracks.length)){var e=this.tracks[t];if(null!=e){this.queue.end(e),this.disposeNext(e);for(var n=e;;){var i=n.mixingFrom;if(null==i)break;this.queue.end(i),n.mixingFrom=null,n.mixingTo=null,n=i}this.tracks[e.trackIndex]=null,this.queue.drain()}}},e.prototype.setCurrent=function(t,e,n){var i=this.expandToIndex(t);this.tracks[t]=e,null!=i&&(n&&this.queue.interrupt(i),e.mixingFrom=i,i.mixingTo=e,e.mixTime=0,null!=i.mixingFrom&&i.mixDuration>0&&(e.interruptAlpha*=Math.min(1,i.mixTime/i.mixDuration)),i.timelinesRotation.length=0),this.queue.start(e)},e.prototype.setAnimation=function(t,e,n){var i=this.data.skeletonData.findAnimation(e);if(null==i)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,i,n)},e.prototype.setAnimationWith=function(t,e,n){if(null==e)throw new Error("animation cannot be null.");var i=!0,r=this.expandToIndex(t);null!=r&&(-1==r.nextTrackLast?(this.tracks[t]=r.mixingFrom,this.queue.interrupt(r),this.queue.end(r),this.disposeNext(r),r=r.mixingFrom,i=!1):this.disposeNext(r));var s=this.trackEntry(t,e,n,r);return this.setCurrent(t,s,i),this.queue.drain(),s},e.prototype.addAnimation=function(t,e,n,i){var r=this.data.skeletonData.findAnimation(e);if(null==r)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,r,n,i)},e.prototype.addAnimationWith=function(t,e,n,i){if(null==e)throw new Error("animation cannot be null.");var r=this.expandToIndex(t);if(null!=r)for(;null!=r.next;)r=r.next;var s=this.trackEntry(t,e,n,r);if(null==r)this.setCurrent(t,s,!0),this.queue.drain();else if(r.next=s,i<=0){var o=r.animationEnd-r.animationStart;0!=o?(r.loop?i+=o*(1+(r.trackTime/o|0)):i+=Math.max(o,r.trackTime),i-=this.data.getMix(r.animation,e)):i=r.trackTime}return s.delay=i,s},e.prototype.setEmptyAnimation=function(t,n){var i=this.setAnimationWith(t,e.emptyAnimation,!1);return i.mixDuration=n,i.trackEnd=n,i},e.prototype.addEmptyAnimation=function(t,n,i){i<=0&&(i-=n);var r=this.addAnimationWith(t,e.emptyAnimation,!1,i);return r.mixDuration=n,r.trackEnd=n,r},e.prototype.setEmptyAnimations=function(t){var e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var n=0,i=this.tracks.length;n=0;e--)for(var i=this.tracks[e];null!=i;)this.computeNotLast(i),i=i.mixingFrom},e.prototype.computeHold=function(n){var i=n.mixingTo,r=n.animation.timelines,s=n.animation.timelines.length,o=t.Utils.setArraySize(n.timelineMode,s);n.timelineHoldMix.length=0;var a=t.Utils.setArraySize(n.timelineHoldMix,s),h=this.propertyIDs;if(null!=i&&i.holdPrevious)for(var l=0;l0){o[l]=e.HOLD_MIX,a[l]=f;continue t}break}o[l]=e.HOLD}else o[l]=e.SUBSEQUENT}},e.prototype.computeNotLast=function(n){for(var i=n.animation.timelines,r=n.animation.timelines.length,s=n.timelineMode,o=this.propertyIDs,a=0;a=this.tracks.length?null:this.tracks[t]},e.prototype.addListener=function(t){if(null==t)throw new Error("listener cannot be null.");this.listeners.push(t)},e.prototype.removeListener=function(t){var e=this.listeners.indexOf(t);e>=0&&this.listeners.splice(e,1)},e.prototype.clearListeners=function(){this.listeners.length=0},e.prototype.clearListenerNotifications=function(){this.queue.clear()},e.emptyAnimation=new t.Animation("",[],0),e.SUBSEQUENT=0,e.FIRST=1,e.HOLD=2,e.HOLD_MIX=3,e.NOT_LAST=4,e}();t.AnimationState=e;var n=function(){function e(){this.mixBlend=t.MixBlend.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}return e.prototype.reset=function(){this.next=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0},e.prototype.getAnimationTime=function(){if(this.loop){var t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)},e.prototype.setAnimationLast=function(t){this.animationLast=t,this.nextAnimationLast=t},e.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},e.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},e}();t.TrackEntry=n;var i,r=function(){function t(t){this.objects=[],this.drainDisabled=!1,this.animState=t}return t.prototype.start=function(t){this.objects.push(i.start),this.objects.push(t),this.animState.animationsChanged=!0},t.prototype.interrupt=function(t){this.objects.push(i.interrupt),this.objects.push(t)},t.prototype.end=function(t){this.objects.push(i.end),this.objects.push(t),this.animState.animationsChanged=!0},t.prototype.dispose=function(t){this.objects.push(i.dispose),this.objects.push(t)},t.prototype.complete=function(t){this.objects.push(i.complete),this.objects.push(t)},t.prototype.event=function(t,e){this.objects.push(i.event),this.objects.push(t),this.objects.push(e)},t.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var t=this.objects,e=this.animState.listeners,n=0;n=0?n.substring(0,n.lastIndexOf("/")):"";n=this.pathPrefix+n,this.toLoad++,e.downloadText(n,function(e){var a={count:0},h=new Array;try{new t.TextureAtlas(e,function(e){h.push(o+"/"+e);var n=document.createElement("img");return n.width=16,n.height=16,new t.FakeTexture(n)})}catch(t){var l=t;return s.errors[n]="Couldn't load texture atlas "+n+": "+l.message,r&&r(n,"Couldn't load texture atlas "+n+": "+l.message),s.toLoad--,void s.loaded++}for(var u=function(l){var u=!1;s.loadTexture(l,function(l,c){if(a.count++,a.count==h.length)if(u)s.errors[n]="Couldn't load texture atlas page "+l+"} of atlas "+n,r&&r(n,"Couldn't load texture atlas page "+l+" of atlas "+n),s.toLoad--,s.loaded++;else try{var f=new t.TextureAtlas(e,function(t){return s.get(o+"/"+t)});s.assets[n]=f,i&&i(n,f),s.toLoad--,s.loaded++}catch(t){var d=t;s.errors[n]="Couldn't load texture atlas "+n+": "+d.message,r&&r(n,"Couldn't load texture atlas "+n+": "+d.message),s.toLoad--,s.loaded++}},function(t,e){u=!0,a.count++,a.count==h.length&&(s.errors[n]="Couldn't load texture atlas page "+t+"} of atlas "+n,r&&r(n,"Couldn't load texture atlas page "+t+" of atlas "+n),s.toLoad--,s.loaded++)})},c=0,f=h;c0},e.prototype.getErrors=function(){return this.errors},e}();t.AssetManager=e}(i||(i={})),function(t){var e=function(){function e(t){this.atlas=t}return e.prototype.newRegionAttachment=function(e,n,i){var r=this.atlas.findRegion(i);if(null==r)throw new Error("Region not found in atlas: "+i+" (region attachment: "+n+")");r.renderObject=r;var s=new t.RegionAttachment(n);return s.setRegion(r),s},e.prototype.newMeshAttachment=function(e,n,i){var r=this.atlas.findRegion(i);if(null==r)throw new Error("Region not found in atlas: "+i+" (mesh attachment: "+n+")");r.renderObject=r;var s=new t.MeshAttachment(n);return s.region=r,s},e.prototype.newBoundingBoxAttachment=function(e,n){return new t.BoundingBoxAttachment(n)},e.prototype.newPathAttachment=function(e,n){return new t.PathAttachment(n)},e.prototype.newPointAttachment=function(e,n){return new t.PointAttachment(n)},e.prototype.newClippingAttachment=function(e,n){return new t.ClippingAttachment(n)},e}();t.AtlasAttachmentLoader=e}(i||(i={})),function(t){!function(t){t[t.Normal=0]="Normal",t[t.Additive=1]="Additive",t[t.Multiply=2]="Multiply",t[t.Screen=3]="Screen"}(t.BlendMode||(t.BlendMode={}))}(i||(i={})),function(t){var e=function(){function e(t,e,n){if(this.children=new Array,this.x=0,this.y=0,this.rotation=0,this.scaleX=0,this.scaleY=0,this.shearX=0,this.shearY=0,this.ax=0,this.ay=0,this.arotation=0,this.ascaleX=0,this.ascaleY=0,this.ashearX=0,this.ashearY=0,this.appliedValid=!1,this.a=0,this.b=0,this.c=0,this.d=0,this.worldY=0,this.worldX=0,this.sorted=!1,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.skeleton=e,this.parent=n,this.setToSetupPose()}return e.prototype.isActive=function(){return this.active},e.prototype.update=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},e.prototype.updateWorldTransform=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},e.prototype.updateWorldTransformWith=function(e,n,i,r,s,o,a){this.ax=e,this.ay=n,this.arotation=i,this.ascaleX=r,this.ascaleY=s,this.ashearX=o,this.ashearY=a,this.appliedValid=!0;var h=this.parent;if(null==h){var l=this.skeleton,u=i+90+a,c=l.scaleX,f=l.scaleY;return this.a=t.MathUtils.cosDeg(i+o)*r*c,this.b=t.MathUtils.cosDeg(u)*s*c,this.c=t.MathUtils.sinDeg(i+o)*r*f,this.d=t.MathUtils.sinDeg(u)*s*f,this.worldX=e*c+l.x,void(this.worldY=n*f+l.y)}var d=h.a,p=h.b,v=h.c,g=h.d;switch(this.worldX=d*e+p*n+h.worldX,this.worldY=v*e+g*n+h.worldY,this.data.transformMode){case t.TransformMode.Normal:u=i+90+a;var M=t.MathUtils.cosDeg(i+o)*r,m=t.MathUtils.cosDeg(u)*s,x=t.MathUtils.sinDeg(i+o)*r,y=t.MathUtils.sinDeg(u)*s;return this.a=d*M+p*x,this.b=d*m+p*y,this.c=v*M+g*x,void(this.d=v*m+g*y);case t.TransformMode.OnlyTranslation:u=i+90+a;this.a=t.MathUtils.cosDeg(i+o)*r,this.b=t.MathUtils.cosDeg(u)*s,this.c=t.MathUtils.sinDeg(i+o)*r,this.d=t.MathUtils.sinDeg(u)*s;break;case t.TransformMode.NoRotationOrReflection:var w=0;(b=d*d+v*v)>1e-4?(p=v*(b=Math.abs(d*g-p*v)/b),g=d*b,w=Math.atan2(v,d)*t.MathUtils.radDeg):(d=0,v=0,w=90-Math.atan2(g,p)*t.MathUtils.radDeg);var E=i+o-w,T=i+a-w+90;M=t.MathUtils.cosDeg(E)*r,m=t.MathUtils.cosDeg(T)*s,x=t.MathUtils.sinDeg(E)*r,y=t.MathUtils.sinDeg(T)*s;this.a=d*M-p*x,this.b=d*m-p*y,this.c=v*M+g*x,this.d=v*m+g*y;break;case t.TransformMode.NoScale:case t.TransformMode.NoScaleOrReflection:var b,A=t.MathUtils.cosDeg(i),R=t.MathUtils.sinDeg(i),S=(d*A+p*R)/this.skeleton.scaleX,I=(v*A+g*R)/this.skeleton.scaleY;(b=Math.sqrt(S*S+I*I))>1e-5&&(b=1/b),S*=b,I*=b,b=Math.sqrt(S*S+I*I),this.data.transformMode==t.TransformMode.NoScale&&d*g-p*v<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(b=-b);var C=Math.PI/2+Math.atan2(I,S),P=Math.cos(C)*b,L=Math.sin(C)*b;M=t.MathUtils.cosDeg(o)*r,m=t.MathUtils.cosDeg(90+a)*s,x=t.MathUtils.sinDeg(o)*r,y=t.MathUtils.sinDeg(90+a)*s;this.a=S*M+P*x,this.b=S*m+P*y,this.c=I*M+L*x,this.d=I*m+L*y}this.a*=this.skeleton.scaleX,this.b*=this.skeleton.scaleX,this.c*=this.skeleton.scaleY,this.d*=this.skeleton.scaleY},e.prototype.setToSetupPose=function(){var t=this.data;this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this.shearX=t.shearX,this.shearY=t.shearY},e.prototype.getWorldRotationX=function(){return Math.atan2(this.c,this.a)*t.MathUtils.radDeg},e.prototype.getWorldRotationY=function(){return Math.atan2(this.d,this.b)*t.MathUtils.radDeg},e.prototype.getWorldScaleX=function(){return Math.sqrt(this.a*this.a+this.c*this.c)},e.prototype.getWorldScaleY=function(){return Math.sqrt(this.b*this.b+this.d*this.d)},e.prototype.updateAppliedTransform=function(){this.appliedValid=!0;var e=this.parent;if(null==e)return this.ax=this.worldX,this.ay=this.worldY,this.arotation=Math.atan2(this.c,this.a)*t.MathUtils.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,void(this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*t.MathUtils.radDeg);var n=e.a,i=e.b,r=e.c,s=e.d,o=1/(n*s-i*r),a=this.worldX-e.worldX,h=this.worldY-e.worldY;this.ax=a*s*o-h*i*o,this.ay=h*n*o-a*r*o;var l=o*s,u=o*n,c=o*i,f=o*r,d=l*this.a-c*this.c,p=l*this.b-c*this.d,v=u*this.c-f*this.a,g=u*this.d-f*this.b;if(this.ashearX=0,this.ascaleX=Math.sqrt(d*d+v*v),this.ascaleX>1e-4){var M=d*g-p*v;this.ascaleY=M/this.ascaleX,this.ashearY=Math.atan2(d*p+v*g,M)*t.MathUtils.radDeg,this.arotation=Math.atan2(v,d)*t.MathUtils.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(p*p+g*g),this.ashearY=0,this.arotation=90-Math.atan2(g,p)*t.MathUtils.radDeg},e.prototype.worldToLocal=function(t){var e=this.a,n=this.b,i=this.c,r=this.d,s=1/(e*r-n*i),o=t.x-this.worldX,a=t.y-this.worldY;return t.x=o*r*s-a*n*s,t.y=a*e*s-o*i*s,t},e.prototype.localToWorld=function(t){var e=t.x,n=t.y;return t.x=e*this.a+n*this.b+this.worldX,t.y=e*this.c+n*this.d+this.worldY,t},e.prototype.worldToLocalRotation=function(e){var n=t.MathUtils.sinDeg(e),i=t.MathUtils.cosDeg(e);return Math.atan2(this.a*n-this.c*i,this.d*i-this.b*n)*t.MathUtils.radDeg+this.rotation-this.shearX},e.prototype.localToWorldRotation=function(e){e-=this.rotation-this.shearX;var n=t.MathUtils.sinDeg(e),i=t.MathUtils.cosDeg(e);return Math.atan2(i*this.c+n*this.d,i*this.a+n*this.b)*t.MathUtils.radDeg},e.prototype.rotateWorld=function(e){var n=this.a,i=this.b,r=this.c,s=this.d,o=t.MathUtils.cosDeg(e),a=t.MathUtils.sinDeg(e);this.a=o*n-a*r,this.b=o*i-a*s,this.c=a*n+o*r,this.d=a*i+o*s,this.appliedValid=!1},e}();t.Bone=e}(i||(i={})),function(t){var e,n=function(){return function(n,i,r){if(this.x=0,this.y=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.shearX=0,this.shearY=0,this.transformMode=e.Normal,this.skinRequired=!1,this.color=new t.Color,n<0)throw new Error("index must be >= 0.");if(null==i)throw new Error("name cannot be null.");this.index=n,this.name=i,this.parent=r}}();t.BoneData=n,function(t){t[t.Normal=0]="Normal",t[t.OnlyTranslation=1]="OnlyTranslation",t[t.NoRotationOrReflection=2]="NoRotationOrReflection",t[t.NoScale=3]="NoScale",t[t.NoScaleOrReflection=4]="NoScaleOrReflection"}(e=t.TransformMode||(t.TransformMode={}))}(i||(i={})),function(t){var e=function(){return function(t,e,n){this.name=t,this.order=e,this.skinRequired=n}}();t.ConstraintData=e}(i||(i={})),function(t){var e=function(){return function(t,e){if(null==e)throw new Error("data cannot be null.");this.time=t,this.data=e}}();t.Event=e}(i||(i={})),function(t){var e=function(){return function(t){this.name=t}}();t.EventData=e}(i||(i={})),function(t){var e=function(){function e(t,e){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.mix=t.mix,this.softness=t.softness,this.bendDirection=t.bendDirection,this.compress=t.compress,this.stretch=t.stretch,this.bones=new Array;for(var n=0;n180?p-=360:p<-180&&(p+=360);var v=e.ascaleX,g=e.ascaleY;if(r||s){var M=e.data.length*v,m=Math.sqrt(f*f+d*d);if(r&&mM&&M>1e-4){var x=(m/M-1)*a+1;v*=x,o&&(g*=x)}}e.updateWorldTransformWith(e.ax,e.ay,e.arotation+p*a,v,g,e.ashearX,e.ashearY)},e.prototype.apply2=function(e,n,i,r,s,o,a,h){if(0!=h){e.appliedValid||e.updateAppliedTransform(),n.appliedValid||n.updateAppliedTransform();var l=e.ax,u=e.ay,c=e.ascaleX,f=c,d=e.ascaleY,p=n.ascaleX,v=0,g=0,M=0;c<0?(c=-c,v=180,M=-1):(v=0,M=1),d<0&&(d=-d,M=-M),p<0?(p=-p,g=180):g=0;var m=n.ax,x=0,y=0,w=0,E=e.a,T=e.b,b=e.c,A=e.d,R=Math.abs(c-d)<=1e-4;R?(y=E*m+T*(x=n.ay)+e.worldX,w=b*m+A*x+e.worldY):(x=0,y=E*m+e.worldX,w=b*m+e.worldY);var S=e.parent;E=S.a,T=S.b,b=S.c;var I,C,P=1/(E*(A=S.d)-T*b),L=y-S.worldX,k=w-S.worldY,_=(L*A-k*T)*P-l,F=(k*E-L*b)*P-u,O=Math.sqrt(_*_+F*F),V=n.data.length*p;if(O<1e-4)return this.apply1(e,i,r,!1,o,!1,h),void n.updateWorldTransformWith(m,x,0,n.ascaleX,n.ascaleY,n.ashearX,n.ashearY);var D=((L=i-S.worldX)*A-(k=r-S.worldY)*T)*P-l,N=(k*E-L*b)*P-u,U=D*D+N*N;if(0!=a){a*=c*(p+1)/2;var B=Math.sqrt(U),X=B-O-V*c+a;if(X>0){var Y=Math.min(1,X/(2*a))-1;U=(D-=(Y=(X-a*(1-Y*Y))/B)*D)*D+(N-=Y*N)*N}}t:if(R){var z=(U-O*O-(V*=c)*V)/(2*O*V);z<-1?z=-1:z>1&&(z=1,o&&(f*=(Math.sqrt(U)/(O+V)-1)*h+1)),C=Math.acos(z)*s,E=O+V*z,T=V*Math.sin(C),I=Math.atan2(N*E-D*T,D*E+N*T)}else{var W=(E=c*V)*E,q=(T=d*V)*T,G=Math.atan2(N,D),H=-2*q*O,j=q-W;if((A=H*H-4*j*(b=q*O*O+W*U-W*q))>=0){var Z=Math.sqrt(A);H<0&&(Z=-Z);var K=(Z=-(H+Z)/2)/j,Q=b/Z,J=Math.abs(K)=-1&&b<=1&&(b=Math.acos(b),(A=(L=E*Math.cos(b)+O)*L+(k=T*Math.sin(b))*k)st&&(it=b,st=A,rt=L,ot=k)),U<=(et+st)/2?(I=G-Math.atan2(nt*s,tt),C=$*s):(I=G-Math.atan2(ot*s,rt),C=it*s)}var at=Math.atan2(x,m)*M,ht=e.arotation;(I=(I-at)*t.MathUtils.radDeg+v-ht)>180?I-=360:I<-180&&(I+=360),e.updateWorldTransformWith(l,u,ht+I*h,f,e.ascaleY,0,0),ht=n.arotation,(C=((C+at)*t.MathUtils.radDeg-n.ashearX)*M+g-ht)>180?C-=360:C<-180&&(C+=360),n.updateWorldTransformWith(m,x,ht+C*h,n.ascaleX,n.ascaleY,n.ashearX,n.ashearY)}else n.updateWorldTransform()},e}();t.IkConstraint=e}(i||(i={})),function(t){var e=function(t){function e(e){var n=t.call(this,e,0,!1)||this;return n.bones=new Array,n.bendDirection=1,n.compress=!1,n.stretch=!1,n.uniform=!1,n.mix=1,n.softness=0,n}return r(e,t),e}(t.ConstraintData);t.IkConstraintData=e}(i||(i={})),function(t){var e=function(){function e(t,e){if(this.position=0,this.spacing=0,this.rotateMix=0,this.translateMix=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.bones=new Array;for(var n=0,i=t.bones.length;n0;if(r>0||s){var o=this.data,a=o.spacingMode==t.SpacingMode.Percent,h=o.rotateMode,l=h==t.RotateMode.Tangent,u=h==t.RotateMode.ChainScale,c=this.bones.length,f=l?c:c+1,d=this.bones,p=t.Utils.setArraySize(this.spaces,f),v=null,g=this.spacing;if(u||!a){u&&(v=t.Utils.setArraySize(this.lengths,c));for(var M=o.spacingMode==t.SpacingMode.Length,m=0,x=f-1;m0?t.MathUtils.degRad:-t.MathUtils.degRad;m=0;for(var P=3;mt.MathUtils.PI?B-=t.MathUtils.PI2:B<-t.MathUtils.PI&&(B+=t.MathUtils.PI2),B*=i,X=Math.cos(B),Y=Math.sin(B),L.a=X*V-Y*N,L.b=X*D-Y*U,L.c=Y*V+X*N,L.d=Y*D+X*U}L.appliedValid=!1}}}},e.prototype.computeWorldPositions=function(n,i,r,s,o){var a=this.target,h=this.position,l=this.spaces,u=t.Utils.setArraySize(this.positions,3*i+2),c=null,f=n.closed,d=n.worldVerticesLength,p=d/6,v=e.NONE;if(!n.constantSpeed){var g=n.lengths,M=g[p-=f?1:2];if(s&&(h*=M),o)for(var m=1;mM){v!=e.AFTER&&(v=e.AFTER,n.computeWorldVertices(a,d-6,4,c,0,2)),this.addAfterPosition(w-M,c,0,u,x);continue}}for(;;y++){var E=g[y];if(!(w>E)){if(0==y)w/=E;else w=(w-(Z=g[y-1]))/(E-Z);break}}y!=v&&(v=y,f&&y==p?(n.computeWorldVertices(a,d-4,4,c,0,2),n.computeWorldVertices(a,0,4,c,4,2)):n.computeWorldVertices(a,6*y+2,8,c,0,2)),this.addCurvePosition(w,c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],u,x,r||m>0&&0==q)}return u}f?(d+=2,c=t.Utils.setArraySize(this.world,d),n.computeWorldVertices(a,2,d-4,c,0,2),n.computeWorldVertices(a,0,2,c,d-4,2),c[d-2]=c[0],c[d-1]=c[1]):(p--,d-=4,c=t.Utils.setArraySize(this.world,d),n.computeWorldVertices(a,2,d,c,0,2));for(var T=t.Utils.setArraySize(this.curves,p),b=0,A=c[0],R=c[1],S=0,I=0,C=0,P=0,L=0,k=0,_=0,F=0,O=0,V=0,D=0,N=0,U=0,B=0,X=(m=0,2);mb){this.addAfterPosition(w-b,c,d-4,u,x);continue}}for(;;y++){var G=T[y];if(!(w>G)){if(0==y)w/=G;else w=(w-(Z=T[y-1]))/(G-Z);break}}if(y!=v){v=y;var H=6*y;for(A=c[H],R=c[H+1],S=c[H+2],I=c[H+3],C=c[H+4],P=c[H+5],L=c[H+6],k=c[H+7],D=2*(_=.03*(A-2*S+C))+(O=.006*(3*(S-C)-A+L)),N=2*(F=.03*(R-2*I+P))+(V=.006*(3*(I-P)-R+k)),U=.3*(S-A)+_+.16666667*O,B=.3*(I-R)+F+.16666667*V,z=Math.sqrt(U*U+B*B),Y[0]=z,H=1;H<8;H++)U+=D,B+=N,D+=O,N+=V,z+=Math.sqrt(U*U+B*B),Y[H]=z;U+=D,B+=N,z+=Math.sqrt(U*U+B*B),Y[8]=z,U+=D+O,B+=N+V,z+=Math.sqrt(U*U+B*B),Y[9]=z,W=0}for(w*=z;;W++){var j=Y[W];if(!(w>j)){var Z;if(0==W)w/=j;else w=W+(w-(Z=Y[W-1]))/(j-Z);break}}this.addCurvePosition(.1*w,A,R,S,I,C,P,L,k,u,x,r||m>0&&0==q)}return u},e.prototype.addBeforePosition=function(t,e,n,i,r){var s=e[n],o=e[n+1],a=e[n+2]-s,h=e[n+3]-o,l=Math.atan2(h,a);i[r]=s+t*Math.cos(l),i[r+1]=o+t*Math.sin(l),i[r+2]=l},e.prototype.addAfterPosition=function(t,e,n,i,r){var s=e[n+2],o=e[n+3],a=s-e[n],h=o-e[n+1],l=Math.atan2(h,a);i[r]=s+t*Math.cos(l),i[r+1]=o+t*Math.sin(l),i[r+2]=l},e.prototype.addCurvePosition=function(t,e,n,i,r,s,o,a,h,l,u,c){if(0==t||isNaN(t))return l[u]=e,l[u+1]=n,void(l[u+2]=Math.atan2(r-n,i-e));var f=t*t,d=f*t,p=1-t,v=p*p,g=v*p,M=p*t,m=3*M,x=p*m,y=m*t,w=e*g+i*x+s*y+a*d,E=n*g+r*x+o*y+h*d;l[u]=w,l[u+1]=E,c&&(l[u+2]=t<.001?Math.atan2(r-n,i-e):Math.atan2(E-(n*v+r*M*2+o*f),w-(e*v+i*M*2+s*f)))},e.NONE=-1,e.BEFORE=-2,e.AFTER=-3,e.epsilon=1e-5,e}();t.PathConstraint=e}(i||(i={})),function(t){var e=function(t){function e(e){var n=t.call(this,e,0,!1)||this;return n.bones=new Array,n}return r(e,t),e}(t.ConstraintData);t.PathConstraintData=e,function(t){t[t.Fixed=0]="Fixed",t[t.Percent=1]="Percent"}(t.PositionMode||(t.PositionMode={})),function(t){t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent"}(t.SpacingMode||(t.SpacingMode={})),function(t){t[t.Tangent=0]="Tangent",t[t.Chain=1]="Chain",t[t.ChainScale=2]="ChainScale"}(t.RotateMode||(t.RotateMode={}))}(i||(i={})),function(t){var e=function(){function t(t){this.toLoad=new Array,this.assets={},this.clientId=t}return t.prototype.loaded=function(){var t=0;for(var e in this.assets)t++;return t},t}(),n=function(){function t(t){void 0===t&&(t=""),this.clientAssets={},this.queuedAssets={},this.rawAssets={},this.errors={},this.pathPrefix=t}return t.prototype.queueAsset=function(t,n,i){var r=this.clientAssets[t];return null!==r&&void 0!==r||(r=new e(t),this.clientAssets[t]=r),null!==n&&(r.textureLoader=n),r.toLoad.push(i),this.queuedAssets[i]!==i&&(this.queuedAssets[i]=i,!0)},t.prototype.loadText=function(t,e){var n=this;if(e=this.pathPrefix+e,this.queueAsset(t,null,e)){var i=new XMLHttpRequest;i.onreadystatechange=function(){i.readyState==XMLHttpRequest.DONE&&(i.status>=200&&i.status<300?n.rawAssets[e]=i.responseText:n.errors[e]="Couldn't load text "+e+": status "+i.status+", "+i.responseText)},i.open("GET",e,!0),i.send()}},t.prototype.loadJson=function(t,e){var n=this;if(e=this.pathPrefix+e,this.queueAsset(t,null,e)){var i=new XMLHttpRequest;i.onreadystatechange=function(){i.readyState==XMLHttpRequest.DONE&&(i.status>=200&&i.status<300?n.rawAssets[e]=JSON.parse(i.responseText):n.errors[e]="Couldn't load text "+e+": status "+i.status+", "+i.responseText)},i.open("GET",e,!0),i.send()}},t.prototype.loadTexture=function(t,e,n){var i=this;if(n=this.pathPrefix+n,this.queueAsset(t,e,n)){var r=new Image;r.src=n,r.crossOrigin="anonymous",r.onload=function(t){i.rawAssets[n]=r},r.onerror=function(t){i.errors[n]="Couldn't load image "+n}}},t.prototype.get=function(t,e){e=this.pathPrefix+e;var n=this.clientAssets[t];return null===n||void 0===n||n.assets[e]},t.prototype.updateClientAssets=function(t){for(var e=0;e0},t.prototype.getErrors=function(){return this.errors},t}();t.SharedAssetManager=n}(i||(i={})),function(t){var e=function(){function e(e){if(this._updateCache=new Array,this.updateCacheReset=new Array,this.time=0,this.scaleX=1,this.scaleY=1,this.x=0,this.y=0,null==e)throw new Error("data cannot be null.");this.data=e,this.bones=new Array;for(var n=0;n1){var s=i[i.length-1];this._updateCache.indexOf(s)>-1||this.updateCacheReset.push(s)}this._updateCache.push(e),this.sortReset(r.children),i[i.length-1].sorted=!0}},e.prototype.sortPathConstraint=function(e){if(e.active=e.target.bone.isActive()&&(!e.data.skinRequired||null!=this.skin&&t.Utils.contains(this.skin.constraints,e.data,!0)),e.active){var n=e.target,i=n.data.index,r=n.bone;null!=this.skin&&this.sortPathConstraintAttachment(this.skin,i,r),null!=this.data.defaultSkin&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,i,r);for(var s=0,o=this.data.skins.length;s-1||this.updateCacheReset.push(s)}else for(r=0;r0){y=new t.DrawOrderTimeline(V);var D=r.slots.length;for(u=0;u=0;d--)U[d]=-1;var B=t.Utils.newArray(D-N,0),X=0,Y=0;for(d=0;d=0;d--)-1==U[d]&&(U[d]=B[--Y]);y.setFrame(u,m,U)}s.push(y),a=Math.max(a,y.frames[V-1])}var z=n.readInt(!0);if(z>0){for(y=new t.EventTimeline(z),u=0;u>>1^-(1&n)},t.prototype.readStringRef=function(){var t=this.readInt(!0);return 0==t?null:this.strings[t-1]},t.prototype.readString=function(){var t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;for(var e="",n=0;n>4){case 12:case 13:e+=String.fromCharCode((31&i)<<6|63&this.readByte()),n+=2;break;case 14:e+=String.fromCharCode((15&i)<<12|(63&this.readByte())<<6|63&this.readByte()),n+=3;break;default:e+=String.fromCharCode(i),n++}}return e},t.prototype.readFloat=function(){var t=this.buffer.getFloat32(this.index);return this.index+=4,t},t.prototype.readBoolean=function(){return 0!=this.readByte()},t}(),i=function(){return function(t,e,n,i,r){this.mesh=t,this.skin=e,this.slotIndex=n,this.parent=i,this.inheritDeform=r}}(),r=function(){return function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),this.bones=t,this.vertices=e}}()}(i||(i={})),function(t){var e=function(){function e(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.boundingBoxes=new Array,this.polygons=new Array,this.polygonPool=new t.Pool(function(){return t.Utils.newFloatArray(16)})}return e.prototype.update=function(e,n){if(null==e)throw new Error("skeleton cannot be null.");var i=this.boundingBoxes,r=this.polygons,s=this.polygonPool,o=e.slots,a=o.length;i.length=0,s.freeAll(r),r.length=0;for(var h=0;h=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},e.prototype.aabbIntersectsSegment=function(t,e,n,i){var r=this.minX,s=this.minY,o=this.maxX,a=this.maxY;if(t<=r&&n<=r||e<=s&&i<=s||t>=o&&n>=o||e>=a&&i>=a)return!1;var h=(i-e)/(n-t),l=h*(r-t)+e;if(l>s&&ls&&lr&&ur&&ut.minX&&this.minYt.minY},e.prototype.containsPoint=function(t,e){for(var n=this.polygons,i=0,r=n.length;i=n||l=n){var u=i[a];u+(n-h)/(l-h)*(i[s]-u)=u&&x<=d||x>=d&&x<=u)&&(x>=e&&x<=i||x>=i&&x<=e)){var y=(l*M-h*v)/m;if((y>=c&&y<=p||y>=p&&y<=c)&&(y>=n&&y<=r||y>=r&&y<=n))return!0}u=d,c=p}return!1},e.prototype.getPolygon=function(t){if(null==t)throw new Error("boundingBox cannot be null.");var e=this.boundingBoxes.indexOf(t);return-1==e?null:this.polygons[e]},e.prototype.getWidth=function(){return this.maxX-this.minX},e.prototype.getHeight=function(){return this.maxY-this.minY},e}();t.SkeletonBounds=e}(i||(i={})),function(t){var e=function(){function e(){this.triangulator=new t.Triangulator,this.clippingPolygon=new Array,this.clipOutput=new Array,this.clippedVertices=new Array,this.clippedTriangles=new Array,this.scratch=new Array}return e.prototype.clipStart=function(n,i){if(null!=this.clipAttachment)return 0;this.clipAttachment=i;var r=i.worldVerticesLength,s=t.Utils.setArraySize(this.clippingPolygon,r);i.computeWorldVertices(n,0,r,s,0,2);var o=this.clippingPolygon;e.makeClockwise(o);for(var a=this.clippingPolygons=this.triangulator.decompose(o,this.triangulator.triangulate(o)),h=0,l=a.length;h>1,U=this.clipOutput,B=t.Utils.setArraySize(u,L+N*p),X=0;X=2?(u=a,a=this.scratch):u=this.scratch,u.length=0,u.push(t),u.push(e),u.push(n),u.push(i),u.push(r),u.push(s),u.push(t),u.push(e),a.length=0;for(var c=o,f=o.length-4,d=0;;d+=2){for(var p=c[d],v=c[d+1],g=c[d+2],M=c[d+3],m=p-g,x=v-M,y=u,w=u.length-2,E=a.length,T=0;T0;if(m*(A-M)-x*(b-g)>0){if(I){a.push(R),a.push(S);continue}var C=(L=S-A)*(g-p)-(k=R-b)*(M-v);if(Math.abs(C)>1e-6){var P=(k*(v-A)-L*(p-b))/C;a.push(p+(g-p)*P),a.push(v+(M-v)*P)}else a.push(p),a.push(v)}else if(I){var L,k;C=(L=S-A)*(g-p)-(k=R-b)*(M-v);if(Math.abs(C)>1e-6){P=(k*(v-A)-L*(p-b))/C;a.push(p+(g-p)*P),a.push(v+(M-v)*P)}else a.push(p),a.push(v);a.push(R),a.push(S)}l=!0}if(E==a.length)return h.length=0,!0;if(a.push(a[0]),a.push(a[1]),d==f)break;var _=a;(a=u).length=0,u=_}if(h!=a){h.length=0;d=0;for(var F=a.length-2;d>1;a=0;f--)-1==q[f]&&(q[f]=H[--Z])}y.setFrame(c++,this.getValue(W,"time",0),q)}s.push(y),o=Math.max(o,y.frames[y.getFrameCount()-1])}if(e.events){for(y=new t.EventTimeline(e.events.length),c=0,f=0;f=i.length&&(i.length=t+1),i[t]||(i[t]={}),i[t][e]=n},n.prototype.addSkin=function(t){for(var e=0;e= 0.");if(null==n)throw new Error("name cannot be null.");if(null==i)throw new Error("boneData cannot be null.");this.index=e,this.name=n,this.boneData=i}}();t.SlotData=e}(i||(i={})),function(t){var e,n,i=function(){function t(t){this._image=t}return t.prototype.getImage=function(){return this._image},t.filterFromString=function(t){switch(t.toLowerCase()){case"nearest":return e.Nearest;case"linear":return e.Linear;case"mipmap":return e.MipMap;case"mipmapnearestnearest":return e.MipMapNearestNearest;case"mipmaplinearnearest":return e.MipMapLinearNearest;case"mipmapnearestlinear":return e.MipMapNearestLinear;case"mipmaplinearlinear":return e.MipMapLinearLinear;default:throw new Error("Unknown texture filter "+t)}},t.wrapFromString=function(t){switch(t.toLowerCase()){case"mirroredtepeat":return n.MirroredRepeat;case"clamptoedge":return n.ClampToEdge;case"repeat":return n.Repeat;default:throw new Error("Unknown texture wrap "+t)}},t}();t.Texture=i,function(t){t[t.Nearest=9728]="Nearest",t[t.Linear=9729]="Linear",t[t.MipMap=9987]="MipMap",t[t.MipMapNearestNearest=9984]="MipMapNearestNearest",t[t.MipMapLinearNearest=9985]="MipMapLinearNearest",t[t.MipMapNearestLinear=9986]="MipMapNearestLinear",t[t.MipMapLinearLinear=9987]="MipMapLinearLinear"}(e=t.TextureFilter||(t.TextureFilter={})),function(t){t[t.MirroredRepeat=33648]="MirroredRepeat",t[t.ClampToEdge=33071]="ClampToEdge",t[t.Repeat=10497]="Repeat"}(n=t.TextureWrap||(t.TextureWrap={}));var s=function(){return function(){this.u=0,this.v=0,this.u2=0,this.v2=0,this.width=0,this.height=0,this.rotate=!1,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0}}();t.TextureRegion=s;var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.setFilters=function(t,e){},e.prototype.setWraps=function(t,e){},e.prototype.dispose=function(){},e}(i);t.FakeTexture=o}(i||(i={})),function(t){var e=function(){function e(t,e){this.pages=new Array,this.regions=new Array,this.load(t,e)}return e.prototype.load=function(e,r){if(null==r)throw new Error("textureLoader cannot be null.");for(var o=new n(e),a=new Array(4),h=null;;){var l=o.readLine();if(null==l)break;if(0==(l=l.trim()).length)h=null;else if(h){var u=new s;u.name=l,u.page=h;var c=o.readValue();"true"==c.toLocaleLowerCase()?u.degrees=90:"false"==c.toLocaleLowerCase()?u.degrees=0:u.degrees=parseFloat(c),u.rotate=90==u.degrees,o.readTuple(a);var f=parseInt(a[0]),d=parseInt(a[1]);o.readTuple(a);var p=parseInt(a[0]),v=parseInt(a[1]);u.u=f/h.width,u.v=d/h.height,u.rotate?(u.u2=(f+v)/h.width,u.v2=(d+p)/h.height):(u.u2=(f+p)/h.width,u.v2=(d+v)/h.height),u.x=f,u.y=d,u.width=Math.abs(p),u.height=Math.abs(v),4==o.readTuple(a)&&4==o.readTuple(a)&&o.readTuple(a),u.originalWidth=parseInt(a[0]),u.originalHeight=parseInt(a[1]),o.readTuple(a),u.offsetX=parseInt(a[0]),u.offsetY=parseInt(a[1]),u.index=parseInt(o.readValue()),u.texture=h.texture,this.regions.push(u)}else{(h=new i).name=l,2==o.readTuple(a)&&(h.width=parseInt(a[0]),h.height=parseInt(a[1]),o.readTuple(a)),o.readTuple(a),h.minFilter=t.Texture.filterFromString(a[0]),h.magFilter=t.Texture.filterFromString(a[1]);var g=o.readValue();h.uWrap=t.TextureWrap.ClampToEdge,h.vWrap=t.TextureWrap.ClampToEdge,"x"==g?h.uWrap=t.TextureWrap.Repeat:"y"==g?h.vWrap=t.TextureWrap.Repeat:"xy"==g&&(h.uWrap=h.vWrap=t.TextureWrap.Repeat),h.texture=r(l),h.texture.setFilters(h.minFilter,h.magFilter),h.texture.setWraps(h.uWrap,h.vWrap),h.width=h.texture.getImage().width,h.height=h.texture.getImage().height,this.pages.push(h)}}},e.prototype.findRegion=function(t){for(var e=0;e=this.lines.length?null:this.lines[this.index++]},t.prototype.readValue=function(){var t=this.readLine(),e=t.indexOf(":");if(-1==e)throw new Error("Invalid line: "+t);return t.substring(e+1).trim()},t.prototype.readTuple=function(t){var e=this.readLine(),n=e.indexOf(":");if(-1==n)throw new Error("Invalid line: "+e);for(var i=0,r=n+1;i<3;i++){var s=e.indexOf(",",r);if(-1==s)break;t[i]=e.substr(r,s-r).trim(),r=s+1}return t[i]=e.substring(r).trim(),i+1},t}(),i=function(){return function(){}}();t.TextureAtlasPage=i;var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e}(t.TextureRegion);t.TextureAtlasRegion=s}(i||(i={})),function(t){var e=function(){function e(e,n){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new t.Vector2,this.active=!1,null==e)throw new Error("data cannot be null.");if(null==n)throw new Error("skeleton cannot be null.");this.data=e,this.rotateMix=e.rotateMix,this.translateMix=e.translateMix,this.scaleMix=e.scaleMix,this.shearMix=e.shearMix,this.bones=new Array;for(var i=0;i0?t.MathUtils.degRad:-t.MathUtils.degRad,c=this.data.offsetRotation*u,f=this.data.offsetShearY*u,d=this.bones,p=0,v=d.length;pt.MathUtils.PI?S-=t.MathUtils.PI2:S<-t.MathUtils.PI&&(S+=t.MathUtils.PI2),S*=e;var E=Math.cos(S),T=Math.sin(S);g.a=E*m-T*y,g.b=E*x-T*w,g.c=T*m+E*y,g.d=T*x+E*w,M=!0}if(0!=n){var b=this.temp;s.localToWorld(b.set(this.data.offsetX,this.data.offsetY)),g.worldX+=(b.x-g.worldX)*n,g.worldY+=(b.y-g.worldY)*n,M=!0}if(i>0){var A=Math.sqrt(g.a*g.a+g.c*g.c),R=Math.sqrt(o*o+h*h);A>1e-5&&(A=(A+(R-A+this.data.offsetScaleX)*i)/A),g.a*=A,g.c*=A,A=Math.sqrt(g.b*g.b+g.d*g.d),R=Math.sqrt(a*a+l*l),A>1e-5&&(A=(A+(R-A+this.data.offsetScaleY)*i)/A),g.b*=A,g.d*=A,M=!0}if(r>0){x=g.b,w=g.d;var S,I=Math.atan2(w,x);(S=Math.atan2(l,a)-Math.atan2(h,o)-(I-Math.atan2(g.c,g.a)))>t.MathUtils.PI?S-=t.MathUtils.PI2:S<-t.MathUtils.PI&&(S+=t.MathUtils.PI2),S=I+(S+f)*r;A=Math.sqrt(x*x+w*w);g.b=Math.cos(S)*A,g.d=Math.sin(S)*A,M=!0}M&&(g.appliedValid=!1)}},e.prototype.applyRelativeWorld=function(){for(var e=this.rotateMix,n=this.translateMix,i=this.scaleMix,r=this.shearMix,s=this.target,o=s.a,a=s.b,h=s.c,l=s.d,u=o*l-a*h>0?t.MathUtils.degRad:-t.MathUtils.degRad,c=this.data.offsetRotation*u,f=this.data.offsetShearY*u,d=this.bones,p=0,v=d.length;pt.MathUtils.PI?R-=t.MathUtils.PI2:R<-t.MathUtils.PI&&(R+=t.MathUtils.PI2),R*=e;var E=Math.cos(R),T=Math.sin(R);g.a=E*m-T*y,g.b=E*x-T*w,g.c=T*m+E*y,g.d=T*x+E*w,M=!0}if(0!=n){var b=this.temp;s.localToWorld(b.set(this.data.offsetX,this.data.offsetY)),g.worldX+=b.x*n,g.worldY+=b.y*n,M=!0}if(i>0){var A=(Math.sqrt(o*o+h*h)-1+this.data.offsetScaleX)*i+1;g.a*=A,g.c*=A,A=(Math.sqrt(a*a+l*l)-1+this.data.offsetScaleY)*i+1,g.b*=A,g.d*=A,M=!0}if(r>0){var R;(R=Math.atan2(l,a)-Math.atan2(h,o))>t.MathUtils.PI?R-=t.MathUtils.PI2:R<-t.MathUtils.PI&&(R+=t.MathUtils.PI2);x=g.b,w=g.d;R=Math.atan2(w,x)+(R-t.MathUtils.PI/2+f)*r;A=Math.sqrt(x*x+w*w);g.b=Math.cos(R)*A,g.d=Math.sin(R)*A,M=!0}M&&(g.appliedValid=!1)}},e.prototype.applyAbsoluteLocal=function(){var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target;r.appliedValid||r.updateAppliedTransform();for(var s=this.bones,o=0,a=s.length;o1e-5&&(d=(d+(r.ascaleX-d+this.data.offsetScaleX)*n)/d),p>1e-5&&(p=(p+(r.ascaleY-p+this.data.offsetScaleY)*n)/p));var v=h.ashearY;if(0!=i){u=r.ashearY-v+this.data.offsetShearY;u-=360*(16384-(16384.499999999996-u/360|0)),h.shearY+=u*i}h.updateWorldTransformWith(c,f,l,d,p,h.ashearX,v)}},e.prototype.applyRelativeLocal=function(){var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target;r.appliedValid||r.updateAppliedTransform();for(var s=this.bones,o=0,a=s.length;o1e-5&&(f*=(r.ascaleX-1+this.data.offsetScaleX)*n+1),d>1e-5&&(d*=(r.ascaleY-1+this.data.offsetScaleY)*n+1));var p=h.ashearY;0!=i&&(p+=(r.ashearY+this.data.offsetShearY)*i),h.updateWorldTransformWith(u,c,l,f,d,h.ashearX,p)}},e}();t.TransformConstraint=e}(i||(i={})),function(t){var e=function(t){function e(e){var n=t.call(this,e,0,!1)||this;return n.bones=new Array,n.rotateMix=0,n.translateMix=0,n.scaleMix=0,n.shearMix=0,n.offsetRotation=0,n.offsetX=0,n.offsetY=0,n.offsetScaleX=0,n.offsetScaleY=0,n.offsetShearY=0,n.relative=!1,n.local=!1,n}return r(e,t),e}(t.ConstraintData);t.TransformConstraintData=e}(i||(i={})),function(t){var e=function(){function e(){this.convexPolygons=new Array,this.convexPolygonsIndices=new Array,this.indicesArray=new Array,this.isConcaveArray=new Array,this.triangles=new Array,this.polygonPool=new t.Pool(function(){return new Array}),this.polygonIndicesPool=new t.Pool(function(){return new Array})}return e.prototype.triangulate=function(t){var n=t,i=t.length>>1,r=this.indicesArray;r.length=0;for(var s=0;s3;){for(var l=i-1,u=(s=0,1);;){t:if(!o[s]){for(var c=r[l]<<1,f=r[s]<<1,d=r[u]<<1,p=n[c],v=n[c+1],g=n[f],M=n[f+1],m=n[d],x=n[d+1],y=(u+1)%i;y!=l;y=(y+1)%i)if(o[y]){var w=r[y]<<1,E=n[w],T=n[w+1];if(e.positiveArea(m,x,p,v,E,T)&&e.positiveArea(p,v,g,M,E,T)&&e.positiveArea(g,M,m,x,E,T))break t}break}if(0==u){do{if(!o[s])break;s--}while(s>0);break}l=s,s=u,u=(u+1)%i}h.push(r[(i+s-1)%i]),h.push(r[s]),h.push(r[(s+1)%i]),r.splice(s,1),o.splice(s,1);var b=(--i+s-1)%i,A=s==i?0:s;o[b]=e.isConcave(b,i,n,r),o[A]=e.isConcave(A,i,n,r)}return 3==i&&(h.push(r[2]),h.push(r[0]),h.push(r[1])),h},e.prototype.decompose=function(t,n){var i=t,r=this.convexPolygons;this.polygonPool.freeAll(r),r.length=0;var s=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(s),s.length=0;var o=this.polygonIndicesPool.obtain();o.length=0;var a=this.polygonPool.obtain();a.length=0;for(var h=-1,l=0,u=0,c=n.length;u0?(r.push(a),s.push(o)):(this.polygonPool.free(a),this.polygonIndicesPool.free(o)),(a=this.polygonPool.obtain()).length=0,a.push(v),a.push(g),a.push(M),a.push(m),a.push(x),a.push(y),(o=this.polygonIndicesPool.obtain()).length=0,o.push(f),o.push(d),o.push(p),l=e.winding(v,g,M,m,x,y),h=f)}a.length>0&&(r.push(a),s.push(o));for(u=0,c=r.length;u=0;u--)0==(a=r[u]).length&&(r.splice(u,1),this.polygonPool.free(a),o=s[u],s.splice(u,1),this.polygonIndicesPool.free(o));return r},e.isConcave=function(t,e,n,i){var r=i[(e+t-1)%e]<<1,s=i[t]<<1,o=i[(t+1)%e]<<1;return!this.positiveArea(n[r],n[r+1],n[s],n[s+1],n[o],n[o+1])},e.positiveArea=function(t,e,n,i,r,s){return t*(s-i)+n*(e-s)+r*(i-e)>=0},e.winding=function(t,e,n,i,r,s){var o=n-t,a=i-e;return r*a-s*o+o*e-t*a>=0?1:-1},e}();t.Triangulator=e}(i||(i={})),function(t){var e=function(){function t(){this.array=new Array}return t.prototype.add=function(t){var e=this.contains(t);return this.array[0|t]=0|t,!e},t.prototype.contains=function(t){return void 0!=this.array[0|t]},t.prototype.remove=function(t){this.array[0|t]=void 0},t.prototype.clear=function(){this.array.length=0},t}();t.IntSet=e;var n=function(){function t(t,e,n,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),this.r=t,this.g=e,this.b=n,this.a=i}return t.prototype.set=function(t,e,n,i){return this.r=t,this.g=e,this.b=n,this.a=i,this.clamp(),this},t.prototype.setFromColor=function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this},t.prototype.setFromString=function(t){return t="#"==t.charAt(0)?t.substr(1):t,this.r=parseInt(t.substr(0,2),16)/255,this.g=parseInt(t.substr(2,2),16)/255,this.b=parseInt(t.substr(4,2),16)/255,this.a=(8!=t.length?255:parseInt(t.substr(6,2),16))/255,this},t.prototype.add=function(t,e,n,i){return this.r+=t,this.g+=e,this.b+=n,this.a+=i,this.clamp(),this},t.prototype.clamp=function(){return this.r<0?this.r=0:this.r>1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this},t.rgba8888ToColor=function(t,e){t.r=((4278190080&e)>>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255},t.rgb888ToColor=function(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255},t.WHITE=new t(1,1,1,1),t.RED=new t(1,0,0,1),t.GREEN=new t(0,1,0,1),t.BLUE=new t(0,0,1,1),t.MAGENTA=new t(1,0,1,1),t}();t.Color=n;var i=function(){function t(){}return t.clamp=function(t,e,n){return tn?n:t},t.cosDeg=function(e){return Math.cos(e*t.degRad)},t.sinDeg=function(e){return Math.sin(e*t.degRad)},t.signum=function(t){return t>0?1:t<0?-1:0},t.toInt=function(t){return t>0?Math.floor(t):Math.ceil(t)},t.cbrt=function(t){var e=Math.pow(Math.abs(t),1/3);return t<0?-e:e},t.randomTriangular=function(e,n){return t.randomTriangularWith(e,n,.5*(e+n))},t.randomTriangularWith=function(t,e,n){var i=Math.random(),r=e-t;return i<=(n-t)/r?t+Math.sqrt(i*r*(n-t)):e-Math.sqrt((1-i)*r*(e-n))},t.PI=3.1415927,t.PI2=2*t.PI,t.radiansToDegrees=180/t.PI,t.radDeg=t.radiansToDegrees,t.degreesToRadians=t.PI/180,t.degRad=t.degreesToRadians,t}();t.MathUtils=i;var s=function(){function t(){}return t.prototype.apply=function(t,e,n){return t+(e-t)*this.applyInternal(n)},t}();t.Interpolation=s;var o=function(t){function e(e){var n=t.call(this)||this;return n.power=2,n.power=e,n}return r(e,t),e.prototype.applyInternal=function(t){return t<=.5?Math.pow(2*t,this.power)/2:Math.pow(2*(t-1),this.power)/(this.power%2==0?-2:2)+1},e}(s);t.Pow=o;var a=function(t){function e(e){return t.call(this,e)||this}return r(e,t),e.prototype.applyInternal=function(t){return Math.pow(t-1,this.power)*(this.power%2==0?-1:1)+1},e}(o);t.PowOut=a;var h=function(){function t(){}return t.arrayCopy=function(t,e,n,i,r){for(var s=e,o=i;s=n?e:t.setArraySize(e,n,i)},t.newArray=function(t,e){for(var n=new Array(t),i=0;i0?this.items.pop():this.instantiator()},t.prototype.free=function(t){t.reset&&t.reset(),this.items.push(t)},t.prototype.freeAll=function(t){for(var e=0;ethis.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,this.frameTime>1&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)},t}();t.TimeKeeper=f;var d=function(){function t(t){void 0===t&&(t=32),this.addedValues=0,this.lastValue=0,this.mean=0,this.dirty=!0,this.values=new Array(t)}return t.prototype.hasEnoughData=function(){return this.addedValues>=this.values.length},t.prototype.addValue=function(t){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0},t.prototype.getMean=function(){if(this.hasEnoughData()){if(this.dirty){for(var t=0,e=0;e>1)*s;var o=t.bone.skeleton,a=t.deform,h=this.vertices,l=this.bones;if(null!=l){for(var u=0,c=0,f=0;f0&&(h=a);for(var y,w=(y=t.bone).worldX,E=y.worldY,T=y.a,b=y.b,A=y.c,R=y.d,S=e,I=r;Ithis.vertices.length)throw Error("Mesh can't store more than "+this.maxVertices()+" vertices");this.vertices.set(t,0),this.verticesLength=t.length},e.prototype.setIndices=function(t){if(this.dirtyIndices=!0,t.length>this.indices.length)throw Error("Mesh can't store more than "+this.maxIndices()+" indices");this.indices.set(t,0),this.indicesLength=t.length},e.prototype.draw=function(t,e){this.drawWithOffset(t,e,0,this.indicesLength>0?this.indicesLength:this.verticesLength/this.elementsPerVertex)},e.prototype.drawWithOffset=function(t,e,n,i){var r=this.context.gl;(this.dirtyVertices||this.dirtyIndices)&&this.update(),this.bind(t),this.indicesLength>0?r.drawElements(e,i,r.UNSIGNED_SHORT,2*n):r.drawArrays(e,n,i),this.unbind(t)},e.prototype.bind=function(t){var e=this.context.gl;e.bindBuffer(e.ARRAY_BUFFER,this.verticesBuffer);for(var n=0,i=0;i0&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.indicesBuffer)},e.prototype.unbind=function(t){for(var e=this.context.gl,n=0;n0&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null)},e.prototype.update=function(){var t=this.context.gl;this.dirtyVertices&&(this.verticesBuffer||(this.verticesBuffer=t.createBuffer()),t.bindBuffer(t.ARRAY_BUFFER,this.verticesBuffer),t.bufferData(t.ARRAY_BUFFER,this.vertices.subarray(0,this.verticesLength),t.DYNAMIC_DRAW),this.dirtyVertices=!1),this.dirtyIndices&&(this.indicesBuffer||(this.indicesBuffer=t.createBuffer()),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.indicesBuffer),t.bufferData(t.ELEMENT_ARRAY_BUFFER,this.indices.subarray(0,this.indicesLength),t.DYNAMIC_DRAW),this.dirtyIndices=!1)},e.prototype.restore=function(){this.verticesBuffer=null,this.indicesBuffer=null,this.update()},e.prototype.dispose=function(){this.context.removeRestorable(this);var t=this.context.gl;t.deleteBuffer(this.verticesBuffer),t.deleteBuffer(this.indicesBuffer)},e}();t.Mesh=e;var n=function(){return function(t,e,n){this.name=t,this.type=e,this.numElements=n}}();t.VertexAttribute=n;var i=function(e){function n(){return e.call(this,t.Shader.POSITION,h.Float,2)||this}return r(n,e),n}(n);t.Position2Attribute=i;var s=function(e){function n(){return e.call(this,t.Shader.POSITION,h.Float,3)||this}return r(n,e),n}(n);t.Position3Attribute=s;var o=function(e){function n(n){return void 0===n&&(n=0),e.call(this,t.Shader.TEXCOORDS+(0==n?"":n),h.Float,2)||this}return r(n,e),n}(n);t.TexCoordAttribute=o;var a=function(e){function n(){return e.call(this,t.Shader.COLOR,h.Float,4)||this}return r(n,e),n}(n);t.ColorAttribute=a;var h,l=function(e){function n(){return e.call(this,t.Shader.COLOR2,h.Float,4)||this}return r(n,e),n}(n);t.Color2Attribute=l,function(t){t[t.Float=0]="Float"}(h=t.VertexAttributeType||(t.VertexAttributeType={}))}(t.webgl||(t.webgl={}))}(i||(i={})),function(t){!function(t){var e=function(){function e(e,n,i){if(void 0===n&&(n=!0),void 0===i&&(i=10920),this.isDrawing=!1,this.shader=null,this.lastTexture=null,this.verticesLength=0,this.indicesLength=0,i>10920)throw new Error("Can't have more than 10920 triangles per batch: "+i);this.context=e instanceof t.ManagedWebGLRenderingContext?e:new t.ManagedWebGLRenderingContext(e);var r=n?[new t.Position2Attribute,new t.ColorAttribute,new t.TexCoordAttribute,new t.Color2Attribute]:[new t.Position2Attribute,new t.ColorAttribute,new t.TexCoordAttribute];this.mesh=new t.Mesh(e,r,i,3*i),this.srcBlend=this.context.gl.SRC_ALPHA,this.dstBlend=this.context.gl.ONE_MINUS_SRC_ALPHA}return e.prototype.begin=function(t){var e=this.context.gl;if(this.isDrawing)throw new Error("PolygonBatch is already drawing. Call PolygonBatch.end() before calling PolygonBatch.begin()");this.drawCalls=0,this.shader=t,this.lastTexture=null,this.isDrawing=!0,e.enable(e.BLEND),e.blendFunc(this.srcBlend,this.dstBlend)},e.prototype.setBlendMode=function(t,e){var n=this.context.gl;this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),n.blendFunc(this.srcBlend,this.dstBlend))},e.prototype.draw=function(t,e,n){t!=this.lastTexture?(this.flush(),this.lastTexture=t):(this.verticesLength+e.length>this.mesh.getVertices().length||this.indicesLength+n.length>this.mesh.getIndices().length)&&this.flush();var i=this.mesh.numVertices();this.mesh.getVertices().set(e,this.verticesLength),this.verticesLength+=e.length,this.mesh.setVerticesLength(this.verticesLength);for(var r=this.mesh.getIndices(),s=this.indicesLength,o=0;o0||this.indicesLength>0)&&this.flush(),this.shader=null,this.lastTexture=null,this.isDrawing=!1,t.disable(t.BLEND)},e.prototype.getDrawCalls=function(){return this.drawCalls},e.prototype.dispose=function(){this.mesh.dispose()},e}();t.PolygonBatcher=e}(t.webgl||(t.webgl={}))}(i||(i={})),function(t){!function(e){var n,i=function(){function i(n,i,r){void 0===r&&(r=!0),this.twoColorTint=!1,this.activeRenderer=null,this.QUAD=[0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0],this.QUAD_TRIANGLES=[0,1,2,2,3,0],this.WHITE=new t.Color(1,1,1,1),this.canvas=n,this.context=i instanceof e.ManagedWebGLRenderingContext?i:new e.ManagedWebGLRenderingContext(i),this.twoColorTint=r,this.camera=new e.OrthoCamera(n.width,n.height),this.batcherShader=r?e.Shader.newTwoColoredTextured(this.context):e.Shader.newColoredTextured(this.context),this.batcher=new e.PolygonBatcher(this.context,r),this.shapesShader=e.Shader.newColored(this.context),this.shapes=new e.ShapeRenderer(this.context),this.skeletonRenderer=new e.SkeletonRenderer(this.context,r),this.skeletonDebugRenderer=new e.SkeletonDebugRenderer(this.context)}return i.prototype.begin=function(){this.camera.update(),this.enableRenderer(this.batcher)},i.prototype.drawSkeleton=function(t,e,n,i){void 0===e&&(e=!1),void 0===n&&(n=-1),void 0===i&&(i=-1),this.enableRenderer(this.batcher),this.skeletonRenderer.premultipliedAlpha=e,this.skeletonRenderer.draw(this.batcher,t,n,i)},i.prototype.drawSkeletonDebug=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=null),this.enableRenderer(this.shapes),this.skeletonDebugRenderer.premultipliedAlpha=e,this.skeletonDebugRenderer.draw(this.shapes,t,n)},i.prototype.drawTexture=function(t,e,n,i,r,s){void 0===s&&(s=null),this.enableRenderer(this.batcher),null===s&&(s=this.WHITE);var o=this.QUAD,a=0;o[a++]=e,o[a++]=n,o[a++]=s.r,o[a++]=s.g,o[a++]=s.b,o[a++]=s.a,o[a++]=0,o[a++]=1,this.twoColorTint&&(o[a++]=0,o[a++]=0,o[a++]=0,o[a++]=0),o[a++]=e+i,o[a++]=n,o[a++]=s.r,o[a++]=s.g,o[a++]=s.b,o[a++]=s.a,o[a++]=1,o[a++]=1,this.twoColorTint&&(o[a++]=0,o[a++]=0,o[a++]=0,o[a++]=0),o[a++]=e+i,o[a++]=n+r,o[a++]=s.r,o[a++]=s.g,o[a++]=s.b,o[a++]=s.a,o[a++]=1,o[a++]=0,this.twoColorTint&&(o[a++]=0,o[a++]=0,o[a++]=0,o[a++]=0),o[a++]=e,o[a++]=n+r,o[a++]=s.r,o[a++]=s.g,o[a++]=s.b,o[a++]=s.a,o[a++]=0,o[a++]=0,this.twoColorTint&&(o[a++]=0,o[a++]=0,o[a++]=0,o[a++]=0),this.batcher.draw(t,o,this.QUAD_TRIANGLES)},i.prototype.drawTextureUV=function(t,e,n,i,r,s,o,a,h,l){void 0===l&&(l=null),this.enableRenderer(this.batcher),null===l&&(l=this.WHITE);var u=this.QUAD,c=0;u[c++]=e,u[c++]=n,u[c++]=l.r,u[c++]=l.g,u[c++]=l.b,u[c++]=l.a,u[c++]=s,u[c++]=o,this.twoColorTint&&(u[c++]=0,u[c++]=0,u[c++]=0,u[c++]=0),u[c++]=e+i,u[c++]=n,u[c++]=l.r,u[c++]=l.g,u[c++]=l.b,u[c++]=l.a,u[c++]=a,u[c++]=o,this.twoColorTint&&(u[c++]=0,u[c++]=0,u[c++]=0,u[c++]=0),u[c++]=e+i,u[c++]=n+r,u[c++]=l.r,u[c++]=l.g,u[c++]=l.b,u[c++]=l.a,u[c++]=a,u[c++]=h,this.twoColorTint&&(u[c++]=0,u[c++]=0,u[c++]=0,u[c++]=0),u[c++]=e,u[c++]=n+r,u[c++]=l.r,u[c++]=l.g,u[c++]=l.b,u[c++]=l.a,u[c++]=s,u[c++]=h,this.twoColorTint&&(u[c++]=0,u[c++]=0,u[c++]=0,u[c++]=0),this.batcher.draw(t,u,this.QUAD_TRIANGLES)},i.prototype.drawTextureRotated=function(e,n,i,r,s,o,a,h,l,u){void 0===l&&(l=null),void 0===u&&(u=!1),this.enableRenderer(this.batcher),null===l&&(l=this.WHITE);var c=this.QUAD,f=n+o,d=i+a,p=-o,v=-a,g=r-o,M=s-a,m=p,x=v,y=p,w=M,E=g,T=M,b=g,A=v,R=0,S=0,I=0,C=0,P=0,L=0,k=0,_=0;if(0!=h){var F=t.MathUtils.cosDeg(h),O=t.MathUtils.sinDeg(h);I=(P=F*E-O*T)+((R=F*m-O*x)-(k=F*y-O*w)),C=(L=O*E+F*T)+((S=O*m+F*x)-(_=O*y+F*w))}else R=m,S=x,k=y,_=w,P=E,L=T,I=b,C=A;R+=f,S+=d,I+=f,C+=d,P+=f,L+=d,k+=f,_+=d;var V=0;c[V++]=R,c[V++]=S,c[V++]=l.r,c[V++]=l.g,c[V++]=l.b,c[V++]=l.a,c[V++]=0,c[V++]=1,this.twoColorTint&&(c[V++]=0,c[V++]=0,c[V++]=0,c[V++]=0),c[V++]=I,c[V++]=C,c[V++]=l.r,c[V++]=l.g,c[V++]=l.b,c[V++]=l.a,c[V++]=1,c[V++]=1,this.twoColorTint&&(c[V++]=0,c[V++]=0,c[V++]=0,c[V++]=0),c[V++]=P,c[V++]=L,c[V++]=l.r,c[V++]=l.g,c[V++]=l.b,c[V++]=l.a,c[V++]=1,c[V++]=0,this.twoColorTint&&(c[V++]=0,c[V++]=0,c[V++]=0,c[V++]=0),c[V++]=k,c[V++]=_,c[V++]=l.r,c[V++]=l.g,c[V++]=l.b,c[V++]=l.a,c[V++]=0,c[V++]=0,this.twoColorTint&&(c[V++]=0,c[V++]=0,c[V++]=0,c[V++]=0),this.batcher.draw(e,c,this.QUAD_TRIANGLES)},i.prototype.drawRegion=function(t,e,n,i,r,s,o){void 0===s&&(s=null),void 0===o&&(o=!1),this.enableRenderer(this.batcher),null===s&&(s=this.WHITE);var a=this.QUAD,h=0;a[h++]=e,a[h++]=n,a[h++]=s.r,a[h++]=s.g,a[h++]=s.b,a[h++]=s.a,a[h++]=t.u,a[h++]=t.v2,this.twoColorTint&&(a[h++]=0,a[h++]=0,a[h++]=0,a[h++]=0),a[h++]=e+i,a[h++]=n,a[h++]=s.r,a[h++]=s.g,a[h++]=s.b,a[h++]=s.a,a[h++]=t.u2,a[h++]=t.v2,this.twoColorTint&&(a[h++]=0,a[h++]=0,a[h++]=0,a[h++]=0),a[h++]=e+i,a[h++]=n+r,a[h++]=s.r,a[h++]=s.g,a[h++]=s.b,a[h++]=s.a,a[h++]=t.u2,a[h++]=t.v,this.twoColorTint&&(a[h++]=0,a[h++]=0,a[h++]=0,a[h++]=0),a[h++]=e,a[h++]=n+r,a[h++]=s.r,a[h++]=s.g,a[h++]=s.b,a[h++]=s.a,a[h++]=t.u,a[h++]=t.v,this.twoColorTint&&(a[h++]=0,a[h++]=0,a[h++]=0,a[h++]=0),this.batcher.draw(t.texture,a,this.QUAD_TRIANGLES)},i.prototype.line=function(t,e,n,i,r,s){void 0===r&&(r=null),void 0===s&&(s=null),this.enableRenderer(this.shapes),this.shapes.line(t,e,n,i,r)},i.prototype.triangle=function(t,e,n,i,r,s,o,a,h,l){void 0===a&&(a=null),void 0===h&&(h=null),void 0===l&&(l=null),this.enableRenderer(this.shapes),this.shapes.triangle(t,e,n,i,r,s,o,a,h,l)},i.prototype.quad=function(t,e,n,i,r,s,o,a,h,l,u,c,f){void 0===l&&(l=null),void 0===u&&(u=null),void 0===c&&(c=null),void 0===f&&(f=null),this.enableRenderer(this.shapes),this.shapes.quad(t,e,n,i,r,s,o,a,h,l,u,c,f)},i.prototype.rect=function(t,e,n,i,r,s){void 0===s&&(s=null),this.enableRenderer(this.shapes),this.shapes.rect(t,e,n,i,r,s)},i.prototype.rectLine=function(t,e,n,i,r,s,o){void 0===o&&(o=null),this.enableRenderer(this.shapes),this.shapes.rectLine(t,e,n,i,r,s,o)},i.prototype.polygon=function(t,e,n,i){void 0===i&&(i=null),this.enableRenderer(this.shapes),this.shapes.polygon(t,e,n,i)},i.prototype.circle=function(t,e,n,i,r,s){void 0===r&&(r=null),void 0===s&&(s=0),this.enableRenderer(this.shapes),this.shapes.circle(t,e,n,i,r,s)},i.prototype.curve=function(t,e,n,i,r,s,o,a,h,l){void 0===l&&(l=null),this.enableRenderer(this.shapes),this.shapes.curve(t,e,n,i,r,s,o,a,h,l)},i.prototype.end=function(){this.activeRenderer===this.batcher?this.batcher.end():this.activeRenderer===this.shapes&&this.shapes.end(),this.activeRenderer=null},i.prototype.resize=function(t){var e=this.canvas,i=e.clientWidth,r=e.clientHeight;if(e.width==i&&e.height==r||(e.width=i,e.height=r),this.context.gl.viewport(0,0,e.width,e.height),t===n.Stretch);else if(t===n.Expand)this.camera.setViewport(i,r);else if(t===n.Fit){var s=e.width,o=e.height,a=this.camera.viewportWidth,h=this.camera.viewportHeight,l=h/a10920)throw new Error("Can't have more than 10920 triangles per batch: "+r);this.context=i instanceof e.ManagedWebGLRenderingContext?i:new e.ManagedWebGLRenderingContext(i),this.mesh=new e.Mesh(i,[new e.Position2Attribute,new e.ColorAttribute],r,0),this.srcBlend=this.context.gl.SRC_ALPHA,this.dstBlend=this.context.gl.ONE_MINUS_SRC_ALPHA}return i.prototype.begin=function(t){if(this.isDrawing)throw new Error("ShapeRenderer.begin() has already been called");this.shader=t,this.vertexIndex=0,this.isDrawing=!0;var e=this.context.gl;e.enable(e.BLEND),e.blendFunc(this.srcBlend,this.dstBlend)},i.prototype.setBlendMode=function(t,e){var n=this.context.gl;this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),n.blendFunc(this.srcBlend,this.dstBlend))},i.prototype.setColor=function(t){this.color.setFromColor(t)},i.prototype.setColorWith=function(t,e,n,i){this.color.set(t,e,n,i)},i.prototype.point=function(t,e,i){void 0===i&&(i=null),this.check(n.Point,1),null===i&&(i=this.color),this.vertex(t,e,i)},i.prototype.line=function(t,e,i,r,s){void 0===s&&(s=null),this.check(n.Line,2);this.mesh.getVertices(),this.vertexIndex;null===s&&(s=this.color),this.vertex(t,e,s),this.vertex(i,r,s)},i.prototype.triangle=function(t,e,i,r,s,o,a,h,l,u){void 0===h&&(h=null),void 0===l&&(l=null),void 0===u&&(u=null),this.check(t?n.Filled:n.Line,3);this.mesh.getVertices(),this.vertexIndex;null===h&&(h=this.color),null===l&&(l=this.color),null===u&&(u=this.color),t?(this.vertex(e,i,h),this.vertex(r,s,l),this.vertex(o,a,u)):(this.vertex(e,i,h),this.vertex(r,s,l),this.vertex(r,s,h),this.vertex(o,a,l),this.vertex(o,a,h),this.vertex(e,i,l))},i.prototype.quad=function(t,e,i,r,s,o,a,h,l,u,c,f,d){void 0===u&&(u=null),void 0===c&&(c=null),void 0===f&&(f=null),void 0===d&&(d=null),this.check(t?n.Filled:n.Line,3);this.mesh.getVertices(),this.vertexIndex;null===u&&(u=this.color),null===c&&(c=this.color),null===f&&(f=this.color),null===d&&(d=this.color),t?(this.vertex(e,i,u),this.vertex(r,s,c),this.vertex(o,a,f),this.vertex(o,a,f),this.vertex(h,l,d),this.vertex(e,i,u)):(this.vertex(e,i,u),this.vertex(r,s,c),this.vertex(r,s,c),this.vertex(o,a,f),this.vertex(o,a,f),this.vertex(h,l,d),this.vertex(h,l,d),this.vertex(e,i,u))},i.prototype.rect=function(t,e,n,i,r,s){void 0===s&&(s=null),this.quad(t,e,n,e+i,n,e+i,n+r,e,n+r,s,s,s,s)},i.prototype.rectLine=function(t,e,i,r,s,o,a){void 0===a&&(a=null),this.check(t?n.Filled:n.Line,8),null===a&&(a=this.color);var h=this.tmp.set(s-i,e-r);h.normalize(),o*=.5;var l=h.x*o,u=h.y*o;t?(this.vertex(e+l,i+u,a),this.vertex(e-l,i-u,a),this.vertex(r+l,s+u,a),this.vertex(r-l,s-u,a),this.vertex(r+l,s+u,a),this.vertex(e-l,i-u,a)):(this.vertex(e+l,i+u,a),this.vertex(e-l,i-u,a),this.vertex(r+l,s+u,a),this.vertex(r-l,s-u,a),this.vertex(r+l,s+u,a),this.vertex(e+l,i+u,a),this.vertex(r-l,s-u,a),this.vertex(e-l,i-u,a))},i.prototype.x=function(t,e,n){this.line(t-n,e-n,t+n,e+n),this.line(t-n,e+n,t+n,e-n)},i.prototype.polygon=function(t,e,i,r){if(void 0===r&&(r=null),i<3)throw new Error("Polygon must contain at least 3 vertices");this.check(n.Line,2*i),null===r&&(r=this.color);this.mesh.getVertices(),this.vertexIndex;i<<=1;for(var s=t[e<<=1],o=t[e+1],a=e+i,h=e,l=e+i-2;h=a?(f=s,d=o):(f=t[h+2],d=t[h+3]),this.vertex(u,c,r),this.vertex(f,d,r)}},i.prototype.circle=function(e,i,r,s,o,a){if(void 0===o&&(o=null),void 0===a&&(a=0),0===a&&(a=Math.max(1,6*t.MathUtils.cbrt(s)|0)),a<=0)throw new Error("segments must be > 0.");null===o&&(o=this.color);var h=2*t.MathUtils.PI/a,l=Math.cos(h),u=Math.sin(h),c=s,f=0;if(e){this.check(n.Filled,3*a+3),a--;for(p=0;p0;)this.vertex(E,T,u),E+=b,T+=A,b+=R,A+=S,R+=I,S+=C,this.vertex(E,T,u);this.vertex(E,T,u),this.vertex(a,h,u)},i.prototype.vertex=function(t,e,n){var i=this.vertexIndex,r=this.mesh.getVertices();r[i++]=t,r[i++]=e,r[i++]=n.r,r[i++]=n.g,r[i++]=n.b,r[i++]=n.a,this.vertexIndex=i},i.prototype.end=function(){if(!this.isDrawing)throw new Error("ShapeRenderer.begin() has not been called");this.flush(),this.context.gl.disable(this.context.gl.BLEND),this.isDrawing=!1},i.prototype.flush=function(){0!=this.vertexIndex&&(this.mesh.setVerticesLength(this.vertexIndex),this.mesh.draw(this.shader,this.shapeType),this.vertexIndex=0)},i.prototype.check=function(t,e){if(!this.isDrawing)throw new Error("ShapeRenderer.begin() has not been called");if(this.shapeType==t){if(!(this.mesh.maxVertices()-this.mesh.numVertices()-1)&&null!=f.parent){var d=s+f.data.length*f.a+f.worldX,p=o+f.data.length*f.c+f.worldY;e.rectLine(!0,s+f.worldX,o+f.worldY,d,p,this.boneWidth*this.scale)}}this.drawSkeletonXY&&e.x(s,o,4*this.scale)}if(this.drawRegionAttachments){e.setColor(this.attachmentLineColor);for(u=0,c=(Y=i.slots).length;u0){e.setColor(this.attachmentLineColor);var A=g[(x=2*(x>>1))-2],R=g[x-1];for(y=0,w=x;y-1||e.circle(!0,s+f.worldX,o+f.worldY,3*this.scale,n.GREEN,8)}}if(this.drawClipping){var Y=i.slots;e.setColor(this.clipColor);for(u=0,c=Y.length;u=0&&s==R.data.index&&(E=!0),E){o>=0&&o==R.data.index&&(E=!1);var S=R.getAttachment(),I=null;if(S instanceof t.RegionAttachment){var C=S;v.vertices=this.vertices,v.numVertices=4,v.numFloats=A<<2,C.computeWorldVertices(R.bone,v.vertices,0,A),M=i.QUAD_TRIANGLES,g=C.uvs,I=C.region.renderObject.texture,x=C.color}else{if(!(S instanceof t.MeshAttachment)){if(S instanceof t.ClippingAttachment){var P=S;a.clipStart(R,P);continue}a.clipEndWithSlot(R);continue}var L=S;v.vertices=this.vertices,v.numVertices=L.worldVerticesLength>>1,v.numFloats=v.numVertices*A,v.numFloats>v.vertices.length&&(v.vertices=this.vertices=t.Utils.newFloatArray(v.numFloats)),L.computeWorldVertices(R,0,L.worldVerticesLength,v.vertices,0,A),M=L.triangles,I=L.region.renderObject.texture,g=L.uvs,x=L.color}if(null!=I){var k=R.color,_=this.tempColor;_.r=y.r*k.r*x.r,_.g=y.g*k.g*x.g,_.b=y.b*k.b*x.b,_.a=y.a*k.a*x.a,h&&(_.r*=_.a,_.g*=_.a,_.b*=_.a);var F=this.tempColor2;null==R.darkColor?F.set(0,0,0,1):(h?(F.r=R.darkColor.r*_.a,F.g=R.darkColor.g*_.a,F.b=R.darkColor.b*_.a):F.setFromColor(R.darkColor),F.a=h?1:0);var O=R.data.blendMode;if(O!=u&&(u=O,n.setBlendMode(e.WebGLBlendModeConverter.getSourceGLBlendMode(u,h),e.WebGLBlendModeConverter.getDestGLBlendMode(u))),a.isClipping()){a.clipTriangles(v.vertices,v.numFloats,M,M.length,g,_,F,l);var V=new Float32Array(a.clippedVertices),D=a.clippedTriangles;if(null!=this.vertexEffect){var N=this.vertexEffect,U=V;if(l){X=0;for(var B=V.length;X-1&&this.restorables.splice(e,1)},t}();e.ManagedWebGLRenderingContext=n;var i=function(){function e(){}return e.getDestGLBlendMode=function(n){switch(n){case t.BlendMode.Normal:return e.ONE_MINUS_SRC_ALPHA;case t.BlendMode.Additive:return e.ONE;case t.BlendMode.Multiply:case t.BlendMode.Screen:return e.ONE_MINUS_SRC_ALPHA;default:throw new Error("Unknown blend mode: "+n)}},e.getSourceGLBlendMode=function(n,i){switch(void 0===i&&(i=!1),n){case t.BlendMode.Normal:case t.BlendMode.Additive:return i?e.ONE:e.SRC_ALPHA;case t.BlendMode.Multiply:return e.DST_COLOR;case t.BlendMode.Screen:return e.ONE;default:throw new Error("Unknown blend mode: "+n)}},e.ZERO=0,e.ONE=1,e.SRC_COLOR=768,e.ONE_MINUS_SRC_COLOR=769,e.SRC_ALPHA=770,e.ONE_MINUS_SRC_ALPHA=771,e.DST_ALPHA=772,e.ONE_MINUS_DST_ALPHA=773,e.DST_COLOR=774,e}();e.WebGLBlendModeConverter=i}(t.webgl||(t.webgl={}))}(i||(i={})),t.exports=i}).call(window)},function(t,e,n){var i=n(0),r=n(3),s=n(168),o=n(2),a=n(182),h=n(183),l=n(184),u=new i({Extends:h,initialize:function(t,e,n,i,s,u,c){var f,d,p,v=[],g=t.cacheManager.custom.spine;if(o(e)){var M=e;for(e=r(M,"key"),d=new a(t,{key:e,url:r(M,"jsonURL"),extension:r(M,"jsonExtension","json"),xhrSettings:r(M,"jsonXhrSettings")}),i=r(M,"atlasURL"),s=r(M,"preMultipliedAlpha"),Array.isArray(i)||(i=[i]),f=0;f>16&255)/255,i=(t>>8&255)/255,r=(255&t)/255,s=t>16777215?(t>>>24)/255:null,o=this.skeleton;if(e){var a=this.findSlot(e);a&&(o=a)}return o.color.r=n,o.color.g=i,o.color.b=r,null!==s&&(o.color.a=s),this},setSkeletonFromJSON:function(t,e,n,i){return this.setSkeleton(t,e,n,i)},setSkeleton:function(t,e,n,i){this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications());var r=this.plugin.createSkeleton(t,i);this.skeletonData=r.skeletonData,this.preMultipliedAlpha=r.preMultipliedAlpha;var s=r.skeleton;return s.setSkin(),s.setToSetupPose(),this.skeleton=s,r=this.plugin.createAnimationState(s),this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications()),this.state=r.state,this.stateData=r.stateData,this.state.addListener({event:this.onEvent.bind(this),complete:this.onComplete.bind(this),start:this.onStart.bind(this),end:this.onEnd.bind(this),dispose:this.onDispose.bind(this),interrupted:this.onInterrupted.bind(this)}),e&&this.setAnimation(0,e,n),this.root=this.getRootBone(),this.root&&(this.root.rotation=v(f(this.rotation))+90),this.state.apply(s),s.updateCache(),this.updateSize()},onComplete:function(t){this.emit(g.COMPLETE,t)},onDispose:function(t){this.emit(g.DISPOSE,t)},onEnd:function(t){this.emit(g.END,t)},onEvent:function(t,e){this.emit(g.EVENT,t,e)},onInterrupted:function(t){this.emit(g.INTERRUPTED,t)},onStart:function(t){this.emit(g.START,t)},refresh:function(){return this.root&&(this.root.rotation=v(f(this.rotation))+90),this.updateSize(),this.skeleton.updateCache(),this},setSize:function(t,e,n,i){var r=this.skeleton;return void 0===t&&(t=r.data.width),void 0===e&&(e=r.data.height),void 0===n&&(n=0),void 0===i&&(i=0),this.width=t,this.height=e,this.displayOriginX=r.x-n,this.displayOriginY=r.y-i,this},setOffset:function(t,e){var n=this.skeleton;return void 0===t&&(t=0),void 0===e&&(e=0),this.displayOriginX=n.x-t,this.displayOriginY=n.y-e,this},updateSize:function(){var t=this.skeleton,e=this.plugin.renderer.height,n=this.scaleX,i=this.scaleY;t.x=this.x,t.y=e-this.y,t.scaleX=1,t.scaleY=1,t.updateWorldTransform();var r=this.getBounds();return this.width=r.size.x,this.height=r.size.y,this.displayOriginX=this.x-r.offset.x,this.displayOriginY=this.y-(e-(this.height+r.offset.y)),t.scaleX=n,t.scaleY=i,t.updateWorldTransform(),this},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,this.refresh()}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,this.refresh()}},getBoneList:function(){var t=[],e=this.skeletonData;if(e)for(var n=0;n0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):i||s?r.TAU-(s>0?Math.acos(-i/this.scaleY):-Math.acos(i/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 n=this.matrix;return n[4]=n[0]*t+n[2]*e+n[4],n[5]=n[1]*t+n[3]*e+n[5],this},scale:function(t,e){var n=this.matrix;return n[0]*=t,n[1]*=t,n[2]*=e,n[3]*=e,this},rotate:function(t){var e=Math.sin(t),n=Math.cos(t),i=this.matrix,r=i[0],s=i[1],o=i[2],a=i[3];return i[0]=r*n+o*e,i[1]=s*n+a*e,i[2]=r*-e+o*n,i[3]=s*-e+a*n,this},multiply:function(t,e){var n=this.matrix,i=t.matrix,r=n[0],s=n[1],o=n[2],a=n[3],h=n[4],l=n[5],u=i[0],c=i[1],f=i[2],d=i[3],p=i[4],v=i[5],g=void 0===e?this:e;return g.a=u*r+c*o,g.b=u*s+c*a,g.c=f*r+d*o,g.d=f*s+d*a,g.e=p*r+v*o+h,g.f=p*s+v*a+l,g},multiplyWithOffset:function(t,e,n){var i=this.matrix,r=t.matrix,s=i[0],o=i[1],a=i[2],h=i[3],l=e*s+n*a+i[4],u=e*o+n*h+i[5],c=r[0],f=r[1],d=r[2],p=r[3],v=r[4],g=r[5];return i[0]=c*s+f*a,i[1]=c*o+f*h,i[2]=d*s+p*a,i[3]=d*o+p*h,i[4]=v*s+g*a+l,i[5]=v*o+g*h+u,this},transform:function(t,e,n,i,r,s){var o=this.matrix,a=o[0],h=o[1],l=o[2],u=o[3],c=o[4],f=o[5];return o[0]=t*a+e*l,o[1]=t*h+e*u,o[2]=n*a+i*l,o[3]=n*h+i*u,o[4]=r*a+s*l+c,o[5]=r*h+s*u+f,this},transformPoint:function(t,e,n){void 0===n&&(n={x:0,y:0});var i=this.matrix,r=i[0],s=i[1],o=i[2],a=i[3],h=i[4],l=i[5];return n.x=t*r+e*o+h,n.y=t*s+e*a+l,n},invert:function(){var t=this.matrix,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],o=t[5],a=e*r-n*i;return t[0]=r/a,t[1]=-n/a,t[2]=-i/a,t[3]=e/a,t[4]=(i*o-r*s)/a,t[5]=-(e*o-n*s)/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,n,i,r,s){var o=this.matrix;return o[0]=t,o[1]=e,o[2]=n,o[3]=i,o[4]=r,o[5]=s,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,n=e[0],i=e[1],r=e[2],s=e[3],o=n*s-i*r;if(t.translateX=e[4],t.translateY=e[5],n||i){var a=Math.sqrt(n*n+i*i);t.rotation=i>0?Math.acos(n/a):-Math.acos(n/a),t.scaleX=a,t.scaleY=o/a}else if(r||s){var h=Math.sqrt(r*r+s*s);t.rotation=.5*Math.PI-(s>0?Math.acos(-r/h):-Math.acos(r/h)),t.scaleX=o/h,t.scaleY=h}else t.rotation=0,t.scaleX=0,t.scaleY=0;return t},applyITRS:function(t,e,n,i,r){var s=this.matrix,o=Math.sin(n),a=Math.cos(n);return s[4]=t,s[5]=e,s[0]=a*i,s[1]=o*i,s[2]=-o*r,s[3]=a*r,this},applyInverse:function(t,e,n){void 0===n&&(n=new s);var i=this.matrix,r=i[0],o=i[1],a=i[2],h=i[3],l=i[4],u=i[5],c=1/(r*h+a*-o);return n.x=h*c*t+-a*c*e+(u*a-l*h)*c,n.y=r*c*e+-o*c*t+(-u*r+l*o)*c,n},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},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.decomposedMatrix=null}});t.exports=o},function(t,e){var n={_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=n},function(t,e,n){var i=n(0),r=n(194),s=n(195),o=n(201),a=n(202),h=new i({Extends:o,initialize:function(t,e){o.call(this),this.scene=t,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,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 s(this)),this},setData:function(t,e){return this.data||(this.data=new s(this)),this.data.set(t,e),this},getData:function(t){return this.data||(this.data=new s(this)),this.data.get(t)},setInteractive:function(t,e,n){return this.scene.sys.input.enable(this,t,e,n),this},disableInteractive:function(){return this.input&&(this.input.enabled=!1),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},update:function(){},toJSON:function(){return r(this)},willRender:function(t){return!(h.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,n=[];e&&(n.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return n.unshift(this.scene.sys.displayList.getIndex(t)),n},destroy:function(t){if(void 0===t&&(t=!1),this.scene&&!this.ignoreDestroy){this.preDestroy&&this.preDestroy.call(this),this.emit(a.DESTROY,this);var e=this.scene.sys;t||(e.displayList.remove(this),e.updateList.remove(this)),this.input&&(e.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),t||e.queueDepthSort(),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0,this.removeAllListeners()}}});h.RENDER_MASK=15,t.exports=h},function(t,e){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}},function(t,e,n){var i=n(0),r=n(196),s=new i({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("destroy",this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var n=[],i=0;iMath.PI&&(t-=i.PI2),Math.abs(((t+i.TAU)%i.PI2-i.PI2)%i.PI2)}},function(t,e){t.exports=function(t,e){return Math.random()*(e-t)+t}},function(t,e){t.exports=function(t,e,n){return Math.max(e,Math.min(n,t))}},function(t,e,n){var i=n(1);t.exports=function(t){return t*i.RAD_TO_DEG}},function(t,e,n){var i=new(n(0))({initialize:function(t,e,n){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=n||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new i(this.x,this.y,this.z)},crossVectors:function(t,e){var n=t.x,i=t.y,r=t.z,s=e.x,o=e.y,a=e.z;return this.x=i*a-r*o,this.y=r*s-n*a,this.z=n*o-i*s,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,n){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=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||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,n=t.y-this.y,i=t.z-this.z||0;return Math.sqrt(e*e+n*n+i*i)},distanceSq:function(t){var e=t.x-this.x,n=t.y-this.y,i=t.z-this.z||0;return e*e+n*n+i*i},length:function(){var t=this.x,e=this.y,n=this.z;return Math.sqrt(t*t+e*e+n*n)},lengthSq:function(){var t=this.x,e=this.y,n=this.z;return t*t+e*e+n*n},normalize:function(){var t=this.x,e=this.y,n=this.z,i=t*t+e*e+n*n;return 0s[0]&&(e=1),s[8]>s[3*e+e]&&(e=2),n=a[e],i=a[n],r=Math.sqrt(s[3*e+e]-s[3*n+n]-s[3*i+i]+1),h[e]=.5*r,r=.5/r,h[n]=(s[3*n+e]+s[3*e+n])*r,h[i]=(s[3*i+e]+s[3*e+i])*r,this.x=h[0],this.y=h[1],this.z=h[2],this.w=(s[3*i+n]-s[3*n+i])*r),this}});t.exports=d},function(t,e,n){var r=n(15),s=n(33);t.exports=function(t,e){var n=void 0===t?s():r({},t);if(e)for(var i in e)void 0!==e[i]&&(n[i]=e[i]);return n}},function(t,e){t.exports=function(t,e,n,i,r,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===n&&(n=""),void 0===i&&(i=""),void 0===r&&(r=0),void 0===s&&(s=!1),{responseType:t,async:e,user:n,password:i,timeout:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:s}}},function(t,e){t.exports=function(){}},function(t,e,n){var u=n(36),i=n(0),p=n(12),r=n(150),s=n(151),v=n(175),h=n(176),c=n(194),o=new i({Extends:s,initialize:function(t,e){s.call(this,t,e);var n=e.game;this.isWebGL=2===n.config.renderType,this.cache=n.cache.addCustom("spine"),this.spineTextures=n.cache.addCustom("spineTextures"),this.json=n.cache.json,this.textures=n.textures,this.drawDebug=!1,this.gl,this.renderer,this.sceneRenderer,this.skeletonRenderer,this.skeletonDebugRenderer,this.plugin=v,this.temp1,this.temp2,this.isWebGL?(this.runtime=v.webgl,this.renderer=n.renderer,this.gl=n.renderer.gl,this.getAtlas=this.getAtlasWebGL):(this.runtime=v.canvas,this.renderer=n.renderer,this.getAtlas=this.getAtlasCanvas);var l=this;e.registerFileType("spine",this.spineFileCallback,t),e.registerGameObject("spine",function(t,e,n,i,r){var s=new c(this.scene,l,t,e,n,i,r);return this.displayList.add(s),this.updateList.add(s),s},function(t,e){void 0===t&&(t={});var n=p(t,"key",null),i=p(t,"animationName",null),r=p(t,"loop",!1),s=new c(this.scene,l,0,0,n,i,r);void 0!==e&&(t.add=e),u(this.scene,s,t);var o=p(t,"skinName",!1);o&&s.setSkinByName(o);var a=p(t,"slotName",!1),h=p(t,"attachmentName",null);return a&&s.setAttachment(a,h),s.refresh()})},boot:function(){this.isWebGL?(this.bootWebGL(),this.onResize(),this.game.scale.on(r,this.onResize,this)):this.bootCanvas();var t=this.systems.events;t.once("shutdown",this.shutdown,this),t.once("destroy",this.destroy,this)},bootCanvas:function(){this.skeletonRenderer=new v.canvas.SkeletonRenderer(this.scene.sys.context)},bootWebGL:function(){this.sceneRenderer=new v.webgl.SceneRenderer(this.renderer.canvas,this.gl,!0);function t(t,e){var n;t===this.srcBlend&&e===this.dstBlend||(n=this.context.gl,this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),n.blendFunc(this.srcBlend,this.dstBlend)))}this.sceneRenderer.batcher.setBlendMode=t,this.sceneRenderer.shapes.setBlendMode=t,this.skeletonRenderer=this.sceneRenderer.skeletonRenderer,this.skeletonDebugRenderer=this.sceneRenderer.skeletonDebugRenderer,this.temp1=new v.webgl.Vector3(0,0,0),this.temp2=new v.webgl.Vector3(0,0,0)},getAtlasCanvas:function(t){var e=this.cache.get(t);if(e){var n,i=this.spineTextures;return i.has(t)?i.get(t):(n=this.textures,new v.TextureAtlas(e.data,function(t){return new v.canvas.CanvasTexture(n.get(e.prefix+t).getSourceImage())}))}console.warn("No atlas data for: "+t)},getAtlasWebGL:function(t){var e=this.cache.get(t);if(e){var n,i,r=this.spineTextures,s=r.has(t)?r.get(t):(n=this.textures,(i=this.sceneRenderer.context.gl).pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),new v.TextureAtlas(e.data,function(t){return new v.webgl.GLTexture(i,n.get(e.prefix+t).getSourceImage(),!1)}));return s}console.warn("No atlas data for: "+t)},spineFileCallback:function(t,e,n,i,r,s){var o;if(Array.isArray(t))for(var a=0;a=i.PI2-n?t=e:(Math.abs(e-t)>Math.PI&&(e>>0,n=(e*=n)>>>0,n+=4294967296*(e-=n);return 2.3283064365386963e-10*((this.n=n)>>>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;e= 0.");if(null==e)throw new Error("name cannot be null.");this.index=t,this.name=e,this.parent=n}function de(t,e){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.mix=t.mix,this.softness=t.softness,this.bendDirection=t.bendDirection,this.compress=t.compress,this.stretch=t.stretch,this.bones=new Array;for(var n=0;n= 0.");if(null==e)throw new Error("name cannot be null.");if(null==n)throw new Error("boneData cannot be null.");this.index=t,this.name=e,this.boneData=n}function be(t,e){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new N.Vector2,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.rotateMix=t.rotateMix,this.translateMix=t.translateMix,this.scaleMix=t.scaleMix,this.shearMix=t.shearMix,this.bones=new Array;for(var n=0;n>>1;;){if(t[(s+1)*n]<=e?i=s+1:r=s,i==r)return(i+1)*n;s=i+r>>>1}},r.linearSearch=function(t,e,n){for(var i=0,r=t.length-n;i<=r;i+=n)if(t[i]>e)return i;return-1},r);function r(t,e,n){if(null==t)throw new Error("name cannot be null.");if(null==e)throw new Error("timelines cannot be null.");this.name=t,this.timelines=e,this.timelineIds=[];for(var i=0;i 0: "+t);this.curves=X.Utils.newFloatArray((t-1)*m.BEZIER_SIZE)}X.CurveTimeline=s;var o,a=(oe(M,o=s),M.prototype.getPropertyId=function(){return(n.rotate<<24)+this.boneIndex},M.prototype.setFrame=function(t,e,n){t<<=1,this.frames[t]=e,this.frames[t+M.ROTATION]=n},M.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=a[a.length-M.ENTRIES]){var u=a[a.length+M.PREV_ROTATION];switch(s){case Y.setup:h.rotation=h.data.rotation+u*r;break;case Y.first:case Y.replace:u+=h.data.rotation-h.rotation,u-=360*(16384-(16384.499999999996-u/360|0));case Y.add:h.rotation+=u*r}}else{var c=z.binarySearch(a,n,M.ENTRIES),d=a[c+M.PREV_ROTATION],f=a[c],p=this.getCurvePercent((c>>1)-1,1-(n-f)/(a[c+M.PREV_TIME]-f)),v=d+((v=a[c+M.ROTATION]-d)-360*(16384-(16384.499999999996-v/360|0)))*p;switch(s){case Y.setup:h.rotation=h.data.rotation+(v-360*(16384-(16384.499999999996-v/360|0)))*r;break;case Y.first:case Y.replace:v+=h.data.rotation-h.rotation;case Y.add:h.rotation+=(v-360*(16384-(16384.499999999996-v/360|0)))*r}}},M.ENTRIES=2,M.PREV_TIME=-2,M.PREV_ROTATION=-1,M.ROTATION=1,M);function M(t){var e=o.call(this,t)||this;return e.frames=X.Utils.newFloatArray(t<<1),e}X.RotateTimeline=a;var h,l=(oe(p,h=s),p.prototype.getPropertyId=function(){return(n.translate<<24)+this.boneIndex},p.prototype.setFrame=function(t,e,n,i){t*=p.ENTRIES,this.frames[t]=e,this.frames[t+p.X]=n,this.frames[t+p.Y]=i},p.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=a[a.length-p.ENTRIES]?(d=a[a.length+p.PREV_X],f=a[a.length+p.PREV_Y]):(d=a[(l=z.binarySearch(a,n,p.ENTRIES))+p.PREV_X],f=a[l+p.PREV_Y],u=a[l],c=this.getCurvePercent(l/p.ENTRIES-1,1-(n-u)/(a[l+p.PREV_TIME]-u)),d+=(a[l+p.X]-d)*c,f+=(a[l+p.Y]-f)*c),s){case Y.setup:h.x=h.data.x+d*r,h.y=h.data.y+f*r;break;case Y.first:case Y.replace:h.x+=(h.data.x+d-h.x)*r,h.y+=(h.data.y+f-h.y)*r;break;case Y.add:h.x+=d*r,h.y+=f*r}}},p.ENTRIES=3,p.PREV_TIME=-3,p.PREV_X=-2,p.PREV_Y=-1,p.X=1,p.Y=2,p);function p(t){var e=h.call(this,t)||this;return e.frames=X.Utils.newFloatArray(t*p.ENTRIES),e}X.TranslateTimeline=l;var u,c=(oe(x,u=l),x.prototype.getPropertyId=function(){return(n.scale<<24)+this.boneIndex},x.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=a[a.length-x.ENTRIES]?(d=a[a.length+x.PREV_X]*h.data.scaleX,a[a.length+x.PREV_Y]*h.data.scaleY):(d=a[(l=z.binarySearch(a,n,x.ENTRIES))+x.PREV_X],f=a[l+x.PREV_Y],u=a[l],c=this.getCurvePercent(l/x.ENTRIES-1,1-(n-u)/(a[l+x.PREV_TIME]-u)),d=(d+(a[l+x.X]-d)*c)*h.data.scaleX,(f+(a[l+x.Y]-f)*c)*h.data.scaleY),1==r)s==Y.add?(h.scaleX+=d-h.data.scaleX,h.scaleY+=f-h.data.scaleY):(h.scaleX=d,h.scaleY=f);else{var p=0,v=0;if(o==g.mixOut)switch(s){case Y.setup:p=h.data.scaleX,v=h.data.scaleY,h.scaleX=p+(Math.abs(d)*X.MathUtils.signum(p)-p)*r,h.scaleY=v+(Math.abs(f)*X.MathUtils.signum(v)-v)*r;break;case Y.first:case Y.replace:p=h.scaleX,v=h.scaleY,h.scaleX=p+(Math.abs(d)*X.MathUtils.signum(p)-p)*r,h.scaleY=v+(Math.abs(f)*X.MathUtils.signum(v)-v)*r;break;case Y.add:p=h.scaleX,v=h.scaleY,h.scaleX=p+(Math.abs(d)*X.MathUtils.signum(p)-h.data.scaleX)*r,h.scaleY=v+(Math.abs(f)*X.MathUtils.signum(v)-h.data.scaleY)*r}else switch(s){case Y.setup:p=Math.abs(h.data.scaleX)*X.MathUtils.signum(d),v=Math.abs(h.data.scaleY)*X.MathUtils.signum(f),h.scaleX=p+(d-p)*r,h.scaleY=v+(f-v)*r;break;case Y.first:case Y.replace:p=Math.abs(h.scaleX)*X.MathUtils.signum(d),v=Math.abs(h.scaleY)*X.MathUtils.signum(f),h.scaleX=p+(d-p)*r,h.scaleY=v+(f-v)*r;break;case Y.add:p=X.MathUtils.signum(d),v=X.MathUtils.signum(f),h.scaleX=Math.abs(h.scaleX)*p+(d-Math.abs(h.data.scaleX)*p)*r,h.scaleY=Math.abs(h.scaleY)*v+(f-Math.abs(h.data.scaleY)*v)*r}}}},x);function x(t){return u.call(this,t)||this}X.ScaleTimeline=c;var d,f=(oe(v,d=l),v.prototype.getPropertyId=function(){return(n.shear<<24)+this.boneIndex},v.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=a[a.length-v.ENTRIES]?(d=a[a.length+v.PREV_X],f=a[a.length+v.PREV_Y]):(d=a[(l=z.binarySearch(a,n,v.ENTRIES))+v.PREV_X],f=a[l+v.PREV_Y],u=a[l],c=this.getCurvePercent(l/v.ENTRIES-1,1-(n-u)/(a[l+v.PREV_TIME]-u)),d+=(a[l+v.X]-d)*c,f+=(a[l+v.Y]-f)*c),s){case Y.setup:h.shearX=h.data.shearX+d*r,h.shearY=h.data.shearY+f*r;break;case Y.first:case Y.replace:h.shearX+=(h.data.shearX+d-h.shearX)*r,h.shearY+=(h.data.shearY+f-h.shearY)*r;break;case Y.add:h.shearX+=d*r,h.shearY+=f*r}}},v);function v(t){return d.call(this,t)||this}X.ShearTimeline=f;var y,w=(oe(E,y=s),E.prototype.getPropertyId=function(){return(n.color<<24)+this.slotIndex},E.prototype.setFrame=function(t,e,n,i,r,s){t*=E.ENTRIES,this.frames[t]=e,this.frames[t+E.R]=n,this.frames[t+E.G]=i,this.frames[t+E.B]=r,this.frames[t+E.A]=s},E.prototype.apply=function(t,e,n,i,r,s,o){var a=t.slots[this.slotIndex];if(a.bone.active){var h=this.frames;if(n=h[h.length-E.ENTRIES]?(v=h[(c=h.length)+E.PREV_R],g=h[c+E.PREV_G],M=h[c+E.PREV_B],m=h[c+E.PREV_A]):(v=h[(d=z.binarySearch(h,n,E.ENTRIES))+E.PREV_R],g=h[d+E.PREV_G],M=h[d+E.PREV_B],m=h[d+E.PREV_A],f=h[d],p=this.getCurvePercent(d/E.ENTRIES-1,1-(n-f)/(h[d+E.PREV_TIME]-f)),v+=(h[d+E.R]-v)*p,g+=(h[d+E.G]-g)*p,M+=(h[d+E.B]-M)*p,m+=(h[d+E.A]-m)*p),1==r?a.color.set(v,g,M,m):(l=a.color,s==Y.setup&&l.setFromColor(a.data.color),l.add((v-l.r)*r,(g-l.g)*r,(M-l.b)*r,(m-l.a)*r))}}},E.ENTRIES=5,E.PREV_TIME=-5,E.PREV_R=-4,E.PREV_G=-3,E.PREV_B=-2,E.PREV_A=-1,E.R=1,E.G=2,E.B=3,E.A=4,E);function E(t){var e=y.call(this,t)||this;return e.frames=X.Utils.newFloatArray(t*E.ENTRIES),e}X.ColorTimeline=w;var T,b=(oe(A,T=s),A.prototype.getPropertyId=function(){return(n.twoColor<<24)+this.slotIndex},A.prototype.setFrame=function(t,e,n,i,r,s,o,a,h){t*=A.ENTRIES,this.frames[t]=e,this.frames[t+A.R]=n,this.frames[t+A.G]=i,this.frames[t+A.B]=r,this.frames[t+A.A]=s,this.frames[t+A.R2]=o,this.frames[t+A.G2]=a,this.frames[t+A.B2]=h},A.prototype.apply=function(t,e,n,i,r,s,o){var a=t.slots[this.slotIndex];if(a.bone.active){var h=this.frames;if(n=h[h.length-A.ENTRIES]?(M=h[(f=h.length)+A.PREV_R],m=h[f+A.PREV_G],x=h[f+A.PREV_B],y=h[f+A.PREV_A],w=h[f+A.PREV_R2],E=h[f+A.PREV_G2],T=h[f+A.PREV_B2]):(M=h[(p=z.binarySearch(h,n,A.ENTRIES))+A.PREV_R],m=h[p+A.PREV_G],x=h[p+A.PREV_B],y=h[p+A.PREV_A],w=h[p+A.PREV_R2],E=h[p+A.PREV_G2],T=h[p+A.PREV_B2],v=h[p],g=this.getCurvePercent(p/A.ENTRIES-1,1-(n-v)/(h[p+A.PREV_TIME]-v)),M+=(h[p+A.R]-M)*g,m+=(h[p+A.G]-m)*g,x+=(h[p+A.B]-x)*g,y+=(h[p+A.A]-y)*g,w+=(h[p+A.R2]-w)*g,E+=(h[p+A.G2]-E)*g,T+=(h[p+A.B2]-T)*g),1==r?(a.color.set(M,m,x,y),a.darkColor.set(w,E,T,1)):(l=a.color,u=a.darkColor,s==Y.setup&&(l.setFromColor(a.data.color),u.setFromColor(a.data.darkColor)),l.add((M-l.r)*r,(m-l.g)*r,(x-l.b)*r,(y-l.a)*r),u.add((w-u.r)*r,(E-u.g)*r,(T-u.b)*r,0))}}},A.ENTRIES=8,A.PREV_TIME=-8,A.PREV_R=-7,A.PREV_G=-6,A.PREV_B=-5,A.PREV_A=-4,A.PREV_R2=-3,A.PREV_G2=-2,A.PREV_B2=-1,A.R=1,A.G=2,A.B=3,A.A=4,A.R2=5,A.G2=6,A.B2=7,A);function A(t){var e=T.call(this,t)||this;return e.frames=X.Utils.newFloatArray(t*A.ENTRIES),e}X.TwoColorTimeline=b;var R=(S.prototype.getPropertyId=function(){return(n.attachment<<24)+this.slotIndex},S.prototype.getFrameCount=function(){return this.frames.length},S.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.attachmentNames[t]=n},S.prototype.apply=function(t,e,n,i,r,s,o){var a,h,l,u=t.slots[this.slotIndex];u.bone.active&&(o!=g.mixOut?n<(a=this.frames)[0]?s!=Y.setup&&s!=Y.first||this.setAttachment(t,u,u.data.attachmentName):(h=0,h=n>=a[a.length-1]?a.length-1:z.binarySearch(a,n,1)-1,l=this.attachmentNames[h],t.slots[this.slotIndex].setAttachment(null==l?null:t.getAttachment(this.slotIndex,l))):s==Y.setup&&this.setAttachment(t,u,u.data.attachmentName))},S.prototype.setAttachment=function(t,e,n){e.attachment=null==n?null:t.getAttachment(this.slotIndex,n)},S);function S(t){this.frames=X.Utils.newFloatArray(t),this.attachmentNames=new Array(t)}X.AttachmentTimeline=R;var I,C=null,P=(oe(L,I=s),L.prototype.getPropertyId=function(){return(n.deform<<27)+ +this.attachment.id+this.slotIndex},L.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.frameVertices[t]=n},L.prototype.apply=function(t,e,n,i,r,s,o){var a=t.slots[this.slotIndex];if(a.bone.active){var h=a.getAttachment();if(h instanceof X.VertexAttachment&&h.deformAttachment==this.attachment){var l=a.deform;0==l.length&&(s=Y.setup);var u=this.frameVertices,c=u[0].length,d=this.frames;if(n=d[d.length-1]){var m=u[d.length-1];if(1==r)if(s==Y.add)if(null==(f=h).bones)for(var v=f.vertices,x=0;x=a[h-1])return;if(!(n=a[l];l++)i.push(this.events[l])}}},k);function k(t){this.frames=X.Utils.newFloatArray(t),this.events=new Array(t)}X.EventTimeline=_;var F=(O.prototype.getPropertyId=function(){return n.drawOrder<<24},O.prototype.getFrameCount=function(){return this.frames.length},O.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.drawOrders[t]=n},O.prototype.apply=function(t,e,n,i,r,s,o){var a=t.drawOrder,h=t.slots;if(o!=g.mixOut){var l=this.frames;if(n=l[l.length-1]?l.length-1:z.binarySearch(l,n)-1,c=this.drawOrders[u];if(null==c)X.Utils.arrayCopy(h,0,a,0,h.length);else for(var d=0,f=c.length;d=d[d.length-N.ENTRIES]?s==Y.setup?(f.mix=f.data.mix+(d[d.length+N.PREV_MIX]-f.data.mix)*r,f.softness=f.data.softness+(d[d.length+N.PREV_SOFTNESS]-f.data.softness)*r,o==g.mixOut?(f.bendDirection=f.data.bendDirection,f.compress=f.data.compress,f.stretch=f.data.stretch):(f.bendDirection=d[d.length+N.PREV_BEND_DIRECTION],f.compress=0!=d[d.length+N.PREV_COMPRESS],f.stretch=0!=d[d.length+N.PREV_STRETCH])):(f.mix+=(d[d.length+N.PREV_MIX]-f.mix)*r,f.softness+=(d[d.length+N.PREV_SOFTNESS]-f.softness)*r,o==g.mixIn&&(f.bendDirection=d[d.length+N.PREV_BEND_DIRECTION],f.compress=0!=d[d.length+N.PREV_COMPRESS],f.stretch=0!=d[d.length+N.PREV_STRETCH])):(h=d[(a=z.binarySearch(d,n,N.ENTRIES))+N.PREV_MIX],l=d[a+N.PREV_SOFTNESS],u=d[a],c=this.getCurvePercent(a/N.ENTRIES-1,1-(n-u)/(d[a+N.PREV_TIME]-u)),s==Y.setup?(f.mix=f.data.mix+(h+(d[a+N.MIX]-h)*c-f.data.mix)*r,f.softness=f.data.softness+(l+(d[a+N.SOFTNESS]-l)*c-f.data.softness)*r,o==g.mixOut?(f.bendDirection=f.data.bendDirection,f.compress=f.data.compress,f.stretch=f.data.stretch):(f.bendDirection=d[a+N.PREV_BEND_DIRECTION],f.compress=0!=d[a+N.PREV_COMPRESS],f.stretch=0!=d[a+N.PREV_STRETCH])):(f.mix+=(h+(d[a+N.MIX]-h)*c-f.mix)*r,f.softness+=(l+(d[a+N.SOFTNESS]-l)*c-f.softness)*r,o==g.mixIn&&(f.bendDirection=d[a+N.PREV_BEND_DIRECTION],f.compress=0!=d[a+N.PREV_COMPRESS],f.stretch=0!=d[a+N.PREV_STRETCH])))},N.ENTRIES=6,N.PREV_TIME=-6,N.PREV_MIX=-5,N.PREV_SOFTNESS=-4,N.PREV_BEND_DIRECTION=-3,N.PREV_COMPRESS=-2,N.PREV_STRETCH=-1,N.MIX=1,N.SOFTNESS=2,N.BEND_DIRECTION=3,N.COMPRESS=4,N.STRETCH=5,N);function N(t){var e=V.call(this,t)||this;return e.frames=X.Utils.newFloatArray(t*N.ENTRIES),e}X.IkConstraintTimeline=D;var U,B=(oe(W,U=s),W.prototype.getPropertyId=function(){return(n.transformConstraint<<24)+this.transformConstraintIndex},W.prototype.setFrame=function(t,e,n,i,r,s){t*=W.ENTRIES,this.frames[t]=e,this.frames[t+W.ROTATE]=n,this.frames[t+W.TRANSLATE]=i,this.frames[t+W.SCALE]=r,this.frames[t+W.SHEAR]=s},W.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.transformConstraints[this.transformConstraintIndex];if(h.active)if(n=a[a.length-W.ENTRIES]?(p=a[(u=a.length)+W.PREV_ROTATE],v=a[u+W.PREV_TRANSLATE],g=a[u+W.PREV_SCALE],M=a[u+W.PREV_SHEAR]):(p=a[(c=z.binarySearch(a,n,W.ENTRIES))+W.PREV_ROTATE],v=a[c+W.PREV_TRANSLATE],g=a[c+W.PREV_SCALE],M=a[c+W.PREV_SHEAR],d=a[c],f=this.getCurvePercent(c/W.ENTRIES-1,1-(n-d)/(a[c+W.PREV_TIME]-d)),p+=(a[c+W.ROTATE]-p)*f,v+=(a[c+W.TRANSLATE]-v)*f,g+=(a[c+W.SCALE]-g)*f,M+=(a[c+W.SHEAR]-M)*f),s==Y.setup?(l=h.data,h.rotateMix=l.rotateMix+(p-l.rotateMix)*r,h.translateMix=l.translateMix+(v-l.translateMix)*r,h.scaleMix=l.scaleMix+(g-l.scaleMix)*r,h.shearMix=l.shearMix+(M-l.shearMix)*r):(h.rotateMix+=(p-h.rotateMix)*r,h.translateMix+=(v-h.translateMix)*r,h.scaleMix+=(g-h.scaleMix)*r,h.shearMix+=(M-h.shearMix)*r)}},W.ENTRIES=5,W.PREV_TIME=-5,W.PREV_ROTATE=-4,W.PREV_TRANSLATE=-3,W.PREV_SCALE=-2,W.PREV_SHEAR=-1,W.ROTATE=1,W.TRANSLATE=2,W.SCALE=3,W.SHEAR=4,W);function W(t){var e=U.call(this,t)||this;return e.frames=X.Utils.newFloatArray(t*W.ENTRIES),e}X.TransformConstraintTimeline=B;var q,G=(oe(H,q=s),H.prototype.getPropertyId=function(){return(n.pathConstraintPosition<<24)+this.pathConstraintIndex},H.prototype.setFrame=function(t,e,n){t*=H.ENTRIES,this.frames[t]=e,this.frames[t+H.VALUE]=n},H.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n=a[a.length-H.ENTRIES]?d=a[a.length+H.PREV_VALUE]:(d=a[(l=z.binarySearch(a,n,H.ENTRIES))+H.PREV_VALUE],u=a[l],c=this.getCurvePercent(l/H.ENTRIES-1,1-(n-u)/(a[l+H.PREV_TIME]-u)),d+=(a[l+H.VALUE]-d)*c),s==Y.setup?h.position=h.data.position+(d-h.data.position)*r:h.position+=(d-h.position)*r}},H.ENTRIES=2,H.PREV_TIME=-2,H.PREV_VALUE=-1,H.VALUE=1,H);function H(t){var e=q.call(this,t)||this;return e.frames=X.Utils.newFloatArray(t*H.ENTRIES),e}X.PathConstraintPositionTimeline=G;var j,Z=(oe(K,j=G),K.prototype.getPropertyId=function(){return(n.pathConstraintSpacing<<24)+this.pathConstraintIndex},K.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n=a[a.length-K.ENTRIES]?d=a[a.length+K.PREV_VALUE]:(d=a[(l=z.binarySearch(a,n,K.ENTRIES))+K.PREV_VALUE],u=a[l],c=this.getCurvePercent(l/K.ENTRIES-1,1-(n-u)/(a[l+K.PREV_TIME]-u)),d+=(a[l+K.VALUE]-d)*c),s==Y.setup?h.spacing=h.data.spacing+(d-h.data.spacing)*r:h.spacing+=(d-h.spacing)*r}},K);function K(t){return j.call(this,t)||this}X.PathConstraintSpacingTimeline=Z;var Q,J=(oe($,Q=s),$.prototype.getPropertyId=function(){return(n.pathConstraintMix<<24)+this.pathConstraintIndex},$.prototype.setFrame=function(t,e,n,i){t*=$.ENTRIES,this.frames[t]=e,this.frames[t+$.ROTATE]=n,this.frames[t+$.TRANSLATE]=i},$.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n=a[a.length-$.ENTRIES]?(d=a[a.length+$.PREV_ROTATE],f=a[a.length+$.PREV_TRANSLATE]):(d=a[(l=z.binarySearch(a,n,$.ENTRIES))+$.PREV_ROTATE],f=a[l+$.PREV_TRANSLATE],u=a[l],c=this.getCurvePercent(l/$.ENTRIES-1,1-(n-u)/(a[l+$.PREV_TIME]-u)),d+=(a[l+$.ROTATE]-d)*c,f+=(a[l+$.TRANSLATE]-f)*c),s==Y.setup?(h.rotateMix=h.data.rotateMix+(d-h.data.rotateMix)*r,h.translateMix=h.data.translateMix+(f-h.data.translateMix)*r):(h.rotateMix+=(d-h.rotateMix)*r,h.translateMix+=(f-h.translateMix)*r)}},$.ENTRIES=3,$.PREV_TIME=-3,$.PREV_ROTATE=-2,$.PREV_TRANSLATE=-1,$.ROTATE=1,$.TRANSLATE=2,$);function $(t){var e=Q.call(this,t)||this;return e.frames=X.Utils.newFloatArray(t*$.ENTRIES),e}X.PathConstraintMixTimeline=J}(re=re||{}),function(R){var t=(S.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,n=0,i=e.length;n=r.trackEnd&&null==r.mixingFrom){e[n]=null,this.queue.end(r),this.disposeNext(r);continue}if(null!=r.mixingFrom&&this.updateMixingFrom(r,t)){var h=r.mixingFrom;for((r.mixingFrom=null)!=h&&(h.mixingTo=null);null!=h;)this.queue.end(h),h=h.mixingFrom}r.trackTime+=s}}this.queue.drain()},S.prototype.updateMixingFrom=function(t,e){var n=t.mixingFrom;if(null==n)return!0;var i=this.updateMixingFrom(n,e);return n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,0=t.mixDuration?(0!=n.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=n.mixingFrom,null!=n.mixingFrom&&(n.mixingFrom.mixingTo=t),t.interruptAlpha=n.interruptAlpha,this.queue.end(n)),i):(n.trackTime+=e*n.timeScale,t.mixTime+=e,!1)},S.prototype.apply=function(t){if(null==t)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var e=this.events,n=this.tracks,i=!1,r=0,s=n.length;r=o.trackEnd&&null==o.next&&(h=0);var l=o.animationLast,u=o.getAnimationTime(),c=o.animation.timelines.length,d=o.animation.timelines;if(0==r&&1==h||a==R.MixBlend.add)for(var f=0;f=s[s.length-1]?s.length-1:R.Animation.binarySearch(s,n)-1,this.setAttachment(e,a,t.attachmentNames[o],r)),a.attachmentState<=this.unkeyedState&&(a.attachmentState=this.unkeyedState+S.SETUP))},S.prototype.setAttachment=function(t,e,n,i){e.attachment=null==n?null:t.getAttachment(e.data.index,n),i&&(e.attachmentState=this.unkeyedState+S.CURRENT)},S.prototype.applyRotateTimeline=function(t,e,n,i,r,s,o,a){if(a&&(s[o]=0),1!=i){var h=t,l=h.frames,u=e.bones[h.boneIndex];if(u.active){var c=0,d=0;if(n=l[l.length-R.RotateTimeline.ENTRIES]?d=u.data.rotation+l[l.length+R.RotateTimeline.PREV_ROTATION]:(p=l[(f=R.Animation.binarySearch(l,n,R.RotateTimeline.ENTRIES))+R.RotateTimeline.PREV_ROTATION],v=l[f],g=h.getCurvePercent((f>>1)-1,1-(n-v)/(l[f+R.RotateTimeline.PREV_TIME]-v)),d=l[f+R.RotateTimeline.ROTATION]-p,d=p+(d-=360*(16384-(16384.499999999996-d/360|0)))*g+u.data.rotation,d-=360*(16384-(16384.499999999996-d/360|0)))}var M,m,x,y,w=0,E=d-c;0==(E-=360*(16384-(16384.499999999996-E/360|0)))?w=s[o]:(m=M=0,m=a?(M=0,E):(M=s[o],s[o+1]),x=0i||this.queue.event(t,l)}for((t.loop?0==r||s>t.trackTime%r:i<=e&&t.animationLast=this.tracks.length)){var e=this.tracks[t];if(null!=e){this.queue.end(e),this.disposeNext(e);for(var n=e;;){var i=n.mixingFrom;if(null==i)break;this.queue.end(i),n.mixingFrom=null,n.mixingTo=null,n=i}this.tracks[e.trackIndex]=null,this.queue.drain()}}},S.prototype.setCurrent=function(t,e,n){var i=this.expandToIndex(t);this.tracks[t]=e,null!=i&&(n&&this.queue.interrupt(i),((e.mixingFrom=i).mixingTo=e).mixTime=0,null!=i.mixingFrom&&0=this.tracks.length?null:this.tracks[t]},S.prototype.addListener=function(t){if(null==t)throw new Error("listener cannot be null.");this.listeners.push(t)},S.prototype.removeListener=function(t){var e=this.listeners.indexOf(t);0<=e&&this.listeners.splice(e,1)},S.prototype.clearListeners=function(){this.listeners.length=0},S.prototype.clearListenerNotifications=function(){this.queue.clear()},S.emptyAnimation=new R.Animation("",[],0),S.SUBSEQUENT=0,S.FIRST=1,S.HOLD_SUBSEQUENT=2,S.HOLD_FIRST=3,S.HOLD_MIX=4,S.SETUP=1,S.CURRENT=2,S);function S(t){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new r(this),this.propertyIDs=new R.IntSet,this.animationsChanged=!1,this.trackEntryPool=new R.Pool(function(){return new e}),this.data=t}R.AnimationState=t;var e=(n.prototype.reset=function(){this.next=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0},n.prototype.getAnimationTime=function(){if(this.loop){var t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)},n.prototype.setAnimationLast=function(t){this.animationLast=t,this.nextAnimationLast=t},n.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},n.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},n);function n(){this.mixBlend=R.MixBlend.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}R.TrackEntry=e;var a,i,r=(s.prototype.start=function(t){this.objects.push(a.start),this.objects.push(t),this.animState.animationsChanged=!0},s.prototype.interrupt=function(t){this.objects.push(a.interrupt),this.objects.push(t)},s.prototype.end=function(t){this.objects.push(a.end),this.objects.push(t),this.animState.animationsChanged=!0},s.prototype.dispose=function(t){this.objects.push(a.dispose),this.objects.push(t)},s.prototype.complete=function(t){this.objects.push(a.complete),this.objects.push(t)},s.prototype.event=function(t,e){this.objects.push(a.event),this.objects.push(t),this.objects.push(e)},s.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var t=this.objects,e=this.animState.listeners,n=0;nj.MathUtils.PI?U-=j.MathUtils.PI2:U<-j.MathUtils.PI&&(U+=j.MathUtils.PI2),U*=e,V=Math.cos(U),D=Math.sin(U),R.a=V*_-D*F,R.b=V*k-D*O,R.c=D*_+V*F,R.d=D*k+V*O),R.appliedValid=!1}}}},pe.prototype.computeWorldPositions=function(t,e,n,i,r){var s=this.target,o=this.position,a=this.spaces,h=j.Utils.setArraySize(this.positions,3*e+2),l=null,u=t.closed,c=t.worldVerticesLength,d=c/6,f=pe.NONE;if(!t.constantSpeed){var p=t.lengths,v=p[d-=u?1:2];if(i&&(o*=v),r)for(var g=1;g>>1^-(1&n)},e.prototype.readStringRef=function(){var t=this.readInt(!0);return 0==t?null:this.strings[t-1]},e.prototype.readString=function(){var t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;for(var e="",n=0;n>4){case 12:case 13:e+=String.fromCharCode((31&i)<<6|63&this.readByte()),n+=2;break;case 14:e+=String.fromCharCode((15&i)<<12|(63&this.readByte())<<6|63&this.readByte()),n+=3;break;default:e+=String.fromCharCode(i),n++}}return e},e.prototype.readFloat=function(){var t=this.buffer.getFloat32(this.index);return this.index+=4,t},e.prototype.readBoolean=function(){return 0!=this.readByte()},e);function e(t,e,n,i){void 0===e&&(e=new Array),void 0===n&&(n=0),void 0===i&&(i=new DataView(t.buffer)),this.strings=e,this.index=n,this.buffer=i}var N=function(t,e,n,i,r){this.mesh=t,this.skin=e,this.slotIndex=n,this.parent=i,this.inheritDeform=r},u=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),this.bones=t,this.vertices=e}}(re=re||{}),C=re=re||{},xe.prototype.update=function(t,e){if(null==t)throw new Error("skeleton cannot be null.");var n=this.boundingBoxes,i=this.polygons,r=this.polygonPool,s=t.slots,o=s.length;n.length=0,r.freeAll(i);for(var a=i.length=0;a=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},xe.prototype.aabbIntersectsSegment=function(t,e,n,i){var r=this.minX,s=this.minY,o=this.maxX,a=this.maxY;if(t<=r&&n<=r||e<=s&&i<=s||o<=t&&o<=n||a<=e&&a<=i)return!1;var h=(i-e)/(n-t),l=h*(r-t)+e;if(st.minX&&this.minYt.minY},xe.prototype.containsPoint=function(t,e){for(var n=this.polygons,i=0,r=n.length;i>1,N=this.clipOutput,U=Z.Utils.setArraySize(l,P+D*f),B=0;B>1;a=i.length&&(i.length=t+1),i[t]||(i[t]={}),i[t][e]=n},e.prototype.addSkin=function(t){for(var e=0;e=this.lines.length?null:this.lines[this.index++]},n.prototype.readValue=function(){var t=this.readLine(),e=t.indexOf(":");if(-1==e)throw new Error("Invalid line: "+t);return t.substring(e+1).trim()},n.prototype.readTuple=function(t){var e=this.readLine(),n=e.indexOf(":");if(-1==n)throw new Error("Invalid line: "+e);for(var i=0,r=n+1;i<3;i++){var s=e.indexOf(",",r);if(-1==s)break;t[i]=e.substr(r,s-r).trim(),r=s+1}return t[i]=e.substring(r).trim(),i+1},n);function n(t){this.index=0,this.lines=t.split(/\r\n|\r|\n/)}var v=function(){};f.TextureAtlasPage=v;var i,g=(i=f.TextureRegion,oe(r,i),r);function r(){return null!==i&&i.apply(this,arguments)||this}f.TextureAtlasRegion=g}(re=re||{}),N=re=re||{},be.prototype.isActive=function(){return this.active},be.prototype.apply=function(){this.update()},be.prototype.update=function(){this.data.local?this.data.relative?this.applyRelativeLocal():this.applyAbsoluteLocal():this.data.relative?this.applyRelativeWorld():this.applyAbsoluteWorld()},be.prototype.applyAbsoluteWorld=function(){for(var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target,s=r.a,o=r.b,a=r.c,h=r.d,l=0N.MathUtils.PI?b-=N.MathUtils.PI2:b<-N.MathUtils.PI&&(b+=N.MathUtils.PI2),b*=t,M=Math.cos(b),m=Math.sin(b),R.a=M*v-m*g,R.b=M*w-m*E,R.c=m*v+M*g,R.d=m*w+M*E,S=!0),0!=e&&(x=this.temp,r.localToWorld(x.set(this.data.offsetX,this.data.offsetY)),R.worldX+=(x.x-R.worldX)*e,R.worldY+=(x.y-R.worldY)*e,S=!0),0N.MathUtils.PI?b-=N.MathUtils.PI2:b<-N.MathUtils.PI&&(b+=N.MathUtils.PI2),b=T+(b+c)*i,A=Math.sqrt(w*w+E*E),R.b=Math.cos(b)*A,R.d=Math.sin(b)*A,S=!0),S&&(R.appliedValid=!1)}},be.prototype.applyRelativeWorld=function(){for(var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target,s=r.a,o=r.b,a=r.c,h=r.d,l=0N.MathUtils.PI?y-=N.MathUtils.PI2:y<-N.MathUtils.PI&&(y+=N.MathUtils.PI2),y*=t,M=Math.cos(y),m=Math.sin(y),b.a=M*v-m*g,b.b=M*w-m*E,b.c=m*v+M*g,b.d=m*w+M*E,A=!0),0!=e&&(x=this.temp,r.localToWorld(x.set(this.data.offsetX,this.data.offsetY)),b.worldX+=x.x*e,b.worldY+=x.y*e,A=!0),0N.MathUtils.PI?y-=N.MathUtils.PI2:y<-N.MathUtils.PI&&(y+=N.MathUtils.PI2),w=b.b,E=b.d,y=Math.atan2(E,w)+(y-N.MathUtils.PI/2+c)*i,T=Math.sqrt(w*w+E*E),b.b=Math.cos(y)*T,b.d=Math.sin(y)*T,A=!0),A&&(b.appliedValid=!1)}},be.prototype.applyAbsoluteLocal=function(){var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target;r.appliedValid||r.updateAppliedTransform();for(var s=this.bones,o=0,a=s.length;o>1,i=this.indicesArray,r=i.length=0;r>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255},r.rgb888ToColor=function(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255},r.WHITE=new r(1,1,1,1),r.RED=new r(1,0,0,1),r.GREEN=new r(0,1,0,1),r.BLUE=new r(0,0,1,1),r.MAGENTA=new r(1,0,1,1),r);function r(t,e,n,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),this.r=t,this.g=e,this.b=n,this.a=i}t.Color=i;var s=(o.clamp=function(t,e,n){return t=e?t:g.setArraySize(t,e,n)},g.newArray=function(t,e){for(var n=new Array(t),i=0;ithis.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,1=this.values.length},R.prototype.addValue=function(t){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0},R.prototype.getMean=function(){if(this.hasEnoughData()){if(this.dirty){for(var t=0,e=0;e>1)*s;var o=t.bone.skeleton,a=t.deform,h=this.vertices,l=this.bones;if(null!=l){for(var u=0,c=0,d=0;dthis.vertices.length)throw Error("Mesh can't store more than "+this.maxVertices()+" vertices");this.vertices.set(t,0),this.verticesLength=t.length},e.prototype.setIndices=function(t){if(this.dirtyIndices=!0,t.length>this.indices.length)throw Error("Mesh can't store more than "+this.maxIndices()+" indices");this.indices.set(t,0),this.indicesLength=t.length},e.prototype.draw=function(t,e){this.drawWithOffset(t,e,0,0this.mesh.getVertices().length||this.indicesLength+n.length>this.mesh.getIndices().length)&&this.flush();var i=this.mesh.numVertices();this.mesh.getVertices().set(e,this.verticesLength),this.verticesLength+=e.length,this.mesh.setVerticesLength(this.verticesLength);for(var r=this.mesh.getIndices(),s=this.indicesLength,o=0;o 0.");null===r&&(r=this.color);var o=2*zt.MathUtils.PI/s,a=Math.cos(o),h=Math.sin(o),l=i,u=0;if(t){for(this.check(qt.Filled,3*s+3),s--,d=0;d>1))-2],w=d[p-1],v=0,g=p;v>1,d.numFloats=d.numVertices*E,d.numFloats>d.vertices.length&&(d.vertices=this.vertices=Qt.Utils.newFloatArray(d.numFloats)),S.computeWorldVertices(T,0,S.worldVerticesLength,d.vertices,0,E),p=S.triangles,A=S.region.renderObject.texture,f=S.uvs,g=S.color}if(null!=A){var I=T.color,C=this.tempColor;C.r=M.r*I.r*g.r,C.g=M.g*I.g*g.g,C.b=M.b*I.b*g.b,C.a=M.a*I.a*g.a,s&&(C.r*=C.a,C.g*=C.a,C.b*=C.a);var P=this.tempColor2;null==T.darkColor?P.set(0,0,0,1):(s?(P.r=T.darkColor.r*C.a,P.g=T.darkColor.g*C.a,P.b=T.darkColor.b*C.a):P.setFromColor(T.darkColor),P.a=s?1:0);var L=T.data.blendMode;if(L!=a&&(a=L,t.setBlendMode(Jt.WebGLBlendModeConverter.getSourceGLBlendMode(a,s),Jt.WebGLBlendModeConverter.getDestGLBlendMode(a))),r.isClipping()){r.clipTriangles(d.vertices,d.numFloats,p,p.length,f,C,P,o);var _=new Float32Array(r.clippedVertices),k=r.clippedTriangles;if(null!=this.vertexEffect){var F=this.vertexEffect,O=_;if(o)for(var V=0,D=_.length;V>16&255)/255,r=(t>>8&255)/255,s=(255&t)/255,o=16777215>>24)/255:null,a=this.skeleton;return!e||(n=this.findSlot(e))&&(a=n),a.color.r=i,a.color.g=r,a.color.b=s,null!==o&&(a.color.a=o),this},setSkeletonFromJSON:function(t,e,n,i){return this.setSkeleton(t,e,n,i)},setSkeleton:function(t,e,n,i){this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications());var r=this.plugin.createSkeleton(t,i);this.skeletonData=r.skeletonData,this.preMultipliedAlpha=r.preMultipliedAlpha;var s=r.skeleton;return s.setSkin(),s.setToSetupPose(),this.skeleton=s,r=this.plugin.createAnimationState(s),this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications()),this.state=r.state,this.stateData=r.stateData,this.state.addListener({event:this.onEvent.bind(this),complete:this.onComplete.bind(this),start:this.onStart.bind(this),end:this.onEnd.bind(this),dispose:this.onDispose.bind(this),interrupted:this.onInterrupted.bind(this)}),e&&this.setAnimation(0,e,n),this.root=this.getRootBone(),this.root&&(this.root.rotation=v(d(this.rotation))+90),this.state.apply(s),s.updateCache(),this.updateSize()},onComplete:function(t){this.emit(g.COMPLETE,t)},onDispose:function(t){this.emit(g.DISPOSE,t)},onEnd:function(t){this.emit(g.END,t)},onEvent:function(t,e){this.emit(g.EVENT,t,e)},onInterrupted:function(t){this.emit(g.INTERRUPTED,t)},onStart:function(t){this.emit(g.START,t)},refresh:function(){return this.root&&(this.root.rotation=v(d(this.rotation))+90),this.updateSize(),this.skeleton.updateCache(),this},setSize:function(t,e,n,i){var r=this.skeleton;return void 0===t&&(t=r.data.width),void 0===e&&(e=r.data.height),void 0===n&&(n=0),void 0===i&&(i=0),this.width=t,this.height=e,this.displayOriginX=r.x-n,this.displayOriginY=r.y-i,this},setOffset:function(t,e){var n=this.skeleton;return void 0===t&&(t=0),void 0===e&&(e=0),this.displayOriginX=n.x-t,this.displayOriginY=n.y-e,this},updateSize:function(){var t=this.skeleton,e=this.plugin.renderer.height,n=this.scaleX,i=this.scaleY;t.x=this.x,t.y=e-this.y,t.scaleX=1,t.scaleY=1,t.updateWorldTransform();var r=this.getBounds();return this.width=r.size.x,this.height=r.size.y,this.displayOriginX=this.x-r.offset.x,this.displayOriginY=this.y-(e-(this.height+r.offset.y)),t.scaleX=n,t.scaleY=i,t.updateWorldTransform(),this},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,this.refresh()}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,this.refresh()}},getBoneList:function(){var t=[],e=this.skeletonData;if(e)for(var n=0;n Date: Tue, 25 Aug 2020 14:11:37 +0100 Subject: [PATCH 090/241] Spine Game Objects can now be rendered to Render Textures. Fix #5184 --- .../spine/src/gameobject/SpineGameObjectWebGLRenderer.js | 7 +++++++ src/renderer/webgl/WebGLRenderer.js | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js b/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js index a192aef74..491bb301c 100644 --- a/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js +++ b/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js @@ -124,6 +124,13 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent skeleton.scaleY *= -1; } + if (renderer.currentFramebuffer !== null) + { + skeleton.x = 0; + skeleton.y = calcMatrix.ty - (viewportHeight * src.scaleY); + skeleton.scaleY *= -1; + } + // Add autoUpdate option skeleton.updateWorldTransform(); diff --git a/src/renderer/webgl/WebGLRenderer.js b/src/renderer/webgl/WebGLRenderer.js index 9f32eb5e3..22870e704 100644 --- a/src/renderer/webgl/WebGLRenderer.js +++ b/src/renderer/webgl/WebGLRenderer.js @@ -1219,6 +1219,10 @@ var WebGLRenderer = new Class({ gl.viewport(0, 0, this.width, this.height); + this.currentProgram = null; + this.currentVertexBuffer = null; + this.currentIndexBuffer = null; + this.setBlendMode(0, true); this.resetTextures(); From d38cae6682dcf3472184183ed074961c86972a46 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 25 Aug 2020 14:22:48 +0100 Subject: [PATCH 091/241] Tweaked RT draw fix --- .../spine/src/gameobject/SpineGameObjectWebGLRenderer.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js b/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js index 491bb301c..cdfcf623e 100644 --- a/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js +++ b/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js @@ -118,19 +118,12 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent } } - if (camera.renderToTexture) + if (camera.renderToTexture || renderer.currentFramebuffer !== null) { skeleton.y = calcMatrix.ty; skeleton.scaleY *= -1; } - if (renderer.currentFramebuffer !== null) - { - skeleton.x = 0; - skeleton.y = calcMatrix.ty - (viewportHeight * src.scaleY); - skeleton.scaleY *= -1; - } - // Add autoUpdate option skeleton.updateWorldTransform(); From b1929b85793ba023564a386c518763144333ef7d Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 25 Aug 2020 14:47:03 +0100 Subject: [PATCH 092/241] The Spine Plugin will now work in HEADLESS mode without crashing. Fix #4988 --- plugins/spine/src/SpinePlugin.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/plugins/spine/src/SpinePlugin.js b/plugins/spine/src/SpinePlugin.js index 46cc81a76..448ca7df5 100644 --- a/plugins/spine/src/SpinePlugin.js +++ b/plugins/spine/src/SpinePlugin.js @@ -12,6 +12,7 @@ var ScenePlugin = require('../../../src/plugins/ScenePlugin'); var Spine = require('Spine'); var SpineFile = require('./SpineFile'); var SpineGameObject = require('./gameobject/SpineGameObject'); +var NOOP = require('../../../src/utils/NOOP'); /** * @classdesc @@ -278,6 +279,19 @@ var SpinePlugin = new Class({ this.getAtlas = this.getAtlasCanvas; } + // Headless mode? + if (!this.renderer) + { + this.renderer = { + width: game.scale.width, + height: game.scale.height, + preRender: NOOP, + postRender: NOOP, + render: NOOP, + destroy: NOOP + }; + } + var _this = this; var add = function (x, y, key, animationName, loop) From 314c7975f8bcdf6f6f17d52f4582f78bf960340b Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 25 Aug 2020 14:54:30 +0100 Subject: [PATCH 093/241] Updates JSDocs. Fix #4979 --- plugins/spine/src/SpinePlugin.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/spine/src/SpinePlugin.js b/plugins/spine/src/SpinePlugin.js index 448ca7df5..f024423e2 100644 --- a/plugins/spine/src/SpinePlugin.js +++ b/plugins/spine/src/SpinePlugin.js @@ -96,6 +96,13 @@ var NOOP = require('../../../src/utils/NOOP'); * stored in their own caches, which are global, meaning they're accessible from any Scene in your * game, regardless if the Scene loaded the Spine data or not. * + * When destroying a Phaser Game instance, if you need to re-create it again on the same page without + * reloading, you must remember to remove the Spine Plugin as part of your tear-down process: + * + * ```javascript + * this.plugins.removeScenePlugin('SpinePlugin'); + * ``` + * * For details about the Spine Runtime API see http://esotericsoftware.com/spine-api-reference * * @class SpinePlugin From d2517bf5f6463b1d38b6d0d180de8ea1d40659f1 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 25 Aug 2020 15:36:08 +0100 Subject: [PATCH 094/241] Updated date --- plugins/spine/src/SpinePlugin.js | 4 +- plugins/spine/src/events/COMPLETE_EVENT.js | 2 +- plugins/spine/src/events/DISPOSE_EVENT.js | 2 +- plugins/spine/src/events/END_EVENT.js | 2 +- plugins/spine/src/events/EVENT_EVENT.js | 2 +- plugins/spine/src/events/INTERRUPTED_EVENT.js | 2 +- plugins/spine/src/events/START_EVENT.js | 2 +- plugins/spine/src/events/index.js | 2 +- .../spine/src/gameobject/SpineGameObject.js | 168 +++++++++--------- .../SpineGameObjectCanvasRenderer.js | 2 +- .../src/gameobject/SpineGameObjectRender.js | 2 +- .../SpineGameObjectWebGLRenderer.js | 2 +- 12 files changed, 97 insertions(+), 95 deletions(-) diff --git a/plugins/spine/src/SpinePlugin.js b/plugins/spine/src/SpinePlugin.js index f024423e2..5856a2bb8 100644 --- a/plugins/spine/src/SpinePlugin.js +++ b/plugins/spine/src/SpinePlugin.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ @@ -1082,6 +1082,8 @@ var SpinePlugin = new Class({ }); +SpinePlugin.SpineGameObject = SpineGameObject; + /** * Creates a new Spine Game Object and adds it to the Scene. * diff --git a/plugins/spine/src/events/COMPLETE_EVENT.js b/plugins/spine/src/events/COMPLETE_EVENT.js index 3e3c6286f..1fddd73e1 100644 --- a/plugins/spine/src/events/COMPLETE_EVENT.js +++ b/plugins/spine/src/events/COMPLETE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/plugins/spine/src/events/DISPOSE_EVENT.js b/plugins/spine/src/events/DISPOSE_EVENT.js index 7b77958ed..fe1ec5f92 100644 --- a/plugins/spine/src/events/DISPOSE_EVENT.js +++ b/plugins/spine/src/events/DISPOSE_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/plugins/spine/src/events/END_EVENT.js b/plugins/spine/src/events/END_EVENT.js index 2397ce82d..1c7dbf9ed 100644 --- a/plugins/spine/src/events/END_EVENT.js +++ b/plugins/spine/src/events/END_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/plugins/spine/src/events/EVENT_EVENT.js b/plugins/spine/src/events/EVENT_EVENT.js index ec919e12d..9020c9a73 100644 --- a/plugins/spine/src/events/EVENT_EVENT.js +++ b/plugins/spine/src/events/EVENT_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/plugins/spine/src/events/INTERRUPTED_EVENT.js b/plugins/spine/src/events/INTERRUPTED_EVENT.js index c79d4f5a5..46fdf0c0a 100644 --- a/plugins/spine/src/events/INTERRUPTED_EVENT.js +++ b/plugins/spine/src/events/INTERRUPTED_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/plugins/spine/src/events/START_EVENT.js b/plugins/spine/src/events/START_EVENT.js index 98bc69190..56c98ce0b 100644 --- a/plugins/spine/src/events/START_EVENT.js +++ b/plugins/spine/src/events/START_EVENT.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/plugins/spine/src/events/index.js b/plugins/spine/src/events/index.js index 16b612868..896774c2f 100644 --- a/plugins/spine/src/events/index.js +++ b/plugins/spine/src/events/index.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/plugins/spine/src/gameobject/SpineGameObject.js b/plugins/spine/src/gameobject/SpineGameObject.js index 9e3016f56..d03a7c4a5 100644 --- a/plugins/spine/src/gameobject/SpineGameObject.js +++ b/plugins/spine/src/gameobject/SpineGameObject.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ @@ -25,24 +25,24 @@ var SpineGameObjectRender = require('./SpineGameObjectRender'); * A Spine Game Object is a Phaser level object that can be added to your Phaser Scenes. It encapsulates * a Spine Skeleton with Spine Animation Data and Animation State, with helper methods to allow you to * easily change the skin, slot attachment, bone positions and more. - * + * * Spine Game Objects can be created via the Game Object Factory, Game Object Creator, or directly. * You can only create them if the Spine plugin has been loaded into Phaser. - * + * * The quickest way is the Game Object Factory: - * + * * ```javascript * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true); * ``` - * + * * Here we are creating a new Spine Game Object positioned at 512 x 550. It's using the `jelly` * Spine data, which has previously been loaded into your Scene. The `jelly-think` argument is * an optional animation to start playing on the skeleton. The final argument `true` sets the * animation to loop. Look at the documentation for further details on each of these options. - * + * * For more control, you can use the Game Object Creator, passing in a Spine Game Object * Configuration object: - * + * * ```javascript * let jelly = this.make.spine({ * x: 512, y: 550, key: 'jelly', @@ -52,28 +52,28 @@ var SpineGameObjectRender = require('./SpineGameObjectRender'); * slotName: 'hat', attachmentName: 'images/La_14' * }); * ``` - * + * * Here, you've got the ability to specify extra details, such as the slot name, attachments or * overall scale. - * + * * If you wish to instantiate a Spine Game Object directly you can do so, but in order for it to * update and render, it must be added to the display and update lists of your Scene: - * + * * ```javascript * let jelly = new SpineGameObject(this, this.spine, 512, 550, 'jelly', 'jelly-think', true); * this.sys.displayList.add(jelly); * this.sys.updateList.add(jelly); * ``` - * + * * It's possible to enable Spine Game Objects for input, but you should be aware that it will use * the bounds of the skeletons current pose to create the hit area from. Sometimes this is ok, but * often not. Make use of the `InputPlugin.enableDebug` method to view the input shape being created. * If it's not suitable, provide your own shape to the `setInteractive` method. - * + * * Due to the way Spine handles scaling, it's not recommended to enable a Spine Game Object for * physics directly. Instead, you should look at creating a proxy body and syncing the Spine Game * Object position with it. See the examples for further details. - * + * * If your Spine Game Object has black outlines around the different parts of the texture when it * renders then you have exported the files from Spine with pre-multiplied alpha enabled, but have * forgotten to set that flag when loading the Spine data. Please see the loader docs for more details. @@ -173,7 +173,7 @@ var SpineGameObject = new Class({ * @since 3.19.0 */ this.bounds = null; - + /** * A Game Object level flag that allows you to enable debug drawing * to the Skeleton Debug Renderer by toggling it. @@ -257,9 +257,9 @@ var SpineGameObject = new Class({ /** * Set the Alpha level for the whole Skeleton 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. * * @method SpineGameObject#setAlpha @@ -292,7 +292,7 @@ var SpineGameObject = new Class({ /** * The alpha value of the Skeleton. - * + * * A value between 0 and 1. * * This is a global value, impacting the entire Skeleton, not just a region of it. @@ -331,7 +331,7 @@ var SpineGameObject = new Class({ /** * The amount of red used when rendering the Skeleton. - * + * * A value between 0 and 1. * * This is a global value, impacting the entire Skeleton, not just a region of it. @@ -361,7 +361,7 @@ var SpineGameObject = new Class({ /** * The amount of green used when rendering the Skeleton. - * + * * A value between 0 and 1. * * This is a global value, impacting the entire Skeleton, not just a region of it. @@ -391,7 +391,7 @@ var SpineGameObject = new Class({ /** * The amount of blue used when rendering the Skeleton. - * + * * A value between 0 and 1. * * This is a global value, impacting the entire Skeleton, not just a region of it. @@ -427,7 +427,7 @@ var SpineGameObject = new Class({ * * @param {integer} [color=0xffffff] - The color being applied to the Skeleton or named Slot. Set to white to disable any previously set color. * @param {string} [slotName] - The name of the slot to set the color on. If not give, will be set on the whole skeleton. - * + * * @return {this} This Game Object instance. */ setColor: function (color, slotName) @@ -469,7 +469,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#setSkeletonFromJSON * @since 3.19.0 - * + * * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton. * @param {object} skeletonJSON - The JSON data for the Skeleton. * @param {string} [animationName] - Optional name of the animation to set on the Skeleton. @@ -484,13 +484,13 @@ var SpineGameObject = new Class({ /** * Sets this Game Object to use the given Skeleton based on its cache key. - * + * * Typically, once set, the Skeleton doesn't change. Instead, you change the skin, * or slot attachment, or any other property to adjust it. * * @method SpineGameObject#setSkeleton * @since 3.19.0 - * + * * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton. * @param {object} skeletonJSON - The JSON data for the Skeleton. * @param {string} [animationName] - Optional name of the animation to set on the Skeleton. @@ -567,7 +567,7 @@ var SpineGameObject = new Class({ * @fires SpinePluginEvents#COMPLETE * @private * @since 3.19.0 - * + * * @param {any} entry - The event data from Spine. */ onComplete: function (entry) @@ -582,7 +582,7 @@ var SpineGameObject = new Class({ * @fires SpinePluginEvents#DISPOSE * @private * @since 3.19.0 - * + * * @param {any} entry - The event data from Spine. */ onDispose: function (entry) @@ -597,7 +597,7 @@ var SpineGameObject = new Class({ * @fires SpinePluginEvents#END * @private * @since 3.19.0 - * + * * @param {any} entry - The event data from Spine. */ onEnd: function (entry) @@ -612,7 +612,7 @@ var SpineGameObject = new Class({ * @fires SpinePluginEvents#EVENT * @private * @since 3.19.0 - * + * * @param {any} entry - The event data from Spine. * @param {spine.Event} event - The Spine event. */ @@ -628,7 +628,7 @@ var SpineGameObject = new Class({ * @fires SpinePluginEvents#INTERRUPTED * @private * @since 3.19.0 - * + * * @param {any} entry - The event data from Spine. */ onInterrupted: function (entry) @@ -643,7 +643,7 @@ var SpineGameObject = new Class({ * @fires SpinePluginEvents#START * @private * @since 3.19.0 - * + * * @param {any} entry - The event data from Spine. */ onStart: function (entry) @@ -653,15 +653,15 @@ var SpineGameObject = new Class({ /** * Refreshes the data about the current Skeleton. - * + * * This will reset the rotation, position and size of the Skeleton to match this Game Object. - * + * * Call this method if you need to access the Skeleton data directly, and it may have changed * recently. * * @method SpineGameObject#refresh * @since 3.19.0 - * + * * @return {this} This Game Object. */ refresh: function () @@ -681,20 +681,20 @@ var SpineGameObject = new Class({ /** * Sets the size of this Game Object. - * + * * If no arguments are given it uses the current skeleton data dimensions. - * + * * You can use this method to set a fixed size of this Game Object, such as for input detection, * when the skeleton data doesn't match what is required in-game. * * @method SpineGameObject#setSize * @since 3.19.0 - * + * * @param {number} [width] - The width of the Skeleton. If not given it defaults to the Skeleton Data width. * @param {number} [height] - The height of the Skeleton. If not given it defaults to the Skeleton Data height. * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate. * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate. - * + * * @return {this} This Game Object. */ setSize: function (width, height, offsetX, offsetY) @@ -717,15 +717,15 @@ var SpineGameObject = new Class({ /** * Sets the offset of this Game Object from the Skeleton position. - * + * * You can use this method to adjust how the position of this Game Object relates to the Skeleton it is using. * * @method SpineGameObject#setOffset * @since 3.19.0 - * + * * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate. * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate. - * + * * @return {this} This Game Object. */ setOffset: function (offsetX, offsetY) @@ -744,13 +744,13 @@ var SpineGameObject = new Class({ /** * Internal method that syncs all of the Game Object position and scale data to the Skeleton. * It then syncs the skeleton bounds back to this Game Object. - * + * * This method is called automatically as needed internally, however, it's also exposed should * you require overriding the size settings. * * @method SpineGameObject#updateSize * @since 3.19.0 - * + * * @return {this} This Game Object. */ updateSize: function () @@ -839,7 +839,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getBoneList * @since 3.19.0 - * + * * @return {string[]} An array containing the names of all the bones in the Skeleton Data. */ getBoneList: function () @@ -864,7 +864,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getSkinList * @since 3.19.0 - * + * * @return {string[]} An array containing the names of all the skins in the Skeleton Data. */ getSkinList: function () @@ -889,7 +889,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getSlotList * @since 3.19.0 - * + * * @return {string[]} An array containing the names of all the slots in the Skeleton. */ getSlotList: function () @@ -911,7 +911,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getAnimationList * @since 3.19.0 - * + * * @return {string[]} An array containing the names of all the animations in the Skeleton Data. */ getAnimationList: function () @@ -936,9 +936,9 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getCurrentAnimation * @since 3.19.0 - * + * * @param {integer} [trackIndex=0] - The track to return the current animation on. - * + * * @return {?spine.Animation} The current Animation on the given track, or `undefined` if there is no current animation. */ getCurrentAnimation: function (trackIndex) @@ -956,7 +956,7 @@ var SpineGameObject = new Class({ /** * Sets the current animation for a track, discarding any queued animations. * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from). - * + * * Animations are referenced by a unique string-based key, as defined in the Spine software. * * @method SpineGameObject#play @@ -979,7 +979,7 @@ var SpineGameObject = new Class({ /** * Sets the current animation for a track, discarding any queued animations. * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from). - * + * * Animations are referenced by a unique string-based key, as defined in the Spine software. * * @method SpineGameObject#setAnimation @@ -1001,7 +1001,7 @@ var SpineGameObject = new Class({ if (ignoreIfPlaying && this.state) { var currentTrack = this.state.getCurrent(0); - + if (currentTrack && currentTrack.animation.name === animationName && !currentTrack.isComplete()) { return; @@ -1017,9 +1017,9 @@ var SpineGameObject = new Class({ /** * Adds an animation to be played after the current or last queued animation for a track. * If the track is empty, it is equivalent to calling setAnimation. - * + * * Animations are referenced by a unique string-based key, as defined in the Spine software. - * + * * The delay is a float. If > 0, sets delay. If <= 0, the delay set is the duration of the previous * track entry minus any mix duration (from the AnimationStateData) plus the specified delay * (ie the mix ends at (delay = 0) or before (delay < 0) the previous track entry duration). @@ -1043,13 +1043,13 @@ var SpineGameObject = new Class({ /** * Sets an empty animation for a track, discarding any queued animations, and sets the track * entry's mixDuration. An empty animation has no timelines and serves as a placeholder for mixing in or out. - * + * * Mixing out is done by setting an empty animation with a mix duration using either setEmptyAnimation, * setEmptyAnimations, or addEmptyAnimation. Mixing to an empty animation causes the previous animation to be * applied less and less over the mix duration. Properties keyed in the previous animation transition to * the value from lower tracks or to the setup pose value if no lower tracks key the property. * A mix duration of 0 still mixes out over one frame. - * + * * Mixing in is done by first setting an empty animation, then adding an animation using addAnimation * and on the returned track entry, set the mixDuration. Mixing from an empty animation causes the new * animation to be applied more and more over the mix duration. Properties keyed in the new animation @@ -1071,7 +1071,7 @@ var SpineGameObject = new Class({ /** * Removes all animations from the track, leaving skeletons in their current pose. - * + * * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose, * rather than leaving them in their current pose. * @@ -1088,10 +1088,10 @@ var SpineGameObject = new Class({ return this; }, - + /** * Removes all animations from all tracks, leaving skeletons in their current pose. - * + * * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose, * rather than leaving them in their current pose. * @@ -1109,11 +1109,11 @@ var SpineGameObject = new Class({ /** * Sets the skin used to look up attachments before looking in the defaultSkin. - * + * * Attachments from the new skin are attached if the corresponding attachment from the * old skin was attached. If there was no old skin, each slot's setup mode attachment is * attached from the new skin. - * + * * After changing the skin, the visible attachments can be reset to those attached in the * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide @@ -1121,7 +1121,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#setSkinByName * @since 3.19.0 - * + * * @param {string} skinName - The name of the skin to set. * * @return {this} This Game Object. @@ -1141,11 +1141,11 @@ var SpineGameObject = new Class({ /** * Sets the skin used to look up attachments before looking in the defaultSkin. - * + * * Attachments from the new skin are attached if the corresponding attachment from the * old skin was attached. If there was no old skin, each slot's setup mode attachment is * attached from the new skin. - * + * * After changing the skin, the visible attachments can be reset to those attached in the * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide @@ -1153,7 +1153,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#setSkin * @since 3.19.0 - * + * * @param {?spine.Skin} newSkin - The Skin to set. May be `null`. * * @return {this} This Game Object. @@ -1176,7 +1176,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#setMix * @since 3.19.0 - * + * * @param {string} fromName - The animation to mix from. * @param {string} toName - The animation to mix to. * @param {number} [duration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any). @@ -1197,7 +1197,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getAttachment * @since 3.19.0 - * + * * @param {integer} slotIndex - The slot index to search. * @param {string} attachmentName - The attachment name to look for. * @@ -1213,7 +1213,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getAttachmentByName * @since 3.19.0 - * + * * @param {string} slotName - The slot name to search. * @param {string} attachmentName - The attachment name to look for. * @@ -1230,7 +1230,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#setAttachment * @since 3.19.0 - * + * * @param {string} slotName - The slot name to add the attachment to. * @param {string} attachmentName - The attachment name to add. * @@ -1318,7 +1318,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#angleBoneToXY * @since 3.19.0 - * + * * @param {spine.Bone} bone - The bone to rotate towards the world position. * @param {number} worldX - The world x coordinate to rotate the bone towards. * @param {number} worldY - The world y coordinate to rotate the bone towards. @@ -1350,7 +1350,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findBone * @since 3.19.0 - * + * * @param {string} boneName - The name of the bone to find. * * @return {spine.Bone} The bone, or null. @@ -1366,7 +1366,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findBoneIndex * @since 3.19.0 - * + * * @param {string} boneName - The name of the bone to find. * * @return {integer} The bone index. Or -1 if the bone was not found. @@ -1382,7 +1382,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findSlot * @since 3.19.0 - * + * * @param {string} slotName - The name of the slot to find. * * @return {spine.Slot} The Slot. May be null. @@ -1398,7 +1398,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findSlotIndex * @since 3.19.0 - * + * * @param {string} slotName - The name of the slot to find. * * @return {integer} The slot index. Or -1 if the Slot was not found. @@ -1414,7 +1414,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findSkin * @since 3.19.0 - * + * * @param {string} skinName - The name of the skin to find. * * @return {spine.Skin} The Skin. May be null. @@ -1430,7 +1430,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findEvent * @since 3.19.0 - * + * * @param {string} eventDataName - The name of the event to find. * * @return {spine.EventData} The Event Data. May be null. @@ -1446,7 +1446,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findAnimation * @since 3.19.0 - * + * * @param {string} animationName - The name of the animation to find. * * @return {spine.Animation} The Animation. May be null. @@ -1462,7 +1462,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findIkConstraint * @since 3.19.0 - * + * * @param {string} constraintName - The name of the constraint to find. * * @return {spine.IkConstraintData} The IK constraint. May be null. @@ -1478,7 +1478,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findTransformConstraint * @since 3.19.0 - * + * * @param {string} constraintName - The name of the constraint to find. * * @return {spine.TransformConstraintData} The transform constraint. May be null. @@ -1494,7 +1494,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findPathConstraint * @since 3.19.0 - * + * * @param {string} constraintName - The name of the constraint to find. * * @return {spine.PathConstraintData} The path constraint. May be null. @@ -1510,7 +1510,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findPathConstraintIndex * @since 3.19.0 - * + * * @param {string} constraintName - The name of the constraint to find. * * @return {integer} The constraint index. Or -1 if the constraint was not found. @@ -1522,15 +1522,15 @@ var SpineGameObject = new Class({ /** * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose. - * + * * The returned object contains two properties: `offset` and `size`: - * + * * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB. * `size` - The width and height of the AABB. * * @method SpineGameObject#getBounds * @since 3.19.0 - * + * * @return {any} The bounds object. */ getBounds: function () @@ -1544,7 +1544,7 @@ var SpineGameObject = new Class({ * @method SpineGameObject#preUpdate * @protected * @since 3.19.0 - * + * * @param {number} time - The current timestamp. * @param {number} delta - The delta time, in ms, elapsed since the last frame. */ diff --git a/plugins/spine/src/gameobject/SpineGameObjectCanvasRenderer.js b/plugins/spine/src/gameobject/SpineGameObjectCanvasRenderer.js index 567643042..a05c5d0d3 100644 --- a/plugins/spine/src/gameobject/SpineGameObjectCanvasRenderer.js +++ b/plugins/spine/src/gameobject/SpineGameObjectCanvasRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/plugins/spine/src/gameobject/SpineGameObjectRender.js b/plugins/spine/src/gameobject/SpineGameObjectRender.js index 8ec1766f5..f89d408e2 100644 --- a/plugins/spine/src/gameobject/SpineGameObjectRender.js +++ b/plugins/spine/src/gameobject/SpineGameObjectRender.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ diff --git a/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js b/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js index cdfcf623e..b4a669537 100644 --- a/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js +++ b/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js @@ -1,6 +1,6 @@ /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ From 0bbe67dafda017a2197209cf633e1b2a38921b72 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 25 Aug 2020 15:51:11 +0100 Subject: [PATCH 095/241] When using the `GameObjectCreator` for `Containers` you can now specify the `children` property in the configuration object. --- src/gameobjects/container/ContainerCreator.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gameobjects/container/ContainerCreator.js b/src/gameobjects/container/ContainerCreator.js index 21b2f5fb2..e1d6361a1 100644 --- a/src/gameobjects/container/ContainerCreator.js +++ b/src/gameobjects/container/ContainerCreator.js @@ -29,8 +29,9 @@ GameObjectCreator.register('container', function (config, addToScene) var x = GetAdvancedValue(config, 'x', 0); var y = GetAdvancedValue(config, 'y', 0); + var children = GetAdvancedValue(config, 'children', null); - var container = new Container(this.scene, x, y); + var container = new Container(this.scene, x, y, children); if (addToScene !== undefined) { @@ -38,6 +39,6 @@ GameObjectCreator.register('container', function (config, addToScene) } BuildGameObject(this.scene, container, config); - + return container; }); From 482f016898fb0091075e68a50e8b917cb1dc61fb Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 25 Aug 2020 18:23:27 +0100 Subject: [PATCH 096/241] A Spine Game Object with `setVisible(false)` will no longer still cause internal gl commands and is now properly skipped, retaining any current batch in the process. Fix #5174 --- .../SpineGameObjectWebGLRenderer.js | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js b/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js index b4a669537..9a289d919 100644 --- a/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js +++ b/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js @@ -27,24 +27,28 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent { var plugin = src.plugin; var skeleton = src.skeleton; + var childAlpha = skeleton.color.a; var sceneRenderer = plugin.sceneRenderer; var GameObjectRenderMask = 15; - var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id))); + var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || childAlpha === 0); if (!skeleton || !willRender) { - // Reset the current type - renderer.currentType = ''; - // If there is already a batch running, we need to close it if (!renderer.nextTypeMatch) { // The next object in the display list is not a Spine object, so we end the batch sceneRenderer.end(); - renderer.rebindPipeline(renderer.pipelines.MultiPipeline); + if (!renderer.finalType) + { + // Reset the current type + renderer.currentType = ''; + + renderer.rebindPipeline(renderer.pipelines.MultiPipeline); + } } return; @@ -152,10 +156,13 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent if (!renderer.nextTypeMatch) { - // The next object in the display list is not a Spine object, so we end the batch + // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch. sceneRenderer.end(); - renderer.rebindPipeline(renderer.pipelines.MultiPipeline); + if (!renderer.finalType) + { + renderer.rebindPipeline(renderer.pipelines.MultiPipeline); + } } }; From 791704febeb3e7fe33430248f931cba28822dcfa Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 25 Aug 2020 18:24:42 +0100 Subject: [PATCH 097/241] `WebGLRenderer.finalType` is a new boolean property that signifies if the current Game Object being rendered is the final one in the list. --- src/renderer/webgl/WebGLRenderer.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/renderer/webgl/WebGLRenderer.js b/src/renderer/webgl/WebGLRenderer.js index 22870e704..b7b2f0218 100644 --- a/src/renderer/webgl/WebGLRenderer.js +++ b/src/renderer/webgl/WebGLRenderer.js @@ -579,6 +579,15 @@ var WebGLRenderer = new Class({ */ this.nextTypeMatch = false; + /** + * Is the Game Object being currently rendered the final one in the list? + * + * @name Phaser.Renderer.WebGL.WebGLRenderer#finalType + * @type {boolean} + * @since 3.50.0 + */ + this.finalType = false; + /** * The mipmap magFilter to be used when creating textures. * @@ -2450,6 +2459,8 @@ var WebGLRenderer = new Class({ for (var i = 0; i < childCount; i++) { + this.finalType = (i === childCount - 1); + var child = list[i]; if (!child.willRender(camera)) From 0704611ee40ab5e6f4324570813281cdd00d93bb Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 25 Aug 2020 18:27:55 +0100 Subject: [PATCH 098/241] `SpineContainer` is a new Game Object available via `this.add.spinecontainer` to which you can add Spine Game Objects only. It uses a special rendering function to retain batching, even across multiple container or Spine Game Object instances, resulting in dramatically improved performance over using regular Containers. Fix #5174 --- plugins/spine/src/container/SpineContainer.js | 73 ++++++++ .../container/SpineContainerCanvasRenderer.js | 100 +++++++++++ .../src/container/SpineContainerRender.js | 25 +++ .../container/SpineContainerWebGLRenderer.js | 165 ++++++++++++++++++ 4 files changed, 363 insertions(+) create mode 100644 plugins/spine/src/container/SpineContainer.js create mode 100644 plugins/spine/src/container/SpineContainerCanvasRenderer.js create mode 100644 plugins/spine/src/container/SpineContainerRender.js create mode 100644 plugins/spine/src/container/SpineContainerWebGLRenderer.js diff --git a/plugins/spine/src/container/SpineContainer.js b/plugins/spine/src/container/SpineContainer.js new file mode 100644 index 000000000..aaa17292f --- /dev/null +++ b/plugins/spine/src/container/SpineContainer.js @@ -0,0 +1,73 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Class = require('../../../../src/utils/Class'); +var Container = require('../../../../src/gameobjects/container/Container'); +var SpineContainerRender = require('./SpineContainerRender'); + +/** + * @classdesc + * A Spine Container is a special kind of Container created specifically for Spine Game Objects. + * + * You have all of the same features of a standard Container, but the rendering functions are optimized specifically + * for Spine Game Objects. You cannot mix and match Spine Game Objects with regular Game Objects inside of this + * type of Container, however. + * + * To create one in a Scene, use the factory methods: + * + * ```javascript + * this.add.spinecontainer(); + * ``` + * + * or + * + * ```javascript + * this.make.spinecontainer(); + * ``` + * + * See the Container documentation for further details. + * + * @class SpineContainer + * @extends Phaser.GameObjects.Container + * @constructor + * @since 3.50.0 + * + * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to. + * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin. + * @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 {SpineGameObject[]} [children] - An optional array of Spine Game Objects to add to this Container. + */ +var SpineContainer = new Class({ + + Extends: Container, + + Mixins: [ + SpineContainerRender + ], + + initialize: + + function SpineContainer (scene, plugin, x, y, children) + { + Container.call(this, scene, x, y, children); + + // Same as SpineGameObject, to prevent the renderer from mis-typing it when batching + this.type = 'Spine'; + + /** + * A reference to the Spine Plugin. + * + * @name SpineGameObject#plugin + * @type {SpinePlugin} + * @since 3.19.0 + */ + this.plugin = plugin; + } + +}); + +module.exports = SpineContainer; diff --git a/plugins/spine/src/container/SpineContainerCanvasRenderer.js b/plugins/spine/src/container/SpineContainerCanvasRenderer.js new file mode 100644 index 000000000..db64385a4 --- /dev/null +++ b/plugins/spine/src/container/SpineContainerCanvasRenderer.js @@ -0,0 +1,100 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Renders this Game Object with the Canvas Renderer to the given Camera. + * 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.Container#renderCanvas + * @since 3.4.0 + * @private + * + * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. + * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call. + * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. + * @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 SpineContainerCanvasRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix) +{ + var children = container.list; + + if (children.length === 0) + { + return; + } + + var transformMatrix = container.localTransform; + + if (parentMatrix) + { + transformMatrix.loadIdentity(); + transformMatrix.multiply(parentMatrix); + transformMatrix.translate(container.x, container.y); + transformMatrix.rotate(container.rotation); + transformMatrix.scale(container.scaleX, container.scaleY); + } + else + { + transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY); + } + + var containerHasBlendMode = (container.blendMode !== -1); + + if (!containerHasBlendMode) + { + // If Container is SKIP_TEST then set blend mode to be Normal + renderer.setBlendMode(0); + } + + var alpha = container._alpha; + var scrollFactorX = container.scrollFactorX; + var scrollFactorY = container.scrollFactorY; + + if (container.mask) + { + container.mask.preRenderCanvas(renderer, null, camera); + } + + for (var i = 0; i < children.length; i++) + { + var child = children[i]; + + if (!child.willRender(camera)) + { + continue; + } + + var childAlpha = child.alpha; + var childScrollFactorX = child.scrollFactorX; + var childScrollFactorY = child.scrollFactorY; + + if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode) + { + // If Container doesn't have its own blend mode, then a child can have one + renderer.setBlendMode(child.blendMode); + } + + // Set parent values + child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY); + child.setAlpha(childAlpha * alpha); + + // Render + child.renderCanvas(renderer, child, interpolationPercentage, camera, transformMatrix); + + // Restore original values + child.setAlpha(childAlpha); + child.setScrollFactor(childScrollFactorX, childScrollFactorY); + } + + if (container.mask) + { + container.mask.postRenderCanvas(renderer); + } +}; + +module.exports = SpineContainerCanvasRenderer; diff --git a/plugins/spine/src/container/SpineContainerRender.js b/plugins/spine/src/container/SpineContainerRender.js new file mode 100644 index 000000000..abc2c3d26 --- /dev/null +++ b/plugins/spine/src/container/SpineContainerRender.js @@ -0,0 +1,25 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var renderWebGL = require('../../../../src/utils/NOOP'); +var renderCanvas = require('../../../../src/utils/NOOP'); + +if (typeof WEBGL_RENDERER) +{ + renderWebGL = require('./SpineContainerWebGLRenderer'); +} + +if (typeof CANVAS_RENDERER) +{ + renderCanvas = require('./SpineContainerCanvasRenderer'); +} + +module.exports = { + + renderWebGL: renderWebGL, + renderCanvas: renderCanvas + +}; diff --git a/plugins/spine/src/container/SpineContainerWebGLRenderer.js b/plugins/spine/src/container/SpineContainerWebGLRenderer.js new file mode 100644 index 000000000..d9d95894f --- /dev/null +++ b/plugins/spine/src/container/SpineContainerWebGLRenderer.js @@ -0,0 +1,165 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CounterClockwise = require('../../../../src/math/angle/CounterClockwise'); +var Clamp = require('../../../../src/math/Clamp'); +var RadToDeg = require('../../../../src/math/RadToDeg'); +var Wrap = require('../../../../src/math/Wrap'); + +/** + * Renders this Game Object with the WebGL Renderer to the given Camera. + * 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 SpineContainerWebGLRenderer#renderWebGL + * @since 3.50.0 + * @private + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. + * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call. + * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. + * @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 SpineContainerWebGLRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix) +{ + var plugin = container.plugin; + var sceneRenderer = plugin.sceneRenderer; + var children = container.list; + + if (children.length === 0) + { + if (sceneRenderer.batcher.isDrawing && renderer.finalType) + { + sceneRenderer.end(); + } + + return; + } + + var transformMatrix = container.localTransform; + + if (parentMatrix) + { + transformMatrix.loadIdentity(); + transformMatrix.multiply(parentMatrix); + transformMatrix.translate(container.x, container.y); + transformMatrix.rotate(container.rotation); + transformMatrix.scale(container.scaleX, container.scaleY); + } + else + { + transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY); + } + + var alpha = container.alpha; + var scrollFactorX = container.scrollFactorX; + var scrollFactorY = container.scrollFactorY; + + var GameObjectRenderMask = 15; + + if (renderer.newType) + { + sceneRenderer.begin(); + } + + for (var i = 0; i < children.length; i++) + { + var src = children[i]; + + var skeleton = src.skeleton; + var childAlpha = skeleton.color.a; + + var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || childAlpha === 0); + + if (!skeleton || !willRender) + { + continue; + } + + var camMatrix = renderer._tempMatrix1; + var spriteMatrix = renderer._tempMatrix2; + var calcMatrix = renderer._tempMatrix3; + + spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY)); + + camMatrix.copyFrom(camera.matrix); + + // Multiply the camera by the parent matrix + camMatrix.multiplyWithOffset(transformMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY); + + // Undo the camera scroll + spriteMatrix.e = src.x; + spriteMatrix.f = src.y; + + // Multiply by the Sprite matrix, store result in calcMatrix + camMatrix.multiply(spriteMatrix, calcMatrix); + + var viewportHeight = renderer.height; + + skeleton.x = calcMatrix.tx; + skeleton.y = viewportHeight - calcMatrix.ty; + + skeleton.scaleX = calcMatrix.scaleX; + skeleton.scaleY = calcMatrix.scaleY; + + if (src.scaleX < 0) + { + skeleton.scaleX *= -1; + + src.root.rotation = RadToDeg(calcMatrix.rotationNormalized); + } + else + { + // +90 degrees to account for the difference in Spine vs. Phaser rotation + src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360); + } + + if (src.scaleY < 0) + { + skeleton.scaleY *= -1; + + if (src.scaleX < 0) + { + src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2); + } + else + { + src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2); + } + } + + if (camera.renderToTexture || renderer.currentFramebuffer !== null) + { + skeleton.y = calcMatrix.ty; + skeleton.scaleY *= -1; + } + + // Add autoUpdate option + skeleton.updateWorldTransform(); + + skeleton.color.a = Clamp(childAlpha * alpha, 0, 1); + + // Draw the current skeleton + sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha); + + // Restore alpha + skeleton.color.a = childAlpha; + } + + if (!renderer.nextTypeMatch) + { + // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch. + sceneRenderer.end(); + + if (!renderer.finalType) + { + renderer.rebindPipeline(renderer.pipelines.MultiPipeline); + } + } +}; + +module.exports = SpineContainerWebGLRenderer; From ce8039cb9037d30e5d3f8ad939b0dd161f7ec16c Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 25 Aug 2020 18:28:35 +0100 Subject: [PATCH 099/241] Spine Game Objects now use -1 as their default blend mode, which means 'skip setting it'. --- plugins/spine/src/gameobject/SpineGameObject.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/spine/src/gameobject/SpineGameObject.js b/plugins/spine/src/gameobject/SpineGameObject.js index d03a7c4a5..4d1f900a0 100644 --- a/plugins/spine/src/gameobject/SpineGameObject.js +++ b/plugins/spine/src/gameobject/SpineGameObject.js @@ -231,7 +231,7 @@ var SpineGameObject = new Class({ * @readonly * @since 3.19.0 */ - this.blendMode = 0; + this.blendMode = -1; this.setPosition(x, y); From 2531b67dd18c2a6a9ae57820d2388ecfa88f2051 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 25 Aug 2020 18:28:45 +0100 Subject: [PATCH 100/241] New Container factory functions --- plugins/spine/src/SpinePlugin.js | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/plugins/spine/src/SpinePlugin.js b/plugins/spine/src/SpinePlugin.js index 5856a2bb8..d4afb9ef7 100644 --- a/plugins/spine/src/SpinePlugin.js +++ b/plugins/spine/src/SpinePlugin.js @@ -12,6 +12,7 @@ var ScenePlugin = require('../../../src/plugins/ScenePlugin'); var Spine = require('Spine'); var SpineFile = require('./SpineFile'); var SpineGameObject = require('./gameobject/SpineGameObject'); +var SpineContainer = require('./container/SpineContainer'); var NOOP = require('../../../src/utils/NOOP'); /** @@ -347,8 +348,38 @@ var SpinePlugin = new Class({ return spineGO.refresh(); }; + var addContainer = function (x, y, children) + { + var spineGO = new SpineContainer(this.scene, _this, x, y, children); + + this.displayList.add(spineGO); + + return spineGO; + }; + + var makeContainer = function (config, addToScene) + { + if (config === undefined) { config = {}; } + + var x = GetValue(config, 'x', 0); + var y = GetValue(config, 'y', 0); + var children = GetValue(config, 'children', null); + + var container = new SpineContainer(this.scene, _this, x, y, children); + + if (addToScene !== undefined) + { + config.add = addToScene; + } + + BuildGameObject(this.scene, container, config); + + return container; + }; + pluginManager.registerFileType('spine', this.spineFileCallback, scene); pluginManager.registerGameObject('spine', add, make); + pluginManager.registerGameObject('spinecontainer', addContainer, makeContainer); }, /** From 8c54efd81cd6a3cbf0089a0f0afb4b2a94dfd079 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 25 Aug 2020 18:28:49 +0100 Subject: [PATCH 101/241] Update CHANGELOG.md --- CHANGELOG.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a64ff1b5..11c74388b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -193,6 +193,20 @@ The way in which Game Objects add themselves to the Scene Update List has change * `DOMElementFactory`, `ExternFactory`, `ParticleManagerFactor`, `RopeFactory` and `SpriteFactory` all no longer add the objects to the Update List, this is now handled by the ADDED events instead. * `Sprite`, `Rope`, `ParticleEmitterManager`, `Extern` and `DOMElement` now all override the `addedToScene` and `removedFromScene` callbacks to handle further set-up tasks. +### Spine Plugin Updates + +* `SpineContainer` is a new Game Object available via `this.add.spinecontainer` to which you can add Spine Game Objects only. It uses a special rendering function to retain batching, even across multiple container or Spine Game Object instances, resulting in dramatically improved performance over using regular Containers. +* A Spine Game Object with `setVisible(false)` will no longer still cause internal gl commands and is now properly skipped, retaining any current batch in the process. Fix #5174 (thanks @Kitsee) +* The Spine Game Object WebGL Renderer will no longer clear the type if invisible and will only end the batch if the next type doesn't match. +* The Spine Game Object WebGL Renderer will no longer rebind the pipeline if it was the final object on the display list, saving lots of gl commands. +* The Spine Runtimes have been updated to 3.8.95, which are the most recent non-beta versions. Please note, you will _need_ to re-export your animations if you're working in a version of Spine lower than 3.8.20. +* The Webpack build scripts have all been updated for Webpack 4.44.x. Fix #5243 (thanks @RollinSafary) +* There is a new npm script `npm run plugin.spine.runtimes` which will build all of the Spine runtimes, for ingestion by the plugin. Note: You will need to check-out the Esoteric Spine Runtimes repo into `plugins/spine/` in order for this to work. +* Spine Game Objects can now be rendered to Render Textures. Fix #5184 (thanks @Kitsee) +* Using > 128 Spine objects in a Container would cause a `WebGL: INVALID_OPERATION: vertexAttribPointer: no ARRAY_BUFFER is bound and offset is non-zero` error if you added any subsequent Spine objects to the Scene. There is now no limit. Fix #5246 (thanks @d7561985) +* The Spine Plugin will now work in HEADLESS mode without crashing. Fix #4988 (thanks @raimon-segura) +* Spine Game Objects now use -1 as their default blend mode, which means 'skip setting it'. + ### New Features * `Geom.Intersects.GetLineToLine` is a new function that will return a Vector3 containing the point of intersection between 2 line segments, with the `z` property holding the distance value. @@ -239,6 +253,8 @@ The way in which Game Objects add themselves to the Scene Update List has change * `Pointer.upTime` now stores the event timestamp of when the final depressed button on the input device was released, not just when button 1 was released. * The `Pointer.getDuration` method now uses the new Pointer `downTime` and `upTime` values, meaning it will accurately report the duration of when any button is being held down, not just the primary one. Fix #5112 (thanks @veleek) * The `BaseShader` default vertex shader now includes the `outTexCoord` vec2 varying, mapped to be the same as that found in the pipeline shaders. Fix #5120 (@pavel-shirobok) +* When using the `GameObjectCreator` for `Containers` you can now specify the `children` property in the configuration object. +* `WebGLRenderer.finalType` is a new boolean property that signifies if the current Game Object being rendered is the final one in the list. ### Bug Fixes From 6c26e272862306eb9a124ff283266eea2db0d841 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 25 Aug 2020 18:29:58 +0100 Subject: [PATCH 102/241] Update copy-to-examples.js --- plugins/spine/copy-to-examples.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/spine/copy-to-examples.js b/plugins/spine/copy-to-examples.js index 5549e7274..9fcf6243a 100644 --- a/plugins/spine/copy-to-examples.js +++ b/plugins/spine/copy-to-examples.js @@ -1,7 +1,7 @@ var fs = require('fs-extra'); var source = './plugins/spine/dist/'; -var dest = '../phaser3-examples/public/plugins/3.8/'; +var dest = '../phaser3-examples/public/plugins/3.8.95/'; if (fs.existsSync(dest)) { From f97afe16e7f0ee68786fbc7246172f33d2638c48 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 25 Aug 2020 18:30:07 +0100 Subject: [PATCH 103/241] New Spine Plugin build --- plugins/spine/dist/SpineCanvasPlugin.js | 22055 +++++++++++++---- plugins/spine/dist/SpineCanvasPlugin.min.js | 2 +- plugins/spine/dist/SpinePlugin.js | 22544 ++++++++++++++---- plugins/spine/dist/SpinePlugin.min.js | 2 +- plugins/spine/dist/SpinePluginDebug.js | 13921 ++++++++++- plugins/spine/dist/SpinePluginDebug.js.map | 2 +- plugins/spine/dist/SpineWebGLPlugin.js | 22267 +++++++++++++---- plugins/spine/dist/SpineWebGLPlugin.min.js | 2 +- 8 files changed, 66627 insertions(+), 14168 deletions(-) diff --git a/plugins/spine/dist/SpineCanvasPlugin.js b/plugins/spine/dist/SpineCanvasPlugin.js index e2509e710..4104fb515 100644 --- a/plugins/spine/dist/SpineCanvasPlugin.js +++ b/plugins/spine/dist/SpineCanvasPlugin.js @@ -82,7 +82,7 @@ window["SpinePlugin"] = /******/ /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 35); +/******/ return __webpack_require__(__webpack_require__.s = 62); /******/ }) /************************************************************************/ /******/ ([ @@ -341,154 +341,6 @@ module.exports = Class; /***/ }), /* 1 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var MATH_CONST = { - - /** - * The value of PI * 2. - * - * @name Phaser.Math.PI2 - * @type {number} - * @since 3.0.0 - */ - PI2: Math.PI * 2, - - /** - * The value of PI * 0.5. - * - * @name Phaser.Math.TAU - * @type {number} - * @since 3.0.0 - */ - TAU: Math.PI * 0.5, - - /** - * An epsilon value (1.0e-6) - * - * @name Phaser.Math.EPSILON - * @type {number} - * @since 3.0.0 - */ - EPSILON: 1.0e-6, - - /** - * For converting degrees to radians (PI / 180) - * - * @name Phaser.Math.DEG_TO_RAD - * @type {number} - * @since 3.0.0 - */ - DEG_TO_RAD: Math.PI / 180, - - /** - * For converting radians to degrees (180 / PI) - * - * @name Phaser.Math.RAD_TO_DEG - * @type {number} - * @since 3.0.0 - */ - RAD_TO_DEG: 180 / Math.PI, - - /** - * An instance of the Random Number Generator. - * This is not set until the Game boots. - * - * @name Phaser.Math.RND - * @type {Phaser.Math.RandomDataGenerator} - * @since 3.0.0 - */ - RND: null, - - /** - * The minimum safe integer this browser supports. - * We use a const for backward compatibility with Internet Explorer. - * - * @name Phaser.Math.MIN_SAFE_INTEGER - * @type {number} - * @since 3.21.0 - */ - MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991, - - /** - * The maximum safe integer this browser supports. - * We use a const for backward compatibility with Internet Explorer. - * - * @name Phaser.Math.MAX_SAFE_INTEGER - * @type {number} - * @since 3.21.0 - */ - MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991 - -}; - -module.exports = MATH_CONST; - - -/***/ }), -/* 2 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * This is a slightly modified version of jQuery.isPlainObject. - * A plain object is an object whose internal class property is [object Object]. - * - * @function Phaser.Utils.Objects.IsPlainObject - * @since 3.0.0 - * - * @param {object} obj - The object to inspect. - * - * @return {boolean} `true` if the object is plain, otherwise `false`. - */ -var IsPlainObject = function (obj) -{ - // Not plain objects: - // - Any object or value whose internal [[Class]] property is not "[object Object]" - // - DOM nodes - // - window - if (typeof(obj) !== 'object' || obj.nodeType || obj === obj.window) - { - return false; - } - - // Support: Firefox <20 - // The try/catch suppresses exceptions thrown when attempting to access - // the "constructor" property of certain host objects, ie. |window.location| - // https://bugzilla.mozilla.org/show_bug.cgi?id=814622 - try - { - if (obj.constructor && !({}).hasOwnProperty.call(obj.constructor.prototype, 'isPrototypeOf')) - { - return false; - } - } - catch (e) - { - return false; - } - - // If the function hasn't returned already, we're confident that - // |obj| is a plain object, created by {} or constructed with new Object - return true; -}; - -module.exports = IsPlainObject; - - -/***/ }), -/* 3 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -501,7 +353,7 @@ module.exports = IsPlainObject; // and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl var Class = __webpack_require__(0); -var FuzzyEqual = __webpack_require__(20); +var FuzzyEqual = __webpack_require__(31); /** * @classdesc @@ -1263,10 +1115,335 @@ Vector2.ONE = new Vector2(1, 1); module.exports = Vector2; +/***/ }), +/* 2 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var MATH_CONST = { + + /** + * The value of PI * 2. + * + * @name Phaser.Math.PI2 + * @type {number} + * @since 3.0.0 + */ + PI2: Math.PI * 2, + + /** + * The value of PI * 0.5. + * + * @name Phaser.Math.TAU + * @type {number} + * @since 3.0.0 + */ + TAU: Math.PI * 0.5, + + /** + * An epsilon value (1.0e-6) + * + * @name Phaser.Math.EPSILON + * @type {number} + * @since 3.0.0 + */ + EPSILON: 1.0e-6, + + /** + * For converting degrees to radians (PI / 180) + * + * @name Phaser.Math.DEG_TO_RAD + * @type {number} + * @since 3.0.0 + */ + DEG_TO_RAD: Math.PI / 180, + + /** + * For converting radians to degrees (180 / PI) + * + * @name Phaser.Math.RAD_TO_DEG + * @type {number} + * @since 3.0.0 + */ + RAD_TO_DEG: 180 / Math.PI, + + /** + * An instance of the Random Number Generator. + * This is not set until the Game boots. + * + * @name Phaser.Math.RND + * @type {Phaser.Math.RandomDataGenerator} + * @since 3.0.0 + */ + RND: null, + + /** + * The minimum safe integer this browser supports. + * We use a const for backward compatibility with Internet Explorer. + * + * @name Phaser.Math.MIN_SAFE_INTEGER + * @type {number} + * @since 3.21.0 + */ + MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991, + + /** + * The maximum safe integer this browser supports. + * We use a const for backward compatibility with Internet Explorer. + * + * @name Phaser.Math.MAX_SAFE_INTEGER + * @type {number} + * @since 3.21.0 + */ + MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991 + +}; + +module.exports = MATH_CONST; + + +/***/ }), +/* 3 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * A NOOP (No Operation) callback function. + * + * Used internally by Phaser when it's more expensive to determine if a callback exists + * than it is to just invoke an empty function. + * + * @function Phaser.Utils.NOOP + * @since 3.0.0 + */ +var NOOP = function () +{ + // NOOP +}; + +module.exports = NOOP; + + /***/ }), /* 4 */ /***/ (function(module, exports) { +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Tests if the start and end indexes are a safe range for the given array. + * + * @function Phaser.Utils.Array.SafeRange + * @since 3.4.0 + * + * @param {array} array - The array to check. + * @param {integer} startIndex - The start index. + * @param {integer} endIndex - The end index. + * @param {boolean} [throwError=true] - Throw an error if the range is out of bounds. + * + * @return {boolean} True if the range is safe, otherwise false. + */ +var SafeRange = function (array, startIndex, endIndex, throwError) +{ + var len = array.length; + + if (startIndex < 0 || + startIndex > len || + startIndex >= endIndex || + endIndex > len || + startIndex + endIndex > len) + { + if (throwError) + { + throw new Error('Range Error: Values outside acceptable range'); + } + + return false; + } + else + { + return true; + } +}; + +module.exports = SafeRange; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Force a value within the boundaries by clamping it to the range `min`, `max`. + * + * @function Phaser.Math.Clamp + * @since 3.0.0 + * + * @param {number} value - The value to be clamped. + * @param {number} min - The minimum bounds. + * @param {number} max - The maximum bounds. + * + * @return {number} The clamped value. + */ +var Clamp = function (value, min, max) +{ + return Math.max(min, Math.min(max, value)); +}; + +module.exports = Clamp; + + +/***/ }), +/* 6 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// Source object +// The key as a string, or an array of keys, i.e. 'banner', or 'banner.hideBanner' +// The default value to use if the key doesn't exist + +/** + * Retrieves a value from an object. + * + * @function Phaser.Utils.Objects.GetValue + * @since 3.0.0 + * + * @param {object} source - The object to retrieve the value from. + * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object. + * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object. + * + * @return {*} The value of the requested key. + */ +var GetValue = function (source, key, defaultValue) +{ + if (!source || typeof source === 'number') + { + return defaultValue; + } + else if (source.hasOwnProperty(key)) + { + return source[key]; + } + else if (key.indexOf('.') !== -1) + { + var keys = key.split('.'); + var parent = source; + var value = defaultValue; + + // Use for loop here so we can break early + for (var i = 0; i < keys.length; i++) + { + if (parent.hasOwnProperty(keys[i])) + { + // Yes it has a key property, let's carry on down + value = parent[keys[i]]; + + parent = parent[keys[i]]; + } + else + { + // Can't go any further, so reset to default + value = defaultValue; + break; + } + } + + return value; + } + else + { + return defaultValue; + } +}; + +module.exports = GetValue; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * This is a slightly modified version of jQuery.isPlainObject. + * A plain object is an object whose internal class property is [object Object]. + * + * @function Phaser.Utils.Objects.IsPlainObject + * @since 3.0.0 + * + * @param {object} obj - The object to inspect. + * + * @return {boolean} `true` if the object is plain, otherwise `false`. + */ +var IsPlainObject = function (obj) +{ + // Not plain objects: + // - Any object or value whose internal [[Class]] property is not "[object Object]" + // - DOM nodes + // - window + if (typeof(obj) !== 'object' || obj.nodeType || obj === obj.window) + { + return false; + } + + // Support: Firefox <20 + // The try/catch suppresses exceptions thrown when attempting to access + // the "constructor" property of certain host objects, ie. |window.location| + // https://bugzilla.mozilla.org/show_bug.cgi?id=814622 + try + { + if (obj.constructor && !({}).hasOwnProperty.call(obj.constructor.prototype, 'isPrototypeOf')) + { + return false; + } + } + catch (e) + { + return false; + } + + // If the function hasn't returned already, we're confident that + // |obj| is a plain object, created by {} or constructed with new Object + return true; +}; + +module.exports = IsPlainObject; + + +/***/ }), +/* 8 */ +/***/ (function(module, exports) { + /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. @@ -1307,7 +1484,100 @@ module.exports = GetFastValue; /***/ }), -/* 5 */ +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var GEOM_CONST = __webpack_require__(25); + +/** + * @classdesc + * Defines a Point in 2D space, with an x and y component. + * + * @class Point + * @memberof Phaser.Geom + * @constructor + * @since 3.0.0 + * + * @param {number} [x=0] - The x coordinate of this Point. + * @param {number} [y=x] - The y coordinate of this Point. + */ +var Point = new Class({ + + initialize: + + function Point (x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = x; } + + /** + * The geometry constant type of this object: `GEOM_CONST.POINT`. + * Used for fast type comparisons. + * + * @name Phaser.Geom.Point#type + * @type {integer} + * @readonly + * @since 3.19.0 + */ + this.type = GEOM_CONST.POINT; + + /** + * The x coordinate of this Point. + * + * @name Phaser.Geom.Point#x + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.x = x; + + /** + * The y coordinate of this Point. + * + * @name Phaser.Geom.Point#y + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.y = y; + }, + + /** + * Set the x and y coordinates of the point to the given values. + * + * @method Phaser.Geom.Point#setTo + * @since 3.0.0 + * + * @param {number} [x=0] - The x coordinate of this Point. + * @param {number} [y=x] - The y coordinate of this Point. + * + * @return {this} This Point object. + */ + setTo: function (x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = x; } + + this.x = x; + this.y = y; + + return this; + } + +}); + +module.exports = Point; + + +/***/ }), +/* 10 */ /***/ (function(module, exports) { /** @@ -1339,7 +1609,7 @@ module.exports = Wrap; /***/ }), -/* 6 */ +/* 11 */ /***/ (function(module, exports) { /** @@ -1491,7 +1761,7 @@ module.exports = FILE_CONST; /***/ }), -/* 7 */ +/* 12 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -1500,7 +1770,464 @@ module.exports = FILE_CONST; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(1); +var CheckMatrix = __webpack_require__(23); +var TransposeMatrix = __webpack_require__(56); + +/** + * Rotates the array matrix based on the given rotation value. + * + * The value can be given in degrees: 90, -90, 270, -270 or 180, + * or a string command: `rotateLeft`, `rotateRight` or `rotate180`. + * + * Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}. + * + * @function Phaser.Utils.Array.Matrix.RotateMatrix + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [matrix,$return] + * + * @param {T[][]} [matrix] - The array to rotate. + * @param {(number|string)} [direction=90] - The amount to rotate the matrix by. + * + * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix. + */ +var RotateMatrix = function (matrix, direction) +{ + if (direction === undefined) { direction = 90; } + + if (!CheckMatrix(matrix)) + { + return null; + } + + if (typeof direction !== 'string') + { + direction = ((direction % 360) + 360) % 360; + } + + if (direction === 90 || direction === -270 || direction === 'rotateLeft') + { + matrix = TransposeMatrix(matrix); + matrix.reverse(); + } + else if (direction === -90 || direction === 270 || direction === 'rotateRight') + { + matrix.reverse(); + matrix = TransposeMatrix(matrix); + } + else if (Math.abs(direction) === 180 || direction === 'rotate180') + { + for (var i = 0; i < matrix.length; i++) + { + matrix[i].reverse(); + } + + matrix.reverse(); + } + + return matrix; +}; + +module.exports = RotateMatrix; + + +/***/ }), +/* 13 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Removes a single item from an array and returns it without creating gc, like the native splice does. + * Based on code by Mike Reinstein. + * + * @function Phaser.Utils.Array.SpliceOne + * @since 3.0.0 + * + * @param {array} array - The array to splice from. + * @param {integer} index - The index of the item which should be spliced. + * + * @return {*} The item which was spliced (removed). + */ +var SpliceOne = function (array, index) +{ + if (index >= array.length) + { + return; + } + + var len = array.length - 1; + + var item = array[index]; + + for (var i = index; i < len; i++) + { + array[i] = array[i + 1]; + } + + array.length = len; + + return item; +}; + +module.exports = SpliceOne; + + +/***/ }), +/* 14 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Phaser Blend Modes. + * + * @namespace Phaser.BlendModes + * @since 3.0.0 + */ + +module.exports = { + + /** + * Skips the Blend Mode check in the renderer. + * + * @name Phaser.BlendModes.SKIP_CHECK + * @type {integer} + * @const + * @since 3.0.0 + */ + SKIP_CHECK: -1, + + /** + * Normal blend mode. For Canvas and WebGL. + * This is the default setting and draws new shapes on top of the existing canvas content. + * + * @name Phaser.BlendModes.NORMAL + * @type {integer} + * @const + * @since 3.0.0 + */ + NORMAL: 0, + + /** + * Add blend mode. For Canvas and WebGL. + * Where both shapes overlap the color is determined by adding color values. + * + * @name Phaser.BlendModes.ADD + * @type {integer} + * @const + * @since 3.0.0 + */ + ADD: 1, + + /** + * Multiply blend mode. For Canvas and WebGL. + * The pixels are of the top layer are multiplied with the corresponding pixel of the bottom layer. A darker picture is the result. + * + * @name Phaser.BlendModes.MULTIPLY + * @type {integer} + * @const + * @since 3.0.0 + */ + MULTIPLY: 2, + + /** + * Screen blend mode. For Canvas and WebGL. + * The pixels are inverted, multiplied, and inverted again. A lighter picture is the result (opposite of multiply) + * + * @name Phaser.BlendModes.SCREEN + * @type {integer} + * @const + * @since 3.0.0 + */ + SCREEN: 3, + + /** + * Overlay blend mode. For Canvas only. + * A combination of multiply and screen. Dark parts on the base layer become darker, and light parts become lighter. + * + * @name Phaser.BlendModes.OVERLAY + * @type {integer} + * @const + * @since 3.0.0 + */ + OVERLAY: 4, + + /** + * Darken blend mode. For Canvas only. + * Retains the darkest pixels of both layers. + * + * @name Phaser.BlendModes.DARKEN + * @type {integer} + * @const + * @since 3.0.0 + */ + DARKEN: 5, + + /** + * Lighten blend mode. For Canvas only. + * Retains the lightest pixels of both layers. + * + * @name Phaser.BlendModes.LIGHTEN + * @type {integer} + * @const + * @since 3.0.0 + */ + LIGHTEN: 6, + + /** + * Color Dodge blend mode. For Canvas only. + * Divides the bottom layer by the inverted top layer. + * + * @name Phaser.BlendModes.COLOR_DODGE + * @type {integer} + * @const + * @since 3.0.0 + */ + COLOR_DODGE: 7, + + /** + * Color Burn blend mode. For Canvas only. + * Divides the inverted bottom layer by the top layer, and then inverts the result. + * + * @name Phaser.BlendModes.COLOR_BURN + * @type {integer} + * @const + * @since 3.0.0 + */ + COLOR_BURN: 8, + + /** + * Hard Light blend mode. For Canvas only. + * A combination of multiply and screen like overlay, but with top and bottom layer swapped. + * + * @name Phaser.BlendModes.HARD_LIGHT + * @type {integer} + * @const + * @since 3.0.0 + */ + HARD_LIGHT: 9, + + /** + * Soft Light blend mode. For Canvas only. + * A softer version of hard-light. Pure black or white does not result in pure black or white. + * + * @name Phaser.BlendModes.SOFT_LIGHT + * @type {integer} + * @const + * @since 3.0.0 + */ + SOFT_LIGHT: 10, + + /** + * Difference blend mode. For Canvas only. + * Subtracts the bottom layer from the top layer or the other way round to always get a positive value. + * + * @name Phaser.BlendModes.DIFFERENCE + * @type {integer} + * @const + * @since 3.0.0 + */ + DIFFERENCE: 11, + + /** + * Exclusion blend mode. For Canvas only. + * Like difference, but with lower contrast. + * + * @name Phaser.BlendModes.EXCLUSION + * @type {integer} + * @const + * @since 3.0.0 + */ + EXCLUSION: 12, + + /** + * Hue blend mode. For Canvas only. + * Preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer. + * + * @name Phaser.BlendModes.HUE + * @type {integer} + * @const + * @since 3.0.0 + */ + HUE: 13, + + /** + * Saturation blend mode. For Canvas only. + * Preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer. + * + * @name Phaser.BlendModes.SATURATION + * @type {integer} + * @const + * @since 3.0.0 + */ + SATURATION: 14, + + /** + * Color blend mode. For Canvas only. + * Preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer. + * + * @name Phaser.BlendModes.COLOR + * @type {integer} + * @const + * @since 3.0.0 + */ + COLOR: 15, + + /** + * Luminosity blend mode. For Canvas only. + * Preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer. + * + * @name Phaser.BlendModes.LUMINOSITY + * @type {integer} + * @const + * @since 3.0.0 + */ + LUMINOSITY: 16, + + /** + * Alpha erase blend mode. For Canvas and WebGL. + * + * @name Phaser.BlendModes.ERASE + * @type {integer} + * @const + * @since 3.0.0 + */ + ERASE: 17, + + /** + * Source-in blend mode. For Canvas only. + * The new shape is drawn only where both the new shape and the destination canvas overlap. Everything else is made transparent. + * + * @name Phaser.BlendModes.SOURCE_IN + * @type {integer} + * @const + * @since 3.0.0 + */ + SOURCE_IN: 18, + + /** + * Source-out blend mode. For Canvas only. + * The new shape is drawn where it doesn't overlap the existing canvas content. + * + * @name Phaser.BlendModes.SOURCE_OUT + * @type {integer} + * @const + * @since 3.0.0 + */ + SOURCE_OUT: 19, + + /** + * Source-out blend mode. For Canvas only. + * The new shape is only drawn where it overlaps the existing canvas content. + * + * @name Phaser.BlendModes.SOURCE_ATOP + * @type {integer} + * @const + * @since 3.0.0 + */ + SOURCE_ATOP: 20, + + /** + * Destination-over blend mode. For Canvas only. + * New shapes are drawn behind the existing canvas content. + * + * @name Phaser.BlendModes.DESTINATION_OVER + * @type {integer} + * @const + * @since 3.0.0 + */ + DESTINATION_OVER: 21, + + /** + * Destination-in blend mode. For Canvas only. + * The existing canvas content is kept where both the new shape and existing canvas content overlap. Everything else is made transparent. + * + * @name Phaser.BlendModes.DESTINATION_IN + * @type {integer} + * @const + * @since 3.0.0 + */ + DESTINATION_IN: 22, + + /** + * Destination-out blend mode. For Canvas only. + * The existing content is kept where it doesn't overlap the new shape. + * + * @name Phaser.BlendModes.DESTINATION_OUT + * @type {integer} + * @const + * @since 3.0.0 + */ + DESTINATION_OUT: 23, + + /** + * Destination-out blend mode. For Canvas only. + * The existing canvas is only kept where it overlaps the new shape. The new shape is drawn behind the canvas content. + * + * @name Phaser.BlendModes.DESTINATION_ATOP + * @type {integer} + * @const + * @since 3.0.0 + */ + DESTINATION_ATOP: 24, + + /** + * Lighten blend mode. For Canvas only. + * Where both shapes overlap the color is determined by adding color values. + * + * @name Phaser.BlendModes.LIGHTER + * @type {integer} + * @const + * @since 3.0.0 + */ + LIGHTER: 25, + + /** + * Copy blend mode. For Canvas only. + * Only the new shape is shown. + * + * @name Phaser.BlendModes.COPY + * @type {integer} + * @const + * @since 3.0.0 + */ + COPY: 26, + + /** + * Xor blend mode. For Canvas only. + * Shapes are made transparent where both overlap and drawn normal everywhere else. + * + * @name Phaser.BlendModes.XOR + * @type {integer} + * @const + * @since 3.0.0 + */ + XOR: 27 + +}; + + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(2); /** * Takes an angle in Phasers default clockwise format and converts it so that @@ -1536,7 +2263,7 @@ module.exports = CounterClockwise; /***/ }), -/* 8 */ +/* 16 */ /***/ (function(module, exports) { /** @@ -1565,37 +2292,7 @@ module.exports = FloatBetween; /***/ }), -/* 9 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Force a value within the boundaries by clamping it to the range `min`, `max`. - * - * @function Phaser.Math.Clamp - * @since 3.0.0 - * - * @param {number} value - The value to be clamped. - * @param {number} min - The minimum bounds. - * @param {number} max - The maximum bounds. - * - * @return {number} The clamped value. - */ -var Clamp = function (value, min, max) -{ - return Math.max(min, Math.min(max, value)); -}; - -module.exports = Clamp; - - -/***/ }), -/* 10 */ +/* 17 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -1604,7 +2301,37 @@ module.exports = Clamp; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(1); +var CONST = __webpack_require__(2); + +/** + * Convert the given angle from degrees, to the equivalent angle in radians. + * + * @function Phaser.Math.DegToRad + * @since 3.0.0 + * + * @param {integer} degrees - The angle (in degrees) to convert to radians. + * + * @return {number} The given angle converted to radians. + */ +var DegToRad = function (degrees) +{ + return degrees * CONST.DEG_TO_RAD; +}; + +module.exports = DegToRad; + + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(2); /** * Convert the given angle in radians, to the equivalent angle in degrees. @@ -1625,7 +2352,7 @@ module.exports = RadToDeg; /***/ }), -/* 11 */ +/* 19 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -2435,78 +3162,7 @@ module.exports = Vector3; /***/ }), -/* 12 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -// Source object -// The key as a string, or an array of keys, i.e. 'banner', or 'banner.hideBanner' -// The default value to use if the key doesn't exist - -/** - * Retrieves a value from an object. - * - * @function Phaser.Utils.Objects.GetValue - * @since 3.0.0 - * - * @param {object} source - The object to retrieve the value from. - * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object. - * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object. - * - * @return {*} The value of the requested key. - */ -var GetValue = function (source, key, defaultValue) -{ - if (!source || typeof source === 'number') - { - return defaultValue; - } - else if (source.hasOwnProperty(key)) - { - return source[key]; - } - else if (key.indexOf('.') !== -1) - { - var keys = key.split('.'); - var parent = source; - var value = defaultValue; - - // Use for loop here so we can break early - for (var i = 0; i < keys.length; i++) - { - if (parent.hasOwnProperty(keys[i])) - { - // Yes it has a key property, let's carry on down - value = parent[keys[i]]; - - parent = parent[keys[i]]; - } - else - { - // Can't go any further, so reset to default - value = defaultValue; - break; - } - } - - return value; - } - else - { - return defaultValue; - } -}; - -module.exports = GetValue; - - -/***/ }), -/* 13 */ +/* 20 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -2516,13 +3172,13 @@ module.exports = GetValue; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(6); -var Events = __webpack_require__(178); -var GetFastValue = __webpack_require__(4); -var GetURL = __webpack_require__(189); -var MergeXHRSettings = __webpack_require__(32); -var XHRLoader = __webpack_require__(190); -var XHRSettings = __webpack_require__(33); +var CONST = __webpack_require__(11); +var Events = __webpack_require__(202); +var GetFastValue = __webpack_require__(8); +var GetURL = __webpack_require__(213); +var MergeXHRSettings = __webpack_require__(44); +var XHRLoader = __webpack_require__(214); +var XHRSettings = __webpack_require__(45); /** * @classdesc @@ -3054,7 +3710,7 @@ module.exports = File; /***/ }), -/* 14 */ +/* 21 */ /***/ (function(module, exports) { /** @@ -3123,7 +3779,7 @@ module.exports = FileTypesManager; /***/ }), -/* 15 */ +/* 22 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -3132,7 +3788,692 @@ module.exports = FileTypesManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var IsPlainObject = __webpack_require__(2); +/** + * @namespace Phaser.GameObjects.Events + */ + +module.exports = { + + ADDED_TO_SCENE: __webpack_require__(225), + DESTROY: __webpack_require__(226), + REMOVED_FROM_SCENE: __webpack_require__(227), + VIDEO_COMPLETE: __webpack_require__(228), + VIDEO_CREATED: __webpack_require__(229), + VIDEO_ERROR: __webpack_require__(230), + VIDEO_LOOP: __webpack_require__(231), + VIDEO_PLAY: __webpack_require__(232), + VIDEO_SEEKED: __webpack_require__(233), + VIDEO_SEEKING: __webpack_require__(234), + VIDEO_STOP: __webpack_require__(235), + VIDEO_TIMEOUT: __webpack_require__(236), + VIDEO_UNLOCKED: __webpack_require__(237) + +}; + + +/***/ }), +/* 23 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Checks if an array can be used as a matrix. + * + * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows) have the same length. There must be at least two rows: + * + * ``` + * [ + * [ 1, 1, 1, 1, 1, 1 ], + * [ 2, 0, 0, 0, 0, 4 ], + * [ 2, 0, 1, 2, 0, 4 ], + * [ 2, 0, 3, 4, 0, 4 ], + * [ 2, 0, 0, 0, 0, 4 ], + * [ 3, 3, 3, 3, 3, 3 ] + * ] + * ``` + * + * @function Phaser.Utils.Array.Matrix.CheckMatrix + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [matrix] + * + * @param {T[][]} [matrix] - The array to check. + * + * @return {boolean} `true` if the given `matrix` array is a valid matrix. + */ +var CheckMatrix = function (matrix) +{ + if (!Array.isArray(matrix) || matrix.length < 2 || !Array.isArray(matrix[0])) + { + return false; + } + + // How long is the first row? + var size = matrix[0].length; + + // Validate the rest of the rows are the same length + for (var i = 1; i < matrix.length; i++) + { + if (matrix[i].length !== size) + { + return false; + } + } + + return true; +}; + +module.exports = CheckMatrix; + + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var Contains = __webpack_require__(312); +var GetPoint = __webpack_require__(60); +var GetPoints = __webpack_require__(313); +var GEOM_CONST = __webpack_require__(25); +var Line = __webpack_require__(314); +var Random = __webpack_require__(319); + +/** + * @classdesc + * Encapsulates a 2D rectangle defined by its corner point in the top-left and its extends in x (width) and y (height) + * + * @class Rectangle + * @memberof Phaser.Geom + * @constructor + * @since 3.0.0 + * + * @param {number} [x=0] - The X coordinate of the top left corner of the Rectangle. + * @param {number} [y=0] - The Y coordinate of the top left corner of the Rectangle. + * @param {number} [width=0] - The width of the Rectangle. + * @param {number} [height=0] - The height of the Rectangle. + */ +var Rectangle = new Class({ + + initialize: + + function Rectangle (x, y, width, height) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + if (width === undefined) { width = 0; } + if (height === undefined) { height = 0; } + + /** + * The geometry constant type of this object: `GEOM_CONST.RECTANGLE`. + * Used for fast type comparisons. + * + * @name Phaser.Geom.Rectangle#type + * @type {integer} + * @readonly + * @since 3.19.0 + */ + this.type = GEOM_CONST.RECTANGLE; + + /** + * The X coordinate of the top left corner of the Rectangle. + * + * @name Phaser.Geom.Rectangle#x + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.x = x; + + /** + * The Y coordinate of the top left corner of the Rectangle. + * + * @name Phaser.Geom.Rectangle#y + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.y = y; + + /** + * The width of the Rectangle, i.e. the distance between its left side (defined by `x`) and its right side. + * + * @name Phaser.Geom.Rectangle#width + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.width = width; + + /** + * The height of the Rectangle, i.e. the distance between its top side (defined by `y`) and its bottom side. + * + * @name Phaser.Geom.Rectangle#height + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.height = height; + }, + + /** + * Checks if the given point is inside the Rectangle's bounds. + * + * @method Phaser.Geom.Rectangle#contains + * @since 3.0.0 + * + * @param {number} x - The X coordinate of the point to check. + * @param {number} y - The Y coordinate of the point to check. + * + * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`. + */ + contains: function (x, y) + { + return Contains(this, x, y); + }, + + /** + * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter. + * + * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is. + * + * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side. + * + * @method Phaser.Geom.Rectangle#getPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [output,$return] + * + * @param {number} position - The normalized distance into the Rectangle's perimeter to return. + * @param {(Phaser.Geom.Point|object)} [output] - An object to update with the `x` and `y` coordinates of the point. + * + * @return {(Phaser.Geom.Point|object)} The updated `output` object, or a new Point if no `output` object was given. + */ + getPoint: function (position, output) + { + return GetPoint(this, position, output); + }, + + /** + * Returns an array of points from the perimeter of the Rectangle, each spaced out based on the quantity or step required. + * + * @method Phaser.Geom.Rectangle#getPoints + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point[]} O - [output,$return] + * + * @param {integer} quantity - The number of points to return. Set to `false` or 0 to return an arbitrary number of points (`perimeter / stepRate`) evenly spaced around the Rectangle based on the `stepRate`. + * @param {number} [stepRate] - If `quantity` is 0, determines the normalized distance between each returned point. + * @param {(array|Phaser.Geom.Point[])} [output] - An array to which to append the points. + * + * @return {(array|Phaser.Geom.Point[])} The modified `output` array, or a new array if none was provided. + */ + getPoints: function (quantity, stepRate, output) + { + return GetPoints(this, quantity, stepRate, output); + }, + + /** + * Returns a random point within the Rectangle's bounds. + * + * @method Phaser.Geom.Rectangle#getRandomPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [point,$return] + * + * @param {Phaser.Geom.Point} [point] - The object in which to store the `x` and `y` coordinates of the point. + * + * @return {Phaser.Geom.Point} The updated `point`, or a new Point if none was provided. + */ + getRandomPoint: function (point) + { + return Random(this, point); + }, + + /** + * Sets the position, width, and height of the Rectangle. + * + * @method Phaser.Geom.Rectangle#setTo + * @since 3.0.0 + * + * @param {number} x - The X coordinate of the top left corner of the Rectangle. + * @param {number} y - The Y coordinate of the top left corner of the Rectangle. + * @param {number} width - The width of the Rectangle. + * @param {number} height - The height of the Rectangle. + * + * @return {this} This Rectangle object. + */ + setTo: function (x, y, width, height) + { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + + return this; + }, + + /** + * Resets the position, width, and height of the Rectangle to 0. + * + * @method Phaser.Geom.Rectangle#setEmpty + * @since 3.0.0 + * + * @return {this} This Rectangle object. + */ + setEmpty: function () + { + return this.setTo(0, 0, 0, 0); + }, + + /** + * Sets the position of the Rectangle. + * + * @method Phaser.Geom.Rectangle#setPosition + * @since 3.0.0 + * + * @param {number} x - The X coordinate of the top left corner of the Rectangle. + * @param {number} [y=x] - The Y coordinate of the top left corner of the Rectangle. + * + * @return {this} This Rectangle object. + */ + setPosition: function (x, y) + { + if (y === undefined) { y = x; } + + this.x = x; + this.y = y; + + return this; + }, + + /** + * Sets the width and height of the Rectangle. + * + * @method Phaser.Geom.Rectangle#setSize + * @since 3.0.0 + * + * @param {number} width - The width to set the Rectangle to. + * @param {number} [height=width] - The height to set the Rectangle to. + * + * @return {this} This Rectangle object. + */ + setSize: function (width, height) + { + if (height === undefined) { height = width; } + + this.width = width; + this.height = height; + + return this; + }, + + /** + * Determines if the Rectangle is empty. A Rectangle is empty if its width or height is less than or equal to 0. + * + * @method Phaser.Geom.Rectangle#isEmpty + * @since 3.0.0 + * + * @return {boolean} `true` if the Rectangle is empty. A Rectangle object is empty if its width or height is less than or equal to 0. + */ + isEmpty: function () + { + return (this.width <= 0 || this.height <= 0); + }, + + /** + * Returns a Line object that corresponds to the top of this Rectangle. + * + * @method Phaser.Geom.Rectangle#getLineA + * @since 3.0.0 + * + * @generic {Phaser.Geom.Line} O - [line,$return] + * + * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created. + * + * @return {Phaser.Geom.Line} A Line object that corresponds to the top of this Rectangle. + */ + getLineA: function (line) + { + if (line === undefined) { line = new Line(); } + + line.setTo(this.x, this.y, this.right, this.y); + + return line; + }, + + /** + * Returns a Line object that corresponds to the right of this Rectangle. + * + * @method Phaser.Geom.Rectangle#getLineB + * @since 3.0.0 + * + * @generic {Phaser.Geom.Line} O - [line,$return] + * + * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created. + * + * @return {Phaser.Geom.Line} A Line object that corresponds to the right of this Rectangle. + */ + getLineB: function (line) + { + if (line === undefined) { line = new Line(); } + + line.setTo(this.right, this.y, this.right, this.bottom); + + return line; + }, + + /** + * Returns a Line object that corresponds to the bottom of this Rectangle. + * + * @method Phaser.Geom.Rectangle#getLineC + * @since 3.0.0 + * + * @generic {Phaser.Geom.Line} O - [line,$return] + * + * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created. + * + * @return {Phaser.Geom.Line} A Line object that corresponds to the bottom of this Rectangle. + */ + getLineC: function (line) + { + if (line === undefined) { line = new Line(); } + + line.setTo(this.right, this.bottom, this.x, this.bottom); + + return line; + }, + + /** + * Returns a Line object that corresponds to the left of this Rectangle. + * + * @method Phaser.Geom.Rectangle#getLineD + * @since 3.0.0 + * + * @generic {Phaser.Geom.Line} O - [line,$return] + * + * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created. + * + * @return {Phaser.Geom.Line} A Line object that corresponds to the left of this Rectangle. + */ + getLineD: function (line) + { + if (line === undefined) { line = new Line(); } + + line.setTo(this.x, this.bottom, this.x, this.y); + + return line; + }, + + /** + * The x coordinate of the left of the Rectangle. + * Changing the left property of a Rectangle object has no effect on the y and height properties. However it does affect the width property, whereas changing the x value does not affect the width property. + * + * @name Phaser.Geom.Rectangle#left + * @type {number} + * @since 3.0.0 + */ + left: { + + get: function () + { + return this.x; + }, + + set: function (value) + { + if (value >= this.right) + { + this.width = 0; + } + else + { + this.width = this.right - value; + } + + this.x = value; + } + + }, + + /** + * The sum of the x and width properties. + * Changing the right property of a Rectangle object has no effect on the x, y and height properties, however it does affect the width property. + * + * @name Phaser.Geom.Rectangle#right + * @type {number} + * @since 3.0.0 + */ + right: { + + get: function () + { + return this.x + this.width; + }, + + set: function (value) + { + if (value <= this.x) + { + this.width = 0; + } + else + { + this.width = value - this.x; + } + } + + }, + + /** + * The y coordinate of the top of the Rectangle. Changing the top property of a Rectangle object has no effect on the x and width properties. + * However it does affect the height property, whereas changing the y value does not affect the height property. + * + * @name Phaser.Geom.Rectangle#top + * @type {number} + * @since 3.0.0 + */ + top: { + + get: function () + { + return this.y; + }, + + set: function (value) + { + if (value >= this.bottom) + { + this.height = 0; + } + else + { + this.height = (this.bottom - value); + } + + this.y = value; + } + + }, + + /** + * The sum of the y and height properties. + * Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property. + * + * @name Phaser.Geom.Rectangle#bottom + * @type {number} + * @since 3.0.0 + */ + bottom: { + + get: function () + { + return this.y + this.height; + }, + + set: function (value) + { + if (value <= this.y) + { + this.height = 0; + } + else + { + this.height = value - this.y; + } + } + + }, + + /** + * The x coordinate of the center of the Rectangle. + * + * @name Phaser.Geom.Rectangle#centerX + * @type {number} + * @since 3.0.0 + */ + centerX: { + + get: function () + { + return this.x + (this.width / 2); + }, + + set: function (value) + { + this.x = value - (this.width / 2); + } + + }, + + /** + * The y coordinate of the center of the Rectangle. + * + * @name Phaser.Geom.Rectangle#centerY + * @type {number} + * @since 3.0.0 + */ + centerY: { + + get: function () + { + return this.y + (this.height / 2); + }, + + set: function (value) + { + this.y = value - (this.height / 2); + } + + } + +}); + +module.exports = Rectangle; + + +/***/ }), +/* 25 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GEOM_CONST = { + + /** + * A Circle Geometry object type. + * + * @name Phaser.Geom.CIRCLE + * @type {integer} + * @since 3.19.0 + */ + CIRCLE: 0, + + /** + * An Ellipse Geometry object type. + * + * @name Phaser.Geom.ELLIPSE + * @type {integer} + * @since 3.19.0 + */ + ELLIPSE: 1, + + /** + * A Line Geometry object type. + * + * @name Phaser.Geom.LINE + * @type {integer} + * @since 3.19.0 + */ + LINE: 2, + + /** + * A Point Geometry object type. + * + * @name Phaser.Geom.POINT + * @type {integer} + * @since 3.19.0 + */ + POINT: 3, + + /** + * A Polygon Geometry object type. + * + * @name Phaser.Geom.POLYGON + * @type {integer} + * @since 3.19.0 + */ + POLYGON: 4, + + /** + * A Rectangle Geometry object type. + * + * @name Phaser.Geom.RECTANGLE + * @type {integer} + * @since 3.19.0 + */ + RECTANGLE: 5, + + /** + * A Triangle Geometry object type. + * + * @name Phaser.Geom.TRIANGLE + * @type {integer} + * @since 3.19.0 + */ + TRIANGLE: 6 + +}; + +module.exports = GEOM_CONST; + + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var IsPlainObject = __webpack_require__(7); // @param {boolean} deep - Perform a deep copy? // @param {object} target - The target object to copy to. @@ -3224,7 +4565,7 @@ module.exports = Extend; /***/ }), -/* 16 */ +/* 27 */ /***/ (function(module, exports) { /** @@ -3255,7 +4596,7 @@ module.exports = Between; /***/ }), -/* 17 */ +/* 28 */ /***/ (function(module, exports) { /** @@ -3292,7 +4633,7 @@ module.exports = Normalize; /***/ }), -/* 18 */ +/* 29 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -3301,7 +4642,7 @@ module.exports = Normalize; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathWrap = __webpack_require__(5); +var MathWrap = __webpack_require__(10); /** * Wrap an angle. @@ -3324,7 +4665,7 @@ module.exports = Wrap; /***/ }), -/* 19 */ +/* 30 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -3333,7 +4674,7 @@ module.exports = Wrap; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Wrap = __webpack_require__(5); +var Wrap = __webpack_require__(10); /** * Wrap an angle in degrees. @@ -3356,7 +4697,7 @@ module.exports = WrapDegrees; /***/ }), -/* 20 */ +/* 31 */ /***/ (function(module, exports) { /** @@ -3390,7 +4731,7 @@ module.exports = Equal; /***/ }), -/* 21 */ +/* 32 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -3399,7 +4740,7 @@ module.exports = Equal; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Factorial = __webpack_require__(22); +var Factorial = __webpack_require__(33); /** * Calculates the Bernstein basis from the three factorial coefficients. @@ -3421,7 +4762,7 @@ module.exports = Bernstein; /***/ }), -/* 22 */ +/* 33 */ /***/ (function(module, exports) { /** @@ -3461,7 +4802,7 @@ module.exports = Factorial; /***/ }), -/* 23 */ +/* 34 */ /***/ (function(module, exports) { /** @@ -3498,7 +4839,7 @@ module.exports = CatmullRom; /***/ }), -/* 24 */ +/* 35 */ /***/ (function(module, exports) { /** @@ -3528,7 +4869,7 @@ module.exports = Linear; /***/ }), -/* 25 */ +/* 36 */ /***/ (function(module, exports) { /** @@ -3575,7 +4916,7 @@ module.exports = SmoothStep; /***/ }), -/* 26 */ +/* 37 */ /***/ (function(module, exports) { /** @@ -3614,8 +4955,8 @@ module.exports = SmootherStep; /***/ }), -/* 27 */ -/***/ (function(module, exports, __webpack_require__) { +/* 38 */ +/***/ (function(module, exports) { /** * @author Richard Davey @@ -3623,28 +4964,71 @@ module.exports = SmootherStep; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(1); - /** - * Convert the given angle from degrees, to the equivalent angle in radians. + * Rotate a `point` around `x` and `y` to the given `angle`, at the same distance. * - * @function Phaser.Math.DegToRad + * In polar notation, this maps a point from (r, t) to (r, angle), vs. the origin (x, y). + * + * @function Phaser.Math.RotateAround * @since 3.0.0 * - * @param {integer} degrees - The angle (in degrees) to convert to radians. + * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return] * - * @return {number} The given angle converted to radians. + * @param {(Phaser.Geom.Point|object)} point - The point to be rotated. + * @param {number} x - The horizontal coordinate to rotate around. + * @param {number} y - The vertical coordinate to rotate around. + * @param {number} angle - The angle of rotation in radians. + * + * @return {Phaser.Types.Math.Vector2Like} The given point. */ -var DegToRad = function (degrees) +var RotateAround = function (point, x, y, angle) { - return degrees * CONST.DEG_TO_RAD; + var c = Math.cos(angle); + var s = Math.sin(angle); + + var tx = point.x - x; + var ty = point.y - y; + + point.x = tx * c - ty * s + x; + point.y = tx * s + ty * c + y; + + return point; }; -module.exports = DegToRad; +module.exports = RotateAround; /***/ }), -/* 28 */ +/* 39 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Round a given number so it is further away from zero. That is, positive numbers are rounded up, and negative numbers are rounded down. + * + * @function Phaser.Math.RoundAwayFromZero + * @since 3.0.0 + * + * @param {number} value - The number to round. + * + * @return {number} The rounded number, rounded away from zero. + */ +var RoundAwayFromZero = function (value) +{ + // "Opposite" of truncate. + return (value > 0) ? Math.ceil(value) : Math.floor(value); +}; + +module.exports = RoundAwayFromZero; + + +/***/ }), +/* 40 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -3653,7 +5037,7 @@ module.exports = DegToRad; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector2 = __webpack_require__(3); +var Vector2 = __webpack_require__(1); /** * Takes the `x` and `y` coordinates and transforms them into the same space as @@ -3699,7 +5083,7 @@ module.exports = TransformXY; /***/ }), -/* 29 */ +/* 41 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -4292,7 +5676,7 @@ module.exports = Matrix3; /***/ }), -/* 30 */ +/* 42 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -5754,7 +7138,7 @@ module.exports = Matrix4; /***/ }), -/* 31 */ +/* 43 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -5767,8 +7151,8 @@ module.exports = Matrix4; // and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl var Class = __webpack_require__(0); -var Vector3 = __webpack_require__(11); -var Matrix3 = __webpack_require__(29); +var Vector3 = __webpack_require__(19); +var Matrix3 = __webpack_require__(41); var EPSILON = 0.000001; @@ -6526,7 +7910,7 @@ module.exports = Quaternion; /***/ }), -/* 32 */ +/* 44 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -6535,8 +7919,8 @@ module.exports = Quaternion; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Extend = __webpack_require__(15); -var XHRSettings = __webpack_require__(33); +var Extend = __webpack_require__(26); +var XHRSettings = __webpack_require__(45); /** * Takes two XHRSettings Objects and creates a new XHRSettings object from them. @@ -6574,7 +7958,7 @@ module.exports = MergeXHRSettings; /***/ }), -/* 33 */ +/* 45 */ /***/ (function(module, exports) { /** @@ -6644,7 +8028,7 @@ module.exports = XHRSettings; /***/ }), -/* 34 */ +/* 46 */ /***/ (function(module, exports) { /** @@ -6654,40 +8038,3690 @@ module.exports = XHRSettings; */ /** - * A NOOP (No Operation) callback function. - * - * Used internally by Phaser when it's more expensive to determine if a callback exists - * than it is to just invoke an empty function. - * - * @function Phaser.Utils.NOOP + * Provides methods used for calculating and setting the size of a non-Frame based Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.ComputedSize * @since 3.0.0 */ -var NOOP = function () -{ - // NOOP + +var ComputedSize = { + + /** + * The native (un-scaled) width of this Game Object. + * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayWidth` property. + * + * @name Phaser.GameObjects.Components.ComputedSize#width + * @type {number} + * @since 3.0.0 + */ + width: 0, + + /** + * The native (un-scaled) height of this Game Object. + * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayHeight` property. + * + * @name Phaser.GameObjects.Components.ComputedSize#height + * @type {number} + * @since 3.0.0 + */ + height: 0, + + /** + * The displayed width of this Game Object. + * + * This value takes into account the scale factor. + * + * Setting this value will adjust the Game Object's scale property. + * + * @name Phaser.GameObjects.Components.ComputedSize#displayWidth + * @type {number} + * @since 3.0.0 + */ + displayWidth: { + + get: function () + { + return this.scaleX * this.width; + }, + + set: function (value) + { + this.scaleX = value / this.width; + } + + }, + + /** + * The displayed height of this Game Object. + * + * This value takes into account the scale factor. + * + * Setting this value will adjust the Game Object's scale property. + * + * @name Phaser.GameObjects.Components.ComputedSize#displayHeight + * @type {number} + * @since 3.0.0 + */ + displayHeight: { + + get: function () + { + return this.scaleY * this.height; + }, + + set: function (value) + { + this.scaleY = value / this.height; + } + + }, + + /** + * Sets the internal size of this Game Object, as used for frame or physics body creation. + * + * This will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or call the + * `setDisplaySize` method, which is the same thing as changing the scale but allows you + * to do so by giving pixel values. + * + * If you have enabled this Game Object for input, changing the size will _not_ change the + * size of the hit area. To do this you should adjust the `input.hitArea` object directly. + * + * @method Phaser.GameObjects.Components.ComputedSize#setSize + * @since 3.4.0 + * + * @param {number} width - The width of this Game Object. + * @param {number} height - The height of this Game Object. + * + * @return {this} This Game Object instance. + */ + setSize: function (width, height) + { + this.width = width; + this.height = height; + + return this; + }, + + /** + * Sets the display size of this Game Object. + * + * Calling this will adjust the scale. + * + * @method Phaser.GameObjects.Components.ComputedSize#setDisplaySize + * @since 3.4.0 + * + * @param {number} width - The width of this Game Object. + * @param {number} height - The height of this Game Object. + * + * @return {this} This Game Object instance. + */ + setDisplaySize: function (width, height) + { + this.displayWidth = width; + this.displayHeight = height; + + return this; + } + }; -module.exports = NOOP; +module.exports = ComputedSize; /***/ }), -/* 35 */ +/* 47 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for setting the depth of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.Depth + * @since 3.0.0 + */ + +var Depth = { + + /** + * Private internal value. Holds the depth of the Game Object. + * + * @name Phaser.GameObjects.Components.Depth#_depth + * @type {integer} + * @private + * @default 0 + * @since 3.0.0 + */ + _depth: 0, + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The default depth is zero. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * + * @name Phaser.GameObjects.Components.Depth#depth + * @type {number} + * @since 3.0.0 + */ + depth: { + + get: function () + { + return this._depth; + }, + + set: function (value) + { + this.scene.sys.queueDepthSort(); + this._depth = value; + } + + }, + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The default depth is zero. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * + * @method Phaser.GameObjects.Components.Depth#setDepth + * @since 3.0.0 + * + * @param {integer} value - The depth of this Game Object. + * + * @return {this} This Game Object instance. + */ + setDepth: function (value) + { + if (value === undefined) { value = 0; } + + this.depth = value; + + return this; + } + +}; + +module.exports = Depth; + + +/***/ }), +/* 48 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for visually flipping a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.Flip + * @since 3.0.0 + */ + +var Flip = { + + /** + * The horizontally flipped state of the Game Object. + * + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + * + * @name Phaser.GameObjects.Components.Flip#flipX + * @type {boolean} + * @default false + * @since 3.0.0 + */ + flipX: false, + + /** + * The vertically flipped state of the Game Object. + * + * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + * + * @name Phaser.GameObjects.Components.Flip#flipY + * @type {boolean} + * @default false + * @since 3.0.0 + */ + flipY: false, + + /** + * Toggles the horizontal flipped state of this Game Object. + * + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + * + * @method Phaser.GameObjects.Components.Flip#toggleFlipX + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + toggleFlipX: function () + { + this.flipX = !this.flipX; + + return this; + }, + + /** + * Toggles the vertical flipped state of this Game Object. + * + * @method Phaser.GameObjects.Components.Flip#toggleFlipY + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + toggleFlipY: function () + { + this.flipY = !this.flipY; + + return this; + }, + + /** + * Sets the horizontal flipped state of this Game Object. + * + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + * + * @method Phaser.GameObjects.Components.Flip#setFlipX + * @since 3.0.0 + * + * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped. + * + * @return {this} This Game Object instance. + */ + setFlipX: function (value) + { + this.flipX = value; + + return this; + }, + + /** + * Sets the vertical flipped state of this Game Object. + * + * @method Phaser.GameObjects.Components.Flip#setFlipY + * @since 3.0.0 + * + * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped. + * + * @return {this} This Game Object instance. + */ + setFlipY: function (value) + { + this.flipY = value; + + return this; + }, + + /** + * Sets the horizontal and vertical flipped state of this Game Object. + * + * A Game Object that is flipped will render inversed on the flipped axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + * + * @method Phaser.GameObjects.Components.Flip#setFlip + * @since 3.0.0 + * + * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped. + * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped. + * + * @return {this} This Game Object instance. + */ + setFlip: function (x, y) + { + this.flipX = x; + this.flipY = y; + + return this; + }, + + /** + * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state. + * + * @method Phaser.GameObjects.Components.Flip#resetFlip + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + resetFlip: function () + { + this.flipX = false; + this.flipY = false; + + return this; + } + +}; + +module.exports = Flip; + + +/***/ }), +/* 49 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for getting and setting the Scroll Factor of a Game Object. + * + * @namespace Phaser.GameObjects.Components.ScrollFactor + * @since 3.0.0 + */ + +var ScrollFactor = { + + /** + * 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. + * + * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorX + * @type {number} + * @default 1 + * @since 3.0.0 + */ + scrollFactorX: 1, + + /** + * 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. + * + * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorY + * @type {number} + * @default 1 + * @since 3.0.0 + */ + scrollFactorY: 1, + + /** + * 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. + * + * @method Phaser.GameObjects.Components.ScrollFactor#setScrollFactor + * @since 3.0.0 + * + * @param {number} x - The horizontal scroll factor of this Game Object. + * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value. + * + * @return {this} This Game Object instance. + */ + setScrollFactor: function (x, y) + { + if (y === undefined) { y = x; } + + this.scrollFactorX = x; + this.scrollFactorY = y; + + return this; + } + +}; + +module.exports = ScrollFactor; + + +/***/ }), +/* 50 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var MATH_CONST = __webpack_require__(2); +var TransformMatrix = __webpack_require__(51); +var TransformXY = __webpack_require__(40); +var WrapAngle = __webpack_require__(29); +var WrapAngleDegrees = __webpack_require__(30); +var Vector2 = __webpack_require__(1); + +// global bitmask flag for GameObject.renderMask (used by Scale) +var _FLAG = 4; // 0100 + +/** + * Provides methods used for getting and setting the position, scale and rotation of a Game Object. + * + * @namespace Phaser.GameObjects.Components.Transform + * @since 3.0.0 + */ + +var Transform = { + + /** + * Private internal value. Holds the horizontal scale value. + * + * @name Phaser.GameObjects.Components.Transform#_scaleX + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _scaleX: 1, + + /** + * Private internal value. Holds the vertical scale value. + * + * @name Phaser.GameObjects.Components.Transform#_scaleY + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _scaleY: 1, + + /** + * Private internal value. Holds the rotation value in radians. + * + * @name Phaser.GameObjects.Components.Transform#_rotation + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + _rotation: 0, + + /** + * The x position of this Game Object. + * + * @name Phaser.GameObjects.Components.Transform#x + * @type {number} + * @default 0 + * @since 3.0.0 + */ + x: 0, + + /** + * The y position of this Game Object. + * + * @name Phaser.GameObjects.Components.Transform#y + * @type {number} + * @default 0 + * @since 3.0.0 + */ + y: 0, + + /** + * The z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. + * + * @name Phaser.GameObjects.Components.Transform#z + * @type {number} + * @default 0 + * @since 3.0.0 + */ + z: 0, + + /** + * The w position of this Game Object. + * + * @name Phaser.GameObjects.Components.Transform#w + * @type {number} + * @default 0 + * @since 3.0.0 + */ + w: 0, + + /** + * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object + * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`. + * + * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this + * isn't the case, use the `scaleX` or `scaleY` properties instead. + * + * @name Phaser.GameObjects.Components.Transform#scale + * @type {number} + * @default 1 + * @since 3.18.0 + */ + scale: { + + get: function () + { + return (this._scaleX + this._scaleY) / 2; + }, + + set: function (value) + { + this._scaleX = value; + this._scaleY = value; + + if (value === 0) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The horizontal scale of this Game Object. + * + * @name Phaser.GameObjects.Components.Transform#scaleX + * @type {number} + * @default 1 + * @since 3.0.0 + */ + scaleX: { + + get: function () + { + return this._scaleX; + }, + + set: function (value) + { + this._scaleX = value; + + if (value === 0) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The vertical scale of this Game Object. + * + * @name Phaser.GameObjects.Components.Transform#scaleY + * @type {number} + * @default 1 + * @since 3.0.0 + */ + scaleY: { + + get: function () + { + return this._scaleY; + }, + + set: function (value) + { + this._scaleY = value; + + if (value === 0) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The angle of this Game Object as expressed in degrees. + * + * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left + * and -90 is up. + * + * If you prefer to work in radians, see the `rotation` property instead. + * + * @name Phaser.GameObjects.Components.Transform#angle + * @type {integer} + * @default 0 + * @since 3.0.0 + */ + angle: { + + get: function () + { + return WrapAngleDegrees(this._rotation * MATH_CONST.RAD_TO_DEG); + }, + + set: function (value) + { + // value is in degrees + this.rotation = WrapAngleDegrees(value) * MATH_CONST.DEG_TO_RAD; + } + }, + + /** + * The angle of this Game Object in radians. + * + * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left + * and -PI/2 is up. + * + * If you prefer to work in degrees, see the `angle` property instead. + * + * @name Phaser.GameObjects.Components.Transform#rotation + * @type {number} + * @default 1 + * @since 3.0.0 + */ + rotation: { + + get: function () + { + return this._rotation; + }, + + set: function (value) + { + // value is in radians + this._rotation = WrapAngle(value); + } + }, + + /** + * Sets the position of this Game Object. + * + * @method Phaser.GameObjects.Components.Transform#setPosition + * @since 3.0.0 + * + * @param {number} [x=0] - The x position of this Game Object. + * @param {number} [y=x] - The y position of this Game Object. If not set it will use the `x` value. + * @param {number} [z=0] - The z position of this Game Object. + * @param {number} [w=0] - The w position of this Game Object. + * + * @return {this} This Game Object instance. + */ + setPosition: function (x, y, z, w) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = x; } + if (z === undefined) { z = 0; } + if (w === undefined) { w = 0; } + + this.x = x; + this.y = y; + this.z = z; + this.w = w; + + return this; + }, + + /** + * Sets the position of this Game Object to be a random position within the confines of + * the given area. + * + * If no area is specified a random position between 0 x 0 and the game width x height is used instead. + * + * The position does not factor in the size of this Game Object, meaning that only the origin is + * guaranteed to be within the area. + * + * @method Phaser.GameObjects.Components.Transform#setRandomPosition + * @since 3.8.0 + * + * @param {number} [x=0] - The x position of the top-left of the random area. + * @param {number} [y=0] - The y position of the top-left of the random area. + * @param {number} [width] - The width of the random area. + * @param {number} [height] - The height of the random area. + * + * @return {this} This Game Object instance. + */ + setRandomPosition: function (x, y, width, height) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + if (width === undefined) { width = this.scene.sys.scale.width; } + if (height === undefined) { height = this.scene.sys.scale.height; } + + this.x = x + (Math.random() * width); + this.y = y + (Math.random() * height); + + return this; + }, + + /** + * Sets the rotation of this Game Object. + * + * @method Phaser.GameObjects.Components.Transform#setRotation + * @since 3.0.0 + * + * @param {number} [radians=0] - The rotation of this Game Object, in radians. + * + * @return {this} This Game Object instance. + */ + setRotation: function (radians) + { + if (radians === undefined) { radians = 0; } + + this.rotation = radians; + + return this; + }, + + /** + * Sets the angle of this Game Object. + * + * @method Phaser.GameObjects.Components.Transform#setAngle + * @since 3.0.0 + * + * @param {number} [degrees=0] - The rotation of this Game Object, in degrees. + * + * @return {this} This Game Object instance. + */ + setAngle: function (degrees) + { + if (degrees === undefined) { degrees = 0; } + + this.angle = degrees; + + return this; + }, + + /** + * Sets the scale of this Game Object. + * + * @method Phaser.GameObjects.Components.Transform#setScale + * @since 3.0.0 + * + * @param {number} x - 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. + */ + setScale: function (x, y) + { + if (x === undefined) { x = 1; } + if (y === undefined) { y = x; } + + this.scaleX = x; + this.scaleY = y; + + return this; + }, + + /** + * Sets the x position of this Game Object. + * + * @method Phaser.GameObjects.Components.Transform#setX + * @since 3.0.0 + * + * @param {number} [value=0] - The x position of this Game Object. + * + * @return {this} This Game Object instance. + */ + setX: function (value) + { + if (value === undefined) { value = 0; } + + this.x = value; + + return this; + }, + + /** + * Sets the y position of this Game Object. + * + * @method Phaser.GameObjects.Components.Transform#setY + * @since 3.0.0 + * + * @param {number} [value=0] - The y position of this Game Object. + * + * @return {this} This Game Object instance. + */ + setY: function (value) + { + if (value === undefined) { value = 0; } + + this.y = value; + + return this; + }, + + /** + * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. + * + * @method Phaser.GameObjects.Components.Transform#setZ + * @since 3.0.0 + * + * @param {number} [value=0] - The z position of this Game Object. + * + * @return {this} This Game Object instance. + */ + setZ: function (value) + { + if (value === undefined) { value = 0; } + + this.z = value; + + return this; + }, + + /** + * Sets the w position of this Game Object. + * + * @method Phaser.GameObjects.Components.Transform#setW + * @since 3.0.0 + * + * @param {number} [value=0] - The w position of this Game Object. + * + * @return {this} This Game Object instance. + */ + setW: function (value) + { + if (value === undefined) { value = 0; } + + this.w = value; + + return this; + }, + + /** + * Gets the local transform matrix for this Game Object. + * + * @method Phaser.GameObjects.Components.Transform#getLocalTransformMatrix + * @since 3.4.0 + * + * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object. + * + * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix. + */ + getLocalTransformMatrix: function (tempMatrix) + { + if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); } + + return tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY); + }, + + /** + * Gets the world transform matrix for this Game Object, factoring in any parent Containers. + * + * @method Phaser.GameObjects.Components.Transform#getWorldTransformMatrix + * @since 3.4.0 + * + * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object. + * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A temporary matrix to hold parent values during the calculations. + * + * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix. + */ + getWorldTransformMatrix: function (tempMatrix, parentMatrix) + { + if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); } + if (parentMatrix === undefined) { parentMatrix = new TransformMatrix(); } + + var parent = this.parentContainer; + + if (!parent) + { + return this.getLocalTransformMatrix(tempMatrix); + } + + tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY); + + while (parent) + { + parentMatrix.applyITRS(parent.x, parent.y, parent._rotation, parent._scaleX, parent._scaleY); + + parentMatrix.multiply(tempMatrix, tempMatrix); + + parent = parent.parentContainer; + } + + return tempMatrix; + }, + + /** + * Takes the given `x` and `y` coordinates and converts them into local space for this + * Game Object, taking into account parent and local transforms, and the Display Origin. + * + * The returned Vector2 contains the translated point in its properties. + * + * A Camera needs to be provided in order to handle modified scroll factors. If no + * camera is specified, it will use the `main` camera from the Scene to which this + * Game Object belongs. + * + * @method Phaser.GameObjects.Components.Transform#getLocalPoint + * @since 3.50.0 + * + * @param {number} x - The x position to translate. + * @param {number} y - The y position to translate. + * @param {Phaser.Math.Vector2} [point] - A Vector2, or point-like object, to store the results in. + * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera which is being tested against. If not given will use the Scene default camera. + * + * @return {Phaser.Math.Vector2} The translated point. + */ + getLocalPoint: function (x, y, point, camera) + { + if (!point) { point = new Vector2(); } + if (!camera) { camera = this.scene.sys.cameras.main; } + + var csx = camera.scrollX; + var csy = camera.scrollY; + + var px = x + (csx * this.scrollFactorX) - csx; + var py = y + (csy * this.scrollFactorY) - csy; + + if (this.parentContainer) + { + this.getWorldTransformMatrix().applyInverse(px, py, point); + } + else + { + TransformXY(px, py, this.x, this.y, this.rotation, this.scaleX, this.scaleY, point); + } + + // Normalize origin + if (this._originComponent) + { + point.x += this._displayOriginX; + point.y += this._displayOriginY; + } + + return point; + }, + + /** + * Gets the sum total rotation of all of this Game Objects parent Containers. + * + * The returned value is in radians and will be zero if this Game Object has no parent container. + * + * @method Phaser.GameObjects.Components.Transform#getParentRotation + * @since 3.18.0 + * + * @return {number} The sum total rotation, in radians, of all parent containers of this Game Object. + */ + getParentRotation: function () + { + var rotation = 0; + + var parent = this.parentContainer; + + while (parent) + { + rotation += parent.rotation; + + parent = parent.parentContainer; + } + + return rotation; + } + +}; + +module.exports = Transform; + + +/***/ }), +/* 51 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var MATH_CONST = __webpack_require__(2); +var Vector2 = __webpack_require__(1); + +/** + * @classdesc + * A Matrix used for display transformations for rendering. + * + * It is represented like so: + * + * ``` + * | a | c | tx | + * | b | d | ty | + * | 0 | 0 | 1 | + * ``` + * + * @class TransformMatrix + * @memberof Phaser.GameObjects.Components + * @constructor + * @since 3.0.0 + * + * @param {number} [a=1] - The Scale X value. + * @param {number} [b=0] - The Skew Y value. + * @param {number} [c=0] - The Skew X value. + * @param {number} [d=1] - The Scale Y value. + * @param {number} [tx=0] - The Translate X value. + * @param {number} [ty=0] - The Translate Y value. + */ +var TransformMatrix = new Class({ + + initialize: + + function TransformMatrix (a, b, c, d, tx, ty) + { + if (a === undefined) { a = 1; } + if (b === undefined) { b = 0; } + if (c === undefined) { c = 0; } + if (d === undefined) { d = 1; } + if (tx === undefined) { tx = 0; } + if (ty === undefined) { ty = 0; } + + /** + * The matrix values. + * + * @name Phaser.GameObjects.Components.TransformMatrix#matrix + * @type {Float32Array} + * @since 3.0.0 + */ + this.matrix = new Float32Array([ a, b, c, d, tx, ty, 0, 0, 1 ]); + + /** + * The decomposed matrix. + * + * @name Phaser.GameObjects.Components.TransformMatrix#decomposedMatrix + * @type {object} + * @since 3.0.0 + */ + this.decomposedMatrix = { + translateX: 0, + translateY: 0, + scaleX: 1, + scaleY: 1, + rotation: 0 + }; + }, + + /** + * The Scale X value. + * + * @name Phaser.GameObjects.Components.TransformMatrix#a + * @type {number} + * @since 3.4.0 + */ + a: { + + get: function () + { + return this.matrix[0]; + }, + + set: function (value) + { + this.matrix[0] = value; + } + + }, + + /** + * The Skew Y value. + * + * @name Phaser.GameObjects.Components.TransformMatrix#b + * @type {number} + * @since 3.4.0 + */ + b: { + + get: function () + { + return this.matrix[1]; + }, + + set: function (value) + { + this.matrix[1] = value; + } + + }, + + /** + * The Skew X value. + * + * @name Phaser.GameObjects.Components.TransformMatrix#c + * @type {number} + * @since 3.4.0 + */ + c: { + + get: function () + { + return this.matrix[2]; + }, + + set: function (value) + { + this.matrix[2] = value; + } + + }, + + /** + * The Scale Y value. + * + * @name Phaser.GameObjects.Components.TransformMatrix#d + * @type {number} + * @since 3.4.0 + */ + d: { + + get: function () + { + return this.matrix[3]; + }, + + set: function (value) + { + this.matrix[3] = value; + } + + }, + + /** + * The Translate X value. + * + * @name Phaser.GameObjects.Components.TransformMatrix#e + * @type {number} + * @since 3.11.0 + */ + e: { + + get: function () + { + return this.matrix[4]; + }, + + set: function (value) + { + this.matrix[4] = value; + } + + }, + + /** + * The Translate Y value. + * + * @name Phaser.GameObjects.Components.TransformMatrix#f + * @type {number} + * @since 3.11.0 + */ + f: { + + get: function () + { + return this.matrix[5]; + }, + + set: function (value) + { + this.matrix[5] = value; + } + + }, + + /** + * The Translate X value. + * + * @name Phaser.GameObjects.Components.TransformMatrix#tx + * @type {number} + * @since 3.4.0 + */ + tx: { + + get: function () + { + return this.matrix[4]; + }, + + set: function (value) + { + this.matrix[4] = value; + } + + }, + + /** + * The Translate Y value. + * + * @name Phaser.GameObjects.Components.TransformMatrix#ty + * @type {number} + * @since 3.4.0 + */ + ty: { + + get: function () + { + return this.matrix[5]; + }, + + set: function (value) + { + this.matrix[5] = value; + } + + }, + + /** + * The rotation of the Matrix. Value is in radians. + * + * @name Phaser.GameObjects.Components.TransformMatrix#rotation + * @type {number} + * @readonly + * @since 3.4.0 + */ + rotation: { + + get: function () + { + return Math.acos(this.a / this.scaleX) * ((Math.atan(-this.c / this.a) < 0) ? -1 : 1); + } + + }, + + /** + * The rotation of the Matrix, normalized to be within the Phaser right-handed + * clockwise rotation space. Value is in radians. + * + * @name Phaser.GameObjects.Components.TransformMatrix#rotationNormalized + * @type {number} + * @readonly + * @since 3.19.0 + */ + rotationNormalized: { + + get: function () + { + var matrix = this.matrix; + + var a = matrix[0]; + var b = matrix[1]; + var c = matrix[2]; + var d = matrix[3]; + + if (a || b) + { + // var r = Math.sqrt(a * a + b * b); + + return (b > 0) ? Math.acos(a / this.scaleX) : -Math.acos(a / this.scaleX); + } + else if (c || d) + { + // var s = Math.sqrt(c * c + d * d); + + return MATH_CONST.TAU - ((d > 0) ? Math.acos(-c / this.scaleY) : -Math.acos(c / this.scaleY)); + } + else + { + return 0; + } + } + + }, + + /** + * The decomposed horizontal scale of the Matrix. This value is always positive. + * + * @name Phaser.GameObjects.Components.TransformMatrix#scaleX + * @type {number} + * @readonly + * @since 3.4.0 + */ + scaleX: { + + get: function () + { + return Math.sqrt((this.a * this.a) + (this.b * this.b)); + } + + }, + + /** + * The decomposed vertical scale of the Matrix. This value is always positive. + * + * @name Phaser.GameObjects.Components.TransformMatrix#scaleY + * @type {number} + * @readonly + * @since 3.4.0 + */ + scaleY: { + + get: function () + { + return Math.sqrt((this.c * this.c) + (this.d * this.d)); + } + + }, + + /** + * Reset the Matrix to an identity matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#loadIdentity + * @since 3.0.0 + * + * @return {this} This TransformMatrix. + */ + loadIdentity: function () + { + var matrix = this.matrix; + + matrix[0] = 1; + matrix[1] = 0; + matrix[2] = 0; + matrix[3] = 1; + matrix[4] = 0; + matrix[5] = 0; + + return this; + }, + + /** + * Translate the Matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#translate + * @since 3.0.0 + * + * @param {number} x - The horizontal translation value. + * @param {number} y - The vertical translation value. + * + * @return {this} This TransformMatrix. + */ + translate: function (x, y) + { + var matrix = this.matrix; + + matrix[4] = matrix[0] * x + matrix[2] * y + matrix[4]; + matrix[5] = matrix[1] * x + matrix[3] * y + matrix[5]; + + return this; + }, + + /** + * Scale the Matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#scale + * @since 3.0.0 + * + * @param {number} x - The horizontal scale value. + * @param {number} y - The vertical scale value. + * + * @return {this} This TransformMatrix. + */ + scale: function (x, y) + { + var matrix = this.matrix; + + matrix[0] *= x; + matrix[1] *= x; + matrix[2] *= y; + matrix[3] *= y; + + return this; + }, + + /** + * Rotate the Matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#rotate + * @since 3.0.0 + * + * @param {number} angle - The angle of rotation in radians. + * + * @return {this} This TransformMatrix. + */ + rotate: function (angle) + { + var sin = Math.sin(angle); + var cos = Math.cos(angle); + + var matrix = this.matrix; + + var a = matrix[0]; + var b = matrix[1]; + var c = matrix[2]; + var d = matrix[3]; + + matrix[0] = a * cos + c * sin; + matrix[1] = b * cos + d * sin; + matrix[2] = a * -sin + c * cos; + matrix[3] = b * -sin + d * cos; + + return this; + }, + + /** + * Multiply this Matrix by the given Matrix. + * + * If an `out` Matrix is given then the results will be stored in it. + * If it is not given, this matrix will be updated in place instead. + * Use an `out` Matrix if you do not wish to mutate this matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#multiply + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by. + * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in. + * + * @return {(this|Phaser.GameObjects.Components.TransformMatrix)} Either this TransformMatrix, or the `out` Matrix, if given in the arguments. + */ + multiply: function (rhs, out) + { + var matrix = this.matrix; + var source = rhs.matrix; + + var localA = matrix[0]; + var localB = matrix[1]; + var localC = matrix[2]; + var localD = matrix[3]; + var localE = matrix[4]; + var localF = matrix[5]; + + var sourceA = source[0]; + var sourceB = source[1]; + var sourceC = source[2]; + var sourceD = source[3]; + var sourceE = source[4]; + var sourceF = source[5]; + + var destinationMatrix = (out === undefined) ? this : out; + + destinationMatrix.a = (sourceA * localA) + (sourceB * localC); + destinationMatrix.b = (sourceA * localB) + (sourceB * localD); + destinationMatrix.c = (sourceC * localA) + (sourceD * localC); + destinationMatrix.d = (sourceC * localB) + (sourceD * localD); + destinationMatrix.e = (sourceE * localA) + (sourceF * localC) + localE; + destinationMatrix.f = (sourceE * localB) + (sourceF * localD) + localF; + + return destinationMatrix; + }, + + /** + * Multiply this Matrix by the matrix given, including the offset. + * + * The offsetX is added to the tx value: `offsetX * a + offsetY * c + tx`. + * The offsetY is added to the ty value: `offsetY * b + offsetY * d + ty`. + * + * @method Phaser.GameObjects.Components.TransformMatrix#multiplyWithOffset + * @since 3.11.0 + * + * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from. + * @param {number} offsetX - Horizontal offset to factor in to the multiplication. + * @param {number} offsetY - Vertical offset to factor in to the multiplication. + * + * @return {this} This TransformMatrix. + */ + multiplyWithOffset: function (src, offsetX, offsetY) + { + var matrix = this.matrix; + var otherMatrix = src.matrix; + + var a0 = matrix[0]; + var b0 = matrix[1]; + var c0 = matrix[2]; + var d0 = matrix[3]; + var tx0 = matrix[4]; + var ty0 = matrix[5]; + + var pse = offsetX * a0 + offsetY * c0 + tx0; + var psf = offsetX * b0 + offsetY * d0 + ty0; + + var a1 = otherMatrix[0]; + var b1 = otherMatrix[1]; + var c1 = otherMatrix[2]; + var d1 = otherMatrix[3]; + var tx1 = otherMatrix[4]; + var ty1 = otherMatrix[5]; + + matrix[0] = a1 * a0 + b1 * c0; + matrix[1] = a1 * b0 + b1 * d0; + matrix[2] = c1 * a0 + d1 * c0; + matrix[3] = c1 * b0 + d1 * d0; + matrix[4] = tx1 * a0 + ty1 * c0 + pse; + matrix[5] = tx1 * b0 + ty1 * d0 + psf; + + return this; + }, + + /** + * Transform the Matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#transform + * @since 3.0.0 + * + * @param {number} a - The Scale X value. + * @param {number} b - The Shear Y value. + * @param {number} c - The Shear X value. + * @param {number} d - The Scale Y value. + * @param {number} tx - The Translate X value. + * @param {number} ty - The Translate Y value. + * + * @return {this} This TransformMatrix. + */ + transform: function (a, b, c, d, tx, ty) + { + var matrix = this.matrix; + + var a0 = matrix[0]; + var b0 = matrix[1]; + var c0 = matrix[2]; + var d0 = matrix[3]; + var tx0 = matrix[4]; + var ty0 = matrix[5]; + + matrix[0] = a * a0 + b * c0; + matrix[1] = a * b0 + b * d0; + matrix[2] = c * a0 + d * c0; + matrix[3] = c * b0 + d * d0; + matrix[4] = tx * a0 + ty * c0 + tx0; + matrix[5] = tx * b0 + ty * d0 + ty0; + + return this; + }, + + /** + * Transform a point using this Matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#transformPoint + * @since 3.0.0 + * + * @param {number} x - The x coordinate of the point to transform. + * @param {number} y - The y coordinate of the point to transform. + * @param {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} point - The Point object to store the transformed coordinates. + * + * @return {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} The Point containing the transformed coordinates. + */ + transformPoint: function (x, y, point) + { + if (point === undefined) { point = { x: 0, y: 0 }; } + + var matrix = this.matrix; + + var a = matrix[0]; + var b = matrix[1]; + var c = matrix[2]; + var d = matrix[3]; + var tx = matrix[4]; + var ty = matrix[5]; + + point.x = x * a + y * c + tx; + point.y = x * b + y * d + ty; + + return point; + }, + + /** + * Invert the Matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#invert + * @since 3.0.0 + * + * @return {this} This TransformMatrix. + */ + invert: function () + { + var matrix = this.matrix; + + var a = matrix[0]; + var b = matrix[1]; + var c = matrix[2]; + var d = matrix[3]; + var tx = matrix[4]; + var ty = matrix[5]; + + var n = a * d - b * c; + + matrix[0] = d / n; + matrix[1] = -b / n; + matrix[2] = -c / n; + matrix[3] = a / n; + matrix[4] = (c * ty - d * tx) / n; + matrix[5] = -(a * ty - b * tx) / n; + + return this; + }, + + /** + * Set the values of this Matrix to copy those of the matrix given. + * + * @method Phaser.GameObjects.Components.TransformMatrix#copyFrom + * @since 3.11.0 + * + * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from. + * + * @return {this} This TransformMatrix. + */ + copyFrom: function (src) + { + var matrix = this.matrix; + + matrix[0] = src.a; + matrix[1] = src.b; + matrix[2] = src.c; + matrix[3] = src.d; + matrix[4] = src.e; + matrix[5] = src.f; + + return this; + }, + + /** + * Set the values of this Matrix to copy those of the array given. + * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f. + * + * @method Phaser.GameObjects.Components.TransformMatrix#copyFromArray + * @since 3.11.0 + * + * @param {array} src - The array of values to set into this matrix. + * + * @return {this} This TransformMatrix. + */ + copyFromArray: function (src) + { + var matrix = this.matrix; + + matrix[0] = src[0]; + matrix[1] = src[1]; + matrix[2] = src[2]; + matrix[3] = src[3]; + matrix[4] = src[4]; + matrix[5] = src[5]; + + return this; + }, + + /** + * Copy the values from this Matrix to the given Canvas Rendering Context. + * This will use the Context.transform method. + * + * @method Phaser.GameObjects.Components.TransformMatrix#copyToContext + * @since 3.12.0 + * + * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to. + * + * @return {CanvasRenderingContext2D} The Canvas Rendering Context. + */ + copyToContext: function (ctx) + { + var matrix = this.matrix; + + ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); + + return ctx; + }, + + /** + * Copy the values from this Matrix to the given Canvas Rendering Context. + * This will use the Context.setTransform method. + * + * @method Phaser.GameObjects.Components.TransformMatrix#setToContext + * @since 3.12.0 + * + * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to. + * + * @return {CanvasRenderingContext2D} The Canvas Rendering Context. + */ + setToContext: function (ctx) + { + var matrix = this.matrix; + + ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); + + return ctx; + }, + + /** + * Copy the values in this Matrix to the array given. + * + * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f. + * + * @method Phaser.GameObjects.Components.TransformMatrix#copyToArray + * @since 3.12.0 + * + * @param {array} [out] - The array to copy the matrix values in to. + * + * @return {array} An array where elements 0 to 5 contain the values from this matrix. + */ + copyToArray: function (out) + { + var matrix = this.matrix; + + if (out === undefined) + { + out = [ matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5] ]; + } + else + { + out[0] = matrix[0]; + out[1] = matrix[1]; + out[2] = matrix[2]; + out[3] = matrix[3]; + out[4] = matrix[4]; + out[5] = matrix[5]; + } + + return out; + }, + + /** + * Set the values of this Matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#setTransform + * @since 3.0.0 + * + * @param {number} a - The Scale X value. + * @param {number} b - The Shear Y value. + * @param {number} c - The Shear X value. + * @param {number} d - The Scale Y value. + * @param {number} tx - The Translate X value. + * @param {number} ty - The Translate Y value. + * + * @return {this} This TransformMatrix. + */ + setTransform: function (a, b, c, d, tx, ty) + { + var matrix = this.matrix; + + matrix[0] = a; + matrix[1] = b; + matrix[2] = c; + matrix[3] = d; + matrix[4] = tx; + matrix[5] = ty; + + return this; + }, + + /** + * Decompose this Matrix into its translation, scale and rotation values using QR decomposition. + * + * The result must be applied in the following order to reproduce the current matrix: + * + * translate -> rotate -> scale + * + * @method Phaser.GameObjects.Components.TransformMatrix#decomposeMatrix + * @since 3.0.0 + * + * @return {object} The decomposed Matrix. + */ + decomposeMatrix: function () + { + var decomposedMatrix = this.decomposedMatrix; + + var matrix = this.matrix; + + // a = scale X (1) + // b = shear Y (0) + // c = shear X (0) + // d = scale Y (1) + + var a = matrix[0]; + var b = matrix[1]; + var c = matrix[2]; + var d = matrix[3]; + + var determ = a * d - b * c; + + decomposedMatrix.translateX = matrix[4]; + decomposedMatrix.translateY = matrix[5]; + + if (a || b) + { + var r = Math.sqrt(a * a + b * b); + + decomposedMatrix.rotation = (b > 0) ? Math.acos(a / r) : -Math.acos(a / r); + decomposedMatrix.scaleX = r; + decomposedMatrix.scaleY = determ / r; + } + else if (c || d) + { + var s = Math.sqrt(c * c + d * d); + + decomposedMatrix.rotation = Math.PI * 0.5 - (d > 0 ? Math.acos(-c / s) : -Math.acos(c / s)); + decomposedMatrix.scaleX = determ / s; + decomposedMatrix.scaleY = s; + } + else + { + decomposedMatrix.rotation = 0; + decomposedMatrix.scaleX = 0; + decomposedMatrix.scaleY = 0; + } + + return decomposedMatrix; + }, + + /** + * Apply the identity, translate, rotate and scale operations on the Matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#applyITRS + * @since 3.0.0 + * + * @param {number} x - The horizontal translation. + * @param {number} y - The vertical translation. + * @param {number} rotation - The angle of rotation in radians. + * @param {number} scaleX - The horizontal scale. + * @param {number} scaleY - The vertical scale. + * + * @return {this} This TransformMatrix. + */ + applyITRS: function (x, y, rotation, scaleX, scaleY) + { + var matrix = this.matrix; + + var radianSin = Math.sin(rotation); + var radianCos = Math.cos(rotation); + + // Translate + matrix[4] = x; + matrix[5] = y; + + // Rotate and Scale + matrix[0] = radianCos * scaleX; + matrix[1] = radianSin * scaleX; + matrix[2] = -radianSin * scaleY; + matrix[3] = radianCos * scaleY; + + return this; + }, + + /** + * Takes the `x` and `y` values and returns a new position in the `output` vector that is the inverse of + * the current matrix with its transformation applied. + * + * Can be used to translate points from world to local space. + * + * @method Phaser.GameObjects.Components.TransformMatrix#applyInverse + * @since 3.12.0 + * + * @param {number} x - The x position to translate. + * @param {number} y - The y position to translate. + * @param {Phaser.Math.Vector2} [output] - A Vector2, or point-like object, to store the results in. + * + * @return {Phaser.Math.Vector2} The coordinates, inverse-transformed through this matrix. + */ + applyInverse: function (x, y, output) + { + if (output === undefined) { output = new Vector2(); } + + var matrix = this.matrix; + + var a = matrix[0]; + var b = matrix[1]; + var c = matrix[2]; + var d = matrix[3]; + var tx = matrix[4]; + var ty = matrix[5]; + + var id = 1 / ((a * d) + (c * -b)); + + output.x = (d * id * x) + (-c * id * y) + (((ty * c) - (tx * d)) * id); + output.y = (a * id * y) + (-b * id * x) + (((-ty * a) + (tx * b)) * id); + + return output; + }, + + /** + * Returns the X component of this matrix multiplied by the given values. + * This is the same as `x * a + y * c + e`. + * + * @method Phaser.GameObjects.Components.TransformMatrix#getX + * @since 3.12.0 + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * + * @return {number} The calculated x value. + */ + getX: function (x, y) + { + return x * this.a + y * this.c + this.e; + }, + + /** + * Returns the Y component of this matrix multiplied by the given values. + * This is the same as `x * b + y * d + f`. + * + * @method Phaser.GameObjects.Components.TransformMatrix#getY + * @since 3.12.0 + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * + * @return {number} The calculated y value. + */ + getY: function (x, y) + { + return x * this.b + y * this.d + this.f; + }, + + /** + * Returns the X component of this matrix multiplied by the given values. + * + * This is the same as `x * a + y * c + e`, optionally passing via `Math.round`. + * + * @method Phaser.GameObjects.Components.TransformMatrix#getXRound + * @since 3.50.0 + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * @param {boolean} [round=false] - Math.round the resulting value? + * + * @return {number} The calculated x value. + */ + getXRound: function (x, y, round) + { + var v = this.getX(x, y); + + if (round) + { + v = Math.round(v); + } + + return v; + }, + + /** + * Returns the Y component of this matrix multiplied by the given values. + * + * This is the same as `x * b + y * d + f`, optionally passing via `Math.round`. + * + * @method Phaser.GameObjects.Components.TransformMatrix#getYRound + * @since 3.50.0 + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * @param {boolean} [round=false] - Math.round the resulting value? + * + * @return {number} The calculated y value. + */ + getYRound: function (x, y, round) + { + var v = this.getY(x, y); + + if (round) + { + v = Math.round(v); + } + + return v; + }, + + /** + * Returns a string that can be used in a CSS Transform call as a `matrix` property. + * + * @method Phaser.GameObjects.Components.TransformMatrix#getCSSMatrix + * @since 3.12.0 + * + * @return {string} A string containing the CSS Transform matrix values. + */ + getCSSMatrix: function () + { + var m = this.matrix; + + return 'matrix(' + m[0] + ',' + m[1] + ',' + m[2] + ',' + m[3] + ',' + m[4] + ',' + m[5] + ')'; + }, + + /** + * Destroys this Transform Matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#destroy + * @since 3.4.0 + */ + destroy: function () + { + this.matrix = null; + this.decomposedMatrix = null; + } + +}); + +module.exports = TransformMatrix; + + +/***/ }), +/* 52 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// bitmask flag for GameObject.renderMask +var _FLAG = 1; // 0001 + +/** + * Provides methods used for setting the visibility of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.Visible + * @since 3.0.0 + */ + +var Visible = { + + /** + * Private internal value. Holds the visible value. + * + * @name Phaser.GameObjects.Components.Visible#_visible + * @type {boolean} + * @private + * @default true + * @since 3.0.0 + */ + _visible: true, + + /** + * The visible state of the Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * + * @name Phaser.GameObjects.Components.Visible#visible + * @type {boolean} + * @since 3.0.0 + */ + visible: { + + get: function () + { + return this._visible; + }, + + set: function (value) + { + if (value) + { + this._visible = true; + this.renderFlags |= _FLAG; + } + else + { + this._visible = false; + this.renderFlags &= ~_FLAG; + } + } + + }, + + /** + * Sets the visibility of this Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * + * @method Phaser.GameObjects.Components.Visible#setVisible + * @since 3.0.0 + * + * @param {boolean} value - The visible state of the Game Object. + * + * @return {this} This Game Object instance. + */ + setVisible: function (value) + { + this.visible = value; + + return this; + } +}; + +module.exports = Visible; + + +/***/ }), +/* 53 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var ComponentsToJSON = __webpack_require__(54); +var DataManager = __webpack_require__(219); +var EventEmitter = __webpack_require__(55); +var Events = __webpack_require__(22); + +/** + * @classdesc + * The base class that all Game Objects extend. + * You don't create GameObjects directly and they cannot be added to the display list. + * Instead, use them as the base for your own custom classes. + * + * @class GameObject + * @memberof Phaser.GameObjects + * @extends Phaser.Events.EventEmitter + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. + * @param {string} type - A textual representation of the type of Game Object, i.e. `sprite`. + */ +var GameObject = new Class({ + + Extends: EventEmitter, + + initialize: + + function GameObject (scene, type) + { + EventEmitter.call(this); + + /** + * The Scene to which this Game Object belongs. + * Game Objects can only belong to one Scene. + * + * @name Phaser.GameObjects.GameObject#scene + * @type {Phaser.Scene} + * @protected + * @since 3.0.0 + */ + this.scene = scene; + + /** + * A textual representation of this Game Object, i.e. `sprite`. + * Used internally by Phaser but is available for your own custom classes to populate. + * + * @name Phaser.GameObjects.GameObject#type + * @type {string} + * @since 3.0.0 + */ + this.type = type; + + /** + * The current state of this Game Object. + * + * Phaser itself will never modify this value, although plugins may do so. + * + * Use this property to track the state of a Game Object during its lifetime. For example, it could change from + * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant + * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons. + * If you need to store complex data about your Game Object, look at using the Data Component instead. + * + * @name Phaser.GameObjects.GameObject#state + * @type {(integer|string)} + * @since 3.16.0 + */ + this.state = 0; + + /** + * The parent Container of this Game Object, if it has one. + * + * @name Phaser.GameObjects.GameObject#parentContainer + * @type {Phaser.GameObjects.Container} + * @since 3.4.0 + */ + this.parentContainer = null; + + /** + * The name of this Game Object. + * Empty by default and never populated by Phaser, this is left for developers to use. + * + * @name Phaser.GameObjects.GameObject#name + * @type {string} + * @default '' + * @since 3.0.0 + */ + this.name = ''; + + /** + * The active state of this Game Object. + * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it. + * An active object is one which is having its logic and internal systems updated. + * + * @name Phaser.GameObjects.GameObject#active + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.active = true; + + /** + * The Tab Index of the Game Object. + * Reserved for future use by plugins and the Input Manager. + * + * @name Phaser.GameObjects.GameObject#tabIndex + * @type {integer} + * @default -1 + * @since 3.0.0 + */ + this.tabIndex = -1; + + /** + * A Data Manager. + * It allows you to store, query and get key/value paired information specific to this Game Object. + * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`. + * + * @name Phaser.GameObjects.GameObject#data + * @type {Phaser.Data.DataManager} + * @default null + * @since 3.0.0 + */ + this.data = null; + + /** + * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not. + * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively. + * If those components are not used by your custom class then you can use this bitmask as you wish. + * + * @name Phaser.GameObjects.GameObject#renderFlags + * @type {integer} + * @default 15 + * @since 3.0.0 + */ + this.renderFlags = 15; + + /** + * A bitmask that controls if this Game Object is drawn by a Camera or not. + * Not usually set directly, instead call `Camera.ignore`, however you can + * set this property directly using the Camera.id property: + * + * @example + * this.cameraFilter |= camera.id + * + * @name Phaser.GameObjects.GameObject#cameraFilter + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.cameraFilter = 0; + + /** + * If this Game Object is enabled for input then this property will contain an InteractiveObject instance. + * Not usually set directly. Instead call `GameObject.setInteractive()`. + * + * @name Phaser.GameObjects.GameObject#input + * @type {?Phaser.Types.Input.InteractiveObject} + * @default null + * @since 3.0.0 + */ + this.input = null; + + /** + * If this Game Object is enabled for Arcade or Matter Physics then this property will contain a reference to a Physics Body. + * + * @name Phaser.GameObjects.GameObject#body + * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|MatterJS.BodyType)} + * @default null + * @since 3.0.0 + */ + this.body = null; + + /** + * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`. + * This includes calls that may come from a Group, Container or the Scene itself. + * While it allows you to persist a Game Object across Scenes, please understand you are entirely + * responsible for managing references to and from this Game Object. + * + * @name Phaser.GameObjects.GameObject#ignoreDestroy + * @type {boolean} + * @default false + * @since 3.5.0 + */ + this.ignoreDestroy = false; + + // Tell the Scene to re-sort the children + scene.sys.queueDepthSort(); + }, + + /** + * Sets the `active` property of this Game Object and returns this Game Object for further chaining. + * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList. + * + * @method Phaser.GameObjects.GameObject#setActive + * @since 3.0.0 + * + * @param {boolean} value - True if this Game Object should be set as active, false if not. + * + * @return {this} This GameObject. + */ + setActive: function (value) + { + this.active = value; + + return this; + }, + + /** + * Sets the `name` property of this Game Object and returns this Game Object for further chaining. + * The `name` property is not populated by Phaser and is presented for your own use. + * + * @method Phaser.GameObjects.GameObject#setName + * @since 3.0.0 + * + * @param {string} value - The name to be given to this Game Object. + * + * @return {this} This GameObject. + */ + setName: function (value) + { + this.name = value; + + return this; + }, + + /** + * Sets the current state of this Game Object. + * + * Phaser itself will never modify the State of a Game Object, although plugins may do so. + * + * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'. + * The state value should typically be an integer (ideally mapped to a constant + * in your game code), but could also be a string. It is recommended to keep it light and simple. + * If you need to store complex data about your Game Object, look at using the Data Component instead. + * + * @method Phaser.GameObjects.GameObject#setState + * @since 3.16.0 + * + * @param {(integer|string)} value - The state of the Game Object. + * + * @return {this} This GameObject. + */ + setState: function (value) + { + this.state = value; + + return this; + }, + + /** + * Adds a Data Manager component to this Game Object. + * + * @method Phaser.GameObjects.GameObject#setDataEnabled + * @since 3.0.0 + * @see Phaser.Data.DataManager + * + * @return {this} This GameObject. + */ + setDataEnabled: function () + { + if (!this.data) + { + this.data = new DataManager(this); + } + + return this; + }, + + /** + * Allows you to store a key value pair within this Game Objects Data Manager. + * + * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled + * before setting the value. + * + * If the key doesn't already exist in the Data Manager then it is created. + * + * ```javascript + * sprite.setData('name', 'Red Gem Stone'); + * ``` + * + * You can also pass in an object of key value pairs as the first argument: + * + * ```javascript + * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 }); + * ``` + * + * To get a value back again you can call `getData`: + * + * ```javascript + * sprite.getData('gold'); + * ``` + * + * Or you can access the value directly via the `values` property, where it works like any other variable: + * + * ```javascript + * sprite.data.values.gold += 50; + * ``` + * + * When the value is first set, a `setdata` event is emitted from this Game Object. + * + * If the key already exists, a `changedata` event is emitted instead, along an event named after the key. + * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`. + * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter. + * + * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings. + * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager. + * + * @method Phaser.GameObjects.GameObject#setData + * @since 3.0.0 + * + * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored. + * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored. + * + * @return {this} This GameObject. + */ + setData: function (key, value) + { + if (!this.data) + { + this.data = new DataManager(this); + } + + this.data.set(key, value); + + return this; + }, + + /** + * Increase a value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is increased from 0. + * + * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled + * before setting the value. + * + * If the key doesn't already exist in the Data Manager then it is created. + * + * When the value is first set, a `setdata` event is emitted from this Game Object. + * + * @method Phaser.GameObjects.GameObject#incData + * @since 3.23.0 + * + * @param {(string|object)} key - The key to increase the value for. + * @param {*} [data] - The value to increase for the given key. + * + * @return {this} This GameObject. + */ + incData: function (key, value) + { + if (!this.data) + { + this.data = new DataManager(this); + } + + this.data.inc(key, value); + + return this; + }, + + /** + * Toggle a boolean value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is toggled from false. + * + * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled + * before setting the value. + * + * If the key doesn't already exist in the Data Manager then it is created. + * + * When the value is first set, a `setdata` event is emitted from this Game Object. + * + * @method Phaser.GameObjects.GameObject#toggleData + * @since 3.23.0 + * + * @param {(string|object)} key - The key to toggle the value for. + * + * @return {this} This GameObject. + */ + toggleData: function (key) + { + if (!this.data) + { + this.data = new DataManager(this); + } + + this.data.toggle(key); + + return this; + }, + + /** + * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist. + * + * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either: + * + * ```javascript + * sprite.getData('gold'); + * ``` + * + * Or access the value directly: + * + * ```javascript + * sprite.data.values.gold; + * ``` + * + * You can also pass in an array of keys, in which case an array of values will be returned: + * + * ```javascript + * sprite.getData([ 'gold', 'armor', 'health' ]); + * ``` + * + * This approach is useful for destructuring arrays in ES6. + * + * @method Phaser.GameObjects.GameObject#getData + * @since 3.0.0 + * + * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys. + * + * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array. + */ + getData: function (key) + { + if (!this.data) + { + this.data = new DataManager(this); + } + + return this.data.get(key); + }, + + /** + * Pass this Game Object to the Input Manager to enable it for Input. + * + * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area + * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced + * input detection. + * + * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If + * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific + * shape for it to use. + * + * You can also provide an Input Configuration Object as the only argument to this method. + * + * @example + * sprite.setInteractive(); + * + * @example + * sprite.setInteractive(new Phaser.Geom.Circle(45, 46, 45), Phaser.Geom.Circle.Contains); + * + * @example + * graphics.setInteractive(new Phaser.Geom.Rectangle(0, 0, 128, 128), Phaser.Geom.Rectangle.Contains); + * + * @method Phaser.GameObjects.GameObject#setInteractive + * @since 3.0.0 + * + * @param {(Phaser.Types.Input.InputConfiguration|any)} [hitArea] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not given it will try to create a Rectangle based on the texture frame. + * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The callback that determines if the pointer is within the Hit Area shape or not. If you provide a shape you must also provide a callback. + * @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target? + * + * @return {this} This GameObject. + */ + setInteractive: function (hitArea, hitAreaCallback, dropZone) + { + this.scene.sys.input.enable(this, hitArea, hitAreaCallback, dropZone); + + return this; + }, + + /** + * If this Game Object has previously been enabled for input, this will disable it. + * + * An object that is disabled for input stops processing or being considered for + * input events, but can be turned back on again at any time by simply calling + * `setInteractive()` with no arguments provided. + * + * If want to completely remove interaction from this Game Object then use `removeInteractive` instead. + * + * @method Phaser.GameObjects.GameObject#disableInteractive + * @since 3.7.0 + * + * @return {this} This GameObject. + */ + disableInteractive: function () + { + if (this.input) + { + this.input.enabled = false; + } + + return this; + }, + + /** + * If this Game Object has previously been enabled for input, this will queue it + * for removal, causing it to no longer be interactive. The removal happens on + * the next game step, it is not immediate. + * + * The Interactive Object that was assigned to this Game Object will be destroyed, + * removed from the Input Manager and cleared from this Game Object. + * + * If you wish to re-enable this Game Object at a later date you will need to + * re-create its InteractiveObject by calling `setInteractive` again. + * + * If you wish to only temporarily stop an object from receiving input then use + * `disableInteractive` instead, as that toggles the interactive state, where-as + * this erases it completely. + * + * If you wish to resize a hit area, don't remove and then set it as being + * interactive. Instead, access the hitarea object directly and resize the shape + * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the + * shape is a Rectangle, which it is by default.) + * + * @method Phaser.GameObjects.GameObject#removeInteractive + * @since 3.7.0 + * + * @return {this} This GameObject. + */ + removeInteractive: function () + { + this.scene.sys.input.clear(this); + + this.input = undefined; + + return this; + }, + + /** + * This callback is invoked when this Game Object is added to a Scene. + * + * Can be overriden by custom Game Objects, but be aware of some Game Objects that + * will use this, such as Sprites, to add themselves into the Update List. + * + * You can also listen for the `ADDED_TO_SCENE` event from this Game Object. + * + * @method Phaser.GameObjects.GameObject#addedToScene + * @since 3.50.0 + */ + addedToScene: function () + { + }, + + /** + * This callback is invoked when this Game Object is removed from a Scene. + * + * Can be overriden by custom Game Objects, but be aware of some Game Objects that + * will use this, such as Sprites, to removed themselves from the Update List. + * + * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object. + * + * @method Phaser.GameObjects.GameObject#removedFromScene + * @since 3.50.0 + */ + removedFromScene: function () + { + }, + + /** + * To be overridden by custom GameObjects. Allows base objects to be used in a Pool. + * + * @method Phaser.GameObjects.GameObject#update + * @since 3.0.0 + * + * @param {...*} [args] - args + */ + update: function () + { + }, + + /** + * Returns a JSON representation of the Game Object. + * + * @method Phaser.GameObjects.GameObject#toJSON + * @since 3.0.0 + * + * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object. + */ + toJSON: function () + { + return ComponentsToJSON(this); + }, + + /** + * Compares the renderMask with the renderFlags to see if this Game Object will render or not. + * Also checks the Game Object against the given Cameras exclusion list. + * + * @method Phaser.GameObjects.GameObject#willRender + * @since 3.0.0 + * + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to check against this Game Object. + * + * @return {boolean} True if the Game Object should be rendered, otherwise false. + */ + willRender: function (camera) + { + return !(GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id))); + }, + + /** + * Returns an array containing the display list index of either this Game Object, or if it has one, + * its parent Container. It then iterates up through all of the parent containers until it hits the + * root of the display list (which is index 0 in the returned array). + * + * Used internally by the InputPlugin but also useful if you wish to find out the display depth of + * this Game Object and all of its ancestors. + * + * @method Phaser.GameObjects.GameObject#getIndexList + * @since 3.4.0 + * + * @return {integer[]} An array of display list position indexes. + */ + getIndexList: function () + { + // eslint-disable-next-line consistent-this + var child = this; + var parent = this.parentContainer; + + var indexes = []; + + while (parent) + { + // indexes.unshift([parent.getIndex(child), parent.name]); + indexes.unshift(parent.getIndex(child)); + + child = parent; + + if (!parent.parentContainer) + { + break; + } + else + { + parent = parent.parentContainer; + } + } + + // indexes.unshift([this.scene.sys.displayList.getIndex(child), 'root']); + indexes.unshift(this.scene.sys.displayList.getIndex(child)); + + return indexes; + }, + + /** + * Destroys this Game Object removing it from the Display List and Update List and + * severing all ties to parent resources. + * + * Also removes itself from the Input Manager and Physics Manager if previously enabled. + * + * Use this to remove a Game Object from your game if you don't ever plan to use it again. + * As long as no reference to it exists within your own code it should become free for + * garbage collection by the browser. + * + * If you just want to temporarily disable an object then look at using the + * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected. + * + * @method Phaser.GameObjects.GameObject#destroy + * @fires Phaser.GameObjects.Events#DESTROY + * @since 3.0.0 + * + * @param {boolean} [fromScene=false] - Is this Game Object being destroyed as the result of a Scene shutdown? + */ + destroy: function (fromScene) + { + if (fromScene === undefined) { fromScene = false; } + + // This Game Object has already been destroyed + if (!this.scene || this.ignoreDestroy) + { + return; + } + + if (this.preDestroy) + { + this.preDestroy.call(this); + } + + this.emit(Events.DESTROY, this); + + var sys = this.scene.sys; + + if (!fromScene) + { + sys.displayList.remove(this); + } + + if (this.input) + { + sys.input.clear(this); + this.input = undefined; + } + + if (this.data) + { + this.data.destroy(); + + this.data = undefined; + } + + if (this.body) + { + this.body.destroy(); + this.body = undefined; + } + + // Tell the Scene to re-sort the children + if (!fromScene) + { + sys.queueDepthSort(); + } + + this.active = false; + this.visible = false; + + this.scene = undefined; + + this.parentContainer = undefined; + + this.removeAllListeners(); + } + +}); + +/** + * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not. + * + * @constant {integer} RENDER_MASK + * @memberof Phaser.GameObjects.GameObject + * @default + */ +GameObject.RENDER_MASK = 15; + +module.exports = GameObject; + + +/***/ }), +/* 54 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Build a JSON representation of the given Game Object. + * + * This is typically extended further by Game Object specific implementations. + * + * @method Phaser.GameObjects.Components.ToJSON + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to export as JSON. + * + * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object. + */ +var ToJSON = function (gameObject) +{ + var out = { + name: gameObject.name, + type: gameObject.type, + x: gameObject.x, + y: gameObject.y, + depth: gameObject.depth, + scale: { + x: gameObject.scaleX, + y: gameObject.scaleY + }, + origin: { + x: gameObject.originX, + y: gameObject.originY + }, + flipX: gameObject.flipX, + flipY: gameObject.flipY, + rotation: gameObject.rotation, + alpha: gameObject.alpha, + visible: gameObject.visible, + blendMode: gameObject.blendMode, + textureKey: '', + frameKey: '', + data: {} + }; + + if (gameObject.texture) + { + out.textureKey = gameObject.texture.key; + out.frameKey = gameObject.frame.name; + } + + return out; +}; + +module.exports = ToJSON; + + +/***/ }), +/* 55 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var has = Object.prototype.hasOwnProperty + , prefix = '~'; + +/** + * Constructor to create a storage for our `EE` objects. + * An `Events` instance is a plain object whose properties are event names. + * + * @constructor + * @private + */ +function Events() {} + +// +// We try to not inherit from `Object.prototype`. In some engines creating an +// instance in this way is faster than calling `Object.create(null)` directly. +// If `Object.create(null)` is not supported we prefix the event names with a +// character to make sure that the built-in object properties are not +// overridden or used as an attack vector. +// +if (Object.create) { + Events.prototype = Object.create(null); + + // + // This hack is needed because the `__proto__` property is still inherited in + // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5. + // + if (!new Events().__proto__) prefix = false; +} + +/** + * Representation of a single event listener. + * + * @param {Function} fn The listener function. + * @param {*} context The context to invoke the listener with. + * @param {Boolean} [once=false] Specify if the listener is a one-time listener. + * @constructor + * @private + */ +function EE(fn, context, once) { + this.fn = fn; + this.context = context; + this.once = once || false; +} + +/** + * Add a listener for a given event. + * + * @param {EventEmitter} emitter Reference to the `EventEmitter` instance. + * @param {(String|Symbol)} event The event name. + * @param {Function} fn The listener function. + * @param {*} context The context to invoke the listener with. + * @param {Boolean} once Specify if the listener is a one-time listener. + * @returns {EventEmitter} + * @private + */ +function addListener(emitter, event, fn, context, once) { + if (typeof fn !== 'function') { + throw new TypeError('The listener must be a function'); + } + + var listener = new EE(fn, context || emitter, once) + , evt = prefix ? prefix + event : event; + + if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++; + else if (!emitter._events[evt].fn) emitter._events[evt].push(listener); + else emitter._events[evt] = [emitter._events[evt], listener]; + + return emitter; +} + +/** + * Clear event by name. + * + * @param {EventEmitter} emitter Reference to the `EventEmitter` instance. + * @param {(String|Symbol)} evt The Event name. + * @private + */ +function clearEvent(emitter, evt) { + if (--emitter._eventsCount === 0) emitter._events = new Events(); + else delete emitter._events[evt]; +} + +/** + * Minimal `EventEmitter` interface that is molded against the Node.js + * `EventEmitter` interface. + * + * @constructor + * @public + */ +function EventEmitter() { + this._events = new Events(); + this._eventsCount = 0; +} + +/** + * Return an array listing the events for which the emitter has registered + * listeners. + * + * @returns {Array} + * @public + */ +EventEmitter.prototype.eventNames = function eventNames() { + var names = [] + , events + , name; + + if (this._eventsCount === 0) return names; + + for (name in (events = this._events)) { + if (has.call(events, name)) names.push(prefix ? name.slice(1) : name); + } + + if (Object.getOwnPropertySymbols) { + return names.concat(Object.getOwnPropertySymbols(events)); + } + + return names; +}; + +/** + * Return the listeners registered for a given event. + * + * @param {(String|Symbol)} event The event name. + * @returns {Array} The registered listeners. + * @public + */ +EventEmitter.prototype.listeners = function listeners(event) { + var evt = prefix ? prefix + event : event + , handlers = this._events[evt]; + + if (!handlers) return []; + if (handlers.fn) return [handlers.fn]; + + for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) { + ee[i] = handlers[i].fn; + } + + return ee; +}; + +/** + * Return the number of listeners listening to a given event. + * + * @param {(String|Symbol)} event The event name. + * @returns {Number} The number of listeners. + * @public + */ +EventEmitter.prototype.listenerCount = function listenerCount(event) { + var evt = prefix ? prefix + event : event + , listeners = this._events[evt]; + + if (!listeners) return 0; + if (listeners.fn) return 1; + return listeners.length; +}; + +/** + * Calls each of the listeners registered for a given event. + * + * @param {(String|Symbol)} event The event name. + * @returns {Boolean} `true` if the event had listeners, else `false`. + * @public + */ +EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) { + var evt = prefix ? prefix + event : event; + + if (!this._events[evt]) return false; + + var listeners = this._events[evt] + , len = arguments.length + , args + , i; + + if (listeners.fn) { + if (listeners.once) this.removeListener(event, listeners.fn, undefined, true); + + switch (len) { + case 1: return listeners.fn.call(listeners.context), true; + case 2: return listeners.fn.call(listeners.context, a1), true; + case 3: return listeners.fn.call(listeners.context, a1, a2), true; + case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true; + case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true; + case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true; + } + + for (i = 1, args = new Array(len -1); i < len; i++) { + args[i - 1] = arguments[i]; + } + + listeners.fn.apply(listeners.context, args); + } else { + var length = listeners.length + , j; + + for (i = 0; i < length; i++) { + if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true); + + switch (len) { + case 1: listeners[i].fn.call(listeners[i].context); break; + case 2: listeners[i].fn.call(listeners[i].context, a1); break; + case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break; + case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break; + default: + if (!args) for (j = 1, args = new Array(len -1); j < len; j++) { + args[j - 1] = arguments[j]; + } + + listeners[i].fn.apply(listeners[i].context, args); + } + } + } + + return true; +}; + +/** + * Add a listener for a given event. + * + * @param {(String|Symbol)} event The event name. + * @param {Function} fn The listener function. + * @param {*} [context=this] The context to invoke the listener with. + * @returns {EventEmitter} `this`. + * @public + */ +EventEmitter.prototype.on = function on(event, fn, context) { + return addListener(this, event, fn, context, false); +}; + +/** + * Add a one-time listener for a given event. + * + * @param {(String|Symbol)} event The event name. + * @param {Function} fn The listener function. + * @param {*} [context=this] The context to invoke the listener with. + * @returns {EventEmitter} `this`. + * @public + */ +EventEmitter.prototype.once = function once(event, fn, context) { + return addListener(this, event, fn, context, true); +}; + +/** + * Remove the listeners of a given event. + * + * @param {(String|Symbol)} event The event name. + * @param {Function} fn Only remove the listeners that match this function. + * @param {*} context Only remove the listeners that have this context. + * @param {Boolean} once Only remove one-time listeners. + * @returns {EventEmitter} `this`. + * @public + */ +EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) { + var evt = prefix ? prefix + event : event; + + if (!this._events[evt]) return this; + if (!fn) { + clearEvent(this, evt); + return this; + } + + var listeners = this._events[evt]; + + if (listeners.fn) { + if ( + listeners.fn === fn && + (!once || listeners.once) && + (!context || listeners.context === context) + ) { + clearEvent(this, evt); + } + } else { + for (var i = 0, events = [], length = listeners.length; i < length; i++) { + if ( + listeners[i].fn !== fn || + (once && !listeners[i].once) || + (context && listeners[i].context !== context) + ) { + events.push(listeners[i]); + } + } + + // + // Reset the array, or remove it completely if we have no more listeners. + // + if (events.length) this._events[evt] = events.length === 1 ? events[0] : events; + else clearEvent(this, evt); + } + + return this; +}; + +/** + * Remove all listeners, or those of the specified event. + * + * @param {(String|Symbol)} [event] The event name. + * @returns {EventEmitter} `this`. + * @public + */ +EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) { + var evt; + + if (event) { + evt = prefix ? prefix + event : event; + if (this._events[evt]) clearEvent(this, evt); + } else { + this._events = new Events(); + this._eventsCount = 0; + } + + return this; +}; + +// +// Alias methods names because people roll like that. +// +EventEmitter.prototype.off = EventEmitter.prototype.removeListener; +EventEmitter.prototype.addListener = EventEmitter.prototype.on; + +// +// Expose the prefix. +// +EventEmitter.prefixed = prefix; + +// +// Allow `EventEmitter` to be imported as module namespace. +// +EventEmitter.EventEmitter = EventEmitter; + +// +// Expose the module. +// +if (true) { + module.exports = EventEmitter; +} + + +/***/ }), +/* 56 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Transposes the elements of the given matrix (array of arrays). + * + * The transpose of a matrix is a new matrix whose rows are the columns of the original. + * + * @function Phaser.Utils.Array.Matrix.TransposeMatrix + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [array,$return] + * + * @param {T[][]} [array] - The array matrix to transpose. + * + * @return {T[][]} A new array matrix which is a transposed version of the given array. + */ +var TransposeMatrix = function (array) +{ + var sourceRowCount = array.length; + var sourceColCount = array[0].length; + + var result = new Array(sourceColCount); + + for (var i = 0; i < sourceColCount; i++) + { + result[i] = new Array(sourceRowCount); + + for (var j = sourceRowCount - 1; j > -1; j--) + { + result[i][j] = array[j][i]; + } + } + + return result; +}; + +module.exports = TransposeMatrix; + + +/***/ }), +/* 57 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Searches a pre-sorted array for the closet value to the given number. + * + * If the `key` argument is given it will assume the array contains objects that all have the required `key` property name, + * and will check for the closest value of those to the given number. + * + * @function Phaser.Utils.Array.FindClosestInSorted + * @since 3.0.0 + * + * @param {number} value - The value to search for in the array. + * @param {array} array - The array to search, which must be sorted. + * @param {string} [key] - An optional property key. If specified the array elements property will be checked against value. + * + * @return {(number|any)} The nearest value found in the array, or if a `key` was given, the nearest object with the matching property value. + */ +var FindClosestInSorted = function (value, array, key) +{ + if (!array.length) + { + return NaN; + } + else if (array.length === 1) + { + return array[0]; + } + + var i = 1; + var low; + var high; + + if (key) + { + if (value < array[0][key]) + { + return array[0]; + } + + while (array[i][key] < value) + { + i++; + } + } + else + { + while (array[i] < value) + { + i++; + } + } + + if (i > array.length) + { + i = array.length; + } + + if (key) + { + low = array[i - 1][key]; + high = array[i][key]; + + return ((high - value) <= (value - low)) ? array[i] : array[i - 1]; + } + else + { + low = array[i - 1]; + high = array[i]; + + return ((high - value) <= (value - low)) ? high : low; + } +}; + +module.exports = FindClosestInSorted; + + +/***/ }), +/* 58 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Shuffles the contents of the given array using the Fisher-Yates implementation. + * + * The original array is modified directly and returned. + * + * @function Phaser.Utils.Array.Shuffle + * @since 3.0.0 + * + * @generic T + * @genericUse {T[]} - [array,$return] + * + * @param {T[]} array - The array to shuffle. This array is modified in place. + * + * @return {T[]} The shuffled array. + */ +var Shuffle = function (array) +{ + for (var i = array.length - 1; i > 0; i--) + { + var j = Math.floor(Math.random() * (i + 1)); + var temp = array[i]; + array[i] = array[j]; + array[j] = temp; + } + + return array; +}; + +module.exports = Shuffle; + + +/***/ }), +/* 59 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Animations.Events + */ + +module.exports = { + + ADD_ANIMATION: __webpack_require__(290), + ANIMATION_COMPLETE: __webpack_require__(291), + ANIMATION_REPEAT: __webpack_require__(292), + ANIMATION_RESTART: __webpack_require__(293), + ANIMATION_START: __webpack_require__(294), + PAUSE_ALL: __webpack_require__(295), + REMOVE_ANIMATION: __webpack_require__(296), + RESUME_ALL: __webpack_require__(297), + SPRITE_ANIMATION_COMPLETE: __webpack_require__(298), + SPRITE_ANIMATION_KEY_COMPLETE: __webpack_require__(299), + SPRITE_ANIMATION_KEY_REPEAT: __webpack_require__(300), + SPRITE_ANIMATION_KEY_RESTART: __webpack_require__(301), + SPRITE_ANIMATION_KEY_START: __webpack_require__(302), + SPRITE_ANIMATION_KEY_UPDATE: __webpack_require__(303), + SPRITE_ANIMATION_REPEAT: __webpack_require__(304), + SPRITE_ANIMATION_RESTART: __webpack_require__(305), + SPRITE_ANIMATION_START: __webpack_require__(306), + SPRITE_ANIMATION_UPDATE: __webpack_require__(307) + +}; + + +/***/ }), +/* 60 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Perimeter = __webpack_require__(61); +var Point = __webpack_require__(9); + +/** + * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter. + * + * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is. + * + * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side. + * + * @function Phaser.Geom.Rectangle.GetPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [out,$return] + * + * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle to get the perimeter point from. + * @param {number} position - The normalized distance into the Rectangle's perimeter to return. + * @param {(Phaser.Geom.Point|object)} [out] - An object to update with the `x` and `y` coordinates of the point. + * + * @return {Phaser.Geom.Point} The updated `output` object, or a new Point if no `output` object was given. + */ +var GetPoint = function (rectangle, position, out) +{ + if (out === undefined) { out = new Point(); } + + if (position <= 0 || position >= 1) + { + out.x = rectangle.x; + out.y = rectangle.y; + + return out; + } + + var p = Perimeter(rectangle) * position; + + if (position > 0.5) + { + p -= (rectangle.width + rectangle.height); + + if (p <= rectangle.width) + { + // Face 3 + out.x = rectangle.right - p; + out.y = rectangle.bottom; + } + else + { + // Face 4 + out.x = rectangle.x; + out.y = rectangle.bottom - (p - rectangle.width); + } + } + else if (p <= rectangle.width) + { + // Face 1 + out.x = rectangle.x + p; + out.y = rectangle.y; + } + else + { + // Face 2 + out.x = rectangle.right; + out.y = rectangle.y + (p - rectangle.width); + } + + return out; +}; + +module.exports = GetPoint; + + +/***/ }), +/* 61 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculates the perimeter of a Rectangle. + * + * @function Phaser.Geom.Rectangle.Perimeter + * @since 3.0.0 + * + * @param {Phaser.Geom.Rectangle} rect - The Rectangle to use. + * + * @return {number} The perimeter of the Rectangle, equal to `(width * 2) + (height * 2)`. + */ +var Perimeter = function (rect) +{ + return 2 * (rect.width + rect.height); +}; + +module.exports = Perimeter; + + +/***/ }), +/* 62 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BuildGameObject = __webpack_require__(36); +var BuildGameObject = __webpack_require__(63); var Class = __webpack_require__(0); -var GetValue = __webpack_require__(12); -var ResizeEvent = __webpack_require__(150); -var ScenePlugin = __webpack_require__(151); -var Spine = __webpack_require__(175); -var SpineFile = __webpack_require__(176); -var SpineGameObject = __webpack_require__(194); +var GetValue = __webpack_require__(6); +var ResizeEvent = __webpack_require__(174); +var ScenePlugin = __webpack_require__(175); +var Spine = __webpack_require__(199); +var SpineFile = __webpack_require__(200); +var SpineGameObject = __webpack_require__(218); +var SpineContainer = __webpack_require__(247); +var NOOP = __webpack_require__(3); /** * @classdesc @@ -6771,6 +11805,13 @@ var SpineGameObject = __webpack_require__(194); * stored in their own caches, which are global, meaning they're accessible from any Scene in your * game, regardless if the Scene loaded the Spine data or not. * + * When destroying a Phaser Game instance, if you need to re-create it again on the same page without + * reloading, you must remember to remove the Spine Plugin as part of your tear-down process: + * + * ```javascript + * this.plugins.removeScenePlugin('SpinePlugin'); + * ``` + * * For details about the Spine Runtime API see http://esotericsoftware.com/spine-api-reference * * @class SpinePlugin @@ -6954,6 +11995,19 @@ var SpinePlugin = new Class({ this.getAtlas = this.getAtlasCanvas; } + // Headless mode? + if (!this.renderer) + { + this.renderer = { + width: game.scale.width, + height: game.scale.height, + preRender: NOOP, + postRender: NOOP, + render: NOOP, + destroy: NOOP + }; + } + var _this = this; var add = function (x, y, key, animationName, loop) @@ -7002,8 +12056,38 @@ var SpinePlugin = new Class({ return spineGO.refresh(); }; + var addContainer = function (x, y, children) + { + var spineGO = new SpineContainer(this.scene, _this, x, y, children); + + this.displayList.add(spineGO); + + return spineGO; + }; + + var makeContainer = function (config, addToScene) + { + if (config === undefined) { config = {}; } + + var x = GetValue(config, 'x', 0); + var y = GetValue(config, 'y', 0); + var children = GetValue(config, 'children', null); + + var container = new SpineContainer(this.scene, _this, x, y, children); + + if (addToScene !== undefined) + { + config.add = addToScene; + } + + BuildGameObject(this.scene, container, config); + + return container; + }; + pluginManager.registerFileType('spine', this.spineFileCallback, scene); pluginManager.registerGameObject('spine', add, make); + pluginManager.registerGameObject('spinecontainer', addContainer, makeContainer); }, /** @@ -7737,6 +12821,8 @@ var SpinePlugin = new Class({ }); +SpinePlugin.SpineGameObject = SpineGameObject; + /** * Creates a new Spine Game Object and adds it to the Scene. * @@ -7807,7 +12893,7 @@ module.exports = SpinePlugin; /***/ }), -/* 36 */ +/* 63 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -7816,8 +12902,8 @@ module.exports = SpinePlugin; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlendModes = __webpack_require__(37); -var GetAdvancedValue = __webpack_require__(38); +var BlendModes = __webpack_require__(14); +var GetAdvancedValue = __webpack_require__(64); /** * Builds a Game Object using the provided configuration object. @@ -7935,346 +13021,7 @@ module.exports = BuildGameObject; /***/ }), -/* 37 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Phaser Blend Modes. - * - * @namespace Phaser.BlendModes - * @since 3.0.0 - */ - -module.exports = { - - /** - * Skips the Blend Mode check in the renderer. - * - * @name Phaser.BlendModes.SKIP_CHECK - * @type {integer} - * @const - * @since 3.0.0 - */ - SKIP_CHECK: -1, - - /** - * Normal blend mode. For Canvas and WebGL. - * This is the default setting and draws new shapes on top of the existing canvas content. - * - * @name Phaser.BlendModes.NORMAL - * @type {integer} - * @const - * @since 3.0.0 - */ - NORMAL: 0, - - /** - * Add blend mode. For Canvas and WebGL. - * Where both shapes overlap the color is determined by adding color values. - * - * @name Phaser.BlendModes.ADD - * @type {integer} - * @const - * @since 3.0.0 - */ - ADD: 1, - - /** - * Multiply blend mode. For Canvas and WebGL. - * The pixels are of the top layer are multiplied with the corresponding pixel of the bottom layer. A darker picture is the result. - * - * @name Phaser.BlendModes.MULTIPLY - * @type {integer} - * @const - * @since 3.0.0 - */ - MULTIPLY: 2, - - /** - * Screen blend mode. For Canvas and WebGL. - * The pixels are inverted, multiplied, and inverted again. A lighter picture is the result (opposite of multiply) - * - * @name Phaser.BlendModes.SCREEN - * @type {integer} - * @const - * @since 3.0.0 - */ - SCREEN: 3, - - /** - * Overlay blend mode. For Canvas only. - * A combination of multiply and screen. Dark parts on the base layer become darker, and light parts become lighter. - * - * @name Phaser.BlendModes.OVERLAY - * @type {integer} - * @const - * @since 3.0.0 - */ - OVERLAY: 4, - - /** - * Darken blend mode. For Canvas only. - * Retains the darkest pixels of both layers. - * - * @name Phaser.BlendModes.DARKEN - * @type {integer} - * @const - * @since 3.0.0 - */ - DARKEN: 5, - - /** - * Lighten blend mode. For Canvas only. - * Retains the lightest pixels of both layers. - * - * @name Phaser.BlendModes.LIGHTEN - * @type {integer} - * @const - * @since 3.0.0 - */ - LIGHTEN: 6, - - /** - * Color Dodge blend mode. For Canvas only. - * Divides the bottom layer by the inverted top layer. - * - * @name Phaser.BlendModes.COLOR_DODGE - * @type {integer} - * @const - * @since 3.0.0 - */ - COLOR_DODGE: 7, - - /** - * Color Burn blend mode. For Canvas only. - * Divides the inverted bottom layer by the top layer, and then inverts the result. - * - * @name Phaser.BlendModes.COLOR_BURN - * @type {integer} - * @const - * @since 3.0.0 - */ - COLOR_BURN: 8, - - /** - * Hard Light blend mode. For Canvas only. - * A combination of multiply and screen like overlay, but with top and bottom layer swapped. - * - * @name Phaser.BlendModes.HARD_LIGHT - * @type {integer} - * @const - * @since 3.0.0 - */ - HARD_LIGHT: 9, - - /** - * Soft Light blend mode. For Canvas only. - * A softer version of hard-light. Pure black or white does not result in pure black or white. - * - * @name Phaser.BlendModes.SOFT_LIGHT - * @type {integer} - * @const - * @since 3.0.0 - */ - SOFT_LIGHT: 10, - - /** - * Difference blend mode. For Canvas only. - * Subtracts the bottom layer from the top layer or the other way round to always get a positive value. - * - * @name Phaser.BlendModes.DIFFERENCE - * @type {integer} - * @const - * @since 3.0.0 - */ - DIFFERENCE: 11, - - /** - * Exclusion blend mode. For Canvas only. - * Like difference, but with lower contrast. - * - * @name Phaser.BlendModes.EXCLUSION - * @type {integer} - * @const - * @since 3.0.0 - */ - EXCLUSION: 12, - - /** - * Hue blend mode. For Canvas only. - * Preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer. - * - * @name Phaser.BlendModes.HUE - * @type {integer} - * @const - * @since 3.0.0 - */ - HUE: 13, - - /** - * Saturation blend mode. For Canvas only. - * Preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer. - * - * @name Phaser.BlendModes.SATURATION - * @type {integer} - * @const - * @since 3.0.0 - */ - SATURATION: 14, - - /** - * Color blend mode. For Canvas only. - * Preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer. - * - * @name Phaser.BlendModes.COLOR - * @type {integer} - * @const - * @since 3.0.0 - */ - COLOR: 15, - - /** - * Luminosity blend mode. For Canvas only. - * Preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer. - * - * @name Phaser.BlendModes.LUMINOSITY - * @type {integer} - * @const - * @since 3.0.0 - */ - LUMINOSITY: 16, - - /** - * Alpha erase blend mode. For Canvas and WebGL. - * - * @name Phaser.BlendModes.ERASE - * @type {integer} - * @const - * @since 3.0.0 - */ - ERASE: 17, - - /** - * Source-in blend mode. For Canvas only. - * The new shape is drawn only where both the new shape and the destination canvas overlap. Everything else is made transparent. - * - * @name Phaser.BlendModes.SOURCE_IN - * @type {integer} - * @const - * @since 3.0.0 - */ - SOURCE_IN: 18, - - /** - * Source-out blend mode. For Canvas only. - * The new shape is drawn where it doesn't overlap the existing canvas content. - * - * @name Phaser.BlendModes.SOURCE_OUT - * @type {integer} - * @const - * @since 3.0.0 - */ - SOURCE_OUT: 19, - - /** - * Source-out blend mode. For Canvas only. - * The new shape is only drawn where it overlaps the existing canvas content. - * - * @name Phaser.BlendModes.SOURCE_ATOP - * @type {integer} - * @const - * @since 3.0.0 - */ - SOURCE_ATOP: 20, - - /** - * Destination-over blend mode. For Canvas only. - * New shapes are drawn behind the existing canvas content. - * - * @name Phaser.BlendModes.DESTINATION_OVER - * @type {integer} - * @const - * @since 3.0.0 - */ - DESTINATION_OVER: 21, - - /** - * Destination-in blend mode. For Canvas only. - * The existing canvas content is kept where both the new shape and existing canvas content overlap. Everything else is made transparent. - * - * @name Phaser.BlendModes.DESTINATION_IN - * @type {integer} - * @const - * @since 3.0.0 - */ - DESTINATION_IN: 22, - - /** - * Destination-out blend mode. For Canvas only. - * The existing content is kept where it doesn't overlap the new shape. - * - * @name Phaser.BlendModes.DESTINATION_OUT - * @type {integer} - * @const - * @since 3.0.0 - */ - DESTINATION_OUT: 23, - - /** - * Destination-out blend mode. For Canvas only. - * The existing canvas is only kept where it overlaps the new shape. The new shape is drawn behind the canvas content. - * - * @name Phaser.BlendModes.DESTINATION_ATOP - * @type {integer} - * @const - * @since 3.0.0 - */ - DESTINATION_ATOP: 24, - - /** - * Lighten blend mode. For Canvas only. - * Where both shapes overlap the color is determined by adding color values. - * - * @name Phaser.BlendModes.LIGHTER - * @type {integer} - * @const - * @since 3.0.0 - */ - LIGHTER: 25, - - /** - * Copy blend mode. For Canvas only. - * Only the new shape is shown. - * - * @name Phaser.BlendModes.COPY - * @type {integer} - * @const - * @since 3.0.0 - */ - COPY: 26, - - /** - * Xor blend mode. For Canvas only. - * Shapes are made transparent where both overlap and drawn normal everywhere else. - * - * @name Phaser.BlendModes.XOR - * @type {integer} - * @const - * @since 3.0.0 - */ - XOR: 27 - -}; - - -/***/ }), -/* 38 */ +/* 64 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8283,8 +13030,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH = __webpack_require__(39); -var GetValue = __webpack_require__(12); +var MATH = __webpack_require__(65); +var GetValue = __webpack_require__(6); /** * Retrieves a value from an object. Allows for more advanced selection options, including: @@ -8361,7 +13108,7 @@ module.exports = GetAdvancedValue; /***/ }), -/* 39 */ +/* 65 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8370,8 +13117,8 @@ module.exports = GetAdvancedValue; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(1); -var Extend = __webpack_require__(15); +var CONST = __webpack_require__(2); +var Extend = __webpack_require__(26); /** * @namespace Phaser.Math @@ -8380,63 +13127,63 @@ var Extend = __webpack_require__(15); var PhaserMath = { // Collections of functions - Angle: __webpack_require__(40), - Distance: __webpack_require__(49), - Easing: __webpack_require__(57), - Fuzzy: __webpack_require__(102), - Interpolation: __webpack_require__(107), - Pow2: __webpack_require__(115), - Snap: __webpack_require__(119), + Angle: __webpack_require__(66), + Distance: __webpack_require__(75), + Easing: __webpack_require__(83), + Fuzzy: __webpack_require__(128), + Interpolation: __webpack_require__(133), + Pow2: __webpack_require__(141), + Snap: __webpack_require__(145), // Expose the RNG Class - RandomDataGenerator: __webpack_require__(123), + RandomDataGenerator: __webpack_require__(149), // Single functions - Average: __webpack_require__(124), - Bernstein: __webpack_require__(21), - Between: __webpack_require__(125), - CatmullRom: __webpack_require__(23), - CeilTo: __webpack_require__(126), - Clamp: __webpack_require__(9), - DegToRad: __webpack_require__(27), - Difference: __webpack_require__(127), - Factorial: __webpack_require__(22), - FloatBetween: __webpack_require__(8), - FloorTo: __webpack_require__(128), - FromPercent: __webpack_require__(129), - GetSpeed: __webpack_require__(130), - IsEven: __webpack_require__(131), - IsEvenStrict: __webpack_require__(132), - Linear: __webpack_require__(24), - MaxAdd: __webpack_require__(133), - MinSub: __webpack_require__(134), - Percent: __webpack_require__(135), - RadToDeg: __webpack_require__(10), - RandomXY: __webpack_require__(136), - RandomXYZ: __webpack_require__(137), - RandomXYZW: __webpack_require__(138), - Rotate: __webpack_require__(139), - RotateAround: __webpack_require__(140), - RotateAroundDistance: __webpack_require__(141), - RotateTo: __webpack_require__(142), - RoundAwayFromZero: __webpack_require__(143), - RoundTo: __webpack_require__(144), - SinCosTableGenerator: __webpack_require__(145), - SmootherStep: __webpack_require__(26), - SmoothStep: __webpack_require__(25), - ToXY: __webpack_require__(146), - TransformXY: __webpack_require__(28), - Within: __webpack_require__(147), - Wrap: __webpack_require__(5), + Average: __webpack_require__(150), + Bernstein: __webpack_require__(32), + Between: __webpack_require__(151), + CatmullRom: __webpack_require__(34), + CeilTo: __webpack_require__(152), + Clamp: __webpack_require__(5), + DegToRad: __webpack_require__(17), + Difference: __webpack_require__(153), + Factorial: __webpack_require__(33), + FloatBetween: __webpack_require__(16), + FloorTo: __webpack_require__(154), + FromPercent: __webpack_require__(155), + GetSpeed: __webpack_require__(156), + IsEven: __webpack_require__(157), + IsEvenStrict: __webpack_require__(158), + Linear: __webpack_require__(35), + MaxAdd: __webpack_require__(159), + MinSub: __webpack_require__(160), + Percent: __webpack_require__(161), + RadToDeg: __webpack_require__(18), + RandomXY: __webpack_require__(162), + RandomXYZ: __webpack_require__(163), + RandomXYZW: __webpack_require__(164), + Rotate: __webpack_require__(165), + RotateAround: __webpack_require__(38), + RotateAroundDistance: __webpack_require__(166), + RotateTo: __webpack_require__(167), + RoundAwayFromZero: __webpack_require__(39), + RoundTo: __webpack_require__(168), + SinCosTableGenerator: __webpack_require__(169), + SmootherStep: __webpack_require__(37), + SmoothStep: __webpack_require__(36), + ToXY: __webpack_require__(170), + TransformXY: __webpack_require__(40), + Within: __webpack_require__(171), + Wrap: __webpack_require__(10), // Vector classes - Vector2: __webpack_require__(3), - Vector3: __webpack_require__(11), - Vector4: __webpack_require__(148), - Matrix3: __webpack_require__(29), - Matrix4: __webpack_require__(30), - Quaternion: __webpack_require__(31), - RotateVec3: __webpack_require__(149) + Vector2: __webpack_require__(1), + Vector3: __webpack_require__(19), + Vector4: __webpack_require__(172), + Matrix3: __webpack_require__(41), + Matrix4: __webpack_require__(42), + Quaternion: __webpack_require__(43), + RotateVec3: __webpack_require__(173) }; @@ -8450,7 +13197,7 @@ module.exports = PhaserMath; /***/ }), -/* 40 */ +/* 66 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8465,25 +13212,25 @@ module.exports = PhaserMath; module.exports = { - Between: __webpack_require__(16), - BetweenPoints: __webpack_require__(41), - BetweenPointsY: __webpack_require__(42), - BetweenY: __webpack_require__(43), - CounterClockwise: __webpack_require__(7), - Normalize: __webpack_require__(17), - Random: __webpack_require__(44), - RandomDegrees: __webpack_require__(45), - Reverse: __webpack_require__(46), - RotateTo: __webpack_require__(47), - ShortestBetween: __webpack_require__(48), - Wrap: __webpack_require__(18), - WrapDegrees: __webpack_require__(19) + Between: __webpack_require__(27), + BetweenPoints: __webpack_require__(67), + BetweenPointsY: __webpack_require__(68), + BetweenY: __webpack_require__(69), + CounterClockwise: __webpack_require__(15), + Normalize: __webpack_require__(28), + Random: __webpack_require__(70), + RandomDegrees: __webpack_require__(71), + Reverse: __webpack_require__(72), + RotateTo: __webpack_require__(73), + ShortestBetween: __webpack_require__(74), + Wrap: __webpack_require__(29), + WrapDegrees: __webpack_require__(30) }; /***/ }), -/* 41 */ +/* 67 */ /***/ (function(module, exports) { /** @@ -8514,7 +13261,7 @@ module.exports = BetweenPoints; /***/ }), -/* 42 */ +/* 68 */ /***/ (function(module, exports) { /** @@ -8546,7 +13293,7 @@ module.exports = BetweenPointsY; /***/ }), -/* 43 */ +/* 69 */ /***/ (function(module, exports) { /** @@ -8580,7 +13327,7 @@ module.exports = BetweenY; /***/ }), -/* 44 */ +/* 70 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8590,7 +13337,7 @@ module.exports = BetweenY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FloatBetween = __webpack_require__(8); +var FloatBetween = __webpack_require__(16); /** * Returns a random angle in the range [-pi, pi]. @@ -8609,7 +13356,7 @@ module.exports = Random; /***/ }), -/* 45 */ +/* 71 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8619,7 +13366,7 @@ module.exports = Random; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FloatBetween = __webpack_require__(8); +var FloatBetween = __webpack_require__(16); /** * Returns a random angle in the range [-180, 180]. @@ -8638,7 +13385,7 @@ module.exports = RandomDegrees; /***/ }), -/* 46 */ +/* 72 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8647,7 +13394,7 @@ module.exports = RandomDegrees; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Normalize = __webpack_require__(17); +var Normalize = __webpack_require__(28); /** * Reverse the given angle. @@ -8668,7 +13415,7 @@ module.exports = Reverse; /***/ }), -/* 47 */ +/* 73 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8677,7 +13424,7 @@ module.exports = Reverse; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH_CONST = __webpack_require__(1); +var MATH_CONST = __webpack_require__(2); /** * Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call. @@ -8735,7 +13482,7 @@ module.exports = RotateTo; /***/ }), -/* 48 */ +/* 74 */ /***/ (function(module, exports) { /** @@ -8784,7 +13531,7 @@ module.exports = ShortestBetween; /***/ }), -/* 49 */ +/* 75 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8799,19 +13546,19 @@ module.exports = ShortestBetween; module.exports = { - Between: __webpack_require__(50), - BetweenPoints: __webpack_require__(51), - BetweenPointsSquared: __webpack_require__(52), - Chebyshev: __webpack_require__(53), - Power: __webpack_require__(54), - Snake: __webpack_require__(55), - Squared: __webpack_require__(56) + Between: __webpack_require__(76), + BetweenPoints: __webpack_require__(77), + BetweenPointsSquared: __webpack_require__(78), + Chebyshev: __webpack_require__(79), + Power: __webpack_require__(80), + Snake: __webpack_require__(81), + Squared: __webpack_require__(82) }; /***/ }), -/* 50 */ +/* 76 */ /***/ (function(module, exports) { /** @@ -8845,7 +13592,7 @@ module.exports = DistanceBetween; /***/ }), -/* 51 */ +/* 77 */ /***/ (function(module, exports) { /** @@ -8877,7 +13624,7 @@ module.exports = DistanceBetweenPoints; /***/ }), -/* 52 */ +/* 78 */ /***/ (function(module, exports) { /** @@ -8909,7 +13656,7 @@ module.exports = DistanceBetweenPointsSquared; /***/ }), -/* 53 */ +/* 79 */ /***/ (function(module, exports) { /** @@ -8943,7 +13690,7 @@ module.exports = ChebyshevDistance; /***/ }), -/* 54 */ +/* 80 */ /***/ (function(module, exports) { /** @@ -8977,7 +13724,7 @@ module.exports = DistancePower; /***/ }), -/* 55 */ +/* 81 */ /***/ (function(module, exports) { /** @@ -9011,7 +13758,7 @@ module.exports = SnakeDistance; /***/ }), -/* 56 */ +/* 82 */ /***/ (function(module, exports) { /** @@ -9045,7 +13792,7 @@ module.exports = DistanceSquared; /***/ }), -/* 57 */ +/* 83 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -9060,24 +13807,24 @@ module.exports = DistanceSquared; module.exports = { - Back: __webpack_require__(58), - Bounce: __webpack_require__(62), - Circular: __webpack_require__(66), - Cubic: __webpack_require__(70), - Elastic: __webpack_require__(74), - Expo: __webpack_require__(78), - Linear: __webpack_require__(82), - Quadratic: __webpack_require__(84), - Quartic: __webpack_require__(88), - Quintic: __webpack_require__(92), - Sine: __webpack_require__(96), - Stepped: __webpack_require__(100) + Back: __webpack_require__(84), + Bounce: __webpack_require__(88), + Circular: __webpack_require__(92), + Cubic: __webpack_require__(96), + Elastic: __webpack_require__(100), + Expo: __webpack_require__(104), + Linear: __webpack_require__(108), + Quadratic: __webpack_require__(110), + Quartic: __webpack_require__(114), + Quintic: __webpack_require__(118), + Sine: __webpack_require__(122), + Stepped: __webpack_require__(126) }; /***/ }), -/* 58 */ +/* 84 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -9092,15 +13839,15 @@ module.exports = { module.exports = { - In: __webpack_require__(59), - Out: __webpack_require__(60), - InOut: __webpack_require__(61) + In: __webpack_require__(85), + Out: __webpack_require__(86), + InOut: __webpack_require__(87) }; /***/ }), -/* 59 */ +/* 85 */ /***/ (function(module, exports) { /** @@ -9131,7 +13878,7 @@ module.exports = In; /***/ }), -/* 60 */ +/* 86 */ /***/ (function(module, exports) { /** @@ -9162,7 +13909,7 @@ module.exports = Out; /***/ }), -/* 61 */ +/* 87 */ /***/ (function(module, exports) { /** @@ -9202,7 +13949,7 @@ module.exports = InOut; /***/ }), -/* 62 */ +/* 88 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -9217,15 +13964,15 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(63), - Out: __webpack_require__(64), - InOut: __webpack_require__(65) + In: __webpack_require__(89), + Out: __webpack_require__(90), + InOut: __webpack_require__(91) }; /***/ }), -/* 63 */ +/* 89 */ /***/ (function(module, exports) { /** @@ -9270,7 +14017,7 @@ module.exports = In; /***/ }), -/* 64 */ +/* 90 */ /***/ (function(module, exports) { /** @@ -9313,7 +14060,7 @@ module.exports = Out; /***/ }), -/* 65 */ +/* 91 */ /***/ (function(module, exports) { /** @@ -9377,7 +14124,7 @@ module.exports = InOut; /***/ }), -/* 66 */ +/* 92 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -9392,15 +14139,15 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(67), - Out: __webpack_require__(68), - InOut: __webpack_require__(69) + In: __webpack_require__(93), + Out: __webpack_require__(94), + InOut: __webpack_require__(95) }; /***/ }), -/* 67 */ +/* 93 */ /***/ (function(module, exports) { /** @@ -9428,7 +14175,7 @@ module.exports = In; /***/ }), -/* 68 */ +/* 94 */ /***/ (function(module, exports) { /** @@ -9456,7 +14203,7 @@ module.exports = Out; /***/ }), -/* 69 */ +/* 95 */ /***/ (function(module, exports) { /** @@ -9491,7 +14238,7 @@ module.exports = InOut; /***/ }), -/* 70 */ +/* 96 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -9506,15 +14253,15 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(71), - Out: __webpack_require__(72), - InOut: __webpack_require__(73) + In: __webpack_require__(97), + Out: __webpack_require__(98), + InOut: __webpack_require__(99) }; /***/ }), -/* 71 */ +/* 97 */ /***/ (function(module, exports) { /** @@ -9542,7 +14289,7 @@ module.exports = In; /***/ }), -/* 72 */ +/* 98 */ /***/ (function(module, exports) { /** @@ -9570,7 +14317,7 @@ module.exports = Out; /***/ }), -/* 73 */ +/* 99 */ /***/ (function(module, exports) { /** @@ -9605,7 +14352,7 @@ module.exports = InOut; /***/ }), -/* 74 */ +/* 100 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -9620,15 +14367,15 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(75), - Out: __webpack_require__(76), - InOut: __webpack_require__(77) + In: __webpack_require__(101), + Out: __webpack_require__(102), + InOut: __webpack_require__(103) }; /***/ }), -/* 75 */ +/* 101 */ /***/ (function(module, exports) { /** @@ -9683,7 +14430,7 @@ module.exports = In; /***/ }), -/* 76 */ +/* 102 */ /***/ (function(module, exports) { /** @@ -9738,7 +14485,7 @@ module.exports = Out; /***/ }), -/* 77 */ +/* 103 */ /***/ (function(module, exports) { /** @@ -9800,7 +14547,7 @@ module.exports = InOut; /***/ }), -/* 78 */ +/* 104 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -9815,15 +14562,15 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(79), - Out: __webpack_require__(80), - InOut: __webpack_require__(81) + In: __webpack_require__(105), + Out: __webpack_require__(106), + InOut: __webpack_require__(107) }; /***/ }), -/* 79 */ +/* 105 */ /***/ (function(module, exports) { /** @@ -9851,7 +14598,7 @@ module.exports = In; /***/ }), -/* 80 */ +/* 106 */ /***/ (function(module, exports) { /** @@ -9879,7 +14626,7 @@ module.exports = Out; /***/ }), -/* 81 */ +/* 107 */ /***/ (function(module, exports) { /** @@ -9914,7 +14661,7 @@ module.exports = InOut; /***/ }), -/* 82 */ +/* 108 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -9923,11 +14670,11 @@ module.exports = InOut; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -module.exports = __webpack_require__(83); +module.exports = __webpack_require__(109); /***/ }), -/* 83 */ +/* 109 */ /***/ (function(module, exports) { /** @@ -9955,7 +14702,7 @@ module.exports = Linear; /***/ }), -/* 84 */ +/* 110 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -9970,15 +14717,15 @@ module.exports = Linear; module.exports = { - In: __webpack_require__(85), - Out: __webpack_require__(86), - InOut: __webpack_require__(87) + In: __webpack_require__(111), + Out: __webpack_require__(112), + InOut: __webpack_require__(113) }; /***/ }), -/* 85 */ +/* 111 */ /***/ (function(module, exports) { /** @@ -10006,7 +14753,7 @@ module.exports = In; /***/ }), -/* 86 */ +/* 112 */ /***/ (function(module, exports) { /** @@ -10034,7 +14781,7 @@ module.exports = Out; /***/ }), -/* 87 */ +/* 113 */ /***/ (function(module, exports) { /** @@ -10069,7 +14816,7 @@ module.exports = InOut; /***/ }), -/* 88 */ +/* 114 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10084,15 +14831,15 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(89), - Out: __webpack_require__(90), - InOut: __webpack_require__(91) + In: __webpack_require__(115), + Out: __webpack_require__(116), + InOut: __webpack_require__(117) }; /***/ }), -/* 89 */ +/* 115 */ /***/ (function(module, exports) { /** @@ -10120,7 +14867,7 @@ module.exports = In; /***/ }), -/* 90 */ +/* 116 */ /***/ (function(module, exports) { /** @@ -10148,7 +14895,7 @@ module.exports = Out; /***/ }), -/* 91 */ +/* 117 */ /***/ (function(module, exports) { /** @@ -10183,7 +14930,7 @@ module.exports = InOut; /***/ }), -/* 92 */ +/* 118 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10198,15 +14945,15 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(93), - Out: __webpack_require__(94), - InOut: __webpack_require__(95) + In: __webpack_require__(119), + Out: __webpack_require__(120), + InOut: __webpack_require__(121) }; /***/ }), -/* 93 */ +/* 119 */ /***/ (function(module, exports) { /** @@ -10234,7 +14981,7 @@ module.exports = In; /***/ }), -/* 94 */ +/* 120 */ /***/ (function(module, exports) { /** @@ -10262,7 +15009,7 @@ module.exports = Out; /***/ }), -/* 95 */ +/* 121 */ /***/ (function(module, exports) { /** @@ -10297,7 +15044,7 @@ module.exports = InOut; /***/ }), -/* 96 */ +/* 122 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10312,15 +15059,15 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(97), - Out: __webpack_require__(98), - InOut: __webpack_require__(99) + In: __webpack_require__(123), + Out: __webpack_require__(124), + InOut: __webpack_require__(125) }; /***/ }), -/* 97 */ +/* 123 */ /***/ (function(module, exports) { /** @@ -10359,7 +15106,7 @@ module.exports = In; /***/ }), -/* 98 */ +/* 124 */ /***/ (function(module, exports) { /** @@ -10398,7 +15145,7 @@ module.exports = Out; /***/ }), -/* 99 */ +/* 125 */ /***/ (function(module, exports) { /** @@ -10437,7 +15184,7 @@ module.exports = InOut; /***/ }), -/* 100 */ +/* 126 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10450,11 +15197,11 @@ module.exports = InOut; * @namespace Phaser.Math.Easing.Stepped */ -module.exports = __webpack_require__(101); +module.exports = __webpack_require__(127); /***/ }), -/* 101 */ +/* 127 */ /***/ (function(module, exports) { /** @@ -10496,7 +15243,7 @@ module.exports = Stepped; /***/ }), -/* 102 */ +/* 128 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10511,17 +15258,17 @@ module.exports = Stepped; module.exports = { - Ceil: __webpack_require__(103), - Equal: __webpack_require__(20), - Floor: __webpack_require__(104), - GreaterThan: __webpack_require__(105), - LessThan: __webpack_require__(106) + Ceil: __webpack_require__(129), + Equal: __webpack_require__(31), + Floor: __webpack_require__(130), + GreaterThan: __webpack_require__(131), + LessThan: __webpack_require__(132) }; /***/ }), -/* 103 */ +/* 129 */ /***/ (function(module, exports) { /** @@ -10552,7 +15299,7 @@ module.exports = Ceil; /***/ }), -/* 104 */ +/* 130 */ /***/ (function(module, exports) { /** @@ -10583,7 +15330,7 @@ module.exports = Floor; /***/ }), -/* 105 */ +/* 131 */ /***/ (function(module, exports) { /** @@ -10617,7 +15364,7 @@ module.exports = GreaterThan; /***/ }), -/* 106 */ +/* 132 */ /***/ (function(module, exports) { /** @@ -10651,7 +15398,7 @@ module.exports = LessThan; /***/ }), -/* 107 */ +/* 133 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10666,19 +15413,19 @@ module.exports = LessThan; module.exports = { - Bezier: __webpack_require__(108), - CatmullRom: __webpack_require__(109), - CubicBezier: __webpack_require__(110), - Linear: __webpack_require__(111), - QuadraticBezier: __webpack_require__(112), - SmoothStep: __webpack_require__(113), - SmootherStep: __webpack_require__(114) + Bezier: __webpack_require__(134), + CatmullRom: __webpack_require__(135), + CubicBezier: __webpack_require__(136), + Linear: __webpack_require__(137), + QuadraticBezier: __webpack_require__(138), + SmoothStep: __webpack_require__(139), + SmootherStep: __webpack_require__(140) }; /***/ }), -/* 108 */ +/* 134 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10687,7 +15434,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bernstein = __webpack_require__(21); +var Bernstein = __webpack_require__(32); /** * A bezier interpolation method. @@ -10717,7 +15464,7 @@ module.exports = BezierInterpolation; /***/ }), -/* 109 */ +/* 135 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10726,7 +15473,7 @@ module.exports = BezierInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CatmullRom = __webpack_require__(23); +var CatmullRom = __webpack_require__(34); /** * A Catmull-Rom interpolation method. @@ -10774,7 +15521,7 @@ module.exports = CatmullRomInterpolation; /***/ }), -/* 110 */ +/* 136 */ /***/ (function(module, exports) { /** @@ -10844,7 +15591,7 @@ module.exports = CubicBezierInterpolation; /***/ }), -/* 111 */ +/* 137 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10853,7 +15600,7 @@ module.exports = CubicBezierInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Linear = __webpack_require__(24); +var Linear = __webpack_require__(35); /** * A linear interpolation method. @@ -10891,7 +15638,7 @@ module.exports = LinearInterpolation; /***/ }), -/* 112 */ +/* 138 */ /***/ (function(module, exports) { /** @@ -10950,7 +15697,7 @@ module.exports = QuadraticBezierInterpolation; /***/ }), -/* 113 */ +/* 139 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10959,7 +15706,7 @@ module.exports = QuadraticBezierInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmoothStep = __webpack_require__(25); +var SmoothStep = __webpack_require__(36); /** * A Smooth Step interpolation method. @@ -10983,7 +15730,7 @@ module.exports = SmoothStepInterpolation; /***/ }), -/* 114 */ +/* 140 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10992,7 +15739,7 @@ module.exports = SmoothStepInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmootherStep = __webpack_require__(26); +var SmootherStep = __webpack_require__(37); /** * A Smoother Step interpolation method. @@ -11016,7 +15763,7 @@ module.exports = SmootherStepInterpolation; /***/ }), -/* 115 */ +/* 141 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -11031,15 +15778,15 @@ module.exports = SmootherStepInterpolation; module.exports = { - GetNext: __webpack_require__(116), - IsSize: __webpack_require__(117), - IsValue: __webpack_require__(118) + GetNext: __webpack_require__(142), + IsSize: __webpack_require__(143), + IsValue: __webpack_require__(144) }; /***/ }), -/* 116 */ +/* 142 */ /***/ (function(module, exports) { /** @@ -11069,7 +15816,7 @@ module.exports = GetPowerOfTwo; /***/ }), -/* 117 */ +/* 143 */ /***/ (function(module, exports) { /** @@ -11099,7 +15846,7 @@ module.exports = IsSizePowerOfTwo; /***/ }), -/* 118 */ +/* 144 */ /***/ (function(module, exports) { /** @@ -11127,7 +15874,7 @@ module.exports = IsValuePowerOfTwo; /***/ }), -/* 119 */ +/* 145 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -11142,15 +15889,15 @@ module.exports = IsValuePowerOfTwo; module.exports = { - Ceil: __webpack_require__(120), - Floor: __webpack_require__(121), - To: __webpack_require__(122) + Ceil: __webpack_require__(146), + Floor: __webpack_require__(147), + To: __webpack_require__(148) }; /***/ }), -/* 120 */ +/* 146 */ /***/ (function(module, exports) { /** @@ -11194,7 +15941,7 @@ module.exports = SnapCeil; /***/ }), -/* 121 */ +/* 147 */ /***/ (function(module, exports) { /** @@ -11238,7 +15985,7 @@ module.exports = SnapFloor; /***/ }), -/* 122 */ +/* 148 */ /***/ (function(module, exports) { /** @@ -11281,7 +16028,7 @@ module.exports = SnapTo; /***/ }), -/* 123 */ +/* 149 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -11791,7 +16538,7 @@ module.exports = RandomDataGenerator; /***/ }), -/* 124 */ +/* 150 */ /***/ (function(module, exports) { /** @@ -11826,7 +16573,7 @@ module.exports = Average; /***/ }), -/* 125 */ +/* 151 */ /***/ (function(module, exports) { /** @@ -11855,7 +16602,7 @@ module.exports = Between; /***/ }), -/* 126 */ +/* 152 */ /***/ (function(module, exports) { /** @@ -11892,7 +16639,7 @@ module.exports = CeilTo; /***/ }), -/* 127 */ +/* 153 */ /***/ (function(module, exports) { /** @@ -11921,7 +16668,7 @@ module.exports = Difference; /***/ }), -/* 128 */ +/* 154 */ /***/ (function(module, exports) { /** @@ -11958,7 +16705,7 @@ module.exports = FloorTo; /***/ }), -/* 129 */ +/* 155 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -11967,7 +16714,7 @@ module.exports = FloorTo; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(9); +var Clamp = __webpack_require__(5); /** * Return a value based on the range between `min` and `max` and the percentage given. @@ -11992,7 +16739,7 @@ module.exports = FromPercent; /***/ }), -/* 130 */ +/* 156 */ /***/ (function(module, exports) { /** @@ -12025,7 +16772,7 @@ module.exports = GetSpeed; /***/ }), -/* 131 */ +/* 157 */ /***/ (function(module, exports) { /** @@ -12056,7 +16803,7 @@ module.exports = IsEven; /***/ }), -/* 132 */ +/* 158 */ /***/ (function(module, exports) { /** @@ -12085,7 +16832,7 @@ module.exports = IsEvenStrict; /***/ }), -/* 133 */ +/* 159 */ /***/ (function(module, exports) { /** @@ -12115,7 +16862,7 @@ module.exports = MaxAdd; /***/ }), -/* 134 */ +/* 160 */ /***/ (function(module, exports) { /** @@ -12145,7 +16892,7 @@ module.exports = MinSub; /***/ }), -/* 135 */ +/* 161 */ /***/ (function(module, exports) { /** @@ -12204,7 +16951,7 @@ module.exports = Percent; /***/ }), -/* 136 */ +/* 162 */ /***/ (function(module, exports) { /** @@ -12244,7 +16991,7 @@ module.exports = RandomXY; /***/ }), -/* 137 */ +/* 163 */ /***/ (function(module, exports) { /** @@ -12283,7 +17030,7 @@ module.exports = RandomXYZ; /***/ }), -/* 138 */ +/* 164 */ /***/ (function(module, exports) { /** @@ -12320,7 +17067,7 @@ module.exports = RandomXYZW; /***/ }), -/* 139 */ +/* 165 */ /***/ (function(module, exports) { /** @@ -12355,51 +17102,7 @@ module.exports = Rotate; /***/ }), -/* 140 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Rotate a `point` around `x` and `y` to the given `angle`, at the same distance. - * - * In polar notation, this maps a point from (r, t) to (r, angle), vs. the origin (x, y). - * - * @function Phaser.Math.RotateAround - * @since 3.0.0 - * - * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return] - * - * @param {(Phaser.Geom.Point|object)} point - The point to be rotated. - * @param {number} x - The horizontal coordinate to rotate around. - * @param {number} y - The vertical coordinate to rotate around. - * @param {number} angle - The angle of rotation in radians. - * - * @return {Phaser.Types.Math.Vector2Like} The given point. - */ -var RotateAround = function (point, x, y, angle) -{ - var c = Math.cos(angle); - var s = Math.sin(angle); - - var tx = point.x - x; - var ty = point.y - y; - - point.x = tx * c - ty * s + x; - point.y = tx * s + ty * c + y; - - return point; -}; - -module.exports = RotateAround; - - -/***/ }), -/* 141 */ +/* 166 */ /***/ (function(module, exports) { /** @@ -12440,7 +17143,7 @@ module.exports = RotateAroundDistance; /***/ }), -/* 142 */ +/* 167 */ /***/ (function(module, exports) { /** @@ -12477,36 +17180,7 @@ module.exports = RotateTo; /***/ }), -/* 143 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Round a given number so it is further away from zero. That is, positive numbers are rounded up, and negative numbers are rounded down. - * - * @function Phaser.Math.RoundAwayFromZero - * @since 3.0.0 - * - * @param {number} value - The number to round. - * - * @return {number} The rounded number, rounded away from zero. - */ -var RoundAwayFromZero = function (value) -{ - // "Opposite" of truncate. - return (value > 0) ? Math.ceil(value) : Math.floor(value); -}; - -module.exports = RoundAwayFromZero; - - -/***/ }), -/* 144 */ +/* 168 */ /***/ (function(module, exports) { /** @@ -12558,7 +17232,7 @@ module.exports = RoundTo; /***/ }), -/* 145 */ +/* 169 */ /***/ (function(module, exports) { /** @@ -12611,7 +17285,7 @@ module.exports = SinCosTableGenerator; /***/ }), -/* 146 */ +/* 170 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -12620,7 +17294,7 @@ module.exports = SinCosTableGenerator; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector2 = __webpack_require__(3); +var Vector2 = __webpack_require__(1); /** * Returns a Vector2 containing the x and y position of the given index in a `width` x `height` sized grid. @@ -12669,7 +17343,7 @@ module.exports = ToXY; /***/ }), -/* 147 */ +/* 171 */ /***/ (function(module, exports) { /** @@ -12699,7 +17373,7 @@ module.exports = Within; /***/ }), -/* 148 */ +/* 172 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -13244,7 +17918,7 @@ module.exports = Vector4; /***/ }), -/* 149 */ +/* 173 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -13253,9 +17927,9 @@ module.exports = Vector4; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector3 = __webpack_require__(11); -var Matrix4 = __webpack_require__(30); -var Quaternion = __webpack_require__(31); +var Vector3 = __webpack_require__(19); +var Matrix4 = __webpack_require__(42); +var Quaternion = __webpack_require__(43); var tmpMat4 = new Matrix4(); var tmpQuat = new Quaternion(); @@ -13292,7 +17966,7 @@ module.exports = RotateVec3; /***/ }), -/* 150 */ +/* 174 */ /***/ (function(module, exports) { /** @@ -13323,7 +17997,7 @@ module.exports = 'resize'; /***/ }), -/* 151 */ +/* 175 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -13332,9 +18006,9 @@ module.exports = 'resize'; * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ -var BasePlugin = __webpack_require__(152); +var BasePlugin = __webpack_require__(176); var Class = __webpack_require__(0); -var SceneEvents = __webpack_require__(153); +var SceneEvents = __webpack_require__(177); /** * @classdesc @@ -13451,7 +18125,7 @@ module.exports = ScenePlugin; /***/ }), -/* 152 */ +/* 176 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -13581,7 +18255,7 @@ module.exports = BasePlugin; /***/ }), -/* 153 */ +/* 177 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -13596,33 +18270,33 @@ module.exports = BasePlugin; module.exports = { - ADDED_TO_SCENE: __webpack_require__(154), - BOOT: __webpack_require__(155), - CREATE: __webpack_require__(156), - DESTROY: __webpack_require__(157), - PAUSE: __webpack_require__(158), - POST_UPDATE: __webpack_require__(159), - PRE_UPDATE: __webpack_require__(160), - READY: __webpack_require__(161), - REMOVED_FROM_SCENE: __webpack_require__(162), - RENDER: __webpack_require__(163), - RESUME: __webpack_require__(164), - SHUTDOWN: __webpack_require__(165), - SLEEP: __webpack_require__(166), - START: __webpack_require__(167), - TRANSITION_COMPLETE: __webpack_require__(168), - TRANSITION_INIT: __webpack_require__(169), - TRANSITION_OUT: __webpack_require__(170), - TRANSITION_START: __webpack_require__(171), - TRANSITION_WAKE: __webpack_require__(172), - UPDATE: __webpack_require__(173), - WAKE: __webpack_require__(174) + ADDED_TO_SCENE: __webpack_require__(178), + BOOT: __webpack_require__(179), + CREATE: __webpack_require__(180), + DESTROY: __webpack_require__(181), + PAUSE: __webpack_require__(182), + POST_UPDATE: __webpack_require__(183), + PRE_UPDATE: __webpack_require__(184), + READY: __webpack_require__(185), + REMOVED_FROM_SCENE: __webpack_require__(186), + RENDER: __webpack_require__(187), + RESUME: __webpack_require__(188), + SHUTDOWN: __webpack_require__(189), + SLEEP: __webpack_require__(190), + START: __webpack_require__(191), + TRANSITION_COMPLETE: __webpack_require__(192), + TRANSITION_INIT: __webpack_require__(193), + TRANSITION_OUT: __webpack_require__(194), + TRANSITION_START: __webpack_require__(195), + TRANSITION_WAKE: __webpack_require__(196), + UPDATE: __webpack_require__(197), + WAKE: __webpack_require__(198) }; /***/ }), -/* 154 */ +/* 178 */ /***/ (function(module, exports) { /** @@ -13648,7 +18322,7 @@ module.exports = 'addedtoscene'; /***/ }), -/* 155 */ +/* 179 */ /***/ (function(module, exports) { /** @@ -13673,7 +18347,7 @@ module.exports = 'boot'; /***/ }), -/* 156 */ +/* 180 */ /***/ (function(module, exports) { /** @@ -13702,7 +18376,7 @@ module.exports = 'create'; /***/ }), -/* 157 */ +/* 181 */ /***/ (function(module, exports) { /** @@ -13729,7 +18403,7 @@ module.exports = 'destroy'; /***/ }), -/* 158 */ +/* 182 */ /***/ (function(module, exports) { /** @@ -13756,7 +18430,7 @@ module.exports = 'pause'; /***/ }), -/* 159 */ +/* 183 */ /***/ (function(module, exports) { /** @@ -13793,7 +18467,7 @@ module.exports = 'postupdate'; /***/ }), -/* 160 */ +/* 184 */ /***/ (function(module, exports) { /** @@ -13830,7 +18504,7 @@ module.exports = 'preupdate'; /***/ }), -/* 161 */ +/* 185 */ /***/ (function(module, exports) { /** @@ -13858,7 +18532,7 @@ module.exports = 'ready'; /***/ }), -/* 162 */ +/* 186 */ /***/ (function(module, exports) { /** @@ -13884,7 +18558,7 @@ module.exports = 'removedfromscene'; /***/ }), -/* 163 */ +/* 187 */ /***/ (function(module, exports) { /** @@ -13920,7 +18594,7 @@ module.exports = 'render'; /***/ }), -/* 164 */ +/* 188 */ /***/ (function(module, exports) { /** @@ -13947,7 +18621,7 @@ module.exports = 'resume'; /***/ }), -/* 165 */ +/* 189 */ /***/ (function(module, exports) { /** @@ -13977,7 +18651,7 @@ module.exports = 'shutdown'; /***/ }), -/* 166 */ +/* 190 */ /***/ (function(module, exports) { /** @@ -14004,7 +18678,7 @@ module.exports = 'sleep'; /***/ }), -/* 167 */ +/* 191 */ /***/ (function(module, exports) { /** @@ -14029,7 +18703,7 @@ module.exports = 'start'; /***/ }), -/* 168 */ +/* 192 */ /***/ (function(module, exports) { /** @@ -14065,7 +18739,7 @@ module.exports = 'transitioncomplete'; /***/ }), -/* 169 */ +/* 193 */ /***/ (function(module, exports) { /** @@ -14102,7 +18776,7 @@ module.exports = 'transitioninit'; /***/ }), -/* 170 */ +/* 194 */ /***/ (function(module, exports) { /** @@ -14136,7 +18810,7 @@ module.exports = 'transitionout'; /***/ }), -/* 171 */ +/* 195 */ /***/ (function(module, exports) { /** @@ -14176,7 +18850,7 @@ module.exports = 'transitionstart'; /***/ }), -/* 172 */ +/* 196 */ /***/ (function(module, exports) { /** @@ -14211,7 +18885,7 @@ module.exports = 'transitionwake'; /***/ }), -/* 173 */ +/* 197 */ /***/ (function(module, exports) { /** @@ -14248,7 +18922,7 @@ module.exports = 'update'; /***/ }), -/* 174 */ +/* 198 */ /***/ (function(module, exports) { /** @@ -14275,7 +18949,7 @@ module.exports = 'wake'; /***/ }), -/* 175 */ +/* 199 */ /***/ (function(module, exports) { /*** IMPORTS FROM imports-loader ***/ @@ -22730,7 +27404,7 @@ module.exports = spine; /***/ }), -/* 176 */ +/* 200 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -22740,12 +27414,12 @@ module.exports = spine; */ var Class = __webpack_require__(0); -var GetFastValue = __webpack_require__(4); -var ImageFile = __webpack_require__(177); -var IsPlainObject = __webpack_require__(2); -var JSONFile = __webpack_require__(191); -var MultiFile = __webpack_require__(192); -var TextFile = __webpack_require__(193); +var GetFastValue = __webpack_require__(8); +var ImageFile = __webpack_require__(201); +var IsPlainObject = __webpack_require__(7); +var JSONFile = __webpack_require__(215); +var MultiFile = __webpack_require__(216); +var TextFile = __webpack_require__(217); /** * @typedef {object} Phaser.Loader.FileTypes.SpineFileConfig @@ -22983,7 +27657,7 @@ module.exports = SpineFile; /***/ }), -/* 177 */ +/* 201 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -22993,11 +27667,11 @@ module.exports = SpineFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(6); -var File = __webpack_require__(13); -var FileTypesManager = __webpack_require__(14); -var GetFastValue = __webpack_require__(4); -var IsPlainObject = __webpack_require__(2); +var CONST = __webpack_require__(11); +var File = __webpack_require__(20); +var FileTypesManager = __webpack_require__(21); +var GetFastValue = __webpack_require__(8); +var IsPlainObject = __webpack_require__(7); /** * @classdesc @@ -23257,7 +27931,7 @@ module.exports = ImageFile; /***/ }), -/* 178 */ +/* 202 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -23272,22 +27946,22 @@ module.exports = ImageFile; module.exports = { - ADD: __webpack_require__(179), - COMPLETE: __webpack_require__(180), - FILE_COMPLETE: __webpack_require__(181), - FILE_KEY_COMPLETE: __webpack_require__(182), - FILE_LOAD_ERROR: __webpack_require__(183), - FILE_LOAD: __webpack_require__(184), - FILE_PROGRESS: __webpack_require__(185), - POST_PROCESS: __webpack_require__(186), - PROGRESS: __webpack_require__(187), - START: __webpack_require__(188) + ADD: __webpack_require__(203), + COMPLETE: __webpack_require__(204), + FILE_COMPLETE: __webpack_require__(205), + FILE_KEY_COMPLETE: __webpack_require__(206), + FILE_LOAD_ERROR: __webpack_require__(207), + FILE_LOAD: __webpack_require__(208), + FILE_PROGRESS: __webpack_require__(209), + POST_PROCESS: __webpack_require__(210), + PROGRESS: __webpack_require__(211), + START: __webpack_require__(212) }; /***/ }), -/* 179 */ +/* 203 */ /***/ (function(module, exports) { /** @@ -23317,7 +27991,7 @@ module.exports = 'addfile'; /***/ }), -/* 180 */ +/* 204 */ /***/ (function(module, exports) { /** @@ -23345,7 +28019,7 @@ module.exports = 'complete'; /***/ }), -/* 181 */ +/* 205 */ /***/ (function(module, exports) { /** @@ -23374,7 +28048,7 @@ module.exports = 'filecomplete'; /***/ }), -/* 182 */ +/* 206 */ /***/ (function(module, exports) { /** @@ -23428,7 +28102,7 @@ module.exports = 'filecomplete-'; /***/ }), -/* 183 */ +/* 207 */ /***/ (function(module, exports) { /** @@ -23453,7 +28127,7 @@ module.exports = 'loaderror'; /***/ }), -/* 184 */ +/* 208 */ /***/ (function(module, exports) { /** @@ -23479,7 +28153,7 @@ module.exports = 'load'; /***/ }), -/* 185 */ +/* 209 */ /***/ (function(module, exports) { /** @@ -23506,7 +28180,7 @@ module.exports = 'fileprogress'; /***/ }), -/* 186 */ +/* 210 */ /***/ (function(module, exports) { /** @@ -23535,7 +28209,7 @@ module.exports = 'postprocess'; /***/ }), -/* 187 */ +/* 211 */ /***/ (function(module, exports) { /** @@ -23560,7 +28234,7 @@ module.exports = 'progress'; /***/ }), -/* 188 */ +/* 212 */ /***/ (function(module, exports) { /** @@ -23587,7 +28261,7 @@ module.exports = 'start'; /***/ }), -/* 189 */ +/* 213 */ /***/ (function(module, exports) { /** @@ -23628,7 +28302,7 @@ module.exports = GetURL; /***/ }), -/* 190 */ +/* 214 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -23637,7 +28311,7 @@ module.exports = GetURL; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MergeXHRSettings = __webpack_require__(32); +var MergeXHRSettings = __webpack_require__(44); /** * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings @@ -23709,7 +28383,7 @@ module.exports = XHRLoader; /***/ }), -/* 191 */ +/* 215 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -23719,12 +28393,12 @@ module.exports = XHRLoader; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(6); -var File = __webpack_require__(13); -var FileTypesManager = __webpack_require__(14); -var GetFastValue = __webpack_require__(4); -var GetValue = __webpack_require__(12); -var IsPlainObject = __webpack_require__(2); +var CONST = __webpack_require__(11); +var File = __webpack_require__(20); +var FileTypesManager = __webpack_require__(21); +var GetFastValue = __webpack_require__(8); +var GetValue = __webpack_require__(6); +var IsPlainObject = __webpack_require__(7); /** * @classdesc @@ -23939,7 +28613,7 @@ module.exports = JSONFile; /***/ }), -/* 192 */ +/* 216 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -24173,7 +28847,7 @@ module.exports = MultiFile; /***/ }), -/* 193 */ +/* 217 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -24183,11 +28857,11 @@ module.exports = MultiFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(6); -var File = __webpack_require__(13); -var FileTypesManager = __webpack_require__(14); -var GetFastValue = __webpack_require__(4); -var IsPlainObject = __webpack_require__(2); +var CONST = __webpack_require__(11); +var File = __webpack_require__(20); +var FileTypesManager = __webpack_require__(21); +var GetFastValue = __webpack_require__(8); +var IsPlainObject = __webpack_require__(7); /** * @classdesc @@ -24348,54 +29022,54 @@ module.exports = TextFile; /***/ }), -/* 194 */ +/* 218 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AngleBetween = __webpack_require__(16); -var Clamp = __webpack_require__(9); +var AngleBetween = __webpack_require__(27); +var Clamp = __webpack_require__(5); var Class = __webpack_require__(0); -var ComponentsComputedSize = __webpack_require__(195); -var ComponentsDepth = __webpack_require__(196); -var ComponentsFlip = __webpack_require__(197); -var ComponentsScrollFactor = __webpack_require__(198); -var ComponentsTransform = __webpack_require__(199); -var ComponentsVisible = __webpack_require__(201); -var CounterClockwise = __webpack_require__(7); -var DegToRad = __webpack_require__(27); -var GameObject = __webpack_require__(202); -var RadToDeg = __webpack_require__(10); -var SpineEvents = __webpack_require__(225); -var SpineGameObjectRender = __webpack_require__(232); +var ComponentsComputedSize = __webpack_require__(46); +var ComponentsDepth = __webpack_require__(47); +var ComponentsFlip = __webpack_require__(48); +var ComponentsScrollFactor = __webpack_require__(49); +var ComponentsTransform = __webpack_require__(50); +var ComponentsVisible = __webpack_require__(52); +var CounterClockwise = __webpack_require__(15); +var DegToRad = __webpack_require__(17); +var GameObject = __webpack_require__(53); +var RadToDeg = __webpack_require__(18); +var SpineEvents = __webpack_require__(238); +var SpineGameObjectRender = __webpack_require__(245); /** * @classdesc * A Spine Game Object is a Phaser level object that can be added to your Phaser Scenes. It encapsulates * a Spine Skeleton with Spine Animation Data and Animation State, with helper methods to allow you to * easily change the skin, slot attachment, bone positions and more. - * + * * Spine Game Objects can be created via the Game Object Factory, Game Object Creator, or directly. * You can only create them if the Spine plugin has been loaded into Phaser. - * + * * The quickest way is the Game Object Factory: - * + * * ```javascript * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true); * ``` - * + * * Here we are creating a new Spine Game Object positioned at 512 x 550. It's using the `jelly` * Spine data, which has previously been loaded into your Scene. The `jelly-think` argument is * an optional animation to start playing on the skeleton. The final argument `true` sets the * animation to loop. Look at the documentation for further details on each of these options. - * + * * For more control, you can use the Game Object Creator, passing in a Spine Game Object * Configuration object: - * + * * ```javascript * let jelly = this.make.spine({ * x: 512, y: 550, key: 'jelly', @@ -24405,28 +29079,28 @@ var SpineGameObjectRender = __webpack_require__(232); * slotName: 'hat', attachmentName: 'images/La_14' * }); * ``` - * + * * Here, you've got the ability to specify extra details, such as the slot name, attachments or * overall scale. - * + * * If you wish to instantiate a Spine Game Object directly you can do so, but in order for it to * update and render, it must be added to the display and update lists of your Scene: - * + * * ```javascript * let jelly = new SpineGameObject(this, this.spine, 512, 550, 'jelly', 'jelly-think', true); * this.sys.displayList.add(jelly); * this.sys.updateList.add(jelly); * ``` - * + * * It's possible to enable Spine Game Objects for input, but you should be aware that it will use * the bounds of the skeletons current pose to create the hit area from. Sometimes this is ok, but * often not. Make use of the `InputPlugin.enableDebug` method to view the input shape being created. * If it's not suitable, provide your own shape to the `setInteractive` method. - * + * * Due to the way Spine handles scaling, it's not recommended to enable a Spine Game Object for * physics directly. Instead, you should look at creating a proxy body and syncing the Spine Game * Object position with it. See the examples for further details. - * + * * If your Spine Game Object has black outlines around the different parts of the texture when it * renders then you have exported the files from Spine with pre-multiplied alpha enabled, but have * forgotten to set that flag when loading the Spine data. Please see the loader docs for more details. @@ -24526,7 +29200,7 @@ var SpineGameObject = new Class({ * @since 3.19.0 */ this.bounds = null; - + /** * A Game Object level flag that allows you to enable debug drawing * to the Skeleton Debug Renderer by toggling it. @@ -24584,7 +29258,7 @@ var SpineGameObject = new Class({ * @readonly * @since 3.19.0 */ - this.blendMode = 0; + this.blendMode = -1; this.setPosition(x, y); @@ -24610,9 +29284,9 @@ var SpineGameObject = new Class({ /** * Set the Alpha level for the whole Skeleton 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. * * @method SpineGameObject#setAlpha @@ -24645,7 +29319,7 @@ var SpineGameObject = new Class({ /** * The alpha value of the Skeleton. - * + * * A value between 0 and 1. * * This is a global value, impacting the entire Skeleton, not just a region of it. @@ -24684,7 +29358,7 @@ var SpineGameObject = new Class({ /** * The amount of red used when rendering the Skeleton. - * + * * A value between 0 and 1. * * This is a global value, impacting the entire Skeleton, not just a region of it. @@ -24714,7 +29388,7 @@ var SpineGameObject = new Class({ /** * The amount of green used when rendering the Skeleton. - * + * * A value between 0 and 1. * * This is a global value, impacting the entire Skeleton, not just a region of it. @@ -24744,7 +29418,7 @@ var SpineGameObject = new Class({ /** * The amount of blue used when rendering the Skeleton. - * + * * A value between 0 and 1. * * This is a global value, impacting the entire Skeleton, not just a region of it. @@ -24780,7 +29454,7 @@ var SpineGameObject = new Class({ * * @param {integer} [color=0xffffff] - The color being applied to the Skeleton or named Slot. Set to white to disable any previously set color. * @param {string} [slotName] - The name of the slot to set the color on. If not give, will be set on the whole skeleton. - * + * * @return {this} This Game Object instance. */ setColor: function (color, slotName) @@ -24822,7 +29496,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#setSkeletonFromJSON * @since 3.19.0 - * + * * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton. * @param {object} skeletonJSON - The JSON data for the Skeleton. * @param {string} [animationName] - Optional name of the animation to set on the Skeleton. @@ -24837,13 +29511,13 @@ var SpineGameObject = new Class({ /** * Sets this Game Object to use the given Skeleton based on its cache key. - * + * * Typically, once set, the Skeleton doesn't change. Instead, you change the skin, * or slot attachment, or any other property to adjust it. * * @method SpineGameObject#setSkeleton * @since 3.19.0 - * + * * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton. * @param {object} skeletonJSON - The JSON data for the Skeleton. * @param {string} [animationName] - Optional name of the animation to set on the Skeleton. @@ -24920,7 +29594,7 @@ var SpineGameObject = new Class({ * @fires SpinePluginEvents#COMPLETE * @private * @since 3.19.0 - * + * * @param {any} entry - The event data from Spine. */ onComplete: function (entry) @@ -24935,7 +29609,7 @@ var SpineGameObject = new Class({ * @fires SpinePluginEvents#DISPOSE * @private * @since 3.19.0 - * + * * @param {any} entry - The event data from Spine. */ onDispose: function (entry) @@ -24950,7 +29624,7 @@ var SpineGameObject = new Class({ * @fires SpinePluginEvents#END * @private * @since 3.19.0 - * + * * @param {any} entry - The event data from Spine. */ onEnd: function (entry) @@ -24965,7 +29639,7 @@ var SpineGameObject = new Class({ * @fires SpinePluginEvents#EVENT * @private * @since 3.19.0 - * + * * @param {any} entry - The event data from Spine. * @param {spine.Event} event - The Spine event. */ @@ -24981,7 +29655,7 @@ var SpineGameObject = new Class({ * @fires SpinePluginEvents#INTERRUPTED * @private * @since 3.19.0 - * + * * @param {any} entry - The event data from Spine. */ onInterrupted: function (entry) @@ -24996,7 +29670,7 @@ var SpineGameObject = new Class({ * @fires SpinePluginEvents#START * @private * @since 3.19.0 - * + * * @param {any} entry - The event data from Spine. */ onStart: function (entry) @@ -25006,15 +29680,15 @@ var SpineGameObject = new Class({ /** * Refreshes the data about the current Skeleton. - * + * * This will reset the rotation, position and size of the Skeleton to match this Game Object. - * + * * Call this method if you need to access the Skeleton data directly, and it may have changed * recently. * * @method SpineGameObject#refresh * @since 3.19.0 - * + * * @return {this} This Game Object. */ refresh: function () @@ -25034,20 +29708,20 @@ var SpineGameObject = new Class({ /** * Sets the size of this Game Object. - * + * * If no arguments are given it uses the current skeleton data dimensions. - * + * * You can use this method to set a fixed size of this Game Object, such as for input detection, * when the skeleton data doesn't match what is required in-game. * * @method SpineGameObject#setSize * @since 3.19.0 - * + * * @param {number} [width] - The width of the Skeleton. If not given it defaults to the Skeleton Data width. * @param {number} [height] - The height of the Skeleton. If not given it defaults to the Skeleton Data height. * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate. * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate. - * + * * @return {this} This Game Object. */ setSize: function (width, height, offsetX, offsetY) @@ -25070,15 +29744,15 @@ var SpineGameObject = new Class({ /** * Sets the offset of this Game Object from the Skeleton position. - * + * * You can use this method to adjust how the position of this Game Object relates to the Skeleton it is using. * * @method SpineGameObject#setOffset * @since 3.19.0 - * + * * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate. * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate. - * + * * @return {this} This Game Object. */ setOffset: function (offsetX, offsetY) @@ -25097,13 +29771,13 @@ var SpineGameObject = new Class({ /** * Internal method that syncs all of the Game Object position and scale data to the Skeleton. * It then syncs the skeleton bounds back to this Game Object. - * + * * This method is called automatically as needed internally, however, it's also exposed should * you require overriding the size settings. * * @method SpineGameObject#updateSize * @since 3.19.0 - * + * * @return {this} This Game Object. */ updateSize: function () @@ -25192,7 +29866,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getBoneList * @since 3.19.0 - * + * * @return {string[]} An array containing the names of all the bones in the Skeleton Data. */ getBoneList: function () @@ -25217,7 +29891,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getSkinList * @since 3.19.0 - * + * * @return {string[]} An array containing the names of all the skins in the Skeleton Data. */ getSkinList: function () @@ -25242,7 +29916,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getSlotList * @since 3.19.0 - * + * * @return {string[]} An array containing the names of all the slots in the Skeleton. */ getSlotList: function () @@ -25264,7 +29938,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getAnimationList * @since 3.19.0 - * + * * @return {string[]} An array containing the names of all the animations in the Skeleton Data. */ getAnimationList: function () @@ -25289,9 +29963,9 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getCurrentAnimation * @since 3.19.0 - * + * * @param {integer} [trackIndex=0] - The track to return the current animation on. - * + * * @return {?spine.Animation} The current Animation on the given track, or `undefined` if there is no current animation. */ getCurrentAnimation: function (trackIndex) @@ -25309,7 +29983,7 @@ var SpineGameObject = new Class({ /** * Sets the current animation for a track, discarding any queued animations. * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from). - * + * * Animations are referenced by a unique string-based key, as defined in the Spine software. * * @method SpineGameObject#play @@ -25332,7 +30006,7 @@ var SpineGameObject = new Class({ /** * Sets the current animation for a track, discarding any queued animations. * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from). - * + * * Animations are referenced by a unique string-based key, as defined in the Spine software. * * @method SpineGameObject#setAnimation @@ -25354,7 +30028,7 @@ var SpineGameObject = new Class({ if (ignoreIfPlaying && this.state) { var currentTrack = this.state.getCurrent(0); - + if (currentTrack && currentTrack.animation.name === animationName && !currentTrack.isComplete()) { return; @@ -25370,9 +30044,9 @@ var SpineGameObject = new Class({ /** * Adds an animation to be played after the current or last queued animation for a track. * If the track is empty, it is equivalent to calling setAnimation. - * + * * Animations are referenced by a unique string-based key, as defined in the Spine software. - * + * * The delay is a float. If > 0, sets delay. If <= 0, the delay set is the duration of the previous * track entry minus any mix duration (from the AnimationStateData) plus the specified delay * (ie the mix ends at (delay = 0) or before (delay < 0) the previous track entry duration). @@ -25396,13 +30070,13 @@ var SpineGameObject = new Class({ /** * Sets an empty animation for a track, discarding any queued animations, and sets the track * entry's mixDuration. An empty animation has no timelines and serves as a placeholder for mixing in or out. - * + * * Mixing out is done by setting an empty animation with a mix duration using either setEmptyAnimation, * setEmptyAnimations, or addEmptyAnimation. Mixing to an empty animation causes the previous animation to be * applied less and less over the mix duration. Properties keyed in the previous animation transition to * the value from lower tracks or to the setup pose value if no lower tracks key the property. * A mix duration of 0 still mixes out over one frame. - * + * * Mixing in is done by first setting an empty animation, then adding an animation using addAnimation * and on the returned track entry, set the mixDuration. Mixing from an empty animation causes the new * animation to be applied more and more over the mix duration. Properties keyed in the new animation @@ -25424,7 +30098,7 @@ var SpineGameObject = new Class({ /** * Removes all animations from the track, leaving skeletons in their current pose. - * + * * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose, * rather than leaving them in their current pose. * @@ -25441,10 +30115,10 @@ var SpineGameObject = new Class({ return this; }, - + /** * Removes all animations from all tracks, leaving skeletons in their current pose. - * + * * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose, * rather than leaving them in their current pose. * @@ -25462,11 +30136,11 @@ var SpineGameObject = new Class({ /** * Sets the skin used to look up attachments before looking in the defaultSkin. - * + * * Attachments from the new skin are attached if the corresponding attachment from the * old skin was attached. If there was no old skin, each slot's setup mode attachment is * attached from the new skin. - * + * * After changing the skin, the visible attachments can be reset to those attached in the * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide @@ -25474,7 +30148,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#setSkinByName * @since 3.19.0 - * + * * @param {string} skinName - The name of the skin to set. * * @return {this} This Game Object. @@ -25494,11 +30168,11 @@ var SpineGameObject = new Class({ /** * Sets the skin used to look up attachments before looking in the defaultSkin. - * + * * Attachments from the new skin are attached if the corresponding attachment from the * old skin was attached. If there was no old skin, each slot's setup mode attachment is * attached from the new skin. - * + * * After changing the skin, the visible attachments can be reset to those attached in the * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide @@ -25506,7 +30180,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#setSkin * @since 3.19.0 - * + * * @param {?spine.Skin} newSkin - The Skin to set. May be `null`. * * @return {this} This Game Object. @@ -25529,7 +30203,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#setMix * @since 3.19.0 - * + * * @param {string} fromName - The animation to mix from. * @param {string} toName - The animation to mix to. * @param {number} [duration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any). @@ -25550,7 +30224,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getAttachment * @since 3.19.0 - * + * * @param {integer} slotIndex - The slot index to search. * @param {string} attachmentName - The attachment name to look for. * @@ -25566,7 +30240,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getAttachmentByName * @since 3.19.0 - * + * * @param {string} slotName - The slot name to search. * @param {string} attachmentName - The attachment name to look for. * @@ -25583,7 +30257,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#setAttachment * @since 3.19.0 - * + * * @param {string} slotName - The slot name to add the attachment to. * @param {string} attachmentName - The attachment name to add. * @@ -25671,7 +30345,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#angleBoneToXY * @since 3.19.0 - * + * * @param {spine.Bone} bone - The bone to rotate towards the world position. * @param {number} worldX - The world x coordinate to rotate the bone towards. * @param {number} worldY - The world y coordinate to rotate the bone towards. @@ -25703,7 +30377,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findBone * @since 3.19.0 - * + * * @param {string} boneName - The name of the bone to find. * * @return {spine.Bone} The bone, or null. @@ -25719,7 +30393,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findBoneIndex * @since 3.19.0 - * + * * @param {string} boneName - The name of the bone to find. * * @return {integer} The bone index. Or -1 if the bone was not found. @@ -25735,7 +30409,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findSlot * @since 3.19.0 - * + * * @param {string} slotName - The name of the slot to find. * * @return {spine.Slot} The Slot. May be null. @@ -25751,7 +30425,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findSlotIndex * @since 3.19.0 - * + * * @param {string} slotName - The name of the slot to find. * * @return {integer} The slot index. Or -1 if the Slot was not found. @@ -25767,7 +30441,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findSkin * @since 3.19.0 - * + * * @param {string} skinName - The name of the skin to find. * * @return {spine.Skin} The Skin. May be null. @@ -25783,7 +30457,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findEvent * @since 3.19.0 - * + * * @param {string} eventDataName - The name of the event to find. * * @return {spine.EventData} The Event Data. May be null. @@ -25799,7 +30473,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findAnimation * @since 3.19.0 - * + * * @param {string} animationName - The name of the animation to find. * * @return {spine.Animation} The Animation. May be null. @@ -25815,7 +30489,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findIkConstraint * @since 3.19.0 - * + * * @param {string} constraintName - The name of the constraint to find. * * @return {spine.IkConstraintData} The IK constraint. May be null. @@ -25831,7 +30505,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findTransformConstraint * @since 3.19.0 - * + * * @param {string} constraintName - The name of the constraint to find. * * @return {spine.TransformConstraintData} The transform constraint. May be null. @@ -25847,7 +30521,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findPathConstraint * @since 3.19.0 - * + * * @param {string} constraintName - The name of the constraint to find. * * @return {spine.PathConstraintData} The path constraint. May be null. @@ -25863,7 +30537,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findPathConstraintIndex * @since 3.19.0 - * + * * @param {string} constraintName - The name of the constraint to find. * * @return {integer} The constraint index. Or -1 if the constraint was not found. @@ -25875,15 +30549,15 @@ var SpineGameObject = new Class({ /** * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose. - * + * * The returned object contains two properties: `offset` and `size`: - * + * * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB. * `size` - The width and height of the AABB. * * @method SpineGameObject#getBounds * @since 3.19.0 - * + * * @return {any} The bounds object. */ getBounds: function () @@ -25897,7 +30571,7 @@ var SpineGameObject = new Class({ * @method SpineGameObject#preUpdate * @protected * @since 3.19.0 - * + * * @param {number} time - The current timestamp. * @param {number} delta - The delta time, in ms, elapsed since the last frame. */ @@ -25940,1111 +30614,7 @@ module.exports = SpineGameObject; /***/ }), -/* 195 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Provides methods used for calculating and setting the size of a non-Frame based Game Object. - * Should be applied as a mixin and not used directly. - * - * @namespace Phaser.GameObjects.Components.ComputedSize - * @since 3.0.0 - */ - -var ComputedSize = { - - /** - * The native (un-scaled) width of this Game Object. - * - * Changing this value will not change the size that the Game Object is rendered in-game. - * For that you need to either set the scale of the Game Object (`setScale`) or use - * the `displayWidth` property. - * - * @name Phaser.GameObjects.Components.ComputedSize#width - * @type {number} - * @since 3.0.0 - */ - width: 0, - - /** - * The native (un-scaled) height of this Game Object. - * - * Changing this value will not change the size that the Game Object is rendered in-game. - * For that you need to either set the scale of the Game Object (`setScale`) or use - * the `displayHeight` property. - * - * @name Phaser.GameObjects.Components.ComputedSize#height - * @type {number} - * @since 3.0.0 - */ - height: 0, - - /** - * The displayed width of this Game Object. - * - * This value takes into account the scale factor. - * - * Setting this value will adjust the Game Object's scale property. - * - * @name Phaser.GameObjects.Components.ComputedSize#displayWidth - * @type {number} - * @since 3.0.0 - */ - displayWidth: { - - get: function () - { - return this.scaleX * this.width; - }, - - set: function (value) - { - this.scaleX = value / this.width; - } - - }, - - /** - * The displayed height of this Game Object. - * - * This value takes into account the scale factor. - * - * Setting this value will adjust the Game Object's scale property. - * - * @name Phaser.GameObjects.Components.ComputedSize#displayHeight - * @type {number} - * @since 3.0.0 - */ - displayHeight: { - - get: function () - { - return this.scaleY * this.height; - }, - - set: function (value) - { - this.scaleY = value / this.height; - } - - }, - - /** - * Sets the internal size of this Game Object, as used for frame or physics body creation. - * - * This will not change the size that the Game Object is rendered in-game. - * For that you need to either set the scale of the Game Object (`setScale`) or call the - * `setDisplaySize` method, which is the same thing as changing the scale but allows you - * to do so by giving pixel values. - * - * If you have enabled this Game Object for input, changing the size will _not_ change the - * size of the hit area. To do this you should adjust the `input.hitArea` object directly. - * - * @method Phaser.GameObjects.Components.ComputedSize#setSize - * @since 3.4.0 - * - * @param {number} width - The width of this Game Object. - * @param {number} height - The height of this Game Object. - * - * @return {this} This Game Object instance. - */ - setSize: function (width, height) - { - this.width = width; - this.height = height; - - return this; - }, - - /** - * Sets the display size of this Game Object. - * - * Calling this will adjust the scale. - * - * @method Phaser.GameObjects.Components.ComputedSize#setDisplaySize - * @since 3.4.0 - * - * @param {number} width - The width of this Game Object. - * @param {number} height - The height of this Game Object. - * - * @return {this} This Game Object instance. - */ - setDisplaySize: function (width, height) - { - this.displayWidth = width; - this.displayHeight = height; - - return this; - } - -}; - -module.exports = ComputedSize; - - -/***/ }), -/* 196 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Provides methods used for setting the depth of a Game Object. - * Should be applied as a mixin and not used directly. - * - * @namespace Phaser.GameObjects.Components.Depth - * @since 3.0.0 - */ - -var Depth = { - - /** - * Private internal value. Holds the depth of the Game Object. - * - * @name Phaser.GameObjects.Components.Depth#_depth - * @type {integer} - * @private - * @default 0 - * @since 3.0.0 - */ - _depth: 0, - - /** - * The depth of this Game Object within the Scene. - * - * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order - * of Game Objects, without actually moving their position in the display list. - * - * The default depth is zero. A Game Object with a higher depth - * value will always render in front of one with a lower value. - * - * Setting the depth will queue a depth sort event within the Scene. - * - * @name Phaser.GameObjects.Components.Depth#depth - * @type {number} - * @since 3.0.0 - */ - depth: { - - get: function () - { - return this._depth; - }, - - set: function (value) - { - this.scene.sys.queueDepthSort(); - this._depth = value; - } - - }, - - /** - * The depth of this Game Object within the Scene. - * - * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order - * of Game Objects, without actually moving their position in the display list. - * - * The default depth is zero. A Game Object with a higher depth - * value will always render in front of one with a lower value. - * - * Setting the depth will queue a depth sort event within the Scene. - * - * @method Phaser.GameObjects.Components.Depth#setDepth - * @since 3.0.0 - * - * @param {integer} value - The depth of this Game Object. - * - * @return {this} This Game Object instance. - */ - setDepth: function (value) - { - if (value === undefined) { value = 0; } - - this.depth = value; - - return this; - } - -}; - -module.exports = Depth; - - -/***/ }), -/* 197 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Provides methods used for visually flipping a Game Object. - * Should be applied as a mixin and not used directly. - * - * @namespace Phaser.GameObjects.Components.Flip - * @since 3.0.0 - */ - -var Flip = { - - /** - * The horizontally flipped state of the Game Object. - * - * A Game Object that is flipped horizontally will render inversed on the horizontal axis. - * Flipping always takes place from the middle of the texture and does not impact the scale value. - * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - * - * @name Phaser.GameObjects.Components.Flip#flipX - * @type {boolean} - * @default false - * @since 3.0.0 - */ - flipX: false, - - /** - * The vertically flipped state of the Game Object. - * - * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) - * Flipping always takes place from the middle of the texture and does not impact the scale value. - * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - * - * @name Phaser.GameObjects.Components.Flip#flipY - * @type {boolean} - * @default false - * @since 3.0.0 - */ - flipY: false, - - /** - * Toggles the horizontal flipped state of this Game Object. - * - * A Game Object that is flipped horizontally will render inversed on the horizontal axis. - * Flipping always takes place from the middle of the texture and does not impact the scale value. - * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - * - * @method Phaser.GameObjects.Components.Flip#toggleFlipX - * @since 3.0.0 - * - * @return {this} This Game Object instance. - */ - toggleFlipX: function () - { - this.flipX = !this.flipX; - - return this; - }, - - /** - * Toggles the vertical flipped state of this Game Object. - * - * @method Phaser.GameObjects.Components.Flip#toggleFlipY - * @since 3.0.0 - * - * @return {this} This Game Object instance. - */ - toggleFlipY: function () - { - this.flipY = !this.flipY; - - return this; - }, - - /** - * Sets the horizontal flipped state of this Game Object. - * - * A Game Object that is flipped horizontally will render inversed on the horizontal axis. - * Flipping always takes place from the middle of the texture and does not impact the scale value. - * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - * - * @method Phaser.GameObjects.Components.Flip#setFlipX - * @since 3.0.0 - * - * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped. - * - * @return {this} This Game Object instance. - */ - setFlipX: function (value) - { - this.flipX = value; - - return this; - }, - - /** - * Sets the vertical flipped state of this Game Object. - * - * @method Phaser.GameObjects.Components.Flip#setFlipY - * @since 3.0.0 - * - * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped. - * - * @return {this} This Game Object instance. - */ - setFlipY: function (value) - { - this.flipY = value; - - return this; - }, - - /** - * Sets the horizontal and vertical flipped state of this Game Object. - * - * A Game Object that is flipped will render inversed on the flipped axis. - * Flipping always takes place from the middle of the texture and does not impact the scale value. - * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - * - * @method Phaser.GameObjects.Components.Flip#setFlip - * @since 3.0.0 - * - * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped. - * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped. - * - * @return {this} This Game Object instance. - */ - setFlip: function (x, y) - { - this.flipX = x; - this.flipY = y; - - return this; - }, - - /** - * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state. - * - * @method Phaser.GameObjects.Components.Flip#resetFlip - * @since 3.0.0 - * - * @return {this} This Game Object instance. - */ - resetFlip: function () - { - this.flipX = false; - this.flipY = false; - - return this; - } - -}; - -module.exports = Flip; - - -/***/ }), -/* 198 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Provides methods used for getting and setting the Scroll Factor of a Game Object. - * - * @namespace Phaser.GameObjects.Components.ScrollFactor - * @since 3.0.0 - */ - -var ScrollFactor = { - - /** - * 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. - * - * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorX - * @type {number} - * @default 1 - * @since 3.0.0 - */ - scrollFactorX: 1, - - /** - * 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. - * - * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorY - * @type {number} - * @default 1 - * @since 3.0.0 - */ - scrollFactorY: 1, - - /** - * 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. - * - * @method Phaser.GameObjects.Components.ScrollFactor#setScrollFactor - * @since 3.0.0 - * - * @param {number} x - The horizontal scroll factor of this Game Object. - * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value. - * - * @return {this} This Game Object instance. - */ - setScrollFactor: function (x, y) - { - if (y === undefined) { y = x; } - - this.scrollFactorX = x; - this.scrollFactorY = y; - - return this; - } - -}; - -module.exports = ScrollFactor; - - -/***/ }), -/* 199 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var MATH_CONST = __webpack_require__(1); -var TransformMatrix = __webpack_require__(200); -var TransformXY = __webpack_require__(28); -var WrapAngle = __webpack_require__(18); -var WrapAngleDegrees = __webpack_require__(19); -var Vector2 = __webpack_require__(3); - -// global bitmask flag for GameObject.renderMask (used by Scale) -var _FLAG = 4; // 0100 - -/** - * Provides methods used for getting and setting the position, scale and rotation of a Game Object. - * - * @namespace Phaser.GameObjects.Components.Transform - * @since 3.0.0 - */ - -var Transform = { - - /** - * Private internal value. Holds the horizontal scale value. - * - * @name Phaser.GameObjects.Components.Transform#_scaleX - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - _scaleX: 1, - - /** - * Private internal value. Holds the vertical scale value. - * - * @name Phaser.GameObjects.Components.Transform#_scaleY - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - _scaleY: 1, - - /** - * Private internal value. Holds the rotation value in radians. - * - * @name Phaser.GameObjects.Components.Transform#_rotation - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - _rotation: 0, - - /** - * The x position of this Game Object. - * - * @name Phaser.GameObjects.Components.Transform#x - * @type {number} - * @default 0 - * @since 3.0.0 - */ - x: 0, - - /** - * The y position of this Game Object. - * - * @name Phaser.GameObjects.Components.Transform#y - * @type {number} - * @default 0 - * @since 3.0.0 - */ - y: 0, - - /** - * The z position of this Game Object. - * - * Note: The z position does not control the rendering order of 2D Game Objects. Use - * {@link Phaser.GameObjects.Components.Depth#depth} instead. - * - * @name Phaser.GameObjects.Components.Transform#z - * @type {number} - * @default 0 - * @since 3.0.0 - */ - z: 0, - - /** - * The w position of this Game Object. - * - * @name Phaser.GameObjects.Components.Transform#w - * @type {number} - * @default 0 - * @since 3.0.0 - */ - w: 0, - - /** - * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object - * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`. - * - * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this - * isn't the case, use the `scaleX` or `scaleY` properties instead. - * - * @name Phaser.GameObjects.Components.Transform#scale - * @type {number} - * @default 1 - * @since 3.18.0 - */ - scale: { - - get: function () - { - return (this._scaleX + this._scaleY) / 2; - }, - - set: function (value) - { - this._scaleX = value; - this._scaleY = value; - - if (value === 0) - { - this.renderFlags &= ~_FLAG; - } - else - { - this.renderFlags |= _FLAG; - } - } - - }, - - /** - * The horizontal scale of this Game Object. - * - * @name Phaser.GameObjects.Components.Transform#scaleX - * @type {number} - * @default 1 - * @since 3.0.0 - */ - scaleX: { - - get: function () - { - return this._scaleX; - }, - - set: function (value) - { - this._scaleX = value; - - if (value === 0) - { - this.renderFlags &= ~_FLAG; - } - else - { - this.renderFlags |= _FLAG; - } - } - - }, - - /** - * The vertical scale of this Game Object. - * - * @name Phaser.GameObjects.Components.Transform#scaleY - * @type {number} - * @default 1 - * @since 3.0.0 - */ - scaleY: { - - get: function () - { - return this._scaleY; - }, - - set: function (value) - { - this._scaleY = value; - - if (value === 0) - { - this.renderFlags &= ~_FLAG; - } - else - { - this.renderFlags |= _FLAG; - } - } - - }, - - /** - * The angle of this Game Object as expressed in degrees. - * - * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left - * and -90 is up. - * - * If you prefer to work in radians, see the `rotation` property instead. - * - * @name Phaser.GameObjects.Components.Transform#angle - * @type {integer} - * @default 0 - * @since 3.0.0 - */ - angle: { - - get: function () - { - return WrapAngleDegrees(this._rotation * MATH_CONST.RAD_TO_DEG); - }, - - set: function (value) - { - // value is in degrees - this.rotation = WrapAngleDegrees(value) * MATH_CONST.DEG_TO_RAD; - } - }, - - /** - * The angle of this Game Object in radians. - * - * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left - * and -PI/2 is up. - * - * If you prefer to work in degrees, see the `angle` property instead. - * - * @name Phaser.GameObjects.Components.Transform#rotation - * @type {number} - * @default 1 - * @since 3.0.0 - */ - rotation: { - - get: function () - { - return this._rotation; - }, - - set: function (value) - { - // value is in radians - this._rotation = WrapAngle(value); - } - }, - - /** - * Sets the position of this Game Object. - * - * @method Phaser.GameObjects.Components.Transform#setPosition - * @since 3.0.0 - * - * @param {number} [x=0] - The x position of this Game Object. - * @param {number} [y=x] - The y position of this Game Object. If not set it will use the `x` value. - * @param {number} [z=0] - The z position of this Game Object. - * @param {number} [w=0] - The w position of this Game Object. - * - * @return {this} This Game Object instance. - */ - setPosition: function (x, y, z, w) - { - if (x === undefined) { x = 0; } - if (y === undefined) { y = x; } - if (z === undefined) { z = 0; } - if (w === undefined) { w = 0; } - - this.x = x; - this.y = y; - this.z = z; - this.w = w; - - return this; - }, - - /** - * Sets the position of this Game Object to be a random position within the confines of - * the given area. - * - * If no area is specified a random position between 0 x 0 and the game width x height is used instead. - * - * The position does not factor in the size of this Game Object, meaning that only the origin is - * guaranteed to be within the area. - * - * @method Phaser.GameObjects.Components.Transform#setRandomPosition - * @since 3.8.0 - * - * @param {number} [x=0] - The x position of the top-left of the random area. - * @param {number} [y=0] - The y position of the top-left of the random area. - * @param {number} [width] - The width of the random area. - * @param {number} [height] - The height of the random area. - * - * @return {this} This Game Object instance. - */ - setRandomPosition: function (x, y, width, height) - { - if (x === undefined) { x = 0; } - if (y === undefined) { y = 0; } - if (width === undefined) { width = this.scene.sys.scale.width; } - if (height === undefined) { height = this.scene.sys.scale.height; } - - this.x = x + (Math.random() * width); - this.y = y + (Math.random() * height); - - return this; - }, - - /** - * Sets the rotation of this Game Object. - * - * @method Phaser.GameObjects.Components.Transform#setRotation - * @since 3.0.0 - * - * @param {number} [radians=0] - The rotation of this Game Object, in radians. - * - * @return {this} This Game Object instance. - */ - setRotation: function (radians) - { - if (radians === undefined) { radians = 0; } - - this.rotation = radians; - - return this; - }, - - /** - * Sets the angle of this Game Object. - * - * @method Phaser.GameObjects.Components.Transform#setAngle - * @since 3.0.0 - * - * @param {number} [degrees=0] - The rotation of this Game Object, in degrees. - * - * @return {this} This Game Object instance. - */ - setAngle: function (degrees) - { - if (degrees === undefined) { degrees = 0; } - - this.angle = degrees; - - return this; - }, - - /** - * Sets the scale of this Game Object. - * - * @method Phaser.GameObjects.Components.Transform#setScale - * @since 3.0.0 - * - * @param {number} x - 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. - */ - setScale: function (x, y) - { - if (x === undefined) { x = 1; } - if (y === undefined) { y = x; } - - this.scaleX = x; - this.scaleY = y; - - return this; - }, - - /** - * Sets the x position of this Game Object. - * - * @method Phaser.GameObjects.Components.Transform#setX - * @since 3.0.0 - * - * @param {number} [value=0] - The x position of this Game Object. - * - * @return {this} This Game Object instance. - */ - setX: function (value) - { - if (value === undefined) { value = 0; } - - this.x = value; - - return this; - }, - - /** - * Sets the y position of this Game Object. - * - * @method Phaser.GameObjects.Components.Transform#setY - * @since 3.0.0 - * - * @param {number} [value=0] - The y position of this Game Object. - * - * @return {this} This Game Object instance. - */ - setY: function (value) - { - if (value === undefined) { value = 0; } - - this.y = value; - - return this; - }, - - /** - * Sets the z position of this Game Object. - * - * Note: The z position does not control the rendering order of 2D Game Objects. Use - * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. - * - * @method Phaser.GameObjects.Components.Transform#setZ - * @since 3.0.0 - * - * @param {number} [value=0] - The z position of this Game Object. - * - * @return {this} This Game Object instance. - */ - setZ: function (value) - { - if (value === undefined) { value = 0; } - - this.z = value; - - return this; - }, - - /** - * Sets the w position of this Game Object. - * - * @method Phaser.GameObjects.Components.Transform#setW - * @since 3.0.0 - * - * @param {number} [value=0] - The w position of this Game Object. - * - * @return {this} This Game Object instance. - */ - setW: function (value) - { - if (value === undefined) { value = 0; } - - this.w = value; - - return this; - }, - - /** - * Gets the local transform matrix for this Game Object. - * - * @method Phaser.GameObjects.Components.Transform#getLocalTransformMatrix - * @since 3.4.0 - * - * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object. - * - * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix. - */ - getLocalTransformMatrix: function (tempMatrix) - { - if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); } - - return tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY); - }, - - /** - * Gets the world transform matrix for this Game Object, factoring in any parent Containers. - * - * @method Phaser.GameObjects.Components.Transform#getWorldTransformMatrix - * @since 3.4.0 - * - * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object. - * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A temporary matrix to hold parent values during the calculations. - * - * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix. - */ - getWorldTransformMatrix: function (tempMatrix, parentMatrix) - { - if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); } - if (parentMatrix === undefined) { parentMatrix = new TransformMatrix(); } - - var parent = this.parentContainer; - - if (!parent) - { - return this.getLocalTransformMatrix(tempMatrix); - } - - tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY); - - while (parent) - { - parentMatrix.applyITRS(parent.x, parent.y, parent._rotation, parent._scaleX, parent._scaleY); - - parentMatrix.multiply(tempMatrix, tempMatrix); - - parent = parent.parentContainer; - } - - return tempMatrix; - }, - - /** - * Takes the given `x` and `y` coordinates and converts them into local space for this - * Game Object, taking into account parent and local transforms, and the Display Origin. - * - * The returned Vector2 contains the translated point in its properties. - * - * A Camera needs to be provided in order to handle modified scroll factors. If no - * camera is specified, it will use the `main` camera from the Scene to which this - * Game Object belongs. - * - * @method Phaser.GameObjects.Components.Transform#getLocalPoint - * @since 3.50.0 - * - * @param {number} x - The x position to translate. - * @param {number} y - The y position to translate. - * @param {Phaser.Math.Vector2} [point] - A Vector2, or point-like object, to store the results in. - * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera which is being tested against. If not given will use the Scene default camera. - * - * @return {Phaser.Math.Vector2} The translated point. - */ - getLocalPoint: function (x, y, point, camera) - { - if (!point) { point = new Vector2(); } - if (!camera) { camera = this.scene.sys.cameras.main; } - - var csx = camera.scrollX; - var csy = camera.scrollY; - - var px = x + (csx * this.scrollFactorX) - csx; - var py = y + (csy * this.scrollFactorY) - csy; - - if (this.parentContainer) - { - this.getWorldTransformMatrix().applyInverse(px, py, point); - } - else - { - TransformXY(px, py, this.x, this.y, this.rotation, this.scaleX, this.scaleY, point); - } - - // Normalize origin - if (this._originComponent) - { - point.x += this._displayOriginX; - point.y += this._displayOriginY; - } - - return point; - }, - - /** - * Gets the sum total rotation of all of this Game Objects parent Containers. - * - * The returned value is in radians and will be zero if this Game Object has no parent container. - * - * @method Phaser.GameObjects.Components.Transform#getParentRotation - * @since 3.18.0 - * - * @return {number} The sum total rotation, in radians, of all parent containers of this Game Object. - */ - getParentRotation: function () - { - var rotation = 0; - - var parent = this.parentContainer; - - while (parent) - { - rotation += parent.rotation; - - parent = parent.parentContainer; - } - - return rotation; - } - -}; - -module.exports = Transform; - - -/***/ }), -/* 200 */ +/* 219 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -27054,1915 +30624,7 @@ module.exports = Transform; */ var Class = __webpack_require__(0); -var MATH_CONST = __webpack_require__(1); -var Vector2 = __webpack_require__(3); - -/** - * @classdesc - * A Matrix used for display transformations for rendering. - * - * It is represented like so: - * - * ``` - * | a | c | tx | - * | b | d | ty | - * | 0 | 0 | 1 | - * ``` - * - * @class TransformMatrix - * @memberof Phaser.GameObjects.Components - * @constructor - * @since 3.0.0 - * - * @param {number} [a=1] - The Scale X value. - * @param {number} [b=0] - The Skew Y value. - * @param {number} [c=0] - The Skew X value. - * @param {number} [d=1] - The Scale Y value. - * @param {number} [tx=0] - The Translate X value. - * @param {number} [ty=0] - The Translate Y value. - */ -var TransformMatrix = new Class({ - - initialize: - - function TransformMatrix (a, b, c, d, tx, ty) - { - if (a === undefined) { a = 1; } - if (b === undefined) { b = 0; } - if (c === undefined) { c = 0; } - if (d === undefined) { d = 1; } - if (tx === undefined) { tx = 0; } - if (ty === undefined) { ty = 0; } - - /** - * The matrix values. - * - * @name Phaser.GameObjects.Components.TransformMatrix#matrix - * @type {Float32Array} - * @since 3.0.0 - */ - this.matrix = new Float32Array([ a, b, c, d, tx, ty, 0, 0, 1 ]); - - /** - * The decomposed matrix. - * - * @name Phaser.GameObjects.Components.TransformMatrix#decomposedMatrix - * @type {object} - * @since 3.0.0 - */ - this.decomposedMatrix = { - translateX: 0, - translateY: 0, - scaleX: 1, - scaleY: 1, - rotation: 0 - }; - }, - - /** - * The Scale X value. - * - * @name Phaser.GameObjects.Components.TransformMatrix#a - * @type {number} - * @since 3.4.0 - */ - a: { - - get: function () - { - return this.matrix[0]; - }, - - set: function (value) - { - this.matrix[0] = value; - } - - }, - - /** - * The Skew Y value. - * - * @name Phaser.GameObjects.Components.TransformMatrix#b - * @type {number} - * @since 3.4.0 - */ - b: { - - get: function () - { - return this.matrix[1]; - }, - - set: function (value) - { - this.matrix[1] = value; - } - - }, - - /** - * The Skew X value. - * - * @name Phaser.GameObjects.Components.TransformMatrix#c - * @type {number} - * @since 3.4.0 - */ - c: { - - get: function () - { - return this.matrix[2]; - }, - - set: function (value) - { - this.matrix[2] = value; - } - - }, - - /** - * The Scale Y value. - * - * @name Phaser.GameObjects.Components.TransformMatrix#d - * @type {number} - * @since 3.4.0 - */ - d: { - - get: function () - { - return this.matrix[3]; - }, - - set: function (value) - { - this.matrix[3] = value; - } - - }, - - /** - * The Translate X value. - * - * @name Phaser.GameObjects.Components.TransformMatrix#e - * @type {number} - * @since 3.11.0 - */ - e: { - - get: function () - { - return this.matrix[4]; - }, - - set: function (value) - { - this.matrix[4] = value; - } - - }, - - /** - * The Translate Y value. - * - * @name Phaser.GameObjects.Components.TransformMatrix#f - * @type {number} - * @since 3.11.0 - */ - f: { - - get: function () - { - return this.matrix[5]; - }, - - set: function (value) - { - this.matrix[5] = value; - } - - }, - - /** - * The Translate X value. - * - * @name Phaser.GameObjects.Components.TransformMatrix#tx - * @type {number} - * @since 3.4.0 - */ - tx: { - - get: function () - { - return this.matrix[4]; - }, - - set: function (value) - { - this.matrix[4] = value; - } - - }, - - /** - * The Translate Y value. - * - * @name Phaser.GameObjects.Components.TransformMatrix#ty - * @type {number} - * @since 3.4.0 - */ - ty: { - - get: function () - { - return this.matrix[5]; - }, - - set: function (value) - { - this.matrix[5] = value; - } - - }, - - /** - * The rotation of the Matrix. Value is in radians. - * - * @name Phaser.GameObjects.Components.TransformMatrix#rotation - * @type {number} - * @readonly - * @since 3.4.0 - */ - rotation: { - - get: function () - { - return Math.acos(this.a / this.scaleX) * ((Math.atan(-this.c / this.a) < 0) ? -1 : 1); - } - - }, - - /** - * The rotation of the Matrix, normalized to be within the Phaser right-handed - * clockwise rotation space. Value is in radians. - * - * @name Phaser.GameObjects.Components.TransformMatrix#rotationNormalized - * @type {number} - * @readonly - * @since 3.19.0 - */ - rotationNormalized: { - - get: function () - { - var matrix = this.matrix; - - var a = matrix[0]; - var b = matrix[1]; - var c = matrix[2]; - var d = matrix[3]; - - if (a || b) - { - // var r = Math.sqrt(a * a + b * b); - - return (b > 0) ? Math.acos(a / this.scaleX) : -Math.acos(a / this.scaleX); - } - else if (c || d) - { - // var s = Math.sqrt(c * c + d * d); - - return MATH_CONST.TAU - ((d > 0) ? Math.acos(-c / this.scaleY) : -Math.acos(c / this.scaleY)); - } - else - { - return 0; - } - } - - }, - - /** - * The decomposed horizontal scale of the Matrix. This value is always positive. - * - * @name Phaser.GameObjects.Components.TransformMatrix#scaleX - * @type {number} - * @readonly - * @since 3.4.0 - */ - scaleX: { - - get: function () - { - return Math.sqrt((this.a * this.a) + (this.b * this.b)); - } - - }, - - /** - * The decomposed vertical scale of the Matrix. This value is always positive. - * - * @name Phaser.GameObjects.Components.TransformMatrix#scaleY - * @type {number} - * @readonly - * @since 3.4.0 - */ - scaleY: { - - get: function () - { - return Math.sqrt((this.c * this.c) + (this.d * this.d)); - } - - }, - - /** - * Reset the Matrix to an identity matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#loadIdentity - * @since 3.0.0 - * - * @return {this} This TransformMatrix. - */ - loadIdentity: function () - { - var matrix = this.matrix; - - matrix[0] = 1; - matrix[1] = 0; - matrix[2] = 0; - matrix[3] = 1; - matrix[4] = 0; - matrix[5] = 0; - - return this; - }, - - /** - * Translate the Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#translate - * @since 3.0.0 - * - * @param {number} x - The horizontal translation value. - * @param {number} y - The vertical translation value. - * - * @return {this} This TransformMatrix. - */ - translate: function (x, y) - { - var matrix = this.matrix; - - matrix[4] = matrix[0] * x + matrix[2] * y + matrix[4]; - matrix[5] = matrix[1] * x + matrix[3] * y + matrix[5]; - - return this; - }, - - /** - * Scale the Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#scale - * @since 3.0.0 - * - * @param {number} x - The horizontal scale value. - * @param {number} y - The vertical scale value. - * - * @return {this} This TransformMatrix. - */ - scale: function (x, y) - { - var matrix = this.matrix; - - matrix[0] *= x; - matrix[1] *= x; - matrix[2] *= y; - matrix[3] *= y; - - return this; - }, - - /** - * Rotate the Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#rotate - * @since 3.0.0 - * - * @param {number} angle - The angle of rotation in radians. - * - * @return {this} This TransformMatrix. - */ - rotate: function (angle) - { - var sin = Math.sin(angle); - var cos = Math.cos(angle); - - var matrix = this.matrix; - - var a = matrix[0]; - var b = matrix[1]; - var c = matrix[2]; - var d = matrix[3]; - - matrix[0] = a * cos + c * sin; - matrix[1] = b * cos + d * sin; - matrix[2] = a * -sin + c * cos; - matrix[3] = b * -sin + d * cos; - - return this; - }, - - /** - * Multiply this Matrix by the given Matrix. - * - * If an `out` Matrix is given then the results will be stored in it. - * If it is not given, this matrix will be updated in place instead. - * Use an `out` Matrix if you do not wish to mutate this matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#multiply - * @since 3.0.0 - * - * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by. - * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in. - * - * @return {(this|Phaser.GameObjects.Components.TransformMatrix)} Either this TransformMatrix, or the `out` Matrix, if given in the arguments. - */ - multiply: function (rhs, out) - { - var matrix = this.matrix; - var source = rhs.matrix; - - var localA = matrix[0]; - var localB = matrix[1]; - var localC = matrix[2]; - var localD = matrix[3]; - var localE = matrix[4]; - var localF = matrix[5]; - - var sourceA = source[0]; - var sourceB = source[1]; - var sourceC = source[2]; - var sourceD = source[3]; - var sourceE = source[4]; - var sourceF = source[5]; - - var destinationMatrix = (out === undefined) ? this : out; - - destinationMatrix.a = (sourceA * localA) + (sourceB * localC); - destinationMatrix.b = (sourceA * localB) + (sourceB * localD); - destinationMatrix.c = (sourceC * localA) + (sourceD * localC); - destinationMatrix.d = (sourceC * localB) + (sourceD * localD); - destinationMatrix.e = (sourceE * localA) + (sourceF * localC) + localE; - destinationMatrix.f = (sourceE * localB) + (sourceF * localD) + localF; - - return destinationMatrix; - }, - - /** - * Multiply this Matrix by the matrix given, including the offset. - * - * The offsetX is added to the tx value: `offsetX * a + offsetY * c + tx`. - * The offsetY is added to the ty value: `offsetY * b + offsetY * d + ty`. - * - * @method Phaser.GameObjects.Components.TransformMatrix#multiplyWithOffset - * @since 3.11.0 - * - * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from. - * @param {number} offsetX - Horizontal offset to factor in to the multiplication. - * @param {number} offsetY - Vertical offset to factor in to the multiplication. - * - * @return {this} This TransformMatrix. - */ - multiplyWithOffset: function (src, offsetX, offsetY) - { - var matrix = this.matrix; - var otherMatrix = src.matrix; - - var a0 = matrix[0]; - var b0 = matrix[1]; - var c0 = matrix[2]; - var d0 = matrix[3]; - var tx0 = matrix[4]; - var ty0 = matrix[5]; - - var pse = offsetX * a0 + offsetY * c0 + tx0; - var psf = offsetX * b0 + offsetY * d0 + ty0; - - var a1 = otherMatrix[0]; - var b1 = otherMatrix[1]; - var c1 = otherMatrix[2]; - var d1 = otherMatrix[3]; - var tx1 = otherMatrix[4]; - var ty1 = otherMatrix[5]; - - matrix[0] = a1 * a0 + b1 * c0; - matrix[1] = a1 * b0 + b1 * d0; - matrix[2] = c1 * a0 + d1 * c0; - matrix[3] = c1 * b0 + d1 * d0; - matrix[4] = tx1 * a0 + ty1 * c0 + pse; - matrix[5] = tx1 * b0 + ty1 * d0 + psf; - - return this; - }, - - /** - * Transform the Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#transform - * @since 3.0.0 - * - * @param {number} a - The Scale X value. - * @param {number} b - The Shear Y value. - * @param {number} c - The Shear X value. - * @param {number} d - The Scale Y value. - * @param {number} tx - The Translate X value. - * @param {number} ty - The Translate Y value. - * - * @return {this} This TransformMatrix. - */ - transform: function (a, b, c, d, tx, ty) - { - var matrix = this.matrix; - - var a0 = matrix[0]; - var b0 = matrix[1]; - var c0 = matrix[2]; - var d0 = matrix[3]; - var tx0 = matrix[4]; - var ty0 = matrix[5]; - - matrix[0] = a * a0 + b * c0; - matrix[1] = a * b0 + b * d0; - matrix[2] = c * a0 + d * c0; - matrix[3] = c * b0 + d * d0; - matrix[4] = tx * a0 + ty * c0 + tx0; - matrix[5] = tx * b0 + ty * d0 + ty0; - - return this; - }, - - /** - * Transform a point using this Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#transformPoint - * @since 3.0.0 - * - * @param {number} x - The x coordinate of the point to transform. - * @param {number} y - The y coordinate of the point to transform. - * @param {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} point - The Point object to store the transformed coordinates. - * - * @return {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} The Point containing the transformed coordinates. - */ - transformPoint: function (x, y, point) - { - if (point === undefined) { point = { x: 0, y: 0 }; } - - var matrix = this.matrix; - - var a = matrix[0]; - var b = matrix[1]; - var c = matrix[2]; - var d = matrix[3]; - var tx = matrix[4]; - var ty = matrix[5]; - - point.x = x * a + y * c + tx; - point.y = x * b + y * d + ty; - - return point; - }, - - /** - * Invert the Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#invert - * @since 3.0.0 - * - * @return {this} This TransformMatrix. - */ - invert: function () - { - var matrix = this.matrix; - - var a = matrix[0]; - var b = matrix[1]; - var c = matrix[2]; - var d = matrix[3]; - var tx = matrix[4]; - var ty = matrix[5]; - - var n = a * d - b * c; - - matrix[0] = d / n; - matrix[1] = -b / n; - matrix[2] = -c / n; - matrix[3] = a / n; - matrix[4] = (c * ty - d * tx) / n; - matrix[5] = -(a * ty - b * tx) / n; - - return this; - }, - - /** - * Set the values of this Matrix to copy those of the matrix given. - * - * @method Phaser.GameObjects.Components.TransformMatrix#copyFrom - * @since 3.11.0 - * - * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from. - * - * @return {this} This TransformMatrix. - */ - copyFrom: function (src) - { - var matrix = this.matrix; - - matrix[0] = src.a; - matrix[1] = src.b; - matrix[2] = src.c; - matrix[3] = src.d; - matrix[4] = src.e; - matrix[5] = src.f; - - return this; - }, - - /** - * Set the values of this Matrix to copy those of the array given. - * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f. - * - * @method Phaser.GameObjects.Components.TransformMatrix#copyFromArray - * @since 3.11.0 - * - * @param {array} src - The array of values to set into this matrix. - * - * @return {this} This TransformMatrix. - */ - copyFromArray: function (src) - { - var matrix = this.matrix; - - matrix[0] = src[0]; - matrix[1] = src[1]; - matrix[2] = src[2]; - matrix[3] = src[3]; - matrix[4] = src[4]; - matrix[5] = src[5]; - - return this; - }, - - /** - * Copy the values from this Matrix to the given Canvas Rendering Context. - * This will use the Context.transform method. - * - * @method Phaser.GameObjects.Components.TransformMatrix#copyToContext - * @since 3.12.0 - * - * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to. - * - * @return {CanvasRenderingContext2D} The Canvas Rendering Context. - */ - copyToContext: function (ctx) - { - var matrix = this.matrix; - - ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); - - return ctx; - }, - - /** - * Copy the values from this Matrix to the given Canvas Rendering Context. - * This will use the Context.setTransform method. - * - * @method Phaser.GameObjects.Components.TransformMatrix#setToContext - * @since 3.12.0 - * - * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to. - * - * @return {CanvasRenderingContext2D} The Canvas Rendering Context. - */ - setToContext: function (ctx) - { - var matrix = this.matrix; - - ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); - - return ctx; - }, - - /** - * Copy the values in this Matrix to the array given. - * - * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f. - * - * @method Phaser.GameObjects.Components.TransformMatrix#copyToArray - * @since 3.12.0 - * - * @param {array} [out] - The array to copy the matrix values in to. - * - * @return {array} An array where elements 0 to 5 contain the values from this matrix. - */ - copyToArray: function (out) - { - var matrix = this.matrix; - - if (out === undefined) - { - out = [ matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5] ]; - } - else - { - out[0] = matrix[0]; - out[1] = matrix[1]; - out[2] = matrix[2]; - out[3] = matrix[3]; - out[4] = matrix[4]; - out[5] = matrix[5]; - } - - return out; - }, - - /** - * Set the values of this Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#setTransform - * @since 3.0.0 - * - * @param {number} a - The Scale X value. - * @param {number} b - The Shear Y value. - * @param {number} c - The Shear X value. - * @param {number} d - The Scale Y value. - * @param {number} tx - The Translate X value. - * @param {number} ty - The Translate Y value. - * - * @return {this} This TransformMatrix. - */ - setTransform: function (a, b, c, d, tx, ty) - { - var matrix = this.matrix; - - matrix[0] = a; - matrix[1] = b; - matrix[2] = c; - matrix[3] = d; - matrix[4] = tx; - matrix[5] = ty; - - return this; - }, - - /** - * Decompose this Matrix into its translation, scale and rotation values using QR decomposition. - * - * The result must be applied in the following order to reproduce the current matrix: - * - * translate -> rotate -> scale - * - * @method Phaser.GameObjects.Components.TransformMatrix#decomposeMatrix - * @since 3.0.0 - * - * @return {object} The decomposed Matrix. - */ - decomposeMatrix: function () - { - var decomposedMatrix = this.decomposedMatrix; - - var matrix = this.matrix; - - // a = scale X (1) - // b = shear Y (0) - // c = shear X (0) - // d = scale Y (1) - - var a = matrix[0]; - var b = matrix[1]; - var c = matrix[2]; - var d = matrix[3]; - - var determ = a * d - b * c; - - decomposedMatrix.translateX = matrix[4]; - decomposedMatrix.translateY = matrix[5]; - - if (a || b) - { - var r = Math.sqrt(a * a + b * b); - - decomposedMatrix.rotation = (b > 0) ? Math.acos(a / r) : -Math.acos(a / r); - decomposedMatrix.scaleX = r; - decomposedMatrix.scaleY = determ / r; - } - else if (c || d) - { - var s = Math.sqrt(c * c + d * d); - - decomposedMatrix.rotation = Math.PI * 0.5 - (d > 0 ? Math.acos(-c / s) : -Math.acos(c / s)); - decomposedMatrix.scaleX = determ / s; - decomposedMatrix.scaleY = s; - } - else - { - decomposedMatrix.rotation = 0; - decomposedMatrix.scaleX = 0; - decomposedMatrix.scaleY = 0; - } - - return decomposedMatrix; - }, - - /** - * Apply the identity, translate, rotate and scale operations on the Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#applyITRS - * @since 3.0.0 - * - * @param {number} x - The horizontal translation. - * @param {number} y - The vertical translation. - * @param {number} rotation - The angle of rotation in radians. - * @param {number} scaleX - The horizontal scale. - * @param {number} scaleY - The vertical scale. - * - * @return {this} This TransformMatrix. - */ - applyITRS: function (x, y, rotation, scaleX, scaleY) - { - var matrix = this.matrix; - - var radianSin = Math.sin(rotation); - var radianCos = Math.cos(rotation); - - // Translate - matrix[4] = x; - matrix[5] = y; - - // Rotate and Scale - matrix[0] = radianCos * scaleX; - matrix[1] = radianSin * scaleX; - matrix[2] = -radianSin * scaleY; - matrix[3] = radianCos * scaleY; - - return this; - }, - - /** - * Takes the `x` and `y` values and returns a new position in the `output` vector that is the inverse of - * the current matrix with its transformation applied. - * - * Can be used to translate points from world to local space. - * - * @method Phaser.GameObjects.Components.TransformMatrix#applyInverse - * @since 3.12.0 - * - * @param {number} x - The x position to translate. - * @param {number} y - The y position to translate. - * @param {Phaser.Math.Vector2} [output] - A Vector2, or point-like object, to store the results in. - * - * @return {Phaser.Math.Vector2} The coordinates, inverse-transformed through this matrix. - */ - applyInverse: function (x, y, output) - { - if (output === undefined) { output = new Vector2(); } - - var matrix = this.matrix; - - var a = matrix[0]; - var b = matrix[1]; - var c = matrix[2]; - var d = matrix[3]; - var tx = matrix[4]; - var ty = matrix[5]; - - var id = 1 / ((a * d) + (c * -b)); - - output.x = (d * id * x) + (-c * id * y) + (((ty * c) - (tx * d)) * id); - output.y = (a * id * y) + (-b * id * x) + (((-ty * a) + (tx * b)) * id); - - return output; - }, - - /** - * Returns the X component of this matrix multiplied by the given values. - * This is the same as `x * a + y * c + e`. - * - * @method Phaser.GameObjects.Components.TransformMatrix#getX - * @since 3.12.0 - * - * @param {number} x - The x value. - * @param {number} y - The y value. - * - * @return {number} The calculated x value. - */ - getX: function (x, y) - { - return x * this.a + y * this.c + this.e; - }, - - /** - * Returns the Y component of this matrix multiplied by the given values. - * This is the same as `x * b + y * d + f`. - * - * @method Phaser.GameObjects.Components.TransformMatrix#getY - * @since 3.12.0 - * - * @param {number} x - The x value. - * @param {number} y - The y value. - * - * @return {number} The calculated y value. - */ - getY: function (x, y) - { - return x * this.b + y * this.d + this.f; - }, - - /** - * Returns the X component of this matrix multiplied by the given values. - * - * This is the same as `x * a + y * c + e`, optionally passing via `Math.round`. - * - * @method Phaser.GameObjects.Components.TransformMatrix#getXRound - * @since 3.50.0 - * - * @param {number} x - The x value. - * @param {number} y - The y value. - * @param {boolean} [round=false] - Math.round the resulting value? - * - * @return {number} The calculated x value. - */ - getXRound: function (x, y, round) - { - var v = this.getX(x, y); - - if (round) - { - v = Math.round(v); - } - - return v; - }, - - /** - * Returns the Y component of this matrix multiplied by the given values. - * - * This is the same as `x * b + y * d + f`, optionally passing via `Math.round`. - * - * @method Phaser.GameObjects.Components.TransformMatrix#getYRound - * @since 3.50.0 - * - * @param {number} x - The x value. - * @param {number} y - The y value. - * @param {boolean} [round=false] - Math.round the resulting value? - * - * @return {number} The calculated y value. - */ - getYRound: function (x, y, round) - { - var v = this.getY(x, y); - - if (round) - { - v = Math.round(v); - } - - return v; - }, - - /** - * Returns a string that can be used in a CSS Transform call as a `matrix` property. - * - * @method Phaser.GameObjects.Components.TransformMatrix#getCSSMatrix - * @since 3.12.0 - * - * @return {string} A string containing the CSS Transform matrix values. - */ - getCSSMatrix: function () - { - var m = this.matrix; - - return 'matrix(' + m[0] + ',' + m[1] + ',' + m[2] + ',' + m[3] + ',' + m[4] + ',' + m[5] + ')'; - }, - - /** - * Destroys this Transform Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#destroy - * @since 3.4.0 - */ - destroy: function () - { - this.matrix = null; - this.decomposedMatrix = null; - } - -}); - -module.exports = TransformMatrix; - - -/***/ }), -/* 201 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -// bitmask flag for GameObject.renderMask -var _FLAG = 1; // 0001 - -/** - * Provides methods used for setting the visibility of a Game Object. - * Should be applied as a mixin and not used directly. - * - * @namespace Phaser.GameObjects.Components.Visible - * @since 3.0.0 - */ - -var Visible = { - - /** - * Private internal value. Holds the visible value. - * - * @name Phaser.GameObjects.Components.Visible#_visible - * @type {boolean} - * @private - * @default true - * @since 3.0.0 - */ - _visible: true, - - /** - * The visible state of the Game Object. - * - * An invisible Game Object will skip rendering, but will still process update logic. - * - * @name Phaser.GameObjects.Components.Visible#visible - * @type {boolean} - * @since 3.0.0 - */ - visible: { - - get: function () - { - return this._visible; - }, - - set: function (value) - { - if (value) - { - this._visible = true; - this.renderFlags |= _FLAG; - } - else - { - this._visible = false; - this.renderFlags &= ~_FLAG; - } - } - - }, - - /** - * Sets the visibility of this Game Object. - * - * An invisible Game Object will skip rendering, but will still process update logic. - * - * @method Phaser.GameObjects.Components.Visible#setVisible - * @since 3.0.0 - * - * @param {boolean} value - The visible state of the Game Object. - * - * @return {this} This Game Object instance. - */ - setVisible: function (value) - { - this.visible = value; - - return this; - } -}; - -module.exports = Visible; - - -/***/ }), -/* 202 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var ComponentsToJSON = __webpack_require__(203); -var DataManager = __webpack_require__(204); -var EventEmitter = __webpack_require__(210); -var Events = __webpack_require__(211); - -/** - * @classdesc - * The base class that all Game Objects extend. - * You don't create GameObjects directly and they cannot be added to the display list. - * Instead, use them as the base for your own custom classes. - * - * @class GameObject - * @memberof Phaser.GameObjects - * @extends Phaser.Events.EventEmitter - * @constructor - * @since 3.0.0 - * - * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. - * @param {string} type - A textual representation of the type of Game Object, i.e. `sprite`. - */ -var GameObject = new Class({ - - Extends: EventEmitter, - - initialize: - - function GameObject (scene, type) - { - EventEmitter.call(this); - - /** - * The Scene to which this Game Object belongs. - * Game Objects can only belong to one Scene. - * - * @name Phaser.GameObjects.GameObject#scene - * @type {Phaser.Scene} - * @protected - * @since 3.0.0 - */ - this.scene = scene; - - /** - * A textual representation of this Game Object, i.e. `sprite`. - * Used internally by Phaser but is available for your own custom classes to populate. - * - * @name Phaser.GameObjects.GameObject#type - * @type {string} - * @since 3.0.0 - */ - this.type = type; - - /** - * The current state of this Game Object. - * - * Phaser itself will never modify this value, although plugins may do so. - * - * Use this property to track the state of a Game Object during its lifetime. For example, it could change from - * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant - * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons. - * If you need to store complex data about your Game Object, look at using the Data Component instead. - * - * @name Phaser.GameObjects.GameObject#state - * @type {(integer|string)} - * @since 3.16.0 - */ - this.state = 0; - - /** - * The parent Container of this Game Object, if it has one. - * - * @name Phaser.GameObjects.GameObject#parentContainer - * @type {Phaser.GameObjects.Container} - * @since 3.4.0 - */ - this.parentContainer = null; - - /** - * The name of this Game Object. - * Empty by default and never populated by Phaser, this is left for developers to use. - * - * @name Phaser.GameObjects.GameObject#name - * @type {string} - * @default '' - * @since 3.0.0 - */ - this.name = ''; - - /** - * The active state of this Game Object. - * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it. - * An active object is one which is having its logic and internal systems updated. - * - * @name Phaser.GameObjects.GameObject#active - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.active = true; - - /** - * The Tab Index of the Game Object. - * Reserved for future use by plugins and the Input Manager. - * - * @name Phaser.GameObjects.GameObject#tabIndex - * @type {integer} - * @default -1 - * @since 3.0.0 - */ - this.tabIndex = -1; - - /** - * A Data Manager. - * It allows you to store, query and get key/value paired information specific to this Game Object. - * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`. - * - * @name Phaser.GameObjects.GameObject#data - * @type {Phaser.Data.DataManager} - * @default null - * @since 3.0.0 - */ - this.data = null; - - /** - * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not. - * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively. - * If those components are not used by your custom class then you can use this bitmask as you wish. - * - * @name Phaser.GameObjects.GameObject#renderFlags - * @type {integer} - * @default 15 - * @since 3.0.0 - */ - this.renderFlags = 15; - - /** - * A bitmask that controls if this Game Object is drawn by a Camera or not. - * Not usually set directly, instead call `Camera.ignore`, however you can - * set this property directly using the Camera.id property: - * - * @example - * this.cameraFilter |= camera.id - * - * @name Phaser.GameObjects.GameObject#cameraFilter - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.cameraFilter = 0; - - /** - * If this Game Object is enabled for input then this property will contain an InteractiveObject instance. - * Not usually set directly. Instead call `GameObject.setInteractive()`. - * - * @name Phaser.GameObjects.GameObject#input - * @type {?Phaser.Types.Input.InteractiveObject} - * @default null - * @since 3.0.0 - */ - this.input = null; - - /** - * If this Game Object is enabled for Arcade or Matter Physics then this property will contain a reference to a Physics Body. - * - * @name Phaser.GameObjects.GameObject#body - * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|MatterJS.BodyType)} - * @default null - * @since 3.0.0 - */ - this.body = null; - - /** - * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`. - * This includes calls that may come from a Group, Container or the Scene itself. - * While it allows you to persist a Game Object across Scenes, please understand you are entirely - * responsible for managing references to and from this Game Object. - * - * @name Phaser.GameObjects.GameObject#ignoreDestroy - * @type {boolean} - * @default false - * @since 3.5.0 - */ - this.ignoreDestroy = false; - - // Tell the Scene to re-sort the children - scene.sys.queueDepthSort(); - }, - - /** - * Sets the `active` property of this Game Object and returns this Game Object for further chaining. - * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList. - * - * @method Phaser.GameObjects.GameObject#setActive - * @since 3.0.0 - * - * @param {boolean} value - True if this Game Object should be set as active, false if not. - * - * @return {this} This GameObject. - */ - setActive: function (value) - { - this.active = value; - - return this; - }, - - /** - * Sets the `name` property of this Game Object and returns this Game Object for further chaining. - * The `name` property is not populated by Phaser and is presented for your own use. - * - * @method Phaser.GameObjects.GameObject#setName - * @since 3.0.0 - * - * @param {string} value - The name to be given to this Game Object. - * - * @return {this} This GameObject. - */ - setName: function (value) - { - this.name = value; - - return this; - }, - - /** - * Sets the current state of this Game Object. - * - * Phaser itself will never modify the State of a Game Object, although plugins may do so. - * - * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'. - * The state value should typically be an integer (ideally mapped to a constant - * in your game code), but could also be a string. It is recommended to keep it light and simple. - * If you need to store complex data about your Game Object, look at using the Data Component instead. - * - * @method Phaser.GameObjects.GameObject#setState - * @since 3.16.0 - * - * @param {(integer|string)} value - The state of the Game Object. - * - * @return {this} This GameObject. - */ - setState: function (value) - { - this.state = value; - - return this; - }, - - /** - * Adds a Data Manager component to this Game Object. - * - * @method Phaser.GameObjects.GameObject#setDataEnabled - * @since 3.0.0 - * @see Phaser.Data.DataManager - * - * @return {this} This GameObject. - */ - setDataEnabled: function () - { - if (!this.data) - { - this.data = new DataManager(this); - } - - return this; - }, - - /** - * Allows you to store a key value pair within this Game Objects Data Manager. - * - * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled - * before setting the value. - * - * If the key doesn't already exist in the Data Manager then it is created. - * - * ```javascript - * sprite.setData('name', 'Red Gem Stone'); - * ``` - * - * You can also pass in an object of key value pairs as the first argument: - * - * ```javascript - * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 }); - * ``` - * - * To get a value back again you can call `getData`: - * - * ```javascript - * sprite.getData('gold'); - * ``` - * - * Or you can access the value directly via the `values` property, where it works like any other variable: - * - * ```javascript - * sprite.data.values.gold += 50; - * ``` - * - * When the value is first set, a `setdata` event is emitted from this Game Object. - * - * If the key already exists, a `changedata` event is emitted instead, along an event named after the key. - * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`. - * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter. - * - * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings. - * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager. - * - * @method Phaser.GameObjects.GameObject#setData - * @since 3.0.0 - * - * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored. - * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored. - * - * @return {this} This GameObject. - */ - setData: function (key, value) - { - if (!this.data) - { - this.data = new DataManager(this); - } - - this.data.set(key, value); - - return this; - }, - - /** - * Increase a value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is increased from 0. - * - * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled - * before setting the value. - * - * If the key doesn't already exist in the Data Manager then it is created. - * - * When the value is first set, a `setdata` event is emitted from this Game Object. - * - * @method Phaser.GameObjects.GameObject#incData - * @since 3.23.0 - * - * @param {(string|object)} key - The key to increase the value for. - * @param {*} [data] - The value to increase for the given key. - * - * @return {this} This GameObject. - */ - incData: function (key, value) - { - if (!this.data) - { - this.data = new DataManager(this); - } - - this.data.inc(key, value); - - return this; - }, - - /** - * Toggle a boolean value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is toggled from false. - * - * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled - * before setting the value. - * - * If the key doesn't already exist in the Data Manager then it is created. - * - * When the value is first set, a `setdata` event is emitted from this Game Object. - * - * @method Phaser.GameObjects.GameObject#toggleData - * @since 3.23.0 - * - * @param {(string|object)} key - The key to toggle the value for. - * - * @return {this} This GameObject. - */ - toggleData: function (key) - { - if (!this.data) - { - this.data = new DataManager(this); - } - - this.data.toggle(key); - - return this; - }, - - /** - * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist. - * - * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either: - * - * ```javascript - * sprite.getData('gold'); - * ``` - * - * Or access the value directly: - * - * ```javascript - * sprite.data.values.gold; - * ``` - * - * You can also pass in an array of keys, in which case an array of values will be returned: - * - * ```javascript - * sprite.getData([ 'gold', 'armor', 'health' ]); - * ``` - * - * This approach is useful for destructuring arrays in ES6. - * - * @method Phaser.GameObjects.GameObject#getData - * @since 3.0.0 - * - * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys. - * - * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array. - */ - getData: function (key) - { - if (!this.data) - { - this.data = new DataManager(this); - } - - return this.data.get(key); - }, - - /** - * Pass this Game Object to the Input Manager to enable it for Input. - * - * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area - * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced - * input detection. - * - * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If - * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific - * shape for it to use. - * - * You can also provide an Input Configuration Object as the only argument to this method. - * - * @example - * sprite.setInteractive(); - * - * @example - * sprite.setInteractive(new Phaser.Geom.Circle(45, 46, 45), Phaser.Geom.Circle.Contains); - * - * @example - * graphics.setInteractive(new Phaser.Geom.Rectangle(0, 0, 128, 128), Phaser.Geom.Rectangle.Contains); - * - * @method Phaser.GameObjects.GameObject#setInteractive - * @since 3.0.0 - * - * @param {(Phaser.Types.Input.InputConfiguration|any)} [hitArea] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not given it will try to create a Rectangle based on the texture frame. - * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The callback that determines if the pointer is within the Hit Area shape or not. If you provide a shape you must also provide a callback. - * @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target? - * - * @return {this} This GameObject. - */ - setInteractive: function (hitArea, hitAreaCallback, dropZone) - { - this.scene.sys.input.enable(this, hitArea, hitAreaCallback, dropZone); - - return this; - }, - - /** - * If this Game Object has previously been enabled for input, this will disable it. - * - * An object that is disabled for input stops processing or being considered for - * input events, but can be turned back on again at any time by simply calling - * `setInteractive()` with no arguments provided. - * - * If want to completely remove interaction from this Game Object then use `removeInteractive` instead. - * - * @method Phaser.GameObjects.GameObject#disableInteractive - * @since 3.7.0 - * - * @return {this} This GameObject. - */ - disableInteractive: function () - { - if (this.input) - { - this.input.enabled = false; - } - - return this; - }, - - /** - * If this Game Object has previously been enabled for input, this will queue it - * for removal, causing it to no longer be interactive. The removal happens on - * the next game step, it is not immediate. - * - * The Interactive Object that was assigned to this Game Object will be destroyed, - * removed from the Input Manager and cleared from this Game Object. - * - * If you wish to re-enable this Game Object at a later date you will need to - * re-create its InteractiveObject by calling `setInteractive` again. - * - * If you wish to only temporarily stop an object from receiving input then use - * `disableInteractive` instead, as that toggles the interactive state, where-as - * this erases it completely. - * - * If you wish to resize a hit area, don't remove and then set it as being - * interactive. Instead, access the hitarea object directly and resize the shape - * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the - * shape is a Rectangle, which it is by default.) - * - * @method Phaser.GameObjects.GameObject#removeInteractive - * @since 3.7.0 - * - * @return {this} This GameObject. - */ - removeInteractive: function () - { - this.scene.sys.input.clear(this); - - this.input = undefined; - - return this; - }, - - /** - * This callback is invoked when this Game Object is added to a Scene. - * - * Can be overriden by custom Game Objects, but be aware of some Game Objects that - * will use this, such as Sprites, to add themselves into the Update List. - * - * You can also listen for the `ADDED_TO_SCENE` event from this Game Object. - * - * @method Phaser.GameObjects.GameObject#addedToScene - * @since 3.50.0 - */ - addedToScene: function () - { - }, - - /** - * This callback is invoked when this Game Object is removed from a Scene. - * - * Can be overriden by custom Game Objects, but be aware of some Game Objects that - * will use this, such as Sprites, to removed themselves from the Update List. - * - * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object. - * - * @method Phaser.GameObjects.GameObject#removedFromScene - * @since 3.50.0 - */ - removedFromScene: function () - { - }, - - /** - * To be overridden by custom GameObjects. Allows base objects to be used in a Pool. - * - * @method Phaser.GameObjects.GameObject#update - * @since 3.0.0 - * - * @param {...*} [args] - args - */ - update: function () - { - }, - - /** - * Returns a JSON representation of the Game Object. - * - * @method Phaser.GameObjects.GameObject#toJSON - * @since 3.0.0 - * - * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object. - */ - toJSON: function () - { - return ComponentsToJSON(this); - }, - - /** - * Compares the renderMask with the renderFlags to see if this Game Object will render or not. - * Also checks the Game Object against the given Cameras exclusion list. - * - * @method Phaser.GameObjects.GameObject#willRender - * @since 3.0.0 - * - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to check against this Game Object. - * - * @return {boolean} True if the Game Object should be rendered, otherwise false. - */ - willRender: function (camera) - { - return !(GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id))); - }, - - /** - * Returns an array containing the display list index of either this Game Object, or if it has one, - * its parent Container. It then iterates up through all of the parent containers until it hits the - * root of the display list (which is index 0 in the returned array). - * - * Used internally by the InputPlugin but also useful if you wish to find out the display depth of - * this Game Object and all of its ancestors. - * - * @method Phaser.GameObjects.GameObject#getIndexList - * @since 3.4.0 - * - * @return {integer[]} An array of display list position indexes. - */ - getIndexList: function () - { - // eslint-disable-next-line consistent-this - var child = this; - var parent = this.parentContainer; - - var indexes = []; - - while (parent) - { - // indexes.unshift([parent.getIndex(child), parent.name]); - indexes.unshift(parent.getIndex(child)); - - child = parent; - - if (!parent.parentContainer) - { - break; - } - else - { - parent = parent.parentContainer; - } - } - - // indexes.unshift([this.scene.sys.displayList.getIndex(child), 'root']); - indexes.unshift(this.scene.sys.displayList.getIndex(child)); - - return indexes; - }, - - /** - * Destroys this Game Object removing it from the Display List and Update List and - * severing all ties to parent resources. - * - * Also removes itself from the Input Manager and Physics Manager if previously enabled. - * - * Use this to remove a Game Object from your game if you don't ever plan to use it again. - * As long as no reference to it exists within your own code it should become free for - * garbage collection by the browser. - * - * If you just want to temporarily disable an object then look at using the - * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected. - * - * @method Phaser.GameObjects.GameObject#destroy - * @fires Phaser.GameObjects.Events#DESTROY - * @since 3.0.0 - * - * @param {boolean} [fromScene=false] - Is this Game Object being destroyed as the result of a Scene shutdown? - */ - destroy: function (fromScene) - { - if (fromScene === undefined) { fromScene = false; } - - // This Game Object has already been destroyed - if (!this.scene || this.ignoreDestroy) - { - return; - } - - if (this.preDestroy) - { - this.preDestroy.call(this); - } - - this.emit(Events.DESTROY, this); - - var sys = this.scene.sys; - - if (!fromScene) - { - sys.displayList.remove(this); - } - - if (this.input) - { - sys.input.clear(this); - this.input = undefined; - } - - if (this.data) - { - this.data.destroy(); - - this.data = undefined; - } - - if (this.body) - { - this.body.destroy(); - this.body = undefined; - } - - // Tell the Scene to re-sort the children - if (!fromScene) - { - sys.queueDepthSort(); - } - - this.active = false; - this.visible = false; - - this.scene = undefined; - - this.parentContainer = undefined; - - this.removeAllListeners(); - } - -}); - -/** - * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not. - * - * @constant {integer} RENDER_MASK - * @memberof Phaser.GameObjects.GameObject - * @default - */ -GameObject.RENDER_MASK = 15; - -module.exports = GameObject; - - -/***/ }), -/* 203 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Build a JSON representation of the given Game Object. - * - * This is typically extended further by Game Object specific implementations. - * - * @method Phaser.GameObjects.Components.ToJSON - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to export as JSON. - * - * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object. - */ -var ToJSON = function (gameObject) -{ - var out = { - name: gameObject.name, - type: gameObject.type, - x: gameObject.x, - y: gameObject.y, - depth: gameObject.depth, - scale: { - x: gameObject.scaleX, - y: gameObject.scaleY - }, - origin: { - x: gameObject.originX, - y: gameObject.originY - }, - flipX: gameObject.flipX, - flipY: gameObject.flipY, - rotation: gameObject.rotation, - alpha: gameObject.alpha, - visible: gameObject.visible, - blendMode: gameObject.blendMode, - textureKey: '', - frameKey: '', - data: {} - }; - - if (gameObject.texture) - { - out.textureKey = gameObject.texture.key; - out.frameKey = gameObject.frame.name; - } - - return out; -}; - -module.exports = ToJSON; - - -/***/ }), -/* 204 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var Events = __webpack_require__(205); +var Events = __webpack_require__(220); /** * @callback DataEachCallback @@ -29659,7 +31321,7 @@ module.exports = DataManager; /***/ }), -/* 205 */ +/* 220 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29674,16 +31336,16 @@ module.exports = DataManager; module.exports = { - CHANGE_DATA: __webpack_require__(206), - CHANGE_DATA_KEY: __webpack_require__(207), - REMOVE_DATA: __webpack_require__(208), - SET_DATA: __webpack_require__(209) + CHANGE_DATA: __webpack_require__(221), + CHANGE_DATA_KEY: __webpack_require__(222), + REMOVE_DATA: __webpack_require__(223), + SET_DATA: __webpack_require__(224) }; /***/ }), -/* 206 */ +/* 221 */ /***/ (function(module, exports) { /** @@ -29715,7 +31377,7 @@ module.exports = 'changedata'; /***/ }), -/* 207 */ +/* 222 */ /***/ (function(module, exports) { /** @@ -29745,7 +31407,7 @@ module.exports = 'changedata-'; /***/ }), -/* 208 */ +/* 223 */ /***/ (function(module, exports) { /** @@ -29773,7 +31435,7 @@ module.exports = 'removedata'; /***/ }), -/* 209 */ +/* 224 */ /***/ (function(module, exports) { /** @@ -29801,383 +31463,7 @@ module.exports = 'setdata'; /***/ }), -/* 210 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var has = Object.prototype.hasOwnProperty - , prefix = '~'; - -/** - * Constructor to create a storage for our `EE` objects. - * An `Events` instance is a plain object whose properties are event names. - * - * @constructor - * @private - */ -function Events() {} - -// -// We try to not inherit from `Object.prototype`. In some engines creating an -// instance in this way is faster than calling `Object.create(null)` directly. -// If `Object.create(null)` is not supported we prefix the event names with a -// character to make sure that the built-in object properties are not -// overridden or used as an attack vector. -// -if (Object.create) { - Events.prototype = Object.create(null); - - // - // This hack is needed because the `__proto__` property is still inherited in - // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5. - // - if (!new Events().__proto__) prefix = false; -} - -/** - * Representation of a single event listener. - * - * @param {Function} fn The listener function. - * @param {*} context The context to invoke the listener with. - * @param {Boolean} [once=false] Specify if the listener is a one-time listener. - * @constructor - * @private - */ -function EE(fn, context, once) { - this.fn = fn; - this.context = context; - this.once = once || false; -} - -/** - * Add a listener for a given event. - * - * @param {EventEmitter} emitter Reference to the `EventEmitter` instance. - * @param {(String|Symbol)} event The event name. - * @param {Function} fn The listener function. - * @param {*} context The context to invoke the listener with. - * @param {Boolean} once Specify if the listener is a one-time listener. - * @returns {EventEmitter} - * @private - */ -function addListener(emitter, event, fn, context, once) { - if (typeof fn !== 'function') { - throw new TypeError('The listener must be a function'); - } - - var listener = new EE(fn, context || emitter, once) - , evt = prefix ? prefix + event : event; - - if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++; - else if (!emitter._events[evt].fn) emitter._events[evt].push(listener); - else emitter._events[evt] = [emitter._events[evt], listener]; - - return emitter; -} - -/** - * Clear event by name. - * - * @param {EventEmitter} emitter Reference to the `EventEmitter` instance. - * @param {(String|Symbol)} evt The Event name. - * @private - */ -function clearEvent(emitter, evt) { - if (--emitter._eventsCount === 0) emitter._events = new Events(); - else delete emitter._events[evt]; -} - -/** - * Minimal `EventEmitter` interface that is molded against the Node.js - * `EventEmitter` interface. - * - * @constructor - * @public - */ -function EventEmitter() { - this._events = new Events(); - this._eventsCount = 0; -} - -/** - * Return an array listing the events for which the emitter has registered - * listeners. - * - * @returns {Array} - * @public - */ -EventEmitter.prototype.eventNames = function eventNames() { - var names = [] - , events - , name; - - if (this._eventsCount === 0) return names; - - for (name in (events = this._events)) { - if (has.call(events, name)) names.push(prefix ? name.slice(1) : name); - } - - if (Object.getOwnPropertySymbols) { - return names.concat(Object.getOwnPropertySymbols(events)); - } - - return names; -}; - -/** - * Return the listeners registered for a given event. - * - * @param {(String|Symbol)} event The event name. - * @returns {Array} The registered listeners. - * @public - */ -EventEmitter.prototype.listeners = function listeners(event) { - var evt = prefix ? prefix + event : event - , handlers = this._events[evt]; - - if (!handlers) return []; - if (handlers.fn) return [handlers.fn]; - - for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) { - ee[i] = handlers[i].fn; - } - - return ee; -}; - -/** - * Return the number of listeners listening to a given event. - * - * @param {(String|Symbol)} event The event name. - * @returns {Number} The number of listeners. - * @public - */ -EventEmitter.prototype.listenerCount = function listenerCount(event) { - var evt = prefix ? prefix + event : event - , listeners = this._events[evt]; - - if (!listeners) return 0; - if (listeners.fn) return 1; - return listeners.length; -}; - -/** - * Calls each of the listeners registered for a given event. - * - * @param {(String|Symbol)} event The event name. - * @returns {Boolean} `true` if the event had listeners, else `false`. - * @public - */ -EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) { - var evt = prefix ? prefix + event : event; - - if (!this._events[evt]) return false; - - var listeners = this._events[evt] - , len = arguments.length - , args - , i; - - if (listeners.fn) { - if (listeners.once) this.removeListener(event, listeners.fn, undefined, true); - - switch (len) { - case 1: return listeners.fn.call(listeners.context), true; - case 2: return listeners.fn.call(listeners.context, a1), true; - case 3: return listeners.fn.call(listeners.context, a1, a2), true; - case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true; - case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true; - case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true; - } - - for (i = 1, args = new Array(len -1); i < len; i++) { - args[i - 1] = arguments[i]; - } - - listeners.fn.apply(listeners.context, args); - } else { - var length = listeners.length - , j; - - for (i = 0; i < length; i++) { - if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true); - - switch (len) { - case 1: listeners[i].fn.call(listeners[i].context); break; - case 2: listeners[i].fn.call(listeners[i].context, a1); break; - case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break; - case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break; - default: - if (!args) for (j = 1, args = new Array(len -1); j < len; j++) { - args[j - 1] = arguments[j]; - } - - listeners[i].fn.apply(listeners[i].context, args); - } - } - } - - return true; -}; - -/** - * Add a listener for a given event. - * - * @param {(String|Symbol)} event The event name. - * @param {Function} fn The listener function. - * @param {*} [context=this] The context to invoke the listener with. - * @returns {EventEmitter} `this`. - * @public - */ -EventEmitter.prototype.on = function on(event, fn, context) { - return addListener(this, event, fn, context, false); -}; - -/** - * Add a one-time listener for a given event. - * - * @param {(String|Symbol)} event The event name. - * @param {Function} fn The listener function. - * @param {*} [context=this] The context to invoke the listener with. - * @returns {EventEmitter} `this`. - * @public - */ -EventEmitter.prototype.once = function once(event, fn, context) { - return addListener(this, event, fn, context, true); -}; - -/** - * Remove the listeners of a given event. - * - * @param {(String|Symbol)} event The event name. - * @param {Function} fn Only remove the listeners that match this function. - * @param {*} context Only remove the listeners that have this context. - * @param {Boolean} once Only remove one-time listeners. - * @returns {EventEmitter} `this`. - * @public - */ -EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) { - var evt = prefix ? prefix + event : event; - - if (!this._events[evt]) return this; - if (!fn) { - clearEvent(this, evt); - return this; - } - - var listeners = this._events[evt]; - - if (listeners.fn) { - if ( - listeners.fn === fn && - (!once || listeners.once) && - (!context || listeners.context === context) - ) { - clearEvent(this, evt); - } - } else { - for (var i = 0, events = [], length = listeners.length; i < length; i++) { - if ( - listeners[i].fn !== fn || - (once && !listeners[i].once) || - (context && listeners[i].context !== context) - ) { - events.push(listeners[i]); - } - } - - // - // Reset the array, or remove it completely if we have no more listeners. - // - if (events.length) this._events[evt] = events.length === 1 ? events[0] : events; - else clearEvent(this, evt); - } - - return this; -}; - -/** - * Remove all listeners, or those of the specified event. - * - * @param {(String|Symbol)} [event] The event name. - * @returns {EventEmitter} `this`. - * @public - */ -EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) { - var evt; - - if (event) { - evt = prefix ? prefix + event : event; - if (this._events[evt]) clearEvent(this, evt); - } else { - this._events = new Events(); - this._eventsCount = 0; - } - - return this; -}; - -// -// Alias methods names because people roll like that. -// -EventEmitter.prototype.off = EventEmitter.prototype.removeListener; -EventEmitter.prototype.addListener = EventEmitter.prototype.on; - -// -// Expose the prefix. -// -EventEmitter.prefixed = prefix; - -// -// Allow `EventEmitter` to be imported as module namespace. -// -EventEmitter.EventEmitter = EventEmitter; - -// -// Expose the module. -// -if (true) { - module.exports = EventEmitter; -} - - -/***/ }), -/* 211 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.GameObjects.Events - */ - -module.exports = { - - ADDED_TO_SCENE: __webpack_require__(212), - DESTROY: __webpack_require__(213), - REMOVED_FROM_SCENE: __webpack_require__(214), - VIDEO_COMPLETE: __webpack_require__(215), - VIDEO_CREATED: __webpack_require__(216), - VIDEO_ERROR: __webpack_require__(217), - VIDEO_LOOP: __webpack_require__(218), - VIDEO_PLAY: __webpack_require__(219), - VIDEO_SEEKED: __webpack_require__(220), - VIDEO_SEEKING: __webpack_require__(221), - VIDEO_STOP: __webpack_require__(222), - VIDEO_TIMEOUT: __webpack_require__(223), - VIDEO_UNLOCKED: __webpack_require__(224) - -}; - - -/***/ }), -/* 212 */ +/* 225 */ /***/ (function(module, exports) { /** @@ -30203,7 +31489,7 @@ module.exports = 'addedtoscene'; /***/ }), -/* 213 */ +/* 226 */ /***/ (function(module, exports) { /** @@ -30228,7 +31514,7 @@ module.exports = 'destroy'; /***/ }), -/* 214 */ +/* 227 */ /***/ (function(module, exports) { /** @@ -30254,7 +31540,7 @@ module.exports = 'removedfromscene'; /***/ }), -/* 215 */ +/* 228 */ /***/ (function(module, exports) { /** @@ -30286,7 +31572,7 @@ module.exports = 'complete'; /***/ }), -/* 216 */ +/* 229 */ /***/ (function(module, exports) { /** @@ -30315,7 +31601,7 @@ module.exports = 'created'; /***/ }), -/* 217 */ +/* 230 */ /***/ (function(module, exports) { /** @@ -30341,7 +31627,7 @@ module.exports = 'error'; /***/ }), -/* 218 */ +/* 231 */ /***/ (function(module, exports) { /** @@ -30373,7 +31659,7 @@ module.exports = 'loop'; /***/ }), -/* 219 */ +/* 232 */ /***/ (function(module, exports) { /** @@ -30401,7 +31687,7 @@ module.exports = 'play'; /***/ }), -/* 220 */ +/* 233 */ /***/ (function(module, exports) { /** @@ -30426,7 +31712,7 @@ module.exports = 'seeked'; /***/ }), -/* 221 */ +/* 234 */ /***/ (function(module, exports) { /** @@ -30452,7 +31738,7 @@ module.exports = 'seeking'; /***/ }), -/* 222 */ +/* 235 */ /***/ (function(module, exports) { /** @@ -30478,7 +31764,7 @@ module.exports = 'stop'; /***/ }), -/* 223 */ +/* 236 */ /***/ (function(module, exports) { /** @@ -30504,7 +31790,7 @@ module.exports = 'timeout'; /***/ }), -/* 224 */ +/* 237 */ /***/ (function(module, exports) { /** @@ -30530,12 +31816,12 @@ module.exports = 'unlocked'; /***/ }), -/* 225 */ +/* 238 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30545,23 +31831,23 @@ module.exports = 'unlocked'; module.exports = { - COMPLETE: __webpack_require__(226), - DISPOSE: __webpack_require__(227), - END: __webpack_require__(228), - EVENT: __webpack_require__(229), - INTERRUPTED: __webpack_require__(230), - START: __webpack_require__(231) + COMPLETE: __webpack_require__(239), + DISPOSE: __webpack_require__(240), + END: __webpack_require__(241), + EVENT: __webpack_require__(242), + INTERRUPTED: __webpack_require__(243), + START: __webpack_require__(244) }; /***/ }), -/* 226 */ +/* 239 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30575,12 +31861,12 @@ module.exports = 'complete'; /***/ }), -/* 227 */ +/* 240 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30594,12 +31880,12 @@ module.exports = 'dispose'; /***/ }), -/* 228 */ +/* 241 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30613,12 +31899,12 @@ module.exports = 'end'; /***/ }), -/* 229 */ +/* 242 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30632,12 +31918,12 @@ module.exports = 'event'; /***/ }), -/* 230 */ +/* 243 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30651,12 +31937,12 @@ module.exports = 'interrupted'; /***/ }), -/* 231 */ +/* 244 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30670,24 +31956,24 @@ module.exports = 'start'; /***/ }), -/* 232 */ +/* 245 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var renderWebGL = __webpack_require__(34); -var renderCanvas = __webpack_require__(34); +var renderWebGL = __webpack_require__(3); +var renderCanvas = __webpack_require__(3); if (false) {} if (true) { - renderCanvas = __webpack_require__(233); + renderCanvas = __webpack_require__(246); } module.exports = { @@ -30699,18 +31985,18 @@ module.exports = { /***/ }), -/* 233 */ +/* 246 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CounterClockwise = __webpack_require__(7); -var RadToDeg = __webpack_require__(10); -var Wrap = __webpack_require__(5); +var CounterClockwise = __webpack_require__(15); +var RadToDeg = __webpack_require__(18); +var Wrap = __webpack_require__(10); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -30829,5 +32115,11486 @@ var SpineGameObjectCanvasRenderer = function (renderer, src, interpolationPercen module.exports = SpineGameObjectCanvasRenderer; +/***/ }), +/* 247 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Class = __webpack_require__(0); +var Container = __webpack_require__(248); +var SpineContainerRender = __webpack_require__(353); + +/** + * @classdesc + * A Spine Container is a special kind of Container created specifically for Spine Game Objects. + * + * You have all of the same features of a standard Container, but the rendering functions are optimized specifically + * for Spine Game Objects. You cannot mix and match Spine Game Objects with regular Game Objects inside of this + * type of Container, however. + * + * To create one in a Scene, use the factory methods: + * + * ```javascript + * this.add.spinecontainer(); + * ``` + * + * or + * + * ```javascript + * this.make.spinecontainer(); + * ``` + * + * See the Container documentation for further details. + * + * @class SpineContainer + * @extends Phaser.GameObjects.Container + * @constructor + * @since 3.50.0 + * + * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to. + * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin. + * @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 {SpineGameObject[]} [children] - An optional array of Spine Game Objects to add to this Container. + */ +var SpineContainer = new Class({ + + Extends: Container, + + Mixins: [ + SpineContainerRender + ], + + initialize: + + function SpineContainer (scene, plugin, x, y, children) + { + Container.call(this, scene, x, y, children); + + // Same as SpineGameObject, to prevent the renderer from mis-typing it when batching + this.type = 'Spine'; + + /** + * A reference to the Spine Plugin. + * + * @name SpineGameObject#plugin + * @type {SpinePlugin} + * @since 3.19.0 + */ + this.plugin = plugin; + } + +}); + +module.exports = SpineContainer; + + +/***/ }), +/* 248 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var ArrayUtils = __webpack_require__(249); +var BlendModes = __webpack_require__(14); +var Class = __webpack_require__(0); +var Components = __webpack_require__(285); +var Events = __webpack_require__(22); +var GameObject = __webpack_require__(53); +var GameObjectEvents = __webpack_require__(22); +var Rectangle = __webpack_require__(24); +var Render = __webpack_require__(350); +var Union = __webpack_require__(352); +var Vector2 = __webpack_require__(1); + +/** + * @classdesc + * A Container Game Object. + * + * A Container, as the name implies, can 'contain' other types of Game Object. + * When a Game Object is added to a Container, the Container becomes responsible for the rendering of it. + * By default it will be removed from the Display List and instead added to the Containers own internal list. + * + * The position of the Game Object automatically becomes relative to the position of the Container. + * + * The origin of a Container is 0x0 (in local space) and that cannot be changed. The children you add to the + * Container should be positioned with this value in mind. I.e. you should treat 0x0 as being the center of + * the Container, and position children positively and negative around it as required. + * + * When the Container is rendered, all of its children are rendered as well, in the order in which they exist + * within the Container. Container children can be repositioned using methods such as `MoveUp`, `MoveDown` and `SendToBack`. + * + * If you modify a transform property of the Container, such as `Container.x` or `Container.rotation` then it will + * automatically influence all children as well. + * + * Containers can include other Containers for deeply nested transforms. + * + * Containers can have masks set on them and can be used as a mask too. However, Container children cannot be masked. + * The masks do not 'stack up'. Only a Container on the root of the display list will use its mask. + * + * Containers can be enabled for input. Because they do not have a texture you need to provide a shape for them + * to use as their hit area. Container children can also be enabled for input, independent of the Container. + * + * Containers can be given a physics body for either Arcade Physics, Impact Physics or Matter Physics. However, + * if Container _children_ are enabled for physics you may get unexpected results, such as offset bodies, + * if the Container itself, or any of its ancestors, is positioned anywhere other than at 0 x 0. Container children + * with physics do not factor in the Container due to the excessive extra calculations needed. Please structure + * your game to work around this. + * + * It's important to understand the impact of using Containers. They add additional processing overhead into + * every one of their children. The deeper you nest them, the more the cost escalates. This is especially true + * for input events. You also loose the ability to set the display depth of Container children in the same + * flexible manner as those not within them. In short, don't use them for the sake of it. You pay a small cost + * every time you create one, try to structure your game around avoiding that where possible. + * + * @class Container + * @extends Phaser.GameObjects.GameObject + * @memberof Phaser.GameObjects + * @constructor + * @since 3.4.0 + * + * @extends Phaser.GameObjects.Components.AlphaSingle + * @extends Phaser.GameObjects.Components.BlendMode + * @extends Phaser.GameObjects.Components.ComputedSize + * @extends Phaser.GameObjects.Components.Depth + * @extends Phaser.GameObjects.Components.Mask + * @extends Phaser.GameObjects.Components.Transform + * @extends Phaser.GameObjects.Components.Visible + * + * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time. + * @param {number} [x=0] - The horizontal position of this Game Object in the world. + * @param {number} [y=0] - The vertical position of this Game Object in the world. + * @param {Phaser.GameObjects.GameObject[]} [children] - An optional array of Game Objects to add to this Container. + */ +var Container = new Class({ + + Extends: GameObject, + + Mixins: [ + Components.AlphaSingle, + Components.BlendMode, + Components.ComputedSize, + Components.Depth, + Components.Mask, + Components.Transform, + Components.Visible, + Render + ], + + initialize: + + function Container (scene, x, y, children) + { + GameObject.call(this, scene, 'Container'); + + /** + * An array holding the children of this Container. + * + * @name Phaser.GameObjects.Container#list + * @type {Phaser.GameObjects.GameObject[]} + * @since 3.4.0 + */ + this.list = []; + + /** + * Does this Container exclusively manage its children? + * + * The default is `true` which means a child added to this Container cannot + * belong in another Container, which includes the Scene display list. + * + * If you disable this then this Container will no longer exclusively manage its children. + * This allows you to create all kinds of interesting graphical effects, such as replicating + * Game Objects without reparenting them all over the Scene. + * However, doing so will prevent children from receiving any kind of input event or have + * their physics bodies work by default, as they're no longer a single entity on the + * display list, but are being replicated where-ever this Container is. + * + * @name Phaser.GameObjects.Container#exclusive + * @type {boolean} + * @default true + * @since 3.4.0 + */ + this.exclusive = true; + + /** + * Containers can have an optional maximum size. If set to anything above 0 it + * will constrict the addition of new Game Objects into the Container, capping off + * the maximum limit the Container can grow in size to. + * + * @name Phaser.GameObjects.Container#maxSize + * @type {integer} + * @default -1 + * @since 3.4.0 + */ + this.maxSize = -1; + + /** + * The cursor position. + * + * @name Phaser.GameObjects.Container#position + * @type {integer} + * @since 3.4.0 + */ + this.position = 0; + + /** + * Internal Transform Matrix used for local space conversion. + * + * @name Phaser.GameObjects.Container#localTransform + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @since 3.4.0 + */ + this.localTransform = new Components.TransformMatrix(); + + /** + * Internal temporary Transform Matrix used to avoid object creation. + * + * @name Phaser.GameObjects.Container#tempTransformMatrix + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @private + * @since 3.4.0 + */ + this.tempTransformMatrix = new Components.TransformMatrix(); + + /** + * A reference to the Scene Display List. + * + * @name Phaser.GameObjects.Container#_displayList + * @type {Phaser.GameObjects.DisplayList} + * @private + * @since 3.4.0 + */ + this._displayList = scene.sys.displayList; + + /** + * The property key to sort by. + * + * @name Phaser.GameObjects.Container#_sortKey + * @type {string} + * @private + * @since 3.4.0 + */ + this._sortKey = ''; + + /** + * A reference to the Scene Systems Event Emitter. + * + * @name Phaser.GameObjects.Container#_sysEvents + * @type {Phaser.Events.EventEmitter} + * @private + * @since 3.9.0 + */ + this._sysEvents = scene.sys.events; + + /** + * The horizontal scroll factor of this Container. + * + * The scroll factor controls the influence of the movement of a Camera upon this Container. + * + * When a camera scrolls it will change the location at which this Container is rendered on-screen. + * It does not change the Containers actual position values. + * + * For a Container, setting this value will only update the Container itself, not its children. + * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method. + * + * 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 Container. + * + * 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. + * + * @name Phaser.GameObjects.Container#scrollFactorX + * @type {number} + * @default 1 + * @since 3.0.0 + */ + this.scrollFactorX = 1; + + /** + * The vertical scroll factor of this Container. + * + * The scroll factor controls the influence of the movement of a Camera upon this Container. + * + * When a camera scrolls it will change the location at which this Container is rendered on-screen. + * It does not change the Containers actual position values. + * + * For a Container, setting this value will only update the Container itself, not its children. + * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method. + * + * 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 Container. + * + * 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. + * + * @name Phaser.GameObjects.Container#scrollFactorY + * @type {number} + * @default 1 + * @since 3.0.0 + */ + this.scrollFactorY = 1; + + this.setPosition(x, y); + + this.clearAlpha(); + + this.setBlendMode(BlendModes.SKIP_CHECK); + + if (children) + { + this.add(children); + } + }, + + /** + * Internal value to allow Containers to be used for input and physics. + * Do not change this value. It has no effect other than to break things. + * + * @name Phaser.GameObjects.Container#originX + * @type {number} + * @readonly + * @since 3.4.0 + */ + originX: { + + get: function () + { + return 0.5; + } + + }, + + /** + * Internal value to allow Containers to be used for input and physics. + * Do not change this value. It has no effect other than to break things. + * + * @name Phaser.GameObjects.Container#originY + * @type {number} + * @readonly + * @since 3.4.0 + */ + originY: { + + get: function () + { + return 0.5; + } + + }, + + /** + * Internal value to allow Containers to be used for input and physics. + * Do not change this value. It has no effect other than to break things. + * + * @name Phaser.GameObjects.Container#displayOriginX + * @type {number} + * @readonly + * @since 3.4.0 + */ + displayOriginX: { + + get: function () + { + return this.width * 0.5; + } + + }, + + /** + * Internal value to allow Containers to be used for input and physics. + * Do not change this value. It has no effect other than to break things. + * + * @name Phaser.GameObjects.Container#displayOriginY + * @type {number} + * @readonly + * @since 3.4.0 + */ + displayOriginY: { + + get: function () + { + return this.height * 0.5; + } + + }, + + /** + * Does this Container exclusively manage its children? + * + * The default is `true` which means a child added to this Container cannot + * belong in another Container, which includes the Scene display list. + * + * If you disable this then this Container will no longer exclusively manage its children. + * This allows you to create all kinds of interesting graphical effects, such as replicating + * Game Objects without reparenting them all over the Scene. + * However, doing so will prevent children from receiving any kind of input event or have + * their physics bodies work by default, as they're no longer a single entity on the + * display list, but are being replicated where-ever this Container is. + * + * @method Phaser.GameObjects.Container#setExclusive + * @since 3.4.0 + * + * @param {boolean} [value=true] - The exclusive state of this Container. + * + * @return {this} This Container. + */ + setExclusive: function (value) + { + if (value === undefined) { value = true; } + + this.exclusive = value; + + return this; + }, + + /** + * Gets the bounds of this Container. It works by iterating all children of the Container, + * getting their respective bounds, and then working out a min-max rectangle from that. + * It does not factor in if the children render or not, all are included. + * + * Some children are unable to return their bounds, such as Graphics objects, in which case + * they are skipped. + * + * Depending on the quantity of children in this Container it could be a really expensive call, + * so cache it and only poll it as needed. + * + * The values are stored and returned in a Rectangle object. + * + * @method Phaser.GameObjects.Container#getBounds + * @since 3.4.0 + * + * @param {Phaser.Geom.Rectangle} [output] - A Geom.Rectangle object to store the values in. If not provided a new Rectangle will be created. + * + * @return {Phaser.Geom.Rectangle} The values stored in the output object. + */ + getBounds: function (output) + { + if (output === undefined) { output = new Rectangle(); } + + output.setTo(this.x, this.y, 0, 0); + + if (this.parentContainer) + { + var parentMatrix = this.parentContainer.getBoundsTransformMatrix(); + var transformedPosition = parentMatrix.transformPoint(this.x, this.y); + + output.setTo(transformedPosition.x, transformedPosition.y, 0, 0); + } + + if (this.list.length > 0) + { + var children = this.list; + var tempRect = new Rectangle(); + var hasSetFirst = false; + + output.setEmpty(); + + for (var i = 0; i < children.length; i++) + { + var entry = children[i]; + + if (entry.getBounds) + { + entry.getBounds(tempRect); + + if (!hasSetFirst) + { + output.setTo(tempRect.x, tempRect.y, tempRect.width, tempRect.height); + hasSetFirst = true; + } + else + { + Union(tempRect, output, output); + } + } + } + } + + return output; + }, + + /** + * Internal add handler. + * + * @method Phaser.GameObjects.Container#addHandler + * @private + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just added to this Container. + */ + addHandler: function (gameObject) + { + gameObject.once(Events.DESTROY, this.remove, this); + + if (this.exclusive) + { + this._displayList.remove(gameObject); + + if (gameObject.parentContainer) + { + gameObject.parentContainer.remove(gameObject); + } + + gameObject.parentContainer = this; + } + + // Is only on the Display List via this Container + if (!this.scene.sys.displayList.exists(gameObject)) + { + gameObject.emit(GameObjectEvents.ADDED_TO_SCENE, gameObject, this.scene); + } + }, + + /** + * Internal remove handler. + * + * @method Phaser.GameObjects.Container#removeHandler + * @private + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just removed from this Container. + */ + removeHandler: function (gameObject) + { + gameObject.off(Events.DESTROY, this.remove); + + if (this.exclusive) + { + gameObject.parentContainer = null; + } + + // Is only on the Display List via this Container + if (!this.scene.sys.displayList.exists(gameObject)) + { + gameObject.emit(GameObjectEvents.REMOVED_FROM_SCENE, gameObject, this.scene); + } + }, + + /** + * Takes a Point-like object, such as a Vector2, Geom.Point or object with public x and y properties, + * and transforms it into the space of this Container, then returns it in the output object. + * + * @method Phaser.GameObjects.Container#pointToContainer + * @since 3.4.0 + * + * @param {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} source - The Source Point to be transformed. + * @param {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} [output] - A destination object to store the transformed point in. If none given a Vector2 will be created and returned. + * + * @return {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} The transformed point. + */ + pointToContainer: function (source, output) + { + if (output === undefined) { output = new Vector2(); } + + if (this.parentContainer) + { + this.parentContainer.pointToContainer(source, output); + } + else + { + output = new Vector2(source.x, source.y); + } + + var tempMatrix = this.tempTransformMatrix; + + // No need to loadIdentity because applyITRS overwrites every value anyway + tempMatrix.applyITRS(this.x, this.y, this.rotation, this.scaleX, this.scaleY); + + tempMatrix.invert(); + + tempMatrix.transformPoint(source.x, source.y, output); + + return output; + }, + + /** + * Returns the world transform matrix as used for Bounds checks. + * + * The returned matrix is temporal and shouldn't be stored. + * + * @method Phaser.GameObjects.Container#getBoundsTransformMatrix + * @since 3.4.0 + * + * @return {Phaser.GameObjects.Components.TransformMatrix} The world transform matrix. + */ + getBoundsTransformMatrix: function () + { + return this.getWorldTransformMatrix(this.tempTransformMatrix, this.localTransform); + }, + + /** + * Adds the given Game Object, or array of Game Objects, to this Container. + * + * Each Game Object must be unique within the Container. + * + * @method Phaser.GameObjects.Container#add + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container. + * + * @return {this} This Container instance. + */ + add: function (child) + { + ArrayUtils.Add(this.list, child, this.maxSize, this.addHandler, this); + + return this; + }, + + /** + * Adds the given Game Object, or array of Game Objects, to this Container at the specified position. + * + * Existing Game Objects in the Container are shifted up. + * + * Each Game Object must be unique within the Container. + * + * @method Phaser.GameObjects.Container#addAt + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container. + * @param {integer} [index=0] - The position to insert the Game Object/s at. + * + * @return {this} This Container instance. + */ + addAt: function (child, index) + { + ArrayUtils.AddAt(this.list, child, index, this.maxSize, this.addHandler, this); + + return this; + }, + + /** + * Returns the Game Object at the given position in this Container. + * + * @method Phaser.GameObjects.Container#getAt + * @since 3.4.0 + * + * @param {integer} index - The position to get the Game Object from. + * + * @return {?Phaser.GameObjects.GameObject} The Game Object at the specified index, or `null` if none found. + */ + getAt: function (index) + { + return this.list[index]; + }, + + /** + * Returns the index of the given Game Object in this Container. + * + * @method Phaser.GameObjects.Container#getIndex + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container. + * + * @return {integer} The index of the Game Object in this Container, or -1 if not found. + */ + getIndex: function (child) + { + return this.list.indexOf(child); + }, + + /** + * Sort the contents of this Container so the items are in order based on the given property. + * For example: `sort('alpha')` would sort the elements based on the value of their `alpha` property. + * + * @method Phaser.GameObjects.Container#sort + * @since 3.4.0 + * + * @param {string} property - The property to lexically sort by. + * @param {function} [handler] - Provide your own custom handler function. Will receive 2 children which it should compare and return a boolean. + * + * @return {this} This Container instance. + */ + sort: function (property, handler) + { + if (!property) + { + return this; + } + + if (handler === undefined) + { + handler = function (childA, childB) + { + return childA[property] - childB[property]; + }; + } + + ArrayUtils.StableSort.inplace(this.list, handler); + + return this; + }, + + /** + * Searches for the first instance of a child with its `name` property matching the given argument. + * Should more than one child have the same name only the first is returned. + * + * @method Phaser.GameObjects.Container#getByName + * @since 3.4.0 + * + * @param {string} name - The name to search for. + * + * @return {?Phaser.GameObjects.GameObject} The first child with a matching name, or `null` if none were found. + */ + getByName: function (name) + { + return ArrayUtils.GetFirst(this.list, 'name', name); + }, + + /** + * Returns a random Game Object from this Container. + * + * @method Phaser.GameObjects.Container#getRandom + * @since 3.4.0 + * + * @param {integer} [startIndex=0] - An optional start index. + * @param {integer} [length] - An optional length, the total number of elements (from the startIndex) to choose from. + * + * @return {?Phaser.GameObjects.GameObject} A random child from the Container, or `null` if the Container is empty. + */ + getRandom: function (startIndex, length) + { + return ArrayUtils.GetRandom(this.list, startIndex, length); + }, + + /** + * Gets the first Game Object in this Container. + * + * You can also specify a property and value to search for, in which case it will return the first + * Game Object in this Container with a matching property and / or value. + * + * For example: `getFirst('visible', true)` would return the first Game Object that had its `visible` property set. + * + * You can limit the search to the `startIndex` - `endIndex` range. + * + * @method Phaser.GameObjects.Container#getFirst + * @since 3.4.0 + * + * @param {string} property - The property to test on each Game Object in the Container. + * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check. + * @param {integer} [startIndex=0] - An optional start index to search from. + * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included) + * + * @return {?Phaser.GameObjects.GameObject} The first matching Game Object, or `null` if none was found. + */ + getFirst: function (property, value, startIndex, endIndex) + { + return ArrayUtils.GetFirst(this.list, property, value, startIndex, endIndex); + }, + + /** + * Returns all Game Objects in this Container. + * + * You can optionally specify a matching criteria using the `property` and `value` arguments. + * + * For example: `getAll('body')` would return only Game Objects that have a body property. + * + * You can also specify a value to compare the property to: + * + * `getAll('visible', true)` would return only Game Objects that have their visible property set to `true`. + * + * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects, + * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only + * the first 50 Game Objects. + * + * @method Phaser.GameObjects.Container#getAll + * @since 3.4.0 + * + * @param {string} [property] - The property to test on each Game Object in the Container. + * @param {any} [value] - If property is set then the `property` must strictly equal this value to be included in the results. + * @param {integer} [startIndex=0] - An optional start index to search from. + * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included) + * + * @return {Phaser.GameObjects.GameObject[]} An array of matching Game Objects from this Container. + */ + getAll: function (property, value, startIndex, endIndex) + { + return ArrayUtils.GetAll(this.list, property, value, startIndex, endIndex); + }, + + /** + * Returns the total number of Game Objects in this Container that have a property + * matching the given value. + * + * For example: `count('visible', true)` would count all the elements that have their visible property set. + * + * You can optionally limit the operation to the `startIndex` - `endIndex` range. + * + * @method Phaser.GameObjects.Container#count + * @since 3.4.0 + * + * @param {string} property - The property to check. + * @param {any} value - The value to check. + * @param {integer} [startIndex=0] - An optional start index to search from. + * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included) + * + * @return {integer} The total number of Game Objects in this Container with a property matching the given value. + */ + count: function (property, value, startIndex, endIndex) + { + return ArrayUtils.CountAllMatching(this.list, property, value, startIndex, endIndex); + }, + + /** + * Swaps the position of two Game Objects in this Container. + * Both Game Objects must belong to this Container. + * + * @method Phaser.GameObjects.Container#swap + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} child1 - The first Game Object to swap. + * @param {Phaser.GameObjects.GameObject} child2 - The second Game Object to swap. + * + * @return {this} This Container instance. + */ + swap: function (child1, child2) + { + ArrayUtils.Swap(this.list, child1, child2); + + return this; + }, + + /** + * Moves a Game Object to a new position within this Container. + * + * The Game Object must already be a child of this Container. + * + * The Game Object is removed from its old position and inserted into the new one. + * Therefore the Container size does not change. Other children will change position accordingly. + * + * @method Phaser.GameObjects.Container#moveTo + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} child - The Game Object to move. + * @param {integer} index - The new position of the Game Object in this Container. + * + * @return {this} This Container instance. + */ + moveTo: function (child, index) + { + ArrayUtils.MoveTo(this.list, child, index); + + return this; + }, + + /** + * Removes the given Game Object, or array of Game Objects, from this Container. + * + * The Game Objects must already be children of this Container. + * + * You can also optionally call `destroy` on each Game Object that is removed from the Container. + * + * @method Phaser.GameObjects.Container#remove + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to be removed from the Container. + * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each child successfully removed from this Container. + * + * @return {this} This Container instance. + */ + remove: function (child, destroyChild) + { + var removed = ArrayUtils.Remove(this.list, child, this.removeHandler, this); + + if (destroyChild && removed) + { + if (!Array.isArray(removed)) + { + removed = [ removed ]; + } + + for (var i = 0; i < removed.length; i++) + { + removed[i].destroy(); + } + } + + return this; + }, + + /** + * Removes the Game Object at the given position in this Container. + * + * You can also optionally call `destroy` on the Game Object, if one is found. + * + * @method Phaser.GameObjects.Container#removeAt + * @since 3.4.0 + * + * @param {integer} index - The index of the Game Object to be removed. + * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container. + * + * @return {this} This Container instance. + */ + removeAt: function (index, destroyChild) + { + var removed = ArrayUtils.RemoveAt(this.list, index, this.removeHandler, this); + + if (destroyChild && removed) + { + removed.destroy(); + } + + return this; + }, + + /** + * Removes the Game Objects between the given positions in this Container. + * + * You can also optionally call `destroy` on each Game Object that is removed from the Container. + * + * @method Phaser.GameObjects.Container#removeBetween + * @since 3.4.0 + * + * @param {integer} [startIndex=0] - An optional start index to search from. + * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included) + * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container. + * + * @return {this} This Container instance. + */ + removeBetween: function (startIndex, endIndex, destroyChild) + { + var removed = ArrayUtils.RemoveBetween(this.list, startIndex, endIndex, this.removeHandler, this); + + if (destroyChild) + { + for (var i = 0; i < removed.length; i++) + { + removed[i].destroy(); + } + } + + return this; + }, + + /** + * Removes all Game Objects from this Container. + * + * You can also optionally call `destroy` on each Game Object that is removed from the Container. + * + * @method Phaser.GameObjects.Container#removeAll + * @since 3.4.0 + * + * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container. + * + * @return {this} This Container instance. + */ + removeAll: function (destroyChild) + { + var removed = ArrayUtils.RemoveBetween(this.list, 0, this.list.length, this.removeHandler, this); + + if (destroyChild) + { + for (var i = 0; i < removed.length; i++) + { + removed[i].destroy(); + } + } + + return this; + }, + + /** + * Brings the given Game Object to the top of this Container. + * This will cause it to render on-top of any other objects in the Container. + * + * @method Phaser.GameObjects.Container#bringToTop + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} child - The Game Object to bring to the top of the Container. + * + * @return {this} This Container instance. + */ + bringToTop: function (child) + { + ArrayUtils.BringToTop(this.list, child); + + return this; + }, + + /** + * Sends the given Game Object to the bottom of this Container. + * This will cause it to render below any other objects in the Container. + * + * @method Phaser.GameObjects.Container#sendToBack + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} child - The Game Object to send to the bottom of the Container. + * + * @return {this} This Container instance. + */ + sendToBack: function (child) + { + ArrayUtils.SendToBack(this.list, child); + + return this; + }, + + /** + * Moves the given Game Object up one place in this Container, unless it's already at the top. + * + * @method Phaser.GameObjects.Container#moveUp + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container. + * + * @return {this} This Container instance. + */ + moveUp: function (child) + { + ArrayUtils.MoveUp(this.list, child); + + return this; + }, + + /** + * Moves the given Game Object down one place in this Container, unless it's already at the bottom. + * + * @method Phaser.GameObjects.Container#moveDown + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container. + * + * @return {this} This Container instance. + */ + moveDown: function (child) + { + ArrayUtils.MoveDown(this.list, child); + + return this; + }, + + /** + * Reverses the order of all Game Objects in this Container. + * + * @method Phaser.GameObjects.Container#reverse + * @since 3.4.0 + * + * @return {this} This Container instance. + */ + reverse: function () + { + this.list.reverse(); + + return this; + }, + + /** + * Shuffles the all Game Objects in this Container using the Fisher-Yates implementation. + * + * @method Phaser.GameObjects.Container#shuffle + * @since 3.4.0 + * + * @return {this} This Container instance. + */ + shuffle: function () + { + ArrayUtils.Shuffle(this.list); + + return this; + }, + + /** + * Replaces a Game Object in this Container with the new Game Object. + * The new Game Object cannot already be a child of this Container. + * + * @method Phaser.GameObjects.Container#replace + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} oldChild - The Game Object in this Container that will be replaced. + * @param {Phaser.GameObjects.GameObject} newChild - The Game Object to be added to this Container. + * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container. + * + * @return {this} This Container instance. + */ + replace: function (oldChild, newChild, destroyChild) + { + var moved = ArrayUtils.Replace(this.list, oldChild, newChild); + + if (moved) + { + this.addHandler(newChild); + this.removeHandler(oldChild); + + if (destroyChild) + { + oldChild.destroy(); + } + } + + return this; + }, + + /** + * Returns `true` if the given Game Object is a direct child of this Container. + * + * This check does not scan nested Containers. + * + * @method Phaser.GameObjects.Container#exists + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} child - The Game Object to check for within this Container. + * + * @return {boolean} True if the Game Object is an immediate child of this Container, otherwise false. + */ + exists: function (child) + { + return (this.list.indexOf(child) > -1); + }, + + /** + * Sets the property to the given value on all Game Objects in this Container. + * + * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects, + * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only + * the first 50 Game Objects. + * + * @method Phaser.GameObjects.Container#setAll + * @since 3.4.0 + * + * @param {string} property - The property that must exist on the Game Object. + * @param {any} value - The value to get the property to. + * @param {integer} [startIndex=0] - An optional start index to search from. + * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included) + * + * @return {this} This Container instance. + */ + setAll: function (property, value, startIndex, endIndex) + { + ArrayUtils.SetAll(this.list, property, value, startIndex, endIndex); + + return this; + }, + + /** + * @callback EachContainerCallback + * @generic I - [item] + * + * @param {*} item - The child Game Object of the Container. + * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child. + */ + + /** + * Passes all Game Objects in this Container to the given callback. + * + * A copy of the Container is made before passing each entry to your callback. + * This protects against the callback itself modifying the Container. + * + * If you know for sure that the callback will not change the size of this Container + * then you can use the more performant `Container.iterate` method instead. + * + * @method Phaser.GameObjects.Container#each + * @since 3.4.0 + * + * @param {function} callback - The function to call. + * @param {object} [context] - Value to use as `this` when executing callback. + * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child. + * + * @return {this} This Container instance. + */ + each: function (callback, context) + { + var args = [ null ]; + var i; + var temp = this.list.slice(); + var len = temp.length; + + for (i = 2; i < arguments.length; i++) + { + args.push(arguments[i]); + } + + for (i = 0; i < len; i++) + { + args[0] = temp[i]; + + callback.apply(context, args); + } + + return this; + }, + + /** + * Passes all Game Objects in this Container to the given callback. + * + * Only use this method when you absolutely know that the Container will not be modified during + * the iteration, i.e. by removing or adding to its contents. + * + * @method Phaser.GameObjects.Container#iterate + * @since 3.4.0 + * + * @param {function} callback - The function to call. + * @param {object} [context] - Value to use as `this` when executing callback. + * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child. + * + * @return {this} This Container instance. + */ + iterate: function (callback, context) + { + var args = [ null ]; + var i; + + for (i = 2; i < arguments.length; i++) + { + args.push(arguments[i]); + } + + for (i = 0; i < this.list.length; i++) + { + args[0] = this.list[i]; + + callback.apply(context, args); + } + + return this; + }, + + /** + * Sets the scroll factor of this Container and optionally all of its children. + * + * 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. + * + * @method Phaser.GameObjects.Container#setScrollFactor + * @since 3.0.0 + * + * @param {number} x - The horizontal scroll factor of this Game Object. + * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value. + * @param {boolean} [updateChildren=false] - Apply this scrollFactor to all Container children as well? + * + * @return {this} This Game Object instance. + */ + setScrollFactor: function (x, y, updateChildren) + { + if (y === undefined) { y = x; } + if (updateChildren === undefined) { updateChildren = false; } + + this.scrollFactorX = x; + this.scrollFactorY = y; + + if (updateChildren) + { + ArrayUtils.SetAll(this.list, 'scrollFactorX', x); + ArrayUtils.SetAll(this.list, 'scrollFactorY', y); + } + + return this; + }, + + /** + * The number of Game Objects inside this Container. + * + * @name Phaser.GameObjects.Container#length + * @type {integer} + * @readonly + * @since 3.4.0 + */ + length: { + + get: function () + { + return this.list.length; + } + + }, + + /** + * Returns the first Game Object within the Container, or `null` if it is empty. + * + * You can move the cursor by calling `Container.next` and `Container.previous`. + * + * @name Phaser.GameObjects.Container#first + * @type {?Phaser.GameObjects.GameObject} + * @readonly + * @since 3.4.0 + */ + first: { + + get: function () + { + this.position = 0; + + if (this.list.length > 0) + { + return this.list[0]; + } + else + { + return null; + } + } + + }, + + /** + * Returns the last Game Object within the Container, or `null` if it is empty. + * + * You can move the cursor by calling `Container.next` and `Container.previous`. + * + * @name Phaser.GameObjects.Container#last + * @type {?Phaser.GameObjects.GameObject} + * @readonly + * @since 3.4.0 + */ + last: { + + get: function () + { + if (this.list.length > 0) + { + this.position = this.list.length - 1; + + return this.list[this.position]; + } + else + { + return null; + } + } + + }, + + /** + * Returns the next Game Object within the Container, or `null` if it is empty. + * + * You can move the cursor by calling `Container.next` and `Container.previous`. + * + * @name Phaser.GameObjects.Container#next + * @type {?Phaser.GameObjects.GameObject} + * @readonly + * @since 3.4.0 + */ + next: { + + get: function () + { + if (this.position < this.list.length) + { + this.position++; + + return this.list[this.position]; + } + else + { + return null; + } + } + + }, + + /** + * Returns the previous Game Object within the Container, or `null` if it is empty. + * + * You can move the cursor by calling `Container.next` and `Container.previous`. + * + * @name Phaser.GameObjects.Container#previous + * @type {?Phaser.GameObjects.GameObject} + * @readonly + * @since 3.4.0 + */ + previous: { + + get: function () + { + if (this.position > 0) + { + this.position--; + + return this.list[this.position]; + } + else + { + return null; + } + } + + }, + + /** + * Internal destroy handler, called as part of the destroy process. + * + * @method Phaser.GameObjects.Container#preDestroy + * @protected + * @since 3.9.0 + */ + preDestroy: function () + { + this.removeAll(!!this.exclusive); + + this.localTransform.destroy(); + this.tempTransformMatrix.destroy(); + + this.list = []; + this._displayList = null; + } + +}); + +module.exports = Container; + + +/***/ }), +/* 249 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Utils.Array + */ + +module.exports = { + + Matrix: __webpack_require__(250), + + Add: __webpack_require__(258), + AddAt: __webpack_require__(259), + BringToTop: __webpack_require__(260), + CountAllMatching: __webpack_require__(261), + Each: __webpack_require__(262), + EachInRange: __webpack_require__(263), + FindClosestInSorted: __webpack_require__(57), + GetAll: __webpack_require__(264), + GetFirst: __webpack_require__(265), + GetRandom: __webpack_require__(266), + MoveDown: __webpack_require__(267), + MoveTo: __webpack_require__(268), + MoveUp: __webpack_require__(269), + NumberArray: __webpack_require__(270), + NumberArrayStep: __webpack_require__(271), + QuickSelect: __webpack_require__(272), + Range: __webpack_require__(273), + Remove: __webpack_require__(274), + RemoveAt: __webpack_require__(275), + RemoveBetween: __webpack_require__(276), + RemoveRandomElement: __webpack_require__(277), + Replace: __webpack_require__(278), + RotateLeft: __webpack_require__(279), + RotateRight: __webpack_require__(280), + SafeRange: __webpack_require__(4), + SendToBack: __webpack_require__(281), + SetAll: __webpack_require__(282), + Shuffle: __webpack_require__(58), + SpliceOne: __webpack_require__(13), + StableSort: __webpack_require__(283), + Swap: __webpack_require__(284) + +}; + + +/***/ }), +/* 250 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Utils.Array.Matrix + */ + +module.exports = { + + CheckMatrix: __webpack_require__(23), + MatrixToString: __webpack_require__(251), + ReverseColumns: __webpack_require__(253), + ReverseRows: __webpack_require__(254), + Rotate180: __webpack_require__(255), + RotateLeft: __webpack_require__(256), + RotateMatrix: __webpack_require__(12), + RotateRight: __webpack_require__(257), + TransposeMatrix: __webpack_require__(56) + +}; + + +/***/ }), +/* 251 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Pad = __webpack_require__(252); +var CheckMatrix = __webpack_require__(23); + +/** + * Generates a string (which you can pass to console.log) from the given Array Matrix. + * + * @function Phaser.Utils.Array.Matrix.MatrixToString + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [matrix] + * + * @param {T[][]} [matrix] - A 2-dimensional array. + * + * @return {string} A string representing the matrix. + */ +var MatrixToString = function (matrix) +{ + var str = ''; + + if (!CheckMatrix(matrix)) + { + return str; + } + + for (var r = 0; r < matrix.length; r++) + { + for (var c = 0; c < matrix[r].length; c++) + { + var cell = matrix[r][c].toString(); + + if (cell !== 'undefined') + { + str += Pad(cell, 2); + } + else + { + str += '?'; + } + + if (c < matrix[r].length - 1) + { + str += ' |'; + } + } + + if (r < matrix.length - 1) + { + str += '\n'; + + for (var i = 0; i < matrix[r].length; i++) + { + str += '---'; + + if (i < matrix[r].length - 1) + { + str += '+'; + } + } + + str += '\n'; + } + + } + + return str; +}; + +module.exports = MatrixToString; + + +/***/ }), +/* 252 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Takes the given string and pads it out, to the length required, using the character + * specified. For example if you need a string to be 6 characters long, you can call: + * + * `pad('bob', 6, '-', 2)` + * + * This would return: `bob---` as it has padded it out to 6 characters, using the `-` on the right. + * + * You can also use it to pad numbers (they are always returned as strings): + * + * `pad(512, 6, '0', 1)` + * + * Would return: `000512` with the string padded to the left. + * + * If you don't specify a direction it'll pad to both sides: + * + * `pad('c64', 7, '*')` + * + * Would return: `**c64**` + * + * @function Phaser.Utils.String.Pad + * @since 3.0.0 + * + * @param {string|number|object} str - The target string. `toString()` will be called on the string, which means you can also pass in common data types like numbers. + * @param {integer} [len=0] - The number of characters to be added. + * @param {string} [pad=" "] - The string to pad it out with (defaults to a space). + * @param {integer} [dir=3] - The direction dir = 1 (left), 2 (right), 3 (both). + * + * @return {string} The padded string. + */ +var Pad = function (str, len, pad, dir) +{ + if (len === undefined) { len = 0; } + if (pad === undefined) { pad = ' '; } + if (dir === undefined) { dir = 3; } + + str = str.toString(); + + var padlen = 0; + + if (len + 1 >= str.length) + { + switch (dir) + { + case 1: + str = new Array(len + 1 - str.length).join(pad) + str; + break; + + case 3: + var right = Math.ceil((padlen = len - str.length) / 2); + var left = padlen - right; + str = new Array(left + 1).join(pad) + str + new Array(right + 1).join(pad); + break; + + default: + str = str + new Array(len + 1 - str.length).join(pad); + break; + } + } + + return str; +}; + +module.exports = Pad; + + +/***/ }), +/* 253 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Reverses the columns in the given Array Matrix. + * + * @function Phaser.Utils.Array.Matrix.ReverseColumns + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [matrix,$return] + * + * @param {T[][]} [matrix] - The array matrix to reverse the columns for. + * + * @return {T[][]} The column reversed matrix. + */ +var ReverseColumns = function (matrix) +{ + return matrix.reverse(); +}; + +module.exports = ReverseColumns; + + +/***/ }), +/* 254 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Reverses the rows in the given Array Matrix. + * + * @function Phaser.Utils.Array.Matrix.ReverseRows + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [matrix,$return] + * + * @param {T[][]} [matrix] - The array matrix to reverse the rows for. + * + * @return {T[][]} The column reversed matrix. + */ +var ReverseRows = function (matrix) +{ + for (var i = 0; i < matrix.length; i++) + { + matrix[i].reverse(); + } + + return matrix; +}; + +module.exports = ReverseRows; + + +/***/ }), +/* 255 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var RotateMatrix = __webpack_require__(12); + +/** + * Rotates the array matrix 180 degrees. + * + * @function Phaser.Utils.Array.Matrix.Rotate180 + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [matrix,$return] + * + * @param {T[][]} [matrix] - The array to rotate. + * + * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix. + */ +var Rotate180 = function (matrix) +{ + return RotateMatrix(matrix, 180); +}; + +module.exports = Rotate180; + + +/***/ }), +/* 256 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var RotateMatrix = __webpack_require__(12); + +/** + * Rotates the array matrix to the left (or 90 degrees) + * + * @function Phaser.Utils.Array.Matrix.RotateLeft + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [matrix,$return] + * + * @param {T[][]} [matrix] - The array to rotate. + * + * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix. + */ +var RotateLeft = function (matrix) +{ + return RotateMatrix(matrix, 90); +}; + +module.exports = RotateLeft; + + +/***/ }), +/* 257 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var RotateMatrix = __webpack_require__(12); + +/** + * Rotates the array matrix to the left (or -90 degrees) + * + * @function Phaser.Utils.Array.Matrix.RotateRight + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [matrix,$return] + * + * @param {T[][]} [matrix] - The array to rotate. + * + * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix. + */ +var RotateRight = function (matrix) +{ + return RotateMatrix(matrix, -90); +}; + +module.exports = RotateRight; + + +/***/ }), +/* 258 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Adds the given item, or array of items, to the array. + * + * Each item must be unique within the array. + * + * The array is modified in-place and returned. + * + * You can optionally specify a limit to the maximum size of the array. If the quantity of items being + * added will take the array length over this limit, it will stop adding once the limit is reached. + * + * You can optionally specify a callback to be invoked for each item successfully added to the array. + * + * @function Phaser.Utils.Array.Add + * @since 3.4.0 + * + * @param {array} array - The array to be added to. + * @param {any|any[]} item - The item, or array of items, to add to the array. Each item must be unique within the array. + * @param {integer} [limit] - Optional limit which caps the size of the array. + * @param {function} [callback] - A callback to be invoked for each item successfully added to the array. + * @param {object} [context] - The context in which the callback is invoked. + * + * @return {array} The input array. + */ +var Add = function (array, item, limit, callback, context) +{ + if (context === undefined) { context = array; } + + if (limit > 0) + { + var remaining = limit - array.length; + + // There's nothing more we can do here, the array is full + if (remaining <= 0) + { + return null; + } + } + + // Fast path to avoid array mutation and iteration + if (!Array.isArray(item)) + { + if (array.indexOf(item) === -1) + { + array.push(item); + + if (callback) + { + callback.call(context, item); + } + + return item; + } + else + { + return null; + } + } + + // If we got this far, we have an array of items to insert + + // Ensure all the items are unique + var itemLength = item.length - 1; + + while (itemLength >= 0) + { + if (array.indexOf(item[itemLength]) !== -1) + { + // Already exists in array, so remove it + item.splice(itemLength, 1); + } + + itemLength--; + } + + // Anything left? + itemLength = item.length; + + if (itemLength === 0) + { + return null; + } + + if (limit > 0 && itemLength > remaining) + { + item.splice(remaining); + + itemLength = remaining; + } + + for (var i = 0; i < itemLength; i++) + { + var entry = item[i]; + + array.push(entry); + + if (callback) + { + callback.call(context, entry); + } + } + + return item; +}; + +module.exports = Add; + + +/***/ }), +/* 259 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Adds the given item, or array of items, to the array starting at the index specified. + * + * Each item must be unique within the array. + * + * Existing elements in the array are shifted up. + * + * The array is modified in-place and returned. + * + * You can optionally specify a limit to the maximum size of the array. If the quantity of items being + * added will take the array length over this limit, it will stop adding once the limit is reached. + * + * You can optionally specify a callback to be invoked for each item successfully added to the array. + * + * @function Phaser.Utils.Array.AddAt + * @since 3.4.0 + * + * @param {array} array - The array to be added to. + * @param {any|any[]} item - The item, or array of items, to add to the array. + * @param {integer} [index=0] - The index in the array where the item will be inserted. + * @param {integer} [limit] - Optional limit which caps the size of the array. + * @param {function} [callback] - A callback to be invoked for each item successfully added to the array. + * @param {object} [context] - The context in which the callback is invoked. + * + * @return {array} The input array. + */ +var AddAt = function (array, item, index, limit, callback, context) +{ + if (index === undefined) { index = 0; } + if (context === undefined) { context = array; } + + if (limit > 0) + { + var remaining = limit - array.length; + + // There's nothing more we can do here, the array is full + if (remaining <= 0) + { + return null; + } + } + + // Fast path to avoid array mutation and iteration + if (!Array.isArray(item)) + { + if (array.indexOf(item) === -1) + { + array.splice(index, 0, item); + + if (callback) + { + callback.call(context, item); + } + + return item; + } + else + { + return null; + } + } + + // If we got this far, we have an array of items to insert + + // Ensure all the items are unique + var itemLength = item.length - 1; + + while (itemLength >= 0) + { + if (array.indexOf(item[itemLength]) !== -1) + { + // Already exists in array, so remove it + item.pop(); + } + + itemLength--; + } + + // Anything left? + itemLength = item.length; + + if (itemLength === 0) + { + return null; + } + + // Truncate to the limit + if (limit > 0 && itemLength > remaining) + { + item.splice(remaining); + + itemLength = remaining; + } + + for (var i = itemLength - 1; i >= 0; i--) + { + var entry = item[i]; + + array.splice(index, 0, entry); + + if (callback) + { + callback.call(context, entry); + } + } + + return item; +}; + +module.exports = AddAt; + + +/***/ }), +/* 260 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the given element to the top of the array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.BringToTop + * @since 3.4.0 + * + * @param {array} array - The array. + * @param {*} item - The element to move. + * + * @return {*} The element that was moved. + */ +var BringToTop = function (array, item) +{ + var currentIndex = array.indexOf(item); + + if (currentIndex !== -1 && currentIndex < array.length) + { + array.splice(currentIndex, 1); + array.push(item); + } + + return item; +}; + +module.exports = BringToTop; + + +/***/ }), +/* 261 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SafeRange = __webpack_require__(4); + +/** + * Returns the total number of elements in the array which have a property matching the given value. + * + * @function Phaser.Utils.Array.CountAllMatching + * @since 3.4.0 + * + * @param {array} array - The array to search. + * @param {string} property - The property to test on each array element. + * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check. + * @param {integer} [startIndex] - An optional start index to search from. + * @param {integer} [endIndex] - An optional end index to search to. + * + * @return {integer} The total number of elements with properties matching the given value. + */ +var CountAllMatching = function (array, property, value, startIndex, endIndex) +{ + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = array.length; } + + var total = 0; + + if (SafeRange(array, startIndex, endIndex)) + { + for (var i = startIndex; i < endIndex; i++) + { + var child = array[i]; + + if (child[property] === value) + { + total++; + } + } + } + + return total; +}; + +module.exports = CountAllMatching; + + +/***/ }), +/* 262 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Passes each element in the array to the given callback. + * + * @function Phaser.Utils.Array.Each + * @since 3.4.0 + * + * @param {array} array - The array to search. + * @param {function} callback - A callback to be invoked for each item in the array. + * @param {object} context - The context in which the callback is invoked. + * @param {...*} [args] - Additional arguments that will be passed to the callback, after the current array item. + * + * @return {array} The input array. + */ +var Each = function (array, callback, context) +{ + var i; + var args = [ null ]; + + for (i = 3; i < arguments.length; i++) + { + args.push(arguments[i]); + } + + for (i = 0; i < array.length; i++) + { + args[0] = array[i]; + + callback.apply(context, args); + } + + return array; +}; + +module.exports = Each; + + +/***/ }), +/* 263 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SafeRange = __webpack_require__(4); + +/** + * Passes each element in the array, between the start and end indexes, to the given callback. + * + * @function Phaser.Utils.Array.EachInRange + * @since 3.4.0 + * + * @param {array} array - The array to search. + * @param {function} callback - A callback to be invoked for each item in the array. + * @param {object} context - The context in which the callback is invoked. + * @param {integer} startIndex - The start index to search from. + * @param {integer} endIndex - The end index to search to. + * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child. + * + * @return {array} The input array. + */ +var EachInRange = function (array, callback, context, startIndex, endIndex) +{ + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = array.length; } + + if (SafeRange(array, startIndex, endIndex)) + { + var i; + var args = [ null ]; + + for (i = 5; i < arguments.length; i++) + { + args.push(arguments[i]); + } + + for (i = startIndex; i < endIndex; i++) + { + args[0] = array[i]; + + callback.apply(context, args); + } + } + + return array; +}; + +module.exports = EachInRange; + + +/***/ }), +/* 264 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SafeRange = __webpack_require__(4); + +/** + * Returns all elements in the array. + * + * You can optionally specify a matching criteria using the `property` and `value` arguments. + * + * For example: `getAll('visible', true)` would return only elements that have their visible property set. + * + * Optionally you can specify a start and end index. For example if the array had 100 elements, + * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only + * the first 50 elements. + * + * @function Phaser.Utils.Array.GetAll + * @since 3.4.0 + * + * @param {array} array - The array to search. + * @param {string} [property] - The property to test on each array element. + * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check. + * @param {integer} [startIndex] - An optional start index to search from. + * @param {integer} [endIndex] - An optional end index to search to. + * + * @return {array} All matching elements from the array. + */ +var GetAll = function (array, property, value, startIndex, endIndex) +{ + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = array.length; } + + var output = []; + + if (SafeRange(array, startIndex, endIndex)) + { + for (var i = startIndex; i < endIndex; i++) + { + var child = array[i]; + + if (!property || + (property && value === undefined && child.hasOwnProperty(property)) || + (property && value !== undefined && child[property] === value)) + { + output.push(child); + } + } + } + + return output; +}; + +module.exports = GetAll; + + +/***/ }), +/* 265 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SafeRange = __webpack_require__(4); + +/** + * Returns the first element in the array. + * + * You can optionally specify a matching criteria using the `property` and `value` arguments. + * + * For example: `getAll('visible', true)` would return the first element that had its `visible` property set. + * + * Optionally you can specify a start and end index. For example if the array had 100 elements, + * and you set `startIndex` to 0 and `endIndex` to 50, it would search only the first 50 elements. + * + * @function Phaser.Utils.Array.GetFirst + * @since 3.4.0 + * + * @param {array} array - The array to search. + * @param {string} [property] - The property to test on each array element. + * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check. + * @param {integer} [startIndex=0] - An optional start index to search from. + * @param {integer} [endIndex=array.length] - An optional end index to search up to (but not included) + * + * @return {object} The first matching element from the array, or `null` if no element could be found in the range given. + */ +var GetFirst = function (array, property, value, startIndex, endIndex) +{ + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = array.length; } + + if (SafeRange(array, startIndex, endIndex)) + { + for (var i = startIndex; i < endIndex; i++) + { + var child = array[i]; + + if (!property || + (property && value === undefined && child.hasOwnProperty(property)) || + (property && value !== undefined && child[property] === value)) + { + return child; + } + } + } + + return null; +}; + +module.exports = GetFirst; + + +/***/ }), +/* 266 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Returns a Random element from the array. + * + * @function Phaser.Utils.Array.GetRandom + * @since 3.0.0 + * + * @param {array} array - The array to select the random entry from. + * @param {integer} [startIndex=0] - An optional start index. + * @param {integer} [length=array.length] - An optional length, the total number of elements (from the startIndex) to choose from. + * + * @return {*} A random element from the array, or `null` if no element could be found in the range given. + */ +var GetRandom = function (array, startIndex, length) +{ + if (startIndex === undefined) { startIndex = 0; } + if (length === undefined) { length = array.length; } + + var randomIndex = startIndex + Math.floor(Math.random() * length); + + return (array[randomIndex] === undefined) ? null : array[randomIndex]; +}; + +module.exports = GetRandom; + + +/***/ }), +/* 267 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the given array element down one place in the array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.MoveDown + * @since 3.4.0 + * + * @param {array} array - The input array. + * @param {*} item - The element to move down the array. + * + * @return {array} The input array. + */ +var MoveDown = function (array, item) +{ + var currentIndex = array.indexOf(item); + + if (currentIndex > 0) + { + var item2 = array[currentIndex - 1]; + + var index2 = array.indexOf(item2); + + array[currentIndex] = item2; + array[index2] = item; + } + + return array; +}; + +module.exports = MoveDown; + + +/***/ }), +/* 268 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves an element in an array to a new position within the same array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.MoveTo + * @since 3.4.0 + * + * @param {array} array - The array. + * @param {*} item - The element to move. + * @param {integer} index - The new index that the element will be moved to. + * + * @return {*} The element that was moved. + */ +var MoveTo = function (array, item, index) +{ + var currentIndex = array.indexOf(item); + + if (currentIndex === -1 || index < 0 || index >= array.length) + { + throw new Error('Supplied index out of bounds'); + } + + if (currentIndex !== index) + { + // Remove + array.splice(currentIndex, 1); + + // Add in new location + array.splice(index, 0, item); + } + + return item; +}; + +module.exports = MoveTo; + + +/***/ }), +/* 269 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the given array element up one place in the array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.MoveUp + * @since 3.4.0 + * + * @param {array} array - The input array. + * @param {*} item - The element to move up the array. + * + * @return {array} The input array. + */ +var MoveUp = function (array, item) +{ + var currentIndex = array.indexOf(item); + + if (currentIndex !== -1 && currentIndex < array.length - 1) + { + // The element one above `item` in the array + var item2 = array[currentIndex + 1]; + var index2 = array.indexOf(item2); + + array[currentIndex] = item2; + array[index2] = item; + } + + return array; +}; + +module.exports = MoveUp; + + +/***/ }), +/* 270 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Create an array representing the range of numbers (usually integers), between, and inclusive of, + * the given `start` and `end` arguments. For example: + * + * `var array = numberArray(2, 4); // array = [2, 3, 4]` + * `var array = numberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]` + * + * This is equivalent to `numberArrayStep(start, end, 1)`. + * + * You can optionally provide a prefix and / or suffix string. If given the array will contain + * strings, not integers. For example: + * + * `var array = numberArray(1, 4, 'Level '); // array = ["Level 1", "Level 2", "Level 3", "Level 4"]` + * `var array = numberArray(5, 7, 'HD-', '.png'); // array = ["HD-5.png", "HD-6.png", "HD-7.png"]` + * + * @function Phaser.Utils.Array.NumberArray + * @since 3.0.0 + * + * @param {number} start - The minimum value the array starts with. + * @param {number} end - The maximum value the array contains. + * @param {string} [prefix] - Optional prefix to place before the number. If provided the array will contain strings, not integers. + * @param {string} [suffix] - Optional suffix to place after the number. If provided the array will contain strings, not integers. + * + * @return {(number[]|string[])} The array of number values, or strings if a prefix or suffix was provided. + */ +var NumberArray = function (start, end, prefix, suffix) +{ + var result = []; + + for (var i = start; i <= end; i++) + { + if (prefix || suffix) + { + var key = (prefix) ? prefix + i.toString() : i.toString(); + + if (suffix) + { + key = key.concat(suffix); + } + + result.push(key); + } + else + { + result.push(i); + } + } + + return result; +}; + +module.exports = NumberArray; + + +/***/ }), +/* 271 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var RoundAwayFromZero = __webpack_require__(39); + +/** + * Create an array of numbers (positive and/or negative) progressing from `start` + * up to but not including `end` by advancing by `step`. + * + * If `start` is less than `end` a zero-length range is created unless a negative `step` is specified. + * + * Certain values for `start` and `end` (eg. NaN/undefined/null) are currently coerced to 0; + * for forward compatibility make sure to pass in actual numbers. + * + * @example + * NumberArrayStep(4); + * // => [0, 1, 2, 3] + * + * NumberArrayStep(1, 5); + * // => [1, 2, 3, 4] + * + * NumberArrayStep(0, 20, 5); + * // => [0, 5, 10, 15] + * + * NumberArrayStep(0, -4, -1); + * // => [0, -1, -2, -3] + * + * NumberArrayStep(1, 4, 0); + * // => [1, 1, 1] + * + * NumberArrayStep(0); + * // => [] + * + * @function Phaser.Utils.Array.NumberArrayStep + * @since 3.0.0 + * + * @param {number} [start=0] - The start of the range. + * @param {number} [end=null] - The end of the range. + * @param {number} [step=1] - The value to increment or decrement by. + * + * @return {number[]} The array of number values. + */ +var NumberArrayStep = function (start, end, step) +{ + if (start === undefined) { start = 0; } + if (end === undefined) { end = null; } + if (step === undefined) { step = 1; } + + if (end === null) + { + end = start; + start = 0; + } + + var result = []; + + var total = Math.max(RoundAwayFromZero((end - start) / (step || 1)), 0); + + for (var i = 0; i < total; i++) + { + result.push(start); + start += step; + } + + return result; +}; + +module.exports = NumberArrayStep; + + +/***/ }), +/* 272 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @ignore + */ +function swap (arr, i, j) +{ + var tmp = arr[i]; + arr[i] = arr[j]; + arr[j] = tmp; +} + +/** + * @ignore + */ +function defaultCompare (a, b) +{ + return a < b ? -1 : a > b ? 1 : 0; +} + +/** + * A [Floyd-Rivest](https://en.wikipedia.org/wiki/Floyd%E2%80%93Rivest_algorithm) quick selection algorithm. + * + * Rearranges the array items so that all items in the [left, k] range are smaller than all items in [k, right]; + * The k-th element will have the (k - left + 1)th smallest value in [left, right]. + * + * The array is modified in-place. + * + * Based on code by [Vladimir Agafonkin](https://www.npmjs.com/~mourner) + * + * @function Phaser.Utils.Array.QuickSelect + * @since 3.0.0 + * + * @param {array} arr - The array to sort. + * @param {integer} k - The k-th element index. + * @param {integer} [left=0] - The index of the left part of the range. + * @param {integer} [right] - The index of the right part of the range. + * @param {function} [compare] - An optional comparison function. Is passed two elements and should return 0, 1 or -1. + */ +var QuickSelect = function (arr, k, left, right, compare) +{ + if (left === undefined) { left = 0; } + if (right === undefined) { right = arr.length - 1; } + if (compare === undefined) { compare = defaultCompare; } + + while (right > left) + { + if (right - left > 600) + { + var n = right - left + 1; + var m = k - left + 1; + var z = Math.log(n); + var s = 0.5 * Math.exp(2 * z / 3); + var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1); + var newLeft = Math.max(left, Math.floor(k - m * s / n + sd)); + var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd)); + + QuickSelect(arr, k, newLeft, newRight, compare); + } + + var t = arr[k]; + var i = left; + var j = right; + + swap(arr, left, k); + + if (compare(arr[right], t) > 0) + { + swap(arr, left, right); + } + + while (i < j) + { + swap(arr, i, j); + + i++; + j--; + + while (compare(arr[i], t) < 0) + { + i++; + } + + while (compare(arr[j], t) > 0) + { + j--; + } + } + + if (compare(arr[left], t) === 0) + { + swap(arr, left, j); + } + else + { + j++; + swap(arr, j, right); + } + + if (j <= k) + { + left = j + 1; + } + + if (k <= j) + { + right = j - 1; + } + } +}; + +module.exports = QuickSelect; + + +/***/ }), +/* 273 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetValue = __webpack_require__(6); +var Shuffle = __webpack_require__(58); + +var BuildChunk = function (a, b, qty) +{ + var out = []; + + for (var aIndex = 0; aIndex < a.length; aIndex++) + { + for (var bIndex = 0; bIndex < b.length; bIndex++) + { + for (var i = 0; i < qty; i++) + { + out.push({ a: a[aIndex], b: b[bIndex] }); + } + } + } + + return out; +}; + +/** + * Creates an array populated with a range of values, based on the given arguments and configuration object. + * + * Range ([a,b,c], [1,2,3]) = + * a1, a2, a3, b1, b2, b3, c1, c2, c3 + * + * Range ([a,b], [1,2,3], qty = 3) = + * a1, a1, a1, a2, a2, a2, a3, a3, a3, b1, b1, b1, b2, b2, b2, b3, b3, b3 + * + * Range ([a,b,c], [1,2,3], repeat x1) = + * a1, a2, a3, b1, b2, b3, c1, c2, c3, a1, a2, a3, b1, b2, b3, c1, c2, c3 + * + * Range ([a,b], [1,2], repeat -1 = endless, max = 14) = + * Maybe if max is set then repeat goes to -1 automatically? + * a1, a2, b1, b2, a1, a2, b1, b2, a1, a2, b1, b2, a1, a2 (capped at 14 elements) + * + * Range ([a], [1,2,3,4,5], random = true) = + * a4, a1, a5, a2, a3 + * + * Range ([a, b], [1,2,3], random = true) = + * b3, a2, a1, b1, a3, b2 + * + * Range ([a, b, c], [1,2,3], randomB = true) = + * a3, a1, a2, b2, b3, b1, c1, c3, c2 + * + * Range ([a], [1,2,3,4,5], yoyo = true) = + * a1, a2, a3, a4, a5, a5, a4, a3, a2, a1 + * + * Range ([a, b], [1,2,3], yoyo = true) = + * a1, a2, a3, b1, b2, b3, b3, b2, b1, a3, a2, a1 + * + * @function Phaser.Utils.Array.Range + * @since 3.0.0 + * + * @param {array} a - The first array of range elements. + * @param {array} b - The second array of range elements. + * @param {object} [options] - A range configuration object. Can contain: repeat, random, randomB, yoyo, max, qty. + * + * @return {array} An array of arranged elements. + */ +var Range = function (a, b, options) +{ + var max = GetValue(options, 'max', 0); + var qty = GetValue(options, 'qty', 1); + var random = GetValue(options, 'random', false); + var randomB = GetValue(options, 'randomB', false); + var repeat = GetValue(options, 'repeat', 0); + var yoyo = GetValue(options, 'yoyo', false); + + var out = []; + + if (randomB) + { + Shuffle(b); + } + + // Endless repeat, so limit by max + if (repeat === -1) + { + if (max === 0) + { + repeat = 0; + } + else + { + // Work out how many repeats we need + var total = (a.length * b.length) * qty; + + if (yoyo) + { + total *= 2; + } + + repeat = Math.ceil(max / total); + } + } + + for (var i = 0; i <= repeat; i++) + { + var chunk = BuildChunk(a, b, qty); + + if (random) + { + Shuffle(chunk); + } + + out = out.concat(chunk); + + if (yoyo) + { + chunk.reverse(); + + out = out.concat(chunk); + } + } + + if (max) + { + out.splice(max); + } + + return out; +}; + +module.exports = Range; + + +/***/ }), +/* 274 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SpliceOne = __webpack_require__(13); + +/** + * Removes the given item, or array of items, from the array. + * + * The array is modified in-place. + * + * You can optionally specify a callback to be invoked for each item successfully removed from the array. + * + * @function Phaser.Utils.Array.Remove + * @since 3.4.0 + * + * @param {array} array - The array to be modified. + * @param {*|Array.<*>} item - The item, or array of items, to be removed from the array. + * @param {function} [callback] - A callback to be invoked for each item successfully removed from the array. + * @param {object} [context] - The context in which the callback is invoked. + * + * @return {*|Array.<*>} The item, or array of items, that were successfully removed from the array. + */ +var Remove = function (array, item, callback, context) +{ + if (context === undefined) { context = array; } + + var index; + + // Fast path to avoid array mutation and iteration + if (!Array.isArray(item)) + { + index = array.indexOf(item); + + if (index !== -1) + { + SpliceOne(array, index); + + if (callback) + { + callback.call(context, item); + } + + return item; + } + else + { + return null; + } + } + + // If we got this far, we have an array of items to remove + + var itemLength = item.length - 1; + + while (itemLength >= 0) + { + var entry = item[itemLength]; + + index = array.indexOf(entry); + + if (index !== -1) + { + SpliceOne(array, index); + + if (callback) + { + callback.call(context, entry); + } + } + else + { + // Item wasn't found in the array, so remove it from our return results + item.pop(); + } + + itemLength--; + } + + return item; +}; + +module.exports = Remove; + + +/***/ }), +/* 275 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SpliceOne = __webpack_require__(13); + +/** + * Removes the item from the given position in the array. + * + * The array is modified in-place. + * + * You can optionally specify a callback to be invoked for the item if it is successfully removed from the array. + * + * @function Phaser.Utils.Array.RemoveAt + * @since 3.4.0 + * + * @param {array} array - The array to be modified. + * @param {integer} index - The array index to remove the item from. The index must be in bounds or it will throw an error. + * @param {function} [callback] - A callback to be invoked for the item removed from the array. + * @param {object} [context] - The context in which the callback is invoked. + * + * @return {*} The item that was removed. + */ +var RemoveAt = function (array, index, callback, context) +{ + if (context === undefined) { context = array; } + + if (index < 0 || index > array.length - 1) + { + throw new Error('Index out of bounds'); + } + + var item = SpliceOne(array, index); + + if (callback) + { + callback.call(context, item); + } + + return item; +}; + +module.exports = RemoveAt; + + +/***/ }), +/* 276 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SafeRange = __webpack_require__(4); + +/** + * Removes the item within the given range in the array. + * + * The array is modified in-place. + * + * You can optionally specify a callback to be invoked for the item/s successfully removed from the array. + * + * @function Phaser.Utils.Array.RemoveBetween + * @since 3.4.0 + * + * @param {array} array - The array to be modified. + * @param {integer} startIndex - The start index to remove from. + * @param {integer} endIndex - The end index to remove to. + * @param {function} [callback] - A callback to be invoked for the item removed from the array. + * @param {object} [context] - The context in which the callback is invoked. + * + * @return {Array.<*>} An array of items that were removed. + */ +var RemoveBetween = function (array, startIndex, endIndex, callback, context) +{ + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = array.length; } + if (context === undefined) { context = array; } + + if (SafeRange(array, startIndex, endIndex)) + { + var size = endIndex - startIndex; + + var removed = array.splice(startIndex, size); + + if (callback) + { + for (var i = 0; i < removed.length; i++) + { + var entry = removed[i]; + + callback.call(context, entry); + } + } + + return removed; + } + else + { + return []; + } +}; + +module.exports = RemoveBetween; + + +/***/ }), +/* 277 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SpliceOne = __webpack_require__(13); + +/** + * Removes a random object from the given array and returns it. + * Will return null if there are no array items that fall within the specified range or if there is no item for the randomly chosen index. + * + * @function Phaser.Utils.Array.RemoveRandomElement + * @since 3.0.0 + * + * @param {array} array - The array to removed a random element from. + * @param {integer} [start=0] - The array index to start the search from. + * @param {integer} [length=array.length] - Optional restriction on the number of elements to randomly select from. + * + * @return {object} The random element that was removed, or `null` if there were no array elements that fell within the given range. + */ +var RemoveRandomElement = function (array, start, length) +{ + if (start === undefined) { start = 0; } + if (length === undefined) { length = array.length; } + + var randomIndex = start + Math.floor(Math.random() * length); + + return SpliceOne(array, randomIndex); +}; + +module.exports = RemoveRandomElement; + + +/***/ }), +/* 278 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Replaces an element of the array with the new element. + * The new element cannot already be a member of the array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.Replace + * @since 3.4.0 + * + * @param {array} array - The array to search within. + * @param {*} oldChild - The element in the array that will be replaced. + * @param {*} newChild - The element to be inserted into the array at the position of `oldChild`. + * + * @return {boolean} Returns true if the oldChild was successfully replaced, otherwise returns false. + */ +var Replace = function (array, oldChild, newChild) +{ + var index1 = array.indexOf(oldChild); + var index2 = array.indexOf(newChild); + + if (index1 !== -1 && index2 === -1) + { + array[index1] = newChild; + + return true; + } + else + { + return false; + } +}; + +module.exports = Replace; + + +/***/ }), +/* 279 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the element at the start of the array to the end, shifting all items in the process. + * The "rotation" happens to the left. + * + * @function Phaser.Utils.Array.RotateLeft + * @since 3.0.0 + * + * @param {array} array - The array to shift to the left. This array is modified in place. + * @param {integer} [total=1] - The number of times to shift the array. + * + * @return {*} The most recently shifted element. + */ +var RotateLeft = function (array, total) +{ + if (total === undefined) { total = 1; } + + var element = null; + + for (var i = 0; i < total; i++) + { + element = array.shift(); + array.push(element); + } + + return element; +}; + +module.exports = RotateLeft; + + +/***/ }), +/* 280 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the element at the end of the array to the start, shifting all items in the process. + * The "rotation" happens to the right. + * + * @function Phaser.Utils.Array.RotateRight + * @since 3.0.0 + * + * @param {array} array - The array to shift to the right. This array is modified in place. + * @param {integer} [total=1] - The number of times to shift the array. + * + * @return {*} The most recently shifted element. + */ +var RotateRight = function (array, total) +{ + if (total === undefined) { total = 1; } + + var element = null; + + for (var i = 0; i < total; i++) + { + element = array.pop(); + array.unshift(element); + } + + return element; +}; + +module.exports = RotateRight; + + +/***/ }), +/* 281 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the given element to the bottom of the array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.SendToBack + * @since 3.4.0 + * + * @param {array} array - The array. + * @param {*} item - The element to move. + * + * @return {*} The element that was moved. + */ +var SendToBack = function (array, item) +{ + var currentIndex = array.indexOf(item); + + if (currentIndex !== -1 && currentIndex > 0) + { + array.splice(currentIndex, 1); + array.unshift(item); + } + + return item; +}; + +module.exports = SendToBack; + + +/***/ }), +/* 282 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SafeRange = __webpack_require__(4); + +/** + * Scans the array for elements with the given property. If found, the property is set to the `value`. + * + * For example: `SetAll('visible', true)` would set all elements that have a `visible` property to `false`. + * + * Optionally you can specify a start and end index. For example if the array had 100 elements, + * and you set `startIndex` to 0 and `endIndex` to 50, it would update only the first 50 elements. + * + * @function Phaser.Utils.Array.SetAll + * @since 3.4.0 + * + * @param {array} array - The array to search. + * @param {string} property - The property to test for on each array element. + * @param {*} value - The value to set the property to. + * @param {integer} [startIndex] - An optional start index to search from. + * @param {integer} [endIndex] - An optional end index to search to. + * + * @return {array} The input array. + */ +var SetAll = function (array, property, value, startIndex, endIndex) +{ + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = array.length; } + + if (SafeRange(array, startIndex, endIndex)) + { + for (var i = startIndex; i < endIndex; i++) + { + var entry = array[i]; + + if (entry.hasOwnProperty(property)) + { + entry[property] = value; + } + } + } + + return array; +}; + +module.exports = SetAll; + + +/***/ }), +/* 283 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +//! stable.js 0.1.6, https://github.com/Two-Screen/stable +//! © 2017 Angry Bytes and contributors. MIT licensed. + +/** + * @namespace Phaser.Utils.Array.StableSortFunctions + */ + +(function() { + + /** + * A stable array sort, because `Array#sort()` is not guaranteed stable. + * This is an implementation of merge sort, without recursion. + * + * @function Phaser.Utils.Array.StableSort + * @since 3.0.0 + * + * @param {array} arr - The input array to be sorted. + * @param {function} comp - The comparison handler. + * + * @return {array} The sorted result. + */ +var stable = function(arr, comp) { + return exec(arr.slice(), comp); +}; + + /** + * Sort the input array and simply copy it back if the result isn't in the original array, which happens on an odd number of passes. + * + * @function Phaser.Utils.Array.StableSortFunctions.inplace + * @memberof Phaser.Utils.Array.StableSortFunctions + * @since 3.0.0 + * + * @param {array} arr - The input array. + * @param {function} comp - The comparison handler. + * + * @return {array} The sorted array. + */ +stable.inplace = function(arr, comp) { + var result = exec(arr, comp); + + // This simply copies back if the result isn't in the original array, + // which happens on an odd number of passes. + if (result !== arr) { + pass(result, null, arr.length, arr); + } + + return arr; +}; + +// Execute the sort using the input array and a second buffer as work space. +// Returns one of those two, containing the final result. +function exec(arr, comp) { + if (typeof(comp) !== 'function') { + comp = function(a, b) { + return String(a).localeCompare(b); + }; + } + + // Short-circuit when there's nothing to sort. + var len = arr.length; + if (len <= 1) { + return arr; + } + + // Rather than dividing input, simply iterate chunks of 1, 2, 4, 8, etc. + // Chunks are the size of the left or right hand in merge sort. + // Stop when the left-hand covers all of the array. + var buffer = new Array(len); + for (var chk = 1; chk < len; chk *= 2) { + pass(arr, comp, chk, buffer); + + var tmp = arr; + arr = buffer; + buffer = tmp; + } + + return arr; +} + +// Run a single pass with the given chunk size. +var pass = function(arr, comp, chk, result) { + var len = arr.length; + var i = 0; + // Step size / double chunk size. + var dbl = chk * 2; + // Bounds of the left and right chunks. + var l, r, e; + // Iterators over the left and right chunk. + var li, ri; + + // Iterate over pairs of chunks. + for (l = 0; l < len; l += dbl) { + r = l + chk; + e = r + chk; + if (r > len) r = len; + if (e > len) e = len; + + // Iterate both chunks in parallel. + li = l; + ri = r; + while (true) { + // Compare the chunks. + if (li < r && ri < e) { + // This works for a regular `sort()` compatible comparator, + // but also for a simple comparator like: `a > b` + if (comp(arr[li], arr[ri]) <= 0) { + result[i++] = arr[li++]; + } + else { + result[i++] = arr[ri++]; + } + } + // Nothing to compare, just flush what's left. + else if (li < r) { + result[i++] = arr[li++]; + } + else if (ri < e) { + result[i++] = arr[ri++]; + } + // Both iterators are at the chunk ends. + else { + break; + } + } + } +}; + +// Export using CommonJS or to the window. +if (true) { + module.exports = stable; +} +else {} + +})(); + +/***/ }), +/* 284 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Swaps the position of two elements in the given array. + * The elements must exist in the same array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.Swap + * @since 3.4.0 + * + * @param {array} array - The input array. + * @param {*} item1 - The first element to swap. + * @param {*} item2 - The second element to swap. + * + * @return {array} The input array. + */ +var Swap = function (array, item1, item2) +{ + if (item1 === item2) + { + return; + } + + var index1 = array.indexOf(item1); + var index2 = array.indexOf(item2); + + if (index1 < 0 || index2 < 0) + { + throw new Error('Supplied items must be elements of the same array'); + } + + array[index1] = item2; + array[index2] = item1; + + return array; +}; + +module.exports = Swap; + + +/***/ }), +/* 285 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.GameObjects.Components + */ + +module.exports = { + + Alpha: __webpack_require__(286), + AlphaSingle: __webpack_require__(287), + Animation: __webpack_require__(288), + BlendMode: __webpack_require__(309), + ComputedSize: __webpack_require__(46), + Crop: __webpack_require__(310), + Depth: __webpack_require__(47), + Flip: __webpack_require__(48), + GetBounds: __webpack_require__(311), + Mask: __webpack_require__(320), + Origin: __webpack_require__(340), + PathFollower: __webpack_require__(341), + Pipeline: __webpack_require__(344), + ScrollFactor: __webpack_require__(49), + Size: __webpack_require__(345), + Texture: __webpack_require__(346), + TextureCrop: __webpack_require__(347), + Tint: __webpack_require__(348), + ToJSON: __webpack_require__(54), + Transform: __webpack_require__(50), + TransformMatrix: __webpack_require__(51), + Visible: __webpack_require__(52) + +}; + + +/***/ }), +/* 286 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Clamp = __webpack_require__(5); + +// bitmask flag for GameObject.renderMask +var _FLAG = 2; // 0010 + +/** + * Provides methods used for setting the alpha properties of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.Alpha + * @since 3.0.0 + */ + +var Alpha = { + + /** + * Private internal value. Holds the global alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alpha + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alpha: 1, + + /** + * Private internal value. Holds the top-left alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alphaTL + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alphaTL: 1, + + /** + * Private internal value. Holds the top-right alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alphaTR + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alphaTR: 1, + + /** + * Private internal value. Holds the bottom-left alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alphaBL + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alphaBL: 1, + + /** + * Private internal value. Holds the bottom-right alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alphaBR + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alphaBR: 1, + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + * + * @method Phaser.GameObjects.Components.Alpha#clearAlpha + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + clearAlpha: function () + { + return this.setAlpha(1); + }, + + /** + * 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. + * + * If your game is running under WebGL you can optionally specify four different alpha values, each of which + * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. + * + * @method Phaser.GameObjects.Components.Alpha#setAlpha + * @since 3.0.0 + * + * @param {number} [topLeft=1] - The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. + * @param {number} [topRight] - The alpha value used for the top-right of the Game Object. WebGL only. + * @param {number} [bottomLeft] - The alpha value used for the bottom-left of the Game Object. WebGL only. + * @param {number} [bottomRight] - The alpha value used for the bottom-right of the Game Object. WebGL only. + * + * @return {this} This Game Object instance. + */ + setAlpha: function (topLeft, topRight, bottomLeft, bottomRight) + { + if (topLeft === undefined) { topLeft = 1; } + + // Treat as if there is only one alpha value for the whole Game Object + if (topRight === undefined) + { + this.alpha = topLeft; + } + else + { + this._alphaTL = Clamp(topLeft, 0, 1); + this._alphaTR = Clamp(topRight, 0, 1); + this._alphaBL = Clamp(bottomLeft, 0, 1); + this._alphaBR = Clamp(bottomRight, 0, 1); + } + + return this; + }, + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + * + * @name Phaser.GameObjects.Components.Alpha#alpha + * @type {number} + * @since 3.0.0 + */ + alpha: { + + get: function () + { + return this._alpha; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alpha = v; + this._alphaTL = v; + this._alphaTR = v; + this._alphaBL = v; + this._alphaBR = v; + + if (v === 0) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The alpha value starting from the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Alpha#alphaTopLeft + * @type {number} + * @webglOnly + * @since 3.0.0 + */ + alphaTopLeft: { + + get: function () + { + return this._alphaTL; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alphaTL = v; + + if (v !== 0) + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The alpha value starting from the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Alpha#alphaTopRight + * @type {number} + * @webglOnly + * @since 3.0.0 + */ + alphaTopRight: { + + get: function () + { + return this._alphaTR; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alphaTR = v; + + if (v !== 0) + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The alpha value starting from the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Alpha#alphaBottomLeft + * @type {number} + * @webglOnly + * @since 3.0.0 + */ + alphaBottomLeft: { + + get: function () + { + return this._alphaBL; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alphaBL = v; + + if (v !== 0) + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The alpha value starting from the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Alpha#alphaBottomRight + * @type {number} + * @webglOnly + * @since 3.0.0 + */ + alphaBottomRight: { + + get: function () + { + return this._alphaBR; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alphaBR = v; + + if (v !== 0) + { + this.renderFlags |= _FLAG; + } + } + + } + +}; + +module.exports = Alpha; + + +/***/ }), +/* 287 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Clamp = __webpack_require__(5); + +// bitmask flag for GameObject.renderMask +var _FLAG = 2; // 0010 + +/** + * Provides methods used for setting the alpha property of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.AlphaSingle + * @since 3.22.0 + */ + +var AlphaSingle = { + + /** + * Private internal value. Holds the global alpha value. + * + * @name Phaser.GameObjects.Components.AlphaSingle#_alpha + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alpha: 1, + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + * + * @method Phaser.GameObjects.Components.AlphaSingle#clearAlpha + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + clearAlpha: function () + { + return this.setAlpha(1); + }, + + /** + * 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. + * + * @method Phaser.GameObjects.Components.AlphaSingle#setAlpha + * @since 3.0.0 + * + * @param {number} [value=1] - The alpha value applied across the whole Game Object. + * + * @return {this} This Game Object instance. + */ + setAlpha: function (value) + { + if (value === undefined) { value = 1; } + + this.alpha = value; + + return this; + }, + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + * + * @name Phaser.GameObjects.Components.AlphaSingle#alpha + * @type {number} + * @since 3.0.0 + */ + alpha: { + + get: function () + { + return this._alpha; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alpha = v; + + if (v === 0) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + } + + } + +}; + +module.exports = AlphaSingle; + + +/***/ }), +/* 288 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var BaseAnimation = __webpack_require__(289); +var Class = __webpack_require__(0); +var Events = __webpack_require__(59); + +/** + * @classdesc + * A Game Object Animation Controller. + * + * This controller lives as an instance within a Game Object, accessible as `sprite.anims`. + * + * @class Animation + * @memberof Phaser.GameObjects.Components + * @constructor + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} parent - The Game Object to which this animation controller belongs. + */ +var Animation = new Class({ + + initialize: + + function Animation (parent) + { + /** + * The Game Object to which this animation controller belongs. + * + * @name Phaser.GameObjects.Components.Animation#parent + * @type {Phaser.GameObjects.GameObject} + * @since 3.0.0 + */ + this.parent = parent; + + /** + * A reference to the global Animation Manager. + * + * @name Phaser.GameObjects.Components.Animation#animationManager + * @type {Phaser.Animations.AnimationManager} + * @since 3.0.0 + */ + this.animationManager = parent.scene.sys.anims; + + this.animationManager.once(Events.REMOVE_ANIMATION, this.remove, this); + + /** + * Is an animation currently playing or not? + * + * @name Phaser.GameObjects.Components.Animation#isPlaying + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.isPlaying = false; + + /** + * The current Animation loaded into this Animation Controller. + * + * @name Phaser.GameObjects.Components.Animation#currentAnim + * @type {?Phaser.Animations.Animation} + * @default null + * @since 3.0.0 + */ + this.currentAnim = null; + + /** + * The current AnimationFrame being displayed by this Animation Controller. + * + * @name Phaser.GameObjects.Components.Animation#currentFrame + * @type {?Phaser.Animations.AnimationFrame} + * @default null + * @since 3.0.0 + */ + this.currentFrame = null; + + /** + * The key of the next Animation to be loaded into this Animation Controller when the current animation completes. + * + * @name Phaser.GameObjects.Components.Animation#nextAnim + * @type {?string} + * @default null + * @since 3.16.0 + */ + this.nextAnim = null; + + /** + * A queue of keys of the next Animations to be loaded into this Animation Controller when the current animation completes. + * + * @name Phaser.GameObjects.Components.Animation#nextAnimsQueue + * @type {string[]} + * @since 3.24.0 + */ + this.nextAnimsQueue = []; + + /** + * Time scale factor. + * + * @name Phaser.GameObjects.Components.Animation#_timeScale + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + this._timeScale = 1; + + /** + * The frame rate of playback in frames per second. + * The default is 24 if the `duration` property is `null`. + * + * @name Phaser.GameObjects.Components.Animation#frameRate + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.frameRate = 0; + + /** + * How long the animation should play for, in milliseconds. + * If the `frameRate` property has been set then it overrides this value, + * otherwise the `frameRate` is derived from `duration`. + * + * @name Phaser.GameObjects.Components.Animation#duration + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.duration = 0; + + /** + * ms per frame, not including frame specific modifiers that may be present in the Animation data. + * + * @name Phaser.GameObjects.Components.Animation#msPerFrame + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.msPerFrame = 0; + + /** + * Skip frames if the time lags, or always advanced anyway? + * + * @name Phaser.GameObjects.Components.Animation#skipMissedFrames + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.skipMissedFrames = true; + + /** + * A delay before starting playback, in milliseconds. + * + * @name Phaser.GameObjects.Components.Animation#_delay + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._delay = 0; + + /** + * Number of times to repeat the animation (-1 for infinity) + * + * @name Phaser.GameObjects.Components.Animation#_repeat + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._repeat = 0; + + /** + * Delay before the repeat starts, in milliseconds. + * + * @name Phaser.GameObjects.Components.Animation#_repeatDelay + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._repeatDelay = 0; + + /** + * Should the animation yoyo? (reverse back down to the start) before repeating? + * + * @name Phaser.GameObjects.Components.Animation#_yoyo + * @type {boolean} + * @private + * @default false + * @since 3.0.0 + */ + this._yoyo = false; + + /** + * Will the playhead move forwards (`true`) or in reverse (`false`). + * + * @name Phaser.GameObjects.Components.Animation#forward + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.forward = true; + + /** + * An Internal trigger that's play the animation in reverse mode ('true') or not ('false'), + * needed because forward can be changed by yoyo feature. + * + * @name Phaser.GameObjects.Components.Animation#_reverse + * @type {boolean} + * @default false + * @private + * @since 3.12.0 + */ + this._reverse = false; + + /** + * Internal time overflow accumulator. + * + * @name Phaser.GameObjects.Components.Animation#accumulator + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.accumulator = 0; + + /** + * The time point at which the next animation frame will change. + * + * @name Phaser.GameObjects.Components.Animation#nextTick + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.nextTick = 0; + + /** + * An internal counter keeping track of how many repeats are left to play. + * + * @name Phaser.GameObjects.Components.Animation#repeatCounter + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.repeatCounter = 0; + + /** + * An internal flag keeping track of pending repeats. + * + * @name Phaser.GameObjects.Components.Animation#pendingRepeat + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.pendingRepeat = false; + + /** + * Is the Animation paused? + * + * @name Phaser.GameObjects.Components.Animation#_paused + * @type {boolean} + * @private + * @default false + * @since 3.0.0 + */ + this._paused = false; + + /** + * Was the animation previously playing before being paused? + * + * @name Phaser.GameObjects.Components.Animation#_wasPlaying + * @type {boolean} + * @private + * @default false + * @since 3.0.0 + */ + this._wasPlaying = false; + + /** + * Internal property tracking if this Animation is waiting to stop. + * + * 0 = No + * 1 = Waiting for ms to pass + * 2 = Waiting for repeat + * 3 = Waiting for specific frame + * + * @name Phaser.GameObjects.Components.Animation#_pendingStop + * @type {integer} + * @private + * @since 3.4.0 + */ + this._pendingStop = 0; + + /** + * Internal property used by _pendingStop. + * + * @name Phaser.GameObjects.Components.Animation#_pendingStopValue + * @type {any} + * @private + * @since 3.4.0 + */ + this._pendingStopValue; + }, + + /** + * Sets an animation to be played immediately after the current one completes. + * + * The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc, or have the `stop` method called directly on it. + * + * An animation set to repeat forever will never enter a completed state. + * + * You can chain a new animation at any point, including before the current one starts playing, during it, or when it ends (via its `animationcomplete` callback). + * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained animations without impacting the global animation they're playing. + * + * Call this method with no arguments to reset the chained animation. + * + * @method Phaser.GameObjects.Components.Animation#chain + * @since 3.16.0 + * + * @param {(string|Phaser.Animations.Animation)} [key] - The string-based key of the animation to play next, as defined previously in the Animation Manager. Or an Animation instance. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + chain: function (key) + { + if (key instanceof BaseAnimation) + { + key = key.key; + } + + if (this.nextAnim === null) + { + this.nextAnim = key; + } + else + { + this.nextAnimsQueue.push(key); + } + + return this.parent; + }, + + /** + * Sets the amount of time, in milliseconds, that the animation will be delayed before starting playback. + * + * @method Phaser.GameObjects.Components.Animation#setDelay + * @since 3.4.0 + * + * @param {integer} [value=0] - The amount of time, in milliseconds, to wait before starting playback. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + setDelay: function (value) + { + if (value === undefined) { value = 0; } + + this._delay = value; + + return this.parent; + }, + + /** + * Gets the amount of time, in milliseconds that the animation will be delayed before starting playback. + * + * @method Phaser.GameObjects.Components.Animation#getDelay + * @since 3.4.0 + * + * @return {integer} The amount of time, in milliseconds, the Animation will wait before starting playback. + */ + getDelay: function () + { + return this._delay; + }, + + /** + * Waits for the specified delay, in milliseconds, then starts playback of the requested animation. + * + * @method Phaser.GameObjects.Components.Animation#delayedPlay + * @since 3.0.0 + * + * @param {integer} delay - The delay, in milliseconds, to wait before starting the animation playing. + * @param {string} key - The key of the animation to play. + * @param {integer} [startFrame=0] - The frame of the animation to start from. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + delayedPlay: function (delay, key, startFrame) + { + this.play(key, true, startFrame); + + this.nextTick += delay; + + return this.parent; + }, + + /** + * Returns the key of the animation currently loaded into this component. + * + * @method Phaser.GameObjects.Components.Animation#getCurrentKey + * @since 3.0.0 + * + * @return {string} The key of the Animation loaded into this component. + */ + getCurrentKey: function () + { + if (this.currentAnim) + { + return this.currentAnim.key; + } + }, + + /** + * Internal method used to load an animation into this component. + * + * @method Phaser.GameObjects.Components.Animation#load + * @protected + * @since 3.0.0 + * + * @param {string} key - The key of the animation to load. + * @param {integer} [startFrame=0] - The start frame of the animation to load. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + load: function (key, startFrame) + { + if (startFrame === undefined) { startFrame = 0; } + + if (this.isPlaying) + { + this.stop(); + } + + // Load the new animation in + this.animationManager.load(this, key, startFrame); + + return this.parent; + }, + + /** + * Pause the current animation and set the `isPlaying` property to `false`. + * You can optionally pause it at a specific frame. + * + * @method Phaser.GameObjects.Components.Animation#pause + * @since 3.0.0 + * + * @param {Phaser.Animations.AnimationFrame} [atFrame] - An optional frame to set after pausing the animation. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + pause: function (atFrame) + { + if (!this._paused) + { + this._paused = true; + this._wasPlaying = this.isPlaying; + this.isPlaying = false; + } + + if (atFrame !== undefined) + { + this.updateFrame(atFrame); + } + + return this.parent; + }, + + /** + * Resumes playback of a paused animation and sets the `isPlaying` property to `true`. + * You can optionally tell it to start playback from a specific frame. + * + * @method Phaser.GameObjects.Components.Animation#resume + * @since 3.0.0 + * + * @param {Phaser.Animations.AnimationFrame} [fromFrame] - An optional frame to set before restarting playback. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + resume: function (fromFrame) + { + if (this._paused) + { + this._paused = false; + this.isPlaying = this._wasPlaying; + } + + if (fromFrame !== undefined) + { + this.updateFrame(fromFrame); + } + + return this.parent; + }, + + /** + * `true` if the current animation is paused, otherwise `false`. + * + * @name Phaser.GameObjects.Components.Animation#isPaused + * @readonly + * @type {boolean} + * @since 3.4.0 + */ + isPaused: { + + get: function () + { + return this._paused; + } + + }, + + /** + * Plays an Animation on a Game Object that has the Animation component, such as a Sprite. + * + * Animations are stored in the global Animation Manager and are referenced by a unique string-based key. + * + * @method Phaser.GameObjects.Components.Animation#play + * @fires Phaser.GameObjects.Components.Animation#onStartEvent + * @since 3.0.0 + * + * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance. + * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call. + * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + play: function (key, ignoreIfPlaying, startFrame) + { + if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } + if (startFrame === undefined) { startFrame = 0; } + + if (key instanceof BaseAnimation) + { + key = key.key; + } + + if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key) + { + return this.parent; + } + + this.forward = true; + this._reverse = false; + this._paused = false; + this._wasPlaying = true; + + return this._startAnimation(key, startFrame); + }, + + /** + * Plays an Animation (in reverse mode) on the Game Object that owns this Animation Component. + * + * @method Phaser.GameObjects.Components.Animation#playReverse + * @fires Phaser.GameObjects.Components.Animation#onStartEvent + * @since 3.12.0 + * + * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance. + * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. + * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + playReverse: function (key, ignoreIfPlaying, startFrame) + { + if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } + if (startFrame === undefined) { startFrame = 0; } + + if (key instanceof BaseAnimation) + { + key = key.key; + } + + if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key) + { + return this.parent; + } + + this.forward = false; + this._reverse = true; + + return this._startAnimation(key, startFrame); + }, + + /** + * Load an Animation and fires 'onStartEvent' event, extracted from 'play' method. + * + * @method Phaser.GameObjects.Components.Animation#_startAnimation + * @fires Phaser.Animations.Events#ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START + * @since 3.12.0 + * + * @param {string} key - The string-based key of the animation to play, as defined previously in the Animation Manager. + * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + _startAnimation: function (key, startFrame) + { + this.load(key, startFrame); + + var anim = this.currentAnim; + var gameObject = this.parent; + + if (!anim) + { + return gameObject; + } + + // Should give us 9,007,199,254,740,991 safe repeats + this.repeatCounter = (this._repeat === -1) ? Number.MAX_VALUE : this._repeat; + + anim.getFirstTick(this); + + this.isPlaying = true; + this.pendingRepeat = false; + + if (anim.showOnStart) + { + gameObject.visible = true; + } + + var frame = this.currentFrame; + + anim.emit(Events.ANIMATION_START, anim, frame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_KEY_START + key, anim, frame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_START, anim, frame, gameObject); + + return gameObject; + }, + + /** + * Reverse the Animation that is already playing on the Game Object. + * + * @method Phaser.GameObjects.Components.Animation#reverse + * @since 3.12.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + reverse: function () + { + if (this.isPlaying) + { + this._reverse = !this._reverse; + + this.forward = !this.forward; + } + + return this.parent; + }, + + /** + * Returns a value between 0 and 1 indicating how far this animation is through, ignoring repeats and yoyos. + * If the animation has a non-zero repeat defined, `getProgress` and `getTotalProgress` will be different + * because `getProgress` doesn't include any repeats or repeat delays, whereas `getTotalProgress` does. + * + * @method Phaser.GameObjects.Components.Animation#getProgress + * @since 3.4.0 + * + * @return {number} The progress of the current animation, between 0 and 1. + */ + getProgress: function () + { + var p = this.currentFrame.progress; + + if (!this.forward) + { + p = 1 - p; + } + + return p; + }, + + /** + * Takes a value between 0 and 1 and uses it to set how far this animation is through playback. + * Does not factor in repeats or yoyos, but does handle playing forwards or backwards. + * + * @method Phaser.GameObjects.Components.Animation#setProgress + * @since 3.4.0 + * + * @param {number} [value=0] - The progress value, between 0 and 1. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + setProgress: function (value) + { + if (!this.forward) + { + value = 1 - value; + } + + this.setCurrentFrame(this.currentAnim.getFrameByProgress(value)); + + return this.parent; + }, + + /** + * Handle the removal of an animation from the Animation Manager. + * + * @method Phaser.GameObjects.Components.Animation#remove + * @since 3.0.0 + * + * @param {string} [key] - The key of the removed Animation. + * @param {Phaser.Animations.Animation} [animation] - The removed Animation. + */ + remove: function (key, animation) + { + if (animation === undefined) { animation = this.currentAnim; } + + if (this.isPlaying && animation.key === this.currentAnim.key) + { + this.stop(); + + this.setCurrentFrame(this.currentAnim.frames[0]); + } + }, + + /** + * Gets the number of times that the animation will repeat + * after its first iteration. For example, if returns 1, the animation will + * play a total of twice (the initial play plus 1 repeat). + * A value of -1 means the animation will repeat indefinitely. + * + * @method Phaser.GameObjects.Components.Animation#getRepeat + * @since 3.4.0 + * + * @return {integer} The number of times that the animation will repeat. + */ + getRepeat: function () + { + return this._repeat; + }, + + /** + * Sets the number of times that the animation should repeat + * after its first iteration. For example, if repeat is 1, the animation will + * play a total of twice (the initial play plus 1 repeat). + * To repeat indefinitely, use -1. repeat should always be an integer. + * + * @method Phaser.GameObjects.Components.Animation#setRepeat + * @since 3.4.0 + * + * @param {integer} value - The number of times that the animation should repeat. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + setRepeat: function (value) + { + this._repeat = value; + + this.repeatCounter = (value === -1) ? Number.MAX_VALUE : value; + + return this.parent; + }, + + /** + * Gets the amount of delay between repeats, if any. + * + * @method Phaser.GameObjects.Components.Animation#getRepeatDelay + * @since 3.4.0 + * + * @return {number} The delay between repeats. + */ + getRepeatDelay: function () + { + return this._repeatDelay; + }, + + /** + * Sets the amount of time in seconds between repeats. + * For example, if `repeat` is 2 and `repeatDelay` is 10, the animation will play initially, + * then wait for 10 seconds before repeating, then play again, then wait another 10 seconds + * before doing its final repeat. + * + * @method Phaser.GameObjects.Components.Animation#setRepeatDelay + * @since 3.4.0 + * + * @param {number} value - The delay to wait between repeats, in seconds. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + setRepeatDelay: function (value) + { + this._repeatDelay = value; + + return this.parent; + }, + + /** + * Restarts the current animation from its beginning, optionally including its delay value. + * + * @method Phaser.GameObjects.Components.Animation#restart + * @fires Phaser.Animations.Events#ANIMATION_RESTART + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_RESTART + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART + * @since 3.0.0 + * + * @param {boolean} [includeDelay=false] - Whether to include the delay value of the animation when restarting. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + restart: function (includeDelay) + { + if (includeDelay === undefined) { includeDelay = false; } + + var anim = this.currentAnim; + + anim.getFirstTick(this, includeDelay); + + this.forward = true; + this.isPlaying = true; + this.pendingRepeat = false; + this._paused = false; + + // Set frame + this.updateFrame(anim.frames[0]); + + var gameObject = this.parent; + var frame = this.currentFrame; + + anim.emit(Events.ANIMATION_RESTART, anim, frame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_KEY_RESTART + anim.key, anim, frame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_RESTART, anim, frame, gameObject); + + return this.parent; + }, + + /** + * Immediately stops the current animation from playing and dispatches the `animationcomplete` event. + * + * If no animation is set, no event will be dispatched. + * + * If there is another animation queued (via the `chain` method) then it will start playing immediately. + * + * @method Phaser.GameObjects.Components.Animation#stop + * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent + * @since 3.0.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stop: function () + { + this._pendingStop = 0; + + this.isPlaying = false; + + var gameObject = this.parent; + var anim = this.currentAnim; + var frame = this.currentFrame; + + if (anim) + { + anim.emit(Events.ANIMATION_COMPLETE, anim, frame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_KEY_COMPLETE + anim.key, anim, frame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_COMPLETE, anim, frame, gameObject); + } + + if (this.nextAnim) + { + var key = this.nextAnim; + + this.nextAnim = (this.nextAnimsQueue.length > 0) ? this.nextAnimsQueue.shift() : null; + + this.play(key); + } + + return gameObject; + }, + + /** + * Stops the current animation from playing after the specified time delay, given in milliseconds. + * + * @method Phaser.GameObjects.Components.Animation#stopAfterDelay + * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent + * @since 3.4.0 + * + * @param {integer} delay - The number of milliseconds to wait before stopping this animation. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stopAfterDelay: function (delay) + { + this._pendingStop = 1; + this._pendingStopValue = delay; + + return this.parent; + }, + + /** + * Stops the current animation from playing when it next repeats. + * + * @method Phaser.GameObjects.Components.Animation#stopOnRepeat + * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent + * @since 3.4.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stopOnRepeat: function () + { + this._pendingStop = 2; + + return this.parent; + }, + + /** + * Stops the current animation from playing when it next sets the given frame. + * If this frame doesn't exist within the animation it will not stop it from playing. + * + * @method Phaser.GameObjects.Components.Animation#stopOnFrame + * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent + * @since 3.4.0 + * + * @param {Phaser.Animations.AnimationFrame} frame - The frame to check before stopping this animation. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stopOnFrame: function (frame) + { + this._pendingStop = 3; + this._pendingStopValue = frame; + + return this.parent; + }, + + /** + * Sets the Time Scale factor, allowing you to make the animation go go faster or slower than default. + * Where 1 = normal speed (the default), 0.5 = half speed, 2 = double speed, etc. + * + * @method Phaser.GameObjects.Components.Animation#setTimeScale + * @since 3.4.0 + * + * @param {number} [value=1] - The time scale factor, where 1 is no change, 0.5 is half speed, etc. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + setTimeScale: function (value) + { + if (value === undefined) { value = 1; } + + this._timeScale = value; + + return this.parent; + }, + + /** + * Gets the Time Scale factor. + * + * @method Phaser.GameObjects.Components.Animation#getTimeScale + * @since 3.4.0 + * + * @return {number} The Time Scale value. + */ + getTimeScale: function () + { + return this._timeScale; + }, + + /** + * Returns the total number of frames in this animation. + * + * @method Phaser.GameObjects.Components.Animation#getTotalFrames + * @since 3.4.0 + * + * @return {integer} The total number of frames in this animation. + */ + getTotalFrames: function () + { + return this.currentAnim.frames.length; + }, + + /** + * The internal update loop for the Animation Component. + * + * @method Phaser.GameObjects.Components.Animation#update + * @since 3.0.0 + * + * @param {number} time - The current timestamp. + * @param {number} delta - The delta time, in ms, elapsed since the last frame. + */ + update: function (time, delta) + { + if (!this.currentAnim || !this.isPlaying || this.currentAnim.paused) + { + return; + } + + this.accumulator += delta * this._timeScale; + + if (this._pendingStop === 1) + { + this._pendingStopValue -= delta; + + if (this._pendingStopValue <= 0) + { + return this.currentAnim.completeAnimation(this); + } + } + + if (this.accumulator >= this.nextTick) + { + this.currentAnim.setFrame(this); + } + }, + + /** + * Sets the given Animation Frame as being the current frame + * and applies it to the parent Game Object, adjusting its size and origin as needed. + * + * @method Phaser.GameObjects.Components.Animation#setCurrentFrame + * @since 3.4.0 + * + * @param {Phaser.Animations.AnimationFrame} animationFrame - The Animation Frame to set as being current. + * + * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. + */ + setCurrentFrame: function (animationFrame) + { + var gameObject = this.parent; + + this.currentFrame = animationFrame; + + gameObject.texture = animationFrame.frame.texture; + gameObject.frame = animationFrame.frame; + + if (gameObject.isCropped) + { + gameObject.frame.updateCropUVs(gameObject._crop, gameObject.flipX, gameObject.flipY); + } + + gameObject.setSizeToFrame(); + + if (gameObject._originComponent) + { + if (animationFrame.frame.customPivot) + { + gameObject.setOrigin(animationFrame.frame.pivotX, animationFrame.frame.pivotY); + } + else + { + gameObject.updateDisplayOrigin(); + } + } + + return gameObject; + }, + + /** + * Internal frame change handler. + * + * @method Phaser.GameObjects.Components.Animation#updateFrame + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE + * @private + * @since 3.0.0 + * + * @param {Phaser.Animations.AnimationFrame} animationFrame - The animation frame to change to. + */ + updateFrame: function (animationFrame) + { + var gameObject = this.setCurrentFrame(animationFrame); + + if (this.isPlaying) + { + if (animationFrame.setAlpha) + { + gameObject.alpha = animationFrame.alpha; + } + + var anim = this.currentAnim; + + gameObject.emit(Events.SPRITE_ANIMATION_KEY_UPDATE + anim.key, anim, animationFrame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_UPDATE, anim, animationFrame, gameObject); + + if (this._pendingStop === 3 && this._pendingStopValue === animationFrame) + { + this.currentAnim.completeAnimation(this); + } + } + }, + + /** + * Advances the animation to the next frame, regardless of the time or animation state. + * If the animation is set to repeat, or yoyo, this will still take effect. + * + * Calling this does not change the direction of the animation. I.e. if it was currently + * playing in reverse, calling this method doesn't then change the direction to forwards. + * + * @method Phaser.GameObjects.Components.Animation#nextFrame + * @since 3.16.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. + */ + nextFrame: function () + { + if (this.currentAnim) + { + this.currentAnim.nextFrame(this); + } + + return this.parent; + }, + + /** + * Advances the animation to the previous frame, regardless of the time or animation state. + * If the animation is set to repeat, or yoyo, this will still take effect. + * + * Calling this does not change the direction of the animation. I.e. if it was currently + * playing in forwards, calling this method doesn't then change the direction to backwards. + * + * @method Phaser.GameObjects.Components.Animation#previousFrame + * @since 3.16.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. + */ + previousFrame: function () + { + if (this.currentAnim) + { + this.currentAnim.previousFrame(this); + } + + return this.parent; + }, + + /** + * Sets if the current Animation will yoyo when it reaches the end. + * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again. + * + * @method Phaser.GameObjects.Components.Animation#setYoyo + * @since 3.4.0 + * + * @param {boolean} [value=false] - `true` if the animation should yoyo, `false` to not. + * + * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. + */ + setYoyo: function (value) + { + if (value === undefined) { value = false; } + + this._yoyo = value; + + return this.parent; + }, + + /** + * Gets if the current Animation will yoyo when it reaches the end. + * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again. + * + * @method Phaser.GameObjects.Components.Animation#getYoyo + * @since 3.4.0 + * + * @return {boolean} `true` if the animation is set to yoyo, `false` if not. + */ + getYoyo: function () + { + return this._yoyo; + }, + + /** + * Destroy this Animation component. + * + * Unregisters event listeners and cleans up its references. + * + * @method Phaser.GameObjects.Components.Animation#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.animationManager.off(Events.REMOVE_ANIMATION, this.remove, this); + + this.animationManager = null; + this.parent = null; + this.nextAnimsQueue.length = 0; + + this.currentAnim = null; + this.currentFrame = null; + } + +}); + +module.exports = Animation; + + +/***/ }), +/* 289 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Clamp = __webpack_require__(5); +var Class = __webpack_require__(0); +var EventEmitter = __webpack_require__(55); +var Events = __webpack_require__(59); +var FindClosestInSorted = __webpack_require__(57); +var Frame = __webpack_require__(308); +var GetValue = __webpack_require__(6); + +/** + * @classdesc + * A Frame based Animation. + * + * This consists of a key, some default values (like the frame rate) and a bunch of Frame objects. + * + * The Animation Manager creates these. Game Objects don't own an instance of these directly. + * Game Objects have the Animation Component, which are like playheads to global Animations (these objects) + * So multiple Game Objects can have playheads all pointing to this one Animation instance. + * + * @class Animation + * @memberof Phaser.Animations + * @extends Phaser.Events.EventEmitter + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Animations.AnimationManager} manager - A reference to the global Animation Manager + * @param {string} key - The unique identifying string for this animation. + * @param {Phaser.Types.Animations.Animation} config - The Animation configuration. + */ +var Animation = new Class({ + + Extends: EventEmitter, + + initialize: + + function Animation (manager, key, config) + { + EventEmitter.call(this); + + /** + * A reference to the global Animation Manager. + * + * @name Phaser.Animations.Animation#manager + * @type {Phaser.Animations.AnimationManager} + * @since 3.0.0 + */ + this.manager = manager; + + /** + * The unique identifying string for this animation. + * + * @name Phaser.Animations.Animation#key + * @type {string} + * @since 3.0.0 + */ + this.key = key; + + /** + * A frame based animation (as opposed to a bone based animation) + * + * @name Phaser.Animations.Animation#type + * @type {string} + * @default frame + * @since 3.0.0 + */ + this.type = 'frame'; + + /** + * Extract all the frame data into the frames array. + * + * @name Phaser.Animations.Animation#frames + * @type {Phaser.Animations.AnimationFrame[]} + * @since 3.0.0 + */ + this.frames = this.getFrames( + manager.textureManager, + GetValue(config, 'frames', []), + GetValue(config, 'defaultTextureKey', null) + ); + + /** + * The frame rate of playback in frames per second (default 24 if duration is null) + * + * @name Phaser.Animations.Animation#frameRate + * @type {integer} + * @default 24 + * @since 3.0.0 + */ + this.frameRate = GetValue(config, 'frameRate', null); + + /** + * How long the animation should play for, in milliseconds. + * If the `frameRate` property has been set then it overrides this value, + * otherwise the `frameRate` is derived from `duration`. + * + * @name Phaser.Animations.Animation#duration + * @type {integer} + * @since 3.0.0 + */ + this.duration = GetValue(config, 'duration', null); + + if (this.duration === null && this.frameRate === null) + { + // No duration or frameRate given, use default frameRate of 24fps + this.frameRate = 24; + this.duration = (this.frameRate / this.frames.length) * 1000; + } + else if (this.duration && this.frameRate === null) + { + // Duration given but no frameRate, so set the frameRate based on duration + // I.e. 12 frames in the animation, duration = 4000 ms + // So frameRate is 12 / (4000 / 1000) = 3 fps + this.frameRate = this.frames.length / (this.duration / 1000); + } + else + { + // frameRate given, derive duration from it (even if duration also specified) + // I.e. 15 frames in the animation, frameRate = 30 fps + // So duration is 15 / 30 = 0.5 * 1000 (half a second, or 500ms) + this.duration = (this.frames.length / this.frameRate) * 1000; + } + + /** + * How many ms per frame, not including frame specific modifiers. + * + * @name Phaser.Animations.Animation#msPerFrame + * @type {integer} + * @since 3.0.0 + */ + this.msPerFrame = 1000 / this.frameRate; + + /** + * Skip frames if the time lags, or always advanced anyway? + * + * @name Phaser.Animations.Animation#skipMissedFrames + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.skipMissedFrames = GetValue(config, 'skipMissedFrames', true); + + /** + * The delay in ms before the playback will begin. + * + * @name Phaser.Animations.Animation#delay + * @type {integer} + * @default 0 + * @since 3.0.0 + */ + this.delay = GetValue(config, 'delay', 0); + + /** + * Number of times to repeat the animation. Set to -1 to repeat forever. + * + * @name Phaser.Animations.Animation#repeat + * @type {integer} + * @default 0 + * @since 3.0.0 + */ + this.repeat = GetValue(config, 'repeat', 0); + + /** + * The delay in ms before the a repeat play starts. + * + * @name Phaser.Animations.Animation#repeatDelay + * @type {integer} + * @default 0 + * @since 3.0.0 + */ + this.repeatDelay = GetValue(config, 'repeatDelay', 0); + + /** + * Should the animation yoyo (reverse back down to the start) before repeating? + * + * @name Phaser.Animations.Animation#yoyo + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.yoyo = GetValue(config, 'yoyo', false); + + /** + * Should the GameObject's `visible` property be set to `true` when the animation starts to play? + * + * @name Phaser.Animations.Animation#showOnStart + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.showOnStart = GetValue(config, 'showOnStart', false); + + /** + * Should the GameObject's `visible` property be set to `false` when the animation finishes? + * + * @name Phaser.Animations.Animation#hideOnComplete + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.hideOnComplete = GetValue(config, 'hideOnComplete', false); + + /** + * Global pause. All Game Objects using this Animation instance are impacted by this property. + * + * @name Phaser.Animations.Animation#paused + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.paused = false; + + this.manager.on(Events.PAUSE_ALL, this.pause, this); + this.manager.on(Events.RESUME_ALL, this.resume, this); + }, + + /** + * Add frames to the end of the animation. + * + * @method Phaser.Animations.Animation#addFrame + * @since 3.0.0 + * + * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects. + * + * @return {this} This Animation object. + */ + addFrame: function (config) + { + return this.addFrameAt(this.frames.length, config); + }, + + /** + * Add frame/s into the animation. + * + * @method Phaser.Animations.Animation#addFrameAt + * @since 3.0.0 + * + * @param {integer} index - The index to insert the frame at within the animation. + * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects. + * + * @return {this} This Animation object. + */ + addFrameAt: function (index, config) + { + var newFrames = this.getFrames(this.manager.textureManager, config); + + if (newFrames.length > 0) + { + if (index === 0) + { + this.frames = newFrames.concat(this.frames); + } + else if (index === this.frames.length) + { + this.frames = this.frames.concat(newFrames); + } + else + { + var pre = this.frames.slice(0, index); + var post = this.frames.slice(index); + + this.frames = pre.concat(newFrames, post); + } + + this.updateFrameSequence(); + } + + return this; + }, + + /** + * Check if the given frame index is valid. + * + * @method Phaser.Animations.Animation#checkFrame + * @since 3.0.0 + * + * @param {integer} index - The index to be checked. + * + * @return {boolean} `true` if the index is valid, otherwise `false`. + */ + checkFrame: function (index) + { + return (index >= 0 && index < this.frames.length); + }, + + /** + * Called internally when this Animation completes playback. + * Optionally, hides the parent Game Object, then stops playback. + * + * @method Phaser.Animations.Animation#completeAnimation + * @protected + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. + */ + completeAnimation: function (component) + { + if (this.hideOnComplete) + { + component.parent.visible = false; + } + + component.stop(); + }, + + /** + * Called internally when this Animation first starts to play. + * Sets the accumulator and nextTick properties. + * + * @method Phaser.Animations.Animation#getFirstTick + * @protected + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. + * @param {boolean} [includeDelay=true] - If `true` the Animation Components delay value will be added to the `nextTick` total. + */ + getFirstTick: function (component, includeDelay) + { + if (includeDelay === undefined) { includeDelay = true; } + + // When is the first update due? + component.accumulator = 0; + component.nextTick = component.msPerFrame + component.currentFrame.duration; + + if (includeDelay) + { + component.nextTick += component._delay; + } + }, + + /** + * Returns the AnimationFrame at the provided index + * + * @method Phaser.Animations.Animation#getFrameAt + * @protected + * @since 3.0.0 + * + * @param {integer} index - The index in the AnimationFrame array + * + * @return {Phaser.Animations.AnimationFrame} The frame at the index provided from the animation sequence + */ + getFrameAt: function (index) + { + return this.frames[index]; + }, + + /** + * Creates AnimationFrame instances based on the given frame data. + * + * @method Phaser.Animations.Animation#getFrames + * @since 3.0.0 + * + * @param {Phaser.Textures.TextureManager} textureManager - A reference to the global Texture Manager. + * @param {(string|Phaser.Types.Animations.AnimationFrame[])} frames - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects. + * @param {string} [defaultTextureKey] - The key to use if no key is set in the frame configuration object. + * + * @return {Phaser.Animations.AnimationFrame[]} An array of newly created AnimationFrame instances. + */ + getFrames: function (textureManager, frames, defaultTextureKey) + { + var out = []; + var prev; + var animationFrame; + var index = 1; + var i; + var textureKey; + + // if frames is a string, we'll get all the frames from the texture manager as if it's a sprite sheet + if (typeof frames === 'string') + { + textureKey = frames; + + var texture = textureManager.get(textureKey); + var frameKeys = texture.getFrameNames(); + + frames = []; + + frameKeys.forEach(function (idx, value) + { + frames.push({ key: textureKey, frame: value }); + }); + } + + if (!Array.isArray(frames) || frames.length === 0) + { + return out; + } + + for (i = 0; i < frames.length; i++) + { + var item = frames[i]; + + var key = GetValue(item, 'key', defaultTextureKey); + + if (!key) + { + continue; + } + + // Could be an integer or a string + var frame = GetValue(item, 'frame', 0); + + // The actual texture frame + var textureFrame = textureManager.getFrame(key, frame); + + animationFrame = new Frame(key, frame, index, textureFrame); + + animationFrame.duration = GetValue(item, 'duration', 0); + + animationFrame.isFirst = (!prev); + + // The previously created animationFrame + if (prev) + { + prev.nextFrame = animationFrame; + + animationFrame.prevFrame = prev; + } + + out.push(animationFrame); + + prev = animationFrame; + + index++; + } + + if (out.length > 0) + { + animationFrame.isLast = true; + + // Link them end-to-end, so they loop + animationFrame.nextFrame = out[0]; + + out[0].prevFrame = animationFrame; + + // Generate the progress data + + var slice = 1 / (out.length - 1); + + for (i = 0; i < out.length; i++) + { + out[i].progress = i * slice; + } + } + + return out; + }, + + /** + * Called internally. Sets the accumulator and nextTick values of the current Animation. + * + * @method Phaser.Animations.Animation#getNextTick + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. + */ + getNextTick: function (component) + { + // accumulator += delta * _timeScale + // after a large delta surge (perf issue for example) we need to adjust for it here + + // When is the next update due? + component.accumulator -= component.nextTick; + + component.nextTick = component.msPerFrame + component.currentFrame.duration; + }, + + /** + * Loads the Animation values into the Animation Component. + * + * @method Phaser.Animations.Animation#load + * @private + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to load values into. + * @param {integer} startFrame - The start frame of the animation to load. + */ + load: function (component, startFrame) + { + if (startFrame >= this.frames.length) + { + startFrame = 0; + } + + if (component.currentAnim !== this) + { + component.currentAnim = this; + + component.frameRate = this.frameRate; + component.duration = this.duration; + component.msPerFrame = this.msPerFrame; + component.skipMissedFrames = this.skipMissedFrames; + + component._delay = this.delay; + component._repeat = this.repeat; + component._repeatDelay = this.repeatDelay; + component._yoyo = this.yoyo; + } + + var frame = this.frames[startFrame]; + + if (startFrame === 0 && !component.forward) + { + frame = this.getLastFrame(); + } + + component.updateFrame(frame); + }, + + /** + * Returns the frame closest to the given progress value between 0 and 1. + * + * @method Phaser.Animations.Animation#getFrameByProgress + * @since 3.4.0 + * + * @param {number} value - A value between 0 and 1. + * + * @return {Phaser.Animations.AnimationFrame} The frame closest to the given progress value. + */ + getFrameByProgress: function (value) + { + value = Clamp(value, 0, 1); + + return FindClosestInSorted(value, this.frames, 'progress'); + }, + + /** + * Advance the animation frame. + * + * @method Phaser.Animations.Animation#nextFrame + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to advance. + */ + nextFrame: function (component) + { + var frame = component.currentFrame; + + // TODO: Add frame skip support + + if (frame.isLast) + { + // We're at the end of the animation + + // Yoyo? (happens before repeat) + if (component._yoyo) + { + this.handleYoyoFrame(component, false); + } + else if (component.repeatCounter > 0) + { + // Repeat (happens before complete) + + if (component._reverse && component.forward) + { + component.forward = false; + } + else + { + this.repeatAnimation(component); + } + } + else + { + this.completeAnimation(component); + } + } + else + { + this.updateAndGetNextTick(component, frame.nextFrame); + } + }, + + /** + * Handle the yoyo functionality in nextFrame and previousFrame methods. + * + * @method Phaser.Animations.Animation#handleYoyoFrame + * @private + * @since 3.12.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to advance. + * @param {boolean} isReverse - Is animation in reverse mode? (Default: false) + */ + handleYoyoFrame: function (component, isReverse) + { + if (!isReverse) { isReverse = false; } + + if (component._reverse === !isReverse && component.repeatCounter > 0) + { + if (!component._repeatDelay || component.pendingRepeat) + + { + component.forward = isReverse; + } + + this.repeatAnimation(component); + + return; + } + + if (component._reverse !== isReverse && component.repeatCounter === 0) + { + this.completeAnimation(component); + + return; + } + + component.forward = isReverse; + + var frame = (isReverse) ? component.currentFrame.nextFrame : component.currentFrame.prevFrame; + + this.updateAndGetNextTick(component, frame); + }, + + /** + * Returns the animation last frame. + * + * @method Phaser.Animations.Animation#getLastFrame + * @since 3.12.0 + * + * @return {Phaser.Animations.AnimationFrame} component - The Animation Last Frame. + */ + getLastFrame: function () + { + return this.frames[this.frames.length - 1]; + }, + + /** + * Called internally when the Animation is playing backwards. + * Sets the previous frame, causing a yoyo, repeat, complete or update, accordingly. + * + * @method Phaser.Animations.Animation#previousFrame + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. + */ + previousFrame: function (component) + { + var frame = component.currentFrame; + + // TODO: Add frame skip support + + if (frame.isFirst) + { + // We're at the start of the animation + + if (component._yoyo) + { + this.handleYoyoFrame(component, true); + } + else if (component.repeatCounter > 0) + { + if (component._reverse && !component.forward) + { + component.currentFrame = this.getLastFrame(); + this.repeatAnimation(component); + } + else + { + // Repeat (happens before complete) + component.forward = true; + this.repeatAnimation(component); + } + } + else + { + this.completeAnimation(component); + } + } + else + { + this.updateAndGetNextTick(component, frame.prevFrame); + } + }, + + /** + * Update Frame and Wait next tick. + * + * @method Phaser.Animations.Animation#updateAndGetNextTick + * @private + * @since 3.12.0 + * + * @param {Phaser.Animations.AnimationFrame} frame - An Animation frame. + */ + updateAndGetNextTick: function (component, frame) + { + component.updateFrame(frame); + + this.getNextTick(component); + }, + + /** + * Removes the given AnimationFrame from this Animation instance. + * This is a global action. Any Game Object using this Animation will be impacted by this change. + * + * @method Phaser.Animations.Animation#removeFrame + * @since 3.0.0 + * + * @param {Phaser.Animations.AnimationFrame} frame - The AnimationFrame to be removed. + * + * @return {this} This Animation object. + */ + removeFrame: function (frame) + { + var index = this.frames.indexOf(frame); + + if (index !== -1) + { + this.removeFrameAt(index); + } + + return this; + }, + + /** + * Removes a frame from the AnimationFrame array at the provided index + * and updates the animation accordingly. + * + * @method Phaser.Animations.Animation#removeFrameAt + * @since 3.0.0 + * + * @param {integer} index - The index in the AnimationFrame array + * + * @return {this} This Animation object. + */ + removeFrameAt: function (index) + { + this.frames.splice(index, 1); + + this.updateFrameSequence(); + + return this; + }, + + /** + * Called internally during playback. Forces the animation to repeat, providing there are enough counts left + * in the repeat counter. + * + * @method Phaser.Animations.Animation#repeatAnimation + * @fires Phaser.Animations.Events#ANIMATION_REPEAT + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_REPEAT + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. + */ + repeatAnimation: function (component) + { + if (component._pendingStop === 2) + { + return this.completeAnimation(component); + } + + if (component._repeatDelay > 0 && component.pendingRepeat === false) + { + component.pendingRepeat = true; + component.accumulator -= component.nextTick; + component.nextTick += component._repeatDelay; + } + else + { + component.repeatCounter--; + + component.updateFrame(component.currentFrame[(component.forward) ? 'nextFrame' : 'prevFrame']); + + if (component.isPlaying) + { + this.getNextTick(component); + + component.pendingRepeat = false; + + var frame = component.currentFrame; + var parent = component.parent; + + this.emit(Events.ANIMATION_REPEAT, this, frame); + + parent.emit(Events.SPRITE_ANIMATION_KEY_REPEAT + this.key, this, frame, component.repeatCounter, parent); + + parent.emit(Events.SPRITE_ANIMATION_REPEAT, this, frame, component.repeatCounter, parent); + } + } + }, + + /** + * Sets the texture frame the animation uses for rendering. + * + * @method Phaser.Animations.Animation#setFrame + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. + */ + setFrame: function (component) + { + // Work out which frame should be set next on the child, and set it + if (component.forward) + { + this.nextFrame(component); + } + else + { + this.previousFrame(component); + } + }, + + /** + * Converts the animation data to JSON. + * + * @method Phaser.Animations.Animation#toJSON + * @since 3.0.0 + * + * @return {Phaser.Types.Animations.JSONAnimation} The resulting JSONAnimation formatted object. + */ + toJSON: function () + { + var output = { + 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, + showOnStart: this.showOnStart, + hideOnComplete: this.hideOnComplete + }; + + this.frames.forEach(function (frame) + { + output.frames.push(frame.toJSON()); + }); + + return output; + }, + + /** + * Called internally whenever frames are added to, or removed from, this Animation. + * + * @method Phaser.Animations.Animation#updateFrameSequence + * @since 3.0.0 + * + * @return {this} This Animation object. + */ + updateFrameSequence: function () + { + var len = this.frames.length; + var slice = 1 / (len - 1); + + var frame; + + for (var i = 0; i < len; i++) + { + frame = this.frames[i]; + + frame.index = i + 1; + frame.isFirst = false; + frame.isLast = false; + frame.progress = i * slice; + + if (i === 0) + { + frame.isFirst = true; + + if (len === 1) + { + frame.isLast = true; + frame.nextFrame = frame; + frame.prevFrame = frame; + } + else + { + frame.isLast = false; + frame.prevFrame = this.frames[len - 1]; + frame.nextFrame = this.frames[i + 1]; + } + } + else if (i === len - 1 && len > 1) + { + frame.isLast = true; + frame.prevFrame = this.frames[len - 2]; + frame.nextFrame = this.frames[0]; + } + else if (len > 1) + { + frame.prevFrame = this.frames[i - 1]; + frame.nextFrame = this.frames[i + 1]; + } + } + + return this; + }, + + /** + * Pauses playback of this Animation. The paused state is set immediately. + * + * @method Phaser.Animations.Animation#pause + * @since 3.0.0 + * + * @return {this} This Animation object. + */ + pause: function () + { + this.paused = true; + + return this; + }, + + /** + * Resumes playback of this Animation. The paused state is reset immediately. + * + * @method Phaser.Animations.Animation#resume + * @since 3.0.0 + * + * @return {this} This Animation object. + */ + resume: function () + { + this.paused = false; + + return this; + }, + + /** + * Destroys this Animation instance. It will remove all event listeners, + * remove this animation and its key from the global Animation Manager, + * and then destroy all Animation Frames in turn. + * + * @method Phaser.Animations.Animation#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.removeAllListeners(); + + this.manager.off(Events.PAUSE_ALL, this.pause, this); + this.manager.off(Events.RESUME_ALL, this.resume, this); + + this.manager.remove(this.key); + + for (var i = 0; i < this.frames.length; i++) + { + this.frames[i].destroy(); + } + + this.frames = []; + + this.manager = null; + } + +}); + +module.exports = Animation; + + +/***/ }), +/* 290 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Add Animation Event. + * + * This event is dispatched when a new animation is added to the global Animation Manager. + * + * This can happen either as a result of an animation instance being added to the Animation Manager, + * or the Animation Manager creating a new animation directly. + * + * @event Phaser.Animations.Events#ADD_ANIMATION + * @since 3.0.0 + * + * @param {string} key - The key of the Animation that was added to the global Animation Manager. + * @param {Phaser.Animations.Animation} animation - An instance of the newly created Animation. + */ +module.exports = 'add'; + + +/***/ }), +/* 291 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Complete Event. + * + * This event is dispatched by an Animation instance when it completes, i.e. finishes playing or is manually stopped. + * + * Be careful with the volume of events this could generate. If a group of Sprites all complete the same + * animation at the same time, this event will invoke its handler for each one of them. + * + * @event Phaser.Animations.Events#ANIMATION_COMPLETE + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed. + */ +module.exports = 'complete'; + + +/***/ }), +/* 292 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Repeat Event. + * + * This event is dispatched when a currently playing animation repeats. + * + * The event is dispatched directly from the Animation object itself. Which means that listeners + * bound to this event will be invoked every time the Animation repeats, for every Game Object that may have it. + * + * @event Phaser.Animations.Events#ANIMATION_REPEAT + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that repeated. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation was on when it repeated. + */ +module.exports = 'repeat'; + + +/***/ }), +/* 293 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Restart Event. + * + * This event is dispatched by an Animation instance when it restarts. + * + * Be careful with the volume of events this could generate. If a group of Sprites all restart the same + * animation at the same time, this event will invoke its handler for each one of them. + * + * @event Phaser.Animations.Events#ANIMATION_RESTART + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that restarted playing. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing. + */ +module.exports = 'restart'; + + +/***/ }), +/* 294 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Start Event. + * + * This event is dispatched by an Animation instance when it starts playing. + * + * Be careful with the volume of events this could generate. If a group of Sprites all play the same + * animation at the same time, this event will invoke its handler for each one of them. + * + * @event Phaser.Animations.Events#ANIMATION_START + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that started playing. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing. + */ +module.exports = 'start'; + + +/***/ }), +/* 295 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Pause All Animations Event. + * + * This event is dispatched when the global Animation Manager is told to pause. + * + * When this happens all current animations will stop updating, although it doesn't necessarily mean + * that the game has paused as well. + * + * @event Phaser.Animations.Events#PAUSE_ALL + * @since 3.0.0 + */ +module.exports = 'pauseall'; + + +/***/ }), +/* 296 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Remove Animation Event. + * + * This event is dispatched when an animation is removed from the global Animation Manager. + * + * @event Phaser.Animations.Events#REMOVE_ANIMATION + * @since 3.0.0 + * + * @param {string} key - The key of the Animation that was removed from the global Animation Manager. + * @param {Phaser.Animations.Animation} animation - An instance of the removed Animation. + */ +module.exports = 'remove'; + + +/***/ }), +/* 297 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Resume All Animations Event. + * + * This event is dispatched when the global Animation Manager resumes, having been previously paused. + * + * When this happens all current animations will continue updating again. + * + * @event Phaser.Animations.Events#RESUME_ALL + * @since 3.0.0 + */ +module.exports = 'resumeall'; + + +/***/ }), +/* 298 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Complete Event. + * + * This event is dispatched by a Sprite when an animation finishes playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationcomplete', listener)` + * + * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_COMPLETE` event. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_COMPLETE + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed. + */ +module.exports = 'animationcomplete'; + + +/***/ }), +/* 299 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Key Complete Event. + * + * This event is dispatched by a Sprite when a specific animation finishes playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationcomplete-key', listener)` where `key` is the key of + * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationcomplete-explode`. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_COMPLETE + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed. + */ +module.exports = 'animationcomplete-'; + + +/***/ }), +/* 300 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Key Repeat Event. + * + * This event is dispatched by a Sprite when a specific animation repeats playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationrepeat-key', listener)` where `key` is the key of + * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrepeat-explode`. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. + * @param {integer} repeatCount - The number of times the Animation has repeated so far. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing. + */ +module.exports = 'animationrepeat-'; + + +/***/ }), +/* 301 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Key Restart Event. + * + * This event is dispatched by a Sprite when a specific animation restarts playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationrestart-key', listener)` where `key` is the key of + * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrestart-explode`. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing. + */ +module.exports = 'animationrestart-'; + + +/***/ }), +/* 302 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Key Start Event. + * + * This event is dispatched by a Sprite when a specific animation starts playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationstart-key', listener)` where `key` is the key of + * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationstart-explode`. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing. + */ +module.exports = 'animationstart-'; + + +/***/ }), +/* 303 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Key Update Event. + * + * This event is dispatched by a Sprite when a specific animation playing on it updates. This happens when the animation changes frame, + * based on the animation frame rate and other factors like `timeScale` and `delay`. + * + * Listen for it on the Sprite using `sprite.on('animationupdate-key', listener)` where `key` is the key of + * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationupdate-explode`. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated. + */ +module.exports = 'animationupdate-'; + + +/***/ }), +/* 304 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Repeat Event. + * + * This event is dispatched by a Sprite when an animation repeats playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationrepeat', listener)` + * + * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_REPEAT` event. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_REPEAT + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. + * @param {integer} repeatCount - The number of times the Animation has repeated so far. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing. + */ +module.exports = 'animationrepeat'; + + +/***/ }), +/* 305 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Restart Event. + * + * This event is dispatched by a Sprite when an animation restarts playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationrestart', listener)` + * + * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_RESTART` event. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_RESTART + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing. + */ +module.exports = 'animationrestart'; + + +/***/ }), +/* 306 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Start Event. + * + * This event is dispatched by a Sprite when an animation starts playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationstart', listener)` + * + * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_START` event. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_START + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing. + */ +module.exports = 'animationstart'; + + +/***/ }), +/* 307 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Update Event. + * + * This event is dispatched by a Sprite when an animation playing on it updates. This happens when the animation changes frame, + * based on the animation frame rate and other factors like `timeScale` and `delay`. + * + * Listen for it on the Sprite using `sprite.on('animationupdate', listener)` + * + * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_UPDATE` event. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated. + */ +module.exports = 'animationupdate'; + + +/***/ }), +/* 308 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); + +/** + * @classdesc + * A single frame in an Animation sequence. + * + * An AnimationFrame consists of a reference to the Texture it uses for rendering, references to other + * frames in the animation, and index data. It also has the ability to modify the animation timing. + * + * AnimationFrames are generated automatically by the Animation class. + * + * @class AnimationFrame + * @memberof Phaser.Animations + * @constructor + * @since 3.0.0 + * + * @param {string} textureKey - The key of the Texture this AnimationFrame uses. + * @param {(string|integer)} textureFrame - The key of the Frame within the Texture that this AnimationFrame uses. + * @param {integer} index - The index of this AnimationFrame within the Animation sequence. + * @param {Phaser.Textures.Frame} frame - A reference to the Texture Frame this AnimationFrame uses for rendering. + */ +var AnimationFrame = new Class({ + + initialize: + + function AnimationFrame (textureKey, textureFrame, index, frame) + { + /** + * The key of the Texture this AnimationFrame uses. + * + * @name Phaser.Animations.AnimationFrame#textureKey + * @type {string} + * @since 3.0.0 + */ + this.textureKey = textureKey; + + /** + * The key of the Frame within the Texture that this AnimationFrame uses. + * + * @name Phaser.Animations.AnimationFrame#textureFrame + * @type {(string|integer)} + * @since 3.0.0 + */ + this.textureFrame = textureFrame; + + /** + * The index of this AnimationFrame within the Animation sequence. + * + * @name Phaser.Animations.AnimationFrame#index + * @type {integer} + * @since 3.0.0 + */ + this.index = index; + + /** + * A reference to the Texture Frame this AnimationFrame uses for rendering. + * + * @name Phaser.Animations.AnimationFrame#frame + * @type {Phaser.Textures.Frame} + * @since 3.0.0 + */ + this.frame = frame; + + /** + * Is this the first frame in an animation sequence? + * + * @name Phaser.Animations.AnimationFrame#isFirst + * @type {boolean} + * @default false + * @readonly + * @since 3.0.0 + */ + this.isFirst = false; + + /** + * Is this the last frame in an animation sequence? + * + * @name Phaser.Animations.AnimationFrame#isLast + * @type {boolean} + * @default false + * @readonly + * @since 3.0.0 + */ + this.isLast = false; + + /** + * A reference to the AnimationFrame that comes before this one in the animation, if any. + * + * @name Phaser.Animations.AnimationFrame#prevFrame + * @type {?Phaser.Animations.AnimationFrame} + * @default null + * @readonly + * @since 3.0.0 + */ + this.prevFrame = null; + + /** + * A reference to the AnimationFrame that comes after this one in the animation, if any. + * + * @name Phaser.Animations.AnimationFrame#nextFrame + * @type {?Phaser.Animations.AnimationFrame} + * @default null + * @readonly + * @since 3.0.0 + */ + this.nextFrame = null; + + /** + * Additional time (in ms) that this frame should appear for during playback. + * The value is added onto the msPerFrame set by the animation. + * + * @name Phaser.Animations.AnimationFrame#duration + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.duration = 0; + + /** + * What % through the animation does this frame come? + * This value is generated when the animation is created and cached here. + * + * @name Phaser.Animations.AnimationFrame#progress + * @type {number} + * @default 0 + * @readonly + * @since 3.0.0 + */ + this.progress = 0; + }, + + /** + * Generates a JavaScript object suitable for converting to JSON. + * + * @method Phaser.Animations.AnimationFrame#toJSON + * @since 3.0.0 + * + * @return {Phaser.Types.Animations.JSONAnimationFrame} The AnimationFrame data. + */ + toJSON: function () + { + return { + key: this.textureKey, + frame: this.textureFrame, + duration: this.duration + }; + }, + + /** + * Destroys this object by removing references to external resources and callbacks. + * + * @method Phaser.Animations.AnimationFrame#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.frame = undefined; + } + +}); + +module.exports = AnimationFrame; + + +/***/ }), +/* 309 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var BlendModes = __webpack_require__(14); + +/** + * Provides methods used for setting the blend mode of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.BlendMode + * @since 3.0.0 + */ + +var BlendMode = { + + /** + * Private internal value. Holds the current blend mode. + * + * @name Phaser.GameObjects.Components.BlendMode#_blendMode + * @type {integer} + * @private + * @default 0 + * @since 3.0.0 + */ + _blendMode: BlendModes.NORMAL, + + /** + * 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: + * + * * 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. + * + * @name Phaser.GameObjects.Components.BlendMode#blendMode + * @type {(Phaser.BlendModes|string)} + * @since 3.0.0 + */ + blendMode: { + + get: function () + { + return this._blendMode; + }, + + set: function (value) + { + if (typeof value === 'string') + { + value = BlendModes[value]; + } + + value |= 0; + + if (value >= -1) + { + this._blendMode = value; + } + } + + }, + + /** + * 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: + * + * * 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. + * + * @method Phaser.GameObjects.Components.BlendMode#setBlendMode + * @since 3.0.0 + * + * @param {(string|Phaser.BlendModes)} value - The BlendMode value. Either a string or a CONST. + * + * @return {this} This Game Object instance. + */ + setBlendMode: function (value) + { + this.blendMode = value; + + return this; + } + +}; + +module.exports = BlendMode; + + +/***/ }), +/* 310 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for getting and setting the texture of a Game Object. + * + * @namespace Phaser.GameObjects.Components.Crop + * @since 3.12.0 + */ + +var Crop = { + + /** + * The Texture this Game Object is using to render with. + * + * @name Phaser.GameObjects.Components.Crop#texture + * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture} + * @since 3.0.0 + */ + texture: null, + + /** + * The Texture Frame this Game Object is using to render with. + * + * @name Phaser.GameObjects.Components.Crop#frame + * @type {Phaser.Textures.Frame} + * @since 3.0.0 + */ + frame: null, + + /** + * A boolean flag indicating if this Game Object is being cropped or not. + * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off. + * Equally, calling `setCrop` with no arguments will reset the crop and disable it. + * + * @name Phaser.GameObjects.Components.Crop#isCropped + * @type {boolean} + * @since 3.11.0 + */ + isCropped: false, + + /** + * Applies a crop to a texture based Game Object, such as a Sprite or Image. + * + * The crop is a rectangle that limits the area of the texture frame that is visible during rendering. + * + * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just + * changes what is shown when rendered. + * + * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left. + * + * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left + * half of it, you could call `setCrop(0, 0, 400, 600)`. + * + * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop + * an area of 200x100 when applied to a Game Object that had a scale factor of 2. + * + * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument. + * + * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`. + * + * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow + * the renderer to skip several internal calculations. + * + * @method Phaser.GameObjects.Components.Crop#setCrop + * @since 3.11.0 + * + * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored. + * @param {number} [y] - The y coordinate to start the crop from. + * @param {number} [width] - The width of the crop rectangle in pixels. + * @param {number} [height] - The height of the crop rectangle in pixels. + * + * @return {this} This Game Object instance. + */ + setCrop: function (x, y, width, height) + { + if (x === undefined) + { + this.isCropped = false; + } + else if (this.frame) + { + if (typeof x === 'number') + { + this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY); + } + else + { + var rect = x; + + this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY); + } + + this.isCropped = true; + } + + return this; + }, + + /** + * Internal method that returns a blank, well-formed crop object for use by a Game Object. + * + * @method Phaser.GameObjects.Components.Crop#resetCropObject + * @private + * @since 3.12.0 + * + * @return {object} The crop object. + */ + resetCropObject: function () + { + return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 }; + } + +}; + +module.exports = Crop; + + +/***/ }), +/* 311 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Rectangle = __webpack_require__(24); +var RotateAround = __webpack_require__(38); +var Vector2 = __webpack_require__(1); + +/** + * Provides methods used for obtaining the bounds of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.GetBounds + * @since 3.0.0 + */ + +var GetBounds = { + + /** + * Processes the bounds output vector before returning it. + * + * @method Phaser.GameObjects.Components.GetBounds#prepareBoundsOutput + * @private + * @since 3.18.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} output - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + prepareBoundsOutput: function (output, includeParent) + { + if (includeParent === undefined) { includeParent = false; } + + if (this.rotation !== 0) + { + RotateAround(output, this.x, this.y, this.rotation); + } + + if (includeParent && this.parentContainer) + { + var parentMatrix = this.parentContainer.getBoundsTransformMatrix(); + + parentMatrix.transformPoint(output.x, output.y, output); + } + + return output; + }, + + /** + * Gets the center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getCenter + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getCenter: function (output) + { + if (output === undefined) { output = new Vector2(); } + + output.x = this.x - (this.displayWidth * this.originX) + (this.displayWidth / 2); + output.y = this.y - (this.displayHeight * this.originY) + (this.displayHeight / 2); + + return output; + }, + + /** + * Gets the top-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getTopLeft + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getTopLeft: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = this.x - (this.displayWidth * this.originX); + output.y = this.y - (this.displayHeight * this.originY); + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the top-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getTopCenter + * @since 3.18.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getTopCenter: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2); + output.y = this.y - (this.displayHeight * this.originY); + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the top-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getTopRight + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getTopRight: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth; + output.y = this.y - (this.displayHeight * this.originY); + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the left-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getLeftCenter + * @since 3.18.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getLeftCenter: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = this.x - (this.displayWidth * this.originX); + output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2); + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the right-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getRightCenter + * @since 3.18.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getRightCenter: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth; + output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2); + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the bottom-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getBottomLeft + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getBottomLeft: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = this.x - (this.displayWidth * this.originX); + output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight; + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the bottom-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getBottomCenter + * @since 3.18.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getBottomCenter: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2); + output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight; + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the bottom-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getBottomRight + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getBottomRight: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth; + output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight; + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the bounds of this Game Object, regardless of origin. + * The values are stored and returned in a Rectangle, or Rectangle-like, object. + * + * @method Phaser.GameObjects.Components.GetBounds#getBounds + * @since 3.0.0 + * + * @generic {Phaser.Geom.Rectangle} O - [output,$return] + * + * @param {(Phaser.Geom.Rectangle|object)} [output] - An object to store the values in. If not provided a new Rectangle will be created. + * + * @return {(Phaser.Geom.Rectangle|object)} The values stored in the output object. + */ + getBounds: function (output) + { + if (output === undefined) { output = new Rectangle(); } + + // We can use the output object to temporarily store the x/y coords in: + + var TLx, TLy, TRx, TRy, BLx, BLy, BRx, BRy; + + // Instead of doing a check if parent container is + // defined per corner we only do it once. + if (this.parentContainer) + { + var parentMatrix = this.parentContainer.getBoundsTransformMatrix(); + + this.getTopLeft(output); + parentMatrix.transformPoint(output.x, output.y, output); + + TLx = output.x; + TLy = output.y; + + this.getTopRight(output); + parentMatrix.transformPoint(output.x, output.y, output); + + TRx = output.x; + TRy = output.y; + + this.getBottomLeft(output); + parentMatrix.transformPoint(output.x, output.y, output); + + BLx = output.x; + BLy = output.y; + + this.getBottomRight(output); + parentMatrix.transformPoint(output.x, output.y, output); + + BRx = output.x; + BRy = output.y; + } + else + { + this.getTopLeft(output); + + TLx = output.x; + TLy = output.y; + + this.getTopRight(output); + + TRx = output.x; + TRy = output.y; + + this.getBottomLeft(output); + + BLx = output.x; + BLy = output.y; + + this.getBottomRight(output); + + BRx = output.x; + BRy = output.y; + } + + output.x = Math.min(TLx, TRx, BLx, BRx); + output.y = Math.min(TLy, TRy, BLy, BRy); + output.width = Math.max(TLx, TRx, BLx, BRx) - output.x; + output.height = Math.max(TLy, TRy, BLy, BRy) - output.y; + + return output; + } + +}; + +module.exports = GetBounds; + + +/***/ }), +/* 312 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Checks if a given point is inside a Rectangle's bounds. + * + * @function Phaser.Geom.Rectangle.Contains + * @since 3.0.0 + * + * @param {Phaser.Geom.Rectangle} rect - The Rectangle to check. + * @param {number} x - The X coordinate of the point to check. + * @param {number} y - The Y coordinate of the point to check. + * + * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`. + */ +var Contains = function (rect, x, y) +{ + if (rect.width <= 0 || rect.height <= 0) + { + return false; + } + + return (rect.x <= x && rect.x + rect.width >= x && rect.y <= y && rect.y + rect.height >= y); +}; + +module.exports = Contains; + + +/***/ }), +/* 313 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetPoint = __webpack_require__(60); +var Perimeter = __webpack_require__(61); + +// 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. + * + * @function Phaser.Geom.Rectangle.GetPoints + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point[]} O - [out,$return] + * + * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle object to get the points from. + * @param {number} step - Step between points. Used to calculate the number of points to return when quantity is falsey. Ignored if quantity is positive. + * @param {integer} quantity - The number of evenly spaced points from the rectangles perimeter to return. If falsey, step param will be used to calculate the number of points. + * @param {(array|Phaser.Geom.Point[])} [out] - An optional array to store the points in. + * + * @return {(array|Phaser.Geom.Point[])} An array of Points from the perimeter of the rectangle. + */ +var GetPoints = function (rectangle, quantity, stepRate, out) +{ + if (out === undefined) { out = []; } + + // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. + if (!quantity && stepRate > 0) + { + quantity = Perimeter(rectangle) / stepRate; + } + + for (var i = 0; i < quantity; i++) + { + var position = i / quantity; + + out.push(GetPoint(rectangle, position)); + } + + return out; +}; + +module.exports = GetPoints; + + +/***/ }), +/* 314 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var GetPoint = __webpack_require__(315); +var GetPoints = __webpack_require__(316); +var GEOM_CONST = __webpack_require__(25); +var Random = __webpack_require__(318); +var Vector2 = __webpack_require__(1); + +/** + * @classdesc + * Defines a Line segment, a part of a line between two endpoints. + * + * @class Line + * @memberof Phaser.Geom + * @constructor + * @since 3.0.0 + * + * @param {number} [x1=0] - The x coordinate of the lines starting point. + * @param {number} [y1=0] - The y coordinate of the lines starting point. + * @param {number} [x2=0] - The x coordinate of the lines ending point. + * @param {number} [y2=0] - The y coordinate of the lines ending point. + */ +var Line = new Class({ + + initialize: + + function Line (x1, y1, x2, y2) + { + if (x1 === undefined) { x1 = 0; } + if (y1 === undefined) { y1 = 0; } + if (x2 === undefined) { x2 = 0; } + if (y2 === undefined) { y2 = 0; } + + /** + * The geometry constant type of this object: `GEOM_CONST.LINE`. + * Used for fast type comparisons. + * + * @name Phaser.Geom.Line#type + * @type {integer} + * @readonly + * @since 3.19.0 + */ + this.type = GEOM_CONST.LINE; + + /** + * The x coordinate of the lines starting point. + * + * @name Phaser.Geom.Line#x1 + * @type {number} + * @since 3.0.0 + */ + this.x1 = x1; + + /** + * The y coordinate of the lines starting point. + * + * @name Phaser.Geom.Line#y1 + * @type {number} + * @since 3.0.0 + */ + this.y1 = y1; + + /** + * The x coordinate of the lines ending point. + * + * @name Phaser.Geom.Line#x2 + * @type {number} + * @since 3.0.0 + */ + this.x2 = x2; + + /** + * The y coordinate of the lines ending point. + * + * @name Phaser.Geom.Line#y2 + * @type {number} + * @since 3.0.0 + */ + this.y2 = y2; + }, + + /** + * Get a point on a line that's a given percentage along its length. + * + * @method Phaser.Geom.Line#getPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [output,$return] + * + * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line. + * @param {(Phaser.Geom.Point|object)} [output] - An optional point, or point-like object, to store the coordinates of the point on the line. + * + * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point on the line. + */ + getPoint: function (position, output) + { + return GetPoint(this, position, output); + }, + + /** + * Get a number of points along a line's length. + * + * Provide a `quantity` to get an exact number of points along the line. + * + * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when + * providing a `stepRate`. + * + * @method Phaser.Geom.Line#getPoints + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point[]} O - [output,$return] + * + * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead. + * @param {integer} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`. + * @param {(array|Phaser.Geom.Point[])} [output] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line. + * + * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line. + */ + getPoints: function (quantity, stepRate, output) + { + return GetPoints(this, quantity, stepRate, output); + }, + + /** + * Get a random Point on the Line. + * + * @method Phaser.Geom.Line#getRandomPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [point,$return] + * + * @param {(Phaser.Geom.Point|object)} [point] - An instance of a Point to be modified. + * + * @return {Phaser.Geom.Point} A random Point on the Line. + */ + getRandomPoint: function (point) + { + return Random(this, point); + }, + + /** + * Set new coordinates for the line endpoints. + * + * @method Phaser.Geom.Line#setTo + * @since 3.0.0 + * + * @param {number} [x1=0] - The x coordinate of the lines starting point. + * @param {number} [y1=0] - The y coordinate of the lines starting point. + * @param {number} [x2=0] - The x coordinate of the lines ending point. + * @param {number} [y2=0] - The y coordinate of the lines ending point. + * + * @return {this} This Line object. + */ + setTo: function (x1, y1, x2, y2) + { + if (x1 === undefined) { x1 = 0; } + if (y1 === undefined) { y1 = 0; } + if (x2 === undefined) { x2 = 0; } + if (y2 === undefined) { y2 = 0; } + + this.x1 = x1; + this.y1 = y1; + + this.x2 = x2; + this.y2 = y2; + + return this; + }, + + /** + * Returns a Vector2 object that corresponds to the start of this Line. + * + * @method Phaser.Geom.Line#getPointA + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [vec2,$return] + * + * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created. + * + * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the start of this Line. + */ + getPointA: function (vec2) + { + if (vec2 === undefined) { vec2 = new Vector2(); } + + vec2.set(this.x1, this.y1); + + return vec2; + }, + + /** + * Returns a Vector2 object that corresponds to the end of this Line. + * + * @method Phaser.Geom.Line#getPointB + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [vec2,$return] + * + * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created. + * + * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the end of this Line. + */ + getPointB: function (vec2) + { + if (vec2 === undefined) { vec2 = new Vector2(); } + + vec2.set(this.x2, this.y2); + + return vec2; + }, + + /** + * The left position of the Line. + * + * @name Phaser.Geom.Line#left + * @type {number} + * @since 3.0.0 + */ + left: { + + get: function () + { + return Math.min(this.x1, this.x2); + }, + + set: function (value) + { + if (this.x1 <= this.x2) + { + this.x1 = value; + } + else + { + this.x2 = value; + } + } + + }, + + /** + * The right position of the Line. + * + * @name Phaser.Geom.Line#right + * @type {number} + * @since 3.0.0 + */ + right: { + + get: function () + { + return Math.max(this.x1, this.x2); + }, + + set: function (value) + { + if (this.x1 > this.x2) + { + this.x1 = value; + } + else + { + this.x2 = value; + } + } + + }, + + /** + * The top position of the Line. + * + * @name Phaser.Geom.Line#top + * @type {number} + * @since 3.0.0 + */ + top: { + + get: function () + { + return Math.min(this.y1, this.y2); + }, + + set: function (value) + { + if (this.y1 <= this.y2) + { + this.y1 = value; + } + else + { + this.y2 = value; + } + } + + }, + + /** + * The bottom position of the Line. + * + * @name Phaser.Geom.Line#bottom + * @type {number} + * @since 3.0.0 + */ + bottom: { + + get: function () + { + return Math.max(this.y1, this.y2); + }, + + set: function (value) + { + if (this.y1 > this.y2) + { + this.y1 = value; + } + else + { + this.y2 = value; + } + } + + } + +}); + +module.exports = Line; + + +/***/ }), +/* 315 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Point = __webpack_require__(9); + +/** + * Get a point on a line that's a given percentage along its length. + * + * @function Phaser.Geom.Line.GetPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [out,$return] + * + * @param {Phaser.Geom.Line} line - The line. + * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line. + * @param {(Phaser.Geom.Point|object)} [out] - An optional point, or point-like object, to store the coordinates of the point on the line. + * + * @return {(Phaser.Geom.Point|object)} The point on the line. + */ +var GetPoint = function (line, position, out) +{ + if (out === undefined) { out = new Point(); } + + out.x = line.x1 + (line.x2 - line.x1) * position; + out.y = line.y1 + (line.y2 - line.y1) * position; + + return out; +}; + +module.exports = GetPoint; + + +/***/ }), +/* 316 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Length = __webpack_require__(317); +var Point = __webpack_require__(9); + +/** + * Get a number of points along a line's length. + * + * Provide a `quantity` to get an exact number of points along the line. + * + * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when + * providing a `stepRate`. + * + * @function Phaser.Geom.Line.GetPoints + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point[]} O - [out,$return] + * + * @param {Phaser.Geom.Line} line - The line. + * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead. + * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`. + * @param {(array|Phaser.Geom.Point[])} [out] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line. + * + * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line. + */ +var GetPoints = function (line, quantity, stepRate, out) +{ + if (out === undefined) { out = []; } + + // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. + if (!quantity && stepRate > 0) + { + quantity = Length(line) / stepRate; + } + + var x1 = line.x1; + var y1 = line.y1; + + var x2 = line.x2; + var y2 = line.y2; + + for (var i = 0; i < quantity; i++) + { + var position = i / quantity; + + var x = x1 + (x2 - x1) * position; + var y = y1 + (y2 - y1) * position; + + out.push(new Point(x, y)); + } + + return out; +}; + +module.exports = GetPoints; + + +/***/ }), +/* 317 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the length of the given line. + * + * @function Phaser.Geom.Line.Length + * @since 3.0.0 + * + * @param {Phaser.Geom.Line} line - The line to calculate the length of. + * + * @return {number} The length of the line. + */ +var Length = function (line) +{ + return Math.sqrt((line.x2 - line.x1) * (line.x2 - line.x1) + (line.y2 - line.y1) * (line.y2 - line.y1)); +}; + +module.exports = Length; + + +/***/ }), +/* 318 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Point = __webpack_require__(9); + +/** + * Returns a random point on a given Line. + * + * @function Phaser.Geom.Line.Random + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [out,$return] + * + * @param {Phaser.Geom.Line} line - The Line to calculate the random Point on. + * @param {(Phaser.Geom.Point|object)} [out] - An instance of a Point to be modified. + * + * @return {(Phaser.Geom.Point|object)} A random Point on the Line. + */ +var Random = function (line, out) +{ + if (out === undefined) { out = new Point(); } + + var t = Math.random(); + + out.x = line.x1 + t * (line.x2 - line.x1); + out.y = line.y1 + t * (line.y2 - line.y1); + + return out; +}; + +module.exports = Random; + + +/***/ }), +/* 319 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Point = __webpack_require__(9); + +/** + * Returns a random point within a Rectangle. + * + * @function Phaser.Geom.Rectangle.Random + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [out,$return] + * + * @param {Phaser.Geom.Rectangle} rect - The Rectangle to return a point from. + * @param {Phaser.Geom.Point} out - The object to update with the point's coordinates. + * + * @return {Phaser.Geom.Point} The modified `out` object, or a new Point if none was provided. + */ +var Random = function (rect, out) +{ + if (out === undefined) { out = new Point(); } + + out.x = rect.x + (Math.random() * rect.width); + out.y = rect.y + (Math.random() * rect.height); + + return out; +}; + +module.exports = Random; + + +/***/ }), +/* 320 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var BitmapMask = __webpack_require__(321); +var GeometryMask = __webpack_require__(339); + +/** + * Provides methods used for getting and setting the mask of a Game Object. + * + * @namespace Phaser.GameObjects.Components.Mask + * @since 3.0.0 + */ + +var Mask = { + + /** + * The Mask this Game Object is using during render. + * + * @name Phaser.GameObjects.Components.Mask#mask + * @type {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask} + * @since 3.0.0 + */ + mask: null, + + /** + * 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. + * + * 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. + * + * 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. + * + * @method Phaser.GameObjects.Components.Mask#setMask + * @since 3.6.2 + * + * @param {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask} mask - The mask this Game Object will use when rendering. + * + * @return {this} This Game Object instance. + */ + setMask: function (mask) + { + this.mask = mask; + + return this; + }, + + /** + * Clears the mask that this Game Object was using. + * + * @method Phaser.GameObjects.Components.Mask#clearMask + * @since 3.6.2 + * + * @param {boolean} [destroyMask=false] - Destroy the mask before clearing it? + * + * @return {this} This Game Object instance. + */ + clearMask: function (destroyMask) + { + if (destroyMask === undefined) { destroyMask = false; } + + if (destroyMask && this.mask) + { + this.mask.destroy(); + } + + this.mask = null; + + return this; + }, + + /** + * Creates and returns a Bitmap 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 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 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 Game Object. + * + * @method Phaser.GameObjects.Components.Mask#createBitmapMask + * @since 3.6.2 + * + * @param {Phaser.GameObjects.GameObject} [renderable] - A renderable Game Object that uses a texture, such as a Sprite. + * + * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created. + */ + createBitmapMask: function (renderable) + { + if (renderable === undefined && (this.texture || this.shader)) + { + // eslint-disable-next-line consistent-this + renderable = this; + } + + return new BitmapMask(this.scene, renderable); + }, + + /** + * 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. + * + * This means you can call this method to create a Geometry Mask from any Graphics Game Object. + * + * @method Phaser.GameObjects.Components.Mask#createGeometryMask + * @since 3.6.2 + * + * @param {Phaser.GameObjects.Graphics} [graphics] - A Graphics Game Object. The geometry within it will be used as the mask. + * + * @return {Phaser.Display.Masks.GeometryMask} This Geometry Mask that was created. + */ + createGeometryMask: function (graphics) + { + if (graphics === undefined && this.type === 'Graphics') + { + // eslint-disable-next-line consistent-this + graphics = this; + } + + return new GeometryMask(this.scene, graphics); + } + +}; + +module.exports = Mask; + + +/***/ }), +/* 321 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var GameEvents = __webpack_require__(322); + +/** + * @classdesc + * A Bitmap Mask combines the alpha (opacity) of a masked pixel with the alpha of another pixel. + * Unlike the Geometry Mask, which is a clipping path, a Bitmap Mask behaves like an alpha mask, + * not a clipping path. It is only available when using the WebGL Renderer. + * + * A Bitmap Mask can use any Game Object to determine the alpha of each pixel of the masked Game Object(s). + * For any given point of a masked Game Object's texture, the pixel's alpha will be multiplied by the alpha + * of the pixel at the same position in the Bitmap Mask's Game Object. The color of the pixel from the + * Bitmap Mask doesn't matter. + * + * For example, if a pure blue pixel with an alpha of 0.95 is masked with a pure red pixel with an + * alpha of 0.5, the resulting pixel will be pure blue with an alpha of 0.475. Naturally, this means + * that a pixel in the mask with an alpha of 0 will hide the corresponding pixel in all masked Game Objects + * A pixel with an alpha of 1 in the masked Game Object will receive the same alpha as the + * corresponding pixel in the mask. + * + * The Bitmap Mask's location matches the location of its Game Object, not the location of the + * masked objects. Moving or transforming the underlying Game Object will change the mask + * (and affect the visibility of any masked objects), whereas moving or transforming a masked object + * will not affect the mask. + * + * The Bitmap Mask will not render its Game Object by itself. If the Game Object is not in a + * Scene's display list, it will only be used for the mask and its full texture will not be directly + * visible. Adding the underlying Game Object to a Scene will not cause any problems - it will + * render as a normal Game Object and will also serve as a mask. + * + * @class BitmapMask + * @memberof Phaser.Display.Masks + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - The Scene which this Bitmap Mask will be used in. + * @param {Phaser.GameObjects.GameObject} renderable - A renderable Game Object that uses a texture, such as a Sprite. + */ +var BitmapMask = new Class({ + + initialize: + + function BitmapMask (scene, renderable) + { + var renderer = scene.sys.game.renderer; + + /** + * A reference to either the Canvas or WebGL Renderer that this Mask is using. + * + * @name Phaser.Display.Masks.BitmapMask#renderer + * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} + * @since 3.11.0 + */ + this.renderer = renderer; + + /** + * A renderable Game Object that uses a texture, such as a Sprite. + * + * @name Phaser.Display.Masks.BitmapMask#bitmapMask + * @type {Phaser.GameObjects.GameObject} + * @since 3.0.0 + */ + this.bitmapMask = renderable; + + /** + * The texture used for the mask's framebuffer. + * + * @name Phaser.Display.Masks.BitmapMask#maskTexture + * @type {WebGLTexture} + * @default null + * @since 3.0.0 + */ + this.maskTexture = null; + + /** + * The texture used for the main framebuffer. + * + * @name Phaser.Display.Masks.BitmapMask#mainTexture + * @type {WebGLTexture} + * @default null + * @since 3.0.0 + */ + this.mainTexture = null; + + /** + * Whether the Bitmap Mask is dirty and needs to be updated. + * + * @name Phaser.Display.Masks.BitmapMask#dirty + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.dirty = true; + + /** + * The framebuffer to which a masked Game Object is rendered. + * + * @name Phaser.Display.Masks.BitmapMask#mainFramebuffer + * @type {WebGLFramebuffer} + * @since 3.0.0 + */ + this.mainFramebuffer = null; + + /** + * The framebuffer to which the Bitmap Mask's masking Game Object is rendered. + * + * @name Phaser.Display.Masks.BitmapMask#maskFramebuffer + * @type {WebGLFramebuffer} + * @since 3.0.0 + */ + this.maskFramebuffer = null; + + /** + * The previous framebuffer set in the renderer before this one was enabled. + * + * @name Phaser.Display.Masks.BitmapMask#prevFramebuffer + * @type {WebGLFramebuffer} + * @since 3.17.0 + */ + this.prevFramebuffer = null; + + /** + * Whether to invert the masks alpha. + * + * If `true`, the alpha of the masking pixel will be inverted before it's multiplied with the masked pixel. Essentially, this means that a masked area will be visible only if the corresponding area in the mask is invisible. + * + * @name Phaser.Display.Masks.BitmapMask#invertAlpha + * @type {boolean} + * @since 3.1.2 + */ + this.invertAlpha = false; + + /** + * Is this mask a stencil mask? + * + * @name Phaser.Display.Masks.BitmapMask#isStencil + * @type {boolean} + * @readonly + * @since 3.17.0 + */ + this.isStencil = false; + + if (renderer && renderer.gl) + { + var width = renderer.width; + var height = renderer.height; + var pot = ((width & (width - 1)) === 0 && (height & (height - 1)) === 0); + var gl = renderer.gl; + var wrap = pot ? gl.REPEAT : gl.CLAMP_TO_EDGE; + var filter = gl.LINEAR; + + this.mainTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height); + this.maskTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height); + this.mainFramebuffer = renderer.createFramebuffer(width, height, this.mainTexture, true); + this.maskFramebuffer = renderer.createFramebuffer(width, height, this.maskTexture, true); + + scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, function (renderer) + { + var width = renderer.width; + var height = renderer.height; + var pot = ((width & (width - 1)) === 0 && (height & (height - 1)) === 0); + var gl = renderer.gl; + var wrap = pot ? gl.REPEAT : gl.CLAMP_TO_EDGE; + var filter = gl.LINEAR; + + this.mainTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height); + this.maskTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height); + this.mainFramebuffer = renderer.createFramebuffer(width, height, this.mainTexture, true); + this.maskFramebuffer = renderer.createFramebuffer(width, height, this.maskTexture, true); + + }, this); + } + }, + + /** + * Sets a new masking Game Object for the Bitmap Mask. + * + * @method Phaser.Display.Masks.BitmapMask#setBitmap + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} renderable - A renderable Game Object that uses a texture, such as a Sprite. + */ + setBitmap: function (renderable) + { + this.bitmapMask = renderable; + }, + + /** + * Prepares the WebGL Renderer to render a Game Object with this mask applied. + * + * This renders the masking Game Object to the mask framebuffer and switches to the main framebuffer so that the masked Game Object will be rendered to it instead of being rendered directly to the frame. + * + * @method Phaser.Display.Masks.BitmapMask#preRenderWebGL + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to prepare. + * @param {Phaser.GameObjects.GameObject} maskedObject - The masked Game Object which will be drawn. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to. + */ + preRenderWebGL: function (renderer, maskedObject, camera) + { + renderer.pipelines.BitmapMaskPipeline.beginMask(this, maskedObject, camera); + }, + + /** + * Finalizes rendering of a masked Game Object. + * + * This resets the previously bound framebuffer and switches the WebGL Renderer to the Bitmap Mask Pipeline, which uses a special fragment shader to apply the masking effect. + * + * @method Phaser.Display.Masks.BitmapMask#postRenderWebGL + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to clean up. + */ + postRenderWebGL: function (renderer, camera) + { + renderer.pipelines.BitmapMaskPipeline.endMask(this, camera); + }, + + /** + * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer. + * + * @method Phaser.Display.Masks.BitmapMask#preRenderCanvas + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to. + * @param {Phaser.GameObjects.GameObject} mask - The masked Game Object which would be rendered. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to. + */ + preRenderCanvas: function () + { + // NOOP + }, + + /** + * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer. + * + * @method Phaser.Display.Masks.BitmapMask#postRenderCanvas + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to. + */ + postRenderCanvas: function () + { + // NOOP + }, + + /** + * Destroys this BitmapMask and nulls any references it holds. + * + * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it, + * so be sure to call `clearMask` on any Game Object using it, before destroying it. + * + * @method Phaser.Display.Masks.BitmapMask#destroy + * @since 3.7.0 + */ + destroy: function () + { + this.bitmapMask = null; + + var renderer = this.renderer; + + if (renderer && renderer.gl) + { + renderer.deleteTexture(this.mainTexture); + renderer.deleteTexture(this.maskTexture); + renderer.deleteFramebuffer(this.mainFramebuffer); + renderer.deleteFramebuffer(this.maskFramebuffer); + } + + this.mainTexture = null; + this.maskTexture = null; + this.mainFramebuffer = null; + this.maskFramebuffer = null; + this.prevFramebuffer = null; + this.renderer = null; + } + +}); + +module.exports = BitmapMask; + + +/***/ }), +/* 322 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Core.Events + */ + +module.exports = { + + BLUR: __webpack_require__(323), + BOOT: __webpack_require__(324), + CONTEXT_LOST: __webpack_require__(325), + CONTEXT_RESTORED: __webpack_require__(326), + DESTROY: __webpack_require__(327), + FOCUS: __webpack_require__(328), + HIDDEN: __webpack_require__(329), + PAUSE: __webpack_require__(330), + POST_RENDER: __webpack_require__(331), + POST_STEP: __webpack_require__(332), + PRE_RENDER: __webpack_require__(333), + PRE_STEP: __webpack_require__(334), + READY: __webpack_require__(335), + RESUME: __webpack_require__(336), + STEP: __webpack_require__(337), + VISIBLE: __webpack_require__(338) + +}; + + +/***/ }), +/* 323 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Blur Event. + * + * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded + * enters a blurred state. The blur event is raised when the window loses focus. This can happen if a user swaps + * tab, or if they simply remove focus from the browser to another app. + * + * @event Phaser.Core.Events#BLUR + * @since 3.0.0 + */ +module.exports = 'blur'; + + +/***/ }), +/* 324 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Boot Event. + * + * This event is dispatched when the Phaser Game instance has finished booting, but before it is ready to start running. + * The global systems use this event to know when to set themselves up, dispatching their own `ready` events as required. + * + * @event Phaser.Core.Events#BOOT + * @since 3.0.0 + */ +module.exports = 'boot'; + + +/***/ }), +/* 325 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Context Lost Event. + * + * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Lost event from the browser. + * + * The partner event is `CONTEXT_RESTORED`. + * + * @event Phaser.Core.Events#CONTEXT_LOST + * @since 3.19.0 + */ +module.exports = 'contextlost'; + + +/***/ }), +/* 326 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Context Restored Event. + * + * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Restored event from the browser. + * + * The partner event is `CONTEXT_LOST`. + * + * @event Phaser.Core.Events#CONTEXT_RESTORED + * @since 3.19.0 + */ +module.exports = 'contextrestored'; + + +/***/ }), +/* 327 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Destroy Event. + * + * This event is dispatched when the game instance has been told to destroy itself. + * Lots of internal systems listen to this event in order to clear themselves out. + * Custom plugins and game code should also do the same. + * + * @event Phaser.Core.Events#DESTROY + * @since 3.0.0 + */ +module.exports = 'destroy'; + + +/***/ }), +/* 328 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Focus Event. + * + * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded + * enters a focused state. The focus event is raised when the window re-gains focus, having previously lost it. + * + * @event Phaser.Core.Events#FOCUS + * @since 3.0.0 + */ +module.exports = 'focus'; + + +/***/ }), +/* 329 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Hidden Event. + * + * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded + * enters a hidden state. Only browsers that support the Visibility API will cause this event to be emitted. + * + * In most modern browsers, when the document enters a hidden state, the Request Animation Frame and setTimeout, which + * control the main game loop, will automatically pause. There is no way to stop this from happening. It is something + * your game should account for in its own code, should the pause be an issue (i.e. for multiplayer games) + * + * @event Phaser.Core.Events#HIDDEN + * @since 3.0.0 + */ +module.exports = 'hidden'; + + +/***/ }), +/* 330 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Pause Event. + * + * This event is dispatched when the Game loop enters a paused state, usually as a result of the Visibility Handler. + * + * @event Phaser.Core.Events#PAUSE + * @since 3.0.0 + */ +module.exports = 'pause'; + + +/***/ }), +/* 331 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Post-Render Event. + * + * This event is dispatched right at the end of the render process. + * + * Every Scene will have rendered and been drawn to the canvas by the time this event is fired. + * Use it for any last minute post-processing before the next game step begins. + * + * @event Phaser.Core.Events#POST_RENDER + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - A reference to the current renderer being used by the Game instance. + */ +module.exports = 'postrender'; + + +/***/ }), +/* 332 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Post-Step Event. + * + * This event is dispatched after the Scene Manager has updated. + * Hook into it from plugins or systems that need to do things before the render starts. + * + * @event Phaser.Core.Events#POST_STEP + * @since 3.0.0 + * + * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. + * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. + */ +module.exports = 'poststep'; + + +/***/ }), +/* 333 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Pre-Render Event. + * + * This event is dispatched immediately before any of the Scenes have started to render. + * + * The renderer will already have been initialized this frame, clearing itself and preparing to receive the Scenes for rendering, but it won't have actually drawn anything yet. + * + * @event Phaser.Core.Events#PRE_RENDER + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - A reference to the current renderer being used by the Game instance. + */ +module.exports = 'prerender'; + + +/***/ }), +/* 334 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Pre-Step Event. + * + * This event is dispatched before the main Game Step starts. By this point in the game cycle none of the Scene updates have yet happened. + * Hook into it from plugins or systems that need to update before the Scene Manager does. + * + * @event Phaser.Core.Events#PRE_STEP + * @since 3.0.0 + * + * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. + * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. + */ +module.exports = 'prestep'; + + +/***/ }), +/* 335 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Ready Event. + * + * This event is dispatched when the Phaser Game instance has finished booting, the Texture Manager is fully ready, + * and all local systems are now able to start. + * + * @event Phaser.Core.Events#READY + * @since 3.0.0 + */ +module.exports = 'ready'; + + +/***/ }), +/* 336 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Resume Event. + * + * This event is dispatched when the game loop leaves a paused state and resumes running. + * + * @event Phaser.Core.Events#RESUME + * @since 3.0.0 + */ +module.exports = 'resume'; + + +/***/ }), +/* 337 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Step Event. + * + * This event is dispatched after the Game Pre-Step and before the Scene Manager steps. + * Hook into it from plugins or systems that need to update before the Scene Manager does, but after the core Systems have. + * + * @event Phaser.Core.Events#STEP + * @since 3.0.0 + * + * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. + * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. + */ +module.exports = 'step'; + + +/***/ }), +/* 338 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Visible Event. + * + * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded + * enters a visible state, previously having been hidden. + * + * Only browsers that support the Visibility API will cause this event to be emitted. + * + * @event Phaser.Core.Events#VISIBLE + * @since 3.0.0 + */ +module.exports = 'visible'; + + +/***/ }), +/* 339 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); + +/** + * @classdesc + * A Geometry Mask can be applied to a Game Object to hide any pixels of it which don't intersect + * a visible pixel from the geometry mask. The mask is essentially a clipping path which can only + * make a masked pixel fully visible or fully invisible without changing its alpha (opacity). + * + * A Geometry Mask uses a Graphics Game Object to determine which pixels of the masked Game Object(s) + * should be clipped. For any given point of a masked Game Object's texture, the pixel will only be displayed + * if the Graphics Game Object of the Geometry Mask has a visible pixel at the same position. The color and + * alpha of the pixel from the Geometry Mask do not matter. + * + * The Geometry Mask's location matches the location of its Graphics object, not the location of the masked objects. + * Moving or transforming the underlying Graphics object will change the mask (and affect the visibility + * of any masked objects), whereas moving or transforming a masked object will not affect the mask. + * You can think of the Geometry Mask (or rather, of its Graphics object) as an invisible curtain placed + * in front of all masked objects which has its own visual properties and, naturally, respects the camera's + * visual properties, but isn't affected by and doesn't follow the masked objects by itself. + * + * @class GeometryMask + * @memberof Phaser.Display.Masks + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - This parameter is not used. + * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics Game Object to use for the Geometry Mask. Doesn't have to be in the Display List. + */ +var GeometryMask = new Class({ + + initialize: + + function GeometryMask (scene, graphicsGeometry) + { + /** + * The Graphics object which describes the Geometry Mask. + * + * @name Phaser.Display.Masks.GeometryMask#geometryMask + * @type {Phaser.GameObjects.Graphics} + * @since 3.0.0 + */ + this.geometryMask = graphicsGeometry; + + /** + * Similar to the BitmapMasks invertAlpha setting this to true will then hide all pixels + * drawn to the Geometry Mask. + * + * @name Phaser.Display.Masks.GeometryMask#invertAlpha + * @type {boolean} + * @since 3.16.0 + */ + this.invertAlpha = false; + + /** + * Is this mask a stencil mask? + * + * @name Phaser.Display.Masks.GeometryMask#isStencil + * @type {boolean} + * @readonly + * @since 3.17.0 + */ + this.isStencil = true; + + /** + * The current stencil level. + * + * @name Phaser.Display.Masks.GeometryMask#level + * @type {boolean} + * @private + * @since 3.17.0 + */ + this.level = 0; + }, + + /** + * Sets a new Graphics object for the Geometry Mask. + * + * @method Phaser.Display.Masks.GeometryMask#setShape + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics object which will be used for the Geometry Mask. + * + * @return {this} This Geometry Mask + */ + setShape: function (graphicsGeometry) + { + this.geometryMask = graphicsGeometry; + + return this; + }, + + /** + * Sets the `invertAlpha` property of this Geometry Mask. + * Inverting the alpha essentially flips the way the mask works. + * + * @method Phaser.Display.Masks.GeometryMask#setInvertAlpha + * @since 3.17.0 + * + * @param {boolean} [value=true] - Invert the alpha of this mask? + * + * @return {this} This Geometry Mask + */ + setInvertAlpha: function (value) + { + if (value === undefined) { value = true; } + + this.invertAlpha = value; + + return this; + }, + + /** + * Renders the Geometry Mask's underlying Graphics object to the OpenGL stencil buffer and enables the stencil test, which clips rendered pixels according to the mask. + * + * @method Phaser.Display.Masks.GeometryMask#preRenderWebGL + * @since 3.0.0 + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to. + * @param {Phaser.GameObjects.GameObject} child - The Game Object being rendered. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through. + */ + preRenderWebGL: function (renderer, child, camera) + { + var gl = renderer.gl; + + // Force flushing before drawing to stencil buffer + renderer.flush(); + + if (renderer.maskStack.length === 0) + { + gl.enable(gl.STENCIL_TEST); + gl.clear(gl.STENCIL_BUFFER_BIT); + + renderer.maskCount = 0; + } + + if (renderer.currentCameraMask.mask !== this) + { + renderer.currentMask.mask = this; + } + + renderer.maskStack.push({ mask: this, camera: camera }); + + this.applyStencil(renderer, camera, true); + + renderer.maskCount++; + }, + + /** + * Applies the current stencil mask to the renderer. + * + * @method Phaser.Display.Masks.GeometryMask#applyStencil + * @since 3.17.0 + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through. + * @param {boolean} inc - Is this an INCR stencil or a DECR stencil? + */ + applyStencil: function (renderer, camera, inc) + { + var gl = renderer.gl; + var geometryMask = this.geometryMask; + var level = renderer.maskCount; + + gl.colorMask(false, false, false, false); + + if (inc) + { + gl.stencilFunc(gl.EQUAL, level, 0xFF); + gl.stencilOp(gl.KEEP, gl.KEEP, gl.INCR); + } + else + { + gl.stencilFunc(gl.EQUAL, level + 1, 0xFF); + gl.stencilOp(gl.KEEP, gl.KEEP, gl.DECR); + } + + // Write stencil buffer + geometryMask.renderWebGL(renderer, geometryMask, 0, camera); + + renderer.flush(); + + gl.colorMask(true, true, true, true); + gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP); + + if (inc) + { + if (this.invertAlpha) + { + gl.stencilFunc(gl.NOTEQUAL, level + 1, 0xFF); + } + else + { + gl.stencilFunc(gl.EQUAL, level + 1, 0xFF); + } + } + else if (this.invertAlpha) + { + gl.stencilFunc(gl.NOTEQUAL, level, 0xFF); + } + else + { + gl.stencilFunc(gl.EQUAL, level, 0xFF); + } + }, + + /** + * Flushes all rendered pixels and disables the stencil test of a WebGL context, thus disabling the mask for it. + * + * @method Phaser.Display.Masks.GeometryMask#postRenderWebGL + * @since 3.0.0 + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw flush. + */ + postRenderWebGL: function (renderer) + { + var gl = renderer.gl; + + renderer.maskStack.pop(); + + renderer.maskCount--; + + if (renderer.maskStack.length === 0) + { + // If this is the only mask in the stack, flush and disable + renderer.flush(); + + renderer.currentMask.mask = null; + + gl.disable(gl.STENCIL_TEST); + } + else + { + // Force flush before disabling stencil test + renderer.flush(); + + var prev = renderer.maskStack[renderer.maskStack.length - 1]; + + prev.mask.applyStencil(renderer, prev.camera, false); + + if (renderer.currentCameraMask.mask !== prev.mask) + { + renderer.currentMask.mask = prev.mask; + renderer.currentMask.camera = prev.camera; + } + else + { + renderer.currentMask.mask = null; + } + } + }, + + /** + * Sets the clipping path of a 2D canvas context to the Geometry Mask's underlying Graphics object. + * + * @method Phaser.Display.Masks.GeometryMask#preRenderCanvas + * @since 3.0.0 + * + * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance to set the clipping path on. + * @param {Phaser.GameObjects.GameObject} mask - The Game Object being rendered. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through. + */ + preRenderCanvas: function (renderer, mask, camera) + { + var geometryMask = this.geometryMask; + + renderer.currentContext.save(); + + geometryMask.renderCanvas(renderer, geometryMask, 0, camera, null, null, true); + + renderer.currentContext.clip(); + }, + + /** + * Restore the canvas context's previous clipping path, thus turning off the mask for it. + * + * @method Phaser.Display.Masks.GeometryMask#postRenderCanvas + * @since 3.0.0 + * + * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance being restored. + */ + postRenderCanvas: function (renderer) + { + renderer.currentContext.restore(); + }, + + /** + * Destroys this GeometryMask and nulls any references it holds. + * + * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it, + * so be sure to call `clearMask` on any Game Object using it, before destroying it. + * + * @method Phaser.Display.Masks.GeometryMask#destroy + * @since 3.7.0 + */ + destroy: function () + { + this.geometryMask = null; + } + +}); + +module.exports = GeometryMask; + + +/***/ }), +/* 340 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for getting and setting the origin of a Game Object. + * Values are normalized, given in the range 0 to 1. + * Display values contain the calculated pixel values. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.Origin + * @since 3.0.0 + */ + +var Origin = { + + /** + * A property indicating that a Game Object has this component. + * + * @name Phaser.GameObjects.Components.Origin#_originComponent + * @type {boolean} + * @private + * @default true + * @since 3.2.0 + */ + _originComponent: true, + + /** + * The horizontal 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 left of the Game Object. + * + * @name Phaser.GameObjects.Components.Origin#originX + * @type {number} + * @default 0.5 + * @since 3.0.0 + */ + originX: 0.5, + + /** + * 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. + * + * @name Phaser.GameObjects.Components.Origin#originY + * @type {number} + * @default 0.5 + * @since 3.0.0 + */ + originY: 0.5, + + // private + read only + _displayOriginX: 0, + _displayOriginY: 0, + + /** + * The horizontal display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + * + * @name Phaser.GameObjects.Components.Origin#displayOriginX + * @type {number} + * @since 3.0.0 + */ + displayOriginX: { + + get: function () + { + return this._displayOriginX; + }, + + set: function (value) + { + this._displayOriginX = value; + this.originX = value / this.width; + } + + }, + + /** + * The vertical display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + * + * @name Phaser.GameObjects.Components.Origin#displayOriginY + * @type {number} + * @since 3.0.0 + */ + displayOriginY: { + + get: function () + { + return this._displayOriginY; + }, + + set: function (value) + { + this._displayOriginY = value; + this.originY = value / this.height; + } + + }, + + /** + * Sets the origin of this Game Object. + * + * The values are given in the range 0 to 1. + * + * @method Phaser.GameObjects.Components.Origin#setOrigin + * @since 3.0.0 + * + * @param {number} [x=0.5] - The horizontal origin value. + * @param {number} [y=x] - The vertical origin value. If not defined it will be set to the value of `x`. + * + * @return {this} This Game Object instance. + */ + setOrigin: function (x, y) + { + if (x === undefined) { x = 0.5; } + if (y === undefined) { y = x; } + + this.originX = x; + this.originY = y; + + return this.updateDisplayOrigin(); + }, + + /** + * Sets the origin of this Game Object based on the Pivot values in its Frame. + * + * @method Phaser.GameObjects.Components.Origin#setOriginFromFrame + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + setOriginFromFrame: function () + { + if (!this.frame || !this.frame.customPivot) + { + return this.setOrigin(); + } + else + { + this.originX = this.frame.pivotX; + this.originY = this.frame.pivotY; + } + + return this.updateDisplayOrigin(); + }, + + /** + * Sets the display origin of this Game Object. + * The difference between this and setting the origin is that you can use pixel values for setting the display origin. + * + * @method Phaser.GameObjects.Components.Origin#setDisplayOrigin + * @since 3.0.0 + * + * @param {number} [x=0] - The horizontal display origin value. + * @param {number} [y=x] - The vertical display origin value. If not defined it will be set to the value of `x`. + * + * @return {this} This Game Object instance. + */ + setDisplayOrigin: function (x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = x; } + + this.displayOriginX = x; + this.displayOriginY = y; + + return this; + }, + + /** + * Updates the Display Origin cached values internally stored on this Game Object. + * You don't usually call this directly, but it is exposed for edge-cases where you may. + * + * @method Phaser.GameObjects.Components.Origin#updateDisplayOrigin + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + updateDisplayOrigin: function () + { + this._displayOriginX = this.originX * this.width; + this._displayOriginY = this.originY * this.height; + + return this; + } + +}; + +module.exports = Origin; + + +/***/ }), +/* 341 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var DegToRad = __webpack_require__(17); +var GetBoolean = __webpack_require__(342); +var GetValue = __webpack_require__(6); +var TWEEN_CONST = __webpack_require__(343); +var Vector2 = __webpack_require__(1); + +/** + * Provides methods used for managing a Game Object following a Path. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.PathFollower + * @since 3.17.0 + */ + +var PathFollower = { + + /** + * The Path this PathFollower is following. It can only follow one Path at a time. + * + * @name Phaser.GameObjects.Components.PathFollower#path + * @type {Phaser.Curves.Path} + * @since 3.0.0 + */ + path: null, + + /** + * Should the PathFollower automatically rotate to point in the direction of the Path? + * + * @name Phaser.GameObjects.Components.PathFollower#rotateToPath + * @type {boolean} + * @default false + * @since 3.0.0 + */ + rotateToPath: false, + + /** + * If the PathFollower is rotating to match the Path (@see Phaser.GameObjects.PathFollower#rotateToPath) + * this value is added to the rotation value. This allows you to rotate objects to a path but control + * the angle of the rotation as well. + * + * @name Phaser.GameObjects.PathFollower#pathRotationOffset + * @type {number} + * @default 0 + * @since 3.0.0 + */ + pathRotationOffset: 0, + + /** + * An additional vector to add to the PathFollowers position, allowing you to offset it from the + * Path coordinates. + * + * @name Phaser.GameObjects.PathFollower#pathOffset + * @type {Phaser.Math.Vector2} + * @since 3.0.0 + */ + pathOffset: null, + + /** + * A Vector2 that stores the current point of the path the follower is on. + * + * @name Phaser.GameObjects.PathFollower#pathVector + * @type {Phaser.Math.Vector2} + * @since 3.0.0 + */ + pathVector: null, + + /** + * The distance the follower has traveled from the previous point to the current one, at the last update. + * + * @name Phaser.GameObjects.PathFollower#pathDelta + * @type {Phaser.Math.Vector2} + * @since 3.23.0 + */ + pathDelta: null, + + /** + * The Tween used for following the Path. + * + * @name Phaser.GameObjects.PathFollower#pathTween + * @type {Phaser.Tweens.Tween} + * @since 3.0.0 + */ + pathTween: null, + + /** + * Settings for the PathFollower. + * + * @name Phaser.GameObjects.PathFollower#pathConfig + * @type {?Phaser.Types.GameObjects.PathFollower.PathConfig} + * @default null + * @since 3.0.0 + */ + pathConfig: null, + + /** + * Records the direction of the follower so it can change direction. + * + * @name Phaser.GameObjects.PathFollower#_prevDirection + * @type {integer} + * @private + * @since 3.0.0 + */ + _prevDirection: TWEEN_CONST.PLAYING_FORWARD, + + /** + * Set the Path that this PathFollower should follow. + * + * Optionally accepts {@link Phaser.Types.GameObjects.PathFollower.PathConfig} settings. + * + * @method Phaser.GameObjects.Components.PathFollower#setPath + * @since 3.0.0 + * + * @param {Phaser.Curves.Path} path - The Path this PathFollower is following. It can only follow one Path at a time. + * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config] - Settings for the PathFollower. + * + * @return {this} This Game Object. + */ + setPath: function (path, config) + { + if (config === undefined) { config = this.pathConfig; } + + var tween = this.pathTween; + + if (tween && tween.isPlaying()) + { + tween.stop(); + } + + this.path = path; + + if (config) + { + this.startFollow(config); + } + + return this; + }, + + /** + * Set whether the PathFollower should automatically rotate to point in the direction of the Path. + * + * @method Phaser.GameObjects.Components.PathFollower#setRotateToPath + * @since 3.0.0 + * + * @param {boolean} value - Whether the PathFollower should automatically rotate to point in the direction of the Path. + * @param {number} [offset=0] - Rotation offset in degrees. + * + * @return {this} This Game Object. + */ + setRotateToPath: function (value, offset) + { + if (offset === undefined) { offset = 0; } + + this.rotateToPath = value; + + this.pathRotationOffset = offset; + + return this; + }, + + /** + * Is this PathFollower actively following a Path or not? + * + * To be considered as `isFollowing` it must be currently moving on a Path, and not paused. + * + * @method Phaser.GameObjects.Components.PathFollower#isFollowing + * @since 3.0.0 + * + * @return {boolean} `true` is this PathFollower is actively following a Path, otherwise `false`. + */ + isFollowing: function () + { + var tween = this.pathTween; + + return (tween && tween.isPlaying()); + }, + + /** + * Starts this PathFollower following its given Path. + * + * @method Phaser.GameObjects.Components.PathFollower#startFollow + * @since 3.3.0 + * + * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config={}] - The duration of the follow, or a PathFollower config object. + * @param {number} [startAt=0] - Optional start position of the follow, between 0 and 1. + * + * @return {this} This Game Object. + */ + startFollow: function (config, startAt) + { + if (config === undefined) { config = {}; } + if (startAt === undefined) { startAt = 0; } + + var tween = this.pathTween; + + if (tween && tween.isPlaying()) + { + tween.stop(); + } + + if (typeof config === 'number') + { + config = { duration: config }; + } + + // Override in case they've been specified in the config + config.from = GetValue(config, 'from', 0); + config.to = GetValue(config, 'to', 1); + + var positionOnPath = GetBoolean(config, 'positionOnPath', false); + + this.rotateToPath = GetBoolean(config, 'rotateToPath', false); + this.pathRotationOffset = GetValue(config, 'rotationOffset', 0); + + // This works, but it's not an ideal way of doing it as the follower jumps position + var seek = GetValue(config, 'startAt', startAt); + + if (seek) + { + config.onStart = function (tween) + { + var tweenData = tween.data[0]; + tweenData.progress = seek; + tweenData.elapsed = tweenData.duration * seek; + var v = tweenData.ease(tweenData.progress); + tweenData.current = tweenData.start + ((tweenData.end - tweenData.start) * v); + tweenData.target[tweenData.key] = tweenData.current; + }; + } + + if (!this.pathOffset) + { + this.pathOffset = new Vector2(this.x, this.y); + } + + if (!this.pathVector) + { + this.pathVector = new Vector2(); + } + + if (!this.pathDelta) + { + this.pathDelta = new Vector2(); + } + + this.pathDelta.reset(); + + this.pathTween = this.scene.sys.tweens.addCounter(config); + + // The starting point of the path, relative to this follower + this.path.getStartPoint(this.pathOffset); + + if (positionOnPath) + { + 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 = TWEEN_CONST.PLAYING_FORWARD; + + if (this.rotateToPath) + { + // Set the rotation now (in case the tween has a delay on it, etc) + var nextPoint = this.path.getPoint(0.1); + + this.rotation = Math.atan2(nextPoint.y - this.y, nextPoint.x - this.x) + DegToRad(this.pathRotationOffset); + } + + this.pathConfig = config; + + return this; + }, + + /** + * Pauses this PathFollower. It will still continue to render, but it will remain motionless at the + * point on the Path at which you paused it. + * + * @method Phaser.GameObjects.Components.PathFollower#pauseFollow + * @since 3.3.0 + * + * @return {this} This Game Object. + */ + pauseFollow: function () + { + var tween = this.pathTween; + + if (tween && tween.isPlaying()) + { + tween.pause(); + } + + return this; + }, + + /** + * Resumes a previously paused PathFollower. + * + * If the PathFollower was not paused this has no effect. + * + * @method Phaser.GameObjects.Components.PathFollower#resumeFollow + * @since 3.3.0 + * + * @return {this} This Game Object. + */ + resumeFollow: function () + { + var tween = this.pathTween; + + if (tween && tween.isPaused()) + { + tween.resume(); + } + + return this; + }, + + /** + * Stops this PathFollower from following the path any longer. + * + * This will invoke any 'stop' conditions that may exist on the Path, or for the follower. + * + * @method Phaser.GameObjects.Components.PathFollower#stopFollow + * @since 3.3.0 + * + * @return {this} This Game Object. + */ + stopFollow: function () + { + var tween = this.pathTween; + + if (tween && tween.isPlaying()) + { + tween.stop(); + } + + return this; + }, + + /** + * Internal update handler that advances this PathFollower along the path. + * + * Called automatically by the Scene step, should not typically be called directly. + * + * @method Phaser.GameObjects.Components.PathFollower#pathUpdate + * @since 3.17.0 + */ + pathUpdate: function () + { + var tween = this.pathTween; + + if (tween) + { + var tweenData = tween.data[0]; + var pathDelta = this.pathDelta; + var pathVector = this.pathVector; + + pathDelta.copy(pathVector).negate(); + + if (tweenData.state === TWEEN_CONST.COMPLETE) + { + this.path.getPoint(1, pathVector); + + pathDelta.add(pathVector); + pathVector.add(this.pathOffset); + + this.setPosition(pathVector.x, pathVector.y); + + return; + } + else if (tweenData.state !== TWEEN_CONST.PLAYING_FORWARD && tweenData.state !== TWEEN_CONST.PLAYING_BACKWARD) + { + // If delayed, etc then bail out + return; + } + + this.path.getPoint(tween.getValue(), pathVector); + + pathDelta.add(pathVector); + pathVector.add(this.pathOffset); + + var oldX = this.x; + var oldY = this.y; + + this.setPosition(pathVector.x, pathVector.y); + + var speedX = this.x - oldX; + var speedY = this.y - oldY; + + if (speedX === 0 && speedY === 0) + { + // Bail out early + return; + } + + if (tweenData.state !== this._prevDirection) + { + // We've changed direction, so don't do a rotate this frame + this._prevDirection = tweenData.state; + + return; + } + + if (this.rotateToPath) + { + this.rotation = Math.atan2(speedY, speedX) + DegToRad(this.pathRotationOffset); + } + } + } + +}; + +module.exports = PathFollower; + + +/***/ }), +/* 342 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Retrieves the value of the given key from an object. + * + * @function Phaser.Tweens.Builders.GetBoolean + * @since 3.0.0 + * + * @param {object} source - The object to retrieve the value from. + * @param {string} key - The key to look for in the `source` object. + * @param {*} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided. + * + * @return {*} The retrieved value. + */ +var GetBoolean = function (source, key, defaultValue) +{ + if (!source) + { + return defaultValue; + } + else if (source.hasOwnProperty(key)) + { + return source[key]; + } + else + { + return defaultValue; + } +}; + +module.exports = GetBoolean; + + +/***/ }), +/* 343 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var TWEEN_CONST = { + + /** + * TweenData state. + * + * @name Phaser.Tweens.CREATED + * @type {integer} + * @since 3.0.0 + */ + CREATED: 0, + + /** + * TweenData state. + * + * @name Phaser.Tweens.INIT + * @type {integer} + * @since 3.0.0 + */ + INIT: 1, + + /** + * TweenData state. + * + * @name Phaser.Tweens.DELAY + * @type {integer} + * @since 3.0.0 + */ + DELAY: 2, + + /** + * TweenData state. + * + * @name Phaser.Tweens.OFFSET_DELAY + * @type {integer} + * @since 3.0.0 + */ + OFFSET_DELAY: 3, + + /** + * TweenData state. + * + * @name Phaser.Tweens.PENDING_RENDER + * @type {integer} + * @since 3.0.0 + */ + PENDING_RENDER: 4, + + /** + * TweenData state. + * + * @name Phaser.Tweens.PLAYING_FORWARD + * @type {integer} + * @since 3.0.0 + */ + PLAYING_FORWARD: 5, + + /** + * TweenData state. + * + * @name Phaser.Tweens.PLAYING_BACKWARD + * @type {integer} + * @since 3.0.0 + */ + PLAYING_BACKWARD: 6, + + /** + * TweenData state. + * + * @name Phaser.Tweens.HOLD_DELAY + * @type {integer} + * @since 3.0.0 + */ + HOLD_DELAY: 7, + + /** + * TweenData state. + * + * @name Phaser.Tweens.REPEAT_DELAY + * @type {integer} + * @since 3.0.0 + */ + REPEAT_DELAY: 8, + + /** + * TweenData state. + * + * @name Phaser.Tweens.COMPLETE + * @type {integer} + * @since 3.0.0 + */ + COMPLETE: 9, + + // Tween specific (starts from 20 to cleanly allow extra TweenData consts in the future) + + /** + * Tween state. + * + * @name Phaser.Tweens.PENDING_ADD + * @type {integer} + * @since 3.0.0 + */ + PENDING_ADD: 20, + + /** + * Tween state. + * + * @name Phaser.Tweens.PAUSED + * @type {integer} + * @since 3.0.0 + */ + PAUSED: 21, + + /** + * Tween state. + * + * @name Phaser.Tweens.LOOP_DELAY + * @type {integer} + * @since 3.0.0 + */ + LOOP_DELAY: 22, + + /** + * Tween state. + * + * @name Phaser.Tweens.ACTIVE + * @type {integer} + * @since 3.0.0 + */ + ACTIVE: 23, + + /** + * Tween state. + * + * @name Phaser.Tweens.COMPLETE_DELAY + * @type {integer} + * @since 3.0.0 + */ + COMPLETE_DELAY: 24, + + /** + * Tween state. + * + * @name Phaser.Tweens.PENDING_REMOVE + * @type {integer} + * @since 3.0.0 + */ + PENDING_REMOVE: 25, + + /** + * Tween state. + * + * @name Phaser.Tweens.REMOVED + * @type {integer} + * @since 3.0.0 + */ + REMOVED: 26 + +}; + +module.exports = TWEEN_CONST; + + +/***/ }), +/* 344 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for setting the WebGL rendering pipeline of a Game Object. + * + * @namespace Phaser.GameObjects.Components.Pipeline + * @webglOnly + * @since 3.0.0 + */ + +var Pipeline = { + + /** + * The initial WebGL pipeline of this Game Object. + * + * @name Phaser.GameObjects.Components.Pipeline#defaultPipeline + * @type {Phaser.Renderer.WebGL.WebGLPipeline} + * @default null + * @webglOnly + * @since 3.0.0 + */ + defaultPipeline: null, + + /** + * The current WebGL pipeline of this Game Object. + * + * @name Phaser.GameObjects.Components.Pipeline#pipeline + * @type {Phaser.Renderer.WebGL.WebGLPipeline} + * @default null + * @webglOnly + * @since 3.0.0 + */ + pipeline: null, + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * + * This should only be called during the instantiation of the Game Object. + * + * @method Phaser.GameObjects.Components.Pipeline#initPipeline + * @webglOnly + * @since 3.0.0 + * + * @param {string} [pipelineName=MultiPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Multi Pipeline. + * + * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. + */ + initPipeline: function (pipelineName) + { + if (pipelineName === undefined) { pipelineName = 'MultiPipeline'; } + + var renderer = this.scene.sys.game.renderer; + + if (renderer && renderer.gl && renderer.hasPipeline(pipelineName)) + { + this.defaultPipeline = renderer.getPipeline(pipelineName); + this.pipeline = this.defaultPipeline; + + return true; + } + + return false; + }, + + /** + * Sets the active WebGL Pipeline of this Game Object. + * + * @method Phaser.GameObjects.Components.Pipeline#setPipeline + * @webglOnly + * @since 3.0.0 + * + * @param {string} pipelineName - The name of the pipeline to set on this Game Object. + * + * @return {this} This Game Object instance. + */ + setPipeline: function (pipelineName) + { + var renderer = this.scene.sys.game.renderer; + + if (renderer && renderer.gl && renderer.hasPipeline(pipelineName)) + { + this.pipeline = renderer.getPipeline(pipelineName); + } + + return this; + }, + + /** + * Resets the WebGL Pipeline of this Game Object back to the default it was created with. + * + * @method Phaser.GameObjects.Components.Pipeline#resetPipeline + * @webglOnly + * @since 3.0.0 + * + * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. + */ + resetPipeline: function () + { + this.pipeline = this.defaultPipeline; + + return (this.pipeline !== null); + }, + + /** + * Gets the name of the WebGL Pipeline this Game Object is currently using. + * + * @method Phaser.GameObjects.Components.Pipeline#getPipelineName + * @webglOnly + * @since 3.0.0 + * + * @return {string} The string-based name of the pipeline being used by this Game Object. + */ + getPipelineName: function () + { + return this.pipeline.name; + } + +}; + +module.exports = Pipeline; + + +/***/ }), +/* 345 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for getting and setting the size of a Game Object. + * + * @namespace Phaser.GameObjects.Components.Size + * @since 3.0.0 + */ + +var Size = { + + /** + * A property indicating that a Game Object has this component. + * + * @name Phaser.GameObjects.Components.Size#_sizeComponent + * @type {boolean} + * @private + * @default true + * @since 3.2.0 + */ + _sizeComponent: true, + + /** + * The native (un-scaled) width of this Game Object. + * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayWidth` property. + * + * @name Phaser.GameObjects.Components.Size#width + * @type {number} + * @since 3.0.0 + */ + width: 0, + + /** + * The native (un-scaled) height of this Game Object. + * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayHeight` property. + * + * @name Phaser.GameObjects.Components.Size#height + * @type {number} + * @since 3.0.0 + */ + height: 0, + + /** + * The displayed width of this Game Object. + * + * This value takes into account the scale factor. + * + * Setting this value will adjust the Game Object's scale property. + * + * @name Phaser.GameObjects.Components.Size#displayWidth + * @type {number} + * @since 3.0.0 + */ + displayWidth: { + + get: function () + { + return Math.abs(this.scaleX * this.frame.realWidth); + }, + + set: function (value) + { + this.scaleX = value / this.frame.realWidth; + } + + }, + + /** + * The displayed height of this Game Object. + * + * This value takes into account the scale factor. + * + * Setting this value will adjust the Game Object's scale property. + * + * @name Phaser.GameObjects.Components.Size#displayHeight + * @type {number} + * @since 3.0.0 + */ + displayHeight: { + + get: function () + { + return Math.abs(this.scaleY * this.frame.realHeight); + }, + + set: function (value) + { + this.scaleY = value / this.frame.realHeight; + } + + }, + + /** + * Sets the size of this Game Object to be that of the given Frame. + * + * This will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or call the + * `setDisplaySize` method, which is the same thing as changing the scale but allows you + * to do so by giving pixel values. + * + * If you have enabled this Game Object for input, changing the size will _not_ change the + * size of the hit area. To do this you should adjust the `input.hitArea` object directly. + * + * @method Phaser.GameObjects.Components.Size#setSizeToFrame + * @since 3.0.0 + * + * @param {Phaser.Textures.Frame} frame - The frame to base the size of this Game Object on. + * + * @return {this} This Game Object instance. + */ + setSizeToFrame: function (frame) + { + if (frame === undefined) { frame = this.frame; } + + this.width = frame.realWidth; + this.height = frame.realHeight; + + return this; + }, + + /** + * Sets the internal size of this Game Object, as used for frame or physics body creation. + * + * This will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or call the + * `setDisplaySize` method, which is the same thing as changing the scale but allows you + * to do so by giving pixel values. + * + * If you have enabled this Game Object for input, changing the size will _not_ change the + * size of the hit area. To do this you should adjust the `input.hitArea` object directly. + * + * @method Phaser.GameObjects.Components.Size#setSize + * @since 3.0.0 + * + * @param {number} width - The width of this Game Object. + * @param {number} height - The height of this Game Object. + * + * @return {this} This Game Object instance. + */ + setSize: function (width, height) + { + this.width = width; + this.height = height; + + return this; + }, + + /** + * Sets the display size of this Game Object. + * + * Calling this will adjust the scale. + * + * @method Phaser.GameObjects.Components.Size#setDisplaySize + * @since 3.0.0 + * + * @param {number} width - The width of this Game Object. + * @param {number} height - The height of this Game Object. + * + * @return {this} This Game Object instance. + */ + setDisplaySize: function (width, height) + { + this.displayWidth = width; + this.displayHeight = height; + + return this; + } + +}; + +module.exports = Size; + + +/***/ }), +/* 346 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// bitmask flag for GameObject.renderMask +var _FLAG = 8; // 1000 + +/** + * Provides methods used for getting and setting the texture of a Game Object. + * + * @namespace Phaser.GameObjects.Components.Texture + * @since 3.0.0 + */ + +var Texture = { + + /** + * The Texture this Game Object is using to render with. + * + * @name Phaser.GameObjects.Components.Texture#texture + * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture} + * @since 3.0.0 + */ + texture: null, + + /** + * The Texture Frame this Game Object is using to render with. + * + * @name Phaser.GameObjects.Components.Texture#frame + * @type {Phaser.Textures.Frame} + * @since 3.0.0 + */ + frame: null, + + /** + * Internal flag. Not to be set by this Game Object. + * + * @name Phaser.GameObjects.Components.Texture#isCropped + * @type {boolean} + * @private + * @since 3.11.0 + */ + isCropped: false, + + /** + * 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. + * + * @method Phaser.GameObjects.Components.Texture#setTexture + * @since 3.0.0 + * + * @param {(string|Phaser.Textures.Texture)} key - The key of the texture to be used, as stored in the Texture Manager, or a Texture instance. + * @param {(string|integer)} [frame] - The name or index of the frame within the Texture. + * + * @return {this} This Game Object instance. + */ + setTexture: function (key, frame) + { + this.texture = this.scene.sys.textures.get(key); + + return this.setFrame(frame); + }, + + /** + * Sets the frame this Game Object will use to render with. + * + * The Frame has to belong to the current Texture being used. + * + * It can be either a string or an index. + * + * 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. + * + * @method Phaser.GameObjects.Components.Texture#setFrame + * @since 3.0.0 + * + * @param {(string|integer)} frame - The name or index of the frame within the Texture. + * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object? + * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object? + * + * @return {this} This Game Object instance. + */ + setFrame: function (frame, updateSize, updateOrigin) + { + if (updateSize === undefined) { updateSize = true; } + if (updateOrigin === undefined) { updateOrigin = true; } + + this.frame = this.texture.get(frame); + + if (!this.frame.cutWidth || !this.frame.cutHeight) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + + if (this._sizeComponent && updateSize) + { + this.setSizeToFrame(); + } + + if (this._originComponent && updateOrigin) + { + if (this.frame.customPivot) + { + this.setOrigin(this.frame.pivotX, this.frame.pivotY); + } + else + { + this.updateDisplayOrigin(); + } + } + + return this; + } + +}; + +module.exports = Texture; + + +/***/ }), +/* 347 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// bitmask flag for GameObject.renderMask +var _FLAG = 8; // 1000 + +/** + * Provides methods used for getting and setting the texture of a Game Object. + * + * @namespace Phaser.GameObjects.Components.TextureCrop + * @since 3.0.0 + */ + +var TextureCrop = { + + /** + * The Texture this Game Object is using to render with. + * + * @name Phaser.GameObjects.Components.TextureCrop#texture + * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture} + * @since 3.0.0 + */ + texture: null, + + /** + * The Texture Frame this Game Object is using to render with. + * + * @name Phaser.GameObjects.Components.TextureCrop#frame + * @type {Phaser.Textures.Frame} + * @since 3.0.0 + */ + frame: null, + + /** + * A boolean flag indicating if this Game Object is being cropped or not. + * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off. + * Equally, calling `setCrop` with no arguments will reset the crop and disable it. + * + * @name Phaser.GameObjects.Components.TextureCrop#isCropped + * @type {boolean} + * @since 3.11.0 + */ + isCropped: false, + + /** + * Applies a crop to a texture based Game Object, such as a Sprite or Image. + * + * The crop is a rectangle that limits the area of the texture frame that is visible during rendering. + * + * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just + * changes what is shown when rendered. + * + * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left. + * + * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left + * half of it, you could call `setCrop(0, 0, 400, 600)`. + * + * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop + * an area of 200x100 when applied to a Game Object that had a scale factor of 2. + * + * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument. + * + * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`. + * + * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow + * the renderer to skip several internal calculations. + * + * @method Phaser.GameObjects.Components.TextureCrop#setCrop + * @since 3.11.0 + * + * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored. + * @param {number} [y] - The y coordinate to start the crop from. + * @param {number} [width] - The width of the crop rectangle in pixels. + * @param {number} [height] - The height of the crop rectangle in pixels. + * + * @return {this} This Game Object instance. + */ + setCrop: function (x, y, width, height) + { + if (x === undefined) + { + this.isCropped = false; + } + else if (this.frame) + { + if (typeof x === 'number') + { + this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY); + } + else + { + var rect = x; + + this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY); + } + + this.isCropped = true; + } + + return this; + }, + + /** + * 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. + * + * @method Phaser.GameObjects.Components.TextureCrop#setTexture + * @since 3.0.0 + * + * @param {string} key - The key of the texture to be used, as stored in the Texture Manager. + * @param {(string|integer)} [frame] - The name or index of the frame within the Texture. + * + * @return {this} This Game Object instance. + */ + setTexture: function (key, frame) + { + this.texture = this.scene.sys.textures.get(key); + + return this.setFrame(frame); + }, + + /** + * Sets the frame this Game Object will use to render with. + * + * The Frame has to belong to the current Texture being used. + * + * It can be either a string or an index. + * + * 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. + * + * @method Phaser.GameObjects.Components.TextureCrop#setFrame + * @since 3.0.0 + * + * @param {(string|integer)} frame - The name or index of the frame within the Texture. + * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object? + * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object? + * + * @return {this} This Game Object instance. + */ + setFrame: function (frame, updateSize, updateOrigin) + { + if (updateSize === undefined) { updateSize = true; } + if (updateOrigin === undefined) { updateOrigin = true; } + + this.frame = this.texture.get(frame); + + if (!this.frame.cutWidth || !this.frame.cutHeight) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + + if (this._sizeComponent && updateSize) + { + this.setSizeToFrame(); + } + + if (this._originComponent && updateOrigin) + { + if (this.frame.customPivot) + { + this.setOrigin(this.frame.pivotX, this.frame.pivotY); + } + else + { + this.updateDisplayOrigin(); + } + } + + if (this.isCropped) + { + this.frame.updateCropUVs(this._crop, this.flipX, this.flipY); + } + + return this; + }, + + /** + * Internal method that returns a blank, well-formed crop object for use by a Game Object. + * + * @method Phaser.GameObjects.Components.TextureCrop#resetCropObject + * @private + * @since 3.12.0 + * + * @return {object} The crop object. + */ + resetCropObject: function () + { + return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 }; + } + +}; + +module.exports = TextureCrop; + + +/***/ }), +/* 348 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetColorFromValue = __webpack_require__(349); + +/** + * Provides methods used for setting the tint of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.Tint + * @webglOnly + * @since 3.0.0 + */ + +var Tint = { + + /** + * Private internal value. Holds the top-left tint value. + * + * @name Phaser.GameObjects.Components.Tint#_tintTL + * @type {number} + * @private + * @default 16777215 + * @since 3.0.0 + */ + _tintTL: 16777215, + + /** + * Private internal value. Holds the top-right tint value. + * + * @name Phaser.GameObjects.Components.Tint#_tintTR + * @type {number} + * @private + * @default 16777215 + * @since 3.0.0 + */ + _tintTR: 16777215, + + /** + * Private internal value. Holds the bottom-left tint value. + * + * @name Phaser.GameObjects.Components.Tint#_tintBL + * @type {number} + * @private + * @default 16777215 + * @since 3.0.0 + */ + _tintBL: 16777215, + + /** + * Private internal value. Holds the bottom-right tint value. + * + * @name Phaser.GameObjects.Components.Tint#_tintBR + * @type {number} + * @private + * @default 16777215 + * @since 3.0.0 + */ + _tintBR: 16777215, + + /** + * Private internal value. Holds if the Game Object is tinted or not. + * + * @name Phaser.GameObjects.Components.Tint#_isTinted + * @type {boolean} + * @private + * @default false + * @since 3.11.0 + */ + _isTinted: false, + + /** + * Fill or additive? + * + * @name Phaser.GameObjects.Components.Tint#tintFill + * @type {boolean} + * @default false + * @since 3.11.0 + */ + tintFill: false, + + /** + * Clears all tint values associated with this Game Object. + * + * Immediately sets the color values back to 0xffffff and the tint type to 'additive', + * which results in no visible change to the texture. + * + * @method Phaser.GameObjects.Components.Tint#clearTint + * @webglOnly + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + clearTint: function () + { + this.setTint(0xffffff); + + this._isTinted = false; + + return this; + }, + + /** + * Sets an additive tint on this Game Object. + * + * The tint works by taking the pixel color values from the Game Objects texture, and then + * multiplying it by the color value of the tint. You can provide either one color value, + * in which case the whole Game Object will be tinted in that color. Or you can provide a color + * per corner. The colors are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`. + * + * @method Phaser.GameObjects.Components.Tint#setTint + * @webglOnly + * @since 3.0.0 + * + * @param {integer} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object. + * @param {integer} [topRight] - The tint being applied to the top-right of the Game Object. + * @param {integer} [bottomLeft] - The tint being applied to the bottom-left of the Game Object. + * @param {integer} [bottomRight] - The tint being applied to the bottom-right of the Game Object. + * + * @return {this} This Game Object instance. + */ + setTint: function (topLeft, topRight, bottomLeft, bottomRight) + { + if (topLeft === undefined) { topLeft = 0xffffff; } + + if (topRight === undefined) + { + topRight = topLeft; + bottomLeft = topLeft; + bottomRight = topLeft; + } + + this._tintTL = GetColorFromValue(topLeft); + this._tintTR = GetColorFromValue(topRight); + this._tintBL = GetColorFromValue(bottomLeft); + this._tintBR = GetColorFromValue(bottomRight); + + this._isTinted = true; + + this.tintFill = false; + + return this; + }, + + /** + * Sets a fill-based tint on this Game Object. + * + * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture + * with those in the tint. You can use this for effects such as making a player flash 'white' + * if hit by something. You can provide either one color value, in which case the whole + * Game Object will be rendered in that color. Or you can provide a color per corner. The colors + * are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`. + * + * @method Phaser.GameObjects.Components.Tint#setTintFill + * @webglOnly + * @since 3.11.0 + * + * @param {integer} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. + * @param {integer} [topRight] - The tint being applied to the top-right of the Game Object. + * @param {integer} [bottomLeft] - The tint being applied to the bottom-left of the Game Object. + * @param {integer} [bottomRight] - The tint being applied to the bottom-right of the Game Object. + * + * @return {this} This Game Object instance. + */ + setTintFill: function (topLeft, topRight, bottomLeft, bottomRight) + { + this.setTint(topLeft, topRight, bottomLeft, bottomRight); + + this.tintFill = true; + + return this; + }, + + /** + * The tint value being applied to the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Tint#tintTopLeft + * @type {integer} + * @webglOnly + * @since 3.0.0 + */ + tintTopLeft: { + + get: function () + { + return this._tintTL; + }, + + set: function (value) + { + this._tintTL = GetColorFromValue(value); + this._isTinted = true; + } + + }, + + /** + * The tint value being applied to the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Tint#tintTopRight + * @type {integer} + * @webglOnly + * @since 3.0.0 + */ + tintTopRight: { + + get: function () + { + return this._tintTR; + }, + + set: function (value) + { + this._tintTR = GetColorFromValue(value); + this._isTinted = true; + } + + }, + + /** + * The tint value being applied to the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Tint#tintBottomLeft + * @type {integer} + * @webglOnly + * @since 3.0.0 + */ + tintBottomLeft: { + + get: function () + { + return this._tintBL; + }, + + set: function (value) + { + this._tintBL = GetColorFromValue(value); + this._isTinted = true; + } + + }, + + /** + * The tint value being applied to the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Tint#tintBottomRight + * @type {integer} + * @webglOnly + * @since 3.0.0 + */ + tintBottomRight: { + + get: function () + { + return this._tintBR; + }, + + set: function (value) + { + this._tintBR = GetColorFromValue(value); + this._isTinted = true; + } + + }, + + /** + * The tint value being applied to the whole of the Game Object. + * This property is a setter-only. Use the properties `tintTopLeft` etc to read the current tint value. + * + * @name Phaser.GameObjects.Components.Tint#tint + * @type {integer} + * @webglOnly + * @since 3.0.0 + */ + tint: { + + set: function (value) + { + this.setTint(value, value, value, value); + } + }, + + /** + * Does this Game Object have a tint applied to it or not? + * + * @name Phaser.GameObjects.Components.Tint#isTinted + * @type {boolean} + * @webglOnly + * @readonly + * @since 3.11.0 + */ + isTinted: { + + get: function () + { + return this._isTinted; + } + + } + +}; + +module.exports = Tint; + + +/***/ }), +/* 349 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Given a hex color value, such as 0xff00ff (for purple), it will return a + * numeric representation of it (i.e. 16711935) for use in WebGL tinting. + * + * @function Phaser.Display.Color.GetColorFromValue + * @since 3.50.0 + * + * @param {number} red - The hex color value, such as 0xff0000. + * + * @return {number} The combined color value. + */ +var GetColorFromValue = function (value) +{ + return (value >> 16) + (value & 0xff00) + ((value & 0xff) << 16); +}; + +module.exports = GetColorFromValue; + + +/***/ }), +/* 350 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var renderWebGL = __webpack_require__(3); +var renderCanvas = __webpack_require__(3); + +if (false) +{} + +if (true) +{ + renderCanvas = __webpack_require__(351); +} + +module.exports = { + + renderWebGL: renderWebGL, + renderCanvas: renderCanvas + +}; + + +/***/ }), +/* 351 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Renders this Game Object with the Canvas Renderer to the given Camera. + * 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.Container#renderCanvas + * @since 3.4.0 + * @private + * + * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. + * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call. + * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. + * @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 ContainerCanvasRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix) +{ + var children = container.list; + + if (children.length === 0) + { + return; + } + + var transformMatrix = container.localTransform; + + if (parentMatrix) + { + transformMatrix.loadIdentity(); + transformMatrix.multiply(parentMatrix); + transformMatrix.translate(container.x, container.y); + transformMatrix.rotate(container.rotation); + transformMatrix.scale(container.scaleX, container.scaleY); + } + else + { + transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY); + } + + var containerHasBlendMode = (container.blendMode !== -1); + + if (!containerHasBlendMode) + { + // If Container is SKIP_TEST then set blend mode to be Normal + renderer.setBlendMode(0); + } + + var alpha = container._alpha; + var scrollFactorX = container.scrollFactorX; + var scrollFactorY = container.scrollFactorY; + + if (container.mask) + { + container.mask.preRenderCanvas(renderer, null, camera); + } + + for (var i = 0; i < children.length; i++) + { + var child = children[i]; + + if (!child.willRender(camera)) + { + continue; + } + + var childAlpha = child.alpha; + var childScrollFactorX = child.scrollFactorX; + var childScrollFactorY = child.scrollFactorY; + + if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode) + { + // If Container doesn't have its own blend mode, then a child can have one + renderer.setBlendMode(child.blendMode); + } + + // Set parent values + child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY); + child.setAlpha(childAlpha * alpha); + + // Render + child.renderCanvas(renderer, child, interpolationPercentage, camera, transformMatrix); + + // Restore original values + child.setAlpha(childAlpha); + child.setScrollFactor(childScrollFactorX, childScrollFactorY); + } + + if (container.mask) + { + container.mask.postRenderCanvas(renderer); + } +}; + +module.exports = ContainerCanvasRenderer; + + +/***/ }), +/* 352 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Rectangle = __webpack_require__(24); + +/** + * Creates a new Rectangle or repositions and/or resizes an existing Rectangle so that it encompasses the two given Rectangles, i.e. calculates their union. + * + * @function Phaser.Geom.Rectangle.Union + * @since 3.0.0 + * + * @generic {Phaser.Geom.Rectangle} O - [out,$return] + * + * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle to use. + * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle to use. + * @param {Phaser.Geom.Rectangle} [out] - The Rectangle to store the union in. + * + * @return {Phaser.Geom.Rectangle} The modified `out` Rectangle, or a new Rectangle if none was provided. + */ +var Union = function (rectA, rectB, out) +{ + if (out === undefined) { out = new Rectangle(); } + + // Cache vars so we can use one of the input rects as the output rect + var x = Math.min(rectA.x, rectB.x); + var y = Math.min(rectA.y, rectB.y); + var w = Math.max(rectA.right, rectB.right) - x; + var h = Math.max(rectA.bottom, rectB.bottom) - y; + + return out.setTo(x, y, w, h); +}; + +module.exports = Union; + + +/***/ }), +/* 353 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var renderWebGL = __webpack_require__(3); +var renderCanvas = __webpack_require__(3); + +if (false) +{} + +if (true) +{ + renderCanvas = __webpack_require__(354); +} + +module.exports = { + + renderWebGL: renderWebGL, + renderCanvas: renderCanvas + +}; + + +/***/ }), +/* 354 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Renders this Game Object with the Canvas Renderer to the given Camera. + * 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.Container#renderCanvas + * @since 3.4.0 + * @private + * + * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. + * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call. + * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. + * @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 SpineContainerCanvasRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix) +{ + var children = container.list; + + if (children.length === 0) + { + return; + } + + var transformMatrix = container.localTransform; + + if (parentMatrix) + { + transformMatrix.loadIdentity(); + transformMatrix.multiply(parentMatrix); + transformMatrix.translate(container.x, container.y); + transformMatrix.rotate(container.rotation); + transformMatrix.scale(container.scaleX, container.scaleY); + } + else + { + transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY); + } + + var containerHasBlendMode = (container.blendMode !== -1); + + if (!containerHasBlendMode) + { + // If Container is SKIP_TEST then set blend mode to be Normal + renderer.setBlendMode(0); + } + + var alpha = container._alpha; + var scrollFactorX = container.scrollFactorX; + var scrollFactorY = container.scrollFactorY; + + if (container.mask) + { + container.mask.preRenderCanvas(renderer, null, camera); + } + + for (var i = 0; i < children.length; i++) + { + var child = children[i]; + + if (!child.willRender(camera)) + { + continue; + } + + var childAlpha = child.alpha; + var childScrollFactorX = child.scrollFactorX; + var childScrollFactorY = child.scrollFactorY; + + if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode) + { + // If Container doesn't have its own blend mode, then a child can have one + renderer.setBlendMode(child.blendMode); + } + + // Set parent values + child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY); + child.setAlpha(childAlpha * alpha); + + // Render + child.renderCanvas(renderer, child, interpolationPercentage, camera, transformMatrix); + + // Restore original values + child.setAlpha(childAlpha); + child.setScrollFactor(childScrollFactorX, childScrollFactorY); + } + + if (container.mask) + { + container.mask.postRenderCanvas(renderer); + } +}; + +module.exports = SpineContainerCanvasRenderer; + + /***/ }) /******/ ]); \ No newline at end of file diff --git a/plugins/spine/dist/SpineCanvasPlugin.min.js b/plugins/spine/dist/SpineCanvasPlugin.min.js index ca48e16b4..e727c3e5a 100644 --- a/plugins/spine/dist/SpineCanvasPlugin.min.js +++ b/plugins/spine/dist/SpineCanvasPlugin.min.js @@ -1 +1 @@ -window.SpinePlugin=function(n){var i={};function r(t){if(i[t])return i[t].exports;var e=i[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}return r.m=n,r.c=i,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=35)}([function(t,e){function s(t,e,n,i){for(var r in e)if(e.hasOwnProperty(r)){var s=(l=e,u=r,d=f=void 0,d=(c=n)?l[u]:Object.getOwnPropertyDescriptor(l,u),!c&&d.value&&"object"==typeof d.value&&(d=d.value),!(!d||!((f=d).get&&"function"==typeof f.get||f.set&&"function"==typeof f.set))&&(void 0===d.enumerable&&(d.enumerable=!0),void 0===d.configurable&&(d.configurable=!0),d));if(!1!==s){if(a=(i||t).prototype,o=r,h=void 0,(h=Object.getOwnPropertyDescriptor(a,o))&&(h.value&&"object"==typeof h.value&&(h=h.value),!1===h.configurable)){if(p.ignoreFinals)continue;throw new Error("cannot override final property '"+r+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,r,s)}else t.prototype[r]=e[r]}var a,o,h,l,u,c,f,d}function a(t,e){if(e){Array.isArray(e)||(e=[e]);for(var n=0;nMath.PI&&(t-=i.PI2),Math.abs(((t+i.TAU)%i.PI2-i.PI2)%i.PI2)}},function(t,e){t.exports=function(t,e){return Math.random()*(e-t)+t}},function(t,e){t.exports=function(t,e,n){return Math.max(e,Math.min(n,t))}},function(t,e,n){var i=n(1);t.exports=function(t){return t*i.RAD_TO_DEG}},function(t,e,n){var i=new(n(0))({initialize:function(t,e,n){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=n||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new i(this.x,this.y,this.z)},crossVectors:function(t,e){var n=t.x,i=t.y,r=t.z,s=e.x,a=e.y,o=e.z;return this.x=i*o-r*a,this.y=r*s-n*o,this.z=n*a-i*s,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,n){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=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||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,n=t.y-this.y,i=t.z-this.z||0;return Math.sqrt(e*e+n*n+i*i)},distanceSq:function(t){var e=t.x-this.x,n=t.y-this.y,i=t.z-this.z||0;return e*e+n*n+i*i},length:function(){var t=this.x,e=this.y,n=this.z;return Math.sqrt(t*t+e*e+n*n)},lengthSq:function(){var t=this.x,e=this.y,n=this.z;return t*t+e*e+n*n},normalize:function(){var t=this.x,e=this.y,n=this.z,i=t*t+e*e+n*n;return 0s[0]&&(e=1),s[8]>s[3*e+e]&&(e=2),n=o[e],i=o[n],r=Math.sqrt(s[3*e+e]-s[3*n+n]-s[3*i+i]+1),h[e]=.5*r,r=.5/r,h[n]=(s[3*n+e]+s[3*e+n])*r,h[i]=(s[3*i+e]+s[3*e+i])*r,this.x=h[0],this.y=h[1],this.z=h[2],this.w=(s[3*i+n]-s[3*n+i])*r),this}});t.exports=f},function(t,e,n){var r=n(15),s=n(33);t.exports=function(t,e){var n=void 0===t?s():r({},t);if(e)for(var i in e)void 0!==e[i]&&(n[i]=e[i]);return n}},function(t,e){t.exports=function(t,e,n,i,r,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===n&&(n=""),void 0===i&&(i=""),void 0===r&&(r=0),void 0===s&&(s=!1),{responseType:t,async:e,user:n,password:i,timeout:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:s}}},function(t,e){t.exports=function(){}},function(t,e,n){var u=n(36),i=n(0),p=n(12),r=n(150),s=n(151),m=n(175),h=n(176),c=n(194),a=new i({Extends:s,initialize:function(t,e){s.call(this,t,e);var n=e.game;this.isWebGL=2===n.config.renderType,this.cache=n.cache.addCustom("spine"),this.spineTextures=n.cache.addCustom("spineTextures"),this.json=n.cache.json,this.textures=n.textures,this.drawDebug=!1,this.gl,this.renderer,this.sceneRenderer,this.skeletonRenderer,this.skeletonDebugRenderer,this.plugin=m,this.temp1,this.temp2,this.isWebGL?(this.runtime=m.webgl,this.renderer=n.renderer,this.gl=n.renderer.gl,this.getAtlas=this.getAtlasWebGL):(this.runtime=m.canvas,this.renderer=n.renderer,this.getAtlas=this.getAtlasCanvas);var l=this;e.registerFileType("spine",this.spineFileCallback,t),e.registerGameObject("spine",function(t,e,n,i,r){var s=new c(this.scene,l,t,e,n,i,r);return this.displayList.add(s),this.updateList.add(s),s},function(t,e){void 0===t&&(t={});var n=p(t,"key",null),i=p(t,"animationName",null),r=p(t,"loop",!1),s=new c(this.scene,l,0,0,n,i,r);void 0!==e&&(t.add=e),u(this.scene,s,t);var a=p(t,"skinName",!1);a&&s.setSkinByName(a);var o=p(t,"slotName",!1),h=p(t,"attachmentName",null);return o&&s.setAttachment(o,h),s.refresh()})},boot:function(){this.isWebGL?(this.bootWebGL(),this.onResize(),this.game.scale.on(r,this.onResize,this)):this.bootCanvas();var t=this.systems.events;t.once("shutdown",this.shutdown,this),t.once("destroy",this.destroy,this)},bootCanvas:function(){this.skeletonRenderer=new m.canvas.SkeletonRenderer(this.scene.sys.context)},bootWebGL:function(){this.sceneRenderer=new m.webgl.SceneRenderer(this.renderer.canvas,this.gl,!0);function t(t,e){var n;t===this.srcBlend&&e===this.dstBlend||(n=this.context.gl,this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),n.blendFunc(this.srcBlend,this.dstBlend)))}this.sceneRenderer.batcher.setBlendMode=t,this.sceneRenderer.shapes.setBlendMode=t,this.skeletonRenderer=this.sceneRenderer.skeletonRenderer,this.skeletonDebugRenderer=this.sceneRenderer.skeletonDebugRenderer,this.temp1=new m.webgl.Vector3(0,0,0),this.temp2=new m.webgl.Vector3(0,0,0)},getAtlasCanvas:function(t){var e=this.cache.get(t);if(e){var n,i=this.spineTextures;return i.has(t)?i.get(t):(n=this.textures,new m.TextureAtlas(e.data,function(t){return new m.canvas.CanvasTexture(n.get(e.prefix+t).getSourceImage())}))}console.warn("No atlas data for: "+t)},getAtlasWebGL:function(t){var e=this.cache.get(t);if(e){var n,i,r=this.spineTextures,s=r.has(t)?r.get(t):(n=this.textures,(i=this.sceneRenderer.context.gl).pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),new m.TextureAtlas(e.data,function(t){return new m.webgl.GLTexture(i,n.get(e.prefix+t).getSourceImage(),!1)}));return s}console.warn("No atlas data for: "+t)},spineFileCallback:function(t,e,n,i,r,s){var a;if(Array.isArray(t))for(var o=0;o=i.PI2-n?t=e:(Math.abs(e-t)>Math.PI&&(e>>0,n=(e*=n)>>>0,n+=4294967296*(e-=n);return 2.3283064365386963e-10*((this.n=n)>>>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;e= 0.");if(null==e)throw new Error("name cannot be null.");this.index=t,this.name=e,this.parent=n}function Dt(t,e){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.mix=t.mix,this.softness=t.softness,this.bendDirection=t.bendDirection,this.compress=t.compress,this.stretch=t.stretch,this.bones=new Array;for(var n=0;n= 0.");if(null==e)throw new Error("name cannot be null.");if(null==n)throw new Error("boneData cannot be null.");this.index=t,this.name=e,this.boneData=n}function Zt(t,e){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new N.Vector2,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.rotateMix=t.rotateMix,this.translateMix=t.translateMix,this.scaleMix=t.scaleMix,this.shearMix=t.shearMix,this.bones=new Array;for(var n=0;n>>1;;){if(t[(s+1)*n]<=e?i=s+1:r=s,i==r)return(i+1)*n;s=i+r>>>1}},r.linearSearch=function(t,e,n){for(var i=0,r=t.length-n;i<=r;i+=n)if(t[i]>e)return i;return-1},r);function r(t,e,n){if(null==t)throw new Error("name cannot be null.");if(null==e)throw new Error("timelines cannot be null.");this.name=t,this.timelines=e,this.timelineIds=[];for(var i=0;i 0: "+t);this.curves=U.Utils.newFloatArray((t-1)*y.BEZIER_SIZE)}U.CurveTimeline=s;var a,o=(kt(v,a=s),v.prototype.getPropertyId=function(){return(n.rotate<<24)+this.boneIndex},v.prototype.setFrame=function(t,e,n){t<<=1,this.frames[t]=e,this.frames[t+v.ROTATION]=n},v.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=o[o.length-v.ENTRIES]){var u=o[o.length+v.PREV_ROTATION];switch(s){case z.setup:h.rotation=h.data.rotation+u*r;break;case z.first:case z.replace:u+=h.data.rotation-h.rotation,u-=360*(16384-(16384.499999999996-u/360|0));case z.add:h.rotation+=u*r}}else{var c=B.binarySearch(o,n,v.ENTRIES),f=o[c+v.PREV_ROTATION],d=o[c],p=this.getCurvePercent((c>>1)-1,1-(n-d)/(o[c+v.PREV_TIME]-d)),m=f+((m=o[c+v.ROTATION]-f)-360*(16384-(16384.499999999996-m/360|0)))*p;switch(s){case z.setup:h.rotation=h.data.rotation+(m-360*(16384-(16384.499999999996-m/360|0)))*r;break;case z.first:case z.replace:m+=h.data.rotation-h.rotation;case z.add:h.rotation+=(m-360*(16384-(16384.499999999996-m/360|0)))*r}}},v.ENTRIES=2,v.PREV_TIME=-2,v.PREV_ROTATION=-1,v.ROTATION=1,v);function v(t){var e=a.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t<<1),e}U.RotateTimeline=o;var h,l=(kt(p,h=s),p.prototype.getPropertyId=function(){return(n.translate<<24)+this.boneIndex},p.prototype.setFrame=function(t,e,n,i){t*=p.ENTRIES,this.frames[t]=e,this.frames[t+p.X]=n,this.frames[t+p.Y]=i},p.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=o[o.length-p.ENTRIES]?(f=o[o.length+p.PREV_X],d=o[o.length+p.PREV_Y]):(f=o[(l=B.binarySearch(o,n,p.ENTRIES))+p.PREV_X],d=o[l+p.PREV_Y],u=o[l],c=this.getCurvePercent(l/p.ENTRIES-1,1-(n-u)/(o[l+p.PREV_TIME]-u)),f+=(o[l+p.X]-f)*c,d+=(o[l+p.Y]-d)*c),s){case z.setup:h.x=h.data.x+f*r,h.y=h.data.y+d*r;break;case z.first:case z.replace:h.x+=(h.data.x+f-h.x)*r,h.y+=(h.data.y+d-h.y)*r;break;case z.add:h.x+=f*r,h.y+=d*r}}},p.ENTRIES=3,p.PREV_TIME=-3,p.PREV_X=-2,p.PREV_Y=-1,p.X=1,p.Y=2,p);function p(t){var e=h.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t*p.ENTRIES),e}U.TranslateTimeline=l;var u,c=(kt(x,u=l),x.prototype.getPropertyId=function(){return(n.scale<<24)+this.boneIndex},x.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=o[o.length-x.ENTRIES]?(f=o[o.length+x.PREV_X]*h.data.scaleX,o[o.length+x.PREV_Y]*h.data.scaleY):(f=o[(l=B.binarySearch(o,n,x.ENTRIES))+x.PREV_X],d=o[l+x.PREV_Y],u=o[l],c=this.getCurvePercent(l/x.ENTRIES-1,1-(n-u)/(o[l+x.PREV_TIME]-u)),f=(f+(o[l+x.X]-f)*c)*h.data.scaleX,(d+(o[l+x.Y]-d)*c)*h.data.scaleY),1==r)s==z.add?(h.scaleX+=f-h.data.scaleX,h.scaleY+=d-h.data.scaleY):(h.scaleX=f,h.scaleY=d);else{var p=0,m=0;if(a==g.mixOut)switch(s){case z.setup:p=h.data.scaleX,m=h.data.scaleY,h.scaleX=p+(Math.abs(f)*U.MathUtils.signum(p)-p)*r,h.scaleY=m+(Math.abs(d)*U.MathUtils.signum(m)-m)*r;break;case z.first:case z.replace:p=h.scaleX,m=h.scaleY,h.scaleX=p+(Math.abs(f)*U.MathUtils.signum(p)-p)*r,h.scaleY=m+(Math.abs(d)*U.MathUtils.signum(m)-m)*r;break;case z.add:p=h.scaleX,m=h.scaleY,h.scaleX=p+(Math.abs(f)*U.MathUtils.signum(p)-h.data.scaleX)*r,h.scaleY=m+(Math.abs(d)*U.MathUtils.signum(m)-h.data.scaleY)*r}else switch(s){case z.setup:p=Math.abs(h.data.scaleX)*U.MathUtils.signum(f),m=Math.abs(h.data.scaleY)*U.MathUtils.signum(d),h.scaleX=p+(f-p)*r,h.scaleY=m+(d-m)*r;break;case z.first:case z.replace:p=Math.abs(h.scaleX)*U.MathUtils.signum(f),m=Math.abs(h.scaleY)*U.MathUtils.signum(d),h.scaleX=p+(f-p)*r,h.scaleY=m+(d-m)*r;break;case z.add:p=U.MathUtils.signum(f),m=U.MathUtils.signum(d),h.scaleX=Math.abs(h.scaleX)*p+(f-Math.abs(h.data.scaleX)*p)*r,h.scaleY=Math.abs(h.scaleY)*m+(d-Math.abs(h.data.scaleY)*m)*r}}}},x);function x(t){return u.call(this,t)||this}U.ScaleTimeline=c;var f,d=(kt(m,f=l),m.prototype.getPropertyId=function(){return(n.shear<<24)+this.boneIndex},m.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=o[o.length-m.ENTRIES]?(f=o[o.length+m.PREV_X],d=o[o.length+m.PREV_Y]):(f=o[(l=B.binarySearch(o,n,m.ENTRIES))+m.PREV_X],d=o[l+m.PREV_Y],u=o[l],c=this.getCurvePercent(l/m.ENTRIES-1,1-(n-u)/(o[l+m.PREV_TIME]-u)),f+=(o[l+m.X]-f)*c,d+=(o[l+m.Y]-d)*c),s){case z.setup:h.shearX=h.data.shearX+f*r,h.shearY=h.data.shearY+d*r;break;case z.first:case z.replace:h.shearX+=(h.data.shearX+f-h.shearX)*r,h.shearY+=(h.data.shearY+d-h.shearY)*r;break;case z.add:h.shearX+=f*r,h.shearY+=d*r}}},m);function m(t){return f.call(this,t)||this}U.ShearTimeline=d;var w,M=(kt(E,w=s),E.prototype.getPropertyId=function(){return(n.color<<24)+this.slotIndex},E.prototype.setFrame=function(t,e,n,i,r,s){t*=E.ENTRIES,this.frames[t]=e,this.frames[t+E.R]=n,this.frames[t+E.G]=i,this.frames[t+E.B]=r,this.frames[t+E.A]=s},E.prototype.apply=function(t,e,n,i,r,s,a){var o=t.slots[this.slotIndex];if(o.bone.active){var h=this.frames;if(n=h[h.length-E.ENTRIES]?(m=h[(c=h.length)+E.PREV_R],g=h[c+E.PREV_G],v=h[c+E.PREV_B],y=h[c+E.PREV_A]):(m=h[(f=B.binarySearch(h,n,E.ENTRIES))+E.PREV_R],g=h[f+E.PREV_G],v=h[f+E.PREV_B],y=h[f+E.PREV_A],d=h[f],p=this.getCurvePercent(f/E.ENTRIES-1,1-(n-d)/(h[f+E.PREV_TIME]-d)),m+=(h[f+E.R]-m)*p,g+=(h[f+E.G]-g)*p,v+=(h[f+E.B]-v)*p,y+=(h[f+E.A]-y)*p),1==r?o.color.set(m,g,v,y):(l=o.color,s==z.setup&&l.setFromColor(o.data.color),l.add((m-l.r)*r,(g-l.g)*r,(v-l.b)*r,(y-l.a)*r))}}},E.ENTRIES=5,E.PREV_TIME=-5,E.PREV_R=-4,E.PREV_G=-3,E.PREV_B=-2,E.PREV_A=-1,E.R=1,E.G=2,E.B=3,E.A=4,E);function E(t){var e=w.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t*E.ENTRIES),e}U.ColorTimeline=M;var T,A=(kt(b,T=s),b.prototype.getPropertyId=function(){return(n.twoColor<<24)+this.slotIndex},b.prototype.setFrame=function(t,e,n,i,r,s,a,o,h){t*=b.ENTRIES,this.frames[t]=e,this.frames[t+b.R]=n,this.frames[t+b.G]=i,this.frames[t+b.B]=r,this.frames[t+b.A]=s,this.frames[t+b.R2]=a,this.frames[t+b.G2]=o,this.frames[t+b.B2]=h},b.prototype.apply=function(t,e,n,i,r,s,a){var o=t.slots[this.slotIndex];if(o.bone.active){var h=this.frames;if(n=h[h.length-b.ENTRIES]?(v=h[(d=h.length)+b.PREV_R],y=h[d+b.PREV_G],x=h[d+b.PREV_B],w=h[d+b.PREV_A],M=h[d+b.PREV_R2],E=h[d+b.PREV_G2],T=h[d+b.PREV_B2]):(v=h[(p=B.binarySearch(h,n,b.ENTRIES))+b.PREV_R],y=h[p+b.PREV_G],x=h[p+b.PREV_B],w=h[p+b.PREV_A],M=h[p+b.PREV_R2],E=h[p+b.PREV_G2],T=h[p+b.PREV_B2],m=h[p],g=this.getCurvePercent(p/b.ENTRIES-1,1-(n-m)/(h[p+b.PREV_TIME]-m)),v+=(h[p+b.R]-v)*g,y+=(h[p+b.G]-y)*g,x+=(h[p+b.B]-x)*g,w+=(h[p+b.A]-w)*g,M+=(h[p+b.R2]-M)*g,E+=(h[p+b.G2]-E)*g,T+=(h[p+b.B2]-T)*g),1==r?(o.color.set(v,y,x,w),o.darkColor.set(M,E,T,1)):(l=o.color,u=o.darkColor,s==z.setup&&(l.setFromColor(o.data.color),u.setFromColor(o.data.darkColor)),l.add((v-l.r)*r,(y-l.g)*r,(x-l.b)*r,(w-l.a)*r),u.add((M-u.r)*r,(E-u.g)*r,(T-u.b)*r,0))}}},b.ENTRIES=8,b.PREV_TIME=-8,b.PREV_R=-7,b.PREV_G=-6,b.PREV_B=-5,b.PREV_A=-4,b.PREV_R2=-3,b.PREV_G2=-2,b.PREV_B2=-1,b.R=1,b.G=2,b.B=3,b.A=4,b.R2=5,b.G2=6,b.B2=7,b);function b(t){var e=T.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t*b.ENTRIES),e}U.TwoColorTimeline=A;var R=(S.prototype.getPropertyId=function(){return(n.attachment<<24)+this.slotIndex},S.prototype.getFrameCount=function(){return this.frames.length},S.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.attachmentNames[t]=n},S.prototype.apply=function(t,e,n,i,r,s,a){var o,h,l,u=t.slots[this.slotIndex];u.bone.active&&(a!=g.mixOut?n<(o=this.frames)[0]?s!=z.setup&&s!=z.first||this.setAttachment(t,u,u.data.attachmentName):(h=0,h=n>=o[o.length-1]?o.length-1:B.binarySearch(o,n,1)-1,l=this.attachmentNames[h],t.slots[this.slotIndex].setAttachment(null==l?null:t.getAttachment(this.slotIndex,l))):s==z.setup&&this.setAttachment(t,u,u.data.attachmentName))},S.prototype.setAttachment=function(t,e,n){e.attachment=null==n?null:t.getAttachment(this.slotIndex,n)},S);function S(t){this.frames=U.Utils.newFloatArray(t),this.attachmentNames=new Array(t)}U.AttachmentTimeline=R;var I,C=null,P=(kt(k,I=s),k.prototype.getPropertyId=function(){return(n.deform<<27)+ +this.attachment.id+this.slotIndex},k.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.frameVertices[t]=n},k.prototype.apply=function(t,e,n,i,r,s,a){var o=t.slots[this.slotIndex];if(o.bone.active){var h=o.getAttachment();if(h instanceof U.VertexAttachment&&h.deformAttachment==this.attachment){var l=o.deform;0==l.length&&(s=z.setup);var u=this.frameVertices,c=u[0].length,f=this.frames;if(n=f[f.length-1]){var y=u[f.length-1];if(1==r)if(s==z.add)if(null==(d=h).bones)for(var m=d.vertices,x=0;x=o[h-1])return;if(!(n=o[l];l++)i.push(this.events[l])}}},V);function V(t){this.frames=U.Utils.newFloatArray(t),this.events=new Array(t)}U.EventTimeline=F;var O=(_.prototype.getPropertyId=function(){return n.drawOrder<<24},_.prototype.getFrameCount=function(){return this.frames.length},_.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.drawOrders[t]=n},_.prototype.apply=function(t,e,n,i,r,s,a){var o=t.drawOrder,h=t.slots;if(a!=g.mixOut){var l=this.frames;if(n=l[l.length-1]?l.length-1:B.binarySearch(l,n)-1,c=this.drawOrders[u];if(null==c)U.Utils.arrayCopy(h,0,o,0,h.length);else for(var f=0,d=c.length;f=f[f.length-N.ENTRIES]?s==z.setup?(d.mix=d.data.mix+(f[f.length+N.PREV_MIX]-d.data.mix)*r,d.softness=d.data.softness+(f[f.length+N.PREV_SOFTNESS]-d.data.softness)*r,a==g.mixOut?(d.bendDirection=d.data.bendDirection,d.compress=d.data.compress,d.stretch=d.data.stretch):(d.bendDirection=f[f.length+N.PREV_BEND_DIRECTION],d.compress=0!=f[f.length+N.PREV_COMPRESS],d.stretch=0!=f[f.length+N.PREV_STRETCH])):(d.mix+=(f[f.length+N.PREV_MIX]-d.mix)*r,d.softness+=(f[f.length+N.PREV_SOFTNESS]-d.softness)*r,a==g.mixIn&&(d.bendDirection=f[f.length+N.PREV_BEND_DIRECTION],d.compress=0!=f[f.length+N.PREV_COMPRESS],d.stretch=0!=f[f.length+N.PREV_STRETCH])):(h=f[(o=B.binarySearch(f,n,N.ENTRIES))+N.PREV_MIX],l=f[o+N.PREV_SOFTNESS],u=f[o],c=this.getCurvePercent(o/N.ENTRIES-1,1-(n-u)/(f[o+N.PREV_TIME]-u)),s==z.setup?(d.mix=d.data.mix+(h+(f[o+N.MIX]-h)*c-d.data.mix)*r,d.softness=d.data.softness+(l+(f[o+N.SOFTNESS]-l)*c-d.data.softness)*r,a==g.mixOut?(d.bendDirection=d.data.bendDirection,d.compress=d.data.compress,d.stretch=d.data.stretch):(d.bendDirection=f[o+N.PREV_BEND_DIRECTION],d.compress=0!=f[o+N.PREV_COMPRESS],d.stretch=0!=f[o+N.PREV_STRETCH])):(d.mix+=(h+(f[o+N.MIX]-h)*c-d.mix)*r,d.softness+=(l+(f[o+N.SOFTNESS]-l)*c-d.softness)*r,a==g.mixIn&&(d.bendDirection=f[o+N.PREV_BEND_DIRECTION],d.compress=0!=f[o+N.PREV_COMPRESS],d.stretch=0!=f[o+N.PREV_STRETCH])))},N.ENTRIES=6,N.PREV_TIME=-6,N.PREV_MIX=-5,N.PREV_SOFTNESS=-4,N.PREV_BEND_DIRECTION=-3,N.PREV_COMPRESS=-2,N.PREV_STRETCH=-1,N.MIX=1,N.SOFTNESS=2,N.BEND_DIRECTION=3,N.COMPRESS=4,N.STRETCH=5,N);function N(t){var e=L.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t*N.ENTRIES),e}U.IkConstraintTimeline=D;var Y,X=(kt(q,Y=s),q.prototype.getPropertyId=function(){return(n.transformConstraint<<24)+this.transformConstraintIndex},q.prototype.setFrame=function(t,e,n,i,r,s){t*=q.ENTRIES,this.frames[t]=e,this.frames[t+q.ROTATE]=n,this.frames[t+q.TRANSLATE]=i,this.frames[t+q.SCALE]=r,this.frames[t+q.SHEAR]=s},q.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.transformConstraints[this.transformConstraintIndex];if(h.active)if(n=o[o.length-q.ENTRIES]?(p=o[(u=o.length)+q.PREV_ROTATE],m=o[u+q.PREV_TRANSLATE],g=o[u+q.PREV_SCALE],v=o[u+q.PREV_SHEAR]):(p=o[(c=B.binarySearch(o,n,q.ENTRIES))+q.PREV_ROTATE],m=o[c+q.PREV_TRANSLATE],g=o[c+q.PREV_SCALE],v=o[c+q.PREV_SHEAR],f=o[c],d=this.getCurvePercent(c/q.ENTRIES-1,1-(n-f)/(o[c+q.PREV_TIME]-f)),p+=(o[c+q.ROTATE]-p)*d,m+=(o[c+q.TRANSLATE]-m)*d,g+=(o[c+q.SCALE]-g)*d,v+=(o[c+q.SHEAR]-v)*d),s==z.setup?(l=h.data,h.rotateMix=l.rotateMix+(p-l.rotateMix)*r,h.translateMix=l.translateMix+(m-l.translateMix)*r,h.scaleMix=l.scaleMix+(g-l.scaleMix)*r,h.shearMix=l.shearMix+(v-l.shearMix)*r):(h.rotateMix+=(p-h.rotateMix)*r,h.translateMix+=(m-h.translateMix)*r,h.scaleMix+=(g-h.scaleMix)*r,h.shearMix+=(v-h.shearMix)*r)}},q.ENTRIES=5,q.PREV_TIME=-5,q.PREV_ROTATE=-4,q.PREV_TRANSLATE=-3,q.PREV_SCALE=-2,q.PREV_SHEAR=-1,q.ROTATE=1,q.TRANSLATE=2,q.SCALE=3,q.SHEAR=4,q);function q(t){var e=Y.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t*q.ENTRIES),e}U.TransformConstraintTimeline=X;var W,G=(kt(H,W=s),H.prototype.getPropertyId=function(){return(n.pathConstraintPosition<<24)+this.pathConstraintIndex},H.prototype.setFrame=function(t,e,n){t*=H.ENTRIES,this.frames[t]=e,this.frames[t+H.VALUE]=n},H.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n=o[o.length-H.ENTRIES]?f=o[o.length+H.PREV_VALUE]:(f=o[(l=B.binarySearch(o,n,H.ENTRIES))+H.PREV_VALUE],u=o[l],c=this.getCurvePercent(l/H.ENTRIES-1,1-(n-u)/(o[l+H.PREV_TIME]-u)),f+=(o[l+H.VALUE]-f)*c),s==z.setup?h.position=h.data.position+(f-h.data.position)*r:h.position+=(f-h.position)*r}},H.ENTRIES=2,H.PREV_TIME=-2,H.PREV_VALUE=-1,H.VALUE=1,H);function H(t){var e=W.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t*H.ENTRIES),e}U.PathConstraintPositionTimeline=G;var j,Z=(kt(K,j=G),K.prototype.getPropertyId=function(){return(n.pathConstraintSpacing<<24)+this.pathConstraintIndex},K.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n=o[o.length-K.ENTRIES]?f=o[o.length+K.PREV_VALUE]:(f=o[(l=B.binarySearch(o,n,K.ENTRIES))+K.PREV_VALUE],u=o[l],c=this.getCurvePercent(l/K.ENTRIES-1,1-(n-u)/(o[l+K.PREV_TIME]-u)),f+=(o[l+K.VALUE]-f)*c),s==z.setup?h.spacing=h.data.spacing+(f-h.data.spacing)*r:h.spacing+=(f-h.spacing)*r}},K);function K(t){return j.call(this,t)||this}U.PathConstraintSpacingTimeline=Z;var Q,J=(kt($,Q=s),$.prototype.getPropertyId=function(){return(n.pathConstraintMix<<24)+this.pathConstraintIndex},$.prototype.setFrame=function(t,e,n,i){t*=$.ENTRIES,this.frames[t]=e,this.frames[t+$.ROTATE]=n,this.frames[t+$.TRANSLATE]=i},$.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n=o[o.length-$.ENTRIES]?(f=o[o.length+$.PREV_ROTATE],d=o[o.length+$.PREV_TRANSLATE]):(f=o[(l=B.binarySearch(o,n,$.ENTRIES))+$.PREV_ROTATE],d=o[l+$.PREV_TRANSLATE],u=o[l],c=this.getCurvePercent(l/$.ENTRIES-1,1-(n-u)/(o[l+$.PREV_TIME]-u)),f+=(o[l+$.ROTATE]-f)*c,d+=(o[l+$.TRANSLATE]-d)*c),s==z.setup?(h.rotateMix=h.data.rotateMix+(f-h.data.rotateMix)*r,h.translateMix=h.data.translateMix+(d-h.data.translateMix)*r):(h.rotateMix+=(f-h.rotateMix)*r,h.translateMix+=(d-h.translateMix)*r)}},$.ENTRIES=3,$.PREV_TIME=-3,$.PREV_ROTATE=-2,$.PREV_TRANSLATE=-1,$.ROTATE=1,$.TRANSLATE=2,$);function $(t){var e=Q.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t*$.ENTRIES),e}U.PathConstraintMixTimeline=J}(St=St||{}),function(R){var t=(S.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,n=0,i=e.length;n=r.trackEnd&&null==r.mixingFrom){e[n]=null,this.queue.end(r),this.disposeNext(r);continue}if(null!=r.mixingFrom&&this.updateMixingFrom(r,t)){var h=r.mixingFrom;for((r.mixingFrom=null)!=h&&(h.mixingTo=null);null!=h;)this.queue.end(h),h=h.mixingFrom}r.trackTime+=s}}this.queue.drain()},S.prototype.updateMixingFrom=function(t,e){var n=t.mixingFrom;if(null==n)return!0;var i=this.updateMixingFrom(n,e);return n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,0=t.mixDuration?(0!=n.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=n.mixingFrom,null!=n.mixingFrom&&(n.mixingFrom.mixingTo=t),t.interruptAlpha=n.interruptAlpha,this.queue.end(n)),i):(n.trackTime+=e*n.timeScale,t.mixTime+=e,!1)},S.prototype.apply=function(t){if(null==t)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var e=this.events,n=this.tracks,i=!1,r=0,s=n.length;r=a.trackEnd&&null==a.next&&(h=0);var l=a.animationLast,u=a.getAnimationTime(),c=a.animation.timelines.length,f=a.animation.timelines;if(0==r&&1==h||o==R.MixBlend.add)for(var d=0;d=s[s.length-1]?s.length-1:R.Animation.binarySearch(s,n)-1,this.setAttachment(e,o,t.attachmentNames[a],r)),o.attachmentState<=this.unkeyedState&&(o.attachmentState=this.unkeyedState+S.SETUP))},S.prototype.setAttachment=function(t,e,n,i){e.attachment=null==n?null:t.getAttachment(e.data.index,n),i&&(e.attachmentState=this.unkeyedState+S.CURRENT)},S.prototype.applyRotateTimeline=function(t,e,n,i,r,s,a,o){if(o&&(s[a]=0),1!=i){var h=t,l=h.frames,u=e.bones[h.boneIndex];if(u.active){var c=0,f=0;if(n=l[l.length-R.RotateTimeline.ENTRIES]?f=u.data.rotation+l[l.length+R.RotateTimeline.PREV_ROTATION]:(p=l[(d=R.Animation.binarySearch(l,n,R.RotateTimeline.ENTRIES))+R.RotateTimeline.PREV_ROTATION],m=l[d],g=h.getCurvePercent((d>>1)-1,1-(n-m)/(l[d+R.RotateTimeline.PREV_TIME]-m)),f=l[d+R.RotateTimeline.ROTATION]-p,f=p+(f-=360*(16384-(16384.499999999996-f/360|0)))*g+u.data.rotation,f-=360*(16384-(16384.499999999996-f/360|0)))}var v,y,x,w,M=0,E=f-c;0==(E-=360*(16384-(16384.499999999996-E/360|0)))?M=s[a]:(y=v=0,y=o?(v=0,E):(v=s[a],s[a+1]),x=0i||this.queue.event(t,l)}for((t.loop?0==r||s>t.trackTime%r:i<=e&&t.animationLast=this.tracks.length)){var e=this.tracks[t];if(null!=e){this.queue.end(e),this.disposeNext(e);for(var n=e;;){var i=n.mixingFrom;if(null==i)break;this.queue.end(i),n.mixingFrom=null,n.mixingTo=null,n=i}this.tracks[e.trackIndex]=null,this.queue.drain()}}},S.prototype.setCurrent=function(t,e,n){var i=this.expandToIndex(t);this.tracks[t]=e,null!=i&&(n&&this.queue.interrupt(i),((e.mixingFrom=i).mixingTo=e).mixTime=0,null!=i.mixingFrom&&0=this.tracks.length?null:this.tracks[t]},S.prototype.addListener=function(t){if(null==t)throw new Error("listener cannot be null.");this.listeners.push(t)},S.prototype.removeListener=function(t){var e=this.listeners.indexOf(t);0<=e&&this.listeners.splice(e,1)},S.prototype.clearListeners=function(){this.listeners.length=0},S.prototype.clearListenerNotifications=function(){this.queue.clear()},S.emptyAnimation=new R.Animation("",[],0),S.SUBSEQUENT=0,S.FIRST=1,S.HOLD_SUBSEQUENT=2,S.HOLD_FIRST=3,S.HOLD_MIX=4,S.SETUP=1,S.CURRENT=2,S);function S(t){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new r(this),this.propertyIDs=new R.IntSet,this.animationsChanged=!1,this.trackEntryPool=new R.Pool(function(){return new e}),this.data=t}R.AnimationState=t;var e=(n.prototype.reset=function(){this.next=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0},n.prototype.getAnimationTime=function(){if(this.loop){var t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)},n.prototype.setAnimationLast=function(t){this.animationLast=t,this.nextAnimationLast=t},n.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},n.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},n);function n(){this.mixBlend=R.MixBlend.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}R.TrackEntry=e;var o,i,r=(s.prototype.start=function(t){this.objects.push(o.start),this.objects.push(t),this.animState.animationsChanged=!0},s.prototype.interrupt=function(t){this.objects.push(o.interrupt),this.objects.push(t)},s.prototype.end=function(t){this.objects.push(o.end),this.objects.push(t),this.animState.animationsChanged=!0},s.prototype.dispose=function(t){this.objects.push(o.dispose),this.objects.push(t)},s.prototype.complete=function(t){this.objects.push(o.complete),this.objects.push(t)},s.prototype.event=function(t,e){this.objects.push(o.event),this.objects.push(t),this.objects.push(e)},s.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var t=this.objects,e=this.animState.listeners,n=0;nj.MathUtils.PI?Y-=j.MathUtils.PI2:Y<-j.MathUtils.PI&&(Y+=j.MathUtils.PI2),Y*=e,L=Math.cos(Y),D=Math.sin(Y),R.a=L*F-D*O,R.b=L*V-D*_,R.c=D*F+L*O,R.d=D*V+L*_),R.appliedValid=!1}}}},Yt.prototype.computeWorldPositions=function(t,e,n,i,r){var s=this.target,a=this.position,o=this.spaces,h=j.Utils.setArraySize(this.positions,3*e+2),l=null,u=t.closed,c=t.worldVerticesLength,f=c/6,d=Yt.NONE;if(!t.constantSpeed){var p=t.lengths,m=p[f-=u?1:2];if(i&&(a*=m),r)for(var g=1;g>>1^-(1&n)},e.prototype.readStringRef=function(){var t=this.readInt(!0);return 0==t?null:this.strings[t-1]},e.prototype.readString=function(){var t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;for(var e="",n=0;n>4){case 12:case 13:e+=String.fromCharCode((31&i)<<6|63&this.readByte()),n+=2;break;case 14:e+=String.fromCharCode((15&i)<<12|(63&this.readByte())<<6|63&this.readByte()),n+=3;break;default:e+=String.fromCharCode(i),n++}}return e},e.prototype.readFloat=function(){var t=this.buffer.getFloat32(this.index);return this.index+=4,t},e.prototype.readBoolean=function(){return 0!=this.readByte()},e);function e(t,e,n,i){void 0===e&&(e=new Array),void 0===n&&(n=0),void 0===i&&(i=new DataView(t.buffer)),this.strings=e,this.index=n,this.buffer=i}var N=function(t,e,n,i,r){this.mesh=t,this.skin=e,this.slotIndex=n,this.parent=i,this.inheritDeform=r},u=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),this.bones=t,this.vertices=e}}(St=St||{}),C=St=St||{},qt.prototype.update=function(t,e){if(null==t)throw new Error("skeleton cannot be null.");var n=this.boundingBoxes,i=this.polygons,r=this.polygonPool,s=t.slots,a=s.length;n.length=0,r.freeAll(i);for(var o=i.length=0;o=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},qt.prototype.aabbIntersectsSegment=function(t,e,n,i){var r=this.minX,s=this.minY,a=this.maxX,o=this.maxY;if(t<=r&&n<=r||e<=s&&i<=s||a<=t&&a<=n||o<=e&&o<=i)return!1;var h=(i-e)/(n-t),l=h*(r-t)+e;if(st.minX&&this.minYt.minY},qt.prototype.containsPoint=function(t,e){for(var n=this.polygons,i=0,r=n.length;i>1,N=this.clipOutput,Y=Z.Utils.setArraySize(l,P+D*d),X=0;X>1;o=i.length&&(i.length=t+1),i[t]||(i[t]={}),i[t][e]=n},e.prototype.addSkin=function(t){for(var e=0;e=this.lines.length?null:this.lines[this.index++]},n.prototype.readValue=function(){var t=this.readLine(),e=t.indexOf(":");if(-1==e)throw new Error("Invalid line: "+t);return t.substring(e+1).trim()},n.prototype.readTuple=function(t){var e=this.readLine(),n=e.indexOf(":");if(-1==n)throw new Error("Invalid line: "+e);for(var i=0,r=n+1;i<3;i++){var s=e.indexOf(",",r);if(-1==s)break;t[i]=e.substr(r,s-r).trim(),r=s+1}return t[i]=e.substring(r).trim(),i+1},n);function n(t){this.index=0,this.lines=t.split(/\r\n|\r|\n/)}var m=function(){};d.TextureAtlasPage=m;var i,g=(i=d.TextureRegion,kt(r,i),r);function r(){return null!==i&&i.apply(this,arguments)||this}d.TextureAtlasRegion=g}(St=St||{}),N=St=St||{},Zt.prototype.isActive=function(){return this.active},Zt.prototype.apply=function(){this.update()},Zt.prototype.update=function(){this.data.local?this.data.relative?this.applyRelativeLocal():this.applyAbsoluteLocal():this.data.relative?this.applyRelativeWorld():this.applyAbsoluteWorld()},Zt.prototype.applyAbsoluteWorld=function(){for(var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target,s=r.a,a=r.b,o=r.c,h=r.d,l=0N.MathUtils.PI?A-=N.MathUtils.PI2:A<-N.MathUtils.PI&&(A+=N.MathUtils.PI2),A*=t,v=Math.cos(A),y=Math.sin(A),R.a=v*m-y*g,R.b=v*M-y*E,R.c=y*m+v*g,R.d=y*M+v*E,S=!0),0!=e&&(x=this.temp,r.localToWorld(x.set(this.data.offsetX,this.data.offsetY)),R.worldX+=(x.x-R.worldX)*e,R.worldY+=(x.y-R.worldY)*e,S=!0),0N.MathUtils.PI?A-=N.MathUtils.PI2:A<-N.MathUtils.PI&&(A+=N.MathUtils.PI2),A=T+(A+c)*i,b=Math.sqrt(M*M+E*E),R.b=Math.cos(A)*b,R.d=Math.sin(A)*b,S=!0),S&&(R.appliedValid=!1)}},Zt.prototype.applyRelativeWorld=function(){for(var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target,s=r.a,a=r.b,o=r.c,h=r.d,l=0N.MathUtils.PI?w-=N.MathUtils.PI2:w<-N.MathUtils.PI&&(w+=N.MathUtils.PI2),w*=t,v=Math.cos(w),y=Math.sin(w),A.a=v*m-y*g,A.b=v*M-y*E,A.c=y*m+v*g,A.d=y*M+v*E,b=!0),0!=e&&(x=this.temp,r.localToWorld(x.set(this.data.offsetX,this.data.offsetY)),A.worldX+=x.x*e,A.worldY+=x.y*e,b=!0),0N.MathUtils.PI?w-=N.MathUtils.PI2:w<-N.MathUtils.PI&&(w+=N.MathUtils.PI2),M=A.b,E=A.d,w=Math.atan2(E,M)+(w-N.MathUtils.PI/2+c)*i,T=Math.sqrt(M*M+E*E),A.b=Math.cos(w)*T,A.d=Math.sin(w)*T,b=!0),b&&(A.appliedValid=!1)}},Zt.prototype.applyAbsoluteLocal=function(){var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target;r.appliedValid||r.updateAppliedTransform();for(var s=this.bones,a=0,o=s.length;a>1,i=this.indicesArray,r=i.length=0;r>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255},r.rgb888ToColor=function(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255},r.WHITE=new r(1,1,1,1),r.RED=new r(1,0,0,1),r.GREEN=new r(0,1,0,1),r.BLUE=new r(0,0,1,1),r.MAGENTA=new r(1,0,1,1),r);function r(t,e,n,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),this.r=t,this.g=e,this.b=n,this.a=i}t.Color=i;var s=(a.clamp=function(t,e,n){return t=e?t:g.setArraySize(t,e,n)},g.newArray=function(t,e){for(var n=new Array(t),i=0;ithis.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,1=this.values.length},R.prototype.addValue=function(t){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0},R.prototype.getMean=function(){if(this.hasEnoughData()){if(this.dirty){for(var t=0,e=0;e>1)*s;var a=t.bone.skeleton,o=t.deform,h=this.vertices,l=this.bones;if(null!=l){for(var u=0,c=0,f=0;f>16&255)/255,r=(t>>8&255)/255,s=(255&t)/255,a=16777215>>24)/255:null,o=this.skeleton;return!e||(n=this.findSlot(e))&&(o=n),o.color.r=i,o.color.g=r,o.color.b=s,null!==a&&(o.color.a=a),this},setSkeletonFromJSON:function(t,e,n,i){return this.setSkeleton(t,e,n,i)},setSkeleton:function(t,e,n,i){this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications());var r=this.plugin.createSkeleton(t,i);this.skeletonData=r.skeletonData,this.preMultipliedAlpha=r.preMultipliedAlpha;var s=r.skeleton;return s.setSkin(),s.setToSetupPose(),this.skeleton=s,r=this.plugin.createAnimationState(s),this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications()),this.state=r.state,this.stateData=r.stateData,this.state.addListener({event:this.onEvent.bind(this),complete:this.onComplete.bind(this),start:this.onStart.bind(this),end:this.onEnd.bind(this),dispose:this.onDispose.bind(this),interrupted:this.onInterrupted.bind(this)}),e&&this.setAnimation(0,e,n),this.root=this.getRootBone(),this.root&&(this.root.rotation=m(f(this.rotation))+90),this.state.apply(s),s.updateCache(),this.updateSize()},onComplete:function(t){this.emit(g.COMPLETE,t)},onDispose:function(t){this.emit(g.DISPOSE,t)},onEnd:function(t){this.emit(g.END,t)},onEvent:function(t,e){this.emit(g.EVENT,t,e)},onInterrupted:function(t){this.emit(g.INTERRUPTED,t)},onStart:function(t){this.emit(g.START,t)},refresh:function(){return this.root&&(this.root.rotation=m(f(this.rotation))+90),this.updateSize(),this.skeleton.updateCache(),this},setSize:function(t,e,n,i){var r=this.skeleton;return void 0===t&&(t=r.data.width),void 0===e&&(e=r.data.height),void 0===n&&(n=0),void 0===i&&(i=0),this.width=t,this.height=e,this.displayOriginX=r.x-n,this.displayOriginY=r.y-i,this},setOffset:function(t,e){var n=this.skeleton;return void 0===t&&(t=0),void 0===e&&(e=0),this.displayOriginX=n.x-t,this.displayOriginY=n.y-e,this},updateSize:function(){var t=this.skeleton,e=this.plugin.renderer.height,n=this.scaleX,i=this.scaleY;t.x=this.x,t.y=e-this.y,t.scaleX=1,t.scaleY=1,t.updateWorldTransform();var r=this.getBounds();return this.width=r.size.x,this.height=r.size.y,this.displayOriginX=this.x-r.offset.x,this.displayOriginY=this.y-(e-(this.height+r.offset.y)),t.scaleX=n,t.scaleY=i,t.updateWorldTransform(),this},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,this.refresh()}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,this.refresh()}},getBoneList:function(){var t=[],e=this.skeletonData;if(e)for(var n=0;n=t.length)){for(var n=t.length-1,i=t[e],r=e;rMath.PI&&(t-=i.PI2),Math.abs(((t+i.TAU)%i.PI2-i.PI2)%i.PI2)}},function(t,e){t.exports=function(t,e){return Math.random()*(e-t)+t}},function(t,e,n){var i=n(2);t.exports=function(t){return t*i.DEG_TO_RAD}},function(t,e,n){var i=n(2);t.exports=function(t){return t*i.RAD_TO_DEG}},function(t,e,n){var i=new(n(0))({initialize:function(t,e,n){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=n||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new i(this.x,this.y,this.z)},crossVectors:function(t,e){var n=t.x,i=t.y,r=t.z,s=e.x,a=e.y,o=e.z;return this.x=i*o-r*a,this.y=r*s-n*o,this.z=n*a-i*s,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,n){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=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||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,n=t.y-this.y,i=t.z-this.z||0;return Math.sqrt(e*e+n*n+i*i)},distanceSq:function(t){var e=t.x-this.x,n=t.y-this.y,i=t.z-this.z||0;return e*e+n*n+i*i},length:function(){var t=this.x,e=this.y,n=this.z;return Math.sqrt(t*t+e*e+n*n)},lengthSq:function(){var t=this.x,e=this.y,n=this.z;return t*t+e*e+n*n},normalize:function(){var t=this.x,e=this.y,n=this.z,i=t*t+e*e+n*n;return 0=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},function(t,e){t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},function(t,e,n){var u=n(7),c=function(){var t,e,n,i,r,s,a=arguments[0]||{},o=1,h=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[1]||{},o=2),h===o&&(a=this,--o);os[0]&&(e=1),s[8]>s[3*e+e]&&(e=2),n=o[e],i=o[n],r=Math.sqrt(s[3*e+e]-s[3*n+n]-s[3*i+i]+1),h[e]=.5*r,r=.5/r,h[n]=(s[3*n+e]+s[3*e+n])*r,h[i]=(s[3*i+e]+s[3*e+i])*r,this.x=h[0],this.y=h[1],this.z=h[2],this.w=(s[3*i+n]-s[3*n+i])*r),this}});t.exports=f},function(t,e,n){var r=n(26),s=n(45);t.exports=function(t,e){var n=void 0===t?s():r({},t);if(e)for(var i in e)void 0!==e[i]&&(n[i]=e[i]);return n}},function(t,e){t.exports=function(t,e,n,i,r,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===n&&(n=""),void 0===i&&(i=""),void 0===r&&(r=0),void 0===s&&(s=!1),{responseType:t,async:e,user:n,password:i,timeout:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:s}}},function(t,e){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}}},function(t,e){var n={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=n},function(t,e){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}}},function(t,e){var n={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=n},function(t,e,n){var i=n(2),r=n(51),h=n(40),s=n(29),a=n(30),l=n(1),o={_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,0===(this._scaleY=t)?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){0===(this._scaleX=t)?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){0===(this._scaleY=t)?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return a(this._rotation*i.RAD_TO_DEG)},set:function(t){this.rotation=a(t)*i.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=s(t)}},setPosition:function(t,e,n,i){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===n&&(n=0),void 0===i&&(i=0),this.x=t,this.y=e,this.z=n,this.w=i,this},setRandomPosition:function(t,e,n,i){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=this.scene.sys.scale.width),void 0===i&&(i=this.scene.sys.scale.height),this.x=t+Math.random()*n,this.y=e+Math.random()*i,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 r),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t,e){void 0===t&&(t=new r),void 0===e&&(e=new r);var n=this.parentContainer;if(!n)return this.getLocalTransformMatrix(t);for(t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);n;)e.applyITRS(n.x,n.y,n._rotation,n._scaleX,n._scaleY),e.multiply(t,t),n=n.parentContainer;return t},getLocalPoint:function(t,e,n,i){n=n||new l;var r=(i=i||this.scene.sys.cameras.main).scrollX,s=i.scrollY,a=t+r*this.scrollFactorX-r,o=e+s*this.scrollFactorY-s;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(a,o,n):h(a,o,this.x,this.y,this.rotation,this.scaleX,this.scaleY,n),this._originComponent&&(n.x+=this._displayOriginX,n.y+=this._displayOriginY),n},getParentRotation:function(){for(var t=0,e=this.parentContainer;e;)t+=e.rotation,e=e.parentContainer;return t}};t.exports=o},function(t,e,n){var i=n(0),s=n(2),c=n(1),r=new i({initialize:function(t,e,n,i,r,s){void 0===t&&(t=1),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=1),void 0===r&&(r=0),void 0===s&&(s=0),this.matrix=new Float32Array([t,e,n,i,r,s,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0}},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],n=t[1],i=t[2],r=t[3];return e||n?0e.length&&(s=e.length),n?(i=e[s-1][n],(r=e[s][n])-t<=t-i?e[s]:e[s-1]):(i=e[s-1],(r=e[s])-t<=t-i?r:i)}},function(t,e){t.exports=function(t){for(var e=t.length-1;0=i.PI2-n?t=e:(Math.abs(e-t)>Math.PI&&(e>>0,n=(e*=n)>>>0,n+=4294967296*(e-=n);return 2.3283064365386963e-10*((this.n=n)>>>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;e= 0.");if(null==e)throw new Error("name cannot be null.");this.index=t,this.name=e,this.parent=n}function Dt(t,e){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.mix=t.mix,this.softness=t.softness,this.bendDirection=t.bendDirection,this.compress=t.compress,this.stretch=t.stretch,this.bones=new Array;for(var n=0;n= 0.");if(null==e)throw new Error("name cannot be null.");if(null==n)throw new Error("boneData cannot be null.");this.index=t,this.name=e,this.boneData=n}function Kt(t,e){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new V.Vector2,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.rotateMix=t.rotateMix,this.translateMix=t.translateMix,this.scaleMix=t.scaleMix,this.shearMix=t.shearMix,this.bones=new Array;for(var n=0;n>>1;;){if(t[(s+1)*n]<=e?i=s+1:r=s,i==r)return(i+1)*n;s=i+r>>>1}},r.linearSearch=function(t,e,n){for(var i=0,r=t.length-n;i<=r;i+=n)if(t[i]>e)return i;return-1},r);function r(t,e,n){if(null==t)throw new Error("name cannot be null.");if(null==e)throw new Error("timelines cannot be null.");this.name=t,this.timelines=e,this.timelineIds=[];for(var i=0;i 0: "+t);this.curves=B.Utils.newFloatArray((t-1)*y.BEZIER_SIZE)}B.CurveTimeline=s;var a,o=(_t(v,a=s),v.prototype.getPropertyId=function(){return(n.rotate<<24)+this.boneIndex},v.prototype.setFrame=function(t,e,n){t<<=1,this.frames[t]=e,this.frames[t+v.ROTATION]=n},v.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=o[o.length-v.ENTRIES]){var u=o[o.length+v.PREV_ROTATION];switch(s){case U.setup:h.rotation=h.data.rotation+u*r;break;case U.first:case U.replace:u+=h.data.rotation-h.rotation,u-=360*(16384-(16384.499999999996-u/360|0));case U.add:h.rotation+=u*r}}else{var c=z.binarySearch(o,n,v.ENTRIES),f=o[c+v.PREV_ROTATION],d=o[c],p=this.getCurvePercent((c>>1)-1,1-(n-d)/(o[c+v.PREV_TIME]-d)),m=f+((m=o[c+v.ROTATION]-f)-360*(16384-(16384.499999999996-m/360|0)))*p;switch(s){case U.setup:h.rotation=h.data.rotation+(m-360*(16384-(16384.499999999996-m/360|0)))*r;break;case U.first:case U.replace:m+=h.data.rotation-h.rotation;case U.add:h.rotation+=(m-360*(16384-(16384.499999999996-m/360|0)))*r}}},v.ENTRIES=2,v.PREV_TIME=-2,v.PREV_ROTATION=-1,v.ROTATION=1,v);function v(t){var e=a.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t<<1),e}B.RotateTimeline=o;var h,l=(_t(p,h=s),p.prototype.getPropertyId=function(){return(n.translate<<24)+this.boneIndex},p.prototype.setFrame=function(t,e,n,i){t*=p.ENTRIES,this.frames[t]=e,this.frames[t+p.X]=n,this.frames[t+p.Y]=i},p.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=o[o.length-p.ENTRIES]?(f=o[o.length+p.PREV_X],d=o[o.length+p.PREV_Y]):(f=o[(l=z.binarySearch(o,n,p.ENTRIES))+p.PREV_X],d=o[l+p.PREV_Y],u=o[l],c=this.getCurvePercent(l/p.ENTRIES-1,1-(n-u)/(o[l+p.PREV_TIME]-u)),f+=(o[l+p.X]-f)*c,d+=(o[l+p.Y]-d)*c),s){case U.setup:h.x=h.data.x+f*r,h.y=h.data.y+d*r;break;case U.first:case U.replace:h.x+=(h.data.x+f-h.x)*r,h.y+=(h.data.y+d-h.y)*r;break;case U.add:h.x+=f*r,h.y+=d*r}}},p.ENTRIES=3,p.PREV_TIME=-3,p.PREV_X=-2,p.PREV_Y=-1,p.X=1,p.Y=2,p);function p(t){var e=h.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*p.ENTRIES),e}B.TranslateTimeline=l;var u,c=(_t(x,u=l),x.prototype.getPropertyId=function(){return(n.scale<<24)+this.boneIndex},x.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=o[o.length-x.ENTRIES]?(f=o[o.length+x.PREV_X]*h.data.scaleX,o[o.length+x.PREV_Y]*h.data.scaleY):(f=o[(l=z.binarySearch(o,n,x.ENTRIES))+x.PREV_X],d=o[l+x.PREV_Y],u=o[l],c=this.getCurvePercent(l/x.ENTRIES-1,1-(n-u)/(o[l+x.PREV_TIME]-u)),f=(f+(o[l+x.X]-f)*c)*h.data.scaleX,(d+(o[l+x.Y]-d)*c)*h.data.scaleY),1==r)s==U.add?(h.scaleX+=f-h.data.scaleX,h.scaleY+=d-h.data.scaleY):(h.scaleX=f,h.scaleY=d);else{var p=0,m=0;if(a==g.mixOut)switch(s){case U.setup:p=h.data.scaleX,m=h.data.scaleY,h.scaleX=p+(Math.abs(f)*B.MathUtils.signum(p)-p)*r,h.scaleY=m+(Math.abs(d)*B.MathUtils.signum(m)-m)*r;break;case U.first:case U.replace:p=h.scaleX,m=h.scaleY,h.scaleX=p+(Math.abs(f)*B.MathUtils.signum(p)-p)*r,h.scaleY=m+(Math.abs(d)*B.MathUtils.signum(m)-m)*r;break;case U.add:p=h.scaleX,m=h.scaleY,h.scaleX=p+(Math.abs(f)*B.MathUtils.signum(p)-h.data.scaleX)*r,h.scaleY=m+(Math.abs(d)*B.MathUtils.signum(m)-h.data.scaleY)*r}else switch(s){case U.setup:p=Math.abs(h.data.scaleX)*B.MathUtils.signum(f),m=Math.abs(h.data.scaleY)*B.MathUtils.signum(d),h.scaleX=p+(f-p)*r,h.scaleY=m+(d-m)*r;break;case U.first:case U.replace:p=Math.abs(h.scaleX)*B.MathUtils.signum(f),m=Math.abs(h.scaleY)*B.MathUtils.signum(d),h.scaleX=p+(f-p)*r,h.scaleY=m+(d-m)*r;break;case U.add:p=B.MathUtils.signum(f),m=B.MathUtils.signum(d),h.scaleX=Math.abs(h.scaleX)*p+(f-Math.abs(h.data.scaleX)*p)*r,h.scaleY=Math.abs(h.scaleY)*m+(d-Math.abs(h.data.scaleY)*m)*r}}}},x);function x(t){return u.call(this,t)||this}B.ScaleTimeline=c;var f,d=(_t(m,f=l),m.prototype.getPropertyId=function(){return(n.shear<<24)+this.boneIndex},m.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=o[o.length-m.ENTRIES]?(f=o[o.length+m.PREV_X],d=o[o.length+m.PREV_Y]):(f=o[(l=z.binarySearch(o,n,m.ENTRIES))+m.PREV_X],d=o[l+m.PREV_Y],u=o[l],c=this.getCurvePercent(l/m.ENTRIES-1,1-(n-u)/(o[l+m.PREV_TIME]-u)),f+=(o[l+m.X]-f)*c,d+=(o[l+m.Y]-d)*c),s){case U.setup:h.shearX=h.data.shearX+f*r,h.shearY=h.data.shearY+d*r;break;case U.first:case U.replace:h.shearX+=(h.data.shearX+f-h.shearX)*r,h.shearY+=(h.data.shearY+d-h.shearY)*r;break;case U.add:h.shearX+=f*r,h.shearY+=d*r}}},m);function m(t){return f.call(this,t)||this}B.ShearTimeline=d;var w,M=(_t(T,w=s),T.prototype.getPropertyId=function(){return(n.color<<24)+this.slotIndex},T.prototype.setFrame=function(t,e,n,i,r,s){t*=T.ENTRIES,this.frames[t]=e,this.frames[t+T.R]=n,this.frames[t+T.G]=i,this.frames[t+T.B]=r,this.frames[t+T.A]=s},T.prototype.apply=function(t,e,n,i,r,s,a){var o=t.slots[this.slotIndex];if(o.bone.active){var h=this.frames;if(n=h[h.length-T.ENTRIES]?(m=h[(c=h.length)+T.PREV_R],g=h[c+T.PREV_G],v=h[c+T.PREV_B],y=h[c+T.PREV_A]):(m=h[(f=z.binarySearch(h,n,T.ENTRIES))+T.PREV_R],g=h[f+T.PREV_G],v=h[f+T.PREV_B],y=h[f+T.PREV_A],d=h[f],p=this.getCurvePercent(f/T.ENTRIES-1,1-(n-d)/(h[f+T.PREV_TIME]-d)),m+=(h[f+T.R]-m)*p,g+=(h[f+T.G]-g)*p,v+=(h[f+T.B]-v)*p,y+=(h[f+T.A]-y)*p),1==r?o.color.set(m,g,v,y):(l=o.color,s==U.setup&&l.setFromColor(o.data.color),l.add((m-l.r)*r,(g-l.g)*r,(v-l.b)*r,(y-l.a)*r))}}},T.ENTRIES=5,T.PREV_TIME=-5,T.PREV_R=-4,T.PREV_G=-3,T.PREV_B=-2,T.PREV_A=-1,T.R=1,T.G=2,T.B=3,T.A=4,T);function T(t){var e=w.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*T.ENTRIES),e}B.ColorTimeline=M;var E,A=(_t(R,E=s),R.prototype.getPropertyId=function(){return(n.twoColor<<24)+this.slotIndex},R.prototype.setFrame=function(t,e,n,i,r,s,a,o,h){t*=R.ENTRIES,this.frames[t]=e,this.frames[t+R.R]=n,this.frames[t+R.G]=i,this.frames[t+R.B]=r,this.frames[t+R.A]=s,this.frames[t+R.R2]=a,this.frames[t+R.G2]=o,this.frames[t+R.B2]=h},R.prototype.apply=function(t,e,n,i,r,s,a){var o=t.slots[this.slotIndex];if(o.bone.active){var h=this.frames;if(n=h[h.length-R.ENTRIES]?(v=h[(d=h.length)+R.PREV_R],y=h[d+R.PREV_G],x=h[d+R.PREV_B],w=h[d+R.PREV_A],M=h[d+R.PREV_R2],T=h[d+R.PREV_G2],E=h[d+R.PREV_B2]):(v=h[(p=z.binarySearch(h,n,R.ENTRIES))+R.PREV_R],y=h[p+R.PREV_G],x=h[p+R.PREV_B],w=h[p+R.PREV_A],M=h[p+R.PREV_R2],T=h[p+R.PREV_G2],E=h[p+R.PREV_B2],m=h[p],g=this.getCurvePercent(p/R.ENTRIES-1,1-(n-m)/(h[p+R.PREV_TIME]-m)),v+=(h[p+R.R]-v)*g,y+=(h[p+R.G]-y)*g,x+=(h[p+R.B]-x)*g,w+=(h[p+R.A]-w)*g,M+=(h[p+R.R2]-M)*g,T+=(h[p+R.G2]-T)*g,E+=(h[p+R.B2]-E)*g),1==r?(o.color.set(v,y,x,w),o.darkColor.set(M,T,E,1)):(l=o.color,u=o.darkColor,s==U.setup&&(l.setFromColor(o.data.color),u.setFromColor(o.data.darkColor)),l.add((v-l.r)*r,(y-l.g)*r,(x-l.b)*r,(w-l.a)*r),u.add((M-u.r)*r,(T-u.g)*r,(E-u.b)*r,0))}}},R.ENTRIES=8,R.PREV_TIME=-8,R.PREV_R=-7,R.PREV_G=-6,R.PREV_B=-5,R.PREV_A=-4,R.PREV_R2=-3,R.PREV_G2=-2,R.PREV_B2=-1,R.R=1,R.G=2,R.B=3,R.A=4,R.R2=5,R.G2=6,R.B2=7,R);function R(t){var e=E.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*R.ENTRIES),e}B.TwoColorTimeline=A;var S=(b.prototype.getPropertyId=function(){return(n.attachment<<24)+this.slotIndex},b.prototype.getFrameCount=function(){return this.frames.length},b.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.attachmentNames[t]=n},b.prototype.apply=function(t,e,n,i,r,s,a){var o,h,l,u=t.slots[this.slotIndex];u.bone.active&&(a!=g.mixOut?n<(o=this.frames)[0]?s!=U.setup&&s!=U.first||this.setAttachment(t,u,u.data.attachmentName):(h=0,h=n>=o[o.length-1]?o.length-1:z.binarySearch(o,n,1)-1,l=this.attachmentNames[h],t.slots[this.slotIndex].setAttachment(null==l?null:t.getAttachment(this.slotIndex,l))):s==U.setup&&this.setAttachment(t,u,u.data.attachmentName))},b.prototype.setAttachment=function(t,e,n){e.attachment=null==n?null:t.getAttachment(this.slotIndex,n)},b);function b(t){this.frames=B.Utils.newFloatArray(t),this.attachmentNames=new Array(t)}B.AttachmentTimeline=S;var I,C=null,P=(_t(_,I=s),_.prototype.getPropertyId=function(){return(n.deform<<27)+ +this.attachment.id+this.slotIndex},_.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.frameVertices[t]=n},_.prototype.apply=function(t,e,n,i,r,s,a){var o=t.slots[this.slotIndex];if(o.bone.active){var h=o.getAttachment();if(h instanceof B.VertexAttachment&&h.deformAttachment==this.attachment){var l=o.deform;0==l.length&&(s=U.setup);var u=this.frameVertices,c=u[0].length,f=this.frames;if(n=f[f.length-1]){var y=u[f.length-1];if(1==r)if(s==U.add)if(null==(d=h).bones)for(var m=d.vertices,x=0;x=o[h-1])return;if(!(n=o[l];l++)i.push(this.events[l])}}},F);function F(t){this.frames=B.Utils.newFloatArray(t),this.events=new Array(t)}B.EventTimeline=k;var O=(L.prototype.getPropertyId=function(){return n.drawOrder<<24},L.prototype.getFrameCount=function(){return this.frames.length},L.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.drawOrders[t]=n},L.prototype.apply=function(t,e,n,i,r,s,a){var o=t.drawOrder,h=t.slots;if(a!=g.mixOut){var l=this.frames;if(n=l[l.length-1]?l.length-1:z.binarySearch(l,n)-1,c=this.drawOrders[u];if(null==c)B.Utils.arrayCopy(h,0,o,0,h.length);else for(var f=0,d=c.length;f=f[f.length-V.ENTRIES]?s==U.setup?(d.mix=d.data.mix+(f[f.length+V.PREV_MIX]-d.data.mix)*r,d.softness=d.data.softness+(f[f.length+V.PREV_SOFTNESS]-d.data.softness)*r,a==g.mixOut?(d.bendDirection=d.data.bendDirection,d.compress=d.data.compress,d.stretch=d.data.stretch):(d.bendDirection=f[f.length+V.PREV_BEND_DIRECTION],d.compress=0!=f[f.length+V.PREV_COMPRESS],d.stretch=0!=f[f.length+V.PREV_STRETCH])):(d.mix+=(f[f.length+V.PREV_MIX]-d.mix)*r,d.softness+=(f[f.length+V.PREV_SOFTNESS]-d.softness)*r,a==g.mixIn&&(d.bendDirection=f[f.length+V.PREV_BEND_DIRECTION],d.compress=0!=f[f.length+V.PREV_COMPRESS],d.stretch=0!=f[f.length+V.PREV_STRETCH])):(h=f[(o=z.binarySearch(f,n,V.ENTRIES))+V.PREV_MIX],l=f[o+V.PREV_SOFTNESS],u=f[o],c=this.getCurvePercent(o/V.ENTRIES-1,1-(n-u)/(f[o+V.PREV_TIME]-u)),s==U.setup?(d.mix=d.data.mix+(h+(f[o+V.MIX]-h)*c-d.data.mix)*r,d.softness=d.data.softness+(l+(f[o+V.SOFTNESS]-l)*c-d.data.softness)*r,a==g.mixOut?(d.bendDirection=d.data.bendDirection,d.compress=d.data.compress,d.stretch=d.data.stretch):(d.bendDirection=f[o+V.PREV_BEND_DIRECTION],d.compress=0!=f[o+V.PREV_COMPRESS],d.stretch=0!=f[o+V.PREV_STRETCH])):(d.mix+=(h+(f[o+V.MIX]-h)*c-d.mix)*r,d.softness+=(l+(f[o+V.SOFTNESS]-l)*c-d.softness)*r,a==g.mixIn&&(d.bendDirection=f[o+V.PREV_BEND_DIRECTION],d.compress=0!=f[o+V.PREV_COMPRESS],d.stretch=0!=f[o+V.PREV_STRETCH])))},V.ENTRIES=6,V.PREV_TIME=-6,V.PREV_MIX=-5,V.PREV_SOFTNESS=-4,V.PREV_BEND_DIRECTION=-3,V.PREV_COMPRESS=-2,V.PREV_STRETCH=-1,V.MIX=1,V.SOFTNESS=2,V.BEND_DIRECTION=3,V.COMPRESS=4,V.STRETCH=5,V);function V(t){var e=N.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*V.ENTRIES),e}B.IkConstraintTimeline=D;var Y,X=(_t(W,Y=s),W.prototype.getPropertyId=function(){return(n.transformConstraint<<24)+this.transformConstraintIndex},W.prototype.setFrame=function(t,e,n,i,r,s){t*=W.ENTRIES,this.frames[t]=e,this.frames[t+W.ROTATE]=n,this.frames[t+W.TRANSLATE]=i,this.frames[t+W.SCALE]=r,this.frames[t+W.SHEAR]=s},W.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.transformConstraints[this.transformConstraintIndex];if(h.active)if(n=o[o.length-W.ENTRIES]?(p=o[(u=o.length)+W.PREV_ROTATE],m=o[u+W.PREV_TRANSLATE],g=o[u+W.PREV_SCALE],v=o[u+W.PREV_SHEAR]):(p=o[(c=z.binarySearch(o,n,W.ENTRIES))+W.PREV_ROTATE],m=o[c+W.PREV_TRANSLATE],g=o[c+W.PREV_SCALE],v=o[c+W.PREV_SHEAR],f=o[c],d=this.getCurvePercent(c/W.ENTRIES-1,1-(n-f)/(o[c+W.PREV_TIME]-f)),p+=(o[c+W.ROTATE]-p)*d,m+=(o[c+W.TRANSLATE]-m)*d,g+=(o[c+W.SCALE]-g)*d,v+=(o[c+W.SHEAR]-v)*d),s==U.setup?(l=h.data,h.rotateMix=l.rotateMix+(p-l.rotateMix)*r,h.translateMix=l.translateMix+(m-l.translateMix)*r,h.scaleMix=l.scaleMix+(g-l.scaleMix)*r,h.shearMix=l.shearMix+(v-l.shearMix)*r):(h.rotateMix+=(p-h.rotateMix)*r,h.translateMix+=(m-h.translateMix)*r,h.scaleMix+=(g-h.scaleMix)*r,h.shearMix+=(v-h.shearMix)*r)}},W.ENTRIES=5,W.PREV_TIME=-5,W.PREV_ROTATE=-4,W.PREV_TRANSLATE=-3,W.PREV_SCALE=-2,W.PREV_SHEAR=-1,W.ROTATE=1,W.TRANSLATE=2,W.SCALE=3,W.SHEAR=4,W);function W(t){var e=Y.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*W.ENTRIES),e}B.TransformConstraintTimeline=X;var q,G=(_t(H,q=s),H.prototype.getPropertyId=function(){return(n.pathConstraintPosition<<24)+this.pathConstraintIndex},H.prototype.setFrame=function(t,e,n){t*=H.ENTRIES,this.frames[t]=e,this.frames[t+H.VALUE]=n},H.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n=o[o.length-H.ENTRIES]?f=o[o.length+H.PREV_VALUE]:(f=o[(l=z.binarySearch(o,n,H.ENTRIES))+H.PREV_VALUE],u=o[l],c=this.getCurvePercent(l/H.ENTRIES-1,1-(n-u)/(o[l+H.PREV_TIME]-u)),f+=(o[l+H.VALUE]-f)*c),s==U.setup?h.position=h.data.position+(f-h.data.position)*r:h.position+=(f-h.position)*r}},H.ENTRIES=2,H.PREV_TIME=-2,H.PREV_VALUE=-1,H.VALUE=1,H);function H(t){var e=q.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*H.ENTRIES),e}B.PathConstraintPositionTimeline=G;var j,K=(_t(Z,j=G),Z.prototype.getPropertyId=function(){return(n.pathConstraintSpacing<<24)+this.pathConstraintIndex},Z.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n=o[o.length-Z.ENTRIES]?f=o[o.length+Z.PREV_VALUE]:(f=o[(l=z.binarySearch(o,n,Z.ENTRIES))+Z.PREV_VALUE],u=o[l],c=this.getCurvePercent(l/Z.ENTRIES-1,1-(n-u)/(o[l+Z.PREV_TIME]-u)),f+=(o[l+Z.VALUE]-f)*c),s==U.setup?h.spacing=h.data.spacing+(f-h.data.spacing)*r:h.spacing+=(f-h.spacing)*r}},Z);function Z(t){return j.call(this,t)||this}B.PathConstraintSpacingTimeline=K;var Q,J=(_t($,Q=s),$.prototype.getPropertyId=function(){return(n.pathConstraintMix<<24)+this.pathConstraintIndex},$.prototype.setFrame=function(t,e,n,i){t*=$.ENTRIES,this.frames[t]=e,this.frames[t+$.ROTATE]=n,this.frames[t+$.TRANSLATE]=i},$.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n=o[o.length-$.ENTRIES]?(f=o[o.length+$.PREV_ROTATE],d=o[o.length+$.PREV_TRANSLATE]):(f=o[(l=z.binarySearch(o,n,$.ENTRIES))+$.PREV_ROTATE],d=o[l+$.PREV_TRANSLATE],u=o[l],c=this.getCurvePercent(l/$.ENTRIES-1,1-(n-u)/(o[l+$.PREV_TIME]-u)),f+=(o[l+$.ROTATE]-f)*c,d+=(o[l+$.TRANSLATE]-d)*c),s==U.setup?(h.rotateMix=h.data.rotateMix+(f-h.data.rotateMix)*r,h.translateMix=h.data.translateMix+(d-h.data.translateMix)*r):(h.rotateMix+=(f-h.rotateMix)*r,h.translateMix+=(d-h.translateMix)*r)}},$.ENTRIES=3,$.PREV_TIME=-3,$.PREV_ROTATE=-2,$.PREV_TRANSLATE=-1,$.ROTATE=1,$.TRANSLATE=2,$);function $(t){var e=Q.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*$.ENTRIES),e}B.PathConstraintMixTimeline=J}(bt=bt||{}),function(S){var t=(b.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,n=0,i=e.length;n=r.trackEnd&&null==r.mixingFrom){e[n]=null,this.queue.end(r),this.disposeNext(r);continue}if(null!=r.mixingFrom&&this.updateMixingFrom(r,t)){var h=r.mixingFrom;for((r.mixingFrom=null)!=h&&(h.mixingTo=null);null!=h;)this.queue.end(h),h=h.mixingFrom}r.trackTime+=s}}this.queue.drain()},b.prototype.updateMixingFrom=function(t,e){var n=t.mixingFrom;if(null==n)return!0;var i=this.updateMixingFrom(n,e);return n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,0=t.mixDuration?(0!=n.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=n.mixingFrom,null!=n.mixingFrom&&(n.mixingFrom.mixingTo=t),t.interruptAlpha=n.interruptAlpha,this.queue.end(n)),i):(n.trackTime+=e*n.timeScale,t.mixTime+=e,!1)},b.prototype.apply=function(t){if(null==t)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var e=this.events,n=this.tracks,i=!1,r=0,s=n.length;r=a.trackEnd&&null==a.next&&(h=0);var l=a.animationLast,u=a.getAnimationTime(),c=a.animation.timelines.length,f=a.animation.timelines;if(0==r&&1==h||o==S.MixBlend.add)for(var d=0;d=s[s.length-1]?s.length-1:S.Animation.binarySearch(s,n)-1,this.setAttachment(e,o,t.attachmentNames[a],r)),o.attachmentState<=this.unkeyedState&&(o.attachmentState=this.unkeyedState+b.SETUP))},b.prototype.setAttachment=function(t,e,n,i){e.attachment=null==n?null:t.getAttachment(e.data.index,n),i&&(e.attachmentState=this.unkeyedState+b.CURRENT)},b.prototype.applyRotateTimeline=function(t,e,n,i,r,s,a,o){if(o&&(s[a]=0),1!=i){var h=t,l=h.frames,u=e.bones[h.boneIndex];if(u.active){var c=0,f=0;if(n=l[l.length-S.RotateTimeline.ENTRIES]?f=u.data.rotation+l[l.length+S.RotateTimeline.PREV_ROTATION]:(p=l[(d=S.Animation.binarySearch(l,n,S.RotateTimeline.ENTRIES))+S.RotateTimeline.PREV_ROTATION],m=l[d],g=h.getCurvePercent((d>>1)-1,1-(n-m)/(l[d+S.RotateTimeline.PREV_TIME]-m)),f=l[d+S.RotateTimeline.ROTATION]-p,f=p+(f-=360*(16384-(16384.499999999996-f/360|0)))*g+u.data.rotation,f-=360*(16384-(16384.499999999996-f/360|0)))}var v,y,x,w,M=0,T=f-c;0==(T-=360*(16384-(16384.499999999996-T/360|0)))?M=s[a]:(y=v=0,y=o?(v=0,T):(v=s[a],s[a+1]),x=0i||this.queue.event(t,l)}for((t.loop?0==r||s>t.trackTime%r:i<=e&&t.animationLast=this.tracks.length)){var e=this.tracks[t];if(null!=e){this.queue.end(e),this.disposeNext(e);for(var n=e;;){var i=n.mixingFrom;if(null==i)break;this.queue.end(i),n.mixingFrom=null,n.mixingTo=null,n=i}this.tracks[e.trackIndex]=null,this.queue.drain()}}},b.prototype.setCurrent=function(t,e,n){var i=this.expandToIndex(t);this.tracks[t]=e,null!=i&&(n&&this.queue.interrupt(i),((e.mixingFrom=i).mixingTo=e).mixTime=0,null!=i.mixingFrom&&0=this.tracks.length?null:this.tracks[t]},b.prototype.addListener=function(t){if(null==t)throw new Error("listener cannot be null.");this.listeners.push(t)},b.prototype.removeListener=function(t){var e=this.listeners.indexOf(t);0<=e&&this.listeners.splice(e,1)},b.prototype.clearListeners=function(){this.listeners.length=0},b.prototype.clearListenerNotifications=function(){this.queue.clear()},b.emptyAnimation=new S.Animation("",[],0),b.SUBSEQUENT=0,b.FIRST=1,b.HOLD_SUBSEQUENT=2,b.HOLD_FIRST=3,b.HOLD_MIX=4,b.SETUP=1,b.CURRENT=2,b);function b(t){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new r(this),this.propertyIDs=new S.IntSet,this.animationsChanged=!1,this.trackEntryPool=new S.Pool(function(){return new e}),this.data=t}S.AnimationState=t;var e=(n.prototype.reset=function(){this.next=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0},n.prototype.getAnimationTime=function(){if(this.loop){var t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)},n.prototype.setAnimationLast=function(t){this.animationLast=t,this.nextAnimationLast=t},n.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},n.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},n);function n(){this.mixBlend=S.MixBlend.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}S.TrackEntry=e;var o,i,r=(s.prototype.start=function(t){this.objects.push(o.start),this.objects.push(t),this.animState.animationsChanged=!0},s.prototype.interrupt=function(t){this.objects.push(o.interrupt),this.objects.push(t)},s.prototype.end=function(t){this.objects.push(o.end),this.objects.push(t),this.animState.animationsChanged=!0},s.prototype.dispose=function(t){this.objects.push(o.dispose),this.objects.push(t)},s.prototype.complete=function(t){this.objects.push(o.complete),this.objects.push(t)},s.prototype.event=function(t,e){this.objects.push(o.event),this.objects.push(t),this.objects.push(e)},s.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var t=this.objects,e=this.animState.listeners,n=0;nj.MathUtils.PI?Y-=j.MathUtils.PI2:Y<-j.MathUtils.PI&&(Y+=j.MathUtils.PI2),Y*=e,N=Math.cos(Y),D=Math.sin(Y),S.a=N*k-D*O,S.b=N*F-D*L,S.c=D*k+N*O,S.d=D*F+N*L),S.appliedValid=!1}}}},Yt.prototype.computeWorldPositions=function(t,e,n,i,r){var s=this.target,a=this.position,o=this.spaces,h=j.Utils.setArraySize(this.positions,3*e+2),l=null,u=t.closed,c=t.worldVerticesLength,f=c/6,d=Yt.NONE;if(!t.constantSpeed){var p=t.lengths,m=p[f-=u?1:2];if(i&&(a*=m),r)for(var g=1;g>>1^-(1&n)},e.prototype.readStringRef=function(){var t=this.readInt(!0);return 0==t?null:this.strings[t-1]},e.prototype.readString=function(){var t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;for(var e="",n=0;n>4){case 12:case 13:e+=String.fromCharCode((31&i)<<6|63&this.readByte()),n+=2;break;case 14:e+=String.fromCharCode((15&i)<<12|(63&this.readByte())<<6|63&this.readByte()),n+=3;break;default:e+=String.fromCharCode(i),n++}}return e},e.prototype.readFloat=function(){var t=this.buffer.getFloat32(this.index);return this.index+=4,t},e.prototype.readBoolean=function(){return 0!=this.readByte()},e);function e(t,e,n,i){void 0===e&&(e=new Array),void 0===n&&(n=0),void 0===i&&(i=new DataView(t.buffer)),this.strings=e,this.index=n,this.buffer=i}var V=function(t,e,n,i,r){this.mesh=t,this.skin=e,this.slotIndex=n,this.parent=i,this.inheritDeform=r},u=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),this.bones=t,this.vertices=e}}(bt=bt||{}),C=bt=bt||{},Wt.prototype.update=function(t,e){if(null==t)throw new Error("skeleton cannot be null.");var n=this.boundingBoxes,i=this.polygons,r=this.polygonPool,s=t.slots,a=s.length;n.length=0,r.freeAll(i);for(var o=i.length=0;o=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},Wt.prototype.aabbIntersectsSegment=function(t,e,n,i){var r=this.minX,s=this.minY,a=this.maxX,o=this.maxY;if(t<=r&&n<=r||e<=s&&i<=s||a<=t&&a<=n||o<=e&&o<=i)return!1;var h=(i-e)/(n-t),l=h*(r-t)+e;if(st.minX&&this.minYt.minY},Wt.prototype.containsPoint=function(t,e){for(var n=this.polygons,i=0,r=n.length;i>1,V=this.clipOutput,Y=K.Utils.setArraySize(l,P+D*d),X=0;X<_;X+=2){var B=V[X],U=V[X+1];Y[P]=B,Y[P+1]=U,Y[P+2]=s.r,Y[P+3]=s.g,Y[P+4]=s.b,Y[P+5]=s.a;var z=B-R,W=U-S,q=(k*z+F*W)*N,G=(L*z+O*W)*N,H=1-q-G;Y[P+6]=x*q+E*G+b*H,Y[P+7]=w*q+A*G+I*H,o&&(Y[P+8]=a.r,Y[P+9]=a.g,Y[P+10]=a.b,Y[P+11]=a.a),P+=d}P=u.length;var j=K.Utils.setArraySize(u,P+3*(D-2));for(D--,X=1;X>1;o=i.length&&(i.length=t+1),i[t]||(i[t]={}),i[t][e]=n},e.prototype.addSkin=function(t){for(var e=0;e=this.lines.length?null:this.lines[this.index++]},n.prototype.readValue=function(){var t=this.readLine(),e=t.indexOf(":");if(-1==e)throw new Error("Invalid line: "+t);return t.substring(e+1).trim()},n.prototype.readTuple=function(t){var e=this.readLine(),n=e.indexOf(":");if(-1==n)throw new Error("Invalid line: "+e);for(var i=0,r=n+1;i<3;i++){var s=e.indexOf(",",r);if(-1==s)break;t[i]=e.substr(r,s-r).trim(),r=s+1}return t[i]=e.substring(r).trim(),i+1},n);function n(t){this.index=0,this.lines=t.split(/\r\n|\r|\n/)}var m=function(){};d.TextureAtlasPage=m;var i,g=(i=d.TextureRegion,_t(r,i),r);function r(){return null!==i&&i.apply(this,arguments)||this}d.TextureAtlasRegion=g}(bt=bt||{}),V=bt=bt||{},Kt.prototype.isActive=function(){return this.active},Kt.prototype.apply=function(){this.update()},Kt.prototype.update=function(){this.data.local?this.data.relative?this.applyRelativeLocal():this.applyAbsoluteLocal():this.data.relative?this.applyRelativeWorld():this.applyAbsoluteWorld()},Kt.prototype.applyAbsoluteWorld=function(){for(var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target,s=r.a,a=r.b,o=r.c,h=r.d,l=0V.MathUtils.PI?A-=V.MathUtils.PI2:A<-V.MathUtils.PI&&(A+=V.MathUtils.PI2),A*=t,v=Math.cos(A),y=Math.sin(A),S.a=v*m-y*g,S.b=v*M-y*T,S.c=y*m+v*g,S.d=y*M+v*T,b=!0),0!=e&&(x=this.temp,r.localToWorld(x.set(this.data.offsetX,this.data.offsetY)),S.worldX+=(x.x-S.worldX)*e,S.worldY+=(x.y-S.worldY)*e,b=!0),0V.MathUtils.PI?A-=V.MathUtils.PI2:A<-V.MathUtils.PI&&(A+=V.MathUtils.PI2),A=E+(A+c)*i,R=Math.sqrt(M*M+T*T),S.b=Math.cos(A)*R,S.d=Math.sin(A)*R,b=!0),b&&(S.appliedValid=!1)}},Kt.prototype.applyRelativeWorld=function(){for(var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target,s=r.a,a=r.b,o=r.c,h=r.d,l=0V.MathUtils.PI?w-=V.MathUtils.PI2:w<-V.MathUtils.PI&&(w+=V.MathUtils.PI2),w*=t,v=Math.cos(w),y=Math.sin(w),A.a=v*m-y*g,A.b=v*M-y*T,A.c=y*m+v*g,A.d=y*M+v*T,R=!0),0!=e&&(x=this.temp,r.localToWorld(x.set(this.data.offsetX,this.data.offsetY)),A.worldX+=x.x*e,A.worldY+=x.y*e,R=!0),0V.MathUtils.PI?w-=V.MathUtils.PI2:w<-V.MathUtils.PI&&(w+=V.MathUtils.PI2),M=A.b,T=A.d,w=Math.atan2(T,M)+(w-V.MathUtils.PI/2+c)*i,E=Math.sqrt(M*M+T*T),A.b=Math.cos(w)*E,A.d=Math.sin(w)*E,R=!0),R&&(A.appliedValid=!1)}},Kt.prototype.applyAbsoluteLocal=function(){var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target;r.appliedValid||r.updateAppliedTransform();for(var s=this.bones,a=0,o=s.length;a>1,i=this.indicesArray,r=i.length=0;r>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255},r.rgb888ToColor=function(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255},r.WHITE=new r(1,1,1,1),r.RED=new r(1,0,0,1),r.GREEN=new r(0,1,0,1),r.BLUE=new r(0,0,1,1),r.MAGENTA=new r(1,0,1,1),r);function r(t,e,n,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),this.r=t,this.g=e,this.b=n,this.a=i}t.Color=i;var s=(a.clamp=function(t,e,n){return t=e?t:g.setArraySize(t,e,n)},g.newArray=function(t,e){for(var n=new Array(t),i=0;ithis.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,1=this.values.length},S.prototype.addValue=function(t){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0},S.prototype.getMean=function(){if(this.hasEnoughData()){if(this.dirty){for(var t=0,e=0;e>1)*s;var a=t.bone.skeleton,o=t.deform,h=this.vertices,l=this.bones;if(null!=l){for(var u=0,c=0,f=0;f>16&255)/255,r=(t>>8&255)/255,s=(255&t)/255,a=16777215>>24)/255:null,o=this.skeleton;return!e||(n=this.findSlot(e))&&(o=n),o.color.r=i,o.color.g=r,o.color.b=s,null!==a&&(o.color.a=a),this},setSkeletonFromJSON:function(t,e,n,i){return this.setSkeleton(t,e,n,i)},setSkeleton:function(t,e,n,i){this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications());var r=this.plugin.createSkeleton(t,i);this.skeletonData=r.skeletonData,this.preMultipliedAlpha=r.preMultipliedAlpha;var s=r.skeleton;return s.setSkin(),s.setToSetupPose(),this.skeleton=s,r=this.plugin.createAnimationState(s),this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications()),this.state=r.state,this.stateData=r.stateData,this.state.addListener({event:this.onEvent.bind(this),complete:this.onComplete.bind(this),start:this.onStart.bind(this),end:this.onEnd.bind(this),dispose:this.onDispose.bind(this),interrupted:this.onInterrupted.bind(this)}),e&&this.setAnimation(0,e,n),this.root=this.getRootBone(),this.root&&(this.root.rotation=m(f(this.rotation))+90),this.state.apply(s),s.updateCache(),this.updateSize()},onComplete:function(t){this.emit(g.COMPLETE,t)},onDispose:function(t){this.emit(g.DISPOSE,t)},onEnd:function(t){this.emit(g.END,t)},onEvent:function(t,e){this.emit(g.EVENT,t,e)},onInterrupted:function(t){this.emit(g.INTERRUPTED,t)},onStart:function(t){this.emit(g.START,t)},refresh:function(){return this.root&&(this.root.rotation=m(f(this.rotation))+90),this.updateSize(),this.skeleton.updateCache(),this},setSize:function(t,e,n,i){var r=this.skeleton;return void 0===t&&(t=r.data.width),void 0===e&&(e=r.data.height),void 0===n&&(n=0),void 0===i&&(i=0),this.width=t,this.height=e,this.displayOriginX=r.x-n,this.displayOriginY=r.y-i,this},setOffset:function(t,e){var n=this.skeleton;return void 0===t&&(t=0),void 0===e&&(e=0),this.displayOriginX=n.x-t,this.displayOriginY=n.y-e,this},updateSize:function(){var t=this.skeleton,e=this.plugin.renderer.height,n=this.scaleX,i=this.scaleY;t.x=this.x,t.y=e-this.y,t.scaleX=1,t.scaleY=1,t.updateWorldTransform();var r=this.getBounds();return this.width=r.size.x,this.height=r.size.y,this.displayOriginX=this.x-r.offset.x,this.displayOriginY=this.y-(e-(this.height+r.offset.y)),t.scaleX=n,t.scaleY=i,t.updateWorldTransform(),this},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,this.refresh()}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,this.refresh()}},getBoneList:function(){var t=[],e=this.skeletonData;if(e)for(var n=0;n=(t=t.toString()).length)switch(i){case 1:t=new Array(e+1-t.length).join(n)+t;break;case 3:var s=Math.ceil((r=e-t.length)/2);t=new Array(1+(r-s)).join(n)+t+new Array(s+1).join(n);break;default:t+=new Array(e+1-t.length).join(n)}return t}},function(t,e){t.exports=function(t){return t.reverse()}},function(t,e){t.exports=function(t){for(var e=0;e=t.length)throw new Error("Supplied index out of bounds");return i!==n&&(t.splice(i,1),t.splice(n,0,e)),e}},function(t,e){t.exports=function(t,e){var n,i,r=t.indexOf(e);return-1!==r&&rt.length-1)throw new Error("Index out of bounds");var r=s(t,e);return n&&n.call(i,r),r}},function(t,e,n){var l=n(4);t.exports=function(t,e,n,i,r){if(void 0===e&&(e=0),void 0===n&&(n=t.length),void 0===r&&(r=t),l(t,e,n)){var s=n-e,a=t.splice(e,s);if(i)for(var o=0;o=this.nextTick&&this.currentAnim.setFrame(this)}},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),e.setSizeToFrame(),e._originComponent&&(t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin()),e},updateFrame:function(t){var e,n=this.setCurrentFrame(t);this.isPlaying&&(t.setAlpha&&(n.alpha=t.alpha),e=this.currentAnim,n.emit(s.SPRITE_ANIMATION_KEY_UPDATE+e.key,e,t,n),n.emit(s.SPRITE_ANIMATION_UPDATE,e,t,n),3===this._pendingStop&&this._pendingStopValue===t&&this.currentAnim.completeAnimation(this))},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},setYoyo:function(t){return void 0===t&&(t=!1),this._yoyo=t,this.parent},getYoyo:function(){return this._yoyo},destroy:function(){this.animationManager.off(s.REMOVE_ANIMATION,this.remove,this),this.animationManager=null,this.parent=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null}});t.exports=a},function(t,e,n){var i=n(5),r=n(0),s=n(55),a=n(59),o=n(57),m=n(308),g=n(6),h=new r({Extends:s,initialize:function(t,e,n){s.call(this),this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,g(n,"frames",[]),g(n,"defaultTextureKey",null)),this.frameRate=g(n,"frameRate",null),this.duration=g(n,"duration",null),null===this.duration&&null===this.frameRate?(this.frameRate=24,this.duration=this.frameRate/this.frames.length*1e3):this.duration&&null===this.frameRate?this.frameRate=this.frames.length/(this.duration/1e3):this.duration=this.frames.length/this.frameRate*1e3,this.msPerFrame=1e3/this.frameRate,this.skipMissedFrames=g(n,"skipMissedFrames",!0),this.delay=g(n,"delay",0),this.repeat=g(n,"repeat",0),this.repeatDelay=g(n,"repeatDelay",0),this.yoyo=g(n,"yoyo",!1),this.showOnStart=g(n,"showOnStart",!1),this.hideOnComplete=g(n,"hideOnComplete",!1),this.paused=!1,this.manager.on(a.PAUSE_ALL,this.pause,this),this.manager.on(a.RESUME_ALL,this.resume,this)},addFrame:function(t){return this.addFrameAt(this.frames.length,t)},addFrameAt:function(t,e){var n,i,r=this.getFrames(this.manager.textureManager,e);return 0=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo);var n=this.frames[e];0!==e||t.forward||(n=this.getLastFrame()),t.updateFrame(n)},getFrameByProgress:function(t){return t=i(t,0,1),o(t,this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t._yoyo?this.handleYoyoFrame(t,!1):0=e&&t.y<=n&&t.y+t.height>=n)}},function(t,e,n){var a=n(60),o=n(61);t.exports=function(t,e,n,i){void 0===i&&(i=[]),!e&&0this.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},function(t,e,n){var i=n(9);t.exports=function(t,e,n){return void 0===n&&(n=new i),n.x=t.x1+(t.x2-t.x1)*e,n.y=t.y1+(t.y2-t.y1)*e,n}},function(t,e,n){var f=n(317),d=n(9);t.exports=function(t,e,n,i){void 0===i&&(i=[]),!e&&0>16)+(65280&t)+((255&t)<<16)}},function(t,e,n){var i=n(3),r=n(3);r=n(351),t.exports={renderWebGL:i,renderCanvas:r}},function(t,e){t.exports=function(t,e,n,i,r){var s=e.list;if(0!==s.length){var a=e.localTransform;r?(a.loadIdentity(),a.multiply(r),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);var o=-1!==e.blendMode;o||t.setBlendMode(0);var h=e._alpha,l=e.scrollFactorX,u=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var c=0;c - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var MATH_CONST = { - - /** - * The value of PI * 2. - * - * @name Phaser.Math.PI2 - * @type {number} - * @since 3.0.0 - */ - PI2: Math.PI * 2, - - /** - * The value of PI * 0.5. - * - * @name Phaser.Math.TAU - * @type {number} - * @since 3.0.0 - */ - TAU: Math.PI * 0.5, - - /** - * An epsilon value (1.0e-6) - * - * @name Phaser.Math.EPSILON - * @type {number} - * @since 3.0.0 - */ - EPSILON: 1.0e-6, - - /** - * For converting degrees to radians (PI / 180) - * - * @name Phaser.Math.DEG_TO_RAD - * @type {number} - * @since 3.0.0 - */ - DEG_TO_RAD: Math.PI / 180, - - /** - * For converting radians to degrees (180 / PI) - * - * @name Phaser.Math.RAD_TO_DEG - * @type {number} - * @since 3.0.0 - */ - RAD_TO_DEG: 180 / Math.PI, - - /** - * An instance of the Random Number Generator. - * This is not set until the Game boots. - * - * @name Phaser.Math.RND - * @type {Phaser.Math.RandomDataGenerator} - * @since 3.0.0 - */ - RND: null, - - /** - * The minimum safe integer this browser supports. - * We use a const for backward compatibility with Internet Explorer. - * - * @name Phaser.Math.MIN_SAFE_INTEGER - * @type {number} - * @since 3.21.0 - */ - MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991, - - /** - * The maximum safe integer this browser supports. - * We use a const for backward compatibility with Internet Explorer. - * - * @name Phaser.Math.MAX_SAFE_INTEGER - * @type {number} - * @since 3.21.0 - */ - MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991 - -}; - -module.exports = MATH_CONST; - - -/***/ }), -/* 2 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * This is a slightly modified version of jQuery.isPlainObject. - * A plain object is an object whose internal class property is [object Object]. - * - * @function Phaser.Utils.Objects.IsPlainObject - * @since 3.0.0 - * - * @param {object} obj - The object to inspect. - * - * @return {boolean} `true` if the object is plain, otherwise `false`. - */ -var IsPlainObject = function (obj) -{ - // Not plain objects: - // - Any object or value whose internal [[Class]] property is not "[object Object]" - // - DOM nodes - // - window - if (typeof(obj) !== 'object' || obj.nodeType || obj === obj.window) - { - return false; - } - - // Support: Firefox <20 - // The try/catch suppresses exceptions thrown when attempting to access - // the "constructor" property of certain host objects, ie. |window.location| - // https://bugzilla.mozilla.org/show_bug.cgi?id=814622 - try - { - if (obj.constructor && !({}).hasOwnProperty.call(obj.constructor.prototype, 'isPrototypeOf')) - { - return false; - } - } - catch (e) - { - return false; - } - - // If the function hasn't returned already, we're confident that - // |obj| is a plain object, created by {} or constructed with new Object - return true; -}; - -module.exports = IsPlainObject; - - -/***/ }), -/* 3 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Wrap the given `value` between `min` and `max. - * - * @function Phaser.Math.Wrap - * @since 3.0.0 - * - * @param {number} value - The value to wrap. - * @param {number} min - The minimum value. - * @param {number} max - The maximum value. - * - * @return {number} The wrapped value. - */ -var Wrap = function (value, min, max) -{ - var range = max - min; - - return (min + ((((value - min) % range) + range) % range)); -}; - -module.exports = Wrap; - - -/***/ }), -/* 4 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -533,7 +353,7 @@ module.exports = Wrap; // and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl var Class = __webpack_require__(0); -var FuzzyEqual = __webpack_require__(20); +var FuzzyEqual = __webpack_require__(31); /** * @classdesc @@ -1295,10 +1115,442 @@ Vector2.ONE = new Vector2(1, 1); module.exports = Vector2; +/***/ }), +/* 2 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var MATH_CONST = { + + /** + * The value of PI * 2. + * + * @name Phaser.Math.PI2 + * @type {number} + * @since 3.0.0 + */ + PI2: Math.PI * 2, + + /** + * The value of PI * 0.5. + * + * @name Phaser.Math.TAU + * @type {number} + * @since 3.0.0 + */ + TAU: Math.PI * 0.5, + + /** + * An epsilon value (1.0e-6) + * + * @name Phaser.Math.EPSILON + * @type {number} + * @since 3.0.0 + */ + EPSILON: 1.0e-6, + + /** + * For converting degrees to radians (PI / 180) + * + * @name Phaser.Math.DEG_TO_RAD + * @type {number} + * @since 3.0.0 + */ + DEG_TO_RAD: Math.PI / 180, + + /** + * For converting radians to degrees (180 / PI) + * + * @name Phaser.Math.RAD_TO_DEG + * @type {number} + * @since 3.0.0 + */ + RAD_TO_DEG: 180 / Math.PI, + + /** + * An instance of the Random Number Generator. + * This is not set until the Game boots. + * + * @name Phaser.Math.RND + * @type {Phaser.Math.RandomDataGenerator} + * @since 3.0.0 + */ + RND: null, + + /** + * The minimum safe integer this browser supports. + * We use a const for backward compatibility with Internet Explorer. + * + * @name Phaser.Math.MIN_SAFE_INTEGER + * @type {number} + * @since 3.21.0 + */ + MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991, + + /** + * The maximum safe integer this browser supports. + * We use a const for backward compatibility with Internet Explorer. + * + * @name Phaser.Math.MAX_SAFE_INTEGER + * @type {number} + * @since 3.21.0 + */ + MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991 + +}; + +module.exports = MATH_CONST; + + +/***/ }), +/* 3 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Force a value within the boundaries by clamping it to the range `min`, `max`. + * + * @function Phaser.Math.Clamp + * @since 3.0.0 + * + * @param {number} value - The value to be clamped. + * @param {number} min - The minimum bounds. + * @param {number} max - The maximum bounds. + * + * @return {number} The clamped value. + */ +var Clamp = function (value, min, max) +{ + return Math.max(min, Math.min(max, value)); +}; + +module.exports = Clamp; + + +/***/ }), +/* 4 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * A NOOP (No Operation) callback function. + * + * Used internally by Phaser when it's more expensive to determine if a callback exists + * than it is to just invoke an empty function. + * + * @function Phaser.Utils.NOOP + * @since 3.0.0 + */ +var NOOP = function () +{ + // NOOP +}; + +module.exports = NOOP; + + /***/ }), /* 5 */ /***/ (function(module, exports) { +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Tests if the start and end indexes are a safe range for the given array. + * + * @function Phaser.Utils.Array.SafeRange + * @since 3.4.0 + * + * @param {array} array - The array to check. + * @param {integer} startIndex - The start index. + * @param {integer} endIndex - The end index. + * @param {boolean} [throwError=true] - Throw an error if the range is out of bounds. + * + * @return {boolean} True if the range is safe, otherwise false. + */ +var SafeRange = function (array, startIndex, endIndex, throwError) +{ + var len = array.length; + + if (startIndex < 0 || + startIndex > len || + startIndex >= endIndex || + endIndex > len || + startIndex + endIndex > len) + { + if (throwError) + { + throw new Error('Range Error: Values outside acceptable range'); + } + + return false; + } + else + { + return true; + } +}; + +module.exports = SafeRange; + + +/***/ }), +/* 6 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Wrap the given `value` between `min` and `max. + * + * @function Phaser.Math.Wrap + * @since 3.0.0 + * + * @param {number} value - The value to wrap. + * @param {number} min - The minimum value. + * @param {number} max - The maximum value. + * + * @return {number} The wrapped value. + */ +var Wrap = function (value, min, max) +{ + var range = max - min; + + return (min + ((((value - min) % range) + range) % range)); +}; + +module.exports = Wrap; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// Source object +// The key as a string, or an array of keys, i.e. 'banner', or 'banner.hideBanner' +// The default value to use if the key doesn't exist + +/** + * Retrieves a value from an object. + * + * @function Phaser.Utils.Objects.GetValue + * @since 3.0.0 + * + * @param {object} source - The object to retrieve the value from. + * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object. + * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object. + * + * @return {*} The value of the requested key. + */ +var GetValue = function (source, key, defaultValue) +{ + if (!source || typeof source === 'number') + { + return defaultValue; + } + else if (source.hasOwnProperty(key)) + { + return source[key]; + } + else if (key.indexOf('.') !== -1) + { + var keys = key.split('.'); + var parent = source; + var value = defaultValue; + + // Use for loop here so we can break early + for (var i = 0; i < keys.length; i++) + { + if (parent.hasOwnProperty(keys[i])) + { + // Yes it has a key property, let's carry on down + value = parent[keys[i]]; + + parent = parent[keys[i]]; + } + else + { + // Can't go any further, so reset to default + value = defaultValue; + break; + } + } + + return value; + } + else + { + return defaultValue; + } +}; + +module.exports = GetValue; + + +/***/ }), +/* 8 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * This is a slightly modified version of jQuery.isPlainObject. + * A plain object is an object whose internal class property is [object Object]. + * + * @function Phaser.Utils.Objects.IsPlainObject + * @since 3.0.0 + * + * @param {object} obj - The object to inspect. + * + * @return {boolean} `true` if the object is plain, otherwise `false`. + */ +var IsPlainObject = function (obj) +{ + // Not plain objects: + // - Any object or value whose internal [[Class]] property is not "[object Object]" + // - DOM nodes + // - window + if (typeof(obj) !== 'object' || obj.nodeType || obj === obj.window) + { + return false; + } + + // Support: Firefox <20 + // The try/catch suppresses exceptions thrown when attempting to access + // the "constructor" property of certain host objects, ie. |window.location| + // https://bugzilla.mozilla.org/show_bug.cgi?id=814622 + try + { + if (obj.constructor && !({}).hasOwnProperty.call(obj.constructor.prototype, 'isPrototypeOf')) + { + return false; + } + } + catch (e) + { + return false; + } + + // If the function hasn't returned already, we're confident that + // |obj| is a plain object, created by {} or constructed with new Object + return true; +}; + +module.exports = IsPlainObject; + + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(2); + +/** + * Takes an angle in Phasers default clockwise format and converts it so that + * 0 is North, 90 is West, 180 is South and 270 is East, + * therefore running counter-clockwise instead of clockwise. + * + * You can pass in the angle from a Game Object using: + * + * ```javascript + * var converted = CounterClockwise(gameobject.rotation); + * ``` + * + * All values for this function are in radians. + * + * @function Phaser.Math.Angle.CounterClockwise + * @since 3.16.0 + * + * @param {number} angle - The angle to convert, in radians. + * + * @return {number} The converted angle, in radians. + */ +var CounterClockwise = function (angle) +{ + if (angle > Math.PI) + { + angle -= CONST.PI2; + } + + return Math.abs((((angle + CONST.TAU) % CONST.PI2) - CONST.PI2) % CONST.PI2); +}; + +module.exports = CounterClockwise; + + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(2); + +/** + * Convert the given angle in radians, to the equivalent angle in degrees. + * + * @function Phaser.Math.RadToDeg + * @since 3.0.0 + * + * @param {number} radians - The angle in radians to convert ot degrees. + * + * @return {integer} The given angle converted to degrees. + */ +var RadToDeg = function (radians) +{ + return radians * CONST.RAD_TO_DEG; +}; + +module.exports = RadToDeg; + + +/***/ }), +/* 11 */ +/***/ (function(module, exports) { + /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. @@ -1339,7 +1591,7 @@ module.exports = GetFastValue; /***/ }), -/* 6 */ +/* 12 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -1348,73 +1600,91 @@ module.exports = GetFastValue; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(1); +var Class = __webpack_require__(0); +var GEOM_CONST = __webpack_require__(25); /** - * Takes an angle in Phasers default clockwise format and converts it so that - * 0 is North, 90 is West, 180 is South and 270 is East, - * therefore running counter-clockwise instead of clockwise. - * - * You can pass in the angle from a Game Object using: - * - * ```javascript - * var converted = CounterClockwise(gameobject.rotation); - * ``` - * - * All values for this function are in radians. + * @classdesc + * Defines a Point in 2D space, with an x and y component. * - * @function Phaser.Math.Angle.CounterClockwise - * @since 3.16.0 - * - * @param {number} angle - The angle to convert, in radians. - * - * @return {number} The converted angle, in radians. - */ -var CounterClockwise = function (angle) -{ - if (angle > Math.PI) - { - angle -= CONST.PI2; - } - - return Math.abs((((angle + CONST.TAU) % CONST.PI2) - CONST.PI2) % CONST.PI2); -}; - -module.exports = CounterClockwise; - - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var CONST = __webpack_require__(1); - -/** - * Convert the given angle in radians, to the equivalent angle in degrees. - * - * @function Phaser.Math.RadToDeg + * @class Point + * @memberof Phaser.Geom + * @constructor * @since 3.0.0 * - * @param {number} radians - The angle in radians to convert ot degrees. - * - * @return {integer} The given angle converted to degrees. + * @param {number} [x=0] - The x coordinate of this Point. + * @param {number} [y=x] - The y coordinate of this Point. */ -var RadToDeg = function (radians) -{ - return radians * CONST.RAD_TO_DEG; -}; +var Point = new Class({ -module.exports = RadToDeg; + initialize: + + function Point (x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = x; } + + /** + * The geometry constant type of this object: `GEOM_CONST.POINT`. + * Used for fast type comparisons. + * + * @name Phaser.Geom.Point#type + * @type {integer} + * @readonly + * @since 3.19.0 + */ + this.type = GEOM_CONST.POINT; + + /** + * The x coordinate of this Point. + * + * @name Phaser.Geom.Point#x + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.x = x; + + /** + * The y coordinate of this Point. + * + * @name Phaser.Geom.Point#y + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.y = y; + }, + + /** + * Set the x and y coordinates of the point to the given values. + * + * @method Phaser.Geom.Point#setTo + * @since 3.0.0 + * + * @param {number} [x=0] - The x coordinate of this Point. + * @param {number} [y=x] - The y coordinate of this Point. + * + * @return {this} This Point object. + */ + setTo: function (x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = x; } + + this.x = x; + this.y = y; + + return this; + } + +}); + +module.exports = Point; /***/ }), -/* 8 */ +/* 13 */ /***/ (function(module, exports) { /** @@ -1566,7 +1836,464 @@ module.exports = FILE_CONST; /***/ }), -/* 9 */ +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CheckMatrix = __webpack_require__(23); +var TransposeMatrix = __webpack_require__(56); + +/** + * Rotates the array matrix based on the given rotation value. + * + * The value can be given in degrees: 90, -90, 270, -270 or 180, + * or a string command: `rotateLeft`, `rotateRight` or `rotate180`. + * + * Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}. + * + * @function Phaser.Utils.Array.Matrix.RotateMatrix + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [matrix,$return] + * + * @param {T[][]} [matrix] - The array to rotate. + * @param {(number|string)} [direction=90] - The amount to rotate the matrix by. + * + * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix. + */ +var RotateMatrix = function (matrix, direction) +{ + if (direction === undefined) { direction = 90; } + + if (!CheckMatrix(matrix)) + { + return null; + } + + if (typeof direction !== 'string') + { + direction = ((direction % 360) + 360) % 360; + } + + if (direction === 90 || direction === -270 || direction === 'rotateLeft') + { + matrix = TransposeMatrix(matrix); + matrix.reverse(); + } + else if (direction === -90 || direction === 270 || direction === 'rotateRight') + { + matrix.reverse(); + matrix = TransposeMatrix(matrix); + } + else if (Math.abs(direction) === 180 || direction === 'rotate180') + { + for (var i = 0; i < matrix.length; i++) + { + matrix[i].reverse(); + } + + matrix.reverse(); + } + + return matrix; +}; + +module.exports = RotateMatrix; + + +/***/ }), +/* 15 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Removes a single item from an array and returns it without creating gc, like the native splice does. + * Based on code by Mike Reinstein. + * + * @function Phaser.Utils.Array.SpliceOne + * @since 3.0.0 + * + * @param {array} array - The array to splice from. + * @param {integer} index - The index of the item which should be spliced. + * + * @return {*} The item which was spliced (removed). + */ +var SpliceOne = function (array, index) +{ + if (index >= array.length) + { + return; + } + + var len = array.length - 1; + + var item = array[index]; + + for (var i = index; i < len; i++) + { + array[i] = array[i + 1]; + } + + array.length = len; + + return item; +}; + +module.exports = SpliceOne; + + +/***/ }), +/* 16 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Phaser Blend Modes. + * + * @namespace Phaser.BlendModes + * @since 3.0.0 + */ + +module.exports = { + + /** + * Skips the Blend Mode check in the renderer. + * + * @name Phaser.BlendModes.SKIP_CHECK + * @type {integer} + * @const + * @since 3.0.0 + */ + SKIP_CHECK: -1, + + /** + * Normal blend mode. For Canvas and WebGL. + * This is the default setting and draws new shapes on top of the existing canvas content. + * + * @name Phaser.BlendModes.NORMAL + * @type {integer} + * @const + * @since 3.0.0 + */ + NORMAL: 0, + + /** + * Add blend mode. For Canvas and WebGL. + * Where both shapes overlap the color is determined by adding color values. + * + * @name Phaser.BlendModes.ADD + * @type {integer} + * @const + * @since 3.0.0 + */ + ADD: 1, + + /** + * Multiply blend mode. For Canvas and WebGL. + * The pixels are of the top layer are multiplied with the corresponding pixel of the bottom layer. A darker picture is the result. + * + * @name Phaser.BlendModes.MULTIPLY + * @type {integer} + * @const + * @since 3.0.0 + */ + MULTIPLY: 2, + + /** + * Screen blend mode. For Canvas and WebGL. + * The pixels are inverted, multiplied, and inverted again. A lighter picture is the result (opposite of multiply) + * + * @name Phaser.BlendModes.SCREEN + * @type {integer} + * @const + * @since 3.0.0 + */ + SCREEN: 3, + + /** + * Overlay blend mode. For Canvas only. + * A combination of multiply and screen. Dark parts on the base layer become darker, and light parts become lighter. + * + * @name Phaser.BlendModes.OVERLAY + * @type {integer} + * @const + * @since 3.0.0 + */ + OVERLAY: 4, + + /** + * Darken blend mode. For Canvas only. + * Retains the darkest pixels of both layers. + * + * @name Phaser.BlendModes.DARKEN + * @type {integer} + * @const + * @since 3.0.0 + */ + DARKEN: 5, + + /** + * Lighten blend mode. For Canvas only. + * Retains the lightest pixels of both layers. + * + * @name Phaser.BlendModes.LIGHTEN + * @type {integer} + * @const + * @since 3.0.0 + */ + LIGHTEN: 6, + + /** + * Color Dodge blend mode. For Canvas only. + * Divides the bottom layer by the inverted top layer. + * + * @name Phaser.BlendModes.COLOR_DODGE + * @type {integer} + * @const + * @since 3.0.0 + */ + COLOR_DODGE: 7, + + /** + * Color Burn blend mode. For Canvas only. + * Divides the inverted bottom layer by the top layer, and then inverts the result. + * + * @name Phaser.BlendModes.COLOR_BURN + * @type {integer} + * @const + * @since 3.0.0 + */ + COLOR_BURN: 8, + + /** + * Hard Light blend mode. For Canvas only. + * A combination of multiply and screen like overlay, but with top and bottom layer swapped. + * + * @name Phaser.BlendModes.HARD_LIGHT + * @type {integer} + * @const + * @since 3.0.0 + */ + HARD_LIGHT: 9, + + /** + * Soft Light blend mode. For Canvas only. + * A softer version of hard-light. Pure black or white does not result in pure black or white. + * + * @name Phaser.BlendModes.SOFT_LIGHT + * @type {integer} + * @const + * @since 3.0.0 + */ + SOFT_LIGHT: 10, + + /** + * Difference blend mode. For Canvas only. + * Subtracts the bottom layer from the top layer or the other way round to always get a positive value. + * + * @name Phaser.BlendModes.DIFFERENCE + * @type {integer} + * @const + * @since 3.0.0 + */ + DIFFERENCE: 11, + + /** + * Exclusion blend mode. For Canvas only. + * Like difference, but with lower contrast. + * + * @name Phaser.BlendModes.EXCLUSION + * @type {integer} + * @const + * @since 3.0.0 + */ + EXCLUSION: 12, + + /** + * Hue blend mode. For Canvas only. + * Preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer. + * + * @name Phaser.BlendModes.HUE + * @type {integer} + * @const + * @since 3.0.0 + */ + HUE: 13, + + /** + * Saturation blend mode. For Canvas only. + * Preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer. + * + * @name Phaser.BlendModes.SATURATION + * @type {integer} + * @const + * @since 3.0.0 + */ + SATURATION: 14, + + /** + * Color blend mode. For Canvas only. + * Preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer. + * + * @name Phaser.BlendModes.COLOR + * @type {integer} + * @const + * @since 3.0.0 + */ + COLOR: 15, + + /** + * Luminosity blend mode. For Canvas only. + * Preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer. + * + * @name Phaser.BlendModes.LUMINOSITY + * @type {integer} + * @const + * @since 3.0.0 + */ + LUMINOSITY: 16, + + /** + * Alpha erase blend mode. For Canvas and WebGL. + * + * @name Phaser.BlendModes.ERASE + * @type {integer} + * @const + * @since 3.0.0 + */ + ERASE: 17, + + /** + * Source-in blend mode. For Canvas only. + * The new shape is drawn only where both the new shape and the destination canvas overlap. Everything else is made transparent. + * + * @name Phaser.BlendModes.SOURCE_IN + * @type {integer} + * @const + * @since 3.0.0 + */ + SOURCE_IN: 18, + + /** + * Source-out blend mode. For Canvas only. + * The new shape is drawn where it doesn't overlap the existing canvas content. + * + * @name Phaser.BlendModes.SOURCE_OUT + * @type {integer} + * @const + * @since 3.0.0 + */ + SOURCE_OUT: 19, + + /** + * Source-out blend mode. For Canvas only. + * The new shape is only drawn where it overlaps the existing canvas content. + * + * @name Phaser.BlendModes.SOURCE_ATOP + * @type {integer} + * @const + * @since 3.0.0 + */ + SOURCE_ATOP: 20, + + /** + * Destination-over blend mode. For Canvas only. + * New shapes are drawn behind the existing canvas content. + * + * @name Phaser.BlendModes.DESTINATION_OVER + * @type {integer} + * @const + * @since 3.0.0 + */ + DESTINATION_OVER: 21, + + /** + * Destination-in blend mode. For Canvas only. + * The existing canvas content is kept where both the new shape and existing canvas content overlap. Everything else is made transparent. + * + * @name Phaser.BlendModes.DESTINATION_IN + * @type {integer} + * @const + * @since 3.0.0 + */ + DESTINATION_IN: 22, + + /** + * Destination-out blend mode. For Canvas only. + * The existing content is kept where it doesn't overlap the new shape. + * + * @name Phaser.BlendModes.DESTINATION_OUT + * @type {integer} + * @const + * @since 3.0.0 + */ + DESTINATION_OUT: 23, + + /** + * Destination-out blend mode. For Canvas only. + * The existing canvas is only kept where it overlaps the new shape. The new shape is drawn behind the canvas content. + * + * @name Phaser.BlendModes.DESTINATION_ATOP + * @type {integer} + * @const + * @since 3.0.0 + */ + DESTINATION_ATOP: 24, + + /** + * Lighten blend mode. For Canvas only. + * Where both shapes overlap the color is determined by adding color values. + * + * @name Phaser.BlendModes.LIGHTER + * @type {integer} + * @const + * @since 3.0.0 + */ + LIGHTER: 25, + + /** + * Copy blend mode. For Canvas only. + * Only the new shape is shown. + * + * @name Phaser.BlendModes.COPY + * @type {integer} + * @const + * @since 3.0.0 + */ + COPY: 26, + + /** + * Xor blend mode. For Canvas only. + * Shapes are made transparent where both overlap and drawn normal everywhere else. + * + * @name Phaser.BlendModes.XOR + * @type {integer} + * @const + * @since 3.0.0 + */ + XOR: 27 + +}; + + +/***/ }), +/* 17 */ /***/ (function(module, exports) { /** @@ -1595,8 +2322,8 @@ module.exports = FloatBetween; /***/ }), -/* 10 */ -/***/ (function(module, exports) { +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey @@ -1604,28 +2331,28 @@ module.exports = FloatBetween; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var CONST = __webpack_require__(2); + /** - * Force a value within the boundaries by clamping it to the range `min`, `max`. + * Convert the given angle from degrees, to the equivalent angle in radians. * - * @function Phaser.Math.Clamp + * @function Phaser.Math.DegToRad * @since 3.0.0 * - * @param {number} value - The value to be clamped. - * @param {number} min - The minimum bounds. - * @param {number} max - The maximum bounds. + * @param {integer} degrees - The angle (in degrees) to convert to radians. * - * @return {number} The clamped value. + * @return {number} The given angle converted to radians. */ -var Clamp = function (value, min, max) +var DegToRad = function (degrees) { - return Math.max(min, Math.min(max, value)); + return degrees * CONST.DEG_TO_RAD; }; -module.exports = Clamp; +module.exports = DegToRad; /***/ }), -/* 11 */ +/* 19 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -2435,78 +3162,7 @@ module.exports = Vector3; /***/ }), -/* 12 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -// Source object -// The key as a string, or an array of keys, i.e. 'banner', or 'banner.hideBanner' -// The default value to use if the key doesn't exist - -/** - * Retrieves a value from an object. - * - * @function Phaser.Utils.Objects.GetValue - * @since 3.0.0 - * - * @param {object} source - The object to retrieve the value from. - * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object. - * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object. - * - * @return {*} The value of the requested key. - */ -var GetValue = function (source, key, defaultValue) -{ - if (!source || typeof source === 'number') - { - return defaultValue; - } - else if (source.hasOwnProperty(key)) - { - return source[key]; - } - else if (key.indexOf('.') !== -1) - { - var keys = key.split('.'); - var parent = source; - var value = defaultValue; - - // Use for loop here so we can break early - for (var i = 0; i < keys.length; i++) - { - if (parent.hasOwnProperty(keys[i])) - { - // Yes it has a key property, let's carry on down - value = parent[keys[i]]; - - parent = parent[keys[i]]; - } - else - { - // Can't go any further, so reset to default - value = defaultValue; - break; - } - } - - return value; - } - else - { - return defaultValue; - } -}; - -module.exports = GetValue; - - -/***/ }), -/* 13 */ +/* 20 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -2516,13 +3172,13 @@ module.exports = GetValue; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(8); -var Events = __webpack_require__(178); -var GetFastValue = __webpack_require__(5); -var GetURL = __webpack_require__(189); -var MergeXHRSettings = __webpack_require__(32); -var XHRLoader = __webpack_require__(190); -var XHRSettings = __webpack_require__(33); +var CONST = __webpack_require__(13); +var Events = __webpack_require__(202); +var GetFastValue = __webpack_require__(11); +var GetURL = __webpack_require__(213); +var MergeXHRSettings = __webpack_require__(44); +var XHRLoader = __webpack_require__(214); +var XHRSettings = __webpack_require__(45); /** * @classdesc @@ -3054,7 +3710,7 @@ module.exports = File; /***/ }), -/* 14 */ +/* 21 */ /***/ (function(module, exports) { /** @@ -3123,7 +3779,7 @@ module.exports = FileTypesManager; /***/ }), -/* 15 */ +/* 22 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -3132,7 +3788,692 @@ module.exports = FileTypesManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var IsPlainObject = __webpack_require__(2); +/** + * @namespace Phaser.GameObjects.Events + */ + +module.exports = { + + ADDED_TO_SCENE: __webpack_require__(225), + DESTROY: __webpack_require__(226), + REMOVED_FROM_SCENE: __webpack_require__(227), + VIDEO_COMPLETE: __webpack_require__(228), + VIDEO_CREATED: __webpack_require__(229), + VIDEO_ERROR: __webpack_require__(230), + VIDEO_LOOP: __webpack_require__(231), + VIDEO_PLAY: __webpack_require__(232), + VIDEO_SEEKED: __webpack_require__(233), + VIDEO_SEEKING: __webpack_require__(234), + VIDEO_STOP: __webpack_require__(235), + VIDEO_TIMEOUT: __webpack_require__(236), + VIDEO_UNLOCKED: __webpack_require__(237) + +}; + + +/***/ }), +/* 23 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Checks if an array can be used as a matrix. + * + * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows) have the same length. There must be at least two rows: + * + * ``` + * [ + * [ 1, 1, 1, 1, 1, 1 ], + * [ 2, 0, 0, 0, 0, 4 ], + * [ 2, 0, 1, 2, 0, 4 ], + * [ 2, 0, 3, 4, 0, 4 ], + * [ 2, 0, 0, 0, 0, 4 ], + * [ 3, 3, 3, 3, 3, 3 ] + * ] + * ``` + * + * @function Phaser.Utils.Array.Matrix.CheckMatrix + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [matrix] + * + * @param {T[][]} [matrix] - The array to check. + * + * @return {boolean} `true` if the given `matrix` array is a valid matrix. + */ +var CheckMatrix = function (matrix) +{ + if (!Array.isArray(matrix) || matrix.length < 2 || !Array.isArray(matrix[0])) + { + return false; + } + + // How long is the first row? + var size = matrix[0].length; + + // Validate the rest of the rows are the same length + for (var i = 1; i < matrix.length; i++) + { + if (matrix[i].length !== size) + { + return false; + } + } + + return true; +}; + +module.exports = CheckMatrix; + + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var Contains = __webpack_require__(313); +var GetPoint = __webpack_require__(60); +var GetPoints = __webpack_require__(314); +var GEOM_CONST = __webpack_require__(25); +var Line = __webpack_require__(315); +var Random = __webpack_require__(320); + +/** + * @classdesc + * Encapsulates a 2D rectangle defined by its corner point in the top-left and its extends in x (width) and y (height) + * + * @class Rectangle + * @memberof Phaser.Geom + * @constructor + * @since 3.0.0 + * + * @param {number} [x=0] - The X coordinate of the top left corner of the Rectangle. + * @param {number} [y=0] - The Y coordinate of the top left corner of the Rectangle. + * @param {number} [width=0] - The width of the Rectangle. + * @param {number} [height=0] - The height of the Rectangle. + */ +var Rectangle = new Class({ + + initialize: + + function Rectangle (x, y, width, height) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + if (width === undefined) { width = 0; } + if (height === undefined) { height = 0; } + + /** + * The geometry constant type of this object: `GEOM_CONST.RECTANGLE`. + * Used for fast type comparisons. + * + * @name Phaser.Geom.Rectangle#type + * @type {integer} + * @readonly + * @since 3.19.0 + */ + this.type = GEOM_CONST.RECTANGLE; + + /** + * The X coordinate of the top left corner of the Rectangle. + * + * @name Phaser.Geom.Rectangle#x + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.x = x; + + /** + * The Y coordinate of the top left corner of the Rectangle. + * + * @name Phaser.Geom.Rectangle#y + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.y = y; + + /** + * The width of the Rectangle, i.e. the distance between its left side (defined by `x`) and its right side. + * + * @name Phaser.Geom.Rectangle#width + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.width = width; + + /** + * The height of the Rectangle, i.e. the distance between its top side (defined by `y`) and its bottom side. + * + * @name Phaser.Geom.Rectangle#height + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.height = height; + }, + + /** + * Checks if the given point is inside the Rectangle's bounds. + * + * @method Phaser.Geom.Rectangle#contains + * @since 3.0.0 + * + * @param {number} x - The X coordinate of the point to check. + * @param {number} y - The Y coordinate of the point to check. + * + * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`. + */ + contains: function (x, y) + { + return Contains(this, x, y); + }, + + /** + * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter. + * + * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is. + * + * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side. + * + * @method Phaser.Geom.Rectangle#getPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [output,$return] + * + * @param {number} position - The normalized distance into the Rectangle's perimeter to return. + * @param {(Phaser.Geom.Point|object)} [output] - An object to update with the `x` and `y` coordinates of the point. + * + * @return {(Phaser.Geom.Point|object)} The updated `output` object, or a new Point if no `output` object was given. + */ + getPoint: function (position, output) + { + return GetPoint(this, position, output); + }, + + /** + * Returns an array of points from the perimeter of the Rectangle, each spaced out based on the quantity or step required. + * + * @method Phaser.Geom.Rectangle#getPoints + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point[]} O - [output,$return] + * + * @param {integer} quantity - The number of points to return. Set to `false` or 0 to return an arbitrary number of points (`perimeter / stepRate`) evenly spaced around the Rectangle based on the `stepRate`. + * @param {number} [stepRate] - If `quantity` is 0, determines the normalized distance between each returned point. + * @param {(array|Phaser.Geom.Point[])} [output] - An array to which to append the points. + * + * @return {(array|Phaser.Geom.Point[])} The modified `output` array, or a new array if none was provided. + */ + getPoints: function (quantity, stepRate, output) + { + return GetPoints(this, quantity, stepRate, output); + }, + + /** + * Returns a random point within the Rectangle's bounds. + * + * @method Phaser.Geom.Rectangle#getRandomPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [point,$return] + * + * @param {Phaser.Geom.Point} [point] - The object in which to store the `x` and `y` coordinates of the point. + * + * @return {Phaser.Geom.Point} The updated `point`, or a new Point if none was provided. + */ + getRandomPoint: function (point) + { + return Random(this, point); + }, + + /** + * Sets the position, width, and height of the Rectangle. + * + * @method Phaser.Geom.Rectangle#setTo + * @since 3.0.0 + * + * @param {number} x - The X coordinate of the top left corner of the Rectangle. + * @param {number} y - The Y coordinate of the top left corner of the Rectangle. + * @param {number} width - The width of the Rectangle. + * @param {number} height - The height of the Rectangle. + * + * @return {this} This Rectangle object. + */ + setTo: function (x, y, width, height) + { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + + return this; + }, + + /** + * Resets the position, width, and height of the Rectangle to 0. + * + * @method Phaser.Geom.Rectangle#setEmpty + * @since 3.0.0 + * + * @return {this} This Rectangle object. + */ + setEmpty: function () + { + return this.setTo(0, 0, 0, 0); + }, + + /** + * Sets the position of the Rectangle. + * + * @method Phaser.Geom.Rectangle#setPosition + * @since 3.0.0 + * + * @param {number} x - The X coordinate of the top left corner of the Rectangle. + * @param {number} [y=x] - The Y coordinate of the top left corner of the Rectangle. + * + * @return {this} This Rectangle object. + */ + setPosition: function (x, y) + { + if (y === undefined) { y = x; } + + this.x = x; + this.y = y; + + return this; + }, + + /** + * Sets the width and height of the Rectangle. + * + * @method Phaser.Geom.Rectangle#setSize + * @since 3.0.0 + * + * @param {number} width - The width to set the Rectangle to. + * @param {number} [height=width] - The height to set the Rectangle to. + * + * @return {this} This Rectangle object. + */ + setSize: function (width, height) + { + if (height === undefined) { height = width; } + + this.width = width; + this.height = height; + + return this; + }, + + /** + * Determines if the Rectangle is empty. A Rectangle is empty if its width or height is less than or equal to 0. + * + * @method Phaser.Geom.Rectangle#isEmpty + * @since 3.0.0 + * + * @return {boolean} `true` if the Rectangle is empty. A Rectangle object is empty if its width or height is less than or equal to 0. + */ + isEmpty: function () + { + return (this.width <= 0 || this.height <= 0); + }, + + /** + * Returns a Line object that corresponds to the top of this Rectangle. + * + * @method Phaser.Geom.Rectangle#getLineA + * @since 3.0.0 + * + * @generic {Phaser.Geom.Line} O - [line,$return] + * + * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created. + * + * @return {Phaser.Geom.Line} A Line object that corresponds to the top of this Rectangle. + */ + getLineA: function (line) + { + if (line === undefined) { line = new Line(); } + + line.setTo(this.x, this.y, this.right, this.y); + + return line; + }, + + /** + * Returns a Line object that corresponds to the right of this Rectangle. + * + * @method Phaser.Geom.Rectangle#getLineB + * @since 3.0.0 + * + * @generic {Phaser.Geom.Line} O - [line,$return] + * + * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created. + * + * @return {Phaser.Geom.Line} A Line object that corresponds to the right of this Rectangle. + */ + getLineB: function (line) + { + if (line === undefined) { line = new Line(); } + + line.setTo(this.right, this.y, this.right, this.bottom); + + return line; + }, + + /** + * Returns a Line object that corresponds to the bottom of this Rectangle. + * + * @method Phaser.Geom.Rectangle#getLineC + * @since 3.0.0 + * + * @generic {Phaser.Geom.Line} O - [line,$return] + * + * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created. + * + * @return {Phaser.Geom.Line} A Line object that corresponds to the bottom of this Rectangle. + */ + getLineC: function (line) + { + if (line === undefined) { line = new Line(); } + + line.setTo(this.right, this.bottom, this.x, this.bottom); + + return line; + }, + + /** + * Returns a Line object that corresponds to the left of this Rectangle. + * + * @method Phaser.Geom.Rectangle#getLineD + * @since 3.0.0 + * + * @generic {Phaser.Geom.Line} O - [line,$return] + * + * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created. + * + * @return {Phaser.Geom.Line} A Line object that corresponds to the left of this Rectangle. + */ + getLineD: function (line) + { + if (line === undefined) { line = new Line(); } + + line.setTo(this.x, this.bottom, this.x, this.y); + + return line; + }, + + /** + * The x coordinate of the left of the Rectangle. + * Changing the left property of a Rectangle object has no effect on the y and height properties. However it does affect the width property, whereas changing the x value does not affect the width property. + * + * @name Phaser.Geom.Rectangle#left + * @type {number} + * @since 3.0.0 + */ + left: { + + get: function () + { + return this.x; + }, + + set: function (value) + { + if (value >= this.right) + { + this.width = 0; + } + else + { + this.width = this.right - value; + } + + this.x = value; + } + + }, + + /** + * The sum of the x and width properties. + * Changing the right property of a Rectangle object has no effect on the x, y and height properties, however it does affect the width property. + * + * @name Phaser.Geom.Rectangle#right + * @type {number} + * @since 3.0.0 + */ + right: { + + get: function () + { + return this.x + this.width; + }, + + set: function (value) + { + if (value <= this.x) + { + this.width = 0; + } + else + { + this.width = value - this.x; + } + } + + }, + + /** + * The y coordinate of the top of the Rectangle. Changing the top property of a Rectangle object has no effect on the x and width properties. + * However it does affect the height property, whereas changing the y value does not affect the height property. + * + * @name Phaser.Geom.Rectangle#top + * @type {number} + * @since 3.0.0 + */ + top: { + + get: function () + { + return this.y; + }, + + set: function (value) + { + if (value >= this.bottom) + { + this.height = 0; + } + else + { + this.height = (this.bottom - value); + } + + this.y = value; + } + + }, + + /** + * The sum of the y and height properties. + * Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property. + * + * @name Phaser.Geom.Rectangle#bottom + * @type {number} + * @since 3.0.0 + */ + bottom: { + + get: function () + { + return this.y + this.height; + }, + + set: function (value) + { + if (value <= this.y) + { + this.height = 0; + } + else + { + this.height = value - this.y; + } + } + + }, + + /** + * The x coordinate of the center of the Rectangle. + * + * @name Phaser.Geom.Rectangle#centerX + * @type {number} + * @since 3.0.0 + */ + centerX: { + + get: function () + { + return this.x + (this.width / 2); + }, + + set: function (value) + { + this.x = value - (this.width / 2); + } + + }, + + /** + * The y coordinate of the center of the Rectangle. + * + * @name Phaser.Geom.Rectangle#centerY + * @type {number} + * @since 3.0.0 + */ + centerY: { + + get: function () + { + return this.y + (this.height / 2); + }, + + set: function (value) + { + this.y = value - (this.height / 2); + } + + } + +}); + +module.exports = Rectangle; + + +/***/ }), +/* 25 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GEOM_CONST = { + + /** + * A Circle Geometry object type. + * + * @name Phaser.Geom.CIRCLE + * @type {integer} + * @since 3.19.0 + */ + CIRCLE: 0, + + /** + * An Ellipse Geometry object type. + * + * @name Phaser.Geom.ELLIPSE + * @type {integer} + * @since 3.19.0 + */ + ELLIPSE: 1, + + /** + * A Line Geometry object type. + * + * @name Phaser.Geom.LINE + * @type {integer} + * @since 3.19.0 + */ + LINE: 2, + + /** + * A Point Geometry object type. + * + * @name Phaser.Geom.POINT + * @type {integer} + * @since 3.19.0 + */ + POINT: 3, + + /** + * A Polygon Geometry object type. + * + * @name Phaser.Geom.POLYGON + * @type {integer} + * @since 3.19.0 + */ + POLYGON: 4, + + /** + * A Rectangle Geometry object type. + * + * @name Phaser.Geom.RECTANGLE + * @type {integer} + * @since 3.19.0 + */ + RECTANGLE: 5, + + /** + * A Triangle Geometry object type. + * + * @name Phaser.Geom.TRIANGLE + * @type {integer} + * @since 3.19.0 + */ + TRIANGLE: 6 + +}; + +module.exports = GEOM_CONST; + + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var IsPlainObject = __webpack_require__(8); // @param {boolean} deep - Perform a deep copy? // @param {object} target - The target object to copy to. @@ -3224,7 +4565,7 @@ module.exports = Extend; /***/ }), -/* 16 */ +/* 27 */ /***/ (function(module, exports) { /** @@ -3255,7 +4596,7 @@ module.exports = Between; /***/ }), -/* 17 */ +/* 28 */ /***/ (function(module, exports) { /** @@ -3292,7 +4633,7 @@ module.exports = Normalize; /***/ }), -/* 18 */ +/* 29 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -3301,7 +4642,7 @@ module.exports = Normalize; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathWrap = __webpack_require__(3); +var MathWrap = __webpack_require__(6); /** * Wrap an angle. @@ -3324,7 +4665,7 @@ module.exports = Wrap; /***/ }), -/* 19 */ +/* 30 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -3333,7 +4674,7 @@ module.exports = Wrap; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Wrap = __webpack_require__(3); +var Wrap = __webpack_require__(6); /** * Wrap an angle in degrees. @@ -3356,7 +4697,7 @@ module.exports = WrapDegrees; /***/ }), -/* 20 */ +/* 31 */ /***/ (function(module, exports) { /** @@ -3390,7 +4731,7 @@ module.exports = Equal; /***/ }), -/* 21 */ +/* 32 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -3399,7 +4740,7 @@ module.exports = Equal; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Factorial = __webpack_require__(22); +var Factorial = __webpack_require__(33); /** * Calculates the Bernstein basis from the three factorial coefficients. @@ -3421,7 +4762,7 @@ module.exports = Bernstein; /***/ }), -/* 22 */ +/* 33 */ /***/ (function(module, exports) { /** @@ -3461,7 +4802,7 @@ module.exports = Factorial; /***/ }), -/* 23 */ +/* 34 */ /***/ (function(module, exports) { /** @@ -3498,7 +4839,7 @@ module.exports = CatmullRom; /***/ }), -/* 24 */ +/* 35 */ /***/ (function(module, exports) { /** @@ -3528,7 +4869,7 @@ module.exports = Linear; /***/ }), -/* 25 */ +/* 36 */ /***/ (function(module, exports) { /** @@ -3575,7 +4916,7 @@ module.exports = SmoothStep; /***/ }), -/* 26 */ +/* 37 */ /***/ (function(module, exports) { /** @@ -3614,8 +4955,8 @@ module.exports = SmootherStep; /***/ }), -/* 27 */ -/***/ (function(module, exports, __webpack_require__) { +/* 38 */ +/***/ (function(module, exports) { /** * @author Richard Davey @@ -3623,28 +4964,71 @@ module.exports = SmootherStep; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(1); - /** - * Convert the given angle from degrees, to the equivalent angle in radians. + * Rotate a `point` around `x` and `y` to the given `angle`, at the same distance. * - * @function Phaser.Math.DegToRad + * In polar notation, this maps a point from (r, t) to (r, angle), vs. the origin (x, y). + * + * @function Phaser.Math.RotateAround * @since 3.0.0 * - * @param {integer} degrees - The angle (in degrees) to convert to radians. + * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return] * - * @return {number} The given angle converted to radians. + * @param {(Phaser.Geom.Point|object)} point - The point to be rotated. + * @param {number} x - The horizontal coordinate to rotate around. + * @param {number} y - The vertical coordinate to rotate around. + * @param {number} angle - The angle of rotation in radians. + * + * @return {Phaser.Types.Math.Vector2Like} The given point. */ -var DegToRad = function (degrees) +var RotateAround = function (point, x, y, angle) { - return degrees * CONST.DEG_TO_RAD; + var c = Math.cos(angle); + var s = Math.sin(angle); + + var tx = point.x - x; + var ty = point.y - y; + + point.x = tx * c - ty * s + x; + point.y = tx * s + ty * c + y; + + return point; }; -module.exports = DegToRad; +module.exports = RotateAround; /***/ }), -/* 28 */ +/* 39 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Round a given number so it is further away from zero. That is, positive numbers are rounded up, and negative numbers are rounded down. + * + * @function Phaser.Math.RoundAwayFromZero + * @since 3.0.0 + * + * @param {number} value - The number to round. + * + * @return {number} The rounded number, rounded away from zero. + */ +var RoundAwayFromZero = function (value) +{ + // "Opposite" of truncate. + return (value > 0) ? Math.ceil(value) : Math.floor(value); +}; + +module.exports = RoundAwayFromZero; + + +/***/ }), +/* 40 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -3653,7 +5037,7 @@ module.exports = DegToRad; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector2 = __webpack_require__(4); +var Vector2 = __webpack_require__(1); /** * Takes the `x` and `y` coordinates and transforms them into the same space as @@ -3699,7 +5083,7 @@ module.exports = TransformXY; /***/ }), -/* 29 */ +/* 41 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -4292,7 +5676,7 @@ module.exports = Matrix3; /***/ }), -/* 30 */ +/* 42 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -5754,7 +7138,7 @@ module.exports = Matrix4; /***/ }), -/* 31 */ +/* 43 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -5767,8 +7151,8 @@ module.exports = Matrix4; // and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl var Class = __webpack_require__(0); -var Vector3 = __webpack_require__(11); -var Matrix3 = __webpack_require__(29); +var Vector3 = __webpack_require__(19); +var Matrix3 = __webpack_require__(41); var EPSILON = 0.000001; @@ -6526,7 +7910,7 @@ module.exports = Quaternion; /***/ }), -/* 32 */ +/* 44 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -6535,8 +7919,8 @@ module.exports = Quaternion; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Extend = __webpack_require__(15); -var XHRSettings = __webpack_require__(33); +var Extend = __webpack_require__(26); +var XHRSettings = __webpack_require__(45); /** * Takes two XHRSettings Objects and creates a new XHRSettings object from them. @@ -6574,7 +7958,7 @@ module.exports = MergeXHRSettings; /***/ }), -/* 33 */ +/* 45 */ /***/ (function(module, exports) { /** @@ -6644,7 +8028,7 @@ module.exports = XHRSettings; /***/ }), -/* 34 */ +/* 46 */ /***/ (function(module, exports) { /** @@ -6654,40 +8038,3690 @@ module.exports = XHRSettings; */ /** - * A NOOP (No Operation) callback function. - * - * Used internally by Phaser when it's more expensive to determine if a callback exists - * than it is to just invoke an empty function. - * - * @function Phaser.Utils.NOOP + * Provides methods used for calculating and setting the size of a non-Frame based Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.ComputedSize * @since 3.0.0 */ -var NOOP = function () -{ - // NOOP + +var ComputedSize = { + + /** + * The native (un-scaled) width of this Game Object. + * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayWidth` property. + * + * @name Phaser.GameObjects.Components.ComputedSize#width + * @type {number} + * @since 3.0.0 + */ + width: 0, + + /** + * The native (un-scaled) height of this Game Object. + * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayHeight` property. + * + * @name Phaser.GameObjects.Components.ComputedSize#height + * @type {number} + * @since 3.0.0 + */ + height: 0, + + /** + * The displayed width of this Game Object. + * + * This value takes into account the scale factor. + * + * Setting this value will adjust the Game Object's scale property. + * + * @name Phaser.GameObjects.Components.ComputedSize#displayWidth + * @type {number} + * @since 3.0.0 + */ + displayWidth: { + + get: function () + { + return this.scaleX * this.width; + }, + + set: function (value) + { + this.scaleX = value / this.width; + } + + }, + + /** + * The displayed height of this Game Object. + * + * This value takes into account the scale factor. + * + * Setting this value will adjust the Game Object's scale property. + * + * @name Phaser.GameObjects.Components.ComputedSize#displayHeight + * @type {number} + * @since 3.0.0 + */ + displayHeight: { + + get: function () + { + return this.scaleY * this.height; + }, + + set: function (value) + { + this.scaleY = value / this.height; + } + + }, + + /** + * Sets the internal size of this Game Object, as used for frame or physics body creation. + * + * This will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or call the + * `setDisplaySize` method, which is the same thing as changing the scale but allows you + * to do so by giving pixel values. + * + * If you have enabled this Game Object for input, changing the size will _not_ change the + * size of the hit area. To do this you should adjust the `input.hitArea` object directly. + * + * @method Phaser.GameObjects.Components.ComputedSize#setSize + * @since 3.4.0 + * + * @param {number} width - The width of this Game Object. + * @param {number} height - The height of this Game Object. + * + * @return {this} This Game Object instance. + */ + setSize: function (width, height) + { + this.width = width; + this.height = height; + + return this; + }, + + /** + * Sets the display size of this Game Object. + * + * Calling this will adjust the scale. + * + * @method Phaser.GameObjects.Components.ComputedSize#setDisplaySize + * @since 3.4.0 + * + * @param {number} width - The width of this Game Object. + * @param {number} height - The height of this Game Object. + * + * @return {this} This Game Object instance. + */ + setDisplaySize: function (width, height) + { + this.displayWidth = width; + this.displayHeight = height; + + return this; + } + }; -module.exports = NOOP; +module.exports = ComputedSize; /***/ }), -/* 35 */ +/* 47 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for setting the depth of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.Depth + * @since 3.0.0 + */ + +var Depth = { + + /** + * Private internal value. Holds the depth of the Game Object. + * + * @name Phaser.GameObjects.Components.Depth#_depth + * @type {integer} + * @private + * @default 0 + * @since 3.0.0 + */ + _depth: 0, + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The default depth is zero. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * + * @name Phaser.GameObjects.Components.Depth#depth + * @type {number} + * @since 3.0.0 + */ + depth: { + + get: function () + { + return this._depth; + }, + + set: function (value) + { + this.scene.sys.queueDepthSort(); + this._depth = value; + } + + }, + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The default depth is zero. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * + * @method Phaser.GameObjects.Components.Depth#setDepth + * @since 3.0.0 + * + * @param {integer} value - The depth of this Game Object. + * + * @return {this} This Game Object instance. + */ + setDepth: function (value) + { + if (value === undefined) { value = 0; } + + this.depth = value; + + return this; + } + +}; + +module.exports = Depth; + + +/***/ }), +/* 48 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for visually flipping a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.Flip + * @since 3.0.0 + */ + +var Flip = { + + /** + * The horizontally flipped state of the Game Object. + * + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + * + * @name Phaser.GameObjects.Components.Flip#flipX + * @type {boolean} + * @default false + * @since 3.0.0 + */ + flipX: false, + + /** + * The vertically flipped state of the Game Object. + * + * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + * + * @name Phaser.GameObjects.Components.Flip#flipY + * @type {boolean} + * @default false + * @since 3.0.0 + */ + flipY: false, + + /** + * Toggles the horizontal flipped state of this Game Object. + * + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + * + * @method Phaser.GameObjects.Components.Flip#toggleFlipX + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + toggleFlipX: function () + { + this.flipX = !this.flipX; + + return this; + }, + + /** + * Toggles the vertical flipped state of this Game Object. + * + * @method Phaser.GameObjects.Components.Flip#toggleFlipY + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + toggleFlipY: function () + { + this.flipY = !this.flipY; + + return this; + }, + + /** + * Sets the horizontal flipped state of this Game Object. + * + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + * + * @method Phaser.GameObjects.Components.Flip#setFlipX + * @since 3.0.0 + * + * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped. + * + * @return {this} This Game Object instance. + */ + setFlipX: function (value) + { + this.flipX = value; + + return this; + }, + + /** + * Sets the vertical flipped state of this Game Object. + * + * @method Phaser.GameObjects.Components.Flip#setFlipY + * @since 3.0.0 + * + * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped. + * + * @return {this} This Game Object instance. + */ + setFlipY: function (value) + { + this.flipY = value; + + return this; + }, + + /** + * Sets the horizontal and vertical flipped state of this Game Object. + * + * A Game Object that is flipped will render inversed on the flipped axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + * + * @method Phaser.GameObjects.Components.Flip#setFlip + * @since 3.0.0 + * + * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped. + * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped. + * + * @return {this} This Game Object instance. + */ + setFlip: function (x, y) + { + this.flipX = x; + this.flipY = y; + + return this; + }, + + /** + * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state. + * + * @method Phaser.GameObjects.Components.Flip#resetFlip + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + resetFlip: function () + { + this.flipX = false; + this.flipY = false; + + return this; + } + +}; + +module.exports = Flip; + + +/***/ }), +/* 49 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for getting and setting the Scroll Factor of a Game Object. + * + * @namespace Phaser.GameObjects.Components.ScrollFactor + * @since 3.0.0 + */ + +var ScrollFactor = { + + /** + * 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. + * + * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorX + * @type {number} + * @default 1 + * @since 3.0.0 + */ + scrollFactorX: 1, + + /** + * 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. + * + * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorY + * @type {number} + * @default 1 + * @since 3.0.0 + */ + scrollFactorY: 1, + + /** + * 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. + * + * @method Phaser.GameObjects.Components.ScrollFactor#setScrollFactor + * @since 3.0.0 + * + * @param {number} x - The horizontal scroll factor of this Game Object. + * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value. + * + * @return {this} This Game Object instance. + */ + setScrollFactor: function (x, y) + { + if (y === undefined) { y = x; } + + this.scrollFactorX = x; + this.scrollFactorY = y; + + return this; + } + +}; + +module.exports = ScrollFactor; + + +/***/ }), +/* 50 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var MATH_CONST = __webpack_require__(2); +var TransformMatrix = __webpack_require__(51); +var TransformXY = __webpack_require__(40); +var WrapAngle = __webpack_require__(29); +var WrapAngleDegrees = __webpack_require__(30); +var Vector2 = __webpack_require__(1); + +// global bitmask flag for GameObject.renderMask (used by Scale) +var _FLAG = 4; // 0100 + +/** + * Provides methods used for getting and setting the position, scale and rotation of a Game Object. + * + * @namespace Phaser.GameObjects.Components.Transform + * @since 3.0.0 + */ + +var Transform = { + + /** + * Private internal value. Holds the horizontal scale value. + * + * @name Phaser.GameObjects.Components.Transform#_scaleX + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _scaleX: 1, + + /** + * Private internal value. Holds the vertical scale value. + * + * @name Phaser.GameObjects.Components.Transform#_scaleY + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _scaleY: 1, + + /** + * Private internal value. Holds the rotation value in radians. + * + * @name Phaser.GameObjects.Components.Transform#_rotation + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + _rotation: 0, + + /** + * The x position of this Game Object. + * + * @name Phaser.GameObjects.Components.Transform#x + * @type {number} + * @default 0 + * @since 3.0.0 + */ + x: 0, + + /** + * The y position of this Game Object. + * + * @name Phaser.GameObjects.Components.Transform#y + * @type {number} + * @default 0 + * @since 3.0.0 + */ + y: 0, + + /** + * The z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. + * + * @name Phaser.GameObjects.Components.Transform#z + * @type {number} + * @default 0 + * @since 3.0.0 + */ + z: 0, + + /** + * The w position of this Game Object. + * + * @name Phaser.GameObjects.Components.Transform#w + * @type {number} + * @default 0 + * @since 3.0.0 + */ + w: 0, + + /** + * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object + * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`. + * + * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this + * isn't the case, use the `scaleX` or `scaleY` properties instead. + * + * @name Phaser.GameObjects.Components.Transform#scale + * @type {number} + * @default 1 + * @since 3.18.0 + */ + scale: { + + get: function () + { + return (this._scaleX + this._scaleY) / 2; + }, + + set: function (value) + { + this._scaleX = value; + this._scaleY = value; + + if (value === 0) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The horizontal scale of this Game Object. + * + * @name Phaser.GameObjects.Components.Transform#scaleX + * @type {number} + * @default 1 + * @since 3.0.0 + */ + scaleX: { + + get: function () + { + return this._scaleX; + }, + + set: function (value) + { + this._scaleX = value; + + if (value === 0) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The vertical scale of this Game Object. + * + * @name Phaser.GameObjects.Components.Transform#scaleY + * @type {number} + * @default 1 + * @since 3.0.0 + */ + scaleY: { + + get: function () + { + return this._scaleY; + }, + + set: function (value) + { + this._scaleY = value; + + if (value === 0) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The angle of this Game Object as expressed in degrees. + * + * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left + * and -90 is up. + * + * If you prefer to work in radians, see the `rotation` property instead. + * + * @name Phaser.GameObjects.Components.Transform#angle + * @type {integer} + * @default 0 + * @since 3.0.0 + */ + angle: { + + get: function () + { + return WrapAngleDegrees(this._rotation * MATH_CONST.RAD_TO_DEG); + }, + + set: function (value) + { + // value is in degrees + this.rotation = WrapAngleDegrees(value) * MATH_CONST.DEG_TO_RAD; + } + }, + + /** + * The angle of this Game Object in radians. + * + * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left + * and -PI/2 is up. + * + * If you prefer to work in degrees, see the `angle` property instead. + * + * @name Phaser.GameObjects.Components.Transform#rotation + * @type {number} + * @default 1 + * @since 3.0.0 + */ + rotation: { + + get: function () + { + return this._rotation; + }, + + set: function (value) + { + // value is in radians + this._rotation = WrapAngle(value); + } + }, + + /** + * Sets the position of this Game Object. + * + * @method Phaser.GameObjects.Components.Transform#setPosition + * @since 3.0.0 + * + * @param {number} [x=0] - The x position of this Game Object. + * @param {number} [y=x] - The y position of this Game Object. If not set it will use the `x` value. + * @param {number} [z=0] - The z position of this Game Object. + * @param {number} [w=0] - The w position of this Game Object. + * + * @return {this} This Game Object instance. + */ + setPosition: function (x, y, z, w) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = x; } + if (z === undefined) { z = 0; } + if (w === undefined) { w = 0; } + + this.x = x; + this.y = y; + this.z = z; + this.w = w; + + return this; + }, + + /** + * Sets the position of this Game Object to be a random position within the confines of + * the given area. + * + * If no area is specified a random position between 0 x 0 and the game width x height is used instead. + * + * The position does not factor in the size of this Game Object, meaning that only the origin is + * guaranteed to be within the area. + * + * @method Phaser.GameObjects.Components.Transform#setRandomPosition + * @since 3.8.0 + * + * @param {number} [x=0] - The x position of the top-left of the random area. + * @param {number} [y=0] - The y position of the top-left of the random area. + * @param {number} [width] - The width of the random area. + * @param {number} [height] - The height of the random area. + * + * @return {this} This Game Object instance. + */ + setRandomPosition: function (x, y, width, height) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + if (width === undefined) { width = this.scene.sys.scale.width; } + if (height === undefined) { height = this.scene.sys.scale.height; } + + this.x = x + (Math.random() * width); + this.y = y + (Math.random() * height); + + return this; + }, + + /** + * Sets the rotation of this Game Object. + * + * @method Phaser.GameObjects.Components.Transform#setRotation + * @since 3.0.0 + * + * @param {number} [radians=0] - The rotation of this Game Object, in radians. + * + * @return {this} This Game Object instance. + */ + setRotation: function (radians) + { + if (radians === undefined) { radians = 0; } + + this.rotation = radians; + + return this; + }, + + /** + * Sets the angle of this Game Object. + * + * @method Phaser.GameObjects.Components.Transform#setAngle + * @since 3.0.0 + * + * @param {number} [degrees=0] - The rotation of this Game Object, in degrees. + * + * @return {this} This Game Object instance. + */ + setAngle: function (degrees) + { + if (degrees === undefined) { degrees = 0; } + + this.angle = degrees; + + return this; + }, + + /** + * Sets the scale of this Game Object. + * + * @method Phaser.GameObjects.Components.Transform#setScale + * @since 3.0.0 + * + * @param {number} x - 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. + */ + setScale: function (x, y) + { + if (x === undefined) { x = 1; } + if (y === undefined) { y = x; } + + this.scaleX = x; + this.scaleY = y; + + return this; + }, + + /** + * Sets the x position of this Game Object. + * + * @method Phaser.GameObjects.Components.Transform#setX + * @since 3.0.0 + * + * @param {number} [value=0] - The x position of this Game Object. + * + * @return {this} This Game Object instance. + */ + setX: function (value) + { + if (value === undefined) { value = 0; } + + this.x = value; + + return this; + }, + + /** + * Sets the y position of this Game Object. + * + * @method Phaser.GameObjects.Components.Transform#setY + * @since 3.0.0 + * + * @param {number} [value=0] - The y position of this Game Object. + * + * @return {this} This Game Object instance. + */ + setY: function (value) + { + if (value === undefined) { value = 0; } + + this.y = value; + + return this; + }, + + /** + * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. + * + * @method Phaser.GameObjects.Components.Transform#setZ + * @since 3.0.0 + * + * @param {number} [value=0] - The z position of this Game Object. + * + * @return {this} This Game Object instance. + */ + setZ: function (value) + { + if (value === undefined) { value = 0; } + + this.z = value; + + return this; + }, + + /** + * Sets the w position of this Game Object. + * + * @method Phaser.GameObjects.Components.Transform#setW + * @since 3.0.0 + * + * @param {number} [value=0] - The w position of this Game Object. + * + * @return {this} This Game Object instance. + */ + setW: function (value) + { + if (value === undefined) { value = 0; } + + this.w = value; + + return this; + }, + + /** + * Gets the local transform matrix for this Game Object. + * + * @method Phaser.GameObjects.Components.Transform#getLocalTransformMatrix + * @since 3.4.0 + * + * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object. + * + * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix. + */ + getLocalTransformMatrix: function (tempMatrix) + { + if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); } + + return tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY); + }, + + /** + * Gets the world transform matrix for this Game Object, factoring in any parent Containers. + * + * @method Phaser.GameObjects.Components.Transform#getWorldTransformMatrix + * @since 3.4.0 + * + * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object. + * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A temporary matrix to hold parent values during the calculations. + * + * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix. + */ + getWorldTransformMatrix: function (tempMatrix, parentMatrix) + { + if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); } + if (parentMatrix === undefined) { parentMatrix = new TransformMatrix(); } + + var parent = this.parentContainer; + + if (!parent) + { + return this.getLocalTransformMatrix(tempMatrix); + } + + tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY); + + while (parent) + { + parentMatrix.applyITRS(parent.x, parent.y, parent._rotation, parent._scaleX, parent._scaleY); + + parentMatrix.multiply(tempMatrix, tempMatrix); + + parent = parent.parentContainer; + } + + return tempMatrix; + }, + + /** + * Takes the given `x` and `y` coordinates and converts them into local space for this + * Game Object, taking into account parent and local transforms, and the Display Origin. + * + * The returned Vector2 contains the translated point in its properties. + * + * A Camera needs to be provided in order to handle modified scroll factors. If no + * camera is specified, it will use the `main` camera from the Scene to which this + * Game Object belongs. + * + * @method Phaser.GameObjects.Components.Transform#getLocalPoint + * @since 3.50.0 + * + * @param {number} x - The x position to translate. + * @param {number} y - The y position to translate. + * @param {Phaser.Math.Vector2} [point] - A Vector2, or point-like object, to store the results in. + * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera which is being tested against. If not given will use the Scene default camera. + * + * @return {Phaser.Math.Vector2} The translated point. + */ + getLocalPoint: function (x, y, point, camera) + { + if (!point) { point = new Vector2(); } + if (!camera) { camera = this.scene.sys.cameras.main; } + + var csx = camera.scrollX; + var csy = camera.scrollY; + + var px = x + (csx * this.scrollFactorX) - csx; + var py = y + (csy * this.scrollFactorY) - csy; + + if (this.parentContainer) + { + this.getWorldTransformMatrix().applyInverse(px, py, point); + } + else + { + TransformXY(px, py, this.x, this.y, this.rotation, this.scaleX, this.scaleY, point); + } + + // Normalize origin + if (this._originComponent) + { + point.x += this._displayOriginX; + point.y += this._displayOriginY; + } + + return point; + }, + + /** + * Gets the sum total rotation of all of this Game Objects parent Containers. + * + * The returned value is in radians and will be zero if this Game Object has no parent container. + * + * @method Phaser.GameObjects.Components.Transform#getParentRotation + * @since 3.18.0 + * + * @return {number} The sum total rotation, in radians, of all parent containers of this Game Object. + */ + getParentRotation: function () + { + var rotation = 0; + + var parent = this.parentContainer; + + while (parent) + { + rotation += parent.rotation; + + parent = parent.parentContainer; + } + + return rotation; + } + +}; + +module.exports = Transform; + + +/***/ }), +/* 51 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var MATH_CONST = __webpack_require__(2); +var Vector2 = __webpack_require__(1); + +/** + * @classdesc + * A Matrix used for display transformations for rendering. + * + * It is represented like so: + * + * ``` + * | a | c | tx | + * | b | d | ty | + * | 0 | 0 | 1 | + * ``` + * + * @class TransformMatrix + * @memberof Phaser.GameObjects.Components + * @constructor + * @since 3.0.0 + * + * @param {number} [a=1] - The Scale X value. + * @param {number} [b=0] - The Skew Y value. + * @param {number} [c=0] - The Skew X value. + * @param {number} [d=1] - The Scale Y value. + * @param {number} [tx=0] - The Translate X value. + * @param {number} [ty=0] - The Translate Y value. + */ +var TransformMatrix = new Class({ + + initialize: + + function TransformMatrix (a, b, c, d, tx, ty) + { + if (a === undefined) { a = 1; } + if (b === undefined) { b = 0; } + if (c === undefined) { c = 0; } + if (d === undefined) { d = 1; } + if (tx === undefined) { tx = 0; } + if (ty === undefined) { ty = 0; } + + /** + * The matrix values. + * + * @name Phaser.GameObjects.Components.TransformMatrix#matrix + * @type {Float32Array} + * @since 3.0.0 + */ + this.matrix = new Float32Array([ a, b, c, d, tx, ty, 0, 0, 1 ]); + + /** + * The decomposed matrix. + * + * @name Phaser.GameObjects.Components.TransformMatrix#decomposedMatrix + * @type {object} + * @since 3.0.0 + */ + this.decomposedMatrix = { + translateX: 0, + translateY: 0, + scaleX: 1, + scaleY: 1, + rotation: 0 + }; + }, + + /** + * The Scale X value. + * + * @name Phaser.GameObjects.Components.TransformMatrix#a + * @type {number} + * @since 3.4.0 + */ + a: { + + get: function () + { + return this.matrix[0]; + }, + + set: function (value) + { + this.matrix[0] = value; + } + + }, + + /** + * The Skew Y value. + * + * @name Phaser.GameObjects.Components.TransformMatrix#b + * @type {number} + * @since 3.4.0 + */ + b: { + + get: function () + { + return this.matrix[1]; + }, + + set: function (value) + { + this.matrix[1] = value; + } + + }, + + /** + * The Skew X value. + * + * @name Phaser.GameObjects.Components.TransformMatrix#c + * @type {number} + * @since 3.4.0 + */ + c: { + + get: function () + { + return this.matrix[2]; + }, + + set: function (value) + { + this.matrix[2] = value; + } + + }, + + /** + * The Scale Y value. + * + * @name Phaser.GameObjects.Components.TransformMatrix#d + * @type {number} + * @since 3.4.0 + */ + d: { + + get: function () + { + return this.matrix[3]; + }, + + set: function (value) + { + this.matrix[3] = value; + } + + }, + + /** + * The Translate X value. + * + * @name Phaser.GameObjects.Components.TransformMatrix#e + * @type {number} + * @since 3.11.0 + */ + e: { + + get: function () + { + return this.matrix[4]; + }, + + set: function (value) + { + this.matrix[4] = value; + } + + }, + + /** + * The Translate Y value. + * + * @name Phaser.GameObjects.Components.TransformMatrix#f + * @type {number} + * @since 3.11.0 + */ + f: { + + get: function () + { + return this.matrix[5]; + }, + + set: function (value) + { + this.matrix[5] = value; + } + + }, + + /** + * The Translate X value. + * + * @name Phaser.GameObjects.Components.TransformMatrix#tx + * @type {number} + * @since 3.4.0 + */ + tx: { + + get: function () + { + return this.matrix[4]; + }, + + set: function (value) + { + this.matrix[4] = value; + } + + }, + + /** + * The Translate Y value. + * + * @name Phaser.GameObjects.Components.TransformMatrix#ty + * @type {number} + * @since 3.4.0 + */ + ty: { + + get: function () + { + return this.matrix[5]; + }, + + set: function (value) + { + this.matrix[5] = value; + } + + }, + + /** + * The rotation of the Matrix. Value is in radians. + * + * @name Phaser.GameObjects.Components.TransformMatrix#rotation + * @type {number} + * @readonly + * @since 3.4.0 + */ + rotation: { + + get: function () + { + return Math.acos(this.a / this.scaleX) * ((Math.atan(-this.c / this.a) < 0) ? -1 : 1); + } + + }, + + /** + * The rotation of the Matrix, normalized to be within the Phaser right-handed + * clockwise rotation space. Value is in radians. + * + * @name Phaser.GameObjects.Components.TransformMatrix#rotationNormalized + * @type {number} + * @readonly + * @since 3.19.0 + */ + rotationNormalized: { + + get: function () + { + var matrix = this.matrix; + + var a = matrix[0]; + var b = matrix[1]; + var c = matrix[2]; + var d = matrix[3]; + + if (a || b) + { + // var r = Math.sqrt(a * a + b * b); + + return (b > 0) ? Math.acos(a / this.scaleX) : -Math.acos(a / this.scaleX); + } + else if (c || d) + { + // var s = Math.sqrt(c * c + d * d); + + return MATH_CONST.TAU - ((d > 0) ? Math.acos(-c / this.scaleY) : -Math.acos(c / this.scaleY)); + } + else + { + return 0; + } + } + + }, + + /** + * The decomposed horizontal scale of the Matrix. This value is always positive. + * + * @name Phaser.GameObjects.Components.TransformMatrix#scaleX + * @type {number} + * @readonly + * @since 3.4.0 + */ + scaleX: { + + get: function () + { + return Math.sqrt((this.a * this.a) + (this.b * this.b)); + } + + }, + + /** + * The decomposed vertical scale of the Matrix. This value is always positive. + * + * @name Phaser.GameObjects.Components.TransformMatrix#scaleY + * @type {number} + * @readonly + * @since 3.4.0 + */ + scaleY: { + + get: function () + { + return Math.sqrt((this.c * this.c) + (this.d * this.d)); + } + + }, + + /** + * Reset the Matrix to an identity matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#loadIdentity + * @since 3.0.0 + * + * @return {this} This TransformMatrix. + */ + loadIdentity: function () + { + var matrix = this.matrix; + + matrix[0] = 1; + matrix[1] = 0; + matrix[2] = 0; + matrix[3] = 1; + matrix[4] = 0; + matrix[5] = 0; + + return this; + }, + + /** + * Translate the Matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#translate + * @since 3.0.0 + * + * @param {number} x - The horizontal translation value. + * @param {number} y - The vertical translation value. + * + * @return {this} This TransformMatrix. + */ + translate: function (x, y) + { + var matrix = this.matrix; + + matrix[4] = matrix[0] * x + matrix[2] * y + matrix[4]; + matrix[5] = matrix[1] * x + matrix[3] * y + matrix[5]; + + return this; + }, + + /** + * Scale the Matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#scale + * @since 3.0.0 + * + * @param {number} x - The horizontal scale value. + * @param {number} y - The vertical scale value. + * + * @return {this} This TransformMatrix. + */ + scale: function (x, y) + { + var matrix = this.matrix; + + matrix[0] *= x; + matrix[1] *= x; + matrix[2] *= y; + matrix[3] *= y; + + return this; + }, + + /** + * Rotate the Matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#rotate + * @since 3.0.0 + * + * @param {number} angle - The angle of rotation in radians. + * + * @return {this} This TransformMatrix. + */ + rotate: function (angle) + { + var sin = Math.sin(angle); + var cos = Math.cos(angle); + + var matrix = this.matrix; + + var a = matrix[0]; + var b = matrix[1]; + var c = matrix[2]; + var d = matrix[3]; + + matrix[0] = a * cos + c * sin; + matrix[1] = b * cos + d * sin; + matrix[2] = a * -sin + c * cos; + matrix[3] = b * -sin + d * cos; + + return this; + }, + + /** + * Multiply this Matrix by the given Matrix. + * + * If an `out` Matrix is given then the results will be stored in it. + * If it is not given, this matrix will be updated in place instead. + * Use an `out` Matrix if you do not wish to mutate this matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#multiply + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by. + * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in. + * + * @return {(this|Phaser.GameObjects.Components.TransformMatrix)} Either this TransformMatrix, or the `out` Matrix, if given in the arguments. + */ + multiply: function (rhs, out) + { + var matrix = this.matrix; + var source = rhs.matrix; + + var localA = matrix[0]; + var localB = matrix[1]; + var localC = matrix[2]; + var localD = matrix[3]; + var localE = matrix[4]; + var localF = matrix[5]; + + var sourceA = source[0]; + var sourceB = source[1]; + var sourceC = source[2]; + var sourceD = source[3]; + var sourceE = source[4]; + var sourceF = source[5]; + + var destinationMatrix = (out === undefined) ? this : out; + + destinationMatrix.a = (sourceA * localA) + (sourceB * localC); + destinationMatrix.b = (sourceA * localB) + (sourceB * localD); + destinationMatrix.c = (sourceC * localA) + (sourceD * localC); + destinationMatrix.d = (sourceC * localB) + (sourceD * localD); + destinationMatrix.e = (sourceE * localA) + (sourceF * localC) + localE; + destinationMatrix.f = (sourceE * localB) + (sourceF * localD) + localF; + + return destinationMatrix; + }, + + /** + * Multiply this Matrix by the matrix given, including the offset. + * + * The offsetX is added to the tx value: `offsetX * a + offsetY * c + tx`. + * The offsetY is added to the ty value: `offsetY * b + offsetY * d + ty`. + * + * @method Phaser.GameObjects.Components.TransformMatrix#multiplyWithOffset + * @since 3.11.0 + * + * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from. + * @param {number} offsetX - Horizontal offset to factor in to the multiplication. + * @param {number} offsetY - Vertical offset to factor in to the multiplication. + * + * @return {this} This TransformMatrix. + */ + multiplyWithOffset: function (src, offsetX, offsetY) + { + var matrix = this.matrix; + var otherMatrix = src.matrix; + + var a0 = matrix[0]; + var b0 = matrix[1]; + var c0 = matrix[2]; + var d0 = matrix[3]; + var tx0 = matrix[4]; + var ty0 = matrix[5]; + + var pse = offsetX * a0 + offsetY * c0 + tx0; + var psf = offsetX * b0 + offsetY * d0 + ty0; + + var a1 = otherMatrix[0]; + var b1 = otherMatrix[1]; + var c1 = otherMatrix[2]; + var d1 = otherMatrix[3]; + var tx1 = otherMatrix[4]; + var ty1 = otherMatrix[5]; + + matrix[0] = a1 * a0 + b1 * c0; + matrix[1] = a1 * b0 + b1 * d0; + matrix[2] = c1 * a0 + d1 * c0; + matrix[3] = c1 * b0 + d1 * d0; + matrix[4] = tx1 * a0 + ty1 * c0 + pse; + matrix[5] = tx1 * b0 + ty1 * d0 + psf; + + return this; + }, + + /** + * Transform the Matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#transform + * @since 3.0.0 + * + * @param {number} a - The Scale X value. + * @param {number} b - The Shear Y value. + * @param {number} c - The Shear X value. + * @param {number} d - The Scale Y value. + * @param {number} tx - The Translate X value. + * @param {number} ty - The Translate Y value. + * + * @return {this} This TransformMatrix. + */ + transform: function (a, b, c, d, tx, ty) + { + var matrix = this.matrix; + + var a0 = matrix[0]; + var b0 = matrix[1]; + var c0 = matrix[2]; + var d0 = matrix[3]; + var tx0 = matrix[4]; + var ty0 = matrix[5]; + + matrix[0] = a * a0 + b * c0; + matrix[1] = a * b0 + b * d0; + matrix[2] = c * a0 + d * c0; + matrix[3] = c * b0 + d * d0; + matrix[4] = tx * a0 + ty * c0 + tx0; + matrix[5] = tx * b0 + ty * d0 + ty0; + + return this; + }, + + /** + * Transform a point using this Matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#transformPoint + * @since 3.0.0 + * + * @param {number} x - The x coordinate of the point to transform. + * @param {number} y - The y coordinate of the point to transform. + * @param {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} point - The Point object to store the transformed coordinates. + * + * @return {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} The Point containing the transformed coordinates. + */ + transformPoint: function (x, y, point) + { + if (point === undefined) { point = { x: 0, y: 0 }; } + + var matrix = this.matrix; + + var a = matrix[0]; + var b = matrix[1]; + var c = matrix[2]; + var d = matrix[3]; + var tx = matrix[4]; + var ty = matrix[5]; + + point.x = x * a + y * c + tx; + point.y = x * b + y * d + ty; + + return point; + }, + + /** + * Invert the Matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#invert + * @since 3.0.0 + * + * @return {this} This TransformMatrix. + */ + invert: function () + { + var matrix = this.matrix; + + var a = matrix[0]; + var b = matrix[1]; + var c = matrix[2]; + var d = matrix[3]; + var tx = matrix[4]; + var ty = matrix[5]; + + var n = a * d - b * c; + + matrix[0] = d / n; + matrix[1] = -b / n; + matrix[2] = -c / n; + matrix[3] = a / n; + matrix[4] = (c * ty - d * tx) / n; + matrix[5] = -(a * ty - b * tx) / n; + + return this; + }, + + /** + * Set the values of this Matrix to copy those of the matrix given. + * + * @method Phaser.GameObjects.Components.TransformMatrix#copyFrom + * @since 3.11.0 + * + * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from. + * + * @return {this} This TransformMatrix. + */ + copyFrom: function (src) + { + var matrix = this.matrix; + + matrix[0] = src.a; + matrix[1] = src.b; + matrix[2] = src.c; + matrix[3] = src.d; + matrix[4] = src.e; + matrix[5] = src.f; + + return this; + }, + + /** + * Set the values of this Matrix to copy those of the array given. + * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f. + * + * @method Phaser.GameObjects.Components.TransformMatrix#copyFromArray + * @since 3.11.0 + * + * @param {array} src - The array of values to set into this matrix. + * + * @return {this} This TransformMatrix. + */ + copyFromArray: function (src) + { + var matrix = this.matrix; + + matrix[0] = src[0]; + matrix[1] = src[1]; + matrix[2] = src[2]; + matrix[3] = src[3]; + matrix[4] = src[4]; + matrix[5] = src[5]; + + return this; + }, + + /** + * Copy the values from this Matrix to the given Canvas Rendering Context. + * This will use the Context.transform method. + * + * @method Phaser.GameObjects.Components.TransformMatrix#copyToContext + * @since 3.12.0 + * + * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to. + * + * @return {CanvasRenderingContext2D} The Canvas Rendering Context. + */ + copyToContext: function (ctx) + { + var matrix = this.matrix; + + ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); + + return ctx; + }, + + /** + * Copy the values from this Matrix to the given Canvas Rendering Context. + * This will use the Context.setTransform method. + * + * @method Phaser.GameObjects.Components.TransformMatrix#setToContext + * @since 3.12.0 + * + * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to. + * + * @return {CanvasRenderingContext2D} The Canvas Rendering Context. + */ + setToContext: function (ctx) + { + var matrix = this.matrix; + + ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); + + return ctx; + }, + + /** + * Copy the values in this Matrix to the array given. + * + * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f. + * + * @method Phaser.GameObjects.Components.TransformMatrix#copyToArray + * @since 3.12.0 + * + * @param {array} [out] - The array to copy the matrix values in to. + * + * @return {array} An array where elements 0 to 5 contain the values from this matrix. + */ + copyToArray: function (out) + { + var matrix = this.matrix; + + if (out === undefined) + { + out = [ matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5] ]; + } + else + { + out[0] = matrix[0]; + out[1] = matrix[1]; + out[2] = matrix[2]; + out[3] = matrix[3]; + out[4] = matrix[4]; + out[5] = matrix[5]; + } + + return out; + }, + + /** + * Set the values of this Matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#setTransform + * @since 3.0.0 + * + * @param {number} a - The Scale X value. + * @param {number} b - The Shear Y value. + * @param {number} c - The Shear X value. + * @param {number} d - The Scale Y value. + * @param {number} tx - The Translate X value. + * @param {number} ty - The Translate Y value. + * + * @return {this} This TransformMatrix. + */ + setTransform: function (a, b, c, d, tx, ty) + { + var matrix = this.matrix; + + matrix[0] = a; + matrix[1] = b; + matrix[2] = c; + matrix[3] = d; + matrix[4] = tx; + matrix[5] = ty; + + return this; + }, + + /** + * Decompose this Matrix into its translation, scale and rotation values using QR decomposition. + * + * The result must be applied in the following order to reproduce the current matrix: + * + * translate -> rotate -> scale + * + * @method Phaser.GameObjects.Components.TransformMatrix#decomposeMatrix + * @since 3.0.0 + * + * @return {object} The decomposed Matrix. + */ + decomposeMatrix: function () + { + var decomposedMatrix = this.decomposedMatrix; + + var matrix = this.matrix; + + // a = scale X (1) + // b = shear Y (0) + // c = shear X (0) + // d = scale Y (1) + + var a = matrix[0]; + var b = matrix[1]; + var c = matrix[2]; + var d = matrix[3]; + + var determ = a * d - b * c; + + decomposedMatrix.translateX = matrix[4]; + decomposedMatrix.translateY = matrix[5]; + + if (a || b) + { + var r = Math.sqrt(a * a + b * b); + + decomposedMatrix.rotation = (b > 0) ? Math.acos(a / r) : -Math.acos(a / r); + decomposedMatrix.scaleX = r; + decomposedMatrix.scaleY = determ / r; + } + else if (c || d) + { + var s = Math.sqrt(c * c + d * d); + + decomposedMatrix.rotation = Math.PI * 0.5 - (d > 0 ? Math.acos(-c / s) : -Math.acos(c / s)); + decomposedMatrix.scaleX = determ / s; + decomposedMatrix.scaleY = s; + } + else + { + decomposedMatrix.rotation = 0; + decomposedMatrix.scaleX = 0; + decomposedMatrix.scaleY = 0; + } + + return decomposedMatrix; + }, + + /** + * Apply the identity, translate, rotate and scale operations on the Matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#applyITRS + * @since 3.0.0 + * + * @param {number} x - The horizontal translation. + * @param {number} y - The vertical translation. + * @param {number} rotation - The angle of rotation in radians. + * @param {number} scaleX - The horizontal scale. + * @param {number} scaleY - The vertical scale. + * + * @return {this} This TransformMatrix. + */ + applyITRS: function (x, y, rotation, scaleX, scaleY) + { + var matrix = this.matrix; + + var radianSin = Math.sin(rotation); + var radianCos = Math.cos(rotation); + + // Translate + matrix[4] = x; + matrix[5] = y; + + // Rotate and Scale + matrix[0] = radianCos * scaleX; + matrix[1] = radianSin * scaleX; + matrix[2] = -radianSin * scaleY; + matrix[3] = radianCos * scaleY; + + return this; + }, + + /** + * Takes the `x` and `y` values and returns a new position in the `output` vector that is the inverse of + * the current matrix with its transformation applied. + * + * Can be used to translate points from world to local space. + * + * @method Phaser.GameObjects.Components.TransformMatrix#applyInverse + * @since 3.12.0 + * + * @param {number} x - The x position to translate. + * @param {number} y - The y position to translate. + * @param {Phaser.Math.Vector2} [output] - A Vector2, or point-like object, to store the results in. + * + * @return {Phaser.Math.Vector2} The coordinates, inverse-transformed through this matrix. + */ + applyInverse: function (x, y, output) + { + if (output === undefined) { output = new Vector2(); } + + var matrix = this.matrix; + + var a = matrix[0]; + var b = matrix[1]; + var c = matrix[2]; + var d = matrix[3]; + var tx = matrix[4]; + var ty = matrix[5]; + + var id = 1 / ((a * d) + (c * -b)); + + output.x = (d * id * x) + (-c * id * y) + (((ty * c) - (tx * d)) * id); + output.y = (a * id * y) + (-b * id * x) + (((-ty * a) + (tx * b)) * id); + + return output; + }, + + /** + * Returns the X component of this matrix multiplied by the given values. + * This is the same as `x * a + y * c + e`. + * + * @method Phaser.GameObjects.Components.TransformMatrix#getX + * @since 3.12.0 + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * + * @return {number} The calculated x value. + */ + getX: function (x, y) + { + return x * this.a + y * this.c + this.e; + }, + + /** + * Returns the Y component of this matrix multiplied by the given values. + * This is the same as `x * b + y * d + f`. + * + * @method Phaser.GameObjects.Components.TransformMatrix#getY + * @since 3.12.0 + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * + * @return {number} The calculated y value. + */ + getY: function (x, y) + { + return x * this.b + y * this.d + this.f; + }, + + /** + * Returns the X component of this matrix multiplied by the given values. + * + * This is the same as `x * a + y * c + e`, optionally passing via `Math.round`. + * + * @method Phaser.GameObjects.Components.TransformMatrix#getXRound + * @since 3.50.0 + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * @param {boolean} [round=false] - Math.round the resulting value? + * + * @return {number} The calculated x value. + */ + getXRound: function (x, y, round) + { + var v = this.getX(x, y); + + if (round) + { + v = Math.round(v); + } + + return v; + }, + + /** + * Returns the Y component of this matrix multiplied by the given values. + * + * This is the same as `x * b + y * d + f`, optionally passing via `Math.round`. + * + * @method Phaser.GameObjects.Components.TransformMatrix#getYRound + * @since 3.50.0 + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * @param {boolean} [round=false] - Math.round the resulting value? + * + * @return {number} The calculated y value. + */ + getYRound: function (x, y, round) + { + var v = this.getY(x, y); + + if (round) + { + v = Math.round(v); + } + + return v; + }, + + /** + * Returns a string that can be used in a CSS Transform call as a `matrix` property. + * + * @method Phaser.GameObjects.Components.TransformMatrix#getCSSMatrix + * @since 3.12.0 + * + * @return {string} A string containing the CSS Transform matrix values. + */ + getCSSMatrix: function () + { + var m = this.matrix; + + return 'matrix(' + m[0] + ',' + m[1] + ',' + m[2] + ',' + m[3] + ',' + m[4] + ',' + m[5] + ')'; + }, + + /** + * Destroys this Transform Matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#destroy + * @since 3.4.0 + */ + destroy: function () + { + this.matrix = null; + this.decomposedMatrix = null; + } + +}); + +module.exports = TransformMatrix; + + +/***/ }), +/* 52 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// bitmask flag for GameObject.renderMask +var _FLAG = 1; // 0001 + +/** + * Provides methods used for setting the visibility of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.Visible + * @since 3.0.0 + */ + +var Visible = { + + /** + * Private internal value. Holds the visible value. + * + * @name Phaser.GameObjects.Components.Visible#_visible + * @type {boolean} + * @private + * @default true + * @since 3.0.0 + */ + _visible: true, + + /** + * The visible state of the Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * + * @name Phaser.GameObjects.Components.Visible#visible + * @type {boolean} + * @since 3.0.0 + */ + visible: { + + get: function () + { + return this._visible; + }, + + set: function (value) + { + if (value) + { + this._visible = true; + this.renderFlags |= _FLAG; + } + else + { + this._visible = false; + this.renderFlags &= ~_FLAG; + } + } + + }, + + /** + * Sets the visibility of this Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * + * @method Phaser.GameObjects.Components.Visible#setVisible + * @since 3.0.0 + * + * @param {boolean} value - The visible state of the Game Object. + * + * @return {this} This Game Object instance. + */ + setVisible: function (value) + { + this.visible = value; + + return this; + } +}; + +module.exports = Visible; + + +/***/ }), +/* 53 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var ComponentsToJSON = __webpack_require__(54); +var DataManager = __webpack_require__(219); +var EventEmitter = __webpack_require__(55); +var Events = __webpack_require__(22); + +/** + * @classdesc + * The base class that all Game Objects extend. + * You don't create GameObjects directly and they cannot be added to the display list. + * Instead, use them as the base for your own custom classes. + * + * @class GameObject + * @memberof Phaser.GameObjects + * @extends Phaser.Events.EventEmitter + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. + * @param {string} type - A textual representation of the type of Game Object, i.e. `sprite`. + */ +var GameObject = new Class({ + + Extends: EventEmitter, + + initialize: + + function GameObject (scene, type) + { + EventEmitter.call(this); + + /** + * The Scene to which this Game Object belongs. + * Game Objects can only belong to one Scene. + * + * @name Phaser.GameObjects.GameObject#scene + * @type {Phaser.Scene} + * @protected + * @since 3.0.0 + */ + this.scene = scene; + + /** + * A textual representation of this Game Object, i.e. `sprite`. + * Used internally by Phaser but is available for your own custom classes to populate. + * + * @name Phaser.GameObjects.GameObject#type + * @type {string} + * @since 3.0.0 + */ + this.type = type; + + /** + * The current state of this Game Object. + * + * Phaser itself will never modify this value, although plugins may do so. + * + * Use this property to track the state of a Game Object during its lifetime. For example, it could change from + * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant + * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons. + * If you need to store complex data about your Game Object, look at using the Data Component instead. + * + * @name Phaser.GameObjects.GameObject#state + * @type {(integer|string)} + * @since 3.16.0 + */ + this.state = 0; + + /** + * The parent Container of this Game Object, if it has one. + * + * @name Phaser.GameObjects.GameObject#parentContainer + * @type {Phaser.GameObjects.Container} + * @since 3.4.0 + */ + this.parentContainer = null; + + /** + * The name of this Game Object. + * Empty by default and never populated by Phaser, this is left for developers to use. + * + * @name Phaser.GameObjects.GameObject#name + * @type {string} + * @default '' + * @since 3.0.0 + */ + this.name = ''; + + /** + * The active state of this Game Object. + * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it. + * An active object is one which is having its logic and internal systems updated. + * + * @name Phaser.GameObjects.GameObject#active + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.active = true; + + /** + * The Tab Index of the Game Object. + * Reserved for future use by plugins and the Input Manager. + * + * @name Phaser.GameObjects.GameObject#tabIndex + * @type {integer} + * @default -1 + * @since 3.0.0 + */ + this.tabIndex = -1; + + /** + * A Data Manager. + * It allows you to store, query and get key/value paired information specific to this Game Object. + * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`. + * + * @name Phaser.GameObjects.GameObject#data + * @type {Phaser.Data.DataManager} + * @default null + * @since 3.0.0 + */ + this.data = null; + + /** + * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not. + * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively. + * If those components are not used by your custom class then you can use this bitmask as you wish. + * + * @name Phaser.GameObjects.GameObject#renderFlags + * @type {integer} + * @default 15 + * @since 3.0.0 + */ + this.renderFlags = 15; + + /** + * A bitmask that controls if this Game Object is drawn by a Camera or not. + * Not usually set directly, instead call `Camera.ignore`, however you can + * set this property directly using the Camera.id property: + * + * @example + * this.cameraFilter |= camera.id + * + * @name Phaser.GameObjects.GameObject#cameraFilter + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.cameraFilter = 0; + + /** + * If this Game Object is enabled for input then this property will contain an InteractiveObject instance. + * Not usually set directly. Instead call `GameObject.setInteractive()`. + * + * @name Phaser.GameObjects.GameObject#input + * @type {?Phaser.Types.Input.InteractiveObject} + * @default null + * @since 3.0.0 + */ + this.input = null; + + /** + * If this Game Object is enabled for Arcade or Matter Physics then this property will contain a reference to a Physics Body. + * + * @name Phaser.GameObjects.GameObject#body + * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|MatterJS.BodyType)} + * @default null + * @since 3.0.0 + */ + this.body = null; + + /** + * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`. + * This includes calls that may come from a Group, Container or the Scene itself. + * While it allows you to persist a Game Object across Scenes, please understand you are entirely + * responsible for managing references to and from this Game Object. + * + * @name Phaser.GameObjects.GameObject#ignoreDestroy + * @type {boolean} + * @default false + * @since 3.5.0 + */ + this.ignoreDestroy = false; + + // Tell the Scene to re-sort the children + scene.sys.queueDepthSort(); + }, + + /** + * Sets the `active` property of this Game Object and returns this Game Object for further chaining. + * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList. + * + * @method Phaser.GameObjects.GameObject#setActive + * @since 3.0.0 + * + * @param {boolean} value - True if this Game Object should be set as active, false if not. + * + * @return {this} This GameObject. + */ + setActive: function (value) + { + this.active = value; + + return this; + }, + + /** + * Sets the `name` property of this Game Object and returns this Game Object for further chaining. + * The `name` property is not populated by Phaser and is presented for your own use. + * + * @method Phaser.GameObjects.GameObject#setName + * @since 3.0.0 + * + * @param {string} value - The name to be given to this Game Object. + * + * @return {this} This GameObject. + */ + setName: function (value) + { + this.name = value; + + return this; + }, + + /** + * Sets the current state of this Game Object. + * + * Phaser itself will never modify the State of a Game Object, although plugins may do so. + * + * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'. + * The state value should typically be an integer (ideally mapped to a constant + * in your game code), but could also be a string. It is recommended to keep it light and simple. + * If you need to store complex data about your Game Object, look at using the Data Component instead. + * + * @method Phaser.GameObjects.GameObject#setState + * @since 3.16.0 + * + * @param {(integer|string)} value - The state of the Game Object. + * + * @return {this} This GameObject. + */ + setState: function (value) + { + this.state = value; + + return this; + }, + + /** + * Adds a Data Manager component to this Game Object. + * + * @method Phaser.GameObjects.GameObject#setDataEnabled + * @since 3.0.0 + * @see Phaser.Data.DataManager + * + * @return {this} This GameObject. + */ + setDataEnabled: function () + { + if (!this.data) + { + this.data = new DataManager(this); + } + + return this; + }, + + /** + * Allows you to store a key value pair within this Game Objects Data Manager. + * + * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled + * before setting the value. + * + * If the key doesn't already exist in the Data Manager then it is created. + * + * ```javascript + * sprite.setData('name', 'Red Gem Stone'); + * ``` + * + * You can also pass in an object of key value pairs as the first argument: + * + * ```javascript + * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 }); + * ``` + * + * To get a value back again you can call `getData`: + * + * ```javascript + * sprite.getData('gold'); + * ``` + * + * Or you can access the value directly via the `values` property, where it works like any other variable: + * + * ```javascript + * sprite.data.values.gold += 50; + * ``` + * + * When the value is first set, a `setdata` event is emitted from this Game Object. + * + * If the key already exists, a `changedata` event is emitted instead, along an event named after the key. + * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`. + * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter. + * + * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings. + * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager. + * + * @method Phaser.GameObjects.GameObject#setData + * @since 3.0.0 + * + * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored. + * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored. + * + * @return {this} This GameObject. + */ + setData: function (key, value) + { + if (!this.data) + { + this.data = new DataManager(this); + } + + this.data.set(key, value); + + return this; + }, + + /** + * Increase a value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is increased from 0. + * + * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled + * before setting the value. + * + * If the key doesn't already exist in the Data Manager then it is created. + * + * When the value is first set, a `setdata` event is emitted from this Game Object. + * + * @method Phaser.GameObjects.GameObject#incData + * @since 3.23.0 + * + * @param {(string|object)} key - The key to increase the value for. + * @param {*} [data] - The value to increase for the given key. + * + * @return {this} This GameObject. + */ + incData: function (key, value) + { + if (!this.data) + { + this.data = new DataManager(this); + } + + this.data.inc(key, value); + + return this; + }, + + /** + * Toggle a boolean value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is toggled from false. + * + * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled + * before setting the value. + * + * If the key doesn't already exist in the Data Manager then it is created. + * + * When the value is first set, a `setdata` event is emitted from this Game Object. + * + * @method Phaser.GameObjects.GameObject#toggleData + * @since 3.23.0 + * + * @param {(string|object)} key - The key to toggle the value for. + * + * @return {this} This GameObject. + */ + toggleData: function (key) + { + if (!this.data) + { + this.data = new DataManager(this); + } + + this.data.toggle(key); + + return this; + }, + + /** + * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist. + * + * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either: + * + * ```javascript + * sprite.getData('gold'); + * ``` + * + * Or access the value directly: + * + * ```javascript + * sprite.data.values.gold; + * ``` + * + * You can also pass in an array of keys, in which case an array of values will be returned: + * + * ```javascript + * sprite.getData([ 'gold', 'armor', 'health' ]); + * ``` + * + * This approach is useful for destructuring arrays in ES6. + * + * @method Phaser.GameObjects.GameObject#getData + * @since 3.0.0 + * + * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys. + * + * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array. + */ + getData: function (key) + { + if (!this.data) + { + this.data = new DataManager(this); + } + + return this.data.get(key); + }, + + /** + * Pass this Game Object to the Input Manager to enable it for Input. + * + * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area + * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced + * input detection. + * + * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If + * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific + * shape for it to use. + * + * You can also provide an Input Configuration Object as the only argument to this method. + * + * @example + * sprite.setInteractive(); + * + * @example + * sprite.setInteractive(new Phaser.Geom.Circle(45, 46, 45), Phaser.Geom.Circle.Contains); + * + * @example + * graphics.setInteractive(new Phaser.Geom.Rectangle(0, 0, 128, 128), Phaser.Geom.Rectangle.Contains); + * + * @method Phaser.GameObjects.GameObject#setInteractive + * @since 3.0.0 + * + * @param {(Phaser.Types.Input.InputConfiguration|any)} [hitArea] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not given it will try to create a Rectangle based on the texture frame. + * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The callback that determines if the pointer is within the Hit Area shape or not. If you provide a shape you must also provide a callback. + * @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target? + * + * @return {this} This GameObject. + */ + setInteractive: function (hitArea, hitAreaCallback, dropZone) + { + this.scene.sys.input.enable(this, hitArea, hitAreaCallback, dropZone); + + return this; + }, + + /** + * If this Game Object has previously been enabled for input, this will disable it. + * + * An object that is disabled for input stops processing or being considered for + * input events, but can be turned back on again at any time by simply calling + * `setInteractive()` with no arguments provided. + * + * If want to completely remove interaction from this Game Object then use `removeInteractive` instead. + * + * @method Phaser.GameObjects.GameObject#disableInteractive + * @since 3.7.0 + * + * @return {this} This GameObject. + */ + disableInteractive: function () + { + if (this.input) + { + this.input.enabled = false; + } + + return this; + }, + + /** + * If this Game Object has previously been enabled for input, this will queue it + * for removal, causing it to no longer be interactive. The removal happens on + * the next game step, it is not immediate. + * + * The Interactive Object that was assigned to this Game Object will be destroyed, + * removed from the Input Manager and cleared from this Game Object. + * + * If you wish to re-enable this Game Object at a later date you will need to + * re-create its InteractiveObject by calling `setInteractive` again. + * + * If you wish to only temporarily stop an object from receiving input then use + * `disableInteractive` instead, as that toggles the interactive state, where-as + * this erases it completely. + * + * If you wish to resize a hit area, don't remove and then set it as being + * interactive. Instead, access the hitarea object directly and resize the shape + * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the + * shape is a Rectangle, which it is by default.) + * + * @method Phaser.GameObjects.GameObject#removeInteractive + * @since 3.7.0 + * + * @return {this} This GameObject. + */ + removeInteractive: function () + { + this.scene.sys.input.clear(this); + + this.input = undefined; + + return this; + }, + + /** + * This callback is invoked when this Game Object is added to a Scene. + * + * Can be overriden by custom Game Objects, but be aware of some Game Objects that + * will use this, such as Sprites, to add themselves into the Update List. + * + * You can also listen for the `ADDED_TO_SCENE` event from this Game Object. + * + * @method Phaser.GameObjects.GameObject#addedToScene + * @since 3.50.0 + */ + addedToScene: function () + { + }, + + /** + * This callback is invoked when this Game Object is removed from a Scene. + * + * Can be overriden by custom Game Objects, but be aware of some Game Objects that + * will use this, such as Sprites, to removed themselves from the Update List. + * + * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object. + * + * @method Phaser.GameObjects.GameObject#removedFromScene + * @since 3.50.0 + */ + removedFromScene: function () + { + }, + + /** + * To be overridden by custom GameObjects. Allows base objects to be used in a Pool. + * + * @method Phaser.GameObjects.GameObject#update + * @since 3.0.0 + * + * @param {...*} [args] - args + */ + update: function () + { + }, + + /** + * Returns a JSON representation of the Game Object. + * + * @method Phaser.GameObjects.GameObject#toJSON + * @since 3.0.0 + * + * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object. + */ + toJSON: function () + { + return ComponentsToJSON(this); + }, + + /** + * Compares the renderMask with the renderFlags to see if this Game Object will render or not. + * Also checks the Game Object against the given Cameras exclusion list. + * + * @method Phaser.GameObjects.GameObject#willRender + * @since 3.0.0 + * + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to check against this Game Object. + * + * @return {boolean} True if the Game Object should be rendered, otherwise false. + */ + willRender: function (camera) + { + return !(GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id))); + }, + + /** + * Returns an array containing the display list index of either this Game Object, or if it has one, + * its parent Container. It then iterates up through all of the parent containers until it hits the + * root of the display list (which is index 0 in the returned array). + * + * Used internally by the InputPlugin but also useful if you wish to find out the display depth of + * this Game Object and all of its ancestors. + * + * @method Phaser.GameObjects.GameObject#getIndexList + * @since 3.4.0 + * + * @return {integer[]} An array of display list position indexes. + */ + getIndexList: function () + { + // eslint-disable-next-line consistent-this + var child = this; + var parent = this.parentContainer; + + var indexes = []; + + while (parent) + { + // indexes.unshift([parent.getIndex(child), parent.name]); + indexes.unshift(parent.getIndex(child)); + + child = parent; + + if (!parent.parentContainer) + { + break; + } + else + { + parent = parent.parentContainer; + } + } + + // indexes.unshift([this.scene.sys.displayList.getIndex(child), 'root']); + indexes.unshift(this.scene.sys.displayList.getIndex(child)); + + return indexes; + }, + + /** + * Destroys this Game Object removing it from the Display List and Update List and + * severing all ties to parent resources. + * + * Also removes itself from the Input Manager and Physics Manager if previously enabled. + * + * Use this to remove a Game Object from your game if you don't ever plan to use it again. + * As long as no reference to it exists within your own code it should become free for + * garbage collection by the browser. + * + * If you just want to temporarily disable an object then look at using the + * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected. + * + * @method Phaser.GameObjects.GameObject#destroy + * @fires Phaser.GameObjects.Events#DESTROY + * @since 3.0.0 + * + * @param {boolean} [fromScene=false] - Is this Game Object being destroyed as the result of a Scene shutdown? + */ + destroy: function (fromScene) + { + if (fromScene === undefined) { fromScene = false; } + + // This Game Object has already been destroyed + if (!this.scene || this.ignoreDestroy) + { + return; + } + + if (this.preDestroy) + { + this.preDestroy.call(this); + } + + this.emit(Events.DESTROY, this); + + var sys = this.scene.sys; + + if (!fromScene) + { + sys.displayList.remove(this); + } + + if (this.input) + { + sys.input.clear(this); + this.input = undefined; + } + + if (this.data) + { + this.data.destroy(); + + this.data = undefined; + } + + if (this.body) + { + this.body.destroy(); + this.body = undefined; + } + + // Tell the Scene to re-sort the children + if (!fromScene) + { + sys.queueDepthSort(); + } + + this.active = false; + this.visible = false; + + this.scene = undefined; + + this.parentContainer = undefined; + + this.removeAllListeners(); + } + +}); + +/** + * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not. + * + * @constant {integer} RENDER_MASK + * @memberof Phaser.GameObjects.GameObject + * @default + */ +GameObject.RENDER_MASK = 15; + +module.exports = GameObject; + + +/***/ }), +/* 54 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Build a JSON representation of the given Game Object. + * + * This is typically extended further by Game Object specific implementations. + * + * @method Phaser.GameObjects.Components.ToJSON + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to export as JSON. + * + * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object. + */ +var ToJSON = function (gameObject) +{ + var out = { + name: gameObject.name, + type: gameObject.type, + x: gameObject.x, + y: gameObject.y, + depth: gameObject.depth, + scale: { + x: gameObject.scaleX, + y: gameObject.scaleY + }, + origin: { + x: gameObject.originX, + y: gameObject.originY + }, + flipX: gameObject.flipX, + flipY: gameObject.flipY, + rotation: gameObject.rotation, + alpha: gameObject.alpha, + visible: gameObject.visible, + blendMode: gameObject.blendMode, + textureKey: '', + frameKey: '', + data: {} + }; + + if (gameObject.texture) + { + out.textureKey = gameObject.texture.key; + out.frameKey = gameObject.frame.name; + } + + return out; +}; + +module.exports = ToJSON; + + +/***/ }), +/* 55 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var has = Object.prototype.hasOwnProperty + , prefix = '~'; + +/** + * Constructor to create a storage for our `EE` objects. + * An `Events` instance is a plain object whose properties are event names. + * + * @constructor + * @private + */ +function Events() {} + +// +// We try to not inherit from `Object.prototype`. In some engines creating an +// instance in this way is faster than calling `Object.create(null)` directly. +// If `Object.create(null)` is not supported we prefix the event names with a +// character to make sure that the built-in object properties are not +// overridden or used as an attack vector. +// +if (Object.create) { + Events.prototype = Object.create(null); + + // + // This hack is needed because the `__proto__` property is still inherited in + // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5. + // + if (!new Events().__proto__) prefix = false; +} + +/** + * Representation of a single event listener. + * + * @param {Function} fn The listener function. + * @param {*} context The context to invoke the listener with. + * @param {Boolean} [once=false] Specify if the listener is a one-time listener. + * @constructor + * @private + */ +function EE(fn, context, once) { + this.fn = fn; + this.context = context; + this.once = once || false; +} + +/** + * Add a listener for a given event. + * + * @param {EventEmitter} emitter Reference to the `EventEmitter` instance. + * @param {(String|Symbol)} event The event name. + * @param {Function} fn The listener function. + * @param {*} context The context to invoke the listener with. + * @param {Boolean} once Specify if the listener is a one-time listener. + * @returns {EventEmitter} + * @private + */ +function addListener(emitter, event, fn, context, once) { + if (typeof fn !== 'function') { + throw new TypeError('The listener must be a function'); + } + + var listener = new EE(fn, context || emitter, once) + , evt = prefix ? prefix + event : event; + + if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++; + else if (!emitter._events[evt].fn) emitter._events[evt].push(listener); + else emitter._events[evt] = [emitter._events[evt], listener]; + + return emitter; +} + +/** + * Clear event by name. + * + * @param {EventEmitter} emitter Reference to the `EventEmitter` instance. + * @param {(String|Symbol)} evt The Event name. + * @private + */ +function clearEvent(emitter, evt) { + if (--emitter._eventsCount === 0) emitter._events = new Events(); + else delete emitter._events[evt]; +} + +/** + * Minimal `EventEmitter` interface that is molded against the Node.js + * `EventEmitter` interface. + * + * @constructor + * @public + */ +function EventEmitter() { + this._events = new Events(); + this._eventsCount = 0; +} + +/** + * Return an array listing the events for which the emitter has registered + * listeners. + * + * @returns {Array} + * @public + */ +EventEmitter.prototype.eventNames = function eventNames() { + var names = [] + , events + , name; + + if (this._eventsCount === 0) return names; + + for (name in (events = this._events)) { + if (has.call(events, name)) names.push(prefix ? name.slice(1) : name); + } + + if (Object.getOwnPropertySymbols) { + return names.concat(Object.getOwnPropertySymbols(events)); + } + + return names; +}; + +/** + * Return the listeners registered for a given event. + * + * @param {(String|Symbol)} event The event name. + * @returns {Array} The registered listeners. + * @public + */ +EventEmitter.prototype.listeners = function listeners(event) { + var evt = prefix ? prefix + event : event + , handlers = this._events[evt]; + + if (!handlers) return []; + if (handlers.fn) return [handlers.fn]; + + for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) { + ee[i] = handlers[i].fn; + } + + return ee; +}; + +/** + * Return the number of listeners listening to a given event. + * + * @param {(String|Symbol)} event The event name. + * @returns {Number} The number of listeners. + * @public + */ +EventEmitter.prototype.listenerCount = function listenerCount(event) { + var evt = prefix ? prefix + event : event + , listeners = this._events[evt]; + + if (!listeners) return 0; + if (listeners.fn) return 1; + return listeners.length; +}; + +/** + * Calls each of the listeners registered for a given event. + * + * @param {(String|Symbol)} event The event name. + * @returns {Boolean} `true` if the event had listeners, else `false`. + * @public + */ +EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) { + var evt = prefix ? prefix + event : event; + + if (!this._events[evt]) return false; + + var listeners = this._events[evt] + , len = arguments.length + , args + , i; + + if (listeners.fn) { + if (listeners.once) this.removeListener(event, listeners.fn, undefined, true); + + switch (len) { + case 1: return listeners.fn.call(listeners.context), true; + case 2: return listeners.fn.call(listeners.context, a1), true; + case 3: return listeners.fn.call(listeners.context, a1, a2), true; + case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true; + case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true; + case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true; + } + + for (i = 1, args = new Array(len -1); i < len; i++) { + args[i - 1] = arguments[i]; + } + + listeners.fn.apply(listeners.context, args); + } else { + var length = listeners.length + , j; + + for (i = 0; i < length; i++) { + if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true); + + switch (len) { + case 1: listeners[i].fn.call(listeners[i].context); break; + case 2: listeners[i].fn.call(listeners[i].context, a1); break; + case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break; + case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break; + default: + if (!args) for (j = 1, args = new Array(len -1); j < len; j++) { + args[j - 1] = arguments[j]; + } + + listeners[i].fn.apply(listeners[i].context, args); + } + } + } + + return true; +}; + +/** + * Add a listener for a given event. + * + * @param {(String|Symbol)} event The event name. + * @param {Function} fn The listener function. + * @param {*} [context=this] The context to invoke the listener with. + * @returns {EventEmitter} `this`. + * @public + */ +EventEmitter.prototype.on = function on(event, fn, context) { + return addListener(this, event, fn, context, false); +}; + +/** + * Add a one-time listener for a given event. + * + * @param {(String|Symbol)} event The event name. + * @param {Function} fn The listener function. + * @param {*} [context=this] The context to invoke the listener with. + * @returns {EventEmitter} `this`. + * @public + */ +EventEmitter.prototype.once = function once(event, fn, context) { + return addListener(this, event, fn, context, true); +}; + +/** + * Remove the listeners of a given event. + * + * @param {(String|Symbol)} event The event name. + * @param {Function} fn Only remove the listeners that match this function. + * @param {*} context Only remove the listeners that have this context. + * @param {Boolean} once Only remove one-time listeners. + * @returns {EventEmitter} `this`. + * @public + */ +EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) { + var evt = prefix ? prefix + event : event; + + if (!this._events[evt]) return this; + if (!fn) { + clearEvent(this, evt); + return this; + } + + var listeners = this._events[evt]; + + if (listeners.fn) { + if ( + listeners.fn === fn && + (!once || listeners.once) && + (!context || listeners.context === context) + ) { + clearEvent(this, evt); + } + } else { + for (var i = 0, events = [], length = listeners.length; i < length; i++) { + if ( + listeners[i].fn !== fn || + (once && !listeners[i].once) || + (context && listeners[i].context !== context) + ) { + events.push(listeners[i]); + } + } + + // + // Reset the array, or remove it completely if we have no more listeners. + // + if (events.length) this._events[evt] = events.length === 1 ? events[0] : events; + else clearEvent(this, evt); + } + + return this; +}; + +/** + * Remove all listeners, or those of the specified event. + * + * @param {(String|Symbol)} [event] The event name. + * @returns {EventEmitter} `this`. + * @public + */ +EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) { + var evt; + + if (event) { + evt = prefix ? prefix + event : event; + if (this._events[evt]) clearEvent(this, evt); + } else { + this._events = new Events(); + this._eventsCount = 0; + } + + return this; +}; + +// +// Alias methods names because people roll like that. +// +EventEmitter.prototype.off = EventEmitter.prototype.removeListener; +EventEmitter.prototype.addListener = EventEmitter.prototype.on; + +// +// Expose the prefix. +// +EventEmitter.prefixed = prefix; + +// +// Allow `EventEmitter` to be imported as module namespace. +// +EventEmitter.EventEmitter = EventEmitter; + +// +// Expose the module. +// +if (true) { + module.exports = EventEmitter; +} + + +/***/ }), +/* 56 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Transposes the elements of the given matrix (array of arrays). + * + * The transpose of a matrix is a new matrix whose rows are the columns of the original. + * + * @function Phaser.Utils.Array.Matrix.TransposeMatrix + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [array,$return] + * + * @param {T[][]} [array] - The array matrix to transpose. + * + * @return {T[][]} A new array matrix which is a transposed version of the given array. + */ +var TransposeMatrix = function (array) +{ + var sourceRowCount = array.length; + var sourceColCount = array[0].length; + + var result = new Array(sourceColCount); + + for (var i = 0; i < sourceColCount; i++) + { + result[i] = new Array(sourceRowCount); + + for (var j = sourceRowCount - 1; j > -1; j--) + { + result[i][j] = array[j][i]; + } + } + + return result; +}; + +module.exports = TransposeMatrix; + + +/***/ }), +/* 57 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Searches a pre-sorted array for the closet value to the given number. + * + * If the `key` argument is given it will assume the array contains objects that all have the required `key` property name, + * and will check for the closest value of those to the given number. + * + * @function Phaser.Utils.Array.FindClosestInSorted + * @since 3.0.0 + * + * @param {number} value - The value to search for in the array. + * @param {array} array - The array to search, which must be sorted. + * @param {string} [key] - An optional property key. If specified the array elements property will be checked against value. + * + * @return {(number|any)} The nearest value found in the array, or if a `key` was given, the nearest object with the matching property value. + */ +var FindClosestInSorted = function (value, array, key) +{ + if (!array.length) + { + return NaN; + } + else if (array.length === 1) + { + return array[0]; + } + + var i = 1; + var low; + var high; + + if (key) + { + if (value < array[0][key]) + { + return array[0]; + } + + while (array[i][key] < value) + { + i++; + } + } + else + { + while (array[i] < value) + { + i++; + } + } + + if (i > array.length) + { + i = array.length; + } + + if (key) + { + low = array[i - 1][key]; + high = array[i][key]; + + return ((high - value) <= (value - low)) ? array[i] : array[i - 1]; + } + else + { + low = array[i - 1]; + high = array[i]; + + return ((high - value) <= (value - low)) ? high : low; + } +}; + +module.exports = FindClosestInSorted; + + +/***/ }), +/* 58 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Shuffles the contents of the given array using the Fisher-Yates implementation. + * + * The original array is modified directly and returned. + * + * @function Phaser.Utils.Array.Shuffle + * @since 3.0.0 + * + * @generic T + * @genericUse {T[]} - [array,$return] + * + * @param {T[]} array - The array to shuffle. This array is modified in place. + * + * @return {T[]} The shuffled array. + */ +var Shuffle = function (array) +{ + for (var i = array.length - 1; i > 0; i--) + { + var j = Math.floor(Math.random() * (i + 1)); + var temp = array[i]; + array[i] = array[j]; + array[j] = temp; + } + + return array; +}; + +module.exports = Shuffle; + + +/***/ }), +/* 59 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Animations.Events + */ + +module.exports = { + + ADD_ANIMATION: __webpack_require__(291), + ANIMATION_COMPLETE: __webpack_require__(292), + ANIMATION_REPEAT: __webpack_require__(293), + ANIMATION_RESTART: __webpack_require__(294), + ANIMATION_START: __webpack_require__(295), + PAUSE_ALL: __webpack_require__(296), + REMOVE_ANIMATION: __webpack_require__(297), + RESUME_ALL: __webpack_require__(298), + SPRITE_ANIMATION_COMPLETE: __webpack_require__(299), + SPRITE_ANIMATION_KEY_COMPLETE: __webpack_require__(300), + SPRITE_ANIMATION_KEY_REPEAT: __webpack_require__(301), + SPRITE_ANIMATION_KEY_RESTART: __webpack_require__(302), + SPRITE_ANIMATION_KEY_START: __webpack_require__(303), + SPRITE_ANIMATION_KEY_UPDATE: __webpack_require__(304), + SPRITE_ANIMATION_REPEAT: __webpack_require__(305), + SPRITE_ANIMATION_RESTART: __webpack_require__(306), + SPRITE_ANIMATION_START: __webpack_require__(307), + SPRITE_ANIMATION_UPDATE: __webpack_require__(308) + +}; + + +/***/ }), +/* 60 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Perimeter = __webpack_require__(61); +var Point = __webpack_require__(12); + +/** + * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter. + * + * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is. + * + * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side. + * + * @function Phaser.Geom.Rectangle.GetPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [out,$return] + * + * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle to get the perimeter point from. + * @param {number} position - The normalized distance into the Rectangle's perimeter to return. + * @param {(Phaser.Geom.Point|object)} [out] - An object to update with the `x` and `y` coordinates of the point. + * + * @return {Phaser.Geom.Point} The updated `output` object, or a new Point if no `output` object was given. + */ +var GetPoint = function (rectangle, position, out) +{ + if (out === undefined) { out = new Point(); } + + if (position <= 0 || position >= 1) + { + out.x = rectangle.x; + out.y = rectangle.y; + + return out; + } + + var p = Perimeter(rectangle) * position; + + if (position > 0.5) + { + p -= (rectangle.width + rectangle.height); + + if (p <= rectangle.width) + { + // Face 3 + out.x = rectangle.right - p; + out.y = rectangle.bottom; + } + else + { + // Face 4 + out.x = rectangle.x; + out.y = rectangle.bottom - (p - rectangle.width); + } + } + else if (p <= rectangle.width) + { + // Face 1 + out.x = rectangle.x + p; + out.y = rectangle.y; + } + else + { + // Face 2 + out.x = rectangle.right; + out.y = rectangle.y + (p - rectangle.width); + } + + return out; +}; + +module.exports = GetPoint; + + +/***/ }), +/* 61 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculates the perimeter of a Rectangle. + * + * @function Phaser.Geom.Rectangle.Perimeter + * @since 3.0.0 + * + * @param {Phaser.Geom.Rectangle} rect - The Rectangle to use. + * + * @return {number} The perimeter of the Rectangle, equal to `(width * 2) + (height * 2)`. + */ +var Perimeter = function (rect) +{ + return 2 * (rect.width + rect.height); +}; + +module.exports = Perimeter; + + +/***/ }), +/* 62 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BuildGameObject = __webpack_require__(36); +var BuildGameObject = __webpack_require__(63); var Class = __webpack_require__(0); -var GetValue = __webpack_require__(12); -var ResizeEvent = __webpack_require__(150); -var ScenePlugin = __webpack_require__(151); -var Spine = __webpack_require__(175); -var SpineFile = __webpack_require__(176); -var SpineGameObject = __webpack_require__(194); +var GetValue = __webpack_require__(7); +var ResizeEvent = __webpack_require__(174); +var ScenePlugin = __webpack_require__(175); +var Spine = __webpack_require__(199); +var SpineFile = __webpack_require__(200); +var SpineGameObject = __webpack_require__(218); +var SpineContainer = __webpack_require__(248); +var NOOP = __webpack_require__(4); /** * @classdesc @@ -6771,6 +11805,13 @@ var SpineGameObject = __webpack_require__(194); * stored in their own caches, which are global, meaning they're accessible from any Scene in your * game, regardless if the Scene loaded the Spine data or not. * + * When destroying a Phaser Game instance, if you need to re-create it again on the same page without + * reloading, you must remember to remove the Spine Plugin as part of your tear-down process: + * + * ```javascript + * this.plugins.removeScenePlugin('SpinePlugin'); + * ``` + * * For details about the Spine Runtime API see http://esotericsoftware.com/spine-api-reference * * @class SpinePlugin @@ -6954,6 +11995,19 @@ var SpinePlugin = new Class({ this.getAtlas = this.getAtlasCanvas; } + // Headless mode? + if (!this.renderer) + { + this.renderer = { + width: game.scale.width, + height: game.scale.height, + preRender: NOOP, + postRender: NOOP, + render: NOOP, + destroy: NOOP + }; + } + var _this = this; var add = function (x, y, key, animationName, loop) @@ -7002,8 +12056,38 @@ var SpinePlugin = new Class({ return spineGO.refresh(); }; + var addContainer = function (x, y, children) + { + var spineGO = new SpineContainer(this.scene, _this, x, y, children); + + this.displayList.add(spineGO); + + return spineGO; + }; + + var makeContainer = function (config, addToScene) + { + if (config === undefined) { config = {}; } + + var x = GetValue(config, 'x', 0); + var y = GetValue(config, 'y', 0); + var children = GetValue(config, 'children', null); + + var container = new SpineContainer(this.scene, _this, x, y, children); + + if (addToScene !== undefined) + { + config.add = addToScene; + } + + BuildGameObject(this.scene, container, config); + + return container; + }; + pluginManager.registerFileType('spine', this.spineFileCallback, scene); pluginManager.registerGameObject('spine', add, make); + pluginManager.registerGameObject('spinecontainer', addContainer, makeContainer); }, /** @@ -7737,6 +12821,8 @@ var SpinePlugin = new Class({ }); +SpinePlugin.SpineGameObject = SpineGameObject; + /** * Creates a new Spine Game Object and adds it to the Scene. * @@ -7807,7 +12893,7 @@ module.exports = SpinePlugin; /***/ }), -/* 36 */ +/* 63 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -7816,8 +12902,8 @@ module.exports = SpinePlugin; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlendModes = __webpack_require__(37); -var GetAdvancedValue = __webpack_require__(38); +var BlendModes = __webpack_require__(16); +var GetAdvancedValue = __webpack_require__(64); /** * Builds a Game Object using the provided configuration object. @@ -7935,346 +13021,7 @@ module.exports = BuildGameObject; /***/ }), -/* 37 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Phaser Blend Modes. - * - * @namespace Phaser.BlendModes - * @since 3.0.0 - */ - -module.exports = { - - /** - * Skips the Blend Mode check in the renderer. - * - * @name Phaser.BlendModes.SKIP_CHECK - * @type {integer} - * @const - * @since 3.0.0 - */ - SKIP_CHECK: -1, - - /** - * Normal blend mode. For Canvas and WebGL. - * This is the default setting and draws new shapes on top of the existing canvas content. - * - * @name Phaser.BlendModes.NORMAL - * @type {integer} - * @const - * @since 3.0.0 - */ - NORMAL: 0, - - /** - * Add blend mode. For Canvas and WebGL. - * Where both shapes overlap the color is determined by adding color values. - * - * @name Phaser.BlendModes.ADD - * @type {integer} - * @const - * @since 3.0.0 - */ - ADD: 1, - - /** - * Multiply blend mode. For Canvas and WebGL. - * The pixels are of the top layer are multiplied with the corresponding pixel of the bottom layer. A darker picture is the result. - * - * @name Phaser.BlendModes.MULTIPLY - * @type {integer} - * @const - * @since 3.0.0 - */ - MULTIPLY: 2, - - /** - * Screen blend mode. For Canvas and WebGL. - * The pixels are inverted, multiplied, and inverted again. A lighter picture is the result (opposite of multiply) - * - * @name Phaser.BlendModes.SCREEN - * @type {integer} - * @const - * @since 3.0.0 - */ - SCREEN: 3, - - /** - * Overlay blend mode. For Canvas only. - * A combination of multiply and screen. Dark parts on the base layer become darker, and light parts become lighter. - * - * @name Phaser.BlendModes.OVERLAY - * @type {integer} - * @const - * @since 3.0.0 - */ - OVERLAY: 4, - - /** - * Darken blend mode. For Canvas only. - * Retains the darkest pixels of both layers. - * - * @name Phaser.BlendModes.DARKEN - * @type {integer} - * @const - * @since 3.0.0 - */ - DARKEN: 5, - - /** - * Lighten blend mode. For Canvas only. - * Retains the lightest pixels of both layers. - * - * @name Phaser.BlendModes.LIGHTEN - * @type {integer} - * @const - * @since 3.0.0 - */ - LIGHTEN: 6, - - /** - * Color Dodge blend mode. For Canvas only. - * Divides the bottom layer by the inverted top layer. - * - * @name Phaser.BlendModes.COLOR_DODGE - * @type {integer} - * @const - * @since 3.0.0 - */ - COLOR_DODGE: 7, - - /** - * Color Burn blend mode. For Canvas only. - * Divides the inverted bottom layer by the top layer, and then inverts the result. - * - * @name Phaser.BlendModes.COLOR_BURN - * @type {integer} - * @const - * @since 3.0.0 - */ - COLOR_BURN: 8, - - /** - * Hard Light blend mode. For Canvas only. - * A combination of multiply and screen like overlay, but with top and bottom layer swapped. - * - * @name Phaser.BlendModes.HARD_LIGHT - * @type {integer} - * @const - * @since 3.0.0 - */ - HARD_LIGHT: 9, - - /** - * Soft Light blend mode. For Canvas only. - * A softer version of hard-light. Pure black or white does not result in pure black or white. - * - * @name Phaser.BlendModes.SOFT_LIGHT - * @type {integer} - * @const - * @since 3.0.0 - */ - SOFT_LIGHT: 10, - - /** - * Difference blend mode. For Canvas only. - * Subtracts the bottom layer from the top layer or the other way round to always get a positive value. - * - * @name Phaser.BlendModes.DIFFERENCE - * @type {integer} - * @const - * @since 3.0.0 - */ - DIFFERENCE: 11, - - /** - * Exclusion blend mode. For Canvas only. - * Like difference, but with lower contrast. - * - * @name Phaser.BlendModes.EXCLUSION - * @type {integer} - * @const - * @since 3.0.0 - */ - EXCLUSION: 12, - - /** - * Hue blend mode. For Canvas only. - * Preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer. - * - * @name Phaser.BlendModes.HUE - * @type {integer} - * @const - * @since 3.0.0 - */ - HUE: 13, - - /** - * Saturation blend mode. For Canvas only. - * Preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer. - * - * @name Phaser.BlendModes.SATURATION - * @type {integer} - * @const - * @since 3.0.0 - */ - SATURATION: 14, - - /** - * Color blend mode. For Canvas only. - * Preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer. - * - * @name Phaser.BlendModes.COLOR - * @type {integer} - * @const - * @since 3.0.0 - */ - COLOR: 15, - - /** - * Luminosity blend mode. For Canvas only. - * Preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer. - * - * @name Phaser.BlendModes.LUMINOSITY - * @type {integer} - * @const - * @since 3.0.0 - */ - LUMINOSITY: 16, - - /** - * Alpha erase blend mode. For Canvas and WebGL. - * - * @name Phaser.BlendModes.ERASE - * @type {integer} - * @const - * @since 3.0.0 - */ - ERASE: 17, - - /** - * Source-in blend mode. For Canvas only. - * The new shape is drawn only where both the new shape and the destination canvas overlap. Everything else is made transparent. - * - * @name Phaser.BlendModes.SOURCE_IN - * @type {integer} - * @const - * @since 3.0.0 - */ - SOURCE_IN: 18, - - /** - * Source-out blend mode. For Canvas only. - * The new shape is drawn where it doesn't overlap the existing canvas content. - * - * @name Phaser.BlendModes.SOURCE_OUT - * @type {integer} - * @const - * @since 3.0.0 - */ - SOURCE_OUT: 19, - - /** - * Source-out blend mode. For Canvas only. - * The new shape is only drawn where it overlaps the existing canvas content. - * - * @name Phaser.BlendModes.SOURCE_ATOP - * @type {integer} - * @const - * @since 3.0.0 - */ - SOURCE_ATOP: 20, - - /** - * Destination-over blend mode. For Canvas only. - * New shapes are drawn behind the existing canvas content. - * - * @name Phaser.BlendModes.DESTINATION_OVER - * @type {integer} - * @const - * @since 3.0.0 - */ - DESTINATION_OVER: 21, - - /** - * Destination-in blend mode. For Canvas only. - * The existing canvas content is kept where both the new shape and existing canvas content overlap. Everything else is made transparent. - * - * @name Phaser.BlendModes.DESTINATION_IN - * @type {integer} - * @const - * @since 3.0.0 - */ - DESTINATION_IN: 22, - - /** - * Destination-out blend mode. For Canvas only. - * The existing content is kept where it doesn't overlap the new shape. - * - * @name Phaser.BlendModes.DESTINATION_OUT - * @type {integer} - * @const - * @since 3.0.0 - */ - DESTINATION_OUT: 23, - - /** - * Destination-out blend mode. For Canvas only. - * The existing canvas is only kept where it overlaps the new shape. The new shape is drawn behind the canvas content. - * - * @name Phaser.BlendModes.DESTINATION_ATOP - * @type {integer} - * @const - * @since 3.0.0 - */ - DESTINATION_ATOP: 24, - - /** - * Lighten blend mode. For Canvas only. - * Where both shapes overlap the color is determined by adding color values. - * - * @name Phaser.BlendModes.LIGHTER - * @type {integer} - * @const - * @since 3.0.0 - */ - LIGHTER: 25, - - /** - * Copy blend mode. For Canvas only. - * Only the new shape is shown. - * - * @name Phaser.BlendModes.COPY - * @type {integer} - * @const - * @since 3.0.0 - */ - COPY: 26, - - /** - * Xor blend mode. For Canvas only. - * Shapes are made transparent where both overlap and drawn normal everywhere else. - * - * @name Phaser.BlendModes.XOR - * @type {integer} - * @const - * @since 3.0.0 - */ - XOR: 27 - -}; - - -/***/ }), -/* 38 */ +/* 64 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8283,8 +13030,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH = __webpack_require__(39); -var GetValue = __webpack_require__(12); +var MATH = __webpack_require__(65); +var GetValue = __webpack_require__(7); /** * Retrieves a value from an object. Allows for more advanced selection options, including: @@ -8361,7 +13108,7 @@ module.exports = GetAdvancedValue; /***/ }), -/* 39 */ +/* 65 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8370,8 +13117,8 @@ module.exports = GetAdvancedValue; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(1); -var Extend = __webpack_require__(15); +var CONST = __webpack_require__(2); +var Extend = __webpack_require__(26); /** * @namespace Phaser.Math @@ -8380,63 +13127,63 @@ var Extend = __webpack_require__(15); var PhaserMath = { // Collections of functions - Angle: __webpack_require__(40), - Distance: __webpack_require__(49), - Easing: __webpack_require__(57), - Fuzzy: __webpack_require__(102), - Interpolation: __webpack_require__(107), - Pow2: __webpack_require__(115), - Snap: __webpack_require__(119), + Angle: __webpack_require__(66), + Distance: __webpack_require__(75), + Easing: __webpack_require__(83), + Fuzzy: __webpack_require__(128), + Interpolation: __webpack_require__(133), + Pow2: __webpack_require__(141), + Snap: __webpack_require__(145), // Expose the RNG Class - RandomDataGenerator: __webpack_require__(123), + RandomDataGenerator: __webpack_require__(149), // Single functions - Average: __webpack_require__(124), - Bernstein: __webpack_require__(21), - Between: __webpack_require__(125), - CatmullRom: __webpack_require__(23), - CeilTo: __webpack_require__(126), - Clamp: __webpack_require__(10), - DegToRad: __webpack_require__(27), - Difference: __webpack_require__(127), - Factorial: __webpack_require__(22), - FloatBetween: __webpack_require__(9), - FloorTo: __webpack_require__(128), - FromPercent: __webpack_require__(129), - GetSpeed: __webpack_require__(130), - IsEven: __webpack_require__(131), - IsEvenStrict: __webpack_require__(132), - Linear: __webpack_require__(24), - MaxAdd: __webpack_require__(133), - MinSub: __webpack_require__(134), - Percent: __webpack_require__(135), - RadToDeg: __webpack_require__(7), - RandomXY: __webpack_require__(136), - RandomXYZ: __webpack_require__(137), - RandomXYZW: __webpack_require__(138), - Rotate: __webpack_require__(139), - RotateAround: __webpack_require__(140), - RotateAroundDistance: __webpack_require__(141), - RotateTo: __webpack_require__(142), - RoundAwayFromZero: __webpack_require__(143), - RoundTo: __webpack_require__(144), - SinCosTableGenerator: __webpack_require__(145), - SmootherStep: __webpack_require__(26), - SmoothStep: __webpack_require__(25), - ToXY: __webpack_require__(146), - TransformXY: __webpack_require__(28), - Within: __webpack_require__(147), - Wrap: __webpack_require__(3), + Average: __webpack_require__(150), + Bernstein: __webpack_require__(32), + Between: __webpack_require__(151), + CatmullRom: __webpack_require__(34), + CeilTo: __webpack_require__(152), + Clamp: __webpack_require__(3), + DegToRad: __webpack_require__(18), + Difference: __webpack_require__(153), + Factorial: __webpack_require__(33), + FloatBetween: __webpack_require__(17), + FloorTo: __webpack_require__(154), + FromPercent: __webpack_require__(155), + GetSpeed: __webpack_require__(156), + IsEven: __webpack_require__(157), + IsEvenStrict: __webpack_require__(158), + Linear: __webpack_require__(35), + MaxAdd: __webpack_require__(159), + MinSub: __webpack_require__(160), + Percent: __webpack_require__(161), + RadToDeg: __webpack_require__(10), + RandomXY: __webpack_require__(162), + RandomXYZ: __webpack_require__(163), + RandomXYZW: __webpack_require__(164), + Rotate: __webpack_require__(165), + RotateAround: __webpack_require__(38), + RotateAroundDistance: __webpack_require__(166), + RotateTo: __webpack_require__(167), + RoundAwayFromZero: __webpack_require__(39), + RoundTo: __webpack_require__(168), + SinCosTableGenerator: __webpack_require__(169), + SmootherStep: __webpack_require__(37), + SmoothStep: __webpack_require__(36), + ToXY: __webpack_require__(170), + TransformXY: __webpack_require__(40), + Within: __webpack_require__(171), + Wrap: __webpack_require__(6), // Vector classes - Vector2: __webpack_require__(4), - Vector3: __webpack_require__(11), - Vector4: __webpack_require__(148), - Matrix3: __webpack_require__(29), - Matrix4: __webpack_require__(30), - Quaternion: __webpack_require__(31), - RotateVec3: __webpack_require__(149) + Vector2: __webpack_require__(1), + Vector3: __webpack_require__(19), + Vector4: __webpack_require__(172), + Matrix3: __webpack_require__(41), + Matrix4: __webpack_require__(42), + Quaternion: __webpack_require__(43), + RotateVec3: __webpack_require__(173) }; @@ -8450,7 +13197,7 @@ module.exports = PhaserMath; /***/ }), -/* 40 */ +/* 66 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8465,25 +13212,25 @@ module.exports = PhaserMath; module.exports = { - Between: __webpack_require__(16), - BetweenPoints: __webpack_require__(41), - BetweenPointsY: __webpack_require__(42), - BetweenY: __webpack_require__(43), - CounterClockwise: __webpack_require__(6), - Normalize: __webpack_require__(17), - Random: __webpack_require__(44), - RandomDegrees: __webpack_require__(45), - Reverse: __webpack_require__(46), - RotateTo: __webpack_require__(47), - ShortestBetween: __webpack_require__(48), - Wrap: __webpack_require__(18), - WrapDegrees: __webpack_require__(19) + Between: __webpack_require__(27), + BetweenPoints: __webpack_require__(67), + BetweenPointsY: __webpack_require__(68), + BetweenY: __webpack_require__(69), + CounterClockwise: __webpack_require__(9), + Normalize: __webpack_require__(28), + Random: __webpack_require__(70), + RandomDegrees: __webpack_require__(71), + Reverse: __webpack_require__(72), + RotateTo: __webpack_require__(73), + ShortestBetween: __webpack_require__(74), + Wrap: __webpack_require__(29), + WrapDegrees: __webpack_require__(30) }; /***/ }), -/* 41 */ +/* 67 */ /***/ (function(module, exports) { /** @@ -8514,7 +13261,7 @@ module.exports = BetweenPoints; /***/ }), -/* 42 */ +/* 68 */ /***/ (function(module, exports) { /** @@ -8546,7 +13293,7 @@ module.exports = BetweenPointsY; /***/ }), -/* 43 */ +/* 69 */ /***/ (function(module, exports) { /** @@ -8580,7 +13327,7 @@ module.exports = BetweenY; /***/ }), -/* 44 */ +/* 70 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8590,7 +13337,7 @@ module.exports = BetweenY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FloatBetween = __webpack_require__(9); +var FloatBetween = __webpack_require__(17); /** * Returns a random angle in the range [-pi, pi]. @@ -8609,7 +13356,7 @@ module.exports = Random; /***/ }), -/* 45 */ +/* 71 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8619,7 +13366,7 @@ module.exports = Random; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FloatBetween = __webpack_require__(9); +var FloatBetween = __webpack_require__(17); /** * Returns a random angle in the range [-180, 180]. @@ -8638,7 +13385,7 @@ module.exports = RandomDegrees; /***/ }), -/* 46 */ +/* 72 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8647,7 +13394,7 @@ module.exports = RandomDegrees; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Normalize = __webpack_require__(17); +var Normalize = __webpack_require__(28); /** * Reverse the given angle. @@ -8668,7 +13415,7 @@ module.exports = Reverse; /***/ }), -/* 47 */ +/* 73 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8677,7 +13424,7 @@ module.exports = Reverse; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH_CONST = __webpack_require__(1); +var MATH_CONST = __webpack_require__(2); /** * Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call. @@ -8735,7 +13482,7 @@ module.exports = RotateTo; /***/ }), -/* 48 */ +/* 74 */ /***/ (function(module, exports) { /** @@ -8784,7 +13531,7 @@ module.exports = ShortestBetween; /***/ }), -/* 49 */ +/* 75 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8799,19 +13546,19 @@ module.exports = ShortestBetween; module.exports = { - Between: __webpack_require__(50), - BetweenPoints: __webpack_require__(51), - BetweenPointsSquared: __webpack_require__(52), - Chebyshev: __webpack_require__(53), - Power: __webpack_require__(54), - Snake: __webpack_require__(55), - Squared: __webpack_require__(56) + Between: __webpack_require__(76), + BetweenPoints: __webpack_require__(77), + BetweenPointsSquared: __webpack_require__(78), + Chebyshev: __webpack_require__(79), + Power: __webpack_require__(80), + Snake: __webpack_require__(81), + Squared: __webpack_require__(82) }; /***/ }), -/* 50 */ +/* 76 */ /***/ (function(module, exports) { /** @@ -8845,7 +13592,7 @@ module.exports = DistanceBetween; /***/ }), -/* 51 */ +/* 77 */ /***/ (function(module, exports) { /** @@ -8877,7 +13624,7 @@ module.exports = DistanceBetweenPoints; /***/ }), -/* 52 */ +/* 78 */ /***/ (function(module, exports) { /** @@ -8909,7 +13656,7 @@ module.exports = DistanceBetweenPointsSquared; /***/ }), -/* 53 */ +/* 79 */ /***/ (function(module, exports) { /** @@ -8943,7 +13690,7 @@ module.exports = ChebyshevDistance; /***/ }), -/* 54 */ +/* 80 */ /***/ (function(module, exports) { /** @@ -8977,7 +13724,7 @@ module.exports = DistancePower; /***/ }), -/* 55 */ +/* 81 */ /***/ (function(module, exports) { /** @@ -9011,7 +13758,7 @@ module.exports = SnakeDistance; /***/ }), -/* 56 */ +/* 82 */ /***/ (function(module, exports) { /** @@ -9045,7 +13792,7 @@ module.exports = DistanceSquared; /***/ }), -/* 57 */ +/* 83 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -9060,24 +13807,24 @@ module.exports = DistanceSquared; module.exports = { - Back: __webpack_require__(58), - Bounce: __webpack_require__(62), - Circular: __webpack_require__(66), - Cubic: __webpack_require__(70), - Elastic: __webpack_require__(74), - Expo: __webpack_require__(78), - Linear: __webpack_require__(82), - Quadratic: __webpack_require__(84), - Quartic: __webpack_require__(88), - Quintic: __webpack_require__(92), - Sine: __webpack_require__(96), - Stepped: __webpack_require__(100) + Back: __webpack_require__(84), + Bounce: __webpack_require__(88), + Circular: __webpack_require__(92), + Cubic: __webpack_require__(96), + Elastic: __webpack_require__(100), + Expo: __webpack_require__(104), + Linear: __webpack_require__(108), + Quadratic: __webpack_require__(110), + Quartic: __webpack_require__(114), + Quintic: __webpack_require__(118), + Sine: __webpack_require__(122), + Stepped: __webpack_require__(126) }; /***/ }), -/* 58 */ +/* 84 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -9092,15 +13839,15 @@ module.exports = { module.exports = { - In: __webpack_require__(59), - Out: __webpack_require__(60), - InOut: __webpack_require__(61) + In: __webpack_require__(85), + Out: __webpack_require__(86), + InOut: __webpack_require__(87) }; /***/ }), -/* 59 */ +/* 85 */ /***/ (function(module, exports) { /** @@ -9131,7 +13878,7 @@ module.exports = In; /***/ }), -/* 60 */ +/* 86 */ /***/ (function(module, exports) { /** @@ -9162,7 +13909,7 @@ module.exports = Out; /***/ }), -/* 61 */ +/* 87 */ /***/ (function(module, exports) { /** @@ -9202,7 +13949,7 @@ module.exports = InOut; /***/ }), -/* 62 */ +/* 88 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -9217,15 +13964,15 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(63), - Out: __webpack_require__(64), - InOut: __webpack_require__(65) + In: __webpack_require__(89), + Out: __webpack_require__(90), + InOut: __webpack_require__(91) }; /***/ }), -/* 63 */ +/* 89 */ /***/ (function(module, exports) { /** @@ -9270,7 +14017,7 @@ module.exports = In; /***/ }), -/* 64 */ +/* 90 */ /***/ (function(module, exports) { /** @@ -9313,7 +14060,7 @@ module.exports = Out; /***/ }), -/* 65 */ +/* 91 */ /***/ (function(module, exports) { /** @@ -9377,7 +14124,7 @@ module.exports = InOut; /***/ }), -/* 66 */ +/* 92 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -9392,15 +14139,15 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(67), - Out: __webpack_require__(68), - InOut: __webpack_require__(69) + In: __webpack_require__(93), + Out: __webpack_require__(94), + InOut: __webpack_require__(95) }; /***/ }), -/* 67 */ +/* 93 */ /***/ (function(module, exports) { /** @@ -9428,7 +14175,7 @@ module.exports = In; /***/ }), -/* 68 */ +/* 94 */ /***/ (function(module, exports) { /** @@ -9456,7 +14203,7 @@ module.exports = Out; /***/ }), -/* 69 */ +/* 95 */ /***/ (function(module, exports) { /** @@ -9491,7 +14238,7 @@ module.exports = InOut; /***/ }), -/* 70 */ +/* 96 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -9506,15 +14253,15 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(71), - Out: __webpack_require__(72), - InOut: __webpack_require__(73) + In: __webpack_require__(97), + Out: __webpack_require__(98), + InOut: __webpack_require__(99) }; /***/ }), -/* 71 */ +/* 97 */ /***/ (function(module, exports) { /** @@ -9542,7 +14289,7 @@ module.exports = In; /***/ }), -/* 72 */ +/* 98 */ /***/ (function(module, exports) { /** @@ -9570,7 +14317,7 @@ module.exports = Out; /***/ }), -/* 73 */ +/* 99 */ /***/ (function(module, exports) { /** @@ -9605,7 +14352,7 @@ module.exports = InOut; /***/ }), -/* 74 */ +/* 100 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -9620,15 +14367,15 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(75), - Out: __webpack_require__(76), - InOut: __webpack_require__(77) + In: __webpack_require__(101), + Out: __webpack_require__(102), + InOut: __webpack_require__(103) }; /***/ }), -/* 75 */ +/* 101 */ /***/ (function(module, exports) { /** @@ -9683,7 +14430,7 @@ module.exports = In; /***/ }), -/* 76 */ +/* 102 */ /***/ (function(module, exports) { /** @@ -9738,7 +14485,7 @@ module.exports = Out; /***/ }), -/* 77 */ +/* 103 */ /***/ (function(module, exports) { /** @@ -9800,7 +14547,7 @@ module.exports = InOut; /***/ }), -/* 78 */ +/* 104 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -9815,15 +14562,15 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(79), - Out: __webpack_require__(80), - InOut: __webpack_require__(81) + In: __webpack_require__(105), + Out: __webpack_require__(106), + InOut: __webpack_require__(107) }; /***/ }), -/* 79 */ +/* 105 */ /***/ (function(module, exports) { /** @@ -9851,7 +14598,7 @@ module.exports = In; /***/ }), -/* 80 */ +/* 106 */ /***/ (function(module, exports) { /** @@ -9879,7 +14626,7 @@ module.exports = Out; /***/ }), -/* 81 */ +/* 107 */ /***/ (function(module, exports) { /** @@ -9914,7 +14661,7 @@ module.exports = InOut; /***/ }), -/* 82 */ +/* 108 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -9923,11 +14670,11 @@ module.exports = InOut; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -module.exports = __webpack_require__(83); +module.exports = __webpack_require__(109); /***/ }), -/* 83 */ +/* 109 */ /***/ (function(module, exports) { /** @@ -9955,7 +14702,7 @@ module.exports = Linear; /***/ }), -/* 84 */ +/* 110 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -9970,15 +14717,15 @@ module.exports = Linear; module.exports = { - In: __webpack_require__(85), - Out: __webpack_require__(86), - InOut: __webpack_require__(87) + In: __webpack_require__(111), + Out: __webpack_require__(112), + InOut: __webpack_require__(113) }; /***/ }), -/* 85 */ +/* 111 */ /***/ (function(module, exports) { /** @@ -10006,7 +14753,7 @@ module.exports = In; /***/ }), -/* 86 */ +/* 112 */ /***/ (function(module, exports) { /** @@ -10034,7 +14781,7 @@ module.exports = Out; /***/ }), -/* 87 */ +/* 113 */ /***/ (function(module, exports) { /** @@ -10069,7 +14816,7 @@ module.exports = InOut; /***/ }), -/* 88 */ +/* 114 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10084,15 +14831,15 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(89), - Out: __webpack_require__(90), - InOut: __webpack_require__(91) + In: __webpack_require__(115), + Out: __webpack_require__(116), + InOut: __webpack_require__(117) }; /***/ }), -/* 89 */ +/* 115 */ /***/ (function(module, exports) { /** @@ -10120,7 +14867,7 @@ module.exports = In; /***/ }), -/* 90 */ +/* 116 */ /***/ (function(module, exports) { /** @@ -10148,7 +14895,7 @@ module.exports = Out; /***/ }), -/* 91 */ +/* 117 */ /***/ (function(module, exports) { /** @@ -10183,7 +14930,7 @@ module.exports = InOut; /***/ }), -/* 92 */ +/* 118 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10198,15 +14945,15 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(93), - Out: __webpack_require__(94), - InOut: __webpack_require__(95) + In: __webpack_require__(119), + Out: __webpack_require__(120), + InOut: __webpack_require__(121) }; /***/ }), -/* 93 */ +/* 119 */ /***/ (function(module, exports) { /** @@ -10234,7 +14981,7 @@ module.exports = In; /***/ }), -/* 94 */ +/* 120 */ /***/ (function(module, exports) { /** @@ -10262,7 +15009,7 @@ module.exports = Out; /***/ }), -/* 95 */ +/* 121 */ /***/ (function(module, exports) { /** @@ -10297,7 +15044,7 @@ module.exports = InOut; /***/ }), -/* 96 */ +/* 122 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10312,15 +15059,15 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(97), - Out: __webpack_require__(98), - InOut: __webpack_require__(99) + In: __webpack_require__(123), + Out: __webpack_require__(124), + InOut: __webpack_require__(125) }; /***/ }), -/* 97 */ +/* 123 */ /***/ (function(module, exports) { /** @@ -10359,7 +15106,7 @@ module.exports = In; /***/ }), -/* 98 */ +/* 124 */ /***/ (function(module, exports) { /** @@ -10398,7 +15145,7 @@ module.exports = Out; /***/ }), -/* 99 */ +/* 125 */ /***/ (function(module, exports) { /** @@ -10437,7 +15184,7 @@ module.exports = InOut; /***/ }), -/* 100 */ +/* 126 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10450,11 +15197,11 @@ module.exports = InOut; * @namespace Phaser.Math.Easing.Stepped */ -module.exports = __webpack_require__(101); +module.exports = __webpack_require__(127); /***/ }), -/* 101 */ +/* 127 */ /***/ (function(module, exports) { /** @@ -10496,7 +15243,7 @@ module.exports = Stepped; /***/ }), -/* 102 */ +/* 128 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10511,17 +15258,17 @@ module.exports = Stepped; module.exports = { - Ceil: __webpack_require__(103), - Equal: __webpack_require__(20), - Floor: __webpack_require__(104), - GreaterThan: __webpack_require__(105), - LessThan: __webpack_require__(106) + Ceil: __webpack_require__(129), + Equal: __webpack_require__(31), + Floor: __webpack_require__(130), + GreaterThan: __webpack_require__(131), + LessThan: __webpack_require__(132) }; /***/ }), -/* 103 */ +/* 129 */ /***/ (function(module, exports) { /** @@ -10552,7 +15299,7 @@ module.exports = Ceil; /***/ }), -/* 104 */ +/* 130 */ /***/ (function(module, exports) { /** @@ -10583,7 +15330,7 @@ module.exports = Floor; /***/ }), -/* 105 */ +/* 131 */ /***/ (function(module, exports) { /** @@ -10617,7 +15364,7 @@ module.exports = GreaterThan; /***/ }), -/* 106 */ +/* 132 */ /***/ (function(module, exports) { /** @@ -10651,7 +15398,7 @@ module.exports = LessThan; /***/ }), -/* 107 */ +/* 133 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10666,19 +15413,19 @@ module.exports = LessThan; module.exports = { - Bezier: __webpack_require__(108), - CatmullRom: __webpack_require__(109), - CubicBezier: __webpack_require__(110), - Linear: __webpack_require__(111), - QuadraticBezier: __webpack_require__(112), - SmoothStep: __webpack_require__(113), - SmootherStep: __webpack_require__(114) + Bezier: __webpack_require__(134), + CatmullRom: __webpack_require__(135), + CubicBezier: __webpack_require__(136), + Linear: __webpack_require__(137), + QuadraticBezier: __webpack_require__(138), + SmoothStep: __webpack_require__(139), + SmootherStep: __webpack_require__(140) }; /***/ }), -/* 108 */ +/* 134 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10687,7 +15434,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bernstein = __webpack_require__(21); +var Bernstein = __webpack_require__(32); /** * A bezier interpolation method. @@ -10717,7 +15464,7 @@ module.exports = BezierInterpolation; /***/ }), -/* 109 */ +/* 135 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10726,7 +15473,7 @@ module.exports = BezierInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CatmullRom = __webpack_require__(23); +var CatmullRom = __webpack_require__(34); /** * A Catmull-Rom interpolation method. @@ -10774,7 +15521,7 @@ module.exports = CatmullRomInterpolation; /***/ }), -/* 110 */ +/* 136 */ /***/ (function(module, exports) { /** @@ -10844,7 +15591,7 @@ module.exports = CubicBezierInterpolation; /***/ }), -/* 111 */ +/* 137 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10853,7 +15600,7 @@ module.exports = CubicBezierInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Linear = __webpack_require__(24); +var Linear = __webpack_require__(35); /** * A linear interpolation method. @@ -10891,7 +15638,7 @@ module.exports = LinearInterpolation; /***/ }), -/* 112 */ +/* 138 */ /***/ (function(module, exports) { /** @@ -10950,7 +15697,7 @@ module.exports = QuadraticBezierInterpolation; /***/ }), -/* 113 */ +/* 139 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10959,7 +15706,7 @@ module.exports = QuadraticBezierInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmoothStep = __webpack_require__(25); +var SmoothStep = __webpack_require__(36); /** * A Smooth Step interpolation method. @@ -10983,7 +15730,7 @@ module.exports = SmoothStepInterpolation; /***/ }), -/* 114 */ +/* 140 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10992,7 +15739,7 @@ module.exports = SmoothStepInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmootherStep = __webpack_require__(26); +var SmootherStep = __webpack_require__(37); /** * A Smoother Step interpolation method. @@ -11016,7 +15763,7 @@ module.exports = SmootherStepInterpolation; /***/ }), -/* 115 */ +/* 141 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -11031,15 +15778,15 @@ module.exports = SmootherStepInterpolation; module.exports = { - GetNext: __webpack_require__(116), - IsSize: __webpack_require__(117), - IsValue: __webpack_require__(118) + GetNext: __webpack_require__(142), + IsSize: __webpack_require__(143), + IsValue: __webpack_require__(144) }; /***/ }), -/* 116 */ +/* 142 */ /***/ (function(module, exports) { /** @@ -11069,7 +15816,7 @@ module.exports = GetPowerOfTwo; /***/ }), -/* 117 */ +/* 143 */ /***/ (function(module, exports) { /** @@ -11099,7 +15846,7 @@ module.exports = IsSizePowerOfTwo; /***/ }), -/* 118 */ +/* 144 */ /***/ (function(module, exports) { /** @@ -11127,7 +15874,7 @@ module.exports = IsValuePowerOfTwo; /***/ }), -/* 119 */ +/* 145 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -11142,15 +15889,15 @@ module.exports = IsValuePowerOfTwo; module.exports = { - Ceil: __webpack_require__(120), - Floor: __webpack_require__(121), - To: __webpack_require__(122) + Ceil: __webpack_require__(146), + Floor: __webpack_require__(147), + To: __webpack_require__(148) }; /***/ }), -/* 120 */ +/* 146 */ /***/ (function(module, exports) { /** @@ -11194,7 +15941,7 @@ module.exports = SnapCeil; /***/ }), -/* 121 */ +/* 147 */ /***/ (function(module, exports) { /** @@ -11238,7 +15985,7 @@ module.exports = SnapFloor; /***/ }), -/* 122 */ +/* 148 */ /***/ (function(module, exports) { /** @@ -11281,7 +16028,7 @@ module.exports = SnapTo; /***/ }), -/* 123 */ +/* 149 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -11791,7 +16538,7 @@ module.exports = RandomDataGenerator; /***/ }), -/* 124 */ +/* 150 */ /***/ (function(module, exports) { /** @@ -11826,7 +16573,7 @@ module.exports = Average; /***/ }), -/* 125 */ +/* 151 */ /***/ (function(module, exports) { /** @@ -11855,7 +16602,7 @@ module.exports = Between; /***/ }), -/* 126 */ +/* 152 */ /***/ (function(module, exports) { /** @@ -11892,7 +16639,7 @@ module.exports = CeilTo; /***/ }), -/* 127 */ +/* 153 */ /***/ (function(module, exports) { /** @@ -11921,7 +16668,7 @@ module.exports = Difference; /***/ }), -/* 128 */ +/* 154 */ /***/ (function(module, exports) { /** @@ -11958,7 +16705,7 @@ module.exports = FloorTo; /***/ }), -/* 129 */ +/* 155 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -11967,7 +16714,7 @@ module.exports = FloorTo; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(10); +var Clamp = __webpack_require__(3); /** * Return a value based on the range between `min` and `max` and the percentage given. @@ -11992,7 +16739,7 @@ module.exports = FromPercent; /***/ }), -/* 130 */ +/* 156 */ /***/ (function(module, exports) { /** @@ -12025,7 +16772,7 @@ module.exports = GetSpeed; /***/ }), -/* 131 */ +/* 157 */ /***/ (function(module, exports) { /** @@ -12056,7 +16803,7 @@ module.exports = IsEven; /***/ }), -/* 132 */ +/* 158 */ /***/ (function(module, exports) { /** @@ -12085,7 +16832,7 @@ module.exports = IsEvenStrict; /***/ }), -/* 133 */ +/* 159 */ /***/ (function(module, exports) { /** @@ -12115,7 +16862,7 @@ module.exports = MaxAdd; /***/ }), -/* 134 */ +/* 160 */ /***/ (function(module, exports) { /** @@ -12145,7 +16892,7 @@ module.exports = MinSub; /***/ }), -/* 135 */ +/* 161 */ /***/ (function(module, exports) { /** @@ -12204,7 +16951,7 @@ module.exports = Percent; /***/ }), -/* 136 */ +/* 162 */ /***/ (function(module, exports) { /** @@ -12244,7 +16991,7 @@ module.exports = RandomXY; /***/ }), -/* 137 */ +/* 163 */ /***/ (function(module, exports) { /** @@ -12283,7 +17030,7 @@ module.exports = RandomXYZ; /***/ }), -/* 138 */ +/* 164 */ /***/ (function(module, exports) { /** @@ -12320,7 +17067,7 @@ module.exports = RandomXYZW; /***/ }), -/* 139 */ +/* 165 */ /***/ (function(module, exports) { /** @@ -12355,51 +17102,7 @@ module.exports = Rotate; /***/ }), -/* 140 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Rotate a `point` around `x` and `y` to the given `angle`, at the same distance. - * - * In polar notation, this maps a point from (r, t) to (r, angle), vs. the origin (x, y). - * - * @function Phaser.Math.RotateAround - * @since 3.0.0 - * - * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return] - * - * @param {(Phaser.Geom.Point|object)} point - The point to be rotated. - * @param {number} x - The horizontal coordinate to rotate around. - * @param {number} y - The vertical coordinate to rotate around. - * @param {number} angle - The angle of rotation in radians. - * - * @return {Phaser.Types.Math.Vector2Like} The given point. - */ -var RotateAround = function (point, x, y, angle) -{ - var c = Math.cos(angle); - var s = Math.sin(angle); - - var tx = point.x - x; - var ty = point.y - y; - - point.x = tx * c - ty * s + x; - point.y = tx * s + ty * c + y; - - return point; -}; - -module.exports = RotateAround; - - -/***/ }), -/* 141 */ +/* 166 */ /***/ (function(module, exports) { /** @@ -12440,7 +17143,7 @@ module.exports = RotateAroundDistance; /***/ }), -/* 142 */ +/* 167 */ /***/ (function(module, exports) { /** @@ -12477,36 +17180,7 @@ module.exports = RotateTo; /***/ }), -/* 143 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Round a given number so it is further away from zero. That is, positive numbers are rounded up, and negative numbers are rounded down. - * - * @function Phaser.Math.RoundAwayFromZero - * @since 3.0.0 - * - * @param {number} value - The number to round. - * - * @return {number} The rounded number, rounded away from zero. - */ -var RoundAwayFromZero = function (value) -{ - // "Opposite" of truncate. - return (value > 0) ? Math.ceil(value) : Math.floor(value); -}; - -module.exports = RoundAwayFromZero; - - -/***/ }), -/* 144 */ +/* 168 */ /***/ (function(module, exports) { /** @@ -12558,7 +17232,7 @@ module.exports = RoundTo; /***/ }), -/* 145 */ +/* 169 */ /***/ (function(module, exports) { /** @@ -12611,7 +17285,7 @@ module.exports = SinCosTableGenerator; /***/ }), -/* 146 */ +/* 170 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -12620,7 +17294,7 @@ module.exports = SinCosTableGenerator; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector2 = __webpack_require__(4); +var Vector2 = __webpack_require__(1); /** * Returns a Vector2 containing the x and y position of the given index in a `width` x `height` sized grid. @@ -12669,7 +17343,7 @@ module.exports = ToXY; /***/ }), -/* 147 */ +/* 171 */ /***/ (function(module, exports) { /** @@ -12699,7 +17373,7 @@ module.exports = Within; /***/ }), -/* 148 */ +/* 172 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -13244,7 +17918,7 @@ module.exports = Vector4; /***/ }), -/* 149 */ +/* 173 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -13253,9 +17927,9 @@ module.exports = Vector4; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector3 = __webpack_require__(11); -var Matrix4 = __webpack_require__(30); -var Quaternion = __webpack_require__(31); +var Vector3 = __webpack_require__(19); +var Matrix4 = __webpack_require__(42); +var Quaternion = __webpack_require__(43); var tmpMat4 = new Matrix4(); var tmpQuat = new Quaternion(); @@ -13292,7 +17966,7 @@ module.exports = RotateVec3; /***/ }), -/* 150 */ +/* 174 */ /***/ (function(module, exports) { /** @@ -13323,7 +17997,7 @@ module.exports = 'resize'; /***/ }), -/* 151 */ +/* 175 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -13332,9 +18006,9 @@ module.exports = 'resize'; * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ -var BasePlugin = __webpack_require__(152); +var BasePlugin = __webpack_require__(176); var Class = __webpack_require__(0); -var SceneEvents = __webpack_require__(153); +var SceneEvents = __webpack_require__(177); /** * @classdesc @@ -13451,7 +18125,7 @@ module.exports = ScenePlugin; /***/ }), -/* 152 */ +/* 176 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -13581,7 +18255,7 @@ module.exports = BasePlugin; /***/ }), -/* 153 */ +/* 177 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -13596,33 +18270,33 @@ module.exports = BasePlugin; module.exports = { - ADDED_TO_SCENE: __webpack_require__(154), - BOOT: __webpack_require__(155), - CREATE: __webpack_require__(156), - DESTROY: __webpack_require__(157), - PAUSE: __webpack_require__(158), - POST_UPDATE: __webpack_require__(159), - PRE_UPDATE: __webpack_require__(160), - READY: __webpack_require__(161), - REMOVED_FROM_SCENE: __webpack_require__(162), - RENDER: __webpack_require__(163), - RESUME: __webpack_require__(164), - SHUTDOWN: __webpack_require__(165), - SLEEP: __webpack_require__(166), - START: __webpack_require__(167), - TRANSITION_COMPLETE: __webpack_require__(168), - TRANSITION_INIT: __webpack_require__(169), - TRANSITION_OUT: __webpack_require__(170), - TRANSITION_START: __webpack_require__(171), - TRANSITION_WAKE: __webpack_require__(172), - UPDATE: __webpack_require__(173), - WAKE: __webpack_require__(174) + ADDED_TO_SCENE: __webpack_require__(178), + BOOT: __webpack_require__(179), + CREATE: __webpack_require__(180), + DESTROY: __webpack_require__(181), + PAUSE: __webpack_require__(182), + POST_UPDATE: __webpack_require__(183), + PRE_UPDATE: __webpack_require__(184), + READY: __webpack_require__(185), + REMOVED_FROM_SCENE: __webpack_require__(186), + RENDER: __webpack_require__(187), + RESUME: __webpack_require__(188), + SHUTDOWN: __webpack_require__(189), + SLEEP: __webpack_require__(190), + START: __webpack_require__(191), + TRANSITION_COMPLETE: __webpack_require__(192), + TRANSITION_INIT: __webpack_require__(193), + TRANSITION_OUT: __webpack_require__(194), + TRANSITION_START: __webpack_require__(195), + TRANSITION_WAKE: __webpack_require__(196), + UPDATE: __webpack_require__(197), + WAKE: __webpack_require__(198) }; /***/ }), -/* 154 */ +/* 178 */ /***/ (function(module, exports) { /** @@ -13648,7 +18322,7 @@ module.exports = 'addedtoscene'; /***/ }), -/* 155 */ +/* 179 */ /***/ (function(module, exports) { /** @@ -13673,7 +18347,7 @@ module.exports = 'boot'; /***/ }), -/* 156 */ +/* 180 */ /***/ (function(module, exports) { /** @@ -13702,7 +18376,7 @@ module.exports = 'create'; /***/ }), -/* 157 */ +/* 181 */ /***/ (function(module, exports) { /** @@ -13729,7 +18403,7 @@ module.exports = 'destroy'; /***/ }), -/* 158 */ +/* 182 */ /***/ (function(module, exports) { /** @@ -13756,7 +18430,7 @@ module.exports = 'pause'; /***/ }), -/* 159 */ +/* 183 */ /***/ (function(module, exports) { /** @@ -13793,7 +18467,7 @@ module.exports = 'postupdate'; /***/ }), -/* 160 */ +/* 184 */ /***/ (function(module, exports) { /** @@ -13830,7 +18504,7 @@ module.exports = 'preupdate'; /***/ }), -/* 161 */ +/* 185 */ /***/ (function(module, exports) { /** @@ -13858,7 +18532,7 @@ module.exports = 'ready'; /***/ }), -/* 162 */ +/* 186 */ /***/ (function(module, exports) { /** @@ -13884,7 +18558,7 @@ module.exports = 'removedfromscene'; /***/ }), -/* 163 */ +/* 187 */ /***/ (function(module, exports) { /** @@ -13920,7 +18594,7 @@ module.exports = 'render'; /***/ }), -/* 164 */ +/* 188 */ /***/ (function(module, exports) { /** @@ -13947,7 +18621,7 @@ module.exports = 'resume'; /***/ }), -/* 165 */ +/* 189 */ /***/ (function(module, exports) { /** @@ -13977,7 +18651,7 @@ module.exports = 'shutdown'; /***/ }), -/* 166 */ +/* 190 */ /***/ (function(module, exports) { /** @@ -14004,7 +18678,7 @@ module.exports = 'sleep'; /***/ }), -/* 167 */ +/* 191 */ /***/ (function(module, exports) { /** @@ -14029,7 +18703,7 @@ module.exports = 'start'; /***/ }), -/* 168 */ +/* 192 */ /***/ (function(module, exports) { /** @@ -14065,7 +18739,7 @@ module.exports = 'transitioncomplete'; /***/ }), -/* 169 */ +/* 193 */ /***/ (function(module, exports) { /** @@ -14102,7 +18776,7 @@ module.exports = 'transitioninit'; /***/ }), -/* 170 */ +/* 194 */ /***/ (function(module, exports) { /** @@ -14136,7 +18810,7 @@ module.exports = 'transitionout'; /***/ }), -/* 171 */ +/* 195 */ /***/ (function(module, exports) { /** @@ -14176,7 +18850,7 @@ module.exports = 'transitionstart'; /***/ }), -/* 172 */ +/* 196 */ /***/ (function(module, exports) { /** @@ -14211,7 +18885,7 @@ module.exports = 'transitionwake'; /***/ }), -/* 173 */ +/* 197 */ /***/ (function(module, exports) { /** @@ -14248,7 +18922,7 @@ module.exports = 'update'; /***/ }), -/* 174 */ +/* 198 */ /***/ (function(module, exports) { /** @@ -14275,7 +18949,7 @@ module.exports = 'wake'; /***/ }), -/* 175 */ +/* 199 */ /***/ (function(module, exports) { /*** IMPORTS FROM imports-loader ***/ @@ -25068,7 +29742,7 @@ module.exports = spine; /***/ }), -/* 176 */ +/* 200 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25078,12 +29752,12 @@ module.exports = spine; */ var Class = __webpack_require__(0); -var GetFastValue = __webpack_require__(5); -var ImageFile = __webpack_require__(177); -var IsPlainObject = __webpack_require__(2); -var JSONFile = __webpack_require__(191); -var MultiFile = __webpack_require__(192); -var TextFile = __webpack_require__(193); +var GetFastValue = __webpack_require__(11); +var ImageFile = __webpack_require__(201); +var IsPlainObject = __webpack_require__(8); +var JSONFile = __webpack_require__(215); +var MultiFile = __webpack_require__(216); +var TextFile = __webpack_require__(217); /** * @typedef {object} Phaser.Loader.FileTypes.SpineFileConfig @@ -25321,7 +29995,7 @@ module.exports = SpineFile; /***/ }), -/* 177 */ +/* 201 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25331,11 +30005,11 @@ module.exports = SpineFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(8); -var File = __webpack_require__(13); -var FileTypesManager = __webpack_require__(14); -var GetFastValue = __webpack_require__(5); -var IsPlainObject = __webpack_require__(2); +var CONST = __webpack_require__(13); +var File = __webpack_require__(20); +var FileTypesManager = __webpack_require__(21); +var GetFastValue = __webpack_require__(11); +var IsPlainObject = __webpack_require__(8); /** * @classdesc @@ -25595,7 +30269,7 @@ module.exports = ImageFile; /***/ }), -/* 178 */ +/* 202 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25610,22 +30284,22 @@ module.exports = ImageFile; module.exports = { - ADD: __webpack_require__(179), - COMPLETE: __webpack_require__(180), - FILE_COMPLETE: __webpack_require__(181), - FILE_KEY_COMPLETE: __webpack_require__(182), - FILE_LOAD_ERROR: __webpack_require__(183), - FILE_LOAD: __webpack_require__(184), - FILE_PROGRESS: __webpack_require__(185), - POST_PROCESS: __webpack_require__(186), - PROGRESS: __webpack_require__(187), - START: __webpack_require__(188) + ADD: __webpack_require__(203), + COMPLETE: __webpack_require__(204), + FILE_COMPLETE: __webpack_require__(205), + FILE_KEY_COMPLETE: __webpack_require__(206), + FILE_LOAD_ERROR: __webpack_require__(207), + FILE_LOAD: __webpack_require__(208), + FILE_PROGRESS: __webpack_require__(209), + POST_PROCESS: __webpack_require__(210), + PROGRESS: __webpack_require__(211), + START: __webpack_require__(212) }; /***/ }), -/* 179 */ +/* 203 */ /***/ (function(module, exports) { /** @@ -25655,7 +30329,7 @@ module.exports = 'addfile'; /***/ }), -/* 180 */ +/* 204 */ /***/ (function(module, exports) { /** @@ -25683,7 +30357,7 @@ module.exports = 'complete'; /***/ }), -/* 181 */ +/* 205 */ /***/ (function(module, exports) { /** @@ -25712,7 +30386,7 @@ module.exports = 'filecomplete'; /***/ }), -/* 182 */ +/* 206 */ /***/ (function(module, exports) { /** @@ -25766,7 +30440,7 @@ module.exports = 'filecomplete-'; /***/ }), -/* 183 */ +/* 207 */ /***/ (function(module, exports) { /** @@ -25791,7 +30465,7 @@ module.exports = 'loaderror'; /***/ }), -/* 184 */ +/* 208 */ /***/ (function(module, exports) { /** @@ -25817,7 +30491,7 @@ module.exports = 'load'; /***/ }), -/* 185 */ +/* 209 */ /***/ (function(module, exports) { /** @@ -25844,7 +30518,7 @@ module.exports = 'fileprogress'; /***/ }), -/* 186 */ +/* 210 */ /***/ (function(module, exports) { /** @@ -25873,7 +30547,7 @@ module.exports = 'postprocess'; /***/ }), -/* 187 */ +/* 211 */ /***/ (function(module, exports) { /** @@ -25898,7 +30572,7 @@ module.exports = 'progress'; /***/ }), -/* 188 */ +/* 212 */ /***/ (function(module, exports) { /** @@ -25925,7 +30599,7 @@ module.exports = 'start'; /***/ }), -/* 189 */ +/* 213 */ /***/ (function(module, exports) { /** @@ -25966,7 +30640,7 @@ module.exports = GetURL; /***/ }), -/* 190 */ +/* 214 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25975,7 +30649,7 @@ module.exports = GetURL; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MergeXHRSettings = __webpack_require__(32); +var MergeXHRSettings = __webpack_require__(44); /** * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings @@ -26047,7 +30721,7 @@ module.exports = XHRLoader; /***/ }), -/* 191 */ +/* 215 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26057,12 +30731,12 @@ module.exports = XHRLoader; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(8); -var File = __webpack_require__(13); -var FileTypesManager = __webpack_require__(14); -var GetFastValue = __webpack_require__(5); -var GetValue = __webpack_require__(12); -var IsPlainObject = __webpack_require__(2); +var CONST = __webpack_require__(13); +var File = __webpack_require__(20); +var FileTypesManager = __webpack_require__(21); +var GetFastValue = __webpack_require__(11); +var GetValue = __webpack_require__(7); +var IsPlainObject = __webpack_require__(8); /** * @classdesc @@ -26277,7 +30951,7 @@ module.exports = JSONFile; /***/ }), -/* 192 */ +/* 216 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26511,7 +31185,7 @@ module.exports = MultiFile; /***/ }), -/* 193 */ +/* 217 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26521,11 +31195,11 @@ module.exports = MultiFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(8); -var File = __webpack_require__(13); -var FileTypesManager = __webpack_require__(14); -var GetFastValue = __webpack_require__(5); -var IsPlainObject = __webpack_require__(2); +var CONST = __webpack_require__(13); +var File = __webpack_require__(20); +var FileTypesManager = __webpack_require__(21); +var GetFastValue = __webpack_require__(11); +var IsPlainObject = __webpack_require__(8); /** * @classdesc @@ -26686,54 +31360,54 @@ module.exports = TextFile; /***/ }), -/* 194 */ +/* 218 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AngleBetween = __webpack_require__(16); -var Clamp = __webpack_require__(10); +var AngleBetween = __webpack_require__(27); +var Clamp = __webpack_require__(3); var Class = __webpack_require__(0); -var ComponentsComputedSize = __webpack_require__(195); -var ComponentsDepth = __webpack_require__(196); -var ComponentsFlip = __webpack_require__(197); -var ComponentsScrollFactor = __webpack_require__(198); -var ComponentsTransform = __webpack_require__(199); -var ComponentsVisible = __webpack_require__(201); -var CounterClockwise = __webpack_require__(6); -var DegToRad = __webpack_require__(27); -var GameObject = __webpack_require__(202); -var RadToDeg = __webpack_require__(7); -var SpineEvents = __webpack_require__(225); -var SpineGameObjectRender = __webpack_require__(232); +var ComponentsComputedSize = __webpack_require__(46); +var ComponentsDepth = __webpack_require__(47); +var ComponentsFlip = __webpack_require__(48); +var ComponentsScrollFactor = __webpack_require__(49); +var ComponentsTransform = __webpack_require__(50); +var ComponentsVisible = __webpack_require__(52); +var CounterClockwise = __webpack_require__(9); +var DegToRad = __webpack_require__(18); +var GameObject = __webpack_require__(53); +var RadToDeg = __webpack_require__(10); +var SpineEvents = __webpack_require__(238); +var SpineGameObjectRender = __webpack_require__(245); /** * @classdesc * A Spine Game Object is a Phaser level object that can be added to your Phaser Scenes. It encapsulates * a Spine Skeleton with Spine Animation Data and Animation State, with helper methods to allow you to * easily change the skin, slot attachment, bone positions and more. - * + * * Spine Game Objects can be created via the Game Object Factory, Game Object Creator, or directly. * You can only create them if the Spine plugin has been loaded into Phaser. - * + * * The quickest way is the Game Object Factory: - * + * * ```javascript * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true); * ``` - * + * * Here we are creating a new Spine Game Object positioned at 512 x 550. It's using the `jelly` * Spine data, which has previously been loaded into your Scene. The `jelly-think` argument is * an optional animation to start playing on the skeleton. The final argument `true` sets the * animation to loop. Look at the documentation for further details on each of these options. - * + * * For more control, you can use the Game Object Creator, passing in a Spine Game Object * Configuration object: - * + * * ```javascript * let jelly = this.make.spine({ * x: 512, y: 550, key: 'jelly', @@ -26743,28 +31417,28 @@ var SpineGameObjectRender = __webpack_require__(232); * slotName: 'hat', attachmentName: 'images/La_14' * }); * ``` - * + * * Here, you've got the ability to specify extra details, such as the slot name, attachments or * overall scale. - * + * * If you wish to instantiate a Spine Game Object directly you can do so, but in order for it to * update and render, it must be added to the display and update lists of your Scene: - * + * * ```javascript * let jelly = new SpineGameObject(this, this.spine, 512, 550, 'jelly', 'jelly-think', true); * this.sys.displayList.add(jelly); * this.sys.updateList.add(jelly); * ``` - * + * * It's possible to enable Spine Game Objects for input, but you should be aware that it will use * the bounds of the skeletons current pose to create the hit area from. Sometimes this is ok, but * often not. Make use of the `InputPlugin.enableDebug` method to view the input shape being created. * If it's not suitable, provide your own shape to the `setInteractive` method. - * + * * Due to the way Spine handles scaling, it's not recommended to enable a Spine Game Object for * physics directly. Instead, you should look at creating a proxy body and syncing the Spine Game * Object position with it. See the examples for further details. - * + * * If your Spine Game Object has black outlines around the different parts of the texture when it * renders then you have exported the files from Spine with pre-multiplied alpha enabled, but have * forgotten to set that flag when loading the Spine data. Please see the loader docs for more details. @@ -26864,7 +31538,7 @@ var SpineGameObject = new Class({ * @since 3.19.0 */ this.bounds = null; - + /** * A Game Object level flag that allows you to enable debug drawing * to the Skeleton Debug Renderer by toggling it. @@ -26922,7 +31596,7 @@ var SpineGameObject = new Class({ * @readonly * @since 3.19.0 */ - this.blendMode = 0; + this.blendMode = -1; this.setPosition(x, y); @@ -26948,9 +31622,9 @@ var SpineGameObject = new Class({ /** * Set the Alpha level for the whole Skeleton 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. * * @method SpineGameObject#setAlpha @@ -26983,7 +31657,7 @@ var SpineGameObject = new Class({ /** * The alpha value of the Skeleton. - * + * * A value between 0 and 1. * * This is a global value, impacting the entire Skeleton, not just a region of it. @@ -27022,7 +31696,7 @@ var SpineGameObject = new Class({ /** * The amount of red used when rendering the Skeleton. - * + * * A value between 0 and 1. * * This is a global value, impacting the entire Skeleton, not just a region of it. @@ -27052,7 +31726,7 @@ var SpineGameObject = new Class({ /** * The amount of green used when rendering the Skeleton. - * + * * A value between 0 and 1. * * This is a global value, impacting the entire Skeleton, not just a region of it. @@ -27082,7 +31756,7 @@ var SpineGameObject = new Class({ /** * The amount of blue used when rendering the Skeleton. - * + * * A value between 0 and 1. * * This is a global value, impacting the entire Skeleton, not just a region of it. @@ -27118,7 +31792,7 @@ var SpineGameObject = new Class({ * * @param {integer} [color=0xffffff] - The color being applied to the Skeleton or named Slot. Set to white to disable any previously set color. * @param {string} [slotName] - The name of the slot to set the color on. If not give, will be set on the whole skeleton. - * + * * @return {this} This Game Object instance. */ setColor: function (color, slotName) @@ -27160,7 +31834,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#setSkeletonFromJSON * @since 3.19.0 - * + * * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton. * @param {object} skeletonJSON - The JSON data for the Skeleton. * @param {string} [animationName] - Optional name of the animation to set on the Skeleton. @@ -27175,13 +31849,13 @@ var SpineGameObject = new Class({ /** * Sets this Game Object to use the given Skeleton based on its cache key. - * + * * Typically, once set, the Skeleton doesn't change. Instead, you change the skin, * or slot attachment, or any other property to adjust it. * * @method SpineGameObject#setSkeleton * @since 3.19.0 - * + * * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton. * @param {object} skeletonJSON - The JSON data for the Skeleton. * @param {string} [animationName] - Optional name of the animation to set on the Skeleton. @@ -27258,7 +31932,7 @@ var SpineGameObject = new Class({ * @fires SpinePluginEvents#COMPLETE * @private * @since 3.19.0 - * + * * @param {any} entry - The event data from Spine. */ onComplete: function (entry) @@ -27273,7 +31947,7 @@ var SpineGameObject = new Class({ * @fires SpinePluginEvents#DISPOSE * @private * @since 3.19.0 - * + * * @param {any} entry - The event data from Spine. */ onDispose: function (entry) @@ -27288,7 +31962,7 @@ var SpineGameObject = new Class({ * @fires SpinePluginEvents#END * @private * @since 3.19.0 - * + * * @param {any} entry - The event data from Spine. */ onEnd: function (entry) @@ -27303,7 +31977,7 @@ var SpineGameObject = new Class({ * @fires SpinePluginEvents#EVENT * @private * @since 3.19.0 - * + * * @param {any} entry - The event data from Spine. * @param {spine.Event} event - The Spine event. */ @@ -27319,7 +31993,7 @@ var SpineGameObject = new Class({ * @fires SpinePluginEvents#INTERRUPTED * @private * @since 3.19.0 - * + * * @param {any} entry - The event data from Spine. */ onInterrupted: function (entry) @@ -27334,7 +32008,7 @@ var SpineGameObject = new Class({ * @fires SpinePluginEvents#START * @private * @since 3.19.0 - * + * * @param {any} entry - The event data from Spine. */ onStart: function (entry) @@ -27344,15 +32018,15 @@ var SpineGameObject = new Class({ /** * Refreshes the data about the current Skeleton. - * + * * This will reset the rotation, position and size of the Skeleton to match this Game Object. - * + * * Call this method if you need to access the Skeleton data directly, and it may have changed * recently. * * @method SpineGameObject#refresh * @since 3.19.0 - * + * * @return {this} This Game Object. */ refresh: function () @@ -27372,20 +32046,20 @@ var SpineGameObject = new Class({ /** * Sets the size of this Game Object. - * + * * If no arguments are given it uses the current skeleton data dimensions. - * + * * You can use this method to set a fixed size of this Game Object, such as for input detection, * when the skeleton data doesn't match what is required in-game. * * @method SpineGameObject#setSize * @since 3.19.0 - * + * * @param {number} [width] - The width of the Skeleton. If not given it defaults to the Skeleton Data width. * @param {number} [height] - The height of the Skeleton. If not given it defaults to the Skeleton Data height. * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate. * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate. - * + * * @return {this} This Game Object. */ setSize: function (width, height, offsetX, offsetY) @@ -27408,15 +32082,15 @@ var SpineGameObject = new Class({ /** * Sets the offset of this Game Object from the Skeleton position. - * + * * You can use this method to adjust how the position of this Game Object relates to the Skeleton it is using. * * @method SpineGameObject#setOffset * @since 3.19.0 - * + * * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate. * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate. - * + * * @return {this} This Game Object. */ setOffset: function (offsetX, offsetY) @@ -27435,13 +32109,13 @@ var SpineGameObject = new Class({ /** * Internal method that syncs all of the Game Object position and scale data to the Skeleton. * It then syncs the skeleton bounds back to this Game Object. - * + * * This method is called automatically as needed internally, however, it's also exposed should * you require overriding the size settings. * * @method SpineGameObject#updateSize * @since 3.19.0 - * + * * @return {this} This Game Object. */ updateSize: function () @@ -27530,7 +32204,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getBoneList * @since 3.19.0 - * + * * @return {string[]} An array containing the names of all the bones in the Skeleton Data. */ getBoneList: function () @@ -27555,7 +32229,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getSkinList * @since 3.19.0 - * + * * @return {string[]} An array containing the names of all the skins in the Skeleton Data. */ getSkinList: function () @@ -27580,7 +32254,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getSlotList * @since 3.19.0 - * + * * @return {string[]} An array containing the names of all the slots in the Skeleton. */ getSlotList: function () @@ -27602,7 +32276,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getAnimationList * @since 3.19.0 - * + * * @return {string[]} An array containing the names of all the animations in the Skeleton Data. */ getAnimationList: function () @@ -27627,9 +32301,9 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getCurrentAnimation * @since 3.19.0 - * + * * @param {integer} [trackIndex=0] - The track to return the current animation on. - * + * * @return {?spine.Animation} The current Animation on the given track, or `undefined` if there is no current animation. */ getCurrentAnimation: function (trackIndex) @@ -27647,7 +32321,7 @@ var SpineGameObject = new Class({ /** * Sets the current animation for a track, discarding any queued animations. * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from). - * + * * Animations are referenced by a unique string-based key, as defined in the Spine software. * * @method SpineGameObject#play @@ -27670,7 +32344,7 @@ var SpineGameObject = new Class({ /** * Sets the current animation for a track, discarding any queued animations. * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from). - * + * * Animations are referenced by a unique string-based key, as defined in the Spine software. * * @method SpineGameObject#setAnimation @@ -27692,7 +32366,7 @@ var SpineGameObject = new Class({ if (ignoreIfPlaying && this.state) { var currentTrack = this.state.getCurrent(0); - + if (currentTrack && currentTrack.animation.name === animationName && !currentTrack.isComplete()) { return; @@ -27708,9 +32382,9 @@ var SpineGameObject = new Class({ /** * Adds an animation to be played after the current or last queued animation for a track. * If the track is empty, it is equivalent to calling setAnimation. - * + * * Animations are referenced by a unique string-based key, as defined in the Spine software. - * + * * The delay is a float. If > 0, sets delay. If <= 0, the delay set is the duration of the previous * track entry minus any mix duration (from the AnimationStateData) plus the specified delay * (ie the mix ends at (delay = 0) or before (delay < 0) the previous track entry duration). @@ -27734,13 +32408,13 @@ var SpineGameObject = new Class({ /** * Sets an empty animation for a track, discarding any queued animations, and sets the track * entry's mixDuration. An empty animation has no timelines and serves as a placeholder for mixing in or out. - * + * * Mixing out is done by setting an empty animation with a mix duration using either setEmptyAnimation, * setEmptyAnimations, or addEmptyAnimation. Mixing to an empty animation causes the previous animation to be * applied less and less over the mix duration. Properties keyed in the previous animation transition to * the value from lower tracks or to the setup pose value if no lower tracks key the property. * A mix duration of 0 still mixes out over one frame. - * + * * Mixing in is done by first setting an empty animation, then adding an animation using addAnimation * and on the returned track entry, set the mixDuration. Mixing from an empty animation causes the new * animation to be applied more and more over the mix duration. Properties keyed in the new animation @@ -27762,7 +32436,7 @@ var SpineGameObject = new Class({ /** * Removes all animations from the track, leaving skeletons in their current pose. - * + * * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose, * rather than leaving them in their current pose. * @@ -27779,10 +32453,10 @@ var SpineGameObject = new Class({ return this; }, - + /** * Removes all animations from all tracks, leaving skeletons in their current pose. - * + * * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose, * rather than leaving them in their current pose. * @@ -27800,11 +32474,11 @@ var SpineGameObject = new Class({ /** * Sets the skin used to look up attachments before looking in the defaultSkin. - * + * * Attachments from the new skin are attached if the corresponding attachment from the * old skin was attached. If there was no old skin, each slot's setup mode attachment is * attached from the new skin. - * + * * After changing the skin, the visible attachments can be reset to those attached in the * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide @@ -27812,7 +32486,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#setSkinByName * @since 3.19.0 - * + * * @param {string} skinName - The name of the skin to set. * * @return {this} This Game Object. @@ -27832,11 +32506,11 @@ var SpineGameObject = new Class({ /** * Sets the skin used to look up attachments before looking in the defaultSkin. - * + * * Attachments from the new skin are attached if the corresponding attachment from the * old skin was attached. If there was no old skin, each slot's setup mode attachment is * attached from the new skin. - * + * * After changing the skin, the visible attachments can be reset to those attached in the * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide @@ -27844,7 +32518,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#setSkin * @since 3.19.0 - * + * * @param {?spine.Skin} newSkin - The Skin to set. May be `null`. * * @return {this} This Game Object. @@ -27867,7 +32541,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#setMix * @since 3.19.0 - * + * * @param {string} fromName - The animation to mix from. * @param {string} toName - The animation to mix to. * @param {number} [duration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any). @@ -27888,7 +32562,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getAttachment * @since 3.19.0 - * + * * @param {integer} slotIndex - The slot index to search. * @param {string} attachmentName - The attachment name to look for. * @@ -27904,7 +32578,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getAttachmentByName * @since 3.19.0 - * + * * @param {string} slotName - The slot name to search. * @param {string} attachmentName - The attachment name to look for. * @@ -27921,7 +32595,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#setAttachment * @since 3.19.0 - * + * * @param {string} slotName - The slot name to add the attachment to. * @param {string} attachmentName - The attachment name to add. * @@ -28009,7 +32683,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#angleBoneToXY * @since 3.19.0 - * + * * @param {spine.Bone} bone - The bone to rotate towards the world position. * @param {number} worldX - The world x coordinate to rotate the bone towards. * @param {number} worldY - The world y coordinate to rotate the bone towards. @@ -28041,7 +32715,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findBone * @since 3.19.0 - * + * * @param {string} boneName - The name of the bone to find. * * @return {spine.Bone} The bone, or null. @@ -28057,7 +32731,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findBoneIndex * @since 3.19.0 - * + * * @param {string} boneName - The name of the bone to find. * * @return {integer} The bone index. Or -1 if the bone was not found. @@ -28073,7 +32747,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findSlot * @since 3.19.0 - * + * * @param {string} slotName - The name of the slot to find. * * @return {spine.Slot} The Slot. May be null. @@ -28089,7 +32763,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findSlotIndex * @since 3.19.0 - * + * * @param {string} slotName - The name of the slot to find. * * @return {integer} The slot index. Or -1 if the Slot was not found. @@ -28105,7 +32779,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findSkin * @since 3.19.0 - * + * * @param {string} skinName - The name of the skin to find. * * @return {spine.Skin} The Skin. May be null. @@ -28121,7 +32795,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findEvent * @since 3.19.0 - * + * * @param {string} eventDataName - The name of the event to find. * * @return {spine.EventData} The Event Data. May be null. @@ -28137,7 +32811,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findAnimation * @since 3.19.0 - * + * * @param {string} animationName - The name of the animation to find. * * @return {spine.Animation} The Animation. May be null. @@ -28153,7 +32827,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findIkConstraint * @since 3.19.0 - * + * * @param {string} constraintName - The name of the constraint to find. * * @return {spine.IkConstraintData} The IK constraint. May be null. @@ -28169,7 +32843,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findTransformConstraint * @since 3.19.0 - * + * * @param {string} constraintName - The name of the constraint to find. * * @return {spine.TransformConstraintData} The transform constraint. May be null. @@ -28185,7 +32859,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findPathConstraint * @since 3.19.0 - * + * * @param {string} constraintName - The name of the constraint to find. * * @return {spine.PathConstraintData} The path constraint. May be null. @@ -28201,7 +32875,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findPathConstraintIndex * @since 3.19.0 - * + * * @param {string} constraintName - The name of the constraint to find. * * @return {integer} The constraint index. Or -1 if the constraint was not found. @@ -28213,15 +32887,15 @@ var SpineGameObject = new Class({ /** * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose. - * + * * The returned object contains two properties: `offset` and `size`: - * + * * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB. * `size` - The width and height of the AABB. * * @method SpineGameObject#getBounds * @since 3.19.0 - * + * * @return {any} The bounds object. */ getBounds: function () @@ -28235,7 +32909,7 @@ var SpineGameObject = new Class({ * @method SpineGameObject#preUpdate * @protected * @since 3.19.0 - * + * * @param {number} time - The current timestamp. * @param {number} delta - The delta time, in ms, elapsed since the last frame. */ @@ -28278,1111 +32952,7 @@ module.exports = SpineGameObject; /***/ }), -/* 195 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Provides methods used for calculating and setting the size of a non-Frame based Game Object. - * Should be applied as a mixin and not used directly. - * - * @namespace Phaser.GameObjects.Components.ComputedSize - * @since 3.0.0 - */ - -var ComputedSize = { - - /** - * The native (un-scaled) width of this Game Object. - * - * Changing this value will not change the size that the Game Object is rendered in-game. - * For that you need to either set the scale of the Game Object (`setScale`) or use - * the `displayWidth` property. - * - * @name Phaser.GameObjects.Components.ComputedSize#width - * @type {number} - * @since 3.0.0 - */ - width: 0, - - /** - * The native (un-scaled) height of this Game Object. - * - * Changing this value will not change the size that the Game Object is rendered in-game. - * For that you need to either set the scale of the Game Object (`setScale`) or use - * the `displayHeight` property. - * - * @name Phaser.GameObjects.Components.ComputedSize#height - * @type {number} - * @since 3.0.0 - */ - height: 0, - - /** - * The displayed width of this Game Object. - * - * This value takes into account the scale factor. - * - * Setting this value will adjust the Game Object's scale property. - * - * @name Phaser.GameObjects.Components.ComputedSize#displayWidth - * @type {number} - * @since 3.0.0 - */ - displayWidth: { - - get: function () - { - return this.scaleX * this.width; - }, - - set: function (value) - { - this.scaleX = value / this.width; - } - - }, - - /** - * The displayed height of this Game Object. - * - * This value takes into account the scale factor. - * - * Setting this value will adjust the Game Object's scale property. - * - * @name Phaser.GameObjects.Components.ComputedSize#displayHeight - * @type {number} - * @since 3.0.0 - */ - displayHeight: { - - get: function () - { - return this.scaleY * this.height; - }, - - set: function (value) - { - this.scaleY = value / this.height; - } - - }, - - /** - * Sets the internal size of this Game Object, as used for frame or physics body creation. - * - * This will not change the size that the Game Object is rendered in-game. - * For that you need to either set the scale of the Game Object (`setScale`) or call the - * `setDisplaySize` method, which is the same thing as changing the scale but allows you - * to do so by giving pixel values. - * - * If you have enabled this Game Object for input, changing the size will _not_ change the - * size of the hit area. To do this you should adjust the `input.hitArea` object directly. - * - * @method Phaser.GameObjects.Components.ComputedSize#setSize - * @since 3.4.0 - * - * @param {number} width - The width of this Game Object. - * @param {number} height - The height of this Game Object. - * - * @return {this} This Game Object instance. - */ - setSize: function (width, height) - { - this.width = width; - this.height = height; - - return this; - }, - - /** - * Sets the display size of this Game Object. - * - * Calling this will adjust the scale. - * - * @method Phaser.GameObjects.Components.ComputedSize#setDisplaySize - * @since 3.4.0 - * - * @param {number} width - The width of this Game Object. - * @param {number} height - The height of this Game Object. - * - * @return {this} This Game Object instance. - */ - setDisplaySize: function (width, height) - { - this.displayWidth = width; - this.displayHeight = height; - - return this; - } - -}; - -module.exports = ComputedSize; - - -/***/ }), -/* 196 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Provides methods used for setting the depth of a Game Object. - * Should be applied as a mixin and not used directly. - * - * @namespace Phaser.GameObjects.Components.Depth - * @since 3.0.0 - */ - -var Depth = { - - /** - * Private internal value. Holds the depth of the Game Object. - * - * @name Phaser.GameObjects.Components.Depth#_depth - * @type {integer} - * @private - * @default 0 - * @since 3.0.0 - */ - _depth: 0, - - /** - * The depth of this Game Object within the Scene. - * - * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order - * of Game Objects, without actually moving their position in the display list. - * - * The default depth is zero. A Game Object with a higher depth - * value will always render in front of one with a lower value. - * - * Setting the depth will queue a depth sort event within the Scene. - * - * @name Phaser.GameObjects.Components.Depth#depth - * @type {number} - * @since 3.0.0 - */ - depth: { - - get: function () - { - return this._depth; - }, - - set: function (value) - { - this.scene.sys.queueDepthSort(); - this._depth = value; - } - - }, - - /** - * The depth of this Game Object within the Scene. - * - * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order - * of Game Objects, without actually moving their position in the display list. - * - * The default depth is zero. A Game Object with a higher depth - * value will always render in front of one with a lower value. - * - * Setting the depth will queue a depth sort event within the Scene. - * - * @method Phaser.GameObjects.Components.Depth#setDepth - * @since 3.0.0 - * - * @param {integer} value - The depth of this Game Object. - * - * @return {this} This Game Object instance. - */ - setDepth: function (value) - { - if (value === undefined) { value = 0; } - - this.depth = value; - - return this; - } - -}; - -module.exports = Depth; - - -/***/ }), -/* 197 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Provides methods used for visually flipping a Game Object. - * Should be applied as a mixin and not used directly. - * - * @namespace Phaser.GameObjects.Components.Flip - * @since 3.0.0 - */ - -var Flip = { - - /** - * The horizontally flipped state of the Game Object. - * - * A Game Object that is flipped horizontally will render inversed on the horizontal axis. - * Flipping always takes place from the middle of the texture and does not impact the scale value. - * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - * - * @name Phaser.GameObjects.Components.Flip#flipX - * @type {boolean} - * @default false - * @since 3.0.0 - */ - flipX: false, - - /** - * The vertically flipped state of the Game Object. - * - * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) - * Flipping always takes place from the middle of the texture and does not impact the scale value. - * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - * - * @name Phaser.GameObjects.Components.Flip#flipY - * @type {boolean} - * @default false - * @since 3.0.0 - */ - flipY: false, - - /** - * Toggles the horizontal flipped state of this Game Object. - * - * A Game Object that is flipped horizontally will render inversed on the horizontal axis. - * Flipping always takes place from the middle of the texture and does not impact the scale value. - * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - * - * @method Phaser.GameObjects.Components.Flip#toggleFlipX - * @since 3.0.0 - * - * @return {this} This Game Object instance. - */ - toggleFlipX: function () - { - this.flipX = !this.flipX; - - return this; - }, - - /** - * Toggles the vertical flipped state of this Game Object. - * - * @method Phaser.GameObjects.Components.Flip#toggleFlipY - * @since 3.0.0 - * - * @return {this} This Game Object instance. - */ - toggleFlipY: function () - { - this.flipY = !this.flipY; - - return this; - }, - - /** - * Sets the horizontal flipped state of this Game Object. - * - * A Game Object that is flipped horizontally will render inversed on the horizontal axis. - * Flipping always takes place from the middle of the texture and does not impact the scale value. - * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - * - * @method Phaser.GameObjects.Components.Flip#setFlipX - * @since 3.0.0 - * - * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped. - * - * @return {this} This Game Object instance. - */ - setFlipX: function (value) - { - this.flipX = value; - - return this; - }, - - /** - * Sets the vertical flipped state of this Game Object. - * - * @method Phaser.GameObjects.Components.Flip#setFlipY - * @since 3.0.0 - * - * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped. - * - * @return {this} This Game Object instance. - */ - setFlipY: function (value) - { - this.flipY = value; - - return this; - }, - - /** - * Sets the horizontal and vertical flipped state of this Game Object. - * - * A Game Object that is flipped will render inversed on the flipped axis. - * Flipping always takes place from the middle of the texture and does not impact the scale value. - * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - * - * @method Phaser.GameObjects.Components.Flip#setFlip - * @since 3.0.0 - * - * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped. - * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped. - * - * @return {this} This Game Object instance. - */ - setFlip: function (x, y) - { - this.flipX = x; - this.flipY = y; - - return this; - }, - - /** - * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state. - * - * @method Phaser.GameObjects.Components.Flip#resetFlip - * @since 3.0.0 - * - * @return {this} This Game Object instance. - */ - resetFlip: function () - { - this.flipX = false; - this.flipY = false; - - return this; - } - -}; - -module.exports = Flip; - - -/***/ }), -/* 198 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Provides methods used for getting and setting the Scroll Factor of a Game Object. - * - * @namespace Phaser.GameObjects.Components.ScrollFactor - * @since 3.0.0 - */ - -var ScrollFactor = { - - /** - * 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. - * - * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorX - * @type {number} - * @default 1 - * @since 3.0.0 - */ - scrollFactorX: 1, - - /** - * 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. - * - * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorY - * @type {number} - * @default 1 - * @since 3.0.0 - */ - scrollFactorY: 1, - - /** - * 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. - * - * @method Phaser.GameObjects.Components.ScrollFactor#setScrollFactor - * @since 3.0.0 - * - * @param {number} x - The horizontal scroll factor of this Game Object. - * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value. - * - * @return {this} This Game Object instance. - */ - setScrollFactor: function (x, y) - { - if (y === undefined) { y = x; } - - this.scrollFactorX = x; - this.scrollFactorY = y; - - return this; - } - -}; - -module.exports = ScrollFactor; - - -/***/ }), -/* 199 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var MATH_CONST = __webpack_require__(1); -var TransformMatrix = __webpack_require__(200); -var TransformXY = __webpack_require__(28); -var WrapAngle = __webpack_require__(18); -var WrapAngleDegrees = __webpack_require__(19); -var Vector2 = __webpack_require__(4); - -// global bitmask flag for GameObject.renderMask (used by Scale) -var _FLAG = 4; // 0100 - -/** - * Provides methods used for getting and setting the position, scale and rotation of a Game Object. - * - * @namespace Phaser.GameObjects.Components.Transform - * @since 3.0.0 - */ - -var Transform = { - - /** - * Private internal value. Holds the horizontal scale value. - * - * @name Phaser.GameObjects.Components.Transform#_scaleX - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - _scaleX: 1, - - /** - * Private internal value. Holds the vertical scale value. - * - * @name Phaser.GameObjects.Components.Transform#_scaleY - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - _scaleY: 1, - - /** - * Private internal value. Holds the rotation value in radians. - * - * @name Phaser.GameObjects.Components.Transform#_rotation - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - _rotation: 0, - - /** - * The x position of this Game Object. - * - * @name Phaser.GameObjects.Components.Transform#x - * @type {number} - * @default 0 - * @since 3.0.0 - */ - x: 0, - - /** - * The y position of this Game Object. - * - * @name Phaser.GameObjects.Components.Transform#y - * @type {number} - * @default 0 - * @since 3.0.0 - */ - y: 0, - - /** - * The z position of this Game Object. - * - * Note: The z position does not control the rendering order of 2D Game Objects. Use - * {@link Phaser.GameObjects.Components.Depth#depth} instead. - * - * @name Phaser.GameObjects.Components.Transform#z - * @type {number} - * @default 0 - * @since 3.0.0 - */ - z: 0, - - /** - * The w position of this Game Object. - * - * @name Phaser.GameObjects.Components.Transform#w - * @type {number} - * @default 0 - * @since 3.0.0 - */ - w: 0, - - /** - * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object - * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`. - * - * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this - * isn't the case, use the `scaleX` or `scaleY` properties instead. - * - * @name Phaser.GameObjects.Components.Transform#scale - * @type {number} - * @default 1 - * @since 3.18.0 - */ - scale: { - - get: function () - { - return (this._scaleX + this._scaleY) / 2; - }, - - set: function (value) - { - this._scaleX = value; - this._scaleY = value; - - if (value === 0) - { - this.renderFlags &= ~_FLAG; - } - else - { - this.renderFlags |= _FLAG; - } - } - - }, - - /** - * The horizontal scale of this Game Object. - * - * @name Phaser.GameObjects.Components.Transform#scaleX - * @type {number} - * @default 1 - * @since 3.0.0 - */ - scaleX: { - - get: function () - { - return this._scaleX; - }, - - set: function (value) - { - this._scaleX = value; - - if (value === 0) - { - this.renderFlags &= ~_FLAG; - } - else - { - this.renderFlags |= _FLAG; - } - } - - }, - - /** - * The vertical scale of this Game Object. - * - * @name Phaser.GameObjects.Components.Transform#scaleY - * @type {number} - * @default 1 - * @since 3.0.0 - */ - scaleY: { - - get: function () - { - return this._scaleY; - }, - - set: function (value) - { - this._scaleY = value; - - if (value === 0) - { - this.renderFlags &= ~_FLAG; - } - else - { - this.renderFlags |= _FLAG; - } - } - - }, - - /** - * The angle of this Game Object as expressed in degrees. - * - * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left - * and -90 is up. - * - * If you prefer to work in radians, see the `rotation` property instead. - * - * @name Phaser.GameObjects.Components.Transform#angle - * @type {integer} - * @default 0 - * @since 3.0.0 - */ - angle: { - - get: function () - { - return WrapAngleDegrees(this._rotation * MATH_CONST.RAD_TO_DEG); - }, - - set: function (value) - { - // value is in degrees - this.rotation = WrapAngleDegrees(value) * MATH_CONST.DEG_TO_RAD; - } - }, - - /** - * The angle of this Game Object in radians. - * - * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left - * and -PI/2 is up. - * - * If you prefer to work in degrees, see the `angle` property instead. - * - * @name Phaser.GameObjects.Components.Transform#rotation - * @type {number} - * @default 1 - * @since 3.0.0 - */ - rotation: { - - get: function () - { - return this._rotation; - }, - - set: function (value) - { - // value is in radians - this._rotation = WrapAngle(value); - } - }, - - /** - * Sets the position of this Game Object. - * - * @method Phaser.GameObjects.Components.Transform#setPosition - * @since 3.0.0 - * - * @param {number} [x=0] - The x position of this Game Object. - * @param {number} [y=x] - The y position of this Game Object. If not set it will use the `x` value. - * @param {number} [z=0] - The z position of this Game Object. - * @param {number} [w=0] - The w position of this Game Object. - * - * @return {this} This Game Object instance. - */ - setPosition: function (x, y, z, w) - { - if (x === undefined) { x = 0; } - if (y === undefined) { y = x; } - if (z === undefined) { z = 0; } - if (w === undefined) { w = 0; } - - this.x = x; - this.y = y; - this.z = z; - this.w = w; - - return this; - }, - - /** - * Sets the position of this Game Object to be a random position within the confines of - * the given area. - * - * If no area is specified a random position between 0 x 0 and the game width x height is used instead. - * - * The position does not factor in the size of this Game Object, meaning that only the origin is - * guaranteed to be within the area. - * - * @method Phaser.GameObjects.Components.Transform#setRandomPosition - * @since 3.8.0 - * - * @param {number} [x=0] - The x position of the top-left of the random area. - * @param {number} [y=0] - The y position of the top-left of the random area. - * @param {number} [width] - The width of the random area. - * @param {number} [height] - The height of the random area. - * - * @return {this} This Game Object instance. - */ - setRandomPosition: function (x, y, width, height) - { - if (x === undefined) { x = 0; } - if (y === undefined) { y = 0; } - if (width === undefined) { width = this.scene.sys.scale.width; } - if (height === undefined) { height = this.scene.sys.scale.height; } - - this.x = x + (Math.random() * width); - this.y = y + (Math.random() * height); - - return this; - }, - - /** - * Sets the rotation of this Game Object. - * - * @method Phaser.GameObjects.Components.Transform#setRotation - * @since 3.0.0 - * - * @param {number} [radians=0] - The rotation of this Game Object, in radians. - * - * @return {this} This Game Object instance. - */ - setRotation: function (radians) - { - if (radians === undefined) { radians = 0; } - - this.rotation = radians; - - return this; - }, - - /** - * Sets the angle of this Game Object. - * - * @method Phaser.GameObjects.Components.Transform#setAngle - * @since 3.0.0 - * - * @param {number} [degrees=0] - The rotation of this Game Object, in degrees. - * - * @return {this} This Game Object instance. - */ - setAngle: function (degrees) - { - if (degrees === undefined) { degrees = 0; } - - this.angle = degrees; - - return this; - }, - - /** - * Sets the scale of this Game Object. - * - * @method Phaser.GameObjects.Components.Transform#setScale - * @since 3.0.0 - * - * @param {number} x - 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. - */ - setScale: function (x, y) - { - if (x === undefined) { x = 1; } - if (y === undefined) { y = x; } - - this.scaleX = x; - this.scaleY = y; - - return this; - }, - - /** - * Sets the x position of this Game Object. - * - * @method Phaser.GameObjects.Components.Transform#setX - * @since 3.0.0 - * - * @param {number} [value=0] - The x position of this Game Object. - * - * @return {this} This Game Object instance. - */ - setX: function (value) - { - if (value === undefined) { value = 0; } - - this.x = value; - - return this; - }, - - /** - * Sets the y position of this Game Object. - * - * @method Phaser.GameObjects.Components.Transform#setY - * @since 3.0.0 - * - * @param {number} [value=0] - The y position of this Game Object. - * - * @return {this} This Game Object instance. - */ - setY: function (value) - { - if (value === undefined) { value = 0; } - - this.y = value; - - return this; - }, - - /** - * Sets the z position of this Game Object. - * - * Note: The z position does not control the rendering order of 2D Game Objects. Use - * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. - * - * @method Phaser.GameObjects.Components.Transform#setZ - * @since 3.0.0 - * - * @param {number} [value=0] - The z position of this Game Object. - * - * @return {this} This Game Object instance. - */ - setZ: function (value) - { - if (value === undefined) { value = 0; } - - this.z = value; - - return this; - }, - - /** - * Sets the w position of this Game Object. - * - * @method Phaser.GameObjects.Components.Transform#setW - * @since 3.0.0 - * - * @param {number} [value=0] - The w position of this Game Object. - * - * @return {this} This Game Object instance. - */ - setW: function (value) - { - if (value === undefined) { value = 0; } - - this.w = value; - - return this; - }, - - /** - * Gets the local transform matrix for this Game Object. - * - * @method Phaser.GameObjects.Components.Transform#getLocalTransformMatrix - * @since 3.4.0 - * - * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object. - * - * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix. - */ - getLocalTransformMatrix: function (tempMatrix) - { - if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); } - - return tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY); - }, - - /** - * Gets the world transform matrix for this Game Object, factoring in any parent Containers. - * - * @method Phaser.GameObjects.Components.Transform#getWorldTransformMatrix - * @since 3.4.0 - * - * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object. - * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A temporary matrix to hold parent values during the calculations. - * - * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix. - */ - getWorldTransformMatrix: function (tempMatrix, parentMatrix) - { - if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); } - if (parentMatrix === undefined) { parentMatrix = new TransformMatrix(); } - - var parent = this.parentContainer; - - if (!parent) - { - return this.getLocalTransformMatrix(tempMatrix); - } - - tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY); - - while (parent) - { - parentMatrix.applyITRS(parent.x, parent.y, parent._rotation, parent._scaleX, parent._scaleY); - - parentMatrix.multiply(tempMatrix, tempMatrix); - - parent = parent.parentContainer; - } - - return tempMatrix; - }, - - /** - * Takes the given `x` and `y` coordinates and converts them into local space for this - * Game Object, taking into account parent and local transforms, and the Display Origin. - * - * The returned Vector2 contains the translated point in its properties. - * - * A Camera needs to be provided in order to handle modified scroll factors. If no - * camera is specified, it will use the `main` camera from the Scene to which this - * Game Object belongs. - * - * @method Phaser.GameObjects.Components.Transform#getLocalPoint - * @since 3.50.0 - * - * @param {number} x - The x position to translate. - * @param {number} y - The y position to translate. - * @param {Phaser.Math.Vector2} [point] - A Vector2, or point-like object, to store the results in. - * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera which is being tested against. If not given will use the Scene default camera. - * - * @return {Phaser.Math.Vector2} The translated point. - */ - getLocalPoint: function (x, y, point, camera) - { - if (!point) { point = new Vector2(); } - if (!camera) { camera = this.scene.sys.cameras.main; } - - var csx = camera.scrollX; - var csy = camera.scrollY; - - var px = x + (csx * this.scrollFactorX) - csx; - var py = y + (csy * this.scrollFactorY) - csy; - - if (this.parentContainer) - { - this.getWorldTransformMatrix().applyInverse(px, py, point); - } - else - { - TransformXY(px, py, this.x, this.y, this.rotation, this.scaleX, this.scaleY, point); - } - - // Normalize origin - if (this._originComponent) - { - point.x += this._displayOriginX; - point.y += this._displayOriginY; - } - - return point; - }, - - /** - * Gets the sum total rotation of all of this Game Objects parent Containers. - * - * The returned value is in radians and will be zero if this Game Object has no parent container. - * - * @method Phaser.GameObjects.Components.Transform#getParentRotation - * @since 3.18.0 - * - * @return {number} The sum total rotation, in radians, of all parent containers of this Game Object. - */ - getParentRotation: function () - { - var rotation = 0; - - var parent = this.parentContainer; - - while (parent) - { - rotation += parent.rotation; - - parent = parent.parentContainer; - } - - return rotation; - } - -}; - -module.exports = Transform; - - -/***/ }), -/* 200 */ +/* 219 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29392,1915 +32962,7 @@ module.exports = Transform; */ var Class = __webpack_require__(0); -var MATH_CONST = __webpack_require__(1); -var Vector2 = __webpack_require__(4); - -/** - * @classdesc - * A Matrix used for display transformations for rendering. - * - * It is represented like so: - * - * ``` - * | a | c | tx | - * | b | d | ty | - * | 0 | 0 | 1 | - * ``` - * - * @class TransformMatrix - * @memberof Phaser.GameObjects.Components - * @constructor - * @since 3.0.0 - * - * @param {number} [a=1] - The Scale X value. - * @param {number} [b=0] - The Skew Y value. - * @param {number} [c=0] - The Skew X value. - * @param {number} [d=1] - The Scale Y value. - * @param {number} [tx=0] - The Translate X value. - * @param {number} [ty=0] - The Translate Y value. - */ -var TransformMatrix = new Class({ - - initialize: - - function TransformMatrix (a, b, c, d, tx, ty) - { - if (a === undefined) { a = 1; } - if (b === undefined) { b = 0; } - if (c === undefined) { c = 0; } - if (d === undefined) { d = 1; } - if (tx === undefined) { tx = 0; } - if (ty === undefined) { ty = 0; } - - /** - * The matrix values. - * - * @name Phaser.GameObjects.Components.TransformMatrix#matrix - * @type {Float32Array} - * @since 3.0.0 - */ - this.matrix = new Float32Array([ a, b, c, d, tx, ty, 0, 0, 1 ]); - - /** - * The decomposed matrix. - * - * @name Phaser.GameObjects.Components.TransformMatrix#decomposedMatrix - * @type {object} - * @since 3.0.0 - */ - this.decomposedMatrix = { - translateX: 0, - translateY: 0, - scaleX: 1, - scaleY: 1, - rotation: 0 - }; - }, - - /** - * The Scale X value. - * - * @name Phaser.GameObjects.Components.TransformMatrix#a - * @type {number} - * @since 3.4.0 - */ - a: { - - get: function () - { - return this.matrix[0]; - }, - - set: function (value) - { - this.matrix[0] = value; - } - - }, - - /** - * The Skew Y value. - * - * @name Phaser.GameObjects.Components.TransformMatrix#b - * @type {number} - * @since 3.4.0 - */ - b: { - - get: function () - { - return this.matrix[1]; - }, - - set: function (value) - { - this.matrix[1] = value; - } - - }, - - /** - * The Skew X value. - * - * @name Phaser.GameObjects.Components.TransformMatrix#c - * @type {number} - * @since 3.4.0 - */ - c: { - - get: function () - { - return this.matrix[2]; - }, - - set: function (value) - { - this.matrix[2] = value; - } - - }, - - /** - * The Scale Y value. - * - * @name Phaser.GameObjects.Components.TransformMatrix#d - * @type {number} - * @since 3.4.0 - */ - d: { - - get: function () - { - return this.matrix[3]; - }, - - set: function (value) - { - this.matrix[3] = value; - } - - }, - - /** - * The Translate X value. - * - * @name Phaser.GameObjects.Components.TransformMatrix#e - * @type {number} - * @since 3.11.0 - */ - e: { - - get: function () - { - return this.matrix[4]; - }, - - set: function (value) - { - this.matrix[4] = value; - } - - }, - - /** - * The Translate Y value. - * - * @name Phaser.GameObjects.Components.TransformMatrix#f - * @type {number} - * @since 3.11.0 - */ - f: { - - get: function () - { - return this.matrix[5]; - }, - - set: function (value) - { - this.matrix[5] = value; - } - - }, - - /** - * The Translate X value. - * - * @name Phaser.GameObjects.Components.TransformMatrix#tx - * @type {number} - * @since 3.4.0 - */ - tx: { - - get: function () - { - return this.matrix[4]; - }, - - set: function (value) - { - this.matrix[4] = value; - } - - }, - - /** - * The Translate Y value. - * - * @name Phaser.GameObjects.Components.TransformMatrix#ty - * @type {number} - * @since 3.4.0 - */ - ty: { - - get: function () - { - return this.matrix[5]; - }, - - set: function (value) - { - this.matrix[5] = value; - } - - }, - - /** - * The rotation of the Matrix. Value is in radians. - * - * @name Phaser.GameObjects.Components.TransformMatrix#rotation - * @type {number} - * @readonly - * @since 3.4.0 - */ - rotation: { - - get: function () - { - return Math.acos(this.a / this.scaleX) * ((Math.atan(-this.c / this.a) < 0) ? -1 : 1); - } - - }, - - /** - * The rotation of the Matrix, normalized to be within the Phaser right-handed - * clockwise rotation space. Value is in radians. - * - * @name Phaser.GameObjects.Components.TransformMatrix#rotationNormalized - * @type {number} - * @readonly - * @since 3.19.0 - */ - rotationNormalized: { - - get: function () - { - var matrix = this.matrix; - - var a = matrix[0]; - var b = matrix[1]; - var c = matrix[2]; - var d = matrix[3]; - - if (a || b) - { - // var r = Math.sqrt(a * a + b * b); - - return (b > 0) ? Math.acos(a / this.scaleX) : -Math.acos(a / this.scaleX); - } - else if (c || d) - { - // var s = Math.sqrt(c * c + d * d); - - return MATH_CONST.TAU - ((d > 0) ? Math.acos(-c / this.scaleY) : -Math.acos(c / this.scaleY)); - } - else - { - return 0; - } - } - - }, - - /** - * The decomposed horizontal scale of the Matrix. This value is always positive. - * - * @name Phaser.GameObjects.Components.TransformMatrix#scaleX - * @type {number} - * @readonly - * @since 3.4.0 - */ - scaleX: { - - get: function () - { - return Math.sqrt((this.a * this.a) + (this.b * this.b)); - } - - }, - - /** - * The decomposed vertical scale of the Matrix. This value is always positive. - * - * @name Phaser.GameObjects.Components.TransformMatrix#scaleY - * @type {number} - * @readonly - * @since 3.4.0 - */ - scaleY: { - - get: function () - { - return Math.sqrt((this.c * this.c) + (this.d * this.d)); - } - - }, - - /** - * Reset the Matrix to an identity matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#loadIdentity - * @since 3.0.0 - * - * @return {this} This TransformMatrix. - */ - loadIdentity: function () - { - var matrix = this.matrix; - - matrix[0] = 1; - matrix[1] = 0; - matrix[2] = 0; - matrix[3] = 1; - matrix[4] = 0; - matrix[5] = 0; - - return this; - }, - - /** - * Translate the Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#translate - * @since 3.0.0 - * - * @param {number} x - The horizontal translation value. - * @param {number} y - The vertical translation value. - * - * @return {this} This TransformMatrix. - */ - translate: function (x, y) - { - var matrix = this.matrix; - - matrix[4] = matrix[0] * x + matrix[2] * y + matrix[4]; - matrix[5] = matrix[1] * x + matrix[3] * y + matrix[5]; - - return this; - }, - - /** - * Scale the Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#scale - * @since 3.0.0 - * - * @param {number} x - The horizontal scale value. - * @param {number} y - The vertical scale value. - * - * @return {this} This TransformMatrix. - */ - scale: function (x, y) - { - var matrix = this.matrix; - - matrix[0] *= x; - matrix[1] *= x; - matrix[2] *= y; - matrix[3] *= y; - - return this; - }, - - /** - * Rotate the Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#rotate - * @since 3.0.0 - * - * @param {number} angle - The angle of rotation in radians. - * - * @return {this} This TransformMatrix. - */ - rotate: function (angle) - { - var sin = Math.sin(angle); - var cos = Math.cos(angle); - - var matrix = this.matrix; - - var a = matrix[0]; - var b = matrix[1]; - var c = matrix[2]; - var d = matrix[3]; - - matrix[0] = a * cos + c * sin; - matrix[1] = b * cos + d * sin; - matrix[2] = a * -sin + c * cos; - matrix[3] = b * -sin + d * cos; - - return this; - }, - - /** - * Multiply this Matrix by the given Matrix. - * - * If an `out` Matrix is given then the results will be stored in it. - * If it is not given, this matrix will be updated in place instead. - * Use an `out` Matrix if you do not wish to mutate this matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#multiply - * @since 3.0.0 - * - * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by. - * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in. - * - * @return {(this|Phaser.GameObjects.Components.TransformMatrix)} Either this TransformMatrix, or the `out` Matrix, if given in the arguments. - */ - multiply: function (rhs, out) - { - var matrix = this.matrix; - var source = rhs.matrix; - - var localA = matrix[0]; - var localB = matrix[1]; - var localC = matrix[2]; - var localD = matrix[3]; - var localE = matrix[4]; - var localF = matrix[5]; - - var sourceA = source[0]; - var sourceB = source[1]; - var sourceC = source[2]; - var sourceD = source[3]; - var sourceE = source[4]; - var sourceF = source[5]; - - var destinationMatrix = (out === undefined) ? this : out; - - destinationMatrix.a = (sourceA * localA) + (sourceB * localC); - destinationMatrix.b = (sourceA * localB) + (sourceB * localD); - destinationMatrix.c = (sourceC * localA) + (sourceD * localC); - destinationMatrix.d = (sourceC * localB) + (sourceD * localD); - destinationMatrix.e = (sourceE * localA) + (sourceF * localC) + localE; - destinationMatrix.f = (sourceE * localB) + (sourceF * localD) + localF; - - return destinationMatrix; - }, - - /** - * Multiply this Matrix by the matrix given, including the offset. - * - * The offsetX is added to the tx value: `offsetX * a + offsetY * c + tx`. - * The offsetY is added to the ty value: `offsetY * b + offsetY * d + ty`. - * - * @method Phaser.GameObjects.Components.TransformMatrix#multiplyWithOffset - * @since 3.11.0 - * - * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from. - * @param {number} offsetX - Horizontal offset to factor in to the multiplication. - * @param {number} offsetY - Vertical offset to factor in to the multiplication. - * - * @return {this} This TransformMatrix. - */ - multiplyWithOffset: function (src, offsetX, offsetY) - { - var matrix = this.matrix; - var otherMatrix = src.matrix; - - var a0 = matrix[0]; - var b0 = matrix[1]; - var c0 = matrix[2]; - var d0 = matrix[3]; - var tx0 = matrix[4]; - var ty0 = matrix[5]; - - var pse = offsetX * a0 + offsetY * c0 + tx0; - var psf = offsetX * b0 + offsetY * d0 + ty0; - - var a1 = otherMatrix[0]; - var b1 = otherMatrix[1]; - var c1 = otherMatrix[2]; - var d1 = otherMatrix[3]; - var tx1 = otherMatrix[4]; - var ty1 = otherMatrix[5]; - - matrix[0] = a1 * a0 + b1 * c0; - matrix[1] = a1 * b0 + b1 * d0; - matrix[2] = c1 * a0 + d1 * c0; - matrix[3] = c1 * b0 + d1 * d0; - matrix[4] = tx1 * a0 + ty1 * c0 + pse; - matrix[5] = tx1 * b0 + ty1 * d0 + psf; - - return this; - }, - - /** - * Transform the Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#transform - * @since 3.0.0 - * - * @param {number} a - The Scale X value. - * @param {number} b - The Shear Y value. - * @param {number} c - The Shear X value. - * @param {number} d - The Scale Y value. - * @param {number} tx - The Translate X value. - * @param {number} ty - The Translate Y value. - * - * @return {this} This TransformMatrix. - */ - transform: function (a, b, c, d, tx, ty) - { - var matrix = this.matrix; - - var a0 = matrix[0]; - var b0 = matrix[1]; - var c0 = matrix[2]; - var d0 = matrix[3]; - var tx0 = matrix[4]; - var ty0 = matrix[5]; - - matrix[0] = a * a0 + b * c0; - matrix[1] = a * b0 + b * d0; - matrix[2] = c * a0 + d * c0; - matrix[3] = c * b0 + d * d0; - matrix[4] = tx * a0 + ty * c0 + tx0; - matrix[5] = tx * b0 + ty * d0 + ty0; - - return this; - }, - - /** - * Transform a point using this Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#transformPoint - * @since 3.0.0 - * - * @param {number} x - The x coordinate of the point to transform. - * @param {number} y - The y coordinate of the point to transform. - * @param {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} point - The Point object to store the transformed coordinates. - * - * @return {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} The Point containing the transformed coordinates. - */ - transformPoint: function (x, y, point) - { - if (point === undefined) { point = { x: 0, y: 0 }; } - - var matrix = this.matrix; - - var a = matrix[0]; - var b = matrix[1]; - var c = matrix[2]; - var d = matrix[3]; - var tx = matrix[4]; - var ty = matrix[5]; - - point.x = x * a + y * c + tx; - point.y = x * b + y * d + ty; - - return point; - }, - - /** - * Invert the Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#invert - * @since 3.0.0 - * - * @return {this} This TransformMatrix. - */ - invert: function () - { - var matrix = this.matrix; - - var a = matrix[0]; - var b = matrix[1]; - var c = matrix[2]; - var d = matrix[3]; - var tx = matrix[4]; - var ty = matrix[5]; - - var n = a * d - b * c; - - matrix[0] = d / n; - matrix[1] = -b / n; - matrix[2] = -c / n; - matrix[3] = a / n; - matrix[4] = (c * ty - d * tx) / n; - matrix[5] = -(a * ty - b * tx) / n; - - return this; - }, - - /** - * Set the values of this Matrix to copy those of the matrix given. - * - * @method Phaser.GameObjects.Components.TransformMatrix#copyFrom - * @since 3.11.0 - * - * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from. - * - * @return {this} This TransformMatrix. - */ - copyFrom: function (src) - { - var matrix = this.matrix; - - matrix[0] = src.a; - matrix[1] = src.b; - matrix[2] = src.c; - matrix[3] = src.d; - matrix[4] = src.e; - matrix[5] = src.f; - - return this; - }, - - /** - * Set the values of this Matrix to copy those of the array given. - * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f. - * - * @method Phaser.GameObjects.Components.TransformMatrix#copyFromArray - * @since 3.11.0 - * - * @param {array} src - The array of values to set into this matrix. - * - * @return {this} This TransformMatrix. - */ - copyFromArray: function (src) - { - var matrix = this.matrix; - - matrix[0] = src[0]; - matrix[1] = src[1]; - matrix[2] = src[2]; - matrix[3] = src[3]; - matrix[4] = src[4]; - matrix[5] = src[5]; - - return this; - }, - - /** - * Copy the values from this Matrix to the given Canvas Rendering Context. - * This will use the Context.transform method. - * - * @method Phaser.GameObjects.Components.TransformMatrix#copyToContext - * @since 3.12.0 - * - * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to. - * - * @return {CanvasRenderingContext2D} The Canvas Rendering Context. - */ - copyToContext: function (ctx) - { - var matrix = this.matrix; - - ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); - - return ctx; - }, - - /** - * Copy the values from this Matrix to the given Canvas Rendering Context. - * This will use the Context.setTransform method. - * - * @method Phaser.GameObjects.Components.TransformMatrix#setToContext - * @since 3.12.0 - * - * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to. - * - * @return {CanvasRenderingContext2D} The Canvas Rendering Context. - */ - setToContext: function (ctx) - { - var matrix = this.matrix; - - ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); - - return ctx; - }, - - /** - * Copy the values in this Matrix to the array given. - * - * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f. - * - * @method Phaser.GameObjects.Components.TransformMatrix#copyToArray - * @since 3.12.0 - * - * @param {array} [out] - The array to copy the matrix values in to. - * - * @return {array} An array where elements 0 to 5 contain the values from this matrix. - */ - copyToArray: function (out) - { - var matrix = this.matrix; - - if (out === undefined) - { - out = [ matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5] ]; - } - else - { - out[0] = matrix[0]; - out[1] = matrix[1]; - out[2] = matrix[2]; - out[3] = matrix[3]; - out[4] = matrix[4]; - out[5] = matrix[5]; - } - - return out; - }, - - /** - * Set the values of this Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#setTransform - * @since 3.0.0 - * - * @param {number} a - The Scale X value. - * @param {number} b - The Shear Y value. - * @param {number} c - The Shear X value. - * @param {number} d - The Scale Y value. - * @param {number} tx - The Translate X value. - * @param {number} ty - The Translate Y value. - * - * @return {this} This TransformMatrix. - */ - setTransform: function (a, b, c, d, tx, ty) - { - var matrix = this.matrix; - - matrix[0] = a; - matrix[1] = b; - matrix[2] = c; - matrix[3] = d; - matrix[4] = tx; - matrix[5] = ty; - - return this; - }, - - /** - * Decompose this Matrix into its translation, scale and rotation values using QR decomposition. - * - * The result must be applied in the following order to reproduce the current matrix: - * - * translate -> rotate -> scale - * - * @method Phaser.GameObjects.Components.TransformMatrix#decomposeMatrix - * @since 3.0.0 - * - * @return {object} The decomposed Matrix. - */ - decomposeMatrix: function () - { - var decomposedMatrix = this.decomposedMatrix; - - var matrix = this.matrix; - - // a = scale X (1) - // b = shear Y (0) - // c = shear X (0) - // d = scale Y (1) - - var a = matrix[0]; - var b = matrix[1]; - var c = matrix[2]; - var d = matrix[3]; - - var determ = a * d - b * c; - - decomposedMatrix.translateX = matrix[4]; - decomposedMatrix.translateY = matrix[5]; - - if (a || b) - { - var r = Math.sqrt(a * a + b * b); - - decomposedMatrix.rotation = (b > 0) ? Math.acos(a / r) : -Math.acos(a / r); - decomposedMatrix.scaleX = r; - decomposedMatrix.scaleY = determ / r; - } - else if (c || d) - { - var s = Math.sqrt(c * c + d * d); - - decomposedMatrix.rotation = Math.PI * 0.5 - (d > 0 ? Math.acos(-c / s) : -Math.acos(c / s)); - decomposedMatrix.scaleX = determ / s; - decomposedMatrix.scaleY = s; - } - else - { - decomposedMatrix.rotation = 0; - decomposedMatrix.scaleX = 0; - decomposedMatrix.scaleY = 0; - } - - return decomposedMatrix; - }, - - /** - * Apply the identity, translate, rotate and scale operations on the Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#applyITRS - * @since 3.0.0 - * - * @param {number} x - The horizontal translation. - * @param {number} y - The vertical translation. - * @param {number} rotation - The angle of rotation in radians. - * @param {number} scaleX - The horizontal scale. - * @param {number} scaleY - The vertical scale. - * - * @return {this} This TransformMatrix. - */ - applyITRS: function (x, y, rotation, scaleX, scaleY) - { - var matrix = this.matrix; - - var radianSin = Math.sin(rotation); - var radianCos = Math.cos(rotation); - - // Translate - matrix[4] = x; - matrix[5] = y; - - // Rotate and Scale - matrix[0] = radianCos * scaleX; - matrix[1] = radianSin * scaleX; - matrix[2] = -radianSin * scaleY; - matrix[3] = radianCos * scaleY; - - return this; - }, - - /** - * Takes the `x` and `y` values and returns a new position in the `output` vector that is the inverse of - * the current matrix with its transformation applied. - * - * Can be used to translate points from world to local space. - * - * @method Phaser.GameObjects.Components.TransformMatrix#applyInverse - * @since 3.12.0 - * - * @param {number} x - The x position to translate. - * @param {number} y - The y position to translate. - * @param {Phaser.Math.Vector2} [output] - A Vector2, or point-like object, to store the results in. - * - * @return {Phaser.Math.Vector2} The coordinates, inverse-transformed through this matrix. - */ - applyInverse: function (x, y, output) - { - if (output === undefined) { output = new Vector2(); } - - var matrix = this.matrix; - - var a = matrix[0]; - var b = matrix[1]; - var c = matrix[2]; - var d = matrix[3]; - var tx = matrix[4]; - var ty = matrix[5]; - - var id = 1 / ((a * d) + (c * -b)); - - output.x = (d * id * x) + (-c * id * y) + (((ty * c) - (tx * d)) * id); - output.y = (a * id * y) + (-b * id * x) + (((-ty * a) + (tx * b)) * id); - - return output; - }, - - /** - * Returns the X component of this matrix multiplied by the given values. - * This is the same as `x * a + y * c + e`. - * - * @method Phaser.GameObjects.Components.TransformMatrix#getX - * @since 3.12.0 - * - * @param {number} x - The x value. - * @param {number} y - The y value. - * - * @return {number} The calculated x value. - */ - getX: function (x, y) - { - return x * this.a + y * this.c + this.e; - }, - - /** - * Returns the Y component of this matrix multiplied by the given values. - * This is the same as `x * b + y * d + f`. - * - * @method Phaser.GameObjects.Components.TransformMatrix#getY - * @since 3.12.0 - * - * @param {number} x - The x value. - * @param {number} y - The y value. - * - * @return {number} The calculated y value. - */ - getY: function (x, y) - { - return x * this.b + y * this.d + this.f; - }, - - /** - * Returns the X component of this matrix multiplied by the given values. - * - * This is the same as `x * a + y * c + e`, optionally passing via `Math.round`. - * - * @method Phaser.GameObjects.Components.TransformMatrix#getXRound - * @since 3.50.0 - * - * @param {number} x - The x value. - * @param {number} y - The y value. - * @param {boolean} [round=false] - Math.round the resulting value? - * - * @return {number} The calculated x value. - */ - getXRound: function (x, y, round) - { - var v = this.getX(x, y); - - if (round) - { - v = Math.round(v); - } - - return v; - }, - - /** - * Returns the Y component of this matrix multiplied by the given values. - * - * This is the same as `x * b + y * d + f`, optionally passing via `Math.round`. - * - * @method Phaser.GameObjects.Components.TransformMatrix#getYRound - * @since 3.50.0 - * - * @param {number} x - The x value. - * @param {number} y - The y value. - * @param {boolean} [round=false] - Math.round the resulting value? - * - * @return {number} The calculated y value. - */ - getYRound: function (x, y, round) - { - var v = this.getY(x, y); - - if (round) - { - v = Math.round(v); - } - - return v; - }, - - /** - * Returns a string that can be used in a CSS Transform call as a `matrix` property. - * - * @method Phaser.GameObjects.Components.TransformMatrix#getCSSMatrix - * @since 3.12.0 - * - * @return {string} A string containing the CSS Transform matrix values. - */ - getCSSMatrix: function () - { - var m = this.matrix; - - return 'matrix(' + m[0] + ',' + m[1] + ',' + m[2] + ',' + m[3] + ',' + m[4] + ',' + m[5] + ')'; - }, - - /** - * Destroys this Transform Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#destroy - * @since 3.4.0 - */ - destroy: function () - { - this.matrix = null; - this.decomposedMatrix = null; - } - -}); - -module.exports = TransformMatrix; - - -/***/ }), -/* 201 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -// bitmask flag for GameObject.renderMask -var _FLAG = 1; // 0001 - -/** - * Provides methods used for setting the visibility of a Game Object. - * Should be applied as a mixin and not used directly. - * - * @namespace Phaser.GameObjects.Components.Visible - * @since 3.0.0 - */ - -var Visible = { - - /** - * Private internal value. Holds the visible value. - * - * @name Phaser.GameObjects.Components.Visible#_visible - * @type {boolean} - * @private - * @default true - * @since 3.0.0 - */ - _visible: true, - - /** - * The visible state of the Game Object. - * - * An invisible Game Object will skip rendering, but will still process update logic. - * - * @name Phaser.GameObjects.Components.Visible#visible - * @type {boolean} - * @since 3.0.0 - */ - visible: { - - get: function () - { - return this._visible; - }, - - set: function (value) - { - if (value) - { - this._visible = true; - this.renderFlags |= _FLAG; - } - else - { - this._visible = false; - this.renderFlags &= ~_FLAG; - } - } - - }, - - /** - * Sets the visibility of this Game Object. - * - * An invisible Game Object will skip rendering, but will still process update logic. - * - * @method Phaser.GameObjects.Components.Visible#setVisible - * @since 3.0.0 - * - * @param {boolean} value - The visible state of the Game Object. - * - * @return {this} This Game Object instance. - */ - setVisible: function (value) - { - this.visible = value; - - return this; - } -}; - -module.exports = Visible; - - -/***/ }), -/* 202 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var ComponentsToJSON = __webpack_require__(203); -var DataManager = __webpack_require__(204); -var EventEmitter = __webpack_require__(210); -var Events = __webpack_require__(211); - -/** - * @classdesc - * The base class that all Game Objects extend. - * You don't create GameObjects directly and they cannot be added to the display list. - * Instead, use them as the base for your own custom classes. - * - * @class GameObject - * @memberof Phaser.GameObjects - * @extends Phaser.Events.EventEmitter - * @constructor - * @since 3.0.0 - * - * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. - * @param {string} type - A textual representation of the type of Game Object, i.e. `sprite`. - */ -var GameObject = new Class({ - - Extends: EventEmitter, - - initialize: - - function GameObject (scene, type) - { - EventEmitter.call(this); - - /** - * The Scene to which this Game Object belongs. - * Game Objects can only belong to one Scene. - * - * @name Phaser.GameObjects.GameObject#scene - * @type {Phaser.Scene} - * @protected - * @since 3.0.0 - */ - this.scene = scene; - - /** - * A textual representation of this Game Object, i.e. `sprite`. - * Used internally by Phaser but is available for your own custom classes to populate. - * - * @name Phaser.GameObjects.GameObject#type - * @type {string} - * @since 3.0.0 - */ - this.type = type; - - /** - * The current state of this Game Object. - * - * Phaser itself will never modify this value, although plugins may do so. - * - * Use this property to track the state of a Game Object during its lifetime. For example, it could change from - * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant - * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons. - * If you need to store complex data about your Game Object, look at using the Data Component instead. - * - * @name Phaser.GameObjects.GameObject#state - * @type {(integer|string)} - * @since 3.16.0 - */ - this.state = 0; - - /** - * The parent Container of this Game Object, if it has one. - * - * @name Phaser.GameObjects.GameObject#parentContainer - * @type {Phaser.GameObjects.Container} - * @since 3.4.0 - */ - this.parentContainer = null; - - /** - * The name of this Game Object. - * Empty by default and never populated by Phaser, this is left for developers to use. - * - * @name Phaser.GameObjects.GameObject#name - * @type {string} - * @default '' - * @since 3.0.0 - */ - this.name = ''; - - /** - * The active state of this Game Object. - * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it. - * An active object is one which is having its logic and internal systems updated. - * - * @name Phaser.GameObjects.GameObject#active - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.active = true; - - /** - * The Tab Index of the Game Object. - * Reserved for future use by plugins and the Input Manager. - * - * @name Phaser.GameObjects.GameObject#tabIndex - * @type {integer} - * @default -1 - * @since 3.0.0 - */ - this.tabIndex = -1; - - /** - * A Data Manager. - * It allows you to store, query and get key/value paired information specific to this Game Object. - * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`. - * - * @name Phaser.GameObjects.GameObject#data - * @type {Phaser.Data.DataManager} - * @default null - * @since 3.0.0 - */ - this.data = null; - - /** - * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not. - * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively. - * If those components are not used by your custom class then you can use this bitmask as you wish. - * - * @name Phaser.GameObjects.GameObject#renderFlags - * @type {integer} - * @default 15 - * @since 3.0.0 - */ - this.renderFlags = 15; - - /** - * A bitmask that controls if this Game Object is drawn by a Camera or not. - * Not usually set directly, instead call `Camera.ignore`, however you can - * set this property directly using the Camera.id property: - * - * @example - * this.cameraFilter |= camera.id - * - * @name Phaser.GameObjects.GameObject#cameraFilter - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.cameraFilter = 0; - - /** - * If this Game Object is enabled for input then this property will contain an InteractiveObject instance. - * Not usually set directly. Instead call `GameObject.setInteractive()`. - * - * @name Phaser.GameObjects.GameObject#input - * @type {?Phaser.Types.Input.InteractiveObject} - * @default null - * @since 3.0.0 - */ - this.input = null; - - /** - * If this Game Object is enabled for Arcade or Matter Physics then this property will contain a reference to a Physics Body. - * - * @name Phaser.GameObjects.GameObject#body - * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|MatterJS.BodyType)} - * @default null - * @since 3.0.0 - */ - this.body = null; - - /** - * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`. - * This includes calls that may come from a Group, Container or the Scene itself. - * While it allows you to persist a Game Object across Scenes, please understand you are entirely - * responsible for managing references to and from this Game Object. - * - * @name Phaser.GameObjects.GameObject#ignoreDestroy - * @type {boolean} - * @default false - * @since 3.5.0 - */ - this.ignoreDestroy = false; - - // Tell the Scene to re-sort the children - scene.sys.queueDepthSort(); - }, - - /** - * Sets the `active` property of this Game Object and returns this Game Object for further chaining. - * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList. - * - * @method Phaser.GameObjects.GameObject#setActive - * @since 3.0.0 - * - * @param {boolean} value - True if this Game Object should be set as active, false if not. - * - * @return {this} This GameObject. - */ - setActive: function (value) - { - this.active = value; - - return this; - }, - - /** - * Sets the `name` property of this Game Object and returns this Game Object for further chaining. - * The `name` property is not populated by Phaser and is presented for your own use. - * - * @method Phaser.GameObjects.GameObject#setName - * @since 3.0.0 - * - * @param {string} value - The name to be given to this Game Object. - * - * @return {this} This GameObject. - */ - setName: function (value) - { - this.name = value; - - return this; - }, - - /** - * Sets the current state of this Game Object. - * - * Phaser itself will never modify the State of a Game Object, although plugins may do so. - * - * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'. - * The state value should typically be an integer (ideally mapped to a constant - * in your game code), but could also be a string. It is recommended to keep it light and simple. - * If you need to store complex data about your Game Object, look at using the Data Component instead. - * - * @method Phaser.GameObjects.GameObject#setState - * @since 3.16.0 - * - * @param {(integer|string)} value - The state of the Game Object. - * - * @return {this} This GameObject. - */ - setState: function (value) - { - this.state = value; - - return this; - }, - - /** - * Adds a Data Manager component to this Game Object. - * - * @method Phaser.GameObjects.GameObject#setDataEnabled - * @since 3.0.0 - * @see Phaser.Data.DataManager - * - * @return {this} This GameObject. - */ - setDataEnabled: function () - { - if (!this.data) - { - this.data = new DataManager(this); - } - - return this; - }, - - /** - * Allows you to store a key value pair within this Game Objects Data Manager. - * - * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled - * before setting the value. - * - * If the key doesn't already exist in the Data Manager then it is created. - * - * ```javascript - * sprite.setData('name', 'Red Gem Stone'); - * ``` - * - * You can also pass in an object of key value pairs as the first argument: - * - * ```javascript - * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 }); - * ``` - * - * To get a value back again you can call `getData`: - * - * ```javascript - * sprite.getData('gold'); - * ``` - * - * Or you can access the value directly via the `values` property, where it works like any other variable: - * - * ```javascript - * sprite.data.values.gold += 50; - * ``` - * - * When the value is first set, a `setdata` event is emitted from this Game Object. - * - * If the key already exists, a `changedata` event is emitted instead, along an event named after the key. - * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`. - * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter. - * - * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings. - * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager. - * - * @method Phaser.GameObjects.GameObject#setData - * @since 3.0.0 - * - * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored. - * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored. - * - * @return {this} This GameObject. - */ - setData: function (key, value) - { - if (!this.data) - { - this.data = new DataManager(this); - } - - this.data.set(key, value); - - return this; - }, - - /** - * Increase a value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is increased from 0. - * - * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled - * before setting the value. - * - * If the key doesn't already exist in the Data Manager then it is created. - * - * When the value is first set, a `setdata` event is emitted from this Game Object. - * - * @method Phaser.GameObjects.GameObject#incData - * @since 3.23.0 - * - * @param {(string|object)} key - The key to increase the value for. - * @param {*} [data] - The value to increase for the given key. - * - * @return {this} This GameObject. - */ - incData: function (key, value) - { - if (!this.data) - { - this.data = new DataManager(this); - } - - this.data.inc(key, value); - - return this; - }, - - /** - * Toggle a boolean value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is toggled from false. - * - * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled - * before setting the value. - * - * If the key doesn't already exist in the Data Manager then it is created. - * - * When the value is first set, a `setdata` event is emitted from this Game Object. - * - * @method Phaser.GameObjects.GameObject#toggleData - * @since 3.23.0 - * - * @param {(string|object)} key - The key to toggle the value for. - * - * @return {this} This GameObject. - */ - toggleData: function (key) - { - if (!this.data) - { - this.data = new DataManager(this); - } - - this.data.toggle(key); - - return this; - }, - - /** - * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist. - * - * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either: - * - * ```javascript - * sprite.getData('gold'); - * ``` - * - * Or access the value directly: - * - * ```javascript - * sprite.data.values.gold; - * ``` - * - * You can also pass in an array of keys, in which case an array of values will be returned: - * - * ```javascript - * sprite.getData([ 'gold', 'armor', 'health' ]); - * ``` - * - * This approach is useful for destructuring arrays in ES6. - * - * @method Phaser.GameObjects.GameObject#getData - * @since 3.0.0 - * - * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys. - * - * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array. - */ - getData: function (key) - { - if (!this.data) - { - this.data = new DataManager(this); - } - - return this.data.get(key); - }, - - /** - * Pass this Game Object to the Input Manager to enable it for Input. - * - * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area - * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced - * input detection. - * - * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If - * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific - * shape for it to use. - * - * You can also provide an Input Configuration Object as the only argument to this method. - * - * @example - * sprite.setInteractive(); - * - * @example - * sprite.setInteractive(new Phaser.Geom.Circle(45, 46, 45), Phaser.Geom.Circle.Contains); - * - * @example - * graphics.setInteractive(new Phaser.Geom.Rectangle(0, 0, 128, 128), Phaser.Geom.Rectangle.Contains); - * - * @method Phaser.GameObjects.GameObject#setInteractive - * @since 3.0.0 - * - * @param {(Phaser.Types.Input.InputConfiguration|any)} [hitArea] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not given it will try to create a Rectangle based on the texture frame. - * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The callback that determines if the pointer is within the Hit Area shape or not. If you provide a shape you must also provide a callback. - * @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target? - * - * @return {this} This GameObject. - */ - setInteractive: function (hitArea, hitAreaCallback, dropZone) - { - this.scene.sys.input.enable(this, hitArea, hitAreaCallback, dropZone); - - return this; - }, - - /** - * If this Game Object has previously been enabled for input, this will disable it. - * - * An object that is disabled for input stops processing or being considered for - * input events, but can be turned back on again at any time by simply calling - * `setInteractive()` with no arguments provided. - * - * If want to completely remove interaction from this Game Object then use `removeInteractive` instead. - * - * @method Phaser.GameObjects.GameObject#disableInteractive - * @since 3.7.0 - * - * @return {this} This GameObject. - */ - disableInteractive: function () - { - if (this.input) - { - this.input.enabled = false; - } - - return this; - }, - - /** - * If this Game Object has previously been enabled for input, this will queue it - * for removal, causing it to no longer be interactive. The removal happens on - * the next game step, it is not immediate. - * - * The Interactive Object that was assigned to this Game Object will be destroyed, - * removed from the Input Manager and cleared from this Game Object. - * - * If you wish to re-enable this Game Object at a later date you will need to - * re-create its InteractiveObject by calling `setInteractive` again. - * - * If you wish to only temporarily stop an object from receiving input then use - * `disableInteractive` instead, as that toggles the interactive state, where-as - * this erases it completely. - * - * If you wish to resize a hit area, don't remove and then set it as being - * interactive. Instead, access the hitarea object directly and resize the shape - * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the - * shape is a Rectangle, which it is by default.) - * - * @method Phaser.GameObjects.GameObject#removeInteractive - * @since 3.7.0 - * - * @return {this} This GameObject. - */ - removeInteractive: function () - { - this.scene.sys.input.clear(this); - - this.input = undefined; - - return this; - }, - - /** - * This callback is invoked when this Game Object is added to a Scene. - * - * Can be overriden by custom Game Objects, but be aware of some Game Objects that - * will use this, such as Sprites, to add themselves into the Update List. - * - * You can also listen for the `ADDED_TO_SCENE` event from this Game Object. - * - * @method Phaser.GameObjects.GameObject#addedToScene - * @since 3.50.0 - */ - addedToScene: function () - { - }, - - /** - * This callback is invoked when this Game Object is removed from a Scene. - * - * Can be overriden by custom Game Objects, but be aware of some Game Objects that - * will use this, such as Sprites, to removed themselves from the Update List. - * - * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object. - * - * @method Phaser.GameObjects.GameObject#removedFromScene - * @since 3.50.0 - */ - removedFromScene: function () - { - }, - - /** - * To be overridden by custom GameObjects. Allows base objects to be used in a Pool. - * - * @method Phaser.GameObjects.GameObject#update - * @since 3.0.0 - * - * @param {...*} [args] - args - */ - update: function () - { - }, - - /** - * Returns a JSON representation of the Game Object. - * - * @method Phaser.GameObjects.GameObject#toJSON - * @since 3.0.0 - * - * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object. - */ - toJSON: function () - { - return ComponentsToJSON(this); - }, - - /** - * Compares the renderMask with the renderFlags to see if this Game Object will render or not. - * Also checks the Game Object against the given Cameras exclusion list. - * - * @method Phaser.GameObjects.GameObject#willRender - * @since 3.0.0 - * - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to check against this Game Object. - * - * @return {boolean} True if the Game Object should be rendered, otherwise false. - */ - willRender: function (camera) - { - return !(GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id))); - }, - - /** - * Returns an array containing the display list index of either this Game Object, or if it has one, - * its parent Container. It then iterates up through all of the parent containers until it hits the - * root of the display list (which is index 0 in the returned array). - * - * Used internally by the InputPlugin but also useful if you wish to find out the display depth of - * this Game Object and all of its ancestors. - * - * @method Phaser.GameObjects.GameObject#getIndexList - * @since 3.4.0 - * - * @return {integer[]} An array of display list position indexes. - */ - getIndexList: function () - { - // eslint-disable-next-line consistent-this - var child = this; - var parent = this.parentContainer; - - var indexes = []; - - while (parent) - { - // indexes.unshift([parent.getIndex(child), parent.name]); - indexes.unshift(parent.getIndex(child)); - - child = parent; - - if (!parent.parentContainer) - { - break; - } - else - { - parent = parent.parentContainer; - } - } - - // indexes.unshift([this.scene.sys.displayList.getIndex(child), 'root']); - indexes.unshift(this.scene.sys.displayList.getIndex(child)); - - return indexes; - }, - - /** - * Destroys this Game Object removing it from the Display List and Update List and - * severing all ties to parent resources. - * - * Also removes itself from the Input Manager and Physics Manager if previously enabled. - * - * Use this to remove a Game Object from your game if you don't ever plan to use it again. - * As long as no reference to it exists within your own code it should become free for - * garbage collection by the browser. - * - * If you just want to temporarily disable an object then look at using the - * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected. - * - * @method Phaser.GameObjects.GameObject#destroy - * @fires Phaser.GameObjects.Events#DESTROY - * @since 3.0.0 - * - * @param {boolean} [fromScene=false] - Is this Game Object being destroyed as the result of a Scene shutdown? - */ - destroy: function (fromScene) - { - if (fromScene === undefined) { fromScene = false; } - - // This Game Object has already been destroyed - if (!this.scene || this.ignoreDestroy) - { - return; - } - - if (this.preDestroy) - { - this.preDestroy.call(this); - } - - this.emit(Events.DESTROY, this); - - var sys = this.scene.sys; - - if (!fromScene) - { - sys.displayList.remove(this); - } - - if (this.input) - { - sys.input.clear(this); - this.input = undefined; - } - - if (this.data) - { - this.data.destroy(); - - this.data = undefined; - } - - if (this.body) - { - this.body.destroy(); - this.body = undefined; - } - - // Tell the Scene to re-sort the children - if (!fromScene) - { - sys.queueDepthSort(); - } - - this.active = false; - this.visible = false; - - this.scene = undefined; - - this.parentContainer = undefined; - - this.removeAllListeners(); - } - -}); - -/** - * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not. - * - * @constant {integer} RENDER_MASK - * @memberof Phaser.GameObjects.GameObject - * @default - */ -GameObject.RENDER_MASK = 15; - -module.exports = GameObject; - - -/***/ }), -/* 203 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Build a JSON representation of the given Game Object. - * - * This is typically extended further by Game Object specific implementations. - * - * @method Phaser.GameObjects.Components.ToJSON - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to export as JSON. - * - * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object. - */ -var ToJSON = function (gameObject) -{ - var out = { - name: gameObject.name, - type: gameObject.type, - x: gameObject.x, - y: gameObject.y, - depth: gameObject.depth, - scale: { - x: gameObject.scaleX, - y: gameObject.scaleY - }, - origin: { - x: gameObject.originX, - y: gameObject.originY - }, - flipX: gameObject.flipX, - flipY: gameObject.flipY, - rotation: gameObject.rotation, - alpha: gameObject.alpha, - visible: gameObject.visible, - blendMode: gameObject.blendMode, - textureKey: '', - frameKey: '', - data: {} - }; - - if (gameObject.texture) - { - out.textureKey = gameObject.texture.key; - out.frameKey = gameObject.frame.name; - } - - return out; -}; - -module.exports = ToJSON; - - -/***/ }), -/* 204 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var Events = __webpack_require__(205); +var Events = __webpack_require__(220); /** * @callback DataEachCallback @@ -31997,7 +33659,7 @@ module.exports = DataManager; /***/ }), -/* 205 */ +/* 220 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32012,16 +33674,16 @@ module.exports = DataManager; module.exports = { - CHANGE_DATA: __webpack_require__(206), - CHANGE_DATA_KEY: __webpack_require__(207), - REMOVE_DATA: __webpack_require__(208), - SET_DATA: __webpack_require__(209) + CHANGE_DATA: __webpack_require__(221), + CHANGE_DATA_KEY: __webpack_require__(222), + REMOVE_DATA: __webpack_require__(223), + SET_DATA: __webpack_require__(224) }; /***/ }), -/* 206 */ +/* 221 */ /***/ (function(module, exports) { /** @@ -32053,7 +33715,7 @@ module.exports = 'changedata'; /***/ }), -/* 207 */ +/* 222 */ /***/ (function(module, exports) { /** @@ -32083,7 +33745,7 @@ module.exports = 'changedata-'; /***/ }), -/* 208 */ +/* 223 */ /***/ (function(module, exports) { /** @@ -32111,7 +33773,7 @@ module.exports = 'removedata'; /***/ }), -/* 209 */ +/* 224 */ /***/ (function(module, exports) { /** @@ -32139,383 +33801,7 @@ module.exports = 'setdata'; /***/ }), -/* 210 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var has = Object.prototype.hasOwnProperty - , prefix = '~'; - -/** - * Constructor to create a storage for our `EE` objects. - * An `Events` instance is a plain object whose properties are event names. - * - * @constructor - * @private - */ -function Events() {} - -// -// We try to not inherit from `Object.prototype`. In some engines creating an -// instance in this way is faster than calling `Object.create(null)` directly. -// If `Object.create(null)` is not supported we prefix the event names with a -// character to make sure that the built-in object properties are not -// overridden or used as an attack vector. -// -if (Object.create) { - Events.prototype = Object.create(null); - - // - // This hack is needed because the `__proto__` property is still inherited in - // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5. - // - if (!new Events().__proto__) prefix = false; -} - -/** - * Representation of a single event listener. - * - * @param {Function} fn The listener function. - * @param {*} context The context to invoke the listener with. - * @param {Boolean} [once=false] Specify if the listener is a one-time listener. - * @constructor - * @private - */ -function EE(fn, context, once) { - this.fn = fn; - this.context = context; - this.once = once || false; -} - -/** - * Add a listener for a given event. - * - * @param {EventEmitter} emitter Reference to the `EventEmitter` instance. - * @param {(String|Symbol)} event The event name. - * @param {Function} fn The listener function. - * @param {*} context The context to invoke the listener with. - * @param {Boolean} once Specify if the listener is a one-time listener. - * @returns {EventEmitter} - * @private - */ -function addListener(emitter, event, fn, context, once) { - if (typeof fn !== 'function') { - throw new TypeError('The listener must be a function'); - } - - var listener = new EE(fn, context || emitter, once) - , evt = prefix ? prefix + event : event; - - if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++; - else if (!emitter._events[evt].fn) emitter._events[evt].push(listener); - else emitter._events[evt] = [emitter._events[evt], listener]; - - return emitter; -} - -/** - * Clear event by name. - * - * @param {EventEmitter} emitter Reference to the `EventEmitter` instance. - * @param {(String|Symbol)} evt The Event name. - * @private - */ -function clearEvent(emitter, evt) { - if (--emitter._eventsCount === 0) emitter._events = new Events(); - else delete emitter._events[evt]; -} - -/** - * Minimal `EventEmitter` interface that is molded against the Node.js - * `EventEmitter` interface. - * - * @constructor - * @public - */ -function EventEmitter() { - this._events = new Events(); - this._eventsCount = 0; -} - -/** - * Return an array listing the events for which the emitter has registered - * listeners. - * - * @returns {Array} - * @public - */ -EventEmitter.prototype.eventNames = function eventNames() { - var names = [] - , events - , name; - - if (this._eventsCount === 0) return names; - - for (name in (events = this._events)) { - if (has.call(events, name)) names.push(prefix ? name.slice(1) : name); - } - - if (Object.getOwnPropertySymbols) { - return names.concat(Object.getOwnPropertySymbols(events)); - } - - return names; -}; - -/** - * Return the listeners registered for a given event. - * - * @param {(String|Symbol)} event The event name. - * @returns {Array} The registered listeners. - * @public - */ -EventEmitter.prototype.listeners = function listeners(event) { - var evt = prefix ? prefix + event : event - , handlers = this._events[evt]; - - if (!handlers) return []; - if (handlers.fn) return [handlers.fn]; - - for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) { - ee[i] = handlers[i].fn; - } - - return ee; -}; - -/** - * Return the number of listeners listening to a given event. - * - * @param {(String|Symbol)} event The event name. - * @returns {Number} The number of listeners. - * @public - */ -EventEmitter.prototype.listenerCount = function listenerCount(event) { - var evt = prefix ? prefix + event : event - , listeners = this._events[evt]; - - if (!listeners) return 0; - if (listeners.fn) return 1; - return listeners.length; -}; - -/** - * Calls each of the listeners registered for a given event. - * - * @param {(String|Symbol)} event The event name. - * @returns {Boolean} `true` if the event had listeners, else `false`. - * @public - */ -EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) { - var evt = prefix ? prefix + event : event; - - if (!this._events[evt]) return false; - - var listeners = this._events[evt] - , len = arguments.length - , args - , i; - - if (listeners.fn) { - if (listeners.once) this.removeListener(event, listeners.fn, undefined, true); - - switch (len) { - case 1: return listeners.fn.call(listeners.context), true; - case 2: return listeners.fn.call(listeners.context, a1), true; - case 3: return listeners.fn.call(listeners.context, a1, a2), true; - case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true; - case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true; - case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true; - } - - for (i = 1, args = new Array(len -1); i < len; i++) { - args[i - 1] = arguments[i]; - } - - listeners.fn.apply(listeners.context, args); - } else { - var length = listeners.length - , j; - - for (i = 0; i < length; i++) { - if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true); - - switch (len) { - case 1: listeners[i].fn.call(listeners[i].context); break; - case 2: listeners[i].fn.call(listeners[i].context, a1); break; - case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break; - case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break; - default: - if (!args) for (j = 1, args = new Array(len -1); j < len; j++) { - args[j - 1] = arguments[j]; - } - - listeners[i].fn.apply(listeners[i].context, args); - } - } - } - - return true; -}; - -/** - * Add a listener for a given event. - * - * @param {(String|Symbol)} event The event name. - * @param {Function} fn The listener function. - * @param {*} [context=this] The context to invoke the listener with. - * @returns {EventEmitter} `this`. - * @public - */ -EventEmitter.prototype.on = function on(event, fn, context) { - return addListener(this, event, fn, context, false); -}; - -/** - * Add a one-time listener for a given event. - * - * @param {(String|Symbol)} event The event name. - * @param {Function} fn The listener function. - * @param {*} [context=this] The context to invoke the listener with. - * @returns {EventEmitter} `this`. - * @public - */ -EventEmitter.prototype.once = function once(event, fn, context) { - return addListener(this, event, fn, context, true); -}; - -/** - * Remove the listeners of a given event. - * - * @param {(String|Symbol)} event The event name. - * @param {Function} fn Only remove the listeners that match this function. - * @param {*} context Only remove the listeners that have this context. - * @param {Boolean} once Only remove one-time listeners. - * @returns {EventEmitter} `this`. - * @public - */ -EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) { - var evt = prefix ? prefix + event : event; - - if (!this._events[evt]) return this; - if (!fn) { - clearEvent(this, evt); - return this; - } - - var listeners = this._events[evt]; - - if (listeners.fn) { - if ( - listeners.fn === fn && - (!once || listeners.once) && - (!context || listeners.context === context) - ) { - clearEvent(this, evt); - } - } else { - for (var i = 0, events = [], length = listeners.length; i < length; i++) { - if ( - listeners[i].fn !== fn || - (once && !listeners[i].once) || - (context && listeners[i].context !== context) - ) { - events.push(listeners[i]); - } - } - - // - // Reset the array, or remove it completely if we have no more listeners. - // - if (events.length) this._events[evt] = events.length === 1 ? events[0] : events; - else clearEvent(this, evt); - } - - return this; -}; - -/** - * Remove all listeners, or those of the specified event. - * - * @param {(String|Symbol)} [event] The event name. - * @returns {EventEmitter} `this`. - * @public - */ -EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) { - var evt; - - if (event) { - evt = prefix ? prefix + event : event; - if (this._events[evt]) clearEvent(this, evt); - } else { - this._events = new Events(); - this._eventsCount = 0; - } - - return this; -}; - -// -// Alias methods names because people roll like that. -// -EventEmitter.prototype.off = EventEmitter.prototype.removeListener; -EventEmitter.prototype.addListener = EventEmitter.prototype.on; - -// -// Expose the prefix. -// -EventEmitter.prefixed = prefix; - -// -// Allow `EventEmitter` to be imported as module namespace. -// -EventEmitter.EventEmitter = EventEmitter; - -// -// Expose the module. -// -if (true) { - module.exports = EventEmitter; -} - - -/***/ }), -/* 211 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.GameObjects.Events - */ - -module.exports = { - - ADDED_TO_SCENE: __webpack_require__(212), - DESTROY: __webpack_require__(213), - REMOVED_FROM_SCENE: __webpack_require__(214), - VIDEO_COMPLETE: __webpack_require__(215), - VIDEO_CREATED: __webpack_require__(216), - VIDEO_ERROR: __webpack_require__(217), - VIDEO_LOOP: __webpack_require__(218), - VIDEO_PLAY: __webpack_require__(219), - VIDEO_SEEKED: __webpack_require__(220), - VIDEO_SEEKING: __webpack_require__(221), - VIDEO_STOP: __webpack_require__(222), - VIDEO_TIMEOUT: __webpack_require__(223), - VIDEO_UNLOCKED: __webpack_require__(224) - -}; - - -/***/ }), -/* 212 */ +/* 225 */ /***/ (function(module, exports) { /** @@ -32541,7 +33827,7 @@ module.exports = 'addedtoscene'; /***/ }), -/* 213 */ +/* 226 */ /***/ (function(module, exports) { /** @@ -32566,7 +33852,7 @@ module.exports = 'destroy'; /***/ }), -/* 214 */ +/* 227 */ /***/ (function(module, exports) { /** @@ -32592,7 +33878,7 @@ module.exports = 'removedfromscene'; /***/ }), -/* 215 */ +/* 228 */ /***/ (function(module, exports) { /** @@ -32624,7 +33910,7 @@ module.exports = 'complete'; /***/ }), -/* 216 */ +/* 229 */ /***/ (function(module, exports) { /** @@ -32653,7 +33939,7 @@ module.exports = 'created'; /***/ }), -/* 217 */ +/* 230 */ /***/ (function(module, exports) { /** @@ -32679,7 +33965,7 @@ module.exports = 'error'; /***/ }), -/* 218 */ +/* 231 */ /***/ (function(module, exports) { /** @@ -32711,7 +33997,7 @@ module.exports = 'loop'; /***/ }), -/* 219 */ +/* 232 */ /***/ (function(module, exports) { /** @@ -32739,7 +34025,7 @@ module.exports = 'play'; /***/ }), -/* 220 */ +/* 233 */ /***/ (function(module, exports) { /** @@ -32764,7 +34050,7 @@ module.exports = 'seeked'; /***/ }), -/* 221 */ +/* 234 */ /***/ (function(module, exports) { /** @@ -32790,7 +34076,7 @@ module.exports = 'seeking'; /***/ }), -/* 222 */ +/* 235 */ /***/ (function(module, exports) { /** @@ -32816,7 +34102,7 @@ module.exports = 'stop'; /***/ }), -/* 223 */ +/* 236 */ /***/ (function(module, exports) { /** @@ -32842,7 +34128,7 @@ module.exports = 'timeout'; /***/ }), -/* 224 */ +/* 237 */ /***/ (function(module, exports) { /** @@ -32868,12 +34154,12 @@ module.exports = 'unlocked'; /***/ }), -/* 225 */ +/* 238 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32883,23 +34169,23 @@ module.exports = 'unlocked'; module.exports = { - COMPLETE: __webpack_require__(226), - DISPOSE: __webpack_require__(227), - END: __webpack_require__(228), - EVENT: __webpack_require__(229), - INTERRUPTED: __webpack_require__(230), - START: __webpack_require__(231) + COMPLETE: __webpack_require__(239), + DISPOSE: __webpack_require__(240), + END: __webpack_require__(241), + EVENT: __webpack_require__(242), + INTERRUPTED: __webpack_require__(243), + START: __webpack_require__(244) }; /***/ }), -/* 226 */ +/* 239 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32913,12 +34199,12 @@ module.exports = 'complete'; /***/ }), -/* 227 */ +/* 240 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32932,12 +34218,12 @@ module.exports = 'dispose'; /***/ }), -/* 228 */ +/* 241 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32951,12 +34237,12 @@ module.exports = 'end'; /***/ }), -/* 229 */ +/* 242 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32970,12 +34256,12 @@ module.exports = 'event'; /***/ }), -/* 230 */ +/* 243 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32989,12 +34275,12 @@ module.exports = 'interrupted'; /***/ }), -/* 231 */ +/* 244 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -33008,26 +34294,26 @@ module.exports = 'start'; /***/ }), -/* 232 */ +/* 245 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var renderWebGL = __webpack_require__(34); -var renderCanvas = __webpack_require__(34); +var renderWebGL = __webpack_require__(4); +var renderCanvas = __webpack_require__(4); if (true) { - renderWebGL = __webpack_require__(233); + renderWebGL = __webpack_require__(246); } if (true) { - renderCanvas = __webpack_require__(234); + renderCanvas = __webpack_require__(247); } module.exports = { @@ -33039,18 +34325,18 @@ module.exports = { /***/ }), -/* 233 */ +/* 246 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CounterClockwise = __webpack_require__(6); -var RadToDeg = __webpack_require__(7); -var Wrap = __webpack_require__(3); +var CounterClockwise = __webpack_require__(9); +var RadToDeg = __webpack_require__(10); +var Wrap = __webpack_require__(6); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -33071,24 +34357,28 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent { var plugin = src.plugin; var skeleton = src.skeleton; + var childAlpha = skeleton.color.a; var sceneRenderer = plugin.sceneRenderer; var GameObjectRenderMask = 15; - var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id))); + var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || childAlpha === 0); if (!skeleton || !willRender) { - // Reset the current type - renderer.currentType = ''; - // If there is already a batch running, we need to close it if (!renderer.nextTypeMatch) { // The next object in the display list is not a Spine object, so we end the batch sceneRenderer.end(); - renderer.rebindPipeline(renderer.pipelines.MultiPipeline); + if (!renderer.finalType) + { + // Reset the current type + renderer.currentType = ''; + + renderer.rebindPipeline(renderer.pipelines.MultiPipeline); + } } return; @@ -33162,7 +34452,7 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent } } - if (camera.renderToTexture) + if (camera.renderToTexture || renderer.currentFramebuffer !== null) { skeleton.y = calcMatrix.ty; skeleton.scaleY *= -1; @@ -33196,10 +34486,13 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent if (!renderer.nextTypeMatch) { - // The next object in the display list is not a Spine object, so we end the batch + // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch. sceneRenderer.end(); - renderer.rebindPipeline(renderer.pipelines.MultiPipeline); + if (!renderer.finalType) + { + renderer.rebindPipeline(renderer.pipelines.MultiPipeline); + } } }; @@ -33207,18 +34500,18 @@ module.exports = SpineGameObjectWebGLRenderer; /***/ }), -/* 234 */ +/* 247 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CounterClockwise = __webpack_require__(6); -var RadToDeg = __webpack_require__(7); -var Wrap = __webpack_require__(3); +var CounterClockwise = __webpack_require__(9); +var RadToDeg = __webpack_require__(10); +var Wrap = __webpack_require__(6); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -33337,5 +34630,11810 @@ var SpineGameObjectCanvasRenderer = function (renderer, src, interpolationPercen module.exports = SpineGameObjectCanvasRenderer; +/***/ }), +/* 248 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Class = __webpack_require__(0); +var Container = __webpack_require__(249); +var SpineContainerRender = __webpack_require__(355); + +/** + * @classdesc + * A Spine Container is a special kind of Container created specifically for Spine Game Objects. + * + * You have all of the same features of a standard Container, but the rendering functions are optimized specifically + * for Spine Game Objects. You cannot mix and match Spine Game Objects with regular Game Objects inside of this + * type of Container, however. + * + * To create one in a Scene, use the factory methods: + * + * ```javascript + * this.add.spinecontainer(); + * ``` + * + * or + * + * ```javascript + * this.make.spinecontainer(); + * ``` + * + * See the Container documentation for further details. + * + * @class SpineContainer + * @extends Phaser.GameObjects.Container + * @constructor + * @since 3.50.0 + * + * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to. + * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin. + * @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 {SpineGameObject[]} [children] - An optional array of Spine Game Objects to add to this Container. + */ +var SpineContainer = new Class({ + + Extends: Container, + + Mixins: [ + SpineContainerRender + ], + + initialize: + + function SpineContainer (scene, plugin, x, y, children) + { + Container.call(this, scene, x, y, children); + + // Same as SpineGameObject, to prevent the renderer from mis-typing it when batching + this.type = 'Spine'; + + /** + * A reference to the Spine Plugin. + * + * @name SpineGameObject#plugin + * @type {SpinePlugin} + * @since 3.19.0 + */ + this.plugin = plugin; + } + +}); + +module.exports = SpineContainer; + + +/***/ }), +/* 249 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var ArrayUtils = __webpack_require__(250); +var BlendModes = __webpack_require__(16); +var Class = __webpack_require__(0); +var Components = __webpack_require__(286); +var Events = __webpack_require__(22); +var GameObject = __webpack_require__(53); +var GameObjectEvents = __webpack_require__(22); +var Rectangle = __webpack_require__(24); +var Render = __webpack_require__(351); +var Union = __webpack_require__(354); +var Vector2 = __webpack_require__(1); + +/** + * @classdesc + * A Container Game Object. + * + * A Container, as the name implies, can 'contain' other types of Game Object. + * When a Game Object is added to a Container, the Container becomes responsible for the rendering of it. + * By default it will be removed from the Display List and instead added to the Containers own internal list. + * + * The position of the Game Object automatically becomes relative to the position of the Container. + * + * The origin of a Container is 0x0 (in local space) and that cannot be changed. The children you add to the + * Container should be positioned with this value in mind. I.e. you should treat 0x0 as being the center of + * the Container, and position children positively and negative around it as required. + * + * When the Container is rendered, all of its children are rendered as well, in the order in which they exist + * within the Container. Container children can be repositioned using methods such as `MoveUp`, `MoveDown` and `SendToBack`. + * + * If you modify a transform property of the Container, such as `Container.x` or `Container.rotation` then it will + * automatically influence all children as well. + * + * Containers can include other Containers for deeply nested transforms. + * + * Containers can have masks set on them and can be used as a mask too. However, Container children cannot be masked. + * The masks do not 'stack up'. Only a Container on the root of the display list will use its mask. + * + * Containers can be enabled for input. Because they do not have a texture you need to provide a shape for them + * to use as their hit area. Container children can also be enabled for input, independent of the Container. + * + * Containers can be given a physics body for either Arcade Physics, Impact Physics or Matter Physics. However, + * if Container _children_ are enabled for physics you may get unexpected results, such as offset bodies, + * if the Container itself, or any of its ancestors, is positioned anywhere other than at 0 x 0. Container children + * with physics do not factor in the Container due to the excessive extra calculations needed. Please structure + * your game to work around this. + * + * It's important to understand the impact of using Containers. They add additional processing overhead into + * every one of their children. The deeper you nest them, the more the cost escalates. This is especially true + * for input events. You also loose the ability to set the display depth of Container children in the same + * flexible manner as those not within them. In short, don't use them for the sake of it. You pay a small cost + * every time you create one, try to structure your game around avoiding that where possible. + * + * @class Container + * @extends Phaser.GameObjects.GameObject + * @memberof Phaser.GameObjects + * @constructor + * @since 3.4.0 + * + * @extends Phaser.GameObjects.Components.AlphaSingle + * @extends Phaser.GameObjects.Components.BlendMode + * @extends Phaser.GameObjects.Components.ComputedSize + * @extends Phaser.GameObjects.Components.Depth + * @extends Phaser.GameObjects.Components.Mask + * @extends Phaser.GameObjects.Components.Transform + * @extends Phaser.GameObjects.Components.Visible + * + * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time. + * @param {number} [x=0] - The horizontal position of this Game Object in the world. + * @param {number} [y=0] - The vertical position of this Game Object in the world. + * @param {Phaser.GameObjects.GameObject[]} [children] - An optional array of Game Objects to add to this Container. + */ +var Container = new Class({ + + Extends: GameObject, + + Mixins: [ + Components.AlphaSingle, + Components.BlendMode, + Components.ComputedSize, + Components.Depth, + Components.Mask, + Components.Transform, + Components.Visible, + Render + ], + + initialize: + + function Container (scene, x, y, children) + { + GameObject.call(this, scene, 'Container'); + + /** + * An array holding the children of this Container. + * + * @name Phaser.GameObjects.Container#list + * @type {Phaser.GameObjects.GameObject[]} + * @since 3.4.0 + */ + this.list = []; + + /** + * Does this Container exclusively manage its children? + * + * The default is `true` which means a child added to this Container cannot + * belong in another Container, which includes the Scene display list. + * + * If you disable this then this Container will no longer exclusively manage its children. + * This allows you to create all kinds of interesting graphical effects, such as replicating + * Game Objects without reparenting them all over the Scene. + * However, doing so will prevent children from receiving any kind of input event or have + * their physics bodies work by default, as they're no longer a single entity on the + * display list, but are being replicated where-ever this Container is. + * + * @name Phaser.GameObjects.Container#exclusive + * @type {boolean} + * @default true + * @since 3.4.0 + */ + this.exclusive = true; + + /** + * Containers can have an optional maximum size. If set to anything above 0 it + * will constrict the addition of new Game Objects into the Container, capping off + * the maximum limit the Container can grow in size to. + * + * @name Phaser.GameObjects.Container#maxSize + * @type {integer} + * @default -1 + * @since 3.4.0 + */ + this.maxSize = -1; + + /** + * The cursor position. + * + * @name Phaser.GameObjects.Container#position + * @type {integer} + * @since 3.4.0 + */ + this.position = 0; + + /** + * Internal Transform Matrix used for local space conversion. + * + * @name Phaser.GameObjects.Container#localTransform + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @since 3.4.0 + */ + this.localTransform = new Components.TransformMatrix(); + + /** + * Internal temporary Transform Matrix used to avoid object creation. + * + * @name Phaser.GameObjects.Container#tempTransformMatrix + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @private + * @since 3.4.0 + */ + this.tempTransformMatrix = new Components.TransformMatrix(); + + /** + * A reference to the Scene Display List. + * + * @name Phaser.GameObjects.Container#_displayList + * @type {Phaser.GameObjects.DisplayList} + * @private + * @since 3.4.0 + */ + this._displayList = scene.sys.displayList; + + /** + * The property key to sort by. + * + * @name Phaser.GameObjects.Container#_sortKey + * @type {string} + * @private + * @since 3.4.0 + */ + this._sortKey = ''; + + /** + * A reference to the Scene Systems Event Emitter. + * + * @name Phaser.GameObjects.Container#_sysEvents + * @type {Phaser.Events.EventEmitter} + * @private + * @since 3.9.0 + */ + this._sysEvents = scene.sys.events; + + /** + * The horizontal scroll factor of this Container. + * + * The scroll factor controls the influence of the movement of a Camera upon this Container. + * + * When a camera scrolls it will change the location at which this Container is rendered on-screen. + * It does not change the Containers actual position values. + * + * For a Container, setting this value will only update the Container itself, not its children. + * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method. + * + * 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 Container. + * + * 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. + * + * @name Phaser.GameObjects.Container#scrollFactorX + * @type {number} + * @default 1 + * @since 3.0.0 + */ + this.scrollFactorX = 1; + + /** + * The vertical scroll factor of this Container. + * + * The scroll factor controls the influence of the movement of a Camera upon this Container. + * + * When a camera scrolls it will change the location at which this Container is rendered on-screen. + * It does not change the Containers actual position values. + * + * For a Container, setting this value will only update the Container itself, not its children. + * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method. + * + * 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 Container. + * + * 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. + * + * @name Phaser.GameObjects.Container#scrollFactorY + * @type {number} + * @default 1 + * @since 3.0.0 + */ + this.scrollFactorY = 1; + + this.setPosition(x, y); + + this.clearAlpha(); + + this.setBlendMode(BlendModes.SKIP_CHECK); + + if (children) + { + this.add(children); + } + }, + + /** + * Internal value to allow Containers to be used for input and physics. + * Do not change this value. It has no effect other than to break things. + * + * @name Phaser.GameObjects.Container#originX + * @type {number} + * @readonly + * @since 3.4.0 + */ + originX: { + + get: function () + { + return 0.5; + } + + }, + + /** + * Internal value to allow Containers to be used for input and physics. + * Do not change this value. It has no effect other than to break things. + * + * @name Phaser.GameObjects.Container#originY + * @type {number} + * @readonly + * @since 3.4.0 + */ + originY: { + + get: function () + { + return 0.5; + } + + }, + + /** + * Internal value to allow Containers to be used for input and physics. + * Do not change this value. It has no effect other than to break things. + * + * @name Phaser.GameObjects.Container#displayOriginX + * @type {number} + * @readonly + * @since 3.4.0 + */ + displayOriginX: { + + get: function () + { + return this.width * 0.5; + } + + }, + + /** + * Internal value to allow Containers to be used for input and physics. + * Do not change this value. It has no effect other than to break things. + * + * @name Phaser.GameObjects.Container#displayOriginY + * @type {number} + * @readonly + * @since 3.4.0 + */ + displayOriginY: { + + get: function () + { + return this.height * 0.5; + } + + }, + + /** + * Does this Container exclusively manage its children? + * + * The default is `true` which means a child added to this Container cannot + * belong in another Container, which includes the Scene display list. + * + * If you disable this then this Container will no longer exclusively manage its children. + * This allows you to create all kinds of interesting graphical effects, such as replicating + * Game Objects without reparenting them all over the Scene. + * However, doing so will prevent children from receiving any kind of input event or have + * their physics bodies work by default, as they're no longer a single entity on the + * display list, but are being replicated where-ever this Container is. + * + * @method Phaser.GameObjects.Container#setExclusive + * @since 3.4.0 + * + * @param {boolean} [value=true] - The exclusive state of this Container. + * + * @return {this} This Container. + */ + setExclusive: function (value) + { + if (value === undefined) { value = true; } + + this.exclusive = value; + + return this; + }, + + /** + * Gets the bounds of this Container. It works by iterating all children of the Container, + * getting their respective bounds, and then working out a min-max rectangle from that. + * It does not factor in if the children render or not, all are included. + * + * Some children are unable to return their bounds, such as Graphics objects, in which case + * they are skipped. + * + * Depending on the quantity of children in this Container it could be a really expensive call, + * so cache it and only poll it as needed. + * + * The values are stored and returned in a Rectangle object. + * + * @method Phaser.GameObjects.Container#getBounds + * @since 3.4.0 + * + * @param {Phaser.Geom.Rectangle} [output] - A Geom.Rectangle object to store the values in. If not provided a new Rectangle will be created. + * + * @return {Phaser.Geom.Rectangle} The values stored in the output object. + */ + getBounds: function (output) + { + if (output === undefined) { output = new Rectangle(); } + + output.setTo(this.x, this.y, 0, 0); + + if (this.parentContainer) + { + var parentMatrix = this.parentContainer.getBoundsTransformMatrix(); + var transformedPosition = parentMatrix.transformPoint(this.x, this.y); + + output.setTo(transformedPosition.x, transformedPosition.y, 0, 0); + } + + if (this.list.length > 0) + { + var children = this.list; + var tempRect = new Rectangle(); + var hasSetFirst = false; + + output.setEmpty(); + + for (var i = 0; i < children.length; i++) + { + var entry = children[i]; + + if (entry.getBounds) + { + entry.getBounds(tempRect); + + if (!hasSetFirst) + { + output.setTo(tempRect.x, tempRect.y, tempRect.width, tempRect.height); + hasSetFirst = true; + } + else + { + Union(tempRect, output, output); + } + } + } + } + + return output; + }, + + /** + * Internal add handler. + * + * @method Phaser.GameObjects.Container#addHandler + * @private + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just added to this Container. + */ + addHandler: function (gameObject) + { + gameObject.once(Events.DESTROY, this.remove, this); + + if (this.exclusive) + { + this._displayList.remove(gameObject); + + if (gameObject.parentContainer) + { + gameObject.parentContainer.remove(gameObject); + } + + gameObject.parentContainer = this; + } + + // Is only on the Display List via this Container + if (!this.scene.sys.displayList.exists(gameObject)) + { + gameObject.emit(GameObjectEvents.ADDED_TO_SCENE, gameObject, this.scene); + } + }, + + /** + * Internal remove handler. + * + * @method Phaser.GameObjects.Container#removeHandler + * @private + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just removed from this Container. + */ + removeHandler: function (gameObject) + { + gameObject.off(Events.DESTROY, this.remove); + + if (this.exclusive) + { + gameObject.parentContainer = null; + } + + // Is only on the Display List via this Container + if (!this.scene.sys.displayList.exists(gameObject)) + { + gameObject.emit(GameObjectEvents.REMOVED_FROM_SCENE, gameObject, this.scene); + } + }, + + /** + * Takes a Point-like object, such as a Vector2, Geom.Point or object with public x and y properties, + * and transforms it into the space of this Container, then returns it in the output object. + * + * @method Phaser.GameObjects.Container#pointToContainer + * @since 3.4.0 + * + * @param {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} source - The Source Point to be transformed. + * @param {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} [output] - A destination object to store the transformed point in. If none given a Vector2 will be created and returned. + * + * @return {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} The transformed point. + */ + pointToContainer: function (source, output) + { + if (output === undefined) { output = new Vector2(); } + + if (this.parentContainer) + { + this.parentContainer.pointToContainer(source, output); + } + else + { + output = new Vector2(source.x, source.y); + } + + var tempMatrix = this.tempTransformMatrix; + + // No need to loadIdentity because applyITRS overwrites every value anyway + tempMatrix.applyITRS(this.x, this.y, this.rotation, this.scaleX, this.scaleY); + + tempMatrix.invert(); + + tempMatrix.transformPoint(source.x, source.y, output); + + return output; + }, + + /** + * Returns the world transform matrix as used for Bounds checks. + * + * The returned matrix is temporal and shouldn't be stored. + * + * @method Phaser.GameObjects.Container#getBoundsTransformMatrix + * @since 3.4.0 + * + * @return {Phaser.GameObjects.Components.TransformMatrix} The world transform matrix. + */ + getBoundsTransformMatrix: function () + { + return this.getWorldTransformMatrix(this.tempTransformMatrix, this.localTransform); + }, + + /** + * Adds the given Game Object, or array of Game Objects, to this Container. + * + * Each Game Object must be unique within the Container. + * + * @method Phaser.GameObjects.Container#add + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container. + * + * @return {this} This Container instance. + */ + add: function (child) + { + ArrayUtils.Add(this.list, child, this.maxSize, this.addHandler, this); + + return this; + }, + + /** + * Adds the given Game Object, or array of Game Objects, to this Container at the specified position. + * + * Existing Game Objects in the Container are shifted up. + * + * Each Game Object must be unique within the Container. + * + * @method Phaser.GameObjects.Container#addAt + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container. + * @param {integer} [index=0] - The position to insert the Game Object/s at. + * + * @return {this} This Container instance. + */ + addAt: function (child, index) + { + ArrayUtils.AddAt(this.list, child, index, this.maxSize, this.addHandler, this); + + return this; + }, + + /** + * Returns the Game Object at the given position in this Container. + * + * @method Phaser.GameObjects.Container#getAt + * @since 3.4.0 + * + * @param {integer} index - The position to get the Game Object from. + * + * @return {?Phaser.GameObjects.GameObject} The Game Object at the specified index, or `null` if none found. + */ + getAt: function (index) + { + return this.list[index]; + }, + + /** + * Returns the index of the given Game Object in this Container. + * + * @method Phaser.GameObjects.Container#getIndex + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container. + * + * @return {integer} The index of the Game Object in this Container, or -1 if not found. + */ + getIndex: function (child) + { + return this.list.indexOf(child); + }, + + /** + * Sort the contents of this Container so the items are in order based on the given property. + * For example: `sort('alpha')` would sort the elements based on the value of their `alpha` property. + * + * @method Phaser.GameObjects.Container#sort + * @since 3.4.0 + * + * @param {string} property - The property to lexically sort by. + * @param {function} [handler] - Provide your own custom handler function. Will receive 2 children which it should compare and return a boolean. + * + * @return {this} This Container instance. + */ + sort: function (property, handler) + { + if (!property) + { + return this; + } + + if (handler === undefined) + { + handler = function (childA, childB) + { + return childA[property] - childB[property]; + }; + } + + ArrayUtils.StableSort.inplace(this.list, handler); + + return this; + }, + + /** + * Searches for the first instance of a child with its `name` property matching the given argument. + * Should more than one child have the same name only the first is returned. + * + * @method Phaser.GameObjects.Container#getByName + * @since 3.4.0 + * + * @param {string} name - The name to search for. + * + * @return {?Phaser.GameObjects.GameObject} The first child with a matching name, or `null` if none were found. + */ + getByName: function (name) + { + return ArrayUtils.GetFirst(this.list, 'name', name); + }, + + /** + * Returns a random Game Object from this Container. + * + * @method Phaser.GameObjects.Container#getRandom + * @since 3.4.0 + * + * @param {integer} [startIndex=0] - An optional start index. + * @param {integer} [length] - An optional length, the total number of elements (from the startIndex) to choose from. + * + * @return {?Phaser.GameObjects.GameObject} A random child from the Container, or `null` if the Container is empty. + */ + getRandom: function (startIndex, length) + { + return ArrayUtils.GetRandom(this.list, startIndex, length); + }, + + /** + * Gets the first Game Object in this Container. + * + * You can also specify a property and value to search for, in which case it will return the first + * Game Object in this Container with a matching property and / or value. + * + * For example: `getFirst('visible', true)` would return the first Game Object that had its `visible` property set. + * + * You can limit the search to the `startIndex` - `endIndex` range. + * + * @method Phaser.GameObjects.Container#getFirst + * @since 3.4.0 + * + * @param {string} property - The property to test on each Game Object in the Container. + * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check. + * @param {integer} [startIndex=0] - An optional start index to search from. + * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included) + * + * @return {?Phaser.GameObjects.GameObject} The first matching Game Object, or `null` if none was found. + */ + getFirst: function (property, value, startIndex, endIndex) + { + return ArrayUtils.GetFirst(this.list, property, value, startIndex, endIndex); + }, + + /** + * Returns all Game Objects in this Container. + * + * You can optionally specify a matching criteria using the `property` and `value` arguments. + * + * For example: `getAll('body')` would return only Game Objects that have a body property. + * + * You can also specify a value to compare the property to: + * + * `getAll('visible', true)` would return only Game Objects that have their visible property set to `true`. + * + * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects, + * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only + * the first 50 Game Objects. + * + * @method Phaser.GameObjects.Container#getAll + * @since 3.4.0 + * + * @param {string} [property] - The property to test on each Game Object in the Container. + * @param {any} [value] - If property is set then the `property` must strictly equal this value to be included in the results. + * @param {integer} [startIndex=0] - An optional start index to search from. + * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included) + * + * @return {Phaser.GameObjects.GameObject[]} An array of matching Game Objects from this Container. + */ + getAll: function (property, value, startIndex, endIndex) + { + return ArrayUtils.GetAll(this.list, property, value, startIndex, endIndex); + }, + + /** + * Returns the total number of Game Objects in this Container that have a property + * matching the given value. + * + * For example: `count('visible', true)` would count all the elements that have their visible property set. + * + * You can optionally limit the operation to the `startIndex` - `endIndex` range. + * + * @method Phaser.GameObjects.Container#count + * @since 3.4.0 + * + * @param {string} property - The property to check. + * @param {any} value - The value to check. + * @param {integer} [startIndex=0] - An optional start index to search from. + * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included) + * + * @return {integer} The total number of Game Objects in this Container with a property matching the given value. + */ + count: function (property, value, startIndex, endIndex) + { + return ArrayUtils.CountAllMatching(this.list, property, value, startIndex, endIndex); + }, + + /** + * Swaps the position of two Game Objects in this Container. + * Both Game Objects must belong to this Container. + * + * @method Phaser.GameObjects.Container#swap + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} child1 - The first Game Object to swap. + * @param {Phaser.GameObjects.GameObject} child2 - The second Game Object to swap. + * + * @return {this} This Container instance. + */ + swap: function (child1, child2) + { + ArrayUtils.Swap(this.list, child1, child2); + + return this; + }, + + /** + * Moves a Game Object to a new position within this Container. + * + * The Game Object must already be a child of this Container. + * + * The Game Object is removed from its old position and inserted into the new one. + * Therefore the Container size does not change. Other children will change position accordingly. + * + * @method Phaser.GameObjects.Container#moveTo + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} child - The Game Object to move. + * @param {integer} index - The new position of the Game Object in this Container. + * + * @return {this} This Container instance. + */ + moveTo: function (child, index) + { + ArrayUtils.MoveTo(this.list, child, index); + + return this; + }, + + /** + * Removes the given Game Object, or array of Game Objects, from this Container. + * + * The Game Objects must already be children of this Container. + * + * You can also optionally call `destroy` on each Game Object that is removed from the Container. + * + * @method Phaser.GameObjects.Container#remove + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to be removed from the Container. + * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each child successfully removed from this Container. + * + * @return {this} This Container instance. + */ + remove: function (child, destroyChild) + { + var removed = ArrayUtils.Remove(this.list, child, this.removeHandler, this); + + if (destroyChild && removed) + { + if (!Array.isArray(removed)) + { + removed = [ removed ]; + } + + for (var i = 0; i < removed.length; i++) + { + removed[i].destroy(); + } + } + + return this; + }, + + /** + * Removes the Game Object at the given position in this Container. + * + * You can also optionally call `destroy` on the Game Object, if one is found. + * + * @method Phaser.GameObjects.Container#removeAt + * @since 3.4.0 + * + * @param {integer} index - The index of the Game Object to be removed. + * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container. + * + * @return {this} This Container instance. + */ + removeAt: function (index, destroyChild) + { + var removed = ArrayUtils.RemoveAt(this.list, index, this.removeHandler, this); + + if (destroyChild && removed) + { + removed.destroy(); + } + + return this; + }, + + /** + * Removes the Game Objects between the given positions in this Container. + * + * You can also optionally call `destroy` on each Game Object that is removed from the Container. + * + * @method Phaser.GameObjects.Container#removeBetween + * @since 3.4.0 + * + * @param {integer} [startIndex=0] - An optional start index to search from. + * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included) + * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container. + * + * @return {this} This Container instance. + */ + removeBetween: function (startIndex, endIndex, destroyChild) + { + var removed = ArrayUtils.RemoveBetween(this.list, startIndex, endIndex, this.removeHandler, this); + + if (destroyChild) + { + for (var i = 0; i < removed.length; i++) + { + removed[i].destroy(); + } + } + + return this; + }, + + /** + * Removes all Game Objects from this Container. + * + * You can also optionally call `destroy` on each Game Object that is removed from the Container. + * + * @method Phaser.GameObjects.Container#removeAll + * @since 3.4.0 + * + * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container. + * + * @return {this} This Container instance. + */ + removeAll: function (destroyChild) + { + var removed = ArrayUtils.RemoveBetween(this.list, 0, this.list.length, this.removeHandler, this); + + if (destroyChild) + { + for (var i = 0; i < removed.length; i++) + { + removed[i].destroy(); + } + } + + return this; + }, + + /** + * Brings the given Game Object to the top of this Container. + * This will cause it to render on-top of any other objects in the Container. + * + * @method Phaser.GameObjects.Container#bringToTop + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} child - The Game Object to bring to the top of the Container. + * + * @return {this} This Container instance. + */ + bringToTop: function (child) + { + ArrayUtils.BringToTop(this.list, child); + + return this; + }, + + /** + * Sends the given Game Object to the bottom of this Container. + * This will cause it to render below any other objects in the Container. + * + * @method Phaser.GameObjects.Container#sendToBack + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} child - The Game Object to send to the bottom of the Container. + * + * @return {this} This Container instance. + */ + sendToBack: function (child) + { + ArrayUtils.SendToBack(this.list, child); + + return this; + }, + + /** + * Moves the given Game Object up one place in this Container, unless it's already at the top. + * + * @method Phaser.GameObjects.Container#moveUp + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container. + * + * @return {this} This Container instance. + */ + moveUp: function (child) + { + ArrayUtils.MoveUp(this.list, child); + + return this; + }, + + /** + * Moves the given Game Object down one place in this Container, unless it's already at the bottom. + * + * @method Phaser.GameObjects.Container#moveDown + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container. + * + * @return {this} This Container instance. + */ + moveDown: function (child) + { + ArrayUtils.MoveDown(this.list, child); + + return this; + }, + + /** + * Reverses the order of all Game Objects in this Container. + * + * @method Phaser.GameObjects.Container#reverse + * @since 3.4.0 + * + * @return {this} This Container instance. + */ + reverse: function () + { + this.list.reverse(); + + return this; + }, + + /** + * Shuffles the all Game Objects in this Container using the Fisher-Yates implementation. + * + * @method Phaser.GameObjects.Container#shuffle + * @since 3.4.0 + * + * @return {this} This Container instance. + */ + shuffle: function () + { + ArrayUtils.Shuffle(this.list); + + return this; + }, + + /** + * Replaces a Game Object in this Container with the new Game Object. + * The new Game Object cannot already be a child of this Container. + * + * @method Phaser.GameObjects.Container#replace + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} oldChild - The Game Object in this Container that will be replaced. + * @param {Phaser.GameObjects.GameObject} newChild - The Game Object to be added to this Container. + * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container. + * + * @return {this} This Container instance. + */ + replace: function (oldChild, newChild, destroyChild) + { + var moved = ArrayUtils.Replace(this.list, oldChild, newChild); + + if (moved) + { + this.addHandler(newChild); + this.removeHandler(oldChild); + + if (destroyChild) + { + oldChild.destroy(); + } + } + + return this; + }, + + /** + * Returns `true` if the given Game Object is a direct child of this Container. + * + * This check does not scan nested Containers. + * + * @method Phaser.GameObjects.Container#exists + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} child - The Game Object to check for within this Container. + * + * @return {boolean} True if the Game Object is an immediate child of this Container, otherwise false. + */ + exists: function (child) + { + return (this.list.indexOf(child) > -1); + }, + + /** + * Sets the property to the given value on all Game Objects in this Container. + * + * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects, + * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only + * the first 50 Game Objects. + * + * @method Phaser.GameObjects.Container#setAll + * @since 3.4.0 + * + * @param {string} property - The property that must exist on the Game Object. + * @param {any} value - The value to get the property to. + * @param {integer} [startIndex=0] - An optional start index to search from. + * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included) + * + * @return {this} This Container instance. + */ + setAll: function (property, value, startIndex, endIndex) + { + ArrayUtils.SetAll(this.list, property, value, startIndex, endIndex); + + return this; + }, + + /** + * @callback EachContainerCallback + * @generic I - [item] + * + * @param {*} item - The child Game Object of the Container. + * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child. + */ + + /** + * Passes all Game Objects in this Container to the given callback. + * + * A copy of the Container is made before passing each entry to your callback. + * This protects against the callback itself modifying the Container. + * + * If you know for sure that the callback will not change the size of this Container + * then you can use the more performant `Container.iterate` method instead. + * + * @method Phaser.GameObjects.Container#each + * @since 3.4.0 + * + * @param {function} callback - The function to call. + * @param {object} [context] - Value to use as `this` when executing callback. + * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child. + * + * @return {this} This Container instance. + */ + each: function (callback, context) + { + var args = [ null ]; + var i; + var temp = this.list.slice(); + var len = temp.length; + + for (i = 2; i < arguments.length; i++) + { + args.push(arguments[i]); + } + + for (i = 0; i < len; i++) + { + args[0] = temp[i]; + + callback.apply(context, args); + } + + return this; + }, + + /** + * Passes all Game Objects in this Container to the given callback. + * + * Only use this method when you absolutely know that the Container will not be modified during + * the iteration, i.e. by removing or adding to its contents. + * + * @method Phaser.GameObjects.Container#iterate + * @since 3.4.0 + * + * @param {function} callback - The function to call. + * @param {object} [context] - Value to use as `this` when executing callback. + * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child. + * + * @return {this} This Container instance. + */ + iterate: function (callback, context) + { + var args = [ null ]; + var i; + + for (i = 2; i < arguments.length; i++) + { + args.push(arguments[i]); + } + + for (i = 0; i < this.list.length; i++) + { + args[0] = this.list[i]; + + callback.apply(context, args); + } + + return this; + }, + + /** + * Sets the scroll factor of this Container and optionally all of its children. + * + * 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. + * + * @method Phaser.GameObjects.Container#setScrollFactor + * @since 3.0.0 + * + * @param {number} x - The horizontal scroll factor of this Game Object. + * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value. + * @param {boolean} [updateChildren=false] - Apply this scrollFactor to all Container children as well? + * + * @return {this} This Game Object instance. + */ + setScrollFactor: function (x, y, updateChildren) + { + if (y === undefined) { y = x; } + if (updateChildren === undefined) { updateChildren = false; } + + this.scrollFactorX = x; + this.scrollFactorY = y; + + if (updateChildren) + { + ArrayUtils.SetAll(this.list, 'scrollFactorX', x); + ArrayUtils.SetAll(this.list, 'scrollFactorY', y); + } + + return this; + }, + + /** + * The number of Game Objects inside this Container. + * + * @name Phaser.GameObjects.Container#length + * @type {integer} + * @readonly + * @since 3.4.0 + */ + length: { + + get: function () + { + return this.list.length; + } + + }, + + /** + * Returns the first Game Object within the Container, or `null` if it is empty. + * + * You can move the cursor by calling `Container.next` and `Container.previous`. + * + * @name Phaser.GameObjects.Container#first + * @type {?Phaser.GameObjects.GameObject} + * @readonly + * @since 3.4.0 + */ + first: { + + get: function () + { + this.position = 0; + + if (this.list.length > 0) + { + return this.list[0]; + } + else + { + return null; + } + } + + }, + + /** + * Returns the last Game Object within the Container, or `null` if it is empty. + * + * You can move the cursor by calling `Container.next` and `Container.previous`. + * + * @name Phaser.GameObjects.Container#last + * @type {?Phaser.GameObjects.GameObject} + * @readonly + * @since 3.4.0 + */ + last: { + + get: function () + { + if (this.list.length > 0) + { + this.position = this.list.length - 1; + + return this.list[this.position]; + } + else + { + return null; + } + } + + }, + + /** + * Returns the next Game Object within the Container, or `null` if it is empty. + * + * You can move the cursor by calling `Container.next` and `Container.previous`. + * + * @name Phaser.GameObjects.Container#next + * @type {?Phaser.GameObjects.GameObject} + * @readonly + * @since 3.4.0 + */ + next: { + + get: function () + { + if (this.position < this.list.length) + { + this.position++; + + return this.list[this.position]; + } + else + { + return null; + } + } + + }, + + /** + * Returns the previous Game Object within the Container, or `null` if it is empty. + * + * You can move the cursor by calling `Container.next` and `Container.previous`. + * + * @name Phaser.GameObjects.Container#previous + * @type {?Phaser.GameObjects.GameObject} + * @readonly + * @since 3.4.0 + */ + previous: { + + get: function () + { + if (this.position > 0) + { + this.position--; + + return this.list[this.position]; + } + else + { + return null; + } + } + + }, + + /** + * Internal destroy handler, called as part of the destroy process. + * + * @method Phaser.GameObjects.Container#preDestroy + * @protected + * @since 3.9.0 + */ + preDestroy: function () + { + this.removeAll(!!this.exclusive); + + this.localTransform.destroy(); + this.tempTransformMatrix.destroy(); + + this.list = []; + this._displayList = null; + } + +}); + +module.exports = Container; + + +/***/ }), +/* 250 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Utils.Array + */ + +module.exports = { + + Matrix: __webpack_require__(251), + + Add: __webpack_require__(259), + AddAt: __webpack_require__(260), + BringToTop: __webpack_require__(261), + CountAllMatching: __webpack_require__(262), + Each: __webpack_require__(263), + EachInRange: __webpack_require__(264), + FindClosestInSorted: __webpack_require__(57), + GetAll: __webpack_require__(265), + GetFirst: __webpack_require__(266), + GetRandom: __webpack_require__(267), + MoveDown: __webpack_require__(268), + MoveTo: __webpack_require__(269), + MoveUp: __webpack_require__(270), + NumberArray: __webpack_require__(271), + NumberArrayStep: __webpack_require__(272), + QuickSelect: __webpack_require__(273), + Range: __webpack_require__(274), + Remove: __webpack_require__(275), + RemoveAt: __webpack_require__(276), + RemoveBetween: __webpack_require__(277), + RemoveRandomElement: __webpack_require__(278), + Replace: __webpack_require__(279), + RotateLeft: __webpack_require__(280), + RotateRight: __webpack_require__(281), + SafeRange: __webpack_require__(5), + SendToBack: __webpack_require__(282), + SetAll: __webpack_require__(283), + Shuffle: __webpack_require__(58), + SpliceOne: __webpack_require__(15), + StableSort: __webpack_require__(284), + Swap: __webpack_require__(285) + +}; + + +/***/ }), +/* 251 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Utils.Array.Matrix + */ + +module.exports = { + + CheckMatrix: __webpack_require__(23), + MatrixToString: __webpack_require__(252), + ReverseColumns: __webpack_require__(254), + ReverseRows: __webpack_require__(255), + Rotate180: __webpack_require__(256), + RotateLeft: __webpack_require__(257), + RotateMatrix: __webpack_require__(14), + RotateRight: __webpack_require__(258), + TransposeMatrix: __webpack_require__(56) + +}; + + +/***/ }), +/* 252 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Pad = __webpack_require__(253); +var CheckMatrix = __webpack_require__(23); + +/** + * Generates a string (which you can pass to console.log) from the given Array Matrix. + * + * @function Phaser.Utils.Array.Matrix.MatrixToString + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [matrix] + * + * @param {T[][]} [matrix] - A 2-dimensional array. + * + * @return {string} A string representing the matrix. + */ +var MatrixToString = function (matrix) +{ + var str = ''; + + if (!CheckMatrix(matrix)) + { + return str; + } + + for (var r = 0; r < matrix.length; r++) + { + for (var c = 0; c < matrix[r].length; c++) + { + var cell = matrix[r][c].toString(); + + if (cell !== 'undefined') + { + str += Pad(cell, 2); + } + else + { + str += '?'; + } + + if (c < matrix[r].length - 1) + { + str += ' |'; + } + } + + if (r < matrix.length - 1) + { + str += '\n'; + + for (var i = 0; i < matrix[r].length; i++) + { + str += '---'; + + if (i < matrix[r].length - 1) + { + str += '+'; + } + } + + str += '\n'; + } + + } + + return str; +}; + +module.exports = MatrixToString; + + +/***/ }), +/* 253 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Takes the given string and pads it out, to the length required, using the character + * specified. For example if you need a string to be 6 characters long, you can call: + * + * `pad('bob', 6, '-', 2)` + * + * This would return: `bob---` as it has padded it out to 6 characters, using the `-` on the right. + * + * You can also use it to pad numbers (they are always returned as strings): + * + * `pad(512, 6, '0', 1)` + * + * Would return: `000512` with the string padded to the left. + * + * If you don't specify a direction it'll pad to both sides: + * + * `pad('c64', 7, '*')` + * + * Would return: `**c64**` + * + * @function Phaser.Utils.String.Pad + * @since 3.0.0 + * + * @param {string|number|object} str - The target string. `toString()` will be called on the string, which means you can also pass in common data types like numbers. + * @param {integer} [len=0] - The number of characters to be added. + * @param {string} [pad=" "] - The string to pad it out with (defaults to a space). + * @param {integer} [dir=3] - The direction dir = 1 (left), 2 (right), 3 (both). + * + * @return {string} The padded string. + */ +var Pad = function (str, len, pad, dir) +{ + if (len === undefined) { len = 0; } + if (pad === undefined) { pad = ' '; } + if (dir === undefined) { dir = 3; } + + str = str.toString(); + + var padlen = 0; + + if (len + 1 >= str.length) + { + switch (dir) + { + case 1: + str = new Array(len + 1 - str.length).join(pad) + str; + break; + + case 3: + var right = Math.ceil((padlen = len - str.length) / 2); + var left = padlen - right; + str = new Array(left + 1).join(pad) + str + new Array(right + 1).join(pad); + break; + + default: + str = str + new Array(len + 1 - str.length).join(pad); + break; + } + } + + return str; +}; + +module.exports = Pad; + + +/***/ }), +/* 254 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Reverses the columns in the given Array Matrix. + * + * @function Phaser.Utils.Array.Matrix.ReverseColumns + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [matrix,$return] + * + * @param {T[][]} [matrix] - The array matrix to reverse the columns for. + * + * @return {T[][]} The column reversed matrix. + */ +var ReverseColumns = function (matrix) +{ + return matrix.reverse(); +}; + +module.exports = ReverseColumns; + + +/***/ }), +/* 255 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Reverses the rows in the given Array Matrix. + * + * @function Phaser.Utils.Array.Matrix.ReverseRows + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [matrix,$return] + * + * @param {T[][]} [matrix] - The array matrix to reverse the rows for. + * + * @return {T[][]} The column reversed matrix. + */ +var ReverseRows = function (matrix) +{ + for (var i = 0; i < matrix.length; i++) + { + matrix[i].reverse(); + } + + return matrix; +}; + +module.exports = ReverseRows; + + +/***/ }), +/* 256 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var RotateMatrix = __webpack_require__(14); + +/** + * Rotates the array matrix 180 degrees. + * + * @function Phaser.Utils.Array.Matrix.Rotate180 + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [matrix,$return] + * + * @param {T[][]} [matrix] - The array to rotate. + * + * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix. + */ +var Rotate180 = function (matrix) +{ + return RotateMatrix(matrix, 180); +}; + +module.exports = Rotate180; + + +/***/ }), +/* 257 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var RotateMatrix = __webpack_require__(14); + +/** + * Rotates the array matrix to the left (or 90 degrees) + * + * @function Phaser.Utils.Array.Matrix.RotateLeft + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [matrix,$return] + * + * @param {T[][]} [matrix] - The array to rotate. + * + * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix. + */ +var RotateLeft = function (matrix) +{ + return RotateMatrix(matrix, 90); +}; + +module.exports = RotateLeft; + + +/***/ }), +/* 258 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var RotateMatrix = __webpack_require__(14); + +/** + * Rotates the array matrix to the left (or -90 degrees) + * + * @function Phaser.Utils.Array.Matrix.RotateRight + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [matrix,$return] + * + * @param {T[][]} [matrix] - The array to rotate. + * + * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix. + */ +var RotateRight = function (matrix) +{ + return RotateMatrix(matrix, -90); +}; + +module.exports = RotateRight; + + +/***/ }), +/* 259 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Adds the given item, or array of items, to the array. + * + * Each item must be unique within the array. + * + * The array is modified in-place and returned. + * + * You can optionally specify a limit to the maximum size of the array. If the quantity of items being + * added will take the array length over this limit, it will stop adding once the limit is reached. + * + * You can optionally specify a callback to be invoked for each item successfully added to the array. + * + * @function Phaser.Utils.Array.Add + * @since 3.4.0 + * + * @param {array} array - The array to be added to. + * @param {any|any[]} item - The item, or array of items, to add to the array. Each item must be unique within the array. + * @param {integer} [limit] - Optional limit which caps the size of the array. + * @param {function} [callback] - A callback to be invoked for each item successfully added to the array. + * @param {object} [context] - The context in which the callback is invoked. + * + * @return {array} The input array. + */ +var Add = function (array, item, limit, callback, context) +{ + if (context === undefined) { context = array; } + + if (limit > 0) + { + var remaining = limit - array.length; + + // There's nothing more we can do here, the array is full + if (remaining <= 0) + { + return null; + } + } + + // Fast path to avoid array mutation and iteration + if (!Array.isArray(item)) + { + if (array.indexOf(item) === -1) + { + array.push(item); + + if (callback) + { + callback.call(context, item); + } + + return item; + } + else + { + return null; + } + } + + // If we got this far, we have an array of items to insert + + // Ensure all the items are unique + var itemLength = item.length - 1; + + while (itemLength >= 0) + { + if (array.indexOf(item[itemLength]) !== -1) + { + // Already exists in array, so remove it + item.splice(itemLength, 1); + } + + itemLength--; + } + + // Anything left? + itemLength = item.length; + + if (itemLength === 0) + { + return null; + } + + if (limit > 0 && itemLength > remaining) + { + item.splice(remaining); + + itemLength = remaining; + } + + for (var i = 0; i < itemLength; i++) + { + var entry = item[i]; + + array.push(entry); + + if (callback) + { + callback.call(context, entry); + } + } + + return item; +}; + +module.exports = Add; + + +/***/ }), +/* 260 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Adds the given item, or array of items, to the array starting at the index specified. + * + * Each item must be unique within the array. + * + * Existing elements in the array are shifted up. + * + * The array is modified in-place and returned. + * + * You can optionally specify a limit to the maximum size of the array. If the quantity of items being + * added will take the array length over this limit, it will stop adding once the limit is reached. + * + * You can optionally specify a callback to be invoked for each item successfully added to the array. + * + * @function Phaser.Utils.Array.AddAt + * @since 3.4.0 + * + * @param {array} array - The array to be added to. + * @param {any|any[]} item - The item, or array of items, to add to the array. + * @param {integer} [index=0] - The index in the array where the item will be inserted. + * @param {integer} [limit] - Optional limit which caps the size of the array. + * @param {function} [callback] - A callback to be invoked for each item successfully added to the array. + * @param {object} [context] - The context in which the callback is invoked. + * + * @return {array} The input array. + */ +var AddAt = function (array, item, index, limit, callback, context) +{ + if (index === undefined) { index = 0; } + if (context === undefined) { context = array; } + + if (limit > 0) + { + var remaining = limit - array.length; + + // There's nothing more we can do here, the array is full + if (remaining <= 0) + { + return null; + } + } + + // Fast path to avoid array mutation and iteration + if (!Array.isArray(item)) + { + if (array.indexOf(item) === -1) + { + array.splice(index, 0, item); + + if (callback) + { + callback.call(context, item); + } + + return item; + } + else + { + return null; + } + } + + // If we got this far, we have an array of items to insert + + // Ensure all the items are unique + var itemLength = item.length - 1; + + while (itemLength >= 0) + { + if (array.indexOf(item[itemLength]) !== -1) + { + // Already exists in array, so remove it + item.pop(); + } + + itemLength--; + } + + // Anything left? + itemLength = item.length; + + if (itemLength === 0) + { + return null; + } + + // Truncate to the limit + if (limit > 0 && itemLength > remaining) + { + item.splice(remaining); + + itemLength = remaining; + } + + for (var i = itemLength - 1; i >= 0; i--) + { + var entry = item[i]; + + array.splice(index, 0, entry); + + if (callback) + { + callback.call(context, entry); + } + } + + return item; +}; + +module.exports = AddAt; + + +/***/ }), +/* 261 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the given element to the top of the array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.BringToTop + * @since 3.4.0 + * + * @param {array} array - The array. + * @param {*} item - The element to move. + * + * @return {*} The element that was moved. + */ +var BringToTop = function (array, item) +{ + var currentIndex = array.indexOf(item); + + if (currentIndex !== -1 && currentIndex < array.length) + { + array.splice(currentIndex, 1); + array.push(item); + } + + return item; +}; + +module.exports = BringToTop; + + +/***/ }), +/* 262 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SafeRange = __webpack_require__(5); + +/** + * Returns the total number of elements in the array which have a property matching the given value. + * + * @function Phaser.Utils.Array.CountAllMatching + * @since 3.4.0 + * + * @param {array} array - The array to search. + * @param {string} property - The property to test on each array element. + * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check. + * @param {integer} [startIndex] - An optional start index to search from. + * @param {integer} [endIndex] - An optional end index to search to. + * + * @return {integer} The total number of elements with properties matching the given value. + */ +var CountAllMatching = function (array, property, value, startIndex, endIndex) +{ + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = array.length; } + + var total = 0; + + if (SafeRange(array, startIndex, endIndex)) + { + for (var i = startIndex; i < endIndex; i++) + { + var child = array[i]; + + if (child[property] === value) + { + total++; + } + } + } + + return total; +}; + +module.exports = CountAllMatching; + + +/***/ }), +/* 263 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Passes each element in the array to the given callback. + * + * @function Phaser.Utils.Array.Each + * @since 3.4.0 + * + * @param {array} array - The array to search. + * @param {function} callback - A callback to be invoked for each item in the array. + * @param {object} context - The context in which the callback is invoked. + * @param {...*} [args] - Additional arguments that will be passed to the callback, after the current array item. + * + * @return {array} The input array. + */ +var Each = function (array, callback, context) +{ + var i; + var args = [ null ]; + + for (i = 3; i < arguments.length; i++) + { + args.push(arguments[i]); + } + + for (i = 0; i < array.length; i++) + { + args[0] = array[i]; + + callback.apply(context, args); + } + + return array; +}; + +module.exports = Each; + + +/***/ }), +/* 264 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SafeRange = __webpack_require__(5); + +/** + * Passes each element in the array, between the start and end indexes, to the given callback. + * + * @function Phaser.Utils.Array.EachInRange + * @since 3.4.0 + * + * @param {array} array - The array to search. + * @param {function} callback - A callback to be invoked for each item in the array. + * @param {object} context - The context in which the callback is invoked. + * @param {integer} startIndex - The start index to search from. + * @param {integer} endIndex - The end index to search to. + * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child. + * + * @return {array} The input array. + */ +var EachInRange = function (array, callback, context, startIndex, endIndex) +{ + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = array.length; } + + if (SafeRange(array, startIndex, endIndex)) + { + var i; + var args = [ null ]; + + for (i = 5; i < arguments.length; i++) + { + args.push(arguments[i]); + } + + for (i = startIndex; i < endIndex; i++) + { + args[0] = array[i]; + + callback.apply(context, args); + } + } + + return array; +}; + +module.exports = EachInRange; + + +/***/ }), +/* 265 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SafeRange = __webpack_require__(5); + +/** + * Returns all elements in the array. + * + * You can optionally specify a matching criteria using the `property` and `value` arguments. + * + * For example: `getAll('visible', true)` would return only elements that have their visible property set. + * + * Optionally you can specify a start and end index. For example if the array had 100 elements, + * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only + * the first 50 elements. + * + * @function Phaser.Utils.Array.GetAll + * @since 3.4.0 + * + * @param {array} array - The array to search. + * @param {string} [property] - The property to test on each array element. + * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check. + * @param {integer} [startIndex] - An optional start index to search from. + * @param {integer} [endIndex] - An optional end index to search to. + * + * @return {array} All matching elements from the array. + */ +var GetAll = function (array, property, value, startIndex, endIndex) +{ + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = array.length; } + + var output = []; + + if (SafeRange(array, startIndex, endIndex)) + { + for (var i = startIndex; i < endIndex; i++) + { + var child = array[i]; + + if (!property || + (property && value === undefined && child.hasOwnProperty(property)) || + (property && value !== undefined && child[property] === value)) + { + output.push(child); + } + } + } + + return output; +}; + +module.exports = GetAll; + + +/***/ }), +/* 266 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SafeRange = __webpack_require__(5); + +/** + * Returns the first element in the array. + * + * You can optionally specify a matching criteria using the `property` and `value` arguments. + * + * For example: `getAll('visible', true)` would return the first element that had its `visible` property set. + * + * Optionally you can specify a start and end index. For example if the array had 100 elements, + * and you set `startIndex` to 0 and `endIndex` to 50, it would search only the first 50 elements. + * + * @function Phaser.Utils.Array.GetFirst + * @since 3.4.0 + * + * @param {array} array - The array to search. + * @param {string} [property] - The property to test on each array element. + * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check. + * @param {integer} [startIndex=0] - An optional start index to search from. + * @param {integer} [endIndex=array.length] - An optional end index to search up to (but not included) + * + * @return {object} The first matching element from the array, or `null` if no element could be found in the range given. + */ +var GetFirst = function (array, property, value, startIndex, endIndex) +{ + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = array.length; } + + if (SafeRange(array, startIndex, endIndex)) + { + for (var i = startIndex; i < endIndex; i++) + { + var child = array[i]; + + if (!property || + (property && value === undefined && child.hasOwnProperty(property)) || + (property && value !== undefined && child[property] === value)) + { + return child; + } + } + } + + return null; +}; + +module.exports = GetFirst; + + +/***/ }), +/* 267 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Returns a Random element from the array. + * + * @function Phaser.Utils.Array.GetRandom + * @since 3.0.0 + * + * @param {array} array - The array to select the random entry from. + * @param {integer} [startIndex=0] - An optional start index. + * @param {integer} [length=array.length] - An optional length, the total number of elements (from the startIndex) to choose from. + * + * @return {*} A random element from the array, or `null` if no element could be found in the range given. + */ +var GetRandom = function (array, startIndex, length) +{ + if (startIndex === undefined) { startIndex = 0; } + if (length === undefined) { length = array.length; } + + var randomIndex = startIndex + Math.floor(Math.random() * length); + + return (array[randomIndex] === undefined) ? null : array[randomIndex]; +}; + +module.exports = GetRandom; + + +/***/ }), +/* 268 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the given array element down one place in the array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.MoveDown + * @since 3.4.0 + * + * @param {array} array - The input array. + * @param {*} item - The element to move down the array. + * + * @return {array} The input array. + */ +var MoveDown = function (array, item) +{ + var currentIndex = array.indexOf(item); + + if (currentIndex > 0) + { + var item2 = array[currentIndex - 1]; + + var index2 = array.indexOf(item2); + + array[currentIndex] = item2; + array[index2] = item; + } + + return array; +}; + +module.exports = MoveDown; + + +/***/ }), +/* 269 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves an element in an array to a new position within the same array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.MoveTo + * @since 3.4.0 + * + * @param {array} array - The array. + * @param {*} item - The element to move. + * @param {integer} index - The new index that the element will be moved to. + * + * @return {*} The element that was moved. + */ +var MoveTo = function (array, item, index) +{ + var currentIndex = array.indexOf(item); + + if (currentIndex === -1 || index < 0 || index >= array.length) + { + throw new Error('Supplied index out of bounds'); + } + + if (currentIndex !== index) + { + // Remove + array.splice(currentIndex, 1); + + // Add in new location + array.splice(index, 0, item); + } + + return item; +}; + +module.exports = MoveTo; + + +/***/ }), +/* 270 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the given array element up one place in the array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.MoveUp + * @since 3.4.0 + * + * @param {array} array - The input array. + * @param {*} item - The element to move up the array. + * + * @return {array} The input array. + */ +var MoveUp = function (array, item) +{ + var currentIndex = array.indexOf(item); + + if (currentIndex !== -1 && currentIndex < array.length - 1) + { + // The element one above `item` in the array + var item2 = array[currentIndex + 1]; + var index2 = array.indexOf(item2); + + array[currentIndex] = item2; + array[index2] = item; + } + + return array; +}; + +module.exports = MoveUp; + + +/***/ }), +/* 271 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Create an array representing the range of numbers (usually integers), between, and inclusive of, + * the given `start` and `end` arguments. For example: + * + * `var array = numberArray(2, 4); // array = [2, 3, 4]` + * `var array = numberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]` + * + * This is equivalent to `numberArrayStep(start, end, 1)`. + * + * You can optionally provide a prefix and / or suffix string. If given the array will contain + * strings, not integers. For example: + * + * `var array = numberArray(1, 4, 'Level '); // array = ["Level 1", "Level 2", "Level 3", "Level 4"]` + * `var array = numberArray(5, 7, 'HD-', '.png'); // array = ["HD-5.png", "HD-6.png", "HD-7.png"]` + * + * @function Phaser.Utils.Array.NumberArray + * @since 3.0.0 + * + * @param {number} start - The minimum value the array starts with. + * @param {number} end - The maximum value the array contains. + * @param {string} [prefix] - Optional prefix to place before the number. If provided the array will contain strings, not integers. + * @param {string} [suffix] - Optional suffix to place after the number. If provided the array will contain strings, not integers. + * + * @return {(number[]|string[])} The array of number values, or strings if a prefix or suffix was provided. + */ +var NumberArray = function (start, end, prefix, suffix) +{ + var result = []; + + for (var i = start; i <= end; i++) + { + if (prefix || suffix) + { + var key = (prefix) ? prefix + i.toString() : i.toString(); + + if (suffix) + { + key = key.concat(suffix); + } + + result.push(key); + } + else + { + result.push(i); + } + } + + return result; +}; + +module.exports = NumberArray; + + +/***/ }), +/* 272 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var RoundAwayFromZero = __webpack_require__(39); + +/** + * Create an array of numbers (positive and/or negative) progressing from `start` + * up to but not including `end` by advancing by `step`. + * + * If `start` is less than `end` a zero-length range is created unless a negative `step` is specified. + * + * Certain values for `start` and `end` (eg. NaN/undefined/null) are currently coerced to 0; + * for forward compatibility make sure to pass in actual numbers. + * + * @example + * NumberArrayStep(4); + * // => [0, 1, 2, 3] + * + * NumberArrayStep(1, 5); + * // => [1, 2, 3, 4] + * + * NumberArrayStep(0, 20, 5); + * // => [0, 5, 10, 15] + * + * NumberArrayStep(0, -4, -1); + * // => [0, -1, -2, -3] + * + * NumberArrayStep(1, 4, 0); + * // => [1, 1, 1] + * + * NumberArrayStep(0); + * // => [] + * + * @function Phaser.Utils.Array.NumberArrayStep + * @since 3.0.0 + * + * @param {number} [start=0] - The start of the range. + * @param {number} [end=null] - The end of the range. + * @param {number} [step=1] - The value to increment or decrement by. + * + * @return {number[]} The array of number values. + */ +var NumberArrayStep = function (start, end, step) +{ + if (start === undefined) { start = 0; } + if (end === undefined) { end = null; } + if (step === undefined) { step = 1; } + + if (end === null) + { + end = start; + start = 0; + } + + var result = []; + + var total = Math.max(RoundAwayFromZero((end - start) / (step || 1)), 0); + + for (var i = 0; i < total; i++) + { + result.push(start); + start += step; + } + + return result; +}; + +module.exports = NumberArrayStep; + + +/***/ }), +/* 273 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @ignore + */ +function swap (arr, i, j) +{ + var tmp = arr[i]; + arr[i] = arr[j]; + arr[j] = tmp; +} + +/** + * @ignore + */ +function defaultCompare (a, b) +{ + return a < b ? -1 : a > b ? 1 : 0; +} + +/** + * A [Floyd-Rivest](https://en.wikipedia.org/wiki/Floyd%E2%80%93Rivest_algorithm) quick selection algorithm. + * + * Rearranges the array items so that all items in the [left, k] range are smaller than all items in [k, right]; + * The k-th element will have the (k - left + 1)th smallest value in [left, right]. + * + * The array is modified in-place. + * + * Based on code by [Vladimir Agafonkin](https://www.npmjs.com/~mourner) + * + * @function Phaser.Utils.Array.QuickSelect + * @since 3.0.0 + * + * @param {array} arr - The array to sort. + * @param {integer} k - The k-th element index. + * @param {integer} [left=0] - The index of the left part of the range. + * @param {integer} [right] - The index of the right part of the range. + * @param {function} [compare] - An optional comparison function. Is passed two elements and should return 0, 1 or -1. + */ +var QuickSelect = function (arr, k, left, right, compare) +{ + if (left === undefined) { left = 0; } + if (right === undefined) { right = arr.length - 1; } + if (compare === undefined) { compare = defaultCompare; } + + while (right > left) + { + if (right - left > 600) + { + var n = right - left + 1; + var m = k - left + 1; + var z = Math.log(n); + var s = 0.5 * Math.exp(2 * z / 3); + var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1); + var newLeft = Math.max(left, Math.floor(k - m * s / n + sd)); + var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd)); + + QuickSelect(arr, k, newLeft, newRight, compare); + } + + var t = arr[k]; + var i = left; + var j = right; + + swap(arr, left, k); + + if (compare(arr[right], t) > 0) + { + swap(arr, left, right); + } + + while (i < j) + { + swap(arr, i, j); + + i++; + j--; + + while (compare(arr[i], t) < 0) + { + i++; + } + + while (compare(arr[j], t) > 0) + { + j--; + } + } + + if (compare(arr[left], t) === 0) + { + swap(arr, left, j); + } + else + { + j++; + swap(arr, j, right); + } + + if (j <= k) + { + left = j + 1; + } + + if (k <= j) + { + right = j - 1; + } + } +}; + +module.exports = QuickSelect; + + +/***/ }), +/* 274 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetValue = __webpack_require__(7); +var Shuffle = __webpack_require__(58); + +var BuildChunk = function (a, b, qty) +{ + var out = []; + + for (var aIndex = 0; aIndex < a.length; aIndex++) + { + for (var bIndex = 0; bIndex < b.length; bIndex++) + { + for (var i = 0; i < qty; i++) + { + out.push({ a: a[aIndex], b: b[bIndex] }); + } + } + } + + return out; +}; + +/** + * Creates an array populated with a range of values, based on the given arguments and configuration object. + * + * Range ([a,b,c], [1,2,3]) = + * a1, a2, a3, b1, b2, b3, c1, c2, c3 + * + * Range ([a,b], [1,2,3], qty = 3) = + * a1, a1, a1, a2, a2, a2, a3, a3, a3, b1, b1, b1, b2, b2, b2, b3, b3, b3 + * + * Range ([a,b,c], [1,2,3], repeat x1) = + * a1, a2, a3, b1, b2, b3, c1, c2, c3, a1, a2, a3, b1, b2, b3, c1, c2, c3 + * + * Range ([a,b], [1,2], repeat -1 = endless, max = 14) = + * Maybe if max is set then repeat goes to -1 automatically? + * a1, a2, b1, b2, a1, a2, b1, b2, a1, a2, b1, b2, a1, a2 (capped at 14 elements) + * + * Range ([a], [1,2,3,4,5], random = true) = + * a4, a1, a5, a2, a3 + * + * Range ([a, b], [1,2,3], random = true) = + * b3, a2, a1, b1, a3, b2 + * + * Range ([a, b, c], [1,2,3], randomB = true) = + * a3, a1, a2, b2, b3, b1, c1, c3, c2 + * + * Range ([a], [1,2,3,4,5], yoyo = true) = + * a1, a2, a3, a4, a5, a5, a4, a3, a2, a1 + * + * Range ([a, b], [1,2,3], yoyo = true) = + * a1, a2, a3, b1, b2, b3, b3, b2, b1, a3, a2, a1 + * + * @function Phaser.Utils.Array.Range + * @since 3.0.0 + * + * @param {array} a - The first array of range elements. + * @param {array} b - The second array of range elements. + * @param {object} [options] - A range configuration object. Can contain: repeat, random, randomB, yoyo, max, qty. + * + * @return {array} An array of arranged elements. + */ +var Range = function (a, b, options) +{ + var max = GetValue(options, 'max', 0); + var qty = GetValue(options, 'qty', 1); + var random = GetValue(options, 'random', false); + var randomB = GetValue(options, 'randomB', false); + var repeat = GetValue(options, 'repeat', 0); + var yoyo = GetValue(options, 'yoyo', false); + + var out = []; + + if (randomB) + { + Shuffle(b); + } + + // Endless repeat, so limit by max + if (repeat === -1) + { + if (max === 0) + { + repeat = 0; + } + else + { + // Work out how many repeats we need + var total = (a.length * b.length) * qty; + + if (yoyo) + { + total *= 2; + } + + repeat = Math.ceil(max / total); + } + } + + for (var i = 0; i <= repeat; i++) + { + var chunk = BuildChunk(a, b, qty); + + if (random) + { + Shuffle(chunk); + } + + out = out.concat(chunk); + + if (yoyo) + { + chunk.reverse(); + + out = out.concat(chunk); + } + } + + if (max) + { + out.splice(max); + } + + return out; +}; + +module.exports = Range; + + +/***/ }), +/* 275 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SpliceOne = __webpack_require__(15); + +/** + * Removes the given item, or array of items, from the array. + * + * The array is modified in-place. + * + * You can optionally specify a callback to be invoked for each item successfully removed from the array. + * + * @function Phaser.Utils.Array.Remove + * @since 3.4.0 + * + * @param {array} array - The array to be modified. + * @param {*|Array.<*>} item - The item, or array of items, to be removed from the array. + * @param {function} [callback] - A callback to be invoked for each item successfully removed from the array. + * @param {object} [context] - The context in which the callback is invoked. + * + * @return {*|Array.<*>} The item, or array of items, that were successfully removed from the array. + */ +var Remove = function (array, item, callback, context) +{ + if (context === undefined) { context = array; } + + var index; + + // Fast path to avoid array mutation and iteration + if (!Array.isArray(item)) + { + index = array.indexOf(item); + + if (index !== -1) + { + SpliceOne(array, index); + + if (callback) + { + callback.call(context, item); + } + + return item; + } + else + { + return null; + } + } + + // If we got this far, we have an array of items to remove + + var itemLength = item.length - 1; + + while (itemLength >= 0) + { + var entry = item[itemLength]; + + index = array.indexOf(entry); + + if (index !== -1) + { + SpliceOne(array, index); + + if (callback) + { + callback.call(context, entry); + } + } + else + { + // Item wasn't found in the array, so remove it from our return results + item.pop(); + } + + itemLength--; + } + + return item; +}; + +module.exports = Remove; + + +/***/ }), +/* 276 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SpliceOne = __webpack_require__(15); + +/** + * Removes the item from the given position in the array. + * + * The array is modified in-place. + * + * You can optionally specify a callback to be invoked for the item if it is successfully removed from the array. + * + * @function Phaser.Utils.Array.RemoveAt + * @since 3.4.0 + * + * @param {array} array - The array to be modified. + * @param {integer} index - The array index to remove the item from. The index must be in bounds or it will throw an error. + * @param {function} [callback] - A callback to be invoked for the item removed from the array. + * @param {object} [context] - The context in which the callback is invoked. + * + * @return {*} The item that was removed. + */ +var RemoveAt = function (array, index, callback, context) +{ + if (context === undefined) { context = array; } + + if (index < 0 || index > array.length - 1) + { + throw new Error('Index out of bounds'); + } + + var item = SpliceOne(array, index); + + if (callback) + { + callback.call(context, item); + } + + return item; +}; + +module.exports = RemoveAt; + + +/***/ }), +/* 277 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SafeRange = __webpack_require__(5); + +/** + * Removes the item within the given range in the array. + * + * The array is modified in-place. + * + * You can optionally specify a callback to be invoked for the item/s successfully removed from the array. + * + * @function Phaser.Utils.Array.RemoveBetween + * @since 3.4.0 + * + * @param {array} array - The array to be modified. + * @param {integer} startIndex - The start index to remove from. + * @param {integer} endIndex - The end index to remove to. + * @param {function} [callback] - A callback to be invoked for the item removed from the array. + * @param {object} [context] - The context in which the callback is invoked. + * + * @return {Array.<*>} An array of items that were removed. + */ +var RemoveBetween = function (array, startIndex, endIndex, callback, context) +{ + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = array.length; } + if (context === undefined) { context = array; } + + if (SafeRange(array, startIndex, endIndex)) + { + var size = endIndex - startIndex; + + var removed = array.splice(startIndex, size); + + if (callback) + { + for (var i = 0; i < removed.length; i++) + { + var entry = removed[i]; + + callback.call(context, entry); + } + } + + return removed; + } + else + { + return []; + } +}; + +module.exports = RemoveBetween; + + +/***/ }), +/* 278 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SpliceOne = __webpack_require__(15); + +/** + * Removes a random object from the given array and returns it. + * Will return null if there are no array items that fall within the specified range or if there is no item for the randomly chosen index. + * + * @function Phaser.Utils.Array.RemoveRandomElement + * @since 3.0.0 + * + * @param {array} array - The array to removed a random element from. + * @param {integer} [start=0] - The array index to start the search from. + * @param {integer} [length=array.length] - Optional restriction on the number of elements to randomly select from. + * + * @return {object} The random element that was removed, or `null` if there were no array elements that fell within the given range. + */ +var RemoveRandomElement = function (array, start, length) +{ + if (start === undefined) { start = 0; } + if (length === undefined) { length = array.length; } + + var randomIndex = start + Math.floor(Math.random() * length); + + return SpliceOne(array, randomIndex); +}; + +module.exports = RemoveRandomElement; + + +/***/ }), +/* 279 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Replaces an element of the array with the new element. + * The new element cannot already be a member of the array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.Replace + * @since 3.4.0 + * + * @param {array} array - The array to search within. + * @param {*} oldChild - The element in the array that will be replaced. + * @param {*} newChild - The element to be inserted into the array at the position of `oldChild`. + * + * @return {boolean} Returns true if the oldChild was successfully replaced, otherwise returns false. + */ +var Replace = function (array, oldChild, newChild) +{ + var index1 = array.indexOf(oldChild); + var index2 = array.indexOf(newChild); + + if (index1 !== -1 && index2 === -1) + { + array[index1] = newChild; + + return true; + } + else + { + return false; + } +}; + +module.exports = Replace; + + +/***/ }), +/* 280 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the element at the start of the array to the end, shifting all items in the process. + * The "rotation" happens to the left. + * + * @function Phaser.Utils.Array.RotateLeft + * @since 3.0.0 + * + * @param {array} array - The array to shift to the left. This array is modified in place. + * @param {integer} [total=1] - The number of times to shift the array. + * + * @return {*} The most recently shifted element. + */ +var RotateLeft = function (array, total) +{ + if (total === undefined) { total = 1; } + + var element = null; + + for (var i = 0; i < total; i++) + { + element = array.shift(); + array.push(element); + } + + return element; +}; + +module.exports = RotateLeft; + + +/***/ }), +/* 281 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the element at the end of the array to the start, shifting all items in the process. + * The "rotation" happens to the right. + * + * @function Phaser.Utils.Array.RotateRight + * @since 3.0.0 + * + * @param {array} array - The array to shift to the right. This array is modified in place. + * @param {integer} [total=1] - The number of times to shift the array. + * + * @return {*} The most recently shifted element. + */ +var RotateRight = function (array, total) +{ + if (total === undefined) { total = 1; } + + var element = null; + + for (var i = 0; i < total; i++) + { + element = array.pop(); + array.unshift(element); + } + + return element; +}; + +module.exports = RotateRight; + + +/***/ }), +/* 282 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the given element to the bottom of the array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.SendToBack + * @since 3.4.0 + * + * @param {array} array - The array. + * @param {*} item - The element to move. + * + * @return {*} The element that was moved. + */ +var SendToBack = function (array, item) +{ + var currentIndex = array.indexOf(item); + + if (currentIndex !== -1 && currentIndex > 0) + { + array.splice(currentIndex, 1); + array.unshift(item); + } + + return item; +}; + +module.exports = SendToBack; + + +/***/ }), +/* 283 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SafeRange = __webpack_require__(5); + +/** + * Scans the array for elements with the given property. If found, the property is set to the `value`. + * + * For example: `SetAll('visible', true)` would set all elements that have a `visible` property to `false`. + * + * Optionally you can specify a start and end index. For example if the array had 100 elements, + * and you set `startIndex` to 0 and `endIndex` to 50, it would update only the first 50 elements. + * + * @function Phaser.Utils.Array.SetAll + * @since 3.4.0 + * + * @param {array} array - The array to search. + * @param {string} property - The property to test for on each array element. + * @param {*} value - The value to set the property to. + * @param {integer} [startIndex] - An optional start index to search from. + * @param {integer} [endIndex] - An optional end index to search to. + * + * @return {array} The input array. + */ +var SetAll = function (array, property, value, startIndex, endIndex) +{ + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = array.length; } + + if (SafeRange(array, startIndex, endIndex)) + { + for (var i = startIndex; i < endIndex; i++) + { + var entry = array[i]; + + if (entry.hasOwnProperty(property)) + { + entry[property] = value; + } + } + } + + return array; +}; + +module.exports = SetAll; + + +/***/ }), +/* 284 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +//! stable.js 0.1.6, https://github.com/Two-Screen/stable +//! © 2017 Angry Bytes and contributors. MIT licensed. + +/** + * @namespace Phaser.Utils.Array.StableSortFunctions + */ + +(function() { + + /** + * A stable array sort, because `Array#sort()` is not guaranteed stable. + * This is an implementation of merge sort, without recursion. + * + * @function Phaser.Utils.Array.StableSort + * @since 3.0.0 + * + * @param {array} arr - The input array to be sorted. + * @param {function} comp - The comparison handler. + * + * @return {array} The sorted result. + */ +var stable = function(arr, comp) { + return exec(arr.slice(), comp); +}; + + /** + * Sort the input array and simply copy it back if the result isn't in the original array, which happens on an odd number of passes. + * + * @function Phaser.Utils.Array.StableSortFunctions.inplace + * @memberof Phaser.Utils.Array.StableSortFunctions + * @since 3.0.0 + * + * @param {array} arr - The input array. + * @param {function} comp - The comparison handler. + * + * @return {array} The sorted array. + */ +stable.inplace = function(arr, comp) { + var result = exec(arr, comp); + + // This simply copies back if the result isn't in the original array, + // which happens on an odd number of passes. + if (result !== arr) { + pass(result, null, arr.length, arr); + } + + return arr; +}; + +// Execute the sort using the input array and a second buffer as work space. +// Returns one of those two, containing the final result. +function exec(arr, comp) { + if (typeof(comp) !== 'function') { + comp = function(a, b) { + return String(a).localeCompare(b); + }; + } + + // Short-circuit when there's nothing to sort. + var len = arr.length; + if (len <= 1) { + return arr; + } + + // Rather than dividing input, simply iterate chunks of 1, 2, 4, 8, etc. + // Chunks are the size of the left or right hand in merge sort. + // Stop when the left-hand covers all of the array. + var buffer = new Array(len); + for (var chk = 1; chk < len; chk *= 2) { + pass(arr, comp, chk, buffer); + + var tmp = arr; + arr = buffer; + buffer = tmp; + } + + return arr; +} + +// Run a single pass with the given chunk size. +var pass = function(arr, comp, chk, result) { + var len = arr.length; + var i = 0; + // Step size / double chunk size. + var dbl = chk * 2; + // Bounds of the left and right chunks. + var l, r, e; + // Iterators over the left and right chunk. + var li, ri; + + // Iterate over pairs of chunks. + for (l = 0; l < len; l += dbl) { + r = l + chk; + e = r + chk; + if (r > len) r = len; + if (e > len) e = len; + + // Iterate both chunks in parallel. + li = l; + ri = r; + while (true) { + // Compare the chunks. + if (li < r && ri < e) { + // This works for a regular `sort()` compatible comparator, + // but also for a simple comparator like: `a > b` + if (comp(arr[li], arr[ri]) <= 0) { + result[i++] = arr[li++]; + } + else { + result[i++] = arr[ri++]; + } + } + // Nothing to compare, just flush what's left. + else if (li < r) { + result[i++] = arr[li++]; + } + else if (ri < e) { + result[i++] = arr[ri++]; + } + // Both iterators are at the chunk ends. + else { + break; + } + } + } +}; + +// Export using CommonJS or to the window. +if (true) { + module.exports = stable; +} +else {} + +})(); + +/***/ }), +/* 285 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Swaps the position of two elements in the given array. + * The elements must exist in the same array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.Swap + * @since 3.4.0 + * + * @param {array} array - The input array. + * @param {*} item1 - The first element to swap. + * @param {*} item2 - The second element to swap. + * + * @return {array} The input array. + */ +var Swap = function (array, item1, item2) +{ + if (item1 === item2) + { + return; + } + + var index1 = array.indexOf(item1); + var index2 = array.indexOf(item2); + + if (index1 < 0 || index2 < 0) + { + throw new Error('Supplied items must be elements of the same array'); + } + + array[index1] = item2; + array[index2] = item1; + + return array; +}; + +module.exports = Swap; + + +/***/ }), +/* 286 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.GameObjects.Components + */ + +module.exports = { + + Alpha: __webpack_require__(287), + AlphaSingle: __webpack_require__(288), + Animation: __webpack_require__(289), + BlendMode: __webpack_require__(310), + ComputedSize: __webpack_require__(46), + Crop: __webpack_require__(311), + Depth: __webpack_require__(47), + Flip: __webpack_require__(48), + GetBounds: __webpack_require__(312), + Mask: __webpack_require__(321), + Origin: __webpack_require__(341), + PathFollower: __webpack_require__(342), + Pipeline: __webpack_require__(345), + ScrollFactor: __webpack_require__(49), + Size: __webpack_require__(346), + Texture: __webpack_require__(347), + TextureCrop: __webpack_require__(348), + Tint: __webpack_require__(349), + ToJSON: __webpack_require__(54), + Transform: __webpack_require__(50), + TransformMatrix: __webpack_require__(51), + Visible: __webpack_require__(52) + +}; + + +/***/ }), +/* 287 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Clamp = __webpack_require__(3); + +// bitmask flag for GameObject.renderMask +var _FLAG = 2; // 0010 + +/** + * Provides methods used for setting the alpha properties of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.Alpha + * @since 3.0.0 + */ + +var Alpha = { + + /** + * Private internal value. Holds the global alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alpha + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alpha: 1, + + /** + * Private internal value. Holds the top-left alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alphaTL + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alphaTL: 1, + + /** + * Private internal value. Holds the top-right alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alphaTR + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alphaTR: 1, + + /** + * Private internal value. Holds the bottom-left alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alphaBL + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alphaBL: 1, + + /** + * Private internal value. Holds the bottom-right alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alphaBR + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alphaBR: 1, + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + * + * @method Phaser.GameObjects.Components.Alpha#clearAlpha + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + clearAlpha: function () + { + return this.setAlpha(1); + }, + + /** + * 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. + * + * If your game is running under WebGL you can optionally specify four different alpha values, each of which + * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. + * + * @method Phaser.GameObjects.Components.Alpha#setAlpha + * @since 3.0.0 + * + * @param {number} [topLeft=1] - The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. + * @param {number} [topRight] - The alpha value used for the top-right of the Game Object. WebGL only. + * @param {number} [bottomLeft] - The alpha value used for the bottom-left of the Game Object. WebGL only. + * @param {number} [bottomRight] - The alpha value used for the bottom-right of the Game Object. WebGL only. + * + * @return {this} This Game Object instance. + */ + setAlpha: function (topLeft, topRight, bottomLeft, bottomRight) + { + if (topLeft === undefined) { topLeft = 1; } + + // Treat as if there is only one alpha value for the whole Game Object + if (topRight === undefined) + { + this.alpha = topLeft; + } + else + { + this._alphaTL = Clamp(topLeft, 0, 1); + this._alphaTR = Clamp(topRight, 0, 1); + this._alphaBL = Clamp(bottomLeft, 0, 1); + this._alphaBR = Clamp(bottomRight, 0, 1); + } + + return this; + }, + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + * + * @name Phaser.GameObjects.Components.Alpha#alpha + * @type {number} + * @since 3.0.0 + */ + alpha: { + + get: function () + { + return this._alpha; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alpha = v; + this._alphaTL = v; + this._alphaTR = v; + this._alphaBL = v; + this._alphaBR = v; + + if (v === 0) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The alpha value starting from the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Alpha#alphaTopLeft + * @type {number} + * @webglOnly + * @since 3.0.0 + */ + alphaTopLeft: { + + get: function () + { + return this._alphaTL; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alphaTL = v; + + if (v !== 0) + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The alpha value starting from the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Alpha#alphaTopRight + * @type {number} + * @webglOnly + * @since 3.0.0 + */ + alphaTopRight: { + + get: function () + { + return this._alphaTR; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alphaTR = v; + + if (v !== 0) + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The alpha value starting from the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Alpha#alphaBottomLeft + * @type {number} + * @webglOnly + * @since 3.0.0 + */ + alphaBottomLeft: { + + get: function () + { + return this._alphaBL; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alphaBL = v; + + if (v !== 0) + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The alpha value starting from the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Alpha#alphaBottomRight + * @type {number} + * @webglOnly + * @since 3.0.0 + */ + alphaBottomRight: { + + get: function () + { + return this._alphaBR; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alphaBR = v; + + if (v !== 0) + { + this.renderFlags |= _FLAG; + } + } + + } + +}; + +module.exports = Alpha; + + +/***/ }), +/* 288 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Clamp = __webpack_require__(3); + +// bitmask flag for GameObject.renderMask +var _FLAG = 2; // 0010 + +/** + * Provides methods used for setting the alpha property of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.AlphaSingle + * @since 3.22.0 + */ + +var AlphaSingle = { + + /** + * Private internal value. Holds the global alpha value. + * + * @name Phaser.GameObjects.Components.AlphaSingle#_alpha + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alpha: 1, + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + * + * @method Phaser.GameObjects.Components.AlphaSingle#clearAlpha + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + clearAlpha: function () + { + return this.setAlpha(1); + }, + + /** + * 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. + * + * @method Phaser.GameObjects.Components.AlphaSingle#setAlpha + * @since 3.0.0 + * + * @param {number} [value=1] - The alpha value applied across the whole Game Object. + * + * @return {this} This Game Object instance. + */ + setAlpha: function (value) + { + if (value === undefined) { value = 1; } + + this.alpha = value; + + return this; + }, + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + * + * @name Phaser.GameObjects.Components.AlphaSingle#alpha + * @type {number} + * @since 3.0.0 + */ + alpha: { + + get: function () + { + return this._alpha; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alpha = v; + + if (v === 0) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + } + + } + +}; + +module.exports = AlphaSingle; + + +/***/ }), +/* 289 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var BaseAnimation = __webpack_require__(290); +var Class = __webpack_require__(0); +var Events = __webpack_require__(59); + +/** + * @classdesc + * A Game Object Animation Controller. + * + * This controller lives as an instance within a Game Object, accessible as `sprite.anims`. + * + * @class Animation + * @memberof Phaser.GameObjects.Components + * @constructor + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} parent - The Game Object to which this animation controller belongs. + */ +var Animation = new Class({ + + initialize: + + function Animation (parent) + { + /** + * The Game Object to which this animation controller belongs. + * + * @name Phaser.GameObjects.Components.Animation#parent + * @type {Phaser.GameObjects.GameObject} + * @since 3.0.0 + */ + this.parent = parent; + + /** + * A reference to the global Animation Manager. + * + * @name Phaser.GameObjects.Components.Animation#animationManager + * @type {Phaser.Animations.AnimationManager} + * @since 3.0.0 + */ + this.animationManager = parent.scene.sys.anims; + + this.animationManager.once(Events.REMOVE_ANIMATION, this.remove, this); + + /** + * Is an animation currently playing or not? + * + * @name Phaser.GameObjects.Components.Animation#isPlaying + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.isPlaying = false; + + /** + * The current Animation loaded into this Animation Controller. + * + * @name Phaser.GameObjects.Components.Animation#currentAnim + * @type {?Phaser.Animations.Animation} + * @default null + * @since 3.0.0 + */ + this.currentAnim = null; + + /** + * The current AnimationFrame being displayed by this Animation Controller. + * + * @name Phaser.GameObjects.Components.Animation#currentFrame + * @type {?Phaser.Animations.AnimationFrame} + * @default null + * @since 3.0.0 + */ + this.currentFrame = null; + + /** + * The key of the next Animation to be loaded into this Animation Controller when the current animation completes. + * + * @name Phaser.GameObjects.Components.Animation#nextAnim + * @type {?string} + * @default null + * @since 3.16.0 + */ + this.nextAnim = null; + + /** + * A queue of keys of the next Animations to be loaded into this Animation Controller when the current animation completes. + * + * @name Phaser.GameObjects.Components.Animation#nextAnimsQueue + * @type {string[]} + * @since 3.24.0 + */ + this.nextAnimsQueue = []; + + /** + * Time scale factor. + * + * @name Phaser.GameObjects.Components.Animation#_timeScale + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + this._timeScale = 1; + + /** + * The frame rate of playback in frames per second. + * The default is 24 if the `duration` property is `null`. + * + * @name Phaser.GameObjects.Components.Animation#frameRate + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.frameRate = 0; + + /** + * How long the animation should play for, in milliseconds. + * If the `frameRate` property has been set then it overrides this value, + * otherwise the `frameRate` is derived from `duration`. + * + * @name Phaser.GameObjects.Components.Animation#duration + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.duration = 0; + + /** + * ms per frame, not including frame specific modifiers that may be present in the Animation data. + * + * @name Phaser.GameObjects.Components.Animation#msPerFrame + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.msPerFrame = 0; + + /** + * Skip frames if the time lags, or always advanced anyway? + * + * @name Phaser.GameObjects.Components.Animation#skipMissedFrames + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.skipMissedFrames = true; + + /** + * A delay before starting playback, in milliseconds. + * + * @name Phaser.GameObjects.Components.Animation#_delay + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._delay = 0; + + /** + * Number of times to repeat the animation (-1 for infinity) + * + * @name Phaser.GameObjects.Components.Animation#_repeat + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._repeat = 0; + + /** + * Delay before the repeat starts, in milliseconds. + * + * @name Phaser.GameObjects.Components.Animation#_repeatDelay + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._repeatDelay = 0; + + /** + * Should the animation yoyo? (reverse back down to the start) before repeating? + * + * @name Phaser.GameObjects.Components.Animation#_yoyo + * @type {boolean} + * @private + * @default false + * @since 3.0.0 + */ + this._yoyo = false; + + /** + * Will the playhead move forwards (`true`) or in reverse (`false`). + * + * @name Phaser.GameObjects.Components.Animation#forward + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.forward = true; + + /** + * An Internal trigger that's play the animation in reverse mode ('true') or not ('false'), + * needed because forward can be changed by yoyo feature. + * + * @name Phaser.GameObjects.Components.Animation#_reverse + * @type {boolean} + * @default false + * @private + * @since 3.12.0 + */ + this._reverse = false; + + /** + * Internal time overflow accumulator. + * + * @name Phaser.GameObjects.Components.Animation#accumulator + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.accumulator = 0; + + /** + * The time point at which the next animation frame will change. + * + * @name Phaser.GameObjects.Components.Animation#nextTick + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.nextTick = 0; + + /** + * An internal counter keeping track of how many repeats are left to play. + * + * @name Phaser.GameObjects.Components.Animation#repeatCounter + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.repeatCounter = 0; + + /** + * An internal flag keeping track of pending repeats. + * + * @name Phaser.GameObjects.Components.Animation#pendingRepeat + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.pendingRepeat = false; + + /** + * Is the Animation paused? + * + * @name Phaser.GameObjects.Components.Animation#_paused + * @type {boolean} + * @private + * @default false + * @since 3.0.0 + */ + this._paused = false; + + /** + * Was the animation previously playing before being paused? + * + * @name Phaser.GameObjects.Components.Animation#_wasPlaying + * @type {boolean} + * @private + * @default false + * @since 3.0.0 + */ + this._wasPlaying = false; + + /** + * Internal property tracking if this Animation is waiting to stop. + * + * 0 = No + * 1 = Waiting for ms to pass + * 2 = Waiting for repeat + * 3 = Waiting for specific frame + * + * @name Phaser.GameObjects.Components.Animation#_pendingStop + * @type {integer} + * @private + * @since 3.4.0 + */ + this._pendingStop = 0; + + /** + * Internal property used by _pendingStop. + * + * @name Phaser.GameObjects.Components.Animation#_pendingStopValue + * @type {any} + * @private + * @since 3.4.0 + */ + this._pendingStopValue; + }, + + /** + * Sets an animation to be played immediately after the current one completes. + * + * The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc, or have the `stop` method called directly on it. + * + * An animation set to repeat forever will never enter a completed state. + * + * You can chain a new animation at any point, including before the current one starts playing, during it, or when it ends (via its `animationcomplete` callback). + * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained animations without impacting the global animation they're playing. + * + * Call this method with no arguments to reset the chained animation. + * + * @method Phaser.GameObjects.Components.Animation#chain + * @since 3.16.0 + * + * @param {(string|Phaser.Animations.Animation)} [key] - The string-based key of the animation to play next, as defined previously in the Animation Manager. Or an Animation instance. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + chain: function (key) + { + if (key instanceof BaseAnimation) + { + key = key.key; + } + + if (this.nextAnim === null) + { + this.nextAnim = key; + } + else + { + this.nextAnimsQueue.push(key); + } + + return this.parent; + }, + + /** + * Sets the amount of time, in milliseconds, that the animation will be delayed before starting playback. + * + * @method Phaser.GameObjects.Components.Animation#setDelay + * @since 3.4.0 + * + * @param {integer} [value=0] - The amount of time, in milliseconds, to wait before starting playback. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + setDelay: function (value) + { + if (value === undefined) { value = 0; } + + this._delay = value; + + return this.parent; + }, + + /** + * Gets the amount of time, in milliseconds that the animation will be delayed before starting playback. + * + * @method Phaser.GameObjects.Components.Animation#getDelay + * @since 3.4.0 + * + * @return {integer} The amount of time, in milliseconds, the Animation will wait before starting playback. + */ + getDelay: function () + { + return this._delay; + }, + + /** + * Waits for the specified delay, in milliseconds, then starts playback of the requested animation. + * + * @method Phaser.GameObjects.Components.Animation#delayedPlay + * @since 3.0.0 + * + * @param {integer} delay - The delay, in milliseconds, to wait before starting the animation playing. + * @param {string} key - The key of the animation to play. + * @param {integer} [startFrame=0] - The frame of the animation to start from. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + delayedPlay: function (delay, key, startFrame) + { + this.play(key, true, startFrame); + + this.nextTick += delay; + + return this.parent; + }, + + /** + * Returns the key of the animation currently loaded into this component. + * + * @method Phaser.GameObjects.Components.Animation#getCurrentKey + * @since 3.0.0 + * + * @return {string} The key of the Animation loaded into this component. + */ + getCurrentKey: function () + { + if (this.currentAnim) + { + return this.currentAnim.key; + } + }, + + /** + * Internal method used to load an animation into this component. + * + * @method Phaser.GameObjects.Components.Animation#load + * @protected + * @since 3.0.0 + * + * @param {string} key - The key of the animation to load. + * @param {integer} [startFrame=0] - The start frame of the animation to load. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + load: function (key, startFrame) + { + if (startFrame === undefined) { startFrame = 0; } + + if (this.isPlaying) + { + this.stop(); + } + + // Load the new animation in + this.animationManager.load(this, key, startFrame); + + return this.parent; + }, + + /** + * Pause the current animation and set the `isPlaying` property to `false`. + * You can optionally pause it at a specific frame. + * + * @method Phaser.GameObjects.Components.Animation#pause + * @since 3.0.0 + * + * @param {Phaser.Animations.AnimationFrame} [atFrame] - An optional frame to set after pausing the animation. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + pause: function (atFrame) + { + if (!this._paused) + { + this._paused = true; + this._wasPlaying = this.isPlaying; + this.isPlaying = false; + } + + if (atFrame !== undefined) + { + this.updateFrame(atFrame); + } + + return this.parent; + }, + + /** + * Resumes playback of a paused animation and sets the `isPlaying` property to `true`. + * You can optionally tell it to start playback from a specific frame. + * + * @method Phaser.GameObjects.Components.Animation#resume + * @since 3.0.0 + * + * @param {Phaser.Animations.AnimationFrame} [fromFrame] - An optional frame to set before restarting playback. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + resume: function (fromFrame) + { + if (this._paused) + { + this._paused = false; + this.isPlaying = this._wasPlaying; + } + + if (fromFrame !== undefined) + { + this.updateFrame(fromFrame); + } + + return this.parent; + }, + + /** + * `true` if the current animation is paused, otherwise `false`. + * + * @name Phaser.GameObjects.Components.Animation#isPaused + * @readonly + * @type {boolean} + * @since 3.4.0 + */ + isPaused: { + + get: function () + { + return this._paused; + } + + }, + + /** + * Plays an Animation on a Game Object that has the Animation component, such as a Sprite. + * + * Animations are stored in the global Animation Manager and are referenced by a unique string-based key. + * + * @method Phaser.GameObjects.Components.Animation#play + * @fires Phaser.GameObjects.Components.Animation#onStartEvent + * @since 3.0.0 + * + * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance. + * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call. + * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + play: function (key, ignoreIfPlaying, startFrame) + { + if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } + if (startFrame === undefined) { startFrame = 0; } + + if (key instanceof BaseAnimation) + { + key = key.key; + } + + if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key) + { + return this.parent; + } + + this.forward = true; + this._reverse = false; + this._paused = false; + this._wasPlaying = true; + + return this._startAnimation(key, startFrame); + }, + + /** + * Plays an Animation (in reverse mode) on the Game Object that owns this Animation Component. + * + * @method Phaser.GameObjects.Components.Animation#playReverse + * @fires Phaser.GameObjects.Components.Animation#onStartEvent + * @since 3.12.0 + * + * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance. + * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. + * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + playReverse: function (key, ignoreIfPlaying, startFrame) + { + if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } + if (startFrame === undefined) { startFrame = 0; } + + if (key instanceof BaseAnimation) + { + key = key.key; + } + + if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key) + { + return this.parent; + } + + this.forward = false; + this._reverse = true; + + return this._startAnimation(key, startFrame); + }, + + /** + * Load an Animation and fires 'onStartEvent' event, extracted from 'play' method. + * + * @method Phaser.GameObjects.Components.Animation#_startAnimation + * @fires Phaser.Animations.Events#ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START + * @since 3.12.0 + * + * @param {string} key - The string-based key of the animation to play, as defined previously in the Animation Manager. + * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + _startAnimation: function (key, startFrame) + { + this.load(key, startFrame); + + var anim = this.currentAnim; + var gameObject = this.parent; + + if (!anim) + { + return gameObject; + } + + // Should give us 9,007,199,254,740,991 safe repeats + this.repeatCounter = (this._repeat === -1) ? Number.MAX_VALUE : this._repeat; + + anim.getFirstTick(this); + + this.isPlaying = true; + this.pendingRepeat = false; + + if (anim.showOnStart) + { + gameObject.visible = true; + } + + var frame = this.currentFrame; + + anim.emit(Events.ANIMATION_START, anim, frame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_KEY_START + key, anim, frame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_START, anim, frame, gameObject); + + return gameObject; + }, + + /** + * Reverse the Animation that is already playing on the Game Object. + * + * @method Phaser.GameObjects.Components.Animation#reverse + * @since 3.12.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + reverse: function () + { + if (this.isPlaying) + { + this._reverse = !this._reverse; + + this.forward = !this.forward; + } + + return this.parent; + }, + + /** + * Returns a value between 0 and 1 indicating how far this animation is through, ignoring repeats and yoyos. + * If the animation has a non-zero repeat defined, `getProgress` and `getTotalProgress` will be different + * because `getProgress` doesn't include any repeats or repeat delays, whereas `getTotalProgress` does. + * + * @method Phaser.GameObjects.Components.Animation#getProgress + * @since 3.4.0 + * + * @return {number} The progress of the current animation, between 0 and 1. + */ + getProgress: function () + { + var p = this.currentFrame.progress; + + if (!this.forward) + { + p = 1 - p; + } + + return p; + }, + + /** + * Takes a value between 0 and 1 and uses it to set how far this animation is through playback. + * Does not factor in repeats or yoyos, but does handle playing forwards or backwards. + * + * @method Phaser.GameObjects.Components.Animation#setProgress + * @since 3.4.0 + * + * @param {number} [value=0] - The progress value, between 0 and 1. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + setProgress: function (value) + { + if (!this.forward) + { + value = 1 - value; + } + + this.setCurrentFrame(this.currentAnim.getFrameByProgress(value)); + + return this.parent; + }, + + /** + * Handle the removal of an animation from the Animation Manager. + * + * @method Phaser.GameObjects.Components.Animation#remove + * @since 3.0.0 + * + * @param {string} [key] - The key of the removed Animation. + * @param {Phaser.Animations.Animation} [animation] - The removed Animation. + */ + remove: function (key, animation) + { + if (animation === undefined) { animation = this.currentAnim; } + + if (this.isPlaying && animation.key === this.currentAnim.key) + { + this.stop(); + + this.setCurrentFrame(this.currentAnim.frames[0]); + } + }, + + /** + * Gets the number of times that the animation will repeat + * after its first iteration. For example, if returns 1, the animation will + * play a total of twice (the initial play plus 1 repeat). + * A value of -1 means the animation will repeat indefinitely. + * + * @method Phaser.GameObjects.Components.Animation#getRepeat + * @since 3.4.0 + * + * @return {integer} The number of times that the animation will repeat. + */ + getRepeat: function () + { + return this._repeat; + }, + + /** + * Sets the number of times that the animation should repeat + * after its first iteration. For example, if repeat is 1, the animation will + * play a total of twice (the initial play plus 1 repeat). + * To repeat indefinitely, use -1. repeat should always be an integer. + * + * @method Phaser.GameObjects.Components.Animation#setRepeat + * @since 3.4.0 + * + * @param {integer} value - The number of times that the animation should repeat. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + setRepeat: function (value) + { + this._repeat = value; + + this.repeatCounter = (value === -1) ? Number.MAX_VALUE : value; + + return this.parent; + }, + + /** + * Gets the amount of delay between repeats, if any. + * + * @method Phaser.GameObjects.Components.Animation#getRepeatDelay + * @since 3.4.0 + * + * @return {number} The delay between repeats. + */ + getRepeatDelay: function () + { + return this._repeatDelay; + }, + + /** + * Sets the amount of time in seconds between repeats. + * For example, if `repeat` is 2 and `repeatDelay` is 10, the animation will play initially, + * then wait for 10 seconds before repeating, then play again, then wait another 10 seconds + * before doing its final repeat. + * + * @method Phaser.GameObjects.Components.Animation#setRepeatDelay + * @since 3.4.0 + * + * @param {number} value - The delay to wait between repeats, in seconds. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + setRepeatDelay: function (value) + { + this._repeatDelay = value; + + return this.parent; + }, + + /** + * Restarts the current animation from its beginning, optionally including its delay value. + * + * @method Phaser.GameObjects.Components.Animation#restart + * @fires Phaser.Animations.Events#ANIMATION_RESTART + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_RESTART + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART + * @since 3.0.0 + * + * @param {boolean} [includeDelay=false] - Whether to include the delay value of the animation when restarting. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + restart: function (includeDelay) + { + if (includeDelay === undefined) { includeDelay = false; } + + var anim = this.currentAnim; + + anim.getFirstTick(this, includeDelay); + + this.forward = true; + this.isPlaying = true; + this.pendingRepeat = false; + this._paused = false; + + // Set frame + this.updateFrame(anim.frames[0]); + + var gameObject = this.parent; + var frame = this.currentFrame; + + anim.emit(Events.ANIMATION_RESTART, anim, frame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_KEY_RESTART + anim.key, anim, frame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_RESTART, anim, frame, gameObject); + + return this.parent; + }, + + /** + * Immediately stops the current animation from playing and dispatches the `animationcomplete` event. + * + * If no animation is set, no event will be dispatched. + * + * If there is another animation queued (via the `chain` method) then it will start playing immediately. + * + * @method Phaser.GameObjects.Components.Animation#stop + * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent + * @since 3.0.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stop: function () + { + this._pendingStop = 0; + + this.isPlaying = false; + + var gameObject = this.parent; + var anim = this.currentAnim; + var frame = this.currentFrame; + + if (anim) + { + anim.emit(Events.ANIMATION_COMPLETE, anim, frame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_KEY_COMPLETE + anim.key, anim, frame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_COMPLETE, anim, frame, gameObject); + } + + if (this.nextAnim) + { + var key = this.nextAnim; + + this.nextAnim = (this.nextAnimsQueue.length > 0) ? this.nextAnimsQueue.shift() : null; + + this.play(key); + } + + return gameObject; + }, + + /** + * Stops the current animation from playing after the specified time delay, given in milliseconds. + * + * @method Phaser.GameObjects.Components.Animation#stopAfterDelay + * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent + * @since 3.4.0 + * + * @param {integer} delay - The number of milliseconds to wait before stopping this animation. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stopAfterDelay: function (delay) + { + this._pendingStop = 1; + this._pendingStopValue = delay; + + return this.parent; + }, + + /** + * Stops the current animation from playing when it next repeats. + * + * @method Phaser.GameObjects.Components.Animation#stopOnRepeat + * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent + * @since 3.4.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stopOnRepeat: function () + { + this._pendingStop = 2; + + return this.parent; + }, + + /** + * Stops the current animation from playing when it next sets the given frame. + * If this frame doesn't exist within the animation it will not stop it from playing. + * + * @method Phaser.GameObjects.Components.Animation#stopOnFrame + * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent + * @since 3.4.0 + * + * @param {Phaser.Animations.AnimationFrame} frame - The frame to check before stopping this animation. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stopOnFrame: function (frame) + { + this._pendingStop = 3; + this._pendingStopValue = frame; + + return this.parent; + }, + + /** + * Sets the Time Scale factor, allowing you to make the animation go go faster or slower than default. + * Where 1 = normal speed (the default), 0.5 = half speed, 2 = double speed, etc. + * + * @method Phaser.GameObjects.Components.Animation#setTimeScale + * @since 3.4.0 + * + * @param {number} [value=1] - The time scale factor, where 1 is no change, 0.5 is half speed, etc. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + setTimeScale: function (value) + { + if (value === undefined) { value = 1; } + + this._timeScale = value; + + return this.parent; + }, + + /** + * Gets the Time Scale factor. + * + * @method Phaser.GameObjects.Components.Animation#getTimeScale + * @since 3.4.0 + * + * @return {number} The Time Scale value. + */ + getTimeScale: function () + { + return this._timeScale; + }, + + /** + * Returns the total number of frames in this animation. + * + * @method Phaser.GameObjects.Components.Animation#getTotalFrames + * @since 3.4.0 + * + * @return {integer} The total number of frames in this animation. + */ + getTotalFrames: function () + { + return this.currentAnim.frames.length; + }, + + /** + * The internal update loop for the Animation Component. + * + * @method Phaser.GameObjects.Components.Animation#update + * @since 3.0.0 + * + * @param {number} time - The current timestamp. + * @param {number} delta - The delta time, in ms, elapsed since the last frame. + */ + update: function (time, delta) + { + if (!this.currentAnim || !this.isPlaying || this.currentAnim.paused) + { + return; + } + + this.accumulator += delta * this._timeScale; + + if (this._pendingStop === 1) + { + this._pendingStopValue -= delta; + + if (this._pendingStopValue <= 0) + { + return this.currentAnim.completeAnimation(this); + } + } + + if (this.accumulator >= this.nextTick) + { + this.currentAnim.setFrame(this); + } + }, + + /** + * Sets the given Animation Frame as being the current frame + * and applies it to the parent Game Object, adjusting its size and origin as needed. + * + * @method Phaser.GameObjects.Components.Animation#setCurrentFrame + * @since 3.4.0 + * + * @param {Phaser.Animations.AnimationFrame} animationFrame - The Animation Frame to set as being current. + * + * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. + */ + setCurrentFrame: function (animationFrame) + { + var gameObject = this.parent; + + this.currentFrame = animationFrame; + + gameObject.texture = animationFrame.frame.texture; + gameObject.frame = animationFrame.frame; + + if (gameObject.isCropped) + { + gameObject.frame.updateCropUVs(gameObject._crop, gameObject.flipX, gameObject.flipY); + } + + gameObject.setSizeToFrame(); + + if (gameObject._originComponent) + { + if (animationFrame.frame.customPivot) + { + gameObject.setOrigin(animationFrame.frame.pivotX, animationFrame.frame.pivotY); + } + else + { + gameObject.updateDisplayOrigin(); + } + } + + return gameObject; + }, + + /** + * Internal frame change handler. + * + * @method Phaser.GameObjects.Components.Animation#updateFrame + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE + * @private + * @since 3.0.0 + * + * @param {Phaser.Animations.AnimationFrame} animationFrame - The animation frame to change to. + */ + updateFrame: function (animationFrame) + { + var gameObject = this.setCurrentFrame(animationFrame); + + if (this.isPlaying) + { + if (animationFrame.setAlpha) + { + gameObject.alpha = animationFrame.alpha; + } + + var anim = this.currentAnim; + + gameObject.emit(Events.SPRITE_ANIMATION_KEY_UPDATE + anim.key, anim, animationFrame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_UPDATE, anim, animationFrame, gameObject); + + if (this._pendingStop === 3 && this._pendingStopValue === animationFrame) + { + this.currentAnim.completeAnimation(this); + } + } + }, + + /** + * Advances the animation to the next frame, regardless of the time or animation state. + * If the animation is set to repeat, or yoyo, this will still take effect. + * + * Calling this does not change the direction of the animation. I.e. if it was currently + * playing in reverse, calling this method doesn't then change the direction to forwards. + * + * @method Phaser.GameObjects.Components.Animation#nextFrame + * @since 3.16.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. + */ + nextFrame: function () + { + if (this.currentAnim) + { + this.currentAnim.nextFrame(this); + } + + return this.parent; + }, + + /** + * Advances the animation to the previous frame, regardless of the time or animation state. + * If the animation is set to repeat, or yoyo, this will still take effect. + * + * Calling this does not change the direction of the animation. I.e. if it was currently + * playing in forwards, calling this method doesn't then change the direction to backwards. + * + * @method Phaser.GameObjects.Components.Animation#previousFrame + * @since 3.16.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. + */ + previousFrame: function () + { + if (this.currentAnim) + { + this.currentAnim.previousFrame(this); + } + + return this.parent; + }, + + /** + * Sets if the current Animation will yoyo when it reaches the end. + * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again. + * + * @method Phaser.GameObjects.Components.Animation#setYoyo + * @since 3.4.0 + * + * @param {boolean} [value=false] - `true` if the animation should yoyo, `false` to not. + * + * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. + */ + setYoyo: function (value) + { + if (value === undefined) { value = false; } + + this._yoyo = value; + + return this.parent; + }, + + /** + * Gets if the current Animation will yoyo when it reaches the end. + * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again. + * + * @method Phaser.GameObjects.Components.Animation#getYoyo + * @since 3.4.0 + * + * @return {boolean} `true` if the animation is set to yoyo, `false` if not. + */ + getYoyo: function () + { + return this._yoyo; + }, + + /** + * Destroy this Animation component. + * + * Unregisters event listeners and cleans up its references. + * + * @method Phaser.GameObjects.Components.Animation#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.animationManager.off(Events.REMOVE_ANIMATION, this.remove, this); + + this.animationManager = null; + this.parent = null; + this.nextAnimsQueue.length = 0; + + this.currentAnim = null; + this.currentFrame = null; + } + +}); + +module.exports = Animation; + + +/***/ }), +/* 290 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Clamp = __webpack_require__(3); +var Class = __webpack_require__(0); +var EventEmitter = __webpack_require__(55); +var Events = __webpack_require__(59); +var FindClosestInSorted = __webpack_require__(57); +var Frame = __webpack_require__(309); +var GetValue = __webpack_require__(7); + +/** + * @classdesc + * A Frame based Animation. + * + * This consists of a key, some default values (like the frame rate) and a bunch of Frame objects. + * + * The Animation Manager creates these. Game Objects don't own an instance of these directly. + * Game Objects have the Animation Component, which are like playheads to global Animations (these objects) + * So multiple Game Objects can have playheads all pointing to this one Animation instance. + * + * @class Animation + * @memberof Phaser.Animations + * @extends Phaser.Events.EventEmitter + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Animations.AnimationManager} manager - A reference to the global Animation Manager + * @param {string} key - The unique identifying string for this animation. + * @param {Phaser.Types.Animations.Animation} config - The Animation configuration. + */ +var Animation = new Class({ + + Extends: EventEmitter, + + initialize: + + function Animation (manager, key, config) + { + EventEmitter.call(this); + + /** + * A reference to the global Animation Manager. + * + * @name Phaser.Animations.Animation#manager + * @type {Phaser.Animations.AnimationManager} + * @since 3.0.0 + */ + this.manager = manager; + + /** + * The unique identifying string for this animation. + * + * @name Phaser.Animations.Animation#key + * @type {string} + * @since 3.0.0 + */ + this.key = key; + + /** + * A frame based animation (as opposed to a bone based animation) + * + * @name Phaser.Animations.Animation#type + * @type {string} + * @default frame + * @since 3.0.0 + */ + this.type = 'frame'; + + /** + * Extract all the frame data into the frames array. + * + * @name Phaser.Animations.Animation#frames + * @type {Phaser.Animations.AnimationFrame[]} + * @since 3.0.0 + */ + this.frames = this.getFrames( + manager.textureManager, + GetValue(config, 'frames', []), + GetValue(config, 'defaultTextureKey', null) + ); + + /** + * The frame rate of playback in frames per second (default 24 if duration is null) + * + * @name Phaser.Animations.Animation#frameRate + * @type {integer} + * @default 24 + * @since 3.0.0 + */ + this.frameRate = GetValue(config, 'frameRate', null); + + /** + * How long the animation should play for, in milliseconds. + * If the `frameRate` property has been set then it overrides this value, + * otherwise the `frameRate` is derived from `duration`. + * + * @name Phaser.Animations.Animation#duration + * @type {integer} + * @since 3.0.0 + */ + this.duration = GetValue(config, 'duration', null); + + if (this.duration === null && this.frameRate === null) + { + // No duration or frameRate given, use default frameRate of 24fps + this.frameRate = 24; + this.duration = (this.frameRate / this.frames.length) * 1000; + } + else if (this.duration && this.frameRate === null) + { + // Duration given but no frameRate, so set the frameRate based on duration + // I.e. 12 frames in the animation, duration = 4000 ms + // So frameRate is 12 / (4000 / 1000) = 3 fps + this.frameRate = this.frames.length / (this.duration / 1000); + } + else + { + // frameRate given, derive duration from it (even if duration also specified) + // I.e. 15 frames in the animation, frameRate = 30 fps + // So duration is 15 / 30 = 0.5 * 1000 (half a second, or 500ms) + this.duration = (this.frames.length / this.frameRate) * 1000; + } + + /** + * How many ms per frame, not including frame specific modifiers. + * + * @name Phaser.Animations.Animation#msPerFrame + * @type {integer} + * @since 3.0.0 + */ + this.msPerFrame = 1000 / this.frameRate; + + /** + * Skip frames if the time lags, or always advanced anyway? + * + * @name Phaser.Animations.Animation#skipMissedFrames + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.skipMissedFrames = GetValue(config, 'skipMissedFrames', true); + + /** + * The delay in ms before the playback will begin. + * + * @name Phaser.Animations.Animation#delay + * @type {integer} + * @default 0 + * @since 3.0.0 + */ + this.delay = GetValue(config, 'delay', 0); + + /** + * Number of times to repeat the animation. Set to -1 to repeat forever. + * + * @name Phaser.Animations.Animation#repeat + * @type {integer} + * @default 0 + * @since 3.0.0 + */ + this.repeat = GetValue(config, 'repeat', 0); + + /** + * The delay in ms before the a repeat play starts. + * + * @name Phaser.Animations.Animation#repeatDelay + * @type {integer} + * @default 0 + * @since 3.0.0 + */ + this.repeatDelay = GetValue(config, 'repeatDelay', 0); + + /** + * Should the animation yoyo (reverse back down to the start) before repeating? + * + * @name Phaser.Animations.Animation#yoyo + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.yoyo = GetValue(config, 'yoyo', false); + + /** + * Should the GameObject's `visible` property be set to `true` when the animation starts to play? + * + * @name Phaser.Animations.Animation#showOnStart + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.showOnStart = GetValue(config, 'showOnStart', false); + + /** + * Should the GameObject's `visible` property be set to `false` when the animation finishes? + * + * @name Phaser.Animations.Animation#hideOnComplete + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.hideOnComplete = GetValue(config, 'hideOnComplete', false); + + /** + * Global pause. All Game Objects using this Animation instance are impacted by this property. + * + * @name Phaser.Animations.Animation#paused + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.paused = false; + + this.manager.on(Events.PAUSE_ALL, this.pause, this); + this.manager.on(Events.RESUME_ALL, this.resume, this); + }, + + /** + * Add frames to the end of the animation. + * + * @method Phaser.Animations.Animation#addFrame + * @since 3.0.0 + * + * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects. + * + * @return {this} This Animation object. + */ + addFrame: function (config) + { + return this.addFrameAt(this.frames.length, config); + }, + + /** + * Add frame/s into the animation. + * + * @method Phaser.Animations.Animation#addFrameAt + * @since 3.0.0 + * + * @param {integer} index - The index to insert the frame at within the animation. + * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects. + * + * @return {this} This Animation object. + */ + addFrameAt: function (index, config) + { + var newFrames = this.getFrames(this.manager.textureManager, config); + + if (newFrames.length > 0) + { + if (index === 0) + { + this.frames = newFrames.concat(this.frames); + } + else if (index === this.frames.length) + { + this.frames = this.frames.concat(newFrames); + } + else + { + var pre = this.frames.slice(0, index); + var post = this.frames.slice(index); + + this.frames = pre.concat(newFrames, post); + } + + this.updateFrameSequence(); + } + + return this; + }, + + /** + * Check if the given frame index is valid. + * + * @method Phaser.Animations.Animation#checkFrame + * @since 3.0.0 + * + * @param {integer} index - The index to be checked. + * + * @return {boolean} `true` if the index is valid, otherwise `false`. + */ + checkFrame: function (index) + { + return (index >= 0 && index < this.frames.length); + }, + + /** + * Called internally when this Animation completes playback. + * Optionally, hides the parent Game Object, then stops playback. + * + * @method Phaser.Animations.Animation#completeAnimation + * @protected + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. + */ + completeAnimation: function (component) + { + if (this.hideOnComplete) + { + component.parent.visible = false; + } + + component.stop(); + }, + + /** + * Called internally when this Animation first starts to play. + * Sets the accumulator and nextTick properties. + * + * @method Phaser.Animations.Animation#getFirstTick + * @protected + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. + * @param {boolean} [includeDelay=true] - If `true` the Animation Components delay value will be added to the `nextTick` total. + */ + getFirstTick: function (component, includeDelay) + { + if (includeDelay === undefined) { includeDelay = true; } + + // When is the first update due? + component.accumulator = 0; + component.nextTick = component.msPerFrame + component.currentFrame.duration; + + if (includeDelay) + { + component.nextTick += component._delay; + } + }, + + /** + * Returns the AnimationFrame at the provided index + * + * @method Phaser.Animations.Animation#getFrameAt + * @protected + * @since 3.0.0 + * + * @param {integer} index - The index in the AnimationFrame array + * + * @return {Phaser.Animations.AnimationFrame} The frame at the index provided from the animation sequence + */ + getFrameAt: function (index) + { + return this.frames[index]; + }, + + /** + * Creates AnimationFrame instances based on the given frame data. + * + * @method Phaser.Animations.Animation#getFrames + * @since 3.0.0 + * + * @param {Phaser.Textures.TextureManager} textureManager - A reference to the global Texture Manager. + * @param {(string|Phaser.Types.Animations.AnimationFrame[])} frames - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects. + * @param {string} [defaultTextureKey] - The key to use if no key is set in the frame configuration object. + * + * @return {Phaser.Animations.AnimationFrame[]} An array of newly created AnimationFrame instances. + */ + getFrames: function (textureManager, frames, defaultTextureKey) + { + var out = []; + var prev; + var animationFrame; + var index = 1; + var i; + var textureKey; + + // if frames is a string, we'll get all the frames from the texture manager as if it's a sprite sheet + if (typeof frames === 'string') + { + textureKey = frames; + + var texture = textureManager.get(textureKey); + var frameKeys = texture.getFrameNames(); + + frames = []; + + frameKeys.forEach(function (idx, value) + { + frames.push({ key: textureKey, frame: value }); + }); + } + + if (!Array.isArray(frames) || frames.length === 0) + { + return out; + } + + for (i = 0; i < frames.length; i++) + { + var item = frames[i]; + + var key = GetValue(item, 'key', defaultTextureKey); + + if (!key) + { + continue; + } + + // Could be an integer or a string + var frame = GetValue(item, 'frame', 0); + + // The actual texture frame + var textureFrame = textureManager.getFrame(key, frame); + + animationFrame = new Frame(key, frame, index, textureFrame); + + animationFrame.duration = GetValue(item, 'duration', 0); + + animationFrame.isFirst = (!prev); + + // The previously created animationFrame + if (prev) + { + prev.nextFrame = animationFrame; + + animationFrame.prevFrame = prev; + } + + out.push(animationFrame); + + prev = animationFrame; + + index++; + } + + if (out.length > 0) + { + animationFrame.isLast = true; + + // Link them end-to-end, so they loop + animationFrame.nextFrame = out[0]; + + out[0].prevFrame = animationFrame; + + // Generate the progress data + + var slice = 1 / (out.length - 1); + + for (i = 0; i < out.length; i++) + { + out[i].progress = i * slice; + } + } + + return out; + }, + + /** + * Called internally. Sets the accumulator and nextTick values of the current Animation. + * + * @method Phaser.Animations.Animation#getNextTick + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. + */ + getNextTick: function (component) + { + // accumulator += delta * _timeScale + // after a large delta surge (perf issue for example) we need to adjust for it here + + // When is the next update due? + component.accumulator -= component.nextTick; + + component.nextTick = component.msPerFrame + component.currentFrame.duration; + }, + + /** + * Loads the Animation values into the Animation Component. + * + * @method Phaser.Animations.Animation#load + * @private + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to load values into. + * @param {integer} startFrame - The start frame of the animation to load. + */ + load: function (component, startFrame) + { + if (startFrame >= this.frames.length) + { + startFrame = 0; + } + + if (component.currentAnim !== this) + { + component.currentAnim = this; + + component.frameRate = this.frameRate; + component.duration = this.duration; + component.msPerFrame = this.msPerFrame; + component.skipMissedFrames = this.skipMissedFrames; + + component._delay = this.delay; + component._repeat = this.repeat; + component._repeatDelay = this.repeatDelay; + component._yoyo = this.yoyo; + } + + var frame = this.frames[startFrame]; + + if (startFrame === 0 && !component.forward) + { + frame = this.getLastFrame(); + } + + component.updateFrame(frame); + }, + + /** + * Returns the frame closest to the given progress value between 0 and 1. + * + * @method Phaser.Animations.Animation#getFrameByProgress + * @since 3.4.0 + * + * @param {number} value - A value between 0 and 1. + * + * @return {Phaser.Animations.AnimationFrame} The frame closest to the given progress value. + */ + getFrameByProgress: function (value) + { + value = Clamp(value, 0, 1); + + return FindClosestInSorted(value, this.frames, 'progress'); + }, + + /** + * Advance the animation frame. + * + * @method Phaser.Animations.Animation#nextFrame + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to advance. + */ + nextFrame: function (component) + { + var frame = component.currentFrame; + + // TODO: Add frame skip support + + if (frame.isLast) + { + // We're at the end of the animation + + // Yoyo? (happens before repeat) + if (component._yoyo) + { + this.handleYoyoFrame(component, false); + } + else if (component.repeatCounter > 0) + { + // Repeat (happens before complete) + + if (component._reverse && component.forward) + { + component.forward = false; + } + else + { + this.repeatAnimation(component); + } + } + else + { + this.completeAnimation(component); + } + } + else + { + this.updateAndGetNextTick(component, frame.nextFrame); + } + }, + + /** + * Handle the yoyo functionality in nextFrame and previousFrame methods. + * + * @method Phaser.Animations.Animation#handleYoyoFrame + * @private + * @since 3.12.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to advance. + * @param {boolean} isReverse - Is animation in reverse mode? (Default: false) + */ + handleYoyoFrame: function (component, isReverse) + { + if (!isReverse) { isReverse = false; } + + if (component._reverse === !isReverse && component.repeatCounter > 0) + { + if (!component._repeatDelay || component.pendingRepeat) + + { + component.forward = isReverse; + } + + this.repeatAnimation(component); + + return; + } + + if (component._reverse !== isReverse && component.repeatCounter === 0) + { + this.completeAnimation(component); + + return; + } + + component.forward = isReverse; + + var frame = (isReverse) ? component.currentFrame.nextFrame : component.currentFrame.prevFrame; + + this.updateAndGetNextTick(component, frame); + }, + + /** + * Returns the animation last frame. + * + * @method Phaser.Animations.Animation#getLastFrame + * @since 3.12.0 + * + * @return {Phaser.Animations.AnimationFrame} component - The Animation Last Frame. + */ + getLastFrame: function () + { + return this.frames[this.frames.length - 1]; + }, + + /** + * Called internally when the Animation is playing backwards. + * Sets the previous frame, causing a yoyo, repeat, complete or update, accordingly. + * + * @method Phaser.Animations.Animation#previousFrame + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. + */ + previousFrame: function (component) + { + var frame = component.currentFrame; + + // TODO: Add frame skip support + + if (frame.isFirst) + { + // We're at the start of the animation + + if (component._yoyo) + { + this.handleYoyoFrame(component, true); + } + else if (component.repeatCounter > 0) + { + if (component._reverse && !component.forward) + { + component.currentFrame = this.getLastFrame(); + this.repeatAnimation(component); + } + else + { + // Repeat (happens before complete) + component.forward = true; + this.repeatAnimation(component); + } + } + else + { + this.completeAnimation(component); + } + } + else + { + this.updateAndGetNextTick(component, frame.prevFrame); + } + }, + + /** + * Update Frame and Wait next tick. + * + * @method Phaser.Animations.Animation#updateAndGetNextTick + * @private + * @since 3.12.0 + * + * @param {Phaser.Animations.AnimationFrame} frame - An Animation frame. + */ + updateAndGetNextTick: function (component, frame) + { + component.updateFrame(frame); + + this.getNextTick(component); + }, + + /** + * Removes the given AnimationFrame from this Animation instance. + * This is a global action. Any Game Object using this Animation will be impacted by this change. + * + * @method Phaser.Animations.Animation#removeFrame + * @since 3.0.0 + * + * @param {Phaser.Animations.AnimationFrame} frame - The AnimationFrame to be removed. + * + * @return {this} This Animation object. + */ + removeFrame: function (frame) + { + var index = this.frames.indexOf(frame); + + if (index !== -1) + { + this.removeFrameAt(index); + } + + return this; + }, + + /** + * Removes a frame from the AnimationFrame array at the provided index + * and updates the animation accordingly. + * + * @method Phaser.Animations.Animation#removeFrameAt + * @since 3.0.0 + * + * @param {integer} index - The index in the AnimationFrame array + * + * @return {this} This Animation object. + */ + removeFrameAt: function (index) + { + this.frames.splice(index, 1); + + this.updateFrameSequence(); + + return this; + }, + + /** + * Called internally during playback. Forces the animation to repeat, providing there are enough counts left + * in the repeat counter. + * + * @method Phaser.Animations.Animation#repeatAnimation + * @fires Phaser.Animations.Events#ANIMATION_REPEAT + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_REPEAT + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. + */ + repeatAnimation: function (component) + { + if (component._pendingStop === 2) + { + return this.completeAnimation(component); + } + + if (component._repeatDelay > 0 && component.pendingRepeat === false) + { + component.pendingRepeat = true; + component.accumulator -= component.nextTick; + component.nextTick += component._repeatDelay; + } + else + { + component.repeatCounter--; + + component.updateFrame(component.currentFrame[(component.forward) ? 'nextFrame' : 'prevFrame']); + + if (component.isPlaying) + { + this.getNextTick(component); + + component.pendingRepeat = false; + + var frame = component.currentFrame; + var parent = component.parent; + + this.emit(Events.ANIMATION_REPEAT, this, frame); + + parent.emit(Events.SPRITE_ANIMATION_KEY_REPEAT + this.key, this, frame, component.repeatCounter, parent); + + parent.emit(Events.SPRITE_ANIMATION_REPEAT, this, frame, component.repeatCounter, parent); + } + } + }, + + /** + * Sets the texture frame the animation uses for rendering. + * + * @method Phaser.Animations.Animation#setFrame + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. + */ + setFrame: function (component) + { + // Work out which frame should be set next on the child, and set it + if (component.forward) + { + this.nextFrame(component); + } + else + { + this.previousFrame(component); + } + }, + + /** + * Converts the animation data to JSON. + * + * @method Phaser.Animations.Animation#toJSON + * @since 3.0.0 + * + * @return {Phaser.Types.Animations.JSONAnimation} The resulting JSONAnimation formatted object. + */ + toJSON: function () + { + var output = { + 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, + showOnStart: this.showOnStart, + hideOnComplete: this.hideOnComplete + }; + + this.frames.forEach(function (frame) + { + output.frames.push(frame.toJSON()); + }); + + return output; + }, + + /** + * Called internally whenever frames are added to, or removed from, this Animation. + * + * @method Phaser.Animations.Animation#updateFrameSequence + * @since 3.0.0 + * + * @return {this} This Animation object. + */ + updateFrameSequence: function () + { + var len = this.frames.length; + var slice = 1 / (len - 1); + + var frame; + + for (var i = 0; i < len; i++) + { + frame = this.frames[i]; + + frame.index = i + 1; + frame.isFirst = false; + frame.isLast = false; + frame.progress = i * slice; + + if (i === 0) + { + frame.isFirst = true; + + if (len === 1) + { + frame.isLast = true; + frame.nextFrame = frame; + frame.prevFrame = frame; + } + else + { + frame.isLast = false; + frame.prevFrame = this.frames[len - 1]; + frame.nextFrame = this.frames[i + 1]; + } + } + else if (i === len - 1 && len > 1) + { + frame.isLast = true; + frame.prevFrame = this.frames[len - 2]; + frame.nextFrame = this.frames[0]; + } + else if (len > 1) + { + frame.prevFrame = this.frames[i - 1]; + frame.nextFrame = this.frames[i + 1]; + } + } + + return this; + }, + + /** + * Pauses playback of this Animation. The paused state is set immediately. + * + * @method Phaser.Animations.Animation#pause + * @since 3.0.0 + * + * @return {this} This Animation object. + */ + pause: function () + { + this.paused = true; + + return this; + }, + + /** + * Resumes playback of this Animation. The paused state is reset immediately. + * + * @method Phaser.Animations.Animation#resume + * @since 3.0.0 + * + * @return {this} This Animation object. + */ + resume: function () + { + this.paused = false; + + return this; + }, + + /** + * Destroys this Animation instance. It will remove all event listeners, + * remove this animation and its key from the global Animation Manager, + * and then destroy all Animation Frames in turn. + * + * @method Phaser.Animations.Animation#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.removeAllListeners(); + + this.manager.off(Events.PAUSE_ALL, this.pause, this); + this.manager.off(Events.RESUME_ALL, this.resume, this); + + this.manager.remove(this.key); + + for (var i = 0; i < this.frames.length; i++) + { + this.frames[i].destroy(); + } + + this.frames = []; + + this.manager = null; + } + +}); + +module.exports = Animation; + + +/***/ }), +/* 291 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Add Animation Event. + * + * This event is dispatched when a new animation is added to the global Animation Manager. + * + * This can happen either as a result of an animation instance being added to the Animation Manager, + * or the Animation Manager creating a new animation directly. + * + * @event Phaser.Animations.Events#ADD_ANIMATION + * @since 3.0.0 + * + * @param {string} key - The key of the Animation that was added to the global Animation Manager. + * @param {Phaser.Animations.Animation} animation - An instance of the newly created Animation. + */ +module.exports = 'add'; + + +/***/ }), +/* 292 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Complete Event. + * + * This event is dispatched by an Animation instance when it completes, i.e. finishes playing or is manually stopped. + * + * Be careful with the volume of events this could generate. If a group of Sprites all complete the same + * animation at the same time, this event will invoke its handler for each one of them. + * + * @event Phaser.Animations.Events#ANIMATION_COMPLETE + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed. + */ +module.exports = 'complete'; + + +/***/ }), +/* 293 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Repeat Event. + * + * This event is dispatched when a currently playing animation repeats. + * + * The event is dispatched directly from the Animation object itself. Which means that listeners + * bound to this event will be invoked every time the Animation repeats, for every Game Object that may have it. + * + * @event Phaser.Animations.Events#ANIMATION_REPEAT + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that repeated. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation was on when it repeated. + */ +module.exports = 'repeat'; + + +/***/ }), +/* 294 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Restart Event. + * + * This event is dispatched by an Animation instance when it restarts. + * + * Be careful with the volume of events this could generate. If a group of Sprites all restart the same + * animation at the same time, this event will invoke its handler for each one of them. + * + * @event Phaser.Animations.Events#ANIMATION_RESTART + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that restarted playing. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing. + */ +module.exports = 'restart'; + + +/***/ }), +/* 295 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Start Event. + * + * This event is dispatched by an Animation instance when it starts playing. + * + * Be careful with the volume of events this could generate. If a group of Sprites all play the same + * animation at the same time, this event will invoke its handler for each one of them. + * + * @event Phaser.Animations.Events#ANIMATION_START + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that started playing. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing. + */ +module.exports = 'start'; + + +/***/ }), +/* 296 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Pause All Animations Event. + * + * This event is dispatched when the global Animation Manager is told to pause. + * + * When this happens all current animations will stop updating, although it doesn't necessarily mean + * that the game has paused as well. + * + * @event Phaser.Animations.Events#PAUSE_ALL + * @since 3.0.0 + */ +module.exports = 'pauseall'; + + +/***/ }), +/* 297 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Remove Animation Event. + * + * This event is dispatched when an animation is removed from the global Animation Manager. + * + * @event Phaser.Animations.Events#REMOVE_ANIMATION + * @since 3.0.0 + * + * @param {string} key - The key of the Animation that was removed from the global Animation Manager. + * @param {Phaser.Animations.Animation} animation - An instance of the removed Animation. + */ +module.exports = 'remove'; + + +/***/ }), +/* 298 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Resume All Animations Event. + * + * This event is dispatched when the global Animation Manager resumes, having been previously paused. + * + * When this happens all current animations will continue updating again. + * + * @event Phaser.Animations.Events#RESUME_ALL + * @since 3.0.0 + */ +module.exports = 'resumeall'; + + +/***/ }), +/* 299 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Complete Event. + * + * This event is dispatched by a Sprite when an animation finishes playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationcomplete', listener)` + * + * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_COMPLETE` event. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_COMPLETE + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed. + */ +module.exports = 'animationcomplete'; + + +/***/ }), +/* 300 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Key Complete Event. + * + * This event is dispatched by a Sprite when a specific animation finishes playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationcomplete-key', listener)` where `key` is the key of + * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationcomplete-explode`. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_COMPLETE + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed. + */ +module.exports = 'animationcomplete-'; + + +/***/ }), +/* 301 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Key Repeat Event. + * + * This event is dispatched by a Sprite when a specific animation repeats playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationrepeat-key', listener)` where `key` is the key of + * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrepeat-explode`. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. + * @param {integer} repeatCount - The number of times the Animation has repeated so far. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing. + */ +module.exports = 'animationrepeat-'; + + +/***/ }), +/* 302 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Key Restart Event. + * + * This event is dispatched by a Sprite when a specific animation restarts playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationrestart-key', listener)` where `key` is the key of + * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrestart-explode`. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing. + */ +module.exports = 'animationrestart-'; + + +/***/ }), +/* 303 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Key Start Event. + * + * This event is dispatched by a Sprite when a specific animation starts playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationstart-key', listener)` where `key` is the key of + * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationstart-explode`. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing. + */ +module.exports = 'animationstart-'; + + +/***/ }), +/* 304 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Key Update Event. + * + * This event is dispatched by a Sprite when a specific animation playing on it updates. This happens when the animation changes frame, + * based on the animation frame rate and other factors like `timeScale` and `delay`. + * + * Listen for it on the Sprite using `sprite.on('animationupdate-key', listener)` where `key` is the key of + * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationupdate-explode`. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated. + */ +module.exports = 'animationupdate-'; + + +/***/ }), +/* 305 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Repeat Event. + * + * This event is dispatched by a Sprite when an animation repeats playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationrepeat', listener)` + * + * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_REPEAT` event. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_REPEAT + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. + * @param {integer} repeatCount - The number of times the Animation has repeated so far. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing. + */ +module.exports = 'animationrepeat'; + + +/***/ }), +/* 306 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Restart Event. + * + * This event is dispatched by a Sprite when an animation restarts playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationrestart', listener)` + * + * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_RESTART` event. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_RESTART + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing. + */ +module.exports = 'animationrestart'; + + +/***/ }), +/* 307 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Start Event. + * + * This event is dispatched by a Sprite when an animation starts playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationstart', listener)` + * + * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_START` event. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_START + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing. + */ +module.exports = 'animationstart'; + + +/***/ }), +/* 308 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Update Event. + * + * This event is dispatched by a Sprite when an animation playing on it updates. This happens when the animation changes frame, + * based on the animation frame rate and other factors like `timeScale` and `delay`. + * + * Listen for it on the Sprite using `sprite.on('animationupdate', listener)` + * + * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_UPDATE` event. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated. + */ +module.exports = 'animationupdate'; + + +/***/ }), +/* 309 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); + +/** + * @classdesc + * A single frame in an Animation sequence. + * + * An AnimationFrame consists of a reference to the Texture it uses for rendering, references to other + * frames in the animation, and index data. It also has the ability to modify the animation timing. + * + * AnimationFrames are generated automatically by the Animation class. + * + * @class AnimationFrame + * @memberof Phaser.Animations + * @constructor + * @since 3.0.0 + * + * @param {string} textureKey - The key of the Texture this AnimationFrame uses. + * @param {(string|integer)} textureFrame - The key of the Frame within the Texture that this AnimationFrame uses. + * @param {integer} index - The index of this AnimationFrame within the Animation sequence. + * @param {Phaser.Textures.Frame} frame - A reference to the Texture Frame this AnimationFrame uses for rendering. + */ +var AnimationFrame = new Class({ + + initialize: + + function AnimationFrame (textureKey, textureFrame, index, frame) + { + /** + * The key of the Texture this AnimationFrame uses. + * + * @name Phaser.Animations.AnimationFrame#textureKey + * @type {string} + * @since 3.0.0 + */ + this.textureKey = textureKey; + + /** + * The key of the Frame within the Texture that this AnimationFrame uses. + * + * @name Phaser.Animations.AnimationFrame#textureFrame + * @type {(string|integer)} + * @since 3.0.0 + */ + this.textureFrame = textureFrame; + + /** + * The index of this AnimationFrame within the Animation sequence. + * + * @name Phaser.Animations.AnimationFrame#index + * @type {integer} + * @since 3.0.0 + */ + this.index = index; + + /** + * A reference to the Texture Frame this AnimationFrame uses for rendering. + * + * @name Phaser.Animations.AnimationFrame#frame + * @type {Phaser.Textures.Frame} + * @since 3.0.0 + */ + this.frame = frame; + + /** + * Is this the first frame in an animation sequence? + * + * @name Phaser.Animations.AnimationFrame#isFirst + * @type {boolean} + * @default false + * @readonly + * @since 3.0.0 + */ + this.isFirst = false; + + /** + * Is this the last frame in an animation sequence? + * + * @name Phaser.Animations.AnimationFrame#isLast + * @type {boolean} + * @default false + * @readonly + * @since 3.0.0 + */ + this.isLast = false; + + /** + * A reference to the AnimationFrame that comes before this one in the animation, if any. + * + * @name Phaser.Animations.AnimationFrame#prevFrame + * @type {?Phaser.Animations.AnimationFrame} + * @default null + * @readonly + * @since 3.0.0 + */ + this.prevFrame = null; + + /** + * A reference to the AnimationFrame that comes after this one in the animation, if any. + * + * @name Phaser.Animations.AnimationFrame#nextFrame + * @type {?Phaser.Animations.AnimationFrame} + * @default null + * @readonly + * @since 3.0.0 + */ + this.nextFrame = null; + + /** + * Additional time (in ms) that this frame should appear for during playback. + * The value is added onto the msPerFrame set by the animation. + * + * @name Phaser.Animations.AnimationFrame#duration + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.duration = 0; + + /** + * What % through the animation does this frame come? + * This value is generated when the animation is created and cached here. + * + * @name Phaser.Animations.AnimationFrame#progress + * @type {number} + * @default 0 + * @readonly + * @since 3.0.0 + */ + this.progress = 0; + }, + + /** + * Generates a JavaScript object suitable for converting to JSON. + * + * @method Phaser.Animations.AnimationFrame#toJSON + * @since 3.0.0 + * + * @return {Phaser.Types.Animations.JSONAnimationFrame} The AnimationFrame data. + */ + toJSON: function () + { + return { + key: this.textureKey, + frame: this.textureFrame, + duration: this.duration + }; + }, + + /** + * Destroys this object by removing references to external resources and callbacks. + * + * @method Phaser.Animations.AnimationFrame#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.frame = undefined; + } + +}); + +module.exports = AnimationFrame; + + +/***/ }), +/* 310 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var BlendModes = __webpack_require__(16); + +/** + * Provides methods used for setting the blend mode of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.BlendMode + * @since 3.0.0 + */ + +var BlendMode = { + + /** + * Private internal value. Holds the current blend mode. + * + * @name Phaser.GameObjects.Components.BlendMode#_blendMode + * @type {integer} + * @private + * @default 0 + * @since 3.0.0 + */ + _blendMode: BlendModes.NORMAL, + + /** + * 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: + * + * * 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. + * + * @name Phaser.GameObjects.Components.BlendMode#blendMode + * @type {(Phaser.BlendModes|string)} + * @since 3.0.0 + */ + blendMode: { + + get: function () + { + return this._blendMode; + }, + + set: function (value) + { + if (typeof value === 'string') + { + value = BlendModes[value]; + } + + value |= 0; + + if (value >= -1) + { + this._blendMode = value; + } + } + + }, + + /** + * 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: + * + * * 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. + * + * @method Phaser.GameObjects.Components.BlendMode#setBlendMode + * @since 3.0.0 + * + * @param {(string|Phaser.BlendModes)} value - The BlendMode value. Either a string or a CONST. + * + * @return {this} This Game Object instance. + */ + setBlendMode: function (value) + { + this.blendMode = value; + + return this; + } + +}; + +module.exports = BlendMode; + + +/***/ }), +/* 311 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for getting and setting the texture of a Game Object. + * + * @namespace Phaser.GameObjects.Components.Crop + * @since 3.12.0 + */ + +var Crop = { + + /** + * The Texture this Game Object is using to render with. + * + * @name Phaser.GameObjects.Components.Crop#texture + * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture} + * @since 3.0.0 + */ + texture: null, + + /** + * The Texture Frame this Game Object is using to render with. + * + * @name Phaser.GameObjects.Components.Crop#frame + * @type {Phaser.Textures.Frame} + * @since 3.0.0 + */ + frame: null, + + /** + * A boolean flag indicating if this Game Object is being cropped or not. + * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off. + * Equally, calling `setCrop` with no arguments will reset the crop and disable it. + * + * @name Phaser.GameObjects.Components.Crop#isCropped + * @type {boolean} + * @since 3.11.0 + */ + isCropped: false, + + /** + * Applies a crop to a texture based Game Object, such as a Sprite or Image. + * + * The crop is a rectangle that limits the area of the texture frame that is visible during rendering. + * + * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just + * changes what is shown when rendered. + * + * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left. + * + * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left + * half of it, you could call `setCrop(0, 0, 400, 600)`. + * + * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop + * an area of 200x100 when applied to a Game Object that had a scale factor of 2. + * + * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument. + * + * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`. + * + * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow + * the renderer to skip several internal calculations. + * + * @method Phaser.GameObjects.Components.Crop#setCrop + * @since 3.11.0 + * + * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored. + * @param {number} [y] - The y coordinate to start the crop from. + * @param {number} [width] - The width of the crop rectangle in pixels. + * @param {number} [height] - The height of the crop rectangle in pixels. + * + * @return {this} This Game Object instance. + */ + setCrop: function (x, y, width, height) + { + if (x === undefined) + { + this.isCropped = false; + } + else if (this.frame) + { + if (typeof x === 'number') + { + this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY); + } + else + { + var rect = x; + + this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY); + } + + this.isCropped = true; + } + + return this; + }, + + /** + * Internal method that returns a blank, well-formed crop object for use by a Game Object. + * + * @method Phaser.GameObjects.Components.Crop#resetCropObject + * @private + * @since 3.12.0 + * + * @return {object} The crop object. + */ + resetCropObject: function () + { + return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 }; + } + +}; + +module.exports = Crop; + + +/***/ }), +/* 312 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Rectangle = __webpack_require__(24); +var RotateAround = __webpack_require__(38); +var Vector2 = __webpack_require__(1); + +/** + * Provides methods used for obtaining the bounds of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.GetBounds + * @since 3.0.0 + */ + +var GetBounds = { + + /** + * Processes the bounds output vector before returning it. + * + * @method Phaser.GameObjects.Components.GetBounds#prepareBoundsOutput + * @private + * @since 3.18.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} output - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + prepareBoundsOutput: function (output, includeParent) + { + if (includeParent === undefined) { includeParent = false; } + + if (this.rotation !== 0) + { + RotateAround(output, this.x, this.y, this.rotation); + } + + if (includeParent && this.parentContainer) + { + var parentMatrix = this.parentContainer.getBoundsTransformMatrix(); + + parentMatrix.transformPoint(output.x, output.y, output); + } + + return output; + }, + + /** + * Gets the center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getCenter + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getCenter: function (output) + { + if (output === undefined) { output = new Vector2(); } + + output.x = this.x - (this.displayWidth * this.originX) + (this.displayWidth / 2); + output.y = this.y - (this.displayHeight * this.originY) + (this.displayHeight / 2); + + return output; + }, + + /** + * Gets the top-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getTopLeft + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getTopLeft: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = this.x - (this.displayWidth * this.originX); + output.y = this.y - (this.displayHeight * this.originY); + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the top-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getTopCenter + * @since 3.18.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getTopCenter: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2); + output.y = this.y - (this.displayHeight * this.originY); + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the top-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getTopRight + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getTopRight: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth; + output.y = this.y - (this.displayHeight * this.originY); + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the left-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getLeftCenter + * @since 3.18.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getLeftCenter: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = this.x - (this.displayWidth * this.originX); + output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2); + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the right-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getRightCenter + * @since 3.18.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getRightCenter: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth; + output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2); + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the bottom-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getBottomLeft + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getBottomLeft: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = this.x - (this.displayWidth * this.originX); + output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight; + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the bottom-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getBottomCenter + * @since 3.18.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getBottomCenter: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2); + output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight; + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the bottom-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getBottomRight + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getBottomRight: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth; + output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight; + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the bounds of this Game Object, regardless of origin. + * The values are stored and returned in a Rectangle, or Rectangle-like, object. + * + * @method Phaser.GameObjects.Components.GetBounds#getBounds + * @since 3.0.0 + * + * @generic {Phaser.Geom.Rectangle} O - [output,$return] + * + * @param {(Phaser.Geom.Rectangle|object)} [output] - An object to store the values in. If not provided a new Rectangle will be created. + * + * @return {(Phaser.Geom.Rectangle|object)} The values stored in the output object. + */ + getBounds: function (output) + { + if (output === undefined) { output = new Rectangle(); } + + // We can use the output object to temporarily store the x/y coords in: + + var TLx, TLy, TRx, TRy, BLx, BLy, BRx, BRy; + + // Instead of doing a check if parent container is + // defined per corner we only do it once. + if (this.parentContainer) + { + var parentMatrix = this.parentContainer.getBoundsTransformMatrix(); + + this.getTopLeft(output); + parentMatrix.transformPoint(output.x, output.y, output); + + TLx = output.x; + TLy = output.y; + + this.getTopRight(output); + parentMatrix.transformPoint(output.x, output.y, output); + + TRx = output.x; + TRy = output.y; + + this.getBottomLeft(output); + parentMatrix.transformPoint(output.x, output.y, output); + + BLx = output.x; + BLy = output.y; + + this.getBottomRight(output); + parentMatrix.transformPoint(output.x, output.y, output); + + BRx = output.x; + BRy = output.y; + } + else + { + this.getTopLeft(output); + + TLx = output.x; + TLy = output.y; + + this.getTopRight(output); + + TRx = output.x; + TRy = output.y; + + this.getBottomLeft(output); + + BLx = output.x; + BLy = output.y; + + this.getBottomRight(output); + + BRx = output.x; + BRy = output.y; + } + + output.x = Math.min(TLx, TRx, BLx, BRx); + output.y = Math.min(TLy, TRy, BLy, BRy); + output.width = Math.max(TLx, TRx, BLx, BRx) - output.x; + output.height = Math.max(TLy, TRy, BLy, BRy) - output.y; + + return output; + } + +}; + +module.exports = GetBounds; + + +/***/ }), +/* 313 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Checks if a given point is inside a Rectangle's bounds. + * + * @function Phaser.Geom.Rectangle.Contains + * @since 3.0.0 + * + * @param {Phaser.Geom.Rectangle} rect - The Rectangle to check. + * @param {number} x - The X coordinate of the point to check. + * @param {number} y - The Y coordinate of the point to check. + * + * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`. + */ +var Contains = function (rect, x, y) +{ + if (rect.width <= 0 || rect.height <= 0) + { + return false; + } + + return (rect.x <= x && rect.x + rect.width >= x && rect.y <= y && rect.y + rect.height >= y); +}; + +module.exports = Contains; + + +/***/ }), +/* 314 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetPoint = __webpack_require__(60); +var Perimeter = __webpack_require__(61); + +// 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. + * + * @function Phaser.Geom.Rectangle.GetPoints + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point[]} O - [out,$return] + * + * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle object to get the points from. + * @param {number} step - Step between points. Used to calculate the number of points to return when quantity is falsey. Ignored if quantity is positive. + * @param {integer} quantity - The number of evenly spaced points from the rectangles perimeter to return. If falsey, step param will be used to calculate the number of points. + * @param {(array|Phaser.Geom.Point[])} [out] - An optional array to store the points in. + * + * @return {(array|Phaser.Geom.Point[])} An array of Points from the perimeter of the rectangle. + */ +var GetPoints = function (rectangle, quantity, stepRate, out) +{ + if (out === undefined) { out = []; } + + // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. + if (!quantity && stepRate > 0) + { + quantity = Perimeter(rectangle) / stepRate; + } + + for (var i = 0; i < quantity; i++) + { + var position = i / quantity; + + out.push(GetPoint(rectangle, position)); + } + + return out; +}; + +module.exports = GetPoints; + + +/***/ }), +/* 315 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var GetPoint = __webpack_require__(316); +var GetPoints = __webpack_require__(317); +var GEOM_CONST = __webpack_require__(25); +var Random = __webpack_require__(319); +var Vector2 = __webpack_require__(1); + +/** + * @classdesc + * Defines a Line segment, a part of a line between two endpoints. + * + * @class Line + * @memberof Phaser.Geom + * @constructor + * @since 3.0.0 + * + * @param {number} [x1=0] - The x coordinate of the lines starting point. + * @param {number} [y1=0] - The y coordinate of the lines starting point. + * @param {number} [x2=0] - The x coordinate of the lines ending point. + * @param {number} [y2=0] - The y coordinate of the lines ending point. + */ +var Line = new Class({ + + initialize: + + function Line (x1, y1, x2, y2) + { + if (x1 === undefined) { x1 = 0; } + if (y1 === undefined) { y1 = 0; } + if (x2 === undefined) { x2 = 0; } + if (y2 === undefined) { y2 = 0; } + + /** + * The geometry constant type of this object: `GEOM_CONST.LINE`. + * Used for fast type comparisons. + * + * @name Phaser.Geom.Line#type + * @type {integer} + * @readonly + * @since 3.19.0 + */ + this.type = GEOM_CONST.LINE; + + /** + * The x coordinate of the lines starting point. + * + * @name Phaser.Geom.Line#x1 + * @type {number} + * @since 3.0.0 + */ + this.x1 = x1; + + /** + * The y coordinate of the lines starting point. + * + * @name Phaser.Geom.Line#y1 + * @type {number} + * @since 3.0.0 + */ + this.y1 = y1; + + /** + * The x coordinate of the lines ending point. + * + * @name Phaser.Geom.Line#x2 + * @type {number} + * @since 3.0.0 + */ + this.x2 = x2; + + /** + * The y coordinate of the lines ending point. + * + * @name Phaser.Geom.Line#y2 + * @type {number} + * @since 3.0.0 + */ + this.y2 = y2; + }, + + /** + * Get a point on a line that's a given percentage along its length. + * + * @method Phaser.Geom.Line#getPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [output,$return] + * + * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line. + * @param {(Phaser.Geom.Point|object)} [output] - An optional point, or point-like object, to store the coordinates of the point on the line. + * + * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point on the line. + */ + getPoint: function (position, output) + { + return GetPoint(this, position, output); + }, + + /** + * Get a number of points along a line's length. + * + * Provide a `quantity` to get an exact number of points along the line. + * + * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when + * providing a `stepRate`. + * + * @method Phaser.Geom.Line#getPoints + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point[]} O - [output,$return] + * + * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead. + * @param {integer} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`. + * @param {(array|Phaser.Geom.Point[])} [output] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line. + * + * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line. + */ + getPoints: function (quantity, stepRate, output) + { + return GetPoints(this, quantity, stepRate, output); + }, + + /** + * Get a random Point on the Line. + * + * @method Phaser.Geom.Line#getRandomPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [point,$return] + * + * @param {(Phaser.Geom.Point|object)} [point] - An instance of a Point to be modified. + * + * @return {Phaser.Geom.Point} A random Point on the Line. + */ + getRandomPoint: function (point) + { + return Random(this, point); + }, + + /** + * Set new coordinates for the line endpoints. + * + * @method Phaser.Geom.Line#setTo + * @since 3.0.0 + * + * @param {number} [x1=0] - The x coordinate of the lines starting point. + * @param {number} [y1=0] - The y coordinate of the lines starting point. + * @param {number} [x2=0] - The x coordinate of the lines ending point. + * @param {number} [y2=0] - The y coordinate of the lines ending point. + * + * @return {this} This Line object. + */ + setTo: function (x1, y1, x2, y2) + { + if (x1 === undefined) { x1 = 0; } + if (y1 === undefined) { y1 = 0; } + if (x2 === undefined) { x2 = 0; } + if (y2 === undefined) { y2 = 0; } + + this.x1 = x1; + this.y1 = y1; + + this.x2 = x2; + this.y2 = y2; + + return this; + }, + + /** + * Returns a Vector2 object that corresponds to the start of this Line. + * + * @method Phaser.Geom.Line#getPointA + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [vec2,$return] + * + * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created. + * + * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the start of this Line. + */ + getPointA: function (vec2) + { + if (vec2 === undefined) { vec2 = new Vector2(); } + + vec2.set(this.x1, this.y1); + + return vec2; + }, + + /** + * Returns a Vector2 object that corresponds to the end of this Line. + * + * @method Phaser.Geom.Line#getPointB + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [vec2,$return] + * + * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created. + * + * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the end of this Line. + */ + getPointB: function (vec2) + { + if (vec2 === undefined) { vec2 = new Vector2(); } + + vec2.set(this.x2, this.y2); + + return vec2; + }, + + /** + * The left position of the Line. + * + * @name Phaser.Geom.Line#left + * @type {number} + * @since 3.0.0 + */ + left: { + + get: function () + { + return Math.min(this.x1, this.x2); + }, + + set: function (value) + { + if (this.x1 <= this.x2) + { + this.x1 = value; + } + else + { + this.x2 = value; + } + } + + }, + + /** + * The right position of the Line. + * + * @name Phaser.Geom.Line#right + * @type {number} + * @since 3.0.0 + */ + right: { + + get: function () + { + return Math.max(this.x1, this.x2); + }, + + set: function (value) + { + if (this.x1 > this.x2) + { + this.x1 = value; + } + else + { + this.x2 = value; + } + } + + }, + + /** + * The top position of the Line. + * + * @name Phaser.Geom.Line#top + * @type {number} + * @since 3.0.0 + */ + top: { + + get: function () + { + return Math.min(this.y1, this.y2); + }, + + set: function (value) + { + if (this.y1 <= this.y2) + { + this.y1 = value; + } + else + { + this.y2 = value; + } + } + + }, + + /** + * The bottom position of the Line. + * + * @name Phaser.Geom.Line#bottom + * @type {number} + * @since 3.0.0 + */ + bottom: { + + get: function () + { + return Math.max(this.y1, this.y2); + }, + + set: function (value) + { + if (this.y1 > this.y2) + { + this.y1 = value; + } + else + { + this.y2 = value; + } + } + + } + +}); + +module.exports = Line; + + +/***/ }), +/* 316 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Point = __webpack_require__(12); + +/** + * Get a point on a line that's a given percentage along its length. + * + * @function Phaser.Geom.Line.GetPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [out,$return] + * + * @param {Phaser.Geom.Line} line - The line. + * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line. + * @param {(Phaser.Geom.Point|object)} [out] - An optional point, or point-like object, to store the coordinates of the point on the line. + * + * @return {(Phaser.Geom.Point|object)} The point on the line. + */ +var GetPoint = function (line, position, out) +{ + if (out === undefined) { out = new Point(); } + + out.x = line.x1 + (line.x2 - line.x1) * position; + out.y = line.y1 + (line.y2 - line.y1) * position; + + return out; +}; + +module.exports = GetPoint; + + +/***/ }), +/* 317 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Length = __webpack_require__(318); +var Point = __webpack_require__(12); + +/** + * Get a number of points along a line's length. + * + * Provide a `quantity` to get an exact number of points along the line. + * + * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when + * providing a `stepRate`. + * + * @function Phaser.Geom.Line.GetPoints + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point[]} O - [out,$return] + * + * @param {Phaser.Geom.Line} line - The line. + * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead. + * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`. + * @param {(array|Phaser.Geom.Point[])} [out] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line. + * + * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line. + */ +var GetPoints = function (line, quantity, stepRate, out) +{ + if (out === undefined) { out = []; } + + // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. + if (!quantity && stepRate > 0) + { + quantity = Length(line) / stepRate; + } + + var x1 = line.x1; + var y1 = line.y1; + + var x2 = line.x2; + var y2 = line.y2; + + for (var i = 0; i < quantity; i++) + { + var position = i / quantity; + + var x = x1 + (x2 - x1) * position; + var y = y1 + (y2 - y1) * position; + + out.push(new Point(x, y)); + } + + return out; +}; + +module.exports = GetPoints; + + +/***/ }), +/* 318 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the length of the given line. + * + * @function Phaser.Geom.Line.Length + * @since 3.0.0 + * + * @param {Phaser.Geom.Line} line - The line to calculate the length of. + * + * @return {number} The length of the line. + */ +var Length = function (line) +{ + return Math.sqrt((line.x2 - line.x1) * (line.x2 - line.x1) + (line.y2 - line.y1) * (line.y2 - line.y1)); +}; + +module.exports = Length; + + +/***/ }), +/* 319 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Point = __webpack_require__(12); + +/** + * Returns a random point on a given Line. + * + * @function Phaser.Geom.Line.Random + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [out,$return] + * + * @param {Phaser.Geom.Line} line - The Line to calculate the random Point on. + * @param {(Phaser.Geom.Point|object)} [out] - An instance of a Point to be modified. + * + * @return {(Phaser.Geom.Point|object)} A random Point on the Line. + */ +var Random = function (line, out) +{ + if (out === undefined) { out = new Point(); } + + var t = Math.random(); + + out.x = line.x1 + t * (line.x2 - line.x1); + out.y = line.y1 + t * (line.y2 - line.y1); + + return out; +}; + +module.exports = Random; + + +/***/ }), +/* 320 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Point = __webpack_require__(12); + +/** + * Returns a random point within a Rectangle. + * + * @function Phaser.Geom.Rectangle.Random + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [out,$return] + * + * @param {Phaser.Geom.Rectangle} rect - The Rectangle to return a point from. + * @param {Phaser.Geom.Point} out - The object to update with the point's coordinates. + * + * @return {Phaser.Geom.Point} The modified `out` object, or a new Point if none was provided. + */ +var Random = function (rect, out) +{ + if (out === undefined) { out = new Point(); } + + out.x = rect.x + (Math.random() * rect.width); + out.y = rect.y + (Math.random() * rect.height); + + return out; +}; + +module.exports = Random; + + +/***/ }), +/* 321 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var BitmapMask = __webpack_require__(322); +var GeometryMask = __webpack_require__(340); + +/** + * Provides methods used for getting and setting the mask of a Game Object. + * + * @namespace Phaser.GameObjects.Components.Mask + * @since 3.0.0 + */ + +var Mask = { + + /** + * The Mask this Game Object is using during render. + * + * @name Phaser.GameObjects.Components.Mask#mask + * @type {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask} + * @since 3.0.0 + */ + mask: null, + + /** + * 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. + * + * 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. + * + * 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. + * + * @method Phaser.GameObjects.Components.Mask#setMask + * @since 3.6.2 + * + * @param {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask} mask - The mask this Game Object will use when rendering. + * + * @return {this} This Game Object instance. + */ + setMask: function (mask) + { + this.mask = mask; + + return this; + }, + + /** + * Clears the mask that this Game Object was using. + * + * @method Phaser.GameObjects.Components.Mask#clearMask + * @since 3.6.2 + * + * @param {boolean} [destroyMask=false] - Destroy the mask before clearing it? + * + * @return {this} This Game Object instance. + */ + clearMask: function (destroyMask) + { + if (destroyMask === undefined) { destroyMask = false; } + + if (destroyMask && this.mask) + { + this.mask.destroy(); + } + + this.mask = null; + + return this; + }, + + /** + * Creates and returns a Bitmap 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 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 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 Game Object. + * + * @method Phaser.GameObjects.Components.Mask#createBitmapMask + * @since 3.6.2 + * + * @param {Phaser.GameObjects.GameObject} [renderable] - A renderable Game Object that uses a texture, such as a Sprite. + * + * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created. + */ + createBitmapMask: function (renderable) + { + if (renderable === undefined && (this.texture || this.shader)) + { + // eslint-disable-next-line consistent-this + renderable = this; + } + + return new BitmapMask(this.scene, renderable); + }, + + /** + * 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. + * + * This means you can call this method to create a Geometry Mask from any Graphics Game Object. + * + * @method Phaser.GameObjects.Components.Mask#createGeometryMask + * @since 3.6.2 + * + * @param {Phaser.GameObjects.Graphics} [graphics] - A Graphics Game Object. The geometry within it will be used as the mask. + * + * @return {Phaser.Display.Masks.GeometryMask} This Geometry Mask that was created. + */ + createGeometryMask: function (graphics) + { + if (graphics === undefined && this.type === 'Graphics') + { + // eslint-disable-next-line consistent-this + graphics = this; + } + + return new GeometryMask(this.scene, graphics); + } + +}; + +module.exports = Mask; + + +/***/ }), +/* 322 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var GameEvents = __webpack_require__(323); + +/** + * @classdesc + * A Bitmap Mask combines the alpha (opacity) of a masked pixel with the alpha of another pixel. + * Unlike the Geometry Mask, which is a clipping path, a Bitmap Mask behaves like an alpha mask, + * not a clipping path. It is only available when using the WebGL Renderer. + * + * A Bitmap Mask can use any Game Object to determine the alpha of each pixel of the masked Game Object(s). + * For any given point of a masked Game Object's texture, the pixel's alpha will be multiplied by the alpha + * of the pixel at the same position in the Bitmap Mask's Game Object. The color of the pixel from the + * Bitmap Mask doesn't matter. + * + * For example, if a pure blue pixel with an alpha of 0.95 is masked with a pure red pixel with an + * alpha of 0.5, the resulting pixel will be pure blue with an alpha of 0.475. Naturally, this means + * that a pixel in the mask with an alpha of 0 will hide the corresponding pixel in all masked Game Objects + * A pixel with an alpha of 1 in the masked Game Object will receive the same alpha as the + * corresponding pixel in the mask. + * + * The Bitmap Mask's location matches the location of its Game Object, not the location of the + * masked objects. Moving or transforming the underlying Game Object will change the mask + * (and affect the visibility of any masked objects), whereas moving or transforming a masked object + * will not affect the mask. + * + * The Bitmap Mask will not render its Game Object by itself. If the Game Object is not in a + * Scene's display list, it will only be used for the mask and its full texture will not be directly + * visible. Adding the underlying Game Object to a Scene will not cause any problems - it will + * render as a normal Game Object and will also serve as a mask. + * + * @class BitmapMask + * @memberof Phaser.Display.Masks + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - The Scene which this Bitmap Mask will be used in. + * @param {Phaser.GameObjects.GameObject} renderable - A renderable Game Object that uses a texture, such as a Sprite. + */ +var BitmapMask = new Class({ + + initialize: + + function BitmapMask (scene, renderable) + { + var renderer = scene.sys.game.renderer; + + /** + * A reference to either the Canvas or WebGL Renderer that this Mask is using. + * + * @name Phaser.Display.Masks.BitmapMask#renderer + * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} + * @since 3.11.0 + */ + this.renderer = renderer; + + /** + * A renderable Game Object that uses a texture, such as a Sprite. + * + * @name Phaser.Display.Masks.BitmapMask#bitmapMask + * @type {Phaser.GameObjects.GameObject} + * @since 3.0.0 + */ + this.bitmapMask = renderable; + + /** + * The texture used for the mask's framebuffer. + * + * @name Phaser.Display.Masks.BitmapMask#maskTexture + * @type {WebGLTexture} + * @default null + * @since 3.0.0 + */ + this.maskTexture = null; + + /** + * The texture used for the main framebuffer. + * + * @name Phaser.Display.Masks.BitmapMask#mainTexture + * @type {WebGLTexture} + * @default null + * @since 3.0.0 + */ + this.mainTexture = null; + + /** + * Whether the Bitmap Mask is dirty and needs to be updated. + * + * @name Phaser.Display.Masks.BitmapMask#dirty + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.dirty = true; + + /** + * The framebuffer to which a masked Game Object is rendered. + * + * @name Phaser.Display.Masks.BitmapMask#mainFramebuffer + * @type {WebGLFramebuffer} + * @since 3.0.0 + */ + this.mainFramebuffer = null; + + /** + * The framebuffer to which the Bitmap Mask's masking Game Object is rendered. + * + * @name Phaser.Display.Masks.BitmapMask#maskFramebuffer + * @type {WebGLFramebuffer} + * @since 3.0.0 + */ + this.maskFramebuffer = null; + + /** + * The previous framebuffer set in the renderer before this one was enabled. + * + * @name Phaser.Display.Masks.BitmapMask#prevFramebuffer + * @type {WebGLFramebuffer} + * @since 3.17.0 + */ + this.prevFramebuffer = null; + + /** + * Whether to invert the masks alpha. + * + * If `true`, the alpha of the masking pixel will be inverted before it's multiplied with the masked pixel. Essentially, this means that a masked area will be visible only if the corresponding area in the mask is invisible. + * + * @name Phaser.Display.Masks.BitmapMask#invertAlpha + * @type {boolean} + * @since 3.1.2 + */ + this.invertAlpha = false; + + /** + * Is this mask a stencil mask? + * + * @name Phaser.Display.Masks.BitmapMask#isStencil + * @type {boolean} + * @readonly + * @since 3.17.0 + */ + this.isStencil = false; + + if (renderer && renderer.gl) + { + var width = renderer.width; + var height = renderer.height; + var pot = ((width & (width - 1)) === 0 && (height & (height - 1)) === 0); + var gl = renderer.gl; + var wrap = pot ? gl.REPEAT : gl.CLAMP_TO_EDGE; + var filter = gl.LINEAR; + + this.mainTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height); + this.maskTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height); + this.mainFramebuffer = renderer.createFramebuffer(width, height, this.mainTexture, true); + this.maskFramebuffer = renderer.createFramebuffer(width, height, this.maskTexture, true); + + scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, function (renderer) + { + var width = renderer.width; + var height = renderer.height; + var pot = ((width & (width - 1)) === 0 && (height & (height - 1)) === 0); + var gl = renderer.gl; + var wrap = pot ? gl.REPEAT : gl.CLAMP_TO_EDGE; + var filter = gl.LINEAR; + + this.mainTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height); + this.maskTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height); + this.mainFramebuffer = renderer.createFramebuffer(width, height, this.mainTexture, true); + this.maskFramebuffer = renderer.createFramebuffer(width, height, this.maskTexture, true); + + }, this); + } + }, + + /** + * Sets a new masking Game Object for the Bitmap Mask. + * + * @method Phaser.Display.Masks.BitmapMask#setBitmap + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} renderable - A renderable Game Object that uses a texture, such as a Sprite. + */ + setBitmap: function (renderable) + { + this.bitmapMask = renderable; + }, + + /** + * Prepares the WebGL Renderer to render a Game Object with this mask applied. + * + * This renders the masking Game Object to the mask framebuffer and switches to the main framebuffer so that the masked Game Object will be rendered to it instead of being rendered directly to the frame. + * + * @method Phaser.Display.Masks.BitmapMask#preRenderWebGL + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to prepare. + * @param {Phaser.GameObjects.GameObject} maskedObject - The masked Game Object which will be drawn. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to. + */ + preRenderWebGL: function (renderer, maskedObject, camera) + { + renderer.pipelines.BitmapMaskPipeline.beginMask(this, maskedObject, camera); + }, + + /** + * Finalizes rendering of a masked Game Object. + * + * This resets the previously bound framebuffer and switches the WebGL Renderer to the Bitmap Mask Pipeline, which uses a special fragment shader to apply the masking effect. + * + * @method Phaser.Display.Masks.BitmapMask#postRenderWebGL + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to clean up. + */ + postRenderWebGL: function (renderer, camera) + { + renderer.pipelines.BitmapMaskPipeline.endMask(this, camera); + }, + + /** + * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer. + * + * @method Phaser.Display.Masks.BitmapMask#preRenderCanvas + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to. + * @param {Phaser.GameObjects.GameObject} mask - The masked Game Object which would be rendered. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to. + */ + preRenderCanvas: function () + { + // NOOP + }, + + /** + * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer. + * + * @method Phaser.Display.Masks.BitmapMask#postRenderCanvas + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to. + */ + postRenderCanvas: function () + { + // NOOP + }, + + /** + * Destroys this BitmapMask and nulls any references it holds. + * + * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it, + * so be sure to call `clearMask` on any Game Object using it, before destroying it. + * + * @method Phaser.Display.Masks.BitmapMask#destroy + * @since 3.7.0 + */ + destroy: function () + { + this.bitmapMask = null; + + var renderer = this.renderer; + + if (renderer && renderer.gl) + { + renderer.deleteTexture(this.mainTexture); + renderer.deleteTexture(this.maskTexture); + renderer.deleteFramebuffer(this.mainFramebuffer); + renderer.deleteFramebuffer(this.maskFramebuffer); + } + + this.mainTexture = null; + this.maskTexture = null; + this.mainFramebuffer = null; + this.maskFramebuffer = null; + this.prevFramebuffer = null; + this.renderer = null; + } + +}); + +module.exports = BitmapMask; + + +/***/ }), +/* 323 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Core.Events + */ + +module.exports = { + + BLUR: __webpack_require__(324), + BOOT: __webpack_require__(325), + CONTEXT_LOST: __webpack_require__(326), + CONTEXT_RESTORED: __webpack_require__(327), + DESTROY: __webpack_require__(328), + FOCUS: __webpack_require__(329), + HIDDEN: __webpack_require__(330), + PAUSE: __webpack_require__(331), + POST_RENDER: __webpack_require__(332), + POST_STEP: __webpack_require__(333), + PRE_RENDER: __webpack_require__(334), + PRE_STEP: __webpack_require__(335), + READY: __webpack_require__(336), + RESUME: __webpack_require__(337), + STEP: __webpack_require__(338), + VISIBLE: __webpack_require__(339) + +}; + + +/***/ }), +/* 324 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Blur Event. + * + * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded + * enters a blurred state. The blur event is raised when the window loses focus. This can happen if a user swaps + * tab, or if they simply remove focus from the browser to another app. + * + * @event Phaser.Core.Events#BLUR + * @since 3.0.0 + */ +module.exports = 'blur'; + + +/***/ }), +/* 325 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Boot Event. + * + * This event is dispatched when the Phaser Game instance has finished booting, but before it is ready to start running. + * The global systems use this event to know when to set themselves up, dispatching their own `ready` events as required. + * + * @event Phaser.Core.Events#BOOT + * @since 3.0.0 + */ +module.exports = 'boot'; + + +/***/ }), +/* 326 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Context Lost Event. + * + * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Lost event from the browser. + * + * The partner event is `CONTEXT_RESTORED`. + * + * @event Phaser.Core.Events#CONTEXT_LOST + * @since 3.19.0 + */ +module.exports = 'contextlost'; + + +/***/ }), +/* 327 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Context Restored Event. + * + * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Restored event from the browser. + * + * The partner event is `CONTEXT_LOST`. + * + * @event Phaser.Core.Events#CONTEXT_RESTORED + * @since 3.19.0 + */ +module.exports = 'contextrestored'; + + +/***/ }), +/* 328 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Destroy Event. + * + * This event is dispatched when the game instance has been told to destroy itself. + * Lots of internal systems listen to this event in order to clear themselves out. + * Custom plugins and game code should also do the same. + * + * @event Phaser.Core.Events#DESTROY + * @since 3.0.0 + */ +module.exports = 'destroy'; + + +/***/ }), +/* 329 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Focus Event. + * + * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded + * enters a focused state. The focus event is raised when the window re-gains focus, having previously lost it. + * + * @event Phaser.Core.Events#FOCUS + * @since 3.0.0 + */ +module.exports = 'focus'; + + +/***/ }), +/* 330 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Hidden Event. + * + * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded + * enters a hidden state. Only browsers that support the Visibility API will cause this event to be emitted. + * + * In most modern browsers, when the document enters a hidden state, the Request Animation Frame and setTimeout, which + * control the main game loop, will automatically pause. There is no way to stop this from happening. It is something + * your game should account for in its own code, should the pause be an issue (i.e. for multiplayer games) + * + * @event Phaser.Core.Events#HIDDEN + * @since 3.0.0 + */ +module.exports = 'hidden'; + + +/***/ }), +/* 331 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Pause Event. + * + * This event is dispatched when the Game loop enters a paused state, usually as a result of the Visibility Handler. + * + * @event Phaser.Core.Events#PAUSE + * @since 3.0.0 + */ +module.exports = 'pause'; + + +/***/ }), +/* 332 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Post-Render Event. + * + * This event is dispatched right at the end of the render process. + * + * Every Scene will have rendered and been drawn to the canvas by the time this event is fired. + * Use it for any last minute post-processing before the next game step begins. + * + * @event Phaser.Core.Events#POST_RENDER + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - A reference to the current renderer being used by the Game instance. + */ +module.exports = 'postrender'; + + +/***/ }), +/* 333 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Post-Step Event. + * + * This event is dispatched after the Scene Manager has updated. + * Hook into it from plugins or systems that need to do things before the render starts. + * + * @event Phaser.Core.Events#POST_STEP + * @since 3.0.0 + * + * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. + * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. + */ +module.exports = 'poststep'; + + +/***/ }), +/* 334 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Pre-Render Event. + * + * This event is dispatched immediately before any of the Scenes have started to render. + * + * The renderer will already have been initialized this frame, clearing itself and preparing to receive the Scenes for rendering, but it won't have actually drawn anything yet. + * + * @event Phaser.Core.Events#PRE_RENDER + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - A reference to the current renderer being used by the Game instance. + */ +module.exports = 'prerender'; + + +/***/ }), +/* 335 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Pre-Step Event. + * + * This event is dispatched before the main Game Step starts. By this point in the game cycle none of the Scene updates have yet happened. + * Hook into it from plugins or systems that need to update before the Scene Manager does. + * + * @event Phaser.Core.Events#PRE_STEP + * @since 3.0.0 + * + * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. + * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. + */ +module.exports = 'prestep'; + + +/***/ }), +/* 336 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Ready Event. + * + * This event is dispatched when the Phaser Game instance has finished booting, the Texture Manager is fully ready, + * and all local systems are now able to start. + * + * @event Phaser.Core.Events#READY + * @since 3.0.0 + */ +module.exports = 'ready'; + + +/***/ }), +/* 337 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Resume Event. + * + * This event is dispatched when the game loop leaves a paused state and resumes running. + * + * @event Phaser.Core.Events#RESUME + * @since 3.0.0 + */ +module.exports = 'resume'; + + +/***/ }), +/* 338 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Step Event. + * + * This event is dispatched after the Game Pre-Step and before the Scene Manager steps. + * Hook into it from plugins or systems that need to update before the Scene Manager does, but after the core Systems have. + * + * @event Phaser.Core.Events#STEP + * @since 3.0.0 + * + * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. + * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. + */ +module.exports = 'step'; + + +/***/ }), +/* 339 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Visible Event. + * + * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded + * enters a visible state, previously having been hidden. + * + * Only browsers that support the Visibility API will cause this event to be emitted. + * + * @event Phaser.Core.Events#VISIBLE + * @since 3.0.0 + */ +module.exports = 'visible'; + + +/***/ }), +/* 340 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); + +/** + * @classdesc + * A Geometry Mask can be applied to a Game Object to hide any pixels of it which don't intersect + * a visible pixel from the geometry mask. The mask is essentially a clipping path which can only + * make a masked pixel fully visible or fully invisible without changing its alpha (opacity). + * + * A Geometry Mask uses a Graphics Game Object to determine which pixels of the masked Game Object(s) + * should be clipped. For any given point of a masked Game Object's texture, the pixel will only be displayed + * if the Graphics Game Object of the Geometry Mask has a visible pixel at the same position. The color and + * alpha of the pixel from the Geometry Mask do not matter. + * + * The Geometry Mask's location matches the location of its Graphics object, not the location of the masked objects. + * Moving or transforming the underlying Graphics object will change the mask (and affect the visibility + * of any masked objects), whereas moving or transforming a masked object will not affect the mask. + * You can think of the Geometry Mask (or rather, of its Graphics object) as an invisible curtain placed + * in front of all masked objects which has its own visual properties and, naturally, respects the camera's + * visual properties, but isn't affected by and doesn't follow the masked objects by itself. + * + * @class GeometryMask + * @memberof Phaser.Display.Masks + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - This parameter is not used. + * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics Game Object to use for the Geometry Mask. Doesn't have to be in the Display List. + */ +var GeometryMask = new Class({ + + initialize: + + function GeometryMask (scene, graphicsGeometry) + { + /** + * The Graphics object which describes the Geometry Mask. + * + * @name Phaser.Display.Masks.GeometryMask#geometryMask + * @type {Phaser.GameObjects.Graphics} + * @since 3.0.0 + */ + this.geometryMask = graphicsGeometry; + + /** + * Similar to the BitmapMasks invertAlpha setting this to true will then hide all pixels + * drawn to the Geometry Mask. + * + * @name Phaser.Display.Masks.GeometryMask#invertAlpha + * @type {boolean} + * @since 3.16.0 + */ + this.invertAlpha = false; + + /** + * Is this mask a stencil mask? + * + * @name Phaser.Display.Masks.GeometryMask#isStencil + * @type {boolean} + * @readonly + * @since 3.17.0 + */ + this.isStencil = true; + + /** + * The current stencil level. + * + * @name Phaser.Display.Masks.GeometryMask#level + * @type {boolean} + * @private + * @since 3.17.0 + */ + this.level = 0; + }, + + /** + * Sets a new Graphics object for the Geometry Mask. + * + * @method Phaser.Display.Masks.GeometryMask#setShape + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics object which will be used for the Geometry Mask. + * + * @return {this} This Geometry Mask + */ + setShape: function (graphicsGeometry) + { + this.geometryMask = graphicsGeometry; + + return this; + }, + + /** + * Sets the `invertAlpha` property of this Geometry Mask. + * Inverting the alpha essentially flips the way the mask works. + * + * @method Phaser.Display.Masks.GeometryMask#setInvertAlpha + * @since 3.17.0 + * + * @param {boolean} [value=true] - Invert the alpha of this mask? + * + * @return {this} This Geometry Mask + */ + setInvertAlpha: function (value) + { + if (value === undefined) { value = true; } + + this.invertAlpha = value; + + return this; + }, + + /** + * Renders the Geometry Mask's underlying Graphics object to the OpenGL stencil buffer and enables the stencil test, which clips rendered pixels according to the mask. + * + * @method Phaser.Display.Masks.GeometryMask#preRenderWebGL + * @since 3.0.0 + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to. + * @param {Phaser.GameObjects.GameObject} child - The Game Object being rendered. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through. + */ + preRenderWebGL: function (renderer, child, camera) + { + var gl = renderer.gl; + + // Force flushing before drawing to stencil buffer + renderer.flush(); + + if (renderer.maskStack.length === 0) + { + gl.enable(gl.STENCIL_TEST); + gl.clear(gl.STENCIL_BUFFER_BIT); + + renderer.maskCount = 0; + } + + if (renderer.currentCameraMask.mask !== this) + { + renderer.currentMask.mask = this; + } + + renderer.maskStack.push({ mask: this, camera: camera }); + + this.applyStencil(renderer, camera, true); + + renderer.maskCount++; + }, + + /** + * Applies the current stencil mask to the renderer. + * + * @method Phaser.Display.Masks.GeometryMask#applyStencil + * @since 3.17.0 + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through. + * @param {boolean} inc - Is this an INCR stencil or a DECR stencil? + */ + applyStencil: function (renderer, camera, inc) + { + var gl = renderer.gl; + var geometryMask = this.geometryMask; + var level = renderer.maskCount; + + gl.colorMask(false, false, false, false); + + if (inc) + { + gl.stencilFunc(gl.EQUAL, level, 0xFF); + gl.stencilOp(gl.KEEP, gl.KEEP, gl.INCR); + } + else + { + gl.stencilFunc(gl.EQUAL, level + 1, 0xFF); + gl.stencilOp(gl.KEEP, gl.KEEP, gl.DECR); + } + + // Write stencil buffer + geometryMask.renderWebGL(renderer, geometryMask, 0, camera); + + renderer.flush(); + + gl.colorMask(true, true, true, true); + gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP); + + if (inc) + { + if (this.invertAlpha) + { + gl.stencilFunc(gl.NOTEQUAL, level + 1, 0xFF); + } + else + { + gl.stencilFunc(gl.EQUAL, level + 1, 0xFF); + } + } + else if (this.invertAlpha) + { + gl.stencilFunc(gl.NOTEQUAL, level, 0xFF); + } + else + { + gl.stencilFunc(gl.EQUAL, level, 0xFF); + } + }, + + /** + * Flushes all rendered pixels and disables the stencil test of a WebGL context, thus disabling the mask for it. + * + * @method Phaser.Display.Masks.GeometryMask#postRenderWebGL + * @since 3.0.0 + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw flush. + */ + postRenderWebGL: function (renderer) + { + var gl = renderer.gl; + + renderer.maskStack.pop(); + + renderer.maskCount--; + + if (renderer.maskStack.length === 0) + { + // If this is the only mask in the stack, flush and disable + renderer.flush(); + + renderer.currentMask.mask = null; + + gl.disable(gl.STENCIL_TEST); + } + else + { + // Force flush before disabling stencil test + renderer.flush(); + + var prev = renderer.maskStack[renderer.maskStack.length - 1]; + + prev.mask.applyStencil(renderer, prev.camera, false); + + if (renderer.currentCameraMask.mask !== prev.mask) + { + renderer.currentMask.mask = prev.mask; + renderer.currentMask.camera = prev.camera; + } + else + { + renderer.currentMask.mask = null; + } + } + }, + + /** + * Sets the clipping path of a 2D canvas context to the Geometry Mask's underlying Graphics object. + * + * @method Phaser.Display.Masks.GeometryMask#preRenderCanvas + * @since 3.0.0 + * + * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance to set the clipping path on. + * @param {Phaser.GameObjects.GameObject} mask - The Game Object being rendered. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through. + */ + preRenderCanvas: function (renderer, mask, camera) + { + var geometryMask = this.geometryMask; + + renderer.currentContext.save(); + + geometryMask.renderCanvas(renderer, geometryMask, 0, camera, null, null, true); + + renderer.currentContext.clip(); + }, + + /** + * Restore the canvas context's previous clipping path, thus turning off the mask for it. + * + * @method Phaser.Display.Masks.GeometryMask#postRenderCanvas + * @since 3.0.0 + * + * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance being restored. + */ + postRenderCanvas: function (renderer) + { + renderer.currentContext.restore(); + }, + + /** + * Destroys this GeometryMask and nulls any references it holds. + * + * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it, + * so be sure to call `clearMask` on any Game Object using it, before destroying it. + * + * @method Phaser.Display.Masks.GeometryMask#destroy + * @since 3.7.0 + */ + destroy: function () + { + this.geometryMask = null; + } + +}); + +module.exports = GeometryMask; + + +/***/ }), +/* 341 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for getting and setting the origin of a Game Object. + * Values are normalized, given in the range 0 to 1. + * Display values contain the calculated pixel values. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.Origin + * @since 3.0.0 + */ + +var Origin = { + + /** + * A property indicating that a Game Object has this component. + * + * @name Phaser.GameObjects.Components.Origin#_originComponent + * @type {boolean} + * @private + * @default true + * @since 3.2.0 + */ + _originComponent: true, + + /** + * The horizontal 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 left of the Game Object. + * + * @name Phaser.GameObjects.Components.Origin#originX + * @type {number} + * @default 0.5 + * @since 3.0.0 + */ + originX: 0.5, + + /** + * 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. + * + * @name Phaser.GameObjects.Components.Origin#originY + * @type {number} + * @default 0.5 + * @since 3.0.0 + */ + originY: 0.5, + + // private + read only + _displayOriginX: 0, + _displayOriginY: 0, + + /** + * The horizontal display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + * + * @name Phaser.GameObjects.Components.Origin#displayOriginX + * @type {number} + * @since 3.0.0 + */ + displayOriginX: { + + get: function () + { + return this._displayOriginX; + }, + + set: function (value) + { + this._displayOriginX = value; + this.originX = value / this.width; + } + + }, + + /** + * The vertical display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + * + * @name Phaser.GameObjects.Components.Origin#displayOriginY + * @type {number} + * @since 3.0.0 + */ + displayOriginY: { + + get: function () + { + return this._displayOriginY; + }, + + set: function (value) + { + this._displayOriginY = value; + this.originY = value / this.height; + } + + }, + + /** + * Sets the origin of this Game Object. + * + * The values are given in the range 0 to 1. + * + * @method Phaser.GameObjects.Components.Origin#setOrigin + * @since 3.0.0 + * + * @param {number} [x=0.5] - The horizontal origin value. + * @param {number} [y=x] - The vertical origin value. If not defined it will be set to the value of `x`. + * + * @return {this} This Game Object instance. + */ + setOrigin: function (x, y) + { + if (x === undefined) { x = 0.5; } + if (y === undefined) { y = x; } + + this.originX = x; + this.originY = y; + + return this.updateDisplayOrigin(); + }, + + /** + * Sets the origin of this Game Object based on the Pivot values in its Frame. + * + * @method Phaser.GameObjects.Components.Origin#setOriginFromFrame + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + setOriginFromFrame: function () + { + if (!this.frame || !this.frame.customPivot) + { + return this.setOrigin(); + } + else + { + this.originX = this.frame.pivotX; + this.originY = this.frame.pivotY; + } + + return this.updateDisplayOrigin(); + }, + + /** + * Sets the display origin of this Game Object. + * The difference between this and setting the origin is that you can use pixel values for setting the display origin. + * + * @method Phaser.GameObjects.Components.Origin#setDisplayOrigin + * @since 3.0.0 + * + * @param {number} [x=0] - The horizontal display origin value. + * @param {number} [y=x] - The vertical display origin value. If not defined it will be set to the value of `x`. + * + * @return {this} This Game Object instance. + */ + setDisplayOrigin: function (x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = x; } + + this.displayOriginX = x; + this.displayOriginY = y; + + return this; + }, + + /** + * Updates the Display Origin cached values internally stored on this Game Object. + * You don't usually call this directly, but it is exposed for edge-cases where you may. + * + * @method Phaser.GameObjects.Components.Origin#updateDisplayOrigin + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + updateDisplayOrigin: function () + { + this._displayOriginX = this.originX * this.width; + this._displayOriginY = this.originY * this.height; + + return this; + } + +}; + +module.exports = Origin; + + +/***/ }), +/* 342 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var DegToRad = __webpack_require__(18); +var GetBoolean = __webpack_require__(343); +var GetValue = __webpack_require__(7); +var TWEEN_CONST = __webpack_require__(344); +var Vector2 = __webpack_require__(1); + +/** + * Provides methods used for managing a Game Object following a Path. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.PathFollower + * @since 3.17.0 + */ + +var PathFollower = { + + /** + * The Path this PathFollower is following. It can only follow one Path at a time. + * + * @name Phaser.GameObjects.Components.PathFollower#path + * @type {Phaser.Curves.Path} + * @since 3.0.0 + */ + path: null, + + /** + * Should the PathFollower automatically rotate to point in the direction of the Path? + * + * @name Phaser.GameObjects.Components.PathFollower#rotateToPath + * @type {boolean} + * @default false + * @since 3.0.0 + */ + rotateToPath: false, + + /** + * If the PathFollower is rotating to match the Path (@see Phaser.GameObjects.PathFollower#rotateToPath) + * this value is added to the rotation value. This allows you to rotate objects to a path but control + * the angle of the rotation as well. + * + * @name Phaser.GameObjects.PathFollower#pathRotationOffset + * @type {number} + * @default 0 + * @since 3.0.0 + */ + pathRotationOffset: 0, + + /** + * An additional vector to add to the PathFollowers position, allowing you to offset it from the + * Path coordinates. + * + * @name Phaser.GameObjects.PathFollower#pathOffset + * @type {Phaser.Math.Vector2} + * @since 3.0.0 + */ + pathOffset: null, + + /** + * A Vector2 that stores the current point of the path the follower is on. + * + * @name Phaser.GameObjects.PathFollower#pathVector + * @type {Phaser.Math.Vector2} + * @since 3.0.0 + */ + pathVector: null, + + /** + * The distance the follower has traveled from the previous point to the current one, at the last update. + * + * @name Phaser.GameObjects.PathFollower#pathDelta + * @type {Phaser.Math.Vector2} + * @since 3.23.0 + */ + pathDelta: null, + + /** + * The Tween used for following the Path. + * + * @name Phaser.GameObjects.PathFollower#pathTween + * @type {Phaser.Tweens.Tween} + * @since 3.0.0 + */ + pathTween: null, + + /** + * Settings for the PathFollower. + * + * @name Phaser.GameObjects.PathFollower#pathConfig + * @type {?Phaser.Types.GameObjects.PathFollower.PathConfig} + * @default null + * @since 3.0.0 + */ + pathConfig: null, + + /** + * Records the direction of the follower so it can change direction. + * + * @name Phaser.GameObjects.PathFollower#_prevDirection + * @type {integer} + * @private + * @since 3.0.0 + */ + _prevDirection: TWEEN_CONST.PLAYING_FORWARD, + + /** + * Set the Path that this PathFollower should follow. + * + * Optionally accepts {@link Phaser.Types.GameObjects.PathFollower.PathConfig} settings. + * + * @method Phaser.GameObjects.Components.PathFollower#setPath + * @since 3.0.0 + * + * @param {Phaser.Curves.Path} path - The Path this PathFollower is following. It can only follow one Path at a time. + * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config] - Settings for the PathFollower. + * + * @return {this} This Game Object. + */ + setPath: function (path, config) + { + if (config === undefined) { config = this.pathConfig; } + + var tween = this.pathTween; + + if (tween && tween.isPlaying()) + { + tween.stop(); + } + + this.path = path; + + if (config) + { + this.startFollow(config); + } + + return this; + }, + + /** + * Set whether the PathFollower should automatically rotate to point in the direction of the Path. + * + * @method Phaser.GameObjects.Components.PathFollower#setRotateToPath + * @since 3.0.0 + * + * @param {boolean} value - Whether the PathFollower should automatically rotate to point in the direction of the Path. + * @param {number} [offset=0] - Rotation offset in degrees. + * + * @return {this} This Game Object. + */ + setRotateToPath: function (value, offset) + { + if (offset === undefined) { offset = 0; } + + this.rotateToPath = value; + + this.pathRotationOffset = offset; + + return this; + }, + + /** + * Is this PathFollower actively following a Path or not? + * + * To be considered as `isFollowing` it must be currently moving on a Path, and not paused. + * + * @method Phaser.GameObjects.Components.PathFollower#isFollowing + * @since 3.0.0 + * + * @return {boolean} `true` is this PathFollower is actively following a Path, otherwise `false`. + */ + isFollowing: function () + { + var tween = this.pathTween; + + return (tween && tween.isPlaying()); + }, + + /** + * Starts this PathFollower following its given Path. + * + * @method Phaser.GameObjects.Components.PathFollower#startFollow + * @since 3.3.0 + * + * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config={}] - The duration of the follow, or a PathFollower config object. + * @param {number} [startAt=0] - Optional start position of the follow, between 0 and 1. + * + * @return {this} This Game Object. + */ + startFollow: function (config, startAt) + { + if (config === undefined) { config = {}; } + if (startAt === undefined) { startAt = 0; } + + var tween = this.pathTween; + + if (tween && tween.isPlaying()) + { + tween.stop(); + } + + if (typeof config === 'number') + { + config = { duration: config }; + } + + // Override in case they've been specified in the config + config.from = GetValue(config, 'from', 0); + config.to = GetValue(config, 'to', 1); + + var positionOnPath = GetBoolean(config, 'positionOnPath', false); + + this.rotateToPath = GetBoolean(config, 'rotateToPath', false); + this.pathRotationOffset = GetValue(config, 'rotationOffset', 0); + + // This works, but it's not an ideal way of doing it as the follower jumps position + var seek = GetValue(config, 'startAt', startAt); + + if (seek) + { + config.onStart = function (tween) + { + var tweenData = tween.data[0]; + tweenData.progress = seek; + tweenData.elapsed = tweenData.duration * seek; + var v = tweenData.ease(tweenData.progress); + tweenData.current = tweenData.start + ((tweenData.end - tweenData.start) * v); + tweenData.target[tweenData.key] = tweenData.current; + }; + } + + if (!this.pathOffset) + { + this.pathOffset = new Vector2(this.x, this.y); + } + + if (!this.pathVector) + { + this.pathVector = new Vector2(); + } + + if (!this.pathDelta) + { + this.pathDelta = new Vector2(); + } + + this.pathDelta.reset(); + + this.pathTween = this.scene.sys.tweens.addCounter(config); + + // The starting point of the path, relative to this follower + this.path.getStartPoint(this.pathOffset); + + if (positionOnPath) + { + 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 = TWEEN_CONST.PLAYING_FORWARD; + + if (this.rotateToPath) + { + // Set the rotation now (in case the tween has a delay on it, etc) + var nextPoint = this.path.getPoint(0.1); + + this.rotation = Math.atan2(nextPoint.y - this.y, nextPoint.x - this.x) + DegToRad(this.pathRotationOffset); + } + + this.pathConfig = config; + + return this; + }, + + /** + * Pauses this PathFollower. It will still continue to render, but it will remain motionless at the + * point on the Path at which you paused it. + * + * @method Phaser.GameObjects.Components.PathFollower#pauseFollow + * @since 3.3.0 + * + * @return {this} This Game Object. + */ + pauseFollow: function () + { + var tween = this.pathTween; + + if (tween && tween.isPlaying()) + { + tween.pause(); + } + + return this; + }, + + /** + * Resumes a previously paused PathFollower. + * + * If the PathFollower was not paused this has no effect. + * + * @method Phaser.GameObjects.Components.PathFollower#resumeFollow + * @since 3.3.0 + * + * @return {this} This Game Object. + */ + resumeFollow: function () + { + var tween = this.pathTween; + + if (tween && tween.isPaused()) + { + tween.resume(); + } + + return this; + }, + + /** + * Stops this PathFollower from following the path any longer. + * + * This will invoke any 'stop' conditions that may exist on the Path, or for the follower. + * + * @method Phaser.GameObjects.Components.PathFollower#stopFollow + * @since 3.3.0 + * + * @return {this} This Game Object. + */ + stopFollow: function () + { + var tween = this.pathTween; + + if (tween && tween.isPlaying()) + { + tween.stop(); + } + + return this; + }, + + /** + * Internal update handler that advances this PathFollower along the path. + * + * Called automatically by the Scene step, should not typically be called directly. + * + * @method Phaser.GameObjects.Components.PathFollower#pathUpdate + * @since 3.17.0 + */ + pathUpdate: function () + { + var tween = this.pathTween; + + if (tween) + { + var tweenData = tween.data[0]; + var pathDelta = this.pathDelta; + var pathVector = this.pathVector; + + pathDelta.copy(pathVector).negate(); + + if (tweenData.state === TWEEN_CONST.COMPLETE) + { + this.path.getPoint(1, pathVector); + + pathDelta.add(pathVector); + pathVector.add(this.pathOffset); + + this.setPosition(pathVector.x, pathVector.y); + + return; + } + else if (tweenData.state !== TWEEN_CONST.PLAYING_FORWARD && tweenData.state !== TWEEN_CONST.PLAYING_BACKWARD) + { + // If delayed, etc then bail out + return; + } + + this.path.getPoint(tween.getValue(), pathVector); + + pathDelta.add(pathVector); + pathVector.add(this.pathOffset); + + var oldX = this.x; + var oldY = this.y; + + this.setPosition(pathVector.x, pathVector.y); + + var speedX = this.x - oldX; + var speedY = this.y - oldY; + + if (speedX === 0 && speedY === 0) + { + // Bail out early + return; + } + + if (tweenData.state !== this._prevDirection) + { + // We've changed direction, so don't do a rotate this frame + this._prevDirection = tweenData.state; + + return; + } + + if (this.rotateToPath) + { + this.rotation = Math.atan2(speedY, speedX) + DegToRad(this.pathRotationOffset); + } + } + } + +}; + +module.exports = PathFollower; + + +/***/ }), +/* 343 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Retrieves the value of the given key from an object. + * + * @function Phaser.Tweens.Builders.GetBoolean + * @since 3.0.0 + * + * @param {object} source - The object to retrieve the value from. + * @param {string} key - The key to look for in the `source` object. + * @param {*} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided. + * + * @return {*} The retrieved value. + */ +var GetBoolean = function (source, key, defaultValue) +{ + if (!source) + { + return defaultValue; + } + else if (source.hasOwnProperty(key)) + { + return source[key]; + } + else + { + return defaultValue; + } +}; + +module.exports = GetBoolean; + + +/***/ }), +/* 344 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var TWEEN_CONST = { + + /** + * TweenData state. + * + * @name Phaser.Tweens.CREATED + * @type {integer} + * @since 3.0.0 + */ + CREATED: 0, + + /** + * TweenData state. + * + * @name Phaser.Tweens.INIT + * @type {integer} + * @since 3.0.0 + */ + INIT: 1, + + /** + * TweenData state. + * + * @name Phaser.Tweens.DELAY + * @type {integer} + * @since 3.0.0 + */ + DELAY: 2, + + /** + * TweenData state. + * + * @name Phaser.Tweens.OFFSET_DELAY + * @type {integer} + * @since 3.0.0 + */ + OFFSET_DELAY: 3, + + /** + * TweenData state. + * + * @name Phaser.Tweens.PENDING_RENDER + * @type {integer} + * @since 3.0.0 + */ + PENDING_RENDER: 4, + + /** + * TweenData state. + * + * @name Phaser.Tweens.PLAYING_FORWARD + * @type {integer} + * @since 3.0.0 + */ + PLAYING_FORWARD: 5, + + /** + * TweenData state. + * + * @name Phaser.Tweens.PLAYING_BACKWARD + * @type {integer} + * @since 3.0.0 + */ + PLAYING_BACKWARD: 6, + + /** + * TweenData state. + * + * @name Phaser.Tweens.HOLD_DELAY + * @type {integer} + * @since 3.0.0 + */ + HOLD_DELAY: 7, + + /** + * TweenData state. + * + * @name Phaser.Tweens.REPEAT_DELAY + * @type {integer} + * @since 3.0.0 + */ + REPEAT_DELAY: 8, + + /** + * TweenData state. + * + * @name Phaser.Tweens.COMPLETE + * @type {integer} + * @since 3.0.0 + */ + COMPLETE: 9, + + // Tween specific (starts from 20 to cleanly allow extra TweenData consts in the future) + + /** + * Tween state. + * + * @name Phaser.Tweens.PENDING_ADD + * @type {integer} + * @since 3.0.0 + */ + PENDING_ADD: 20, + + /** + * Tween state. + * + * @name Phaser.Tweens.PAUSED + * @type {integer} + * @since 3.0.0 + */ + PAUSED: 21, + + /** + * Tween state. + * + * @name Phaser.Tweens.LOOP_DELAY + * @type {integer} + * @since 3.0.0 + */ + LOOP_DELAY: 22, + + /** + * Tween state. + * + * @name Phaser.Tweens.ACTIVE + * @type {integer} + * @since 3.0.0 + */ + ACTIVE: 23, + + /** + * Tween state. + * + * @name Phaser.Tweens.COMPLETE_DELAY + * @type {integer} + * @since 3.0.0 + */ + COMPLETE_DELAY: 24, + + /** + * Tween state. + * + * @name Phaser.Tweens.PENDING_REMOVE + * @type {integer} + * @since 3.0.0 + */ + PENDING_REMOVE: 25, + + /** + * Tween state. + * + * @name Phaser.Tweens.REMOVED + * @type {integer} + * @since 3.0.0 + */ + REMOVED: 26 + +}; + +module.exports = TWEEN_CONST; + + +/***/ }), +/* 345 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for setting the WebGL rendering pipeline of a Game Object. + * + * @namespace Phaser.GameObjects.Components.Pipeline + * @webglOnly + * @since 3.0.0 + */ + +var Pipeline = { + + /** + * The initial WebGL pipeline of this Game Object. + * + * @name Phaser.GameObjects.Components.Pipeline#defaultPipeline + * @type {Phaser.Renderer.WebGL.WebGLPipeline} + * @default null + * @webglOnly + * @since 3.0.0 + */ + defaultPipeline: null, + + /** + * The current WebGL pipeline of this Game Object. + * + * @name Phaser.GameObjects.Components.Pipeline#pipeline + * @type {Phaser.Renderer.WebGL.WebGLPipeline} + * @default null + * @webglOnly + * @since 3.0.0 + */ + pipeline: null, + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * + * This should only be called during the instantiation of the Game Object. + * + * @method Phaser.GameObjects.Components.Pipeline#initPipeline + * @webglOnly + * @since 3.0.0 + * + * @param {string} [pipelineName=MultiPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Multi Pipeline. + * + * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. + */ + initPipeline: function (pipelineName) + { + if (pipelineName === undefined) { pipelineName = 'MultiPipeline'; } + + var renderer = this.scene.sys.game.renderer; + + if (renderer && renderer.gl && renderer.hasPipeline(pipelineName)) + { + this.defaultPipeline = renderer.getPipeline(pipelineName); + this.pipeline = this.defaultPipeline; + + return true; + } + + return false; + }, + + /** + * Sets the active WebGL Pipeline of this Game Object. + * + * @method Phaser.GameObjects.Components.Pipeline#setPipeline + * @webglOnly + * @since 3.0.0 + * + * @param {string} pipelineName - The name of the pipeline to set on this Game Object. + * + * @return {this} This Game Object instance. + */ + setPipeline: function (pipelineName) + { + var renderer = this.scene.sys.game.renderer; + + if (renderer && renderer.gl && renderer.hasPipeline(pipelineName)) + { + this.pipeline = renderer.getPipeline(pipelineName); + } + + return this; + }, + + /** + * Resets the WebGL Pipeline of this Game Object back to the default it was created with. + * + * @method Phaser.GameObjects.Components.Pipeline#resetPipeline + * @webglOnly + * @since 3.0.0 + * + * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. + */ + resetPipeline: function () + { + this.pipeline = this.defaultPipeline; + + return (this.pipeline !== null); + }, + + /** + * Gets the name of the WebGL Pipeline this Game Object is currently using. + * + * @method Phaser.GameObjects.Components.Pipeline#getPipelineName + * @webglOnly + * @since 3.0.0 + * + * @return {string} The string-based name of the pipeline being used by this Game Object. + */ + getPipelineName: function () + { + return this.pipeline.name; + } + +}; + +module.exports = Pipeline; + + +/***/ }), +/* 346 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for getting and setting the size of a Game Object. + * + * @namespace Phaser.GameObjects.Components.Size + * @since 3.0.0 + */ + +var Size = { + + /** + * A property indicating that a Game Object has this component. + * + * @name Phaser.GameObjects.Components.Size#_sizeComponent + * @type {boolean} + * @private + * @default true + * @since 3.2.0 + */ + _sizeComponent: true, + + /** + * The native (un-scaled) width of this Game Object. + * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayWidth` property. + * + * @name Phaser.GameObjects.Components.Size#width + * @type {number} + * @since 3.0.0 + */ + width: 0, + + /** + * The native (un-scaled) height of this Game Object. + * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayHeight` property. + * + * @name Phaser.GameObjects.Components.Size#height + * @type {number} + * @since 3.0.0 + */ + height: 0, + + /** + * The displayed width of this Game Object. + * + * This value takes into account the scale factor. + * + * Setting this value will adjust the Game Object's scale property. + * + * @name Phaser.GameObjects.Components.Size#displayWidth + * @type {number} + * @since 3.0.0 + */ + displayWidth: { + + get: function () + { + return Math.abs(this.scaleX * this.frame.realWidth); + }, + + set: function (value) + { + this.scaleX = value / this.frame.realWidth; + } + + }, + + /** + * The displayed height of this Game Object. + * + * This value takes into account the scale factor. + * + * Setting this value will adjust the Game Object's scale property. + * + * @name Phaser.GameObjects.Components.Size#displayHeight + * @type {number} + * @since 3.0.0 + */ + displayHeight: { + + get: function () + { + return Math.abs(this.scaleY * this.frame.realHeight); + }, + + set: function (value) + { + this.scaleY = value / this.frame.realHeight; + } + + }, + + /** + * Sets the size of this Game Object to be that of the given Frame. + * + * This will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or call the + * `setDisplaySize` method, which is the same thing as changing the scale but allows you + * to do so by giving pixel values. + * + * If you have enabled this Game Object for input, changing the size will _not_ change the + * size of the hit area. To do this you should adjust the `input.hitArea` object directly. + * + * @method Phaser.GameObjects.Components.Size#setSizeToFrame + * @since 3.0.0 + * + * @param {Phaser.Textures.Frame} frame - The frame to base the size of this Game Object on. + * + * @return {this} This Game Object instance. + */ + setSizeToFrame: function (frame) + { + if (frame === undefined) { frame = this.frame; } + + this.width = frame.realWidth; + this.height = frame.realHeight; + + return this; + }, + + /** + * Sets the internal size of this Game Object, as used for frame or physics body creation. + * + * This will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or call the + * `setDisplaySize` method, which is the same thing as changing the scale but allows you + * to do so by giving pixel values. + * + * If you have enabled this Game Object for input, changing the size will _not_ change the + * size of the hit area. To do this you should adjust the `input.hitArea` object directly. + * + * @method Phaser.GameObjects.Components.Size#setSize + * @since 3.0.0 + * + * @param {number} width - The width of this Game Object. + * @param {number} height - The height of this Game Object. + * + * @return {this} This Game Object instance. + */ + setSize: function (width, height) + { + this.width = width; + this.height = height; + + return this; + }, + + /** + * Sets the display size of this Game Object. + * + * Calling this will adjust the scale. + * + * @method Phaser.GameObjects.Components.Size#setDisplaySize + * @since 3.0.0 + * + * @param {number} width - The width of this Game Object. + * @param {number} height - The height of this Game Object. + * + * @return {this} This Game Object instance. + */ + setDisplaySize: function (width, height) + { + this.displayWidth = width; + this.displayHeight = height; + + return this; + } + +}; + +module.exports = Size; + + +/***/ }), +/* 347 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// bitmask flag for GameObject.renderMask +var _FLAG = 8; // 1000 + +/** + * Provides methods used for getting and setting the texture of a Game Object. + * + * @namespace Phaser.GameObjects.Components.Texture + * @since 3.0.0 + */ + +var Texture = { + + /** + * The Texture this Game Object is using to render with. + * + * @name Phaser.GameObjects.Components.Texture#texture + * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture} + * @since 3.0.0 + */ + texture: null, + + /** + * The Texture Frame this Game Object is using to render with. + * + * @name Phaser.GameObjects.Components.Texture#frame + * @type {Phaser.Textures.Frame} + * @since 3.0.0 + */ + frame: null, + + /** + * Internal flag. Not to be set by this Game Object. + * + * @name Phaser.GameObjects.Components.Texture#isCropped + * @type {boolean} + * @private + * @since 3.11.0 + */ + isCropped: false, + + /** + * 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. + * + * @method Phaser.GameObjects.Components.Texture#setTexture + * @since 3.0.0 + * + * @param {(string|Phaser.Textures.Texture)} key - The key of the texture to be used, as stored in the Texture Manager, or a Texture instance. + * @param {(string|integer)} [frame] - The name or index of the frame within the Texture. + * + * @return {this} This Game Object instance. + */ + setTexture: function (key, frame) + { + this.texture = this.scene.sys.textures.get(key); + + return this.setFrame(frame); + }, + + /** + * Sets the frame this Game Object will use to render with. + * + * The Frame has to belong to the current Texture being used. + * + * It can be either a string or an index. + * + * 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. + * + * @method Phaser.GameObjects.Components.Texture#setFrame + * @since 3.0.0 + * + * @param {(string|integer)} frame - The name or index of the frame within the Texture. + * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object? + * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object? + * + * @return {this} This Game Object instance. + */ + setFrame: function (frame, updateSize, updateOrigin) + { + if (updateSize === undefined) { updateSize = true; } + if (updateOrigin === undefined) { updateOrigin = true; } + + this.frame = this.texture.get(frame); + + if (!this.frame.cutWidth || !this.frame.cutHeight) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + + if (this._sizeComponent && updateSize) + { + this.setSizeToFrame(); + } + + if (this._originComponent && updateOrigin) + { + if (this.frame.customPivot) + { + this.setOrigin(this.frame.pivotX, this.frame.pivotY); + } + else + { + this.updateDisplayOrigin(); + } + } + + return this; + } + +}; + +module.exports = Texture; + + +/***/ }), +/* 348 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// bitmask flag for GameObject.renderMask +var _FLAG = 8; // 1000 + +/** + * Provides methods used for getting and setting the texture of a Game Object. + * + * @namespace Phaser.GameObjects.Components.TextureCrop + * @since 3.0.0 + */ + +var TextureCrop = { + + /** + * The Texture this Game Object is using to render with. + * + * @name Phaser.GameObjects.Components.TextureCrop#texture + * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture} + * @since 3.0.0 + */ + texture: null, + + /** + * The Texture Frame this Game Object is using to render with. + * + * @name Phaser.GameObjects.Components.TextureCrop#frame + * @type {Phaser.Textures.Frame} + * @since 3.0.0 + */ + frame: null, + + /** + * A boolean flag indicating if this Game Object is being cropped or not. + * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off. + * Equally, calling `setCrop` with no arguments will reset the crop and disable it. + * + * @name Phaser.GameObjects.Components.TextureCrop#isCropped + * @type {boolean} + * @since 3.11.0 + */ + isCropped: false, + + /** + * Applies a crop to a texture based Game Object, such as a Sprite or Image. + * + * The crop is a rectangle that limits the area of the texture frame that is visible during rendering. + * + * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just + * changes what is shown when rendered. + * + * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left. + * + * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left + * half of it, you could call `setCrop(0, 0, 400, 600)`. + * + * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop + * an area of 200x100 when applied to a Game Object that had a scale factor of 2. + * + * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument. + * + * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`. + * + * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow + * the renderer to skip several internal calculations. + * + * @method Phaser.GameObjects.Components.TextureCrop#setCrop + * @since 3.11.0 + * + * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored. + * @param {number} [y] - The y coordinate to start the crop from. + * @param {number} [width] - The width of the crop rectangle in pixels. + * @param {number} [height] - The height of the crop rectangle in pixels. + * + * @return {this} This Game Object instance. + */ + setCrop: function (x, y, width, height) + { + if (x === undefined) + { + this.isCropped = false; + } + else if (this.frame) + { + if (typeof x === 'number') + { + this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY); + } + else + { + var rect = x; + + this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY); + } + + this.isCropped = true; + } + + return this; + }, + + /** + * 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. + * + * @method Phaser.GameObjects.Components.TextureCrop#setTexture + * @since 3.0.0 + * + * @param {string} key - The key of the texture to be used, as stored in the Texture Manager. + * @param {(string|integer)} [frame] - The name or index of the frame within the Texture. + * + * @return {this} This Game Object instance. + */ + setTexture: function (key, frame) + { + this.texture = this.scene.sys.textures.get(key); + + return this.setFrame(frame); + }, + + /** + * Sets the frame this Game Object will use to render with. + * + * The Frame has to belong to the current Texture being used. + * + * It can be either a string or an index. + * + * 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. + * + * @method Phaser.GameObjects.Components.TextureCrop#setFrame + * @since 3.0.0 + * + * @param {(string|integer)} frame - The name or index of the frame within the Texture. + * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object? + * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object? + * + * @return {this} This Game Object instance. + */ + setFrame: function (frame, updateSize, updateOrigin) + { + if (updateSize === undefined) { updateSize = true; } + if (updateOrigin === undefined) { updateOrigin = true; } + + this.frame = this.texture.get(frame); + + if (!this.frame.cutWidth || !this.frame.cutHeight) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + + if (this._sizeComponent && updateSize) + { + this.setSizeToFrame(); + } + + if (this._originComponent && updateOrigin) + { + if (this.frame.customPivot) + { + this.setOrigin(this.frame.pivotX, this.frame.pivotY); + } + else + { + this.updateDisplayOrigin(); + } + } + + if (this.isCropped) + { + this.frame.updateCropUVs(this._crop, this.flipX, this.flipY); + } + + return this; + }, + + /** + * Internal method that returns a blank, well-formed crop object for use by a Game Object. + * + * @method Phaser.GameObjects.Components.TextureCrop#resetCropObject + * @private + * @since 3.12.0 + * + * @return {object} The crop object. + */ + resetCropObject: function () + { + return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 }; + } + +}; + +module.exports = TextureCrop; + + +/***/ }), +/* 349 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetColorFromValue = __webpack_require__(350); + +/** + * Provides methods used for setting the tint of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.Tint + * @webglOnly + * @since 3.0.0 + */ + +var Tint = { + + /** + * Private internal value. Holds the top-left tint value. + * + * @name Phaser.GameObjects.Components.Tint#_tintTL + * @type {number} + * @private + * @default 16777215 + * @since 3.0.0 + */ + _tintTL: 16777215, + + /** + * Private internal value. Holds the top-right tint value. + * + * @name Phaser.GameObjects.Components.Tint#_tintTR + * @type {number} + * @private + * @default 16777215 + * @since 3.0.0 + */ + _tintTR: 16777215, + + /** + * Private internal value. Holds the bottom-left tint value. + * + * @name Phaser.GameObjects.Components.Tint#_tintBL + * @type {number} + * @private + * @default 16777215 + * @since 3.0.0 + */ + _tintBL: 16777215, + + /** + * Private internal value. Holds the bottom-right tint value. + * + * @name Phaser.GameObjects.Components.Tint#_tintBR + * @type {number} + * @private + * @default 16777215 + * @since 3.0.0 + */ + _tintBR: 16777215, + + /** + * Private internal value. Holds if the Game Object is tinted or not. + * + * @name Phaser.GameObjects.Components.Tint#_isTinted + * @type {boolean} + * @private + * @default false + * @since 3.11.0 + */ + _isTinted: false, + + /** + * Fill or additive? + * + * @name Phaser.GameObjects.Components.Tint#tintFill + * @type {boolean} + * @default false + * @since 3.11.0 + */ + tintFill: false, + + /** + * Clears all tint values associated with this Game Object. + * + * Immediately sets the color values back to 0xffffff and the tint type to 'additive', + * which results in no visible change to the texture. + * + * @method Phaser.GameObjects.Components.Tint#clearTint + * @webglOnly + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + clearTint: function () + { + this.setTint(0xffffff); + + this._isTinted = false; + + return this; + }, + + /** + * Sets an additive tint on this Game Object. + * + * The tint works by taking the pixel color values from the Game Objects texture, and then + * multiplying it by the color value of the tint. You can provide either one color value, + * in which case the whole Game Object will be tinted in that color. Or you can provide a color + * per corner. The colors are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`. + * + * @method Phaser.GameObjects.Components.Tint#setTint + * @webglOnly + * @since 3.0.0 + * + * @param {integer} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object. + * @param {integer} [topRight] - The tint being applied to the top-right of the Game Object. + * @param {integer} [bottomLeft] - The tint being applied to the bottom-left of the Game Object. + * @param {integer} [bottomRight] - The tint being applied to the bottom-right of the Game Object. + * + * @return {this} This Game Object instance. + */ + setTint: function (topLeft, topRight, bottomLeft, bottomRight) + { + if (topLeft === undefined) { topLeft = 0xffffff; } + + if (topRight === undefined) + { + topRight = topLeft; + bottomLeft = topLeft; + bottomRight = topLeft; + } + + this._tintTL = GetColorFromValue(topLeft); + this._tintTR = GetColorFromValue(topRight); + this._tintBL = GetColorFromValue(bottomLeft); + this._tintBR = GetColorFromValue(bottomRight); + + this._isTinted = true; + + this.tintFill = false; + + return this; + }, + + /** + * Sets a fill-based tint on this Game Object. + * + * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture + * with those in the tint. You can use this for effects such as making a player flash 'white' + * if hit by something. You can provide either one color value, in which case the whole + * Game Object will be rendered in that color. Or you can provide a color per corner. The colors + * are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`. + * + * @method Phaser.GameObjects.Components.Tint#setTintFill + * @webglOnly + * @since 3.11.0 + * + * @param {integer} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. + * @param {integer} [topRight] - The tint being applied to the top-right of the Game Object. + * @param {integer} [bottomLeft] - The tint being applied to the bottom-left of the Game Object. + * @param {integer} [bottomRight] - The tint being applied to the bottom-right of the Game Object. + * + * @return {this} This Game Object instance. + */ + setTintFill: function (topLeft, topRight, bottomLeft, bottomRight) + { + this.setTint(topLeft, topRight, bottomLeft, bottomRight); + + this.tintFill = true; + + return this; + }, + + /** + * The tint value being applied to the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Tint#tintTopLeft + * @type {integer} + * @webglOnly + * @since 3.0.0 + */ + tintTopLeft: { + + get: function () + { + return this._tintTL; + }, + + set: function (value) + { + this._tintTL = GetColorFromValue(value); + this._isTinted = true; + } + + }, + + /** + * The tint value being applied to the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Tint#tintTopRight + * @type {integer} + * @webglOnly + * @since 3.0.0 + */ + tintTopRight: { + + get: function () + { + return this._tintTR; + }, + + set: function (value) + { + this._tintTR = GetColorFromValue(value); + this._isTinted = true; + } + + }, + + /** + * The tint value being applied to the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Tint#tintBottomLeft + * @type {integer} + * @webglOnly + * @since 3.0.0 + */ + tintBottomLeft: { + + get: function () + { + return this._tintBL; + }, + + set: function (value) + { + this._tintBL = GetColorFromValue(value); + this._isTinted = true; + } + + }, + + /** + * The tint value being applied to the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Tint#tintBottomRight + * @type {integer} + * @webglOnly + * @since 3.0.0 + */ + tintBottomRight: { + + get: function () + { + return this._tintBR; + }, + + set: function (value) + { + this._tintBR = GetColorFromValue(value); + this._isTinted = true; + } + + }, + + /** + * The tint value being applied to the whole of the Game Object. + * This property is a setter-only. Use the properties `tintTopLeft` etc to read the current tint value. + * + * @name Phaser.GameObjects.Components.Tint#tint + * @type {integer} + * @webglOnly + * @since 3.0.0 + */ + tint: { + + set: function (value) + { + this.setTint(value, value, value, value); + } + }, + + /** + * Does this Game Object have a tint applied to it or not? + * + * @name Phaser.GameObjects.Components.Tint#isTinted + * @type {boolean} + * @webglOnly + * @readonly + * @since 3.11.0 + */ + isTinted: { + + get: function () + { + return this._isTinted; + } + + } + +}; + +module.exports = Tint; + + +/***/ }), +/* 350 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Given a hex color value, such as 0xff00ff (for purple), it will return a + * numeric representation of it (i.e. 16711935) for use in WebGL tinting. + * + * @function Phaser.Display.Color.GetColorFromValue + * @since 3.50.0 + * + * @param {number} red - The hex color value, such as 0xff0000. + * + * @return {number} The combined color value. + */ +var GetColorFromValue = function (value) +{ + return (value >> 16) + (value & 0xff00) + ((value & 0xff) << 16); +}; + +module.exports = GetColorFromValue; + + +/***/ }), +/* 351 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var renderWebGL = __webpack_require__(4); +var renderCanvas = __webpack_require__(4); + +if (true) +{ + renderWebGL = __webpack_require__(352); +} + +if (true) +{ + renderCanvas = __webpack_require__(353); +} + +module.exports = { + + renderWebGL: renderWebGL, + renderCanvas: renderCanvas + +}; + + +/***/ }), +/* 352 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Renders this Game Object with the WebGL Renderer to the given Camera. + * 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.Container#renderWebGL + * @since 3.4.0 + * @private + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. + * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call. + * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. + * @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 ContainerWebGLRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix) +{ + var children = container.list; + + if (children.length === 0) + { + return; + } + + var transformMatrix = container.localTransform; + + if (parentMatrix) + { + transformMatrix.loadIdentity(); + transformMatrix.multiply(parentMatrix); + transformMatrix.translate(container.x, container.y); + transformMatrix.rotate(container.rotation); + transformMatrix.scale(container.scaleX, container.scaleY); + } + else + { + transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY); + } + + var containerHasBlendMode = (container.blendMode !== -1); + + if (!containerHasBlendMode) + { + // If Container is SKIP_TEST then set blend mode to be Normal + renderer.setBlendMode(0); + } + + var alpha = container.alpha; + + var scrollFactorX = container.scrollFactorX; + var scrollFactorY = container.scrollFactorY; + + var list = children; + var childCount = children.length; + + for (var i = 0; i < childCount; i++) + { + var child = children[i]; + + if (!child.willRender(camera)) + { + continue; + } + + var childAlphaTopLeft; + var childAlphaTopRight; + var childAlphaBottomLeft; + var childAlphaBottomRight; + + if (child.alphaTopLeft !== undefined) + { + childAlphaTopLeft = child.alphaTopLeft; + childAlphaTopRight = child.alphaTopRight; + childAlphaBottomLeft = child.alphaBottomLeft; + childAlphaBottomRight = child.alphaBottomRight; + } + else + { + var childAlpha = child.alpha; + + childAlphaTopLeft = childAlpha; + childAlphaTopRight = childAlpha; + childAlphaBottomLeft = childAlpha; + childAlphaBottomRight = childAlpha; + } + + var childScrollFactorX = child.scrollFactorX; + var childScrollFactorY = child.scrollFactorY; + + if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode) + { + // If Container doesn't have its own blend mode, then a child can have one + renderer.setBlendMode(child.blendMode); + } + + var mask = child.mask; + + if (mask) + { + mask.preRenderWebGL(renderer, child, camera); + } + + var type = child.type; + + if (type !== renderer.currentType) + { + renderer.newType = true; + renderer.currentType = type; + } + + renderer.nextTypeMatch = (i < childCount - 1) ? (list[i + 1].type === renderer.currentType) : false; + + // Set parent values + child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY); + + child.setAlpha(childAlphaTopLeft * alpha, childAlphaTopRight * alpha, childAlphaBottomLeft * alpha, childAlphaBottomRight * alpha); + + // Render + child.renderWebGL(renderer, child, interpolationPercentage, camera, transformMatrix); + + // Restore original values + + child.setAlpha(childAlphaTopLeft, childAlphaTopRight, childAlphaBottomLeft, childAlphaBottomRight); + + child.setScrollFactor(childScrollFactorX, childScrollFactorY); + + if (mask) + { + mask.postRenderWebGL(renderer, camera); + } + + renderer.newType = false; + } +}; + +module.exports = ContainerWebGLRenderer; + + +/***/ }), +/* 353 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Renders this Game Object with the Canvas Renderer to the given Camera. + * 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.Container#renderCanvas + * @since 3.4.0 + * @private + * + * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. + * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call. + * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. + * @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 ContainerCanvasRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix) +{ + var children = container.list; + + if (children.length === 0) + { + return; + } + + var transformMatrix = container.localTransform; + + if (parentMatrix) + { + transformMatrix.loadIdentity(); + transformMatrix.multiply(parentMatrix); + transformMatrix.translate(container.x, container.y); + transformMatrix.rotate(container.rotation); + transformMatrix.scale(container.scaleX, container.scaleY); + } + else + { + transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY); + } + + var containerHasBlendMode = (container.blendMode !== -1); + + if (!containerHasBlendMode) + { + // If Container is SKIP_TEST then set blend mode to be Normal + renderer.setBlendMode(0); + } + + var alpha = container._alpha; + var scrollFactorX = container.scrollFactorX; + var scrollFactorY = container.scrollFactorY; + + if (container.mask) + { + container.mask.preRenderCanvas(renderer, null, camera); + } + + for (var i = 0; i < children.length; i++) + { + var child = children[i]; + + if (!child.willRender(camera)) + { + continue; + } + + var childAlpha = child.alpha; + var childScrollFactorX = child.scrollFactorX; + var childScrollFactorY = child.scrollFactorY; + + if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode) + { + // If Container doesn't have its own blend mode, then a child can have one + renderer.setBlendMode(child.blendMode); + } + + // Set parent values + child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY); + child.setAlpha(childAlpha * alpha); + + // Render + child.renderCanvas(renderer, child, interpolationPercentage, camera, transformMatrix); + + // Restore original values + child.setAlpha(childAlpha); + child.setScrollFactor(childScrollFactorX, childScrollFactorY); + } + + if (container.mask) + { + container.mask.postRenderCanvas(renderer); + } +}; + +module.exports = ContainerCanvasRenderer; + + +/***/ }), +/* 354 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Rectangle = __webpack_require__(24); + +/** + * Creates a new Rectangle or repositions and/or resizes an existing Rectangle so that it encompasses the two given Rectangles, i.e. calculates their union. + * + * @function Phaser.Geom.Rectangle.Union + * @since 3.0.0 + * + * @generic {Phaser.Geom.Rectangle} O - [out,$return] + * + * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle to use. + * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle to use. + * @param {Phaser.Geom.Rectangle} [out] - The Rectangle to store the union in. + * + * @return {Phaser.Geom.Rectangle} The modified `out` Rectangle, or a new Rectangle if none was provided. + */ +var Union = function (rectA, rectB, out) +{ + if (out === undefined) { out = new Rectangle(); } + + // Cache vars so we can use one of the input rects as the output rect + var x = Math.min(rectA.x, rectB.x); + var y = Math.min(rectA.y, rectB.y); + var w = Math.max(rectA.right, rectB.right) - x; + var h = Math.max(rectA.bottom, rectB.bottom) - y; + + return out.setTo(x, y, w, h); +}; + +module.exports = Union; + + +/***/ }), +/* 355 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var renderWebGL = __webpack_require__(4); +var renderCanvas = __webpack_require__(4); + +if (true) +{ + renderWebGL = __webpack_require__(356); +} + +if (true) +{ + renderCanvas = __webpack_require__(357); +} + +module.exports = { + + renderWebGL: renderWebGL, + renderCanvas: renderCanvas + +}; + + +/***/ }), +/* 356 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CounterClockwise = __webpack_require__(9); +var Clamp = __webpack_require__(3); +var RadToDeg = __webpack_require__(10); +var Wrap = __webpack_require__(6); + +/** + * Renders this Game Object with the WebGL Renderer to the given Camera. + * 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 SpineContainerWebGLRenderer#renderWebGL + * @since 3.50.0 + * @private + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. + * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call. + * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. + * @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 SpineContainerWebGLRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix) +{ + var plugin = container.plugin; + var sceneRenderer = plugin.sceneRenderer; + var children = container.list; + + if (children.length === 0) + { + if (sceneRenderer.batcher.isDrawing && renderer.finalType) + { + sceneRenderer.end(); + } + + return; + } + + var transformMatrix = container.localTransform; + + if (parentMatrix) + { + transformMatrix.loadIdentity(); + transformMatrix.multiply(parentMatrix); + transformMatrix.translate(container.x, container.y); + transformMatrix.rotate(container.rotation); + transformMatrix.scale(container.scaleX, container.scaleY); + } + else + { + transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY); + } + + var alpha = container.alpha; + var scrollFactorX = container.scrollFactorX; + var scrollFactorY = container.scrollFactorY; + + var GameObjectRenderMask = 15; + + if (renderer.newType) + { + sceneRenderer.begin(); + } + + for (var i = 0; i < children.length; i++) + { + var src = children[i]; + + var skeleton = src.skeleton; + var childAlpha = skeleton.color.a; + + var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || childAlpha === 0); + + if (!skeleton || !willRender) + { + continue; + } + + var camMatrix = renderer._tempMatrix1; + var spriteMatrix = renderer._tempMatrix2; + var calcMatrix = renderer._tempMatrix3; + + spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY)); + + camMatrix.copyFrom(camera.matrix); + + // Multiply the camera by the parent matrix + camMatrix.multiplyWithOffset(transformMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY); + + // Undo the camera scroll + spriteMatrix.e = src.x; + spriteMatrix.f = src.y; + + // Multiply by the Sprite matrix, store result in calcMatrix + camMatrix.multiply(spriteMatrix, calcMatrix); + + var viewportHeight = renderer.height; + + skeleton.x = calcMatrix.tx; + skeleton.y = viewportHeight - calcMatrix.ty; + + skeleton.scaleX = calcMatrix.scaleX; + skeleton.scaleY = calcMatrix.scaleY; + + if (src.scaleX < 0) + { + skeleton.scaleX *= -1; + + src.root.rotation = RadToDeg(calcMatrix.rotationNormalized); + } + else + { + // +90 degrees to account for the difference in Spine vs. Phaser rotation + src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360); + } + + if (src.scaleY < 0) + { + skeleton.scaleY *= -1; + + if (src.scaleX < 0) + { + src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2); + } + else + { + src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2); + } + } + + if (camera.renderToTexture || renderer.currentFramebuffer !== null) + { + skeleton.y = calcMatrix.ty; + skeleton.scaleY *= -1; + } + + // Add autoUpdate option + skeleton.updateWorldTransform(); + + skeleton.color.a = Clamp(childAlpha * alpha, 0, 1); + + // Draw the current skeleton + sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha); + + // Restore alpha + skeleton.color.a = childAlpha; + } + + if (!renderer.nextTypeMatch) + { + // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch. + sceneRenderer.end(); + + if (!renderer.finalType) + { + renderer.rebindPipeline(renderer.pipelines.MultiPipeline); + } + } +}; + +module.exports = SpineContainerWebGLRenderer; + + +/***/ }), +/* 357 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Renders this Game Object with the Canvas Renderer to the given Camera. + * 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.Container#renderCanvas + * @since 3.4.0 + * @private + * + * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. + * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call. + * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. + * @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 SpineContainerCanvasRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix) +{ + var children = container.list; + + if (children.length === 0) + { + return; + } + + var transformMatrix = container.localTransform; + + if (parentMatrix) + { + transformMatrix.loadIdentity(); + transformMatrix.multiply(parentMatrix); + transformMatrix.translate(container.x, container.y); + transformMatrix.rotate(container.rotation); + transformMatrix.scale(container.scaleX, container.scaleY); + } + else + { + transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY); + } + + var containerHasBlendMode = (container.blendMode !== -1); + + if (!containerHasBlendMode) + { + // If Container is SKIP_TEST then set blend mode to be Normal + renderer.setBlendMode(0); + } + + var alpha = container._alpha; + var scrollFactorX = container.scrollFactorX; + var scrollFactorY = container.scrollFactorY; + + if (container.mask) + { + container.mask.preRenderCanvas(renderer, null, camera); + } + + for (var i = 0; i < children.length; i++) + { + var child = children[i]; + + if (!child.willRender(camera)) + { + continue; + } + + var childAlpha = child.alpha; + var childScrollFactorX = child.scrollFactorX; + var childScrollFactorY = child.scrollFactorY; + + if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode) + { + // If Container doesn't have its own blend mode, then a child can have one + renderer.setBlendMode(child.blendMode); + } + + // Set parent values + child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY); + child.setAlpha(childAlpha * alpha); + + // Render + child.renderCanvas(renderer, child, interpolationPercentage, camera, transformMatrix); + + // Restore original values + child.setAlpha(childAlpha); + child.setScrollFactor(childScrollFactorX, childScrollFactorY); + } + + if (container.mask) + { + container.mask.postRenderCanvas(renderer); + } +}; + +module.exports = SpineContainerCanvasRenderer; + + /***/ }) /******/ ]); \ No newline at end of file diff --git a/plugins/spine/dist/SpinePlugin.min.js b/plugins/spine/dist/SpinePlugin.min.js index b9ef9e8ff..767243775 100644 --- a/plugins/spine/dist/SpinePlugin.min.js +++ b/plugins/spine/dist/SpinePlugin.min.js @@ -1 +1 @@ -window.SpinePlugin=function(n){var i={};function r(t){if(i[t])return i[t].exports;var e=i[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}return r.m=n,r.c=i,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=35)}([function(t,e){function s(t,e,n,i){for(var r in e)if(e.hasOwnProperty(r)){var s=(l=e,u=r,f=d=void 0,f=(c=n)?l[u]:Object.getOwnPropertyDescriptor(l,u),!c&&f.value&&"object"==typeof f.value&&(f=f.value),!(!f||!((d=f).get&&"function"==typeof d.get||d.set&&"function"==typeof d.set))&&(void 0===f.enumerable&&(f.enumerable=!0),void 0===f.configurable&&(f.configurable=!0),f));if(!1!==s){if(o=(i||t).prototype,a=r,h=void 0,(h=Object.getOwnPropertyDescriptor(o,a))&&(h.value&&"object"==typeof h.value&&(h=h.value),!1===h.configurable)){if(p.ignoreFinals)continue;throw new Error("cannot override final property '"+r+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,r,s)}else t.prototype[r]=e[r]}var o,a,h,l,u,c,d,f}function o(t,e){if(e){Array.isArray(e)||(e=[e]);for(var n=0;nMath.PI&&(t-=i.PI2),Math.abs(((t+i.TAU)%i.PI2-i.PI2)%i.PI2)}},function(t,e,n){var i=n(1);t.exports=function(t){return t*i.RAD_TO_DEG}},function(t,e){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}},function(t,e){t.exports=function(t,e){return Math.random()*(e-t)+t}},function(t,e){t.exports=function(t,e,n){return Math.max(e,Math.min(n,t))}},function(t,e,n){var i=new(n(0))({initialize:function(t,e,n){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=n||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new i(this.x,this.y,this.z)},crossVectors:function(t,e){var n=t.x,i=t.y,r=t.z,s=e.x,o=e.y,a=e.z;return this.x=i*a-r*o,this.y=r*s-n*a,this.z=n*o-i*s,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,n){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=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||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,n=t.y-this.y,i=t.z-this.z||0;return Math.sqrt(e*e+n*n+i*i)},distanceSq:function(t){var e=t.x-this.x,n=t.y-this.y,i=t.z-this.z||0;return e*e+n*n+i*i},length:function(){var t=this.x,e=this.y,n=this.z;return Math.sqrt(t*t+e*e+n*n)},lengthSq:function(){var t=this.x,e=this.y,n=this.z;return t*t+e*e+n*n},normalize:function(){var t=this.x,e=this.y,n=this.z,i=t*t+e*e+n*n;return 0s[0]&&(e=1),s[8]>s[3*e+e]&&(e=2),n=a[e],i=a[n],r=Math.sqrt(s[3*e+e]-s[3*n+n]-s[3*i+i]+1),h[e]=.5*r,r=.5/r,h[n]=(s[3*n+e]+s[3*e+n])*r,h[i]=(s[3*i+e]+s[3*e+i])*r,this.x=h[0],this.y=h[1],this.z=h[2],this.w=(s[3*i+n]-s[3*n+i])*r),this}});t.exports=d},function(t,e,n){var r=n(15),s=n(33);t.exports=function(t,e){var n=void 0===t?s():r({},t);if(e)for(var i in e)void 0!==e[i]&&(n[i]=e[i]);return n}},function(t,e){t.exports=function(t,e,n,i,r,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===n&&(n=""),void 0===i&&(i=""),void 0===r&&(r=0),void 0===s&&(s=!1),{responseType:t,async:e,user:n,password:i,timeout:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:s}}},function(t,e){t.exports=function(){}},function(t,e,n){var u=n(36),i=n(0),p=n(12),r=n(150),s=n(151),g=n(175),h=n(176),c=n(194),o=new i({Extends:s,initialize:function(t,e){s.call(this,t,e);var n=e.game;this.isWebGL=2===n.config.renderType,this.cache=n.cache.addCustom("spine"),this.spineTextures=n.cache.addCustom("spineTextures"),this.json=n.cache.json,this.textures=n.textures,this.drawDebug=!1,this.gl,this.renderer,this.sceneRenderer,this.skeletonRenderer,this.skeletonDebugRenderer,this.plugin=g,this.temp1,this.temp2,this.isWebGL?(this.runtime=g.webgl,this.renderer=n.renderer,this.gl=n.renderer.gl,this.getAtlas=this.getAtlasWebGL):(this.runtime=g.canvas,this.renderer=n.renderer,this.getAtlas=this.getAtlasCanvas);var l=this;e.registerFileType("spine",this.spineFileCallback,t),e.registerGameObject("spine",function(t,e,n,i,r){var s=new c(this.scene,l,t,e,n,i,r);return this.displayList.add(s),this.updateList.add(s),s},function(t,e){void 0===t&&(t={});var n=p(t,"key",null),i=p(t,"animationName",null),r=p(t,"loop",!1),s=new c(this.scene,l,0,0,n,i,r);void 0!==e&&(t.add=e),u(this.scene,s,t);var o=p(t,"skinName",!1);o&&s.setSkinByName(o);var a=p(t,"slotName",!1),h=p(t,"attachmentName",null);return a&&s.setAttachment(a,h),s.refresh()})},boot:function(){this.isWebGL?(this.bootWebGL(),this.onResize(),this.game.scale.on(r,this.onResize,this)):this.bootCanvas();var t=this.systems.events;t.once("shutdown",this.shutdown,this),t.once("destroy",this.destroy,this)},bootCanvas:function(){this.skeletonRenderer=new g.canvas.SkeletonRenderer(this.scene.sys.context)},bootWebGL:function(){this.sceneRenderer=new g.webgl.SceneRenderer(this.renderer.canvas,this.gl,!0);function t(t,e){var n;t===this.srcBlend&&e===this.dstBlend||(n=this.context.gl,this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),n.blendFunc(this.srcBlend,this.dstBlend)))}this.sceneRenderer.batcher.setBlendMode=t,this.sceneRenderer.shapes.setBlendMode=t,this.skeletonRenderer=this.sceneRenderer.skeletonRenderer,this.skeletonDebugRenderer=this.sceneRenderer.skeletonDebugRenderer,this.temp1=new g.webgl.Vector3(0,0,0),this.temp2=new g.webgl.Vector3(0,0,0)},getAtlasCanvas:function(t){var e=this.cache.get(t);if(e){var n,i=this.spineTextures;return i.has(t)?i.get(t):(n=this.textures,new g.TextureAtlas(e.data,function(t){return new g.canvas.CanvasTexture(n.get(e.prefix+t).getSourceImage())}))}console.warn("No atlas data for: "+t)},getAtlasWebGL:function(t){var e=this.cache.get(t);if(e){var n,i,r=this.spineTextures,s=r.has(t)?r.get(t):(n=this.textures,(i=this.sceneRenderer.context.gl).pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),new g.TextureAtlas(e.data,function(t){return new g.webgl.GLTexture(i,n.get(e.prefix+t).getSourceImage(),!1)}));return s}console.warn("No atlas data for: "+t)},spineFileCallback:function(t,e,n,i,r,s){var o;if(Array.isArray(t))for(var a=0;a=i.PI2-n?t=e:(Math.abs(e-t)>Math.PI&&(e>>0,n=(e*=n)>>>0,n+=4294967296*(e-=n);return 2.3283064365386963e-10*((this.n=n)>>>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;e= 0.");if(null==e)throw new Error("name cannot be null.");this.index=t,this.name=e,this.parent=n}function be(t,e){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.mix=t.mix,this.softness=t.softness,this.bendDirection=t.bendDirection,this.compress=t.compress,this.stretch=t.stretch,this.bones=new Array;for(var n=0;n= 0.");if(null==e)throw new Error("name cannot be null.");if(null==n)throw new Error("boneData cannot be null.");this.index=t,this.name=e,this.boneData=n}function Oe(t,e){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new N.Vector2,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.rotateMix=t.rotateMix,this.translateMix=t.translateMix,this.scaleMix=t.scaleMix,this.shearMix=t.shearMix,this.bones=new Array;for(var n=0;n>>1;;){if(t[(s+1)*n]<=e?i=s+1:r=s,i==r)return(i+1)*n;s=i+r>>>1}},r.linearSearch=function(t,e,n){for(var i=0,r=t.length-n;i<=r;i+=n)if(t[i]>e)return i;return-1},r);function r(t,e,n){if(null==t)throw new Error("name cannot be null.");if(null==e)throw new Error("timelines cannot be null.");this.name=t,this.timelines=e,this.timelineIds=[];for(var i=0;i 0: "+t);this.curves=B.Utils.newFloatArray((t-1)*M.BEZIER_SIZE)}B.CurveTimeline=s;var o,a=(me(m,o=s),m.prototype.getPropertyId=function(){return(n.rotate<<24)+this.boneIndex},m.prototype.setFrame=function(t,e,n){t<<=1,this.frames[t]=e,this.frames[t+m.ROTATION]=n},m.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=a[a.length-m.ENTRIES]){var u=a[a.length+m.PREV_ROTATION];switch(s){case Y.setup:h.rotation=h.data.rotation+u*r;break;case Y.first:case Y.replace:u+=h.data.rotation-h.rotation,u-=360*(16384-(16384.499999999996-u/360|0));case Y.add:h.rotation+=u*r}}else{var c=z.binarySearch(a,n,m.ENTRIES),d=a[c+m.PREV_ROTATION],f=a[c],p=this.getCurvePercent((c>>1)-1,1-(n-f)/(a[c+m.PREV_TIME]-f)),g=d+((g=a[c+m.ROTATION]-d)-360*(16384-(16384.499999999996-g/360|0)))*p;switch(s){case Y.setup:h.rotation=h.data.rotation+(g-360*(16384-(16384.499999999996-g/360|0)))*r;break;case Y.first:case Y.replace:g+=h.data.rotation-h.rotation;case Y.add:h.rotation+=(g-360*(16384-(16384.499999999996-g/360|0)))*r}}},m.ENTRIES=2,m.PREV_TIME=-2,m.PREV_ROTATION=-1,m.ROTATION=1,m);function m(t){var e=o.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t<<1),e}B.RotateTimeline=a;var h,l=(me(p,h=s),p.prototype.getPropertyId=function(){return(n.translate<<24)+this.boneIndex},p.prototype.setFrame=function(t,e,n,i){t*=p.ENTRIES,this.frames[t]=e,this.frames[t+p.X]=n,this.frames[t+p.Y]=i},p.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=a[a.length-p.ENTRIES]?(d=a[a.length+p.PREV_X],f=a[a.length+p.PREV_Y]):(d=a[(l=z.binarySearch(a,n,p.ENTRIES))+p.PREV_X],f=a[l+p.PREV_Y],u=a[l],c=this.getCurvePercent(l/p.ENTRIES-1,1-(n-u)/(a[l+p.PREV_TIME]-u)),d+=(a[l+p.X]-d)*c,f+=(a[l+p.Y]-f)*c),s){case Y.setup:h.x=h.data.x+d*r,h.y=h.data.y+f*r;break;case Y.first:case Y.replace:h.x+=(h.data.x+d-h.x)*r,h.y+=(h.data.y+f-h.y)*r;break;case Y.add:h.x+=d*r,h.y+=f*r}}},p.ENTRIES=3,p.PREV_TIME=-3,p.PREV_X=-2,p.PREV_Y=-1,p.X=1,p.Y=2,p);function p(t){var e=h.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*p.ENTRIES),e}B.TranslateTimeline=l;var u,c=(me(x,u=l),x.prototype.getPropertyId=function(){return(n.scale<<24)+this.boneIndex},x.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=a[a.length-x.ENTRIES]?(d=a[a.length+x.PREV_X]*h.data.scaleX,a[a.length+x.PREV_Y]*h.data.scaleY):(d=a[(l=z.binarySearch(a,n,x.ENTRIES))+x.PREV_X],f=a[l+x.PREV_Y],u=a[l],c=this.getCurvePercent(l/x.ENTRIES-1,1-(n-u)/(a[l+x.PREV_TIME]-u)),d=(d+(a[l+x.X]-d)*c)*h.data.scaleX,(f+(a[l+x.Y]-f)*c)*h.data.scaleY),1==r)s==Y.add?(h.scaleX+=d-h.data.scaleX,h.scaleY+=f-h.data.scaleY):(h.scaleX=d,h.scaleY=f);else{var p=0,g=0;if(o==v.mixOut)switch(s){case Y.setup:p=h.data.scaleX,g=h.data.scaleY,h.scaleX=p+(Math.abs(d)*B.MathUtils.signum(p)-p)*r,h.scaleY=g+(Math.abs(f)*B.MathUtils.signum(g)-g)*r;break;case Y.first:case Y.replace:p=h.scaleX,g=h.scaleY,h.scaleX=p+(Math.abs(d)*B.MathUtils.signum(p)-p)*r,h.scaleY=g+(Math.abs(f)*B.MathUtils.signum(g)-g)*r;break;case Y.add:p=h.scaleX,g=h.scaleY,h.scaleX=p+(Math.abs(d)*B.MathUtils.signum(p)-h.data.scaleX)*r,h.scaleY=g+(Math.abs(f)*B.MathUtils.signum(g)-h.data.scaleY)*r}else switch(s){case Y.setup:p=Math.abs(h.data.scaleX)*B.MathUtils.signum(d),g=Math.abs(h.data.scaleY)*B.MathUtils.signum(f),h.scaleX=p+(d-p)*r,h.scaleY=g+(f-g)*r;break;case Y.first:case Y.replace:p=Math.abs(h.scaleX)*B.MathUtils.signum(d),g=Math.abs(h.scaleY)*B.MathUtils.signum(f),h.scaleX=p+(d-p)*r,h.scaleY=g+(f-g)*r;break;case Y.add:p=B.MathUtils.signum(d),g=B.MathUtils.signum(f),h.scaleX=Math.abs(h.scaleX)*p+(d-Math.abs(h.data.scaleX)*p)*r,h.scaleY=Math.abs(h.scaleY)*g+(f-Math.abs(h.data.scaleY)*g)*r}}}},x);function x(t){return u.call(this,t)||this}B.ScaleTimeline=c;var d,f=(me(g,d=l),g.prototype.getPropertyId=function(){return(n.shear<<24)+this.boneIndex},g.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=a[a.length-g.ENTRIES]?(d=a[a.length+g.PREV_X],f=a[a.length+g.PREV_Y]):(d=a[(l=z.binarySearch(a,n,g.ENTRIES))+g.PREV_X],f=a[l+g.PREV_Y],u=a[l],c=this.getCurvePercent(l/g.ENTRIES-1,1-(n-u)/(a[l+g.PREV_TIME]-u)),d+=(a[l+g.X]-d)*c,f+=(a[l+g.Y]-f)*c),s){case Y.setup:h.shearX=h.data.shearX+d*r,h.shearY=h.data.shearY+f*r;break;case Y.first:case Y.replace:h.shearX+=(h.data.shearX+d-h.shearX)*r,h.shearY+=(h.data.shearY+f-h.shearY)*r;break;case Y.add:h.shearX+=d*r,h.shearY+=f*r}}},g);function g(t){return d.call(this,t)||this}B.ShearTimeline=f;var y,w=(me(E,y=s),E.prototype.getPropertyId=function(){return(n.color<<24)+this.slotIndex},E.prototype.setFrame=function(t,e,n,i,r,s){t*=E.ENTRIES,this.frames[t]=e,this.frames[t+E.R]=n,this.frames[t+E.G]=i,this.frames[t+E.B]=r,this.frames[t+E.A]=s},E.prototype.apply=function(t,e,n,i,r,s,o){var a=t.slots[this.slotIndex];if(a.bone.active){var h=this.frames;if(n=h[h.length-E.ENTRIES]?(g=h[(c=h.length)+E.PREV_R],v=h[c+E.PREV_G],m=h[c+E.PREV_B],M=h[c+E.PREV_A]):(g=h[(d=z.binarySearch(h,n,E.ENTRIES))+E.PREV_R],v=h[d+E.PREV_G],m=h[d+E.PREV_B],M=h[d+E.PREV_A],f=h[d],p=this.getCurvePercent(d/E.ENTRIES-1,1-(n-f)/(h[d+E.PREV_TIME]-f)),g+=(h[d+E.R]-g)*p,v+=(h[d+E.G]-v)*p,m+=(h[d+E.B]-m)*p,M+=(h[d+E.A]-M)*p),1==r?a.color.set(g,v,m,M):(l=a.color,s==Y.setup&&l.setFromColor(a.data.color),l.add((g-l.r)*r,(v-l.g)*r,(m-l.b)*r,(M-l.a)*r))}}},E.ENTRIES=5,E.PREV_TIME=-5,E.PREV_R=-4,E.PREV_G=-3,E.PREV_B=-2,E.PREV_A=-1,E.R=1,E.G=2,E.B=3,E.A=4,E);function E(t){var e=y.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*E.ENTRIES),e}B.ColorTimeline=w;var b,T=(me(A,b=s),A.prototype.getPropertyId=function(){return(n.twoColor<<24)+this.slotIndex},A.prototype.setFrame=function(t,e,n,i,r,s,o,a,h){t*=A.ENTRIES,this.frames[t]=e,this.frames[t+A.R]=n,this.frames[t+A.G]=i,this.frames[t+A.B]=r,this.frames[t+A.A]=s,this.frames[t+A.R2]=o,this.frames[t+A.G2]=a,this.frames[t+A.B2]=h},A.prototype.apply=function(t,e,n,i,r,s,o){var a=t.slots[this.slotIndex];if(a.bone.active){var h=this.frames;if(n=h[h.length-A.ENTRIES]?(m=h[(f=h.length)+A.PREV_R],M=h[f+A.PREV_G],x=h[f+A.PREV_B],y=h[f+A.PREV_A],w=h[f+A.PREV_R2],E=h[f+A.PREV_G2],b=h[f+A.PREV_B2]):(m=h[(p=z.binarySearch(h,n,A.ENTRIES))+A.PREV_R],M=h[p+A.PREV_G],x=h[p+A.PREV_B],y=h[p+A.PREV_A],w=h[p+A.PREV_R2],E=h[p+A.PREV_G2],b=h[p+A.PREV_B2],g=h[p],v=this.getCurvePercent(p/A.ENTRIES-1,1-(n-g)/(h[p+A.PREV_TIME]-g)),m+=(h[p+A.R]-m)*v,M+=(h[p+A.G]-M)*v,x+=(h[p+A.B]-x)*v,y+=(h[p+A.A]-y)*v,w+=(h[p+A.R2]-w)*v,E+=(h[p+A.G2]-E)*v,b+=(h[p+A.B2]-b)*v),1==r?(a.color.set(m,M,x,y),a.darkColor.set(w,E,b,1)):(l=a.color,u=a.darkColor,s==Y.setup&&(l.setFromColor(a.data.color),u.setFromColor(a.data.darkColor)),l.add((m-l.r)*r,(M-l.g)*r,(x-l.b)*r,(y-l.a)*r),u.add((w-u.r)*r,(E-u.g)*r,(b-u.b)*r,0))}}},A.ENTRIES=8,A.PREV_TIME=-8,A.PREV_R=-7,A.PREV_G=-6,A.PREV_B=-5,A.PREV_A=-4,A.PREV_R2=-3,A.PREV_G2=-2,A.PREV_B2=-1,A.R=1,A.G=2,A.B=3,A.A=4,A.R2=5,A.G2=6,A.B2=7,A);function A(t){var e=b.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*A.ENTRIES),e}B.TwoColorTimeline=T;var R=(S.prototype.getPropertyId=function(){return(n.attachment<<24)+this.slotIndex},S.prototype.getFrameCount=function(){return this.frames.length},S.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.attachmentNames[t]=n},S.prototype.apply=function(t,e,n,i,r,s,o){var a,h,l,u=t.slots[this.slotIndex];u.bone.active&&(o!=v.mixOut?n<(a=this.frames)[0]?s!=Y.setup&&s!=Y.first||this.setAttachment(t,u,u.data.attachmentName):(h=0,h=n>=a[a.length-1]?a.length-1:z.binarySearch(a,n,1)-1,l=this.attachmentNames[h],t.slots[this.slotIndex].setAttachment(null==l?null:t.getAttachment(this.slotIndex,l))):s==Y.setup&&this.setAttachment(t,u,u.data.attachmentName))},S.prototype.setAttachment=function(t,e,n){e.attachment=null==n?null:t.getAttachment(this.slotIndex,n)},S);function S(t){this.frames=B.Utils.newFloatArray(t),this.attachmentNames=new Array(t)}B.AttachmentTimeline=R;var I,C=null,P=(me(L,I=s),L.prototype.getPropertyId=function(){return(n.deform<<27)+ +this.attachment.id+this.slotIndex},L.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.frameVertices[t]=n},L.prototype.apply=function(t,e,n,i,r,s,o){var a=t.slots[this.slotIndex];if(a.bone.active){var h=a.getAttachment();if(h instanceof B.VertexAttachment&&h.deformAttachment==this.attachment){var l=a.deform;0==l.length&&(s=Y.setup);var u=this.frameVertices,c=u[0].length,d=this.frames;if(n=d[d.length-1]){var M=u[d.length-1];if(1==r)if(s==Y.add)if(null==(f=h).bones)for(var g=f.vertices,x=0;x=a[h-1])return;if(!(n=a[l];l++)i.push(this.events[l])}}},k);function k(t){this.frames=B.Utils.newFloatArray(t),this.events=new Array(t)}B.EventTimeline=_;var F=(O.prototype.getPropertyId=function(){return n.drawOrder<<24},O.prototype.getFrameCount=function(){return this.frames.length},O.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.drawOrders[t]=n},O.prototype.apply=function(t,e,n,i,r,s,o){var a=t.drawOrder,h=t.slots;if(o!=v.mixOut){var l=this.frames;if(n=l[l.length-1]?l.length-1:z.binarySearch(l,n)-1,c=this.drawOrders[u];if(null==c)B.Utils.arrayCopy(h,0,a,0,h.length);else for(var d=0,f=c.length;d=d[d.length-N.ENTRIES]?s==Y.setup?(f.mix=f.data.mix+(d[d.length+N.PREV_MIX]-f.data.mix)*r,f.softness=f.data.softness+(d[d.length+N.PREV_SOFTNESS]-f.data.softness)*r,o==v.mixOut?(f.bendDirection=f.data.bendDirection,f.compress=f.data.compress,f.stretch=f.data.stretch):(f.bendDirection=d[d.length+N.PREV_BEND_DIRECTION],f.compress=0!=d[d.length+N.PREV_COMPRESS],f.stretch=0!=d[d.length+N.PREV_STRETCH])):(f.mix+=(d[d.length+N.PREV_MIX]-f.mix)*r,f.softness+=(d[d.length+N.PREV_SOFTNESS]-f.softness)*r,o==v.mixIn&&(f.bendDirection=d[d.length+N.PREV_BEND_DIRECTION],f.compress=0!=d[d.length+N.PREV_COMPRESS],f.stretch=0!=d[d.length+N.PREV_STRETCH])):(h=d[(a=z.binarySearch(d,n,N.ENTRIES))+N.PREV_MIX],l=d[a+N.PREV_SOFTNESS],u=d[a],c=this.getCurvePercent(a/N.ENTRIES-1,1-(n-u)/(d[a+N.PREV_TIME]-u)),s==Y.setup?(f.mix=f.data.mix+(h+(d[a+N.MIX]-h)*c-f.data.mix)*r,f.softness=f.data.softness+(l+(d[a+N.SOFTNESS]-l)*c-f.data.softness)*r,o==v.mixOut?(f.bendDirection=f.data.bendDirection,f.compress=f.data.compress,f.stretch=f.data.stretch):(f.bendDirection=d[a+N.PREV_BEND_DIRECTION],f.compress=0!=d[a+N.PREV_COMPRESS],f.stretch=0!=d[a+N.PREV_STRETCH])):(f.mix+=(h+(d[a+N.MIX]-h)*c-f.mix)*r,f.softness+=(l+(d[a+N.SOFTNESS]-l)*c-f.softness)*r,o==v.mixIn&&(f.bendDirection=d[a+N.PREV_BEND_DIRECTION],f.compress=0!=d[a+N.PREV_COMPRESS],f.stretch=0!=d[a+N.PREV_STRETCH])))},N.ENTRIES=6,N.PREV_TIME=-6,N.PREV_MIX=-5,N.PREV_SOFTNESS=-4,N.PREV_BEND_DIRECTION=-3,N.PREV_COMPRESS=-2,N.PREV_STRETCH=-1,N.MIX=1,N.SOFTNESS=2,N.BEND_DIRECTION=3,N.COMPRESS=4,N.STRETCH=5,N);function N(t){var e=V.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*N.ENTRIES),e}B.IkConstraintTimeline=D;var U,X=(me(W,U=s),W.prototype.getPropertyId=function(){return(n.transformConstraint<<24)+this.transformConstraintIndex},W.prototype.setFrame=function(t,e,n,i,r,s){t*=W.ENTRIES,this.frames[t]=e,this.frames[t+W.ROTATE]=n,this.frames[t+W.TRANSLATE]=i,this.frames[t+W.SCALE]=r,this.frames[t+W.SHEAR]=s},W.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.transformConstraints[this.transformConstraintIndex];if(h.active)if(n=a[a.length-W.ENTRIES]?(p=a[(u=a.length)+W.PREV_ROTATE],g=a[u+W.PREV_TRANSLATE],v=a[u+W.PREV_SCALE],m=a[u+W.PREV_SHEAR]):(p=a[(c=z.binarySearch(a,n,W.ENTRIES))+W.PREV_ROTATE],g=a[c+W.PREV_TRANSLATE],v=a[c+W.PREV_SCALE],m=a[c+W.PREV_SHEAR],d=a[c],f=this.getCurvePercent(c/W.ENTRIES-1,1-(n-d)/(a[c+W.PREV_TIME]-d)),p+=(a[c+W.ROTATE]-p)*f,g+=(a[c+W.TRANSLATE]-g)*f,v+=(a[c+W.SCALE]-v)*f,m+=(a[c+W.SHEAR]-m)*f),s==Y.setup?(l=h.data,h.rotateMix=l.rotateMix+(p-l.rotateMix)*r,h.translateMix=l.translateMix+(g-l.translateMix)*r,h.scaleMix=l.scaleMix+(v-l.scaleMix)*r,h.shearMix=l.shearMix+(m-l.shearMix)*r):(h.rotateMix+=(p-h.rotateMix)*r,h.translateMix+=(g-h.translateMix)*r,h.scaleMix+=(v-h.scaleMix)*r,h.shearMix+=(m-h.shearMix)*r)}},W.ENTRIES=5,W.PREV_TIME=-5,W.PREV_ROTATE=-4,W.PREV_TRANSLATE=-3,W.PREV_SCALE=-2,W.PREV_SHEAR=-1,W.ROTATE=1,W.TRANSLATE=2,W.SCALE=3,W.SHEAR=4,W);function W(t){var e=U.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*W.ENTRIES),e}B.TransformConstraintTimeline=X;var q,G=(me(H,q=s),H.prototype.getPropertyId=function(){return(n.pathConstraintPosition<<24)+this.pathConstraintIndex},H.prototype.setFrame=function(t,e,n){t*=H.ENTRIES,this.frames[t]=e,this.frames[t+H.VALUE]=n},H.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n=a[a.length-H.ENTRIES]?d=a[a.length+H.PREV_VALUE]:(d=a[(l=z.binarySearch(a,n,H.ENTRIES))+H.PREV_VALUE],u=a[l],c=this.getCurvePercent(l/H.ENTRIES-1,1-(n-u)/(a[l+H.PREV_TIME]-u)),d+=(a[l+H.VALUE]-d)*c),s==Y.setup?h.position=h.data.position+(d-h.data.position)*r:h.position+=(d-h.position)*r}},H.ENTRIES=2,H.PREV_TIME=-2,H.PREV_VALUE=-1,H.VALUE=1,H);function H(t){var e=q.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*H.ENTRIES),e}B.PathConstraintPositionTimeline=G;var j,Z=(me(K,j=G),K.prototype.getPropertyId=function(){return(n.pathConstraintSpacing<<24)+this.pathConstraintIndex},K.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n=a[a.length-K.ENTRIES]?d=a[a.length+K.PREV_VALUE]:(d=a[(l=z.binarySearch(a,n,K.ENTRIES))+K.PREV_VALUE],u=a[l],c=this.getCurvePercent(l/K.ENTRIES-1,1-(n-u)/(a[l+K.PREV_TIME]-u)),d+=(a[l+K.VALUE]-d)*c),s==Y.setup?h.spacing=h.data.spacing+(d-h.data.spacing)*r:h.spacing+=(d-h.spacing)*r}},K);function K(t){return j.call(this,t)||this}B.PathConstraintSpacingTimeline=Z;var Q,J=(me($,Q=s),$.prototype.getPropertyId=function(){return(n.pathConstraintMix<<24)+this.pathConstraintIndex},$.prototype.setFrame=function(t,e,n,i){t*=$.ENTRIES,this.frames[t]=e,this.frames[t+$.ROTATE]=n,this.frames[t+$.TRANSLATE]=i},$.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n=a[a.length-$.ENTRIES]?(d=a[a.length+$.PREV_ROTATE],f=a[a.length+$.PREV_TRANSLATE]):(d=a[(l=z.binarySearch(a,n,$.ENTRIES))+$.PREV_ROTATE],f=a[l+$.PREV_TRANSLATE],u=a[l],c=this.getCurvePercent(l/$.ENTRIES-1,1-(n-u)/(a[l+$.PREV_TIME]-u)),d+=(a[l+$.ROTATE]-d)*c,f+=(a[l+$.TRANSLATE]-f)*c),s==Y.setup?(h.rotateMix=h.data.rotateMix+(d-h.data.rotateMix)*r,h.translateMix=h.data.translateMix+(f-h.data.translateMix)*r):(h.rotateMix+=(d-h.rotateMix)*r,h.translateMix+=(f-h.translateMix)*r)}},$.ENTRIES=3,$.PREV_TIME=-3,$.PREV_ROTATE=-2,$.PREV_TRANSLATE=-1,$.ROTATE=1,$.TRANSLATE=2,$);function $(t){var e=Q.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*$.ENTRIES),e}B.PathConstraintMixTimeline=J}(ge=ge||{}),function(R){var t=(S.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,n=0,i=e.length;n=r.trackEnd&&null==r.mixingFrom){e[n]=null,this.queue.end(r),this.disposeNext(r);continue}if(null!=r.mixingFrom&&this.updateMixingFrom(r,t)){var h=r.mixingFrom;for((r.mixingFrom=null)!=h&&(h.mixingTo=null);null!=h;)this.queue.end(h),h=h.mixingFrom}r.trackTime+=s}}this.queue.drain()},S.prototype.updateMixingFrom=function(t,e){var n=t.mixingFrom;if(null==n)return!0;var i=this.updateMixingFrom(n,e);return n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,0=t.mixDuration?(0!=n.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=n.mixingFrom,null!=n.mixingFrom&&(n.mixingFrom.mixingTo=t),t.interruptAlpha=n.interruptAlpha,this.queue.end(n)),i):(n.trackTime+=e*n.timeScale,t.mixTime+=e,!1)},S.prototype.apply=function(t){if(null==t)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var e=this.events,n=this.tracks,i=!1,r=0,s=n.length;r=o.trackEnd&&null==o.next&&(h=0);var l=o.animationLast,u=o.getAnimationTime(),c=o.animation.timelines.length,d=o.animation.timelines;if(0==r&&1==h||a==R.MixBlend.add)for(var f=0;f=s[s.length-1]?s.length-1:R.Animation.binarySearch(s,n)-1,this.setAttachment(e,a,t.attachmentNames[o],r)),a.attachmentState<=this.unkeyedState&&(a.attachmentState=this.unkeyedState+S.SETUP))},S.prototype.setAttachment=function(t,e,n,i){e.attachment=null==n?null:t.getAttachment(e.data.index,n),i&&(e.attachmentState=this.unkeyedState+S.CURRENT)},S.prototype.applyRotateTimeline=function(t,e,n,i,r,s,o,a){if(a&&(s[o]=0),1!=i){var h=t,l=h.frames,u=e.bones[h.boneIndex];if(u.active){var c=0,d=0;if(n=l[l.length-R.RotateTimeline.ENTRIES]?d=u.data.rotation+l[l.length+R.RotateTimeline.PREV_ROTATION]:(p=l[(f=R.Animation.binarySearch(l,n,R.RotateTimeline.ENTRIES))+R.RotateTimeline.PREV_ROTATION],g=l[f],v=h.getCurvePercent((f>>1)-1,1-(n-g)/(l[f+R.RotateTimeline.PREV_TIME]-g)),d=l[f+R.RotateTimeline.ROTATION]-p,d=p+(d-=360*(16384-(16384.499999999996-d/360|0)))*v+u.data.rotation,d-=360*(16384-(16384.499999999996-d/360|0)))}var m,M,x,y,w=0,E=d-c;0==(E-=360*(16384-(16384.499999999996-E/360|0)))?w=s[o]:(M=m=0,M=a?(m=0,E):(m=s[o],s[o+1]),x=0i||this.queue.event(t,l)}for((t.loop?0==r||s>t.trackTime%r:i<=e&&t.animationLast=this.tracks.length)){var e=this.tracks[t];if(null!=e){this.queue.end(e),this.disposeNext(e);for(var n=e;;){var i=n.mixingFrom;if(null==i)break;this.queue.end(i),n.mixingFrom=null,n.mixingTo=null,n=i}this.tracks[e.trackIndex]=null,this.queue.drain()}}},S.prototype.setCurrent=function(t,e,n){var i=this.expandToIndex(t);this.tracks[t]=e,null!=i&&(n&&this.queue.interrupt(i),((e.mixingFrom=i).mixingTo=e).mixTime=0,null!=i.mixingFrom&&0=this.tracks.length?null:this.tracks[t]},S.prototype.addListener=function(t){if(null==t)throw new Error("listener cannot be null.");this.listeners.push(t)},S.prototype.removeListener=function(t){var e=this.listeners.indexOf(t);0<=e&&this.listeners.splice(e,1)},S.prototype.clearListeners=function(){this.listeners.length=0},S.prototype.clearListenerNotifications=function(){this.queue.clear()},S.emptyAnimation=new R.Animation("",[],0),S.SUBSEQUENT=0,S.FIRST=1,S.HOLD_SUBSEQUENT=2,S.HOLD_FIRST=3,S.HOLD_MIX=4,S.SETUP=1,S.CURRENT=2,S);function S(t){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new r(this),this.propertyIDs=new R.IntSet,this.animationsChanged=!1,this.trackEntryPool=new R.Pool(function(){return new e}),this.data=t}R.AnimationState=t;var e=(n.prototype.reset=function(){this.next=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0},n.prototype.getAnimationTime=function(){if(this.loop){var t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)},n.prototype.setAnimationLast=function(t){this.animationLast=t,this.nextAnimationLast=t},n.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},n.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},n);function n(){this.mixBlend=R.MixBlend.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}R.TrackEntry=e;var a,i,r=(s.prototype.start=function(t){this.objects.push(a.start),this.objects.push(t),this.animState.animationsChanged=!0},s.prototype.interrupt=function(t){this.objects.push(a.interrupt),this.objects.push(t)},s.prototype.end=function(t){this.objects.push(a.end),this.objects.push(t),this.animState.animationsChanged=!0},s.prototype.dispose=function(t){this.objects.push(a.dispose),this.objects.push(t)},s.prototype.complete=function(t){this.objects.push(a.complete),this.objects.push(t)},s.prototype.event=function(t,e){this.objects.push(a.event),this.objects.push(t),this.objects.push(e)},s.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var t=this.objects,e=this.animState.listeners,n=0;nj.MathUtils.PI?U-=j.MathUtils.PI2:U<-j.MathUtils.PI&&(U+=j.MathUtils.PI2),U*=e,V=Math.cos(U),D=Math.sin(U),R.a=V*_-D*F,R.b=V*k-D*O,R.c=D*_+V*F,R.d=D*k+V*O),R.appliedValid=!1}}}},Ae.prototype.computeWorldPositions=function(t,e,n,i,r){var s=this.target,o=this.position,a=this.spaces,h=j.Utils.setArraySize(this.positions,3*e+2),l=null,u=t.closed,c=t.worldVerticesLength,d=c/6,f=Ae.NONE;if(!t.constantSpeed){var p=t.lengths,g=p[d-=u?1:2];if(i&&(o*=g),r)for(var v=1;v>>1^-(1&n)},e.prototype.readStringRef=function(){var t=this.readInt(!0);return 0==t?null:this.strings[t-1]},e.prototype.readString=function(){var t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;for(var e="",n=0;n>4){case 12:case 13:e+=String.fromCharCode((31&i)<<6|63&this.readByte()),n+=2;break;case 14:e+=String.fromCharCode((15&i)<<12|(63&this.readByte())<<6|63&this.readByte()),n+=3;break;default:e+=String.fromCharCode(i),n++}}return e},e.prototype.readFloat=function(){var t=this.buffer.getFloat32(this.index);return this.index+=4,t},e.prototype.readBoolean=function(){return 0!=this.readByte()},e);function e(t,e,n,i){void 0===e&&(e=new Array),void 0===n&&(n=0),void 0===i&&(i=new DataView(t.buffer)),this.strings=e,this.index=n,this.buffer=i}var N=function(t,e,n,i,r){this.mesh=t,this.skin=e,this.slotIndex=n,this.parent=i,this.inheritDeform=r},u=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),this.bones=t,this.vertices=e}}(ge=ge||{}),C=ge=ge||{},Pe.prototype.update=function(t,e){if(null==t)throw new Error("skeleton cannot be null.");var n=this.boundingBoxes,i=this.polygons,r=this.polygonPool,s=t.slots,o=s.length;n.length=0,r.freeAll(i);for(var a=i.length=0;a=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},Pe.prototype.aabbIntersectsSegment=function(t,e,n,i){var r=this.minX,s=this.minY,o=this.maxX,a=this.maxY;if(t<=r&&n<=r||e<=s&&i<=s||o<=t&&o<=n||a<=e&&a<=i)return!1;var h=(i-e)/(n-t),l=h*(r-t)+e;if(st.minX&&this.minYt.minY},Pe.prototype.containsPoint=function(t,e){for(var n=this.polygons,i=0,r=n.length;i>1,N=this.clipOutput,U=Z.Utils.setArraySize(l,P+D*f),X=0;X>1;a=i.length&&(i.length=t+1),i[t]||(i[t]={}),i[t][e]=n},e.prototype.addSkin=function(t){for(var e=0;e=this.lines.length?null:this.lines[this.index++]},n.prototype.readValue=function(){var t=this.readLine(),e=t.indexOf(":");if(-1==e)throw new Error("Invalid line: "+t);return t.substring(e+1).trim()},n.prototype.readTuple=function(t){var e=this.readLine(),n=e.indexOf(":");if(-1==n)throw new Error("Invalid line: "+e);for(var i=0,r=n+1;i<3;i++){var s=e.indexOf(",",r);if(-1==s)break;t[i]=e.substr(r,s-r).trim(),r=s+1}return t[i]=e.substring(r).trim(),i+1},n);function n(t){this.index=0,this.lines=t.split(/\r\n|\r|\n/)}var g=function(){};f.TextureAtlasPage=g;var i,v=(i=f.TextureRegion,me(r,i),r);function r(){return null!==i&&i.apply(this,arguments)||this}f.TextureAtlasRegion=v}(ge=ge||{}),N=ge=ge||{},Oe.prototype.isActive=function(){return this.active},Oe.prototype.apply=function(){this.update()},Oe.prototype.update=function(){this.data.local?this.data.relative?this.applyRelativeLocal():this.applyAbsoluteLocal():this.data.relative?this.applyRelativeWorld():this.applyAbsoluteWorld()},Oe.prototype.applyAbsoluteWorld=function(){for(var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target,s=r.a,o=r.b,a=r.c,h=r.d,l=0N.MathUtils.PI?T-=N.MathUtils.PI2:T<-N.MathUtils.PI&&(T+=N.MathUtils.PI2),T*=t,m=Math.cos(T),M=Math.sin(T),R.a=m*g-M*v,R.b=m*w-M*E,R.c=M*g+m*v,R.d=M*w+m*E,S=!0),0!=e&&(x=this.temp,r.localToWorld(x.set(this.data.offsetX,this.data.offsetY)),R.worldX+=(x.x-R.worldX)*e,R.worldY+=(x.y-R.worldY)*e,S=!0),0N.MathUtils.PI?T-=N.MathUtils.PI2:T<-N.MathUtils.PI&&(T+=N.MathUtils.PI2),T=b+(T+c)*i,A=Math.sqrt(w*w+E*E),R.b=Math.cos(T)*A,R.d=Math.sin(T)*A,S=!0),S&&(R.appliedValid=!1)}},Oe.prototype.applyRelativeWorld=function(){for(var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target,s=r.a,o=r.b,a=r.c,h=r.d,l=0N.MathUtils.PI?y-=N.MathUtils.PI2:y<-N.MathUtils.PI&&(y+=N.MathUtils.PI2),y*=t,m=Math.cos(y),M=Math.sin(y),T.a=m*g-M*v,T.b=m*w-M*E,T.c=M*g+m*v,T.d=M*w+m*E,A=!0),0!=e&&(x=this.temp,r.localToWorld(x.set(this.data.offsetX,this.data.offsetY)),T.worldX+=x.x*e,T.worldY+=x.y*e,A=!0),0N.MathUtils.PI?y-=N.MathUtils.PI2:y<-N.MathUtils.PI&&(y+=N.MathUtils.PI2),w=T.b,E=T.d,y=Math.atan2(E,w)+(y-N.MathUtils.PI/2+c)*i,b=Math.sqrt(w*w+E*E),T.b=Math.cos(y)*b,T.d=Math.sin(y)*b,A=!0),A&&(T.appliedValid=!1)}},Oe.prototype.applyAbsoluteLocal=function(){var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target;r.appliedValid||r.updateAppliedTransform();for(var s=this.bones,o=0,a=s.length;o>1,i=this.indicesArray,r=i.length=0;r>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255},r.rgb888ToColor=function(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255},r.WHITE=new r(1,1,1,1),r.RED=new r(1,0,0,1),r.GREEN=new r(0,1,0,1),r.BLUE=new r(0,0,1,1),r.MAGENTA=new r(1,0,1,1),r);function r(t,e,n,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),this.r=t,this.g=e,this.b=n,this.a=i}t.Color=i;var s=(o.clamp=function(t,e,n){return t=e?t:v.setArraySize(t,e,n)},v.newArray=function(t,e){for(var n=new Array(t),i=0;ithis.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,1=this.values.length},R.prototype.addValue=function(t){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0},R.prototype.getMean=function(){if(this.hasEnoughData()){if(this.dirty){for(var t=0,e=0;e>1)*s;var o=t.bone.skeleton,a=t.deform,h=this.vertices,l=this.bones;if(null!=l){for(var u=0,c=0,d=0;dthis.vertices.length)throw Error("Mesh can't store more than "+this.maxVertices()+" vertices");this.vertices.set(t,0),this.verticesLength=t.length},e.prototype.setIndices=function(t){if(this.dirtyIndices=!0,t.length>this.indices.length)throw Error("Mesh can't store more than "+this.maxIndices()+" indices");this.indices.set(t,0),this.indicesLength=t.length},e.prototype.draw=function(t,e){this.drawWithOffset(t,e,0,0this.mesh.getVertices().length||this.indicesLength+n.length>this.mesh.getIndices().length)&&this.flush();var i=this.mesh.numVertices();this.mesh.getVertices().set(e,this.verticesLength),this.verticesLength+=e.length,this.mesh.setVerticesLength(this.verticesLength);for(var r=this.mesh.getIndices(),s=this.indicesLength,o=0;o 0.");null===r&&(r=this.color);var o=2*te.MathUtils.PI/s,a=Math.cos(o),h=Math.sin(o),l=i,u=0;if(t){for(this.check(ne.Filled,3*s+3),s--,d=0;d>1))-2],w=d[p-1],g=0,v=p;g>1,d.numFloats=d.numVertices*E,d.numFloats>d.vertices.length&&(d.vertices=this.vertices=he.Utils.newFloatArray(d.numFloats)),S.computeWorldVertices(b,0,S.worldVerticesLength,d.vertices,0,E),p=S.triangles,A=S.region.renderObject.texture,f=S.uvs,v=S.color}if(null!=A){var I=b.color,C=this.tempColor;C.r=m.r*I.r*v.r,C.g=m.g*I.g*v.g,C.b=m.b*I.b*v.b,C.a=m.a*I.a*v.a,s&&(C.r*=C.a,C.g*=C.a,C.b*=C.a);var P=this.tempColor2;null==b.darkColor?P.set(0,0,0,1):(s?(P.r=b.darkColor.r*C.a,P.g=b.darkColor.g*C.a,P.b=b.darkColor.b*C.a):P.setFromColor(b.darkColor),P.a=s?1:0);var L=b.data.blendMode;if(L!=a&&(a=L,t.setBlendMode(le.WebGLBlendModeConverter.getSourceGLBlendMode(a,s),le.WebGLBlendModeConverter.getDestGLBlendMode(a))),r.isClipping()){r.clipTriangles(d.vertices,d.numFloats,p,p.length,f,C,P,o);var _=new Float32Array(r.clippedVertices),k=r.clippedTriangles;if(null!=this.vertexEffect){var F=this.vertexEffect,O=_;if(o)for(var V=0,D=_.length;V>16&255)/255,r=(t>>8&255)/255,s=(255&t)/255,o=16777215>>24)/255:null,a=this.skeleton;return!e||(n=this.findSlot(e))&&(a=n),a.color.r=i,a.color.g=r,a.color.b=s,null!==o&&(a.color.a=o),this},setSkeletonFromJSON:function(t,e,n,i){return this.setSkeleton(t,e,n,i)},setSkeleton:function(t,e,n,i){this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications());var r=this.plugin.createSkeleton(t,i);this.skeletonData=r.skeletonData,this.preMultipliedAlpha=r.preMultipliedAlpha;var s=r.skeleton;return s.setSkin(),s.setToSetupPose(),this.skeleton=s,r=this.plugin.createAnimationState(s),this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications()),this.state=r.state,this.stateData=r.stateData,this.state.addListener({event:this.onEvent.bind(this),complete:this.onComplete.bind(this),start:this.onStart.bind(this),end:this.onEnd.bind(this),dispose:this.onDispose.bind(this),interrupted:this.onInterrupted.bind(this)}),e&&this.setAnimation(0,e,n),this.root=this.getRootBone(),this.root&&(this.root.rotation=g(d(this.rotation))+90),this.state.apply(s),s.updateCache(),this.updateSize()},onComplete:function(t){this.emit(v.COMPLETE,t)},onDispose:function(t){this.emit(v.DISPOSE,t)},onEnd:function(t){this.emit(v.END,t)},onEvent:function(t,e){this.emit(v.EVENT,t,e)},onInterrupted:function(t){this.emit(v.INTERRUPTED,t)},onStart:function(t){this.emit(v.START,t)},refresh:function(){return this.root&&(this.root.rotation=g(d(this.rotation))+90),this.updateSize(),this.skeleton.updateCache(),this},setSize:function(t,e,n,i){var r=this.skeleton;return void 0===t&&(t=r.data.width),void 0===e&&(e=r.data.height),void 0===n&&(n=0),void 0===i&&(i=0),this.width=t,this.height=e,this.displayOriginX=r.x-n,this.displayOriginY=r.y-i,this},setOffset:function(t,e){var n=this.skeleton;return void 0===t&&(t=0),void 0===e&&(e=0),this.displayOriginX=n.x-t,this.displayOriginY=n.y-e,this},updateSize:function(){var t=this.skeleton,e=this.plugin.renderer.height,n=this.scaleX,i=this.scaleY;t.x=this.x,t.y=e-this.y,t.scaleX=1,t.scaleY=1,t.updateWorldTransform();var r=this.getBounds();return this.width=r.size.x,this.height=r.size.y,this.displayOriginX=this.x-r.offset.x,this.displayOriginY=this.y-(e-(this.height+r.offset.y)),t.scaleX=n,t.scaleY=i,t.updateWorldTransform(),this},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,this.refresh()}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,this.refresh()}},getBoneList:function(){var t=[],e=this.skeletonData;if(e)for(var n=0;nMath.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},function(t,e,i){var n=i(2);t.exports=function(t){return t*n.RAD_TO_DEG}},function(t,e){t.exports=function(t,e,i){var n=typeof t;return t&&"number"!=n&&"string"!=n&&t.hasOwnProperty(e)&&void 0!==t[e]?t[e]:i}},function(t,e,i){var n=i(0),r=i(25),s=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=r.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=s},function(t,e){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}},function(t,e,i){var n=i(23),r=i(56);t.exports=function(t,e){if(void 0===e&&(e=90),!n(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=r(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=r(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;i=t.length)){for(var i=t.length-1,n=t[e],r=e;r=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},function(t,e){t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},function(t,e,i){var u=i(8),c=function(){var t,e,i,n,r,s,a=arguments[0]||{},o=1,h=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[1]||{},o=2),h===o&&(a=this,--o);os[0]&&(e=1),s[8]>s[3*e+e]&&(e=2),i=o[e],n=o[i],r=Math.sqrt(s[3*e+e]-s[3*i+i]-s[3*n+n]+1),h[e]=.5*r,r=.5/r,h[i]=(s[3*i+e]+s[3*e+i])*r,h[n]=(s[3*n+e]+s[3*e+n])*r,this.x=h[0],this.y=h[1],this.z=h[2],this.w=(s[3*n+i]-s[3*i+n])*r),this}});t.exports=f},function(t,e,i){var r=i(26),s=i(45);t.exports=function(t,e){var i=void 0===t?s():r({},t);if(e)for(var n in e)void 0!==e[n]&&(i[n]=e[n]);return i}},function(t,e){t.exports=function(t,e,i,n,r,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===r&&(r=0),void 0===s&&(s=!1),{responseType:t,async:e,user:i,password:n,timeout:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:s}}},function(t,e){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}}},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e){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}}},function(t,e){var i={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=i},function(t,e,i){var n=i(2),r=i(51),h=i(40),s=i(29),a=i(30),l=i(1),o={_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,0===(this._scaleY=t)?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){0===(this._scaleX=t)?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){0===(this._scaleY=t)?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return a(this._rotation*n.RAD_TO_DEG)},set:function(t){this.rotation=a(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=s(t)}},setPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.z=i,this.w=n,this},setRandomPosition:function(t,e,i,n){return 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),this.x=t+Math.random()*i,this.y=e+Math.random()*n,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 r),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t,e){void 0===t&&(t=new r),void 0===e&&(e=new r);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,n){i=i||new l;var r=(n=n||this.scene.sys.cameras.main).scrollX,s=n.scrollY,a=t+r*this.scrollFactorX-r,o=e+s*this.scrollFactorY-s;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(a,o,i):h(a,o,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=o},function(t,e,i){var n=i(0),s=i(2),c=i(1),r=new n({initialize:function(t,e,i,n,r,s){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=1),void 0===r&&(r=0),void 0===s&&(s=0),this.matrix=new Float32Array([t,e,i,n,r,s,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0}},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],n=t[2],r=t[3];return e||i?0e.length&&(s=e.length),i?(n=e[s-1][i],(r=e[s][i])-t<=t-n?e[s]:e[s-1]):(n=e[s-1],(r=e[s])-t<=t-n?r:n)}},function(t,e){t.exports=function(t){for(var e=t.length-1;0=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(e>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return 2.3283064365386963e-10*((this.n=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;e= 0.");if(null==e)throw new Error("name cannot be null.");this.index=t,this.name=e,this.parent=i}function Ee(t,e){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.mix=t.mix,this.softness=t.softness,this.bendDirection=t.bendDirection,this.compress=t.compress,this.stretch=t.stretch,this.bones=new Array;for(var i=0;i= 0.");if(null==e)throw new Error("name cannot be null.");if(null==i)throw new Error("boneData cannot be null.");this.index=t,this.name=e,this.boneData=i}function ke(t,e){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new V.Vector2,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.rotateMix=t.rotateMix,this.translateMix=t.translateMix,this.scaleMix=t.scaleMix,this.shearMix=t.shearMix,this.bones=new Array;for(var i=0;i>>1;;){if(t[(s+1)*i]<=e?n=s+1:r=s,n==r)return(n+1)*i;s=n+r>>>1}},r.linearSearch=function(t,e,i){for(var n=0,r=t.length-i;n<=r;n+=i)if(t[n]>e)return n;return-1},r);function r(t,e,i){if(null==t)throw new Error("name cannot be null.");if(null==e)throw new Error("timelines cannot be null.");this.name=t,this.timelines=e,this.timelineIds=[];for(var n=0;n 0: "+t);this.curves=U.Utils.newFloatArray((t-1)*M.BEZIER_SIZE)}U.CurveTimeline=s;var a,o=(ve(v,a=s),v.prototype.getPropertyId=function(){return(i.rotate<<24)+this.boneIndex},v.prototype.setFrame=function(t,e,i){t<<=1,this.frames[t]=e,this.frames[t+v.ROTATION]=i},v.prototype.apply=function(t,e,i,n,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(i=o[o.length-v.ENTRIES]){var u=o[o.length+v.PREV_ROTATION];switch(s){case X.setup:h.rotation=h.data.rotation+u*r;break;case X.first:case X.replace:u+=h.data.rotation-h.rotation,u-=360*(16384-(16384.499999999996-u/360|0));case X.add:h.rotation+=u*r}}else{var c=z.binarySearch(o,i,v.ENTRIES),f=o[c+v.PREV_ROTATION],d=o[c],p=this.getCurvePercent((c>>1)-1,1-(i-d)/(o[c+v.PREV_TIME]-d)),m=f+((m=o[c+v.ROTATION]-f)-360*(16384-(16384.499999999996-m/360|0)))*p;switch(s){case X.setup:h.rotation=h.data.rotation+(m-360*(16384-(16384.499999999996-m/360|0)))*r;break;case X.first:case X.replace:m+=h.data.rotation-h.rotation;case X.add:h.rotation+=(m-360*(16384-(16384.499999999996-m/360|0)))*r}}},v.ENTRIES=2,v.PREV_TIME=-2,v.PREV_ROTATION=-1,v.ROTATION=1,v);function v(t){var e=a.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t<<1),e}U.RotateTimeline=o;var h,l=(ve(p,h=s),p.prototype.getPropertyId=function(){return(i.translate<<24)+this.boneIndex},p.prototype.setFrame=function(t,e,i,n){t*=p.ENTRIES,this.frames[t]=e,this.frames[t+p.X]=i,this.frames[t+p.Y]=n},p.prototype.apply=function(t,e,i,n,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(i=o[o.length-p.ENTRIES]?(f=o[o.length+p.PREV_X],d=o[o.length+p.PREV_Y]):(f=o[(l=z.binarySearch(o,i,p.ENTRIES))+p.PREV_X],d=o[l+p.PREV_Y],u=o[l],c=this.getCurvePercent(l/p.ENTRIES-1,1-(i-u)/(o[l+p.PREV_TIME]-u)),f+=(o[l+p.X]-f)*c,d+=(o[l+p.Y]-d)*c),s){case X.setup:h.x=h.data.x+f*r,h.y=h.data.y+d*r;break;case X.first:case X.replace:h.x+=(h.data.x+f-h.x)*r,h.y+=(h.data.y+d-h.y)*r;break;case X.add:h.x+=f*r,h.y+=d*r}}},p.ENTRIES=3,p.PREV_TIME=-3,p.PREV_X=-2,p.PREV_Y=-1,p.X=1,p.Y=2,p);function p(t){var e=h.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t*p.ENTRIES),e}U.TranslateTimeline=l;var u,c=(ve(x,u=l),x.prototype.getPropertyId=function(){return(i.scale<<24)+this.boneIndex},x.prototype.apply=function(t,e,i,n,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(i=o[o.length-x.ENTRIES]?(f=o[o.length+x.PREV_X]*h.data.scaleX,o[o.length+x.PREV_Y]*h.data.scaleY):(f=o[(l=z.binarySearch(o,i,x.ENTRIES))+x.PREV_X],d=o[l+x.PREV_Y],u=o[l],c=this.getCurvePercent(l/x.ENTRIES-1,1-(i-u)/(o[l+x.PREV_TIME]-u)),f=(f+(o[l+x.X]-f)*c)*h.data.scaleX,(d+(o[l+x.Y]-d)*c)*h.data.scaleY),1==r)s==X.add?(h.scaleX+=f-h.data.scaleX,h.scaleY+=d-h.data.scaleY):(h.scaleX=f,h.scaleY=d);else{var p=0,m=0;if(a==g.mixOut)switch(s){case X.setup:p=h.data.scaleX,m=h.data.scaleY,h.scaleX=p+(Math.abs(f)*U.MathUtils.signum(p)-p)*r,h.scaleY=m+(Math.abs(d)*U.MathUtils.signum(m)-m)*r;break;case X.first:case X.replace:p=h.scaleX,m=h.scaleY,h.scaleX=p+(Math.abs(f)*U.MathUtils.signum(p)-p)*r,h.scaleY=m+(Math.abs(d)*U.MathUtils.signum(m)-m)*r;break;case X.add:p=h.scaleX,m=h.scaleY,h.scaleX=p+(Math.abs(f)*U.MathUtils.signum(p)-h.data.scaleX)*r,h.scaleY=m+(Math.abs(d)*U.MathUtils.signum(m)-h.data.scaleY)*r}else switch(s){case X.setup:p=Math.abs(h.data.scaleX)*U.MathUtils.signum(f),m=Math.abs(h.data.scaleY)*U.MathUtils.signum(d),h.scaleX=p+(f-p)*r,h.scaleY=m+(d-m)*r;break;case X.first:case X.replace:p=Math.abs(h.scaleX)*U.MathUtils.signum(f),m=Math.abs(h.scaleY)*U.MathUtils.signum(d),h.scaleX=p+(f-p)*r,h.scaleY=m+(d-m)*r;break;case X.add:p=U.MathUtils.signum(f),m=U.MathUtils.signum(d),h.scaleX=Math.abs(h.scaleX)*p+(f-Math.abs(h.data.scaleX)*p)*r,h.scaleY=Math.abs(h.scaleY)*m+(d-Math.abs(h.data.scaleY)*m)*r}}}},x);function x(t){return u.call(this,t)||this}U.ScaleTimeline=c;var f,d=(ve(m,f=l),m.prototype.getPropertyId=function(){return(i.shear<<24)+this.boneIndex},m.prototype.apply=function(t,e,i,n,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(i=o[o.length-m.ENTRIES]?(f=o[o.length+m.PREV_X],d=o[o.length+m.PREV_Y]):(f=o[(l=z.binarySearch(o,i,m.ENTRIES))+m.PREV_X],d=o[l+m.PREV_Y],u=o[l],c=this.getCurvePercent(l/m.ENTRIES-1,1-(i-u)/(o[l+m.PREV_TIME]-u)),f+=(o[l+m.X]-f)*c,d+=(o[l+m.Y]-d)*c),s){case X.setup:h.shearX=h.data.shearX+f*r,h.shearY=h.data.shearY+d*r;break;case X.first:case X.replace:h.shearX+=(h.data.shearX+f-h.shearX)*r,h.shearY+=(h.data.shearY+d-h.shearY)*r;break;case X.add:h.shearX+=f*r,h.shearY+=d*r}}},m);function m(t){return f.call(this,t)||this}U.ShearTimeline=d;var y,w=(ve(T,y=s),T.prototype.getPropertyId=function(){return(i.color<<24)+this.slotIndex},T.prototype.setFrame=function(t,e,i,n,r,s){t*=T.ENTRIES,this.frames[t]=e,this.frames[t+T.R]=i,this.frames[t+T.G]=n,this.frames[t+T.B]=r,this.frames[t+T.A]=s},T.prototype.apply=function(t,e,i,n,r,s,a){var o=t.slots[this.slotIndex];if(o.bone.active){var h=this.frames;if(i=h[h.length-T.ENTRIES]?(m=h[(c=h.length)+T.PREV_R],g=h[c+T.PREV_G],v=h[c+T.PREV_B],M=h[c+T.PREV_A]):(m=h[(f=z.binarySearch(h,i,T.ENTRIES))+T.PREV_R],g=h[f+T.PREV_G],v=h[f+T.PREV_B],M=h[f+T.PREV_A],d=h[f],p=this.getCurvePercent(f/T.ENTRIES-1,1-(i-d)/(h[f+T.PREV_TIME]-d)),m+=(h[f+T.R]-m)*p,g+=(h[f+T.G]-g)*p,v+=(h[f+T.B]-v)*p,M+=(h[f+T.A]-M)*p),1==r?o.color.set(m,g,v,M):(l=o.color,s==X.setup&&l.setFromColor(o.data.color),l.add((m-l.r)*r,(g-l.g)*r,(v-l.b)*r,(M-l.a)*r))}}},T.ENTRIES=5,T.PREV_TIME=-5,T.PREV_R=-4,T.PREV_G=-3,T.PREV_B=-2,T.PREV_A=-1,T.R=1,T.G=2,T.B=3,T.A=4,T);function T(t){var e=y.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t*T.ENTRIES),e}U.ColorTimeline=w;var E,A=(ve(b,E=s),b.prototype.getPropertyId=function(){return(i.twoColor<<24)+this.slotIndex},b.prototype.setFrame=function(t,e,i,n,r,s,a,o,h){t*=b.ENTRIES,this.frames[t]=e,this.frames[t+b.R]=i,this.frames[t+b.G]=n,this.frames[t+b.B]=r,this.frames[t+b.A]=s,this.frames[t+b.R2]=a,this.frames[t+b.G2]=o,this.frames[t+b.B2]=h},b.prototype.apply=function(t,e,i,n,r,s,a){var o=t.slots[this.slotIndex];if(o.bone.active){var h=this.frames;if(i=h[h.length-b.ENTRIES]?(v=h[(d=h.length)+b.PREV_R],M=h[d+b.PREV_G],x=h[d+b.PREV_B],y=h[d+b.PREV_A],w=h[d+b.PREV_R2],T=h[d+b.PREV_G2],E=h[d+b.PREV_B2]):(v=h[(p=z.binarySearch(h,i,b.ENTRIES))+b.PREV_R],M=h[p+b.PREV_G],x=h[p+b.PREV_B],y=h[p+b.PREV_A],w=h[p+b.PREV_R2],T=h[p+b.PREV_G2],E=h[p+b.PREV_B2],m=h[p],g=this.getCurvePercent(p/b.ENTRIES-1,1-(i-m)/(h[p+b.PREV_TIME]-m)),v+=(h[p+b.R]-v)*g,M+=(h[p+b.G]-M)*g,x+=(h[p+b.B]-x)*g,y+=(h[p+b.A]-y)*g,w+=(h[p+b.R2]-w)*g,T+=(h[p+b.G2]-T)*g,E+=(h[p+b.B2]-E)*g),1==r?(o.color.set(v,M,x,y),o.darkColor.set(w,T,E,1)):(l=o.color,u=o.darkColor,s==X.setup&&(l.setFromColor(o.data.color),u.setFromColor(o.data.darkColor)),l.add((v-l.r)*r,(M-l.g)*r,(x-l.b)*r,(y-l.a)*r),u.add((w-u.r)*r,(T-u.g)*r,(E-u.b)*r,0))}}},b.ENTRIES=8,b.PREV_TIME=-8,b.PREV_R=-7,b.PREV_G=-6,b.PREV_B=-5,b.PREV_A=-4,b.PREV_R2=-3,b.PREV_G2=-2,b.PREV_B2=-1,b.R=1,b.G=2,b.B=3,b.A=4,b.R2=5,b.G2=6,b.B2=7,b);function b(t){var e=E.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t*b.ENTRIES),e}U.TwoColorTimeline=A;var R=(S.prototype.getPropertyId=function(){return(i.attachment<<24)+this.slotIndex},S.prototype.getFrameCount=function(){return this.frames.length},S.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.attachmentNames[t]=i},S.prototype.apply=function(t,e,i,n,r,s,a){var o,h,l,u=t.slots[this.slotIndex];u.bone.active&&(a!=g.mixOut?i<(o=this.frames)[0]?s!=X.setup&&s!=X.first||this.setAttachment(t,u,u.data.attachmentName):(h=0,h=i>=o[o.length-1]?o.length-1:z.binarySearch(o,i,1)-1,l=this.attachmentNames[h],t.slots[this.slotIndex].setAttachment(null==l?null:t.getAttachment(this.slotIndex,l))):s==X.setup&&this.setAttachment(t,u,u.data.attachmentName))},S.prototype.setAttachment=function(t,e,i){e.attachment=null==i?null:t.getAttachment(this.slotIndex,i)},S);function S(t){this.frames=U.Utils.newFloatArray(t),this.attachmentNames=new Array(t)}U.AttachmentTimeline=R;var I,C=null,P=(ve(_,I=s),_.prototype.getPropertyId=function(){return(i.deform<<27)+ +this.attachment.id+this.slotIndex},_.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.frameVertices[t]=i},_.prototype.apply=function(t,e,i,n,r,s,a){var o=t.slots[this.slotIndex];if(o.bone.active){var h=o.getAttachment();if(h instanceof U.VertexAttachment&&h.deformAttachment==this.attachment){var l=o.deform;0==l.length&&(s=X.setup);var u=this.frameVertices,c=u[0].length,f=this.frames;if(i=f[f.length-1]){var M=u[f.length-1];if(1==r)if(s==X.add)if(null==(d=h).bones)for(var m=d.vertices,x=0;x=o[h-1])return;if(!(i=o[l];l++)n.push(this.events[l])}}},L);function L(t){this.frames=U.Utils.newFloatArray(t),this.events=new Array(t)}U.EventTimeline=F;var O=(k.prototype.getPropertyId=function(){return i.drawOrder<<24},k.prototype.getFrameCount=function(){return this.frames.length},k.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.drawOrders[t]=i},k.prototype.apply=function(t,e,i,n,r,s,a){var o=t.drawOrder,h=t.slots;if(a!=g.mixOut){var l=this.frames;if(i=l[l.length-1]?l.length-1:z.binarySearch(l,i)-1,c=this.drawOrders[u];if(null==c)U.Utils.arrayCopy(h,0,o,0,h.length);else for(var f=0,d=c.length;f=f[f.length-V.ENTRIES]?s==X.setup?(d.mix=d.data.mix+(f[f.length+V.PREV_MIX]-d.data.mix)*r,d.softness=d.data.softness+(f[f.length+V.PREV_SOFTNESS]-d.data.softness)*r,a==g.mixOut?(d.bendDirection=d.data.bendDirection,d.compress=d.data.compress,d.stretch=d.data.stretch):(d.bendDirection=f[f.length+V.PREV_BEND_DIRECTION],d.compress=0!=f[f.length+V.PREV_COMPRESS],d.stretch=0!=f[f.length+V.PREV_STRETCH])):(d.mix+=(f[f.length+V.PREV_MIX]-d.mix)*r,d.softness+=(f[f.length+V.PREV_SOFTNESS]-d.softness)*r,a==g.mixIn&&(d.bendDirection=f[f.length+V.PREV_BEND_DIRECTION],d.compress=0!=f[f.length+V.PREV_COMPRESS],d.stretch=0!=f[f.length+V.PREV_STRETCH])):(h=f[(o=z.binarySearch(f,i,V.ENTRIES))+V.PREV_MIX],l=f[o+V.PREV_SOFTNESS],u=f[o],c=this.getCurvePercent(o/V.ENTRIES-1,1-(i-u)/(f[o+V.PREV_TIME]-u)),s==X.setup?(d.mix=d.data.mix+(h+(f[o+V.MIX]-h)*c-d.data.mix)*r,d.softness=d.data.softness+(l+(f[o+V.SOFTNESS]-l)*c-d.data.softness)*r,a==g.mixOut?(d.bendDirection=d.data.bendDirection,d.compress=d.data.compress,d.stretch=d.data.stretch):(d.bendDirection=f[o+V.PREV_BEND_DIRECTION],d.compress=0!=f[o+V.PREV_COMPRESS],d.stretch=0!=f[o+V.PREV_STRETCH])):(d.mix+=(h+(f[o+V.MIX]-h)*c-d.mix)*r,d.softness+=(l+(f[o+V.SOFTNESS]-l)*c-d.softness)*r,a==g.mixIn&&(d.bendDirection=f[o+V.PREV_BEND_DIRECTION],d.compress=0!=f[o+V.PREV_COMPRESS],d.stretch=0!=f[o+V.PREV_STRETCH])))},V.ENTRIES=6,V.PREV_TIME=-6,V.PREV_MIX=-5,V.PREV_SOFTNESS=-4,V.PREV_BEND_DIRECTION=-3,V.PREV_COMPRESS=-2,V.PREV_STRETCH=-1,V.MIX=1,V.SOFTNESS=2,V.BEND_DIRECTION=3,V.COMPRESS=4,V.STRETCH=5,V);function V(t){var e=N.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t*V.ENTRIES),e}U.IkConstraintTimeline=D;var B,Y=(ve(W,B=s),W.prototype.getPropertyId=function(){return(i.transformConstraint<<24)+this.transformConstraintIndex},W.prototype.setFrame=function(t,e,i,n,r,s){t*=W.ENTRIES,this.frames[t]=e,this.frames[t+W.ROTATE]=i,this.frames[t+W.TRANSLATE]=n,this.frames[t+W.SCALE]=r,this.frames[t+W.SHEAR]=s},W.prototype.apply=function(t,e,i,n,r,s,a){var o=this.frames,h=t.transformConstraints[this.transformConstraintIndex];if(h.active)if(i=o[o.length-W.ENTRIES]?(p=o[(u=o.length)+W.PREV_ROTATE],m=o[u+W.PREV_TRANSLATE],g=o[u+W.PREV_SCALE],v=o[u+W.PREV_SHEAR]):(p=o[(c=z.binarySearch(o,i,W.ENTRIES))+W.PREV_ROTATE],m=o[c+W.PREV_TRANSLATE],g=o[c+W.PREV_SCALE],v=o[c+W.PREV_SHEAR],f=o[c],d=this.getCurvePercent(c/W.ENTRIES-1,1-(i-f)/(o[c+W.PREV_TIME]-f)),p+=(o[c+W.ROTATE]-p)*d,m+=(o[c+W.TRANSLATE]-m)*d,g+=(o[c+W.SCALE]-g)*d,v+=(o[c+W.SHEAR]-v)*d),s==X.setup?(l=h.data,h.rotateMix=l.rotateMix+(p-l.rotateMix)*r,h.translateMix=l.translateMix+(m-l.translateMix)*r,h.scaleMix=l.scaleMix+(g-l.scaleMix)*r,h.shearMix=l.shearMix+(v-l.shearMix)*r):(h.rotateMix+=(p-h.rotateMix)*r,h.translateMix+=(m-h.translateMix)*r,h.scaleMix+=(g-h.scaleMix)*r,h.shearMix+=(v-h.shearMix)*r)}},W.ENTRIES=5,W.PREV_TIME=-5,W.PREV_ROTATE=-4,W.PREV_TRANSLATE=-3,W.PREV_SCALE=-2,W.PREV_SHEAR=-1,W.ROTATE=1,W.TRANSLATE=2,W.SCALE=3,W.SHEAR=4,W);function W(t){var e=B.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t*W.ENTRIES),e}U.TransformConstraintTimeline=Y;var G,H=(ve(q,G=s),q.prototype.getPropertyId=function(){return(i.pathConstraintPosition<<24)+this.pathConstraintIndex},q.prototype.setFrame=function(t,e,i){t*=q.ENTRIES,this.frames[t]=e,this.frames[t+q.VALUE]=i},q.prototype.apply=function(t,e,i,n,r,s,a){var o=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(i=o[o.length-q.ENTRIES]?f=o[o.length+q.PREV_VALUE]:(f=o[(l=z.binarySearch(o,i,q.ENTRIES))+q.PREV_VALUE],u=o[l],c=this.getCurvePercent(l/q.ENTRIES-1,1-(i-u)/(o[l+q.PREV_TIME]-u)),f+=(o[l+q.VALUE]-f)*c),s==X.setup?h.position=h.data.position+(f-h.data.position)*r:h.position+=(f-h.position)*r}},q.ENTRIES=2,q.PREV_TIME=-2,q.PREV_VALUE=-1,q.VALUE=1,q);function q(t){var e=G.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t*q.ENTRIES),e}U.PathConstraintPositionTimeline=H;var j,K=(ve(Q,j=H),Q.prototype.getPropertyId=function(){return(i.pathConstraintSpacing<<24)+this.pathConstraintIndex},Q.prototype.apply=function(t,e,i,n,r,s,a){var o=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(i=o[o.length-Q.ENTRIES]?f=o[o.length+Q.PREV_VALUE]:(f=o[(l=z.binarySearch(o,i,Q.ENTRIES))+Q.PREV_VALUE],u=o[l],c=this.getCurvePercent(l/Q.ENTRIES-1,1-(i-u)/(o[l+Q.PREV_TIME]-u)),f+=(o[l+Q.VALUE]-f)*c),s==X.setup?h.spacing=h.data.spacing+(f-h.data.spacing)*r:h.spacing+=(f-h.spacing)*r}},Q);function Q(t){return j.call(this,t)||this}U.PathConstraintSpacingTimeline=K;var Z,J=(ve($,Z=s),$.prototype.getPropertyId=function(){return(i.pathConstraintMix<<24)+this.pathConstraintIndex},$.prototype.setFrame=function(t,e,i,n){t*=$.ENTRIES,this.frames[t]=e,this.frames[t+$.ROTATE]=i,this.frames[t+$.TRANSLATE]=n},$.prototype.apply=function(t,e,i,n,r,s,a){var o=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(i=o[o.length-$.ENTRIES]?(f=o[o.length+$.PREV_ROTATE],d=o[o.length+$.PREV_TRANSLATE]):(f=o[(l=z.binarySearch(o,i,$.ENTRIES))+$.PREV_ROTATE],d=o[l+$.PREV_TRANSLATE],u=o[l],c=this.getCurvePercent(l/$.ENTRIES-1,1-(i-u)/(o[l+$.PREV_TIME]-u)),f+=(o[l+$.ROTATE]-f)*c,d+=(o[l+$.TRANSLATE]-d)*c),s==X.setup?(h.rotateMix=h.data.rotateMix+(f-h.data.rotateMix)*r,h.translateMix=h.data.translateMix+(d-h.data.translateMix)*r):(h.rotateMix+=(f-h.rotateMix)*r,h.translateMix+=(d-h.translateMix)*r)}},$.ENTRIES=3,$.PREV_TIME=-3,$.PREV_ROTATE=-2,$.PREV_TRANSLATE=-1,$.ROTATE=1,$.TRANSLATE=2,$);function $(t){var e=Z.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t*$.ENTRIES),e}U.PathConstraintMixTimeline=J}(me=me||{}),function(R){var t=(S.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,i=0,n=e.length;i=r.trackEnd&&null==r.mixingFrom){e[i]=null,this.queue.end(r),this.disposeNext(r);continue}if(null!=r.mixingFrom&&this.updateMixingFrom(r,t)){var h=r.mixingFrom;for((r.mixingFrom=null)!=h&&(h.mixingTo=null);null!=h;)this.queue.end(h),h=h.mixingFrom}r.trackTime+=s}}this.queue.drain()},S.prototype.updateMixingFrom=function(t,e){var i=t.mixingFrom;if(null==i)return!0;var n=this.updateMixingFrom(i,e);return i.animationLast=i.nextAnimationLast,i.trackLast=i.nextTrackLast,0=t.mixDuration?(0!=i.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=i.mixingFrom,null!=i.mixingFrom&&(i.mixingFrom.mixingTo=t),t.interruptAlpha=i.interruptAlpha,this.queue.end(i)),n):(i.trackTime+=e*i.timeScale,t.mixTime+=e,!1)},S.prototype.apply=function(t){if(null==t)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var e=this.events,i=this.tracks,n=!1,r=0,s=i.length;r=a.trackEnd&&null==a.next&&(h=0);var l=a.animationLast,u=a.getAnimationTime(),c=a.animation.timelines.length,f=a.animation.timelines;if(0==r&&1==h||o==R.MixBlend.add)for(var d=0;d=s[s.length-1]?s.length-1:R.Animation.binarySearch(s,i)-1,this.setAttachment(e,o,t.attachmentNames[a],r)),o.attachmentState<=this.unkeyedState&&(o.attachmentState=this.unkeyedState+S.SETUP))},S.prototype.setAttachment=function(t,e,i,n){e.attachment=null==i?null:t.getAttachment(e.data.index,i),n&&(e.attachmentState=this.unkeyedState+S.CURRENT)},S.prototype.applyRotateTimeline=function(t,e,i,n,r,s,a,o){if(o&&(s[a]=0),1!=n){var h=t,l=h.frames,u=e.bones[h.boneIndex];if(u.active){var c=0,f=0;if(i=l[l.length-R.RotateTimeline.ENTRIES]?f=u.data.rotation+l[l.length+R.RotateTimeline.PREV_ROTATION]:(p=l[(d=R.Animation.binarySearch(l,i,R.RotateTimeline.ENTRIES))+R.RotateTimeline.PREV_ROTATION],m=l[d],g=h.getCurvePercent((d>>1)-1,1-(i-m)/(l[d+R.RotateTimeline.PREV_TIME]-m)),f=l[d+R.RotateTimeline.ROTATION]-p,f=p+(f-=360*(16384-(16384.499999999996-f/360|0)))*g+u.data.rotation,f-=360*(16384-(16384.499999999996-f/360|0)))}var v,M,x,y,w=0,T=f-c;0==(T-=360*(16384-(16384.499999999996-T/360|0)))?w=s[a]:(M=v=0,M=o?(v=0,T):(v=s[a],s[a+1]),x=0n||this.queue.event(t,l)}for((t.loop?0==r||s>t.trackTime%r:n<=e&&t.animationLast=this.tracks.length)){var e=this.tracks[t];if(null!=e){this.queue.end(e),this.disposeNext(e);for(var i=e;;){var n=i.mixingFrom;if(null==n)break;this.queue.end(n),i.mixingFrom=null,i.mixingTo=null,i=n}this.tracks[e.trackIndex]=null,this.queue.drain()}}},S.prototype.setCurrent=function(t,e,i){var n=this.expandToIndex(t);this.tracks[t]=e,null!=n&&(i&&this.queue.interrupt(n),((e.mixingFrom=n).mixingTo=e).mixTime=0,null!=n.mixingFrom&&0=this.tracks.length?null:this.tracks[t]},S.prototype.addListener=function(t){if(null==t)throw new Error("listener cannot be null.");this.listeners.push(t)},S.prototype.removeListener=function(t){var e=this.listeners.indexOf(t);0<=e&&this.listeners.splice(e,1)},S.prototype.clearListeners=function(){this.listeners.length=0},S.prototype.clearListenerNotifications=function(){this.queue.clear()},S.emptyAnimation=new R.Animation("",[],0),S.SUBSEQUENT=0,S.FIRST=1,S.HOLD_SUBSEQUENT=2,S.HOLD_FIRST=3,S.HOLD_MIX=4,S.SETUP=1,S.CURRENT=2,S);function S(t){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new r(this),this.propertyIDs=new R.IntSet,this.animationsChanged=!1,this.trackEntryPool=new R.Pool(function(){return new e}),this.data=t}R.AnimationState=t;var e=(i.prototype.reset=function(){this.next=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0},i.prototype.getAnimationTime=function(){if(this.loop){var t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)},i.prototype.setAnimationLast=function(t){this.animationLast=t,this.nextAnimationLast=t},i.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},i.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},i);function i(){this.mixBlend=R.MixBlend.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}R.TrackEntry=e;var o,n,r=(s.prototype.start=function(t){this.objects.push(o.start),this.objects.push(t),this.animState.animationsChanged=!0},s.prototype.interrupt=function(t){this.objects.push(o.interrupt),this.objects.push(t)},s.prototype.end=function(t){this.objects.push(o.end),this.objects.push(t),this.animState.animationsChanged=!0},s.prototype.dispose=function(t){this.objects.push(o.dispose),this.objects.push(t)},s.prototype.complete=function(t){this.objects.push(o.complete),this.objects.push(t)},s.prototype.event=function(t,e){this.objects.push(o.event),this.objects.push(t),this.objects.push(e)},s.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var t=this.objects,e=this.animState.listeners,i=0;ij.MathUtils.PI?B-=j.MathUtils.PI2:B<-j.MathUtils.PI&&(B+=j.MathUtils.PI2),B*=e,N=Math.cos(B),D=Math.sin(B),R.a=N*F-D*O,R.b=N*L-D*k,R.c=D*F+N*O,R.d=D*L+N*k),R.appliedValid=!1}}}},be.prototype.computeWorldPositions=function(t,e,i,n,r){var s=this.target,a=this.position,o=this.spaces,h=j.Utils.setArraySize(this.positions,3*e+2),l=null,u=t.closed,c=t.worldVerticesLength,f=c/6,d=be.NONE;if(!t.constantSpeed){var p=t.lengths,m=p[f-=u?1:2];if(n&&(a*=m),r)for(var g=1;g>>1^-(1&i)},e.prototype.readStringRef=function(){var t=this.readInt(!0);return 0==t?null:this.strings[t-1]},e.prototype.readString=function(){var t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;for(var e="",i=0;i>4){case 12:case 13:e+=String.fromCharCode((31&n)<<6|63&this.readByte()),i+=2;break;case 14:e+=String.fromCharCode((15&n)<<12|(63&this.readByte())<<6|63&this.readByte()),i+=3;break;default:e+=String.fromCharCode(n),i++}}return e},e.prototype.readFloat=function(){var t=this.buffer.getFloat32(this.index);return this.index+=4,t},e.prototype.readBoolean=function(){return 0!=this.readByte()},e);function e(t,e,i,n){void 0===e&&(e=new Array),void 0===i&&(i=0),void 0===n&&(n=new DataView(t.buffer)),this.strings=e,this.index=i,this.buffer=n}var V=function(t,e,i,n,r){this.mesh=t,this.skin=e,this.slotIndex=i,this.parent=n,this.inheritDeform=r},u=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),this.bones=t,this.vertices=e}}(me=me||{}),C=me=me||{},Pe.prototype.update=function(t,e){if(null==t)throw new Error("skeleton cannot be null.");var i=this.boundingBoxes,n=this.polygons,r=this.polygonPool,s=t.slots,a=s.length;i.length=0,r.freeAll(n);for(var o=n.length=0;o=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},Pe.prototype.aabbIntersectsSegment=function(t,e,i,n){var r=this.minX,s=this.minY,a=this.maxX,o=this.maxY;if(t<=r&&i<=r||e<=s&&n<=s||a<=t&&a<=i||o<=e&&o<=n)return!1;var h=(n-e)/(i-t),l=h*(r-t)+e;if(st.minX&&this.minYt.minY},Pe.prototype.containsPoint=function(t,e){for(var i=this.polygons,n=0,r=i.length;n>1,V=this.clipOutput,B=K.Utils.setArraySize(l,P+D*d),Y=0;Y<_;Y+=2){var U=V[Y],X=V[Y+1];B[P]=U,B[P+1]=X,B[P+2]=s.r,B[P+3]=s.g,B[P+4]=s.b,B[P+5]=s.a;var z=U-b,W=X-R,G=(F*z+L*W)*N,H=(k*z+O*W)*N,q=1-G-H;B[P+6]=x*G+E*H+S*q,B[P+7]=y*G+A*H+I*q,o&&(B[P+8]=a.r,B[P+9]=a.g,B[P+10]=a.b,B[P+11]=a.a),P+=d}P=u.length;var j=K.Utils.setArraySize(u,P+3*(D-2));for(D--,Y=1;Y>1;o=n.length&&(n.length=t+1),n[t]||(n[t]={}),n[t][e]=i},e.prototype.addSkin=function(t){for(var e=0;e=this.lines.length?null:this.lines[this.index++]},i.prototype.readValue=function(){var t=this.readLine(),e=t.indexOf(":");if(-1==e)throw new Error("Invalid line: "+t);return t.substring(e+1).trim()},i.prototype.readTuple=function(t){var e=this.readLine(),i=e.indexOf(":");if(-1==i)throw new Error("Invalid line: "+e);for(var n=0,r=i+1;n<3;n++){var s=e.indexOf(",",r);if(-1==s)break;t[n]=e.substr(r,s-r).trim(),r=s+1}return t[n]=e.substring(r).trim(),n+1},i);function i(t){this.index=0,this.lines=t.split(/\r\n|\r|\n/)}var m=function(){};d.TextureAtlasPage=m;var n,g=(n=d.TextureRegion,ve(r,n),r);function r(){return null!==n&&n.apply(this,arguments)||this}d.TextureAtlasRegion=g}(me=me||{}),V=me=me||{},ke.prototype.isActive=function(){return this.active},ke.prototype.apply=function(){this.update()},ke.prototype.update=function(){this.data.local?this.data.relative?this.applyRelativeLocal():this.applyAbsoluteLocal():this.data.relative?this.applyRelativeWorld():this.applyAbsoluteWorld()},ke.prototype.applyAbsoluteWorld=function(){for(var t=this.rotateMix,e=this.translateMix,i=this.scaleMix,n=this.shearMix,r=this.target,s=r.a,a=r.b,o=r.c,h=r.d,l=0V.MathUtils.PI?A-=V.MathUtils.PI2:A<-V.MathUtils.PI&&(A+=V.MathUtils.PI2),A*=t,v=Math.cos(A),M=Math.sin(A),R.a=v*m-M*g,R.b=v*w-M*T,R.c=M*m+v*g,R.d=M*w+v*T,S=!0),0!=e&&(x=this.temp,r.localToWorld(x.set(this.data.offsetX,this.data.offsetY)),R.worldX+=(x.x-R.worldX)*e,R.worldY+=(x.y-R.worldY)*e,S=!0),0V.MathUtils.PI?A-=V.MathUtils.PI2:A<-V.MathUtils.PI&&(A+=V.MathUtils.PI2),A=E+(A+c)*n,b=Math.sqrt(w*w+T*T),R.b=Math.cos(A)*b,R.d=Math.sin(A)*b,S=!0),S&&(R.appliedValid=!1)}},ke.prototype.applyRelativeWorld=function(){for(var t=this.rotateMix,e=this.translateMix,i=this.scaleMix,n=this.shearMix,r=this.target,s=r.a,a=r.b,o=r.c,h=r.d,l=0V.MathUtils.PI?y-=V.MathUtils.PI2:y<-V.MathUtils.PI&&(y+=V.MathUtils.PI2),y*=t,v=Math.cos(y),M=Math.sin(y),A.a=v*m-M*g,A.b=v*w-M*T,A.c=M*m+v*g,A.d=M*w+v*T,b=!0),0!=e&&(x=this.temp,r.localToWorld(x.set(this.data.offsetX,this.data.offsetY)),A.worldX+=x.x*e,A.worldY+=x.y*e,b=!0),0V.MathUtils.PI?y-=V.MathUtils.PI2:y<-V.MathUtils.PI&&(y+=V.MathUtils.PI2),w=A.b,T=A.d,y=Math.atan2(T,w)+(y-V.MathUtils.PI/2+c)*n,E=Math.sqrt(w*w+T*T),A.b=Math.cos(y)*E,A.d=Math.sin(y)*E,b=!0),b&&(A.appliedValid=!1)}},ke.prototype.applyAbsoluteLocal=function(){var t=this.rotateMix,e=this.translateMix,i=this.scaleMix,n=this.shearMix,r=this.target;r.appliedValid||r.updateAppliedTransform();for(var s=this.bones,a=0,o=s.length;a>1,n=this.indicesArray,r=n.length=0;r>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255},r.rgb888ToColor=function(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255},r.WHITE=new r(1,1,1,1),r.RED=new r(1,0,0,1),r.GREEN=new r(0,1,0,1),r.BLUE=new r(0,0,1,1),r.MAGENTA=new r(1,0,1,1),r);function r(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.r=t,this.g=e,this.b=i,this.a=n}t.Color=n;var s=(a.clamp=function(t,e,i){return t=e?t:g.setArraySize(t,e,i)},g.newArray=function(t,e){for(var i=new Array(t),n=0;nthis.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,1=this.values.length},R.prototype.addValue=function(t){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0},R.prototype.getMean=function(){if(this.hasEnoughData()){if(this.dirty){for(var t=0,e=0;e>1)*s;var a=t.bone.skeleton,o=t.deform,h=this.vertices,l=this.bones;if(null!=l){for(var u=0,c=0,f=0;fthis.vertices.length)throw Error("Mesh can't store more than "+this.maxVertices()+" vertices");this.vertices.set(t,0),this.verticesLength=t.length},e.prototype.setIndices=function(t){if(this.dirtyIndices=!0,t.length>this.indices.length)throw Error("Mesh can't store more than "+this.maxIndices()+" indices");this.indices.set(t,0),this.indicesLength=t.length},e.prototype.draw=function(t,e){this.drawWithOffset(t,e,0,0this.mesh.getVertices().length||this.indicesLength+i.length>this.mesh.getIndices().length)&&this.flush();var n=this.mesh.numVertices();this.mesh.getVertices().set(e,this.verticesLength),this.verticesLength+=e.length,this.mesh.setVerticesLength(this.verticesLength);for(var r=this.mesh.getIndices(),s=this.indicesLength,a=0;a 0.");null===r&&(r=this.color);var a=2*te.MathUtils.PI/s,o=Math.cos(a),h=Math.sin(a),l=n,u=0;if(t){for(this.check(ie.Filled,3*s+3),s--,f=0;f>1))-2],w=f[p-1],m=0,g=p;m>1,f.numFloats=f.numVertices*T,f.numFloats>f.vertices.length&&(f.vertices=this.vertices=he.Utils.newFloatArray(f.numFloats)),S.computeWorldVertices(E,0,S.worldVerticesLength,f.vertices,0,T),p=S.triangles,b=S.region.renderObject.texture,d=S.uvs,g=S.color}if(null!=b){var I=E.color,C=this.tempColor;C.r=v.r*I.r*g.r,C.g=v.g*I.g*g.g,C.b=v.b*I.b*g.b,C.a=v.a*I.a*g.a,s&&(C.r*=C.a,C.g*=C.a,C.b*=C.a);var P=this.tempColor2;null==E.darkColor?P.set(0,0,0,1):(s?(P.r=E.darkColor.r*C.a,P.g=E.darkColor.g*C.a,P.b=E.darkColor.b*C.a):P.setFromColor(E.darkColor),P.a=s?1:0);var _=E.data.blendMode;if(_!=o&&(o=_,t.setBlendMode(le.WebGLBlendModeConverter.getSourceGLBlendMode(o,s),le.WebGLBlendModeConverter.getDestGLBlendMode(o))),r.isClipping()){r.clipTriangles(f.vertices,f.numFloats,p,p.length,d,C,P,a);var F=new Float32Array(r.clippedVertices),L=r.clippedTriangles;if(null!=this.vertexEffect){var O=this.vertexEffect,k=F;if(a)for(var N=0,D=F.length;N>16&255)/255,r=(t>>8&255)/255,s=(255&t)/255,a=16777215>>24)/255:null,o=this.skeleton;return!e||(i=this.findSlot(e))&&(o=i),o.color.r=n,o.color.g=r,o.color.b=s,null!==a&&(o.color.a=a),this},setSkeletonFromJSON:function(t,e,i,n){return this.setSkeleton(t,e,i,n)},setSkeleton:function(t,e,i,n){this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications());var r=this.plugin.createSkeleton(t,n);this.skeletonData=r.skeletonData,this.preMultipliedAlpha=r.preMultipliedAlpha;var s=r.skeleton;return s.setSkin(),s.setToSetupPose(),this.skeleton=s,r=this.plugin.createAnimationState(s),this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications()),this.state=r.state,this.stateData=r.stateData,this.state.addListener({event:this.onEvent.bind(this),complete:this.onComplete.bind(this),start:this.onStart.bind(this),end:this.onEnd.bind(this),dispose:this.onDispose.bind(this),interrupted:this.onInterrupted.bind(this)}),e&&this.setAnimation(0,e,i),this.root=this.getRootBone(),this.root&&(this.root.rotation=m(f(this.rotation))+90),this.state.apply(s),s.updateCache(),this.updateSize()},onComplete:function(t){this.emit(g.COMPLETE,t)},onDispose:function(t){this.emit(g.DISPOSE,t)},onEnd:function(t){this.emit(g.END,t)},onEvent:function(t,e){this.emit(g.EVENT,t,e)},onInterrupted:function(t){this.emit(g.INTERRUPTED,t)},onStart:function(t){this.emit(g.START,t)},refresh:function(){return this.root&&(this.root.rotation=m(f(this.rotation))+90),this.updateSize(),this.skeleton.updateCache(),this},setSize:function(t,e,i,n){var r=this.skeleton;return void 0===t&&(t=r.data.width),void 0===e&&(e=r.data.height),void 0===i&&(i=0),void 0===n&&(n=0),this.width=t,this.height=e,this.displayOriginX=r.x-i,this.displayOriginY=r.y-n,this},setOffset:function(t,e){var i=this.skeleton;return void 0===t&&(t=0),void 0===e&&(e=0),this.displayOriginX=i.x-t,this.displayOriginY=i.y-e,this},updateSize:function(){var t=this.skeleton,e=this.plugin.renderer.height,i=this.scaleX,n=this.scaleY;t.x=this.x,t.y=e-this.y,t.scaleX=1,t.scaleY=1,t.updateWorldTransform();var r=this.getBounds();return this.width=r.size.x,this.height=r.size.y,this.displayOriginX=this.x-r.offset.x,this.displayOriginY=this.y-(e-(this.height+r.offset.y)),t.scaleX=i,t.scaleY=n,t.updateWorldTransform(),this},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,this.refresh()}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,this.refresh()}},getBoneList:function(){var t=[],e=this.skeletonData;if(e)for(var i=0;i=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var s=Math.ceil((r=e-t.length)/2);t=new Array(1+(r-s)).join(i)+t+new Array(s+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e){t.exports=function(t){return t.reverse()}},function(t,e){t.exports=function(t){for(var e=0;e=t.length)throw new Error("Supplied index out of bounds");return n!==i&&(t.splice(n,1),t.splice(i,0,e)),e}},function(t,e){t.exports=function(t,e){var i,n,r=t.indexOf(e);return-1!==r&&rt.length-1)throw new Error("Index out of bounds");var r=s(t,e);return i&&i.call(n,r),r}},function(t,e,i){var l=i(5);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),l(t,e,i)){var s=i-e,a=t.splice(e,s);if(n)for(var o=0;o=this.nextTick&&this.currentAnim.setFrame(this)}},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),e.setSizeToFrame(),e._originComponent&&(t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin()),e},updateFrame:function(t){var e,i=this.setCurrentFrame(t);this.isPlaying&&(t.setAlpha&&(i.alpha=t.alpha),e=this.currentAnim,i.emit(s.SPRITE_ANIMATION_KEY_UPDATE+e.key,e,t,i),i.emit(s.SPRITE_ANIMATION_UPDATE,e,t,i),3===this._pendingStop&&this._pendingStopValue===t&&this.currentAnim.completeAnimation(this))},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},setYoyo:function(t){return void 0===t&&(t=!1),this._yoyo=t,this.parent},getYoyo:function(){return this._yoyo},destroy:function(){this.animationManager.off(s.REMOVE_ANIMATION,this.remove,this),this.animationManager=null,this.parent=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null}});t.exports=a},function(t,e,i){var n=i(3),r=i(0),s=i(55),a=i(59),o=i(57),m=i(309),g=i(7),h=new r({Extends:s,initialize:function(t,e,i){s.call(this),this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,g(i,"frames",[]),g(i,"defaultTextureKey",null)),this.frameRate=g(i,"frameRate",null),this.duration=g(i,"duration",null),null===this.duration&&null===this.frameRate?(this.frameRate=24,this.duration=this.frameRate/this.frames.length*1e3):this.duration&&null===this.frameRate?this.frameRate=this.frames.length/(this.duration/1e3):this.duration=this.frames.length/this.frameRate*1e3,this.msPerFrame=1e3/this.frameRate,this.skipMissedFrames=g(i,"skipMissedFrames",!0),this.delay=g(i,"delay",0),this.repeat=g(i,"repeat",0),this.repeatDelay=g(i,"repeatDelay",0),this.yoyo=g(i,"yoyo",!1),this.showOnStart=g(i,"showOnStart",!1),this.hideOnComplete=g(i,"hideOnComplete",!1),this.paused=!1,this.manager.on(a.PAUSE_ALL,this.pause,this),this.manager.on(a.RESUME_ALL,this.resume,this)},addFrame:function(t){return this.addFrameAt(this.frames.length,t)},addFrameAt:function(t,e){var i,n,r=this.getFrames(this.manager.textureManager,e);return 0=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo);var i=this.frames[e];0!==e||t.forward||(i=this.getLastFrame()),t.updateFrame(i)},getFrameByProgress:function(t){return t=n(t,0,1),o(t,this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t._yoyo?this.handleYoyoFrame(t,!1):0=e&&t.y<=i&&t.y+t.height>=i)}},function(t,e,i){var a=i(60),o=i(61);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&0this.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},function(t,e,i){var n=i(12);t.exports=function(t,e,i){return void 0===i&&(i=new n),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},function(t,e,i){var f=i(318),d=i(12);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&0>16)+(65280&t)+((255&t)<<16)}},function(t,e,i){var n=i(4),r=i(4),n=i(352),r=i(353);t.exports={renderWebGL:n,renderCanvas:r}},function(t,e){t.exports=function(t,e,i,n,r){var s=e.list;if(0!==s.length){var a=e.localTransform;r?(a.loadIdentity(),a.multiply(r),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);var o=-1!==e.blendMode;o||t.setBlendMode(0);for(var h=e.alpha,l=e.scrollFactorX,u=e.scrollFactorY,c=s,f=s.length,d=0;d + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Clamp = __webpack_require__(/*! ../math/Clamp */ "../../../src/math/Clamp.js"); +var Class = __webpack_require__(/*! ../utils/Class */ "../../../src/utils/Class.js"); +var EventEmitter = __webpack_require__(/*! eventemitter3 */ "../../../node_modules/eventemitter3/index.js"); +var Events = __webpack_require__(/*! ./events */ "../../../src/animations/events/index.js"); +var FindClosestInSorted = __webpack_require__(/*! ../utils/array/FindClosestInSorted */ "../../../src/utils/array/FindClosestInSorted.js"); +var Frame = __webpack_require__(/*! ./AnimationFrame */ "../../../src/animations/AnimationFrame.js"); +var GetValue = __webpack_require__(/*! ../utils/object/GetValue */ "../../../src/utils/object/GetValue.js"); + +/** + * @classdesc + * A Frame based Animation. + * + * This consists of a key, some default values (like the frame rate) and a bunch of Frame objects. + * + * The Animation Manager creates these. Game Objects don't own an instance of these directly. + * Game Objects have the Animation Component, which are like playheads to global Animations (these objects) + * So multiple Game Objects can have playheads all pointing to this one Animation instance. + * + * @class Animation + * @memberof Phaser.Animations + * @extends Phaser.Events.EventEmitter + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Animations.AnimationManager} manager - A reference to the global Animation Manager + * @param {string} key - The unique identifying string for this animation. + * @param {Phaser.Types.Animations.Animation} config - The Animation configuration. + */ +var Animation = new Class({ + + Extends: EventEmitter, + + initialize: + + function Animation (manager, key, config) + { + EventEmitter.call(this); + + /** + * A reference to the global Animation Manager. + * + * @name Phaser.Animations.Animation#manager + * @type {Phaser.Animations.AnimationManager} + * @since 3.0.0 + */ + this.manager = manager; + + /** + * The unique identifying string for this animation. + * + * @name Phaser.Animations.Animation#key + * @type {string} + * @since 3.0.0 + */ + this.key = key; + + /** + * A frame based animation (as opposed to a bone based animation) + * + * @name Phaser.Animations.Animation#type + * @type {string} + * @default frame + * @since 3.0.0 + */ + this.type = 'frame'; + + /** + * Extract all the frame data into the frames array. + * + * @name Phaser.Animations.Animation#frames + * @type {Phaser.Animations.AnimationFrame[]} + * @since 3.0.0 + */ + this.frames = this.getFrames( + manager.textureManager, + GetValue(config, 'frames', []), + GetValue(config, 'defaultTextureKey', null) + ); + + /** + * The frame rate of playback in frames per second (default 24 if duration is null) + * + * @name Phaser.Animations.Animation#frameRate + * @type {integer} + * @default 24 + * @since 3.0.0 + */ + this.frameRate = GetValue(config, 'frameRate', null); + + /** + * How long the animation should play for, in milliseconds. + * If the `frameRate` property has been set then it overrides this value, + * otherwise the `frameRate` is derived from `duration`. + * + * @name Phaser.Animations.Animation#duration + * @type {integer} + * @since 3.0.0 + */ + this.duration = GetValue(config, 'duration', null); + + if (this.duration === null && this.frameRate === null) + { + // No duration or frameRate given, use default frameRate of 24fps + this.frameRate = 24; + this.duration = (this.frameRate / this.frames.length) * 1000; + } + else if (this.duration && this.frameRate === null) + { + // Duration given but no frameRate, so set the frameRate based on duration + // I.e. 12 frames in the animation, duration = 4000 ms + // So frameRate is 12 / (4000 / 1000) = 3 fps + this.frameRate = this.frames.length / (this.duration / 1000); + } + else + { + // frameRate given, derive duration from it (even if duration also specified) + // I.e. 15 frames in the animation, frameRate = 30 fps + // So duration is 15 / 30 = 0.5 * 1000 (half a second, or 500ms) + this.duration = (this.frames.length / this.frameRate) * 1000; + } + + /** + * How many ms per frame, not including frame specific modifiers. + * + * @name Phaser.Animations.Animation#msPerFrame + * @type {integer} + * @since 3.0.0 + */ + this.msPerFrame = 1000 / this.frameRate; + + /** + * Skip frames if the time lags, or always advanced anyway? + * + * @name Phaser.Animations.Animation#skipMissedFrames + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.skipMissedFrames = GetValue(config, 'skipMissedFrames', true); + + /** + * The delay in ms before the playback will begin. + * + * @name Phaser.Animations.Animation#delay + * @type {integer} + * @default 0 + * @since 3.0.0 + */ + this.delay = GetValue(config, 'delay', 0); + + /** + * Number of times to repeat the animation. Set to -1 to repeat forever. + * + * @name Phaser.Animations.Animation#repeat + * @type {integer} + * @default 0 + * @since 3.0.0 + */ + this.repeat = GetValue(config, 'repeat', 0); + + /** + * The delay in ms before the a repeat play starts. + * + * @name Phaser.Animations.Animation#repeatDelay + * @type {integer} + * @default 0 + * @since 3.0.0 + */ + this.repeatDelay = GetValue(config, 'repeatDelay', 0); + + /** + * Should the animation yoyo (reverse back down to the start) before repeating? + * + * @name Phaser.Animations.Animation#yoyo + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.yoyo = GetValue(config, 'yoyo', false); + + /** + * Should the GameObject's `visible` property be set to `true` when the animation starts to play? + * + * @name Phaser.Animations.Animation#showOnStart + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.showOnStart = GetValue(config, 'showOnStart', false); + + /** + * Should the GameObject's `visible` property be set to `false` when the animation finishes? + * + * @name Phaser.Animations.Animation#hideOnComplete + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.hideOnComplete = GetValue(config, 'hideOnComplete', false); + + /** + * Global pause. All Game Objects using this Animation instance are impacted by this property. + * + * @name Phaser.Animations.Animation#paused + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.paused = false; + + this.manager.on(Events.PAUSE_ALL, this.pause, this); + this.manager.on(Events.RESUME_ALL, this.resume, this); + }, + + /** + * Add frames to the end of the animation. + * + * @method Phaser.Animations.Animation#addFrame + * @since 3.0.0 + * + * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects. + * + * @return {this} This Animation object. + */ + addFrame: function (config) + { + return this.addFrameAt(this.frames.length, config); + }, + + /** + * Add frame/s into the animation. + * + * @method Phaser.Animations.Animation#addFrameAt + * @since 3.0.0 + * + * @param {integer} index - The index to insert the frame at within the animation. + * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects. + * + * @return {this} This Animation object. + */ + addFrameAt: function (index, config) + { + var newFrames = this.getFrames(this.manager.textureManager, config); + + if (newFrames.length > 0) + { + if (index === 0) + { + this.frames = newFrames.concat(this.frames); + } + else if (index === this.frames.length) + { + this.frames = this.frames.concat(newFrames); + } + else + { + var pre = this.frames.slice(0, index); + var post = this.frames.slice(index); + + this.frames = pre.concat(newFrames, post); + } + + this.updateFrameSequence(); + } + + return this; + }, + + /** + * Check if the given frame index is valid. + * + * @method Phaser.Animations.Animation#checkFrame + * @since 3.0.0 + * + * @param {integer} index - The index to be checked. + * + * @return {boolean} `true` if the index is valid, otherwise `false`. + */ + checkFrame: function (index) + { + return (index >= 0 && index < this.frames.length); + }, + + /** + * Called internally when this Animation completes playback. + * Optionally, hides the parent Game Object, then stops playback. + * + * @method Phaser.Animations.Animation#completeAnimation + * @protected + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. + */ + completeAnimation: function (component) + { + if (this.hideOnComplete) + { + component.parent.visible = false; + } + + component.stop(); + }, + + /** + * Called internally when this Animation first starts to play. + * Sets the accumulator and nextTick properties. + * + * @method Phaser.Animations.Animation#getFirstTick + * @protected + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. + * @param {boolean} [includeDelay=true] - If `true` the Animation Components delay value will be added to the `nextTick` total. + */ + getFirstTick: function (component, includeDelay) + { + if (includeDelay === undefined) { includeDelay = true; } + + // When is the first update due? + component.accumulator = 0; + component.nextTick = component.msPerFrame + component.currentFrame.duration; + + if (includeDelay) + { + component.nextTick += component._delay; + } + }, + + /** + * Returns the AnimationFrame at the provided index + * + * @method Phaser.Animations.Animation#getFrameAt + * @protected + * @since 3.0.0 + * + * @param {integer} index - The index in the AnimationFrame array + * + * @return {Phaser.Animations.AnimationFrame} The frame at the index provided from the animation sequence + */ + getFrameAt: function (index) + { + return this.frames[index]; + }, + + /** + * Creates AnimationFrame instances based on the given frame data. + * + * @method Phaser.Animations.Animation#getFrames + * @since 3.0.0 + * + * @param {Phaser.Textures.TextureManager} textureManager - A reference to the global Texture Manager. + * @param {(string|Phaser.Types.Animations.AnimationFrame[])} frames - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects. + * @param {string} [defaultTextureKey] - The key to use if no key is set in the frame configuration object. + * + * @return {Phaser.Animations.AnimationFrame[]} An array of newly created AnimationFrame instances. + */ + getFrames: function (textureManager, frames, defaultTextureKey) + { + var out = []; + var prev; + var animationFrame; + var index = 1; + var i; + var textureKey; + + // if frames is a string, we'll get all the frames from the texture manager as if it's a sprite sheet + if (typeof frames === 'string') + { + textureKey = frames; + + var texture = textureManager.get(textureKey); + var frameKeys = texture.getFrameNames(); + + frames = []; + + frameKeys.forEach(function (idx, value) + { + frames.push({ key: textureKey, frame: value }); + }); + } + + if (!Array.isArray(frames) || frames.length === 0) + { + return out; + } + + for (i = 0; i < frames.length; i++) + { + var item = frames[i]; + + var key = GetValue(item, 'key', defaultTextureKey); + + if (!key) + { + continue; + } + + // Could be an integer or a string + var frame = GetValue(item, 'frame', 0); + + // The actual texture frame + var textureFrame = textureManager.getFrame(key, frame); + + animationFrame = new Frame(key, frame, index, textureFrame); + + animationFrame.duration = GetValue(item, 'duration', 0); + + animationFrame.isFirst = (!prev); + + // The previously created animationFrame + if (prev) + { + prev.nextFrame = animationFrame; + + animationFrame.prevFrame = prev; + } + + out.push(animationFrame); + + prev = animationFrame; + + index++; + } + + if (out.length > 0) + { + animationFrame.isLast = true; + + // Link them end-to-end, so they loop + animationFrame.nextFrame = out[0]; + + out[0].prevFrame = animationFrame; + + // Generate the progress data + + var slice = 1 / (out.length - 1); + + for (i = 0; i < out.length; i++) + { + out[i].progress = i * slice; + } + } + + return out; + }, + + /** + * Called internally. Sets the accumulator and nextTick values of the current Animation. + * + * @method Phaser.Animations.Animation#getNextTick + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. + */ + getNextTick: function (component) + { + // accumulator += delta * _timeScale + // after a large delta surge (perf issue for example) we need to adjust for it here + + // When is the next update due? + component.accumulator -= component.nextTick; + + component.nextTick = component.msPerFrame + component.currentFrame.duration; + }, + + /** + * Loads the Animation values into the Animation Component. + * + * @method Phaser.Animations.Animation#load + * @private + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to load values into. + * @param {integer} startFrame - The start frame of the animation to load. + */ + load: function (component, startFrame) + { + if (startFrame >= this.frames.length) + { + startFrame = 0; + } + + if (component.currentAnim !== this) + { + component.currentAnim = this; + + component.frameRate = this.frameRate; + component.duration = this.duration; + component.msPerFrame = this.msPerFrame; + component.skipMissedFrames = this.skipMissedFrames; + + component._delay = this.delay; + component._repeat = this.repeat; + component._repeatDelay = this.repeatDelay; + component._yoyo = this.yoyo; + } + + var frame = this.frames[startFrame]; + + if (startFrame === 0 && !component.forward) + { + frame = this.getLastFrame(); + } + + component.updateFrame(frame); + }, + + /** + * Returns the frame closest to the given progress value between 0 and 1. + * + * @method Phaser.Animations.Animation#getFrameByProgress + * @since 3.4.0 + * + * @param {number} value - A value between 0 and 1. + * + * @return {Phaser.Animations.AnimationFrame} The frame closest to the given progress value. + */ + getFrameByProgress: function (value) + { + value = Clamp(value, 0, 1); + + return FindClosestInSorted(value, this.frames, 'progress'); + }, + + /** + * Advance the animation frame. + * + * @method Phaser.Animations.Animation#nextFrame + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to advance. + */ + nextFrame: function (component) + { + var frame = component.currentFrame; + + // TODO: Add frame skip support + + if (frame.isLast) + { + // We're at the end of the animation + + // Yoyo? (happens before repeat) + if (component._yoyo) + { + this.handleYoyoFrame(component, false); + } + else if (component.repeatCounter > 0) + { + // Repeat (happens before complete) + + if (component._reverse && component.forward) + { + component.forward = false; + } + else + { + this.repeatAnimation(component); + } + } + else + { + this.completeAnimation(component); + } + } + else + { + this.updateAndGetNextTick(component, frame.nextFrame); + } + }, + + /** + * Handle the yoyo functionality in nextFrame and previousFrame methods. + * + * @method Phaser.Animations.Animation#handleYoyoFrame + * @private + * @since 3.12.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to advance. + * @param {boolean} isReverse - Is animation in reverse mode? (Default: false) + */ + handleYoyoFrame: function (component, isReverse) + { + if (!isReverse) { isReverse = false; } + + if (component._reverse === !isReverse && component.repeatCounter > 0) + { + if (!component._repeatDelay || component.pendingRepeat) + + { + component.forward = isReverse; + } + + this.repeatAnimation(component); + + return; + } + + if (component._reverse !== isReverse && component.repeatCounter === 0) + { + this.completeAnimation(component); + + return; + } + + component.forward = isReverse; + + var frame = (isReverse) ? component.currentFrame.nextFrame : component.currentFrame.prevFrame; + + this.updateAndGetNextTick(component, frame); + }, + + /** + * Returns the animation last frame. + * + * @method Phaser.Animations.Animation#getLastFrame + * @since 3.12.0 + * + * @return {Phaser.Animations.AnimationFrame} component - The Animation Last Frame. + */ + getLastFrame: function () + { + return this.frames[this.frames.length - 1]; + }, + + /** + * Called internally when the Animation is playing backwards. + * Sets the previous frame, causing a yoyo, repeat, complete or update, accordingly. + * + * @method Phaser.Animations.Animation#previousFrame + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. + */ + previousFrame: function (component) + { + var frame = component.currentFrame; + + // TODO: Add frame skip support + + if (frame.isFirst) + { + // We're at the start of the animation + + if (component._yoyo) + { + this.handleYoyoFrame(component, true); + } + else if (component.repeatCounter > 0) + { + if (component._reverse && !component.forward) + { + component.currentFrame = this.getLastFrame(); + this.repeatAnimation(component); + } + else + { + // Repeat (happens before complete) + component.forward = true; + this.repeatAnimation(component); + } + } + else + { + this.completeAnimation(component); + } + } + else + { + this.updateAndGetNextTick(component, frame.prevFrame); + } + }, + + /** + * Update Frame and Wait next tick. + * + * @method Phaser.Animations.Animation#updateAndGetNextTick + * @private + * @since 3.12.0 + * + * @param {Phaser.Animations.AnimationFrame} frame - An Animation frame. + */ + updateAndGetNextTick: function (component, frame) + { + component.updateFrame(frame); + + this.getNextTick(component); + }, + + /** + * Removes the given AnimationFrame from this Animation instance. + * This is a global action. Any Game Object using this Animation will be impacted by this change. + * + * @method Phaser.Animations.Animation#removeFrame + * @since 3.0.0 + * + * @param {Phaser.Animations.AnimationFrame} frame - The AnimationFrame to be removed. + * + * @return {this} This Animation object. + */ + removeFrame: function (frame) + { + var index = this.frames.indexOf(frame); + + if (index !== -1) + { + this.removeFrameAt(index); + } + + return this; + }, + + /** + * Removes a frame from the AnimationFrame array at the provided index + * and updates the animation accordingly. + * + * @method Phaser.Animations.Animation#removeFrameAt + * @since 3.0.0 + * + * @param {integer} index - The index in the AnimationFrame array + * + * @return {this} This Animation object. + */ + removeFrameAt: function (index) + { + this.frames.splice(index, 1); + + this.updateFrameSequence(); + + return this; + }, + + /** + * Called internally during playback. Forces the animation to repeat, providing there are enough counts left + * in the repeat counter. + * + * @method Phaser.Animations.Animation#repeatAnimation + * @fires Phaser.Animations.Events#ANIMATION_REPEAT + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_REPEAT + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. + */ + repeatAnimation: function (component) + { + if (component._pendingStop === 2) + { + return this.completeAnimation(component); + } + + if (component._repeatDelay > 0 && component.pendingRepeat === false) + { + component.pendingRepeat = true; + component.accumulator -= component.nextTick; + component.nextTick += component._repeatDelay; + } + else + { + component.repeatCounter--; + + component.updateFrame(component.currentFrame[(component.forward) ? 'nextFrame' : 'prevFrame']); + + if (component.isPlaying) + { + this.getNextTick(component); + + component.pendingRepeat = false; + + var frame = component.currentFrame; + var parent = component.parent; + + this.emit(Events.ANIMATION_REPEAT, this, frame); + + parent.emit(Events.SPRITE_ANIMATION_KEY_REPEAT + this.key, this, frame, component.repeatCounter, parent); + + parent.emit(Events.SPRITE_ANIMATION_REPEAT, this, frame, component.repeatCounter, parent); + } + } + }, + + /** + * Sets the texture frame the animation uses for rendering. + * + * @method Phaser.Animations.Animation#setFrame + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. + */ + setFrame: function (component) + { + // Work out which frame should be set next on the child, and set it + if (component.forward) + { + this.nextFrame(component); + } + else + { + this.previousFrame(component); + } + }, + + /** + * Converts the animation data to JSON. + * + * @method Phaser.Animations.Animation#toJSON + * @since 3.0.0 + * + * @return {Phaser.Types.Animations.JSONAnimation} The resulting JSONAnimation formatted object. + */ + toJSON: function () + { + var output = { + 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, + showOnStart: this.showOnStart, + hideOnComplete: this.hideOnComplete + }; + + this.frames.forEach(function (frame) + { + output.frames.push(frame.toJSON()); + }); + + return output; + }, + + /** + * Called internally whenever frames are added to, or removed from, this Animation. + * + * @method Phaser.Animations.Animation#updateFrameSequence + * @since 3.0.0 + * + * @return {this} This Animation object. + */ + updateFrameSequence: function () + { + var len = this.frames.length; + var slice = 1 / (len - 1); + + var frame; + + for (var i = 0; i < len; i++) + { + frame = this.frames[i]; + + frame.index = i + 1; + frame.isFirst = false; + frame.isLast = false; + frame.progress = i * slice; + + if (i === 0) + { + frame.isFirst = true; + + if (len === 1) + { + frame.isLast = true; + frame.nextFrame = frame; + frame.prevFrame = frame; + } + else + { + frame.isLast = false; + frame.prevFrame = this.frames[len - 1]; + frame.nextFrame = this.frames[i + 1]; + } + } + else if (i === len - 1 && len > 1) + { + frame.isLast = true; + frame.prevFrame = this.frames[len - 2]; + frame.nextFrame = this.frames[0]; + } + else if (len > 1) + { + frame.prevFrame = this.frames[i - 1]; + frame.nextFrame = this.frames[i + 1]; + } + } + + return this; + }, + + /** + * Pauses playback of this Animation. The paused state is set immediately. + * + * @method Phaser.Animations.Animation#pause + * @since 3.0.0 + * + * @return {this} This Animation object. + */ + pause: function () + { + this.paused = true; + + return this; + }, + + /** + * Resumes playback of this Animation. The paused state is reset immediately. + * + * @method Phaser.Animations.Animation#resume + * @since 3.0.0 + * + * @return {this} This Animation object. + */ + resume: function () + { + this.paused = false; + + return this; + }, + + /** + * Destroys this Animation instance. It will remove all event listeners, + * remove this animation and its key from the global Animation Manager, + * and then destroy all Animation Frames in turn. + * + * @method Phaser.Animations.Animation#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.removeAllListeners(); + + this.manager.off(Events.PAUSE_ALL, this.pause, this); + this.manager.off(Events.RESUME_ALL, this.resume, this); + + this.manager.remove(this.key); + + for (var i = 0; i < this.frames.length; i++) + { + this.frames[i].destroy(); + } + + this.frames = []; + + this.manager = null; + } + +}); + +module.exports = Animation; + + +/***/ }), + +/***/ "../../../src/animations/AnimationFrame.js": +/*!***********************************************************!*\ + !*** D:/wamp/www/phaser/src/animations/AnimationFrame.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(/*! ../utils/Class */ "../../../src/utils/Class.js"); + +/** + * @classdesc + * A single frame in an Animation sequence. + * + * An AnimationFrame consists of a reference to the Texture it uses for rendering, references to other + * frames in the animation, and index data. It also has the ability to modify the animation timing. + * + * AnimationFrames are generated automatically by the Animation class. + * + * @class AnimationFrame + * @memberof Phaser.Animations + * @constructor + * @since 3.0.0 + * + * @param {string} textureKey - The key of the Texture this AnimationFrame uses. + * @param {(string|integer)} textureFrame - The key of the Frame within the Texture that this AnimationFrame uses. + * @param {integer} index - The index of this AnimationFrame within the Animation sequence. + * @param {Phaser.Textures.Frame} frame - A reference to the Texture Frame this AnimationFrame uses for rendering. + */ +var AnimationFrame = new Class({ + + initialize: + + function AnimationFrame (textureKey, textureFrame, index, frame) + { + /** + * The key of the Texture this AnimationFrame uses. + * + * @name Phaser.Animations.AnimationFrame#textureKey + * @type {string} + * @since 3.0.0 + */ + this.textureKey = textureKey; + + /** + * The key of the Frame within the Texture that this AnimationFrame uses. + * + * @name Phaser.Animations.AnimationFrame#textureFrame + * @type {(string|integer)} + * @since 3.0.0 + */ + this.textureFrame = textureFrame; + + /** + * The index of this AnimationFrame within the Animation sequence. + * + * @name Phaser.Animations.AnimationFrame#index + * @type {integer} + * @since 3.0.0 + */ + this.index = index; + + /** + * A reference to the Texture Frame this AnimationFrame uses for rendering. + * + * @name Phaser.Animations.AnimationFrame#frame + * @type {Phaser.Textures.Frame} + * @since 3.0.0 + */ + this.frame = frame; + + /** + * Is this the first frame in an animation sequence? + * + * @name Phaser.Animations.AnimationFrame#isFirst + * @type {boolean} + * @default false + * @readonly + * @since 3.0.0 + */ + this.isFirst = false; + + /** + * Is this the last frame in an animation sequence? + * + * @name Phaser.Animations.AnimationFrame#isLast + * @type {boolean} + * @default false + * @readonly + * @since 3.0.0 + */ + this.isLast = false; + + /** + * A reference to the AnimationFrame that comes before this one in the animation, if any. + * + * @name Phaser.Animations.AnimationFrame#prevFrame + * @type {?Phaser.Animations.AnimationFrame} + * @default null + * @readonly + * @since 3.0.0 + */ + this.prevFrame = null; + + /** + * A reference to the AnimationFrame that comes after this one in the animation, if any. + * + * @name Phaser.Animations.AnimationFrame#nextFrame + * @type {?Phaser.Animations.AnimationFrame} + * @default null + * @readonly + * @since 3.0.0 + */ + this.nextFrame = null; + + /** + * Additional time (in ms) that this frame should appear for during playback. + * The value is added onto the msPerFrame set by the animation. + * + * @name Phaser.Animations.AnimationFrame#duration + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.duration = 0; + + /** + * What % through the animation does this frame come? + * This value is generated when the animation is created and cached here. + * + * @name Phaser.Animations.AnimationFrame#progress + * @type {number} + * @default 0 + * @readonly + * @since 3.0.0 + */ + this.progress = 0; + }, + + /** + * Generates a JavaScript object suitable for converting to JSON. + * + * @method Phaser.Animations.AnimationFrame#toJSON + * @since 3.0.0 + * + * @return {Phaser.Types.Animations.JSONAnimationFrame} The AnimationFrame data. + */ + toJSON: function () + { + return { + key: this.textureKey, + frame: this.textureFrame, + duration: this.duration + }; + }, + + /** + * Destroys this object by removing references to external resources and callbacks. + * + * @method Phaser.Animations.AnimationFrame#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.frame = undefined; + } + +}); + +module.exports = AnimationFrame; + + +/***/ }), + +/***/ "../../../src/animations/events/ADD_ANIMATION_EVENT.js": +/*!***********************************************************************!*\ + !*** D:/wamp/www/phaser/src/animations/events/ADD_ANIMATION_EVENT.js ***! + \***********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Add Animation Event. + * + * This event is dispatched when a new animation is added to the global Animation Manager. + * + * This can happen either as a result of an animation instance being added to the Animation Manager, + * or the Animation Manager creating a new animation directly. + * + * @event Phaser.Animations.Events#ADD_ANIMATION + * @since 3.0.0 + * + * @param {string} key - The key of the Animation that was added to the global Animation Manager. + * @param {Phaser.Animations.Animation} animation - An instance of the newly created Animation. + */ +module.exports = 'add'; + + +/***/ }), + +/***/ "../../../src/animations/events/ANIMATION_COMPLETE_EVENT.js": +/*!****************************************************************************!*\ + !*** D:/wamp/www/phaser/src/animations/events/ANIMATION_COMPLETE_EVENT.js ***! + \****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Complete Event. + * + * This event is dispatched by an Animation instance when it completes, i.e. finishes playing or is manually stopped. + * + * Be careful with the volume of events this could generate. If a group of Sprites all complete the same + * animation at the same time, this event will invoke its handler for each one of them. + * + * @event Phaser.Animations.Events#ANIMATION_COMPLETE + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed. + */ +module.exports = 'complete'; + + +/***/ }), + +/***/ "../../../src/animations/events/ANIMATION_REPEAT_EVENT.js": +/*!**************************************************************************!*\ + !*** D:/wamp/www/phaser/src/animations/events/ANIMATION_REPEAT_EVENT.js ***! + \**************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Repeat Event. + * + * This event is dispatched when a currently playing animation repeats. + * + * The event is dispatched directly from the Animation object itself. Which means that listeners + * bound to this event will be invoked every time the Animation repeats, for every Game Object that may have it. + * + * @event Phaser.Animations.Events#ANIMATION_REPEAT + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that repeated. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation was on when it repeated. + */ +module.exports = 'repeat'; + + +/***/ }), + +/***/ "../../../src/animations/events/ANIMATION_RESTART_EVENT.js": +/*!***************************************************************************!*\ + !*** D:/wamp/www/phaser/src/animations/events/ANIMATION_RESTART_EVENT.js ***! + \***************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Restart Event. + * + * This event is dispatched by an Animation instance when it restarts. + * + * Be careful with the volume of events this could generate. If a group of Sprites all restart the same + * animation at the same time, this event will invoke its handler for each one of them. + * + * @event Phaser.Animations.Events#ANIMATION_RESTART + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that restarted playing. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing. + */ +module.exports = 'restart'; + + +/***/ }), + +/***/ "../../../src/animations/events/ANIMATION_START_EVENT.js": +/*!*************************************************************************!*\ + !*** D:/wamp/www/phaser/src/animations/events/ANIMATION_START_EVENT.js ***! + \*************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Start Event. + * + * This event is dispatched by an Animation instance when it starts playing. + * + * Be careful with the volume of events this could generate. If a group of Sprites all play the same + * animation at the same time, this event will invoke its handler for each one of them. + * + * @event Phaser.Animations.Events#ANIMATION_START + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that started playing. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing. + */ +module.exports = 'start'; + + +/***/ }), + +/***/ "../../../src/animations/events/PAUSE_ALL_EVENT.js": +/*!*******************************************************************!*\ + !*** D:/wamp/www/phaser/src/animations/events/PAUSE_ALL_EVENT.js ***! + \*******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Pause All Animations Event. + * + * This event is dispatched when the global Animation Manager is told to pause. + * + * When this happens all current animations will stop updating, although it doesn't necessarily mean + * that the game has paused as well. + * + * @event Phaser.Animations.Events#PAUSE_ALL + * @since 3.0.0 + */ +module.exports = 'pauseall'; + + +/***/ }), + +/***/ "../../../src/animations/events/REMOVE_ANIMATION_EVENT.js": +/*!**************************************************************************!*\ + !*** D:/wamp/www/phaser/src/animations/events/REMOVE_ANIMATION_EVENT.js ***! + \**************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Remove Animation Event. + * + * This event is dispatched when an animation is removed from the global Animation Manager. + * + * @event Phaser.Animations.Events#REMOVE_ANIMATION + * @since 3.0.0 + * + * @param {string} key - The key of the Animation that was removed from the global Animation Manager. + * @param {Phaser.Animations.Animation} animation - An instance of the removed Animation. + */ +module.exports = 'remove'; + + +/***/ }), + +/***/ "../../../src/animations/events/RESUME_ALL_EVENT.js": +/*!********************************************************************!*\ + !*** D:/wamp/www/phaser/src/animations/events/RESUME_ALL_EVENT.js ***! + \********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Resume All Animations Event. + * + * This event is dispatched when the global Animation Manager resumes, having been previously paused. + * + * When this happens all current animations will continue updating again. + * + * @event Phaser.Animations.Events#RESUME_ALL + * @since 3.0.0 + */ +module.exports = 'resumeall'; + + +/***/ }), + +/***/ "../../../src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js": +/*!***********************************************************************************!*\ + !*** D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js ***! + \***********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Complete Event. + * + * This event is dispatched by a Sprite when an animation finishes playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationcomplete', listener)` + * + * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_COMPLETE` event. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_COMPLETE + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed. + */ +module.exports = 'animationcomplete'; + + +/***/ }), + +/***/ "../../../src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js": +/*!***************************************************************************************!*\ + !*** D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js ***! + \***************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Key Complete Event. + * + * This event is dispatched by a Sprite when a specific animation finishes playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationcomplete-key', listener)` where `key` is the key of + * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationcomplete-explode`. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_COMPLETE + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed. + */ +module.exports = 'animationcomplete-'; + + +/***/ }), + +/***/ "../../../src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js": +/*!*************************************************************************************!*\ + !*** D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js ***! + \*************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Key Repeat Event. + * + * This event is dispatched by a Sprite when a specific animation repeats playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationrepeat-key', listener)` where `key` is the key of + * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrepeat-explode`. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. + * @param {integer} repeatCount - The number of times the Animation has repeated so far. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing. + */ +module.exports = 'animationrepeat-'; + + +/***/ }), + +/***/ "../../../src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js": +/*!**************************************************************************************!*\ + !*** D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js ***! + \**************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Key Restart Event. + * + * This event is dispatched by a Sprite when a specific animation restarts playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationrestart-key', listener)` where `key` is the key of + * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrestart-explode`. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing. + */ +module.exports = 'animationrestart-'; + + +/***/ }), + +/***/ "../../../src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js": +/*!************************************************************************************!*\ + !*** D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js ***! + \************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Key Start Event. + * + * This event is dispatched by a Sprite when a specific animation starts playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationstart-key', listener)` where `key` is the key of + * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationstart-explode`. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing. + */ +module.exports = 'animationstart-'; + + +/***/ }), + +/***/ "../../../src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js": +/*!*************************************************************************************!*\ + !*** D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js ***! + \*************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Key Update Event. + * + * This event is dispatched by a Sprite when a specific animation playing on it updates. This happens when the animation changes frame, + * based on the animation frame rate and other factors like `timeScale` and `delay`. + * + * Listen for it on the Sprite using `sprite.on('animationupdate-key', listener)` where `key` is the key of + * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationupdate-explode`. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated. + */ +module.exports = 'animationupdate-'; + + +/***/ }), + +/***/ "../../../src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js": +/*!*********************************************************************************!*\ + !*** D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js ***! + \*********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Repeat Event. + * + * This event is dispatched by a Sprite when an animation repeats playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationrepeat', listener)` + * + * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_REPEAT` event. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_REPEAT + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. + * @param {integer} repeatCount - The number of times the Animation has repeated so far. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing. + */ +module.exports = 'animationrepeat'; + + +/***/ }), + +/***/ "../../../src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js": +/*!**********************************************************************************!*\ + !*** D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js ***! + \**********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Restart Event. + * + * This event is dispatched by a Sprite when an animation restarts playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationrestart', listener)` + * + * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_RESTART` event. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_RESTART + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing. + */ +module.exports = 'animationrestart'; + + +/***/ }), + +/***/ "../../../src/animations/events/SPRITE_ANIMATION_START_EVENT.js": +/*!********************************************************************************!*\ + !*** D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_START_EVENT.js ***! + \********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Start Event. + * + * This event is dispatched by a Sprite when an animation starts playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationstart', listener)` + * + * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_START` event. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_START + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing. + */ +module.exports = 'animationstart'; + + +/***/ }), + +/***/ "../../../src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js": +/*!*********************************************************************************!*\ + !*** D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js ***! + \*********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Update Event. + * + * This event is dispatched by a Sprite when an animation playing on it updates. This happens when the animation changes frame, + * based on the animation frame rate and other factors like `timeScale` and `delay`. + * + * Listen for it on the Sprite using `sprite.on('animationupdate', listener)` + * + * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_UPDATE` event. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated. + */ +module.exports = 'animationupdate'; + + +/***/ }), + +/***/ "../../../src/animations/events/index.js": +/*!*********************************************************!*\ + !*** D:/wamp/www/phaser/src/animations/events/index.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Animations.Events + */ + +module.exports = { + + ADD_ANIMATION: __webpack_require__(/*! ./ADD_ANIMATION_EVENT */ "../../../src/animations/events/ADD_ANIMATION_EVENT.js"), + ANIMATION_COMPLETE: __webpack_require__(/*! ./ANIMATION_COMPLETE_EVENT */ "../../../src/animations/events/ANIMATION_COMPLETE_EVENT.js"), + ANIMATION_REPEAT: __webpack_require__(/*! ./ANIMATION_REPEAT_EVENT */ "../../../src/animations/events/ANIMATION_REPEAT_EVENT.js"), + ANIMATION_RESTART: __webpack_require__(/*! ./ANIMATION_RESTART_EVENT */ "../../../src/animations/events/ANIMATION_RESTART_EVENT.js"), + ANIMATION_START: __webpack_require__(/*! ./ANIMATION_START_EVENT */ "../../../src/animations/events/ANIMATION_START_EVENT.js"), + PAUSE_ALL: __webpack_require__(/*! ./PAUSE_ALL_EVENT */ "../../../src/animations/events/PAUSE_ALL_EVENT.js"), + REMOVE_ANIMATION: __webpack_require__(/*! ./REMOVE_ANIMATION_EVENT */ "../../../src/animations/events/REMOVE_ANIMATION_EVENT.js"), + RESUME_ALL: __webpack_require__(/*! ./RESUME_ALL_EVENT */ "../../../src/animations/events/RESUME_ALL_EVENT.js"), + SPRITE_ANIMATION_COMPLETE: __webpack_require__(/*! ./SPRITE_ANIMATION_COMPLETE_EVENT */ "../../../src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js"), + SPRITE_ANIMATION_KEY_COMPLETE: __webpack_require__(/*! ./SPRITE_ANIMATION_KEY_COMPLETE_EVENT */ "../../../src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js"), + SPRITE_ANIMATION_KEY_REPEAT: __webpack_require__(/*! ./SPRITE_ANIMATION_KEY_REPEAT_EVENT */ "../../../src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js"), + SPRITE_ANIMATION_KEY_RESTART: __webpack_require__(/*! ./SPRITE_ANIMATION_KEY_RESTART_EVENT */ "../../../src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js"), + SPRITE_ANIMATION_KEY_START: __webpack_require__(/*! ./SPRITE_ANIMATION_KEY_START_EVENT */ "../../../src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js"), + SPRITE_ANIMATION_KEY_UPDATE: __webpack_require__(/*! ./SPRITE_ANIMATION_KEY_UPDATE_EVENT */ "../../../src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js"), + SPRITE_ANIMATION_REPEAT: __webpack_require__(/*! ./SPRITE_ANIMATION_REPEAT_EVENT */ "../../../src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js"), + SPRITE_ANIMATION_RESTART: __webpack_require__(/*! ./SPRITE_ANIMATION_RESTART_EVENT */ "../../../src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js"), + SPRITE_ANIMATION_START: __webpack_require__(/*! ./SPRITE_ANIMATION_START_EVENT */ "../../../src/animations/events/SPRITE_ANIMATION_START_EVENT.js"), + SPRITE_ANIMATION_UPDATE: __webpack_require__(/*! ./SPRITE_ANIMATION_UPDATE_EVENT */ "../../../src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js") + +}; + + +/***/ }), + +/***/ "../../../src/core/events/BLUR_EVENT.js": +/*!********************************************************!*\ + !*** D:/wamp/www/phaser/src/core/events/BLUR_EVENT.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Blur Event. + * + * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded + * enters a blurred state. The blur event is raised when the window loses focus. This can happen if a user swaps + * tab, or if they simply remove focus from the browser to another app. + * + * @event Phaser.Core.Events#BLUR + * @since 3.0.0 + */ +module.exports = 'blur'; + + +/***/ }), + +/***/ "../../../src/core/events/BOOT_EVENT.js": +/*!********************************************************!*\ + !*** D:/wamp/www/phaser/src/core/events/BOOT_EVENT.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Boot Event. + * + * This event is dispatched when the Phaser Game instance has finished booting, but before it is ready to start running. + * The global systems use this event to know when to set themselves up, dispatching their own `ready` events as required. + * + * @event Phaser.Core.Events#BOOT + * @since 3.0.0 + */ +module.exports = 'boot'; + + +/***/ }), + +/***/ "../../../src/core/events/CONTEXT_LOST_EVENT.js": +/*!****************************************************************!*\ + !*** D:/wamp/www/phaser/src/core/events/CONTEXT_LOST_EVENT.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Context Lost Event. + * + * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Lost event from the browser. + * + * The partner event is `CONTEXT_RESTORED`. + * + * @event Phaser.Core.Events#CONTEXT_LOST + * @since 3.19.0 + */ +module.exports = 'contextlost'; + + +/***/ }), + +/***/ "../../../src/core/events/CONTEXT_RESTORED_EVENT.js": +/*!********************************************************************!*\ + !*** D:/wamp/www/phaser/src/core/events/CONTEXT_RESTORED_EVENT.js ***! + \********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Context Restored Event. + * + * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Restored event from the browser. + * + * The partner event is `CONTEXT_LOST`. + * + * @event Phaser.Core.Events#CONTEXT_RESTORED + * @since 3.19.0 + */ +module.exports = 'contextrestored'; + + +/***/ }), + +/***/ "../../../src/core/events/DESTROY_EVENT.js": +/*!***********************************************************!*\ + !*** D:/wamp/www/phaser/src/core/events/DESTROY_EVENT.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Destroy Event. + * + * This event is dispatched when the game instance has been told to destroy itself. + * Lots of internal systems listen to this event in order to clear themselves out. + * Custom plugins and game code should also do the same. + * + * @event Phaser.Core.Events#DESTROY + * @since 3.0.0 + */ +module.exports = 'destroy'; + + +/***/ }), + +/***/ "../../../src/core/events/FOCUS_EVENT.js": +/*!*********************************************************!*\ + !*** D:/wamp/www/phaser/src/core/events/FOCUS_EVENT.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Focus Event. + * + * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded + * enters a focused state. The focus event is raised when the window re-gains focus, having previously lost it. + * + * @event Phaser.Core.Events#FOCUS + * @since 3.0.0 + */ +module.exports = 'focus'; + + +/***/ }), + +/***/ "../../../src/core/events/HIDDEN_EVENT.js": +/*!**********************************************************!*\ + !*** D:/wamp/www/phaser/src/core/events/HIDDEN_EVENT.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Hidden Event. + * + * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded + * enters a hidden state. Only browsers that support the Visibility API will cause this event to be emitted. + * + * In most modern browsers, when the document enters a hidden state, the Request Animation Frame and setTimeout, which + * control the main game loop, will automatically pause. There is no way to stop this from happening. It is something + * your game should account for in its own code, should the pause be an issue (i.e. for multiplayer games) + * + * @event Phaser.Core.Events#HIDDEN + * @since 3.0.0 + */ +module.exports = 'hidden'; + + +/***/ }), + +/***/ "../../../src/core/events/PAUSE_EVENT.js": +/*!*********************************************************!*\ + !*** D:/wamp/www/phaser/src/core/events/PAUSE_EVENT.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Pause Event. + * + * This event is dispatched when the Game loop enters a paused state, usually as a result of the Visibility Handler. + * + * @event Phaser.Core.Events#PAUSE + * @since 3.0.0 + */ +module.exports = 'pause'; + + +/***/ }), + +/***/ "../../../src/core/events/POST_RENDER_EVENT.js": +/*!***************************************************************!*\ + !*** D:/wamp/www/phaser/src/core/events/POST_RENDER_EVENT.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Post-Render Event. + * + * This event is dispatched right at the end of the render process. + * + * Every Scene will have rendered and been drawn to the canvas by the time this event is fired. + * Use it for any last minute post-processing before the next game step begins. + * + * @event Phaser.Core.Events#POST_RENDER + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - A reference to the current renderer being used by the Game instance. + */ +module.exports = 'postrender'; + + +/***/ }), + +/***/ "../../../src/core/events/POST_STEP_EVENT.js": +/*!*************************************************************!*\ + !*** D:/wamp/www/phaser/src/core/events/POST_STEP_EVENT.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Post-Step Event. + * + * This event is dispatched after the Scene Manager has updated. + * Hook into it from plugins or systems that need to do things before the render starts. + * + * @event Phaser.Core.Events#POST_STEP + * @since 3.0.0 + * + * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. + * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. + */ +module.exports = 'poststep'; + + +/***/ }), + +/***/ "../../../src/core/events/PRE_RENDER_EVENT.js": +/*!**************************************************************!*\ + !*** D:/wamp/www/phaser/src/core/events/PRE_RENDER_EVENT.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Pre-Render Event. + * + * This event is dispatched immediately before any of the Scenes have started to render. + * + * The renderer will already have been initialized this frame, clearing itself and preparing to receive the Scenes for rendering, but it won't have actually drawn anything yet. + * + * @event Phaser.Core.Events#PRE_RENDER + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - A reference to the current renderer being used by the Game instance. + */ +module.exports = 'prerender'; + + +/***/ }), + +/***/ "../../../src/core/events/PRE_STEP_EVENT.js": +/*!************************************************************!*\ + !*** D:/wamp/www/phaser/src/core/events/PRE_STEP_EVENT.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Pre-Step Event. + * + * This event is dispatched before the main Game Step starts. By this point in the game cycle none of the Scene updates have yet happened. + * Hook into it from plugins or systems that need to update before the Scene Manager does. + * + * @event Phaser.Core.Events#PRE_STEP + * @since 3.0.0 + * + * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. + * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. + */ +module.exports = 'prestep'; + + +/***/ }), + +/***/ "../../../src/core/events/READY_EVENT.js": +/*!*********************************************************!*\ + !*** D:/wamp/www/phaser/src/core/events/READY_EVENT.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Ready Event. + * + * This event is dispatched when the Phaser Game instance has finished booting, the Texture Manager is fully ready, + * and all local systems are now able to start. + * + * @event Phaser.Core.Events#READY + * @since 3.0.0 + */ +module.exports = 'ready'; + + +/***/ }), + +/***/ "../../../src/core/events/RESUME_EVENT.js": +/*!**********************************************************!*\ + !*** D:/wamp/www/phaser/src/core/events/RESUME_EVENT.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Resume Event. + * + * This event is dispatched when the game loop leaves a paused state and resumes running. + * + * @event Phaser.Core.Events#RESUME + * @since 3.0.0 + */ +module.exports = 'resume'; + + +/***/ }), + +/***/ "../../../src/core/events/STEP_EVENT.js": +/*!********************************************************!*\ + !*** D:/wamp/www/phaser/src/core/events/STEP_EVENT.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Step Event. + * + * This event is dispatched after the Game Pre-Step and before the Scene Manager steps. + * Hook into it from plugins or systems that need to update before the Scene Manager does, but after the core Systems have. + * + * @event Phaser.Core.Events#STEP + * @since 3.0.0 + * + * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. + * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. + */ +module.exports = 'step'; + + +/***/ }), + +/***/ "../../../src/core/events/VISIBLE_EVENT.js": +/*!***********************************************************!*\ + !*** D:/wamp/www/phaser/src/core/events/VISIBLE_EVENT.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Visible Event. + * + * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded + * enters a visible state, previously having been hidden. + * + * Only browsers that support the Visibility API will cause this event to be emitted. + * + * @event Phaser.Core.Events#VISIBLE + * @since 3.0.0 + */ +module.exports = 'visible'; + + +/***/ }), + +/***/ "../../../src/core/events/index.js": +/*!***************************************************!*\ + !*** D:/wamp/www/phaser/src/core/events/index.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Core.Events + */ + +module.exports = { + + BLUR: __webpack_require__(/*! ./BLUR_EVENT */ "../../../src/core/events/BLUR_EVENT.js"), + BOOT: __webpack_require__(/*! ./BOOT_EVENT */ "../../../src/core/events/BOOT_EVENT.js"), + CONTEXT_LOST: __webpack_require__(/*! ./CONTEXT_LOST_EVENT */ "../../../src/core/events/CONTEXT_LOST_EVENT.js"), + CONTEXT_RESTORED: __webpack_require__(/*! ./CONTEXT_RESTORED_EVENT */ "../../../src/core/events/CONTEXT_RESTORED_EVENT.js"), + DESTROY: __webpack_require__(/*! ./DESTROY_EVENT */ "../../../src/core/events/DESTROY_EVENT.js"), + FOCUS: __webpack_require__(/*! ./FOCUS_EVENT */ "../../../src/core/events/FOCUS_EVENT.js"), + HIDDEN: __webpack_require__(/*! ./HIDDEN_EVENT */ "../../../src/core/events/HIDDEN_EVENT.js"), + PAUSE: __webpack_require__(/*! ./PAUSE_EVENT */ "../../../src/core/events/PAUSE_EVENT.js"), + POST_RENDER: __webpack_require__(/*! ./POST_RENDER_EVENT */ "../../../src/core/events/POST_RENDER_EVENT.js"), + POST_STEP: __webpack_require__(/*! ./POST_STEP_EVENT */ "../../../src/core/events/POST_STEP_EVENT.js"), + PRE_RENDER: __webpack_require__(/*! ./PRE_RENDER_EVENT */ "../../../src/core/events/PRE_RENDER_EVENT.js"), + PRE_STEP: __webpack_require__(/*! ./PRE_STEP_EVENT */ "../../../src/core/events/PRE_STEP_EVENT.js"), + READY: __webpack_require__(/*! ./READY_EVENT */ "../../../src/core/events/READY_EVENT.js"), + RESUME: __webpack_require__(/*! ./RESUME_EVENT */ "../../../src/core/events/RESUME_EVENT.js"), + STEP: __webpack_require__(/*! ./STEP_EVENT */ "../../../src/core/events/STEP_EVENT.js"), + VISIBLE: __webpack_require__(/*! ./VISIBLE_EVENT */ "../../../src/core/events/VISIBLE_EVENT.js") + +}; + + /***/ }), /***/ "../../../src/data/DataManager.js": @@ -1312,6 +3588,658 @@ module.exports = { }; +/***/ }), + +/***/ "../../../src/display/color/GetColorFromValue.js": +/*!*****************************************************************!*\ + !*** D:/wamp/www/phaser/src/display/color/GetColorFromValue.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Given a hex color value, such as 0xff00ff (for purple), it will return a + * numeric representation of it (i.e. 16711935) for use in WebGL tinting. + * + * @function Phaser.Display.Color.GetColorFromValue + * @since 3.50.0 + * + * @param {number} red - The hex color value, such as 0xff0000. + * + * @return {number} The combined color value. + */ +var GetColorFromValue = function (value) +{ + return (value >> 16) + (value & 0xff00) + ((value & 0xff) << 16); +}; + +module.exports = GetColorFromValue; + + +/***/ }), + +/***/ "../../../src/display/mask/BitmapMask.js": +/*!*********************************************************!*\ + !*** D:/wamp/www/phaser/src/display/mask/BitmapMask.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(/*! ../../utils/Class */ "../../../src/utils/Class.js"); +var GameEvents = __webpack_require__(/*! ../../core/events */ "../../../src/core/events/index.js"); + +/** + * @classdesc + * A Bitmap Mask combines the alpha (opacity) of a masked pixel with the alpha of another pixel. + * Unlike the Geometry Mask, which is a clipping path, a Bitmap Mask behaves like an alpha mask, + * not a clipping path. It is only available when using the WebGL Renderer. + * + * A Bitmap Mask can use any Game Object to determine the alpha of each pixel of the masked Game Object(s). + * For any given point of a masked Game Object's texture, the pixel's alpha will be multiplied by the alpha + * of the pixel at the same position in the Bitmap Mask's Game Object. The color of the pixel from the + * Bitmap Mask doesn't matter. + * + * For example, if a pure blue pixel with an alpha of 0.95 is masked with a pure red pixel with an + * alpha of 0.5, the resulting pixel will be pure blue with an alpha of 0.475. Naturally, this means + * that a pixel in the mask with an alpha of 0 will hide the corresponding pixel in all masked Game Objects + * A pixel with an alpha of 1 in the masked Game Object will receive the same alpha as the + * corresponding pixel in the mask. + * + * The Bitmap Mask's location matches the location of its Game Object, not the location of the + * masked objects. Moving or transforming the underlying Game Object will change the mask + * (and affect the visibility of any masked objects), whereas moving or transforming a masked object + * will not affect the mask. + * + * The Bitmap Mask will not render its Game Object by itself. If the Game Object is not in a + * Scene's display list, it will only be used for the mask and its full texture will not be directly + * visible. Adding the underlying Game Object to a Scene will not cause any problems - it will + * render as a normal Game Object and will also serve as a mask. + * + * @class BitmapMask + * @memberof Phaser.Display.Masks + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - The Scene which this Bitmap Mask will be used in. + * @param {Phaser.GameObjects.GameObject} renderable - A renderable Game Object that uses a texture, such as a Sprite. + */ +var BitmapMask = new Class({ + + initialize: + + function BitmapMask (scene, renderable) + { + var renderer = scene.sys.game.renderer; + + /** + * A reference to either the Canvas or WebGL Renderer that this Mask is using. + * + * @name Phaser.Display.Masks.BitmapMask#renderer + * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} + * @since 3.11.0 + */ + this.renderer = renderer; + + /** + * A renderable Game Object that uses a texture, such as a Sprite. + * + * @name Phaser.Display.Masks.BitmapMask#bitmapMask + * @type {Phaser.GameObjects.GameObject} + * @since 3.0.0 + */ + this.bitmapMask = renderable; + + /** + * The texture used for the mask's framebuffer. + * + * @name Phaser.Display.Masks.BitmapMask#maskTexture + * @type {WebGLTexture} + * @default null + * @since 3.0.0 + */ + this.maskTexture = null; + + /** + * The texture used for the main framebuffer. + * + * @name Phaser.Display.Masks.BitmapMask#mainTexture + * @type {WebGLTexture} + * @default null + * @since 3.0.0 + */ + this.mainTexture = null; + + /** + * Whether the Bitmap Mask is dirty and needs to be updated. + * + * @name Phaser.Display.Masks.BitmapMask#dirty + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.dirty = true; + + /** + * The framebuffer to which a masked Game Object is rendered. + * + * @name Phaser.Display.Masks.BitmapMask#mainFramebuffer + * @type {WebGLFramebuffer} + * @since 3.0.0 + */ + this.mainFramebuffer = null; + + /** + * The framebuffer to which the Bitmap Mask's masking Game Object is rendered. + * + * @name Phaser.Display.Masks.BitmapMask#maskFramebuffer + * @type {WebGLFramebuffer} + * @since 3.0.0 + */ + this.maskFramebuffer = null; + + /** + * The previous framebuffer set in the renderer before this one was enabled. + * + * @name Phaser.Display.Masks.BitmapMask#prevFramebuffer + * @type {WebGLFramebuffer} + * @since 3.17.0 + */ + this.prevFramebuffer = null; + + /** + * Whether to invert the masks alpha. + * + * If `true`, the alpha of the masking pixel will be inverted before it's multiplied with the masked pixel. Essentially, this means that a masked area will be visible only if the corresponding area in the mask is invisible. + * + * @name Phaser.Display.Masks.BitmapMask#invertAlpha + * @type {boolean} + * @since 3.1.2 + */ + this.invertAlpha = false; + + /** + * Is this mask a stencil mask? + * + * @name Phaser.Display.Masks.BitmapMask#isStencil + * @type {boolean} + * @readonly + * @since 3.17.0 + */ + this.isStencil = false; + + if (renderer && renderer.gl) + { + var width = renderer.width; + var height = renderer.height; + var pot = ((width & (width - 1)) === 0 && (height & (height - 1)) === 0); + var gl = renderer.gl; + var wrap = pot ? gl.REPEAT : gl.CLAMP_TO_EDGE; + var filter = gl.LINEAR; + + this.mainTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height); + this.maskTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height); + this.mainFramebuffer = renderer.createFramebuffer(width, height, this.mainTexture, true); + this.maskFramebuffer = renderer.createFramebuffer(width, height, this.maskTexture, true); + + scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, function (renderer) + { + var width = renderer.width; + var height = renderer.height; + var pot = ((width & (width - 1)) === 0 && (height & (height - 1)) === 0); + var gl = renderer.gl; + var wrap = pot ? gl.REPEAT : gl.CLAMP_TO_EDGE; + var filter = gl.LINEAR; + + this.mainTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height); + this.maskTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height); + this.mainFramebuffer = renderer.createFramebuffer(width, height, this.mainTexture, true); + this.maskFramebuffer = renderer.createFramebuffer(width, height, this.maskTexture, true); + + }, this); + } + }, + + /** + * Sets a new masking Game Object for the Bitmap Mask. + * + * @method Phaser.Display.Masks.BitmapMask#setBitmap + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} renderable - A renderable Game Object that uses a texture, such as a Sprite. + */ + setBitmap: function (renderable) + { + this.bitmapMask = renderable; + }, + + /** + * Prepares the WebGL Renderer to render a Game Object with this mask applied. + * + * This renders the masking Game Object to the mask framebuffer and switches to the main framebuffer so that the masked Game Object will be rendered to it instead of being rendered directly to the frame. + * + * @method Phaser.Display.Masks.BitmapMask#preRenderWebGL + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to prepare. + * @param {Phaser.GameObjects.GameObject} maskedObject - The masked Game Object which will be drawn. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to. + */ + preRenderWebGL: function (renderer, maskedObject, camera) + { + renderer.pipelines.BitmapMaskPipeline.beginMask(this, maskedObject, camera); + }, + + /** + * Finalizes rendering of a masked Game Object. + * + * This resets the previously bound framebuffer and switches the WebGL Renderer to the Bitmap Mask Pipeline, which uses a special fragment shader to apply the masking effect. + * + * @method Phaser.Display.Masks.BitmapMask#postRenderWebGL + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to clean up. + */ + postRenderWebGL: function (renderer, camera) + { + renderer.pipelines.BitmapMaskPipeline.endMask(this, camera); + }, + + /** + * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer. + * + * @method Phaser.Display.Masks.BitmapMask#preRenderCanvas + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to. + * @param {Phaser.GameObjects.GameObject} mask - The masked Game Object which would be rendered. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to. + */ + preRenderCanvas: function () + { + // NOOP + }, + + /** + * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer. + * + * @method Phaser.Display.Masks.BitmapMask#postRenderCanvas + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to. + */ + postRenderCanvas: function () + { + // NOOP + }, + + /** + * Destroys this BitmapMask and nulls any references it holds. + * + * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it, + * so be sure to call `clearMask` on any Game Object using it, before destroying it. + * + * @method Phaser.Display.Masks.BitmapMask#destroy + * @since 3.7.0 + */ + destroy: function () + { + this.bitmapMask = null; + + var renderer = this.renderer; + + if (renderer && renderer.gl) + { + renderer.deleteTexture(this.mainTexture); + renderer.deleteTexture(this.maskTexture); + renderer.deleteFramebuffer(this.mainFramebuffer); + renderer.deleteFramebuffer(this.maskFramebuffer); + } + + this.mainTexture = null; + this.maskTexture = null; + this.mainFramebuffer = null; + this.maskFramebuffer = null; + this.prevFramebuffer = null; + this.renderer = null; + } + +}); + +module.exports = BitmapMask; + + +/***/ }), + +/***/ "../../../src/display/mask/GeometryMask.js": +/*!***********************************************************!*\ + !*** D:/wamp/www/phaser/src/display/mask/GeometryMask.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(/*! ../../utils/Class */ "../../../src/utils/Class.js"); + +/** + * @classdesc + * A Geometry Mask can be applied to a Game Object to hide any pixels of it which don't intersect + * a visible pixel from the geometry mask. The mask is essentially a clipping path which can only + * make a masked pixel fully visible or fully invisible without changing its alpha (opacity). + * + * A Geometry Mask uses a Graphics Game Object to determine which pixels of the masked Game Object(s) + * should be clipped. For any given point of a masked Game Object's texture, the pixel will only be displayed + * if the Graphics Game Object of the Geometry Mask has a visible pixel at the same position. The color and + * alpha of the pixel from the Geometry Mask do not matter. + * + * The Geometry Mask's location matches the location of its Graphics object, not the location of the masked objects. + * Moving or transforming the underlying Graphics object will change the mask (and affect the visibility + * of any masked objects), whereas moving or transforming a masked object will not affect the mask. + * You can think of the Geometry Mask (or rather, of its Graphics object) as an invisible curtain placed + * in front of all masked objects which has its own visual properties and, naturally, respects the camera's + * visual properties, but isn't affected by and doesn't follow the masked objects by itself. + * + * @class GeometryMask + * @memberof Phaser.Display.Masks + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - This parameter is not used. + * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics Game Object to use for the Geometry Mask. Doesn't have to be in the Display List. + */ +var GeometryMask = new Class({ + + initialize: + + function GeometryMask (scene, graphicsGeometry) + { + /** + * The Graphics object which describes the Geometry Mask. + * + * @name Phaser.Display.Masks.GeometryMask#geometryMask + * @type {Phaser.GameObjects.Graphics} + * @since 3.0.0 + */ + this.geometryMask = graphicsGeometry; + + /** + * Similar to the BitmapMasks invertAlpha setting this to true will then hide all pixels + * drawn to the Geometry Mask. + * + * @name Phaser.Display.Masks.GeometryMask#invertAlpha + * @type {boolean} + * @since 3.16.0 + */ + this.invertAlpha = false; + + /** + * Is this mask a stencil mask? + * + * @name Phaser.Display.Masks.GeometryMask#isStencil + * @type {boolean} + * @readonly + * @since 3.17.0 + */ + this.isStencil = true; + + /** + * The current stencil level. + * + * @name Phaser.Display.Masks.GeometryMask#level + * @type {boolean} + * @private + * @since 3.17.0 + */ + this.level = 0; + }, + + /** + * Sets a new Graphics object for the Geometry Mask. + * + * @method Phaser.Display.Masks.GeometryMask#setShape + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics object which will be used for the Geometry Mask. + * + * @return {this} This Geometry Mask + */ + setShape: function (graphicsGeometry) + { + this.geometryMask = graphicsGeometry; + + return this; + }, + + /** + * Sets the `invertAlpha` property of this Geometry Mask. + * Inverting the alpha essentially flips the way the mask works. + * + * @method Phaser.Display.Masks.GeometryMask#setInvertAlpha + * @since 3.17.0 + * + * @param {boolean} [value=true] - Invert the alpha of this mask? + * + * @return {this} This Geometry Mask + */ + setInvertAlpha: function (value) + { + if (value === undefined) { value = true; } + + this.invertAlpha = value; + + return this; + }, + + /** + * Renders the Geometry Mask's underlying Graphics object to the OpenGL stencil buffer and enables the stencil test, which clips rendered pixels according to the mask. + * + * @method Phaser.Display.Masks.GeometryMask#preRenderWebGL + * @since 3.0.0 + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to. + * @param {Phaser.GameObjects.GameObject} child - The Game Object being rendered. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through. + */ + preRenderWebGL: function (renderer, child, camera) + { + var gl = renderer.gl; + + // Force flushing before drawing to stencil buffer + renderer.flush(); + + if (renderer.maskStack.length === 0) + { + gl.enable(gl.STENCIL_TEST); + gl.clear(gl.STENCIL_BUFFER_BIT); + + renderer.maskCount = 0; + } + + if (renderer.currentCameraMask.mask !== this) + { + renderer.currentMask.mask = this; + } + + renderer.maskStack.push({ mask: this, camera: camera }); + + this.applyStencil(renderer, camera, true); + + renderer.maskCount++; + }, + + /** + * Applies the current stencil mask to the renderer. + * + * @method Phaser.Display.Masks.GeometryMask#applyStencil + * @since 3.17.0 + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through. + * @param {boolean} inc - Is this an INCR stencil or a DECR stencil? + */ + applyStencil: function (renderer, camera, inc) + { + var gl = renderer.gl; + var geometryMask = this.geometryMask; + var level = renderer.maskCount; + + gl.colorMask(false, false, false, false); + + if (inc) + { + gl.stencilFunc(gl.EQUAL, level, 0xFF); + gl.stencilOp(gl.KEEP, gl.KEEP, gl.INCR); + } + else + { + gl.stencilFunc(gl.EQUAL, level + 1, 0xFF); + gl.stencilOp(gl.KEEP, gl.KEEP, gl.DECR); + } + + // Write stencil buffer + geometryMask.renderWebGL(renderer, geometryMask, 0, camera); + + renderer.flush(); + + gl.colorMask(true, true, true, true); + gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP); + + if (inc) + { + if (this.invertAlpha) + { + gl.stencilFunc(gl.NOTEQUAL, level + 1, 0xFF); + } + else + { + gl.stencilFunc(gl.EQUAL, level + 1, 0xFF); + } + } + else if (this.invertAlpha) + { + gl.stencilFunc(gl.NOTEQUAL, level, 0xFF); + } + else + { + gl.stencilFunc(gl.EQUAL, level, 0xFF); + } + }, + + /** + * Flushes all rendered pixels and disables the stencil test of a WebGL context, thus disabling the mask for it. + * + * @method Phaser.Display.Masks.GeometryMask#postRenderWebGL + * @since 3.0.0 + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw flush. + */ + postRenderWebGL: function (renderer) + { + var gl = renderer.gl; + + renderer.maskStack.pop(); + + renderer.maskCount--; + + if (renderer.maskStack.length === 0) + { + // If this is the only mask in the stack, flush and disable + renderer.flush(); + + renderer.currentMask.mask = null; + + gl.disable(gl.STENCIL_TEST); + } + else + { + // Force flush before disabling stencil test + renderer.flush(); + + var prev = renderer.maskStack[renderer.maskStack.length - 1]; + + prev.mask.applyStencil(renderer, prev.camera, false); + + if (renderer.currentCameraMask.mask !== prev.mask) + { + renderer.currentMask.mask = prev.mask; + renderer.currentMask.camera = prev.camera; + } + else + { + renderer.currentMask.mask = null; + } + } + }, + + /** + * Sets the clipping path of a 2D canvas context to the Geometry Mask's underlying Graphics object. + * + * @method Phaser.Display.Masks.GeometryMask#preRenderCanvas + * @since 3.0.0 + * + * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance to set the clipping path on. + * @param {Phaser.GameObjects.GameObject} mask - The Game Object being rendered. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through. + */ + preRenderCanvas: function (renderer, mask, camera) + { + var geometryMask = this.geometryMask; + + renderer.currentContext.save(); + + geometryMask.renderCanvas(renderer, geometryMask, 0, camera, null, null, true); + + renderer.currentContext.clip(); + }, + + /** + * Restore the canvas context's previous clipping path, thus turning off the mask for it. + * + * @method Phaser.Display.Masks.GeometryMask#postRenderCanvas + * @since 3.0.0 + * + * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance being restored. + */ + postRenderCanvas: function (renderer) + { + renderer.currentContext.restore(); + }, + + /** + * Destroys this GeometryMask and nulls any references it holds. + * + * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it, + * so be sure to call `clearMask` on any Game Object using it, before destroying it. + * + * @method Phaser.Display.Masks.GeometryMask#destroy + * @since 3.7.0 + */ + destroy: function () + { + this.geometryMask = null; + } + +}); + +module.exports = GeometryMask; + + /***/ }), /***/ "../../../src/gameobjects/BuildGameObject.js": @@ -2188,6 +5116,1748 @@ GameObject.RENDER_MASK = 15; module.exports = GameObject; +/***/ }), + +/***/ "../../../src/gameobjects/components/Alpha.js": +/*!**************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/Alpha.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Clamp = __webpack_require__(/*! ../../math/Clamp */ "../../../src/math/Clamp.js"); + +// bitmask flag for GameObject.renderMask +var _FLAG = 2; // 0010 + +/** + * Provides methods used for setting the alpha properties of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.Alpha + * @since 3.0.0 + */ + +var Alpha = { + + /** + * Private internal value. Holds the global alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alpha + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alpha: 1, + + /** + * Private internal value. Holds the top-left alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alphaTL + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alphaTL: 1, + + /** + * Private internal value. Holds the top-right alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alphaTR + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alphaTR: 1, + + /** + * Private internal value. Holds the bottom-left alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alphaBL + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alphaBL: 1, + + /** + * Private internal value. Holds the bottom-right alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alphaBR + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alphaBR: 1, + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + * + * @method Phaser.GameObjects.Components.Alpha#clearAlpha + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + clearAlpha: function () + { + return this.setAlpha(1); + }, + + /** + * 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. + * + * If your game is running under WebGL you can optionally specify four different alpha values, each of which + * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. + * + * @method Phaser.GameObjects.Components.Alpha#setAlpha + * @since 3.0.0 + * + * @param {number} [topLeft=1] - The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. + * @param {number} [topRight] - The alpha value used for the top-right of the Game Object. WebGL only. + * @param {number} [bottomLeft] - The alpha value used for the bottom-left of the Game Object. WebGL only. + * @param {number} [bottomRight] - The alpha value used for the bottom-right of the Game Object. WebGL only. + * + * @return {this} This Game Object instance. + */ + setAlpha: function (topLeft, topRight, bottomLeft, bottomRight) + { + if (topLeft === undefined) { topLeft = 1; } + + // Treat as if there is only one alpha value for the whole Game Object + if (topRight === undefined) + { + this.alpha = topLeft; + } + else + { + this._alphaTL = Clamp(topLeft, 0, 1); + this._alphaTR = Clamp(topRight, 0, 1); + this._alphaBL = Clamp(bottomLeft, 0, 1); + this._alphaBR = Clamp(bottomRight, 0, 1); + } + + return this; + }, + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + * + * @name Phaser.GameObjects.Components.Alpha#alpha + * @type {number} + * @since 3.0.0 + */ + alpha: { + + get: function () + { + return this._alpha; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alpha = v; + this._alphaTL = v; + this._alphaTR = v; + this._alphaBL = v; + this._alphaBR = v; + + if (v === 0) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The alpha value starting from the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Alpha#alphaTopLeft + * @type {number} + * @webglOnly + * @since 3.0.0 + */ + alphaTopLeft: { + + get: function () + { + return this._alphaTL; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alphaTL = v; + + if (v !== 0) + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The alpha value starting from the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Alpha#alphaTopRight + * @type {number} + * @webglOnly + * @since 3.0.0 + */ + alphaTopRight: { + + get: function () + { + return this._alphaTR; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alphaTR = v; + + if (v !== 0) + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The alpha value starting from the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Alpha#alphaBottomLeft + * @type {number} + * @webglOnly + * @since 3.0.0 + */ + alphaBottomLeft: { + + get: function () + { + return this._alphaBL; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alphaBL = v; + + if (v !== 0) + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The alpha value starting from the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Alpha#alphaBottomRight + * @type {number} + * @webglOnly + * @since 3.0.0 + */ + alphaBottomRight: { + + get: function () + { + return this._alphaBR; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alphaBR = v; + + if (v !== 0) + { + this.renderFlags |= _FLAG; + } + } + + } + +}; + +module.exports = Alpha; + + +/***/ }), + +/***/ "../../../src/gameobjects/components/AlphaSingle.js": +/*!********************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/AlphaSingle.js ***! + \********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Clamp = __webpack_require__(/*! ../../math/Clamp */ "../../../src/math/Clamp.js"); + +// bitmask flag for GameObject.renderMask +var _FLAG = 2; // 0010 + +/** + * Provides methods used for setting the alpha property of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.AlphaSingle + * @since 3.22.0 + */ + +var AlphaSingle = { + + /** + * Private internal value. Holds the global alpha value. + * + * @name Phaser.GameObjects.Components.AlphaSingle#_alpha + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alpha: 1, + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + * + * @method Phaser.GameObjects.Components.AlphaSingle#clearAlpha + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + clearAlpha: function () + { + return this.setAlpha(1); + }, + + /** + * 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. + * + * @method Phaser.GameObjects.Components.AlphaSingle#setAlpha + * @since 3.0.0 + * + * @param {number} [value=1] - The alpha value applied across the whole Game Object. + * + * @return {this} This Game Object instance. + */ + setAlpha: function (value) + { + if (value === undefined) { value = 1; } + + this.alpha = value; + + return this; + }, + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + * + * @name Phaser.GameObjects.Components.AlphaSingle#alpha + * @type {number} + * @since 3.0.0 + */ + alpha: { + + get: function () + { + return this._alpha; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alpha = v; + + if (v === 0) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + } + + } + +}; + +module.exports = AlphaSingle; + + +/***/ }), + +/***/ "../../../src/gameobjects/components/Animation.js": +/*!******************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/Animation.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var BaseAnimation = __webpack_require__(/*! ../../animations/Animation */ "../../../src/animations/Animation.js"); +var Class = __webpack_require__(/*! ../../utils/Class */ "../../../src/utils/Class.js"); +var Events = __webpack_require__(/*! ../../animations/events */ "../../../src/animations/events/index.js"); + +/** + * @classdesc + * A Game Object Animation Controller. + * + * This controller lives as an instance within a Game Object, accessible as `sprite.anims`. + * + * @class Animation + * @memberof Phaser.GameObjects.Components + * @constructor + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} parent - The Game Object to which this animation controller belongs. + */ +var Animation = new Class({ + + initialize: + + function Animation (parent) + { + /** + * The Game Object to which this animation controller belongs. + * + * @name Phaser.GameObjects.Components.Animation#parent + * @type {Phaser.GameObjects.GameObject} + * @since 3.0.0 + */ + this.parent = parent; + + /** + * A reference to the global Animation Manager. + * + * @name Phaser.GameObjects.Components.Animation#animationManager + * @type {Phaser.Animations.AnimationManager} + * @since 3.0.0 + */ + this.animationManager = parent.scene.sys.anims; + + this.animationManager.once(Events.REMOVE_ANIMATION, this.remove, this); + + /** + * Is an animation currently playing or not? + * + * @name Phaser.GameObjects.Components.Animation#isPlaying + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.isPlaying = false; + + /** + * The current Animation loaded into this Animation Controller. + * + * @name Phaser.GameObjects.Components.Animation#currentAnim + * @type {?Phaser.Animations.Animation} + * @default null + * @since 3.0.0 + */ + this.currentAnim = null; + + /** + * The current AnimationFrame being displayed by this Animation Controller. + * + * @name Phaser.GameObjects.Components.Animation#currentFrame + * @type {?Phaser.Animations.AnimationFrame} + * @default null + * @since 3.0.0 + */ + this.currentFrame = null; + + /** + * The key of the next Animation to be loaded into this Animation Controller when the current animation completes. + * + * @name Phaser.GameObjects.Components.Animation#nextAnim + * @type {?string} + * @default null + * @since 3.16.0 + */ + this.nextAnim = null; + + /** + * A queue of keys of the next Animations to be loaded into this Animation Controller when the current animation completes. + * + * @name Phaser.GameObjects.Components.Animation#nextAnimsQueue + * @type {string[]} + * @since 3.24.0 + */ + this.nextAnimsQueue = []; + + /** + * Time scale factor. + * + * @name Phaser.GameObjects.Components.Animation#_timeScale + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + this._timeScale = 1; + + /** + * The frame rate of playback in frames per second. + * The default is 24 if the `duration` property is `null`. + * + * @name Phaser.GameObjects.Components.Animation#frameRate + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.frameRate = 0; + + /** + * How long the animation should play for, in milliseconds. + * If the `frameRate` property has been set then it overrides this value, + * otherwise the `frameRate` is derived from `duration`. + * + * @name Phaser.GameObjects.Components.Animation#duration + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.duration = 0; + + /** + * ms per frame, not including frame specific modifiers that may be present in the Animation data. + * + * @name Phaser.GameObjects.Components.Animation#msPerFrame + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.msPerFrame = 0; + + /** + * Skip frames if the time lags, or always advanced anyway? + * + * @name Phaser.GameObjects.Components.Animation#skipMissedFrames + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.skipMissedFrames = true; + + /** + * A delay before starting playback, in milliseconds. + * + * @name Phaser.GameObjects.Components.Animation#_delay + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._delay = 0; + + /** + * Number of times to repeat the animation (-1 for infinity) + * + * @name Phaser.GameObjects.Components.Animation#_repeat + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._repeat = 0; + + /** + * Delay before the repeat starts, in milliseconds. + * + * @name Phaser.GameObjects.Components.Animation#_repeatDelay + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._repeatDelay = 0; + + /** + * Should the animation yoyo? (reverse back down to the start) before repeating? + * + * @name Phaser.GameObjects.Components.Animation#_yoyo + * @type {boolean} + * @private + * @default false + * @since 3.0.0 + */ + this._yoyo = false; + + /** + * Will the playhead move forwards (`true`) or in reverse (`false`). + * + * @name Phaser.GameObjects.Components.Animation#forward + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.forward = true; + + /** + * An Internal trigger that's play the animation in reverse mode ('true') or not ('false'), + * needed because forward can be changed by yoyo feature. + * + * @name Phaser.GameObjects.Components.Animation#_reverse + * @type {boolean} + * @default false + * @private + * @since 3.12.0 + */ + this._reverse = false; + + /** + * Internal time overflow accumulator. + * + * @name Phaser.GameObjects.Components.Animation#accumulator + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.accumulator = 0; + + /** + * The time point at which the next animation frame will change. + * + * @name Phaser.GameObjects.Components.Animation#nextTick + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.nextTick = 0; + + /** + * An internal counter keeping track of how many repeats are left to play. + * + * @name Phaser.GameObjects.Components.Animation#repeatCounter + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.repeatCounter = 0; + + /** + * An internal flag keeping track of pending repeats. + * + * @name Phaser.GameObjects.Components.Animation#pendingRepeat + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.pendingRepeat = false; + + /** + * Is the Animation paused? + * + * @name Phaser.GameObjects.Components.Animation#_paused + * @type {boolean} + * @private + * @default false + * @since 3.0.0 + */ + this._paused = false; + + /** + * Was the animation previously playing before being paused? + * + * @name Phaser.GameObjects.Components.Animation#_wasPlaying + * @type {boolean} + * @private + * @default false + * @since 3.0.0 + */ + this._wasPlaying = false; + + /** + * Internal property tracking if this Animation is waiting to stop. + * + * 0 = No + * 1 = Waiting for ms to pass + * 2 = Waiting for repeat + * 3 = Waiting for specific frame + * + * @name Phaser.GameObjects.Components.Animation#_pendingStop + * @type {integer} + * @private + * @since 3.4.0 + */ + this._pendingStop = 0; + + /** + * Internal property used by _pendingStop. + * + * @name Phaser.GameObjects.Components.Animation#_pendingStopValue + * @type {any} + * @private + * @since 3.4.0 + */ + this._pendingStopValue; + }, + + /** + * Sets an animation to be played immediately after the current one completes. + * + * The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc, or have the `stop` method called directly on it. + * + * An animation set to repeat forever will never enter a completed state. + * + * You can chain a new animation at any point, including before the current one starts playing, during it, or when it ends (via its `animationcomplete` callback). + * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained animations without impacting the global animation they're playing. + * + * Call this method with no arguments to reset the chained animation. + * + * @method Phaser.GameObjects.Components.Animation#chain + * @since 3.16.0 + * + * @param {(string|Phaser.Animations.Animation)} [key] - The string-based key of the animation to play next, as defined previously in the Animation Manager. Or an Animation instance. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + chain: function (key) + { + if (key instanceof BaseAnimation) + { + key = key.key; + } + + if (this.nextAnim === null) + { + this.nextAnim = key; + } + else + { + this.nextAnimsQueue.push(key); + } + + return this.parent; + }, + + /** + * Sets the amount of time, in milliseconds, that the animation will be delayed before starting playback. + * + * @method Phaser.GameObjects.Components.Animation#setDelay + * @since 3.4.0 + * + * @param {integer} [value=0] - The amount of time, in milliseconds, to wait before starting playback. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + setDelay: function (value) + { + if (value === undefined) { value = 0; } + + this._delay = value; + + return this.parent; + }, + + /** + * Gets the amount of time, in milliseconds that the animation will be delayed before starting playback. + * + * @method Phaser.GameObjects.Components.Animation#getDelay + * @since 3.4.0 + * + * @return {integer} The amount of time, in milliseconds, the Animation will wait before starting playback. + */ + getDelay: function () + { + return this._delay; + }, + + /** + * Waits for the specified delay, in milliseconds, then starts playback of the requested animation. + * + * @method Phaser.GameObjects.Components.Animation#delayedPlay + * @since 3.0.0 + * + * @param {integer} delay - The delay, in milliseconds, to wait before starting the animation playing. + * @param {string} key - The key of the animation to play. + * @param {integer} [startFrame=0] - The frame of the animation to start from. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + delayedPlay: function (delay, key, startFrame) + { + this.play(key, true, startFrame); + + this.nextTick += delay; + + return this.parent; + }, + + /** + * Returns the key of the animation currently loaded into this component. + * + * @method Phaser.GameObjects.Components.Animation#getCurrentKey + * @since 3.0.0 + * + * @return {string} The key of the Animation loaded into this component. + */ + getCurrentKey: function () + { + if (this.currentAnim) + { + return this.currentAnim.key; + } + }, + + /** + * Internal method used to load an animation into this component. + * + * @method Phaser.GameObjects.Components.Animation#load + * @protected + * @since 3.0.0 + * + * @param {string} key - The key of the animation to load. + * @param {integer} [startFrame=0] - The start frame of the animation to load. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + load: function (key, startFrame) + { + if (startFrame === undefined) { startFrame = 0; } + + if (this.isPlaying) + { + this.stop(); + } + + // Load the new animation in + this.animationManager.load(this, key, startFrame); + + return this.parent; + }, + + /** + * Pause the current animation and set the `isPlaying` property to `false`. + * You can optionally pause it at a specific frame. + * + * @method Phaser.GameObjects.Components.Animation#pause + * @since 3.0.0 + * + * @param {Phaser.Animations.AnimationFrame} [atFrame] - An optional frame to set after pausing the animation. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + pause: function (atFrame) + { + if (!this._paused) + { + this._paused = true; + this._wasPlaying = this.isPlaying; + this.isPlaying = false; + } + + if (atFrame !== undefined) + { + this.updateFrame(atFrame); + } + + return this.parent; + }, + + /** + * Resumes playback of a paused animation and sets the `isPlaying` property to `true`. + * You can optionally tell it to start playback from a specific frame. + * + * @method Phaser.GameObjects.Components.Animation#resume + * @since 3.0.0 + * + * @param {Phaser.Animations.AnimationFrame} [fromFrame] - An optional frame to set before restarting playback. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + resume: function (fromFrame) + { + if (this._paused) + { + this._paused = false; + this.isPlaying = this._wasPlaying; + } + + if (fromFrame !== undefined) + { + this.updateFrame(fromFrame); + } + + return this.parent; + }, + + /** + * `true` if the current animation is paused, otherwise `false`. + * + * @name Phaser.GameObjects.Components.Animation#isPaused + * @readonly + * @type {boolean} + * @since 3.4.0 + */ + isPaused: { + + get: function () + { + return this._paused; + } + + }, + + /** + * Plays an Animation on a Game Object that has the Animation component, such as a Sprite. + * + * Animations are stored in the global Animation Manager and are referenced by a unique string-based key. + * + * @method Phaser.GameObjects.Components.Animation#play + * @fires Phaser.GameObjects.Components.Animation#onStartEvent + * @since 3.0.0 + * + * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance. + * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call. + * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + play: function (key, ignoreIfPlaying, startFrame) + { + if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } + if (startFrame === undefined) { startFrame = 0; } + + if (key instanceof BaseAnimation) + { + key = key.key; + } + + if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key) + { + return this.parent; + } + + this.forward = true; + this._reverse = false; + this._paused = false; + this._wasPlaying = true; + + return this._startAnimation(key, startFrame); + }, + + /** + * Plays an Animation (in reverse mode) on the Game Object that owns this Animation Component. + * + * @method Phaser.GameObjects.Components.Animation#playReverse + * @fires Phaser.GameObjects.Components.Animation#onStartEvent + * @since 3.12.0 + * + * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance. + * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. + * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + playReverse: function (key, ignoreIfPlaying, startFrame) + { + if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } + if (startFrame === undefined) { startFrame = 0; } + + if (key instanceof BaseAnimation) + { + key = key.key; + } + + if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key) + { + return this.parent; + } + + this.forward = false; + this._reverse = true; + + return this._startAnimation(key, startFrame); + }, + + /** + * Load an Animation and fires 'onStartEvent' event, extracted from 'play' method. + * + * @method Phaser.GameObjects.Components.Animation#_startAnimation + * @fires Phaser.Animations.Events#ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START + * @since 3.12.0 + * + * @param {string} key - The string-based key of the animation to play, as defined previously in the Animation Manager. + * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + _startAnimation: function (key, startFrame) + { + this.load(key, startFrame); + + var anim = this.currentAnim; + var gameObject = this.parent; + + if (!anim) + { + return gameObject; + } + + // Should give us 9,007,199,254,740,991 safe repeats + this.repeatCounter = (this._repeat === -1) ? Number.MAX_VALUE : this._repeat; + + anim.getFirstTick(this); + + this.isPlaying = true; + this.pendingRepeat = false; + + if (anim.showOnStart) + { + gameObject.visible = true; + } + + var frame = this.currentFrame; + + anim.emit(Events.ANIMATION_START, anim, frame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_KEY_START + key, anim, frame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_START, anim, frame, gameObject); + + return gameObject; + }, + + /** + * Reverse the Animation that is already playing on the Game Object. + * + * @method Phaser.GameObjects.Components.Animation#reverse + * @since 3.12.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + reverse: function () + { + if (this.isPlaying) + { + this._reverse = !this._reverse; + + this.forward = !this.forward; + } + + return this.parent; + }, + + /** + * Returns a value between 0 and 1 indicating how far this animation is through, ignoring repeats and yoyos. + * If the animation has a non-zero repeat defined, `getProgress` and `getTotalProgress` will be different + * because `getProgress` doesn't include any repeats or repeat delays, whereas `getTotalProgress` does. + * + * @method Phaser.GameObjects.Components.Animation#getProgress + * @since 3.4.0 + * + * @return {number} The progress of the current animation, between 0 and 1. + */ + getProgress: function () + { + var p = this.currentFrame.progress; + + if (!this.forward) + { + p = 1 - p; + } + + return p; + }, + + /** + * Takes a value between 0 and 1 and uses it to set how far this animation is through playback. + * Does not factor in repeats or yoyos, but does handle playing forwards or backwards. + * + * @method Phaser.GameObjects.Components.Animation#setProgress + * @since 3.4.0 + * + * @param {number} [value=0] - The progress value, between 0 and 1. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + setProgress: function (value) + { + if (!this.forward) + { + value = 1 - value; + } + + this.setCurrentFrame(this.currentAnim.getFrameByProgress(value)); + + return this.parent; + }, + + /** + * Handle the removal of an animation from the Animation Manager. + * + * @method Phaser.GameObjects.Components.Animation#remove + * @since 3.0.0 + * + * @param {string} [key] - The key of the removed Animation. + * @param {Phaser.Animations.Animation} [animation] - The removed Animation. + */ + remove: function (key, animation) + { + if (animation === undefined) { animation = this.currentAnim; } + + if (this.isPlaying && animation.key === this.currentAnim.key) + { + this.stop(); + + this.setCurrentFrame(this.currentAnim.frames[0]); + } + }, + + /** + * Gets the number of times that the animation will repeat + * after its first iteration. For example, if returns 1, the animation will + * play a total of twice (the initial play plus 1 repeat). + * A value of -1 means the animation will repeat indefinitely. + * + * @method Phaser.GameObjects.Components.Animation#getRepeat + * @since 3.4.0 + * + * @return {integer} The number of times that the animation will repeat. + */ + getRepeat: function () + { + return this._repeat; + }, + + /** + * Sets the number of times that the animation should repeat + * after its first iteration. For example, if repeat is 1, the animation will + * play a total of twice (the initial play plus 1 repeat). + * To repeat indefinitely, use -1. repeat should always be an integer. + * + * @method Phaser.GameObjects.Components.Animation#setRepeat + * @since 3.4.0 + * + * @param {integer} value - The number of times that the animation should repeat. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + setRepeat: function (value) + { + this._repeat = value; + + this.repeatCounter = (value === -1) ? Number.MAX_VALUE : value; + + return this.parent; + }, + + /** + * Gets the amount of delay between repeats, if any. + * + * @method Phaser.GameObjects.Components.Animation#getRepeatDelay + * @since 3.4.0 + * + * @return {number} The delay between repeats. + */ + getRepeatDelay: function () + { + return this._repeatDelay; + }, + + /** + * Sets the amount of time in seconds between repeats. + * For example, if `repeat` is 2 and `repeatDelay` is 10, the animation will play initially, + * then wait for 10 seconds before repeating, then play again, then wait another 10 seconds + * before doing its final repeat. + * + * @method Phaser.GameObjects.Components.Animation#setRepeatDelay + * @since 3.4.0 + * + * @param {number} value - The delay to wait between repeats, in seconds. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + setRepeatDelay: function (value) + { + this._repeatDelay = value; + + return this.parent; + }, + + /** + * Restarts the current animation from its beginning, optionally including its delay value. + * + * @method Phaser.GameObjects.Components.Animation#restart + * @fires Phaser.Animations.Events#ANIMATION_RESTART + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_RESTART + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART + * @since 3.0.0 + * + * @param {boolean} [includeDelay=false] - Whether to include the delay value of the animation when restarting. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + restart: function (includeDelay) + { + if (includeDelay === undefined) { includeDelay = false; } + + var anim = this.currentAnim; + + anim.getFirstTick(this, includeDelay); + + this.forward = true; + this.isPlaying = true; + this.pendingRepeat = false; + this._paused = false; + + // Set frame + this.updateFrame(anim.frames[0]); + + var gameObject = this.parent; + var frame = this.currentFrame; + + anim.emit(Events.ANIMATION_RESTART, anim, frame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_KEY_RESTART + anim.key, anim, frame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_RESTART, anim, frame, gameObject); + + return this.parent; + }, + + /** + * Immediately stops the current animation from playing and dispatches the `animationcomplete` event. + * + * If no animation is set, no event will be dispatched. + * + * If there is another animation queued (via the `chain` method) then it will start playing immediately. + * + * @method Phaser.GameObjects.Components.Animation#stop + * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent + * @since 3.0.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stop: function () + { + this._pendingStop = 0; + + this.isPlaying = false; + + var gameObject = this.parent; + var anim = this.currentAnim; + var frame = this.currentFrame; + + if (anim) + { + anim.emit(Events.ANIMATION_COMPLETE, anim, frame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_KEY_COMPLETE + anim.key, anim, frame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_COMPLETE, anim, frame, gameObject); + } + + if (this.nextAnim) + { + var key = this.nextAnim; + + this.nextAnim = (this.nextAnimsQueue.length > 0) ? this.nextAnimsQueue.shift() : null; + + this.play(key); + } + + return gameObject; + }, + + /** + * Stops the current animation from playing after the specified time delay, given in milliseconds. + * + * @method Phaser.GameObjects.Components.Animation#stopAfterDelay + * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent + * @since 3.4.0 + * + * @param {integer} delay - The number of milliseconds to wait before stopping this animation. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stopAfterDelay: function (delay) + { + this._pendingStop = 1; + this._pendingStopValue = delay; + + return this.parent; + }, + + /** + * Stops the current animation from playing when it next repeats. + * + * @method Phaser.GameObjects.Components.Animation#stopOnRepeat + * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent + * @since 3.4.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stopOnRepeat: function () + { + this._pendingStop = 2; + + return this.parent; + }, + + /** + * Stops the current animation from playing when it next sets the given frame. + * If this frame doesn't exist within the animation it will not stop it from playing. + * + * @method Phaser.GameObjects.Components.Animation#stopOnFrame + * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent + * @since 3.4.0 + * + * @param {Phaser.Animations.AnimationFrame} frame - The frame to check before stopping this animation. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stopOnFrame: function (frame) + { + this._pendingStop = 3; + this._pendingStopValue = frame; + + return this.parent; + }, + + /** + * Sets the Time Scale factor, allowing you to make the animation go go faster or slower than default. + * Where 1 = normal speed (the default), 0.5 = half speed, 2 = double speed, etc. + * + * @method Phaser.GameObjects.Components.Animation#setTimeScale + * @since 3.4.0 + * + * @param {number} [value=1] - The time scale factor, where 1 is no change, 0.5 is half speed, etc. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + setTimeScale: function (value) + { + if (value === undefined) { value = 1; } + + this._timeScale = value; + + return this.parent; + }, + + /** + * Gets the Time Scale factor. + * + * @method Phaser.GameObjects.Components.Animation#getTimeScale + * @since 3.4.0 + * + * @return {number} The Time Scale value. + */ + getTimeScale: function () + { + return this._timeScale; + }, + + /** + * Returns the total number of frames in this animation. + * + * @method Phaser.GameObjects.Components.Animation#getTotalFrames + * @since 3.4.0 + * + * @return {integer} The total number of frames in this animation. + */ + getTotalFrames: function () + { + return this.currentAnim.frames.length; + }, + + /** + * The internal update loop for the Animation Component. + * + * @method Phaser.GameObjects.Components.Animation#update + * @since 3.0.0 + * + * @param {number} time - The current timestamp. + * @param {number} delta - The delta time, in ms, elapsed since the last frame. + */ + update: function (time, delta) + { + if (!this.currentAnim || !this.isPlaying || this.currentAnim.paused) + { + return; + } + + this.accumulator += delta * this._timeScale; + + if (this._pendingStop === 1) + { + this._pendingStopValue -= delta; + + if (this._pendingStopValue <= 0) + { + return this.currentAnim.completeAnimation(this); + } + } + + if (this.accumulator >= this.nextTick) + { + this.currentAnim.setFrame(this); + } + }, + + /** + * Sets the given Animation Frame as being the current frame + * and applies it to the parent Game Object, adjusting its size and origin as needed. + * + * @method Phaser.GameObjects.Components.Animation#setCurrentFrame + * @since 3.4.0 + * + * @param {Phaser.Animations.AnimationFrame} animationFrame - The Animation Frame to set as being current. + * + * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. + */ + setCurrentFrame: function (animationFrame) + { + var gameObject = this.parent; + + this.currentFrame = animationFrame; + + gameObject.texture = animationFrame.frame.texture; + gameObject.frame = animationFrame.frame; + + if (gameObject.isCropped) + { + gameObject.frame.updateCropUVs(gameObject._crop, gameObject.flipX, gameObject.flipY); + } + + gameObject.setSizeToFrame(); + + if (gameObject._originComponent) + { + if (animationFrame.frame.customPivot) + { + gameObject.setOrigin(animationFrame.frame.pivotX, animationFrame.frame.pivotY); + } + else + { + gameObject.updateDisplayOrigin(); + } + } + + return gameObject; + }, + + /** + * Internal frame change handler. + * + * @method Phaser.GameObjects.Components.Animation#updateFrame + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE + * @private + * @since 3.0.0 + * + * @param {Phaser.Animations.AnimationFrame} animationFrame - The animation frame to change to. + */ + updateFrame: function (animationFrame) + { + var gameObject = this.setCurrentFrame(animationFrame); + + if (this.isPlaying) + { + if (animationFrame.setAlpha) + { + gameObject.alpha = animationFrame.alpha; + } + + var anim = this.currentAnim; + + gameObject.emit(Events.SPRITE_ANIMATION_KEY_UPDATE + anim.key, anim, animationFrame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_UPDATE, anim, animationFrame, gameObject); + + if (this._pendingStop === 3 && this._pendingStopValue === animationFrame) + { + this.currentAnim.completeAnimation(this); + } + } + }, + + /** + * Advances the animation to the next frame, regardless of the time or animation state. + * If the animation is set to repeat, or yoyo, this will still take effect. + * + * Calling this does not change the direction of the animation. I.e. if it was currently + * playing in reverse, calling this method doesn't then change the direction to forwards. + * + * @method Phaser.GameObjects.Components.Animation#nextFrame + * @since 3.16.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. + */ + nextFrame: function () + { + if (this.currentAnim) + { + this.currentAnim.nextFrame(this); + } + + return this.parent; + }, + + /** + * Advances the animation to the previous frame, regardless of the time or animation state. + * If the animation is set to repeat, or yoyo, this will still take effect. + * + * Calling this does not change the direction of the animation. I.e. if it was currently + * playing in forwards, calling this method doesn't then change the direction to backwards. + * + * @method Phaser.GameObjects.Components.Animation#previousFrame + * @since 3.16.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. + */ + previousFrame: function () + { + if (this.currentAnim) + { + this.currentAnim.previousFrame(this); + } + + return this.parent; + }, + + /** + * Sets if the current Animation will yoyo when it reaches the end. + * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again. + * + * @method Phaser.GameObjects.Components.Animation#setYoyo + * @since 3.4.0 + * + * @param {boolean} [value=false] - `true` if the animation should yoyo, `false` to not. + * + * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. + */ + setYoyo: function (value) + { + if (value === undefined) { value = false; } + + this._yoyo = value; + + return this.parent; + }, + + /** + * Gets if the current Animation will yoyo when it reaches the end. + * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again. + * + * @method Phaser.GameObjects.Components.Animation#getYoyo + * @since 3.4.0 + * + * @return {boolean} `true` if the animation is set to yoyo, `false` if not. + */ + getYoyo: function () + { + return this._yoyo; + }, + + /** + * Destroy this Animation component. + * + * Unregisters event listeners and cleans up its references. + * + * @method Phaser.GameObjects.Components.Animation#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.animationManager.off(Events.REMOVE_ANIMATION, this.remove, this); + + this.animationManager = null; + this.parent = null; + this.nextAnimsQueue.length = 0; + + this.currentAnim = null; + this.currentFrame = null; + } + +}); + +module.exports = Animation; + + +/***/ }), + +/***/ "../../../src/gameobjects/components/BlendMode.js": +/*!******************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/BlendMode.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var BlendModes = __webpack_require__(/*! ../../renderer/BlendModes */ "../../../src/renderer/BlendModes.js"); + +/** + * Provides methods used for setting the blend mode of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.BlendMode + * @since 3.0.0 + */ + +var BlendMode = { + + /** + * Private internal value. Holds the current blend mode. + * + * @name Phaser.GameObjects.Components.BlendMode#_blendMode + * @type {integer} + * @private + * @default 0 + * @since 3.0.0 + */ + _blendMode: BlendModes.NORMAL, + + /** + * 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: + * + * * 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. + * + * @name Phaser.GameObjects.Components.BlendMode#blendMode + * @type {(Phaser.BlendModes|string)} + * @since 3.0.0 + */ + blendMode: { + + get: function () + { + return this._blendMode; + }, + + set: function (value) + { + if (typeof value === 'string') + { + value = BlendModes[value]; + } + + value |= 0; + + if (value >= -1) + { + this._blendMode = value; + } + } + + }, + + /** + * 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: + * + * * 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. + * + * @method Phaser.GameObjects.Components.BlendMode#setBlendMode + * @since 3.0.0 + * + * @param {(string|Phaser.BlendModes)} value - The BlendMode value. Either a string or a CONST. + * + * @return {this} This Game Object instance. + */ + setBlendMode: function (value) + { + this.blendMode = value; + + return this; + } + +}; + +module.exports = BlendMode; + + /***/ }), /***/ "../../../src/gameobjects/components/ComputedSize.js": @@ -2342,6 +7012,136 @@ var ComputedSize = { module.exports = ComputedSize; +/***/ }), + +/***/ "../../../src/gameobjects/components/Crop.js": +/*!*************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/Crop.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for getting and setting the texture of a Game Object. + * + * @namespace Phaser.GameObjects.Components.Crop + * @since 3.12.0 + */ + +var Crop = { + + /** + * The Texture this Game Object is using to render with. + * + * @name Phaser.GameObjects.Components.Crop#texture + * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture} + * @since 3.0.0 + */ + texture: null, + + /** + * The Texture Frame this Game Object is using to render with. + * + * @name Phaser.GameObjects.Components.Crop#frame + * @type {Phaser.Textures.Frame} + * @since 3.0.0 + */ + frame: null, + + /** + * A boolean flag indicating if this Game Object is being cropped or not. + * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off. + * Equally, calling `setCrop` with no arguments will reset the crop and disable it. + * + * @name Phaser.GameObjects.Components.Crop#isCropped + * @type {boolean} + * @since 3.11.0 + */ + isCropped: false, + + /** + * Applies a crop to a texture based Game Object, such as a Sprite or Image. + * + * The crop is a rectangle that limits the area of the texture frame that is visible during rendering. + * + * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just + * changes what is shown when rendered. + * + * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left. + * + * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left + * half of it, you could call `setCrop(0, 0, 400, 600)`. + * + * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop + * an area of 200x100 when applied to a Game Object that had a scale factor of 2. + * + * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument. + * + * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`. + * + * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow + * the renderer to skip several internal calculations. + * + * @method Phaser.GameObjects.Components.Crop#setCrop + * @since 3.11.0 + * + * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored. + * @param {number} [y] - The y coordinate to start the crop from. + * @param {number} [width] - The width of the crop rectangle in pixels. + * @param {number} [height] - The height of the crop rectangle in pixels. + * + * @return {this} This Game Object instance. + */ + setCrop: function (x, y, width, height) + { + if (x === undefined) + { + this.isCropped = false; + } + else if (this.frame) + { + if (typeof x === 'number') + { + this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY); + } + else + { + var rect = x; + + this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY); + } + + this.isCropped = true; + } + + return this; + }, + + /** + * Internal method that returns a blank, well-formed crop object for use by a Game Object. + * + * @method Phaser.GameObjects.Components.Crop#resetCropObject + * @private + * @since 3.12.0 + * + * @return {object} The crop object. + */ + resetCropObject: function () + { + return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 }; + } + +}; + +module.exports = Crop; + + /***/ }), /***/ "../../../src/gameobjects/components/Depth.js": @@ -2609,6 +7409,1297 @@ var Flip = { module.exports = Flip; +/***/ }), + +/***/ "../../../src/gameobjects/components/GetBounds.js": +/*!******************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/GetBounds.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Rectangle = __webpack_require__(/*! ../../geom/rectangle/Rectangle */ "../../../src/geom/rectangle/Rectangle.js"); +var RotateAround = __webpack_require__(/*! ../../math/RotateAround */ "../../../src/math/RotateAround.js"); +var Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "../../../src/math/Vector2.js"); + +/** + * Provides methods used for obtaining the bounds of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.GetBounds + * @since 3.0.0 + */ + +var GetBounds = { + + /** + * Processes the bounds output vector before returning it. + * + * @method Phaser.GameObjects.Components.GetBounds#prepareBoundsOutput + * @private + * @since 3.18.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} output - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + prepareBoundsOutput: function (output, includeParent) + { + if (includeParent === undefined) { includeParent = false; } + + if (this.rotation !== 0) + { + RotateAround(output, this.x, this.y, this.rotation); + } + + if (includeParent && this.parentContainer) + { + var parentMatrix = this.parentContainer.getBoundsTransformMatrix(); + + parentMatrix.transformPoint(output.x, output.y, output); + } + + return output; + }, + + /** + * Gets the center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getCenter + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getCenter: function (output) + { + if (output === undefined) { output = new Vector2(); } + + output.x = this.x - (this.displayWidth * this.originX) + (this.displayWidth / 2); + output.y = this.y - (this.displayHeight * this.originY) + (this.displayHeight / 2); + + return output; + }, + + /** + * Gets the top-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getTopLeft + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getTopLeft: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = this.x - (this.displayWidth * this.originX); + output.y = this.y - (this.displayHeight * this.originY); + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the top-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getTopCenter + * @since 3.18.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getTopCenter: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2); + output.y = this.y - (this.displayHeight * this.originY); + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the top-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getTopRight + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getTopRight: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth; + output.y = this.y - (this.displayHeight * this.originY); + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the left-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getLeftCenter + * @since 3.18.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getLeftCenter: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = this.x - (this.displayWidth * this.originX); + output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2); + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the right-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getRightCenter + * @since 3.18.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getRightCenter: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth; + output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2); + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the bottom-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getBottomLeft + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getBottomLeft: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = this.x - (this.displayWidth * this.originX); + output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight; + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the bottom-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getBottomCenter + * @since 3.18.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getBottomCenter: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2); + output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight; + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the bottom-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getBottomRight + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getBottomRight: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth; + output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight; + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the bounds of this Game Object, regardless of origin. + * The values are stored and returned in a Rectangle, or Rectangle-like, object. + * + * @method Phaser.GameObjects.Components.GetBounds#getBounds + * @since 3.0.0 + * + * @generic {Phaser.Geom.Rectangle} O - [output,$return] + * + * @param {(Phaser.Geom.Rectangle|object)} [output] - An object to store the values in. If not provided a new Rectangle will be created. + * + * @return {(Phaser.Geom.Rectangle|object)} The values stored in the output object. + */ + getBounds: function (output) + { + if (output === undefined) { output = new Rectangle(); } + + // We can use the output object to temporarily store the x/y coords in: + + var TLx, TLy, TRx, TRy, BLx, BLy, BRx, BRy; + + // Instead of doing a check if parent container is + // defined per corner we only do it once. + if (this.parentContainer) + { + var parentMatrix = this.parentContainer.getBoundsTransformMatrix(); + + this.getTopLeft(output); + parentMatrix.transformPoint(output.x, output.y, output); + + TLx = output.x; + TLy = output.y; + + this.getTopRight(output); + parentMatrix.transformPoint(output.x, output.y, output); + + TRx = output.x; + TRy = output.y; + + this.getBottomLeft(output); + parentMatrix.transformPoint(output.x, output.y, output); + + BLx = output.x; + BLy = output.y; + + this.getBottomRight(output); + parentMatrix.transformPoint(output.x, output.y, output); + + BRx = output.x; + BRy = output.y; + } + else + { + this.getTopLeft(output); + + TLx = output.x; + TLy = output.y; + + this.getTopRight(output); + + TRx = output.x; + TRy = output.y; + + this.getBottomLeft(output); + + BLx = output.x; + BLy = output.y; + + this.getBottomRight(output); + + BRx = output.x; + BRy = output.y; + } + + output.x = Math.min(TLx, TRx, BLx, BRx); + output.y = Math.min(TLy, TRy, BLy, BRy); + output.width = Math.max(TLx, TRx, BLx, BRx) - output.x; + output.height = Math.max(TLy, TRy, BLy, BRy) - output.y; + + return output; + } + +}; + +module.exports = GetBounds; + + +/***/ }), + +/***/ "../../../src/gameobjects/components/Mask.js": +/*!*************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/Mask.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var BitmapMask = __webpack_require__(/*! ../../display/mask/BitmapMask */ "../../../src/display/mask/BitmapMask.js"); +var GeometryMask = __webpack_require__(/*! ../../display/mask/GeometryMask */ "../../../src/display/mask/GeometryMask.js"); + +/** + * Provides methods used for getting and setting the mask of a Game Object. + * + * @namespace Phaser.GameObjects.Components.Mask + * @since 3.0.0 + */ + +var Mask = { + + /** + * The Mask this Game Object is using during render. + * + * @name Phaser.GameObjects.Components.Mask#mask + * @type {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask} + * @since 3.0.0 + */ + mask: null, + + /** + * 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. + * + * 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. + * + * 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. + * + * @method Phaser.GameObjects.Components.Mask#setMask + * @since 3.6.2 + * + * @param {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask} mask - The mask this Game Object will use when rendering. + * + * @return {this} This Game Object instance. + */ + setMask: function (mask) + { + this.mask = mask; + + return this; + }, + + /** + * Clears the mask that this Game Object was using. + * + * @method Phaser.GameObjects.Components.Mask#clearMask + * @since 3.6.2 + * + * @param {boolean} [destroyMask=false] - Destroy the mask before clearing it? + * + * @return {this} This Game Object instance. + */ + clearMask: function (destroyMask) + { + if (destroyMask === undefined) { destroyMask = false; } + + if (destroyMask && this.mask) + { + this.mask.destroy(); + } + + this.mask = null; + + return this; + }, + + /** + * Creates and returns a Bitmap 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 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 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 Game Object. + * + * @method Phaser.GameObjects.Components.Mask#createBitmapMask + * @since 3.6.2 + * + * @param {Phaser.GameObjects.GameObject} [renderable] - A renderable Game Object that uses a texture, such as a Sprite. + * + * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created. + */ + createBitmapMask: function (renderable) + { + if (renderable === undefined && (this.texture || this.shader)) + { + // eslint-disable-next-line consistent-this + renderable = this; + } + + return new BitmapMask(this.scene, renderable); + }, + + /** + * 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. + * + * This means you can call this method to create a Geometry Mask from any Graphics Game Object. + * + * @method Phaser.GameObjects.Components.Mask#createGeometryMask + * @since 3.6.2 + * + * @param {Phaser.GameObjects.Graphics} [graphics] - A Graphics Game Object. The geometry within it will be used as the mask. + * + * @return {Phaser.Display.Masks.GeometryMask} This Geometry Mask that was created. + */ + createGeometryMask: function (graphics) + { + if (graphics === undefined && this.type === 'Graphics') + { + // eslint-disable-next-line consistent-this + graphics = this; + } + + return new GeometryMask(this.scene, graphics); + } + +}; + +module.exports = Mask; + + +/***/ }), + +/***/ "../../../src/gameobjects/components/Origin.js": +/*!***************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/Origin.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for getting and setting the origin of a Game Object. + * Values are normalized, given in the range 0 to 1. + * Display values contain the calculated pixel values. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.Origin + * @since 3.0.0 + */ + +var Origin = { + + /** + * A property indicating that a Game Object has this component. + * + * @name Phaser.GameObjects.Components.Origin#_originComponent + * @type {boolean} + * @private + * @default true + * @since 3.2.0 + */ + _originComponent: true, + + /** + * The horizontal 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 left of the Game Object. + * + * @name Phaser.GameObjects.Components.Origin#originX + * @type {number} + * @default 0.5 + * @since 3.0.0 + */ + originX: 0.5, + + /** + * 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. + * + * @name Phaser.GameObjects.Components.Origin#originY + * @type {number} + * @default 0.5 + * @since 3.0.0 + */ + originY: 0.5, + + // private + read only + _displayOriginX: 0, + _displayOriginY: 0, + + /** + * The horizontal display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + * + * @name Phaser.GameObjects.Components.Origin#displayOriginX + * @type {number} + * @since 3.0.0 + */ + displayOriginX: { + + get: function () + { + return this._displayOriginX; + }, + + set: function (value) + { + this._displayOriginX = value; + this.originX = value / this.width; + } + + }, + + /** + * The vertical display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + * + * @name Phaser.GameObjects.Components.Origin#displayOriginY + * @type {number} + * @since 3.0.0 + */ + displayOriginY: { + + get: function () + { + return this._displayOriginY; + }, + + set: function (value) + { + this._displayOriginY = value; + this.originY = value / this.height; + } + + }, + + /** + * Sets the origin of this Game Object. + * + * The values are given in the range 0 to 1. + * + * @method Phaser.GameObjects.Components.Origin#setOrigin + * @since 3.0.0 + * + * @param {number} [x=0.5] - The horizontal origin value. + * @param {number} [y=x] - The vertical origin value. If not defined it will be set to the value of `x`. + * + * @return {this} This Game Object instance. + */ + setOrigin: function (x, y) + { + if (x === undefined) { x = 0.5; } + if (y === undefined) { y = x; } + + this.originX = x; + this.originY = y; + + return this.updateDisplayOrigin(); + }, + + /** + * Sets the origin of this Game Object based on the Pivot values in its Frame. + * + * @method Phaser.GameObjects.Components.Origin#setOriginFromFrame + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + setOriginFromFrame: function () + { + if (!this.frame || !this.frame.customPivot) + { + return this.setOrigin(); + } + else + { + this.originX = this.frame.pivotX; + this.originY = this.frame.pivotY; + } + + return this.updateDisplayOrigin(); + }, + + /** + * Sets the display origin of this Game Object. + * The difference between this and setting the origin is that you can use pixel values for setting the display origin. + * + * @method Phaser.GameObjects.Components.Origin#setDisplayOrigin + * @since 3.0.0 + * + * @param {number} [x=0] - The horizontal display origin value. + * @param {number} [y=x] - The vertical display origin value. If not defined it will be set to the value of `x`. + * + * @return {this} This Game Object instance. + */ + setDisplayOrigin: function (x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = x; } + + this.displayOriginX = x; + this.displayOriginY = y; + + return this; + }, + + /** + * Updates the Display Origin cached values internally stored on this Game Object. + * You don't usually call this directly, but it is exposed for edge-cases where you may. + * + * @method Phaser.GameObjects.Components.Origin#updateDisplayOrigin + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + updateDisplayOrigin: function () + { + this._displayOriginX = this.originX * this.width; + this._displayOriginY = this.originY * this.height; + + return this; + } + +}; + +module.exports = Origin; + + +/***/ }), + +/***/ "../../../src/gameobjects/components/PathFollower.js": +/*!*********************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/PathFollower.js ***! + \*********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var DegToRad = __webpack_require__(/*! ../../math/DegToRad */ "../../../src/math/DegToRad.js"); +var GetBoolean = __webpack_require__(/*! ../../tweens/builders/GetBoolean */ "../../../src/tweens/builders/GetBoolean.js"); +var GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ "../../../src/utils/object/GetValue.js"); +var TWEEN_CONST = __webpack_require__(/*! ../../tweens/tween/const */ "../../../src/tweens/tween/const.js"); +var Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "../../../src/math/Vector2.js"); + +/** + * Provides methods used for managing a Game Object following a Path. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.PathFollower + * @since 3.17.0 + */ + +var PathFollower = { + + /** + * The Path this PathFollower is following. It can only follow one Path at a time. + * + * @name Phaser.GameObjects.Components.PathFollower#path + * @type {Phaser.Curves.Path} + * @since 3.0.0 + */ + path: null, + + /** + * Should the PathFollower automatically rotate to point in the direction of the Path? + * + * @name Phaser.GameObjects.Components.PathFollower#rotateToPath + * @type {boolean} + * @default false + * @since 3.0.0 + */ + rotateToPath: false, + + /** + * If the PathFollower is rotating to match the Path (@see Phaser.GameObjects.PathFollower#rotateToPath) + * this value is added to the rotation value. This allows you to rotate objects to a path but control + * the angle of the rotation as well. + * + * @name Phaser.GameObjects.PathFollower#pathRotationOffset + * @type {number} + * @default 0 + * @since 3.0.0 + */ + pathRotationOffset: 0, + + /** + * An additional vector to add to the PathFollowers position, allowing you to offset it from the + * Path coordinates. + * + * @name Phaser.GameObjects.PathFollower#pathOffset + * @type {Phaser.Math.Vector2} + * @since 3.0.0 + */ + pathOffset: null, + + /** + * A Vector2 that stores the current point of the path the follower is on. + * + * @name Phaser.GameObjects.PathFollower#pathVector + * @type {Phaser.Math.Vector2} + * @since 3.0.0 + */ + pathVector: null, + + /** + * The distance the follower has traveled from the previous point to the current one, at the last update. + * + * @name Phaser.GameObjects.PathFollower#pathDelta + * @type {Phaser.Math.Vector2} + * @since 3.23.0 + */ + pathDelta: null, + + /** + * The Tween used for following the Path. + * + * @name Phaser.GameObjects.PathFollower#pathTween + * @type {Phaser.Tweens.Tween} + * @since 3.0.0 + */ + pathTween: null, + + /** + * Settings for the PathFollower. + * + * @name Phaser.GameObjects.PathFollower#pathConfig + * @type {?Phaser.Types.GameObjects.PathFollower.PathConfig} + * @default null + * @since 3.0.0 + */ + pathConfig: null, + + /** + * Records the direction of the follower so it can change direction. + * + * @name Phaser.GameObjects.PathFollower#_prevDirection + * @type {integer} + * @private + * @since 3.0.0 + */ + _prevDirection: TWEEN_CONST.PLAYING_FORWARD, + + /** + * Set the Path that this PathFollower should follow. + * + * Optionally accepts {@link Phaser.Types.GameObjects.PathFollower.PathConfig} settings. + * + * @method Phaser.GameObjects.Components.PathFollower#setPath + * @since 3.0.0 + * + * @param {Phaser.Curves.Path} path - The Path this PathFollower is following. It can only follow one Path at a time. + * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config] - Settings for the PathFollower. + * + * @return {this} This Game Object. + */ + setPath: function (path, config) + { + if (config === undefined) { config = this.pathConfig; } + + var tween = this.pathTween; + + if (tween && tween.isPlaying()) + { + tween.stop(); + } + + this.path = path; + + if (config) + { + this.startFollow(config); + } + + return this; + }, + + /** + * Set whether the PathFollower should automatically rotate to point in the direction of the Path. + * + * @method Phaser.GameObjects.Components.PathFollower#setRotateToPath + * @since 3.0.0 + * + * @param {boolean} value - Whether the PathFollower should automatically rotate to point in the direction of the Path. + * @param {number} [offset=0] - Rotation offset in degrees. + * + * @return {this} This Game Object. + */ + setRotateToPath: function (value, offset) + { + if (offset === undefined) { offset = 0; } + + this.rotateToPath = value; + + this.pathRotationOffset = offset; + + return this; + }, + + /** + * Is this PathFollower actively following a Path or not? + * + * To be considered as `isFollowing` it must be currently moving on a Path, and not paused. + * + * @method Phaser.GameObjects.Components.PathFollower#isFollowing + * @since 3.0.0 + * + * @return {boolean} `true` is this PathFollower is actively following a Path, otherwise `false`. + */ + isFollowing: function () + { + var tween = this.pathTween; + + return (tween && tween.isPlaying()); + }, + + /** + * Starts this PathFollower following its given Path. + * + * @method Phaser.GameObjects.Components.PathFollower#startFollow + * @since 3.3.0 + * + * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config={}] - The duration of the follow, or a PathFollower config object. + * @param {number} [startAt=0] - Optional start position of the follow, between 0 and 1. + * + * @return {this} This Game Object. + */ + startFollow: function (config, startAt) + { + if (config === undefined) { config = {}; } + if (startAt === undefined) { startAt = 0; } + + var tween = this.pathTween; + + if (tween && tween.isPlaying()) + { + tween.stop(); + } + + if (typeof config === 'number') + { + config = { duration: config }; + } + + // Override in case they've been specified in the config + config.from = GetValue(config, 'from', 0); + config.to = GetValue(config, 'to', 1); + + var positionOnPath = GetBoolean(config, 'positionOnPath', false); + + this.rotateToPath = GetBoolean(config, 'rotateToPath', false); + this.pathRotationOffset = GetValue(config, 'rotationOffset', 0); + + // This works, but it's not an ideal way of doing it as the follower jumps position + var seek = GetValue(config, 'startAt', startAt); + + if (seek) + { + config.onStart = function (tween) + { + var tweenData = tween.data[0]; + tweenData.progress = seek; + tweenData.elapsed = tweenData.duration * seek; + var v = tweenData.ease(tweenData.progress); + tweenData.current = tweenData.start + ((tweenData.end - tweenData.start) * v); + tweenData.target[tweenData.key] = tweenData.current; + }; + } + + if (!this.pathOffset) + { + this.pathOffset = new Vector2(this.x, this.y); + } + + if (!this.pathVector) + { + this.pathVector = new Vector2(); + } + + if (!this.pathDelta) + { + this.pathDelta = new Vector2(); + } + + this.pathDelta.reset(); + + this.pathTween = this.scene.sys.tweens.addCounter(config); + + // The starting point of the path, relative to this follower + this.path.getStartPoint(this.pathOffset); + + if (positionOnPath) + { + 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 = TWEEN_CONST.PLAYING_FORWARD; + + if (this.rotateToPath) + { + // Set the rotation now (in case the tween has a delay on it, etc) + var nextPoint = this.path.getPoint(0.1); + + this.rotation = Math.atan2(nextPoint.y - this.y, nextPoint.x - this.x) + DegToRad(this.pathRotationOffset); + } + + this.pathConfig = config; + + return this; + }, + + /** + * Pauses this PathFollower. It will still continue to render, but it will remain motionless at the + * point on the Path at which you paused it. + * + * @method Phaser.GameObjects.Components.PathFollower#pauseFollow + * @since 3.3.0 + * + * @return {this} This Game Object. + */ + pauseFollow: function () + { + var tween = this.pathTween; + + if (tween && tween.isPlaying()) + { + tween.pause(); + } + + return this; + }, + + /** + * Resumes a previously paused PathFollower. + * + * If the PathFollower was not paused this has no effect. + * + * @method Phaser.GameObjects.Components.PathFollower#resumeFollow + * @since 3.3.0 + * + * @return {this} This Game Object. + */ + resumeFollow: function () + { + var tween = this.pathTween; + + if (tween && tween.isPaused()) + { + tween.resume(); + } + + return this; + }, + + /** + * Stops this PathFollower from following the path any longer. + * + * This will invoke any 'stop' conditions that may exist on the Path, or for the follower. + * + * @method Phaser.GameObjects.Components.PathFollower#stopFollow + * @since 3.3.0 + * + * @return {this} This Game Object. + */ + stopFollow: function () + { + var tween = this.pathTween; + + if (tween && tween.isPlaying()) + { + tween.stop(); + } + + return this; + }, + + /** + * Internal update handler that advances this PathFollower along the path. + * + * Called automatically by the Scene step, should not typically be called directly. + * + * @method Phaser.GameObjects.Components.PathFollower#pathUpdate + * @since 3.17.0 + */ + pathUpdate: function () + { + var tween = this.pathTween; + + if (tween) + { + var tweenData = tween.data[0]; + var pathDelta = this.pathDelta; + var pathVector = this.pathVector; + + pathDelta.copy(pathVector).negate(); + + if (tweenData.state === TWEEN_CONST.COMPLETE) + { + this.path.getPoint(1, pathVector); + + pathDelta.add(pathVector); + pathVector.add(this.pathOffset); + + this.setPosition(pathVector.x, pathVector.y); + + return; + } + else if (tweenData.state !== TWEEN_CONST.PLAYING_FORWARD && tweenData.state !== TWEEN_CONST.PLAYING_BACKWARD) + { + // If delayed, etc then bail out + return; + } + + this.path.getPoint(tween.getValue(), pathVector); + + pathDelta.add(pathVector); + pathVector.add(this.pathOffset); + + var oldX = this.x; + var oldY = this.y; + + this.setPosition(pathVector.x, pathVector.y); + + var speedX = this.x - oldX; + var speedY = this.y - oldY; + + if (speedX === 0 && speedY === 0) + { + // Bail out early + return; + } + + if (tweenData.state !== this._prevDirection) + { + // We've changed direction, so don't do a rotate this frame + this._prevDirection = tweenData.state; + + return; + } + + if (this.rotateToPath) + { + this.rotation = Math.atan2(speedY, speedX) + DegToRad(this.pathRotationOffset); + } + } + } + +}; + +module.exports = PathFollower; + + +/***/ }), + +/***/ "../../../src/gameobjects/components/Pipeline.js": +/*!*****************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/Pipeline.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for setting the WebGL rendering pipeline of a Game Object. + * + * @namespace Phaser.GameObjects.Components.Pipeline + * @webglOnly + * @since 3.0.0 + */ + +var Pipeline = { + + /** + * The initial WebGL pipeline of this Game Object. + * + * @name Phaser.GameObjects.Components.Pipeline#defaultPipeline + * @type {Phaser.Renderer.WebGL.WebGLPipeline} + * @default null + * @webglOnly + * @since 3.0.0 + */ + defaultPipeline: null, + + /** + * The current WebGL pipeline of this Game Object. + * + * @name Phaser.GameObjects.Components.Pipeline#pipeline + * @type {Phaser.Renderer.WebGL.WebGLPipeline} + * @default null + * @webglOnly + * @since 3.0.0 + */ + pipeline: null, + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * + * This should only be called during the instantiation of the Game Object. + * + * @method Phaser.GameObjects.Components.Pipeline#initPipeline + * @webglOnly + * @since 3.0.0 + * + * @param {string} [pipelineName=MultiPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Multi Pipeline. + * + * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. + */ + initPipeline: function (pipelineName) + { + if (pipelineName === undefined) { pipelineName = 'MultiPipeline'; } + + var renderer = this.scene.sys.game.renderer; + + if (renderer && renderer.gl && renderer.hasPipeline(pipelineName)) + { + this.defaultPipeline = renderer.getPipeline(pipelineName); + this.pipeline = this.defaultPipeline; + + return true; + } + + return false; + }, + + /** + * Sets the active WebGL Pipeline of this Game Object. + * + * @method Phaser.GameObjects.Components.Pipeline#setPipeline + * @webglOnly + * @since 3.0.0 + * + * @param {string} pipelineName - The name of the pipeline to set on this Game Object. + * + * @return {this} This Game Object instance. + */ + setPipeline: function (pipelineName) + { + var renderer = this.scene.sys.game.renderer; + + if (renderer && renderer.gl && renderer.hasPipeline(pipelineName)) + { + this.pipeline = renderer.getPipeline(pipelineName); + } + + return this; + }, + + /** + * Resets the WebGL Pipeline of this Game Object back to the default it was created with. + * + * @method Phaser.GameObjects.Components.Pipeline#resetPipeline + * @webglOnly + * @since 3.0.0 + * + * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. + */ + resetPipeline: function () + { + this.pipeline = this.defaultPipeline; + + return (this.pipeline !== null); + }, + + /** + * Gets the name of the WebGL Pipeline this Game Object is currently using. + * + * @method Phaser.GameObjects.Components.Pipeline#getPipelineName + * @webglOnly + * @since 3.0.0 + * + * @return {string} The string-based name of the pipeline being used by this Game Object. + */ + getPipelineName: function () + { + return this.pipeline.name; + } + +}; + +module.exports = Pipeline; + + /***/ }), /***/ "../../../src/gameobjects/components/ScrollFactor.js": @@ -2721,6 +8812,883 @@ var ScrollFactor = { module.exports = ScrollFactor; +/***/ }), + +/***/ "../../../src/gameobjects/components/Size.js": +/*!*************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/Size.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for getting and setting the size of a Game Object. + * + * @namespace Phaser.GameObjects.Components.Size + * @since 3.0.0 + */ + +var Size = { + + /** + * A property indicating that a Game Object has this component. + * + * @name Phaser.GameObjects.Components.Size#_sizeComponent + * @type {boolean} + * @private + * @default true + * @since 3.2.0 + */ + _sizeComponent: true, + + /** + * The native (un-scaled) width of this Game Object. + * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayWidth` property. + * + * @name Phaser.GameObjects.Components.Size#width + * @type {number} + * @since 3.0.0 + */ + width: 0, + + /** + * The native (un-scaled) height of this Game Object. + * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayHeight` property. + * + * @name Phaser.GameObjects.Components.Size#height + * @type {number} + * @since 3.0.0 + */ + height: 0, + + /** + * The displayed width of this Game Object. + * + * This value takes into account the scale factor. + * + * Setting this value will adjust the Game Object's scale property. + * + * @name Phaser.GameObjects.Components.Size#displayWidth + * @type {number} + * @since 3.0.0 + */ + displayWidth: { + + get: function () + { + return Math.abs(this.scaleX * this.frame.realWidth); + }, + + set: function (value) + { + this.scaleX = value / this.frame.realWidth; + } + + }, + + /** + * The displayed height of this Game Object. + * + * This value takes into account the scale factor. + * + * Setting this value will adjust the Game Object's scale property. + * + * @name Phaser.GameObjects.Components.Size#displayHeight + * @type {number} + * @since 3.0.0 + */ + displayHeight: { + + get: function () + { + return Math.abs(this.scaleY * this.frame.realHeight); + }, + + set: function (value) + { + this.scaleY = value / this.frame.realHeight; + } + + }, + + /** + * Sets the size of this Game Object to be that of the given Frame. + * + * This will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or call the + * `setDisplaySize` method, which is the same thing as changing the scale but allows you + * to do so by giving pixel values. + * + * If you have enabled this Game Object for input, changing the size will _not_ change the + * size of the hit area. To do this you should adjust the `input.hitArea` object directly. + * + * @method Phaser.GameObjects.Components.Size#setSizeToFrame + * @since 3.0.0 + * + * @param {Phaser.Textures.Frame} frame - The frame to base the size of this Game Object on. + * + * @return {this} This Game Object instance. + */ + setSizeToFrame: function (frame) + { + if (frame === undefined) { frame = this.frame; } + + this.width = frame.realWidth; + this.height = frame.realHeight; + + return this; + }, + + /** + * Sets the internal size of this Game Object, as used for frame or physics body creation. + * + * This will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or call the + * `setDisplaySize` method, which is the same thing as changing the scale but allows you + * to do so by giving pixel values. + * + * If you have enabled this Game Object for input, changing the size will _not_ change the + * size of the hit area. To do this you should adjust the `input.hitArea` object directly. + * + * @method Phaser.GameObjects.Components.Size#setSize + * @since 3.0.0 + * + * @param {number} width - The width of this Game Object. + * @param {number} height - The height of this Game Object. + * + * @return {this} This Game Object instance. + */ + setSize: function (width, height) + { + this.width = width; + this.height = height; + + return this; + }, + + /** + * Sets the display size of this Game Object. + * + * Calling this will adjust the scale. + * + * @method Phaser.GameObjects.Components.Size#setDisplaySize + * @since 3.0.0 + * + * @param {number} width - The width of this Game Object. + * @param {number} height - The height of this Game Object. + * + * @return {this} This Game Object instance. + */ + setDisplaySize: function (width, height) + { + this.displayWidth = width; + this.displayHeight = height; + + return this; + } + +}; + +module.exports = Size; + + +/***/ }), + +/***/ "../../../src/gameobjects/components/Texture.js": +/*!****************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/Texture.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// bitmask flag for GameObject.renderMask +var _FLAG = 8; // 1000 + +/** + * Provides methods used for getting and setting the texture of a Game Object. + * + * @namespace Phaser.GameObjects.Components.Texture + * @since 3.0.0 + */ + +var Texture = { + + /** + * The Texture this Game Object is using to render with. + * + * @name Phaser.GameObjects.Components.Texture#texture + * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture} + * @since 3.0.0 + */ + texture: null, + + /** + * The Texture Frame this Game Object is using to render with. + * + * @name Phaser.GameObjects.Components.Texture#frame + * @type {Phaser.Textures.Frame} + * @since 3.0.0 + */ + frame: null, + + /** + * Internal flag. Not to be set by this Game Object. + * + * @name Phaser.GameObjects.Components.Texture#isCropped + * @type {boolean} + * @private + * @since 3.11.0 + */ + isCropped: false, + + /** + * 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. + * + * @method Phaser.GameObjects.Components.Texture#setTexture + * @since 3.0.0 + * + * @param {(string|Phaser.Textures.Texture)} key - The key of the texture to be used, as stored in the Texture Manager, or a Texture instance. + * @param {(string|integer)} [frame] - The name or index of the frame within the Texture. + * + * @return {this} This Game Object instance. + */ + setTexture: function (key, frame) + { + this.texture = this.scene.sys.textures.get(key); + + return this.setFrame(frame); + }, + + /** + * Sets the frame this Game Object will use to render with. + * + * The Frame has to belong to the current Texture being used. + * + * It can be either a string or an index. + * + * 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. + * + * @method Phaser.GameObjects.Components.Texture#setFrame + * @since 3.0.0 + * + * @param {(string|integer)} frame - The name or index of the frame within the Texture. + * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object? + * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object? + * + * @return {this} This Game Object instance. + */ + setFrame: function (frame, updateSize, updateOrigin) + { + if (updateSize === undefined) { updateSize = true; } + if (updateOrigin === undefined) { updateOrigin = true; } + + this.frame = this.texture.get(frame); + + if (!this.frame.cutWidth || !this.frame.cutHeight) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + + if (this._sizeComponent && updateSize) + { + this.setSizeToFrame(); + } + + if (this._originComponent && updateOrigin) + { + if (this.frame.customPivot) + { + this.setOrigin(this.frame.pivotX, this.frame.pivotY); + } + else + { + this.updateDisplayOrigin(); + } + } + + return this; + } + +}; + +module.exports = Texture; + + +/***/ }), + +/***/ "../../../src/gameobjects/components/TextureCrop.js": +/*!********************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/TextureCrop.js ***! + \********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// bitmask flag for GameObject.renderMask +var _FLAG = 8; // 1000 + +/** + * Provides methods used for getting and setting the texture of a Game Object. + * + * @namespace Phaser.GameObjects.Components.TextureCrop + * @since 3.0.0 + */ + +var TextureCrop = { + + /** + * The Texture this Game Object is using to render with. + * + * @name Phaser.GameObjects.Components.TextureCrop#texture + * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture} + * @since 3.0.0 + */ + texture: null, + + /** + * The Texture Frame this Game Object is using to render with. + * + * @name Phaser.GameObjects.Components.TextureCrop#frame + * @type {Phaser.Textures.Frame} + * @since 3.0.0 + */ + frame: null, + + /** + * A boolean flag indicating if this Game Object is being cropped or not. + * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off. + * Equally, calling `setCrop` with no arguments will reset the crop and disable it. + * + * @name Phaser.GameObjects.Components.TextureCrop#isCropped + * @type {boolean} + * @since 3.11.0 + */ + isCropped: false, + + /** + * Applies a crop to a texture based Game Object, such as a Sprite or Image. + * + * The crop is a rectangle that limits the area of the texture frame that is visible during rendering. + * + * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just + * changes what is shown when rendered. + * + * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left. + * + * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left + * half of it, you could call `setCrop(0, 0, 400, 600)`. + * + * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop + * an area of 200x100 when applied to a Game Object that had a scale factor of 2. + * + * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument. + * + * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`. + * + * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow + * the renderer to skip several internal calculations. + * + * @method Phaser.GameObjects.Components.TextureCrop#setCrop + * @since 3.11.0 + * + * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored. + * @param {number} [y] - The y coordinate to start the crop from. + * @param {number} [width] - The width of the crop rectangle in pixels. + * @param {number} [height] - The height of the crop rectangle in pixels. + * + * @return {this} This Game Object instance. + */ + setCrop: function (x, y, width, height) + { + if (x === undefined) + { + this.isCropped = false; + } + else if (this.frame) + { + if (typeof x === 'number') + { + this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY); + } + else + { + var rect = x; + + this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY); + } + + this.isCropped = true; + } + + return this; + }, + + /** + * 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. + * + * @method Phaser.GameObjects.Components.TextureCrop#setTexture + * @since 3.0.0 + * + * @param {string} key - The key of the texture to be used, as stored in the Texture Manager. + * @param {(string|integer)} [frame] - The name or index of the frame within the Texture. + * + * @return {this} This Game Object instance. + */ + setTexture: function (key, frame) + { + this.texture = this.scene.sys.textures.get(key); + + return this.setFrame(frame); + }, + + /** + * Sets the frame this Game Object will use to render with. + * + * The Frame has to belong to the current Texture being used. + * + * It can be either a string or an index. + * + * 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. + * + * @method Phaser.GameObjects.Components.TextureCrop#setFrame + * @since 3.0.0 + * + * @param {(string|integer)} frame - The name or index of the frame within the Texture. + * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object? + * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object? + * + * @return {this} This Game Object instance. + */ + setFrame: function (frame, updateSize, updateOrigin) + { + if (updateSize === undefined) { updateSize = true; } + if (updateOrigin === undefined) { updateOrigin = true; } + + this.frame = this.texture.get(frame); + + if (!this.frame.cutWidth || !this.frame.cutHeight) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + + if (this._sizeComponent && updateSize) + { + this.setSizeToFrame(); + } + + if (this._originComponent && updateOrigin) + { + if (this.frame.customPivot) + { + this.setOrigin(this.frame.pivotX, this.frame.pivotY); + } + else + { + this.updateDisplayOrigin(); + } + } + + if (this.isCropped) + { + this.frame.updateCropUVs(this._crop, this.flipX, this.flipY); + } + + return this; + }, + + /** + * Internal method that returns a blank, well-formed crop object for use by a Game Object. + * + * @method Phaser.GameObjects.Components.TextureCrop#resetCropObject + * @private + * @since 3.12.0 + * + * @return {object} The crop object. + */ + resetCropObject: function () + { + return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 }; + } + +}; + +module.exports = TextureCrop; + + +/***/ }), + +/***/ "../../../src/gameobjects/components/Tint.js": +/*!*************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/Tint.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetColorFromValue = __webpack_require__(/*! ../../display/color/GetColorFromValue */ "../../../src/display/color/GetColorFromValue.js"); + +/** + * Provides methods used for setting the tint of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.Tint + * @webglOnly + * @since 3.0.0 + */ + +var Tint = { + + /** + * Private internal value. Holds the top-left tint value. + * + * @name Phaser.GameObjects.Components.Tint#_tintTL + * @type {number} + * @private + * @default 16777215 + * @since 3.0.0 + */ + _tintTL: 16777215, + + /** + * Private internal value. Holds the top-right tint value. + * + * @name Phaser.GameObjects.Components.Tint#_tintTR + * @type {number} + * @private + * @default 16777215 + * @since 3.0.0 + */ + _tintTR: 16777215, + + /** + * Private internal value. Holds the bottom-left tint value. + * + * @name Phaser.GameObjects.Components.Tint#_tintBL + * @type {number} + * @private + * @default 16777215 + * @since 3.0.0 + */ + _tintBL: 16777215, + + /** + * Private internal value. Holds the bottom-right tint value. + * + * @name Phaser.GameObjects.Components.Tint#_tintBR + * @type {number} + * @private + * @default 16777215 + * @since 3.0.0 + */ + _tintBR: 16777215, + + /** + * Private internal value. Holds if the Game Object is tinted or not. + * + * @name Phaser.GameObjects.Components.Tint#_isTinted + * @type {boolean} + * @private + * @default false + * @since 3.11.0 + */ + _isTinted: false, + + /** + * Fill or additive? + * + * @name Phaser.GameObjects.Components.Tint#tintFill + * @type {boolean} + * @default false + * @since 3.11.0 + */ + tintFill: false, + + /** + * Clears all tint values associated with this Game Object. + * + * Immediately sets the color values back to 0xffffff and the tint type to 'additive', + * which results in no visible change to the texture. + * + * @method Phaser.GameObjects.Components.Tint#clearTint + * @webglOnly + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + clearTint: function () + { + this.setTint(0xffffff); + + this._isTinted = false; + + return this; + }, + + /** + * Sets an additive tint on this Game Object. + * + * The tint works by taking the pixel color values from the Game Objects texture, and then + * multiplying it by the color value of the tint. You can provide either one color value, + * in which case the whole Game Object will be tinted in that color. Or you can provide a color + * per corner. The colors are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`. + * + * @method Phaser.GameObjects.Components.Tint#setTint + * @webglOnly + * @since 3.0.0 + * + * @param {integer} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object. + * @param {integer} [topRight] - The tint being applied to the top-right of the Game Object. + * @param {integer} [bottomLeft] - The tint being applied to the bottom-left of the Game Object. + * @param {integer} [bottomRight] - The tint being applied to the bottom-right of the Game Object. + * + * @return {this} This Game Object instance. + */ + setTint: function (topLeft, topRight, bottomLeft, bottomRight) + { + if (topLeft === undefined) { topLeft = 0xffffff; } + + if (topRight === undefined) + { + topRight = topLeft; + bottomLeft = topLeft; + bottomRight = topLeft; + } + + this._tintTL = GetColorFromValue(topLeft); + this._tintTR = GetColorFromValue(topRight); + this._tintBL = GetColorFromValue(bottomLeft); + this._tintBR = GetColorFromValue(bottomRight); + + this._isTinted = true; + + this.tintFill = false; + + return this; + }, + + /** + * Sets a fill-based tint on this Game Object. + * + * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture + * with those in the tint. You can use this for effects such as making a player flash 'white' + * if hit by something. You can provide either one color value, in which case the whole + * Game Object will be rendered in that color. Or you can provide a color per corner. The colors + * are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`. + * + * @method Phaser.GameObjects.Components.Tint#setTintFill + * @webglOnly + * @since 3.11.0 + * + * @param {integer} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. + * @param {integer} [topRight] - The tint being applied to the top-right of the Game Object. + * @param {integer} [bottomLeft] - The tint being applied to the bottom-left of the Game Object. + * @param {integer} [bottomRight] - The tint being applied to the bottom-right of the Game Object. + * + * @return {this} This Game Object instance. + */ + setTintFill: function (topLeft, topRight, bottomLeft, bottomRight) + { + this.setTint(topLeft, topRight, bottomLeft, bottomRight); + + this.tintFill = true; + + return this; + }, + + /** + * The tint value being applied to the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Tint#tintTopLeft + * @type {integer} + * @webglOnly + * @since 3.0.0 + */ + tintTopLeft: { + + get: function () + { + return this._tintTL; + }, + + set: function (value) + { + this._tintTL = GetColorFromValue(value); + this._isTinted = true; + } + + }, + + /** + * The tint value being applied to the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Tint#tintTopRight + * @type {integer} + * @webglOnly + * @since 3.0.0 + */ + tintTopRight: { + + get: function () + { + return this._tintTR; + }, + + set: function (value) + { + this._tintTR = GetColorFromValue(value); + this._isTinted = true; + } + + }, + + /** + * The tint value being applied to the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Tint#tintBottomLeft + * @type {integer} + * @webglOnly + * @since 3.0.0 + */ + tintBottomLeft: { + + get: function () + { + return this._tintBL; + }, + + set: function (value) + { + this._tintBL = GetColorFromValue(value); + this._isTinted = true; + } + + }, + + /** + * The tint value being applied to the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Tint#tintBottomRight + * @type {integer} + * @webglOnly + * @since 3.0.0 + */ + tintBottomRight: { + + get: function () + { + return this._tintBR; + }, + + set: function (value) + { + this._tintBR = GetColorFromValue(value); + this._isTinted = true; + } + + }, + + /** + * The tint value being applied to the whole of the Game Object. + * This property is a setter-only. Use the properties `tintTopLeft` etc to read the current tint value. + * + * @name Phaser.GameObjects.Components.Tint#tint + * @type {integer} + * @webglOnly + * @since 3.0.0 + */ + tint: { + + set: function (value) + { + this.setTint(value, value, value, value); + } + }, + + /** + * Does this Game Object have a tint applied to it or not? + * + * @name Phaser.GameObjects.Components.Tint#isTinted + * @type {boolean} + * @webglOnly + * @readonly + * @since 3.11.0 + */ + isTinted: { + + get: function () + { + return this._isTinted; + } + + } + +}; + +module.exports = Tint; + + /***/ }), /***/ "../../../src/gameobjects/components/ToJSON.js": @@ -4502,6 +11470,1726 @@ var Visible = { module.exports = Visible; +/***/ }), + +/***/ "../../../src/gameobjects/components/index.js": +/*!**************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/components/index.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.GameObjects.Components + */ + +module.exports = { + + Alpha: __webpack_require__(/*! ./Alpha */ "../../../src/gameobjects/components/Alpha.js"), + AlphaSingle: __webpack_require__(/*! ./AlphaSingle */ "../../../src/gameobjects/components/AlphaSingle.js"), + Animation: __webpack_require__(/*! ./Animation */ "../../../src/gameobjects/components/Animation.js"), + BlendMode: __webpack_require__(/*! ./BlendMode */ "../../../src/gameobjects/components/BlendMode.js"), + ComputedSize: __webpack_require__(/*! ./ComputedSize */ "../../../src/gameobjects/components/ComputedSize.js"), + Crop: __webpack_require__(/*! ./Crop */ "../../../src/gameobjects/components/Crop.js"), + Depth: __webpack_require__(/*! ./Depth */ "../../../src/gameobjects/components/Depth.js"), + Flip: __webpack_require__(/*! ./Flip */ "../../../src/gameobjects/components/Flip.js"), + GetBounds: __webpack_require__(/*! ./GetBounds */ "../../../src/gameobjects/components/GetBounds.js"), + Mask: __webpack_require__(/*! ./Mask */ "../../../src/gameobjects/components/Mask.js"), + Origin: __webpack_require__(/*! ./Origin */ "../../../src/gameobjects/components/Origin.js"), + PathFollower: __webpack_require__(/*! ./PathFollower */ "../../../src/gameobjects/components/PathFollower.js"), + Pipeline: __webpack_require__(/*! ./Pipeline */ "../../../src/gameobjects/components/Pipeline.js"), + ScrollFactor: __webpack_require__(/*! ./ScrollFactor */ "../../../src/gameobjects/components/ScrollFactor.js"), + Size: __webpack_require__(/*! ./Size */ "../../../src/gameobjects/components/Size.js"), + Texture: __webpack_require__(/*! ./Texture */ "../../../src/gameobjects/components/Texture.js"), + TextureCrop: __webpack_require__(/*! ./TextureCrop */ "../../../src/gameobjects/components/TextureCrop.js"), + Tint: __webpack_require__(/*! ./Tint */ "../../../src/gameobjects/components/Tint.js"), + ToJSON: __webpack_require__(/*! ./ToJSON */ "../../../src/gameobjects/components/ToJSON.js"), + Transform: __webpack_require__(/*! ./Transform */ "../../../src/gameobjects/components/Transform.js"), + TransformMatrix: __webpack_require__(/*! ./TransformMatrix */ "../../../src/gameobjects/components/TransformMatrix.js"), + Visible: __webpack_require__(/*! ./Visible */ "../../../src/gameobjects/components/Visible.js") + +}; + + +/***/ }), + +/***/ "../../../src/gameobjects/container/Container.js": +/*!*****************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/container/Container.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var ArrayUtils = __webpack_require__(/*! ../../utils/array */ "../../../src/utils/array/index.js"); +var BlendModes = __webpack_require__(/*! ../../renderer/BlendModes */ "../../../src/renderer/BlendModes.js"); +var Class = __webpack_require__(/*! ../../utils/Class */ "../../../src/utils/Class.js"); +var Components = __webpack_require__(/*! ../components */ "../../../src/gameobjects/components/index.js"); +var Events = __webpack_require__(/*! ../events */ "../../../src/gameobjects/events/index.js"); +var GameObject = __webpack_require__(/*! ../GameObject */ "../../../src/gameobjects/GameObject.js"); +var GameObjectEvents = __webpack_require__(/*! ../events */ "../../../src/gameobjects/events/index.js"); +var Rectangle = __webpack_require__(/*! ../../geom/rectangle/Rectangle */ "../../../src/geom/rectangle/Rectangle.js"); +var Render = __webpack_require__(/*! ./ContainerRender */ "../../../src/gameobjects/container/ContainerRender.js"); +var Union = __webpack_require__(/*! ../../geom/rectangle/Union */ "../../../src/geom/rectangle/Union.js"); +var Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "../../../src/math/Vector2.js"); + +/** + * @classdesc + * A Container Game Object. + * + * A Container, as the name implies, can 'contain' other types of Game Object. + * When a Game Object is added to a Container, the Container becomes responsible for the rendering of it. + * By default it will be removed from the Display List and instead added to the Containers own internal list. + * + * The position of the Game Object automatically becomes relative to the position of the Container. + * + * The origin of a Container is 0x0 (in local space) and that cannot be changed. The children you add to the + * Container should be positioned with this value in mind. I.e. you should treat 0x0 as being the center of + * the Container, and position children positively and negative around it as required. + * + * When the Container is rendered, all of its children are rendered as well, in the order in which they exist + * within the Container. Container children can be repositioned using methods such as `MoveUp`, `MoveDown` and `SendToBack`. + * + * If you modify a transform property of the Container, such as `Container.x` or `Container.rotation` then it will + * automatically influence all children as well. + * + * Containers can include other Containers for deeply nested transforms. + * + * Containers can have masks set on them and can be used as a mask too. However, Container children cannot be masked. + * The masks do not 'stack up'. Only a Container on the root of the display list will use its mask. + * + * Containers can be enabled for input. Because they do not have a texture you need to provide a shape for them + * to use as their hit area. Container children can also be enabled for input, independent of the Container. + * + * Containers can be given a physics body for either Arcade Physics, Impact Physics or Matter Physics. However, + * if Container _children_ are enabled for physics you may get unexpected results, such as offset bodies, + * if the Container itself, or any of its ancestors, is positioned anywhere other than at 0 x 0. Container children + * with physics do not factor in the Container due to the excessive extra calculations needed. Please structure + * your game to work around this. + * + * It's important to understand the impact of using Containers. They add additional processing overhead into + * every one of their children. The deeper you nest them, the more the cost escalates. This is especially true + * for input events. You also loose the ability to set the display depth of Container children in the same + * flexible manner as those not within them. In short, don't use them for the sake of it. You pay a small cost + * every time you create one, try to structure your game around avoiding that where possible. + * + * @class Container + * @extends Phaser.GameObjects.GameObject + * @memberof Phaser.GameObjects + * @constructor + * @since 3.4.0 + * + * @extends Phaser.GameObjects.Components.AlphaSingle + * @extends Phaser.GameObjects.Components.BlendMode + * @extends Phaser.GameObjects.Components.ComputedSize + * @extends Phaser.GameObjects.Components.Depth + * @extends Phaser.GameObjects.Components.Mask + * @extends Phaser.GameObjects.Components.Transform + * @extends Phaser.GameObjects.Components.Visible + * + * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time. + * @param {number} [x=0] - The horizontal position of this Game Object in the world. + * @param {number} [y=0] - The vertical position of this Game Object in the world. + * @param {Phaser.GameObjects.GameObject[]} [children] - An optional array of Game Objects to add to this Container. + */ +var Container = new Class({ + + Extends: GameObject, + + Mixins: [ + Components.AlphaSingle, + Components.BlendMode, + Components.ComputedSize, + Components.Depth, + Components.Mask, + Components.Transform, + Components.Visible, + Render + ], + + initialize: + + function Container (scene, x, y, children) + { + GameObject.call(this, scene, 'Container'); + + /** + * An array holding the children of this Container. + * + * @name Phaser.GameObjects.Container#list + * @type {Phaser.GameObjects.GameObject[]} + * @since 3.4.0 + */ + this.list = []; + + /** + * Does this Container exclusively manage its children? + * + * The default is `true` which means a child added to this Container cannot + * belong in another Container, which includes the Scene display list. + * + * If you disable this then this Container will no longer exclusively manage its children. + * This allows you to create all kinds of interesting graphical effects, such as replicating + * Game Objects without reparenting them all over the Scene. + * However, doing so will prevent children from receiving any kind of input event or have + * their physics bodies work by default, as they're no longer a single entity on the + * display list, but are being replicated where-ever this Container is. + * + * @name Phaser.GameObjects.Container#exclusive + * @type {boolean} + * @default true + * @since 3.4.0 + */ + this.exclusive = true; + + /** + * Containers can have an optional maximum size. If set to anything above 0 it + * will constrict the addition of new Game Objects into the Container, capping off + * the maximum limit the Container can grow in size to. + * + * @name Phaser.GameObjects.Container#maxSize + * @type {integer} + * @default -1 + * @since 3.4.0 + */ + this.maxSize = -1; + + /** + * The cursor position. + * + * @name Phaser.GameObjects.Container#position + * @type {integer} + * @since 3.4.0 + */ + this.position = 0; + + /** + * Internal Transform Matrix used for local space conversion. + * + * @name Phaser.GameObjects.Container#localTransform + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @since 3.4.0 + */ + this.localTransform = new Components.TransformMatrix(); + + /** + * Internal temporary Transform Matrix used to avoid object creation. + * + * @name Phaser.GameObjects.Container#tempTransformMatrix + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @private + * @since 3.4.0 + */ + this.tempTransformMatrix = new Components.TransformMatrix(); + + /** + * A reference to the Scene Display List. + * + * @name Phaser.GameObjects.Container#_displayList + * @type {Phaser.GameObjects.DisplayList} + * @private + * @since 3.4.0 + */ + this._displayList = scene.sys.displayList; + + /** + * The property key to sort by. + * + * @name Phaser.GameObjects.Container#_sortKey + * @type {string} + * @private + * @since 3.4.0 + */ + this._sortKey = ''; + + /** + * A reference to the Scene Systems Event Emitter. + * + * @name Phaser.GameObjects.Container#_sysEvents + * @type {Phaser.Events.EventEmitter} + * @private + * @since 3.9.0 + */ + this._sysEvents = scene.sys.events; + + /** + * The horizontal scroll factor of this Container. + * + * The scroll factor controls the influence of the movement of a Camera upon this Container. + * + * When a camera scrolls it will change the location at which this Container is rendered on-screen. + * It does not change the Containers actual position values. + * + * For a Container, setting this value will only update the Container itself, not its children. + * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method. + * + * 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 Container. + * + * 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. + * + * @name Phaser.GameObjects.Container#scrollFactorX + * @type {number} + * @default 1 + * @since 3.0.0 + */ + this.scrollFactorX = 1; + + /** + * The vertical scroll factor of this Container. + * + * The scroll factor controls the influence of the movement of a Camera upon this Container. + * + * When a camera scrolls it will change the location at which this Container is rendered on-screen. + * It does not change the Containers actual position values. + * + * For a Container, setting this value will only update the Container itself, not its children. + * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method. + * + * 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 Container. + * + * 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. + * + * @name Phaser.GameObjects.Container#scrollFactorY + * @type {number} + * @default 1 + * @since 3.0.0 + */ + this.scrollFactorY = 1; + + this.setPosition(x, y); + + this.clearAlpha(); + + this.setBlendMode(BlendModes.SKIP_CHECK); + + if (children) + { + this.add(children); + } + }, + + /** + * Internal value to allow Containers to be used for input and physics. + * Do not change this value. It has no effect other than to break things. + * + * @name Phaser.GameObjects.Container#originX + * @type {number} + * @readonly + * @since 3.4.0 + */ + originX: { + + get: function () + { + return 0.5; + } + + }, + + /** + * Internal value to allow Containers to be used for input and physics. + * Do not change this value. It has no effect other than to break things. + * + * @name Phaser.GameObjects.Container#originY + * @type {number} + * @readonly + * @since 3.4.0 + */ + originY: { + + get: function () + { + return 0.5; + } + + }, + + /** + * Internal value to allow Containers to be used for input and physics. + * Do not change this value. It has no effect other than to break things. + * + * @name Phaser.GameObjects.Container#displayOriginX + * @type {number} + * @readonly + * @since 3.4.0 + */ + displayOriginX: { + + get: function () + { + return this.width * 0.5; + } + + }, + + /** + * Internal value to allow Containers to be used for input and physics. + * Do not change this value. It has no effect other than to break things. + * + * @name Phaser.GameObjects.Container#displayOriginY + * @type {number} + * @readonly + * @since 3.4.0 + */ + displayOriginY: { + + get: function () + { + return this.height * 0.5; + } + + }, + + /** + * Does this Container exclusively manage its children? + * + * The default is `true` which means a child added to this Container cannot + * belong in another Container, which includes the Scene display list. + * + * If you disable this then this Container will no longer exclusively manage its children. + * This allows you to create all kinds of interesting graphical effects, such as replicating + * Game Objects without reparenting them all over the Scene. + * However, doing so will prevent children from receiving any kind of input event or have + * their physics bodies work by default, as they're no longer a single entity on the + * display list, but are being replicated where-ever this Container is. + * + * @method Phaser.GameObjects.Container#setExclusive + * @since 3.4.0 + * + * @param {boolean} [value=true] - The exclusive state of this Container. + * + * @return {this} This Container. + */ + setExclusive: function (value) + { + if (value === undefined) { value = true; } + + this.exclusive = value; + + return this; + }, + + /** + * Gets the bounds of this Container. It works by iterating all children of the Container, + * getting their respective bounds, and then working out a min-max rectangle from that. + * It does not factor in if the children render or not, all are included. + * + * Some children are unable to return their bounds, such as Graphics objects, in which case + * they are skipped. + * + * Depending on the quantity of children in this Container it could be a really expensive call, + * so cache it and only poll it as needed. + * + * The values are stored and returned in a Rectangle object. + * + * @method Phaser.GameObjects.Container#getBounds + * @since 3.4.0 + * + * @param {Phaser.Geom.Rectangle} [output] - A Geom.Rectangle object to store the values in. If not provided a new Rectangle will be created. + * + * @return {Phaser.Geom.Rectangle} The values stored in the output object. + */ + getBounds: function (output) + { + if (output === undefined) { output = new Rectangle(); } + + output.setTo(this.x, this.y, 0, 0); + + if (this.parentContainer) + { + var parentMatrix = this.parentContainer.getBoundsTransformMatrix(); + var transformedPosition = parentMatrix.transformPoint(this.x, this.y); + + output.setTo(transformedPosition.x, transformedPosition.y, 0, 0); + } + + if (this.list.length > 0) + { + var children = this.list; + var tempRect = new Rectangle(); + var hasSetFirst = false; + + output.setEmpty(); + + for (var i = 0; i < children.length; i++) + { + var entry = children[i]; + + if (entry.getBounds) + { + entry.getBounds(tempRect); + + if (!hasSetFirst) + { + output.setTo(tempRect.x, tempRect.y, tempRect.width, tempRect.height); + hasSetFirst = true; + } + else + { + Union(tempRect, output, output); + } + } + } + } + + return output; + }, + + /** + * Internal add handler. + * + * @method Phaser.GameObjects.Container#addHandler + * @private + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just added to this Container. + */ + addHandler: function (gameObject) + { + gameObject.once(Events.DESTROY, this.remove, this); + + if (this.exclusive) + { + this._displayList.remove(gameObject); + + if (gameObject.parentContainer) + { + gameObject.parentContainer.remove(gameObject); + } + + gameObject.parentContainer = this; + } + + // Is only on the Display List via this Container + if (!this.scene.sys.displayList.exists(gameObject)) + { + gameObject.emit(GameObjectEvents.ADDED_TO_SCENE, gameObject, this.scene); + } + }, + + /** + * Internal remove handler. + * + * @method Phaser.GameObjects.Container#removeHandler + * @private + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just removed from this Container. + */ + removeHandler: function (gameObject) + { + gameObject.off(Events.DESTROY, this.remove); + + if (this.exclusive) + { + gameObject.parentContainer = null; + } + + // Is only on the Display List via this Container + if (!this.scene.sys.displayList.exists(gameObject)) + { + gameObject.emit(GameObjectEvents.REMOVED_FROM_SCENE, gameObject, this.scene); + } + }, + + /** + * Takes a Point-like object, such as a Vector2, Geom.Point or object with public x and y properties, + * and transforms it into the space of this Container, then returns it in the output object. + * + * @method Phaser.GameObjects.Container#pointToContainer + * @since 3.4.0 + * + * @param {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} source - The Source Point to be transformed. + * @param {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} [output] - A destination object to store the transformed point in. If none given a Vector2 will be created and returned. + * + * @return {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} The transformed point. + */ + pointToContainer: function (source, output) + { + if (output === undefined) { output = new Vector2(); } + + if (this.parentContainer) + { + this.parentContainer.pointToContainer(source, output); + } + else + { + output = new Vector2(source.x, source.y); + } + + var tempMatrix = this.tempTransformMatrix; + + // No need to loadIdentity because applyITRS overwrites every value anyway + tempMatrix.applyITRS(this.x, this.y, this.rotation, this.scaleX, this.scaleY); + + tempMatrix.invert(); + + tempMatrix.transformPoint(source.x, source.y, output); + + return output; + }, + + /** + * Returns the world transform matrix as used for Bounds checks. + * + * The returned matrix is temporal and shouldn't be stored. + * + * @method Phaser.GameObjects.Container#getBoundsTransformMatrix + * @since 3.4.0 + * + * @return {Phaser.GameObjects.Components.TransformMatrix} The world transform matrix. + */ + getBoundsTransformMatrix: function () + { + return this.getWorldTransformMatrix(this.tempTransformMatrix, this.localTransform); + }, + + /** + * Adds the given Game Object, or array of Game Objects, to this Container. + * + * Each Game Object must be unique within the Container. + * + * @method Phaser.GameObjects.Container#add + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container. + * + * @return {this} This Container instance. + */ + add: function (child) + { + ArrayUtils.Add(this.list, child, this.maxSize, this.addHandler, this); + + return this; + }, + + /** + * Adds the given Game Object, or array of Game Objects, to this Container at the specified position. + * + * Existing Game Objects in the Container are shifted up. + * + * Each Game Object must be unique within the Container. + * + * @method Phaser.GameObjects.Container#addAt + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container. + * @param {integer} [index=0] - The position to insert the Game Object/s at. + * + * @return {this} This Container instance. + */ + addAt: function (child, index) + { + ArrayUtils.AddAt(this.list, child, index, this.maxSize, this.addHandler, this); + + return this; + }, + + /** + * Returns the Game Object at the given position in this Container. + * + * @method Phaser.GameObjects.Container#getAt + * @since 3.4.0 + * + * @param {integer} index - The position to get the Game Object from. + * + * @return {?Phaser.GameObjects.GameObject} The Game Object at the specified index, or `null` if none found. + */ + getAt: function (index) + { + return this.list[index]; + }, + + /** + * Returns the index of the given Game Object in this Container. + * + * @method Phaser.GameObjects.Container#getIndex + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container. + * + * @return {integer} The index of the Game Object in this Container, or -1 if not found. + */ + getIndex: function (child) + { + return this.list.indexOf(child); + }, + + /** + * Sort the contents of this Container so the items are in order based on the given property. + * For example: `sort('alpha')` would sort the elements based on the value of their `alpha` property. + * + * @method Phaser.GameObjects.Container#sort + * @since 3.4.0 + * + * @param {string} property - The property to lexically sort by. + * @param {function} [handler] - Provide your own custom handler function. Will receive 2 children which it should compare and return a boolean. + * + * @return {this} This Container instance. + */ + sort: function (property, handler) + { + if (!property) + { + return this; + } + + if (handler === undefined) + { + handler = function (childA, childB) + { + return childA[property] - childB[property]; + }; + } + + ArrayUtils.StableSort.inplace(this.list, handler); + + return this; + }, + + /** + * Searches for the first instance of a child with its `name` property matching the given argument. + * Should more than one child have the same name only the first is returned. + * + * @method Phaser.GameObjects.Container#getByName + * @since 3.4.0 + * + * @param {string} name - The name to search for. + * + * @return {?Phaser.GameObjects.GameObject} The first child with a matching name, or `null` if none were found. + */ + getByName: function (name) + { + return ArrayUtils.GetFirst(this.list, 'name', name); + }, + + /** + * Returns a random Game Object from this Container. + * + * @method Phaser.GameObjects.Container#getRandom + * @since 3.4.0 + * + * @param {integer} [startIndex=0] - An optional start index. + * @param {integer} [length] - An optional length, the total number of elements (from the startIndex) to choose from. + * + * @return {?Phaser.GameObjects.GameObject} A random child from the Container, or `null` if the Container is empty. + */ + getRandom: function (startIndex, length) + { + return ArrayUtils.GetRandom(this.list, startIndex, length); + }, + + /** + * Gets the first Game Object in this Container. + * + * You can also specify a property and value to search for, in which case it will return the first + * Game Object in this Container with a matching property and / or value. + * + * For example: `getFirst('visible', true)` would return the first Game Object that had its `visible` property set. + * + * You can limit the search to the `startIndex` - `endIndex` range. + * + * @method Phaser.GameObjects.Container#getFirst + * @since 3.4.0 + * + * @param {string} property - The property to test on each Game Object in the Container. + * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check. + * @param {integer} [startIndex=0] - An optional start index to search from. + * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included) + * + * @return {?Phaser.GameObjects.GameObject} The first matching Game Object, or `null` if none was found. + */ + getFirst: function (property, value, startIndex, endIndex) + { + return ArrayUtils.GetFirst(this.list, property, value, startIndex, endIndex); + }, + + /** + * Returns all Game Objects in this Container. + * + * You can optionally specify a matching criteria using the `property` and `value` arguments. + * + * For example: `getAll('body')` would return only Game Objects that have a body property. + * + * You can also specify a value to compare the property to: + * + * `getAll('visible', true)` would return only Game Objects that have their visible property set to `true`. + * + * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects, + * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only + * the first 50 Game Objects. + * + * @method Phaser.GameObjects.Container#getAll + * @since 3.4.0 + * + * @param {string} [property] - The property to test on each Game Object in the Container. + * @param {any} [value] - If property is set then the `property` must strictly equal this value to be included in the results. + * @param {integer} [startIndex=0] - An optional start index to search from. + * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included) + * + * @return {Phaser.GameObjects.GameObject[]} An array of matching Game Objects from this Container. + */ + getAll: function (property, value, startIndex, endIndex) + { + return ArrayUtils.GetAll(this.list, property, value, startIndex, endIndex); + }, + + /** + * Returns the total number of Game Objects in this Container that have a property + * matching the given value. + * + * For example: `count('visible', true)` would count all the elements that have their visible property set. + * + * You can optionally limit the operation to the `startIndex` - `endIndex` range. + * + * @method Phaser.GameObjects.Container#count + * @since 3.4.0 + * + * @param {string} property - The property to check. + * @param {any} value - The value to check. + * @param {integer} [startIndex=0] - An optional start index to search from. + * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included) + * + * @return {integer} The total number of Game Objects in this Container with a property matching the given value. + */ + count: function (property, value, startIndex, endIndex) + { + return ArrayUtils.CountAllMatching(this.list, property, value, startIndex, endIndex); + }, + + /** + * Swaps the position of two Game Objects in this Container. + * Both Game Objects must belong to this Container. + * + * @method Phaser.GameObjects.Container#swap + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} child1 - The first Game Object to swap. + * @param {Phaser.GameObjects.GameObject} child2 - The second Game Object to swap. + * + * @return {this} This Container instance. + */ + swap: function (child1, child2) + { + ArrayUtils.Swap(this.list, child1, child2); + + return this; + }, + + /** + * Moves a Game Object to a new position within this Container. + * + * The Game Object must already be a child of this Container. + * + * The Game Object is removed from its old position and inserted into the new one. + * Therefore the Container size does not change. Other children will change position accordingly. + * + * @method Phaser.GameObjects.Container#moveTo + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} child - The Game Object to move. + * @param {integer} index - The new position of the Game Object in this Container. + * + * @return {this} This Container instance. + */ + moveTo: function (child, index) + { + ArrayUtils.MoveTo(this.list, child, index); + + return this; + }, + + /** + * Removes the given Game Object, or array of Game Objects, from this Container. + * + * The Game Objects must already be children of this Container. + * + * You can also optionally call `destroy` on each Game Object that is removed from the Container. + * + * @method Phaser.GameObjects.Container#remove + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to be removed from the Container. + * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each child successfully removed from this Container. + * + * @return {this} This Container instance. + */ + remove: function (child, destroyChild) + { + var removed = ArrayUtils.Remove(this.list, child, this.removeHandler, this); + + if (destroyChild && removed) + { + if (!Array.isArray(removed)) + { + removed = [ removed ]; + } + + for (var i = 0; i < removed.length; i++) + { + removed[i].destroy(); + } + } + + return this; + }, + + /** + * Removes the Game Object at the given position in this Container. + * + * You can also optionally call `destroy` on the Game Object, if one is found. + * + * @method Phaser.GameObjects.Container#removeAt + * @since 3.4.0 + * + * @param {integer} index - The index of the Game Object to be removed. + * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container. + * + * @return {this} This Container instance. + */ + removeAt: function (index, destroyChild) + { + var removed = ArrayUtils.RemoveAt(this.list, index, this.removeHandler, this); + + if (destroyChild && removed) + { + removed.destroy(); + } + + return this; + }, + + /** + * Removes the Game Objects between the given positions in this Container. + * + * You can also optionally call `destroy` on each Game Object that is removed from the Container. + * + * @method Phaser.GameObjects.Container#removeBetween + * @since 3.4.0 + * + * @param {integer} [startIndex=0] - An optional start index to search from. + * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included) + * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container. + * + * @return {this} This Container instance. + */ + removeBetween: function (startIndex, endIndex, destroyChild) + { + var removed = ArrayUtils.RemoveBetween(this.list, startIndex, endIndex, this.removeHandler, this); + + if (destroyChild) + { + for (var i = 0; i < removed.length; i++) + { + removed[i].destroy(); + } + } + + return this; + }, + + /** + * Removes all Game Objects from this Container. + * + * You can also optionally call `destroy` on each Game Object that is removed from the Container. + * + * @method Phaser.GameObjects.Container#removeAll + * @since 3.4.0 + * + * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container. + * + * @return {this} This Container instance. + */ + removeAll: function (destroyChild) + { + var removed = ArrayUtils.RemoveBetween(this.list, 0, this.list.length, this.removeHandler, this); + + if (destroyChild) + { + for (var i = 0; i < removed.length; i++) + { + removed[i].destroy(); + } + } + + return this; + }, + + /** + * Brings the given Game Object to the top of this Container. + * This will cause it to render on-top of any other objects in the Container. + * + * @method Phaser.GameObjects.Container#bringToTop + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} child - The Game Object to bring to the top of the Container. + * + * @return {this} This Container instance. + */ + bringToTop: function (child) + { + ArrayUtils.BringToTop(this.list, child); + + return this; + }, + + /** + * Sends the given Game Object to the bottom of this Container. + * This will cause it to render below any other objects in the Container. + * + * @method Phaser.GameObjects.Container#sendToBack + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} child - The Game Object to send to the bottom of the Container. + * + * @return {this} This Container instance. + */ + sendToBack: function (child) + { + ArrayUtils.SendToBack(this.list, child); + + return this; + }, + + /** + * Moves the given Game Object up one place in this Container, unless it's already at the top. + * + * @method Phaser.GameObjects.Container#moveUp + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container. + * + * @return {this} This Container instance. + */ + moveUp: function (child) + { + ArrayUtils.MoveUp(this.list, child); + + return this; + }, + + /** + * Moves the given Game Object down one place in this Container, unless it's already at the bottom. + * + * @method Phaser.GameObjects.Container#moveDown + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container. + * + * @return {this} This Container instance. + */ + moveDown: function (child) + { + ArrayUtils.MoveDown(this.list, child); + + return this; + }, + + /** + * Reverses the order of all Game Objects in this Container. + * + * @method Phaser.GameObjects.Container#reverse + * @since 3.4.0 + * + * @return {this} This Container instance. + */ + reverse: function () + { + this.list.reverse(); + + return this; + }, + + /** + * Shuffles the all Game Objects in this Container using the Fisher-Yates implementation. + * + * @method Phaser.GameObjects.Container#shuffle + * @since 3.4.0 + * + * @return {this} This Container instance. + */ + shuffle: function () + { + ArrayUtils.Shuffle(this.list); + + return this; + }, + + /** + * Replaces a Game Object in this Container with the new Game Object. + * The new Game Object cannot already be a child of this Container. + * + * @method Phaser.GameObjects.Container#replace + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} oldChild - The Game Object in this Container that will be replaced. + * @param {Phaser.GameObjects.GameObject} newChild - The Game Object to be added to this Container. + * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container. + * + * @return {this} This Container instance. + */ + replace: function (oldChild, newChild, destroyChild) + { + var moved = ArrayUtils.Replace(this.list, oldChild, newChild); + + if (moved) + { + this.addHandler(newChild); + this.removeHandler(oldChild); + + if (destroyChild) + { + oldChild.destroy(); + } + } + + return this; + }, + + /** + * Returns `true` if the given Game Object is a direct child of this Container. + * + * This check does not scan nested Containers. + * + * @method Phaser.GameObjects.Container#exists + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} child - The Game Object to check for within this Container. + * + * @return {boolean} True if the Game Object is an immediate child of this Container, otherwise false. + */ + exists: function (child) + { + return (this.list.indexOf(child) > -1); + }, + + /** + * Sets the property to the given value on all Game Objects in this Container. + * + * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects, + * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only + * the first 50 Game Objects. + * + * @method Phaser.GameObjects.Container#setAll + * @since 3.4.0 + * + * @param {string} property - The property that must exist on the Game Object. + * @param {any} value - The value to get the property to. + * @param {integer} [startIndex=0] - An optional start index to search from. + * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included) + * + * @return {this} This Container instance. + */ + setAll: function (property, value, startIndex, endIndex) + { + ArrayUtils.SetAll(this.list, property, value, startIndex, endIndex); + + return this; + }, + + /** + * @callback EachContainerCallback + * @generic I - [item] + * + * @param {*} item - The child Game Object of the Container. + * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child. + */ + + /** + * Passes all Game Objects in this Container to the given callback. + * + * A copy of the Container is made before passing each entry to your callback. + * This protects against the callback itself modifying the Container. + * + * If you know for sure that the callback will not change the size of this Container + * then you can use the more performant `Container.iterate` method instead. + * + * @method Phaser.GameObjects.Container#each + * @since 3.4.0 + * + * @param {function} callback - The function to call. + * @param {object} [context] - Value to use as `this` when executing callback. + * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child. + * + * @return {this} This Container instance. + */ + each: function (callback, context) + { + var args = [ null ]; + var i; + var temp = this.list.slice(); + var len = temp.length; + + for (i = 2; i < arguments.length; i++) + { + args.push(arguments[i]); + } + + for (i = 0; i < len; i++) + { + args[0] = temp[i]; + + callback.apply(context, args); + } + + return this; + }, + + /** + * Passes all Game Objects in this Container to the given callback. + * + * Only use this method when you absolutely know that the Container will not be modified during + * the iteration, i.e. by removing or adding to its contents. + * + * @method Phaser.GameObjects.Container#iterate + * @since 3.4.0 + * + * @param {function} callback - The function to call. + * @param {object} [context] - Value to use as `this` when executing callback. + * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child. + * + * @return {this} This Container instance. + */ + iterate: function (callback, context) + { + var args = [ null ]; + var i; + + for (i = 2; i < arguments.length; i++) + { + args.push(arguments[i]); + } + + for (i = 0; i < this.list.length; i++) + { + args[0] = this.list[i]; + + callback.apply(context, args); + } + + return this; + }, + + /** + * Sets the scroll factor of this Container and optionally all of its children. + * + * 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. + * + * @method Phaser.GameObjects.Container#setScrollFactor + * @since 3.0.0 + * + * @param {number} x - The horizontal scroll factor of this Game Object. + * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value. + * @param {boolean} [updateChildren=false] - Apply this scrollFactor to all Container children as well? + * + * @return {this} This Game Object instance. + */ + setScrollFactor: function (x, y, updateChildren) + { + if (y === undefined) { y = x; } + if (updateChildren === undefined) { updateChildren = false; } + + this.scrollFactorX = x; + this.scrollFactorY = y; + + if (updateChildren) + { + ArrayUtils.SetAll(this.list, 'scrollFactorX', x); + ArrayUtils.SetAll(this.list, 'scrollFactorY', y); + } + + return this; + }, + + /** + * The number of Game Objects inside this Container. + * + * @name Phaser.GameObjects.Container#length + * @type {integer} + * @readonly + * @since 3.4.0 + */ + length: { + + get: function () + { + return this.list.length; + } + + }, + + /** + * Returns the first Game Object within the Container, or `null` if it is empty. + * + * You can move the cursor by calling `Container.next` and `Container.previous`. + * + * @name Phaser.GameObjects.Container#first + * @type {?Phaser.GameObjects.GameObject} + * @readonly + * @since 3.4.0 + */ + first: { + + get: function () + { + this.position = 0; + + if (this.list.length > 0) + { + return this.list[0]; + } + else + { + return null; + } + } + + }, + + /** + * Returns the last Game Object within the Container, or `null` if it is empty. + * + * You can move the cursor by calling `Container.next` and `Container.previous`. + * + * @name Phaser.GameObjects.Container#last + * @type {?Phaser.GameObjects.GameObject} + * @readonly + * @since 3.4.0 + */ + last: { + + get: function () + { + if (this.list.length > 0) + { + this.position = this.list.length - 1; + + return this.list[this.position]; + } + else + { + return null; + } + } + + }, + + /** + * Returns the next Game Object within the Container, or `null` if it is empty. + * + * You can move the cursor by calling `Container.next` and `Container.previous`. + * + * @name Phaser.GameObjects.Container#next + * @type {?Phaser.GameObjects.GameObject} + * @readonly + * @since 3.4.0 + */ + next: { + + get: function () + { + if (this.position < this.list.length) + { + this.position++; + + return this.list[this.position]; + } + else + { + return null; + } + } + + }, + + /** + * Returns the previous Game Object within the Container, or `null` if it is empty. + * + * You can move the cursor by calling `Container.next` and `Container.previous`. + * + * @name Phaser.GameObjects.Container#previous + * @type {?Phaser.GameObjects.GameObject} + * @readonly + * @since 3.4.0 + */ + previous: { + + get: function () + { + if (this.position > 0) + { + this.position--; + + return this.list[this.position]; + } + else + { + return null; + } + } + + }, + + /** + * Internal destroy handler, called as part of the destroy process. + * + * @method Phaser.GameObjects.Container#preDestroy + * @protected + * @since 3.9.0 + */ + preDestroy: function () + { + this.removeAll(!!this.exclusive); + + this.localTransform.destroy(); + this.tempTransformMatrix.destroy(); + + this.list = []; + this._displayList = null; + } + +}); + +module.exports = Container; + + +/***/ }), + +/***/ "../../../src/gameobjects/container/ContainerCanvasRenderer.js": +/*!*******************************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/container/ContainerCanvasRenderer.js ***! + \*******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Renders this Game Object with the Canvas Renderer to the given Camera. + * 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.Container#renderCanvas + * @since 3.4.0 + * @private + * + * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. + * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call. + * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. + * @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 ContainerCanvasRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix) +{ + var children = container.list; + + if (children.length === 0) + { + return; + } + + var transformMatrix = container.localTransform; + + if (parentMatrix) + { + transformMatrix.loadIdentity(); + transformMatrix.multiply(parentMatrix); + transformMatrix.translate(container.x, container.y); + transformMatrix.rotate(container.rotation); + transformMatrix.scale(container.scaleX, container.scaleY); + } + else + { + transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY); + } + + var containerHasBlendMode = (container.blendMode !== -1); + + if (!containerHasBlendMode) + { + // If Container is SKIP_TEST then set blend mode to be Normal + renderer.setBlendMode(0); + } + + var alpha = container._alpha; + var scrollFactorX = container.scrollFactorX; + var scrollFactorY = container.scrollFactorY; + + if (container.mask) + { + container.mask.preRenderCanvas(renderer, null, camera); + } + + for (var i = 0; i < children.length; i++) + { + var child = children[i]; + + if (!child.willRender(camera)) + { + continue; + } + + var childAlpha = child.alpha; + var childScrollFactorX = child.scrollFactorX; + var childScrollFactorY = child.scrollFactorY; + + if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode) + { + // If Container doesn't have its own blend mode, then a child can have one + renderer.setBlendMode(child.blendMode); + } + + // Set parent values + child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY); + child.setAlpha(childAlpha * alpha); + + // Render + child.renderCanvas(renderer, child, interpolationPercentage, camera, transformMatrix); + + // Restore original values + child.setAlpha(childAlpha); + child.setScrollFactor(childScrollFactorX, childScrollFactorY); + } + + if (container.mask) + { + container.mask.postRenderCanvas(renderer); + } +}; + +module.exports = ContainerCanvasRenderer; + + +/***/ }), + +/***/ "../../../src/gameobjects/container/ContainerRender.js": +/*!***********************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/container/ContainerRender.js ***! + \***********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "../../../src/utils/NOOP.js"); +var renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "../../../src/utils/NOOP.js"); + +if (true) +{ + renderWebGL = __webpack_require__(/*! ./ContainerWebGLRenderer */ "../../../src/gameobjects/container/ContainerWebGLRenderer.js"); +} + +if (true) +{ + renderCanvas = __webpack_require__(/*! ./ContainerCanvasRenderer */ "../../../src/gameobjects/container/ContainerCanvasRenderer.js"); +} + +module.exports = { + + renderWebGL: renderWebGL, + renderCanvas: renderCanvas + +}; + + +/***/ }), + +/***/ "../../../src/gameobjects/container/ContainerWebGLRenderer.js": +/*!******************************************************************************!*\ + !*** D:/wamp/www/phaser/src/gameobjects/container/ContainerWebGLRenderer.js ***! + \******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Renders this Game Object with the WebGL Renderer to the given Camera. + * 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.Container#renderWebGL + * @since 3.4.0 + * @private + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. + * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call. + * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. + * @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 ContainerWebGLRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix) +{ + var children = container.list; + + if (children.length === 0) + { + return; + } + + var transformMatrix = container.localTransform; + + if (parentMatrix) + { + transformMatrix.loadIdentity(); + transformMatrix.multiply(parentMatrix); + transformMatrix.translate(container.x, container.y); + transformMatrix.rotate(container.rotation); + transformMatrix.scale(container.scaleX, container.scaleY); + } + else + { + transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY); + } + + var containerHasBlendMode = (container.blendMode !== -1); + + if (!containerHasBlendMode) + { + // If Container is SKIP_TEST then set blend mode to be Normal + renderer.setBlendMode(0); + } + + var alpha = container.alpha; + + var scrollFactorX = container.scrollFactorX; + var scrollFactorY = container.scrollFactorY; + + var list = children; + var childCount = children.length; + + for (var i = 0; i < childCount; i++) + { + var child = children[i]; + + if (!child.willRender(camera)) + { + continue; + } + + var childAlphaTopLeft; + var childAlphaTopRight; + var childAlphaBottomLeft; + var childAlphaBottomRight; + + if (child.alphaTopLeft !== undefined) + { + childAlphaTopLeft = child.alphaTopLeft; + childAlphaTopRight = child.alphaTopRight; + childAlphaBottomLeft = child.alphaBottomLeft; + childAlphaBottomRight = child.alphaBottomRight; + } + else + { + var childAlpha = child.alpha; + + childAlphaTopLeft = childAlpha; + childAlphaTopRight = childAlpha; + childAlphaBottomLeft = childAlpha; + childAlphaBottomRight = childAlpha; + } + + var childScrollFactorX = child.scrollFactorX; + var childScrollFactorY = child.scrollFactorY; + + if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode) + { + // If Container doesn't have its own blend mode, then a child can have one + renderer.setBlendMode(child.blendMode); + } + + var mask = child.mask; + + if (mask) + { + mask.preRenderWebGL(renderer, child, camera); + } + + var type = child.type; + + if (type !== renderer.currentType) + { + renderer.newType = true; + renderer.currentType = type; + } + + renderer.nextTypeMatch = (i < childCount - 1) ? (list[i + 1].type === renderer.currentType) : false; + + // Set parent values + child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY); + + child.setAlpha(childAlphaTopLeft * alpha, childAlphaTopRight * alpha, childAlphaBottomLeft * alpha, childAlphaBottomRight * alpha); + + // Render + child.renderWebGL(renderer, child, interpolationPercentage, camera, transformMatrix); + + // Restore original values + + child.setAlpha(childAlphaTopLeft, childAlphaTopRight, childAlphaBottomLeft, childAlphaBottomRight); + + child.setScrollFactor(childScrollFactorX, childScrollFactorY); + + if (mask) + { + mask.postRenderWebGL(renderer, camera); + } + + renderer.newType = false; + } +}; + +module.exports = ContainerWebGLRenderer; + + /***/ }), /***/ "../../../src/gameobjects/events/ADDED_TO_SCENE_EVENT.js": @@ -4958,6 +13646,1547 @@ module.exports = { }; +/***/ }), + +/***/ "../../../src/geom/const.js": +/*!********************************************!*\ + !*** D:/wamp/www/phaser/src/geom/const.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GEOM_CONST = { + + /** + * A Circle Geometry object type. + * + * @name Phaser.Geom.CIRCLE + * @type {integer} + * @since 3.19.0 + */ + CIRCLE: 0, + + /** + * An Ellipse Geometry object type. + * + * @name Phaser.Geom.ELLIPSE + * @type {integer} + * @since 3.19.0 + */ + ELLIPSE: 1, + + /** + * A Line Geometry object type. + * + * @name Phaser.Geom.LINE + * @type {integer} + * @since 3.19.0 + */ + LINE: 2, + + /** + * A Point Geometry object type. + * + * @name Phaser.Geom.POINT + * @type {integer} + * @since 3.19.0 + */ + POINT: 3, + + /** + * A Polygon Geometry object type. + * + * @name Phaser.Geom.POLYGON + * @type {integer} + * @since 3.19.0 + */ + POLYGON: 4, + + /** + * A Rectangle Geometry object type. + * + * @name Phaser.Geom.RECTANGLE + * @type {integer} + * @since 3.19.0 + */ + RECTANGLE: 5, + + /** + * A Triangle Geometry object type. + * + * @name Phaser.Geom.TRIANGLE + * @type {integer} + * @since 3.19.0 + */ + TRIANGLE: 6 + +}; + +module.exports = GEOM_CONST; + + +/***/ }), + +/***/ "../../../src/geom/line/GetPoint.js": +/*!****************************************************!*\ + !*** D:/wamp/www/phaser/src/geom/line/GetPoint.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Point = __webpack_require__(/*! ../point/Point */ "../../../src/geom/point/Point.js"); + +/** + * Get a point on a line that's a given percentage along its length. + * + * @function Phaser.Geom.Line.GetPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [out,$return] + * + * @param {Phaser.Geom.Line} line - The line. + * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line. + * @param {(Phaser.Geom.Point|object)} [out] - An optional point, or point-like object, to store the coordinates of the point on the line. + * + * @return {(Phaser.Geom.Point|object)} The point on the line. + */ +var GetPoint = function (line, position, out) +{ + if (out === undefined) { out = new Point(); } + + out.x = line.x1 + (line.x2 - line.x1) * position; + out.y = line.y1 + (line.y2 - line.y1) * position; + + return out; +}; + +module.exports = GetPoint; + + +/***/ }), + +/***/ "../../../src/geom/line/GetPoints.js": +/*!*****************************************************!*\ + !*** D:/wamp/www/phaser/src/geom/line/GetPoints.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Length = __webpack_require__(/*! ./Length */ "../../../src/geom/line/Length.js"); +var Point = __webpack_require__(/*! ../point/Point */ "../../../src/geom/point/Point.js"); + +/** + * Get a number of points along a line's length. + * + * Provide a `quantity` to get an exact number of points along the line. + * + * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when + * providing a `stepRate`. + * + * @function Phaser.Geom.Line.GetPoints + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point[]} O - [out,$return] + * + * @param {Phaser.Geom.Line} line - The line. + * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead. + * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`. + * @param {(array|Phaser.Geom.Point[])} [out] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line. + * + * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line. + */ +var GetPoints = function (line, quantity, stepRate, out) +{ + if (out === undefined) { out = []; } + + // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. + if (!quantity && stepRate > 0) + { + quantity = Length(line) / stepRate; + } + + var x1 = line.x1; + var y1 = line.y1; + + var x2 = line.x2; + var y2 = line.y2; + + for (var i = 0; i < quantity; i++) + { + var position = i / quantity; + + var x = x1 + (x2 - x1) * position; + var y = y1 + (y2 - y1) * position; + + out.push(new Point(x, y)); + } + + return out; +}; + +module.exports = GetPoints; + + +/***/ }), + +/***/ "../../../src/geom/line/Length.js": +/*!**************************************************!*\ + !*** D:/wamp/www/phaser/src/geom/line/Length.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the length of the given line. + * + * @function Phaser.Geom.Line.Length + * @since 3.0.0 + * + * @param {Phaser.Geom.Line} line - The line to calculate the length of. + * + * @return {number} The length of the line. + */ +var Length = function (line) +{ + return Math.sqrt((line.x2 - line.x1) * (line.x2 - line.x1) + (line.y2 - line.y1) * (line.y2 - line.y1)); +}; + +module.exports = Length; + + +/***/ }), + +/***/ "../../../src/geom/line/Line.js": +/*!************************************************!*\ + !*** D:/wamp/www/phaser/src/geom/line/Line.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(/*! ../../utils/Class */ "../../../src/utils/Class.js"); +var GetPoint = __webpack_require__(/*! ./GetPoint */ "../../../src/geom/line/GetPoint.js"); +var GetPoints = __webpack_require__(/*! ./GetPoints */ "../../../src/geom/line/GetPoints.js"); +var GEOM_CONST = __webpack_require__(/*! ../const */ "../../../src/geom/const.js"); +var Random = __webpack_require__(/*! ./Random */ "../../../src/geom/line/Random.js"); +var Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "../../../src/math/Vector2.js"); + +/** + * @classdesc + * Defines a Line segment, a part of a line between two endpoints. + * + * @class Line + * @memberof Phaser.Geom + * @constructor + * @since 3.0.0 + * + * @param {number} [x1=0] - The x coordinate of the lines starting point. + * @param {number} [y1=0] - The y coordinate of the lines starting point. + * @param {number} [x2=0] - The x coordinate of the lines ending point. + * @param {number} [y2=0] - The y coordinate of the lines ending point. + */ +var Line = new Class({ + + initialize: + + function Line (x1, y1, x2, y2) + { + if (x1 === undefined) { x1 = 0; } + if (y1 === undefined) { y1 = 0; } + if (x2 === undefined) { x2 = 0; } + if (y2 === undefined) { y2 = 0; } + + /** + * The geometry constant type of this object: `GEOM_CONST.LINE`. + * Used for fast type comparisons. + * + * @name Phaser.Geom.Line#type + * @type {integer} + * @readonly + * @since 3.19.0 + */ + this.type = GEOM_CONST.LINE; + + /** + * The x coordinate of the lines starting point. + * + * @name Phaser.Geom.Line#x1 + * @type {number} + * @since 3.0.0 + */ + this.x1 = x1; + + /** + * The y coordinate of the lines starting point. + * + * @name Phaser.Geom.Line#y1 + * @type {number} + * @since 3.0.0 + */ + this.y1 = y1; + + /** + * The x coordinate of the lines ending point. + * + * @name Phaser.Geom.Line#x2 + * @type {number} + * @since 3.0.0 + */ + this.x2 = x2; + + /** + * The y coordinate of the lines ending point. + * + * @name Phaser.Geom.Line#y2 + * @type {number} + * @since 3.0.0 + */ + this.y2 = y2; + }, + + /** + * Get a point on a line that's a given percentage along its length. + * + * @method Phaser.Geom.Line#getPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [output,$return] + * + * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line. + * @param {(Phaser.Geom.Point|object)} [output] - An optional point, or point-like object, to store the coordinates of the point on the line. + * + * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point on the line. + */ + getPoint: function (position, output) + { + return GetPoint(this, position, output); + }, + + /** + * Get a number of points along a line's length. + * + * Provide a `quantity` to get an exact number of points along the line. + * + * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when + * providing a `stepRate`. + * + * @method Phaser.Geom.Line#getPoints + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point[]} O - [output,$return] + * + * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead. + * @param {integer} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`. + * @param {(array|Phaser.Geom.Point[])} [output] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line. + * + * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line. + */ + getPoints: function (quantity, stepRate, output) + { + return GetPoints(this, quantity, stepRate, output); + }, + + /** + * Get a random Point on the Line. + * + * @method Phaser.Geom.Line#getRandomPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [point,$return] + * + * @param {(Phaser.Geom.Point|object)} [point] - An instance of a Point to be modified. + * + * @return {Phaser.Geom.Point} A random Point on the Line. + */ + getRandomPoint: function (point) + { + return Random(this, point); + }, + + /** + * Set new coordinates for the line endpoints. + * + * @method Phaser.Geom.Line#setTo + * @since 3.0.0 + * + * @param {number} [x1=0] - The x coordinate of the lines starting point. + * @param {number} [y1=0] - The y coordinate of the lines starting point. + * @param {number} [x2=0] - The x coordinate of the lines ending point. + * @param {number} [y2=0] - The y coordinate of the lines ending point. + * + * @return {this} This Line object. + */ + setTo: function (x1, y1, x2, y2) + { + if (x1 === undefined) { x1 = 0; } + if (y1 === undefined) { y1 = 0; } + if (x2 === undefined) { x2 = 0; } + if (y2 === undefined) { y2 = 0; } + + this.x1 = x1; + this.y1 = y1; + + this.x2 = x2; + this.y2 = y2; + + return this; + }, + + /** + * Returns a Vector2 object that corresponds to the start of this Line. + * + * @method Phaser.Geom.Line#getPointA + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [vec2,$return] + * + * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created. + * + * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the start of this Line. + */ + getPointA: function (vec2) + { + if (vec2 === undefined) { vec2 = new Vector2(); } + + vec2.set(this.x1, this.y1); + + return vec2; + }, + + /** + * Returns a Vector2 object that corresponds to the end of this Line. + * + * @method Phaser.Geom.Line#getPointB + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [vec2,$return] + * + * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created. + * + * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the end of this Line. + */ + getPointB: function (vec2) + { + if (vec2 === undefined) { vec2 = new Vector2(); } + + vec2.set(this.x2, this.y2); + + return vec2; + }, + + /** + * The left position of the Line. + * + * @name Phaser.Geom.Line#left + * @type {number} + * @since 3.0.0 + */ + left: { + + get: function () + { + return Math.min(this.x1, this.x2); + }, + + set: function (value) + { + if (this.x1 <= this.x2) + { + this.x1 = value; + } + else + { + this.x2 = value; + } + } + + }, + + /** + * The right position of the Line. + * + * @name Phaser.Geom.Line#right + * @type {number} + * @since 3.0.0 + */ + right: { + + get: function () + { + return Math.max(this.x1, this.x2); + }, + + set: function (value) + { + if (this.x1 > this.x2) + { + this.x1 = value; + } + else + { + this.x2 = value; + } + } + + }, + + /** + * The top position of the Line. + * + * @name Phaser.Geom.Line#top + * @type {number} + * @since 3.0.0 + */ + top: { + + get: function () + { + return Math.min(this.y1, this.y2); + }, + + set: function (value) + { + if (this.y1 <= this.y2) + { + this.y1 = value; + } + else + { + this.y2 = value; + } + } + + }, + + /** + * The bottom position of the Line. + * + * @name Phaser.Geom.Line#bottom + * @type {number} + * @since 3.0.0 + */ + bottom: { + + get: function () + { + return Math.max(this.y1, this.y2); + }, + + set: function (value) + { + if (this.y1 > this.y2) + { + this.y1 = value; + } + else + { + this.y2 = value; + } + } + + } + +}); + +module.exports = Line; + + +/***/ }), + +/***/ "../../../src/geom/line/Random.js": +/*!**************************************************!*\ + !*** D:/wamp/www/phaser/src/geom/line/Random.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Point = __webpack_require__(/*! ../point/Point */ "../../../src/geom/point/Point.js"); + +/** + * Returns a random point on a given Line. + * + * @function Phaser.Geom.Line.Random + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [out,$return] + * + * @param {Phaser.Geom.Line} line - The Line to calculate the random Point on. + * @param {(Phaser.Geom.Point|object)} [out] - An instance of a Point to be modified. + * + * @return {(Phaser.Geom.Point|object)} A random Point on the Line. + */ +var Random = function (line, out) +{ + if (out === undefined) { out = new Point(); } + + var t = Math.random(); + + out.x = line.x1 + t * (line.x2 - line.x1); + out.y = line.y1 + t * (line.y2 - line.y1); + + return out; +}; + +module.exports = Random; + + +/***/ }), + +/***/ "../../../src/geom/point/Point.js": +/*!**************************************************!*\ + !*** D:/wamp/www/phaser/src/geom/point/Point.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(/*! ../../utils/Class */ "../../../src/utils/Class.js"); +var GEOM_CONST = __webpack_require__(/*! ../const */ "../../../src/geom/const.js"); + +/** + * @classdesc + * Defines a Point in 2D space, with an x and y component. + * + * @class Point + * @memberof Phaser.Geom + * @constructor + * @since 3.0.0 + * + * @param {number} [x=0] - The x coordinate of this Point. + * @param {number} [y=x] - The y coordinate of this Point. + */ +var Point = new Class({ + + initialize: + + function Point (x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = x; } + + /** + * The geometry constant type of this object: `GEOM_CONST.POINT`. + * Used for fast type comparisons. + * + * @name Phaser.Geom.Point#type + * @type {integer} + * @readonly + * @since 3.19.0 + */ + this.type = GEOM_CONST.POINT; + + /** + * The x coordinate of this Point. + * + * @name Phaser.Geom.Point#x + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.x = x; + + /** + * The y coordinate of this Point. + * + * @name Phaser.Geom.Point#y + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.y = y; + }, + + /** + * Set the x and y coordinates of the point to the given values. + * + * @method Phaser.Geom.Point#setTo + * @since 3.0.0 + * + * @param {number} [x=0] - The x coordinate of this Point. + * @param {number} [y=x] - The y coordinate of this Point. + * + * @return {this} This Point object. + */ + setTo: function (x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = x; } + + this.x = x; + this.y = y; + + return this; + } + +}); + +module.exports = Point; + + +/***/ }), + +/***/ "../../../src/geom/rectangle/Contains.js": +/*!*********************************************************!*\ + !*** D:/wamp/www/phaser/src/geom/rectangle/Contains.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Checks if a given point is inside a Rectangle's bounds. + * + * @function Phaser.Geom.Rectangle.Contains + * @since 3.0.0 + * + * @param {Phaser.Geom.Rectangle} rect - The Rectangle to check. + * @param {number} x - The X coordinate of the point to check. + * @param {number} y - The Y coordinate of the point to check. + * + * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`. + */ +var Contains = function (rect, x, y) +{ + if (rect.width <= 0 || rect.height <= 0) + { + return false; + } + + return (rect.x <= x && rect.x + rect.width >= x && rect.y <= y && rect.y + rect.height >= y); +}; + +module.exports = Contains; + + +/***/ }), + +/***/ "../../../src/geom/rectangle/GetPoint.js": +/*!*********************************************************!*\ + !*** D:/wamp/www/phaser/src/geom/rectangle/GetPoint.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Perimeter = __webpack_require__(/*! ./Perimeter */ "../../../src/geom/rectangle/Perimeter.js"); +var Point = __webpack_require__(/*! ../point/Point */ "../../../src/geom/point/Point.js"); + +/** + * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter. + * + * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is. + * + * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side. + * + * @function Phaser.Geom.Rectangle.GetPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [out,$return] + * + * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle to get the perimeter point from. + * @param {number} position - The normalized distance into the Rectangle's perimeter to return. + * @param {(Phaser.Geom.Point|object)} [out] - An object to update with the `x` and `y` coordinates of the point. + * + * @return {Phaser.Geom.Point} The updated `output` object, or a new Point if no `output` object was given. + */ +var GetPoint = function (rectangle, position, out) +{ + if (out === undefined) { out = new Point(); } + + if (position <= 0 || position >= 1) + { + out.x = rectangle.x; + out.y = rectangle.y; + + return out; + } + + var p = Perimeter(rectangle) * position; + + if (position > 0.5) + { + p -= (rectangle.width + rectangle.height); + + if (p <= rectangle.width) + { + // Face 3 + out.x = rectangle.right - p; + out.y = rectangle.bottom; + } + else + { + // Face 4 + out.x = rectangle.x; + out.y = rectangle.bottom - (p - rectangle.width); + } + } + else if (p <= rectangle.width) + { + // Face 1 + out.x = rectangle.x + p; + out.y = rectangle.y; + } + else + { + // Face 2 + out.x = rectangle.right; + out.y = rectangle.y + (p - rectangle.width); + } + + return out; +}; + +module.exports = GetPoint; + + +/***/ }), + +/***/ "../../../src/geom/rectangle/GetPoints.js": +/*!**********************************************************!*\ + !*** D:/wamp/www/phaser/src/geom/rectangle/GetPoints.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetPoint = __webpack_require__(/*! ./GetPoint */ "../../../src/geom/rectangle/GetPoint.js"); +var Perimeter = __webpack_require__(/*! ./Perimeter */ "../../../src/geom/rectangle/Perimeter.js"); + +// 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. + * + * @function Phaser.Geom.Rectangle.GetPoints + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point[]} O - [out,$return] + * + * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle object to get the points from. + * @param {number} step - Step between points. Used to calculate the number of points to return when quantity is falsey. Ignored if quantity is positive. + * @param {integer} quantity - The number of evenly spaced points from the rectangles perimeter to return. If falsey, step param will be used to calculate the number of points. + * @param {(array|Phaser.Geom.Point[])} [out] - An optional array to store the points in. + * + * @return {(array|Phaser.Geom.Point[])} An array of Points from the perimeter of the rectangle. + */ +var GetPoints = function (rectangle, quantity, stepRate, out) +{ + if (out === undefined) { out = []; } + + // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. + if (!quantity && stepRate > 0) + { + quantity = Perimeter(rectangle) / stepRate; + } + + for (var i = 0; i < quantity; i++) + { + var position = i / quantity; + + out.push(GetPoint(rectangle, position)); + } + + return out; +}; + +module.exports = GetPoints; + + +/***/ }), + +/***/ "../../../src/geom/rectangle/Perimeter.js": +/*!**********************************************************!*\ + !*** D:/wamp/www/phaser/src/geom/rectangle/Perimeter.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculates the perimeter of a Rectangle. + * + * @function Phaser.Geom.Rectangle.Perimeter + * @since 3.0.0 + * + * @param {Phaser.Geom.Rectangle} rect - The Rectangle to use. + * + * @return {number} The perimeter of the Rectangle, equal to `(width * 2) + (height * 2)`. + */ +var Perimeter = function (rect) +{ + return 2 * (rect.width + rect.height); +}; + +module.exports = Perimeter; + + +/***/ }), + +/***/ "../../../src/geom/rectangle/Random.js": +/*!*******************************************************!*\ + !*** D:/wamp/www/phaser/src/geom/rectangle/Random.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Point = __webpack_require__(/*! ../point/Point */ "../../../src/geom/point/Point.js"); + +/** + * Returns a random point within a Rectangle. + * + * @function Phaser.Geom.Rectangle.Random + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [out,$return] + * + * @param {Phaser.Geom.Rectangle} rect - The Rectangle to return a point from. + * @param {Phaser.Geom.Point} out - The object to update with the point's coordinates. + * + * @return {Phaser.Geom.Point} The modified `out` object, or a new Point if none was provided. + */ +var Random = function (rect, out) +{ + if (out === undefined) { out = new Point(); } + + out.x = rect.x + (Math.random() * rect.width); + out.y = rect.y + (Math.random() * rect.height); + + return out; +}; + +module.exports = Random; + + +/***/ }), + +/***/ "../../../src/geom/rectangle/Rectangle.js": +/*!**********************************************************!*\ + !*** D:/wamp/www/phaser/src/geom/rectangle/Rectangle.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(/*! ../../utils/Class */ "../../../src/utils/Class.js"); +var Contains = __webpack_require__(/*! ./Contains */ "../../../src/geom/rectangle/Contains.js"); +var GetPoint = __webpack_require__(/*! ./GetPoint */ "../../../src/geom/rectangle/GetPoint.js"); +var GetPoints = __webpack_require__(/*! ./GetPoints */ "../../../src/geom/rectangle/GetPoints.js"); +var GEOM_CONST = __webpack_require__(/*! ../const */ "../../../src/geom/const.js"); +var Line = __webpack_require__(/*! ../line/Line */ "../../../src/geom/line/Line.js"); +var Random = __webpack_require__(/*! ./Random */ "../../../src/geom/rectangle/Random.js"); + +/** + * @classdesc + * Encapsulates a 2D rectangle defined by its corner point in the top-left and its extends in x (width) and y (height) + * + * @class Rectangle + * @memberof Phaser.Geom + * @constructor + * @since 3.0.0 + * + * @param {number} [x=0] - The X coordinate of the top left corner of the Rectangle. + * @param {number} [y=0] - The Y coordinate of the top left corner of the Rectangle. + * @param {number} [width=0] - The width of the Rectangle. + * @param {number} [height=0] - The height of the Rectangle. + */ +var Rectangle = new Class({ + + initialize: + + function Rectangle (x, y, width, height) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + if (width === undefined) { width = 0; } + if (height === undefined) { height = 0; } + + /** + * The geometry constant type of this object: `GEOM_CONST.RECTANGLE`. + * Used for fast type comparisons. + * + * @name Phaser.Geom.Rectangle#type + * @type {integer} + * @readonly + * @since 3.19.0 + */ + this.type = GEOM_CONST.RECTANGLE; + + /** + * The X coordinate of the top left corner of the Rectangle. + * + * @name Phaser.Geom.Rectangle#x + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.x = x; + + /** + * The Y coordinate of the top left corner of the Rectangle. + * + * @name Phaser.Geom.Rectangle#y + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.y = y; + + /** + * The width of the Rectangle, i.e. the distance between its left side (defined by `x`) and its right side. + * + * @name Phaser.Geom.Rectangle#width + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.width = width; + + /** + * The height of the Rectangle, i.e. the distance between its top side (defined by `y`) and its bottom side. + * + * @name Phaser.Geom.Rectangle#height + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.height = height; + }, + + /** + * Checks if the given point is inside the Rectangle's bounds. + * + * @method Phaser.Geom.Rectangle#contains + * @since 3.0.0 + * + * @param {number} x - The X coordinate of the point to check. + * @param {number} y - The Y coordinate of the point to check. + * + * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`. + */ + contains: function (x, y) + { + return Contains(this, x, y); + }, + + /** + * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter. + * + * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is. + * + * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side. + * + * @method Phaser.Geom.Rectangle#getPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [output,$return] + * + * @param {number} position - The normalized distance into the Rectangle's perimeter to return. + * @param {(Phaser.Geom.Point|object)} [output] - An object to update with the `x` and `y` coordinates of the point. + * + * @return {(Phaser.Geom.Point|object)} The updated `output` object, or a new Point if no `output` object was given. + */ + getPoint: function (position, output) + { + return GetPoint(this, position, output); + }, + + /** + * Returns an array of points from the perimeter of the Rectangle, each spaced out based on the quantity or step required. + * + * @method Phaser.Geom.Rectangle#getPoints + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point[]} O - [output,$return] + * + * @param {integer} quantity - The number of points to return. Set to `false` or 0 to return an arbitrary number of points (`perimeter / stepRate`) evenly spaced around the Rectangle based on the `stepRate`. + * @param {number} [stepRate] - If `quantity` is 0, determines the normalized distance between each returned point. + * @param {(array|Phaser.Geom.Point[])} [output] - An array to which to append the points. + * + * @return {(array|Phaser.Geom.Point[])} The modified `output` array, or a new array if none was provided. + */ + getPoints: function (quantity, stepRate, output) + { + return GetPoints(this, quantity, stepRate, output); + }, + + /** + * Returns a random point within the Rectangle's bounds. + * + * @method Phaser.Geom.Rectangle#getRandomPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [point,$return] + * + * @param {Phaser.Geom.Point} [point] - The object in which to store the `x` and `y` coordinates of the point. + * + * @return {Phaser.Geom.Point} The updated `point`, or a new Point if none was provided. + */ + getRandomPoint: function (point) + { + return Random(this, point); + }, + + /** + * Sets the position, width, and height of the Rectangle. + * + * @method Phaser.Geom.Rectangle#setTo + * @since 3.0.0 + * + * @param {number} x - The X coordinate of the top left corner of the Rectangle. + * @param {number} y - The Y coordinate of the top left corner of the Rectangle. + * @param {number} width - The width of the Rectangle. + * @param {number} height - The height of the Rectangle. + * + * @return {this} This Rectangle object. + */ + setTo: function (x, y, width, height) + { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + + return this; + }, + + /** + * Resets the position, width, and height of the Rectangle to 0. + * + * @method Phaser.Geom.Rectangle#setEmpty + * @since 3.0.0 + * + * @return {this} This Rectangle object. + */ + setEmpty: function () + { + return this.setTo(0, 0, 0, 0); + }, + + /** + * Sets the position of the Rectangle. + * + * @method Phaser.Geom.Rectangle#setPosition + * @since 3.0.0 + * + * @param {number} x - The X coordinate of the top left corner of the Rectangle. + * @param {number} [y=x] - The Y coordinate of the top left corner of the Rectangle. + * + * @return {this} This Rectangle object. + */ + setPosition: function (x, y) + { + if (y === undefined) { y = x; } + + this.x = x; + this.y = y; + + return this; + }, + + /** + * Sets the width and height of the Rectangle. + * + * @method Phaser.Geom.Rectangle#setSize + * @since 3.0.0 + * + * @param {number} width - The width to set the Rectangle to. + * @param {number} [height=width] - The height to set the Rectangle to. + * + * @return {this} This Rectangle object. + */ + setSize: function (width, height) + { + if (height === undefined) { height = width; } + + this.width = width; + this.height = height; + + return this; + }, + + /** + * Determines if the Rectangle is empty. A Rectangle is empty if its width or height is less than or equal to 0. + * + * @method Phaser.Geom.Rectangle#isEmpty + * @since 3.0.0 + * + * @return {boolean} `true` if the Rectangle is empty. A Rectangle object is empty if its width or height is less than or equal to 0. + */ + isEmpty: function () + { + return (this.width <= 0 || this.height <= 0); + }, + + /** + * Returns a Line object that corresponds to the top of this Rectangle. + * + * @method Phaser.Geom.Rectangle#getLineA + * @since 3.0.0 + * + * @generic {Phaser.Geom.Line} O - [line,$return] + * + * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created. + * + * @return {Phaser.Geom.Line} A Line object that corresponds to the top of this Rectangle. + */ + getLineA: function (line) + { + if (line === undefined) { line = new Line(); } + + line.setTo(this.x, this.y, this.right, this.y); + + return line; + }, + + /** + * Returns a Line object that corresponds to the right of this Rectangle. + * + * @method Phaser.Geom.Rectangle#getLineB + * @since 3.0.0 + * + * @generic {Phaser.Geom.Line} O - [line,$return] + * + * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created. + * + * @return {Phaser.Geom.Line} A Line object that corresponds to the right of this Rectangle. + */ + getLineB: function (line) + { + if (line === undefined) { line = new Line(); } + + line.setTo(this.right, this.y, this.right, this.bottom); + + return line; + }, + + /** + * Returns a Line object that corresponds to the bottom of this Rectangle. + * + * @method Phaser.Geom.Rectangle#getLineC + * @since 3.0.0 + * + * @generic {Phaser.Geom.Line} O - [line,$return] + * + * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created. + * + * @return {Phaser.Geom.Line} A Line object that corresponds to the bottom of this Rectangle. + */ + getLineC: function (line) + { + if (line === undefined) { line = new Line(); } + + line.setTo(this.right, this.bottom, this.x, this.bottom); + + return line; + }, + + /** + * Returns a Line object that corresponds to the left of this Rectangle. + * + * @method Phaser.Geom.Rectangle#getLineD + * @since 3.0.0 + * + * @generic {Phaser.Geom.Line} O - [line,$return] + * + * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created. + * + * @return {Phaser.Geom.Line} A Line object that corresponds to the left of this Rectangle. + */ + getLineD: function (line) + { + if (line === undefined) { line = new Line(); } + + line.setTo(this.x, this.bottom, this.x, this.y); + + return line; + }, + + /** + * The x coordinate of the left of the Rectangle. + * Changing the left property of a Rectangle object has no effect on the y and height properties. However it does affect the width property, whereas changing the x value does not affect the width property. + * + * @name Phaser.Geom.Rectangle#left + * @type {number} + * @since 3.0.0 + */ + left: { + + get: function () + { + return this.x; + }, + + set: function (value) + { + if (value >= this.right) + { + this.width = 0; + } + else + { + this.width = this.right - value; + } + + this.x = value; + } + + }, + + /** + * The sum of the x and width properties. + * Changing the right property of a Rectangle object has no effect on the x, y and height properties, however it does affect the width property. + * + * @name Phaser.Geom.Rectangle#right + * @type {number} + * @since 3.0.0 + */ + right: { + + get: function () + { + return this.x + this.width; + }, + + set: function (value) + { + if (value <= this.x) + { + this.width = 0; + } + else + { + this.width = value - this.x; + } + } + + }, + + /** + * The y coordinate of the top of the Rectangle. Changing the top property of a Rectangle object has no effect on the x and width properties. + * However it does affect the height property, whereas changing the y value does not affect the height property. + * + * @name Phaser.Geom.Rectangle#top + * @type {number} + * @since 3.0.0 + */ + top: { + + get: function () + { + return this.y; + }, + + set: function (value) + { + if (value >= this.bottom) + { + this.height = 0; + } + else + { + this.height = (this.bottom - value); + } + + this.y = value; + } + + }, + + /** + * The sum of the y and height properties. + * Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property. + * + * @name Phaser.Geom.Rectangle#bottom + * @type {number} + * @since 3.0.0 + */ + bottom: { + + get: function () + { + return this.y + this.height; + }, + + set: function (value) + { + if (value <= this.y) + { + this.height = 0; + } + else + { + this.height = value - this.y; + } + } + + }, + + /** + * The x coordinate of the center of the Rectangle. + * + * @name Phaser.Geom.Rectangle#centerX + * @type {number} + * @since 3.0.0 + */ + centerX: { + + get: function () + { + return this.x + (this.width / 2); + }, + + set: function (value) + { + this.x = value - (this.width / 2); + } + + }, + + /** + * The y coordinate of the center of the Rectangle. + * + * @name Phaser.Geom.Rectangle#centerY + * @type {number} + * @since 3.0.0 + */ + centerY: { + + get: function () + { + return this.y + (this.height / 2); + }, + + set: function (value) + { + this.y = value - (this.height / 2); + } + + } + +}); + +module.exports = Rectangle; + + +/***/ }), + +/***/ "../../../src/geom/rectangle/Union.js": +/*!******************************************************!*\ + !*** D:/wamp/www/phaser/src/geom/rectangle/Union.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Rectangle = __webpack_require__(/*! ./Rectangle */ "../../../src/geom/rectangle/Rectangle.js"); + +/** + * Creates a new Rectangle or repositions and/or resizes an existing Rectangle so that it encompasses the two given Rectangles, i.e. calculates their union. + * + * @function Phaser.Geom.Rectangle.Union + * @since 3.0.0 + * + * @generic {Phaser.Geom.Rectangle} O - [out,$return] + * + * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle to use. + * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle to use. + * @param {Phaser.Geom.Rectangle} [out] - The Rectangle to store the union in. + * + * @return {Phaser.Geom.Rectangle} The modified `out` Rectangle, or a new Rectangle if none was provided. + */ +var Union = function (rectA, rectB, out) +{ + if (out === undefined) { out = new Rectangle(); } + + // Cache vars so we can use one of the input rects as the output rect + var x = Math.min(rectA.x, rectB.x); + var y = Math.min(rectA.y, rectB.y); + var w = Math.max(rectA.right, rectB.right) - x; + var h = Math.max(rectA.bottom, rectB.bottom) - y; + + return out.setTo(x, y, w, h); +}; + +module.exports = Union; + + /***/ }), /***/ "../../../src/loader/File.js": @@ -19524,6 +29753,229 @@ module.exports = { }; +/***/ }), + +/***/ "../../../src/tweens/builders/GetBoolean.js": +/*!************************************************************!*\ + !*** D:/wamp/www/phaser/src/tweens/builders/GetBoolean.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Retrieves the value of the given key from an object. + * + * @function Phaser.Tweens.Builders.GetBoolean + * @since 3.0.0 + * + * @param {object} source - The object to retrieve the value from. + * @param {string} key - The key to look for in the `source` object. + * @param {*} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided. + * + * @return {*} The retrieved value. + */ +var GetBoolean = function (source, key, defaultValue) +{ + if (!source) + { + return defaultValue; + } + else if (source.hasOwnProperty(key)) + { + return source[key]; + } + else + { + return defaultValue; + } +}; + +module.exports = GetBoolean; + + +/***/ }), + +/***/ "../../../src/tweens/tween/const.js": +/*!****************************************************!*\ + !*** D:/wamp/www/phaser/src/tweens/tween/const.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var TWEEN_CONST = { + + /** + * TweenData state. + * + * @name Phaser.Tweens.CREATED + * @type {integer} + * @since 3.0.0 + */ + CREATED: 0, + + /** + * TweenData state. + * + * @name Phaser.Tweens.INIT + * @type {integer} + * @since 3.0.0 + */ + INIT: 1, + + /** + * TweenData state. + * + * @name Phaser.Tweens.DELAY + * @type {integer} + * @since 3.0.0 + */ + DELAY: 2, + + /** + * TweenData state. + * + * @name Phaser.Tweens.OFFSET_DELAY + * @type {integer} + * @since 3.0.0 + */ + OFFSET_DELAY: 3, + + /** + * TweenData state. + * + * @name Phaser.Tweens.PENDING_RENDER + * @type {integer} + * @since 3.0.0 + */ + PENDING_RENDER: 4, + + /** + * TweenData state. + * + * @name Phaser.Tweens.PLAYING_FORWARD + * @type {integer} + * @since 3.0.0 + */ + PLAYING_FORWARD: 5, + + /** + * TweenData state. + * + * @name Phaser.Tweens.PLAYING_BACKWARD + * @type {integer} + * @since 3.0.0 + */ + PLAYING_BACKWARD: 6, + + /** + * TweenData state. + * + * @name Phaser.Tweens.HOLD_DELAY + * @type {integer} + * @since 3.0.0 + */ + HOLD_DELAY: 7, + + /** + * TweenData state. + * + * @name Phaser.Tweens.REPEAT_DELAY + * @type {integer} + * @since 3.0.0 + */ + REPEAT_DELAY: 8, + + /** + * TweenData state. + * + * @name Phaser.Tweens.COMPLETE + * @type {integer} + * @since 3.0.0 + */ + COMPLETE: 9, + + // Tween specific (starts from 20 to cleanly allow extra TweenData consts in the future) + + /** + * Tween state. + * + * @name Phaser.Tweens.PENDING_ADD + * @type {integer} + * @since 3.0.0 + */ + PENDING_ADD: 20, + + /** + * Tween state. + * + * @name Phaser.Tweens.PAUSED + * @type {integer} + * @since 3.0.0 + */ + PAUSED: 21, + + /** + * Tween state. + * + * @name Phaser.Tweens.LOOP_DELAY + * @type {integer} + * @since 3.0.0 + */ + LOOP_DELAY: 22, + + /** + * Tween state. + * + * @name Phaser.Tweens.ACTIVE + * @type {integer} + * @since 3.0.0 + */ + ACTIVE: 23, + + /** + * Tween state. + * + * @name Phaser.Tweens.COMPLETE_DELAY + * @type {integer} + * @since 3.0.0 + */ + COMPLETE_DELAY: 24, + + /** + * Tween state. + * + * @name Phaser.Tweens.PENDING_REMOVE + * @type {integer} + * @since 3.0.0 + */ + PENDING_REMOVE: 25, + + /** + * Tween state. + * + * @name Phaser.Tweens.REMOVED + * @type {integer} + * @since 3.0.0 + */ + REMOVED: 26 + +}; + +module.exports = TWEEN_CONST; + + /***/ }), /***/ "../../../src/utils/Class.js": @@ -19815,6 +30267,2718 @@ var NOOP = function () module.exports = NOOP; +/***/ }), + +/***/ "../../../src/utils/array/Add.js": +/*!*************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/Add.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Adds the given item, or array of items, to the array. + * + * Each item must be unique within the array. + * + * The array is modified in-place and returned. + * + * You can optionally specify a limit to the maximum size of the array. If the quantity of items being + * added will take the array length over this limit, it will stop adding once the limit is reached. + * + * You can optionally specify a callback to be invoked for each item successfully added to the array. + * + * @function Phaser.Utils.Array.Add + * @since 3.4.0 + * + * @param {array} array - The array to be added to. + * @param {any|any[]} item - The item, or array of items, to add to the array. Each item must be unique within the array. + * @param {integer} [limit] - Optional limit which caps the size of the array. + * @param {function} [callback] - A callback to be invoked for each item successfully added to the array. + * @param {object} [context] - The context in which the callback is invoked. + * + * @return {array} The input array. + */ +var Add = function (array, item, limit, callback, context) +{ + if (context === undefined) { context = array; } + + if (limit > 0) + { + var remaining = limit - array.length; + + // There's nothing more we can do here, the array is full + if (remaining <= 0) + { + return null; + } + } + + // Fast path to avoid array mutation and iteration + if (!Array.isArray(item)) + { + if (array.indexOf(item) === -1) + { + array.push(item); + + if (callback) + { + callback.call(context, item); + } + + return item; + } + else + { + return null; + } + } + + // If we got this far, we have an array of items to insert + + // Ensure all the items are unique + var itemLength = item.length - 1; + + while (itemLength >= 0) + { + if (array.indexOf(item[itemLength]) !== -1) + { + // Already exists in array, so remove it + item.splice(itemLength, 1); + } + + itemLength--; + } + + // Anything left? + itemLength = item.length; + + if (itemLength === 0) + { + return null; + } + + if (limit > 0 && itemLength > remaining) + { + item.splice(remaining); + + itemLength = remaining; + } + + for (var i = 0; i < itemLength; i++) + { + var entry = item[i]; + + array.push(entry); + + if (callback) + { + callback.call(context, entry); + } + } + + return item; +}; + +module.exports = Add; + + +/***/ }), + +/***/ "../../../src/utils/array/AddAt.js": +/*!***************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/AddAt.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Adds the given item, or array of items, to the array starting at the index specified. + * + * Each item must be unique within the array. + * + * Existing elements in the array are shifted up. + * + * The array is modified in-place and returned. + * + * You can optionally specify a limit to the maximum size of the array. If the quantity of items being + * added will take the array length over this limit, it will stop adding once the limit is reached. + * + * You can optionally specify a callback to be invoked for each item successfully added to the array. + * + * @function Phaser.Utils.Array.AddAt + * @since 3.4.0 + * + * @param {array} array - The array to be added to. + * @param {any|any[]} item - The item, or array of items, to add to the array. + * @param {integer} [index=0] - The index in the array where the item will be inserted. + * @param {integer} [limit] - Optional limit which caps the size of the array. + * @param {function} [callback] - A callback to be invoked for each item successfully added to the array. + * @param {object} [context] - The context in which the callback is invoked. + * + * @return {array} The input array. + */ +var AddAt = function (array, item, index, limit, callback, context) +{ + if (index === undefined) { index = 0; } + if (context === undefined) { context = array; } + + if (limit > 0) + { + var remaining = limit - array.length; + + // There's nothing more we can do here, the array is full + if (remaining <= 0) + { + return null; + } + } + + // Fast path to avoid array mutation and iteration + if (!Array.isArray(item)) + { + if (array.indexOf(item) === -1) + { + array.splice(index, 0, item); + + if (callback) + { + callback.call(context, item); + } + + return item; + } + else + { + return null; + } + } + + // If we got this far, we have an array of items to insert + + // Ensure all the items are unique + var itemLength = item.length - 1; + + while (itemLength >= 0) + { + if (array.indexOf(item[itemLength]) !== -1) + { + // Already exists in array, so remove it + item.pop(); + } + + itemLength--; + } + + // Anything left? + itemLength = item.length; + + if (itemLength === 0) + { + return null; + } + + // Truncate to the limit + if (limit > 0 && itemLength > remaining) + { + item.splice(remaining); + + itemLength = remaining; + } + + for (var i = itemLength - 1; i >= 0; i--) + { + var entry = item[i]; + + array.splice(index, 0, entry); + + if (callback) + { + callback.call(context, entry); + } + } + + return item; +}; + +module.exports = AddAt; + + +/***/ }), + +/***/ "../../../src/utils/array/BringToTop.js": +/*!********************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/BringToTop.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the given element to the top of the array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.BringToTop + * @since 3.4.0 + * + * @param {array} array - The array. + * @param {*} item - The element to move. + * + * @return {*} The element that was moved. + */ +var BringToTop = function (array, item) +{ + var currentIndex = array.indexOf(item); + + if (currentIndex !== -1 && currentIndex < array.length) + { + array.splice(currentIndex, 1); + array.push(item); + } + + return item; +}; + +module.exports = BringToTop; + + +/***/ }), + +/***/ "../../../src/utils/array/CountAllMatching.js": +/*!**************************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/CountAllMatching.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SafeRange = __webpack_require__(/*! ./SafeRange */ "../../../src/utils/array/SafeRange.js"); + +/** + * Returns the total number of elements in the array which have a property matching the given value. + * + * @function Phaser.Utils.Array.CountAllMatching + * @since 3.4.0 + * + * @param {array} array - The array to search. + * @param {string} property - The property to test on each array element. + * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check. + * @param {integer} [startIndex] - An optional start index to search from. + * @param {integer} [endIndex] - An optional end index to search to. + * + * @return {integer} The total number of elements with properties matching the given value. + */ +var CountAllMatching = function (array, property, value, startIndex, endIndex) +{ + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = array.length; } + + var total = 0; + + if (SafeRange(array, startIndex, endIndex)) + { + for (var i = startIndex; i < endIndex; i++) + { + var child = array[i]; + + if (child[property] === value) + { + total++; + } + } + } + + return total; +}; + +module.exports = CountAllMatching; + + +/***/ }), + +/***/ "../../../src/utils/array/Each.js": +/*!**************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/Each.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Passes each element in the array to the given callback. + * + * @function Phaser.Utils.Array.Each + * @since 3.4.0 + * + * @param {array} array - The array to search. + * @param {function} callback - A callback to be invoked for each item in the array. + * @param {object} context - The context in which the callback is invoked. + * @param {...*} [args] - Additional arguments that will be passed to the callback, after the current array item. + * + * @return {array} The input array. + */ +var Each = function (array, callback, context) +{ + var i; + var args = [ null ]; + + for (i = 3; i < arguments.length; i++) + { + args.push(arguments[i]); + } + + for (i = 0; i < array.length; i++) + { + args[0] = array[i]; + + callback.apply(context, args); + } + + return array; +}; + +module.exports = Each; + + +/***/ }), + +/***/ "../../../src/utils/array/EachInRange.js": +/*!*********************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/EachInRange.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SafeRange = __webpack_require__(/*! ./SafeRange */ "../../../src/utils/array/SafeRange.js"); + +/** + * Passes each element in the array, between the start and end indexes, to the given callback. + * + * @function Phaser.Utils.Array.EachInRange + * @since 3.4.0 + * + * @param {array} array - The array to search. + * @param {function} callback - A callback to be invoked for each item in the array. + * @param {object} context - The context in which the callback is invoked. + * @param {integer} startIndex - The start index to search from. + * @param {integer} endIndex - The end index to search to. + * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child. + * + * @return {array} The input array. + */ +var EachInRange = function (array, callback, context, startIndex, endIndex) +{ + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = array.length; } + + if (SafeRange(array, startIndex, endIndex)) + { + var i; + var args = [ null ]; + + for (i = 5; i < arguments.length; i++) + { + args.push(arguments[i]); + } + + for (i = startIndex; i < endIndex; i++) + { + args[0] = array[i]; + + callback.apply(context, args); + } + } + + return array; +}; + +module.exports = EachInRange; + + +/***/ }), + +/***/ "../../../src/utils/array/FindClosestInSorted.js": +/*!*****************************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/FindClosestInSorted.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Searches a pre-sorted array for the closet value to the given number. + * + * If the `key` argument is given it will assume the array contains objects that all have the required `key` property name, + * and will check for the closest value of those to the given number. + * + * @function Phaser.Utils.Array.FindClosestInSorted + * @since 3.0.0 + * + * @param {number} value - The value to search for in the array. + * @param {array} array - The array to search, which must be sorted. + * @param {string} [key] - An optional property key. If specified the array elements property will be checked against value. + * + * @return {(number|any)} The nearest value found in the array, or if a `key` was given, the nearest object with the matching property value. + */ +var FindClosestInSorted = function (value, array, key) +{ + if (!array.length) + { + return NaN; + } + else if (array.length === 1) + { + return array[0]; + } + + var i = 1; + var low; + var high; + + if (key) + { + if (value < array[0][key]) + { + return array[0]; + } + + while (array[i][key] < value) + { + i++; + } + } + else + { + while (array[i] < value) + { + i++; + } + } + + if (i > array.length) + { + i = array.length; + } + + if (key) + { + low = array[i - 1][key]; + high = array[i][key]; + + return ((high - value) <= (value - low)) ? array[i] : array[i - 1]; + } + else + { + low = array[i - 1]; + high = array[i]; + + return ((high - value) <= (value - low)) ? high : low; + } +}; + +module.exports = FindClosestInSorted; + + +/***/ }), + +/***/ "../../../src/utils/array/GetAll.js": +/*!****************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/GetAll.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SafeRange = __webpack_require__(/*! ./SafeRange */ "../../../src/utils/array/SafeRange.js"); + +/** + * Returns all elements in the array. + * + * You can optionally specify a matching criteria using the `property` and `value` arguments. + * + * For example: `getAll('visible', true)` would return only elements that have their visible property set. + * + * Optionally you can specify a start and end index. For example if the array had 100 elements, + * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only + * the first 50 elements. + * + * @function Phaser.Utils.Array.GetAll + * @since 3.4.0 + * + * @param {array} array - The array to search. + * @param {string} [property] - The property to test on each array element. + * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check. + * @param {integer} [startIndex] - An optional start index to search from. + * @param {integer} [endIndex] - An optional end index to search to. + * + * @return {array} All matching elements from the array. + */ +var GetAll = function (array, property, value, startIndex, endIndex) +{ + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = array.length; } + + var output = []; + + if (SafeRange(array, startIndex, endIndex)) + { + for (var i = startIndex; i < endIndex; i++) + { + var child = array[i]; + + if (!property || + (property && value === undefined && child.hasOwnProperty(property)) || + (property && value !== undefined && child[property] === value)) + { + output.push(child); + } + } + } + + return output; +}; + +module.exports = GetAll; + + +/***/ }), + +/***/ "../../../src/utils/array/GetFirst.js": +/*!******************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/GetFirst.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SafeRange = __webpack_require__(/*! ./SafeRange */ "../../../src/utils/array/SafeRange.js"); + +/** + * Returns the first element in the array. + * + * You can optionally specify a matching criteria using the `property` and `value` arguments. + * + * For example: `getAll('visible', true)` would return the first element that had its `visible` property set. + * + * Optionally you can specify a start and end index. For example if the array had 100 elements, + * and you set `startIndex` to 0 and `endIndex` to 50, it would search only the first 50 elements. + * + * @function Phaser.Utils.Array.GetFirst + * @since 3.4.0 + * + * @param {array} array - The array to search. + * @param {string} [property] - The property to test on each array element. + * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check. + * @param {integer} [startIndex=0] - An optional start index to search from. + * @param {integer} [endIndex=array.length] - An optional end index to search up to (but not included) + * + * @return {object} The first matching element from the array, or `null` if no element could be found in the range given. + */ +var GetFirst = function (array, property, value, startIndex, endIndex) +{ + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = array.length; } + + if (SafeRange(array, startIndex, endIndex)) + { + for (var i = startIndex; i < endIndex; i++) + { + var child = array[i]; + + if (!property || + (property && value === undefined && child.hasOwnProperty(property)) || + (property && value !== undefined && child[property] === value)) + { + return child; + } + } + } + + return null; +}; + +module.exports = GetFirst; + + +/***/ }), + +/***/ "../../../src/utils/array/GetRandom.js": +/*!*******************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/GetRandom.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Returns a Random element from the array. + * + * @function Phaser.Utils.Array.GetRandom + * @since 3.0.0 + * + * @param {array} array - The array to select the random entry from. + * @param {integer} [startIndex=0] - An optional start index. + * @param {integer} [length=array.length] - An optional length, the total number of elements (from the startIndex) to choose from. + * + * @return {*} A random element from the array, or `null` if no element could be found in the range given. + */ +var GetRandom = function (array, startIndex, length) +{ + if (startIndex === undefined) { startIndex = 0; } + if (length === undefined) { length = array.length; } + + var randomIndex = startIndex + Math.floor(Math.random() * length); + + return (array[randomIndex] === undefined) ? null : array[randomIndex]; +}; + +module.exports = GetRandom; + + +/***/ }), + +/***/ "../../../src/utils/array/MoveDown.js": +/*!******************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/MoveDown.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the given array element down one place in the array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.MoveDown + * @since 3.4.0 + * + * @param {array} array - The input array. + * @param {*} item - The element to move down the array. + * + * @return {array} The input array. + */ +var MoveDown = function (array, item) +{ + var currentIndex = array.indexOf(item); + + if (currentIndex > 0) + { + var item2 = array[currentIndex - 1]; + + var index2 = array.indexOf(item2); + + array[currentIndex] = item2; + array[index2] = item; + } + + return array; +}; + +module.exports = MoveDown; + + +/***/ }), + +/***/ "../../../src/utils/array/MoveTo.js": +/*!****************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/MoveTo.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves an element in an array to a new position within the same array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.MoveTo + * @since 3.4.0 + * + * @param {array} array - The array. + * @param {*} item - The element to move. + * @param {integer} index - The new index that the element will be moved to. + * + * @return {*} The element that was moved. + */ +var MoveTo = function (array, item, index) +{ + var currentIndex = array.indexOf(item); + + if (currentIndex === -1 || index < 0 || index >= array.length) + { + throw new Error('Supplied index out of bounds'); + } + + if (currentIndex !== index) + { + // Remove + array.splice(currentIndex, 1); + + // Add in new location + array.splice(index, 0, item); + } + + return item; +}; + +module.exports = MoveTo; + + +/***/ }), + +/***/ "../../../src/utils/array/MoveUp.js": +/*!****************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/MoveUp.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the given array element up one place in the array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.MoveUp + * @since 3.4.0 + * + * @param {array} array - The input array. + * @param {*} item - The element to move up the array. + * + * @return {array} The input array. + */ +var MoveUp = function (array, item) +{ + var currentIndex = array.indexOf(item); + + if (currentIndex !== -1 && currentIndex < array.length - 1) + { + // The element one above `item` in the array + var item2 = array[currentIndex + 1]; + var index2 = array.indexOf(item2); + + array[currentIndex] = item2; + array[index2] = item; + } + + return array; +}; + +module.exports = MoveUp; + + +/***/ }), + +/***/ "../../../src/utils/array/NumberArray.js": +/*!*********************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/NumberArray.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Create an array representing the range of numbers (usually integers), between, and inclusive of, + * the given `start` and `end` arguments. For example: + * + * `var array = numberArray(2, 4); // array = [2, 3, 4]` + * `var array = numberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]` + * + * This is equivalent to `numberArrayStep(start, end, 1)`. + * + * You can optionally provide a prefix and / or suffix string. If given the array will contain + * strings, not integers. For example: + * + * `var array = numberArray(1, 4, 'Level '); // array = ["Level 1", "Level 2", "Level 3", "Level 4"]` + * `var array = numberArray(5, 7, 'HD-', '.png'); // array = ["HD-5.png", "HD-6.png", "HD-7.png"]` + * + * @function Phaser.Utils.Array.NumberArray + * @since 3.0.0 + * + * @param {number} start - The minimum value the array starts with. + * @param {number} end - The maximum value the array contains. + * @param {string} [prefix] - Optional prefix to place before the number. If provided the array will contain strings, not integers. + * @param {string} [suffix] - Optional suffix to place after the number. If provided the array will contain strings, not integers. + * + * @return {(number[]|string[])} The array of number values, or strings if a prefix or suffix was provided. + */ +var NumberArray = function (start, end, prefix, suffix) +{ + var result = []; + + for (var i = start; i <= end; i++) + { + if (prefix || suffix) + { + var key = (prefix) ? prefix + i.toString() : i.toString(); + + if (suffix) + { + key = key.concat(suffix); + } + + result.push(key); + } + else + { + result.push(i); + } + } + + return result; +}; + +module.exports = NumberArray; + + +/***/ }), + +/***/ "../../../src/utils/array/NumberArrayStep.js": +/*!*************************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/NumberArrayStep.js ***! + \*************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var RoundAwayFromZero = __webpack_require__(/*! ../../math/RoundAwayFromZero */ "../../../src/math/RoundAwayFromZero.js"); + +/** + * Create an array of numbers (positive and/or negative) progressing from `start` + * up to but not including `end` by advancing by `step`. + * + * If `start` is less than `end` a zero-length range is created unless a negative `step` is specified. + * + * Certain values for `start` and `end` (eg. NaN/undefined/null) are currently coerced to 0; + * for forward compatibility make sure to pass in actual numbers. + * + * @example + * NumberArrayStep(4); + * // => [0, 1, 2, 3] + * + * NumberArrayStep(1, 5); + * // => [1, 2, 3, 4] + * + * NumberArrayStep(0, 20, 5); + * // => [0, 5, 10, 15] + * + * NumberArrayStep(0, -4, -1); + * // => [0, -1, -2, -3] + * + * NumberArrayStep(1, 4, 0); + * // => [1, 1, 1] + * + * NumberArrayStep(0); + * // => [] + * + * @function Phaser.Utils.Array.NumberArrayStep + * @since 3.0.0 + * + * @param {number} [start=0] - The start of the range. + * @param {number} [end=null] - The end of the range. + * @param {number} [step=1] - The value to increment or decrement by. + * + * @return {number[]} The array of number values. + */ +var NumberArrayStep = function (start, end, step) +{ + if (start === undefined) { start = 0; } + if (end === undefined) { end = null; } + if (step === undefined) { step = 1; } + + if (end === null) + { + end = start; + start = 0; + } + + var result = []; + + var total = Math.max(RoundAwayFromZero((end - start) / (step || 1)), 0); + + for (var i = 0; i < total; i++) + { + result.push(start); + start += step; + } + + return result; +}; + +module.exports = NumberArrayStep; + + +/***/ }), + +/***/ "../../../src/utils/array/QuickSelect.js": +/*!*********************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/QuickSelect.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @ignore + */ +function swap (arr, i, j) +{ + var tmp = arr[i]; + arr[i] = arr[j]; + arr[j] = tmp; +} + +/** + * @ignore + */ +function defaultCompare (a, b) +{ + return a < b ? -1 : a > b ? 1 : 0; +} + +/** + * A [Floyd-Rivest](https://en.wikipedia.org/wiki/Floyd%E2%80%93Rivest_algorithm) quick selection algorithm. + * + * Rearranges the array items so that all items in the [left, k] range are smaller than all items in [k, right]; + * The k-th element will have the (k - left + 1)th smallest value in [left, right]. + * + * The array is modified in-place. + * + * Based on code by [Vladimir Agafonkin](https://www.npmjs.com/~mourner) + * + * @function Phaser.Utils.Array.QuickSelect + * @since 3.0.0 + * + * @param {array} arr - The array to sort. + * @param {integer} k - The k-th element index. + * @param {integer} [left=0] - The index of the left part of the range. + * @param {integer} [right] - The index of the right part of the range. + * @param {function} [compare] - An optional comparison function. Is passed two elements and should return 0, 1 or -1. + */ +var QuickSelect = function (arr, k, left, right, compare) +{ + if (left === undefined) { left = 0; } + if (right === undefined) { right = arr.length - 1; } + if (compare === undefined) { compare = defaultCompare; } + + while (right > left) + { + if (right - left > 600) + { + var n = right - left + 1; + var m = k - left + 1; + var z = Math.log(n); + var s = 0.5 * Math.exp(2 * z / 3); + var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1); + var newLeft = Math.max(left, Math.floor(k - m * s / n + sd)); + var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd)); + + QuickSelect(arr, k, newLeft, newRight, compare); + } + + var t = arr[k]; + var i = left; + var j = right; + + swap(arr, left, k); + + if (compare(arr[right], t) > 0) + { + swap(arr, left, right); + } + + while (i < j) + { + swap(arr, i, j); + + i++; + j--; + + while (compare(arr[i], t) < 0) + { + i++; + } + + while (compare(arr[j], t) > 0) + { + j--; + } + } + + if (compare(arr[left], t) === 0) + { + swap(arr, left, j); + } + else + { + j++; + swap(arr, j, right); + } + + if (j <= k) + { + left = j + 1; + } + + if (k <= j) + { + right = j - 1; + } + } +}; + +module.exports = QuickSelect; + + +/***/ }), + +/***/ "../../../src/utils/array/Range.js": +/*!***************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/Range.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetValue = __webpack_require__(/*! ../object/GetValue */ "../../../src/utils/object/GetValue.js"); +var Shuffle = __webpack_require__(/*! ./Shuffle */ "../../../src/utils/array/Shuffle.js"); + +var BuildChunk = function (a, b, qty) +{ + var out = []; + + for (var aIndex = 0; aIndex < a.length; aIndex++) + { + for (var bIndex = 0; bIndex < b.length; bIndex++) + { + for (var i = 0; i < qty; i++) + { + out.push({ a: a[aIndex], b: b[bIndex] }); + } + } + } + + return out; +}; + +/** + * Creates an array populated with a range of values, based on the given arguments and configuration object. + * + * Range ([a,b,c], [1,2,3]) = + * a1, a2, a3, b1, b2, b3, c1, c2, c3 + * + * Range ([a,b], [1,2,3], qty = 3) = + * a1, a1, a1, a2, a2, a2, a3, a3, a3, b1, b1, b1, b2, b2, b2, b3, b3, b3 + * + * Range ([a,b,c], [1,2,3], repeat x1) = + * a1, a2, a3, b1, b2, b3, c1, c2, c3, a1, a2, a3, b1, b2, b3, c1, c2, c3 + * + * Range ([a,b], [1,2], repeat -1 = endless, max = 14) = + * Maybe if max is set then repeat goes to -1 automatically? + * a1, a2, b1, b2, a1, a2, b1, b2, a1, a2, b1, b2, a1, a2 (capped at 14 elements) + * + * Range ([a], [1,2,3,4,5], random = true) = + * a4, a1, a5, a2, a3 + * + * Range ([a, b], [1,2,3], random = true) = + * b3, a2, a1, b1, a3, b2 + * + * Range ([a, b, c], [1,2,3], randomB = true) = + * a3, a1, a2, b2, b3, b1, c1, c3, c2 + * + * Range ([a], [1,2,3,4,5], yoyo = true) = + * a1, a2, a3, a4, a5, a5, a4, a3, a2, a1 + * + * Range ([a, b], [1,2,3], yoyo = true) = + * a1, a2, a3, b1, b2, b3, b3, b2, b1, a3, a2, a1 + * + * @function Phaser.Utils.Array.Range + * @since 3.0.0 + * + * @param {array} a - The first array of range elements. + * @param {array} b - The second array of range elements. + * @param {object} [options] - A range configuration object. Can contain: repeat, random, randomB, yoyo, max, qty. + * + * @return {array} An array of arranged elements. + */ +var Range = function (a, b, options) +{ + var max = GetValue(options, 'max', 0); + var qty = GetValue(options, 'qty', 1); + var random = GetValue(options, 'random', false); + var randomB = GetValue(options, 'randomB', false); + var repeat = GetValue(options, 'repeat', 0); + var yoyo = GetValue(options, 'yoyo', false); + + var out = []; + + if (randomB) + { + Shuffle(b); + } + + // Endless repeat, so limit by max + if (repeat === -1) + { + if (max === 0) + { + repeat = 0; + } + else + { + // Work out how many repeats we need + var total = (a.length * b.length) * qty; + + if (yoyo) + { + total *= 2; + } + + repeat = Math.ceil(max / total); + } + } + + for (var i = 0; i <= repeat; i++) + { + var chunk = BuildChunk(a, b, qty); + + if (random) + { + Shuffle(chunk); + } + + out = out.concat(chunk); + + if (yoyo) + { + chunk.reverse(); + + out = out.concat(chunk); + } + } + + if (max) + { + out.splice(max); + } + + return out; +}; + +module.exports = Range; + + +/***/ }), + +/***/ "../../../src/utils/array/Remove.js": +/*!****************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/Remove.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SpliceOne = __webpack_require__(/*! ./SpliceOne */ "../../../src/utils/array/SpliceOne.js"); + +/** + * Removes the given item, or array of items, from the array. + * + * The array is modified in-place. + * + * You can optionally specify a callback to be invoked for each item successfully removed from the array. + * + * @function Phaser.Utils.Array.Remove + * @since 3.4.0 + * + * @param {array} array - The array to be modified. + * @param {*|Array.<*>} item - The item, or array of items, to be removed from the array. + * @param {function} [callback] - A callback to be invoked for each item successfully removed from the array. + * @param {object} [context] - The context in which the callback is invoked. + * + * @return {*|Array.<*>} The item, or array of items, that were successfully removed from the array. + */ +var Remove = function (array, item, callback, context) +{ + if (context === undefined) { context = array; } + + var index; + + // Fast path to avoid array mutation and iteration + if (!Array.isArray(item)) + { + index = array.indexOf(item); + + if (index !== -1) + { + SpliceOne(array, index); + + if (callback) + { + callback.call(context, item); + } + + return item; + } + else + { + return null; + } + } + + // If we got this far, we have an array of items to remove + + var itemLength = item.length - 1; + + while (itemLength >= 0) + { + var entry = item[itemLength]; + + index = array.indexOf(entry); + + if (index !== -1) + { + SpliceOne(array, index); + + if (callback) + { + callback.call(context, entry); + } + } + else + { + // Item wasn't found in the array, so remove it from our return results + item.pop(); + } + + itemLength--; + } + + return item; +}; + +module.exports = Remove; + + +/***/ }), + +/***/ "../../../src/utils/array/RemoveAt.js": +/*!******************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/RemoveAt.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SpliceOne = __webpack_require__(/*! ./SpliceOne */ "../../../src/utils/array/SpliceOne.js"); + +/** + * Removes the item from the given position in the array. + * + * The array is modified in-place. + * + * You can optionally specify a callback to be invoked for the item if it is successfully removed from the array. + * + * @function Phaser.Utils.Array.RemoveAt + * @since 3.4.0 + * + * @param {array} array - The array to be modified. + * @param {integer} index - The array index to remove the item from. The index must be in bounds or it will throw an error. + * @param {function} [callback] - A callback to be invoked for the item removed from the array. + * @param {object} [context] - The context in which the callback is invoked. + * + * @return {*} The item that was removed. + */ +var RemoveAt = function (array, index, callback, context) +{ + if (context === undefined) { context = array; } + + if (index < 0 || index > array.length - 1) + { + throw new Error('Index out of bounds'); + } + + var item = SpliceOne(array, index); + + if (callback) + { + callback.call(context, item); + } + + return item; +}; + +module.exports = RemoveAt; + + +/***/ }), + +/***/ "../../../src/utils/array/RemoveBetween.js": +/*!***********************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/RemoveBetween.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SafeRange = __webpack_require__(/*! ./SafeRange */ "../../../src/utils/array/SafeRange.js"); + +/** + * Removes the item within the given range in the array. + * + * The array is modified in-place. + * + * You can optionally specify a callback to be invoked for the item/s successfully removed from the array. + * + * @function Phaser.Utils.Array.RemoveBetween + * @since 3.4.0 + * + * @param {array} array - The array to be modified. + * @param {integer} startIndex - The start index to remove from. + * @param {integer} endIndex - The end index to remove to. + * @param {function} [callback] - A callback to be invoked for the item removed from the array. + * @param {object} [context] - The context in which the callback is invoked. + * + * @return {Array.<*>} An array of items that were removed. + */ +var RemoveBetween = function (array, startIndex, endIndex, callback, context) +{ + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = array.length; } + if (context === undefined) { context = array; } + + if (SafeRange(array, startIndex, endIndex)) + { + var size = endIndex - startIndex; + + var removed = array.splice(startIndex, size); + + if (callback) + { + for (var i = 0; i < removed.length; i++) + { + var entry = removed[i]; + + callback.call(context, entry); + } + } + + return removed; + } + else + { + return []; + } +}; + +module.exports = RemoveBetween; + + +/***/ }), + +/***/ "../../../src/utils/array/RemoveRandomElement.js": +/*!*****************************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/RemoveRandomElement.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SpliceOne = __webpack_require__(/*! ./SpliceOne */ "../../../src/utils/array/SpliceOne.js"); + +/** + * Removes a random object from the given array and returns it. + * Will return null if there are no array items that fall within the specified range or if there is no item for the randomly chosen index. + * + * @function Phaser.Utils.Array.RemoveRandomElement + * @since 3.0.0 + * + * @param {array} array - The array to removed a random element from. + * @param {integer} [start=0] - The array index to start the search from. + * @param {integer} [length=array.length] - Optional restriction on the number of elements to randomly select from. + * + * @return {object} The random element that was removed, or `null` if there were no array elements that fell within the given range. + */ +var RemoveRandomElement = function (array, start, length) +{ + if (start === undefined) { start = 0; } + if (length === undefined) { length = array.length; } + + var randomIndex = start + Math.floor(Math.random() * length); + + return SpliceOne(array, randomIndex); +}; + +module.exports = RemoveRandomElement; + + +/***/ }), + +/***/ "../../../src/utils/array/Replace.js": +/*!*****************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/Replace.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Replaces an element of the array with the new element. + * The new element cannot already be a member of the array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.Replace + * @since 3.4.0 + * + * @param {array} array - The array to search within. + * @param {*} oldChild - The element in the array that will be replaced. + * @param {*} newChild - The element to be inserted into the array at the position of `oldChild`. + * + * @return {boolean} Returns true if the oldChild was successfully replaced, otherwise returns false. + */ +var Replace = function (array, oldChild, newChild) +{ + var index1 = array.indexOf(oldChild); + var index2 = array.indexOf(newChild); + + if (index1 !== -1 && index2 === -1) + { + array[index1] = newChild; + + return true; + } + else + { + return false; + } +}; + +module.exports = Replace; + + +/***/ }), + +/***/ "../../../src/utils/array/RotateLeft.js": +/*!********************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/RotateLeft.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the element at the start of the array to the end, shifting all items in the process. + * The "rotation" happens to the left. + * + * @function Phaser.Utils.Array.RotateLeft + * @since 3.0.0 + * + * @param {array} array - The array to shift to the left. This array is modified in place. + * @param {integer} [total=1] - The number of times to shift the array. + * + * @return {*} The most recently shifted element. + */ +var RotateLeft = function (array, total) +{ + if (total === undefined) { total = 1; } + + var element = null; + + for (var i = 0; i < total; i++) + { + element = array.shift(); + array.push(element); + } + + return element; +}; + +module.exports = RotateLeft; + + +/***/ }), + +/***/ "../../../src/utils/array/RotateRight.js": +/*!*********************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/RotateRight.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the element at the end of the array to the start, shifting all items in the process. + * The "rotation" happens to the right. + * + * @function Phaser.Utils.Array.RotateRight + * @since 3.0.0 + * + * @param {array} array - The array to shift to the right. This array is modified in place. + * @param {integer} [total=1] - The number of times to shift the array. + * + * @return {*} The most recently shifted element. + */ +var RotateRight = function (array, total) +{ + if (total === undefined) { total = 1; } + + var element = null; + + for (var i = 0; i < total; i++) + { + element = array.pop(); + array.unshift(element); + } + + return element; +}; + +module.exports = RotateRight; + + +/***/ }), + +/***/ "../../../src/utils/array/SafeRange.js": +/*!*******************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/SafeRange.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Tests if the start and end indexes are a safe range for the given array. + * + * @function Phaser.Utils.Array.SafeRange + * @since 3.4.0 + * + * @param {array} array - The array to check. + * @param {integer} startIndex - The start index. + * @param {integer} endIndex - The end index. + * @param {boolean} [throwError=true] - Throw an error if the range is out of bounds. + * + * @return {boolean} True if the range is safe, otherwise false. + */ +var SafeRange = function (array, startIndex, endIndex, throwError) +{ + var len = array.length; + + if (startIndex < 0 || + startIndex > len || + startIndex >= endIndex || + endIndex > len || + startIndex + endIndex > len) + { + if (throwError) + { + throw new Error('Range Error: Values outside acceptable range'); + } + + return false; + } + else + { + return true; + } +}; + +module.exports = SafeRange; + + +/***/ }), + +/***/ "../../../src/utils/array/SendToBack.js": +/*!********************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/SendToBack.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the given element to the bottom of the array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.SendToBack + * @since 3.4.0 + * + * @param {array} array - The array. + * @param {*} item - The element to move. + * + * @return {*} The element that was moved. + */ +var SendToBack = function (array, item) +{ + var currentIndex = array.indexOf(item); + + if (currentIndex !== -1 && currentIndex > 0) + { + array.splice(currentIndex, 1); + array.unshift(item); + } + + return item; +}; + +module.exports = SendToBack; + + +/***/ }), + +/***/ "../../../src/utils/array/SetAll.js": +/*!****************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/SetAll.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SafeRange = __webpack_require__(/*! ./SafeRange */ "../../../src/utils/array/SafeRange.js"); + +/** + * Scans the array for elements with the given property. If found, the property is set to the `value`. + * + * For example: `SetAll('visible', true)` would set all elements that have a `visible` property to `false`. + * + * Optionally you can specify a start and end index. For example if the array had 100 elements, + * and you set `startIndex` to 0 and `endIndex` to 50, it would update only the first 50 elements. + * + * @function Phaser.Utils.Array.SetAll + * @since 3.4.0 + * + * @param {array} array - The array to search. + * @param {string} property - The property to test for on each array element. + * @param {*} value - The value to set the property to. + * @param {integer} [startIndex] - An optional start index to search from. + * @param {integer} [endIndex] - An optional end index to search to. + * + * @return {array} The input array. + */ +var SetAll = function (array, property, value, startIndex, endIndex) +{ + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = array.length; } + + if (SafeRange(array, startIndex, endIndex)) + { + for (var i = startIndex; i < endIndex; i++) + { + var entry = array[i]; + + if (entry.hasOwnProperty(property)) + { + entry[property] = value; + } + } + } + + return array; +}; + +module.exports = SetAll; + + +/***/ }), + +/***/ "../../../src/utils/array/Shuffle.js": +/*!*****************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/Shuffle.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Shuffles the contents of the given array using the Fisher-Yates implementation. + * + * The original array is modified directly and returned. + * + * @function Phaser.Utils.Array.Shuffle + * @since 3.0.0 + * + * @generic T + * @genericUse {T[]} - [array,$return] + * + * @param {T[]} array - The array to shuffle. This array is modified in place. + * + * @return {T[]} The shuffled array. + */ +var Shuffle = function (array) +{ + for (var i = array.length - 1; i > 0; i--) + { + var j = Math.floor(Math.random() * (i + 1)); + var temp = array[i]; + array[i] = array[j]; + array[j] = temp; + } + + return array; +}; + +module.exports = Shuffle; + + +/***/ }), + +/***/ "../../../src/utils/array/SpliceOne.js": +/*!*******************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/SpliceOne.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Removes a single item from an array and returns it without creating gc, like the native splice does. + * Based on code by Mike Reinstein. + * + * @function Phaser.Utils.Array.SpliceOne + * @since 3.0.0 + * + * @param {array} array - The array to splice from. + * @param {integer} index - The index of the item which should be spliced. + * + * @return {*} The item which was spliced (removed). + */ +var SpliceOne = function (array, index) +{ + if (index >= array.length) + { + return; + } + + var len = array.length - 1; + + var item = array[index]; + + for (var i = index; i < len; i++) + { + array[i] = array[i + 1]; + } + + array.length = len; + + return item; +}; + +module.exports = SpliceOne; + + +/***/ }), + +/***/ "../../../src/utils/array/StableSort.js": +/*!********************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/StableSort.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +//! stable.js 0.1.6, https://github.com/Two-Screen/stable +//! © 2017 Angry Bytes and contributors. MIT licensed. + +/** + * @namespace Phaser.Utils.Array.StableSortFunctions + */ + +(function() { + + /** + * A stable array sort, because `Array#sort()` is not guaranteed stable. + * This is an implementation of merge sort, without recursion. + * + * @function Phaser.Utils.Array.StableSort + * @since 3.0.0 + * + * @param {array} arr - The input array to be sorted. + * @param {function} comp - The comparison handler. + * + * @return {array} The sorted result. + */ +var stable = function(arr, comp) { + return exec(arr.slice(), comp); +}; + + /** + * Sort the input array and simply copy it back if the result isn't in the original array, which happens on an odd number of passes. + * + * @function Phaser.Utils.Array.StableSortFunctions.inplace + * @memberof Phaser.Utils.Array.StableSortFunctions + * @since 3.0.0 + * + * @param {array} arr - The input array. + * @param {function} comp - The comparison handler. + * + * @return {array} The sorted array. + */ +stable.inplace = function(arr, comp) { + var result = exec(arr, comp); + + // This simply copies back if the result isn't in the original array, + // which happens on an odd number of passes. + if (result !== arr) { + pass(result, null, arr.length, arr); + } + + return arr; +}; + +// Execute the sort using the input array and a second buffer as work space. +// Returns one of those two, containing the final result. +function exec(arr, comp) { + if (typeof(comp) !== 'function') { + comp = function(a, b) { + return String(a).localeCompare(b); + }; + } + + // Short-circuit when there's nothing to sort. + var len = arr.length; + if (len <= 1) { + return arr; + } + + // Rather than dividing input, simply iterate chunks of 1, 2, 4, 8, etc. + // Chunks are the size of the left or right hand in merge sort. + // Stop when the left-hand covers all of the array. + var buffer = new Array(len); + for (var chk = 1; chk < len; chk *= 2) { + pass(arr, comp, chk, buffer); + + var tmp = arr; + arr = buffer; + buffer = tmp; + } + + return arr; +} + +// Run a single pass with the given chunk size. +var pass = function(arr, comp, chk, result) { + var len = arr.length; + var i = 0; + // Step size / double chunk size. + var dbl = chk * 2; + // Bounds of the left and right chunks. + var l, r, e; + // Iterators over the left and right chunk. + var li, ri; + + // Iterate over pairs of chunks. + for (l = 0; l < len; l += dbl) { + r = l + chk; + e = r + chk; + if (r > len) r = len; + if (e > len) e = len; + + // Iterate both chunks in parallel. + li = l; + ri = r; + while (true) { + // Compare the chunks. + if (li < r && ri < e) { + // This works for a regular `sort()` compatible comparator, + // but also for a simple comparator like: `a > b` + if (comp(arr[li], arr[ri]) <= 0) { + result[i++] = arr[li++]; + } + else { + result[i++] = arr[ri++]; + } + } + // Nothing to compare, just flush what's left. + else if (li < r) { + result[i++] = arr[li++]; + } + else if (ri < e) { + result[i++] = arr[ri++]; + } + // Both iterators are at the chunk ends. + else { + break; + } + } + } +}; + +// Export using CommonJS or to the window. +if (true) { + module.exports = stable; +} +else {} + +})(); + +/***/ }), + +/***/ "../../../src/utils/array/Swap.js": +/*!**************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/Swap.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Swaps the position of two elements in the given array. + * The elements must exist in the same array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.Swap + * @since 3.4.0 + * + * @param {array} array - The input array. + * @param {*} item1 - The first element to swap. + * @param {*} item2 - The second element to swap. + * + * @return {array} The input array. + */ +var Swap = function (array, item1, item2) +{ + if (item1 === item2) + { + return; + } + + var index1 = array.indexOf(item1); + var index2 = array.indexOf(item2); + + if (index1 < 0 || index2 < 0) + { + throw new Error('Supplied items must be elements of the same array'); + } + + array[index1] = item2; + array[index2] = item1; + + return array; +}; + +module.exports = Swap; + + +/***/ }), + +/***/ "../../../src/utils/array/index.js": +/*!***************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/index.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Utils.Array + */ + +module.exports = { + + Matrix: __webpack_require__(/*! ./matrix */ "../../../src/utils/array/matrix/index.js"), + + Add: __webpack_require__(/*! ./Add */ "../../../src/utils/array/Add.js"), + AddAt: __webpack_require__(/*! ./AddAt */ "../../../src/utils/array/AddAt.js"), + BringToTop: __webpack_require__(/*! ./BringToTop */ "../../../src/utils/array/BringToTop.js"), + CountAllMatching: __webpack_require__(/*! ./CountAllMatching */ "../../../src/utils/array/CountAllMatching.js"), + Each: __webpack_require__(/*! ./Each */ "../../../src/utils/array/Each.js"), + EachInRange: __webpack_require__(/*! ./EachInRange */ "../../../src/utils/array/EachInRange.js"), + FindClosestInSorted: __webpack_require__(/*! ./FindClosestInSorted */ "../../../src/utils/array/FindClosestInSorted.js"), + GetAll: __webpack_require__(/*! ./GetAll */ "../../../src/utils/array/GetAll.js"), + GetFirst: __webpack_require__(/*! ./GetFirst */ "../../../src/utils/array/GetFirst.js"), + GetRandom: __webpack_require__(/*! ./GetRandom */ "../../../src/utils/array/GetRandom.js"), + MoveDown: __webpack_require__(/*! ./MoveDown */ "../../../src/utils/array/MoveDown.js"), + MoveTo: __webpack_require__(/*! ./MoveTo */ "../../../src/utils/array/MoveTo.js"), + MoveUp: __webpack_require__(/*! ./MoveUp */ "../../../src/utils/array/MoveUp.js"), + NumberArray: __webpack_require__(/*! ./NumberArray */ "../../../src/utils/array/NumberArray.js"), + NumberArrayStep: __webpack_require__(/*! ./NumberArrayStep */ "../../../src/utils/array/NumberArrayStep.js"), + QuickSelect: __webpack_require__(/*! ./QuickSelect */ "../../../src/utils/array/QuickSelect.js"), + Range: __webpack_require__(/*! ./Range */ "../../../src/utils/array/Range.js"), + Remove: __webpack_require__(/*! ./Remove */ "../../../src/utils/array/Remove.js"), + RemoveAt: __webpack_require__(/*! ./RemoveAt */ "../../../src/utils/array/RemoveAt.js"), + RemoveBetween: __webpack_require__(/*! ./RemoveBetween */ "../../../src/utils/array/RemoveBetween.js"), + RemoveRandomElement: __webpack_require__(/*! ./RemoveRandomElement */ "../../../src/utils/array/RemoveRandomElement.js"), + Replace: __webpack_require__(/*! ./Replace */ "../../../src/utils/array/Replace.js"), + RotateLeft: __webpack_require__(/*! ./RotateLeft */ "../../../src/utils/array/RotateLeft.js"), + RotateRight: __webpack_require__(/*! ./RotateRight */ "../../../src/utils/array/RotateRight.js"), + SafeRange: __webpack_require__(/*! ./SafeRange */ "../../../src/utils/array/SafeRange.js"), + SendToBack: __webpack_require__(/*! ./SendToBack */ "../../../src/utils/array/SendToBack.js"), + SetAll: __webpack_require__(/*! ./SetAll */ "../../../src/utils/array/SetAll.js"), + Shuffle: __webpack_require__(/*! ./Shuffle */ "../../../src/utils/array/Shuffle.js"), + SpliceOne: __webpack_require__(/*! ./SpliceOne */ "../../../src/utils/array/SpliceOne.js"), + StableSort: __webpack_require__(/*! ./StableSort */ "../../../src/utils/array/StableSort.js"), + Swap: __webpack_require__(/*! ./Swap */ "../../../src/utils/array/Swap.js") + +}; + + +/***/ }), + +/***/ "../../../src/utils/array/matrix/CheckMatrix.js": +/*!****************************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/matrix/CheckMatrix.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Checks if an array can be used as a matrix. + * + * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows) have the same length. There must be at least two rows: + * + * ``` + * [ + * [ 1, 1, 1, 1, 1, 1 ], + * [ 2, 0, 0, 0, 0, 4 ], + * [ 2, 0, 1, 2, 0, 4 ], + * [ 2, 0, 3, 4, 0, 4 ], + * [ 2, 0, 0, 0, 0, 4 ], + * [ 3, 3, 3, 3, 3, 3 ] + * ] + * ``` + * + * @function Phaser.Utils.Array.Matrix.CheckMatrix + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [matrix] + * + * @param {T[][]} [matrix] - The array to check. + * + * @return {boolean} `true` if the given `matrix` array is a valid matrix. + */ +var CheckMatrix = function (matrix) +{ + if (!Array.isArray(matrix) || matrix.length < 2 || !Array.isArray(matrix[0])) + { + return false; + } + + // How long is the first row? + var size = matrix[0].length; + + // Validate the rest of the rows are the same length + for (var i = 1; i < matrix.length; i++) + { + if (matrix[i].length !== size) + { + return false; + } + } + + return true; +}; + +module.exports = CheckMatrix; + + +/***/ }), + +/***/ "../../../src/utils/array/matrix/MatrixToString.js": +/*!*******************************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/matrix/MatrixToString.js ***! + \*******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Pad = __webpack_require__(/*! ../../string/Pad */ "../../../src/utils/string/Pad.js"); +var CheckMatrix = __webpack_require__(/*! ./CheckMatrix */ "../../../src/utils/array/matrix/CheckMatrix.js"); + +/** + * Generates a string (which you can pass to console.log) from the given Array Matrix. + * + * @function Phaser.Utils.Array.Matrix.MatrixToString + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [matrix] + * + * @param {T[][]} [matrix] - A 2-dimensional array. + * + * @return {string} A string representing the matrix. + */ +var MatrixToString = function (matrix) +{ + var str = ''; + + if (!CheckMatrix(matrix)) + { + return str; + } + + for (var r = 0; r < matrix.length; r++) + { + for (var c = 0; c < matrix[r].length; c++) + { + var cell = matrix[r][c].toString(); + + if (cell !== 'undefined') + { + str += Pad(cell, 2); + } + else + { + str += '?'; + } + + if (c < matrix[r].length - 1) + { + str += ' |'; + } + } + + if (r < matrix.length - 1) + { + str += '\n'; + + for (var i = 0; i < matrix[r].length; i++) + { + str += '---'; + + if (i < matrix[r].length - 1) + { + str += '+'; + } + } + + str += '\n'; + } + + } + + return str; +}; + +module.exports = MatrixToString; + + +/***/ }), + +/***/ "../../../src/utils/array/matrix/ReverseColumns.js": +/*!*******************************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/matrix/ReverseColumns.js ***! + \*******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Reverses the columns in the given Array Matrix. + * + * @function Phaser.Utils.Array.Matrix.ReverseColumns + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [matrix,$return] + * + * @param {T[][]} [matrix] - The array matrix to reverse the columns for. + * + * @return {T[][]} The column reversed matrix. + */ +var ReverseColumns = function (matrix) +{ + return matrix.reverse(); +}; + +module.exports = ReverseColumns; + + +/***/ }), + +/***/ "../../../src/utils/array/matrix/ReverseRows.js": +/*!****************************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/matrix/ReverseRows.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Reverses the rows in the given Array Matrix. + * + * @function Phaser.Utils.Array.Matrix.ReverseRows + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [matrix,$return] + * + * @param {T[][]} [matrix] - The array matrix to reverse the rows for. + * + * @return {T[][]} The column reversed matrix. + */ +var ReverseRows = function (matrix) +{ + for (var i = 0; i < matrix.length; i++) + { + matrix[i].reverse(); + } + + return matrix; +}; + +module.exports = ReverseRows; + + +/***/ }), + +/***/ "../../../src/utils/array/matrix/Rotate180.js": +/*!**************************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/matrix/Rotate180.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var RotateMatrix = __webpack_require__(/*! ./RotateMatrix */ "../../../src/utils/array/matrix/RotateMatrix.js"); + +/** + * Rotates the array matrix 180 degrees. + * + * @function Phaser.Utils.Array.Matrix.Rotate180 + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [matrix,$return] + * + * @param {T[][]} [matrix] - The array to rotate. + * + * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix. + */ +var Rotate180 = function (matrix) +{ + return RotateMatrix(matrix, 180); +}; + +module.exports = Rotate180; + + +/***/ }), + +/***/ "../../../src/utils/array/matrix/RotateLeft.js": +/*!***************************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/matrix/RotateLeft.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var RotateMatrix = __webpack_require__(/*! ./RotateMatrix */ "../../../src/utils/array/matrix/RotateMatrix.js"); + +/** + * Rotates the array matrix to the left (or 90 degrees) + * + * @function Phaser.Utils.Array.Matrix.RotateLeft + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [matrix,$return] + * + * @param {T[][]} [matrix] - The array to rotate. + * + * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix. + */ +var RotateLeft = function (matrix) +{ + return RotateMatrix(matrix, 90); +}; + +module.exports = RotateLeft; + + +/***/ }), + +/***/ "../../../src/utils/array/matrix/RotateMatrix.js": +/*!*****************************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/matrix/RotateMatrix.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CheckMatrix = __webpack_require__(/*! ./CheckMatrix */ "../../../src/utils/array/matrix/CheckMatrix.js"); +var TransposeMatrix = __webpack_require__(/*! ./TransposeMatrix */ "../../../src/utils/array/matrix/TransposeMatrix.js"); + +/** + * Rotates the array matrix based on the given rotation value. + * + * The value can be given in degrees: 90, -90, 270, -270 or 180, + * or a string command: `rotateLeft`, `rotateRight` or `rotate180`. + * + * Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}. + * + * @function Phaser.Utils.Array.Matrix.RotateMatrix + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [matrix,$return] + * + * @param {T[][]} [matrix] - The array to rotate. + * @param {(number|string)} [direction=90] - The amount to rotate the matrix by. + * + * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix. + */ +var RotateMatrix = function (matrix, direction) +{ + if (direction === undefined) { direction = 90; } + + if (!CheckMatrix(matrix)) + { + return null; + } + + if (typeof direction !== 'string') + { + direction = ((direction % 360) + 360) % 360; + } + + if (direction === 90 || direction === -270 || direction === 'rotateLeft') + { + matrix = TransposeMatrix(matrix); + matrix.reverse(); + } + else if (direction === -90 || direction === 270 || direction === 'rotateRight') + { + matrix.reverse(); + matrix = TransposeMatrix(matrix); + } + else if (Math.abs(direction) === 180 || direction === 'rotate180') + { + for (var i = 0; i < matrix.length; i++) + { + matrix[i].reverse(); + } + + matrix.reverse(); + } + + return matrix; +}; + +module.exports = RotateMatrix; + + +/***/ }), + +/***/ "../../../src/utils/array/matrix/RotateRight.js": +/*!****************************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/matrix/RotateRight.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var RotateMatrix = __webpack_require__(/*! ./RotateMatrix */ "../../../src/utils/array/matrix/RotateMatrix.js"); + +/** + * Rotates the array matrix to the left (or -90 degrees) + * + * @function Phaser.Utils.Array.Matrix.RotateRight + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [matrix,$return] + * + * @param {T[][]} [matrix] - The array to rotate. + * + * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix. + */ +var RotateRight = function (matrix) +{ + return RotateMatrix(matrix, -90); +}; + +module.exports = RotateRight; + + +/***/ }), + +/***/ "../../../src/utils/array/matrix/TransposeMatrix.js": +/*!********************************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/matrix/TransposeMatrix.js ***! + \********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Transposes the elements of the given matrix (array of arrays). + * + * The transpose of a matrix is a new matrix whose rows are the columns of the original. + * + * @function Phaser.Utils.Array.Matrix.TransposeMatrix + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [array,$return] + * + * @param {T[][]} [array] - The array matrix to transpose. + * + * @return {T[][]} A new array matrix which is a transposed version of the given array. + */ +var TransposeMatrix = function (array) +{ + var sourceRowCount = array.length; + var sourceColCount = array[0].length; + + var result = new Array(sourceColCount); + + for (var i = 0; i < sourceColCount; i++) + { + result[i] = new Array(sourceRowCount); + + for (var j = sourceRowCount - 1; j > -1; j--) + { + result[i][j] = array[j][i]; + } + } + + return result; +}; + +module.exports = TransposeMatrix; + + +/***/ }), + +/***/ "../../../src/utils/array/matrix/index.js": +/*!**********************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/array/matrix/index.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Utils.Array.Matrix + */ + +module.exports = { + + CheckMatrix: __webpack_require__(/*! ./CheckMatrix */ "../../../src/utils/array/matrix/CheckMatrix.js"), + MatrixToString: __webpack_require__(/*! ./MatrixToString */ "../../../src/utils/array/matrix/MatrixToString.js"), + ReverseColumns: __webpack_require__(/*! ./ReverseColumns */ "../../../src/utils/array/matrix/ReverseColumns.js"), + ReverseRows: __webpack_require__(/*! ./ReverseRows */ "../../../src/utils/array/matrix/ReverseRows.js"), + Rotate180: __webpack_require__(/*! ./Rotate180 */ "../../../src/utils/array/matrix/Rotate180.js"), + RotateLeft: __webpack_require__(/*! ./RotateLeft */ "../../../src/utils/array/matrix/RotateLeft.js"), + RotateMatrix: __webpack_require__(/*! ./RotateMatrix */ "../../../src/utils/array/matrix/RotateMatrix.js"), + RotateRight: __webpack_require__(/*! ./RotateRight */ "../../../src/utils/array/matrix/RotateRight.js"), + TransposeMatrix: __webpack_require__(/*! ./TransposeMatrix */ "../../../src/utils/array/matrix/TransposeMatrix.js") + +}; + + /***/ }), /***/ "../../../src/utils/object/Extend.js": @@ -20198,6 +33362,87 @@ var IsPlainObject = function (obj) module.exports = IsPlainObject; +/***/ }), + +/***/ "../../../src/utils/string/Pad.js": +/*!**************************************************!*\ + !*** D:/wamp/www/phaser/src/utils/string/Pad.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Takes the given string and pads it out, to the length required, using the character + * specified. For example if you need a string to be 6 characters long, you can call: + * + * `pad('bob', 6, '-', 2)` + * + * This would return: `bob---` as it has padded it out to 6 characters, using the `-` on the right. + * + * You can also use it to pad numbers (they are always returned as strings): + * + * `pad(512, 6, '0', 1)` + * + * Would return: `000512` with the string padded to the left. + * + * If you don't specify a direction it'll pad to both sides: + * + * `pad('c64', 7, '*')` + * + * Would return: `**c64**` + * + * @function Phaser.Utils.String.Pad + * @since 3.0.0 + * + * @param {string|number|object} str - The target string. `toString()` will be called on the string, which means you can also pass in common data types like numbers. + * @param {integer} [len=0] - The number of characters to be added. + * @param {string} [pad=" "] - The string to pad it out with (defaults to a space). + * @param {integer} [dir=3] - The direction dir = 1 (left), 2 (right), 3 (both). + * + * @return {string} The padded string. + */ +var Pad = function (str, len, pad, dir) +{ + if (len === undefined) { len = 0; } + if (pad === undefined) { pad = ' '; } + if (dir === undefined) { dir = 3; } + + str = str.toString(); + + var padlen = 0; + + if (len + 1 >= str.length) + { + switch (dir) + { + case 1: + str = new Array(len + 1 - str.length).join(pad) + str; + break; + + case 3: + var right = Math.ceil((padlen = len - str.length) / 2); + var left = padlen - right; + str = new Array(left + 1).join(pad) + str + new Array(right + 1).join(pad); + break; + + default: + str = str + new Array(len + 1 - str.length).join(pad); + break; + } + } + + return str; +}; + +module.exports = Pad; + + /***/ }), /***/ "./SpineFile.js": @@ -20467,7 +33712,7 @@ module.exports = SpineFile; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ @@ -20479,6 +33724,8 @@ var ScenePlugin = __webpack_require__(/*! ../../../src/plugins/ScenePlugin */ ". var Spine = __webpack_require__(/*! Spine */ "./runtimes/spine-both.js"); var SpineFile = __webpack_require__(/*! ./SpineFile */ "./SpineFile.js"); var SpineGameObject = __webpack_require__(/*! ./gameobject/SpineGameObject */ "./gameobject/SpineGameObject.js"); +var SpineContainer = __webpack_require__(/*! ./container/SpineContainer */ "./container/SpineContainer.js"); +var NOOP = __webpack_require__(/*! ../../../src/utils/NOOP */ "../../../src/utils/NOOP.js"); /** * @classdesc @@ -20562,6 +33809,13 @@ var SpineGameObject = __webpack_require__(/*! ./gameobject/SpineGameObject */ ". * stored in their own caches, which are global, meaning they're accessible from any Scene in your * game, regardless if the Scene loaded the Spine data or not. * + * When destroying a Phaser Game instance, if you need to re-create it again on the same page without + * reloading, you must remember to remove the Spine Plugin as part of your tear-down process: + * + * ```javascript + * this.plugins.removeScenePlugin('SpinePlugin'); + * ``` + * * For details about the Spine Runtime API see http://esotericsoftware.com/spine-api-reference * * @class SpinePlugin @@ -20745,6 +33999,19 @@ var SpinePlugin = new Class({ this.getAtlas = this.getAtlasCanvas; } + // Headless mode? + if (!this.renderer) + { + this.renderer = { + width: game.scale.width, + height: game.scale.height, + preRender: NOOP, + postRender: NOOP, + render: NOOP, + destroy: NOOP + }; + } + var _this = this; var add = function (x, y, key, animationName, loop) @@ -20793,8 +34060,38 @@ var SpinePlugin = new Class({ return spineGO.refresh(); }; + var addContainer = function (x, y, children) + { + var spineGO = new SpineContainer(this.scene, _this, x, y, children); + + this.displayList.add(spineGO); + + return spineGO; + }; + + var makeContainer = function (config, addToScene) + { + if (config === undefined) { config = {}; } + + var x = GetValue(config, 'x', 0); + var y = GetValue(config, 'y', 0); + var children = GetValue(config, 'children', null); + + var container = new SpineContainer(this.scene, _this, x, y, children); + + if (addToScene !== undefined) + { + config.add = addToScene; + } + + BuildGameObject(this.scene, container, config); + + return container; + }; + pluginManager.registerFileType('spine', this.spineFileCallback, scene); pluginManager.registerGameObject('spine', add, make); + pluginManager.registerGameObject('spinecontainer', addContainer, makeContainer); }, /** @@ -21528,6 +34825,8 @@ var SpinePlugin = new Class({ }); +SpinePlugin.SpineGameObject = SpineGameObject; + /** * Creates a new Spine Game Object and adds it to the Scene. * @@ -21597,6 +34896,413 @@ var SpinePlugin = new Class({ module.exports = SpinePlugin; +/***/ }), + +/***/ "./container/SpineContainer.js": +/*!*************************************!*\ + !*** ./container/SpineContainer.js ***! + \*************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Class = __webpack_require__(/*! ../../../../src/utils/Class */ "../../../src/utils/Class.js"); +var Container = __webpack_require__(/*! ../../../../src/gameobjects/container/Container */ "../../../src/gameobjects/container/Container.js"); +var SpineContainerRender = __webpack_require__(/*! ./SpineContainerRender */ "./container/SpineContainerRender.js"); + +/** + * @classdesc + * A Spine Container is a special kind of Container created specifically for Spine Game Objects. + * + * You have all of the same features of a standard Container, but the rendering functions are optimized specifically + * for Spine Game Objects. You cannot mix and match Spine Game Objects with regular Game Objects inside of this + * type of Container, however. + * + * To create one in a Scene, use the factory methods: + * + * ```javascript + * this.add.spinecontainer(); + * ``` + * + * or + * + * ```javascript + * this.make.spinecontainer(); + * ``` + * + * See the Container documentation for further details. + * + * @class SpineContainer + * @extends Phaser.GameObjects.Container + * @constructor + * @since 3.50.0 + * + * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to. + * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin. + * @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 {SpineGameObject[]} [children] - An optional array of Spine Game Objects to add to this Container. + */ +var SpineContainer = new Class({ + + Extends: Container, + + Mixins: [ + SpineContainerRender + ], + + initialize: + + function SpineContainer (scene, plugin, x, y, children) + { + Container.call(this, scene, x, y, children); + + // Same as SpineGameObject, to prevent the renderer from mis-typing it when batching + this.type = 'Spine'; + + /** + * A reference to the Spine Plugin. + * + * @name SpineGameObject#plugin + * @type {SpinePlugin} + * @since 3.19.0 + */ + this.plugin = plugin; + } + +}); + +module.exports = SpineContainer; + + +/***/ }), + +/***/ "./container/SpineContainerCanvasRenderer.js": +/*!***************************************************!*\ + !*** ./container/SpineContainerCanvasRenderer.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Renders this Game Object with the Canvas Renderer to the given Camera. + * 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.Container#renderCanvas + * @since 3.4.0 + * @private + * + * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. + * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call. + * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. + * @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 SpineContainerCanvasRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix) +{ + var children = container.list; + + if (children.length === 0) + { + return; + } + + var transformMatrix = container.localTransform; + + if (parentMatrix) + { + transformMatrix.loadIdentity(); + transformMatrix.multiply(parentMatrix); + transformMatrix.translate(container.x, container.y); + transformMatrix.rotate(container.rotation); + transformMatrix.scale(container.scaleX, container.scaleY); + } + else + { + transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY); + } + + var containerHasBlendMode = (container.blendMode !== -1); + + if (!containerHasBlendMode) + { + // If Container is SKIP_TEST then set blend mode to be Normal + renderer.setBlendMode(0); + } + + var alpha = container._alpha; + var scrollFactorX = container.scrollFactorX; + var scrollFactorY = container.scrollFactorY; + + if (container.mask) + { + container.mask.preRenderCanvas(renderer, null, camera); + } + + for (var i = 0; i < children.length; i++) + { + var child = children[i]; + + if (!child.willRender(camera)) + { + continue; + } + + var childAlpha = child.alpha; + var childScrollFactorX = child.scrollFactorX; + var childScrollFactorY = child.scrollFactorY; + + if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode) + { + // If Container doesn't have its own blend mode, then a child can have one + renderer.setBlendMode(child.blendMode); + } + + // Set parent values + child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY); + child.setAlpha(childAlpha * alpha); + + // Render + child.renderCanvas(renderer, child, interpolationPercentage, camera, transformMatrix); + + // Restore original values + child.setAlpha(childAlpha); + child.setScrollFactor(childScrollFactorX, childScrollFactorY); + } + + if (container.mask) + { + container.mask.postRenderCanvas(renderer); + } +}; + +module.exports = SpineContainerCanvasRenderer; + + +/***/ }), + +/***/ "./container/SpineContainerRender.js": +/*!*******************************************!*\ + !*** ./container/SpineContainerRender.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var renderWebGL = __webpack_require__(/*! ../../../../src/utils/NOOP */ "../../../src/utils/NOOP.js"); +var renderCanvas = __webpack_require__(/*! ../../../../src/utils/NOOP */ "../../../src/utils/NOOP.js"); + +if (true) +{ + renderWebGL = __webpack_require__(/*! ./SpineContainerWebGLRenderer */ "./container/SpineContainerWebGLRenderer.js"); +} + +if (true) +{ + renderCanvas = __webpack_require__(/*! ./SpineContainerCanvasRenderer */ "./container/SpineContainerCanvasRenderer.js"); +} + +module.exports = { + + renderWebGL: renderWebGL, + renderCanvas: renderCanvas + +}; + + +/***/ }), + +/***/ "./container/SpineContainerWebGLRenderer.js": +/*!**************************************************!*\ + !*** ./container/SpineContainerWebGLRenderer.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CounterClockwise = __webpack_require__(/*! ../../../../src/math/angle/CounterClockwise */ "../../../src/math/angle/CounterClockwise.js"); +var Clamp = __webpack_require__(/*! ../../../../src/math/Clamp */ "../../../src/math/Clamp.js"); +var RadToDeg = __webpack_require__(/*! ../../../../src/math/RadToDeg */ "../../../src/math/RadToDeg.js"); +var Wrap = __webpack_require__(/*! ../../../../src/math/Wrap */ "../../../src/math/Wrap.js"); + +/** + * Renders this Game Object with the WebGL Renderer to the given Camera. + * 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 SpineContainerWebGLRenderer#renderWebGL + * @since 3.50.0 + * @private + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. + * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call. + * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. + * @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 SpineContainerWebGLRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix) +{ + var plugin = container.plugin; + var sceneRenderer = plugin.sceneRenderer; + var children = container.list; + + if (children.length === 0) + { + if (sceneRenderer.batcher.isDrawing && renderer.finalType) + { + sceneRenderer.end(); + } + + return; + } + + var transformMatrix = container.localTransform; + + if (parentMatrix) + { + transformMatrix.loadIdentity(); + transformMatrix.multiply(parentMatrix); + transformMatrix.translate(container.x, container.y); + transformMatrix.rotate(container.rotation); + transformMatrix.scale(container.scaleX, container.scaleY); + } + else + { + transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY); + } + + var alpha = container.alpha; + var scrollFactorX = container.scrollFactorX; + var scrollFactorY = container.scrollFactorY; + + var GameObjectRenderMask = 15; + + if (renderer.newType) + { + sceneRenderer.begin(); + } + + for (var i = 0; i < children.length; i++) + { + var src = children[i]; + + var skeleton = src.skeleton; + var childAlpha = skeleton.color.a; + + var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || childAlpha === 0); + + if (!skeleton || !willRender) + { + continue; + } + + var camMatrix = renderer._tempMatrix1; + var spriteMatrix = renderer._tempMatrix2; + var calcMatrix = renderer._tempMatrix3; + + spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY)); + + camMatrix.copyFrom(camera.matrix); + + // Multiply the camera by the parent matrix + camMatrix.multiplyWithOffset(transformMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY); + + // Undo the camera scroll + spriteMatrix.e = src.x; + spriteMatrix.f = src.y; + + // Multiply by the Sprite matrix, store result in calcMatrix + camMatrix.multiply(spriteMatrix, calcMatrix); + + var viewportHeight = renderer.height; + + skeleton.x = calcMatrix.tx; + skeleton.y = viewportHeight - calcMatrix.ty; + + skeleton.scaleX = calcMatrix.scaleX; + skeleton.scaleY = calcMatrix.scaleY; + + if (src.scaleX < 0) + { + skeleton.scaleX *= -1; + + src.root.rotation = RadToDeg(calcMatrix.rotationNormalized); + } + else + { + // +90 degrees to account for the difference in Spine vs. Phaser rotation + src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360); + } + + if (src.scaleY < 0) + { + skeleton.scaleY *= -1; + + if (src.scaleX < 0) + { + src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2); + } + else + { + src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2); + } + } + + if (camera.renderToTexture || renderer.currentFramebuffer !== null) + { + skeleton.y = calcMatrix.ty; + skeleton.scaleY *= -1; + } + + // Add autoUpdate option + skeleton.updateWorldTransform(); + + skeleton.color.a = Clamp(childAlpha * alpha, 0, 1); + + // Draw the current skeleton + sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha); + + // Restore alpha + skeleton.color.a = childAlpha; + } + + if (!renderer.nextTypeMatch) + { + // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch. + sceneRenderer.end(); + + if (!renderer.finalType) + { + renderer.rebindPipeline(renderer.pipelines.MultiPipeline); + } + } +}; + +module.exports = SpineContainerWebGLRenderer; + + /***/ }), /***/ "./events/COMPLETE_EVENT.js": @@ -21608,7 +35314,7 @@ module.exports = SpinePlugin; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -21632,7 +35338,7 @@ module.exports = 'complete'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -21656,7 +35362,7 @@ module.exports = 'dispose'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -21680,7 +35386,7 @@ module.exports = 'end'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -21704,7 +35410,7 @@ module.exports = 'event'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -21728,7 +35434,7 @@ module.exports = 'interrupted'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -21752,7 +35458,7 @@ module.exports = 'start'; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -21783,7 +35489,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ @@ -21808,24 +35514,24 @@ var SpineGameObjectRender = __webpack_require__(/*! ./SpineGameObjectRender */ " * A Spine Game Object is a Phaser level object that can be added to your Phaser Scenes. It encapsulates * a Spine Skeleton with Spine Animation Data and Animation State, with helper methods to allow you to * easily change the skin, slot attachment, bone positions and more. - * + * * Spine Game Objects can be created via the Game Object Factory, Game Object Creator, or directly. * You can only create them if the Spine plugin has been loaded into Phaser. - * + * * The quickest way is the Game Object Factory: - * + * * ```javascript * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true); * ``` - * + * * Here we are creating a new Spine Game Object positioned at 512 x 550. It's using the `jelly` * Spine data, which has previously been loaded into your Scene. The `jelly-think` argument is * an optional animation to start playing on the skeleton. The final argument `true` sets the * animation to loop. Look at the documentation for further details on each of these options. - * + * * For more control, you can use the Game Object Creator, passing in a Spine Game Object * Configuration object: - * + * * ```javascript * let jelly = this.make.spine({ * x: 512, y: 550, key: 'jelly', @@ -21835,28 +35541,28 @@ var SpineGameObjectRender = __webpack_require__(/*! ./SpineGameObjectRender */ " * slotName: 'hat', attachmentName: 'images/La_14' * }); * ``` - * + * * Here, you've got the ability to specify extra details, such as the slot name, attachments or * overall scale. - * + * * If you wish to instantiate a Spine Game Object directly you can do so, but in order for it to * update and render, it must be added to the display and update lists of your Scene: - * + * * ```javascript * let jelly = new SpineGameObject(this, this.spine, 512, 550, 'jelly', 'jelly-think', true); * this.sys.displayList.add(jelly); * this.sys.updateList.add(jelly); * ``` - * + * * It's possible to enable Spine Game Objects for input, but you should be aware that it will use * the bounds of the skeletons current pose to create the hit area from. Sometimes this is ok, but * often not. Make use of the `InputPlugin.enableDebug` method to view the input shape being created. * If it's not suitable, provide your own shape to the `setInteractive` method. - * + * * Due to the way Spine handles scaling, it's not recommended to enable a Spine Game Object for * physics directly. Instead, you should look at creating a proxy body and syncing the Spine Game * Object position with it. See the examples for further details. - * + * * If your Spine Game Object has black outlines around the different parts of the texture when it * renders then you have exported the files from Spine with pre-multiplied alpha enabled, but have * forgotten to set that flag when loading the Spine data. Please see the loader docs for more details. @@ -21956,7 +35662,7 @@ var SpineGameObject = new Class({ * @since 3.19.0 */ this.bounds = null; - + /** * A Game Object level flag that allows you to enable debug drawing * to the Skeleton Debug Renderer by toggling it. @@ -22014,7 +35720,7 @@ var SpineGameObject = new Class({ * @readonly * @since 3.19.0 */ - this.blendMode = 0; + this.blendMode = -1; this.setPosition(x, y); @@ -22040,9 +35746,9 @@ var SpineGameObject = new Class({ /** * Set the Alpha level for the whole Skeleton 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. * * @method SpineGameObject#setAlpha @@ -22075,7 +35781,7 @@ var SpineGameObject = new Class({ /** * The alpha value of the Skeleton. - * + * * A value between 0 and 1. * * This is a global value, impacting the entire Skeleton, not just a region of it. @@ -22114,7 +35820,7 @@ var SpineGameObject = new Class({ /** * The amount of red used when rendering the Skeleton. - * + * * A value between 0 and 1. * * This is a global value, impacting the entire Skeleton, not just a region of it. @@ -22144,7 +35850,7 @@ var SpineGameObject = new Class({ /** * The amount of green used when rendering the Skeleton. - * + * * A value between 0 and 1. * * This is a global value, impacting the entire Skeleton, not just a region of it. @@ -22174,7 +35880,7 @@ var SpineGameObject = new Class({ /** * The amount of blue used when rendering the Skeleton. - * + * * A value between 0 and 1. * * This is a global value, impacting the entire Skeleton, not just a region of it. @@ -22210,7 +35916,7 @@ var SpineGameObject = new Class({ * * @param {integer} [color=0xffffff] - The color being applied to the Skeleton or named Slot. Set to white to disable any previously set color. * @param {string} [slotName] - The name of the slot to set the color on. If not give, will be set on the whole skeleton. - * + * * @return {this} This Game Object instance. */ setColor: function (color, slotName) @@ -22252,7 +35958,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#setSkeletonFromJSON * @since 3.19.0 - * + * * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton. * @param {object} skeletonJSON - The JSON data for the Skeleton. * @param {string} [animationName] - Optional name of the animation to set on the Skeleton. @@ -22267,13 +35973,13 @@ var SpineGameObject = new Class({ /** * Sets this Game Object to use the given Skeleton based on its cache key. - * + * * Typically, once set, the Skeleton doesn't change. Instead, you change the skin, * or slot attachment, or any other property to adjust it. * * @method SpineGameObject#setSkeleton * @since 3.19.0 - * + * * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton. * @param {object} skeletonJSON - The JSON data for the Skeleton. * @param {string} [animationName] - Optional name of the animation to set on the Skeleton. @@ -22350,7 +36056,7 @@ var SpineGameObject = new Class({ * @fires SpinePluginEvents#COMPLETE * @private * @since 3.19.0 - * + * * @param {any} entry - The event data from Spine. */ onComplete: function (entry) @@ -22365,7 +36071,7 @@ var SpineGameObject = new Class({ * @fires SpinePluginEvents#DISPOSE * @private * @since 3.19.0 - * + * * @param {any} entry - The event data from Spine. */ onDispose: function (entry) @@ -22380,7 +36086,7 @@ var SpineGameObject = new Class({ * @fires SpinePluginEvents#END * @private * @since 3.19.0 - * + * * @param {any} entry - The event data from Spine. */ onEnd: function (entry) @@ -22395,7 +36101,7 @@ var SpineGameObject = new Class({ * @fires SpinePluginEvents#EVENT * @private * @since 3.19.0 - * + * * @param {any} entry - The event data from Spine. * @param {spine.Event} event - The Spine event. */ @@ -22411,7 +36117,7 @@ var SpineGameObject = new Class({ * @fires SpinePluginEvents#INTERRUPTED * @private * @since 3.19.0 - * + * * @param {any} entry - The event data from Spine. */ onInterrupted: function (entry) @@ -22426,7 +36132,7 @@ var SpineGameObject = new Class({ * @fires SpinePluginEvents#START * @private * @since 3.19.0 - * + * * @param {any} entry - The event data from Spine. */ onStart: function (entry) @@ -22436,15 +36142,15 @@ var SpineGameObject = new Class({ /** * Refreshes the data about the current Skeleton. - * + * * This will reset the rotation, position and size of the Skeleton to match this Game Object. - * + * * Call this method if you need to access the Skeleton data directly, and it may have changed * recently. * * @method SpineGameObject#refresh * @since 3.19.0 - * + * * @return {this} This Game Object. */ refresh: function () @@ -22464,20 +36170,20 @@ var SpineGameObject = new Class({ /** * Sets the size of this Game Object. - * + * * If no arguments are given it uses the current skeleton data dimensions. - * + * * You can use this method to set a fixed size of this Game Object, such as for input detection, * when the skeleton data doesn't match what is required in-game. * * @method SpineGameObject#setSize * @since 3.19.0 - * + * * @param {number} [width] - The width of the Skeleton. If not given it defaults to the Skeleton Data width. * @param {number} [height] - The height of the Skeleton. If not given it defaults to the Skeleton Data height. * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate. * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate. - * + * * @return {this} This Game Object. */ setSize: function (width, height, offsetX, offsetY) @@ -22500,15 +36206,15 @@ var SpineGameObject = new Class({ /** * Sets the offset of this Game Object from the Skeleton position. - * + * * You can use this method to adjust how the position of this Game Object relates to the Skeleton it is using. * * @method SpineGameObject#setOffset * @since 3.19.0 - * + * * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate. * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate. - * + * * @return {this} This Game Object. */ setOffset: function (offsetX, offsetY) @@ -22527,13 +36233,13 @@ var SpineGameObject = new Class({ /** * Internal method that syncs all of the Game Object position and scale data to the Skeleton. * It then syncs the skeleton bounds back to this Game Object. - * + * * This method is called automatically as needed internally, however, it's also exposed should * you require overriding the size settings. * * @method SpineGameObject#updateSize * @since 3.19.0 - * + * * @return {this} This Game Object. */ updateSize: function () @@ -22622,7 +36328,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getBoneList * @since 3.19.0 - * + * * @return {string[]} An array containing the names of all the bones in the Skeleton Data. */ getBoneList: function () @@ -22647,7 +36353,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getSkinList * @since 3.19.0 - * + * * @return {string[]} An array containing the names of all the skins in the Skeleton Data. */ getSkinList: function () @@ -22672,7 +36378,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getSlotList * @since 3.19.0 - * + * * @return {string[]} An array containing the names of all the slots in the Skeleton. */ getSlotList: function () @@ -22694,7 +36400,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getAnimationList * @since 3.19.0 - * + * * @return {string[]} An array containing the names of all the animations in the Skeleton Data. */ getAnimationList: function () @@ -22719,9 +36425,9 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getCurrentAnimation * @since 3.19.0 - * + * * @param {integer} [trackIndex=0] - The track to return the current animation on. - * + * * @return {?spine.Animation} The current Animation on the given track, or `undefined` if there is no current animation. */ getCurrentAnimation: function (trackIndex) @@ -22739,7 +36445,7 @@ var SpineGameObject = new Class({ /** * Sets the current animation for a track, discarding any queued animations. * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from). - * + * * Animations are referenced by a unique string-based key, as defined in the Spine software. * * @method SpineGameObject#play @@ -22762,7 +36468,7 @@ var SpineGameObject = new Class({ /** * Sets the current animation for a track, discarding any queued animations. * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from). - * + * * Animations are referenced by a unique string-based key, as defined in the Spine software. * * @method SpineGameObject#setAnimation @@ -22784,7 +36490,7 @@ var SpineGameObject = new Class({ if (ignoreIfPlaying && this.state) { var currentTrack = this.state.getCurrent(0); - + if (currentTrack && currentTrack.animation.name === animationName && !currentTrack.isComplete()) { return; @@ -22800,9 +36506,9 @@ var SpineGameObject = new Class({ /** * Adds an animation to be played after the current or last queued animation for a track. * If the track is empty, it is equivalent to calling setAnimation. - * + * * Animations are referenced by a unique string-based key, as defined in the Spine software. - * + * * The delay is a float. If > 0, sets delay. If <= 0, the delay set is the duration of the previous * track entry minus any mix duration (from the AnimationStateData) plus the specified delay * (ie the mix ends at (delay = 0) or before (delay < 0) the previous track entry duration). @@ -22826,13 +36532,13 @@ var SpineGameObject = new Class({ /** * Sets an empty animation for a track, discarding any queued animations, and sets the track * entry's mixDuration. An empty animation has no timelines and serves as a placeholder for mixing in or out. - * + * * Mixing out is done by setting an empty animation with a mix duration using either setEmptyAnimation, * setEmptyAnimations, or addEmptyAnimation. Mixing to an empty animation causes the previous animation to be * applied less and less over the mix duration. Properties keyed in the previous animation transition to * the value from lower tracks or to the setup pose value if no lower tracks key the property. * A mix duration of 0 still mixes out over one frame. - * + * * Mixing in is done by first setting an empty animation, then adding an animation using addAnimation * and on the returned track entry, set the mixDuration. Mixing from an empty animation causes the new * animation to be applied more and more over the mix duration. Properties keyed in the new animation @@ -22854,7 +36560,7 @@ var SpineGameObject = new Class({ /** * Removes all animations from the track, leaving skeletons in their current pose. - * + * * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose, * rather than leaving them in their current pose. * @@ -22871,10 +36577,10 @@ var SpineGameObject = new Class({ return this; }, - + /** * Removes all animations from all tracks, leaving skeletons in their current pose. - * + * * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose, * rather than leaving them in their current pose. * @@ -22892,11 +36598,11 @@ var SpineGameObject = new Class({ /** * Sets the skin used to look up attachments before looking in the defaultSkin. - * + * * Attachments from the new skin are attached if the corresponding attachment from the * old skin was attached. If there was no old skin, each slot's setup mode attachment is * attached from the new skin. - * + * * After changing the skin, the visible attachments can be reset to those attached in the * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide @@ -22904,7 +36610,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#setSkinByName * @since 3.19.0 - * + * * @param {string} skinName - The name of the skin to set. * * @return {this} This Game Object. @@ -22924,11 +36630,11 @@ var SpineGameObject = new Class({ /** * Sets the skin used to look up attachments before looking in the defaultSkin. - * + * * Attachments from the new skin are attached if the corresponding attachment from the * old skin was attached. If there was no old skin, each slot's setup mode attachment is * attached from the new skin. - * + * * After changing the skin, the visible attachments can be reset to those attached in the * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide @@ -22936,7 +36642,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#setSkin * @since 3.19.0 - * + * * @param {?spine.Skin} newSkin - The Skin to set. May be `null`. * * @return {this} This Game Object. @@ -22959,7 +36665,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#setMix * @since 3.19.0 - * + * * @param {string} fromName - The animation to mix from. * @param {string} toName - The animation to mix to. * @param {number} [duration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any). @@ -22980,7 +36686,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getAttachment * @since 3.19.0 - * + * * @param {integer} slotIndex - The slot index to search. * @param {string} attachmentName - The attachment name to look for. * @@ -22996,7 +36702,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getAttachmentByName * @since 3.19.0 - * + * * @param {string} slotName - The slot name to search. * @param {string} attachmentName - The attachment name to look for. * @@ -23013,7 +36719,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#setAttachment * @since 3.19.0 - * + * * @param {string} slotName - The slot name to add the attachment to. * @param {string} attachmentName - The attachment name to add. * @@ -23101,7 +36807,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#angleBoneToXY * @since 3.19.0 - * + * * @param {spine.Bone} bone - The bone to rotate towards the world position. * @param {number} worldX - The world x coordinate to rotate the bone towards. * @param {number} worldY - The world y coordinate to rotate the bone towards. @@ -23133,7 +36839,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findBone * @since 3.19.0 - * + * * @param {string} boneName - The name of the bone to find. * * @return {spine.Bone} The bone, or null. @@ -23149,7 +36855,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findBoneIndex * @since 3.19.0 - * + * * @param {string} boneName - The name of the bone to find. * * @return {integer} The bone index. Or -1 if the bone was not found. @@ -23165,7 +36871,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findSlot * @since 3.19.0 - * + * * @param {string} slotName - The name of the slot to find. * * @return {spine.Slot} The Slot. May be null. @@ -23181,7 +36887,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findSlotIndex * @since 3.19.0 - * + * * @param {string} slotName - The name of the slot to find. * * @return {integer} The slot index. Or -1 if the Slot was not found. @@ -23197,7 +36903,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findSkin * @since 3.19.0 - * + * * @param {string} skinName - The name of the skin to find. * * @return {spine.Skin} The Skin. May be null. @@ -23213,7 +36919,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findEvent * @since 3.19.0 - * + * * @param {string} eventDataName - The name of the event to find. * * @return {spine.EventData} The Event Data. May be null. @@ -23229,7 +36935,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findAnimation * @since 3.19.0 - * + * * @param {string} animationName - The name of the animation to find. * * @return {spine.Animation} The Animation. May be null. @@ -23245,7 +36951,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findIkConstraint * @since 3.19.0 - * + * * @param {string} constraintName - The name of the constraint to find. * * @return {spine.IkConstraintData} The IK constraint. May be null. @@ -23261,7 +36967,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findTransformConstraint * @since 3.19.0 - * + * * @param {string} constraintName - The name of the constraint to find. * * @return {spine.TransformConstraintData} The transform constraint. May be null. @@ -23277,7 +36983,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findPathConstraint * @since 3.19.0 - * + * * @param {string} constraintName - The name of the constraint to find. * * @return {spine.PathConstraintData} The path constraint. May be null. @@ -23293,7 +36999,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findPathConstraintIndex * @since 3.19.0 - * + * * @param {string} constraintName - The name of the constraint to find. * * @return {integer} The constraint index. Or -1 if the constraint was not found. @@ -23305,15 +37011,15 @@ var SpineGameObject = new Class({ /** * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose. - * + * * The returned object contains two properties: `offset` and `size`: - * + * * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB. * `size` - The width and height of the AABB. * * @method SpineGameObject#getBounds * @since 3.19.0 - * + * * @return {any} The bounds object. */ getBounds: function () @@ -23327,7 +37033,7 @@ var SpineGameObject = new Class({ * @method SpineGameObject#preUpdate * @protected * @since 3.19.0 - * + * * @param {number} time - The current timestamp. * @param {number} delta - The delta time, in ms, elapsed since the last frame. */ @@ -23380,7 +37086,7 @@ module.exports = SpineGameObject; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ @@ -23516,7 +37222,7 @@ module.exports = SpineGameObjectCanvasRenderer; /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ @@ -23552,7 +37258,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ @@ -23579,24 +37285,28 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent { var plugin = src.plugin; var skeleton = src.skeleton; + var childAlpha = skeleton.color.a; var sceneRenderer = plugin.sceneRenderer; var GameObjectRenderMask = 15; - var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id))); + var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || childAlpha === 0); if (!skeleton || !willRender) { - // Reset the current type - renderer.currentType = ''; - // If there is already a batch running, we need to close it if (!renderer.nextTypeMatch) { // The next object in the display list is not a Spine object, so we end the batch sceneRenderer.end(); - renderer.rebindPipeline(renderer.pipelines.MultiPipeline); + if (!renderer.finalType) + { + // Reset the current type + renderer.currentType = ''; + + renderer.rebindPipeline(renderer.pipelines.MultiPipeline); + } } return; @@ -23670,7 +37380,7 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent } } - if (camera.renderToTexture) + if (camera.renderToTexture || renderer.currentFramebuffer !== null) { skeleton.y = calcMatrix.ty; skeleton.scaleY *= -1; @@ -23704,10 +37414,13 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent if (!renderer.nextTypeMatch) { - // The next object in the display list is not a Spine object, so we end the batch + // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch. sceneRenderer.end(); - renderer.rebindPipeline(renderer.pipelines.MultiPipeline); + if (!renderer.finalType) + { + renderer.rebindPipeline(renderer.pipelines.MultiPipeline); + } } }; diff --git a/plugins/spine/dist/SpinePluginDebug.js.map b/plugins/spine/dist/SpinePluginDebug.js.map index 0f700eb41..1488a6911 100644 --- a/plugins/spine/dist/SpinePluginDebug.js.map +++ b/plugins/spine/dist/SpinePluginDebug.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///D:/wamp/www/phaser/node_modules/eventemitter3/index.js","webpack:///D:/wamp/www/phaser/src/data/DataManager.js","webpack:///D:/wamp/www/phaser/src/data/events/CHANGE_DATA_EVENT.js","webpack:///D:/wamp/www/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js","webpack:///D:/wamp/www/phaser/src/data/events/REMOVE_DATA_EVENT.js","webpack:///D:/wamp/www/phaser/src/data/events/SET_DATA_EVENT.js","webpack:///D:/wamp/www/phaser/src/data/events/index.js","webpack:///D:/wamp/www/phaser/src/gameobjects/BuildGameObject.js","webpack:///D:/wamp/www/phaser/src/gameobjects/GameObject.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/ComputedSize.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Depth.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Flip.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/ScrollFactor.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/ToJSON.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Transform.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/TransformMatrix.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Visible.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/ADDED_TO_SCENE_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/DESTROY_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_CREATED_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_ERROR_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_LOOP_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_PLAY_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_SEEKED_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_SEEKING_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_STOP_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/index.js","webpack:///D:/wamp/www/phaser/src/loader/File.js","webpack:///D:/wamp/www/phaser/src/loader/FileTypesManager.js","webpack:///D:/wamp/www/phaser/src/loader/GetURL.js","webpack:///D:/wamp/www/phaser/src/loader/MergeXHRSettings.js","webpack:///D:/wamp/www/phaser/src/loader/MultiFile.js","webpack:///D:/wamp/www/phaser/src/loader/XHRLoader.js","webpack:///D:/wamp/www/phaser/src/loader/XHRSettings.js","webpack:///D:/wamp/www/phaser/src/loader/const.js","webpack:///D:/wamp/www/phaser/src/loader/events/ADD_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/FILE_COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/FILE_LOAD_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/FILE_PROGRESS_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/POST_PROCESS_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/PROGRESS_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/START_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/index.js","webpack:///D:/wamp/www/phaser/src/loader/filetypes/ImageFile.js","webpack:///D:/wamp/www/phaser/src/loader/filetypes/JSONFile.js","webpack:///D:/wamp/www/phaser/src/loader/filetypes/TextFile.js","webpack:///D:/wamp/www/phaser/src/math/Average.js","webpack:///D:/wamp/www/phaser/src/math/Bernstein.js","webpack:///D:/wamp/www/phaser/src/math/Between.js","webpack:///D:/wamp/www/phaser/src/math/CatmullRom.js","webpack:///D:/wamp/www/phaser/src/math/CeilTo.js","webpack:///D:/wamp/www/phaser/src/math/Clamp.js","webpack:///D:/wamp/www/phaser/src/math/DegToRad.js","webpack:///D:/wamp/www/phaser/src/math/Difference.js","webpack:///D:/wamp/www/phaser/src/math/Factorial.js","webpack:///D:/wamp/www/phaser/src/math/FloatBetween.js","webpack:///D:/wamp/www/phaser/src/math/FloorTo.js","webpack:///D:/wamp/www/phaser/src/math/FromPercent.js","webpack:///D:/wamp/www/phaser/src/math/GetSpeed.js","webpack:///D:/wamp/www/phaser/src/math/IsEven.js","webpack:///D:/wamp/www/phaser/src/math/IsEvenStrict.js","webpack:///D:/wamp/www/phaser/src/math/Linear.js","webpack:///D:/wamp/www/phaser/src/math/Matrix3.js","webpack:///D:/wamp/www/phaser/src/math/Matrix4.js","webpack:///D:/wamp/www/phaser/src/math/MaxAdd.js","webpack:///D:/wamp/www/phaser/src/math/MinSub.js","webpack:///D:/wamp/www/phaser/src/math/Percent.js","webpack:///D:/wamp/www/phaser/src/math/Quaternion.js","webpack:///D:/wamp/www/phaser/src/math/RadToDeg.js","webpack:///D:/wamp/www/phaser/src/math/RandomXY.js","webpack:///D:/wamp/www/phaser/src/math/RandomXYZ.js","webpack:///D:/wamp/www/phaser/src/math/RandomXYZW.js","webpack:///D:/wamp/www/phaser/src/math/Rotate.js","webpack:///D:/wamp/www/phaser/src/math/RotateAround.js","webpack:///D:/wamp/www/phaser/src/math/RotateAroundDistance.js","webpack:///D:/wamp/www/phaser/src/math/RotateTo.js","webpack:///D:/wamp/www/phaser/src/math/RotateVec3.js","webpack:///D:/wamp/www/phaser/src/math/RoundAwayFromZero.js","webpack:///D:/wamp/www/phaser/src/math/RoundTo.js","webpack:///D:/wamp/www/phaser/src/math/SinCosTableGenerator.js","webpack:///D:/wamp/www/phaser/src/math/SmoothStep.js","webpack:///D:/wamp/www/phaser/src/math/SmootherStep.js","webpack:///D:/wamp/www/phaser/src/math/ToXY.js","webpack:///D:/wamp/www/phaser/src/math/TransformXY.js","webpack:///D:/wamp/www/phaser/src/math/Vector2.js","webpack:///D:/wamp/www/phaser/src/math/Vector3.js","webpack:///D:/wamp/www/phaser/src/math/Vector4.js","webpack:///D:/wamp/www/phaser/src/math/Within.js","webpack:///D:/wamp/www/phaser/src/math/Wrap.js","webpack:///D:/wamp/www/phaser/src/math/angle/Between.js","webpack:///D:/wamp/www/phaser/src/math/angle/BetweenPoints.js","webpack:///D:/wamp/www/phaser/src/math/angle/BetweenPointsY.js","webpack:///D:/wamp/www/phaser/src/math/angle/BetweenY.js","webpack:///D:/wamp/www/phaser/src/math/angle/CounterClockwise.js","webpack:///D:/wamp/www/phaser/src/math/angle/Normalize.js","webpack:///D:/wamp/www/phaser/src/math/angle/Random.js","webpack:///D:/wamp/www/phaser/src/math/angle/RandomDegrees.js","webpack:///D:/wamp/www/phaser/src/math/angle/Reverse.js","webpack:///D:/wamp/www/phaser/src/math/angle/RotateTo.js","webpack:///D:/wamp/www/phaser/src/math/angle/ShortestBetween.js","webpack:///D:/wamp/www/phaser/src/math/angle/Wrap.js","webpack:///D:/wamp/www/phaser/src/math/angle/WrapDegrees.js","webpack:///D:/wamp/www/phaser/src/math/angle/index.js","webpack:///D:/wamp/www/phaser/src/math/const.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistanceBetween.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistanceBetweenPoints.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistanceBetweenPointsSquared.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistanceChebyshev.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistancePower.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistanceSnake.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistanceSquared.js","webpack:///D:/wamp/www/phaser/src/math/distance/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/back/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/back/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/back/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/back/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/bounce/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/bounce/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/bounce/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/bounce/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/circular/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/circular/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/circular/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/circular/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/cubic/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/cubic/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/cubic/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/cubic/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/elastic/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/elastic/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/elastic/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/elastic/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/expo/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/expo/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/expo/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/expo/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/linear/Linear.js","webpack:///D:/wamp/www/phaser/src/math/easing/linear/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/quadratic/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/quadratic/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/quadratic/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/quadratic/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/quartic/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/quartic/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/quartic/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/quartic/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/quintic/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/quintic/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/quintic/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/quintic/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/sine/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/sine/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/sine/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/sine/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/stepped/Stepped.js","webpack:///D:/wamp/www/phaser/src/math/easing/stepped/index.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/Ceil.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/Equal.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/Floor.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/GreaterThan.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/LessThan.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/index.js","webpack:///D:/wamp/www/phaser/src/math/index.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/BezierInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/CatmullRomInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/CubicBezierInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/LinearInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/QuadraticBezierInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/SmoothStepInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/SmootherStepInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/index.js","webpack:///D:/wamp/www/phaser/src/math/pow2/GetPowerOfTwo.js","webpack:///D:/wamp/www/phaser/src/math/pow2/IsSizePowerOfTwo.js","webpack:///D:/wamp/www/phaser/src/math/pow2/IsValuePowerOfTwo.js","webpack:///D:/wamp/www/phaser/src/math/pow2/index.js","webpack:///D:/wamp/www/phaser/src/math/random-data-generator/RandomDataGenerator.js","webpack:///D:/wamp/www/phaser/src/math/snap/SnapCeil.js","webpack:///D:/wamp/www/phaser/src/math/snap/SnapFloor.js","webpack:///D:/wamp/www/phaser/src/math/snap/SnapTo.js","webpack:///D:/wamp/www/phaser/src/math/snap/index.js","webpack:///D:/wamp/www/phaser/src/plugins/BasePlugin.js","webpack:///D:/wamp/www/phaser/src/plugins/ScenePlugin.js","webpack:///D:/wamp/www/phaser/src/renderer/BlendModes.js","webpack:///D:/wamp/www/phaser/src/scale/events/RESIZE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/ADDED_TO_SCENE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/BOOT_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/CREATE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/DESTROY_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/PAUSE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/POST_UPDATE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/PRE_UPDATE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/READY_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/REMOVED_FROM_SCENE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/RENDER_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/RESUME_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/SHUTDOWN_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/SLEEP_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/START_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/TRANSITION_INIT_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/TRANSITION_OUT_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/TRANSITION_START_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/UPDATE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/WAKE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/index.js","webpack:///D:/wamp/www/phaser/src/utils/Class.js","webpack:///D:/wamp/www/phaser/src/utils/NOOP.js","webpack:///D:/wamp/www/phaser/src/utils/object/Extend.js","webpack:///D:/wamp/www/phaser/src/utils/object/GetAdvancedValue.js","webpack:///D:/wamp/www/phaser/src/utils/object/GetFastValue.js","webpack:///D:/wamp/www/phaser/src/utils/object/GetValue.js","webpack:///D:/wamp/www/phaser/src/utils/object/IsPlainObject.js","webpack:///./SpineFile.js","webpack:///./SpinePlugin.js","webpack:///./events/COMPLETE_EVENT.js","webpack:///./events/DISPOSE_EVENT.js","webpack:///./events/END_EVENT.js","webpack:///./events/EVENT_EVENT.js","webpack:///./events/INTERRUPTED_EVENT.js","webpack:///./events/START_EVENT.js","webpack:///./events/index.js","webpack:///./gameobject/SpineGameObject.js","webpack:///./gameobject/SpineGameObjectCanvasRenderer.js","webpack:///./gameobject/SpineGameObjectRender.js","webpack:///./gameobject/SpineGameObjectWebGLRenderer.js","webpack:///./runtimes/spine-both.js"],"names":[],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFa;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,yDAAyD,OAAO;AAChE;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yCAAyC,SAAS;AAClD;AACA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA,eAAe,YAAY;AAC3B;;AAEA;AACA,2DAA2D;AAC3D,+DAA+D;AAC/D,mEAAmE;AACnE,uEAAuE;AACvE;AACA,0DAA0D,SAAS;AACnE;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,aAAa,aAAa;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,2DAA2D,YAAY;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,aAAa;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI,IAA6B;AACjC;AACA;;;;;;;;;;;;AC/UA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,aAAa,mBAAO,CAAC,mDAAU;;AAE/B;AACA;AACA;AACA,WAAW,EAAE;AACb,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,KAAK;AAChB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,2BAA2B;AACtC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2BAA2B,gBAAgB;AAC3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,2DAA2D;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,aAAa;;AAEb;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,EAAE;AACjB,eAAe,KAAK;AACpB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,sCAAsC,kBAAkB;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC5rBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,qBAAqB,mBAAO,CAAC,kFAAyB;AACtD,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,cAAc,mBAAO,CAAC,oEAAkB;;AAExC;;;;;;;;;;;;ACjBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,mEAAwB;AACjD,uBAAuB,mBAAO,CAAC,uFAAkC;;AAEjE;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,8BAA8B;AACzC,WAAW,0CAA0C;AACrD;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,iBAAiB,WAAW,KAAK,SAAS;;AAE1C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,kBAAkB,KAAK,gBAAgB;;AAExD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,iBAAiB,cAAc,KAAK,UAAU;;AAE9C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,uBAAuB,mBAAO,CAAC,0EAAqB;AACpD,kBAAkB,mBAAO,CAAC,6DAAqB;AAC/C,mBAAmB,mBAAO,CAAC,mEAAe;AAC1C,aAAa,mBAAO,CAAC,0DAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,2DAA2D;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4CAA4C;AAC3D,eAAe,mCAAmC;AAClD,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wCAAwC;AACxD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA,sCAAsC,mBAAmB;;AAEzD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3tBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC9IA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC7JA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA,YAAY,wCAAwC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,sBAAsB,mBAAO,CAAC,iFAAmB;AACjD,kBAAkB,mBAAO,CAAC,gEAAwB;AAClD,gBAAgB,mBAAO,CAAC,8DAAuB;AAC/C,uBAAuB,mBAAO,CAAC,4EAA8B;AAC7D,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ,gDAAgD;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,kCAAkC,oCAAoC;AACtE,mCAAmC,sCAAsC;;AAEzE;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,QAAQ,mDAAmD;AAC3D;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,8CAA8C;AAC9D;AACA;AACA;AACA,uCAAuC,oCAAoC;;AAE3E;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,8CAA8C;AAC9D;AACA;AACA;AACA,uCAAuC,oCAAoC;AAC3E,yCAAyC,sCAAsC;;AAE/E;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C,sBAAsB,sCAAsC;;AAE5D;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACxkBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;;AAEvC;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,qDAAqD;AACrE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,kCAAkC,UAAU,cAAc;;AAE1D;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,mCAAmC,wBAAwB;;AAE3D;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACr/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,MAAM;AACjB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,oBAAoB,mBAAO,CAAC,uFAAwB;AACpD,aAAa,mBAAO,CAAC,yEAAiB;AACtC,wBAAwB,mBAAO,CAAC,+FAA4B;AAC5D,oBAAoB,mBAAO,CAAC,uFAAwB;AACpD,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,iBAAiB,mBAAO,CAAC,iFAAqB;AAC9C,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,kBAAkB,mBAAO,CAAC,mFAAsB;AAChD,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,oBAAoB,mBAAO,CAAC,uFAAwB;;AAEpD;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;AAC/B,mBAAmB,mBAAO,CAAC,+EAA8B;AACzD,aAAa,mBAAO,CAAC,+CAAU;AAC/B,uBAAuB,mBAAO,CAAC,mEAAoB;AACnD,gBAAgB,mBAAO,CAAC,qDAAa;AACrC,kBAAkB,mBAAO,CAAC,yDAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,+BAA+B;AAC1C;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA,4GAA4G;AAC5G;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,2DAA2D;;AAE3D;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B,eAAe,cAAc;AAC7B;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B,eAAe,cAAc;AAC7B;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,kBAAkB;;AAEnD;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iEAAiE;AACjE;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,eAAe,2BAA2B;AAC1C;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC7hBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2BAA2B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC9DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,mEAAwB;AAC7C,kBAAkB,mBAAO,CAAC,yDAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,sCAAsC;AACjD;AACA,YAAY,sCAAsC;AAClD;AACA;AACA;AACA,mEAAmE;;AAEnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACnOA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,uBAAuB,mBAAO,CAAC,mEAAoB;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,sCAAsC;AACjD;AACA,YAAY,eAAe;AAC3B;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,sCAAsC;AAClD;AACA;AACA;AACA,qCAAqC,mBAAmB;AACxD,8BAA8B,cAAc;AAC5C,6BAA6B,WAAW;AACxC,iCAAiC,eAAe;AAChD,gCAAgC,aAAa;AAC7C,wCAAwC,yBAAyB;;AAEjE;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACjJA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,2BAA2B;AACtC,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,uDAAuD;AACjJ;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,oFAAoF,mDAAmD;AACvI;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;AC/CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;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C,WAAW,uDAAuD;AAClE,WAAW,gBAAgB;AAC3B,WAAW,sCAAsC;AACjD,WAAW,+CAA+C;AAC1D;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uGAAuG;AAClH,WAAW,gBAAgB;AAC3B,WAAW,sCAAsC;AACjD;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;;;;;;;;;;;AC3QA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,eAAe,mBAAO,CAAC,0EAA6B;AACpD,oBAAoB,mBAAO,CAAC,oFAAkC;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,sDAAsD;AACjE,WAAW,gBAAgB;AAC3B,WAAW,sCAAsC;AACjD,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA,QAAQ;AACR,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qGAAqG;AAChH,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,WAAW,sCAAsC;AACjD;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;;;;;;;;;;;AC/NA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,oBAAoB,mBAAO,CAAC,oFAAkC;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,sDAAsD;AACjE,WAAW,OAAO;AAClB,WAAW,sCAAsC;AACjD;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qGAAqG;AAChH,WAAW,OAAO;AAClB,WAAW,sCAAsC;AACjD;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;;;;;;;;;;;ACxKA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,mDAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,6BAA6B,WAAW;;AAExC;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,6BAA6B,WAAW;;AAExC;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC1kBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;;AAEA;;;;;;;;;;;;AC/6CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,4BAA4B,eAAe;;AAE3C;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,4CAA4C;;AAE5C;;AAEA,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC7vBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,+BAA+B,YAAY;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,8BAA8B,W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iB,mBAAO,CAAC,2DAAoB;;AAE7C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,6BAA6B,WAAW;;AAExC;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA;AACA,+BAA+B,YAAY;AAC3C,+BAA+B,YAAY;AAC3C,kCAAkC,eAAe;;AAEjD;;AAEA;AACA;;AAEA,mBAAmB,YAAY;AAC/B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,6BAA6B;AAC9E;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,oBAAoB;AAC/B;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,4BAA4B,qBAAqB;;AAEjD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,+CAA+C;AAC1D;AACA,YAAY,+CAA+C;AAC3D;AACA;AACA;AACA,+BAA+B,wBAAwB;;AAEvD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,6DAAqB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,OAAO;;AAEzC;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,6BAA6B,YAAY;;AAEzC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;;;;;;;;;;;;ACjwBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;;;;;;;;;;;;ACnyBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1hBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA,2CAA2C,sCAAsC;AACjF;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA,2CAA2C,gCAAgC;AAC3E;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,4CAAU;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,0DAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,0DAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,yDAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,4CAAU;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,6BAA6B,aAAa;;AAE1C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;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ACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACrFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,4BAA4B,SAAS;;AAErC;AACA;;AAEA;;;;;;;;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AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,qBAAqB;;AAEvD;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,mDAAM;AACtB,SAAS,mBAAO,CAAC,qDAAO;AACxB,WAAW,mBAAO,CAAC,yDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,qDAAM;AACtB,SAAS,mBAAO,CAAC,uDAAO;AACxB,WAAW,mBAAO,CAAC,2DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,kDAAM;AACtB,SAAS,mBAAO,CAAC,oDAAO;AACxB,WAAW,mBAAO,CAAC,wDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD,+BAA+B,cAAc;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD,+BAA+B,cAAc;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD,+BAA+B,cAAc;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AChDA;AAC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DAAW;AAChC,UAAU,mBAAO,CAAC,sDAAQ;AAC1B,aAAa,mBAAO,CAAC,4DAAW;;AAEhC;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,2DAAU;;;;;;;;;;;;ACNnC;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,sDAAM;AACtB,SAAS,mBAAO,CAAC,wDAAO;AACxB,WAAW,mBAAO,CAAC,4DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA,iBAAiB,mBAAO,CAAC,8DAAW;;;;;;;;;;;;ACVpC;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,gCAAgC,kBAAkB;;AAElD;AACA;;AAEA;;;;;;;;;;;;ACxBA;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A;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,8CAAW;;AAEhC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,sDAAe;;AAExC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAm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B;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;;AAEA;;AAEA;AACA;AACA,kCAAkC,qDAAqD;;AAEvF;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,oEAAoE;;AAEpE;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;;AAEA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;;AAEA;;AAEA,kDAAkD;AAClD,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,wCAAwC;AAC/D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA,wBAAwB,UAAU;AAClC;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,IAAI;AACxB,oBAAoB,EAAE;AACtB;AACA,eAAe,IAAI;AACnB;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,IAAI;AACxB,oBAAoB,EAAE;AACtB;AACA,eAAe,IAAI;AACnB;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,IAAI;AACxB;AACA,eAAe,IAAI;AACnB;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;;AAEA,yBAAyB,OAAO;AAChC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACvfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,UAAU,mBAAO,CAAC,sDAAY;AAC9B,WAAW,mBAAO,CAAC,wDAAa;AAChC,QAAQ,mBAAO,CAAC,kDAAU;;AAE1B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,6BAA6B;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,4DAA4D,sCAAsC;AAClG;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC3HA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA,iBAAiB,mBAAO,CAAC,wDAAc;AACvC,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,2DAAiB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,6BAA6B;AACxC;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,mCAAmC,wCAAwC;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACzHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5UA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,6CAA6C;AACpF;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,qDAAqD;AACpH;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACr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AO,CAAC,qEAAkB;AACxC,WAAW,mBAAO,CAAC,+DAAe;AAClC,WAAW,mBAAO,CAAC,+DAAe;AAClC,yBAAyB,mBAAO,CAAC,2FAA6B;AAC9D,qBAAqB,mBAAO,CAAC,mFAAyB;AACtD,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,sBAAsB,mBAAO,CAAC,qFAA0B;AACxD,qBAAqB,mBAAO,CAAC,mFAAyB;AACtD,YAAY,mBAAO,CAAC,iEAAgB;AACpC,UAAU,mBAAO,CAAC,6DAAc;;AAEhC;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvPA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,oBAAoB,mBAAO,CAAC,mEAAiB;;AAE7C,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,YAAY,OAAO;;AAEnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,UAAU,YAAY;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,WAAW,mBAAO,CAAC,8CAAY;AAC/B,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA,8CAA8C,aAAa,qBAAqB;AAChF;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb;AACA,YAAY,EAAE,oBAAoB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;A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A;AACA;AACA;;AAEA;AACA;;AAEA,+BAA+B,oBAAoB;AACnD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,+BAA+B,qBAAqB;AACpD;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,2BAA2B,uBAAuB;AAClD;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,sCAAsC,uFAAuF;;AAE7H;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACtPA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,sBAAsB,mBAAO,CAAC,6FAA0C;AACxE,YAAY,mBAAO,CAAC,6DAA0B;AAC9C,eAAe,mBAAO,CAAC,iFAAoC;AAC3D,kBAAkB,mBAAO,CAAC,yFAAwC;AAClE,kBAAkB,mBAAO,CAAC,6EAAkC;AAC5D,YAAY,mBAAO,CAAC,uCAAO;AAC3B,gBAAgB,mBAAO,CAAC,mCAAa;AACrC,sBAAsB,mBAAO,CAAC,qEAA8B;;AAE5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,6BAA6B;AACxC;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qGAAqG;AACpH,eAAe,OAAO;AACtB,eAAe,gBAAgB;AAC/B,eAAe,QAAQ;AACvB,eAAe,sCAAsC;AACrD,eAAe,sCAAsC;AACrD;AACA,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,eAAe;AAC9B,eAAe,WAAW;AAC1B;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;;AAEA;;AAEA,gBAAgB;AAChB,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;AACA;;AAEA;;AAEA,gBAAgB;AAChB,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,gBAAgB;AAC5B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,QAAQ;AACnB;AACA,YAAY,gBAAgB;AAC5B;;AAEA;;;;;;;;;;;;ACzmCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;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O,CAAC,qCAAY;AACtC,4BAA4B,mBAAO,CAAC,sEAAyB;;AAE7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,YAAY;AACvB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,kBAAkB;;AAEpD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB,eAAe,YAAY;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,kCAAkC,6BAA6B;AAC/D,mCAAmC,+BAA+B;AAClE,oCAAoC,aAAa;AACjD,oCAAoC,aAAa;;AAEjD;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,oCAAoC,aAAa;AACjD,oCAAoC,aAAa;;AAEjD;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA,uBAAuB,2BAA2B;AAClD;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,oCAAoC;AAC/D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,uCAAuC,gBAAgB;;AAEvD;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C,4CAA4C,yBAAyB;;AAErE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA,2BAA2B,qBAAqB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,YAAY;AAC/C,qCAAqC,cAAc;AACnD,qCAAqC,gBAAgB;;AAErD;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACjjDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,eAAe,mBAAO,CAAC,o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AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACjKA;;AAEA;AACA;AACA;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA,kCAAkC,UAAU;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,mDAAmD;AACxD;AACA;AACA;AACA;AACA,KAAK,+DAA+D;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,+DAA+D;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,OAAO;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,OAAO;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,iBAAiB;AAC5D;AACA;AACA;AACA;AACA,2CAA2C,iBAAiB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,mBAAmB;AAC5D;AACA;AACA;AACA;AACA;AACA,yCAAyC,mBAAmB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,oBAAoB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,oBAAoB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,6CAA6C;AAC/D;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,OAAO;AACxE;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,yBAAyB,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,YAAY;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,oBAAoB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,oBAAoB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA;AACA,kCAAkC,oBAAoB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,cAAc;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,sDAAsD;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA,wCAAwC,iBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yGAAyG;AACzG;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,qGAAqG;AACrG;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,2DAA2D,0BAA0B;AACrF;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,sDAAsD;AAC3D,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,kEAAkE;AACvE,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,OAAO;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,iBAAiB;AACpD;AACA;AACA;AACA,iDAAiD,iBAAiB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,gBAAgB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA,0DAA0D,iBAAiB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK,+DAA+D;AACpE;AACA;AACA;AACA;AACA;AACA,KAAK,4DAA4D;AACjE;AACA;AACA;AACA;AACA;AACA,KAAK,yDAAyD;AAC9D,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,wCAAwC,iBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,gCAAgC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;AACA,2BAA2B,sCAAsC;AACjE;AACA;AACA;AACA;AACA,2BAA2B,iCAAiC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,OAAO;AAClE;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qBAAqB;AACvD,gCAAgC,cAAc;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,qBAAqB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,eAAe;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,eAAe;AAC9C;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qBAAqB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,OAAO;AAC7B;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA,wDAAwD,OAAO;AAC/D;AACA,wDAAwD,OAAO;AAC/D;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,OAAO;AACtC;AACA;AACA;AACA,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA;AACA;AACA,wCAAwC,yBAAyB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA;AACA;AACA,wCAAwC,yBAAyB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA,0DAA0D,SAAS;AACnE;AACA,gEAAgE,WAAW;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,yBAAyB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,SAAS;AAChE;AACA;AACA;AACA,uDAAuD,SAAS;AAChE;AACA;AACA;AACA,uEAAuE,QAAQ;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;AACA;AACA;AACA,oCAAoC,kBAAkB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,qCAAqC,uBAAuB;AAC5D,mCAAmC,WAAW;AAC9C,oCAAoC,oCAAoC;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,mCAAmC,cAAc;AACjD,sCAAsC,iBAAiB;AACvD;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA,qDAAqD,SAAS;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qBAAqB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,sBAAsB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA,gCAAgC,0BAA0B;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,OAAO;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,OAAO;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,2BAA2B;AAC1D;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA,wCAAwC,2BAA2B;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,wBAAwB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,+BAA+B;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,0BAA0B;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,OAAO;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,wBAAwB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA,gDAAgD,QAAQ;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0BAA0B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0BAA0B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yFAAyF,OAAO;AAChG;AACA;AACA;AACA,uDAAuD,kBAAkB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,0BAA0B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,oBAAoB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6BAA6B;AACxD;AACA;AACA,+BAA+B,6BAA6B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,wBAAwB;AACnD;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6BAA6B;AACxD;AACA;AACA,+BAA+B,6BAA6B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,wBAAwB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6BAA6B;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,kEAAkE;AACvE;AACA;AACA;AACA;AACA;AACA,KAAK,4DAA4D;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E;AAC5E,kEAAkE;AAClE,qDAAqD;AACrD;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,yBAAyB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,gBAAgB;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,oDAAoD,+BAA+B;AACnF;AACA;AACA;AACA;AACA,mCAAmC,WAAW;AAC9C;AACA;AACA;AACA;AACA;AACA,qCAAqC,UAAU;AAC/C;AACA;AACA;AACA;AACA;AACA,mCAAmC,WAAW;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,UAAU;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,iBAAiB;AACvD,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,wCAAwC,iBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,wBAAwB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,WAAW;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,WAAW;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,WAAW;AAC7D;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,WAAW;AAC5E;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,qEAAqE;AAC1E,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,iBAAiB;AAC7D,2DAA2D,8CAA8C,EAAE;AAC3G;AACA;AACA,SAAS;AACT;AACA,KAAK,6CAA6C;AAClD,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kFAAkF;AAClF,wEAAwE;AACxE,2DAA2D;AAC3D;AACA,SAAS;AACT;AACA,KAAK,6CAA6C;AAClD,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,sBAAsB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,OAAO;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,6CAA6C;AAClD,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,iBAAiB;AAC7D;AACA;AACA,iBAAiB;AACjB;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,oBAAoB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,UAAU;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,wBAAwB;AAChF,sDAAsD,sDAAsD;AAC5G,sDAAsD,qDAAqD;AAC3G;AACA;AACA;AACA;AACA,sDAAsD,sBAAsB;AAC5E,qDAAqD,4BAA4B;AACjF,qDAAqD,2BAA2B;AAChF;AACA;AACA;AACA;AACA,qDAAqD,qBAAqB;AAC1E;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,sCAAsC,UAAU;AAChD;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS,oFAAoF;AAC7F,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE,6CAA6C,qBAAqB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,oBAAoB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,uBAAuB;AACxF;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF,gDAAgD,qBAAqB;AACrE,8CAA8C,mBAAmB;AACjE;AACA;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,0CAA0C,cAAc;AACxD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,yDAAyD;AAClE,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,qBAAqB;AAC5E,4DAA4D,0BAA0B;AACtF,8DAA8D,4BAA4B;AAC1F,kEAAkE,sBAAsB;AACxF,8DAA8D,sBAAsB;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,8CAA8C,kDAAkD,iDAAiD,+BAA+B,mCAAmC,0BAA0B,2CAA2C,mDAAmD,8EAA8E,WAAW;AAC/e,iHAAiH,2FAA2F,mCAAmC,sCAAsC,0BAA0B,uEAAuE,WAAW;AACjY;AACA;AACA;AACA,2EAA2E,8CAA8C,+CAA+C,kDAAkD,iDAAiD,+BAA+B,8BAA8B,mCAAmC,0BAA0B,2CAA2C,2CAA2C,mDAAmD,8EAA8E,WAAW;AACvmB,iHAAiH,2FAA2F,mCAAmC,mCAAmC,sCAAsC,0BAA0B,8DAA8D,oDAAoD,8HAA8H,WAAW;AAC7kB;AACA;AACA;AACA,2EAA2E,8CAA8C,iDAAiD,+BAA+B,0BAA0B,2CAA2C,8EAA8E,WAAW;AACvW,iHAAiH,2FAA2F,0BAA0B,mCAAmC,WAAW;AACpR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,qBAAqB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,0CAA0C,cAAc;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,sDAAsD;AAC/D,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,SAAS;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,SAAS;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,YAAY;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,qBAAqB;AACrE,8CAA8C,mBAAmB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,SAAS;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,SAAS;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,OAAO;AAC1C,mCAAmC,OAAO;AAC1C,mCAAmC,OAAO;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,kBAAkB,iBAAiB;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,qEAAqE,OAAO;AAC5E;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;;AAEA,CAAC","file":"SpinePluginDebug.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./SpinePlugin.js\");\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Events = require('./events');\r\n\r\n/**\r\n * @callback DataEachCallback\r\n *\r\n * @param {*} parent - The parent object of the DataManager.\r\n * @param {string} key - The key of the value.\r\n * @param {*} value - The value.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The Data Manager Component features a means to store pieces of data specific to a Game Object, System or Plugin.\r\n * You can then search, query it, and retrieve the data. The parent must either extend EventEmitter,\r\n * or have a property called `events` that is an instance of it.\r\n *\r\n * @class DataManager\r\n * @memberof Phaser.Data\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {object} parent - The object that this DataManager belongs to.\r\n * @param {Phaser.Events.EventEmitter} [eventEmitter] - The DataManager's event emitter.\r\n */\r\nvar DataManager = new Class({\r\n\r\n initialize:\r\n\r\n function DataManager (parent, eventEmitter)\r\n {\r\n /**\r\n * The object that this DataManager belongs to.\r\n *\r\n * @name Phaser.Data.DataManager#parent\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.parent = parent;\r\n\r\n /**\r\n * The DataManager's event emitter.\r\n *\r\n * @name Phaser.Data.DataManager#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events = eventEmitter;\r\n\r\n if (!eventEmitter)\r\n {\r\n this.events = (parent.events) ? parent.events : parent;\r\n }\r\n\r\n /**\r\n * The data list.\r\n *\r\n * @name Phaser.Data.DataManager#list\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.0.0\r\n */\r\n this.list = {};\r\n\r\n /**\r\n * The public values list. You can use this to access anything you have stored\r\n * in this Data Manager. For example, if you set a value called `gold` you can\r\n * access it via:\r\n *\r\n * ```javascript\r\n * this.data.values.gold;\r\n * ```\r\n *\r\n * You can also modify it directly:\r\n * \r\n * ```javascript\r\n * this.data.values.gold += 1000;\r\n * ```\r\n *\r\n * Doing so will emit a `setdata` event from the parent of this Data Manager.\r\n * \r\n * Do not modify this object directly. Adding properties directly to this object will not\r\n * emit any events. Always use `DataManager.set` to create new items the first time around.\r\n *\r\n * @name Phaser.Data.DataManager#values\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.10.0\r\n */\r\n this.values = {};\r\n\r\n /**\r\n * Whether setting data is frozen for this DataManager.\r\n *\r\n * @name Phaser.Data.DataManager#_frozen\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._frozen = false;\r\n\r\n if (!parent.hasOwnProperty('sys') && this.events)\r\n {\r\n this.events.once('destroy', this.destroy, this);\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves the value for the given key, or undefined if it doesn't exist.\r\n *\r\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\r\n * \r\n * ```javascript\r\n * this.data.get('gold');\r\n * ```\r\n *\r\n * Or access the value directly:\r\n * \r\n * ```javascript\r\n * this.data.values.gold;\r\n * ```\r\n *\r\n * You can also pass in an array of keys, in which case an array of values will be returned:\r\n * \r\n * ```javascript\r\n * this.data.get([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * This approach is useful for destructuring arrays in ES6.\r\n *\r\n * @method Phaser.Data.DataManager#get\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\r\n *\r\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\r\n */\r\n get: function (key)\r\n {\r\n var list = this.list;\r\n\r\n if (Array.isArray(key))\r\n {\r\n var output = [];\r\n\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n output.push(list[key[i]]);\r\n }\r\n\r\n return output;\r\n }\r\n else\r\n {\r\n return list[key];\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves all data values in a new object.\r\n *\r\n * @method Phaser.Data.DataManager#getAll\r\n * @since 3.0.0\r\n *\r\n * @return {Object.} All data values.\r\n */\r\n getAll: function ()\r\n {\r\n var results = {};\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list.hasOwnProperty(key))\r\n {\r\n results[key] = this.list[key];\r\n }\r\n }\r\n\r\n return results;\r\n },\r\n\r\n /**\r\n * Queries the DataManager for the values of keys matching the given regular expression.\r\n *\r\n * @method Phaser.Data.DataManager#query\r\n * @since 3.0.0\r\n *\r\n * @param {RegExp} search - A regular expression object. If a non-RegExp object obj is passed, it is implicitly converted to a RegExp by using new RegExp(obj).\r\n *\r\n * @return {Object.} The values of the keys matching the search string.\r\n */\r\n query: function (search)\r\n {\r\n var results = {};\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list.hasOwnProperty(key) && key.match(search))\r\n {\r\n results[key] = this.list[key];\r\n }\r\n }\r\n\r\n return results;\r\n },\r\n\r\n /**\r\n * Sets a value for the given key. If the key doesn't already exist in the Data Manager then it is created.\r\n * \r\n * ```javascript\r\n * data.set('name', 'Red Gem Stone');\r\n * ```\r\n *\r\n * You can also pass in an object of key value pairs as the first argument:\r\n *\r\n * ```javascript\r\n * data.set({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\r\n * ```\r\n *\r\n * To get a value back again you can call `get`:\r\n * \r\n * ```javascript\r\n * data.get('gold');\r\n * ```\r\n * \r\n * Or you can access the value directly via the `values` property, where it works like any other variable:\r\n * \r\n * ```javascript\r\n * data.values.gold += 50;\r\n * ```\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\r\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\r\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\r\n *\r\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.Data.DataManager#set\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.0.0\r\n *\r\n * @param {(string|object)} key - The key to set the value for. Or an object or key value pairs. If an object the `data` argument is ignored.\r\n * @param {*} data - The value to set for the given key. If an object is provided as the key this argument is ignored.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n set: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (typeof key === 'string')\r\n {\r\n return this.setValue(key, data);\r\n }\r\n else\r\n {\r\n for (var entry in key)\r\n {\r\n this.setValue(entry, key[entry]);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Increase a value for the given key. If the key doesn't already exist in the Data Manager then it is increased from 0.\r\n * \r\n * When the value is first set, a `setdata` event is emitted.\r\n * \r\n * @method Phaser.Data.DataManager#inc\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.23.0\r\n *\r\n * @param {(string|object)} key - The key to increase the value for.\r\n * @param {*} [data] - The value to increase for the given key.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n inc: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (data === undefined)\r\n {\r\n data = 1;\r\n }\r\n\r\n var value = this.get(key);\r\n if (value === undefined)\r\n {\r\n value = 0;\r\n }\r\n\r\n this.set(key, (value + data));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggle a boolean value for the given key. If the key doesn't already exist in the Data Manager then it is toggled from false.\r\n * \r\n * When the value is first set, a `setdata` event is emitted.\r\n * \r\n * @method Phaser.Data.DataManager#toggle\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.23.0\r\n *\r\n * @param {(string|object)} key - The key to toggle the value for.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n toggle: function (key)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n this.set(key, !this.get(key));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal value setter, called automatically by the `set` method.\r\n *\r\n * @method Phaser.Data.DataManager#setValue\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @private\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The key to set the value for.\r\n * @param {*} data - The value to set.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n setValue: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (this.has(key))\r\n {\r\n // Hit the key getter, which will in turn emit the events.\r\n this.values[key] = data;\r\n }\r\n else\r\n {\r\n var _this = this;\r\n var list = this.list;\r\n var events = this.events;\r\n var parent = this.parent;\r\n\r\n Object.defineProperty(this.values, key, {\r\n\r\n enumerable: true,\r\n \r\n configurable: true,\r\n\r\n get: function ()\r\n {\r\n return list[key];\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (!_this._frozen)\r\n {\r\n var previousValue = list[key];\r\n list[key] = value;\r\n\r\n events.emit(Events.CHANGE_DATA, parent, key, value, previousValue);\r\n events.emit(Events.CHANGE_DATA_KEY + key, parent, value, previousValue);\r\n }\r\n }\r\n\r\n });\r\n\r\n list[key] = data;\r\n\r\n events.emit(Events.SET_DATA, parent, key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all data entries to the given callback.\r\n *\r\n * @method Phaser.Data.DataManager#each\r\n * @since 3.0.0\r\n *\r\n * @param {DataEachCallback} callback - The function to call.\r\n * @param {*} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ this.parent, null, undefined ];\r\n\r\n for (var i = 1; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (var key in this.list)\r\n {\r\n args[1] = key;\r\n args[2] = this.list[key];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Merge the given object of key value pairs into this DataManager.\r\n *\r\n * Any newly created values will emit a `setdata` event. Any updated values (see the `overwrite` argument)\r\n * will emit a `changedata` event.\r\n *\r\n * @method Phaser.Data.DataManager#merge\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.0.0\r\n *\r\n * @param {Object.} data - The data to merge.\r\n * @param {boolean} [overwrite=true] - Whether to overwrite existing data. Defaults to true.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n merge: function (data, overwrite)\r\n {\r\n if (overwrite === undefined) { overwrite = true; }\r\n\r\n // Merge data from another component into this one\r\n for (var key in data)\r\n {\r\n if (data.hasOwnProperty(key) && (overwrite || (!overwrite && !this.has(key))))\r\n {\r\n this.setValue(key, data[key]);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Remove the value for the given key.\r\n *\r\n * If the key is found in this Data Manager it is removed from the internal lists and a\r\n * `removedata` event is emitted.\r\n * \r\n * You can also pass in an array of keys, in which case all keys in the array will be removed:\r\n * \r\n * ```javascript\r\n * this.data.remove([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * @method Phaser.Data.DataManager#remove\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key to remove, or an array of keys to remove.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n remove: function (key)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n this.removeValue(key[i]);\r\n }\r\n }\r\n else\r\n {\r\n return this.removeValue(key);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal value remover, called automatically by the `remove` method.\r\n *\r\n * @method Phaser.Data.DataManager#removeValue\r\n * @private\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The key to set the value for.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n removeValue: function (key)\r\n {\r\n if (this.has(key))\r\n {\r\n var data = this.list[key];\r\n\r\n delete this.list[key];\r\n delete this.values[key];\r\n\r\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves the data associated with the given 'key', deletes it from this Data Manager, then returns it.\r\n *\r\n * @method Phaser.Data.DataManager#pop\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the value to retrieve and delete.\r\n *\r\n * @return {*} The value of the given key.\r\n */\r\n pop: function (key)\r\n {\r\n var data = undefined;\r\n\r\n if (!this._frozen && this.has(key))\r\n {\r\n data = this.list[key];\r\n\r\n delete this.list[key];\r\n delete this.values[key];\r\n\r\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\r\n }\r\n\r\n return data;\r\n },\r\n\r\n /**\r\n * Determines whether the given key is set in this Data Manager.\r\n * \r\n * Please note that the keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.Data.DataManager#has\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key to check.\r\n *\r\n * @return {boolean} Returns `true` if the key exists, otherwise `false`.\r\n */\r\n has: function (key)\r\n {\r\n return this.list.hasOwnProperty(key);\r\n },\r\n\r\n /**\r\n * Freeze or unfreeze this Data Manager. A frozen Data Manager will block all attempts\r\n * to create new values or update existing ones.\r\n *\r\n * @method Phaser.Data.DataManager#setFreeze\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Whether to freeze or unfreeze the Data Manager.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n setFreeze: function (value)\r\n {\r\n this._frozen = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Delete all data in this Data Manager and unfreeze it.\r\n *\r\n * @method Phaser.Data.DataManager#reset\r\n * @since 3.0.0\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n reset: function ()\r\n {\r\n for (var key in this.list)\r\n {\r\n delete this.list[key];\r\n delete this.values[key];\r\n }\r\n\r\n this._frozen = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroy this data manager.\r\n *\r\n * @method Phaser.Data.DataManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.reset();\r\n\r\n this.events.off(Events.CHANGE_DATA);\r\n this.events.off(Events.SET_DATA);\r\n this.events.off(Events.REMOVE_DATA);\r\n\r\n this.parent = null;\r\n },\r\n\r\n /**\r\n * Gets or sets the frozen state of this Data Manager.\r\n * A frozen Data Manager will block all attempts to create new values or update existing ones.\r\n *\r\n * @name Phaser.Data.DataManager#freeze\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n freeze: {\r\n\r\n get: function ()\r\n {\r\n return this._frozen;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._frozen = (value) ? true : false;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Return the total number of entries in this Data Manager.\r\n *\r\n * @name Phaser.Data.DataManager#count\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n count: {\r\n\r\n get: function ()\r\n {\r\n var i = 0;\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list[key] !== undefined)\r\n {\r\n i++;\r\n }\r\n }\r\n\r\n return i;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = DataManager;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Change Data Event.\r\n * \r\n * This event is dispatched by a Data Manager when an item in the data store is changed.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * a change data event from a Game Object you would use: `sprite.data.on('changedata', listener)`.\r\n * \r\n * This event is dispatched for all items that change in the Data Manager.\r\n * To listen for the change of a specific item, use the `CHANGE_DATA_KEY_EVENT` event.\r\n *\r\n * @event Phaser.Data.Events#CHANGE_DATA\r\n * @since 3.0.0\r\n * \r\n * @param {any} parent - A reference to the object that the Data Manager responsible for this event belongs to.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} value - The new value of the item in the Data Manager.\r\n * @param {any} previousValue - The previous value of the item in the Data Manager.\r\n */\r\nmodule.exports = 'changedata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Change Data Key Event.\r\n * \r\n * This event is dispatched by a Data Manager when an item in the data store is changed.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the change of a specific data item from a Game Object you would use: `sprite.data.on('changedata-key', listener)`,\r\n * where `key` is the unique string key of the data item. For example, if you have a data item stored called `gold`\r\n * then you can listen for `sprite.data.on('changedata-gold')`.\r\n *\r\n * @event Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.16.1\r\n * \r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {any} value - The item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n * @param {any} previousValue - The previous item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'changedata-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Remove Data Event.\r\n * \r\n * This event is dispatched by a Data Manager when an item is removed from it.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the removal of a data item on a Game Object you would use: `sprite.data.on('removedata', listener)`.\r\n *\r\n * @event Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n * \r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} data - The item that was removed from the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'removedata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Set Data Event.\r\n * \r\n * This event is dispatched by a Data Manager when a new item is added to the data store.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the addition of a new data item on a Game Object you would use: `sprite.data.on('setdata', listener)`.\r\n *\r\n * @event Phaser.Data.Events#SET_DATA\r\n * @since 3.0.0\r\n * \r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} data - The item that was added to the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'setdata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Data.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CHANGE_DATA: require('./CHANGE_DATA_EVENT'),\r\n CHANGE_DATA_KEY: require('./CHANGE_DATA_KEY_EVENT'),\r\n REMOVE_DATA: require('./REMOVE_DATA_EVENT'),\r\n SET_DATA: require('./SET_DATA_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = require('../renderer/BlendModes');\r\nvar GetAdvancedValue = require('../utils/object/GetAdvancedValue');\r\n\r\n/**\r\n * Builds a Game Object using the provided configuration object.\r\n *\r\n * @function Phaser.GameObjects.BuildGameObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The initial GameObject.\r\n * @param {Phaser.Types.GameObjects.GameObjectConfig} config - The config to build the GameObject with.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The built Game Object.\r\n */\r\nvar BuildGameObject = function (scene, gameObject, config)\r\n{\r\n // Position\r\n\r\n gameObject.x = GetAdvancedValue(config, 'x', 0);\r\n gameObject.y = GetAdvancedValue(config, 'y', 0);\r\n gameObject.depth = GetAdvancedValue(config, 'depth', 0);\r\n\r\n // Flip\r\n\r\n gameObject.flipX = GetAdvancedValue(config, 'flipX', false);\r\n gameObject.flipY = GetAdvancedValue(config, 'flipY', false);\r\n\r\n // Scale\r\n // Either: { scale: 2 } or { scale: { x: 2, y: 2 }}\r\n\r\n var scale = GetAdvancedValue(config, 'scale', null);\r\n\r\n if (typeof scale === 'number')\r\n {\r\n gameObject.setScale(scale);\r\n }\r\n else if (scale !== null)\r\n {\r\n gameObject.scaleX = GetAdvancedValue(scale, 'x', 1);\r\n gameObject.scaleY = GetAdvancedValue(scale, 'y', 1);\r\n }\r\n\r\n // ScrollFactor\r\n // Either: { scrollFactor: 2 } or { scrollFactor: { x: 2, y: 2 }}\r\n\r\n var scrollFactor = GetAdvancedValue(config, 'scrollFactor', null);\r\n\r\n if (typeof scrollFactor === 'number')\r\n {\r\n gameObject.setScrollFactor(scrollFactor);\r\n }\r\n else if (scrollFactor !== null)\r\n {\r\n gameObject.scrollFactorX = GetAdvancedValue(scrollFactor, 'x', 1);\r\n gameObject.scrollFactorY = GetAdvancedValue(scrollFactor, 'y', 1);\r\n }\r\n\r\n // Rotation\r\n\r\n gameObject.rotation = GetAdvancedValue(config, 'rotation', 0);\r\n\r\n var angle = GetAdvancedValue(config, 'angle', null);\r\n\r\n if (angle !== null)\r\n {\r\n gameObject.angle = angle;\r\n }\r\n\r\n // Alpha\r\n\r\n gameObject.alpha = GetAdvancedValue(config, 'alpha', 1);\r\n\r\n // Origin\r\n // Either: { origin: 0.5 } or { origin: { x: 0.5, y: 0.5 }}\r\n\r\n var origin = GetAdvancedValue(config, 'origin', null);\r\n\r\n if (typeof origin === 'number')\r\n {\r\n gameObject.setOrigin(origin);\r\n }\r\n else if (origin !== null)\r\n {\r\n var ox = GetAdvancedValue(origin, 'x', 0.5);\r\n var oy = GetAdvancedValue(origin, 'y', 0.5);\r\n\r\n gameObject.setOrigin(ox, oy);\r\n }\r\n\r\n // BlendMode\r\n\r\n gameObject.blendMode = GetAdvancedValue(config, 'blendMode', BlendModes.NORMAL);\r\n\r\n // Visible\r\n\r\n gameObject.visible = GetAdvancedValue(config, 'visible', true);\r\n\r\n // Add to Scene\r\n\r\n var add = GetAdvancedValue(config, 'add', true);\r\n\r\n if (add)\r\n {\r\n scene.sys.displayList.add(gameObject);\r\n }\r\n\r\n if (gameObject.preUpdate)\r\n {\r\n scene.sys.updateList.add(gameObject);\r\n }\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BuildGameObject;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar ComponentsToJSON = require('./components/ToJSON');\nvar DataManager = require('../data/DataManager');\nvar EventEmitter = require('eventemitter3');\nvar Events = require('./events');\n\n/**\n * @classdesc\n * The base class that all Game Objects extend.\n * You don't create GameObjects directly and they cannot be added to the display list.\n * Instead, use them as the base for your own custom classes.\n *\n * @class GameObject\n * @memberof Phaser.GameObjects\n * @extends Phaser.Events.EventEmitter\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs.\n * @param {string} type - A textual representation of the type of Game Object, i.e. `sprite`.\n */\nvar GameObject = new Class({\n\n Extends: EventEmitter,\n\n initialize:\n\n function GameObject (scene, type)\n {\n EventEmitter.call(this);\n\n /**\n * The Scene to which this Game Object belongs.\n * Game Objects can only belong to one Scene.\n *\n * @name Phaser.GameObjects.GameObject#scene\n * @type {Phaser.Scene}\n * @protected\n * @since 3.0.0\n */\n this.scene = scene;\n\n /**\n * A textual representation of this Game Object, i.e. `sprite`.\n * Used internally by Phaser but is available for your own custom classes to populate.\n *\n * @name Phaser.GameObjects.GameObject#type\n * @type {string}\n * @since 3.0.0\n */\n this.type = type;\n\n /**\n * The current state of this Game Object.\n *\n * Phaser itself will never modify this value, although plugins may do so.\n *\n * Use this property to track the state of a Game Object during its lifetime. For example, it could change from\n * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant\n * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons.\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\n *\n * @name Phaser.GameObjects.GameObject#state\n * @type {(integer|string)}\n * @since 3.16.0\n */\n this.state = 0;\n\n /**\n * The parent Container of this Game Object, if it has one.\n *\n * @name Phaser.GameObjects.GameObject#parentContainer\n * @type {Phaser.GameObjects.Container}\n * @since 3.4.0\n */\n this.parentContainer = null;\n\n /**\n * The name of this Game Object.\n * Empty by default and never populated by Phaser, this is left for developers to use.\n *\n * @name Phaser.GameObjects.GameObject#name\n * @type {string}\n * @default ''\n * @since 3.0.0\n */\n this.name = '';\n\n /**\n * The active state of this Game Object.\n * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it.\n * An active object is one which is having its logic and internal systems updated.\n *\n * @name Phaser.GameObjects.GameObject#active\n * @type {boolean}\n * @default true\n * @since 3.0.0\n */\n this.active = true;\n\n /**\n * The Tab Index of the Game Object.\n * Reserved for future use by plugins and the Input Manager.\n *\n * @name Phaser.GameObjects.GameObject#tabIndex\n * @type {integer}\n * @default -1\n * @since 3.0.0\n */\n this.tabIndex = -1;\n\n /**\n * A Data Manager.\n * It allows you to store, query and get key/value paired information specific to this Game Object.\n * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`.\n *\n * @name Phaser.GameObjects.GameObject#data\n * @type {Phaser.Data.DataManager}\n * @default null\n * @since 3.0.0\n */\n this.data = null;\n\n /**\n * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not.\n * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively.\n * If those components are not used by your custom class then you can use this bitmask as you wish.\n *\n * @name Phaser.GameObjects.GameObject#renderFlags\n * @type {integer}\n * @default 15\n * @since 3.0.0\n */\n this.renderFlags = 15;\n\n /**\n * A bitmask that controls if this Game Object is drawn by a Camera or not.\n * Not usually set directly, instead call `Camera.ignore`, however you can\n * set this property directly using the Camera.id property:\n *\n * @example\n * this.cameraFilter |= camera.id\n *\n * @name Phaser.GameObjects.GameObject#cameraFilter\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.cameraFilter = 0;\n\n /**\n * If this Game Object is enabled for input then this property will contain an InteractiveObject instance.\n * Not usually set directly. Instead call `GameObject.setInteractive()`.\n *\n * @name Phaser.GameObjects.GameObject#input\n * @type {?Phaser.Types.Input.InteractiveObject}\n * @default null\n * @since 3.0.0\n */\n this.input = null;\n\n /**\n * If this Game Object is enabled for Arcade or Matter Physics then this property will contain a reference to a Physics Body.\n *\n * @name Phaser.GameObjects.GameObject#body\n * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|MatterJS.BodyType)}\n * @default null\n * @since 3.0.0\n */\n this.body = null;\n\n /**\n * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`.\n * This includes calls that may come from a Group, Container or the Scene itself.\n * While it allows you to persist a Game Object across Scenes, please understand you are entirely\n * responsible for managing references to and from this Game Object.\n *\n * @name Phaser.GameObjects.GameObject#ignoreDestroy\n * @type {boolean}\n * @default false\n * @since 3.5.0\n */\n this.ignoreDestroy = false;\n\n // Tell the Scene to re-sort the children\n scene.sys.queueDepthSort();\n },\n\n /**\n * Sets the `active` property of this Game Object and returns this Game Object for further chaining.\n * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList.\n *\n * @method Phaser.GameObjects.GameObject#setActive\n * @since 3.0.0\n *\n * @param {boolean} value - True if this Game Object should be set as active, false if not.\n *\n * @return {this} This GameObject.\n */\n setActive: function (value)\n {\n this.active = value;\n\n return this;\n },\n\n /**\n * Sets the `name` property of this Game Object and returns this Game Object for further chaining.\n * The `name` property is not populated by Phaser and is presented for your own use.\n *\n * @method Phaser.GameObjects.GameObject#setName\n * @since 3.0.0\n *\n * @param {string} value - The name to be given to this Game Object.\n *\n * @return {this} This GameObject.\n */\n setName: function (value)\n {\n this.name = value;\n\n return this;\n },\n\n /**\n * Sets the current state of this Game Object.\n *\n * Phaser itself will never modify the State of a Game Object, although plugins may do so.\n *\n * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'.\n * The state value should typically be an integer (ideally mapped to a constant\n * in your game code), but could also be a string. It is recommended to keep it light and simple.\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\n *\n * @method Phaser.GameObjects.GameObject#setState\n * @since 3.16.0\n *\n * @param {(integer|string)} value - The state of the Game Object.\n *\n * @return {this} This GameObject.\n */\n setState: function (value)\n {\n this.state = value;\n\n return this;\n },\n\n /**\n * Adds a Data Manager component to this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#setDataEnabled\n * @since 3.0.0\n * @see Phaser.Data.DataManager\n *\n * @return {this} This GameObject.\n */\n setDataEnabled: function ()\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n return this;\n },\n\n /**\n * Allows you to store a key value pair within this Game Objects Data Manager.\n *\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\n * before setting the value.\n *\n * If the key doesn't already exist in the Data Manager then it is created.\n *\n * ```javascript\n * sprite.setData('name', 'Red Gem Stone');\n * ```\n *\n * You can also pass in an object of key value pairs as the first argument:\n *\n * ```javascript\n * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\n * ```\n *\n * To get a value back again you can call `getData`:\n *\n * ```javascript\n * sprite.getData('gold');\n * ```\n *\n * Or you can access the value directly via the `values` property, where it works like any other variable:\n *\n * ```javascript\n * sprite.data.values.gold += 50;\n * ```\n *\n * When the value is first set, a `setdata` event is emitted from this Game Object.\n *\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\n *\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\n *\n * @method Phaser.GameObjects.GameObject#setData\n * @since 3.0.0\n *\n * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored.\n * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored.\n *\n * @return {this} This GameObject.\n */\n setData: function (key, value)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n this.data.set(key, value);\n\n return this;\n },\n\n /**\n * Increase a value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is increased from 0.\n *\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\n * before setting the value.\n *\n * If the key doesn't already exist in the Data Manager then it is created.\n *\n * When the value is first set, a `setdata` event is emitted from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#incData\n * @since 3.23.0\n *\n * @param {(string|object)} key - The key to increase the value for.\n * @param {*} [data] - The value to increase for the given key.\n *\n * @return {this} This GameObject.\n */\n incData: function (key, value)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n this.data.inc(key, value);\n\n return this;\n },\n\n /**\n * Toggle a boolean value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is toggled from false.\n *\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\n * before setting the value.\n *\n * If the key doesn't already exist in the Data Manager then it is created.\n *\n * When the value is first set, a `setdata` event is emitted from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#toggleData\n * @since 3.23.0\n *\n * @param {(string|object)} key - The key to toggle the value for.\n *\n * @return {this} This GameObject.\n */\n toggleData: function (key)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n this.data.toggle(key);\n\n return this;\n },\n\n /**\n * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist.\n *\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\n *\n * ```javascript\n * sprite.getData('gold');\n * ```\n *\n * Or access the value directly:\n *\n * ```javascript\n * sprite.data.values.gold;\n * ```\n *\n * You can also pass in an array of keys, in which case an array of values will be returned:\n *\n * ```javascript\n * sprite.getData([ 'gold', 'armor', 'health' ]);\n * ```\n *\n * This approach is useful for destructuring arrays in ES6.\n *\n * @method Phaser.GameObjects.GameObject#getData\n * @since 3.0.0\n *\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\n *\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\n */\n getData: function (key)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n return this.data.get(key);\n },\n\n /**\n * Pass this Game Object to the Input Manager to enable it for Input.\n *\n * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area\n * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced\n * input detection.\n *\n * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If\n * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific\n * shape for it to use.\n *\n * You can also provide an Input Configuration Object as the only argument to this method.\n *\n * @example\n * sprite.setInteractive();\n *\n * @example\n * sprite.setInteractive(new Phaser.Geom.Circle(45, 46, 45), Phaser.Geom.Circle.Contains);\n *\n * @example\n * graphics.setInteractive(new Phaser.Geom.Rectangle(0, 0, 128, 128), Phaser.Geom.Rectangle.Contains);\n *\n * @method Phaser.GameObjects.GameObject#setInteractive\n * @since 3.0.0\n *\n * @param {(Phaser.Types.Input.InputConfiguration|any)} [hitArea] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not given it will try to create a Rectangle based on the texture frame.\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The callback that determines if the pointer is within the Hit Area shape or not. If you provide a shape you must also provide a callback.\n * @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target?\n *\n * @return {this} This GameObject.\n */\n setInteractive: function (hitArea, hitAreaCallback, dropZone)\n {\n this.scene.sys.input.enable(this, hitArea, hitAreaCallback, dropZone);\n\n return this;\n },\n\n /**\n * If this Game Object has previously been enabled for input, this will disable it.\n *\n * An object that is disabled for input stops processing or being considered for\n * input events, but can be turned back on again at any time by simply calling\n * `setInteractive()` with no arguments provided.\n *\n * If want to completely remove interaction from this Game Object then use `removeInteractive` instead.\n *\n * @method Phaser.GameObjects.GameObject#disableInteractive\n * @since 3.7.0\n *\n * @return {this} This GameObject.\n */\n disableInteractive: function ()\n {\n if (this.input)\n {\n this.input.enabled = false;\n }\n\n return this;\n },\n\n /**\n * If this Game Object has previously been enabled for input, this will queue it\n * for removal, causing it to no longer be interactive. The removal happens on\n * the next game step, it is not immediate.\n *\n * The Interactive Object that was assigned to this Game Object will be destroyed,\n * removed from the Input Manager and cleared from this Game Object.\n *\n * If you wish to re-enable this Game Object at a later date you will need to\n * re-create its InteractiveObject by calling `setInteractive` again.\n *\n * If you wish to only temporarily stop an object from receiving input then use\n * `disableInteractive` instead, as that toggles the interactive state, where-as\n * this erases it completely.\n *\n * If you wish to resize a hit area, don't remove and then set it as being\n * interactive. Instead, access the hitarea object directly and resize the shape\n * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the\n * shape is a Rectangle, which it is by default.)\n *\n * @method Phaser.GameObjects.GameObject#removeInteractive\n * @since 3.7.0\n *\n * @return {this} This GameObject.\n */\n removeInteractive: function ()\n {\n this.scene.sys.input.clear(this);\n\n this.input = undefined;\n\n return this;\n },\n\n /**\n * This callback is invoked when this Game Object is added to a Scene.\n *\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\n * will use this, such as Sprites, to add themselves into the Update List.\n *\n * You can also listen for the `ADDED_TO_SCENE` event from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#addedToScene\n * @since 3.50.0\n */\n addedToScene: function ()\n {\n },\n\n /**\n * This callback is invoked when this Game Object is removed from a Scene.\n *\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\n * will use this, such as Sprites, to removed themselves from the Update List.\n *\n * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#removedFromScene\n * @since 3.50.0\n */\n removedFromScene: function ()\n {\n },\n\n /**\n * To be overridden by custom GameObjects. Allows base objects to be used in a Pool.\n *\n * @method Phaser.GameObjects.GameObject#update\n * @since 3.0.0\n *\n * @param {...*} [args] - args\n */\n update: function ()\n {\n },\n\n /**\n * Returns a JSON representation of the Game Object.\n *\n * @method Phaser.GameObjects.GameObject#toJSON\n * @since 3.0.0\n *\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\n */\n toJSON: function ()\n {\n return ComponentsToJSON(this);\n },\n\n /**\n * Compares the renderMask with the renderFlags to see if this Game Object will render or not.\n * Also checks the Game Object against the given Cameras exclusion list.\n *\n * @method Phaser.GameObjects.GameObject#willRender\n * @since 3.0.0\n *\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to check against this Game Object.\n *\n * @return {boolean} True if the Game Object should be rendered, otherwise false.\n */\n willRender: function (camera)\n {\n return !(GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id)));\n },\n\n /**\n * Returns an array containing the display list index of either this Game Object, or if it has one,\n * its parent Container. It then iterates up through all of the parent containers until it hits the\n * root of the display list (which is index 0 in the returned array).\n *\n * Used internally by the InputPlugin but also useful if you wish to find out the display depth of\n * this Game Object and all of its ancestors.\n *\n * @method Phaser.GameObjects.GameObject#getIndexList\n * @since 3.4.0\n *\n * @return {integer[]} An array of display list position indexes.\n */\n getIndexList: function ()\n {\n // eslint-disable-next-line consistent-this\n var child = this;\n var parent = this.parentContainer;\n\n var indexes = [];\n\n while (parent)\n {\n // indexes.unshift([parent.getIndex(child), parent.name]);\n indexes.unshift(parent.getIndex(child));\n\n child = parent;\n\n if (!parent.parentContainer)\n {\n break;\n }\n else\n {\n parent = parent.parentContainer;\n }\n }\n\n // indexes.unshift([this.scene.sys.displayList.getIndex(child), 'root']);\n indexes.unshift(this.scene.sys.displayList.getIndex(child));\n\n return indexes;\n },\n\n /**\n * Destroys this Game Object removing it from the Display List and Update List and\n * severing all ties to parent resources.\n *\n * Also removes itself from the Input Manager and Physics Manager if previously enabled.\n *\n * Use this to remove a Game Object from your game if you don't ever plan to use it again.\n * As long as no reference to it exists within your own code it should become free for\n * garbage collection by the browser.\n *\n * If you just want to temporarily disable an object then look at using the\n * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected.\n *\n * @method Phaser.GameObjects.GameObject#destroy\n * @fires Phaser.GameObjects.Events#DESTROY\n * @since 3.0.0\n *\n * @param {boolean} [fromScene=false] - Is this Game Object being destroyed as the result of a Scene shutdown?\n */\n destroy: function (fromScene)\n {\n if (fromScene === undefined) { fromScene = false; }\n\n // This Game Object has already been destroyed\n if (!this.scene || this.ignoreDestroy)\n {\n return;\n }\n\n if (this.preDestroy)\n {\n this.preDestroy.call(this);\n }\n\n this.emit(Events.DESTROY, this);\n\n var sys = this.scene.sys;\n\n if (!fromScene)\n {\n sys.displayList.remove(this);\n }\n\n if (this.input)\n {\n sys.input.clear(this);\n this.input = undefined;\n }\n\n if (this.data)\n {\n this.data.destroy();\n\n this.data = undefined;\n }\n\n if (this.body)\n {\n this.body.destroy();\n this.body = undefined;\n }\n\n // Tell the Scene to re-sort the children\n if (!fromScene)\n {\n sys.queueDepthSort();\n }\n\n this.active = false;\n this.visible = false;\n\n this.scene = undefined;\n\n this.parentContainer = undefined;\n\n this.removeAllListeners();\n }\n\n});\n\n/**\n * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not.\n *\n * @constant {integer} RENDER_MASK\n * @memberof Phaser.GameObjects.GameObject\n * @default\n */\nGameObject.RENDER_MASK = 15;\n\nmodule.exports = GameObject;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for calculating and setting the size of a non-Frame based Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.ComputedSize\r\n * @since 3.0.0\r\n */\r\n\r\nvar ComputedSize = {\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n * \r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayWidth` property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n width: 0,\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n * \r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayHeight` property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n height: 0,\r\n\r\n /**\r\n * The displayed width of this Game Object.\r\n * \r\n * This value takes into account the scale factor.\r\n * \r\n * Setting this value will adjust the Game Object's scale property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#displayWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleX * this.width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleX = value / this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of this Game Object.\r\n * \r\n * This value takes into account the scale factor.\r\n * \r\n * Setting this value will adjust the Game Object's scale property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#displayHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleY * this.height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleY = value / this.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\r\n * \r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n * \r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n * \r\n * @method Phaser.GameObjects.Components.ComputedSize#setSize\r\n * @since 3.4.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the display size of this Game Object.\r\n * \r\n * Calling this will adjust the scale.\r\n * \r\n * @method Phaser.GameObjects.Components.ComputedSize#setDisplaySize\r\n * @since 3.4.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplaySize: function (width, height)\r\n {\r\n this.displayWidth = width;\r\n this.displayHeight = height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = ComputedSize;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for setting the depth of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Depth\r\n * @since 3.0.0\r\n */\r\n\r\nvar Depth = {\r\n\r\n /**\r\n * Private internal value. Holds the depth of the Game Object.\r\n * \r\n * @name Phaser.GameObjects.Components.Depth#_depth\r\n * @type {integer}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _depth: 0,\r\n\r\n /**\r\n * The depth of this Game Object within the Scene.\r\n * \r\n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\r\n * of Game Objects, without actually moving their position in the display list.\r\n *\r\n * The default depth is zero. A Game Object with a higher depth\r\n * value will always render in front of one with a lower value.\r\n *\r\n * Setting the depth will queue a depth sort event within the Scene.\r\n * \r\n * @name Phaser.GameObjects.Components.Depth#depth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n depth: {\r\n\r\n get: function ()\r\n {\r\n return this._depth;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scene.sys.queueDepthSort();\r\n this._depth = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The depth of this Game Object within the Scene.\r\n * \r\n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\r\n * of Game Objects, without actually moving their position in the display list.\r\n *\r\n * The default depth is zero. A Game Object with a higher depth\r\n * value will always render in front of one with a lower value.\r\n *\r\n * Setting the depth will queue a depth sort event within the Scene.\r\n * \r\n * @method Phaser.GameObjects.Components.Depth#setDepth\r\n * @since 3.0.0\r\n *\r\n * @param {integer} value - The depth of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setDepth: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.depth = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Depth;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for visually flipping a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Flip\r\n * @since 3.0.0\r\n */\r\n\r\nvar Flip = {\r\n\r\n /**\r\n * The horizontally flipped state of the Game Object.\r\n * \r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @name Phaser.GameObjects.Components.Flip#flipX\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n flipX: false,\r\n\r\n /**\r\n * The vertically flipped state of the Game Object.\r\n * \r\n * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down)\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @name Phaser.GameObjects.Components.Flip#flipY\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n flipY: false,\r\n\r\n /**\r\n * Toggles the horizontal flipped state of this Game Object.\r\n * \r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#toggleFlipX\r\n * @since 3.0.0\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n toggleFlipX: function ()\r\n {\r\n this.flipX = !this.flipX;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggles the vertical flipped state of this Game Object.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#toggleFlipY\r\n * @since 3.0.0\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n toggleFlipY: function ()\r\n {\r\n this.flipY = !this.flipY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal flipped state of this Game Object.\r\n * \r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#setFlipX\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setFlipX: function (value)\r\n {\r\n this.flipX = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical flipped state of this Game Object.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#setFlipY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setFlipY: function (value)\r\n {\r\n this.flipY = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal and vertical flipped state of this Game Object.\r\n * \r\n * A Game Object that is flipped will render inversed on the flipped axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#setFlip\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setFlip: function (x, y)\r\n {\r\n this.flipX = x;\r\n this.flipY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#resetFlip\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n resetFlip: function ()\r\n {\r\n this.flipX = false;\r\n this.flipY = false;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Flip;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the Scroll Factor of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.ScrollFactor\r\n * @since 3.0.0\r\n */\r\n\r\nvar ScrollFactor = {\r\n\r\n /**\r\n * The horizontal scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scrollFactorX: 1,\r\n\r\n /**\r\n * The vertical scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scrollFactorY: 1,\r\n\r\n /**\r\n * Sets the scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @method Phaser.GameObjects.Components.ScrollFactor#setScrollFactor\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scroll factor of this Game Object.\r\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScrollFactor: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = ScrollFactor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Build a JSON representation of the given Game Object.\r\n *\r\n * This is typically extended further by Game Object specific implementations.\r\n *\r\n * @method Phaser.GameObjects.Components.ToJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to export as JSON.\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\r\n */\r\nvar ToJSON = function (gameObject)\r\n{\r\n var out = {\r\n name: gameObject.name,\r\n type: gameObject.type,\r\n x: gameObject.x,\r\n y: gameObject.y,\r\n depth: gameObject.depth,\r\n scale: {\r\n x: gameObject.scaleX,\r\n y: gameObject.scaleY\r\n },\r\n origin: {\r\n x: gameObject.originX,\r\n y: gameObject.originY\r\n },\r\n flipX: gameObject.flipX,\r\n flipY: gameObject.flipY,\r\n rotation: gameObject.rotation,\r\n alpha: gameObject.alpha,\r\n visible: gameObject.visible,\r\n blendMode: gameObject.blendMode,\r\n textureKey: '',\r\n frameKey: '',\r\n data: {}\r\n };\r\n\r\n if (gameObject.texture)\r\n {\r\n out.textureKey = gameObject.texture.key;\r\n out.frameKey = gameObject.frame.name;\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = ToJSON;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar MATH_CONST = require('../../math/const');\nvar TransformMatrix = require('./TransformMatrix');\nvar TransformXY = require('../../math/TransformXY');\nvar WrapAngle = require('../../math/angle/Wrap');\nvar WrapAngleDegrees = require('../../math/angle/WrapDegrees');\nvar Vector2 = require('../../math/Vector2');\n\n// global bitmask flag for GameObject.renderMask (used by Scale)\nvar _FLAG = 4; // 0100\n\n/**\n * Provides methods used for getting and setting the position, scale and rotation of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.Transform\n * @since 3.0.0\n */\n\nvar Transform = {\n\n /**\n * Private internal value. Holds the horizontal scale value.\n *\n * @name Phaser.GameObjects.Components.Transform#_scaleX\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _scaleX: 1,\n\n /**\n * Private internal value. Holds the vertical scale value.\n *\n * @name Phaser.GameObjects.Components.Transform#_scaleY\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _scaleY: 1,\n\n /**\n * Private internal value. Holds the rotation value in radians.\n *\n * @name Phaser.GameObjects.Components.Transform#_rotation\n * @type {number}\n * @private\n * @default 0\n * @since 3.0.0\n */\n _rotation: 0,\n\n /**\n * The x position of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n x: 0,\n\n /**\n * The y position of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n y: 0,\n\n /**\n * The z position of this Game Object.\n *\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\n * {@link Phaser.GameObjects.Components.Depth#depth} instead.\n *\n * @name Phaser.GameObjects.Components.Transform#z\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n z: 0,\n\n /**\n * The w position of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#w\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n w: 0,\n\n /**\n * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object\n * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.\n *\n * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this\n * isn't the case, use the `scaleX` or `scaleY` properties instead.\n *\n * @name Phaser.GameObjects.Components.Transform#scale\n * @type {number}\n * @default 1\n * @since 3.18.0\n */\n scale: {\n\n get: function ()\n {\n return (this._scaleX + this._scaleY) / 2;\n },\n\n set: function (value)\n {\n this._scaleX = value;\n this._scaleY = value;\n\n if (value === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The horizontal scale of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#scaleX\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n scaleX: {\n\n get: function ()\n {\n return this._scaleX;\n },\n\n set: function (value)\n {\n this._scaleX = value;\n\n if (value === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The vertical scale of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#scaleY\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n scaleY: {\n\n get: function ()\n {\n return this._scaleY;\n },\n\n set: function (value)\n {\n this._scaleY = value;\n\n if (value === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The angle of this Game Object as expressed in degrees.\n *\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left\n * and -90 is up.\n *\n * If you prefer to work in radians, see the `rotation` property instead.\n *\n * @name Phaser.GameObjects.Components.Transform#angle\n * @type {integer}\n * @default 0\n * @since 3.0.0\n */\n angle: {\n\n get: function ()\n {\n return WrapAngleDegrees(this._rotation * MATH_CONST.RAD_TO_DEG);\n },\n\n set: function (value)\n {\n // value is in degrees\n this.rotation = WrapAngleDegrees(value) * MATH_CONST.DEG_TO_RAD;\n }\n },\n\n /**\n * The angle of this Game Object in radians.\n *\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left\n * and -PI/2 is up.\n *\n * If you prefer to work in degrees, see the `angle` property instead.\n *\n * @name Phaser.GameObjects.Components.Transform#rotation\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n rotation: {\n\n get: function ()\n {\n return this._rotation;\n },\n\n set: function (value)\n {\n // value is in radians\n this._rotation = WrapAngle(value);\n }\n },\n\n /**\n * Sets the position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setPosition\n * @since 3.0.0\n *\n * @param {number} [x=0] - The x position of this Game Object.\n * @param {number} [y=x] - The y position of this Game Object. If not set it will use the `x` value.\n * @param {number} [z=0] - The z position of this Game Object.\n * @param {number} [w=0] - The w position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setPosition: function (x, y, z, w)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = x; }\n if (z === undefined) { z = 0; }\n if (w === undefined) { w = 0; }\n\n this.x = x;\n this.y = y;\n this.z = z;\n this.w = w;\n\n return this;\n },\n\n /**\n * Sets the position of this Game Object to be a random position within the confines of\n * the given area.\n *\n * If no area is specified a random position between 0 x 0 and the game width x height is used instead.\n *\n * The position does not factor in the size of this Game Object, meaning that only the origin is\n * guaranteed to be within the area.\n *\n * @method Phaser.GameObjects.Components.Transform#setRandomPosition\n * @since 3.8.0\n *\n * @param {number} [x=0] - The x position of the top-left of the random area.\n * @param {number} [y=0] - The y position of the top-left of the random area.\n * @param {number} [width] - The width of the random area.\n * @param {number} [height] - The height of the random area.\n *\n * @return {this} This Game Object instance.\n */\n setRandomPosition: function (x, y, width, height)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n if (width === undefined) { width = this.scene.sys.scale.width; }\n if (height === undefined) { height = this.scene.sys.scale.height; }\n\n this.x = x + (Math.random() * width);\n this.y = y + (Math.random() * height);\n\n return this;\n },\n\n /**\n * Sets the rotation of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setRotation\n * @since 3.0.0\n *\n * @param {number} [radians=0] - The rotation of this Game Object, in radians.\n *\n * @return {this} This Game Object instance.\n */\n setRotation: function (radians)\n {\n if (radians === undefined) { radians = 0; }\n\n this.rotation = radians;\n\n return this;\n },\n\n /**\n * Sets the angle of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setAngle\n * @since 3.0.0\n *\n * @param {number} [degrees=0] - The rotation of this Game Object, in degrees.\n *\n * @return {this} This Game Object instance.\n */\n setAngle: function (degrees)\n {\n if (degrees === undefined) { degrees = 0; }\n\n this.angle = degrees;\n\n return this;\n },\n\n /**\n * Sets the scale of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setScale\n * @since 3.0.0\n *\n * @param {number} x - The horizontal scale of this Game Object.\n * @param {number} [y=x] - The vertical scale of this Game Object. If not set it will use the `x` value.\n *\n * @return {this} This Game Object instance.\n */\n setScale: function (x, y)\n {\n if (x === undefined) { x = 1; }\n if (y === undefined) { y = x; }\n\n this.scaleX = x;\n this.scaleY = y;\n\n return this;\n },\n\n /**\n * Sets the x position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setX\n * @since 3.0.0\n *\n * @param {number} [value=0] - The x position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setX: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.x = value;\n\n return this;\n },\n\n /**\n * Sets the y position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setY\n * @since 3.0.0\n *\n * @param {number} [value=0] - The y position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setY: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.y = value;\n\n return this;\n },\n\n /**\n * Sets the z position of this Game Object.\n *\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\n * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.\n *\n * @method Phaser.GameObjects.Components.Transform#setZ\n * @since 3.0.0\n *\n * @param {number} [value=0] - The z position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setZ: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.z = value;\n\n return this;\n },\n\n /**\n * Sets the w position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setW\n * @since 3.0.0\n *\n * @param {number} [value=0] - The w position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setW: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.w = value;\n\n return this;\n },\n\n /**\n * Gets the local transform matrix for this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#getLocalTransformMatrix\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\n *\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\n */\n getLocalTransformMatrix: function (tempMatrix)\n {\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\n\n return tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\n },\n\n /**\n * Gets the world transform matrix for this Game Object, factoring in any parent Containers.\n *\n * @method Phaser.GameObjects.Components.Transform#getWorldTransformMatrix\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A temporary matrix to hold parent values during the calculations.\n *\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\n */\n getWorldTransformMatrix: function (tempMatrix, parentMatrix)\n {\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\n if (parentMatrix === undefined) { parentMatrix = new TransformMatrix(); }\n\n var parent = this.parentContainer;\n\n if (!parent)\n {\n return this.getLocalTransformMatrix(tempMatrix);\n }\n\n tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\n\n while (parent)\n {\n parentMatrix.applyITRS(parent.x, parent.y, parent._rotation, parent._scaleX, parent._scaleY);\n\n parentMatrix.multiply(tempMatrix, tempMatrix);\n\n parent = parent.parentContainer;\n }\n\n return tempMatrix;\n },\n\n /**\n * Takes the given `x` and `y` coordinates and converts them into local space for this\n * Game Object, taking into account parent and local transforms, and the Display Origin.\n *\n * The returned Vector2 contains the translated point in its properties.\n *\n * A Camera needs to be provided in order to handle modified scroll factors. If no\n * camera is specified, it will use the `main` camera from the Scene to which this\n * Game Object belongs.\n *\n * @method Phaser.GameObjects.Components.Transform#getLocalPoint\n * @since 3.50.0\n *\n * @param {number} x - The x position to translate.\n * @param {number} y - The y position to translate.\n * @param {Phaser.Math.Vector2} [point] - A Vector2, or point-like object, to store the results in.\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera which is being tested against. If not given will use the Scene default camera.\n *\n * @return {Phaser.Math.Vector2} The translated point.\n */\n getLocalPoint: function (x, y, point, camera)\n {\n if (!point) { point = new Vector2(); }\n if (!camera) { camera = this.scene.sys.cameras.main; }\n\n var csx = camera.scrollX;\n var csy = camera.scrollY;\n\n var px = x + (csx * this.scrollFactorX) - csx;\n var py = y + (csy * this.scrollFactorY) - csy;\n\n if (this.parentContainer)\n {\n this.getWorldTransformMatrix().applyInverse(px, py, point);\n }\n else\n {\n TransformXY(px, py, this.x, this.y, this.rotation, this.scaleX, this.scaleY, point);\n }\n\n // Normalize origin\n if (this._originComponent)\n {\n point.x += this._displayOriginX;\n point.y += this._displayOriginY;\n }\n\n return point;\n },\n\n /**\n * Gets the sum total rotation of all of this Game Objects parent Containers.\n *\n * The returned value is in radians and will be zero if this Game Object has no parent container.\n *\n * @method Phaser.GameObjects.Components.Transform#getParentRotation\n * @since 3.18.0\n *\n * @return {number} The sum total rotation, in radians, of all parent containers of this Game Object.\n */\n getParentRotation: function ()\n {\n var rotation = 0;\n\n var parent = this.parentContainer;\n\n while (parent)\n {\n rotation += parent.rotation;\n\n parent = parent.parentContainer;\n }\n\n return rotation;\n }\n\n};\n\nmodule.exports = Transform;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar MATH_CONST = require('../../math/const');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * A Matrix used for display transformations for rendering.\r\n *\r\n * It is represented like so:\r\n *\r\n * ```\r\n * | a | c | tx |\r\n * | b | d | ty |\r\n * | 0 | 0 | 1 |\r\n * ```\r\n *\r\n * @class TransformMatrix\r\n * @memberof Phaser.GameObjects.Components\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [a=1] - The Scale X value.\r\n * @param {number} [b=0] - The Skew Y value.\r\n * @param {number} [c=0] - The Skew X value.\r\n * @param {number} [d=1] - The Scale Y value.\r\n * @param {number} [tx=0] - The Translate X value.\r\n * @param {number} [ty=0] - The Translate Y value.\r\n */\r\nvar TransformMatrix = new Class({\r\n\r\n initialize:\r\n\r\n function TransformMatrix (a, b, c, d, tx, ty)\r\n {\r\n if (a === undefined) { a = 1; }\r\n if (b === undefined) { b = 0; }\r\n if (c === undefined) { c = 0; }\r\n if (d === undefined) { d = 1; }\r\n if (tx === undefined) { tx = 0; }\r\n if (ty === undefined) { ty = 0; }\r\n\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#matrix\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.matrix = new Float32Array([ a, b, c, d, tx, ty, 0, 0, 1 ]);\r\n\r\n /**\r\n * The decomposed matrix.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#decomposedMatrix\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.decomposedMatrix = {\r\n translateX: 0,\r\n translateY: 0,\r\n scaleX: 1,\r\n scaleY: 1,\r\n rotation: 0\r\n };\r\n },\r\n\r\n /**\r\n * The Scale X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#a\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n a: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[0];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[0] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Skew Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#b\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n b: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[1];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[1] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Skew X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#c\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n c: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[2];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[2] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Scale Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#d\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n d: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[3];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[3] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#e\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n e: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#f\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n f: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#tx\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n tx: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#ty\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n ty: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Matrix. Value is in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#rotation\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return Math.acos(this.a / this.scaleX) * ((Math.atan(-this.c / this.a) < 0) ? -1 : 1);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Matrix, normalized to be within the Phaser right-handed\r\n * clockwise rotation space. Value is in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#rotationNormalized\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n rotationNormalized: {\r\n\r\n get: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n if (a || b)\r\n {\r\n // var r = Math.sqrt(a * a + b * b);\r\n \r\n return (b > 0) ? Math.acos(a / this.scaleX) : -Math.acos(a / this.scaleX);\r\n }\r\n else if (c || d)\r\n {\r\n // var s = Math.sqrt(c * c + d * d);\r\n \r\n return MATH_CONST.TAU - ((d > 0) ? Math.acos(-c / this.scaleY) : -Math.acos(c / this.scaleY));\r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The decomposed horizontal scale of the Matrix. This value is always positive.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleX\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt((this.a * this.a) + (this.b * this.b));\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The decomposed vertical scale of the Matrix. This value is always positive.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleY\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt((this.c * this.c) + (this.d * this.d));\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Reset the Matrix to an identity matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#loadIdentity\r\n * @since 3.0.0\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n loadIdentity: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = 1;\r\n matrix[1] = 0;\r\n matrix[2] = 0;\r\n matrix[3] = 1;\r\n matrix[4] = 0;\r\n matrix[5] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#translate\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation value.\r\n * @param {number} y - The vertical translation value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n translate: function (x, y)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[4] = matrix[0] * x + matrix[2] * y + matrix[4];\r\n matrix[5] = matrix[1] * x + matrix[3] * y + matrix[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scale value.\r\n * @param {number} y - The vertical scale value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n scale: function (x, y)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] *= x;\r\n matrix[1] *= x;\r\n matrix[2] *= y;\r\n matrix[3] *= y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n rotate: function (angle)\r\n {\r\n var sin = Math.sin(angle);\r\n var cos = Math.cos(angle);\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n matrix[0] = a * cos + c * sin;\r\n matrix[1] = b * cos + d * sin;\r\n matrix[2] = a * -sin + c * cos;\r\n matrix[3] = b * -sin + d * cos;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n * \r\n * If an `out` Matrix is given then the results will be stored in it.\r\n * If it is not given, this matrix will be updated in place instead.\r\n * Use an `out` Matrix if you do not wish to mutate this matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in.\r\n *\r\n * @return {(this|Phaser.GameObjects.Components.TransformMatrix)} Either this TransformMatrix, or the `out` Matrix, if given in the arguments.\r\n */\r\n multiply: function (rhs, out)\r\n {\r\n var matrix = this.matrix;\r\n var source = rhs.matrix;\r\n\r\n var localA = matrix[0];\r\n var localB = matrix[1];\r\n var localC = matrix[2];\r\n var localD = matrix[3];\r\n var localE = matrix[4];\r\n var localF = matrix[5];\r\n\r\n var sourceA = source[0];\r\n var sourceB = source[1];\r\n var sourceC = source[2];\r\n var sourceD = source[3];\r\n var sourceE = source[4];\r\n var sourceF = source[5];\r\n\r\n var destinationMatrix = (out === undefined) ? this : out;\r\n\r\n destinationMatrix.a = (sourceA * localA) + (sourceB * localC);\r\n destinationMatrix.b = (sourceA * localB) + (sourceB * localD);\r\n destinationMatrix.c = (sourceC * localA) + (sourceD * localC);\r\n destinationMatrix.d = (sourceC * localB) + (sourceD * localD);\r\n destinationMatrix.e = (sourceE * localA) + (sourceF * localC) + localE;\r\n destinationMatrix.f = (sourceE * localB) + (sourceF * localD) + localF;\r\n\r\n return destinationMatrix;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the matrix given, including the offset.\r\n * \r\n * The offsetX is added to the tx value: `offsetX * a + offsetY * c + tx`.\r\n * The offsetY is added to the ty value: `offsetY * b + offsetY * d + ty`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#multiplyWithOffset\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\r\n * @param {number} offsetX - Horizontal offset to factor in to the multiplication.\r\n * @param {number} offsetY - Vertical offset to factor in to the multiplication.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n multiplyWithOffset: function (src, offsetX, offsetY)\r\n {\r\n var matrix = this.matrix;\r\n var otherMatrix = src.matrix;\r\n\r\n var a0 = matrix[0];\r\n var b0 = matrix[1];\r\n var c0 = matrix[2];\r\n var d0 = matrix[3];\r\n var tx0 = matrix[4];\r\n var ty0 = matrix[5];\r\n\r\n var pse = offsetX * a0 + offsetY * c0 + tx0;\r\n var psf = offsetX * b0 + offsetY * d0 + ty0;\r\n\r\n var a1 = otherMatrix[0];\r\n var b1 = otherMatrix[1];\r\n var c1 = otherMatrix[2];\r\n var d1 = otherMatrix[3];\r\n var tx1 = otherMatrix[4];\r\n var ty1 = otherMatrix[5];\r\n\r\n matrix[0] = a1 * a0 + b1 * c0;\r\n matrix[1] = a1 * b0 + b1 * d0;\r\n matrix[2] = c1 * a0 + d1 * c0;\r\n matrix[3] = c1 * b0 + d1 * d0;\r\n matrix[4] = tx1 * a0 + ty1 * c0 + pse;\r\n matrix[5] = tx1 * b0 + ty1 * d0 + psf;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#transform\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The Scale X value.\r\n * @param {number} b - The Shear Y value.\r\n * @param {number} c - The Shear X value.\r\n * @param {number} d - The Scale Y value.\r\n * @param {number} tx - The Translate X value.\r\n * @param {number} ty - The Translate Y value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n transform: function (a, b, c, d, tx, ty)\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a0 = matrix[0];\r\n var b0 = matrix[1];\r\n var c0 = matrix[2];\r\n var d0 = matrix[3];\r\n var tx0 = matrix[4];\r\n var ty0 = matrix[5];\r\n\r\n matrix[0] = a * a0 + b * c0;\r\n matrix[1] = a * b0 + b * d0;\r\n matrix[2] = c * a0 + d * c0;\r\n matrix[3] = c * b0 + d * d0;\r\n matrix[4] = tx * a0 + ty * c0 + tx0;\r\n matrix[5] = tx * b0 + ty * d0 + ty0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform a point using this Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#transformPoint\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the point to transform.\r\n * @param {number} y - The y coordinate of the point to transform.\r\n * @param {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} point - The Point object to store the transformed coordinates.\r\n *\r\n * @return {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} The Point containing the transformed coordinates.\r\n */\r\n transformPoint: function (x, y, point)\r\n {\r\n if (point === undefined) { point = { x: 0, y: 0 }; }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n point.x = x * a + y * c + tx;\r\n point.y = x * b + y * d + ty;\r\n\r\n return point;\r\n },\r\n\r\n /**\r\n * Invert the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#invert\r\n * @since 3.0.0\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n invert: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n var n = a * d - b * c;\r\n\r\n matrix[0] = d / n;\r\n matrix[1] = -b / n;\r\n matrix[2] = -c / n;\r\n matrix[3] = a / n;\r\n matrix[4] = (c * ty - d * tx) / n;\r\n matrix[5] = -(a * ty - b * tx) / n;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix to copy those of the matrix given.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFrom\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n copyFrom: function (src)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = src.a;\r\n matrix[1] = src.b;\r\n matrix[2] = src.c;\r\n matrix[3] = src.d;\r\n matrix[4] = src.e;\r\n matrix[5] = src.f;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix to copy those of the array given.\r\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFromArray\r\n * @since 3.11.0\r\n *\r\n * @param {array} src - The array of values to set into this matrix.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n copyFromArray: function (src)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = src[0];\r\n matrix[1] = src[1];\r\n matrix[2] = src[2];\r\n matrix[3] = src[3];\r\n matrix[4] = src[4];\r\n matrix[5] = src[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values from this Matrix to the given Canvas Rendering Context.\r\n * This will use the Context.transform method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToContext\r\n * @since 3.12.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\r\n */\r\n copyToContext: function (ctx)\r\n {\r\n var matrix = this.matrix;\r\n\r\n ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n return ctx;\r\n },\r\n\r\n /**\r\n * Copy the values from this Matrix to the given Canvas Rendering Context.\r\n * This will use the Context.setTransform method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setToContext\r\n * @since 3.12.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\r\n */\r\n setToContext: function (ctx)\r\n {\r\n var matrix = this.matrix;\r\n\r\n ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n return ctx;\r\n },\r\n\r\n /**\r\n * Copy the values in this Matrix to the array given.\r\n * \r\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToArray\r\n * @since 3.12.0\r\n *\r\n * @param {array} [out] - The array to copy the matrix values in to.\r\n *\r\n * @return {array} An array where elements 0 to 5 contain the values from this matrix.\r\n */\r\n copyToArray: function (out)\r\n {\r\n var matrix = this.matrix;\r\n\r\n if (out === undefined)\r\n {\r\n out = [ matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5] ];\r\n }\r\n else\r\n {\r\n out[0] = matrix[0];\r\n out[1] = matrix[1];\r\n out[2] = matrix[2];\r\n out[3] = matrix[3];\r\n out[4] = matrix[4];\r\n out[5] = matrix[5];\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setTransform\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The Scale X value.\r\n * @param {number} b - The Shear Y value.\r\n * @param {number} c - The Shear X value.\r\n * @param {number} d - The Scale Y value.\r\n * @param {number} tx - The Translate X value.\r\n * @param {number} ty - The Translate Y value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n setTransform: function (a, b, c, d, tx, ty)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = a;\r\n matrix[1] = b;\r\n matrix[2] = c;\r\n matrix[3] = d;\r\n matrix[4] = tx;\r\n matrix[5] = ty;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Decompose this Matrix into its translation, scale and rotation values using QR decomposition.\r\n * \r\n * The result must be applied in the following order to reproduce the current matrix:\r\n * \r\n * translate -> rotate -> scale\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#decomposeMatrix\r\n * @since 3.0.0\r\n *\r\n * @return {object} The decomposed Matrix.\r\n */\r\n decomposeMatrix: function ()\r\n {\r\n var decomposedMatrix = this.decomposedMatrix;\r\n\r\n var matrix = this.matrix;\r\n\r\n // a = scale X (1)\r\n // b = shear Y (0)\r\n // c = shear X (0)\r\n // d = scale Y (1)\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n var determ = a * d - b * c;\r\n\r\n decomposedMatrix.translateX = matrix[4];\r\n decomposedMatrix.translateY = matrix[5];\r\n\r\n if (a || b)\r\n {\r\n var r = Math.sqrt(a * a + b * b);\r\n\r\n decomposedMatrix.rotation = (b > 0) ? Math.acos(a / r) : -Math.acos(a / r);\r\n decomposedMatrix.scaleX = r;\r\n decomposedMatrix.scaleY = determ / r;\r\n }\r\n else if (c || d)\r\n {\r\n var s = Math.sqrt(c * c + d * d);\r\n\r\n decomposedMatrix.rotation = Math.PI * 0.5 - (d > 0 ? Math.acos(-c / s) : -Math.acos(c / s));\r\n decomposedMatrix.scaleX = determ / s;\r\n decomposedMatrix.scaleY = s;\r\n }\r\n else\r\n {\r\n decomposedMatrix.rotation = 0;\r\n decomposedMatrix.scaleX = 0;\r\n decomposedMatrix.scaleY = 0;\r\n }\r\n\r\n return decomposedMatrix;\r\n },\r\n\r\n /**\r\n * Apply the identity, translate, rotate and scale operations on the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#applyITRS\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation.\r\n * @param {number} y - The vertical translation.\r\n * @param {number} rotation - The angle of rotation in radians.\r\n * @param {number} scaleX - The horizontal scale.\r\n * @param {number} scaleY - The vertical scale.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n applyITRS: function (x, y, rotation, scaleX, scaleY)\r\n {\r\n var matrix = this.matrix;\r\n\r\n var radianSin = Math.sin(rotation);\r\n var radianCos = Math.cos(rotation);\r\n\r\n // Translate\r\n matrix[4] = x;\r\n matrix[5] = y;\r\n\r\n // Rotate and Scale\r\n matrix[0] = radianCos * scaleX;\r\n matrix[1] = radianSin * scaleX;\r\n matrix[2] = -radianSin * scaleY;\r\n matrix[3] = radianCos * scaleY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes the `x` and `y` values and returns a new position in the `output` vector that is the inverse of\r\n * the current matrix with its transformation applied.\r\n * \r\n * Can be used to translate points from world to local space.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#applyInverse\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - The x position to translate.\r\n * @param {number} y - The y position to translate.\r\n * @param {Phaser.Math.Vector2} [output] - A Vector2, or point-like object, to store the results in.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates, inverse-transformed through this matrix.\r\n */\r\n applyInverse: function (x, y, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n var id = 1 / ((a * d) + (c * -b));\r\n\r\n output.x = (d * id * x) + (-c * id * y) + (((ty * c) - (tx * d)) * id);\r\n output.y = (a * id * y) + (-b * id * x) + (((-ty * a) + (tx * b)) * id);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the X component of this matrix multiplied by the given values.\r\n * This is the same as `x * a + y * c + e`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getX\r\n * @since 3.12.0\r\n * \r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n *\r\n * @return {number} The calculated x value.\r\n */\r\n getX: function (x, y)\r\n {\r\n return x * this.a + y * this.c + this.e;\r\n },\r\n\r\n /**\r\n * Returns the Y component of this matrix multiplied by the given values.\r\n * This is the same as `x * b + y * d + f`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getY\r\n * @since 3.12.0\r\n * \r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n *\r\n * @return {number} The calculated y value.\r\n */\r\n getY: function (x, y)\r\n {\r\n return x * this.b + y * this.d + this.f;\r\n },\r\n\r\n /**\r\n * Returns the X component of this matrix multiplied by the given values.\r\n * \r\n * This is the same as `x * a + y * c + e`, optionally passing via `Math.round`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getXRound\r\n * @since 3.50.0\r\n * \r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {boolean} [round=false] - Math.round the resulting value?\r\n *\r\n * @return {number} The calculated x value.\r\n */\r\n getXRound: function (x, y, round)\r\n {\r\n var v = this.getX(x, y);\r\n\r\n if (round)\r\n {\r\n v = Math.round(v);\r\n }\r\n\r\n return v;\r\n },\r\n\r\n /**\r\n * Returns the Y component of this matrix multiplied by the given values.\r\n * \r\n * This is the same as `x * b + y * d + f`, optionally passing via `Math.round`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getYRound\r\n * @since 3.50.0\r\n * \r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {boolean} [round=false] - Math.round the resulting value?\r\n *\r\n * @return {number} The calculated y value.\r\n */\r\n getYRound: function (x, y, round)\r\n {\r\n var v = this.getY(x, y);\r\n\r\n if (round)\r\n {\r\n v = Math.round(v);\r\n }\r\n\r\n return v;\r\n },\r\n\r\n /**\r\n * Returns a string that can be used in a CSS Transform call as a `matrix` property.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getCSSMatrix\r\n * @since 3.12.0\r\n *\r\n * @return {string} A string containing the CSS Transform matrix values.\r\n */\r\n getCSSMatrix: function ()\r\n {\r\n var m = this.matrix;\r\n\r\n return 'matrix(' + m[0] + ',' + m[1] + ',' + m[2] + ',' + m[3] + ',' + m[4] + ',' + m[5] + ')';\r\n },\r\n\r\n /**\r\n * Destroys this Transform Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#destroy\r\n * @since 3.4.0\r\n */\r\n destroy: function ()\r\n {\r\n this.matrix = null;\r\n this.decomposedMatrix = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TransformMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 1; // 0001\r\n\r\n/**\r\n * Provides methods used for setting the visibility of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Visible\r\n * @since 3.0.0\r\n */\r\n\r\nvar Visible = {\r\n\r\n /**\r\n * Private internal value. Holds the visible value.\r\n * \r\n * @name Phaser.GameObjects.Components.Visible#_visible\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n _visible: true,\r\n\r\n /**\r\n * The visible state of the Game Object.\r\n * \r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n * \r\n * @name Phaser.GameObjects.Components.Visible#visible\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n visible: {\r\n\r\n get: function ()\r\n {\r\n return this._visible;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value)\r\n {\r\n this._visible = true;\r\n this.renderFlags |= _FLAG;\r\n }\r\n else\r\n {\r\n this._visible = false;\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the visibility of this Game Object.\r\n * \r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n *\r\n * @method Phaser.GameObjects.Components.Visible#setVisible\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The visible state of the Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setVisible: function (value)\r\n {\r\n this.visible = value;\r\n\r\n return this;\r\n }\r\n};\r\n\r\nmodule.exports = Visible;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Added to Scene Event.\n *\n * This event is dispatched when a Game Object is added to a Scene.\n *\n * Listen for it on a Game Object instance using `GameObject.on('addedtoscene', listener)`.\n *\n * @event Phaser.GameObjects.Events#ADDED_TO_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\n */\nmodule.exports = 'addedtoscene';\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Destroy Event.\r\n * \r\n * This event is dispatched when a Game Object instance is being destroyed.\r\n * \r\n * Listen for it on a Game Object instance using `GameObject.on('destroy', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#DESTROY\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed.\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Removed from Scene Event.\n *\n * This event is dispatched when a Game Object is removed from a Scene.\n *\n * Listen for it on a Game Object instance using `GameObject.on('removedfromscene', listener)`.\n *\n * @event Phaser.GameObjects.Events#REMOVED_FROM_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\n */\nmodule.exports = 'removedfromscene';\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Complete Event.\r\n * \r\n * This event is dispatched when a Video finishes playback by reaching the end of its duration. It\r\n * is also dispatched if a video marker sequence is being played and reaches the end.\r\n * \r\n * Note that not all videos can fire this event. Live streams, for example, have no fixed duration,\r\n * so never technically 'complete'.\r\n * \r\n * If a video is stopped from playback, via the `Video.stop` method, it will emit the\r\n * `VIDEO_STOP` event instead of this one.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('complete', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_COMPLETE\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed playback.\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Created Event.\r\n * \r\n * This event is dispatched when the texture for a Video has been created. This happens\r\n * when enough of the video source has been loaded that the browser is able to render a\r\n * frame from it.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('created', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_CREATED\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\r\n * @param {integer} width - The width of the video.\r\n * @param {integer} height - The height of the video.\r\n */\r\nmodule.exports = 'created';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Error Event.\r\n * \r\n * This event is dispatched when a Video tries to play a source that does not exist, or is the wrong file type.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('error', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_ERROR\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which threw the error.\r\n * @param {Event} event - The native DOM event the browser raised during playback.\r\n */\r\nmodule.exports = 'error';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Loop Event.\r\n * \r\n * This event is dispatched when a Video that is currently playing has looped. This only\r\n * happens if the `loop` parameter was specified, or the `setLoop` method was called,\r\n * and if the video has a fixed duration. Video streams, for example, cannot loop, as\r\n * they have no duration.\r\n * \r\n * Looping is based on the result of the Video `timeupdate` event. This event is not\r\n * frame-accurate, due to the way browsers work, so please do not rely on this loop\r\n * event to be time or frame precise.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('loop', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_LOOP\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which has looped.\r\n */\r\nmodule.exports = 'loop';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Play Event.\r\n * \r\n * This event is dispatched when a Video begins playback. For videos that do not require\r\n * interaction unlocking, this is usually as soon as the `Video.play` method is called.\r\n * However, for videos that require unlocking, it is fired once playback begins after\r\n * they've been unlocked.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('play', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_PLAY\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started playback.\r\n */\r\nmodule.exports = 'play';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Seeked Event.\r\n * \r\n * This event is dispatched when a Video completes seeking to a new point in its timeline.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('seeked', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_SEEKED\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed seeking.\r\n */\r\nmodule.exports = 'seeked';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Seeking Event.\r\n * \r\n * This event is dispatched when a Video _begins_ seeking to a new point in its timeline.\r\n * When the seek is complete, it will dispatch the `VIDEO_SEEKED` event to conclude.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('seeking', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_SEEKING\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started seeking.\r\n */\r\nmodule.exports = 'seeking';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Stopped Event.\r\n * \r\n * This event is dispatched when a Video is stopped from playback via a call to the `Video.stop` method,\r\n * either directly via game code, or indirectly as the result of changing a video source or destroying it.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('stop', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_STOP\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which stopped playback.\r\n */\r\nmodule.exports = 'stop';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Timeout Event.\r\n * \r\n * This event is dispatched when a Video has exhausted its allocated time while trying to connect to a video\r\n * source to start playback.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('timeout', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_TIMEOUT\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which timed out.\r\n */\r\nmodule.exports = 'timeout';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Unlocked Event.\r\n * \r\n * This event is dispatched when a Video that was prevented from playback due to the browsers\r\n * Media Engagement Interaction policy, is unlocked by a user gesture.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('unlocked', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_UNLOCKED\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\r\n */\r\nmodule.exports = 'unlocked';\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.GameObjects.Events\n */\n\nmodule.exports = {\n\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\n DESTROY: require('./DESTROY_EVENT'),\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'),\n VIDEO_COMPLETE: require('./VIDEO_COMPLETE_EVENT'),\n VIDEO_CREATED: require('./VIDEO_CREATED_EVENT'),\n VIDEO_ERROR: require('./VIDEO_ERROR_EVENT'),\n VIDEO_LOOP: require('./VIDEO_LOOP_EVENT'),\n VIDEO_PLAY: require('./VIDEO_PLAY_EVENT'),\n VIDEO_SEEKED: require('./VIDEO_SEEKED_EVENT'),\n VIDEO_SEEKING: require('./VIDEO_SEEKING_EVENT'),\n VIDEO_STOP: require('./VIDEO_STOP_EVENT'),\n VIDEO_TIMEOUT: require('./VIDEO_TIMEOUT_EVENT'),\n VIDEO_UNLOCKED: require('./VIDEO_UNLOCKED_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar CONST = require('./const');\nvar Events = require('./events');\nvar GetFastValue = require('../utils/object/GetFastValue');\nvar GetURL = require('./GetURL');\nvar MergeXHRSettings = require('./MergeXHRSettings');\nvar XHRLoader = require('./XHRLoader');\nvar XHRSettings = require('./XHRSettings');\n\n/**\n * @classdesc\n * The base File class used by all File Types that the Loader can support.\n * You shouldn't create an instance of a File directly, but should extend it with your own class, setting a custom type and processing methods.\n *\n * @class File\n * @memberof Phaser.Loader\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\n * @param {Phaser.Types.Loader.FileConfig} fileConfig - The file configuration object, as created by the file type.\n */\nvar File = new Class({\n\n initialize:\n\n function File (loader, fileConfig)\n {\n /**\n * A reference to the Loader that is going to load this file.\n *\n * @name Phaser.Loader.File#loader\n * @type {Phaser.Loader.LoaderPlugin}\n * @since 3.0.0\n */\n this.loader = loader;\n\n /**\n * A reference to the Cache, or Texture Manager, that is going to store this file if it loads.\n *\n * @name Phaser.Loader.File#cache\n * @type {(Phaser.Cache.BaseCache|Phaser.Textures.TextureManager)}\n * @since 3.7.0\n */\n this.cache = GetFastValue(fileConfig, 'cache', false);\n\n /**\n * The file type string (image, json, etc) for sorting within the Loader.\n *\n * @name Phaser.Loader.File#type\n * @type {string}\n * @since 3.0.0\n */\n this.type = GetFastValue(fileConfig, 'type', false);\n\n /**\n * Unique cache key (unique within its file type)\n *\n * @name Phaser.Loader.File#key\n * @type {string}\n * @since 3.0.0\n */\n this.key = GetFastValue(fileConfig, 'key', false);\n\n var loadKey = this.key;\n\n if (loader.prefix && loader.prefix !== '')\n {\n this.key = loader.prefix + loadKey;\n }\n\n if (!this.type || !this.key)\n {\n throw new Error('Error calling \\'Loader.' + this.type + '\\' invalid key provided.');\n }\n\n /**\n * The URL of the file, not including baseURL.\n *\n * Automatically has Loader.path prepended to it if a string.\n *\n * Can also be a JavaScript Object, such as the results of parsing JSON data.\n *\n * @name Phaser.Loader.File#url\n * @type {object|string}\n * @since 3.0.0\n */\n this.url = GetFastValue(fileConfig, 'url');\n\n if (this.url === undefined)\n {\n this.url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', '');\n }\n else if (typeof this.url === 'string' && this.url.indexOf('blob:') !== 0 && this.url.indexOf('data:') !== 0)\n {\n this.url = loader.path + this.url;\n }\n\n /**\n * The final URL this file will load from, including baseURL and path.\n * Set automatically when the Loader calls 'load' on this file.\n *\n * @name Phaser.Loader.File#src\n * @type {string}\n * @since 3.0.0\n */\n this.src = '';\n\n /**\n * The merged XHRSettings for this file.\n *\n * @name Phaser.Loader.File#xhrSettings\n * @type {Phaser.Types.Loader.XHRSettingsObject}\n * @since 3.0.0\n */\n this.xhrSettings = XHRSettings(GetFastValue(fileConfig, 'responseType', undefined));\n\n if (GetFastValue(fileConfig, 'xhrSettings', false))\n {\n this.xhrSettings = MergeXHRSettings(this.xhrSettings, GetFastValue(fileConfig, 'xhrSettings', {}));\n }\n\n /**\n * The XMLHttpRequest instance (as created by XHR Loader) that is loading this File.\n *\n * @name Phaser.Loader.File#xhrLoader\n * @type {?XMLHttpRequest}\n * @since 3.0.0\n */\n this.xhrLoader = null;\n\n /**\n * The current state of the file. One of the FILE_CONST values.\n *\n * @name Phaser.Loader.File#state\n * @type {integer}\n * @since 3.0.0\n */\n this.state = (typeof(this.url) === 'function') ? CONST.FILE_POPULATED : CONST.FILE_PENDING;\n\n /**\n * The total size of this file.\n * Set by onProgress and only if loading via XHR.\n *\n * @name Phaser.Loader.File#bytesTotal\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.bytesTotal = 0;\n\n /**\n * Updated as the file loads.\n * Only set if loading via XHR.\n *\n * @name Phaser.Loader.File#bytesLoaded\n * @type {number}\n * @default -1\n * @since 3.0.0\n */\n this.bytesLoaded = -1;\n\n /**\n * A percentage value between 0 and 1 indicating how much of this file has loaded.\n * Only set if loading via XHR.\n *\n * @name Phaser.Loader.File#percentComplete\n * @type {number}\n * @default -1\n * @since 3.0.0\n */\n this.percentComplete = -1;\n\n /**\n * For CORs based loading.\n * If this is undefined then the File will check BaseLoader.crossOrigin and use that (if set)\n *\n * @name Phaser.Loader.File#crossOrigin\n * @type {(string|undefined)}\n * @since 3.0.0\n */\n this.crossOrigin = undefined;\n\n /**\n * The processed file data, stored here after the file has loaded.\n *\n * @name Phaser.Loader.File#data\n * @type {*}\n * @since 3.0.0\n */\n this.data = undefined;\n\n /**\n * A config object that can be used by file types to store transitional data.\n *\n * @name Phaser.Loader.File#config\n * @type {*}\n * @since 3.0.0\n */\n this.config = GetFastValue(fileConfig, 'config', {});\n\n /**\n * If this is a multipart file, i.e. an atlas and its json together, then this is a reference\n * to the parent MultiFile. Set and used internally by the Loader or specific file types.\n *\n * @name Phaser.Loader.File#multiFile\n * @type {?Phaser.Loader.MultiFile}\n * @since 3.7.0\n */\n this.multiFile;\n\n /**\n * Does this file have an associated linked file? Such as an image and a normal map.\n * Atlases and Bitmap Fonts use the multiFile, because those files need loading together but aren't\n * actually bound by data, where-as a linkFile is.\n *\n * @name Phaser.Loader.File#linkFile\n * @type {?Phaser.Loader.File}\n * @since 3.7.0\n */\n this.linkFile;\n },\n\n /**\n * Links this File with another, so they depend upon each other for loading and processing.\n *\n * @method Phaser.Loader.File#setLink\n * @since 3.7.0\n *\n * @param {Phaser.Loader.File} fileB - The file to link to this one.\n */\n setLink: function (fileB)\n {\n this.linkFile = fileB;\n\n fileB.linkFile = this;\n },\n\n /**\n * Resets the XHRLoader instance this file is using.\n *\n * @method Phaser.Loader.File#resetXHR\n * @since 3.0.0\n */\n resetXHR: function ()\n {\n if (this.xhrLoader)\n {\n this.xhrLoader.onload = undefined;\n this.xhrLoader.onerror = undefined;\n this.xhrLoader.onprogress = undefined;\n }\n },\n\n /**\n * Called by the Loader, starts the actual file downloading.\n * During the load the methods onLoad, onError and onProgress are called, based on the XHR events.\n * You shouldn't normally call this method directly, it's meant to be invoked by the Loader.\n *\n * @method Phaser.Loader.File#load\n * @since 3.0.0\n */\n load: function ()\n {\n if (this.state === CONST.FILE_POPULATED)\n {\n // Can happen for example in a JSONFile if they've provided a JSON object instead of a URL\n this.loader.nextFile(this, true);\n }\n else\n {\n this.state = CONST.FILE_LOADING;\n\n this.src = GetURL(this, this.loader.baseURL);\n\n if (this.src.indexOf('data:') === 0)\n {\n console.warn('Local data URIs are not supported: ' + this.key);\n }\n else\n {\n // The creation of this XHRLoader starts the load process going.\n // It will automatically call the following, based on the load outcome:\n //\n // xhr.onload = this.onLoad\n // xhr.onerror = this.onError\n // xhr.onprogress = this.onProgress\n\n this.xhrLoader = XHRLoader(this, this.loader.xhr);\n }\n }\n },\n\n /**\n * Called when the file finishes loading, is sent a DOM ProgressEvent.\n *\n * @method Phaser.Loader.File#onLoad\n * @since 3.0.0\n *\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this load.\n */\n onLoad: function (xhr, event)\n {\n var localFileOk = ((xhr.responseURL && xhr.responseURL.indexOf('file://') === 0 && event.target.status === 0));\n\n var success = !(event.target && event.target.status !== 200) || localFileOk;\n\n // Handle HTTP status codes of 4xx and 5xx as errors, even if xhr.onerror was not called.\n if (xhr.readyState === 4 && xhr.status >= 400 && xhr.status <= 599)\n {\n success = false;\n }\n\n this.state = CONST.FILE_LOADED;\n\n this.resetXHR();\n\n this.loader.nextFile(this, success);\n },\n\n /**\n * Called if the file errors while loading, is sent a DOM ProgressEvent.\n *\n * @method Phaser.Loader.File#onError\n * @since 3.0.0\n *\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this error.\n */\n onError: function ()\n {\n this.resetXHR();\n\n this.loader.nextFile(this, false);\n },\n\n /**\n * Called during the file load progress. Is sent a DOM ProgressEvent.\n *\n * @method Phaser.Loader.File#onProgress\n * @fires Phaser.Loader.Events#FILE_PROGRESS\n * @since 3.0.0\n *\n * @param {ProgressEvent} event - The DOM ProgressEvent.\n */\n onProgress: function (event)\n {\n if (event.lengthComputable)\n {\n this.bytesLoaded = event.loaded;\n this.bytesTotal = event.total;\n\n this.percentComplete = Math.min((this.bytesLoaded / this.bytesTotal), 1);\n\n this.loader.emit(Events.FILE_PROGRESS, this, this.percentComplete);\n }\n },\n\n /**\n * Usually overridden by the FileTypes and is called by Loader.nextFile.\n * This method controls what extra work this File does with its loaded data, for example a JSON file will parse itself during this stage.\n *\n * @method Phaser.Loader.File#onProcess\n * @since 3.0.0\n */\n onProcess: function ()\n {\n this.state = CONST.FILE_PROCESSING;\n\n this.onProcessComplete();\n },\n\n /**\n * Called when the File has completed processing.\n * Checks on the state of its multifile, if set.\n *\n * @method Phaser.Loader.File#onProcessComplete\n * @since 3.7.0\n */\n onProcessComplete: function ()\n {\n this.state = CONST.FILE_COMPLETE;\n\n if (this.multiFile)\n {\n this.multiFile.onFileComplete(this);\n }\n\n this.loader.fileProcessComplete(this);\n },\n\n /**\n * Called when the File has completed processing but it generated an error.\n * Checks on the state of its multifile, if set.\n *\n * @method Phaser.Loader.File#onProcessError\n * @since 3.7.0\n */\n onProcessError: function ()\n {\n this.state = CONST.FILE_ERRORED;\n\n if (this.multiFile)\n {\n this.multiFile.onFileFailed(this);\n }\n\n this.loader.fileProcessComplete(this);\n },\n\n /**\n * Checks if a key matching the one used by this file exists in the target Cache or not.\n * This is called automatically by the LoaderPlugin to decide if the file can be safely\n * loaded or will conflict.\n *\n * @method Phaser.Loader.File#hasCacheConflict\n * @since 3.7.0\n *\n * @return {boolean} `true` if adding this file will cause a conflict, otherwise `false`.\n */\n hasCacheConflict: function ()\n {\n return (this.cache && this.cache.exists(this.key));\n },\n\n /**\n * Adds this file to its target cache upon successful loading and processing.\n * This method is often overridden by specific file types.\n *\n * @method Phaser.Loader.File#addToCache\n * @since 3.7.0\n */\n addToCache: function ()\n {\n if (this.cache)\n {\n this.cache.add(this.key, this.data);\n }\n\n this.pendingDestroy();\n },\n\n /**\n * Called once the file has been added to its cache and is now ready for deletion from the Loader.\n * It will emit a `filecomplete` event from the LoaderPlugin.\n *\n * @method Phaser.Loader.File#pendingDestroy\n * @fires Phaser.Loader.Events#FILE_COMPLETE\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\n * @since 3.7.0\n */\n pendingDestroy: function (data)\n {\n if (data === undefined) { data = this.data; }\n\n var key = this.key;\n var type = this.type;\n\n this.loader.emit(Events.FILE_COMPLETE, key, type, data);\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type, data);\n\n this.loader.flagForRemoval(this);\n },\n\n /**\n * Destroy this File and any references it holds.\n *\n * @method Phaser.Loader.File#destroy\n * @since 3.7.0\n */\n destroy: function ()\n {\n this.loader = null;\n this.cache = null;\n this.xhrSettings = null;\n this.multiFile = null;\n this.linkFile = null;\n this.data = null;\n }\n\n});\n\n/**\n * Static method for creating object URL using URL API and setting it as image 'src' attribute.\n * If URL API is not supported (usually on old browsers) it falls back to creating Base64 encoded url using FileReader.\n *\n * @method Phaser.Loader.File.createObjectURL\n * @static\n * @since 3.7.0\n *\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be set to object URL.\n * @param {Blob} blob - A Blob object to create an object URL for.\n * @param {string} defaultType - Default mime type used if blob type is not available.\n */\nFile.createObjectURL = function (image, blob, defaultType)\n{\n if (typeof URL === 'function')\n {\n image.src = URL.createObjectURL(blob);\n }\n else\n {\n var reader = new FileReader();\n\n reader.onload = function ()\n {\n image.removeAttribute('crossOrigin');\n image.src = 'data:' + (blob.type || defaultType) + ';base64,' + reader.result.split(',')[1];\n };\n\n reader.onerror = image.onerror;\n\n reader.readAsDataURL(blob);\n }\n};\n\n/**\n * Static method for releasing an existing object URL which was previously created\n * by calling {@link File#createObjectURL} method.\n *\n * @method Phaser.Loader.File.revokeObjectURL\n * @static\n * @since 3.7.0\n *\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be revoked.\n */\nFile.revokeObjectURL = function (image)\n{\n if (typeof URL === 'function')\n {\n URL.revokeObjectURL(image.src);\n }\n};\n\nmodule.exports = File;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar types = {};\r\n\r\n/**\r\n * @namespace Phaser.Loader.FileTypesManager\r\n */\r\n\r\nvar FileTypesManager = {\r\n\r\n /**\r\n * Static method called when a LoaderPlugin is created.\r\n * \r\n * Loops through the local types object and injects all of them as\r\n * properties into the LoaderPlugin instance.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.install\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - The LoaderPlugin to install the types into.\r\n */\r\n install: function (loader)\r\n {\r\n for (var key in types)\r\n {\r\n loader[key] = types[key];\r\n }\r\n },\r\n\r\n /**\r\n * Static method called directly by the File Types.\r\n * \r\n * The key is a reference to the function used to load the files via the Loader, i.e. `image`.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.register\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key that will be used as the method name in the LoaderPlugin.\r\n * @param {function} factoryFunction - The function that will be called when LoaderPlugin.key is invoked.\r\n */\r\n register: function (key, factoryFunction)\r\n {\r\n types[key] = factoryFunction;\r\n },\r\n\r\n /**\r\n * Removed all associated file types.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n types = {};\r\n }\r\n\r\n};\r\n\r\nmodule.exports = FileTypesManager;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Given a File and a baseURL value this returns the URL the File will use to download from.\r\n *\r\n * @function Phaser.Loader.GetURL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File object.\r\n * @param {string} baseURL - A default base URL.\r\n *\r\n * @return {string} The URL the File will use.\r\n */\r\nvar GetURL = function (file, baseURL)\r\n{\r\n if (!file.url)\r\n {\r\n return false;\r\n }\r\n\r\n if (file.url.match(/^(?:blob:|data:|http:\\/\\/|https:\\/\\/|\\/\\/)/))\r\n {\r\n return file.url;\r\n }\r\n else\r\n {\r\n return baseURL + file.url;\r\n }\r\n};\r\n\r\nmodule.exports = GetURL;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extend = require('../utils/object/Extend');\r\nvar XHRSettings = require('./XHRSettings');\r\n\r\n/**\r\n * Takes two XHRSettings Objects and creates a new XHRSettings object from them.\r\n *\r\n * The new object is seeded by the values given in the global settings, but any setting in\r\n * the local object overrides the global ones.\r\n *\r\n * @function Phaser.Loader.MergeXHRSettings\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} global - The global XHRSettings object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} local - The local XHRSettings object.\r\n *\r\n * @return {Phaser.Types.Loader.XHRSettingsObject} A newly formed XHRSettings object.\r\n */\r\nvar MergeXHRSettings = function (global, local)\r\n{\r\n var output = (global === undefined) ? XHRSettings() : Extend({}, global);\r\n\r\n if (local)\r\n {\r\n for (var setting in local)\r\n {\r\n if (local[setting] !== undefined)\r\n {\r\n output[setting] = local[setting];\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = MergeXHRSettings;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A MultiFile is a special kind of parent that contains two, or more, Files as children and looks after\r\n * the loading and processing of them all. It is commonly extended and used as a base class for file types such as AtlasJSON or BitmapFont.\r\n * \r\n * You shouldn't create an instance of a MultiFile directly, but should extend it with your own class, setting a custom type and processing methods.\r\n *\r\n * @class MultiFile\r\n * @memberof Phaser.Loader\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\r\n * @param {string} type - The file type string for sorting within the Loader.\r\n * @param {string} key - The key of the file within the loader.\r\n * @param {Phaser.Loader.File[]} files - An array of Files that make-up this MultiFile.\r\n */\r\nvar MultiFile = new Class({\r\n\r\n initialize:\r\n\r\n function MultiFile (loader, type, key, files)\r\n {\r\n /**\r\n * A reference to the Loader that is going to load this file.\r\n *\r\n * @name Phaser.Loader.MultiFile#loader\r\n * @type {Phaser.Loader.LoaderPlugin}\r\n * @since 3.7.0\r\n */\r\n this.loader = loader;\r\n\r\n /**\r\n * The file type string for sorting within the Loader.\r\n *\r\n * @name Phaser.Loader.MultiFile#type\r\n * @type {string}\r\n * @since 3.7.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * Unique cache key (unique within its file type)\r\n *\r\n * @name Phaser.Loader.MultiFile#key\r\n * @type {string}\r\n * @since 3.7.0\r\n */\r\n this.key = key;\r\n\r\n /**\r\n * The current index being used by multi-file loaders to avoid key clashes.\r\n *\r\n * @name Phaser.Loader.MultiFile#multiKeyIndex\r\n * @type {integer}\r\n * @private\r\n * @since 3.20.0\r\n */\r\n this.multiKeyIndex = loader.multiKeyIndex++;\r\n\r\n /**\r\n * Array of files that make up this MultiFile.\r\n *\r\n * @name Phaser.Loader.MultiFile#files\r\n * @type {Phaser.Loader.File[]}\r\n * @since 3.7.0\r\n */\r\n this.files = files;\r\n\r\n /**\r\n * The completion status of this MultiFile.\r\n *\r\n * @name Phaser.Loader.MultiFile#complete\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.7.0\r\n */\r\n this.complete = false;\r\n\r\n /**\r\n * The number of files to load.\r\n *\r\n * @name Phaser.Loader.MultiFile#pending\r\n * @type {integer}\r\n * @since 3.7.0\r\n */\r\n\r\n this.pending = files.length;\r\n\r\n /**\r\n * The number of files that failed to load.\r\n *\r\n * @name Phaser.Loader.MultiFile#failed\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.7.0\r\n */\r\n this.failed = 0;\r\n\r\n /**\r\n * A storage container for transient data that the loading files need.\r\n *\r\n * @name Phaser.Loader.MultiFile#config\r\n * @type {any}\r\n * @since 3.7.0\r\n */\r\n this.config = {};\r\n\r\n /**\r\n * A reference to the Loaders baseURL at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#baseURL\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.baseURL = loader.baseURL;\r\n\r\n /**\r\n * A reference to the Loaders path at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#path\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.path = loader.path;\r\n\r\n /**\r\n * A reference to the Loaders prefix at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#prefix\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.prefix = loader.prefix;\r\n\r\n // Link the files\r\n for (var i = 0; i < files.length; i++)\r\n {\r\n files[i].multiFile = this;\r\n }\r\n },\r\n\r\n /**\r\n * Checks if this MultiFile is ready to process its children or not.\r\n *\r\n * @method Phaser.Loader.MultiFile#isReadyToProcess\r\n * @since 3.7.0\r\n *\r\n * @return {boolean} `true` if all children of this MultiFile have loaded, otherwise `false`.\r\n */\r\n isReadyToProcess: function ()\r\n {\r\n return (this.pending === 0 && this.failed === 0 && !this.complete);\r\n },\r\n\r\n /**\r\n * Adds another child to this MultiFile, increases the pending count and resets the completion status.\r\n *\r\n * @method Phaser.Loader.MultiFile#addToMultiFile\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} files - The File to add to this MultiFile.\r\n *\r\n * @return {Phaser.Loader.MultiFile} This MultiFile instance.\r\n */\r\n addToMultiFile: function (file)\r\n {\r\n this.files.push(file);\r\n\r\n file.multiFile = this;\r\n\r\n this.pending++;\r\n\r\n this.complete = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Called by each File when it finishes loading.\r\n *\r\n * @method Phaser.Loader.MultiFile#onFileComplete\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has completed processing.\r\n */\r\n onFileComplete: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.pending--;\r\n }\r\n },\r\n\r\n /**\r\n * Called by each File that fails to load.\r\n *\r\n * @method Phaser.Loader.MultiFile#onFileFailed\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has failed to load.\r\n */\r\n onFileFailed: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.failed++;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MultiFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MergeXHRSettings = require('./MergeXHRSettings');\r\n\r\n/**\r\n * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings\r\n * and starts the download of it. It uses the Files own XHRSettings and merges them\r\n * with the global XHRSettings object to set the xhr values before download.\r\n *\r\n * @function Phaser.Loader.XHRLoader\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File to download.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} globalXHRSettings - The global XHRSettings object.\r\n *\r\n * @return {XMLHttpRequest} The XHR object.\r\n */\r\nvar XHRLoader = function (file, globalXHRSettings)\r\n{\r\n var config = MergeXHRSettings(globalXHRSettings, file.xhrSettings);\r\n\r\n var xhr = new XMLHttpRequest();\r\n\r\n xhr.open('GET', file.src, config.async, config.user, config.password);\r\n\r\n xhr.responseType = file.xhrSettings.responseType;\r\n xhr.timeout = config.timeout;\r\n\r\n if (config.headers)\r\n {\r\n for (var key in config.headers)\r\n {\r\n xhr.setRequestHeader(key, config.headers[key]);\r\n }\r\n }\r\n\r\n if (config.header && config.headerValue)\r\n {\r\n xhr.setRequestHeader(config.header, config.headerValue);\r\n }\r\n\r\n if (config.requestedWith)\r\n {\r\n xhr.setRequestHeader('X-Requested-With', config.requestedWith);\r\n }\r\n\r\n if (config.overrideMimeType)\r\n {\r\n xhr.overrideMimeType(config.overrideMimeType);\r\n }\r\n\r\n if (config.withCredentials)\r\n {\r\n xhr.withCredentials = true;\r\n }\r\n\r\n // After a successful request, the xhr.response property will contain the requested data as a DOMString, ArrayBuffer, Blob, or Document (depending on what was set for responseType.)\r\n\r\n xhr.onload = file.onLoad.bind(file, xhr);\r\n xhr.onerror = file.onError.bind(file, xhr);\r\n xhr.onprogress = file.onProgress.bind(file);\r\n\r\n // This is the only standard method, the ones above are browser additions (maybe not universal?)\r\n // xhr.onreadystatechange\r\n\r\n xhr.send();\r\n\r\n return xhr;\r\n};\r\n\r\nmodule.exports = XHRLoader;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Creates an XHRSettings Object with default values.\r\n *\r\n * @function Phaser.Loader.XHRSettings\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequestResponseType} [responseType=''] - The responseType, such as 'text'.\r\n * @param {boolean} [async=true] - Should the XHR request use async or not?\r\n * @param {string} [user=''] - Optional username for the XHR request.\r\n * @param {string} [password=''] - Optional password for the XHR request.\r\n * @param {integer} [timeout=0] - Optional XHR timeout value.\r\n * @param {boolean} [withCredentials=false] - Optional XHR withCredentials value.\r\n *\r\n * @return {Phaser.Types.Loader.XHRSettingsObject} The XHRSettings object as used by the Loader.\r\n */\r\nvar XHRSettings = function (responseType, async, user, password, timeout, withCredentials)\r\n{\r\n if (responseType === undefined) { responseType = ''; }\r\n if (async === undefined) { async = true; }\r\n if (user === undefined) { user = ''; }\r\n if (password === undefined) { password = ''; }\r\n if (timeout === undefined) { timeout = 0; }\r\n if (withCredentials === undefined) { withCredentials = false; }\r\n\r\n // Before sending a request, set the xhr.responseType to \"text\",\r\n // \"arraybuffer\", \"blob\", or \"document\", depending on your data needs.\r\n // Note, setting xhr.responseType = '' (or omitting) will default the response to \"text\".\r\n\r\n return {\r\n\r\n // Ignored by the Loader, only used by File.\r\n responseType: responseType,\r\n\r\n async: async,\r\n\r\n // credentials\r\n user: user,\r\n password: password,\r\n\r\n // timeout in ms (0 = no timeout)\r\n timeout: timeout,\r\n\r\n // setRequestHeader\r\n headers: undefined,\r\n header: undefined,\r\n headerValue: undefined,\r\n requestedWith: false,\r\n\r\n // overrideMimeType\r\n overrideMimeType: undefined,\r\n\r\n // withCredentials\r\n withCredentials: withCredentials\r\n\r\n };\r\n};\r\n\r\nmodule.exports = XHRSettings;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FILE_CONST = {\r\n\r\n /**\r\n * The Loader is idle.\r\n * \r\n * @name Phaser.Loader.LOADER_IDLE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_IDLE: 0,\r\n\r\n /**\r\n * The Loader is actively loading.\r\n * \r\n * @name Phaser.Loader.LOADER_LOADING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_LOADING: 1,\r\n\r\n /**\r\n * The Loader is processing files is has loaded.\r\n * \r\n * @name Phaser.Loader.LOADER_PROCESSING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_PROCESSING: 2,\r\n\r\n /**\r\n * The Loader has completed loading and processing.\r\n * \r\n * @name Phaser.Loader.LOADER_COMPLETE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_COMPLETE: 3,\r\n\r\n /**\r\n * The Loader is shutting down.\r\n * \r\n * @name Phaser.Loader.LOADER_SHUTDOWN\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_SHUTDOWN: 4,\r\n\r\n /**\r\n * The Loader has been destroyed.\r\n * \r\n * @name Phaser.Loader.LOADER_DESTROYED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_DESTROYED: 5,\r\n\r\n /**\r\n * File is in the load queue but not yet started\r\n * \r\n * @name Phaser.Loader.FILE_PENDING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_PENDING: 10,\r\n\r\n /**\r\n * File has been started to load by the loader (onLoad called)\r\n * \r\n * @name Phaser.Loader.FILE_LOADING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_LOADING: 11,\r\n\r\n /**\r\n * File has loaded successfully, awaiting processing \r\n * \r\n * @name Phaser.Loader.FILE_LOADED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_LOADED: 12,\r\n\r\n /**\r\n * File failed to load\r\n * \r\n * @name Phaser.Loader.FILE_FAILED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_FAILED: 13,\r\n\r\n /**\r\n * File is being processed (onProcess callback)\r\n * \r\n * @name Phaser.Loader.FILE_PROCESSING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_PROCESSING: 14,\r\n\r\n /**\r\n * The File has errored somehow during processing.\r\n * \r\n * @name Phaser.Loader.FILE_ERRORED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_ERRORED: 16,\r\n\r\n /**\r\n * File has finished processing.\r\n * \r\n * @name Phaser.Loader.FILE_COMPLETE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_COMPLETE: 17,\r\n\r\n /**\r\n * File has been destroyed\r\n * \r\n * @name Phaser.Loader.FILE_DESTROYED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_DESTROYED: 18,\r\n\r\n /**\r\n * File was populated from local data and doesn't need an HTTP request\r\n * \r\n * @name Phaser.Loader.FILE_POPULATED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_POPULATED: 19\r\n\r\n};\r\n\r\nmodule.exports = FILE_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Add File Event.\r\n * \r\n * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('addfile', listener)`.\r\n * \r\n * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them.\r\n *\r\n * @event Phaser.Loader.Events#ADD\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The unique key of the file that was added to the Loader.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} string of the file that was added to the Loader, i.e. `image`.\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n * @param {Phaser.Loader.File} file - A reference to the File which was added to the Loader.\r\n */\r\nmodule.exports = 'addfile';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Complete Event.\r\n * \r\n * This event is dispatched when the Loader has fully processed everything in the load queue.\r\n * By this point every loaded file will now be in its associated cache and ready for use.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('complete', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#COMPLETE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n * @param {integer} totalComplete - The total number of files that successfully loaded.\r\n * @param {integer} totalFailed - The total number of files that failed to load.\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Complete Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`.\r\n * \r\n * You can also listen for the completion of a specific file. See the [FILE_KEY_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_KEY_COMPLETE} event.\r\n *\r\n * @event Phaser.Loader.Events#FILE_COMPLETE\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the file that just loaded and finished processing.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\r\n * @param {any} data - The raw data the file contained.\r\n */\r\nmodule.exports = 'filecomplete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Complete Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.\r\n * \r\n * It uses a special dynamic event name constructed from the key and type of the file.\r\n * \r\n * For example, if you have loaded an `image` with a key of `monster`, you can listen for it\r\n * using the following:\r\n *\r\n * ```javascript\r\n * this.load.on('filecomplete-image-monster', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n *\r\n * Or, if you have loaded a texture `atlas` with a key of `Level1`:\r\n * \r\n * ```javascript\r\n * this.load.on('filecomplete-atlas-Level1', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n * \r\n * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`:\r\n * \r\n * ```javascript\r\n * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n * \r\n * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event.\r\n *\r\n * @event Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the file that just loaded and finished processing.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\r\n * @param {any} data - The raw data the file contained.\r\n */\r\nmodule.exports = 'filecomplete-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Error Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when a file fails to load.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('loaderror', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_LOAD_ERROR\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\r\n */\r\nmodule.exports = 'loaderror';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when a file finishes loading,\r\n * but _before_ it is processed and added to the internal Phaser caches.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('load', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_LOAD\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.File} file - A reference to the File which just finished loading.\r\n */\r\nmodule.exports = 'load';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Progress Event.\r\n * \r\n * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and\r\n * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_PROGRESS\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\r\n * @param {number} percentComplete - A value between 0 and 1 indicating how 'complete' this file is.\r\n */\r\nmodule.exports = 'fileprogress';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Post Process Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue.\r\n * It is dispatched before the internal lists are cleared and each File is destroyed.\r\n * \r\n * Use this hook to perform any last minute processing of files that can only happen once the\r\n * Loader has completed, but prior to it emitting the `complete` event.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('postprocess', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#POST_PROCESS\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n */\r\nmodule.exports = 'postprocess';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Progress Event.\r\n * \r\n * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('progress', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#PROGRESS\r\n * @since 3.0.0\r\n * \r\n * @param {number} progress - The current progress of the load. A value between 0 and 1.\r\n */\r\nmodule.exports = 'progress';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Start Event.\r\n * \r\n * This event is dispatched when the Loader starts running. At this point load progress is zero.\r\n * \r\n * This event is dispatched even if there aren't any files in the load queue.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('start', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#START\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Loader.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADD: require('./ADD_EVENT'),\r\n COMPLETE: require('./COMPLETE_EVENT'),\r\n FILE_COMPLETE: require('./FILE_COMPLETE_EVENT'),\r\n FILE_KEY_COMPLETE: require('./FILE_KEY_COMPLETE_EVENT'),\r\n FILE_LOAD_ERROR: require('./FILE_LOAD_ERROR_EVENT'),\r\n FILE_LOAD: require('./FILE_LOAD_EVENT'),\r\n FILE_PROGRESS: require('./FILE_PROGRESS_EVENT'),\r\n POST_PROCESS: require('./POST_PROCESS_EVENT'),\r\n PROGRESS: require('./PROGRESS_EVENT'),\r\n START: require('./START_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\n\r\n/**\r\n * @classdesc\r\n * A single Image File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#image method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#image.\r\n *\r\n * @class ImageFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. Only provided for, and used by, Sprite Sheets.\r\n */\r\nvar ImageFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function ImageFile (loader, key, url, xhrSettings, frameConfig)\r\n {\r\n var extension = 'png';\r\n var normalMapURL;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n normalMapURL = GetFastValue(config, 'normalMap');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n frameConfig = GetFastValue(config, 'frameConfig');\r\n }\r\n\r\n if (Array.isArray(url))\r\n {\r\n normalMapURL = url[1];\r\n url = url[0];\r\n }\r\n\r\n var fileConfig = {\r\n type: 'image',\r\n cache: loader.textureManager,\r\n extension: extension,\r\n responseType: 'blob',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: frameConfig\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n // Do we have a normal map to load as well?\r\n if (normalMapURL)\r\n {\r\n var normalMap = new ImageFile(loader, this.key, normalMapURL, xhrSettings, frameConfig);\r\n\r\n normalMap.type = 'normalMap';\r\n\r\n this.setLink(normalMap);\r\n\r\n loader.addFile(normalMap);\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = new Image();\r\n\r\n this.data.crossOrigin = this.crossOrigin;\r\n\r\n var _this = this;\r\n\r\n this.data.onload = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessComplete();\r\n };\r\n\r\n this.data.onerror = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessError();\r\n };\r\n\r\n File.createObjectURL(this.data, this.xhrLoader.response, 'image/png');\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n var texture;\r\n var linkFile = this.linkFile;\r\n\r\n if (linkFile && linkFile.state === CONST.FILE_COMPLETE)\r\n {\r\n if (this.type === 'image')\r\n {\r\n texture = this.cache.addImage(this.key, this.data, linkFile.data);\r\n }\r\n else\r\n {\r\n texture = this.cache.addImage(linkFile.key, linkFile.data, this.data);\r\n }\r\n\r\n this.pendingDestroy(texture);\r\n\r\n linkFile.pendingDestroy(texture);\r\n }\r\n else if (!linkFile)\r\n {\r\n texture = this.cache.addImage(this.key, this.data);\r\n\r\n this.pendingDestroy(texture);\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an Image, or array of Images, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.image('logo', 'images/phaserLogo.png');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\r\n * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback\r\n * of animated gifs to Canvas elements.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.image({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.ImageFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:\r\n *\r\n * ```javascript\r\n * this.load.image('logo', 'images/AtariLogo.png');\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'logo');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\r\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\r\n *\r\n * ```javascript\r\n * this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]);\r\n * ```\r\n *\r\n * Or, if you are using a config object use the `normalMap` property:\r\n *\r\n * ```javascript\r\n * this.load.image({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png',\r\n * normalMap: 'images/AtariLogo-n.png'\r\n * });\r\n * ```\r\n *\r\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\r\n * Normal maps are a WebGL only feature.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Image File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#image\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig|Phaser.Types.Loader.FileTypes.ImageFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {this} The Loader instance.\r\n */\r\nFileTypesManager.register('image', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new ImageFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new ImageFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = ImageFile;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar CONST = require('../const');\nvar File = require('../File');\nvar FileTypesManager = require('../FileTypesManager');\nvar GetFastValue = require('../../utils/object/GetFastValue');\nvar GetValue = require('../../utils/object/GetValue');\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\n\n/**\n * @classdesc\n * A single JSON File suitable for loading by the Loader.\n *\n * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly.\n *\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json.\n *\n * @class JSONFile\n * @extends Phaser.Loader.File\n * @memberof Phaser.Loader.FileTypes\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object.\n * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\n */\nvar JSONFile = new Class({\n\n Extends: File,\n\n initialize:\n\n // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object\n // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing\n\n function JSONFile (loader, key, url, xhrSettings, dataKey)\n {\n var extension = 'json';\n\n if (IsPlainObject(key))\n {\n var config = key;\n\n key = GetFastValue(config, 'key');\n url = GetFastValue(config, 'url');\n xhrSettings = GetFastValue(config, 'xhrSettings');\n extension = GetFastValue(config, 'extension', extension);\n dataKey = GetFastValue(config, 'dataKey', dataKey);\n }\n\n var fileConfig = {\n type: 'json',\n cache: loader.cacheManager.json,\n extension: extension,\n responseType: 'text',\n key: key,\n url: url,\n xhrSettings: xhrSettings,\n config: dataKey\n };\n\n File.call(this, loader, fileConfig);\n\n if (IsPlainObject(url))\n {\n // Object provided instead of a URL, so no need to actually load it (populate data with value)\n if (dataKey)\n {\n this.data = GetValue(url, dataKey);\n }\n else\n {\n this.data = url;\n }\n\n this.state = CONST.FILE_POPULATED;\n }\n },\n\n /**\n * Called automatically by Loader.nextFile.\n * This method controls what extra work this File does with its loaded data.\n *\n * @method Phaser.Loader.FileTypes.JSONFile#onProcess\n * @since 3.7.0\n */\n onProcess: function ()\n {\n if (this.state !== CONST.FILE_POPULATED)\n {\n this.state = CONST.FILE_PROCESSING;\n\n var json = JSON.parse(this.xhrLoader.responseText);\n\n var key = this.config;\n\n if (typeof key === 'string')\n {\n this.data = GetValue(json, key, json);\n }\n else\n {\n this.data = json;\n }\n }\n\n this.onProcessComplete();\n }\n\n});\n\n/**\n * Adds a JSON file, or array of JSON files, to the current load queue.\n *\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\n *\n * ```javascript\n * function preload ()\n * {\n * this.load.json('wavedata', 'files/AlienWaveData.json');\n * }\n * ```\n *\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\n * loaded.\n *\n * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.\n * The key should be unique both in terms of files being loaded and files already present in the JSON Cache.\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\n * then remove it from the JSON Cache first, before loading a new one.\n *\n * Instead of passing arguments you can pass a configuration object, such as:\n *\n * ```javascript\n * this.load.json({\n * key: 'wavedata',\n * url: 'files/AlienWaveData.json'\n * });\n * ```\n *\n * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details.\n *\n * Once the file has finished loading you can access it from its Cache using its key:\n *\n * ```javascript\n * this.load.json('wavedata', 'files/AlienWaveData.json');\n * // and later in your game ...\n * var data = this.cache.json.get('wavedata');\n * ```\n *\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\n * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and\n * this is what you would use to retrieve the text from the JSON Cache.\n *\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\n *\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"data\"\n * and no URL is given then the Loader will set the URL to be \"data.json\". It will always add `.json` as the extension, although\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\n *\n * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache,\n * rather than the whole file. For example, if your JSON data had a structure like this:\n *\n * ```json\n * {\n * \"level1\": {\n * \"baddies\": {\n * \"aliens\": {},\n * \"boss\": {}\n * }\n * },\n * \"level2\": {},\n * \"level3\": {}\n * }\n * ```\n *\n * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`.\n *\n * Note: The ability to load this type of file will only be available if the JSON File type has been built into Phaser.\n * It is available in the default build but can be excluded from custom builds.\n *\n * @method Phaser.Loader.LoaderPlugin#json\n * @fires Phaser.Loader.LoaderPlugin#ADD\n * @since 3.0.0\n *\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\n * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\n *\n * @return {this} The Loader instance.\n */\nFileTypesManager.register('json', function (key, url, dataKey, xhrSettings)\n{\n if (Array.isArray(key))\n {\n for (var i = 0; i < key.length; i++)\n {\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\n this.addFile(new JSONFile(this, key[i]));\n }\n }\n else\n {\n this.addFile(new JSONFile(this, key, url, xhrSettings, dataKey));\n }\n\n return this;\n});\n\nmodule.exports = JSONFile;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\n\r\n/**\r\n * @classdesc\r\n * A single Text File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text.\r\n *\r\n * @class TextFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar TextFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function TextFile (loader, key, url, xhrSettings)\r\n {\r\n var extension = 'txt';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'text',\r\n cache: loader.cacheManager.text,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.TextFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = this.xhrLoader.responseText;\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Text file, or array of Text files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.text('story', 'files/IntroStory.txt');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Text Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Text Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Text Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.text({\r\n * key: 'story',\r\n * url: 'files/IntroStory.txt'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.TextFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.text('story', 'files/IntroStory.txt');\r\n * // and later in your game ...\r\n * var data = this.cache.text.get('story');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and\r\n * this is what you would use to retrieve the text from the Text Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"story\"\r\n * and no URL is given then the Loader will set the URL to be \"story.txt\". It will always add `.txt` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Text File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#text\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig|Phaser.Types.Loader.FileTypes.TextFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {this} The Loader instance.\r\n */\r\nFileTypesManager.register('text', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new TextFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new TextFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = TextFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the mean average of the given values.\r\n *\r\n * @function Phaser.Math.Average\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} values - The values to average.\r\n *\r\n * @return {number} The average value.\r\n */\r\nvar Average = function (values)\r\n{\r\n var sum = 0;\r\n\r\n for (var i = 0; i < values.length; i++)\r\n {\r\n sum += (+values[i]);\r\n }\r\n\r\n return sum / values.length;\r\n};\r\n\r\nmodule.exports = Average;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Factorial = require('./Factorial');\r\n\r\n/**\r\n * Calculates the Bernstein basis from the three factorial coefficients.\r\n *\r\n * @function Phaser.Math.Bernstein\r\n * @since 3.0.0\r\n *\r\n * @param {number} n - The first value.\r\n * @param {number} i - The second value.\r\n *\r\n * @return {number} The Bernstein basis of Factorial(n) / Factorial(i) / Factorial(n - i)\r\n */\r\nvar Bernstein = function (n, i)\r\n{\r\n return Factorial(n) / Factorial(i) / Factorial(n - i);\r\n};\r\n\r\nmodule.exports = Bernstein;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random integer between the `min` and `max` values, inclusive.\r\n *\r\n * @function Phaser.Math.Between\r\n * @since 3.0.0\r\n *\r\n * @param {integer} min - The minimum value.\r\n * @param {integer} max - The maximum value.\r\n *\r\n * @return {integer} The random integer.\r\n */\r\nvar Between = function (min, max)\r\n{\r\n return Math.floor(Math.random() * (max - min + 1) + min);\r\n};\r\n\r\nmodule.exports = Between;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates a Catmull-Rom value from the given points, based on an alpha of 0.5.\r\n *\r\n * @function Phaser.Math.CatmullRom\r\n * @since 3.0.0\r\n *\r\n * @param {number} t - The amount to interpolate by.\r\n * @param {number} p0 - The first control point.\r\n * @param {number} p1 - The second control point.\r\n * @param {number} p2 - The third control point.\r\n * @param {number} p3 - The fourth control point.\r\n *\r\n * @return {number} The Catmull-Rom value.\r\n */\r\nvar CatmullRom = function (t, p0, p1, p2, p3)\r\n{\r\n var v0 = (p2 - p0) * 0.5;\r\n var v1 = (p3 - p1) * 0.5;\r\n var t2 = t * t;\r\n var t3 = t * t2;\r\n\r\n return (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1;\r\n};\r\n\r\nmodule.exports = CatmullRom;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Ceils to some place comparative to a `base`, default is 10 for decimal place.\r\n *\r\n * The `place` is represented by the power applied to `base` to get that place.\r\n *\r\n * @function Phaser.Math.CeilTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {number} [place=0] - The place to round to.\r\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar CeilTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.ceil(value * p) / p;\r\n};\r\n\r\nmodule.exports = CeilTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Force a value within the boundaries by clamping it to the range `min`, `max`.\r\n *\r\n * @function Phaser.Math.Clamp\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to be clamped.\r\n * @param {number} min - The minimum bounds.\r\n * @param {number} max - The maximum bounds.\r\n *\r\n * @return {number} The clamped value.\r\n */\r\nvar Clamp = function (value, min, max)\r\n{\r\n return Math.max(min, Math.min(max, value));\r\n};\r\n\r\nmodule.exports = Clamp;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\n\r\n/**\r\n * Convert the given angle from degrees, to the equivalent angle in radians.\r\n *\r\n * @function Phaser.Math.DegToRad\r\n * @since 3.0.0\r\n *\r\n * @param {integer} degrees - The angle (in degrees) to convert to radians.\r\n *\r\n * @return {number} The given angle converted to radians.\r\n */\r\nvar DegToRad = function (degrees)\r\n{\r\n return degrees * CONST.DEG_TO_RAD;\r\n};\r\n\r\nmodule.exports = DegToRad;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the positive difference of two given numbers.\r\n *\r\n * @function Phaser.Math.Difference\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first number in the calculation.\r\n * @param {number} b - The second number in the calculation.\r\n *\r\n * @return {number} The positive difference of the two given numbers.\r\n */\r\nvar Difference = function (a, b)\r\n{\r\n return Math.abs(a - b);\r\n};\r\n\r\nmodule.exports = Difference;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the factorial of a given number for integer values greater than 0.\r\n *\r\n * @function Phaser.Math.Factorial\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - A positive integer to calculate the factorial of.\r\n *\r\n * @return {number} The factorial of the given number.\r\n */\r\nvar Factorial = function (value)\r\n{\r\n if (value === 0)\r\n {\r\n return 1;\r\n }\r\n\r\n var res = value;\r\n\r\n while (--value)\r\n {\r\n res *= value;\r\n }\r\n\r\n return res;\r\n};\r\n\r\nmodule.exports = Factorial;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive.\r\n *\r\n * @function Phaser.Math.FloatBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The lower bound for the float, inclusive.\r\n * @param {number} max - The upper bound for the float exclusive.\r\n *\r\n * @return {number} A random float within the given range.\r\n */\r\nvar FloatBetween = function (min, max)\r\n{\r\n return Math.random() * (max - min) + min;\r\n};\r\n\r\nmodule.exports = FloatBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Floors to some place comparative to a `base`, default is 10 for decimal place.\r\n *\r\n * The `place` is represented by the power applied to `base` to get that place.\r\n *\r\n * @function Phaser.Math.FloorTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {integer} [place=0] - The place to round to.\r\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar FloorTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.floor(value * p) / p;\r\n};\r\n\r\nmodule.exports = FloorTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('./Clamp');\r\n\r\n/**\r\n * Return a value based on the range between `min` and `max` and the percentage given.\r\n *\r\n * @function Phaser.Math.FromPercent\r\n * @since 3.0.0\r\n *\r\n * @param {number} percent - A value between 0 and 1 representing the percentage.\r\n * @param {number} min - The minimum value.\r\n * @param {number} [max] - The maximum value.\r\n *\r\n * @return {number} The value that is `percent` percent between `min` and `max`.\r\n */\r\nvar FromPercent = function (percent, min, max)\r\n{\r\n percent = Clamp(percent, 0, 1);\r\n\r\n return (max - min) * percent;\r\n};\r\n\r\nmodule.exports = FromPercent;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a per-ms speed from a distance and time (given in seconds).\r\n *\r\n * @function Phaser.Math.GetSpeed\r\n * @since 3.0.0\r\n *\r\n * @param {number} distance - The distance.\r\n * @param {integer} time - The time, in seconds.\r\n *\r\n * @return {number} The speed, in distance per ms.\r\n *\r\n * @example\r\n * // 400px over 1 second is 0.4 px/ms\r\n * Phaser.Math.GetSpeed(400, 1) // -> 0.4\r\n */\r\nvar GetSpeed = function (distance, time)\r\n{\r\n return (distance / time) / 1000;\r\n};\r\n\r\nmodule.exports = GetSpeed;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if a given value is an even number.\r\n *\r\n * @function Phaser.Math.IsEven\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to perform the check with.\r\n *\r\n * @return {boolean} Whether the number is even or not.\r\n */\r\nvar IsEven = function (value)\r\n{\r\n // Use abstract equality == for \"is number\" test\r\n\r\n // eslint-disable-next-line eqeqeq\r\n return (value == parseFloat(value)) ? !(value % 2) : void 0;\r\n};\r\n\r\nmodule.exports = IsEven;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if a given value is an even number using a strict type check.\r\n *\r\n * @function Phaser.Math.IsEvenStrict\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to perform the check with.\r\n *\r\n * @return {boolean} Whether the number is even or not.\r\n */\r\nvar IsEvenStrict = function (value)\r\n{\r\n // Use strict equality === for \"is number\" test\r\n return (value === parseFloat(value)) ? !(value % 2) : void 0;\r\n};\r\n\r\nmodule.exports = IsEvenStrict;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates a linear (interpolation) value over t.\r\n *\r\n * @function Phaser.Math.Linear\r\n * @since 3.0.0\r\n *\r\n * @param {number} p0 - The first point.\r\n * @param {number} p1 - The second point.\r\n * @param {number} t - The percentage between p0 and p1 to return, represented as a number between 0 and 1.\r\n *\r\n * @return {number} The step t% of the way between p0 and p1.\r\n */\r\nvar Linear = function (p0, p1, t)\r\n{\r\n return (p1 - p0) * t + p0;\r\n};\r\n\r\nmodule.exports = Linear;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A three-dimensional matrix.\r\n *\r\n * Defaults to the identity matrix when instantiated.\r\n *\r\n * @class Matrix3\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} [m] - Optional Matrix3 to copy values from.\r\n */\r\nvar Matrix3 = new Class({\r\n\r\n initialize:\r\n\r\n function Matrix3 (m)\r\n {\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.Math.Matrix3#val\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.val = new Float32Array(9);\r\n\r\n if (m)\r\n {\r\n // Assume Matrix3 with val:\r\n this.copy(m);\r\n }\r\n else\r\n {\r\n // Default to identity\r\n this.identity();\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Matrix3.\r\n *\r\n * @method Phaser.Math.Matrix3#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} A clone of this Matrix3.\r\n */\r\n clone: function ()\r\n {\r\n return new Matrix3(this);\r\n },\r\n\r\n /**\r\n * This method is an alias for `Matrix3.copy`.\r\n *\r\n * @method Phaser.Math.Matrix3#set\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to set the values of this Matrix's from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n set: function (src)\r\n {\r\n return this.copy(src);\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix into this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n copy: function (src)\r\n {\r\n var out = this.val;\r\n var a = src.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix4 into this Matrix3.\r\n *\r\n * @method Phaser.Math.Matrix3#fromMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromMat4: function (m)\r\n {\r\n var a = m.val;\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[4];\r\n out[4] = a[5];\r\n out[5] = a[6];\r\n out[6] = a[8];\r\n out[7] = a[9];\r\n out[8] = a[10];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given array.\r\n *\r\n * @method Phaser.Math.Matrix3#fromArray\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The array to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromArray: function (a)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n identity: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 1;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 1;\r\n out[5] = 0;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transpose this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#transpose\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n transpose: function ()\r\n {\r\n var a = this.val;\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a12 = a[5];\r\n\r\n a[1] = a[3];\r\n a[2] = a[6];\r\n a[3] = a01;\r\n a[5] = a[7];\r\n a[6] = a02;\r\n a[7] = a12;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n invert: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n var b01 = a22 * a11 - a12 * a21;\r\n var b11 = -a22 * a10 + a12 * a20;\r\n var b21 = a21 * a10 - a11 * a20;\r\n\r\n // Calculate the determinant\r\n var det = a00 * b01 + a01 * b11 + a02 * b21;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n a[0] = b01 * det;\r\n a[1] = (-a22 * a01 + a02 * a21) * det;\r\n a[2] = (a12 * a01 - a02 * a11) * det;\r\n a[3] = b11 * det;\r\n a[4] = (a22 * a00 - a02 * a20) * det;\r\n a[5] = (-a12 * a00 + a02 * a10) * det;\r\n a[6] = b21 * det;\r\n a[7] = (-a21 * a00 + a01 * a20) * det;\r\n a[8] = (a11 * a00 - a01 * a10) * det;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the adjoint, or adjugate, of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#adjoint\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n adjoint: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n a[0] = (a11 * a22 - a12 * a21);\r\n a[1] = (a02 * a21 - a01 * a22);\r\n a[2] = (a01 * a12 - a02 * a11);\r\n a[3] = (a12 * a20 - a10 * a22);\r\n a[4] = (a00 * a22 - a02 * a20);\r\n a[5] = (a02 * a10 - a00 * a12);\r\n a[6] = (a10 * a21 - a11 * a20);\r\n a[7] = (a01 * a20 - a00 * a21);\r\n a[8] = (a00 * a11 - a01 * a10);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the determinant of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#determinant\r\n * @since 3.0.0\r\n *\r\n * @return {number} The determinant of this Matrix.\r\n */\r\n determinant: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to multiply this Matrix by.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n multiply: function (src)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n var b = src.val;\r\n\r\n var b00 = b[0];\r\n var b01 = b[1];\r\n var b02 = b[2];\r\n var b10 = b[3];\r\n var b11 = b[4];\r\n var b12 = b[5];\r\n var b20 = b[6];\r\n var b21 = b[7];\r\n var b22 = b[8];\r\n\r\n a[0] = b00 * a00 + b01 * a10 + b02 * a20;\r\n a[1] = b00 * a01 + b01 * a11 + b02 * a21;\r\n a[2] = b00 * a02 + b01 * a12 + b02 * a22;\r\n\r\n a[3] = b10 * a00 + b11 * a10 + b12 * a20;\r\n a[4] = b10 * a01 + b11 * a11 + b12 * a21;\r\n a[5] = b10 * a02 + b11 * a12 + b12 * a22;\r\n\r\n a[6] = b20 * a00 + b21 * a10 + b22 * a20;\r\n a[7] = b20 * a01 + b21 * a11 + b22 * a21;\r\n a[8] = b20 * a02 + b21 * a12 + b22 * a22;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given Vector.\r\n *\r\n * @method Phaser.Math.Matrix3#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n translate: function (v)\r\n {\r\n var a = this.val;\r\n var x = v.x;\r\n var y = v.y;\r\n\r\n a[6] = x * a[0] + y * a[3] + a[6];\r\n a[7] = x * a[1] + y * a[4] + a[7];\r\n a[8] = x * a[2] + y * a[5] + a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a rotation transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n rotate: function (rad)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n a[0] = c * a00 + s * a10;\r\n a[1] = c * a01 + s * a11;\r\n a[2] = c * a02 + s * a12;\r\n\r\n a[3] = c * a10 - s * a00;\r\n a[4] = c * a11 - s * a01;\r\n a[5] = c * a12 - s * a02;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * Uses the `x` and `y` components of the given Vector to scale the Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#scale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n scale: function (v)\r\n {\r\n var a = this.val;\r\n var x = v.x;\r\n var y = v.y;\r\n\r\n a[0] = x * a[0];\r\n a[1] = x * a[1];\r\n a[2] = x * a[2];\r\n\r\n a[3] = y * a[3];\r\n a[4] = y * a[4];\r\n a[5] = y * a[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given Quaternion.\r\n *\r\n * @method Phaser.Math.Matrix3#fromQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromQuat: function (q)\r\n {\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n var out = this.val;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[3] = xy + wz;\r\n out[6] = xz - wy;\r\n\r\n out[1] = xy - wz;\r\n out[4] = 1 - (xx + zz);\r\n out[7] = yz + wx;\r\n\r\n out[2] = xz + wy;\r\n out[5] = yz - wx;\r\n out[8] = 1 - (xx + yy);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix3 to be normalized from the given Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix3#normalFromMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to normalize the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n normalFromMat4: function (m)\r\n {\r\n var a = m.val;\r\n var out = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\r\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\r\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\r\n\r\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\r\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\r\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\r\n\r\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\r\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\r\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Matrix3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\nvar EPSILON = 0.000001;\r\n\r\n/**\r\n * @classdesc\r\n * A four-dimensional matrix.\r\n *\r\n * @class Matrix4\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} [m] - Optional Matrix4 to copy values from.\r\n */\r\nvar Matrix4 = new Class({\r\n\r\n initialize:\r\n\r\n function Matrix4 (m)\r\n {\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.Math.Matrix4#val\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.val = new Float32Array(16);\r\n\r\n if (m)\r\n {\r\n // Assume Matrix4 with val:\r\n this.copy(m);\r\n }\r\n else\r\n {\r\n // Default to identity\r\n this.identity();\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} A clone of this Matrix4.\r\n */\r\n clone: function ()\r\n {\r\n return new Matrix4(this);\r\n },\r\n\r\n // TODO - Should work with basic values\r\n\r\n /**\r\n * This method is an alias for `Matrix4.copy`.\r\n *\r\n * @method Phaser.Math.Matrix4#set\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to set the values of this Matrix's from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n set: function (src)\r\n {\r\n return this.copy(src);\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix into this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n copy: function (src)\r\n {\r\n var out = this.val;\r\n var a = src.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n out[9] = a[9];\r\n out[10] = a[10];\r\n out[11] = a[11];\r\n out[12] = a[12];\r\n out[13] = a[13];\r\n out[14] = a[14];\r\n out[15] = a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given array.\r\n *\r\n * @method Phaser.Math.Matrix4#fromArray\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The array to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n fromArray: function (a)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n out[9] = a[9];\r\n out[10] = a[10];\r\n out[11] = a[11];\r\n out[12] = a[12];\r\n out[13] = a[13];\r\n out[14] = a[14];\r\n out[15] = a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix.\r\n *\r\n * Sets all values to `0`.\r\n *\r\n * @method Phaser.Math.Matrix4#zero\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n zero: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 0;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 0;\r\n out[5] = 0;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = 0;\r\n out[11] = 0;\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = 0;\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x`, `y` and `z` values of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#xyz\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {number} z - The z value.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n xyz: function (x, y, z)\r\n {\r\n this.identity();\r\n\r\n var out = this.val;\r\n\r\n out[12] = x;\r\n out[13] = y;\r\n out[14] = z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the scaling values of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scaling\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x scaling value.\r\n * @param {number} y - The y scaling value.\r\n * @param {number} z - The z scaling value.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n scaling: function (x, y, z)\r\n {\r\n this.zero();\r\n\r\n var out = this.val;\r\n\r\n out[0] = x;\r\n out[5] = y;\r\n out[10] = z;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n identity: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 1;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 0;\r\n out[5] = 1;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = 1;\r\n out[11] = 0;\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = 0;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transpose this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#transpose\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n transpose: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n var a23 = a[11];\r\n\r\n a[1] = a[4];\r\n a[2] = a[8];\r\n a[3] = a[12];\r\n a[4] = a01;\r\n a[6] = a[9];\r\n a[7] = a[13];\r\n a[8] = a02;\r\n a[9] = a12;\r\n a[11] = a[14];\r\n a[12] = a03;\r\n a[13] = a13;\r\n a[14] = a23;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n invert: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n a[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\r\n a[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\r\n a[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\r\n a[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\r\n a[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\r\n a[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\r\n a[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\r\n a[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\r\n a[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\r\n a[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\r\n a[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\r\n a[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\r\n a[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\r\n a[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\r\n a[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\r\n a[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the adjoint, or adjugate, of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#adjoint\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n adjoint: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n a[0] = (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22));\r\n a[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));\r\n a[2] = (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12));\r\n a[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));\r\n a[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));\r\n a[5] = (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22));\r\n a[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));\r\n a[7] = (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12));\r\n a[8] = (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21));\r\n a[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));\r\n a[10] = (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11));\r\n a[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));\r\n a[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));\r\n a[13] = (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21));\r\n a[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));\r\n a[15] = (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the determinant of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#determinant\r\n * @since 3.0.0\r\n *\r\n * @return {number} The determinant of this Matrix.\r\n */\r\n determinant: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to multiply this Matrix by.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n multiply: function (src)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b = src.val;\r\n\r\n // Cache only the current line of the second matrix\r\n var b0 = b[0];\r\n var b1 = b[1];\r\n var b2 = b[2];\r\n var b3 = b[3];\r\n\r\n a[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[4];\r\n b1 = b[5];\r\n b2 = b[6];\r\n b3 = b[7];\r\n\r\n a[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[8];\r\n b1 = b[9];\r\n b2 = b[10];\r\n b3 = b[11];\r\n\r\n a[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[12];\r\n b1 = b[13];\r\n b2 = b[14];\r\n b3 = b[15];\r\n\r\n a[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply the values of this Matrix4 by those given in the `src` argument.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyLocal\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The source Matrix4 that this Matrix4 is multiplied by.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n multiplyLocal: function (src)\r\n {\r\n var a = [];\r\n var m1 = this.val;\r\n var m2 = src.val;\r\n\r\n a[0] = m1[0] * m2[0] + m1[1] * m2[4] + m1[2] * m2[8] + m1[3] * m2[12];\r\n a[1] = m1[0] * m2[1] + m1[1] * m2[5] + m1[2] * m2[9] + m1[3] * m2[13];\r\n a[2] = m1[0] * m2[2] + m1[1] * m2[6] + m1[2] * m2[10] + m1[3] * m2[14];\r\n a[3] = m1[0] * m2[3] + m1[1] * m2[7] + m1[2] * m2[11] + m1[3] * m2[15];\r\n\r\n a[4] = m1[4] * m2[0] + m1[5] * m2[4] + m1[6] * m2[8] + m1[7] * m2[12];\r\n a[5] = m1[4] * m2[1] + m1[5] * m2[5] + m1[6] * m2[9] + m1[7] * m2[13];\r\n a[6] = m1[4] * m2[2] + m1[5] * m2[6] + m1[6] * m2[10] + m1[7] * m2[14];\r\n a[7] = m1[4] * m2[3] + m1[5] * m2[7] + m1[6] * m2[11] + m1[7] * m2[15];\r\n\r\n a[8] = m1[8] * m2[0] + m1[9] * m2[4] + m1[10] * m2[8] + m1[11] * m2[12];\r\n a[9] = m1[8] * m2[1] + m1[9] * m2[5] + m1[10] * m2[9] + m1[11] * m2[13];\r\n a[10] = m1[8] * m2[2] + m1[9] * m2[6] + m1[10] * m2[10] + m1[11] * m2[14];\r\n a[11] = m1[8] * m2[3] + m1[9] * m2[7] + m1[10] * m2[11] + m1[11] * m2[15];\r\n\r\n a[12] = m1[12] * m2[0] + m1[13] * m2[4] + m1[14] * m2[8] + m1[15] * m2[12];\r\n a[13] = m1[12] * m2[1] + m1[13] * m2[5] + m1[14] * m2[9] + m1[15] * m2[13];\r\n a[14] = m1[12] * m2[2] + m1[13] * m2[6] + m1[14] * m2[10] + m1[15] * m2[14];\r\n a[15] = m1[12] * m2[3] + m1[13] * m2[7] + m1[14] * m2[11] + m1[15] * m2[15];\r\n\r\n return this.fromArray(a);\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given Vector.\r\n *\r\n * @method Phaser.Math.Matrix4#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n translate: function (v)\r\n {\r\n var x = v.x;\r\n var y = v.y;\r\n var z = v.z;\r\n var a = this.val;\r\n\r\n a[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\r\n a[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\r\n a[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\r\n a[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given values.\r\n *\r\n * @method Phaser.Math.Matrix4#translateXYZ\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n translateXYZ: function (x, y, z)\r\n {\r\n var a = this.val;\r\n\r\n a[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\r\n a[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\r\n a[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\r\n a[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * Uses the `x`, `y` and `z` components of the given Vector to scale the Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n scale: function (v)\r\n {\r\n var x = v.x;\r\n var y = v.y;\r\n var z = v.z;\r\n var a = this.val;\r\n\r\n a[0] = a[0] * x;\r\n a[1] = a[1] * x;\r\n a[2] = a[2] * x;\r\n a[3] = a[3] * x;\r\n\r\n a[4] = a[4] * y;\r\n a[5] = a[5] * y;\r\n a[6] = a[6] * y;\r\n a[7] = a[7] * y;\r\n\r\n a[8] = a[8] * z;\r\n a[9] = a[9] * z;\r\n a[10] = a[10] * z;\r\n a[11] = a[11] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scaleXYZ\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n scaleXYZ: function (x, y, z)\r\n {\r\n var a = this.val;\r\n\r\n a[0] = a[0] * x;\r\n a[1] = a[1] * x;\r\n a[2] = a[2] * x;\r\n a[3] = a[3] * x;\r\n\r\n a[4] = a[4] * y;\r\n a[5] = a[5] * y;\r\n a[6] = a[6] * y;\r\n a[7] = a[7] * y;\r\n\r\n a[8] = a[8] * z;\r\n a[9] = a[9] * z;\r\n a[10] = a[10] * z;\r\n a[11] = a[11] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Derive a rotation matrix around the given axis.\r\n *\r\n * @method Phaser.Math.Matrix4#makeRotationAxis\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} axis - The rotation axis.\r\n * @param {number} angle - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n makeRotationAxis: function (axis, angle)\r\n {\r\n // Based on http://www.gamedev.net/reference/articles/article1199.asp\r\n\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n var t = 1 - c;\r\n var x = axis.x;\r\n var y = axis.y;\r\n var z = axis.z;\r\n var tx = t * x;\r\n var ty = t * y;\r\n\r\n this.fromArray([\r\n tx * x + c, tx * y - s * z, tx * z + s * y, 0,\r\n tx * y + s * z, ty * y + c, ty * z - s * x, 0,\r\n tx * z - s * y, ty * z + s * x, t * z * z + c, 0,\r\n 0, 0, 0, 1\r\n ]);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a rotation transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n * @param {Phaser.Math.Vector3} axis - The axis to rotate upon.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotate: function (rad, axis)\r\n {\r\n var a = this.val;\r\n var x = axis.x;\r\n var y = axis.y;\r\n var z = axis.z;\r\n var len = Math.sqrt(x * x + y * y + z * z);\r\n\r\n if (Math.abs(len) < EPSILON)\r\n {\r\n return null;\r\n }\r\n\r\n len = 1 / len;\r\n x *= len;\r\n y *= len;\r\n z *= len;\r\n\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n var t = 1 - c;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Construct the elements of the rotation matrix\r\n var b00 = x * x * t + c;\r\n var b01 = y * x * t + z * s;\r\n var b02 = z * x * t - y * s;\r\n\r\n var b10 = x * y * t - z * s;\r\n var b11 = y * y * t + c;\r\n var b12 = z * y * t + x * s;\r\n\r\n var b20 = x * z * t + y * s;\r\n var b21 = y * z * t - x * s;\r\n var b22 = z * z * t + c;\r\n\r\n // Perform rotation-specific matrix multiplication\r\n a[0] = a00 * b00 + a10 * b01 + a20 * b02;\r\n a[1] = a01 * b00 + a11 * b01 + a21 * b02;\r\n a[2] = a02 * b00 + a12 * b01 + a22 * b02;\r\n a[3] = a03 * b00 + a13 * b01 + a23 * b02;\r\n a[4] = a00 * b10 + a10 * b11 + a20 * b12;\r\n a[5] = a01 * b10 + a11 * b11 + a21 * b12;\r\n a[6] = a02 * b10 + a12 * b11 + a22 * b12;\r\n a[7] = a03 * b10 + a13 * b11 + a23 * b12;\r\n a[8] = a00 * b20 + a10 * b21 + a20 * b22;\r\n a[9] = a01 * b20 + a11 * b21 + a21 * b22;\r\n a[10] = a02 * b20 + a12 * b21 + a22 * b22;\r\n a[11] = a03 * b20 + a13 * b21 + a23 * b22;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its X axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotateX: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[4] = a10 * c + a20 * s;\r\n a[5] = a11 * c + a21 * s;\r\n a[6] = a12 * c + a22 * s;\r\n a[7] = a13 * c + a23 * s;\r\n a[8] = a20 * c - a10 * s;\r\n a[9] = a21 * c - a11 * s;\r\n a[10] = a22 * c - a12 * s;\r\n a[11] = a23 * c - a13 * s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its Y axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle to rotate by, in radians.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotateY: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[0] = a00 * c - a20 * s;\r\n a[1] = a01 * c - a21 * s;\r\n a[2] = a02 * c - a22 * s;\r\n a[3] = a03 * c - a23 * s;\r\n a[8] = a00 * s + a20 * c;\r\n a[9] = a01 * s + a21 * c;\r\n a[10] = a02 * s + a22 * c;\r\n a[11] = a03 * s + a23 * c;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its Z axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle to rotate by, in radians.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotateZ: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[0] = a00 * c + a10 * s;\r\n a[1] = a01 * c + a11 * s;\r\n a[2] = a02 * c + a12 * s;\r\n a[3] = a03 * c + a13 * s;\r\n a[4] = a10 * c - a00 * s;\r\n a[5] = a11 * c - a01 * s;\r\n a[6] = a12 * c - a02 * s;\r\n a[7] = a13 * c - a03 * s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given rotation Quaternion and translation Vector.\r\n *\r\n * @method Phaser.Math.Matrix4#fromRotationTranslation\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set rotation from.\r\n * @param {Phaser.Math.Vector3} v - The Vector to set translation from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n fromRotationTranslation: function (q, v)\r\n {\r\n // Quaternion math\r\n var out = this.val;\r\n\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[1] = xy + wz;\r\n out[2] = xz - wy;\r\n out[3] = 0;\r\n\r\n out[4] = xy - wz;\r\n out[5] = 1 - (xx + zz);\r\n out[6] = yz + wx;\r\n out[7] = 0;\r\n\r\n out[8] = xz + wy;\r\n out[9] = yz - wx;\r\n out[10] = 1 - (xx + yy);\r\n out[11] = 0;\r\n\r\n out[12] = v.x;\r\n out[13] = v.y;\r\n out[14] = v.z;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given Quaternion.\r\n *\r\n * @method Phaser.Math.Matrix4#fromQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n fromQuat: function (q)\r\n {\r\n var out = this.val;\r\n\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[1] = xy + wz;\r\n out[2] = xz - wy;\r\n out[3] = 0;\r\n\r\n out[4] = xy - wz;\r\n out[5] = 1 - (xx + zz);\r\n out[6] = yz + wx;\r\n out[7] = 0;\r\n\r\n out[8] = xz + wy;\r\n out[9] = yz - wx;\r\n out[10] = 1 - (xx + yy);\r\n out[11] = 0;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = 0;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a frustum matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#frustum\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left bound of the frustum.\r\n * @param {number} right - The right bound of the frustum.\r\n * @param {number} bottom - The bottom bound of the frustum.\r\n * @param {number} top - The top bound of the frustum.\r\n * @param {number} near - The near bound of the frustum.\r\n * @param {number} far - The far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n frustum: function (left, right, bottom, top, near, far)\r\n {\r\n var out = this.val;\r\n\r\n var rl = 1 / (right - left);\r\n var tb = 1 / (top - bottom);\r\n var nf = 1 / (near - far);\r\n\r\n out[0] = (near * 2) * rl;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = (near * 2) * tb;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = (right + left) * rl;\r\n out[9] = (top + bottom) * tb;\r\n out[10] = (far + near) * nf;\r\n out[11] = -1;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = (far * near * 2) * nf;\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a perspective projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#perspective\r\n * @since 3.0.0\r\n *\r\n * @param {number} fovy - Vertical field of view in radians\r\n * @param {number} aspect - Aspect ratio. Typically viewport width /height.\r\n * @param {number} near - Near bound of the frustum.\r\n * @param {number} far - Far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n perspective: function (fovy, aspect, near, far)\r\n {\r\n var out = this.val;\r\n var f = 1.0 / Math.tan(fovy / 2);\r\n var nf = 1 / (near - far);\r\n\r\n out[0] = f / aspect;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = f;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = (far + near) * nf;\r\n out[11] = -1;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = (2 * far * near) * nf;\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a perspective projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#perspectiveLH\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of the frustum.\r\n * @param {number} height - The height of the frustum.\r\n * @param {number} near - Near bound of the frustum.\r\n * @param {number} far - Far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n perspectiveLH: function (width, height, near, far)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = (2 * near) / width;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = (2 * near) / height;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = -far / (near - far);\r\n out[11] = 1;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = (near * far) / (near - far);\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate an orthogonal projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#ortho\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left bound of the frustum.\r\n * @param {number} right - The right bound of the frustum.\r\n * @param {number} bottom - The bottom bound of the frustum.\r\n * @param {number} top - The top bound of the frustum.\r\n * @param {number} near - The near bound of the frustum.\r\n * @param {number} far - The far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n ortho: function (left, right, bottom, top, near, far)\r\n {\r\n var out = this.val;\r\n var lr = left - right;\r\n var bt = bottom - top;\r\n var nf = near - far;\r\n\r\n // Avoid division by zero\r\n lr = (lr === 0) ? lr : 1 / lr;\r\n bt = (bt === 0) ? bt : 1 / bt;\r\n nf = (nf === 0) ? nf : 1 / nf;\r\n\r\n out[0] = -2 * lr;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = -2 * bt;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = 2 * nf;\r\n out[11] = 0;\r\n\r\n out[12] = (left + right) * lr;\r\n out[13] = (top + bottom) * bt;\r\n out[14] = (far + near) * nf;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a look-at matrix with the given eye position, focal point, and up axis.\r\n *\r\n * @method Phaser.Math.Matrix4#lookAt\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} eye - Position of the viewer\r\n * @param {Phaser.Math.Vector3} center - Point the viewer is looking at\r\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n lookAt: function (eye, center, up)\r\n {\r\n var out = this.val;\r\n\r\n var eyex = eye.x;\r\n var eyey = eye.y;\r\n var eyez = eye.z;\r\n\r\n var upx = up.x;\r\n var upy = up.y;\r\n var upz = up.z;\r\n\r\n var centerx = center.x;\r\n var centery = center.y;\r\n var centerz = center.z;\r\n\r\n if (Math.abs(eyex - centerx) < EPSILON &&\r\n Math.abs(eyey - centery) < EPSILON &&\r\n Math.abs(eyez - centerz) < EPSILON)\r\n {\r\n return this.identity();\r\n }\r\n\r\n var z0 = eyex - centerx;\r\n var z1 = eyey - centery;\r\n var z2 = eyez - centerz;\r\n\r\n var len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);\r\n\r\n z0 *= len;\r\n z1 *= len;\r\n z2 *= len;\r\n\r\n var x0 = upy * z2 - upz * z1;\r\n var x1 = upz * z0 - upx * z2;\r\n var x2 = upx * z1 - upy * z0;\r\n\r\n len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);\r\n\r\n if (!len)\r\n {\r\n x0 = 0;\r\n x1 = 0;\r\n x2 = 0;\r\n }\r\n else\r\n {\r\n len = 1 / len;\r\n x0 *= len;\r\n x1 *= len;\r\n x2 *= len;\r\n }\r\n\r\n var y0 = z1 * x2 - z2 * x1;\r\n var y1 = z2 * x0 - z0 * x2;\r\n var y2 = z0 * x1 - z1 * x0;\r\n\r\n len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);\r\n\r\n if (!len)\r\n {\r\n y0 = 0;\r\n y1 = 0;\r\n y2 = 0;\r\n }\r\n else\r\n {\r\n len = 1 / len;\r\n y0 *= len;\r\n y1 *= len;\r\n y2 *= len;\r\n }\r\n\r\n out[0] = x0;\r\n out[1] = y0;\r\n out[2] = z0;\r\n out[3] = 0;\r\n\r\n out[4] = x1;\r\n out[5] = y1;\r\n out[6] = z1;\r\n out[7] = 0;\r\n\r\n out[8] = x2;\r\n out[9] = y2;\r\n out[10] = z2;\r\n out[11] = 0;\r\n\r\n out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\r\n out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\r\n out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this matrix from the given `yaw`, `pitch` and `roll` values.\r\n *\r\n * @method Phaser.Math.Matrix4#yawPitchRoll\r\n * @since 3.0.0\r\n *\r\n * @param {number} yaw - The yaw value.\r\n * @param {number} pitch - The pitch value.\r\n * @param {number} roll - The roll value.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n yawPitchRoll: function (yaw, pitch, roll)\r\n {\r\n this.zero();\r\n _tempMat1.zero();\r\n _tempMat2.zero();\r\n\r\n var m0 = this.val;\r\n var m1 = _tempMat1.val;\r\n var m2 = _tempMat2.val;\r\n\r\n // Rotate Z\r\n var s = Math.sin(roll);\r\n var c = Math.cos(roll);\r\n\r\n m0[10] = 1;\r\n m0[15] = 1;\r\n m0[0] = c;\r\n m0[1] = s;\r\n m0[4] = -s;\r\n m0[5] = c;\r\n\r\n // Rotate X\r\n s = Math.sin(pitch);\r\n c = Math.cos(pitch);\r\n\r\n m1[0] = 1;\r\n m1[15] = 1;\r\n m1[5] = c;\r\n m1[10] = c;\r\n m1[9] = -s;\r\n m1[6] = s;\r\n\r\n // Rotate Y\r\n s = Math.sin(yaw);\r\n c = Math.cos(yaw);\r\n\r\n m2[5] = 1;\r\n m2[15] = 1;\r\n m2[0] = c;\r\n m2[2] = -s;\r\n m2[8] = s;\r\n m2[10] = c;\r\n\r\n this.multiplyLocal(_tempMat1);\r\n this.multiplyLocal(_tempMat2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a world matrix from the given rotation, position, scale, view matrix and projection matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#setWorldMatrix\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} rotation - The rotation of the world matrix.\r\n * @param {Phaser.Math.Vector3} position - The position of the world matrix.\r\n * @param {Phaser.Math.Vector3} scale - The scale of the world matrix.\r\n * @param {Phaser.Math.Matrix4} [viewMatrix] - The view matrix.\r\n * @param {Phaser.Math.Matrix4} [projectionMatrix] - The projection matrix.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n setWorldMatrix: function (rotation, position, scale, viewMatrix, projectionMatrix)\r\n {\r\n this.yawPitchRoll(rotation.y, rotation.x, rotation.z);\r\n\r\n _tempMat1.scaling(scale.x, scale.y, scale.z);\r\n _tempMat2.xyz(position.x, position.y, position.z);\r\n\r\n this.multiplyLocal(_tempMat1);\r\n this.multiplyLocal(_tempMat2);\r\n\r\n if (viewMatrix !== undefined)\r\n {\r\n this.multiplyLocal(viewMatrix);\r\n }\r\n\r\n if (projectionMatrix !== undefined)\r\n {\r\n this.multiplyLocal(projectionMatrix);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nvar _tempMat1 = new Matrix4();\r\nvar _tempMat2 = new Matrix4();\r\n\r\nmodule.exports = Matrix4;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Add an `amount` to a `value`, limiting the maximum result to `max`.\r\n *\r\n * @function Phaser.Math.MaxAdd\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to add to.\r\n * @param {number} amount - The amount to add.\r\n * @param {number} max - The maximum value to return.\r\n *\r\n * @return {number} The resulting value.\r\n */\r\nvar MaxAdd = function (value, amount, max)\r\n{\r\n return Math.min(value + amount, max);\r\n};\r\n\r\nmodule.exports = MaxAdd;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Subtract an `amount` from `value`, limiting the minimum result to `min`.\r\n *\r\n * @function Phaser.Math.MinSub\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to subtract from.\r\n * @param {number} amount - The amount to subtract.\r\n * @param {number} min - The minimum value to return.\r\n *\r\n * @return {number} The resulting value.\r\n */\r\nvar MinSub = function (value, amount, min)\r\n{\r\n return Math.max(value - amount, min);\r\n};\r\n\r\nmodule.exports = MinSub;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Work out what percentage `value` is of the range between `min` and `max`.\r\n * If `max` isn't given then it will return the percentage of `value` to `min`.\r\n *\r\n * You can optionally specify an `upperMax` value, which is a mid-way point in the range that represents 100%, after which the % starts to go down to zero again.\r\n *\r\n * @function Phaser.Math.Percent\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to determine the percentage of.\r\n * @param {number} min - The minimum value.\r\n * @param {number} [max] - The maximum value.\r\n * @param {number} [upperMax] - The mid-way point in the range that represents 100%.\r\n *\r\n * @return {number} A value between 0 and 1 representing the percentage.\r\n */\r\nvar Percent = function (value, min, max, upperMax)\r\n{\r\n if (max === undefined) { max = min + 1; }\r\n\r\n var percentage = (value - min) / (max - min);\r\n\r\n if (percentage > 1)\r\n {\r\n if (upperMax !== undefined)\r\n {\r\n percentage = ((upperMax - value)) / (upperMax - max);\r\n\r\n if (percentage < 0)\r\n {\r\n percentage = 0;\r\n }\r\n }\r\n else\r\n {\r\n percentage = 1;\r\n }\r\n }\r\n else if (percentage < 0)\r\n {\r\n percentage = 0;\r\n }\r\n\r\n return percentage;\r\n};\r\n\r\nmodule.exports = Percent;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\nvar Vector3 = require('./Vector3');\r\nvar Matrix3 = require('./Matrix3');\r\n\r\nvar EPSILON = 0.000001;\r\n\r\n// Some shared 'private' arrays\r\nvar siNext = new Int8Array([ 1, 2, 0 ]);\r\nvar tmp = new Float32Array([ 0, 0, 0 ]);\r\n\r\nvar xUnitVec3 = new Vector3(1, 0, 0);\r\nvar yUnitVec3 = new Vector3(0, 1, 0);\r\n\r\nvar tmpvec = new Vector3();\r\nvar tmpMat3 = new Matrix3();\r\n\r\n/**\r\n * @classdesc\r\n * A quaternion.\r\n *\r\n * @class Quaternion\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n * @param {number} [w] - The w component.\r\n */\r\nvar Quaternion = new Class({\r\n\r\n initialize:\r\n\r\n function Quaternion (x, y, z, w)\r\n {\r\n /**\r\n * The x component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n /**\r\n * The y component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n /**\r\n * The z component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n /**\r\n * The w component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Copy the components of a given Quaternion or Vector into this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#copy\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} src - The Quaternion or Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z;\r\n this.w = src.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the components of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} [x=0] - The x component, or an object containing x, y, z, and w components.\r\n * @param {number} [y=0] - The y component.\r\n * @param {number} [z=0] - The z component.\r\n * @param {number} [w=0] - The w component.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n set: function (x, y, z, w)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Quaternion or Vector to this Quaternion. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Quaternion#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to add to this Quaternion.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z;\r\n this.w += v.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract a given Quaternion or Vector from this Quaternion. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Quaternion#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to subtract from this Quaternion.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z;\r\n this.w -= v.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Quaternion by the given value.\r\n *\r\n * @method Phaser.Math.Quaternion#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Quaternion by.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n scale: function (scale)\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n this.w *= scale;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the length of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Quaternion.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return Math.sqrt(x * x + y * y + z * z + w * w);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Quaternion squared.\r\n *\r\n * @method Phaser.Math.Quaternion#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Quaternion, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n },\r\n\r\n /**\r\n * Normalize this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var len = x * x + y * y + z * z + w * w;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n this.w = w * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Quaternion and the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#dot\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to dot product with this Quaternion.\r\n *\r\n * @return {number} The dot product of this Quaternion and the given Quaternion or Vector.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\r\n },\r\n\r\n /**\r\n * Linearly interpolate this Quaternion towards the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to interpolate towards.\r\n * @param {number} [t=0] - The percentage of interpolation.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n this.w = aw + t * (v.w - aw);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotates this Quaternion based on the two given vectors.\r\n *\r\n * @method Phaser.Math.Quaternion#rotationTo\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The transform rotation vector.\r\n * @param {Phaser.Math.Vector3} b - The target rotation vector.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotationTo: function (a, b)\r\n {\r\n var dot = a.x * b.x + a.y * b.y + a.z * b.z;\r\n\r\n if (dot < -0.999999)\r\n {\r\n if (tmpvec.copy(xUnitVec3).cross(a).length() < EPSILON)\r\n {\r\n tmpvec.copy(yUnitVec3).cross(a);\r\n }\r\n\r\n tmpvec.normalize();\r\n\r\n return this.setAxisAngle(tmpvec, Math.PI);\r\n\r\n }\r\n else if (dot > 0.999999)\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 1;\r\n\r\n return this;\r\n }\r\n else\r\n {\r\n tmpvec.copy(a).cross(b);\r\n\r\n this.x = tmpvec.x;\r\n this.y = tmpvec.y;\r\n this.z = tmpvec.z;\r\n this.w = 1 + dot;\r\n\r\n return this.normalize();\r\n }\r\n },\r\n\r\n /**\r\n * Set the axes of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#setAxes\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} view - The view axis.\r\n * @param {Phaser.Math.Vector3} right - The right axis.\r\n * @param {Phaser.Math.Vector3} up - The upwards axis.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setAxes: function (view, right, up)\r\n {\r\n var m = tmpMat3.val;\r\n\r\n m[0] = right.x;\r\n m[3] = right.y;\r\n m[6] = right.z;\r\n\r\n m[1] = up.x;\r\n m[4] = up.y;\r\n m[7] = up.z;\r\n\r\n m[2] = -view.x;\r\n m[5] = -view.y;\r\n m[8] = -view.z;\r\n\r\n return this.fromMat3(tmpMat3).normalize();\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n identity: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the axis angle of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#setAxisAngle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} axis - The axis.\r\n * @param {number} rad - The angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setAxisAngle: function (axis, rad)\r\n {\r\n rad = rad * 0.5;\r\n\r\n var s = Math.sin(rad);\r\n\r\n this.x = s * axis.x;\r\n this.y = s * axis.y;\r\n this.z = s * axis.z;\r\n this.w = Math.cos(rad);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply this Quaternion by the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to multiply this Quaternion by.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n multiply: function (b)\r\n {\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n var bw = b.w;\r\n\r\n this.x = ax * bw + aw * bx + ay * bz - az * by;\r\n this.y = ay * bw + aw * by + az * bx - ax * bz;\r\n this.z = az * bw + aw * bz + ax * by - ay * bx;\r\n this.w = aw * bw - ax * bx - ay * by - az * bz;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Smoothly linearly interpolate this Quaternion towards the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#slerp\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to interpolate towards.\r\n * @param {number} t - The percentage of interpolation.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n slerp: function (b, t)\r\n {\r\n // benchmarks: http://jsperf.com/quaternion-slerp-implementations\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n var bw = b.w;\r\n\r\n // calc cosine\r\n var cosom = ax * bx + ay * by + az * bz + aw * bw;\r\n\r\n // adjust signs (if necessary)\r\n if (cosom < 0)\r\n {\r\n cosom = -cosom;\r\n bx = - bx;\r\n by = - by;\r\n bz = - bz;\r\n bw = - bw;\r\n }\r\n\r\n // \"from\" and \"to\" quaternions are very close\r\n // ... so we can do a linear interpolation\r\n var scale0 = 1 - t;\r\n var scale1 = t;\r\n\r\n // calculate coefficients\r\n if ((1 - cosom) > EPSILON)\r\n {\r\n // standard case (slerp)\r\n var omega = Math.acos(cosom);\r\n var sinom = Math.sin(omega);\r\n\r\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\r\n scale1 = Math.sin(t * omega) / sinom;\r\n }\r\n\r\n // calculate final values\r\n this.x = scale0 * ax + scale1 * bx;\r\n this.y = scale0 * ay + scale1 * by;\r\n this.z = scale0 * az + scale1 * bz;\r\n this.w = scale0 * aw + scale1 * bw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n invert: function ()\r\n {\r\n var a0 = this.x;\r\n var a1 = this.y;\r\n var a2 = this.z;\r\n var a3 = this.w;\r\n\r\n var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;\r\n var invDot = (dot) ? 1 / dot : 0;\r\n\r\n // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0\r\n\r\n this.x = -a0 * invDot;\r\n this.y = -a1 * invDot;\r\n this.z = -a2 * invDot;\r\n this.w = a3 * invDot;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Convert this Quaternion into its conjugate.\r\n *\r\n * Sets the x, y and z components.\r\n *\r\n * @method Phaser.Math.Quaternion#conjugate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n conjugate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the X axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateX: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n this.x = ax * bw + aw * bx;\r\n this.y = ay * bw + az * bx;\r\n this.z = az * bw - ay * bx;\r\n this.w = aw * bw - ax * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the Y axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateY: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var by = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n this.x = ax * bw - az * by;\r\n this.y = ay * bw + aw * by;\r\n this.z = az * bw + ax * by;\r\n this.w = aw * bw - ay * by;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the Z axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateZ: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bz = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n this.x = ax * bw + ay * bz;\r\n this.y = ay * bw - ax * bz;\r\n this.z = az * bw + aw * bz;\r\n this.w = aw * bw - az * bz;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Create a unit (or rotation) Quaternion from its x, y, and z components.\r\n *\r\n * Sets the w component.\r\n *\r\n * @method Phaser.Math.Quaternion#calculateW\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n calculateW: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n this.w = -Math.sqrt(1.0 - x * x - y * y - z * z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Convert the given Matrix into this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#fromMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix to convert from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n fromMat3: function (mat)\r\n {\r\n // benchmarks:\r\n // http://jsperf.com/typed-array-access-speed\r\n // http://jsperf.com/conversion-of-3x3-matrix-to-quaternion\r\n\r\n // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\r\n // article \"Quaternion Calculus and Fast Animation\".\r\n var m = mat.val;\r\n var fTrace = m[0] + m[4] + m[8];\r\n var fRoot;\r\n\r\n if (fTrace > 0)\r\n {\r\n // |w| > 1/2, may as well choose w > 1/2\r\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\r\n\r\n this.w = 0.5 * fRoot;\r\n\r\n fRoot = 0.5 / fRoot; // 1/(4w)\r\n\r\n this.x = (m[7] - m[5]) * fRoot;\r\n this.y = (m[2] - m[6]) * fRoot;\r\n this.z = (m[3] - m[1]) * fRoot;\r\n }\r\n else\r\n {\r\n // |w| <= 1/2\r\n var i = 0;\r\n\r\n if (m[4] > m[0])\r\n {\r\n i = 1;\r\n }\r\n\r\n if (m[8] > m[i * 3 + i])\r\n {\r\n i = 2;\r\n }\r\n\r\n var j = siNext[i];\r\n var k = siNext[j];\r\n\r\n // This isn't quite as clean without array access\r\n fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1);\r\n tmp[i] = 0.5 * fRoot;\r\n\r\n fRoot = 0.5 / fRoot;\r\n\r\n tmp[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;\r\n tmp[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;\r\n\r\n this.x = tmp[0];\r\n this.y = tmp[1];\r\n this.z = tmp[2];\r\n this.w = (m[k * 3 + j] - m[j * 3 + k]) * fRoot;\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Quaternion;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\n\r\n/**\r\n * Convert the given angle in radians, to the equivalent angle in degrees.\r\n *\r\n * @function Phaser.Math.RadToDeg\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The angle in radians to convert ot degrees.\r\n *\r\n * @return {integer} The given angle converted to degrees.\r\n */\r\nvar RadToDeg = function (radians)\r\n{\r\n return radians * CONST.RAD_TO_DEG;\r\n};\r\n\r\nmodule.exports = RadToDeg;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random unit vector.\r\n *\r\n * Computes random values for the given vector between -1 and 1 that can be used to represent a direction.\r\n *\r\n * Optionally accepts a scale value to scale the resulting vector by.\r\n *\r\n * @function Phaser.Math.RandomXY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} vector - The Vector to compute random values for.\r\n * @param {number} [scale=1] - The scale of the random values.\r\n *\r\n * @return {Phaser.Math.Vector2} The given Vector.\r\n */\r\nvar RandomXY = function (vector, scale)\r\n{\r\n if (scale === undefined) { scale = 1; }\r\n\r\n var r = Math.random() * 2 * Math.PI;\r\n\r\n vector.x = Math.cos(r) * scale;\r\n vector.y = Math.sin(r) * scale;\r\n\r\n return vector;\r\n};\r\n\r\nmodule.exports = RandomXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random position vector in a spherical area, optionally defined by the given radius.\r\n *\r\n * @function Phaser.Math.RandomXYZ\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec3 - The Vector to compute random values for.\r\n * @param {number} [radius=1] - The radius.\r\n *\r\n * @return {Phaser.Math.Vector3} The given Vector.\r\n */\r\nvar RandomXYZ = function (vec3, radius)\r\n{\r\n if (radius === undefined) { radius = 1; }\r\n\r\n var r = Math.random() * 2 * Math.PI;\r\n var z = (Math.random() * 2) - 1;\r\n var zScale = Math.sqrt(1 - z * z) * radius;\r\n\r\n vec3.x = Math.cos(r) * zScale;\r\n vec3.y = Math.sin(r) * zScale;\r\n vec3.z = z * radius;\r\n\r\n return vec3;\r\n};\r\n\r\nmodule.exports = RandomXYZ;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random four-dimensional vector.\r\n *\r\n * @function Phaser.Math.RandomXYZW\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} vec4 - The Vector to compute random values for.\r\n * @param {number} [scale=1] - The scale of the random values.\r\n *\r\n * @return {Phaser.Math.Vector4} The given Vector.\r\n */\r\nvar RandomXYZW = function (vec4, scale)\r\n{\r\n if (scale === undefined) { scale = 1; }\r\n\r\n // TODO: Not spherical; should fix this for more uniform distribution\r\n vec4.x = (Math.random() * 2 - 1) * scale;\r\n vec4.y = (Math.random() * 2 - 1) * scale;\r\n vec4.z = (Math.random() * 2 - 1) * scale;\r\n vec4.w = (Math.random() * 2 - 1) * scale;\r\n\r\n return vec4;\r\n};\r\n\r\nmodule.exports = RandomXYZW;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a given point by a given angle around the origin (0, 0), in an anti-clockwise direction.\r\n *\r\n * @function Phaser.Math.Rotate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} angle - The angle to be rotated by in an anticlockwise direction.\r\n *\r\n * @return {Phaser.Geom.Point} The given point, rotated by the given angle in an anticlockwise direction.\r\n */\r\nvar Rotate = function (point, angle)\r\n{\r\n var x = point.x;\r\n var y = point.y;\r\n\r\n point.x = (x * Math.cos(angle)) - (y * Math.sin(angle));\r\n point.y = (x * Math.sin(angle)) + (y * Math.cos(angle));\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = Rotate;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a `point` around `x` and `y` to the given `angle`, at the same distance.\r\n *\r\n * In polar notation, this maps a point from (r, t) to (r, angle), vs. the origin (x, y).\r\n *\r\n * @function Phaser.Math.RotateAround\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} x - The horizontal coordinate to rotate around.\r\n * @param {number} y - The vertical coordinate to rotate around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The given point.\r\n */\r\nvar RotateAround = function (point, x, y, angle)\r\n{\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n\r\n var tx = point.x - x;\r\n var ty = point.y - y;\r\n\r\n point.x = tx * c - ty * s + x;\r\n point.y = tx * s + ty * c + y;\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = RotateAround;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a `point` around `x` and `y` by the given `angle` and `distance`.\r\n *\r\n * In polar notation, this maps a point from (r, t) to (distance, t + angle), vs. the origin (x, y).\r\n *\r\n * @function Phaser.Math.RotateAroundDistance\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} x - The horizontal coordinate to rotate around.\r\n * @param {number} y - The vertical coordinate to rotate around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n * @param {number} distance - The distance from (x, y) to place the point at.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The given point.\r\n */\r\nvar RotateAroundDistance = function (point, x, y, angle, distance)\r\n{\r\n var t = angle + Math.atan2(point.y - y, point.x - x);\r\n\r\n point.x = x + (distance * Math.cos(t));\r\n point.y = y + (distance * Math.sin(t));\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = RotateAroundDistance;\r\n","/**\n * @author samme\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Position a `point` at the given `angle` and `distance` to (`x`, `y`).\n *\n * @function Phaser.Math.RotateTo\n * @since 3.24.0\n *\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\n *\n * @param {Phaser.Types.Math.Vector2Like} point - The point to be positioned.\n * @param {number} x - The horizontal coordinate to position from.\n * @param {number} y - The vertical coordinate to position from.\n * @param {number} angle - The angle of rotation in radians.\n * @param {number} distance - The distance from (x, y) to place the point at.\n *\n * @return {Phaser.Types.Math.Vector2Like} The given point.\n */\nvar RotateTo = function (point, x, y, angle, distance)\n{\n point.x = x + (distance * Math.cos(angle));\n point.y = y + (distance * Math.sin(angle));\n\n return point;\n};\n\nmodule.exports = RotateTo;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector3 = require('../math/Vector3');\r\nvar Matrix4 = require('../math/Matrix4');\r\nvar Quaternion = require('../math/Quaternion');\r\n\r\nvar tmpMat4 = new Matrix4();\r\nvar tmpQuat = new Quaternion();\r\nvar tmpVec3 = new Vector3();\r\n\r\n/**\r\n * Rotates a vector in place by axis angle.\r\n *\r\n * This is the same as transforming a point by an\r\n * axis-angle quaternion, but it has higher precision.\r\n *\r\n * @function Phaser.Math.RotateVec3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec - The vector to be rotated.\r\n * @param {Phaser.Math.Vector3} axis - The axis to rotate around.\r\n * @param {number} radians - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Math.Vector3} The given vector.\r\n */\r\nvar RotateVec3 = function (vec, axis, radians)\r\n{\r\n // Set the quaternion to our axis angle\r\n tmpQuat.setAxisAngle(axis, radians);\r\n\r\n // Create a rotation matrix from the axis angle\r\n tmpMat4.fromRotationTranslation(tmpQuat, tmpVec3.set(0, 0, 0));\r\n\r\n // Multiply our vector by the rotation matrix\r\n return vec.transformMat4(tmpMat4);\r\n};\r\n\r\nmodule.exports = RotateVec3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Round a given number so it is further away from zero. That is, positive numbers are rounded up, and negative numbers are rounded down.\r\n *\r\n * @function Phaser.Math.RoundAwayFromZero\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to round.\r\n *\r\n * @return {number} The rounded number, rounded away from zero.\r\n */\r\nvar RoundAwayFromZero = function (value)\r\n{\r\n // \"Opposite\" of truncate.\r\n return (value > 0) ? Math.ceil(value) : Math.floor(value);\r\n};\r\n\r\nmodule.exports = RoundAwayFromZero;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Round a value to the given precision.\r\n * \r\n * For example:\r\n * \r\n * ```javascript\r\n * RoundTo(123.456, 0) = 123\r\n * RoundTo(123.456, 1) = 120\r\n * RoundTo(123.456, 2) = 100\r\n * ```\r\n * \r\n * To round the decimal, i.e. to round to precision, pass in a negative `place`:\r\n * \r\n * ```javascript\r\n * RoundTo(123.456789, 0) = 123\r\n * RoundTo(123.456789, -1) = 123.5\r\n * RoundTo(123.456789, -2) = 123.46\r\n * RoundTo(123.456789, -3) = 123.457\r\n * ```\r\n *\r\n * @function Phaser.Math.RoundTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {integer} [place=0] - The place to round to. Positive to round the units, negative to round the decimal.\r\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar RoundTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.round(value * p) / p;\r\n};\r\n\r\nmodule.exports = RoundTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Generate a series of sine and cosine values.\r\n *\r\n * @function Phaser.Math.SinCosTableGenerator\r\n * @since 3.0.0\r\n *\r\n * @param {number} length - The number of values to generate.\r\n * @param {number} [sinAmp=1] - The sine value amplitude.\r\n * @param {number} [cosAmp=1] - The cosine value amplitude.\r\n * @param {number} [frequency=1] - The frequency of the values.\r\n *\r\n * @return {Phaser.Types.Math.SinCosTable} The generated values.\r\n */\r\nvar SinCosTableGenerator = function (length, sinAmp, cosAmp, frequency)\r\n{\r\n if (sinAmp === undefined) { sinAmp = 1; }\r\n if (cosAmp === undefined) { cosAmp = 1; }\r\n if (frequency === undefined) { frequency = 1; }\r\n\r\n frequency *= Math.PI / length;\r\n\r\n var cos = [];\r\n var sin = [];\r\n\r\n for (var c = 0; c < length; c++)\r\n {\r\n cosAmp -= sinAmp * frequency;\r\n sinAmp += cosAmp * frequency;\r\n\r\n cos[c] = cosAmp;\r\n sin[c] = sinAmp;\r\n }\r\n\r\n return {\r\n sin: sin,\r\n cos: cos,\r\n length: length\r\n };\r\n};\r\n\r\nmodule.exports = SinCosTableGenerator;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a smooth interpolation percentage of `x` between `min` and `max`.\r\n *\r\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\r\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\r\n * between 0 and 1 otherwise.\r\n *\r\n * @function Phaser.Math.SmoothStep\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\r\n *\r\n * @param {number} x - The input value.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The percentage of interpolation, between 0 and 1.\r\n */\r\nvar SmoothStep = function (x, min, max)\r\n{\r\n if (x <= min)\r\n {\r\n return 0;\r\n }\r\n\r\n if (x >= max)\r\n {\r\n return 1;\r\n }\r\n\r\n x = (x - min) / (max - min);\r\n\r\n return x * x * (3 - 2 * x);\r\n};\r\n\r\nmodule.exports = SmoothStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a smoother interpolation percentage of `x` between `min` and `max`.\r\n *\r\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\r\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\r\n * between 0 and 1 otherwise.\r\n *\r\n * Produces an even smoother interpolation than {@link Phaser.Math.SmoothStep}.\r\n *\r\n * @function Phaser.Math.SmootherStep\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\r\n *\r\n * @param {number} x - The input value.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The percentage of interpolation, between 0 and 1.\r\n */\r\nvar SmootherStep = function (x, min, max)\r\n{\r\n x = Math.max(0, Math.min(1, (x - min) / (max - min)));\r\n\r\n return x * x * x * (x * (x * 6 - 15) + 10);\r\n};\r\n\r\nmodule.exports = SmootherStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = require('./Vector2');\r\n\r\n/**\r\n * Returns a Vector2 containing the x and y position of the given index in a `width` x `height` sized grid.\r\n * \r\n * For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2.\r\n * \r\n * If the given index is out of range an empty Vector2 is returned.\r\n *\r\n * @function Phaser.Math.ToXY\r\n * @since 3.19.0\r\n *\r\n * @param {integer} index - The position within the grid to get the x/y value for.\r\n * @param {integer} width - The width of the grid.\r\n * @param {integer} height - The height of the grid.\r\n * @param {Phaser.Math.Vector2} [out] - An optional Vector2 to store the result in. If not given, a new Vector2 instance will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 where the x and y properties contain the given grid index.\r\n */\r\nvar ToXY = function (index, width, height, out)\r\n{\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var x = 0;\r\n var y = 0;\r\n var total = width * height;\r\n\r\n if (index > 0 && index <= total)\r\n {\r\n if (index > width - 1)\r\n {\r\n y = Math.floor(index / width);\r\n x = index - (y * width);\r\n }\r\n else\r\n {\r\n x = index;\r\n }\r\n\r\n out.set(x, y);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = ToXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = require('./Vector2');\r\n\r\n/**\r\n * Takes the `x` and `y` coordinates and transforms them into the same space as\r\n * defined by the position, rotation and scale values.\r\n *\r\n * @function Phaser.Math.TransformXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to be transformed.\r\n * @param {number} y - The y coordinate to be transformed.\r\n * @param {number} positionX - Horizontal position of the transform point.\r\n * @param {number} positionY - Vertical position of the transform point.\r\n * @param {number} rotation - Rotation of the transform point, in radians.\r\n * @param {number} scaleX - Horizontal scale of the transform point.\r\n * @param {number} scaleY - Vertical scale of the transform point.\r\n * @param {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} [output] - The output vector, point or object for the translated coordinates.\r\n *\r\n * @return {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} The translated point.\r\n */\r\nvar TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output)\r\n{\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var radianSin = Math.sin(rotation);\r\n var radianCos = Math.cos(rotation);\r\n\r\n // Rotate and Scale\r\n var a = radianCos * scaleX;\r\n var b = radianSin * scaleX;\r\n var c = -radianSin * scaleY;\r\n var d = radianCos * scaleY;\r\n\r\n // Invert\r\n var id = 1 / ((a * d) + (c * -b));\r\n\r\n output.x = (d * id * x) + (-c * id * y) + (((positionY * c) - (positionX * d)) * id);\r\n output.y = (a * id * y) + (-b * id * x) + (((-positionY * a) + (positionX * b)) * id);\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = TransformXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\nvar FuzzyEqual = require('../math/fuzzy/Equal');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 2D space.\r\n *\r\n * A two-component vector.\r\n *\r\n * @class Vector2\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number|Phaser.Types.Math.Vector2Like} [x] - The x component, or an object with `x` and `y` properties.\r\n * @param {number} [y] - The y component.\r\n */\r\nvar Vector2 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector2 (x, y)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector2#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector2#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n }\r\n else\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector2.\r\n *\r\n * @method Phaser.Math.Vector2#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} A clone of this Vector2.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector2(this.x, this.y);\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x || 0;\r\n this.y = src.y || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the component values of this Vector from a given Vector2Like object.\r\n *\r\n * @method Phaser.Math.Vector2#setFromObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} obj - The object containing the component values to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setFromObject: function (obj)\r\n {\r\n this.x = obj.x || 0;\r\n this.y = obj.y || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x` and `y` components of the this Vector to the given `x` and `y` values.\r\n *\r\n * @method Phaser.Math.Vector2#set\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x value to set for this Vector.\r\n * @param {number} [y=x] - The y value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n set: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This method is an alias for `Vector2.set`.\r\n *\r\n * @method Phaser.Math.Vector2#setTo\r\n * @since 3.4.0\r\n *\r\n * @param {number} x - The x value to set for this Vector.\r\n * @param {number} [y=x] - The y value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setTo: function (x, y)\r\n {\r\n return this.set(x, y);\r\n },\r\n\r\n /**\r\n * Sets the `x` and `y` values of this object from a given polar coordinate.\r\n *\r\n * @method Phaser.Math.Vector2#setToPolar\r\n * @since 3.0.0\r\n *\r\n * @param {number} azimuth - The angular coordinate, in radians.\r\n * @param {number} [radius=1] - The radial coordinate (length).\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setToPolar: function (azimuth, radius)\r\n {\r\n if (radius == null) { radius = 1; }\r\n\r\n this.x = Math.cos(azimuth) * radius;\r\n this.y = Math.sin(azimuth) * radius;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict equality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector2#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector.\r\n *\r\n * @return {boolean} Whether the given Vector is equal to this Vector.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y));\r\n },\r\n\r\n /**\r\n * Check whether this Vector is approximately equal to a given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#fuzzyEquals\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector.\r\n * @param {number} [epsilon=0.0001] - The tolerance value.\r\n *\r\n * @return {boolean} Whether both absolute differences of the x and y components are smaller than `epsilon`.\r\n */\r\n fuzzyEquals: function (v, epsilon)\r\n {\r\n return (FuzzyEqual(this.x, v.x, epsilon) && FuzzyEqual(this.y, v.y, epsilon));\r\n },\r\n\r\n /**\r\n * Calculate the angle between this Vector and the positive x-axis, in radians.\r\n *\r\n * @method Phaser.Math.Vector2#angle\r\n * @since 3.0.0\r\n *\r\n * @return {number} The angle between this Vector, and the positive x-axis, given in radians.\r\n */\r\n angle: function ()\r\n {\r\n // computes the angle in radians with respect to the positive x-axis\r\n\r\n var angle = Math.atan2(this.y, this.x);\r\n\r\n if (angle < 0)\r\n {\r\n angle += 2 * Math.PI;\r\n }\r\n\r\n return angle;\r\n },\r\n\r\n /**\r\n * Set the angle of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#setAngle\r\n * @since 3.23.0\r\n *\r\n * @param {number} angle - The angle, in radians.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setAngle: function (angle)\r\n {\r\n return this.setToPolar(angle, this.length());\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector2#add\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n add: function (src)\r\n {\r\n this.x += src.x;\r\n this.y += src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector2#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n subtract: function (src)\r\n {\r\n this.x -= src.x;\r\n this.y -= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n multiply: function (src)\r\n {\r\n this.x *= src.x;\r\n this.y *= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector2#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n scale: function (value)\r\n {\r\n if (isFinite(value))\r\n {\r\n this.x *= value;\r\n this.y *= value;\r\n }\r\n else\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#divide\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n divide: function (src)\r\n {\r\n this.x /= src.x;\r\n this.y /= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Negate the `x` and `y` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#distance\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (src)\r\n {\r\n var dx = src.x - this.x;\r\n var dy = src.y - this.y;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector2#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (src)\r\n {\r\n var dx = src.x - this.x;\r\n var dy = src.y - this.y;\r\n\r\n return dx * dx + dy * dy;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n return Math.sqrt(x * x + y * y);\r\n },\r\n\r\n /**\r\n * Set the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#setLength\r\n * @since 3.23.0\r\n *\r\n * @param {number} length\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setLength: function (length)\r\n {\r\n return this.normalize().scale(length);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector2#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n return x * x + y * y;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var len = x * x + y * y;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Vector to its perpendicular, in the positive direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalizeRightHand\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalizeRightHand: function ()\r\n {\r\n var x = this.x;\r\n\r\n this.x = this.y * -1;\r\n this.y = x;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Vector to its perpendicular, in the negative direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalizeLeftHand\r\n * @since 3.23.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalizeLeftHand: function ()\r\n {\r\n var x = this.x;\r\n\r\n this.x = this.y;\r\n this.y = x * -1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector2 to dot product with this Vector2.\r\n *\r\n * @return {number} The dot product of this Vector and the given Vector.\r\n */\r\n dot: function (src)\r\n {\r\n return this.x * src.x + this.y * src.y;\r\n },\r\n\r\n /**\r\n * Calculate the cross product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#cross\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector2 to cross with this Vector2.\r\n *\r\n * @return {number} The cross product of this Vector and the given Vector.\r\n */\r\n cross: function (src)\r\n {\r\n return this.x * src.y - this.y * src.x;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector2 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n lerp: function (src, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n\r\n this.x = ax + t * (src.x - ax);\r\n this.y = ay + t * (src.y - ay);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector2#transformMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector2 with.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n transformMat3: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[3] * y + m[6];\r\n this.y = m[1] * x + m[4] * y + m[7];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector2#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector2 with.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[12];\r\n this.y = m[1] * x + m[5] * y + m[13];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0).\r\n *\r\n * @method Phaser.Math.Vector2#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Limit the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#limit\r\n * @since 3.23.0\r\n *\r\n * @param {number} max - The maximum length.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n limit: function (max)\r\n {\r\n var len = this.length();\r\n\r\n if (len && len > max)\r\n {\r\n this.scale(max / len);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reflect this Vector off a line defined by a normal.\r\n *\r\n * @method Phaser.Math.Vector2#reflect\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Math.Vector2} normal - A vector perpendicular to the line.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n reflect: function (normal)\r\n {\r\n normal = normal.clone().normalize();\r\n\r\n return this.subtract(normal.scale(2 * this.dot(normal)));\r\n },\r\n\r\n /**\r\n * Reflect this Vector across another.\r\n *\r\n * @method Phaser.Math.Vector2#mirror\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Math.Vector2} axis - A vector to reflect across.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n mirror: function (axis)\r\n {\r\n return this.reflect(axis).negate();\r\n },\r\n\r\n /**\r\n * Rotate this Vector by an angle amount.\r\n *\r\n * @method Phaser.Math.Vector2#rotate\r\n * @since 3.23.0\r\n *\r\n * @param {number} delta - The angle to rotate by, in radians.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n rotate: function (delta)\r\n {\r\n var cos = Math.cos(delta);\r\n var sin = Math.sin(delta);\r\n\r\n return this.set(cos * this.x - sin * this.y, sin * this.x + cos * this.y);\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A static zero Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.ZERO\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.1.0\r\n */\r\nVector2.ZERO = new Vector2();\r\n\r\n/**\r\n * A static right Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.RIGHT\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.RIGHT = new Vector2(1, 0);\r\n\r\n/**\r\n * A static left Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.LEFT\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.LEFT = new Vector2(-1, 0);\r\n\r\n/**\r\n * A static up Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.UP\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.UP = new Vector2(0, -1);\r\n\r\n/**\r\n * A static down Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.DOWN\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.DOWN = new Vector2(0, 1);\r\n\r\n/**\r\n * A static one Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.ONE\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.ONE = new Vector2(1, 1);\r\n\r\nmodule.exports = Vector2;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 3D space.\r\n *\r\n * A three-component vector.\r\n *\r\n * @class Vector3\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n */\r\nvar Vector3 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector3 (x, y, z)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The z component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.z = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Set this Vector to point up.\r\n *\r\n * Sets the y component of the vector to 1, and the others to 0.\r\n *\r\n * @method Phaser.Math.Vector3#up\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n up: function ()\r\n {\r\n this.x = 0;\r\n this.y = 1;\r\n this.z = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} A new Vector3 object containing this Vectors values.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector3(this.x, this.y, this.z);\r\n },\r\n\r\n /**\r\n * Calculate the cross (vector) product of two given Vectors.\r\n *\r\n * @method Phaser.Math.Vector3#crossVectors\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The first Vector to multiply.\r\n * @param {Phaser.Math.Vector3} b - The second Vector to multiply.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n crossVectors: function (a, b)\r\n {\r\n var ax = a.x;\r\n var ay = a.y;\r\n var az = a.z;\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n\r\n this.x = ay * bz - az * by;\r\n this.y = az * bx - ax * bz;\r\n this.z = ax * by - ay * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict equality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector3#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to compare against.\r\n *\r\n * @return {boolean} True if the two vectors strictly match, otherwise false.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z));\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#copy\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x`, `y`, and `z` components of this Vector to the given `x`, `y`, and `z` values.\r\n *\r\n * @method Phaser.Math.Vector3#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y and z components.\r\n * @param {number} [y] - The y value to set for this Vector.\r\n * @param {number} [z] - The z value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n set: function (x, y, z)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n multiply: function (v)\r\n {\r\n this.x *= v.x;\r\n this.y *= v.y;\r\n this.z *= v.z || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector3#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n scale: function (scale)\r\n {\r\n if (isFinite(scale))\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n }\r\n else\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#divide\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n divide: function (v)\r\n {\r\n this.x /= v.x;\r\n this.y /= v.y;\r\n this.z /= v.z || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Negate the `x`, `y` and `z` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#distance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n\r\n return Math.sqrt(dx * dx + dy * dy + dz * dz);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector3#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n\r\n return dx * dx + dy * dy + dz * dz;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n return Math.sqrt(x * x + y * y + z * z);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector3#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n return x * x + y * y + z * z;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector3#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var len = x * x + y * y + z * z;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to dot product with this Vector3.\r\n *\r\n * @return {number} The dot product of this Vector and `v`.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z;\r\n },\r\n\r\n /**\r\n * Calculate the cross (vector) product of this Vector (which will be modified) and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#cross\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector to cross product with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n cross: function (v)\r\n {\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var bx = v.x;\r\n var by = v.y;\r\n var bz = v.z;\r\n\r\n this.x = ay * bz - az * by;\r\n this.y = az * bx - ax * bz;\r\n this.z = ax * by - ay * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector3#transformMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformMat3: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n this.x = x * m[0] + y * m[3] + z * m[6];\r\n this.y = x * m[1] + y * m[4] + z * m[7];\r\n this.z = x * m[2] + y * m[5] + z * m[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector3#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12];\r\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13];\r\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transforms the coordinates of this Vector3 with the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#transformCoordinates\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformCoordinates: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n var tx = (x * m[0]) + (y * m[4]) + (z * m[8]) + m[12];\r\n var ty = (x * m[1]) + (y * m[5]) + (z * m[9]) + m[13];\r\n var tz = (x * m[2]) + (y * m[6]) + (z * m[10]) + m[14];\r\n var tw = (x * m[3]) + (y * m[7]) + (z * m[11]) + m[15];\r\n\r\n this.x = tx / tw;\r\n this.y = ty / tw;\r\n this.z = tz / tw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Quaternion.\r\n *\r\n * @method Phaser.Math.Vector3#transformQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformQuat: function (q)\r\n {\r\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var qx = q.x;\r\n var qy = q.y;\r\n var qz = q.z;\r\n var qw = q.w;\r\n\r\n // calculate quat * vec\r\n var ix = qw * x + qy * z - qz * y;\r\n var iy = qw * y + qz * x - qx * z;\r\n var iz = qw * z + qx * y - qy * x;\r\n var iw = -qx * x - qy * y - qz * z;\r\n\r\n // calculate result * inverse quat\r\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\r\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\r\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the specified matrix, applying a W divide. This is useful for projection,\r\n * e.g. unprojecting a 2D point into 3D space.\r\n *\r\n * @method Phaser.Math.Vector3#project\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to multiply this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n project: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n var a00 = m[0];\r\n var a01 = m[1];\r\n var a02 = m[2];\r\n var a03 = m[3];\r\n var a10 = m[4];\r\n var a11 = m[5];\r\n var a12 = m[6];\r\n var a13 = m[7];\r\n var a20 = m[8];\r\n var a21 = m[9];\r\n var a22 = m[10];\r\n var a23 = m[11];\r\n var a30 = m[12];\r\n var a31 = m[13];\r\n var a32 = m[14];\r\n var a33 = m[15];\r\n\r\n var lw = 1 / (x * a03 + y * a13 + z * a23 + a33);\r\n\r\n this.x = (x * a00 + y * a10 + z * a20 + a30) * lw;\r\n this.y = (x * a01 + y * a11 + z * a21 + a31) * lw;\r\n this.z = (x * a02 + y * a12 + z * a22 + a32) * lw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Unproject this point from 2D space to 3D space.\r\n * The point should have its x and y properties set to\r\n * 2D screen space, and the z either at 0 (near plane)\r\n * or 1 (far plane). The provided matrix is assumed to already\r\n * be combined, i.e. projection * view * model.\r\n *\r\n * After this operation, this vector's (x, y, z) components will\r\n * represent the unprojected 3D coordinate.\r\n *\r\n * @method Phaser.Math.Vector3#unproject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} viewport - Screen x, y, width and height in pixels.\r\n * @param {Phaser.Math.Matrix4} invProjectionView - Combined projection and view matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n unproject: function (viewport, invProjectionView)\r\n {\r\n var viewX = viewport.x;\r\n var viewY = viewport.y;\r\n var viewWidth = viewport.z;\r\n var viewHeight = viewport.w;\r\n\r\n var x = this.x - viewX;\r\n var y = (viewHeight - this.y - 1) - viewY;\r\n var z = this.z;\r\n\r\n this.x = (2 * x) / viewWidth - 1;\r\n this.y = (2 * y) / viewHeight - 1;\r\n this.z = 2 * z - 1;\r\n\r\n return this.project(invProjectionView);\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0, 0).\r\n *\r\n * @method Phaser.Math.Vector3#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A static zero Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.ZERO\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.ZERO = new Vector3();\r\n\r\n/**\r\n * A static right Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.RIGHT\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.RIGHT = new Vector3(1, 0, 0);\r\n\r\n/**\r\n * A static left Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.LEFT\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.LEFT = new Vector3(-1, 0, 0);\r\n\r\n/**\r\n * A static up Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.UP\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.UP = new Vector3(0, -1, 0);\r\n\r\n/**\r\n * A static down Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.DOWN\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.DOWN = new Vector3(0, 1, 0);\r\n\r\n/**\r\n * A static forward Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.FORWARD\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.FORWARD = new Vector3(0, 0, 1);\r\n\r\n/**\r\n * A static back Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.BACK\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.BACK = new Vector3(0, 0, -1);\r\n\r\n/**\r\n * A static one Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.ONE\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.ONE = new Vector3(1, 1, 1);\r\n\r\nmodule.exports = Vector3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 4D space.\r\n *\r\n * A four-component vector.\r\n *\r\n * @class Vector4\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n * @param {number} [w] - The w component.\r\n */\r\nvar Vector4 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector4 (x, y, z, w)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The z component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.z = 0;\r\n\r\n /**\r\n * The w component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.w = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector4.\r\n *\r\n * @method Phaser.Math.Vector4#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} A clone of this Vector4.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector4(this.x, this.y, this.z, this.w);\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z || 0;\r\n this.w = src.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict quality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector4#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The vector to check equality with.\r\n *\r\n * @return {boolean} A boolean indicating whether the two Vectors are equal or not.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z) && (this.w === v.w));\r\n },\r\n\r\n /**\r\n * Set the `x`, `y`, `z` and `w` components of the this Vector to the given `x`, `y`, `z` and `w` values.\r\n *\r\n * @method Phaser.Math.Vector4#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y, z and w components.\r\n * @param {number} y - The y value to set for this Vector.\r\n * @param {number} z - The z value to set for this Vector.\r\n * @param {number} w - The z value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n set: function (x, y, z, w)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector4#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z || 0;\r\n this.w += v.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector4#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z || 0;\r\n this.w -= v.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector4#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n scale: function (scale)\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n this.w *= scale;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return Math.sqrt(x * x + y * y + z * z + w * w);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector4#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector4#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var len = x * x + y * y + z * z + w * w;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n this.w = w * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The Vector4 to dot product with this Vector4.\r\n *\r\n * @return {number} The dot product of this Vector and the given Vector.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The Vector4 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n this.w = aw + t * (v.w - aw);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n multiply: function (v)\r\n {\r\n this.x *= v.x;\r\n this.y *= v.y;\r\n this.z *= v.z || 1;\r\n this.w *= v.w || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#divide\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n divide: function (v)\r\n {\r\n this.x /= v.x;\r\n this.y /= v.y;\r\n this.z /= v.z || 1;\r\n this.w /= v.w || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#distance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n var dw = v.w - this.w || 0;\r\n\r\n return Math.sqrt(dx * dx + dy * dy + dz * dz + dw * dw);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector4#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n var dw = v.w - this.w || 0;\r\n\r\n return dx * dx + dy * dy + dz * dz + dw * dw;\r\n },\r\n\r\n /**\r\n * Negate the `x`, `y`, `z` and `w` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n this.w = -this.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector4#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector4 with.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\r\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\r\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\r\n this.w = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Quaternion.\r\n *\r\n * @method Phaser.Math.Vector4#transformQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n transformQuat: function (q)\r\n {\r\n // TODO: is this really the same as Vector3?\r\n // Also, what about this: http://molecularmusings.wordpress.com/2013/05/24/a-faster-quaternion-vector-multiplication/\r\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var qx = q.x;\r\n var qy = q.y;\r\n var qz = q.z;\r\n var qw = q.w;\r\n\r\n // calculate quat * vec\r\n var ix = qw * x + qy * z - qz * y;\r\n var iy = qw * y + qz * x - qx * z;\r\n var iz = qw * z + qx * y - qy * x;\r\n var iw = -qx * x - qy * y - qz * z;\r\n\r\n // calculate result * inverse quat\r\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\r\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\r\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0, 0, 0).\r\n *\r\n * @method Phaser.Math.Vector4#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n// TODO: Check if these are required internally, if not, remove.\r\nVector4.prototype.sub = Vector4.prototype.subtract;\r\nVector4.prototype.mul = Vector4.prototype.multiply;\r\nVector4.prototype.div = Vector4.prototype.divide;\r\nVector4.prototype.dist = Vector4.prototype.distance;\r\nVector4.prototype.distSq = Vector4.prototype.distanceSq;\r\nVector4.prototype.len = Vector4.prototype.length;\r\nVector4.prototype.lenSq = Vector4.prototype.lengthSq;\r\n\r\nmodule.exports = Vector4;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the two values are within the given `tolerance` of each other.\r\n *\r\n * @function Phaser.Math.Within\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value to use in the calculation.\r\n * @param {number} b - The second value to use in the calculation.\r\n * @param {number} tolerance - The tolerance. Anything equal to or less than this value is considered as being within range.\r\n *\r\n * @return {boolean} Returns `true` if `a` is less than or equal to the tolerance of `b`.\r\n */\r\nvar Within = function (a, b, tolerance)\r\n{\r\n return (Math.abs(a - b) <= tolerance);\r\n};\r\n\r\nmodule.exports = Within;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Wrap the given `value` between `min` and `max.\r\n *\r\n * @function Phaser.Math.Wrap\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to wrap.\r\n * @param {number} min - The minimum value.\r\n * @param {number} max - The maximum value.\r\n *\r\n * @return {number} The wrapped value.\r\n */\r\nvar Wrap = function (value, min, max)\r\n{\r\n var range = max - min;\r\n\r\n return (min + ((((value - min) % range) + range) % range));\r\n};\r\n\r\nmodule.exports = Wrap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\r\n *\r\n * @function Phaser.Math.Angle.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar Between = function (x1, y1, x2, y2)\r\n{\r\n return Math.atan2(y2 - y1, x2 - x1);\r\n};\r\n\r\nmodule.exports = Between;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\r\n *\r\n * Calculates the angle of the vector from the first point to the second point.\r\n *\r\n * @function Phaser.Math.Angle.BetweenPoints\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} point1 - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} point2 - The second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenPoints = function (point1, point2)\r\n{\r\n return Math.atan2(point2.y - point1.y, point2.x - point1.x);\r\n};\r\n\r\nmodule.exports = BetweenPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\r\n *\r\n * The difference between this method and {@link Phaser.Math.Angle.BetweenPoints} is that this assumes the y coordinate\r\n * travels down the screen.\r\n *\r\n * @function Phaser.Math.Angle.BetweenPointsY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} point1 - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} point2 - The second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenPointsY = function (point1, point2)\r\n{\r\n return Math.atan2(point2.x - point1.x, point2.y - point1.y);\r\n};\r\n\r\nmodule.exports = BetweenPointsY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\r\n *\r\n * The difference between this method and {@link Phaser.Math.Angle.Between} is that this assumes the y coordinate\r\n * travels down the screen.\r\n *\r\n * @function Phaser.Math.Angle.BetweenY\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenY = function (x1, y1, x2, y2)\r\n{\r\n return Math.atan2(x2 - x1, y2 - y1);\r\n};\r\n\r\nmodule.exports = BetweenY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('../const');\r\n\r\n/**\r\n * Takes an angle in Phasers default clockwise format and converts it so that\r\n * 0 is North, 90 is West, 180 is South and 270 is East,\r\n * therefore running counter-clockwise instead of clockwise.\r\n * \r\n * You can pass in the angle from a Game Object using:\r\n * \r\n * ```javascript\r\n * var converted = CounterClockwise(gameobject.rotation);\r\n * ```\r\n * \r\n * All values for this function are in radians.\r\n *\r\n * @function Phaser.Math.Angle.CounterClockwise\r\n * @since 3.16.0\r\n *\r\n * @param {number} angle - The angle to convert, in radians.\r\n *\r\n * @return {number} The converted angle, in radians.\r\n */\r\nvar CounterClockwise = function (angle)\r\n{\r\n if (angle > Math.PI)\r\n {\r\n angle -= CONST.PI2;\r\n }\r\n\r\n return Math.abs((((angle + CONST.TAU) % CONST.PI2) - CONST.PI2) % CONST.PI2);\r\n};\r\n\r\nmodule.exports = CounterClockwise;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Normalize an angle to the [0, 2pi] range.\r\n *\r\n * @function Phaser.Math.Angle.Normalize\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to normalize, in radians.\r\n *\r\n * @return {number} The normalized angle, in radians.\r\n */\r\nvar Normalize = function (angle)\r\n{\r\n angle = angle % (2 * Math.PI);\r\n\r\n if (angle >= 0)\r\n {\r\n return angle;\r\n }\r\n else\r\n {\r\n return angle + 2 * Math.PI;\r\n }\r\n};\r\n\r\nmodule.exports = Normalize;\r\n","/**\r\n * @author Richard Davey \r\n * @author @samme\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FloatBetween = require('../FloatBetween');\r\n\r\n/**\r\n * Returns a random angle in the range [-pi, pi].\r\n *\r\n * @function Phaser.Math.Angle.Random\r\n * @since 3.23.0\r\n *\r\n * @return {number} The angle, in radians.\r\n */\r\nvar Random = function ()\r\n{\r\n return FloatBetween(-Math.PI, Math.PI);\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @author @samme\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FloatBetween = require('../FloatBetween');\r\n\r\n/**\r\n * Returns a random angle in the range [-180, 180].\r\n *\r\n * @function Phaser.Math.Angle.RandomDegrees\r\n * @since 3.23.0\r\n *\r\n * @return {number} The angle, in degrees.\r\n */\r\nvar RandomDegrees = function ()\r\n{\r\n return FloatBetween(-180, 180);\r\n};\r\n\r\nmodule.exports = RandomDegrees;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Normalize = require('./Normalize');\r\n\r\n/**\r\n * Reverse the given angle.\r\n *\r\n * @function Phaser.Math.Angle.Reverse\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to reverse, in radians.\r\n *\r\n * @return {number} The reversed angle, in radians.\r\n */\r\nvar Reverse = function (angle)\r\n{\r\n return Normalize(angle + Math.PI);\r\n};\r\n\r\nmodule.exports = Reverse;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = require('../const');\r\n\r\n/**\r\n * Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call.\r\n *\r\n * @function Phaser.Math.Angle.RotateTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} currentAngle - The current angle, in radians.\r\n * @param {number} targetAngle - The target angle to rotate to, in radians.\r\n * @param {number} [lerp=0.05] - The lerp value to add to the current angle.\r\n *\r\n * @return {number} The adjusted angle.\r\n */\r\nvar RotateTo = function (currentAngle, targetAngle, lerp)\r\n{\r\n if (lerp === undefined) { lerp = 0.05; }\r\n\r\n if (currentAngle === targetAngle)\r\n {\r\n return currentAngle;\r\n }\r\n\r\n if (Math.abs(targetAngle - currentAngle) <= lerp || Math.abs(targetAngle - currentAngle) >= (MATH_CONST.PI2 - lerp))\r\n {\r\n currentAngle = targetAngle;\r\n }\r\n else\r\n {\r\n if (Math.abs(targetAngle - currentAngle) > Math.PI)\r\n {\r\n if (targetAngle < currentAngle)\r\n {\r\n targetAngle += MATH_CONST.PI2;\r\n }\r\n else\r\n {\r\n targetAngle -= MATH_CONST.PI2;\r\n }\r\n }\r\n\r\n if (targetAngle > currentAngle)\r\n {\r\n currentAngle += lerp;\r\n }\r\n else if (targetAngle < currentAngle)\r\n {\r\n currentAngle -= lerp;\r\n }\r\n }\r\n\r\n return currentAngle;\r\n};\r\n\r\nmodule.exports = RotateTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Gets the shortest angle between `angle1` and `angle2`.\r\n *\r\n * Both angles must be in the range -180 to 180, which is the same clamped\r\n * range that `sprite.angle` uses, so you can pass in two sprite angles to\r\n * this method and get the shortest angle back between the two of them.\r\n *\r\n * The angle returned will be in the same range. If the returned angle is\r\n * greater than 0 then it's a counter-clockwise rotation, if < 0 then it's\r\n * a clockwise rotation.\r\n *\r\n * TODO: Wrap the angles in this function?\r\n *\r\n * @function Phaser.Math.Angle.ShortestBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle1 - The first angle in the range -180 to 180.\r\n * @param {number} angle2 - The second angle in the range -180 to 180.\r\n *\r\n * @return {number} The shortest angle, in degrees. If greater than zero it's a counter-clockwise rotation.\r\n */\r\nvar ShortestBetween = function (angle1, angle2)\r\n{\r\n var difference = angle2 - angle1;\r\n\r\n if (difference === 0)\r\n {\r\n return 0;\r\n }\r\n\r\n var times = Math.floor((difference - (-180)) / 360);\r\n\r\n return difference - (times * 360);\r\n\r\n};\r\n\r\nmodule.exports = ShortestBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MathWrap = require('../Wrap');\r\n\r\n/**\r\n * Wrap an angle.\r\n *\r\n * Wraps the angle to a value in the range of -PI to PI.\r\n *\r\n * @function Phaser.Math.Angle.Wrap\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to wrap, in radians.\r\n *\r\n * @return {number} The wrapped angle, in radians.\r\n */\r\nvar Wrap = function (angle)\r\n{\r\n return MathWrap(angle, -Math.PI, Math.PI);\r\n};\r\n\r\nmodule.exports = Wrap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Wrap = require('../Wrap');\r\n\r\n/**\r\n * Wrap an angle in degrees.\r\n *\r\n * Wraps the angle to a value in the range of -180 to 180.\r\n *\r\n * @function Phaser.Math.Angle.WrapDegrees\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to wrap, in degrees.\r\n *\r\n * @return {number} The wrapped angle, in degrees.\r\n */\r\nvar WrapDegrees = function (angle)\r\n{\r\n return Wrap(angle, -180, 180);\r\n};\r\n\r\nmodule.exports = WrapDegrees;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Angle\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Between: require('./Between'),\r\n BetweenPoints: require('./BetweenPoints'),\r\n BetweenPointsY: require('./BetweenPointsY'),\r\n BetweenY: require('./BetweenY'),\r\n CounterClockwise: require('./CounterClockwise'),\r\n Normalize: require('./Normalize'),\r\n Random: require('./Random'),\r\n RandomDegrees: require('./RandomDegrees'),\r\n Reverse: require('./Reverse'),\r\n RotateTo: require('./RotateTo'),\r\n ShortestBetween: require('./ShortestBetween'),\r\n Wrap: require('./Wrap'),\r\n WrapDegrees: require('./WrapDegrees')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = {\r\n\r\n /**\r\n * The value of PI * 2.\r\n * \r\n * @name Phaser.Math.PI2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n PI2: Math.PI * 2,\r\n\r\n /**\r\n * The value of PI * 0.5.\r\n * \r\n * @name Phaser.Math.TAU\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n TAU: Math.PI * 0.5,\r\n\r\n /**\r\n * An epsilon value (1.0e-6)\r\n * \r\n * @name Phaser.Math.EPSILON\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n EPSILON: 1.0e-6,\r\n\r\n /**\r\n * For converting degrees to radians (PI / 180)\r\n * \r\n * @name Phaser.Math.DEG_TO_RAD\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n DEG_TO_RAD: Math.PI / 180,\r\n\r\n /**\r\n * For converting radians to degrees (180 / PI)\r\n * \r\n * @name Phaser.Math.RAD_TO_DEG\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n RAD_TO_DEG: 180 / Math.PI,\r\n\r\n /**\r\n * An instance of the Random Number Generator.\r\n * This is not set until the Game boots.\r\n * \r\n * @name Phaser.Math.RND\r\n * @type {Phaser.Math.RandomDataGenerator}\r\n * @since 3.0.0\r\n */\r\n RND: null,\r\n\r\n /**\r\n * The minimum safe integer this browser supports.\r\n * We use a const for backward compatibility with Internet Explorer.\r\n * \r\n * @name Phaser.Math.MIN_SAFE_INTEGER\r\n * @type {number}\r\n * @since 3.21.0\r\n */\r\n MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991,\r\n\r\n /**\r\n * The maximum safe integer this browser supports.\r\n * We use a const for backward compatibility with Internet Explorer.\r\n * \r\n * @name Phaser.Math.MAX_SAFE_INTEGER\r\n * @type {number}\r\n * @since 3.21.0\r\n */\r\n MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991\r\n\r\n};\r\n\r\nmodule.exports = MATH_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points).\r\n *\r\n * @function Phaser.Math.Distance.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar DistanceBetween = function (x1, y1, x2, y2)\r\n{\r\n var dx = x1 - x2;\r\n var dy = y1 - y2;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n};\r\n\r\nmodule.exports = DistanceBetween;\r\n","/**\r\n * @author samme\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two points.\r\n *\r\n * @function Phaser.Math.Distance.BetweenPoints\r\n * @since 3.22.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} a - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} b - The second point.\r\n *\r\n * @return {number} The distance between the points.\r\n */\r\nvar DistanceBetweenPoints = function (a, b)\r\n{\r\n var dx = a.x - b.x;\r\n var dy = a.y - b.y;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n};\r\n\r\nmodule.exports = DistanceBetweenPoints;\r\n","/**\r\n * @author samme\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the squared distance between two points.\r\n *\r\n * @function Phaser.Math.Distance.BetweenPointsSquared\r\n * @since 3.22.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} a - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} b - The second point.\r\n *\r\n * @return {number} The squared distance between the points.\r\n */\r\nvar DistanceBetweenPointsSquared = function (a, b)\r\n{\r\n var dx = a.x - b.x;\r\n var dy = a.y - b.y;\r\n\r\n return dx * dx + dy * dy;\r\n};\r\n\r\nmodule.exports = DistanceBetweenPointsSquared;\r\n","/**\r\n * @author samme\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the Chebyshev distance between two sets of coordinates (points).\r\n *\r\n * Chebyshev distance (or chessboard distance) is the maximum of the horizontal and vertical distances.\r\n * It's the effective distance when movement can be horizontal, vertical, or diagonal.\r\n *\r\n * @function Phaser.Math.Distance.Chebyshev\r\n * @since 3.22.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar ChebyshevDistance = function (x1, y1, x2, y2)\r\n{\r\n return Math.max(Math.abs(x1 - x2), Math.abs(y1 - y2));\r\n};\r\n\r\nmodule.exports = ChebyshevDistance;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points) to the power of `pow`.\r\n *\r\n * @function Phaser.Math.Distance.Power\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n * @param {number} pow - The exponent.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar DistancePower = function (x1, y1, x2, y2, pow)\r\n{\r\n if (pow === undefined) { pow = 2; }\r\n\r\n return Math.sqrt(Math.pow(x2 - x1, pow) + Math.pow(y2 - y1, pow));\r\n};\r\n\r\nmodule.exports = DistancePower;\r\n","/**\r\n * @author samme\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the snake distance between two sets of coordinates (points).\r\n *\r\n * Snake distance (rectilinear distance, Manhattan distance) is the sum of the horizontal and vertical distances.\r\n * It's the effective distance when movement is allowed only horizontally or vertically (but not both).\r\n *\r\n * @function Phaser.Math.Distance.Snake\r\n * @since 3.22.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar SnakeDistance = function (x1, y1, x2, y2)\r\n{\r\n return Math.abs(x1 - x2) + Math.abs(y1 - y2);\r\n};\r\n\r\nmodule.exports = SnakeDistance;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points), squared.\r\n *\r\n * @function Phaser.Math.Distance.Squared\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point, squared.\r\n */\r\nvar DistanceSquared = function (x1, y1, x2, y2)\r\n{\r\n var dx = x1 - x2;\r\n var dy = y1 - y2;\r\n\r\n return dx * dx + dy * dy;\r\n};\r\n\r\nmodule.exports = DistanceSquared;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Distance\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Between: require('./DistanceBetween'),\r\n BetweenPoints: require('./DistanceBetweenPoints'),\r\n BetweenPointsSquared: require('./DistanceBetweenPointsSquared'),\r\n Chebyshev: require('./DistanceChebyshev'),\r\n Power: require('./DistancePower'),\r\n Snake: require('./DistanceSnake'),\r\n Squared: require('./DistanceSquared')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Back.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n return v * v * ((overshoot + 1) * v - overshoot);\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Back.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n var s = overshoot * 1.525;\r\n\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * (v * v * ((s + 1) * v - s));\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * ((s + 1) * v + s) + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Back.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n return --v * v * ((overshoot + 1) * v + overshoot) + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Back\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n v = 1 - v;\r\n\r\n if (v < 1 / 2.75)\r\n {\r\n return 1 - (7.5625 * v * v);\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n return 1 - (7.5625 * (v -= 1.5 / 2.75) * v + 0.75);\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n return 1 - (7.5625 * (v -= 2.25 / 2.75) * v + 0.9375);\r\n }\r\n else\r\n {\r\n return 1 - (7.5625 * (v -= 2.625 / 2.75) * v + 0.984375);\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n var reverse = false;\r\n\r\n if (v < 0.5)\r\n {\r\n v = 1 - (v * 2);\r\n reverse = true;\r\n }\r\n else\r\n {\r\n v = (v * 2) - 1;\r\n }\r\n\r\n if (v < 1 / 2.75)\r\n {\r\n v = 7.5625 * v * v;\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n v = 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n v = 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\r\n }\r\n else\r\n {\r\n v = 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\r\n }\r\n\r\n if (reverse)\r\n {\r\n return (1 - v) * 0.5;\r\n }\r\n else\r\n {\r\n return v * 0.5 + 0.5;\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n if (v < 1 / 2.75)\r\n {\r\n return 7.5625 * v * v;\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n return 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n return 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\r\n }\r\n else\r\n {\r\n return 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Bounce\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Circular.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return 1 - Math.sqrt(1 - v * v);\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Circular.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return -0.5 * (Math.sqrt(1 - v * v) - 1);\r\n }\r\n else\r\n {\r\n return 0.5 * (Math.sqrt(1 - (v -= 2) * v) + 1);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Circular.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return Math.sqrt(1 - (--v * v));\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Circular\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v;\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * v + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return --v * v * v + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Cubic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n return -(amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n if ((v *= 2) < 1)\r\n {\r\n return -0.5 * (amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\r\n }\r\n else\r\n {\r\n return amplitude * Math.pow(2, -10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period) * 0.5 + 1;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n return (amplitude * Math.pow(2, -10 * v) * Math.sin((v - s) * (2 * Math.PI) / period) + 1);\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Elastic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Expo.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return Math.pow(2, 10 * (v - 1)) - 0.001;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Expo.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * Math.pow(2, 10 * (v - 1));\r\n }\r\n else\r\n {\r\n return 0.5 * (2 - Math.pow(2, -10 * (v - 1)));\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Expo.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return 1 - Math.pow(2, -10 * v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Expo\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Back: require('./back'),\r\n Bounce: require('./bounce'),\r\n Circular: require('./circular'),\r\n Cubic: require('./cubic'),\r\n Elastic: require('./elastic'),\r\n Expo: require('./expo'),\r\n Linear: require('./linear'),\r\n Quadratic: require('./quadratic'),\r\n Quartic: require('./quartic'),\r\n Quintic: require('./quintic'),\r\n Sine: require('./sine'),\r\n Stepped: require('./stepped')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Linear easing (no variation).\r\n *\r\n * @function Phaser.Math.Easing.Linear\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Linear = function (v)\r\n{\r\n return v;\r\n};\r\n\r\nmodule.exports = Linear;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nmodule.exports = require('./Linear');\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v;\r\n }\r\n else\r\n {\r\n return -0.5 * (--v * (v - 2) - 1);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return v * (2 - v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quadratic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v * v;\r\n }\r\n else\r\n {\r\n return -0.5 * ((v -= 2) * v * v * v - 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return 1 - (--v * v * v * v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quartic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v * v * v;\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * v * v * v + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return --v * v * v * v * v + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quintic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Sine.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 1 - Math.cos(v * Math.PI / 2);\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Sine.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 0.5 * (1 - Math.cos(Math.PI * v));\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Sine.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return Math.sin(v * Math.PI / 2);\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Sine\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Stepped easing.\r\n *\r\n * @function Phaser.Math.Easing.Stepped\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [steps=1] - The number of steps in the ease.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Stepped = function (v, steps)\r\n{\r\n if (steps === undefined) { steps = 1; }\r\n\r\n if (v <= 0)\r\n {\r\n return 0;\r\n }\r\n else if (v >= 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return (((steps * v) | 0) + 1) * (1 / steps);\r\n }\r\n};\r\n\r\nmodule.exports = Stepped;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Stepped\r\n */\r\n\r\nmodule.exports = require('./Stepped');\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the fuzzy ceiling of the given value.\r\n *\r\n * @function Phaser.Math.Fuzzy.Ceil\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {number} The fuzzy ceiling of the value.\r\n */\r\nvar Ceil = function (value, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.ceil(value - epsilon);\r\n};\r\n\r\nmodule.exports = Ceil;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether the given values are fuzzily equal.\r\n *\r\n * Two numbers are fuzzily equal if their difference is less than `epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.Equal\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`.\r\n */\r\nvar Equal = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.abs(a - b) < epsilon;\r\n};\r\n\r\nmodule.exports = Equal;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the fuzzy floor of the given value.\r\n *\r\n * @function Phaser.Math.Fuzzy.Floor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {number} The floor of the value.\r\n */\r\nvar Floor = function (value, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.floor(value + epsilon);\r\n};\r\n\r\nmodule.exports = Floor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether `a` is fuzzily greater than `b`.\r\n *\r\n * `a` is fuzzily greater than `b` if it is more than `b - epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.GreaterThan\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if `a` is fuzzily greater than than `b`, otherwise `false`.\r\n */\r\nvar GreaterThan = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return a > b - epsilon;\r\n};\r\n\r\nmodule.exports = GreaterThan;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether `a` is fuzzily less than `b`.\r\n *\r\n * `a` is fuzzily less than `b` if it is less than `b + epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.LessThan\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if `a` is fuzzily less than `b`, otherwise `false`.\r\n */\r\nvar LessThan = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return a < b + epsilon;\r\n};\r\n\r\nmodule.exports = LessThan;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Fuzzy\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Ceil: require('./Ceil'),\r\n Equal: require('./Equal'),\r\n Floor: require('./Floor'),\r\n GreaterThan: require('./GreaterThan'),\r\n LessThan: require('./LessThan')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\nvar Extend = require('../utils/object/Extend');\r\n\r\n/**\r\n * @namespace Phaser.Math\r\n */\r\n\r\nvar PhaserMath = {\r\n\r\n // Collections of functions\r\n Angle: require('./angle/'),\r\n Distance: require('./distance/'),\r\n Easing: require('./easing/'),\r\n Fuzzy: require('./fuzzy/'),\r\n Interpolation: require('./interpolation/'),\r\n Pow2: require('./pow2/'),\r\n Snap: require('./snap/'),\r\n\r\n // Expose the RNG Class\r\n RandomDataGenerator: require('./random-data-generator/RandomDataGenerator'),\r\n\r\n // Single functions\r\n Average: require('./Average'),\r\n Bernstein: require('./Bernstein'),\r\n Between: require('./Between'),\r\n CatmullRom: require('./CatmullRom'),\r\n CeilTo: require('./CeilTo'),\r\n Clamp: require('./Clamp'),\r\n DegToRad: require('./DegToRad'),\r\n Difference: require('./Difference'),\r\n Factorial: require('./Factorial'),\r\n FloatBetween: require('./FloatBetween'),\r\n FloorTo: require('./FloorTo'),\r\n FromPercent: require('./FromPercent'),\r\n GetSpeed: require('./GetSpeed'),\r\n IsEven: require('./IsEven'),\r\n IsEvenStrict: require('./IsEvenStrict'),\r\n Linear: require('./Linear'),\r\n MaxAdd: require('./MaxAdd'),\r\n MinSub: require('./MinSub'),\r\n Percent: require('./Percent'),\r\n RadToDeg: require('./RadToDeg'),\r\n RandomXY: require('./RandomXY'),\r\n RandomXYZ: require('./RandomXYZ'),\r\n RandomXYZW: require('./RandomXYZW'),\r\n Rotate: require('./Rotate'),\r\n RotateAround: require('./RotateAround'),\r\n RotateAroundDistance: require('./RotateAroundDistance'),\r\n RotateTo: require('./RotateTo'),\r\n RoundAwayFromZero: require('./RoundAwayFromZero'),\r\n RoundTo: require('./RoundTo'),\r\n SinCosTableGenerator: require('./SinCosTableGenerator'),\r\n SmootherStep: require('./SmootherStep'),\r\n SmoothStep: require('./SmoothStep'),\r\n ToXY: require('./ToXY'),\r\n TransformXY: require('./TransformXY'),\r\n Within: require('./Within'),\r\n Wrap: require('./Wrap'),\r\n\r\n // Vector classes\r\n Vector2: require('./Vector2'),\r\n Vector3: require('./Vector3'),\r\n Vector4: require('./Vector4'),\r\n Matrix3: require('./Matrix3'),\r\n Matrix4: require('./Matrix4'),\r\n Quaternion: require('./Quaternion'),\r\n RotateVec3: require('./RotateVec3')\r\n\r\n};\r\n\r\n// Merge in the consts\r\n\r\nPhaserMath = Extend(false, PhaserMath, CONST);\r\n\r\n// Export it\r\n\r\nmodule.exports = PhaserMath;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bernstein = require('../Bernstein');\r\n\r\n/**\r\n * A bezier interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.Bezier\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar BezierInterpolation = function (v, k)\r\n{\r\n var b = 0;\r\n var n = v.length - 1;\r\n\r\n for (var i = 0; i <= n; i++)\r\n {\r\n b += Math.pow(1 - k, n - i) * Math.pow(k, i) * v[i] * Bernstein(n, i);\r\n }\r\n\r\n return b;\r\n};\r\n\r\nmodule.exports = BezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CatmullRom = require('../CatmullRom');\r\n\r\n/**\r\n * A Catmull-Rom interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.CatmullRom\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar CatmullRomInterpolation = function (v, k)\r\n{\r\n var m = v.length - 1;\r\n var f = m * k;\r\n var i = Math.floor(f);\r\n\r\n if (v[0] === v[m])\r\n {\r\n if (k < 0)\r\n {\r\n i = Math.floor(f = m * (1 + k));\r\n }\r\n\r\n return CatmullRom(f - i, v[(i - 1 + m) % m], v[i], v[(i + 1) % m], v[(i + 2) % m]);\r\n }\r\n else\r\n {\r\n if (k < 0)\r\n {\r\n return v[0] - (CatmullRom(-f, v[0], v[0], v[1], v[1]) - v[0]);\r\n }\r\n\r\n if (k > 1)\r\n {\r\n return v[m] - (CatmullRom(f - m, v[m], v[m], v[m - 1], v[m - 1]) - v[m]);\r\n }\r\n\r\n return CatmullRom(f - i, v[i ? i - 1 : 0], v[i], v[m < i + 1 ? m : i + 1], v[m < i + 2 ? m : i + 2]);\r\n }\r\n};\r\n\r\nmodule.exports = CatmullRomInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P0 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return k * k * k * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P1 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return 3 * k * k * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P2 (t, p)\r\n{\r\n return 3 * (1 - t) * t * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P3 (t, p)\r\n{\r\n return t * t * t * p;\r\n}\r\n\r\n/**\r\n * A cubic bezier interpolation method.\r\n *\r\n * https://medium.com/@adrian_cooney/bezier-interpolation-13b68563313a\r\n *\r\n * @function Phaser.Math.Interpolation.CubicBezier\r\n * @since 3.0.0\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} p0 - The start point.\r\n * @param {number} p1 - The first control point.\r\n * @param {number} p2 - The second control point.\r\n * @param {number} p3 - The end point.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar CubicBezierInterpolation = function (t, p0, p1, p2, p3)\r\n{\r\n return P0(t, p0) + P1(t, p1) + P2(t, p2) + P3(t, p3);\r\n};\r\n\r\nmodule.exports = CubicBezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Linear = require('../Linear');\r\n\r\n/**\r\n * A linear interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.Linear\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Linear_interpolation}\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {!number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {!number} The interpolated value.\r\n */\r\nvar LinearInterpolation = function (v, k)\r\n{\r\n var m = v.length - 1;\r\n var f = m * k;\r\n var i = Math.floor(f);\r\n\r\n if (k < 0)\r\n {\r\n return Linear(v[0], v[1], f);\r\n }\r\n else if (k > 1)\r\n {\r\n return Linear(v[m], v[m - 1], m - f);\r\n }\r\n else\r\n {\r\n return Linear(v[i], v[(i + 1 > m) ? m : i + 1], f - i);\r\n }\r\n};\r\n\r\nmodule.exports = LinearInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P0 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return k * k * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P1 (t, p)\r\n{\r\n return 2 * (1 - t) * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P2 (t, p)\r\n{\r\n return t * t * p;\r\n}\r\n\r\n// https://github.com/mrdoob/three.js/blob/master/src/extras/core/Interpolations.js\r\n\r\n/**\r\n * A quadratic bezier interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.QuadraticBezier\r\n * @since 3.2.0\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} p0 - The start point.\r\n * @param {number} p1 - The control point.\r\n * @param {number} p2 - The end point.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar QuadraticBezierInterpolation = function (t, p0, p1, p2)\r\n{\r\n return P0(t, p0) + P1(t, p1) + P2(t, p2);\r\n};\r\n\r\nmodule.exports = QuadraticBezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SmoothStep = require('../SmoothStep');\r\n\r\n/**\r\n * A Smooth Step interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.SmoothStep\r\n * @since 3.9.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar SmoothStepInterpolation = function (t, min, max)\r\n{\r\n return min + (max - min) * SmoothStep(t, 0, 1);\r\n};\r\n\r\nmodule.exports = SmoothStepInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SmootherStep = require('../SmootherStep');\r\n\r\n/**\r\n * A Smoother Step interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.SmootherStep\r\n * @since 3.9.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar SmootherStepInterpolation = function (t, min, max)\r\n{\r\n return min + (max - min) * SmootherStep(t, 0, 1);\r\n};\r\n\r\nmodule.exports = SmootherStepInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Interpolation\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Bezier: require('./BezierInterpolation'),\r\n CatmullRom: require('./CatmullRomInterpolation'),\r\n CubicBezier: require('./CubicBezierInterpolation'),\r\n Linear: require('./LinearInterpolation'),\r\n QuadraticBezier: require('./QuadraticBezierInterpolation'),\r\n SmoothStep: require('./SmoothStepInterpolation'),\r\n SmootherStep: require('./SmootherStepInterpolation')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the nearest power of 2 to the given `value`.\r\n *\r\n * @function Phaser.Math.Pow2.GetNext\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n *\r\n * @return {integer} The nearest power of 2 to `value`.\r\n */\r\nvar GetPowerOfTwo = function (value)\r\n{\r\n var index = Math.log(value) / 0.6931471805599453;\r\n\r\n return (1 << Math.ceil(index));\r\n};\r\n\r\nmodule.exports = GetPowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the given `width` and `height` are a power of two.\r\n * Useful for checking texture dimensions.\r\n *\r\n * @function Phaser.Math.Pow2.IsSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width.\r\n * @param {number} height - The height.\r\n *\r\n * @return {boolean} `true` if `width` and `height` are a power of two, otherwise `false`.\r\n */\r\nvar IsSizePowerOfTwo = function (width, height)\r\n{\r\n return (width > 0 && (width & (width - 1)) === 0 && height > 0 && (height & (height - 1)) === 0);\r\n};\r\n\r\nmodule.exports = IsSizePowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tests the value and returns `true` if it is a power of two.\r\n *\r\n * @function Phaser.Math.Pow2.IsValue\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to check if it's a power of two.\r\n *\r\n * @return {boolean} Returns `true` if `value` is a power of two, otherwise `false`.\r\n */\r\nvar IsValuePowerOfTwo = function (value)\r\n{\r\n return (value > 0 && (value & (value - 1)) === 0);\r\n};\r\n\r\nmodule.exports = IsValuePowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Pow2\r\n */\r\n\r\nmodule.exports = {\r\n\r\n GetNext: require('./GetPowerOfTwo'),\r\n IsSize: require('./IsSizePowerOfTwo'),\r\n IsValue: require('./IsValuePowerOfTwo')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A seeded Random Data Generator.\r\n * \r\n * Access via `Phaser.Math.RND` which is an instance of this class pre-defined\r\n * by Phaser. Or, create your own instance to use as you require.\r\n * \r\n * The `Math.RND` generator is seeded by the Game Config property value `seed`.\r\n * If no such config property exists, a random number is used.\r\n * \r\n * If you create your own instance of this class you should provide a seed for it.\r\n * If no seed is given it will use a 'random' one based on Date.now.\r\n *\r\n * @class RandomDataGenerator\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} [seeds] - The seeds to use for the random number generator.\r\n */\r\nvar RandomDataGenerator = new Class({\r\n\r\n initialize:\r\n\r\n function RandomDataGenerator (seeds)\r\n {\r\n if (seeds === undefined) { seeds = [ (Date.now() * Math.random()).toString() ]; }\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#c\r\n * @type {number}\r\n * @default 1\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.c = 1;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s0\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s0 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s1\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s1 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s2\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s2 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#n\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.2.0\r\n */\r\n this.n = 0;\r\n\r\n /**\r\n * Signs to choose from.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#signs\r\n * @type {number[]}\r\n * @since 3.0.0\r\n */\r\n this.signs = [ -1, 1 ];\r\n\r\n if (seeds)\r\n {\r\n this.init(seeds);\r\n }\r\n },\r\n\r\n /**\r\n * Private random helper.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#rnd\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @return {number} A random number.\r\n */\r\n rnd: function ()\r\n {\r\n var t = 2091639 * this.s0 + this.c * 2.3283064365386963e-10; // 2^-32\r\n\r\n this.c = t | 0;\r\n this.s0 = this.s1;\r\n this.s1 = this.s2;\r\n this.s2 = t - this.c;\r\n\r\n return this.s2;\r\n },\r\n\r\n /**\r\n * Internal method that creates a seed hash.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#hash\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {string} data - The value to hash.\r\n *\r\n * @return {number} The hashed value.\r\n */\r\n hash: function (data)\r\n {\r\n var h;\r\n var n = this.n;\r\n\r\n data = data.toString();\r\n\r\n for (var i = 0; i < data.length; i++)\r\n {\r\n n += data.charCodeAt(i);\r\n h = 0.02519603282416938 * n;\r\n n = h >>> 0;\r\n h -= n;\r\n h *= n;\r\n n = h >>> 0;\r\n h -= n;\r\n n += h * 0x100000000;// 2^32\r\n }\r\n\r\n this.n = n;\r\n\r\n return (n >>> 0) * 2.3283064365386963e-10;// 2^-32\r\n },\r\n\r\n /**\r\n * Initialize the state of the random data generator.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#init\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} seeds - The seeds to initialize the random data generator with.\r\n */\r\n init: function (seeds)\r\n {\r\n if (typeof seeds === 'string')\r\n {\r\n this.state(seeds);\r\n }\r\n else\r\n {\r\n this.sow(seeds);\r\n }\r\n },\r\n\r\n /**\r\n * Reset the seed of the random data generator.\r\n *\r\n * _Note_: the seed array is only processed up to the first `undefined` (or `null`) value, should such be present.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#sow\r\n * @since 3.0.0\r\n *\r\n * @param {string[]} seeds - The array of seeds: the `toString()` of each value is used.\r\n */\r\n sow: function (seeds)\r\n {\r\n // Always reset to default seed\r\n this.n = 0xefc8249d;\r\n this.s0 = this.hash(' ');\r\n this.s1 = this.hash(' ');\r\n this.s2 = this.hash(' ');\r\n this.c = 1;\r\n\r\n if (!seeds)\r\n {\r\n return;\r\n }\r\n\r\n // Apply any seeds\r\n for (var i = 0; i < seeds.length && (seeds[i] != null); i++)\r\n {\r\n var seed = seeds[i];\r\n\r\n this.s0 -= this.hash(seed);\r\n this.s0 += ~~(this.s0 < 0);\r\n this.s1 -= this.hash(seed);\r\n this.s1 += ~~(this.s1 < 0);\r\n this.s2 -= this.hash(seed);\r\n this.s2 += ~~(this.s2 < 0);\r\n }\r\n },\r\n\r\n /**\r\n * Returns a random integer between 0 and 2^32.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#integer\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random integer between 0 and 2^32.\r\n */\r\n integer: function ()\r\n {\r\n // 2^32\r\n return this.rnd() * 0x100000000;\r\n },\r\n\r\n /**\r\n * Returns a random real number between 0 and 1.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#frac\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between 0 and 1.\r\n */\r\n frac: function ()\r\n {\r\n // 2^-53\r\n return this.rnd() + (this.rnd() * 0x200000 | 0) * 1.1102230246251565e-16;\r\n },\r\n\r\n /**\r\n * Returns a random real number between 0 and 2^32.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#real\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between 0 and 2^32.\r\n */\r\n real: function ()\r\n {\r\n return this.integer() + this.frac();\r\n },\r\n\r\n /**\r\n * Returns a random integer between and including min and max.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#integerInRange\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n integerInRange: function (min, max)\r\n {\r\n return Math.floor(this.realInRange(0, max - min + 1) + min);\r\n },\r\n\r\n /**\r\n * Returns a random integer between and including min and max.\r\n * This method is an alias for RandomDataGenerator.integerInRange.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#between\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n between: function (min, max)\r\n {\r\n return Math.floor(this.realInRange(0, max - min + 1) + min);\r\n },\r\n\r\n /**\r\n * Returns a random real number between min and max.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#realInRange\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n realInRange: function (min, max)\r\n {\r\n return this.frac() * (max - min) + min;\r\n },\r\n\r\n /**\r\n * Returns a random real number between -1 and 1.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#normal\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between -1 and 1.\r\n */\r\n normal: function ()\r\n {\r\n return 1 - (2 * this.frac());\r\n },\r\n\r\n /**\r\n * Returns a valid RFC4122 version4 ID hex string from https://gist.github.com/1308368\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#uuid\r\n * @since 3.0.0\r\n *\r\n * @return {string} A valid RFC4122 version4 ID hex string\r\n */\r\n uuid: function ()\r\n {\r\n var a = '';\r\n var b = '';\r\n\r\n for (b = a = ''; a++ < 36; b += ~a % 5 | a * 3 & 4 ? (a ^ 15 ? 8 ^ this.frac() * (a ^ 20 ? 16 : 4) : 4).toString(16) : '-')\r\n {\r\n // eslint-disable-next-line no-empty\r\n }\r\n\r\n return b;\r\n },\r\n\r\n /**\r\n * Returns a random element from within the given array.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#pick\r\n * @since 3.0.0\r\n * \r\n * @generic T\r\n * @genericUse {T[]} - [array]\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {T[]} array - The array to pick a random element from.\r\n *\r\n * @return {T} A random member of the array.\r\n */\r\n pick: function (array)\r\n {\r\n return array[this.integerInRange(0, array.length - 1)];\r\n },\r\n\r\n /**\r\n * Returns a sign to be used with multiplication operator.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#sign\r\n * @since 3.0.0\r\n *\r\n * @return {number} -1 or +1.\r\n */\r\n sign: function ()\r\n {\r\n return this.pick(this.signs);\r\n },\r\n\r\n /**\r\n * Returns a random element from within the given array, favoring the earlier entries.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#weightedPick\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array]\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {T[]} array - The array to pick a random element from.\r\n *\r\n * @return {T} A random member of the array.\r\n */\r\n weightedPick: function (array)\r\n {\r\n return array[~~(Math.pow(this.frac(), 2) * (array.length - 1) + 0.5)];\r\n },\r\n\r\n /**\r\n * Returns a random timestamp between min and max, or between the beginning of 2000 and the end of 2020 if min and max aren't specified.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#timestamp\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random timestamp between min and max.\r\n */\r\n timestamp: function (min, max)\r\n {\r\n return this.realInRange(min || 946684800000, max || 1577862000000);\r\n },\r\n\r\n /**\r\n * Returns a random angle between -180 and 180.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#angle\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random number between -180 and 180.\r\n */\r\n angle: function ()\r\n {\r\n return this.integerInRange(-180, 180);\r\n },\r\n\r\n /**\r\n * Returns a random rotation in radians, between -3.141 and 3.141\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#rotation\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random number between -3.141 and 3.141\r\n */\r\n rotation: function ()\r\n {\r\n return this.realInRange(-3.1415926, 3.1415926);\r\n },\r\n\r\n /**\r\n * Gets or Sets the state of the generator. This allows you to retain the values\r\n * that the generator is using between games, i.e. in a game save file.\r\n *\r\n * To seed this generator with a previously saved state you can pass it as the\r\n * `seed` value in your game config, or call this method directly after Phaser has booted.\r\n *\r\n * Call this method with no parameters to return the current state.\r\n *\r\n * If providing a state it should match the same format that this method\r\n * returns, which is a string with a header `!rnd` followed by the `c`,\r\n * `s0`, `s1` and `s2` values respectively, each comma-delimited.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#state\r\n * @since 3.0.0\r\n *\r\n * @param {string} [state] - Generator state to be set.\r\n *\r\n * @return {string} The current state of the generator.\r\n */\r\n state: function (state)\r\n {\r\n if (typeof state === 'string' && state.match(/^!rnd/))\r\n {\r\n state = state.split(',');\r\n\r\n this.c = parseFloat(state[1]);\r\n this.s0 = parseFloat(state[2]);\r\n this.s1 = parseFloat(state[3]);\r\n this.s2 = parseFloat(state[4]);\r\n }\r\n\r\n return [ '!rnd', this.c, this.s0, this.s1, this.s2 ].join(',');\r\n },\r\n\r\n /**\r\n * Shuffles the given array, using the current seed.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#shuffle\r\n * @since 3.7.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array,$return]\r\n *\r\n * @param {T[]} [array] - The array to be shuffled.\r\n *\r\n * @return {T[]} The shuffled array.\r\n */\r\n shuffle: function (array)\r\n {\r\n var len = array.length - 1;\r\n\r\n for (var i = len; i > 0; i--)\r\n {\r\n var randomIndex = Math.floor(this.frac() * (i + 1));\r\n var itemAtIndex = array[randomIndex];\r\n\r\n array[randomIndex] = array[i];\r\n array[i] = itemAtIndex;\r\n }\r\n\r\n return array;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = RandomDataGenerator;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using ceil.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `15`.\r\n * As will `14` snap to `15`... but `16` will snap to `20`.\r\n *\r\n * @function Phaser.Math.Snap.Ceil\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapCeil = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.ceil(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapCeil;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using floor.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10`.\r\n * As will `14` snap to `10`... but `16` will snap to `15`.\r\n *\r\n * @function Phaser.Math.Snap.Floor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapFloor = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.floor(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapFloor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using rounding.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10` whereas `14` will snap to `15`.\r\n *\r\n * @function Phaser.Math.Snap.To\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapTo = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.round(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Snap\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Ceil: require('./SnapCeil'),\r\n Floor: require('./SnapFloor'),\r\n To: require('./SnapTo')\r\n\r\n};\r\n","/**\r\n* @author Richard Davey \r\n* @copyright 2020 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A Global Plugin is installed just once into the Game owned Plugin Manager.\r\n * It can listen for Game events and respond to them.\r\n *\r\n * @class BasePlugin\r\n * @memberof Phaser.Plugins\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n */\r\nvar BasePlugin = new Class({\r\n\r\n initialize:\r\n\r\n function BasePlugin (pluginManager)\r\n {\r\n /**\r\n * A handy reference to the Plugin Manager that is responsible for this plugin.\r\n * Can be used as a route to gain access to game systems and events.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#pluginManager\r\n * @type {Phaser.Plugins.PluginManager}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.pluginManager = pluginManager;\r\n\r\n /**\r\n * A reference to the Game instance this plugin is running under.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#game\r\n * @type {Phaser.Game}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.game = pluginManager.game;\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is first instantiated.\r\n * It will never be called again on this instance.\r\n * In here you can set-up whatever you need for this plugin to run.\r\n * If a plugin is set to automatically start then `BasePlugin.start` will be called immediately after this.\r\n * On a Scene Plugin, this method is never called. Use {@link Phaser.Plugins.ScenePlugin#boot} instead.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#init\r\n * @since 3.8.0\r\n *\r\n * @param {?any} [data] - A value specified by the user, if any, from the `data` property of the plugin's configuration object (if started at game boot) or passed in the PluginManager's `install` method (if started manually).\r\n */\r\n init: function ()\r\n {\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is started.\r\n * If a plugin is stopped, and then started again, this will get called again.\r\n * Typically called immediately after `BasePlugin.init`.\r\n * On a Scene Plugin, this method is never called.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#start\r\n * @since 3.8.0\r\n */\r\n start: function ()\r\n {\r\n // Here are the game-level events you can listen to.\r\n // At the very least you should offer a destroy handler for when the game closes down.\r\n\r\n // var eventEmitter = this.game.events;\r\n\r\n // eventEmitter.once('destroy', this.gameDestroy, this);\r\n // eventEmitter.on('pause', this.gamePause, this);\r\n // eventEmitter.on('resume', this.gameResume, this);\r\n // eventEmitter.on('resize', this.gameResize, this);\r\n // eventEmitter.on('prestep', this.gamePreStep, this);\r\n // eventEmitter.on('step', this.gameStep, this);\r\n // eventEmitter.on('poststep', this.gamePostStep, this);\r\n // eventEmitter.on('prerender', this.gamePreRender, this);\r\n // eventEmitter.on('postrender', this.gamePostRender, this);\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is stopped.\r\n * The game code has requested that your plugin stop doing whatever it does.\r\n * It is now considered as 'inactive' by the PluginManager.\r\n * Handle that process here (i.e. stop listening for events, etc)\r\n * If the plugin is started again then `BasePlugin.start` will be called again.\r\n * On a Scene Plugin, this method is never called.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#stop\r\n * @since 3.8.0\r\n */\r\n stop: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Game instance has been destroyed.\r\n * You must release everything in here, all references, all objects, free it all up.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pluginManager = null;\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BasePlugin;\r\n","/**\r\n* @author Richard Davey \r\n* @copyright 2020 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar BasePlugin = require('./BasePlugin');\r\nvar Class = require('../utils/Class');\r\nvar SceneEvents = require('../scene/events');\r\n\r\n/**\r\n * @classdesc\r\n * A Scene Level Plugin is installed into every Scene and belongs to that Scene.\r\n * It can listen for Scene events and respond to them.\r\n * It can map itself to a Scene property, or into the Scene Systems, or both.\r\n *\r\n * @class ScenePlugin\r\n * @memberof Phaser.Plugins\r\n * @extends Phaser.Plugins.BasePlugin\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n */\r\nvar ScenePlugin = new Class({\r\n\r\n Extends: BasePlugin,\r\n\r\n initialize:\r\n\r\n function ScenePlugin (scene, pluginManager)\r\n {\r\n BasePlugin.call(this, pluginManager);\r\n\r\n /**\r\n * A reference to the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#scene\r\n * @type {?Phaser.Scene}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene Systems of the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#systems\r\n * @type {?Phaser.Scenes.Systems}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * This method is called when the Scene boots. It is only ever called once.\r\n *\r\n * By this point the plugin properties `scene` and `systems` will have already been set.\r\n *\r\n * In here you can listen for {@link Phaser.Scenes.Events Scene events} and set-up whatever you need for this plugin to run.\r\n * Here are the Scene events you can listen to:\r\n *\r\n * - start\r\n * - ready\r\n * - preupdate\r\n * - update\r\n * - postupdate\r\n * - resize\r\n * - pause\r\n * - resume\r\n * - sleep\r\n * - wake\r\n * - transitioninit\r\n * - transitionstart\r\n * - transitioncomplete\r\n * - transitionout\r\n * - shutdown\r\n * - destroy\r\n *\r\n * At the very least you should offer a destroy handler for when the Scene closes down, i.e:\r\n *\r\n * ```javascript\r\n * var eventEmitter = this.systems.events;\r\n * eventEmitter.once('destroy', this.sceneDestroy, this);\r\n * ```\r\n *\r\n * @method Phaser.Plugins.ScenePlugin#boot\r\n * @since 3.8.0\r\n */\r\n boot: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Game instance has been destroyed.\r\n * \r\n * You must release everything in here, all references, all objects, free it all up.\r\n *\r\n * @method Phaser.Plugins.ScenePlugin#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pluginManager = null;\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ScenePlugin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Blend Modes.\r\n * \r\n * @namespace Phaser.BlendModes\r\n * @since 3.0.0\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * Skips the Blend Mode check in the renderer.\r\n * \r\n * @name Phaser.BlendModes.SKIP_CHECK\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SKIP_CHECK: -1,\r\n\r\n /**\r\n * Normal blend mode. For Canvas and WebGL.\r\n * This is the default setting and draws new shapes on top of the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.NORMAL\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n NORMAL: 0,\r\n\r\n /**\r\n * Add blend mode. For Canvas and WebGL.\r\n * Where both shapes overlap the color is determined by adding color values.\r\n * \r\n * @name Phaser.BlendModes.ADD\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ADD: 1,\r\n\r\n /**\r\n * Multiply blend mode. For Canvas and WebGL.\r\n * The pixels are of the top layer are multiplied with the corresponding pixel of the bottom layer. A darker picture is the result.\r\n * \r\n * @name Phaser.BlendModes.MULTIPLY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n MULTIPLY: 2,\r\n\r\n /**\r\n * Screen blend mode. For Canvas and WebGL.\r\n * The pixels are inverted, multiplied, and inverted again. A lighter picture is the result (opposite of multiply)\r\n * \r\n * @name Phaser.BlendModes.SCREEN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SCREEN: 3,\r\n\r\n /**\r\n * Overlay blend mode. For Canvas only.\r\n * A combination of multiply and screen. Dark parts on the base layer become darker, and light parts become lighter.\r\n * \r\n * @name Phaser.BlendModes.OVERLAY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n OVERLAY: 4,\r\n\r\n /**\r\n * Darken blend mode. For Canvas only.\r\n * Retains the darkest pixels of both layers.\r\n * \r\n * @name Phaser.BlendModes.DARKEN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DARKEN: 5,\r\n\r\n /**\r\n * Lighten blend mode. For Canvas only.\r\n * Retains the lightest pixels of both layers.\r\n * \r\n * @name Phaser.BlendModes.LIGHTEN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LIGHTEN: 6,\r\n\r\n /**\r\n * Color Dodge blend mode. For Canvas only.\r\n * Divides the bottom layer by the inverted top layer.\r\n * \r\n * @name Phaser.BlendModes.COLOR_DODGE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR_DODGE: 7,\r\n\r\n /**\r\n * Color Burn blend mode. For Canvas only.\r\n * Divides the inverted bottom layer by the top layer, and then inverts the result.\r\n * \r\n * @name Phaser.BlendModes.COLOR_BURN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR_BURN: 8,\r\n\r\n /**\r\n * Hard Light blend mode. For Canvas only.\r\n * A combination of multiply and screen like overlay, but with top and bottom layer swapped.\r\n * \r\n * @name Phaser.BlendModes.HARD_LIGHT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HARD_LIGHT: 9,\r\n\r\n /**\r\n * Soft Light blend mode. For Canvas only.\r\n * A softer version of hard-light. Pure black or white does not result in pure black or white.\r\n * \r\n * @name Phaser.BlendModes.SOFT_LIGHT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOFT_LIGHT: 10,\r\n\r\n /**\r\n * Difference blend mode. For Canvas only.\r\n * Subtracts the bottom layer from the top layer or the other way round to always get a positive value.\r\n * \r\n * @name Phaser.BlendModes.DIFFERENCE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DIFFERENCE: 11,\r\n\r\n /**\r\n * Exclusion blend mode. For Canvas only.\r\n * Like difference, but with lower contrast.\r\n * \r\n * @name Phaser.BlendModes.EXCLUSION\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n EXCLUSION: 12,\r\n\r\n /**\r\n * Hue blend mode. For Canvas only.\r\n * Preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer.\r\n * \r\n * @name Phaser.BlendModes.HUE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HUE: 13,\r\n\r\n /**\r\n * Saturation blend mode. For Canvas only.\r\n * Preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer.\r\n * \r\n * @name Phaser.BlendModes.SATURATION\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SATURATION: 14,\r\n\r\n /**\r\n * Color blend mode. For Canvas only.\r\n * Preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer.\r\n * \r\n * @name Phaser.BlendModes.COLOR\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR: 15,\r\n\r\n /**\r\n * Luminosity blend mode. For Canvas only.\r\n * Preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer.\r\n * \r\n * @name Phaser.BlendModes.LUMINOSITY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LUMINOSITY: 16,\r\n\r\n /**\r\n * Alpha erase blend mode. For Canvas and WebGL.\r\n * \r\n * @name Phaser.BlendModes.ERASE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ERASE: 17,\r\n\r\n /**\r\n * Source-in blend mode. For Canvas only.\r\n * The new shape is drawn only where both the new shape and the destination canvas overlap. Everything else is made transparent.\r\n * \r\n * @name Phaser.BlendModes.SOURCE_IN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_IN: 18,\r\n\r\n /**\r\n * Source-out blend mode. For Canvas only.\r\n * The new shape is drawn where it doesn't overlap the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.SOURCE_OUT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_OUT: 19,\r\n\r\n /**\r\n * Source-out blend mode. For Canvas only.\r\n * The new shape is only drawn where it overlaps the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.SOURCE_ATOP\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_ATOP: 20,\r\n\r\n /**\r\n * Destination-over blend mode. For Canvas only.\r\n * New shapes are drawn behind the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_OVER\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_OVER: 21,\r\n\r\n /**\r\n * Destination-in blend mode. For Canvas only.\r\n * The existing canvas content is kept where both the new shape and existing canvas content overlap. Everything else is made transparent.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_IN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_IN: 22,\r\n\r\n /**\r\n * Destination-out blend mode. For Canvas only.\r\n * The existing content is kept where it doesn't overlap the new shape.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_OUT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_OUT: 23,\r\n\r\n /**\r\n * Destination-out blend mode. For Canvas only.\r\n * The existing canvas is only kept where it overlaps the new shape. The new shape is drawn behind the canvas content.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_ATOP\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_ATOP: 24,\r\n\r\n /**\r\n * Lighten blend mode. For Canvas only.\r\n * Where both shapes overlap the color is determined by adding color values.\r\n * \r\n * @name Phaser.BlendModes.LIGHTER\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LIGHTER: 25,\r\n\r\n /**\r\n * Copy blend mode. For Canvas only.\r\n * Only the new shape is shown.\r\n * \r\n * @name Phaser.BlendModes.COPY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COPY: 26,\r\n\r\n /**\r\n * Xor blend mode. For Canvas only.\r\n * Shapes are made transparent where both overlap and drawn normal everywhere else.\r\n * \r\n * @name Phaser.BlendModes.XOR\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n XOR: 27\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scale Manager Resize Event.\r\n * \r\n * This event is dispatched whenever the Scale Manager detects a resize event from the browser.\r\n * It sends three parameters to the callback, each of them being Size components. You can read\r\n * the `width`, `height`, `aspectRatio` and other properties of these components to help with\r\n * scaling your own game content.\r\n *\r\n * @event Phaser.Scale.Events#RESIZE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Structs.Size} gameSize - A reference to the Game Size component. This is the un-scaled size of your game canvas.\r\n * @param {Phaser.Structs.Size} baseSize - A reference to the Base Size component. This is the game size multiplied by resolution.\r\n * @param {Phaser.Structs.Size} displaySize - A reference to the Display Size component. This is the scaled canvas size, after applying zoom and scale mode.\r\n * @param {number} resolution - The current resolution. Defaults to 1 at the moment.\r\n * @param {number} previousWidth - If the `gameSize` has changed, this value contains its previous width, otherwise it contains the current width.\r\n * @param {number} previousHeight - If the `gameSize` has changed, this value contains its previous height, otherwise it contains the current height.\r\n */\r\nmodule.exports = 'resize';\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Added to Scene Event.\n *\n * This event is dispatched when a Game Object is added to a Scene.\n *\n * Listen for it from a Scene using `this.scene.events.on('addedtoscene', listener)`.\n *\n * @event Phaser.Scenes.Events#ADDED_TO_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\n */\nmodule.exports = 'addedtoscene';\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Boot Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems boot process. Primarily used by Scene Plugins.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('boot', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#BOOT\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'boot';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Create Event.\r\n * \r\n * This event is dispatched by a Scene after it has been created by the Scene Manager.\r\n * \r\n * If a Scene has a `create` method then this event is emitted _after_ that has run.\r\n * \r\n * If there is a transition, this event will be fired after the `TRANSITION_START` event.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('create', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#CREATE\r\n * @since 3.17.0\r\n * \r\n * @param {Phaser.Scene} scene - A reference to the Scene that emitted this event.\r\n */\r\nmodule.exports = 'create';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Destroy Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems destroy process.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('destroy', listener)`.\r\n * \r\n * You should destroy any resources that may be in use by your Scene in this event handler.\r\n * \r\n * @event Phaser.Scenes.Events#DESTROY\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pause Event.\r\n * \r\n * This event is dispatched by a Scene when it is paused, either directly via the `pause` method, or as an\r\n * action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('pause', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#PAUSE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was paused.\r\n */\r\nmodule.exports = 'pause';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Post Update Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('postupdate', listener)`.\r\n * \r\n * A Scene will only run its step if it is active.\r\n * \r\n * @event Phaser.Scenes.Events#POST_UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'postupdate';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pre Update Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('preupdate', listener)`.\r\n * \r\n * A Scene will only run its step if it is active.\r\n * \r\n * @event Phaser.Scenes.Events#PRE_UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'preupdate';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Ready Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems start process.\r\n * By this point in the process the Scene is now fully active and rendering.\r\n * This event is meant for your game code to use, as all plugins have responded to the earlier 'start' event.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('ready', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#READY\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was started.\r\n */\r\nmodule.exports = 'ready';\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Removed from Scene Event.\n *\n * This event is dispatched when a Game Object is removed from a Scene.\n *\n * Listen for it from a Scene using `this.scene.events.on('removedfromscene', listener)`.\n *\n * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\n */\nmodule.exports = 'removedfromscene';\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Render Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('render', listener)`.\r\n * \r\n * A Scene will only render if it is visible and active.\r\n * By the time this event is dispatched, the Scene will have already been rendered.\r\n * \r\n * @event Phaser.Scenes.Events#RENDER\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\r\n */\r\nmodule.exports = 'render';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Resume Event.\r\n * \r\n * This event is dispatched by a Scene when it is resumed from a paused state, either directly via the `resume` method,\r\n * or as an action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('resume', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#RESUME\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was resumed.\r\n */\r\nmodule.exports = 'resume';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Shutdown Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems shutdown process.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('shutdown', listener)`.\r\n * \r\n * You should free-up any resources that may be in use by your Scene in this event handler, on the understanding\r\n * that the Scene may, at any time, become active again. A shutdown Scene is not 'destroyed', it's simply not\r\n * currently active. Use the [DESTROY]{@linkcode Phaser.Scenes.Events#event:DESTROY} event to completely clear resources.\r\n * \r\n * @event Phaser.Scenes.Events#SHUTDOWN\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was shutdown.\r\n */\r\nmodule.exports = 'shutdown';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Sleep Event.\r\n * \r\n * This event is dispatched by a Scene when it is sent to sleep, either directly via the `sleep` method,\r\n * or as an action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('sleep', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#SLEEP\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was sent to sleep.\r\n */\r\nmodule.exports = 'sleep';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Start Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems start process. Primarily used by Scene Plugins.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('start', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#START\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Complete Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition.\r\n * \r\n * It happens when the transition process has completed. This occurs when the duration timer equals or exceeds the duration\r\n * of the transition.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitioncomplete', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_COMPLETE\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} scene -The Scene on which the transitioned completed.\r\n */\r\nmodule.exports = 'transitioncomplete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Init Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition.\r\n * \r\n * It happens immediately after the `Scene.init` method is called. If the Scene does not have an `init` method,\r\n * this event is not dispatched.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitioninit', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_INIT\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitioninit';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Out Event.\r\n * \r\n * This event is dispatched by a Scene when it initiates a transition to another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitionout', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_OUT\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} target - A reference to the Scene that is being transitioned to.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionout';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Start Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition, only if that Scene was not asleep.\r\n * \r\n * It happens immediately after the `Scene.create` method is called. If the Scene does not have a `create` method,\r\n * this event is dispatched anyway.\r\n * \r\n * If the Target Scene was sleeping then the [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} event is\r\n * dispatched instead of this event.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitionstart', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_START\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionstart';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Wake Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition, only if that Scene was asleep before\r\n * the transition began. If the Scene was not asleep the [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} event is dispatched instead.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitionwake', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_WAKE\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionwake';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Update Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('update', listener)`.\r\n * \r\n * A Scene will only run its step if it is active.\r\n * \r\n * @event Phaser.Scenes.Events#UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'update';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Wake Event.\r\n * \r\n * This event is dispatched by a Scene when it is woken from sleep, either directly via the `wake` method,\r\n * or as an action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('wake', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#WAKE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was woken up.\r\n */\r\nmodule.exports = 'wake';\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Scenes.Events\n */\n\nmodule.exports = {\n\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\n BOOT: require('./BOOT_EVENT'),\n CREATE: require('./CREATE_EVENT'),\n DESTROY: require('./DESTROY_EVENT'),\n PAUSE: require('./PAUSE_EVENT'),\n POST_UPDATE: require('./POST_UPDATE_EVENT'),\n PRE_UPDATE: require('./PRE_UPDATE_EVENT'),\n READY: require('./READY_EVENT'),\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'),\n RENDER: require('./RENDER_EVENT'),\n RESUME: require('./RESUME_EVENT'),\n SHUTDOWN: require('./SHUTDOWN_EVENT'),\n SLEEP: require('./SLEEP_EVENT'),\n START: require('./START_EVENT'),\n TRANSITION_COMPLETE: require('./TRANSITION_COMPLETE_EVENT'),\n TRANSITION_INIT: require('./TRANSITION_INIT_EVENT'),\n TRANSITION_OUT: require('./TRANSITION_OUT_EVENT'),\n TRANSITION_START: require('./TRANSITION_START_EVENT'),\n TRANSITION_WAKE: require('./TRANSITION_WAKE_EVENT'),\n UPDATE: require('./UPDATE_EVENT'),\n WAKE: require('./WAKE_EVENT')\n\n};\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Taken from klasse by mattdesl https://github.com/mattdesl/klasse\r\n\r\nfunction hasGetterOrSetter (def)\r\n{\r\n return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function');\r\n}\r\n\r\nfunction getProperty (definition, k, isClassDescriptor)\r\n{\r\n // This may be a lightweight object, OR it might be a property that was defined previously.\r\n\r\n // For simple class descriptors we can just assume its NOT previously defined.\r\n var def = (isClassDescriptor) ? definition[k] : Object.getOwnPropertyDescriptor(definition, k);\r\n\r\n if (!isClassDescriptor && def.value && typeof def.value === 'object')\r\n {\r\n def = def.value;\r\n }\r\n\r\n // This might be a regular property, or it may be a getter/setter the user defined in a class.\r\n if (def && hasGetterOrSetter(def))\r\n {\r\n if (typeof def.enumerable === 'undefined')\r\n {\r\n def.enumerable = true;\r\n }\r\n\r\n if (typeof def.configurable === 'undefined')\r\n {\r\n def.configurable = true;\r\n }\r\n\r\n return def;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n}\r\n\r\nfunction hasNonConfigurable (obj, k)\r\n{\r\n var prop = Object.getOwnPropertyDescriptor(obj, k);\r\n\r\n if (!prop)\r\n {\r\n return false;\r\n }\r\n\r\n if (prop.value && typeof prop.value === 'object')\r\n {\r\n prop = prop.value;\r\n }\r\n\r\n if (prop.configurable === false)\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\n/**\r\n * Extends the given `myClass` object's prototype with the properties of `definition`.\r\n *\r\n * @function extend\r\n * @param {Object} ctor The constructor object to mix into.\r\n * @param {Object} definition A dictionary of functions for the class.\r\n * @param {boolean} isClassDescriptor Is the definition a class descriptor?\r\n * @param {Object} [extend] The parent constructor object.\r\n */\r\nfunction extend (ctor, definition, isClassDescriptor, extend)\r\n{\r\n for (var k in definition)\r\n {\r\n if (!definition.hasOwnProperty(k))\r\n {\r\n continue;\r\n }\r\n\r\n var def = getProperty(definition, k, isClassDescriptor);\r\n\r\n if (def !== false)\r\n {\r\n // If Extends is used, we will check its prototype to see if the final variable exists.\r\n\r\n var parent = extend || ctor;\r\n\r\n if (hasNonConfigurable(parent.prototype, k))\r\n {\r\n // Just skip the final property\r\n if (Class.ignoreFinals)\r\n {\r\n continue;\r\n }\r\n\r\n // We cannot re-define a property that is configurable=false.\r\n // So we will consider them final and throw an error. This is by\r\n // default so it is clear to the developer what is happening.\r\n // You can set ignoreFinals to true if you need to extend a class\r\n // which has configurable=false; it will simply not re-define final properties.\r\n throw new Error('cannot override final property \\'' + k + '\\', set Class.ignoreFinals = true to skip');\r\n }\r\n\r\n Object.defineProperty(ctor.prototype, k, def);\r\n }\r\n else\r\n {\r\n ctor.prototype[k] = definition[k];\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Applies the given `mixins` to the prototype of `myClass`.\r\n *\r\n * @function mixin\r\n * @param {Object} myClass The constructor object to mix into.\r\n * @param {Object|Array} mixins The mixins to apply to the constructor.\r\n */\r\nfunction mixin (myClass, mixins)\r\n{\r\n if (!mixins)\r\n {\r\n return;\r\n }\r\n\r\n if (!Array.isArray(mixins))\r\n {\r\n mixins = [ mixins ];\r\n }\r\n\r\n for (var i = 0; i < mixins.length; i++)\r\n {\r\n extend(myClass, mixins[i].prototype || mixins[i]);\r\n }\r\n}\r\n\r\n/**\r\n * Creates a new class with the given descriptor.\r\n * The constructor, defined by the name `initialize`,\r\n * is an optional function. If unspecified, an anonymous\r\n * function will be used which calls the parent class (if\r\n * one exists).\r\n *\r\n * You can also use `Extends` and `Mixins` to provide subclassing\r\n * and inheritance.\r\n *\r\n * @class Phaser.Class\r\n * @constructor\r\n * @param {Object} definition a dictionary of functions for the class\r\n * @example\r\n *\r\n * var MyClass = new Phaser.Class({\r\n *\r\n * initialize: function() {\r\n * this.foo = 2.0;\r\n * },\r\n *\r\n * bar: function() {\r\n * return this.foo + 5;\r\n * }\r\n * });\r\n */\r\nfunction Class (definition)\r\n{\r\n if (!definition)\r\n {\r\n definition = {};\r\n }\r\n\r\n // The variable name here dictates what we see in Chrome debugger\r\n var initialize;\r\n var Extends;\r\n\r\n if (definition.initialize)\r\n {\r\n if (typeof definition.initialize !== 'function')\r\n {\r\n throw new Error('initialize must be a function');\r\n }\r\n\r\n initialize = definition.initialize;\r\n\r\n // Usually we should avoid 'delete' in V8 at all costs.\r\n // However, its unlikely to make any performance difference\r\n // here since we only call this on class creation (i.e. not object creation).\r\n delete definition.initialize;\r\n }\r\n else if (definition.Extends)\r\n {\r\n var base = definition.Extends;\r\n\r\n initialize = function ()\r\n {\r\n base.apply(this, arguments);\r\n };\r\n }\r\n else\r\n {\r\n initialize = function () {};\r\n }\r\n\r\n if (definition.Extends)\r\n {\r\n initialize.prototype = Object.create(definition.Extends.prototype);\r\n initialize.prototype.constructor = initialize;\r\n\r\n // For getOwnPropertyDescriptor to work, we need to act directly on the Extends (or Mixin)\r\n\r\n Extends = definition.Extends;\r\n\r\n delete definition.Extends;\r\n }\r\n else\r\n {\r\n initialize.prototype.constructor = initialize;\r\n }\r\n\r\n // Grab the mixins, if they are specified...\r\n var mixins = null;\r\n\r\n if (definition.Mixins)\r\n {\r\n mixins = definition.Mixins;\r\n delete definition.Mixins;\r\n }\r\n\r\n // First, mixin if we can.\r\n mixin(initialize, mixins);\r\n\r\n // Now we grab the actual definition which defines the overrides.\r\n extend(initialize, definition, true, Extends);\r\n\r\n return initialize;\r\n}\r\n\r\nClass.extend = extend;\r\nClass.mixin = mixin;\r\nClass.ignoreFinals = false;\r\n\r\nmodule.exports = Class;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A NOOP (No Operation) callback function.\r\n *\r\n * Used internally by Phaser when it's more expensive to determine if a callback exists\r\n * than it is to just invoke an empty function.\r\n *\r\n * @function Phaser.Utils.NOOP\r\n * @since 3.0.0\r\n */\r\nvar NOOP = function ()\r\n{\r\n // NOOP\r\n};\r\n\r\nmodule.exports = NOOP;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar IsPlainObject = require('./IsPlainObject');\r\n\r\n// @param {boolean} deep - Perform a deep copy?\r\n// @param {object} target - The target object to copy to.\r\n// @return {object} The extended object.\r\n\r\n/**\r\n * This is a slightly modified version of http://api.jquery.com/jQuery.extend/\r\n *\r\n * @function Phaser.Utils.Objects.Extend\r\n * @since 3.0.0\r\n *\r\n * @param {...*} [args] - The objects that will be mixed.\r\n *\r\n * @return {object} The extended object.\r\n */\r\nvar Extend = function ()\r\n{\r\n var options, name, src, copy, copyIsArray, clone,\r\n target = arguments[0] || {},\r\n i = 1,\r\n length = arguments.length,\r\n deep = false;\r\n\r\n // Handle a deep copy situation\r\n if (typeof target === 'boolean')\r\n {\r\n deep = target;\r\n target = arguments[1] || {};\r\n\r\n // skip the boolean and the target\r\n i = 2;\r\n }\r\n\r\n // extend Phaser if only one argument is passed\r\n if (length === i)\r\n {\r\n target = this;\r\n --i;\r\n }\r\n\r\n for (; i < length; i++)\r\n {\r\n // Only deal with non-null/undefined values\r\n if ((options = arguments[i]) != null)\r\n {\r\n // Extend the base object\r\n for (name in options)\r\n {\r\n src = target[name];\r\n copy = options[name];\r\n\r\n // Prevent never-ending loop\r\n if (target === copy)\r\n {\r\n continue;\r\n }\r\n\r\n // Recurse if we're merging plain objects or arrays\r\n if (deep && copy && (IsPlainObject(copy) || (copyIsArray = Array.isArray(copy))))\r\n {\r\n if (copyIsArray)\r\n {\r\n copyIsArray = false;\r\n clone = src && Array.isArray(src) ? src : [];\r\n }\r\n else\r\n {\r\n clone = src && IsPlainObject(src) ? src : {};\r\n }\r\n\r\n // Never move original objects, clone them\r\n target[name] = Extend(deep, clone, copy);\r\n\r\n // Don't bring in undefined values\r\n }\r\n else if (copy !== undefined)\r\n {\r\n target[name] = copy;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Return the modified object\r\n return target;\r\n};\r\n\r\nmodule.exports = Extend;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH = require('../../math');\r\nvar GetValue = require('./GetValue');\r\n\r\n/**\r\n * Retrieves a value from an object. Allows for more advanced selection options, including:\r\n *\r\n * Allowed types:\r\n * \r\n * Implicit\r\n * {\r\n * x: 4\r\n * }\r\n *\r\n * From function\r\n * {\r\n * x: function ()\r\n * }\r\n *\r\n * Randomly pick one element from the array\r\n * {\r\n * x: [a, b, c, d, e, f]\r\n * }\r\n *\r\n * Random integer between min and max:\r\n * {\r\n * x: { randInt: [min, max] }\r\n * }\r\n *\r\n * Random float between min and max:\r\n * {\r\n * x: { randFloat: [min, max] }\r\n * }\r\n * \r\n *\r\n * @function Phaser.Utils.Objects.GetAdvancedValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\r\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetAdvancedValue = function (source, key, defaultValue)\r\n{\r\n var value = GetValue(source, key, null);\r\n\r\n if (value === null)\r\n {\r\n return defaultValue;\r\n }\r\n else if (Array.isArray(value))\r\n {\r\n return MATH.RND.pick(value);\r\n }\r\n else if (typeof value === 'object')\r\n {\r\n if (value.hasOwnProperty('randInt'))\r\n {\r\n return MATH.RND.integerInRange(value.randInt[0], value.randInt[1]);\r\n }\r\n else if (value.hasOwnProperty('randFloat'))\r\n {\r\n return MATH.RND.realInRange(value.randFloat[0], value.randFloat[1]);\r\n }\r\n }\r\n else if (typeof value === 'function')\r\n {\r\n return value(key);\r\n }\r\n\r\n return value;\r\n};\r\n\r\nmodule.exports = GetAdvancedValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Finds the key within the top level of the {@link source} object, or returns {@link defaultValue}\r\n *\r\n * @function Phaser.Utils.Objects.GetFastValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to search\r\n * @param {string} key - The key for the property on source. Must exist at the top level of the source object (no periods)\r\n * @param {*} [defaultValue] - The default value to use if the key does not exist.\r\n *\r\n * @return {*} The value if found; otherwise, defaultValue (null if none provided)\r\n */\r\nvar GetFastValue = function (source, key, defaultValue)\r\n{\r\n var t = typeof(source);\r\n\r\n if (!source || t === 'number' || t === 'string')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key) && source[key] !== undefined)\r\n {\r\n return source[key];\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetFastValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Source object\r\n// The key as a string, or an array of keys, i.e. 'banner', or 'banner.hideBanner'\r\n// The default value to use if the key doesn't exist\r\n\r\n/**\r\n * Retrieves a value from an object.\r\n *\r\n * @function Phaser.Utils.Objects.GetValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\r\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetValue = function (source, key, defaultValue)\r\n{\r\n if (!source || typeof source === 'number')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key))\r\n {\r\n return source[key];\r\n }\r\n else if (key.indexOf('.') !== -1)\r\n {\r\n var keys = key.split('.');\r\n var parent = source;\r\n var value = defaultValue;\r\n\r\n // Use for loop here so we can break early\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n if (parent.hasOwnProperty(keys[i]))\r\n {\r\n // Yes it has a key property, let's carry on down\r\n value = parent[keys[i]];\r\n\r\n parent = parent[keys[i]];\r\n }\r\n else\r\n {\r\n // Can't go any further, so reset to default\r\n value = defaultValue;\r\n break;\r\n }\r\n }\r\n\r\n return value;\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * This is a slightly modified version of jQuery.isPlainObject.\r\n * A plain object is an object whose internal class property is [object Object].\r\n *\r\n * @function Phaser.Utils.Objects.IsPlainObject\r\n * @since 3.0.0\r\n *\r\n * @param {object} obj - The object to inspect.\r\n *\r\n * @return {boolean} `true` if the object is plain, otherwise `false`.\r\n */\r\nvar IsPlainObject = function (obj)\r\n{\r\n // Not plain objects:\r\n // - Any object or value whose internal [[Class]] property is not \"[object Object]\"\r\n // - DOM nodes\r\n // - window\r\n if (typeof(obj) !== 'object' || obj.nodeType || obj === obj.window)\r\n {\r\n return false;\r\n }\r\n\r\n // Support: Firefox <20\r\n // The try/catch suppresses exceptions thrown when attempting to access\r\n // the \"constructor\" property of certain host objects, ie. |window.location|\r\n // https://bugzilla.mozilla.org/show_bug.cgi?id=814622\r\n try\r\n {\r\n if (obj.constructor && !({}).hasOwnProperty.call(obj.constructor.prototype, 'isPrototypeOf'))\r\n {\r\n return false;\r\n }\r\n }\r\n catch (e)\r\n {\r\n return false;\r\n }\r\n\r\n // If the function hasn't returned already, we're confident that\r\n // |obj| is a plain object, created by {} or constructed with new Object\r\n return true;\r\n};\r\n\r\nmodule.exports = IsPlainObject;\r\n","/**\n * @author Richard Davey \n * @copyright 2018 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar Class = require('../../../src/utils/Class');\nvar GetFastValue = require('../../../src/utils/object/GetFastValue');\nvar ImageFile = require('../../../src/loader/filetypes/ImageFile.js');\nvar IsPlainObject = require('../../../src/utils/object/IsPlainObject');\nvar JSONFile = require('../../../src/loader/filetypes/JSONFile.js');\nvar MultiFile = require('../../../src/loader/MultiFile.js');\nvar TextFile = require('../../../src/loader/filetypes/TextFile.js');\n\n/**\n * @typedef {object} Phaser.Loader.FileTypes.SpineFileConfig\n *\n * @property {string} key - The key of the file. Must be unique within both the Loader and the Texture Manager.\n * @property {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\n * @property {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\n * @property {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\n * @property {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\n * @property {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\n */\n\n/**\n * @classdesc\n * A Spine File suitable for loading by the Loader.\n *\n * These are created when you use the Phaser.Loader.LoaderPlugin#spine method and are not typically created directly.\n *\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#spine.\n *\n * @class SpineFile\n * @extends Phaser.Loader.MultiFile\n * @memberof Phaser.Loader.FileTypes\n * @constructor\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\n * @param {(string|Phaser.Loader.FileTypes.SpineFileConfig)} key - The key to use for this file, or a file configuration object.\n * @param {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\n * @param {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\n * @param {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\n * @param {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\n */\nvar SpineFile = new Class({\n\n Extends: MultiFile,\n\n initialize:\n\n function SpineFile (loader, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings)\n {\n var i;\n var json;\n var atlas;\n var files = [];\n var cache = loader.cacheManager.custom.spine;\n\n // atlas can be an array of atlas files, not just a single one\n\n if (IsPlainObject(key))\n {\n var config = key;\n\n key = GetFastValue(config, 'key');\n\n json = new JSONFile(loader, {\n key: key,\n url: GetFastValue(config, 'jsonURL'),\n extension: GetFastValue(config, 'jsonExtension', 'json'),\n xhrSettings: GetFastValue(config, 'jsonXhrSettings')\n });\n\n atlasURL = GetFastValue(config, 'atlasURL');\n preMultipliedAlpha = GetFastValue(config, 'preMultipliedAlpha');\n\n if (!Array.isArray(atlasURL))\n {\n atlasURL = [ atlasURL ];\n }\n\n for (i = 0; i < atlasURL.length; i++)\n {\n atlas = new TextFile(loader, {\n key: key + '_' + i,\n url: atlasURL[i],\n extension: GetFastValue(config, 'atlasExtension', 'atlas'),\n xhrSettings: GetFastValue(config, 'atlasXhrSettings')\n });\n\n atlas.cache = cache;\n\n files.push(atlas);\n }\n }\n else\n {\n json = new JSONFile(loader, key, jsonURL, jsonXhrSettings);\n\n if (!Array.isArray(atlasURL))\n {\n atlasURL = [ atlasURL ];\n }\n\n for (i = 0; i < atlasURL.length; i++)\n {\n atlas = new TextFile(loader, key + '_' + i, atlasURL[i], atlasXhrSettings);\n atlas.cache = cache;\n\n files.push(atlas);\n }\n }\n\n files.unshift(json);\n\n MultiFile.call(this, loader, 'spine', key, files);\n\n this.config.preMultipliedAlpha = preMultipliedAlpha;\n },\n\n /**\n * Called by each File when it finishes loading.\n *\n * @method Phaser.Loader.FileTypes.SpineFile#onFileComplete\n * @since 3.19.0\n *\n * @param {Phaser.Loader.File} file - The File that has completed processing.\n */\n onFileComplete: function (file)\n {\n var index = this.files.indexOf(file);\n\n if (index !== -1)\n {\n this.pending--;\n\n if (file.type === 'text')\n {\n // Inspect the data for the files to now load\n var content = file.data.split('\\n');\n\n // Extract the textures\n var textures = [];\n\n for (var t = 0; t < content.length; t++)\n {\n var line = content[t];\n\n if (line.trim() === '' && t < content.length - 1)\n {\n line = content[t + 1];\n\n textures.push(line);\n }\n }\n\n var config = this.config;\n var loader = this.loader;\n\n var currentBaseURL = loader.baseURL;\n var currentPath = loader.path;\n var currentPrefix = loader.prefix;\n\n var baseURL = GetFastValue(config, 'baseURL', this.baseURL);\n var path = GetFastValue(config, 'path', file.src.match(/^.*\\//))[0];\n var prefix = GetFastValue(config, 'prefix', this.prefix);\n var textureXhrSettings = GetFastValue(config, 'textureXhrSettings');\n\n loader.setBaseURL(baseURL);\n loader.setPath(path);\n loader.setPrefix(prefix);\n\n for (var i = 0; i < textures.length; i++)\n {\n var textureURL = textures[i];\n\n var key = this.prefix + textureURL;\n\n var image = new ImageFile(loader, key, textureURL, textureXhrSettings);\n\n this.addToMultiFile(image);\n\n loader.addFile(image);\n }\n\n // Reset the loader settings\n loader.setBaseURL(currentBaseURL);\n loader.setPath(currentPath);\n loader.setPrefix(currentPrefix);\n }\n }\n },\n\n /**\n * Adds this file to its target cache upon successful loading and processing.\n *\n * @method Phaser.Loader.FileTypes.SpineFile#addToCache\n * @since 3.19.0\n */\n addToCache: function ()\n {\n if (this.isReadyToProcess())\n {\n var fileJSON = this.files[0];\n\n fileJSON.addToCache();\n\n var atlasCache;\n var atlasKey = '';\n var combinedAtlasData = '';\n var preMultipliedAlpha = (this.config.preMultipliedAlpha) ? true : false;\n\n for (var i = 1; i < this.files.length; i++)\n {\n var file = this.files[i];\n\n if (file.type === 'text')\n {\n atlasKey = file.key.replace(/_[\\d]$/, '');\n\n atlasCache = file.cache;\n\n combinedAtlasData = combinedAtlasData.concat(file.data);\n }\n else\n {\n var src = file.key.trim();\n var pos = src.indexOf('_');\n var key = src.substr(pos + 1);\n\n this.loader.textureManager.addImage(key, file.data);\n }\n\n file.pendingDestroy();\n }\n\n atlasCache.add(atlasKey, { preMultipliedAlpha: preMultipliedAlpha, data: combinedAtlasData, prefix: this.prefix });\n\n this.complete = true;\n }\n }\n\n});\n\nmodule.exports = SpineFile;\n","/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar BuildGameObject = require('../../../src/gameobjects/BuildGameObject');\nvar Class = require('../../../src/utils/Class');\nvar GetValue = require('../../../src/utils/object/GetValue');\nvar ResizeEvent = require('../../../src/scale/events/RESIZE_EVENT');\nvar ScenePlugin = require('../../../src/plugins/ScenePlugin');\nvar Spine = require('Spine');\nvar SpineFile = require('./SpineFile');\nvar SpineGameObject = require('./gameobject/SpineGameObject');\n\n/**\n * @classdesc\n * The Spine Plugin is a Scene based plugin that handles the creation and rendering of Spine Game Objects.\n *\n * Find more details about Spine itself at http://esotericsoftware.com/.\n *\n * All rendering and object creation is handled via the official Spine Runtimes. This version of the plugin\n * uses the Spine 3.8.95 runtimes. Please note that due to the way the Spine runtimes use semver, you will\n * get breaking changes in point-releases. Therefore, files created in a different version of Spine may not\n * work as a result, without you first updating the runtimes and rebuilding the plugin.\n *\n * Esoteric themselves recommend that you freeze your Spine editor version against the runtime versions.\n * You can find more information about this here: http://esotericsoftware.com/spine-settings#Version\n *\n * Please note that you require a Spine license in order to use Spine Runtimes in your games.\n *\n * You can install this plugin into your Phaser game by either importing it, if you're using ES6:\n *\n * ```javascript\n * import * as SpinePlugin from './SpinePlugin.js';\n * ```\n *\n * and then adding it to your Phaser Game configuration:\n *\n * ```javascript\n * plugins: {\n * scene: [\n * { key: 'SpinePlugin', plugin: window.SpinePlugin, mapping: 'spine' }\n * ]\n * }\n * ```\n *\n * If you're using ES5 then you can load the Spine Plugin in a Scene files payload, _within_ your\n * Game Configuration object, like this:\n *\n * ```javascript\n * scene: {\n * preload: preload,\n * create: create,\n * pack: {\n * files: [\n * { type: 'scenePlugin', key: 'SpinePlugin', url: 'plugins/SpinePlugin.js', sceneKey: 'spine' }\n * ]\n * }\n * }\n * ```\n *\n * Loading it like this allows you to then use commands such as `this.load.spine` from within the\n * same Scene. Alternatively, you can use the method `this.load.plugin` to load the plugin via the normal\n * Phaser Loader. However, doing so will not add it to the current Scene. It will be available from any\n * subsequent Scenes.\n *\n * Assuming a default environment you access it from within a Scene by using the `this.spine` reference.\n *\n * When this plugin is installed into a Scene it will add a Loader File Type, allowing you to load\n * Spine files directly, i.e.:\n *\n * ```javascript\n * this.load.spine('stretchyman', 'stretchyman-pro.json', [ 'stretchyman-pma.atlas' ], true);\n * ```\n *\n * It also installs a Game Object Factory method, allowing you to create Spine Game Objects:\n *\n * ```javascript\n * this.add.spine(512, 650, 'stretchyman')\n * ```\n *\n * The first argument is the key which you used when importing the Spine data. There are lots of\n * things you can specify, such as the animation name, skeleton, slot attachments and more. Please\n * see the respective documentation and examples for further details.\n *\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary.\n * The associated atlas files are scanned for any texture files present in them, which are then loaded.\n * If you have exported your Spine data with preMultipliedAlpha set, then you should enable this in the\n * load arguments, or you may see black outlines around skeleton textures.\n *\n * The Spine plugin is local to the Scene in which it is installed. This means a change to something,\n * such as the Skeleton Debug Renderer, in this Scene, will not impact the renderer in any other Scene.\n * The only exception to this is with the caches this plugin creates. Spine atlas and texture data are\n * stored in their own caches, which are global, meaning they're accessible from any Scene in your\n * game, regardless if the Scene loaded the Spine data or not.\n *\n * For details about the Spine Runtime API see http://esotericsoftware.com/spine-api-reference\n *\n * @class SpinePlugin\n * @extends Phaser.Plugins.ScenePlugin\n * @constructor\n * @since 3.19.0\n *\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Phaser Plugin Manager.\n */\nvar SpinePlugin = new Class({\n\n Extends: ScenePlugin,\n\n initialize:\n\n function SpinePlugin (scene, pluginManager)\n {\n ScenePlugin.call(this, scene, pluginManager);\n\n var game = pluginManager.game;\n\n /**\n * A read-only flag that indicates if the game is running under WebGL or Canvas.\n *\n * @name SpinePlugin#isWebGL\n * @type {boolean}\n * @readonly\n * @since 3.19.0\n */\n this.isWebGL = (game.config.renderType === 2);\n\n /**\n * A custom cache that stores the Spine atlas data.\n *\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\n * no matter which Scene you are in.\n *\n * @name SpinePlugin#cache\n * @type {Phaser.Cache.BaseCache}\n * @since 3.19.0\n */\n this.cache = game.cache.addCustom('spine');\n\n /**\n * A custom cache that stores the Spine Textures.\n *\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\n * no matter which Scene you are in.\n *\n * @name SpinePlugin#spineTextures\n * @type {Phaser.Cache.BaseCache}\n * @since 3.19.0\n */\n this.spineTextures = game.cache.addCustom('spineTextures');\n\n /**\n * A reference to the global JSON Cache.\n *\n * @name SpinePlugin#json\n * @type {Phaser.Cache.BaseCache}\n * @since 3.19.0\n */\n this.json = game.cache.json;\n\n /**\n * A reference to the global Texture Manager.\n *\n * @name SpinePlugin#textures\n * @type {Phaser.Textures.TextureManager}\n * @since 3.19.0\n */\n this.textures = game.textures;\n\n /**\n * A flag that sets if the Skeleton Renderers will render debug information over the top\n * of the skeleton or not.\n *\n * @name SpinePlugin#drawDebug\n * @type {boolean}\n * @since 3.19.0\n */\n this.drawDebug = false;\n\n /**\n * The underlying WebGL context of the Phaser renderer.\n *\n * Only set if running in WebGL mode.\n *\n * @name SpinePlugin#gl\n * @type {WebGLRenderingContext}\n * @since 3.19.0\n */\n this.gl;\n\n /**\n * A reference to either the Canvas or WebGL Renderer that this Game is using.\n *\n * @name SpinePlugin#renderer\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\n * @since 3.19.0\n */\n this.renderer;\n\n /**\n * An instance of the Spine WebGL Scene Renderer.\n *\n * Only set if running in WebGL mode.\n *\n * @name SpinePlugin#sceneRenderer\n * @type {spine.webgl.SceneRenderer}\n * @since 3.19.0\n */\n this.sceneRenderer;\n\n /**\n * An instance of the Spine Skeleton Renderer.\n *\n * @name SpinePlugin#skeletonRenderer\n * @type {(spine.canvas.SkeletonRenderer|spine.webgl.SkeletonRenderer)}\n * @since 3.19.0\n */\n this.skeletonRenderer;\n\n /**\n * An instance of the Spine Skeleton Debug Renderer.\n *\n * Only set if running in WebGL mode.\n *\n * @name SpinePlugin#skeletonDebugRenderer\n * @type {spine.webgl.skeletonDebugRenderer}\n * @since 3.19.0\n */\n this.skeletonDebugRenderer;\n\n /**\n * A reference to the Spine runtime.\n * This is the runtime created by Esoteric Software\n *\n * @name SpinePlugin#plugin\n * @type {spine}\n * @since 3.19.0\n */\n this.plugin = Spine;\n\n /**\n * An internal vector3 used by the screen to world method.\n *\n * @name SpinePlugin#temp1\n * @private\n * @type {spine.webgl.Vector3}\n * @since 3.19.0\n */\n this.temp1;\n\n /**\n * An internal vector3 used by the screen to world method.\n *\n * @name SpinePlugin#temp2\n * @private\n * @type {spine.webgl.Vector3}\n * @since 3.19.0\n */\n this.temp2;\n\n if (this.isWebGL)\n {\n this.runtime = Spine.webgl;\n\n this.renderer = game.renderer;\n this.gl = game.renderer.gl;\n\n this.getAtlas = this.getAtlasWebGL;\n }\n else\n {\n this.runtime = Spine.canvas;\n\n this.renderer = game.renderer;\n\n this.getAtlas = this.getAtlasCanvas;\n }\n\n var _this = this;\n\n var add = function (x, y, key, animationName, loop)\n {\n var spineGO = new SpineGameObject(this.scene, _this, x, y, key, animationName, loop);\n\n this.displayList.add(spineGO);\n this.updateList.add(spineGO);\n\n return spineGO;\n };\n\n var make = function (config, addToScene)\n {\n if (config === undefined) { config = {}; }\n\n var key = GetValue(config, 'key', null);\n var animationName = GetValue(config, 'animationName', null);\n var loop = GetValue(config, 'loop', false);\n\n var spineGO = new SpineGameObject(this.scene, _this, 0, 0, key, animationName, loop);\n\n if (addToScene !== undefined)\n {\n config.add = addToScene;\n }\n\n BuildGameObject(this.scene, spineGO, config);\n\n // Spine specific\n var skinName = GetValue(config, 'skinName', false);\n\n if (skinName)\n {\n spineGO.setSkinByName(skinName);\n }\n\n var slotName = GetValue(config, 'slotName', false);\n var attachmentName = GetValue(config, 'attachmentName', null);\n\n if (slotName)\n {\n spineGO.setAttachment(slotName, attachmentName);\n }\n\n return spineGO.refresh();\n };\n\n pluginManager.registerFileType('spine', this.spineFileCallback, scene);\n pluginManager.registerGameObject('spine', add, make);\n },\n\n /**\n * Internal boot handler.\n *\n * @method SpinePlugin#boot\n * @private\n * @since 3.19.0\n */\n boot: function ()\n {\n if (this.isWebGL)\n {\n this.bootWebGL();\n this.onResize();\n this.game.scale.on(ResizeEvent, this.onResize, this);\n }\n else\n {\n this.bootCanvas();\n }\n\n var eventEmitter = this.systems.events;\n\n eventEmitter.once('shutdown', this.shutdown, this);\n eventEmitter.once('destroy', this.destroy, this);\n },\n\n /**\n * Internal boot handler for the Canvas Renderer.\n *\n * @method SpinePlugin#bootCanvas\n * @private\n * @since 3.19.0\n */\n bootCanvas: function ()\n {\n this.skeletonRenderer = new Spine.canvas.SkeletonRenderer(this.scene.sys.context);\n },\n\n /**\n * Internal boot handler for the WebGL Renderer.\n *\n * @method SpinePlugin#bootWebGL\n * @private\n * @since 3.19.0\n */\n bootWebGL: function ()\n {\n this.sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true);\n\n // Monkeypatch the Spine setBlendMode functions, or batching is destroyed!\n\n var setBlendMode = function (srcBlend, dstBlend)\n {\n if (srcBlend !== this.srcBlend || dstBlend !== this.dstBlend)\n {\n var gl = this.context.gl;\n\n this.srcBlend = srcBlend;\n this.dstBlend = dstBlend;\n\n if (this.isDrawing)\n {\n this.flush();\n gl.blendFunc(this.srcBlend, this.dstBlend);\n }\n }\n };\n\n this.sceneRenderer.batcher.setBlendMode = setBlendMode;\n this.sceneRenderer.shapes.setBlendMode = setBlendMode;\n\n this.skeletonRenderer = this.sceneRenderer.skeletonRenderer;\n this.skeletonDebugRenderer = this.sceneRenderer.skeletonDebugRenderer;\n\n this.temp1 = new Spine.webgl.Vector3(0, 0, 0);\n this.temp2 = new Spine.webgl.Vector3(0, 0, 0);\n },\n\n /**\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\n * then returns it. You do not normally need to invoke this method directly.\n *\n * @method SpinePlugin#getAtlasCanvas\n * @since 3.19.0\n *\n * @param {string} key - The key of the Spine Atlas to create.\n *\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\n */\n getAtlasCanvas: function (key)\n {\n var atlasEntry = this.cache.get(key);\n\n if (!atlasEntry)\n {\n console.warn('No atlas data for: ' + key);\n return;\n }\n\n var atlas;\n var spineTextures = this.spineTextures;\n\n if (spineTextures.has(key))\n {\n atlas = spineTextures.get(key);\n }\n else\n {\n var textures = this.textures;\n\n atlas = new Spine.TextureAtlas(atlasEntry.data, function (path)\n {\n return new Spine.canvas.CanvasTexture(textures.get(atlasEntry.prefix + path).getSourceImage());\n });\n }\n\n return atlas;\n },\n\n /**\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\n * then returns it. You do not normally need to invoke this method directly.\n *\n * @method SpinePlugin#getAtlasWebGL\n * @since 3.19.0\n *\n * @param {string} key - The key of the Spine Atlas to create.\n *\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\n */\n getAtlasWebGL: function (key)\n {\n var atlasEntry = this.cache.get(key);\n\n if (!atlasEntry)\n {\n console.warn('No atlas data for: ' + key);\n return;\n }\n\n var atlas;\n var spineTextures = this.spineTextures;\n\n if (spineTextures.has(key))\n {\n atlas = spineTextures.get(key);\n }\n else\n {\n var textures = this.textures;\n\n var gl = this.sceneRenderer.context.gl;\n\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\n\n atlas = new Spine.TextureAtlas(atlasEntry.data, function (path)\n {\n return new Spine.webgl.GLTexture(gl, textures.get(atlasEntry.prefix + path).getSourceImage(), false);\n });\n }\n\n return atlas;\n },\n\n /**\n * Adds a Spine Skeleton and Atlas file, or array of files, to the current load queue.\n *\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\n *\n * ```javascript\n * function preload ()\n * {\n * this.load.spine('spineBoy', 'boy.json', 'boy.atlas', true);\n * }\n * ```\n *\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\n * loaded.\n *\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\n *\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary. The associated\n * atlas files are scanned for any texture files present in them, which are then loaded. If you have exported\n * your Spine data with preMultipliedAlpha set, then you should enable this in the arguments, or you may see black\n * outlines around skeleton textures.\n *\n * The key must be a unique String. It is used to add the file to the global Spine cache upon a successful load.\n * The key should be unique both in terms of files being loaded and files already present in the Spine cache.\n * Loading a file using a key that is already taken will result in a warning.\n *\n * Instead of passing arguments you can pass a configuration object, such as:\n *\n * ```javascript\n * this.load.spine({\n * key: 'mainmenu',\n * jsonURL: 'boy.json',\n * atlasURL: 'boy.atlas',\n * preMultipliedAlpha: true\n * });\n * ```\n *\n * If you need to load multiple Spine atlas files, provide them as an array:\n *\n * ```javascript\n * function preload ()\n * {\n * this.load.spine('demos', 'demos.json', [ 'atlas1.atlas', 'atlas2.atlas' ], true);\n * }\n * ```\n *\n * See the documentation for `Phaser.Types.Loader.FileTypes.SpineFileConfig` for more details.\n *\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\n * this is what you would use to retrieve the data from the Spine plugin.\n *\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\n *\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\n * and no URL is given then the Loader will set the URL to be \"alien.json\". It will always add `.json` as the extension, although\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\n *\n * Note: The ability to load this type of file will only be available if the Spine Plugin has been built or loaded into Phaser.\n *\n * @method Phaser.Loader.LoaderPlugin#spine\n * @fires Phaser.Loader.LoaderPlugin#ADD\n * @since 3.19.0\n *\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\n * @param {string} jsonURL - The absolute or relative URL to load the Spine json file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\n * @param {string|string[]} atlasURL - The absolute or relative URL to load the Spine atlas file from. If undefined or `null` it will be set to `.atlas`, i.e. if `key` was \"alien\" then the URL will be \"alien.atlas\".\n * @param {boolean} [preMultipliedAlpha=false] - Do the texture files include pre-multiplied alpha or not?\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the Spine json file. Used in replacement of the Loaders default XHR Settings.\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the Spine atlas file. Used in replacement of the Loaders default XHR Settings.\n *\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\n */\n spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings)\n {\n var multifile;\n\n if (Array.isArray(key))\n {\n for (var i = 0; i < key.length; i++)\n {\n multifile = new SpineFile(this, key[i]);\n\n this.addFile(multifile.files);\n }\n }\n else\n {\n multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings);\n\n this.addFile(multifile.files);\n }\n\n return this;\n },\n\n /**\n * Converts the given x and y screen coordinates into the world space of the given Skeleton.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#worldToLocal\n * @since 3.19.0\n *\n * @param {number} x - The screen space x coordinate to convert.\n * @param {number} y - The screen space y coordinate to convert.\n * @param {spine.Skeleton} skeleton - The Spine Skeleton to convert into.\n * @param {spine.Bone} [bone] - Optional bone of the Skeleton to convert into.\n *\n * @return {spine.Vector2} A Vector2 containing the translated point.\n */\n worldToLocal: function (x, y, skeleton, bone)\n {\n var temp1 = this.temp1;\n var temp2 = this.temp2;\n var camera = this.sceneRenderer.camera;\n\n temp1.set(x + skeleton.x, y - skeleton.y, 0);\n\n var width = camera.viewportWidth;\n var height = camera.viewportHeight;\n\n camera.screenToWorld(temp1, width, height);\n\n if (bone && bone.parent !== null)\n {\n bone.parent.worldToLocal(temp2.set(temp1.x - skeleton.x, temp1.y - skeleton.y, 0));\n\n return new Spine.Vector2(temp2.x, temp2.y);\n }\n else if (bone)\n {\n return new Spine.Vector2(temp1.x - skeleton.x, temp1.y - skeleton.y);\n }\n else\n {\n return new Spine.Vector2(temp1.x, temp1.y);\n }\n },\n\n /**\n * Returns a Spine Vector2 based on the given x and y values.\n *\n * @method SpinePlugin#getVector2\n * @since 3.19.0\n *\n * @param {number} x - The Vector x value.\n * @param {number} y - The Vector y value.\n *\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\n */\n getVector2: function (x, y)\n {\n return new Spine.Vector2(x, y);\n },\n\n /**\n * Returns a Spine Vector2 based on the given x, y and z values.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#getVector3\n * @since 3.19.0\n *\n * @param {number} x - The Vector x value.\n * @param {number} y - The Vector y value.\n * @param {number} z - The Vector z value.\n *\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\n */\n getVector3: function (x, y, z)\n {\n return new Spine.webgl.Vector3(x, y, z);\n },\n\n /**\n * Sets `drawBones` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugBones\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugBones: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawBones = value;\n\n return this;\n },\n\n /**\n * Sets `drawRegionAttachments` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugRegionAttachments\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugRegionAttachments: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawRegionAttachments = value;\n\n return this;\n },\n\n /**\n * Sets `drawBoundingBoxes` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugBoundingBoxes\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugBoundingBoxes: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawBoundingBoxes = value;\n\n return this;\n },\n\n /**\n * Sets `drawMeshHull` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugMeshHull\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugMeshHull: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawMeshHull = value;\n\n return this;\n },\n\n /**\n * Sets `drawMeshTriangles` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugMeshTriangles\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugMeshTriangles: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawMeshTriangles = value;\n\n return this;\n },\n\n /**\n * Sets `drawPaths` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugPaths\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugPaths: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawPaths = value;\n\n return this;\n },\n\n /**\n * Sets `drawSkeletonXY` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugSkeletonXY\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugSkeletonXY: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawSkeletonXY = value;\n\n return this;\n },\n\n /**\n * Sets `drawClipping` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugClipping\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugClipping: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawClipping = value;\n\n return this;\n },\n\n /**\n * Sets the given vertex effect on the Spine Skeleton Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setEffect\n * @since 3.19.0\n *\n * @param {spine.VertexEffect} [effect] - The vertex effect to set on the Skeleton Renderer.\n *\n * @return {this} This Spine Plugin.\n */\n setEffect: function (effect)\n {\n this.sceneRenderer.skeletonRenderer.vertexEffect = effect;\n\n return this;\n },\n\n /**\n * Creates a Spine Skeleton based on the given key and optional Skeleton JSON data.\n *\n * The Skeleton data should have already been loaded before calling this method.\n *\n * @method SpinePlugin#createSkeleton\n * @since 3.19.0\n *\n * @param {string} key - The key of the Spine skeleton data, as loaded by the plugin. If the Spine JSON contains multiple skeletons, reference them with a period, i.e. `set.spineBoy`.\n * @param {object} [skeletonJSON] - Optional Skeleton JSON data to use, instead of getting it from the cache.\n *\n * @return {(any|null)} This Spine Skeleton data object, or `null` if the key was invalid.\n */\n createSkeleton: function (key, skeletonJSON)\n {\n var atlasKey = key;\n var jsonKey = key;\n var split = (key.indexOf('.') !== -1);\n\n if (split)\n {\n var parts = key.split('.');\n\n atlasKey = parts.shift();\n jsonKey = parts.join('.');\n }\n\n var atlasData = this.cache.get(atlasKey);\n var atlas = this.getAtlas(atlasKey);\n\n if (!atlas)\n {\n return null;\n }\n\n if (!this.spineTextures.has(atlasKey))\n {\n this.spineTextures.add(atlasKey, atlas);\n }\n\n var preMultipliedAlpha = atlasData.preMultipliedAlpha;\n\n var atlasLoader = new Spine.AtlasAttachmentLoader(atlas);\n\n var skeletonJson = new Spine.SkeletonJson(atlasLoader);\n\n var data;\n\n if (skeletonJSON)\n {\n data = skeletonJSON;\n }\n else\n {\n var json = this.json.get(atlasKey);\n\n data = (split) ? GetValue(json, jsonKey) : json;\n }\n\n if (data)\n {\n var skeletonData = skeletonJson.readSkeletonData(data);\n\n var skeleton = new Spine.Skeleton(skeletonData);\n\n return { skeletonData: skeletonData, skeleton: skeleton, preMultipliedAlpha: preMultipliedAlpha };\n }\n else\n {\n return null;\n }\n },\n\n /**\n * Creates a new Animation State and Animation State Data for the given skeleton.\n *\n * The returned object contains two properties: `state` and `stateData` respectively.\n *\n * @method SpinePlugin#createAnimationState\n * @since 3.19.0\n *\n * @param {spine.Skeleton} skeleton - The Skeleton to create the Animation State for.\n *\n * @return {any} An object containing the Animation State and Animation State Data instances.\n */\n createAnimationState: function (skeleton)\n {\n var stateData = new Spine.AnimationStateData(skeleton.data);\n\n var state = new Spine.AnimationState(stateData);\n\n return { stateData: stateData, state: state };\n },\n\n /**\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\n *\n * The returned object contains two properties: `offset` and `size`:\n *\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\n * `size` - The width and height of the AABB.\n *\n * @method SpinePlugin#getBounds\n * @since 3.19.0\n *\n * @param {spine.Skeleton} skeleton - The Skeleton to get the bounds from.\n *\n * @return {any} The bounds object.\n */\n getBounds: function (skeleton)\n {\n var offset = new Spine.Vector2();\n var size = new Spine.Vector2();\n\n skeleton.getBounds(offset, size, []);\n\n return { offset: offset, size: size };\n },\n\n /**\n * Internal handler for when the renderer resizes.\n *\n * Only called if running in WebGL.\n *\n * @method SpinePlugin#onResize\n * @since 3.19.0\n */\n onResize: function ()\n {\n var renderer = this.renderer;\n var sceneRenderer = this.sceneRenderer;\n\n var viewportWidth = renderer.width;\n var viewportHeight = renderer.height;\n\n sceneRenderer.camera.position.x = viewportWidth / 2;\n sceneRenderer.camera.position.y = viewportHeight / 2;\n\n sceneRenderer.camera.viewportWidth = viewportWidth;\n sceneRenderer.camera.viewportHeight = viewportHeight;\n },\n\n /**\n * The Scene that owns this plugin is shutting down.\n *\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\n *\n * @method SpinePlugin#shutdown\n * @private\n * @since 3.19.0\n */\n shutdown: function ()\n {\n var eventEmitter = this.systems.events;\n\n eventEmitter.off('shutdown', this.shutdown, this);\n\n if (this.isWebGL)\n {\n this.game.scale.off(ResizeEvent, this.onResize, this);\n }\n },\n\n /**\n * The Scene that owns this plugin is being destroyed.\n *\n * We need to shutdown and then kill off all external references.\n *\n * @method SpinePlugin#destroy\n * @private\n * @since 3.19.0\n */\n destroy: function ()\n {\n this.shutdown();\n\n if (this.sceneRenderer)\n {\n this.sceneRenderer.dispose();\n }\n\n this.pluginManager.removeGameObject('spine', true, true);\n\n this.pluginManager = null;\n this.game = null;\n this.scene = null;\n this.systems = null;\n\n this.cache = null;\n this.spineTextures = null;\n this.json = null;\n this.textures = null;\n this.sceneRenderer = null;\n this.skeletonRenderer = null;\n this.gl = null;\n }\n\n});\n\n/**\n * Creates a new Spine Game Object and adds it to the Scene.\n *\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\n * do not have a Phaser origin.\n *\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\n * that.\n *\n * ```javascript\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\n * ```\n *\n * The key is optional. If not passed here, you need to call `SpineGameObject.setSkeleton()` to use it.\n *\n * The animation name is also optional and can be set later via `SpineGameObject.setAnimation`.\n *\n * Should you wish for more control over the object creation, such as setting a slot attachment or skin\n * name, then use `SpinePlugin.make` instead.\n *\n * @method SpinePlugin#add\n * @since 3.19.0\n *\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\n *\n * @return {SpineGameObject} The Game Object that was created.\n */\n\n/**\n * Creates a new Spine Game Object from the given configuration file and optionally adds it to the Scene.\n *\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\n * do not have a Phaser origin.\n *\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\n * that.\n *\n * ```javascript\n * let jelly = this.make.spine({\n * x: 500, y: 500, key: 'jelly',\n * scale: 1.5,\n * skinName: 'square_Green',\n * animationName: 'jelly-idle', loop: true,\n * slotName: 'hat', attachmentName: 'images/La_14'\n * });\n * ```\n *\n * @method SpinePlugin#make\n * @since 3.19.0\n *\n * @param {any} config - The configuration object this Game Object will use to create itself.\n * @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.\n *\n * @return {SpineGameObject} The Game Object that was created.\n */\n\nmodule.exports = SpinePlugin;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Complete Event.\r\n *\r\n * @event SpinePluginEvents#COMPLETE\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Dispose Event.\r\n *\r\n * @event SpinePluginEvents#DISPOSE\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'dispose';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The End Event.\r\n *\r\n * @event SpinePluginEvents#END\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'end';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Custom Event Event.\r\n *\r\n * @event SpinePluginEvents#EVENT\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'event';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Interrupted Event.\r\n *\r\n * @event SpinePluginEvents#INTERRUPTED\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'interrupted';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Start Event.\r\n *\r\n * @event SpinePluginEvents#START\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace SpinePluginEvents\r\n */\r\n\r\nmodule.exports = {\r\n\r\n COMPLETE: require('./COMPLETE_EVENT'),\r\n DISPOSE: require('./DISPOSE_EVENT'),\r\n END: require('./END_EVENT'),\r\n EVENT: require('./EVENT_EVENT'),\r\n INTERRUPTED: require('./INTERRUPTED_EVENT'),\r\n START: require('./START_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar AngleBetween = require('../../../../src/math/angle/Between');\r\nvar Clamp = require('../../../../src/math/Clamp');\r\nvar Class = require('../../../../src/utils/Class');\r\nvar ComponentsComputedSize = require('../../../../src/gameobjects/components/ComputedSize');\r\nvar ComponentsDepth = require('../../../../src/gameobjects/components/Depth');\r\nvar ComponentsFlip = require('../../../../src/gameobjects/components/Flip');\r\nvar ComponentsScrollFactor = require('../../../../src/gameobjects/components/ScrollFactor');\r\nvar ComponentsTransform = require('../../../../src/gameobjects/components/Transform');\r\nvar ComponentsVisible = require('../../../../src/gameobjects/components/Visible');\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar DegToRad = require('../../../../src/math/DegToRad');\r\nvar GameObject = require('../../../../src/gameobjects/GameObject');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar SpineEvents = require('../events/');\r\nvar SpineGameObjectRender = require('./SpineGameObjectRender');\r\n\r\n/**\r\n * @classdesc\r\n * A Spine Game Object is a Phaser level object that can be added to your Phaser Scenes. It encapsulates\r\n * a Spine Skeleton with Spine Animation Data and Animation State, with helper methods to allow you to\r\n * easily change the skin, slot attachment, bone positions and more.\r\n * \r\n * Spine Game Objects can be created via the Game Object Factory, Game Object Creator, or directly.\r\n * You can only create them if the Spine plugin has been loaded into Phaser.\r\n * \r\n * The quickest way is the Game Object Factory:\r\n * \r\n * ```javascript\r\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\r\n * ```\r\n * \r\n * Here we are creating a new Spine Game Object positioned at 512 x 550. It's using the `jelly`\r\n * Spine data, which has previously been loaded into your Scene. The `jelly-think` argument is\r\n * an optional animation to start playing on the skeleton. The final argument `true` sets the\r\n * animation to loop. Look at the documentation for further details on each of these options.\r\n * \r\n * For more control, you can use the Game Object Creator, passing in a Spine Game Object\r\n * Configuration object:\r\n * \r\n * ```javascript\r\n * let jelly = this.make.spine({\r\n * x: 512, y: 550, key: 'jelly',\r\n * scale: 1.5,\r\n * skinName: 'square_Green',\r\n * animationName: 'jelly-think', loop: true,\r\n * slotName: 'hat', attachmentName: 'images/La_14'\r\n * });\r\n * ```\r\n * \r\n * Here, you've got the ability to specify extra details, such as the slot name, attachments or\r\n * overall scale.\r\n * \r\n * If you wish to instantiate a Spine Game Object directly you can do so, but in order for it to\r\n * update and render, it must be added to the display and update lists of your Scene:\r\n * \r\n * ```javascript\r\n * let jelly = new SpineGameObject(this, this.spine, 512, 550, 'jelly', 'jelly-think', true);\r\n * this.sys.displayList.add(jelly);\r\n * this.sys.updateList.add(jelly);\r\n * ```\r\n * \r\n * It's possible to enable Spine Game Objects for input, but you should be aware that it will use\r\n * the bounds of the skeletons current pose to create the hit area from. Sometimes this is ok, but\r\n * often not. Make use of the `InputPlugin.enableDebug` method to view the input shape being created.\r\n * If it's not suitable, provide your own shape to the `setInteractive` method.\r\n * \r\n * Due to the way Spine handles scaling, it's not recommended to enable a Spine Game Object for\r\n * physics directly. Instead, you should look at creating a proxy body and syncing the Spine Game\r\n * Object position with it. See the examples for further details.\r\n * \r\n * If your Spine Game Object has black outlines around the different parts of the texture when it\r\n * renders then you have exported the files from Spine with pre-multiplied alpha enabled, but have\r\n * forgotten to set that flag when loading the Spine data. Please see the loader docs for more details.\r\n *\r\n * @class SpineGameObject\r\n * @constructor\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to.\r\n * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\r\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\r\n */\r\nvar SpineGameObject = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n ComponentsComputedSize,\r\n ComponentsDepth,\r\n ComponentsFlip,\r\n ComponentsScrollFactor,\r\n ComponentsTransform,\r\n ComponentsVisible,\r\n SpineGameObjectRender\r\n ],\r\n\r\n initialize:\r\n\r\n function SpineGameObject (scene, plugin, x, y, key, animationName, loop)\r\n {\r\n GameObject.call(this, scene, 'Spine');\r\n\r\n /**\r\n * A reference to the Spine Plugin.\r\n *\r\n * @name SpineGameObject#plugin\r\n * @type {SpinePlugin}\r\n * @since 3.19.0\r\n */\r\n this.plugin = plugin;\r\n\r\n /**\r\n * The Spine Skeleton this Game Object is using.\r\n *\r\n * @name SpineGameObject#skeleton\r\n * @type {spine.Skeleton}\r\n * @since 3.19.0\r\n */\r\n this.skeleton = null;\r\n\r\n /**\r\n * The Spine Skeleton Data associated with the Skeleton this Game Object is using.\r\n *\r\n * @name SpineGameObject#skeletonData\r\n * @type {spine.SkeletonData}\r\n * @since 3.19.0\r\n */\r\n this.skeletonData = null;\r\n\r\n /**\r\n * The Spine Animation State this Game Object is using.\r\n *\r\n * @name SpineGameObject#state\r\n * @type {spine.AnimationState}\r\n * @since 3.19.0\r\n */\r\n this.state = null;\r\n\r\n /**\r\n * The Spine Animation State Data associated with the Animation State this Game Object is using.\r\n *\r\n * @name SpineGameObject#stateData\r\n * @type {spine.AnimationStateData}\r\n * @since 3.19.0\r\n */\r\n this.stateData = null;\r\n\r\n /**\r\n * A reference to the root bone of the Skeleton.\r\n *\r\n * @name SpineGameObject#root\r\n * @type {spine.Bone}\r\n * @since 3.19.0\r\n */\r\n this.root = null;\r\n\r\n /**\r\n * This object holds the calculated bounds of the current\r\n * pose, as set when a new Skeleton is applied.\r\n *\r\n * @name SpineGameObject#bounds\r\n * @type {any}\r\n * @since 3.19.0\r\n */\r\n this.bounds = null;\r\n \r\n /**\r\n * A Game Object level flag that allows you to enable debug drawing\r\n * to the Skeleton Debug Renderer by toggling it.\r\n *\r\n * @name SpineGameObject#drawDebug\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.drawDebug = false;\r\n\r\n /**\r\n * The factor to scale the Animation update time by.\r\n *\r\n * @name SpineGameObject#timeScale\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.timeScale = 1;\r\n\r\n /**\r\n * The calculated Display Origin of this Game Object.\r\n *\r\n * @name SpineGameObject#displayOriginX\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.displayOriginX = 0;\r\n\r\n /**\r\n * The calculated Display Origin of this Game Object.\r\n *\r\n * @name SpineGameObject#displayOriginY\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n this.displayOriginY = 0;\r\n\r\n /**\r\n * A flag that stores if the texture associated with the current\r\n * Skin being used by this Game Object, has its alpha pre-multiplied\r\n * into it, or not.\r\n *\r\n * @name SpineGameObject#preMultipliedAlpha\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.preMultipliedAlpha = false;\r\n\r\n /**\r\n * A default Blend Mode. You cannot change the blend mode of a\r\n * Spine Game Object.\r\n *\r\n * @name SpineGameObject#blendMode\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.blendMode = 0;\r\n\r\n this.setPosition(x, y);\r\n\r\n if (key)\r\n {\r\n this.setSkeleton(key, animationName, loop);\r\n }\r\n },\r\n\r\n /**\r\n * Overrides the default Game Object method and always returns true.\r\n * Rendering is decided in the renderer functions.\r\n *\r\n * @method SpineGameObject#willRender\r\n * @since 3.19.0\r\n *\r\n * @return {boolean} Always returns `true`.\r\n */\r\n willRender: function ()\r\n {\r\n return true;\r\n },\r\n\r\n /**\r\n * Set the Alpha level for the whole Skeleton of this Game Object.\r\n * \r\n * The alpha controls the opacity of the Game Object as it renders.\r\n * \r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * @method SpineGameObject#setAlpha\r\n * @since 3.19.0\r\n *\r\n * @param {number} [value=1] - The alpha value used for the whole Skeleton.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (value, slotName)\r\n {\r\n if (value === undefined) { value = 1; }\r\n\r\n if (slotName)\r\n {\r\n var slot = this.findSlot(slotName);\r\n\r\n if (slot)\r\n {\r\n slot.color.a = Clamp(value, 0, 1);\r\n }\r\n }\r\n else\r\n {\r\n this.alpha = value;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Skeleton.\r\n * \r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#alpha\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.a;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.a = v;\r\n }\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~2;\r\n }\r\n else\r\n {\r\n this.renderFlags |= 2;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of red used when rendering the Skeleton.\r\n * \r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#red\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n red: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.r;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.r = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of green used when rendering the Skeleton.\r\n * \r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#green\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n green: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.g;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.g = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The amount of blue used when rendering the Skeleton.\r\n * \r\n * A value between 0 and 1.\r\n *\r\n * This is a global value, impacting the entire Skeleton, not just a region of it.\r\n *\r\n * @name SpineGameObject#blue\r\n * @type {number}\r\n * @since 3.19.0\r\n */\r\n blue: {\r\n\r\n get: function ()\r\n {\r\n return this.skeleton.color.b;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n if (this.skeleton)\r\n {\r\n this.skeleton.color.b = v;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the color on the given attachment slot. Or, if no slot is given, on the whole skeleton.\r\n *\r\n * @method SpineGameObject#setColor\r\n * @since 3.19.0\r\n *\r\n * @param {integer} [color=0xffffff] - The color being applied to the Skeleton or named Slot. Set to white to disable any previously set color.\r\n * @param {string} [slotName] - The name of the slot to set the color on. If not give, will be set on the whole skeleton.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setColor: function (color, slotName)\r\n {\r\n if (color === undefined) { color = 0xffffff; }\r\n\r\n var red = (color >> 16 & 0xFF) / 255;\r\n var green = (color >> 8 & 0xFF) / 255;\r\n var blue = (color & 0xFF) / 255;\r\n var alpha = (color > 16777215) ? (color >>> 24) / 255 : null;\r\n\r\n var target = this.skeleton;\r\n\r\n if (slotName)\r\n {\r\n var slot = this.findSlot(slotName);\r\n\r\n if (slot)\r\n {\r\n target = slot;\r\n }\r\n }\r\n\r\n target.color.r = red;\r\n target.color.g = green;\r\n target.color.b = blue;\r\n\r\n if (alpha !== null)\r\n {\r\n target.color.a = alpha;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets this Game Object to use the given Skeleton based on the Atlas Data Key and a provided JSON object\r\n * that contains the Skeleton data.\r\n *\r\n * @method SpineGameObject#setSkeletonFromJSON\r\n * @since 3.19.0\r\n * \r\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\r\n * @param {object} skeletonJSON - The JSON data for the Skeleton.\r\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkeletonFromJSON: function (atlasDataKey, skeletonJSON, animationName, loop)\r\n {\r\n return this.setSkeleton(atlasDataKey, skeletonJSON, animationName, loop);\r\n },\r\n\r\n /**\r\n * Sets this Game Object to use the given Skeleton based on its cache key.\r\n * \r\n * Typically, once set, the Skeleton doesn't change. Instead, you change the skin,\r\n * or slot attachment, or any other property to adjust it.\r\n *\r\n * @method SpineGameObject#setSkeleton\r\n * @since 3.19.0\r\n * \r\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\r\n * @param {object} skeletonJSON - The JSON data for the Skeleton.\r\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\r\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkeleton: function (atlasDataKey, animationName, loop, skeletonJSON)\r\n {\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n var data = this.plugin.createSkeleton(atlasDataKey, skeletonJSON);\r\n\r\n this.skeletonData = data.skeletonData;\r\n\r\n this.preMultipliedAlpha = data.preMultipliedAlpha;\r\n\r\n var skeleton = data.skeleton;\r\n\r\n skeleton.setSkin();\r\n skeleton.setToSetupPose();\r\n\r\n this.skeleton = skeleton;\r\n\r\n // AnimationState\r\n data = this.plugin.createAnimationState(skeleton);\r\n\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n this.state = data.state;\r\n this.stateData = data.stateData;\r\n\r\n this.state.addListener({\r\n event: this.onEvent.bind(this),\r\n complete: this.onComplete.bind(this),\r\n start: this.onStart.bind(this),\r\n end: this.onEnd.bind(this),\r\n dispose: this.onDispose.bind(this),\r\n interrupted: this.onInterrupted.bind(this)\r\n });\r\n\r\n if (animationName)\r\n {\r\n this.setAnimation(0, animationName, loop);\r\n }\r\n\r\n this.root = this.getRootBone();\r\n\r\n if (this.root)\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\r\n }\r\n\r\n this.state.apply(skeleton);\r\n\r\n skeleton.updateCache();\r\n\r\n return this.updateSize();\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onComplete event via this Game Object.\r\n *\r\n * @method SpineGameObject#onComplete\r\n * @fires SpinePluginEvents#COMPLETE\r\n * @private\r\n * @since 3.19.0\r\n * \r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onComplete: function (entry)\r\n {\r\n this.emit(SpineEvents.COMPLETE, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onDispose event via this Game Object.\r\n *\r\n * @method SpineGameObject#onDispose\r\n * @fires SpinePluginEvents#DISPOSE\r\n * @private\r\n * @since 3.19.0\r\n * \r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onDispose: function (entry)\r\n {\r\n this.emit(SpineEvents.DISPOSE, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onEnd event via this Game Object.\r\n *\r\n * @method SpineGameObject#onEnd\r\n * @fires SpinePluginEvents#END\r\n * @private\r\n * @since 3.19.0\r\n * \r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onEnd: function (entry)\r\n {\r\n this.emit(SpineEvents.END, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine Event event via this Game Object.\r\n *\r\n * @method SpineGameObject#onEvent\r\n * @fires SpinePluginEvents#EVENT\r\n * @private\r\n * @since 3.19.0\r\n * \r\n * @param {any} entry - The event data from Spine.\r\n * @param {spine.Event} event - The Spine event.\r\n */\r\n onEvent: function (entry, event)\r\n {\r\n this.emit(SpineEvents.EVENT, entry, event);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onInterrupted event via this Game Object.\r\n *\r\n * @method SpineGameObject#onInterrupted\r\n * @fires SpinePluginEvents#INTERRUPTED\r\n * @private\r\n * @since 3.19.0\r\n * \r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onInterrupted: function (entry)\r\n {\r\n this.emit(SpineEvents.INTERRUPTED, entry);\r\n },\r\n\r\n /**\r\n * Internal event handler that emits the Spine onStart event via this Game Object.\r\n *\r\n * @method SpineGameObject#onStart\r\n * @fires SpinePluginEvents#START\r\n * @private\r\n * @since 3.19.0\r\n * \r\n * @param {any} entry - The event data from Spine.\r\n */\r\n onStart: function (entry)\r\n {\r\n this.emit(SpineEvents.START, entry);\r\n },\r\n\r\n /**\r\n * Refreshes the data about the current Skeleton.\r\n * \r\n * This will reset the rotation, position and size of the Skeleton to match this Game Object.\r\n * \r\n * Call this method if you need to access the Skeleton data directly, and it may have changed\r\n * recently.\r\n *\r\n * @method SpineGameObject#refresh\r\n * @since 3.19.0\r\n * \r\n * @return {this} This Game Object.\r\n */\r\n refresh: function ()\r\n {\r\n if (this.root)\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\r\n }\r\n\r\n this.updateSize();\r\n\r\n this.skeleton.updateCache();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the size of this Game Object.\r\n * \r\n * If no arguments are given it uses the current skeleton data dimensions.\r\n * \r\n * You can use this method to set a fixed size of this Game Object, such as for input detection,\r\n * when the skeleton data doesn't match what is required in-game.\r\n *\r\n * @method SpineGameObject#setSize\r\n * @since 3.19.0\r\n * \r\n * @param {number} [width] - The width of the Skeleton. If not given it defaults to the Skeleton Data width.\r\n * @param {number} [height] - The height of the Skeleton. If not given it defaults to the Skeleton Data height.\r\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\r\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\r\n * \r\n * @return {this} This Game Object.\r\n */\r\n setSize: function (width, height, offsetX, offsetY)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n if (width === undefined) { width = skeleton.data.width; }\r\n if (height === undefined) { height = skeleton.data.height; }\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n this.displayOriginX = skeleton.x - offsetX;\r\n this.displayOriginY = skeleton.y - offsetY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the offset of this Game Object from the Skeleton position.\r\n * \r\n * You can use this method to adjust how the position of this Game Object relates to the Skeleton it is using.\r\n *\r\n * @method SpineGameObject#setOffset\r\n * @since 3.19.0\r\n * \r\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\r\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\r\n * \r\n * @return {this} This Game Object.\r\n */\r\n setOffset: function (offsetX, offsetY)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n this.displayOriginX = skeleton.x - offsetX;\r\n this.displayOriginY = skeleton.y - offsetY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that syncs all of the Game Object position and scale data to the Skeleton.\r\n * It then syncs the skeleton bounds back to this Game Object.\r\n * \r\n * This method is called automatically as needed internally, however, it's also exposed should\r\n * you require overriding the size settings.\r\n *\r\n * @method SpineGameObject#updateSize\r\n * @since 3.19.0\r\n * \r\n * @return {this} This Game Object.\r\n */\r\n updateSize: function ()\r\n {\r\n var skeleton = this.skeleton;\r\n var renderer = this.plugin.renderer;\r\n\r\n var height = renderer.height;\r\n\r\n var oldScaleX = this.scaleX;\r\n var oldScaleY = this.scaleY;\r\n\r\n skeleton.x = this.x;\r\n skeleton.y = height - this.y;\r\n skeleton.scaleX = 1;\r\n skeleton.scaleY = 1;\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n var bounds = this.getBounds();\r\n\r\n this.width = bounds.size.x;\r\n this.height = bounds.size.y;\r\n\r\n this.displayOriginX = this.x - bounds.offset.x;\r\n this.displayOriginY = this.y - (height - (this.height + bounds.offset.y));\r\n\r\n skeleton.scaleX = oldScaleX;\r\n skeleton.scaleY = oldScaleY;\r\n\r\n skeleton.updateWorldTransform();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The horizontal scale of this Game Object, as applied to the Skeleton it is using.\r\n *\r\n * @name SpineGameObject#scaleX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.19.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n\r\n this.refresh();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scale of this Game Object, as applied to the Skeleton it is using.\r\n *\r\n * @name SpineGameObject#scaleY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.19.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleY = value;\r\n\r\n this.refresh();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the bones in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getBoneList\r\n * @since 3.19.0\r\n * \r\n * @return {string[]} An array containing the names of all the bones in the Skeleton Data.\r\n */\r\n getBoneList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.bones.length; i++)\r\n {\r\n output.push(skeletonData.bones[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the skins in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getSkinList\r\n * @since 3.19.0\r\n * \r\n * @return {string[]} An array containing the names of all the skins in the Skeleton Data.\r\n */\r\n getSkinList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.skins.length; i++)\r\n {\r\n output.push(skeletonData.skins[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the slots in the Skeleton.\r\n *\r\n * @method SpineGameObject#getSlotList\r\n * @since 3.19.0\r\n * \r\n * @return {string[]} An array containing the names of all the slots in the Skeleton.\r\n */\r\n getSlotList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeleton = this.skeleton;\r\n\r\n for (var i = 0; i < skeleton.slots.length; i++)\r\n {\r\n output.push(skeleton.slots[i].data.name);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns an array containing the names of all the animations in the Skeleton Data.\r\n *\r\n * @method SpineGameObject#getAnimationList\r\n * @since 3.19.0\r\n * \r\n * @return {string[]} An array containing the names of all the animations in the Skeleton Data.\r\n */\r\n getAnimationList: function ()\r\n {\r\n var output = [];\r\n\r\n var skeletonData = this.skeletonData;\r\n\r\n if (skeletonData)\r\n {\r\n for (var i = 0; i < skeletonData.animations.length; i++)\r\n {\r\n output.push(skeletonData.animations[i].name);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the current animation being played on the given track, if any.\r\n *\r\n * @method SpineGameObject#getCurrentAnimation\r\n * @since 3.19.0\r\n * \r\n * @param {integer} [trackIndex=0] - The track to return the current animation on.\r\n * \r\n * @return {?spine.Animation} The current Animation on the given track, or `undefined` if there is no current animation.\r\n */\r\n getCurrentAnimation: function (trackIndex)\r\n {\r\n if (trackIndex === undefined) { trackIndex = 0; }\r\n\r\n var current = this.state.getCurrent(trackIndex);\r\n\r\n if (current)\r\n {\r\n return current.animation;\r\n }\r\n },\r\n\r\n /**\r\n * Sets the current animation for a track, discarding any queued animations.\r\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\r\n * \r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n *\r\n * @method SpineGameObject#play\r\n * @fires SpinePluginEvents#START\r\n * @since 3.19.0\r\n *\r\n * @param {string} animationName - The string-based key of the animation to play.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call.\r\n *\r\n * @return {this} This Game Object. If you need the TrackEntry, see `setAnimation` instead.\r\n */\r\n play: function (animationName, loop, ignoreIfPlaying)\r\n {\r\n this.setAnimation(0, animationName, loop, ignoreIfPlaying);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current animation for a track, discarding any queued animations.\r\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\r\n * \r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n *\r\n * @method SpineGameObject#setAnimation\r\n * @fires SpinePluginEvents#START\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to play the animation on.\r\n * @param {string} animationName - The string-based key of the animation to play.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call.\r\n *\r\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\r\n */\r\n setAnimation: function (trackIndex, animationName, loop, ignoreIfPlaying)\r\n {\r\n if (loop === undefined) { loop = false; }\r\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\r\n\r\n if (ignoreIfPlaying && this.state)\r\n {\r\n var currentTrack = this.state.getCurrent(0);\r\n \r\n if (currentTrack && currentTrack.animation.name === animationName && !currentTrack.isComplete())\r\n {\r\n return;\r\n }\r\n }\r\n\r\n if (this.findAnimation(animationName))\r\n {\r\n return this.state.setAnimation(trackIndex, animationName, loop);\r\n }\r\n },\r\n\r\n /**\r\n * Adds an animation to be played after the current or last queued animation for a track.\r\n * If the track is empty, it is equivalent to calling setAnimation.\r\n * \r\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\r\n * \r\n * The delay is a float. If > 0, sets delay. If <= 0, the delay set is the duration of the previous\r\n * track entry minus any mix duration (from the AnimationStateData) plus the specified delay\r\n * (ie the mix ends at (delay = 0) or before (delay < 0) the previous track entry duration).\r\n * If the previous entry is looping, its next loop completion is used instead of its duration.\r\n *\r\n * @method SpineGameObject#addAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n * @param {string} animationName - The string-based key of the animation to add.\r\n * @param {boolean} [loop=false] - Should the animation be looped when played?\r\n * @param {integer} [delay=0] - A delay, in ms, before which this animation will start when played.\r\n *\r\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\r\n */\r\n addAnimation: function (trackIndex, animationName, loop, delay)\r\n {\r\n return this.state.addAnimation(trackIndex, animationName, loop, delay);\r\n },\r\n\r\n /**\r\n * Sets an empty animation for a track, discarding any queued animations, and sets the track\r\n * entry's mixDuration. An empty animation has no timelines and serves as a placeholder for mixing in or out.\r\n * \r\n * Mixing out is done by setting an empty animation with a mix duration using either setEmptyAnimation,\r\n * setEmptyAnimations, or addEmptyAnimation. Mixing to an empty animation causes the previous animation to be\r\n * applied less and less over the mix duration. Properties keyed in the previous animation transition to\r\n * the value from lower tracks or to the setup pose value if no lower tracks key the property.\r\n * A mix duration of 0 still mixes out over one frame.\r\n * \r\n * Mixing in is done by first setting an empty animation, then adding an animation using addAnimation\r\n * and on the returned track entry, set the mixDuration. Mixing from an empty animation causes the new\r\n * animation to be applied more and more over the mix duration. Properties keyed in the new animation\r\n * transition from the value from lower tracks or from the setup pose value if no lower tracks key the\r\n * property to the value keyed in the new animation.\r\n *\r\n * @method SpineGameObject#setEmptyAnimation\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n * @param {integer} [mixDuration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\r\n *\r\n * @return {spine.TrackEntry} The returned Track Entry.\r\n */\r\n setEmptyAnimation: function (trackIndex, mixDuration)\r\n {\r\n return this.state.setEmptyAnimation(trackIndex, mixDuration);\r\n },\r\n\r\n /**\r\n * Removes all animations from the track, leaving skeletons in their current pose.\r\n * \r\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\r\n * rather than leaving them in their current pose.\r\n *\r\n * @method SpineGameObject#clearTrack\r\n * @since 3.19.0\r\n *\r\n * @param {integer} trackIndex - The track index to add the animation to.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n clearTrack: function (trackIndex)\r\n {\r\n this.state.clearTrack(trackIndex);\r\n\r\n return this;\r\n },\r\n \r\n /**\r\n * Removes all animations from all tracks, leaving skeletons in their current pose.\r\n * \r\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\r\n * rather than leaving them in their current pose.\r\n *\r\n * @method SpineGameObject#clearTracks\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n clearTracks: function ()\r\n {\r\n this.state.clearTracks();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the skin used to look up attachments before looking in the defaultSkin.\r\n * \r\n * Attachments from the new skin are attached if the corresponding attachment from the\r\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\r\n * attached from the new skin.\r\n * \r\n * After changing the skin, the visible attachments can be reset to those attached in the\r\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\r\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\r\n * or show attachments from the new skin.\r\n *\r\n * @method SpineGameObject#setSkinByName\r\n * @since 3.19.0\r\n * \r\n * @param {string} skinName - The name of the skin to set.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkinByName: function (skinName)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n skeleton.setSkinByName(skinName);\r\n\r\n skeleton.setSlotsToSetupPose();\r\n\r\n this.state.apply(skeleton);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the skin used to look up attachments before looking in the defaultSkin.\r\n * \r\n * Attachments from the new skin are attached if the corresponding attachment from the\r\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\r\n * attached from the new skin.\r\n * \r\n * After changing the skin, the visible attachments can be reset to those attached in the\r\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\r\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\r\n * or show attachments from the new skin.\r\n *\r\n * @method SpineGameObject#setSkin\r\n * @since 3.19.0\r\n * \r\n * @param {?spine.Skin} newSkin - The Skin to set. May be `null`.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSkin: function (newSkin)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n skeleton.setSkin(newSkin);\r\n\r\n skeleton.setSlotsToSetupPose();\r\n\r\n this.state.apply(skeleton);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the mix duration when changing from the specified animation to the other.\r\n *\r\n * @method SpineGameObject#setMix\r\n * @since 3.19.0\r\n * \r\n * @param {string} fromName - The animation to mix from.\r\n * @param {string} toName - The animation to mix to.\r\n * @param {number} [duration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setMix: function (fromName, toName, duration)\r\n {\r\n this.stateData.setMix(fromName, toName, duration);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Finds an attachment by looking in the skin and defaultSkin using the slot\r\n * index and attachment name. First the skin is checked and if the attachment was not found,\r\n * the default skin is checked.\r\n *\r\n * @method SpineGameObject#getAttachment\r\n * @since 3.19.0\r\n * \r\n * @param {integer} slotIndex - The slot index to search.\r\n * @param {string} attachmentName - The attachment name to look for.\r\n *\r\n * @return {?spine.Attachment} The Attachment, if found. May be null.\r\n */\r\n getAttachment: function (slotIndex, attachmentName)\r\n {\r\n return this.skeleton.getAttachment(slotIndex, attachmentName);\r\n },\r\n\r\n /**\r\n * Finds an attachment by looking in the skin and defaultSkin using the slot name and attachment name.\r\n *\r\n * @method SpineGameObject#getAttachmentByName\r\n * @since 3.19.0\r\n * \r\n * @param {string} slotName - The slot name to search.\r\n * @param {string} attachmentName - The attachment name to look for.\r\n *\r\n * @return {?spine.Attachment} The Attachment, if found. May be null.\r\n */\r\n getAttachmentByName: function (slotName, attachmentName)\r\n {\r\n return this.skeleton.getAttachmentByName(slotName, attachmentName);\r\n },\r\n\r\n /**\r\n * A convenience method to set an attachment by finding the slot with findSlot,\r\n * finding the attachment with getAttachment, then setting the slot's attachment.\r\n *\r\n * @method SpineGameObject#setAttachment\r\n * @since 3.19.0\r\n * \r\n * @param {string} slotName - The slot name to add the attachment to.\r\n * @param {string} attachmentName - The attachment name to add.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setAttachment: function (slotName, attachmentName)\r\n {\r\n if (Array.isArray(slotName) && Array.isArray(attachmentName) && slotName.length === attachmentName.length)\r\n {\r\n for (var i = 0; i < slotName.length; i++)\r\n {\r\n this.skeleton.setAttachment(slotName[i], attachmentName[i]);\r\n }\r\n }\r\n else\r\n {\r\n this.skeleton.setAttachment(slotName, attachmentName);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the bones, constraints, slots, and draw order to their setup pose values.\r\n *\r\n * @method SpineGameObject#setToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setToSetupPose: function ()\r\n {\r\n this.skeleton.setToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the slots and draw order to their setup pose values.\r\n *\r\n * @method SpineGameObject#setSlotsToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setSlotsToSetupPose: function ()\r\n {\r\n this.skeleton.setSlotsToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the bones and constraints to their setup pose values.\r\n *\r\n * @method SpineGameObject#setBonesToSetupPose\r\n * @since 3.19.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setBonesToSetupPose: function ()\r\n {\r\n this.skeleton.setBonesToSetupPose();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the root bone, or null.\r\n *\r\n * @method SpineGameObject#getRootBone\r\n * @since 3.19.0\r\n *\r\n * @return {spine.Bone} The root bone, or null.\r\n */\r\n getRootBone: function ()\r\n {\r\n return this.skeleton.getRootBone();\r\n },\r\n\r\n /**\r\n * Takes a Bone object and a position in world space and rotates the Bone so it is angled\r\n * towards the given position. You can set an optional angle offset, should the bone be\r\n * designed at a specific angle already. You can also set a minimum and maximum range for the angle.\r\n *\r\n * @method SpineGameObject#angleBoneToXY\r\n * @since 3.19.0\r\n * \r\n * @param {spine.Bone} bone - The bone to rotate towards the world position.\r\n * @param {number} worldX - The world x coordinate to rotate the bone towards.\r\n * @param {number} worldY - The world y coordinate to rotate the bone towards.\r\n * @param {number} [offset=0] - An offset to add to the rotation angle.\r\n * @param {number} [minAngle=0] - The minimum range of the rotation angle.\r\n * @param {number} [maxAngle=360] - The maximum range of the rotation angle.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n angleBoneToXY: function (bone, worldX, worldY, offset, minAngle, maxAngle)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n if (minAngle === undefined) { minAngle = 0; }\r\n if (maxAngle === undefined) { maxAngle = 360; }\r\n\r\n var renderer = this.plugin.renderer;\r\n var height = renderer.height;\r\n\r\n var angle = CounterClockwise(AngleBetween(bone.worldX, height - bone.worldY, worldX, worldY) + DegToRad(offset));\r\n\r\n bone.rotation = Clamp(RadToDeg(angle), minAngle, maxAngle);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Finds a bone by comparing each bone's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findBone\r\n * @since 3.19.0\r\n * \r\n * @param {string} boneName - The name of the bone to find.\r\n *\r\n * @return {spine.Bone} The bone, or null.\r\n */\r\n findBone: function (boneName)\r\n {\r\n return this.skeleton.findBone(boneName);\r\n },\r\n\r\n /**\r\n * Finds the index of a bone by comparing each bone's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findBoneIndex\r\n * @since 3.19.0\r\n * \r\n * @param {string} boneName - The name of the bone to find.\r\n *\r\n * @return {integer} The bone index. Or -1 if the bone was not found.\r\n */\r\n findBoneIndex: function (boneName)\r\n {\r\n return this.skeleton.findBoneIndex(boneName);\r\n },\r\n\r\n /**\r\n * Finds a slot by comparing each slot's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSlot\r\n * @since 3.19.0\r\n * \r\n * @param {string} slotName - The name of the slot to find.\r\n *\r\n * @return {spine.Slot} The Slot. May be null.\r\n */\r\n findSlot: function (slotName)\r\n {\r\n return this.skeleton.findSlot(slotName);\r\n },\r\n\r\n /**\r\n * Finds the index of a slot by comparing each slot's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSlotIndex\r\n * @since 3.19.0\r\n * \r\n * @param {string} slotName - The name of the slot to find.\r\n *\r\n * @return {integer} The slot index. Or -1 if the Slot was not found.\r\n */\r\n findSlotIndex: function (slotName)\r\n {\r\n return this.skeleton.findSlotIndex(slotName);\r\n },\r\n\r\n /**\r\n * Finds a skin by comparing each skin's name. It is more efficient to cache the results of\r\n * this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findSkin\r\n * @since 3.19.0\r\n * \r\n * @param {string} skinName - The name of the skin to find.\r\n *\r\n * @return {spine.Skin} The Skin. May be null.\r\n */\r\n findSkin: function (skinName)\r\n {\r\n return this.skeletonData.findSkin(skinName);\r\n },\r\n\r\n /**\r\n * Finds an event by comparing each events's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findEvent\r\n * @since 3.19.0\r\n * \r\n * @param {string} eventDataName - The name of the event to find.\r\n *\r\n * @return {spine.EventData} The Event Data. May be null.\r\n */\r\n findEvent: function (eventDataName)\r\n {\r\n return this.skeletonData.findEvent(eventDataName);\r\n },\r\n\r\n /**\r\n * Finds an animation by comparing each animation's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findAnimation\r\n * @since 3.19.0\r\n * \r\n * @param {string} animationName - The name of the animation to find.\r\n *\r\n * @return {spine.Animation} The Animation. May be null.\r\n */\r\n findAnimation: function (animationName)\r\n {\r\n return this.skeletonData.findAnimation(animationName);\r\n },\r\n\r\n /**\r\n * Finds an IK constraint by comparing each IK constraint's name. It is more efficient to cache the results\r\n * of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findIkConstraint\r\n * @since 3.19.0\r\n * \r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.IkConstraintData} The IK constraint. May be null.\r\n */\r\n findIkConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findIkConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds an transform constraint by comparing each transform constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findTransformConstraint\r\n * @since 3.19.0\r\n * \r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.TransformConstraintData} The transform constraint. May be null.\r\n */\r\n findTransformConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findTransformConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds a path constraint by comparing each path constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findPathConstraint\r\n * @since 3.19.0\r\n * \r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {spine.PathConstraintData} The path constraint. May be null.\r\n */\r\n findPathConstraint: function (constraintName)\r\n {\r\n return this.skeletonData.findPathConstraint(constraintName);\r\n },\r\n\r\n /**\r\n * Finds the index of a path constraint by comparing each path constraint's name.\r\n * It is more efficient to cache the results of this method than to call it multiple times.\r\n *\r\n * @method SpineGameObject#findPathConstraintIndex\r\n * @since 3.19.0\r\n * \r\n * @param {string} constraintName - The name of the constraint to find.\r\n *\r\n * @return {integer} The constraint index. Or -1 if the constraint was not found.\r\n */\r\n findPathConstraintIndex: function (constraintName)\r\n {\r\n return this.skeletonData.findPathConstraintIndex(constraintName);\r\n },\r\n\r\n /**\r\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\r\n * \r\n * The returned object contains two properties: `offset` and `size`:\r\n * \r\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\r\n * `size` - The width and height of the AABB.\r\n *\r\n * @method SpineGameObject#getBounds\r\n * @since 3.19.0\r\n * \r\n * @return {any} The bounds object.\r\n */\r\n getBounds: function ()\r\n {\r\n return this.plugin.getBounds(this.skeleton);\r\n },\r\n\r\n /**\r\n * Internal update handler.\r\n *\r\n * @method SpineGameObject#preUpdate\r\n * @protected\r\n * @since 3.19.0\r\n * \r\n * @param {number} time - The current timestamp.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n preUpdate: function (time, delta)\r\n {\r\n var skeleton = this.skeleton;\r\n\r\n this.state.update((delta / 1000) * this.timeScale);\r\n\r\n this.state.apply(skeleton);\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method SpineGameObject#preDestroy\r\n * @protected\r\n * @since 3.19.0\r\n */\r\n preDestroy: function ()\r\n {\r\n if (this.state)\r\n {\r\n this.state.clearListeners();\r\n this.state.clearListenerNotifications();\r\n }\r\n\r\n this.plugin = null;\r\n\r\n this.skeleton = null;\r\n this.skeletonData = null;\r\n\r\n this.state = null;\r\n this.stateData = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SpineGameObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\r\nvar RadToDeg = require('../../../../src/math/RadToDeg');\r\nvar Wrap = require('../../../../src/math/Wrap');\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method SpineGameObject#renderCanvas\r\n * @since 3.19.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar SpineGameObjectCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var context = renderer.currentContext;\r\n\r\n var plugin = src.plugin;\r\n var skeleton = src.skeleton;\r\n var skeletonRenderer = plugin.skeletonRenderer;\r\n\r\n var GameObjectRenderMask = 15;\r\n\r\n var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)));\r\n\r\n if (!skeleton || !willRender)\r\n {\r\n return;\r\n }\r\n\r\n var camMatrix = renderer._tempMatrix1;\r\n var spriteMatrix = renderer._tempMatrix2;\r\n var calcMatrix = renderer._tempMatrix3;\r\n\r\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = src.x;\r\n spriteMatrix.f = src.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n skeleton.x = calcMatrix.tx;\r\n skeleton.y = calcMatrix.ty;\r\n\r\n skeleton.scaleX = calcMatrix.scaleX;\r\n\r\n // Inverse or we get upside-down skeletons\r\n skeleton.scaleY = calcMatrix.scaleY * -1;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n skeleton.scaleX *= -1;\r\n\r\n src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);\r\n }\r\n else\r\n {\r\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\r\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\r\n }\r\n\r\n if (src.scaleY < 0)\r\n {\r\n skeleton.scaleY *= -1;\r\n\r\n if (src.scaleX < 0)\r\n {\r\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n else\r\n {\r\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\r\n }\r\n }\r\n\r\n if (camera.renderToTexture)\r\n {\r\n skeleton.y = calcMatrix.ty;\r\n skeleton.scaleY *= -1;\r\n }\r\n\r\n // Add autoUpdate option\r\n skeleton.updateWorldTransform();\r\n\r\n skeletonRenderer.ctx = context;\r\n skeletonRenderer.debugRendering = (plugin.drawDebug || src.drawDebug);\r\n\r\n context.save();\r\n\r\n skeletonRenderer.draw(skeleton);\r\n\r\n context.restore();\r\n};\r\n\r\nmodule.exports = SpineGameObjectCanvasRenderer;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar renderWebGL = require('../../../../src/utils/NOOP');\r\nvar renderCanvas = require('../../../../src/utils/NOOP');\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = require('./SpineGameObjectWebGLRenderer');\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = require('./SpineGameObjectCanvasRenderer');\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n","/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar RadToDeg = require('../../../../src/math/RadToDeg');\nvar Wrap = require('../../../../src/math/Wrap');\n\n/**\n * Renders this Game Object with the WebGL Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method SpineGameObject#renderWebGL\n * @since 3.19.0\n * @private\n *\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\n{\n var plugin = src.plugin;\n var skeleton = src.skeleton;\n var sceneRenderer = plugin.sceneRenderer;\n\n var GameObjectRenderMask = 15;\n\n var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)));\n\n if (!skeleton || !willRender)\n {\n // Reset the current type\n renderer.currentType = '';\n\n // If there is already a batch running, we need to close it\n if (!renderer.nextTypeMatch)\n {\n // The next object in the display list is not a Spine object, so we end the batch\n sceneRenderer.end();\n\n renderer.rebindPipeline(renderer.pipelines.MultiPipeline);\n }\n\n return;\n }\n\n if (renderer.newType)\n {\n renderer.clearPipeline();\n }\n\n var camMatrix = renderer._tempMatrix1;\n var spriteMatrix = renderer._tempMatrix2;\n var calcMatrix = renderer._tempMatrix3;\n\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));\n\n camMatrix.copyFrom(camera.matrix);\n\n if (parentMatrix)\n {\n // Multiply the camera by the parent matrix\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\n\n // Undo the camera scroll\n spriteMatrix.e = src.x;\n spriteMatrix.f = src.y;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n }\n else\n {\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n }\n\n var viewportHeight = renderer.height;\n\n skeleton.x = calcMatrix.tx;\n skeleton.y = viewportHeight - calcMatrix.ty;\n\n skeleton.scaleX = calcMatrix.scaleX;\n skeleton.scaleY = calcMatrix.scaleY;\n\n if (src.scaleX < 0)\n {\n skeleton.scaleX *= -1;\n\n src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);\n }\n else\n {\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\n }\n\n if (src.scaleY < 0)\n {\n skeleton.scaleY *= -1;\n\n if (src.scaleX < 0)\n {\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n else\n {\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n }\n\n if (camera.renderToTexture)\n {\n skeleton.y = calcMatrix.ty;\n skeleton.scaleY *= -1;\n }\n\n // Add autoUpdate option\n skeleton.updateWorldTransform();\n\n if (renderer.newType)\n {\n sceneRenderer.begin();\n }\n\n // Draw the current skeleton\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\n\n if (plugin.drawDebug || src.drawDebug)\n {\n // Because if we don't, the bones render positions are completely wrong (*sigh*)\n var oldX = skeleton.x;\n var oldY = skeleton.y;\n\n skeleton.x = 0;\n skeleton.y = 0;\n\n sceneRenderer.drawSkeletonDebug(skeleton, src.preMultipliedAlpha);\n\n skeleton.x = oldX;\n skeleton.y = oldY;\n }\n\n if (!renderer.nextTypeMatch)\n {\n // The next object in the display list is not a Spine object, so we end the batch\n sceneRenderer.end();\n\n renderer.rebindPipeline(renderer.pipelines.MultiPipeline);\n }\n};\n\nmodule.exports = SpineGameObjectWebGLRenderer;\n","/*** IMPORTS FROM imports-loader ***/\n\n(function() {\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar spine;\r\n(function (spine) {\r\n var Animation = (function () {\r\n function Animation(name, timelines, duration) {\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n if (timelines == null)\r\n throw new Error(\"timelines cannot be null.\");\r\n this.name = name;\r\n this.timelines = timelines;\r\n this.timelineIds = [];\r\n for (var i = 0; i < timelines.length; i++)\r\n this.timelineIds[timelines[i].getPropertyId()] = true;\r\n this.duration = duration;\r\n }\r\n Animation.prototype.hasTimeline = function (id) {\r\n return this.timelineIds[id] == true;\r\n };\r\n Animation.prototype.apply = function (skeleton, lastTime, time, loop, events, alpha, blend, direction) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n if (loop && this.duration != 0) {\r\n time %= this.duration;\r\n if (lastTime > 0)\r\n lastTime %= this.duration;\r\n }\r\n var timelines = this.timelines;\r\n for (var i = 0, n = timelines.length; i < n; i++)\r\n timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\r\n };\r\n Animation.binarySearch = function (values, target, step) {\r\n if (step === void 0) { step = 1; }\r\n var low = 0;\r\n var high = values.length / step - 2;\r\n if (high == 0)\r\n return step;\r\n var current = high >>> 1;\r\n while (true) {\r\n if (values[(current + 1) * step] <= target)\r\n low = current + 1;\r\n else\r\n high = current;\r\n if (low == high)\r\n return (low + 1) * step;\r\n current = (low + high) >>> 1;\r\n }\r\n };\r\n Animation.linearSearch = function (values, target, step) {\r\n for (var i = 0, last = values.length - step; i <= last; i += step)\r\n if (values[i] > target)\r\n return i;\r\n return -1;\r\n };\r\n return Animation;\r\n }());\r\n spine.Animation = Animation;\r\n var MixBlend;\r\n (function (MixBlend) {\r\n MixBlend[MixBlend[\"setup\"] = 0] = \"setup\";\r\n MixBlend[MixBlend[\"first\"] = 1] = \"first\";\r\n MixBlend[MixBlend[\"replace\"] = 2] = \"replace\";\r\n MixBlend[MixBlend[\"add\"] = 3] = \"add\";\r\n })(MixBlend = spine.MixBlend || (spine.MixBlend = {}));\r\n var MixDirection;\r\n (function (MixDirection) {\r\n MixDirection[MixDirection[\"mixIn\"] = 0] = \"mixIn\";\r\n MixDirection[MixDirection[\"mixOut\"] = 1] = \"mixOut\";\r\n })(MixDirection = spine.MixDirection || (spine.MixDirection = {}));\r\n var TimelineType;\r\n (function (TimelineType) {\r\n TimelineType[TimelineType[\"rotate\"] = 0] = \"rotate\";\r\n TimelineType[TimelineType[\"translate\"] = 1] = \"translate\";\r\n TimelineType[TimelineType[\"scale\"] = 2] = \"scale\";\r\n TimelineType[TimelineType[\"shear\"] = 3] = \"shear\";\r\n TimelineType[TimelineType[\"attachment\"] = 4] = \"attachment\";\r\n TimelineType[TimelineType[\"color\"] = 5] = \"color\";\r\n TimelineType[TimelineType[\"deform\"] = 6] = \"deform\";\r\n TimelineType[TimelineType[\"event\"] = 7] = \"event\";\r\n TimelineType[TimelineType[\"drawOrder\"] = 8] = \"drawOrder\";\r\n TimelineType[TimelineType[\"ikConstraint\"] = 9] = \"ikConstraint\";\r\n TimelineType[TimelineType[\"transformConstraint\"] = 10] = \"transformConstraint\";\r\n TimelineType[TimelineType[\"pathConstraintPosition\"] = 11] = \"pathConstraintPosition\";\r\n TimelineType[TimelineType[\"pathConstraintSpacing\"] = 12] = \"pathConstraintSpacing\";\r\n TimelineType[TimelineType[\"pathConstraintMix\"] = 13] = \"pathConstraintMix\";\r\n TimelineType[TimelineType[\"twoColor\"] = 14] = \"twoColor\";\r\n })(TimelineType = spine.TimelineType || (spine.TimelineType = {}));\r\n var CurveTimeline = (function () {\r\n function CurveTimeline(frameCount) {\r\n if (frameCount <= 0)\r\n throw new Error(\"frameCount must be > 0: \" + frameCount);\r\n this.curves = spine.Utils.newFloatArray((frameCount - 1) * CurveTimeline.BEZIER_SIZE);\r\n }\r\n CurveTimeline.prototype.getFrameCount = function () {\r\n return this.curves.length / CurveTimeline.BEZIER_SIZE + 1;\r\n };\r\n CurveTimeline.prototype.setLinear = function (frameIndex) {\r\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.LINEAR;\r\n };\r\n CurveTimeline.prototype.setStepped = function (frameIndex) {\r\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.STEPPED;\r\n };\r\n CurveTimeline.prototype.getCurveType = function (frameIndex) {\r\n var index = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n if (index == this.curves.length)\r\n return CurveTimeline.LINEAR;\r\n var type = this.curves[index];\r\n if (type == CurveTimeline.LINEAR)\r\n return CurveTimeline.LINEAR;\r\n if (type == CurveTimeline.STEPPED)\r\n return CurveTimeline.STEPPED;\r\n return CurveTimeline.BEZIER;\r\n };\r\n CurveTimeline.prototype.setCurve = function (frameIndex, cx1, cy1, cx2, cy2) {\r\n var tmpx = (-cx1 * 2 + cx2) * 0.03, tmpy = (-cy1 * 2 + cy2) * 0.03;\r\n var dddfx = ((cx1 - cx2) * 3 + 1) * 0.006, dddfy = ((cy1 - cy2) * 3 + 1) * 0.006;\r\n var ddfx = tmpx * 2 + dddfx, ddfy = tmpy * 2 + dddfy;\r\n var dfx = cx1 * 0.3 + tmpx + dddfx * 0.16666667, dfy = cy1 * 0.3 + tmpy + dddfy * 0.16666667;\r\n var i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n var curves = this.curves;\r\n curves[i++] = CurveTimeline.BEZIER;\r\n var x = dfx, y = dfy;\r\n for (var n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n curves[i] = x;\r\n curves[i + 1] = y;\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n x += dfx;\r\n y += dfy;\r\n }\r\n };\r\n CurveTimeline.prototype.getCurvePercent = function (frameIndex, percent) {\r\n percent = spine.MathUtils.clamp(percent, 0, 1);\r\n var curves = this.curves;\r\n var i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n var type = curves[i];\r\n if (type == CurveTimeline.LINEAR)\r\n return percent;\r\n if (type == CurveTimeline.STEPPED)\r\n return 0;\r\n i++;\r\n var x = 0;\r\n for (var start = i, n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n x = curves[i];\r\n if (x >= percent) {\r\n var prevX = void 0, prevY = void 0;\r\n if (i == start) {\r\n prevX = 0;\r\n prevY = 0;\r\n }\r\n else {\r\n prevX = curves[i - 2];\r\n prevY = curves[i - 1];\r\n }\r\n return prevY + (curves[i + 1] - prevY) * (percent - prevX) / (x - prevX);\r\n }\r\n }\r\n var y = curves[i - 1];\r\n return y + (1 - y) * (percent - x) / (1 - x);\r\n };\r\n CurveTimeline.LINEAR = 0;\r\n CurveTimeline.STEPPED = 1;\r\n CurveTimeline.BEZIER = 2;\r\n CurveTimeline.BEZIER_SIZE = 10 * 2 - 1;\r\n return CurveTimeline;\r\n }());\r\n spine.CurveTimeline = CurveTimeline;\r\n var RotateTimeline = (function (_super) {\r\n __extends(RotateTimeline, _super);\r\n function RotateTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount << 1);\r\n return _this;\r\n }\r\n RotateTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.rotate << 24) + this.boneIndex;\r\n };\r\n RotateTimeline.prototype.setFrame = function (frameIndex, time, degrees) {\r\n frameIndex <<= 1;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + RotateTimeline.ROTATION] = degrees;\r\n };\r\n RotateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation;\r\n return;\r\n case MixBlend.first:\r\n var r_1 = bone.data.rotation - bone.rotation;\r\n bone.rotation += (r_1 - (16384 - ((16384.499999999996 - r_1 / 360) | 0)) * 360) * alpha;\r\n }\r\n return;\r\n }\r\n if (time >= frames[frames.length - RotateTimeline.ENTRIES]) {\r\n var r_2 = frames[frames.length + RotateTimeline.PREV_ROTATION];\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation + r_2 * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n r_2 += bone.data.rotation - bone.rotation;\r\n r_2 -= (16384 - ((16384.499999999996 - r_2 / 360) | 0)) * 360;\r\n case MixBlend.add:\r\n bone.rotation += r_2 * alpha;\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time, RotateTimeline.ENTRIES);\r\n var prevRotation = frames[frame + RotateTimeline.PREV_ROTATION];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime));\r\n var r = frames[frame + RotateTimeline.ROTATION] - prevRotation;\r\n r = prevRotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * percent;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n r += bone.data.rotation - bone.rotation;\r\n case MixBlend.add:\r\n bone.rotation += (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n }\r\n };\r\n RotateTimeline.ENTRIES = 2;\r\n RotateTimeline.PREV_TIME = -2;\r\n RotateTimeline.PREV_ROTATION = -1;\r\n RotateTimeline.ROTATION = 1;\r\n return RotateTimeline;\r\n }(CurveTimeline));\r\n spine.RotateTimeline = RotateTimeline;\r\n var TranslateTimeline = (function (_super) {\r\n __extends(TranslateTimeline, _super);\r\n function TranslateTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TranslateTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.translate << 24) + this.boneIndex;\r\n };\r\n TranslateTimeline.prototype.setFrame = function (frameIndex, time, x, y) {\r\n frameIndex *= TranslateTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TranslateTimeline.X] = x;\r\n this.frames[frameIndex + TranslateTimeline.Y] = y;\r\n };\r\n TranslateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.x = bone.data.x;\r\n bone.y = bone.data.y;\r\n return;\r\n case MixBlend.first:\r\n bone.x += (bone.data.x - bone.x) * alpha;\r\n bone.y += (bone.data.y - bone.y) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - TranslateTimeline.ENTRIES]) {\r\n x = frames[frames.length + TranslateTimeline.PREV_X];\r\n y = frames[frames.length + TranslateTimeline.PREV_Y];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TranslateTimeline.ENTRIES);\r\n x = frames[frame + TranslateTimeline.PREV_X];\r\n y = frames[frame + TranslateTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TranslateTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TranslateTimeline.PREV_TIME] - frameTime));\r\n x += (frames[frame + TranslateTimeline.X] - x) * percent;\r\n y += (frames[frame + TranslateTimeline.Y] - y) * percent;\r\n }\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.x = bone.data.x + x * alpha;\r\n bone.y = bone.data.y + y * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bone.x += (bone.data.x + x - bone.x) * alpha;\r\n bone.y += (bone.data.y + y - bone.y) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bone.x += x * alpha;\r\n bone.y += y * alpha;\r\n }\r\n };\r\n TranslateTimeline.ENTRIES = 3;\r\n TranslateTimeline.PREV_TIME = -3;\r\n TranslateTimeline.PREV_X = -2;\r\n TranslateTimeline.PREV_Y = -1;\r\n TranslateTimeline.X = 1;\r\n TranslateTimeline.Y = 2;\r\n return TranslateTimeline;\r\n }(CurveTimeline));\r\n spine.TranslateTimeline = TranslateTimeline;\r\n var ScaleTimeline = (function (_super) {\r\n __extends(ScaleTimeline, _super);\r\n function ScaleTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n ScaleTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.scale << 24) + this.boneIndex;\r\n };\r\n ScaleTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.scaleX = bone.data.scaleX;\r\n bone.scaleY = bone.data.scaleY;\r\n return;\r\n case MixBlend.first:\r\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\r\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - ScaleTimeline.ENTRIES]) {\r\n x = frames[frames.length + ScaleTimeline.PREV_X] * bone.data.scaleX;\r\n y = frames[frames.length + ScaleTimeline.PREV_Y] * bone.data.scaleY;\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ScaleTimeline.ENTRIES);\r\n x = frames[frame + ScaleTimeline.PREV_X];\r\n y = frames[frame + ScaleTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ScaleTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ScaleTimeline.PREV_TIME] - frameTime));\r\n x = (x + (frames[frame + ScaleTimeline.X] - x) * percent) * bone.data.scaleX;\r\n y = (y + (frames[frame + ScaleTimeline.Y] - y) * percent) * bone.data.scaleY;\r\n }\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n bone.scaleX += x - bone.data.scaleX;\r\n bone.scaleY += y - bone.data.scaleY;\r\n }\r\n else {\r\n bone.scaleX = x;\r\n bone.scaleY = y;\r\n }\r\n }\r\n else {\r\n var bx = 0, by = 0;\r\n if (direction == MixDirection.mixOut) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bx = bone.data.scaleX;\r\n by = bone.data.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bx = bone.scaleX;\r\n by = bone.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bx = bone.scaleX;\r\n by = bone.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bone.data.scaleX) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - bone.data.scaleY) * alpha;\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bx = Math.abs(bone.data.scaleX) * spine.MathUtils.signum(x);\r\n by = Math.abs(bone.data.scaleY) * spine.MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bx = Math.abs(bone.scaleX) * spine.MathUtils.signum(x);\r\n by = Math.abs(bone.scaleY) * spine.MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bx = spine.MathUtils.signum(x);\r\n by = spine.MathUtils.signum(y);\r\n bone.scaleX = Math.abs(bone.scaleX) * bx + (x - Math.abs(bone.data.scaleX) * bx) * alpha;\r\n bone.scaleY = Math.abs(bone.scaleY) * by + (y - Math.abs(bone.data.scaleY) * by) * alpha;\r\n }\r\n }\r\n }\r\n };\r\n return ScaleTimeline;\r\n }(TranslateTimeline));\r\n spine.ScaleTimeline = ScaleTimeline;\r\n var ShearTimeline = (function (_super) {\r\n __extends(ShearTimeline, _super);\r\n function ShearTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n ShearTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.shear << 24) + this.boneIndex;\r\n };\r\n ShearTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.shearX = bone.data.shearX;\r\n bone.shearY = bone.data.shearY;\r\n return;\r\n case MixBlend.first:\r\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - ShearTimeline.ENTRIES]) {\r\n x = frames[frames.length + ShearTimeline.PREV_X];\r\n y = frames[frames.length + ShearTimeline.PREV_Y];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ShearTimeline.ENTRIES);\r\n x = frames[frame + ShearTimeline.PREV_X];\r\n y = frames[frame + ShearTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ShearTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ShearTimeline.PREV_TIME] - frameTime));\r\n x = x + (frames[frame + ShearTimeline.X] - x) * percent;\r\n y = y + (frames[frame + ShearTimeline.Y] - y) * percent;\r\n }\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.shearX = bone.data.shearX + x * alpha;\r\n bone.shearY = bone.data.shearY + y * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bone.shearX += x * alpha;\r\n bone.shearY += y * alpha;\r\n }\r\n };\r\n return ShearTimeline;\r\n }(TranslateTimeline));\r\n spine.ShearTimeline = ShearTimeline;\r\n var ColorTimeline = (function (_super) {\r\n __extends(ColorTimeline, _super);\r\n function ColorTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES);\r\n return _this;\r\n }\r\n ColorTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.color << 24) + this.slotIndex;\r\n };\r\n ColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a) {\r\n frameIndex *= ColorTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + ColorTimeline.R] = r;\r\n this.frames[frameIndex + ColorTimeline.G] = g;\r\n this.frames[frameIndex + ColorTimeline.B] = b;\r\n this.frames[frameIndex + ColorTimeline.A] = a;\r\n };\r\n ColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n slot.color.setFromColor(slot.data.color);\r\n return;\r\n case MixBlend.first:\r\n var color = slot.color, setup = slot.data.color;\r\n color.add((setup.r - color.r) * alpha, (setup.g - color.g) * alpha, (setup.b - color.b) * alpha, (setup.a - color.a) * alpha);\r\n }\r\n return;\r\n }\r\n var r = 0, g = 0, b = 0, a = 0;\r\n if (time >= frames[frames.length - ColorTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n r = frames[i + ColorTimeline.PREV_R];\r\n g = frames[i + ColorTimeline.PREV_G];\r\n b = frames[i + ColorTimeline.PREV_B];\r\n a = frames[i + ColorTimeline.PREV_A];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ColorTimeline.ENTRIES);\r\n r = frames[frame + ColorTimeline.PREV_R];\r\n g = frames[frame + ColorTimeline.PREV_G];\r\n b = frames[frame + ColorTimeline.PREV_B];\r\n a = frames[frame + ColorTimeline.PREV_A];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ColorTimeline.PREV_TIME] - frameTime));\r\n r += (frames[frame + ColorTimeline.R] - r) * percent;\r\n g += (frames[frame + ColorTimeline.G] - g) * percent;\r\n b += (frames[frame + ColorTimeline.B] - b) * percent;\r\n a += (frames[frame + ColorTimeline.A] - a) * percent;\r\n }\r\n if (alpha == 1)\r\n slot.color.set(r, g, b, a);\r\n else {\r\n var color = slot.color;\r\n if (blend == MixBlend.setup)\r\n color.setFromColor(slot.data.color);\r\n color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);\r\n }\r\n };\r\n ColorTimeline.ENTRIES = 5;\r\n ColorTimeline.PREV_TIME = -5;\r\n ColorTimeline.PREV_R = -4;\r\n ColorTimeline.PREV_G = -3;\r\n ColorTimeline.PREV_B = -2;\r\n ColorTimeline.PREV_A = -1;\r\n ColorTimeline.R = 1;\r\n ColorTimeline.G = 2;\r\n ColorTimeline.B = 3;\r\n ColorTimeline.A = 4;\r\n return ColorTimeline;\r\n }(CurveTimeline));\r\n spine.ColorTimeline = ColorTimeline;\r\n var TwoColorTimeline = (function (_super) {\r\n __extends(TwoColorTimeline, _super);\r\n function TwoColorTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TwoColorTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TwoColorTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.twoColor << 24) + this.slotIndex;\r\n };\r\n TwoColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a, r2, g2, b2) {\r\n frameIndex *= TwoColorTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TwoColorTimeline.R] = r;\r\n this.frames[frameIndex + TwoColorTimeline.G] = g;\r\n this.frames[frameIndex + TwoColorTimeline.B] = b;\r\n this.frames[frameIndex + TwoColorTimeline.A] = a;\r\n this.frames[frameIndex + TwoColorTimeline.R2] = r2;\r\n this.frames[frameIndex + TwoColorTimeline.G2] = g2;\r\n this.frames[frameIndex + TwoColorTimeline.B2] = b2;\r\n };\r\n TwoColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n slot.color.setFromColor(slot.data.color);\r\n slot.darkColor.setFromColor(slot.data.darkColor);\r\n return;\r\n case MixBlend.first:\r\n var light = slot.color, dark = slot.darkColor, setupLight = slot.data.color, setupDark = slot.data.darkColor;\r\n light.add((setupLight.r - light.r) * alpha, (setupLight.g - light.g) * alpha, (setupLight.b - light.b) * alpha, (setupLight.a - light.a) * alpha);\r\n dark.add((setupDark.r - dark.r) * alpha, (setupDark.g - dark.g) * alpha, (setupDark.b - dark.b) * alpha, 0);\r\n }\r\n return;\r\n }\r\n var r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\r\n if (time >= frames[frames.length - TwoColorTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n r = frames[i + TwoColorTimeline.PREV_R];\r\n g = frames[i + TwoColorTimeline.PREV_G];\r\n b = frames[i + TwoColorTimeline.PREV_B];\r\n a = frames[i + TwoColorTimeline.PREV_A];\r\n r2 = frames[i + TwoColorTimeline.PREV_R2];\r\n g2 = frames[i + TwoColorTimeline.PREV_G2];\r\n b2 = frames[i + TwoColorTimeline.PREV_B2];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TwoColorTimeline.ENTRIES);\r\n r = frames[frame + TwoColorTimeline.PREV_R];\r\n g = frames[frame + TwoColorTimeline.PREV_G];\r\n b = frames[frame + TwoColorTimeline.PREV_B];\r\n a = frames[frame + TwoColorTimeline.PREV_A];\r\n r2 = frames[frame + TwoColorTimeline.PREV_R2];\r\n g2 = frames[frame + TwoColorTimeline.PREV_G2];\r\n b2 = frames[frame + TwoColorTimeline.PREV_B2];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TwoColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TwoColorTimeline.PREV_TIME] - frameTime));\r\n r += (frames[frame + TwoColorTimeline.R] - r) * percent;\r\n g += (frames[frame + TwoColorTimeline.G] - g) * percent;\r\n b += (frames[frame + TwoColorTimeline.B] - b) * percent;\r\n a += (frames[frame + TwoColorTimeline.A] - a) * percent;\r\n r2 += (frames[frame + TwoColorTimeline.R2] - r2) * percent;\r\n g2 += (frames[frame + TwoColorTimeline.G2] - g2) * percent;\r\n b2 += (frames[frame + TwoColorTimeline.B2] - b2) * percent;\r\n }\r\n if (alpha == 1) {\r\n slot.color.set(r, g, b, a);\r\n slot.darkColor.set(r2, g2, b2, 1);\r\n }\r\n else {\r\n var light = slot.color, dark = slot.darkColor;\r\n if (blend == MixBlend.setup) {\r\n light.setFromColor(slot.data.color);\r\n dark.setFromColor(slot.data.darkColor);\r\n }\r\n light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\r\n dark.add((r2 - dark.r) * alpha, (g2 - dark.g) * alpha, (b2 - dark.b) * alpha, 0);\r\n }\r\n };\r\n TwoColorTimeline.ENTRIES = 8;\r\n TwoColorTimeline.PREV_TIME = -8;\r\n TwoColorTimeline.PREV_R = -7;\r\n TwoColorTimeline.PREV_G = -6;\r\n TwoColorTimeline.PREV_B = -5;\r\n TwoColorTimeline.PREV_A = -4;\r\n TwoColorTimeline.PREV_R2 = -3;\r\n TwoColorTimeline.PREV_G2 = -2;\r\n TwoColorTimeline.PREV_B2 = -1;\r\n TwoColorTimeline.R = 1;\r\n TwoColorTimeline.G = 2;\r\n TwoColorTimeline.B = 3;\r\n TwoColorTimeline.A = 4;\r\n TwoColorTimeline.R2 = 5;\r\n TwoColorTimeline.G2 = 6;\r\n TwoColorTimeline.B2 = 7;\r\n return TwoColorTimeline;\r\n }(CurveTimeline));\r\n spine.TwoColorTimeline = TwoColorTimeline;\r\n var AttachmentTimeline = (function () {\r\n function AttachmentTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.attachmentNames = new Array(frameCount);\r\n }\r\n AttachmentTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.attachment << 24) + this.slotIndex;\r\n };\r\n AttachmentTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n AttachmentTimeline.prototype.setFrame = function (frameIndex, time, attachmentName) {\r\n this.frames[frameIndex] = time;\r\n this.attachmentNames[frameIndex] = attachmentName;\r\n };\r\n AttachmentTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n if (direction == MixDirection.mixOut) {\r\n if (blend == MixBlend.setup)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n return;\r\n }\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n if (blend == MixBlend.setup || blend == MixBlend.first)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n return;\r\n }\r\n var frameIndex = 0;\r\n if (time >= frames[frames.length - 1])\r\n frameIndex = frames.length - 1;\r\n else\r\n frameIndex = Animation.binarySearch(frames, time, 1) - 1;\r\n var attachmentName = this.attachmentNames[frameIndex];\r\n skeleton.slots[this.slotIndex]\r\n .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\r\n };\r\n AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) {\r\n slot.attachment = attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName);\r\n };\r\n return AttachmentTimeline;\r\n }());\r\n spine.AttachmentTimeline = AttachmentTimeline;\r\n var zeros = null;\r\n var DeformTimeline = (function (_super) {\r\n __extends(DeformTimeline, _super);\r\n function DeformTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount);\r\n _this.frameVertices = new Array(frameCount);\r\n if (zeros == null)\r\n zeros = spine.Utils.newFloatArray(64);\r\n return _this;\r\n }\r\n DeformTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.deform << 27) + +this.attachment.id + this.slotIndex;\r\n };\r\n DeformTimeline.prototype.setFrame = function (frameIndex, time, vertices) {\r\n this.frames[frameIndex] = time;\r\n this.frameVertices[frameIndex] = vertices;\r\n };\r\n DeformTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var slotAttachment = slot.getAttachment();\r\n if (!(slotAttachment instanceof spine.VertexAttachment) || !(slotAttachment.deformAttachment == this.attachment))\r\n return;\r\n var deformArray = slot.deform;\r\n if (deformArray.length == 0)\r\n blend = MixBlend.setup;\r\n var frameVertices = this.frameVertices;\r\n var vertexCount = frameVertices[0].length;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n var vertexAttachment = slotAttachment;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n deformArray.length = 0;\r\n return;\r\n case MixBlend.first:\r\n if (alpha == 1) {\r\n deformArray.length = 0;\r\n break;\r\n }\r\n var deform_1 = spine.Utils.setArraySize(deformArray, vertexCount);\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform_1[i] += (setupVertices[i] - deform_1[i]) * alpha;\r\n }\r\n else {\r\n alpha = 1 - alpha;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform_1[i] *= alpha;\r\n }\r\n }\r\n return;\r\n }\r\n var deform = spine.Utils.setArraySize(deformArray, vertexCount);\r\n if (time >= frames[frames.length - 1]) {\r\n var lastVertices = frameVertices[frames.length - 1];\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_1 = 0; i_1 < vertexCount; i_1++) {\r\n deform[i_1] += lastVertices[i_1] - setupVertices[i_1];\r\n }\r\n }\r\n else {\r\n for (var i_2 = 0; i_2 < vertexCount; i_2++)\r\n deform[i_2] += lastVertices[i_2];\r\n }\r\n }\r\n else {\r\n spine.Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup: {\r\n var vertexAttachment_1 = slotAttachment;\r\n if (vertexAttachment_1.bones == null) {\r\n var setupVertices = vertexAttachment_1.vertices;\r\n for (var i_3 = 0; i_3 < vertexCount; i_3++) {\r\n var setup = setupVertices[i_3];\r\n deform[i_3] = setup + (lastVertices[i_3] - setup) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_4 = 0; i_4 < vertexCount; i_4++)\r\n deform[i_4] = lastVertices[i_4] * alpha;\r\n }\r\n break;\r\n }\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n for (var i_5 = 0; i_5 < vertexCount; i_5++)\r\n deform[i_5] += (lastVertices[i_5] - deform[i_5]) * alpha;\r\n break;\r\n case MixBlend.add:\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_6 = 0; i_6 < vertexCount; i_6++) {\r\n deform[i_6] += (lastVertices[i_6] - setupVertices[i_6]) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_7 = 0; i_7 < vertexCount; i_7++)\r\n deform[i_7] += lastVertices[i_7] * alpha;\r\n }\r\n }\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time);\r\n var prevVertices = frameVertices[frame - 1];\r\n var nextVertices = frameVertices[frame];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame - 1, 1 - (time - frameTime) / (frames[frame - 1] - frameTime));\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_8 = 0; i_8 < vertexCount; i_8++) {\r\n var prev = prevVertices[i_8];\r\n deform[i_8] += prev + (nextVertices[i_8] - prev) * percent - setupVertices[i_8];\r\n }\r\n }\r\n else {\r\n for (var i_9 = 0; i_9 < vertexCount; i_9++) {\r\n var prev = prevVertices[i_9];\r\n deform[i_9] += prev + (nextVertices[i_9] - prev) * percent;\r\n }\r\n }\r\n }\r\n else {\r\n for (var i_10 = 0; i_10 < vertexCount; i_10++) {\r\n var prev = prevVertices[i_10];\r\n deform[i_10] = prev + (nextVertices[i_10] - prev) * percent;\r\n }\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup: {\r\n var vertexAttachment_2 = slotAttachment;\r\n if (vertexAttachment_2.bones == null) {\r\n var setupVertices = vertexAttachment_2.vertices;\r\n for (var i_11 = 0; i_11 < vertexCount; i_11++) {\r\n var prev = prevVertices[i_11], setup = setupVertices[i_11];\r\n deform[i_11] = setup + (prev + (nextVertices[i_11] - prev) * percent - setup) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_12 = 0; i_12 < vertexCount; i_12++) {\r\n var prev = prevVertices[i_12];\r\n deform[i_12] = (prev + (nextVertices[i_12] - prev) * percent) * alpha;\r\n }\r\n }\r\n break;\r\n }\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n for (var i_13 = 0; i_13 < vertexCount; i_13++) {\r\n var prev = prevVertices[i_13];\r\n deform[i_13] += (prev + (nextVertices[i_13] - prev) * percent - deform[i_13]) * alpha;\r\n }\r\n break;\r\n case MixBlend.add:\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_14 = 0; i_14 < vertexCount; i_14++) {\r\n var prev = prevVertices[i_14];\r\n deform[i_14] += (prev + (nextVertices[i_14] - prev) * percent - setupVertices[i_14]) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_15 = 0; i_15 < vertexCount; i_15++) {\r\n var prev = prevVertices[i_15];\r\n deform[i_15] += (prev + (nextVertices[i_15] - prev) * percent) * alpha;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n return DeformTimeline;\r\n }(CurveTimeline));\r\n spine.DeformTimeline = DeformTimeline;\r\n var EventTimeline = (function () {\r\n function EventTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.events = new Array(frameCount);\r\n }\r\n EventTimeline.prototype.getPropertyId = function () {\r\n return TimelineType.event << 24;\r\n };\r\n EventTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n EventTimeline.prototype.setFrame = function (frameIndex, event) {\r\n this.frames[frameIndex] = event.time;\r\n this.events[frameIndex] = event;\r\n };\r\n EventTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n if (firedEvents == null)\r\n return;\r\n var frames = this.frames;\r\n var frameCount = this.frames.length;\r\n if (lastTime > time) {\r\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\r\n lastTime = -1;\r\n }\r\n else if (lastTime >= frames[frameCount - 1])\r\n return;\r\n if (time < frames[0])\r\n return;\r\n var frame = 0;\r\n if (lastTime < frames[0])\r\n frame = 0;\r\n else {\r\n frame = Animation.binarySearch(frames, lastTime);\r\n var frameTime = frames[frame];\r\n while (frame > 0) {\r\n if (frames[frame - 1] != frameTime)\r\n break;\r\n frame--;\r\n }\r\n }\r\n for (; frame < frameCount && time >= frames[frame]; frame++)\r\n firedEvents.push(this.events[frame]);\r\n };\r\n return EventTimeline;\r\n }());\r\n spine.EventTimeline = EventTimeline;\r\n var DrawOrderTimeline = (function () {\r\n function DrawOrderTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.drawOrders = new Array(frameCount);\r\n }\r\n DrawOrderTimeline.prototype.getPropertyId = function () {\r\n return TimelineType.drawOrder << 24;\r\n };\r\n DrawOrderTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n DrawOrderTimeline.prototype.setFrame = function (frameIndex, time, drawOrder) {\r\n this.frames[frameIndex] = time;\r\n this.drawOrders[frameIndex] = drawOrder;\r\n };\r\n DrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var drawOrder = skeleton.drawOrder;\r\n var slots = skeleton.slots;\r\n if (direction == MixDirection.mixOut) {\r\n if (blend == MixBlend.setup)\r\n spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n if (blend == MixBlend.setup || blend == MixBlend.first)\r\n spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n var frame = 0;\r\n if (time >= frames[frames.length - 1])\r\n frame = frames.length - 1;\r\n else\r\n frame = Animation.binarySearch(frames, time) - 1;\r\n var drawOrderToSetupIndex = this.drawOrders[frame];\r\n if (drawOrderToSetupIndex == null)\r\n spine.Utils.arrayCopy(slots, 0, drawOrder, 0, slots.length);\r\n else {\r\n for (var i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\r\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\r\n }\r\n };\r\n return DrawOrderTimeline;\r\n }());\r\n spine.DrawOrderTimeline = DrawOrderTimeline;\r\n var IkConstraintTimeline = (function (_super) {\r\n __extends(IkConstraintTimeline, _super);\r\n function IkConstraintTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES);\r\n return _this;\r\n }\r\n IkConstraintTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.ikConstraint << 24) + this.ikConstraintIndex;\r\n };\r\n IkConstraintTimeline.prototype.setFrame = function (frameIndex, time, mix, softness, bendDirection, compress, stretch) {\r\n frameIndex *= IkConstraintTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + IkConstraintTimeline.MIX] = mix;\r\n this.frames[frameIndex + IkConstraintTimeline.SOFTNESS] = softness;\r\n this.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection;\r\n this.frames[frameIndex + IkConstraintTimeline.COMPRESS] = compress ? 1 : 0;\r\n this.frames[frameIndex + IkConstraintTimeline.STRETCH] = stretch ? 1 : 0;\r\n };\r\n IkConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.ikConstraints[this.ikConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n return;\r\n case MixBlend.first:\r\n constraint.mix += (constraint.data.mix - constraint.mix) * alpha;\r\n constraint.softness += (constraint.data.softness - constraint.softness) * alpha;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n return;\r\n }\r\n if (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) {\r\n if (blend == MixBlend.setup) {\r\n constraint.mix = constraint.data.mix + (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.data.mix) * alpha;\r\n constraint.softness = constraint.data.softness\r\n + (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.data.softness) * alpha;\r\n if (direction == MixDirection.mixOut) {\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n else {\r\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n else {\r\n constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha;\r\n constraint.softness += (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.softness) * alpha;\r\n if (direction == MixDirection.mixIn) {\r\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time, IkConstraintTimeline.ENTRIES);\r\n var mix = frames[frame + IkConstraintTimeline.PREV_MIX];\r\n var softness = frames[frame + IkConstraintTimeline.PREV_SOFTNESS];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime));\r\n if (blend == MixBlend.setup) {\r\n constraint.mix = constraint.data.mix + (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.data.mix) * alpha;\r\n constraint.softness = constraint.data.softness\r\n + (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.data.softness) * alpha;\r\n if (direction == MixDirection.mixOut) {\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n else {\r\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n else {\r\n constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha;\r\n constraint.softness += (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.softness) * alpha;\r\n if (direction == MixDirection.mixIn) {\r\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n };\r\n IkConstraintTimeline.ENTRIES = 6;\r\n IkConstraintTimeline.PREV_TIME = -6;\r\n IkConstraintTimeline.PREV_MIX = -5;\r\n IkConstraintTimeline.PREV_SOFTNESS = -4;\r\n IkConstraintTimeline.PREV_BEND_DIRECTION = -3;\r\n IkConstraintTimeline.PREV_COMPRESS = -2;\r\n IkConstraintTimeline.PREV_STRETCH = -1;\r\n IkConstraintTimeline.MIX = 1;\r\n IkConstraintTimeline.SOFTNESS = 2;\r\n IkConstraintTimeline.BEND_DIRECTION = 3;\r\n IkConstraintTimeline.COMPRESS = 4;\r\n IkConstraintTimeline.STRETCH = 5;\r\n return IkConstraintTimeline;\r\n }(CurveTimeline));\r\n spine.IkConstraintTimeline = IkConstraintTimeline;\r\n var TransformConstraintTimeline = (function (_super) {\r\n __extends(TransformConstraintTimeline, _super);\r\n function TransformConstraintTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TransformConstraintTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.transformConstraint << 24) + this.transformConstraintIndex;\r\n };\r\n TransformConstraintTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix, scaleMix, shearMix) {\r\n frameIndex *= TransformConstraintTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TransformConstraintTimeline.ROTATE] = rotateMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.TRANSLATE] = translateMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.SCALE] = scaleMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.SHEAR] = shearMix;\r\n };\r\n TransformConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.transformConstraints[this.transformConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n var data = constraint.data;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n constraint.scaleMix = data.scaleMix;\r\n constraint.shearMix = data.shearMix;\r\n return;\r\n case MixBlend.first:\r\n constraint.rotateMix += (data.rotateMix - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (data.translateMix - constraint.translateMix) * alpha;\r\n constraint.scaleMix += (data.scaleMix - constraint.scaleMix) * alpha;\r\n constraint.shearMix += (data.shearMix - constraint.shearMix) * alpha;\r\n }\r\n return;\r\n }\r\n var rotate = 0, translate = 0, scale = 0, shear = 0;\r\n if (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n rotate = frames[i + TransformConstraintTimeline.PREV_ROTATE];\r\n translate = frames[i + TransformConstraintTimeline.PREV_TRANSLATE];\r\n scale = frames[i + TransformConstraintTimeline.PREV_SCALE];\r\n shear = frames[i + TransformConstraintTimeline.PREV_SHEAR];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES);\r\n rotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE];\r\n translate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE];\r\n scale = frames[frame + TransformConstraintTimeline.PREV_SCALE];\r\n shear = frames[frame + TransformConstraintTimeline.PREV_SHEAR];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime));\r\n rotate += (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent;\r\n translate += (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent;\r\n scale += (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent;\r\n shear += (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent;\r\n }\r\n if (blend == MixBlend.setup) {\r\n var data = constraint.data;\r\n constraint.rotateMix = data.rotateMix + (rotate - data.rotateMix) * alpha;\r\n constraint.translateMix = data.translateMix + (translate - data.translateMix) * alpha;\r\n constraint.scaleMix = data.scaleMix + (scale - data.scaleMix) * alpha;\r\n constraint.shearMix = data.shearMix + (shear - data.shearMix) * alpha;\r\n }\r\n else {\r\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n constraint.scaleMix += (scale - constraint.scaleMix) * alpha;\r\n constraint.shearMix += (shear - constraint.shearMix) * alpha;\r\n }\r\n };\r\n TransformConstraintTimeline.ENTRIES = 5;\r\n TransformConstraintTimeline.PREV_TIME = -5;\r\n TransformConstraintTimeline.PREV_ROTATE = -4;\r\n TransformConstraintTimeline.PREV_TRANSLATE = -3;\r\n TransformConstraintTimeline.PREV_SCALE = -2;\r\n TransformConstraintTimeline.PREV_SHEAR = -1;\r\n TransformConstraintTimeline.ROTATE = 1;\r\n TransformConstraintTimeline.TRANSLATE = 2;\r\n TransformConstraintTimeline.SCALE = 3;\r\n TransformConstraintTimeline.SHEAR = 4;\r\n return TransformConstraintTimeline;\r\n }(CurveTimeline));\r\n spine.TransformConstraintTimeline = TransformConstraintTimeline;\r\n var PathConstraintPositionTimeline = (function (_super) {\r\n __extends(PathConstraintPositionTimeline, _super);\r\n function PathConstraintPositionTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES);\r\n return _this;\r\n }\r\n PathConstraintPositionTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintPosition << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintPositionTimeline.prototype.setFrame = function (frameIndex, time, value) {\r\n frameIndex *= PathConstraintPositionTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + PathConstraintPositionTimeline.VALUE] = value;\r\n };\r\n PathConstraintPositionTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.position = constraint.data.position;\r\n return;\r\n case MixBlend.first:\r\n constraint.position += (constraint.data.position - constraint.position) * alpha;\r\n }\r\n return;\r\n }\r\n var position = 0;\r\n if (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES])\r\n position = frames[frames.length + PathConstraintPositionTimeline.PREV_VALUE];\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES);\r\n position = frames[frame + PathConstraintPositionTimeline.PREV_VALUE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintPositionTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintPositionTimeline.PREV_TIME] - frameTime));\r\n position += (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent;\r\n }\r\n if (blend == MixBlend.setup)\r\n constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\r\n else\r\n constraint.position += (position - constraint.position) * alpha;\r\n };\r\n PathConstraintPositionTimeline.ENTRIES = 2;\r\n PathConstraintPositionTimeline.PREV_TIME = -2;\r\n PathConstraintPositionTimeline.PREV_VALUE = -1;\r\n PathConstraintPositionTimeline.VALUE = 1;\r\n return PathConstraintPositionTimeline;\r\n }(CurveTimeline));\r\n spine.PathConstraintPositionTimeline = PathConstraintPositionTimeline;\r\n var PathConstraintSpacingTimeline = (function (_super) {\r\n __extends(PathConstraintSpacingTimeline, _super);\r\n function PathConstraintSpacingTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n PathConstraintSpacingTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintSpacing << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintSpacingTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.spacing = constraint.data.spacing;\r\n return;\r\n case MixBlend.first:\r\n constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\r\n }\r\n return;\r\n }\r\n var spacing = 0;\r\n if (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES])\r\n spacing = frames[frames.length + PathConstraintSpacingTimeline.PREV_VALUE];\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES);\r\n spacing = frames[frame + PathConstraintSpacingTimeline.PREV_VALUE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintSpacingTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintSpacingTimeline.PREV_TIME] - frameTime));\r\n spacing += (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent;\r\n }\r\n if (blend == MixBlend.setup)\r\n constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\r\n else\r\n constraint.spacing += (spacing - constraint.spacing) * alpha;\r\n };\r\n return PathConstraintSpacingTimeline;\r\n }(PathConstraintPositionTimeline));\r\n spine.PathConstraintSpacingTimeline = PathConstraintSpacingTimeline;\r\n var PathConstraintMixTimeline = (function (_super) {\r\n __extends(PathConstraintMixTimeline, _super);\r\n function PathConstraintMixTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES);\r\n return _this;\r\n }\r\n PathConstraintMixTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintMix << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintMixTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix) {\r\n frameIndex *= PathConstraintMixTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + PathConstraintMixTimeline.ROTATE] = rotateMix;\r\n this.frames[frameIndex + PathConstraintMixTimeline.TRANSLATE] = translateMix;\r\n };\r\n PathConstraintMixTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.rotateMix = constraint.data.rotateMix;\r\n constraint.translateMix = constraint.data.translateMix;\r\n return;\r\n case MixBlend.first:\r\n constraint.rotateMix += (constraint.data.rotateMix - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (constraint.data.translateMix - constraint.translateMix) * alpha;\r\n }\r\n return;\r\n }\r\n var rotate = 0, translate = 0;\r\n if (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) {\r\n rotate = frames[frames.length + PathConstraintMixTimeline.PREV_ROTATE];\r\n translate = frames[frames.length + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES);\r\n rotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE];\r\n translate = frames[frame + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintMixTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintMixTimeline.PREV_TIME] - frameTime));\r\n rotate += (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent;\r\n translate += (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent;\r\n }\r\n if (blend == MixBlend.setup) {\r\n constraint.rotateMix = constraint.data.rotateMix + (rotate - constraint.data.rotateMix) * alpha;\r\n constraint.translateMix = constraint.data.translateMix + (translate - constraint.data.translateMix) * alpha;\r\n }\r\n else {\r\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n }\r\n };\r\n PathConstraintMixTimeline.ENTRIES = 3;\r\n PathConstraintMixTimeline.PREV_TIME = -3;\r\n PathConstraintMixTimeline.PREV_ROTATE = -2;\r\n PathConstraintMixTimeline.PREV_TRANSLATE = -1;\r\n PathConstraintMixTimeline.ROTATE = 1;\r\n PathConstraintMixTimeline.TRANSLATE = 2;\r\n return PathConstraintMixTimeline;\r\n }(CurveTimeline));\r\n spine.PathConstraintMixTimeline = PathConstraintMixTimeline;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AnimationState = (function () {\r\n function AnimationState(data) {\r\n this.tracks = new Array();\r\n this.timeScale = 1;\r\n this.unkeyedState = 0;\r\n this.events = new Array();\r\n this.listeners = new Array();\r\n this.queue = new EventQueue(this);\r\n this.propertyIDs = new spine.IntSet();\r\n this.animationsChanged = false;\r\n this.trackEntryPool = new spine.Pool(function () { return new TrackEntry(); });\r\n this.data = data;\r\n }\r\n AnimationState.prototype.update = function (delta) {\r\n delta *= this.timeScale;\r\n var tracks = this.tracks;\r\n for (var i = 0, n = tracks.length; i < n; i++) {\r\n var current = tracks[i];\r\n if (current == null)\r\n continue;\r\n current.animationLast = current.nextAnimationLast;\r\n current.trackLast = current.nextTrackLast;\r\n var currentDelta = delta * current.timeScale;\r\n if (current.delay > 0) {\r\n current.delay -= currentDelta;\r\n if (current.delay > 0)\r\n continue;\r\n currentDelta = -current.delay;\r\n current.delay = 0;\r\n }\r\n var next = current.next;\r\n if (next != null) {\r\n var nextTime = current.trackLast - next.delay;\r\n if (nextTime >= 0) {\r\n next.delay = 0;\r\n next.trackTime += current.timeScale == 0 ? 0 : (nextTime / current.timeScale + delta) * next.timeScale;\r\n current.trackTime += currentDelta;\r\n this.setCurrent(i, next, true);\r\n while (next.mixingFrom != null) {\r\n next.mixTime += delta;\r\n next = next.mixingFrom;\r\n }\r\n continue;\r\n }\r\n }\r\n else if (current.trackLast >= current.trackEnd && current.mixingFrom == null) {\r\n tracks[i] = null;\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n continue;\r\n }\r\n if (current.mixingFrom != null && this.updateMixingFrom(current, delta)) {\r\n var from = current.mixingFrom;\r\n current.mixingFrom = null;\r\n if (from != null)\r\n from.mixingTo = null;\r\n while (from != null) {\r\n this.queue.end(from);\r\n from = from.mixingFrom;\r\n }\r\n }\r\n current.trackTime += currentDelta;\r\n }\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.updateMixingFrom = function (to, delta) {\r\n var from = to.mixingFrom;\r\n if (from == null)\r\n return true;\r\n var finished = this.updateMixingFrom(from, delta);\r\n from.animationLast = from.nextAnimationLast;\r\n from.trackLast = from.nextTrackLast;\r\n if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {\r\n if (from.totalAlpha == 0 || to.mixDuration == 0) {\r\n to.mixingFrom = from.mixingFrom;\r\n if (from.mixingFrom != null)\r\n from.mixingFrom.mixingTo = to;\r\n to.interruptAlpha = from.interruptAlpha;\r\n this.queue.end(from);\r\n }\r\n return finished;\r\n }\r\n from.trackTime += delta * from.timeScale;\r\n to.mixTime += delta;\r\n return false;\r\n };\r\n AnimationState.prototype.apply = function (skeleton) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n if (this.animationsChanged)\r\n this._animationsChanged();\r\n var events = this.events;\r\n var tracks = this.tracks;\r\n var applied = false;\r\n for (var i_16 = 0, n_1 = tracks.length; i_16 < n_1; i_16++) {\r\n var current = tracks[i_16];\r\n if (current == null || current.delay > 0)\r\n continue;\r\n applied = true;\r\n var blend = i_16 == 0 ? spine.MixBlend.first : current.mixBlend;\r\n var mix = current.alpha;\r\n if (current.mixingFrom != null)\r\n mix *= this.applyMixingFrom(current, skeleton, blend);\r\n else if (current.trackTime >= current.trackEnd && current.next == null)\r\n mix = 0;\r\n var animationLast = current.animationLast, animationTime = current.getAnimationTime();\r\n var timelineCount = current.animation.timelines.length;\r\n var timelines = current.animation.timelines;\r\n if ((i_16 == 0 && mix == 1) || blend == spine.MixBlend.add) {\r\n for (var ii = 0; ii < timelineCount; ii++) {\r\n spine.Utils.webkit602BugfixHelper(mix, blend);\r\n var timeline = timelines[ii];\r\n if (timeline instanceof spine.AttachmentTimeline)\r\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, blend, true);\r\n else\r\n timeline.apply(skeleton, animationLast, animationTime, events, mix, blend, spine.MixDirection.mixIn);\r\n }\r\n }\r\n else {\r\n var timelineMode = current.timelineMode;\r\n var firstFrame = current.timelinesRotation.length == 0;\r\n if (firstFrame)\r\n spine.Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null);\r\n var timelinesRotation = current.timelinesRotation;\r\n for (var ii = 0; ii < timelineCount; ii++) {\r\n var timeline_1 = timelines[ii];\r\n var timelineBlend = timelineMode[ii] == AnimationState.SUBSEQUENT ? blend : spine.MixBlend.setup;\r\n if (timeline_1 instanceof spine.RotateTimeline) {\r\n this.applyRotateTimeline(timeline_1, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame);\r\n }\r\n else if (timeline_1 instanceof spine.AttachmentTimeline) {\r\n this.applyAttachmentTimeline(timeline_1, skeleton, animationTime, blend, true);\r\n }\r\n else {\r\n spine.Utils.webkit602BugfixHelper(mix, blend);\r\n timeline_1.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, spine.MixDirection.mixIn);\r\n }\r\n }\r\n }\r\n this.queueEvents(current, animationTime);\r\n events.length = 0;\r\n current.nextAnimationLast = animationTime;\r\n current.nextTrackLast = current.trackTime;\r\n }\r\n var setupState = this.unkeyedState + AnimationState.SETUP;\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = skeleton.slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.attachmentState == setupState) {\r\n var attachmentName = slot.data.attachmentName;\r\n slot.attachment = (attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));\r\n }\r\n }\r\n this.unkeyedState += 2;\r\n this.queue.drain();\r\n return applied;\r\n };\r\n AnimationState.prototype.applyMixingFrom = function (to, skeleton, blend) {\r\n var from = to.mixingFrom;\r\n if (from.mixingFrom != null)\r\n this.applyMixingFrom(from, skeleton, blend);\r\n var mix = 0;\r\n if (to.mixDuration == 0) {\r\n mix = 1;\r\n if (blend == spine.MixBlend.first)\r\n blend = spine.MixBlend.setup;\r\n }\r\n else {\r\n mix = to.mixTime / to.mixDuration;\r\n if (mix > 1)\r\n mix = 1;\r\n if (blend != spine.MixBlend.first)\r\n blend = from.mixBlend;\r\n }\r\n var events = mix < from.eventThreshold ? this.events : null;\r\n var attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\r\n var animationLast = from.animationLast, animationTime = from.getAnimationTime();\r\n var timelineCount = from.animation.timelines.length;\r\n var timelines = from.animation.timelines;\r\n var alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\r\n if (blend == spine.MixBlend.add) {\r\n for (var i = 0; i < timelineCount; i++)\r\n timelines[i].apply(skeleton, animationLast, animationTime, events, alphaMix, blend, spine.MixDirection.mixOut);\r\n }\r\n else {\r\n var timelineMode = from.timelineMode;\r\n var timelineHoldMix = from.timelineHoldMix;\r\n var firstFrame = from.timelinesRotation.length == 0;\r\n if (firstFrame)\r\n spine.Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null);\r\n var timelinesRotation = from.timelinesRotation;\r\n from.totalAlpha = 0;\r\n for (var i = 0; i < timelineCount; i++) {\r\n var timeline = timelines[i];\r\n var direction = spine.MixDirection.mixOut;\r\n var timelineBlend = void 0;\r\n var alpha = 0;\r\n switch (timelineMode[i]) {\r\n case AnimationState.SUBSEQUENT:\r\n if (!drawOrder && timeline instanceof spine.DrawOrderTimeline)\r\n continue;\r\n timelineBlend = blend;\r\n alpha = alphaMix;\r\n break;\r\n case AnimationState.FIRST:\r\n timelineBlend = spine.MixBlend.setup;\r\n alpha = alphaMix;\r\n break;\r\n case AnimationState.HOLD_SUBSEQUENT:\r\n timelineBlend = blend;\r\n alpha = alphaHold;\r\n break;\r\n case AnimationState.HOLD_FIRST:\r\n timelineBlend = spine.MixBlend.setup;\r\n alpha = alphaHold;\r\n break;\r\n default:\r\n timelineBlend = spine.MixBlend.setup;\r\n var holdMix = timelineHoldMix[i];\r\n alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\r\n break;\r\n }\r\n from.totalAlpha += alpha;\r\n if (timeline instanceof spine.RotateTimeline)\r\n this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame);\r\n else if (timeline instanceof spine.AttachmentTimeline)\r\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, timelineBlend, attachments);\r\n else {\r\n spine.Utils.webkit602BugfixHelper(alpha, blend);\r\n if (drawOrder && timeline instanceof spine.DrawOrderTimeline && timelineBlend == spine.MixBlend.setup)\r\n direction = spine.MixDirection.mixIn;\r\n timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, direction);\r\n }\r\n }\r\n }\r\n if (to.mixDuration > 0)\r\n this.queueEvents(from, animationTime);\r\n this.events.length = 0;\r\n from.nextAnimationLast = animationTime;\r\n from.nextTrackLast = from.trackTime;\r\n return mix;\r\n };\r\n AnimationState.prototype.applyAttachmentTimeline = function (timeline, skeleton, time, blend, attachments) {\r\n var slot = skeleton.slots[timeline.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = timeline.frames;\r\n if (time < frames[0]) {\r\n if (blend == spine.MixBlend.setup || blend == spine.MixBlend.first)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments);\r\n }\r\n else {\r\n var frameIndex;\r\n if (time >= frames[frames.length - 1])\r\n frameIndex = frames.length - 1;\r\n else\r\n frameIndex = spine.Animation.binarySearch(frames, time) - 1;\r\n this.setAttachment(skeleton, slot, timeline.attachmentNames[frameIndex], attachments);\r\n }\r\n if (slot.attachmentState <= this.unkeyedState)\r\n slot.attachmentState = this.unkeyedState + AnimationState.SETUP;\r\n };\r\n AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) {\r\n slot.attachment = attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName);\r\n if (attachments)\r\n slot.attachmentState = this.unkeyedState + AnimationState.CURRENT;\r\n };\r\n AnimationState.prototype.applyRotateTimeline = function (timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) {\r\n if (firstFrame)\r\n timelinesRotation[i] = 0;\r\n if (alpha == 1) {\r\n timeline.apply(skeleton, 0, time, null, 1, blend, spine.MixDirection.mixIn);\r\n return;\r\n }\r\n var rotateTimeline = timeline;\r\n var frames = rotateTimeline.frames;\r\n var bone = skeleton.bones[rotateTimeline.boneIndex];\r\n if (!bone.active)\r\n return;\r\n var r1 = 0, r2 = 0;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case spine.MixBlend.setup:\r\n bone.rotation = bone.data.rotation;\r\n default:\r\n return;\r\n case spine.MixBlend.first:\r\n r1 = bone.rotation;\r\n r2 = bone.data.rotation;\r\n }\r\n }\r\n else {\r\n r1 = blend == spine.MixBlend.setup ? bone.data.rotation : bone.rotation;\r\n if (time >= frames[frames.length - spine.RotateTimeline.ENTRIES])\r\n r2 = bone.data.rotation + frames[frames.length + spine.RotateTimeline.PREV_ROTATION];\r\n else {\r\n var frame = spine.Animation.binarySearch(frames, time, spine.RotateTimeline.ENTRIES);\r\n var prevRotation = frames[frame + spine.RotateTimeline.PREV_ROTATION];\r\n var frameTime = frames[frame];\r\n var percent = rotateTimeline.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + spine.RotateTimeline.PREV_TIME] - frameTime));\r\n r2 = frames[frame + spine.RotateTimeline.ROTATION] - prevRotation;\r\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n r2 = prevRotation + r2 * percent + bone.data.rotation;\r\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n }\r\n }\r\n var total = 0, diff = r2 - r1;\r\n diff -= (16384 - ((16384.499999999996 - diff / 360) | 0)) * 360;\r\n if (diff == 0) {\r\n total = timelinesRotation[i];\r\n }\r\n else {\r\n var lastTotal = 0, lastDiff = 0;\r\n if (firstFrame) {\r\n lastTotal = 0;\r\n lastDiff = diff;\r\n }\r\n else {\r\n lastTotal = timelinesRotation[i];\r\n lastDiff = timelinesRotation[i + 1];\r\n }\r\n var current = diff > 0, dir = lastTotal >= 0;\r\n if (spine.MathUtils.signum(lastDiff) != spine.MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\r\n if (Math.abs(lastTotal) > 180)\r\n lastTotal += 360 * spine.MathUtils.signum(lastTotal);\r\n dir = current;\r\n }\r\n total = diff + lastTotal - lastTotal % 360;\r\n if (dir != current)\r\n total += 360 * spine.MathUtils.signum(lastTotal);\r\n timelinesRotation[i] = total;\r\n }\r\n timelinesRotation[i + 1] = diff;\r\n r1 += total * alpha;\r\n bone.rotation = r1 - (16384 - ((16384.499999999996 - r1 / 360) | 0)) * 360;\r\n };\r\n AnimationState.prototype.queueEvents = function (entry, animationTime) {\r\n var animationStart = entry.animationStart, animationEnd = entry.animationEnd;\r\n var duration = animationEnd - animationStart;\r\n var trackLastWrapped = entry.trackLast % duration;\r\n var events = this.events;\r\n var i = 0, n = events.length;\r\n for (; i < n; i++) {\r\n var event_1 = events[i];\r\n if (event_1.time < trackLastWrapped)\r\n break;\r\n if (event_1.time > animationEnd)\r\n continue;\r\n this.queue.event(entry, event_1);\r\n }\r\n var complete = false;\r\n if (entry.loop)\r\n complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;\r\n else\r\n complete = animationTime >= animationEnd && entry.animationLast < animationEnd;\r\n if (complete)\r\n this.queue.complete(entry);\r\n for (; i < n; i++) {\r\n var event_2 = events[i];\r\n if (event_2.time < animationStart)\r\n continue;\r\n this.queue.event(entry, events[i]);\r\n }\r\n };\r\n AnimationState.prototype.clearTracks = function () {\r\n var oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (var i = 0, n = this.tracks.length; i < n; i++)\r\n this.clearTrack(i);\r\n this.tracks.length = 0;\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.clearTrack = function (trackIndex) {\r\n if (trackIndex >= this.tracks.length)\r\n return;\r\n var current = this.tracks[trackIndex];\r\n if (current == null)\r\n return;\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n var entry = current;\r\n while (true) {\r\n var from = entry.mixingFrom;\r\n if (from == null)\r\n break;\r\n this.queue.end(from);\r\n entry.mixingFrom = null;\r\n entry.mixingTo = null;\r\n entry = from;\r\n }\r\n this.tracks[current.trackIndex] = null;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.setCurrent = function (index, current, interrupt) {\r\n var from = this.expandToIndex(index);\r\n this.tracks[index] = current;\r\n if (from != null) {\r\n if (interrupt)\r\n this.queue.interrupt(from);\r\n current.mixingFrom = from;\r\n from.mixingTo = current;\r\n current.mixTime = 0;\r\n if (from.mixingFrom != null && from.mixDuration > 0)\r\n current.interruptAlpha *= Math.min(1, from.mixTime / from.mixDuration);\r\n from.timelinesRotation.length = 0;\r\n }\r\n this.queue.start(current);\r\n };\r\n AnimationState.prototype.setAnimation = function (trackIndex, animationName, loop) {\r\n var animation = this.data.skeletonData.findAnimation(animationName);\r\n if (animation == null)\r\n throw new Error(\"Animation not found: \" + animationName);\r\n return this.setAnimationWith(trackIndex, animation, loop);\r\n };\r\n AnimationState.prototype.setAnimationWith = function (trackIndex, animation, loop) {\r\n if (animation == null)\r\n throw new Error(\"animation cannot be null.\");\r\n var interrupt = true;\r\n var current = this.expandToIndex(trackIndex);\r\n if (current != null) {\r\n if (current.nextTrackLast == -1) {\r\n this.tracks[trackIndex] = current.mixingFrom;\r\n this.queue.interrupt(current);\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n current = current.mixingFrom;\r\n interrupt = false;\r\n }\r\n else\r\n this.disposeNext(current);\r\n }\r\n var entry = this.trackEntry(trackIndex, animation, loop, current);\r\n this.setCurrent(trackIndex, entry, interrupt);\r\n this.queue.drain();\r\n return entry;\r\n };\r\n AnimationState.prototype.addAnimation = function (trackIndex, animationName, loop, delay) {\r\n var animation = this.data.skeletonData.findAnimation(animationName);\r\n if (animation == null)\r\n throw new Error(\"Animation not found: \" + animationName);\r\n return this.addAnimationWith(trackIndex, animation, loop, delay);\r\n };\r\n AnimationState.prototype.addAnimationWith = function (trackIndex, animation, loop, delay) {\r\n if (animation == null)\r\n throw new Error(\"animation cannot be null.\");\r\n var last = this.expandToIndex(trackIndex);\r\n if (last != null) {\r\n while (last.next != null)\r\n last = last.next;\r\n }\r\n var entry = this.trackEntry(trackIndex, animation, loop, last);\r\n if (last == null) {\r\n this.setCurrent(trackIndex, entry, true);\r\n this.queue.drain();\r\n }\r\n else {\r\n last.next = entry;\r\n if (delay <= 0) {\r\n var duration = last.animationEnd - last.animationStart;\r\n if (duration != 0) {\r\n if (last.loop)\r\n delay += duration * (1 + ((last.trackTime / duration) | 0));\r\n else\r\n delay += Math.max(duration, last.trackTime);\r\n delay -= this.data.getMix(last.animation, animation);\r\n }\r\n else\r\n delay = last.trackTime;\r\n }\r\n }\r\n entry.delay = delay;\r\n return entry;\r\n };\r\n AnimationState.prototype.setEmptyAnimation = function (trackIndex, mixDuration) {\r\n var entry = this.setAnimationWith(trackIndex, AnimationState.emptyAnimation, false);\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n };\r\n AnimationState.prototype.addEmptyAnimation = function (trackIndex, mixDuration, delay) {\r\n if (delay <= 0)\r\n delay -= mixDuration;\r\n var entry = this.addAnimationWith(trackIndex, AnimationState.emptyAnimation, false, delay);\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n };\r\n AnimationState.prototype.setEmptyAnimations = function (mixDuration) {\r\n var oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (var i = 0, n = this.tracks.length; i < n; i++) {\r\n var current = this.tracks[i];\r\n if (current != null)\r\n this.setEmptyAnimation(current.trackIndex, mixDuration);\r\n }\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.expandToIndex = function (index) {\r\n if (index < this.tracks.length)\r\n return this.tracks[index];\r\n spine.Utils.ensureArrayCapacity(this.tracks, index + 1, null);\r\n this.tracks.length = index + 1;\r\n return null;\r\n };\r\n AnimationState.prototype.trackEntry = function (trackIndex, animation, loop, last) {\r\n var entry = this.trackEntryPool.obtain();\r\n entry.trackIndex = trackIndex;\r\n entry.animation = animation;\r\n entry.loop = loop;\r\n entry.holdPrevious = false;\r\n entry.eventThreshold = 0;\r\n entry.attachmentThreshold = 0;\r\n entry.drawOrderThreshold = 0;\r\n entry.animationStart = 0;\r\n entry.animationEnd = animation.duration;\r\n entry.animationLast = -1;\r\n entry.nextAnimationLast = -1;\r\n entry.delay = 0;\r\n entry.trackTime = 0;\r\n entry.trackLast = -1;\r\n entry.nextTrackLast = -1;\r\n entry.trackEnd = Number.MAX_VALUE;\r\n entry.timeScale = 1;\r\n entry.alpha = 1;\r\n entry.interruptAlpha = 1;\r\n entry.mixTime = 0;\r\n entry.mixDuration = last == null ? 0 : this.data.getMix(last.animation, animation);\r\n entry.mixBlend = spine.MixBlend.replace;\r\n return entry;\r\n };\r\n AnimationState.prototype.disposeNext = function (entry) {\r\n var next = entry.next;\r\n while (next != null) {\r\n this.queue.dispose(next);\r\n next = next.next;\r\n }\r\n entry.next = null;\r\n };\r\n AnimationState.prototype._animationsChanged = function () {\r\n this.animationsChanged = false;\r\n this.propertyIDs.clear();\r\n for (var i = 0, n = this.tracks.length; i < n; i++) {\r\n var entry = this.tracks[i];\r\n if (entry == null)\r\n continue;\r\n while (entry.mixingFrom != null)\r\n entry = entry.mixingFrom;\r\n do {\r\n if (entry.mixingFrom == null || entry.mixBlend != spine.MixBlend.add)\r\n this.computeHold(entry);\r\n entry = entry.mixingTo;\r\n } while (entry != null);\r\n }\r\n };\r\n AnimationState.prototype.computeHold = function (entry) {\r\n var to = entry.mixingTo;\r\n var timelines = entry.animation.timelines;\r\n var timelinesCount = entry.animation.timelines.length;\r\n var timelineMode = spine.Utils.setArraySize(entry.timelineMode, timelinesCount);\r\n entry.timelineHoldMix.length = 0;\r\n var timelineDipMix = spine.Utils.setArraySize(entry.timelineHoldMix, timelinesCount);\r\n var propertyIDs = this.propertyIDs;\r\n if (to != null && to.holdPrevious) {\r\n for (var i = 0; i < timelinesCount; i++) {\r\n timelineMode[i] = propertyIDs.add(timelines[i].getPropertyId()) ? AnimationState.HOLD_FIRST : AnimationState.HOLD_SUBSEQUENT;\r\n }\r\n return;\r\n }\r\n outer: for (var i = 0; i < timelinesCount; i++) {\r\n var timeline = timelines[i];\r\n var id = timeline.getPropertyId();\r\n if (!propertyIDs.add(id))\r\n timelineMode[i] = AnimationState.SUBSEQUENT;\r\n else if (to == null || timeline instanceof spine.AttachmentTimeline || timeline instanceof spine.DrawOrderTimeline\r\n || timeline instanceof spine.EventTimeline || !to.animation.hasTimeline(id)) {\r\n timelineMode[i] = AnimationState.FIRST;\r\n }\r\n else {\r\n for (var next = to.mixingTo; next != null; next = next.mixingTo) {\r\n if (next.animation.hasTimeline(id))\r\n continue;\r\n if (entry.mixDuration > 0) {\r\n timelineMode[i] = AnimationState.HOLD_MIX;\r\n timelineDipMix[i] = next;\r\n continue outer;\r\n }\r\n break;\r\n }\r\n timelineMode[i] = AnimationState.HOLD_FIRST;\r\n }\r\n }\r\n };\r\n AnimationState.prototype.getCurrent = function (trackIndex) {\r\n if (trackIndex >= this.tracks.length)\r\n return null;\r\n return this.tracks[trackIndex];\r\n };\r\n AnimationState.prototype.addListener = function (listener) {\r\n if (listener == null)\r\n throw new Error(\"listener cannot be null.\");\r\n this.listeners.push(listener);\r\n };\r\n AnimationState.prototype.removeListener = function (listener) {\r\n var index = this.listeners.indexOf(listener);\r\n if (index >= 0)\r\n this.listeners.splice(index, 1);\r\n };\r\n AnimationState.prototype.clearListeners = function () {\r\n this.listeners.length = 0;\r\n };\r\n AnimationState.prototype.clearListenerNotifications = function () {\r\n this.queue.clear();\r\n };\r\n AnimationState.emptyAnimation = new spine.Animation(\"\", [], 0);\r\n AnimationState.SUBSEQUENT = 0;\r\n AnimationState.FIRST = 1;\r\n AnimationState.HOLD_SUBSEQUENT = 2;\r\n AnimationState.HOLD_FIRST = 3;\r\n AnimationState.HOLD_MIX = 4;\r\n AnimationState.SETUP = 1;\r\n AnimationState.CURRENT = 2;\r\n return AnimationState;\r\n }());\r\n spine.AnimationState = AnimationState;\r\n var TrackEntry = (function () {\r\n function TrackEntry() {\r\n this.mixBlend = spine.MixBlend.replace;\r\n this.timelineMode = new Array();\r\n this.timelineHoldMix = new Array();\r\n this.timelinesRotation = new Array();\r\n }\r\n TrackEntry.prototype.reset = function () {\r\n this.next = null;\r\n this.mixingFrom = null;\r\n this.mixingTo = null;\r\n this.animation = null;\r\n this.listener = null;\r\n this.timelineMode.length = 0;\r\n this.timelineHoldMix.length = 0;\r\n this.timelinesRotation.length = 0;\r\n };\r\n TrackEntry.prototype.getAnimationTime = function () {\r\n if (this.loop) {\r\n var duration = this.animationEnd - this.animationStart;\r\n if (duration == 0)\r\n return this.animationStart;\r\n return (this.trackTime % duration) + this.animationStart;\r\n }\r\n return Math.min(this.trackTime + this.animationStart, this.animationEnd);\r\n };\r\n TrackEntry.prototype.setAnimationLast = function (animationLast) {\r\n this.animationLast = animationLast;\r\n this.nextAnimationLast = animationLast;\r\n };\r\n TrackEntry.prototype.isComplete = function () {\r\n return this.trackTime >= this.animationEnd - this.animationStart;\r\n };\r\n TrackEntry.prototype.resetRotationDirections = function () {\r\n this.timelinesRotation.length = 0;\r\n };\r\n return TrackEntry;\r\n }());\r\n spine.TrackEntry = TrackEntry;\r\n var EventQueue = (function () {\r\n function EventQueue(animState) {\r\n this.objects = [];\r\n this.drainDisabled = false;\r\n this.animState = animState;\r\n }\r\n EventQueue.prototype.start = function (entry) {\r\n this.objects.push(EventType.start);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n };\r\n EventQueue.prototype.interrupt = function (entry) {\r\n this.objects.push(EventType.interrupt);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.end = function (entry) {\r\n this.objects.push(EventType.end);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n };\r\n EventQueue.prototype.dispose = function (entry) {\r\n this.objects.push(EventType.dispose);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.complete = function (entry) {\r\n this.objects.push(EventType.complete);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.event = function (entry, event) {\r\n this.objects.push(EventType.event);\r\n this.objects.push(entry);\r\n this.objects.push(event);\r\n };\r\n EventQueue.prototype.drain = function () {\r\n if (this.drainDisabled)\r\n return;\r\n this.drainDisabled = true;\r\n var objects = this.objects;\r\n var listeners = this.animState.listeners;\r\n for (var i = 0; i < objects.length; i += 2) {\r\n var type = objects[i];\r\n var entry = objects[i + 1];\r\n switch (type) {\r\n case EventType.start:\r\n if (entry.listener != null && entry.listener.start)\r\n entry.listener.start(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].start)\r\n listeners[ii].start(entry);\r\n break;\r\n case EventType.interrupt:\r\n if (entry.listener != null && entry.listener.interrupt)\r\n entry.listener.interrupt(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].interrupt)\r\n listeners[ii].interrupt(entry);\r\n break;\r\n case EventType.end:\r\n if (entry.listener != null && entry.listener.end)\r\n entry.listener.end(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].end)\r\n listeners[ii].end(entry);\r\n case EventType.dispose:\r\n if (entry.listener != null && entry.listener.dispose)\r\n entry.listener.dispose(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].dispose)\r\n listeners[ii].dispose(entry);\r\n this.animState.trackEntryPool.free(entry);\r\n break;\r\n case EventType.complete:\r\n if (entry.listener != null && entry.listener.complete)\r\n entry.listener.complete(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].complete)\r\n listeners[ii].complete(entry);\r\n break;\r\n case EventType.event:\r\n var event_3 = objects[i++ + 2];\r\n if (entry.listener != null && entry.listener.event)\r\n entry.listener.event(entry, event_3);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].event)\r\n listeners[ii].event(entry, event_3);\r\n break;\r\n }\r\n }\r\n this.clear();\r\n this.drainDisabled = false;\r\n };\r\n EventQueue.prototype.clear = function () {\r\n this.objects.length = 0;\r\n };\r\n return EventQueue;\r\n }());\r\n spine.EventQueue = EventQueue;\r\n var EventType;\r\n (function (EventType) {\r\n EventType[EventType[\"start\"] = 0] = \"start\";\r\n EventType[EventType[\"interrupt\"] = 1] = \"interrupt\";\r\n EventType[EventType[\"end\"] = 2] = \"end\";\r\n EventType[EventType[\"dispose\"] = 3] = \"dispose\";\r\n EventType[EventType[\"complete\"] = 4] = \"complete\";\r\n EventType[EventType[\"event\"] = 5] = \"event\";\r\n })(EventType = spine.EventType || (spine.EventType = {}));\r\n var AnimationStateAdapter = (function () {\r\n function AnimationStateAdapter() {\r\n }\r\n AnimationStateAdapter.prototype.start = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.interrupt = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.end = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.dispose = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.complete = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.event = function (entry, event) {\r\n };\r\n return AnimationStateAdapter;\r\n }());\r\n spine.AnimationStateAdapter = AnimationStateAdapter;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AnimationStateData = (function () {\r\n function AnimationStateData(skeletonData) {\r\n this.animationToMixTime = {};\r\n this.defaultMix = 0;\r\n if (skeletonData == null)\r\n throw new Error(\"skeletonData cannot be null.\");\r\n this.skeletonData = skeletonData;\r\n }\r\n AnimationStateData.prototype.setMix = function (fromName, toName, duration) {\r\n var from = this.skeletonData.findAnimation(fromName);\r\n if (from == null)\r\n throw new Error(\"Animation not found: \" + fromName);\r\n var to = this.skeletonData.findAnimation(toName);\r\n if (to == null)\r\n throw new Error(\"Animation not found: \" + toName);\r\n this.setMixWith(from, to, duration);\r\n };\r\n AnimationStateData.prototype.setMixWith = function (from, to, duration) {\r\n if (from == null)\r\n throw new Error(\"from cannot be null.\");\r\n if (to == null)\r\n throw new Error(\"to cannot be null.\");\r\n var key = from.name + \".\" + to.name;\r\n this.animationToMixTime[key] = duration;\r\n };\r\n AnimationStateData.prototype.getMix = function (from, to) {\r\n var key = from.name + \".\" + to.name;\r\n var value = this.animationToMixTime[key];\r\n return value === undefined ? this.defaultMix : value;\r\n };\r\n return AnimationStateData;\r\n }());\r\n spine.AnimationStateData = AnimationStateData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AssetManager = (function () {\r\n function AssetManager(textureLoader, pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n this.assets = {};\r\n this.errors = {};\r\n this.toLoad = 0;\r\n this.loaded = 0;\r\n this.rawDataUris = {};\r\n this.textureLoader = textureLoader;\r\n this.pathPrefix = pathPrefix;\r\n }\r\n AssetManager.prototype.downloadText = function (url, success, error) {\r\n var request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n if (this.rawDataUris[url])\r\n url = this.rawDataUris[url];\r\n request.open(\"GET\", url, true);\r\n request.onload = function () {\r\n if (request.status == 200) {\r\n success(request.responseText);\r\n }\r\n else {\r\n error(request.status, request.responseText);\r\n }\r\n };\r\n request.onerror = function () {\r\n error(request.status, request.responseText);\r\n };\r\n request.send();\r\n };\r\n AssetManager.prototype.downloadBinary = function (url, success, error) {\r\n var request = new XMLHttpRequest();\r\n if (this.rawDataUris[url])\r\n url = this.rawDataUris[url];\r\n request.open(\"GET\", url, true);\r\n request.responseType = \"arraybuffer\";\r\n request.onload = function () {\r\n if (request.status == 200) {\r\n success(new Uint8Array(request.response));\r\n }\r\n else {\r\n error(request.status, request.responseText);\r\n }\r\n };\r\n request.onerror = function () {\r\n error(request.status, request.responseText);\r\n };\r\n request.send();\r\n };\r\n AssetManager.prototype.setRawDataURI = function (path, data) {\r\n this.rawDataUris[this.pathPrefix + path] = data;\r\n };\r\n AssetManager.prototype.loadBinary = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n this.downloadBinary(path, function (data) {\r\n _this.assets[path] = data;\r\n if (success)\r\n success(path, data);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load binary \" + path + \": status \" + status + \", \" + responseText;\r\n if (error)\r\n error(path, \"Couldn't load binary \" + path + \": status \" + status + \", \" + responseText);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.loadText = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n this.downloadText(path, function (data) {\r\n _this.assets[path] = data;\r\n if (success)\r\n success(path, data);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load text \" + path + \": status \" + status + \", \" + responseText;\r\n if (error)\r\n error(path, \"Couldn't load text \" + path + \": status \" + status + \", \" + responseText);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.loadTexture = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n var storagePath = path;\r\n this.toLoad++;\r\n var img = new Image();\r\n img.crossOrigin = \"anonymous\";\r\n img.onload = function (ev) {\r\n var texture = _this.textureLoader(img);\r\n _this.assets[storagePath] = texture;\r\n _this.toLoad--;\r\n _this.loaded++;\r\n if (success)\r\n success(path, img);\r\n };\r\n img.onerror = function (ev) {\r\n _this.errors[path] = \"Couldn't load image \" + path;\r\n _this.toLoad--;\r\n _this.loaded++;\r\n if (error)\r\n error(path, \"Couldn't load image \" + path);\r\n };\r\n if (this.rawDataUris[path])\r\n path = this.rawDataUris[path];\r\n img.src = path;\r\n };\r\n AssetManager.prototype.loadTextureAtlas = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n var parent = path.lastIndexOf(\"/\") >= 0 ? path.substring(0, path.lastIndexOf(\"/\")) : \"\";\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n this.downloadText(path, function (atlasData) {\r\n var pagesLoaded = { count: 0 };\r\n var atlasPages = new Array();\r\n try {\r\n var atlas = new spine.TextureAtlas(atlasData, function (path) {\r\n atlasPages.push(parent == \"\" ? path : parent + \"/\" + path);\r\n var image = document.createElement(\"img\");\r\n image.width = 16;\r\n image.height = 16;\r\n return new spine.FakeTexture(image);\r\n });\r\n }\r\n catch (e) {\r\n var ex = e;\r\n _this.errors[path] = \"Couldn't load texture atlas \" + path + \": \" + ex.message;\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \" + path + \": \" + ex.message);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n return;\r\n }\r\n var _loop_1 = function (atlasPage) {\r\n var pageLoadError = false;\r\n _this.loadTexture(atlasPage, function (imagePath, image) {\r\n pagesLoaded.count++;\r\n if (pagesLoaded.count == atlasPages.length) {\r\n if (!pageLoadError) {\r\n try {\r\n var atlas = new spine.TextureAtlas(atlasData, function (path) {\r\n return _this.get(parent == \"\" ? path : parent + \"/\" + path);\r\n });\r\n _this.assets[path] = atlas;\r\n if (success)\r\n success(path, atlas);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n catch (e) {\r\n var ex = e;\r\n _this.errors[path] = \"Couldn't load texture atlas \" + path + \": \" + ex.message;\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \" + path + \": \" + ex.message);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load texture atlas page \" + imagePath + \"} of atlas \" + path;\r\n if (error)\r\n error(path, \"Couldn't load texture atlas page \" + imagePath + \" of atlas \" + path);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n }\r\n }, function (imagePath, errorMessage) {\r\n pageLoadError = true;\r\n pagesLoaded.count++;\r\n if (pagesLoaded.count == atlasPages.length) {\r\n _this.errors[path] = \"Couldn't load texture atlas page \" + imagePath + \"} of atlas \" + path;\r\n if (error)\r\n error(path, \"Couldn't load texture atlas page \" + imagePath + \" of atlas \" + path);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n });\r\n };\r\n for (var _i = 0, atlasPages_1 = atlasPages; _i < atlasPages_1.length; _i++) {\r\n var atlasPage = atlasPages_1[_i];\r\n _loop_1(atlasPage);\r\n }\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load texture atlas \" + path + \": status \" + status + \", \" + responseText;\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \" + path + \": status \" + status + \", \" + responseText);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.get = function (path) {\r\n path = this.pathPrefix + path;\r\n return this.assets[path];\r\n };\r\n AssetManager.prototype.remove = function (path) {\r\n path = this.pathPrefix + path;\r\n var asset = this.assets[path];\r\n if (asset.dispose)\r\n asset.dispose();\r\n this.assets[path] = null;\r\n };\r\n AssetManager.prototype.removeAll = function () {\r\n for (var key in this.assets) {\r\n var asset = this.assets[key];\r\n if (asset.dispose)\r\n asset.dispose();\r\n }\r\n this.assets = {};\r\n };\r\n AssetManager.prototype.isLoadingComplete = function () {\r\n return this.toLoad == 0;\r\n };\r\n AssetManager.prototype.getToLoad = function () {\r\n return this.toLoad;\r\n };\r\n AssetManager.prototype.getLoaded = function () {\r\n return this.loaded;\r\n };\r\n AssetManager.prototype.dispose = function () {\r\n this.removeAll();\r\n };\r\n AssetManager.prototype.hasErrors = function () {\r\n return Object.keys(this.errors).length > 0;\r\n };\r\n AssetManager.prototype.getErrors = function () {\r\n return this.errors;\r\n };\r\n return AssetManager;\r\n }());\r\n spine.AssetManager = AssetManager;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AtlasAttachmentLoader = (function () {\r\n function AtlasAttachmentLoader(atlas) {\r\n this.atlas = atlas;\r\n }\r\n AtlasAttachmentLoader.prototype.newRegionAttachment = function (skin, name, path) {\r\n var region = this.atlas.findRegion(path);\r\n if (region == null)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\r\n region.renderObject = region;\r\n var attachment = new spine.RegionAttachment(name);\r\n attachment.setRegion(region);\r\n return attachment;\r\n };\r\n AtlasAttachmentLoader.prototype.newMeshAttachment = function (skin, name, path) {\r\n var region = this.atlas.findRegion(path);\r\n if (region == null)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\r\n region.renderObject = region;\r\n var attachment = new spine.MeshAttachment(name);\r\n attachment.region = region;\r\n return attachment;\r\n };\r\n AtlasAttachmentLoader.prototype.newBoundingBoxAttachment = function (skin, name) {\r\n return new spine.BoundingBoxAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newPathAttachment = function (skin, name) {\r\n return new spine.PathAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newPointAttachment = function (skin, name) {\r\n return new spine.PointAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newClippingAttachment = function (skin, name) {\r\n return new spine.ClippingAttachment(name);\r\n };\r\n return AtlasAttachmentLoader;\r\n }());\r\n spine.AtlasAttachmentLoader = AtlasAttachmentLoader;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BlendMode;\r\n (function (BlendMode) {\r\n BlendMode[BlendMode[\"Normal\"] = 0] = \"Normal\";\r\n BlendMode[BlendMode[\"Additive\"] = 1] = \"Additive\";\r\n BlendMode[BlendMode[\"Multiply\"] = 2] = \"Multiply\";\r\n BlendMode[BlendMode[\"Screen\"] = 3] = \"Screen\";\r\n })(BlendMode = spine.BlendMode || (spine.BlendMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Bone = (function () {\r\n function Bone(data, skeleton, parent) {\r\n this.children = new Array();\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.scaleX = 0;\r\n this.scaleY = 0;\r\n this.shearX = 0;\r\n this.shearY = 0;\r\n this.ax = 0;\r\n this.ay = 0;\r\n this.arotation = 0;\r\n this.ascaleX = 0;\r\n this.ascaleY = 0;\r\n this.ashearX = 0;\r\n this.ashearY = 0;\r\n this.appliedValid = false;\r\n this.a = 0;\r\n this.b = 0;\r\n this.c = 0;\r\n this.d = 0;\r\n this.worldY = 0;\r\n this.worldX = 0;\r\n this.sorted = false;\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.skeleton = skeleton;\r\n this.parent = parent;\r\n this.setToSetupPose();\r\n }\r\n Bone.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n Bone.prototype.update = function () {\r\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n };\r\n Bone.prototype.updateWorldTransform = function () {\r\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n };\r\n Bone.prototype.updateWorldTransformWith = function (x, y, rotation, scaleX, scaleY, shearX, shearY) {\r\n this.ax = x;\r\n this.ay = y;\r\n this.arotation = rotation;\r\n this.ascaleX = scaleX;\r\n this.ascaleY = scaleY;\r\n this.ashearX = shearX;\r\n this.ashearY = shearY;\r\n this.appliedValid = true;\r\n var parent = this.parent;\r\n if (parent == null) {\r\n var skeleton = this.skeleton;\r\n var rotationY = rotation + 90 + shearY;\r\n var sx = skeleton.scaleX;\r\n var sy = skeleton.scaleY;\r\n this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\r\n this.b = spine.MathUtils.cosDeg(rotationY) * scaleY * sx;\r\n this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\r\n this.d = spine.MathUtils.sinDeg(rotationY) * scaleY * sy;\r\n this.worldX = x * sx + skeleton.x;\r\n this.worldY = y * sy + skeleton.y;\r\n return;\r\n }\r\n var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n this.worldX = pa * x + pb * y + parent.worldX;\r\n this.worldY = pc * x + pd * y + parent.worldY;\r\n switch (this.data.transformMode) {\r\n case spine.TransformMode.Normal: {\r\n var rotationY = rotation + 90 + shearY;\r\n var la = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(rotationY) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(rotationY) * scaleY;\r\n this.a = pa * la + pb * lc;\r\n this.b = pa * lb + pb * ld;\r\n this.c = pc * la + pd * lc;\r\n this.d = pc * lb + pd * ld;\r\n return;\r\n }\r\n case spine.TransformMode.OnlyTranslation: {\r\n var rotationY = rotation + 90 + shearY;\r\n this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n this.b = spine.MathUtils.cosDeg(rotationY) * scaleY;\r\n this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n this.d = spine.MathUtils.sinDeg(rotationY) * scaleY;\r\n break;\r\n }\r\n case spine.TransformMode.NoRotationOrReflection: {\r\n var s = pa * pa + pc * pc;\r\n var prx = 0;\r\n if (s > 0.0001) {\r\n s = Math.abs(pa * pd - pb * pc) / s;\r\n pa /= this.skeleton.scaleX;\r\n pc /= this.skeleton.scaleY;\r\n pb = pc * s;\r\n pd = pa * s;\r\n prx = Math.atan2(pc, pa) * spine.MathUtils.radDeg;\r\n }\r\n else {\r\n pa = 0;\r\n pc = 0;\r\n prx = 90 - Math.atan2(pd, pb) * spine.MathUtils.radDeg;\r\n }\r\n var rx = rotation + shearX - prx;\r\n var ry = rotation + shearY - prx + 90;\r\n var la = spine.MathUtils.cosDeg(rx) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(ry) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(rx) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(ry) * scaleY;\r\n this.a = pa * la - pb * lc;\r\n this.b = pa * lb - pb * ld;\r\n this.c = pc * la + pd * lc;\r\n this.d = pc * lb + pd * ld;\r\n break;\r\n }\r\n case spine.TransformMode.NoScale:\r\n case spine.TransformMode.NoScaleOrReflection: {\r\n var cos = spine.MathUtils.cosDeg(rotation);\r\n var sin = spine.MathUtils.sinDeg(rotation);\r\n var za = (pa * cos + pb * sin) / this.skeleton.scaleX;\r\n var zc = (pc * cos + pd * sin) / this.skeleton.scaleY;\r\n var s = Math.sqrt(za * za + zc * zc);\r\n if (s > 0.00001)\r\n s = 1 / s;\r\n za *= s;\r\n zc *= s;\r\n s = Math.sqrt(za * za + zc * zc);\r\n if (this.data.transformMode == spine.TransformMode.NoScale\r\n && (pa * pd - pb * pc < 0) != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))\r\n s = -s;\r\n var r = Math.PI / 2 + Math.atan2(zc, za);\r\n var zb = Math.cos(r) * s;\r\n var zd = Math.sin(r) * s;\r\n var la = spine.MathUtils.cosDeg(shearX) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(shearX) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;\r\n this.a = za * la + zb * lc;\r\n this.b = za * lb + zb * ld;\r\n this.c = zc * la + zd * lc;\r\n this.d = zc * lb + zd * ld;\r\n break;\r\n }\r\n }\r\n this.a *= this.skeleton.scaleX;\r\n this.b *= this.skeleton.scaleX;\r\n this.c *= this.skeleton.scaleY;\r\n this.d *= this.skeleton.scaleY;\r\n };\r\n Bone.prototype.setToSetupPose = function () {\r\n var data = this.data;\r\n this.x = data.x;\r\n this.y = data.y;\r\n this.rotation = data.rotation;\r\n this.scaleX = data.scaleX;\r\n this.scaleY = data.scaleY;\r\n this.shearX = data.shearX;\r\n this.shearY = data.shearY;\r\n };\r\n Bone.prototype.getWorldRotationX = function () {\r\n return Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.getWorldRotationY = function () {\r\n return Math.atan2(this.d, this.b) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.getWorldScaleX = function () {\r\n return Math.sqrt(this.a * this.a + this.c * this.c);\r\n };\r\n Bone.prototype.getWorldScaleY = function () {\r\n return Math.sqrt(this.b * this.b + this.d * this.d);\r\n };\r\n Bone.prototype.updateAppliedTransform = function () {\r\n this.appliedValid = true;\r\n var parent = this.parent;\r\n if (parent == null) {\r\n this.ax = this.worldX;\r\n this.ay = this.worldY;\r\n this.arotation = Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\r\n this.ascaleX = Math.sqrt(this.a * this.a + this.c * this.c);\r\n this.ascaleY = Math.sqrt(this.b * this.b + this.d * this.d);\r\n this.ashearX = 0;\r\n this.ashearY = Math.atan2(this.a * this.b + this.c * this.d, this.a * this.d - this.b * this.c) * spine.MathUtils.radDeg;\r\n return;\r\n }\r\n var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n var pid = 1 / (pa * pd - pb * pc);\r\n var dx = this.worldX - parent.worldX, dy = this.worldY - parent.worldY;\r\n this.ax = (dx * pd * pid - dy * pb * pid);\r\n this.ay = (dy * pa * pid - dx * pc * pid);\r\n var ia = pid * pd;\r\n var id = pid * pa;\r\n var ib = pid * pb;\r\n var ic = pid * pc;\r\n var ra = ia * this.a - ib * this.c;\r\n var rb = ia * this.b - ib * this.d;\r\n var rc = id * this.c - ic * this.a;\r\n var rd = id * this.d - ic * this.b;\r\n this.ashearX = 0;\r\n this.ascaleX = Math.sqrt(ra * ra + rc * rc);\r\n if (this.ascaleX > 0.0001) {\r\n var det = ra * rd - rb * rc;\r\n this.ascaleY = det / this.ascaleX;\r\n this.ashearY = Math.atan2(ra * rb + rc * rd, det) * spine.MathUtils.radDeg;\r\n this.arotation = Math.atan2(rc, ra) * spine.MathUtils.radDeg;\r\n }\r\n else {\r\n this.ascaleX = 0;\r\n this.ascaleY = Math.sqrt(rb * rb + rd * rd);\r\n this.ashearY = 0;\r\n this.arotation = 90 - Math.atan2(rd, rb) * spine.MathUtils.radDeg;\r\n }\r\n };\r\n Bone.prototype.worldToLocal = function (world) {\r\n var a = this.a, b = this.b, c = this.c, d = this.d;\r\n var invDet = 1 / (a * d - b * c);\r\n var x = world.x - this.worldX, y = world.y - this.worldY;\r\n world.x = (x * d * invDet - y * b * invDet);\r\n world.y = (y * a * invDet - x * c * invDet);\r\n return world;\r\n };\r\n Bone.prototype.localToWorld = function (local) {\r\n var x = local.x, y = local.y;\r\n local.x = x * this.a + y * this.b + this.worldX;\r\n local.y = x * this.c + y * this.d + this.worldY;\r\n return local;\r\n };\r\n Bone.prototype.worldToLocalRotation = function (worldRotation) {\r\n var sin = spine.MathUtils.sinDeg(worldRotation), cos = spine.MathUtils.cosDeg(worldRotation);\r\n return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * spine.MathUtils.radDeg + this.rotation - this.shearX;\r\n };\r\n Bone.prototype.localToWorldRotation = function (localRotation) {\r\n localRotation -= this.rotation - this.shearX;\r\n var sin = spine.MathUtils.sinDeg(localRotation), cos = spine.MathUtils.cosDeg(localRotation);\r\n return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.rotateWorld = function (degrees) {\r\n var a = this.a, b = this.b, c = this.c, d = this.d;\r\n var cos = spine.MathUtils.cosDeg(degrees), sin = spine.MathUtils.sinDeg(degrees);\r\n this.a = cos * a - sin * c;\r\n this.b = cos * b - sin * d;\r\n this.c = sin * a + cos * c;\r\n this.d = sin * b + cos * d;\r\n this.appliedValid = false;\r\n };\r\n return Bone;\r\n }());\r\n spine.Bone = Bone;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BoneData = (function () {\r\n function BoneData(index, name, parent) {\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.scaleX = 1;\r\n this.scaleY = 1;\r\n this.shearX = 0;\r\n this.shearY = 0;\r\n this.transformMode = TransformMode.Normal;\r\n this.skinRequired = false;\r\n this.color = new spine.Color();\r\n if (index < 0)\r\n throw new Error(\"index must be >= 0.\");\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.parent = parent;\r\n }\r\n return BoneData;\r\n }());\r\n spine.BoneData = BoneData;\r\n var TransformMode;\r\n (function (TransformMode) {\r\n TransformMode[TransformMode[\"Normal\"] = 0] = \"Normal\";\r\n TransformMode[TransformMode[\"OnlyTranslation\"] = 1] = \"OnlyTranslation\";\r\n TransformMode[TransformMode[\"NoRotationOrReflection\"] = 2] = \"NoRotationOrReflection\";\r\n TransformMode[TransformMode[\"NoScale\"] = 3] = \"NoScale\";\r\n TransformMode[TransformMode[\"NoScaleOrReflection\"] = 4] = \"NoScaleOrReflection\";\r\n })(TransformMode = spine.TransformMode || (spine.TransformMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var ConstraintData = (function () {\r\n function ConstraintData(name, order, skinRequired) {\r\n this.name = name;\r\n this.order = order;\r\n this.skinRequired = skinRequired;\r\n }\r\n return ConstraintData;\r\n }());\r\n spine.ConstraintData = ConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Event = (function () {\r\n function Event(time, data) {\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n this.time = time;\r\n this.data = data;\r\n }\r\n return Event;\r\n }());\r\n spine.Event = Event;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var EventData = (function () {\r\n function EventData(name) {\r\n this.name = name;\r\n }\r\n return EventData;\r\n }());\r\n spine.EventData = EventData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IkConstraint = (function () {\r\n function IkConstraint(data, skeleton) {\r\n this.bendDirection = 0;\r\n this.compress = false;\r\n this.stretch = false;\r\n this.mix = 1;\r\n this.softness = 0;\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.mix = data.mix;\r\n this.softness = data.softness;\r\n this.bendDirection = data.bendDirection;\r\n this.compress = data.compress;\r\n this.stretch = data.stretch;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findBone(data.target.name);\r\n }\r\n IkConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n IkConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n IkConstraint.prototype.update = function () {\r\n var target = this.target;\r\n var bones = this.bones;\r\n switch (bones.length) {\r\n case 1:\r\n this.apply1(bones[0], target.worldX, target.worldY, this.compress, this.stretch, this.data.uniform, this.mix);\r\n break;\r\n case 2:\r\n this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.stretch, this.softness, this.mix);\r\n break;\r\n }\r\n };\r\n IkConstraint.prototype.apply1 = function (bone, targetX, targetY, compress, stretch, uniform, alpha) {\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var p = bone.parent;\r\n var pa = p.a, pb = p.b, pc = p.c, pd = p.d;\r\n var rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;\r\n switch (bone.data.transformMode) {\r\n case spine.TransformMode.OnlyTranslation:\r\n tx = targetX - bone.worldX;\r\n ty = targetY - bone.worldY;\r\n break;\r\n case spine.TransformMode.NoRotationOrReflection:\r\n var s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);\r\n var sa = pa / bone.skeleton.scaleX;\r\n var sc = pc / bone.skeleton.scaleY;\r\n pb = -sc * s * bone.skeleton.scaleX;\r\n pd = sa * s * bone.skeleton.scaleY;\r\n rotationIK += Math.atan2(sc, sa) * spine.MathUtils.radDeg;\r\n default:\r\n var x = targetX - p.worldX, y = targetY - p.worldY;\r\n var d = pa * pd - pb * pc;\r\n tx = (x * pd - y * pb) / d - bone.ax;\r\n ty = (y * pa - x * pc) / d - bone.ay;\r\n }\r\n rotationIK += Math.atan2(ty, tx) * spine.MathUtils.radDeg;\r\n if (bone.ascaleX < 0)\r\n rotationIK += 180;\r\n if (rotationIK > 180)\r\n rotationIK -= 360;\r\n else if (rotationIK < -180)\r\n rotationIK += 360;\r\n var sx = bone.ascaleX, sy = bone.ascaleY;\r\n if (compress || stretch) {\r\n switch (bone.data.transformMode) {\r\n case spine.TransformMode.NoScale:\r\n case spine.TransformMode.NoScaleOrReflection:\r\n tx = targetX - bone.worldX;\r\n ty = targetY - bone.worldY;\r\n }\r\n var b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\r\n if ((compress && dd < b) || (stretch && dd > b) && b > 0.0001) {\r\n var s = (dd / b - 1) * alpha + 1;\r\n sx *= s;\r\n if (uniform)\r\n sy *= s;\r\n }\r\n }\r\n bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, sx, sy, bone.ashearX, bone.ashearY);\r\n };\r\n IkConstraint.prototype.apply2 = function (parent, child, targetX, targetY, bendDir, stretch, softness, alpha) {\r\n if (alpha == 0) {\r\n child.updateWorldTransform();\r\n return;\r\n }\r\n if (!parent.appliedValid)\r\n parent.updateAppliedTransform();\r\n if (!child.appliedValid)\r\n child.updateAppliedTransform();\r\n var px = parent.ax, py = parent.ay, psx = parent.ascaleX, sx = psx, psy = parent.ascaleY, csx = child.ascaleX;\r\n var os1 = 0, os2 = 0, s2 = 0;\r\n if (psx < 0) {\r\n psx = -psx;\r\n os1 = 180;\r\n s2 = -1;\r\n }\r\n else {\r\n os1 = 0;\r\n s2 = 1;\r\n }\r\n if (psy < 0) {\r\n psy = -psy;\r\n s2 = -s2;\r\n }\r\n if (csx < 0) {\r\n csx = -csx;\r\n os2 = 180;\r\n }\r\n else\r\n os2 = 0;\r\n var cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d;\r\n var u = Math.abs(psx - psy) <= 0.0001;\r\n if (!u) {\r\n cy = 0;\r\n cwx = a * cx + parent.worldX;\r\n cwy = c * cx + parent.worldY;\r\n }\r\n else {\r\n cy = child.ay;\r\n cwx = a * cx + b * cy + parent.worldX;\r\n cwy = c * cx + d * cy + parent.worldY;\r\n }\r\n var pp = parent.parent;\r\n a = pp.a;\r\n b = pp.b;\r\n c = pp.c;\r\n d = pp.d;\r\n var id = 1 / (a * d - b * c), x = cwx - pp.worldX, y = cwy - pp.worldY;\r\n var dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\r\n var l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\r\n if (l1 < 0.0001) {\r\n this.apply1(parent, targetX, targetY, false, stretch, false, alpha);\r\n child.updateWorldTransformWith(cx, cy, 0, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n return;\r\n }\r\n x = targetX - pp.worldX;\r\n y = targetY - pp.worldY;\r\n var tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\r\n var dd = tx * tx + ty * ty;\r\n if (softness != 0) {\r\n softness *= psx * (csx + 1) / 2;\r\n var td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\r\n if (sd > 0) {\r\n var p = Math.min(1, sd / (softness * 2)) - 1;\r\n p = (sd - softness * (1 - p * p)) / td;\r\n tx -= p * tx;\r\n ty -= p * ty;\r\n dd = tx * tx + ty * ty;\r\n }\r\n }\r\n outer: if (u) {\r\n l2 *= psx;\r\n var cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\r\n if (cos < -1)\r\n cos = -1;\r\n else if (cos > 1) {\r\n cos = 1;\r\n if (stretch)\r\n sx *= (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\r\n }\r\n a2 = Math.acos(cos) * bendDir;\r\n a = l1 + l2 * cos;\r\n b = l2 * Math.sin(a2);\r\n a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b);\r\n }\r\n else {\r\n a = psx * l2;\r\n b = psy * l2;\r\n var aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\r\n c = bb * l1 * l1 + aa * dd - aa * bb;\r\n var c1 = -2 * bb * l1, c2 = bb - aa;\r\n d = c1 * c1 - 4 * c2 * c;\r\n if (d >= 0) {\r\n var q = Math.sqrt(d);\r\n if (c1 < 0)\r\n q = -q;\r\n q = -(c1 + q) / 2;\r\n var r0 = q / c2, r1 = c / q;\r\n var r = Math.abs(r0) < Math.abs(r1) ? r0 : r1;\r\n if (r * r <= dd) {\r\n y = Math.sqrt(dd - r * r) * bendDir;\r\n a1 = ta - Math.atan2(y, r);\r\n a2 = Math.atan2(y / psy, (r - l1) / psx);\r\n break outer;\r\n }\r\n }\r\n var minAngle = spine.MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\r\n var maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;\r\n c = -a * l1 / (aa - bb);\r\n if (c >= -1 && c <= 1) {\r\n c = Math.acos(c);\r\n x = a * Math.cos(c) + l1;\r\n y = b * Math.sin(c);\r\n d = x * x + y * y;\r\n if (d < minDist) {\r\n minAngle = c;\r\n minDist = d;\r\n minX = x;\r\n minY = y;\r\n }\r\n if (d > maxDist) {\r\n maxAngle = c;\r\n maxDist = d;\r\n maxX = x;\r\n maxY = y;\r\n }\r\n }\r\n if (dd <= (minDist + maxDist) / 2) {\r\n a1 = ta - Math.atan2(minY * bendDir, minX);\r\n a2 = minAngle * bendDir;\r\n }\r\n else {\r\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\r\n a2 = maxAngle * bendDir;\r\n }\r\n }\r\n var os = Math.atan2(cy, cx) * s2;\r\n var rotation = parent.arotation;\r\n a1 = (a1 - os) * spine.MathUtils.radDeg + os1 - rotation;\r\n if (a1 > 180)\r\n a1 -= 360;\r\n else if (a1 < -180)\r\n a1 += 360;\r\n parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, sx, parent.ascaleY, 0, 0);\r\n rotation = child.arotation;\r\n a2 = ((a2 + os) * spine.MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation;\r\n if (a2 > 180)\r\n a2 -= 360;\r\n else if (a2 < -180)\r\n a2 += 360;\r\n child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n };\r\n return IkConstraint;\r\n }());\r\n spine.IkConstraint = IkConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IkConstraintData = (function (_super) {\r\n __extends(IkConstraintData, _super);\r\n function IkConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n _this.bendDirection = 1;\r\n _this.compress = false;\r\n _this.stretch = false;\r\n _this.uniform = false;\r\n _this.mix = 1;\r\n _this.softness = 0;\r\n return _this;\r\n }\r\n return IkConstraintData;\r\n }(spine.ConstraintData));\r\n spine.IkConstraintData = IkConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathConstraint = (function () {\r\n function PathConstraint(data, skeleton) {\r\n this.position = 0;\r\n this.spacing = 0;\r\n this.rotateMix = 0;\r\n this.translateMix = 0;\r\n this.spaces = new Array();\r\n this.positions = new Array();\r\n this.world = new Array();\r\n this.curves = new Array();\r\n this.lengths = new Array();\r\n this.segments = new Array();\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (var i = 0, n = data.bones.length; i < n; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findSlot(data.target.name);\r\n this.position = data.position;\r\n this.spacing = data.spacing;\r\n this.rotateMix = data.rotateMix;\r\n this.translateMix = data.translateMix;\r\n }\r\n PathConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n PathConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n PathConstraint.prototype.update = function () {\r\n var attachment = this.target.getAttachment();\r\n if (!(attachment instanceof spine.PathAttachment))\r\n return;\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix;\r\n var translate = translateMix > 0, rotate = rotateMix > 0;\r\n if (!translate && !rotate)\r\n return;\r\n var data = this.data;\r\n var percentSpacing = data.spacingMode == spine.SpacingMode.Percent;\r\n var rotateMode = data.rotateMode;\r\n var tangents = rotateMode == spine.RotateMode.Tangent, scale = rotateMode == spine.RotateMode.ChainScale;\r\n var boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\r\n var bones = this.bones;\r\n var spaces = spine.Utils.setArraySize(this.spaces, spacesCount), lengths = null;\r\n var spacing = this.spacing;\r\n if (scale || !percentSpacing) {\r\n if (scale)\r\n lengths = spine.Utils.setArraySize(this.lengths, boneCount);\r\n var lengthSpacing = data.spacingMode == spine.SpacingMode.Length;\r\n for (var i = 0, n = spacesCount - 1; i < n;) {\r\n var bone = bones[i];\r\n var setupLength = bone.data.length;\r\n if (setupLength < PathConstraint.epsilon) {\r\n if (scale)\r\n lengths[i] = 0;\r\n spaces[++i] = 0;\r\n }\r\n else if (percentSpacing) {\r\n if (scale) {\r\n var x = setupLength * bone.a, y = setupLength * bone.c;\r\n var length_1 = Math.sqrt(x * x + y * y);\r\n lengths[i] = length_1;\r\n }\r\n spaces[++i] = spacing;\r\n }\r\n else {\r\n var x = setupLength * bone.a, y = setupLength * bone.c;\r\n var length_2 = Math.sqrt(x * x + y * y);\r\n if (scale)\r\n lengths[i] = length_2;\r\n spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length_2 / setupLength;\r\n }\r\n }\r\n }\r\n else {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] = spacing;\r\n }\r\n var positions = this.computeWorldPositions(attachment, spacesCount, tangents, data.positionMode == spine.PositionMode.Percent, percentSpacing);\r\n var boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\r\n var tip = false;\r\n if (offsetRotation == 0)\r\n tip = rotateMode == spine.RotateMode.Chain;\r\n else {\r\n tip = false;\r\n var p = this.target.bone;\r\n offsetRotation *= p.a * p.d - p.b * p.c > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n }\r\n for (var i = 0, p = 3; i < boneCount; i++, p += 3) {\r\n var bone = bones[i];\r\n bone.worldX += (boneX - bone.worldX) * translateMix;\r\n bone.worldY += (boneY - bone.worldY) * translateMix;\r\n var x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\r\n if (scale) {\r\n var length_3 = lengths[i];\r\n if (length_3 != 0) {\r\n var s = (Math.sqrt(dx * dx + dy * dy) / length_3 - 1) * rotateMix + 1;\r\n bone.a *= s;\r\n bone.c *= s;\r\n }\r\n }\r\n boneX = x;\r\n boneY = y;\r\n if (rotate) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d, r = 0, cos = 0, sin = 0;\r\n if (tangents)\r\n r = positions[p - 1];\r\n else if (spaces[i + 1] == 0)\r\n r = positions[p + 2];\r\n else\r\n r = Math.atan2(dy, dx);\r\n r -= Math.atan2(c, a);\r\n if (tip) {\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n var length_4 = bone.data.length;\r\n boneX += (length_4 * (cos * a - sin * c) - dx) * rotateMix;\r\n boneY += (length_4 * (sin * a + cos * c) - dy) * rotateMix;\r\n }\r\n else {\r\n r += offsetRotation;\r\n }\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n }\r\n bone.appliedValid = false;\r\n }\r\n };\r\n PathConstraint.prototype.computeWorldPositions = function (path, spacesCount, tangents, percentPosition, percentSpacing) {\r\n var target = this.target;\r\n var position = this.position;\r\n var spaces = this.spaces, out = spine.Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = null;\r\n var closed = path.closed;\r\n var verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = PathConstraint.NONE;\r\n if (!path.constantSpeed) {\r\n var lengths = path.lengths;\r\n curveCount -= closed ? 1 : 2;\r\n var pathLength_1 = lengths[curveCount];\r\n if (percentPosition)\r\n position *= pathLength_1;\r\n if (percentSpacing) {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] *= pathLength_1;\r\n }\r\n world = spine.Utils.setArraySize(this.world, 8);\r\n for (var i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\r\n var space = spaces[i];\r\n position += space;\r\n var p = position;\r\n if (closed) {\r\n p %= pathLength_1;\r\n if (p < 0)\r\n p += pathLength_1;\r\n curve = 0;\r\n }\r\n else if (p < 0) {\r\n if (prevCurve != PathConstraint.BEFORE) {\r\n prevCurve = PathConstraint.BEFORE;\r\n path.computeWorldVertices(target, 2, 4, world, 0, 2);\r\n }\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n }\r\n else if (p > pathLength_1) {\r\n if (prevCurve != PathConstraint.AFTER) {\r\n prevCurve = PathConstraint.AFTER;\r\n path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\r\n }\r\n this.addAfterPosition(p - pathLength_1, world, 0, out, o);\r\n continue;\r\n }\r\n for (;; curve++) {\r\n var length_5 = lengths[curve];\r\n if (p > length_5)\r\n continue;\r\n if (curve == 0)\r\n p /= length_5;\r\n else {\r\n var prev = lengths[curve - 1];\r\n p = (p - prev) / (length_5 - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n if (closed && curve == curveCount) {\r\n path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 4, world, 4, 2);\r\n }\r\n else\r\n path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\r\n }\r\n this.addCurvePosition(p, world[0], world[1], world[2], world[3], world[4], world[5], world[6], world[7], out, o, tangents || (i > 0 && space == 0));\r\n }\r\n return out;\r\n }\r\n if (closed) {\r\n verticesLength += 2;\r\n world = spine.Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength - 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 2, world, verticesLength - 4, 2);\r\n world[verticesLength - 2] = world[0];\r\n world[verticesLength - 1] = world[1];\r\n }\r\n else {\r\n curveCount--;\r\n verticesLength -= 4;\r\n world = spine.Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\r\n }\r\n var curves = spine.Utils.setArraySize(this.curves, curveCount);\r\n var pathLength = 0;\r\n var x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\r\n var tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\r\n for (var i = 0, w = 2; i < curveCount; i++, w += 6) {\r\n cx1 = world[w];\r\n cy1 = world[w + 1];\r\n cx2 = world[w + 2];\r\n cy2 = world[w + 3];\r\n x2 = world[w + 4];\r\n y2 = world[w + 5];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.1875;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.1875;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n curves[i] = pathLength;\r\n x1 = x2;\r\n y1 = y2;\r\n }\r\n if (percentPosition)\r\n position *= pathLength;\r\n else\r\n position *= pathLength / path.lengths[curveCount - 1];\r\n if (percentSpacing) {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] *= pathLength;\r\n }\r\n var segments = this.segments;\r\n var curveLength = 0;\r\n for (var i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\r\n var space = spaces[i];\r\n position += space;\r\n var p = position;\r\n if (closed) {\r\n p %= pathLength;\r\n if (p < 0)\r\n p += pathLength;\r\n curve = 0;\r\n }\r\n else if (p < 0) {\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n }\r\n else if (p > pathLength) {\r\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\r\n continue;\r\n }\r\n for (;; curve++) {\r\n var length_6 = curves[curve];\r\n if (p > length_6)\r\n continue;\r\n if (curve == 0)\r\n p /= length_6;\r\n else {\r\n var prev = curves[curve - 1];\r\n p = (p - prev) / (length_6 - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n var ii = curve * 6;\r\n x1 = world[ii];\r\n y1 = world[ii + 1];\r\n cx1 = world[ii + 2];\r\n cy1 = world[ii + 3];\r\n cx2 = world[ii + 4];\r\n cy2 = world[ii + 5];\r\n x2 = world[ii + 6];\r\n y2 = world[ii + 7];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.03;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.03;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.006;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.006;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667;\r\n curveLength = Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[0] = curveLength;\r\n for (ii = 1; ii < 8; ii++) {\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[ii] = curveLength;\r\n }\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[8] = curveLength;\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[9] = curveLength;\r\n segment = 0;\r\n }\r\n p *= curveLength;\r\n for (;; segment++) {\r\n var length_7 = segments[segment];\r\n if (p > length_7)\r\n continue;\r\n if (segment == 0)\r\n p /= length_7;\r\n else {\r\n var prev = segments[segment - 1];\r\n p = segment + (p - prev) / (length_7 - prev);\r\n }\r\n break;\r\n }\r\n this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || (i > 0 && space == 0));\r\n }\r\n return out;\r\n };\r\n PathConstraint.prototype.addBeforePosition = function (p, temp, i, out, o) {\r\n var x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n };\r\n PathConstraint.prototype.addAfterPosition = function (p, temp, i, out, o) {\r\n var x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n };\r\n PathConstraint.prototype.addCurvePosition = function (p, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents) {\r\n if (p == 0 || isNaN(p)) {\r\n out[o] = x1;\r\n out[o + 1] = y1;\r\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\r\n return;\r\n }\r\n var tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\r\n var ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\r\n var x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt;\r\n out[o] = x;\r\n out[o + 1] = y;\r\n if (tangents) {\r\n if (p < 0.001)\r\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\r\n else\r\n out[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt));\r\n }\r\n };\r\n PathConstraint.NONE = -1;\r\n PathConstraint.BEFORE = -2;\r\n PathConstraint.AFTER = -3;\r\n PathConstraint.epsilon = 0.00001;\r\n return PathConstraint;\r\n }());\r\n spine.PathConstraint = PathConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathConstraintData = (function (_super) {\r\n __extends(PathConstraintData, _super);\r\n function PathConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n return _this;\r\n }\r\n return PathConstraintData;\r\n }(spine.ConstraintData));\r\n spine.PathConstraintData = PathConstraintData;\r\n var PositionMode;\r\n (function (PositionMode) {\r\n PositionMode[PositionMode[\"Fixed\"] = 0] = \"Fixed\";\r\n PositionMode[PositionMode[\"Percent\"] = 1] = \"Percent\";\r\n })(PositionMode = spine.PositionMode || (spine.PositionMode = {}));\r\n var SpacingMode;\r\n (function (SpacingMode) {\r\n SpacingMode[SpacingMode[\"Length\"] = 0] = \"Length\";\r\n SpacingMode[SpacingMode[\"Fixed\"] = 1] = \"Fixed\";\r\n SpacingMode[SpacingMode[\"Percent\"] = 2] = \"Percent\";\r\n })(SpacingMode = spine.SpacingMode || (spine.SpacingMode = {}));\r\n var RotateMode;\r\n (function (RotateMode) {\r\n RotateMode[RotateMode[\"Tangent\"] = 0] = \"Tangent\";\r\n RotateMode[RotateMode[\"Chain\"] = 1] = \"Chain\";\r\n RotateMode[RotateMode[\"ChainScale\"] = 2] = \"ChainScale\";\r\n })(RotateMode = spine.RotateMode || (spine.RotateMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Assets = (function () {\r\n function Assets(clientId) {\r\n this.toLoad = new Array();\r\n this.assets = {};\r\n this.clientId = clientId;\r\n }\r\n Assets.prototype.loaded = function () {\r\n var i = 0;\r\n for (var v in this.assets)\r\n i++;\r\n return i;\r\n };\r\n return Assets;\r\n }());\r\n var SharedAssetManager = (function () {\r\n function SharedAssetManager(pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n this.clientAssets = {};\r\n this.queuedAssets = {};\r\n this.rawAssets = {};\r\n this.errors = {};\r\n this.pathPrefix = pathPrefix;\r\n }\r\n SharedAssetManager.prototype.queueAsset = function (clientId, textureLoader, path) {\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined) {\r\n clientAssets = new Assets(clientId);\r\n this.clientAssets[clientId] = clientAssets;\r\n }\r\n if (textureLoader !== null)\r\n clientAssets.textureLoader = textureLoader;\r\n clientAssets.toLoad.push(path);\r\n if (this.queuedAssets[path] === path) {\r\n return false;\r\n }\r\n else {\r\n this.queuedAssets[path] = path;\r\n return true;\r\n }\r\n };\r\n SharedAssetManager.prototype.loadText = function (clientId, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, null, path))\r\n return;\r\n var request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n request.onreadystatechange = function () {\r\n if (request.readyState == XMLHttpRequest.DONE) {\r\n if (request.status >= 200 && request.status < 300) {\r\n _this.rawAssets[path] = request.responseText;\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load text \" + path + \": status \" + request.status + \", \" + request.responseText;\r\n }\r\n }\r\n };\r\n request.open(\"GET\", path, true);\r\n request.send();\r\n };\r\n SharedAssetManager.prototype.loadJson = function (clientId, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, null, path))\r\n return;\r\n var request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n request.onreadystatechange = function () {\r\n if (request.readyState == XMLHttpRequest.DONE) {\r\n if (request.status >= 200 && request.status < 300) {\r\n _this.rawAssets[path] = JSON.parse(request.responseText);\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load text \" + path + \": status \" + request.status + \", \" + request.responseText;\r\n }\r\n }\r\n };\r\n request.open(\"GET\", path, true);\r\n request.send();\r\n };\r\n SharedAssetManager.prototype.loadTexture = function (clientId, textureLoader, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, textureLoader, path))\r\n return;\r\n var img = new Image();\r\n img.crossOrigin = \"anonymous\";\r\n img.onload = function (ev) {\r\n _this.rawAssets[path] = img;\r\n };\r\n img.onerror = function (ev) {\r\n _this.errors[path] = \"Couldn't load image \" + path;\r\n };\r\n img.src = path;\r\n };\r\n SharedAssetManager.prototype.get = function (clientId, path) {\r\n path = this.pathPrefix + path;\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined)\r\n return true;\r\n return clientAssets.assets[path];\r\n };\r\n SharedAssetManager.prototype.updateClientAssets = function (clientAssets) {\r\n for (var i = 0; i < clientAssets.toLoad.length; i++) {\r\n var path = clientAssets.toLoad[i];\r\n var asset = clientAssets.assets[path];\r\n if (asset === null || asset === undefined) {\r\n var rawAsset = this.rawAssets[path];\r\n if (rawAsset === null || rawAsset === undefined)\r\n continue;\r\n if (rawAsset instanceof HTMLImageElement) {\r\n clientAssets.assets[path] = clientAssets.textureLoader(rawAsset);\r\n }\r\n else {\r\n clientAssets.assets[path] = rawAsset;\r\n }\r\n }\r\n }\r\n };\r\n SharedAssetManager.prototype.isLoadingComplete = function (clientId) {\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined)\r\n return true;\r\n this.updateClientAssets(clientAssets);\r\n return clientAssets.toLoad.length == clientAssets.loaded();\r\n };\r\n SharedAssetManager.prototype.dispose = function () {\r\n };\r\n SharedAssetManager.prototype.hasErrors = function () {\r\n return Object.keys(this.errors).length > 0;\r\n };\r\n SharedAssetManager.prototype.getErrors = function () {\r\n return this.errors;\r\n };\r\n return SharedAssetManager;\r\n }());\r\n spine.SharedAssetManager = SharedAssetManager;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Skeleton = (function () {\r\n function Skeleton(data) {\r\n this._updateCache = new Array();\r\n this.updateCacheReset = new Array();\r\n this.time = 0;\r\n this.scaleX = 1;\r\n this.scaleY = 1;\r\n this.x = 0;\r\n this.y = 0;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++) {\r\n var boneData = data.bones[i];\r\n var bone = void 0;\r\n if (boneData.parent == null)\r\n bone = new spine.Bone(boneData, this, null);\r\n else {\r\n var parent_1 = this.bones[boneData.parent.index];\r\n bone = new spine.Bone(boneData, this, parent_1);\r\n parent_1.children.push(bone);\r\n }\r\n this.bones.push(bone);\r\n }\r\n this.slots = new Array();\r\n this.drawOrder = new Array();\r\n for (var i = 0; i < data.slots.length; i++) {\r\n var slotData = data.slots[i];\r\n var bone = this.bones[slotData.boneData.index];\r\n var slot = new spine.Slot(slotData, bone);\r\n this.slots.push(slot);\r\n this.drawOrder.push(slot);\r\n }\r\n this.ikConstraints = new Array();\r\n for (var i = 0; i < data.ikConstraints.length; i++) {\r\n var ikConstraintData = data.ikConstraints[i];\r\n this.ikConstraints.push(new spine.IkConstraint(ikConstraintData, this));\r\n }\r\n this.transformConstraints = new Array();\r\n for (var i = 0; i < data.transformConstraints.length; i++) {\r\n var transformConstraintData = data.transformConstraints[i];\r\n this.transformConstraints.push(new spine.TransformConstraint(transformConstraintData, this));\r\n }\r\n this.pathConstraints = new Array();\r\n for (var i = 0; i < data.pathConstraints.length; i++) {\r\n var pathConstraintData = data.pathConstraints[i];\r\n this.pathConstraints.push(new spine.PathConstraint(pathConstraintData, this));\r\n }\r\n this.color = new spine.Color(1, 1, 1, 1);\r\n this.updateCache();\r\n }\r\n Skeleton.prototype.updateCache = function () {\r\n var updateCache = this._updateCache;\r\n updateCache.length = 0;\r\n this.updateCacheReset.length = 0;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n bone.sorted = bone.data.skinRequired;\r\n bone.active = !bone.sorted;\r\n }\r\n if (this.skin != null) {\r\n var skinBones = this.skin.bones;\r\n for (var i = 0, n = this.skin.bones.length; i < n; i++) {\r\n var bone = this.bones[skinBones[i].index];\r\n do {\r\n bone.sorted = false;\r\n bone.active = true;\r\n bone = bone.parent;\r\n } while (bone != null);\r\n }\r\n }\r\n var ikConstraints = this.ikConstraints;\r\n var transformConstraints = this.transformConstraints;\r\n var pathConstraints = this.pathConstraints;\r\n var ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\r\n var constraintCount = ikCount + transformCount + pathCount;\r\n outer: for (var i = 0; i < constraintCount; i++) {\r\n for (var ii = 0; ii < ikCount; ii++) {\r\n var constraint = ikConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortIkConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (var ii = 0; ii < transformCount; ii++) {\r\n var constraint = transformConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortTransformConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (var ii = 0; ii < pathCount; ii++) {\r\n var constraint = pathConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortPathConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n }\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n this.sortBone(bones[i]);\r\n };\r\n Skeleton.prototype.sortIkConstraint = function (constraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n var target = constraint.target;\r\n this.sortBone(target);\r\n var constrained = constraint.bones;\r\n var parent = constrained[0];\r\n this.sortBone(parent);\r\n if (constrained.length > 1) {\r\n var child = constrained[constrained.length - 1];\r\n if (!(this._updateCache.indexOf(child) > -1))\r\n this.updateCacheReset.push(child);\r\n }\r\n this._updateCache.push(constraint);\r\n this.sortReset(parent.children);\r\n constrained[constrained.length - 1].sorted = true;\r\n };\r\n Skeleton.prototype.sortPathConstraint = function (constraint) {\r\n constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n var slot = constraint.target;\r\n var slotIndex = slot.data.index;\r\n var slotBone = slot.bone;\r\n if (this.skin != null)\r\n this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\r\n if (this.data.defaultSkin != null && this.data.defaultSkin != this.skin)\r\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\r\n for (var i = 0, n = this.data.skins.length; i < n; i++)\r\n this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.PathAttachment)\r\n this.sortPathConstraintAttachmentWith(attachment, slotBone);\r\n var constrained = constraint.bones;\r\n var boneCount = constrained.length;\r\n for (var i = 0; i < boneCount; i++)\r\n this.sortBone(constrained[i]);\r\n this._updateCache.push(constraint);\r\n for (var i = 0; i < boneCount; i++)\r\n this.sortReset(constrained[i].children);\r\n for (var i = 0; i < boneCount; i++)\r\n constrained[i].sorted = true;\r\n };\r\n Skeleton.prototype.sortTransformConstraint = function (constraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n this.sortBone(constraint.target);\r\n var constrained = constraint.bones;\r\n var boneCount = constrained.length;\r\n if (constraint.data.local) {\r\n for (var i = 0; i < boneCount; i++) {\r\n var child = constrained[i];\r\n this.sortBone(child.parent);\r\n if (!(this._updateCache.indexOf(child) > -1))\r\n this.updateCacheReset.push(child);\r\n }\r\n }\r\n else {\r\n for (var i = 0; i < boneCount; i++) {\r\n this.sortBone(constrained[i]);\r\n }\r\n }\r\n this._updateCache.push(constraint);\r\n for (var ii = 0; ii < boneCount; ii++)\r\n this.sortReset(constrained[ii].children);\r\n for (var ii = 0; ii < boneCount; ii++)\r\n constrained[ii].sorted = true;\r\n };\r\n Skeleton.prototype.sortPathConstraintAttachment = function (skin, slotIndex, slotBone) {\r\n var attachments = skin.attachments[slotIndex];\r\n if (!attachments)\r\n return;\r\n for (var key in attachments) {\r\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\r\n }\r\n };\r\n Skeleton.prototype.sortPathConstraintAttachmentWith = function (attachment, slotBone) {\r\n if (!(attachment instanceof spine.PathAttachment))\r\n return;\r\n var pathBones = attachment.bones;\r\n if (pathBones == null)\r\n this.sortBone(slotBone);\r\n else {\r\n var bones = this.bones;\r\n var i = 0;\r\n while (i < pathBones.length) {\r\n var boneCount = pathBones[i++];\r\n for (var n = i + boneCount; i < n; i++) {\r\n var boneIndex = pathBones[i];\r\n this.sortBone(bones[boneIndex]);\r\n }\r\n }\r\n }\r\n };\r\n Skeleton.prototype.sortBone = function (bone) {\r\n if (bone.sorted)\r\n return;\r\n var parent = bone.parent;\r\n if (parent != null)\r\n this.sortBone(parent);\r\n bone.sorted = true;\r\n this._updateCache.push(bone);\r\n };\r\n Skeleton.prototype.sortReset = function (bones) {\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.active)\r\n continue;\r\n if (bone.sorted)\r\n this.sortReset(bone.children);\r\n bone.sorted = false;\r\n }\r\n };\r\n Skeleton.prototype.updateWorldTransform = function () {\r\n var updateCacheReset = this.updateCacheReset;\r\n for (var i = 0, n = updateCacheReset.length; i < n; i++) {\r\n var bone = updateCacheReset[i];\r\n bone.ax = bone.x;\r\n bone.ay = bone.y;\r\n bone.arotation = bone.rotation;\r\n bone.ascaleX = bone.scaleX;\r\n bone.ascaleY = bone.scaleY;\r\n bone.ashearX = bone.shearX;\r\n bone.ashearY = bone.shearY;\r\n bone.appliedValid = true;\r\n }\r\n var updateCache = this._updateCache;\r\n for (var i = 0, n = updateCache.length; i < n; i++)\r\n updateCache[i].update();\r\n };\r\n Skeleton.prototype.setToSetupPose = function () {\r\n this.setBonesToSetupPose();\r\n this.setSlotsToSetupPose();\r\n };\r\n Skeleton.prototype.setBonesToSetupPose = function () {\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n bones[i].setToSetupPose();\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var constraint = ikConstraints[i];\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n var data = constraint.data;\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n constraint.scaleMix = data.scaleMix;\r\n constraint.shearMix = data.shearMix;\r\n }\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n var data = constraint.data;\r\n constraint.position = data.position;\r\n constraint.spacing = data.spacing;\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n }\r\n };\r\n Skeleton.prototype.setSlotsToSetupPose = function () {\r\n var slots = this.slots;\r\n spine.Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n slots[i].setToSetupPose();\r\n };\r\n Skeleton.prototype.getRootBone = function () {\r\n if (this.bones.length == 0)\r\n return null;\r\n return this.bones[0];\r\n };\r\n Skeleton.prototype.findBone = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (bone.data.name == boneName)\r\n return bone;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findBoneIndex = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n if (bones[i].data.name == boneName)\r\n return i;\r\n return -1;\r\n };\r\n Skeleton.prototype.findSlot = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.data.name == slotName)\r\n return slot;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findSlotIndex = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n if (slots[i].data.name == slotName)\r\n return i;\r\n return -1;\r\n };\r\n Skeleton.prototype.setSkinByName = function (skinName) {\r\n var skin = this.data.findSkin(skinName);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + skinName);\r\n this.setSkin(skin);\r\n };\r\n Skeleton.prototype.setSkin = function (newSkin) {\r\n if (newSkin == this.skin)\r\n return;\r\n if (newSkin != null) {\r\n if (this.skin != null)\r\n newSkin.attachAll(this, this.skin);\r\n else {\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n var name_1 = slot.data.attachmentName;\r\n if (name_1 != null) {\r\n var attachment = newSkin.getAttachment(i, name_1);\r\n if (attachment != null)\r\n slot.setAttachment(attachment);\r\n }\r\n }\r\n }\r\n }\r\n this.skin = newSkin;\r\n this.updateCache();\r\n };\r\n Skeleton.prototype.getAttachmentByName = function (slotName, attachmentName) {\r\n return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName);\r\n };\r\n Skeleton.prototype.getAttachment = function (slotIndex, attachmentName) {\r\n if (attachmentName == null)\r\n throw new Error(\"attachmentName cannot be null.\");\r\n if (this.skin != null) {\r\n var attachment = this.skin.getAttachment(slotIndex, attachmentName);\r\n if (attachment != null)\r\n return attachment;\r\n }\r\n if (this.data.defaultSkin != null)\r\n return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\r\n return null;\r\n };\r\n Skeleton.prototype.setAttachment = function (slotName, attachmentName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.data.name == slotName) {\r\n var attachment = null;\r\n if (attachmentName != null) {\r\n attachment = this.getAttachment(i, attachmentName);\r\n if (attachment == null)\r\n throw new Error(\"Attachment not found: \" + attachmentName + \", for slot: \" + slotName);\r\n }\r\n slot.setAttachment(attachment);\r\n return;\r\n }\r\n }\r\n throw new Error(\"Slot not found: \" + slotName);\r\n };\r\n Skeleton.prototype.findIkConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var ikConstraint = ikConstraints[i];\r\n if (ikConstraint.data.name == constraintName)\r\n return ikConstraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findTransformConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n if (constraint.data.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findPathConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n if (constraint.data.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.getBounds = function (offset, size, temp) {\r\n if (temp === void 0) { temp = new Array(2); }\r\n if (offset == null)\r\n throw new Error(\"offset cannot be null.\");\r\n if (size == null)\r\n throw new Error(\"size cannot be null.\");\r\n var drawOrder = this.drawOrder;\r\n var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var slot = drawOrder[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var verticesLength = 0;\r\n var vertices = null;\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.RegionAttachment) {\r\n verticesLength = 8;\r\n vertices = spine.Utils.setArraySize(temp, verticesLength, 0);\r\n attachment.computeWorldVertices(slot.bone, vertices, 0, 2);\r\n }\r\n else if (attachment instanceof spine.MeshAttachment) {\r\n var mesh = attachment;\r\n verticesLength = mesh.worldVerticesLength;\r\n vertices = spine.Utils.setArraySize(temp, verticesLength, 0);\r\n mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\r\n }\r\n if (vertices != null) {\r\n for (var ii = 0, nn = vertices.length; ii < nn; ii += 2) {\r\n var x = vertices[ii], y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n }\r\n offset.set(minX, minY);\r\n size.set(maxX - minX, maxY - minY);\r\n };\r\n Skeleton.prototype.update = function (delta) {\r\n this.time += delta;\r\n };\r\n return Skeleton;\r\n }());\r\n spine.Skeleton = Skeleton;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonBinary = (function () {\r\n function SkeletonBinary(attachmentLoader) {\r\n this.scale = 1;\r\n this.linkedMeshes = new Array();\r\n this.attachmentLoader = attachmentLoader;\r\n }\r\n SkeletonBinary.prototype.readSkeletonData = function (binary) {\r\n var scale = this.scale;\r\n var skeletonData = new spine.SkeletonData();\r\n skeletonData.name = \"\";\r\n var input = new BinaryInput(binary);\r\n skeletonData.hash = input.readString();\r\n skeletonData.version = input.readString();\r\n if (\"3.8.75\" == skeletonData.version)\r\n throw new Error(\"Unsupported skeleton data, please export with a newer version of Spine.\");\r\n skeletonData.x = input.readFloat();\r\n skeletonData.y = input.readFloat();\r\n skeletonData.width = input.readFloat();\r\n skeletonData.height = input.readFloat();\r\n var nonessential = input.readBoolean();\r\n if (nonessential) {\r\n skeletonData.fps = input.readFloat();\r\n skeletonData.imagesPath = input.readString();\r\n skeletonData.audioPath = input.readString();\r\n }\r\n var n = 0;\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++)\r\n input.strings.push(input.readString());\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var name_2 = input.readString();\r\n var parent_2 = i == 0 ? null : skeletonData.bones[input.readInt(true)];\r\n var data = new spine.BoneData(i, name_2, parent_2);\r\n data.rotation = input.readFloat();\r\n data.x = input.readFloat() * scale;\r\n data.y = input.readFloat() * scale;\r\n data.scaleX = input.readFloat();\r\n data.scaleY = input.readFloat();\r\n data.shearX = input.readFloat();\r\n data.shearY = input.readFloat();\r\n data.length = input.readFloat() * scale;\r\n data.transformMode = SkeletonBinary.TransformModeValues[input.readInt(true)];\r\n data.skinRequired = input.readBoolean();\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(data.color, input.readInt32());\r\n skeletonData.bones.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var slotName = input.readString();\r\n var boneData = skeletonData.bones[input.readInt(true)];\r\n var data = new spine.SlotData(i, slotName, boneData);\r\n spine.Color.rgba8888ToColor(data.color, input.readInt32());\r\n var darkColor = input.readInt32();\r\n if (darkColor != -1)\r\n spine.Color.rgb888ToColor(data.darkColor = new spine.Color(), darkColor);\r\n data.attachmentName = input.readStringRef();\r\n data.blendMode = SkeletonBinary.BlendModeValues[input.readInt(true)];\r\n skeletonData.slots.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.IkConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.bones[input.readInt(true)];\r\n data.mix = input.readFloat();\r\n data.softness = input.readFloat() * scale;\r\n data.bendDirection = input.readByte();\r\n data.compress = input.readBoolean();\r\n data.stretch = input.readBoolean();\r\n data.uniform = input.readBoolean();\r\n skeletonData.ikConstraints.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.TransformConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.bones[input.readInt(true)];\r\n data.local = input.readBoolean();\r\n data.relative = input.readBoolean();\r\n data.offsetRotation = input.readFloat();\r\n data.offsetX = input.readFloat() * scale;\r\n data.offsetY = input.readFloat() * scale;\r\n data.offsetScaleX = input.readFloat();\r\n data.offsetScaleY = input.readFloat();\r\n data.offsetShearY = input.readFloat();\r\n data.rotateMix = input.readFloat();\r\n data.translateMix = input.readFloat();\r\n data.scaleMix = input.readFloat();\r\n data.shearMix = input.readFloat();\r\n skeletonData.transformConstraints.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.PathConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.slots[input.readInt(true)];\r\n data.positionMode = SkeletonBinary.PositionModeValues[input.readInt(true)];\r\n data.spacingMode = SkeletonBinary.SpacingModeValues[input.readInt(true)];\r\n data.rotateMode = SkeletonBinary.RotateModeValues[input.readInt(true)];\r\n data.offsetRotation = input.readFloat();\r\n data.position = input.readFloat();\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n data.position *= scale;\r\n data.spacing = input.readFloat();\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n data.spacing *= scale;\r\n data.rotateMix = input.readFloat();\r\n data.translateMix = input.readFloat();\r\n skeletonData.pathConstraints.push(data);\r\n }\r\n var defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\r\n if (defaultSkin != null) {\r\n skeletonData.defaultSkin = defaultSkin;\r\n skeletonData.skins.push(defaultSkin);\r\n }\r\n {\r\n var i = skeletonData.skins.length;\r\n spine.Utils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\r\n for (; i < n; i++)\r\n skeletonData.skins[i] = this.readSkin(input, skeletonData, false, nonessential);\r\n }\r\n n = this.linkedMeshes.length;\r\n for (var i = 0; i < n; i++) {\r\n var linkedMesh = this.linkedMeshes[i];\r\n var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + linkedMesh.skin);\r\n var parent_3 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n if (parent_3 == null)\r\n throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\r\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_3 : linkedMesh.mesh;\r\n linkedMesh.mesh.setParentMesh(parent_3);\r\n linkedMesh.mesh.updateUVs();\r\n }\r\n this.linkedMeshes.length = 0;\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var data = new spine.EventData(input.readStringRef());\r\n data.intValue = input.readInt(false);\r\n data.floatValue = input.readFloat();\r\n data.stringValue = input.readString();\r\n data.audioPath = input.readString();\r\n if (data.audioPath != null) {\r\n data.volume = input.readFloat();\r\n data.balance = input.readFloat();\r\n }\r\n skeletonData.events.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++)\r\n skeletonData.animations.push(this.readAnimation(input, input.readString(), skeletonData));\r\n return skeletonData;\r\n };\r\n SkeletonBinary.prototype.readSkin = function (input, skeletonData, defaultSkin, nonessential) {\r\n var skin = null;\r\n var slotCount = 0;\r\n if (defaultSkin) {\r\n slotCount = input.readInt(true);\r\n if (slotCount == 0)\r\n return null;\r\n skin = new spine.Skin(\"default\");\r\n }\r\n else {\r\n skin = new spine.Skin(input.readStringRef());\r\n skin.bones.length = input.readInt(true);\r\n for (var i = 0, n = skin.bones.length; i < n; i++)\r\n skin.bones[i] = skeletonData.bones[input.readInt(true)];\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.pathConstraints[input.readInt(true)]);\r\n slotCount = input.readInt(true);\r\n }\r\n for (var i = 0; i < slotCount; i++) {\r\n var slotIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var name_3 = input.readStringRef();\r\n var attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name_3, nonessential);\r\n if (attachment != null)\r\n skin.setAttachment(slotIndex, name_3, attachment);\r\n }\r\n }\r\n return skin;\r\n };\r\n SkeletonBinary.prototype.readAttachment = function (input, skeletonData, skin, slotIndex, attachmentName, nonessential) {\r\n var scale = this.scale;\r\n var name = input.readStringRef();\r\n if (name == null)\r\n name = attachmentName;\r\n var typeIndex = input.readByte();\r\n var type = SkeletonBinary.AttachmentTypeValues[typeIndex];\r\n switch (type) {\r\n case spine.AttachmentType.Region: {\r\n var path = input.readStringRef();\r\n var rotation = input.readFloat();\r\n var x = input.readFloat();\r\n var y = input.readFloat();\r\n var scaleX = input.readFloat();\r\n var scaleY = input.readFloat();\r\n var width = input.readFloat();\r\n var height = input.readFloat();\r\n var color = input.readInt32();\r\n if (path == null)\r\n path = name;\r\n var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\r\n if (region == null)\r\n return null;\r\n region.path = path;\r\n region.x = x * scale;\r\n region.y = y * scale;\r\n region.scaleX = scaleX;\r\n region.scaleY = scaleY;\r\n region.rotation = rotation;\r\n region.width = width * scale;\r\n region.height = height * scale;\r\n spine.Color.rgba8888ToColor(region.color, color);\r\n region.updateOffset();\r\n return region;\r\n }\r\n case spine.AttachmentType.BoundingBox: {\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var color = nonessential ? input.readInt32() : 0;\r\n var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n if (box == null)\r\n return null;\r\n box.worldVerticesLength = vertexCount << 1;\r\n box.vertices = vertices.vertices;\r\n box.bones = vertices.bones;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(box.color, color);\r\n return box;\r\n }\r\n case spine.AttachmentType.Mesh: {\r\n var path = input.readStringRef();\r\n var color = input.readInt32();\r\n var vertexCount = input.readInt(true);\r\n var uvs = this.readFloatArray(input, vertexCount << 1, 1);\r\n var triangles = this.readShortArray(input);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var hullLength = input.readInt(true);\r\n var edges = null;\r\n var width = 0, height = 0;\r\n if (nonessential) {\r\n edges = this.readShortArray(input);\r\n width = input.readFloat();\r\n height = input.readFloat();\r\n }\r\n if (path == null)\r\n path = name;\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n spine.Color.rgba8888ToColor(mesh.color, color);\r\n mesh.bones = vertices.bones;\r\n mesh.vertices = vertices.vertices;\r\n mesh.worldVerticesLength = vertexCount << 1;\r\n mesh.triangles = triangles;\r\n mesh.regionUVs = uvs;\r\n mesh.updateUVs();\r\n mesh.hullLength = hullLength << 1;\r\n if (nonessential) {\r\n mesh.edges = edges;\r\n mesh.width = width * scale;\r\n mesh.height = height * scale;\r\n }\r\n return mesh;\r\n }\r\n case spine.AttachmentType.LinkedMesh: {\r\n var path = input.readStringRef();\r\n var color = input.readInt32();\r\n var skinName = input.readStringRef();\r\n var parent_4 = input.readStringRef();\r\n var inheritDeform = input.readBoolean();\r\n var width = 0, height = 0;\r\n if (nonessential) {\r\n width = input.readFloat();\r\n height = input.readFloat();\r\n }\r\n if (path == null)\r\n path = name;\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n spine.Color.rgba8888ToColor(mesh.color, color);\r\n if (nonessential) {\r\n mesh.width = width * scale;\r\n mesh.height = height * scale;\r\n }\r\n this.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent_4, inheritDeform));\r\n return mesh;\r\n }\r\n case spine.AttachmentType.Path: {\r\n var closed_1 = input.readBoolean();\r\n var constantSpeed = input.readBoolean();\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var lengths = spine.Utils.newArray(vertexCount / 3, 0);\r\n for (var i = 0, n = lengths.length; i < n; i++)\r\n lengths[i] = input.readFloat() * scale;\r\n var color = nonessential ? input.readInt32() : 0;\r\n var path = this.attachmentLoader.newPathAttachment(skin, name);\r\n if (path == null)\r\n return null;\r\n path.closed = closed_1;\r\n path.constantSpeed = constantSpeed;\r\n path.worldVerticesLength = vertexCount << 1;\r\n path.vertices = vertices.vertices;\r\n path.bones = vertices.bones;\r\n path.lengths = lengths;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(path.color, color);\r\n return path;\r\n }\r\n case spine.AttachmentType.Point: {\r\n var rotation = input.readFloat();\r\n var x = input.readFloat();\r\n var y = input.readFloat();\r\n var color = nonessential ? input.readInt32() : 0;\r\n var point = this.attachmentLoader.newPointAttachment(skin, name);\r\n if (point == null)\r\n return null;\r\n point.x = x * scale;\r\n point.y = y * scale;\r\n point.rotation = rotation;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(point.color, color);\r\n return point;\r\n }\r\n case spine.AttachmentType.Clipping: {\r\n var endSlotIndex = input.readInt(true);\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var color = nonessential ? input.readInt32() : 0;\r\n var clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n if (clip == null)\r\n return null;\r\n clip.endSlot = skeletonData.slots[endSlotIndex];\r\n clip.worldVerticesLength = vertexCount << 1;\r\n clip.vertices = vertices.vertices;\r\n clip.bones = vertices.bones;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(clip.color, color);\r\n return clip;\r\n }\r\n }\r\n return null;\r\n };\r\n SkeletonBinary.prototype.readVertices = function (input, vertexCount) {\r\n var verticesLength = vertexCount << 1;\r\n var vertices = new Vertices();\r\n var scale = this.scale;\r\n if (!input.readBoolean()) {\r\n vertices.vertices = this.readFloatArray(input, verticesLength, scale);\r\n return vertices;\r\n }\r\n var weights = new Array();\r\n var bonesArray = new Array();\r\n for (var i = 0; i < vertexCount; i++) {\r\n var boneCount = input.readInt(true);\r\n bonesArray.push(boneCount);\r\n for (var ii = 0; ii < boneCount; ii++) {\r\n bonesArray.push(input.readInt(true));\r\n weights.push(input.readFloat() * scale);\r\n weights.push(input.readFloat() * scale);\r\n weights.push(input.readFloat());\r\n }\r\n }\r\n vertices.vertices = spine.Utils.toFloatArray(weights);\r\n vertices.bones = bonesArray;\r\n return vertices;\r\n };\r\n SkeletonBinary.prototype.readFloatArray = function (input, n, scale) {\r\n var array = new Array(n);\r\n if (scale == 1) {\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readFloat();\r\n }\r\n else {\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readFloat() * scale;\r\n }\r\n return array;\r\n };\r\n SkeletonBinary.prototype.readShortArray = function (input) {\r\n var n = input.readInt(true);\r\n var array = new Array(n);\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readShort();\r\n return array;\r\n };\r\n SkeletonBinary.prototype.readAnimation = function (input, name, skeletonData) {\r\n var timelines = new Array();\r\n var scale = this.scale;\r\n var duration = 0;\r\n var tempColor1 = new spine.Color();\r\n var tempColor2 = new spine.Color();\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var slotIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.SLOT_ATTACHMENT: {\r\n var timeline = new spine.AttachmentTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++)\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readStringRef());\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[frameCount - 1]);\r\n break;\r\n }\r\n case SkeletonBinary.SLOT_COLOR: {\r\n var timeline = new spine.ColorTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n spine.Color.rgba8888ToColor(tempColor1, input.readInt32());\r\n timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.ColorTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.SLOT_TWO_COLOR: {\r\n var timeline = new spine.TwoColorTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n spine.Color.rgba8888ToColor(tempColor1, input.readInt32());\r\n spine.Color.rgb888ToColor(tempColor2, input.readInt32());\r\n timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a, tempColor2.r, tempColor2.g, tempColor2.b);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TwoColorTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var boneIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.BONE_ROTATE: {\r\n var timeline = new spine.RotateTimeline(frameCount);\r\n timeline.boneIndex = boneIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.RotateTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.BONE_TRANSLATE:\r\n case SkeletonBinary.BONE_SCALE:\r\n case SkeletonBinary.BONE_SHEAR: {\r\n var timeline = void 0;\r\n var timelineScale = 1;\r\n if (timelineType == SkeletonBinary.BONE_SCALE)\r\n timeline = new spine.ScaleTimeline(frameCount);\r\n else if (timelineType == SkeletonBinary.BONE_SHEAR)\r\n timeline = new spine.ShearTimeline(frameCount);\r\n else {\r\n timeline = new spine.TranslateTimeline(frameCount);\r\n timelineScale = scale;\r\n }\r\n timeline.boneIndex = boneIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale, input.readFloat() * timelineScale);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TranslateTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.IkConstraintTimeline(frameCount);\r\n timeline.ikConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat() * scale, input.readByte(), input.readBoolean(), input.readBoolean());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.IkConstraintTimeline.ENTRIES]);\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.TransformConstraintTimeline(frameCount);\r\n timeline.transformConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TransformConstraintTimeline.ENTRIES]);\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var data = skeletonData.pathConstraints[index];\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.PATH_POSITION:\r\n case SkeletonBinary.PATH_SPACING: {\r\n var timeline = void 0;\r\n var timelineScale = 1;\r\n if (timelineType == SkeletonBinary.PATH_SPACING) {\r\n timeline = new spine.PathConstraintSpacingTimeline(frameCount);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n else {\r\n timeline = new spine.PathConstraintPositionTimeline(frameCount);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n timeline.pathConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.PATH_MIX: {\r\n var timeline = new spine.PathConstraintMixTimeline(frameCount);\r\n timeline.pathConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var skin = skeletonData.skins[input.readInt(true)];\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var slotIndex = input.readInt(true);\r\n for (var iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\r\n var attachment = skin.getAttachment(slotIndex, input.readStringRef());\r\n var weighted = attachment.bones != null;\r\n var vertices = attachment.vertices;\r\n var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.DeformTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n timeline.attachment = attachment;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n var deform = void 0;\r\n var end = input.readInt(true);\r\n if (end == 0)\r\n deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\r\n else {\r\n deform = spine.Utils.newFloatArray(deformLength);\r\n var start = input.readInt(true);\r\n end += start;\r\n if (scale == 1) {\r\n for (var v = start; v < end; v++)\r\n deform[v] = input.readFloat();\r\n }\r\n else {\r\n for (var v = start; v < end; v++)\r\n deform[v] = input.readFloat() * scale;\r\n }\r\n if (!weighted) {\r\n for (var v = 0, vn = deform.length; v < vn; v++)\r\n deform[v] += vertices[v];\r\n }\r\n }\r\n timeline.setFrame(frameIndex, time, deform);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[frameCount - 1]);\r\n }\r\n }\r\n }\r\n var drawOrderCount = input.readInt(true);\r\n if (drawOrderCount > 0) {\r\n var timeline = new spine.DrawOrderTimeline(drawOrderCount);\r\n var slotCount = skeletonData.slots.length;\r\n for (var i = 0; i < drawOrderCount; i++) {\r\n var time = input.readFloat();\r\n var offsetCount = input.readInt(true);\r\n var drawOrder = spine.Utils.newArray(slotCount, 0);\r\n for (var ii = slotCount - 1; ii >= 0; ii--)\r\n drawOrder[ii] = -1;\r\n var unchanged = spine.Utils.newArray(slotCount - offsetCount, 0);\r\n var originalIndex = 0, unchangedIndex = 0;\r\n for (var ii = 0; ii < offsetCount; ii++) {\r\n var slotIndex = input.readInt(true);\r\n while (originalIndex != slotIndex)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n drawOrder[originalIndex + input.readInt(true)] = originalIndex++;\r\n }\r\n while (originalIndex < slotCount)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n for (var ii = slotCount - 1; ii >= 0; ii--)\r\n if (drawOrder[ii] == -1)\r\n drawOrder[ii] = unchanged[--unchangedIndex];\r\n timeline.setFrame(i, time, drawOrder);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[drawOrderCount - 1]);\r\n }\r\n var eventCount = input.readInt(true);\r\n if (eventCount > 0) {\r\n var timeline = new spine.EventTimeline(eventCount);\r\n for (var i = 0; i < eventCount; i++) {\r\n var time = input.readFloat();\r\n var eventData = skeletonData.events[input.readInt(true)];\r\n var event_4 = new spine.Event(time, eventData);\r\n event_4.intValue = input.readInt(false);\r\n event_4.floatValue = input.readFloat();\r\n event_4.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\r\n if (event_4.data.audioPath != null) {\r\n event_4.volume = input.readFloat();\r\n event_4.balance = input.readFloat();\r\n }\r\n timeline.setFrame(i, event_4);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[eventCount - 1]);\r\n }\r\n return new spine.Animation(name, timelines, duration);\r\n };\r\n SkeletonBinary.prototype.readCurve = function (input, frameIndex, timeline) {\r\n switch (input.readByte()) {\r\n case SkeletonBinary.CURVE_STEPPED:\r\n timeline.setStepped(frameIndex);\r\n break;\r\n case SkeletonBinary.CURVE_BEZIER:\r\n this.setCurve(timeline, frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\r\n break;\r\n }\r\n };\r\n SkeletonBinary.prototype.setCurve = function (timeline, frameIndex, cx1, cy1, cx2, cy2) {\r\n timeline.setCurve(frameIndex, cx1, cy1, cx2, cy2);\r\n };\r\n SkeletonBinary.AttachmentTypeValues = [0, 1, 2, 3, 4, 5, 6];\r\n SkeletonBinary.TransformModeValues = [spine.TransformMode.Normal, spine.TransformMode.OnlyTranslation, spine.TransformMode.NoRotationOrReflection, spine.TransformMode.NoScale, spine.TransformMode.NoScaleOrReflection];\r\n SkeletonBinary.PositionModeValues = [spine.PositionMode.Fixed, spine.PositionMode.Percent];\r\n SkeletonBinary.SpacingModeValues = [spine.SpacingMode.Length, spine.SpacingMode.Fixed, spine.SpacingMode.Percent];\r\n SkeletonBinary.RotateModeValues = [spine.RotateMode.Tangent, spine.RotateMode.Chain, spine.RotateMode.ChainScale];\r\n SkeletonBinary.BlendModeValues = [spine.BlendMode.Normal, spine.BlendMode.Additive, spine.BlendMode.Multiply, spine.BlendMode.Screen];\r\n SkeletonBinary.BONE_ROTATE = 0;\r\n SkeletonBinary.BONE_TRANSLATE = 1;\r\n SkeletonBinary.BONE_SCALE = 2;\r\n SkeletonBinary.BONE_SHEAR = 3;\r\n SkeletonBinary.SLOT_ATTACHMENT = 0;\r\n SkeletonBinary.SLOT_COLOR = 1;\r\n SkeletonBinary.SLOT_TWO_COLOR = 2;\r\n SkeletonBinary.PATH_POSITION = 0;\r\n SkeletonBinary.PATH_SPACING = 1;\r\n SkeletonBinary.PATH_MIX = 2;\r\n SkeletonBinary.CURVE_LINEAR = 0;\r\n SkeletonBinary.CURVE_STEPPED = 1;\r\n SkeletonBinary.CURVE_BEZIER = 2;\r\n return SkeletonBinary;\r\n }());\r\n spine.SkeletonBinary = SkeletonBinary;\r\n var BinaryInput = (function () {\r\n function BinaryInput(data, strings, index, buffer) {\r\n if (strings === void 0) { strings = new Array(); }\r\n if (index === void 0) { index = 0; }\r\n if (buffer === void 0) { buffer = new DataView(data.buffer); }\r\n this.strings = strings;\r\n this.index = index;\r\n this.buffer = buffer;\r\n }\r\n BinaryInput.prototype.readByte = function () {\r\n return this.buffer.getInt8(this.index++);\r\n };\r\n BinaryInput.prototype.readShort = function () {\r\n var value = this.buffer.getInt16(this.index);\r\n this.index += 2;\r\n return value;\r\n };\r\n BinaryInput.prototype.readInt32 = function () {\r\n var value = this.buffer.getInt32(this.index);\r\n this.index += 4;\r\n return value;\r\n };\r\n BinaryInput.prototype.readInt = function (optimizePositive) {\r\n var b = this.readByte();\r\n var result = b & 0x7F;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 7;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 14;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 21;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 28;\r\n }\r\n }\r\n }\r\n }\r\n return optimizePositive ? result : ((result >>> 1) ^ -(result & 1));\r\n };\r\n BinaryInput.prototype.readStringRef = function () {\r\n var index = this.readInt(true);\r\n return index == 0 ? null : this.strings[index - 1];\r\n };\r\n BinaryInput.prototype.readString = function () {\r\n var byteCount = this.readInt(true);\r\n switch (byteCount) {\r\n case 0:\r\n return null;\r\n case 1:\r\n return \"\";\r\n }\r\n byteCount--;\r\n var chars = \"\";\r\n var charCount = 0;\r\n for (var i = 0; i < byteCount;) {\r\n var b = this.readByte();\r\n switch (b >> 4) {\r\n case 12:\r\n case 13:\r\n chars += String.fromCharCode(((b & 0x1F) << 6 | this.readByte() & 0x3F));\r\n i += 2;\r\n break;\r\n case 14:\r\n chars += String.fromCharCode(((b & 0x0F) << 12 | (this.readByte() & 0x3F) << 6 | this.readByte() & 0x3F));\r\n i += 3;\r\n break;\r\n default:\r\n chars += String.fromCharCode(b);\r\n i++;\r\n }\r\n }\r\n return chars;\r\n };\r\n BinaryInput.prototype.readFloat = function () {\r\n var value = this.buffer.getFloat32(this.index);\r\n this.index += 4;\r\n return value;\r\n };\r\n BinaryInput.prototype.readBoolean = function () {\r\n return this.readByte() != 0;\r\n };\r\n return BinaryInput;\r\n }());\r\n var LinkedMesh = (function () {\r\n function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\r\n this.mesh = mesh;\r\n this.skin = skin;\r\n this.slotIndex = slotIndex;\r\n this.parent = parent;\r\n this.inheritDeform = inheritDeform;\r\n }\r\n return LinkedMesh;\r\n }());\r\n var Vertices = (function () {\r\n function Vertices(bones, vertices) {\r\n if (bones === void 0) { bones = null; }\r\n if (vertices === void 0) { vertices = null; }\r\n this.bones = bones;\r\n this.vertices = vertices;\r\n }\r\n return Vertices;\r\n }());\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonBounds = (function () {\r\n function SkeletonBounds() {\r\n this.minX = 0;\r\n this.minY = 0;\r\n this.maxX = 0;\r\n this.maxY = 0;\r\n this.boundingBoxes = new Array();\r\n this.polygons = new Array();\r\n this.polygonPool = new spine.Pool(function () {\r\n return spine.Utils.newFloatArray(16);\r\n });\r\n }\r\n SkeletonBounds.prototype.update = function (skeleton, updateAabb) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n var boundingBoxes = this.boundingBoxes;\r\n var polygons = this.polygons;\r\n var polygonPool = this.polygonPool;\r\n var slots = skeleton.slots;\r\n var slotCount = slots.length;\r\n boundingBoxes.length = 0;\r\n polygonPool.freeAll(polygons);\r\n polygons.length = 0;\r\n for (var i = 0; i < slotCount; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.BoundingBoxAttachment) {\r\n var boundingBox = attachment;\r\n boundingBoxes.push(boundingBox);\r\n var polygon = polygonPool.obtain();\r\n if (polygon.length != boundingBox.worldVerticesLength) {\r\n polygon = spine.Utils.newFloatArray(boundingBox.worldVerticesLength);\r\n }\r\n polygons.push(polygon);\r\n boundingBox.computeWorldVertices(slot, 0, boundingBox.worldVerticesLength, polygon, 0, 2);\r\n }\r\n }\r\n if (updateAabb) {\r\n this.aabbCompute();\r\n }\r\n else {\r\n this.minX = Number.POSITIVE_INFINITY;\r\n this.minY = Number.POSITIVE_INFINITY;\r\n this.maxX = Number.NEGATIVE_INFINITY;\r\n this.maxY = Number.NEGATIVE_INFINITY;\r\n }\r\n };\r\n SkeletonBounds.prototype.aabbCompute = function () {\r\n var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++) {\r\n var polygon = polygons[i];\r\n var vertices = polygon;\r\n for (var ii = 0, nn = polygon.length; ii < nn; ii += 2) {\r\n var x = vertices[ii];\r\n var y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n this.minX = minX;\r\n this.minY = minY;\r\n this.maxX = maxX;\r\n this.maxY = maxY;\r\n };\r\n SkeletonBounds.prototype.aabbContainsPoint = function (x, y) {\r\n return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\r\n };\r\n SkeletonBounds.prototype.aabbIntersectsSegment = function (x1, y1, x2, y2) {\r\n var minX = this.minX;\r\n var minY = this.minY;\r\n var maxX = this.maxX;\r\n var maxY = this.maxY;\r\n if ((x1 <= minX && x2 <= minX) || (y1 <= minY && y2 <= minY) || (x1 >= maxX && x2 >= maxX) || (y1 >= maxY && y2 >= maxY))\r\n return false;\r\n var m = (y2 - y1) / (x2 - x1);\r\n var y = m * (minX - x1) + y1;\r\n if (y > minY && y < maxY)\r\n return true;\r\n y = m * (maxX - x1) + y1;\r\n if (y > minY && y < maxY)\r\n return true;\r\n var x = (minY - y1) / m + x1;\r\n if (x > minX && x < maxX)\r\n return true;\r\n x = (maxY - y1) / m + x1;\r\n if (x > minX && x < maxX)\r\n return true;\r\n return false;\r\n };\r\n SkeletonBounds.prototype.aabbIntersectsSkeleton = function (bounds) {\r\n return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\r\n };\r\n SkeletonBounds.prototype.containsPoint = function (x, y) {\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++)\r\n if (this.containsPointPolygon(polygons[i], x, y))\r\n return this.boundingBoxes[i];\r\n return null;\r\n };\r\n SkeletonBounds.prototype.containsPointPolygon = function (polygon, x, y) {\r\n var vertices = polygon;\r\n var nn = polygon.length;\r\n var prevIndex = nn - 2;\r\n var inside = false;\r\n for (var ii = 0; ii < nn; ii += 2) {\r\n var vertexY = vertices[ii + 1];\r\n var prevY = vertices[prevIndex + 1];\r\n if ((vertexY < y && prevY >= y) || (prevY < y && vertexY >= y)) {\r\n var vertexX = vertices[ii];\r\n if (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x)\r\n inside = !inside;\r\n }\r\n prevIndex = ii;\r\n }\r\n return inside;\r\n };\r\n SkeletonBounds.prototype.intersectsSegment = function (x1, y1, x2, y2) {\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++)\r\n if (this.intersectsSegmentPolygon(polygons[i], x1, y1, x2, y2))\r\n return this.boundingBoxes[i];\r\n return null;\r\n };\r\n SkeletonBounds.prototype.intersectsSegmentPolygon = function (polygon, x1, y1, x2, y2) {\r\n var vertices = polygon;\r\n var nn = polygon.length;\r\n var width12 = x1 - x2, height12 = y1 - y2;\r\n var det1 = x1 * y2 - y1 * x2;\r\n var x3 = vertices[nn - 2], y3 = vertices[nn - 1];\r\n for (var ii = 0; ii < nn; ii += 2) {\r\n var x4 = vertices[ii], y4 = vertices[ii + 1];\r\n var det2 = x3 * y4 - y3 * x4;\r\n var width34 = x3 - x4, height34 = y3 - y4;\r\n var det3 = width12 * height34 - height12 * width34;\r\n var x = (det1 * width34 - width12 * det2) / det3;\r\n if (((x >= x3 && x <= x4) || (x >= x4 && x <= x3)) && ((x >= x1 && x <= x2) || (x >= x2 && x <= x1))) {\r\n var y = (det1 * height34 - height12 * det2) / det3;\r\n if (((y >= y3 && y <= y4) || (y >= y4 && y <= y3)) && ((y >= y1 && y <= y2) || (y >= y2 && y <= y1)))\r\n return true;\r\n }\r\n x3 = x4;\r\n y3 = y4;\r\n }\r\n return false;\r\n };\r\n SkeletonBounds.prototype.getPolygon = function (boundingBox) {\r\n if (boundingBox == null)\r\n throw new Error(\"boundingBox cannot be null.\");\r\n var index = this.boundingBoxes.indexOf(boundingBox);\r\n return index == -1 ? null : this.polygons[index];\r\n };\r\n SkeletonBounds.prototype.getWidth = function () {\r\n return this.maxX - this.minX;\r\n };\r\n SkeletonBounds.prototype.getHeight = function () {\r\n return this.maxY - this.minY;\r\n };\r\n return SkeletonBounds;\r\n }());\r\n spine.SkeletonBounds = SkeletonBounds;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonClipping = (function () {\r\n function SkeletonClipping() {\r\n this.triangulator = new spine.Triangulator();\r\n this.clippingPolygon = new Array();\r\n this.clipOutput = new Array();\r\n this.clippedVertices = new Array();\r\n this.clippedTriangles = new Array();\r\n this.scratch = new Array();\r\n }\r\n SkeletonClipping.prototype.clipStart = function (slot, clip) {\r\n if (this.clipAttachment != null)\r\n return 0;\r\n this.clipAttachment = clip;\r\n var n = clip.worldVerticesLength;\r\n var vertices = spine.Utils.setArraySize(this.clippingPolygon, n);\r\n clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\r\n var clippingPolygon = this.clippingPolygon;\r\n SkeletonClipping.makeClockwise(clippingPolygon);\r\n var clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon));\r\n for (var i = 0, n_2 = clippingPolygons.length; i < n_2; i++) {\r\n var polygon = clippingPolygons[i];\r\n SkeletonClipping.makeClockwise(polygon);\r\n polygon.push(polygon[0]);\r\n polygon.push(polygon[1]);\r\n }\r\n return clippingPolygons.length;\r\n };\r\n SkeletonClipping.prototype.clipEndWithSlot = function (slot) {\r\n if (this.clipAttachment != null && this.clipAttachment.endSlot == slot.data)\r\n this.clipEnd();\r\n };\r\n SkeletonClipping.prototype.clipEnd = function () {\r\n if (this.clipAttachment == null)\r\n return;\r\n this.clipAttachment = null;\r\n this.clippingPolygons = null;\r\n this.clippedVertices.length = 0;\r\n this.clippedTriangles.length = 0;\r\n this.clippingPolygon.length = 0;\r\n };\r\n SkeletonClipping.prototype.isClipping = function () {\r\n return this.clipAttachment != null;\r\n };\r\n SkeletonClipping.prototype.clipTriangles = function (vertices, verticesLength, triangles, trianglesLength, uvs, light, dark, twoColor) {\r\n var clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;\r\n var clippedTriangles = this.clippedTriangles;\r\n var polygons = this.clippingPolygons;\r\n var polygonsCount = this.clippingPolygons.length;\r\n var vertexSize = twoColor ? 12 : 8;\r\n var index = 0;\r\n clippedVertices.length = 0;\r\n clippedTriangles.length = 0;\r\n outer: for (var i = 0; i < trianglesLength; i += 3) {\r\n var vertexOffset = triangles[i] << 1;\r\n var x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\r\n var u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];\r\n vertexOffset = triangles[i + 1] << 1;\r\n var x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\r\n var u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];\r\n vertexOffset = triangles[i + 2] << 1;\r\n var x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\r\n var u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];\r\n for (var p = 0; p < polygonsCount; p++) {\r\n var s = clippedVertices.length;\r\n if (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) {\r\n var clipOutputLength = clipOutput.length;\r\n if (clipOutputLength == 0)\r\n continue;\r\n var d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\r\n var d = 1 / (d0 * d2 + d1 * (y1 - y3));\r\n var clipOutputCount = clipOutputLength >> 1;\r\n var clipOutputItems = this.clipOutput;\r\n var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);\r\n for (var ii = 0; ii < clipOutputLength; ii += 2) {\r\n var x = clipOutputItems[ii], y = clipOutputItems[ii + 1];\r\n clippedVerticesItems[s] = x;\r\n clippedVerticesItems[s + 1] = y;\r\n clippedVerticesItems[s + 2] = light.r;\r\n clippedVerticesItems[s + 3] = light.g;\r\n clippedVerticesItems[s + 4] = light.b;\r\n clippedVerticesItems[s + 5] = light.a;\r\n var c0 = x - x3, c1 = y - y3;\r\n var a = (d0 * c0 + d1 * c1) * d;\r\n var b = (d4 * c0 + d2 * c1) * d;\r\n var c = 1 - a - b;\r\n clippedVerticesItems[s + 6] = u1 * a + u2 * b + u3 * c;\r\n clippedVerticesItems[s + 7] = v1 * a + v2 * b + v3 * c;\r\n if (twoColor) {\r\n clippedVerticesItems[s + 8] = dark.r;\r\n clippedVerticesItems[s + 9] = dark.g;\r\n clippedVerticesItems[s + 10] = dark.b;\r\n clippedVerticesItems[s + 11] = dark.a;\r\n }\r\n s += vertexSize;\r\n }\r\n s = clippedTriangles.length;\r\n var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));\r\n clipOutputCount--;\r\n for (var ii = 1; ii < clipOutputCount; ii++) {\r\n clippedTrianglesItems[s] = index;\r\n clippedTrianglesItems[s + 1] = (index + ii);\r\n clippedTrianglesItems[s + 2] = (index + ii + 1);\r\n s += 3;\r\n }\r\n index += clipOutputCount + 1;\r\n }\r\n else {\r\n var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + 3 * vertexSize);\r\n clippedVerticesItems[s] = x1;\r\n clippedVerticesItems[s + 1] = y1;\r\n clippedVerticesItems[s + 2] = light.r;\r\n clippedVerticesItems[s + 3] = light.g;\r\n clippedVerticesItems[s + 4] = light.b;\r\n clippedVerticesItems[s + 5] = light.a;\r\n if (!twoColor) {\r\n clippedVerticesItems[s + 6] = u1;\r\n clippedVerticesItems[s + 7] = v1;\r\n clippedVerticesItems[s + 8] = x2;\r\n clippedVerticesItems[s + 9] = y2;\r\n clippedVerticesItems[s + 10] = light.r;\r\n clippedVerticesItems[s + 11] = light.g;\r\n clippedVerticesItems[s + 12] = light.b;\r\n clippedVerticesItems[s + 13] = light.a;\r\n clippedVerticesItems[s + 14] = u2;\r\n clippedVerticesItems[s + 15] = v2;\r\n clippedVerticesItems[s + 16] = x3;\r\n clippedVerticesItems[s + 17] = y3;\r\n clippedVerticesItems[s + 18] = light.r;\r\n clippedVerticesItems[s + 19] = light.g;\r\n clippedVerticesItems[s + 20] = light.b;\r\n clippedVerticesItems[s + 21] = light.a;\r\n clippedVerticesItems[s + 22] = u3;\r\n clippedVerticesItems[s + 23] = v3;\r\n }\r\n else {\r\n clippedVerticesItems[s + 6] = u1;\r\n clippedVerticesItems[s + 7] = v1;\r\n clippedVerticesItems[s + 8] = dark.r;\r\n clippedVerticesItems[s + 9] = dark.g;\r\n clippedVerticesItems[s + 10] = dark.b;\r\n clippedVerticesItems[s + 11] = dark.a;\r\n clippedVerticesItems[s + 12] = x2;\r\n clippedVerticesItems[s + 13] = y2;\r\n clippedVerticesItems[s + 14] = light.r;\r\n clippedVerticesItems[s + 15] = light.g;\r\n clippedVerticesItems[s + 16] = light.b;\r\n clippedVerticesItems[s + 17] = light.a;\r\n clippedVerticesItems[s + 18] = u2;\r\n clippedVerticesItems[s + 19] = v2;\r\n clippedVerticesItems[s + 20] = dark.r;\r\n clippedVerticesItems[s + 21] = dark.g;\r\n clippedVerticesItems[s + 22] = dark.b;\r\n clippedVerticesItems[s + 23] = dark.a;\r\n clippedVerticesItems[s + 24] = x3;\r\n clippedVerticesItems[s + 25] = y3;\r\n clippedVerticesItems[s + 26] = light.r;\r\n clippedVerticesItems[s + 27] = light.g;\r\n clippedVerticesItems[s + 28] = light.b;\r\n clippedVerticesItems[s + 29] = light.a;\r\n clippedVerticesItems[s + 30] = u3;\r\n clippedVerticesItems[s + 31] = v3;\r\n clippedVerticesItems[s + 32] = dark.r;\r\n clippedVerticesItems[s + 33] = dark.g;\r\n clippedVerticesItems[s + 34] = dark.b;\r\n clippedVerticesItems[s + 35] = dark.a;\r\n }\r\n s = clippedTriangles.length;\r\n var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3);\r\n clippedTrianglesItems[s] = index;\r\n clippedTrianglesItems[s + 1] = (index + 1);\r\n clippedTrianglesItems[s + 2] = (index + 2);\r\n index += 3;\r\n continue outer;\r\n }\r\n }\r\n }\r\n };\r\n SkeletonClipping.prototype.clip = function (x1, y1, x2, y2, x3, y3, clippingArea, output) {\r\n var originalOutput = output;\r\n var clipped = false;\r\n var input = null;\r\n if (clippingArea.length % 4 >= 2) {\r\n input = output;\r\n output = this.scratch;\r\n }\r\n else\r\n input = this.scratch;\r\n input.length = 0;\r\n input.push(x1);\r\n input.push(y1);\r\n input.push(x2);\r\n input.push(y2);\r\n input.push(x3);\r\n input.push(y3);\r\n input.push(x1);\r\n input.push(y1);\r\n output.length = 0;\r\n var clippingVertices = clippingArea;\r\n var clippingVerticesLast = clippingArea.length - 4;\r\n for (var i = 0;; i += 2) {\r\n var edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\r\n var edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];\r\n var deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;\r\n var inputVertices = input;\r\n var inputVerticesLength = input.length - 2, outputStart = output.length;\r\n for (var ii = 0; ii < inputVerticesLength; ii += 2) {\r\n var inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\r\n var inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];\r\n var side2 = deltaX * (inputY2 - edgeY2) - deltaY * (inputX2 - edgeX2) > 0;\r\n if (deltaX * (inputY - edgeY2) - deltaY * (inputX - edgeX2) > 0) {\r\n if (side2) {\r\n output.push(inputX2);\r\n output.push(inputY2);\r\n continue;\r\n }\r\n var c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n var s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\r\n if (Math.abs(s) > 0.000001) {\r\n var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\r\n output.push(edgeX + (edgeX2 - edgeX) * ua);\r\n output.push(edgeY + (edgeY2 - edgeY) * ua);\r\n }\r\n else {\r\n output.push(edgeX);\r\n output.push(edgeY);\r\n }\r\n }\r\n else if (side2) {\r\n var c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n var s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\r\n if (Math.abs(s) > 0.000001) {\r\n var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\r\n output.push(edgeX + (edgeX2 - edgeX) * ua);\r\n output.push(edgeY + (edgeY2 - edgeY) * ua);\r\n }\r\n else {\r\n output.push(edgeX);\r\n output.push(edgeY);\r\n }\r\n output.push(inputX2);\r\n output.push(inputY2);\r\n }\r\n clipped = true;\r\n }\r\n if (outputStart == output.length) {\r\n originalOutput.length = 0;\r\n return true;\r\n }\r\n output.push(output[0]);\r\n output.push(output[1]);\r\n if (i == clippingVerticesLast)\r\n break;\r\n var temp = output;\r\n output = input;\r\n output.length = 0;\r\n input = temp;\r\n }\r\n if (originalOutput != output) {\r\n originalOutput.length = 0;\r\n for (var i = 0, n = output.length - 2; i < n; i++)\r\n originalOutput[i] = output[i];\r\n }\r\n else\r\n originalOutput.length = originalOutput.length - 2;\r\n return clipped;\r\n };\r\n SkeletonClipping.makeClockwise = function (polygon) {\r\n var vertices = polygon;\r\n var verticeslength = polygon.length;\r\n var area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0;\r\n for (var i = 0, n = verticeslength - 3; i < n; i += 2) {\r\n p1x = vertices[i];\r\n p1y = vertices[i + 1];\r\n p2x = vertices[i + 2];\r\n p2y = vertices[i + 3];\r\n area += p1x * p2y - p2x * p1y;\r\n }\r\n if (area < 0)\r\n return;\r\n for (var i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\r\n var x = vertices[i], y = vertices[i + 1];\r\n var other = lastX - i;\r\n vertices[i] = vertices[other];\r\n vertices[i + 1] = vertices[other + 1];\r\n vertices[other] = x;\r\n vertices[other + 1] = y;\r\n }\r\n };\r\n return SkeletonClipping;\r\n }());\r\n spine.SkeletonClipping = SkeletonClipping;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonData = (function () {\r\n function SkeletonData() {\r\n this.bones = new Array();\r\n this.slots = new Array();\r\n this.skins = new Array();\r\n this.events = new Array();\r\n this.animations = new Array();\r\n this.ikConstraints = new Array();\r\n this.transformConstraints = new Array();\r\n this.pathConstraints = new Array();\r\n this.fps = 0;\r\n }\r\n SkeletonData.prototype.findBone = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (bone.name == boneName)\r\n return bone;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findBoneIndex = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n if (bones[i].name == boneName)\r\n return i;\r\n return -1;\r\n };\r\n SkeletonData.prototype.findSlot = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.name == slotName)\r\n return slot;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findSlotIndex = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n if (slots[i].name == slotName)\r\n return i;\r\n return -1;\r\n };\r\n SkeletonData.prototype.findSkin = function (skinName) {\r\n if (skinName == null)\r\n throw new Error(\"skinName cannot be null.\");\r\n var skins = this.skins;\r\n for (var i = 0, n = skins.length; i < n; i++) {\r\n var skin = skins[i];\r\n if (skin.name == skinName)\r\n return skin;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findEvent = function (eventDataName) {\r\n if (eventDataName == null)\r\n throw new Error(\"eventDataName cannot be null.\");\r\n var events = this.events;\r\n for (var i = 0, n = events.length; i < n; i++) {\r\n var event_5 = events[i];\r\n if (event_5.name == eventDataName)\r\n return event_5;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findAnimation = function (animationName) {\r\n if (animationName == null)\r\n throw new Error(\"animationName cannot be null.\");\r\n var animations = this.animations;\r\n for (var i = 0, n = animations.length; i < n; i++) {\r\n var animation = animations[i];\r\n if (animation.name == animationName)\r\n return animation;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findIkConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var constraint = ikConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findTransformConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findPathConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findPathConstraintIndex = function (pathConstraintName) {\r\n if (pathConstraintName == null)\r\n throw new Error(\"pathConstraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++)\r\n if (pathConstraints[i].name == pathConstraintName)\r\n return i;\r\n return -1;\r\n };\r\n return SkeletonData;\r\n }());\r\n spine.SkeletonData = SkeletonData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonJson = (function () {\r\n function SkeletonJson(attachmentLoader) {\r\n this.scale = 1;\r\n this.linkedMeshes = new Array();\r\n this.attachmentLoader = attachmentLoader;\r\n }\r\n SkeletonJson.prototype.readSkeletonData = function (json) {\r\n var scale = this.scale;\r\n var skeletonData = new spine.SkeletonData();\r\n var root = typeof (json) === \"string\" ? JSON.parse(json) : json;\r\n var skeletonMap = root.skeleton;\r\n if (skeletonMap != null) {\r\n skeletonData.hash = skeletonMap.hash;\r\n skeletonData.version = skeletonMap.spine;\r\n if (\"3.8.75\" == skeletonData.version)\r\n throw new Error(\"Unsupported skeleton data, please export with a newer version of Spine.\");\r\n skeletonData.x = skeletonMap.x;\r\n skeletonData.y = skeletonMap.y;\r\n skeletonData.width = skeletonMap.width;\r\n skeletonData.height = skeletonMap.height;\r\n skeletonData.fps = skeletonMap.fps;\r\n skeletonData.imagesPath = skeletonMap.images;\r\n }\r\n if (root.bones) {\r\n for (var i = 0; i < root.bones.length; i++) {\r\n var boneMap = root.bones[i];\r\n var parent_5 = null;\r\n var parentName = this.getValue(boneMap, \"parent\", null);\r\n if (parentName != null) {\r\n parent_5 = skeletonData.findBone(parentName);\r\n if (parent_5 == null)\r\n throw new Error(\"Parent bone not found: \" + parentName);\r\n }\r\n var data = new spine.BoneData(skeletonData.bones.length, boneMap.name, parent_5);\r\n data.length = this.getValue(boneMap, \"length\", 0) * scale;\r\n data.x = this.getValue(boneMap, \"x\", 0) * scale;\r\n data.y = this.getValue(boneMap, \"y\", 0) * scale;\r\n data.rotation = this.getValue(boneMap, \"rotation\", 0);\r\n data.scaleX = this.getValue(boneMap, \"scaleX\", 1);\r\n data.scaleY = this.getValue(boneMap, \"scaleY\", 1);\r\n data.shearX = this.getValue(boneMap, \"shearX\", 0);\r\n data.shearY = this.getValue(boneMap, \"shearY\", 0);\r\n data.transformMode = SkeletonJson.transformModeFromString(this.getValue(boneMap, \"transform\", \"normal\"));\r\n data.skinRequired = this.getValue(boneMap, \"skin\", false);\r\n skeletonData.bones.push(data);\r\n }\r\n }\r\n if (root.slots) {\r\n for (var i = 0; i < root.slots.length; i++) {\r\n var slotMap = root.slots[i];\r\n var slotName = slotMap.name;\r\n var boneName = slotMap.bone;\r\n var boneData = skeletonData.findBone(boneName);\r\n if (boneData == null)\r\n throw new Error(\"Slot bone not found: \" + boneName);\r\n var data = new spine.SlotData(skeletonData.slots.length, slotName, boneData);\r\n var color = this.getValue(slotMap, \"color\", null);\r\n if (color != null)\r\n data.color.setFromString(color);\r\n var dark = this.getValue(slotMap, \"dark\", null);\r\n if (dark != null) {\r\n data.darkColor = new spine.Color(1, 1, 1, 1);\r\n data.darkColor.setFromString(dark);\r\n }\r\n data.attachmentName = this.getValue(slotMap, \"attachment\", null);\r\n data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, \"blend\", \"normal\"));\r\n skeletonData.slots.push(data);\r\n }\r\n }\r\n if (root.ik) {\r\n for (var i = 0; i < root.ik.length; i++) {\r\n var constraintMap = root.ik[i];\r\n var data = new spine.IkConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"IK bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findBone(targetName);\r\n if (data.target == null)\r\n throw new Error(\"IK target bone not found: \" + targetName);\r\n data.mix = this.getValue(constraintMap, \"mix\", 1);\r\n data.softness = this.getValue(constraintMap, \"softness\", 0) * scale;\r\n data.bendDirection = this.getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\r\n data.compress = this.getValue(constraintMap, \"compress\", false);\r\n data.stretch = this.getValue(constraintMap, \"stretch\", false);\r\n data.uniform = this.getValue(constraintMap, \"uniform\", false);\r\n skeletonData.ikConstraints.push(data);\r\n }\r\n }\r\n if (root.transform) {\r\n for (var i = 0; i < root.transform.length; i++) {\r\n var constraintMap = root.transform[i];\r\n var data = new spine.TransformConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"Transform constraint bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findBone(targetName);\r\n if (data.target == null)\r\n throw new Error(\"Transform constraint target bone not found: \" + targetName);\r\n data.local = this.getValue(constraintMap, \"local\", false);\r\n data.relative = this.getValue(constraintMap, \"relative\", false);\r\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\r\n data.offsetX = this.getValue(constraintMap, \"x\", 0) * scale;\r\n data.offsetY = this.getValue(constraintMap, \"y\", 0) * scale;\r\n data.offsetScaleX = this.getValue(constraintMap, \"scaleX\", 0);\r\n data.offsetScaleY = this.getValue(constraintMap, \"scaleY\", 0);\r\n data.offsetShearY = this.getValue(constraintMap, \"shearY\", 0);\r\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\r\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\r\n data.scaleMix = this.getValue(constraintMap, \"scaleMix\", 1);\r\n data.shearMix = this.getValue(constraintMap, \"shearMix\", 1);\r\n skeletonData.transformConstraints.push(data);\r\n }\r\n }\r\n if (root.path) {\r\n for (var i = 0; i < root.path.length; i++) {\r\n var constraintMap = root.path[i];\r\n var data = new spine.PathConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"Transform constraint bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findSlot(targetName);\r\n if (data.target == null)\r\n throw new Error(\"Path target slot not found: \" + targetName);\r\n data.positionMode = SkeletonJson.positionModeFromString(this.getValue(constraintMap, \"positionMode\", \"percent\"));\r\n data.spacingMode = SkeletonJson.spacingModeFromString(this.getValue(constraintMap, \"spacingMode\", \"length\"));\r\n data.rotateMode = SkeletonJson.rotateModeFromString(this.getValue(constraintMap, \"rotateMode\", \"tangent\"));\r\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\r\n data.position = this.getValue(constraintMap, \"position\", 0);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n data.position *= scale;\r\n data.spacing = this.getValue(constraintMap, \"spacing\", 0);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n data.spacing *= scale;\r\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\r\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\r\n skeletonData.pathConstraints.push(data);\r\n }\r\n }\r\n if (root.skins) {\r\n for (var i = 0; i < root.skins.length; i++) {\r\n var skinMap = root.skins[i];\r\n var skin = new spine.Skin(skinMap.name);\r\n if (skinMap.bones) {\r\n for (var ii = 0; ii < skinMap.bones.length; ii++) {\r\n var bone = skeletonData.findBone(skinMap.bones[ii]);\r\n if (bone == null)\r\n throw new Error(\"Skin bone not found: \" + skinMap.bones[i]);\r\n skin.bones.push(bone);\r\n }\r\n }\r\n if (skinMap.ik) {\r\n for (var ii = 0; ii < skinMap.ik.length; ii++) {\r\n var constraint = skeletonData.findIkConstraint(skinMap.ik[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin IK constraint not found: \" + skinMap.ik[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n if (skinMap.transform) {\r\n for (var ii = 0; ii < skinMap.transform.length; ii++) {\r\n var constraint = skeletonData.findTransformConstraint(skinMap.transform[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin transform constraint not found: \" + skinMap.transform[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n if (skinMap.path) {\r\n for (var ii = 0; ii < skinMap.path.length; ii++) {\r\n var constraint = skeletonData.findPathConstraint(skinMap.path[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin path constraint not found: \" + skinMap.path[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n for (var slotName in skinMap.attachments) {\r\n var slot = skeletonData.findSlot(slotName);\r\n if (slot == null)\r\n throw new Error(\"Slot not found: \" + slotName);\r\n var slotMap = skinMap.attachments[slotName];\r\n for (var entryName in slotMap) {\r\n var attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\r\n if (attachment != null)\r\n skin.setAttachment(slot.index, entryName, attachment);\r\n }\r\n }\r\n skeletonData.skins.push(skin);\r\n if (skin.name == \"default\")\r\n skeletonData.defaultSkin = skin;\r\n }\r\n }\r\n for (var i = 0, n = this.linkedMeshes.length; i < n; i++) {\r\n var linkedMesh = this.linkedMeshes[i];\r\n var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + linkedMesh.skin);\r\n var parent_6 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n if (parent_6 == null)\r\n throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\r\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_6 : linkedMesh.mesh;\r\n linkedMesh.mesh.setParentMesh(parent_6);\r\n linkedMesh.mesh.updateUVs();\r\n }\r\n this.linkedMeshes.length = 0;\r\n if (root.events) {\r\n for (var eventName in root.events) {\r\n var eventMap = root.events[eventName];\r\n var data = new spine.EventData(eventName);\r\n data.intValue = this.getValue(eventMap, \"int\", 0);\r\n data.floatValue = this.getValue(eventMap, \"float\", 0);\r\n data.stringValue = this.getValue(eventMap, \"string\", \"\");\r\n data.audioPath = this.getValue(eventMap, \"audio\", null);\r\n if (data.audioPath != null) {\r\n data.volume = this.getValue(eventMap, \"volume\", 1);\r\n data.balance = this.getValue(eventMap, \"balance\", 0);\r\n }\r\n skeletonData.events.push(data);\r\n }\r\n }\r\n if (root.animations) {\r\n for (var animationName in root.animations) {\r\n var animationMap = root.animations[animationName];\r\n this.readAnimation(animationMap, animationName, skeletonData);\r\n }\r\n }\r\n return skeletonData;\r\n };\r\n SkeletonJson.prototype.readAttachment = function (map, skin, slotIndex, name, skeletonData) {\r\n var scale = this.scale;\r\n name = this.getValue(map, \"name\", name);\r\n var type = this.getValue(map, \"type\", \"region\");\r\n switch (type) {\r\n case \"region\": {\r\n var path = this.getValue(map, \"path\", name);\r\n var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\r\n if (region == null)\r\n return null;\r\n region.path = path;\r\n region.x = this.getValue(map, \"x\", 0) * scale;\r\n region.y = this.getValue(map, \"y\", 0) * scale;\r\n region.scaleX = this.getValue(map, \"scaleX\", 1);\r\n region.scaleY = this.getValue(map, \"scaleY\", 1);\r\n region.rotation = this.getValue(map, \"rotation\", 0);\r\n region.width = map.width * scale;\r\n region.height = map.height * scale;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n region.color.setFromString(color);\r\n region.updateOffset();\r\n return region;\r\n }\r\n case \"boundingbox\": {\r\n var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n if (box == null)\r\n return null;\r\n this.readVertices(map, box, map.vertexCount << 1);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n box.color.setFromString(color);\r\n return box;\r\n }\r\n case \"mesh\":\r\n case \"linkedmesh\": {\r\n var path = this.getValue(map, \"path\", name);\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n mesh.color.setFromString(color);\r\n mesh.width = this.getValue(map, \"width\", 0) * scale;\r\n mesh.height = this.getValue(map, \"height\", 0) * scale;\r\n var parent_7 = this.getValue(map, \"parent\", null);\r\n if (parent_7 != null) {\r\n this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, \"skin\", null), slotIndex, parent_7, this.getValue(map, \"deform\", true)));\r\n return mesh;\r\n }\r\n var uvs = map.uvs;\r\n this.readVertices(map, mesh, uvs.length);\r\n mesh.triangles = map.triangles;\r\n mesh.regionUVs = uvs;\r\n mesh.updateUVs();\r\n mesh.edges = this.getValue(map, \"edges\", null);\r\n mesh.hullLength = this.getValue(map, \"hull\", 0) * 2;\r\n return mesh;\r\n }\r\n case \"path\": {\r\n var path = this.attachmentLoader.newPathAttachment(skin, name);\r\n if (path == null)\r\n return null;\r\n path.closed = this.getValue(map, \"closed\", false);\r\n path.constantSpeed = this.getValue(map, \"constantSpeed\", true);\r\n var vertexCount = map.vertexCount;\r\n this.readVertices(map, path, vertexCount << 1);\r\n var lengths = spine.Utils.newArray(vertexCount / 3, 0);\r\n for (var i = 0; i < map.lengths.length; i++)\r\n lengths[i] = map.lengths[i] * scale;\r\n path.lengths = lengths;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n path.color.setFromString(color);\r\n return path;\r\n }\r\n case \"point\": {\r\n var point = this.attachmentLoader.newPointAttachment(skin, name);\r\n if (point == null)\r\n return null;\r\n point.x = this.getValue(map, \"x\", 0) * scale;\r\n point.y = this.getValue(map, \"y\", 0) * scale;\r\n point.rotation = this.getValue(map, \"rotation\", 0);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n point.color.setFromString(color);\r\n return point;\r\n }\r\n case \"clipping\": {\r\n var clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n if (clip == null)\r\n return null;\r\n var end = this.getValue(map, \"end\", null);\r\n if (end != null) {\r\n var slot = skeletonData.findSlot(end);\r\n if (slot == null)\r\n throw new Error(\"Clipping end slot not found: \" + end);\r\n clip.endSlot = slot;\r\n }\r\n var vertexCount = map.vertexCount;\r\n this.readVertices(map, clip, vertexCount << 1);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n clip.color.setFromString(color);\r\n return clip;\r\n }\r\n }\r\n return null;\r\n };\r\n SkeletonJson.prototype.readVertices = function (map, attachment, verticesLength) {\r\n var scale = this.scale;\r\n attachment.worldVerticesLength = verticesLength;\r\n var vertices = map.vertices;\r\n if (verticesLength == vertices.length) {\r\n var scaledVertices = spine.Utils.toFloatArray(vertices);\r\n if (scale != 1) {\r\n for (var i = 0, n = vertices.length; i < n; i++)\r\n scaledVertices[i] *= scale;\r\n }\r\n attachment.vertices = scaledVertices;\r\n return;\r\n }\r\n var weights = new Array();\r\n var bones = new Array();\r\n for (var i = 0, n = vertices.length; i < n;) {\r\n var boneCount = vertices[i++];\r\n bones.push(boneCount);\r\n for (var nn = i + boneCount * 4; i < nn; i += 4) {\r\n bones.push(vertices[i]);\r\n weights.push(vertices[i + 1] * scale);\r\n weights.push(vertices[i + 2] * scale);\r\n weights.push(vertices[i + 3]);\r\n }\r\n }\r\n attachment.bones = bones;\r\n attachment.vertices = spine.Utils.toFloatArray(weights);\r\n };\r\n SkeletonJson.prototype.readAnimation = function (map, name, skeletonData) {\r\n var scale = this.scale;\r\n var timelines = new Array();\r\n var duration = 0;\r\n if (map.slots) {\r\n for (var slotName in map.slots) {\r\n var slotMap = map.slots[slotName];\r\n var slotIndex = skeletonData.findSlotIndex(slotName);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + slotName);\r\n for (var timelineName in slotMap) {\r\n var timelineMap = slotMap[timelineName];\r\n if (timelineName == \"attachment\") {\r\n var timeline = new spine.AttachmentTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex++, this.getValue(valueMap, \"time\", 0), valueMap.name);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n else if (timelineName == \"color\") {\r\n var timeline = new spine.ColorTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var color = new spine.Color();\r\n color.setFromString(valueMap.color);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), color.r, color.g, color.b, color.a);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.ColorTimeline.ENTRIES]);\r\n }\r\n else if (timelineName == \"twoColor\") {\r\n var timeline = new spine.TwoColorTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var light = new spine.Color();\r\n var dark = new spine.Color();\r\n light.setFromString(valueMap.light);\r\n dark.setFromString(valueMap.dark);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), light.r, light.g, light.b, light.a, dark.r, dark.g, dark.b);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TwoColorTimeline.ENTRIES]);\r\n }\r\n else\r\n throw new Error(\"Invalid timeline type for a slot: \" + timelineName + \" (\" + slotName + \")\");\r\n }\r\n }\r\n }\r\n if (map.bones) {\r\n for (var boneName in map.bones) {\r\n var boneMap = map.bones[boneName];\r\n var boneIndex = skeletonData.findBoneIndex(boneName);\r\n if (boneIndex == -1)\r\n throw new Error(\"Bone not found: \" + boneName);\r\n for (var timelineName in boneMap) {\r\n var timelineMap = boneMap[timelineName];\r\n if (timelineName === \"rotate\") {\r\n var timeline = new spine.RotateTimeline(timelineMap.length);\r\n timeline.boneIndex = boneIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"angle\", 0));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.RotateTimeline.ENTRIES]);\r\n }\r\n else if (timelineName === \"translate\" || timelineName === \"scale\" || timelineName === \"shear\") {\r\n var timeline = null;\r\n var timelineScale = 1, defaultValue = 0;\r\n if (timelineName === \"scale\") {\r\n timeline = new spine.ScaleTimeline(timelineMap.length);\r\n defaultValue = 1;\r\n }\r\n else if (timelineName === \"shear\")\r\n timeline = new spine.ShearTimeline(timelineMap.length);\r\n else {\r\n timeline = new spine.TranslateTimeline(timelineMap.length);\r\n timelineScale = scale;\r\n }\r\n timeline.boneIndex = boneIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var x = this.getValue(valueMap, \"x\", defaultValue), y = this.getValue(valueMap, \"y\", defaultValue);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), x * timelineScale, y * timelineScale);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TranslateTimeline.ENTRIES]);\r\n }\r\n else\r\n throw new Error(\"Invalid timeline type for a bone: \" + timelineName + \" (\" + boneName + \")\");\r\n }\r\n }\r\n }\r\n if (map.ik) {\r\n for (var constraintName in map.ik) {\r\n var constraintMap = map.ik[constraintName];\r\n var constraint = skeletonData.findIkConstraint(constraintName);\r\n var timeline = new spine.IkConstraintTimeline(constraintMap.length);\r\n timeline.ikConstraintIndex = skeletonData.ikConstraints.indexOf(constraint);\r\n var frameIndex = 0;\r\n for (var i = 0; i < constraintMap.length; i++) {\r\n var valueMap = constraintMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"mix\", 1), this.getValue(valueMap, \"softness\", 0) * scale, this.getValue(valueMap, \"bendPositive\", true) ? 1 : -1, this.getValue(valueMap, \"compress\", false), this.getValue(valueMap, \"stretch\", false));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.IkConstraintTimeline.ENTRIES]);\r\n }\r\n }\r\n if (map.transform) {\r\n for (var constraintName in map.transform) {\r\n var constraintMap = map.transform[constraintName];\r\n var constraint = skeletonData.findTransformConstraint(constraintName);\r\n var timeline = new spine.TransformConstraintTimeline(constraintMap.length);\r\n timeline.transformConstraintIndex = skeletonData.transformConstraints.indexOf(constraint);\r\n var frameIndex = 0;\r\n for (var i = 0; i < constraintMap.length; i++) {\r\n var valueMap = constraintMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1), this.getValue(valueMap, \"scaleMix\", 1), this.getValue(valueMap, \"shearMix\", 1));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TransformConstraintTimeline.ENTRIES]);\r\n }\r\n }\r\n if (map.path) {\r\n for (var constraintName in map.path) {\r\n var constraintMap = map.path[constraintName];\r\n var index = skeletonData.findPathConstraintIndex(constraintName);\r\n if (index == -1)\r\n throw new Error(\"Path constraint not found: \" + constraintName);\r\n var data = skeletonData.pathConstraints[index];\r\n for (var timelineName in constraintMap) {\r\n var timelineMap = constraintMap[timelineName];\r\n if (timelineName === \"position\" || timelineName === \"spacing\") {\r\n var timeline = null;\r\n var timelineScale = 1;\r\n if (timelineName === \"spacing\") {\r\n timeline = new spine.PathConstraintSpacingTimeline(timelineMap.length);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n else {\r\n timeline = new spine.PathConstraintPositionTimeline(timelineMap.length);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n timeline.pathConstraintIndex = index;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, timelineName, 0) * timelineScale);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\r\n }\r\n else if (timelineName === \"mix\") {\r\n var timeline = new spine.PathConstraintMixTimeline(timelineMap.length);\r\n timeline.pathConstraintIndex = index;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\r\n }\r\n }\r\n }\r\n }\r\n if (map.deform) {\r\n for (var deformName in map.deform) {\r\n var deformMap = map.deform[deformName];\r\n var skin = skeletonData.findSkin(deformName);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + deformName);\r\n for (var slotName in deformMap) {\r\n var slotMap = deformMap[slotName];\r\n var slotIndex = skeletonData.findSlotIndex(slotName);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + slotMap.name);\r\n for (var timelineName in slotMap) {\r\n var timelineMap = slotMap[timelineName];\r\n var attachment = skin.getAttachment(slotIndex, timelineName);\r\n if (attachment == null)\r\n throw new Error(\"Deform attachment not found: \" + timelineMap.name);\r\n var weighted = attachment.bones != null;\r\n var vertices = attachment.vertices;\r\n var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n var timeline = new spine.DeformTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n timeline.attachment = attachment;\r\n var frameIndex = 0;\r\n for (var j = 0; j < timelineMap.length; j++) {\r\n var valueMap = timelineMap[j];\r\n var deform = void 0;\r\n var verticesValue = this.getValue(valueMap, \"vertices\", null);\r\n if (verticesValue == null)\r\n deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\r\n else {\r\n deform = spine.Utils.newFloatArray(deformLength);\r\n var start = this.getValue(valueMap, \"offset\", 0);\r\n spine.Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\r\n if (scale != 1) {\r\n for (var i = start, n = i + verticesValue.length; i < n; i++)\r\n deform[i] *= scale;\r\n }\r\n if (!weighted) {\r\n for (var i = 0; i < deformLength; i++)\r\n deform[i] += vertices[i];\r\n }\r\n }\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), deform);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n }\r\n }\r\n }\r\n var drawOrderNode = map.drawOrder;\r\n if (drawOrderNode == null)\r\n drawOrderNode = map.draworder;\r\n if (drawOrderNode != null) {\r\n var timeline = new spine.DrawOrderTimeline(drawOrderNode.length);\r\n var slotCount = skeletonData.slots.length;\r\n var frameIndex = 0;\r\n for (var j = 0; j < drawOrderNode.length; j++) {\r\n var drawOrderMap = drawOrderNode[j];\r\n var drawOrder = null;\r\n var offsets = this.getValue(drawOrderMap, \"offsets\", null);\r\n if (offsets != null) {\r\n drawOrder = spine.Utils.newArray(slotCount, -1);\r\n var unchanged = spine.Utils.newArray(slotCount - offsets.length, 0);\r\n var originalIndex = 0, unchangedIndex = 0;\r\n for (var i = 0; i < offsets.length; i++) {\r\n var offsetMap = offsets[i];\r\n var slotIndex = skeletonData.findSlotIndex(offsetMap.slot);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + offsetMap.slot);\r\n while (originalIndex != slotIndex)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n drawOrder[originalIndex + offsetMap.offset] = originalIndex++;\r\n }\r\n while (originalIndex < slotCount)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n for (var i = slotCount - 1; i >= 0; i--)\r\n if (drawOrder[i] == -1)\r\n drawOrder[i] = unchanged[--unchangedIndex];\r\n }\r\n timeline.setFrame(frameIndex++, this.getValue(drawOrderMap, \"time\", 0), drawOrder);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n if (map.events) {\r\n var timeline = new spine.EventTimeline(map.events.length);\r\n var frameIndex = 0;\r\n for (var i = 0; i < map.events.length; i++) {\r\n var eventMap = map.events[i];\r\n var eventData = skeletonData.findEvent(eventMap.name);\r\n if (eventData == null)\r\n throw new Error(\"Event not found: \" + eventMap.name);\r\n var event_6 = new spine.Event(spine.Utils.toSinglePrecision(this.getValue(eventMap, \"time\", 0)), eventData);\r\n event_6.intValue = this.getValue(eventMap, \"int\", eventData.intValue);\r\n event_6.floatValue = this.getValue(eventMap, \"float\", eventData.floatValue);\r\n event_6.stringValue = this.getValue(eventMap, \"string\", eventData.stringValue);\r\n if (event_6.data.audioPath != null) {\r\n event_6.volume = this.getValue(eventMap, \"volume\", 1);\r\n event_6.balance = this.getValue(eventMap, \"balance\", 0);\r\n }\r\n timeline.setFrame(frameIndex++, event_6);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n if (isNaN(duration)) {\r\n throw new Error(\"Error while parsing animation, duration is NaN\");\r\n }\r\n skeletonData.animations.push(new spine.Animation(name, timelines, duration));\r\n };\r\n SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) {\r\n if (!map.hasOwnProperty(\"curve\"))\r\n return;\r\n if (map.curve == \"stepped\")\r\n timeline.setStepped(frameIndex);\r\n else {\r\n var curve = map.curve;\r\n timeline.setCurve(frameIndex, curve, this.getValue(map, \"c2\", 0), this.getValue(map, \"c3\", 1), this.getValue(map, \"c4\", 1));\r\n }\r\n };\r\n SkeletonJson.prototype.getValue = function (map, prop, defaultValue) {\r\n return map[prop] !== undefined ? map[prop] : defaultValue;\r\n };\r\n SkeletonJson.blendModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"normal\")\r\n return spine.BlendMode.Normal;\r\n if (str == \"additive\")\r\n return spine.BlendMode.Additive;\r\n if (str == \"multiply\")\r\n return spine.BlendMode.Multiply;\r\n if (str == \"screen\")\r\n return spine.BlendMode.Screen;\r\n throw new Error(\"Unknown blend mode: \" + str);\r\n };\r\n SkeletonJson.positionModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"fixed\")\r\n return spine.PositionMode.Fixed;\r\n if (str == \"percent\")\r\n return spine.PositionMode.Percent;\r\n throw new Error(\"Unknown position mode: \" + str);\r\n };\r\n SkeletonJson.spacingModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"length\")\r\n return spine.SpacingMode.Length;\r\n if (str == \"fixed\")\r\n return spine.SpacingMode.Fixed;\r\n if (str == \"percent\")\r\n return spine.SpacingMode.Percent;\r\n throw new Error(\"Unknown position mode: \" + str);\r\n };\r\n SkeletonJson.rotateModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"tangent\")\r\n return spine.RotateMode.Tangent;\r\n if (str == \"chain\")\r\n return spine.RotateMode.Chain;\r\n if (str == \"chainscale\")\r\n return spine.RotateMode.ChainScale;\r\n throw new Error(\"Unknown rotate mode: \" + str);\r\n };\r\n SkeletonJson.transformModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"normal\")\r\n return spine.TransformMode.Normal;\r\n if (str == \"onlytranslation\")\r\n return spine.TransformMode.OnlyTranslation;\r\n if (str == \"norotationorreflection\")\r\n return spine.TransformMode.NoRotationOrReflection;\r\n if (str == \"noscale\")\r\n return spine.TransformMode.NoScale;\r\n if (str == \"noscaleorreflection\")\r\n return spine.TransformMode.NoScaleOrReflection;\r\n throw new Error(\"Unknown transform mode: \" + str);\r\n };\r\n return SkeletonJson;\r\n }());\r\n spine.SkeletonJson = SkeletonJson;\r\n var LinkedMesh = (function () {\r\n function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\r\n this.mesh = mesh;\r\n this.skin = skin;\r\n this.slotIndex = slotIndex;\r\n this.parent = parent;\r\n this.inheritDeform = inheritDeform;\r\n }\r\n return LinkedMesh;\r\n }());\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkinEntry = (function () {\r\n function SkinEntry(slotIndex, name, attachment) {\r\n this.slotIndex = slotIndex;\r\n this.name = name;\r\n this.attachment = attachment;\r\n }\r\n return SkinEntry;\r\n }());\r\n spine.SkinEntry = SkinEntry;\r\n var Skin = (function () {\r\n function Skin(name) {\r\n this.attachments = new Array();\r\n this.bones = Array();\r\n this.constraints = new Array();\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n Skin.prototype.setAttachment = function (slotIndex, name, attachment) {\r\n if (attachment == null)\r\n throw new Error(\"attachment cannot be null.\");\r\n var attachments = this.attachments;\r\n if (slotIndex >= attachments.length)\r\n attachments.length = slotIndex + 1;\r\n if (!attachments[slotIndex])\r\n attachments[slotIndex] = {};\r\n attachments[slotIndex][name] = attachment;\r\n };\r\n Skin.prototype.addSkin = function (skin) {\r\n for (var i = 0; i < skin.bones.length; i++) {\r\n var bone = skin.bones[i];\r\n var contained = false;\r\n for (var j = 0; j < this.bones.length; j++) {\r\n if (this.bones[j] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.bones.push(bone);\r\n }\r\n for (var i = 0; i < skin.constraints.length; i++) {\r\n var constraint = skin.constraints[i];\r\n var contained = false;\r\n for (var j = 0; j < this.constraints.length; j++) {\r\n if (this.constraints[j] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.constraints.push(constraint);\r\n }\r\n var attachments = skin.getAttachments();\r\n for (var i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n };\r\n Skin.prototype.copySkin = function (skin) {\r\n for (var i = 0; i < skin.bones.length; i++) {\r\n var bone = skin.bones[i];\r\n var contained = false;\r\n for (var j = 0; j < this.bones.length; j++) {\r\n if (this.bones[j] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.bones.push(bone);\r\n }\r\n for (var i = 0; i < skin.constraints.length; i++) {\r\n var constraint = skin.constraints[i];\r\n var contained = false;\r\n for (var j = 0; j < this.constraints.length; j++) {\r\n if (this.constraints[j] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.constraints.push(constraint);\r\n }\r\n var attachments = skin.getAttachments();\r\n for (var i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n if (attachment.attachment == null)\r\n continue;\r\n if (attachment.attachment instanceof spine.MeshAttachment) {\r\n attachment.attachment = attachment.attachment.newLinkedMesh();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n else {\r\n attachment.attachment = attachment.attachment.copy();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n }\r\n };\r\n Skin.prototype.getAttachment = function (slotIndex, name) {\r\n var dictionary = this.attachments[slotIndex];\r\n return dictionary ? dictionary[name] : null;\r\n };\r\n Skin.prototype.removeAttachment = function (slotIndex, name) {\r\n var dictionary = this.attachments[slotIndex];\r\n if (dictionary)\r\n dictionary[name] = null;\r\n };\r\n Skin.prototype.getAttachments = function () {\r\n var entries = new Array();\r\n for (var i = 0; i < this.attachments.length; i++) {\r\n var slotAttachments = this.attachments[i];\r\n if (slotAttachments) {\r\n for (var name_4 in slotAttachments) {\r\n var attachment = slotAttachments[name_4];\r\n if (attachment)\r\n entries.push(new SkinEntry(i, name_4, attachment));\r\n }\r\n }\r\n }\r\n return entries;\r\n };\r\n Skin.prototype.getAttachmentsForSlot = function (slotIndex, attachments) {\r\n var slotAttachments = this.attachments[slotIndex];\r\n if (slotAttachments) {\r\n for (var name_5 in slotAttachments) {\r\n var attachment = slotAttachments[name_5];\r\n if (attachment)\r\n attachments.push(new SkinEntry(slotIndex, name_5, attachment));\r\n }\r\n }\r\n };\r\n Skin.prototype.clear = function () {\r\n this.attachments.length = 0;\r\n this.bones.length = 0;\r\n this.constraints.length = 0;\r\n };\r\n Skin.prototype.attachAll = function (skeleton, oldSkin) {\r\n var slotIndex = 0;\r\n for (var i = 0; i < skeleton.slots.length; i++) {\r\n var slot = skeleton.slots[i];\r\n var slotAttachment = slot.getAttachment();\r\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\r\n var dictionary = oldSkin.attachments[slotIndex];\r\n for (var key in dictionary) {\r\n var skinAttachment = dictionary[key];\r\n if (slotAttachment == skinAttachment) {\r\n var attachment = this.getAttachment(slotIndex, key);\r\n if (attachment != null)\r\n slot.setAttachment(attachment);\r\n break;\r\n }\r\n }\r\n }\r\n slotIndex++;\r\n }\r\n };\r\n return Skin;\r\n }());\r\n spine.Skin = Skin;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Slot = (function () {\r\n function Slot(data, bone) {\r\n this.deform = new Array();\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (bone == null)\r\n throw new Error(\"bone cannot be null.\");\r\n this.data = data;\r\n this.bone = bone;\r\n this.color = new spine.Color();\r\n this.darkColor = data.darkColor == null ? null : new spine.Color();\r\n this.setToSetupPose();\r\n }\r\n Slot.prototype.getSkeleton = function () {\r\n return this.bone.skeleton;\r\n };\r\n Slot.prototype.getAttachment = function () {\r\n return this.attachment;\r\n };\r\n Slot.prototype.setAttachment = function (attachment) {\r\n if (this.attachment == attachment)\r\n return;\r\n this.attachment = attachment;\r\n this.attachmentTime = this.bone.skeleton.time;\r\n this.deform.length = 0;\r\n };\r\n Slot.prototype.setAttachmentTime = function (time) {\r\n this.attachmentTime = this.bone.skeleton.time - time;\r\n };\r\n Slot.prototype.getAttachmentTime = function () {\r\n return this.bone.skeleton.time - this.attachmentTime;\r\n };\r\n Slot.prototype.setToSetupPose = function () {\r\n this.color.setFromColor(this.data.color);\r\n if (this.darkColor != null)\r\n this.darkColor.setFromColor(this.data.darkColor);\r\n if (this.data.attachmentName == null)\r\n this.attachment = null;\r\n else {\r\n this.attachment = null;\r\n this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName));\r\n }\r\n };\r\n return Slot;\r\n }());\r\n spine.Slot = Slot;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SlotData = (function () {\r\n function SlotData(index, name, boneData) {\r\n this.color = new spine.Color(1, 1, 1, 1);\r\n if (index < 0)\r\n throw new Error(\"index must be >= 0.\");\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n if (boneData == null)\r\n throw new Error(\"boneData cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.boneData = boneData;\r\n }\r\n return SlotData;\r\n }());\r\n spine.SlotData = SlotData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Texture = (function () {\r\n function Texture(image) {\r\n this._image = image;\r\n }\r\n Texture.prototype.getImage = function () {\r\n return this._image;\r\n };\r\n Texture.filterFromString = function (text) {\r\n switch (text.toLowerCase()) {\r\n case \"nearest\": return TextureFilter.Nearest;\r\n case \"linear\": return TextureFilter.Linear;\r\n case \"mipmap\": return TextureFilter.MipMap;\r\n case \"mipmapnearestnearest\": return TextureFilter.MipMapNearestNearest;\r\n case \"mipmaplinearnearest\": return TextureFilter.MipMapLinearNearest;\r\n case \"mipmapnearestlinear\": return TextureFilter.MipMapNearestLinear;\r\n case \"mipmaplinearlinear\": return TextureFilter.MipMapLinearLinear;\r\n default: throw new Error(\"Unknown texture filter \" + text);\r\n }\r\n };\r\n Texture.wrapFromString = function (text) {\r\n switch (text.toLowerCase()) {\r\n case \"mirroredtepeat\": return TextureWrap.MirroredRepeat;\r\n case \"clamptoedge\": return TextureWrap.ClampToEdge;\r\n case \"repeat\": return TextureWrap.Repeat;\r\n default: throw new Error(\"Unknown texture wrap \" + text);\r\n }\r\n };\r\n return Texture;\r\n }());\r\n spine.Texture = Texture;\r\n var TextureFilter;\r\n (function (TextureFilter) {\r\n TextureFilter[TextureFilter[\"Nearest\"] = 9728] = \"Nearest\";\r\n TextureFilter[TextureFilter[\"Linear\"] = 9729] = \"Linear\";\r\n TextureFilter[TextureFilter[\"MipMap\"] = 9987] = \"MipMap\";\r\n TextureFilter[TextureFilter[\"MipMapNearestNearest\"] = 9984] = \"MipMapNearestNearest\";\r\n TextureFilter[TextureFilter[\"MipMapLinearNearest\"] = 9985] = \"MipMapLinearNearest\";\r\n TextureFilter[TextureFilter[\"MipMapNearestLinear\"] = 9986] = \"MipMapNearestLinear\";\r\n TextureFilter[TextureFilter[\"MipMapLinearLinear\"] = 9987] = \"MipMapLinearLinear\";\r\n })(TextureFilter = spine.TextureFilter || (spine.TextureFilter = {}));\r\n var TextureWrap;\r\n (function (TextureWrap) {\r\n TextureWrap[TextureWrap[\"MirroredRepeat\"] = 33648] = \"MirroredRepeat\";\r\n TextureWrap[TextureWrap[\"ClampToEdge\"] = 33071] = \"ClampToEdge\";\r\n TextureWrap[TextureWrap[\"Repeat\"] = 10497] = \"Repeat\";\r\n })(TextureWrap = spine.TextureWrap || (spine.TextureWrap = {}));\r\n var TextureRegion = (function () {\r\n function TextureRegion() {\r\n this.u = 0;\r\n this.v = 0;\r\n this.u2 = 0;\r\n this.v2 = 0;\r\n this.width = 0;\r\n this.height = 0;\r\n this.rotate = false;\r\n this.offsetX = 0;\r\n this.offsetY = 0;\r\n this.originalWidth = 0;\r\n this.originalHeight = 0;\r\n }\r\n return TextureRegion;\r\n }());\r\n spine.TextureRegion = TextureRegion;\r\n var FakeTexture = (function (_super) {\r\n __extends(FakeTexture, _super);\r\n function FakeTexture() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n FakeTexture.prototype.setFilters = function (minFilter, magFilter) { };\r\n FakeTexture.prototype.setWraps = function (uWrap, vWrap) { };\r\n FakeTexture.prototype.dispose = function () { };\r\n return FakeTexture;\r\n }(Texture));\r\n spine.FakeTexture = FakeTexture;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TextureAtlas = (function () {\r\n function TextureAtlas(atlasText, textureLoader) {\r\n this.pages = new Array();\r\n this.regions = new Array();\r\n this.load(atlasText, textureLoader);\r\n }\r\n TextureAtlas.prototype.load = function (atlasText, textureLoader) {\r\n if (textureLoader == null)\r\n throw new Error(\"textureLoader cannot be null.\");\r\n var reader = new TextureAtlasReader(atlasText);\r\n var tuple = new Array(4);\r\n var page = null;\r\n while (true) {\r\n var line = reader.readLine();\r\n if (line == null)\r\n break;\r\n line = line.trim();\r\n if (line.length == 0)\r\n page = null;\r\n else if (!page) {\r\n page = new TextureAtlasPage();\r\n page.name = line;\r\n if (reader.readTuple(tuple) == 2) {\r\n page.width = parseInt(tuple[0]);\r\n page.height = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n }\r\n reader.readTuple(tuple);\r\n page.minFilter = spine.Texture.filterFromString(tuple[0]);\r\n page.magFilter = spine.Texture.filterFromString(tuple[1]);\r\n var direction = reader.readValue();\r\n page.uWrap = spine.TextureWrap.ClampToEdge;\r\n page.vWrap = spine.TextureWrap.ClampToEdge;\r\n if (direction == \"x\")\r\n page.uWrap = spine.TextureWrap.Repeat;\r\n else if (direction == \"y\")\r\n page.vWrap = spine.TextureWrap.Repeat;\r\n else if (direction == \"xy\")\r\n page.uWrap = page.vWrap = spine.TextureWrap.Repeat;\r\n page.texture = textureLoader(line);\r\n page.texture.setFilters(page.minFilter, page.magFilter);\r\n page.texture.setWraps(page.uWrap, page.vWrap);\r\n page.width = page.texture.getImage().width;\r\n page.height = page.texture.getImage().height;\r\n this.pages.push(page);\r\n }\r\n else {\r\n var region = new TextureAtlasRegion();\r\n region.name = line;\r\n region.page = page;\r\n var rotateValue = reader.readValue();\r\n if (rotateValue.toLocaleLowerCase() == \"true\") {\r\n region.degrees = 90;\r\n }\r\n else if (rotateValue.toLocaleLowerCase() == \"false\") {\r\n region.degrees = 0;\r\n }\r\n else {\r\n region.degrees = parseFloat(rotateValue);\r\n }\r\n region.rotate = region.degrees == 90;\r\n reader.readTuple(tuple);\r\n var x = parseInt(tuple[0]);\r\n var y = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n var width = parseInt(tuple[0]);\r\n var height = parseInt(tuple[1]);\r\n region.u = x / page.width;\r\n region.v = y / page.height;\r\n if (region.rotate) {\r\n region.u2 = (x + height) / page.width;\r\n region.v2 = (y + width) / page.height;\r\n }\r\n else {\r\n region.u2 = (x + width) / page.width;\r\n region.v2 = (y + height) / page.height;\r\n }\r\n region.x = x;\r\n region.y = y;\r\n region.width = Math.abs(width);\r\n region.height = Math.abs(height);\r\n if (reader.readTuple(tuple) == 4) {\r\n if (reader.readTuple(tuple) == 4) {\r\n reader.readTuple(tuple);\r\n }\r\n }\r\n region.originalWidth = parseInt(tuple[0]);\r\n region.originalHeight = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n region.offsetX = parseInt(tuple[0]);\r\n region.offsetY = parseInt(tuple[1]);\r\n region.index = parseInt(reader.readValue());\r\n region.texture = page.texture;\r\n this.regions.push(region);\r\n }\r\n }\r\n };\r\n TextureAtlas.prototype.findRegion = function (name) {\r\n for (var i = 0; i < this.regions.length; i++) {\r\n if (this.regions[i].name == name) {\r\n return this.regions[i];\r\n }\r\n }\r\n return null;\r\n };\r\n TextureAtlas.prototype.dispose = function () {\r\n for (var i = 0; i < this.pages.length; i++) {\r\n this.pages[i].texture.dispose();\r\n }\r\n };\r\n return TextureAtlas;\r\n }());\r\n spine.TextureAtlas = TextureAtlas;\r\n var TextureAtlasReader = (function () {\r\n function TextureAtlasReader(text) {\r\n this.index = 0;\r\n this.lines = text.split(/\\r\\n|\\r|\\n/);\r\n }\r\n TextureAtlasReader.prototype.readLine = function () {\r\n if (this.index >= this.lines.length)\r\n return null;\r\n return this.lines[this.index++];\r\n };\r\n TextureAtlasReader.prototype.readValue = function () {\r\n var line = this.readLine();\r\n var colon = line.indexOf(\":\");\r\n if (colon == -1)\r\n throw new Error(\"Invalid line: \" + line);\r\n return line.substring(colon + 1).trim();\r\n };\r\n TextureAtlasReader.prototype.readTuple = function (tuple) {\r\n var line = this.readLine();\r\n var colon = line.indexOf(\":\");\r\n if (colon == -1)\r\n throw new Error(\"Invalid line: \" + line);\r\n var i = 0, lastMatch = colon + 1;\r\n for (; i < 3; i++) {\r\n var comma = line.indexOf(\",\", lastMatch);\r\n if (comma == -1)\r\n break;\r\n tuple[i] = line.substr(lastMatch, comma - lastMatch).trim();\r\n lastMatch = comma + 1;\r\n }\r\n tuple[i] = line.substring(lastMatch).trim();\r\n return i + 1;\r\n };\r\n return TextureAtlasReader;\r\n }());\r\n var TextureAtlasPage = (function () {\r\n function TextureAtlasPage() {\r\n }\r\n return TextureAtlasPage;\r\n }());\r\n spine.TextureAtlasPage = TextureAtlasPage;\r\n var TextureAtlasRegion = (function (_super) {\r\n __extends(TextureAtlasRegion, _super);\r\n function TextureAtlasRegion() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return TextureAtlasRegion;\r\n }(spine.TextureRegion));\r\n spine.TextureAtlasRegion = TextureAtlasRegion;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TransformConstraint = (function () {\r\n function TransformConstraint(data, skeleton) {\r\n this.rotateMix = 0;\r\n this.translateMix = 0;\r\n this.scaleMix = 0;\r\n this.shearMix = 0;\r\n this.temp = new spine.Vector2();\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.rotateMix = data.rotateMix;\r\n this.translateMix = data.translateMix;\r\n this.scaleMix = data.scaleMix;\r\n this.shearMix = data.shearMix;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findBone(data.target.name);\r\n }\r\n TransformConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n TransformConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n TransformConstraint.prototype.update = function () {\r\n if (this.data.local) {\r\n if (this.data.relative)\r\n this.applyRelativeLocal();\r\n else\r\n this.applyAbsoluteLocal();\r\n }\r\n else {\r\n if (this.data.relative)\r\n this.applyRelativeWorld();\r\n else\r\n this.applyAbsoluteWorld();\r\n }\r\n };\r\n TransformConstraint.prototype.applyAbsoluteWorld = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n var ta = target.a, tb = target.b, tc = target.c, td = target.d;\r\n var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n var offsetRotation = this.data.offsetRotation * degRadReflect;\r\n var offsetShearY = this.data.offsetShearY * degRadReflect;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n var modified = false;\r\n if (rotateMix != 0) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n var cos = Math.cos(r), sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n modified = true;\r\n }\r\n if (translateMix != 0) {\r\n var temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n bone.worldX += (temp.x - bone.worldX) * translateMix;\r\n bone.worldY += (temp.y - bone.worldY) * translateMix;\r\n modified = true;\r\n }\r\n if (scaleMix > 0) {\r\n var s = Math.sqrt(bone.a * bone.a + bone.c * bone.c);\r\n var ts = Math.sqrt(ta * ta + tc * tc);\r\n if (s > 0.00001)\r\n s = (s + (ts - s + this.data.offsetScaleX) * scaleMix) / s;\r\n bone.a *= s;\r\n bone.c *= s;\r\n s = Math.sqrt(bone.b * bone.b + bone.d * bone.d);\r\n ts = Math.sqrt(tb * tb + td * td);\r\n if (s > 0.00001)\r\n s = (s + (ts - s + this.data.offsetScaleY) * scaleMix) / s;\r\n bone.b *= s;\r\n bone.d *= s;\r\n modified = true;\r\n }\r\n if (shearMix > 0) {\r\n var b = bone.b, d = bone.d;\r\n var by = Math.atan2(d, b);\r\n var r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a));\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r = by + (r + offsetShearY) * shearMix;\r\n var s = Math.sqrt(b * b + d * d);\r\n bone.b = Math.cos(r) * s;\r\n bone.d = Math.sin(r) * s;\r\n modified = true;\r\n }\r\n if (modified)\r\n bone.appliedValid = false;\r\n }\r\n };\r\n TransformConstraint.prototype.applyRelativeWorld = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n var ta = target.a, tb = target.b, tc = target.c, td = target.d;\r\n var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n var offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n var modified = false;\r\n if (rotateMix != 0) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var r = Math.atan2(tc, ta) + offsetRotation;\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n var cos = Math.cos(r), sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n modified = true;\r\n }\r\n if (translateMix != 0) {\r\n var temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n bone.worldX += temp.x * translateMix;\r\n bone.worldY += temp.y * translateMix;\r\n modified = true;\r\n }\r\n if (scaleMix > 0) {\r\n var s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * scaleMix + 1;\r\n bone.a *= s;\r\n bone.c *= s;\r\n s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * scaleMix + 1;\r\n bone.b *= s;\r\n bone.d *= s;\r\n modified = true;\r\n }\r\n if (shearMix > 0) {\r\n var r = Math.atan2(td, tb) - Math.atan2(tc, ta);\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n var b = bone.b, d = bone.d;\r\n r = Math.atan2(d, b) + (r - spine.MathUtils.PI / 2 + offsetShearY) * shearMix;\r\n var s = Math.sqrt(b * b + d * d);\r\n bone.b = Math.cos(r) * s;\r\n bone.d = Math.sin(r) * s;\r\n modified = true;\r\n }\r\n if (modified)\r\n bone.appliedValid = false;\r\n }\r\n };\r\n TransformConstraint.prototype.applyAbsoluteLocal = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n if (!target.appliedValid)\r\n target.updateAppliedTransform();\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var rotation = bone.arotation;\r\n if (rotateMix != 0) {\r\n var r = target.arotation - rotation + this.data.offsetRotation;\r\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n rotation += r * rotateMix;\r\n }\r\n var x = bone.ax, y = bone.ay;\r\n if (translateMix != 0) {\r\n x += (target.ax - x + this.data.offsetX) * translateMix;\r\n y += (target.ay - y + this.data.offsetY) * translateMix;\r\n }\r\n var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n if (scaleMix != 0) {\r\n if (scaleX > 0.00001)\r\n scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * scaleMix) / scaleX;\r\n if (scaleY > 0.00001)\r\n scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * scaleMix) / scaleY;\r\n }\r\n var shearY = bone.ashearY;\r\n if (shearMix != 0) {\r\n var r = target.ashearY - shearY + this.data.offsetShearY;\r\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n bone.shearY += r * shearMix;\r\n }\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n };\r\n TransformConstraint.prototype.applyRelativeLocal = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n if (!target.appliedValid)\r\n target.updateAppliedTransform();\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var rotation = bone.arotation;\r\n if (rotateMix != 0)\r\n rotation += (target.arotation + this.data.offsetRotation) * rotateMix;\r\n var x = bone.ax, y = bone.ay;\r\n if (translateMix != 0) {\r\n x += (target.ax + this.data.offsetX) * translateMix;\r\n y += (target.ay + this.data.offsetY) * translateMix;\r\n }\r\n var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n if (scaleMix != 0) {\r\n if (scaleX > 0.00001)\r\n scaleX *= ((target.ascaleX - 1 + this.data.offsetScaleX) * scaleMix) + 1;\r\n if (scaleY > 0.00001)\r\n scaleY *= ((target.ascaleY - 1 + this.data.offsetScaleY) * scaleMix) + 1;\r\n }\r\n var shearY = bone.ashearY;\r\n if (shearMix != 0)\r\n shearY += (target.ashearY + this.data.offsetShearY) * shearMix;\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n };\r\n return TransformConstraint;\r\n }());\r\n spine.TransformConstraint = TransformConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TransformConstraintData = (function (_super) {\r\n __extends(TransformConstraintData, _super);\r\n function TransformConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n _this.rotateMix = 0;\r\n _this.translateMix = 0;\r\n _this.scaleMix = 0;\r\n _this.shearMix = 0;\r\n _this.offsetRotation = 0;\r\n _this.offsetX = 0;\r\n _this.offsetY = 0;\r\n _this.offsetScaleX = 0;\r\n _this.offsetScaleY = 0;\r\n _this.offsetShearY = 0;\r\n _this.relative = false;\r\n _this.local = false;\r\n return _this;\r\n }\r\n return TransformConstraintData;\r\n }(spine.ConstraintData));\r\n spine.TransformConstraintData = TransformConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Triangulator = (function () {\r\n function Triangulator() {\r\n this.convexPolygons = new Array();\r\n this.convexPolygonsIndices = new Array();\r\n this.indicesArray = new Array();\r\n this.isConcaveArray = new Array();\r\n this.triangles = new Array();\r\n this.polygonPool = new spine.Pool(function () {\r\n return new Array();\r\n });\r\n this.polygonIndicesPool = new spine.Pool(function () {\r\n return new Array();\r\n });\r\n }\r\n Triangulator.prototype.triangulate = function (verticesArray) {\r\n var vertices = verticesArray;\r\n var vertexCount = verticesArray.length >> 1;\r\n var indices = this.indicesArray;\r\n indices.length = 0;\r\n for (var i = 0; i < vertexCount; i++)\r\n indices[i] = i;\r\n var isConcave = this.isConcaveArray;\r\n isConcave.length = 0;\r\n for (var i = 0, n = vertexCount; i < n; ++i)\r\n isConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices);\r\n var triangles = this.triangles;\r\n triangles.length = 0;\r\n while (vertexCount > 3) {\r\n var previous = vertexCount - 1, i = 0, next = 1;\r\n while (true) {\r\n outer: if (!isConcave[i]) {\r\n var p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\r\n var p1x = vertices[p1], p1y = vertices[p1 + 1];\r\n var p2x = vertices[p2], p2y = vertices[p2 + 1];\r\n var p3x = vertices[p3], p3y = vertices[p3 + 1];\r\n for (var ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\r\n if (!isConcave[ii])\r\n continue;\r\n var v = indices[ii] << 1;\r\n var vx = vertices[v], vy = vertices[v + 1];\r\n if (Triangulator.positiveArea(p3x, p3y, p1x, p1y, vx, vy)) {\r\n if (Triangulator.positiveArea(p1x, p1y, p2x, p2y, vx, vy)) {\r\n if (Triangulator.positiveArea(p2x, p2y, p3x, p3y, vx, vy))\r\n break outer;\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n if (next == 0) {\r\n do {\r\n if (!isConcave[i])\r\n break;\r\n i--;\r\n } while (i > 0);\r\n break;\r\n }\r\n previous = i;\r\n i = next;\r\n next = (next + 1) % vertexCount;\r\n }\r\n triangles.push(indices[(vertexCount + i - 1) % vertexCount]);\r\n triangles.push(indices[i]);\r\n triangles.push(indices[(i + 1) % vertexCount]);\r\n indices.splice(i, 1);\r\n isConcave.splice(i, 1);\r\n vertexCount--;\r\n var previousIndex = (vertexCount + i - 1) % vertexCount;\r\n var nextIndex = i == vertexCount ? 0 : i;\r\n isConcave[previousIndex] = Triangulator.isConcave(previousIndex, vertexCount, vertices, indices);\r\n isConcave[nextIndex] = Triangulator.isConcave(nextIndex, vertexCount, vertices, indices);\r\n }\r\n if (vertexCount == 3) {\r\n triangles.push(indices[2]);\r\n triangles.push(indices[0]);\r\n triangles.push(indices[1]);\r\n }\r\n return triangles;\r\n };\r\n Triangulator.prototype.decompose = function (verticesArray, triangles) {\r\n var vertices = verticesArray;\r\n var convexPolygons = this.convexPolygons;\r\n this.polygonPool.freeAll(convexPolygons);\r\n convexPolygons.length = 0;\r\n var convexPolygonsIndices = this.convexPolygonsIndices;\r\n this.polygonIndicesPool.freeAll(convexPolygonsIndices);\r\n convexPolygonsIndices.length = 0;\r\n var polygonIndices = this.polygonIndicesPool.obtain();\r\n polygonIndices.length = 0;\r\n var polygon = this.polygonPool.obtain();\r\n polygon.length = 0;\r\n var fanBaseIndex = -1, lastWinding = 0;\r\n for (var i = 0, n = triangles.length; i < n; i += 3) {\r\n var t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\r\n var x1 = vertices[t1], y1 = vertices[t1 + 1];\r\n var x2 = vertices[t2], y2 = vertices[t2 + 1];\r\n var x3 = vertices[t3], y3 = vertices[t3 + 1];\r\n var merged = false;\r\n if (fanBaseIndex == t1) {\r\n var o = polygon.length - 4;\r\n var winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3);\r\n var winding2 = Triangulator.winding(x3, y3, polygon[0], polygon[1], polygon[2], polygon[3]);\r\n if (winding1 == lastWinding && winding2 == lastWinding) {\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices.push(t3);\r\n merged = true;\r\n }\r\n }\r\n if (!merged) {\r\n if (polygon.length > 0) {\r\n convexPolygons.push(polygon);\r\n convexPolygonsIndices.push(polygonIndices);\r\n }\r\n else {\r\n this.polygonPool.free(polygon);\r\n this.polygonIndicesPool.free(polygonIndices);\r\n }\r\n polygon = this.polygonPool.obtain();\r\n polygon.length = 0;\r\n polygon.push(x1);\r\n polygon.push(y1);\r\n polygon.push(x2);\r\n polygon.push(y2);\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices = this.polygonIndicesPool.obtain();\r\n polygonIndices.length = 0;\r\n polygonIndices.push(t1);\r\n polygonIndices.push(t2);\r\n polygonIndices.push(t3);\r\n lastWinding = Triangulator.winding(x1, y1, x2, y2, x3, y3);\r\n fanBaseIndex = t1;\r\n }\r\n }\r\n if (polygon.length > 0) {\r\n convexPolygons.push(polygon);\r\n convexPolygonsIndices.push(polygonIndices);\r\n }\r\n for (var i = 0, n = convexPolygons.length; i < n; i++) {\r\n polygonIndices = convexPolygonsIndices[i];\r\n if (polygonIndices.length == 0)\r\n continue;\r\n var firstIndex = polygonIndices[0];\r\n var lastIndex = polygonIndices[polygonIndices.length - 1];\r\n polygon = convexPolygons[i];\r\n var o = polygon.length - 4;\r\n var prevPrevX = polygon[o], prevPrevY = polygon[o + 1];\r\n var prevX = polygon[o + 2], prevY = polygon[o + 3];\r\n var firstX = polygon[0], firstY = polygon[1];\r\n var secondX = polygon[2], secondY = polygon[3];\r\n var winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\r\n for (var ii = 0; ii < n; ii++) {\r\n if (ii == i)\r\n continue;\r\n var otherIndices = convexPolygonsIndices[ii];\r\n if (otherIndices.length != 3)\r\n continue;\r\n var otherFirstIndex = otherIndices[0];\r\n var otherSecondIndex = otherIndices[1];\r\n var otherLastIndex = otherIndices[2];\r\n var otherPoly = convexPolygons[ii];\r\n var x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1];\r\n if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex)\r\n continue;\r\n var winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\r\n var winding2 = Triangulator.winding(x3, y3, firstX, firstY, secondX, secondY);\r\n if (winding1 == winding && winding2 == winding) {\r\n otherPoly.length = 0;\r\n otherIndices.length = 0;\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices.push(otherLastIndex);\r\n prevPrevX = prevX;\r\n prevPrevY = prevY;\r\n prevX = x3;\r\n prevY = y3;\r\n ii = 0;\r\n }\r\n }\r\n }\r\n for (var i = convexPolygons.length - 1; i >= 0; i--) {\r\n polygon = convexPolygons[i];\r\n if (polygon.length == 0) {\r\n convexPolygons.splice(i, 1);\r\n this.polygonPool.free(polygon);\r\n polygonIndices = convexPolygonsIndices[i];\r\n convexPolygonsIndices.splice(i, 1);\r\n this.polygonIndicesPool.free(polygonIndices);\r\n }\r\n }\r\n return convexPolygons;\r\n };\r\n Triangulator.isConcave = function (index, vertexCount, vertices, indices) {\r\n var previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\r\n var current = indices[index] << 1;\r\n var next = indices[(index + 1) % vertexCount] << 1;\r\n return !this.positiveArea(vertices[previous], vertices[previous + 1], vertices[current], vertices[current + 1], vertices[next], vertices[next + 1]);\r\n };\r\n Triangulator.positiveArea = function (p1x, p1y, p2x, p2y, p3x, p3y) {\r\n return p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\r\n };\r\n Triangulator.winding = function (p1x, p1y, p2x, p2y, p3x, p3y) {\r\n var px = p2x - p1x, py = p2y - p1y;\r\n return p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\r\n };\r\n return Triangulator;\r\n }());\r\n spine.Triangulator = Triangulator;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IntSet = (function () {\r\n function IntSet() {\r\n this.array = new Array();\r\n }\r\n IntSet.prototype.add = function (value) {\r\n var contains = this.contains(value);\r\n this.array[value | 0] = value | 0;\r\n return !contains;\r\n };\r\n IntSet.prototype.contains = function (value) {\r\n return this.array[value | 0] != undefined;\r\n };\r\n IntSet.prototype.remove = function (value) {\r\n this.array[value | 0] = undefined;\r\n };\r\n IntSet.prototype.clear = function () {\r\n this.array.length = 0;\r\n };\r\n return IntSet;\r\n }());\r\n spine.IntSet = IntSet;\r\n var Color = (function () {\r\n function Color(r, g, b, a) {\r\n if (r === void 0) { r = 0; }\r\n if (g === void 0) { g = 0; }\r\n if (b === void 0) { b = 0; }\r\n if (a === void 0) { a = 0; }\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n }\r\n Color.prototype.set = function (r, g, b, a) {\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n this.clamp();\r\n return this;\r\n };\r\n Color.prototype.setFromColor = function (c) {\r\n this.r = c.r;\r\n this.g = c.g;\r\n this.b = c.b;\r\n this.a = c.a;\r\n return this;\r\n };\r\n Color.prototype.setFromString = function (hex) {\r\n hex = hex.charAt(0) == '#' ? hex.substr(1) : hex;\r\n this.r = parseInt(hex.substr(0, 2), 16) / 255.0;\r\n this.g = parseInt(hex.substr(2, 2), 16) / 255.0;\r\n this.b = parseInt(hex.substr(4, 2), 16) / 255.0;\r\n this.a = (hex.length != 8 ? 255 : parseInt(hex.substr(6, 2), 16)) / 255.0;\r\n return this;\r\n };\r\n Color.prototype.add = function (r, g, b, a) {\r\n this.r += r;\r\n this.g += g;\r\n this.b += b;\r\n this.a += a;\r\n this.clamp();\r\n return this;\r\n };\r\n Color.prototype.clamp = function () {\r\n if (this.r < 0)\r\n this.r = 0;\r\n else if (this.r > 1)\r\n this.r = 1;\r\n if (this.g < 0)\r\n this.g = 0;\r\n else if (this.g > 1)\r\n this.g = 1;\r\n if (this.b < 0)\r\n this.b = 0;\r\n else if (this.b > 1)\r\n this.b = 1;\r\n if (this.a < 0)\r\n this.a = 0;\r\n else if (this.a > 1)\r\n this.a = 1;\r\n return this;\r\n };\r\n Color.rgba8888ToColor = function (color, value) {\r\n color.r = ((value & 0xff000000) >>> 24) / 255;\r\n color.g = ((value & 0x00ff0000) >>> 16) / 255;\r\n color.b = ((value & 0x0000ff00) >>> 8) / 255;\r\n color.a = ((value & 0x000000ff)) / 255;\r\n };\r\n Color.rgb888ToColor = function (color, value) {\r\n color.r = ((value & 0x00ff0000) >>> 16) / 255;\r\n color.g = ((value & 0x0000ff00) >>> 8) / 255;\r\n color.b = ((value & 0x000000ff)) / 255;\r\n };\r\n Color.WHITE = new Color(1, 1, 1, 1);\r\n Color.RED = new Color(1, 0, 0, 1);\r\n Color.GREEN = new Color(0, 1, 0, 1);\r\n Color.BLUE = new Color(0, 0, 1, 1);\r\n Color.MAGENTA = new Color(1, 0, 1, 1);\r\n return Color;\r\n }());\r\n spine.Color = Color;\r\n var MathUtils = (function () {\r\n function MathUtils() {\r\n }\r\n MathUtils.clamp = function (value, min, max) {\r\n if (value < min)\r\n return min;\r\n if (value > max)\r\n return max;\r\n return value;\r\n };\r\n MathUtils.cosDeg = function (degrees) {\r\n return Math.cos(degrees * MathUtils.degRad);\r\n };\r\n MathUtils.sinDeg = function (degrees) {\r\n return Math.sin(degrees * MathUtils.degRad);\r\n };\r\n MathUtils.signum = function (value) {\r\n return value > 0 ? 1 : value < 0 ? -1 : 0;\r\n };\r\n MathUtils.toInt = function (x) {\r\n return x > 0 ? Math.floor(x) : Math.ceil(x);\r\n };\r\n MathUtils.cbrt = function (x) {\r\n var y = Math.pow(Math.abs(x), 1 / 3);\r\n return x < 0 ? -y : y;\r\n };\r\n MathUtils.randomTriangular = function (min, max) {\r\n return MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\r\n };\r\n MathUtils.randomTriangularWith = function (min, max, mode) {\r\n var u = Math.random();\r\n var d = max - min;\r\n if (u <= (mode - min) / d)\r\n return min + Math.sqrt(u * d * (mode - min));\r\n return max - Math.sqrt((1 - u) * d * (max - mode));\r\n };\r\n MathUtils.PI = 3.1415927;\r\n MathUtils.PI2 = MathUtils.PI * 2;\r\n MathUtils.radiansToDegrees = 180 / MathUtils.PI;\r\n MathUtils.radDeg = MathUtils.radiansToDegrees;\r\n MathUtils.degreesToRadians = MathUtils.PI / 180;\r\n MathUtils.degRad = MathUtils.degreesToRadians;\r\n return MathUtils;\r\n }());\r\n spine.MathUtils = MathUtils;\r\n var Interpolation = (function () {\r\n function Interpolation() {\r\n }\r\n Interpolation.prototype.apply = function (start, end, a) {\r\n return start + (end - start) * this.applyInternal(a);\r\n };\r\n return Interpolation;\r\n }());\r\n spine.Interpolation = Interpolation;\r\n var Pow = (function (_super) {\r\n __extends(Pow, _super);\r\n function Pow(power) {\r\n var _this = _super.call(this) || this;\r\n _this.power = 2;\r\n _this.power = power;\r\n return _this;\r\n }\r\n Pow.prototype.applyInternal = function (a) {\r\n if (a <= 0.5)\r\n return Math.pow(a * 2, this.power) / 2;\r\n return Math.pow((a - 1) * 2, this.power) / (this.power % 2 == 0 ? -2 : 2) + 1;\r\n };\r\n return Pow;\r\n }(Interpolation));\r\n spine.Pow = Pow;\r\n var PowOut = (function (_super) {\r\n __extends(PowOut, _super);\r\n function PowOut(power) {\r\n return _super.call(this, power) || this;\r\n }\r\n PowOut.prototype.applyInternal = function (a) {\r\n return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\r\n };\r\n return PowOut;\r\n }(Pow));\r\n spine.PowOut = PowOut;\r\n var Utils = (function () {\r\n function Utils() {\r\n }\r\n Utils.arrayCopy = function (source, sourceStart, dest, destStart, numElements) {\r\n for (var i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\r\n dest[j] = source[i];\r\n }\r\n };\r\n Utils.setArraySize = function (array, size, value) {\r\n if (value === void 0) { value = 0; }\r\n var oldSize = array.length;\r\n if (oldSize == size)\r\n return array;\r\n array.length = size;\r\n if (oldSize < size) {\r\n for (var i = oldSize; i < size; i++)\r\n array[i] = value;\r\n }\r\n return array;\r\n };\r\n Utils.ensureArrayCapacity = function (array, size, value) {\r\n if (value === void 0) { value = 0; }\r\n if (array.length >= size)\r\n return array;\r\n return Utils.setArraySize(array, size, value);\r\n };\r\n Utils.newArray = function (size, defaultValue) {\r\n var array = new Array(size);\r\n for (var i = 0; i < size; i++)\r\n array[i] = defaultValue;\r\n return array;\r\n };\r\n Utils.newFloatArray = function (size) {\r\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\r\n return new Float32Array(size);\r\n }\r\n else {\r\n var array = new Array(size);\r\n for (var i = 0; i < array.length; i++)\r\n array[i] = 0;\r\n return array;\r\n }\r\n };\r\n Utils.newShortArray = function (size) {\r\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\r\n return new Int16Array(size);\r\n }\r\n else {\r\n var array = new Array(size);\r\n for (var i = 0; i < array.length; i++)\r\n array[i] = 0;\r\n return array;\r\n }\r\n };\r\n Utils.toFloatArray = function (array) {\r\n return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\r\n };\r\n Utils.toSinglePrecision = function (value) {\r\n return Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;\r\n };\r\n Utils.webkit602BugfixHelper = function (alpha, blend) {\r\n };\r\n Utils.contains = function (array, element, identity) {\r\n if (identity === void 0) { identity = true; }\r\n for (var i = 0; i < array.length; i++) {\r\n if (array[i] == element)\r\n return true;\r\n }\r\n return false;\r\n };\r\n Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== \"undefined\";\r\n return Utils;\r\n }());\r\n spine.Utils = Utils;\r\n var DebugUtils = (function () {\r\n function DebugUtils() {\r\n }\r\n DebugUtils.logBones = function (skeleton) {\r\n for (var i = 0; i < skeleton.bones.length; i++) {\r\n var bone = skeleton.bones[i];\r\n console.log(bone.data.name + \", \" + bone.a + \", \" + bone.b + \", \" + bone.c + \", \" + bone.d + \", \" + bone.worldX + \", \" + bone.worldY);\r\n }\r\n };\r\n return DebugUtils;\r\n }());\r\n spine.DebugUtils = DebugUtils;\r\n var Pool = (function () {\r\n function Pool(instantiator) {\r\n this.items = new Array();\r\n this.instantiator = instantiator;\r\n }\r\n Pool.prototype.obtain = function () {\r\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\r\n };\r\n Pool.prototype.free = function (item) {\r\n if (item.reset)\r\n item.reset();\r\n this.items.push(item);\r\n };\r\n Pool.prototype.freeAll = function (items) {\r\n for (var i = 0; i < items.length; i++) {\r\n this.free(items[i]);\r\n }\r\n };\r\n Pool.prototype.clear = function () {\r\n this.items.length = 0;\r\n };\r\n return Pool;\r\n }());\r\n spine.Pool = Pool;\r\n var Vector2 = (function () {\r\n function Vector2(x, y) {\r\n if (x === void 0) { x = 0; }\r\n if (y === void 0) { y = 0; }\r\n this.x = x;\r\n this.y = y;\r\n }\r\n Vector2.prototype.set = function (x, y) {\r\n this.x = x;\r\n this.y = y;\r\n return this;\r\n };\r\n Vector2.prototype.length = function () {\r\n var x = this.x;\r\n var y = this.y;\r\n return Math.sqrt(x * x + y * y);\r\n };\r\n Vector2.prototype.normalize = function () {\r\n var len = this.length();\r\n if (len != 0) {\r\n this.x /= len;\r\n this.y /= len;\r\n }\r\n return this;\r\n };\r\n return Vector2;\r\n }());\r\n spine.Vector2 = Vector2;\r\n var TimeKeeper = (function () {\r\n function TimeKeeper() {\r\n this.maxDelta = 0.064;\r\n this.framesPerSecond = 0;\r\n this.delta = 0;\r\n this.totalTime = 0;\r\n this.lastTime = Date.now() / 1000;\r\n this.frameCount = 0;\r\n this.frameTime = 0;\r\n }\r\n TimeKeeper.prototype.update = function () {\r\n var now = Date.now() / 1000;\r\n this.delta = now - this.lastTime;\r\n this.frameTime += this.delta;\r\n this.totalTime += this.delta;\r\n if (this.delta > this.maxDelta)\r\n this.delta = this.maxDelta;\r\n this.lastTime = now;\r\n this.frameCount++;\r\n if (this.frameTime > 1) {\r\n this.framesPerSecond = this.frameCount / this.frameTime;\r\n this.frameTime = 0;\r\n this.frameCount = 0;\r\n }\r\n };\r\n return TimeKeeper;\r\n }());\r\n spine.TimeKeeper = TimeKeeper;\r\n var WindowedMean = (function () {\r\n function WindowedMean(windowSize) {\r\n if (windowSize === void 0) { windowSize = 32; }\r\n this.addedValues = 0;\r\n this.lastValue = 0;\r\n this.mean = 0;\r\n this.dirty = true;\r\n this.values = new Array(windowSize);\r\n }\r\n WindowedMean.prototype.hasEnoughData = function () {\r\n return this.addedValues >= this.values.length;\r\n };\r\n WindowedMean.prototype.addValue = function (value) {\r\n if (this.addedValues < this.values.length)\r\n this.addedValues++;\r\n this.values[this.lastValue++] = value;\r\n if (this.lastValue > this.values.length - 1)\r\n this.lastValue = 0;\r\n this.dirty = true;\r\n };\r\n WindowedMean.prototype.getMean = function () {\r\n if (this.hasEnoughData()) {\r\n if (this.dirty) {\r\n var mean = 0;\r\n for (var i = 0; i < this.values.length; i++) {\r\n mean += this.values[i];\r\n }\r\n this.mean = mean / this.values.length;\r\n this.dirty = false;\r\n }\r\n return this.mean;\r\n }\r\n else {\r\n return 0;\r\n }\r\n };\r\n return WindowedMean;\r\n }());\r\n spine.WindowedMean = WindowedMean;\r\n})(spine || (spine = {}));\r\n(function () {\r\n if (!Math.fround) {\r\n Math.fround = (function (array) {\r\n return function (x) {\r\n return array[0] = x, array[0];\r\n };\r\n })(new Float32Array(1));\r\n }\r\n})();\r\nvar spine;\r\n(function (spine) {\r\n var Attachment = (function () {\r\n function Attachment(name) {\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n return Attachment;\r\n }());\r\n spine.Attachment = Attachment;\r\n var VertexAttachment = (function (_super) {\r\n __extends(VertexAttachment, _super);\r\n function VertexAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.id = (VertexAttachment.nextID++ & 65535) << 11;\r\n _this.worldVerticesLength = 0;\r\n _this.deformAttachment = _this;\r\n return _this;\r\n }\r\n VertexAttachment.prototype.computeWorldVertices = function (slot, start, count, worldVertices, offset, stride) {\r\n count = offset + (count >> 1) * stride;\r\n var skeleton = slot.bone.skeleton;\r\n var deformArray = slot.deform;\r\n var vertices = this.vertices;\r\n var bones = this.bones;\r\n if (bones == null) {\r\n if (deformArray.length > 0)\r\n vertices = deformArray;\r\n var bone = slot.bone;\r\n var x = bone.worldX;\r\n var y = bone.worldY;\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n for (var v_1 = start, w = offset; w < count; v_1 += 2, w += stride) {\r\n var vx = vertices[v_1], vy = vertices[v_1 + 1];\r\n worldVertices[w] = vx * a + vy * b + x;\r\n worldVertices[w + 1] = vx * c + vy * d + y;\r\n }\r\n return;\r\n }\r\n var v = 0, skip = 0;\r\n for (var i = 0; i < start; i += 2) {\r\n var n = bones[v];\r\n v += n + 1;\r\n skip += n;\r\n }\r\n var skeletonBones = skeleton.bones;\r\n if (deformArray.length == 0) {\r\n for (var w = offset, b = skip * 3; w < count; w += stride) {\r\n var wx = 0, wy = 0;\r\n var n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3) {\r\n var bone = skeletonBones[bones[v]];\r\n var vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];\r\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\r\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\r\n }\r\n worldVertices[w] = wx;\r\n worldVertices[w + 1] = wy;\r\n }\r\n }\r\n else {\r\n var deform = deformArray;\r\n for (var w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\r\n var wx = 0, wy = 0;\r\n var n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3, f += 2) {\r\n var bone = skeletonBones[bones[v]];\r\n var vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];\r\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\r\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\r\n }\r\n worldVertices[w] = wx;\r\n worldVertices[w + 1] = wy;\r\n }\r\n }\r\n };\r\n VertexAttachment.prototype.copyTo = function (attachment) {\r\n if (this.bones != null) {\r\n attachment.bones = new Array(this.bones.length);\r\n spine.Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\r\n }\r\n else\r\n attachment.bones = null;\r\n if (this.vertices != null) {\r\n attachment.vertices = spine.Utils.newFloatArray(this.vertices.length);\r\n spine.Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\r\n }\r\n else\r\n attachment.vertices = null;\r\n attachment.worldVerticesLength = this.worldVerticesLength;\r\n attachment.deformAttachment = this.deformAttachment;\r\n };\r\n VertexAttachment.nextID = 0;\r\n return VertexAttachment;\r\n }(Attachment));\r\n spine.VertexAttachment = VertexAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AttachmentType;\r\n (function (AttachmentType) {\r\n AttachmentType[AttachmentType[\"Region\"] = 0] = \"Region\";\r\n AttachmentType[AttachmentType[\"BoundingBox\"] = 1] = \"BoundingBox\";\r\n AttachmentType[AttachmentType[\"Mesh\"] = 2] = \"Mesh\";\r\n AttachmentType[AttachmentType[\"LinkedMesh\"] = 3] = \"LinkedMesh\";\r\n AttachmentType[AttachmentType[\"Path\"] = 4] = \"Path\";\r\n AttachmentType[AttachmentType[\"Point\"] = 5] = \"Point\";\r\n AttachmentType[AttachmentType[\"Clipping\"] = 6] = \"Clipping\";\r\n })(AttachmentType = spine.AttachmentType || (spine.AttachmentType = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BoundingBoxAttachment = (function (_super) {\r\n __extends(BoundingBoxAttachment, _super);\r\n function BoundingBoxAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n BoundingBoxAttachment.prototype.copy = function () {\r\n var copy = new BoundingBoxAttachment(name);\r\n this.copyTo(copy);\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return BoundingBoxAttachment;\r\n }(spine.VertexAttachment));\r\n spine.BoundingBoxAttachment = BoundingBoxAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var ClippingAttachment = (function (_super) {\r\n __extends(ClippingAttachment, _super);\r\n function ClippingAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(0.2275, 0.2275, 0.8078, 1);\r\n return _this;\r\n }\r\n ClippingAttachment.prototype.copy = function () {\r\n var copy = new ClippingAttachment(name);\r\n this.copyTo(copy);\r\n copy.endSlot = this.endSlot;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return ClippingAttachment;\r\n }(spine.VertexAttachment));\r\n spine.ClippingAttachment = ClippingAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var MeshAttachment = (function (_super) {\r\n __extends(MeshAttachment, _super);\r\n function MeshAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n _this.tempColor = new spine.Color(0, 0, 0, 0);\r\n return _this;\r\n }\r\n MeshAttachment.prototype.updateUVs = function () {\r\n var regionUVs = this.regionUVs;\r\n if (this.uvs == null || this.uvs.length != regionUVs.length)\r\n this.uvs = spine.Utils.newFloatArray(regionUVs.length);\r\n var uvs = this.uvs;\r\n var n = this.uvs.length;\r\n var u = this.region.u, v = this.region.v, width = 0, height = 0;\r\n if (this.region instanceof spine.TextureAtlasRegion) {\r\n var region = this.region;\r\n var textureWidth = region.texture.getImage().width, textureHeight = region.texture.getImage().height;\r\n switch (region.degrees) {\r\n case 90:\r\n u -= (region.originalHeight - region.offsetY - region.height) / textureWidth;\r\n v -= (region.originalWidth - region.offsetX - region.width) / textureHeight;\r\n width = region.originalHeight / textureWidth;\r\n height = region.originalWidth / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + regionUVs[i + 1] * width;\r\n uvs[i + 1] = v + (1 - regionUVs[i]) * height;\r\n }\r\n return;\r\n case 180:\r\n u -= (region.originalWidth - region.offsetX - region.width) / textureWidth;\r\n v -= region.offsetY / textureHeight;\r\n width = region.originalWidth / textureWidth;\r\n height = region.originalHeight / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + (1 - regionUVs[i]) * width;\r\n uvs[i + 1] = v + (1 - regionUVs[i + 1]) * height;\r\n }\r\n return;\r\n case 270:\r\n u -= region.offsetY / textureWidth;\r\n v -= region.offsetX / textureHeight;\r\n width = region.originalHeight / textureWidth;\r\n height = region.originalWidth / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + (1 - regionUVs[i + 1]) * width;\r\n uvs[i + 1] = v + regionUVs[i] * height;\r\n }\r\n return;\r\n }\r\n u -= region.offsetX / textureWidth;\r\n v -= (region.originalHeight - region.offsetY - region.height) / textureHeight;\r\n width = region.originalWidth / textureWidth;\r\n height = region.originalHeight / textureHeight;\r\n }\r\n else if (this.region == null) {\r\n u = v = 0;\r\n width = height = 1;\r\n }\r\n else {\r\n width = this.region.u2 - u;\r\n height = this.region.v2 - v;\r\n }\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + regionUVs[i] * width;\r\n uvs[i + 1] = v + regionUVs[i + 1] * height;\r\n }\r\n };\r\n MeshAttachment.prototype.getParentMesh = function () {\r\n return this.parentMesh;\r\n };\r\n MeshAttachment.prototype.setParentMesh = function (parentMesh) {\r\n this.parentMesh = parentMesh;\r\n if (parentMesh != null) {\r\n this.bones = parentMesh.bones;\r\n this.vertices = parentMesh.vertices;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n this.regionUVs = parentMesh.regionUVs;\r\n this.triangles = parentMesh.triangles;\r\n this.hullLength = parentMesh.hullLength;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n }\r\n };\r\n MeshAttachment.prototype.copy = function () {\r\n if (this.parentMesh != null)\r\n return this.newLinkedMesh();\r\n var copy = new MeshAttachment(this.name);\r\n copy.region = this.region;\r\n copy.path = this.path;\r\n copy.color.setFromColor(this.color);\r\n this.copyTo(copy);\r\n copy.regionUVs = new Array(this.regionUVs.length);\r\n spine.Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\r\n copy.uvs = new Array(this.uvs.length);\r\n spine.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);\r\n copy.triangles = new Array(this.triangles.length);\r\n spine.Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\r\n copy.hullLength = this.hullLength;\r\n if (this.edges != null) {\r\n copy.edges = new Array(this.edges.length);\r\n spine.Utils.arrayCopy(this.edges, 0, copy.edges, 0, this.edges.length);\r\n }\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n return copy;\r\n };\r\n MeshAttachment.prototype.newLinkedMesh = function () {\r\n var copy = new MeshAttachment(this.name);\r\n copy.region = this.region;\r\n copy.path = this.path;\r\n copy.color.setFromColor(this.color);\r\n copy.deformAttachment = this.deformAttachment;\r\n copy.setParentMesh(this.parentMesh != null ? this.parentMesh : this);\r\n copy.updateUVs();\r\n return copy;\r\n };\r\n return MeshAttachment;\r\n }(spine.VertexAttachment));\r\n spine.MeshAttachment = MeshAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathAttachment = (function (_super) {\r\n __extends(PathAttachment, _super);\r\n function PathAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.closed = false;\r\n _this.constantSpeed = false;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n PathAttachment.prototype.copy = function () {\r\n var copy = new PathAttachment(name);\r\n this.copyTo(copy);\r\n copy.lengths = new Array(this.lengths.length);\r\n spine.Utils.arrayCopy(this.lengths, 0, copy.lengths, 0, this.lengths.length);\r\n copy.closed = closed;\r\n copy.constantSpeed = this.constantSpeed;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return PathAttachment;\r\n }(spine.VertexAttachment));\r\n spine.PathAttachment = PathAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PointAttachment = (function (_super) {\r\n __extends(PointAttachment, _super);\r\n function PointAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(0.38, 0.94, 0, 1);\r\n return _this;\r\n }\r\n PointAttachment.prototype.computeWorldPosition = function (bone, point) {\r\n point.x = this.x * bone.a + this.y * bone.b + bone.worldX;\r\n point.y = this.x * bone.c + this.y * bone.d + bone.worldY;\r\n return point;\r\n };\r\n PointAttachment.prototype.computeWorldRotation = function (bone) {\r\n var cos = spine.MathUtils.cosDeg(this.rotation), sin = spine.MathUtils.sinDeg(this.rotation);\r\n var x = cos * bone.a + sin * bone.b;\r\n var y = cos * bone.c + sin * bone.d;\r\n return Math.atan2(y, x) * spine.MathUtils.radDeg;\r\n };\r\n PointAttachment.prototype.copy = function () {\r\n var copy = new PointAttachment(name);\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.rotation = this.rotation;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return PointAttachment;\r\n }(spine.VertexAttachment));\r\n spine.PointAttachment = PointAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var RegionAttachment = (function (_super) {\r\n __extends(RegionAttachment, _super);\r\n function RegionAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.x = 0;\r\n _this.y = 0;\r\n _this.scaleX = 1;\r\n _this.scaleY = 1;\r\n _this.rotation = 0;\r\n _this.width = 0;\r\n _this.height = 0;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n _this.offset = spine.Utils.newFloatArray(8);\r\n _this.uvs = spine.Utils.newFloatArray(8);\r\n _this.tempColor = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n RegionAttachment.prototype.updateOffset = function () {\r\n var regionScaleX = this.width / this.region.originalWidth * this.scaleX;\r\n var regionScaleY = this.height / this.region.originalHeight * this.scaleY;\r\n var localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\r\n var localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\r\n var localX2 = localX + this.region.width * regionScaleX;\r\n var localY2 = localY + this.region.height * regionScaleY;\r\n var radians = this.rotation * Math.PI / 180;\r\n var cos = Math.cos(radians);\r\n var sin = Math.sin(radians);\r\n var localXCos = localX * cos + this.x;\r\n var localXSin = localX * sin;\r\n var localYCos = localY * cos + this.y;\r\n var localYSin = localY * sin;\r\n var localX2Cos = localX2 * cos + this.x;\r\n var localX2Sin = localX2 * sin;\r\n var localY2Cos = localY2 * cos + this.y;\r\n var localY2Sin = localY2 * sin;\r\n var offset = this.offset;\r\n offset[RegionAttachment.OX1] = localXCos - localYSin;\r\n offset[RegionAttachment.OY1] = localYCos + localXSin;\r\n offset[RegionAttachment.OX2] = localXCos - localY2Sin;\r\n offset[RegionAttachment.OY2] = localY2Cos + localXSin;\r\n offset[RegionAttachment.OX3] = localX2Cos - localY2Sin;\r\n offset[RegionAttachment.OY3] = localY2Cos + localX2Sin;\r\n offset[RegionAttachment.OX4] = localX2Cos - localYSin;\r\n offset[RegionAttachment.OY4] = localYCos + localX2Sin;\r\n };\r\n RegionAttachment.prototype.setRegion = function (region) {\r\n this.region = region;\r\n var uvs = this.uvs;\r\n if (region.rotate) {\r\n uvs[2] = region.u;\r\n uvs[3] = region.v2;\r\n uvs[4] = region.u;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v;\r\n uvs[0] = region.u2;\r\n uvs[1] = region.v2;\r\n }\r\n else {\r\n uvs[0] = region.u;\r\n uvs[1] = region.v2;\r\n uvs[2] = region.u;\r\n uvs[3] = region.v;\r\n uvs[4] = region.u2;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v2;\r\n }\r\n };\r\n RegionAttachment.prototype.computeWorldVertices = function (bone, worldVertices, offset, stride) {\r\n var vertexOffset = this.offset;\r\n var x = bone.worldX, y = bone.worldY;\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var offsetX = 0, offsetY = 0;\r\n offsetX = vertexOffset[RegionAttachment.OX1];\r\n offsetY = vertexOffset[RegionAttachment.OY1];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX2];\r\n offsetY = vertexOffset[RegionAttachment.OY2];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX3];\r\n offsetY = vertexOffset[RegionAttachment.OY3];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX4];\r\n offsetY = vertexOffset[RegionAttachment.OY4];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n };\r\n RegionAttachment.prototype.copy = function () {\r\n var copy = new RegionAttachment(this.name);\r\n copy.region = this.region;\r\n copy.rendererObject = this.rendererObject;\r\n copy.path = this.path;\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.scaleX = this.scaleX;\r\n copy.scaleY = this.scaleY;\r\n copy.rotation = this.rotation;\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n spine.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\r\n spine.Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n RegionAttachment.OX1 = 0;\r\n RegionAttachment.OY1 = 1;\r\n RegionAttachment.OX2 = 2;\r\n RegionAttachment.OY2 = 3;\r\n RegionAttachment.OX3 = 4;\r\n RegionAttachment.OY3 = 5;\r\n RegionAttachment.OX4 = 6;\r\n RegionAttachment.OY4 = 7;\r\n RegionAttachment.X1 = 0;\r\n RegionAttachment.Y1 = 1;\r\n RegionAttachment.C1R = 2;\r\n RegionAttachment.C1G = 3;\r\n RegionAttachment.C1B = 4;\r\n RegionAttachment.C1A = 5;\r\n RegionAttachment.U1 = 6;\r\n RegionAttachment.V1 = 7;\r\n RegionAttachment.X2 = 8;\r\n RegionAttachment.Y2 = 9;\r\n RegionAttachment.C2R = 10;\r\n RegionAttachment.C2G = 11;\r\n RegionAttachment.C2B = 12;\r\n RegionAttachment.C2A = 13;\r\n RegionAttachment.U2 = 14;\r\n RegionAttachment.V2 = 15;\r\n RegionAttachment.X3 = 16;\r\n RegionAttachment.Y3 = 17;\r\n RegionAttachment.C3R = 18;\r\n RegionAttachment.C3G = 19;\r\n RegionAttachment.C3B = 20;\r\n RegionAttachment.C3A = 21;\r\n RegionAttachment.U3 = 22;\r\n RegionAttachment.V3 = 23;\r\n RegionAttachment.X4 = 24;\r\n RegionAttachment.Y4 = 25;\r\n RegionAttachment.C4R = 26;\r\n RegionAttachment.C4G = 27;\r\n RegionAttachment.C4B = 28;\r\n RegionAttachment.C4A = 29;\r\n RegionAttachment.U4 = 30;\r\n RegionAttachment.V4 = 31;\r\n return RegionAttachment;\r\n }(spine.Attachment));\r\n spine.RegionAttachment = RegionAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var JitterEffect = (function () {\r\n function JitterEffect(jitterX, jitterY) {\r\n this.jitterX = 0;\r\n this.jitterY = 0;\r\n this.jitterX = jitterX;\r\n this.jitterY = jitterY;\r\n }\r\n JitterEffect.prototype.begin = function (skeleton) {\r\n };\r\n JitterEffect.prototype.transform = function (position, uv, light, dark) {\r\n position.x += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n position.y += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n };\r\n JitterEffect.prototype.end = function () {\r\n };\r\n return JitterEffect;\r\n }());\r\n spine.JitterEffect = JitterEffect;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SwirlEffect = (function () {\r\n function SwirlEffect(radius) {\r\n this.centerX = 0;\r\n this.centerY = 0;\r\n this.radius = 0;\r\n this.angle = 0;\r\n this.worldX = 0;\r\n this.worldY = 0;\r\n this.radius = radius;\r\n }\r\n SwirlEffect.prototype.begin = function (skeleton) {\r\n this.worldX = skeleton.x + this.centerX;\r\n this.worldY = skeleton.y + this.centerY;\r\n };\r\n SwirlEffect.prototype.transform = function (position, uv, light, dark) {\r\n var radAngle = this.angle * spine.MathUtils.degreesToRadians;\r\n var x = position.x - this.worldX;\r\n var y = position.y - this.worldY;\r\n var dist = Math.sqrt(x * x + y * y);\r\n if (dist < this.radius) {\r\n var theta = SwirlEffect.interpolation.apply(0, radAngle, (this.radius - dist) / this.radius);\r\n var cos = Math.cos(theta);\r\n var sin = Math.sin(theta);\r\n position.x = cos * x - sin * y + this.worldX;\r\n position.y = sin * x + cos * y + this.worldY;\r\n }\r\n };\r\n SwirlEffect.prototype.end = function () {\r\n };\r\n SwirlEffect.interpolation = new spine.PowOut(2);\r\n return SwirlEffect;\r\n }());\r\n spine.SwirlEffect = SwirlEffect;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var canvas;\r\n (function (canvas) {\r\n var AssetManager = (function (_super) {\r\n __extends(AssetManager, _super);\r\n function AssetManager(pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n return _super.call(this, function (image) { return new spine.canvas.CanvasTexture(image); }, pathPrefix) || this;\r\n }\r\n return AssetManager;\r\n }(spine.AssetManager));\r\n canvas.AssetManager = AssetManager;\r\n })(canvas = spine.canvas || (spine.canvas = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var canvas;\r\n (function (canvas) {\r\n var CanvasTexture = (function (_super) {\r\n __extends(CanvasTexture, _super);\r\n function CanvasTexture(image) {\r\n return _super.call(this, image) || this;\r\n }\r\n CanvasTexture.prototype.setFilters = function (minFilter, magFilter) { };\r\n CanvasTexture.prototype.setWraps = function (uWrap, vWrap) { };\r\n CanvasTexture.prototype.dispose = function () { };\r\n return CanvasTexture;\r\n }(spine.Texture));\r\n canvas.CanvasTexture = CanvasTexture;\r\n })(canvas = spine.canvas || (spine.canvas = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var canvas;\r\n (function (canvas) {\r\n var SkeletonRenderer = (function () {\r\n function SkeletonRenderer(context) {\r\n this.triangleRendering = false;\r\n this.debugRendering = false;\r\n this.vertices = spine.Utils.newFloatArray(8 * 1024);\r\n this.tempColor = new spine.Color();\r\n this.ctx = context;\r\n }\r\n SkeletonRenderer.prototype.draw = function (skeleton) {\r\n if (this.triangleRendering)\r\n this.drawTriangles(skeleton);\r\n else\r\n this.drawImages(skeleton);\r\n };\r\n SkeletonRenderer.prototype.drawImages = function (skeleton) {\r\n var ctx = this.ctx;\r\n var drawOrder = skeleton.drawOrder;\r\n if (this.debugRendering)\r\n ctx.strokeStyle = \"green\";\r\n ctx.save();\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var slot = drawOrder[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n var regionAttachment = null;\r\n var region = null;\r\n var image = null;\r\n if (attachment instanceof spine.RegionAttachment) {\r\n regionAttachment = attachment;\r\n region = regionAttachment.region;\r\n image = region.texture.getImage();\r\n }\r\n else\r\n continue;\r\n var skeleton_1 = slot.bone.skeleton;\r\n var skeletonColor = skeleton_1.color;\r\n var slotColor = slot.color;\r\n var regionColor = regionAttachment.color;\r\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * regionColor.r, skeletonColor.g * slotColor.g * regionColor.g, skeletonColor.b * slotColor.b * regionColor.b, alpha);\r\n var att = attachment;\r\n var bone = slot.bone;\r\n var w = region.width;\r\n var h = region.height;\r\n ctx.save();\r\n ctx.transform(bone.a, bone.c, bone.b, bone.d, bone.worldX, bone.worldY);\r\n ctx.translate(attachment.offset[0], attachment.offset[1]);\r\n ctx.rotate(attachment.rotation * Math.PI / 180);\r\n var atlasScale = att.width / w;\r\n ctx.scale(atlasScale * attachment.scaleX, atlasScale * attachment.scaleY);\r\n ctx.translate(w / 2, h / 2);\r\n if (attachment.region.rotate) {\r\n var t = w;\r\n w = h;\r\n h = t;\r\n ctx.rotate(-Math.PI / 2);\r\n }\r\n ctx.scale(1, -1);\r\n ctx.translate(-w / 2, -h / 2);\r\n if (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) {\r\n ctx.globalAlpha = color.a;\r\n }\r\n ctx.drawImage(image, region.x, region.y, w, h, 0, 0, w, h);\r\n if (this.debugRendering)\r\n ctx.strokeRect(0, 0, w, h);\r\n ctx.restore();\r\n }\r\n ctx.restore();\r\n };\r\n SkeletonRenderer.prototype.drawTriangles = function (skeleton) {\r\n var blendMode = null;\r\n var vertices = this.vertices;\r\n var triangles = null;\r\n var drawOrder = skeleton.drawOrder;\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var slot = drawOrder[i];\r\n var attachment = slot.getAttachment();\r\n var texture = null;\r\n var region = null;\r\n if (attachment instanceof spine.RegionAttachment) {\r\n var regionAttachment = attachment;\r\n vertices = this.computeRegionVertices(slot, regionAttachment, false);\r\n triangles = SkeletonRenderer.QUAD_TRIANGLES;\r\n region = regionAttachment.region;\r\n texture = region.texture.getImage();\r\n }\r\n else if (attachment instanceof spine.MeshAttachment) {\r\n var mesh = attachment;\r\n vertices = this.computeMeshVertices(slot, mesh, false);\r\n triangles = mesh.triangles;\r\n texture = mesh.region.renderObject.texture.getImage();\r\n }\r\n else\r\n continue;\r\n if (texture != null) {\r\n var slotBlendMode = slot.data.blendMode;\r\n if (slotBlendMode != blendMode) {\r\n blendMode = slotBlendMode;\r\n }\r\n var skeleton_2 = slot.bone.skeleton;\r\n var skeletonColor = skeleton_2.color;\r\n var slotColor = slot.color;\r\n var attachmentColor = attachment.color;\r\n var alpha = skeletonColor.a * slotColor.a * attachmentColor.a;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * attachmentColor.r, skeletonColor.g * slotColor.g * attachmentColor.g, skeletonColor.b * slotColor.b * attachmentColor.b, alpha);\r\n var ctx = this.ctx;\r\n if (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) {\r\n ctx.globalAlpha = color.a;\r\n }\r\n for (var j = 0; j < triangles.length; j += 3) {\r\n var t1 = triangles[j] * 8, t2 = triangles[j + 1] * 8, t3 = triangles[j + 2] * 8;\r\n var x0 = vertices[t1], y0 = vertices[t1 + 1], u0 = vertices[t1 + 6], v0 = vertices[t1 + 7];\r\n var x1 = vertices[t2], y1 = vertices[t2 + 1], u1 = vertices[t2 + 6], v1 = vertices[t2 + 7];\r\n var x2 = vertices[t3], y2 = vertices[t3 + 1], u2 = vertices[t3 + 6], v2 = vertices[t3 + 7];\r\n this.drawTriangle(texture, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2);\r\n if (this.debugRendering) {\r\n ctx.strokeStyle = \"green\";\r\n ctx.beginPath();\r\n ctx.moveTo(x0, y0);\r\n ctx.lineTo(x1, y1);\r\n ctx.lineTo(x2, y2);\r\n ctx.lineTo(x0, y0);\r\n ctx.stroke();\r\n }\r\n }\r\n }\r\n }\r\n this.ctx.globalAlpha = 1;\r\n };\r\n SkeletonRenderer.prototype.drawTriangle = function (img, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2) {\r\n var ctx = this.ctx;\r\n u0 *= img.width;\r\n v0 *= img.height;\r\n u1 *= img.width;\r\n v1 *= img.height;\r\n u2 *= img.width;\r\n v2 *= img.height;\r\n ctx.beginPath();\r\n ctx.moveTo(x0, y0);\r\n ctx.lineTo(x1, y1);\r\n ctx.lineTo(x2, y2);\r\n ctx.closePath();\r\n x1 -= x0;\r\n y1 -= y0;\r\n x2 -= x0;\r\n y2 -= y0;\r\n u1 -= u0;\r\n v1 -= v0;\r\n u2 -= u0;\r\n v2 -= v0;\r\n var det = 1 / (u1 * v2 - u2 * v1), a = (v2 * x1 - v1 * x2) * det, b = (v2 * y1 - v1 * y2) * det, c = (u1 * x2 - u2 * x1) * det, d = (u1 * y2 - u2 * y1) * det, e = x0 - a * u0 - c * v0, f = y0 - b * u0 - d * v0;\r\n ctx.save();\r\n ctx.transform(a, b, c, d, e, f);\r\n ctx.clip();\r\n ctx.drawImage(img, 0, 0);\r\n ctx.restore();\r\n };\r\n SkeletonRenderer.prototype.computeRegionVertices = function (slot, region, pma) {\r\n var skeleton = slot.bone.skeleton;\r\n var skeletonColor = skeleton.color;\r\n var slotColor = slot.color;\r\n var regionColor = region.color;\r\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n var multiplier = pma ? alpha : 1;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha);\r\n region.computeWorldVertices(slot.bone, this.vertices, 0, SkeletonRenderer.VERTEX_SIZE);\r\n var vertices = this.vertices;\r\n var uvs = region.uvs;\r\n vertices[spine.RegionAttachment.C1R] = color.r;\r\n vertices[spine.RegionAttachment.C1G] = color.g;\r\n vertices[spine.RegionAttachment.C1B] = color.b;\r\n vertices[spine.RegionAttachment.C1A] = color.a;\r\n vertices[spine.RegionAttachment.U1] = uvs[0];\r\n vertices[spine.RegionAttachment.V1] = uvs[1];\r\n vertices[spine.RegionAttachment.C2R] = color.r;\r\n vertices[spine.RegionAttachment.C2G] = color.g;\r\n vertices[spine.RegionAttachment.C2B] = color.b;\r\n vertices[spine.RegionAttachment.C2A] = color.a;\r\n vertices[spine.RegionAttachment.U2] = uvs[2];\r\n vertices[spine.RegionAttachment.V2] = uvs[3];\r\n vertices[spine.RegionAttachment.C3R] = color.r;\r\n vertices[spine.RegionAttachment.C3G] = color.g;\r\n vertices[spine.RegionAttachment.C3B] = color.b;\r\n vertices[spine.RegionAttachment.C3A] = color.a;\r\n vertices[spine.RegionAttachment.U3] = uvs[4];\r\n vertices[spine.RegionAttachment.V3] = uvs[5];\r\n vertices[spine.RegionAttachment.C4R] = color.r;\r\n vertices[spine.RegionAttachment.C4G] = color.g;\r\n vertices[spine.RegionAttachment.C4B] = color.b;\r\n vertices[spine.RegionAttachment.C4A] = color.a;\r\n vertices[spine.RegionAttachment.U4] = uvs[6];\r\n vertices[spine.RegionAttachment.V4] = uvs[7];\r\n return vertices;\r\n };\r\n SkeletonRenderer.prototype.computeMeshVertices = function (slot, mesh, pma) {\r\n var skeleton = slot.bone.skeleton;\r\n var skeletonColor = skeleton.color;\r\n var slotColor = slot.color;\r\n var regionColor = mesh.color;\r\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n var multiplier = pma ? alpha : 1;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha);\r\n var numVertices = mesh.worldVerticesLength / 2;\r\n if (this.vertices.length < mesh.worldVerticesLength) {\r\n this.vertices = spine.Utils.newFloatArray(mesh.worldVerticesLength);\r\n }\r\n var vertices = this.vertices;\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, SkeletonRenderer.VERTEX_SIZE);\r\n var uvs = mesh.uvs;\r\n for (var i = 0, n = numVertices, u = 0, v = 2; i < n; i++) {\r\n vertices[v++] = color.r;\r\n vertices[v++] = color.g;\r\n vertices[v++] = color.b;\r\n vertices[v++] = color.a;\r\n vertices[v++] = uvs[u++];\r\n vertices[v++] = uvs[u++];\r\n v += 2;\r\n }\r\n return vertices;\r\n };\r\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n SkeletonRenderer.VERTEX_SIZE = 2 + 2 + 4;\r\n return SkeletonRenderer;\r\n }());\r\n canvas.SkeletonRenderer = SkeletonRenderer;\r\n })(canvas = spine.canvas || (spine.canvas = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var AssetManager = (function (_super) {\r\n __extends(AssetManager, _super);\r\n function AssetManager(context, pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n return _super.call(this, function (image) {\r\n return new spine.webgl.GLTexture(context, image);\r\n }, pathPrefix) || this;\r\n }\r\n return AssetManager;\r\n }(spine.AssetManager));\r\n webgl.AssetManager = AssetManager;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var OrthoCamera = (function () {\r\n function OrthoCamera(viewportWidth, viewportHeight) {\r\n this.position = new webgl.Vector3(0, 0, 0);\r\n this.direction = new webgl.Vector3(0, 0, -1);\r\n this.up = new webgl.Vector3(0, 1, 0);\r\n this.near = 0;\r\n this.far = 100;\r\n this.zoom = 1;\r\n this.viewportWidth = 0;\r\n this.viewportHeight = 0;\r\n this.projectionView = new webgl.Matrix4();\r\n this.inverseProjectionView = new webgl.Matrix4();\r\n this.projection = new webgl.Matrix4();\r\n this.view = new webgl.Matrix4();\r\n this.tmp = new webgl.Vector3();\r\n this.viewportWidth = viewportWidth;\r\n this.viewportHeight = viewportHeight;\r\n this.update();\r\n }\r\n OrthoCamera.prototype.update = function () {\r\n var projection = this.projection;\r\n var view = this.view;\r\n var projectionView = this.projectionView;\r\n var inverseProjectionView = this.inverseProjectionView;\r\n var zoom = this.zoom, viewportWidth = this.viewportWidth, viewportHeight = this.viewportHeight;\r\n projection.ortho(zoom * (-viewportWidth / 2), zoom * (viewportWidth / 2), zoom * (-viewportHeight / 2), zoom * (viewportHeight / 2), this.near, this.far);\r\n view.lookAt(this.position, this.direction, this.up);\r\n projectionView.set(projection.values);\r\n projectionView.multiply(view);\r\n inverseProjectionView.set(projectionView.values).invert();\r\n };\r\n OrthoCamera.prototype.screenToWorld = function (screenCoords, screenWidth, screenHeight) {\r\n var x = screenCoords.x, y = screenHeight - screenCoords.y - 1;\r\n var tmp = this.tmp;\r\n tmp.x = (2 * x) / screenWidth - 1;\r\n tmp.y = (2 * y) / screenHeight - 1;\r\n tmp.z = (2 * screenCoords.z) - 1;\r\n tmp.project(this.inverseProjectionView);\r\n screenCoords.set(tmp.x, tmp.y, tmp.z);\r\n return screenCoords;\r\n };\r\n OrthoCamera.prototype.setViewport = function (viewportWidth, viewportHeight) {\r\n this.viewportWidth = viewportWidth;\r\n this.viewportHeight = viewportHeight;\r\n };\r\n return OrthoCamera;\r\n }());\r\n webgl.OrthoCamera = OrthoCamera;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var GLTexture = (function (_super) {\r\n __extends(GLTexture, _super);\r\n function GLTexture(context, image, useMipMaps) {\r\n if (useMipMaps === void 0) { useMipMaps = false; }\r\n var _this = _super.call(this, image) || this;\r\n _this.texture = null;\r\n _this.boundUnit = 0;\r\n _this.useMipMaps = false;\r\n _this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n _this.useMipMaps = useMipMaps;\r\n _this.restore();\r\n _this.context.addRestorable(_this);\r\n return _this;\r\n }\r\n GLTexture.prototype.setFilters = function (minFilter, magFilter) {\r\n var gl = this.context.gl;\r\n this.bind();\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, minFilter);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, GLTexture.validateMagFilter(magFilter));\r\n };\r\n GLTexture.validateMagFilter = function (magFilter) {\r\n switch (magFilter) {\r\n case spine.TextureFilter.MipMap:\r\n case spine.TextureFilter.MipMapLinearLinear:\r\n case spine.TextureFilter.MipMapLinearNearest:\r\n case spine.TextureFilter.MipMapNearestLinear:\r\n case spine.TextureFilter.MipMapNearestNearest:\r\n return spine.TextureFilter.Linear;\r\n default:\r\n return magFilter;\r\n }\r\n };\r\n GLTexture.prototype.setWraps = function (uWrap, vWrap) {\r\n var gl = this.context.gl;\r\n this.bind();\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, uWrap);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, vWrap);\r\n };\r\n GLTexture.prototype.update = function (useMipMaps) {\r\n var gl = this.context.gl;\r\n if (!this.texture) {\r\n this.texture = this.context.gl.createTexture();\r\n }\r\n this.bind();\r\n if (GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL)\r\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\r\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this._image);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, useMipMaps ? gl.LINEAR_MIPMAP_LINEAR : gl.LINEAR);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\r\n if (useMipMaps)\r\n gl.generateMipmap(gl.TEXTURE_2D);\r\n };\r\n GLTexture.prototype.restore = function () {\r\n this.texture = null;\r\n this.update(this.useMipMaps);\r\n };\r\n GLTexture.prototype.bind = function (unit) {\r\n if (unit === void 0) { unit = 0; }\r\n var gl = this.context.gl;\r\n this.boundUnit = unit;\r\n gl.activeTexture(gl.TEXTURE0 + unit);\r\n gl.bindTexture(gl.TEXTURE_2D, this.texture);\r\n };\r\n GLTexture.prototype.unbind = function () {\r\n var gl = this.context.gl;\r\n gl.activeTexture(gl.TEXTURE0 + this.boundUnit);\r\n gl.bindTexture(gl.TEXTURE_2D, null);\r\n };\r\n GLTexture.prototype.dispose = function () {\r\n this.context.removeRestorable(this);\r\n var gl = this.context.gl;\r\n gl.deleteTexture(this.texture);\r\n };\r\n GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL = false;\r\n return GLTexture;\r\n }(spine.Texture));\r\n webgl.GLTexture = GLTexture;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n webgl.M00 = 0;\r\n webgl.M01 = 4;\r\n webgl.M02 = 8;\r\n webgl.M03 = 12;\r\n webgl.M10 = 1;\r\n webgl.M11 = 5;\r\n webgl.M12 = 9;\r\n webgl.M13 = 13;\r\n webgl.M20 = 2;\r\n webgl.M21 = 6;\r\n webgl.M22 = 10;\r\n webgl.M23 = 14;\r\n webgl.M30 = 3;\r\n webgl.M31 = 7;\r\n webgl.M32 = 11;\r\n webgl.M33 = 15;\r\n var Matrix4 = (function () {\r\n function Matrix4() {\r\n this.temp = new Float32Array(16);\r\n this.values = new Float32Array(16);\r\n var v = this.values;\r\n v[webgl.M00] = 1;\r\n v[webgl.M11] = 1;\r\n v[webgl.M22] = 1;\r\n v[webgl.M33] = 1;\r\n }\r\n Matrix4.prototype.set = function (values) {\r\n this.values.set(values);\r\n return this;\r\n };\r\n Matrix4.prototype.transpose = function () {\r\n var t = this.temp;\r\n var v = this.values;\r\n t[webgl.M00] = v[webgl.M00];\r\n t[webgl.M01] = v[webgl.M10];\r\n t[webgl.M02] = v[webgl.M20];\r\n t[webgl.M03] = v[webgl.M30];\r\n t[webgl.M10] = v[webgl.M01];\r\n t[webgl.M11] = v[webgl.M11];\r\n t[webgl.M12] = v[webgl.M21];\r\n t[webgl.M13] = v[webgl.M31];\r\n t[webgl.M20] = v[webgl.M02];\r\n t[webgl.M21] = v[webgl.M12];\r\n t[webgl.M22] = v[webgl.M22];\r\n t[webgl.M23] = v[webgl.M32];\r\n t[webgl.M30] = v[webgl.M03];\r\n t[webgl.M31] = v[webgl.M13];\r\n t[webgl.M32] = v[webgl.M23];\r\n t[webgl.M33] = v[webgl.M33];\r\n return this.set(t);\r\n };\r\n Matrix4.prototype.identity = function () {\r\n var v = this.values;\r\n v[webgl.M00] = 1;\r\n v[webgl.M01] = 0;\r\n v[webgl.M02] = 0;\r\n v[webgl.M03] = 0;\r\n v[webgl.M10] = 0;\r\n v[webgl.M11] = 1;\r\n v[webgl.M12] = 0;\r\n v[webgl.M13] = 0;\r\n v[webgl.M20] = 0;\r\n v[webgl.M21] = 0;\r\n v[webgl.M22] = 1;\r\n v[webgl.M23] = 0;\r\n v[webgl.M30] = 0;\r\n v[webgl.M31] = 0;\r\n v[webgl.M32] = 0;\r\n v[webgl.M33] = 1;\r\n return this;\r\n };\r\n Matrix4.prototype.invert = function () {\r\n var v = this.values;\r\n var t = this.temp;\r\n var l_det = v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03]\r\n + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03]\r\n - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13]\r\n - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13]\r\n + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23]\r\n + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23]\r\n - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33]\r\n - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\r\n if (l_det == 0)\r\n throw new Error(\"non-invertible matrix\");\r\n var inv_det = 1.0 / l_det;\r\n t[webgl.M00] = v[webgl.M12] * v[webgl.M23] * v[webgl.M31] - v[webgl.M13] * v[webgl.M22] * v[webgl.M31] + v[webgl.M13] * v[webgl.M21] * v[webgl.M32]\r\n - v[webgl.M11] * v[webgl.M23] * v[webgl.M32] - v[webgl.M12] * v[webgl.M21] * v[webgl.M33] + v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M01] = v[webgl.M03] * v[webgl.M22] * v[webgl.M31] - v[webgl.M02] * v[webgl.M23] * v[webgl.M31] - v[webgl.M03] * v[webgl.M21] * v[webgl.M32]\r\n + v[webgl.M01] * v[webgl.M23] * v[webgl.M32] + v[webgl.M02] * v[webgl.M21] * v[webgl.M33] - v[webgl.M01] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M02] = v[webgl.M02] * v[webgl.M13] * v[webgl.M31] - v[webgl.M03] * v[webgl.M12] * v[webgl.M31] + v[webgl.M03] * v[webgl.M11] * v[webgl.M32]\r\n - v[webgl.M01] * v[webgl.M13] * v[webgl.M32] - v[webgl.M02] * v[webgl.M11] * v[webgl.M33] + v[webgl.M01] * v[webgl.M12] * v[webgl.M33];\r\n t[webgl.M03] = v[webgl.M03] * v[webgl.M12] * v[webgl.M21] - v[webgl.M02] * v[webgl.M13] * v[webgl.M21] - v[webgl.M03] * v[webgl.M11] * v[webgl.M22]\r\n + v[webgl.M01] * v[webgl.M13] * v[webgl.M22] + v[webgl.M02] * v[webgl.M11] * v[webgl.M23] - v[webgl.M01] * v[webgl.M12] * v[webgl.M23];\r\n t[webgl.M10] = v[webgl.M13] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M20] * v[webgl.M32]\r\n + v[webgl.M10] * v[webgl.M23] * v[webgl.M32] + v[webgl.M12] * v[webgl.M20] * v[webgl.M33] - v[webgl.M10] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M11] = v[webgl.M02] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M22] * v[webgl.M30] + v[webgl.M03] * v[webgl.M20] * v[webgl.M32]\r\n - v[webgl.M00] * v[webgl.M23] * v[webgl.M32] - v[webgl.M02] * v[webgl.M20] * v[webgl.M33] + v[webgl.M00] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M12] = v[webgl.M03] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M10] * v[webgl.M32]\r\n + v[webgl.M00] * v[webgl.M13] * v[webgl.M32] + v[webgl.M02] * v[webgl.M10] * v[webgl.M33] - v[webgl.M00] * v[webgl.M12] * v[webgl.M33];\r\n t[webgl.M13] = v[webgl.M02] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M12] * v[webgl.M20] + v[webgl.M03] * v[webgl.M10] * v[webgl.M22]\r\n - v[webgl.M00] * v[webgl.M13] * v[webgl.M22] - v[webgl.M02] * v[webgl.M10] * v[webgl.M23] + v[webgl.M00] * v[webgl.M12] * v[webgl.M23];\r\n t[webgl.M20] = v[webgl.M11] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M21] * v[webgl.M30] + v[webgl.M13] * v[webgl.M20] * v[webgl.M31]\r\n - v[webgl.M10] * v[webgl.M23] * v[webgl.M31] - v[webgl.M11] * v[webgl.M20] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M33];\r\n t[webgl.M21] = v[webgl.M03] * v[webgl.M21] * v[webgl.M30] - v[webgl.M01] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M20] * v[webgl.M31]\r\n + v[webgl.M00] * v[webgl.M23] * v[webgl.M31] + v[webgl.M01] * v[webgl.M20] * v[webgl.M33] - v[webgl.M00] * v[webgl.M21] * v[webgl.M33];\r\n t[webgl.M22] = v[webgl.M01] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M11] * v[webgl.M30] + v[webgl.M03] * v[webgl.M10] * v[webgl.M31]\r\n - v[webgl.M00] * v[webgl.M13] * v[webgl.M31] - v[webgl.M01] * v[webgl.M10] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M33];\r\n t[webgl.M23] = v[webgl.M03] * v[webgl.M11] * v[webgl.M20] - v[webgl.M01] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M10] * v[webgl.M21]\r\n + v[webgl.M00] * v[webgl.M13] * v[webgl.M21] + v[webgl.M01] * v[webgl.M10] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M23];\r\n t[webgl.M30] = v[webgl.M12] * v[webgl.M21] * v[webgl.M30] - v[webgl.M11] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M20] * v[webgl.M31]\r\n + v[webgl.M10] * v[webgl.M22] * v[webgl.M31] + v[webgl.M11] * v[webgl.M20] * v[webgl.M32] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32];\r\n t[webgl.M31] = v[webgl.M01] * v[webgl.M22] * v[webgl.M30] - v[webgl.M02] * v[webgl.M21] * v[webgl.M30] + v[webgl.M02] * v[webgl.M20] * v[webgl.M31]\r\n - v[webgl.M00] * v[webgl.M22] * v[webgl.M31] - v[webgl.M01] * v[webgl.M20] * v[webgl.M32] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32];\r\n t[webgl.M32] = v[webgl.M02] * v[webgl.M11] * v[webgl.M30] - v[webgl.M01] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M10] * v[webgl.M31]\r\n + v[webgl.M00] * v[webgl.M12] * v[webgl.M31] + v[webgl.M01] * v[webgl.M10] * v[webgl.M32] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32];\r\n t[webgl.M33] = v[webgl.M01] * v[webgl.M12] * v[webgl.M20] - v[webgl.M02] * v[webgl.M11] * v[webgl.M20] + v[webgl.M02] * v[webgl.M10] * v[webgl.M21]\r\n - v[webgl.M00] * v[webgl.M12] * v[webgl.M21] - v[webgl.M01] * v[webgl.M10] * v[webgl.M22] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22];\r\n v[webgl.M00] = t[webgl.M00] * inv_det;\r\n v[webgl.M01] = t[webgl.M01] * inv_det;\r\n v[webgl.M02] = t[webgl.M02] * inv_det;\r\n v[webgl.M03] = t[webgl.M03] * inv_det;\r\n v[webgl.M10] = t[webgl.M10] * inv_det;\r\n v[webgl.M11] = t[webgl.M11] * inv_det;\r\n v[webgl.M12] = t[webgl.M12] * inv_det;\r\n v[webgl.M13] = t[webgl.M13] * inv_det;\r\n v[webgl.M20] = t[webgl.M20] * inv_det;\r\n v[webgl.M21] = t[webgl.M21] * inv_det;\r\n v[webgl.M22] = t[webgl.M22] * inv_det;\r\n v[webgl.M23] = t[webgl.M23] * inv_det;\r\n v[webgl.M30] = t[webgl.M30] * inv_det;\r\n v[webgl.M31] = t[webgl.M31] * inv_det;\r\n v[webgl.M32] = t[webgl.M32] * inv_det;\r\n v[webgl.M33] = t[webgl.M33] * inv_det;\r\n return this;\r\n };\r\n Matrix4.prototype.determinant = function () {\r\n var v = this.values;\r\n return v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03]\r\n + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03]\r\n - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13]\r\n - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13]\r\n + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23]\r\n + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23]\r\n - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33]\r\n - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\r\n };\r\n Matrix4.prototype.translate = function (x, y, z) {\r\n var v = this.values;\r\n v[webgl.M03] += x;\r\n v[webgl.M13] += y;\r\n v[webgl.M23] += z;\r\n return this;\r\n };\r\n Matrix4.prototype.copy = function () {\r\n return new Matrix4().set(this.values);\r\n };\r\n Matrix4.prototype.projection = function (near, far, fovy, aspectRatio) {\r\n this.identity();\r\n var l_fd = (1.0 / Math.tan((fovy * (Math.PI / 180)) / 2.0));\r\n var l_a1 = (far + near) / (near - far);\r\n var l_a2 = (2 * far * near) / (near - far);\r\n var v = this.values;\r\n v[webgl.M00] = l_fd / aspectRatio;\r\n v[webgl.M10] = 0;\r\n v[webgl.M20] = 0;\r\n v[webgl.M30] = 0;\r\n v[webgl.M01] = 0;\r\n v[webgl.M11] = l_fd;\r\n v[webgl.M21] = 0;\r\n v[webgl.M31] = 0;\r\n v[webgl.M02] = 0;\r\n v[webgl.M12] = 0;\r\n v[webgl.M22] = l_a1;\r\n v[webgl.M32] = -1;\r\n v[webgl.M03] = 0;\r\n v[webgl.M13] = 0;\r\n v[webgl.M23] = l_a2;\r\n v[webgl.M33] = 0;\r\n return this;\r\n };\r\n Matrix4.prototype.ortho2d = function (x, y, width, height) {\r\n return this.ortho(x, x + width, y, y + height, 0, 1);\r\n };\r\n Matrix4.prototype.ortho = function (left, right, bottom, top, near, far) {\r\n this.identity();\r\n var x_orth = 2 / (right - left);\r\n var y_orth = 2 / (top - bottom);\r\n var z_orth = -2 / (far - near);\r\n var tx = -(right + left) / (right - left);\r\n var ty = -(top + bottom) / (top - bottom);\r\n var tz = -(far + near) / (far - near);\r\n var v = this.values;\r\n v[webgl.M00] = x_orth;\r\n v[webgl.M10] = 0;\r\n v[webgl.M20] = 0;\r\n v[webgl.M30] = 0;\r\n v[webgl.M01] = 0;\r\n v[webgl.M11] = y_orth;\r\n v[webgl.M21] = 0;\r\n v[webgl.M31] = 0;\r\n v[webgl.M02] = 0;\r\n v[webgl.M12] = 0;\r\n v[webgl.M22] = z_orth;\r\n v[webgl.M32] = 0;\r\n v[webgl.M03] = tx;\r\n v[webgl.M13] = ty;\r\n v[webgl.M23] = tz;\r\n v[webgl.M33] = 1;\r\n return this;\r\n };\r\n Matrix4.prototype.multiply = function (matrix) {\r\n var t = this.temp;\r\n var v = this.values;\r\n var m = matrix.values;\r\n t[webgl.M00] = v[webgl.M00] * m[webgl.M00] + v[webgl.M01] * m[webgl.M10] + v[webgl.M02] * m[webgl.M20] + v[webgl.M03] * m[webgl.M30];\r\n t[webgl.M01] = v[webgl.M00] * m[webgl.M01] + v[webgl.M01] * m[webgl.M11] + v[webgl.M02] * m[webgl.M21] + v[webgl.M03] * m[webgl.M31];\r\n t[webgl.M02] = v[webgl.M00] * m[webgl.M02] + v[webgl.M01] * m[webgl.M12] + v[webgl.M02] * m[webgl.M22] + v[webgl.M03] * m[webgl.M32];\r\n t[webgl.M03] = v[webgl.M00] * m[webgl.M03] + v[webgl.M01] * m[webgl.M13] + v[webgl.M02] * m[webgl.M23] + v[webgl.M03] * m[webgl.M33];\r\n t[webgl.M10] = v[webgl.M10] * m[webgl.M00] + v[webgl.M11] * m[webgl.M10] + v[webgl.M12] * m[webgl.M20] + v[webgl.M13] * m[webgl.M30];\r\n t[webgl.M11] = v[webgl.M10] * m[webgl.M01] + v[webgl.M11] * m[webgl.M11] + v[webgl.M12] * m[webgl.M21] + v[webgl.M13] * m[webgl.M31];\r\n t[webgl.M12] = v[webgl.M10] * m[webgl.M02] + v[webgl.M11] * m[webgl.M12] + v[webgl.M12] * m[webgl.M22] + v[webgl.M13] * m[webgl.M32];\r\n t[webgl.M13] = v[webgl.M10] * m[webgl.M03] + v[webgl.M11] * m[webgl.M13] + v[webgl.M12] * m[webgl.M23] + v[webgl.M13] * m[webgl.M33];\r\n t[webgl.M20] = v[webgl.M20] * m[webgl.M00] + v[webgl.M21] * m[webgl.M10] + v[webgl.M22] * m[webgl.M20] + v[webgl.M23] * m[webgl.M30];\r\n t[webgl.M21] = v[webgl.M20] * m[webgl.M01] + v[webgl.M21] * m[webgl.M11] + v[webgl.M22] * m[webgl.M21] + v[webgl.M23] * m[webgl.M31];\r\n t[webgl.M22] = v[webgl.M20] * m[webgl.M02] + v[webgl.M21] * m[webgl.M12] + v[webgl.M22] * m[webgl.M22] + v[webgl.M23] * m[webgl.M32];\r\n t[webgl.M23] = v[webgl.M20] * m[webgl.M03] + v[webgl.M21] * m[webgl.M13] + v[webgl.M22] * m[webgl.M23] + v[webgl.M23] * m[webgl.M33];\r\n t[webgl.M30] = v[webgl.M30] * m[webgl.M00] + v[webgl.M31] * m[webgl.M10] + v[webgl.M32] * m[webgl.M20] + v[webgl.M33] * m[webgl.M30];\r\n t[webgl.M31] = v[webgl.M30] * m[webgl.M01] + v[webgl.M31] * m[webgl.M11] + v[webgl.M32] * m[webgl.M21] + v[webgl.M33] * m[webgl.M31];\r\n t[webgl.M32] = v[webgl.M30] * m[webgl.M02] + v[webgl.M31] * m[webgl.M12] + v[webgl.M32] * m[webgl.M22] + v[webgl.M33] * m[webgl.M32];\r\n t[webgl.M33] = v[webgl.M30] * m[webgl.M03] + v[webgl.M31] * m[webgl.M13] + v[webgl.M32] * m[webgl.M23] + v[webgl.M33] * m[webgl.M33];\r\n return this.set(this.temp);\r\n };\r\n Matrix4.prototype.multiplyLeft = function (matrix) {\r\n var t = this.temp;\r\n var v = this.values;\r\n var m = matrix.values;\r\n t[webgl.M00] = m[webgl.M00] * v[webgl.M00] + m[webgl.M01] * v[webgl.M10] + m[webgl.M02] * v[webgl.M20] + m[webgl.M03] * v[webgl.M30];\r\n t[webgl.M01] = m[webgl.M00] * v[webgl.M01] + m[webgl.M01] * v[webgl.M11] + m[webgl.M02] * v[webgl.M21] + m[webgl.M03] * v[webgl.M31];\r\n t[webgl.M02] = m[webgl.M00] * v[webgl.M02] + m[webgl.M01] * v[webgl.M12] + m[webgl.M02] * v[webgl.M22] + m[webgl.M03] * v[webgl.M32];\r\n t[webgl.M03] = m[webgl.M00] * v[webgl.M03] + m[webgl.M01] * v[webgl.M13] + m[webgl.M02] * v[webgl.M23] + m[webgl.M03] * v[webgl.M33];\r\n t[webgl.M10] = m[webgl.M10] * v[webgl.M00] + m[webgl.M11] * v[webgl.M10] + m[webgl.M12] * v[webgl.M20] + m[webgl.M13] * v[webgl.M30];\r\n t[webgl.M11] = m[webgl.M10] * v[webgl.M01] + m[webgl.M11] * v[webgl.M11] + m[webgl.M12] * v[webgl.M21] + m[webgl.M13] * v[webgl.M31];\r\n t[webgl.M12] = m[webgl.M10] * v[webgl.M02] + m[webgl.M11] * v[webgl.M12] + m[webgl.M12] * v[webgl.M22] + m[webgl.M13] * v[webgl.M32];\r\n t[webgl.M13] = m[webgl.M10] * v[webgl.M03] + m[webgl.M11] * v[webgl.M13] + m[webgl.M12] * v[webgl.M23] + m[webgl.M13] * v[webgl.M33];\r\n t[webgl.M20] = m[webgl.M20] * v[webgl.M00] + m[webgl.M21] * v[webgl.M10] + m[webgl.M22] * v[webgl.M20] + m[webgl.M23] * v[webgl.M30];\r\n t[webgl.M21] = m[webgl.M20] * v[webgl.M01] + m[webgl.M21] * v[webgl.M11] + m[webgl.M22] * v[webgl.M21] + m[webgl.M23] * v[webgl.M31];\r\n t[webgl.M22] = m[webgl.M20] * v[webgl.M02] + m[webgl.M21] * v[webgl.M12] + m[webgl.M22] * v[webgl.M22] + m[webgl.M23] * v[webgl.M32];\r\n t[webgl.M23] = m[webgl.M20] * v[webgl.M03] + m[webgl.M21] * v[webgl.M13] + m[webgl.M22] * v[webgl.M23] + m[webgl.M23] * v[webgl.M33];\r\n t[webgl.M30] = m[webgl.M30] * v[webgl.M00] + m[webgl.M31] * v[webgl.M10] + m[webgl.M32] * v[webgl.M20] + m[webgl.M33] * v[webgl.M30];\r\n t[webgl.M31] = m[webgl.M30] * v[webgl.M01] + m[webgl.M31] * v[webgl.M11] + m[webgl.M32] * v[webgl.M21] + m[webgl.M33] * v[webgl.M31];\r\n t[webgl.M32] = m[webgl.M30] * v[webgl.M02] + m[webgl.M31] * v[webgl.M12] + m[webgl.M32] * v[webgl.M22] + m[webgl.M33] * v[webgl.M32];\r\n t[webgl.M33] = m[webgl.M30] * v[webgl.M03] + m[webgl.M31] * v[webgl.M13] + m[webgl.M32] * v[webgl.M23] + m[webgl.M33] * v[webgl.M33];\r\n return this.set(this.temp);\r\n };\r\n Matrix4.prototype.lookAt = function (position, direction, up) {\r\n Matrix4.initTemps();\r\n var xAxis = Matrix4.xAxis, yAxis = Matrix4.yAxis, zAxis = Matrix4.zAxis;\r\n zAxis.setFrom(direction).normalize();\r\n xAxis.setFrom(direction).normalize();\r\n xAxis.cross(up).normalize();\r\n yAxis.setFrom(xAxis).cross(zAxis).normalize();\r\n this.identity();\r\n var val = this.values;\r\n val[webgl.M00] = xAxis.x;\r\n val[webgl.M01] = xAxis.y;\r\n val[webgl.M02] = xAxis.z;\r\n val[webgl.M10] = yAxis.x;\r\n val[webgl.M11] = yAxis.y;\r\n val[webgl.M12] = yAxis.z;\r\n val[webgl.M20] = -zAxis.x;\r\n val[webgl.M21] = -zAxis.y;\r\n val[webgl.M22] = -zAxis.z;\r\n Matrix4.tmpMatrix.identity();\r\n Matrix4.tmpMatrix.values[webgl.M03] = -position.x;\r\n Matrix4.tmpMatrix.values[webgl.M13] = -position.y;\r\n Matrix4.tmpMatrix.values[webgl.M23] = -position.z;\r\n this.multiply(Matrix4.tmpMatrix);\r\n return this;\r\n };\r\n Matrix4.initTemps = function () {\r\n if (Matrix4.xAxis === null)\r\n Matrix4.xAxis = new webgl.Vector3();\r\n if (Matrix4.yAxis === null)\r\n Matrix4.yAxis = new webgl.Vector3();\r\n if (Matrix4.zAxis === null)\r\n Matrix4.zAxis = new webgl.Vector3();\r\n };\r\n Matrix4.xAxis = null;\r\n Matrix4.yAxis = null;\r\n Matrix4.zAxis = null;\r\n Matrix4.tmpMatrix = new Matrix4();\r\n return Matrix4;\r\n }());\r\n webgl.Matrix4 = Matrix4;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Mesh = (function () {\r\n function Mesh(context, attributes, maxVertices, maxIndices) {\r\n this.attributes = attributes;\r\n this.verticesLength = 0;\r\n this.dirtyVertices = false;\r\n this.indicesLength = 0;\r\n this.dirtyIndices = false;\r\n this.elementsPerVertex = 0;\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.elementsPerVertex = 0;\r\n for (var i = 0; i < attributes.length; i++) {\r\n this.elementsPerVertex += attributes[i].numElements;\r\n }\r\n this.vertices = new Float32Array(maxVertices * this.elementsPerVertex);\r\n this.indices = new Uint16Array(maxIndices);\r\n this.context.addRestorable(this);\r\n }\r\n Mesh.prototype.getAttributes = function () { return this.attributes; };\r\n Mesh.prototype.maxVertices = function () { return this.vertices.length / this.elementsPerVertex; };\r\n Mesh.prototype.numVertices = function () { return this.verticesLength / this.elementsPerVertex; };\r\n Mesh.prototype.setVerticesLength = function (length) {\r\n this.dirtyVertices = true;\r\n this.verticesLength = length;\r\n };\r\n Mesh.prototype.getVertices = function () { return this.vertices; };\r\n Mesh.prototype.maxIndices = function () { return this.indices.length; };\r\n Mesh.prototype.numIndices = function () { return this.indicesLength; };\r\n Mesh.prototype.setIndicesLength = function (length) {\r\n this.dirtyIndices = true;\r\n this.indicesLength = length;\r\n };\r\n Mesh.prototype.getIndices = function () { return this.indices; };\r\n ;\r\n Mesh.prototype.getVertexSizeInFloats = function () {\r\n var size = 0;\r\n for (var i = 0; i < this.attributes.length; i++) {\r\n var attribute = this.attributes[i];\r\n size += attribute.numElements;\r\n }\r\n return size;\r\n };\r\n Mesh.prototype.setVertices = function (vertices) {\r\n this.dirtyVertices = true;\r\n if (vertices.length > this.vertices.length)\r\n throw Error(\"Mesh can't store more than \" + this.maxVertices() + \" vertices\");\r\n this.vertices.set(vertices, 0);\r\n this.verticesLength = vertices.length;\r\n };\r\n Mesh.prototype.setIndices = function (indices) {\r\n this.dirtyIndices = true;\r\n if (indices.length > this.indices.length)\r\n throw Error(\"Mesh can't store more than \" + this.maxIndices() + \" indices\");\r\n this.indices.set(indices, 0);\r\n this.indicesLength = indices.length;\r\n };\r\n Mesh.prototype.draw = function (shader, primitiveType) {\r\n this.drawWithOffset(shader, primitiveType, 0, this.indicesLength > 0 ? this.indicesLength : this.verticesLength / this.elementsPerVertex);\r\n };\r\n Mesh.prototype.drawWithOffset = function (shader, primitiveType, offset, count) {\r\n var gl = this.context.gl;\r\n if (this.dirtyVertices || this.dirtyIndices)\r\n this.update();\r\n this.bind(shader);\r\n if (this.indicesLength > 0) {\r\n gl.drawElements(primitiveType, count, gl.UNSIGNED_SHORT, offset * 2);\r\n }\r\n else {\r\n gl.drawArrays(primitiveType, offset, count);\r\n }\r\n this.unbind(shader);\r\n };\r\n Mesh.prototype.bind = function (shader) {\r\n var gl = this.context.gl;\r\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\r\n var offset = 0;\r\n for (var i = 0; i < this.attributes.length; i++) {\r\n var attrib = this.attributes[i];\r\n var location_1 = shader.getAttributeLocation(attrib.name);\r\n gl.enableVertexAttribArray(location_1);\r\n gl.vertexAttribPointer(location_1, attrib.numElements, gl.FLOAT, false, this.elementsPerVertex * 4, offset * 4);\r\n offset += attrib.numElements;\r\n }\r\n if (this.indicesLength > 0)\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\r\n };\r\n Mesh.prototype.unbind = function (shader) {\r\n var gl = this.context.gl;\r\n for (var i = 0; i < this.attributes.length; i++) {\r\n var attrib = this.attributes[i];\r\n var location_2 = shader.getAttributeLocation(attrib.name);\r\n gl.disableVertexAttribArray(location_2);\r\n }\r\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\r\n if (this.indicesLength > 0)\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);\r\n };\r\n Mesh.prototype.update = function () {\r\n var gl = this.context.gl;\r\n if (this.dirtyVertices) {\r\n if (!this.verticesBuffer) {\r\n this.verticesBuffer = gl.createBuffer();\r\n }\r\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\r\n gl.bufferData(gl.ARRAY_BUFFER, this.vertices.subarray(0, this.verticesLength), gl.DYNAMIC_DRAW);\r\n this.dirtyVertices = false;\r\n }\r\n if (this.dirtyIndices) {\r\n if (!this.indicesBuffer) {\r\n this.indicesBuffer = gl.createBuffer();\r\n }\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\r\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, this.indices.subarray(0, this.indicesLength), gl.DYNAMIC_DRAW);\r\n this.dirtyIndices = false;\r\n }\r\n };\r\n Mesh.prototype.restore = function () {\r\n this.verticesBuffer = null;\r\n this.indicesBuffer = null;\r\n this.update();\r\n };\r\n Mesh.prototype.dispose = function () {\r\n this.context.removeRestorable(this);\r\n var gl = this.context.gl;\r\n gl.deleteBuffer(this.verticesBuffer);\r\n gl.deleteBuffer(this.indicesBuffer);\r\n };\r\n return Mesh;\r\n }());\r\n webgl.Mesh = Mesh;\r\n var VertexAttribute = (function () {\r\n function VertexAttribute(name, type, numElements) {\r\n this.name = name;\r\n this.type = type;\r\n this.numElements = numElements;\r\n }\r\n return VertexAttribute;\r\n }());\r\n webgl.VertexAttribute = VertexAttribute;\r\n var Position2Attribute = (function (_super) {\r\n __extends(Position2Attribute, _super);\r\n function Position2Attribute() {\r\n return _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 2) || this;\r\n }\r\n return Position2Attribute;\r\n }(VertexAttribute));\r\n webgl.Position2Attribute = Position2Attribute;\r\n var Position3Attribute = (function (_super) {\r\n __extends(Position3Attribute, _super);\r\n function Position3Attribute() {\r\n return _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 3) || this;\r\n }\r\n return Position3Attribute;\r\n }(VertexAttribute));\r\n webgl.Position3Attribute = Position3Attribute;\r\n var TexCoordAttribute = (function (_super) {\r\n __extends(TexCoordAttribute, _super);\r\n function TexCoordAttribute(unit) {\r\n if (unit === void 0) { unit = 0; }\r\n return _super.call(this, webgl.Shader.TEXCOORDS + (unit == 0 ? \"\" : unit), VertexAttributeType.Float, 2) || this;\r\n }\r\n return TexCoordAttribute;\r\n }(VertexAttribute));\r\n webgl.TexCoordAttribute = TexCoordAttribute;\r\n var ColorAttribute = (function (_super) {\r\n __extends(ColorAttribute, _super);\r\n function ColorAttribute() {\r\n return _super.call(this, webgl.Shader.COLOR, VertexAttributeType.Float, 4) || this;\r\n }\r\n return ColorAttribute;\r\n }(VertexAttribute));\r\n webgl.ColorAttribute = ColorAttribute;\r\n var Color2Attribute = (function (_super) {\r\n __extends(Color2Attribute, _super);\r\n function Color2Attribute() {\r\n return _super.call(this, webgl.Shader.COLOR2, VertexAttributeType.Float, 4) || this;\r\n }\r\n return Color2Attribute;\r\n }(VertexAttribute));\r\n webgl.Color2Attribute = Color2Attribute;\r\n var VertexAttributeType;\r\n (function (VertexAttributeType) {\r\n VertexAttributeType[VertexAttributeType[\"Float\"] = 0] = \"Float\";\r\n })(VertexAttributeType = webgl.VertexAttributeType || (webgl.VertexAttributeType = {}));\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var PolygonBatcher = (function () {\r\n function PolygonBatcher(context, twoColorTint, maxVertices) {\r\n if (twoColorTint === void 0) { twoColorTint = true; }\r\n if (maxVertices === void 0) { maxVertices = 10920; }\r\n this.isDrawing = false;\r\n this.shader = null;\r\n this.lastTexture = null;\r\n this.verticesLength = 0;\r\n this.indicesLength = 0;\r\n if (maxVertices > 10920)\r\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n var attributes = twoColorTint ?\r\n [new webgl.Position2Attribute(), new webgl.ColorAttribute(), new webgl.TexCoordAttribute(), new webgl.Color2Attribute()] :\r\n [new webgl.Position2Attribute(), new webgl.ColorAttribute(), new webgl.TexCoordAttribute()];\r\n this.mesh = new webgl.Mesh(context, attributes, maxVertices, maxVertices * 3);\r\n this.srcBlend = this.context.gl.SRC_ALPHA;\r\n this.dstBlend = this.context.gl.ONE_MINUS_SRC_ALPHA;\r\n }\r\n PolygonBatcher.prototype.begin = function (shader) {\r\n var gl = this.context.gl;\r\n if (this.isDrawing)\r\n throw new Error(\"PolygonBatch is already drawing. Call PolygonBatch.end() before calling PolygonBatch.begin()\");\r\n this.drawCalls = 0;\r\n this.shader = shader;\r\n this.lastTexture = null;\r\n this.isDrawing = true;\r\n gl.enable(gl.BLEND);\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n };\r\n PolygonBatcher.prototype.setBlendMode = function (srcBlend, dstBlend) {\r\n var gl = this.context.gl;\r\n this.srcBlend = srcBlend;\r\n this.dstBlend = dstBlend;\r\n if (this.isDrawing) {\r\n this.flush();\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n }\r\n };\r\n PolygonBatcher.prototype.draw = function (texture, vertices, indices) {\r\n if (texture != this.lastTexture) {\r\n this.flush();\r\n this.lastTexture = texture;\r\n }\r\n else if (this.verticesLength + vertices.length > this.mesh.getVertices().length ||\r\n this.indicesLength + indices.length > this.mesh.getIndices().length) {\r\n this.flush();\r\n }\r\n var indexStart = this.mesh.numVertices();\r\n this.mesh.getVertices().set(vertices, this.verticesLength);\r\n this.verticesLength += vertices.length;\r\n this.mesh.setVerticesLength(this.verticesLength);\r\n var indicesArray = this.mesh.getIndices();\r\n for (var i = this.indicesLength, j = 0; j < indices.length; i++, j++)\r\n indicesArray[i] = indices[j] + indexStart;\r\n this.indicesLength += indices.length;\r\n this.mesh.setIndicesLength(this.indicesLength);\r\n };\r\n PolygonBatcher.prototype.flush = function () {\r\n var gl = this.context.gl;\r\n if (this.verticesLength == 0)\r\n return;\r\n this.lastTexture.bind();\r\n this.mesh.draw(this.shader, gl.TRIANGLES);\r\n this.verticesLength = 0;\r\n this.indicesLength = 0;\r\n this.mesh.setVerticesLength(0);\r\n this.mesh.setIndicesLength(0);\r\n this.drawCalls++;\r\n };\r\n PolygonBatcher.prototype.end = function () {\r\n var gl = this.context.gl;\r\n if (!this.isDrawing)\r\n throw new Error(\"PolygonBatch is not drawing. Call PolygonBatch.begin() before calling PolygonBatch.end()\");\r\n if (this.verticesLength > 0 || this.indicesLength > 0)\r\n this.flush();\r\n this.shader = null;\r\n this.lastTexture = null;\r\n this.isDrawing = false;\r\n gl.disable(gl.BLEND);\r\n };\r\n PolygonBatcher.prototype.getDrawCalls = function () { return this.drawCalls; };\r\n PolygonBatcher.prototype.dispose = function () {\r\n this.mesh.dispose();\r\n };\r\n return PolygonBatcher;\r\n }());\r\n webgl.PolygonBatcher = PolygonBatcher;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var SceneRenderer = (function () {\r\n function SceneRenderer(canvas, context, twoColorTint) {\r\n if (twoColorTint === void 0) { twoColorTint = true; }\r\n this.twoColorTint = false;\r\n this.activeRenderer = null;\r\n this.QUAD = [\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n ];\r\n this.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n this.WHITE = new spine.Color(1, 1, 1, 1);\r\n this.canvas = canvas;\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.twoColorTint = twoColorTint;\r\n this.camera = new webgl.OrthoCamera(canvas.width, canvas.height);\r\n this.batcherShader = twoColorTint ? webgl.Shader.newTwoColoredTextured(this.context) : webgl.Shader.newColoredTextured(this.context);\r\n this.batcher = new webgl.PolygonBatcher(this.context, twoColorTint);\r\n this.shapesShader = webgl.Shader.newColored(this.context);\r\n this.shapes = new webgl.ShapeRenderer(this.context);\r\n this.skeletonRenderer = new webgl.SkeletonRenderer(this.context, twoColorTint);\r\n this.skeletonDebugRenderer = new webgl.SkeletonDebugRenderer(this.context);\r\n }\r\n SceneRenderer.prototype.begin = function () {\r\n this.camera.update();\r\n this.enableRenderer(this.batcher);\r\n };\r\n SceneRenderer.prototype.drawSkeleton = function (skeleton, premultipliedAlpha, slotRangeStart, slotRangeEnd) {\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n if (slotRangeStart === void 0) { slotRangeStart = -1; }\r\n if (slotRangeEnd === void 0) { slotRangeEnd = -1; }\r\n this.enableRenderer(this.batcher);\r\n this.skeletonRenderer.premultipliedAlpha = premultipliedAlpha;\r\n this.skeletonRenderer.draw(this.batcher, skeleton, slotRangeStart, slotRangeEnd);\r\n };\r\n SceneRenderer.prototype.drawSkeletonDebug = function (skeleton, premultipliedAlpha, ignoredBones) {\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n if (ignoredBones === void 0) { ignoredBones = null; }\r\n this.enableRenderer(this.shapes);\r\n this.skeletonDebugRenderer.premultipliedAlpha = premultipliedAlpha;\r\n this.skeletonDebugRenderer.draw(this.shapes, skeleton, ignoredBones);\r\n };\r\n SceneRenderer.prototype.drawTexture = function (texture, x, y, width, height, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.drawTextureUV = function (texture, x, y, width, height, u, v, u2, v2, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u;\r\n quad[i++] = v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u2;\r\n quad[i++] = v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u2;\r\n quad[i++] = v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u;\r\n quad[i++] = v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.drawTextureRotated = function (texture, x, y, width, height, pivotX, pivotY, angle, color, premultipliedAlpha) {\r\n if (color === void 0) { color = null; }\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var worldOriginX = x + pivotX;\r\n var worldOriginY = y + pivotY;\r\n var fx = -pivotX;\r\n var fy = -pivotY;\r\n var fx2 = width - pivotX;\r\n var fy2 = height - pivotY;\r\n var p1x = fx;\r\n var p1y = fy;\r\n var p2x = fx;\r\n var p2y = fy2;\r\n var p3x = fx2;\r\n var p3y = fy2;\r\n var p4x = fx2;\r\n var p4y = fy;\r\n var x1 = 0;\r\n var y1 = 0;\r\n var x2 = 0;\r\n var y2 = 0;\r\n var x3 = 0;\r\n var y3 = 0;\r\n var x4 = 0;\r\n var y4 = 0;\r\n if (angle != 0) {\r\n var cos = spine.MathUtils.cosDeg(angle);\r\n var sin = spine.MathUtils.sinDeg(angle);\r\n x1 = cos * p1x - sin * p1y;\r\n y1 = sin * p1x + cos * p1y;\r\n x4 = cos * p2x - sin * p2y;\r\n y4 = sin * p2x + cos * p2y;\r\n x3 = cos * p3x - sin * p3y;\r\n y3 = sin * p3x + cos * p3y;\r\n x2 = x3 + (x1 - x4);\r\n y2 = y3 + (y1 - y4);\r\n }\r\n else {\r\n x1 = p1x;\r\n y1 = p1y;\r\n x4 = p2x;\r\n y4 = p2y;\r\n x3 = p3x;\r\n y3 = p3y;\r\n x2 = p4x;\r\n y2 = p4y;\r\n }\r\n x1 += worldOriginX;\r\n y1 += worldOriginY;\r\n x2 += worldOriginX;\r\n y2 += worldOriginY;\r\n x3 += worldOriginX;\r\n y3 += worldOriginY;\r\n x4 += worldOriginX;\r\n y4 += worldOriginY;\r\n var i = 0;\r\n quad[i++] = x1;\r\n quad[i++] = y1;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x2;\r\n quad[i++] = y2;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x3;\r\n quad[i++] = y3;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x4;\r\n quad[i++] = y4;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.drawRegion = function (region, x, y, width, height, color, premultipliedAlpha) {\r\n if (color === void 0) { color = null; }\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u;\r\n quad[i++] = region.v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u2;\r\n quad[i++] = region.v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u2;\r\n quad[i++] = region.v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u;\r\n quad[i++] = region.v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(region.texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.line = function (x, y, x2, y2, color, color2) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.line(x, y, x2, y2, color);\r\n };\r\n SceneRenderer.prototype.triangle = function (filled, x, y, x2, y2, x3, y3, color, color2, color3) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.triangle(filled, x, y, x2, y2, x3, y3, color, color2, color3);\r\n };\r\n SceneRenderer.prototype.quad = function (filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n if (color4 === void 0) { color4 = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.quad(filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4);\r\n };\r\n SceneRenderer.prototype.rect = function (filled, x, y, width, height, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.rect(filled, x, y, width, height, color);\r\n };\r\n SceneRenderer.prototype.rectLine = function (filled, x1, y1, x2, y2, width, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.rectLine(filled, x1, y1, x2, y2, width, color);\r\n };\r\n SceneRenderer.prototype.polygon = function (polygonVertices, offset, count, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.polygon(polygonVertices, offset, count, color);\r\n };\r\n SceneRenderer.prototype.circle = function (filled, x, y, radius, color, segments) {\r\n if (color === void 0) { color = null; }\r\n if (segments === void 0) { segments = 0; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.circle(filled, x, y, radius, color, segments);\r\n };\r\n SceneRenderer.prototype.curve = function (x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color);\r\n };\r\n SceneRenderer.prototype.end = function () {\r\n if (this.activeRenderer === this.batcher)\r\n this.batcher.end();\r\n else if (this.activeRenderer === this.shapes)\r\n this.shapes.end();\r\n this.activeRenderer = null;\r\n };\r\n SceneRenderer.prototype.resize = function (resizeMode) {\r\n var canvas = this.canvas;\r\n var w = canvas.clientWidth;\r\n var h = canvas.clientHeight;\r\n if (canvas.width != w || canvas.height != h) {\r\n canvas.width = w;\r\n canvas.height = h;\r\n }\r\n this.context.gl.viewport(0, 0, canvas.width, canvas.height);\r\n if (resizeMode === ResizeMode.Stretch) {\r\n }\r\n else if (resizeMode === ResizeMode.Expand) {\r\n this.camera.setViewport(w, h);\r\n }\r\n else if (resizeMode === ResizeMode.Fit) {\r\n var sourceWidth = canvas.width, sourceHeight = canvas.height;\r\n var targetWidth = this.camera.viewportWidth, targetHeight = this.camera.viewportHeight;\r\n var targetRatio = targetHeight / targetWidth;\r\n var sourceRatio = sourceHeight / sourceWidth;\r\n var scale = targetRatio < sourceRatio ? targetWidth / sourceWidth : targetHeight / sourceHeight;\r\n this.camera.viewportWidth = sourceWidth * scale;\r\n this.camera.viewportHeight = sourceHeight * scale;\r\n }\r\n this.camera.update();\r\n };\r\n SceneRenderer.prototype.enableRenderer = function (renderer) {\r\n if (this.activeRenderer === renderer)\r\n return;\r\n this.end();\r\n if (renderer instanceof webgl.PolygonBatcher) {\r\n this.batcherShader.bind();\r\n this.batcherShader.setUniform4x4f(webgl.Shader.MVP_MATRIX, this.camera.projectionView.values);\r\n this.batcherShader.setUniformi(\"u_texture\", 0);\r\n this.batcher.begin(this.batcherShader);\r\n this.activeRenderer = this.batcher;\r\n }\r\n else if (renderer instanceof webgl.ShapeRenderer) {\r\n this.shapesShader.bind();\r\n this.shapesShader.setUniform4x4f(webgl.Shader.MVP_MATRIX, this.camera.projectionView.values);\r\n this.shapes.begin(this.shapesShader);\r\n this.activeRenderer = this.shapes;\r\n }\r\n else {\r\n this.activeRenderer = this.skeletonDebugRenderer;\r\n }\r\n };\r\n SceneRenderer.prototype.dispose = function () {\r\n this.batcher.dispose();\r\n this.batcherShader.dispose();\r\n this.shapes.dispose();\r\n this.shapesShader.dispose();\r\n this.skeletonDebugRenderer.dispose();\r\n };\r\n return SceneRenderer;\r\n }());\r\n webgl.SceneRenderer = SceneRenderer;\r\n var ResizeMode;\r\n (function (ResizeMode) {\r\n ResizeMode[ResizeMode[\"Stretch\"] = 0] = \"Stretch\";\r\n ResizeMode[ResizeMode[\"Expand\"] = 1] = \"Expand\";\r\n ResizeMode[ResizeMode[\"Fit\"] = 2] = \"Fit\";\r\n })(ResizeMode = webgl.ResizeMode || (webgl.ResizeMode = {}));\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Shader = (function () {\r\n function Shader(context, vertexShader, fragmentShader) {\r\n this.vertexShader = vertexShader;\r\n this.fragmentShader = fragmentShader;\r\n this.vs = null;\r\n this.fs = null;\r\n this.program = null;\r\n this.tmp2x2 = new Float32Array(2 * 2);\r\n this.tmp3x3 = new Float32Array(3 * 3);\r\n this.tmp4x4 = new Float32Array(4 * 4);\r\n this.vsSource = vertexShader;\r\n this.fsSource = fragmentShader;\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.context.addRestorable(this);\r\n this.compile();\r\n }\r\n Shader.prototype.getProgram = function () { return this.program; };\r\n Shader.prototype.getVertexShader = function () { return this.vertexShader; };\r\n Shader.prototype.getFragmentShader = function () { return this.fragmentShader; };\r\n Shader.prototype.getVertexShaderSource = function () { return this.vsSource; };\r\n Shader.prototype.getFragmentSource = function () { return this.fsSource; };\r\n Shader.prototype.compile = function () {\r\n var gl = this.context.gl;\r\n try {\r\n this.vs = this.compileShader(gl.VERTEX_SHADER, this.vertexShader);\r\n this.fs = this.compileShader(gl.FRAGMENT_SHADER, this.fragmentShader);\r\n this.program = this.compileProgram(this.vs, this.fs);\r\n }\r\n catch (e) {\r\n this.dispose();\r\n throw e;\r\n }\r\n };\r\n Shader.prototype.compileShader = function (type, source) {\r\n var gl = this.context.gl;\r\n var shader = gl.createShader(type);\r\n gl.shaderSource(shader, source);\r\n gl.compileShader(shader);\r\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\r\n var error = \"Couldn't compile shader: \" + gl.getShaderInfoLog(shader);\r\n gl.deleteShader(shader);\r\n if (!gl.isContextLost())\r\n throw new Error(error);\r\n }\r\n return shader;\r\n };\r\n Shader.prototype.compileProgram = function (vs, fs) {\r\n var gl = this.context.gl;\r\n var program = gl.createProgram();\r\n gl.attachShader(program, vs);\r\n gl.attachShader(program, fs);\r\n gl.linkProgram(program);\r\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\r\n var error = \"Couldn't compile shader program: \" + gl.getProgramInfoLog(program);\r\n gl.deleteProgram(program);\r\n if (!gl.isContextLost())\r\n throw new Error(error);\r\n }\r\n return program;\r\n };\r\n Shader.prototype.restore = function () {\r\n this.compile();\r\n };\r\n Shader.prototype.bind = function () {\r\n this.context.gl.useProgram(this.program);\r\n };\r\n Shader.prototype.unbind = function () {\r\n this.context.gl.useProgram(null);\r\n };\r\n Shader.prototype.setUniformi = function (uniform, value) {\r\n this.context.gl.uniform1i(this.getUniformLocation(uniform), value);\r\n };\r\n Shader.prototype.setUniformf = function (uniform, value) {\r\n this.context.gl.uniform1f(this.getUniformLocation(uniform), value);\r\n };\r\n Shader.prototype.setUniform2f = function (uniform, value, value2) {\r\n this.context.gl.uniform2f(this.getUniformLocation(uniform), value, value2);\r\n };\r\n Shader.prototype.setUniform3f = function (uniform, value, value2, value3) {\r\n this.context.gl.uniform3f(this.getUniformLocation(uniform), value, value2, value3);\r\n };\r\n Shader.prototype.setUniform4f = function (uniform, value, value2, value3, value4) {\r\n this.context.gl.uniform4f(this.getUniformLocation(uniform), value, value2, value3, value4);\r\n };\r\n Shader.prototype.setUniform2x2f = function (uniform, value) {\r\n var gl = this.context.gl;\r\n this.tmp2x2.set(value);\r\n gl.uniformMatrix2fv(this.getUniformLocation(uniform), false, this.tmp2x2);\r\n };\r\n Shader.prototype.setUniform3x3f = function (uniform, value) {\r\n var gl = this.context.gl;\r\n this.tmp3x3.set(value);\r\n gl.uniformMatrix3fv(this.getUniformLocation(uniform), false, this.tmp3x3);\r\n };\r\n Shader.prototype.setUniform4x4f = function (uniform, value) {\r\n var gl = this.context.gl;\r\n this.tmp4x4.set(value);\r\n gl.uniformMatrix4fv(this.getUniformLocation(uniform), false, this.tmp4x4);\r\n };\r\n Shader.prototype.getUniformLocation = function (uniform) {\r\n var gl = this.context.gl;\r\n var location = gl.getUniformLocation(this.program, uniform);\r\n if (!location && !gl.isContextLost())\r\n throw new Error(\"Couldn't find location for uniform \" + uniform);\r\n return location;\r\n };\r\n Shader.prototype.getAttributeLocation = function (attribute) {\r\n var gl = this.context.gl;\r\n var location = gl.getAttribLocation(this.program, attribute);\r\n if (location == -1 && !gl.isContextLost())\r\n throw new Error(\"Couldn't find location for attribute \" + attribute);\r\n return location;\r\n };\r\n Shader.prototype.dispose = function () {\r\n this.context.removeRestorable(this);\r\n var gl = this.context.gl;\r\n if (this.vs) {\r\n gl.deleteShader(this.vs);\r\n this.vs = null;\r\n }\r\n if (this.fs) {\r\n gl.deleteShader(this.fs);\r\n this.fs = null;\r\n }\r\n if (this.program) {\r\n gl.deleteProgram(this.program);\r\n this.program = null;\r\n }\r\n };\r\n Shader.newColoredTextured = function (context) {\r\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \" + Shader.POSITION + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR + \";\\n\\t\\t\\t\\tattribute vec2 \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\tuniform mat4 \" + Shader.MVP_MATRIX + \";\\n\\t\\t\\t\\tvarying vec4 v_color;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_color = \" + Shader.COLOR + \";\\n\\t\\t\\t\\t\\tv_texCoords = \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\t\\tgl_Position = \" + Shader.MVP_MATRIX + \" * \" + Shader.POSITION + \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_color;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\t\\t\\t\\tuniform sampler2D u_texture;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tgl_FragColor = v_color * texture2D(u_texture, v_texCoords);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n return new Shader(context, vs, fs);\r\n };\r\n Shader.newTwoColoredTextured = function (context) {\r\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \" + Shader.POSITION + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR2 + \";\\n\\t\\t\\t\\tattribute vec2 \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\tuniform mat4 \" + Shader.MVP_MATRIX + \";\\n\\t\\t\\t\\tvarying vec4 v_light;\\n\\t\\t\\t\\tvarying vec4 v_dark;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_light = \" + Shader.COLOR + \";\\n\\t\\t\\t\\t\\tv_dark = \" + Shader.COLOR2 + \";\\n\\t\\t\\t\\t\\tv_texCoords = \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\t\\tgl_Position = \" + Shader.MVP_MATRIX + \" * \" + Shader.POSITION + \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_light;\\n\\t\\t\\t\\tvarying LOWP vec4 v_dark;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\t\\t\\t\\tuniform sampler2D u_texture;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tvec4 texColor = texture2D(u_texture, v_texCoords);\\n\\t\\t\\t\\t\\tgl_FragColor.a = texColor.a * v_light.a;\\n\\t\\t\\t\\t\\tgl_FragColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n return new Shader(context, vs, fs);\r\n };\r\n Shader.newColored = function (context) {\r\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \" + Shader.POSITION + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR + \";\\n\\t\\t\\t\\tuniform mat4 \" + Shader.MVP_MATRIX + \";\\n\\t\\t\\t\\tvarying vec4 v_color;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_color = \" + Shader.COLOR + \";\\n\\t\\t\\t\\t\\tgl_Position = \" + Shader.MVP_MATRIX + \" * \" + Shader.POSITION + \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_color;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tgl_FragColor = v_color;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n return new Shader(context, vs, fs);\r\n };\r\n Shader.MVP_MATRIX = \"u_projTrans\";\r\n Shader.POSITION = \"a_position\";\r\n Shader.COLOR = \"a_color\";\r\n Shader.COLOR2 = \"a_color2\";\r\n Shader.TEXCOORDS = \"a_texCoords\";\r\n Shader.SAMPLER = \"u_texture\";\r\n return Shader;\r\n }());\r\n webgl.Shader = Shader;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var ShapeRenderer = (function () {\r\n function ShapeRenderer(context, maxVertices) {\r\n if (maxVertices === void 0) { maxVertices = 10920; }\r\n this.isDrawing = false;\r\n this.shapeType = ShapeType.Filled;\r\n this.color = new spine.Color(1, 1, 1, 1);\r\n this.vertexIndex = 0;\r\n this.tmp = new spine.Vector2();\r\n if (maxVertices > 10920)\r\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.mesh = new webgl.Mesh(context, [new webgl.Position2Attribute(), new webgl.ColorAttribute()], maxVertices, 0);\r\n this.srcBlend = this.context.gl.SRC_ALPHA;\r\n this.dstBlend = this.context.gl.ONE_MINUS_SRC_ALPHA;\r\n }\r\n ShapeRenderer.prototype.begin = function (shader) {\r\n if (this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has already been called\");\r\n this.shader = shader;\r\n this.vertexIndex = 0;\r\n this.isDrawing = true;\r\n var gl = this.context.gl;\r\n gl.enable(gl.BLEND);\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n };\r\n ShapeRenderer.prototype.setBlendMode = function (srcBlend, dstBlend) {\r\n var gl = this.context.gl;\r\n this.srcBlend = srcBlend;\r\n this.dstBlend = dstBlend;\r\n if (this.isDrawing) {\r\n this.flush();\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n }\r\n };\r\n ShapeRenderer.prototype.setColor = function (color) {\r\n this.color.setFromColor(color);\r\n };\r\n ShapeRenderer.prototype.setColorWith = function (r, g, b, a) {\r\n this.color.set(r, g, b, a);\r\n };\r\n ShapeRenderer.prototype.point = function (x, y, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(ShapeType.Point, 1);\r\n if (color === null)\r\n color = this.color;\r\n this.vertex(x, y, color);\r\n };\r\n ShapeRenderer.prototype.line = function (x, y, x2, y2, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(ShapeType.Line, 2);\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n if (color === null)\r\n color = this.color;\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color);\r\n };\r\n ShapeRenderer.prototype.triangle = function (filled, x, y, x2, y2, x3, y3, color, color2, color3) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n if (color === null)\r\n color = this.color;\r\n if (color2 === null)\r\n color2 = this.color;\r\n if (color3 === null)\r\n color3 = this.color;\r\n if (filled) {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n }\r\n else {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x2, y2, color);\r\n this.vertex(x3, y3, color2);\r\n this.vertex(x3, y3, color);\r\n this.vertex(x, y, color2);\r\n }\r\n };\r\n ShapeRenderer.prototype.quad = function (filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n if (color4 === void 0) { color4 = null; }\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n if (color === null)\r\n color = this.color;\r\n if (color2 === null)\r\n color2 = this.color;\r\n if (color3 === null)\r\n color3 = this.color;\r\n if (color4 === null)\r\n color4 = this.color;\r\n if (filled) {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x, y, color);\r\n }\r\n else {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x, y, color);\r\n }\r\n };\r\n ShapeRenderer.prototype.rect = function (filled, x, y, width, height, color) {\r\n if (color === void 0) { color = null; }\r\n this.quad(filled, x, y, x + width, y, x + width, y + height, x, y + height, color, color, color, color);\r\n };\r\n ShapeRenderer.prototype.rectLine = function (filled, x1, y1, x2, y2, width, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 8);\r\n if (color === null)\r\n color = this.color;\r\n var t = this.tmp.set(y2 - y1, x1 - x2);\r\n t.normalize();\r\n width *= 0.5;\r\n var tx = t.x * width;\r\n var ty = t.y * width;\r\n if (!filled) {\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n }\r\n else {\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n }\r\n };\r\n ShapeRenderer.prototype.x = function (x, y, size) {\r\n this.line(x - size, y - size, x + size, y + size);\r\n this.line(x - size, y + size, x + size, y - size);\r\n };\r\n ShapeRenderer.prototype.polygon = function (polygonVertices, offset, count, color) {\r\n if (color === void 0) { color = null; }\r\n if (count < 3)\r\n throw new Error(\"Polygon must contain at least 3 vertices\");\r\n this.check(ShapeType.Line, count * 2);\r\n if (color === null)\r\n color = this.color;\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n offset <<= 1;\r\n count <<= 1;\r\n var firstX = polygonVertices[offset];\r\n var firstY = polygonVertices[offset + 1];\r\n var last = offset + count;\r\n for (var i = offset, n = offset + count - 2; i < n; i += 2) {\r\n var x1 = polygonVertices[i];\r\n var y1 = polygonVertices[i + 1];\r\n var x2 = 0;\r\n var y2 = 0;\r\n if (i + 2 >= last) {\r\n x2 = firstX;\r\n y2 = firstY;\r\n }\r\n else {\r\n x2 = polygonVertices[i + 2];\r\n y2 = polygonVertices[i + 3];\r\n }\r\n this.vertex(x1, y1, color);\r\n this.vertex(x2, y2, color);\r\n }\r\n };\r\n ShapeRenderer.prototype.circle = function (filled, x, y, radius, color, segments) {\r\n if (color === void 0) { color = null; }\r\n if (segments === void 0) { segments = 0; }\r\n if (segments === 0)\r\n segments = Math.max(1, (6 * spine.MathUtils.cbrt(radius)) | 0);\r\n if (segments <= 0)\r\n throw new Error(\"segments must be > 0.\");\r\n if (color === null)\r\n color = this.color;\r\n var angle = 2 * spine.MathUtils.PI / segments;\r\n var cos = Math.cos(angle);\r\n var sin = Math.sin(angle);\r\n var cx = radius, cy = 0;\r\n if (!filled) {\r\n this.check(ShapeType.Line, segments * 2 + 2);\r\n for (var i = 0; i < segments; i++) {\r\n this.vertex(x + cx, y + cy, color);\r\n var temp_1 = cx;\r\n cx = cos * cx - sin * cy;\r\n cy = sin * temp_1 + cos * cy;\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n else {\r\n this.check(ShapeType.Filled, segments * 3 + 3);\r\n segments--;\r\n for (var i = 0; i < segments; i++) {\r\n this.vertex(x, y, color);\r\n this.vertex(x + cx, y + cy, color);\r\n var temp_2 = cx;\r\n cx = cos * cx - sin * cy;\r\n cy = sin * temp_2 + cos * cy;\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n this.vertex(x, y, color);\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n var temp = cx;\r\n cx = radius;\r\n cy = 0;\r\n this.vertex(x + cx, y + cy, color);\r\n };\r\n ShapeRenderer.prototype.curve = function (x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(ShapeType.Line, segments * 2 + 2);\r\n if (color === null)\r\n color = this.color;\r\n var subdiv_step = 1 / segments;\r\n var subdiv_step2 = subdiv_step * subdiv_step;\r\n var subdiv_step3 = subdiv_step * subdiv_step * subdiv_step;\r\n var pre1 = 3 * subdiv_step;\r\n var pre2 = 3 * subdiv_step2;\r\n var pre4 = 6 * subdiv_step2;\r\n var pre5 = 6 * subdiv_step3;\r\n var tmp1x = x1 - cx1 * 2 + cx2;\r\n var tmp1y = y1 - cy1 * 2 + cy2;\r\n var tmp2x = (cx1 - cx2) * 3 - x1 + x2;\r\n var tmp2y = (cy1 - cy2) * 3 - y1 + y2;\r\n var fx = x1;\r\n var fy = y1;\r\n var dfx = (cx1 - x1) * pre1 + tmp1x * pre2 + tmp2x * subdiv_step3;\r\n var dfy = (cy1 - y1) * pre1 + tmp1y * pre2 + tmp2y * subdiv_step3;\r\n var ddfx = tmp1x * pre4 + tmp2x * pre5;\r\n var ddfy = tmp1y * pre4 + tmp2y * pre5;\r\n var dddfx = tmp2x * pre5;\r\n var dddfy = tmp2y * pre5;\r\n while (segments-- > 0) {\r\n this.vertex(fx, fy, color);\r\n fx += dfx;\r\n fy += dfy;\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n this.vertex(fx, fy, color);\r\n }\r\n this.vertex(fx, fy, color);\r\n this.vertex(x2, y2, color);\r\n };\r\n ShapeRenderer.prototype.vertex = function (x, y, color) {\r\n var idx = this.vertexIndex;\r\n var vertices = this.mesh.getVertices();\r\n vertices[idx++] = x;\r\n vertices[idx++] = y;\r\n vertices[idx++] = color.r;\r\n vertices[idx++] = color.g;\r\n vertices[idx++] = color.b;\r\n vertices[idx++] = color.a;\r\n this.vertexIndex = idx;\r\n };\r\n ShapeRenderer.prototype.end = function () {\r\n if (!this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has not been called\");\r\n this.flush();\r\n this.context.gl.disable(this.context.gl.BLEND);\r\n this.isDrawing = false;\r\n };\r\n ShapeRenderer.prototype.flush = function () {\r\n if (this.vertexIndex == 0)\r\n return;\r\n this.mesh.setVerticesLength(this.vertexIndex);\r\n this.mesh.draw(this.shader, this.shapeType);\r\n this.vertexIndex = 0;\r\n };\r\n ShapeRenderer.prototype.check = function (shapeType, numVertices) {\r\n if (!this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has not been called\");\r\n if (this.shapeType == shapeType) {\r\n if (this.mesh.maxVertices() - this.mesh.numVertices() < numVertices)\r\n this.flush();\r\n else\r\n return;\r\n }\r\n else {\r\n this.flush();\r\n this.shapeType = shapeType;\r\n }\r\n };\r\n ShapeRenderer.prototype.dispose = function () {\r\n this.mesh.dispose();\r\n };\r\n return ShapeRenderer;\r\n }());\r\n webgl.ShapeRenderer = ShapeRenderer;\r\n var ShapeType;\r\n (function (ShapeType) {\r\n ShapeType[ShapeType[\"Point\"] = 0] = \"Point\";\r\n ShapeType[ShapeType[\"Line\"] = 1] = \"Line\";\r\n ShapeType[ShapeType[\"Filled\"] = 4] = \"Filled\";\r\n })(ShapeType = webgl.ShapeType || (webgl.ShapeType = {}));\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var SkeletonDebugRenderer = (function () {\r\n function SkeletonDebugRenderer(context) {\r\n this.boneLineColor = new spine.Color(1, 0, 0, 1);\r\n this.boneOriginColor = new spine.Color(0, 1, 0, 1);\r\n this.attachmentLineColor = new spine.Color(0, 0, 1, 0.5);\r\n this.triangleLineColor = new spine.Color(1, 0.64, 0, 0.5);\r\n this.pathColor = new spine.Color().setFromString(\"FF7F00\");\r\n this.clipColor = new spine.Color(0.8, 0, 0, 2);\r\n this.aabbColor = new spine.Color(0, 1, 0, 0.5);\r\n this.drawBones = true;\r\n this.drawRegionAttachments = true;\r\n this.drawBoundingBoxes = true;\r\n this.drawMeshHull = true;\r\n this.drawMeshTriangles = true;\r\n this.drawPaths = true;\r\n this.drawSkeletonXY = false;\r\n this.drawClipping = true;\r\n this.premultipliedAlpha = false;\r\n this.scale = 1;\r\n this.boneWidth = 2;\r\n this.bounds = new spine.SkeletonBounds();\r\n this.temp = new Array();\r\n this.vertices = spine.Utils.newFloatArray(2 * 1024);\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n }\r\n SkeletonDebugRenderer.prototype.draw = function (shapes, skeleton, ignoredBones) {\r\n if (ignoredBones === void 0) { ignoredBones = null; }\r\n var skeletonX = skeleton.x;\r\n var skeletonY = skeleton.y;\r\n var gl = this.context.gl;\r\n var srcFunc = this.premultipliedAlpha ? gl.ONE : gl.SRC_ALPHA;\r\n shapes.setBlendMode(srcFunc, gl.ONE_MINUS_SRC_ALPHA);\r\n var bones = skeleton.bones;\r\n if (this.drawBones) {\r\n shapes.setColor(this.boneLineColor);\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\r\n continue;\r\n if (bone.parent == null)\r\n continue;\r\n var x = skeletonX + bone.data.length * bone.a + bone.worldX;\r\n var y = skeletonY + bone.data.length * bone.c + bone.worldY;\r\n shapes.rectLine(true, skeletonX + bone.worldX, skeletonY + bone.worldY, x, y, this.boneWidth * this.scale);\r\n }\r\n if (this.drawSkeletonXY)\r\n shapes.x(skeletonX, skeletonY, 4 * this.scale);\r\n }\r\n if (this.drawRegionAttachments) {\r\n shapes.setColor(this.attachmentLineColor);\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.RegionAttachment) {\r\n var regionAttachment = attachment;\r\n var vertices = this.vertices;\r\n regionAttachment.computeWorldVertices(slot.bone, vertices, 0, 2);\r\n shapes.line(vertices[0], vertices[1], vertices[2], vertices[3]);\r\n shapes.line(vertices[2], vertices[3], vertices[4], vertices[5]);\r\n shapes.line(vertices[4], vertices[5], vertices[6], vertices[7]);\r\n shapes.line(vertices[6], vertices[7], vertices[0], vertices[1]);\r\n }\r\n }\r\n }\r\n if (this.drawMeshHull || this.drawMeshTriangles) {\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (!(attachment instanceof spine.MeshAttachment))\r\n continue;\r\n var mesh = attachment;\r\n var vertices = this.vertices;\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, 2);\r\n var triangles = mesh.triangles;\r\n var hullLength = mesh.hullLength;\r\n if (this.drawMeshTriangles) {\r\n shapes.setColor(this.triangleLineColor);\r\n for (var ii = 0, nn = triangles.length; ii < nn; ii += 3) {\r\n var v1 = triangles[ii] * 2, v2 = triangles[ii + 1] * 2, v3 = triangles[ii + 2] * 2;\r\n shapes.triangle(false, vertices[v1], vertices[v1 + 1], vertices[v2], vertices[v2 + 1], vertices[v3], vertices[v3 + 1]);\r\n }\r\n }\r\n if (this.drawMeshHull && hullLength > 0) {\r\n shapes.setColor(this.attachmentLineColor);\r\n hullLength = (hullLength >> 1) * 2;\r\n var lastX = vertices[hullLength - 2], lastY = vertices[hullLength - 1];\r\n for (var ii = 0, nn = hullLength; ii < nn; ii += 2) {\r\n var x = vertices[ii], y = vertices[ii + 1];\r\n shapes.line(x, y, lastX, lastY);\r\n lastX = x;\r\n lastY = y;\r\n }\r\n }\r\n }\r\n }\r\n if (this.drawBoundingBoxes) {\r\n var bounds = this.bounds;\r\n bounds.update(skeleton, true);\r\n shapes.setColor(this.aabbColor);\r\n shapes.rect(false, bounds.minX, bounds.minY, bounds.getWidth(), bounds.getHeight());\r\n var polygons = bounds.polygons;\r\n var boxes = bounds.boundingBoxes;\r\n for (var i = 0, n = polygons.length; i < n; i++) {\r\n var polygon = polygons[i];\r\n shapes.setColor(boxes[i].color);\r\n shapes.polygon(polygon, 0, polygon.length);\r\n }\r\n }\r\n if (this.drawPaths) {\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (!(attachment instanceof spine.PathAttachment))\r\n continue;\r\n var path = attachment;\r\n var nn = path.worldVerticesLength;\r\n var world = this.temp = spine.Utils.setArraySize(this.temp, nn, 0);\r\n path.computeWorldVertices(slot, 0, nn, world, 0, 2);\r\n var color = this.pathColor;\r\n var x1 = world[2], y1 = world[3], x2 = 0, y2 = 0;\r\n if (path.closed) {\r\n shapes.setColor(color);\r\n var cx1 = world[0], cy1 = world[1], cx2 = world[nn - 2], cy2 = world[nn - 1];\r\n x2 = world[nn - 4];\r\n y2 = world[nn - 3];\r\n shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, 32);\r\n shapes.setColor(SkeletonDebugRenderer.LIGHT_GRAY);\r\n shapes.line(x1, y1, cx1, cy1);\r\n shapes.line(x2, y2, cx2, cy2);\r\n }\r\n nn -= 4;\r\n for (var ii = 4; ii < nn; ii += 6) {\r\n var cx1 = world[ii], cy1 = world[ii + 1], cx2 = world[ii + 2], cy2 = world[ii + 3];\r\n x2 = world[ii + 4];\r\n y2 = world[ii + 5];\r\n shapes.setColor(color);\r\n shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, 32);\r\n shapes.setColor(SkeletonDebugRenderer.LIGHT_GRAY);\r\n shapes.line(x1, y1, cx1, cy1);\r\n shapes.line(x2, y2, cx2, cy2);\r\n x1 = x2;\r\n y1 = y2;\r\n }\r\n }\r\n }\r\n if (this.drawBones) {\r\n shapes.setColor(this.boneOriginColor);\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\r\n continue;\r\n shapes.circle(true, skeletonX + bone.worldX, skeletonY + bone.worldY, 3 * this.scale, SkeletonDebugRenderer.GREEN, 8);\r\n }\r\n }\r\n if (this.drawClipping) {\r\n var slots = skeleton.slots;\r\n shapes.setColor(this.clipColor);\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (!(attachment instanceof spine.ClippingAttachment))\r\n continue;\r\n var clip = attachment;\r\n var nn = clip.worldVerticesLength;\r\n var world = this.temp = spine.Utils.setArraySize(this.temp, nn, 0);\r\n clip.computeWorldVertices(slot, 0, nn, world, 0, 2);\r\n for (var i_17 = 0, n_3 = world.length; i_17 < n_3; i_17 += 2) {\r\n var x = world[i_17];\r\n var y = world[i_17 + 1];\r\n var x2 = world[(i_17 + 2) % world.length];\r\n var y2 = world[(i_17 + 3) % world.length];\r\n shapes.line(x, y, x2, y2);\r\n }\r\n }\r\n }\r\n };\r\n SkeletonDebugRenderer.prototype.dispose = function () {\r\n };\r\n SkeletonDebugRenderer.LIGHT_GRAY = new spine.Color(192 / 255, 192 / 255, 192 / 255, 1);\r\n SkeletonDebugRenderer.GREEN = new spine.Color(0, 1, 0, 1);\r\n return SkeletonDebugRenderer;\r\n }());\r\n webgl.SkeletonDebugRenderer = SkeletonDebugRenderer;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Renderable = (function () {\r\n function Renderable(vertices, numVertices, numFloats) {\r\n this.vertices = vertices;\r\n this.numVertices = numVertices;\r\n this.numFloats = numFloats;\r\n }\r\n return Renderable;\r\n }());\r\n ;\r\n var SkeletonRenderer = (function () {\r\n function SkeletonRenderer(context, twoColorTint) {\r\n if (twoColorTint === void 0) { twoColorTint = true; }\r\n this.premultipliedAlpha = false;\r\n this.vertexEffect = null;\r\n this.tempColor = new spine.Color();\r\n this.tempColor2 = new spine.Color();\r\n this.vertexSize = 2 + 2 + 4;\r\n this.twoColorTint = false;\r\n this.renderable = new Renderable(null, 0, 0);\r\n this.clipper = new spine.SkeletonClipping();\r\n this.temp = new spine.Vector2();\r\n this.temp2 = new spine.Vector2();\r\n this.temp3 = new spine.Color();\r\n this.temp4 = new spine.Color();\r\n this.twoColorTint = twoColorTint;\r\n if (twoColorTint)\r\n this.vertexSize += 4;\r\n this.vertices = spine.Utils.newFloatArray(this.vertexSize * 1024);\r\n }\r\n SkeletonRenderer.prototype.draw = function (batcher, skeleton, slotRangeStart, slotRangeEnd) {\r\n if (slotRangeStart === void 0) { slotRangeStart = -1; }\r\n if (slotRangeEnd === void 0) { slotRangeEnd = -1; }\r\n var clipper = this.clipper;\r\n var premultipliedAlpha = this.premultipliedAlpha;\r\n var twoColorTint = this.twoColorTint;\r\n var blendMode = null;\r\n var tempPos = this.temp;\r\n var tempUv = this.temp2;\r\n var tempLight = this.temp3;\r\n var tempDark = this.temp4;\r\n var renderable = this.renderable;\r\n var uvs = null;\r\n var triangles = null;\r\n var drawOrder = skeleton.drawOrder;\r\n var attachmentColor = null;\r\n var skeletonColor = skeleton.color;\r\n var vertexSize = twoColorTint ? 12 : 8;\r\n var inRange = false;\r\n if (slotRangeStart == -1)\r\n inRange = true;\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var clippedVertexSize = clipper.isClipping() ? 2 : vertexSize;\r\n var slot = drawOrder[i];\r\n if (!slot.bone.active) {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (slotRangeStart >= 0 && slotRangeStart == slot.data.index) {\r\n inRange = true;\r\n }\r\n if (!inRange) {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (slotRangeEnd >= 0 && slotRangeEnd == slot.data.index) {\r\n inRange = false;\r\n }\r\n var attachment = slot.getAttachment();\r\n var texture = null;\r\n if (attachment instanceof spine.RegionAttachment) {\r\n var region = attachment;\r\n renderable.vertices = this.vertices;\r\n renderable.numVertices = 4;\r\n renderable.numFloats = clippedVertexSize << 2;\r\n region.computeWorldVertices(slot.bone, renderable.vertices, 0, clippedVertexSize);\r\n triangles = SkeletonRenderer.QUAD_TRIANGLES;\r\n uvs = region.uvs;\r\n texture = region.region.renderObject.texture;\r\n attachmentColor = region.color;\r\n }\r\n else if (attachment instanceof spine.MeshAttachment) {\r\n var mesh = attachment;\r\n renderable.vertices = this.vertices;\r\n renderable.numVertices = (mesh.worldVerticesLength >> 1);\r\n renderable.numFloats = renderable.numVertices * clippedVertexSize;\r\n if (renderable.numFloats > renderable.vertices.length) {\r\n renderable.vertices = this.vertices = spine.Utils.newFloatArray(renderable.numFloats);\r\n }\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, renderable.vertices, 0, clippedVertexSize);\r\n triangles = mesh.triangles;\r\n texture = mesh.region.renderObject.texture;\r\n uvs = mesh.uvs;\r\n attachmentColor = mesh.color;\r\n }\r\n else if (attachment instanceof spine.ClippingAttachment) {\r\n var clip = (attachment);\r\n clipper.clipStart(slot, clip);\r\n continue;\r\n }\r\n else {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (texture != null) {\r\n var slotColor = slot.color;\r\n var finalColor = this.tempColor;\r\n finalColor.r = skeletonColor.r * slotColor.r * attachmentColor.r;\r\n finalColor.g = skeletonColor.g * slotColor.g * attachmentColor.g;\r\n finalColor.b = skeletonColor.b * slotColor.b * attachmentColor.b;\r\n finalColor.a = skeletonColor.a * slotColor.a * attachmentColor.a;\r\n if (premultipliedAlpha) {\r\n finalColor.r *= finalColor.a;\r\n finalColor.g *= finalColor.a;\r\n finalColor.b *= finalColor.a;\r\n }\r\n var darkColor = this.tempColor2;\r\n if (slot.darkColor == null)\r\n darkColor.set(0, 0, 0, 1.0);\r\n else {\r\n if (premultipliedAlpha) {\r\n darkColor.r = slot.darkColor.r * finalColor.a;\r\n darkColor.g = slot.darkColor.g * finalColor.a;\r\n darkColor.b = slot.darkColor.b * finalColor.a;\r\n }\r\n else {\r\n darkColor.setFromColor(slot.darkColor);\r\n }\r\n darkColor.a = premultipliedAlpha ? 1.0 : 0.0;\r\n }\r\n var slotBlendMode = slot.data.blendMode;\r\n if (slotBlendMode != blendMode) {\r\n blendMode = slotBlendMode;\r\n batcher.setBlendMode(webgl.WebGLBlendModeConverter.getSourceGLBlendMode(blendMode, premultipliedAlpha), webgl.WebGLBlendModeConverter.getDestGLBlendMode(blendMode));\r\n }\r\n if (clipper.isClipping()) {\r\n clipper.clipTriangles(renderable.vertices, renderable.numFloats, triangles, triangles.length, uvs, finalColor, darkColor, twoColorTint);\r\n var clippedVertices = new Float32Array(clipper.clippedVertices);\r\n var clippedTriangles = clipper.clippedTriangles;\r\n if (this.vertexEffect != null) {\r\n var vertexEffect = this.vertexEffect;\r\n var verts = clippedVertices;\r\n if (!twoColorTint) {\r\n for (var v = 0, n_4 = clippedVertices.length; v < n_4; v += vertexSize) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]);\r\n tempUv.x = verts[v + 6];\r\n tempUv.y = verts[v + 7];\r\n tempDark.set(0, 0, 0, 0);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n }\r\n }\r\n else {\r\n for (var v = 0, n_5 = clippedVertices.length; v < n_5; v += vertexSize) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]);\r\n tempUv.x = verts[v + 6];\r\n tempUv.y = verts[v + 7];\r\n tempDark.set(verts[v + 8], verts[v + 9], verts[v + 10], verts[v + 11]);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n verts[v + 8] = tempDark.r;\r\n verts[v + 9] = tempDark.g;\r\n verts[v + 10] = tempDark.b;\r\n verts[v + 11] = tempDark.a;\r\n }\r\n }\r\n }\r\n batcher.draw(texture, clippedVertices, clippedTriangles);\r\n }\r\n else {\r\n var verts = renderable.vertices;\r\n if (this.vertexEffect != null) {\r\n var vertexEffect = this.vertexEffect;\r\n if (!twoColorTint) {\r\n for (var v = 0, u = 0, n_6 = renderable.numFloats; v < n_6; v += vertexSize, u += 2) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempUv.x = uvs[u];\r\n tempUv.y = uvs[u + 1];\r\n tempLight.setFromColor(finalColor);\r\n tempDark.set(0, 0, 0, 0);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n }\r\n }\r\n else {\r\n for (var v = 0, u = 0, n_7 = renderable.numFloats; v < n_7; v += vertexSize, u += 2) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempUv.x = uvs[u];\r\n tempUv.y = uvs[u + 1];\r\n tempLight.setFromColor(finalColor);\r\n tempDark.setFromColor(darkColor);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n verts[v + 8] = tempDark.r;\r\n verts[v + 9] = tempDark.g;\r\n verts[v + 10] = tempDark.b;\r\n verts[v + 11] = tempDark.a;\r\n }\r\n }\r\n }\r\n else {\r\n if (!twoColorTint) {\r\n for (var v = 2, u = 0, n_8 = renderable.numFloats; v < n_8; v += vertexSize, u += 2) {\r\n verts[v] = finalColor.r;\r\n verts[v + 1] = finalColor.g;\r\n verts[v + 2] = finalColor.b;\r\n verts[v + 3] = finalColor.a;\r\n verts[v + 4] = uvs[u];\r\n verts[v + 5] = uvs[u + 1];\r\n }\r\n }\r\n else {\r\n for (var v = 2, u = 0, n_9 = renderable.numFloats; v < n_9; v += vertexSize, u += 2) {\r\n verts[v] = finalColor.r;\r\n verts[v + 1] = finalColor.g;\r\n verts[v + 2] = finalColor.b;\r\n verts[v + 3] = finalColor.a;\r\n verts[v + 4] = uvs[u];\r\n verts[v + 5] = uvs[u + 1];\r\n verts[v + 6] = darkColor.r;\r\n verts[v + 7] = darkColor.g;\r\n verts[v + 8] = darkColor.b;\r\n verts[v + 9] = darkColor.a;\r\n }\r\n }\r\n }\r\n var view = renderable.vertices.subarray(0, renderable.numFloats);\r\n batcher.draw(texture, view, triangles);\r\n }\r\n }\r\n clipper.clipEndWithSlot(slot);\r\n }\r\n clipper.clipEnd();\r\n };\r\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n return SkeletonRenderer;\r\n }());\r\n webgl.SkeletonRenderer = SkeletonRenderer;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Vector3 = (function () {\r\n function Vector3(x, y, z) {\r\n if (x === void 0) { x = 0; }\r\n if (y === void 0) { y = 0; }\r\n if (z === void 0) { z = 0; }\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n }\r\n Vector3.prototype.setFrom = function (v) {\r\n this.x = v.x;\r\n this.y = v.y;\r\n this.z = v.z;\r\n return this;\r\n };\r\n Vector3.prototype.set = function (x, y, z) {\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n return this;\r\n };\r\n Vector3.prototype.add = function (v) {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z;\r\n return this;\r\n };\r\n Vector3.prototype.sub = function (v) {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z;\r\n return this;\r\n };\r\n Vector3.prototype.scale = function (s) {\r\n this.x *= s;\r\n this.y *= s;\r\n this.z *= s;\r\n return this;\r\n };\r\n Vector3.prototype.normalize = function () {\r\n var len = this.length();\r\n if (len == 0)\r\n return this;\r\n len = 1 / len;\r\n this.x *= len;\r\n this.y *= len;\r\n this.z *= len;\r\n return this;\r\n };\r\n Vector3.prototype.cross = function (v) {\r\n return this.set(this.y * v.z - this.z * v.y, this.z * v.x - this.x * v.z, this.x * v.y - this.y * v.x);\r\n };\r\n Vector3.prototype.multiply = function (matrix) {\r\n var l_mat = matrix.values;\r\n return this.set(this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03], this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13], this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]);\r\n };\r\n Vector3.prototype.project = function (matrix) {\r\n var l_mat = matrix.values;\r\n var l_w = 1 / (this.x * l_mat[webgl.M30] + this.y * l_mat[webgl.M31] + this.z * l_mat[webgl.M32] + l_mat[webgl.M33]);\r\n return this.set((this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03]) * l_w, (this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13]) * l_w, (this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]) * l_w);\r\n };\r\n Vector3.prototype.dot = function (v) {\r\n return this.x * v.x + this.y * v.y + this.z * v.z;\r\n };\r\n Vector3.prototype.length = function () {\r\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\r\n };\r\n Vector3.prototype.distance = function (v) {\r\n var a = v.x - this.x;\r\n var b = v.y - this.y;\r\n var c = v.z - this.z;\r\n return Math.sqrt(a * a + b * b + c * c);\r\n };\r\n return Vector3;\r\n }());\r\n webgl.Vector3 = Vector3;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var ManagedWebGLRenderingContext = (function () {\r\n function ManagedWebGLRenderingContext(canvasOrContext, contextConfig) {\r\n var _this = this;\r\n if (contextConfig === void 0) { contextConfig = { alpha: \"true\" }; }\r\n this.restorables = new Array();\r\n if (canvasOrContext instanceof HTMLCanvasElement) {\r\n var canvas_1 = canvasOrContext;\r\n this.gl = (canvas_1.getContext(\"webgl2\", contextConfig) || canvas_1.getContext(\"webgl\", contextConfig));\r\n this.canvas = canvas_1;\r\n canvas_1.addEventListener(\"webglcontextlost\", function (e) {\r\n var event = e;\r\n if (e) {\r\n e.preventDefault();\r\n }\r\n });\r\n canvas_1.addEventListener(\"webglcontextrestored\", function (e) {\r\n for (var i = 0, n = _this.restorables.length; i < n; i++) {\r\n _this.restorables[i].restore();\r\n }\r\n });\r\n }\r\n else {\r\n this.gl = canvasOrContext;\r\n this.canvas = this.gl.canvas;\r\n }\r\n }\r\n ManagedWebGLRenderingContext.prototype.addRestorable = function (restorable) {\r\n this.restorables.push(restorable);\r\n };\r\n ManagedWebGLRenderingContext.prototype.removeRestorable = function (restorable) {\r\n var index = this.restorables.indexOf(restorable);\r\n if (index > -1)\r\n this.restorables.splice(index, 1);\r\n };\r\n return ManagedWebGLRenderingContext;\r\n }());\r\n webgl.ManagedWebGLRenderingContext = ManagedWebGLRenderingContext;\r\n var WebGLBlendModeConverter = (function () {\r\n function WebGLBlendModeConverter() {\r\n }\r\n WebGLBlendModeConverter.getDestGLBlendMode = function (blendMode) {\r\n switch (blendMode) {\r\n case spine.BlendMode.Normal: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\r\n case spine.BlendMode.Additive: return WebGLBlendModeConverter.ONE;\r\n case spine.BlendMode.Multiply: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\r\n case spine.BlendMode.Screen: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\r\n default: throw new Error(\"Unknown blend mode: \" + blendMode);\r\n }\r\n };\r\n WebGLBlendModeConverter.getSourceGLBlendMode = function (blendMode, premultipliedAlpha) {\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n switch (blendMode) {\r\n case spine.BlendMode.Normal: return premultipliedAlpha ? WebGLBlendModeConverter.ONE : WebGLBlendModeConverter.SRC_ALPHA;\r\n case spine.BlendMode.Additive: return premultipliedAlpha ? WebGLBlendModeConverter.ONE : WebGLBlendModeConverter.SRC_ALPHA;\r\n case spine.BlendMode.Multiply: return WebGLBlendModeConverter.DST_COLOR;\r\n case spine.BlendMode.Screen: return WebGLBlendModeConverter.ONE;\r\n default: throw new Error(\"Unknown blend mode: \" + blendMode);\r\n }\r\n };\r\n WebGLBlendModeConverter.ZERO = 0;\r\n WebGLBlendModeConverter.ONE = 1;\r\n WebGLBlendModeConverter.SRC_COLOR = 0x0300;\r\n WebGLBlendModeConverter.ONE_MINUS_SRC_COLOR = 0x0301;\r\n WebGLBlendModeConverter.SRC_ALPHA = 0x0302;\r\n WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA = 0x0303;\r\n WebGLBlendModeConverter.DST_ALPHA = 0x0304;\r\n WebGLBlendModeConverter.ONE_MINUS_DST_ALPHA = 0x0305;\r\n WebGLBlendModeConverter.DST_COLOR = 0x0306;\r\n return WebGLBlendModeConverter;\r\n }());\r\n webgl.WebGLBlendModeConverter = WebGLBlendModeConverter;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\n//# sourceMappingURL=spine-both.js.map\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = spine;\n\n}.call(window));\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///D:/wamp/www/phaser/node_modules/eventemitter3/index.js","webpack:///D:/wamp/www/phaser/src/animations/Animation.js","webpack:///D:/wamp/www/phaser/src/animations/AnimationFrame.js","webpack:///D:/wamp/www/phaser/src/animations/events/ADD_ANIMATION_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/ANIMATION_COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/ANIMATION_REPEAT_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/ANIMATION_RESTART_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/ANIMATION_START_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/PAUSE_ALL_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/REMOVE_ANIMATION_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/RESUME_ALL_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_START_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/index.js","webpack:///D:/wamp/www/phaser/src/core/events/BLUR_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/BOOT_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/CONTEXT_LOST_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/CONTEXT_RESTORED_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/DESTROY_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/FOCUS_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/HIDDEN_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/PAUSE_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/POST_RENDER_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/POST_STEP_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/PRE_RENDER_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/PRE_STEP_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/READY_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/RESUME_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/STEP_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/VISIBLE_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/index.js","webpack:///D:/wamp/www/phaser/src/data/DataManager.js","webpack:///D:/wamp/www/phaser/src/data/events/CHANGE_DATA_EVENT.js","webpack:///D:/wamp/www/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js","webpack:///D:/wamp/www/phaser/src/data/events/REMOVE_DATA_EVENT.js","webpack:///D:/wamp/www/phaser/src/data/events/SET_DATA_EVENT.js","webpack:///D:/wamp/www/phaser/src/data/events/index.js","webpack:///D:/wamp/www/phaser/src/display/color/GetColorFromValue.js","webpack:///D:/wamp/www/phaser/src/display/mask/BitmapMask.js","webpack:///D:/wamp/www/phaser/src/display/mask/GeometryMask.js","webpack:///D:/wamp/www/phaser/src/gameobjects/BuildGameObject.js","webpack:///D:/wamp/www/phaser/src/gameobjects/GameObject.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Alpha.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/AlphaSingle.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Animation.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/BlendMode.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/ComputedSize.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Crop.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Depth.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Flip.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/GetBounds.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Mask.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Origin.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/PathFollower.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Pipeline.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/ScrollFactor.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Size.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Texture.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/TextureCrop.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Tint.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/ToJSON.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Transform.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/TransformMatrix.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Visible.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/index.js","webpack:///D:/wamp/www/phaser/src/gameobjects/container/Container.js","webpack:///D:/wamp/www/phaser/src/gameobjects/container/ContainerCanvasRenderer.js","webpack:///D:/wamp/www/phaser/src/gameobjects/container/ContainerRender.js","webpack:///D:/wamp/www/phaser/src/gameobjects/container/ContainerWebGLRenderer.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/ADDED_TO_SCENE_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/DESTROY_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_CREATED_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_ERROR_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_LOOP_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_PLAY_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_SEEKED_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_SEEKING_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_STOP_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/index.js","webpack:///D:/wamp/www/phaser/src/geom/const.js","webpack:///D:/wamp/www/phaser/src/geom/line/GetPoint.js","webpack:///D:/wamp/www/phaser/src/geom/line/GetPoints.js","webpack:///D:/wamp/www/phaser/src/geom/line/Length.js","webpack:///D:/wamp/www/phaser/src/geom/line/Line.js","webpack:///D:/wamp/www/phaser/src/geom/line/Random.js","webpack:///D:/wamp/www/phaser/src/geom/point/Point.js","webpack:///D:/wamp/www/phaser/src/geom/rectangle/Contains.js","webpack:///D:/wamp/www/phaser/src/geom/rectangle/GetPoint.js","webpack:///D:/wamp/www/phaser/src/geom/rectangle/GetPoints.js","webpack:///D:/wamp/www/phaser/src/geom/rectangle/Perimeter.js","webpack:///D:/wamp/www/phaser/src/geom/rectangle/Random.js","webpack:///D:/wamp/www/phaser/src/geom/rectangle/Rectangle.js","webpack:///D:/wamp/www/phaser/src/geom/rectangle/Union.js","webpack:///D:/wamp/www/phaser/src/loader/File.js","webpack:///D:/wamp/www/phaser/src/loader/FileTypesManager.js","webpack:///D:/wamp/www/phaser/src/loader/GetURL.js","webpack:///D:/wamp/www/phaser/src/loader/MergeXHRSettings.js","webpack:///D:/wamp/www/phaser/src/loader/MultiFile.js","webpack:///D:/wamp/www/phaser/src/loader/XHRLoader.js","webpack:///D:/wamp/www/phaser/src/loader/XHRSettings.js","webpack:///D:/wamp/www/phaser/src/loader/const.js","webpack:///D:/wamp/www/phaser/src/loader/events/ADD_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/FILE_COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/FILE_LOAD_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/FILE_PROGRESS_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/POST_PROCESS_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/PROGRESS_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/START_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/index.js","webpack:///D:/wamp/www/phaser/src/loader/filetypes/ImageFile.js","webpack:///D:/wamp/www/phaser/src/loader/filetypes/JSONFile.js","webpack:///D:/wamp/www/phaser/src/loader/filetypes/TextFile.js","webpack:///D:/wamp/www/phaser/src/math/Average.js","webpack:///D:/wamp/www/phaser/src/math/Bernstein.js","webpack:///D:/wamp/www/phaser/src/math/Between.js","webpack:///D:/wamp/www/phaser/src/math/CatmullRom.js","webpack:///D:/wamp/www/phaser/src/math/CeilTo.js","webpack:///D:/wamp/www/phaser/src/math/Clamp.js","webpack:///D:/wamp/www/phaser/src/math/DegToRad.js","webpack:///D:/wamp/www/phaser/src/math/Difference.js","webpack:///D:/wamp/www/phaser/src/math/Factorial.js","webpack:///D:/wamp/www/phaser/src/math/FloatBetween.js","webpack:///D:/wamp/www/phaser/src/math/FloorTo.js","webpack:///D:/wamp/www/phaser/src/math/FromPercent.js","webpack:///D:/wamp/www/phaser/src/math/GetSpeed.js","webpack:///D:/wamp/www/phaser/src/math/IsEven.js","webpack:///D:/wamp/www/phaser/src/math/IsEvenStrict.js","webpack:///D:/wamp/www/phaser/src/math/Linear.js","webpack:///D:/wamp/www/phaser/src/math/Matrix3.js","webpack:///D:/wamp/www/phaser/src/math/Matrix4.js","webpack:///D:/wamp/www/phaser/src/math/MaxAdd.js","webpack:///D:/wamp/www/phaser/src/math/MinSub.js","webpack:///D:/wamp/www/phaser/src/math/Percent.js","webpack:///D:/wamp/www/phaser/src/math/Quaternion.js","webpack:///D:/wamp/www/phaser/src/math/RadToDeg.js","webpack:///D:/wamp/www/phaser/src/math/RandomXY.js","webpack:///D:/wamp/www/phaser/src/math/RandomXYZ.js","webpack:///D:/wamp/www/phaser/src/math/RandomXYZW.js","webpack:///D:/wamp/www/phaser/src/math/Rotate.js","webpack:///D:/wamp/www/phaser/src/math/RotateAround.js","webpack:///D:/wamp/www/phaser/src/math/RotateAroundDistance.js","webpack:///D:/wamp/www/phaser/src/math/RotateTo.js","webpack:///D:/wamp/www/phaser/src/math/RotateVec3.js","webpack:///D:/wamp/www/phaser/src/math/RoundAwayFromZero.js","webpack:///D:/wamp/www/phaser/src/math/RoundTo.js","webpack:///D:/wamp/www/phaser/src/math/SinCosTableGenerator.js","webpack:///D:/wamp/www/phaser/src/math/SmoothStep.js","webpack:///D:/wamp/www/phaser/src/math/SmootherStep.js","webpack:///D:/wamp/www/phaser/src/math/ToXY.js","webpack:///D:/wamp/www/phaser/src/math/TransformXY.js","webpack:///D:/wamp/www/phaser/src/math/Vector2.js","webpack:///D:/wamp/www/phaser/src/math/Vector3.js","webpack:///D:/wamp/www/phaser/src/math/Vector4.js","webpack:///D:/wamp/www/phaser/src/math/Within.js","webpack:///D:/wamp/www/phaser/src/math/Wrap.js","webpack:///D:/wamp/www/phaser/src/math/angle/Between.js","webpack:///D:/wamp/www/phaser/src/math/angle/BetweenPoints.js","webpack:///D:/wamp/www/phaser/src/math/angle/BetweenPointsY.js","webpack:///D:/wamp/www/phaser/src/math/angle/BetweenY.js","webpack:///D:/wamp/www/phaser/src/math/angle/CounterClockwise.js","webpack:///D:/wamp/www/phaser/src/math/angle/Normalize.js","webpack:///D:/wamp/www/phaser/src/math/angle/Random.js","webpack:///D:/wamp/www/phaser/src/math/angle/RandomDegrees.js","webpack:///D:/wamp/www/phaser/src/math/angle/Reverse.js","webpack:///D:/wamp/www/phaser/src/math/angle/RotateTo.js","webpack:///D:/wamp/www/phaser/src/math/angle/ShortestBetween.js","webpack:///D:/wamp/www/phaser/src/math/angle/Wrap.js","webpack:///D:/wamp/www/phaser/src/math/angle/WrapDegrees.js","webpack:///D:/wamp/www/phaser/src/math/angle/index.js","webpack:///D:/wamp/www/phaser/src/math/const.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistanceBetween.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistanceBetweenPoints.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistanceBetweenPointsSquared.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistanceChebyshev.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistancePower.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistanceSnake.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistanceSquared.js","webpack:///D:/wamp/www/phaser/src/math/distance/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/back/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/back/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/back/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/back/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/bounce/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/bounce/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/bounce/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/bounce/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/circular/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/circular/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/circular/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/circular/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/cubic/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/cubic/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/cubic/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/cubic/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/elastic/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/elastic/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/elastic/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/elastic/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/expo/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/expo/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/expo/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/expo/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/linear/Linear.js","webpack:///D:/wamp/www/phaser/src/math/easing/linear/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/quadratic/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/quadratic/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/quadratic/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/quadratic/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/quartic/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/quartic/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/quartic/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/quartic/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/quintic/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/quintic/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/quintic/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/quintic/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/sine/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/sine/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/sine/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/sine/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/stepped/Stepped.js","webpack:///D:/wamp/www/phaser/src/math/easing/stepped/index.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/Ceil.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/Equal.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/Floor.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/GreaterThan.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/LessThan.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/index.js","webpack:///D:/wamp/www/phaser/src/math/index.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/BezierInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/CatmullRomInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/CubicBezierInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/LinearInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/QuadraticBezierInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/SmoothStepInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/SmootherStepInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/index.js","webpack:///D:/wamp/www/phaser/src/math/pow2/GetPowerOfTwo.js","webpack:///D:/wamp/www/phaser/src/math/pow2/IsSizePowerOfTwo.js","webpack:///D:/wamp/www/phaser/src/math/pow2/IsValuePowerOfTwo.js","webpack:///D:/wamp/www/phaser/src/math/pow2/index.js","webpack:///D:/wamp/www/phaser/src/math/random-data-generator/RandomDataGenerator.js","webpack:///D:/wamp/www/phaser/src/math/snap/SnapCeil.js","webpack:///D:/wamp/www/phaser/src/math/snap/SnapFloor.js","webpack:///D:/wamp/www/phaser/src/math/snap/SnapTo.js","webpack:///D:/wamp/www/phaser/src/math/snap/index.js","webpack:///D:/wamp/www/phaser/src/plugins/BasePlugin.js","webpack:///D:/wamp/www/phaser/src/plugins/ScenePlugin.js","webpack:///D:/wamp/www/phaser/src/renderer/BlendModes.js","webpack:///D:/wamp/www/phaser/src/scale/events/RESIZE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/ADDED_TO_SCENE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/BOOT_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/CREATE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/DESTROY_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/PAUSE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/POST_UPDATE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/PRE_UPDATE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/READY_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/REMOVED_FROM_SCENE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/RENDER_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/RESUME_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/SHUTDOWN_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/SLEEP_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/START_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/TRANSITION_INIT_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/TRANSITION_OUT_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/TRANSITION_START_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/UPDATE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/WAKE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/index.js","webpack:///D:/wamp/www/phaser/src/tweens/builders/GetBoolean.js","webpack:///D:/wamp/www/phaser/src/tweens/tween/const.js","webpack:///D:/wamp/www/phaser/src/utils/Class.js","webpack:///D:/wamp/www/phaser/src/utils/NOOP.js","webpack:///D:/wamp/www/phaser/src/utils/array/Add.js","webpack:///D:/wamp/www/phaser/src/utils/array/AddAt.js","webpack:///D:/wamp/www/phaser/src/utils/array/BringToTop.js","webpack:///D:/wamp/www/phaser/src/utils/array/CountAllMatching.js","webpack:///D:/wamp/www/phaser/src/utils/array/Each.js","webpack:///D:/wamp/www/phaser/src/utils/array/EachInRange.js","webpack:///D:/wamp/www/phaser/src/utils/array/FindClosestInSorted.js","webpack:///D:/wamp/www/phaser/src/utils/array/GetAll.js","webpack:///D:/wamp/www/phaser/src/utils/array/GetFirst.js","webpack:///D:/wamp/www/phaser/src/utils/array/GetRandom.js","webpack:///D:/wamp/www/phaser/src/utils/array/MoveDown.js","webpack:///D:/wamp/www/phaser/src/utils/array/MoveTo.js","webpack:///D:/wamp/www/phaser/src/utils/array/MoveUp.js","webpack:///D:/wamp/www/phaser/src/utils/array/NumberArray.js","webpack:///D:/wamp/www/phaser/src/utils/array/NumberArrayStep.js","webpack:///D:/wamp/www/phaser/src/utils/array/QuickSelect.js","webpack:///D:/wamp/www/phaser/src/utils/array/Range.js","webpack:///D:/wamp/www/phaser/src/utils/array/Remove.js","webpack:///D:/wamp/www/phaser/src/utils/array/RemoveAt.js","webpack:///D:/wamp/www/phaser/src/utils/array/RemoveBetween.js","webpack:///D:/wamp/www/phaser/src/utils/array/RemoveRandomElement.js","webpack:///D:/wamp/www/phaser/src/utils/array/Replace.js","webpack:///D:/wamp/www/phaser/src/utils/array/RotateLeft.js","webpack:///D:/wamp/www/phaser/src/utils/array/RotateRight.js","webpack:///D:/wamp/www/phaser/src/utils/array/SafeRange.js","webpack:///D:/wamp/www/phaser/src/utils/array/SendToBack.js","webpack:///D:/wamp/www/phaser/src/utils/array/SetAll.js","webpack:///D:/wamp/www/phaser/src/utils/array/Shuffle.js","webpack:///D:/wamp/www/phaser/src/utils/array/SpliceOne.js","webpack:///D:/wamp/www/phaser/src/utils/array/StableSort.js","webpack:///D:/wamp/www/phaser/src/utils/array/Swap.js","webpack:///D:/wamp/www/phaser/src/utils/array/index.js","webpack:///D:/wamp/www/phaser/src/utils/array/matrix/CheckMatrix.js","webpack:///D:/wamp/www/phaser/src/utils/array/matrix/MatrixToString.js","webpack:///D:/wamp/www/phaser/src/utils/array/matrix/ReverseColumns.js","webpack:///D:/wamp/www/phaser/src/utils/array/matrix/ReverseRows.js","webpack:///D:/wamp/www/phaser/src/utils/array/matrix/Rotate180.js","webpack:///D:/wamp/www/phaser/src/utils/array/matrix/RotateLeft.js","webpack:///D:/wamp/www/phaser/src/utils/array/matrix/RotateMatrix.js","webpack:///D:/wamp/www/phaser/src/utils/array/matrix/RotateRight.js","webpack:///D:/wamp/www/phaser/src/utils/array/matrix/TransposeMatrix.js","webpack:///D:/wamp/www/phaser/src/utils/array/matrix/index.js","webpack:///D:/wamp/www/phaser/src/utils/object/Extend.js","webpack:///D:/wamp/www/phaser/src/utils/object/GetAdvancedValue.js","webpack:///D:/wamp/www/phaser/src/utils/object/GetFastValue.js","webpack:///D:/wamp/www/phaser/src/utils/object/GetValue.js","webpack:///D:/wamp/www/phaser/src/utils/object/IsPlainObject.js","webpack:///D:/wamp/www/phaser/src/utils/string/Pad.js","webpack:///./SpineFile.js","webpack:///./SpinePlugin.js","webpack:///./container/SpineContainer.js","webpack:///./container/SpineContainerCanvasRenderer.js","webpack:///./container/SpineContainerRender.js","webpack:///./container/SpineContainerWebGLRenderer.js","webpack:///./events/COMPLETE_EVENT.js","webpack:///./events/DISPOSE_EVENT.js","webpack:///./events/END_EVENT.js","webpack:///./events/EVENT_EVENT.js","webpack:///./events/INTERRUPTED_EVENT.js","webpack:///./events/START_EVENT.js","webpack:///./events/index.js","webpack:///./gameobject/SpineGameObject.js","webpack:///./gameobject/SpineGameObjectCanvasRenderer.js","webpack:///./gameobject/SpineGameObjectRender.js","webpack:///./gameobject/SpineGameObjectWebGLRenderer.js","webpack:///./runtimes/spine-both.js"],"names":[],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFa;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,yDAAyD,OAAO;AAChE;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yCAAyC,SAAS;AAClD;AACA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA,eAAe,YAAY;AAC3B;;AAEA;AACA,2DAA2D;AAC3D,+DAA+D;AAC/D,mEAAmE;AACnE,uEAAuE;AACvE;AACA,0DAA0D,SAAS;AACnE;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,aAAa,aAAa;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,2DAA2D,YAAY;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,aAAa;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI,IAA6B;AACjC;AACA;;;;;;;;;;;;AC/UA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,iDAAe;AACnC,YAAY,mBAAO,CAAC,mDAAgB;AACpC,mBAAmB,mBAAO,CAAC,mEAAe;AAC1C,aAAa,mBAAO,CAAC,yDAAU;AAC/B,0BAA0B,mBAAO,CAAC,2FAAoC;AACtE,YAAY,mBAAO,CAAC,mEAAkB;AACtC,eAAe,mBAAO,CAAC,uEAA0B;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mCAAmC;AAC9C,WAAW,OAAO;AAClB,WAAW,kCAAkC;AAC7C;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,kDAAkD;AACjE;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD,eAAe,QAAQ;AACvB;AACA;AACA;AACA,yCAAyC,qBAAqB;;AAE9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,kDAAkD;AACjE,eAAe,OAAO;AACtB;AACA,gBAAgB,mCAAmC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,6BAA6B,gCAAgC;AAC7D,aAAa;AACb;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD,eAAe,QAAQ;AACvB;AACA;AACA;AACA,yBAAyB,mBAAmB;;AAE5C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sCAAsC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA,uBAAuB,SAAS;AAChC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,uBAAuB,wBAAwB;AAC/C;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC77BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,sBAAsB;AACjC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,2CAA2C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACvKA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,4BAA4B;AACvC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,4BAA4B;AACvC;AACA;;;;;;;;;;;;ACjBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,QAAQ;AACnB,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,QAAQ;AACnB,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACdA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;A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gB;AACpC,aAAa,mBAAO,CAAC,mDAAU;;AAE/B;AACA;AACA;AACA,WAAW,EAAE;AACb,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,KAAK;AAChB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,2BAA2B;AACtC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2BAA2B,gBAAgB;AAC3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,2DAA2D;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,aAAa;;AAEb;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,EAAE;AACjB,eAAe,KAAK;AACpB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,sCAAsC,kBAAkB;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC5rBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,qBAAqB,mBAAO,CAAC,kFAAyB;AACtD,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,cAAc,mBAAO,CAAC,oEAAkB;;AAExC;;;;;;;;;;;;ACjBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,4DAAmB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,8BAA8B;AACzC;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4EAA4E;AAC3F,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4EAA4E;AAC3F;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4EAA4E;AAC3F,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4EAA4E;AAC3F;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC9RA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,4BAA4B;AACvC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iCAAiC,6BAA6B;;AAE9D;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD,eAAe,8BAA8B;AAC7C,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sCAAsC;AACrD,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sCAAsC;AACrD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;A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A;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,2DAA2D;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4CAA4C;AAC3D,eAAe,mCAAmC;AAClD,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wCAAwC;AACxD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA,sCAAsC,mBAAmB;;AAEzD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3tBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,oDAAkB;;AAEtC;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;AChSA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,oDAAkB;;AAEtC;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACvGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,oBAAoB,mBAAO,CAAC,wEAA4B;AACxD,YAAY,mBAAO,CAAC,sDAAmB;AACvC,aAAa,mBAAO,CAAC,wEAAyB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uCAAuC,gBAAgB;;AAEvD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,4CAA4C,yBAAyB;AACrE,uCAAuC,gBAAgB;;AAEvD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,4CAA4C,yBAAyB;AACrE,uCAAuC,gBAAgB;;AAEvD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA,sCAAsC,8BAA8B;;AAEpE;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,yCAAyC,sBAAsB;;AAE/D;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,kCAAkC,eAAe;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACpqCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,sEAA2B;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2BAA2B;AAC1C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC9IA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,gBAAgB;AAChB;;AAEA;;AAEA;;;;;;;;;;;;ACtHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC7JA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,gFAAgC;AACxD,mBAAmB,mBAAO,CAAC,kEAAyB;AACpD,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,6BAA6B;AAC5C,eAAe,QAAQ;AACvB;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA,0CAA0C,uBAAuB;;AAEjE;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC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;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA,sBAAsB,wBAAwB;;AAE9C;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,6BAA6B;AAC5C,eAAe,QAAQ;AACvB;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA,sBAAsB,wBAAwB;;AAE9C;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,6BAA6B;AAC5C,eAAe,QAAQ;AACvB;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA,sBAAsB,wBAAwB;;AAE9C;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,sBAAsB;AACvC;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,mCAAmC,0BAA0B;;AAE7D;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AChWA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,8EAA+B;AACxD,mBAAmB,mBAAO,CAAC,kFAAiC;;AAE5D;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kEAAkE;AACjF;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,wCAAwC,qBAAqB;;AAE7D;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,kCAAkC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC5IA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,SAAS;AACvC,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpMA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,0DAAqB;AAC5C,iBAAiB,mBAAO,CAAC,oFAAkC;AAC3D,eAAe,mBAAO,CAAC,0EAA6B;AACpD,kBAAkB,mBAAO,CAAC,oEAA0B;AACpD,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,2BAA2B,uDAAuD;AAClF;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC,eAAe,uGAAuG;AACtH;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,0BAA0B;;AAE7D;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,YAAY;;AAE/C;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uGAAuG,WAAW;AACjI,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,aAAa;AAChD,oCAAoC,aAAa;;AAEjD;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,sBAAsB;AACtB;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpaA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,yCAAyC,gCAAgC;;AAEzE;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC3HA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,oBAAoB;;AAEtD;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpLA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD,eAAe,iBAAiB;AAChC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,yCAAyC,qBAAqB;;AAE9D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC3HA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,iBAAiB;AAChC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,yCAAyC,qBAAqB;;AAE9D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,gBAAgB;AAChB;;AAEA;;AAEA;;;;;;;;;;;;ACzMA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,wBAAwB,mBAAO,CAAC,8FAAuC;;AAEvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,oBAAoB;;AAExD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACrUA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA,YAAY,wCAAwC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,sBAAsB,mBAAO,CAAC,iFAAmB;AACjD,kBAAkB,mBAAO,CAAC,gEAAwB;AAClD,gBAAgB,mBAAO,CAAC,8DAAuB;AAC/C,uBAAuB,mBAAO,CAAC,4EAA8B;AAC7D,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ,gDAAgD;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,kCAAkC,oCAAoC;AACtE,mCAAmC,sCAAsC;;AAEzE;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,QAAQ,mDAAmD;AAC3D;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,8CAA8C;AAC9D;AACA;AACA;AACA,uCAAuC,oCAAoC;;AAE3E;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,8CAA8C;AAC9D;AACA;AACA;AACA,uCAAuC,oCAAoC;AAC3E,yCAAyC,sCAAsC;;AAE/E;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C,sBAAsB,sCAAsC;;AAE5D;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACxkBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;;AAEvC;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,qDAAqD;AACrE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,kCAAkC,UAAU,cAAc;;AAE1D;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,mCAAmC,wBAAwB;;AAE3D;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACr/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;;AAE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;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,4DAAmB;AAC5C,iBAAiB,mBAAO,CAAC,sEAA2B;AACpD,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,mEAAe;AACxC,aAAa,mBAAO,CAAC,2DAAW;AAChC,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,uBAAuB,mBAAO,CAAC,2DAAW;AAC1C,gBAAgB,mBAAO,CAAC,gFAAgC;AACxD,aAAa,mBAAO,CAAC,gFAAmB;AACxC,YAAY,mBAAO,CAAC,wEAA4B;AAChD,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,gCAAgC;AAC3C;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA,mCAAmC,0BAA0B;;AAE7D;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,2BAA2B,qBAAqB;AAChD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,mCAAmC,wBAAwB;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8CAA8C;AAC9D;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,SAAS;AACxB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,EAAE;AACjB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,KAAK;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,OAAO;AACtB,eAAe,KAAK;AACpB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;AACA;;AAEA,mBAAmB,SAAS;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,OAAO;AACtB,eAAe,KAAK;AACpB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;AACA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,2CAA2C,wBAAwB;;AAEnE;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC90CA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,qBAAqB;AACxC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpGA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,oDAAkB;AAC5C,mBAAmB,mBAAO,CAAC,oDAAkB;;AAE7C,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,8FAA0B;AACpD;;AAEA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,gGAA2B;AACtD;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9IA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,MAAM;AACjB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,oBAAoB,mBAAO,CAAC,uFAAwB;AACpD,aAAa,mBAAO,CAAC,yEAAiB;AACtC,wBAAwB,mBAAO,CAAC,+FAA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;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,OAAO;AACtB,eAAe,2BAA2B;AAC1C;AACA,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,2BAA2B;AAC1C;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;;AAEvC;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,iCAAiC,sBAAsB;;AAEvD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,iCAAiC,sBAAsB;;AAEvD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC1UA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,wDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA,WAAW,iBAAiB;AAC5B,WAAW,2BAA2B;AACtC;AACA,YAAY,2BAA2B;AACvC;AACA;AACA;AACA,4BAA4B,mBAAmB;;AAE/C;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,4CAAU;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,6DAAa;AACrC,YAAY,mBAAO,CAAC,wDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,2BAA2B;AACtC;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA,4BAA4B,mBAAmB;;AAE/C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,2DAAY;AACnC,gBAAgB,mBAAO,CAAC,6DAAa;;AAErC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA,4BAA4B,UAAU;;AAEtC;AACA;AACA;AACA;AAC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;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,OAAO;AACtB,eAAe,2BAA2B;AAC1C;AACA,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,gBAAgB;;AAEnD;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,mBAAmB;;AAEpD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,mBAAmB;;AAEpD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,mBAAmB;;AAEpD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,mBAAmB;;AAEpD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACxfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,6DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,sBAAsB;AACnC;AACA,WAAW,sBAAsB;AACjC,WAAW,sBAAsB;AACjC,WAAW,sBAAsB;AACjC;AACA,YAAY,sBAAsB;AAClC;AACA;AACA;AACA,4BAA4B,uBAAuB;;AAEnD;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;AAC/B,mBAAmB,mBAAO,CAAC,+EAA8B;AACzD,aAAa,mBAAO,CAAC,+CAAU;AAC/B,uBAAuB,mBAAO,CAAC,mEAAoB;AACnD,gBAAgB,mBAAO,CAAC,qDAAa;AACrC,kBAAkB,mBAAO,CAAC,yDAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,+BAA+B;AAC1C;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA,4GAA4G;AAC5G;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,2DAA2D;;AAE3D;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B,eAAe,cAAc;AAC7B;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B,eAAe,cAAc;AAC7B;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,kBAAkB;;AAEnD;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iEAAiE;AACjE;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,eAAe,2BAA2B;AAC1C;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC7hBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2BAA2B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC9DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,mEAAwB;AAC7C,kBAAkB,mBAAO,CAAC,yDAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,sCAAsC;AACjD;AACA,YAAY,sCAAsC;AAClD;AACA;AACA;AACA,mEAAmE;;AAEnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACnOA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,uBAAuB,mBAAO,CAAC,mEAAoB;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,sCAAsC;AACjD;AACA,YAAY,eAAe;AAC3B;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,sCAAsC;AAClD;AACA;AACA;AACA,qCAAqC,mBAAmB;AACxD,8BAA8B,cAAc;AAC5C,6BAA6B,WAAW;AACxC,iCAAiC,eAAe;AAChD,gCAAgC,aAAa;AAC7C,wCAAwC,yBAAyB;;AAEjE;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACjJA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,2BAA2B;AACtC,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,uDAAuD;AACjJ;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,oFAAoF,mDAAmD;AACvI;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;AC/CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,SAAS,mBAAO,CAAC,4DAAa;AAC9B,cAAc,mBAAO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;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uGAAuG;AAClH,WAAW,gBAAgB;AAC3B,WAAW,sCAAsC;AACjD;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;;;;;;;;;;;AC3QA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,eAAe,mBAAO,CAAC,0EAA6B;AACpD,oBAAoB,mBAAO,CAAC,oFAAkC;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,sDAAsD;AACjE,WAAW,gBAAgB;AAC3B,WAAW,sCAAsC;AACjD,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA,QAAQ;AACR,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qGAAqG;AAChH,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,WAAW,sCAAsC;AACjD;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;;;;;;;;;;;AC/NA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,oBAAoB,mBAAO,CAAC,oFAAkC;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,sDAAsD;AACjE,WAAW,OAAO;AAClB,WAAW,sCAAsC;AACjD;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qGAAqG;AAChH,WAAW,OAAO;AAClB,WAAW,sCAAsC;AACjD;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;;;;;;;;;;;ACxKA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,mDAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,6BAA6B,WAAW;;AAExC;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,6BAA6B,WAAW;;AAExC;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC1kBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;;AAEA;;;;;;;;;;;;AC/6CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,4BAA4B,eAAe;;AAE3C;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,4CAA4C;;AAE5C;;AAEA,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC7vBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,+BAA+B,YAAY;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA,WAAW,8BAA8B;AACzC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,qDAAiB;AACvC,cAAc,mBAAO,CAAC,qDAAiB;AACvC,iBAAiB,mBAAO,CAAC,2DAAoB;;AAE7C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,6BAA6B,WAAW;;AAExC;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA;AACA,+BAA+B,YAAY;AAC3C,+BAA+B,YAAY;AAC3C,kCAAkC,eAAe;;AAEjD;;AAEA;AACA;;AAEA,mBAAmB,YAAY;AAC/B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,6BAA6B;AAC9E;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,oBAAoB;AAC/B;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,4BAA4B,qBAAqB;;AAEjD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,+CAA+C;AAC1D;AACA,YAAY,+CAA+C;AAC3D;AACA;AACA;AACA,+BAA+B,wBAAwB;;AAEvD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,6DAAqB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,OAAO;;AAEzC;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,6BAA6B,YAAY;;AAEzC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;;;;;;;;;;;;ACjwBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;;;;;;;;;;;;ACnyBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1hBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA,2CAA2C,sCAAsC;AACjF;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA,2CAA2C,gCAAgC;AAC3E;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,4CAAU;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,0DAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,0DAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,yDAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,4CAAU;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,6BAA6B,aAAa;;AAE1C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;AC1CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,0CAAS;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,WAAW,mBAAO,CAAC,0CAAS;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,aAAa,mBAAO,CAAC,qDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAiB;AAC5C,oBAAoB,mBAAO,CAAC,mEAAkB;AAC9C,cAAc,mBAAO,CAAC,uDAAY;AAClC,sBAAsB,mBAAO,CAAC,uEAAoB;AAClD,eAAe,mBAAO,CAAC,yDAAa;AACpC,YAAY,mBAAO,CAAC,mDAAU;AAC9B,mBAAmB,mBAAO,CAAC,iEAAiB;AAC5C,aAAa,mBAAO,CAAC,qDAAW;AAChC,cAAc,mBAAO,CAAC,uDAAY;AAClC,qBAAqB,mBAAO,CAAC,qEAAmB;AAChD,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,iBAAiB,mBAAO,CAAC,6DAAe;;AAExC;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACrFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,4BAA4B,SAAS;;AAErC;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,aAAa,mBAAO,CAAC,wEAAmB;AACxC,mBAAmB,mBAAO,CAAC,oFAAyB;AACpD,0BAA0B,mBAAO,CAAC,kGAAgC;AAClE,eAAe,mBAAO,CAAC,4EAAqB;AAC5C,WAAW,mBAAO,CAAC,oEAAiB;AACpC,WAAW,mBAAO,CAAC,oEAAiB;AACpC,aAAa,mBAAO,CAAC,wEAAmB;;AAExC;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,qBAAqB;;AAEvD;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,qBAAqB;;AAEvD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,qBAAqB;;AAEvD;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,mDAAM;AACtB,SAAS,mBAAO,CAAC,qDAAO;AACxB,WAAW,mBAAO,CAAC,yDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,qDAAM;AACtB,SAAS,mBAAO,CAAC,uDAAO;AACxB,WAAW,mBAAO,CAAC,2DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,kDAAM;AACtB,SAAS,mBAAO,CAAC,oDAAO;AACxB,WAAW,mBAAO,CAAC,wDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD,+BAA+B,cAAc;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD,+BAA+B,cAAc;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD,+BAA+B,cAAc;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA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AClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,sDAAM;AACtB,SAAS,mBAAO,CAAC,wDAAO;AACxB,WAAW,mBAAO,CAAC,4DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA,iBAAiB,mBAAO,CAAC,8DAAW;;;;;;;;;;;;ACVpC;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,gCAAgC,kBAAkB;;AAElD;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,gCAAgC,kBAAkB;;AAElD;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,gCAAgC,kBAAkB;;AAElD;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;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EA;;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,oDAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,QAAQ;AAC3B;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,sDAAe;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,8CAAW;;AAEhC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,aAAa,mBAAO,CAAC,gEAAiB;AACtC,YAAY,mBAAO,CAAC,sEAAoB;AACxC,aAAa,mBAAO,CAAC,wEAAqB;;AAE1C;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;;AAEA;;AAEA;AACA;AACA,kCAAkC,qDAAqD;;AAEvF;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,oEAAoE;;AAEpE;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;;AAEA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;;AAEA;;AAEA,kDAAkD;AAClD,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,wCAAwC;AAC/D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA,wBAAwB,UAAU;AAClC;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,IAAI;AACxB,oBAAoB,EAAE;AACtB;AACA,eAAe,IAAI;AACnB;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,IAAI;AACxB,oBAAoB,EAAE;AACtB;AACA,eAAe,IAAI;AACnB;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,IAAI;AACxB;AACA,eAAe,IAAI;AACnB;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;;AAEA,yBAAyB,OAAO;AAChC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACvfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,UAAU,mBAAO,CAAC,sDAAY;AAC9B,WAAW,mBAAO,CAAC,wDAAa;AAChC,QAAQ,mBAAO,CAAC,kDAAU;;AAE1B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,6BAA6B;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,4DAA4D,sCAAsC;AAClG;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC3HA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA,iBAAiB,mBAAO,CAAC,wDAAc;AACvC,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,2DAAiB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,6BAA6B;AACxC;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,mCAAmC,wCAAwC;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACzHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5UA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,6CAA6C;AACpF;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,qDAAqD;AACpH;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA,4EAA4E,sDAAsD;AAClI;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WA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AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACrKA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvPA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,gCAAgC,iBAAiB;;AAEjD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9GA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,gCAAgC,iBAAiB;;AAEjD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,gCAAgC,QAAQ;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;A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;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC7EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,iCAAiC,yBAAyB;;AAE1D;;AAEA;AACA;AACA,gCAAgC,cAAc;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,iCAAiC,yBAAyB;;AAE1D;AACA;AACA,gCAAgC,cAAc;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,+BAA+B,uBAAuB;;AAEtD;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C,iDAAiD;AACjD;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;;AAEA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,wBAAwB,mBAAO,CAAC,4EAA8B;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,4BAA4B,YAAY;AACxC,6BAA6B,UAAU;;AAEvC;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA,6BAA6B,UAAU;AACvC,8BAA8B,wBAAwB;AACtD,gCAAgC,0BAA0B;;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,iEAAoB;AAC3C,cAAc,mBAAO,CAAC,sDAAW;;AAEjC;AACA;AACA;;AAEA,wBAAwB,mBAAmB;AAC3C;AACA,4BAA4B,mBAAmB;AAC/C;AACA,2BAA2B,SAAS;AACpC;AACA,0BAA0B,6BAA6B;AACvD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mBAAmB,aAAa;AAChC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnIA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,YAAY;AACvB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,YAAY;AACxB;AACA;AACA;AACA,gCAAgC,iBAAiB;;AAEjD;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA,gCAAgC,iBAAiB;;AAEjD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,iCAAiC,yBAAyB;AAC1D,gCAAgC,iBAAiB;;AAEjD;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,+BAA+B,uBAAuB;;AAEtD;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;;AAEA,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;;AAEA,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,iCAAiC,yBAAyB;;AAE1D;AACA;AACA,gCAAgC,cAAc;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,IAAI;AACpB;AACA,WAAW,IAAI;AACf;AACA,YAAY,IAAI;AAChB;AACA;AACA;AACA,kCAAkC,OAAO;AACzC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,uBAAuB,SAAS;AAChC;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACvCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB,WAAW;AAChC;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI,IAA8B;AAClC;AACA;AACA,KAAK,EAEJ;;AAED,CAAC,I;;;;;;;;;;;AC7ID;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,YAAY,mBAAO,CAAC,0DAAU;;AAE9B,SAAS,mBAAO,CAAC,8CAAO;AACxB,WAAW,mBAAO,CAAC,kDAAS;AAC5B,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,sBAAsB,mBAAO,CAAC,wEAAoB;AAClD,UAAU,mBAAO,CAAC,gDAAQ;AAC1B,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,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EzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA,uBAAuB,sBAAsB;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2BAA2B,sBAAsB;AACjD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;A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e;AACxC,eAAe,mBAAO,CAAC,iEAAa;AACpC,gBAAgB,mBAAO,CAAC,mEAAc;AACtC,kBAAkB,mBAAO,CAAC,uEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,qBAAqB,mBAAO,CAAC,6EAAmB;;AAEhD;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,oBAAoB,mBAAO,CAAC,mEAAiB;;AAE7C,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,YAAY,OAAO;;AAEnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,UAAU,YAAY;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,WAAW,mBAAO,CAAC,8CAAY;AAC/B,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA,8CAA8C,aAAa,qBAAqB;AAChF;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb;AACA,YAAY,EAAE,oBAAoB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;;AAEA;;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB,W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5C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,+BAA+B,oBAAoB;AACnD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,+BAA+B,qBAAqB;AACpD;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,2BAA2B,uBAAuB;AAClD;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,sCAAsC,uFAAuF;;AAE7H;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACtPA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,sBAAsB,mBAAO,CAAC,6FAA0C;AACxE,YAAY,mBAAO,CAAC,6DAA0B;AAC9C,eAAe,mBAAO,CAAC,iFAAoC;AAC3D,kBAAkB,mBAAO,CAAC,yFAAwC;AAClE,kBAAkB,mBAAO,CAAC,6EAAkC;AAC5D,YAAY,mBAAO,CAAC,uCAAO;AAC3B,gBAAgB,mBAAO,CAAC,mCAAa;AACrC,sBAAsB,mBAAO,CAAC,qEAA8B;AAC5D,qBAAqB,mBAAO,CAAC,iEAA4B;AACzD,WAAW,mBAAO,CAAC,2DAAyB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,6BAA6B;AACxC;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qGAAqG;AACpH,eAAe,OAAO;AACtB,eAAe,gBAAgB;AAC/B,eAAe,QAAQ;AACvB,eAAe,sCAAsC;AACrD,eAAe,sCAAsC;AACrD;AACA,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,eAAe;AAC9B,eAAe,WAAW;AAC1B;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;;AAEA;;AAEA,gBAAgB;AAChB,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;AACA;;AAEA;;AAEA,gBAAgB;AAChB,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,gBAAgB;AAC5B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,QAAQ;AACnB;AACA,YAAY,gBAAgB;AAC5B;;AAEA;;;;;;;;;;;;AC/pCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,gEAA6B;AACjD,gBAAgB,mBAAO,CAAC,wGAAiD;AACzE,2BAA2B,mBAAO,CAAC,mEAAwB;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,YAAY;AACvB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,kBAAkB;AAC7B;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACxEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;A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AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpKA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,cAAc,mBAAO,CAAC,oDAAkB;AACxC,aAAa,mBAAO,CAAC,kDAAiB;AACtC,SAAS,mBAAO,CAAC,0CAAa;AAC9B,WAAW,mBAAO,CAAC,8CAAe;AAClC,iBAAiB,mBAAO,CAAC,0DAAqB;AAC9C,WAAW,mBAAO,CAAC,8CAAe;;AAElC;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,8EAAoC;AAC/D,YAAY,mBAAO,CAAC,8DAA4B;AAChD,YAAY,mBAAO,CAAC,gEAA6B;AACjD,6BAA6B,mBAAO,CAAC,gHAAqD;AAC1F,sBAAsB,mBAAO,CAAC,kGAA8C;AAC5E,qBAAqB,mBAAO,CAAC,gGAA6C;AAC1E,6BAA6B,mBAAO,CAAC,gHAAqD;AAC1F,0BAA0B,mBAAO,CAAC,0GAAkD;AACpF,wBAAwB,mBAAO,CAAC,sGAAgD;AAChF,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,eAAe,mBAAO,CAAC,oEAA+B;AACtD,iBAAiB,mBAAO,CAAC,sFAAwC;AACjE,eAAe,mBAAO,CAAC,oEAA+B;AACtD,kBAAkB,mBAAO,CAAC,qCAAY;AACtC,4BAA4B,mBAAO,CAAC,sEAAyB;;AAE7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,YAAY;AACvB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,kBAAkB;;AAEpD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB,eAAe,YAAY;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,kCAAkC,6BAA6B;AAC/D,mCAAmC,+BAA+B;AAClE,oCAAoC,aAAa;AACjD,oCAAoC,aAAa;;AAEjD;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,oCAAoC,aAAa;AACjD,oCAAoC,aAAa;;AAEjD;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA,uBAAuB,2BAA2B;AAClD;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,oCAAoC;AAC/D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,uCAAuC,gBAAgB;;AAEvD;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C,4CAA4C,yBAAyB;;AAErE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA,2BAA2B,qBAAqB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,YAAY;AAC/C,qCAAqC,cAAc;AACnD,qCAAqC,gBAAgB;;AAErD;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACjjDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5HA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,oFAAgC;AAC1D;;AAEA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,sFAAiC;AAC5D;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxKA;;AAEA;AACA;AACA;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA,kCAAkC,UAAU;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,mDAAmD;AACxD;AACA;AACA;AACA;AACA,KAAK,+DAA+D;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,+DAA+D;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,OAAO;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,OAAO;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,iBAAiB;AAC5D;AACA;AACA;AACA;AACA,2CAA2C,iBAAiB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,mBAAmB;AAC5D;AACA;AACA;AACA;AACA;AACA,yCAAyC,mBAAmB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,oBAAoB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,oBAAoB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,6CAA6C;AAC/D;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,OAAO;AACxE;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,yBAAyB,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,YAAY;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,oBAAoB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,oBAAoB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA;AACA,kCAAkC,oBAAoB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,cAAc;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,sDAAsD;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA,wCAAwC,iBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yGAAyG;AACzG;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,qGAAqG;AACrG;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,2DAA2D,0BAA0B;AACrF;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,sDAAsD;AAC3D,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,kEAAkE;AACvE,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,OAAO;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,iBAAiB;AACpD;AACA;AACA;AACA,iDAAiD,iBAAiB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,gBAAgB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA,0DAA0D,iBAAiB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK,+DAA+D;AACpE;AACA;AACA;AACA;AACA;AACA,KAAK,4DAA4D;AACjE;AACA;AACA;AACA;AACA;AACA,KAAK,yDAAyD;AAC9D,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,wCAAwC,iBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,gCAAgC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;AACA,2BAA2B,sCAAsC;AACjE;AACA;AACA;AACA;AACA,2BAA2B,iCAAiC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,OAAO;AAClE;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qBAAqB;AACvD,gCAAgC,cAAc;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,qBAAqB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,eAAe;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,eAAe;AAC9C;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qBAAqB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,OAAO;AAC7B;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA,wDAAwD,OAAO;AAC/D;AACA,wDAAwD,OAAO;AAC/D;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,OAAO;AACtC;AACA;AACA;AACA,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA;AACA;AACA,wCAAwC,yBAAyB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA;AACA;AACA,wCAAwC,yBAAyB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA,0DAA0D,SAAS;AACnE;AACA,gEAAgE,WAAW;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,yBAAyB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,SAAS;AAChE;AACA;AACA;AACA,uDAAuD,SAAS;AAChE;AACA;AACA;AACA,uEAAuE,QAAQ;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;AACA;AACA;AACA,oCAAoC,kBAAkB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,qCAAqC,uBAAuB;AAC5D,mCAAmC,WAAW;AAC9C,oCAAoC,oCAAoC;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,mCAAmC,cAAc;AACjD,sCAAsC,iBAAiB;AACvD;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA,qDAAqD,SAAS;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qBAAqB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,sBAAsB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA,gCAAgC,0BAA0B;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,OAAO;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,OAAO;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,2BAA2B;AAC1D;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA,wCAAwC,2BAA2B;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,wBAAwB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,+BAA+B;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,0BAA0B;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,OAAO;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,wBAAwB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA,gDAAgD,QAAQ;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0BAA0B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0BAA0B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yFAAyF,OAAO;AAChG;AACA;AACA;AACA,uDAAuD,kBAAkB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,0BAA0B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,oBAAoB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6BAA6B;AACxD;AACA;AACA,+BAA+B,6BAA6B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,wBAAwB;AACnD;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6BAA6B;AACxD;AACA;AACA,+BAA+B,6BAA6B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,wBAAwB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6BAA6B;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,kEAAkE;AACvE;AACA;AACA;AACA;AACA;AACA,KAAK,4DAA4D;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E;AAC5E,kEAAkE;AAClE,qDAAqD;AACrD;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,yBAAyB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,gBAAgB;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,oDAAoD,+BAA+B;AACnF;AACA;AACA;AACA;AACA,mCAAmC,WAAW;AAC9C;AACA;AACA;AACA;AACA;AACA,qCAAqC,UAAU;AAC/C;AACA;AACA;AACA;AACA;AACA,mCAAmC,WAAW;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,UAAU;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,iBAAiB;AACvD,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,wCAAwC,iBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,wBAAwB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,WAAW;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,WAAW;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,WAAW;AAC7D;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,WAAW;AAC5E;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,qEAAqE;AAC1E,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,iBAAiB;AAC7D,2DAA2D,8CAA8C,EAAE;AAC3G;AACA;AACA,SAAS;AACT;AACA,KAAK,6CAA6C;AAClD,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kFAAkF;AAClF,wEAAwE;AACxE,2DAA2D;AAC3D;AACA,SAAS;AACT;AACA,KAAK,6CAA6C;AAClD,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,sBAAsB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,OAAO;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,6CAA6C;AAClD,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,iBAAiB;AAC7D;AACA;AACA,iBAAiB;AACjB;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,oBAAoB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,UAAU;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,wBAAwB;AAChF,sDAAsD,sDAAsD;AAC5G,sDAAsD,qDAAqD;AAC3G;AACA;AACA;AACA;AACA,sDAAsD,sBAAsB;AAC5E,qDAAqD,4BAA4B;AACjF,qDAAqD,2BAA2B;AAChF;AACA;AACA;AACA;AACA,qDAAqD,qBAAqB;AAC1E;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,sCAAsC,UAAU;AAChD;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS,oFAAoF;AAC7F,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE,6CAA6C,qBAAqB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,oBAAoB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,uBAAuB;AACxF;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF,gDAAgD,qBAAqB;AACrE,8CAA8C,mBAAmB;AACjE;AACA;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,0CAA0C,cAAc;AACxD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,yDAAyD;AAClE,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,qBAAqB;AAC5E,4DAA4D,0BAA0B;AACtF,8DAA8D,4BAA4B;AAC1F,kEAAkE,sBAAsB;AACxF,8DAA8D,sBAAsB;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,8CAA8C,kDAAkD,iDAAiD,+BAA+B,mCAAmC,0BAA0B,2CAA2C,mDAAmD,8EAA8E,WAAW;AAC/e,iHAAiH,2FAA2F,mCAAmC,sCAAsC,0BAA0B,uEAAuE,WAAW;AACjY;AACA;AACA;AACA,2EAA2E,8CAA8C,+CAA+C,kDAAkD,iDAAiD,+BAA+B,8BAA8B,mCAAmC,0BAA0B,2CAA2C,2CAA2C,mDAAmD,8EAA8E,WAAW;AACvmB,iHAAiH,2FAA2F,mCAAmC,mCAAmC,sCAAsC,0BAA0B,8DAA8D,oDAAoD,8HAA8H,WAAW;AAC7kB;AACA;AACA;AACA,2EAA2E,8CAA8C,iDAAiD,+BAA+B,0BAA0B,2CAA2C,8EAA8E,WAAW;AACvW,iHAAiH,2FAA2F,0BAA0B,mCAAmC,WAAW;AACpR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,qBAAqB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,0CAA0C,cAAc;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,sDAAsD;AAC/D,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,SAAS;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,SAAS;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,YAAY;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,qBAAqB;AACrE,8CAA8C,mBAAmB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,SAAS;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,SAAS;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,OAAO;AAC1C,mCAAmC,OAAO;AAC1C,mCAAmC,OAAO;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,kBAAkB,iBAAiB;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,qEAAqE,OAAO;AAC5E;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;;AAEA,CAAC","file":"SpinePluginDebug.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./SpinePlugin.js\");\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('../math/Clamp');\r\nvar Class = require('../utils/Class');\r\nvar EventEmitter = require('eventemitter3');\r\nvar Events = require('./events');\r\nvar FindClosestInSorted = require('../utils/array/FindClosestInSorted');\r\nvar Frame = require('./AnimationFrame');\r\nvar GetValue = require('../utils/object/GetValue');\r\n\r\n/**\r\n * @classdesc\r\n * A Frame based Animation.\r\n *\r\n * This consists of a key, some default values (like the frame rate) and a bunch of Frame objects.\r\n *\r\n * The Animation Manager creates these. Game Objects don't own an instance of these directly.\r\n * Game Objects have the Animation Component, which are like playheads to global Animations (these objects)\r\n * So multiple Game Objects can have playheads all pointing to this one Animation instance.\r\n *\r\n * @class Animation\r\n * @memberof Phaser.Animations\r\n * @extends Phaser.Events.EventEmitter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Animations.AnimationManager} manager - A reference to the global Animation Manager\r\n * @param {string} key - The unique identifying string for this animation.\r\n * @param {Phaser.Types.Animations.Animation} config - The Animation configuration.\r\n */\r\nvar Animation = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function Animation (manager, key, config)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the global Animation Manager.\r\n *\r\n * @name Phaser.Animations.Animation#manager\r\n * @type {Phaser.Animations.AnimationManager}\r\n * @since 3.0.0\r\n */\r\n this.manager = manager;\r\n\r\n /**\r\n * The unique identifying string for this animation.\r\n *\r\n * @name Phaser.Animations.Animation#key\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.key = key;\r\n\r\n /**\r\n * A frame based animation (as opposed to a bone based animation)\r\n *\r\n * @name Phaser.Animations.Animation#type\r\n * @type {string}\r\n * @default frame\r\n * @since 3.0.0\r\n */\r\n this.type = 'frame';\r\n\r\n /**\r\n * Extract all the frame data into the frames array.\r\n *\r\n * @name Phaser.Animations.Animation#frames\r\n * @type {Phaser.Animations.AnimationFrame[]}\r\n * @since 3.0.0\r\n */\r\n this.frames = this.getFrames(\r\n manager.textureManager,\r\n GetValue(config, 'frames', []),\r\n GetValue(config, 'defaultTextureKey', null)\r\n );\r\n\r\n /**\r\n * The frame rate of playback in frames per second (default 24 if duration is null)\r\n *\r\n * @name Phaser.Animations.Animation#frameRate\r\n * @type {integer}\r\n * @default 24\r\n * @since 3.0.0\r\n */\r\n this.frameRate = GetValue(config, 'frameRate', null);\r\n\r\n /**\r\n * How long the animation should play for, in milliseconds.\r\n * If the `frameRate` property has been set then it overrides this value,\r\n * otherwise the `frameRate` is derived from `duration`.\r\n *\r\n * @name Phaser.Animations.Animation#duration\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.duration = GetValue(config, 'duration', null);\r\n\r\n if (this.duration === null && this.frameRate === null)\r\n {\r\n // No duration or frameRate given, use default frameRate of 24fps\r\n this.frameRate = 24;\r\n this.duration = (this.frameRate / this.frames.length) * 1000;\r\n }\r\n else if (this.duration && this.frameRate === null)\r\n {\r\n // Duration given but no frameRate, so set the frameRate based on duration\r\n // I.e. 12 frames in the animation, duration = 4000 ms\r\n // So frameRate is 12 / (4000 / 1000) = 3 fps\r\n this.frameRate = this.frames.length / (this.duration / 1000);\r\n }\r\n else\r\n {\r\n // frameRate given, derive duration from it (even if duration also specified)\r\n // I.e. 15 frames in the animation, frameRate = 30 fps\r\n // So duration is 15 / 30 = 0.5 * 1000 (half a second, or 500ms)\r\n this.duration = (this.frames.length / this.frameRate) * 1000;\r\n }\r\n\r\n /**\r\n * How many ms per frame, not including frame specific modifiers.\r\n *\r\n * @name Phaser.Animations.Animation#msPerFrame\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.msPerFrame = 1000 / this.frameRate;\r\n\r\n /**\r\n * Skip frames if the time lags, or always advanced anyway?\r\n *\r\n * @name Phaser.Animations.Animation#skipMissedFrames\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.skipMissedFrames = GetValue(config, 'skipMissedFrames', true);\r\n\r\n /**\r\n * The delay in ms before the playback will begin.\r\n *\r\n * @name Phaser.Animations.Animation#delay\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.delay = GetValue(config, 'delay', 0);\r\n\r\n /**\r\n * Number of times to repeat the animation. Set to -1 to repeat forever.\r\n *\r\n * @name Phaser.Animations.Animation#repeat\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.repeat = GetValue(config, 'repeat', 0);\r\n\r\n /**\r\n * The delay in ms before the a repeat play starts.\r\n *\r\n * @name Phaser.Animations.Animation#repeatDelay\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.repeatDelay = GetValue(config, 'repeatDelay', 0);\r\n\r\n /**\r\n * Should the animation yoyo (reverse back down to the start) before repeating?\r\n *\r\n * @name Phaser.Animations.Animation#yoyo\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.yoyo = GetValue(config, 'yoyo', false);\r\n\r\n /**\r\n * Should the GameObject's `visible` property be set to `true` when the animation starts to play?\r\n *\r\n * @name Phaser.Animations.Animation#showOnStart\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.showOnStart = GetValue(config, 'showOnStart', false);\r\n\r\n /**\r\n * Should the GameObject's `visible` property be set to `false` when the animation finishes?\r\n *\r\n * @name Phaser.Animations.Animation#hideOnComplete\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.hideOnComplete = GetValue(config, 'hideOnComplete', false);\r\n\r\n /**\r\n * Global pause. All Game Objects using this Animation instance are impacted by this property.\r\n *\r\n * @name Phaser.Animations.Animation#paused\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.paused = false;\r\n\r\n this.manager.on(Events.PAUSE_ALL, this.pause, this);\r\n this.manager.on(Events.RESUME_ALL, this.resume, this);\r\n },\r\n\r\n /**\r\n * Add frames to the end of the animation.\r\n *\r\n * @method Phaser.Animations.Animation#addFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects.\r\n *\r\n * @return {this} This Animation object.\r\n */\r\n addFrame: function (config)\r\n {\r\n return this.addFrameAt(this.frames.length, config);\r\n },\r\n\r\n /**\r\n * Add frame/s into the animation.\r\n *\r\n * @method Phaser.Animations.Animation#addFrameAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The index to insert the frame at within the animation.\r\n * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects.\r\n *\r\n * @return {this} This Animation object.\r\n */\r\n addFrameAt: function (index, config)\r\n {\r\n var newFrames = this.getFrames(this.manager.textureManager, config);\r\n\r\n if (newFrames.length > 0)\r\n {\r\n if (index === 0)\r\n {\r\n this.frames = newFrames.concat(this.frames);\r\n }\r\n else if (index === this.frames.length)\r\n {\r\n this.frames = this.frames.concat(newFrames);\r\n }\r\n else\r\n {\r\n var pre = this.frames.slice(0, index);\r\n var post = this.frames.slice(index);\r\n\r\n this.frames = pre.concat(newFrames, post);\r\n }\r\n\r\n this.updateFrameSequence();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check if the given frame index is valid.\r\n *\r\n * @method Phaser.Animations.Animation#checkFrame\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The index to be checked.\r\n *\r\n * @return {boolean} `true` if the index is valid, otherwise `false`.\r\n */\r\n checkFrame: function (index)\r\n {\r\n return (index >= 0 && index < this.frames.length);\r\n },\r\n\r\n /**\r\n * Called internally when this Animation completes playback.\r\n * Optionally, hides the parent Game Object, then stops playback.\r\n *\r\n * @method Phaser.Animations.Animation#completeAnimation\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\r\n */\r\n completeAnimation: function (component)\r\n {\r\n if (this.hideOnComplete)\r\n {\r\n component.parent.visible = false;\r\n }\r\n\r\n component.stop();\r\n },\r\n\r\n /**\r\n * Called internally when this Animation first starts to play.\r\n * Sets the accumulator and nextTick properties.\r\n *\r\n * @method Phaser.Animations.Animation#getFirstTick\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\r\n * @param {boolean} [includeDelay=true] - If `true` the Animation Components delay value will be added to the `nextTick` total.\r\n */\r\n getFirstTick: function (component, includeDelay)\r\n {\r\n if (includeDelay === undefined) { includeDelay = true; }\r\n\r\n // When is the first update due?\r\n component.accumulator = 0;\r\n component.nextTick = component.msPerFrame + component.currentFrame.duration;\r\n\r\n if (includeDelay)\r\n {\r\n component.nextTick += component._delay;\r\n }\r\n },\r\n\r\n /**\r\n * Returns the AnimationFrame at the provided index\r\n *\r\n * @method Phaser.Animations.Animation#getFrameAt\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The index in the AnimationFrame array\r\n *\r\n * @return {Phaser.Animations.AnimationFrame} The frame at the index provided from the animation sequence\r\n */\r\n getFrameAt: function (index)\r\n {\r\n return this.frames[index];\r\n },\r\n\r\n /**\r\n * Creates AnimationFrame instances based on the given frame data.\r\n *\r\n * @method Phaser.Animations.Animation#getFrames\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.TextureManager} textureManager - A reference to the global Texture Manager.\r\n * @param {(string|Phaser.Types.Animations.AnimationFrame[])} frames - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects.\r\n * @param {string} [defaultTextureKey] - The key to use if no key is set in the frame configuration object.\r\n *\r\n * @return {Phaser.Animations.AnimationFrame[]} An array of newly created AnimationFrame instances.\r\n */\r\n getFrames: function (textureManager, frames, defaultTextureKey)\r\n {\r\n var out = [];\r\n var prev;\r\n var animationFrame;\r\n var index = 1;\r\n var i;\r\n var textureKey;\r\n\r\n // if frames is a string, we'll get all the frames from the texture manager as if it's a sprite sheet\r\n if (typeof frames === 'string')\r\n {\r\n textureKey = frames;\r\n\r\n var texture = textureManager.get(textureKey);\r\n var frameKeys = texture.getFrameNames();\r\n\r\n frames = [];\r\n\r\n frameKeys.forEach(function (idx, value)\r\n {\r\n frames.push({ key: textureKey, frame: value });\r\n });\r\n }\r\n\r\n if (!Array.isArray(frames) || frames.length === 0)\r\n {\r\n return out;\r\n }\r\n\r\n for (i = 0; i < frames.length; i++)\r\n {\r\n var item = frames[i];\r\n\r\n var key = GetValue(item, 'key', defaultTextureKey);\r\n\r\n if (!key)\r\n {\r\n continue;\r\n }\r\n\r\n // Could be an integer or a string\r\n var frame = GetValue(item, 'frame', 0);\r\n\r\n // The actual texture frame\r\n var textureFrame = textureManager.getFrame(key, frame);\r\n\r\n animationFrame = new Frame(key, frame, index, textureFrame);\r\n\r\n animationFrame.duration = GetValue(item, 'duration', 0);\r\n\r\n animationFrame.isFirst = (!prev);\r\n\r\n // The previously created animationFrame\r\n if (prev)\r\n {\r\n prev.nextFrame = animationFrame;\r\n\r\n animationFrame.prevFrame = prev;\r\n }\r\n\r\n out.push(animationFrame);\r\n\r\n prev = animationFrame;\r\n\r\n index++;\r\n }\r\n\r\n if (out.length > 0)\r\n {\r\n animationFrame.isLast = true;\r\n\r\n // Link them end-to-end, so they loop\r\n animationFrame.nextFrame = out[0];\r\n\r\n out[0].prevFrame = animationFrame;\r\n\r\n // Generate the progress data\r\n\r\n var slice = 1 / (out.length - 1);\r\n\r\n for (i = 0; i < out.length; i++)\r\n {\r\n out[i].progress = i * slice;\r\n }\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Called internally. Sets the accumulator and nextTick values of the current Animation.\r\n *\r\n * @method Phaser.Animations.Animation#getNextTick\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\r\n */\r\n getNextTick: function (component)\r\n {\r\n // accumulator += delta * _timeScale\r\n // after a large delta surge (perf issue for example) we need to adjust for it here\r\n\r\n // When is the next update due?\r\n component.accumulator -= component.nextTick;\r\n\r\n component.nextTick = component.msPerFrame + component.currentFrame.duration;\r\n },\r\n\r\n /**\r\n * Loads the Animation values into the Animation Component.\r\n *\r\n * @method Phaser.Animations.Animation#load\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to load values into.\r\n * @param {integer} startFrame - The start frame of the animation to load.\r\n */\r\n load: function (component, startFrame)\r\n {\r\n if (startFrame >= this.frames.length)\r\n {\r\n startFrame = 0;\r\n }\r\n\r\n if (component.currentAnim !== this)\r\n {\r\n component.currentAnim = this;\r\n\r\n component.frameRate = this.frameRate;\r\n component.duration = this.duration;\r\n component.msPerFrame = this.msPerFrame;\r\n component.skipMissedFrames = this.skipMissedFrames;\r\n\r\n component._delay = this.delay;\r\n component._repeat = this.repeat;\r\n component._repeatDelay = this.repeatDelay;\r\n component._yoyo = this.yoyo;\r\n }\r\n\r\n var frame = this.frames[startFrame];\r\n\r\n if (startFrame === 0 && !component.forward)\r\n {\r\n frame = this.getLastFrame();\r\n }\r\n\r\n component.updateFrame(frame);\r\n },\r\n\r\n /**\r\n * Returns the frame closest to the given progress value between 0 and 1.\r\n *\r\n * @method Phaser.Animations.Animation#getFrameByProgress\r\n * @since 3.4.0\r\n *\r\n * @param {number} value - A value between 0 and 1.\r\n *\r\n * @return {Phaser.Animations.AnimationFrame} The frame closest to the given progress value.\r\n */\r\n getFrameByProgress: function (value)\r\n {\r\n value = Clamp(value, 0, 1);\r\n\r\n return FindClosestInSorted(value, this.frames, 'progress');\r\n },\r\n\r\n /**\r\n * Advance the animation frame.\r\n *\r\n * @method Phaser.Animations.Animation#nextFrame\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to advance.\r\n */\r\n nextFrame: function (component)\r\n {\r\n var frame = component.currentFrame;\r\n\r\n // TODO: Add frame skip support\r\n\r\n if (frame.isLast)\r\n {\r\n // We're at the end of the animation\r\n\r\n // Yoyo? (happens before repeat)\r\n if (component._yoyo)\r\n {\r\n this.handleYoyoFrame(component, false);\r\n }\r\n else if (component.repeatCounter > 0)\r\n {\r\n // Repeat (happens before complete)\r\n\r\n if (component._reverse && component.forward)\r\n {\r\n component.forward = false;\r\n }\r\n else\r\n {\r\n this.repeatAnimation(component);\r\n }\r\n }\r\n else\r\n {\r\n this.completeAnimation(component);\r\n }\r\n }\r\n else\r\n {\r\n this.updateAndGetNextTick(component, frame.nextFrame);\r\n }\r\n },\r\n\r\n /**\r\n * Handle the yoyo functionality in nextFrame and previousFrame methods.\r\n *\r\n * @method Phaser.Animations.Animation#handleYoyoFrame\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to advance.\r\n * @param {boolean} isReverse - Is animation in reverse mode? (Default: false)\r\n */\r\n handleYoyoFrame: function (component, isReverse)\r\n {\r\n if (!isReverse) { isReverse = false; }\r\n\r\n if (component._reverse === !isReverse && component.repeatCounter > 0)\r\n {\r\n if (!component._repeatDelay || component.pendingRepeat)\r\n\r\n {\r\n component.forward = isReverse;\r\n }\r\n\r\n this.repeatAnimation(component);\r\n\r\n return;\r\n }\r\n\r\n if (component._reverse !== isReverse && component.repeatCounter === 0)\r\n {\r\n this.completeAnimation(component);\r\n\r\n return;\r\n }\r\n \r\n component.forward = isReverse;\r\n\r\n var frame = (isReverse) ? component.currentFrame.nextFrame : component.currentFrame.prevFrame;\r\n\r\n this.updateAndGetNextTick(component, frame);\r\n },\r\n\r\n /**\r\n * Returns the animation last frame.\r\n *\r\n * @method Phaser.Animations.Animation#getLastFrame\r\n * @since 3.12.0\r\n *\r\n * @return {Phaser.Animations.AnimationFrame} component - The Animation Last Frame.\r\n */\r\n getLastFrame: function ()\r\n {\r\n return this.frames[this.frames.length - 1];\r\n },\r\n\r\n /**\r\n * Called internally when the Animation is playing backwards.\r\n * Sets the previous frame, causing a yoyo, repeat, complete or update, accordingly.\r\n *\r\n * @method Phaser.Animations.Animation#previousFrame\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\r\n */\r\n previousFrame: function (component)\r\n {\r\n var frame = component.currentFrame;\r\n\r\n // TODO: Add frame skip support\r\n\r\n if (frame.isFirst)\r\n {\r\n // We're at the start of the animation\r\n\r\n if (component._yoyo)\r\n {\r\n this.handleYoyoFrame(component, true);\r\n }\r\n else if (component.repeatCounter > 0)\r\n {\r\n if (component._reverse && !component.forward)\r\n {\r\n component.currentFrame = this.getLastFrame();\r\n this.repeatAnimation(component);\r\n }\r\n else\r\n {\r\n // Repeat (happens before complete)\r\n component.forward = true;\r\n this.repeatAnimation(component);\r\n }\r\n }\r\n else\r\n {\r\n this.completeAnimation(component);\r\n }\r\n }\r\n else\r\n {\r\n this.updateAndGetNextTick(component, frame.prevFrame);\r\n }\r\n },\r\n\r\n /**\r\n * Update Frame and Wait next tick.\r\n *\r\n * @method Phaser.Animations.Animation#updateAndGetNextTick\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} frame - An Animation frame.\r\n */\r\n updateAndGetNextTick: function (component, frame)\r\n {\r\n component.updateFrame(frame);\r\n\r\n this.getNextTick(component);\r\n },\r\n\r\n /**\r\n * Removes the given AnimationFrame from this Animation instance.\r\n * This is a global action. Any Game Object using this Animation will be impacted by this change.\r\n *\r\n * @method Phaser.Animations.Animation#removeFrame\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} frame - The AnimationFrame to be removed.\r\n *\r\n * @return {this} This Animation object.\r\n */\r\n removeFrame: function (frame)\r\n {\r\n var index = this.frames.indexOf(frame);\r\n\r\n if (index !== -1)\r\n {\r\n this.removeFrameAt(index);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes a frame from the AnimationFrame array at the provided index\r\n * and updates the animation accordingly.\r\n *\r\n * @method Phaser.Animations.Animation#removeFrameAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The index in the AnimationFrame array\r\n *\r\n * @return {this} This Animation object.\r\n */\r\n removeFrameAt: function (index)\r\n {\r\n this.frames.splice(index, 1);\r\n\r\n this.updateFrameSequence();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Called internally during playback. Forces the animation to repeat, providing there are enough counts left\r\n * in the repeat counter.\r\n *\r\n * @method Phaser.Animations.Animation#repeatAnimation\r\n * @fires Phaser.Animations.Events#ANIMATION_REPEAT\r\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_REPEAT\r\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\r\n */\r\n repeatAnimation: function (component)\r\n {\r\n if (component._pendingStop === 2)\r\n {\r\n return this.completeAnimation(component);\r\n }\r\n\r\n if (component._repeatDelay > 0 && component.pendingRepeat === false)\r\n {\r\n component.pendingRepeat = true;\r\n component.accumulator -= component.nextTick;\r\n component.nextTick += component._repeatDelay;\r\n }\r\n else\r\n {\r\n component.repeatCounter--;\r\n\r\n component.updateFrame(component.currentFrame[(component.forward) ? 'nextFrame' : 'prevFrame']);\r\n\r\n if (component.isPlaying)\r\n {\r\n this.getNextTick(component);\r\n\r\n component.pendingRepeat = false;\r\n\r\n var frame = component.currentFrame;\r\n var parent = component.parent;\r\n\r\n this.emit(Events.ANIMATION_REPEAT, this, frame);\r\n\r\n parent.emit(Events.SPRITE_ANIMATION_KEY_REPEAT + this.key, this, frame, component.repeatCounter, parent);\r\n\r\n parent.emit(Events.SPRITE_ANIMATION_REPEAT, this, frame, component.repeatCounter, parent);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Sets the texture frame the animation uses for rendering.\r\n *\r\n * @method Phaser.Animations.Animation#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\r\n */\r\n setFrame: function (component)\r\n {\r\n // Work out which frame should be set next on the child, and set it\r\n if (component.forward)\r\n {\r\n this.nextFrame(component);\r\n }\r\n else\r\n {\r\n this.previousFrame(component);\r\n }\r\n },\r\n\r\n /**\r\n * Converts the animation data to JSON.\r\n *\r\n * @method Phaser.Animations.Animation#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.Animations.JSONAnimation} The resulting JSONAnimation formatted object.\r\n */\r\n toJSON: function ()\r\n {\r\n var output = {\r\n key: this.key,\r\n type: this.type,\r\n frames: [],\r\n frameRate: this.frameRate,\r\n duration: this.duration,\r\n skipMissedFrames: this.skipMissedFrames,\r\n delay: this.delay,\r\n repeat: this.repeat,\r\n repeatDelay: this.repeatDelay,\r\n yoyo: this.yoyo,\r\n showOnStart: this.showOnStart,\r\n hideOnComplete: this.hideOnComplete\r\n };\r\n\r\n this.frames.forEach(function (frame)\r\n {\r\n output.frames.push(frame.toJSON());\r\n });\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Called internally whenever frames are added to, or removed from, this Animation.\r\n *\r\n * @method Phaser.Animations.Animation#updateFrameSequence\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Animation object.\r\n */\r\n updateFrameSequence: function ()\r\n {\r\n var len = this.frames.length;\r\n var slice = 1 / (len - 1);\r\n\r\n var frame;\r\n\r\n for (var i = 0; i < len; i++)\r\n {\r\n frame = this.frames[i];\r\n\r\n frame.index = i + 1;\r\n frame.isFirst = false;\r\n frame.isLast = false;\r\n frame.progress = i * slice;\r\n\r\n if (i === 0)\r\n {\r\n frame.isFirst = true;\r\n\r\n if (len === 1)\r\n {\r\n frame.isLast = true;\r\n frame.nextFrame = frame;\r\n frame.prevFrame = frame;\r\n }\r\n else\r\n {\r\n frame.isLast = false;\r\n frame.prevFrame = this.frames[len - 1];\r\n frame.nextFrame = this.frames[i + 1];\r\n }\r\n }\r\n else if (i === len - 1 && len > 1)\r\n {\r\n frame.isLast = true;\r\n frame.prevFrame = this.frames[len - 2];\r\n frame.nextFrame = this.frames[0];\r\n }\r\n else if (len > 1)\r\n {\r\n frame.prevFrame = this.frames[i - 1];\r\n frame.nextFrame = this.frames[i + 1];\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Pauses playback of this Animation. The paused state is set immediately.\r\n *\r\n * @method Phaser.Animations.Animation#pause\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Animation object.\r\n */\r\n pause: function ()\r\n {\r\n this.paused = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resumes playback of this Animation. The paused state is reset immediately.\r\n *\r\n * @method Phaser.Animations.Animation#resume\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Animation object.\r\n */\r\n resume: function ()\r\n {\r\n this.paused = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroys this Animation instance. It will remove all event listeners,\r\n * remove this animation and its key from the global Animation Manager,\r\n * and then destroy all Animation Frames in turn.\r\n *\r\n * @method Phaser.Animations.Animation#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.removeAllListeners();\r\n\r\n this.manager.off(Events.PAUSE_ALL, this.pause, this);\r\n this.manager.off(Events.RESUME_ALL, this.resume, this);\r\n\r\n this.manager.remove(this.key);\r\n\r\n for (var i = 0; i < this.frames.length; i++)\r\n {\r\n this.frames[i].destroy();\r\n }\r\n\r\n this.frames = [];\r\n\r\n this.manager = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Animation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A single frame in an Animation sequence.\r\n *\r\n * An AnimationFrame consists of a reference to the Texture it uses for rendering, references to other\r\n * frames in the animation, and index data. It also has the ability to modify the animation timing.\r\n *\r\n * AnimationFrames are generated automatically by the Animation class.\r\n *\r\n * @class AnimationFrame\r\n * @memberof Phaser.Animations\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {string} textureKey - The key of the Texture this AnimationFrame uses.\r\n * @param {(string|integer)} textureFrame - The key of the Frame within the Texture that this AnimationFrame uses.\r\n * @param {integer} index - The index of this AnimationFrame within the Animation sequence.\r\n * @param {Phaser.Textures.Frame} frame - A reference to the Texture Frame this AnimationFrame uses for rendering.\r\n */\r\nvar AnimationFrame = new Class({\r\n\r\n initialize:\r\n\r\n function AnimationFrame (textureKey, textureFrame, index, frame)\r\n {\r\n /**\r\n * The key of the Texture this AnimationFrame uses.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#textureKey\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.textureKey = textureKey;\r\n\r\n /**\r\n * The key of the Frame within the Texture that this AnimationFrame uses.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#textureFrame\r\n * @type {(string|integer)}\r\n * @since 3.0.0\r\n */\r\n this.textureFrame = textureFrame;\r\n\r\n /**\r\n * The index of this AnimationFrame within the Animation sequence.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#index\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.index = index;\r\n\r\n /**\r\n * A reference to the Texture Frame this AnimationFrame uses for rendering.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n this.frame = frame;\r\n\r\n /**\r\n * Is this the first frame in an animation sequence?\r\n *\r\n * @name Phaser.Animations.AnimationFrame#isFirst\r\n * @type {boolean}\r\n * @default false\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.isFirst = false;\r\n\r\n /**\r\n * Is this the last frame in an animation sequence?\r\n *\r\n * @name Phaser.Animations.AnimationFrame#isLast\r\n * @type {boolean}\r\n * @default false\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.isLast = false;\r\n\r\n /**\r\n * A reference to the AnimationFrame that comes before this one in the animation, if any.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#prevFrame\r\n * @type {?Phaser.Animations.AnimationFrame}\r\n * @default null\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.prevFrame = null;\r\n\r\n /**\r\n * A reference to the AnimationFrame that comes after this one in the animation, if any.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#nextFrame\r\n * @type {?Phaser.Animations.AnimationFrame}\r\n * @default null\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.nextFrame = null;\r\n\r\n /**\r\n * Additional time (in ms) that this frame should appear for during playback.\r\n * The value is added onto the msPerFrame set by the animation.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#duration\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.duration = 0;\r\n\r\n /**\r\n * What % through the animation does this frame come?\r\n * This value is generated when the animation is created and cached here.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#progress\r\n * @type {number}\r\n * @default 0\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.progress = 0;\r\n },\r\n\r\n /**\r\n * Generates a JavaScript object suitable for converting to JSON.\r\n *\r\n * @method Phaser.Animations.AnimationFrame#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.Animations.JSONAnimationFrame} The AnimationFrame data.\r\n */\r\n toJSON: function ()\r\n {\r\n return {\r\n key: this.textureKey,\r\n frame: this.textureFrame,\r\n duration: this.duration\r\n };\r\n },\r\n\r\n /**\r\n * Destroys this object by removing references to external resources and callbacks.\r\n *\r\n * @method Phaser.Animations.AnimationFrame#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.frame = undefined;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = AnimationFrame;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Add Animation Event.\r\n * \r\n * This event is dispatched when a new animation is added to the global Animation Manager.\r\n * \r\n * This can happen either as a result of an animation instance being added to the Animation Manager,\r\n * or the Animation Manager creating a new animation directly.\r\n *\r\n * @event Phaser.Animations.Events#ADD_ANIMATION\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the Animation that was added to the global Animation Manager.\r\n * @param {Phaser.Animations.Animation} animation - An instance of the newly created Animation.\r\n */\r\nmodule.exports = 'add';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Animation Complete Event.\r\n * \r\n * This event is dispatched by an Animation instance when it completes, i.e. finishes playing or is manually stopped.\r\n * \r\n * Be careful with the volume of events this could generate. If a group of Sprites all complete the same\r\n * animation at the same time, this event will invoke its handler for each one of them.\r\n *\r\n * @event Phaser.Animations.Events#ANIMATION_COMPLETE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed.\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Animation Repeat Event.\r\n * \r\n * This event is dispatched when a currently playing animation repeats.\r\n * \r\n * The event is dispatched directly from the Animation object itself. Which means that listeners\r\n * bound to this event will be invoked every time the Animation repeats, for every Game Object that may have it.\r\n *\r\n * @event Phaser.Animations.Events#ANIMATION_REPEAT\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that repeated.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation was on when it repeated.\r\n */\r\nmodule.exports = 'repeat';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Animation Restart Event.\r\n * \r\n * This event is dispatched by an Animation instance when it restarts.\r\n * \r\n * Be careful with the volume of events this could generate. If a group of Sprites all restart the same\r\n * animation at the same time, this event will invoke its handler for each one of them.\r\n *\r\n * @event Phaser.Animations.Events#ANIMATION_RESTART\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that restarted playing.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing.\r\n */\r\nmodule.exports = 'restart';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Animation Start Event.\r\n * \r\n * This event is dispatched by an Animation instance when it starts playing.\r\n * \r\n * Be careful with the volume of events this could generate. If a group of Sprites all play the same\r\n * animation at the same time, this event will invoke its handler for each one of them.\r\n *\r\n * @event Phaser.Animations.Events#ANIMATION_START\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that started playing.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing.\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pause All Animations Event.\r\n * \r\n * This event is dispatched when the global Animation Manager is told to pause.\r\n * \r\n * When this happens all current animations will stop updating, although it doesn't necessarily mean\r\n * that the game has paused as well.\r\n *\r\n * @event Phaser.Animations.Events#PAUSE_ALL\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'pauseall';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Remove Animation Event.\r\n * \r\n * This event is dispatched when an animation is removed from the global Animation Manager.\r\n *\r\n * @event Phaser.Animations.Events#REMOVE_ANIMATION\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the Animation that was removed from the global Animation Manager.\r\n * @param {Phaser.Animations.Animation} animation - An instance of the removed Animation.\r\n */\r\nmodule.exports = 'remove';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Resume All Animations Event.\r\n * \r\n * This event is dispatched when the global Animation Manager resumes, having been previously paused.\r\n * \r\n * When this happens all current animations will continue updating again.\r\n *\r\n * @event Phaser.Animations.Events#RESUME_ALL\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'resumeall';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Complete Event.\r\n * \r\n * This event is dispatched by a Sprite when an animation finishes playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationcomplete', listener)`\r\n * \r\n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_COMPLETE` event.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_COMPLETE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed.\r\n */\r\nmodule.exports = 'animationcomplete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Key Complete Event.\r\n * \r\n * This event is dispatched by a Sprite when a specific animation finishes playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationcomplete-key', listener)` where `key` is the key of\r\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationcomplete-explode`.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_COMPLETE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed.\r\n */\r\nmodule.exports = 'animationcomplete-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Key Repeat Event.\r\n * \r\n * This event is dispatched by a Sprite when a specific animation repeats playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationrepeat-key', listener)` where `key` is the key of\r\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrepeat-explode`.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\r\n * @param {integer} repeatCount - The number of times the Animation has repeated so far.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing.\r\n */\r\nmodule.exports = 'animationrepeat-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Key Restart Event.\r\n * \r\n * This event is dispatched by a Sprite when a specific animation restarts playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationrestart-key', listener)` where `key` is the key of\r\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrestart-explode`.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing.\r\n */\r\nmodule.exports = 'animationrestart-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Key Start Event.\r\n * \r\n * This event is dispatched by a Sprite when a specific animation starts playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationstart-key', listener)` where `key` is the key of\r\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationstart-explode`.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing.\r\n */\r\nmodule.exports = 'animationstart-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Key Update Event.\r\n * \r\n * This event is dispatched by a Sprite when a specific animation playing on it updates. This happens when the animation changes frame,\r\n * based on the animation frame rate and other factors like `timeScale` and `delay`.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationupdate-key', listener)` where `key` is the key of\r\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationupdate-explode`.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated.\r\n */\r\nmodule.exports = 'animationupdate-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Repeat Event.\r\n * \r\n * This event is dispatched by a Sprite when an animation repeats playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationrepeat', listener)`\r\n * \r\n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_REPEAT` event.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_REPEAT\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\r\n * @param {integer} repeatCount - The number of times the Animation has repeated so far.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing.\r\n */\r\nmodule.exports = 'animationrepeat';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Restart Event.\r\n * \r\n * This event is dispatched by a Sprite when an animation restarts playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationrestart', listener)`\r\n * \r\n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_RESTART` event.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_RESTART\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing.\r\n */\r\nmodule.exports = 'animationrestart';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Start Event.\r\n * \r\n * This event is dispatched by a Sprite when an animation starts playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationstart', listener)`\r\n * \r\n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_START` event.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_START\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing.\r\n */\r\nmodule.exports = 'animationstart';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Update Event.\r\n * \r\n * This event is dispatched by a Sprite when an animation playing on it updates. This happens when the animation changes frame,\r\n * based on the animation frame rate and other factors like `timeScale` and `delay`.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationupdate', listener)`\r\n * \r\n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_UPDATE` event.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated.\r\n */\r\nmodule.exports = 'animationupdate';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Animations.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADD_ANIMATION: require('./ADD_ANIMATION_EVENT'),\r\n ANIMATION_COMPLETE: require('./ANIMATION_COMPLETE_EVENT'),\r\n ANIMATION_REPEAT: require('./ANIMATION_REPEAT_EVENT'),\r\n ANIMATION_RESTART: require('./ANIMATION_RESTART_EVENT'),\r\n ANIMATION_START: require('./ANIMATION_START_EVENT'),\r\n PAUSE_ALL: require('./PAUSE_ALL_EVENT'),\r\n REMOVE_ANIMATION: require('./REMOVE_ANIMATION_EVENT'),\r\n RESUME_ALL: require('./RESUME_ALL_EVENT'),\r\n SPRITE_ANIMATION_COMPLETE: require('./SPRITE_ANIMATION_COMPLETE_EVENT'),\r\n SPRITE_ANIMATION_KEY_COMPLETE: require('./SPRITE_ANIMATION_KEY_COMPLETE_EVENT'),\r\n SPRITE_ANIMATION_KEY_REPEAT: require('./SPRITE_ANIMATION_KEY_REPEAT_EVENT'),\r\n SPRITE_ANIMATION_KEY_RESTART: require('./SPRITE_ANIMATION_KEY_RESTART_EVENT'),\r\n SPRITE_ANIMATION_KEY_START: require('./SPRITE_ANIMATION_KEY_START_EVENT'),\r\n SPRITE_ANIMATION_KEY_UPDATE: require('./SPRITE_ANIMATION_KEY_UPDATE_EVENT'),\r\n SPRITE_ANIMATION_REPEAT: require('./SPRITE_ANIMATION_REPEAT_EVENT'),\r\n SPRITE_ANIMATION_RESTART: require('./SPRITE_ANIMATION_RESTART_EVENT'),\r\n SPRITE_ANIMATION_START: require('./SPRITE_ANIMATION_START_EVENT'),\r\n SPRITE_ANIMATION_UPDATE: require('./SPRITE_ANIMATION_UPDATE_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Blur Event.\r\n * \r\n * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded\r\n * enters a blurred state. The blur event is raised when the window loses focus. This can happen if a user swaps\r\n * tab, or if they simply remove focus from the browser to another app.\r\n *\r\n * @event Phaser.Core.Events#BLUR\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'blur';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Boot Event.\r\n * \r\n * This event is dispatched when the Phaser Game instance has finished booting, but before it is ready to start running.\r\n * The global systems use this event to know when to set themselves up, dispatching their own `ready` events as required.\r\n *\r\n * @event Phaser.Core.Events#BOOT\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'boot';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Context Lost Event.\r\n * \r\n * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Lost event from the browser.\r\n * \r\n * The partner event is `CONTEXT_RESTORED`.\r\n *\r\n * @event Phaser.Core.Events#CONTEXT_LOST\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'contextlost';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Context Restored Event.\r\n * \r\n * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Restored event from the browser.\r\n * \r\n * The partner event is `CONTEXT_LOST`.\r\n *\r\n * @event Phaser.Core.Events#CONTEXT_RESTORED\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'contextrestored';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Destroy Event.\r\n * \r\n * This event is dispatched when the game instance has been told to destroy itself.\r\n * Lots of internal systems listen to this event in order to clear themselves out.\r\n * Custom plugins and game code should also do the same.\r\n *\r\n * @event Phaser.Core.Events#DESTROY\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Focus Event.\r\n * \r\n * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded\r\n * enters a focused state. The focus event is raised when the window re-gains focus, having previously lost it.\r\n *\r\n * @event Phaser.Core.Events#FOCUS\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'focus';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Hidden Event.\r\n * \r\n * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded\r\n * enters a hidden state. Only browsers that support the Visibility API will cause this event to be emitted.\r\n * \r\n * In most modern browsers, when the document enters a hidden state, the Request Animation Frame and setTimeout, which\r\n * control the main game loop, will automatically pause. There is no way to stop this from happening. It is something\r\n * your game should account for in its own code, should the pause be an issue (i.e. for multiplayer games)\r\n *\r\n * @event Phaser.Core.Events#HIDDEN\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'hidden';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Pause Event.\r\n * \r\n * This event is dispatched when the Game loop enters a paused state, usually as a result of the Visibility Handler.\r\n *\r\n * @event Phaser.Core.Events#PAUSE\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'pause';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Post-Render Event.\r\n * \r\n * This event is dispatched right at the end of the render process.\r\n * \r\n * Every Scene will have rendered and been drawn to the canvas by the time this event is fired.\r\n * Use it for any last minute post-processing before the next game step begins.\r\n *\r\n * @event Phaser.Core.Events#POST_RENDER\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - A reference to the current renderer being used by the Game instance.\r\n */\r\nmodule.exports = 'postrender';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Post-Step Event.\r\n * \r\n * This event is dispatched after the Scene Manager has updated.\r\n * Hook into it from plugins or systems that need to do things before the render starts.\r\n *\r\n * @event Phaser.Core.Events#POST_STEP\r\n * @since 3.0.0\r\n * \r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'poststep';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Pre-Render Event.\r\n * \r\n * This event is dispatched immediately before any of the Scenes have started to render.\r\n * \r\n * The renderer will already have been initialized this frame, clearing itself and preparing to receive the Scenes for rendering, but it won't have actually drawn anything yet.\r\n *\r\n * @event Phaser.Core.Events#PRE_RENDER\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - A reference to the current renderer being used by the Game instance.\r\n */\r\nmodule.exports = 'prerender';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Pre-Step Event.\r\n * \r\n * This event is dispatched before the main Game Step starts. By this point in the game cycle none of the Scene updates have yet happened.\r\n * Hook into it from plugins or systems that need to update before the Scene Manager does.\r\n *\r\n * @event Phaser.Core.Events#PRE_STEP\r\n * @since 3.0.0\r\n * \r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'prestep';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Ready Event.\r\n * \r\n * This event is dispatched when the Phaser Game instance has finished booting, the Texture Manager is fully ready,\r\n * and all local systems are now able to start.\r\n *\r\n * @event Phaser.Core.Events#READY\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'ready';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Resume Event.\r\n * \r\n * This event is dispatched when the game loop leaves a paused state and resumes running.\r\n *\r\n * @event Phaser.Core.Events#RESUME\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'resume';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Step Event.\r\n * \r\n * This event is dispatched after the Game Pre-Step and before the Scene Manager steps.\r\n * Hook into it from plugins or systems that need to update before the Scene Manager does, but after the core Systems have.\r\n *\r\n * @event Phaser.Core.Events#STEP\r\n * @since 3.0.0\r\n * \r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'step';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Visible Event.\r\n * \r\n * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded\r\n * enters a visible state, previously having been hidden.\r\n * \r\n * Only browsers that support the Visibility API will cause this event to be emitted.\r\n *\r\n * @event Phaser.Core.Events#VISIBLE\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'visible';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Core.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n BLUR: require('./BLUR_EVENT'),\r\n BOOT: require('./BOOT_EVENT'),\r\n CONTEXT_LOST: require('./CONTEXT_LOST_EVENT'),\r\n CONTEXT_RESTORED: require('./CONTEXT_RESTORED_EVENT'),\r\n DESTROY: require('./DESTROY_EVENT'),\r\n FOCUS: require('./FOCUS_EVENT'),\r\n HIDDEN: require('./HIDDEN_EVENT'),\r\n PAUSE: require('./PAUSE_EVENT'),\r\n POST_RENDER: require('./POST_RENDER_EVENT'),\r\n POST_STEP: require('./POST_STEP_EVENT'),\r\n PRE_RENDER: require('./PRE_RENDER_EVENT'),\r\n PRE_STEP: require('./PRE_STEP_EVENT'),\r\n READY: require('./READY_EVENT'),\r\n RESUME: require('./RESUME_EVENT'),\r\n STEP: require('./STEP_EVENT'),\r\n VISIBLE: require('./VISIBLE_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Events = require('./events');\r\n\r\n/**\r\n * @callback DataEachCallback\r\n *\r\n * @param {*} parent - The parent object of the DataManager.\r\n * @param {string} key - The key of the value.\r\n * @param {*} value - The value.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The Data Manager Component features a means to store pieces of data specific to a Game Object, System or Plugin.\r\n * You can then search, query it, and retrieve the data. The parent must either extend EventEmitter,\r\n * or have a property called `events` that is an instance of it.\r\n *\r\n * @class DataManager\r\n * @memberof Phaser.Data\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {object} parent - The object that this DataManager belongs to.\r\n * @param {Phaser.Events.EventEmitter} [eventEmitter] - The DataManager's event emitter.\r\n */\r\nvar DataManager = new Class({\r\n\r\n initialize:\r\n\r\n function DataManager (parent, eventEmitter)\r\n {\r\n /**\r\n * The object that this DataManager belongs to.\r\n *\r\n * @name Phaser.Data.DataManager#parent\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.parent = parent;\r\n\r\n /**\r\n * The DataManager's event emitter.\r\n *\r\n * @name Phaser.Data.DataManager#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events = eventEmitter;\r\n\r\n if (!eventEmitter)\r\n {\r\n this.events = (parent.events) ? parent.events : parent;\r\n }\r\n\r\n /**\r\n * The data list.\r\n *\r\n * @name Phaser.Data.DataManager#list\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.0.0\r\n */\r\n this.list = {};\r\n\r\n /**\r\n * The public values list. You can use this to access anything you have stored\r\n * in this Data Manager. For example, if you set a value called `gold` you can\r\n * access it via:\r\n *\r\n * ```javascript\r\n * this.data.values.gold;\r\n * ```\r\n *\r\n * You can also modify it directly:\r\n * \r\n * ```javascript\r\n * this.data.values.gold += 1000;\r\n * ```\r\n *\r\n * Doing so will emit a `setdata` event from the parent of this Data Manager.\r\n * \r\n * Do not modify this object directly. Adding properties directly to this object will not\r\n * emit any events. Always use `DataManager.set` to create new items the first time around.\r\n *\r\n * @name Phaser.Data.DataManager#values\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.10.0\r\n */\r\n this.values = {};\r\n\r\n /**\r\n * Whether setting data is frozen for this DataManager.\r\n *\r\n * @name Phaser.Data.DataManager#_frozen\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._frozen = false;\r\n\r\n if (!parent.hasOwnProperty('sys') && this.events)\r\n {\r\n this.events.once('destroy', this.destroy, this);\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves the value for the given key, or undefined if it doesn't exist.\r\n *\r\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\r\n * \r\n * ```javascript\r\n * this.data.get('gold');\r\n * ```\r\n *\r\n * Or access the value directly:\r\n * \r\n * ```javascript\r\n * this.data.values.gold;\r\n * ```\r\n *\r\n * You can also pass in an array of keys, in which case an array of values will be returned:\r\n * \r\n * ```javascript\r\n * this.data.get([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * This approach is useful for destructuring arrays in ES6.\r\n *\r\n * @method Phaser.Data.DataManager#get\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\r\n *\r\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\r\n */\r\n get: function (key)\r\n {\r\n var list = this.list;\r\n\r\n if (Array.isArray(key))\r\n {\r\n var output = [];\r\n\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n output.push(list[key[i]]);\r\n }\r\n\r\n return output;\r\n }\r\n else\r\n {\r\n return list[key];\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves all data values in a new object.\r\n *\r\n * @method Phaser.Data.DataManager#getAll\r\n * @since 3.0.0\r\n *\r\n * @return {Object.} All data values.\r\n */\r\n getAll: function ()\r\n {\r\n var results = {};\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list.hasOwnProperty(key))\r\n {\r\n results[key] = this.list[key];\r\n }\r\n }\r\n\r\n return results;\r\n },\r\n\r\n /**\r\n * Queries the DataManager for the values of keys matching the given regular expression.\r\n *\r\n * @method Phaser.Data.DataManager#query\r\n * @since 3.0.0\r\n *\r\n * @param {RegExp} search - A regular expression object. If a non-RegExp object obj is passed, it is implicitly converted to a RegExp by using new RegExp(obj).\r\n *\r\n * @return {Object.} The values of the keys matching the search string.\r\n */\r\n query: function (search)\r\n {\r\n var results = {};\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list.hasOwnProperty(key) && key.match(search))\r\n {\r\n results[key] = this.list[key];\r\n }\r\n }\r\n\r\n return results;\r\n },\r\n\r\n /**\r\n * Sets a value for the given key. If the key doesn't already exist in the Data Manager then it is created.\r\n * \r\n * ```javascript\r\n * data.set('name', 'Red Gem Stone');\r\n * ```\r\n *\r\n * You can also pass in an object of key value pairs as the first argument:\r\n *\r\n * ```javascript\r\n * data.set({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\r\n * ```\r\n *\r\n * To get a value back again you can call `get`:\r\n * \r\n * ```javascript\r\n * data.get('gold');\r\n * ```\r\n * \r\n * Or you can access the value directly via the `values` property, where it works like any other variable:\r\n * \r\n * ```javascript\r\n * data.values.gold += 50;\r\n * ```\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\r\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\r\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\r\n *\r\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.Data.DataManager#set\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.0.0\r\n *\r\n * @param {(string|object)} key - The key to set the value for. Or an object or key value pairs. If an object the `data` argument is ignored.\r\n * @param {*} data - The value to set for the given key. If an object is provided as the key this argument is ignored.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n set: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (typeof key === 'string')\r\n {\r\n return this.setValue(key, data);\r\n }\r\n else\r\n {\r\n for (var entry in key)\r\n {\r\n this.setValue(entry, key[entry]);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Increase a value for the given key. If the key doesn't already exist in the Data Manager then it is increased from 0.\r\n * \r\n * When the value is first set, a `setdata` event is emitted.\r\n * \r\n * @method Phaser.Data.DataManager#inc\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.23.0\r\n *\r\n * @param {(string|object)} key - The key to increase the value for.\r\n * @param {*} [data] - The value to increase for the given key.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n inc: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (data === undefined)\r\n {\r\n data = 1;\r\n }\r\n\r\n var value = this.get(key);\r\n if (value === undefined)\r\n {\r\n value = 0;\r\n }\r\n\r\n this.set(key, (value + data));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggle a boolean value for the given key. If the key doesn't already exist in the Data Manager then it is toggled from false.\r\n * \r\n * When the value is first set, a `setdata` event is emitted.\r\n * \r\n * @method Phaser.Data.DataManager#toggle\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.23.0\r\n *\r\n * @param {(string|object)} key - The key to toggle the value for.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n toggle: function (key)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n this.set(key, !this.get(key));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal value setter, called automatically by the `set` method.\r\n *\r\n * @method Phaser.Data.DataManager#setValue\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @private\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The key to set the value for.\r\n * @param {*} data - The value to set.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n setValue: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (this.has(key))\r\n {\r\n // Hit the key getter, which will in turn emit the events.\r\n this.values[key] = data;\r\n }\r\n else\r\n {\r\n var _this = this;\r\n var list = this.list;\r\n var events = this.events;\r\n var parent = this.parent;\r\n\r\n Object.defineProperty(this.values, key, {\r\n\r\n enumerable: true,\r\n \r\n configurable: true,\r\n\r\n get: function ()\r\n {\r\n return list[key];\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (!_this._frozen)\r\n {\r\n var previousValue = list[key];\r\n list[key] = value;\r\n\r\n events.emit(Events.CHANGE_DATA, parent, key, value, previousValue);\r\n events.emit(Events.CHANGE_DATA_KEY + key, parent, value, previousValue);\r\n }\r\n }\r\n\r\n });\r\n\r\n list[key] = data;\r\n\r\n events.emit(Events.SET_DATA, parent, key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all data entries to the given callback.\r\n *\r\n * @method Phaser.Data.DataManager#each\r\n * @since 3.0.0\r\n *\r\n * @param {DataEachCallback} callback - The function to call.\r\n * @param {*} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ this.parent, null, undefined ];\r\n\r\n for (var i = 1; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (var key in this.list)\r\n {\r\n args[1] = key;\r\n args[2] = this.list[key];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Merge the given object of key value pairs into this DataManager.\r\n *\r\n * Any newly created values will emit a `setdata` event. Any updated values (see the `overwrite` argument)\r\n * will emit a `changedata` event.\r\n *\r\n * @method Phaser.Data.DataManager#merge\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.0.0\r\n *\r\n * @param {Object.} data - The data to merge.\r\n * @param {boolean} [overwrite=true] - Whether to overwrite existing data. Defaults to true.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n merge: function (data, overwrite)\r\n {\r\n if (overwrite === undefined) { overwrite = true; }\r\n\r\n // Merge data from another component into this one\r\n for (var key in data)\r\n {\r\n if (data.hasOwnProperty(key) && (overwrite || (!overwrite && !this.has(key))))\r\n {\r\n this.setValue(key, data[key]);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Remove the value for the given key.\r\n *\r\n * If the key is found in this Data Manager it is removed from the internal lists and a\r\n * `removedata` event is emitted.\r\n * \r\n * You can also pass in an array of keys, in which case all keys in the array will be removed:\r\n * \r\n * ```javascript\r\n * this.data.remove([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * @method Phaser.Data.DataManager#remove\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key to remove, or an array of keys to remove.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n remove: function (key)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n this.removeValue(key[i]);\r\n }\r\n }\r\n else\r\n {\r\n return this.removeValue(key);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal value remover, called automatically by the `remove` method.\r\n *\r\n * @method Phaser.Data.DataManager#removeValue\r\n * @private\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The key to set the value for.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n removeValue: function (key)\r\n {\r\n if (this.has(key))\r\n {\r\n var data = this.list[key];\r\n\r\n delete this.list[key];\r\n delete this.values[key];\r\n\r\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves the data associated with the given 'key', deletes it from this Data Manager, then returns it.\r\n *\r\n * @method Phaser.Data.DataManager#pop\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the value to retrieve and delete.\r\n *\r\n * @return {*} The value of the given key.\r\n */\r\n pop: function (key)\r\n {\r\n var data = undefined;\r\n\r\n if (!this._frozen && this.has(key))\r\n {\r\n data = this.list[key];\r\n\r\n delete this.list[key];\r\n delete this.values[key];\r\n\r\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\r\n }\r\n\r\n return data;\r\n },\r\n\r\n /**\r\n * Determines whether the given key is set in this Data Manager.\r\n * \r\n * Please note that the keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.Data.DataManager#has\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key to check.\r\n *\r\n * @return {boolean} Returns `true` if the key exists, otherwise `false`.\r\n */\r\n has: function (key)\r\n {\r\n return this.list.hasOwnProperty(key);\r\n },\r\n\r\n /**\r\n * Freeze or unfreeze this Data Manager. A frozen Data Manager will block all attempts\r\n * to create new values or update existing ones.\r\n *\r\n * @method Phaser.Data.DataManager#setFreeze\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Whether to freeze or unfreeze the Data Manager.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n setFreeze: function (value)\r\n {\r\n this._frozen = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Delete all data in this Data Manager and unfreeze it.\r\n *\r\n * @method Phaser.Data.DataManager#reset\r\n * @since 3.0.0\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n reset: function ()\r\n {\r\n for (var key in this.list)\r\n {\r\n delete this.list[key];\r\n delete this.values[key];\r\n }\r\n\r\n this._frozen = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroy this data manager.\r\n *\r\n * @method Phaser.Data.DataManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.reset();\r\n\r\n this.events.off(Events.CHANGE_DATA);\r\n this.events.off(Events.SET_DATA);\r\n this.events.off(Events.REMOVE_DATA);\r\n\r\n this.parent = null;\r\n },\r\n\r\n /**\r\n * Gets or sets the frozen state of this Data Manager.\r\n * A frozen Data Manager will block all attempts to create new values or update existing ones.\r\n *\r\n * @name Phaser.Data.DataManager#freeze\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n freeze: {\r\n\r\n get: function ()\r\n {\r\n return this._frozen;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._frozen = (value) ? true : false;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Return the total number of entries in this Data Manager.\r\n *\r\n * @name Phaser.Data.DataManager#count\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n count: {\r\n\r\n get: function ()\r\n {\r\n var i = 0;\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list[key] !== undefined)\r\n {\r\n i++;\r\n }\r\n }\r\n\r\n return i;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = DataManager;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Change Data Event.\r\n * \r\n * This event is dispatched by a Data Manager when an item in the data store is changed.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * a change data event from a Game Object you would use: `sprite.data.on('changedata', listener)`.\r\n * \r\n * This event is dispatched for all items that change in the Data Manager.\r\n * To listen for the change of a specific item, use the `CHANGE_DATA_KEY_EVENT` event.\r\n *\r\n * @event Phaser.Data.Events#CHANGE_DATA\r\n * @since 3.0.0\r\n * \r\n * @param {any} parent - A reference to the object that the Data Manager responsible for this event belongs to.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} value - The new value of the item in the Data Manager.\r\n * @param {any} previousValue - The previous value of the item in the Data Manager.\r\n */\r\nmodule.exports = 'changedata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Change Data Key Event.\r\n * \r\n * This event is dispatched by a Data Manager when an item in the data store is changed.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the change of a specific data item from a Game Object you would use: `sprite.data.on('changedata-key', listener)`,\r\n * where `key` is the unique string key of the data item. For example, if you have a data item stored called `gold`\r\n * then you can listen for `sprite.data.on('changedata-gold')`.\r\n *\r\n * @event Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.16.1\r\n * \r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {any} value - The item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n * @param {any} previousValue - The previous item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'changedata-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Remove Data Event.\r\n * \r\n * This event is dispatched by a Data Manager when an item is removed from it.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the removal of a data item on a Game Object you would use: `sprite.data.on('removedata', listener)`.\r\n *\r\n * @event Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n * \r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} data - The item that was removed from the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'removedata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Set Data Event.\r\n * \r\n * This event is dispatched by a Data Manager when a new item is added to the data store.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the addition of a new data item on a Game Object you would use: `sprite.data.on('setdata', listener)`.\r\n *\r\n * @event Phaser.Data.Events#SET_DATA\r\n * @since 3.0.0\r\n * \r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} data - The item that was added to the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'setdata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Data.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CHANGE_DATA: require('./CHANGE_DATA_EVENT'),\r\n CHANGE_DATA_KEY: require('./CHANGE_DATA_KEY_EVENT'),\r\n REMOVE_DATA: require('./REMOVE_DATA_EVENT'),\r\n SET_DATA: require('./SET_DATA_EVENT')\r\n\r\n};\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Given a hex color value, such as 0xff00ff (for purple), it will return a\n * numeric representation of it (i.e. 16711935) for use in WebGL tinting.\n *\n * @function Phaser.Display.Color.GetColorFromValue\n * @since 3.50.0\n *\n * @param {number} red - The hex color value, such as 0xff0000.\n *\n * @return {number} The combined color value.\n */\nvar GetColorFromValue = function (value)\n{\n return (value >> 16) + (value & 0xff00) + ((value & 0xff) << 16);\n};\n\nmodule.exports = GetColorFromValue;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar GameEvents = require('../../core/events');\r\n\r\n/**\r\n * @classdesc\r\n * A Bitmap Mask combines the alpha (opacity) of a masked pixel with the alpha of another pixel.\r\n * Unlike the Geometry Mask, which is a clipping path, a Bitmap Mask behaves like an alpha mask,\r\n * not a clipping path. It is only available when using the WebGL Renderer.\r\n *\r\n * A Bitmap Mask can use any Game Object to determine the alpha of each pixel of the masked Game Object(s).\r\n * For any given point of a masked Game Object's texture, the pixel's alpha will be multiplied by the alpha\r\n * of the pixel at the same position in the Bitmap Mask's Game Object. The color of the pixel from the\r\n * Bitmap Mask doesn't matter.\r\n *\r\n * For example, if a pure blue pixel with an alpha of 0.95 is masked with a pure red pixel with an\r\n * alpha of 0.5, the resulting pixel will be pure blue with an alpha of 0.475. Naturally, this means\r\n * that a pixel in the mask with an alpha of 0 will hide the corresponding pixel in all masked Game Objects\r\n * A pixel with an alpha of 1 in the masked Game Object will receive the same alpha as the\r\n * corresponding pixel in the mask.\r\n *\r\n * The Bitmap Mask's location matches the location of its Game Object, not the location of the\r\n * masked objects. Moving or transforming the underlying Game Object will change the mask\r\n * (and affect the visibility of any masked objects), whereas moving or transforming a masked object\r\n * will not affect the mask.\r\n *\r\n * The Bitmap Mask will not render its Game Object by itself. If the Game Object is not in a\r\n * Scene's display list, it will only be used for the mask and its full texture will not be directly\r\n * visible. Adding the underlying Game Object to a Scene will not cause any problems - it will\r\n * render as a normal Game Object and will also serve as a mask.\r\n *\r\n * @class BitmapMask\r\n * @memberof Phaser.Display.Masks\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene which this Bitmap Mask will be used in.\r\n * @param {Phaser.GameObjects.GameObject} renderable - A renderable Game Object that uses a texture, such as a Sprite.\r\n */\r\nvar BitmapMask = new Class({\r\n\r\n initialize:\r\n\r\n function BitmapMask (scene, renderable)\r\n {\r\n var renderer = scene.sys.game.renderer;\r\n\r\n /**\r\n * A reference to either the Canvas or WebGL Renderer that this Mask is using.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.11.0\r\n */\r\n this.renderer = renderer;\r\n\r\n /**\r\n * A renderable Game Object that uses a texture, such as a Sprite.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#bitmapMask\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.0.0\r\n */\r\n this.bitmapMask = renderable;\r\n\r\n /**\r\n * The texture used for the mask's framebuffer.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#maskTexture\r\n * @type {WebGLTexture}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.maskTexture = null;\r\n\r\n /**\r\n * The texture used for the main framebuffer.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#mainTexture\r\n * @type {WebGLTexture}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.mainTexture = null;\r\n\r\n /**\r\n * Whether the Bitmap Mask is dirty and needs to be updated.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#dirty\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.dirty = true;\r\n\r\n /**\r\n * The framebuffer to which a masked Game Object is rendered.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#mainFramebuffer\r\n * @type {WebGLFramebuffer}\r\n * @since 3.0.0\r\n */\r\n this.mainFramebuffer = null;\r\n\r\n /**\r\n * The framebuffer to which the Bitmap Mask's masking Game Object is rendered.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#maskFramebuffer\r\n * @type {WebGLFramebuffer}\r\n * @since 3.0.0\r\n */\r\n this.maskFramebuffer = null;\r\n\r\n /**\r\n * The previous framebuffer set in the renderer before this one was enabled.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#prevFramebuffer\r\n * @type {WebGLFramebuffer}\r\n * @since 3.17.0\r\n */\r\n this.prevFramebuffer = null;\r\n\r\n /**\r\n * Whether to invert the masks alpha.\r\n *\r\n * If `true`, the alpha of the masking pixel will be inverted before it's multiplied with the masked pixel. Essentially, this means that a masked area will be visible only if the corresponding area in the mask is invisible.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#invertAlpha\r\n * @type {boolean}\r\n * @since 3.1.2\r\n */\r\n this.invertAlpha = false;\r\n\r\n /**\r\n * Is this mask a stencil mask?\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#isStencil\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.isStencil = false;\r\n\r\n if (renderer && renderer.gl)\r\n {\r\n var width = renderer.width;\r\n var height = renderer.height;\r\n var pot = ((width & (width - 1)) === 0 && (height & (height - 1)) === 0);\r\n var gl = renderer.gl;\r\n var wrap = pot ? gl.REPEAT : gl.CLAMP_TO_EDGE;\r\n var filter = gl.LINEAR;\r\n\r\n this.mainTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\r\n this.maskTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\r\n this.mainFramebuffer = renderer.createFramebuffer(width, height, this.mainTexture, true);\r\n this.maskFramebuffer = renderer.createFramebuffer(width, height, this.maskTexture, true);\r\n\r\n scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, function (renderer)\r\n {\r\n var width = renderer.width;\r\n var height = renderer.height;\r\n var pot = ((width & (width - 1)) === 0 && (height & (height - 1)) === 0);\r\n var gl = renderer.gl;\r\n var wrap = pot ? gl.REPEAT : gl.CLAMP_TO_EDGE;\r\n var filter = gl.LINEAR;\r\n\r\n this.mainTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\r\n this.maskTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\r\n this.mainFramebuffer = renderer.createFramebuffer(width, height, this.mainTexture, true);\r\n this.maskFramebuffer = renderer.createFramebuffer(width, height, this.maskTexture, true);\r\n\r\n }, this);\r\n }\r\n },\r\n\r\n /**\r\n * Sets a new masking Game Object for the Bitmap Mask.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#setBitmap\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} renderable - A renderable Game Object that uses a texture, such as a Sprite.\r\n */\r\n setBitmap: function (renderable)\r\n {\r\n this.bitmapMask = renderable;\r\n },\r\n\r\n /**\r\n * Prepares the WebGL Renderer to render a Game Object with this mask applied.\r\n *\r\n * This renders the masking Game Object to the mask framebuffer and switches to the main framebuffer so that the masked Game Object will be rendered to it instead of being rendered directly to the frame.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#preRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to prepare.\r\n * @param {Phaser.GameObjects.GameObject} maskedObject - The masked Game Object which will be drawn.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n */\r\n preRenderWebGL: function (renderer, maskedObject, camera)\r\n {\r\n renderer.pipelines.BitmapMaskPipeline.beginMask(this, maskedObject, camera);\r\n },\r\n\r\n /**\r\n * Finalizes rendering of a masked Game Object.\r\n *\r\n * This resets the previously bound framebuffer and switches the WebGL Renderer to the Bitmap Mask Pipeline, which uses a special fragment shader to apply the masking effect.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#postRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to clean up.\r\n */\r\n postRenderWebGL: function (renderer, camera)\r\n {\r\n renderer.pipelines.BitmapMaskPipeline.endMask(this, camera);\r\n },\r\n\r\n /**\r\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#preRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\r\n * @param {Phaser.GameObjects.GameObject} mask - The masked Game Object which would be rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n */\r\n preRenderCanvas: function ()\r\n {\r\n // NOOP\r\n },\r\n\r\n /**\r\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#postRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\r\n */\r\n postRenderCanvas: function ()\r\n {\r\n // NOOP\r\n },\r\n\r\n /**\r\n * Destroys this BitmapMask and nulls any references it holds.\r\n * \r\n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\r\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.bitmapMask = null;\r\n\r\n var renderer = this.renderer;\r\n\r\n if (renderer && renderer.gl)\r\n {\r\n renderer.deleteTexture(this.mainTexture);\r\n renderer.deleteTexture(this.maskTexture);\r\n renderer.deleteFramebuffer(this.mainFramebuffer);\r\n renderer.deleteFramebuffer(this.maskFramebuffer);\r\n }\r\n\r\n this.mainTexture = null;\r\n this.maskTexture = null;\r\n this.mainFramebuffer = null;\r\n this.maskFramebuffer = null;\r\n this.prevFramebuffer = null;\r\n this.renderer = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BitmapMask;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A Geometry Mask can be applied to a Game Object to hide any pixels of it which don't intersect\r\n * a visible pixel from the geometry mask. The mask is essentially a clipping path which can only\r\n * make a masked pixel fully visible or fully invisible without changing its alpha (opacity).\r\n *\r\n * A Geometry Mask uses a Graphics Game Object to determine which pixels of the masked Game Object(s)\r\n * should be clipped. For any given point of a masked Game Object's texture, the pixel will only be displayed\r\n * if the Graphics Game Object of the Geometry Mask has a visible pixel at the same position. The color and\r\n * alpha of the pixel from the Geometry Mask do not matter.\r\n *\r\n * The Geometry Mask's location matches the location of its Graphics object, not the location of the masked objects.\r\n * Moving or transforming the underlying Graphics object will change the mask (and affect the visibility\r\n * of any masked objects), whereas moving or transforming a masked object will not affect the mask.\r\n * You can think of the Geometry Mask (or rather, of its Graphics object) as an invisible curtain placed\r\n * in front of all masked objects which has its own visual properties and, naturally, respects the camera's\r\n * visual properties, but isn't affected by and doesn't follow the masked objects by itself.\r\n *\r\n * @class GeometryMask\r\n * @memberof Phaser.Display.Masks\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - This parameter is not used.\r\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics Game Object to use for the Geometry Mask. Doesn't have to be in the Display List.\r\n */\r\nvar GeometryMask = new Class({\r\n\r\n initialize:\r\n\r\n function GeometryMask (scene, graphicsGeometry)\r\n {\r\n /**\r\n * The Graphics object which describes the Geometry Mask.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#geometryMask\r\n * @type {Phaser.GameObjects.Graphics}\r\n * @since 3.0.0\r\n */\r\n this.geometryMask = graphicsGeometry;\r\n\r\n /**\r\n * Similar to the BitmapMasks invertAlpha setting this to true will then hide all pixels\r\n * drawn to the Geometry Mask.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#invertAlpha\r\n * @type {boolean}\r\n * @since 3.16.0\r\n */\r\n this.invertAlpha = false;\r\n\r\n /**\r\n * Is this mask a stencil mask?\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#isStencil\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.isStencil = true;\r\n\r\n /**\r\n * The current stencil level.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#level\r\n * @type {boolean}\r\n * @private\r\n * @since 3.17.0\r\n */\r\n this.level = 0;\r\n },\r\n\r\n /**\r\n * Sets a new Graphics object for the Geometry Mask.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#setShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics object which will be used for the Geometry Mask.\r\n * \r\n * @return {this} This Geometry Mask\r\n */\r\n setShape: function (graphicsGeometry)\r\n {\r\n this.geometryMask = graphicsGeometry;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the `invertAlpha` property of this Geometry Mask.\r\n * Inverting the alpha essentially flips the way the mask works.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#setInvertAlpha\r\n * @since 3.17.0\r\n *\r\n * @param {boolean} [value=true] - Invert the alpha of this mask?\r\n * \r\n * @return {this} This Geometry Mask\r\n */\r\n setInvertAlpha: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.invertAlpha = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Renders the Geometry Mask's underlying Graphics object to the OpenGL stencil buffer and enables the stencil test, which clips rendered pixels according to the mask.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#preRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n */\r\n preRenderWebGL: function (renderer, child, camera)\r\n {\r\n var gl = renderer.gl;\r\n\r\n // Force flushing before drawing to stencil buffer\r\n renderer.flush();\r\n\r\n if (renderer.maskStack.length === 0)\r\n {\r\n gl.enable(gl.STENCIL_TEST);\r\n gl.clear(gl.STENCIL_BUFFER_BIT);\r\n\r\n renderer.maskCount = 0;\r\n }\r\n\r\n if (renderer.currentCameraMask.mask !== this)\r\n {\r\n renderer.currentMask.mask = this;\r\n }\r\n\r\n renderer.maskStack.push({ mask: this, camera: camera });\r\n\r\n this.applyStencil(renderer, camera, true);\r\n\r\n renderer.maskCount++;\r\n },\r\n\r\n /**\r\n * Applies the current stencil mask to the renderer.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#applyStencil\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n * @param {boolean} inc - Is this an INCR stencil or a DECR stencil?\r\n */\r\n applyStencil: function (renderer, camera, inc)\r\n {\r\n var gl = renderer.gl;\r\n var geometryMask = this.geometryMask;\r\n var level = renderer.maskCount;\r\n\r\n gl.colorMask(false, false, false, false);\r\n\r\n if (inc)\r\n {\r\n gl.stencilFunc(gl.EQUAL, level, 0xFF);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.INCR);\r\n }\r\n else\r\n {\r\n gl.stencilFunc(gl.EQUAL, level + 1, 0xFF);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.DECR);\r\n }\r\n\r\n // Write stencil buffer\r\n geometryMask.renderWebGL(renderer, geometryMask, 0, camera);\r\n\r\n renderer.flush();\r\n\r\n gl.colorMask(true, true, true, true);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP);\r\n\r\n if (inc)\r\n {\r\n if (this.invertAlpha)\r\n {\r\n gl.stencilFunc(gl.NOTEQUAL, level + 1, 0xFF);\r\n }\r\n else\r\n {\r\n gl.stencilFunc(gl.EQUAL, level + 1, 0xFF);\r\n }\r\n }\r\n else if (this.invertAlpha)\r\n {\r\n gl.stencilFunc(gl.NOTEQUAL, level, 0xFF);\r\n }\r\n else\r\n {\r\n gl.stencilFunc(gl.EQUAL, level, 0xFF);\r\n }\r\n },\r\n\r\n /**\r\n * Flushes all rendered pixels and disables the stencil test of a WebGL context, thus disabling the mask for it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#postRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw flush.\r\n */\r\n postRenderWebGL: function (renderer)\r\n {\r\n var gl = renderer.gl;\r\n\r\n renderer.maskStack.pop();\r\n\r\n renderer.maskCount--;\r\n\r\n if (renderer.maskStack.length === 0)\r\n {\r\n // If this is the only mask in the stack, flush and disable\r\n renderer.flush();\r\n\r\n renderer.currentMask.mask = null;\r\n\r\n gl.disable(gl.STENCIL_TEST);\r\n }\r\n else\r\n {\r\n // Force flush before disabling stencil test\r\n renderer.flush();\r\n\r\n var prev = renderer.maskStack[renderer.maskStack.length - 1];\r\n\r\n prev.mask.applyStencil(renderer, prev.camera, false);\r\n\r\n if (renderer.currentCameraMask.mask !== prev.mask)\r\n {\r\n renderer.currentMask.mask = prev.mask;\r\n renderer.currentMask.camera = prev.camera;\r\n }\r\n else\r\n {\r\n renderer.currentMask.mask = null;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Sets the clipping path of a 2D canvas context to the Geometry Mask's underlying Graphics object.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#preRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance to set the clipping path on.\r\n * @param {Phaser.GameObjects.GameObject} mask - The Game Object being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n */\r\n preRenderCanvas: function (renderer, mask, camera)\r\n {\r\n var geometryMask = this.geometryMask;\r\n\r\n renderer.currentContext.save();\r\n\r\n geometryMask.renderCanvas(renderer, geometryMask, 0, camera, null, null, true);\r\n\r\n renderer.currentContext.clip();\r\n },\r\n\r\n /**\r\n * Restore the canvas context's previous clipping path, thus turning off the mask for it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#postRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance being restored.\r\n */\r\n postRenderCanvas: function (renderer)\r\n {\r\n renderer.currentContext.restore();\r\n },\r\n\r\n /**\r\n * Destroys this GeometryMask and nulls any references it holds.\r\n *\r\n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\r\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.geometryMask = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = GeometryMask;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = require('../renderer/BlendModes');\r\nvar GetAdvancedValue = require('../utils/object/GetAdvancedValue');\r\n\r\n/**\r\n * Builds a Game Object using the provided configuration object.\r\n *\r\n * @function Phaser.GameObjects.BuildGameObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The initial GameObject.\r\n * @param {Phaser.Types.GameObjects.GameObjectConfig} config - The config to build the GameObject with.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The built Game Object.\r\n */\r\nvar BuildGameObject = function (scene, gameObject, config)\r\n{\r\n // Position\r\n\r\n gameObject.x = GetAdvancedValue(config, 'x', 0);\r\n gameObject.y = GetAdvancedValue(config, 'y', 0);\r\n gameObject.depth = GetAdvancedValue(config, 'depth', 0);\r\n\r\n // Flip\r\n\r\n gameObject.flipX = GetAdvancedValue(config, 'flipX', false);\r\n gameObject.flipY = GetAdvancedValue(config, 'flipY', false);\r\n\r\n // Scale\r\n // Either: { scale: 2 } or { scale: { x: 2, y: 2 }}\r\n\r\n var scale = GetAdvancedValue(config, 'scale', null);\r\n\r\n if (typeof scale === 'number')\r\n {\r\n gameObject.setScale(scale);\r\n }\r\n else if (scale !== null)\r\n {\r\n gameObject.scaleX = GetAdvancedValue(scale, 'x', 1);\r\n gameObject.scaleY = GetAdvancedValue(scale, 'y', 1);\r\n }\r\n\r\n // ScrollFactor\r\n // Either: { scrollFactor: 2 } or { scrollFactor: { x: 2, y: 2 }}\r\n\r\n var scrollFactor = GetAdvancedValue(config, 'scrollFactor', null);\r\n\r\n if (typeof scrollFactor === 'number')\r\n {\r\n gameObject.setScrollFactor(scrollFactor);\r\n }\r\n else if (scrollFactor !== null)\r\n {\r\n gameObject.scrollFactorX = GetAdvancedValue(scrollFactor, 'x', 1);\r\n gameObject.scrollFactorY = GetAdvancedValue(scrollFactor, 'y', 1);\r\n }\r\n\r\n // Rotation\r\n\r\n gameObject.rotation = GetAdvancedValue(config, 'rotation', 0);\r\n\r\n var angle = GetAdvancedValue(config, 'angle', null);\r\n\r\n if (angle !== null)\r\n {\r\n gameObject.angle = angle;\r\n }\r\n\r\n // Alpha\r\n\r\n gameObject.alpha = GetAdvancedValue(config, 'alpha', 1);\r\n\r\n // Origin\r\n // Either: { origin: 0.5 } or { origin: { x: 0.5, y: 0.5 }}\r\n\r\n var origin = GetAdvancedValue(config, 'origin', null);\r\n\r\n if (typeof origin === 'number')\r\n {\r\n gameObject.setOrigin(origin);\r\n }\r\n else if (origin !== null)\r\n {\r\n var ox = GetAdvancedValue(origin, 'x', 0.5);\r\n var oy = GetAdvancedValue(origin, 'y', 0.5);\r\n\r\n gameObject.setOrigin(ox, oy);\r\n }\r\n\r\n // BlendMode\r\n\r\n gameObject.blendMode = GetAdvancedValue(config, 'blendMode', BlendModes.NORMAL);\r\n\r\n // Visible\r\n\r\n gameObject.visible = GetAdvancedValue(config, 'visible', true);\r\n\r\n // Add to Scene\r\n\r\n var add = GetAdvancedValue(config, 'add', true);\r\n\r\n if (add)\r\n {\r\n scene.sys.displayList.add(gameObject);\r\n }\r\n\r\n if (gameObject.preUpdate)\r\n {\r\n scene.sys.updateList.add(gameObject);\r\n }\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BuildGameObject;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar ComponentsToJSON = require('./components/ToJSON');\nvar DataManager = require('../data/DataManager');\nvar EventEmitter = require('eventemitter3');\nvar Events = require('./events');\n\n/**\n * @classdesc\n * The base class that all Game Objects extend.\n * You don't create GameObjects directly and they cannot be added to the display list.\n * Instead, use them as the base for your own custom classes.\n *\n * @class GameObject\n * @memberof Phaser.GameObjects\n * @extends Phaser.Events.EventEmitter\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs.\n * @param {string} type - A textual representation of the type of Game Object, i.e. `sprite`.\n */\nvar GameObject = new Class({\n\n Extends: EventEmitter,\n\n initialize:\n\n function GameObject (scene, type)\n {\n EventEmitter.call(this);\n\n /**\n * The Scene to which this Game Object belongs.\n * Game Objects can only belong to one Scene.\n *\n * @name Phaser.GameObjects.GameObject#scene\n * @type {Phaser.Scene}\n * @protected\n * @since 3.0.0\n */\n this.scene = scene;\n\n /**\n * A textual representation of this Game Object, i.e. `sprite`.\n * Used internally by Phaser but is available for your own custom classes to populate.\n *\n * @name Phaser.GameObjects.GameObject#type\n * @type {string}\n * @since 3.0.0\n */\n this.type = type;\n\n /**\n * The current state of this Game Object.\n *\n * Phaser itself will never modify this value, although plugins may do so.\n *\n * Use this property to track the state of a Game Object during its lifetime. For example, it could change from\n * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant\n * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons.\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\n *\n * @name Phaser.GameObjects.GameObject#state\n * @type {(integer|string)}\n * @since 3.16.0\n */\n this.state = 0;\n\n /**\n * The parent Container of this Game Object, if it has one.\n *\n * @name Phaser.GameObjects.GameObject#parentContainer\n * @type {Phaser.GameObjects.Container}\n * @since 3.4.0\n */\n this.parentContainer = null;\n\n /**\n * The name of this Game Object.\n * Empty by default and never populated by Phaser, this is left for developers to use.\n *\n * @name Phaser.GameObjects.GameObject#name\n * @type {string}\n * @default ''\n * @since 3.0.0\n */\n this.name = '';\n\n /**\n * The active state of this Game Object.\n * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it.\n * An active object is one which is having its logic and internal systems updated.\n *\n * @name Phaser.GameObjects.GameObject#active\n * @type {boolean}\n * @default true\n * @since 3.0.0\n */\n this.active = true;\n\n /**\n * The Tab Index of the Game Object.\n * Reserved for future use by plugins and the Input Manager.\n *\n * @name Phaser.GameObjects.GameObject#tabIndex\n * @type {integer}\n * @default -1\n * @since 3.0.0\n */\n this.tabIndex = -1;\n\n /**\n * A Data Manager.\n * It allows you to store, query and get key/value paired information specific to this Game Object.\n * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`.\n *\n * @name Phaser.GameObjects.GameObject#data\n * @type {Phaser.Data.DataManager}\n * @default null\n * @since 3.0.0\n */\n this.data = null;\n\n /**\n * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not.\n * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively.\n * If those components are not used by your custom class then you can use this bitmask as you wish.\n *\n * @name Phaser.GameObjects.GameObject#renderFlags\n * @type {integer}\n * @default 15\n * @since 3.0.0\n */\n this.renderFlags = 15;\n\n /**\n * A bitmask that controls if this Game Object is drawn by a Camera or not.\n * Not usually set directly, instead call `Camera.ignore`, however you can\n * set this property directly using the Camera.id property:\n *\n * @example\n * this.cameraFilter |= camera.id\n *\n * @name Phaser.GameObjects.GameObject#cameraFilter\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.cameraFilter = 0;\n\n /**\n * If this Game Object is enabled for input then this property will contain an InteractiveObject instance.\n * Not usually set directly. Instead call `GameObject.setInteractive()`.\n *\n * @name Phaser.GameObjects.GameObject#input\n * @type {?Phaser.Types.Input.InteractiveObject}\n * @default null\n * @since 3.0.0\n */\n this.input = null;\n\n /**\n * If this Game Object is enabled for Arcade or Matter Physics then this property will contain a reference to a Physics Body.\n *\n * @name Phaser.GameObjects.GameObject#body\n * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|MatterJS.BodyType)}\n * @default null\n * @since 3.0.0\n */\n this.body = null;\n\n /**\n * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`.\n * This includes calls that may come from a Group, Container or the Scene itself.\n * While it allows you to persist a Game Object across Scenes, please understand you are entirely\n * responsible for managing references to and from this Game Object.\n *\n * @name Phaser.GameObjects.GameObject#ignoreDestroy\n * @type {boolean}\n * @default false\n * @since 3.5.0\n */\n this.ignoreDestroy = false;\n\n // Tell the Scene to re-sort the children\n scene.sys.queueDepthSort();\n },\n\n /**\n * Sets the `active` property of this Game Object and returns this Game Object for further chaining.\n * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList.\n *\n * @method Phaser.GameObjects.GameObject#setActive\n * @since 3.0.0\n *\n * @param {boolean} value - True if this Game Object should be set as active, false if not.\n *\n * @return {this} This GameObject.\n */\n setActive: function (value)\n {\n this.active = value;\n\n return this;\n },\n\n /**\n * Sets the `name` property of this Game Object and returns this Game Object for further chaining.\n * The `name` property is not populated by Phaser and is presented for your own use.\n *\n * @method Phaser.GameObjects.GameObject#setName\n * @since 3.0.0\n *\n * @param {string} value - The name to be given to this Game Object.\n *\n * @return {this} This GameObject.\n */\n setName: function (value)\n {\n this.name = value;\n\n return this;\n },\n\n /**\n * Sets the current state of this Game Object.\n *\n * Phaser itself will never modify the State of a Game Object, although plugins may do so.\n *\n * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'.\n * The state value should typically be an integer (ideally mapped to a constant\n * in your game code), but could also be a string. It is recommended to keep it light and simple.\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\n *\n * @method Phaser.GameObjects.GameObject#setState\n * @since 3.16.0\n *\n * @param {(integer|string)} value - The state of the Game Object.\n *\n * @return {this} This GameObject.\n */\n setState: function (value)\n {\n this.state = value;\n\n return this;\n },\n\n /**\n * Adds a Data Manager component to this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#setDataEnabled\n * @since 3.0.0\n * @see Phaser.Data.DataManager\n *\n * @return {this} This GameObject.\n */\n setDataEnabled: function ()\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n return this;\n },\n\n /**\n * Allows you to store a key value pair within this Game Objects Data Manager.\n *\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\n * before setting the value.\n *\n * If the key doesn't already exist in the Data Manager then it is created.\n *\n * ```javascript\n * sprite.setData('name', 'Red Gem Stone');\n * ```\n *\n * You can also pass in an object of key value pairs as the first argument:\n *\n * ```javascript\n * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\n * ```\n *\n * To get a value back again you can call `getData`:\n *\n * ```javascript\n * sprite.getData('gold');\n * ```\n *\n * Or you can access the value directly via the `values` property, where it works like any other variable:\n *\n * ```javascript\n * sprite.data.values.gold += 50;\n * ```\n *\n * When the value is first set, a `setdata` event is emitted from this Game Object.\n *\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\n *\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\n *\n * @method Phaser.GameObjects.GameObject#setData\n * @since 3.0.0\n *\n * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored.\n * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored.\n *\n * @return {this} This GameObject.\n */\n setData: function (key, value)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n this.data.set(key, value);\n\n return this;\n },\n\n /**\n * Increase a value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is increased from 0.\n *\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\n * before setting the value.\n *\n * If the key doesn't already exist in the Data Manager then it is created.\n *\n * When the value is first set, a `setdata` event is emitted from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#incData\n * @since 3.23.0\n *\n * @param {(string|object)} key - The key to increase the value for.\n * @param {*} [data] - The value to increase for the given key.\n *\n * @return {this} This GameObject.\n */\n incData: function (key, value)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n this.data.inc(key, value);\n\n return this;\n },\n\n /**\n * Toggle a boolean value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is toggled from false.\n *\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\n * before setting the value.\n *\n * If the key doesn't already exist in the Data Manager then it is created.\n *\n * When the value is first set, a `setdata` event is emitted from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#toggleData\n * @since 3.23.0\n *\n * @param {(string|object)} key - The key to toggle the value for.\n *\n * @return {this} This GameObject.\n */\n toggleData: function (key)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n this.data.toggle(key);\n\n return this;\n },\n\n /**\n * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist.\n *\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\n *\n * ```javascript\n * sprite.getData('gold');\n * ```\n *\n * Or access the value directly:\n *\n * ```javascript\n * sprite.data.values.gold;\n * ```\n *\n * You can also pass in an array of keys, in which case an array of values will be returned:\n *\n * ```javascript\n * sprite.getData([ 'gold', 'armor', 'health' ]);\n * ```\n *\n * This approach is useful for destructuring arrays in ES6.\n *\n * @method Phaser.GameObjects.GameObject#getData\n * @since 3.0.0\n *\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\n *\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\n */\n getData: function (key)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n return this.data.get(key);\n },\n\n /**\n * Pass this Game Object to the Input Manager to enable it for Input.\n *\n * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area\n * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced\n * input detection.\n *\n * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If\n * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific\n * shape for it to use.\n *\n * You can also provide an Input Configuration Object as the only argument to this method.\n *\n * @example\n * sprite.setInteractive();\n *\n * @example\n * sprite.setInteractive(new Phaser.Geom.Circle(45, 46, 45), Phaser.Geom.Circle.Contains);\n *\n * @example\n * graphics.setInteractive(new Phaser.Geom.Rectangle(0, 0, 128, 128), Phaser.Geom.Rectangle.Contains);\n *\n * @method Phaser.GameObjects.GameObject#setInteractive\n * @since 3.0.0\n *\n * @param {(Phaser.Types.Input.InputConfiguration|any)} [hitArea] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not given it will try to create a Rectangle based on the texture frame.\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The callback that determines if the pointer is within the Hit Area shape or not. If you provide a shape you must also provide a callback.\n * @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target?\n *\n * @return {this} This GameObject.\n */\n setInteractive: function (hitArea, hitAreaCallback, dropZone)\n {\n this.scene.sys.input.enable(this, hitArea, hitAreaCallback, dropZone);\n\n return this;\n },\n\n /**\n * If this Game Object has previously been enabled for input, this will disable it.\n *\n * An object that is disabled for input stops processing or being considered for\n * input events, but can be turned back on again at any time by simply calling\n * `setInteractive()` with no arguments provided.\n *\n * If want to completely remove interaction from this Game Object then use `removeInteractive` instead.\n *\n * @method Phaser.GameObjects.GameObject#disableInteractive\n * @since 3.7.0\n *\n * @return {this} This GameObject.\n */\n disableInteractive: function ()\n {\n if (this.input)\n {\n this.input.enabled = false;\n }\n\n return this;\n },\n\n /**\n * If this Game Object has previously been enabled for input, this will queue it\n * for removal, causing it to no longer be interactive. The removal happens on\n * the next game step, it is not immediate.\n *\n * The Interactive Object that was assigned to this Game Object will be destroyed,\n * removed from the Input Manager and cleared from this Game Object.\n *\n * If you wish to re-enable this Game Object at a later date you will need to\n * re-create its InteractiveObject by calling `setInteractive` again.\n *\n * If you wish to only temporarily stop an object from receiving input then use\n * `disableInteractive` instead, as that toggles the interactive state, where-as\n * this erases it completely.\n *\n * If you wish to resize a hit area, don't remove and then set it as being\n * interactive. Instead, access the hitarea object directly and resize the shape\n * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the\n * shape is a Rectangle, which it is by default.)\n *\n * @method Phaser.GameObjects.GameObject#removeInteractive\n * @since 3.7.0\n *\n * @return {this} This GameObject.\n */\n removeInteractive: function ()\n {\n this.scene.sys.input.clear(this);\n\n this.input = undefined;\n\n return this;\n },\n\n /**\n * This callback is invoked when this Game Object is added to a Scene.\n *\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\n * will use this, such as Sprites, to add themselves into the Update List.\n *\n * You can also listen for the `ADDED_TO_SCENE` event from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#addedToScene\n * @since 3.50.0\n */\n addedToScene: function ()\n {\n },\n\n /**\n * This callback is invoked when this Game Object is removed from a Scene.\n *\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\n * will use this, such as Sprites, to removed themselves from the Update List.\n *\n * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#removedFromScene\n * @since 3.50.0\n */\n removedFromScene: function ()\n {\n },\n\n /**\n * To be overridden by custom GameObjects. Allows base objects to be used in a Pool.\n *\n * @method Phaser.GameObjects.GameObject#update\n * @since 3.0.0\n *\n * @param {...*} [args] - args\n */\n update: function ()\n {\n },\n\n /**\n * Returns a JSON representation of the Game Object.\n *\n * @method Phaser.GameObjects.GameObject#toJSON\n * @since 3.0.0\n *\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\n */\n toJSON: function ()\n {\n return ComponentsToJSON(this);\n },\n\n /**\n * Compares the renderMask with the renderFlags to see if this Game Object will render or not.\n * Also checks the Game Object against the given Cameras exclusion list.\n *\n * @method Phaser.GameObjects.GameObject#willRender\n * @since 3.0.0\n *\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to check against this Game Object.\n *\n * @return {boolean} True if the Game Object should be rendered, otherwise false.\n */\n willRender: function (camera)\n {\n return !(GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id)));\n },\n\n /**\n * Returns an array containing the display list index of either this Game Object, or if it has one,\n * its parent Container. It then iterates up through all of the parent containers until it hits the\n * root of the display list (which is index 0 in the returned array).\n *\n * Used internally by the InputPlugin but also useful if you wish to find out the display depth of\n * this Game Object and all of its ancestors.\n *\n * @method Phaser.GameObjects.GameObject#getIndexList\n * @since 3.4.0\n *\n * @return {integer[]} An array of display list position indexes.\n */\n getIndexList: function ()\n {\n // eslint-disable-next-line consistent-this\n var child = this;\n var parent = this.parentContainer;\n\n var indexes = [];\n\n while (parent)\n {\n // indexes.unshift([parent.getIndex(child), parent.name]);\n indexes.unshift(parent.getIndex(child));\n\n child = parent;\n\n if (!parent.parentContainer)\n {\n break;\n }\n else\n {\n parent = parent.parentContainer;\n }\n }\n\n // indexes.unshift([this.scene.sys.displayList.getIndex(child), 'root']);\n indexes.unshift(this.scene.sys.displayList.getIndex(child));\n\n return indexes;\n },\n\n /**\n * Destroys this Game Object removing it from the Display List and Update List and\n * severing all ties to parent resources.\n *\n * Also removes itself from the Input Manager and Physics Manager if previously enabled.\n *\n * Use this to remove a Game Object from your game if you don't ever plan to use it again.\n * As long as no reference to it exists within your own code it should become free for\n * garbage collection by the browser.\n *\n * If you just want to temporarily disable an object then look at using the\n * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected.\n *\n * @method Phaser.GameObjects.GameObject#destroy\n * @fires Phaser.GameObjects.Events#DESTROY\n * @since 3.0.0\n *\n * @param {boolean} [fromScene=false] - Is this Game Object being destroyed as the result of a Scene shutdown?\n */\n destroy: function (fromScene)\n {\n if (fromScene === undefined) { fromScene = false; }\n\n // This Game Object has already been destroyed\n if (!this.scene || this.ignoreDestroy)\n {\n return;\n }\n\n if (this.preDestroy)\n {\n this.preDestroy.call(this);\n }\n\n this.emit(Events.DESTROY, this);\n\n var sys = this.scene.sys;\n\n if (!fromScene)\n {\n sys.displayList.remove(this);\n }\n\n if (this.input)\n {\n sys.input.clear(this);\n this.input = undefined;\n }\n\n if (this.data)\n {\n this.data.destroy();\n\n this.data = undefined;\n }\n\n if (this.body)\n {\n this.body.destroy();\n this.body = undefined;\n }\n\n // Tell the Scene to re-sort the children\n if (!fromScene)\n {\n sys.queueDepthSort();\n }\n\n this.active = false;\n this.visible = false;\n\n this.scene = undefined;\n\n this.parentContainer = undefined;\n\n this.removeAllListeners();\n }\n\n});\n\n/**\n * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not.\n *\n * @constant {integer} RENDER_MASK\n * @memberof Phaser.GameObjects.GameObject\n * @default\n */\nGameObject.RENDER_MASK = 15;\n\nmodule.exports = GameObject;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../math/Clamp');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 2; // 0010\r\n\r\n/**\r\n * Provides methods used for setting the alpha properties of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Alpha\r\n * @since 3.0.0\r\n */\r\n\r\nvar Alpha = {\r\n\r\n /**\r\n * Private internal value. Holds the global alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alpha\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alpha: 1,\r\n\r\n /**\r\n * Private internal value. Holds the top-left alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaTL\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaTL: 1,\r\n\r\n /**\r\n * Private internal value. Holds the top-right alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaTR\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaTR: 1,\r\n\r\n /**\r\n * Private internal value. Holds the bottom-left alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaBL\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaBL: 1,\r\n\r\n /**\r\n * Private internal value. Holds the bottom-right alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaBR\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaBR: 1,\r\n\r\n /**\r\n * Clears all alpha values associated with this Game Object.\r\n *\r\n * Immediately sets the alpha levels back to 1 (fully opaque).\r\n *\r\n * @method Phaser.GameObjects.Components.Alpha#clearAlpha\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearAlpha: function ()\r\n {\r\n return this.setAlpha(1);\r\n },\r\n\r\n /**\r\n * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * If your game is running under WebGL you can optionally specify four different alpha values, each of which\r\n * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.\r\n *\r\n * @method Phaser.GameObjects.Components.Alpha#setAlpha\r\n * @since 3.0.0\r\n *\r\n * @param {number} [topLeft=1] - The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object.\r\n * @param {number} [topRight] - The alpha value used for the top-right of the Game Object. WebGL only.\r\n * @param {number} [bottomLeft] - The alpha value used for the bottom-left of the Game Object. WebGL only.\r\n * @param {number} [bottomRight] - The alpha value used for the bottom-right of the Game Object. WebGL only.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n if (topLeft === undefined) { topLeft = 1; }\r\n\r\n // Treat as if there is only one alpha value for the whole Game Object\r\n if (topRight === undefined)\r\n {\r\n this.alpha = topLeft;\r\n }\r\n else\r\n {\r\n this._alphaTL = Clamp(topLeft, 0, 1);\r\n this._alphaTR = Clamp(topRight, 0, 1);\r\n this._alphaBL = Clamp(bottomLeft, 0, 1);\r\n this._alphaBR = Clamp(bottomRight, 0, 1);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Game Object.\r\n *\r\n * This is a global value, impacting the entire Game Object, not just a region of it.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this._alpha;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alpha = v;\r\n this._alphaTL = v;\r\n this._alphaTR = v;\r\n this._alphaBL = v;\r\n this._alphaBR = v;\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the top-left of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaTopLeft\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaTopLeft: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaTL;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaTL = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the top-right of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaTopRight\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaTopRight: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaTR;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaTR = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the bottom-left of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomLeft\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaBottomLeft: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaBL;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaBL = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the bottom-right of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomRight\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaBottomRight: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaBR;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaBR = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Alpha;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../math/Clamp');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 2; // 0010\r\n\r\n/**\r\n * Provides methods used for setting the alpha property of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.AlphaSingle\r\n * @since 3.22.0\r\n */\r\n\r\nvar AlphaSingle = {\r\n\r\n /**\r\n * Private internal value. Holds the global alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.AlphaSingle#_alpha\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alpha: 1,\r\n\r\n /**\r\n * Clears all alpha values associated with this Game Object.\r\n *\r\n * Immediately sets the alpha levels back to 1 (fully opaque).\r\n *\r\n * @method Phaser.GameObjects.Components.AlphaSingle#clearAlpha\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearAlpha: function ()\r\n {\r\n return this.setAlpha(1);\r\n },\r\n\r\n /**\r\n * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * @method Phaser.GameObjects.Components.AlphaSingle#setAlpha\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=1] - The alpha value applied across the whole Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (value)\r\n {\r\n if (value === undefined) { value = 1; }\r\n\r\n this.alpha = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Game Object.\r\n *\r\n * This is a global value, impacting the entire Game Object, not just a region of it.\r\n *\r\n * @name Phaser.GameObjects.Components.AlphaSingle#alpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this._alpha;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alpha = v;\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = AlphaSingle;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BaseAnimation = require('../../animations/Animation');\r\nvar Class = require('../../utils/Class');\r\nvar Events = require('../../animations/events');\r\n\r\n/**\r\n * @classdesc\r\n * A Game Object Animation Controller.\r\n *\r\n * This controller lives as an instance within a Game Object, accessible as `sprite.anims`.\r\n *\r\n * @class Animation\r\n * @memberof Phaser.GameObjects.Components\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} parent - The Game Object to which this animation controller belongs.\r\n */\r\nvar Animation = new Class({\r\n\r\n initialize:\r\n\r\n function Animation (parent)\r\n {\r\n /**\r\n * The Game Object to which this animation controller belongs.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#parent\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.0.0\r\n */\r\n this.parent = parent;\r\n\r\n /**\r\n * A reference to the global Animation Manager.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#animationManager\r\n * @type {Phaser.Animations.AnimationManager}\r\n * @since 3.0.0\r\n */\r\n this.animationManager = parent.scene.sys.anims;\r\n\r\n this.animationManager.once(Events.REMOVE_ANIMATION, this.remove, this);\r\n\r\n /**\r\n * Is an animation currently playing or not?\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#isPlaying\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.isPlaying = false;\r\n\r\n /**\r\n * The current Animation loaded into this Animation Controller.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#currentAnim\r\n * @type {?Phaser.Animations.Animation}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.currentAnim = null;\r\n\r\n /**\r\n * The current AnimationFrame being displayed by this Animation Controller.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#currentFrame\r\n * @type {?Phaser.Animations.AnimationFrame}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.currentFrame = null;\r\n\r\n /**\r\n * The key of the next Animation to be loaded into this Animation Controller when the current animation completes.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#nextAnim\r\n * @type {?string}\r\n * @default null\r\n * @since 3.16.0\r\n */\r\n this.nextAnim = null;\r\n\r\n /**\r\n * A queue of keys of the next Animations to be loaded into this Animation Controller when the current animation completes.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#nextAnimsQueue\r\n * @type {string[]}\r\n * @since 3.24.0\r\n */\r\n this.nextAnimsQueue = [];\r\n\r\n /**\r\n * Time scale factor.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_timeScale\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this._timeScale = 1;\r\n\r\n /**\r\n * The frame rate of playback in frames per second.\r\n * The default is 24 if the `duration` property is `null`.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#frameRate\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.frameRate = 0;\r\n\r\n /**\r\n * How long the animation should play for, in milliseconds.\r\n * If the `frameRate` property has been set then it overrides this value,\r\n * otherwise the `frameRate` is derived from `duration`.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#duration\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.duration = 0;\r\n\r\n /**\r\n * ms per frame, not including frame specific modifiers that may be present in the Animation data.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#msPerFrame\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.msPerFrame = 0;\r\n\r\n /**\r\n * Skip frames if the time lags, or always advanced anyway?\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#skipMissedFrames\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.skipMissedFrames = true;\r\n\r\n /**\r\n * A delay before starting playback, in milliseconds.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_delay\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._delay = 0;\r\n\r\n /**\r\n * Number of times to repeat the animation (-1 for infinity)\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_repeat\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._repeat = 0;\r\n\r\n /**\r\n * Delay before the repeat starts, in milliseconds.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_repeatDelay\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._repeatDelay = 0;\r\n\r\n /**\r\n * Should the animation yoyo? (reverse back down to the start) before repeating?\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_yoyo\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._yoyo = false;\r\n\r\n /**\r\n * Will the playhead move forwards (`true`) or in reverse (`false`).\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#forward\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.forward = true;\r\n\r\n /**\r\n * An Internal trigger that's play the animation in reverse mode ('true') or not ('false'),\r\n * needed because forward can be changed by yoyo feature.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_reverse\r\n * @type {boolean}\r\n * @default false\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._reverse = false;\r\n\r\n /**\r\n * Internal time overflow accumulator.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#accumulator\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.accumulator = 0;\r\n\r\n /**\r\n * The time point at which the next animation frame will change.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#nextTick\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.nextTick = 0;\r\n\r\n /**\r\n * An internal counter keeping track of how many repeats are left to play.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#repeatCounter\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.repeatCounter = 0;\r\n\r\n /**\r\n * An internal flag keeping track of pending repeats.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#pendingRepeat\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.pendingRepeat = false;\r\n\r\n /**\r\n * Is the Animation paused?\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_paused\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._paused = false;\r\n\r\n /**\r\n * Was the animation previously playing before being paused?\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_wasPlaying\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._wasPlaying = false;\r\n\r\n /**\r\n * Internal property tracking if this Animation is waiting to stop.\r\n *\r\n * 0 = No\r\n * 1 = Waiting for ms to pass\r\n * 2 = Waiting for repeat\r\n * 3 = Waiting for specific frame\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_pendingStop\r\n * @type {integer}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._pendingStop = 0;\r\n\r\n /**\r\n * Internal property used by _pendingStop.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_pendingStopValue\r\n * @type {any}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._pendingStopValue;\r\n },\r\n\r\n /**\r\n * Sets an animation to be played immediately after the current one completes.\r\n *\r\n * The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc, or have the `stop` method called directly on it.\r\n *\r\n * An animation set to repeat forever will never enter a completed state.\r\n *\r\n * You can chain a new animation at any point, including before the current one starts playing, during it, or when it ends (via its `animationcomplete` callback).\r\n * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained animations without impacting the global animation they're playing.\r\n *\r\n * Call this method with no arguments to reset the chained animation.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#chain\r\n * @since 3.16.0\r\n *\r\n * @param {(string|Phaser.Animations.Animation)} [key] - The string-based key of the animation to play next, as defined previously in the Animation Manager. Or an Animation instance.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n chain: function (key)\r\n {\r\n if (key instanceof BaseAnimation)\r\n {\r\n key = key.key;\r\n }\r\n\r\n if (this.nextAnim === null)\r\n {\r\n this.nextAnim = key;\r\n }\r\n else\r\n {\r\n this.nextAnimsQueue.push(key);\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Sets the amount of time, in milliseconds, that the animation will be delayed before starting playback.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setDelay\r\n * @since 3.4.0\r\n *\r\n * @param {integer} [value=0] - The amount of time, in milliseconds, to wait before starting playback.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n setDelay: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this._delay = value;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Gets the amount of time, in milliseconds that the animation will be delayed before starting playback.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getDelay\r\n * @since 3.4.0\r\n *\r\n * @return {integer} The amount of time, in milliseconds, the Animation will wait before starting playback.\r\n */\r\n getDelay: function ()\r\n {\r\n return this._delay;\r\n },\r\n\r\n /**\r\n * Waits for the specified delay, in milliseconds, then starts playback of the requested animation.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#delayedPlay\r\n * @since 3.0.0\r\n *\r\n * @param {integer} delay - The delay, in milliseconds, to wait before starting the animation playing.\r\n * @param {string} key - The key of the animation to play.\r\n * @param {integer} [startFrame=0] - The frame of the animation to start from.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n delayedPlay: function (delay, key, startFrame)\r\n {\r\n this.play(key, true, startFrame);\r\n\r\n this.nextTick += delay;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Returns the key of the animation currently loaded into this component.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getCurrentKey\r\n * @since 3.0.0\r\n *\r\n * @return {string} The key of the Animation loaded into this component.\r\n */\r\n getCurrentKey: function ()\r\n {\r\n if (this.currentAnim)\r\n {\r\n return this.currentAnim.key;\r\n }\r\n },\r\n\r\n /**\r\n * Internal method used to load an animation into this component.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#load\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the animation to load.\r\n * @param {integer} [startFrame=0] - The start frame of the animation to load.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n load: function (key, startFrame)\r\n {\r\n if (startFrame === undefined) { startFrame = 0; }\r\n\r\n if (this.isPlaying)\r\n {\r\n this.stop();\r\n }\r\n\r\n // Load the new animation in\r\n this.animationManager.load(this, key, startFrame);\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Pause the current animation and set the `isPlaying` property to `false`.\r\n * You can optionally pause it at a specific frame.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#pause\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} [atFrame] - An optional frame to set after pausing the animation.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n pause: function (atFrame)\r\n {\r\n if (!this._paused)\r\n {\r\n this._paused = true;\r\n this._wasPlaying = this.isPlaying;\r\n this.isPlaying = false;\r\n }\r\n\r\n if (atFrame !== undefined)\r\n {\r\n this.updateFrame(atFrame);\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Resumes playback of a paused animation and sets the `isPlaying` property to `true`.\r\n * You can optionally tell it to start playback from a specific frame.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#resume\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} [fromFrame] - An optional frame to set before restarting playback.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n resume: function (fromFrame)\r\n {\r\n if (this._paused)\r\n {\r\n this._paused = false;\r\n this.isPlaying = this._wasPlaying;\r\n }\r\n\r\n if (fromFrame !== undefined)\r\n {\r\n this.updateFrame(fromFrame);\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * `true` if the current animation is paused, otherwise `false`.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#isPaused\r\n * @readonly\r\n * @type {boolean}\r\n * @since 3.4.0\r\n */\r\n isPaused: {\r\n\r\n get: function ()\r\n {\r\n return this._paused;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Plays an Animation on a Game Object that has the Animation component, such as a Sprite.\r\n *\r\n * Animations are stored in the global Animation Manager and are referenced by a unique string-based key.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#play\r\n * @fires Phaser.GameObjects.Components.Animation#onStartEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance.\r\n * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call.\r\n * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n play: function (key, ignoreIfPlaying, startFrame)\r\n {\r\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\r\n if (startFrame === undefined) { startFrame = 0; }\r\n\r\n if (key instanceof BaseAnimation)\r\n {\r\n key = key.key;\r\n }\r\n\r\n if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key)\r\n {\r\n return this.parent;\r\n }\r\n\r\n this.forward = true;\r\n this._reverse = false;\r\n this._paused = false;\r\n this._wasPlaying = true;\r\n\r\n return this._startAnimation(key, startFrame);\r\n },\r\n\r\n /**\r\n * Plays an Animation (in reverse mode) on the Game Object that owns this Animation Component.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#playReverse\r\n * @fires Phaser.GameObjects.Components.Animation#onStartEvent\r\n * @since 3.12.0\r\n *\r\n * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance.\r\n * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call.\r\n * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n playReverse: function (key, ignoreIfPlaying, startFrame)\r\n {\r\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\r\n if (startFrame === undefined) { startFrame = 0; }\r\n\r\n if (key instanceof BaseAnimation)\r\n {\r\n key = key.key;\r\n }\r\n\r\n if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key)\r\n {\r\n return this.parent;\r\n }\r\n\r\n this.forward = false;\r\n this._reverse = true;\r\n\r\n return this._startAnimation(key, startFrame);\r\n },\r\n\r\n /**\r\n * Load an Animation and fires 'onStartEvent' event, extracted from 'play' method.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#_startAnimation\r\n * @fires Phaser.Animations.Events#ANIMATION_START\r\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START\r\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START\r\n * @since 3.12.0\r\n *\r\n * @param {string} key - The string-based key of the animation to play, as defined previously in the Animation Manager.\r\n * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n _startAnimation: function (key, startFrame)\r\n {\r\n this.load(key, startFrame);\r\n\r\n var anim = this.currentAnim;\r\n var gameObject = this.parent;\r\n\r\n if (!anim)\r\n {\r\n return gameObject;\r\n }\r\n\r\n // Should give us 9,007,199,254,740,991 safe repeats\r\n this.repeatCounter = (this._repeat === -1) ? Number.MAX_VALUE : this._repeat;\r\n\r\n anim.getFirstTick(this);\r\n\r\n this.isPlaying = true;\r\n this.pendingRepeat = false;\r\n\r\n if (anim.showOnStart)\r\n {\r\n gameObject.visible = true;\r\n }\r\n\r\n var frame = this.currentFrame;\r\n\r\n anim.emit(Events.ANIMATION_START, anim, frame, gameObject);\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_START + key, anim, frame, gameObject);\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_START, anim, frame, gameObject);\r\n\r\n return gameObject;\r\n },\r\n\r\n /**\r\n * Reverse the Animation that is already playing on the Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#reverse\r\n * @since 3.12.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n reverse: function ()\r\n {\r\n if (this.isPlaying)\r\n {\r\n this._reverse = !this._reverse;\r\n\r\n this.forward = !this.forward;\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Returns a value between 0 and 1 indicating how far this animation is through, ignoring repeats and yoyos.\r\n * If the animation has a non-zero repeat defined, `getProgress` and `getTotalProgress` will be different\r\n * because `getProgress` doesn't include any repeats or repeat delays, whereas `getTotalProgress` does.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getProgress\r\n * @since 3.4.0\r\n *\r\n * @return {number} The progress of the current animation, between 0 and 1.\r\n */\r\n getProgress: function ()\r\n {\r\n var p = this.currentFrame.progress;\r\n\r\n if (!this.forward)\r\n {\r\n p = 1 - p;\r\n }\r\n\r\n return p;\r\n },\r\n\r\n /**\r\n * Takes a value between 0 and 1 and uses it to set how far this animation is through playback.\r\n * Does not factor in repeats or yoyos, but does handle playing forwards or backwards.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setProgress\r\n * @since 3.4.0\r\n *\r\n * @param {number} [value=0] - The progress value, between 0 and 1.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n setProgress: function (value)\r\n {\r\n if (!this.forward)\r\n {\r\n value = 1 - value;\r\n }\r\n\r\n this.setCurrentFrame(this.currentAnim.getFrameByProgress(value));\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Handle the removal of an animation from the Animation Manager.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#remove\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The key of the removed Animation.\r\n * @param {Phaser.Animations.Animation} [animation] - The removed Animation.\r\n */\r\n remove: function (key, animation)\r\n {\r\n if (animation === undefined) { animation = this.currentAnim; }\r\n\r\n if (this.isPlaying && animation.key === this.currentAnim.key)\r\n {\r\n this.stop();\r\n\r\n this.setCurrentFrame(this.currentAnim.frames[0]);\r\n }\r\n },\r\n\r\n /**\r\n * Gets the number of times that the animation will repeat\r\n * after its first iteration. For example, if returns 1, the animation will\r\n * play a total of twice (the initial play plus 1 repeat).\r\n * A value of -1 means the animation will repeat indefinitely.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getRepeat\r\n * @since 3.4.0\r\n *\r\n * @return {integer} The number of times that the animation will repeat.\r\n */\r\n getRepeat: function ()\r\n {\r\n return this._repeat;\r\n },\r\n\r\n /**\r\n * Sets the number of times that the animation should repeat\r\n * after its first iteration. For example, if repeat is 1, the animation will\r\n * play a total of twice (the initial play plus 1 repeat).\r\n * To repeat indefinitely, use -1. repeat should always be an integer.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setRepeat\r\n * @since 3.4.0\r\n *\r\n * @param {integer} value - The number of times that the animation should repeat.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n setRepeat: function (value)\r\n {\r\n this._repeat = value;\r\n\r\n this.repeatCounter = (value === -1) ? Number.MAX_VALUE : value;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Gets the amount of delay between repeats, if any.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getRepeatDelay\r\n * @since 3.4.0\r\n *\r\n * @return {number} The delay between repeats.\r\n */\r\n getRepeatDelay: function ()\r\n {\r\n return this._repeatDelay;\r\n },\r\n\r\n /**\r\n * Sets the amount of time in seconds between repeats.\r\n * For example, if `repeat` is 2 and `repeatDelay` is 10, the animation will play initially,\r\n * then wait for 10 seconds before repeating, then play again, then wait another 10 seconds\r\n * before doing its final repeat.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setRepeatDelay\r\n * @since 3.4.0\r\n *\r\n * @param {number} value - The delay to wait between repeats, in seconds.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n setRepeatDelay: function (value)\r\n {\r\n this._repeatDelay = value;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Restarts the current animation from its beginning, optionally including its delay value.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#restart\r\n * @fires Phaser.Animations.Events#ANIMATION_RESTART\r\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_RESTART\r\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [includeDelay=false] - Whether to include the delay value of the animation when restarting.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n restart: function (includeDelay)\r\n {\r\n if (includeDelay === undefined) { includeDelay = false; }\r\n\r\n var anim = this.currentAnim;\r\n\r\n anim.getFirstTick(this, includeDelay);\r\n\r\n this.forward = true;\r\n this.isPlaying = true;\r\n this.pendingRepeat = false;\r\n this._paused = false;\r\n\r\n // Set frame\r\n this.updateFrame(anim.frames[0]);\r\n\r\n var gameObject = this.parent;\r\n var frame = this.currentFrame;\r\n\r\n anim.emit(Events.ANIMATION_RESTART, anim, frame, gameObject);\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_RESTART + anim.key, anim, frame, gameObject);\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_RESTART, anim, frame, gameObject);\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Immediately stops the current animation from playing and dispatches the `animationcomplete` event.\r\n *\r\n * If no animation is set, no event will be dispatched.\r\n *\r\n * If there is another animation queued (via the `chain` method) then it will start playing immediately.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#stop\r\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n stop: function ()\r\n {\r\n this._pendingStop = 0;\r\n\r\n this.isPlaying = false;\r\n\r\n var gameObject = this.parent;\r\n var anim = this.currentAnim;\r\n var frame = this.currentFrame;\r\n\r\n if (anim)\r\n {\r\n anim.emit(Events.ANIMATION_COMPLETE, anim, frame, gameObject);\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_COMPLETE + anim.key, anim, frame, gameObject);\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_COMPLETE, anim, frame, gameObject);\r\n }\r\n\r\n if (this.nextAnim)\r\n {\r\n var key = this.nextAnim;\r\n\r\n this.nextAnim = (this.nextAnimsQueue.length > 0) ? this.nextAnimsQueue.shift() : null;\r\n\r\n this.play(key);\r\n }\r\n\r\n return gameObject;\r\n },\r\n\r\n /**\r\n * Stops the current animation from playing after the specified time delay, given in milliseconds.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#stopAfterDelay\r\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\r\n * @since 3.4.0\r\n *\r\n * @param {integer} delay - The number of milliseconds to wait before stopping this animation.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n stopAfterDelay: function (delay)\r\n {\r\n this._pendingStop = 1;\r\n this._pendingStopValue = delay;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Stops the current animation from playing when it next repeats.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#stopOnRepeat\r\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\r\n * @since 3.4.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n stopOnRepeat: function ()\r\n {\r\n this._pendingStop = 2;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Stops the current animation from playing when it next sets the given frame.\r\n * If this frame doesn't exist within the animation it will not stop it from playing.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#stopOnFrame\r\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} frame - The frame to check before stopping this animation.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n stopOnFrame: function (frame)\r\n {\r\n this._pendingStop = 3;\r\n this._pendingStopValue = frame;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Sets the Time Scale factor, allowing you to make the animation go go faster or slower than default.\r\n * Where 1 = normal speed (the default), 0.5 = half speed, 2 = double speed, etc.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setTimeScale\r\n * @since 3.4.0\r\n *\r\n * @param {number} [value=1] - The time scale factor, where 1 is no change, 0.5 is half speed, etc.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n setTimeScale: function (value)\r\n {\r\n if (value === undefined) { value = 1; }\r\n\r\n this._timeScale = value;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Gets the Time Scale factor.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getTimeScale\r\n * @since 3.4.0\r\n *\r\n * @return {number} The Time Scale value.\r\n */\r\n getTimeScale: function ()\r\n {\r\n return this._timeScale;\r\n },\r\n\r\n /**\r\n * Returns the total number of frames in this animation.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getTotalFrames\r\n * @since 3.4.0\r\n *\r\n * @return {integer} The total number of frames in this animation.\r\n */\r\n getTotalFrames: function ()\r\n {\r\n return this.currentAnim.frames.length;\r\n },\r\n\r\n /**\r\n * The internal update loop for the Animation Component.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current timestamp.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (!this.currentAnim || !this.isPlaying || this.currentAnim.paused)\r\n {\r\n return;\r\n }\r\n\r\n this.accumulator += delta * this._timeScale;\r\n\r\n if (this._pendingStop === 1)\r\n {\r\n this._pendingStopValue -= delta;\r\n\r\n if (this._pendingStopValue <= 0)\r\n {\r\n return this.currentAnim.completeAnimation(this);\r\n }\r\n }\r\n\r\n if (this.accumulator >= this.nextTick)\r\n {\r\n this.currentAnim.setFrame(this);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the given Animation Frame as being the current frame\r\n * and applies it to the parent Game Object, adjusting its size and origin as needed.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setCurrentFrame\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} animationFrame - The Animation Frame to set as being current.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\r\n */\r\n setCurrentFrame: function (animationFrame)\r\n {\r\n var gameObject = this.parent;\r\n\r\n this.currentFrame = animationFrame;\r\n\r\n gameObject.texture = animationFrame.frame.texture;\r\n gameObject.frame = animationFrame.frame;\r\n\r\n if (gameObject.isCropped)\r\n {\r\n gameObject.frame.updateCropUVs(gameObject._crop, gameObject.flipX, gameObject.flipY);\r\n }\r\n\r\n gameObject.setSizeToFrame();\r\n\r\n if (gameObject._originComponent)\r\n {\r\n if (animationFrame.frame.customPivot)\r\n {\r\n gameObject.setOrigin(animationFrame.frame.pivotX, animationFrame.frame.pivotY);\r\n }\r\n else\r\n {\r\n gameObject.updateDisplayOrigin();\r\n }\r\n }\r\n\r\n return gameObject;\r\n },\r\n\r\n /**\r\n * Internal frame change handler.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#updateFrame\r\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE\r\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} animationFrame - The animation frame to change to.\r\n */\r\n updateFrame: function (animationFrame)\r\n {\r\n var gameObject = this.setCurrentFrame(animationFrame);\r\n\r\n if (this.isPlaying)\r\n {\r\n if (animationFrame.setAlpha)\r\n {\r\n gameObject.alpha = animationFrame.alpha;\r\n }\r\n\r\n var anim = this.currentAnim;\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_UPDATE + anim.key, anim, animationFrame, gameObject);\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_UPDATE, anim, animationFrame, gameObject);\r\n\r\n if (this._pendingStop === 3 && this._pendingStopValue === animationFrame)\r\n {\r\n this.currentAnim.completeAnimation(this);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Advances the animation to the next frame, regardless of the time or animation state.\r\n * If the animation is set to repeat, or yoyo, this will still take effect.\r\n *\r\n * Calling this does not change the direction of the animation. I.e. if it was currently\r\n * playing in reverse, calling this method doesn't then change the direction to forwards.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#nextFrame\r\n * @since 3.16.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\r\n */\r\n nextFrame: function ()\r\n {\r\n if (this.currentAnim)\r\n {\r\n this.currentAnim.nextFrame(this);\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Advances the animation to the previous frame, regardless of the time or animation state.\r\n * If the animation is set to repeat, or yoyo, this will still take effect.\r\n *\r\n * Calling this does not change the direction of the animation. I.e. if it was currently\r\n * playing in forwards, calling this method doesn't then change the direction to backwards.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#previousFrame\r\n * @since 3.16.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\r\n */\r\n previousFrame: function ()\r\n {\r\n if (this.currentAnim)\r\n {\r\n this.currentAnim.previousFrame(this);\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Sets if the current Animation will yoyo when it reaches the end.\r\n * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setYoyo\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [value=false] - `true` if the animation should yoyo, `false` to not.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\r\n */\r\n setYoyo: function (value)\r\n {\r\n if (value === undefined) { value = false; }\r\n\r\n this._yoyo = value;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Gets if the current Animation will yoyo when it reaches the end.\r\n * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getYoyo\r\n * @since 3.4.0\r\n *\r\n * @return {boolean} `true` if the animation is set to yoyo, `false` if not.\r\n */\r\n getYoyo: function ()\r\n {\r\n return this._yoyo;\r\n },\r\n\r\n /**\r\n * Destroy this Animation component.\r\n *\r\n * Unregisters event listeners and cleans up its references.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.animationManager.off(Events.REMOVE_ANIMATION, this.remove, this);\r\n\r\n this.animationManager = null;\r\n this.parent = null;\r\n this.nextAnimsQueue.length = 0;\r\n\r\n this.currentAnim = null;\r\n this.currentFrame = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Animation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = require('../../renderer/BlendModes');\r\n\r\n/**\r\n * Provides methods used for setting the blend mode of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.BlendMode\r\n * @since 3.0.0\r\n */\r\n\r\nvar BlendMode = {\r\n\r\n /**\r\n * Private internal value. Holds the current blend mode.\r\n * \r\n * @name Phaser.GameObjects.Components.BlendMode#_blendMode\r\n * @type {integer}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _blendMode: BlendModes.NORMAL,\r\n\r\n /**\r\n * Sets the Blend Mode being used by this Game Object.\r\n *\r\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\r\n *\r\n * Under WebGL only the following Blend Modes are available:\r\n *\r\n * * ADD\r\n * * MULTIPLY\r\n * * SCREEN\r\n * * ERASE\r\n *\r\n * Canvas has more available depending on browser support.\r\n *\r\n * You can also create your own custom Blend Modes in WebGL.\r\n *\r\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\r\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\r\n * reasons try to be careful about the construction of your Scene and the frequency of which blend modes\r\n * are used.\r\n *\r\n * @name Phaser.GameObjects.Components.BlendMode#blendMode\r\n * @type {(Phaser.BlendModes|string)}\r\n * @since 3.0.0\r\n */\r\n blendMode: {\r\n\r\n get: function ()\r\n {\r\n return this._blendMode;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (typeof value === 'string')\r\n {\r\n value = BlendModes[value];\r\n }\r\n\r\n value |= 0;\r\n\r\n if (value >= -1)\r\n {\r\n this._blendMode = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the Blend Mode being used by this Game Object.\r\n *\r\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\r\n *\r\n * Under WebGL only the following Blend Modes are available:\r\n *\r\n * * ADD\r\n * * MULTIPLY\r\n * * SCREEN\r\n * * ERASE (only works when rendering to a framebuffer, like a Render Texture)\r\n *\r\n * Canvas has more available depending on browser support.\r\n *\r\n * You can also create your own custom Blend Modes in WebGL.\r\n *\r\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\r\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\r\n * reasons try to be careful about the construction of your Scene and the frequency in which blend modes\r\n * are used.\r\n *\r\n * @method Phaser.GameObjects.Components.BlendMode#setBlendMode\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.BlendModes)} value - The BlendMode value. Either a string or a CONST.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setBlendMode: function (value)\r\n {\r\n this.blendMode = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = BlendMode;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for calculating and setting the size of a non-Frame based Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.ComputedSize\r\n * @since 3.0.0\r\n */\r\n\r\nvar ComputedSize = {\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n * \r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayWidth` property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n width: 0,\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n * \r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayHeight` property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n height: 0,\r\n\r\n /**\r\n * The displayed width of this Game Object.\r\n * \r\n * This value takes into account the scale factor.\r\n * \r\n * Setting this value will adjust the Game Object's scale property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#displayWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleX * this.width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleX = value / this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of this Game Object.\r\n * \r\n * This value takes into account the scale factor.\r\n * \r\n * Setting this value will adjust the Game Object's scale property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#displayHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleY * this.height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleY = value / this.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\r\n * \r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n * \r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n * \r\n * @method Phaser.GameObjects.Components.ComputedSize#setSize\r\n * @since 3.4.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the display size of this Game Object.\r\n * \r\n * Calling this will adjust the scale.\r\n * \r\n * @method Phaser.GameObjects.Components.ComputedSize#setDisplaySize\r\n * @since 3.4.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplaySize: function (width, height)\r\n {\r\n this.displayWidth = width;\r\n this.displayHeight = height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = ComputedSize;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Crop\r\n * @since 3.12.0\r\n */\r\n\r\nvar Crop = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * A boolean flag indicating if this Game Object is being cropped or not.\r\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\r\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#isCropped\r\n * @type {boolean}\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\r\n * \r\n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\r\n * \r\n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\r\n * changes what is shown when rendered.\r\n * \r\n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\r\n * \r\n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\r\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\r\n * \r\n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\r\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\r\n * \r\n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\r\n * \r\n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\r\n * \r\n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\r\n * the renderer to skip several internal calculations.\r\n *\r\n * @method Phaser.GameObjects.Components.Crop#setCrop\r\n * @since 3.11.0\r\n *\r\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\r\n * @param {number} [y] - The y coordinate to start the crop from.\r\n * @param {number} [width] - The width of the crop rectangle in pixels.\r\n * @param {number} [height] - The height of the crop rectangle in pixels.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setCrop: function (x, y, width, height)\r\n {\r\n if (x === undefined)\r\n {\r\n this.isCropped = false;\r\n }\r\n else if (this.frame)\r\n {\r\n if (typeof x === 'number')\r\n {\r\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\r\n }\r\n else\r\n {\r\n var rect = x;\r\n\r\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\r\n }\r\n\r\n this.isCropped = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Crop#resetCropObject\r\n * @private\r\n * @since 3.12.0\r\n * \r\n * @return {object} The crop object.\r\n */\r\n resetCropObject: function ()\r\n {\r\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Crop;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for setting the depth of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Depth\r\n * @since 3.0.0\r\n */\r\n\r\nvar Depth = {\r\n\r\n /**\r\n * Private internal value. Holds the depth of the Game Object.\r\n * \r\n * @name Phaser.GameObjects.Components.Depth#_depth\r\n * @type {integer}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _depth: 0,\r\n\r\n /**\r\n * The depth of this Game Object within the Scene.\r\n * \r\n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\r\n * of Game Objects, without actually moving their position in the display list.\r\n *\r\n * The default depth is zero. A Game Object with a higher depth\r\n * value will always render in front of one with a lower value.\r\n *\r\n * Setting the depth will queue a depth sort event within the Scene.\r\n * \r\n * @name Phaser.GameObjects.Components.Depth#depth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n depth: {\r\n\r\n get: function ()\r\n {\r\n return this._depth;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scene.sys.queueDepthSort();\r\n this._depth = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The depth of this Game Object within the Scene.\r\n * \r\n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\r\n * of Game Objects, without actually moving their position in the display list.\r\n *\r\n * The default depth is zero. A Game Object with a higher depth\r\n * value will always render in front of one with a lower value.\r\n *\r\n * Setting the depth will queue a depth sort event within the Scene.\r\n * \r\n * @method Phaser.GameObjects.Components.Depth#setDepth\r\n * @since 3.0.0\r\n *\r\n * @param {integer} value - The depth of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setDepth: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.depth = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Depth;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for visually flipping a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Flip\r\n * @since 3.0.0\r\n */\r\n\r\nvar Flip = {\r\n\r\n /**\r\n * The horizontally flipped state of the Game Object.\r\n * \r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @name Phaser.GameObjects.Components.Flip#flipX\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n flipX: false,\r\n\r\n /**\r\n * The vertically flipped state of the Game Object.\r\n * \r\n * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down)\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @name Phaser.GameObjects.Components.Flip#flipY\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n flipY: false,\r\n\r\n /**\r\n * Toggles the horizontal flipped state of this Game Object.\r\n * \r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#toggleFlipX\r\n * @since 3.0.0\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n toggleFlipX: function ()\r\n {\r\n this.flipX = !this.flipX;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggles the vertical flipped state of this Game Object.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#toggleFlipY\r\n * @since 3.0.0\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n toggleFlipY: function ()\r\n {\r\n this.flipY = !this.flipY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal flipped state of this Game Object.\r\n * \r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#setFlipX\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setFlipX: function (value)\r\n {\r\n this.flipX = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical flipped state of this Game Object.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#setFlipY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setFlipY: function (value)\r\n {\r\n this.flipY = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal and vertical flipped state of this Game Object.\r\n * \r\n * A Game Object that is flipped will render inversed on the flipped axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#setFlip\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setFlip: function (x, y)\r\n {\r\n this.flipX = x;\r\n this.flipY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#resetFlip\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n resetFlip: function ()\r\n {\r\n this.flipX = false;\r\n this.flipY = false;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Flip;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = require('../../geom/rectangle/Rectangle');\r\nvar RotateAround = require('../../math/RotateAround');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * Provides methods used for obtaining the bounds of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.GetBounds\r\n * @since 3.0.0\r\n */\r\n\r\nvar GetBounds = {\r\n\r\n /**\r\n * Processes the bounds output vector before returning it.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#prepareBoundsOutput\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} output - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n prepareBoundsOutput: function (output, includeParent)\r\n {\r\n if (includeParent === undefined) { includeParent = false; }\r\n\r\n if (this.rotation !== 0)\r\n {\r\n RotateAround(output, this.x, this.y, this.rotation);\r\n }\r\n\r\n if (includeParent && this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Gets the center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getCenter: function (output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX) + (this.displayWidth / 2);\r\n output.y = this.y - (this.displayHeight * this.originY) + (this.displayHeight / 2);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Gets the top-left corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getTopLeft: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the top-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getTopCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the top-right corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getTopRight: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the left-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getLeftCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getLeftCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the right-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getRightCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getRightCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getBottomLeft: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getBottomCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getBottomRight: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bounds of this Game Object, regardless of origin.\r\n * The values are stored and returned in a Rectangle, or Rectangle-like, object.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBounds\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [output,$return]\r\n *\r\n * @param {(Phaser.Geom.Rectangle|object)} [output] - An object to store the values in. If not provided a new Rectangle will be created.\r\n *\r\n * @return {(Phaser.Geom.Rectangle|object)} The values stored in the output object.\r\n */\r\n getBounds: function (output)\r\n {\r\n if (output === undefined) { output = new Rectangle(); }\r\n\r\n // We can use the output object to temporarily store the x/y coords in:\r\n\r\n var TLx, TLy, TRx, TRy, BLx, BLy, BRx, BRy;\r\n\r\n // Instead of doing a check if parent container is \r\n // defined per corner we only do it once.\r\n if (this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n\r\n this.getTopLeft(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n TLx = output.x;\r\n TLy = output.y;\r\n\r\n this.getTopRight(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n TRx = output.x;\r\n TRy = output.y;\r\n\r\n this.getBottomLeft(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n BLx = output.x;\r\n BLy = output.y;\r\n\r\n this.getBottomRight(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n BRx = output.x;\r\n BRy = output.y;\r\n }\r\n else\r\n {\r\n this.getTopLeft(output);\r\n\r\n TLx = output.x;\r\n TLy = output.y;\r\n\r\n this.getTopRight(output);\r\n\r\n TRx = output.x;\r\n TRy = output.y;\r\n\r\n this.getBottomLeft(output);\r\n\r\n BLx = output.x;\r\n BLy = output.y;\r\n\r\n this.getBottomRight(output);\r\n\r\n BRx = output.x;\r\n BRy = output.y;\r\n }\r\n\r\n output.x = Math.min(TLx, TRx, BLx, BRx);\r\n output.y = Math.min(TLy, TRy, BLy, BRy);\r\n output.width = Math.max(TLx, TRx, BLx, BRx) - output.x;\r\n output.height = Math.max(TLy, TRy, BLy, BRy) - output.y;\r\n\r\n return output;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = GetBounds;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BitmapMask = require('../../display/mask/BitmapMask');\r\nvar GeometryMask = require('../../display/mask/GeometryMask');\r\n\r\n/**\r\n * Provides methods used for getting and setting the mask of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Mask\r\n * @since 3.0.0\r\n */\r\n\r\nvar Mask = {\r\n\r\n /**\r\n * The Mask this Game Object is using during render.\r\n *\r\n * @name Phaser.GameObjects.Components.Mask#mask\r\n * @type {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask}\r\n * @since 3.0.0\r\n */\r\n mask: null,\r\n\r\n /**\r\n * Sets the mask that this Game Object will use to render with.\r\n *\r\n * The mask must have been previously created and can be either a GeometryMask or a BitmapMask.\r\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\r\n *\r\n * If a mask is already set on this Game Object it will be immediately replaced.\r\n * \r\n * Masks are positioned in global space and are not relative to the Game Object to which they\r\n * are applied. The reason for this is that multiple Game Objects can all share the same mask.\r\n * \r\n * Masks have no impact on physics or input detection. They are purely a rendering component\r\n * that allows you to limit what is visible during the render pass.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#setMask\r\n * @since 3.6.2\r\n *\r\n * @param {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask} mask - The mask this Game Object will use when rendering.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setMask: function (mask)\r\n {\r\n this.mask = mask;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clears the mask that this Game Object was using.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#clearMask\r\n * @since 3.6.2\r\n *\r\n * @param {boolean} [destroyMask=false] - Destroy the mask before clearing it?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearMask: function (destroyMask)\r\n {\r\n if (destroyMask === undefined) { destroyMask = false; }\r\n\r\n if (destroyMask && this.mask)\r\n {\r\n this.mask.destroy();\r\n }\r\n\r\n this.mask = null;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates and returns a Bitmap Mask. This mask can be used by any Game Object,\r\n * including this one.\r\n *\r\n * To create the mask you need to pass in a reference to a renderable Game Object.\r\n * A renderable Game Object is one that uses a texture to render with, such as an\r\n * Image, Sprite, Render Texture or BitmapText.\r\n *\r\n * If you do not provide a renderable object, and this Game Object has a texture,\r\n * it will use itself as the object. This means you can call this method to create\r\n * a Bitmap Mask from any renderable Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#createBitmapMask\r\n * @since 3.6.2\r\n * \r\n * @param {Phaser.GameObjects.GameObject} [renderable] - A renderable Game Object that uses a texture, such as a Sprite.\r\n *\r\n * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created.\r\n */\r\n createBitmapMask: function (renderable)\r\n {\r\n if (renderable === undefined && (this.texture || this.shader))\r\n {\r\n // eslint-disable-next-line consistent-this\r\n renderable = this;\r\n }\r\n\r\n return new BitmapMask(this.scene, renderable);\r\n },\r\n\r\n /**\r\n * Creates and returns a Geometry Mask. This mask can be used by any Game Object,\r\n * including this one.\r\n *\r\n * To create the mask you need to pass in a reference to a Graphics Game Object.\r\n *\r\n * If you do not provide a graphics object, and this Game Object is an instance\r\n * of a Graphics object, then it will use itself to create the mask.\r\n * \r\n * This means you can call this method to create a Geometry Mask from any Graphics Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#createGeometryMask\r\n * @since 3.6.2\r\n * \r\n * @param {Phaser.GameObjects.Graphics} [graphics] - A Graphics Game Object. The geometry within it will be used as the mask.\r\n *\r\n * @return {Phaser.Display.Masks.GeometryMask} This Geometry Mask that was created.\r\n */\r\n createGeometryMask: function (graphics)\r\n {\r\n if (graphics === undefined && this.type === 'Graphics')\r\n {\r\n // eslint-disable-next-line consistent-this\r\n graphics = this;\r\n }\r\n\r\n return new GeometryMask(this.scene, graphics);\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Mask;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the origin of a Game Object.\r\n * Values are normalized, given in the range 0 to 1.\r\n * Display values contain the calculated pixel values.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Origin\r\n * @since 3.0.0\r\n */\r\n\r\nvar Origin = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#_originComponent\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.2.0\r\n */\r\n _originComponent: true,\r\n\r\n /**\r\n * The horizontal origin of this Game Object.\r\n * The origin maps the relationship between the size and position of the Game Object.\r\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\r\n * Setting the value to 0 means the position now relates to the left of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#originX\r\n * @type {number}\r\n * @default 0.5\r\n * @since 3.0.0\r\n */\r\n originX: 0.5,\r\n\r\n /**\r\n * The vertical origin of this Game Object.\r\n * The origin maps the relationship between the size and position of the Game Object.\r\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\r\n * Setting the value to 0 means the position now relates to the top of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#originY\r\n * @type {number}\r\n * @default 0.5\r\n * @since 3.0.0\r\n */\r\n originY: 0.5,\r\n\r\n // private + read only\r\n _displayOriginX: 0,\r\n _displayOriginY: 0,\r\n\r\n /**\r\n * The horizontal display origin of this Game Object.\r\n * The origin is a normalized value between 0 and 1.\r\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#displayOriginX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayOriginX: {\r\n\r\n get: function ()\r\n {\r\n return this._displayOriginX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._displayOriginX = value;\r\n this.originX = value / this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical display origin of this Game Object.\r\n * The origin is a normalized value between 0 and 1.\r\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#displayOriginY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayOriginY: {\r\n\r\n get: function ()\r\n {\r\n return this._displayOriginY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._displayOriginY = value;\r\n this.originY = value / this.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the origin of this Game Object.\r\n *\r\n * The values are given in the range 0 to 1.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setOrigin\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0.5] - The horizontal origin value.\r\n * @param {number} [y=x] - The vertical origin value. If not defined it will be set to the value of `x`.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setOrigin: function (x, y)\r\n {\r\n if (x === undefined) { x = 0.5; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.originX = x;\r\n this.originY = y;\r\n\r\n return this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the origin of this Game Object based on the Pivot values in its Frame.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setOriginFromFrame\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setOriginFromFrame: function ()\r\n {\r\n if (!this.frame || !this.frame.customPivot)\r\n {\r\n return this.setOrigin();\r\n }\r\n else\r\n {\r\n this.originX = this.frame.pivotX;\r\n this.originY = this.frame.pivotY;\r\n }\r\n\r\n return this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the display origin of this Game Object.\r\n * The difference between this and setting the origin is that you can use pixel values for setting the display origin.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setDisplayOrigin\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The horizontal display origin value.\r\n * @param {number} [y=x] - The vertical display origin value. If not defined it will be set to the value of `x`.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplayOrigin: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.displayOriginX = x;\r\n this.displayOriginY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the Display Origin cached values internally stored on this Game Object.\r\n * You don't usually call this directly, but it is exposed for edge-cases where you may.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#updateDisplayOrigin\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateDisplayOrigin: function ()\r\n {\r\n this._displayOriginX = this.originX * this.width;\r\n this._displayOriginY = this.originY * this.height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Origin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DegToRad = require('../../math/DegToRad');\r\nvar GetBoolean = require('../../tweens/builders/GetBoolean');\r\nvar GetValue = require('../../utils/object/GetValue');\r\nvar TWEEN_CONST = require('../../tweens/tween/const');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * Provides methods used for managing a Game Object following a Path.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.PathFollower\r\n * @since 3.17.0\r\n */\r\n\r\nvar PathFollower = {\r\n\r\n /**\r\n * The Path this PathFollower is following. It can only follow one Path at a time.\r\n *\r\n * @name Phaser.GameObjects.Components.PathFollower#path\r\n * @type {Phaser.Curves.Path}\r\n * @since 3.0.0\r\n */\r\n path: null,\r\n\r\n /**\r\n * Should the PathFollower automatically rotate to point in the direction of the Path?\r\n *\r\n * @name Phaser.GameObjects.Components.PathFollower#rotateToPath\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n rotateToPath: false,\r\n\r\n /**\r\n * If the PathFollower is rotating to match the Path (@see Phaser.GameObjects.PathFollower#rotateToPath)\r\n * this value is added to the rotation value. This allows you to rotate objects to a path but control\r\n * the angle of the rotation as well.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathRotationOffset\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n pathRotationOffset: 0,\r\n\r\n /**\r\n * An additional vector to add to the PathFollowers position, allowing you to offset it from the\r\n * Path coordinates.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathOffset\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n pathOffset: null,\r\n\r\n /**\r\n * A Vector2 that stores the current point of the path the follower is on.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathVector\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n pathVector: null,\r\n\r\n /**\r\n * The distance the follower has traveled from the previous point to the current one, at the last update.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathDelta\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.23.0\r\n */\r\n pathDelta: null,\r\n\r\n /**\r\n * The Tween used for following the Path.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathTween\r\n * @type {Phaser.Tweens.Tween}\r\n * @since 3.0.0\r\n */\r\n pathTween: null,\r\n\r\n /**\r\n * Settings for the PathFollower.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathConfig\r\n * @type {?Phaser.Types.GameObjects.PathFollower.PathConfig}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n pathConfig: null,\r\n\r\n /**\r\n * Records the direction of the follower so it can change direction.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#_prevDirection\r\n * @type {integer}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n _prevDirection: TWEEN_CONST.PLAYING_FORWARD,\r\n\r\n /**\r\n * Set the Path that this PathFollower should follow.\r\n *\r\n * Optionally accepts {@link Phaser.Types.GameObjects.PathFollower.PathConfig} settings.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#setPath\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Curves.Path} path - The Path this PathFollower is following. It can only follow one Path at a time.\r\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config] - Settings for the PathFollower.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setPath: function (path, config)\r\n {\r\n if (config === undefined) { config = this.pathConfig; }\r\n\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n this.path = path;\r\n\r\n if (config)\r\n {\r\n this.startFollow(config);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set whether the PathFollower should automatically rotate to point in the direction of the Path.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#setRotateToPath\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Whether the PathFollower should automatically rotate to point in the direction of the Path.\r\n * @param {number} [offset=0] - Rotation offset in degrees.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setRotateToPath: function (value, offset)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n\r\n this.rotateToPath = value;\r\n\r\n this.pathRotationOffset = offset;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Is this PathFollower actively following a Path or not?\r\n *\r\n * To be considered as `isFollowing` it must be currently moving on a Path, and not paused.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#isFollowing\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` is this PathFollower is actively following a Path, otherwise `false`.\r\n */\r\n isFollowing: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n return (tween && tween.isPlaying());\r\n },\r\n\r\n /**\r\n * Starts this PathFollower following its given Path.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#startFollow\r\n * @since 3.3.0\r\n *\r\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config={}] - The duration of the follow, or a PathFollower config object.\r\n * @param {number} [startAt=0] - Optional start position of the follow, between 0 and 1.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n startFollow: function (config, startAt)\r\n {\r\n if (config === undefined) { config = {}; }\r\n if (startAt === undefined) { startAt = 0; }\r\n\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n if (typeof config === 'number')\r\n {\r\n config = { duration: config };\r\n }\r\n\r\n // Override in case they've been specified in the config\r\n config.from = GetValue(config, 'from', 0);\r\n config.to = GetValue(config, 'to', 1);\r\n\r\n var positionOnPath = GetBoolean(config, 'positionOnPath', false);\r\n\r\n this.rotateToPath = GetBoolean(config, 'rotateToPath', false);\r\n this.pathRotationOffset = GetValue(config, 'rotationOffset', 0);\r\n\r\n // This works, but it's not an ideal way of doing it as the follower jumps position\r\n var seek = GetValue(config, 'startAt', startAt);\r\n\r\n if (seek)\r\n {\r\n config.onStart = function (tween)\r\n {\r\n var tweenData = tween.data[0];\r\n tweenData.progress = seek;\r\n tweenData.elapsed = tweenData.duration * seek;\r\n var v = tweenData.ease(tweenData.progress);\r\n tweenData.current = tweenData.start + ((tweenData.end - tweenData.start) * v);\r\n tweenData.target[tweenData.key] = tweenData.current;\r\n };\r\n }\r\n\r\n if (!this.pathOffset)\r\n {\r\n this.pathOffset = new Vector2(this.x, this.y);\r\n }\r\n\r\n if (!this.pathVector)\r\n {\r\n this.pathVector = new Vector2();\r\n }\r\n\r\n if (!this.pathDelta)\r\n {\r\n this.pathDelta = new Vector2();\r\n }\r\n\r\n this.pathDelta.reset();\r\n\r\n this.pathTween = this.scene.sys.tweens.addCounter(config);\r\n\r\n // The starting point of the path, relative to this follower\r\n this.path.getStartPoint(this.pathOffset);\r\n\r\n if (positionOnPath)\r\n {\r\n this.x = this.pathOffset.x;\r\n this.y = this.pathOffset.y;\r\n }\r\n\r\n this.pathOffset.x = this.x - this.pathOffset.x;\r\n this.pathOffset.y = this.y - this.pathOffset.y;\r\n\r\n this._prevDirection = TWEEN_CONST.PLAYING_FORWARD;\r\n\r\n if (this.rotateToPath)\r\n {\r\n // Set the rotation now (in case the tween has a delay on it, etc)\r\n var nextPoint = this.path.getPoint(0.1);\r\n\r\n this.rotation = Math.atan2(nextPoint.y - this.y, nextPoint.x - this.x) + DegToRad(this.pathRotationOffset);\r\n }\r\n\r\n this.pathConfig = config;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Pauses this PathFollower. It will still continue to render, but it will remain motionless at the\r\n * point on the Path at which you paused it.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#pauseFollow\r\n * @since 3.3.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n pauseFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.pause();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resumes a previously paused PathFollower.\r\n *\r\n * If the PathFollower was not paused this has no effect.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#resumeFollow\r\n * @since 3.3.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n resumeFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPaused())\r\n {\r\n tween.resume();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops this PathFollower from following the path any longer.\r\n *\r\n * This will invoke any 'stop' conditions that may exist on the Path, or for the follower.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#stopFollow\r\n * @since 3.3.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n stopFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal update handler that advances this PathFollower along the path.\r\n *\r\n * Called automatically by the Scene step, should not typically be called directly.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#pathUpdate\r\n * @since 3.17.0\r\n */\r\n pathUpdate: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween)\r\n {\r\n var tweenData = tween.data[0];\r\n var pathDelta = this.pathDelta;\r\n var pathVector = this.pathVector;\r\n\r\n pathDelta.copy(pathVector).negate();\r\n\r\n if (tweenData.state === TWEEN_CONST.COMPLETE)\r\n {\r\n this.path.getPoint(1, pathVector);\r\n\r\n pathDelta.add(pathVector);\r\n pathVector.add(this.pathOffset);\r\n\r\n this.setPosition(pathVector.x, pathVector.y);\r\n\r\n return;\r\n }\r\n else if (tweenData.state !== TWEEN_CONST.PLAYING_FORWARD && tweenData.state !== TWEEN_CONST.PLAYING_BACKWARD)\r\n {\r\n // If delayed, etc then bail out\r\n return;\r\n }\r\n\r\n this.path.getPoint(tween.getValue(), pathVector);\r\n\r\n pathDelta.add(pathVector);\r\n pathVector.add(this.pathOffset);\r\n\r\n var oldX = this.x;\r\n var oldY = this.y;\r\n\r\n this.setPosition(pathVector.x, pathVector.y);\r\n\r\n var speedX = this.x - oldX;\r\n var speedY = this.y - oldY;\r\n\r\n if (speedX === 0 && speedY === 0)\r\n {\r\n // Bail out early\r\n return;\r\n }\r\n\r\n if (tweenData.state !== this._prevDirection)\r\n {\r\n // We've changed direction, so don't do a rotate this frame\r\n this._prevDirection = tweenData.state;\r\n\r\n return;\r\n }\r\n\r\n if (this.rotateToPath)\r\n {\r\n this.rotation = Math.atan2(speedY, speedX) + DegToRad(this.pathRotationOffset);\r\n }\r\n }\r\n }\r\n\r\n};\r\n\r\nmodule.exports = PathFollower;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the WebGL rendering pipeline of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.Pipeline\n * @webglOnly\n * @since 3.0.0\n */\n\nvar Pipeline = {\n\n /**\n * The initial WebGL pipeline of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Pipeline#defaultPipeline\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\n * @default null\n * @webglOnly\n * @since 3.0.0\n */\n defaultPipeline: null,\n\n /**\n * The current WebGL pipeline of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Pipeline#pipeline\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\n * @default null\n * @webglOnly\n * @since 3.0.0\n */\n pipeline: null,\n\n /**\n * Sets the initial WebGL Pipeline of this Game Object.\n *\n * This should only be called during the instantiation of the Game Object.\n *\n * @method Phaser.GameObjects.Components.Pipeline#initPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @param {string} [pipelineName=MultiPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Multi Pipeline.\n *\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\n */\n initPipeline: function (pipelineName)\n {\n if (pipelineName === undefined) { pipelineName = 'MultiPipeline'; }\n\n var renderer = this.scene.sys.game.renderer;\n\n if (renderer && renderer.gl && renderer.hasPipeline(pipelineName))\n {\n this.defaultPipeline = renderer.getPipeline(pipelineName);\n this.pipeline = this.defaultPipeline;\n\n return true;\n }\n\n return false;\n },\n\n /**\n * Sets the active WebGL Pipeline of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Pipeline#setPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @param {string} pipelineName - The name of the pipeline to set on this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setPipeline: function (pipelineName)\n {\n var renderer = this.scene.sys.game.renderer;\n\n if (renderer && renderer.gl && renderer.hasPipeline(pipelineName))\n {\n this.pipeline = renderer.getPipeline(pipelineName);\n }\n\n return this;\n },\n\n /**\n * Resets the WebGL Pipeline of this Game Object back to the default it was created with.\n *\n * @method Phaser.GameObjects.Components.Pipeline#resetPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\n */\n resetPipeline: function ()\n {\n this.pipeline = this.defaultPipeline;\n\n return (this.pipeline !== null);\n },\n\n /**\n * Gets the name of the WebGL Pipeline this Game Object is currently using.\n *\n * @method Phaser.GameObjects.Components.Pipeline#getPipelineName\n * @webglOnly\n * @since 3.0.0\n *\n * @return {string} The string-based name of the pipeline being used by this Game Object.\n */\n getPipelineName: function ()\n {\n return this.pipeline.name;\n }\n\n};\n\nmodule.exports = Pipeline;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the Scroll Factor of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.ScrollFactor\r\n * @since 3.0.0\r\n */\r\n\r\nvar ScrollFactor = {\r\n\r\n /**\r\n * The horizontal scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scrollFactorX: 1,\r\n\r\n /**\r\n * The vertical scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scrollFactorY: 1,\r\n\r\n /**\r\n * Sets the scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @method Phaser.GameObjects.Components.ScrollFactor#setScrollFactor\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scroll factor of this Game Object.\r\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScrollFactor: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = ScrollFactor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the size of a Game Object.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Size\r\n * @since 3.0.0\r\n */\r\n\r\nvar Size = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n * \r\n * @name Phaser.GameObjects.Components.Size#_sizeComponent\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.2.0\r\n */\r\n _sizeComponent: true,\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n * \r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayWidth` property.\r\n * \r\n * @name Phaser.GameObjects.Components.Size#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n width: 0,\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n * \r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayHeight` property.\r\n * \r\n * @name Phaser.GameObjects.Components.Size#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n height: 0,\r\n\r\n /**\r\n * The displayed width of this Game Object.\r\n * \r\n * This value takes into account the scale factor.\r\n * \r\n * Setting this value will adjust the Game Object's scale property.\r\n * \r\n * @name Phaser.GameObjects.Components.Size#displayWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return Math.abs(this.scaleX * this.frame.realWidth);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleX = value / this.frame.realWidth;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of this Game Object.\r\n * \r\n * This value takes into account the scale factor.\r\n * \r\n * Setting this value will adjust the Game Object's scale property.\r\n * \r\n * @name Phaser.GameObjects.Components.Size#displayHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return Math.abs(this.scaleY * this.frame.realHeight);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleY = value / this.frame.realHeight;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the size of this Game Object to be that of the given Frame.\r\n * \r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n * \r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n * \r\n * @method Phaser.GameObjects.Components.Size#setSizeToFrame\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Frame} frame - The frame to base the size of this Game Object on.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setSizeToFrame: function (frame)\r\n {\r\n if (frame === undefined) { frame = this.frame; }\r\n\r\n this.width = frame.realWidth;\r\n this.height = frame.realHeight;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\r\n * \r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n * \r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n * \r\n * @method Phaser.GameObjects.Components.Size#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the display size of this Game Object.\r\n * \r\n * Calling this will adjust the scale.\r\n * \r\n * @method Phaser.GameObjects.Components.Size#setDisplaySize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplaySize: function (width, height)\r\n {\r\n this.displayWidth = width;\r\n this.displayHeight = height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Size;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 8; // 1000\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Texture\r\n * @since 3.0.0\r\n */\r\n\r\nvar Texture = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * Internal flag. Not to be set by this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#isCropped\r\n * @type {boolean}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Sets the texture and frame this Game Object will use to render with.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * @method Phaser.GameObjects.Components.Texture#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Textures.Texture)} key - The key of the texture to be used, as stored in the Texture Manager, or a Texture instance.\r\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTexture: function (key, frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(key);\r\n\r\n return this.setFrame(frame);\r\n },\r\n\r\n /**\r\n * Sets the frame this Game Object will use to render with.\r\n *\r\n * The Frame has to belong to the current Texture being used.\r\n *\r\n * It can be either a string or an index.\r\n *\r\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\r\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\r\n *\r\n * @method Phaser.GameObjects.Components.Texture#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer)} frame - The name or index of the frame within the Texture.\r\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\r\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFrame: function (frame, updateSize, updateOrigin)\r\n {\r\n if (updateSize === undefined) { updateSize = true; }\r\n if (updateOrigin === undefined) { updateOrigin = true; }\r\n\r\n this.frame = this.texture.get(frame);\r\n\r\n if (!this.frame.cutWidth || !this.frame.cutHeight)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n if (this._sizeComponent && updateSize)\r\n {\r\n this.setSizeToFrame();\r\n }\r\n\r\n if (this._originComponent && updateOrigin)\r\n {\r\n if (this.frame.customPivot)\r\n {\r\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\r\n }\r\n else\r\n {\r\n this.updateDisplayOrigin();\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Texture;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 8; // 1000\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.TextureCrop\r\n * @since 3.0.0\r\n */\r\n\r\nvar TextureCrop = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * A boolean flag indicating if this Game Object is being cropped or not.\r\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\r\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#isCropped\r\n * @type {boolean}\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\r\n * \r\n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\r\n * \r\n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\r\n * changes what is shown when rendered.\r\n * \r\n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\r\n * \r\n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\r\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\r\n * \r\n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\r\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\r\n * \r\n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\r\n * \r\n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\r\n * \r\n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\r\n * the renderer to skip several internal calculations.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setCrop\r\n * @since 3.11.0\r\n *\r\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\r\n * @param {number} [y] - The y coordinate to start the crop from.\r\n * @param {number} [width] - The width of the crop rectangle in pixels.\r\n * @param {number} [height] - The height of the crop rectangle in pixels.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setCrop: function (x, y, width, height)\r\n {\r\n if (x === undefined)\r\n {\r\n this.isCropped = false;\r\n }\r\n else if (this.frame)\r\n {\r\n if (typeof x === 'number')\r\n {\r\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\r\n }\r\n else\r\n {\r\n var rect = x;\r\n\r\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\r\n }\r\n\r\n this.isCropped = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the texture and frame this Game Object will use to render with.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the texture to be used, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTexture: function (key, frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(key);\r\n\r\n return this.setFrame(frame);\r\n },\r\n\r\n /**\r\n * Sets the frame this Game Object will use to render with.\r\n *\r\n * The Frame has to belong to the current Texture being used.\r\n *\r\n * It can be either a string or an index.\r\n *\r\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\r\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer)} frame - The name or index of the frame within the Texture.\r\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\r\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFrame: function (frame, updateSize, updateOrigin)\r\n {\r\n if (updateSize === undefined) { updateSize = true; }\r\n if (updateOrigin === undefined) { updateOrigin = true; }\r\n\r\n this.frame = this.texture.get(frame);\r\n\r\n if (!this.frame.cutWidth || !this.frame.cutHeight)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n if (this._sizeComponent && updateSize)\r\n {\r\n this.setSizeToFrame();\r\n }\r\n\r\n if (this._originComponent && updateOrigin)\r\n {\r\n if (this.frame.customPivot)\r\n {\r\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\r\n }\r\n else\r\n {\r\n this.updateDisplayOrigin();\r\n }\r\n }\r\n\r\n if (this.isCropped)\r\n {\r\n this.frame.updateCropUVs(this._crop, this.flipX, this.flipY);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#resetCropObject\r\n * @private\r\n * @since 3.12.0\r\n * \r\n * @return {object} The crop object.\r\n */\r\n resetCropObject: function ()\r\n {\r\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\r\n }\r\n\r\n};\r\n\r\nmodule.exports = TextureCrop;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar GetColorFromValue = require('../../display/color/GetColorFromValue');\n\n/**\n * Provides methods used for setting the tint of a Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.Tint\n * @webglOnly\n * @since 3.0.0\n */\n\nvar Tint = {\n\n /**\n * Private internal value. Holds the top-left tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#_tintTL\n * @type {number}\n * @private\n * @default 16777215\n * @since 3.0.0\n */\n _tintTL: 16777215,\n\n /**\n * Private internal value. Holds the top-right tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#_tintTR\n * @type {number}\n * @private\n * @default 16777215\n * @since 3.0.0\n */\n _tintTR: 16777215,\n\n /**\n * Private internal value. Holds the bottom-left tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#_tintBL\n * @type {number}\n * @private\n * @default 16777215\n * @since 3.0.0\n */\n _tintBL: 16777215,\n\n /**\n * Private internal value. Holds the bottom-right tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#_tintBR\n * @type {number}\n * @private\n * @default 16777215\n * @since 3.0.0\n */\n _tintBR: 16777215,\n\n /**\n * Private internal value. Holds if the Game Object is tinted or not.\n *\n * @name Phaser.GameObjects.Components.Tint#_isTinted\n * @type {boolean}\n * @private\n * @default false\n * @since 3.11.0\n */\n _isTinted: false,\n\n /**\n * Fill or additive?\n *\n * @name Phaser.GameObjects.Components.Tint#tintFill\n * @type {boolean}\n * @default false\n * @since 3.11.0\n */\n tintFill: false,\n\n /**\n * Clears all tint values associated with this Game Object.\n *\n * Immediately sets the color values back to 0xffffff and the tint type to 'additive',\n * which results in no visible change to the texture.\n *\n * @method Phaser.GameObjects.Components.Tint#clearTint\n * @webglOnly\n * @since 3.0.0\n *\n * @return {this} This Game Object instance.\n */\n clearTint: function ()\n {\n this.setTint(0xffffff);\n\n this._isTinted = false;\n\n return this;\n },\n\n /**\n * Sets an additive tint on this Game Object.\n *\n * The tint works by taking the pixel color values from the Game Objects texture, and then\n * multiplying it by the color value of the tint. You can provide either one color value,\n * in which case the whole Game Object will be tinted in that color. Or you can provide a color\n * per corner. The colors are blended together across the extent of the Game Object.\n *\n * To modify the tint color once set, either call this method again with new values or use the\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\n *\n * To remove a tint call `clearTint`.\n *\n * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`.\n *\n * @method Phaser.GameObjects.Components.Tint#setTint\n * @webglOnly\n * @since 3.0.0\n *\n * @param {integer} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object.\n * @param {integer} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {integer} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {integer} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setTint: function (topLeft, topRight, bottomLeft, bottomRight)\n {\n if (topLeft === undefined) { topLeft = 0xffffff; }\n\n if (topRight === undefined)\n {\n topRight = topLeft;\n bottomLeft = topLeft;\n bottomRight = topLeft;\n }\n\n this._tintTL = GetColorFromValue(topLeft);\n this._tintTR = GetColorFromValue(topRight);\n this._tintBL = GetColorFromValue(bottomLeft);\n this._tintBR = GetColorFromValue(bottomRight);\n\n this._isTinted = true;\n\n this.tintFill = false;\n\n return this;\n },\n\n /**\n * Sets a fill-based tint on this Game Object.\n *\n * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture\n * with those in the tint. You can use this for effects such as making a player flash 'white'\n * if hit by something. You can provide either one color value, in which case the whole\n * Game Object will be rendered in that color. Or you can provide a color per corner. The colors\n * are blended together across the extent of the Game Object.\n *\n * To modify the tint color once set, either call this method again with new values or use the\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\n *\n * To remove a tint call `clearTint`.\n *\n * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`.\n *\n * @method Phaser.GameObjects.Components.Tint#setTintFill\n * @webglOnly\n * @since 3.11.0\n *\n * @param {integer} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object.\n * @param {integer} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {integer} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {integer} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setTintFill: function (topLeft, topRight, bottomLeft, bottomRight)\n {\n this.setTint(topLeft, topRight, bottomLeft, bottomRight);\n\n this.tintFill = true;\n\n return this;\n },\n\n /**\n * The tint value being applied to the top-left of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopLeft\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tintTopLeft: {\n\n get: function ()\n {\n return this._tintTL;\n },\n\n set: function (value)\n {\n this._tintTL = GetColorFromValue(value);\n this._isTinted = true;\n }\n\n },\n\n /**\n * The tint value being applied to the top-right of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopRight\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tintTopRight: {\n\n get: function ()\n {\n return this._tintTR;\n },\n\n set: function (value)\n {\n this._tintTR = GetColorFromValue(value);\n this._isTinted = true;\n }\n\n },\n\n /**\n * The tint value being applied to the bottom-left of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomLeft\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tintBottomLeft: {\n\n get: function ()\n {\n return this._tintBL;\n },\n\n set: function (value)\n {\n this._tintBL = GetColorFromValue(value);\n this._isTinted = true;\n }\n\n },\n\n /**\n * The tint value being applied to the bottom-right of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomRight\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tintBottomRight: {\n\n get: function ()\n {\n return this._tintBR;\n },\n\n set: function (value)\n {\n this._tintBR = GetColorFromValue(value);\n this._isTinted = true;\n }\n\n },\n\n /**\n * The tint value being applied to the whole of the Game Object.\n * This property is a setter-only. Use the properties `tintTopLeft` etc to read the current tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#tint\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tint: {\n\n set: function (value)\n {\n this.setTint(value, value, value, value);\n }\n },\n\n /**\n * Does this Game Object have a tint applied to it or not?\n *\n * @name Phaser.GameObjects.Components.Tint#isTinted\n * @type {boolean}\n * @webglOnly\n * @readonly\n * @since 3.11.0\n */\n isTinted: {\n\n get: function ()\n {\n return this._isTinted;\n }\n\n }\n\n};\n\nmodule.exports = Tint;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Build a JSON representation of the given Game Object.\r\n *\r\n * This is typically extended further by Game Object specific implementations.\r\n *\r\n * @method Phaser.GameObjects.Components.ToJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to export as JSON.\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\r\n */\r\nvar ToJSON = function (gameObject)\r\n{\r\n var out = {\r\n name: gameObject.name,\r\n type: gameObject.type,\r\n x: gameObject.x,\r\n y: gameObject.y,\r\n depth: gameObject.depth,\r\n scale: {\r\n x: gameObject.scaleX,\r\n y: gameObject.scaleY\r\n },\r\n origin: {\r\n x: gameObject.originX,\r\n y: gameObject.originY\r\n },\r\n flipX: gameObject.flipX,\r\n flipY: gameObject.flipY,\r\n rotation: gameObject.rotation,\r\n alpha: gameObject.alpha,\r\n visible: gameObject.visible,\r\n blendMode: gameObject.blendMode,\r\n textureKey: '',\r\n frameKey: '',\r\n data: {}\r\n };\r\n\r\n if (gameObject.texture)\r\n {\r\n out.textureKey = gameObject.texture.key;\r\n out.frameKey = gameObject.frame.name;\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = ToJSON;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar MATH_CONST = require('../../math/const');\nvar TransformMatrix = require('./TransformMatrix');\nvar TransformXY = require('../../math/TransformXY');\nvar WrapAngle = require('../../math/angle/Wrap');\nvar WrapAngleDegrees = require('../../math/angle/WrapDegrees');\nvar Vector2 = require('../../math/Vector2');\n\n// global bitmask flag for GameObject.renderMask (used by Scale)\nvar _FLAG = 4; // 0100\n\n/**\n * Provides methods used for getting and setting the position, scale and rotation of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.Transform\n * @since 3.0.0\n */\n\nvar Transform = {\n\n /**\n * Private internal value. Holds the horizontal scale value.\n *\n * @name Phaser.GameObjects.Components.Transform#_scaleX\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _scaleX: 1,\n\n /**\n * Private internal value. Holds the vertical scale value.\n *\n * @name Phaser.GameObjects.Components.Transform#_scaleY\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _scaleY: 1,\n\n /**\n * Private internal value. Holds the rotation value in radians.\n *\n * @name Phaser.GameObjects.Components.Transform#_rotation\n * @type {number}\n * @private\n * @default 0\n * @since 3.0.0\n */\n _rotation: 0,\n\n /**\n * The x position of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n x: 0,\n\n /**\n * The y position of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n y: 0,\n\n /**\n * The z position of this Game Object.\n *\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\n * {@link Phaser.GameObjects.Components.Depth#depth} instead.\n *\n * @name Phaser.GameObjects.Components.Transform#z\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n z: 0,\n\n /**\n * The w position of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#w\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n w: 0,\n\n /**\n * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object\n * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.\n *\n * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this\n * isn't the case, use the `scaleX` or `scaleY` properties instead.\n *\n * @name Phaser.GameObjects.Components.Transform#scale\n * @type {number}\n * @default 1\n * @since 3.18.0\n */\n scale: {\n\n get: function ()\n {\n return (this._scaleX + this._scaleY) / 2;\n },\n\n set: function (value)\n {\n this._scaleX = value;\n this._scaleY = value;\n\n if (value === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The horizontal scale of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#scaleX\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n scaleX: {\n\n get: function ()\n {\n return this._scaleX;\n },\n\n set: function (value)\n {\n this._scaleX = value;\n\n if (value === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The vertical scale of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#scaleY\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n scaleY: {\n\n get: function ()\n {\n return this._scaleY;\n },\n\n set: function (value)\n {\n this._scaleY = value;\n\n if (value === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The angle of this Game Object as expressed in degrees.\n *\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left\n * and -90 is up.\n *\n * If you prefer to work in radians, see the `rotation` property instead.\n *\n * @name Phaser.GameObjects.Components.Transform#angle\n * @type {integer}\n * @default 0\n * @since 3.0.0\n */\n angle: {\n\n get: function ()\n {\n return WrapAngleDegrees(this._rotation * MATH_CONST.RAD_TO_DEG);\n },\n\n set: function (value)\n {\n // value is in degrees\n this.rotation = WrapAngleDegrees(value) * MATH_CONST.DEG_TO_RAD;\n }\n },\n\n /**\n * The angle of this Game Object in radians.\n *\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left\n * and -PI/2 is up.\n *\n * If you prefer to work in degrees, see the `angle` property instead.\n *\n * @name Phaser.GameObjects.Components.Transform#rotation\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n rotation: {\n\n get: function ()\n {\n return this._rotation;\n },\n\n set: function (value)\n {\n // value is in radians\n this._rotation = WrapAngle(value);\n }\n },\n\n /**\n * Sets the position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setPosition\n * @since 3.0.0\n *\n * @param {number} [x=0] - The x position of this Game Object.\n * @param {number} [y=x] - The y position of this Game Object. If not set it will use the `x` value.\n * @param {number} [z=0] - The z position of this Game Object.\n * @param {number} [w=0] - The w position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setPosition: function (x, y, z, w)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = x; }\n if (z === undefined) { z = 0; }\n if (w === undefined) { w = 0; }\n\n this.x = x;\n this.y = y;\n this.z = z;\n this.w = w;\n\n return this;\n },\n\n /**\n * Sets the position of this Game Object to be a random position within the confines of\n * the given area.\n *\n * If no area is specified a random position between 0 x 0 and the game width x height is used instead.\n *\n * The position does not factor in the size of this Game Object, meaning that only the origin is\n * guaranteed to be within the area.\n *\n * @method Phaser.GameObjects.Components.Transform#setRandomPosition\n * @since 3.8.0\n *\n * @param {number} [x=0] - The x position of the top-left of the random area.\n * @param {number} [y=0] - The y position of the top-left of the random area.\n * @param {number} [width] - The width of the random area.\n * @param {number} [height] - The height of the random area.\n *\n * @return {this} This Game Object instance.\n */\n setRandomPosition: function (x, y, width, height)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n if (width === undefined) { width = this.scene.sys.scale.width; }\n if (height === undefined) { height = this.scene.sys.scale.height; }\n\n this.x = x + (Math.random() * width);\n this.y = y + (Math.random() * height);\n\n return this;\n },\n\n /**\n * Sets the rotation of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setRotation\n * @since 3.0.0\n *\n * @param {number} [radians=0] - The rotation of this Game Object, in radians.\n *\n * @return {this} This Game Object instance.\n */\n setRotation: function (radians)\n {\n if (radians === undefined) { radians = 0; }\n\n this.rotation = radians;\n\n return this;\n },\n\n /**\n * Sets the angle of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setAngle\n * @since 3.0.0\n *\n * @param {number} [degrees=0] - The rotation of this Game Object, in degrees.\n *\n * @return {this} This Game Object instance.\n */\n setAngle: function (degrees)\n {\n if (degrees === undefined) { degrees = 0; }\n\n this.angle = degrees;\n\n return this;\n },\n\n /**\n * Sets the scale of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setScale\n * @since 3.0.0\n *\n * @param {number} x - The horizontal scale of this Game Object.\n * @param {number} [y=x] - The vertical scale of this Game Object. If not set it will use the `x` value.\n *\n * @return {this} This Game Object instance.\n */\n setScale: function (x, y)\n {\n if (x === undefined) { x = 1; }\n if (y === undefined) { y = x; }\n\n this.scaleX = x;\n this.scaleY = y;\n\n return this;\n },\n\n /**\n * Sets the x position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setX\n * @since 3.0.0\n *\n * @param {number} [value=0] - The x position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setX: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.x = value;\n\n return this;\n },\n\n /**\n * Sets the y position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setY\n * @since 3.0.0\n *\n * @param {number} [value=0] - The y position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setY: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.y = value;\n\n return this;\n },\n\n /**\n * Sets the z position of this Game Object.\n *\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\n * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.\n *\n * @method Phaser.GameObjects.Components.Transform#setZ\n * @since 3.0.0\n *\n * @param {number} [value=0] - The z position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setZ: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.z = value;\n\n return this;\n },\n\n /**\n * Sets the w position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setW\n * @since 3.0.0\n *\n * @param {number} [value=0] - The w position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setW: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.w = value;\n\n return this;\n },\n\n /**\n * Gets the local transform matrix for this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#getLocalTransformMatrix\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\n *\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\n */\n getLocalTransformMatrix: function (tempMatrix)\n {\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\n\n return tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\n },\n\n /**\n * Gets the world transform matrix for this Game Object, factoring in any parent Containers.\n *\n * @method Phaser.GameObjects.Components.Transform#getWorldTransformMatrix\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A temporary matrix to hold parent values during the calculations.\n *\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\n */\n getWorldTransformMatrix: function (tempMatrix, parentMatrix)\n {\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\n if (parentMatrix === undefined) { parentMatrix = new TransformMatrix(); }\n\n var parent = this.parentContainer;\n\n if (!parent)\n {\n return this.getLocalTransformMatrix(tempMatrix);\n }\n\n tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\n\n while (parent)\n {\n parentMatrix.applyITRS(parent.x, parent.y, parent._rotation, parent._scaleX, parent._scaleY);\n\n parentMatrix.multiply(tempMatrix, tempMatrix);\n\n parent = parent.parentContainer;\n }\n\n return tempMatrix;\n },\n\n /**\n * Takes the given `x` and `y` coordinates and converts them into local space for this\n * Game Object, taking into account parent and local transforms, and the Display Origin.\n *\n * The returned Vector2 contains the translated point in its properties.\n *\n * A Camera needs to be provided in order to handle modified scroll factors. If no\n * camera is specified, it will use the `main` camera from the Scene to which this\n * Game Object belongs.\n *\n * @method Phaser.GameObjects.Components.Transform#getLocalPoint\n * @since 3.50.0\n *\n * @param {number} x - The x position to translate.\n * @param {number} y - The y position to translate.\n * @param {Phaser.Math.Vector2} [point] - A Vector2, or point-like object, to store the results in.\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera which is being tested against. If not given will use the Scene default camera.\n *\n * @return {Phaser.Math.Vector2} The translated point.\n */\n getLocalPoint: function (x, y, point, camera)\n {\n if (!point) { point = new Vector2(); }\n if (!camera) { camera = this.scene.sys.cameras.main; }\n\n var csx = camera.scrollX;\n var csy = camera.scrollY;\n\n var px = x + (csx * this.scrollFactorX) - csx;\n var py = y + (csy * this.scrollFactorY) - csy;\n\n if (this.parentContainer)\n {\n this.getWorldTransformMatrix().applyInverse(px, py, point);\n }\n else\n {\n TransformXY(px, py, this.x, this.y, this.rotation, this.scaleX, this.scaleY, point);\n }\n\n // Normalize origin\n if (this._originComponent)\n {\n point.x += this._displayOriginX;\n point.y += this._displayOriginY;\n }\n\n return point;\n },\n\n /**\n * Gets the sum total rotation of all of this Game Objects parent Containers.\n *\n * The returned value is in radians and will be zero if this Game Object has no parent container.\n *\n * @method Phaser.GameObjects.Components.Transform#getParentRotation\n * @since 3.18.0\n *\n * @return {number} The sum total rotation, in radians, of all parent containers of this Game Object.\n */\n getParentRotation: function ()\n {\n var rotation = 0;\n\n var parent = this.parentContainer;\n\n while (parent)\n {\n rotation += parent.rotation;\n\n parent = parent.parentContainer;\n }\n\n return rotation;\n }\n\n};\n\nmodule.exports = Transform;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar MATH_CONST = require('../../math/const');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * A Matrix used for display transformations for rendering.\r\n *\r\n * It is represented like so:\r\n *\r\n * ```\r\n * | a | c | tx |\r\n * | b | d | ty |\r\n * | 0 | 0 | 1 |\r\n * ```\r\n *\r\n * @class TransformMatrix\r\n * @memberof Phaser.GameObjects.Components\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [a=1] - The Scale X value.\r\n * @param {number} [b=0] - The Skew Y value.\r\n * @param {number} [c=0] - The Skew X value.\r\n * @param {number} [d=1] - The Scale Y value.\r\n * @param {number} [tx=0] - The Translate X value.\r\n * @param {number} [ty=0] - The Translate Y value.\r\n */\r\nvar TransformMatrix = new Class({\r\n\r\n initialize:\r\n\r\n function TransformMatrix (a, b, c, d, tx, ty)\r\n {\r\n if (a === undefined) { a = 1; }\r\n if (b === undefined) { b = 0; }\r\n if (c === undefined) { c = 0; }\r\n if (d === undefined) { d = 1; }\r\n if (tx === undefined) { tx = 0; }\r\n if (ty === undefined) { ty = 0; }\r\n\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#matrix\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.matrix = new Float32Array([ a, b, c, d, tx, ty, 0, 0, 1 ]);\r\n\r\n /**\r\n * The decomposed matrix.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#decomposedMatrix\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.decomposedMatrix = {\r\n translateX: 0,\r\n translateY: 0,\r\n scaleX: 1,\r\n scaleY: 1,\r\n rotation: 0\r\n };\r\n },\r\n\r\n /**\r\n * The Scale X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#a\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n a: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[0];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[0] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Skew Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#b\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n b: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[1];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[1] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Skew X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#c\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n c: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[2];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[2] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Scale Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#d\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n d: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[3];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[3] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#e\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n e: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#f\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n f: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#tx\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n tx: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#ty\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n ty: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Matrix. Value is in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#rotation\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return Math.acos(this.a / this.scaleX) * ((Math.atan(-this.c / this.a) < 0) ? -1 : 1);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Matrix, normalized to be within the Phaser right-handed\r\n * clockwise rotation space. Value is in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#rotationNormalized\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n rotationNormalized: {\r\n\r\n get: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n if (a || b)\r\n {\r\n // var r = Math.sqrt(a * a + b * b);\r\n \r\n return (b > 0) ? Math.acos(a / this.scaleX) : -Math.acos(a / this.scaleX);\r\n }\r\n else if (c || d)\r\n {\r\n // var s = Math.sqrt(c * c + d * d);\r\n \r\n return MATH_CONST.TAU - ((d > 0) ? Math.acos(-c / this.scaleY) : -Math.acos(c / this.scaleY));\r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The decomposed horizontal scale of the Matrix. This value is always positive.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleX\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt((this.a * this.a) + (this.b * this.b));\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The decomposed vertical scale of the Matrix. This value is always positive.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleY\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt((this.c * this.c) + (this.d * this.d));\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Reset the Matrix to an identity matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#loadIdentity\r\n * @since 3.0.0\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n loadIdentity: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = 1;\r\n matrix[1] = 0;\r\n matrix[2] = 0;\r\n matrix[3] = 1;\r\n matrix[4] = 0;\r\n matrix[5] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#translate\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation value.\r\n * @param {number} y - The vertical translation value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n translate: function (x, y)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[4] = matrix[0] * x + matrix[2] * y + matrix[4];\r\n matrix[5] = matrix[1] * x + matrix[3] * y + matrix[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scale value.\r\n * @param {number} y - The vertical scale value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n scale: function (x, y)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] *= x;\r\n matrix[1] *= x;\r\n matrix[2] *= y;\r\n matrix[3] *= y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n rotate: function (angle)\r\n {\r\n var sin = Math.sin(angle);\r\n var cos = Math.cos(angle);\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n matrix[0] = a * cos + c * sin;\r\n matrix[1] = b * cos + d * sin;\r\n matrix[2] = a * -sin + c * cos;\r\n matrix[3] = b * -sin + d * cos;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n * \r\n * If an `out` Matrix is given then the results will be stored in it.\r\n * If it is not given, this matrix will be updated in place instead.\r\n * Use an `out` Matrix if you do not wish to mutate this matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in.\r\n *\r\n * @return {(this|Phaser.GameObjects.Components.TransformMatrix)} Either this TransformMatrix, or the `out` Matrix, if given in the arguments.\r\n */\r\n multiply: function (rhs, out)\r\n {\r\n var matrix = this.matrix;\r\n var source = rhs.matrix;\r\n\r\n var localA = matrix[0];\r\n var localB = matrix[1];\r\n var localC = matrix[2];\r\n var localD = matrix[3];\r\n var localE = matrix[4];\r\n var localF = matrix[5];\r\n\r\n var sourceA = source[0];\r\n var sourceB = source[1];\r\n var sourceC = source[2];\r\n var sourceD = source[3];\r\n var sourceE = source[4];\r\n var sourceF = source[5];\r\n\r\n var destinationMatrix = (out === undefined) ? this : out;\r\n\r\n destinationMatrix.a = (sourceA * localA) + (sourceB * localC);\r\n destinationMatrix.b = (sourceA * localB) + (sourceB * localD);\r\n destinationMatrix.c = (sourceC * localA) + (sourceD * localC);\r\n destinationMatrix.d = (sourceC * localB) + (sourceD * localD);\r\n destinationMatrix.e = (sourceE * localA) + (sourceF * localC) + localE;\r\n destinationMatrix.f = (sourceE * localB) + (sourceF * localD) + localF;\r\n\r\n return destinationMatrix;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the matrix given, including the offset.\r\n * \r\n * The offsetX is added to the tx value: `offsetX * a + offsetY * c + tx`.\r\n * The offsetY is added to the ty value: `offsetY * b + offsetY * d + ty`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#multiplyWithOffset\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\r\n * @param {number} offsetX - Horizontal offset to factor in to the multiplication.\r\n * @param {number} offsetY - Vertical offset to factor in to the multiplication.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n multiplyWithOffset: function (src, offsetX, offsetY)\r\n {\r\n var matrix = this.matrix;\r\n var otherMatrix = src.matrix;\r\n\r\n var a0 = matrix[0];\r\n var b0 = matrix[1];\r\n var c0 = matrix[2];\r\n var d0 = matrix[3];\r\n var tx0 = matrix[4];\r\n var ty0 = matrix[5];\r\n\r\n var pse = offsetX * a0 + offsetY * c0 + tx0;\r\n var psf = offsetX * b0 + offsetY * d0 + ty0;\r\n\r\n var a1 = otherMatrix[0];\r\n var b1 = otherMatrix[1];\r\n var c1 = otherMatrix[2];\r\n var d1 = otherMatrix[3];\r\n var tx1 = otherMatrix[4];\r\n var ty1 = otherMatrix[5];\r\n\r\n matrix[0] = a1 * a0 + b1 * c0;\r\n matrix[1] = a1 * b0 + b1 * d0;\r\n matrix[2] = c1 * a0 + d1 * c0;\r\n matrix[3] = c1 * b0 + d1 * d0;\r\n matrix[4] = tx1 * a0 + ty1 * c0 + pse;\r\n matrix[5] = tx1 * b0 + ty1 * d0 + psf;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#transform\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The Scale X value.\r\n * @param {number} b - The Shear Y value.\r\n * @param {number} c - The Shear X value.\r\n * @param {number} d - The Scale Y value.\r\n * @param {number} tx - The Translate X value.\r\n * @param {number} ty - The Translate Y value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n transform: function (a, b, c, d, tx, ty)\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a0 = matrix[0];\r\n var b0 = matrix[1];\r\n var c0 = matrix[2];\r\n var d0 = matrix[3];\r\n var tx0 = matrix[4];\r\n var ty0 = matrix[5];\r\n\r\n matrix[0] = a * a0 + b * c0;\r\n matrix[1] = a * b0 + b * d0;\r\n matrix[2] = c * a0 + d * c0;\r\n matrix[3] = c * b0 + d * d0;\r\n matrix[4] = tx * a0 + ty * c0 + tx0;\r\n matrix[5] = tx * b0 + ty * d0 + ty0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform a point using this Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#transformPoint\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the point to transform.\r\n * @param {number} y - The y coordinate of the point to transform.\r\n * @param {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} point - The Point object to store the transformed coordinates.\r\n *\r\n * @return {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} The Point containing the transformed coordinates.\r\n */\r\n transformPoint: function (x, y, point)\r\n {\r\n if (point === undefined) { point = { x: 0, y: 0 }; }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n point.x = x * a + y * c + tx;\r\n point.y = x * b + y * d + ty;\r\n\r\n return point;\r\n },\r\n\r\n /**\r\n * Invert the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#invert\r\n * @since 3.0.0\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n invert: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n var n = a * d - b * c;\r\n\r\n matrix[0] = d / n;\r\n matrix[1] = -b / n;\r\n matrix[2] = -c / n;\r\n matrix[3] = a / n;\r\n matrix[4] = (c * ty - d * tx) / n;\r\n matrix[5] = -(a * ty - b * tx) / n;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix to copy those of the matrix given.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFrom\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n copyFrom: function (src)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = src.a;\r\n matrix[1] = src.b;\r\n matrix[2] = src.c;\r\n matrix[3] = src.d;\r\n matrix[4] = src.e;\r\n matrix[5] = src.f;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix to copy those of the array given.\r\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFromArray\r\n * @since 3.11.0\r\n *\r\n * @param {array} src - The array of values to set into this matrix.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n copyFromArray: function (src)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = src[0];\r\n matrix[1] = src[1];\r\n matrix[2] = src[2];\r\n matrix[3] = src[3];\r\n matrix[4] = src[4];\r\n matrix[5] = src[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values from this Matrix to the given Canvas Rendering Context.\r\n * This will use the Context.transform method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToContext\r\n * @since 3.12.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\r\n */\r\n copyToContext: function (ctx)\r\n {\r\n var matrix = this.matrix;\r\n\r\n ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n return ctx;\r\n },\r\n\r\n /**\r\n * Copy the values from this Matrix to the given Canvas Rendering Context.\r\n * This will use the Context.setTransform method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setToContext\r\n * @since 3.12.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\r\n */\r\n setToContext: function (ctx)\r\n {\r\n var matrix = this.matrix;\r\n\r\n ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n return ctx;\r\n },\r\n\r\n /**\r\n * Copy the values in this Matrix to the array given.\r\n * \r\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToArray\r\n * @since 3.12.0\r\n *\r\n * @param {array} [out] - The array to copy the matrix values in to.\r\n *\r\n * @return {array} An array where elements 0 to 5 contain the values from this matrix.\r\n */\r\n copyToArray: function (out)\r\n {\r\n var matrix = this.matrix;\r\n\r\n if (out === undefined)\r\n {\r\n out = [ matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5] ];\r\n }\r\n else\r\n {\r\n out[0] = matrix[0];\r\n out[1] = matrix[1];\r\n out[2] = matrix[2];\r\n out[3] = matrix[3];\r\n out[4] = matrix[4];\r\n out[5] = matrix[5];\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setTransform\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The Scale X value.\r\n * @param {number} b - The Shear Y value.\r\n * @param {number} c - The Shear X value.\r\n * @param {number} d - The Scale Y value.\r\n * @param {number} tx - The Translate X value.\r\n * @param {number} ty - The Translate Y value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n setTransform: function (a, b, c, d, tx, ty)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = a;\r\n matrix[1] = b;\r\n matrix[2] = c;\r\n matrix[3] = d;\r\n matrix[4] = tx;\r\n matrix[5] = ty;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Decompose this Matrix into its translation, scale and rotation values using QR decomposition.\r\n * \r\n * The result must be applied in the following order to reproduce the current matrix:\r\n * \r\n * translate -> rotate -> scale\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#decomposeMatrix\r\n * @since 3.0.0\r\n *\r\n * @return {object} The decomposed Matrix.\r\n */\r\n decomposeMatrix: function ()\r\n {\r\n var decomposedMatrix = this.decomposedMatrix;\r\n\r\n var matrix = this.matrix;\r\n\r\n // a = scale X (1)\r\n // b = shear Y (0)\r\n // c = shear X (0)\r\n // d = scale Y (1)\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n var determ = a * d - b * c;\r\n\r\n decomposedMatrix.translateX = matrix[4];\r\n decomposedMatrix.translateY = matrix[5];\r\n\r\n if (a || b)\r\n {\r\n var r = Math.sqrt(a * a + b * b);\r\n\r\n decomposedMatrix.rotation = (b > 0) ? Math.acos(a / r) : -Math.acos(a / r);\r\n decomposedMatrix.scaleX = r;\r\n decomposedMatrix.scaleY = determ / r;\r\n }\r\n else if (c || d)\r\n {\r\n var s = Math.sqrt(c * c + d * d);\r\n\r\n decomposedMatrix.rotation = Math.PI * 0.5 - (d > 0 ? Math.acos(-c / s) : -Math.acos(c / s));\r\n decomposedMatrix.scaleX = determ / s;\r\n decomposedMatrix.scaleY = s;\r\n }\r\n else\r\n {\r\n decomposedMatrix.rotation = 0;\r\n decomposedMatrix.scaleX = 0;\r\n decomposedMatrix.scaleY = 0;\r\n }\r\n\r\n return decomposedMatrix;\r\n },\r\n\r\n /**\r\n * Apply the identity, translate, rotate and scale operations on the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#applyITRS\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation.\r\n * @param {number} y - The vertical translation.\r\n * @param {number} rotation - The angle of rotation in radians.\r\n * @param {number} scaleX - The horizontal scale.\r\n * @param {number} scaleY - The vertical scale.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n applyITRS: function (x, y, rotation, scaleX, scaleY)\r\n {\r\n var matrix = this.matrix;\r\n\r\n var radianSin = Math.sin(rotation);\r\n var radianCos = Math.cos(rotation);\r\n\r\n // Translate\r\n matrix[4] = x;\r\n matrix[5] = y;\r\n\r\n // Rotate and Scale\r\n matrix[0] = radianCos * scaleX;\r\n matrix[1] = radianSin * scaleX;\r\n matrix[2] = -radianSin * scaleY;\r\n matrix[3] = radianCos * scaleY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes the `x` and `y` values and returns a new position in the `output` vector that is the inverse of\r\n * the current matrix with its transformation applied.\r\n * \r\n * Can be used to translate points from world to local space.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#applyInverse\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - The x position to translate.\r\n * @param {number} y - The y position to translate.\r\n * @param {Phaser.Math.Vector2} [output] - A Vector2, or point-like object, to store the results in.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates, inverse-transformed through this matrix.\r\n */\r\n applyInverse: function (x, y, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n var id = 1 / ((a * d) + (c * -b));\r\n\r\n output.x = (d * id * x) + (-c * id * y) + (((ty * c) - (tx * d)) * id);\r\n output.y = (a * id * y) + (-b * id * x) + (((-ty * a) + (tx * b)) * id);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the X component of this matrix multiplied by the given values.\r\n * This is the same as `x * a + y * c + e`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getX\r\n * @since 3.12.0\r\n * \r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n *\r\n * @return {number} The calculated x value.\r\n */\r\n getX: function (x, y)\r\n {\r\n return x * this.a + y * this.c + this.e;\r\n },\r\n\r\n /**\r\n * Returns the Y component of this matrix multiplied by the given values.\r\n * This is the same as `x * b + y * d + f`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getY\r\n * @since 3.12.0\r\n * \r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n *\r\n * @return {number} The calculated y value.\r\n */\r\n getY: function (x, y)\r\n {\r\n return x * this.b + y * this.d + this.f;\r\n },\r\n\r\n /**\r\n * Returns the X component of this matrix multiplied by the given values.\r\n * \r\n * This is the same as `x * a + y * c + e`, optionally passing via `Math.round`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getXRound\r\n * @since 3.50.0\r\n * \r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {boolean} [round=false] - Math.round the resulting value?\r\n *\r\n * @return {number} The calculated x value.\r\n */\r\n getXRound: function (x, y, round)\r\n {\r\n var v = this.getX(x, y);\r\n\r\n if (round)\r\n {\r\n v = Math.round(v);\r\n }\r\n\r\n return v;\r\n },\r\n\r\n /**\r\n * Returns the Y component of this matrix multiplied by the given values.\r\n * \r\n * This is the same as `x * b + y * d + f`, optionally passing via `Math.round`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getYRound\r\n * @since 3.50.0\r\n * \r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {boolean} [round=false] - Math.round the resulting value?\r\n *\r\n * @return {number} The calculated y value.\r\n */\r\n getYRound: function (x, y, round)\r\n {\r\n var v = this.getY(x, y);\r\n\r\n if (round)\r\n {\r\n v = Math.round(v);\r\n }\r\n\r\n return v;\r\n },\r\n\r\n /**\r\n * Returns a string that can be used in a CSS Transform call as a `matrix` property.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getCSSMatrix\r\n * @since 3.12.0\r\n *\r\n * @return {string} A string containing the CSS Transform matrix values.\r\n */\r\n getCSSMatrix: function ()\r\n {\r\n var m = this.matrix;\r\n\r\n return 'matrix(' + m[0] + ',' + m[1] + ',' + m[2] + ',' + m[3] + ',' + m[4] + ',' + m[5] + ')';\r\n },\r\n\r\n /**\r\n * Destroys this Transform Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#destroy\r\n * @since 3.4.0\r\n */\r\n destroy: function ()\r\n {\r\n this.matrix = null;\r\n this.decomposedMatrix = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TransformMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 1; // 0001\r\n\r\n/**\r\n * Provides methods used for setting the visibility of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Visible\r\n * @since 3.0.0\r\n */\r\n\r\nvar Visible = {\r\n\r\n /**\r\n * Private internal value. Holds the visible value.\r\n * \r\n * @name Phaser.GameObjects.Components.Visible#_visible\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n _visible: true,\r\n\r\n /**\r\n * The visible state of the Game Object.\r\n * \r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n * \r\n * @name Phaser.GameObjects.Components.Visible#visible\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n visible: {\r\n\r\n get: function ()\r\n {\r\n return this._visible;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value)\r\n {\r\n this._visible = true;\r\n this.renderFlags |= _FLAG;\r\n }\r\n else\r\n {\r\n this._visible = false;\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the visibility of this Game Object.\r\n * \r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n *\r\n * @method Phaser.GameObjects.Components.Visible#setVisible\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The visible state of the Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setVisible: function (value)\r\n {\r\n this.visible = value;\r\n\r\n return this;\r\n }\r\n};\r\n\r\nmodule.exports = Visible;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.GameObjects.Components\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Alpha: require('./Alpha'),\r\n AlphaSingle: require('./AlphaSingle'),\r\n Animation: require('./Animation'),\r\n BlendMode: require('./BlendMode'),\r\n ComputedSize: require('./ComputedSize'),\r\n Crop: require('./Crop'),\r\n Depth: require('./Depth'),\r\n Flip: require('./Flip'),\r\n GetBounds: require('./GetBounds'),\r\n Mask: require('./Mask'),\r\n Origin: require('./Origin'),\r\n PathFollower: require('./PathFollower'),\r\n Pipeline: require('./Pipeline'),\r\n ScrollFactor: require('./ScrollFactor'),\r\n Size: require('./Size'),\r\n Texture: require('./Texture'),\r\n TextureCrop: require('./TextureCrop'),\r\n Tint: require('./Tint'),\r\n ToJSON: require('./ToJSON'),\r\n Transform: require('./Transform'),\r\n TransformMatrix: require('./TransformMatrix'),\r\n Visible: require('./Visible')\r\n\r\n};\r\n","/**\n * @author Richard Davey \n * @author Felipe Alfonso <@bitnenfer>\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar ArrayUtils = require('../../utils/array');\nvar BlendModes = require('../../renderer/BlendModes');\nvar Class = require('../../utils/Class');\nvar Components = require('../components');\nvar Events = require('../events');\nvar GameObject = require('../GameObject');\nvar GameObjectEvents = require('../events');\nvar Rectangle = require('../../geom/rectangle/Rectangle');\nvar Render = require('./ContainerRender');\nvar Union = require('../../geom/rectangle/Union');\nvar Vector2 = require('../../math/Vector2');\n\n/**\n * @classdesc\n * A Container Game Object.\n *\n * A Container, as the name implies, can 'contain' other types of Game Object.\n * When a Game Object is added to a Container, the Container becomes responsible for the rendering of it.\n * By default it will be removed from the Display List and instead added to the Containers own internal list.\n *\n * The position of the Game Object automatically becomes relative to the position of the Container.\n *\n * The origin of a Container is 0x0 (in local space) and that cannot be changed. The children you add to the\n * Container should be positioned with this value in mind. I.e. you should treat 0x0 as being the center of\n * the Container, and position children positively and negative around it as required.\n *\n * When the Container is rendered, all of its children are rendered as well, in the order in which they exist\n * within the Container. Container children can be repositioned using methods such as `MoveUp`, `MoveDown` and `SendToBack`.\n *\n * If you modify a transform property of the Container, such as `Container.x` or `Container.rotation` then it will\n * automatically influence all children as well.\n *\n * Containers can include other Containers for deeply nested transforms.\n *\n * Containers can have masks set on them and can be used as a mask too. However, Container children cannot be masked.\n * The masks do not 'stack up'. Only a Container on the root of the display list will use its mask.\n *\n * Containers can be enabled for input. Because they do not have a texture you need to provide a shape for them\n * to use as their hit area. Container children can also be enabled for input, independent of the Container.\n *\n * Containers can be given a physics body for either Arcade Physics, Impact Physics or Matter Physics. However,\n * if Container _children_ are enabled for physics you may get unexpected results, such as offset bodies,\n * if the Container itself, or any of its ancestors, is positioned anywhere other than at 0 x 0. Container children\n * with physics do not factor in the Container due to the excessive extra calculations needed. Please structure\n * your game to work around this.\n *\n * It's important to understand the impact of using Containers. They add additional processing overhead into\n * every one of their children. The deeper you nest them, the more the cost escalates. This is especially true\n * for input events. You also loose the ability to set the display depth of Container children in the same\n * flexible manner as those not within them. In short, don't use them for the sake of it. You pay a small cost\n * every time you create one, try to structure your game around avoiding that where possible.\n *\n * @class Container\n * @extends Phaser.GameObjects.GameObject\n * @memberof Phaser.GameObjects\n * @constructor\n * @since 3.4.0\n *\n * @extends Phaser.GameObjects.Components.AlphaSingle\n * @extends Phaser.GameObjects.Components.BlendMode\n * @extends Phaser.GameObjects.Components.ComputedSize\n * @extends Phaser.GameObjects.Components.Depth\n * @extends Phaser.GameObjects.Components.Mask\n * @extends Phaser.GameObjects.Components.Transform\n * @extends Phaser.GameObjects.Components.Visible\n *\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\n * @param {Phaser.GameObjects.GameObject[]} [children] - An optional array of Game Objects to add to this Container.\n */\nvar Container = new Class({\n\n Extends: GameObject,\n\n Mixins: [\n Components.AlphaSingle,\n Components.BlendMode,\n Components.ComputedSize,\n Components.Depth,\n Components.Mask,\n Components.Transform,\n Components.Visible,\n Render\n ],\n\n initialize:\n\n function Container (scene, x, y, children)\n {\n GameObject.call(this, scene, 'Container');\n\n /**\n * An array holding the children of this Container.\n *\n * @name Phaser.GameObjects.Container#list\n * @type {Phaser.GameObjects.GameObject[]}\n * @since 3.4.0\n */\n this.list = [];\n\n /**\n * Does this Container exclusively manage its children?\n *\n * The default is `true` which means a child added to this Container cannot\n * belong in another Container, which includes the Scene display list.\n *\n * If you disable this then this Container will no longer exclusively manage its children.\n * This allows you to create all kinds of interesting graphical effects, such as replicating\n * Game Objects without reparenting them all over the Scene.\n * However, doing so will prevent children from receiving any kind of input event or have\n * their physics bodies work by default, as they're no longer a single entity on the\n * display list, but are being replicated where-ever this Container is.\n *\n * @name Phaser.GameObjects.Container#exclusive\n * @type {boolean}\n * @default true\n * @since 3.4.0\n */\n this.exclusive = true;\n\n /**\n * Containers can have an optional maximum size. If set to anything above 0 it\n * will constrict the addition of new Game Objects into the Container, capping off\n * the maximum limit the Container can grow in size to.\n *\n * @name Phaser.GameObjects.Container#maxSize\n * @type {integer}\n * @default -1\n * @since 3.4.0\n */\n this.maxSize = -1;\n\n /**\n * The cursor position.\n *\n * @name Phaser.GameObjects.Container#position\n * @type {integer}\n * @since 3.4.0\n */\n this.position = 0;\n\n /**\n * Internal Transform Matrix used for local space conversion.\n *\n * @name Phaser.GameObjects.Container#localTransform\n * @type {Phaser.GameObjects.Components.TransformMatrix}\n * @since 3.4.0\n */\n this.localTransform = new Components.TransformMatrix();\n\n /**\n * Internal temporary Transform Matrix used to avoid object creation.\n *\n * @name Phaser.GameObjects.Container#tempTransformMatrix\n * @type {Phaser.GameObjects.Components.TransformMatrix}\n * @private\n * @since 3.4.0\n */\n this.tempTransformMatrix = new Components.TransformMatrix();\n\n /**\n * A reference to the Scene Display List.\n *\n * @name Phaser.GameObjects.Container#_displayList\n * @type {Phaser.GameObjects.DisplayList}\n * @private\n * @since 3.4.0\n */\n this._displayList = scene.sys.displayList;\n\n /**\n * The property key to sort by.\n *\n * @name Phaser.GameObjects.Container#_sortKey\n * @type {string}\n * @private\n * @since 3.4.0\n */\n this._sortKey = '';\n\n /**\n * A reference to the Scene Systems Event Emitter.\n *\n * @name Phaser.GameObjects.Container#_sysEvents\n * @type {Phaser.Events.EventEmitter}\n * @private\n * @since 3.9.0\n */\n this._sysEvents = scene.sys.events;\n\n /**\n * The horizontal scroll factor of this Container.\n *\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\n *\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\n * It does not change the Containers actual position values.\n *\n * For a Container, setting this value will only update the Container itself, not its children.\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\n *\n * A value of 1 means it will move exactly in sync with a camera.\n * A value of 0 means it will not move at all, even if the camera moves.\n * Other values control the degree to which the camera movement is mapped to this Container.\n *\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\n * calculating physics collisions. Bodies always collide based on their world position, but changing\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\n * them from physics bodies if not accounted for in your code.\n *\n * @name Phaser.GameObjects.Container#scrollFactorX\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n this.scrollFactorX = 1;\n\n /**\n * The vertical scroll factor of this Container.\n *\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\n *\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\n * It does not change the Containers actual position values.\n *\n * For a Container, setting this value will only update the Container itself, not its children.\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\n *\n * A value of 1 means it will move exactly in sync with a camera.\n * A value of 0 means it will not move at all, even if the camera moves.\n * Other values control the degree to which the camera movement is mapped to this Container.\n *\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\n * calculating physics collisions. Bodies always collide based on their world position, but changing\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\n * them from physics bodies if not accounted for in your code.\n *\n * @name Phaser.GameObjects.Container#scrollFactorY\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n this.scrollFactorY = 1;\n\n this.setPosition(x, y);\n\n this.clearAlpha();\n\n this.setBlendMode(BlendModes.SKIP_CHECK);\n\n if (children)\n {\n this.add(children);\n }\n },\n\n /**\n * Internal value to allow Containers to be used for input and physics.\n * Do not change this value. It has no effect other than to break things.\n *\n * @name Phaser.GameObjects.Container#originX\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n originX: {\n\n get: function ()\n {\n return 0.5;\n }\n\n },\n\n /**\n * Internal value to allow Containers to be used for input and physics.\n * Do not change this value. It has no effect other than to break things.\n *\n * @name Phaser.GameObjects.Container#originY\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n originY: {\n\n get: function ()\n {\n return 0.5;\n }\n\n },\n\n /**\n * Internal value to allow Containers to be used for input and physics.\n * Do not change this value. It has no effect other than to break things.\n *\n * @name Phaser.GameObjects.Container#displayOriginX\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n displayOriginX: {\n\n get: function ()\n {\n return this.width * 0.5;\n }\n\n },\n\n /**\n * Internal value to allow Containers to be used for input and physics.\n * Do not change this value. It has no effect other than to break things.\n *\n * @name Phaser.GameObjects.Container#displayOriginY\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n displayOriginY: {\n\n get: function ()\n {\n return this.height * 0.5;\n }\n\n },\n\n /**\n * Does this Container exclusively manage its children?\n *\n * The default is `true` which means a child added to this Container cannot\n * belong in another Container, which includes the Scene display list.\n *\n * If you disable this then this Container will no longer exclusively manage its children.\n * This allows you to create all kinds of interesting graphical effects, such as replicating\n * Game Objects without reparenting them all over the Scene.\n * However, doing so will prevent children from receiving any kind of input event or have\n * their physics bodies work by default, as they're no longer a single entity on the\n * display list, but are being replicated where-ever this Container is.\n *\n * @method Phaser.GameObjects.Container#setExclusive\n * @since 3.4.0\n *\n * @param {boolean} [value=true] - The exclusive state of this Container.\n *\n * @return {this} This Container.\n */\n setExclusive: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.exclusive = value;\n\n return this;\n },\n\n /**\n * Gets the bounds of this Container. It works by iterating all children of the Container,\n * getting their respective bounds, and then working out a min-max rectangle from that.\n * It does not factor in if the children render or not, all are included.\n *\n * Some children are unable to return their bounds, such as Graphics objects, in which case\n * they are skipped.\n *\n * Depending on the quantity of children in this Container it could be a really expensive call,\n * so cache it and only poll it as needed.\n *\n * The values are stored and returned in a Rectangle object.\n *\n * @method Phaser.GameObjects.Container#getBounds\n * @since 3.4.0\n *\n * @param {Phaser.Geom.Rectangle} [output] - A Geom.Rectangle object to store the values in. If not provided a new Rectangle will be created.\n *\n * @return {Phaser.Geom.Rectangle} The values stored in the output object.\n */\n getBounds: function (output)\n {\n if (output === undefined) { output = new Rectangle(); }\n\n output.setTo(this.x, this.y, 0, 0);\n\n if (this.parentContainer)\n {\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\n var transformedPosition = parentMatrix.transformPoint(this.x, this.y);\n\n output.setTo(transformedPosition.x, transformedPosition.y, 0, 0);\n }\n\n if (this.list.length > 0)\n {\n var children = this.list;\n var tempRect = new Rectangle();\n var hasSetFirst = false;\n\n output.setEmpty();\n\n for (var i = 0; i < children.length; i++)\n {\n var entry = children[i];\n\n if (entry.getBounds)\n {\n entry.getBounds(tempRect);\n\n if (!hasSetFirst)\n {\n output.setTo(tempRect.x, tempRect.y, tempRect.width, tempRect.height);\n hasSetFirst = true;\n }\n else\n {\n Union(tempRect, output, output);\n }\n }\n }\n }\n\n return output;\n },\n\n /**\n * Internal add handler.\n *\n * @method Phaser.GameObjects.Container#addHandler\n * @private\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just added to this Container.\n */\n addHandler: function (gameObject)\n {\n gameObject.once(Events.DESTROY, this.remove, this);\n\n if (this.exclusive)\n {\n this._displayList.remove(gameObject);\n\n if (gameObject.parentContainer)\n {\n gameObject.parentContainer.remove(gameObject);\n }\n\n gameObject.parentContainer = this;\n }\n\n // Is only on the Display List via this Container\n if (!this.scene.sys.displayList.exists(gameObject))\n {\n gameObject.emit(GameObjectEvents.ADDED_TO_SCENE, gameObject, this.scene);\n }\n },\n\n /**\n * Internal remove handler.\n *\n * @method Phaser.GameObjects.Container#removeHandler\n * @private\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just removed from this Container.\n */\n removeHandler: function (gameObject)\n {\n gameObject.off(Events.DESTROY, this.remove);\n\n if (this.exclusive)\n {\n gameObject.parentContainer = null;\n }\n\n // Is only on the Display List via this Container\n if (!this.scene.sys.displayList.exists(gameObject))\n {\n gameObject.emit(GameObjectEvents.REMOVED_FROM_SCENE, gameObject, this.scene);\n }\n },\n\n /**\n * Takes a Point-like object, such as a Vector2, Geom.Point or object with public x and y properties,\n * and transforms it into the space of this Container, then returns it in the output object.\n *\n * @method Phaser.GameObjects.Container#pointToContainer\n * @since 3.4.0\n *\n * @param {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} source - The Source Point to be transformed.\n * @param {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} [output] - A destination object to store the transformed point in. If none given a Vector2 will be created and returned.\n *\n * @return {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} The transformed point.\n */\n pointToContainer: function (source, output)\n {\n if (output === undefined) { output = new Vector2(); }\n\n if (this.parentContainer)\n {\n this.parentContainer.pointToContainer(source, output);\n }\n else\n {\n output = new Vector2(source.x, source.y);\n }\n\n var tempMatrix = this.tempTransformMatrix;\n\n // No need to loadIdentity because applyITRS overwrites every value anyway\n tempMatrix.applyITRS(this.x, this.y, this.rotation, this.scaleX, this.scaleY);\n\n tempMatrix.invert();\n\n tempMatrix.transformPoint(source.x, source.y, output);\n\n return output;\n },\n\n /**\n * Returns the world transform matrix as used for Bounds checks.\n *\n * The returned matrix is temporal and shouldn't be stored.\n *\n * @method Phaser.GameObjects.Container#getBoundsTransformMatrix\n * @since 3.4.0\n *\n * @return {Phaser.GameObjects.Components.TransformMatrix} The world transform matrix.\n */\n getBoundsTransformMatrix: function ()\n {\n return this.getWorldTransformMatrix(this.tempTransformMatrix, this.localTransform);\n },\n\n /**\n * Adds the given Game Object, or array of Game Objects, to this Container.\n *\n * Each Game Object must be unique within the Container.\n *\n * @method Phaser.GameObjects.Container#add\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\n *\n * @return {this} This Container instance.\n */\n add: function (child)\n {\n ArrayUtils.Add(this.list, child, this.maxSize, this.addHandler, this);\n\n return this;\n },\n\n /**\n * Adds the given Game Object, or array of Game Objects, to this Container at the specified position.\n *\n * Existing Game Objects in the Container are shifted up.\n *\n * Each Game Object must be unique within the Container.\n *\n * @method Phaser.GameObjects.Container#addAt\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\n * @param {integer} [index=0] - The position to insert the Game Object/s at.\n *\n * @return {this} This Container instance.\n */\n addAt: function (child, index)\n {\n ArrayUtils.AddAt(this.list, child, index, this.maxSize, this.addHandler, this);\n\n return this;\n },\n\n /**\n * Returns the Game Object at the given position in this Container.\n *\n * @method Phaser.GameObjects.Container#getAt\n * @since 3.4.0\n *\n * @param {integer} index - The position to get the Game Object from.\n *\n * @return {?Phaser.GameObjects.GameObject} The Game Object at the specified index, or `null` if none found.\n */\n getAt: function (index)\n {\n return this.list[index];\n },\n\n /**\n * Returns the index of the given Game Object in this Container.\n *\n * @method Phaser.GameObjects.Container#getIndex\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container.\n *\n * @return {integer} The index of the Game Object in this Container, or -1 if not found.\n */\n getIndex: function (child)\n {\n return this.list.indexOf(child);\n },\n\n /**\n * Sort the contents of this Container so the items are in order based on the given property.\n * For example: `sort('alpha')` would sort the elements based on the value of their `alpha` property.\n *\n * @method Phaser.GameObjects.Container#sort\n * @since 3.4.0\n *\n * @param {string} property - The property to lexically sort by.\n * @param {function} [handler] - Provide your own custom handler function. Will receive 2 children which it should compare and return a boolean.\n *\n * @return {this} This Container instance.\n */\n sort: function (property, handler)\n {\n if (!property)\n {\n return this;\n }\n\n if (handler === undefined)\n {\n handler = function (childA, childB)\n {\n return childA[property] - childB[property];\n };\n }\n\n ArrayUtils.StableSort.inplace(this.list, handler);\n\n return this;\n },\n\n /**\n * Searches for the first instance of a child with its `name` property matching the given argument.\n * Should more than one child have the same name only the first is returned.\n *\n * @method Phaser.GameObjects.Container#getByName\n * @since 3.4.0\n *\n * @param {string} name - The name to search for.\n *\n * @return {?Phaser.GameObjects.GameObject} The first child with a matching name, or `null` if none were found.\n */\n getByName: function (name)\n {\n return ArrayUtils.GetFirst(this.list, 'name', name);\n },\n\n /**\n * Returns a random Game Object from this Container.\n *\n * @method Phaser.GameObjects.Container#getRandom\n * @since 3.4.0\n *\n * @param {integer} [startIndex=0] - An optional start index.\n * @param {integer} [length] - An optional length, the total number of elements (from the startIndex) to choose from.\n *\n * @return {?Phaser.GameObjects.GameObject} A random child from the Container, or `null` if the Container is empty.\n */\n getRandom: function (startIndex, length)\n {\n return ArrayUtils.GetRandom(this.list, startIndex, length);\n },\n\n /**\n * Gets the first Game Object in this Container.\n *\n * You can also specify a property and value to search for, in which case it will return the first\n * Game Object in this Container with a matching property and / or value.\n *\n * For example: `getFirst('visible', true)` would return the first Game Object that had its `visible` property set.\n *\n * You can limit the search to the `startIndex` - `endIndex` range.\n *\n * @method Phaser.GameObjects.Container#getFirst\n * @since 3.4.0\n *\n * @param {string} property - The property to test on each Game Object in the Container.\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\n * @param {integer} [startIndex=0] - An optional start index to search from.\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\n *\n * @return {?Phaser.GameObjects.GameObject} The first matching Game Object, or `null` if none was found.\n */\n getFirst: function (property, value, startIndex, endIndex)\n {\n return ArrayUtils.GetFirst(this.list, property, value, startIndex, endIndex);\n },\n\n /**\n * Returns all Game Objects in this Container.\n *\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\n *\n * For example: `getAll('body')` would return only Game Objects that have a body property.\n *\n * You can also specify a value to compare the property to:\n *\n * `getAll('visible', true)` would return only Game Objects that have their visible property set to `true`.\n *\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\n * the first 50 Game Objects.\n *\n * @method Phaser.GameObjects.Container#getAll\n * @since 3.4.0\n *\n * @param {string} [property] - The property to test on each Game Object in the Container.\n * @param {any} [value] - If property is set then the `property` must strictly equal this value to be included in the results.\n * @param {integer} [startIndex=0] - An optional start index to search from.\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\n *\n * @return {Phaser.GameObjects.GameObject[]} An array of matching Game Objects from this Container.\n */\n getAll: function (property, value, startIndex, endIndex)\n {\n return ArrayUtils.GetAll(this.list, property, value, startIndex, endIndex);\n },\n\n /**\n * Returns the total number of Game Objects in this Container that have a property\n * matching the given value.\n *\n * For example: `count('visible', true)` would count all the elements that have their visible property set.\n *\n * You can optionally limit the operation to the `startIndex` - `endIndex` range.\n *\n * @method Phaser.GameObjects.Container#count\n * @since 3.4.0\n *\n * @param {string} property - The property to check.\n * @param {any} value - The value to check.\n * @param {integer} [startIndex=0] - An optional start index to search from.\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\n *\n * @return {integer} The total number of Game Objects in this Container with a property matching the given value.\n */\n count: function (property, value, startIndex, endIndex)\n {\n return ArrayUtils.CountAllMatching(this.list, property, value, startIndex, endIndex);\n },\n\n /**\n * Swaps the position of two Game Objects in this Container.\n * Both Game Objects must belong to this Container.\n *\n * @method Phaser.GameObjects.Container#swap\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child1 - The first Game Object to swap.\n * @param {Phaser.GameObjects.GameObject} child2 - The second Game Object to swap.\n *\n * @return {this} This Container instance.\n */\n swap: function (child1, child2)\n {\n ArrayUtils.Swap(this.list, child1, child2);\n\n return this;\n },\n\n /**\n * Moves a Game Object to a new position within this Container.\n *\n * The Game Object must already be a child of this Container.\n *\n * The Game Object is removed from its old position and inserted into the new one.\n * Therefore the Container size does not change. Other children will change position accordingly.\n *\n * @method Phaser.GameObjects.Container#moveTo\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to move.\n * @param {integer} index - The new position of the Game Object in this Container.\n *\n * @return {this} This Container instance.\n */\n moveTo: function (child, index)\n {\n ArrayUtils.MoveTo(this.list, child, index);\n\n return this;\n },\n\n /**\n * Removes the given Game Object, or array of Game Objects, from this Container.\n *\n * The Game Objects must already be children of this Container.\n *\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\n *\n * @method Phaser.GameObjects.Container#remove\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to be removed from the Container.\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each child successfully removed from this Container.\n *\n * @return {this} This Container instance.\n */\n remove: function (child, destroyChild)\n {\n var removed = ArrayUtils.Remove(this.list, child, this.removeHandler, this);\n\n if (destroyChild && removed)\n {\n if (!Array.isArray(removed))\n {\n removed = [ removed ];\n }\n\n for (var i = 0; i < removed.length; i++)\n {\n removed[i].destroy();\n }\n }\n\n return this;\n },\n\n /**\n * Removes the Game Object at the given position in this Container.\n *\n * You can also optionally call `destroy` on the Game Object, if one is found.\n *\n * @method Phaser.GameObjects.Container#removeAt\n * @since 3.4.0\n *\n * @param {integer} index - The index of the Game Object to be removed.\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\n *\n * @return {this} This Container instance.\n */\n removeAt: function (index, destroyChild)\n {\n var removed = ArrayUtils.RemoveAt(this.list, index, this.removeHandler, this);\n\n if (destroyChild && removed)\n {\n removed.destroy();\n }\n\n return this;\n },\n\n /**\n * Removes the Game Objects between the given positions in this Container.\n *\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\n *\n * @method Phaser.GameObjects.Container#removeBetween\n * @since 3.4.0\n *\n * @param {integer} [startIndex=0] - An optional start index to search from.\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\n *\n * @return {this} This Container instance.\n */\n removeBetween: function (startIndex, endIndex, destroyChild)\n {\n var removed = ArrayUtils.RemoveBetween(this.list, startIndex, endIndex, this.removeHandler, this);\n\n if (destroyChild)\n {\n for (var i = 0; i < removed.length; i++)\n {\n removed[i].destroy();\n }\n }\n\n return this;\n },\n\n /**\n * Removes all Game Objects from this Container.\n *\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\n *\n * @method Phaser.GameObjects.Container#removeAll\n * @since 3.4.0\n *\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\n *\n * @return {this} This Container instance.\n */\n removeAll: function (destroyChild)\n {\n var removed = ArrayUtils.RemoveBetween(this.list, 0, this.list.length, this.removeHandler, this);\n\n if (destroyChild)\n {\n for (var i = 0; i < removed.length; i++)\n {\n removed[i].destroy();\n }\n }\n\n return this;\n },\n\n /**\n * Brings the given Game Object to the top of this Container.\n * This will cause it to render on-top of any other objects in the Container.\n *\n * @method Phaser.GameObjects.Container#bringToTop\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to bring to the top of the Container.\n *\n * @return {this} This Container instance.\n */\n bringToTop: function (child)\n {\n ArrayUtils.BringToTop(this.list, child);\n\n return this;\n },\n\n /**\n * Sends the given Game Object to the bottom of this Container.\n * This will cause it to render below any other objects in the Container.\n *\n * @method Phaser.GameObjects.Container#sendToBack\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to send to the bottom of the Container.\n *\n * @return {this} This Container instance.\n */\n sendToBack: function (child)\n {\n ArrayUtils.SendToBack(this.list, child);\n\n return this;\n },\n\n /**\n * Moves the given Game Object up one place in this Container, unless it's already at the top.\n *\n * @method Phaser.GameObjects.Container#moveUp\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\n *\n * @return {this} This Container instance.\n */\n moveUp: function (child)\n {\n ArrayUtils.MoveUp(this.list, child);\n\n return this;\n },\n\n /**\n * Moves the given Game Object down one place in this Container, unless it's already at the bottom.\n *\n * @method Phaser.GameObjects.Container#moveDown\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\n *\n * @return {this} This Container instance.\n */\n moveDown: function (child)\n {\n ArrayUtils.MoveDown(this.list, child);\n\n return this;\n },\n\n /**\n * Reverses the order of all Game Objects in this Container.\n *\n * @method Phaser.GameObjects.Container#reverse\n * @since 3.4.0\n *\n * @return {this} This Container instance.\n */\n reverse: function ()\n {\n this.list.reverse();\n\n return this;\n },\n\n /**\n * Shuffles the all Game Objects in this Container using the Fisher-Yates implementation.\n *\n * @method Phaser.GameObjects.Container#shuffle\n * @since 3.4.0\n *\n * @return {this} This Container instance.\n */\n shuffle: function ()\n {\n ArrayUtils.Shuffle(this.list);\n\n return this;\n },\n\n /**\n * Replaces a Game Object in this Container with the new Game Object.\n * The new Game Object cannot already be a child of this Container.\n *\n * @method Phaser.GameObjects.Container#replace\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} oldChild - The Game Object in this Container that will be replaced.\n * @param {Phaser.GameObjects.GameObject} newChild - The Game Object to be added to this Container.\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\n *\n * @return {this} This Container instance.\n */\n replace: function (oldChild, newChild, destroyChild)\n {\n var moved = ArrayUtils.Replace(this.list, oldChild, newChild);\n\n if (moved)\n {\n this.addHandler(newChild);\n this.removeHandler(oldChild);\n\n if (destroyChild)\n {\n oldChild.destroy();\n }\n }\n\n return this;\n },\n\n /**\n * Returns `true` if the given Game Object is a direct child of this Container.\n *\n * This check does not scan nested Containers.\n *\n * @method Phaser.GameObjects.Container#exists\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to check for within this Container.\n *\n * @return {boolean} True if the Game Object is an immediate child of this Container, otherwise false.\n */\n exists: function (child)\n {\n return (this.list.indexOf(child) > -1);\n },\n\n /**\n * Sets the property to the given value on all Game Objects in this Container.\n *\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\n * the first 50 Game Objects.\n *\n * @method Phaser.GameObjects.Container#setAll\n * @since 3.4.0\n *\n * @param {string} property - The property that must exist on the Game Object.\n * @param {any} value - The value to get the property to.\n * @param {integer} [startIndex=0] - An optional start index to search from.\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\n *\n * @return {this} This Container instance.\n */\n setAll: function (property, value, startIndex, endIndex)\n {\n ArrayUtils.SetAll(this.list, property, value, startIndex, endIndex);\n\n return this;\n },\n\n /**\n * @callback EachContainerCallback\n * @generic I - [item]\n *\n * @param {*} item - The child Game Object of the Container.\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\n */\n\n /**\n * Passes all Game Objects in this Container to the given callback.\n *\n * A copy of the Container is made before passing each entry to your callback.\n * This protects against the callback itself modifying the Container.\n *\n * If you know for sure that the callback will not change the size of this Container\n * then you can use the more performant `Container.iterate` method instead.\n *\n * @method Phaser.GameObjects.Container#each\n * @since 3.4.0\n *\n * @param {function} callback - The function to call.\n * @param {object} [context] - Value to use as `this` when executing callback.\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\n *\n * @return {this} This Container instance.\n */\n each: function (callback, context)\n {\n var args = [ null ];\n var i;\n var temp = this.list.slice();\n var len = temp.length;\n\n for (i = 2; i < arguments.length; i++)\n {\n args.push(arguments[i]);\n }\n\n for (i = 0; i < len; i++)\n {\n args[0] = temp[i];\n\n callback.apply(context, args);\n }\n\n return this;\n },\n\n /**\n * Passes all Game Objects in this Container to the given callback.\n *\n * Only use this method when you absolutely know that the Container will not be modified during\n * the iteration, i.e. by removing or adding to its contents.\n *\n * @method Phaser.GameObjects.Container#iterate\n * @since 3.4.0\n *\n * @param {function} callback - The function to call.\n * @param {object} [context] - Value to use as `this` when executing callback.\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\n *\n * @return {this} This Container instance.\n */\n iterate: function (callback, context)\n {\n var args = [ null ];\n var i;\n\n for (i = 2; i < arguments.length; i++)\n {\n args.push(arguments[i]);\n }\n\n for (i = 0; i < this.list.length; i++)\n {\n args[0] = this.list[i];\n\n callback.apply(context, args);\n }\n\n return this;\n },\n\n /**\n * Sets the scroll factor of this Container and optionally all of its children.\n *\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\n *\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\n * It does not change the Game Objects actual position values.\n *\n * A value of 1 means it will move exactly in sync with a camera.\n * A value of 0 means it will not move at all, even if the camera moves.\n * Other values control the degree to which the camera movement is mapped to this Game Object.\n *\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\n * calculating physics collisions. Bodies always collide based on their world position, but changing\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\n * them from physics bodies if not accounted for in your code.\n *\n * @method Phaser.GameObjects.Container#setScrollFactor\n * @since 3.0.0\n *\n * @param {number} x - The horizontal scroll factor of this Game Object.\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\n * @param {boolean} [updateChildren=false] - Apply this scrollFactor to all Container children as well?\n *\n * @return {this} This Game Object instance.\n */\n setScrollFactor: function (x, y, updateChildren)\n {\n if (y === undefined) { y = x; }\n if (updateChildren === undefined) { updateChildren = false; }\n\n this.scrollFactorX = x;\n this.scrollFactorY = y;\n\n if (updateChildren)\n {\n ArrayUtils.SetAll(this.list, 'scrollFactorX', x);\n ArrayUtils.SetAll(this.list, 'scrollFactorY', y);\n }\n\n return this;\n },\n\n /**\n * The number of Game Objects inside this Container.\n *\n * @name Phaser.GameObjects.Container#length\n * @type {integer}\n * @readonly\n * @since 3.4.0\n */\n length: {\n\n get: function ()\n {\n return this.list.length;\n }\n\n },\n\n /**\n * Returns the first Game Object within the Container, or `null` if it is empty.\n *\n * You can move the cursor by calling `Container.next` and `Container.previous`.\n *\n * @name Phaser.GameObjects.Container#first\n * @type {?Phaser.GameObjects.GameObject}\n * @readonly\n * @since 3.4.0\n */\n first: {\n\n get: function ()\n {\n this.position = 0;\n\n if (this.list.length > 0)\n {\n return this.list[0];\n }\n else\n {\n return null;\n }\n }\n\n },\n\n /**\n * Returns the last Game Object within the Container, or `null` if it is empty.\n *\n * You can move the cursor by calling `Container.next` and `Container.previous`.\n *\n * @name Phaser.GameObjects.Container#last\n * @type {?Phaser.GameObjects.GameObject}\n * @readonly\n * @since 3.4.0\n */\n last: {\n\n get: function ()\n {\n if (this.list.length > 0)\n {\n this.position = this.list.length - 1;\n\n return this.list[this.position];\n }\n else\n {\n return null;\n }\n }\n\n },\n\n /**\n * Returns the next Game Object within the Container, or `null` if it is empty.\n *\n * You can move the cursor by calling `Container.next` and `Container.previous`.\n *\n * @name Phaser.GameObjects.Container#next\n * @type {?Phaser.GameObjects.GameObject}\n * @readonly\n * @since 3.4.0\n */\n next: {\n\n get: function ()\n {\n if (this.position < this.list.length)\n {\n this.position++;\n\n return this.list[this.position];\n }\n else\n {\n return null;\n }\n }\n\n },\n\n /**\n * Returns the previous Game Object within the Container, or `null` if it is empty.\n *\n * You can move the cursor by calling `Container.next` and `Container.previous`.\n *\n * @name Phaser.GameObjects.Container#previous\n * @type {?Phaser.GameObjects.GameObject}\n * @readonly\n * @since 3.4.0\n */\n previous: {\n\n get: function ()\n {\n if (this.position > 0)\n {\n this.position--;\n\n return this.list[this.position];\n }\n else\n {\n return null;\n }\n }\n\n },\n\n /**\n * Internal destroy handler, called as part of the destroy process.\n *\n * @method Phaser.GameObjects.Container#preDestroy\n * @protected\n * @since 3.9.0\n */\n preDestroy: function ()\n {\n this.removeAll(!!this.exclusive);\n\n this.localTransform.destroy();\n this.tempTransformMatrix.destroy();\n\n this.list = [];\n this._displayList = null;\n }\n\n});\n\nmodule.exports = Container;\n","/**\n * @author Richard Davey \n * @author Felipe Alfonso <@bitnenfer>\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Renders this Game Object with the Canvas Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method Phaser.GameObjects.Container#renderCanvas\n * @since 3.4.0\n * @private\n *\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar ContainerCanvasRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix)\n{\n var children = container.list;\n\n if (children.length === 0)\n {\n return;\n }\n\n var transformMatrix = container.localTransform;\n\n if (parentMatrix)\n {\n transformMatrix.loadIdentity();\n transformMatrix.multiply(parentMatrix);\n transformMatrix.translate(container.x, container.y);\n transformMatrix.rotate(container.rotation);\n transformMatrix.scale(container.scaleX, container.scaleY);\n }\n else\n {\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\n }\n\n var containerHasBlendMode = (container.blendMode !== -1);\n\n if (!containerHasBlendMode)\n {\n // If Container is SKIP_TEST then set blend mode to be Normal\n renderer.setBlendMode(0);\n }\n\n var alpha = container._alpha;\n var scrollFactorX = container.scrollFactorX;\n var scrollFactorY = container.scrollFactorY;\n\n if (container.mask)\n {\n container.mask.preRenderCanvas(renderer, null, camera);\n }\n\n for (var i = 0; i < children.length; i++)\n {\n var child = children[i];\n\n if (!child.willRender(camera))\n {\n continue;\n }\n\n var childAlpha = child.alpha;\n var childScrollFactorX = child.scrollFactorX;\n var childScrollFactorY = child.scrollFactorY;\n\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\n {\n // If Container doesn't have its own blend mode, then a child can have one\n renderer.setBlendMode(child.blendMode);\n }\n\n // Set parent values\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\n child.setAlpha(childAlpha * alpha);\n\n // Render\n child.renderCanvas(renderer, child, interpolationPercentage, camera, transformMatrix);\n\n // Restore original values\n child.setAlpha(childAlpha);\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\n }\n\n if (container.mask)\n {\n container.mask.postRenderCanvas(renderer);\n }\n};\n\nmodule.exports = ContainerCanvasRenderer;\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = require('../../utils/NOOP');\r\nvar renderCanvas = require('../../utils/NOOP');\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = require('./ContainerWebGLRenderer');\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = require('./ContainerCanvasRenderer');\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Container#renderWebGL\r\n * @since 3.4.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ContainerWebGLRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var children = container.list;\r\n\r\n if (children.length === 0)\r\n {\r\n return;\r\n }\r\n\r\n var transformMatrix = container.localTransform;\r\n \r\n if (parentMatrix)\r\n {\r\n transformMatrix.loadIdentity();\r\n transformMatrix.multiply(parentMatrix);\r\n transformMatrix.translate(container.x, container.y);\r\n transformMatrix.rotate(container.rotation);\r\n transformMatrix.scale(container.scaleX, container.scaleY);\r\n }\r\n else\r\n {\r\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\r\n }\r\n\r\n var containerHasBlendMode = (container.blendMode !== -1);\r\n\r\n if (!containerHasBlendMode)\r\n {\r\n // If Container is SKIP_TEST then set blend mode to be Normal\r\n renderer.setBlendMode(0);\r\n }\r\n\r\n var alpha = container.alpha;\r\n\r\n var scrollFactorX = container.scrollFactorX;\r\n var scrollFactorY = container.scrollFactorY;\r\n\r\n var list = children;\r\n var childCount = children.length;\r\n\r\n for (var i = 0; i < childCount; i++)\r\n {\r\n var child = children[i];\r\n\r\n if (!child.willRender(camera))\r\n {\r\n continue;\r\n }\r\n\r\n var childAlphaTopLeft;\r\n var childAlphaTopRight;\r\n var childAlphaBottomLeft;\r\n var childAlphaBottomRight;\r\n\r\n if (child.alphaTopLeft !== undefined)\r\n {\r\n childAlphaTopLeft = child.alphaTopLeft;\r\n childAlphaTopRight = child.alphaTopRight;\r\n childAlphaBottomLeft = child.alphaBottomLeft;\r\n childAlphaBottomRight = child.alphaBottomRight;\r\n }\r\n else\r\n {\r\n var childAlpha = child.alpha;\r\n\r\n childAlphaTopLeft = childAlpha;\r\n childAlphaTopRight = childAlpha;\r\n childAlphaBottomLeft = childAlpha;\r\n childAlphaBottomRight = childAlpha;\r\n }\r\n\r\n var childScrollFactorX = child.scrollFactorX;\r\n var childScrollFactorY = child.scrollFactorY;\r\n\r\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\r\n {\r\n // If Container doesn't have its own blend mode, then a child can have one\r\n renderer.setBlendMode(child.blendMode);\r\n }\r\n\r\n var mask = child.mask;\r\n\r\n if (mask)\r\n {\r\n mask.preRenderWebGL(renderer, child, camera);\r\n }\r\n\r\n var type = child.type;\r\n\r\n if (type !== renderer.currentType)\r\n {\r\n renderer.newType = true;\r\n renderer.currentType = type;\r\n }\r\n\r\n renderer.nextTypeMatch = (i < childCount - 1) ? (list[i + 1].type === renderer.currentType) : false;\r\n\r\n // Set parent values\r\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\r\n\r\n child.setAlpha(childAlphaTopLeft * alpha, childAlphaTopRight * alpha, childAlphaBottomLeft * alpha, childAlphaBottomRight * alpha);\r\n\r\n // Render\r\n child.renderWebGL(renderer, child, interpolationPercentage, camera, transformMatrix);\r\n\r\n // Restore original values\r\n\r\n child.setAlpha(childAlphaTopLeft, childAlphaTopRight, childAlphaBottomLeft, childAlphaBottomRight);\r\n\r\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\r\n\r\n if (mask)\r\n {\r\n mask.postRenderWebGL(renderer, camera);\r\n }\r\n\r\n renderer.newType = false;\r\n }\r\n};\r\n\r\nmodule.exports = ContainerWebGLRenderer;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Added to Scene Event.\n *\n * This event is dispatched when a Game Object is added to a Scene.\n *\n * Listen for it on a Game Object instance using `GameObject.on('addedtoscene', listener)`.\n *\n * @event Phaser.GameObjects.Events#ADDED_TO_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\n */\nmodule.exports = 'addedtoscene';\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Destroy Event.\r\n * \r\n * This event is dispatched when a Game Object instance is being destroyed.\r\n * \r\n * Listen for it on a Game Object instance using `GameObject.on('destroy', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#DESTROY\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed.\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Removed from Scene Event.\n *\n * This event is dispatched when a Game Object is removed from a Scene.\n *\n * Listen for it on a Game Object instance using `GameObject.on('removedfromscene', listener)`.\n *\n * @event Phaser.GameObjects.Events#REMOVED_FROM_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\n */\nmodule.exports = 'removedfromscene';\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Complete Event.\r\n * \r\n * This event is dispatched when a Video finishes playback by reaching the end of its duration. It\r\n * is also dispatched if a video marker sequence is being played and reaches the end.\r\n * \r\n * Note that not all videos can fire this event. Live streams, for example, have no fixed duration,\r\n * so never technically 'complete'.\r\n * \r\n * If a video is stopped from playback, via the `Video.stop` method, it will emit the\r\n * `VIDEO_STOP` event instead of this one.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('complete', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_COMPLETE\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed playback.\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Created Event.\r\n * \r\n * This event is dispatched when the texture for a Video has been created. This happens\r\n * when enough of the video source has been loaded that the browser is able to render a\r\n * frame from it.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('created', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_CREATED\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\r\n * @param {integer} width - The width of the video.\r\n * @param {integer} height - The height of the video.\r\n */\r\nmodule.exports = 'created';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Error Event.\r\n * \r\n * This event is dispatched when a Video tries to play a source that does not exist, or is the wrong file type.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('error', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_ERROR\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which threw the error.\r\n * @param {Event} event - The native DOM event the browser raised during playback.\r\n */\r\nmodule.exports = 'error';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Loop Event.\r\n * \r\n * This event is dispatched when a Video that is currently playing has looped. This only\r\n * happens if the `loop` parameter was specified, or the `setLoop` method was called,\r\n * and if the video has a fixed duration. Video streams, for example, cannot loop, as\r\n * they have no duration.\r\n * \r\n * Looping is based on the result of the Video `timeupdate` event. This event is not\r\n * frame-accurate, due to the way browsers work, so please do not rely on this loop\r\n * event to be time or frame precise.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('loop', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_LOOP\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which has looped.\r\n */\r\nmodule.exports = 'loop';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Play Event.\r\n * \r\n * This event is dispatched when a Video begins playback. For videos that do not require\r\n * interaction unlocking, this is usually as soon as the `Video.play` method is called.\r\n * However, for videos that require unlocking, it is fired once playback begins after\r\n * they've been unlocked.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('play', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_PLAY\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started playback.\r\n */\r\nmodule.exports = 'play';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Seeked Event.\r\n * \r\n * This event is dispatched when a Video completes seeking to a new point in its timeline.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('seeked', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_SEEKED\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed seeking.\r\n */\r\nmodule.exports = 'seeked';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Seeking Event.\r\n * \r\n * This event is dispatched when a Video _begins_ seeking to a new point in its timeline.\r\n * When the seek is complete, it will dispatch the `VIDEO_SEEKED` event to conclude.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('seeking', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_SEEKING\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started seeking.\r\n */\r\nmodule.exports = 'seeking';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Stopped Event.\r\n * \r\n * This event is dispatched when a Video is stopped from playback via a call to the `Video.stop` method,\r\n * either directly via game code, or indirectly as the result of changing a video source or destroying it.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('stop', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_STOP\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which stopped playback.\r\n */\r\nmodule.exports = 'stop';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Timeout Event.\r\n * \r\n * This event is dispatched when a Video has exhausted its allocated time while trying to connect to a video\r\n * source to start playback.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('timeout', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_TIMEOUT\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which timed out.\r\n */\r\nmodule.exports = 'timeout';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Unlocked Event.\r\n * \r\n * This event is dispatched when a Video that was prevented from playback due to the browsers\r\n * Media Engagement Interaction policy, is unlocked by a user gesture.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('unlocked', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_UNLOCKED\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\r\n */\r\nmodule.exports = 'unlocked';\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.GameObjects.Events\n */\n\nmodule.exports = {\n\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\n DESTROY: require('./DESTROY_EVENT'),\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'),\n VIDEO_COMPLETE: require('./VIDEO_COMPLETE_EVENT'),\n VIDEO_CREATED: require('./VIDEO_CREATED_EVENT'),\n VIDEO_ERROR: require('./VIDEO_ERROR_EVENT'),\n VIDEO_LOOP: require('./VIDEO_LOOP_EVENT'),\n VIDEO_PLAY: require('./VIDEO_PLAY_EVENT'),\n VIDEO_SEEKED: require('./VIDEO_SEEKED_EVENT'),\n VIDEO_SEEKING: require('./VIDEO_SEEKING_EVENT'),\n VIDEO_STOP: require('./VIDEO_STOP_EVENT'),\n VIDEO_TIMEOUT: require('./VIDEO_TIMEOUT_EVENT'),\n VIDEO_UNLOCKED: require('./VIDEO_UNLOCKED_EVENT')\n\n};\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GEOM_CONST = {\r\n\r\n /**\r\n * A Circle Geometry object type.\r\n * \r\n * @name Phaser.Geom.CIRCLE\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n CIRCLE: 0,\r\n\r\n /**\r\n * An Ellipse Geometry object type.\r\n * \r\n * @name Phaser.Geom.ELLIPSE\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n ELLIPSE: 1,\r\n\r\n /**\r\n * A Line Geometry object type.\r\n * \r\n * @name Phaser.Geom.LINE\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n LINE: 2,\r\n\r\n /**\r\n * A Point Geometry object type.\r\n * \r\n * @name Phaser.Geom.POINT\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n POINT: 3,\r\n\r\n /**\r\n * A Polygon Geometry object type.\r\n * \r\n * @name Phaser.Geom.POLYGON\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n POLYGON: 4,\r\n\r\n /**\r\n * A Rectangle Geometry object type.\r\n * \r\n * @name Phaser.Geom.RECTANGLE\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n RECTANGLE: 5,\r\n\r\n /**\r\n * A Triangle Geometry object type.\r\n * \r\n * @name Phaser.Geom.TRIANGLE\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n TRIANGLE: 6\r\n\r\n};\r\n\r\nmodule.exports = GEOM_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Get a point on a line that's a given percentage along its length.\r\n *\r\n * @function Phaser.Geom.Line.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line.\r\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An optional point, or point-like object, to store the coordinates of the point on the line.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The point on the line.\r\n */\r\nvar GetPoint = function (line, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = line.x1 + (line.x2 - line.x1) * position;\r\n out.y = line.y1 + (line.y2 - line.y1) * position;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Length = require('./Length');\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Get a number of points along a line's length.\r\n *\r\n * Provide a `quantity` to get an exact number of points along the line.\r\n *\r\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\r\n * providing a `stepRate`.\r\n *\r\n * @function Phaser.Geom.Line.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line.\r\n * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\r\n * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\r\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\r\n */\r\nvar GetPoints = function (line, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity && stepRate > 0)\r\n {\r\n quantity = Length(line) / stepRate;\r\n }\r\n\r\n var x1 = line.x1;\r\n var y1 = line.y1;\r\n\r\n var x2 = line.x2;\r\n var y2 = line.y2;\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var position = i / quantity;\r\n\r\n var x = x1 + (x2 - x1) * position;\r\n var y = y1 + (y2 - y1) * position;\r\n\r\n out.push(new Point(x, y));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the length of the given line.\r\n *\r\n * @function Phaser.Geom.Line.Length\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the length of.\r\n *\r\n * @return {number} The length of the line.\r\n */\r\nvar Length = function (line)\r\n{\r\n return Math.sqrt((line.x2 - line.x1) * (line.x2 - line.x1) + (line.y2 - line.y1) * (line.y2 - line.y1));\r\n};\r\n\r\nmodule.exports = Length;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar GetPoint = require('./GetPoint');\r\nvar GetPoints = require('./GetPoints');\r\nvar GEOM_CONST = require('../const');\r\nvar Random = require('./Random');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * Defines a Line segment, a part of a line between two endpoints.\r\n *\r\n * @class Line\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\r\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\r\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\r\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\r\n */\r\nvar Line = new Class({\r\n\r\n initialize:\r\n\r\n function Line (x1, y1, x2, y2)\r\n {\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 0; }\r\n if (y2 === undefined) { y2 = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.LINE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Line#type\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.LINE;\r\n\r\n /**\r\n * The x coordinate of the lines starting point.\r\n *\r\n * @name Phaser.Geom.Line#x1\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x1 = x1;\r\n\r\n /**\r\n * The y coordinate of the lines starting point.\r\n *\r\n * @name Phaser.Geom.Line#y1\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y1 = y1;\r\n\r\n /**\r\n * The x coordinate of the lines ending point.\r\n *\r\n * @name Phaser.Geom.Line#x2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x2 = x2;\r\n\r\n /**\r\n * The y coordinate of the lines ending point.\r\n *\r\n * @name Phaser.Geom.Line#y2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y2 = y2;\r\n },\r\n\r\n /**\r\n * Get a point on a line that's a given percentage along its length.\r\n *\r\n * @method Phaser.Geom.Line#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [output,$return]\r\n *\r\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\r\n * @param {(Phaser.Geom.Point|object)} [output] - An optional point, or point-like object, to store the coordinates of the point on the line.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point on the line.\r\n */\r\n getPoint: function (position, output)\r\n {\r\n return GetPoint(this, position, output);\r\n },\r\n\r\n /**\r\n * Get a number of points along a line's length.\r\n *\r\n * Provide a `quantity` to get an exact number of points along the line.\r\n *\r\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\r\n * providing a `stepRate`.\r\n *\r\n * @method Phaser.Geom.Line#getPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\r\n *\r\n * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\r\n * @param {integer} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\r\n * @param {(array|Phaser.Geom.Point[])} [output] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Get a random Point on the Line.\r\n *\r\n * @method Phaser.Geom.Line#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} [point] - An instance of a Point to be modified.\r\n *\r\n * @return {Phaser.Geom.Point} A random Point on the Line.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Set new coordinates for the line endpoints.\r\n *\r\n * @method Phaser.Geom.Line#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\r\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\r\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\r\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\r\n *\r\n * @return {this} This Line object.\r\n */\r\n setTo: function (x1, y1, x2, y2)\r\n {\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 0; }\r\n if (y2 === undefined) { y2 = 0; }\r\n\r\n this.x1 = x1;\r\n this.y1 = y1;\r\n\r\n this.x2 = x2;\r\n this.y2 = y2;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns a Vector2 object that corresponds to the start of this Line.\r\n *\r\n * @method Phaser.Geom.Line#getPointA\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the start of this Line.\r\n */\r\n getPointA: function (vec2)\r\n {\r\n if (vec2 === undefined) { vec2 = new Vector2(); }\r\n\r\n vec2.set(this.x1, this.y1);\r\n\r\n return vec2;\r\n },\r\n\r\n /**\r\n * Returns a Vector2 object that corresponds to the end of this Line.\r\n *\r\n * @method Phaser.Geom.Line#getPointB\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the end of this Line.\r\n */\r\n getPointB: function (vec2)\r\n {\r\n if (vec2 === undefined) { vec2 = new Vector2(); }\r\n\r\n vec2.set(this.x2, this.y2);\r\n\r\n return vec2;\r\n },\r\n\r\n /**\r\n * The left position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return Math.min(this.x1, this.x2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.x1 <= this.x2)\r\n {\r\n this.x1 = value;\r\n }\r\n else\r\n {\r\n this.x2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The right position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return Math.max(this.x1, this.x2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.x1 > this.x2)\r\n {\r\n this.x1 = value;\r\n }\r\n else\r\n {\r\n this.x2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return Math.min(this.y1, this.y2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.y1 <= this.y2)\r\n {\r\n this.y1 = value;\r\n }\r\n else\r\n {\r\n this.y2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return Math.max(this.y1, this.y2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.y1 > this.y2)\r\n {\r\n this.y1 = value;\r\n }\r\n else\r\n {\r\n this.y2 = value;\r\n }\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Line;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Returns a random point on a given Line.\r\n *\r\n * @function Phaser.Geom.Line.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The Line to calculate the random Point on.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An instance of a Point to be modified.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A random Point on the Line.\r\n */\r\nvar Random = function (line, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var t = Math.random();\r\n\r\n out.x = line.x1 + t * (line.x2 - line.x1);\r\n out.y = line.y1 + t * (line.y2 - line.y1);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar GEOM_CONST = require('../const');\r\n\r\n/**\r\n * @classdesc\r\n * Defines a Point in 2D space, with an x and y component.\r\n *\r\n * @class Point\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x coordinate of this Point.\r\n * @param {number} [y=x] - The y coordinate of this Point.\r\n */\r\nvar Point = new Class({\r\n\r\n initialize:\r\n\r\n function Point (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.POINT`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Point#type\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.POINT;\r\n\r\n /**\r\n * The x coordinate of this Point.\r\n *\r\n * @name Phaser.Geom.Point#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The y coordinate of this Point.\r\n *\r\n * @name Phaser.Geom.Point#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n },\r\n\r\n /**\r\n * Set the x and y coordinates of the point to the given values.\r\n *\r\n * @method Phaser.Geom.Point#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x coordinate of this Point.\r\n * @param {number} [y=x] - The y coordinate of this Point.\r\n *\r\n * @return {this} This Point object.\r\n */\r\n setTo: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Point;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if a given point is inside a Rectangle's bounds.\r\n *\r\n * @function Phaser.Geom.Rectangle.Contains\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to check.\r\n * @param {number} x - The X coordinate of the point to check.\r\n * @param {number} y - The Y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`.\r\n */\r\nvar Contains = function (rect, x, y)\r\n{\r\n if (rect.width <= 0 || rect.height <= 0)\r\n {\r\n return false;\r\n }\r\n\r\n return (rect.x <= x && rect.x + rect.width >= x && rect.y <= y && rect.y + rect.height >= y);\r\n};\r\n\r\nmodule.exports = Contains;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Perimeter = require('./Perimeter');\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter.\r\n * \r\n * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.\r\n * \r\n * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle to get the perimeter point from.\r\n * @param {number} position - The normalized distance into the Rectangle's perimeter to return.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An object to update with the `x` and `y` coordinates of the point.\r\n *\r\n * @return {Phaser.Geom.Point} The updated `output` object, or a new Point if no `output` object was given.\r\n */\r\nvar GetPoint = function (rectangle, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n if (position <= 0 || position >= 1)\r\n {\r\n out.x = rectangle.x;\r\n out.y = rectangle.y;\r\n\r\n return out;\r\n }\r\n\r\n var p = Perimeter(rectangle) * position;\r\n\r\n if (position > 0.5)\r\n {\r\n p -= (rectangle.width + rectangle.height);\r\n\r\n if (p <= rectangle.width)\r\n {\r\n // Face 3\r\n out.x = rectangle.right - p;\r\n out.y = rectangle.bottom;\r\n }\r\n else\r\n {\r\n // Face 4\r\n out.x = rectangle.x;\r\n out.y = rectangle.bottom - (p - rectangle.width);\r\n }\r\n }\r\n else if (p <= rectangle.width)\r\n {\r\n // Face 1\r\n out.x = rectangle.x + p;\r\n out.y = rectangle.y;\r\n }\r\n else\r\n {\r\n // Face 2\r\n out.x = rectangle.right;\r\n out.y = rectangle.y + (p - rectangle.width);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetPoint = require('./GetPoint');\r\nvar Perimeter = require('./Perimeter');\r\n\r\n// Return an array of points from the perimeter of the rectangle\r\n// each spaced out based on the quantity or step required\r\n\r\n/**\r\n * Return an array of points from the perimeter of the rectangle, each spaced out based on the quantity or step required.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle object to get the points from.\r\n * @param {number} step - Step between points. Used to calculate the number of points to return when quantity is falsey. Ignored if quantity is positive.\r\n * @param {integer} quantity - The number of evenly spaced points from the rectangles perimeter to return. If falsey, step param will be used to calculate the number of points.\r\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array to store the points in.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points from the perimeter of the rectangle.\r\n */\r\nvar GetPoints = function (rectangle, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity && stepRate > 0)\r\n {\r\n quantity = Perimeter(rectangle) / stepRate;\r\n }\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var position = i / quantity;\r\n\r\n out.push(GetPoint(rectangle, position));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the perimeter of a Rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.Perimeter\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to use.\r\n *\r\n * @return {number} The perimeter of the Rectangle, equal to `(width * 2) + (height * 2)`.\r\n */\r\nvar Perimeter = function (rect)\r\n{\r\n return 2 * (rect.width + rect.height);\r\n};\r\n\r\nmodule.exports = Perimeter;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Returns a random point within a Rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to return a point from.\r\n * @param {Phaser.Geom.Point} out - The object to update with the point's coordinates.\r\n *\r\n * @return {Phaser.Geom.Point} The modified `out` object, or a new Point if none was provided.\r\n */\r\nvar Random = function (rect, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = rect.x + (Math.random() * rect.width);\r\n out.y = rect.y + (Math.random() * rect.height);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar Contains = require('./Contains');\r\nvar GetPoint = require('./GetPoint');\r\nvar GetPoints = require('./GetPoints');\r\nvar GEOM_CONST = require('../const');\r\nvar Line = require('../line/Line');\r\nvar Random = require('./Random');\r\n\r\n/**\r\n * @classdesc\r\n * Encapsulates a 2D rectangle defined by its corner point in the top-left and its extends in x (width) and y (height)\r\n *\r\n * @class Rectangle\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} [y=0] - The Y coordinate of the top left corner of the Rectangle.\r\n * @param {number} [width=0] - The width of the Rectangle.\r\n * @param {number} [height=0] - The height of the Rectangle.\r\n */\r\nvar Rectangle = new Class({\r\n\r\n initialize:\r\n\r\n function Rectangle (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 0; }\r\n if (height === undefined) { height = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.RECTANGLE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Rectangle#type\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.RECTANGLE;\r\n\r\n /**\r\n * The X coordinate of the top left corner of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The Y coordinate of the top left corner of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The width of the Rectangle, i.e. the distance between its left side (defined by `x`) and its right side.\r\n *\r\n * @name Phaser.Geom.Rectangle#width\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.width = width;\r\n\r\n /**\r\n * The height of the Rectangle, i.e. the distance between its top side (defined by `y`) and its bottom side.\r\n *\r\n * @name Phaser.Geom.Rectangle#height\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.height = height;\r\n },\r\n\r\n /**\r\n * Checks if the given point is inside the Rectangle's bounds.\r\n *\r\n * @method Phaser.Geom.Rectangle#contains\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the point to check.\r\n * @param {number} y - The Y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`.\r\n */\r\n contains: function (x, y)\r\n {\r\n return Contains(this, x, y);\r\n },\r\n\r\n /**\r\n * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter.\r\n * \r\n * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.\r\n * \r\n * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.\r\n *\r\n * @method Phaser.Geom.Rectangle#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [output,$return]\r\n *\r\n * @param {number} position - The normalized distance into the Rectangle's perimeter to return.\r\n * @param {(Phaser.Geom.Point|object)} [output] - An object to update with the `x` and `y` coordinates of the point.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The updated `output` object, or a new Point if no `output` object was given.\r\n */\r\n getPoint: function (position, output)\r\n {\r\n return GetPoint(this, position, output);\r\n },\r\n\r\n /**\r\n * Returns an array of points from the perimeter of the Rectangle, each spaced out based on the quantity or step required.\r\n *\r\n * @method Phaser.Geom.Rectangle#getPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\r\n *\r\n * @param {integer} quantity - The number of points to return. Set to `false` or 0 to return an arbitrary number of points (`perimeter / stepRate`) evenly spaced around the Rectangle based on the `stepRate`.\r\n * @param {number} [stepRate] - If `quantity` is 0, determines the normalized distance between each returned point.\r\n * @param {(array|Phaser.Geom.Point[])} [output] - An array to which to append the points.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} The modified `output` array, or a new array if none was provided.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Returns a random point within the Rectangle's bounds.\r\n *\r\n * @method Phaser.Geom.Rectangle#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {Phaser.Geom.Point} [point] - The object in which to store the `x` and `y` coordinates of the point.\r\n *\r\n * @return {Phaser.Geom.Point} The updated `point`, or a new Point if none was provided.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Sets the position, width, and height of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} y - The Y coordinate of the top left corner of the Rectangle.\r\n * @param {number} width - The width of the Rectangle.\r\n * @param {number} height - The height of the Rectangle.\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setTo: function (x, y, width, height)\r\n {\r\n this.x = x;\r\n this.y = y;\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the position, width, and height of the Rectangle to 0.\r\n *\r\n * @method Phaser.Geom.Rectangle#setEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setEmpty: function ()\r\n {\r\n return this.setTo(0, 0, 0, 0);\r\n },\r\n\r\n /**\r\n * Sets the position of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} [y=x] - The Y coordinate of the top left corner of the Rectangle.\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setPosition: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the width and height of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width to set the Rectangle to.\r\n * @param {number} [height=width] - The height to set the Rectangle to.\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setSize: function (width, height)\r\n {\r\n if (height === undefined) { height = width; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Determines if the Rectangle is empty. A Rectangle is empty if its width or height is less than or equal to 0.\r\n *\r\n * @method Phaser.Geom.Rectangle#isEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the Rectangle is empty. A Rectangle object is empty if its width or height is less than or equal to 0.\r\n */\r\n isEmpty: function ()\r\n {\r\n return (this.width <= 0 || this.height <= 0);\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the top of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineA\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the top of this Rectangle.\r\n */\r\n getLineA: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x, this.y, this.right, this.y);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the right of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineB\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the right of this Rectangle.\r\n */\r\n getLineB: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.right, this.y, this.right, this.bottom);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the bottom of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineC\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the bottom of this Rectangle.\r\n */\r\n getLineC: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.right, this.bottom, this.x, this.bottom);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the left of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineD\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the left of this Rectangle.\r\n */\r\n getLineD: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x, this.bottom, this.x, this.y);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * The x coordinate of the left of the Rectangle.\r\n * Changing the left property of a Rectangle object has no effect on the y and height properties. However it does affect the width property, whereas changing the x value does not affect the width property.\r\n *\r\n * @name Phaser.Geom.Rectangle#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return this.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value >= this.right)\r\n {\r\n this.width = 0;\r\n }\r\n else\r\n {\r\n this.width = this.right - value;\r\n }\r\n\r\n this.x = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The sum of the x and width properties.\r\n * Changing the right property of a Rectangle object has no effect on the x, y and height properties, however it does affect the width property.\r\n *\r\n * @name Phaser.Geom.Rectangle#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return this.x + this.width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value <= this.x)\r\n {\r\n this.width = 0;\r\n }\r\n else\r\n {\r\n this.width = value - this.x;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinate of the top of the Rectangle. Changing the top property of a Rectangle object has no effect on the x and width properties.\r\n * However it does affect the height property, whereas changing the y value does not affect the height property.\r\n *\r\n * @name Phaser.Geom.Rectangle#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return this.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value >= this.bottom)\r\n {\r\n this.height = 0;\r\n }\r\n else\r\n {\r\n this.height = (this.bottom - value);\r\n }\r\n\r\n this.y = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The sum of the y and height properties.\r\n * Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property.\r\n *\r\n * @name Phaser.Geom.Rectangle#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return this.y + this.height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value <= this.y)\r\n {\r\n this.height = 0;\r\n }\r\n else\r\n {\r\n this.height = value - this.y;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The x coordinate of the center of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#centerX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n centerX: {\r\n\r\n get: function ()\r\n {\r\n return this.x + (this.width / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.x = value - (this.width / 2);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinate of the center of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#centerY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n centerY: {\r\n\r\n get: function ()\r\n {\r\n return this.y + (this.height / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.y = value - (this.height / 2);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Rectangle;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = require('./Rectangle');\r\n\r\n/**\r\n * Creates a new Rectangle or repositions and/or resizes an existing Rectangle so that it encompasses the two given Rectangles, i.e. calculates their union.\r\n *\r\n * @function Phaser.Geom.Rectangle.Union\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle to use.\r\n * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle to use.\r\n * @param {Phaser.Geom.Rectangle} [out] - The Rectangle to store the union in.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The modified `out` Rectangle, or a new Rectangle if none was provided.\r\n */\r\nvar Union = function (rectA, rectB, out)\r\n{\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n // Cache vars so we can use one of the input rects as the output rect\r\n var x = Math.min(rectA.x, rectB.x);\r\n var y = Math.min(rectA.y, rectB.y);\r\n var w = Math.max(rectA.right, rectB.right) - x;\r\n var h = Math.max(rectA.bottom, rectB.bottom) - y;\r\n\r\n return out.setTo(x, y, w, h);\r\n};\r\n\r\nmodule.exports = Union;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar CONST = require('./const');\nvar Events = require('./events');\nvar GetFastValue = require('../utils/object/GetFastValue');\nvar GetURL = require('./GetURL');\nvar MergeXHRSettings = require('./MergeXHRSettings');\nvar XHRLoader = require('./XHRLoader');\nvar XHRSettings = require('./XHRSettings');\n\n/**\n * @classdesc\n * The base File class used by all File Types that the Loader can support.\n * You shouldn't create an instance of a File directly, but should extend it with your own class, setting a custom type and processing methods.\n *\n * @class File\n * @memberof Phaser.Loader\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\n * @param {Phaser.Types.Loader.FileConfig} fileConfig - The file configuration object, as created by the file type.\n */\nvar File = new Class({\n\n initialize:\n\n function File (loader, fileConfig)\n {\n /**\n * A reference to the Loader that is going to load this file.\n *\n * @name Phaser.Loader.File#loader\n * @type {Phaser.Loader.LoaderPlugin}\n * @since 3.0.0\n */\n this.loader = loader;\n\n /**\n * A reference to the Cache, or Texture Manager, that is going to store this file if it loads.\n *\n * @name Phaser.Loader.File#cache\n * @type {(Phaser.Cache.BaseCache|Phaser.Textures.TextureManager)}\n * @since 3.7.0\n */\n this.cache = GetFastValue(fileConfig, 'cache', false);\n\n /**\n * The file type string (image, json, etc) for sorting within the Loader.\n *\n * @name Phaser.Loader.File#type\n * @type {string}\n * @since 3.0.0\n */\n this.type = GetFastValue(fileConfig, 'type', false);\n\n /**\n * Unique cache key (unique within its file type)\n *\n * @name Phaser.Loader.File#key\n * @type {string}\n * @since 3.0.0\n */\n this.key = GetFastValue(fileConfig, 'key', false);\n\n var loadKey = this.key;\n\n if (loader.prefix && loader.prefix !== '')\n {\n this.key = loader.prefix + loadKey;\n }\n\n if (!this.type || !this.key)\n {\n throw new Error('Error calling \\'Loader.' + this.type + '\\' invalid key provided.');\n }\n\n /**\n * The URL of the file, not including baseURL.\n *\n * Automatically has Loader.path prepended to it if a string.\n *\n * Can also be a JavaScript Object, such as the results of parsing JSON data.\n *\n * @name Phaser.Loader.File#url\n * @type {object|string}\n * @since 3.0.0\n */\n this.url = GetFastValue(fileConfig, 'url');\n\n if (this.url === undefined)\n {\n this.url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', '');\n }\n else if (typeof this.url === 'string' && this.url.indexOf('blob:') !== 0 && this.url.indexOf('data:') !== 0)\n {\n this.url = loader.path + this.url;\n }\n\n /**\n * The final URL this file will load from, including baseURL and path.\n * Set automatically when the Loader calls 'load' on this file.\n *\n * @name Phaser.Loader.File#src\n * @type {string}\n * @since 3.0.0\n */\n this.src = '';\n\n /**\n * The merged XHRSettings for this file.\n *\n * @name Phaser.Loader.File#xhrSettings\n * @type {Phaser.Types.Loader.XHRSettingsObject}\n * @since 3.0.0\n */\n this.xhrSettings = XHRSettings(GetFastValue(fileConfig, 'responseType', undefined));\n\n if (GetFastValue(fileConfig, 'xhrSettings', false))\n {\n this.xhrSettings = MergeXHRSettings(this.xhrSettings, GetFastValue(fileConfig, 'xhrSettings', {}));\n }\n\n /**\n * The XMLHttpRequest instance (as created by XHR Loader) that is loading this File.\n *\n * @name Phaser.Loader.File#xhrLoader\n * @type {?XMLHttpRequest}\n * @since 3.0.0\n */\n this.xhrLoader = null;\n\n /**\n * The current state of the file. One of the FILE_CONST values.\n *\n * @name Phaser.Loader.File#state\n * @type {integer}\n * @since 3.0.0\n */\n this.state = (typeof(this.url) === 'function') ? CONST.FILE_POPULATED : CONST.FILE_PENDING;\n\n /**\n * The total size of this file.\n * Set by onProgress and only if loading via XHR.\n *\n * @name Phaser.Loader.File#bytesTotal\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.bytesTotal = 0;\n\n /**\n * Updated as the file loads.\n * Only set if loading via XHR.\n *\n * @name Phaser.Loader.File#bytesLoaded\n * @type {number}\n * @default -1\n * @since 3.0.0\n */\n this.bytesLoaded = -1;\n\n /**\n * A percentage value between 0 and 1 indicating how much of this file has loaded.\n * Only set if loading via XHR.\n *\n * @name Phaser.Loader.File#percentComplete\n * @type {number}\n * @default -1\n * @since 3.0.0\n */\n this.percentComplete = -1;\n\n /**\n * For CORs based loading.\n * If this is undefined then the File will check BaseLoader.crossOrigin and use that (if set)\n *\n * @name Phaser.Loader.File#crossOrigin\n * @type {(string|undefined)}\n * @since 3.0.0\n */\n this.crossOrigin = undefined;\n\n /**\n * The processed file data, stored here after the file has loaded.\n *\n * @name Phaser.Loader.File#data\n * @type {*}\n * @since 3.0.0\n */\n this.data = undefined;\n\n /**\n * A config object that can be used by file types to store transitional data.\n *\n * @name Phaser.Loader.File#config\n * @type {*}\n * @since 3.0.0\n */\n this.config = GetFastValue(fileConfig, 'config', {});\n\n /**\n * If this is a multipart file, i.e. an atlas and its json together, then this is a reference\n * to the parent MultiFile. Set and used internally by the Loader or specific file types.\n *\n * @name Phaser.Loader.File#multiFile\n * @type {?Phaser.Loader.MultiFile}\n * @since 3.7.0\n */\n this.multiFile;\n\n /**\n * Does this file have an associated linked file? Such as an image and a normal map.\n * Atlases and Bitmap Fonts use the multiFile, because those files need loading together but aren't\n * actually bound by data, where-as a linkFile is.\n *\n * @name Phaser.Loader.File#linkFile\n * @type {?Phaser.Loader.File}\n * @since 3.7.0\n */\n this.linkFile;\n },\n\n /**\n * Links this File with another, so they depend upon each other for loading and processing.\n *\n * @method Phaser.Loader.File#setLink\n * @since 3.7.0\n *\n * @param {Phaser.Loader.File} fileB - The file to link to this one.\n */\n setLink: function (fileB)\n {\n this.linkFile = fileB;\n\n fileB.linkFile = this;\n },\n\n /**\n * Resets the XHRLoader instance this file is using.\n *\n * @method Phaser.Loader.File#resetXHR\n * @since 3.0.0\n */\n resetXHR: function ()\n {\n if (this.xhrLoader)\n {\n this.xhrLoader.onload = undefined;\n this.xhrLoader.onerror = undefined;\n this.xhrLoader.onprogress = undefined;\n }\n },\n\n /**\n * Called by the Loader, starts the actual file downloading.\n * During the load the methods onLoad, onError and onProgress are called, based on the XHR events.\n * You shouldn't normally call this method directly, it's meant to be invoked by the Loader.\n *\n * @method Phaser.Loader.File#load\n * @since 3.0.0\n */\n load: function ()\n {\n if (this.state === CONST.FILE_POPULATED)\n {\n // Can happen for example in a JSONFile if they've provided a JSON object instead of a URL\n this.loader.nextFile(this, true);\n }\n else\n {\n this.state = CONST.FILE_LOADING;\n\n this.src = GetURL(this, this.loader.baseURL);\n\n if (this.src.indexOf('data:') === 0)\n {\n console.warn('Local data URIs are not supported: ' + this.key);\n }\n else\n {\n // The creation of this XHRLoader starts the load process going.\n // It will automatically call the following, based on the load outcome:\n //\n // xhr.onload = this.onLoad\n // xhr.onerror = this.onError\n // xhr.onprogress = this.onProgress\n\n this.xhrLoader = XHRLoader(this, this.loader.xhr);\n }\n }\n },\n\n /**\n * Called when the file finishes loading, is sent a DOM ProgressEvent.\n *\n * @method Phaser.Loader.File#onLoad\n * @since 3.0.0\n *\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this load.\n */\n onLoad: function (xhr, event)\n {\n var localFileOk = ((xhr.responseURL && xhr.responseURL.indexOf('file://') === 0 && event.target.status === 0));\n\n var success = !(event.target && event.target.status !== 200) || localFileOk;\n\n // Handle HTTP status codes of 4xx and 5xx as errors, even if xhr.onerror was not called.\n if (xhr.readyState === 4 && xhr.status >= 400 && xhr.status <= 599)\n {\n success = false;\n }\n\n this.state = CONST.FILE_LOADED;\n\n this.resetXHR();\n\n this.loader.nextFile(this, success);\n },\n\n /**\n * Called if the file errors while loading, is sent a DOM ProgressEvent.\n *\n * @method Phaser.Loader.File#onError\n * @since 3.0.0\n *\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this error.\n */\n onError: function ()\n {\n this.resetXHR();\n\n this.loader.nextFile(this, false);\n },\n\n /**\n * Called during the file load progress. Is sent a DOM ProgressEvent.\n *\n * @method Phaser.Loader.File#onProgress\n * @fires Phaser.Loader.Events#FILE_PROGRESS\n * @since 3.0.0\n *\n * @param {ProgressEvent} event - The DOM ProgressEvent.\n */\n onProgress: function (event)\n {\n if (event.lengthComputable)\n {\n this.bytesLoaded = event.loaded;\n this.bytesTotal = event.total;\n\n this.percentComplete = Math.min((this.bytesLoaded / this.bytesTotal), 1);\n\n this.loader.emit(Events.FILE_PROGRESS, this, this.percentComplete);\n }\n },\n\n /**\n * Usually overridden by the FileTypes and is called by Loader.nextFile.\n * This method controls what extra work this File does with its loaded data, for example a JSON file will parse itself during this stage.\n *\n * @method Phaser.Loader.File#onProcess\n * @since 3.0.0\n */\n onProcess: function ()\n {\n this.state = CONST.FILE_PROCESSING;\n\n this.onProcessComplete();\n },\n\n /**\n * Called when the File has completed processing.\n * Checks on the state of its multifile, if set.\n *\n * @method Phaser.Loader.File#onProcessComplete\n * @since 3.7.0\n */\n onProcessComplete: function ()\n {\n this.state = CONST.FILE_COMPLETE;\n\n if (this.multiFile)\n {\n this.multiFile.onFileComplete(this);\n }\n\n this.loader.fileProcessComplete(this);\n },\n\n /**\n * Called when the File has completed processing but it generated an error.\n * Checks on the state of its multifile, if set.\n *\n * @method Phaser.Loader.File#onProcessError\n * @since 3.7.0\n */\n onProcessError: function ()\n {\n this.state = CONST.FILE_ERRORED;\n\n if (this.multiFile)\n {\n this.multiFile.onFileFailed(this);\n }\n\n this.loader.fileProcessComplete(this);\n },\n\n /**\n * Checks if a key matching the one used by this file exists in the target Cache or not.\n * This is called automatically by the LoaderPlugin to decide if the file can be safely\n * loaded or will conflict.\n *\n * @method Phaser.Loader.File#hasCacheConflict\n * @since 3.7.0\n *\n * @return {boolean} `true` if adding this file will cause a conflict, otherwise `false`.\n */\n hasCacheConflict: function ()\n {\n return (this.cache && this.cache.exists(this.key));\n },\n\n /**\n * Adds this file to its target cache upon successful loading and processing.\n * This method is often overridden by specific file types.\n *\n * @method Phaser.Loader.File#addToCache\n * @since 3.7.0\n */\n addToCache: function ()\n {\n if (this.cache)\n {\n this.cache.add(this.key, this.data);\n }\n\n this.pendingDestroy();\n },\n\n /**\n * Called once the file has been added to its cache and is now ready for deletion from the Loader.\n * It will emit a `filecomplete` event from the LoaderPlugin.\n *\n * @method Phaser.Loader.File#pendingDestroy\n * @fires Phaser.Loader.Events#FILE_COMPLETE\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\n * @since 3.7.0\n */\n pendingDestroy: function (data)\n {\n if (data === undefined) { data = this.data; }\n\n var key = this.key;\n var type = this.type;\n\n this.loader.emit(Events.FILE_COMPLETE, key, type, data);\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type, data);\n\n this.loader.flagForRemoval(this);\n },\n\n /**\n * Destroy this File and any references it holds.\n *\n * @method Phaser.Loader.File#destroy\n * @since 3.7.0\n */\n destroy: function ()\n {\n this.loader = null;\n this.cache = null;\n this.xhrSettings = null;\n this.multiFile = null;\n this.linkFile = null;\n this.data = null;\n }\n\n});\n\n/**\n * Static method for creating object URL using URL API and setting it as image 'src' attribute.\n * If URL API is not supported (usually on old browsers) it falls back to creating Base64 encoded url using FileReader.\n *\n * @method Phaser.Loader.File.createObjectURL\n * @static\n * @since 3.7.0\n *\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be set to object URL.\n * @param {Blob} blob - A Blob object to create an object URL for.\n * @param {string} defaultType - Default mime type used if blob type is not available.\n */\nFile.createObjectURL = function (image, blob, defaultType)\n{\n if (typeof URL === 'function')\n {\n image.src = URL.createObjectURL(blob);\n }\n else\n {\n var reader = new FileReader();\n\n reader.onload = function ()\n {\n image.removeAttribute('crossOrigin');\n image.src = 'data:' + (blob.type || defaultType) + ';base64,' + reader.result.split(',')[1];\n };\n\n reader.onerror = image.onerror;\n\n reader.readAsDataURL(blob);\n }\n};\n\n/**\n * Static method for releasing an existing object URL which was previously created\n * by calling {@link File#createObjectURL} method.\n *\n * @method Phaser.Loader.File.revokeObjectURL\n * @static\n * @since 3.7.0\n *\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be revoked.\n */\nFile.revokeObjectURL = function (image)\n{\n if (typeof URL === 'function')\n {\n URL.revokeObjectURL(image.src);\n }\n};\n\nmodule.exports = File;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar types = {};\r\n\r\n/**\r\n * @namespace Phaser.Loader.FileTypesManager\r\n */\r\n\r\nvar FileTypesManager = {\r\n\r\n /**\r\n * Static method called when a LoaderPlugin is created.\r\n * \r\n * Loops through the local types object and injects all of them as\r\n * properties into the LoaderPlugin instance.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.install\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - The LoaderPlugin to install the types into.\r\n */\r\n install: function (loader)\r\n {\r\n for (var key in types)\r\n {\r\n loader[key] = types[key];\r\n }\r\n },\r\n\r\n /**\r\n * Static method called directly by the File Types.\r\n * \r\n * The key is a reference to the function used to load the files via the Loader, i.e. `image`.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.register\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key that will be used as the method name in the LoaderPlugin.\r\n * @param {function} factoryFunction - The function that will be called when LoaderPlugin.key is invoked.\r\n */\r\n register: function (key, factoryFunction)\r\n {\r\n types[key] = factoryFunction;\r\n },\r\n\r\n /**\r\n * Removed all associated file types.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n types = {};\r\n }\r\n\r\n};\r\n\r\nmodule.exports = FileTypesManager;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Given a File and a baseURL value this returns the URL the File will use to download from.\r\n *\r\n * @function Phaser.Loader.GetURL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File object.\r\n * @param {string} baseURL - A default base URL.\r\n *\r\n * @return {string} The URL the File will use.\r\n */\r\nvar GetURL = function (file, baseURL)\r\n{\r\n if (!file.url)\r\n {\r\n return false;\r\n }\r\n\r\n if (file.url.match(/^(?:blob:|data:|http:\\/\\/|https:\\/\\/|\\/\\/)/))\r\n {\r\n return file.url;\r\n }\r\n else\r\n {\r\n return baseURL + file.url;\r\n }\r\n};\r\n\r\nmodule.exports = GetURL;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extend = require('../utils/object/Extend');\r\nvar XHRSettings = require('./XHRSettings');\r\n\r\n/**\r\n * Takes two XHRSettings Objects and creates a new XHRSettings object from them.\r\n *\r\n * The new object is seeded by the values given in the global settings, but any setting in\r\n * the local object overrides the global ones.\r\n *\r\n * @function Phaser.Loader.MergeXHRSettings\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} global - The global XHRSettings object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} local - The local XHRSettings object.\r\n *\r\n * @return {Phaser.Types.Loader.XHRSettingsObject} A newly formed XHRSettings object.\r\n */\r\nvar MergeXHRSettings = function (global, local)\r\n{\r\n var output = (global === undefined) ? XHRSettings() : Extend({}, global);\r\n\r\n if (local)\r\n {\r\n for (var setting in local)\r\n {\r\n if (local[setting] !== undefined)\r\n {\r\n output[setting] = local[setting];\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = MergeXHRSettings;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A MultiFile is a special kind of parent that contains two, or more, Files as children and looks after\r\n * the loading and processing of them all. It is commonly extended and used as a base class for file types such as AtlasJSON or BitmapFont.\r\n * \r\n * You shouldn't create an instance of a MultiFile directly, but should extend it with your own class, setting a custom type and processing methods.\r\n *\r\n * @class MultiFile\r\n * @memberof Phaser.Loader\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\r\n * @param {string} type - The file type string for sorting within the Loader.\r\n * @param {string} key - The key of the file within the loader.\r\n * @param {Phaser.Loader.File[]} files - An array of Files that make-up this MultiFile.\r\n */\r\nvar MultiFile = new Class({\r\n\r\n initialize:\r\n\r\n function MultiFile (loader, type, key, files)\r\n {\r\n /**\r\n * A reference to the Loader that is going to load this file.\r\n *\r\n * @name Phaser.Loader.MultiFile#loader\r\n * @type {Phaser.Loader.LoaderPlugin}\r\n * @since 3.7.0\r\n */\r\n this.loader = loader;\r\n\r\n /**\r\n * The file type string for sorting within the Loader.\r\n *\r\n * @name Phaser.Loader.MultiFile#type\r\n * @type {string}\r\n * @since 3.7.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * Unique cache key (unique within its file type)\r\n *\r\n * @name Phaser.Loader.MultiFile#key\r\n * @type {string}\r\n * @since 3.7.0\r\n */\r\n this.key = key;\r\n\r\n /**\r\n * The current index being used by multi-file loaders to avoid key clashes.\r\n *\r\n * @name Phaser.Loader.MultiFile#multiKeyIndex\r\n * @type {integer}\r\n * @private\r\n * @since 3.20.0\r\n */\r\n this.multiKeyIndex = loader.multiKeyIndex++;\r\n\r\n /**\r\n * Array of files that make up this MultiFile.\r\n *\r\n * @name Phaser.Loader.MultiFile#files\r\n * @type {Phaser.Loader.File[]}\r\n * @since 3.7.0\r\n */\r\n this.files = files;\r\n\r\n /**\r\n * The completion status of this MultiFile.\r\n *\r\n * @name Phaser.Loader.MultiFile#complete\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.7.0\r\n */\r\n this.complete = false;\r\n\r\n /**\r\n * The number of files to load.\r\n *\r\n * @name Phaser.Loader.MultiFile#pending\r\n * @type {integer}\r\n * @since 3.7.0\r\n */\r\n\r\n this.pending = files.length;\r\n\r\n /**\r\n * The number of files that failed to load.\r\n *\r\n * @name Phaser.Loader.MultiFile#failed\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.7.0\r\n */\r\n this.failed = 0;\r\n\r\n /**\r\n * A storage container for transient data that the loading files need.\r\n *\r\n * @name Phaser.Loader.MultiFile#config\r\n * @type {any}\r\n * @since 3.7.0\r\n */\r\n this.config = {};\r\n\r\n /**\r\n * A reference to the Loaders baseURL at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#baseURL\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.baseURL = loader.baseURL;\r\n\r\n /**\r\n * A reference to the Loaders path at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#path\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.path = loader.path;\r\n\r\n /**\r\n * A reference to the Loaders prefix at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#prefix\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.prefix = loader.prefix;\r\n\r\n // Link the files\r\n for (var i = 0; i < files.length; i++)\r\n {\r\n files[i].multiFile = this;\r\n }\r\n },\r\n\r\n /**\r\n * Checks if this MultiFile is ready to process its children or not.\r\n *\r\n * @method Phaser.Loader.MultiFile#isReadyToProcess\r\n * @since 3.7.0\r\n *\r\n * @return {boolean} `true` if all children of this MultiFile have loaded, otherwise `false`.\r\n */\r\n isReadyToProcess: function ()\r\n {\r\n return (this.pending === 0 && this.failed === 0 && !this.complete);\r\n },\r\n\r\n /**\r\n * Adds another child to this MultiFile, increases the pending count and resets the completion status.\r\n *\r\n * @method Phaser.Loader.MultiFile#addToMultiFile\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} files - The File to add to this MultiFile.\r\n *\r\n * @return {Phaser.Loader.MultiFile} This MultiFile instance.\r\n */\r\n addToMultiFile: function (file)\r\n {\r\n this.files.push(file);\r\n\r\n file.multiFile = this;\r\n\r\n this.pending++;\r\n\r\n this.complete = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Called by each File when it finishes loading.\r\n *\r\n * @method Phaser.Loader.MultiFile#onFileComplete\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has completed processing.\r\n */\r\n onFileComplete: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.pending--;\r\n }\r\n },\r\n\r\n /**\r\n * Called by each File that fails to load.\r\n *\r\n * @method Phaser.Loader.MultiFile#onFileFailed\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has failed to load.\r\n */\r\n onFileFailed: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.failed++;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MultiFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MergeXHRSettings = require('./MergeXHRSettings');\r\n\r\n/**\r\n * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings\r\n * and starts the download of it. It uses the Files own XHRSettings and merges them\r\n * with the global XHRSettings object to set the xhr values before download.\r\n *\r\n * @function Phaser.Loader.XHRLoader\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File to download.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} globalXHRSettings - The global XHRSettings object.\r\n *\r\n * @return {XMLHttpRequest} The XHR object.\r\n */\r\nvar XHRLoader = function (file, globalXHRSettings)\r\n{\r\n var config = MergeXHRSettings(globalXHRSettings, file.xhrSettings);\r\n\r\n var xhr = new XMLHttpRequest();\r\n\r\n xhr.open('GET', file.src, config.async, config.user, config.password);\r\n\r\n xhr.responseType = file.xhrSettings.responseType;\r\n xhr.timeout = config.timeout;\r\n\r\n if (config.headers)\r\n {\r\n for (var key in config.headers)\r\n {\r\n xhr.setRequestHeader(key, config.headers[key]);\r\n }\r\n }\r\n\r\n if (config.header && config.headerValue)\r\n {\r\n xhr.setRequestHeader(config.header, config.headerValue);\r\n }\r\n\r\n if (config.requestedWith)\r\n {\r\n xhr.setRequestHeader('X-Requested-With', config.requestedWith);\r\n }\r\n\r\n if (config.overrideMimeType)\r\n {\r\n xhr.overrideMimeType(config.overrideMimeType);\r\n }\r\n\r\n if (config.withCredentials)\r\n {\r\n xhr.withCredentials = true;\r\n }\r\n\r\n // After a successful request, the xhr.response property will contain the requested data as a DOMString, ArrayBuffer, Blob, or Document (depending on what was set for responseType.)\r\n\r\n xhr.onload = file.onLoad.bind(file, xhr);\r\n xhr.onerror = file.onError.bind(file, xhr);\r\n xhr.onprogress = file.onProgress.bind(file);\r\n\r\n // This is the only standard method, the ones above are browser additions (maybe not universal?)\r\n // xhr.onreadystatechange\r\n\r\n xhr.send();\r\n\r\n return xhr;\r\n};\r\n\r\nmodule.exports = XHRLoader;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Creates an XHRSettings Object with default values.\r\n *\r\n * @function Phaser.Loader.XHRSettings\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequestResponseType} [responseType=''] - The responseType, such as 'text'.\r\n * @param {boolean} [async=true] - Should the XHR request use async or not?\r\n * @param {string} [user=''] - Optional username for the XHR request.\r\n * @param {string} [password=''] - Optional password for the XHR request.\r\n * @param {integer} [timeout=0] - Optional XHR timeout value.\r\n * @param {boolean} [withCredentials=false] - Optional XHR withCredentials value.\r\n *\r\n * @return {Phaser.Types.Loader.XHRSettingsObject} The XHRSettings object as used by the Loader.\r\n */\r\nvar XHRSettings = function (responseType, async, user, password, timeout, withCredentials)\r\n{\r\n if (responseType === undefined) { responseType = ''; }\r\n if (async === undefined) { async = true; }\r\n if (user === undefined) { user = ''; }\r\n if (password === undefined) { password = ''; }\r\n if (timeout === undefined) { timeout = 0; }\r\n if (withCredentials === undefined) { withCredentials = false; }\r\n\r\n // Before sending a request, set the xhr.responseType to \"text\",\r\n // \"arraybuffer\", \"blob\", or \"document\", depending on your data needs.\r\n // Note, setting xhr.responseType = '' (or omitting) will default the response to \"text\".\r\n\r\n return {\r\n\r\n // Ignored by the Loader, only used by File.\r\n responseType: responseType,\r\n\r\n async: async,\r\n\r\n // credentials\r\n user: user,\r\n password: password,\r\n\r\n // timeout in ms (0 = no timeout)\r\n timeout: timeout,\r\n\r\n // setRequestHeader\r\n headers: undefined,\r\n header: undefined,\r\n headerValue: undefined,\r\n requestedWith: false,\r\n\r\n // overrideMimeType\r\n overrideMimeType: undefined,\r\n\r\n // withCredentials\r\n withCredentials: withCredentials\r\n\r\n };\r\n};\r\n\r\nmodule.exports = XHRSettings;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FILE_CONST = {\r\n\r\n /**\r\n * The Loader is idle.\r\n * \r\n * @name Phaser.Loader.LOADER_IDLE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_IDLE: 0,\r\n\r\n /**\r\n * The Loader is actively loading.\r\n * \r\n * @name Phaser.Loader.LOADER_LOADING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_LOADING: 1,\r\n\r\n /**\r\n * The Loader is processing files is has loaded.\r\n * \r\n * @name Phaser.Loader.LOADER_PROCESSING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_PROCESSING: 2,\r\n\r\n /**\r\n * The Loader has completed loading and processing.\r\n * \r\n * @name Phaser.Loader.LOADER_COMPLETE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_COMPLETE: 3,\r\n\r\n /**\r\n * The Loader is shutting down.\r\n * \r\n * @name Phaser.Loader.LOADER_SHUTDOWN\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_SHUTDOWN: 4,\r\n\r\n /**\r\n * The Loader has been destroyed.\r\n * \r\n * @name Phaser.Loader.LOADER_DESTROYED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_DESTROYED: 5,\r\n\r\n /**\r\n * File is in the load queue but not yet started\r\n * \r\n * @name Phaser.Loader.FILE_PENDING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_PENDING: 10,\r\n\r\n /**\r\n * File has been started to load by the loader (onLoad called)\r\n * \r\n * @name Phaser.Loader.FILE_LOADING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_LOADING: 11,\r\n\r\n /**\r\n * File has loaded successfully, awaiting processing \r\n * \r\n * @name Phaser.Loader.FILE_LOADED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_LOADED: 12,\r\n\r\n /**\r\n * File failed to load\r\n * \r\n * @name Phaser.Loader.FILE_FAILED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_FAILED: 13,\r\n\r\n /**\r\n * File is being processed (onProcess callback)\r\n * \r\n * @name Phaser.Loader.FILE_PROCESSING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_PROCESSING: 14,\r\n\r\n /**\r\n * The File has errored somehow during processing.\r\n * \r\n * @name Phaser.Loader.FILE_ERRORED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_ERRORED: 16,\r\n\r\n /**\r\n * File has finished processing.\r\n * \r\n * @name Phaser.Loader.FILE_COMPLETE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_COMPLETE: 17,\r\n\r\n /**\r\n * File has been destroyed\r\n * \r\n * @name Phaser.Loader.FILE_DESTROYED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_DESTROYED: 18,\r\n\r\n /**\r\n * File was populated from local data and doesn't need an HTTP request\r\n * \r\n * @name Phaser.Loader.FILE_POPULATED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_POPULATED: 19\r\n\r\n};\r\n\r\nmodule.exports = FILE_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Add File Event.\r\n * \r\n * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('addfile', listener)`.\r\n * \r\n * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them.\r\n *\r\n * @event Phaser.Loader.Events#ADD\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The unique key of the file that was added to the Loader.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} string of the file that was added to the Loader, i.e. `image`.\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n * @param {Phaser.Loader.File} file - A reference to the File which was added to the Loader.\r\n */\r\nmodule.exports = 'addfile';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Complete Event.\r\n * \r\n * This event is dispatched when the Loader has fully processed everything in the load queue.\r\n * By this point every loaded file will now be in its associated cache and ready for use.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('complete', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#COMPLETE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n * @param {integer} totalComplete - The total number of files that successfully loaded.\r\n * @param {integer} totalFailed - The total number of files that failed to load.\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Complete Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`.\r\n * \r\n * You can also listen for the completion of a specific file. See the [FILE_KEY_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_KEY_COMPLETE} event.\r\n *\r\n * @event Phaser.Loader.Events#FILE_COMPLETE\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the file that just loaded and finished processing.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\r\n * @param {any} data - The raw data the file contained.\r\n */\r\nmodule.exports = 'filecomplete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Complete Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.\r\n * \r\n * It uses a special dynamic event name constructed from the key and type of the file.\r\n * \r\n * For example, if you have loaded an `image` with a key of `monster`, you can listen for it\r\n * using the following:\r\n *\r\n * ```javascript\r\n * this.load.on('filecomplete-image-monster', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n *\r\n * Or, if you have loaded a texture `atlas` with a key of `Level1`:\r\n * \r\n * ```javascript\r\n * this.load.on('filecomplete-atlas-Level1', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n * \r\n * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`:\r\n * \r\n * ```javascript\r\n * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n * \r\n * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event.\r\n *\r\n * @event Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the file that just loaded and finished processing.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\r\n * @param {any} data - The raw data the file contained.\r\n */\r\nmodule.exports = 'filecomplete-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Error Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when a file fails to load.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('loaderror', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_LOAD_ERROR\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\r\n */\r\nmodule.exports = 'loaderror';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when a file finishes loading,\r\n * but _before_ it is processed and added to the internal Phaser caches.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('load', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_LOAD\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.File} file - A reference to the File which just finished loading.\r\n */\r\nmodule.exports = 'load';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Progress Event.\r\n * \r\n * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and\r\n * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_PROGRESS\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\r\n * @param {number} percentComplete - A value between 0 and 1 indicating how 'complete' this file is.\r\n */\r\nmodule.exports = 'fileprogress';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Post Process Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue.\r\n * It is dispatched before the internal lists are cleared and each File is destroyed.\r\n * \r\n * Use this hook to perform any last minute processing of files that can only happen once the\r\n * Loader has completed, but prior to it emitting the `complete` event.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('postprocess', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#POST_PROCESS\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n */\r\nmodule.exports = 'postprocess';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Progress Event.\r\n * \r\n * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('progress', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#PROGRESS\r\n * @since 3.0.0\r\n * \r\n * @param {number} progress - The current progress of the load. A value between 0 and 1.\r\n */\r\nmodule.exports = 'progress';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Start Event.\r\n * \r\n * This event is dispatched when the Loader starts running. At this point load progress is zero.\r\n * \r\n * This event is dispatched even if there aren't any files in the load queue.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('start', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#START\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Loader.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADD: require('./ADD_EVENT'),\r\n COMPLETE: require('./COMPLETE_EVENT'),\r\n FILE_COMPLETE: require('./FILE_COMPLETE_EVENT'),\r\n FILE_KEY_COMPLETE: require('./FILE_KEY_COMPLETE_EVENT'),\r\n FILE_LOAD_ERROR: require('./FILE_LOAD_ERROR_EVENT'),\r\n FILE_LOAD: require('./FILE_LOAD_EVENT'),\r\n FILE_PROGRESS: require('./FILE_PROGRESS_EVENT'),\r\n POST_PROCESS: require('./POST_PROCESS_EVENT'),\r\n PROGRESS: require('./PROGRESS_EVENT'),\r\n START: require('./START_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\n\r\n/**\r\n * @classdesc\r\n * A single Image File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#image method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#image.\r\n *\r\n * @class ImageFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. Only provided for, and used by, Sprite Sheets.\r\n */\r\nvar ImageFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function ImageFile (loader, key, url, xhrSettings, frameConfig)\r\n {\r\n var extension = 'png';\r\n var normalMapURL;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n normalMapURL = GetFastValue(config, 'normalMap');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n frameConfig = GetFastValue(config, 'frameConfig');\r\n }\r\n\r\n if (Array.isArray(url))\r\n {\r\n normalMapURL = url[1];\r\n url = url[0];\r\n }\r\n\r\n var fileConfig = {\r\n type: 'image',\r\n cache: loader.textureManager,\r\n extension: extension,\r\n responseType: 'blob',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: frameConfig\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n // Do we have a normal map to load as well?\r\n if (normalMapURL)\r\n {\r\n var normalMap = new ImageFile(loader, this.key, normalMapURL, xhrSettings, frameConfig);\r\n\r\n normalMap.type = 'normalMap';\r\n\r\n this.setLink(normalMap);\r\n\r\n loader.addFile(normalMap);\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = new Image();\r\n\r\n this.data.crossOrigin = this.crossOrigin;\r\n\r\n var _this = this;\r\n\r\n this.data.onload = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessComplete();\r\n };\r\n\r\n this.data.onerror = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessError();\r\n };\r\n\r\n File.createObjectURL(this.data, this.xhrLoader.response, 'image/png');\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n var texture;\r\n var linkFile = this.linkFile;\r\n\r\n if (linkFile && linkFile.state === CONST.FILE_COMPLETE)\r\n {\r\n if (this.type === 'image')\r\n {\r\n texture = this.cache.addImage(this.key, this.data, linkFile.data);\r\n }\r\n else\r\n {\r\n texture = this.cache.addImage(linkFile.key, linkFile.data, this.data);\r\n }\r\n\r\n this.pendingDestroy(texture);\r\n\r\n linkFile.pendingDestroy(texture);\r\n }\r\n else if (!linkFile)\r\n {\r\n texture = this.cache.addImage(this.key, this.data);\r\n\r\n this.pendingDestroy(texture);\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an Image, or array of Images, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.image('logo', 'images/phaserLogo.png');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\r\n * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback\r\n * of animated gifs to Canvas elements.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.image({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.ImageFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:\r\n *\r\n * ```javascript\r\n * this.load.image('logo', 'images/AtariLogo.png');\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'logo');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\r\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\r\n *\r\n * ```javascript\r\n * this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]);\r\n * ```\r\n *\r\n * Or, if you are using a config object use the `normalMap` property:\r\n *\r\n * ```javascript\r\n * this.load.image({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png',\r\n * normalMap: 'images/AtariLogo-n.png'\r\n * });\r\n * ```\r\n *\r\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\r\n * Normal maps are a WebGL only feature.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Image File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#image\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig|Phaser.Types.Loader.FileTypes.ImageFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {this} The Loader instance.\r\n */\r\nFileTypesManager.register('image', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new ImageFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new ImageFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = ImageFile;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar CONST = require('../const');\nvar File = require('../File');\nvar FileTypesManager = require('../FileTypesManager');\nvar GetFastValue = require('../../utils/object/GetFastValue');\nvar GetValue = require('../../utils/object/GetValue');\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\n\n/**\n * @classdesc\n * A single JSON File suitable for loading by the Loader.\n *\n * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly.\n *\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json.\n *\n * @class JSONFile\n * @extends Phaser.Loader.File\n * @memberof Phaser.Loader.FileTypes\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object.\n * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\n */\nvar JSONFile = new Class({\n\n Extends: File,\n\n initialize:\n\n // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object\n // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing\n\n function JSONFile (loader, key, url, xhrSettings, dataKey)\n {\n var extension = 'json';\n\n if (IsPlainObject(key))\n {\n var config = key;\n\n key = GetFastValue(config, 'key');\n url = GetFastValue(config, 'url');\n xhrSettings = GetFastValue(config, 'xhrSettings');\n extension = GetFastValue(config, 'extension', extension);\n dataKey = GetFastValue(config, 'dataKey', dataKey);\n }\n\n var fileConfig = {\n type: 'json',\n cache: loader.cacheManager.json,\n extension: extension,\n responseType: 'text',\n key: key,\n url: url,\n xhrSettings: xhrSettings,\n config: dataKey\n };\n\n File.call(this, loader, fileConfig);\n\n if (IsPlainObject(url))\n {\n // Object provided instead of a URL, so no need to actually load it (populate data with value)\n if (dataKey)\n {\n this.data = GetValue(url, dataKey);\n }\n else\n {\n this.data = url;\n }\n\n this.state = CONST.FILE_POPULATED;\n }\n },\n\n /**\n * Called automatically by Loader.nextFile.\n * This method controls what extra work this File does with its loaded data.\n *\n * @method Phaser.Loader.FileTypes.JSONFile#onProcess\n * @since 3.7.0\n */\n onProcess: function ()\n {\n if (this.state !== CONST.FILE_POPULATED)\n {\n this.state = CONST.FILE_PROCESSING;\n\n var json = JSON.parse(this.xhrLoader.responseText);\n\n var key = this.config;\n\n if (typeof key === 'string')\n {\n this.data = GetValue(json, key, json);\n }\n else\n {\n this.data = json;\n }\n }\n\n this.onProcessComplete();\n }\n\n});\n\n/**\n * Adds a JSON file, or array of JSON files, to the current load queue.\n *\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\n *\n * ```javascript\n * function preload ()\n * {\n * this.load.json('wavedata', 'files/AlienWaveData.json');\n * }\n * ```\n *\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\n * loaded.\n *\n * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.\n * The key should be unique both in terms of files being loaded and files already present in the JSON Cache.\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\n * then remove it from the JSON Cache first, before loading a new one.\n *\n * Instead of passing arguments you can pass a configuration object, such as:\n *\n * ```javascript\n * this.load.json({\n * key: 'wavedata',\n * url: 'files/AlienWaveData.json'\n * });\n * ```\n *\n * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details.\n *\n * Once the file has finished loading you can access it from its Cache using its key:\n *\n * ```javascript\n * this.load.json('wavedata', 'files/AlienWaveData.json');\n * // and later in your game ...\n * var data = this.cache.json.get('wavedata');\n * ```\n *\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\n * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and\n * this is what you would use to retrieve the text from the JSON Cache.\n *\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\n *\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"data\"\n * and no URL is given then the Loader will set the URL to be \"data.json\". It will always add `.json` as the extension, although\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\n *\n * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache,\n * rather than the whole file. For example, if your JSON data had a structure like this:\n *\n * ```json\n * {\n * \"level1\": {\n * \"baddies\": {\n * \"aliens\": {},\n * \"boss\": {}\n * }\n * },\n * \"level2\": {},\n * \"level3\": {}\n * }\n * ```\n *\n * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`.\n *\n * Note: The ability to load this type of file will only be available if the JSON File type has been built into Phaser.\n * It is available in the default build but can be excluded from custom builds.\n *\n * @method Phaser.Loader.LoaderPlugin#json\n * @fires Phaser.Loader.LoaderPlugin#ADD\n * @since 3.0.0\n *\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\n * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\n *\n * @return {this} The Loader instance.\n */\nFileTypesManager.register('json', function (key, url, dataKey, xhrSettings)\n{\n if (Array.isArray(key))\n {\n for (var i = 0; i < key.length; i++)\n {\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\n this.addFile(new JSONFile(this, key[i]));\n }\n }\n else\n {\n this.addFile(new JSONFile(this, key, url, xhrSettings, dataKey));\n }\n\n return this;\n});\n\nmodule.exports = JSONFile;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\n\r\n/**\r\n * @classdesc\r\n * A single Text File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text.\r\n *\r\n * @class TextFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar TextFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function TextFile (loader, key, url, xhrSettings)\r\n {\r\n var extension = 'txt';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'text',\r\n cache: loader.cacheManager.text,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.TextFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = this.xhrLoader.responseText;\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Text file, or array of Text files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.text('story', 'files/IntroStory.txt');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Text Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Text Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Text Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.text({\r\n * key: 'story',\r\n * url: 'files/IntroStory.txt'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.TextFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.text('story', 'files/IntroStory.txt');\r\n * // and later in your game ...\r\n * var data = this.cache.text.get('story');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and\r\n * this is what you would use to retrieve the text from the Text Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"story\"\r\n * and no URL is given then the Loader will set the URL to be \"story.txt\". It will always add `.txt` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Text File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#text\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig|Phaser.Types.Loader.FileTypes.TextFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {this} The Loader instance.\r\n */\r\nFileTypesManager.register('text', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new TextFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new TextFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = TextFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the mean average of the given values.\r\n *\r\n * @function Phaser.Math.Average\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} values - The values to average.\r\n *\r\n * @return {number} The average value.\r\n */\r\nvar Average = function (values)\r\n{\r\n var sum = 0;\r\n\r\n for (var i = 0; i < values.length; i++)\r\n {\r\n sum += (+values[i]);\r\n }\r\n\r\n return sum / values.length;\r\n};\r\n\r\nmodule.exports = Average;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Factorial = require('./Factorial');\r\n\r\n/**\r\n * Calculates the Bernstein basis from the three factorial coefficients.\r\n *\r\n * @function Phaser.Math.Bernstein\r\n * @since 3.0.0\r\n *\r\n * @param {number} n - The first value.\r\n * @param {number} i - The second value.\r\n *\r\n * @return {number} The Bernstein basis of Factorial(n) / Factorial(i) / Factorial(n - i)\r\n */\r\nvar Bernstein = function (n, i)\r\n{\r\n return Factorial(n) / Factorial(i) / Factorial(n - i);\r\n};\r\n\r\nmodule.exports = Bernstein;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random integer between the `min` and `max` values, inclusive.\r\n *\r\n * @function Phaser.Math.Between\r\n * @since 3.0.0\r\n *\r\n * @param {integer} min - The minimum value.\r\n * @param {integer} max - The maximum value.\r\n *\r\n * @return {integer} The random integer.\r\n */\r\nvar Between = function (min, max)\r\n{\r\n return Math.floor(Math.random() * (max - min + 1) + min);\r\n};\r\n\r\nmodule.exports = Between;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates a Catmull-Rom value from the given points, based on an alpha of 0.5.\r\n *\r\n * @function Phaser.Math.CatmullRom\r\n * @since 3.0.0\r\n *\r\n * @param {number} t - The amount to interpolate by.\r\n * @param {number} p0 - The first control point.\r\n * @param {number} p1 - The second control point.\r\n * @param {number} p2 - The third control point.\r\n * @param {number} p3 - The fourth control point.\r\n *\r\n * @return {number} The Catmull-Rom value.\r\n */\r\nvar CatmullRom = function (t, p0, p1, p2, p3)\r\n{\r\n var v0 = (p2 - p0) * 0.5;\r\n var v1 = (p3 - p1) * 0.5;\r\n var t2 = t * t;\r\n var t3 = t * t2;\r\n\r\n return (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1;\r\n};\r\n\r\nmodule.exports = CatmullRom;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Ceils to some place comparative to a `base`, default is 10 for decimal place.\r\n *\r\n * The `place` is represented by the power applied to `base` to get that place.\r\n *\r\n * @function Phaser.Math.CeilTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {number} [place=0] - The place to round to.\r\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar CeilTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.ceil(value * p) / p;\r\n};\r\n\r\nmodule.exports = CeilTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Force a value within the boundaries by clamping it to the range `min`, `max`.\r\n *\r\n * @function Phaser.Math.Clamp\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to be clamped.\r\n * @param {number} min - The minimum bounds.\r\n * @param {number} max - The maximum bounds.\r\n *\r\n * @return {number} The clamped value.\r\n */\r\nvar Clamp = function (value, min, max)\r\n{\r\n return Math.max(min, Math.min(max, value));\r\n};\r\n\r\nmodule.exports = Clamp;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\n\r\n/**\r\n * Convert the given angle from degrees, to the equivalent angle in radians.\r\n *\r\n * @function Phaser.Math.DegToRad\r\n * @since 3.0.0\r\n *\r\n * @param {integer} degrees - The angle (in degrees) to convert to radians.\r\n *\r\n * @return {number} The given angle converted to radians.\r\n */\r\nvar DegToRad = function (degrees)\r\n{\r\n return degrees * CONST.DEG_TO_RAD;\r\n};\r\n\r\nmodule.exports = DegToRad;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the positive difference of two given numbers.\r\n *\r\n * @function Phaser.Math.Difference\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first number in the calculation.\r\n * @param {number} b - The second number in the calculation.\r\n *\r\n * @return {number} The positive difference of the two given numbers.\r\n */\r\nvar Difference = function (a, b)\r\n{\r\n return Math.abs(a - b);\r\n};\r\n\r\nmodule.exports = Difference;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the factorial of a given number for integer values greater than 0.\r\n *\r\n * @function Phaser.Math.Factorial\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - A positive integer to calculate the factorial of.\r\n *\r\n * @return {number} The factorial of the given number.\r\n */\r\nvar Factorial = function (value)\r\n{\r\n if (value === 0)\r\n {\r\n return 1;\r\n }\r\n\r\n var res = value;\r\n\r\n while (--value)\r\n {\r\n res *= value;\r\n }\r\n\r\n return res;\r\n};\r\n\r\nmodule.exports = Factorial;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive.\r\n *\r\n * @function Phaser.Math.FloatBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The lower bound for the float, inclusive.\r\n * @param {number} max - The upper bound for the float exclusive.\r\n *\r\n * @return {number} A random float within the given range.\r\n */\r\nvar FloatBetween = function (min, max)\r\n{\r\n return Math.random() * (max - min) + min;\r\n};\r\n\r\nmodule.exports = FloatBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Floors to some place comparative to a `base`, default is 10 for decimal place.\r\n *\r\n * The `place` is represented by the power applied to `base` to get that place.\r\n *\r\n * @function Phaser.Math.FloorTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {integer} [place=0] - The place to round to.\r\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar FloorTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.floor(value * p) / p;\r\n};\r\n\r\nmodule.exports = FloorTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('./Clamp');\r\n\r\n/**\r\n * Return a value based on the range between `min` and `max` and the percentage given.\r\n *\r\n * @function Phaser.Math.FromPercent\r\n * @since 3.0.0\r\n *\r\n * @param {number} percent - A value between 0 and 1 representing the percentage.\r\n * @param {number} min - The minimum value.\r\n * @param {number} [max] - The maximum value.\r\n *\r\n * @return {number} The value that is `percent` percent between `min` and `max`.\r\n */\r\nvar FromPercent = function (percent, min, max)\r\n{\r\n percent = Clamp(percent, 0, 1);\r\n\r\n return (max - min) * percent;\r\n};\r\n\r\nmodule.exports = FromPercent;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a per-ms speed from a distance and time (given in seconds).\r\n *\r\n * @function Phaser.Math.GetSpeed\r\n * @since 3.0.0\r\n *\r\n * @param {number} distance - The distance.\r\n * @param {integer} time - The time, in seconds.\r\n *\r\n * @return {number} The speed, in distance per ms.\r\n *\r\n * @example\r\n * // 400px over 1 second is 0.4 px/ms\r\n * Phaser.Math.GetSpeed(400, 1) // -> 0.4\r\n */\r\nvar GetSpeed = function (distance, time)\r\n{\r\n return (distance / time) / 1000;\r\n};\r\n\r\nmodule.exports = GetSpeed;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if a given value is an even number.\r\n *\r\n * @function Phaser.Math.IsEven\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to perform the check with.\r\n *\r\n * @return {boolean} Whether the number is even or not.\r\n */\r\nvar IsEven = function (value)\r\n{\r\n // Use abstract equality == for \"is number\" test\r\n\r\n // eslint-disable-next-line eqeqeq\r\n return (value == parseFloat(value)) ? !(value % 2) : void 0;\r\n};\r\n\r\nmodule.exports = IsEven;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if a given value is an even number using a strict type check.\r\n *\r\n * @function Phaser.Math.IsEvenStrict\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to perform the check with.\r\n *\r\n * @return {boolean} Whether the number is even or not.\r\n */\r\nvar IsEvenStrict = function (value)\r\n{\r\n // Use strict equality === for \"is number\" test\r\n return (value === parseFloat(value)) ? !(value % 2) : void 0;\r\n};\r\n\r\nmodule.exports = IsEvenStrict;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates a linear (interpolation) value over t.\r\n *\r\n * @function Phaser.Math.Linear\r\n * @since 3.0.0\r\n *\r\n * @param {number} p0 - The first point.\r\n * @param {number} p1 - The second point.\r\n * @param {number} t - The percentage between p0 and p1 to return, represented as a number between 0 and 1.\r\n *\r\n * @return {number} The step t% of the way between p0 and p1.\r\n */\r\nvar Linear = function (p0, p1, t)\r\n{\r\n return (p1 - p0) * t + p0;\r\n};\r\n\r\nmodule.exports = Linear;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A three-dimensional matrix.\r\n *\r\n * Defaults to the identity matrix when instantiated.\r\n *\r\n * @class Matrix3\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} [m] - Optional Matrix3 to copy values from.\r\n */\r\nvar Matrix3 = new Class({\r\n\r\n initialize:\r\n\r\n function Matrix3 (m)\r\n {\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.Math.Matrix3#val\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.val = new Float32Array(9);\r\n\r\n if (m)\r\n {\r\n // Assume Matrix3 with val:\r\n this.copy(m);\r\n }\r\n else\r\n {\r\n // Default to identity\r\n this.identity();\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Matrix3.\r\n *\r\n * @method Phaser.Math.Matrix3#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} A clone of this Matrix3.\r\n */\r\n clone: function ()\r\n {\r\n return new Matrix3(this);\r\n },\r\n\r\n /**\r\n * This method is an alias for `Matrix3.copy`.\r\n *\r\n * @method Phaser.Math.Matrix3#set\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to set the values of this Matrix's from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n set: function (src)\r\n {\r\n return this.copy(src);\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix into this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n copy: function (src)\r\n {\r\n var out = this.val;\r\n var a = src.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix4 into this Matrix3.\r\n *\r\n * @method Phaser.Math.Matrix3#fromMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromMat4: function (m)\r\n {\r\n var a = m.val;\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[4];\r\n out[4] = a[5];\r\n out[5] = a[6];\r\n out[6] = a[8];\r\n out[7] = a[9];\r\n out[8] = a[10];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given array.\r\n *\r\n * @method Phaser.Math.Matrix3#fromArray\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The array to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromArray: function (a)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n identity: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 1;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 1;\r\n out[5] = 0;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transpose this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#transpose\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n transpose: function ()\r\n {\r\n var a = this.val;\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a12 = a[5];\r\n\r\n a[1] = a[3];\r\n a[2] = a[6];\r\n a[3] = a01;\r\n a[5] = a[7];\r\n a[6] = a02;\r\n a[7] = a12;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n invert: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n var b01 = a22 * a11 - a12 * a21;\r\n var b11 = -a22 * a10 + a12 * a20;\r\n var b21 = a21 * a10 - a11 * a20;\r\n\r\n // Calculate the determinant\r\n var det = a00 * b01 + a01 * b11 + a02 * b21;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n a[0] = b01 * det;\r\n a[1] = (-a22 * a01 + a02 * a21) * det;\r\n a[2] = (a12 * a01 - a02 * a11) * det;\r\n a[3] = b11 * det;\r\n a[4] = (a22 * a00 - a02 * a20) * det;\r\n a[5] = (-a12 * a00 + a02 * a10) * det;\r\n a[6] = b21 * det;\r\n a[7] = (-a21 * a00 + a01 * a20) * det;\r\n a[8] = (a11 * a00 - a01 * a10) * det;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the adjoint, or adjugate, of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#adjoint\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n adjoint: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n a[0] = (a11 * a22 - a12 * a21);\r\n a[1] = (a02 * a21 - a01 * a22);\r\n a[2] = (a01 * a12 - a02 * a11);\r\n a[3] = (a12 * a20 - a10 * a22);\r\n a[4] = (a00 * a22 - a02 * a20);\r\n a[5] = (a02 * a10 - a00 * a12);\r\n a[6] = (a10 * a21 - a11 * a20);\r\n a[7] = (a01 * a20 - a00 * a21);\r\n a[8] = (a00 * a11 - a01 * a10);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the determinant of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#determinant\r\n * @since 3.0.0\r\n *\r\n * @return {number} The determinant of this Matrix.\r\n */\r\n determinant: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to multiply this Matrix by.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n multiply: function (src)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n var b = src.val;\r\n\r\n var b00 = b[0];\r\n var b01 = b[1];\r\n var b02 = b[2];\r\n var b10 = b[3];\r\n var b11 = b[4];\r\n var b12 = b[5];\r\n var b20 = b[6];\r\n var b21 = b[7];\r\n var b22 = b[8];\r\n\r\n a[0] = b00 * a00 + b01 * a10 + b02 * a20;\r\n a[1] = b00 * a01 + b01 * a11 + b02 * a21;\r\n a[2] = b00 * a02 + b01 * a12 + b02 * a22;\r\n\r\n a[3] = b10 * a00 + b11 * a10 + b12 * a20;\r\n a[4] = b10 * a01 + b11 * a11 + b12 * a21;\r\n a[5] = b10 * a02 + b11 * a12 + b12 * a22;\r\n\r\n a[6] = b20 * a00 + b21 * a10 + b22 * a20;\r\n a[7] = b20 * a01 + b21 * a11 + b22 * a21;\r\n a[8] = b20 * a02 + b21 * a12 + b22 * a22;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given Vector.\r\n *\r\n * @method Phaser.Math.Matrix3#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n translate: function (v)\r\n {\r\n var a = this.val;\r\n var x = v.x;\r\n var y = v.y;\r\n\r\n a[6] = x * a[0] + y * a[3] + a[6];\r\n a[7] = x * a[1] + y * a[4] + a[7];\r\n a[8] = x * a[2] + y * a[5] + a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a rotation transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n rotate: function (rad)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n a[0] = c * a00 + s * a10;\r\n a[1] = c * a01 + s * a11;\r\n a[2] = c * a02 + s * a12;\r\n\r\n a[3] = c * a10 - s * a00;\r\n a[4] = c * a11 - s * a01;\r\n a[5] = c * a12 - s * a02;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * Uses the `x` and `y` components of the given Vector to scale the Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#scale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n scale: function (v)\r\n {\r\n var a = this.val;\r\n var x = v.x;\r\n var y = v.y;\r\n\r\n a[0] = x * a[0];\r\n a[1] = x * a[1];\r\n a[2] = x * a[2];\r\n\r\n a[3] = y * a[3];\r\n a[4] = y * a[4];\r\n a[5] = y * a[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given Quaternion.\r\n *\r\n * @method Phaser.Math.Matrix3#fromQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromQuat: function (q)\r\n {\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n var out = this.val;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[3] = xy + wz;\r\n out[6] = xz - wy;\r\n\r\n out[1] = xy - wz;\r\n out[4] = 1 - (xx + zz);\r\n out[7] = yz + wx;\r\n\r\n out[2] = xz + wy;\r\n out[5] = yz - wx;\r\n out[8] = 1 - (xx + yy);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix3 to be normalized from the given Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix3#normalFromMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to normalize the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n normalFromMat4: function (m)\r\n {\r\n var a = m.val;\r\n var out = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\r\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\r\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\r\n\r\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\r\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\r\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\r\n\r\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\r\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\r\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Matrix3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\nvar EPSILON = 0.000001;\r\n\r\n/**\r\n * @classdesc\r\n * A four-dimensional matrix.\r\n *\r\n * @class Matrix4\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} [m] - Optional Matrix4 to copy values from.\r\n */\r\nvar Matrix4 = new Class({\r\n\r\n initialize:\r\n\r\n function Matrix4 (m)\r\n {\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.Math.Matrix4#val\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.val = new Float32Array(16);\r\n\r\n if (m)\r\n {\r\n // Assume Matrix4 with val:\r\n this.copy(m);\r\n }\r\n else\r\n {\r\n // Default to identity\r\n this.identity();\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} A clone of this Matrix4.\r\n */\r\n clone: function ()\r\n {\r\n return new Matrix4(this);\r\n },\r\n\r\n // TODO - Should work with basic values\r\n\r\n /**\r\n * This method is an alias for `Matrix4.copy`.\r\n *\r\n * @method Phaser.Math.Matrix4#set\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to set the values of this Matrix's from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n set: function (src)\r\n {\r\n return this.copy(src);\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix into this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n copy: function (src)\r\n {\r\n var out = this.val;\r\n var a = src.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n out[9] = a[9];\r\n out[10] = a[10];\r\n out[11] = a[11];\r\n out[12] = a[12];\r\n out[13] = a[13];\r\n out[14] = a[14];\r\n out[15] = a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given array.\r\n *\r\n * @method Phaser.Math.Matrix4#fromArray\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The array to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n fromArray: function (a)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n out[9] = a[9];\r\n out[10] = a[10];\r\n out[11] = a[11];\r\n out[12] = a[12];\r\n out[13] = a[13];\r\n out[14] = a[14];\r\n out[15] = a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix.\r\n *\r\n * Sets all values to `0`.\r\n *\r\n * @method Phaser.Math.Matrix4#zero\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n zero: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 0;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 0;\r\n out[5] = 0;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = 0;\r\n out[11] = 0;\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = 0;\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x`, `y` and `z` values of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#xyz\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {number} z - The z value.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n xyz: function (x, y, z)\r\n {\r\n this.identity();\r\n\r\n var out = this.val;\r\n\r\n out[12] = x;\r\n out[13] = y;\r\n out[14] = z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the scaling values of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scaling\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x scaling value.\r\n * @param {number} y - The y scaling value.\r\n * @param {number} z - The z scaling value.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n scaling: function (x, y, z)\r\n {\r\n this.zero();\r\n\r\n var out = this.val;\r\n\r\n out[0] = x;\r\n out[5] = y;\r\n out[10] = z;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n identity: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 1;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 0;\r\n out[5] = 1;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = 1;\r\n out[11] = 0;\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = 0;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transpose this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#transpose\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n transpose: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n var a23 = a[11];\r\n\r\n a[1] = a[4];\r\n a[2] = a[8];\r\n a[3] = a[12];\r\n a[4] = a01;\r\n a[6] = a[9];\r\n a[7] = a[13];\r\n a[8] = a02;\r\n a[9] = a12;\r\n a[11] = a[14];\r\n a[12] = a03;\r\n a[13] = a13;\r\n a[14] = a23;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n invert: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n a[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\r\n a[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\r\n a[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\r\n a[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\r\n a[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\r\n a[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\r\n a[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\r\n a[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\r\n a[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\r\n a[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\r\n a[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\r\n a[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\r\n a[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\r\n a[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\r\n a[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\r\n a[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the adjoint, or adjugate, of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#adjoint\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n adjoint: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n a[0] = (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22));\r\n a[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));\r\n a[2] = (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12));\r\n a[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));\r\n a[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));\r\n a[5] = (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22));\r\n a[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));\r\n a[7] = (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12));\r\n a[8] = (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21));\r\n a[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));\r\n a[10] = (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11));\r\n a[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));\r\n a[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));\r\n a[13] = (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21));\r\n a[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));\r\n a[15] = (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the determinant of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#determinant\r\n * @since 3.0.0\r\n *\r\n * @return {number} The determinant of this Matrix.\r\n */\r\n determinant: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to multiply this Matrix by.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n multiply: function (src)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b = src.val;\r\n\r\n // Cache only the current line of the second matrix\r\n var b0 = b[0];\r\n var b1 = b[1];\r\n var b2 = b[2];\r\n var b3 = b[3];\r\n\r\n a[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[4];\r\n b1 = b[5];\r\n b2 = b[6];\r\n b3 = b[7];\r\n\r\n a[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[8];\r\n b1 = b[9];\r\n b2 = b[10];\r\n b3 = b[11];\r\n\r\n a[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[12];\r\n b1 = b[13];\r\n b2 = b[14];\r\n b3 = b[15];\r\n\r\n a[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply the values of this Matrix4 by those given in the `src` argument.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyLocal\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The source Matrix4 that this Matrix4 is multiplied by.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n multiplyLocal: function (src)\r\n {\r\n var a = [];\r\n var m1 = this.val;\r\n var m2 = src.val;\r\n\r\n a[0] = m1[0] * m2[0] + m1[1] * m2[4] + m1[2] * m2[8] + m1[3] * m2[12];\r\n a[1] = m1[0] * m2[1] + m1[1] * m2[5] + m1[2] * m2[9] + m1[3] * m2[13];\r\n a[2] = m1[0] * m2[2] + m1[1] * m2[6] + m1[2] * m2[10] + m1[3] * m2[14];\r\n a[3] = m1[0] * m2[3] + m1[1] * m2[7] + m1[2] * m2[11] + m1[3] * m2[15];\r\n\r\n a[4] = m1[4] * m2[0] + m1[5] * m2[4] + m1[6] * m2[8] + m1[7] * m2[12];\r\n a[5] = m1[4] * m2[1] + m1[5] * m2[5] + m1[6] * m2[9] + m1[7] * m2[13];\r\n a[6] = m1[4] * m2[2] + m1[5] * m2[6] + m1[6] * m2[10] + m1[7] * m2[14];\r\n a[7] = m1[4] * m2[3] + m1[5] * m2[7] + m1[6] * m2[11] + m1[7] * m2[15];\r\n\r\n a[8] = m1[8] * m2[0] + m1[9] * m2[4] + m1[10] * m2[8] + m1[11] * m2[12];\r\n a[9] = m1[8] * m2[1] + m1[9] * m2[5] + m1[10] * m2[9] + m1[11] * m2[13];\r\n a[10] = m1[8] * m2[2] + m1[9] * m2[6] + m1[10] * m2[10] + m1[11] * m2[14];\r\n a[11] = m1[8] * m2[3] + m1[9] * m2[7] + m1[10] * m2[11] + m1[11] * m2[15];\r\n\r\n a[12] = m1[12] * m2[0] + m1[13] * m2[4] + m1[14] * m2[8] + m1[15] * m2[12];\r\n a[13] = m1[12] * m2[1] + m1[13] * m2[5] + m1[14] * m2[9] + m1[15] * m2[13];\r\n a[14] = m1[12] * m2[2] + m1[13] * m2[6] + m1[14] * m2[10] + m1[15] * m2[14];\r\n a[15] = m1[12] * m2[3] + m1[13] * m2[7] + m1[14] * m2[11] + m1[15] * m2[15];\r\n\r\n return this.fromArray(a);\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given Vector.\r\n *\r\n * @method Phaser.Math.Matrix4#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n translate: function (v)\r\n {\r\n var x = v.x;\r\n var y = v.y;\r\n var z = v.z;\r\n var a = this.val;\r\n\r\n a[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\r\n a[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\r\n a[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\r\n a[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given values.\r\n *\r\n * @method Phaser.Math.Matrix4#translateXYZ\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n translateXYZ: function (x, y, z)\r\n {\r\n var a = this.val;\r\n\r\n a[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\r\n a[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\r\n a[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\r\n a[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * Uses the `x`, `y` and `z` components of the given Vector to scale the Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n scale: function (v)\r\n {\r\n var x = v.x;\r\n var y = v.y;\r\n var z = v.z;\r\n var a = this.val;\r\n\r\n a[0] = a[0] * x;\r\n a[1] = a[1] * x;\r\n a[2] = a[2] * x;\r\n a[3] = a[3] * x;\r\n\r\n a[4] = a[4] * y;\r\n a[5] = a[5] * y;\r\n a[6] = a[6] * y;\r\n a[7] = a[7] * y;\r\n\r\n a[8] = a[8] * z;\r\n a[9] = a[9] * z;\r\n a[10] = a[10] * z;\r\n a[11] = a[11] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scaleXYZ\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n scaleXYZ: function (x, y, z)\r\n {\r\n var a = this.val;\r\n\r\n a[0] = a[0] * x;\r\n a[1] = a[1] * x;\r\n a[2] = a[2] * x;\r\n a[3] = a[3] * x;\r\n\r\n a[4] = a[4] * y;\r\n a[5] = a[5] * y;\r\n a[6] = a[6] * y;\r\n a[7] = a[7] * y;\r\n\r\n a[8] = a[8] * z;\r\n a[9] = a[9] * z;\r\n a[10] = a[10] * z;\r\n a[11] = a[11] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Derive a rotation matrix around the given axis.\r\n *\r\n * @method Phaser.Math.Matrix4#makeRotationAxis\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} axis - The rotation axis.\r\n * @param {number} angle - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n makeRotationAxis: function (axis, angle)\r\n {\r\n // Based on http://www.gamedev.net/reference/articles/article1199.asp\r\n\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n var t = 1 - c;\r\n var x = axis.x;\r\n var y = axis.y;\r\n var z = axis.z;\r\n var tx = t * x;\r\n var ty = t * y;\r\n\r\n this.fromArray([\r\n tx * x + c, tx * y - s * z, tx * z + s * y, 0,\r\n tx * y + s * z, ty * y + c, ty * z - s * x, 0,\r\n tx * z - s * y, ty * z + s * x, t * z * z + c, 0,\r\n 0, 0, 0, 1\r\n ]);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a rotation transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n * @param {Phaser.Math.Vector3} axis - The axis to rotate upon.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotate: function (rad, axis)\r\n {\r\n var a = this.val;\r\n var x = axis.x;\r\n var y = axis.y;\r\n var z = axis.z;\r\n var len = Math.sqrt(x * x + y * y + z * z);\r\n\r\n if (Math.abs(len) < EPSILON)\r\n {\r\n return null;\r\n }\r\n\r\n len = 1 / len;\r\n x *= len;\r\n y *= len;\r\n z *= len;\r\n\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n var t = 1 - c;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Construct the elements of the rotation matrix\r\n var b00 = x * x * t + c;\r\n var b01 = y * x * t + z * s;\r\n var b02 = z * x * t - y * s;\r\n\r\n var b10 = x * y * t - z * s;\r\n var b11 = y * y * t + c;\r\n var b12 = z * y * t + x * s;\r\n\r\n var b20 = x * z * t + y * s;\r\n var b21 = y * z * t - x * s;\r\n var b22 = z * z * t + c;\r\n\r\n // Perform rotation-specific matrix multiplication\r\n a[0] = a00 * b00 + a10 * b01 + a20 * b02;\r\n a[1] = a01 * b00 + a11 * b01 + a21 * b02;\r\n a[2] = a02 * b00 + a12 * b01 + a22 * b02;\r\n a[3] = a03 * b00 + a13 * b01 + a23 * b02;\r\n a[4] = a00 * b10 + a10 * b11 + a20 * b12;\r\n a[5] = a01 * b10 + a11 * b11 + a21 * b12;\r\n a[6] = a02 * b10 + a12 * b11 + a22 * b12;\r\n a[7] = a03 * b10 + a13 * b11 + a23 * b12;\r\n a[8] = a00 * b20 + a10 * b21 + a20 * b22;\r\n a[9] = a01 * b20 + a11 * b21 + a21 * b22;\r\n a[10] = a02 * b20 + a12 * b21 + a22 * b22;\r\n a[11] = a03 * b20 + a13 * b21 + a23 * b22;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its X axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotateX: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[4] = a10 * c + a20 * s;\r\n a[5] = a11 * c + a21 * s;\r\n a[6] = a12 * c + a22 * s;\r\n a[7] = a13 * c + a23 * s;\r\n a[8] = a20 * c - a10 * s;\r\n a[9] = a21 * c - a11 * s;\r\n a[10] = a22 * c - a12 * s;\r\n a[11] = a23 * c - a13 * s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its Y axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle to rotate by, in radians.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotateY: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[0] = a00 * c - a20 * s;\r\n a[1] = a01 * c - a21 * s;\r\n a[2] = a02 * c - a22 * s;\r\n a[3] = a03 * c - a23 * s;\r\n a[8] = a00 * s + a20 * c;\r\n a[9] = a01 * s + a21 * c;\r\n a[10] = a02 * s + a22 * c;\r\n a[11] = a03 * s + a23 * c;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its Z axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle to rotate by, in radians.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotateZ: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[0] = a00 * c + a10 * s;\r\n a[1] = a01 * c + a11 * s;\r\n a[2] = a02 * c + a12 * s;\r\n a[3] = a03 * c + a13 * s;\r\n a[4] = a10 * c - a00 * s;\r\n a[5] = a11 * c - a01 * s;\r\n a[6] = a12 * c - a02 * s;\r\n a[7] = a13 * c - a03 * s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given rotation Quaternion and translation Vector.\r\n *\r\n * @method Phaser.Math.Matrix4#fromRotationTranslation\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set rotation from.\r\n * @param {Phaser.Math.Vector3} v - The Vector to set translation from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n fromRotationTranslation: function (q, v)\r\n {\r\n // Quaternion math\r\n var out = this.val;\r\n\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[1] = xy + wz;\r\n out[2] = xz - wy;\r\n out[3] = 0;\r\n\r\n out[4] = xy - wz;\r\n out[5] = 1 - (xx + zz);\r\n out[6] = yz + wx;\r\n out[7] = 0;\r\n\r\n out[8] = xz + wy;\r\n out[9] = yz - wx;\r\n out[10] = 1 - (xx + yy);\r\n out[11] = 0;\r\n\r\n out[12] = v.x;\r\n out[13] = v.y;\r\n out[14] = v.z;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given Quaternion.\r\n *\r\n * @method Phaser.Math.Matrix4#fromQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n fromQuat: function (q)\r\n {\r\n var out = this.val;\r\n\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[1] = xy + wz;\r\n out[2] = xz - wy;\r\n out[3] = 0;\r\n\r\n out[4] = xy - wz;\r\n out[5] = 1 - (xx + zz);\r\n out[6] = yz + wx;\r\n out[7] = 0;\r\n\r\n out[8] = xz + wy;\r\n out[9] = yz - wx;\r\n out[10] = 1 - (xx + yy);\r\n out[11] = 0;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = 0;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a frustum matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#frustum\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left bound of the frustum.\r\n * @param {number} right - The right bound of the frustum.\r\n * @param {number} bottom - The bottom bound of the frustum.\r\n * @param {number} top - The top bound of the frustum.\r\n * @param {number} near - The near bound of the frustum.\r\n * @param {number} far - The far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n frustum: function (left, right, bottom, top, near, far)\r\n {\r\n var out = this.val;\r\n\r\n var rl = 1 / (right - left);\r\n var tb = 1 / (top - bottom);\r\n var nf = 1 / (near - far);\r\n\r\n out[0] = (near * 2) * rl;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = (near * 2) * tb;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = (right + left) * rl;\r\n out[9] = (top + bottom) * tb;\r\n out[10] = (far + near) * nf;\r\n out[11] = -1;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = (far * near * 2) * nf;\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a perspective projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#perspective\r\n * @since 3.0.0\r\n *\r\n * @param {number} fovy - Vertical field of view in radians\r\n * @param {number} aspect - Aspect ratio. Typically viewport width /height.\r\n * @param {number} near - Near bound of the frustum.\r\n * @param {number} far - Far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n perspective: function (fovy, aspect, near, far)\r\n {\r\n var out = this.val;\r\n var f = 1.0 / Math.tan(fovy / 2);\r\n var nf = 1 / (near - far);\r\n\r\n out[0] = f / aspect;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = f;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = (far + near) * nf;\r\n out[11] = -1;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = (2 * far * near) * nf;\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a perspective projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#perspectiveLH\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of the frustum.\r\n * @param {number} height - The height of the frustum.\r\n * @param {number} near - Near bound of the frustum.\r\n * @param {number} far - Far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n perspectiveLH: function (width, height, near, far)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = (2 * near) / width;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = (2 * near) / height;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = -far / (near - far);\r\n out[11] = 1;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = (near * far) / (near - far);\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate an orthogonal projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#ortho\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left bound of the frustum.\r\n * @param {number} right - The right bound of the frustum.\r\n * @param {number} bottom - The bottom bound of the frustum.\r\n * @param {number} top - The top bound of the frustum.\r\n * @param {number} near - The near bound of the frustum.\r\n * @param {number} far - The far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n ortho: function (left, right, bottom, top, near, far)\r\n {\r\n var out = this.val;\r\n var lr = left - right;\r\n var bt = bottom - top;\r\n var nf = near - far;\r\n\r\n // Avoid division by zero\r\n lr = (lr === 0) ? lr : 1 / lr;\r\n bt = (bt === 0) ? bt : 1 / bt;\r\n nf = (nf === 0) ? nf : 1 / nf;\r\n\r\n out[0] = -2 * lr;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = -2 * bt;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = 2 * nf;\r\n out[11] = 0;\r\n\r\n out[12] = (left + right) * lr;\r\n out[13] = (top + bottom) * bt;\r\n out[14] = (far + near) * nf;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a look-at matrix with the given eye position, focal point, and up axis.\r\n *\r\n * @method Phaser.Math.Matrix4#lookAt\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} eye - Position of the viewer\r\n * @param {Phaser.Math.Vector3} center - Point the viewer is looking at\r\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n lookAt: function (eye, center, up)\r\n {\r\n var out = this.val;\r\n\r\n var eyex = eye.x;\r\n var eyey = eye.y;\r\n var eyez = eye.z;\r\n\r\n var upx = up.x;\r\n var upy = up.y;\r\n var upz = up.z;\r\n\r\n var centerx = center.x;\r\n var centery = center.y;\r\n var centerz = center.z;\r\n\r\n if (Math.abs(eyex - centerx) < EPSILON &&\r\n Math.abs(eyey - centery) < EPSILON &&\r\n Math.abs(eyez - centerz) < EPSILON)\r\n {\r\n return this.identity();\r\n }\r\n\r\n var z0 = eyex - centerx;\r\n var z1 = eyey - centery;\r\n var z2 = eyez - centerz;\r\n\r\n var len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);\r\n\r\n z0 *= len;\r\n z1 *= len;\r\n z2 *= len;\r\n\r\n var x0 = upy * z2 - upz * z1;\r\n var x1 = upz * z0 - upx * z2;\r\n var x2 = upx * z1 - upy * z0;\r\n\r\n len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);\r\n\r\n if (!len)\r\n {\r\n x0 = 0;\r\n x1 = 0;\r\n x2 = 0;\r\n }\r\n else\r\n {\r\n len = 1 / len;\r\n x0 *= len;\r\n x1 *= len;\r\n x2 *= len;\r\n }\r\n\r\n var y0 = z1 * x2 - z2 * x1;\r\n var y1 = z2 * x0 - z0 * x2;\r\n var y2 = z0 * x1 - z1 * x0;\r\n\r\n len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);\r\n\r\n if (!len)\r\n {\r\n y0 = 0;\r\n y1 = 0;\r\n y2 = 0;\r\n }\r\n else\r\n {\r\n len = 1 / len;\r\n y0 *= len;\r\n y1 *= len;\r\n y2 *= len;\r\n }\r\n\r\n out[0] = x0;\r\n out[1] = y0;\r\n out[2] = z0;\r\n out[3] = 0;\r\n\r\n out[4] = x1;\r\n out[5] = y1;\r\n out[6] = z1;\r\n out[7] = 0;\r\n\r\n out[8] = x2;\r\n out[9] = y2;\r\n out[10] = z2;\r\n out[11] = 0;\r\n\r\n out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\r\n out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\r\n out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this matrix from the given `yaw`, `pitch` and `roll` values.\r\n *\r\n * @method Phaser.Math.Matrix4#yawPitchRoll\r\n * @since 3.0.0\r\n *\r\n * @param {number} yaw - The yaw value.\r\n * @param {number} pitch - The pitch value.\r\n * @param {number} roll - The roll value.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n yawPitchRoll: function (yaw, pitch, roll)\r\n {\r\n this.zero();\r\n _tempMat1.zero();\r\n _tempMat2.zero();\r\n\r\n var m0 = this.val;\r\n var m1 = _tempMat1.val;\r\n var m2 = _tempMat2.val;\r\n\r\n // Rotate Z\r\n var s = Math.sin(roll);\r\n var c = Math.cos(roll);\r\n\r\n m0[10] = 1;\r\n m0[15] = 1;\r\n m0[0] = c;\r\n m0[1] = s;\r\n m0[4] = -s;\r\n m0[5] = c;\r\n\r\n // Rotate X\r\n s = Math.sin(pitch);\r\n c = Math.cos(pitch);\r\n\r\n m1[0] = 1;\r\n m1[15] = 1;\r\n m1[5] = c;\r\n m1[10] = c;\r\n m1[9] = -s;\r\n m1[6] = s;\r\n\r\n // Rotate Y\r\n s = Math.sin(yaw);\r\n c = Math.cos(yaw);\r\n\r\n m2[5] = 1;\r\n m2[15] = 1;\r\n m2[0] = c;\r\n m2[2] = -s;\r\n m2[8] = s;\r\n m2[10] = c;\r\n\r\n this.multiplyLocal(_tempMat1);\r\n this.multiplyLocal(_tempMat2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a world matrix from the given rotation, position, scale, view matrix and projection matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#setWorldMatrix\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} rotation - The rotation of the world matrix.\r\n * @param {Phaser.Math.Vector3} position - The position of the world matrix.\r\n * @param {Phaser.Math.Vector3} scale - The scale of the world matrix.\r\n * @param {Phaser.Math.Matrix4} [viewMatrix] - The view matrix.\r\n * @param {Phaser.Math.Matrix4} [projectionMatrix] - The projection matrix.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n setWorldMatrix: function (rotation, position, scale, viewMatrix, projectionMatrix)\r\n {\r\n this.yawPitchRoll(rotation.y, rotation.x, rotation.z);\r\n\r\n _tempMat1.scaling(scale.x, scale.y, scale.z);\r\n _tempMat2.xyz(position.x, position.y, position.z);\r\n\r\n this.multiplyLocal(_tempMat1);\r\n this.multiplyLocal(_tempMat2);\r\n\r\n if (viewMatrix !== undefined)\r\n {\r\n this.multiplyLocal(viewMatrix);\r\n }\r\n\r\n if (projectionMatrix !== undefined)\r\n {\r\n this.multiplyLocal(projectionMatrix);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nvar _tempMat1 = new Matrix4();\r\nvar _tempMat2 = new Matrix4();\r\n\r\nmodule.exports = Matrix4;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Add an `amount` to a `value`, limiting the maximum result to `max`.\r\n *\r\n * @function Phaser.Math.MaxAdd\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to add to.\r\n * @param {number} amount - The amount to add.\r\n * @param {number} max - The maximum value to return.\r\n *\r\n * @return {number} The resulting value.\r\n */\r\nvar MaxAdd = function (value, amount, max)\r\n{\r\n return Math.min(value + amount, max);\r\n};\r\n\r\nmodule.exports = MaxAdd;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Subtract an `amount` from `value`, limiting the minimum result to `min`.\r\n *\r\n * @function Phaser.Math.MinSub\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to subtract from.\r\n * @param {number} amount - The amount to subtract.\r\n * @param {number} min - The minimum value to return.\r\n *\r\n * @return {number} The resulting value.\r\n */\r\nvar MinSub = function (value, amount, min)\r\n{\r\n return Math.max(value - amount, min);\r\n};\r\n\r\nmodule.exports = MinSub;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Work out what percentage `value` is of the range between `min` and `max`.\r\n * If `max` isn't given then it will return the percentage of `value` to `min`.\r\n *\r\n * You can optionally specify an `upperMax` value, which is a mid-way point in the range that represents 100%, after which the % starts to go down to zero again.\r\n *\r\n * @function Phaser.Math.Percent\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to determine the percentage of.\r\n * @param {number} min - The minimum value.\r\n * @param {number} [max] - The maximum value.\r\n * @param {number} [upperMax] - The mid-way point in the range that represents 100%.\r\n *\r\n * @return {number} A value between 0 and 1 representing the percentage.\r\n */\r\nvar Percent = function (value, min, max, upperMax)\r\n{\r\n if (max === undefined) { max = min + 1; }\r\n\r\n var percentage = (value - min) / (max - min);\r\n\r\n if (percentage > 1)\r\n {\r\n if (upperMax !== undefined)\r\n {\r\n percentage = ((upperMax - value)) / (upperMax - max);\r\n\r\n if (percentage < 0)\r\n {\r\n percentage = 0;\r\n }\r\n }\r\n else\r\n {\r\n percentage = 1;\r\n }\r\n }\r\n else if (percentage < 0)\r\n {\r\n percentage = 0;\r\n }\r\n\r\n return percentage;\r\n};\r\n\r\nmodule.exports = Percent;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\nvar Vector3 = require('./Vector3');\r\nvar Matrix3 = require('./Matrix3');\r\n\r\nvar EPSILON = 0.000001;\r\n\r\n// Some shared 'private' arrays\r\nvar siNext = new Int8Array([ 1, 2, 0 ]);\r\nvar tmp = new Float32Array([ 0, 0, 0 ]);\r\n\r\nvar xUnitVec3 = new Vector3(1, 0, 0);\r\nvar yUnitVec3 = new Vector3(0, 1, 0);\r\n\r\nvar tmpvec = new Vector3();\r\nvar tmpMat3 = new Matrix3();\r\n\r\n/**\r\n * @classdesc\r\n * A quaternion.\r\n *\r\n * @class Quaternion\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n * @param {number} [w] - The w component.\r\n */\r\nvar Quaternion = new Class({\r\n\r\n initialize:\r\n\r\n function Quaternion (x, y, z, w)\r\n {\r\n /**\r\n * The x component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n /**\r\n * The y component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n /**\r\n * The z component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n /**\r\n * The w component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Copy the components of a given Quaternion or Vector into this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#copy\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} src - The Quaternion or Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z;\r\n this.w = src.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the components of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} [x=0] - The x component, or an object containing x, y, z, and w components.\r\n * @param {number} [y=0] - The y component.\r\n * @param {number} [z=0] - The z component.\r\n * @param {number} [w=0] - The w component.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n set: function (x, y, z, w)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Quaternion or Vector to this Quaternion. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Quaternion#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to add to this Quaternion.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z;\r\n this.w += v.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract a given Quaternion or Vector from this Quaternion. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Quaternion#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to subtract from this Quaternion.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z;\r\n this.w -= v.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Quaternion by the given value.\r\n *\r\n * @method Phaser.Math.Quaternion#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Quaternion by.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n scale: function (scale)\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n this.w *= scale;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the length of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Quaternion.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return Math.sqrt(x * x + y * y + z * z + w * w);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Quaternion squared.\r\n *\r\n * @method Phaser.Math.Quaternion#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Quaternion, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n },\r\n\r\n /**\r\n * Normalize this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var len = x * x + y * y + z * z + w * w;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n this.w = w * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Quaternion and the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#dot\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to dot product with this Quaternion.\r\n *\r\n * @return {number} The dot product of this Quaternion and the given Quaternion or Vector.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\r\n },\r\n\r\n /**\r\n * Linearly interpolate this Quaternion towards the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to interpolate towards.\r\n * @param {number} [t=0] - The percentage of interpolation.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n this.w = aw + t * (v.w - aw);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotates this Quaternion based on the two given vectors.\r\n *\r\n * @method Phaser.Math.Quaternion#rotationTo\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The transform rotation vector.\r\n * @param {Phaser.Math.Vector3} b - The target rotation vector.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotationTo: function (a, b)\r\n {\r\n var dot = a.x * b.x + a.y * b.y + a.z * b.z;\r\n\r\n if (dot < -0.999999)\r\n {\r\n if (tmpvec.copy(xUnitVec3).cross(a).length() < EPSILON)\r\n {\r\n tmpvec.copy(yUnitVec3).cross(a);\r\n }\r\n\r\n tmpvec.normalize();\r\n\r\n return this.setAxisAngle(tmpvec, Math.PI);\r\n\r\n }\r\n else if (dot > 0.999999)\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 1;\r\n\r\n return this;\r\n }\r\n else\r\n {\r\n tmpvec.copy(a).cross(b);\r\n\r\n this.x = tmpvec.x;\r\n this.y = tmpvec.y;\r\n this.z = tmpvec.z;\r\n this.w = 1 + dot;\r\n\r\n return this.normalize();\r\n }\r\n },\r\n\r\n /**\r\n * Set the axes of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#setAxes\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} view - The view axis.\r\n * @param {Phaser.Math.Vector3} right - The right axis.\r\n * @param {Phaser.Math.Vector3} up - The upwards axis.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setAxes: function (view, right, up)\r\n {\r\n var m = tmpMat3.val;\r\n\r\n m[0] = right.x;\r\n m[3] = right.y;\r\n m[6] = right.z;\r\n\r\n m[1] = up.x;\r\n m[4] = up.y;\r\n m[7] = up.z;\r\n\r\n m[2] = -view.x;\r\n m[5] = -view.y;\r\n m[8] = -view.z;\r\n\r\n return this.fromMat3(tmpMat3).normalize();\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n identity: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the axis angle of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#setAxisAngle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} axis - The axis.\r\n * @param {number} rad - The angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setAxisAngle: function (axis, rad)\r\n {\r\n rad = rad * 0.5;\r\n\r\n var s = Math.sin(rad);\r\n\r\n this.x = s * axis.x;\r\n this.y = s * axis.y;\r\n this.z = s * axis.z;\r\n this.w = Math.cos(rad);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply this Quaternion by the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to multiply this Quaternion by.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n multiply: function (b)\r\n {\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n var bw = b.w;\r\n\r\n this.x = ax * bw + aw * bx + ay * bz - az * by;\r\n this.y = ay * bw + aw * by + az * bx - ax * bz;\r\n this.z = az * bw + aw * bz + ax * by - ay * bx;\r\n this.w = aw * bw - ax * bx - ay * by - az * bz;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Smoothly linearly interpolate this Quaternion towards the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#slerp\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to interpolate towards.\r\n * @param {number} t - The percentage of interpolation.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n slerp: function (b, t)\r\n {\r\n // benchmarks: http://jsperf.com/quaternion-slerp-implementations\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n var bw = b.w;\r\n\r\n // calc cosine\r\n var cosom = ax * bx + ay * by + az * bz + aw * bw;\r\n\r\n // adjust signs (if necessary)\r\n if (cosom < 0)\r\n {\r\n cosom = -cosom;\r\n bx = - bx;\r\n by = - by;\r\n bz = - bz;\r\n bw = - bw;\r\n }\r\n\r\n // \"from\" and \"to\" quaternions are very close\r\n // ... so we can do a linear interpolation\r\n var scale0 = 1 - t;\r\n var scale1 = t;\r\n\r\n // calculate coefficients\r\n if ((1 - cosom) > EPSILON)\r\n {\r\n // standard case (slerp)\r\n var omega = Math.acos(cosom);\r\n var sinom = Math.sin(omega);\r\n\r\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\r\n scale1 = Math.sin(t * omega) / sinom;\r\n }\r\n\r\n // calculate final values\r\n this.x = scale0 * ax + scale1 * bx;\r\n this.y = scale0 * ay + scale1 * by;\r\n this.z = scale0 * az + scale1 * bz;\r\n this.w = scale0 * aw + scale1 * bw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n invert: function ()\r\n {\r\n var a0 = this.x;\r\n var a1 = this.y;\r\n var a2 = this.z;\r\n var a3 = this.w;\r\n\r\n var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;\r\n var invDot = (dot) ? 1 / dot : 0;\r\n\r\n // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0\r\n\r\n this.x = -a0 * invDot;\r\n this.y = -a1 * invDot;\r\n this.z = -a2 * invDot;\r\n this.w = a3 * invDot;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Convert this Quaternion into its conjugate.\r\n *\r\n * Sets the x, y and z components.\r\n *\r\n * @method Phaser.Math.Quaternion#conjugate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n conjugate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the X axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateX: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n this.x = ax * bw + aw * bx;\r\n this.y = ay * bw + az * bx;\r\n this.z = az * bw - ay * bx;\r\n this.w = aw * bw - ax * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the Y axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateY: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var by = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n this.x = ax * bw - az * by;\r\n this.y = ay * bw + aw * by;\r\n this.z = az * bw + ax * by;\r\n this.w = aw * bw - ay * by;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the Z axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateZ: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bz = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n this.x = ax * bw + ay * bz;\r\n this.y = ay * bw - ax * bz;\r\n this.z = az * bw + aw * bz;\r\n this.w = aw * bw - az * bz;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Create a unit (or rotation) Quaternion from its x, y, and z components.\r\n *\r\n * Sets the w component.\r\n *\r\n * @method Phaser.Math.Quaternion#calculateW\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n calculateW: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n this.w = -Math.sqrt(1.0 - x * x - y * y - z * z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Convert the given Matrix into this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#fromMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix to convert from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n fromMat3: function (mat)\r\n {\r\n // benchmarks:\r\n // http://jsperf.com/typed-array-access-speed\r\n // http://jsperf.com/conversion-of-3x3-matrix-to-quaternion\r\n\r\n // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\r\n // article \"Quaternion Calculus and Fast Animation\".\r\n var m = mat.val;\r\n var fTrace = m[0] + m[4] + m[8];\r\n var fRoot;\r\n\r\n if (fTrace > 0)\r\n {\r\n // |w| > 1/2, may as well choose w > 1/2\r\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\r\n\r\n this.w = 0.5 * fRoot;\r\n\r\n fRoot = 0.5 / fRoot; // 1/(4w)\r\n\r\n this.x = (m[7] - m[5]) * fRoot;\r\n this.y = (m[2] - m[6]) * fRoot;\r\n this.z = (m[3] - m[1]) * fRoot;\r\n }\r\n else\r\n {\r\n // |w| <= 1/2\r\n var i = 0;\r\n\r\n if (m[4] > m[0])\r\n {\r\n i = 1;\r\n }\r\n\r\n if (m[8] > m[i * 3 + i])\r\n {\r\n i = 2;\r\n }\r\n\r\n var j = siNext[i];\r\n var k = siNext[j];\r\n\r\n // This isn't quite as clean without array access\r\n fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1);\r\n tmp[i] = 0.5 * fRoot;\r\n\r\n fRoot = 0.5 / fRoot;\r\n\r\n tmp[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;\r\n tmp[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;\r\n\r\n this.x = tmp[0];\r\n this.y = tmp[1];\r\n this.z = tmp[2];\r\n this.w = (m[k * 3 + j] - m[j * 3 + k]) * fRoot;\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Quaternion;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\n\r\n/**\r\n * Convert the given angle in radians, to the equivalent angle in degrees.\r\n *\r\n * @function Phaser.Math.RadToDeg\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The angle in radians to convert ot degrees.\r\n *\r\n * @return {integer} The given angle converted to degrees.\r\n */\r\nvar RadToDeg = function (radians)\r\n{\r\n return radians * CONST.RAD_TO_DEG;\r\n};\r\n\r\nmodule.exports = RadToDeg;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random unit vector.\r\n *\r\n * Computes random values for the given vector between -1 and 1 that can be used to represent a direction.\r\n *\r\n * Optionally accepts a scale value to scale the resulting vector by.\r\n *\r\n * @function Phaser.Math.RandomXY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} vector - The Vector to compute random values for.\r\n * @param {number} [scale=1] - The scale of the random values.\r\n *\r\n * @return {Phaser.Math.Vector2} The given Vector.\r\n */\r\nvar RandomXY = function (vector, scale)\r\n{\r\n if (scale === undefined) { scale = 1; }\r\n\r\n var r = Math.random() * 2 * Math.PI;\r\n\r\n vector.x = Math.cos(r) * scale;\r\n vector.y = Math.sin(r) * scale;\r\n\r\n return vector;\r\n};\r\n\r\nmodule.exports = RandomXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random position vector in a spherical area, optionally defined by the given radius.\r\n *\r\n * @function Phaser.Math.RandomXYZ\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec3 - The Vector to compute random values for.\r\n * @param {number} [radius=1] - The radius.\r\n *\r\n * @return {Phaser.Math.Vector3} The given Vector.\r\n */\r\nvar RandomXYZ = function (vec3, radius)\r\n{\r\n if (radius === undefined) { radius = 1; }\r\n\r\n var r = Math.random() * 2 * Math.PI;\r\n var z = (Math.random() * 2) - 1;\r\n var zScale = Math.sqrt(1 - z * z) * radius;\r\n\r\n vec3.x = Math.cos(r) * zScale;\r\n vec3.y = Math.sin(r) * zScale;\r\n vec3.z = z * radius;\r\n\r\n return vec3;\r\n};\r\n\r\nmodule.exports = RandomXYZ;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random four-dimensional vector.\r\n *\r\n * @function Phaser.Math.RandomXYZW\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} vec4 - The Vector to compute random values for.\r\n * @param {number} [scale=1] - The scale of the random values.\r\n *\r\n * @return {Phaser.Math.Vector4} The given Vector.\r\n */\r\nvar RandomXYZW = function (vec4, scale)\r\n{\r\n if (scale === undefined) { scale = 1; }\r\n\r\n // TODO: Not spherical; should fix this for more uniform distribution\r\n vec4.x = (Math.random() * 2 - 1) * scale;\r\n vec4.y = (Math.random() * 2 - 1) * scale;\r\n vec4.z = (Math.random() * 2 - 1) * scale;\r\n vec4.w = (Math.random() * 2 - 1) * scale;\r\n\r\n return vec4;\r\n};\r\n\r\nmodule.exports = RandomXYZW;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a given point by a given angle around the origin (0, 0), in an anti-clockwise direction.\r\n *\r\n * @function Phaser.Math.Rotate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} angle - The angle to be rotated by in an anticlockwise direction.\r\n *\r\n * @return {Phaser.Geom.Point} The given point, rotated by the given angle in an anticlockwise direction.\r\n */\r\nvar Rotate = function (point, angle)\r\n{\r\n var x = point.x;\r\n var y = point.y;\r\n\r\n point.x = (x * Math.cos(angle)) - (y * Math.sin(angle));\r\n point.y = (x * Math.sin(angle)) + (y * Math.cos(angle));\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = Rotate;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a `point` around `x` and `y` to the given `angle`, at the same distance.\r\n *\r\n * In polar notation, this maps a point from (r, t) to (r, angle), vs. the origin (x, y).\r\n *\r\n * @function Phaser.Math.RotateAround\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} x - The horizontal coordinate to rotate around.\r\n * @param {number} y - The vertical coordinate to rotate around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The given point.\r\n */\r\nvar RotateAround = function (point, x, y, angle)\r\n{\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n\r\n var tx = point.x - x;\r\n var ty = point.y - y;\r\n\r\n point.x = tx * c - ty * s + x;\r\n point.y = tx * s + ty * c + y;\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = RotateAround;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a `point` around `x` and `y` by the given `angle` and `distance`.\r\n *\r\n * In polar notation, this maps a point from (r, t) to (distance, t + angle), vs. the origin (x, y).\r\n *\r\n * @function Phaser.Math.RotateAroundDistance\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} x - The horizontal coordinate to rotate around.\r\n * @param {number} y - The vertical coordinate to rotate around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n * @param {number} distance - The distance from (x, y) to place the point at.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The given point.\r\n */\r\nvar RotateAroundDistance = function (point, x, y, angle, distance)\r\n{\r\n var t = angle + Math.atan2(point.y - y, point.x - x);\r\n\r\n point.x = x + (distance * Math.cos(t));\r\n point.y = y + (distance * Math.sin(t));\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = RotateAroundDistance;\r\n","/**\n * @author samme\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Position a `point` at the given `angle` and `distance` to (`x`, `y`).\n *\n * @function Phaser.Math.RotateTo\n * @since 3.24.0\n *\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\n *\n * @param {Phaser.Types.Math.Vector2Like} point - The point to be positioned.\n * @param {number} x - The horizontal coordinate to position from.\n * @param {number} y - The vertical coordinate to position from.\n * @param {number} angle - The angle of rotation in radians.\n * @param {number} distance - The distance from (x, y) to place the point at.\n *\n * @return {Phaser.Types.Math.Vector2Like} The given point.\n */\nvar RotateTo = function (point, x, y, angle, distance)\n{\n point.x = x + (distance * Math.cos(angle));\n point.y = y + (distance * Math.sin(angle));\n\n return point;\n};\n\nmodule.exports = RotateTo;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector3 = require('../math/Vector3');\r\nvar Matrix4 = require('../math/Matrix4');\r\nvar Quaternion = require('../math/Quaternion');\r\n\r\nvar tmpMat4 = new Matrix4();\r\nvar tmpQuat = new Quaternion();\r\nvar tmpVec3 = new Vector3();\r\n\r\n/**\r\n * Rotates a vector in place by axis angle.\r\n *\r\n * This is the same as transforming a point by an\r\n * axis-angle quaternion, but it has higher precision.\r\n *\r\n * @function Phaser.Math.RotateVec3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec - The vector to be rotated.\r\n * @param {Phaser.Math.Vector3} axis - The axis to rotate around.\r\n * @param {number} radians - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Math.Vector3} The given vector.\r\n */\r\nvar RotateVec3 = function (vec, axis, radians)\r\n{\r\n // Set the quaternion to our axis angle\r\n tmpQuat.setAxisAngle(axis, radians);\r\n\r\n // Create a rotation matrix from the axis angle\r\n tmpMat4.fromRotationTranslation(tmpQuat, tmpVec3.set(0, 0, 0));\r\n\r\n // Multiply our vector by the rotation matrix\r\n return vec.transformMat4(tmpMat4);\r\n};\r\n\r\nmodule.exports = RotateVec3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Round a given number so it is further away from zero. That is, positive numbers are rounded up, and negative numbers are rounded down.\r\n *\r\n * @function Phaser.Math.RoundAwayFromZero\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to round.\r\n *\r\n * @return {number} The rounded number, rounded away from zero.\r\n */\r\nvar RoundAwayFromZero = function (value)\r\n{\r\n // \"Opposite\" of truncate.\r\n return (value > 0) ? Math.ceil(value) : Math.floor(value);\r\n};\r\n\r\nmodule.exports = RoundAwayFromZero;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Round a value to the given precision.\r\n * \r\n * For example:\r\n * \r\n * ```javascript\r\n * RoundTo(123.456, 0) = 123\r\n * RoundTo(123.456, 1) = 120\r\n * RoundTo(123.456, 2) = 100\r\n * ```\r\n * \r\n * To round the decimal, i.e. to round to precision, pass in a negative `place`:\r\n * \r\n * ```javascript\r\n * RoundTo(123.456789, 0) = 123\r\n * RoundTo(123.456789, -1) = 123.5\r\n * RoundTo(123.456789, -2) = 123.46\r\n * RoundTo(123.456789, -3) = 123.457\r\n * ```\r\n *\r\n * @function Phaser.Math.RoundTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {integer} [place=0] - The place to round to. Positive to round the units, negative to round the decimal.\r\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar RoundTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.round(value * p) / p;\r\n};\r\n\r\nmodule.exports = RoundTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Generate a series of sine and cosine values.\r\n *\r\n * @function Phaser.Math.SinCosTableGenerator\r\n * @since 3.0.0\r\n *\r\n * @param {number} length - The number of values to generate.\r\n * @param {number} [sinAmp=1] - The sine value amplitude.\r\n * @param {number} [cosAmp=1] - The cosine value amplitude.\r\n * @param {number} [frequency=1] - The frequency of the values.\r\n *\r\n * @return {Phaser.Types.Math.SinCosTable} The generated values.\r\n */\r\nvar SinCosTableGenerator = function (length, sinAmp, cosAmp, frequency)\r\n{\r\n if (sinAmp === undefined) { sinAmp = 1; }\r\n if (cosAmp === undefined) { cosAmp = 1; }\r\n if (frequency === undefined) { frequency = 1; }\r\n\r\n frequency *= Math.PI / length;\r\n\r\n var cos = [];\r\n var sin = [];\r\n\r\n for (var c = 0; c < length; c++)\r\n {\r\n cosAmp -= sinAmp * frequency;\r\n sinAmp += cosAmp * frequency;\r\n\r\n cos[c] = cosAmp;\r\n sin[c] = sinAmp;\r\n }\r\n\r\n return {\r\n sin: sin,\r\n cos: cos,\r\n length: length\r\n };\r\n};\r\n\r\nmodule.exports = SinCosTableGenerator;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a smooth interpolation percentage of `x` between `min` and `max`.\r\n *\r\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\r\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\r\n * between 0 and 1 otherwise.\r\n *\r\n * @function Phaser.Math.SmoothStep\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\r\n *\r\n * @param {number} x - The input value.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The percentage of interpolation, between 0 and 1.\r\n */\r\nvar SmoothStep = function (x, min, max)\r\n{\r\n if (x <= min)\r\n {\r\n return 0;\r\n }\r\n\r\n if (x >= max)\r\n {\r\n return 1;\r\n }\r\n\r\n x = (x - min) / (max - min);\r\n\r\n return x * x * (3 - 2 * x);\r\n};\r\n\r\nmodule.exports = SmoothStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a smoother interpolation percentage of `x` between `min` and `max`.\r\n *\r\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\r\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\r\n * between 0 and 1 otherwise.\r\n *\r\n * Produces an even smoother interpolation than {@link Phaser.Math.SmoothStep}.\r\n *\r\n * @function Phaser.Math.SmootherStep\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\r\n *\r\n * @param {number} x - The input value.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The percentage of interpolation, between 0 and 1.\r\n */\r\nvar SmootherStep = function (x, min, max)\r\n{\r\n x = Math.max(0, Math.min(1, (x - min) / (max - min)));\r\n\r\n return x * x * x * (x * (x * 6 - 15) + 10);\r\n};\r\n\r\nmodule.exports = SmootherStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = require('./Vector2');\r\n\r\n/**\r\n * Returns a Vector2 containing the x and y position of the given index in a `width` x `height` sized grid.\r\n * \r\n * For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2.\r\n * \r\n * If the given index is out of range an empty Vector2 is returned.\r\n *\r\n * @function Phaser.Math.ToXY\r\n * @since 3.19.0\r\n *\r\n * @param {integer} index - The position within the grid to get the x/y value for.\r\n * @param {integer} width - The width of the grid.\r\n * @param {integer} height - The height of the grid.\r\n * @param {Phaser.Math.Vector2} [out] - An optional Vector2 to store the result in. If not given, a new Vector2 instance will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 where the x and y properties contain the given grid index.\r\n */\r\nvar ToXY = function (index, width, height, out)\r\n{\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var x = 0;\r\n var y = 0;\r\n var total = width * height;\r\n\r\n if (index > 0 && index <= total)\r\n {\r\n if (index > width - 1)\r\n {\r\n y = Math.floor(index / width);\r\n x = index - (y * width);\r\n }\r\n else\r\n {\r\n x = index;\r\n }\r\n\r\n out.set(x, y);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = ToXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = require('./Vector2');\r\n\r\n/**\r\n * Takes the `x` and `y` coordinates and transforms them into the same space as\r\n * defined by the position, rotation and scale values.\r\n *\r\n * @function Phaser.Math.TransformXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to be transformed.\r\n * @param {number} y - The y coordinate to be transformed.\r\n * @param {number} positionX - Horizontal position of the transform point.\r\n * @param {number} positionY - Vertical position of the transform point.\r\n * @param {number} rotation - Rotation of the transform point, in radians.\r\n * @param {number} scaleX - Horizontal scale of the transform point.\r\n * @param {number} scaleY - Vertical scale of the transform point.\r\n * @param {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} [output] - The output vector, point or object for the translated coordinates.\r\n *\r\n * @return {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} The translated point.\r\n */\r\nvar TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output)\r\n{\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var radianSin = Math.sin(rotation);\r\n var radianCos = Math.cos(rotation);\r\n\r\n // Rotate and Scale\r\n var a = radianCos * scaleX;\r\n var b = radianSin * scaleX;\r\n var c = -radianSin * scaleY;\r\n var d = radianCos * scaleY;\r\n\r\n // Invert\r\n var id = 1 / ((a * d) + (c * -b));\r\n\r\n output.x = (d * id * x) + (-c * id * y) + (((positionY * c) - (positionX * d)) * id);\r\n output.y = (a * id * y) + (-b * id * x) + (((-positionY * a) + (positionX * b)) * id);\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = TransformXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\nvar FuzzyEqual = require('../math/fuzzy/Equal');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 2D space.\r\n *\r\n * A two-component vector.\r\n *\r\n * @class Vector2\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number|Phaser.Types.Math.Vector2Like} [x] - The x component, or an object with `x` and `y` properties.\r\n * @param {number} [y] - The y component.\r\n */\r\nvar Vector2 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector2 (x, y)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector2#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector2#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n }\r\n else\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector2.\r\n *\r\n * @method Phaser.Math.Vector2#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} A clone of this Vector2.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector2(this.x, this.y);\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x || 0;\r\n this.y = src.y || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the component values of this Vector from a given Vector2Like object.\r\n *\r\n * @method Phaser.Math.Vector2#setFromObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} obj - The object containing the component values to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setFromObject: function (obj)\r\n {\r\n this.x = obj.x || 0;\r\n this.y = obj.y || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x` and `y` components of the this Vector to the given `x` and `y` values.\r\n *\r\n * @method Phaser.Math.Vector2#set\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x value to set for this Vector.\r\n * @param {number} [y=x] - The y value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n set: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This method is an alias for `Vector2.set`.\r\n *\r\n * @method Phaser.Math.Vector2#setTo\r\n * @since 3.4.0\r\n *\r\n * @param {number} x - The x value to set for this Vector.\r\n * @param {number} [y=x] - The y value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setTo: function (x, y)\r\n {\r\n return this.set(x, y);\r\n },\r\n\r\n /**\r\n * Sets the `x` and `y` values of this object from a given polar coordinate.\r\n *\r\n * @method Phaser.Math.Vector2#setToPolar\r\n * @since 3.0.0\r\n *\r\n * @param {number} azimuth - The angular coordinate, in radians.\r\n * @param {number} [radius=1] - The radial coordinate (length).\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setToPolar: function (azimuth, radius)\r\n {\r\n if (radius == null) { radius = 1; }\r\n\r\n this.x = Math.cos(azimuth) * radius;\r\n this.y = Math.sin(azimuth) * radius;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict equality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector2#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector.\r\n *\r\n * @return {boolean} Whether the given Vector is equal to this Vector.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y));\r\n },\r\n\r\n /**\r\n * Check whether this Vector is approximately equal to a given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#fuzzyEquals\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector.\r\n * @param {number} [epsilon=0.0001] - The tolerance value.\r\n *\r\n * @return {boolean} Whether both absolute differences of the x and y components are smaller than `epsilon`.\r\n */\r\n fuzzyEquals: function (v, epsilon)\r\n {\r\n return (FuzzyEqual(this.x, v.x, epsilon) && FuzzyEqual(this.y, v.y, epsilon));\r\n },\r\n\r\n /**\r\n * Calculate the angle between this Vector and the positive x-axis, in radians.\r\n *\r\n * @method Phaser.Math.Vector2#angle\r\n * @since 3.0.0\r\n *\r\n * @return {number} The angle between this Vector, and the positive x-axis, given in radians.\r\n */\r\n angle: function ()\r\n {\r\n // computes the angle in radians with respect to the positive x-axis\r\n\r\n var angle = Math.atan2(this.y, this.x);\r\n\r\n if (angle < 0)\r\n {\r\n angle += 2 * Math.PI;\r\n }\r\n\r\n return angle;\r\n },\r\n\r\n /**\r\n * Set the angle of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#setAngle\r\n * @since 3.23.0\r\n *\r\n * @param {number} angle - The angle, in radians.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setAngle: function (angle)\r\n {\r\n return this.setToPolar(angle, this.length());\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector2#add\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n add: function (src)\r\n {\r\n this.x += src.x;\r\n this.y += src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector2#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n subtract: function (src)\r\n {\r\n this.x -= src.x;\r\n this.y -= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n multiply: function (src)\r\n {\r\n this.x *= src.x;\r\n this.y *= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector2#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n scale: function (value)\r\n {\r\n if (isFinite(value))\r\n {\r\n this.x *= value;\r\n this.y *= value;\r\n }\r\n else\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#divide\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n divide: function (src)\r\n {\r\n this.x /= src.x;\r\n this.y /= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Negate the `x` and `y` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#distance\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (src)\r\n {\r\n var dx = src.x - this.x;\r\n var dy = src.y - this.y;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector2#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (src)\r\n {\r\n var dx = src.x - this.x;\r\n var dy = src.y - this.y;\r\n\r\n return dx * dx + dy * dy;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n return Math.sqrt(x * x + y * y);\r\n },\r\n\r\n /**\r\n * Set the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#setLength\r\n * @since 3.23.0\r\n *\r\n * @param {number} length\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setLength: function (length)\r\n {\r\n return this.normalize().scale(length);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector2#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n return x * x + y * y;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var len = x * x + y * y;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Vector to its perpendicular, in the positive direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalizeRightHand\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalizeRightHand: function ()\r\n {\r\n var x = this.x;\r\n\r\n this.x = this.y * -1;\r\n this.y = x;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Vector to its perpendicular, in the negative direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalizeLeftHand\r\n * @since 3.23.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalizeLeftHand: function ()\r\n {\r\n var x = this.x;\r\n\r\n this.x = this.y;\r\n this.y = x * -1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector2 to dot product with this Vector2.\r\n *\r\n * @return {number} The dot product of this Vector and the given Vector.\r\n */\r\n dot: function (src)\r\n {\r\n return this.x * src.x + this.y * src.y;\r\n },\r\n\r\n /**\r\n * Calculate the cross product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#cross\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector2 to cross with this Vector2.\r\n *\r\n * @return {number} The cross product of this Vector and the given Vector.\r\n */\r\n cross: function (src)\r\n {\r\n return this.x * src.y - this.y * src.x;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector2 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n lerp: function (src, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n\r\n this.x = ax + t * (src.x - ax);\r\n this.y = ay + t * (src.y - ay);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector2#transformMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector2 with.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n transformMat3: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[3] * y + m[6];\r\n this.y = m[1] * x + m[4] * y + m[7];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector2#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector2 with.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[12];\r\n this.y = m[1] * x + m[5] * y + m[13];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0).\r\n *\r\n * @method Phaser.Math.Vector2#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Limit the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#limit\r\n * @since 3.23.0\r\n *\r\n * @param {number} max - The maximum length.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n limit: function (max)\r\n {\r\n var len = this.length();\r\n\r\n if (len && len > max)\r\n {\r\n this.scale(max / len);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reflect this Vector off a line defined by a normal.\r\n *\r\n * @method Phaser.Math.Vector2#reflect\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Math.Vector2} normal - A vector perpendicular to the line.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n reflect: function (normal)\r\n {\r\n normal = normal.clone().normalize();\r\n\r\n return this.subtract(normal.scale(2 * this.dot(normal)));\r\n },\r\n\r\n /**\r\n * Reflect this Vector across another.\r\n *\r\n * @method Phaser.Math.Vector2#mirror\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Math.Vector2} axis - A vector to reflect across.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n mirror: function (axis)\r\n {\r\n return this.reflect(axis).negate();\r\n },\r\n\r\n /**\r\n * Rotate this Vector by an angle amount.\r\n *\r\n * @method Phaser.Math.Vector2#rotate\r\n * @since 3.23.0\r\n *\r\n * @param {number} delta - The angle to rotate by, in radians.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n rotate: function (delta)\r\n {\r\n var cos = Math.cos(delta);\r\n var sin = Math.sin(delta);\r\n\r\n return this.set(cos * this.x - sin * this.y, sin * this.x + cos * this.y);\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A static zero Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.ZERO\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.1.0\r\n */\r\nVector2.ZERO = new Vector2();\r\n\r\n/**\r\n * A static right Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.RIGHT\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.RIGHT = new Vector2(1, 0);\r\n\r\n/**\r\n * A static left Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.LEFT\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.LEFT = new Vector2(-1, 0);\r\n\r\n/**\r\n * A static up Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.UP\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.UP = new Vector2(0, -1);\r\n\r\n/**\r\n * A static down Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.DOWN\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.DOWN = new Vector2(0, 1);\r\n\r\n/**\r\n * A static one Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.ONE\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.ONE = new Vector2(1, 1);\r\n\r\nmodule.exports = Vector2;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 3D space.\r\n *\r\n * A three-component vector.\r\n *\r\n * @class Vector3\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n */\r\nvar Vector3 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector3 (x, y, z)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The z component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.z = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Set this Vector to point up.\r\n *\r\n * Sets the y component of the vector to 1, and the others to 0.\r\n *\r\n * @method Phaser.Math.Vector3#up\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n up: function ()\r\n {\r\n this.x = 0;\r\n this.y = 1;\r\n this.z = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} A new Vector3 object containing this Vectors values.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector3(this.x, this.y, this.z);\r\n },\r\n\r\n /**\r\n * Calculate the cross (vector) product of two given Vectors.\r\n *\r\n * @method Phaser.Math.Vector3#crossVectors\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The first Vector to multiply.\r\n * @param {Phaser.Math.Vector3} b - The second Vector to multiply.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n crossVectors: function (a, b)\r\n {\r\n var ax = a.x;\r\n var ay = a.y;\r\n var az = a.z;\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n\r\n this.x = ay * bz - az * by;\r\n this.y = az * bx - ax * bz;\r\n this.z = ax * by - ay * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict equality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector3#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to compare against.\r\n *\r\n * @return {boolean} True if the two vectors strictly match, otherwise false.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z));\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#copy\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x`, `y`, and `z` components of this Vector to the given `x`, `y`, and `z` values.\r\n *\r\n * @method Phaser.Math.Vector3#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y and z components.\r\n * @param {number} [y] - The y value to set for this Vector.\r\n * @param {number} [z] - The z value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n set: function (x, y, z)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n multiply: function (v)\r\n {\r\n this.x *= v.x;\r\n this.y *= v.y;\r\n this.z *= v.z || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector3#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n scale: function (scale)\r\n {\r\n if (isFinite(scale))\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n }\r\n else\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#divide\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n divide: function (v)\r\n {\r\n this.x /= v.x;\r\n this.y /= v.y;\r\n this.z /= v.z || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Negate the `x`, `y` and `z` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#distance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n\r\n return Math.sqrt(dx * dx + dy * dy + dz * dz);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector3#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n\r\n return dx * dx + dy * dy + dz * dz;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n return Math.sqrt(x * x + y * y + z * z);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector3#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n return x * x + y * y + z * z;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector3#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var len = x * x + y * y + z * z;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to dot product with this Vector3.\r\n *\r\n * @return {number} The dot product of this Vector and `v`.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z;\r\n },\r\n\r\n /**\r\n * Calculate the cross (vector) product of this Vector (which will be modified) and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#cross\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector to cross product with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n cross: function (v)\r\n {\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var bx = v.x;\r\n var by = v.y;\r\n var bz = v.z;\r\n\r\n this.x = ay * bz - az * by;\r\n this.y = az * bx - ax * bz;\r\n this.z = ax * by - ay * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector3#transformMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformMat3: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n this.x = x * m[0] + y * m[3] + z * m[6];\r\n this.y = x * m[1] + y * m[4] + z * m[7];\r\n this.z = x * m[2] + y * m[5] + z * m[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector3#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12];\r\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13];\r\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transforms the coordinates of this Vector3 with the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#transformCoordinates\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformCoordinates: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n var tx = (x * m[0]) + (y * m[4]) + (z * m[8]) + m[12];\r\n var ty = (x * m[1]) + (y * m[5]) + (z * m[9]) + m[13];\r\n var tz = (x * m[2]) + (y * m[6]) + (z * m[10]) + m[14];\r\n var tw = (x * m[3]) + (y * m[7]) + (z * m[11]) + m[15];\r\n\r\n this.x = tx / tw;\r\n this.y = ty / tw;\r\n this.z = tz / tw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Quaternion.\r\n *\r\n * @method Phaser.Math.Vector3#transformQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformQuat: function (q)\r\n {\r\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var qx = q.x;\r\n var qy = q.y;\r\n var qz = q.z;\r\n var qw = q.w;\r\n\r\n // calculate quat * vec\r\n var ix = qw * x + qy * z - qz * y;\r\n var iy = qw * y + qz * x - qx * z;\r\n var iz = qw * z + qx * y - qy * x;\r\n var iw = -qx * x - qy * y - qz * z;\r\n\r\n // calculate result * inverse quat\r\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\r\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\r\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the specified matrix, applying a W divide. This is useful for projection,\r\n * e.g. unprojecting a 2D point into 3D space.\r\n *\r\n * @method Phaser.Math.Vector3#project\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to multiply this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n project: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n var a00 = m[0];\r\n var a01 = m[1];\r\n var a02 = m[2];\r\n var a03 = m[3];\r\n var a10 = m[4];\r\n var a11 = m[5];\r\n var a12 = m[6];\r\n var a13 = m[7];\r\n var a20 = m[8];\r\n var a21 = m[9];\r\n var a22 = m[10];\r\n var a23 = m[11];\r\n var a30 = m[12];\r\n var a31 = m[13];\r\n var a32 = m[14];\r\n var a33 = m[15];\r\n\r\n var lw = 1 / (x * a03 + y * a13 + z * a23 + a33);\r\n\r\n this.x = (x * a00 + y * a10 + z * a20 + a30) * lw;\r\n this.y = (x * a01 + y * a11 + z * a21 + a31) * lw;\r\n this.z = (x * a02 + y * a12 + z * a22 + a32) * lw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Unproject this point from 2D space to 3D space.\r\n * The point should have its x and y properties set to\r\n * 2D screen space, and the z either at 0 (near plane)\r\n * or 1 (far plane). The provided matrix is assumed to already\r\n * be combined, i.e. projection * view * model.\r\n *\r\n * After this operation, this vector's (x, y, z) components will\r\n * represent the unprojected 3D coordinate.\r\n *\r\n * @method Phaser.Math.Vector3#unproject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} viewport - Screen x, y, width and height in pixels.\r\n * @param {Phaser.Math.Matrix4} invProjectionView - Combined projection and view matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n unproject: function (viewport, invProjectionView)\r\n {\r\n var viewX = viewport.x;\r\n var viewY = viewport.y;\r\n var viewWidth = viewport.z;\r\n var viewHeight = viewport.w;\r\n\r\n var x = this.x - viewX;\r\n var y = (viewHeight - this.y - 1) - viewY;\r\n var z = this.z;\r\n\r\n this.x = (2 * x) / viewWidth - 1;\r\n this.y = (2 * y) / viewHeight - 1;\r\n this.z = 2 * z - 1;\r\n\r\n return this.project(invProjectionView);\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0, 0).\r\n *\r\n * @method Phaser.Math.Vector3#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A static zero Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.ZERO\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.ZERO = new Vector3();\r\n\r\n/**\r\n * A static right Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.RIGHT\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.RIGHT = new Vector3(1, 0, 0);\r\n\r\n/**\r\n * A static left Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.LEFT\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.LEFT = new Vector3(-1, 0, 0);\r\n\r\n/**\r\n * A static up Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.UP\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.UP = new Vector3(0, -1, 0);\r\n\r\n/**\r\n * A static down Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.DOWN\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.DOWN = new Vector3(0, 1, 0);\r\n\r\n/**\r\n * A static forward Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.FORWARD\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.FORWARD = new Vector3(0, 0, 1);\r\n\r\n/**\r\n * A static back Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.BACK\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.BACK = new Vector3(0, 0, -1);\r\n\r\n/**\r\n * A static one Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.ONE\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.ONE = new Vector3(1, 1, 1);\r\n\r\nmodule.exports = Vector3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 4D space.\r\n *\r\n * A four-component vector.\r\n *\r\n * @class Vector4\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n * @param {number} [w] - The w component.\r\n */\r\nvar Vector4 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector4 (x, y, z, w)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The z component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.z = 0;\r\n\r\n /**\r\n * The w component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.w = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector4.\r\n *\r\n * @method Phaser.Math.Vector4#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} A clone of this Vector4.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector4(this.x, this.y, this.z, this.w);\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z || 0;\r\n this.w = src.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict quality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector4#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The vector to check equality with.\r\n *\r\n * @return {boolean} A boolean indicating whether the two Vectors are equal or not.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z) && (this.w === v.w));\r\n },\r\n\r\n /**\r\n * Set the `x`, `y`, `z` and `w` components of the this Vector to the given `x`, `y`, `z` and `w` values.\r\n *\r\n * @method Phaser.Math.Vector4#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y, z and w components.\r\n * @param {number} y - The y value to set for this Vector.\r\n * @param {number} z - The z value to set for this Vector.\r\n * @param {number} w - The z value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n set: function (x, y, z, w)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector4#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z || 0;\r\n this.w += v.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector4#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z || 0;\r\n this.w -= v.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector4#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n scale: function (scale)\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n this.w *= scale;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return Math.sqrt(x * x + y * y + z * z + w * w);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector4#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector4#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var len = x * x + y * y + z * z + w * w;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n this.w = w * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The Vector4 to dot product with this Vector4.\r\n *\r\n * @return {number} The dot product of this Vector and the given Vector.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The Vector4 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n this.w = aw + t * (v.w - aw);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n multiply: function (v)\r\n {\r\n this.x *= v.x;\r\n this.y *= v.y;\r\n this.z *= v.z || 1;\r\n this.w *= v.w || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#divide\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n divide: function (v)\r\n {\r\n this.x /= v.x;\r\n this.y /= v.y;\r\n this.z /= v.z || 1;\r\n this.w /= v.w || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#distance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n var dw = v.w - this.w || 0;\r\n\r\n return Math.sqrt(dx * dx + dy * dy + dz * dz + dw * dw);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector4#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n var dw = v.w - this.w || 0;\r\n\r\n return dx * dx + dy * dy + dz * dz + dw * dw;\r\n },\r\n\r\n /**\r\n * Negate the `x`, `y`, `z` and `w` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n this.w = -this.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector4#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector4 with.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\r\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\r\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\r\n this.w = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Quaternion.\r\n *\r\n * @method Phaser.Math.Vector4#transformQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n transformQuat: function (q)\r\n {\r\n // TODO: is this really the same as Vector3?\r\n // Also, what about this: http://molecularmusings.wordpress.com/2013/05/24/a-faster-quaternion-vector-multiplication/\r\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var qx = q.x;\r\n var qy = q.y;\r\n var qz = q.z;\r\n var qw = q.w;\r\n\r\n // calculate quat * vec\r\n var ix = qw * x + qy * z - qz * y;\r\n var iy = qw * y + qz * x - qx * z;\r\n var iz = qw * z + qx * y - qy * x;\r\n var iw = -qx * x - qy * y - qz * z;\r\n\r\n // calculate result * inverse quat\r\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\r\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\r\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0, 0, 0).\r\n *\r\n * @method Phaser.Math.Vector4#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n// TODO: Check if these are required internally, if not, remove.\r\nVector4.prototype.sub = Vector4.prototype.subtract;\r\nVector4.prototype.mul = Vector4.prototype.multiply;\r\nVector4.prototype.div = Vector4.prototype.divide;\r\nVector4.prototype.dist = Vector4.prototype.distance;\r\nVector4.prototype.distSq = Vector4.prototype.distanceSq;\r\nVector4.prototype.len = Vector4.prototype.length;\r\nVector4.prototype.lenSq = Vector4.prototype.lengthSq;\r\n\r\nmodule.exports = Vector4;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the two values are within the given `tolerance` of each other.\r\n *\r\n * @function Phaser.Math.Within\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value to use in the calculation.\r\n * @param {number} b - The second value to use in the calculation.\r\n * @param {number} tolerance - The tolerance. Anything equal to or less than this value is considered as being within range.\r\n *\r\n * @return {boolean} Returns `true` if `a` is less than or equal to the tolerance of `b`.\r\n */\r\nvar Within = function (a, b, tolerance)\r\n{\r\n return (Math.abs(a - b) <= tolerance);\r\n};\r\n\r\nmodule.exports = Within;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Wrap the given `value` between `min` and `max.\r\n *\r\n * @function Phaser.Math.Wrap\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to wrap.\r\n * @param {number} min - The minimum value.\r\n * @param {number} max - The maximum value.\r\n *\r\n * @return {number} The wrapped value.\r\n */\r\nvar Wrap = function (value, min, max)\r\n{\r\n var range = max - min;\r\n\r\n return (min + ((((value - min) % range) + range) % range));\r\n};\r\n\r\nmodule.exports = Wrap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\r\n *\r\n * @function Phaser.Math.Angle.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar Between = function (x1, y1, x2, y2)\r\n{\r\n return Math.atan2(y2 - y1, x2 - x1);\r\n};\r\n\r\nmodule.exports = Between;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\r\n *\r\n * Calculates the angle of the vector from the first point to the second point.\r\n *\r\n * @function Phaser.Math.Angle.BetweenPoints\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} point1 - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} point2 - The second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenPoints = function (point1, point2)\r\n{\r\n return Math.atan2(point2.y - point1.y, point2.x - point1.x);\r\n};\r\n\r\nmodule.exports = BetweenPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\r\n *\r\n * The difference between this method and {@link Phaser.Math.Angle.BetweenPoints} is that this assumes the y coordinate\r\n * travels down the screen.\r\n *\r\n * @function Phaser.Math.Angle.BetweenPointsY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} point1 - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} point2 - The second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenPointsY = function (point1, point2)\r\n{\r\n return Math.atan2(point2.x - point1.x, point2.y - point1.y);\r\n};\r\n\r\nmodule.exports = BetweenPointsY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\r\n *\r\n * The difference between this method and {@link Phaser.Math.Angle.Between} is that this assumes the y coordinate\r\n * travels down the screen.\r\n *\r\n * @function Phaser.Math.Angle.BetweenY\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenY = function (x1, y1, x2, y2)\r\n{\r\n return Math.atan2(x2 - x1, y2 - y1);\r\n};\r\n\r\nmodule.exports = BetweenY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('../const');\r\n\r\n/**\r\n * Takes an angle in Phasers default clockwise format and converts it so that\r\n * 0 is North, 90 is West, 180 is South and 270 is East,\r\n * therefore running counter-clockwise instead of clockwise.\r\n * \r\n * You can pass in the angle from a Game Object using:\r\n * \r\n * ```javascript\r\n * var converted = CounterClockwise(gameobject.rotation);\r\n * ```\r\n * \r\n * All values for this function are in radians.\r\n *\r\n * @function Phaser.Math.Angle.CounterClockwise\r\n * @since 3.16.0\r\n *\r\n * @param {number} angle - The angle to convert, in radians.\r\n *\r\n * @return {number} The converted angle, in radians.\r\n */\r\nvar CounterClockwise = function (angle)\r\n{\r\n if (angle > Math.PI)\r\n {\r\n angle -= CONST.PI2;\r\n }\r\n\r\n return Math.abs((((angle + CONST.TAU) % CONST.PI2) - CONST.PI2) % CONST.PI2);\r\n};\r\n\r\nmodule.exports = CounterClockwise;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Normalize an angle to the [0, 2pi] range.\r\n *\r\n * @function Phaser.Math.Angle.Normalize\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to normalize, in radians.\r\n *\r\n * @return {number} The normalized angle, in radians.\r\n */\r\nvar Normalize = function (angle)\r\n{\r\n angle = angle % (2 * Math.PI);\r\n\r\n if (angle >= 0)\r\n {\r\n return angle;\r\n }\r\n else\r\n {\r\n return angle + 2 * Math.PI;\r\n }\r\n};\r\n\r\nmodule.exports = Normalize;\r\n","/**\r\n * @author Richard Davey \r\n * @author @samme\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FloatBetween = require('../FloatBetween');\r\n\r\n/**\r\n * Returns a random angle in the range [-pi, pi].\r\n *\r\n * @function Phaser.Math.Angle.Random\r\n * @since 3.23.0\r\n *\r\n * @return {number} The angle, in radians.\r\n */\r\nvar Random = function ()\r\n{\r\n return FloatBetween(-Math.PI, Math.PI);\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @author @samme\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FloatBetween = require('../FloatBetween');\r\n\r\n/**\r\n * Returns a random angle in the range [-180, 180].\r\n *\r\n * @function Phaser.Math.Angle.RandomDegrees\r\n * @since 3.23.0\r\n *\r\n * @return {number} The angle, in degrees.\r\n */\r\nvar RandomDegrees = function ()\r\n{\r\n return FloatBetween(-180, 180);\r\n};\r\n\r\nmodule.exports = RandomDegrees;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Normalize = require('./Normalize');\r\n\r\n/**\r\n * Reverse the given angle.\r\n *\r\n * @function Phaser.Math.Angle.Reverse\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to reverse, in radians.\r\n *\r\n * @return {number} The reversed angle, in radians.\r\n */\r\nvar Reverse = function (angle)\r\n{\r\n return Normalize(angle + Math.PI);\r\n};\r\n\r\nmodule.exports = Reverse;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = require('../const');\r\n\r\n/**\r\n * Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call.\r\n *\r\n * @function Phaser.Math.Angle.RotateTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} currentAngle - The current angle, in radians.\r\n * @param {number} targetAngle - The target angle to rotate to, in radians.\r\n * @param {number} [lerp=0.05] - The lerp value to add to the current angle.\r\n *\r\n * @return {number} The adjusted angle.\r\n */\r\nvar RotateTo = function (currentAngle, targetAngle, lerp)\r\n{\r\n if (lerp === undefined) { lerp = 0.05; }\r\n\r\n if (currentAngle === targetAngle)\r\n {\r\n return currentAngle;\r\n }\r\n\r\n if (Math.abs(targetAngle - currentAngle) <= lerp || Math.abs(targetAngle - currentAngle) >= (MATH_CONST.PI2 - lerp))\r\n {\r\n currentAngle = targetAngle;\r\n }\r\n else\r\n {\r\n if (Math.abs(targetAngle - currentAngle) > Math.PI)\r\n {\r\n if (targetAngle < currentAngle)\r\n {\r\n targetAngle += MATH_CONST.PI2;\r\n }\r\n else\r\n {\r\n targetAngle -= MATH_CONST.PI2;\r\n }\r\n }\r\n\r\n if (targetAngle > currentAngle)\r\n {\r\n currentAngle += lerp;\r\n }\r\n else if (targetAngle < currentAngle)\r\n {\r\n currentAngle -= lerp;\r\n }\r\n }\r\n\r\n return currentAngle;\r\n};\r\n\r\nmodule.exports = RotateTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Gets the shortest angle between `angle1` and `angle2`.\r\n *\r\n * Both angles must be in the range -180 to 180, which is the same clamped\r\n * range that `sprite.angle` uses, so you can pass in two sprite angles to\r\n * this method and get the shortest angle back between the two of them.\r\n *\r\n * The angle returned will be in the same range. If the returned angle is\r\n * greater than 0 then it's a counter-clockwise rotation, if < 0 then it's\r\n * a clockwise rotation.\r\n *\r\n * TODO: Wrap the angles in this function?\r\n *\r\n * @function Phaser.Math.Angle.ShortestBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle1 - The first angle in the range -180 to 180.\r\n * @param {number} angle2 - The second angle in the range -180 to 180.\r\n *\r\n * @return {number} The shortest angle, in degrees. If greater than zero it's a counter-clockwise rotation.\r\n */\r\nvar ShortestBetween = function (angle1, angle2)\r\n{\r\n var difference = angle2 - angle1;\r\n\r\n if (difference === 0)\r\n {\r\n return 0;\r\n }\r\n\r\n var times = Math.floor((difference - (-180)) / 360);\r\n\r\n return difference - (times * 360);\r\n\r\n};\r\n\r\nmodule.exports = ShortestBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MathWrap = require('../Wrap');\r\n\r\n/**\r\n * Wrap an angle.\r\n *\r\n * Wraps the angle to a value in the range of -PI to PI.\r\n *\r\n * @function Phaser.Math.Angle.Wrap\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to wrap, in radians.\r\n *\r\n * @return {number} The wrapped angle, in radians.\r\n */\r\nvar Wrap = function (angle)\r\n{\r\n return MathWrap(angle, -Math.PI, Math.PI);\r\n};\r\n\r\nmodule.exports = Wrap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Wrap = require('../Wrap');\r\n\r\n/**\r\n * Wrap an angle in degrees.\r\n *\r\n * Wraps the angle to a value in the range of -180 to 180.\r\n *\r\n * @function Phaser.Math.Angle.WrapDegrees\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to wrap, in degrees.\r\n *\r\n * @return {number} The wrapped angle, in degrees.\r\n */\r\nvar WrapDegrees = function (angle)\r\n{\r\n return Wrap(angle, -180, 180);\r\n};\r\n\r\nmodule.exports = WrapDegrees;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Angle\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Between: require('./Between'),\r\n BetweenPoints: require('./BetweenPoints'),\r\n BetweenPointsY: require('./BetweenPointsY'),\r\n BetweenY: require('./BetweenY'),\r\n CounterClockwise: require('./CounterClockwise'),\r\n Normalize: require('./Normalize'),\r\n Random: require('./Random'),\r\n RandomDegrees: require('./RandomDegrees'),\r\n Reverse: require('./Reverse'),\r\n RotateTo: require('./RotateTo'),\r\n ShortestBetween: require('./ShortestBetween'),\r\n Wrap: require('./Wrap'),\r\n WrapDegrees: require('./WrapDegrees')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = {\r\n\r\n /**\r\n * The value of PI * 2.\r\n * \r\n * @name Phaser.Math.PI2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n PI2: Math.PI * 2,\r\n\r\n /**\r\n * The value of PI * 0.5.\r\n * \r\n * @name Phaser.Math.TAU\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n TAU: Math.PI * 0.5,\r\n\r\n /**\r\n * An epsilon value (1.0e-6)\r\n * \r\n * @name Phaser.Math.EPSILON\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n EPSILON: 1.0e-6,\r\n\r\n /**\r\n * For converting degrees to radians (PI / 180)\r\n * \r\n * @name Phaser.Math.DEG_TO_RAD\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n DEG_TO_RAD: Math.PI / 180,\r\n\r\n /**\r\n * For converting radians to degrees (180 / PI)\r\n * \r\n * @name Phaser.Math.RAD_TO_DEG\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n RAD_TO_DEG: 180 / Math.PI,\r\n\r\n /**\r\n * An instance of the Random Number Generator.\r\n * This is not set until the Game boots.\r\n * \r\n * @name Phaser.Math.RND\r\n * @type {Phaser.Math.RandomDataGenerator}\r\n * @since 3.0.0\r\n */\r\n RND: null,\r\n\r\n /**\r\n * The minimum safe integer this browser supports.\r\n * We use a const for backward compatibility with Internet Explorer.\r\n * \r\n * @name Phaser.Math.MIN_SAFE_INTEGER\r\n * @type {number}\r\n * @since 3.21.0\r\n */\r\n MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991,\r\n\r\n /**\r\n * The maximum safe integer this browser supports.\r\n * We use a const for backward compatibility with Internet Explorer.\r\n * \r\n * @name Phaser.Math.MAX_SAFE_INTEGER\r\n * @type {number}\r\n * @since 3.21.0\r\n */\r\n MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991\r\n\r\n};\r\n\r\nmodule.exports = MATH_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points).\r\n *\r\n * @function Phaser.Math.Distance.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar DistanceBetween = function (x1, y1, x2, y2)\r\n{\r\n var dx = x1 - x2;\r\n var dy = y1 - y2;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n};\r\n\r\nmodule.exports = DistanceBetween;\r\n","/**\r\n * @author samme\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two points.\r\n *\r\n * @function Phaser.Math.Distance.BetweenPoints\r\n * @since 3.22.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} a - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} b - The second point.\r\n *\r\n * @return {number} The distance between the points.\r\n */\r\nvar DistanceBetweenPoints = function (a, b)\r\n{\r\n var dx = a.x - b.x;\r\n var dy = a.y - b.y;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n};\r\n\r\nmodule.exports = DistanceBetweenPoints;\r\n","/**\r\n * @author samme\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the squared distance between two points.\r\n *\r\n * @function Phaser.Math.Distance.BetweenPointsSquared\r\n * @since 3.22.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} a - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} b - The second point.\r\n *\r\n * @return {number} The squared distance between the points.\r\n */\r\nvar DistanceBetweenPointsSquared = function (a, b)\r\n{\r\n var dx = a.x - b.x;\r\n var dy = a.y - b.y;\r\n\r\n return dx * dx + dy * dy;\r\n};\r\n\r\nmodule.exports = DistanceBetweenPointsSquared;\r\n","/**\r\n * @author samme\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the Chebyshev distance between two sets of coordinates (points).\r\n *\r\n * Chebyshev distance (or chessboard distance) is the maximum of the horizontal and vertical distances.\r\n * It's the effective distance when movement can be horizontal, vertical, or diagonal.\r\n *\r\n * @function Phaser.Math.Distance.Chebyshev\r\n * @since 3.22.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar ChebyshevDistance = function (x1, y1, x2, y2)\r\n{\r\n return Math.max(Math.abs(x1 - x2), Math.abs(y1 - y2));\r\n};\r\n\r\nmodule.exports = ChebyshevDistance;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points) to the power of `pow`.\r\n *\r\n * @function Phaser.Math.Distance.Power\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n * @param {number} pow - The exponent.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar DistancePower = function (x1, y1, x2, y2, pow)\r\n{\r\n if (pow === undefined) { pow = 2; }\r\n\r\n return Math.sqrt(Math.pow(x2 - x1, pow) + Math.pow(y2 - y1, pow));\r\n};\r\n\r\nmodule.exports = DistancePower;\r\n","/**\r\n * @author samme\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the snake distance between two sets of coordinates (points).\r\n *\r\n * Snake distance (rectilinear distance, Manhattan distance) is the sum of the horizontal and vertical distances.\r\n * It's the effective distance when movement is allowed only horizontally or vertically (but not both).\r\n *\r\n * @function Phaser.Math.Distance.Snake\r\n * @since 3.22.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar SnakeDistance = function (x1, y1, x2, y2)\r\n{\r\n return Math.abs(x1 - x2) + Math.abs(y1 - y2);\r\n};\r\n\r\nmodule.exports = SnakeDistance;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points), squared.\r\n *\r\n * @function Phaser.Math.Distance.Squared\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point, squared.\r\n */\r\nvar DistanceSquared = function (x1, y1, x2, y2)\r\n{\r\n var dx = x1 - x2;\r\n var dy = y1 - y2;\r\n\r\n return dx * dx + dy * dy;\r\n};\r\n\r\nmodule.exports = DistanceSquared;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Distance\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Between: require('./DistanceBetween'),\r\n BetweenPoints: require('./DistanceBetweenPoints'),\r\n BetweenPointsSquared: require('./DistanceBetweenPointsSquared'),\r\n Chebyshev: require('./DistanceChebyshev'),\r\n Power: require('./DistancePower'),\r\n Snake: require('./DistanceSnake'),\r\n Squared: require('./DistanceSquared')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Back.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n return v * v * ((overshoot + 1) * v - overshoot);\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Back.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n var s = overshoot * 1.525;\r\n\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * (v * v * ((s + 1) * v - s));\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * ((s + 1) * v + s) + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Back.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n return --v * v * ((overshoot + 1) * v + overshoot) + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Back\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n v = 1 - v;\r\n\r\n if (v < 1 / 2.75)\r\n {\r\n return 1 - (7.5625 * v * v);\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n return 1 - (7.5625 * (v -= 1.5 / 2.75) * v + 0.75);\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n return 1 - (7.5625 * (v -= 2.25 / 2.75) * v + 0.9375);\r\n }\r\n else\r\n {\r\n return 1 - (7.5625 * (v -= 2.625 / 2.75) * v + 0.984375);\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n var reverse = false;\r\n\r\n if (v < 0.5)\r\n {\r\n v = 1 - (v * 2);\r\n reverse = true;\r\n }\r\n else\r\n {\r\n v = (v * 2) - 1;\r\n }\r\n\r\n if (v < 1 / 2.75)\r\n {\r\n v = 7.5625 * v * v;\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n v = 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n v = 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\r\n }\r\n else\r\n {\r\n v = 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\r\n }\r\n\r\n if (reverse)\r\n {\r\n return (1 - v) * 0.5;\r\n }\r\n else\r\n {\r\n return v * 0.5 + 0.5;\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n if (v < 1 / 2.75)\r\n {\r\n return 7.5625 * v * v;\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n return 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n return 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\r\n }\r\n else\r\n {\r\n return 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Bounce\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Circular.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return 1 - Math.sqrt(1 - v * v);\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Circular.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return -0.5 * (Math.sqrt(1 - v * v) - 1);\r\n }\r\n else\r\n {\r\n return 0.5 * (Math.sqrt(1 - (v -= 2) * v) + 1);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Circular.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return Math.sqrt(1 - (--v * v));\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Circular\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v;\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * v + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return --v * v * v + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Cubic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n return -(amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n if ((v *= 2) < 1)\r\n {\r\n return -0.5 * (amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\r\n }\r\n else\r\n {\r\n return amplitude * Math.pow(2, -10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period) * 0.5 + 1;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n return (amplitude * Math.pow(2, -10 * v) * Math.sin((v - s) * (2 * Math.PI) / period) + 1);\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Elastic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Expo.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return Math.pow(2, 10 * (v - 1)) - 0.001;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Expo.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * Math.pow(2, 10 * (v - 1));\r\n }\r\n else\r\n {\r\n return 0.5 * (2 - Math.pow(2, -10 * (v - 1)));\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Expo.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return 1 - Math.pow(2, -10 * v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Expo\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Back: require('./back'),\r\n Bounce: require('./bounce'),\r\n Circular: require('./circular'),\r\n Cubic: require('./cubic'),\r\n Elastic: require('./elastic'),\r\n Expo: require('./expo'),\r\n Linear: require('./linear'),\r\n Quadratic: require('./quadratic'),\r\n Quartic: require('./quartic'),\r\n Quintic: require('./quintic'),\r\n Sine: require('./sine'),\r\n Stepped: require('./stepped')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Linear easing (no variation).\r\n *\r\n * @function Phaser.Math.Easing.Linear\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Linear = function (v)\r\n{\r\n return v;\r\n};\r\n\r\nmodule.exports = Linear;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nmodule.exports = require('./Linear');\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v;\r\n }\r\n else\r\n {\r\n return -0.5 * (--v * (v - 2) - 1);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return v * (2 - v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quadratic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v * v;\r\n }\r\n else\r\n {\r\n return -0.5 * ((v -= 2) * v * v * v - 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return 1 - (--v * v * v * v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quartic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v * v * v;\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * v * v * v + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return --v * v * v * v * v + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quintic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Sine.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 1 - Math.cos(v * Math.PI / 2);\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Sine.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 0.5 * (1 - Math.cos(Math.PI * v));\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Sine.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return Math.sin(v * Math.PI / 2);\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Sine\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Stepped easing.\r\n *\r\n * @function Phaser.Math.Easing.Stepped\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [steps=1] - The number of steps in the ease.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Stepped = function (v, steps)\r\n{\r\n if (steps === undefined) { steps = 1; }\r\n\r\n if (v <= 0)\r\n {\r\n return 0;\r\n }\r\n else if (v >= 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return (((steps * v) | 0) + 1) * (1 / steps);\r\n }\r\n};\r\n\r\nmodule.exports = Stepped;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Stepped\r\n */\r\n\r\nmodule.exports = require('./Stepped');\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the fuzzy ceiling of the given value.\r\n *\r\n * @function Phaser.Math.Fuzzy.Ceil\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {number} The fuzzy ceiling of the value.\r\n */\r\nvar Ceil = function (value, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.ceil(value - epsilon);\r\n};\r\n\r\nmodule.exports = Ceil;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether the given values are fuzzily equal.\r\n *\r\n * Two numbers are fuzzily equal if their difference is less than `epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.Equal\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`.\r\n */\r\nvar Equal = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.abs(a - b) < epsilon;\r\n};\r\n\r\nmodule.exports = Equal;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the fuzzy floor of the given value.\r\n *\r\n * @function Phaser.Math.Fuzzy.Floor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {number} The floor of the value.\r\n */\r\nvar Floor = function (value, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.floor(value + epsilon);\r\n};\r\n\r\nmodule.exports = Floor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether `a` is fuzzily greater than `b`.\r\n *\r\n * `a` is fuzzily greater than `b` if it is more than `b - epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.GreaterThan\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if `a` is fuzzily greater than than `b`, otherwise `false`.\r\n */\r\nvar GreaterThan = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return a > b - epsilon;\r\n};\r\n\r\nmodule.exports = GreaterThan;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether `a` is fuzzily less than `b`.\r\n *\r\n * `a` is fuzzily less than `b` if it is less than `b + epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.LessThan\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if `a` is fuzzily less than `b`, otherwise `false`.\r\n */\r\nvar LessThan = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return a < b + epsilon;\r\n};\r\n\r\nmodule.exports = LessThan;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Fuzzy\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Ceil: require('./Ceil'),\r\n Equal: require('./Equal'),\r\n Floor: require('./Floor'),\r\n GreaterThan: require('./GreaterThan'),\r\n LessThan: require('./LessThan')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\nvar Extend = require('../utils/object/Extend');\r\n\r\n/**\r\n * @namespace Phaser.Math\r\n */\r\n\r\nvar PhaserMath = {\r\n\r\n // Collections of functions\r\n Angle: require('./angle/'),\r\n Distance: require('./distance/'),\r\n Easing: require('./easing/'),\r\n Fuzzy: require('./fuzzy/'),\r\n Interpolation: require('./interpolation/'),\r\n Pow2: require('./pow2/'),\r\n Snap: require('./snap/'),\r\n\r\n // Expose the RNG Class\r\n RandomDataGenerator: require('./random-data-generator/RandomDataGenerator'),\r\n\r\n // Single functions\r\n Average: require('./Average'),\r\n Bernstein: require('./Bernstein'),\r\n Between: require('./Between'),\r\n CatmullRom: require('./CatmullRom'),\r\n CeilTo: require('./CeilTo'),\r\n Clamp: require('./Clamp'),\r\n DegToRad: require('./DegToRad'),\r\n Difference: require('./Difference'),\r\n Factorial: require('./Factorial'),\r\n FloatBetween: require('./FloatBetween'),\r\n FloorTo: require('./FloorTo'),\r\n FromPercent: require('./FromPercent'),\r\n GetSpeed: require('./GetSpeed'),\r\n IsEven: require('./IsEven'),\r\n IsEvenStrict: require('./IsEvenStrict'),\r\n Linear: require('./Linear'),\r\n MaxAdd: require('./MaxAdd'),\r\n MinSub: require('./MinSub'),\r\n Percent: require('./Percent'),\r\n RadToDeg: require('./RadToDeg'),\r\n RandomXY: require('./RandomXY'),\r\n RandomXYZ: require('./RandomXYZ'),\r\n RandomXYZW: require('./RandomXYZW'),\r\n Rotate: require('./Rotate'),\r\n RotateAround: require('./RotateAround'),\r\n RotateAroundDistance: require('./RotateAroundDistance'),\r\n RotateTo: require('./RotateTo'),\r\n RoundAwayFromZero: require('./RoundAwayFromZero'),\r\n RoundTo: require('./RoundTo'),\r\n SinCosTableGenerator: require('./SinCosTableGenerator'),\r\n SmootherStep: require('./SmootherStep'),\r\n SmoothStep: require('./SmoothStep'),\r\n ToXY: require('./ToXY'),\r\n TransformXY: require('./TransformXY'),\r\n Within: require('./Within'),\r\n Wrap: require('./Wrap'),\r\n\r\n // Vector classes\r\n Vector2: require('./Vector2'),\r\n Vector3: require('./Vector3'),\r\n Vector4: require('./Vector4'),\r\n Matrix3: require('./Matrix3'),\r\n Matrix4: require('./Matrix4'),\r\n Quaternion: require('./Quaternion'),\r\n RotateVec3: require('./RotateVec3')\r\n\r\n};\r\n\r\n// Merge in the consts\r\n\r\nPhaserMath = Extend(false, PhaserMath, CONST);\r\n\r\n// Export it\r\n\r\nmodule.exports = PhaserMath;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bernstein = require('../Bernstein');\r\n\r\n/**\r\n * A bezier interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.Bezier\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar BezierInterpolation = function (v, k)\r\n{\r\n var b = 0;\r\n var n = v.length - 1;\r\n\r\n for (var i = 0; i <= n; i++)\r\n {\r\n b += Math.pow(1 - k, n - i) * Math.pow(k, i) * v[i] * Bernstein(n, i);\r\n }\r\n\r\n return b;\r\n};\r\n\r\nmodule.exports = BezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CatmullRom = require('../CatmullRom');\r\n\r\n/**\r\n * A Catmull-Rom interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.CatmullRom\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar CatmullRomInterpolation = function (v, k)\r\n{\r\n var m = v.length - 1;\r\n var f = m * k;\r\n var i = Math.floor(f);\r\n\r\n if (v[0] === v[m])\r\n {\r\n if (k < 0)\r\n {\r\n i = Math.floor(f = m * (1 + k));\r\n }\r\n\r\n return CatmullRom(f - i, v[(i - 1 + m) % m], v[i], v[(i + 1) % m], v[(i + 2) % m]);\r\n }\r\n else\r\n {\r\n if (k < 0)\r\n {\r\n return v[0] - (CatmullRom(-f, v[0], v[0], v[1], v[1]) - v[0]);\r\n }\r\n\r\n if (k > 1)\r\n {\r\n return v[m] - (CatmullRom(f - m, v[m], v[m], v[m - 1], v[m - 1]) - v[m]);\r\n }\r\n\r\n return CatmullRom(f - i, v[i ? i - 1 : 0], v[i], v[m < i + 1 ? m : i + 1], v[m < i + 2 ? m : i + 2]);\r\n }\r\n};\r\n\r\nmodule.exports = CatmullRomInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P0 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return k * k * k * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P1 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return 3 * k * k * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P2 (t, p)\r\n{\r\n return 3 * (1 - t) * t * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P3 (t, p)\r\n{\r\n return t * t * t * p;\r\n}\r\n\r\n/**\r\n * A cubic bezier interpolation method.\r\n *\r\n * https://medium.com/@adrian_cooney/bezier-interpolation-13b68563313a\r\n *\r\n * @function Phaser.Math.Interpolation.CubicBezier\r\n * @since 3.0.0\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} p0 - The start point.\r\n * @param {number} p1 - The first control point.\r\n * @param {number} p2 - The second control point.\r\n * @param {number} p3 - The end point.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar CubicBezierInterpolation = function (t, p0, p1, p2, p3)\r\n{\r\n return P0(t, p0) + P1(t, p1) + P2(t, p2) + P3(t, p3);\r\n};\r\n\r\nmodule.exports = CubicBezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Linear = require('../Linear');\r\n\r\n/**\r\n * A linear interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.Linear\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Linear_interpolation}\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {!number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {!number} The interpolated value.\r\n */\r\nvar LinearInterpolation = function (v, k)\r\n{\r\n var m = v.length - 1;\r\n var f = m * k;\r\n var i = Math.floor(f);\r\n\r\n if (k < 0)\r\n {\r\n return Linear(v[0], v[1], f);\r\n }\r\n else if (k > 1)\r\n {\r\n return Linear(v[m], v[m - 1], m - f);\r\n }\r\n else\r\n {\r\n return Linear(v[i], v[(i + 1 > m) ? m : i + 1], f - i);\r\n }\r\n};\r\n\r\nmodule.exports = LinearInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P0 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return k * k * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P1 (t, p)\r\n{\r\n return 2 * (1 - t) * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P2 (t, p)\r\n{\r\n return t * t * p;\r\n}\r\n\r\n// https://github.com/mrdoob/three.js/blob/master/src/extras/core/Interpolations.js\r\n\r\n/**\r\n * A quadratic bezier interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.QuadraticBezier\r\n * @since 3.2.0\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} p0 - The start point.\r\n * @param {number} p1 - The control point.\r\n * @param {number} p2 - The end point.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar QuadraticBezierInterpolation = function (t, p0, p1, p2)\r\n{\r\n return P0(t, p0) + P1(t, p1) + P2(t, p2);\r\n};\r\n\r\nmodule.exports = QuadraticBezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SmoothStep = require('../SmoothStep');\r\n\r\n/**\r\n * A Smooth Step interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.SmoothStep\r\n * @since 3.9.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar SmoothStepInterpolation = function (t, min, max)\r\n{\r\n return min + (max - min) * SmoothStep(t, 0, 1);\r\n};\r\n\r\nmodule.exports = SmoothStepInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SmootherStep = require('../SmootherStep');\r\n\r\n/**\r\n * A Smoother Step interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.SmootherStep\r\n * @since 3.9.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar SmootherStepInterpolation = function (t, min, max)\r\n{\r\n return min + (max - min) * SmootherStep(t, 0, 1);\r\n};\r\n\r\nmodule.exports = SmootherStepInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Interpolation\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Bezier: require('./BezierInterpolation'),\r\n CatmullRom: require('./CatmullRomInterpolation'),\r\n CubicBezier: require('./CubicBezierInterpolation'),\r\n Linear: require('./LinearInterpolation'),\r\n QuadraticBezier: require('./QuadraticBezierInterpolation'),\r\n SmoothStep: require('./SmoothStepInterpolation'),\r\n SmootherStep: require('./SmootherStepInterpolation')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the nearest power of 2 to the given `value`.\r\n *\r\n * @function Phaser.Math.Pow2.GetNext\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n *\r\n * @return {integer} The nearest power of 2 to `value`.\r\n */\r\nvar GetPowerOfTwo = function (value)\r\n{\r\n var index = Math.log(value) / 0.6931471805599453;\r\n\r\n return (1 << Math.ceil(index));\r\n};\r\n\r\nmodule.exports = GetPowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the given `width` and `height` are a power of two.\r\n * Useful for checking texture dimensions.\r\n *\r\n * @function Phaser.Math.Pow2.IsSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width.\r\n * @param {number} height - The height.\r\n *\r\n * @return {boolean} `true` if `width` and `height` are a power of two, otherwise `false`.\r\n */\r\nvar IsSizePowerOfTwo = function (width, height)\r\n{\r\n return (width > 0 && (width & (width - 1)) === 0 && height > 0 && (height & (height - 1)) === 0);\r\n};\r\n\r\nmodule.exports = IsSizePowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tests the value and returns `true` if it is a power of two.\r\n *\r\n * @function Phaser.Math.Pow2.IsValue\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to check if it's a power of two.\r\n *\r\n * @return {boolean} Returns `true` if `value` is a power of two, otherwise `false`.\r\n */\r\nvar IsValuePowerOfTwo = function (value)\r\n{\r\n return (value > 0 && (value & (value - 1)) === 0);\r\n};\r\n\r\nmodule.exports = IsValuePowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Pow2\r\n */\r\n\r\nmodule.exports = {\r\n\r\n GetNext: require('./GetPowerOfTwo'),\r\n IsSize: require('./IsSizePowerOfTwo'),\r\n IsValue: require('./IsValuePowerOfTwo')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A seeded Random Data Generator.\r\n * \r\n * Access via `Phaser.Math.RND` which is an instance of this class pre-defined\r\n * by Phaser. Or, create your own instance to use as you require.\r\n * \r\n * The `Math.RND` generator is seeded by the Game Config property value `seed`.\r\n * If no such config property exists, a random number is used.\r\n * \r\n * If you create your own instance of this class you should provide a seed for it.\r\n * If no seed is given it will use a 'random' one based on Date.now.\r\n *\r\n * @class RandomDataGenerator\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} [seeds] - The seeds to use for the random number generator.\r\n */\r\nvar RandomDataGenerator = new Class({\r\n\r\n initialize:\r\n\r\n function RandomDataGenerator (seeds)\r\n {\r\n if (seeds === undefined) { seeds = [ (Date.now() * Math.random()).toString() ]; }\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#c\r\n * @type {number}\r\n * @default 1\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.c = 1;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s0\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s0 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s1\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s1 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s2\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s2 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#n\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.2.0\r\n */\r\n this.n = 0;\r\n\r\n /**\r\n * Signs to choose from.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#signs\r\n * @type {number[]}\r\n * @since 3.0.0\r\n */\r\n this.signs = [ -1, 1 ];\r\n\r\n if (seeds)\r\n {\r\n this.init(seeds);\r\n }\r\n },\r\n\r\n /**\r\n * Private random helper.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#rnd\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @return {number} A random number.\r\n */\r\n rnd: function ()\r\n {\r\n var t = 2091639 * this.s0 + this.c * 2.3283064365386963e-10; // 2^-32\r\n\r\n this.c = t | 0;\r\n this.s0 = this.s1;\r\n this.s1 = this.s2;\r\n this.s2 = t - this.c;\r\n\r\n return this.s2;\r\n },\r\n\r\n /**\r\n * Internal method that creates a seed hash.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#hash\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {string} data - The value to hash.\r\n *\r\n * @return {number} The hashed value.\r\n */\r\n hash: function (data)\r\n {\r\n var h;\r\n var n = this.n;\r\n\r\n data = data.toString();\r\n\r\n for (var i = 0; i < data.length; i++)\r\n {\r\n n += data.charCodeAt(i);\r\n h = 0.02519603282416938 * n;\r\n n = h >>> 0;\r\n h -= n;\r\n h *= n;\r\n n = h >>> 0;\r\n h -= n;\r\n n += h * 0x100000000;// 2^32\r\n }\r\n\r\n this.n = n;\r\n\r\n return (n >>> 0) * 2.3283064365386963e-10;// 2^-32\r\n },\r\n\r\n /**\r\n * Initialize the state of the random data generator.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#init\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} seeds - The seeds to initialize the random data generator with.\r\n */\r\n init: function (seeds)\r\n {\r\n if (typeof seeds === 'string')\r\n {\r\n this.state(seeds);\r\n }\r\n else\r\n {\r\n this.sow(seeds);\r\n }\r\n },\r\n\r\n /**\r\n * Reset the seed of the random data generator.\r\n *\r\n * _Note_: the seed array is only processed up to the first `undefined` (or `null`) value, should such be present.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#sow\r\n * @since 3.0.0\r\n *\r\n * @param {string[]} seeds - The array of seeds: the `toString()` of each value is used.\r\n */\r\n sow: function (seeds)\r\n {\r\n // Always reset to default seed\r\n this.n = 0xefc8249d;\r\n this.s0 = this.hash(' ');\r\n this.s1 = this.hash(' ');\r\n this.s2 = this.hash(' ');\r\n this.c = 1;\r\n\r\n if (!seeds)\r\n {\r\n return;\r\n }\r\n\r\n // Apply any seeds\r\n for (var i = 0; i < seeds.length && (seeds[i] != null); i++)\r\n {\r\n var seed = seeds[i];\r\n\r\n this.s0 -= this.hash(seed);\r\n this.s0 += ~~(this.s0 < 0);\r\n this.s1 -= this.hash(seed);\r\n this.s1 += ~~(this.s1 < 0);\r\n this.s2 -= this.hash(seed);\r\n this.s2 += ~~(this.s2 < 0);\r\n }\r\n },\r\n\r\n /**\r\n * Returns a random integer between 0 and 2^32.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#integer\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random integer between 0 and 2^32.\r\n */\r\n integer: function ()\r\n {\r\n // 2^32\r\n return this.rnd() * 0x100000000;\r\n },\r\n\r\n /**\r\n * Returns a random real number between 0 and 1.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#frac\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between 0 and 1.\r\n */\r\n frac: function ()\r\n {\r\n // 2^-53\r\n return this.rnd() + (this.rnd() * 0x200000 | 0) * 1.1102230246251565e-16;\r\n },\r\n\r\n /**\r\n * Returns a random real number between 0 and 2^32.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#real\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between 0 and 2^32.\r\n */\r\n real: function ()\r\n {\r\n return this.integer() + this.frac();\r\n },\r\n\r\n /**\r\n * Returns a random integer between and including min and max.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#integerInRange\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n integerInRange: function (min, max)\r\n {\r\n return Math.floor(this.realInRange(0, max - min + 1) + min);\r\n },\r\n\r\n /**\r\n * Returns a random integer between and including min and max.\r\n * This method is an alias for RandomDataGenerator.integerInRange.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#between\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n between: function (min, max)\r\n {\r\n return Math.floor(this.realInRange(0, max - min + 1) + min);\r\n },\r\n\r\n /**\r\n * Returns a random real number between min and max.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#realInRange\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n realInRange: function (min, max)\r\n {\r\n return this.frac() * (max - min) + min;\r\n },\r\n\r\n /**\r\n * Returns a random real number between -1 and 1.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#normal\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between -1 and 1.\r\n */\r\n normal: function ()\r\n {\r\n return 1 - (2 * this.frac());\r\n },\r\n\r\n /**\r\n * Returns a valid RFC4122 version4 ID hex string from https://gist.github.com/1308368\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#uuid\r\n * @since 3.0.0\r\n *\r\n * @return {string} A valid RFC4122 version4 ID hex string\r\n */\r\n uuid: function ()\r\n {\r\n var a = '';\r\n var b = '';\r\n\r\n for (b = a = ''; a++ < 36; b += ~a % 5 | a * 3 & 4 ? (a ^ 15 ? 8 ^ this.frac() * (a ^ 20 ? 16 : 4) : 4).toString(16) : '-')\r\n {\r\n // eslint-disable-next-line no-empty\r\n }\r\n\r\n return b;\r\n },\r\n\r\n /**\r\n * Returns a random element from within the given array.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#pick\r\n * @since 3.0.0\r\n * \r\n * @generic T\r\n * @genericUse {T[]} - [array]\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {T[]} array - The array to pick a random element from.\r\n *\r\n * @return {T} A random member of the array.\r\n */\r\n pick: function (array)\r\n {\r\n return array[this.integerInRange(0, array.length - 1)];\r\n },\r\n\r\n /**\r\n * Returns a sign to be used with multiplication operator.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#sign\r\n * @since 3.0.0\r\n *\r\n * @return {number} -1 or +1.\r\n */\r\n sign: function ()\r\n {\r\n return this.pick(this.signs);\r\n },\r\n\r\n /**\r\n * Returns a random element from within the given array, favoring the earlier entries.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#weightedPick\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array]\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {T[]} array - The array to pick a random element from.\r\n *\r\n * @return {T} A random member of the array.\r\n */\r\n weightedPick: function (array)\r\n {\r\n return array[~~(Math.pow(this.frac(), 2) * (array.length - 1) + 0.5)];\r\n },\r\n\r\n /**\r\n * Returns a random timestamp between min and max, or between the beginning of 2000 and the end of 2020 if min and max aren't specified.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#timestamp\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random timestamp between min and max.\r\n */\r\n timestamp: function (min, max)\r\n {\r\n return this.realInRange(min || 946684800000, max || 1577862000000);\r\n },\r\n\r\n /**\r\n * Returns a random angle between -180 and 180.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#angle\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random number between -180 and 180.\r\n */\r\n angle: function ()\r\n {\r\n return this.integerInRange(-180, 180);\r\n },\r\n\r\n /**\r\n * Returns a random rotation in radians, between -3.141 and 3.141\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#rotation\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random number between -3.141 and 3.141\r\n */\r\n rotation: function ()\r\n {\r\n return this.realInRange(-3.1415926, 3.1415926);\r\n },\r\n\r\n /**\r\n * Gets or Sets the state of the generator. This allows you to retain the values\r\n * that the generator is using between games, i.e. in a game save file.\r\n *\r\n * To seed this generator with a previously saved state you can pass it as the\r\n * `seed` value in your game config, or call this method directly after Phaser has booted.\r\n *\r\n * Call this method with no parameters to return the current state.\r\n *\r\n * If providing a state it should match the same format that this method\r\n * returns, which is a string with a header `!rnd` followed by the `c`,\r\n * `s0`, `s1` and `s2` values respectively, each comma-delimited.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#state\r\n * @since 3.0.0\r\n *\r\n * @param {string} [state] - Generator state to be set.\r\n *\r\n * @return {string} The current state of the generator.\r\n */\r\n state: function (state)\r\n {\r\n if (typeof state === 'string' && state.match(/^!rnd/))\r\n {\r\n state = state.split(',');\r\n\r\n this.c = parseFloat(state[1]);\r\n this.s0 = parseFloat(state[2]);\r\n this.s1 = parseFloat(state[3]);\r\n this.s2 = parseFloat(state[4]);\r\n }\r\n\r\n return [ '!rnd', this.c, this.s0, this.s1, this.s2 ].join(',');\r\n },\r\n\r\n /**\r\n * Shuffles the given array, using the current seed.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#shuffle\r\n * @since 3.7.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array,$return]\r\n *\r\n * @param {T[]} [array] - The array to be shuffled.\r\n *\r\n * @return {T[]} The shuffled array.\r\n */\r\n shuffle: function (array)\r\n {\r\n var len = array.length - 1;\r\n\r\n for (var i = len; i > 0; i--)\r\n {\r\n var randomIndex = Math.floor(this.frac() * (i + 1));\r\n var itemAtIndex = array[randomIndex];\r\n\r\n array[randomIndex] = array[i];\r\n array[i] = itemAtIndex;\r\n }\r\n\r\n return array;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = RandomDataGenerator;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using ceil.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `15`.\r\n * As will `14` snap to `15`... but `16` will snap to `20`.\r\n *\r\n * @function Phaser.Math.Snap.Ceil\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapCeil = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.ceil(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapCeil;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using floor.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10`.\r\n * As will `14` snap to `10`... but `16` will snap to `15`.\r\n *\r\n * @function Phaser.Math.Snap.Floor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapFloor = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.floor(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapFloor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using rounding.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10` whereas `14` will snap to `15`.\r\n *\r\n * @function Phaser.Math.Snap.To\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapTo = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.round(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Snap\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Ceil: require('./SnapCeil'),\r\n Floor: require('./SnapFloor'),\r\n To: require('./SnapTo')\r\n\r\n};\r\n","/**\r\n* @author Richard Davey \r\n* @copyright 2020 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A Global Plugin is installed just once into the Game owned Plugin Manager.\r\n * It can listen for Game events and respond to them.\r\n *\r\n * @class BasePlugin\r\n * @memberof Phaser.Plugins\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n */\r\nvar BasePlugin = new Class({\r\n\r\n initialize:\r\n\r\n function BasePlugin (pluginManager)\r\n {\r\n /**\r\n * A handy reference to the Plugin Manager that is responsible for this plugin.\r\n * Can be used as a route to gain access to game systems and events.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#pluginManager\r\n * @type {Phaser.Plugins.PluginManager}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.pluginManager = pluginManager;\r\n\r\n /**\r\n * A reference to the Game instance this plugin is running under.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#game\r\n * @type {Phaser.Game}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.game = pluginManager.game;\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is first instantiated.\r\n * It will never be called again on this instance.\r\n * In here you can set-up whatever you need for this plugin to run.\r\n * If a plugin is set to automatically start then `BasePlugin.start` will be called immediately after this.\r\n * On a Scene Plugin, this method is never called. Use {@link Phaser.Plugins.ScenePlugin#boot} instead.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#init\r\n * @since 3.8.0\r\n *\r\n * @param {?any} [data] - A value specified by the user, if any, from the `data` property of the plugin's configuration object (if started at game boot) or passed in the PluginManager's `install` method (if started manually).\r\n */\r\n init: function ()\r\n {\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is started.\r\n * If a plugin is stopped, and then started again, this will get called again.\r\n * Typically called immediately after `BasePlugin.init`.\r\n * On a Scene Plugin, this method is never called.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#start\r\n * @since 3.8.0\r\n */\r\n start: function ()\r\n {\r\n // Here are the game-level events you can listen to.\r\n // At the very least you should offer a destroy handler for when the game closes down.\r\n\r\n // var eventEmitter = this.game.events;\r\n\r\n // eventEmitter.once('destroy', this.gameDestroy, this);\r\n // eventEmitter.on('pause', this.gamePause, this);\r\n // eventEmitter.on('resume', this.gameResume, this);\r\n // eventEmitter.on('resize', this.gameResize, this);\r\n // eventEmitter.on('prestep', this.gamePreStep, this);\r\n // eventEmitter.on('step', this.gameStep, this);\r\n // eventEmitter.on('poststep', this.gamePostStep, this);\r\n // eventEmitter.on('prerender', this.gamePreRender, this);\r\n // eventEmitter.on('postrender', this.gamePostRender, this);\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is stopped.\r\n * The game code has requested that your plugin stop doing whatever it does.\r\n * It is now considered as 'inactive' by the PluginManager.\r\n * Handle that process here (i.e. stop listening for events, etc)\r\n * If the plugin is started again then `BasePlugin.start` will be called again.\r\n * On a Scene Plugin, this method is never called.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#stop\r\n * @since 3.8.0\r\n */\r\n stop: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Game instance has been destroyed.\r\n * You must release everything in here, all references, all objects, free it all up.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pluginManager = null;\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BasePlugin;\r\n","/**\r\n* @author Richard Davey \r\n* @copyright 2020 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar BasePlugin = require('./BasePlugin');\r\nvar Class = require('../utils/Class');\r\nvar SceneEvents = require('../scene/events');\r\n\r\n/**\r\n * @classdesc\r\n * A Scene Level Plugin is installed into every Scene and belongs to that Scene.\r\n * It can listen for Scene events and respond to them.\r\n * It can map itself to a Scene property, or into the Scene Systems, or both.\r\n *\r\n * @class ScenePlugin\r\n * @memberof Phaser.Plugins\r\n * @extends Phaser.Plugins.BasePlugin\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n */\r\nvar ScenePlugin = new Class({\r\n\r\n Extends: BasePlugin,\r\n\r\n initialize:\r\n\r\n function ScenePlugin (scene, pluginManager)\r\n {\r\n BasePlugin.call(this, pluginManager);\r\n\r\n /**\r\n * A reference to the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#scene\r\n * @type {?Phaser.Scene}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene Systems of the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#systems\r\n * @type {?Phaser.Scenes.Systems}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * This method is called when the Scene boots. It is only ever called once.\r\n *\r\n * By this point the plugin properties `scene` and `systems` will have already been set.\r\n *\r\n * In here you can listen for {@link Phaser.Scenes.Events Scene events} and set-up whatever you need for this plugin to run.\r\n * Here are the Scene events you can listen to:\r\n *\r\n * - start\r\n * - ready\r\n * - preupdate\r\n * - update\r\n * - postupdate\r\n * - resize\r\n * - pause\r\n * - resume\r\n * - sleep\r\n * - wake\r\n * - transitioninit\r\n * - transitionstart\r\n * - transitioncomplete\r\n * - transitionout\r\n * - shutdown\r\n * - destroy\r\n *\r\n * At the very least you should offer a destroy handler for when the Scene closes down, i.e:\r\n *\r\n * ```javascript\r\n * var eventEmitter = this.systems.events;\r\n * eventEmitter.once('destroy', this.sceneDestroy, this);\r\n * ```\r\n *\r\n * @method Phaser.Plugins.ScenePlugin#boot\r\n * @since 3.8.0\r\n */\r\n boot: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Game instance has been destroyed.\r\n * \r\n * You must release everything in here, all references, all objects, free it all up.\r\n *\r\n * @method Phaser.Plugins.ScenePlugin#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pluginManager = null;\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ScenePlugin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Blend Modes.\r\n * \r\n * @namespace Phaser.BlendModes\r\n * @since 3.0.0\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * Skips the Blend Mode check in the renderer.\r\n * \r\n * @name Phaser.BlendModes.SKIP_CHECK\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SKIP_CHECK: -1,\r\n\r\n /**\r\n * Normal blend mode. For Canvas and WebGL.\r\n * This is the default setting and draws new shapes on top of the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.NORMAL\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n NORMAL: 0,\r\n\r\n /**\r\n * Add blend mode. For Canvas and WebGL.\r\n * Where both shapes overlap the color is determined by adding color values.\r\n * \r\n * @name Phaser.BlendModes.ADD\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ADD: 1,\r\n\r\n /**\r\n * Multiply blend mode. For Canvas and WebGL.\r\n * The pixels are of the top layer are multiplied with the corresponding pixel of the bottom layer. A darker picture is the result.\r\n * \r\n * @name Phaser.BlendModes.MULTIPLY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n MULTIPLY: 2,\r\n\r\n /**\r\n * Screen blend mode. For Canvas and WebGL.\r\n * The pixels are inverted, multiplied, and inverted again. A lighter picture is the result (opposite of multiply)\r\n * \r\n * @name Phaser.BlendModes.SCREEN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SCREEN: 3,\r\n\r\n /**\r\n * Overlay blend mode. For Canvas only.\r\n * A combination of multiply and screen. Dark parts on the base layer become darker, and light parts become lighter.\r\n * \r\n * @name Phaser.BlendModes.OVERLAY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n OVERLAY: 4,\r\n\r\n /**\r\n * Darken blend mode. For Canvas only.\r\n * Retains the darkest pixels of both layers.\r\n * \r\n * @name Phaser.BlendModes.DARKEN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DARKEN: 5,\r\n\r\n /**\r\n * Lighten blend mode. For Canvas only.\r\n * Retains the lightest pixels of both layers.\r\n * \r\n * @name Phaser.BlendModes.LIGHTEN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LIGHTEN: 6,\r\n\r\n /**\r\n * Color Dodge blend mode. For Canvas only.\r\n * Divides the bottom layer by the inverted top layer.\r\n * \r\n * @name Phaser.BlendModes.COLOR_DODGE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR_DODGE: 7,\r\n\r\n /**\r\n * Color Burn blend mode. For Canvas only.\r\n * Divides the inverted bottom layer by the top layer, and then inverts the result.\r\n * \r\n * @name Phaser.BlendModes.COLOR_BURN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR_BURN: 8,\r\n\r\n /**\r\n * Hard Light blend mode. For Canvas only.\r\n * A combination of multiply and screen like overlay, but with top and bottom layer swapped.\r\n * \r\n * @name Phaser.BlendModes.HARD_LIGHT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HARD_LIGHT: 9,\r\n\r\n /**\r\n * Soft Light blend mode. For Canvas only.\r\n * A softer version of hard-light. Pure black or white does not result in pure black or white.\r\n * \r\n * @name Phaser.BlendModes.SOFT_LIGHT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOFT_LIGHT: 10,\r\n\r\n /**\r\n * Difference blend mode. For Canvas only.\r\n * Subtracts the bottom layer from the top layer or the other way round to always get a positive value.\r\n * \r\n * @name Phaser.BlendModes.DIFFERENCE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DIFFERENCE: 11,\r\n\r\n /**\r\n * Exclusion blend mode. For Canvas only.\r\n * Like difference, but with lower contrast.\r\n * \r\n * @name Phaser.BlendModes.EXCLUSION\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n EXCLUSION: 12,\r\n\r\n /**\r\n * Hue blend mode. For Canvas only.\r\n * Preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer.\r\n * \r\n * @name Phaser.BlendModes.HUE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HUE: 13,\r\n\r\n /**\r\n * Saturation blend mode. For Canvas only.\r\n * Preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer.\r\n * \r\n * @name Phaser.BlendModes.SATURATION\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SATURATION: 14,\r\n\r\n /**\r\n * Color blend mode. For Canvas only.\r\n * Preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer.\r\n * \r\n * @name Phaser.BlendModes.COLOR\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR: 15,\r\n\r\n /**\r\n * Luminosity blend mode. For Canvas only.\r\n * Preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer.\r\n * \r\n * @name Phaser.BlendModes.LUMINOSITY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LUMINOSITY: 16,\r\n\r\n /**\r\n * Alpha erase blend mode. For Canvas and WebGL.\r\n * \r\n * @name Phaser.BlendModes.ERASE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ERASE: 17,\r\n\r\n /**\r\n * Source-in blend mode. For Canvas only.\r\n * The new shape is drawn only where both the new shape and the destination canvas overlap. Everything else is made transparent.\r\n * \r\n * @name Phaser.BlendModes.SOURCE_IN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_IN: 18,\r\n\r\n /**\r\n * Source-out blend mode. For Canvas only.\r\n * The new shape is drawn where it doesn't overlap the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.SOURCE_OUT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_OUT: 19,\r\n\r\n /**\r\n * Source-out blend mode. For Canvas only.\r\n * The new shape is only drawn where it overlaps the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.SOURCE_ATOP\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_ATOP: 20,\r\n\r\n /**\r\n * Destination-over blend mode. For Canvas only.\r\n * New shapes are drawn behind the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_OVER\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_OVER: 21,\r\n\r\n /**\r\n * Destination-in blend mode. For Canvas only.\r\n * The existing canvas content is kept where both the new shape and existing canvas content overlap. Everything else is made transparent.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_IN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_IN: 22,\r\n\r\n /**\r\n * Destination-out blend mode. For Canvas only.\r\n * The existing content is kept where it doesn't overlap the new shape.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_OUT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_OUT: 23,\r\n\r\n /**\r\n * Destination-out blend mode. For Canvas only.\r\n * The existing canvas is only kept where it overlaps the new shape. The new shape is drawn behind the canvas content.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_ATOP\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_ATOP: 24,\r\n\r\n /**\r\n * Lighten blend mode. For Canvas only.\r\n * Where both shapes overlap the color is determined by adding color values.\r\n * \r\n * @name Phaser.BlendModes.LIGHTER\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LIGHTER: 25,\r\n\r\n /**\r\n * Copy blend mode. For Canvas only.\r\n * Only the new shape is shown.\r\n * \r\n * @name Phaser.BlendModes.COPY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COPY: 26,\r\n\r\n /**\r\n * Xor blend mode. For Canvas only.\r\n * Shapes are made transparent where both overlap and drawn normal everywhere else.\r\n * \r\n * @name Phaser.BlendModes.XOR\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n XOR: 27\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scale Manager Resize Event.\r\n * \r\n * This event is dispatched whenever the Scale Manager detects a resize event from the browser.\r\n * It sends three parameters to the callback, each of them being Size components. You can read\r\n * the `width`, `height`, `aspectRatio` and other properties of these components to help with\r\n * scaling your own game content.\r\n *\r\n * @event Phaser.Scale.Events#RESIZE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Structs.Size} gameSize - A reference to the Game Size component. This is the un-scaled size of your game canvas.\r\n * @param {Phaser.Structs.Size} baseSize - A reference to the Base Size component. This is the game size multiplied by resolution.\r\n * @param {Phaser.Structs.Size} displaySize - A reference to the Display Size component. This is the scaled canvas size, after applying zoom and scale mode.\r\n * @param {number} resolution - The current resolution. Defaults to 1 at the moment.\r\n * @param {number} previousWidth - If the `gameSize` has changed, this value contains its previous width, otherwise it contains the current width.\r\n * @param {number} previousHeight - If the `gameSize` has changed, this value contains its previous height, otherwise it contains the current height.\r\n */\r\nmodule.exports = 'resize';\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Added to Scene Event.\n *\n * This event is dispatched when a Game Object is added to a Scene.\n *\n * Listen for it from a Scene using `this.scene.events.on('addedtoscene', listener)`.\n *\n * @event Phaser.Scenes.Events#ADDED_TO_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\n */\nmodule.exports = 'addedtoscene';\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Boot Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems boot process. Primarily used by Scene Plugins.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('boot', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#BOOT\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'boot';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Create Event.\r\n * \r\n * This event is dispatched by a Scene after it has been created by the Scene Manager.\r\n * \r\n * If a Scene has a `create` method then this event is emitted _after_ that has run.\r\n * \r\n * If there is a transition, this event will be fired after the `TRANSITION_START` event.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('create', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#CREATE\r\n * @since 3.17.0\r\n * \r\n * @param {Phaser.Scene} scene - A reference to the Scene that emitted this event.\r\n */\r\nmodule.exports = 'create';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Destroy Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems destroy process.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('destroy', listener)`.\r\n * \r\n * You should destroy any resources that may be in use by your Scene in this event handler.\r\n * \r\n * @event Phaser.Scenes.Events#DESTROY\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pause Event.\r\n * \r\n * This event is dispatched by a Scene when it is paused, either directly via the `pause` method, or as an\r\n * action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('pause', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#PAUSE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was paused.\r\n */\r\nmodule.exports = 'pause';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Post Update Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('postupdate', listener)`.\r\n * \r\n * A Scene will only run its step if it is active.\r\n * \r\n * @event Phaser.Scenes.Events#POST_UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'postupdate';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pre Update Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('preupdate', listener)`.\r\n * \r\n * A Scene will only run its step if it is active.\r\n * \r\n * @event Phaser.Scenes.Events#PRE_UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'preupdate';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Ready Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems start process.\r\n * By this point in the process the Scene is now fully active and rendering.\r\n * This event is meant for your game code to use, as all plugins have responded to the earlier 'start' event.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('ready', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#READY\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was started.\r\n */\r\nmodule.exports = 'ready';\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Removed from Scene Event.\n *\n * This event is dispatched when a Game Object is removed from a Scene.\n *\n * Listen for it from a Scene using `this.scene.events.on('removedfromscene', listener)`.\n *\n * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\n */\nmodule.exports = 'removedfromscene';\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Render Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('render', listener)`.\r\n * \r\n * A Scene will only render if it is visible and active.\r\n * By the time this event is dispatched, the Scene will have already been rendered.\r\n * \r\n * @event Phaser.Scenes.Events#RENDER\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\r\n */\r\nmodule.exports = 'render';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Resume Event.\r\n * \r\n * This event is dispatched by a Scene when it is resumed from a paused state, either directly via the `resume` method,\r\n * or as an action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('resume', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#RESUME\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was resumed.\r\n */\r\nmodule.exports = 'resume';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Shutdown Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems shutdown process.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('shutdown', listener)`.\r\n * \r\n * You should free-up any resources that may be in use by your Scene in this event handler, on the understanding\r\n * that the Scene may, at any time, become active again. A shutdown Scene is not 'destroyed', it's simply not\r\n * currently active. Use the [DESTROY]{@linkcode Phaser.Scenes.Events#event:DESTROY} event to completely clear resources.\r\n * \r\n * @event Phaser.Scenes.Events#SHUTDOWN\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was shutdown.\r\n */\r\nmodule.exports = 'shutdown';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Sleep Event.\r\n * \r\n * This event is dispatched by a Scene when it is sent to sleep, either directly via the `sleep` method,\r\n * or as an action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('sleep', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#SLEEP\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was sent to sleep.\r\n */\r\nmodule.exports = 'sleep';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Start Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems start process. Primarily used by Scene Plugins.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('start', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#START\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Complete Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition.\r\n * \r\n * It happens when the transition process has completed. This occurs when the duration timer equals or exceeds the duration\r\n * of the transition.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitioncomplete', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_COMPLETE\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} scene -The Scene on which the transitioned completed.\r\n */\r\nmodule.exports = 'transitioncomplete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Init Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition.\r\n * \r\n * It happens immediately after the `Scene.init` method is called. If the Scene does not have an `init` method,\r\n * this event is not dispatched.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitioninit', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_INIT\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitioninit';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Out Event.\r\n * \r\n * This event is dispatched by a Scene when it initiates a transition to another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitionout', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_OUT\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} target - A reference to the Scene that is being transitioned to.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionout';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Start Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition, only if that Scene was not asleep.\r\n * \r\n * It happens immediately after the `Scene.create` method is called. If the Scene does not have a `create` method,\r\n * this event is dispatched anyway.\r\n * \r\n * If the Target Scene was sleeping then the [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} event is\r\n * dispatched instead of this event.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitionstart', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_START\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionstart';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Wake Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition, only if that Scene was asleep before\r\n * the transition began. If the Scene was not asleep the [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} event is dispatched instead.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitionwake', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_WAKE\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionwake';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Update Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('update', listener)`.\r\n * \r\n * A Scene will only run its step if it is active.\r\n * \r\n * @event Phaser.Scenes.Events#UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'update';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Wake Event.\r\n * \r\n * This event is dispatched by a Scene when it is woken from sleep, either directly via the `wake` method,\r\n * or as an action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('wake', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#WAKE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was woken up.\r\n */\r\nmodule.exports = 'wake';\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Scenes.Events\n */\n\nmodule.exports = {\n\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\n BOOT: require('./BOOT_EVENT'),\n CREATE: require('./CREATE_EVENT'),\n DESTROY: require('./DESTROY_EVENT'),\n PAUSE: require('./PAUSE_EVENT'),\n POST_UPDATE: require('./POST_UPDATE_EVENT'),\n PRE_UPDATE: require('./PRE_UPDATE_EVENT'),\n READY: require('./READY_EVENT'),\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'),\n RENDER: require('./RENDER_EVENT'),\n RESUME: require('./RESUME_EVENT'),\n SHUTDOWN: require('./SHUTDOWN_EVENT'),\n SLEEP: require('./SLEEP_EVENT'),\n START: require('./START_EVENT'),\n TRANSITION_COMPLETE: require('./TRANSITION_COMPLETE_EVENT'),\n TRANSITION_INIT: require('./TRANSITION_INIT_EVENT'),\n TRANSITION_OUT: require('./TRANSITION_OUT_EVENT'),\n TRANSITION_START: require('./TRANSITION_START_EVENT'),\n TRANSITION_WAKE: require('./TRANSITION_WAKE_EVENT'),\n UPDATE: require('./UPDATE_EVENT'),\n WAKE: require('./WAKE_EVENT')\n\n};\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Retrieves the value of the given key from an object.\r\n *\r\n * @function Phaser.Tweens.Builders.GetBoolean\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The key to look for in the `source` object.\r\n * @param {*} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided.\r\n *\r\n * @return {*} The retrieved value.\r\n */\r\nvar GetBoolean = function (source, key, defaultValue)\r\n{\r\n if (!source)\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key))\r\n {\r\n return source[key];\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetBoolean;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar TWEEN_CONST = {\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.CREATED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n CREATED: 0,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.INIT\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n INIT: 1,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n DELAY: 2,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.OFFSET_DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n OFFSET_DELAY: 3,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.PENDING_RENDER\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PENDING_RENDER: 4,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.PLAYING_FORWARD\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PLAYING_FORWARD: 5,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.PLAYING_BACKWARD\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PLAYING_BACKWARD: 6,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.HOLD_DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n HOLD_DELAY: 7,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.REPEAT_DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n REPEAT_DELAY: 8,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.COMPLETE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n COMPLETE: 9,\r\n\r\n // Tween specific (starts from 20 to cleanly allow extra TweenData consts in the future)\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.PENDING_ADD\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PENDING_ADD: 20,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.PAUSED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PAUSED: 21,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.LOOP_DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOOP_DELAY: 22,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.ACTIVE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n ACTIVE: 23,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.COMPLETE_DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n COMPLETE_DELAY: 24,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.PENDING_REMOVE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PENDING_REMOVE: 25,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.REMOVED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n REMOVED: 26\r\n\r\n};\r\n\r\nmodule.exports = TWEEN_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Taken from klasse by mattdesl https://github.com/mattdesl/klasse\r\n\r\nfunction hasGetterOrSetter (def)\r\n{\r\n return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function');\r\n}\r\n\r\nfunction getProperty (definition, k, isClassDescriptor)\r\n{\r\n // This may be a lightweight object, OR it might be a property that was defined previously.\r\n\r\n // For simple class descriptors we can just assume its NOT previously defined.\r\n var def = (isClassDescriptor) ? definition[k] : Object.getOwnPropertyDescriptor(definition, k);\r\n\r\n if (!isClassDescriptor && def.value && typeof def.value === 'object')\r\n {\r\n def = def.value;\r\n }\r\n\r\n // This might be a regular property, or it may be a getter/setter the user defined in a class.\r\n if (def && hasGetterOrSetter(def))\r\n {\r\n if (typeof def.enumerable === 'undefined')\r\n {\r\n def.enumerable = true;\r\n }\r\n\r\n if (typeof def.configurable === 'undefined')\r\n {\r\n def.configurable = true;\r\n }\r\n\r\n return def;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n}\r\n\r\nfunction hasNonConfigurable (obj, k)\r\n{\r\n var prop = Object.getOwnPropertyDescriptor(obj, k);\r\n\r\n if (!prop)\r\n {\r\n return false;\r\n }\r\n\r\n if (prop.value && typeof prop.value === 'object')\r\n {\r\n prop = prop.value;\r\n }\r\n\r\n if (prop.configurable === false)\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\n/**\r\n * Extends the given `myClass` object's prototype with the properties of `definition`.\r\n *\r\n * @function extend\r\n * @param {Object} ctor The constructor object to mix into.\r\n * @param {Object} definition A dictionary of functions for the class.\r\n * @param {boolean} isClassDescriptor Is the definition a class descriptor?\r\n * @param {Object} [extend] The parent constructor object.\r\n */\r\nfunction extend (ctor, definition, isClassDescriptor, extend)\r\n{\r\n for (var k in definition)\r\n {\r\n if (!definition.hasOwnProperty(k))\r\n {\r\n continue;\r\n }\r\n\r\n var def = getProperty(definition, k, isClassDescriptor);\r\n\r\n if (def !== false)\r\n {\r\n // If Extends is used, we will check its prototype to see if the final variable exists.\r\n\r\n var parent = extend || ctor;\r\n\r\n if (hasNonConfigurable(parent.prototype, k))\r\n {\r\n // Just skip the final property\r\n if (Class.ignoreFinals)\r\n {\r\n continue;\r\n }\r\n\r\n // We cannot re-define a property that is configurable=false.\r\n // So we will consider them final and throw an error. This is by\r\n // default so it is clear to the developer what is happening.\r\n // You can set ignoreFinals to true if you need to extend a class\r\n // which has configurable=false; it will simply not re-define final properties.\r\n throw new Error('cannot override final property \\'' + k + '\\', set Class.ignoreFinals = true to skip');\r\n }\r\n\r\n Object.defineProperty(ctor.prototype, k, def);\r\n }\r\n else\r\n {\r\n ctor.prototype[k] = definition[k];\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Applies the given `mixins` to the prototype of `myClass`.\r\n *\r\n * @function mixin\r\n * @param {Object} myClass The constructor object to mix into.\r\n * @param {Object|Array} mixins The mixins to apply to the constructor.\r\n */\r\nfunction mixin (myClass, mixins)\r\n{\r\n if (!mixins)\r\n {\r\n return;\r\n }\r\n\r\n if (!Array.isArray(mixins))\r\n {\r\n mixins = [ mixins ];\r\n }\r\n\r\n for (var i = 0; i < mixins.length; i++)\r\n {\r\n extend(myClass, mixins[i].prototype || mixins[i]);\r\n }\r\n}\r\n\r\n/**\r\n * Creates a new class with the given descriptor.\r\n * The constructor, defined by the name `initialize`,\r\n * is an optional function. If unspecified, an anonymous\r\n * function will be used which calls the parent class (if\r\n * one exists).\r\n *\r\n * You can also use `Extends` and `Mixins` to provide subclassing\r\n * and inheritance.\r\n *\r\n * @class Phaser.Class\r\n * @constructor\r\n * @param {Object} definition a dictionary of functions for the class\r\n * @example\r\n *\r\n * var MyClass = new Phaser.Class({\r\n *\r\n * initialize: function() {\r\n * this.foo = 2.0;\r\n * },\r\n *\r\n * bar: function() {\r\n * return this.foo + 5;\r\n * }\r\n * });\r\n */\r\nfunction Class (definition)\r\n{\r\n if (!definition)\r\n {\r\n definition = {};\r\n }\r\n\r\n // The variable name here dictates what we see in Chrome debugger\r\n var initialize;\r\n var Extends;\r\n\r\n if (definition.initialize)\r\n {\r\n if (typeof definition.initialize !== 'function')\r\n {\r\n throw new Error('initialize must be a function');\r\n }\r\n\r\n initialize = definition.initialize;\r\n\r\n // Usually we should avoid 'delete' in V8 at all costs.\r\n // However, its unlikely to make any performance difference\r\n // here since we only call this on class creation (i.e. not object creation).\r\n delete definition.initialize;\r\n }\r\n else if (definition.Extends)\r\n {\r\n var base = definition.Extends;\r\n\r\n initialize = function ()\r\n {\r\n base.apply(this, arguments);\r\n };\r\n }\r\n else\r\n {\r\n initialize = function () {};\r\n }\r\n\r\n if (definition.Extends)\r\n {\r\n initialize.prototype = Object.create(definition.Extends.prototype);\r\n initialize.prototype.constructor = initialize;\r\n\r\n // For getOwnPropertyDescriptor to work, we need to act directly on the Extends (or Mixin)\r\n\r\n Extends = definition.Extends;\r\n\r\n delete definition.Extends;\r\n }\r\n else\r\n {\r\n initialize.prototype.constructor = initialize;\r\n }\r\n\r\n // Grab the mixins, if they are specified...\r\n var mixins = null;\r\n\r\n if (definition.Mixins)\r\n {\r\n mixins = definition.Mixins;\r\n delete definition.Mixins;\r\n }\r\n\r\n // First, mixin if we can.\r\n mixin(initialize, mixins);\r\n\r\n // Now we grab the actual definition which defines the overrides.\r\n extend(initialize, definition, true, Extends);\r\n\r\n return initialize;\r\n}\r\n\r\nClass.extend = extend;\r\nClass.mixin = mixin;\r\nClass.ignoreFinals = false;\r\n\r\nmodule.exports = Class;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A NOOP (No Operation) callback function.\r\n *\r\n * Used internally by Phaser when it's more expensive to determine if a callback exists\r\n * than it is to just invoke an empty function.\r\n *\r\n * @function Phaser.Utils.NOOP\r\n * @since 3.0.0\r\n */\r\nvar NOOP = function ()\r\n{\r\n // NOOP\r\n};\r\n\r\nmodule.exports = NOOP;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds the given item, or array of items, to the array.\r\n *\r\n * Each item must be unique within the array.\r\n *\r\n * The array is modified in-place and returned.\r\n *\r\n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\r\n * added will take the array length over this limit, it will stop adding once the limit is reached.\r\n *\r\n * You can optionally specify a callback to be invoked for each item successfully added to the array.\r\n *\r\n * @function Phaser.Utils.Array.Add\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be added to.\r\n * @param {any|any[]} item - The item, or array of items, to add to the array. Each item must be unique within the array.\r\n * @param {integer} [limit] - Optional limit which caps the size of the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Add = function (array, item, limit, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n if (limit > 0)\r\n {\r\n var remaining = limit - array.length;\r\n\r\n // There's nothing more we can do here, the array is full\r\n if (remaining <= 0)\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n if (array.indexOf(item) === -1)\r\n {\r\n array.push(item);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to insert\r\n\r\n // Ensure all the items are unique\r\n var itemLength = item.length - 1;\r\n\r\n while (itemLength >= 0)\r\n {\r\n if (array.indexOf(item[itemLength]) !== -1)\r\n {\r\n // Already exists in array, so remove it\r\n item.splice(itemLength, 1);\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n // Anything left?\r\n itemLength = item.length;\r\n\r\n if (itemLength === 0)\r\n {\r\n return null;\r\n }\r\n\r\n if (limit > 0 && itemLength > remaining)\r\n {\r\n item.splice(remaining);\r\n\r\n itemLength = remaining;\r\n }\r\n\r\n for (var i = 0; i < itemLength; i++)\r\n {\r\n var entry = item[i];\r\n\r\n array.push(entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = Add;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds the given item, or array of items, to the array starting at the index specified.\r\n * \r\n * Each item must be unique within the array.\r\n * \r\n * Existing elements in the array are shifted up.\r\n * \r\n * The array is modified in-place and returned.\r\n * \r\n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\r\n * added will take the array length over this limit, it will stop adding once the limit is reached.\r\n * \r\n * You can optionally specify a callback to be invoked for each item successfully added to the array.\r\n *\r\n * @function Phaser.Utils.Array.AddAt\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be added to.\r\n * @param {any|any[]} item - The item, or array of items, to add to the array.\r\n * @param {integer} [index=0] - The index in the array where the item will be inserted.\r\n * @param {integer} [limit] - Optional limit which caps the size of the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar AddAt = function (array, item, index, limit, callback, context)\r\n{\r\n if (index === undefined) { index = 0; }\r\n if (context === undefined) { context = array; }\r\n\r\n if (limit > 0)\r\n {\r\n var remaining = limit - array.length;\r\n\r\n // There's nothing more we can do here, the array is full\r\n if (remaining <= 0)\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n if (array.indexOf(item) === -1)\r\n {\r\n array.splice(index, 0, item);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to insert\r\n\r\n // Ensure all the items are unique\r\n var itemLength = item.length - 1;\r\n\r\n while (itemLength >= 0)\r\n {\r\n if (array.indexOf(item[itemLength]) !== -1)\r\n {\r\n // Already exists in array, so remove it\r\n item.pop();\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n // Anything left?\r\n itemLength = item.length;\r\n\r\n if (itemLength === 0)\r\n {\r\n return null;\r\n }\r\n\r\n // Truncate to the limit\r\n if (limit > 0 && itemLength > remaining)\r\n {\r\n item.splice(remaining);\r\n\r\n itemLength = remaining;\r\n }\r\n\r\n for (var i = itemLength - 1; i >= 0; i--)\r\n {\r\n var entry = item[i];\r\n\r\n array.splice(index, 0, entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = AddAt;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given element to the top of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.BringToTop\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar BringToTop = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex < array.length)\r\n {\r\n array.splice(currentIndex, 1);\r\n array.push(item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = BringToTop;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Returns the total number of elements in the array which have a property matching the given value.\r\n *\r\n * @function Phaser.Utils.Array.CountAllMatching\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} property - The property to test on each array element.\r\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {integer} [startIndex] - An optional start index to search from.\r\n * @param {integer} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {integer} The total number of elements with properties matching the given value.\r\n */\r\nvar CountAllMatching = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n var total = 0;\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (child[property] === value)\r\n {\r\n total++;\r\n }\r\n }\r\n }\r\n\r\n return total;\r\n};\r\n\r\nmodule.exports = CountAllMatching;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Passes each element in the array to the given callback.\r\n *\r\n * @function Phaser.Utils.Array.Each\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {function} callback - A callback to be invoked for each item in the array.\r\n * @param {object} context - The context in which the callback is invoked.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the current array item.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Each = function (array, callback, context)\r\n{\r\n var i;\r\n var args = [ null ];\r\n\r\n for (i = 3; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < array.length; i++)\r\n {\r\n args[0] = array[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Each;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Passes each element in the array, between the start and end indexes, to the given callback.\r\n *\r\n * @function Phaser.Utils.Array.EachInRange\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {function} callback - A callback to be invoked for each item in the array.\r\n * @param {object} context - The context in which the callback is invoked.\r\n * @param {integer} startIndex - The start index to search from.\r\n * @param {integer} endIndex - The end index to search to.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar EachInRange = function (array, callback, context, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n var i;\r\n var args = [ null ];\r\n\r\n for (i = 5; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = startIndex; i < endIndex; i++)\r\n {\r\n args[0] = array[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = EachInRange;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Searches a pre-sorted array for the closet value to the given number.\r\n *\r\n * If the `key` argument is given it will assume the array contains objects that all have the required `key` property name,\r\n * and will check for the closest value of those to the given number.\r\n *\r\n * @function Phaser.Utils.Array.FindClosestInSorted\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to search for in the array.\r\n * @param {array} array - The array to search, which must be sorted.\r\n * @param {string} [key] - An optional property key. If specified the array elements property will be checked against value.\r\n *\r\n * @return {(number|any)} The nearest value found in the array, or if a `key` was given, the nearest object with the matching property value.\r\n */\r\nvar FindClosestInSorted = function (value, array, key)\r\n{\r\n if (!array.length)\r\n {\r\n return NaN;\r\n }\r\n else if (array.length === 1)\r\n {\r\n return array[0];\r\n }\r\n\r\n var i = 1;\r\n var low;\r\n var high;\r\n\r\n if (key)\r\n {\r\n if (value < array[0][key])\r\n {\r\n return array[0];\r\n }\r\n\r\n while (array[i][key] < value)\r\n {\r\n i++;\r\n }\r\n }\r\n else\r\n {\r\n while (array[i] < value)\r\n {\r\n i++;\r\n }\r\n }\r\n\r\n if (i > array.length)\r\n {\r\n i = array.length;\r\n }\r\n\r\n if (key)\r\n {\r\n low = array[i - 1][key];\r\n high = array[i][key];\r\n\r\n return ((high - value) <= (value - low)) ? array[i] : array[i - 1];\r\n }\r\n else\r\n {\r\n low = array[i - 1];\r\n high = array[i];\r\n\r\n return ((high - value) <= (value - low)) ? high : low;\r\n }\r\n};\r\n\r\nmodule.exports = FindClosestInSorted;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Returns all elements in the array.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('visible', true)` would return only elements that have their visible property set.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.GetAll\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} [property] - The property to test on each array element.\r\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {integer} [startIndex] - An optional start index to search from.\r\n * @param {integer} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {array} All matching elements from the array.\r\n */\r\nvar GetAll = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n var output = [];\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (!property ||\r\n (property && value === undefined && child.hasOwnProperty(property)) ||\r\n (property && value !== undefined && child[property] === value))\r\n {\r\n output.push(child);\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = GetAll;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Returns the first element in the array.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('visible', true)` would return the first element that had its `visible` property set.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would search only the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.GetFirst\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} [property] - The property to test on each array element.\r\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {integer} [startIndex=0] - An optional start index to search from.\r\n * @param {integer} [endIndex=array.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {object} The first matching element from the array, or `null` if no element could be found in the range given.\r\n */\r\nvar GetFirst = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (!property ||\r\n (property && value === undefined && child.hasOwnProperty(property)) ||\r\n (property && value !== undefined && child[property] === value))\r\n {\r\n return child;\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n};\r\n\r\nmodule.exports = GetFirst;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns a Random element from the array.\r\n *\r\n * @function Phaser.Utils.Array.GetRandom\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to select the random entry from.\r\n * @param {integer} [startIndex=0] - An optional start index.\r\n * @param {integer} [length=array.length] - An optional length, the total number of elements (from the startIndex) to choose from.\r\n *\r\n * @return {*} A random element from the array, or `null` if no element could be found in the range given.\r\n */\r\nvar GetRandom = function (array, startIndex, length)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (length === undefined) { length = array.length; }\r\n\r\n var randomIndex = startIndex + Math.floor(Math.random() * length);\r\n\r\n return (array[randomIndex] === undefined) ? null : array[randomIndex];\r\n};\r\n\r\nmodule.exports = GetRandom;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element down one place in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveDown\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item - The element to move down the array.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveDown = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex > 0)\r\n {\r\n var item2 = array[currentIndex - 1];\r\n\r\n var index2 = array.indexOf(item2);\r\n\r\n array[currentIndex] = item2;\r\n array[index2] = item;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveDown;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves an element in an array to a new position within the same array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveTo\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n * @param {integer} index - The new index that the element will be moved to.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar MoveTo = function (array, item, index)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex === -1 || index < 0 || index >= array.length)\r\n {\r\n throw new Error('Supplied index out of bounds');\r\n }\r\n\r\n if (currentIndex !== index)\r\n {\r\n // Remove\r\n array.splice(currentIndex, 1);\r\n\r\n // Add in new location\r\n array.splice(index, 0, item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = MoveTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element up one place in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveUp\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item - The element to move up the array.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveUp = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex < array.length - 1)\r\n {\r\n // The element one above `item` in the array\r\n var item2 = array[currentIndex + 1];\r\n var index2 = array.indexOf(item2);\r\n\r\n array[currentIndex] = item2;\r\n array[index2] = item;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveUp;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Create an array representing the range of numbers (usually integers), between, and inclusive of,\r\n * the given `start` and `end` arguments. For example:\r\n *\r\n * `var array = numberArray(2, 4); // array = [2, 3, 4]`\r\n * `var array = numberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]`\r\n *\r\n * This is equivalent to `numberArrayStep(start, end, 1)`.\r\n *\r\n * You can optionally provide a prefix and / or suffix string. If given the array will contain\r\n * strings, not integers. For example:\r\n *\r\n * `var array = numberArray(1, 4, 'Level '); // array = [\"Level 1\", \"Level 2\", \"Level 3\", \"Level 4\"]`\r\n * `var array = numberArray(5, 7, 'HD-', '.png'); // array = [\"HD-5.png\", \"HD-6.png\", \"HD-7.png\"]`\r\n *\r\n * @function Phaser.Utils.Array.NumberArray\r\n * @since 3.0.0\r\n *\r\n * @param {number} start - The minimum value the array starts with.\r\n * @param {number} end - The maximum value the array contains.\r\n * @param {string} [prefix] - Optional prefix to place before the number. If provided the array will contain strings, not integers.\r\n * @param {string} [suffix] - Optional suffix to place after the number. If provided the array will contain strings, not integers.\r\n *\r\n * @return {(number[]|string[])} The array of number values, or strings if a prefix or suffix was provided.\r\n */\r\nvar NumberArray = function (start, end, prefix, suffix)\r\n{\r\n var result = [];\r\n\r\n for (var i = start; i <= end; i++)\r\n {\r\n if (prefix || suffix)\r\n {\r\n var key = (prefix) ? prefix + i.toString() : i.toString();\r\n\r\n if (suffix)\r\n {\r\n key = key.concat(suffix);\r\n }\r\n\r\n result.push(key);\r\n }\r\n else\r\n {\r\n result.push(i);\r\n }\r\n }\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = NumberArray;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RoundAwayFromZero = require('../../math/RoundAwayFromZero');\r\n\r\n/**\r\n * Create an array of numbers (positive and/or negative) progressing from `start`\r\n * up to but not including `end` by advancing by `step`.\r\n *\r\n * If `start` is less than `end` a zero-length range is created unless a negative `step` is specified.\r\n *\r\n * Certain values for `start` and `end` (eg. NaN/undefined/null) are currently coerced to 0;\r\n * for forward compatibility make sure to pass in actual numbers.\r\n * \r\n * @example\r\n * NumberArrayStep(4);\r\n * // => [0, 1, 2, 3]\r\n *\r\n * NumberArrayStep(1, 5);\r\n * // => [1, 2, 3, 4]\r\n *\r\n * NumberArrayStep(0, 20, 5);\r\n * // => [0, 5, 10, 15]\r\n *\r\n * NumberArrayStep(0, -4, -1);\r\n * // => [0, -1, -2, -3]\r\n *\r\n * NumberArrayStep(1, 4, 0);\r\n * // => [1, 1, 1]\r\n *\r\n * NumberArrayStep(0);\r\n * // => []\r\n *\r\n * @function Phaser.Utils.Array.NumberArrayStep\r\n * @since 3.0.0\r\n *\r\n * @param {number} [start=0] - The start of the range.\r\n * @param {number} [end=null] - The end of the range.\r\n * @param {number} [step=1] - The value to increment or decrement by.\r\n *\r\n * @return {number[]} The array of number values.\r\n */\r\nvar NumberArrayStep = function (start, end, step)\r\n{\r\n if (start === undefined) { start = 0; }\r\n if (end === undefined) { end = null; }\r\n if (step === undefined) { step = 1; }\r\n\r\n if (end === null)\r\n {\r\n end = start;\r\n start = 0;\r\n }\r\n\r\n var result = [];\r\n\r\n var total = Math.max(RoundAwayFromZero((end - start) / (step || 1)), 0);\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n result.push(start);\r\n start += step;\r\n }\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = NumberArrayStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction swap (arr, i, j)\r\n{\r\n var tmp = arr[i];\r\n arr[i] = arr[j];\r\n arr[j] = tmp;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction defaultCompare (a, b)\r\n{\r\n return a < b ? -1 : a > b ? 1 : 0;\r\n}\r\n\r\n/**\r\n * A [Floyd-Rivest](https://en.wikipedia.org/wiki/Floyd%E2%80%93Rivest_algorithm) quick selection algorithm.\r\n *\r\n * Rearranges the array items so that all items in the [left, k] range are smaller than all items in [k, right];\r\n * The k-th element will have the (k - left + 1)th smallest value in [left, right].\r\n *\r\n * The array is modified in-place.\r\n *\r\n * Based on code by [Vladimir Agafonkin](https://www.npmjs.com/~mourner)\r\n *\r\n * @function Phaser.Utils.Array.QuickSelect\r\n * @since 3.0.0\r\n *\r\n * @param {array} arr - The array to sort.\r\n * @param {integer} k - The k-th element index.\r\n * @param {integer} [left=0] - The index of the left part of the range.\r\n * @param {integer} [right] - The index of the right part of the range.\r\n * @param {function} [compare] - An optional comparison function. Is passed two elements and should return 0, 1 or -1.\r\n */\r\nvar QuickSelect = function (arr, k, left, right, compare)\r\n{\r\n if (left === undefined) { left = 0; }\r\n if (right === undefined) { right = arr.length - 1; }\r\n if (compare === undefined) { compare = defaultCompare; }\r\n\r\n while (right > left)\r\n {\r\n if (right - left > 600)\r\n {\r\n var n = right - left + 1;\r\n var m = k - left + 1;\r\n var z = Math.log(n);\r\n var s = 0.5 * Math.exp(2 * z / 3);\r\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\r\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\r\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\r\n\r\n QuickSelect(arr, k, newLeft, newRight, compare);\r\n }\r\n\r\n var t = arr[k];\r\n var i = left;\r\n var j = right;\r\n\r\n swap(arr, left, k);\r\n\r\n if (compare(arr[right], t) > 0)\r\n {\r\n swap(arr, left, right);\r\n }\r\n\r\n while (i < j)\r\n {\r\n swap(arr, i, j);\r\n\r\n i++;\r\n j--;\r\n\r\n while (compare(arr[i], t) < 0)\r\n {\r\n i++;\r\n }\r\n\r\n while (compare(arr[j], t) > 0)\r\n {\r\n j--;\r\n }\r\n }\r\n\r\n if (compare(arr[left], t) === 0)\r\n {\r\n swap(arr, left, j);\r\n }\r\n else\r\n {\r\n j++;\r\n swap(arr, j, right);\r\n }\r\n\r\n if (j <= k)\r\n {\r\n left = j + 1;\r\n }\r\n\r\n if (k <= j)\r\n {\r\n right = j - 1;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = QuickSelect;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetValue = require('../object/GetValue');\r\nvar Shuffle = require('./Shuffle');\r\n\r\nvar BuildChunk = function (a, b, qty)\r\n{\r\n var out = [];\r\n\r\n for (var aIndex = 0; aIndex < a.length; aIndex++)\r\n {\r\n for (var bIndex = 0; bIndex < b.length; bIndex++)\r\n {\r\n for (var i = 0; i < qty; i++)\r\n {\r\n out.push({ a: a[aIndex], b: b[bIndex] });\r\n }\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\n/**\r\n * Creates an array populated with a range of values, based on the given arguments and configuration object.\r\n *\r\n * Range ([a,b,c], [1,2,3]) =\r\n * a1, a2, a3, b1, b2, b3, c1, c2, c3\r\n * \r\n * Range ([a,b], [1,2,3], qty = 3) =\r\n * a1, a1, a1, a2, a2, a2, a3, a3, a3, b1, b1, b1, b2, b2, b2, b3, b3, b3\r\n * \r\n * Range ([a,b,c], [1,2,3], repeat x1) =\r\n * a1, a2, a3, b1, b2, b3, c1, c2, c3, a1, a2, a3, b1, b2, b3, c1, c2, c3\r\n * \r\n * Range ([a,b], [1,2], repeat -1 = endless, max = 14) =\r\n * Maybe if max is set then repeat goes to -1 automatically?\r\n * a1, a2, b1, b2, a1, a2, b1, b2, a1, a2, b1, b2, a1, a2 (capped at 14 elements)\r\n * \r\n * Range ([a], [1,2,3,4,5], random = true) =\r\n * a4, a1, a5, a2, a3\r\n * \r\n * Range ([a, b], [1,2,3], random = true) =\r\n * b3, a2, a1, b1, a3, b2\r\n * \r\n * Range ([a, b, c], [1,2,3], randomB = true) =\r\n * a3, a1, a2, b2, b3, b1, c1, c3, c2\r\n * \r\n * Range ([a], [1,2,3,4,5], yoyo = true) =\r\n * a1, a2, a3, a4, a5, a5, a4, a3, a2, a1\r\n * \r\n * Range ([a, b], [1,2,3], yoyo = true) =\r\n * a1, a2, a3, b1, b2, b3, b3, b2, b1, a3, a2, a1\r\n *\r\n * @function Phaser.Utils.Array.Range\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The first array of range elements.\r\n * @param {array} b - The second array of range elements.\r\n * @param {object} [options] - A range configuration object. Can contain: repeat, random, randomB, yoyo, max, qty.\r\n *\r\n * @return {array} An array of arranged elements.\r\n */\r\nvar Range = function (a, b, options)\r\n{\r\n var max = GetValue(options, 'max', 0);\r\n var qty = GetValue(options, 'qty', 1);\r\n var random = GetValue(options, 'random', false);\r\n var randomB = GetValue(options, 'randomB', false);\r\n var repeat = GetValue(options, 'repeat', 0);\r\n var yoyo = GetValue(options, 'yoyo', false);\r\n\r\n var out = [];\r\n\r\n if (randomB)\r\n {\r\n Shuffle(b);\r\n }\r\n\r\n // Endless repeat, so limit by max\r\n if (repeat === -1)\r\n {\r\n if (max === 0)\r\n {\r\n repeat = 0;\r\n }\r\n else\r\n {\r\n // Work out how many repeats we need\r\n var total = (a.length * b.length) * qty;\r\n\r\n if (yoyo)\r\n {\r\n total *= 2;\r\n }\r\n\r\n repeat = Math.ceil(max / total);\r\n }\r\n }\r\n\r\n for (var i = 0; i <= repeat; i++)\r\n {\r\n var chunk = BuildChunk(a, b, qty);\r\n\r\n if (random)\r\n {\r\n Shuffle(chunk);\r\n }\r\n\r\n out = out.concat(chunk);\r\n\r\n if (yoyo)\r\n {\r\n chunk.reverse();\r\n\r\n out = out.concat(chunk);\r\n }\r\n }\r\n\r\n if (max)\r\n {\r\n out.splice(max);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Range;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = require('./SpliceOne');\r\n\r\n/**\r\n * Removes the given item, or array of items, from the array.\r\n * \r\n * The array is modified in-place.\r\n * \r\n * You can optionally specify a callback to be invoked for each item successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.Remove\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {*|Array.<*>} item - The item, or array of items, to be removed from the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {*|Array.<*>} The item, or array of items, that were successfully removed from the array.\r\n */\r\nvar Remove = function (array, item, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n var index;\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n index = array.indexOf(item);\r\n\r\n if (index !== -1)\r\n {\r\n SpliceOne(array, index);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to remove\r\n\r\n var itemLength = item.length - 1;\r\n\r\n while (itemLength >= 0)\r\n {\r\n var entry = item[itemLength];\r\n\r\n index = array.indexOf(entry);\r\n\r\n if (index !== -1)\r\n {\r\n SpliceOne(array, index);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n else\r\n {\r\n // Item wasn't found in the array, so remove it from our return results\r\n item.pop();\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = Remove;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = require('./SpliceOne');\r\n\r\n/**\r\n * Removes the item from the given position in the array.\r\n * \r\n * The array is modified in-place.\r\n * \r\n * You can optionally specify a callback to be invoked for the item if it is successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.RemoveAt\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {integer} index - The array index to remove the item from. The index must be in bounds or it will throw an error.\r\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {*} The item that was removed.\r\n */\r\nvar RemoveAt = function (array, index, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n if (index < 0 || index > array.length - 1)\r\n {\r\n throw new Error('Index out of bounds');\r\n }\r\n\r\n var item = SpliceOne(array, index);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = RemoveAt;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Removes the item within the given range in the array.\r\n * \r\n * The array is modified in-place.\r\n * \r\n * You can optionally specify a callback to be invoked for the item/s successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.RemoveBetween\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {integer} startIndex - The start index to remove from.\r\n * @param {integer} endIndex - The end index to remove to.\r\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {Array.<*>} An array of items that were removed.\r\n */\r\nvar RemoveBetween = function (array, startIndex, endIndex, callback, context)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n if (context === undefined) { context = array; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n var size = endIndex - startIndex;\r\n\r\n var removed = array.splice(startIndex, size);\r\n\r\n if (callback)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n var entry = removed[i];\r\n\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return removed;\r\n }\r\n else\r\n {\r\n return [];\r\n }\r\n};\r\n\r\nmodule.exports = RemoveBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = require('./SpliceOne');\r\n\r\n/**\r\n * Removes a random object from the given array and returns it.\r\n * Will return null if there are no array items that fall within the specified range or if there is no item for the randomly chosen index.\r\n *\r\n * @function Phaser.Utils.Array.RemoveRandomElement\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to removed a random element from.\r\n * @param {integer} [start=0] - The array index to start the search from.\r\n * @param {integer} [length=array.length] - Optional restriction on the number of elements to randomly select from.\r\n *\r\n * @return {object} The random element that was removed, or `null` if there were no array elements that fell within the given range.\r\n */\r\nvar RemoveRandomElement = function (array, start, length)\r\n{\r\n if (start === undefined) { start = 0; }\r\n if (length === undefined) { length = array.length; }\r\n\r\n var randomIndex = start + Math.floor(Math.random() * length);\r\n\r\n return SpliceOne(array, randomIndex);\r\n};\r\n\r\nmodule.exports = RemoveRandomElement;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Replaces an element of the array with the new element.\r\n * The new element cannot already be a member of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.Replace\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search within.\r\n * @param {*} oldChild - The element in the array that will be replaced.\r\n * @param {*} newChild - The element to be inserted into the array at the position of `oldChild`.\r\n *\r\n * @return {boolean} Returns true if the oldChild was successfully replaced, otherwise returns false.\r\n */\r\nvar Replace = function (array, oldChild, newChild)\r\n{\r\n var index1 = array.indexOf(oldChild);\r\n var index2 = array.indexOf(newChild);\r\n\r\n if (index1 !== -1 && index2 === -1)\r\n {\r\n array[index1] = newChild;\r\n\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n};\r\n\r\nmodule.exports = Replace;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the element at the start of the array to the end, shifting all items in the process.\r\n * The \"rotation\" happens to the left.\r\n *\r\n * @function Phaser.Utils.Array.RotateLeft\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to shift to the left. This array is modified in place.\r\n * @param {integer} [total=1] - The number of times to shift the array.\r\n *\r\n * @return {*} The most recently shifted element.\r\n */\r\nvar RotateLeft = function (array, total)\r\n{\r\n if (total === undefined) { total = 1; }\r\n\r\n var element = null;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n element = array.shift();\r\n array.push(element);\r\n }\r\n\r\n return element;\r\n};\r\n\r\nmodule.exports = RotateLeft;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the element at the end of the array to the start, shifting all items in the process.\r\n * The \"rotation\" happens to the right.\r\n *\r\n * @function Phaser.Utils.Array.RotateRight\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to shift to the right. This array is modified in place.\r\n * @param {integer} [total=1] - The number of times to shift the array.\r\n *\r\n * @return {*} The most recently shifted element.\r\n */\r\nvar RotateRight = function (array, total)\r\n{\r\n if (total === undefined) { total = 1; }\r\n\r\n var element = null;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n element = array.pop();\r\n array.unshift(element);\r\n }\r\n\r\n return element;\r\n};\r\n\r\nmodule.exports = RotateRight;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tests if the start and end indexes are a safe range for the given array.\r\n * \r\n * @function Phaser.Utils.Array.SafeRange\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to check.\r\n * @param {integer} startIndex - The start index.\r\n * @param {integer} endIndex - The end index.\r\n * @param {boolean} [throwError=true] - Throw an error if the range is out of bounds.\r\n *\r\n * @return {boolean} True if the range is safe, otherwise false.\r\n */\r\nvar SafeRange = function (array, startIndex, endIndex, throwError)\r\n{\r\n var len = array.length;\r\n\r\n if (startIndex < 0 ||\r\n startIndex > len ||\r\n startIndex >= endIndex ||\r\n endIndex > len ||\r\n startIndex + endIndex > len)\r\n {\r\n if (throwError)\r\n {\r\n throw new Error('Range Error: Values outside acceptable range');\r\n }\r\n\r\n return false;\r\n }\r\n else\r\n {\r\n return true;\r\n }\r\n};\r\n\r\nmodule.exports = SafeRange;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given element to the bottom of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.SendToBack\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar SendToBack = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex > 0)\r\n {\r\n array.splice(currentIndex, 1);\r\n array.unshift(item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = SendToBack;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Scans the array for elements with the given property. If found, the property is set to the `value`.\r\n *\r\n * For example: `SetAll('visible', true)` would set all elements that have a `visible` property to `false`.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would update only the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.SetAll\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} property - The property to test for on each array element.\r\n * @param {*} value - The value to set the property to.\r\n * @param {integer} [startIndex] - An optional start index to search from.\r\n * @param {integer} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar SetAll = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var entry = array[i];\r\n\r\n if (entry.hasOwnProperty(property))\r\n {\r\n entry[property] = value;\r\n }\r\n }\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = SetAll;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Shuffles the contents of the given array using the Fisher-Yates implementation.\r\n *\r\n * The original array is modified directly and returned.\r\n *\r\n * @function Phaser.Utils.Array.Shuffle\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array,$return]\r\n *\r\n * @param {T[]} array - The array to shuffle. This array is modified in place.\r\n *\r\n * @return {T[]} The shuffled array.\r\n */\r\nvar Shuffle = function (array)\r\n{\r\n for (var i = array.length - 1; i > 0; i--)\r\n {\r\n var j = Math.floor(Math.random() * (i + 1));\r\n var temp = array[i];\r\n array[i] = array[j];\r\n array[j] = temp;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Shuffle;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Removes a single item from an array and returns it without creating gc, like the native splice does.\r\n * Based on code by Mike Reinstein.\r\n *\r\n * @function Phaser.Utils.Array.SpliceOne\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to splice from.\r\n * @param {integer} index - The index of the item which should be spliced.\r\n *\r\n * @return {*} The item which was spliced (removed).\r\n */\r\nvar SpliceOne = function (array, index)\r\n{\r\n if (index >= array.length)\r\n {\r\n return;\r\n }\r\n\r\n var len = array.length - 1;\r\n\r\n var item = array[index];\r\n\r\n for (var i = index; i < len; i++)\r\n {\r\n array[i] = array[i + 1];\r\n }\r\n\r\n array.length = len;\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = SpliceOne;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n//! stable.js 0.1.6, https://github.com/Two-Screen/stable\r\n//! © 2017 Angry Bytes and contributors. MIT licensed.\r\n\r\n/**\r\n * @namespace Phaser.Utils.Array.StableSortFunctions\r\n */\r\n\r\n(function() {\r\n\r\n /**\r\n * A stable array sort, because `Array#sort()` is not guaranteed stable.\r\n * This is an implementation of merge sort, without recursion.\r\n *\r\n * @function Phaser.Utils.Array.StableSort\r\n * @since 3.0.0\r\n *\r\n * @param {array} arr - The input array to be sorted.\r\n * @param {function} comp - The comparison handler.\r\n *\r\n * @return {array} The sorted result.\r\n */\r\nvar stable = function(arr, comp) {\r\n return exec(arr.slice(), comp);\r\n};\r\n\r\n /**\r\n * Sort the input array and simply copy it back if the result isn't in the original array, which happens on an odd number of passes.\r\n *\r\n * @function Phaser.Utils.Array.StableSortFunctions.inplace\r\n * @memberof Phaser.Utils.Array.StableSortFunctions\r\n * @since 3.0.0\r\n *\r\n * @param {array} arr - The input array.\r\n * @param {function} comp - The comparison handler.\r\n *\r\n * @return {array} The sorted array.\r\n */\r\nstable.inplace = function(arr, comp) {\r\n var result = exec(arr, comp);\r\n\r\n // This simply copies back if the result isn't in the original array,\r\n // which happens on an odd number of passes.\r\n if (result !== arr) {\r\n pass(result, null, arr.length, arr);\r\n }\r\n\r\n return arr;\r\n};\r\n\r\n// Execute the sort using the input array and a second buffer as work space.\r\n// Returns one of those two, containing the final result.\r\nfunction exec(arr, comp) {\r\n if (typeof(comp) !== 'function') {\r\n comp = function(a, b) {\r\n return String(a).localeCompare(b);\r\n };\r\n }\r\n\r\n // Short-circuit when there's nothing to sort.\r\n var len = arr.length;\r\n if (len <= 1) {\r\n return arr;\r\n }\r\n\r\n // Rather than dividing input, simply iterate chunks of 1, 2, 4, 8, etc.\r\n // Chunks are the size of the left or right hand in merge sort.\r\n // Stop when the left-hand covers all of the array.\r\n var buffer = new Array(len);\r\n for (var chk = 1; chk < len; chk *= 2) {\r\n pass(arr, comp, chk, buffer);\r\n\r\n var tmp = arr;\r\n arr = buffer;\r\n buffer = tmp;\r\n }\r\n\r\n return arr;\r\n}\r\n\r\n// Run a single pass with the given chunk size.\r\nvar pass = function(arr, comp, chk, result) {\r\n var len = arr.length;\r\n var i = 0;\r\n // Step size / double chunk size.\r\n var dbl = chk * 2;\r\n // Bounds of the left and right chunks.\r\n var l, r, e;\r\n // Iterators over the left and right chunk.\r\n var li, ri;\r\n\r\n // Iterate over pairs of chunks.\r\n for (l = 0; l < len; l += dbl) {\r\n r = l + chk;\r\n e = r + chk;\r\n if (r > len) r = len;\r\n if (e > len) e = len;\r\n\r\n // Iterate both chunks in parallel.\r\n li = l;\r\n ri = r;\r\n while (true) {\r\n // Compare the chunks.\r\n if (li < r && ri < e) {\r\n // This works for a regular `sort()` compatible comparator,\r\n // but also for a simple comparator like: `a > b`\r\n if (comp(arr[li], arr[ri]) <= 0) {\r\n result[i++] = arr[li++];\r\n }\r\n else {\r\n result[i++] = arr[ri++];\r\n }\r\n }\r\n // Nothing to compare, just flush what's left.\r\n else if (li < r) {\r\n result[i++] = arr[li++];\r\n }\r\n else if (ri < e) {\r\n result[i++] = arr[ri++];\r\n }\r\n // Both iterators are at the chunk ends.\r\n else {\r\n break;\r\n }\r\n }\r\n }\r\n};\r\n\r\n// Export using CommonJS or to the window.\r\nif (typeof(module) !== 'undefined') {\r\n module.exports = stable;\r\n}\r\nelse {\r\n window.stable = stable;\r\n}\r\n\r\n})();","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Swaps the position of two elements in the given array.\r\n * The elements must exist in the same array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.Swap\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item1 - The first element to swap.\r\n * @param {*} item2 - The second element to swap.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Swap = function (array, item1, item2)\r\n{\r\n if (item1 === item2)\r\n {\r\n return;\r\n }\r\n\r\n var index1 = array.indexOf(item1);\r\n var index2 = array.indexOf(item2);\r\n\r\n if (index1 < 0 || index2 < 0)\r\n {\r\n throw new Error('Supplied items must be elements of the same array');\r\n }\r\n\r\n array[index1] = item2;\r\n array[index2] = item1;\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Swap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.Array\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Matrix: require('./matrix'),\r\n\r\n Add: require('./Add'),\r\n AddAt: require('./AddAt'),\r\n BringToTop: require('./BringToTop'),\r\n CountAllMatching: require('./CountAllMatching'),\r\n Each: require('./Each'),\r\n EachInRange: require('./EachInRange'),\r\n FindClosestInSorted: require('./FindClosestInSorted'),\r\n GetAll: require('./GetAll'),\r\n GetFirst: require('./GetFirst'),\r\n GetRandom: require('./GetRandom'),\r\n MoveDown: require('./MoveDown'),\r\n MoveTo: require('./MoveTo'),\r\n MoveUp: require('./MoveUp'),\r\n NumberArray: require('./NumberArray'),\r\n NumberArrayStep: require('./NumberArrayStep'),\r\n QuickSelect: require('./QuickSelect'),\r\n Range: require('./Range'),\r\n Remove: require('./Remove'),\r\n RemoveAt: require('./RemoveAt'),\r\n RemoveBetween: require('./RemoveBetween'),\r\n RemoveRandomElement: require('./RemoveRandomElement'),\r\n Replace: require('./Replace'),\r\n RotateLeft: require('./RotateLeft'),\r\n RotateRight: require('./RotateRight'),\r\n SafeRange: require('./SafeRange'),\r\n SendToBack: require('./SendToBack'),\r\n SetAll: require('./SetAll'),\r\n Shuffle: require('./Shuffle'),\r\n SpliceOne: require('./SpliceOne'),\r\n StableSort: require('./StableSort'),\r\n Swap: require('./Swap')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if an array can be used as a matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows) have the same length. There must be at least two rows:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.CheckMatrix\r\n * @since 3.0.0\r\n * \r\n * @generic T\r\n * @genericUse {T[][]} - [matrix]\r\n *\r\n * @param {T[][]} [matrix] - The array to check.\r\n *\r\n * @return {boolean} `true` if the given `matrix` array is a valid matrix.\r\n */\r\nvar CheckMatrix = function (matrix)\r\n{\r\n if (!Array.isArray(matrix) || matrix.length < 2 || !Array.isArray(matrix[0]))\r\n {\r\n return false;\r\n }\r\n\r\n // How long is the first row?\r\n var size = matrix[0].length;\r\n\r\n // Validate the rest of the rows are the same length\r\n for (var i = 1; i < matrix.length; i++)\r\n {\r\n if (matrix[i].length !== size)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n};\r\n\r\nmodule.exports = CheckMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Pad = require('../../string/Pad');\r\nvar CheckMatrix = require('./CheckMatrix');\r\n\r\n/**\r\n * Generates a string (which you can pass to console.log) from the given Array Matrix.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.MatrixToString\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix]\r\n *\r\n * @param {T[][]} [matrix] - A 2-dimensional array.\r\n *\r\n * @return {string} A string representing the matrix.\r\n */\r\nvar MatrixToString = function (matrix)\r\n{\r\n var str = '';\r\n\r\n if (!CheckMatrix(matrix))\r\n {\r\n return str;\r\n }\r\n\r\n for (var r = 0; r < matrix.length; r++)\r\n {\r\n for (var c = 0; c < matrix[r].length; c++)\r\n {\r\n var cell = matrix[r][c].toString();\r\n\r\n if (cell !== 'undefined')\r\n {\r\n str += Pad(cell, 2);\r\n }\r\n else\r\n {\r\n str += '?';\r\n }\r\n\r\n if (c < matrix[r].length - 1)\r\n {\r\n str += ' |';\r\n }\r\n }\r\n\r\n if (r < matrix.length - 1)\r\n {\r\n str += '\\n';\r\n\r\n for (var i = 0; i < matrix[r].length; i++)\r\n {\r\n str += '---';\r\n\r\n if (i < matrix[r].length - 1)\r\n {\r\n str += '+';\r\n }\r\n }\r\n\r\n str += '\\n';\r\n }\r\n\r\n }\r\n\r\n return str;\r\n};\r\n\r\nmodule.exports = MatrixToString;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Reverses the columns in the given Array Matrix.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.ReverseColumns\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to reverse the columns for.\r\n *\r\n * @return {T[][]} The column reversed matrix.\r\n */\r\nvar ReverseColumns = function (matrix)\r\n{\r\n return matrix.reverse();\r\n};\r\n\r\nmodule.exports = ReverseColumns;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Reverses the rows in the given Array Matrix.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.ReverseRows\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to reverse the rows for.\r\n *\r\n * @return {T[][]} The column reversed matrix.\r\n */\r\nvar ReverseRows = function (matrix)\r\n{\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n matrix[i].reverse();\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = ReverseRows;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = require('./RotateMatrix');\r\n\r\n/**\r\n * Rotates the array matrix 180 degrees.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.Rotate180\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar Rotate180 = function (matrix)\r\n{\r\n return RotateMatrix(matrix, 180);\r\n};\r\n\r\nmodule.exports = Rotate180;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = require('./RotateMatrix');\r\n\r\n/**\r\n * Rotates the array matrix to the left (or 90 degrees)\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateLeft\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateLeft = function (matrix)\r\n{\r\n return RotateMatrix(matrix, 90);\r\n};\r\n\r\nmodule.exports = RotateLeft;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CheckMatrix = require('./CheckMatrix');\r\nvar TransposeMatrix = require('./TransposeMatrix');\r\n\r\n/**\r\n * Rotates the array matrix based on the given rotation value.\r\n *\r\n * The value can be given in degrees: 90, -90, 270, -270 or 180,\r\n * or a string command: `rotateLeft`, `rotateRight` or `rotate180`.\r\n *\r\n * Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateMatrix\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n * @param {(number|string)} [direction=90] - The amount to rotate the matrix by.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateMatrix = function (matrix, direction)\r\n{\r\n if (direction === undefined) { direction = 90; }\r\n\r\n if (!CheckMatrix(matrix))\r\n {\r\n return null;\r\n }\r\n\r\n if (typeof direction !== 'string')\r\n {\r\n direction = ((direction % 360) + 360) % 360;\r\n }\r\n\r\n if (direction === 90 || direction === -270 || direction === 'rotateLeft')\r\n {\r\n matrix = TransposeMatrix(matrix);\r\n matrix.reverse();\r\n }\r\n else if (direction === -90 || direction === 270 || direction === 'rotateRight')\r\n {\r\n matrix.reverse();\r\n matrix = TransposeMatrix(matrix);\r\n }\r\n else if (Math.abs(direction) === 180 || direction === 'rotate180')\r\n {\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n matrix[i].reverse();\r\n }\r\n\r\n matrix.reverse();\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = RotateMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = require('./RotateMatrix');\r\n\r\n/**\r\n * Rotates the array matrix to the left (or -90 degrees)\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateRight\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateRight = function (matrix)\r\n{\r\n return RotateMatrix(matrix, -90);\r\n};\r\n\r\nmodule.exports = RotateRight;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Transposes the elements of the given matrix (array of arrays).\r\n *\r\n * The transpose of a matrix is a new matrix whose rows are the columns of the original.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.TransposeMatrix\r\n * @since 3.0.0\r\n * \r\n * @generic T\r\n * @genericUse {T[][]} - [array,$return]\r\n * \r\n * @param {T[][]} [array] - The array matrix to transpose.\r\n *\r\n * @return {T[][]} A new array matrix which is a transposed version of the given array.\r\n */\r\nvar TransposeMatrix = function (array)\r\n{\r\n var sourceRowCount = array.length;\r\n var sourceColCount = array[0].length;\r\n\r\n var result = new Array(sourceColCount);\r\n\r\n for (var i = 0; i < sourceColCount; i++)\r\n {\r\n result[i] = new Array(sourceRowCount);\r\n\r\n for (var j = sourceRowCount - 1; j > -1; j--)\r\n {\r\n result[i][j] = array[j][i];\r\n }\r\n }\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = TransposeMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.Array.Matrix\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CheckMatrix: require('./CheckMatrix'),\r\n MatrixToString: require('./MatrixToString'),\r\n ReverseColumns: require('./ReverseColumns'),\r\n ReverseRows: require('./ReverseRows'),\r\n Rotate180: require('./Rotate180'),\r\n RotateLeft: require('./RotateLeft'),\r\n RotateMatrix: require('./RotateMatrix'),\r\n RotateRight: require('./RotateRight'),\r\n TransposeMatrix: require('./TransposeMatrix')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar IsPlainObject = require('./IsPlainObject');\r\n\r\n// @param {boolean} deep - Perform a deep copy?\r\n// @param {object} target - The target object to copy to.\r\n// @return {object} The extended object.\r\n\r\n/**\r\n * This is a slightly modified version of http://api.jquery.com/jQuery.extend/\r\n *\r\n * @function Phaser.Utils.Objects.Extend\r\n * @since 3.0.0\r\n *\r\n * @param {...*} [args] - The objects that will be mixed.\r\n *\r\n * @return {object} The extended object.\r\n */\r\nvar Extend = function ()\r\n{\r\n var options, name, src, copy, copyIsArray, clone,\r\n target = arguments[0] || {},\r\n i = 1,\r\n length = arguments.length,\r\n deep = false;\r\n\r\n // Handle a deep copy situation\r\n if (typeof target === 'boolean')\r\n {\r\n deep = target;\r\n target = arguments[1] || {};\r\n\r\n // skip the boolean and the target\r\n i = 2;\r\n }\r\n\r\n // extend Phaser if only one argument is passed\r\n if (length === i)\r\n {\r\n target = this;\r\n --i;\r\n }\r\n\r\n for (; i < length; i++)\r\n {\r\n // Only deal with non-null/undefined values\r\n if ((options = arguments[i]) != null)\r\n {\r\n // Extend the base object\r\n for (name in options)\r\n {\r\n src = target[name];\r\n copy = options[name];\r\n\r\n // Prevent never-ending loop\r\n if (target === copy)\r\n {\r\n continue;\r\n }\r\n\r\n // Recurse if we're merging plain objects or arrays\r\n if (deep && copy && (IsPlainObject(copy) || (copyIsArray = Array.isArray(copy))))\r\n {\r\n if (copyIsArray)\r\n {\r\n copyIsArray = false;\r\n clone = src && Array.isArray(src) ? src : [];\r\n }\r\n else\r\n {\r\n clone = src && IsPlainObject(src) ? src : {};\r\n }\r\n\r\n // Never move original objects, clone them\r\n target[name] = Extend(deep, clone, copy);\r\n\r\n // Don't bring in undefined values\r\n }\r\n else if (copy !== undefined)\r\n {\r\n target[name] = copy;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Return the modified object\r\n return target;\r\n};\r\n\r\nmodule.exports = Extend;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH = require('../../math');\r\nvar GetValue = require('./GetValue');\r\n\r\n/**\r\n * Retrieves a value from an object. Allows for more advanced selection options, including:\r\n *\r\n * Allowed types:\r\n * \r\n * Implicit\r\n * {\r\n * x: 4\r\n * }\r\n *\r\n * From function\r\n * {\r\n * x: function ()\r\n * }\r\n *\r\n * Randomly pick one element from the array\r\n * {\r\n * x: [a, b, c, d, e, f]\r\n * }\r\n *\r\n * Random integer between min and max:\r\n * {\r\n * x: { randInt: [min, max] }\r\n * }\r\n *\r\n * Random float between min and max:\r\n * {\r\n * x: { randFloat: [min, max] }\r\n * }\r\n * \r\n *\r\n * @function Phaser.Utils.Objects.GetAdvancedValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\r\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetAdvancedValue = function (source, key, defaultValue)\r\n{\r\n var value = GetValue(source, key, null);\r\n\r\n if (value === null)\r\n {\r\n return defaultValue;\r\n }\r\n else if (Array.isArray(value))\r\n {\r\n return MATH.RND.pick(value);\r\n }\r\n else if (typeof value === 'object')\r\n {\r\n if (value.hasOwnProperty('randInt'))\r\n {\r\n return MATH.RND.integerInRange(value.randInt[0], value.randInt[1]);\r\n }\r\n else if (value.hasOwnProperty('randFloat'))\r\n {\r\n return MATH.RND.realInRange(value.randFloat[0], value.randFloat[1]);\r\n }\r\n }\r\n else if (typeof value === 'function')\r\n {\r\n return value(key);\r\n }\r\n\r\n return value;\r\n};\r\n\r\nmodule.exports = GetAdvancedValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Finds the key within the top level of the {@link source} object, or returns {@link defaultValue}\r\n *\r\n * @function Phaser.Utils.Objects.GetFastValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to search\r\n * @param {string} key - The key for the property on source. Must exist at the top level of the source object (no periods)\r\n * @param {*} [defaultValue] - The default value to use if the key does not exist.\r\n *\r\n * @return {*} The value if found; otherwise, defaultValue (null if none provided)\r\n */\r\nvar GetFastValue = function (source, key, defaultValue)\r\n{\r\n var t = typeof(source);\r\n\r\n if (!source || t === 'number' || t === 'string')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key) && source[key] !== undefined)\r\n {\r\n return source[key];\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetFastValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Source object\r\n// The key as a string, or an array of keys, i.e. 'banner', or 'banner.hideBanner'\r\n// The default value to use if the key doesn't exist\r\n\r\n/**\r\n * Retrieves a value from an object.\r\n *\r\n * @function Phaser.Utils.Objects.GetValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\r\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetValue = function (source, key, defaultValue)\r\n{\r\n if (!source || typeof source === 'number')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key))\r\n {\r\n return source[key];\r\n }\r\n else if (key.indexOf('.') !== -1)\r\n {\r\n var keys = key.split('.');\r\n var parent = source;\r\n var value = defaultValue;\r\n\r\n // Use for loop here so we can break early\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n if (parent.hasOwnProperty(keys[i]))\r\n {\r\n // Yes it has a key property, let's carry on down\r\n value = parent[keys[i]];\r\n\r\n parent = parent[keys[i]];\r\n }\r\n else\r\n {\r\n // Can't go any further, so reset to default\r\n value = defaultValue;\r\n break;\r\n }\r\n }\r\n\r\n return value;\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * This is a slightly modified version of jQuery.isPlainObject.\r\n * A plain object is an object whose internal class property is [object Object].\r\n *\r\n * @function Phaser.Utils.Objects.IsPlainObject\r\n * @since 3.0.0\r\n *\r\n * @param {object} obj - The object to inspect.\r\n *\r\n * @return {boolean} `true` if the object is plain, otherwise `false`.\r\n */\r\nvar IsPlainObject = function (obj)\r\n{\r\n // Not plain objects:\r\n // - Any object or value whose internal [[Class]] property is not \"[object Object]\"\r\n // - DOM nodes\r\n // - window\r\n if (typeof(obj) !== 'object' || obj.nodeType || obj === obj.window)\r\n {\r\n return false;\r\n }\r\n\r\n // Support: Firefox <20\r\n // The try/catch suppresses exceptions thrown when attempting to access\r\n // the \"constructor\" property of certain host objects, ie. |window.location|\r\n // https://bugzilla.mozilla.org/show_bug.cgi?id=814622\r\n try\r\n {\r\n if (obj.constructor && !({}).hasOwnProperty.call(obj.constructor.prototype, 'isPrototypeOf'))\r\n {\r\n return false;\r\n }\r\n }\r\n catch (e)\r\n {\r\n return false;\r\n }\r\n\r\n // If the function hasn't returned already, we're confident that\r\n // |obj| is a plain object, created by {} or constructed with new Object\r\n return true;\r\n};\r\n\r\nmodule.exports = IsPlainObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes the given string and pads it out, to the length required, using the character\r\n * specified. For example if you need a string to be 6 characters long, you can call:\r\n *\r\n * `pad('bob', 6, '-', 2)`\r\n *\r\n * This would return: `bob---` as it has padded it out to 6 characters, using the `-` on the right.\r\n *\r\n * You can also use it to pad numbers (they are always returned as strings):\r\n * \r\n * `pad(512, 6, '0', 1)`\r\n *\r\n * Would return: `000512` with the string padded to the left.\r\n *\r\n * If you don't specify a direction it'll pad to both sides:\r\n * \r\n * `pad('c64', 7, '*')`\r\n *\r\n * Would return: `**c64**`\r\n *\r\n * @function Phaser.Utils.String.Pad\r\n * @since 3.0.0\r\n *\r\n * @param {string|number|object} str - The target string. `toString()` will be called on the string, which means you can also pass in common data types like numbers.\r\n * @param {integer} [len=0] - The number of characters to be added.\r\n * @param {string} [pad=\" \"] - The string to pad it out with (defaults to a space).\r\n * @param {integer} [dir=3] - The direction dir = 1 (left), 2 (right), 3 (both).\r\n * \r\n * @return {string} The padded string.\r\n */\r\nvar Pad = function (str, len, pad, dir)\r\n{\r\n if (len === undefined) { len = 0; }\r\n if (pad === undefined) { pad = ' '; }\r\n if (dir === undefined) { dir = 3; }\r\n\r\n str = str.toString();\r\n\r\n var padlen = 0;\r\n\r\n if (len + 1 >= str.length)\r\n {\r\n switch (dir)\r\n {\r\n case 1:\r\n str = new Array(len + 1 - str.length).join(pad) + str;\r\n break;\r\n\r\n case 3:\r\n var right = Math.ceil((padlen = len - str.length) / 2);\r\n var left = padlen - right;\r\n str = new Array(left + 1).join(pad) + str + new Array(right + 1).join(pad);\r\n break;\r\n\r\n default:\r\n str = str + new Array(len + 1 - str.length).join(pad);\r\n break;\r\n }\r\n }\r\n\r\n return str;\r\n};\r\n\r\nmodule.exports = Pad;\r\n","/**\n * @author Richard Davey \n * @copyright 2018 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar Class = require('../../../src/utils/Class');\nvar GetFastValue = require('../../../src/utils/object/GetFastValue');\nvar ImageFile = require('../../../src/loader/filetypes/ImageFile.js');\nvar IsPlainObject = require('../../../src/utils/object/IsPlainObject');\nvar JSONFile = require('../../../src/loader/filetypes/JSONFile.js');\nvar MultiFile = require('../../../src/loader/MultiFile.js');\nvar TextFile = require('../../../src/loader/filetypes/TextFile.js');\n\n/**\n * @typedef {object} Phaser.Loader.FileTypes.SpineFileConfig\n *\n * @property {string} key - The key of the file. Must be unique within both the Loader and the Texture Manager.\n * @property {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\n * @property {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\n * @property {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\n * @property {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\n * @property {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\n */\n\n/**\n * @classdesc\n * A Spine File suitable for loading by the Loader.\n *\n * These are created when you use the Phaser.Loader.LoaderPlugin#spine method and are not typically created directly.\n *\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#spine.\n *\n * @class SpineFile\n * @extends Phaser.Loader.MultiFile\n * @memberof Phaser.Loader.FileTypes\n * @constructor\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\n * @param {(string|Phaser.Loader.FileTypes.SpineFileConfig)} key - The key to use for this file, or a file configuration object.\n * @param {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\n * @param {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\n * @param {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\n * @param {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\n */\nvar SpineFile = new Class({\n\n Extends: MultiFile,\n\n initialize:\n\n function SpineFile (loader, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings)\n {\n var i;\n var json;\n var atlas;\n var files = [];\n var cache = loader.cacheManager.custom.spine;\n\n // atlas can be an array of atlas files, not just a single one\n\n if (IsPlainObject(key))\n {\n var config = key;\n\n key = GetFastValue(config, 'key');\n\n json = new JSONFile(loader, {\n key: key,\n url: GetFastValue(config, 'jsonURL'),\n extension: GetFastValue(config, 'jsonExtension', 'json'),\n xhrSettings: GetFastValue(config, 'jsonXhrSettings')\n });\n\n atlasURL = GetFastValue(config, 'atlasURL');\n preMultipliedAlpha = GetFastValue(config, 'preMultipliedAlpha');\n\n if (!Array.isArray(atlasURL))\n {\n atlasURL = [ atlasURL ];\n }\n\n for (i = 0; i < atlasURL.length; i++)\n {\n atlas = new TextFile(loader, {\n key: key + '_' + i,\n url: atlasURL[i],\n extension: GetFastValue(config, 'atlasExtension', 'atlas'),\n xhrSettings: GetFastValue(config, 'atlasXhrSettings')\n });\n\n atlas.cache = cache;\n\n files.push(atlas);\n }\n }\n else\n {\n json = new JSONFile(loader, key, jsonURL, jsonXhrSettings);\n\n if (!Array.isArray(atlasURL))\n {\n atlasURL = [ atlasURL ];\n }\n\n for (i = 0; i < atlasURL.length; i++)\n {\n atlas = new TextFile(loader, key + '_' + i, atlasURL[i], atlasXhrSettings);\n atlas.cache = cache;\n\n files.push(atlas);\n }\n }\n\n files.unshift(json);\n\n MultiFile.call(this, loader, 'spine', key, files);\n\n this.config.preMultipliedAlpha = preMultipliedAlpha;\n },\n\n /**\n * Called by each File when it finishes loading.\n *\n * @method Phaser.Loader.FileTypes.SpineFile#onFileComplete\n * @since 3.19.0\n *\n * @param {Phaser.Loader.File} file - The File that has completed processing.\n */\n onFileComplete: function (file)\n {\n var index = this.files.indexOf(file);\n\n if (index !== -1)\n {\n this.pending--;\n\n if (file.type === 'text')\n {\n // Inspect the data for the files to now load\n var content = file.data.split('\\n');\n\n // Extract the textures\n var textures = [];\n\n for (var t = 0; t < content.length; t++)\n {\n var line = content[t];\n\n if (line.trim() === '' && t < content.length - 1)\n {\n line = content[t + 1];\n\n textures.push(line);\n }\n }\n\n var config = this.config;\n var loader = this.loader;\n\n var currentBaseURL = loader.baseURL;\n var currentPath = loader.path;\n var currentPrefix = loader.prefix;\n\n var baseURL = GetFastValue(config, 'baseURL', this.baseURL);\n var path = GetFastValue(config, 'path', file.src.match(/^.*\\//))[0];\n var prefix = GetFastValue(config, 'prefix', this.prefix);\n var textureXhrSettings = GetFastValue(config, 'textureXhrSettings');\n\n loader.setBaseURL(baseURL);\n loader.setPath(path);\n loader.setPrefix(prefix);\n\n for (var i = 0; i < textures.length; i++)\n {\n var textureURL = textures[i];\n\n var key = this.prefix + textureURL;\n\n var image = new ImageFile(loader, key, textureURL, textureXhrSettings);\n\n this.addToMultiFile(image);\n\n loader.addFile(image);\n }\n\n // Reset the loader settings\n loader.setBaseURL(currentBaseURL);\n loader.setPath(currentPath);\n loader.setPrefix(currentPrefix);\n }\n }\n },\n\n /**\n * Adds this file to its target cache upon successful loading and processing.\n *\n * @method Phaser.Loader.FileTypes.SpineFile#addToCache\n * @since 3.19.0\n */\n addToCache: function ()\n {\n if (this.isReadyToProcess())\n {\n var fileJSON = this.files[0];\n\n fileJSON.addToCache();\n\n var atlasCache;\n var atlasKey = '';\n var combinedAtlasData = '';\n var preMultipliedAlpha = (this.config.preMultipliedAlpha) ? true : false;\n\n for (var i = 1; i < this.files.length; i++)\n {\n var file = this.files[i];\n\n if (file.type === 'text')\n {\n atlasKey = file.key.replace(/_[\\d]$/, '');\n\n atlasCache = file.cache;\n\n combinedAtlasData = combinedAtlasData.concat(file.data);\n }\n else\n {\n var src = file.key.trim();\n var pos = src.indexOf('_');\n var key = src.substr(pos + 1);\n\n this.loader.textureManager.addImage(key, file.data);\n }\n\n file.pendingDestroy();\n }\n\n atlasCache.add(atlasKey, { preMultipliedAlpha: preMultipliedAlpha, data: combinedAtlasData, prefix: this.prefix });\n\n this.complete = true;\n }\n }\n\n});\n\nmodule.exports = SpineFile;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar BuildGameObject = require('../../../src/gameobjects/BuildGameObject');\nvar Class = require('../../../src/utils/Class');\nvar GetValue = require('../../../src/utils/object/GetValue');\nvar ResizeEvent = require('../../../src/scale/events/RESIZE_EVENT');\nvar ScenePlugin = require('../../../src/plugins/ScenePlugin');\nvar Spine = require('Spine');\nvar SpineFile = require('./SpineFile');\nvar SpineGameObject = require('./gameobject/SpineGameObject');\nvar SpineContainer = require('./container/SpineContainer');\nvar NOOP = require('../../../src/utils/NOOP');\n\n/**\n * @classdesc\n * The Spine Plugin is a Scene based plugin that handles the creation and rendering of Spine Game Objects.\n *\n * Find more details about Spine itself at http://esotericsoftware.com/.\n *\n * All rendering and object creation is handled via the official Spine Runtimes. This version of the plugin\n * uses the Spine 3.8.95 runtimes. Please note that due to the way the Spine runtimes use semver, you will\n * get breaking changes in point-releases. Therefore, files created in a different version of Spine may not\n * work as a result, without you first updating the runtimes and rebuilding the plugin.\n *\n * Esoteric themselves recommend that you freeze your Spine editor version against the runtime versions.\n * You can find more information about this here: http://esotericsoftware.com/spine-settings#Version\n *\n * Please note that you require a Spine license in order to use Spine Runtimes in your games.\n *\n * You can install this plugin into your Phaser game by either importing it, if you're using ES6:\n *\n * ```javascript\n * import * as SpinePlugin from './SpinePlugin.js';\n * ```\n *\n * and then adding it to your Phaser Game configuration:\n *\n * ```javascript\n * plugins: {\n * scene: [\n * { key: 'SpinePlugin', plugin: window.SpinePlugin, mapping: 'spine' }\n * ]\n * }\n * ```\n *\n * If you're using ES5 then you can load the Spine Plugin in a Scene files payload, _within_ your\n * Game Configuration object, like this:\n *\n * ```javascript\n * scene: {\n * preload: preload,\n * create: create,\n * pack: {\n * files: [\n * { type: 'scenePlugin', key: 'SpinePlugin', url: 'plugins/SpinePlugin.js', sceneKey: 'spine' }\n * ]\n * }\n * }\n * ```\n *\n * Loading it like this allows you to then use commands such as `this.load.spine` from within the\n * same Scene. Alternatively, you can use the method `this.load.plugin` to load the plugin via the normal\n * Phaser Loader. However, doing so will not add it to the current Scene. It will be available from any\n * subsequent Scenes.\n *\n * Assuming a default environment you access it from within a Scene by using the `this.spine` reference.\n *\n * When this plugin is installed into a Scene it will add a Loader File Type, allowing you to load\n * Spine files directly, i.e.:\n *\n * ```javascript\n * this.load.spine('stretchyman', 'stretchyman-pro.json', [ 'stretchyman-pma.atlas' ], true);\n * ```\n *\n * It also installs a Game Object Factory method, allowing you to create Spine Game Objects:\n *\n * ```javascript\n * this.add.spine(512, 650, 'stretchyman')\n * ```\n *\n * The first argument is the key which you used when importing the Spine data. There are lots of\n * things you can specify, such as the animation name, skeleton, slot attachments and more. Please\n * see the respective documentation and examples for further details.\n *\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary.\n * The associated atlas files are scanned for any texture files present in them, which are then loaded.\n * If you have exported your Spine data with preMultipliedAlpha set, then you should enable this in the\n * load arguments, or you may see black outlines around skeleton textures.\n *\n * The Spine plugin is local to the Scene in which it is installed. This means a change to something,\n * such as the Skeleton Debug Renderer, in this Scene, will not impact the renderer in any other Scene.\n * The only exception to this is with the caches this plugin creates. Spine atlas and texture data are\n * stored in their own caches, which are global, meaning they're accessible from any Scene in your\n * game, regardless if the Scene loaded the Spine data or not.\n *\n * When destroying a Phaser Game instance, if you need to re-create it again on the same page without\n * reloading, you must remember to remove the Spine Plugin as part of your tear-down process:\n *\n * ```javascript\n * this.plugins.removeScenePlugin('SpinePlugin');\n * ```\n *\n * For details about the Spine Runtime API see http://esotericsoftware.com/spine-api-reference\n *\n * @class SpinePlugin\n * @extends Phaser.Plugins.ScenePlugin\n * @constructor\n * @since 3.19.0\n *\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Phaser Plugin Manager.\n */\nvar SpinePlugin = new Class({\n\n Extends: ScenePlugin,\n\n initialize:\n\n function SpinePlugin (scene, pluginManager)\n {\n ScenePlugin.call(this, scene, pluginManager);\n\n var game = pluginManager.game;\n\n /**\n * A read-only flag that indicates if the game is running under WebGL or Canvas.\n *\n * @name SpinePlugin#isWebGL\n * @type {boolean}\n * @readonly\n * @since 3.19.0\n */\n this.isWebGL = (game.config.renderType === 2);\n\n /**\n * A custom cache that stores the Spine atlas data.\n *\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\n * no matter which Scene you are in.\n *\n * @name SpinePlugin#cache\n * @type {Phaser.Cache.BaseCache}\n * @since 3.19.0\n */\n this.cache = game.cache.addCustom('spine');\n\n /**\n * A custom cache that stores the Spine Textures.\n *\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\n * no matter which Scene you are in.\n *\n * @name SpinePlugin#spineTextures\n * @type {Phaser.Cache.BaseCache}\n * @since 3.19.0\n */\n this.spineTextures = game.cache.addCustom('spineTextures');\n\n /**\n * A reference to the global JSON Cache.\n *\n * @name SpinePlugin#json\n * @type {Phaser.Cache.BaseCache}\n * @since 3.19.0\n */\n this.json = game.cache.json;\n\n /**\n * A reference to the global Texture Manager.\n *\n * @name SpinePlugin#textures\n * @type {Phaser.Textures.TextureManager}\n * @since 3.19.0\n */\n this.textures = game.textures;\n\n /**\n * A flag that sets if the Skeleton Renderers will render debug information over the top\n * of the skeleton or not.\n *\n * @name SpinePlugin#drawDebug\n * @type {boolean}\n * @since 3.19.0\n */\n this.drawDebug = false;\n\n /**\n * The underlying WebGL context of the Phaser renderer.\n *\n * Only set if running in WebGL mode.\n *\n * @name SpinePlugin#gl\n * @type {WebGLRenderingContext}\n * @since 3.19.0\n */\n this.gl;\n\n /**\n * A reference to either the Canvas or WebGL Renderer that this Game is using.\n *\n * @name SpinePlugin#renderer\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\n * @since 3.19.0\n */\n this.renderer;\n\n /**\n * An instance of the Spine WebGL Scene Renderer.\n *\n * Only set if running in WebGL mode.\n *\n * @name SpinePlugin#sceneRenderer\n * @type {spine.webgl.SceneRenderer}\n * @since 3.19.0\n */\n this.sceneRenderer;\n\n /**\n * An instance of the Spine Skeleton Renderer.\n *\n * @name SpinePlugin#skeletonRenderer\n * @type {(spine.canvas.SkeletonRenderer|spine.webgl.SkeletonRenderer)}\n * @since 3.19.0\n */\n this.skeletonRenderer;\n\n /**\n * An instance of the Spine Skeleton Debug Renderer.\n *\n * Only set if running in WebGL mode.\n *\n * @name SpinePlugin#skeletonDebugRenderer\n * @type {spine.webgl.skeletonDebugRenderer}\n * @since 3.19.0\n */\n this.skeletonDebugRenderer;\n\n /**\n * A reference to the Spine runtime.\n * This is the runtime created by Esoteric Software\n *\n * @name SpinePlugin#plugin\n * @type {spine}\n * @since 3.19.0\n */\n this.plugin = Spine;\n\n /**\n * An internal vector3 used by the screen to world method.\n *\n * @name SpinePlugin#temp1\n * @private\n * @type {spine.webgl.Vector3}\n * @since 3.19.0\n */\n this.temp1;\n\n /**\n * An internal vector3 used by the screen to world method.\n *\n * @name SpinePlugin#temp2\n * @private\n * @type {spine.webgl.Vector3}\n * @since 3.19.0\n */\n this.temp2;\n\n if (this.isWebGL)\n {\n this.runtime = Spine.webgl;\n\n this.renderer = game.renderer;\n this.gl = game.renderer.gl;\n\n this.getAtlas = this.getAtlasWebGL;\n }\n else\n {\n this.runtime = Spine.canvas;\n\n this.renderer = game.renderer;\n\n this.getAtlas = this.getAtlasCanvas;\n }\n\n // Headless mode?\n if (!this.renderer)\n {\n this.renderer = {\n width: game.scale.width,\n height: game.scale.height,\n preRender: NOOP,\n postRender: NOOP,\n render: NOOP,\n destroy: NOOP\n };\n }\n\n var _this = this;\n\n var add = function (x, y, key, animationName, loop)\n {\n var spineGO = new SpineGameObject(this.scene, _this, x, y, key, animationName, loop);\n\n this.displayList.add(spineGO);\n this.updateList.add(spineGO);\n\n return spineGO;\n };\n\n var make = function (config, addToScene)\n {\n if (config === undefined) { config = {}; }\n\n var key = GetValue(config, 'key', null);\n var animationName = GetValue(config, 'animationName', null);\n var loop = GetValue(config, 'loop', false);\n\n var spineGO = new SpineGameObject(this.scene, _this, 0, 0, key, animationName, loop);\n\n if (addToScene !== undefined)\n {\n config.add = addToScene;\n }\n\n BuildGameObject(this.scene, spineGO, config);\n\n // Spine specific\n var skinName = GetValue(config, 'skinName', false);\n\n if (skinName)\n {\n spineGO.setSkinByName(skinName);\n }\n\n var slotName = GetValue(config, 'slotName', false);\n var attachmentName = GetValue(config, 'attachmentName', null);\n\n if (slotName)\n {\n spineGO.setAttachment(slotName, attachmentName);\n }\n\n return spineGO.refresh();\n };\n\n var addContainer = function (x, y, children)\n {\n var spineGO = new SpineContainer(this.scene, _this, x, y, children);\n\n this.displayList.add(spineGO);\n\n return spineGO;\n };\n\n var makeContainer = function (config, addToScene)\n {\n if (config === undefined) { config = {}; }\n\n var x = GetValue(config, 'x', 0);\n var y = GetValue(config, 'y', 0);\n var children = GetValue(config, 'children', null);\n\n var container = new SpineContainer(this.scene, _this, x, y, children);\n\n if (addToScene !== undefined)\n {\n config.add = addToScene;\n }\n\n BuildGameObject(this.scene, container, config);\n\n return container;\n };\n\n pluginManager.registerFileType('spine', this.spineFileCallback, scene);\n pluginManager.registerGameObject('spine', add, make);\n pluginManager.registerGameObject('spinecontainer', addContainer, makeContainer);\n },\n\n /**\n * Internal boot handler.\n *\n * @method SpinePlugin#boot\n * @private\n * @since 3.19.0\n */\n boot: function ()\n {\n if (this.isWebGL)\n {\n this.bootWebGL();\n this.onResize();\n this.game.scale.on(ResizeEvent, this.onResize, this);\n }\n else\n {\n this.bootCanvas();\n }\n\n var eventEmitter = this.systems.events;\n\n eventEmitter.once('shutdown', this.shutdown, this);\n eventEmitter.once('destroy', this.destroy, this);\n },\n\n /**\n * Internal boot handler for the Canvas Renderer.\n *\n * @method SpinePlugin#bootCanvas\n * @private\n * @since 3.19.0\n */\n bootCanvas: function ()\n {\n this.skeletonRenderer = new Spine.canvas.SkeletonRenderer(this.scene.sys.context);\n },\n\n /**\n * Internal boot handler for the WebGL Renderer.\n *\n * @method SpinePlugin#bootWebGL\n * @private\n * @since 3.19.0\n */\n bootWebGL: function ()\n {\n this.sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true);\n\n // Monkeypatch the Spine setBlendMode functions, or batching is destroyed!\n\n var setBlendMode = function (srcBlend, dstBlend)\n {\n if (srcBlend !== this.srcBlend || dstBlend !== this.dstBlend)\n {\n var gl = this.context.gl;\n\n this.srcBlend = srcBlend;\n this.dstBlend = dstBlend;\n\n if (this.isDrawing)\n {\n this.flush();\n gl.blendFunc(this.srcBlend, this.dstBlend);\n }\n }\n };\n\n this.sceneRenderer.batcher.setBlendMode = setBlendMode;\n this.sceneRenderer.shapes.setBlendMode = setBlendMode;\n\n this.skeletonRenderer = this.sceneRenderer.skeletonRenderer;\n this.skeletonDebugRenderer = this.sceneRenderer.skeletonDebugRenderer;\n\n this.temp1 = new Spine.webgl.Vector3(0, 0, 0);\n this.temp2 = new Spine.webgl.Vector3(0, 0, 0);\n },\n\n /**\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\n * then returns it. You do not normally need to invoke this method directly.\n *\n * @method SpinePlugin#getAtlasCanvas\n * @since 3.19.0\n *\n * @param {string} key - The key of the Spine Atlas to create.\n *\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\n */\n getAtlasCanvas: function (key)\n {\n var atlasEntry = this.cache.get(key);\n\n if (!atlasEntry)\n {\n console.warn('No atlas data for: ' + key);\n return;\n }\n\n var atlas;\n var spineTextures = this.spineTextures;\n\n if (spineTextures.has(key))\n {\n atlas = spineTextures.get(key);\n }\n else\n {\n var textures = this.textures;\n\n atlas = new Spine.TextureAtlas(atlasEntry.data, function (path)\n {\n return new Spine.canvas.CanvasTexture(textures.get(atlasEntry.prefix + path).getSourceImage());\n });\n }\n\n return atlas;\n },\n\n /**\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\n * then returns it. You do not normally need to invoke this method directly.\n *\n * @method SpinePlugin#getAtlasWebGL\n * @since 3.19.0\n *\n * @param {string} key - The key of the Spine Atlas to create.\n *\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\n */\n getAtlasWebGL: function (key)\n {\n var atlasEntry = this.cache.get(key);\n\n if (!atlasEntry)\n {\n console.warn('No atlas data for: ' + key);\n return;\n }\n\n var atlas;\n var spineTextures = this.spineTextures;\n\n if (spineTextures.has(key))\n {\n atlas = spineTextures.get(key);\n }\n else\n {\n var textures = this.textures;\n\n var gl = this.sceneRenderer.context.gl;\n\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\n\n atlas = new Spine.TextureAtlas(atlasEntry.data, function (path)\n {\n return new Spine.webgl.GLTexture(gl, textures.get(atlasEntry.prefix + path).getSourceImage(), false);\n });\n }\n\n return atlas;\n },\n\n /**\n * Adds a Spine Skeleton and Atlas file, or array of files, to the current load queue.\n *\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\n *\n * ```javascript\n * function preload ()\n * {\n * this.load.spine('spineBoy', 'boy.json', 'boy.atlas', true);\n * }\n * ```\n *\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\n * loaded.\n *\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\n *\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary. The associated\n * atlas files are scanned for any texture files present in them, which are then loaded. If you have exported\n * your Spine data with preMultipliedAlpha set, then you should enable this in the arguments, or you may see black\n * outlines around skeleton textures.\n *\n * The key must be a unique String. It is used to add the file to the global Spine cache upon a successful load.\n * The key should be unique both in terms of files being loaded and files already present in the Spine cache.\n * Loading a file using a key that is already taken will result in a warning.\n *\n * Instead of passing arguments you can pass a configuration object, such as:\n *\n * ```javascript\n * this.load.spine({\n * key: 'mainmenu',\n * jsonURL: 'boy.json',\n * atlasURL: 'boy.atlas',\n * preMultipliedAlpha: true\n * });\n * ```\n *\n * If you need to load multiple Spine atlas files, provide them as an array:\n *\n * ```javascript\n * function preload ()\n * {\n * this.load.spine('demos', 'demos.json', [ 'atlas1.atlas', 'atlas2.atlas' ], true);\n * }\n * ```\n *\n * See the documentation for `Phaser.Types.Loader.FileTypes.SpineFileConfig` for more details.\n *\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\n * this is what you would use to retrieve the data from the Spine plugin.\n *\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\n *\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\n * and no URL is given then the Loader will set the URL to be \"alien.json\". It will always add `.json` as the extension, although\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\n *\n * Note: The ability to load this type of file will only be available if the Spine Plugin has been built or loaded into Phaser.\n *\n * @method Phaser.Loader.LoaderPlugin#spine\n * @fires Phaser.Loader.LoaderPlugin#ADD\n * @since 3.19.0\n *\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\n * @param {string} jsonURL - The absolute or relative URL to load the Spine json file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\n * @param {string|string[]} atlasURL - The absolute or relative URL to load the Spine atlas file from. If undefined or `null` it will be set to `.atlas`, i.e. if `key` was \"alien\" then the URL will be \"alien.atlas\".\n * @param {boolean} [preMultipliedAlpha=false] - Do the texture files include pre-multiplied alpha or not?\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the Spine json file. Used in replacement of the Loaders default XHR Settings.\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the Spine atlas file. Used in replacement of the Loaders default XHR Settings.\n *\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\n */\n spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings)\n {\n var multifile;\n\n if (Array.isArray(key))\n {\n for (var i = 0; i < key.length; i++)\n {\n multifile = new SpineFile(this, key[i]);\n\n this.addFile(multifile.files);\n }\n }\n else\n {\n multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings);\n\n this.addFile(multifile.files);\n }\n\n return this;\n },\n\n /**\n * Converts the given x and y screen coordinates into the world space of the given Skeleton.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#worldToLocal\n * @since 3.19.0\n *\n * @param {number} x - The screen space x coordinate to convert.\n * @param {number} y - The screen space y coordinate to convert.\n * @param {spine.Skeleton} skeleton - The Spine Skeleton to convert into.\n * @param {spine.Bone} [bone] - Optional bone of the Skeleton to convert into.\n *\n * @return {spine.Vector2} A Vector2 containing the translated point.\n */\n worldToLocal: function (x, y, skeleton, bone)\n {\n var temp1 = this.temp1;\n var temp2 = this.temp2;\n var camera = this.sceneRenderer.camera;\n\n temp1.set(x + skeleton.x, y - skeleton.y, 0);\n\n var width = camera.viewportWidth;\n var height = camera.viewportHeight;\n\n camera.screenToWorld(temp1, width, height);\n\n if (bone && bone.parent !== null)\n {\n bone.parent.worldToLocal(temp2.set(temp1.x - skeleton.x, temp1.y - skeleton.y, 0));\n\n return new Spine.Vector2(temp2.x, temp2.y);\n }\n else if (bone)\n {\n return new Spine.Vector2(temp1.x - skeleton.x, temp1.y - skeleton.y);\n }\n else\n {\n return new Spine.Vector2(temp1.x, temp1.y);\n }\n },\n\n /**\n * Returns a Spine Vector2 based on the given x and y values.\n *\n * @method SpinePlugin#getVector2\n * @since 3.19.0\n *\n * @param {number} x - The Vector x value.\n * @param {number} y - The Vector y value.\n *\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\n */\n getVector2: function (x, y)\n {\n return new Spine.Vector2(x, y);\n },\n\n /**\n * Returns a Spine Vector2 based on the given x, y and z values.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#getVector3\n * @since 3.19.0\n *\n * @param {number} x - The Vector x value.\n * @param {number} y - The Vector y value.\n * @param {number} z - The Vector z value.\n *\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\n */\n getVector3: function (x, y, z)\n {\n return new Spine.webgl.Vector3(x, y, z);\n },\n\n /**\n * Sets `drawBones` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugBones\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugBones: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawBones = value;\n\n return this;\n },\n\n /**\n * Sets `drawRegionAttachments` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugRegionAttachments\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugRegionAttachments: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawRegionAttachments = value;\n\n return this;\n },\n\n /**\n * Sets `drawBoundingBoxes` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugBoundingBoxes\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugBoundingBoxes: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawBoundingBoxes = value;\n\n return this;\n },\n\n /**\n * Sets `drawMeshHull` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugMeshHull\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugMeshHull: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawMeshHull = value;\n\n return this;\n },\n\n /**\n * Sets `drawMeshTriangles` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugMeshTriangles\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugMeshTriangles: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawMeshTriangles = value;\n\n return this;\n },\n\n /**\n * Sets `drawPaths` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugPaths\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugPaths: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawPaths = value;\n\n return this;\n },\n\n /**\n * Sets `drawSkeletonXY` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugSkeletonXY\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugSkeletonXY: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawSkeletonXY = value;\n\n return this;\n },\n\n /**\n * Sets `drawClipping` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugClipping\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugClipping: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawClipping = value;\n\n return this;\n },\n\n /**\n * Sets the given vertex effect on the Spine Skeleton Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setEffect\n * @since 3.19.0\n *\n * @param {spine.VertexEffect} [effect] - The vertex effect to set on the Skeleton Renderer.\n *\n * @return {this} This Spine Plugin.\n */\n setEffect: function (effect)\n {\n this.sceneRenderer.skeletonRenderer.vertexEffect = effect;\n\n return this;\n },\n\n /**\n * Creates a Spine Skeleton based on the given key and optional Skeleton JSON data.\n *\n * The Skeleton data should have already been loaded before calling this method.\n *\n * @method SpinePlugin#createSkeleton\n * @since 3.19.0\n *\n * @param {string} key - The key of the Spine skeleton data, as loaded by the plugin. If the Spine JSON contains multiple skeletons, reference them with a period, i.e. `set.spineBoy`.\n * @param {object} [skeletonJSON] - Optional Skeleton JSON data to use, instead of getting it from the cache.\n *\n * @return {(any|null)} This Spine Skeleton data object, or `null` if the key was invalid.\n */\n createSkeleton: function (key, skeletonJSON)\n {\n var atlasKey = key;\n var jsonKey = key;\n var split = (key.indexOf('.') !== -1);\n\n if (split)\n {\n var parts = key.split('.');\n\n atlasKey = parts.shift();\n jsonKey = parts.join('.');\n }\n\n var atlasData = this.cache.get(atlasKey);\n var atlas = this.getAtlas(atlasKey);\n\n if (!atlas)\n {\n return null;\n }\n\n if (!this.spineTextures.has(atlasKey))\n {\n this.spineTextures.add(atlasKey, atlas);\n }\n\n var preMultipliedAlpha = atlasData.preMultipliedAlpha;\n\n var atlasLoader = new Spine.AtlasAttachmentLoader(atlas);\n\n var skeletonJson = new Spine.SkeletonJson(atlasLoader);\n\n var data;\n\n if (skeletonJSON)\n {\n data = skeletonJSON;\n }\n else\n {\n var json = this.json.get(atlasKey);\n\n data = (split) ? GetValue(json, jsonKey) : json;\n }\n\n if (data)\n {\n var skeletonData = skeletonJson.readSkeletonData(data);\n\n var skeleton = new Spine.Skeleton(skeletonData);\n\n return { skeletonData: skeletonData, skeleton: skeleton, preMultipliedAlpha: preMultipliedAlpha };\n }\n else\n {\n return null;\n }\n },\n\n /**\n * Creates a new Animation State and Animation State Data for the given skeleton.\n *\n * The returned object contains two properties: `state` and `stateData` respectively.\n *\n * @method SpinePlugin#createAnimationState\n * @since 3.19.0\n *\n * @param {spine.Skeleton} skeleton - The Skeleton to create the Animation State for.\n *\n * @return {any} An object containing the Animation State and Animation State Data instances.\n */\n createAnimationState: function (skeleton)\n {\n var stateData = new Spine.AnimationStateData(skeleton.data);\n\n var state = new Spine.AnimationState(stateData);\n\n return { stateData: stateData, state: state };\n },\n\n /**\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\n *\n * The returned object contains two properties: `offset` and `size`:\n *\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\n * `size` - The width and height of the AABB.\n *\n * @method SpinePlugin#getBounds\n * @since 3.19.0\n *\n * @param {spine.Skeleton} skeleton - The Skeleton to get the bounds from.\n *\n * @return {any} The bounds object.\n */\n getBounds: function (skeleton)\n {\n var offset = new Spine.Vector2();\n var size = new Spine.Vector2();\n\n skeleton.getBounds(offset, size, []);\n\n return { offset: offset, size: size };\n },\n\n /**\n * Internal handler for when the renderer resizes.\n *\n * Only called if running in WebGL.\n *\n * @method SpinePlugin#onResize\n * @since 3.19.0\n */\n onResize: function ()\n {\n var renderer = this.renderer;\n var sceneRenderer = this.sceneRenderer;\n\n var viewportWidth = renderer.width;\n var viewportHeight = renderer.height;\n\n sceneRenderer.camera.position.x = viewportWidth / 2;\n sceneRenderer.camera.position.y = viewportHeight / 2;\n\n sceneRenderer.camera.viewportWidth = viewportWidth;\n sceneRenderer.camera.viewportHeight = viewportHeight;\n },\n\n /**\n * The Scene that owns this plugin is shutting down.\n *\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\n *\n * @method SpinePlugin#shutdown\n * @private\n * @since 3.19.0\n */\n shutdown: function ()\n {\n var eventEmitter = this.systems.events;\n\n eventEmitter.off('shutdown', this.shutdown, this);\n\n if (this.isWebGL)\n {\n this.game.scale.off(ResizeEvent, this.onResize, this);\n }\n },\n\n /**\n * The Scene that owns this plugin is being destroyed.\n *\n * We need to shutdown and then kill off all external references.\n *\n * @method SpinePlugin#destroy\n * @private\n * @since 3.19.0\n */\n destroy: function ()\n {\n this.shutdown();\n\n if (this.sceneRenderer)\n {\n this.sceneRenderer.dispose();\n }\n\n this.pluginManager.removeGameObject('spine', true, true);\n\n this.pluginManager = null;\n this.game = null;\n this.scene = null;\n this.systems = null;\n\n this.cache = null;\n this.spineTextures = null;\n this.json = null;\n this.textures = null;\n this.sceneRenderer = null;\n this.skeletonRenderer = null;\n this.gl = null;\n }\n\n});\n\nSpinePlugin.SpineGameObject = SpineGameObject;\n\n/**\n * Creates a new Spine Game Object and adds it to the Scene.\n *\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\n * do not have a Phaser origin.\n *\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\n * that.\n *\n * ```javascript\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\n * ```\n *\n * The key is optional. If not passed here, you need to call `SpineGameObject.setSkeleton()` to use it.\n *\n * The animation name is also optional and can be set later via `SpineGameObject.setAnimation`.\n *\n * Should you wish for more control over the object creation, such as setting a slot attachment or skin\n * name, then use `SpinePlugin.make` instead.\n *\n * @method SpinePlugin#add\n * @since 3.19.0\n *\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\n *\n * @return {SpineGameObject} The Game Object that was created.\n */\n\n/**\n * Creates a new Spine Game Object from the given configuration file and optionally adds it to the Scene.\n *\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\n * do not have a Phaser origin.\n *\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\n * that.\n *\n * ```javascript\n * let jelly = this.make.spine({\n * x: 500, y: 500, key: 'jelly',\n * scale: 1.5,\n * skinName: 'square_Green',\n * animationName: 'jelly-idle', loop: true,\n * slotName: 'hat', attachmentName: 'images/La_14'\n * });\n * ```\n *\n * @method SpinePlugin#make\n * @since 3.19.0\n *\n * @param {any} config - The configuration object this Game Object will use to create itself.\n * @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.\n *\n * @return {SpineGameObject} The Game Object that was created.\n */\n\nmodule.exports = SpinePlugin;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar Class = require('../../../../src/utils/Class');\nvar Container = require('../../../../src/gameobjects/container/Container');\nvar SpineContainerRender = require('./SpineContainerRender');\n\n/**\n * @classdesc\n * A Spine Container is a special kind of Container created specifically for Spine Game Objects.\n *\n * You have all of the same features of a standard Container, but the rendering functions are optimized specifically\n * for Spine Game Objects. You cannot mix and match Spine Game Objects with regular Game Objects inside of this\n * type of Container, however.\n *\n * To create one in a Scene, use the factory methods:\n *\n * ```javascript\n * this.add.spinecontainer();\n * ```\n *\n * or\n *\n * ```javascript\n * this.make.spinecontainer();\n * ```\n *\n * See the Container documentation for further details.\n *\n * @class SpineContainer\n * @extends Phaser.GameObjects.Container\n * @constructor\n * @since 3.50.0\n *\n * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to.\n * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin.\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {SpineGameObject[]} [children] - An optional array of Spine Game Objects to add to this Container.\n */\nvar SpineContainer = new Class({\n\n Extends: Container,\n\n Mixins: [\n SpineContainerRender\n ],\n\n initialize:\n\n function SpineContainer (scene, plugin, x, y, children)\n {\n Container.call(this, scene, x, y, children);\n\n // Same as SpineGameObject, to prevent the renderer from mis-typing it when batching\n this.type = 'Spine';\n\n /**\n * A reference to the Spine Plugin.\n *\n * @name SpineGameObject#plugin\n * @type {SpinePlugin}\n * @since 3.19.0\n */\n this.plugin = plugin;\n }\n\n});\n\nmodule.exports = SpineContainer;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Renders this Game Object with the Canvas Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method Phaser.GameObjects.Container#renderCanvas\n * @since 3.4.0\n * @private\n *\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar SpineContainerCanvasRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix)\n{\n var children = container.list;\n\n if (children.length === 0)\n {\n return;\n }\n\n var transformMatrix = container.localTransform;\n\n if (parentMatrix)\n {\n transformMatrix.loadIdentity();\n transformMatrix.multiply(parentMatrix);\n transformMatrix.translate(container.x, container.y);\n transformMatrix.rotate(container.rotation);\n transformMatrix.scale(container.scaleX, container.scaleY);\n }\n else\n {\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\n }\n\n var containerHasBlendMode = (container.blendMode !== -1);\n\n if (!containerHasBlendMode)\n {\n // If Container is SKIP_TEST then set blend mode to be Normal\n renderer.setBlendMode(0);\n }\n\n var alpha = container._alpha;\n var scrollFactorX = container.scrollFactorX;\n var scrollFactorY = container.scrollFactorY;\n\n if (container.mask)\n {\n container.mask.preRenderCanvas(renderer, null, camera);\n }\n\n for (var i = 0; i < children.length; i++)\n {\n var child = children[i];\n\n if (!child.willRender(camera))\n {\n continue;\n }\n\n var childAlpha = child.alpha;\n var childScrollFactorX = child.scrollFactorX;\n var childScrollFactorY = child.scrollFactorY;\n\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\n {\n // If Container doesn't have its own blend mode, then a child can have one\n renderer.setBlendMode(child.blendMode);\n }\n\n // Set parent values\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\n child.setAlpha(childAlpha * alpha);\n\n // Render\n child.renderCanvas(renderer, child, interpolationPercentage, camera, transformMatrix);\n\n // Restore original values\n child.setAlpha(childAlpha);\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\n }\n\n if (container.mask)\n {\n container.mask.postRenderCanvas(renderer);\n }\n};\n\nmodule.exports = SpineContainerCanvasRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar renderWebGL = require('../../../../src/utils/NOOP');\nvar renderCanvas = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineContainerWebGLRenderer');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineContainerCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar Clamp = require('../../../../src/math/Clamp');\nvar RadToDeg = require('../../../../src/math/RadToDeg');\nvar Wrap = require('../../../../src/math/Wrap');\n\n/**\n * Renders this Game Object with the WebGL Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method SpineContainerWebGLRenderer#renderWebGL\n * @since 3.50.0\n * @private\n *\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar SpineContainerWebGLRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix)\n{\n var plugin = container.plugin;\n var sceneRenderer = plugin.sceneRenderer;\n var children = container.list;\n\n if (children.length === 0)\n {\n if (sceneRenderer.batcher.isDrawing && renderer.finalType)\n {\n sceneRenderer.end();\n }\n\n return;\n }\n\n var transformMatrix = container.localTransform;\n\n if (parentMatrix)\n {\n transformMatrix.loadIdentity();\n transformMatrix.multiply(parentMatrix);\n transformMatrix.translate(container.x, container.y);\n transformMatrix.rotate(container.rotation);\n transformMatrix.scale(container.scaleX, container.scaleY);\n }\n else\n {\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\n }\n\n var alpha = container.alpha;\n var scrollFactorX = container.scrollFactorX;\n var scrollFactorY = container.scrollFactorY;\n\n var GameObjectRenderMask = 15;\n\n if (renderer.newType)\n {\n sceneRenderer.begin();\n }\n\n for (var i = 0; i < children.length; i++)\n {\n var src = children[i];\n\n var skeleton = src.skeleton;\n var childAlpha = skeleton.color.a;\n\n var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || childAlpha === 0);\n\n if (!skeleton || !willRender)\n {\n continue;\n }\n\n var camMatrix = renderer._tempMatrix1;\n var spriteMatrix = renderer._tempMatrix2;\n var calcMatrix = renderer._tempMatrix3;\n\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));\n\n camMatrix.copyFrom(camera.matrix);\n\n // Multiply the camera by the parent matrix\n camMatrix.multiplyWithOffset(transformMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY);\n\n // Undo the camera scroll\n spriteMatrix.e = src.x;\n spriteMatrix.f = src.y;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n\n var viewportHeight = renderer.height;\n\n skeleton.x = calcMatrix.tx;\n skeleton.y = viewportHeight - calcMatrix.ty;\n\n skeleton.scaleX = calcMatrix.scaleX;\n skeleton.scaleY = calcMatrix.scaleY;\n\n if (src.scaleX < 0)\n {\n skeleton.scaleX *= -1;\n\n src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);\n }\n else\n {\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\n }\n\n if (src.scaleY < 0)\n {\n skeleton.scaleY *= -1;\n\n if (src.scaleX < 0)\n {\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n else\n {\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n }\n\n if (camera.renderToTexture || renderer.currentFramebuffer !== null)\n {\n skeleton.y = calcMatrix.ty;\n skeleton.scaleY *= -1;\n }\n\n // Add autoUpdate option\n skeleton.updateWorldTransform();\n\n skeleton.color.a = Clamp(childAlpha * alpha, 0, 1);\n\n // Draw the current skeleton\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\n\n // Restore alpha\n skeleton.color.a = childAlpha;\n }\n\n if (!renderer.nextTypeMatch)\n {\n // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch.\n sceneRenderer.end();\n\n if (!renderer.finalType)\n {\n renderer.rebindPipeline(renderer.pipelines.MultiPipeline);\n }\n }\n};\n\nmodule.exports = SpineContainerWebGLRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Complete Event.\n *\n * @event SpinePluginEvents#COMPLETE\n * @since 3.19.0\n */\nmodule.exports = 'complete';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Dispose Event.\n *\n * @event SpinePluginEvents#DISPOSE\n * @since 3.19.0\n */\nmodule.exports = 'dispose';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The End Event.\n *\n * @event SpinePluginEvents#END\n * @since 3.19.0\n */\nmodule.exports = 'end';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Custom Event Event.\n *\n * @event SpinePluginEvents#EVENT\n * @since 3.19.0\n */\nmodule.exports = 'event';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Interrupted Event.\n *\n * @event SpinePluginEvents#INTERRUPTED\n * @since 3.19.0\n */\nmodule.exports = 'interrupted';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Start Event.\n *\n * @event SpinePluginEvents#START\n * @since 3.19.0\n */\nmodule.exports = 'start';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace SpinePluginEvents\n */\n\nmodule.exports = {\n\n COMPLETE: require('./COMPLETE_EVENT'),\n DISPOSE: require('./DISPOSE_EVENT'),\n END: require('./END_EVENT'),\n EVENT: require('./EVENT_EVENT'),\n INTERRUPTED: require('./INTERRUPTED_EVENT'),\n START: require('./START_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar AngleBetween = require('../../../../src/math/angle/Between');\nvar Clamp = require('../../../../src/math/Clamp');\nvar Class = require('../../../../src/utils/Class');\nvar ComponentsComputedSize = require('../../../../src/gameobjects/components/ComputedSize');\nvar ComponentsDepth = require('../../../../src/gameobjects/components/Depth');\nvar ComponentsFlip = require('../../../../src/gameobjects/components/Flip');\nvar ComponentsScrollFactor = require('../../../../src/gameobjects/components/ScrollFactor');\nvar ComponentsTransform = require('../../../../src/gameobjects/components/Transform');\nvar ComponentsVisible = require('../../../../src/gameobjects/components/Visible');\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar DegToRad = require('../../../../src/math/DegToRad');\nvar GameObject = require('../../../../src/gameobjects/GameObject');\nvar RadToDeg = require('../../../../src/math/RadToDeg');\nvar SpineEvents = require('../events/');\nvar SpineGameObjectRender = require('./SpineGameObjectRender');\n\n/**\n * @classdesc\n * A Spine Game Object is a Phaser level object that can be added to your Phaser Scenes. It encapsulates\n * a Spine Skeleton with Spine Animation Data and Animation State, with helper methods to allow you to\n * easily change the skin, slot attachment, bone positions and more.\n *\n * Spine Game Objects can be created via the Game Object Factory, Game Object Creator, or directly.\n * You can only create them if the Spine plugin has been loaded into Phaser.\n *\n * The quickest way is the Game Object Factory:\n *\n * ```javascript\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\n * ```\n *\n * Here we are creating a new Spine Game Object positioned at 512 x 550. It's using the `jelly`\n * Spine data, which has previously been loaded into your Scene. The `jelly-think` argument is\n * an optional animation to start playing on the skeleton. The final argument `true` sets the\n * animation to loop. Look at the documentation for further details on each of these options.\n *\n * For more control, you can use the Game Object Creator, passing in a Spine Game Object\n * Configuration object:\n *\n * ```javascript\n * let jelly = this.make.spine({\n * x: 512, y: 550, key: 'jelly',\n * scale: 1.5,\n * skinName: 'square_Green',\n * animationName: 'jelly-think', loop: true,\n * slotName: 'hat', attachmentName: 'images/La_14'\n * });\n * ```\n *\n * Here, you've got the ability to specify extra details, such as the slot name, attachments or\n * overall scale.\n *\n * If you wish to instantiate a Spine Game Object directly you can do so, but in order for it to\n * update and render, it must be added to the display and update lists of your Scene:\n *\n * ```javascript\n * let jelly = new SpineGameObject(this, this.spine, 512, 550, 'jelly', 'jelly-think', true);\n * this.sys.displayList.add(jelly);\n * this.sys.updateList.add(jelly);\n * ```\n *\n * It's possible to enable Spine Game Objects for input, but you should be aware that it will use\n * the bounds of the skeletons current pose to create the hit area from. Sometimes this is ok, but\n * often not. Make use of the `InputPlugin.enableDebug` method to view the input shape being created.\n * If it's not suitable, provide your own shape to the `setInteractive` method.\n *\n * Due to the way Spine handles scaling, it's not recommended to enable a Spine Game Object for\n * physics directly. Instead, you should look at creating a proxy body and syncing the Spine Game\n * Object position with it. See the examples for further details.\n *\n * If your Spine Game Object has black outlines around the different parts of the texture when it\n * renders then you have exported the files from Spine with pre-multiplied alpha enabled, but have\n * forgotten to set that flag when loading the Spine data. Please see the loader docs for more details.\n *\n * @class SpineGameObject\n * @constructor\n * @since 3.19.0\n *\n * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to.\n * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin.\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\n */\nvar SpineGameObject = new Class({\n\n Extends: GameObject,\n\n Mixins: [\n ComponentsComputedSize,\n ComponentsDepth,\n ComponentsFlip,\n ComponentsScrollFactor,\n ComponentsTransform,\n ComponentsVisible,\n SpineGameObjectRender\n ],\n\n initialize:\n\n function SpineGameObject (scene, plugin, x, y, key, animationName, loop)\n {\n GameObject.call(this, scene, 'Spine');\n\n /**\n * A reference to the Spine Plugin.\n *\n * @name SpineGameObject#plugin\n * @type {SpinePlugin}\n * @since 3.19.0\n */\n this.plugin = plugin;\n\n /**\n * The Spine Skeleton this Game Object is using.\n *\n * @name SpineGameObject#skeleton\n * @type {spine.Skeleton}\n * @since 3.19.0\n */\n this.skeleton = null;\n\n /**\n * The Spine Skeleton Data associated with the Skeleton this Game Object is using.\n *\n * @name SpineGameObject#skeletonData\n * @type {spine.SkeletonData}\n * @since 3.19.0\n */\n this.skeletonData = null;\n\n /**\n * The Spine Animation State this Game Object is using.\n *\n * @name SpineGameObject#state\n * @type {spine.AnimationState}\n * @since 3.19.0\n */\n this.state = null;\n\n /**\n * The Spine Animation State Data associated with the Animation State this Game Object is using.\n *\n * @name SpineGameObject#stateData\n * @type {spine.AnimationStateData}\n * @since 3.19.0\n */\n this.stateData = null;\n\n /**\n * A reference to the root bone of the Skeleton.\n *\n * @name SpineGameObject#root\n * @type {spine.Bone}\n * @since 3.19.0\n */\n this.root = null;\n\n /**\n * This object holds the calculated bounds of the current\n * pose, as set when a new Skeleton is applied.\n *\n * @name SpineGameObject#bounds\n * @type {any}\n * @since 3.19.0\n */\n this.bounds = null;\n\n /**\n * A Game Object level flag that allows you to enable debug drawing\n * to the Skeleton Debug Renderer by toggling it.\n *\n * @name SpineGameObject#drawDebug\n * @type {boolean}\n * @since 3.19.0\n */\n this.drawDebug = false;\n\n /**\n * The factor to scale the Animation update time by.\n *\n * @name SpineGameObject#timeScale\n * @type {number}\n * @since 3.19.0\n */\n this.timeScale = 1;\n\n /**\n * The calculated Display Origin of this Game Object.\n *\n * @name SpineGameObject#displayOriginX\n * @type {number}\n * @since 3.19.0\n */\n this.displayOriginX = 0;\n\n /**\n * The calculated Display Origin of this Game Object.\n *\n * @name SpineGameObject#displayOriginY\n * @type {number}\n * @since 3.19.0\n */\n this.displayOriginY = 0;\n\n /**\n * A flag that stores if the texture associated with the current\n * Skin being used by this Game Object, has its alpha pre-multiplied\n * into it, or not.\n *\n * @name SpineGameObject#preMultipliedAlpha\n * @type {boolean}\n * @since 3.19.0\n */\n this.preMultipliedAlpha = false;\n\n /**\n * A default Blend Mode. You cannot change the blend mode of a\n * Spine Game Object.\n *\n * @name SpineGameObject#blendMode\n * @type {number}\n * @readonly\n * @since 3.19.0\n */\n this.blendMode = -1;\n\n this.setPosition(x, y);\n\n if (key)\n {\n this.setSkeleton(key, animationName, loop);\n }\n },\n\n /**\n * Overrides the default Game Object method and always returns true.\n * Rendering is decided in the renderer functions.\n *\n * @method SpineGameObject#willRender\n * @since 3.19.0\n *\n * @return {boolean} Always returns `true`.\n */\n willRender: function ()\n {\n return true;\n },\n\n /**\n * Set the Alpha level for the whole Skeleton of this Game Object.\n *\n * The alpha controls the opacity of the Game Object as it renders.\n *\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\n *\n * @method SpineGameObject#setAlpha\n * @since 3.19.0\n *\n * @param {number} [value=1] - The alpha value used for the whole Skeleton.\n *\n * @return {this} This Game Object instance.\n */\n setAlpha: function (value, slotName)\n {\n if (value === undefined) { value = 1; }\n\n if (slotName)\n {\n var slot = this.findSlot(slotName);\n\n if (slot)\n {\n slot.color.a = Clamp(value, 0, 1);\n }\n }\n else\n {\n this.alpha = value;\n }\n\n return this;\n },\n\n /**\n * The alpha value of the Skeleton.\n *\n * A value between 0 and 1.\n *\n * This is a global value, impacting the entire Skeleton, not just a region of it.\n *\n * @name SpineGameObject#alpha\n * @type {number}\n * @since 3.19.0\n */\n alpha: {\n\n get: function ()\n {\n return this.skeleton.color.a;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n if (this.skeleton)\n {\n this.skeleton.color.a = v;\n }\n\n if (v === 0)\n {\n this.renderFlags &= ~2;\n }\n else\n {\n this.renderFlags |= 2;\n }\n }\n\n },\n\n /**\n * The amount of red used when rendering the Skeleton.\n *\n * A value between 0 and 1.\n *\n * This is a global value, impacting the entire Skeleton, not just a region of it.\n *\n * @name SpineGameObject#red\n * @type {number}\n * @since 3.19.0\n */\n red: {\n\n get: function ()\n {\n return this.skeleton.color.r;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n if (this.skeleton)\n {\n this.skeleton.color.r = v;\n }\n }\n\n },\n\n /**\n * The amount of green used when rendering the Skeleton.\n *\n * A value between 0 and 1.\n *\n * This is a global value, impacting the entire Skeleton, not just a region of it.\n *\n * @name SpineGameObject#green\n * @type {number}\n * @since 3.19.0\n */\n green: {\n\n get: function ()\n {\n return this.skeleton.color.g;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n if (this.skeleton)\n {\n this.skeleton.color.g = v;\n }\n }\n\n },\n\n /**\n * The amount of blue used when rendering the Skeleton.\n *\n * A value between 0 and 1.\n *\n * This is a global value, impacting the entire Skeleton, not just a region of it.\n *\n * @name SpineGameObject#blue\n * @type {number}\n * @since 3.19.0\n */\n blue: {\n\n get: function ()\n {\n return this.skeleton.color.b;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n if (this.skeleton)\n {\n this.skeleton.color.b = v;\n }\n }\n\n },\n\n /**\n * Sets the color on the given attachment slot. Or, if no slot is given, on the whole skeleton.\n *\n * @method SpineGameObject#setColor\n * @since 3.19.0\n *\n * @param {integer} [color=0xffffff] - The color being applied to the Skeleton or named Slot. Set to white to disable any previously set color.\n * @param {string} [slotName] - The name of the slot to set the color on. If not give, will be set on the whole skeleton.\n *\n * @return {this} This Game Object instance.\n */\n setColor: function (color, slotName)\n {\n if (color === undefined) { color = 0xffffff; }\n\n var red = (color >> 16 & 0xFF) / 255;\n var green = (color >> 8 & 0xFF) / 255;\n var blue = (color & 0xFF) / 255;\n var alpha = (color > 16777215) ? (color >>> 24) / 255 : null;\n\n var target = this.skeleton;\n\n if (slotName)\n {\n var slot = this.findSlot(slotName);\n\n if (slot)\n {\n target = slot;\n }\n }\n\n target.color.r = red;\n target.color.g = green;\n target.color.b = blue;\n\n if (alpha !== null)\n {\n target.color.a = alpha;\n }\n\n return this;\n },\n\n /**\n * Sets this Game Object to use the given Skeleton based on the Atlas Data Key and a provided JSON object\n * that contains the Skeleton data.\n *\n * @method SpineGameObject#setSkeletonFromJSON\n * @since 3.19.0\n *\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\n * @param {object} skeletonJSON - The JSON data for the Skeleton.\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\n *\n * @return {this} This Game Object.\n */\n setSkeletonFromJSON: function (atlasDataKey, skeletonJSON, animationName, loop)\n {\n return this.setSkeleton(atlasDataKey, skeletonJSON, animationName, loop);\n },\n\n /**\n * Sets this Game Object to use the given Skeleton based on its cache key.\n *\n * Typically, once set, the Skeleton doesn't change. Instead, you change the skin,\n * or slot attachment, or any other property to adjust it.\n *\n * @method SpineGameObject#setSkeleton\n * @since 3.19.0\n *\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\n * @param {object} skeletonJSON - The JSON data for the Skeleton.\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\n *\n * @return {this} This Game Object.\n */\n setSkeleton: function (atlasDataKey, animationName, loop, skeletonJSON)\n {\n if (this.state)\n {\n this.state.clearListeners();\n this.state.clearListenerNotifications();\n }\n\n var data = this.plugin.createSkeleton(atlasDataKey, skeletonJSON);\n\n this.skeletonData = data.skeletonData;\n\n this.preMultipliedAlpha = data.preMultipliedAlpha;\n\n var skeleton = data.skeleton;\n\n skeleton.setSkin();\n skeleton.setToSetupPose();\n\n this.skeleton = skeleton;\n\n // AnimationState\n data = this.plugin.createAnimationState(skeleton);\n\n if (this.state)\n {\n this.state.clearListeners();\n this.state.clearListenerNotifications();\n }\n\n this.state = data.state;\n this.stateData = data.stateData;\n\n this.state.addListener({\n event: this.onEvent.bind(this),\n complete: this.onComplete.bind(this),\n start: this.onStart.bind(this),\n end: this.onEnd.bind(this),\n dispose: this.onDispose.bind(this),\n interrupted: this.onInterrupted.bind(this)\n });\n\n if (animationName)\n {\n this.setAnimation(0, animationName, loop);\n }\n\n this.root = this.getRootBone();\n\n if (this.root)\n {\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\n }\n\n this.state.apply(skeleton);\n\n skeleton.updateCache();\n\n return this.updateSize();\n },\n\n /**\n * Internal event handler that emits the Spine onComplete event via this Game Object.\n *\n * @method SpineGameObject#onComplete\n * @fires SpinePluginEvents#COMPLETE\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n */\n onComplete: function (entry)\n {\n this.emit(SpineEvents.COMPLETE, entry);\n },\n\n /**\n * Internal event handler that emits the Spine onDispose event via this Game Object.\n *\n * @method SpineGameObject#onDispose\n * @fires SpinePluginEvents#DISPOSE\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n */\n onDispose: function (entry)\n {\n this.emit(SpineEvents.DISPOSE, entry);\n },\n\n /**\n * Internal event handler that emits the Spine onEnd event via this Game Object.\n *\n * @method SpineGameObject#onEnd\n * @fires SpinePluginEvents#END\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n */\n onEnd: function (entry)\n {\n this.emit(SpineEvents.END, entry);\n },\n\n /**\n * Internal event handler that emits the Spine Event event via this Game Object.\n *\n * @method SpineGameObject#onEvent\n * @fires SpinePluginEvents#EVENT\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n * @param {spine.Event} event - The Spine event.\n */\n onEvent: function (entry, event)\n {\n this.emit(SpineEvents.EVENT, entry, event);\n },\n\n /**\n * Internal event handler that emits the Spine onInterrupted event via this Game Object.\n *\n * @method SpineGameObject#onInterrupted\n * @fires SpinePluginEvents#INTERRUPTED\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n */\n onInterrupted: function (entry)\n {\n this.emit(SpineEvents.INTERRUPTED, entry);\n },\n\n /**\n * Internal event handler that emits the Spine onStart event via this Game Object.\n *\n * @method SpineGameObject#onStart\n * @fires SpinePluginEvents#START\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n */\n onStart: function (entry)\n {\n this.emit(SpineEvents.START, entry);\n },\n\n /**\n * Refreshes the data about the current Skeleton.\n *\n * This will reset the rotation, position and size of the Skeleton to match this Game Object.\n *\n * Call this method if you need to access the Skeleton data directly, and it may have changed\n * recently.\n *\n * @method SpineGameObject#refresh\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n refresh: function ()\n {\n if (this.root)\n {\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\n }\n\n this.updateSize();\n\n this.skeleton.updateCache();\n\n return this;\n },\n\n /**\n * Sets the size of this Game Object.\n *\n * If no arguments are given it uses the current skeleton data dimensions.\n *\n * You can use this method to set a fixed size of this Game Object, such as for input detection,\n * when the skeleton data doesn't match what is required in-game.\n *\n * @method SpineGameObject#setSize\n * @since 3.19.0\n *\n * @param {number} [width] - The width of the Skeleton. If not given it defaults to the Skeleton Data width.\n * @param {number} [height] - The height of the Skeleton. If not given it defaults to the Skeleton Data height.\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\n *\n * @return {this} This Game Object.\n */\n setSize: function (width, height, offsetX, offsetY)\n {\n var skeleton = this.skeleton;\n\n if (width === undefined) { width = skeleton.data.width; }\n if (height === undefined) { height = skeleton.data.height; }\n if (offsetX === undefined) { offsetX = 0; }\n if (offsetY === undefined) { offsetY = 0; }\n\n this.width = width;\n this.height = height;\n\n this.displayOriginX = skeleton.x - offsetX;\n this.displayOriginY = skeleton.y - offsetY;\n\n return this;\n },\n\n /**\n * Sets the offset of this Game Object from the Skeleton position.\n *\n * You can use this method to adjust how the position of this Game Object relates to the Skeleton it is using.\n *\n * @method SpineGameObject#setOffset\n * @since 3.19.0\n *\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\n *\n * @return {this} This Game Object.\n */\n setOffset: function (offsetX, offsetY)\n {\n var skeleton = this.skeleton;\n\n if (offsetX === undefined) { offsetX = 0; }\n if (offsetY === undefined) { offsetY = 0; }\n\n this.displayOriginX = skeleton.x - offsetX;\n this.displayOriginY = skeleton.y - offsetY;\n\n return this;\n },\n\n /**\n * Internal method that syncs all of the Game Object position and scale data to the Skeleton.\n * It then syncs the skeleton bounds back to this Game Object.\n *\n * This method is called automatically as needed internally, however, it's also exposed should\n * you require overriding the size settings.\n *\n * @method SpineGameObject#updateSize\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n updateSize: function ()\n {\n var skeleton = this.skeleton;\n var renderer = this.plugin.renderer;\n\n var height = renderer.height;\n\n var oldScaleX = this.scaleX;\n var oldScaleY = this.scaleY;\n\n skeleton.x = this.x;\n skeleton.y = height - this.y;\n skeleton.scaleX = 1;\n skeleton.scaleY = 1;\n\n skeleton.updateWorldTransform();\n\n var bounds = this.getBounds();\n\n this.width = bounds.size.x;\n this.height = bounds.size.y;\n\n this.displayOriginX = this.x - bounds.offset.x;\n this.displayOriginY = this.y - (height - (this.height + bounds.offset.y));\n\n skeleton.scaleX = oldScaleX;\n skeleton.scaleY = oldScaleY;\n\n skeleton.updateWorldTransform();\n\n return this;\n },\n\n /**\n * The horizontal scale of this Game Object, as applied to the Skeleton it is using.\n *\n * @name SpineGameObject#scaleX\n * @type {number}\n * @default 1\n * @since 3.19.0\n */\n scaleX: {\n\n get: function ()\n {\n return this._scaleX;\n },\n\n set: function (value)\n {\n this._scaleX = value;\n\n this.refresh();\n }\n\n },\n\n /**\n * The vertical scale of this Game Object, as applied to the Skeleton it is using.\n *\n * @name SpineGameObject#scaleY\n * @type {number}\n * @default 1\n * @since 3.19.0\n */\n scaleY: {\n\n get: function ()\n {\n return this._scaleY;\n },\n\n set: function (value)\n {\n this._scaleY = value;\n\n this.refresh();\n }\n\n },\n\n /**\n * Returns an array containing the names of all the bones in the Skeleton Data.\n *\n * @method SpineGameObject#getBoneList\n * @since 3.19.0\n *\n * @return {string[]} An array containing the names of all the bones in the Skeleton Data.\n */\n getBoneList: function ()\n {\n var output = [];\n\n var skeletonData = this.skeletonData;\n\n if (skeletonData)\n {\n for (var i = 0; i < skeletonData.bones.length; i++)\n {\n output.push(skeletonData.bones[i].name);\n }\n }\n\n return output;\n },\n\n /**\n * Returns an array containing the names of all the skins in the Skeleton Data.\n *\n * @method SpineGameObject#getSkinList\n * @since 3.19.0\n *\n * @return {string[]} An array containing the names of all the skins in the Skeleton Data.\n */\n getSkinList: function ()\n {\n var output = [];\n\n var skeletonData = this.skeletonData;\n\n if (skeletonData)\n {\n for (var i = 0; i < skeletonData.skins.length; i++)\n {\n output.push(skeletonData.skins[i].name);\n }\n }\n\n return output;\n },\n\n /**\n * Returns an array containing the names of all the slots in the Skeleton.\n *\n * @method SpineGameObject#getSlotList\n * @since 3.19.0\n *\n * @return {string[]} An array containing the names of all the slots in the Skeleton.\n */\n getSlotList: function ()\n {\n var output = [];\n\n var skeleton = this.skeleton;\n\n for (var i = 0; i < skeleton.slots.length; i++)\n {\n output.push(skeleton.slots[i].data.name);\n }\n\n return output;\n },\n\n /**\n * Returns an array containing the names of all the animations in the Skeleton Data.\n *\n * @method SpineGameObject#getAnimationList\n * @since 3.19.0\n *\n * @return {string[]} An array containing the names of all the animations in the Skeleton Data.\n */\n getAnimationList: function ()\n {\n var output = [];\n\n var skeletonData = this.skeletonData;\n\n if (skeletonData)\n {\n for (var i = 0; i < skeletonData.animations.length; i++)\n {\n output.push(skeletonData.animations[i].name);\n }\n }\n\n return output;\n },\n\n /**\n * Returns the current animation being played on the given track, if any.\n *\n * @method SpineGameObject#getCurrentAnimation\n * @since 3.19.0\n *\n * @param {integer} [trackIndex=0] - The track to return the current animation on.\n *\n * @return {?spine.Animation} The current Animation on the given track, or `undefined` if there is no current animation.\n */\n getCurrentAnimation: function (trackIndex)\n {\n if (trackIndex === undefined) { trackIndex = 0; }\n\n var current = this.state.getCurrent(trackIndex);\n\n if (current)\n {\n return current.animation;\n }\n },\n\n /**\n * Sets the current animation for a track, discarding any queued animations.\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\n *\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\n *\n * @method SpineGameObject#play\n * @fires SpinePluginEvents#START\n * @since 3.19.0\n *\n * @param {string} animationName - The string-based key of the animation to play.\n * @param {boolean} [loop=false] - Should the animation be looped when played?\n * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call.\n *\n * @return {this} This Game Object. If you need the TrackEntry, see `setAnimation` instead.\n */\n play: function (animationName, loop, ignoreIfPlaying)\n {\n this.setAnimation(0, animationName, loop, ignoreIfPlaying);\n\n return this;\n },\n\n /**\n * Sets the current animation for a track, discarding any queued animations.\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\n *\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\n *\n * @method SpineGameObject#setAnimation\n * @fires SpinePluginEvents#START\n * @since 3.19.0\n *\n * @param {integer} trackIndex - The track index to play the animation on.\n * @param {string} animationName - The string-based key of the animation to play.\n * @param {boolean} [loop=false] - Should the animation be looped when played?\n * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call.\n *\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\n */\n setAnimation: function (trackIndex, animationName, loop, ignoreIfPlaying)\n {\n if (loop === undefined) { loop = false; }\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\n\n if (ignoreIfPlaying && this.state)\n {\n var currentTrack = this.state.getCurrent(0);\n\n if (currentTrack && currentTrack.animation.name === animationName && !currentTrack.isComplete())\n {\n return;\n }\n }\n\n if (this.findAnimation(animationName))\n {\n return this.state.setAnimation(trackIndex, animationName, loop);\n }\n },\n\n /**\n * Adds an animation to be played after the current or last queued animation for a track.\n * If the track is empty, it is equivalent to calling setAnimation.\n *\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\n *\n * The delay is a float. If > 0, sets delay. If <= 0, the delay set is the duration of the previous\n * track entry minus any mix duration (from the AnimationStateData) plus the specified delay\n * (ie the mix ends at (delay = 0) or before (delay < 0) the previous track entry duration).\n * If the previous entry is looping, its next loop completion is used instead of its duration.\n *\n * @method SpineGameObject#addAnimation\n * @since 3.19.0\n *\n * @param {integer} trackIndex - The track index to add the animation to.\n * @param {string} animationName - The string-based key of the animation to add.\n * @param {boolean} [loop=false] - Should the animation be looped when played?\n * @param {integer} [delay=0] - A delay, in ms, before which this animation will start when played.\n *\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\n */\n addAnimation: function (trackIndex, animationName, loop, delay)\n {\n return this.state.addAnimation(trackIndex, animationName, loop, delay);\n },\n\n /**\n * Sets an empty animation for a track, discarding any queued animations, and sets the track\n * entry's mixDuration. An empty animation has no timelines and serves as a placeholder for mixing in or out.\n *\n * Mixing out is done by setting an empty animation with a mix duration using either setEmptyAnimation,\n * setEmptyAnimations, or addEmptyAnimation. Mixing to an empty animation causes the previous animation to be\n * applied less and less over the mix duration. Properties keyed in the previous animation transition to\n * the value from lower tracks or to the setup pose value if no lower tracks key the property.\n * A mix duration of 0 still mixes out over one frame.\n *\n * Mixing in is done by first setting an empty animation, then adding an animation using addAnimation\n * and on the returned track entry, set the mixDuration. Mixing from an empty animation causes the new\n * animation to be applied more and more over the mix duration. Properties keyed in the new animation\n * transition from the value from lower tracks or from the setup pose value if no lower tracks key the\n * property to the value keyed in the new animation.\n *\n * @method SpineGameObject#setEmptyAnimation\n * @since 3.19.0\n *\n * @param {integer} trackIndex - The track index to add the animation to.\n * @param {integer} [mixDuration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\n *\n * @return {spine.TrackEntry} The returned Track Entry.\n */\n setEmptyAnimation: function (trackIndex, mixDuration)\n {\n return this.state.setEmptyAnimation(trackIndex, mixDuration);\n },\n\n /**\n * Removes all animations from the track, leaving skeletons in their current pose.\n *\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\n * rather than leaving them in their current pose.\n *\n * @method SpineGameObject#clearTrack\n * @since 3.19.0\n *\n * @param {integer} trackIndex - The track index to add the animation to.\n *\n * @return {this} This Game Object.\n */\n clearTrack: function (trackIndex)\n {\n this.state.clearTrack(trackIndex);\n\n return this;\n },\n\n /**\n * Removes all animations from all tracks, leaving skeletons in their current pose.\n *\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\n * rather than leaving them in their current pose.\n *\n * @method SpineGameObject#clearTracks\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n clearTracks: function ()\n {\n this.state.clearTracks();\n\n return this;\n },\n\n /**\n * Sets the skin used to look up attachments before looking in the defaultSkin.\n *\n * Attachments from the new skin are attached if the corresponding attachment from the\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\n * attached from the new skin.\n *\n * After changing the skin, the visible attachments can be reset to those attached in the\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\n * or show attachments from the new skin.\n *\n * @method SpineGameObject#setSkinByName\n * @since 3.19.0\n *\n * @param {string} skinName - The name of the skin to set.\n *\n * @return {this} This Game Object.\n */\n setSkinByName: function (skinName)\n {\n var skeleton = this.skeleton;\n\n skeleton.setSkinByName(skinName);\n\n skeleton.setSlotsToSetupPose();\n\n this.state.apply(skeleton);\n\n return this;\n },\n\n /**\n * Sets the skin used to look up attachments before looking in the defaultSkin.\n *\n * Attachments from the new skin are attached if the corresponding attachment from the\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\n * attached from the new skin.\n *\n * After changing the skin, the visible attachments can be reset to those attached in the\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\n * or show attachments from the new skin.\n *\n * @method SpineGameObject#setSkin\n * @since 3.19.0\n *\n * @param {?spine.Skin} newSkin - The Skin to set. May be `null`.\n *\n * @return {this} This Game Object.\n */\n setSkin: function (newSkin)\n {\n var skeleton = this.skeleton;\n\n skeleton.setSkin(newSkin);\n\n skeleton.setSlotsToSetupPose();\n\n this.state.apply(skeleton);\n\n return this;\n },\n\n /**\n * Sets the mix duration when changing from the specified animation to the other.\n *\n * @method SpineGameObject#setMix\n * @since 3.19.0\n *\n * @param {string} fromName - The animation to mix from.\n * @param {string} toName - The animation to mix to.\n * @param {number} [duration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\n *\n * @return {this} This Game Object.\n */\n setMix: function (fromName, toName, duration)\n {\n this.stateData.setMix(fromName, toName, duration);\n\n return this;\n },\n\n /**\n * Finds an attachment by looking in the skin and defaultSkin using the slot\n * index and attachment name. First the skin is checked and if the attachment was not found,\n * the default skin is checked.\n *\n * @method SpineGameObject#getAttachment\n * @since 3.19.0\n *\n * @param {integer} slotIndex - The slot index to search.\n * @param {string} attachmentName - The attachment name to look for.\n *\n * @return {?spine.Attachment} The Attachment, if found. May be null.\n */\n getAttachment: function (slotIndex, attachmentName)\n {\n return this.skeleton.getAttachment(slotIndex, attachmentName);\n },\n\n /**\n * Finds an attachment by looking in the skin and defaultSkin using the slot name and attachment name.\n *\n * @method SpineGameObject#getAttachmentByName\n * @since 3.19.0\n *\n * @param {string} slotName - The slot name to search.\n * @param {string} attachmentName - The attachment name to look for.\n *\n * @return {?spine.Attachment} The Attachment, if found. May be null.\n */\n getAttachmentByName: function (slotName, attachmentName)\n {\n return this.skeleton.getAttachmentByName(slotName, attachmentName);\n },\n\n /**\n * A convenience method to set an attachment by finding the slot with findSlot,\n * finding the attachment with getAttachment, then setting the slot's attachment.\n *\n * @method SpineGameObject#setAttachment\n * @since 3.19.0\n *\n * @param {string} slotName - The slot name to add the attachment to.\n * @param {string} attachmentName - The attachment name to add.\n *\n * @return {this} This Game Object.\n */\n setAttachment: function (slotName, attachmentName)\n {\n if (Array.isArray(slotName) && Array.isArray(attachmentName) && slotName.length === attachmentName.length)\n {\n for (var i = 0; i < slotName.length; i++)\n {\n this.skeleton.setAttachment(slotName[i], attachmentName[i]);\n }\n }\n else\n {\n this.skeleton.setAttachment(slotName, attachmentName);\n }\n\n return this;\n },\n\n /**\n * Sets the bones, constraints, slots, and draw order to their setup pose values.\n *\n * @method SpineGameObject#setToSetupPose\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n setToSetupPose: function ()\n {\n this.skeleton.setToSetupPose();\n\n return this;\n },\n\n /**\n * Sets the slots and draw order to their setup pose values.\n *\n * @method SpineGameObject#setSlotsToSetupPose\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n setSlotsToSetupPose: function ()\n {\n this.skeleton.setSlotsToSetupPose();\n\n return this;\n },\n\n /**\n * Sets the bones and constraints to their setup pose values.\n *\n * @method SpineGameObject#setBonesToSetupPose\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n setBonesToSetupPose: function ()\n {\n this.skeleton.setBonesToSetupPose();\n\n return this;\n },\n\n /**\n * Gets the root bone, or null.\n *\n * @method SpineGameObject#getRootBone\n * @since 3.19.0\n *\n * @return {spine.Bone} The root bone, or null.\n */\n getRootBone: function ()\n {\n return this.skeleton.getRootBone();\n },\n\n /**\n * Takes a Bone object and a position in world space and rotates the Bone so it is angled\n * towards the given position. You can set an optional angle offset, should the bone be\n * designed at a specific angle already. You can also set a minimum and maximum range for the angle.\n *\n * @method SpineGameObject#angleBoneToXY\n * @since 3.19.0\n *\n * @param {spine.Bone} bone - The bone to rotate towards the world position.\n * @param {number} worldX - The world x coordinate to rotate the bone towards.\n * @param {number} worldY - The world y coordinate to rotate the bone towards.\n * @param {number} [offset=0] - An offset to add to the rotation angle.\n * @param {number} [minAngle=0] - The minimum range of the rotation angle.\n * @param {number} [maxAngle=360] - The maximum range of the rotation angle.\n *\n * @return {this} This Game Object.\n */\n angleBoneToXY: function (bone, worldX, worldY, offset, minAngle, maxAngle)\n {\n if (offset === undefined) { offset = 0; }\n if (minAngle === undefined) { minAngle = 0; }\n if (maxAngle === undefined) { maxAngle = 360; }\n\n var renderer = this.plugin.renderer;\n var height = renderer.height;\n\n var angle = CounterClockwise(AngleBetween(bone.worldX, height - bone.worldY, worldX, worldY) + DegToRad(offset));\n\n bone.rotation = Clamp(RadToDeg(angle), minAngle, maxAngle);\n\n return this;\n },\n\n /**\n * Finds a bone by comparing each bone's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findBone\n * @since 3.19.0\n *\n * @param {string} boneName - The name of the bone to find.\n *\n * @return {spine.Bone} The bone, or null.\n */\n findBone: function (boneName)\n {\n return this.skeleton.findBone(boneName);\n },\n\n /**\n * Finds the index of a bone by comparing each bone's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findBoneIndex\n * @since 3.19.0\n *\n * @param {string} boneName - The name of the bone to find.\n *\n * @return {integer} The bone index. Or -1 if the bone was not found.\n */\n findBoneIndex: function (boneName)\n {\n return this.skeleton.findBoneIndex(boneName);\n },\n\n /**\n * Finds a slot by comparing each slot's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findSlot\n * @since 3.19.0\n *\n * @param {string} slotName - The name of the slot to find.\n *\n * @return {spine.Slot} The Slot. May be null.\n */\n findSlot: function (slotName)\n {\n return this.skeleton.findSlot(slotName);\n },\n\n /**\n * Finds the index of a slot by comparing each slot's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findSlotIndex\n * @since 3.19.0\n *\n * @param {string} slotName - The name of the slot to find.\n *\n * @return {integer} The slot index. Or -1 if the Slot was not found.\n */\n findSlotIndex: function (slotName)\n {\n return this.skeleton.findSlotIndex(slotName);\n },\n\n /**\n * Finds a skin by comparing each skin's name. It is more efficient to cache the results of\n * this method than to call it multiple times.\n *\n * @method SpineGameObject#findSkin\n * @since 3.19.0\n *\n * @param {string} skinName - The name of the skin to find.\n *\n * @return {spine.Skin} The Skin. May be null.\n */\n findSkin: function (skinName)\n {\n return this.skeletonData.findSkin(skinName);\n },\n\n /**\n * Finds an event by comparing each events's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findEvent\n * @since 3.19.0\n *\n * @param {string} eventDataName - The name of the event to find.\n *\n * @return {spine.EventData} The Event Data. May be null.\n */\n findEvent: function (eventDataName)\n {\n return this.skeletonData.findEvent(eventDataName);\n },\n\n /**\n * Finds an animation by comparing each animation's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findAnimation\n * @since 3.19.0\n *\n * @param {string} animationName - The name of the animation to find.\n *\n * @return {spine.Animation} The Animation. May be null.\n */\n findAnimation: function (animationName)\n {\n return this.skeletonData.findAnimation(animationName);\n },\n\n /**\n * Finds an IK constraint by comparing each IK constraint's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findIkConstraint\n * @since 3.19.0\n *\n * @param {string} constraintName - The name of the constraint to find.\n *\n * @return {spine.IkConstraintData} The IK constraint. May be null.\n */\n findIkConstraint: function (constraintName)\n {\n return this.skeletonData.findIkConstraint(constraintName);\n },\n\n /**\n * Finds an transform constraint by comparing each transform constraint's name.\n * It is more efficient to cache the results of this method than to call it multiple times.\n *\n * @method SpineGameObject#findTransformConstraint\n * @since 3.19.0\n *\n * @param {string} constraintName - The name of the constraint to find.\n *\n * @return {spine.TransformConstraintData} The transform constraint. May be null.\n */\n findTransformConstraint: function (constraintName)\n {\n return this.skeletonData.findTransformConstraint(constraintName);\n },\n\n /**\n * Finds a path constraint by comparing each path constraint's name.\n * It is more efficient to cache the results of this method than to call it multiple times.\n *\n * @method SpineGameObject#findPathConstraint\n * @since 3.19.0\n *\n * @param {string} constraintName - The name of the constraint to find.\n *\n * @return {spine.PathConstraintData} The path constraint. May be null.\n */\n findPathConstraint: function (constraintName)\n {\n return this.skeletonData.findPathConstraint(constraintName);\n },\n\n /**\n * Finds the index of a path constraint by comparing each path constraint's name.\n * It is more efficient to cache the results of this method than to call it multiple times.\n *\n * @method SpineGameObject#findPathConstraintIndex\n * @since 3.19.0\n *\n * @param {string} constraintName - The name of the constraint to find.\n *\n * @return {integer} The constraint index. Or -1 if the constraint was not found.\n */\n findPathConstraintIndex: function (constraintName)\n {\n return this.skeletonData.findPathConstraintIndex(constraintName);\n },\n\n /**\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\n *\n * The returned object contains two properties: `offset` and `size`:\n *\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\n * `size` - The width and height of the AABB.\n *\n * @method SpineGameObject#getBounds\n * @since 3.19.0\n *\n * @return {any} The bounds object.\n */\n getBounds: function ()\n {\n return this.plugin.getBounds(this.skeleton);\n },\n\n /**\n * Internal update handler.\n *\n * @method SpineGameObject#preUpdate\n * @protected\n * @since 3.19.0\n *\n * @param {number} time - The current timestamp.\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\n */\n preUpdate: function (time, delta)\n {\n var skeleton = this.skeleton;\n\n this.state.update((delta / 1000) * this.timeScale);\n\n this.state.apply(skeleton);\n },\n\n /**\n * Internal destroy handler, called as part of the destroy process.\n *\n * @method SpineGameObject#preDestroy\n * @protected\n * @since 3.19.0\n */\n preDestroy: function ()\n {\n if (this.state)\n {\n this.state.clearListeners();\n this.state.clearListenerNotifications();\n }\n\n this.plugin = null;\n\n this.skeleton = null;\n this.skeletonData = null;\n\n this.state = null;\n this.stateData = null;\n }\n\n});\n\nmodule.exports = SpineGameObject;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar RadToDeg = require('../../../../src/math/RadToDeg');\nvar Wrap = require('../../../../src/math/Wrap');\n\n/**\n * Renders this Game Object with the Canvas Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method SpineGameObject#renderCanvas\n * @since 3.19.0\n * @private\n *\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar SpineGameObjectCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\n{\n var context = renderer.currentContext;\n\n var plugin = src.plugin;\n var skeleton = src.skeleton;\n var skeletonRenderer = plugin.skeletonRenderer;\n\n var GameObjectRenderMask = 15;\n\n var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)));\n\n if (!skeleton || !willRender)\n {\n return;\n }\n\n var camMatrix = renderer._tempMatrix1;\n var spriteMatrix = renderer._tempMatrix2;\n var calcMatrix = renderer._tempMatrix3;\n\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));\n\n camMatrix.copyFrom(camera.matrix);\n\n if (parentMatrix)\n {\n // Multiply the camera by the parent matrix\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\n\n // Undo the camera scroll\n spriteMatrix.e = src.x;\n spriteMatrix.f = src.y;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n }\n else\n {\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n }\n\n skeleton.x = calcMatrix.tx;\n skeleton.y = calcMatrix.ty;\n\n skeleton.scaleX = calcMatrix.scaleX;\n\n // Inverse or we get upside-down skeletons\n skeleton.scaleY = calcMatrix.scaleY * -1;\n\n if (src.scaleX < 0)\n {\n skeleton.scaleX *= -1;\n\n src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);\n }\n else\n {\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\n }\n\n if (src.scaleY < 0)\n {\n skeleton.scaleY *= -1;\n\n if (src.scaleX < 0)\n {\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n else\n {\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n }\n\n if (camera.renderToTexture)\n {\n skeleton.y = calcMatrix.ty;\n skeleton.scaleY *= -1;\n }\n\n // Add autoUpdate option\n skeleton.updateWorldTransform();\n\n skeletonRenderer.ctx = context;\n skeletonRenderer.debugRendering = (plugin.drawDebug || src.drawDebug);\n\n context.save();\n\n skeletonRenderer.draw(skeleton);\n\n context.restore();\n};\n\nmodule.exports = SpineGameObjectCanvasRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar renderWebGL = require('../../../../src/utils/NOOP');\nvar renderCanvas = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineGameObjectWebGLRenderer');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineGameObjectCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar RadToDeg = require('../../../../src/math/RadToDeg');\nvar Wrap = require('../../../../src/math/Wrap');\n\n/**\n * Renders this Game Object with the WebGL Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method SpineGameObject#renderWebGL\n * @since 3.19.0\n * @private\n *\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\n{\n var plugin = src.plugin;\n var skeleton = src.skeleton;\n var childAlpha = skeleton.color.a;\n var sceneRenderer = plugin.sceneRenderer;\n\n var GameObjectRenderMask = 15;\n\n var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || childAlpha === 0);\n\n if (!skeleton || !willRender)\n {\n // If there is already a batch running, we need to close it\n if (!renderer.nextTypeMatch)\n {\n // The next object in the display list is not a Spine object, so we end the batch\n sceneRenderer.end();\n\n if (!renderer.finalType)\n {\n // Reset the current type\n renderer.currentType = '';\n\n renderer.rebindPipeline(renderer.pipelines.MultiPipeline);\n }\n }\n\n return;\n }\n\n if (renderer.newType)\n {\n renderer.clearPipeline();\n }\n\n var camMatrix = renderer._tempMatrix1;\n var spriteMatrix = renderer._tempMatrix2;\n var calcMatrix = renderer._tempMatrix3;\n\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));\n\n camMatrix.copyFrom(camera.matrix);\n\n if (parentMatrix)\n {\n // Multiply the camera by the parent matrix\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\n\n // Undo the camera scroll\n spriteMatrix.e = src.x;\n spriteMatrix.f = src.y;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n }\n else\n {\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n }\n\n var viewportHeight = renderer.height;\n\n skeleton.x = calcMatrix.tx;\n skeleton.y = viewportHeight - calcMatrix.ty;\n\n skeleton.scaleX = calcMatrix.scaleX;\n skeleton.scaleY = calcMatrix.scaleY;\n\n if (src.scaleX < 0)\n {\n skeleton.scaleX *= -1;\n\n src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);\n }\n else\n {\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\n }\n\n if (src.scaleY < 0)\n {\n skeleton.scaleY *= -1;\n\n if (src.scaleX < 0)\n {\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n else\n {\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n }\n\n if (camera.renderToTexture || renderer.currentFramebuffer !== null)\n {\n skeleton.y = calcMatrix.ty;\n skeleton.scaleY *= -1;\n }\n\n // Add autoUpdate option\n skeleton.updateWorldTransform();\n\n if (renderer.newType)\n {\n sceneRenderer.begin();\n }\n\n // Draw the current skeleton\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\n\n if (plugin.drawDebug || src.drawDebug)\n {\n // Because if we don't, the bones render positions are completely wrong (*sigh*)\n var oldX = skeleton.x;\n var oldY = skeleton.y;\n\n skeleton.x = 0;\n skeleton.y = 0;\n\n sceneRenderer.drawSkeletonDebug(skeleton, src.preMultipliedAlpha);\n\n skeleton.x = oldX;\n skeleton.y = oldY;\n }\n\n if (!renderer.nextTypeMatch)\n {\n // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch.\n sceneRenderer.end();\n\n if (!renderer.finalType)\n {\n renderer.rebindPipeline(renderer.pipelines.MultiPipeline);\n }\n }\n};\n\nmodule.exports = SpineGameObjectWebGLRenderer;\n","/*** IMPORTS FROM imports-loader ***/\n\n(function() {\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar spine;\r\n(function (spine) {\r\n var Animation = (function () {\r\n function Animation(name, timelines, duration) {\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n if (timelines == null)\r\n throw new Error(\"timelines cannot be null.\");\r\n this.name = name;\r\n this.timelines = timelines;\r\n this.timelineIds = [];\r\n for (var i = 0; i < timelines.length; i++)\r\n this.timelineIds[timelines[i].getPropertyId()] = true;\r\n this.duration = duration;\r\n }\r\n Animation.prototype.hasTimeline = function (id) {\r\n return this.timelineIds[id] == true;\r\n };\r\n Animation.prototype.apply = function (skeleton, lastTime, time, loop, events, alpha, blend, direction) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n if (loop && this.duration != 0) {\r\n time %= this.duration;\r\n if (lastTime > 0)\r\n lastTime %= this.duration;\r\n }\r\n var timelines = this.timelines;\r\n for (var i = 0, n = timelines.length; i < n; i++)\r\n timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\r\n };\r\n Animation.binarySearch = function (values, target, step) {\r\n if (step === void 0) { step = 1; }\r\n var low = 0;\r\n var high = values.length / step - 2;\r\n if (high == 0)\r\n return step;\r\n var current = high >>> 1;\r\n while (true) {\r\n if (values[(current + 1) * step] <= target)\r\n low = current + 1;\r\n else\r\n high = current;\r\n if (low == high)\r\n return (low + 1) * step;\r\n current = (low + high) >>> 1;\r\n }\r\n };\r\n Animation.linearSearch = function (values, target, step) {\r\n for (var i = 0, last = values.length - step; i <= last; i += step)\r\n if (values[i] > target)\r\n return i;\r\n return -1;\r\n };\r\n return Animation;\r\n }());\r\n spine.Animation = Animation;\r\n var MixBlend;\r\n (function (MixBlend) {\r\n MixBlend[MixBlend[\"setup\"] = 0] = \"setup\";\r\n MixBlend[MixBlend[\"first\"] = 1] = \"first\";\r\n MixBlend[MixBlend[\"replace\"] = 2] = \"replace\";\r\n MixBlend[MixBlend[\"add\"] = 3] = \"add\";\r\n })(MixBlend = spine.MixBlend || (spine.MixBlend = {}));\r\n var MixDirection;\r\n (function (MixDirection) {\r\n MixDirection[MixDirection[\"mixIn\"] = 0] = \"mixIn\";\r\n MixDirection[MixDirection[\"mixOut\"] = 1] = \"mixOut\";\r\n })(MixDirection = spine.MixDirection || (spine.MixDirection = {}));\r\n var TimelineType;\r\n (function (TimelineType) {\r\n TimelineType[TimelineType[\"rotate\"] = 0] = \"rotate\";\r\n TimelineType[TimelineType[\"translate\"] = 1] = \"translate\";\r\n TimelineType[TimelineType[\"scale\"] = 2] = \"scale\";\r\n TimelineType[TimelineType[\"shear\"] = 3] = \"shear\";\r\n TimelineType[TimelineType[\"attachment\"] = 4] = \"attachment\";\r\n TimelineType[TimelineType[\"color\"] = 5] = \"color\";\r\n TimelineType[TimelineType[\"deform\"] = 6] = \"deform\";\r\n TimelineType[TimelineType[\"event\"] = 7] = \"event\";\r\n TimelineType[TimelineType[\"drawOrder\"] = 8] = \"drawOrder\";\r\n TimelineType[TimelineType[\"ikConstraint\"] = 9] = \"ikConstraint\";\r\n TimelineType[TimelineType[\"transformConstraint\"] = 10] = \"transformConstraint\";\r\n TimelineType[TimelineType[\"pathConstraintPosition\"] = 11] = \"pathConstraintPosition\";\r\n TimelineType[TimelineType[\"pathConstraintSpacing\"] = 12] = \"pathConstraintSpacing\";\r\n TimelineType[TimelineType[\"pathConstraintMix\"] = 13] = \"pathConstraintMix\";\r\n TimelineType[TimelineType[\"twoColor\"] = 14] = \"twoColor\";\r\n })(TimelineType = spine.TimelineType || (spine.TimelineType = {}));\r\n var CurveTimeline = (function () {\r\n function CurveTimeline(frameCount) {\r\n if (frameCount <= 0)\r\n throw new Error(\"frameCount must be > 0: \" + frameCount);\r\n this.curves = spine.Utils.newFloatArray((frameCount - 1) * CurveTimeline.BEZIER_SIZE);\r\n }\r\n CurveTimeline.prototype.getFrameCount = function () {\r\n return this.curves.length / CurveTimeline.BEZIER_SIZE + 1;\r\n };\r\n CurveTimeline.prototype.setLinear = function (frameIndex) {\r\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.LINEAR;\r\n };\r\n CurveTimeline.prototype.setStepped = function (frameIndex) {\r\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.STEPPED;\r\n };\r\n CurveTimeline.prototype.getCurveType = function (frameIndex) {\r\n var index = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n if (index == this.curves.length)\r\n return CurveTimeline.LINEAR;\r\n var type = this.curves[index];\r\n if (type == CurveTimeline.LINEAR)\r\n return CurveTimeline.LINEAR;\r\n if (type == CurveTimeline.STEPPED)\r\n return CurveTimeline.STEPPED;\r\n return CurveTimeline.BEZIER;\r\n };\r\n CurveTimeline.prototype.setCurve = function (frameIndex, cx1, cy1, cx2, cy2) {\r\n var tmpx = (-cx1 * 2 + cx2) * 0.03, tmpy = (-cy1 * 2 + cy2) * 0.03;\r\n var dddfx = ((cx1 - cx2) * 3 + 1) * 0.006, dddfy = ((cy1 - cy2) * 3 + 1) * 0.006;\r\n var ddfx = tmpx * 2 + dddfx, ddfy = tmpy * 2 + dddfy;\r\n var dfx = cx1 * 0.3 + tmpx + dddfx * 0.16666667, dfy = cy1 * 0.3 + tmpy + dddfy * 0.16666667;\r\n var i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n var curves = this.curves;\r\n curves[i++] = CurveTimeline.BEZIER;\r\n var x = dfx, y = dfy;\r\n for (var n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n curves[i] = x;\r\n curves[i + 1] = y;\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n x += dfx;\r\n y += dfy;\r\n }\r\n };\r\n CurveTimeline.prototype.getCurvePercent = function (frameIndex, percent) {\r\n percent = spine.MathUtils.clamp(percent, 0, 1);\r\n var curves = this.curves;\r\n var i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n var type = curves[i];\r\n if (type == CurveTimeline.LINEAR)\r\n return percent;\r\n if (type == CurveTimeline.STEPPED)\r\n return 0;\r\n i++;\r\n var x = 0;\r\n for (var start = i, n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n x = curves[i];\r\n if (x >= percent) {\r\n var prevX = void 0, prevY = void 0;\r\n if (i == start) {\r\n prevX = 0;\r\n prevY = 0;\r\n }\r\n else {\r\n prevX = curves[i - 2];\r\n prevY = curves[i - 1];\r\n }\r\n return prevY + (curves[i + 1] - prevY) * (percent - prevX) / (x - prevX);\r\n }\r\n }\r\n var y = curves[i - 1];\r\n return y + (1 - y) * (percent - x) / (1 - x);\r\n };\r\n CurveTimeline.LINEAR = 0;\r\n CurveTimeline.STEPPED = 1;\r\n CurveTimeline.BEZIER = 2;\r\n CurveTimeline.BEZIER_SIZE = 10 * 2 - 1;\r\n return CurveTimeline;\r\n }());\r\n spine.CurveTimeline = CurveTimeline;\r\n var RotateTimeline = (function (_super) {\r\n __extends(RotateTimeline, _super);\r\n function RotateTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount << 1);\r\n return _this;\r\n }\r\n RotateTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.rotate << 24) + this.boneIndex;\r\n };\r\n RotateTimeline.prototype.setFrame = function (frameIndex, time, degrees) {\r\n frameIndex <<= 1;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + RotateTimeline.ROTATION] = degrees;\r\n };\r\n RotateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation;\r\n return;\r\n case MixBlend.first:\r\n var r_1 = bone.data.rotation - bone.rotation;\r\n bone.rotation += (r_1 - (16384 - ((16384.499999999996 - r_1 / 360) | 0)) * 360) * alpha;\r\n }\r\n return;\r\n }\r\n if (time >= frames[frames.length - RotateTimeline.ENTRIES]) {\r\n var r_2 = frames[frames.length + RotateTimeline.PREV_ROTATION];\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation + r_2 * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n r_2 += bone.data.rotation - bone.rotation;\r\n r_2 -= (16384 - ((16384.499999999996 - r_2 / 360) | 0)) * 360;\r\n case MixBlend.add:\r\n bone.rotation += r_2 * alpha;\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time, RotateTimeline.ENTRIES);\r\n var prevRotation = frames[frame + RotateTimeline.PREV_ROTATION];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime));\r\n var r = frames[frame + RotateTimeline.ROTATION] - prevRotation;\r\n r = prevRotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * percent;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n r += bone.data.rotation - bone.rotation;\r\n case MixBlend.add:\r\n bone.rotation += (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n }\r\n };\r\n RotateTimeline.ENTRIES = 2;\r\n RotateTimeline.PREV_TIME = -2;\r\n RotateTimeline.PREV_ROTATION = -1;\r\n RotateTimeline.ROTATION = 1;\r\n return RotateTimeline;\r\n }(CurveTimeline));\r\n spine.RotateTimeline = RotateTimeline;\r\n var TranslateTimeline = (function (_super) {\r\n __extends(TranslateTimeline, _super);\r\n function TranslateTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TranslateTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.translate << 24) + this.boneIndex;\r\n };\r\n TranslateTimeline.prototype.setFrame = function (frameIndex, time, x, y) {\r\n frameIndex *= TranslateTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TranslateTimeline.X] = x;\r\n this.frames[frameIndex + TranslateTimeline.Y] = y;\r\n };\r\n TranslateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.x = bone.data.x;\r\n bone.y = bone.data.y;\r\n return;\r\n case MixBlend.first:\r\n bone.x += (bone.data.x - bone.x) * alpha;\r\n bone.y += (bone.data.y - bone.y) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - TranslateTimeline.ENTRIES]) {\r\n x = frames[frames.length + TranslateTimeline.PREV_X];\r\n y = frames[frames.length + TranslateTimeline.PREV_Y];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TranslateTimeline.ENTRIES);\r\n x = frames[frame + TranslateTimeline.PREV_X];\r\n y = frames[frame + TranslateTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TranslateTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TranslateTimeline.PREV_TIME] - frameTime));\r\n x += (frames[frame + TranslateTimeline.X] - x) * percent;\r\n y += (frames[frame + TranslateTimeline.Y] - y) * percent;\r\n }\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.x = bone.data.x + x * alpha;\r\n bone.y = bone.data.y + y * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bone.x += (bone.data.x + x - bone.x) * alpha;\r\n bone.y += (bone.data.y + y - bone.y) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bone.x += x * alpha;\r\n bone.y += y * alpha;\r\n }\r\n };\r\n TranslateTimeline.ENTRIES = 3;\r\n TranslateTimeline.PREV_TIME = -3;\r\n TranslateTimeline.PREV_X = -2;\r\n TranslateTimeline.PREV_Y = -1;\r\n TranslateTimeline.X = 1;\r\n TranslateTimeline.Y = 2;\r\n return TranslateTimeline;\r\n }(CurveTimeline));\r\n spine.TranslateTimeline = TranslateTimeline;\r\n var ScaleTimeline = (function (_super) {\r\n __extends(ScaleTimeline, _super);\r\n function ScaleTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n ScaleTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.scale << 24) + this.boneIndex;\r\n };\r\n ScaleTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.scaleX = bone.data.scaleX;\r\n bone.scaleY = bone.data.scaleY;\r\n return;\r\n case MixBlend.first:\r\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\r\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - ScaleTimeline.ENTRIES]) {\r\n x = frames[frames.length + ScaleTimeline.PREV_X] * bone.data.scaleX;\r\n y = frames[frames.length + ScaleTimeline.PREV_Y] * bone.data.scaleY;\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ScaleTimeline.ENTRIES);\r\n x = frames[frame + ScaleTimeline.PREV_X];\r\n y = frames[frame + ScaleTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ScaleTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ScaleTimeline.PREV_TIME] - frameTime));\r\n x = (x + (frames[frame + ScaleTimeline.X] - x) * percent) * bone.data.scaleX;\r\n y = (y + (frames[frame + ScaleTimeline.Y] - y) * percent) * bone.data.scaleY;\r\n }\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n bone.scaleX += x - bone.data.scaleX;\r\n bone.scaleY += y - bone.data.scaleY;\r\n }\r\n else {\r\n bone.scaleX = x;\r\n bone.scaleY = y;\r\n }\r\n }\r\n else {\r\n var bx = 0, by = 0;\r\n if (direction == MixDirection.mixOut) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bx = bone.data.scaleX;\r\n by = bone.data.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bx = bone.scaleX;\r\n by = bone.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bx = bone.scaleX;\r\n by = bone.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bone.data.scaleX) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - bone.data.scaleY) * alpha;\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bx = Math.abs(bone.data.scaleX) * spine.MathUtils.signum(x);\r\n by = Math.abs(bone.data.scaleY) * spine.MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bx = Math.abs(bone.scaleX) * spine.MathUtils.signum(x);\r\n by = Math.abs(bone.scaleY) * spine.MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bx = spine.MathUtils.signum(x);\r\n by = spine.MathUtils.signum(y);\r\n bone.scaleX = Math.abs(bone.scaleX) * bx + (x - Math.abs(bone.data.scaleX) * bx) * alpha;\r\n bone.scaleY = Math.abs(bone.scaleY) * by + (y - Math.abs(bone.data.scaleY) * by) * alpha;\r\n }\r\n }\r\n }\r\n };\r\n return ScaleTimeline;\r\n }(TranslateTimeline));\r\n spine.ScaleTimeline = ScaleTimeline;\r\n var ShearTimeline = (function (_super) {\r\n __extends(ShearTimeline, _super);\r\n function ShearTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n ShearTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.shear << 24) + this.boneIndex;\r\n };\r\n ShearTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.shearX = bone.data.shearX;\r\n bone.shearY = bone.data.shearY;\r\n return;\r\n case MixBlend.first:\r\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - ShearTimeline.ENTRIES]) {\r\n x = frames[frames.length + ShearTimeline.PREV_X];\r\n y = frames[frames.length + ShearTimeline.PREV_Y];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ShearTimeline.ENTRIES);\r\n x = frames[frame + ShearTimeline.PREV_X];\r\n y = frames[frame + ShearTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ShearTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ShearTimeline.PREV_TIME] - frameTime));\r\n x = x + (frames[frame + ShearTimeline.X] - x) * percent;\r\n y = y + (frames[frame + ShearTimeline.Y] - y) * percent;\r\n }\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.shearX = bone.data.shearX + x * alpha;\r\n bone.shearY = bone.data.shearY + y * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bone.shearX += x * alpha;\r\n bone.shearY += y * alpha;\r\n }\r\n };\r\n return ShearTimeline;\r\n }(TranslateTimeline));\r\n spine.ShearTimeline = ShearTimeline;\r\n var ColorTimeline = (function (_super) {\r\n __extends(ColorTimeline, _super);\r\n function ColorTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES);\r\n return _this;\r\n }\r\n ColorTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.color << 24) + this.slotIndex;\r\n };\r\n ColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a) {\r\n frameIndex *= ColorTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + ColorTimeline.R] = r;\r\n this.frames[frameIndex + ColorTimeline.G] = g;\r\n this.frames[frameIndex + ColorTimeline.B] = b;\r\n this.frames[frameIndex + ColorTimeline.A] = a;\r\n };\r\n ColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n slot.color.setFromColor(slot.data.color);\r\n return;\r\n case MixBlend.first:\r\n var color = slot.color, setup = slot.data.color;\r\n color.add((setup.r - color.r) * alpha, (setup.g - color.g) * alpha, (setup.b - color.b) * alpha, (setup.a - color.a) * alpha);\r\n }\r\n return;\r\n }\r\n var r = 0, g = 0, b = 0, a = 0;\r\n if (time >= frames[frames.length - ColorTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n r = frames[i + ColorTimeline.PREV_R];\r\n g = frames[i + ColorTimeline.PREV_G];\r\n b = frames[i + ColorTimeline.PREV_B];\r\n a = frames[i + ColorTimeline.PREV_A];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ColorTimeline.ENTRIES);\r\n r = frames[frame + ColorTimeline.PREV_R];\r\n g = frames[frame + ColorTimeline.PREV_G];\r\n b = frames[frame + ColorTimeline.PREV_B];\r\n a = frames[frame + ColorTimeline.PREV_A];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ColorTimeline.PREV_TIME] - frameTime));\r\n r += (frames[frame + ColorTimeline.R] - r) * percent;\r\n g += (frames[frame + ColorTimeline.G] - g) * percent;\r\n b += (frames[frame + ColorTimeline.B] - b) * percent;\r\n a += (frames[frame + ColorTimeline.A] - a) * percent;\r\n }\r\n if (alpha == 1)\r\n slot.color.set(r, g, b, a);\r\n else {\r\n var color = slot.color;\r\n if (blend == MixBlend.setup)\r\n color.setFromColor(slot.data.color);\r\n color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);\r\n }\r\n };\r\n ColorTimeline.ENTRIES = 5;\r\n ColorTimeline.PREV_TIME = -5;\r\n ColorTimeline.PREV_R = -4;\r\n ColorTimeline.PREV_G = -3;\r\n ColorTimeline.PREV_B = -2;\r\n ColorTimeline.PREV_A = -1;\r\n ColorTimeline.R = 1;\r\n ColorTimeline.G = 2;\r\n ColorTimeline.B = 3;\r\n ColorTimeline.A = 4;\r\n return ColorTimeline;\r\n }(CurveTimeline));\r\n spine.ColorTimeline = ColorTimeline;\r\n var TwoColorTimeline = (function (_super) {\r\n __extends(TwoColorTimeline, _super);\r\n function TwoColorTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TwoColorTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TwoColorTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.twoColor << 24) + this.slotIndex;\r\n };\r\n TwoColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a, r2, g2, b2) {\r\n frameIndex *= TwoColorTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TwoColorTimeline.R] = r;\r\n this.frames[frameIndex + TwoColorTimeline.G] = g;\r\n this.frames[frameIndex + TwoColorTimeline.B] = b;\r\n this.frames[frameIndex + TwoColorTimeline.A] = a;\r\n this.frames[frameIndex + TwoColorTimeline.R2] = r2;\r\n this.frames[frameIndex + TwoColorTimeline.G2] = g2;\r\n this.frames[frameIndex + TwoColorTimeline.B2] = b2;\r\n };\r\n TwoColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n slot.color.setFromColor(slot.data.color);\r\n slot.darkColor.setFromColor(slot.data.darkColor);\r\n return;\r\n case MixBlend.first:\r\n var light = slot.color, dark = slot.darkColor, setupLight = slot.data.color, setupDark = slot.data.darkColor;\r\n light.add((setupLight.r - light.r) * alpha, (setupLight.g - light.g) * alpha, (setupLight.b - light.b) * alpha, (setupLight.a - light.a) * alpha);\r\n dark.add((setupDark.r - dark.r) * alpha, (setupDark.g - dark.g) * alpha, (setupDark.b - dark.b) * alpha, 0);\r\n }\r\n return;\r\n }\r\n var r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\r\n if (time >= frames[frames.length - TwoColorTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n r = frames[i + TwoColorTimeline.PREV_R];\r\n g = frames[i + TwoColorTimeline.PREV_G];\r\n b = frames[i + TwoColorTimeline.PREV_B];\r\n a = frames[i + TwoColorTimeline.PREV_A];\r\n r2 = frames[i + TwoColorTimeline.PREV_R2];\r\n g2 = frames[i + TwoColorTimeline.PREV_G2];\r\n b2 = frames[i + TwoColorTimeline.PREV_B2];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TwoColorTimeline.ENTRIES);\r\n r = frames[frame + TwoColorTimeline.PREV_R];\r\n g = frames[frame + TwoColorTimeline.PREV_G];\r\n b = frames[frame + TwoColorTimeline.PREV_B];\r\n a = frames[frame + TwoColorTimeline.PREV_A];\r\n r2 = frames[frame + TwoColorTimeline.PREV_R2];\r\n g2 = frames[frame + TwoColorTimeline.PREV_G2];\r\n b2 = frames[frame + TwoColorTimeline.PREV_B2];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TwoColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TwoColorTimeline.PREV_TIME] - frameTime));\r\n r += (frames[frame + TwoColorTimeline.R] - r) * percent;\r\n g += (frames[frame + TwoColorTimeline.G] - g) * percent;\r\n b += (frames[frame + TwoColorTimeline.B] - b) * percent;\r\n a += (frames[frame + TwoColorTimeline.A] - a) * percent;\r\n r2 += (frames[frame + TwoColorTimeline.R2] - r2) * percent;\r\n g2 += (frames[frame + TwoColorTimeline.G2] - g2) * percent;\r\n b2 += (frames[frame + TwoColorTimeline.B2] - b2) * percent;\r\n }\r\n if (alpha == 1) {\r\n slot.color.set(r, g, b, a);\r\n slot.darkColor.set(r2, g2, b2, 1);\r\n }\r\n else {\r\n var light = slot.color, dark = slot.darkColor;\r\n if (blend == MixBlend.setup) {\r\n light.setFromColor(slot.data.color);\r\n dark.setFromColor(slot.data.darkColor);\r\n }\r\n light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\r\n dark.add((r2 - dark.r) * alpha, (g2 - dark.g) * alpha, (b2 - dark.b) * alpha, 0);\r\n }\r\n };\r\n TwoColorTimeline.ENTRIES = 8;\r\n TwoColorTimeline.PREV_TIME = -8;\r\n TwoColorTimeline.PREV_R = -7;\r\n TwoColorTimeline.PREV_G = -6;\r\n TwoColorTimeline.PREV_B = -5;\r\n TwoColorTimeline.PREV_A = -4;\r\n TwoColorTimeline.PREV_R2 = -3;\r\n TwoColorTimeline.PREV_G2 = -2;\r\n TwoColorTimeline.PREV_B2 = -1;\r\n TwoColorTimeline.R = 1;\r\n TwoColorTimeline.G = 2;\r\n TwoColorTimeline.B = 3;\r\n TwoColorTimeline.A = 4;\r\n TwoColorTimeline.R2 = 5;\r\n TwoColorTimeline.G2 = 6;\r\n TwoColorTimeline.B2 = 7;\r\n return TwoColorTimeline;\r\n }(CurveTimeline));\r\n spine.TwoColorTimeline = TwoColorTimeline;\r\n var AttachmentTimeline = (function () {\r\n function AttachmentTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.attachmentNames = new Array(frameCount);\r\n }\r\n AttachmentTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.attachment << 24) + this.slotIndex;\r\n };\r\n AttachmentTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n AttachmentTimeline.prototype.setFrame = function (frameIndex, time, attachmentName) {\r\n this.frames[frameIndex] = time;\r\n this.attachmentNames[frameIndex] = attachmentName;\r\n };\r\n AttachmentTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n if (direction == MixDirection.mixOut) {\r\n if (blend == MixBlend.setup)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n return;\r\n }\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n if (blend == MixBlend.setup || blend == MixBlend.first)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n return;\r\n }\r\n var frameIndex = 0;\r\n if (time >= frames[frames.length - 1])\r\n frameIndex = frames.length - 1;\r\n else\r\n frameIndex = Animation.binarySearch(frames, time, 1) - 1;\r\n var attachmentName = this.attachmentNames[frameIndex];\r\n skeleton.slots[this.slotIndex]\r\n .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\r\n };\r\n AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) {\r\n slot.attachment = attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName);\r\n };\r\n return AttachmentTimeline;\r\n }());\r\n spine.AttachmentTimeline = AttachmentTimeline;\r\n var zeros = null;\r\n var DeformTimeline = (function (_super) {\r\n __extends(DeformTimeline, _super);\r\n function DeformTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount);\r\n _this.frameVertices = new Array(frameCount);\r\n if (zeros == null)\r\n zeros = spine.Utils.newFloatArray(64);\r\n return _this;\r\n }\r\n DeformTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.deform << 27) + +this.attachment.id + this.slotIndex;\r\n };\r\n DeformTimeline.prototype.setFrame = function (frameIndex, time, vertices) {\r\n this.frames[frameIndex] = time;\r\n this.frameVertices[frameIndex] = vertices;\r\n };\r\n DeformTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var slotAttachment = slot.getAttachment();\r\n if (!(slotAttachment instanceof spine.VertexAttachment) || !(slotAttachment.deformAttachment == this.attachment))\r\n return;\r\n var deformArray = slot.deform;\r\n if (deformArray.length == 0)\r\n blend = MixBlend.setup;\r\n var frameVertices = this.frameVertices;\r\n var vertexCount = frameVertices[0].length;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n var vertexAttachment = slotAttachment;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n deformArray.length = 0;\r\n return;\r\n case MixBlend.first:\r\n if (alpha == 1) {\r\n deformArray.length = 0;\r\n break;\r\n }\r\n var deform_1 = spine.Utils.setArraySize(deformArray, vertexCount);\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform_1[i] += (setupVertices[i] - deform_1[i]) * alpha;\r\n }\r\n else {\r\n alpha = 1 - alpha;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform_1[i] *= alpha;\r\n }\r\n }\r\n return;\r\n }\r\n var deform = spine.Utils.setArraySize(deformArray, vertexCount);\r\n if (time >= frames[frames.length - 1]) {\r\n var lastVertices = frameVertices[frames.length - 1];\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_1 = 0; i_1 < vertexCount; i_1++) {\r\n deform[i_1] += lastVertices[i_1] - setupVertices[i_1];\r\n }\r\n }\r\n else {\r\n for (var i_2 = 0; i_2 < vertexCount; i_2++)\r\n deform[i_2] += lastVertices[i_2];\r\n }\r\n }\r\n else {\r\n spine.Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup: {\r\n var vertexAttachment_1 = slotAttachment;\r\n if (vertexAttachment_1.bones == null) {\r\n var setupVertices = vertexAttachment_1.vertices;\r\n for (var i_3 = 0; i_3 < vertexCount; i_3++) {\r\n var setup = setupVertices[i_3];\r\n deform[i_3] = setup + (lastVertices[i_3] - setup) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_4 = 0; i_4 < vertexCount; i_4++)\r\n deform[i_4] = lastVertices[i_4] * alpha;\r\n }\r\n break;\r\n }\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n for (var i_5 = 0; i_5 < vertexCount; i_5++)\r\n deform[i_5] += (lastVertices[i_5] - deform[i_5]) * alpha;\r\n break;\r\n case MixBlend.add:\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_6 = 0; i_6 < vertexCount; i_6++) {\r\n deform[i_6] += (lastVertices[i_6] - setupVertices[i_6]) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_7 = 0; i_7 < vertexCount; i_7++)\r\n deform[i_7] += lastVertices[i_7] * alpha;\r\n }\r\n }\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time);\r\n var prevVertices = frameVertices[frame - 1];\r\n var nextVertices = frameVertices[frame];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame - 1, 1 - (time - frameTime) / (frames[frame - 1] - frameTime));\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_8 = 0; i_8 < vertexCount; i_8++) {\r\n var prev = prevVertices[i_8];\r\n deform[i_8] += prev + (nextVertices[i_8] - prev) * percent - setupVertices[i_8];\r\n }\r\n }\r\n else {\r\n for (var i_9 = 0; i_9 < vertexCount; i_9++) {\r\n var prev = prevVertices[i_9];\r\n deform[i_9] += prev + (nextVertices[i_9] - prev) * percent;\r\n }\r\n }\r\n }\r\n else {\r\n for (var i_10 = 0; i_10 < vertexCount; i_10++) {\r\n var prev = prevVertices[i_10];\r\n deform[i_10] = prev + (nextVertices[i_10] - prev) * percent;\r\n }\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup: {\r\n var vertexAttachment_2 = slotAttachment;\r\n if (vertexAttachment_2.bones == null) {\r\n var setupVertices = vertexAttachment_2.vertices;\r\n for (var i_11 = 0; i_11 < vertexCount; i_11++) {\r\n var prev = prevVertices[i_11], setup = setupVertices[i_11];\r\n deform[i_11] = setup + (prev + (nextVertices[i_11] - prev) * percent - setup) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_12 = 0; i_12 < vertexCount; i_12++) {\r\n var prev = prevVertices[i_12];\r\n deform[i_12] = (prev + (nextVertices[i_12] - prev) * percent) * alpha;\r\n }\r\n }\r\n break;\r\n }\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n for (var i_13 = 0; i_13 < vertexCount; i_13++) {\r\n var prev = prevVertices[i_13];\r\n deform[i_13] += (prev + (nextVertices[i_13] - prev) * percent - deform[i_13]) * alpha;\r\n }\r\n break;\r\n case MixBlend.add:\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_14 = 0; i_14 < vertexCount; i_14++) {\r\n var prev = prevVertices[i_14];\r\n deform[i_14] += (prev + (nextVertices[i_14] - prev) * percent - setupVertices[i_14]) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_15 = 0; i_15 < vertexCount; i_15++) {\r\n var prev = prevVertices[i_15];\r\n deform[i_15] += (prev + (nextVertices[i_15] - prev) * percent) * alpha;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n return DeformTimeline;\r\n }(CurveTimeline));\r\n spine.DeformTimeline = DeformTimeline;\r\n var EventTimeline = (function () {\r\n function EventTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.events = new Array(frameCount);\r\n }\r\n EventTimeline.prototype.getPropertyId = function () {\r\n return TimelineType.event << 24;\r\n };\r\n EventTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n EventTimeline.prototype.setFrame = function (frameIndex, event) {\r\n this.frames[frameIndex] = event.time;\r\n this.events[frameIndex] = event;\r\n };\r\n EventTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n if (firedEvents == null)\r\n return;\r\n var frames = this.frames;\r\n var frameCount = this.frames.length;\r\n if (lastTime > time) {\r\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\r\n lastTime = -1;\r\n }\r\n else if (lastTime >= frames[frameCount - 1])\r\n return;\r\n if (time < frames[0])\r\n return;\r\n var frame = 0;\r\n if (lastTime < frames[0])\r\n frame = 0;\r\n else {\r\n frame = Animation.binarySearch(frames, lastTime);\r\n var frameTime = frames[frame];\r\n while (frame > 0) {\r\n if (frames[frame - 1] != frameTime)\r\n break;\r\n frame--;\r\n }\r\n }\r\n for (; frame < frameCount && time >= frames[frame]; frame++)\r\n firedEvents.push(this.events[frame]);\r\n };\r\n return EventTimeline;\r\n }());\r\n spine.EventTimeline = EventTimeline;\r\n var DrawOrderTimeline = (function () {\r\n function DrawOrderTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.drawOrders = new Array(frameCount);\r\n }\r\n DrawOrderTimeline.prototype.getPropertyId = function () {\r\n return TimelineType.drawOrder << 24;\r\n };\r\n DrawOrderTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n DrawOrderTimeline.prototype.setFrame = function (frameIndex, time, drawOrder) {\r\n this.frames[frameIndex] = time;\r\n this.drawOrders[frameIndex] = drawOrder;\r\n };\r\n DrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var drawOrder = skeleton.drawOrder;\r\n var slots = skeleton.slots;\r\n if (direction == MixDirection.mixOut) {\r\n if (blend == MixBlend.setup)\r\n spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n if (blend == MixBlend.setup || blend == MixBlend.first)\r\n spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n var frame = 0;\r\n if (time >= frames[frames.length - 1])\r\n frame = frames.length - 1;\r\n else\r\n frame = Animation.binarySearch(frames, time) - 1;\r\n var drawOrderToSetupIndex = this.drawOrders[frame];\r\n if (drawOrderToSetupIndex == null)\r\n spine.Utils.arrayCopy(slots, 0, drawOrder, 0, slots.length);\r\n else {\r\n for (var i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\r\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\r\n }\r\n };\r\n return DrawOrderTimeline;\r\n }());\r\n spine.DrawOrderTimeline = DrawOrderTimeline;\r\n var IkConstraintTimeline = (function (_super) {\r\n __extends(IkConstraintTimeline, _super);\r\n function IkConstraintTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES);\r\n return _this;\r\n }\r\n IkConstraintTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.ikConstraint << 24) + this.ikConstraintIndex;\r\n };\r\n IkConstraintTimeline.prototype.setFrame = function (frameIndex, time, mix, softness, bendDirection, compress, stretch) {\r\n frameIndex *= IkConstraintTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + IkConstraintTimeline.MIX] = mix;\r\n this.frames[frameIndex + IkConstraintTimeline.SOFTNESS] = softness;\r\n this.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection;\r\n this.frames[frameIndex + IkConstraintTimeline.COMPRESS] = compress ? 1 : 0;\r\n this.frames[frameIndex + IkConstraintTimeline.STRETCH] = stretch ? 1 : 0;\r\n };\r\n IkConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.ikConstraints[this.ikConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n return;\r\n case MixBlend.first:\r\n constraint.mix += (constraint.data.mix - constraint.mix) * alpha;\r\n constraint.softness += (constraint.data.softness - constraint.softness) * alpha;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n return;\r\n }\r\n if (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) {\r\n if (blend == MixBlend.setup) {\r\n constraint.mix = constraint.data.mix + (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.data.mix) * alpha;\r\n constraint.softness = constraint.data.softness\r\n + (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.data.softness) * alpha;\r\n if (direction == MixDirection.mixOut) {\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n else {\r\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n else {\r\n constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha;\r\n constraint.softness += (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.softness) * alpha;\r\n if (direction == MixDirection.mixIn) {\r\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time, IkConstraintTimeline.ENTRIES);\r\n var mix = frames[frame + IkConstraintTimeline.PREV_MIX];\r\n var softness = frames[frame + IkConstraintTimeline.PREV_SOFTNESS];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime));\r\n if (blend == MixBlend.setup) {\r\n constraint.mix = constraint.data.mix + (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.data.mix) * alpha;\r\n constraint.softness = constraint.data.softness\r\n + (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.data.softness) * alpha;\r\n if (direction == MixDirection.mixOut) {\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n else {\r\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n else {\r\n constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha;\r\n constraint.softness += (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.softness) * alpha;\r\n if (direction == MixDirection.mixIn) {\r\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n };\r\n IkConstraintTimeline.ENTRIES = 6;\r\n IkConstraintTimeline.PREV_TIME = -6;\r\n IkConstraintTimeline.PREV_MIX = -5;\r\n IkConstraintTimeline.PREV_SOFTNESS = -4;\r\n IkConstraintTimeline.PREV_BEND_DIRECTION = -3;\r\n IkConstraintTimeline.PREV_COMPRESS = -2;\r\n IkConstraintTimeline.PREV_STRETCH = -1;\r\n IkConstraintTimeline.MIX = 1;\r\n IkConstraintTimeline.SOFTNESS = 2;\r\n IkConstraintTimeline.BEND_DIRECTION = 3;\r\n IkConstraintTimeline.COMPRESS = 4;\r\n IkConstraintTimeline.STRETCH = 5;\r\n return IkConstraintTimeline;\r\n }(CurveTimeline));\r\n spine.IkConstraintTimeline = IkConstraintTimeline;\r\n var TransformConstraintTimeline = (function (_super) {\r\n __extends(TransformConstraintTimeline, _super);\r\n function TransformConstraintTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TransformConstraintTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.transformConstraint << 24) + this.transformConstraintIndex;\r\n };\r\n TransformConstraintTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix, scaleMix, shearMix) {\r\n frameIndex *= TransformConstraintTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TransformConstraintTimeline.ROTATE] = rotateMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.TRANSLATE] = translateMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.SCALE] = scaleMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.SHEAR] = shearMix;\r\n };\r\n TransformConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.transformConstraints[this.transformConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n var data = constraint.data;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n constraint.scaleMix = data.scaleMix;\r\n constraint.shearMix = data.shearMix;\r\n return;\r\n case MixBlend.first:\r\n constraint.rotateMix += (data.rotateMix - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (data.translateMix - constraint.translateMix) * alpha;\r\n constraint.scaleMix += (data.scaleMix - constraint.scaleMix) * alpha;\r\n constraint.shearMix += (data.shearMix - constraint.shearMix) * alpha;\r\n }\r\n return;\r\n }\r\n var rotate = 0, translate = 0, scale = 0, shear = 0;\r\n if (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n rotate = frames[i + TransformConstraintTimeline.PREV_ROTATE];\r\n translate = frames[i + TransformConstraintTimeline.PREV_TRANSLATE];\r\n scale = frames[i + TransformConstraintTimeline.PREV_SCALE];\r\n shear = frames[i + TransformConstraintTimeline.PREV_SHEAR];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES);\r\n rotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE];\r\n translate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE];\r\n scale = frames[frame + TransformConstraintTimeline.PREV_SCALE];\r\n shear = frames[frame + TransformConstraintTimeline.PREV_SHEAR];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime));\r\n rotate += (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent;\r\n translate += (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent;\r\n scale += (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent;\r\n shear += (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent;\r\n }\r\n if (blend == MixBlend.setup) {\r\n var data = constraint.data;\r\n constraint.rotateMix = data.rotateMix + (rotate - data.rotateMix) * alpha;\r\n constraint.translateMix = data.translateMix + (translate - data.translateMix) * alpha;\r\n constraint.scaleMix = data.scaleMix + (scale - data.scaleMix) * alpha;\r\n constraint.shearMix = data.shearMix + (shear - data.shearMix) * alpha;\r\n }\r\n else {\r\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n constraint.scaleMix += (scale - constraint.scaleMix) * alpha;\r\n constraint.shearMix += (shear - constraint.shearMix) * alpha;\r\n }\r\n };\r\n TransformConstraintTimeline.ENTRIES = 5;\r\n TransformConstraintTimeline.PREV_TIME = -5;\r\n TransformConstraintTimeline.PREV_ROTATE = -4;\r\n TransformConstraintTimeline.PREV_TRANSLATE = -3;\r\n TransformConstraintTimeline.PREV_SCALE = -2;\r\n TransformConstraintTimeline.PREV_SHEAR = -1;\r\n TransformConstraintTimeline.ROTATE = 1;\r\n TransformConstraintTimeline.TRANSLATE = 2;\r\n TransformConstraintTimeline.SCALE = 3;\r\n TransformConstraintTimeline.SHEAR = 4;\r\n return TransformConstraintTimeline;\r\n }(CurveTimeline));\r\n spine.TransformConstraintTimeline = TransformConstraintTimeline;\r\n var PathConstraintPositionTimeline = (function (_super) {\r\n __extends(PathConstraintPositionTimeline, _super);\r\n function PathConstraintPositionTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES);\r\n return _this;\r\n }\r\n PathConstraintPositionTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintPosition << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintPositionTimeline.prototype.setFrame = function (frameIndex, time, value) {\r\n frameIndex *= PathConstraintPositionTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + PathConstraintPositionTimeline.VALUE] = value;\r\n };\r\n PathConstraintPositionTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.position = constraint.data.position;\r\n return;\r\n case MixBlend.first:\r\n constraint.position += (constraint.data.position - constraint.position) * alpha;\r\n }\r\n return;\r\n }\r\n var position = 0;\r\n if (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES])\r\n position = frames[frames.length + PathConstraintPositionTimeline.PREV_VALUE];\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES);\r\n position = frames[frame + PathConstraintPositionTimeline.PREV_VALUE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintPositionTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintPositionTimeline.PREV_TIME] - frameTime));\r\n position += (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent;\r\n }\r\n if (blend == MixBlend.setup)\r\n constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\r\n else\r\n constraint.position += (position - constraint.position) * alpha;\r\n };\r\n PathConstraintPositionTimeline.ENTRIES = 2;\r\n PathConstraintPositionTimeline.PREV_TIME = -2;\r\n PathConstraintPositionTimeline.PREV_VALUE = -1;\r\n PathConstraintPositionTimeline.VALUE = 1;\r\n return PathConstraintPositionTimeline;\r\n }(CurveTimeline));\r\n spine.PathConstraintPositionTimeline = PathConstraintPositionTimeline;\r\n var PathConstraintSpacingTimeline = (function (_super) {\r\n __extends(PathConstraintSpacingTimeline, _super);\r\n function PathConstraintSpacingTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n PathConstraintSpacingTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintSpacing << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintSpacingTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.spacing = constraint.data.spacing;\r\n return;\r\n case MixBlend.first:\r\n constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\r\n }\r\n return;\r\n }\r\n var spacing = 0;\r\n if (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES])\r\n spacing = frames[frames.length + PathConstraintSpacingTimeline.PREV_VALUE];\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES);\r\n spacing = frames[frame + PathConstraintSpacingTimeline.PREV_VALUE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintSpacingTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintSpacingTimeline.PREV_TIME] - frameTime));\r\n spacing += (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent;\r\n }\r\n if (blend == MixBlend.setup)\r\n constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\r\n else\r\n constraint.spacing += (spacing - constraint.spacing) * alpha;\r\n };\r\n return PathConstraintSpacingTimeline;\r\n }(PathConstraintPositionTimeline));\r\n spine.PathConstraintSpacingTimeline = PathConstraintSpacingTimeline;\r\n var PathConstraintMixTimeline = (function (_super) {\r\n __extends(PathConstraintMixTimeline, _super);\r\n function PathConstraintMixTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES);\r\n return _this;\r\n }\r\n PathConstraintMixTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintMix << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintMixTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix) {\r\n frameIndex *= PathConstraintMixTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + PathConstraintMixTimeline.ROTATE] = rotateMix;\r\n this.frames[frameIndex + PathConstraintMixTimeline.TRANSLATE] = translateMix;\r\n };\r\n PathConstraintMixTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.rotateMix = constraint.data.rotateMix;\r\n constraint.translateMix = constraint.data.translateMix;\r\n return;\r\n case MixBlend.first:\r\n constraint.rotateMix += (constraint.data.rotateMix - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (constraint.data.translateMix - constraint.translateMix) * alpha;\r\n }\r\n return;\r\n }\r\n var rotate = 0, translate = 0;\r\n if (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) {\r\n rotate = frames[frames.length + PathConstraintMixTimeline.PREV_ROTATE];\r\n translate = frames[frames.length + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES);\r\n rotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE];\r\n translate = frames[frame + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintMixTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintMixTimeline.PREV_TIME] - frameTime));\r\n rotate += (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent;\r\n translate += (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent;\r\n }\r\n if (blend == MixBlend.setup) {\r\n constraint.rotateMix = constraint.data.rotateMix + (rotate - constraint.data.rotateMix) * alpha;\r\n constraint.translateMix = constraint.data.translateMix + (translate - constraint.data.translateMix) * alpha;\r\n }\r\n else {\r\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n }\r\n };\r\n PathConstraintMixTimeline.ENTRIES = 3;\r\n PathConstraintMixTimeline.PREV_TIME = -3;\r\n PathConstraintMixTimeline.PREV_ROTATE = -2;\r\n PathConstraintMixTimeline.PREV_TRANSLATE = -1;\r\n PathConstraintMixTimeline.ROTATE = 1;\r\n PathConstraintMixTimeline.TRANSLATE = 2;\r\n return PathConstraintMixTimeline;\r\n }(CurveTimeline));\r\n spine.PathConstraintMixTimeline = PathConstraintMixTimeline;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AnimationState = (function () {\r\n function AnimationState(data) {\r\n this.tracks = new Array();\r\n this.timeScale = 1;\r\n this.unkeyedState = 0;\r\n this.events = new Array();\r\n this.listeners = new Array();\r\n this.queue = new EventQueue(this);\r\n this.propertyIDs = new spine.IntSet();\r\n this.animationsChanged = false;\r\n this.trackEntryPool = new spine.Pool(function () { return new TrackEntry(); });\r\n this.data = data;\r\n }\r\n AnimationState.prototype.update = function (delta) {\r\n delta *= this.timeScale;\r\n var tracks = this.tracks;\r\n for (var i = 0, n = tracks.length; i < n; i++) {\r\n var current = tracks[i];\r\n if (current == null)\r\n continue;\r\n current.animationLast = current.nextAnimationLast;\r\n current.trackLast = current.nextTrackLast;\r\n var currentDelta = delta * current.timeScale;\r\n if (current.delay > 0) {\r\n current.delay -= currentDelta;\r\n if (current.delay > 0)\r\n continue;\r\n currentDelta = -current.delay;\r\n current.delay = 0;\r\n }\r\n var next = current.next;\r\n if (next != null) {\r\n var nextTime = current.trackLast - next.delay;\r\n if (nextTime >= 0) {\r\n next.delay = 0;\r\n next.trackTime += current.timeScale == 0 ? 0 : (nextTime / current.timeScale + delta) * next.timeScale;\r\n current.trackTime += currentDelta;\r\n this.setCurrent(i, next, true);\r\n while (next.mixingFrom != null) {\r\n next.mixTime += delta;\r\n next = next.mixingFrom;\r\n }\r\n continue;\r\n }\r\n }\r\n else if (current.trackLast >= current.trackEnd && current.mixingFrom == null) {\r\n tracks[i] = null;\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n continue;\r\n }\r\n if (current.mixingFrom != null && this.updateMixingFrom(current, delta)) {\r\n var from = current.mixingFrom;\r\n current.mixingFrom = null;\r\n if (from != null)\r\n from.mixingTo = null;\r\n while (from != null) {\r\n this.queue.end(from);\r\n from = from.mixingFrom;\r\n }\r\n }\r\n current.trackTime += currentDelta;\r\n }\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.updateMixingFrom = function (to, delta) {\r\n var from = to.mixingFrom;\r\n if (from == null)\r\n return true;\r\n var finished = this.updateMixingFrom(from, delta);\r\n from.animationLast = from.nextAnimationLast;\r\n from.trackLast = from.nextTrackLast;\r\n if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {\r\n if (from.totalAlpha == 0 || to.mixDuration == 0) {\r\n to.mixingFrom = from.mixingFrom;\r\n if (from.mixingFrom != null)\r\n from.mixingFrom.mixingTo = to;\r\n to.interruptAlpha = from.interruptAlpha;\r\n this.queue.end(from);\r\n }\r\n return finished;\r\n }\r\n from.trackTime += delta * from.timeScale;\r\n to.mixTime += delta;\r\n return false;\r\n };\r\n AnimationState.prototype.apply = function (skeleton) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n if (this.animationsChanged)\r\n this._animationsChanged();\r\n var events = this.events;\r\n var tracks = this.tracks;\r\n var applied = false;\r\n for (var i_16 = 0, n_1 = tracks.length; i_16 < n_1; i_16++) {\r\n var current = tracks[i_16];\r\n if (current == null || current.delay > 0)\r\n continue;\r\n applied = true;\r\n var blend = i_16 == 0 ? spine.MixBlend.first : current.mixBlend;\r\n var mix = current.alpha;\r\n if (current.mixingFrom != null)\r\n mix *= this.applyMixingFrom(current, skeleton, blend);\r\n else if (current.trackTime >= current.trackEnd && current.next == null)\r\n mix = 0;\r\n var animationLast = current.animationLast, animationTime = current.getAnimationTime();\r\n var timelineCount = current.animation.timelines.length;\r\n var timelines = current.animation.timelines;\r\n if ((i_16 == 0 && mix == 1) || blend == spine.MixBlend.add) {\r\n for (var ii = 0; ii < timelineCount; ii++) {\r\n spine.Utils.webkit602BugfixHelper(mix, blend);\r\n var timeline = timelines[ii];\r\n if (timeline instanceof spine.AttachmentTimeline)\r\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, blend, true);\r\n else\r\n timeline.apply(skeleton, animationLast, animationTime, events, mix, blend, spine.MixDirection.mixIn);\r\n }\r\n }\r\n else {\r\n var timelineMode = current.timelineMode;\r\n var firstFrame = current.timelinesRotation.length == 0;\r\n if (firstFrame)\r\n spine.Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null);\r\n var timelinesRotation = current.timelinesRotation;\r\n for (var ii = 0; ii < timelineCount; ii++) {\r\n var timeline_1 = timelines[ii];\r\n var timelineBlend = timelineMode[ii] == AnimationState.SUBSEQUENT ? blend : spine.MixBlend.setup;\r\n if (timeline_1 instanceof spine.RotateTimeline) {\r\n this.applyRotateTimeline(timeline_1, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame);\r\n }\r\n else if (timeline_1 instanceof spine.AttachmentTimeline) {\r\n this.applyAttachmentTimeline(timeline_1, skeleton, animationTime, blend, true);\r\n }\r\n else {\r\n spine.Utils.webkit602BugfixHelper(mix, blend);\r\n timeline_1.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, spine.MixDirection.mixIn);\r\n }\r\n }\r\n }\r\n this.queueEvents(current, animationTime);\r\n events.length = 0;\r\n current.nextAnimationLast = animationTime;\r\n current.nextTrackLast = current.trackTime;\r\n }\r\n var setupState = this.unkeyedState + AnimationState.SETUP;\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = skeleton.slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.attachmentState == setupState) {\r\n var attachmentName = slot.data.attachmentName;\r\n slot.attachment = (attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));\r\n }\r\n }\r\n this.unkeyedState += 2;\r\n this.queue.drain();\r\n return applied;\r\n };\r\n AnimationState.prototype.applyMixingFrom = function (to, skeleton, blend) {\r\n var from = to.mixingFrom;\r\n if (from.mixingFrom != null)\r\n this.applyMixingFrom(from, skeleton, blend);\r\n var mix = 0;\r\n if (to.mixDuration == 0) {\r\n mix = 1;\r\n if (blend == spine.MixBlend.first)\r\n blend = spine.MixBlend.setup;\r\n }\r\n else {\r\n mix = to.mixTime / to.mixDuration;\r\n if (mix > 1)\r\n mix = 1;\r\n if (blend != spine.MixBlend.first)\r\n blend = from.mixBlend;\r\n }\r\n var events = mix < from.eventThreshold ? this.events : null;\r\n var attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\r\n var animationLast = from.animationLast, animationTime = from.getAnimationTime();\r\n var timelineCount = from.animation.timelines.length;\r\n var timelines = from.animation.timelines;\r\n var alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\r\n if (blend == spine.MixBlend.add) {\r\n for (var i = 0; i < timelineCount; i++)\r\n timelines[i].apply(skeleton, animationLast, animationTime, events, alphaMix, blend, spine.MixDirection.mixOut);\r\n }\r\n else {\r\n var timelineMode = from.timelineMode;\r\n var timelineHoldMix = from.timelineHoldMix;\r\n var firstFrame = from.timelinesRotation.length == 0;\r\n if (firstFrame)\r\n spine.Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null);\r\n var timelinesRotation = from.timelinesRotation;\r\n from.totalAlpha = 0;\r\n for (var i = 0; i < timelineCount; i++) {\r\n var timeline = timelines[i];\r\n var direction = spine.MixDirection.mixOut;\r\n var timelineBlend = void 0;\r\n var alpha = 0;\r\n switch (timelineMode[i]) {\r\n case AnimationState.SUBSEQUENT:\r\n if (!drawOrder && timeline instanceof spine.DrawOrderTimeline)\r\n continue;\r\n timelineBlend = blend;\r\n alpha = alphaMix;\r\n break;\r\n case AnimationState.FIRST:\r\n timelineBlend = spine.MixBlend.setup;\r\n alpha = alphaMix;\r\n break;\r\n case AnimationState.HOLD_SUBSEQUENT:\r\n timelineBlend = blend;\r\n alpha = alphaHold;\r\n break;\r\n case AnimationState.HOLD_FIRST:\r\n timelineBlend = spine.MixBlend.setup;\r\n alpha = alphaHold;\r\n break;\r\n default:\r\n timelineBlend = spine.MixBlend.setup;\r\n var holdMix = timelineHoldMix[i];\r\n alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\r\n break;\r\n }\r\n from.totalAlpha += alpha;\r\n if (timeline instanceof spine.RotateTimeline)\r\n this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame);\r\n else if (timeline instanceof spine.AttachmentTimeline)\r\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, timelineBlend, attachments);\r\n else {\r\n spine.Utils.webkit602BugfixHelper(alpha, blend);\r\n if (drawOrder && timeline instanceof spine.DrawOrderTimeline && timelineBlend == spine.MixBlend.setup)\r\n direction = spine.MixDirection.mixIn;\r\n timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, direction);\r\n }\r\n }\r\n }\r\n if (to.mixDuration > 0)\r\n this.queueEvents(from, animationTime);\r\n this.events.length = 0;\r\n from.nextAnimationLast = animationTime;\r\n from.nextTrackLast = from.trackTime;\r\n return mix;\r\n };\r\n AnimationState.prototype.applyAttachmentTimeline = function (timeline, skeleton, time, blend, attachments) {\r\n var slot = skeleton.slots[timeline.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = timeline.frames;\r\n if (time < frames[0]) {\r\n if (blend == spine.MixBlend.setup || blend == spine.MixBlend.first)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments);\r\n }\r\n else {\r\n var frameIndex;\r\n if (time >= frames[frames.length - 1])\r\n frameIndex = frames.length - 1;\r\n else\r\n frameIndex = spine.Animation.binarySearch(frames, time) - 1;\r\n this.setAttachment(skeleton, slot, timeline.attachmentNames[frameIndex], attachments);\r\n }\r\n if (slot.attachmentState <= this.unkeyedState)\r\n slot.attachmentState = this.unkeyedState + AnimationState.SETUP;\r\n };\r\n AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) {\r\n slot.attachment = attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName);\r\n if (attachments)\r\n slot.attachmentState = this.unkeyedState + AnimationState.CURRENT;\r\n };\r\n AnimationState.prototype.applyRotateTimeline = function (timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) {\r\n if (firstFrame)\r\n timelinesRotation[i] = 0;\r\n if (alpha == 1) {\r\n timeline.apply(skeleton, 0, time, null, 1, blend, spine.MixDirection.mixIn);\r\n return;\r\n }\r\n var rotateTimeline = timeline;\r\n var frames = rotateTimeline.frames;\r\n var bone = skeleton.bones[rotateTimeline.boneIndex];\r\n if (!bone.active)\r\n return;\r\n var r1 = 0, r2 = 0;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case spine.MixBlend.setup:\r\n bone.rotation = bone.data.rotation;\r\n default:\r\n return;\r\n case spine.MixBlend.first:\r\n r1 = bone.rotation;\r\n r2 = bone.data.rotation;\r\n }\r\n }\r\n else {\r\n r1 = blend == spine.MixBlend.setup ? bone.data.rotation : bone.rotation;\r\n if (time >= frames[frames.length - spine.RotateTimeline.ENTRIES])\r\n r2 = bone.data.rotation + frames[frames.length + spine.RotateTimeline.PREV_ROTATION];\r\n else {\r\n var frame = spine.Animation.binarySearch(frames, time, spine.RotateTimeline.ENTRIES);\r\n var prevRotation = frames[frame + spine.RotateTimeline.PREV_ROTATION];\r\n var frameTime = frames[frame];\r\n var percent = rotateTimeline.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + spine.RotateTimeline.PREV_TIME] - frameTime));\r\n r2 = frames[frame + spine.RotateTimeline.ROTATION] - prevRotation;\r\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n r2 = prevRotation + r2 * percent + bone.data.rotation;\r\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n }\r\n }\r\n var total = 0, diff = r2 - r1;\r\n diff -= (16384 - ((16384.499999999996 - diff / 360) | 0)) * 360;\r\n if (diff == 0) {\r\n total = timelinesRotation[i];\r\n }\r\n else {\r\n var lastTotal = 0, lastDiff = 0;\r\n if (firstFrame) {\r\n lastTotal = 0;\r\n lastDiff = diff;\r\n }\r\n else {\r\n lastTotal = timelinesRotation[i];\r\n lastDiff = timelinesRotation[i + 1];\r\n }\r\n var current = diff > 0, dir = lastTotal >= 0;\r\n if (spine.MathUtils.signum(lastDiff) != spine.MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\r\n if (Math.abs(lastTotal) > 180)\r\n lastTotal += 360 * spine.MathUtils.signum(lastTotal);\r\n dir = current;\r\n }\r\n total = diff + lastTotal - lastTotal % 360;\r\n if (dir != current)\r\n total += 360 * spine.MathUtils.signum(lastTotal);\r\n timelinesRotation[i] = total;\r\n }\r\n timelinesRotation[i + 1] = diff;\r\n r1 += total * alpha;\r\n bone.rotation = r1 - (16384 - ((16384.499999999996 - r1 / 360) | 0)) * 360;\r\n };\r\n AnimationState.prototype.queueEvents = function (entry, animationTime) {\r\n var animationStart = entry.animationStart, animationEnd = entry.animationEnd;\r\n var duration = animationEnd - animationStart;\r\n var trackLastWrapped = entry.trackLast % duration;\r\n var events = this.events;\r\n var i = 0, n = events.length;\r\n for (; i < n; i++) {\r\n var event_1 = events[i];\r\n if (event_1.time < trackLastWrapped)\r\n break;\r\n if (event_1.time > animationEnd)\r\n continue;\r\n this.queue.event(entry, event_1);\r\n }\r\n var complete = false;\r\n if (entry.loop)\r\n complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;\r\n else\r\n complete = animationTime >= animationEnd && entry.animationLast < animationEnd;\r\n if (complete)\r\n this.queue.complete(entry);\r\n for (; i < n; i++) {\r\n var event_2 = events[i];\r\n if (event_2.time < animationStart)\r\n continue;\r\n this.queue.event(entry, events[i]);\r\n }\r\n };\r\n AnimationState.prototype.clearTracks = function () {\r\n var oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (var i = 0, n = this.tracks.length; i < n; i++)\r\n this.clearTrack(i);\r\n this.tracks.length = 0;\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.clearTrack = function (trackIndex) {\r\n if (trackIndex >= this.tracks.length)\r\n return;\r\n var current = this.tracks[trackIndex];\r\n if (current == null)\r\n return;\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n var entry = current;\r\n while (true) {\r\n var from = entry.mixingFrom;\r\n if (from == null)\r\n break;\r\n this.queue.end(from);\r\n entry.mixingFrom = null;\r\n entry.mixingTo = null;\r\n entry = from;\r\n }\r\n this.tracks[current.trackIndex] = null;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.setCurrent = function (index, current, interrupt) {\r\n var from = this.expandToIndex(index);\r\n this.tracks[index] = current;\r\n if (from != null) {\r\n if (interrupt)\r\n this.queue.interrupt(from);\r\n current.mixingFrom = from;\r\n from.mixingTo = current;\r\n current.mixTime = 0;\r\n if (from.mixingFrom != null && from.mixDuration > 0)\r\n current.interruptAlpha *= Math.min(1, from.mixTime / from.mixDuration);\r\n from.timelinesRotation.length = 0;\r\n }\r\n this.queue.start(current);\r\n };\r\n AnimationState.prototype.setAnimation = function (trackIndex, animationName, loop) {\r\n var animation = this.data.skeletonData.findAnimation(animationName);\r\n if (animation == null)\r\n throw new Error(\"Animation not found: \" + animationName);\r\n return this.setAnimationWith(trackIndex, animation, loop);\r\n };\r\n AnimationState.prototype.setAnimationWith = function (trackIndex, animation, loop) {\r\n if (animation == null)\r\n throw new Error(\"animation cannot be null.\");\r\n var interrupt = true;\r\n var current = this.expandToIndex(trackIndex);\r\n if (current != null) {\r\n if (current.nextTrackLast == -1) {\r\n this.tracks[trackIndex] = current.mixingFrom;\r\n this.queue.interrupt(current);\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n current = current.mixingFrom;\r\n interrupt = false;\r\n }\r\n else\r\n this.disposeNext(current);\r\n }\r\n var entry = this.trackEntry(trackIndex, animation, loop, current);\r\n this.setCurrent(trackIndex, entry, interrupt);\r\n this.queue.drain();\r\n return entry;\r\n };\r\n AnimationState.prototype.addAnimation = function (trackIndex, animationName, loop, delay) {\r\n var animation = this.data.skeletonData.findAnimation(animationName);\r\n if (animation == null)\r\n throw new Error(\"Animation not found: \" + animationName);\r\n return this.addAnimationWith(trackIndex, animation, loop, delay);\r\n };\r\n AnimationState.prototype.addAnimationWith = function (trackIndex, animation, loop, delay) {\r\n if (animation == null)\r\n throw new Error(\"animation cannot be null.\");\r\n var last = this.expandToIndex(trackIndex);\r\n if (last != null) {\r\n while (last.next != null)\r\n last = last.next;\r\n }\r\n var entry = this.trackEntry(trackIndex, animation, loop, last);\r\n if (last == null) {\r\n this.setCurrent(trackIndex, entry, true);\r\n this.queue.drain();\r\n }\r\n else {\r\n last.next = entry;\r\n if (delay <= 0) {\r\n var duration = last.animationEnd - last.animationStart;\r\n if (duration != 0) {\r\n if (last.loop)\r\n delay += duration * (1 + ((last.trackTime / duration) | 0));\r\n else\r\n delay += Math.max(duration, last.trackTime);\r\n delay -= this.data.getMix(last.animation, animation);\r\n }\r\n else\r\n delay = last.trackTime;\r\n }\r\n }\r\n entry.delay = delay;\r\n return entry;\r\n };\r\n AnimationState.prototype.setEmptyAnimation = function (trackIndex, mixDuration) {\r\n var entry = this.setAnimationWith(trackIndex, AnimationState.emptyAnimation, false);\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n };\r\n AnimationState.prototype.addEmptyAnimation = function (trackIndex, mixDuration, delay) {\r\n if (delay <= 0)\r\n delay -= mixDuration;\r\n var entry = this.addAnimationWith(trackIndex, AnimationState.emptyAnimation, false, delay);\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n };\r\n AnimationState.prototype.setEmptyAnimations = function (mixDuration) {\r\n var oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (var i = 0, n = this.tracks.length; i < n; i++) {\r\n var current = this.tracks[i];\r\n if (current != null)\r\n this.setEmptyAnimation(current.trackIndex, mixDuration);\r\n }\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.expandToIndex = function (index) {\r\n if (index < this.tracks.length)\r\n return this.tracks[index];\r\n spine.Utils.ensureArrayCapacity(this.tracks, index + 1, null);\r\n this.tracks.length = index + 1;\r\n return null;\r\n };\r\n AnimationState.prototype.trackEntry = function (trackIndex, animation, loop, last) {\r\n var entry = this.trackEntryPool.obtain();\r\n entry.trackIndex = trackIndex;\r\n entry.animation = animation;\r\n entry.loop = loop;\r\n entry.holdPrevious = false;\r\n entry.eventThreshold = 0;\r\n entry.attachmentThreshold = 0;\r\n entry.drawOrderThreshold = 0;\r\n entry.animationStart = 0;\r\n entry.animationEnd = animation.duration;\r\n entry.animationLast = -1;\r\n entry.nextAnimationLast = -1;\r\n entry.delay = 0;\r\n entry.trackTime = 0;\r\n entry.trackLast = -1;\r\n entry.nextTrackLast = -1;\r\n entry.trackEnd = Number.MAX_VALUE;\r\n entry.timeScale = 1;\r\n entry.alpha = 1;\r\n entry.interruptAlpha = 1;\r\n entry.mixTime = 0;\r\n entry.mixDuration = last == null ? 0 : this.data.getMix(last.animation, animation);\r\n entry.mixBlend = spine.MixBlend.replace;\r\n return entry;\r\n };\r\n AnimationState.prototype.disposeNext = function (entry) {\r\n var next = entry.next;\r\n while (next != null) {\r\n this.queue.dispose(next);\r\n next = next.next;\r\n }\r\n entry.next = null;\r\n };\r\n AnimationState.prototype._animationsChanged = function () {\r\n this.animationsChanged = false;\r\n this.propertyIDs.clear();\r\n for (var i = 0, n = this.tracks.length; i < n; i++) {\r\n var entry = this.tracks[i];\r\n if (entry == null)\r\n continue;\r\n while (entry.mixingFrom != null)\r\n entry = entry.mixingFrom;\r\n do {\r\n if (entry.mixingFrom == null || entry.mixBlend != spine.MixBlend.add)\r\n this.computeHold(entry);\r\n entry = entry.mixingTo;\r\n } while (entry != null);\r\n }\r\n };\r\n AnimationState.prototype.computeHold = function (entry) {\r\n var to = entry.mixingTo;\r\n var timelines = entry.animation.timelines;\r\n var timelinesCount = entry.animation.timelines.length;\r\n var timelineMode = spine.Utils.setArraySize(entry.timelineMode, timelinesCount);\r\n entry.timelineHoldMix.length = 0;\r\n var timelineDipMix = spine.Utils.setArraySize(entry.timelineHoldMix, timelinesCount);\r\n var propertyIDs = this.propertyIDs;\r\n if (to != null && to.holdPrevious) {\r\n for (var i = 0; i < timelinesCount; i++) {\r\n timelineMode[i] = propertyIDs.add(timelines[i].getPropertyId()) ? AnimationState.HOLD_FIRST : AnimationState.HOLD_SUBSEQUENT;\r\n }\r\n return;\r\n }\r\n outer: for (var i = 0; i < timelinesCount; i++) {\r\n var timeline = timelines[i];\r\n var id = timeline.getPropertyId();\r\n if (!propertyIDs.add(id))\r\n timelineMode[i] = AnimationState.SUBSEQUENT;\r\n else if (to == null || timeline instanceof spine.AttachmentTimeline || timeline instanceof spine.DrawOrderTimeline\r\n || timeline instanceof spine.EventTimeline || !to.animation.hasTimeline(id)) {\r\n timelineMode[i] = AnimationState.FIRST;\r\n }\r\n else {\r\n for (var next = to.mixingTo; next != null; next = next.mixingTo) {\r\n if (next.animation.hasTimeline(id))\r\n continue;\r\n if (entry.mixDuration > 0) {\r\n timelineMode[i] = AnimationState.HOLD_MIX;\r\n timelineDipMix[i] = next;\r\n continue outer;\r\n }\r\n break;\r\n }\r\n timelineMode[i] = AnimationState.HOLD_FIRST;\r\n }\r\n }\r\n };\r\n AnimationState.prototype.getCurrent = function (trackIndex) {\r\n if (trackIndex >= this.tracks.length)\r\n return null;\r\n return this.tracks[trackIndex];\r\n };\r\n AnimationState.prototype.addListener = function (listener) {\r\n if (listener == null)\r\n throw new Error(\"listener cannot be null.\");\r\n this.listeners.push(listener);\r\n };\r\n AnimationState.prototype.removeListener = function (listener) {\r\n var index = this.listeners.indexOf(listener);\r\n if (index >= 0)\r\n this.listeners.splice(index, 1);\r\n };\r\n AnimationState.prototype.clearListeners = function () {\r\n this.listeners.length = 0;\r\n };\r\n AnimationState.prototype.clearListenerNotifications = function () {\r\n this.queue.clear();\r\n };\r\n AnimationState.emptyAnimation = new spine.Animation(\"\", [], 0);\r\n AnimationState.SUBSEQUENT = 0;\r\n AnimationState.FIRST = 1;\r\n AnimationState.HOLD_SUBSEQUENT = 2;\r\n AnimationState.HOLD_FIRST = 3;\r\n AnimationState.HOLD_MIX = 4;\r\n AnimationState.SETUP = 1;\r\n AnimationState.CURRENT = 2;\r\n return AnimationState;\r\n }());\r\n spine.AnimationState = AnimationState;\r\n var TrackEntry = (function () {\r\n function TrackEntry() {\r\n this.mixBlend = spine.MixBlend.replace;\r\n this.timelineMode = new Array();\r\n this.timelineHoldMix = new Array();\r\n this.timelinesRotation = new Array();\r\n }\r\n TrackEntry.prototype.reset = function () {\r\n this.next = null;\r\n this.mixingFrom = null;\r\n this.mixingTo = null;\r\n this.animation = null;\r\n this.listener = null;\r\n this.timelineMode.length = 0;\r\n this.timelineHoldMix.length = 0;\r\n this.timelinesRotation.length = 0;\r\n };\r\n TrackEntry.prototype.getAnimationTime = function () {\r\n if (this.loop) {\r\n var duration = this.animationEnd - this.animationStart;\r\n if (duration == 0)\r\n return this.animationStart;\r\n return (this.trackTime % duration) + this.animationStart;\r\n }\r\n return Math.min(this.trackTime + this.animationStart, this.animationEnd);\r\n };\r\n TrackEntry.prototype.setAnimationLast = function (animationLast) {\r\n this.animationLast = animationLast;\r\n this.nextAnimationLast = animationLast;\r\n };\r\n TrackEntry.prototype.isComplete = function () {\r\n return this.trackTime >= this.animationEnd - this.animationStart;\r\n };\r\n TrackEntry.prototype.resetRotationDirections = function () {\r\n this.timelinesRotation.length = 0;\r\n };\r\n return TrackEntry;\r\n }());\r\n spine.TrackEntry = TrackEntry;\r\n var EventQueue = (function () {\r\n function EventQueue(animState) {\r\n this.objects = [];\r\n this.drainDisabled = false;\r\n this.animState = animState;\r\n }\r\n EventQueue.prototype.start = function (entry) {\r\n this.objects.push(EventType.start);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n };\r\n EventQueue.prototype.interrupt = function (entry) {\r\n this.objects.push(EventType.interrupt);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.end = function (entry) {\r\n this.objects.push(EventType.end);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n };\r\n EventQueue.prototype.dispose = function (entry) {\r\n this.objects.push(EventType.dispose);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.complete = function (entry) {\r\n this.objects.push(EventType.complete);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.event = function (entry, event) {\r\n this.objects.push(EventType.event);\r\n this.objects.push(entry);\r\n this.objects.push(event);\r\n };\r\n EventQueue.prototype.drain = function () {\r\n if (this.drainDisabled)\r\n return;\r\n this.drainDisabled = true;\r\n var objects = this.objects;\r\n var listeners = this.animState.listeners;\r\n for (var i = 0; i < objects.length; i += 2) {\r\n var type = objects[i];\r\n var entry = objects[i + 1];\r\n switch (type) {\r\n case EventType.start:\r\n if (entry.listener != null && entry.listener.start)\r\n entry.listener.start(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].start)\r\n listeners[ii].start(entry);\r\n break;\r\n case EventType.interrupt:\r\n if (entry.listener != null && entry.listener.interrupt)\r\n entry.listener.interrupt(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].interrupt)\r\n listeners[ii].interrupt(entry);\r\n break;\r\n case EventType.end:\r\n if (entry.listener != null && entry.listener.end)\r\n entry.listener.end(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].end)\r\n listeners[ii].end(entry);\r\n case EventType.dispose:\r\n if (entry.listener != null && entry.listener.dispose)\r\n entry.listener.dispose(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].dispose)\r\n listeners[ii].dispose(entry);\r\n this.animState.trackEntryPool.free(entry);\r\n break;\r\n case EventType.complete:\r\n if (entry.listener != null && entry.listener.complete)\r\n entry.listener.complete(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].complete)\r\n listeners[ii].complete(entry);\r\n break;\r\n case EventType.event:\r\n var event_3 = objects[i++ + 2];\r\n if (entry.listener != null && entry.listener.event)\r\n entry.listener.event(entry, event_3);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].event)\r\n listeners[ii].event(entry, event_3);\r\n break;\r\n }\r\n }\r\n this.clear();\r\n this.drainDisabled = false;\r\n };\r\n EventQueue.prototype.clear = function () {\r\n this.objects.length = 0;\r\n };\r\n return EventQueue;\r\n }());\r\n spine.EventQueue = EventQueue;\r\n var EventType;\r\n (function (EventType) {\r\n EventType[EventType[\"start\"] = 0] = \"start\";\r\n EventType[EventType[\"interrupt\"] = 1] = \"interrupt\";\r\n EventType[EventType[\"end\"] = 2] = \"end\";\r\n EventType[EventType[\"dispose\"] = 3] = \"dispose\";\r\n EventType[EventType[\"complete\"] = 4] = \"complete\";\r\n EventType[EventType[\"event\"] = 5] = \"event\";\r\n })(EventType = spine.EventType || (spine.EventType = {}));\r\n var AnimationStateAdapter = (function () {\r\n function AnimationStateAdapter() {\r\n }\r\n AnimationStateAdapter.prototype.start = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.interrupt = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.end = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.dispose = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.complete = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.event = function (entry, event) {\r\n };\r\n return AnimationStateAdapter;\r\n }());\r\n spine.AnimationStateAdapter = AnimationStateAdapter;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AnimationStateData = (function () {\r\n function AnimationStateData(skeletonData) {\r\n this.animationToMixTime = {};\r\n this.defaultMix = 0;\r\n if (skeletonData == null)\r\n throw new Error(\"skeletonData cannot be null.\");\r\n this.skeletonData = skeletonData;\r\n }\r\n AnimationStateData.prototype.setMix = function (fromName, toName, duration) {\r\n var from = this.skeletonData.findAnimation(fromName);\r\n if (from == null)\r\n throw new Error(\"Animation not found: \" + fromName);\r\n var to = this.skeletonData.findAnimation(toName);\r\n if (to == null)\r\n throw new Error(\"Animation not found: \" + toName);\r\n this.setMixWith(from, to, duration);\r\n };\r\n AnimationStateData.prototype.setMixWith = function (from, to, duration) {\r\n if (from == null)\r\n throw new Error(\"from cannot be null.\");\r\n if (to == null)\r\n throw new Error(\"to cannot be null.\");\r\n var key = from.name + \".\" + to.name;\r\n this.animationToMixTime[key] = duration;\r\n };\r\n AnimationStateData.prototype.getMix = function (from, to) {\r\n var key = from.name + \".\" + to.name;\r\n var value = this.animationToMixTime[key];\r\n return value === undefined ? this.defaultMix : value;\r\n };\r\n return AnimationStateData;\r\n }());\r\n spine.AnimationStateData = AnimationStateData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AssetManager = (function () {\r\n function AssetManager(textureLoader, pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n this.assets = {};\r\n this.errors = {};\r\n this.toLoad = 0;\r\n this.loaded = 0;\r\n this.rawDataUris = {};\r\n this.textureLoader = textureLoader;\r\n this.pathPrefix = pathPrefix;\r\n }\r\n AssetManager.prototype.downloadText = function (url, success, error) {\r\n var request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n if (this.rawDataUris[url])\r\n url = this.rawDataUris[url];\r\n request.open(\"GET\", url, true);\r\n request.onload = function () {\r\n if (request.status == 200) {\r\n success(request.responseText);\r\n }\r\n else {\r\n error(request.status, request.responseText);\r\n }\r\n };\r\n request.onerror = function () {\r\n error(request.status, request.responseText);\r\n };\r\n request.send();\r\n };\r\n AssetManager.prototype.downloadBinary = function (url, success, error) {\r\n var request = new XMLHttpRequest();\r\n if (this.rawDataUris[url])\r\n url = this.rawDataUris[url];\r\n request.open(\"GET\", url, true);\r\n request.responseType = \"arraybuffer\";\r\n request.onload = function () {\r\n if (request.status == 200) {\r\n success(new Uint8Array(request.response));\r\n }\r\n else {\r\n error(request.status, request.responseText);\r\n }\r\n };\r\n request.onerror = function () {\r\n error(request.status, request.responseText);\r\n };\r\n request.send();\r\n };\r\n AssetManager.prototype.setRawDataURI = function (path, data) {\r\n this.rawDataUris[this.pathPrefix + path] = data;\r\n };\r\n AssetManager.prototype.loadBinary = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n this.downloadBinary(path, function (data) {\r\n _this.assets[path] = data;\r\n if (success)\r\n success(path, data);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load binary \" + path + \": status \" + status + \", \" + responseText;\r\n if (error)\r\n error(path, \"Couldn't load binary \" + path + \": status \" + status + \", \" + responseText);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.loadText = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n this.downloadText(path, function (data) {\r\n _this.assets[path] = data;\r\n if (success)\r\n success(path, data);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load text \" + path + \": status \" + status + \", \" + responseText;\r\n if (error)\r\n error(path, \"Couldn't load text \" + path + \": status \" + status + \", \" + responseText);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.loadTexture = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n var storagePath = path;\r\n this.toLoad++;\r\n var img = new Image();\r\n img.crossOrigin = \"anonymous\";\r\n img.onload = function (ev) {\r\n var texture = _this.textureLoader(img);\r\n _this.assets[storagePath] = texture;\r\n _this.toLoad--;\r\n _this.loaded++;\r\n if (success)\r\n success(path, img);\r\n };\r\n img.onerror = function (ev) {\r\n _this.errors[path] = \"Couldn't load image \" + path;\r\n _this.toLoad--;\r\n _this.loaded++;\r\n if (error)\r\n error(path, \"Couldn't load image \" + path);\r\n };\r\n if (this.rawDataUris[path])\r\n path = this.rawDataUris[path];\r\n img.src = path;\r\n };\r\n AssetManager.prototype.loadTextureAtlas = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n var parent = path.lastIndexOf(\"/\") >= 0 ? path.substring(0, path.lastIndexOf(\"/\")) : \"\";\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n this.downloadText(path, function (atlasData) {\r\n var pagesLoaded = { count: 0 };\r\n var atlasPages = new Array();\r\n try {\r\n var atlas = new spine.TextureAtlas(atlasData, function (path) {\r\n atlasPages.push(parent == \"\" ? path : parent + \"/\" + path);\r\n var image = document.createElement(\"img\");\r\n image.width = 16;\r\n image.height = 16;\r\n return new spine.FakeTexture(image);\r\n });\r\n }\r\n catch (e) {\r\n var ex = e;\r\n _this.errors[path] = \"Couldn't load texture atlas \" + path + \": \" + ex.message;\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \" + path + \": \" + ex.message);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n return;\r\n }\r\n var _loop_1 = function (atlasPage) {\r\n var pageLoadError = false;\r\n _this.loadTexture(atlasPage, function (imagePath, image) {\r\n pagesLoaded.count++;\r\n if (pagesLoaded.count == atlasPages.length) {\r\n if (!pageLoadError) {\r\n try {\r\n var atlas = new spine.TextureAtlas(atlasData, function (path) {\r\n return _this.get(parent == \"\" ? path : parent + \"/\" + path);\r\n });\r\n _this.assets[path] = atlas;\r\n if (success)\r\n success(path, atlas);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n catch (e) {\r\n var ex = e;\r\n _this.errors[path] = \"Couldn't load texture atlas \" + path + \": \" + ex.message;\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \" + path + \": \" + ex.message);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load texture atlas page \" + imagePath + \"} of atlas \" + path;\r\n if (error)\r\n error(path, \"Couldn't load texture atlas page \" + imagePath + \" of atlas \" + path);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n }\r\n }, function (imagePath, errorMessage) {\r\n pageLoadError = true;\r\n pagesLoaded.count++;\r\n if (pagesLoaded.count == atlasPages.length) {\r\n _this.errors[path] = \"Couldn't load texture atlas page \" + imagePath + \"} of atlas \" + path;\r\n if (error)\r\n error(path, \"Couldn't load texture atlas page \" + imagePath + \" of atlas \" + path);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n });\r\n };\r\n for (var _i = 0, atlasPages_1 = atlasPages; _i < atlasPages_1.length; _i++) {\r\n var atlasPage = atlasPages_1[_i];\r\n _loop_1(atlasPage);\r\n }\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load texture atlas \" + path + \": status \" + status + \", \" + responseText;\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \" + path + \": status \" + status + \", \" + responseText);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.get = function (path) {\r\n path = this.pathPrefix + path;\r\n return this.assets[path];\r\n };\r\n AssetManager.prototype.remove = function (path) {\r\n path = this.pathPrefix + path;\r\n var asset = this.assets[path];\r\n if (asset.dispose)\r\n asset.dispose();\r\n this.assets[path] = null;\r\n };\r\n AssetManager.prototype.removeAll = function () {\r\n for (var key in this.assets) {\r\n var asset = this.assets[key];\r\n if (asset.dispose)\r\n asset.dispose();\r\n }\r\n this.assets = {};\r\n };\r\n AssetManager.prototype.isLoadingComplete = function () {\r\n return this.toLoad == 0;\r\n };\r\n AssetManager.prototype.getToLoad = function () {\r\n return this.toLoad;\r\n };\r\n AssetManager.prototype.getLoaded = function () {\r\n return this.loaded;\r\n };\r\n AssetManager.prototype.dispose = function () {\r\n this.removeAll();\r\n };\r\n AssetManager.prototype.hasErrors = function () {\r\n return Object.keys(this.errors).length > 0;\r\n };\r\n AssetManager.prototype.getErrors = function () {\r\n return this.errors;\r\n };\r\n return AssetManager;\r\n }());\r\n spine.AssetManager = AssetManager;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AtlasAttachmentLoader = (function () {\r\n function AtlasAttachmentLoader(atlas) {\r\n this.atlas = atlas;\r\n }\r\n AtlasAttachmentLoader.prototype.newRegionAttachment = function (skin, name, path) {\r\n var region = this.atlas.findRegion(path);\r\n if (region == null)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\r\n region.renderObject = region;\r\n var attachment = new spine.RegionAttachment(name);\r\n attachment.setRegion(region);\r\n return attachment;\r\n };\r\n AtlasAttachmentLoader.prototype.newMeshAttachment = function (skin, name, path) {\r\n var region = this.atlas.findRegion(path);\r\n if (region == null)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\r\n region.renderObject = region;\r\n var attachment = new spine.MeshAttachment(name);\r\n attachment.region = region;\r\n return attachment;\r\n };\r\n AtlasAttachmentLoader.prototype.newBoundingBoxAttachment = function (skin, name) {\r\n return new spine.BoundingBoxAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newPathAttachment = function (skin, name) {\r\n return new spine.PathAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newPointAttachment = function (skin, name) {\r\n return new spine.PointAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newClippingAttachment = function (skin, name) {\r\n return new spine.ClippingAttachment(name);\r\n };\r\n return AtlasAttachmentLoader;\r\n }());\r\n spine.AtlasAttachmentLoader = AtlasAttachmentLoader;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BlendMode;\r\n (function (BlendMode) {\r\n BlendMode[BlendMode[\"Normal\"] = 0] = \"Normal\";\r\n BlendMode[BlendMode[\"Additive\"] = 1] = \"Additive\";\r\n BlendMode[BlendMode[\"Multiply\"] = 2] = \"Multiply\";\r\n BlendMode[BlendMode[\"Screen\"] = 3] = \"Screen\";\r\n })(BlendMode = spine.BlendMode || (spine.BlendMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Bone = (function () {\r\n function Bone(data, skeleton, parent) {\r\n this.children = new Array();\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.scaleX = 0;\r\n this.scaleY = 0;\r\n this.shearX = 0;\r\n this.shearY = 0;\r\n this.ax = 0;\r\n this.ay = 0;\r\n this.arotation = 0;\r\n this.ascaleX = 0;\r\n this.ascaleY = 0;\r\n this.ashearX = 0;\r\n this.ashearY = 0;\r\n this.appliedValid = false;\r\n this.a = 0;\r\n this.b = 0;\r\n this.c = 0;\r\n this.d = 0;\r\n this.worldY = 0;\r\n this.worldX = 0;\r\n this.sorted = false;\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.skeleton = skeleton;\r\n this.parent = parent;\r\n this.setToSetupPose();\r\n }\r\n Bone.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n Bone.prototype.update = function () {\r\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n };\r\n Bone.prototype.updateWorldTransform = function () {\r\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n };\r\n Bone.prototype.updateWorldTransformWith = function (x, y, rotation, scaleX, scaleY, shearX, shearY) {\r\n this.ax = x;\r\n this.ay = y;\r\n this.arotation = rotation;\r\n this.ascaleX = scaleX;\r\n this.ascaleY = scaleY;\r\n this.ashearX = shearX;\r\n this.ashearY = shearY;\r\n this.appliedValid = true;\r\n var parent = this.parent;\r\n if (parent == null) {\r\n var skeleton = this.skeleton;\r\n var rotationY = rotation + 90 + shearY;\r\n var sx = skeleton.scaleX;\r\n var sy = skeleton.scaleY;\r\n this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\r\n this.b = spine.MathUtils.cosDeg(rotationY) * scaleY * sx;\r\n this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\r\n this.d = spine.MathUtils.sinDeg(rotationY) * scaleY * sy;\r\n this.worldX = x * sx + skeleton.x;\r\n this.worldY = y * sy + skeleton.y;\r\n return;\r\n }\r\n var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n this.worldX = pa * x + pb * y + parent.worldX;\r\n this.worldY = pc * x + pd * y + parent.worldY;\r\n switch (this.data.transformMode) {\r\n case spine.TransformMode.Normal: {\r\n var rotationY = rotation + 90 + shearY;\r\n var la = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(rotationY) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(rotationY) * scaleY;\r\n this.a = pa * la + pb * lc;\r\n this.b = pa * lb + pb * ld;\r\n this.c = pc * la + pd * lc;\r\n this.d = pc * lb + pd * ld;\r\n return;\r\n }\r\n case spine.TransformMode.OnlyTranslation: {\r\n var rotationY = rotation + 90 + shearY;\r\n this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n this.b = spine.MathUtils.cosDeg(rotationY) * scaleY;\r\n this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n this.d = spine.MathUtils.sinDeg(rotationY) * scaleY;\r\n break;\r\n }\r\n case spine.TransformMode.NoRotationOrReflection: {\r\n var s = pa * pa + pc * pc;\r\n var prx = 0;\r\n if (s > 0.0001) {\r\n s = Math.abs(pa * pd - pb * pc) / s;\r\n pa /= this.skeleton.scaleX;\r\n pc /= this.skeleton.scaleY;\r\n pb = pc * s;\r\n pd = pa * s;\r\n prx = Math.atan2(pc, pa) * spine.MathUtils.radDeg;\r\n }\r\n else {\r\n pa = 0;\r\n pc = 0;\r\n prx = 90 - Math.atan2(pd, pb) * spine.MathUtils.radDeg;\r\n }\r\n var rx = rotation + shearX - prx;\r\n var ry = rotation + shearY - prx + 90;\r\n var la = spine.MathUtils.cosDeg(rx) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(ry) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(rx) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(ry) * scaleY;\r\n this.a = pa * la - pb * lc;\r\n this.b = pa * lb - pb * ld;\r\n this.c = pc * la + pd * lc;\r\n this.d = pc * lb + pd * ld;\r\n break;\r\n }\r\n case spine.TransformMode.NoScale:\r\n case spine.TransformMode.NoScaleOrReflection: {\r\n var cos = spine.MathUtils.cosDeg(rotation);\r\n var sin = spine.MathUtils.sinDeg(rotation);\r\n var za = (pa * cos + pb * sin) / this.skeleton.scaleX;\r\n var zc = (pc * cos + pd * sin) / this.skeleton.scaleY;\r\n var s = Math.sqrt(za * za + zc * zc);\r\n if (s > 0.00001)\r\n s = 1 / s;\r\n za *= s;\r\n zc *= s;\r\n s = Math.sqrt(za * za + zc * zc);\r\n if (this.data.transformMode == spine.TransformMode.NoScale\r\n && (pa * pd - pb * pc < 0) != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))\r\n s = -s;\r\n var r = Math.PI / 2 + Math.atan2(zc, za);\r\n var zb = Math.cos(r) * s;\r\n var zd = Math.sin(r) * s;\r\n var la = spine.MathUtils.cosDeg(shearX) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(shearX) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;\r\n this.a = za * la + zb * lc;\r\n this.b = za * lb + zb * ld;\r\n this.c = zc * la + zd * lc;\r\n this.d = zc * lb + zd * ld;\r\n break;\r\n }\r\n }\r\n this.a *= this.skeleton.scaleX;\r\n this.b *= this.skeleton.scaleX;\r\n this.c *= this.skeleton.scaleY;\r\n this.d *= this.skeleton.scaleY;\r\n };\r\n Bone.prototype.setToSetupPose = function () {\r\n var data = this.data;\r\n this.x = data.x;\r\n this.y = data.y;\r\n this.rotation = data.rotation;\r\n this.scaleX = data.scaleX;\r\n this.scaleY = data.scaleY;\r\n this.shearX = data.shearX;\r\n this.shearY = data.shearY;\r\n };\r\n Bone.prototype.getWorldRotationX = function () {\r\n return Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.getWorldRotationY = function () {\r\n return Math.atan2(this.d, this.b) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.getWorldScaleX = function () {\r\n return Math.sqrt(this.a * this.a + this.c * this.c);\r\n };\r\n Bone.prototype.getWorldScaleY = function () {\r\n return Math.sqrt(this.b * this.b + this.d * this.d);\r\n };\r\n Bone.prototype.updateAppliedTransform = function () {\r\n this.appliedValid = true;\r\n var parent = this.parent;\r\n if (parent == null) {\r\n this.ax = this.worldX;\r\n this.ay = this.worldY;\r\n this.arotation = Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\r\n this.ascaleX = Math.sqrt(this.a * this.a + this.c * this.c);\r\n this.ascaleY = Math.sqrt(this.b * this.b + this.d * this.d);\r\n this.ashearX = 0;\r\n this.ashearY = Math.atan2(this.a * this.b + this.c * this.d, this.a * this.d - this.b * this.c) * spine.MathUtils.radDeg;\r\n return;\r\n }\r\n var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n var pid = 1 / (pa * pd - pb * pc);\r\n var dx = this.worldX - parent.worldX, dy = this.worldY - parent.worldY;\r\n this.ax = (dx * pd * pid - dy * pb * pid);\r\n this.ay = (dy * pa * pid - dx * pc * pid);\r\n var ia = pid * pd;\r\n var id = pid * pa;\r\n var ib = pid * pb;\r\n var ic = pid * pc;\r\n var ra = ia * this.a - ib * this.c;\r\n var rb = ia * this.b - ib * this.d;\r\n var rc = id * this.c - ic * this.a;\r\n var rd = id * this.d - ic * this.b;\r\n this.ashearX = 0;\r\n this.ascaleX = Math.sqrt(ra * ra + rc * rc);\r\n if (this.ascaleX > 0.0001) {\r\n var det = ra * rd - rb * rc;\r\n this.ascaleY = det / this.ascaleX;\r\n this.ashearY = Math.atan2(ra * rb + rc * rd, det) * spine.MathUtils.radDeg;\r\n this.arotation = Math.atan2(rc, ra) * spine.MathUtils.radDeg;\r\n }\r\n else {\r\n this.ascaleX = 0;\r\n this.ascaleY = Math.sqrt(rb * rb + rd * rd);\r\n this.ashearY = 0;\r\n this.arotation = 90 - Math.atan2(rd, rb) * spine.MathUtils.radDeg;\r\n }\r\n };\r\n Bone.prototype.worldToLocal = function (world) {\r\n var a = this.a, b = this.b, c = this.c, d = this.d;\r\n var invDet = 1 / (a * d - b * c);\r\n var x = world.x - this.worldX, y = world.y - this.worldY;\r\n world.x = (x * d * invDet - y * b * invDet);\r\n world.y = (y * a * invDet - x * c * invDet);\r\n return world;\r\n };\r\n Bone.prototype.localToWorld = function (local) {\r\n var x = local.x, y = local.y;\r\n local.x = x * this.a + y * this.b + this.worldX;\r\n local.y = x * this.c + y * this.d + this.worldY;\r\n return local;\r\n };\r\n Bone.prototype.worldToLocalRotation = function (worldRotation) {\r\n var sin = spine.MathUtils.sinDeg(worldRotation), cos = spine.MathUtils.cosDeg(worldRotation);\r\n return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * spine.MathUtils.radDeg + this.rotation - this.shearX;\r\n };\r\n Bone.prototype.localToWorldRotation = function (localRotation) {\r\n localRotation -= this.rotation - this.shearX;\r\n var sin = spine.MathUtils.sinDeg(localRotation), cos = spine.MathUtils.cosDeg(localRotation);\r\n return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.rotateWorld = function (degrees) {\r\n var a = this.a, b = this.b, c = this.c, d = this.d;\r\n var cos = spine.MathUtils.cosDeg(degrees), sin = spine.MathUtils.sinDeg(degrees);\r\n this.a = cos * a - sin * c;\r\n this.b = cos * b - sin * d;\r\n this.c = sin * a + cos * c;\r\n this.d = sin * b + cos * d;\r\n this.appliedValid = false;\r\n };\r\n return Bone;\r\n }());\r\n spine.Bone = Bone;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BoneData = (function () {\r\n function BoneData(index, name, parent) {\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.scaleX = 1;\r\n this.scaleY = 1;\r\n this.shearX = 0;\r\n this.shearY = 0;\r\n this.transformMode = TransformMode.Normal;\r\n this.skinRequired = false;\r\n this.color = new spine.Color();\r\n if (index < 0)\r\n throw new Error(\"index must be >= 0.\");\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.parent = parent;\r\n }\r\n return BoneData;\r\n }());\r\n spine.BoneData = BoneData;\r\n var TransformMode;\r\n (function (TransformMode) {\r\n TransformMode[TransformMode[\"Normal\"] = 0] = \"Normal\";\r\n TransformMode[TransformMode[\"OnlyTranslation\"] = 1] = \"OnlyTranslation\";\r\n TransformMode[TransformMode[\"NoRotationOrReflection\"] = 2] = \"NoRotationOrReflection\";\r\n TransformMode[TransformMode[\"NoScale\"] = 3] = \"NoScale\";\r\n TransformMode[TransformMode[\"NoScaleOrReflection\"] = 4] = \"NoScaleOrReflection\";\r\n })(TransformMode = spine.TransformMode || (spine.TransformMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var ConstraintData = (function () {\r\n function ConstraintData(name, order, skinRequired) {\r\n this.name = name;\r\n this.order = order;\r\n this.skinRequired = skinRequired;\r\n }\r\n return ConstraintData;\r\n }());\r\n spine.ConstraintData = ConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Event = (function () {\r\n function Event(time, data) {\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n this.time = time;\r\n this.data = data;\r\n }\r\n return Event;\r\n }());\r\n spine.Event = Event;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var EventData = (function () {\r\n function EventData(name) {\r\n this.name = name;\r\n }\r\n return EventData;\r\n }());\r\n spine.EventData = EventData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IkConstraint = (function () {\r\n function IkConstraint(data, skeleton) {\r\n this.bendDirection = 0;\r\n this.compress = false;\r\n this.stretch = false;\r\n this.mix = 1;\r\n this.softness = 0;\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.mix = data.mix;\r\n this.softness = data.softness;\r\n this.bendDirection = data.bendDirection;\r\n this.compress = data.compress;\r\n this.stretch = data.stretch;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findBone(data.target.name);\r\n }\r\n IkConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n IkConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n IkConstraint.prototype.update = function () {\r\n var target = this.target;\r\n var bones = this.bones;\r\n switch (bones.length) {\r\n case 1:\r\n this.apply1(bones[0], target.worldX, target.worldY, this.compress, this.stretch, this.data.uniform, this.mix);\r\n break;\r\n case 2:\r\n this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.stretch, this.softness, this.mix);\r\n break;\r\n }\r\n };\r\n IkConstraint.prototype.apply1 = function (bone, targetX, targetY, compress, stretch, uniform, alpha) {\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var p = bone.parent;\r\n var pa = p.a, pb = p.b, pc = p.c, pd = p.d;\r\n var rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;\r\n switch (bone.data.transformMode) {\r\n case spine.TransformMode.OnlyTranslation:\r\n tx = targetX - bone.worldX;\r\n ty = targetY - bone.worldY;\r\n break;\r\n case spine.TransformMode.NoRotationOrReflection:\r\n var s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);\r\n var sa = pa / bone.skeleton.scaleX;\r\n var sc = pc / bone.skeleton.scaleY;\r\n pb = -sc * s * bone.skeleton.scaleX;\r\n pd = sa * s * bone.skeleton.scaleY;\r\n rotationIK += Math.atan2(sc, sa) * spine.MathUtils.radDeg;\r\n default:\r\n var x = targetX - p.worldX, y = targetY - p.worldY;\r\n var d = pa * pd - pb * pc;\r\n tx = (x * pd - y * pb) / d - bone.ax;\r\n ty = (y * pa - x * pc) / d - bone.ay;\r\n }\r\n rotationIK += Math.atan2(ty, tx) * spine.MathUtils.radDeg;\r\n if (bone.ascaleX < 0)\r\n rotationIK += 180;\r\n if (rotationIK > 180)\r\n rotationIK -= 360;\r\n else if (rotationIK < -180)\r\n rotationIK += 360;\r\n var sx = bone.ascaleX, sy = bone.ascaleY;\r\n if (compress || stretch) {\r\n switch (bone.data.transformMode) {\r\n case spine.TransformMode.NoScale:\r\n case spine.TransformMode.NoScaleOrReflection:\r\n tx = targetX - bone.worldX;\r\n ty = targetY - bone.worldY;\r\n }\r\n var b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\r\n if ((compress && dd < b) || (stretch && dd > b) && b > 0.0001) {\r\n var s = (dd / b - 1) * alpha + 1;\r\n sx *= s;\r\n if (uniform)\r\n sy *= s;\r\n }\r\n }\r\n bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, sx, sy, bone.ashearX, bone.ashearY);\r\n };\r\n IkConstraint.prototype.apply2 = function (parent, child, targetX, targetY, bendDir, stretch, softness, alpha) {\r\n if (alpha == 0) {\r\n child.updateWorldTransform();\r\n return;\r\n }\r\n if (!parent.appliedValid)\r\n parent.updateAppliedTransform();\r\n if (!child.appliedValid)\r\n child.updateAppliedTransform();\r\n var px = parent.ax, py = parent.ay, psx = parent.ascaleX, sx = psx, psy = parent.ascaleY, csx = child.ascaleX;\r\n var os1 = 0, os2 = 0, s2 = 0;\r\n if (psx < 0) {\r\n psx = -psx;\r\n os1 = 180;\r\n s2 = -1;\r\n }\r\n else {\r\n os1 = 0;\r\n s2 = 1;\r\n }\r\n if (psy < 0) {\r\n psy = -psy;\r\n s2 = -s2;\r\n }\r\n if (csx < 0) {\r\n csx = -csx;\r\n os2 = 180;\r\n }\r\n else\r\n os2 = 0;\r\n var cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d;\r\n var u = Math.abs(psx - psy) <= 0.0001;\r\n if (!u) {\r\n cy = 0;\r\n cwx = a * cx + parent.worldX;\r\n cwy = c * cx + parent.worldY;\r\n }\r\n else {\r\n cy = child.ay;\r\n cwx = a * cx + b * cy + parent.worldX;\r\n cwy = c * cx + d * cy + parent.worldY;\r\n }\r\n var pp = parent.parent;\r\n a = pp.a;\r\n b = pp.b;\r\n c = pp.c;\r\n d = pp.d;\r\n var id = 1 / (a * d - b * c), x = cwx - pp.worldX, y = cwy - pp.worldY;\r\n var dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\r\n var l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\r\n if (l1 < 0.0001) {\r\n this.apply1(parent, targetX, targetY, false, stretch, false, alpha);\r\n child.updateWorldTransformWith(cx, cy, 0, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n return;\r\n }\r\n x = targetX - pp.worldX;\r\n y = targetY - pp.worldY;\r\n var tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\r\n var dd = tx * tx + ty * ty;\r\n if (softness != 0) {\r\n softness *= psx * (csx + 1) / 2;\r\n var td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\r\n if (sd > 0) {\r\n var p = Math.min(1, sd / (softness * 2)) - 1;\r\n p = (sd - softness * (1 - p * p)) / td;\r\n tx -= p * tx;\r\n ty -= p * ty;\r\n dd = tx * tx + ty * ty;\r\n }\r\n }\r\n outer: if (u) {\r\n l2 *= psx;\r\n var cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\r\n if (cos < -1)\r\n cos = -1;\r\n else if (cos > 1) {\r\n cos = 1;\r\n if (stretch)\r\n sx *= (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\r\n }\r\n a2 = Math.acos(cos) * bendDir;\r\n a = l1 + l2 * cos;\r\n b = l2 * Math.sin(a2);\r\n a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b);\r\n }\r\n else {\r\n a = psx * l2;\r\n b = psy * l2;\r\n var aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\r\n c = bb * l1 * l1 + aa * dd - aa * bb;\r\n var c1 = -2 * bb * l1, c2 = bb - aa;\r\n d = c1 * c1 - 4 * c2 * c;\r\n if (d >= 0) {\r\n var q = Math.sqrt(d);\r\n if (c1 < 0)\r\n q = -q;\r\n q = -(c1 + q) / 2;\r\n var r0 = q / c2, r1 = c / q;\r\n var r = Math.abs(r0) < Math.abs(r1) ? r0 : r1;\r\n if (r * r <= dd) {\r\n y = Math.sqrt(dd - r * r) * bendDir;\r\n a1 = ta - Math.atan2(y, r);\r\n a2 = Math.atan2(y / psy, (r - l1) / psx);\r\n break outer;\r\n }\r\n }\r\n var minAngle = spine.MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\r\n var maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;\r\n c = -a * l1 / (aa - bb);\r\n if (c >= -1 && c <= 1) {\r\n c = Math.acos(c);\r\n x = a * Math.cos(c) + l1;\r\n y = b * Math.sin(c);\r\n d = x * x + y * y;\r\n if (d < minDist) {\r\n minAngle = c;\r\n minDist = d;\r\n minX = x;\r\n minY = y;\r\n }\r\n if (d > maxDist) {\r\n maxAngle = c;\r\n maxDist = d;\r\n maxX = x;\r\n maxY = y;\r\n }\r\n }\r\n if (dd <= (minDist + maxDist) / 2) {\r\n a1 = ta - Math.atan2(minY * bendDir, minX);\r\n a2 = minAngle * bendDir;\r\n }\r\n else {\r\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\r\n a2 = maxAngle * bendDir;\r\n }\r\n }\r\n var os = Math.atan2(cy, cx) * s2;\r\n var rotation = parent.arotation;\r\n a1 = (a1 - os) * spine.MathUtils.radDeg + os1 - rotation;\r\n if (a1 > 180)\r\n a1 -= 360;\r\n else if (a1 < -180)\r\n a1 += 360;\r\n parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, sx, parent.ascaleY, 0, 0);\r\n rotation = child.arotation;\r\n a2 = ((a2 + os) * spine.MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation;\r\n if (a2 > 180)\r\n a2 -= 360;\r\n else if (a2 < -180)\r\n a2 += 360;\r\n child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n };\r\n return IkConstraint;\r\n }());\r\n spine.IkConstraint = IkConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IkConstraintData = (function (_super) {\r\n __extends(IkConstraintData, _super);\r\n function IkConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n _this.bendDirection = 1;\r\n _this.compress = false;\r\n _this.stretch = false;\r\n _this.uniform = false;\r\n _this.mix = 1;\r\n _this.softness = 0;\r\n return _this;\r\n }\r\n return IkConstraintData;\r\n }(spine.ConstraintData));\r\n spine.IkConstraintData = IkConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathConstraint = (function () {\r\n function PathConstraint(data, skeleton) {\r\n this.position = 0;\r\n this.spacing = 0;\r\n this.rotateMix = 0;\r\n this.translateMix = 0;\r\n this.spaces = new Array();\r\n this.positions = new Array();\r\n this.world = new Array();\r\n this.curves = new Array();\r\n this.lengths = new Array();\r\n this.segments = new Array();\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (var i = 0, n = data.bones.length; i < n; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findSlot(data.target.name);\r\n this.position = data.position;\r\n this.spacing = data.spacing;\r\n this.rotateMix = data.rotateMix;\r\n this.translateMix = data.translateMix;\r\n }\r\n PathConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n PathConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n PathConstraint.prototype.update = function () {\r\n var attachment = this.target.getAttachment();\r\n if (!(attachment instanceof spine.PathAttachment))\r\n return;\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix;\r\n var translate = translateMix > 0, rotate = rotateMix > 0;\r\n if (!translate && !rotate)\r\n return;\r\n var data = this.data;\r\n var percentSpacing = data.spacingMode == spine.SpacingMode.Percent;\r\n var rotateMode = data.rotateMode;\r\n var tangents = rotateMode == spine.RotateMode.Tangent, scale = rotateMode == spine.RotateMode.ChainScale;\r\n var boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\r\n var bones = this.bones;\r\n var spaces = spine.Utils.setArraySize(this.spaces, spacesCount), lengths = null;\r\n var spacing = this.spacing;\r\n if (scale || !percentSpacing) {\r\n if (scale)\r\n lengths = spine.Utils.setArraySize(this.lengths, boneCount);\r\n var lengthSpacing = data.spacingMode == spine.SpacingMode.Length;\r\n for (var i = 0, n = spacesCount - 1; i < n;) {\r\n var bone = bones[i];\r\n var setupLength = bone.data.length;\r\n if (setupLength < PathConstraint.epsilon) {\r\n if (scale)\r\n lengths[i] = 0;\r\n spaces[++i] = 0;\r\n }\r\n else if (percentSpacing) {\r\n if (scale) {\r\n var x = setupLength * bone.a, y = setupLength * bone.c;\r\n var length_1 = Math.sqrt(x * x + y * y);\r\n lengths[i] = length_1;\r\n }\r\n spaces[++i] = spacing;\r\n }\r\n else {\r\n var x = setupLength * bone.a, y = setupLength * bone.c;\r\n var length_2 = Math.sqrt(x * x + y * y);\r\n if (scale)\r\n lengths[i] = length_2;\r\n spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length_2 / setupLength;\r\n }\r\n }\r\n }\r\n else {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] = spacing;\r\n }\r\n var positions = this.computeWorldPositions(attachment, spacesCount, tangents, data.positionMode == spine.PositionMode.Percent, percentSpacing);\r\n var boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\r\n var tip = false;\r\n if (offsetRotation == 0)\r\n tip = rotateMode == spine.RotateMode.Chain;\r\n else {\r\n tip = false;\r\n var p = this.target.bone;\r\n offsetRotation *= p.a * p.d - p.b * p.c > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n }\r\n for (var i = 0, p = 3; i < boneCount; i++, p += 3) {\r\n var bone = bones[i];\r\n bone.worldX += (boneX - bone.worldX) * translateMix;\r\n bone.worldY += (boneY - bone.worldY) * translateMix;\r\n var x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\r\n if (scale) {\r\n var length_3 = lengths[i];\r\n if (length_3 != 0) {\r\n var s = (Math.sqrt(dx * dx + dy * dy) / length_3 - 1) * rotateMix + 1;\r\n bone.a *= s;\r\n bone.c *= s;\r\n }\r\n }\r\n boneX = x;\r\n boneY = y;\r\n if (rotate) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d, r = 0, cos = 0, sin = 0;\r\n if (tangents)\r\n r = positions[p - 1];\r\n else if (spaces[i + 1] == 0)\r\n r = positions[p + 2];\r\n else\r\n r = Math.atan2(dy, dx);\r\n r -= Math.atan2(c, a);\r\n if (tip) {\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n var length_4 = bone.data.length;\r\n boneX += (length_4 * (cos * a - sin * c) - dx) * rotateMix;\r\n boneY += (length_4 * (sin * a + cos * c) - dy) * rotateMix;\r\n }\r\n else {\r\n r += offsetRotation;\r\n }\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n }\r\n bone.appliedValid = false;\r\n }\r\n };\r\n PathConstraint.prototype.computeWorldPositions = function (path, spacesCount, tangents, percentPosition, percentSpacing) {\r\n var target = this.target;\r\n var position = this.position;\r\n var spaces = this.spaces, out = spine.Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = null;\r\n var closed = path.closed;\r\n var verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = PathConstraint.NONE;\r\n if (!path.constantSpeed) {\r\n var lengths = path.lengths;\r\n curveCount -= closed ? 1 : 2;\r\n var pathLength_1 = lengths[curveCount];\r\n if (percentPosition)\r\n position *= pathLength_1;\r\n if (percentSpacing) {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] *= pathLength_1;\r\n }\r\n world = spine.Utils.setArraySize(this.world, 8);\r\n for (var i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\r\n var space = spaces[i];\r\n position += space;\r\n var p = position;\r\n if (closed) {\r\n p %= pathLength_1;\r\n if (p < 0)\r\n p += pathLength_1;\r\n curve = 0;\r\n }\r\n else if (p < 0) {\r\n if (prevCurve != PathConstraint.BEFORE) {\r\n prevCurve = PathConstraint.BEFORE;\r\n path.computeWorldVertices(target, 2, 4, world, 0, 2);\r\n }\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n }\r\n else if (p > pathLength_1) {\r\n if (prevCurve != PathConstraint.AFTER) {\r\n prevCurve = PathConstraint.AFTER;\r\n path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\r\n }\r\n this.addAfterPosition(p - pathLength_1, world, 0, out, o);\r\n continue;\r\n }\r\n for (;; curve++) {\r\n var length_5 = lengths[curve];\r\n if (p > length_5)\r\n continue;\r\n if (curve == 0)\r\n p /= length_5;\r\n else {\r\n var prev = lengths[curve - 1];\r\n p = (p - prev) / (length_5 - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n if (closed && curve == curveCount) {\r\n path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 4, world, 4, 2);\r\n }\r\n else\r\n path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\r\n }\r\n this.addCurvePosition(p, world[0], world[1], world[2], world[3], world[4], world[5], world[6], world[7], out, o, tangents || (i > 0 && space == 0));\r\n }\r\n return out;\r\n }\r\n if (closed) {\r\n verticesLength += 2;\r\n world = spine.Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength - 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 2, world, verticesLength - 4, 2);\r\n world[verticesLength - 2] = world[0];\r\n world[verticesLength - 1] = world[1];\r\n }\r\n else {\r\n curveCount--;\r\n verticesLength -= 4;\r\n world = spine.Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\r\n }\r\n var curves = spine.Utils.setArraySize(this.curves, curveCount);\r\n var pathLength = 0;\r\n var x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\r\n var tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\r\n for (var i = 0, w = 2; i < curveCount; i++, w += 6) {\r\n cx1 = world[w];\r\n cy1 = world[w + 1];\r\n cx2 = world[w + 2];\r\n cy2 = world[w + 3];\r\n x2 = world[w + 4];\r\n y2 = world[w + 5];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.1875;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.1875;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n curves[i] = pathLength;\r\n x1 = x2;\r\n y1 = y2;\r\n }\r\n if (percentPosition)\r\n position *= pathLength;\r\n else\r\n position *= pathLength / path.lengths[curveCount - 1];\r\n if (percentSpacing) {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] *= pathLength;\r\n }\r\n var segments = this.segments;\r\n var curveLength = 0;\r\n for (var i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\r\n var space = spaces[i];\r\n position += space;\r\n var p = position;\r\n if (closed) {\r\n p %= pathLength;\r\n if (p < 0)\r\n p += pathLength;\r\n curve = 0;\r\n }\r\n else if (p < 0) {\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n }\r\n else if (p > pathLength) {\r\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\r\n continue;\r\n }\r\n for (;; curve++) {\r\n var length_6 = curves[curve];\r\n if (p > length_6)\r\n continue;\r\n if (curve == 0)\r\n p /= length_6;\r\n else {\r\n var prev = curves[curve - 1];\r\n p = (p - prev) / (length_6 - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n var ii = curve * 6;\r\n x1 = world[ii];\r\n y1 = world[ii + 1];\r\n cx1 = world[ii + 2];\r\n cy1 = world[ii + 3];\r\n cx2 = world[ii + 4];\r\n cy2 = world[ii + 5];\r\n x2 = world[ii + 6];\r\n y2 = world[ii + 7];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.03;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.03;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.006;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.006;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667;\r\n curveLength = Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[0] = curveLength;\r\n for (ii = 1; ii < 8; ii++) {\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[ii] = curveLength;\r\n }\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[8] = curveLength;\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[9] = curveLength;\r\n segment = 0;\r\n }\r\n p *= curveLength;\r\n for (;; segment++) {\r\n var length_7 = segments[segment];\r\n if (p > length_7)\r\n continue;\r\n if (segment == 0)\r\n p /= length_7;\r\n else {\r\n var prev = segments[segment - 1];\r\n p = segment + (p - prev) / (length_7 - prev);\r\n }\r\n break;\r\n }\r\n this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || (i > 0 && space == 0));\r\n }\r\n return out;\r\n };\r\n PathConstraint.prototype.addBeforePosition = function (p, temp, i, out, o) {\r\n var x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n };\r\n PathConstraint.prototype.addAfterPosition = function (p, temp, i, out, o) {\r\n var x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n };\r\n PathConstraint.prototype.addCurvePosition = function (p, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents) {\r\n if (p == 0 || isNaN(p)) {\r\n out[o] = x1;\r\n out[o + 1] = y1;\r\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\r\n return;\r\n }\r\n var tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\r\n var ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\r\n var x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt;\r\n out[o] = x;\r\n out[o + 1] = y;\r\n if (tangents) {\r\n if (p < 0.001)\r\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\r\n else\r\n out[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt));\r\n }\r\n };\r\n PathConstraint.NONE = -1;\r\n PathConstraint.BEFORE = -2;\r\n PathConstraint.AFTER = -3;\r\n PathConstraint.epsilon = 0.00001;\r\n return PathConstraint;\r\n }());\r\n spine.PathConstraint = PathConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathConstraintData = (function (_super) {\r\n __extends(PathConstraintData, _super);\r\n function PathConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n return _this;\r\n }\r\n return PathConstraintData;\r\n }(spine.ConstraintData));\r\n spine.PathConstraintData = PathConstraintData;\r\n var PositionMode;\r\n (function (PositionMode) {\r\n PositionMode[PositionMode[\"Fixed\"] = 0] = \"Fixed\";\r\n PositionMode[PositionMode[\"Percent\"] = 1] = \"Percent\";\r\n })(PositionMode = spine.PositionMode || (spine.PositionMode = {}));\r\n var SpacingMode;\r\n (function (SpacingMode) {\r\n SpacingMode[SpacingMode[\"Length\"] = 0] = \"Length\";\r\n SpacingMode[SpacingMode[\"Fixed\"] = 1] = \"Fixed\";\r\n SpacingMode[SpacingMode[\"Percent\"] = 2] = \"Percent\";\r\n })(SpacingMode = spine.SpacingMode || (spine.SpacingMode = {}));\r\n var RotateMode;\r\n (function (RotateMode) {\r\n RotateMode[RotateMode[\"Tangent\"] = 0] = \"Tangent\";\r\n RotateMode[RotateMode[\"Chain\"] = 1] = \"Chain\";\r\n RotateMode[RotateMode[\"ChainScale\"] = 2] = \"ChainScale\";\r\n })(RotateMode = spine.RotateMode || (spine.RotateMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Assets = (function () {\r\n function Assets(clientId) {\r\n this.toLoad = new Array();\r\n this.assets = {};\r\n this.clientId = clientId;\r\n }\r\n Assets.prototype.loaded = function () {\r\n var i = 0;\r\n for (var v in this.assets)\r\n i++;\r\n return i;\r\n };\r\n return Assets;\r\n }());\r\n var SharedAssetManager = (function () {\r\n function SharedAssetManager(pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n this.clientAssets = {};\r\n this.queuedAssets = {};\r\n this.rawAssets = {};\r\n this.errors = {};\r\n this.pathPrefix = pathPrefix;\r\n }\r\n SharedAssetManager.prototype.queueAsset = function (clientId, textureLoader, path) {\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined) {\r\n clientAssets = new Assets(clientId);\r\n this.clientAssets[clientId] = clientAssets;\r\n }\r\n if (textureLoader !== null)\r\n clientAssets.textureLoader = textureLoader;\r\n clientAssets.toLoad.push(path);\r\n if (this.queuedAssets[path] === path) {\r\n return false;\r\n }\r\n else {\r\n this.queuedAssets[path] = path;\r\n return true;\r\n }\r\n };\r\n SharedAssetManager.prototype.loadText = function (clientId, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, null, path))\r\n return;\r\n var request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n request.onreadystatechange = function () {\r\n if (request.readyState == XMLHttpRequest.DONE) {\r\n if (request.status >= 200 && request.status < 300) {\r\n _this.rawAssets[path] = request.responseText;\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load text \" + path + \": status \" + request.status + \", \" + request.responseText;\r\n }\r\n }\r\n };\r\n request.open(\"GET\", path, true);\r\n request.send();\r\n };\r\n SharedAssetManager.prototype.loadJson = function (clientId, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, null, path))\r\n return;\r\n var request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n request.onreadystatechange = function () {\r\n if (request.readyState == XMLHttpRequest.DONE) {\r\n if (request.status >= 200 && request.status < 300) {\r\n _this.rawAssets[path] = JSON.parse(request.responseText);\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load text \" + path + \": status \" + request.status + \", \" + request.responseText;\r\n }\r\n }\r\n };\r\n request.open(\"GET\", path, true);\r\n request.send();\r\n };\r\n SharedAssetManager.prototype.loadTexture = function (clientId, textureLoader, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, textureLoader, path))\r\n return;\r\n var img = new Image();\r\n img.crossOrigin = \"anonymous\";\r\n img.onload = function (ev) {\r\n _this.rawAssets[path] = img;\r\n };\r\n img.onerror = function (ev) {\r\n _this.errors[path] = \"Couldn't load image \" + path;\r\n };\r\n img.src = path;\r\n };\r\n SharedAssetManager.prototype.get = function (clientId, path) {\r\n path = this.pathPrefix + path;\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined)\r\n return true;\r\n return clientAssets.assets[path];\r\n };\r\n SharedAssetManager.prototype.updateClientAssets = function (clientAssets) {\r\n for (var i = 0; i < clientAssets.toLoad.length; i++) {\r\n var path = clientAssets.toLoad[i];\r\n var asset = clientAssets.assets[path];\r\n if (asset === null || asset === undefined) {\r\n var rawAsset = this.rawAssets[path];\r\n if (rawAsset === null || rawAsset === undefined)\r\n continue;\r\n if (rawAsset instanceof HTMLImageElement) {\r\n clientAssets.assets[path] = clientAssets.textureLoader(rawAsset);\r\n }\r\n else {\r\n clientAssets.assets[path] = rawAsset;\r\n }\r\n }\r\n }\r\n };\r\n SharedAssetManager.prototype.isLoadingComplete = function (clientId) {\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined)\r\n return true;\r\n this.updateClientAssets(clientAssets);\r\n return clientAssets.toLoad.length == clientAssets.loaded();\r\n };\r\n SharedAssetManager.prototype.dispose = function () {\r\n };\r\n SharedAssetManager.prototype.hasErrors = function () {\r\n return Object.keys(this.errors).length > 0;\r\n };\r\n SharedAssetManager.prototype.getErrors = function () {\r\n return this.errors;\r\n };\r\n return SharedAssetManager;\r\n }());\r\n spine.SharedAssetManager = SharedAssetManager;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Skeleton = (function () {\r\n function Skeleton(data) {\r\n this._updateCache = new Array();\r\n this.updateCacheReset = new Array();\r\n this.time = 0;\r\n this.scaleX = 1;\r\n this.scaleY = 1;\r\n this.x = 0;\r\n this.y = 0;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++) {\r\n var boneData = data.bones[i];\r\n var bone = void 0;\r\n if (boneData.parent == null)\r\n bone = new spine.Bone(boneData, this, null);\r\n else {\r\n var parent_1 = this.bones[boneData.parent.index];\r\n bone = new spine.Bone(boneData, this, parent_1);\r\n parent_1.children.push(bone);\r\n }\r\n this.bones.push(bone);\r\n }\r\n this.slots = new Array();\r\n this.drawOrder = new Array();\r\n for (var i = 0; i < data.slots.length; i++) {\r\n var slotData = data.slots[i];\r\n var bone = this.bones[slotData.boneData.index];\r\n var slot = new spine.Slot(slotData, bone);\r\n this.slots.push(slot);\r\n this.drawOrder.push(slot);\r\n }\r\n this.ikConstraints = new Array();\r\n for (var i = 0; i < data.ikConstraints.length; i++) {\r\n var ikConstraintData = data.ikConstraints[i];\r\n this.ikConstraints.push(new spine.IkConstraint(ikConstraintData, this));\r\n }\r\n this.transformConstraints = new Array();\r\n for (var i = 0; i < data.transformConstraints.length; i++) {\r\n var transformConstraintData = data.transformConstraints[i];\r\n this.transformConstraints.push(new spine.TransformConstraint(transformConstraintData, this));\r\n }\r\n this.pathConstraints = new Array();\r\n for (var i = 0; i < data.pathConstraints.length; i++) {\r\n var pathConstraintData = data.pathConstraints[i];\r\n this.pathConstraints.push(new spine.PathConstraint(pathConstraintData, this));\r\n }\r\n this.color = new spine.Color(1, 1, 1, 1);\r\n this.updateCache();\r\n }\r\n Skeleton.prototype.updateCache = function () {\r\n var updateCache = this._updateCache;\r\n updateCache.length = 0;\r\n this.updateCacheReset.length = 0;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n bone.sorted = bone.data.skinRequired;\r\n bone.active = !bone.sorted;\r\n }\r\n if (this.skin != null) {\r\n var skinBones = this.skin.bones;\r\n for (var i = 0, n = this.skin.bones.length; i < n; i++) {\r\n var bone = this.bones[skinBones[i].index];\r\n do {\r\n bone.sorted = false;\r\n bone.active = true;\r\n bone = bone.parent;\r\n } while (bone != null);\r\n }\r\n }\r\n var ikConstraints = this.ikConstraints;\r\n var transformConstraints = this.transformConstraints;\r\n var pathConstraints = this.pathConstraints;\r\n var ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\r\n var constraintCount = ikCount + transformCount + pathCount;\r\n outer: for (var i = 0; i < constraintCount; i++) {\r\n for (var ii = 0; ii < ikCount; ii++) {\r\n var constraint = ikConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortIkConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (var ii = 0; ii < transformCount; ii++) {\r\n var constraint = transformConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortTransformConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (var ii = 0; ii < pathCount; ii++) {\r\n var constraint = pathConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortPathConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n }\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n this.sortBone(bones[i]);\r\n };\r\n Skeleton.prototype.sortIkConstraint = function (constraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n var target = constraint.target;\r\n this.sortBone(target);\r\n var constrained = constraint.bones;\r\n var parent = constrained[0];\r\n this.sortBone(parent);\r\n if (constrained.length > 1) {\r\n var child = constrained[constrained.length - 1];\r\n if (!(this._updateCache.indexOf(child) > -1))\r\n this.updateCacheReset.push(child);\r\n }\r\n this._updateCache.push(constraint);\r\n this.sortReset(parent.children);\r\n constrained[constrained.length - 1].sorted = true;\r\n };\r\n Skeleton.prototype.sortPathConstraint = function (constraint) {\r\n constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n var slot = constraint.target;\r\n var slotIndex = slot.data.index;\r\n var slotBone = slot.bone;\r\n if (this.skin != null)\r\n this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\r\n if (this.data.defaultSkin != null && this.data.defaultSkin != this.skin)\r\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\r\n for (var i = 0, n = this.data.skins.length; i < n; i++)\r\n this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.PathAttachment)\r\n this.sortPathConstraintAttachmentWith(attachment, slotBone);\r\n var constrained = constraint.bones;\r\n var boneCount = constrained.length;\r\n for (var i = 0; i < boneCount; i++)\r\n this.sortBone(constrained[i]);\r\n this._updateCache.push(constraint);\r\n for (var i = 0; i < boneCount; i++)\r\n this.sortReset(constrained[i].children);\r\n for (var i = 0; i < boneCount; i++)\r\n constrained[i].sorted = true;\r\n };\r\n Skeleton.prototype.sortTransformConstraint = function (constraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n this.sortBone(constraint.target);\r\n var constrained = constraint.bones;\r\n var boneCount = constrained.length;\r\n if (constraint.data.local) {\r\n for (var i = 0; i < boneCount; i++) {\r\n var child = constrained[i];\r\n this.sortBone(child.parent);\r\n if (!(this._updateCache.indexOf(child) > -1))\r\n this.updateCacheReset.push(child);\r\n }\r\n }\r\n else {\r\n for (var i = 0; i < boneCount; i++) {\r\n this.sortBone(constrained[i]);\r\n }\r\n }\r\n this._updateCache.push(constraint);\r\n for (var ii = 0; ii < boneCount; ii++)\r\n this.sortReset(constrained[ii].children);\r\n for (var ii = 0; ii < boneCount; ii++)\r\n constrained[ii].sorted = true;\r\n };\r\n Skeleton.prototype.sortPathConstraintAttachment = function (skin, slotIndex, slotBone) {\r\n var attachments = skin.attachments[slotIndex];\r\n if (!attachments)\r\n return;\r\n for (var key in attachments) {\r\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\r\n }\r\n };\r\n Skeleton.prototype.sortPathConstraintAttachmentWith = function (attachment, slotBone) {\r\n if (!(attachment instanceof spine.PathAttachment))\r\n return;\r\n var pathBones = attachment.bones;\r\n if (pathBones == null)\r\n this.sortBone(slotBone);\r\n else {\r\n var bones = this.bones;\r\n var i = 0;\r\n while (i < pathBones.length) {\r\n var boneCount = pathBones[i++];\r\n for (var n = i + boneCount; i < n; i++) {\r\n var boneIndex = pathBones[i];\r\n this.sortBone(bones[boneIndex]);\r\n }\r\n }\r\n }\r\n };\r\n Skeleton.prototype.sortBone = function (bone) {\r\n if (bone.sorted)\r\n return;\r\n var parent = bone.parent;\r\n if (parent != null)\r\n this.sortBone(parent);\r\n bone.sorted = true;\r\n this._updateCache.push(bone);\r\n };\r\n Skeleton.prototype.sortReset = function (bones) {\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.active)\r\n continue;\r\n if (bone.sorted)\r\n this.sortReset(bone.children);\r\n bone.sorted = false;\r\n }\r\n };\r\n Skeleton.prototype.updateWorldTransform = function () {\r\n var updateCacheReset = this.updateCacheReset;\r\n for (var i = 0, n = updateCacheReset.length; i < n; i++) {\r\n var bone = updateCacheReset[i];\r\n bone.ax = bone.x;\r\n bone.ay = bone.y;\r\n bone.arotation = bone.rotation;\r\n bone.ascaleX = bone.scaleX;\r\n bone.ascaleY = bone.scaleY;\r\n bone.ashearX = bone.shearX;\r\n bone.ashearY = bone.shearY;\r\n bone.appliedValid = true;\r\n }\r\n var updateCache = this._updateCache;\r\n for (var i = 0, n = updateCache.length; i < n; i++)\r\n updateCache[i].update();\r\n };\r\n Skeleton.prototype.setToSetupPose = function () {\r\n this.setBonesToSetupPose();\r\n this.setSlotsToSetupPose();\r\n };\r\n Skeleton.prototype.setBonesToSetupPose = function () {\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n bones[i].setToSetupPose();\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var constraint = ikConstraints[i];\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n var data = constraint.data;\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n constraint.scaleMix = data.scaleMix;\r\n constraint.shearMix = data.shearMix;\r\n }\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n var data = constraint.data;\r\n constraint.position = data.position;\r\n constraint.spacing = data.spacing;\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n }\r\n };\r\n Skeleton.prototype.setSlotsToSetupPose = function () {\r\n var slots = this.slots;\r\n spine.Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n slots[i].setToSetupPose();\r\n };\r\n Skeleton.prototype.getRootBone = function () {\r\n if (this.bones.length == 0)\r\n return null;\r\n return this.bones[0];\r\n };\r\n Skeleton.prototype.findBone = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (bone.data.name == boneName)\r\n return bone;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findBoneIndex = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n if (bones[i].data.name == boneName)\r\n return i;\r\n return -1;\r\n };\r\n Skeleton.prototype.findSlot = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.data.name == slotName)\r\n return slot;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findSlotIndex = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n if (slots[i].data.name == slotName)\r\n return i;\r\n return -1;\r\n };\r\n Skeleton.prototype.setSkinByName = function (skinName) {\r\n var skin = this.data.findSkin(skinName);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + skinName);\r\n this.setSkin(skin);\r\n };\r\n Skeleton.prototype.setSkin = function (newSkin) {\r\n if (newSkin == this.skin)\r\n return;\r\n if (newSkin != null) {\r\n if (this.skin != null)\r\n newSkin.attachAll(this, this.skin);\r\n else {\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n var name_1 = slot.data.attachmentName;\r\n if (name_1 != null) {\r\n var attachment = newSkin.getAttachment(i, name_1);\r\n if (attachment != null)\r\n slot.setAttachment(attachment);\r\n }\r\n }\r\n }\r\n }\r\n this.skin = newSkin;\r\n this.updateCache();\r\n };\r\n Skeleton.prototype.getAttachmentByName = function (slotName, attachmentName) {\r\n return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName);\r\n };\r\n Skeleton.prototype.getAttachment = function (slotIndex, attachmentName) {\r\n if (attachmentName == null)\r\n throw new Error(\"attachmentName cannot be null.\");\r\n if (this.skin != null) {\r\n var attachment = this.skin.getAttachment(slotIndex, attachmentName);\r\n if (attachment != null)\r\n return attachment;\r\n }\r\n if (this.data.defaultSkin != null)\r\n return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\r\n return null;\r\n };\r\n Skeleton.prototype.setAttachment = function (slotName, attachmentName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.data.name == slotName) {\r\n var attachment = null;\r\n if (attachmentName != null) {\r\n attachment = this.getAttachment(i, attachmentName);\r\n if (attachment == null)\r\n throw new Error(\"Attachment not found: \" + attachmentName + \", for slot: \" + slotName);\r\n }\r\n slot.setAttachment(attachment);\r\n return;\r\n }\r\n }\r\n throw new Error(\"Slot not found: \" + slotName);\r\n };\r\n Skeleton.prototype.findIkConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var ikConstraint = ikConstraints[i];\r\n if (ikConstraint.data.name == constraintName)\r\n return ikConstraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findTransformConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n if (constraint.data.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findPathConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n if (constraint.data.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.getBounds = function (offset, size, temp) {\r\n if (temp === void 0) { temp = new Array(2); }\r\n if (offset == null)\r\n throw new Error(\"offset cannot be null.\");\r\n if (size == null)\r\n throw new Error(\"size cannot be null.\");\r\n var drawOrder = this.drawOrder;\r\n var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var slot = drawOrder[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var verticesLength = 0;\r\n var vertices = null;\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.RegionAttachment) {\r\n verticesLength = 8;\r\n vertices = spine.Utils.setArraySize(temp, verticesLength, 0);\r\n attachment.computeWorldVertices(slot.bone, vertices, 0, 2);\r\n }\r\n else if (attachment instanceof spine.MeshAttachment) {\r\n var mesh = attachment;\r\n verticesLength = mesh.worldVerticesLength;\r\n vertices = spine.Utils.setArraySize(temp, verticesLength, 0);\r\n mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\r\n }\r\n if (vertices != null) {\r\n for (var ii = 0, nn = vertices.length; ii < nn; ii += 2) {\r\n var x = vertices[ii], y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n }\r\n offset.set(minX, minY);\r\n size.set(maxX - minX, maxY - minY);\r\n };\r\n Skeleton.prototype.update = function (delta) {\r\n this.time += delta;\r\n };\r\n return Skeleton;\r\n }());\r\n spine.Skeleton = Skeleton;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonBinary = (function () {\r\n function SkeletonBinary(attachmentLoader) {\r\n this.scale = 1;\r\n this.linkedMeshes = new Array();\r\n this.attachmentLoader = attachmentLoader;\r\n }\r\n SkeletonBinary.prototype.readSkeletonData = function (binary) {\r\n var scale = this.scale;\r\n var skeletonData = new spine.SkeletonData();\r\n skeletonData.name = \"\";\r\n var input = new BinaryInput(binary);\r\n skeletonData.hash = input.readString();\r\n skeletonData.version = input.readString();\r\n if (\"3.8.75\" == skeletonData.version)\r\n throw new Error(\"Unsupported skeleton data, please export with a newer version of Spine.\");\r\n skeletonData.x = input.readFloat();\r\n skeletonData.y = input.readFloat();\r\n skeletonData.width = input.readFloat();\r\n skeletonData.height = input.readFloat();\r\n var nonessential = input.readBoolean();\r\n if (nonessential) {\r\n skeletonData.fps = input.readFloat();\r\n skeletonData.imagesPath = input.readString();\r\n skeletonData.audioPath = input.readString();\r\n }\r\n var n = 0;\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++)\r\n input.strings.push(input.readString());\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var name_2 = input.readString();\r\n var parent_2 = i == 0 ? null : skeletonData.bones[input.readInt(true)];\r\n var data = new spine.BoneData(i, name_2, parent_2);\r\n data.rotation = input.readFloat();\r\n data.x = input.readFloat() * scale;\r\n data.y = input.readFloat() * scale;\r\n data.scaleX = input.readFloat();\r\n data.scaleY = input.readFloat();\r\n data.shearX = input.readFloat();\r\n data.shearY = input.readFloat();\r\n data.length = input.readFloat() * scale;\r\n data.transformMode = SkeletonBinary.TransformModeValues[input.readInt(true)];\r\n data.skinRequired = input.readBoolean();\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(data.color, input.readInt32());\r\n skeletonData.bones.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var slotName = input.readString();\r\n var boneData = skeletonData.bones[input.readInt(true)];\r\n var data = new spine.SlotData(i, slotName, boneData);\r\n spine.Color.rgba8888ToColor(data.color, input.readInt32());\r\n var darkColor = input.readInt32();\r\n if (darkColor != -1)\r\n spine.Color.rgb888ToColor(data.darkColor = new spine.Color(), darkColor);\r\n data.attachmentName = input.readStringRef();\r\n data.blendMode = SkeletonBinary.BlendModeValues[input.readInt(true)];\r\n skeletonData.slots.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.IkConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.bones[input.readInt(true)];\r\n data.mix = input.readFloat();\r\n data.softness = input.readFloat() * scale;\r\n data.bendDirection = input.readByte();\r\n data.compress = input.readBoolean();\r\n data.stretch = input.readBoolean();\r\n data.uniform = input.readBoolean();\r\n skeletonData.ikConstraints.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.TransformConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.bones[input.readInt(true)];\r\n data.local = input.readBoolean();\r\n data.relative = input.readBoolean();\r\n data.offsetRotation = input.readFloat();\r\n data.offsetX = input.readFloat() * scale;\r\n data.offsetY = input.readFloat() * scale;\r\n data.offsetScaleX = input.readFloat();\r\n data.offsetScaleY = input.readFloat();\r\n data.offsetShearY = input.readFloat();\r\n data.rotateMix = input.readFloat();\r\n data.translateMix = input.readFloat();\r\n data.scaleMix = input.readFloat();\r\n data.shearMix = input.readFloat();\r\n skeletonData.transformConstraints.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.PathConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.slots[input.readInt(true)];\r\n data.positionMode = SkeletonBinary.PositionModeValues[input.readInt(true)];\r\n data.spacingMode = SkeletonBinary.SpacingModeValues[input.readInt(true)];\r\n data.rotateMode = SkeletonBinary.RotateModeValues[input.readInt(true)];\r\n data.offsetRotation = input.readFloat();\r\n data.position = input.readFloat();\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n data.position *= scale;\r\n data.spacing = input.readFloat();\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n data.spacing *= scale;\r\n data.rotateMix = input.readFloat();\r\n data.translateMix = input.readFloat();\r\n skeletonData.pathConstraints.push(data);\r\n }\r\n var defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\r\n if (defaultSkin != null) {\r\n skeletonData.defaultSkin = defaultSkin;\r\n skeletonData.skins.push(defaultSkin);\r\n }\r\n {\r\n var i = skeletonData.skins.length;\r\n spine.Utils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\r\n for (; i < n; i++)\r\n skeletonData.skins[i] = this.readSkin(input, skeletonData, false, nonessential);\r\n }\r\n n = this.linkedMeshes.length;\r\n for (var i = 0; i < n; i++) {\r\n var linkedMesh = this.linkedMeshes[i];\r\n var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + linkedMesh.skin);\r\n var parent_3 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n if (parent_3 == null)\r\n throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\r\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_3 : linkedMesh.mesh;\r\n linkedMesh.mesh.setParentMesh(parent_3);\r\n linkedMesh.mesh.updateUVs();\r\n }\r\n this.linkedMeshes.length = 0;\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var data = new spine.EventData(input.readStringRef());\r\n data.intValue = input.readInt(false);\r\n data.floatValue = input.readFloat();\r\n data.stringValue = input.readString();\r\n data.audioPath = input.readString();\r\n if (data.audioPath != null) {\r\n data.volume = input.readFloat();\r\n data.balance = input.readFloat();\r\n }\r\n skeletonData.events.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++)\r\n skeletonData.animations.push(this.readAnimation(input, input.readString(), skeletonData));\r\n return skeletonData;\r\n };\r\n SkeletonBinary.prototype.readSkin = function (input, skeletonData, defaultSkin, nonessential) {\r\n var skin = null;\r\n var slotCount = 0;\r\n if (defaultSkin) {\r\n slotCount = input.readInt(true);\r\n if (slotCount == 0)\r\n return null;\r\n skin = new spine.Skin(\"default\");\r\n }\r\n else {\r\n skin = new spine.Skin(input.readStringRef());\r\n skin.bones.length = input.readInt(true);\r\n for (var i = 0, n = skin.bones.length; i < n; i++)\r\n skin.bones[i] = skeletonData.bones[input.readInt(true)];\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.pathConstraints[input.readInt(true)]);\r\n slotCount = input.readInt(true);\r\n }\r\n for (var i = 0; i < slotCount; i++) {\r\n var slotIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var name_3 = input.readStringRef();\r\n var attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name_3, nonessential);\r\n if (attachment != null)\r\n skin.setAttachment(slotIndex, name_3, attachment);\r\n }\r\n }\r\n return skin;\r\n };\r\n SkeletonBinary.prototype.readAttachment = function (input, skeletonData, skin, slotIndex, attachmentName, nonessential) {\r\n var scale = this.scale;\r\n var name = input.readStringRef();\r\n if (name == null)\r\n name = attachmentName;\r\n var typeIndex = input.readByte();\r\n var type = SkeletonBinary.AttachmentTypeValues[typeIndex];\r\n switch (type) {\r\n case spine.AttachmentType.Region: {\r\n var path = input.readStringRef();\r\n var rotation = input.readFloat();\r\n var x = input.readFloat();\r\n var y = input.readFloat();\r\n var scaleX = input.readFloat();\r\n var scaleY = input.readFloat();\r\n var width = input.readFloat();\r\n var height = input.readFloat();\r\n var color = input.readInt32();\r\n if (path == null)\r\n path = name;\r\n var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\r\n if (region == null)\r\n return null;\r\n region.path = path;\r\n region.x = x * scale;\r\n region.y = y * scale;\r\n region.scaleX = scaleX;\r\n region.scaleY = scaleY;\r\n region.rotation = rotation;\r\n region.width = width * scale;\r\n region.height = height * scale;\r\n spine.Color.rgba8888ToColor(region.color, color);\r\n region.updateOffset();\r\n return region;\r\n }\r\n case spine.AttachmentType.BoundingBox: {\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var color = nonessential ? input.readInt32() : 0;\r\n var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n if (box == null)\r\n return null;\r\n box.worldVerticesLength = vertexCount << 1;\r\n box.vertices = vertices.vertices;\r\n box.bones = vertices.bones;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(box.color, color);\r\n return box;\r\n }\r\n case spine.AttachmentType.Mesh: {\r\n var path = input.readStringRef();\r\n var color = input.readInt32();\r\n var vertexCount = input.readInt(true);\r\n var uvs = this.readFloatArray(input, vertexCount << 1, 1);\r\n var triangles = this.readShortArray(input);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var hullLength = input.readInt(true);\r\n var edges = null;\r\n var width = 0, height = 0;\r\n if (nonessential) {\r\n edges = this.readShortArray(input);\r\n width = input.readFloat();\r\n height = input.readFloat();\r\n }\r\n if (path == null)\r\n path = name;\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n spine.Color.rgba8888ToColor(mesh.color, color);\r\n mesh.bones = vertices.bones;\r\n mesh.vertices = vertices.vertices;\r\n mesh.worldVerticesLength = vertexCount << 1;\r\n mesh.triangles = triangles;\r\n mesh.regionUVs = uvs;\r\n mesh.updateUVs();\r\n mesh.hullLength = hullLength << 1;\r\n if (nonessential) {\r\n mesh.edges = edges;\r\n mesh.width = width * scale;\r\n mesh.height = height * scale;\r\n }\r\n return mesh;\r\n }\r\n case spine.AttachmentType.LinkedMesh: {\r\n var path = input.readStringRef();\r\n var color = input.readInt32();\r\n var skinName = input.readStringRef();\r\n var parent_4 = input.readStringRef();\r\n var inheritDeform = input.readBoolean();\r\n var width = 0, height = 0;\r\n if (nonessential) {\r\n width = input.readFloat();\r\n height = input.readFloat();\r\n }\r\n if (path == null)\r\n path = name;\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n spine.Color.rgba8888ToColor(mesh.color, color);\r\n if (nonessential) {\r\n mesh.width = width * scale;\r\n mesh.height = height * scale;\r\n }\r\n this.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent_4, inheritDeform));\r\n return mesh;\r\n }\r\n case spine.AttachmentType.Path: {\r\n var closed_1 = input.readBoolean();\r\n var constantSpeed = input.readBoolean();\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var lengths = spine.Utils.newArray(vertexCount / 3, 0);\r\n for (var i = 0, n = lengths.length; i < n; i++)\r\n lengths[i] = input.readFloat() * scale;\r\n var color = nonessential ? input.readInt32() : 0;\r\n var path = this.attachmentLoader.newPathAttachment(skin, name);\r\n if (path == null)\r\n return null;\r\n path.closed = closed_1;\r\n path.constantSpeed = constantSpeed;\r\n path.worldVerticesLength = vertexCount << 1;\r\n path.vertices = vertices.vertices;\r\n path.bones = vertices.bones;\r\n path.lengths = lengths;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(path.color, color);\r\n return path;\r\n }\r\n case spine.AttachmentType.Point: {\r\n var rotation = input.readFloat();\r\n var x = input.readFloat();\r\n var y = input.readFloat();\r\n var color = nonessential ? input.readInt32() : 0;\r\n var point = this.attachmentLoader.newPointAttachment(skin, name);\r\n if (point == null)\r\n return null;\r\n point.x = x * scale;\r\n point.y = y * scale;\r\n point.rotation = rotation;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(point.color, color);\r\n return point;\r\n }\r\n case spine.AttachmentType.Clipping: {\r\n var endSlotIndex = input.readInt(true);\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var color = nonessential ? input.readInt32() : 0;\r\n var clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n if (clip == null)\r\n return null;\r\n clip.endSlot = skeletonData.slots[endSlotIndex];\r\n clip.worldVerticesLength = vertexCount << 1;\r\n clip.vertices = vertices.vertices;\r\n clip.bones = vertices.bones;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(clip.color, color);\r\n return clip;\r\n }\r\n }\r\n return null;\r\n };\r\n SkeletonBinary.prototype.readVertices = function (input, vertexCount) {\r\n var verticesLength = vertexCount << 1;\r\n var vertices = new Vertices();\r\n var scale = this.scale;\r\n if (!input.readBoolean()) {\r\n vertices.vertices = this.readFloatArray(input, verticesLength, scale);\r\n return vertices;\r\n }\r\n var weights = new Array();\r\n var bonesArray = new Array();\r\n for (var i = 0; i < vertexCount; i++) {\r\n var boneCount = input.readInt(true);\r\n bonesArray.push(boneCount);\r\n for (var ii = 0; ii < boneCount; ii++) {\r\n bonesArray.push(input.readInt(true));\r\n weights.push(input.readFloat() * scale);\r\n weights.push(input.readFloat() * scale);\r\n weights.push(input.readFloat());\r\n }\r\n }\r\n vertices.vertices = spine.Utils.toFloatArray(weights);\r\n vertices.bones = bonesArray;\r\n return vertices;\r\n };\r\n SkeletonBinary.prototype.readFloatArray = function (input, n, scale) {\r\n var array = new Array(n);\r\n if (scale == 1) {\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readFloat();\r\n }\r\n else {\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readFloat() * scale;\r\n }\r\n return array;\r\n };\r\n SkeletonBinary.prototype.readShortArray = function (input) {\r\n var n = input.readInt(true);\r\n var array = new Array(n);\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readShort();\r\n return array;\r\n };\r\n SkeletonBinary.prototype.readAnimation = function (input, name, skeletonData) {\r\n var timelines = new Array();\r\n var scale = this.scale;\r\n var duration = 0;\r\n var tempColor1 = new spine.Color();\r\n var tempColor2 = new spine.Color();\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var slotIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.SLOT_ATTACHMENT: {\r\n var timeline = new spine.AttachmentTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++)\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readStringRef());\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[frameCount - 1]);\r\n break;\r\n }\r\n case SkeletonBinary.SLOT_COLOR: {\r\n var timeline = new spine.ColorTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n spine.Color.rgba8888ToColor(tempColor1, input.readInt32());\r\n timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.ColorTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.SLOT_TWO_COLOR: {\r\n var timeline = new spine.TwoColorTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n spine.Color.rgba8888ToColor(tempColor1, input.readInt32());\r\n spine.Color.rgb888ToColor(tempColor2, input.readInt32());\r\n timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a, tempColor2.r, tempColor2.g, tempColor2.b);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TwoColorTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var boneIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.BONE_ROTATE: {\r\n var timeline = new spine.RotateTimeline(frameCount);\r\n timeline.boneIndex = boneIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.RotateTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.BONE_TRANSLATE:\r\n case SkeletonBinary.BONE_SCALE:\r\n case SkeletonBinary.BONE_SHEAR: {\r\n var timeline = void 0;\r\n var timelineScale = 1;\r\n if (timelineType == SkeletonBinary.BONE_SCALE)\r\n timeline = new spine.ScaleTimeline(frameCount);\r\n else if (timelineType == SkeletonBinary.BONE_SHEAR)\r\n timeline = new spine.ShearTimeline(frameCount);\r\n else {\r\n timeline = new spine.TranslateTimeline(frameCount);\r\n timelineScale = scale;\r\n }\r\n timeline.boneIndex = boneIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale, input.readFloat() * timelineScale);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TranslateTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.IkConstraintTimeline(frameCount);\r\n timeline.ikConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat() * scale, input.readByte(), input.readBoolean(), input.readBoolean());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.IkConstraintTimeline.ENTRIES]);\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.TransformConstraintTimeline(frameCount);\r\n timeline.transformConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TransformConstraintTimeline.ENTRIES]);\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var data = skeletonData.pathConstraints[index];\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.PATH_POSITION:\r\n case SkeletonBinary.PATH_SPACING: {\r\n var timeline = void 0;\r\n var timelineScale = 1;\r\n if (timelineType == SkeletonBinary.PATH_SPACING) {\r\n timeline = new spine.PathConstraintSpacingTimeline(frameCount);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n else {\r\n timeline = new spine.PathConstraintPositionTimeline(frameCount);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n timeline.pathConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.PATH_MIX: {\r\n var timeline = new spine.PathConstraintMixTimeline(frameCount);\r\n timeline.pathConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var skin = skeletonData.skins[input.readInt(true)];\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var slotIndex = input.readInt(true);\r\n for (var iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\r\n var attachment = skin.getAttachment(slotIndex, input.readStringRef());\r\n var weighted = attachment.bones != null;\r\n var vertices = attachment.vertices;\r\n var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.DeformTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n timeline.attachment = attachment;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n var deform = void 0;\r\n var end = input.readInt(true);\r\n if (end == 0)\r\n deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\r\n else {\r\n deform = spine.Utils.newFloatArray(deformLength);\r\n var start = input.readInt(true);\r\n end += start;\r\n if (scale == 1) {\r\n for (var v = start; v < end; v++)\r\n deform[v] = input.readFloat();\r\n }\r\n else {\r\n for (var v = start; v < end; v++)\r\n deform[v] = input.readFloat() * scale;\r\n }\r\n if (!weighted) {\r\n for (var v = 0, vn = deform.length; v < vn; v++)\r\n deform[v] += vertices[v];\r\n }\r\n }\r\n timeline.setFrame(frameIndex, time, deform);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[frameCount - 1]);\r\n }\r\n }\r\n }\r\n var drawOrderCount = input.readInt(true);\r\n if (drawOrderCount > 0) {\r\n var timeline = new spine.DrawOrderTimeline(drawOrderCount);\r\n var slotCount = skeletonData.slots.length;\r\n for (var i = 0; i < drawOrderCount; i++) {\r\n var time = input.readFloat();\r\n var offsetCount = input.readInt(true);\r\n var drawOrder = spine.Utils.newArray(slotCount, 0);\r\n for (var ii = slotCount - 1; ii >= 0; ii--)\r\n drawOrder[ii] = -1;\r\n var unchanged = spine.Utils.newArray(slotCount - offsetCount, 0);\r\n var originalIndex = 0, unchangedIndex = 0;\r\n for (var ii = 0; ii < offsetCount; ii++) {\r\n var slotIndex = input.readInt(true);\r\n while (originalIndex != slotIndex)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n drawOrder[originalIndex + input.readInt(true)] = originalIndex++;\r\n }\r\n while (originalIndex < slotCount)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n for (var ii = slotCount - 1; ii >= 0; ii--)\r\n if (drawOrder[ii] == -1)\r\n drawOrder[ii] = unchanged[--unchangedIndex];\r\n timeline.setFrame(i, time, drawOrder);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[drawOrderCount - 1]);\r\n }\r\n var eventCount = input.readInt(true);\r\n if (eventCount > 0) {\r\n var timeline = new spine.EventTimeline(eventCount);\r\n for (var i = 0; i < eventCount; i++) {\r\n var time = input.readFloat();\r\n var eventData = skeletonData.events[input.readInt(true)];\r\n var event_4 = new spine.Event(time, eventData);\r\n event_4.intValue = input.readInt(false);\r\n event_4.floatValue = input.readFloat();\r\n event_4.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\r\n if (event_4.data.audioPath != null) {\r\n event_4.volume = input.readFloat();\r\n event_4.balance = input.readFloat();\r\n }\r\n timeline.setFrame(i, event_4);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[eventCount - 1]);\r\n }\r\n return new spine.Animation(name, timelines, duration);\r\n };\r\n SkeletonBinary.prototype.readCurve = function (input, frameIndex, timeline) {\r\n switch (input.readByte()) {\r\n case SkeletonBinary.CURVE_STEPPED:\r\n timeline.setStepped(frameIndex);\r\n break;\r\n case SkeletonBinary.CURVE_BEZIER:\r\n this.setCurve(timeline, frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\r\n break;\r\n }\r\n };\r\n SkeletonBinary.prototype.setCurve = function (timeline, frameIndex, cx1, cy1, cx2, cy2) {\r\n timeline.setCurve(frameIndex, cx1, cy1, cx2, cy2);\r\n };\r\n SkeletonBinary.AttachmentTypeValues = [0, 1, 2, 3, 4, 5, 6];\r\n SkeletonBinary.TransformModeValues = [spine.TransformMode.Normal, spine.TransformMode.OnlyTranslation, spine.TransformMode.NoRotationOrReflection, spine.TransformMode.NoScale, spine.TransformMode.NoScaleOrReflection];\r\n SkeletonBinary.PositionModeValues = [spine.PositionMode.Fixed, spine.PositionMode.Percent];\r\n SkeletonBinary.SpacingModeValues = [spine.SpacingMode.Length, spine.SpacingMode.Fixed, spine.SpacingMode.Percent];\r\n SkeletonBinary.RotateModeValues = [spine.RotateMode.Tangent, spine.RotateMode.Chain, spine.RotateMode.ChainScale];\r\n SkeletonBinary.BlendModeValues = [spine.BlendMode.Normal, spine.BlendMode.Additive, spine.BlendMode.Multiply, spine.BlendMode.Screen];\r\n SkeletonBinary.BONE_ROTATE = 0;\r\n SkeletonBinary.BONE_TRANSLATE = 1;\r\n SkeletonBinary.BONE_SCALE = 2;\r\n SkeletonBinary.BONE_SHEAR = 3;\r\n SkeletonBinary.SLOT_ATTACHMENT = 0;\r\n SkeletonBinary.SLOT_COLOR = 1;\r\n SkeletonBinary.SLOT_TWO_COLOR = 2;\r\n SkeletonBinary.PATH_POSITION = 0;\r\n SkeletonBinary.PATH_SPACING = 1;\r\n SkeletonBinary.PATH_MIX = 2;\r\n SkeletonBinary.CURVE_LINEAR = 0;\r\n SkeletonBinary.CURVE_STEPPED = 1;\r\n SkeletonBinary.CURVE_BEZIER = 2;\r\n return SkeletonBinary;\r\n }());\r\n spine.SkeletonBinary = SkeletonBinary;\r\n var BinaryInput = (function () {\r\n function BinaryInput(data, strings, index, buffer) {\r\n if (strings === void 0) { strings = new Array(); }\r\n if (index === void 0) { index = 0; }\r\n if (buffer === void 0) { buffer = new DataView(data.buffer); }\r\n this.strings = strings;\r\n this.index = index;\r\n this.buffer = buffer;\r\n }\r\n BinaryInput.prototype.readByte = function () {\r\n return this.buffer.getInt8(this.index++);\r\n };\r\n BinaryInput.prototype.readShort = function () {\r\n var value = this.buffer.getInt16(this.index);\r\n this.index += 2;\r\n return value;\r\n };\r\n BinaryInput.prototype.readInt32 = function () {\r\n var value = this.buffer.getInt32(this.index);\r\n this.index += 4;\r\n return value;\r\n };\r\n BinaryInput.prototype.readInt = function (optimizePositive) {\r\n var b = this.readByte();\r\n var result = b & 0x7F;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 7;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 14;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 21;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 28;\r\n }\r\n }\r\n }\r\n }\r\n return optimizePositive ? result : ((result >>> 1) ^ -(result & 1));\r\n };\r\n BinaryInput.prototype.readStringRef = function () {\r\n var index = this.readInt(true);\r\n return index == 0 ? null : this.strings[index - 1];\r\n };\r\n BinaryInput.prototype.readString = function () {\r\n var byteCount = this.readInt(true);\r\n switch (byteCount) {\r\n case 0:\r\n return null;\r\n case 1:\r\n return \"\";\r\n }\r\n byteCount--;\r\n var chars = \"\";\r\n var charCount = 0;\r\n for (var i = 0; i < byteCount;) {\r\n var b = this.readByte();\r\n switch (b >> 4) {\r\n case 12:\r\n case 13:\r\n chars += String.fromCharCode(((b & 0x1F) << 6 | this.readByte() & 0x3F));\r\n i += 2;\r\n break;\r\n case 14:\r\n chars += String.fromCharCode(((b & 0x0F) << 12 | (this.readByte() & 0x3F) << 6 | this.readByte() & 0x3F));\r\n i += 3;\r\n break;\r\n default:\r\n chars += String.fromCharCode(b);\r\n i++;\r\n }\r\n }\r\n return chars;\r\n };\r\n BinaryInput.prototype.readFloat = function () {\r\n var value = this.buffer.getFloat32(this.index);\r\n this.index += 4;\r\n return value;\r\n };\r\n BinaryInput.prototype.readBoolean = function () {\r\n return this.readByte() != 0;\r\n };\r\n return BinaryInput;\r\n }());\r\n var LinkedMesh = (function () {\r\n function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\r\n this.mesh = mesh;\r\n this.skin = skin;\r\n this.slotIndex = slotIndex;\r\n this.parent = parent;\r\n this.inheritDeform = inheritDeform;\r\n }\r\n return LinkedMesh;\r\n }());\r\n var Vertices = (function () {\r\n function Vertices(bones, vertices) {\r\n if (bones === void 0) { bones = null; }\r\n if (vertices === void 0) { vertices = null; }\r\n this.bones = bones;\r\n this.vertices = vertices;\r\n }\r\n return Vertices;\r\n }());\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonBounds = (function () {\r\n function SkeletonBounds() {\r\n this.minX = 0;\r\n this.minY = 0;\r\n this.maxX = 0;\r\n this.maxY = 0;\r\n this.boundingBoxes = new Array();\r\n this.polygons = new Array();\r\n this.polygonPool = new spine.Pool(function () {\r\n return spine.Utils.newFloatArray(16);\r\n });\r\n }\r\n SkeletonBounds.prototype.update = function (skeleton, updateAabb) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n var boundingBoxes = this.boundingBoxes;\r\n var polygons = this.polygons;\r\n var polygonPool = this.polygonPool;\r\n var slots = skeleton.slots;\r\n var slotCount = slots.length;\r\n boundingBoxes.length = 0;\r\n polygonPool.freeAll(polygons);\r\n polygons.length = 0;\r\n for (var i = 0; i < slotCount; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.BoundingBoxAttachment) {\r\n var boundingBox = attachment;\r\n boundingBoxes.push(boundingBox);\r\n var polygon = polygonPool.obtain();\r\n if (polygon.length != boundingBox.worldVerticesLength) {\r\n polygon = spine.Utils.newFloatArray(boundingBox.worldVerticesLength);\r\n }\r\n polygons.push(polygon);\r\n boundingBox.computeWorldVertices(slot, 0, boundingBox.worldVerticesLength, polygon, 0, 2);\r\n }\r\n }\r\n if (updateAabb) {\r\n this.aabbCompute();\r\n }\r\n else {\r\n this.minX = Number.POSITIVE_INFINITY;\r\n this.minY = Number.POSITIVE_INFINITY;\r\n this.maxX = Number.NEGATIVE_INFINITY;\r\n this.maxY = Number.NEGATIVE_INFINITY;\r\n }\r\n };\r\n SkeletonBounds.prototype.aabbCompute = function () {\r\n var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++) {\r\n var polygon = polygons[i];\r\n var vertices = polygon;\r\n for (var ii = 0, nn = polygon.length; ii < nn; ii += 2) {\r\n var x = vertices[ii];\r\n var y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n this.minX = minX;\r\n this.minY = minY;\r\n this.maxX = maxX;\r\n this.maxY = maxY;\r\n };\r\n SkeletonBounds.prototype.aabbContainsPoint = function (x, y) {\r\n return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\r\n };\r\n SkeletonBounds.prototype.aabbIntersectsSegment = function (x1, y1, x2, y2) {\r\n var minX = this.minX;\r\n var minY = this.minY;\r\n var maxX = this.maxX;\r\n var maxY = this.maxY;\r\n if ((x1 <= minX && x2 <= minX) || (y1 <= minY && y2 <= minY) || (x1 >= maxX && x2 >= maxX) || (y1 >= maxY && y2 >= maxY))\r\n return false;\r\n var m = (y2 - y1) / (x2 - x1);\r\n var y = m * (minX - x1) + y1;\r\n if (y > minY && y < maxY)\r\n return true;\r\n y = m * (maxX - x1) + y1;\r\n if (y > minY && y < maxY)\r\n return true;\r\n var x = (minY - y1) / m + x1;\r\n if (x > minX && x < maxX)\r\n return true;\r\n x = (maxY - y1) / m + x1;\r\n if (x > minX && x < maxX)\r\n return true;\r\n return false;\r\n };\r\n SkeletonBounds.prototype.aabbIntersectsSkeleton = function (bounds) {\r\n return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\r\n };\r\n SkeletonBounds.prototype.containsPoint = function (x, y) {\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++)\r\n if (this.containsPointPolygon(polygons[i], x, y))\r\n return this.boundingBoxes[i];\r\n return null;\r\n };\r\n SkeletonBounds.prototype.containsPointPolygon = function (polygon, x, y) {\r\n var vertices = polygon;\r\n var nn = polygon.length;\r\n var prevIndex = nn - 2;\r\n var inside = false;\r\n for (var ii = 0; ii < nn; ii += 2) {\r\n var vertexY = vertices[ii + 1];\r\n var prevY = vertices[prevIndex + 1];\r\n if ((vertexY < y && prevY >= y) || (prevY < y && vertexY >= y)) {\r\n var vertexX = vertices[ii];\r\n if (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x)\r\n inside = !inside;\r\n }\r\n prevIndex = ii;\r\n }\r\n return inside;\r\n };\r\n SkeletonBounds.prototype.intersectsSegment = function (x1, y1, x2, y2) {\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++)\r\n if (this.intersectsSegmentPolygon(polygons[i], x1, y1, x2, y2))\r\n return this.boundingBoxes[i];\r\n return null;\r\n };\r\n SkeletonBounds.prototype.intersectsSegmentPolygon = function (polygon, x1, y1, x2, y2) {\r\n var vertices = polygon;\r\n var nn = polygon.length;\r\n var width12 = x1 - x2, height12 = y1 - y2;\r\n var det1 = x1 * y2 - y1 * x2;\r\n var x3 = vertices[nn - 2], y3 = vertices[nn - 1];\r\n for (var ii = 0; ii < nn; ii += 2) {\r\n var x4 = vertices[ii], y4 = vertices[ii + 1];\r\n var det2 = x3 * y4 - y3 * x4;\r\n var width34 = x3 - x4, height34 = y3 - y4;\r\n var det3 = width12 * height34 - height12 * width34;\r\n var x = (det1 * width34 - width12 * det2) / det3;\r\n if (((x >= x3 && x <= x4) || (x >= x4 && x <= x3)) && ((x >= x1 && x <= x2) || (x >= x2 && x <= x1))) {\r\n var y = (det1 * height34 - height12 * det2) / det3;\r\n if (((y >= y3 && y <= y4) || (y >= y4 && y <= y3)) && ((y >= y1 && y <= y2) || (y >= y2 && y <= y1)))\r\n return true;\r\n }\r\n x3 = x4;\r\n y3 = y4;\r\n }\r\n return false;\r\n };\r\n SkeletonBounds.prototype.getPolygon = function (boundingBox) {\r\n if (boundingBox == null)\r\n throw new Error(\"boundingBox cannot be null.\");\r\n var index = this.boundingBoxes.indexOf(boundingBox);\r\n return index == -1 ? null : this.polygons[index];\r\n };\r\n SkeletonBounds.prototype.getWidth = function () {\r\n return this.maxX - this.minX;\r\n };\r\n SkeletonBounds.prototype.getHeight = function () {\r\n return this.maxY - this.minY;\r\n };\r\n return SkeletonBounds;\r\n }());\r\n spine.SkeletonBounds = SkeletonBounds;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonClipping = (function () {\r\n function SkeletonClipping() {\r\n this.triangulator = new spine.Triangulator();\r\n this.clippingPolygon = new Array();\r\n this.clipOutput = new Array();\r\n this.clippedVertices = new Array();\r\n this.clippedTriangles = new Array();\r\n this.scratch = new Array();\r\n }\r\n SkeletonClipping.prototype.clipStart = function (slot, clip) {\r\n if (this.clipAttachment != null)\r\n return 0;\r\n this.clipAttachment = clip;\r\n var n = clip.worldVerticesLength;\r\n var vertices = spine.Utils.setArraySize(this.clippingPolygon, n);\r\n clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\r\n var clippingPolygon = this.clippingPolygon;\r\n SkeletonClipping.makeClockwise(clippingPolygon);\r\n var clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon));\r\n for (var i = 0, n_2 = clippingPolygons.length; i < n_2; i++) {\r\n var polygon = clippingPolygons[i];\r\n SkeletonClipping.makeClockwise(polygon);\r\n polygon.push(polygon[0]);\r\n polygon.push(polygon[1]);\r\n }\r\n return clippingPolygons.length;\r\n };\r\n SkeletonClipping.prototype.clipEndWithSlot = function (slot) {\r\n if (this.clipAttachment != null && this.clipAttachment.endSlot == slot.data)\r\n this.clipEnd();\r\n };\r\n SkeletonClipping.prototype.clipEnd = function () {\r\n if (this.clipAttachment == null)\r\n return;\r\n this.clipAttachment = null;\r\n this.clippingPolygons = null;\r\n this.clippedVertices.length = 0;\r\n this.clippedTriangles.length = 0;\r\n this.clippingPolygon.length = 0;\r\n };\r\n SkeletonClipping.prototype.isClipping = function () {\r\n return this.clipAttachment != null;\r\n };\r\n SkeletonClipping.prototype.clipTriangles = function (vertices, verticesLength, triangles, trianglesLength, uvs, light, dark, twoColor) {\r\n var clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;\r\n var clippedTriangles = this.clippedTriangles;\r\n var polygons = this.clippingPolygons;\r\n var polygonsCount = this.clippingPolygons.length;\r\n var vertexSize = twoColor ? 12 : 8;\r\n var index = 0;\r\n clippedVertices.length = 0;\r\n clippedTriangles.length = 0;\r\n outer: for (var i = 0; i < trianglesLength; i += 3) {\r\n var vertexOffset = triangles[i] << 1;\r\n var x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\r\n var u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];\r\n vertexOffset = triangles[i + 1] << 1;\r\n var x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\r\n var u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];\r\n vertexOffset = triangles[i + 2] << 1;\r\n var x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\r\n var u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];\r\n for (var p = 0; p < polygonsCount; p++) {\r\n var s = clippedVertices.length;\r\n if (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) {\r\n var clipOutputLength = clipOutput.length;\r\n if (clipOutputLength == 0)\r\n continue;\r\n var d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\r\n var d = 1 / (d0 * d2 + d1 * (y1 - y3));\r\n var clipOutputCount = clipOutputLength >> 1;\r\n var clipOutputItems = this.clipOutput;\r\n var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);\r\n for (var ii = 0; ii < clipOutputLength; ii += 2) {\r\n var x = clipOutputItems[ii], y = clipOutputItems[ii + 1];\r\n clippedVerticesItems[s] = x;\r\n clippedVerticesItems[s + 1] = y;\r\n clippedVerticesItems[s + 2] = light.r;\r\n clippedVerticesItems[s + 3] = light.g;\r\n clippedVerticesItems[s + 4] = light.b;\r\n clippedVerticesItems[s + 5] = light.a;\r\n var c0 = x - x3, c1 = y - y3;\r\n var a = (d0 * c0 + d1 * c1) * d;\r\n var b = (d4 * c0 + d2 * c1) * d;\r\n var c = 1 - a - b;\r\n clippedVerticesItems[s + 6] = u1 * a + u2 * b + u3 * c;\r\n clippedVerticesItems[s + 7] = v1 * a + v2 * b + v3 * c;\r\n if (twoColor) {\r\n clippedVerticesItems[s + 8] = dark.r;\r\n clippedVerticesItems[s + 9] = dark.g;\r\n clippedVerticesItems[s + 10] = dark.b;\r\n clippedVerticesItems[s + 11] = dark.a;\r\n }\r\n s += vertexSize;\r\n }\r\n s = clippedTriangles.length;\r\n var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));\r\n clipOutputCount--;\r\n for (var ii = 1; ii < clipOutputCount; ii++) {\r\n clippedTrianglesItems[s] = index;\r\n clippedTrianglesItems[s + 1] = (index + ii);\r\n clippedTrianglesItems[s + 2] = (index + ii + 1);\r\n s += 3;\r\n }\r\n index += clipOutputCount + 1;\r\n }\r\n else {\r\n var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + 3 * vertexSize);\r\n clippedVerticesItems[s] = x1;\r\n clippedVerticesItems[s + 1] = y1;\r\n clippedVerticesItems[s + 2] = light.r;\r\n clippedVerticesItems[s + 3] = light.g;\r\n clippedVerticesItems[s + 4] = light.b;\r\n clippedVerticesItems[s + 5] = light.a;\r\n if (!twoColor) {\r\n clippedVerticesItems[s + 6] = u1;\r\n clippedVerticesItems[s + 7] = v1;\r\n clippedVerticesItems[s + 8] = x2;\r\n clippedVerticesItems[s + 9] = y2;\r\n clippedVerticesItems[s + 10] = light.r;\r\n clippedVerticesItems[s + 11] = light.g;\r\n clippedVerticesItems[s + 12] = light.b;\r\n clippedVerticesItems[s + 13] = light.a;\r\n clippedVerticesItems[s + 14] = u2;\r\n clippedVerticesItems[s + 15] = v2;\r\n clippedVerticesItems[s + 16] = x3;\r\n clippedVerticesItems[s + 17] = y3;\r\n clippedVerticesItems[s + 18] = light.r;\r\n clippedVerticesItems[s + 19] = light.g;\r\n clippedVerticesItems[s + 20] = light.b;\r\n clippedVerticesItems[s + 21] = light.a;\r\n clippedVerticesItems[s + 22] = u3;\r\n clippedVerticesItems[s + 23] = v3;\r\n }\r\n else {\r\n clippedVerticesItems[s + 6] = u1;\r\n clippedVerticesItems[s + 7] = v1;\r\n clippedVerticesItems[s + 8] = dark.r;\r\n clippedVerticesItems[s + 9] = dark.g;\r\n clippedVerticesItems[s + 10] = dark.b;\r\n clippedVerticesItems[s + 11] = dark.a;\r\n clippedVerticesItems[s + 12] = x2;\r\n clippedVerticesItems[s + 13] = y2;\r\n clippedVerticesItems[s + 14] = light.r;\r\n clippedVerticesItems[s + 15] = light.g;\r\n clippedVerticesItems[s + 16] = light.b;\r\n clippedVerticesItems[s + 17] = light.a;\r\n clippedVerticesItems[s + 18] = u2;\r\n clippedVerticesItems[s + 19] = v2;\r\n clippedVerticesItems[s + 20] = dark.r;\r\n clippedVerticesItems[s + 21] = dark.g;\r\n clippedVerticesItems[s + 22] = dark.b;\r\n clippedVerticesItems[s + 23] = dark.a;\r\n clippedVerticesItems[s + 24] = x3;\r\n clippedVerticesItems[s + 25] = y3;\r\n clippedVerticesItems[s + 26] = light.r;\r\n clippedVerticesItems[s + 27] = light.g;\r\n clippedVerticesItems[s + 28] = light.b;\r\n clippedVerticesItems[s + 29] = light.a;\r\n clippedVerticesItems[s + 30] = u3;\r\n clippedVerticesItems[s + 31] = v3;\r\n clippedVerticesItems[s + 32] = dark.r;\r\n clippedVerticesItems[s + 33] = dark.g;\r\n clippedVerticesItems[s + 34] = dark.b;\r\n clippedVerticesItems[s + 35] = dark.a;\r\n }\r\n s = clippedTriangles.length;\r\n var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3);\r\n clippedTrianglesItems[s] = index;\r\n clippedTrianglesItems[s + 1] = (index + 1);\r\n clippedTrianglesItems[s + 2] = (index + 2);\r\n index += 3;\r\n continue outer;\r\n }\r\n }\r\n }\r\n };\r\n SkeletonClipping.prototype.clip = function (x1, y1, x2, y2, x3, y3, clippingArea, output) {\r\n var originalOutput = output;\r\n var clipped = false;\r\n var input = null;\r\n if (clippingArea.length % 4 >= 2) {\r\n input = output;\r\n output = this.scratch;\r\n }\r\n else\r\n input = this.scratch;\r\n input.length = 0;\r\n input.push(x1);\r\n input.push(y1);\r\n input.push(x2);\r\n input.push(y2);\r\n input.push(x3);\r\n input.push(y3);\r\n input.push(x1);\r\n input.push(y1);\r\n output.length = 0;\r\n var clippingVertices = clippingArea;\r\n var clippingVerticesLast = clippingArea.length - 4;\r\n for (var i = 0;; i += 2) {\r\n var edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\r\n var edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];\r\n var deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;\r\n var inputVertices = input;\r\n var inputVerticesLength = input.length - 2, outputStart = output.length;\r\n for (var ii = 0; ii < inputVerticesLength; ii += 2) {\r\n var inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\r\n var inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];\r\n var side2 = deltaX * (inputY2 - edgeY2) - deltaY * (inputX2 - edgeX2) > 0;\r\n if (deltaX * (inputY - edgeY2) - deltaY * (inputX - edgeX2) > 0) {\r\n if (side2) {\r\n output.push(inputX2);\r\n output.push(inputY2);\r\n continue;\r\n }\r\n var c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n var s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\r\n if (Math.abs(s) > 0.000001) {\r\n var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\r\n output.push(edgeX + (edgeX2 - edgeX) * ua);\r\n output.push(edgeY + (edgeY2 - edgeY) * ua);\r\n }\r\n else {\r\n output.push(edgeX);\r\n output.push(edgeY);\r\n }\r\n }\r\n else if (side2) {\r\n var c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n var s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\r\n if (Math.abs(s) > 0.000001) {\r\n var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\r\n output.push(edgeX + (edgeX2 - edgeX) * ua);\r\n output.push(edgeY + (edgeY2 - edgeY) * ua);\r\n }\r\n else {\r\n output.push(edgeX);\r\n output.push(edgeY);\r\n }\r\n output.push(inputX2);\r\n output.push(inputY2);\r\n }\r\n clipped = true;\r\n }\r\n if (outputStart == output.length) {\r\n originalOutput.length = 0;\r\n return true;\r\n }\r\n output.push(output[0]);\r\n output.push(output[1]);\r\n if (i == clippingVerticesLast)\r\n break;\r\n var temp = output;\r\n output = input;\r\n output.length = 0;\r\n input = temp;\r\n }\r\n if (originalOutput != output) {\r\n originalOutput.length = 0;\r\n for (var i = 0, n = output.length - 2; i < n; i++)\r\n originalOutput[i] = output[i];\r\n }\r\n else\r\n originalOutput.length = originalOutput.length - 2;\r\n return clipped;\r\n };\r\n SkeletonClipping.makeClockwise = function (polygon) {\r\n var vertices = polygon;\r\n var verticeslength = polygon.length;\r\n var area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0;\r\n for (var i = 0, n = verticeslength - 3; i < n; i += 2) {\r\n p1x = vertices[i];\r\n p1y = vertices[i + 1];\r\n p2x = vertices[i + 2];\r\n p2y = vertices[i + 3];\r\n area += p1x * p2y - p2x * p1y;\r\n }\r\n if (area < 0)\r\n return;\r\n for (var i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\r\n var x = vertices[i], y = vertices[i + 1];\r\n var other = lastX - i;\r\n vertices[i] = vertices[other];\r\n vertices[i + 1] = vertices[other + 1];\r\n vertices[other] = x;\r\n vertices[other + 1] = y;\r\n }\r\n };\r\n return SkeletonClipping;\r\n }());\r\n spine.SkeletonClipping = SkeletonClipping;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonData = (function () {\r\n function SkeletonData() {\r\n this.bones = new Array();\r\n this.slots = new Array();\r\n this.skins = new Array();\r\n this.events = new Array();\r\n this.animations = new Array();\r\n this.ikConstraints = new Array();\r\n this.transformConstraints = new Array();\r\n this.pathConstraints = new Array();\r\n this.fps = 0;\r\n }\r\n SkeletonData.prototype.findBone = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (bone.name == boneName)\r\n return bone;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findBoneIndex = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n if (bones[i].name == boneName)\r\n return i;\r\n return -1;\r\n };\r\n SkeletonData.prototype.findSlot = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.name == slotName)\r\n return slot;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findSlotIndex = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n if (slots[i].name == slotName)\r\n return i;\r\n return -1;\r\n };\r\n SkeletonData.prototype.findSkin = function (skinName) {\r\n if (skinName == null)\r\n throw new Error(\"skinName cannot be null.\");\r\n var skins = this.skins;\r\n for (var i = 0, n = skins.length; i < n; i++) {\r\n var skin = skins[i];\r\n if (skin.name == skinName)\r\n return skin;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findEvent = function (eventDataName) {\r\n if (eventDataName == null)\r\n throw new Error(\"eventDataName cannot be null.\");\r\n var events = this.events;\r\n for (var i = 0, n = events.length; i < n; i++) {\r\n var event_5 = events[i];\r\n if (event_5.name == eventDataName)\r\n return event_5;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findAnimation = function (animationName) {\r\n if (animationName == null)\r\n throw new Error(\"animationName cannot be null.\");\r\n var animations = this.animations;\r\n for (var i = 0, n = animations.length; i < n; i++) {\r\n var animation = animations[i];\r\n if (animation.name == animationName)\r\n return animation;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findIkConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var constraint = ikConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findTransformConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findPathConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findPathConstraintIndex = function (pathConstraintName) {\r\n if (pathConstraintName == null)\r\n throw new Error(\"pathConstraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++)\r\n if (pathConstraints[i].name == pathConstraintName)\r\n return i;\r\n return -1;\r\n };\r\n return SkeletonData;\r\n }());\r\n spine.SkeletonData = SkeletonData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonJson = (function () {\r\n function SkeletonJson(attachmentLoader) {\r\n this.scale = 1;\r\n this.linkedMeshes = new Array();\r\n this.attachmentLoader = attachmentLoader;\r\n }\r\n SkeletonJson.prototype.readSkeletonData = function (json) {\r\n var scale = this.scale;\r\n var skeletonData = new spine.SkeletonData();\r\n var root = typeof (json) === \"string\" ? JSON.parse(json) : json;\r\n var skeletonMap = root.skeleton;\r\n if (skeletonMap != null) {\r\n skeletonData.hash = skeletonMap.hash;\r\n skeletonData.version = skeletonMap.spine;\r\n if (\"3.8.75\" == skeletonData.version)\r\n throw new Error(\"Unsupported skeleton data, please export with a newer version of Spine.\");\r\n skeletonData.x = skeletonMap.x;\r\n skeletonData.y = skeletonMap.y;\r\n skeletonData.width = skeletonMap.width;\r\n skeletonData.height = skeletonMap.height;\r\n skeletonData.fps = skeletonMap.fps;\r\n skeletonData.imagesPath = skeletonMap.images;\r\n }\r\n if (root.bones) {\r\n for (var i = 0; i < root.bones.length; i++) {\r\n var boneMap = root.bones[i];\r\n var parent_5 = null;\r\n var parentName = this.getValue(boneMap, \"parent\", null);\r\n if (parentName != null) {\r\n parent_5 = skeletonData.findBone(parentName);\r\n if (parent_5 == null)\r\n throw new Error(\"Parent bone not found: \" + parentName);\r\n }\r\n var data = new spine.BoneData(skeletonData.bones.length, boneMap.name, parent_5);\r\n data.length = this.getValue(boneMap, \"length\", 0) * scale;\r\n data.x = this.getValue(boneMap, \"x\", 0) * scale;\r\n data.y = this.getValue(boneMap, \"y\", 0) * scale;\r\n data.rotation = this.getValue(boneMap, \"rotation\", 0);\r\n data.scaleX = this.getValue(boneMap, \"scaleX\", 1);\r\n data.scaleY = this.getValue(boneMap, \"scaleY\", 1);\r\n data.shearX = this.getValue(boneMap, \"shearX\", 0);\r\n data.shearY = this.getValue(boneMap, \"shearY\", 0);\r\n data.transformMode = SkeletonJson.transformModeFromString(this.getValue(boneMap, \"transform\", \"normal\"));\r\n data.skinRequired = this.getValue(boneMap, \"skin\", false);\r\n skeletonData.bones.push(data);\r\n }\r\n }\r\n if (root.slots) {\r\n for (var i = 0; i < root.slots.length; i++) {\r\n var slotMap = root.slots[i];\r\n var slotName = slotMap.name;\r\n var boneName = slotMap.bone;\r\n var boneData = skeletonData.findBone(boneName);\r\n if (boneData == null)\r\n throw new Error(\"Slot bone not found: \" + boneName);\r\n var data = new spine.SlotData(skeletonData.slots.length, slotName, boneData);\r\n var color = this.getValue(slotMap, \"color\", null);\r\n if (color != null)\r\n data.color.setFromString(color);\r\n var dark = this.getValue(slotMap, \"dark\", null);\r\n if (dark != null) {\r\n data.darkColor = new spine.Color(1, 1, 1, 1);\r\n data.darkColor.setFromString(dark);\r\n }\r\n data.attachmentName = this.getValue(slotMap, \"attachment\", null);\r\n data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, \"blend\", \"normal\"));\r\n skeletonData.slots.push(data);\r\n }\r\n }\r\n if (root.ik) {\r\n for (var i = 0; i < root.ik.length; i++) {\r\n var constraintMap = root.ik[i];\r\n var data = new spine.IkConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"IK bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findBone(targetName);\r\n if (data.target == null)\r\n throw new Error(\"IK target bone not found: \" + targetName);\r\n data.mix = this.getValue(constraintMap, \"mix\", 1);\r\n data.softness = this.getValue(constraintMap, \"softness\", 0) * scale;\r\n data.bendDirection = this.getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\r\n data.compress = this.getValue(constraintMap, \"compress\", false);\r\n data.stretch = this.getValue(constraintMap, \"stretch\", false);\r\n data.uniform = this.getValue(constraintMap, \"uniform\", false);\r\n skeletonData.ikConstraints.push(data);\r\n }\r\n }\r\n if (root.transform) {\r\n for (var i = 0; i < root.transform.length; i++) {\r\n var constraintMap = root.transform[i];\r\n var data = new spine.TransformConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"Transform constraint bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findBone(targetName);\r\n if (data.target == null)\r\n throw new Error(\"Transform constraint target bone not found: \" + targetName);\r\n data.local = this.getValue(constraintMap, \"local\", false);\r\n data.relative = this.getValue(constraintMap, \"relative\", false);\r\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\r\n data.offsetX = this.getValue(constraintMap, \"x\", 0) * scale;\r\n data.offsetY = this.getValue(constraintMap, \"y\", 0) * scale;\r\n data.offsetScaleX = this.getValue(constraintMap, \"scaleX\", 0);\r\n data.offsetScaleY = this.getValue(constraintMap, \"scaleY\", 0);\r\n data.offsetShearY = this.getValue(constraintMap, \"shearY\", 0);\r\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\r\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\r\n data.scaleMix = this.getValue(constraintMap, \"scaleMix\", 1);\r\n data.shearMix = this.getValue(constraintMap, \"shearMix\", 1);\r\n skeletonData.transformConstraints.push(data);\r\n }\r\n }\r\n if (root.path) {\r\n for (var i = 0; i < root.path.length; i++) {\r\n var constraintMap = root.path[i];\r\n var data = new spine.PathConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"Transform constraint bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findSlot(targetName);\r\n if (data.target == null)\r\n throw new Error(\"Path target slot not found: \" + targetName);\r\n data.positionMode = SkeletonJson.positionModeFromString(this.getValue(constraintMap, \"positionMode\", \"percent\"));\r\n data.spacingMode = SkeletonJson.spacingModeFromString(this.getValue(constraintMap, \"spacingMode\", \"length\"));\r\n data.rotateMode = SkeletonJson.rotateModeFromString(this.getValue(constraintMap, \"rotateMode\", \"tangent\"));\r\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\r\n data.position = this.getValue(constraintMap, \"position\", 0);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n data.position *= scale;\r\n data.spacing = this.getValue(constraintMap, \"spacing\", 0);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n data.spacing *= scale;\r\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\r\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\r\n skeletonData.pathConstraints.push(data);\r\n }\r\n }\r\n if (root.skins) {\r\n for (var i = 0; i < root.skins.length; i++) {\r\n var skinMap = root.skins[i];\r\n var skin = new spine.Skin(skinMap.name);\r\n if (skinMap.bones) {\r\n for (var ii = 0; ii < skinMap.bones.length; ii++) {\r\n var bone = skeletonData.findBone(skinMap.bones[ii]);\r\n if (bone == null)\r\n throw new Error(\"Skin bone not found: \" + skinMap.bones[i]);\r\n skin.bones.push(bone);\r\n }\r\n }\r\n if (skinMap.ik) {\r\n for (var ii = 0; ii < skinMap.ik.length; ii++) {\r\n var constraint = skeletonData.findIkConstraint(skinMap.ik[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin IK constraint not found: \" + skinMap.ik[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n if (skinMap.transform) {\r\n for (var ii = 0; ii < skinMap.transform.length; ii++) {\r\n var constraint = skeletonData.findTransformConstraint(skinMap.transform[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin transform constraint not found: \" + skinMap.transform[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n if (skinMap.path) {\r\n for (var ii = 0; ii < skinMap.path.length; ii++) {\r\n var constraint = skeletonData.findPathConstraint(skinMap.path[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin path constraint not found: \" + skinMap.path[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n for (var slotName in skinMap.attachments) {\r\n var slot = skeletonData.findSlot(slotName);\r\n if (slot == null)\r\n throw new Error(\"Slot not found: \" + slotName);\r\n var slotMap = skinMap.attachments[slotName];\r\n for (var entryName in slotMap) {\r\n var attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\r\n if (attachment != null)\r\n skin.setAttachment(slot.index, entryName, attachment);\r\n }\r\n }\r\n skeletonData.skins.push(skin);\r\n if (skin.name == \"default\")\r\n skeletonData.defaultSkin = skin;\r\n }\r\n }\r\n for (var i = 0, n = this.linkedMeshes.length; i < n; i++) {\r\n var linkedMesh = this.linkedMeshes[i];\r\n var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + linkedMesh.skin);\r\n var parent_6 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n if (parent_6 == null)\r\n throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\r\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_6 : linkedMesh.mesh;\r\n linkedMesh.mesh.setParentMesh(parent_6);\r\n linkedMesh.mesh.updateUVs();\r\n }\r\n this.linkedMeshes.length = 0;\r\n if (root.events) {\r\n for (var eventName in root.events) {\r\n var eventMap = root.events[eventName];\r\n var data = new spine.EventData(eventName);\r\n data.intValue = this.getValue(eventMap, \"int\", 0);\r\n data.floatValue = this.getValue(eventMap, \"float\", 0);\r\n data.stringValue = this.getValue(eventMap, \"string\", \"\");\r\n data.audioPath = this.getValue(eventMap, \"audio\", null);\r\n if (data.audioPath != null) {\r\n data.volume = this.getValue(eventMap, \"volume\", 1);\r\n data.balance = this.getValue(eventMap, \"balance\", 0);\r\n }\r\n skeletonData.events.push(data);\r\n }\r\n }\r\n if (root.animations) {\r\n for (var animationName in root.animations) {\r\n var animationMap = root.animations[animationName];\r\n this.readAnimation(animationMap, animationName, skeletonData);\r\n }\r\n }\r\n return skeletonData;\r\n };\r\n SkeletonJson.prototype.readAttachment = function (map, skin, slotIndex, name, skeletonData) {\r\n var scale = this.scale;\r\n name = this.getValue(map, \"name\", name);\r\n var type = this.getValue(map, \"type\", \"region\");\r\n switch (type) {\r\n case \"region\": {\r\n var path = this.getValue(map, \"path\", name);\r\n var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\r\n if (region == null)\r\n return null;\r\n region.path = path;\r\n region.x = this.getValue(map, \"x\", 0) * scale;\r\n region.y = this.getValue(map, \"y\", 0) * scale;\r\n region.scaleX = this.getValue(map, \"scaleX\", 1);\r\n region.scaleY = this.getValue(map, \"scaleY\", 1);\r\n region.rotation = this.getValue(map, \"rotation\", 0);\r\n region.width = map.width * scale;\r\n region.height = map.height * scale;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n region.color.setFromString(color);\r\n region.updateOffset();\r\n return region;\r\n }\r\n case \"boundingbox\": {\r\n var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n if (box == null)\r\n return null;\r\n this.readVertices(map, box, map.vertexCount << 1);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n box.color.setFromString(color);\r\n return box;\r\n }\r\n case \"mesh\":\r\n case \"linkedmesh\": {\r\n var path = this.getValue(map, \"path\", name);\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n mesh.color.setFromString(color);\r\n mesh.width = this.getValue(map, \"width\", 0) * scale;\r\n mesh.height = this.getValue(map, \"height\", 0) * scale;\r\n var parent_7 = this.getValue(map, \"parent\", null);\r\n if (parent_7 != null) {\r\n this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, \"skin\", null), slotIndex, parent_7, this.getValue(map, \"deform\", true)));\r\n return mesh;\r\n }\r\n var uvs = map.uvs;\r\n this.readVertices(map, mesh, uvs.length);\r\n mesh.triangles = map.triangles;\r\n mesh.regionUVs = uvs;\r\n mesh.updateUVs();\r\n mesh.edges = this.getValue(map, \"edges\", null);\r\n mesh.hullLength = this.getValue(map, \"hull\", 0) * 2;\r\n return mesh;\r\n }\r\n case \"path\": {\r\n var path = this.attachmentLoader.newPathAttachment(skin, name);\r\n if (path == null)\r\n return null;\r\n path.closed = this.getValue(map, \"closed\", false);\r\n path.constantSpeed = this.getValue(map, \"constantSpeed\", true);\r\n var vertexCount = map.vertexCount;\r\n this.readVertices(map, path, vertexCount << 1);\r\n var lengths = spine.Utils.newArray(vertexCount / 3, 0);\r\n for (var i = 0; i < map.lengths.length; i++)\r\n lengths[i] = map.lengths[i] * scale;\r\n path.lengths = lengths;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n path.color.setFromString(color);\r\n return path;\r\n }\r\n case \"point\": {\r\n var point = this.attachmentLoader.newPointAttachment(skin, name);\r\n if (point == null)\r\n return null;\r\n point.x = this.getValue(map, \"x\", 0) * scale;\r\n point.y = this.getValue(map, \"y\", 0) * scale;\r\n point.rotation = this.getValue(map, \"rotation\", 0);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n point.color.setFromString(color);\r\n return point;\r\n }\r\n case \"clipping\": {\r\n var clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n if (clip == null)\r\n return null;\r\n var end = this.getValue(map, \"end\", null);\r\n if (end != null) {\r\n var slot = skeletonData.findSlot(end);\r\n if (slot == null)\r\n throw new Error(\"Clipping end slot not found: \" + end);\r\n clip.endSlot = slot;\r\n }\r\n var vertexCount = map.vertexCount;\r\n this.readVertices(map, clip, vertexCount << 1);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n clip.color.setFromString(color);\r\n return clip;\r\n }\r\n }\r\n return null;\r\n };\r\n SkeletonJson.prototype.readVertices = function (map, attachment, verticesLength) {\r\n var scale = this.scale;\r\n attachment.worldVerticesLength = verticesLength;\r\n var vertices = map.vertices;\r\n if (verticesLength == vertices.length) {\r\n var scaledVertices = spine.Utils.toFloatArray(vertices);\r\n if (scale != 1) {\r\n for (var i = 0, n = vertices.length; i < n; i++)\r\n scaledVertices[i] *= scale;\r\n }\r\n attachment.vertices = scaledVertices;\r\n return;\r\n }\r\n var weights = new Array();\r\n var bones = new Array();\r\n for (var i = 0, n = vertices.length; i < n;) {\r\n var boneCount = vertices[i++];\r\n bones.push(boneCount);\r\n for (var nn = i + boneCount * 4; i < nn; i += 4) {\r\n bones.push(vertices[i]);\r\n weights.push(vertices[i + 1] * scale);\r\n weights.push(vertices[i + 2] * scale);\r\n weights.push(vertices[i + 3]);\r\n }\r\n }\r\n attachment.bones = bones;\r\n attachment.vertices = spine.Utils.toFloatArray(weights);\r\n };\r\n SkeletonJson.prototype.readAnimation = function (map, name, skeletonData) {\r\n var scale = this.scale;\r\n var timelines = new Array();\r\n var duration = 0;\r\n if (map.slots) {\r\n for (var slotName in map.slots) {\r\n var slotMap = map.slots[slotName];\r\n var slotIndex = skeletonData.findSlotIndex(slotName);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + slotName);\r\n for (var timelineName in slotMap) {\r\n var timelineMap = slotMap[timelineName];\r\n if (timelineName == \"attachment\") {\r\n var timeline = new spine.AttachmentTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex++, this.getValue(valueMap, \"time\", 0), valueMap.name);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n else if (timelineName == \"color\") {\r\n var timeline = new spine.ColorTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var color = new spine.Color();\r\n color.setFromString(valueMap.color);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), color.r, color.g, color.b, color.a);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.ColorTimeline.ENTRIES]);\r\n }\r\n else if (timelineName == \"twoColor\") {\r\n var timeline = new spine.TwoColorTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var light = new spine.Color();\r\n var dark = new spine.Color();\r\n light.setFromString(valueMap.light);\r\n dark.setFromString(valueMap.dark);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), light.r, light.g, light.b, light.a, dark.r, dark.g, dark.b);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TwoColorTimeline.ENTRIES]);\r\n }\r\n else\r\n throw new Error(\"Invalid timeline type for a slot: \" + timelineName + \" (\" + slotName + \")\");\r\n }\r\n }\r\n }\r\n if (map.bones) {\r\n for (var boneName in map.bones) {\r\n var boneMap = map.bones[boneName];\r\n var boneIndex = skeletonData.findBoneIndex(boneName);\r\n if (boneIndex == -1)\r\n throw new Error(\"Bone not found: \" + boneName);\r\n for (var timelineName in boneMap) {\r\n var timelineMap = boneMap[timelineName];\r\n if (timelineName === \"rotate\") {\r\n var timeline = new spine.RotateTimeline(timelineMap.length);\r\n timeline.boneIndex = boneIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"angle\", 0));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.RotateTimeline.ENTRIES]);\r\n }\r\n else if (timelineName === \"translate\" || timelineName === \"scale\" || timelineName === \"shear\") {\r\n var timeline = null;\r\n var timelineScale = 1, defaultValue = 0;\r\n if (timelineName === \"scale\") {\r\n timeline = new spine.ScaleTimeline(timelineMap.length);\r\n defaultValue = 1;\r\n }\r\n else if (timelineName === \"shear\")\r\n timeline = new spine.ShearTimeline(timelineMap.length);\r\n else {\r\n timeline = new spine.TranslateTimeline(timelineMap.length);\r\n timelineScale = scale;\r\n }\r\n timeline.boneIndex = boneIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var x = this.getValue(valueMap, \"x\", defaultValue), y = this.getValue(valueMap, \"y\", defaultValue);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), x * timelineScale, y * timelineScale);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TranslateTimeline.ENTRIES]);\r\n }\r\n else\r\n throw new Error(\"Invalid timeline type for a bone: \" + timelineName + \" (\" + boneName + \")\");\r\n }\r\n }\r\n }\r\n if (map.ik) {\r\n for (var constraintName in map.ik) {\r\n var constraintMap = map.ik[constraintName];\r\n var constraint = skeletonData.findIkConstraint(constraintName);\r\n var timeline = new spine.IkConstraintTimeline(constraintMap.length);\r\n timeline.ikConstraintIndex = skeletonData.ikConstraints.indexOf(constraint);\r\n var frameIndex = 0;\r\n for (var i = 0; i < constraintMap.length; i++) {\r\n var valueMap = constraintMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"mix\", 1), this.getValue(valueMap, \"softness\", 0) * scale, this.getValue(valueMap, \"bendPositive\", true) ? 1 : -1, this.getValue(valueMap, \"compress\", false), this.getValue(valueMap, \"stretch\", false));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.IkConstraintTimeline.ENTRIES]);\r\n }\r\n }\r\n if (map.transform) {\r\n for (var constraintName in map.transform) {\r\n var constraintMap = map.transform[constraintName];\r\n var constraint = skeletonData.findTransformConstraint(constraintName);\r\n var timeline = new spine.TransformConstraintTimeline(constraintMap.length);\r\n timeline.transformConstraintIndex = skeletonData.transformConstraints.indexOf(constraint);\r\n var frameIndex = 0;\r\n for (var i = 0; i < constraintMap.length; i++) {\r\n var valueMap = constraintMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1), this.getValue(valueMap, \"scaleMix\", 1), this.getValue(valueMap, \"shearMix\", 1));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TransformConstraintTimeline.ENTRIES]);\r\n }\r\n }\r\n if (map.path) {\r\n for (var constraintName in map.path) {\r\n var constraintMap = map.path[constraintName];\r\n var index = skeletonData.findPathConstraintIndex(constraintName);\r\n if (index == -1)\r\n throw new Error(\"Path constraint not found: \" + constraintName);\r\n var data = skeletonData.pathConstraints[index];\r\n for (var timelineName in constraintMap) {\r\n var timelineMap = constraintMap[timelineName];\r\n if (timelineName === \"position\" || timelineName === \"spacing\") {\r\n var timeline = null;\r\n var timelineScale = 1;\r\n if (timelineName === \"spacing\") {\r\n timeline = new spine.PathConstraintSpacingTimeline(timelineMap.length);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n else {\r\n timeline = new spine.PathConstraintPositionTimeline(timelineMap.length);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n timeline.pathConstraintIndex = index;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, timelineName, 0) * timelineScale);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\r\n }\r\n else if (timelineName === \"mix\") {\r\n var timeline = new spine.PathConstraintMixTimeline(timelineMap.length);\r\n timeline.pathConstraintIndex = index;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\r\n }\r\n }\r\n }\r\n }\r\n if (map.deform) {\r\n for (var deformName in map.deform) {\r\n var deformMap = map.deform[deformName];\r\n var skin = skeletonData.findSkin(deformName);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + deformName);\r\n for (var slotName in deformMap) {\r\n var slotMap = deformMap[slotName];\r\n var slotIndex = skeletonData.findSlotIndex(slotName);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + slotMap.name);\r\n for (var timelineName in slotMap) {\r\n var timelineMap = slotMap[timelineName];\r\n var attachment = skin.getAttachment(slotIndex, timelineName);\r\n if (attachment == null)\r\n throw new Error(\"Deform attachment not found: \" + timelineMap.name);\r\n var weighted = attachment.bones != null;\r\n var vertices = attachment.vertices;\r\n var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n var timeline = new spine.DeformTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n timeline.attachment = attachment;\r\n var frameIndex = 0;\r\n for (var j = 0; j < timelineMap.length; j++) {\r\n var valueMap = timelineMap[j];\r\n var deform = void 0;\r\n var verticesValue = this.getValue(valueMap, \"vertices\", null);\r\n if (verticesValue == null)\r\n deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\r\n else {\r\n deform = spine.Utils.newFloatArray(deformLength);\r\n var start = this.getValue(valueMap, \"offset\", 0);\r\n spine.Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\r\n if (scale != 1) {\r\n for (var i = start, n = i + verticesValue.length; i < n; i++)\r\n deform[i] *= scale;\r\n }\r\n if (!weighted) {\r\n for (var i = 0; i < deformLength; i++)\r\n deform[i] += vertices[i];\r\n }\r\n }\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), deform);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n }\r\n }\r\n }\r\n var drawOrderNode = map.drawOrder;\r\n if (drawOrderNode == null)\r\n drawOrderNode = map.draworder;\r\n if (drawOrderNode != null) {\r\n var timeline = new spine.DrawOrderTimeline(drawOrderNode.length);\r\n var slotCount = skeletonData.slots.length;\r\n var frameIndex = 0;\r\n for (var j = 0; j < drawOrderNode.length; j++) {\r\n var drawOrderMap = drawOrderNode[j];\r\n var drawOrder = null;\r\n var offsets = this.getValue(drawOrderMap, \"offsets\", null);\r\n if (offsets != null) {\r\n drawOrder = spine.Utils.newArray(slotCount, -1);\r\n var unchanged = spine.Utils.newArray(slotCount - offsets.length, 0);\r\n var originalIndex = 0, unchangedIndex = 0;\r\n for (var i = 0; i < offsets.length; i++) {\r\n var offsetMap = offsets[i];\r\n var slotIndex = skeletonData.findSlotIndex(offsetMap.slot);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + offsetMap.slot);\r\n while (originalIndex != slotIndex)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n drawOrder[originalIndex + offsetMap.offset] = originalIndex++;\r\n }\r\n while (originalIndex < slotCount)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n for (var i = slotCount - 1; i >= 0; i--)\r\n if (drawOrder[i] == -1)\r\n drawOrder[i] = unchanged[--unchangedIndex];\r\n }\r\n timeline.setFrame(frameIndex++, this.getValue(drawOrderMap, \"time\", 0), drawOrder);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n if (map.events) {\r\n var timeline = new spine.EventTimeline(map.events.length);\r\n var frameIndex = 0;\r\n for (var i = 0; i < map.events.length; i++) {\r\n var eventMap = map.events[i];\r\n var eventData = skeletonData.findEvent(eventMap.name);\r\n if (eventData == null)\r\n throw new Error(\"Event not found: \" + eventMap.name);\r\n var event_6 = new spine.Event(spine.Utils.toSinglePrecision(this.getValue(eventMap, \"time\", 0)), eventData);\r\n event_6.intValue = this.getValue(eventMap, \"int\", eventData.intValue);\r\n event_6.floatValue = this.getValue(eventMap, \"float\", eventData.floatValue);\r\n event_6.stringValue = this.getValue(eventMap, \"string\", eventData.stringValue);\r\n if (event_6.data.audioPath != null) {\r\n event_6.volume = this.getValue(eventMap, \"volume\", 1);\r\n event_6.balance = this.getValue(eventMap, \"balance\", 0);\r\n }\r\n timeline.setFrame(frameIndex++, event_6);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n if (isNaN(duration)) {\r\n throw new Error(\"Error while parsing animation, duration is NaN\");\r\n }\r\n skeletonData.animations.push(new spine.Animation(name, timelines, duration));\r\n };\r\n SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) {\r\n if (!map.hasOwnProperty(\"curve\"))\r\n return;\r\n if (map.curve == \"stepped\")\r\n timeline.setStepped(frameIndex);\r\n else {\r\n var curve = map.curve;\r\n timeline.setCurve(frameIndex, curve, this.getValue(map, \"c2\", 0), this.getValue(map, \"c3\", 1), this.getValue(map, \"c4\", 1));\r\n }\r\n };\r\n SkeletonJson.prototype.getValue = function (map, prop, defaultValue) {\r\n return map[prop] !== undefined ? map[prop] : defaultValue;\r\n };\r\n SkeletonJson.blendModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"normal\")\r\n return spine.BlendMode.Normal;\r\n if (str == \"additive\")\r\n return spine.BlendMode.Additive;\r\n if (str == \"multiply\")\r\n return spine.BlendMode.Multiply;\r\n if (str == \"screen\")\r\n return spine.BlendMode.Screen;\r\n throw new Error(\"Unknown blend mode: \" + str);\r\n };\r\n SkeletonJson.positionModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"fixed\")\r\n return spine.PositionMode.Fixed;\r\n if (str == \"percent\")\r\n return spine.PositionMode.Percent;\r\n throw new Error(\"Unknown position mode: \" + str);\r\n };\r\n SkeletonJson.spacingModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"length\")\r\n return spine.SpacingMode.Length;\r\n if (str == \"fixed\")\r\n return spine.SpacingMode.Fixed;\r\n if (str == \"percent\")\r\n return spine.SpacingMode.Percent;\r\n throw new Error(\"Unknown position mode: \" + str);\r\n };\r\n SkeletonJson.rotateModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"tangent\")\r\n return spine.RotateMode.Tangent;\r\n if (str == \"chain\")\r\n return spine.RotateMode.Chain;\r\n if (str == \"chainscale\")\r\n return spine.RotateMode.ChainScale;\r\n throw new Error(\"Unknown rotate mode: \" + str);\r\n };\r\n SkeletonJson.transformModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"normal\")\r\n return spine.TransformMode.Normal;\r\n if (str == \"onlytranslation\")\r\n return spine.TransformMode.OnlyTranslation;\r\n if (str == \"norotationorreflection\")\r\n return spine.TransformMode.NoRotationOrReflection;\r\n if (str == \"noscale\")\r\n return spine.TransformMode.NoScale;\r\n if (str == \"noscaleorreflection\")\r\n return spine.TransformMode.NoScaleOrReflection;\r\n throw new Error(\"Unknown transform mode: \" + str);\r\n };\r\n return SkeletonJson;\r\n }());\r\n spine.SkeletonJson = SkeletonJson;\r\n var LinkedMesh = (function () {\r\n function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\r\n this.mesh = mesh;\r\n this.skin = skin;\r\n this.slotIndex = slotIndex;\r\n this.parent = parent;\r\n this.inheritDeform = inheritDeform;\r\n }\r\n return LinkedMesh;\r\n }());\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkinEntry = (function () {\r\n function SkinEntry(slotIndex, name, attachment) {\r\n this.slotIndex = slotIndex;\r\n this.name = name;\r\n this.attachment = attachment;\r\n }\r\n return SkinEntry;\r\n }());\r\n spine.SkinEntry = SkinEntry;\r\n var Skin = (function () {\r\n function Skin(name) {\r\n this.attachments = new Array();\r\n this.bones = Array();\r\n this.constraints = new Array();\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n Skin.prototype.setAttachment = function (slotIndex, name, attachment) {\r\n if (attachment == null)\r\n throw new Error(\"attachment cannot be null.\");\r\n var attachments = this.attachments;\r\n if (slotIndex >= attachments.length)\r\n attachments.length = slotIndex + 1;\r\n if (!attachments[slotIndex])\r\n attachments[slotIndex] = {};\r\n attachments[slotIndex][name] = attachment;\r\n };\r\n Skin.prototype.addSkin = function (skin) {\r\n for (var i = 0; i < skin.bones.length; i++) {\r\n var bone = skin.bones[i];\r\n var contained = false;\r\n for (var j = 0; j < this.bones.length; j++) {\r\n if (this.bones[j] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.bones.push(bone);\r\n }\r\n for (var i = 0; i < skin.constraints.length; i++) {\r\n var constraint = skin.constraints[i];\r\n var contained = false;\r\n for (var j = 0; j < this.constraints.length; j++) {\r\n if (this.constraints[j] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.constraints.push(constraint);\r\n }\r\n var attachments = skin.getAttachments();\r\n for (var i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n };\r\n Skin.prototype.copySkin = function (skin) {\r\n for (var i = 0; i < skin.bones.length; i++) {\r\n var bone = skin.bones[i];\r\n var contained = false;\r\n for (var j = 0; j < this.bones.length; j++) {\r\n if (this.bones[j] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.bones.push(bone);\r\n }\r\n for (var i = 0; i < skin.constraints.length; i++) {\r\n var constraint = skin.constraints[i];\r\n var contained = false;\r\n for (var j = 0; j < this.constraints.length; j++) {\r\n if (this.constraints[j] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.constraints.push(constraint);\r\n }\r\n var attachments = skin.getAttachments();\r\n for (var i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n if (attachment.attachment == null)\r\n continue;\r\n if (attachment.attachment instanceof spine.MeshAttachment) {\r\n attachment.attachment = attachment.attachment.newLinkedMesh();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n else {\r\n attachment.attachment = attachment.attachment.copy();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n }\r\n };\r\n Skin.prototype.getAttachment = function (slotIndex, name) {\r\n var dictionary = this.attachments[slotIndex];\r\n return dictionary ? dictionary[name] : null;\r\n };\r\n Skin.prototype.removeAttachment = function (slotIndex, name) {\r\n var dictionary = this.attachments[slotIndex];\r\n if (dictionary)\r\n dictionary[name] = null;\r\n };\r\n Skin.prototype.getAttachments = function () {\r\n var entries = new Array();\r\n for (var i = 0; i < this.attachments.length; i++) {\r\n var slotAttachments = this.attachments[i];\r\n if (slotAttachments) {\r\n for (var name_4 in slotAttachments) {\r\n var attachment = slotAttachments[name_4];\r\n if (attachment)\r\n entries.push(new SkinEntry(i, name_4, attachment));\r\n }\r\n }\r\n }\r\n return entries;\r\n };\r\n Skin.prototype.getAttachmentsForSlot = function (slotIndex, attachments) {\r\n var slotAttachments = this.attachments[slotIndex];\r\n if (slotAttachments) {\r\n for (var name_5 in slotAttachments) {\r\n var attachment = slotAttachments[name_5];\r\n if (attachment)\r\n attachments.push(new SkinEntry(slotIndex, name_5, attachment));\r\n }\r\n }\r\n };\r\n Skin.prototype.clear = function () {\r\n this.attachments.length = 0;\r\n this.bones.length = 0;\r\n this.constraints.length = 0;\r\n };\r\n Skin.prototype.attachAll = function (skeleton, oldSkin) {\r\n var slotIndex = 0;\r\n for (var i = 0; i < skeleton.slots.length; i++) {\r\n var slot = skeleton.slots[i];\r\n var slotAttachment = slot.getAttachment();\r\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\r\n var dictionary = oldSkin.attachments[slotIndex];\r\n for (var key in dictionary) {\r\n var skinAttachment = dictionary[key];\r\n if (slotAttachment == skinAttachment) {\r\n var attachment = this.getAttachment(slotIndex, key);\r\n if (attachment != null)\r\n slot.setAttachment(attachment);\r\n break;\r\n }\r\n }\r\n }\r\n slotIndex++;\r\n }\r\n };\r\n return Skin;\r\n }());\r\n spine.Skin = Skin;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Slot = (function () {\r\n function Slot(data, bone) {\r\n this.deform = new Array();\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (bone == null)\r\n throw new Error(\"bone cannot be null.\");\r\n this.data = data;\r\n this.bone = bone;\r\n this.color = new spine.Color();\r\n this.darkColor = data.darkColor == null ? null : new spine.Color();\r\n this.setToSetupPose();\r\n }\r\n Slot.prototype.getSkeleton = function () {\r\n return this.bone.skeleton;\r\n };\r\n Slot.prototype.getAttachment = function () {\r\n return this.attachment;\r\n };\r\n Slot.prototype.setAttachment = function (attachment) {\r\n if (this.attachment == attachment)\r\n return;\r\n this.attachment = attachment;\r\n this.attachmentTime = this.bone.skeleton.time;\r\n this.deform.length = 0;\r\n };\r\n Slot.prototype.setAttachmentTime = function (time) {\r\n this.attachmentTime = this.bone.skeleton.time - time;\r\n };\r\n Slot.prototype.getAttachmentTime = function () {\r\n return this.bone.skeleton.time - this.attachmentTime;\r\n };\r\n Slot.prototype.setToSetupPose = function () {\r\n this.color.setFromColor(this.data.color);\r\n if (this.darkColor != null)\r\n this.darkColor.setFromColor(this.data.darkColor);\r\n if (this.data.attachmentName == null)\r\n this.attachment = null;\r\n else {\r\n this.attachment = null;\r\n this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName));\r\n }\r\n };\r\n return Slot;\r\n }());\r\n spine.Slot = Slot;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SlotData = (function () {\r\n function SlotData(index, name, boneData) {\r\n this.color = new spine.Color(1, 1, 1, 1);\r\n if (index < 0)\r\n throw new Error(\"index must be >= 0.\");\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n if (boneData == null)\r\n throw new Error(\"boneData cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.boneData = boneData;\r\n }\r\n return SlotData;\r\n }());\r\n spine.SlotData = SlotData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Texture = (function () {\r\n function Texture(image) {\r\n this._image = image;\r\n }\r\n Texture.prototype.getImage = function () {\r\n return this._image;\r\n };\r\n Texture.filterFromString = function (text) {\r\n switch (text.toLowerCase()) {\r\n case \"nearest\": return TextureFilter.Nearest;\r\n case \"linear\": return TextureFilter.Linear;\r\n case \"mipmap\": return TextureFilter.MipMap;\r\n case \"mipmapnearestnearest\": return TextureFilter.MipMapNearestNearest;\r\n case \"mipmaplinearnearest\": return TextureFilter.MipMapLinearNearest;\r\n case \"mipmapnearestlinear\": return TextureFilter.MipMapNearestLinear;\r\n case \"mipmaplinearlinear\": return TextureFilter.MipMapLinearLinear;\r\n default: throw new Error(\"Unknown texture filter \" + text);\r\n }\r\n };\r\n Texture.wrapFromString = function (text) {\r\n switch (text.toLowerCase()) {\r\n case \"mirroredtepeat\": return TextureWrap.MirroredRepeat;\r\n case \"clamptoedge\": return TextureWrap.ClampToEdge;\r\n case \"repeat\": return TextureWrap.Repeat;\r\n default: throw new Error(\"Unknown texture wrap \" + text);\r\n }\r\n };\r\n return Texture;\r\n }());\r\n spine.Texture = Texture;\r\n var TextureFilter;\r\n (function (TextureFilter) {\r\n TextureFilter[TextureFilter[\"Nearest\"] = 9728] = \"Nearest\";\r\n TextureFilter[TextureFilter[\"Linear\"] = 9729] = \"Linear\";\r\n TextureFilter[TextureFilter[\"MipMap\"] = 9987] = \"MipMap\";\r\n TextureFilter[TextureFilter[\"MipMapNearestNearest\"] = 9984] = \"MipMapNearestNearest\";\r\n TextureFilter[TextureFilter[\"MipMapLinearNearest\"] = 9985] = \"MipMapLinearNearest\";\r\n TextureFilter[TextureFilter[\"MipMapNearestLinear\"] = 9986] = \"MipMapNearestLinear\";\r\n TextureFilter[TextureFilter[\"MipMapLinearLinear\"] = 9987] = \"MipMapLinearLinear\";\r\n })(TextureFilter = spine.TextureFilter || (spine.TextureFilter = {}));\r\n var TextureWrap;\r\n (function (TextureWrap) {\r\n TextureWrap[TextureWrap[\"MirroredRepeat\"] = 33648] = \"MirroredRepeat\";\r\n TextureWrap[TextureWrap[\"ClampToEdge\"] = 33071] = \"ClampToEdge\";\r\n TextureWrap[TextureWrap[\"Repeat\"] = 10497] = \"Repeat\";\r\n })(TextureWrap = spine.TextureWrap || (spine.TextureWrap = {}));\r\n var TextureRegion = (function () {\r\n function TextureRegion() {\r\n this.u = 0;\r\n this.v = 0;\r\n this.u2 = 0;\r\n this.v2 = 0;\r\n this.width = 0;\r\n this.height = 0;\r\n this.rotate = false;\r\n this.offsetX = 0;\r\n this.offsetY = 0;\r\n this.originalWidth = 0;\r\n this.originalHeight = 0;\r\n }\r\n return TextureRegion;\r\n }());\r\n spine.TextureRegion = TextureRegion;\r\n var FakeTexture = (function (_super) {\r\n __extends(FakeTexture, _super);\r\n function FakeTexture() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n FakeTexture.prototype.setFilters = function (minFilter, magFilter) { };\r\n FakeTexture.prototype.setWraps = function (uWrap, vWrap) { };\r\n FakeTexture.prototype.dispose = function () { };\r\n return FakeTexture;\r\n }(Texture));\r\n spine.FakeTexture = FakeTexture;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TextureAtlas = (function () {\r\n function TextureAtlas(atlasText, textureLoader) {\r\n this.pages = new Array();\r\n this.regions = new Array();\r\n this.load(atlasText, textureLoader);\r\n }\r\n TextureAtlas.prototype.load = function (atlasText, textureLoader) {\r\n if (textureLoader == null)\r\n throw new Error(\"textureLoader cannot be null.\");\r\n var reader = new TextureAtlasReader(atlasText);\r\n var tuple = new Array(4);\r\n var page = null;\r\n while (true) {\r\n var line = reader.readLine();\r\n if (line == null)\r\n break;\r\n line = line.trim();\r\n if (line.length == 0)\r\n page = null;\r\n else if (!page) {\r\n page = new TextureAtlasPage();\r\n page.name = line;\r\n if (reader.readTuple(tuple) == 2) {\r\n page.width = parseInt(tuple[0]);\r\n page.height = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n }\r\n reader.readTuple(tuple);\r\n page.minFilter = spine.Texture.filterFromString(tuple[0]);\r\n page.magFilter = spine.Texture.filterFromString(tuple[1]);\r\n var direction = reader.readValue();\r\n page.uWrap = spine.TextureWrap.ClampToEdge;\r\n page.vWrap = spine.TextureWrap.ClampToEdge;\r\n if (direction == \"x\")\r\n page.uWrap = spine.TextureWrap.Repeat;\r\n else if (direction == \"y\")\r\n page.vWrap = spine.TextureWrap.Repeat;\r\n else if (direction == \"xy\")\r\n page.uWrap = page.vWrap = spine.TextureWrap.Repeat;\r\n page.texture = textureLoader(line);\r\n page.texture.setFilters(page.minFilter, page.magFilter);\r\n page.texture.setWraps(page.uWrap, page.vWrap);\r\n page.width = page.texture.getImage().width;\r\n page.height = page.texture.getImage().height;\r\n this.pages.push(page);\r\n }\r\n else {\r\n var region = new TextureAtlasRegion();\r\n region.name = line;\r\n region.page = page;\r\n var rotateValue = reader.readValue();\r\n if (rotateValue.toLocaleLowerCase() == \"true\") {\r\n region.degrees = 90;\r\n }\r\n else if (rotateValue.toLocaleLowerCase() == \"false\") {\r\n region.degrees = 0;\r\n }\r\n else {\r\n region.degrees = parseFloat(rotateValue);\r\n }\r\n region.rotate = region.degrees == 90;\r\n reader.readTuple(tuple);\r\n var x = parseInt(tuple[0]);\r\n var y = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n var width = parseInt(tuple[0]);\r\n var height = parseInt(tuple[1]);\r\n region.u = x / page.width;\r\n region.v = y / page.height;\r\n if (region.rotate) {\r\n region.u2 = (x + height) / page.width;\r\n region.v2 = (y + width) / page.height;\r\n }\r\n else {\r\n region.u2 = (x + width) / page.width;\r\n region.v2 = (y + height) / page.height;\r\n }\r\n region.x = x;\r\n region.y = y;\r\n region.width = Math.abs(width);\r\n region.height = Math.abs(height);\r\n if (reader.readTuple(tuple) == 4) {\r\n if (reader.readTuple(tuple) == 4) {\r\n reader.readTuple(tuple);\r\n }\r\n }\r\n region.originalWidth = parseInt(tuple[0]);\r\n region.originalHeight = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n region.offsetX = parseInt(tuple[0]);\r\n region.offsetY = parseInt(tuple[1]);\r\n region.index = parseInt(reader.readValue());\r\n region.texture = page.texture;\r\n this.regions.push(region);\r\n }\r\n }\r\n };\r\n TextureAtlas.prototype.findRegion = function (name) {\r\n for (var i = 0; i < this.regions.length; i++) {\r\n if (this.regions[i].name == name) {\r\n return this.regions[i];\r\n }\r\n }\r\n return null;\r\n };\r\n TextureAtlas.prototype.dispose = function () {\r\n for (var i = 0; i < this.pages.length; i++) {\r\n this.pages[i].texture.dispose();\r\n }\r\n };\r\n return TextureAtlas;\r\n }());\r\n spine.TextureAtlas = TextureAtlas;\r\n var TextureAtlasReader = (function () {\r\n function TextureAtlasReader(text) {\r\n this.index = 0;\r\n this.lines = text.split(/\\r\\n|\\r|\\n/);\r\n }\r\n TextureAtlasReader.prototype.readLine = function () {\r\n if (this.index >= this.lines.length)\r\n return null;\r\n return this.lines[this.index++];\r\n };\r\n TextureAtlasReader.prototype.readValue = function () {\r\n var line = this.readLine();\r\n var colon = line.indexOf(\":\");\r\n if (colon == -1)\r\n throw new Error(\"Invalid line: \" + line);\r\n return line.substring(colon + 1).trim();\r\n };\r\n TextureAtlasReader.prototype.readTuple = function (tuple) {\r\n var line = this.readLine();\r\n var colon = line.indexOf(\":\");\r\n if (colon == -1)\r\n throw new Error(\"Invalid line: \" + line);\r\n var i = 0, lastMatch = colon + 1;\r\n for (; i < 3; i++) {\r\n var comma = line.indexOf(\",\", lastMatch);\r\n if (comma == -1)\r\n break;\r\n tuple[i] = line.substr(lastMatch, comma - lastMatch).trim();\r\n lastMatch = comma + 1;\r\n }\r\n tuple[i] = line.substring(lastMatch).trim();\r\n return i + 1;\r\n };\r\n return TextureAtlasReader;\r\n }());\r\n var TextureAtlasPage = (function () {\r\n function TextureAtlasPage() {\r\n }\r\n return TextureAtlasPage;\r\n }());\r\n spine.TextureAtlasPage = TextureAtlasPage;\r\n var TextureAtlasRegion = (function (_super) {\r\n __extends(TextureAtlasRegion, _super);\r\n function TextureAtlasRegion() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return TextureAtlasRegion;\r\n }(spine.TextureRegion));\r\n spine.TextureAtlasRegion = TextureAtlasRegion;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TransformConstraint = (function () {\r\n function TransformConstraint(data, skeleton) {\r\n this.rotateMix = 0;\r\n this.translateMix = 0;\r\n this.scaleMix = 0;\r\n this.shearMix = 0;\r\n this.temp = new spine.Vector2();\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.rotateMix = data.rotateMix;\r\n this.translateMix = data.translateMix;\r\n this.scaleMix = data.scaleMix;\r\n this.shearMix = data.shearMix;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findBone(data.target.name);\r\n }\r\n TransformConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n TransformConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n TransformConstraint.prototype.update = function () {\r\n if (this.data.local) {\r\n if (this.data.relative)\r\n this.applyRelativeLocal();\r\n else\r\n this.applyAbsoluteLocal();\r\n }\r\n else {\r\n if (this.data.relative)\r\n this.applyRelativeWorld();\r\n else\r\n this.applyAbsoluteWorld();\r\n }\r\n };\r\n TransformConstraint.prototype.applyAbsoluteWorld = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n var ta = target.a, tb = target.b, tc = target.c, td = target.d;\r\n var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n var offsetRotation = this.data.offsetRotation * degRadReflect;\r\n var offsetShearY = this.data.offsetShearY * degRadReflect;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n var modified = false;\r\n if (rotateMix != 0) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n var cos = Math.cos(r), sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n modified = true;\r\n }\r\n if (translateMix != 0) {\r\n var temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n bone.worldX += (temp.x - bone.worldX) * translateMix;\r\n bone.worldY += (temp.y - bone.worldY) * translateMix;\r\n modified = true;\r\n }\r\n if (scaleMix > 0) {\r\n var s = Math.sqrt(bone.a * bone.a + bone.c * bone.c);\r\n var ts = Math.sqrt(ta * ta + tc * tc);\r\n if (s > 0.00001)\r\n s = (s + (ts - s + this.data.offsetScaleX) * scaleMix) / s;\r\n bone.a *= s;\r\n bone.c *= s;\r\n s = Math.sqrt(bone.b * bone.b + bone.d * bone.d);\r\n ts = Math.sqrt(tb * tb + td * td);\r\n if (s > 0.00001)\r\n s = (s + (ts - s + this.data.offsetScaleY) * scaleMix) / s;\r\n bone.b *= s;\r\n bone.d *= s;\r\n modified = true;\r\n }\r\n if (shearMix > 0) {\r\n var b = bone.b, d = bone.d;\r\n var by = Math.atan2(d, b);\r\n var r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a));\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r = by + (r + offsetShearY) * shearMix;\r\n var s = Math.sqrt(b * b + d * d);\r\n bone.b = Math.cos(r) * s;\r\n bone.d = Math.sin(r) * s;\r\n modified = true;\r\n }\r\n if (modified)\r\n bone.appliedValid = false;\r\n }\r\n };\r\n TransformConstraint.prototype.applyRelativeWorld = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n var ta = target.a, tb = target.b, tc = target.c, td = target.d;\r\n var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n var offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n var modified = false;\r\n if (rotateMix != 0) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var r = Math.atan2(tc, ta) + offsetRotation;\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n var cos = Math.cos(r), sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n modified = true;\r\n }\r\n if (translateMix != 0) {\r\n var temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n bone.worldX += temp.x * translateMix;\r\n bone.worldY += temp.y * translateMix;\r\n modified = true;\r\n }\r\n if (scaleMix > 0) {\r\n var s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * scaleMix + 1;\r\n bone.a *= s;\r\n bone.c *= s;\r\n s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * scaleMix + 1;\r\n bone.b *= s;\r\n bone.d *= s;\r\n modified = true;\r\n }\r\n if (shearMix > 0) {\r\n var r = Math.atan2(td, tb) - Math.atan2(tc, ta);\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n var b = bone.b, d = bone.d;\r\n r = Math.atan2(d, b) + (r - spine.MathUtils.PI / 2 + offsetShearY) * shearMix;\r\n var s = Math.sqrt(b * b + d * d);\r\n bone.b = Math.cos(r) * s;\r\n bone.d = Math.sin(r) * s;\r\n modified = true;\r\n }\r\n if (modified)\r\n bone.appliedValid = false;\r\n }\r\n };\r\n TransformConstraint.prototype.applyAbsoluteLocal = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n if (!target.appliedValid)\r\n target.updateAppliedTransform();\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var rotation = bone.arotation;\r\n if (rotateMix != 0) {\r\n var r = target.arotation - rotation + this.data.offsetRotation;\r\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n rotation += r * rotateMix;\r\n }\r\n var x = bone.ax, y = bone.ay;\r\n if (translateMix != 0) {\r\n x += (target.ax - x + this.data.offsetX) * translateMix;\r\n y += (target.ay - y + this.data.offsetY) * translateMix;\r\n }\r\n var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n if (scaleMix != 0) {\r\n if (scaleX > 0.00001)\r\n scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * scaleMix) / scaleX;\r\n if (scaleY > 0.00001)\r\n scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * scaleMix) / scaleY;\r\n }\r\n var shearY = bone.ashearY;\r\n if (shearMix != 0) {\r\n var r = target.ashearY - shearY + this.data.offsetShearY;\r\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n bone.shearY += r * shearMix;\r\n }\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n };\r\n TransformConstraint.prototype.applyRelativeLocal = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n if (!target.appliedValid)\r\n target.updateAppliedTransform();\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var rotation = bone.arotation;\r\n if (rotateMix != 0)\r\n rotation += (target.arotation + this.data.offsetRotation) * rotateMix;\r\n var x = bone.ax, y = bone.ay;\r\n if (translateMix != 0) {\r\n x += (target.ax + this.data.offsetX) * translateMix;\r\n y += (target.ay + this.data.offsetY) * translateMix;\r\n }\r\n var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n if (scaleMix != 0) {\r\n if (scaleX > 0.00001)\r\n scaleX *= ((target.ascaleX - 1 + this.data.offsetScaleX) * scaleMix) + 1;\r\n if (scaleY > 0.00001)\r\n scaleY *= ((target.ascaleY - 1 + this.data.offsetScaleY) * scaleMix) + 1;\r\n }\r\n var shearY = bone.ashearY;\r\n if (shearMix != 0)\r\n shearY += (target.ashearY + this.data.offsetShearY) * shearMix;\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n };\r\n return TransformConstraint;\r\n }());\r\n spine.TransformConstraint = TransformConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TransformConstraintData = (function (_super) {\r\n __extends(TransformConstraintData, _super);\r\n function TransformConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n _this.rotateMix = 0;\r\n _this.translateMix = 0;\r\n _this.scaleMix = 0;\r\n _this.shearMix = 0;\r\n _this.offsetRotation = 0;\r\n _this.offsetX = 0;\r\n _this.offsetY = 0;\r\n _this.offsetScaleX = 0;\r\n _this.offsetScaleY = 0;\r\n _this.offsetShearY = 0;\r\n _this.relative = false;\r\n _this.local = false;\r\n return _this;\r\n }\r\n return TransformConstraintData;\r\n }(spine.ConstraintData));\r\n spine.TransformConstraintData = TransformConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Triangulator = (function () {\r\n function Triangulator() {\r\n this.convexPolygons = new Array();\r\n this.convexPolygonsIndices = new Array();\r\n this.indicesArray = new Array();\r\n this.isConcaveArray = new Array();\r\n this.triangles = new Array();\r\n this.polygonPool = new spine.Pool(function () {\r\n return new Array();\r\n });\r\n this.polygonIndicesPool = new spine.Pool(function () {\r\n return new Array();\r\n });\r\n }\r\n Triangulator.prototype.triangulate = function (verticesArray) {\r\n var vertices = verticesArray;\r\n var vertexCount = verticesArray.length >> 1;\r\n var indices = this.indicesArray;\r\n indices.length = 0;\r\n for (var i = 0; i < vertexCount; i++)\r\n indices[i] = i;\r\n var isConcave = this.isConcaveArray;\r\n isConcave.length = 0;\r\n for (var i = 0, n = vertexCount; i < n; ++i)\r\n isConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices);\r\n var triangles = this.triangles;\r\n triangles.length = 0;\r\n while (vertexCount > 3) {\r\n var previous = vertexCount - 1, i = 0, next = 1;\r\n while (true) {\r\n outer: if (!isConcave[i]) {\r\n var p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\r\n var p1x = vertices[p1], p1y = vertices[p1 + 1];\r\n var p2x = vertices[p2], p2y = vertices[p2 + 1];\r\n var p3x = vertices[p3], p3y = vertices[p3 + 1];\r\n for (var ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\r\n if (!isConcave[ii])\r\n continue;\r\n var v = indices[ii] << 1;\r\n var vx = vertices[v], vy = vertices[v + 1];\r\n if (Triangulator.positiveArea(p3x, p3y, p1x, p1y, vx, vy)) {\r\n if (Triangulator.positiveArea(p1x, p1y, p2x, p2y, vx, vy)) {\r\n if (Triangulator.positiveArea(p2x, p2y, p3x, p3y, vx, vy))\r\n break outer;\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n if (next == 0) {\r\n do {\r\n if (!isConcave[i])\r\n break;\r\n i--;\r\n } while (i > 0);\r\n break;\r\n }\r\n previous = i;\r\n i = next;\r\n next = (next + 1) % vertexCount;\r\n }\r\n triangles.push(indices[(vertexCount + i - 1) % vertexCount]);\r\n triangles.push(indices[i]);\r\n triangles.push(indices[(i + 1) % vertexCount]);\r\n indices.splice(i, 1);\r\n isConcave.splice(i, 1);\r\n vertexCount--;\r\n var previousIndex = (vertexCount + i - 1) % vertexCount;\r\n var nextIndex = i == vertexCount ? 0 : i;\r\n isConcave[previousIndex] = Triangulator.isConcave(previousIndex, vertexCount, vertices, indices);\r\n isConcave[nextIndex] = Triangulator.isConcave(nextIndex, vertexCount, vertices, indices);\r\n }\r\n if (vertexCount == 3) {\r\n triangles.push(indices[2]);\r\n triangles.push(indices[0]);\r\n triangles.push(indices[1]);\r\n }\r\n return triangles;\r\n };\r\n Triangulator.prototype.decompose = function (verticesArray, triangles) {\r\n var vertices = verticesArray;\r\n var convexPolygons = this.convexPolygons;\r\n this.polygonPool.freeAll(convexPolygons);\r\n convexPolygons.length = 0;\r\n var convexPolygonsIndices = this.convexPolygonsIndices;\r\n this.polygonIndicesPool.freeAll(convexPolygonsIndices);\r\n convexPolygonsIndices.length = 0;\r\n var polygonIndices = this.polygonIndicesPool.obtain();\r\n polygonIndices.length = 0;\r\n var polygon = this.polygonPool.obtain();\r\n polygon.length = 0;\r\n var fanBaseIndex = -1, lastWinding = 0;\r\n for (var i = 0, n = triangles.length; i < n; i += 3) {\r\n var t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\r\n var x1 = vertices[t1], y1 = vertices[t1 + 1];\r\n var x2 = vertices[t2], y2 = vertices[t2 + 1];\r\n var x3 = vertices[t3], y3 = vertices[t3 + 1];\r\n var merged = false;\r\n if (fanBaseIndex == t1) {\r\n var o = polygon.length - 4;\r\n var winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3);\r\n var winding2 = Triangulator.winding(x3, y3, polygon[0], polygon[1], polygon[2], polygon[3]);\r\n if (winding1 == lastWinding && winding2 == lastWinding) {\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices.push(t3);\r\n merged = true;\r\n }\r\n }\r\n if (!merged) {\r\n if (polygon.length > 0) {\r\n convexPolygons.push(polygon);\r\n convexPolygonsIndices.push(polygonIndices);\r\n }\r\n else {\r\n this.polygonPool.free(polygon);\r\n this.polygonIndicesPool.free(polygonIndices);\r\n }\r\n polygon = this.polygonPool.obtain();\r\n polygon.length = 0;\r\n polygon.push(x1);\r\n polygon.push(y1);\r\n polygon.push(x2);\r\n polygon.push(y2);\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices = this.polygonIndicesPool.obtain();\r\n polygonIndices.length = 0;\r\n polygonIndices.push(t1);\r\n polygonIndices.push(t2);\r\n polygonIndices.push(t3);\r\n lastWinding = Triangulator.winding(x1, y1, x2, y2, x3, y3);\r\n fanBaseIndex = t1;\r\n }\r\n }\r\n if (polygon.length > 0) {\r\n convexPolygons.push(polygon);\r\n convexPolygonsIndices.push(polygonIndices);\r\n }\r\n for (var i = 0, n = convexPolygons.length; i < n; i++) {\r\n polygonIndices = convexPolygonsIndices[i];\r\n if (polygonIndices.length == 0)\r\n continue;\r\n var firstIndex = polygonIndices[0];\r\n var lastIndex = polygonIndices[polygonIndices.length - 1];\r\n polygon = convexPolygons[i];\r\n var o = polygon.length - 4;\r\n var prevPrevX = polygon[o], prevPrevY = polygon[o + 1];\r\n var prevX = polygon[o + 2], prevY = polygon[o + 3];\r\n var firstX = polygon[0], firstY = polygon[1];\r\n var secondX = polygon[2], secondY = polygon[3];\r\n var winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\r\n for (var ii = 0; ii < n; ii++) {\r\n if (ii == i)\r\n continue;\r\n var otherIndices = convexPolygonsIndices[ii];\r\n if (otherIndices.length != 3)\r\n continue;\r\n var otherFirstIndex = otherIndices[0];\r\n var otherSecondIndex = otherIndices[1];\r\n var otherLastIndex = otherIndices[2];\r\n var otherPoly = convexPolygons[ii];\r\n var x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1];\r\n if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex)\r\n continue;\r\n var winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\r\n var winding2 = Triangulator.winding(x3, y3, firstX, firstY, secondX, secondY);\r\n if (winding1 == winding && winding2 == winding) {\r\n otherPoly.length = 0;\r\n otherIndices.length = 0;\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices.push(otherLastIndex);\r\n prevPrevX = prevX;\r\n prevPrevY = prevY;\r\n prevX = x3;\r\n prevY = y3;\r\n ii = 0;\r\n }\r\n }\r\n }\r\n for (var i = convexPolygons.length - 1; i >= 0; i--) {\r\n polygon = convexPolygons[i];\r\n if (polygon.length == 0) {\r\n convexPolygons.splice(i, 1);\r\n this.polygonPool.free(polygon);\r\n polygonIndices = convexPolygonsIndices[i];\r\n convexPolygonsIndices.splice(i, 1);\r\n this.polygonIndicesPool.free(polygonIndices);\r\n }\r\n }\r\n return convexPolygons;\r\n };\r\n Triangulator.isConcave = function (index, vertexCount, vertices, indices) {\r\n var previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\r\n var current = indices[index] << 1;\r\n var next = indices[(index + 1) % vertexCount] << 1;\r\n return !this.positiveArea(vertices[previous], vertices[previous + 1], vertices[current], vertices[current + 1], vertices[next], vertices[next + 1]);\r\n };\r\n Triangulator.positiveArea = function (p1x, p1y, p2x, p2y, p3x, p3y) {\r\n return p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\r\n };\r\n Triangulator.winding = function (p1x, p1y, p2x, p2y, p3x, p3y) {\r\n var px = p2x - p1x, py = p2y - p1y;\r\n return p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\r\n };\r\n return Triangulator;\r\n }());\r\n spine.Triangulator = Triangulator;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IntSet = (function () {\r\n function IntSet() {\r\n this.array = new Array();\r\n }\r\n IntSet.prototype.add = function (value) {\r\n var contains = this.contains(value);\r\n this.array[value | 0] = value | 0;\r\n return !contains;\r\n };\r\n IntSet.prototype.contains = function (value) {\r\n return this.array[value | 0] != undefined;\r\n };\r\n IntSet.prototype.remove = function (value) {\r\n this.array[value | 0] = undefined;\r\n };\r\n IntSet.prototype.clear = function () {\r\n this.array.length = 0;\r\n };\r\n return IntSet;\r\n }());\r\n spine.IntSet = IntSet;\r\n var Color = (function () {\r\n function Color(r, g, b, a) {\r\n if (r === void 0) { r = 0; }\r\n if (g === void 0) { g = 0; }\r\n if (b === void 0) { b = 0; }\r\n if (a === void 0) { a = 0; }\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n }\r\n Color.prototype.set = function (r, g, b, a) {\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n this.clamp();\r\n return this;\r\n };\r\n Color.prototype.setFromColor = function (c) {\r\n this.r = c.r;\r\n this.g = c.g;\r\n this.b = c.b;\r\n this.a = c.a;\r\n return this;\r\n };\r\n Color.prototype.setFromString = function (hex) {\r\n hex = hex.charAt(0) == '#' ? hex.substr(1) : hex;\r\n this.r = parseInt(hex.substr(0, 2), 16) / 255.0;\r\n this.g = parseInt(hex.substr(2, 2), 16) / 255.0;\r\n this.b = parseInt(hex.substr(4, 2), 16) / 255.0;\r\n this.a = (hex.length != 8 ? 255 : parseInt(hex.substr(6, 2), 16)) / 255.0;\r\n return this;\r\n };\r\n Color.prototype.add = function (r, g, b, a) {\r\n this.r += r;\r\n this.g += g;\r\n this.b += b;\r\n this.a += a;\r\n this.clamp();\r\n return this;\r\n };\r\n Color.prototype.clamp = function () {\r\n if (this.r < 0)\r\n this.r = 0;\r\n else if (this.r > 1)\r\n this.r = 1;\r\n if (this.g < 0)\r\n this.g = 0;\r\n else if (this.g > 1)\r\n this.g = 1;\r\n if (this.b < 0)\r\n this.b = 0;\r\n else if (this.b > 1)\r\n this.b = 1;\r\n if (this.a < 0)\r\n this.a = 0;\r\n else if (this.a > 1)\r\n this.a = 1;\r\n return this;\r\n };\r\n Color.rgba8888ToColor = function (color, value) {\r\n color.r = ((value & 0xff000000) >>> 24) / 255;\r\n color.g = ((value & 0x00ff0000) >>> 16) / 255;\r\n color.b = ((value & 0x0000ff00) >>> 8) / 255;\r\n color.a = ((value & 0x000000ff)) / 255;\r\n };\r\n Color.rgb888ToColor = function (color, value) {\r\n color.r = ((value & 0x00ff0000) >>> 16) / 255;\r\n color.g = ((value & 0x0000ff00) >>> 8) / 255;\r\n color.b = ((value & 0x000000ff)) / 255;\r\n };\r\n Color.WHITE = new Color(1, 1, 1, 1);\r\n Color.RED = new Color(1, 0, 0, 1);\r\n Color.GREEN = new Color(0, 1, 0, 1);\r\n Color.BLUE = new Color(0, 0, 1, 1);\r\n Color.MAGENTA = new Color(1, 0, 1, 1);\r\n return Color;\r\n }());\r\n spine.Color = Color;\r\n var MathUtils = (function () {\r\n function MathUtils() {\r\n }\r\n MathUtils.clamp = function (value, min, max) {\r\n if (value < min)\r\n return min;\r\n if (value > max)\r\n return max;\r\n return value;\r\n };\r\n MathUtils.cosDeg = function (degrees) {\r\n return Math.cos(degrees * MathUtils.degRad);\r\n };\r\n MathUtils.sinDeg = function (degrees) {\r\n return Math.sin(degrees * MathUtils.degRad);\r\n };\r\n MathUtils.signum = function (value) {\r\n return value > 0 ? 1 : value < 0 ? -1 : 0;\r\n };\r\n MathUtils.toInt = function (x) {\r\n return x > 0 ? Math.floor(x) : Math.ceil(x);\r\n };\r\n MathUtils.cbrt = function (x) {\r\n var y = Math.pow(Math.abs(x), 1 / 3);\r\n return x < 0 ? -y : y;\r\n };\r\n MathUtils.randomTriangular = function (min, max) {\r\n return MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\r\n };\r\n MathUtils.randomTriangularWith = function (min, max, mode) {\r\n var u = Math.random();\r\n var d = max - min;\r\n if (u <= (mode - min) / d)\r\n return min + Math.sqrt(u * d * (mode - min));\r\n return max - Math.sqrt((1 - u) * d * (max - mode));\r\n };\r\n MathUtils.PI = 3.1415927;\r\n MathUtils.PI2 = MathUtils.PI * 2;\r\n MathUtils.radiansToDegrees = 180 / MathUtils.PI;\r\n MathUtils.radDeg = MathUtils.radiansToDegrees;\r\n MathUtils.degreesToRadians = MathUtils.PI / 180;\r\n MathUtils.degRad = MathUtils.degreesToRadians;\r\n return MathUtils;\r\n }());\r\n spine.MathUtils = MathUtils;\r\n var Interpolation = (function () {\r\n function Interpolation() {\r\n }\r\n Interpolation.prototype.apply = function (start, end, a) {\r\n return start + (end - start) * this.applyInternal(a);\r\n };\r\n return Interpolation;\r\n }());\r\n spine.Interpolation = Interpolation;\r\n var Pow = (function (_super) {\r\n __extends(Pow, _super);\r\n function Pow(power) {\r\n var _this = _super.call(this) || this;\r\n _this.power = 2;\r\n _this.power = power;\r\n return _this;\r\n }\r\n Pow.prototype.applyInternal = function (a) {\r\n if (a <= 0.5)\r\n return Math.pow(a * 2, this.power) / 2;\r\n return Math.pow((a - 1) * 2, this.power) / (this.power % 2 == 0 ? -2 : 2) + 1;\r\n };\r\n return Pow;\r\n }(Interpolation));\r\n spine.Pow = Pow;\r\n var PowOut = (function (_super) {\r\n __extends(PowOut, _super);\r\n function PowOut(power) {\r\n return _super.call(this, power) || this;\r\n }\r\n PowOut.prototype.applyInternal = function (a) {\r\n return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\r\n };\r\n return PowOut;\r\n }(Pow));\r\n spine.PowOut = PowOut;\r\n var Utils = (function () {\r\n function Utils() {\r\n }\r\n Utils.arrayCopy = function (source, sourceStart, dest, destStart, numElements) {\r\n for (var i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\r\n dest[j] = source[i];\r\n }\r\n };\r\n Utils.setArraySize = function (array, size, value) {\r\n if (value === void 0) { value = 0; }\r\n var oldSize = array.length;\r\n if (oldSize == size)\r\n return array;\r\n array.length = size;\r\n if (oldSize < size) {\r\n for (var i = oldSize; i < size; i++)\r\n array[i] = value;\r\n }\r\n return array;\r\n };\r\n Utils.ensureArrayCapacity = function (array, size, value) {\r\n if (value === void 0) { value = 0; }\r\n if (array.length >= size)\r\n return array;\r\n return Utils.setArraySize(array, size, value);\r\n };\r\n Utils.newArray = function (size, defaultValue) {\r\n var array = new Array(size);\r\n for (var i = 0; i < size; i++)\r\n array[i] = defaultValue;\r\n return array;\r\n };\r\n Utils.newFloatArray = function (size) {\r\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\r\n return new Float32Array(size);\r\n }\r\n else {\r\n var array = new Array(size);\r\n for (var i = 0; i < array.length; i++)\r\n array[i] = 0;\r\n return array;\r\n }\r\n };\r\n Utils.newShortArray = function (size) {\r\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\r\n return new Int16Array(size);\r\n }\r\n else {\r\n var array = new Array(size);\r\n for (var i = 0; i < array.length; i++)\r\n array[i] = 0;\r\n return array;\r\n }\r\n };\r\n Utils.toFloatArray = function (array) {\r\n return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\r\n };\r\n Utils.toSinglePrecision = function (value) {\r\n return Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;\r\n };\r\n Utils.webkit602BugfixHelper = function (alpha, blend) {\r\n };\r\n Utils.contains = function (array, element, identity) {\r\n if (identity === void 0) { identity = true; }\r\n for (var i = 0; i < array.length; i++) {\r\n if (array[i] == element)\r\n return true;\r\n }\r\n return false;\r\n };\r\n Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== \"undefined\";\r\n return Utils;\r\n }());\r\n spine.Utils = Utils;\r\n var DebugUtils = (function () {\r\n function DebugUtils() {\r\n }\r\n DebugUtils.logBones = function (skeleton) {\r\n for (var i = 0; i < skeleton.bones.length; i++) {\r\n var bone = skeleton.bones[i];\r\n console.log(bone.data.name + \", \" + bone.a + \", \" + bone.b + \", \" + bone.c + \", \" + bone.d + \", \" + bone.worldX + \", \" + bone.worldY);\r\n }\r\n };\r\n return DebugUtils;\r\n }());\r\n spine.DebugUtils = DebugUtils;\r\n var Pool = (function () {\r\n function Pool(instantiator) {\r\n this.items = new Array();\r\n this.instantiator = instantiator;\r\n }\r\n Pool.prototype.obtain = function () {\r\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\r\n };\r\n Pool.prototype.free = function (item) {\r\n if (item.reset)\r\n item.reset();\r\n this.items.push(item);\r\n };\r\n Pool.prototype.freeAll = function (items) {\r\n for (var i = 0; i < items.length; i++) {\r\n this.free(items[i]);\r\n }\r\n };\r\n Pool.prototype.clear = function () {\r\n this.items.length = 0;\r\n };\r\n return Pool;\r\n }());\r\n spine.Pool = Pool;\r\n var Vector2 = (function () {\r\n function Vector2(x, y) {\r\n if (x === void 0) { x = 0; }\r\n if (y === void 0) { y = 0; }\r\n this.x = x;\r\n this.y = y;\r\n }\r\n Vector2.prototype.set = function (x, y) {\r\n this.x = x;\r\n this.y = y;\r\n return this;\r\n };\r\n Vector2.prototype.length = function () {\r\n var x = this.x;\r\n var y = this.y;\r\n return Math.sqrt(x * x + y * y);\r\n };\r\n Vector2.prototype.normalize = function () {\r\n var len = this.length();\r\n if (len != 0) {\r\n this.x /= len;\r\n this.y /= len;\r\n }\r\n return this;\r\n };\r\n return Vector2;\r\n }());\r\n spine.Vector2 = Vector2;\r\n var TimeKeeper = (function () {\r\n function TimeKeeper() {\r\n this.maxDelta = 0.064;\r\n this.framesPerSecond = 0;\r\n this.delta = 0;\r\n this.totalTime = 0;\r\n this.lastTime = Date.now() / 1000;\r\n this.frameCount = 0;\r\n this.frameTime = 0;\r\n }\r\n TimeKeeper.prototype.update = function () {\r\n var now = Date.now() / 1000;\r\n this.delta = now - this.lastTime;\r\n this.frameTime += this.delta;\r\n this.totalTime += this.delta;\r\n if (this.delta > this.maxDelta)\r\n this.delta = this.maxDelta;\r\n this.lastTime = now;\r\n this.frameCount++;\r\n if (this.frameTime > 1) {\r\n this.framesPerSecond = this.frameCount / this.frameTime;\r\n this.frameTime = 0;\r\n this.frameCount = 0;\r\n }\r\n };\r\n return TimeKeeper;\r\n }());\r\n spine.TimeKeeper = TimeKeeper;\r\n var WindowedMean = (function () {\r\n function WindowedMean(windowSize) {\r\n if (windowSize === void 0) { windowSize = 32; }\r\n this.addedValues = 0;\r\n this.lastValue = 0;\r\n this.mean = 0;\r\n this.dirty = true;\r\n this.values = new Array(windowSize);\r\n }\r\n WindowedMean.prototype.hasEnoughData = function () {\r\n return this.addedValues >= this.values.length;\r\n };\r\n WindowedMean.prototype.addValue = function (value) {\r\n if (this.addedValues < this.values.length)\r\n this.addedValues++;\r\n this.values[this.lastValue++] = value;\r\n if (this.lastValue > this.values.length - 1)\r\n this.lastValue = 0;\r\n this.dirty = true;\r\n };\r\n WindowedMean.prototype.getMean = function () {\r\n if (this.hasEnoughData()) {\r\n if (this.dirty) {\r\n var mean = 0;\r\n for (var i = 0; i < this.values.length; i++) {\r\n mean += this.values[i];\r\n }\r\n this.mean = mean / this.values.length;\r\n this.dirty = false;\r\n }\r\n return this.mean;\r\n }\r\n else {\r\n return 0;\r\n }\r\n };\r\n return WindowedMean;\r\n }());\r\n spine.WindowedMean = WindowedMean;\r\n})(spine || (spine = {}));\r\n(function () {\r\n if (!Math.fround) {\r\n Math.fround = (function (array) {\r\n return function (x) {\r\n return array[0] = x, array[0];\r\n };\r\n })(new Float32Array(1));\r\n }\r\n})();\r\nvar spine;\r\n(function (spine) {\r\n var Attachment = (function () {\r\n function Attachment(name) {\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n return Attachment;\r\n }());\r\n spine.Attachment = Attachment;\r\n var VertexAttachment = (function (_super) {\r\n __extends(VertexAttachment, _super);\r\n function VertexAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.id = (VertexAttachment.nextID++ & 65535) << 11;\r\n _this.worldVerticesLength = 0;\r\n _this.deformAttachment = _this;\r\n return _this;\r\n }\r\n VertexAttachment.prototype.computeWorldVertices = function (slot, start, count, worldVertices, offset, stride) {\r\n count = offset + (count >> 1) * stride;\r\n var skeleton = slot.bone.skeleton;\r\n var deformArray = slot.deform;\r\n var vertices = this.vertices;\r\n var bones = this.bones;\r\n if (bones == null) {\r\n if (deformArray.length > 0)\r\n vertices = deformArray;\r\n var bone = slot.bone;\r\n var x = bone.worldX;\r\n var y = bone.worldY;\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n for (var v_1 = start, w = offset; w < count; v_1 += 2, w += stride) {\r\n var vx = vertices[v_1], vy = vertices[v_1 + 1];\r\n worldVertices[w] = vx * a + vy * b + x;\r\n worldVertices[w + 1] = vx * c + vy * d + y;\r\n }\r\n return;\r\n }\r\n var v = 0, skip = 0;\r\n for (var i = 0; i < start; i += 2) {\r\n var n = bones[v];\r\n v += n + 1;\r\n skip += n;\r\n }\r\n var skeletonBones = skeleton.bones;\r\n if (deformArray.length == 0) {\r\n for (var w = offset, b = skip * 3; w < count; w += stride) {\r\n var wx = 0, wy = 0;\r\n var n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3) {\r\n var bone = skeletonBones[bones[v]];\r\n var vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];\r\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\r\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\r\n }\r\n worldVertices[w] = wx;\r\n worldVertices[w + 1] = wy;\r\n }\r\n }\r\n else {\r\n var deform = deformArray;\r\n for (var w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\r\n var wx = 0, wy = 0;\r\n var n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3, f += 2) {\r\n var bone = skeletonBones[bones[v]];\r\n var vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];\r\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\r\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\r\n }\r\n worldVertices[w] = wx;\r\n worldVertices[w + 1] = wy;\r\n }\r\n }\r\n };\r\n VertexAttachment.prototype.copyTo = function (attachment) {\r\n if (this.bones != null) {\r\n attachment.bones = new Array(this.bones.length);\r\n spine.Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\r\n }\r\n else\r\n attachment.bones = null;\r\n if (this.vertices != null) {\r\n attachment.vertices = spine.Utils.newFloatArray(this.vertices.length);\r\n spine.Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\r\n }\r\n else\r\n attachment.vertices = null;\r\n attachment.worldVerticesLength = this.worldVerticesLength;\r\n attachment.deformAttachment = this.deformAttachment;\r\n };\r\n VertexAttachment.nextID = 0;\r\n return VertexAttachment;\r\n }(Attachment));\r\n spine.VertexAttachment = VertexAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AttachmentType;\r\n (function (AttachmentType) {\r\n AttachmentType[AttachmentType[\"Region\"] = 0] = \"Region\";\r\n AttachmentType[AttachmentType[\"BoundingBox\"] = 1] = \"BoundingBox\";\r\n AttachmentType[AttachmentType[\"Mesh\"] = 2] = \"Mesh\";\r\n AttachmentType[AttachmentType[\"LinkedMesh\"] = 3] = \"LinkedMesh\";\r\n AttachmentType[AttachmentType[\"Path\"] = 4] = \"Path\";\r\n AttachmentType[AttachmentType[\"Point\"] = 5] = \"Point\";\r\n AttachmentType[AttachmentType[\"Clipping\"] = 6] = \"Clipping\";\r\n })(AttachmentType = spine.AttachmentType || (spine.AttachmentType = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BoundingBoxAttachment = (function (_super) {\r\n __extends(BoundingBoxAttachment, _super);\r\n function BoundingBoxAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n BoundingBoxAttachment.prototype.copy = function () {\r\n var copy = new BoundingBoxAttachment(name);\r\n this.copyTo(copy);\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return BoundingBoxAttachment;\r\n }(spine.VertexAttachment));\r\n spine.BoundingBoxAttachment = BoundingBoxAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var ClippingAttachment = (function (_super) {\r\n __extends(ClippingAttachment, _super);\r\n function ClippingAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(0.2275, 0.2275, 0.8078, 1);\r\n return _this;\r\n }\r\n ClippingAttachment.prototype.copy = function () {\r\n var copy = new ClippingAttachment(name);\r\n this.copyTo(copy);\r\n copy.endSlot = this.endSlot;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return ClippingAttachment;\r\n }(spine.VertexAttachment));\r\n spine.ClippingAttachment = ClippingAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var MeshAttachment = (function (_super) {\r\n __extends(MeshAttachment, _super);\r\n function MeshAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n _this.tempColor = new spine.Color(0, 0, 0, 0);\r\n return _this;\r\n }\r\n MeshAttachment.prototype.updateUVs = function () {\r\n var regionUVs = this.regionUVs;\r\n if (this.uvs == null || this.uvs.length != regionUVs.length)\r\n this.uvs = spine.Utils.newFloatArray(regionUVs.length);\r\n var uvs = this.uvs;\r\n var n = this.uvs.length;\r\n var u = this.region.u, v = this.region.v, width = 0, height = 0;\r\n if (this.region instanceof spine.TextureAtlasRegion) {\r\n var region = this.region;\r\n var textureWidth = region.texture.getImage().width, textureHeight = region.texture.getImage().height;\r\n switch (region.degrees) {\r\n case 90:\r\n u -= (region.originalHeight - region.offsetY - region.height) / textureWidth;\r\n v -= (region.originalWidth - region.offsetX - region.width) / textureHeight;\r\n width = region.originalHeight / textureWidth;\r\n height = region.originalWidth / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + regionUVs[i + 1] * width;\r\n uvs[i + 1] = v + (1 - regionUVs[i]) * height;\r\n }\r\n return;\r\n case 180:\r\n u -= (region.originalWidth - region.offsetX - region.width) / textureWidth;\r\n v -= region.offsetY / textureHeight;\r\n width = region.originalWidth / textureWidth;\r\n height = region.originalHeight / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + (1 - regionUVs[i]) * width;\r\n uvs[i + 1] = v + (1 - regionUVs[i + 1]) * height;\r\n }\r\n return;\r\n case 270:\r\n u -= region.offsetY / textureWidth;\r\n v -= region.offsetX / textureHeight;\r\n width = region.originalHeight / textureWidth;\r\n height = region.originalWidth / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + (1 - regionUVs[i + 1]) * width;\r\n uvs[i + 1] = v + regionUVs[i] * height;\r\n }\r\n return;\r\n }\r\n u -= region.offsetX / textureWidth;\r\n v -= (region.originalHeight - region.offsetY - region.height) / textureHeight;\r\n width = region.originalWidth / textureWidth;\r\n height = region.originalHeight / textureHeight;\r\n }\r\n else if (this.region == null) {\r\n u = v = 0;\r\n width = height = 1;\r\n }\r\n else {\r\n width = this.region.u2 - u;\r\n height = this.region.v2 - v;\r\n }\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + regionUVs[i] * width;\r\n uvs[i + 1] = v + regionUVs[i + 1] * height;\r\n }\r\n };\r\n MeshAttachment.prototype.getParentMesh = function () {\r\n return this.parentMesh;\r\n };\r\n MeshAttachment.prototype.setParentMesh = function (parentMesh) {\r\n this.parentMesh = parentMesh;\r\n if (parentMesh != null) {\r\n this.bones = parentMesh.bones;\r\n this.vertices = parentMesh.vertices;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n this.regionUVs = parentMesh.regionUVs;\r\n this.triangles = parentMesh.triangles;\r\n this.hullLength = parentMesh.hullLength;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n }\r\n };\r\n MeshAttachment.prototype.copy = function () {\r\n if (this.parentMesh != null)\r\n return this.newLinkedMesh();\r\n var copy = new MeshAttachment(this.name);\r\n copy.region = this.region;\r\n copy.path = this.path;\r\n copy.color.setFromColor(this.color);\r\n this.copyTo(copy);\r\n copy.regionUVs = new Array(this.regionUVs.length);\r\n spine.Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\r\n copy.uvs = new Array(this.uvs.length);\r\n spine.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);\r\n copy.triangles = new Array(this.triangles.length);\r\n spine.Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\r\n copy.hullLength = this.hullLength;\r\n if (this.edges != null) {\r\n copy.edges = new Array(this.edges.length);\r\n spine.Utils.arrayCopy(this.edges, 0, copy.edges, 0, this.edges.length);\r\n }\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n return copy;\r\n };\r\n MeshAttachment.prototype.newLinkedMesh = function () {\r\n var copy = new MeshAttachment(this.name);\r\n copy.region = this.region;\r\n copy.path = this.path;\r\n copy.color.setFromColor(this.color);\r\n copy.deformAttachment = this.deformAttachment;\r\n copy.setParentMesh(this.parentMesh != null ? this.parentMesh : this);\r\n copy.updateUVs();\r\n return copy;\r\n };\r\n return MeshAttachment;\r\n }(spine.VertexAttachment));\r\n spine.MeshAttachment = MeshAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathAttachment = (function (_super) {\r\n __extends(PathAttachment, _super);\r\n function PathAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.closed = false;\r\n _this.constantSpeed = false;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n PathAttachment.prototype.copy = function () {\r\n var copy = new PathAttachment(name);\r\n this.copyTo(copy);\r\n copy.lengths = new Array(this.lengths.length);\r\n spine.Utils.arrayCopy(this.lengths, 0, copy.lengths, 0, this.lengths.length);\r\n copy.closed = closed;\r\n copy.constantSpeed = this.constantSpeed;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return PathAttachment;\r\n }(spine.VertexAttachment));\r\n spine.PathAttachment = PathAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PointAttachment = (function (_super) {\r\n __extends(PointAttachment, _super);\r\n function PointAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(0.38, 0.94, 0, 1);\r\n return _this;\r\n }\r\n PointAttachment.prototype.computeWorldPosition = function (bone, point) {\r\n point.x = this.x * bone.a + this.y * bone.b + bone.worldX;\r\n point.y = this.x * bone.c + this.y * bone.d + bone.worldY;\r\n return point;\r\n };\r\n PointAttachment.prototype.computeWorldRotation = function (bone) {\r\n var cos = spine.MathUtils.cosDeg(this.rotation), sin = spine.MathUtils.sinDeg(this.rotation);\r\n var x = cos * bone.a + sin * bone.b;\r\n var y = cos * bone.c + sin * bone.d;\r\n return Math.atan2(y, x) * spine.MathUtils.radDeg;\r\n };\r\n PointAttachment.prototype.copy = function () {\r\n var copy = new PointAttachment(name);\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.rotation = this.rotation;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return PointAttachment;\r\n }(spine.VertexAttachment));\r\n spine.PointAttachment = PointAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var RegionAttachment = (function (_super) {\r\n __extends(RegionAttachment, _super);\r\n function RegionAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.x = 0;\r\n _this.y = 0;\r\n _this.scaleX = 1;\r\n _this.scaleY = 1;\r\n _this.rotation = 0;\r\n _this.width = 0;\r\n _this.height = 0;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n _this.offset = spine.Utils.newFloatArray(8);\r\n _this.uvs = spine.Utils.newFloatArray(8);\r\n _this.tempColor = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n RegionAttachment.prototype.updateOffset = function () {\r\n var regionScaleX = this.width / this.region.originalWidth * this.scaleX;\r\n var regionScaleY = this.height / this.region.originalHeight * this.scaleY;\r\n var localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\r\n var localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\r\n var localX2 = localX + this.region.width * regionScaleX;\r\n var localY2 = localY + this.region.height * regionScaleY;\r\n var radians = this.rotation * Math.PI / 180;\r\n var cos = Math.cos(radians);\r\n var sin = Math.sin(radians);\r\n var localXCos = localX * cos + this.x;\r\n var localXSin = localX * sin;\r\n var localYCos = localY * cos + this.y;\r\n var localYSin = localY * sin;\r\n var localX2Cos = localX2 * cos + this.x;\r\n var localX2Sin = localX2 * sin;\r\n var localY2Cos = localY2 * cos + this.y;\r\n var localY2Sin = localY2 * sin;\r\n var offset = this.offset;\r\n offset[RegionAttachment.OX1] = localXCos - localYSin;\r\n offset[RegionAttachment.OY1] = localYCos + localXSin;\r\n offset[RegionAttachment.OX2] = localXCos - localY2Sin;\r\n offset[RegionAttachment.OY2] = localY2Cos + localXSin;\r\n offset[RegionAttachment.OX3] = localX2Cos - localY2Sin;\r\n offset[RegionAttachment.OY3] = localY2Cos + localX2Sin;\r\n offset[RegionAttachment.OX4] = localX2Cos - localYSin;\r\n offset[RegionAttachment.OY4] = localYCos + localX2Sin;\r\n };\r\n RegionAttachment.prototype.setRegion = function (region) {\r\n this.region = region;\r\n var uvs = this.uvs;\r\n if (region.rotate) {\r\n uvs[2] = region.u;\r\n uvs[3] = region.v2;\r\n uvs[4] = region.u;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v;\r\n uvs[0] = region.u2;\r\n uvs[1] = region.v2;\r\n }\r\n else {\r\n uvs[0] = region.u;\r\n uvs[1] = region.v2;\r\n uvs[2] = region.u;\r\n uvs[3] = region.v;\r\n uvs[4] = region.u2;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v2;\r\n }\r\n };\r\n RegionAttachment.prototype.computeWorldVertices = function (bone, worldVertices, offset, stride) {\r\n var vertexOffset = this.offset;\r\n var x = bone.worldX, y = bone.worldY;\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var offsetX = 0, offsetY = 0;\r\n offsetX = vertexOffset[RegionAttachment.OX1];\r\n offsetY = vertexOffset[RegionAttachment.OY1];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX2];\r\n offsetY = vertexOffset[RegionAttachment.OY2];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX3];\r\n offsetY = vertexOffset[RegionAttachment.OY3];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX4];\r\n offsetY = vertexOffset[RegionAttachment.OY4];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n };\r\n RegionAttachment.prototype.copy = function () {\r\n var copy = new RegionAttachment(this.name);\r\n copy.region = this.region;\r\n copy.rendererObject = this.rendererObject;\r\n copy.path = this.path;\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.scaleX = this.scaleX;\r\n copy.scaleY = this.scaleY;\r\n copy.rotation = this.rotation;\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n spine.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\r\n spine.Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n RegionAttachment.OX1 = 0;\r\n RegionAttachment.OY1 = 1;\r\n RegionAttachment.OX2 = 2;\r\n RegionAttachment.OY2 = 3;\r\n RegionAttachment.OX3 = 4;\r\n RegionAttachment.OY3 = 5;\r\n RegionAttachment.OX4 = 6;\r\n RegionAttachment.OY4 = 7;\r\n RegionAttachment.X1 = 0;\r\n RegionAttachment.Y1 = 1;\r\n RegionAttachment.C1R = 2;\r\n RegionAttachment.C1G = 3;\r\n RegionAttachment.C1B = 4;\r\n RegionAttachment.C1A = 5;\r\n RegionAttachment.U1 = 6;\r\n RegionAttachment.V1 = 7;\r\n RegionAttachment.X2 = 8;\r\n RegionAttachment.Y2 = 9;\r\n RegionAttachment.C2R = 10;\r\n RegionAttachment.C2G = 11;\r\n RegionAttachment.C2B = 12;\r\n RegionAttachment.C2A = 13;\r\n RegionAttachment.U2 = 14;\r\n RegionAttachment.V2 = 15;\r\n RegionAttachment.X3 = 16;\r\n RegionAttachment.Y3 = 17;\r\n RegionAttachment.C3R = 18;\r\n RegionAttachment.C3G = 19;\r\n RegionAttachment.C3B = 20;\r\n RegionAttachment.C3A = 21;\r\n RegionAttachment.U3 = 22;\r\n RegionAttachment.V3 = 23;\r\n RegionAttachment.X4 = 24;\r\n RegionAttachment.Y4 = 25;\r\n RegionAttachment.C4R = 26;\r\n RegionAttachment.C4G = 27;\r\n RegionAttachment.C4B = 28;\r\n RegionAttachment.C4A = 29;\r\n RegionAttachment.U4 = 30;\r\n RegionAttachment.V4 = 31;\r\n return RegionAttachment;\r\n }(spine.Attachment));\r\n spine.RegionAttachment = RegionAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var JitterEffect = (function () {\r\n function JitterEffect(jitterX, jitterY) {\r\n this.jitterX = 0;\r\n this.jitterY = 0;\r\n this.jitterX = jitterX;\r\n this.jitterY = jitterY;\r\n }\r\n JitterEffect.prototype.begin = function (skeleton) {\r\n };\r\n JitterEffect.prototype.transform = function (position, uv, light, dark) {\r\n position.x += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n position.y += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n };\r\n JitterEffect.prototype.end = function () {\r\n };\r\n return JitterEffect;\r\n }());\r\n spine.JitterEffect = JitterEffect;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SwirlEffect = (function () {\r\n function SwirlEffect(radius) {\r\n this.centerX = 0;\r\n this.centerY = 0;\r\n this.radius = 0;\r\n this.angle = 0;\r\n this.worldX = 0;\r\n this.worldY = 0;\r\n this.radius = radius;\r\n }\r\n SwirlEffect.prototype.begin = function (skeleton) {\r\n this.worldX = skeleton.x + this.centerX;\r\n this.worldY = skeleton.y + this.centerY;\r\n };\r\n SwirlEffect.prototype.transform = function (position, uv, light, dark) {\r\n var radAngle = this.angle * spine.MathUtils.degreesToRadians;\r\n var x = position.x - this.worldX;\r\n var y = position.y - this.worldY;\r\n var dist = Math.sqrt(x * x + y * y);\r\n if (dist < this.radius) {\r\n var theta = SwirlEffect.interpolation.apply(0, radAngle, (this.radius - dist) / this.radius);\r\n var cos = Math.cos(theta);\r\n var sin = Math.sin(theta);\r\n position.x = cos * x - sin * y + this.worldX;\r\n position.y = sin * x + cos * y + this.worldY;\r\n }\r\n };\r\n SwirlEffect.prototype.end = function () {\r\n };\r\n SwirlEffect.interpolation = new spine.PowOut(2);\r\n return SwirlEffect;\r\n }());\r\n spine.SwirlEffect = SwirlEffect;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var canvas;\r\n (function (canvas) {\r\n var AssetManager = (function (_super) {\r\n __extends(AssetManager, _super);\r\n function AssetManager(pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n return _super.call(this, function (image) { return new spine.canvas.CanvasTexture(image); }, pathPrefix) || this;\r\n }\r\n return AssetManager;\r\n }(spine.AssetManager));\r\n canvas.AssetManager = AssetManager;\r\n })(canvas = spine.canvas || (spine.canvas = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var canvas;\r\n (function (canvas) {\r\n var CanvasTexture = (function (_super) {\r\n __extends(CanvasTexture, _super);\r\n function CanvasTexture(image) {\r\n return _super.call(this, image) || this;\r\n }\r\n CanvasTexture.prototype.setFilters = function (minFilter, magFilter) { };\r\n CanvasTexture.prototype.setWraps = function (uWrap, vWrap) { };\r\n CanvasTexture.prototype.dispose = function () { };\r\n return CanvasTexture;\r\n }(spine.Texture));\r\n canvas.CanvasTexture = CanvasTexture;\r\n })(canvas = spine.canvas || (spine.canvas = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var canvas;\r\n (function (canvas) {\r\n var SkeletonRenderer = (function () {\r\n function SkeletonRenderer(context) {\r\n this.triangleRendering = false;\r\n this.debugRendering = false;\r\n this.vertices = spine.Utils.newFloatArray(8 * 1024);\r\n this.tempColor = new spine.Color();\r\n this.ctx = context;\r\n }\r\n SkeletonRenderer.prototype.draw = function (skeleton) {\r\n if (this.triangleRendering)\r\n this.drawTriangles(skeleton);\r\n else\r\n this.drawImages(skeleton);\r\n };\r\n SkeletonRenderer.prototype.drawImages = function (skeleton) {\r\n var ctx = this.ctx;\r\n var drawOrder = skeleton.drawOrder;\r\n if (this.debugRendering)\r\n ctx.strokeStyle = \"green\";\r\n ctx.save();\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var slot = drawOrder[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n var regionAttachment = null;\r\n var region = null;\r\n var image = null;\r\n if (attachment instanceof spine.RegionAttachment) {\r\n regionAttachment = attachment;\r\n region = regionAttachment.region;\r\n image = region.texture.getImage();\r\n }\r\n else\r\n continue;\r\n var skeleton_1 = slot.bone.skeleton;\r\n var skeletonColor = skeleton_1.color;\r\n var slotColor = slot.color;\r\n var regionColor = regionAttachment.color;\r\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * regionColor.r, skeletonColor.g * slotColor.g * regionColor.g, skeletonColor.b * slotColor.b * regionColor.b, alpha);\r\n var att = attachment;\r\n var bone = slot.bone;\r\n var w = region.width;\r\n var h = region.height;\r\n ctx.save();\r\n ctx.transform(bone.a, bone.c, bone.b, bone.d, bone.worldX, bone.worldY);\r\n ctx.translate(attachment.offset[0], attachment.offset[1]);\r\n ctx.rotate(attachment.rotation * Math.PI / 180);\r\n var atlasScale = att.width / w;\r\n ctx.scale(atlasScale * attachment.scaleX, atlasScale * attachment.scaleY);\r\n ctx.translate(w / 2, h / 2);\r\n if (attachment.region.rotate) {\r\n var t = w;\r\n w = h;\r\n h = t;\r\n ctx.rotate(-Math.PI / 2);\r\n }\r\n ctx.scale(1, -1);\r\n ctx.translate(-w / 2, -h / 2);\r\n if (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) {\r\n ctx.globalAlpha = color.a;\r\n }\r\n ctx.drawImage(image, region.x, region.y, w, h, 0, 0, w, h);\r\n if (this.debugRendering)\r\n ctx.strokeRect(0, 0, w, h);\r\n ctx.restore();\r\n }\r\n ctx.restore();\r\n };\r\n SkeletonRenderer.prototype.drawTriangles = function (skeleton) {\r\n var blendMode = null;\r\n var vertices = this.vertices;\r\n var triangles = null;\r\n var drawOrder = skeleton.drawOrder;\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var slot = drawOrder[i];\r\n var attachment = slot.getAttachment();\r\n var texture = null;\r\n var region = null;\r\n if (attachment instanceof spine.RegionAttachment) {\r\n var regionAttachment = attachment;\r\n vertices = this.computeRegionVertices(slot, regionAttachment, false);\r\n triangles = SkeletonRenderer.QUAD_TRIANGLES;\r\n region = regionAttachment.region;\r\n texture = region.texture.getImage();\r\n }\r\n else if (attachment instanceof spine.MeshAttachment) {\r\n var mesh = attachment;\r\n vertices = this.computeMeshVertices(slot, mesh, false);\r\n triangles = mesh.triangles;\r\n texture = mesh.region.renderObject.texture.getImage();\r\n }\r\n else\r\n continue;\r\n if (texture != null) {\r\n var slotBlendMode = slot.data.blendMode;\r\n if (slotBlendMode != blendMode) {\r\n blendMode = slotBlendMode;\r\n }\r\n var skeleton_2 = slot.bone.skeleton;\r\n var skeletonColor = skeleton_2.color;\r\n var slotColor = slot.color;\r\n var attachmentColor = attachment.color;\r\n var alpha = skeletonColor.a * slotColor.a * attachmentColor.a;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * attachmentColor.r, skeletonColor.g * slotColor.g * attachmentColor.g, skeletonColor.b * slotColor.b * attachmentColor.b, alpha);\r\n var ctx = this.ctx;\r\n if (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) {\r\n ctx.globalAlpha = color.a;\r\n }\r\n for (var j = 0; j < triangles.length; j += 3) {\r\n var t1 = triangles[j] * 8, t2 = triangles[j + 1] * 8, t3 = triangles[j + 2] * 8;\r\n var x0 = vertices[t1], y0 = vertices[t1 + 1], u0 = vertices[t1 + 6], v0 = vertices[t1 + 7];\r\n var x1 = vertices[t2], y1 = vertices[t2 + 1], u1 = vertices[t2 + 6], v1 = vertices[t2 + 7];\r\n var x2 = vertices[t3], y2 = vertices[t3 + 1], u2 = vertices[t3 + 6], v2 = vertices[t3 + 7];\r\n this.drawTriangle(texture, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2);\r\n if (this.debugRendering) {\r\n ctx.strokeStyle = \"green\";\r\n ctx.beginPath();\r\n ctx.moveTo(x0, y0);\r\n ctx.lineTo(x1, y1);\r\n ctx.lineTo(x2, y2);\r\n ctx.lineTo(x0, y0);\r\n ctx.stroke();\r\n }\r\n }\r\n }\r\n }\r\n this.ctx.globalAlpha = 1;\r\n };\r\n SkeletonRenderer.prototype.drawTriangle = function (img, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2) {\r\n var ctx = this.ctx;\r\n u0 *= img.width;\r\n v0 *= img.height;\r\n u1 *= img.width;\r\n v1 *= img.height;\r\n u2 *= img.width;\r\n v2 *= img.height;\r\n ctx.beginPath();\r\n ctx.moveTo(x0, y0);\r\n ctx.lineTo(x1, y1);\r\n ctx.lineTo(x2, y2);\r\n ctx.closePath();\r\n x1 -= x0;\r\n y1 -= y0;\r\n x2 -= x0;\r\n y2 -= y0;\r\n u1 -= u0;\r\n v1 -= v0;\r\n u2 -= u0;\r\n v2 -= v0;\r\n var det = 1 / (u1 * v2 - u2 * v1), a = (v2 * x1 - v1 * x2) * det, b = (v2 * y1 - v1 * y2) * det, c = (u1 * x2 - u2 * x1) * det, d = (u1 * y2 - u2 * y1) * det, e = x0 - a * u0 - c * v0, f = y0 - b * u0 - d * v0;\r\n ctx.save();\r\n ctx.transform(a, b, c, d, e, f);\r\n ctx.clip();\r\n ctx.drawImage(img, 0, 0);\r\n ctx.restore();\r\n };\r\n SkeletonRenderer.prototype.computeRegionVertices = function (slot, region, pma) {\r\n var skeleton = slot.bone.skeleton;\r\n var skeletonColor = skeleton.color;\r\n var slotColor = slot.color;\r\n var regionColor = region.color;\r\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n var multiplier = pma ? alpha : 1;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha);\r\n region.computeWorldVertices(slot.bone, this.vertices, 0, SkeletonRenderer.VERTEX_SIZE);\r\n var vertices = this.vertices;\r\n var uvs = region.uvs;\r\n vertices[spine.RegionAttachment.C1R] = color.r;\r\n vertices[spine.RegionAttachment.C1G] = color.g;\r\n vertices[spine.RegionAttachment.C1B] = color.b;\r\n vertices[spine.RegionAttachment.C1A] = color.a;\r\n vertices[spine.RegionAttachment.U1] = uvs[0];\r\n vertices[spine.RegionAttachment.V1] = uvs[1];\r\n vertices[spine.RegionAttachment.C2R] = color.r;\r\n vertices[spine.RegionAttachment.C2G] = color.g;\r\n vertices[spine.RegionAttachment.C2B] = color.b;\r\n vertices[spine.RegionAttachment.C2A] = color.a;\r\n vertices[spine.RegionAttachment.U2] = uvs[2];\r\n vertices[spine.RegionAttachment.V2] = uvs[3];\r\n vertices[spine.RegionAttachment.C3R] = color.r;\r\n vertices[spine.RegionAttachment.C3G] = color.g;\r\n vertices[spine.RegionAttachment.C3B] = color.b;\r\n vertices[spine.RegionAttachment.C3A] = color.a;\r\n vertices[spine.RegionAttachment.U3] = uvs[4];\r\n vertices[spine.RegionAttachment.V3] = uvs[5];\r\n vertices[spine.RegionAttachment.C4R] = color.r;\r\n vertices[spine.RegionAttachment.C4G] = color.g;\r\n vertices[spine.RegionAttachment.C4B] = color.b;\r\n vertices[spine.RegionAttachment.C4A] = color.a;\r\n vertices[spine.RegionAttachment.U4] = uvs[6];\r\n vertices[spine.RegionAttachment.V4] = uvs[7];\r\n return vertices;\r\n };\r\n SkeletonRenderer.prototype.computeMeshVertices = function (slot, mesh, pma) {\r\n var skeleton = slot.bone.skeleton;\r\n var skeletonColor = skeleton.color;\r\n var slotColor = slot.color;\r\n var regionColor = mesh.color;\r\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n var multiplier = pma ? alpha : 1;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha);\r\n var numVertices = mesh.worldVerticesLength / 2;\r\n if (this.vertices.length < mesh.worldVerticesLength) {\r\n this.vertices = spine.Utils.newFloatArray(mesh.worldVerticesLength);\r\n }\r\n var vertices = this.vertices;\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, SkeletonRenderer.VERTEX_SIZE);\r\n var uvs = mesh.uvs;\r\n for (var i = 0, n = numVertices, u = 0, v = 2; i < n; i++) {\r\n vertices[v++] = color.r;\r\n vertices[v++] = color.g;\r\n vertices[v++] = color.b;\r\n vertices[v++] = color.a;\r\n vertices[v++] = uvs[u++];\r\n vertices[v++] = uvs[u++];\r\n v += 2;\r\n }\r\n return vertices;\r\n };\r\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n SkeletonRenderer.VERTEX_SIZE = 2 + 2 + 4;\r\n return SkeletonRenderer;\r\n }());\r\n canvas.SkeletonRenderer = SkeletonRenderer;\r\n })(canvas = spine.canvas || (spine.canvas = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var AssetManager = (function (_super) {\r\n __extends(AssetManager, _super);\r\n function AssetManager(context, pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n return _super.call(this, function (image) {\r\n return new spine.webgl.GLTexture(context, image);\r\n }, pathPrefix) || this;\r\n }\r\n return AssetManager;\r\n }(spine.AssetManager));\r\n webgl.AssetManager = AssetManager;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var OrthoCamera = (function () {\r\n function OrthoCamera(viewportWidth, viewportHeight) {\r\n this.position = new webgl.Vector3(0, 0, 0);\r\n this.direction = new webgl.Vector3(0, 0, -1);\r\n this.up = new webgl.Vector3(0, 1, 0);\r\n this.near = 0;\r\n this.far = 100;\r\n this.zoom = 1;\r\n this.viewportWidth = 0;\r\n this.viewportHeight = 0;\r\n this.projectionView = new webgl.Matrix4();\r\n this.inverseProjectionView = new webgl.Matrix4();\r\n this.projection = new webgl.Matrix4();\r\n this.view = new webgl.Matrix4();\r\n this.tmp = new webgl.Vector3();\r\n this.viewportWidth = viewportWidth;\r\n this.viewportHeight = viewportHeight;\r\n this.update();\r\n }\r\n OrthoCamera.prototype.update = function () {\r\n var projection = this.projection;\r\n var view = this.view;\r\n var projectionView = this.projectionView;\r\n var inverseProjectionView = this.inverseProjectionView;\r\n var zoom = this.zoom, viewportWidth = this.viewportWidth, viewportHeight = this.viewportHeight;\r\n projection.ortho(zoom * (-viewportWidth / 2), zoom * (viewportWidth / 2), zoom * (-viewportHeight / 2), zoom * (viewportHeight / 2), this.near, this.far);\r\n view.lookAt(this.position, this.direction, this.up);\r\n projectionView.set(projection.values);\r\n projectionView.multiply(view);\r\n inverseProjectionView.set(projectionView.values).invert();\r\n };\r\n OrthoCamera.prototype.screenToWorld = function (screenCoords, screenWidth, screenHeight) {\r\n var x = screenCoords.x, y = screenHeight - screenCoords.y - 1;\r\n var tmp = this.tmp;\r\n tmp.x = (2 * x) / screenWidth - 1;\r\n tmp.y = (2 * y) / screenHeight - 1;\r\n tmp.z = (2 * screenCoords.z) - 1;\r\n tmp.project(this.inverseProjectionView);\r\n screenCoords.set(tmp.x, tmp.y, tmp.z);\r\n return screenCoords;\r\n };\r\n OrthoCamera.prototype.setViewport = function (viewportWidth, viewportHeight) {\r\n this.viewportWidth = viewportWidth;\r\n this.viewportHeight = viewportHeight;\r\n };\r\n return OrthoCamera;\r\n }());\r\n webgl.OrthoCamera = OrthoCamera;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var GLTexture = (function (_super) {\r\n __extends(GLTexture, _super);\r\n function GLTexture(context, image, useMipMaps) {\r\n if (useMipMaps === void 0) { useMipMaps = false; }\r\n var _this = _super.call(this, image) || this;\r\n _this.texture = null;\r\n _this.boundUnit = 0;\r\n _this.useMipMaps = false;\r\n _this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n _this.useMipMaps = useMipMaps;\r\n _this.restore();\r\n _this.context.addRestorable(_this);\r\n return _this;\r\n }\r\n GLTexture.prototype.setFilters = function (minFilter, magFilter) {\r\n var gl = this.context.gl;\r\n this.bind();\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, minFilter);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, GLTexture.validateMagFilter(magFilter));\r\n };\r\n GLTexture.validateMagFilter = function (magFilter) {\r\n switch (magFilter) {\r\n case spine.TextureFilter.MipMap:\r\n case spine.TextureFilter.MipMapLinearLinear:\r\n case spine.TextureFilter.MipMapLinearNearest:\r\n case spine.TextureFilter.MipMapNearestLinear:\r\n case spine.TextureFilter.MipMapNearestNearest:\r\n return spine.TextureFilter.Linear;\r\n default:\r\n return magFilter;\r\n }\r\n };\r\n GLTexture.prototype.setWraps = function (uWrap, vWrap) {\r\n var gl = this.context.gl;\r\n this.bind();\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, uWrap);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, vWrap);\r\n };\r\n GLTexture.prototype.update = function (useMipMaps) {\r\n var gl = this.context.gl;\r\n if (!this.texture) {\r\n this.texture = this.context.gl.createTexture();\r\n }\r\n this.bind();\r\n if (GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL)\r\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\r\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this._image);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, useMipMaps ? gl.LINEAR_MIPMAP_LINEAR : gl.LINEAR);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\r\n if (useMipMaps)\r\n gl.generateMipmap(gl.TEXTURE_2D);\r\n };\r\n GLTexture.prototype.restore = function () {\r\n this.texture = null;\r\n this.update(this.useMipMaps);\r\n };\r\n GLTexture.prototype.bind = function (unit) {\r\n if (unit === void 0) { unit = 0; }\r\n var gl = this.context.gl;\r\n this.boundUnit = unit;\r\n gl.activeTexture(gl.TEXTURE0 + unit);\r\n gl.bindTexture(gl.TEXTURE_2D, this.texture);\r\n };\r\n GLTexture.prototype.unbind = function () {\r\n var gl = this.context.gl;\r\n gl.activeTexture(gl.TEXTURE0 + this.boundUnit);\r\n gl.bindTexture(gl.TEXTURE_2D, null);\r\n };\r\n GLTexture.prototype.dispose = function () {\r\n this.context.removeRestorable(this);\r\n var gl = this.context.gl;\r\n gl.deleteTexture(this.texture);\r\n };\r\n GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL = false;\r\n return GLTexture;\r\n }(spine.Texture));\r\n webgl.GLTexture = GLTexture;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n webgl.M00 = 0;\r\n webgl.M01 = 4;\r\n webgl.M02 = 8;\r\n webgl.M03 = 12;\r\n webgl.M10 = 1;\r\n webgl.M11 = 5;\r\n webgl.M12 = 9;\r\n webgl.M13 = 13;\r\n webgl.M20 = 2;\r\n webgl.M21 = 6;\r\n webgl.M22 = 10;\r\n webgl.M23 = 14;\r\n webgl.M30 = 3;\r\n webgl.M31 = 7;\r\n webgl.M32 = 11;\r\n webgl.M33 = 15;\r\n var Matrix4 = (function () {\r\n function Matrix4() {\r\n this.temp = new Float32Array(16);\r\n this.values = new Float32Array(16);\r\n var v = this.values;\r\n v[webgl.M00] = 1;\r\n v[webgl.M11] = 1;\r\n v[webgl.M22] = 1;\r\n v[webgl.M33] = 1;\r\n }\r\n Matrix4.prototype.set = function (values) {\r\n this.values.set(values);\r\n return this;\r\n };\r\n Matrix4.prototype.transpose = function () {\r\n var t = this.temp;\r\n var v = this.values;\r\n t[webgl.M00] = v[webgl.M00];\r\n t[webgl.M01] = v[webgl.M10];\r\n t[webgl.M02] = v[webgl.M20];\r\n t[webgl.M03] = v[webgl.M30];\r\n t[webgl.M10] = v[webgl.M01];\r\n t[webgl.M11] = v[webgl.M11];\r\n t[webgl.M12] = v[webgl.M21];\r\n t[webgl.M13] = v[webgl.M31];\r\n t[webgl.M20] = v[webgl.M02];\r\n t[webgl.M21] = v[webgl.M12];\r\n t[webgl.M22] = v[webgl.M22];\r\n t[webgl.M23] = v[webgl.M32];\r\n t[webgl.M30] = v[webgl.M03];\r\n t[webgl.M31] = v[webgl.M13];\r\n t[webgl.M32] = v[webgl.M23];\r\n t[webgl.M33] = v[webgl.M33];\r\n return this.set(t);\r\n };\r\n Matrix4.prototype.identity = function () {\r\n var v = this.values;\r\n v[webgl.M00] = 1;\r\n v[webgl.M01] = 0;\r\n v[webgl.M02] = 0;\r\n v[webgl.M03] = 0;\r\n v[webgl.M10] = 0;\r\n v[webgl.M11] = 1;\r\n v[webgl.M12] = 0;\r\n v[webgl.M13] = 0;\r\n v[webgl.M20] = 0;\r\n v[webgl.M21] = 0;\r\n v[webgl.M22] = 1;\r\n v[webgl.M23] = 0;\r\n v[webgl.M30] = 0;\r\n v[webgl.M31] = 0;\r\n v[webgl.M32] = 0;\r\n v[webgl.M33] = 1;\r\n return this;\r\n };\r\n Matrix4.prototype.invert = function () {\r\n var v = this.values;\r\n var t = this.temp;\r\n var l_det = v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03]\r\n + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03]\r\n - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13]\r\n - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13]\r\n + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23]\r\n + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23]\r\n - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33]\r\n - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\r\n if (l_det == 0)\r\n throw new Error(\"non-invertible matrix\");\r\n var inv_det = 1.0 / l_det;\r\n t[webgl.M00] = v[webgl.M12] * v[webgl.M23] * v[webgl.M31] - v[webgl.M13] * v[webgl.M22] * v[webgl.M31] + v[webgl.M13] * v[webgl.M21] * v[webgl.M32]\r\n - v[webgl.M11] * v[webgl.M23] * v[webgl.M32] - v[webgl.M12] * v[webgl.M21] * v[webgl.M33] + v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M01] = v[webgl.M03] * v[webgl.M22] * v[webgl.M31] - v[webgl.M02] * v[webgl.M23] * v[webgl.M31] - v[webgl.M03] * v[webgl.M21] * v[webgl.M32]\r\n + v[webgl.M01] * v[webgl.M23] * v[webgl.M32] + v[webgl.M02] * v[webgl.M21] * v[webgl.M33] - v[webgl.M01] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M02] = v[webgl.M02] * v[webgl.M13] * v[webgl.M31] - v[webgl.M03] * v[webgl.M12] * v[webgl.M31] + v[webgl.M03] * v[webgl.M11] * v[webgl.M32]\r\n - v[webgl.M01] * v[webgl.M13] * v[webgl.M32] - v[webgl.M02] * v[webgl.M11] * v[webgl.M33] + v[webgl.M01] * v[webgl.M12] * v[webgl.M33];\r\n t[webgl.M03] = v[webgl.M03] * v[webgl.M12] * v[webgl.M21] - v[webgl.M02] * v[webgl.M13] * v[webgl.M21] - v[webgl.M03] * v[webgl.M11] * v[webgl.M22]\r\n + v[webgl.M01] * v[webgl.M13] * v[webgl.M22] + v[webgl.M02] * v[webgl.M11] * v[webgl.M23] - v[webgl.M01] * v[webgl.M12] * v[webgl.M23];\r\n t[webgl.M10] = v[webgl.M13] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M20] * v[webgl.M32]\r\n + v[webgl.M10] * v[webgl.M23] * v[webgl.M32] + v[webgl.M12] * v[webgl.M20] * v[webgl.M33] - v[webgl.M10] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M11] = v[webgl.M02] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M22] * v[webgl.M30] + v[webgl.M03] * v[webgl.M20] * v[webgl.M32]\r\n - v[webgl.M00] * v[webgl.M23] * v[webgl.M32] - v[webgl.M02] * v[webgl.M20] * v[webgl.M33] + v[webgl.M00] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M12] = v[webgl.M03] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M10] * v[webgl.M32]\r\n + v[webgl.M00] * v[webgl.M13] * v[webgl.M32] + v[webgl.M02] * v[webgl.M10] * v[webgl.M33] - v[webgl.M00] * v[webgl.M12] * v[webgl.M33];\r\n t[webgl.M13] = v[webgl.M02] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M12] * v[webgl.M20] + v[webgl.M03] * v[webgl.M10] * v[webgl.M22]\r\n - v[webgl.M00] * v[webgl.M13] * v[webgl.M22] - v[webgl.M02] * v[webgl.M10] * v[webgl.M23] + v[webgl.M00] * v[webgl.M12] * v[webgl.M23];\r\n t[webgl.M20] = v[webgl.M11] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M21] * v[webgl.M30] + v[webgl.M13] * v[webgl.M20] * v[webgl.M31]\r\n - v[webgl.M10] * v[webgl.M23] * v[webgl.M31] - v[webgl.M11] * v[webgl.M20] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M33];\r\n t[webgl.M21] = v[webgl.M03] * v[webgl.M21] * v[webgl.M30] - v[webgl.M01] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M20] * v[webgl.M31]\r\n + v[webgl.M00] * v[webgl.M23] * v[webgl.M31] + v[webgl.M01] * v[webgl.M20] * v[webgl.M33] - v[webgl.M00] * v[webgl.M21] * v[webgl.M33];\r\n t[webgl.M22] = v[webgl.M01] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M11] * v[webgl.M30] + v[webgl.M03] * v[webgl.M10] * v[webgl.M31]\r\n - v[webgl.M00] * v[webgl.M13] * v[webgl.M31] - v[webgl.M01] * v[webgl.M10] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M33];\r\n t[webgl.M23] = v[webgl.M03] * v[webgl.M11] * v[webgl.M20] - v[webgl.M01] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M10] * v[webgl.M21]\r\n + v[webgl.M00] * v[webgl.M13] * v[webgl.M21] + v[webgl.M01] * v[webgl.M10] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M23];\r\n t[webgl.M30] = v[webgl.M12] * v[webgl.M21] * v[webgl.M30] - v[webgl.M11] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M20] * v[webgl.M31]\r\n + v[webgl.M10] * v[webgl.M22] * v[webgl.M31] + v[webgl.M11] * v[webgl.M20] * v[webgl.M32] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32];\r\n t[webgl.M31] = v[webgl.M01] * v[webgl.M22] * v[webgl.M30] - v[webgl.M02] * v[webgl.M21] * v[webgl.M30] + v[webgl.M02] * v[webgl.M20] * v[webgl.M31]\r\n - v[webgl.M00] * v[webgl.M22] * v[webgl.M31] - v[webgl.M01] * v[webgl.M20] * v[webgl.M32] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32];\r\n t[webgl.M32] = v[webgl.M02] * v[webgl.M11] * v[webgl.M30] - v[webgl.M01] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M10] * v[webgl.M31]\r\n + v[webgl.M00] * v[webgl.M12] * v[webgl.M31] + v[webgl.M01] * v[webgl.M10] * v[webgl.M32] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32];\r\n t[webgl.M33] = v[webgl.M01] * v[webgl.M12] * v[webgl.M20] - v[webgl.M02] * v[webgl.M11] * v[webgl.M20] + v[webgl.M02] * v[webgl.M10] * v[webgl.M21]\r\n - v[webgl.M00] * v[webgl.M12] * v[webgl.M21] - v[webgl.M01] * v[webgl.M10] * v[webgl.M22] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22];\r\n v[webgl.M00] = t[webgl.M00] * inv_det;\r\n v[webgl.M01] = t[webgl.M01] * inv_det;\r\n v[webgl.M02] = t[webgl.M02] * inv_det;\r\n v[webgl.M03] = t[webgl.M03] * inv_det;\r\n v[webgl.M10] = t[webgl.M10] * inv_det;\r\n v[webgl.M11] = t[webgl.M11] * inv_det;\r\n v[webgl.M12] = t[webgl.M12] * inv_det;\r\n v[webgl.M13] = t[webgl.M13] * inv_det;\r\n v[webgl.M20] = t[webgl.M20] * inv_det;\r\n v[webgl.M21] = t[webgl.M21] * inv_det;\r\n v[webgl.M22] = t[webgl.M22] * inv_det;\r\n v[webgl.M23] = t[webgl.M23] * inv_det;\r\n v[webgl.M30] = t[webgl.M30] * inv_det;\r\n v[webgl.M31] = t[webgl.M31] * inv_det;\r\n v[webgl.M32] = t[webgl.M32] * inv_det;\r\n v[webgl.M33] = t[webgl.M33] * inv_det;\r\n return this;\r\n };\r\n Matrix4.prototype.determinant = function () {\r\n var v = this.values;\r\n return v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03]\r\n + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03]\r\n - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13]\r\n - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13]\r\n + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23]\r\n + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23]\r\n - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33]\r\n - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\r\n };\r\n Matrix4.prototype.translate = function (x, y, z) {\r\n var v = this.values;\r\n v[webgl.M03] += x;\r\n v[webgl.M13] += y;\r\n v[webgl.M23] += z;\r\n return this;\r\n };\r\n Matrix4.prototype.copy = function () {\r\n return new Matrix4().set(this.values);\r\n };\r\n Matrix4.prototype.projection = function (near, far, fovy, aspectRatio) {\r\n this.identity();\r\n var l_fd = (1.0 / Math.tan((fovy * (Math.PI / 180)) / 2.0));\r\n var l_a1 = (far + near) / (near - far);\r\n var l_a2 = (2 * far * near) / (near - far);\r\n var v = this.values;\r\n v[webgl.M00] = l_fd / aspectRatio;\r\n v[webgl.M10] = 0;\r\n v[webgl.M20] = 0;\r\n v[webgl.M30] = 0;\r\n v[webgl.M01] = 0;\r\n v[webgl.M11] = l_fd;\r\n v[webgl.M21] = 0;\r\n v[webgl.M31] = 0;\r\n v[webgl.M02] = 0;\r\n v[webgl.M12] = 0;\r\n v[webgl.M22] = l_a1;\r\n v[webgl.M32] = -1;\r\n v[webgl.M03] = 0;\r\n v[webgl.M13] = 0;\r\n v[webgl.M23] = l_a2;\r\n v[webgl.M33] = 0;\r\n return this;\r\n };\r\n Matrix4.prototype.ortho2d = function (x, y, width, height) {\r\n return this.ortho(x, x + width, y, y + height, 0, 1);\r\n };\r\n Matrix4.prototype.ortho = function (left, right, bottom, top, near, far) {\r\n this.identity();\r\n var x_orth = 2 / (right - left);\r\n var y_orth = 2 / (top - bottom);\r\n var z_orth = -2 / (far - near);\r\n var tx = -(right + left) / (right - left);\r\n var ty = -(top + bottom) / (top - bottom);\r\n var tz = -(far + near) / (far - near);\r\n var v = this.values;\r\n v[webgl.M00] = x_orth;\r\n v[webgl.M10] = 0;\r\n v[webgl.M20] = 0;\r\n v[webgl.M30] = 0;\r\n v[webgl.M01] = 0;\r\n v[webgl.M11] = y_orth;\r\n v[webgl.M21] = 0;\r\n v[webgl.M31] = 0;\r\n v[webgl.M02] = 0;\r\n v[webgl.M12] = 0;\r\n v[webgl.M22] = z_orth;\r\n v[webgl.M32] = 0;\r\n v[webgl.M03] = tx;\r\n v[webgl.M13] = ty;\r\n v[webgl.M23] = tz;\r\n v[webgl.M33] = 1;\r\n return this;\r\n };\r\n Matrix4.prototype.multiply = function (matrix) {\r\n var t = this.temp;\r\n var v = this.values;\r\n var m = matrix.values;\r\n t[webgl.M00] = v[webgl.M00] * m[webgl.M00] + v[webgl.M01] * m[webgl.M10] + v[webgl.M02] * m[webgl.M20] + v[webgl.M03] * m[webgl.M30];\r\n t[webgl.M01] = v[webgl.M00] * m[webgl.M01] + v[webgl.M01] * m[webgl.M11] + v[webgl.M02] * m[webgl.M21] + v[webgl.M03] * m[webgl.M31];\r\n t[webgl.M02] = v[webgl.M00] * m[webgl.M02] + v[webgl.M01] * m[webgl.M12] + v[webgl.M02] * m[webgl.M22] + v[webgl.M03] * m[webgl.M32];\r\n t[webgl.M03] = v[webgl.M00] * m[webgl.M03] + v[webgl.M01] * m[webgl.M13] + v[webgl.M02] * m[webgl.M23] + v[webgl.M03] * m[webgl.M33];\r\n t[webgl.M10] = v[webgl.M10] * m[webgl.M00] + v[webgl.M11] * m[webgl.M10] + v[webgl.M12] * m[webgl.M20] + v[webgl.M13] * m[webgl.M30];\r\n t[webgl.M11] = v[webgl.M10] * m[webgl.M01] + v[webgl.M11] * m[webgl.M11] + v[webgl.M12] * m[webgl.M21] + v[webgl.M13] * m[webgl.M31];\r\n t[webgl.M12] = v[webgl.M10] * m[webgl.M02] + v[webgl.M11] * m[webgl.M12] + v[webgl.M12] * m[webgl.M22] + v[webgl.M13] * m[webgl.M32];\r\n t[webgl.M13] = v[webgl.M10] * m[webgl.M03] + v[webgl.M11] * m[webgl.M13] + v[webgl.M12] * m[webgl.M23] + v[webgl.M13] * m[webgl.M33];\r\n t[webgl.M20] = v[webgl.M20] * m[webgl.M00] + v[webgl.M21] * m[webgl.M10] + v[webgl.M22] * m[webgl.M20] + v[webgl.M23] * m[webgl.M30];\r\n t[webgl.M21] = v[webgl.M20] * m[webgl.M01] + v[webgl.M21] * m[webgl.M11] + v[webgl.M22] * m[webgl.M21] + v[webgl.M23] * m[webgl.M31];\r\n t[webgl.M22] = v[webgl.M20] * m[webgl.M02] + v[webgl.M21] * m[webgl.M12] + v[webgl.M22] * m[webgl.M22] + v[webgl.M23] * m[webgl.M32];\r\n t[webgl.M23] = v[webgl.M20] * m[webgl.M03] + v[webgl.M21] * m[webgl.M13] + v[webgl.M22] * m[webgl.M23] + v[webgl.M23] * m[webgl.M33];\r\n t[webgl.M30] = v[webgl.M30] * m[webgl.M00] + v[webgl.M31] * m[webgl.M10] + v[webgl.M32] * m[webgl.M20] + v[webgl.M33] * m[webgl.M30];\r\n t[webgl.M31] = v[webgl.M30] * m[webgl.M01] + v[webgl.M31] * m[webgl.M11] + v[webgl.M32] * m[webgl.M21] + v[webgl.M33] * m[webgl.M31];\r\n t[webgl.M32] = v[webgl.M30] * m[webgl.M02] + v[webgl.M31] * m[webgl.M12] + v[webgl.M32] * m[webgl.M22] + v[webgl.M33] * m[webgl.M32];\r\n t[webgl.M33] = v[webgl.M30] * m[webgl.M03] + v[webgl.M31] * m[webgl.M13] + v[webgl.M32] * m[webgl.M23] + v[webgl.M33] * m[webgl.M33];\r\n return this.set(this.temp);\r\n };\r\n Matrix4.prototype.multiplyLeft = function (matrix) {\r\n var t = this.temp;\r\n var v = this.values;\r\n var m = matrix.values;\r\n t[webgl.M00] = m[webgl.M00] * v[webgl.M00] + m[webgl.M01] * v[webgl.M10] + m[webgl.M02] * v[webgl.M20] + m[webgl.M03] * v[webgl.M30];\r\n t[webgl.M01] = m[webgl.M00] * v[webgl.M01] + m[webgl.M01] * v[webgl.M11] + m[webgl.M02] * v[webgl.M21] + m[webgl.M03] * v[webgl.M31];\r\n t[webgl.M02] = m[webgl.M00] * v[webgl.M02] + m[webgl.M01] * v[webgl.M12] + m[webgl.M02] * v[webgl.M22] + m[webgl.M03] * v[webgl.M32];\r\n t[webgl.M03] = m[webgl.M00] * v[webgl.M03] + m[webgl.M01] * v[webgl.M13] + m[webgl.M02] * v[webgl.M23] + m[webgl.M03] * v[webgl.M33];\r\n t[webgl.M10] = m[webgl.M10] * v[webgl.M00] + m[webgl.M11] * v[webgl.M10] + m[webgl.M12] * v[webgl.M20] + m[webgl.M13] * v[webgl.M30];\r\n t[webgl.M11] = m[webgl.M10] * v[webgl.M01] + m[webgl.M11] * v[webgl.M11] + m[webgl.M12] * v[webgl.M21] + m[webgl.M13] * v[webgl.M31];\r\n t[webgl.M12] = m[webgl.M10] * v[webgl.M02] + m[webgl.M11] * v[webgl.M12] + m[webgl.M12] * v[webgl.M22] + m[webgl.M13] * v[webgl.M32];\r\n t[webgl.M13] = m[webgl.M10] * v[webgl.M03] + m[webgl.M11] * v[webgl.M13] + m[webgl.M12] * v[webgl.M23] + m[webgl.M13] * v[webgl.M33];\r\n t[webgl.M20] = m[webgl.M20] * v[webgl.M00] + m[webgl.M21] * v[webgl.M10] + m[webgl.M22] * v[webgl.M20] + m[webgl.M23] * v[webgl.M30];\r\n t[webgl.M21] = m[webgl.M20] * v[webgl.M01] + m[webgl.M21] * v[webgl.M11] + m[webgl.M22] * v[webgl.M21] + m[webgl.M23] * v[webgl.M31];\r\n t[webgl.M22] = m[webgl.M20] * v[webgl.M02] + m[webgl.M21] * v[webgl.M12] + m[webgl.M22] * v[webgl.M22] + m[webgl.M23] * v[webgl.M32];\r\n t[webgl.M23] = m[webgl.M20] * v[webgl.M03] + m[webgl.M21] * v[webgl.M13] + m[webgl.M22] * v[webgl.M23] + m[webgl.M23] * v[webgl.M33];\r\n t[webgl.M30] = m[webgl.M30] * v[webgl.M00] + m[webgl.M31] * v[webgl.M10] + m[webgl.M32] * v[webgl.M20] + m[webgl.M33] * v[webgl.M30];\r\n t[webgl.M31] = m[webgl.M30] * v[webgl.M01] + m[webgl.M31] * v[webgl.M11] + m[webgl.M32] * v[webgl.M21] + m[webgl.M33] * v[webgl.M31];\r\n t[webgl.M32] = m[webgl.M30] * v[webgl.M02] + m[webgl.M31] * v[webgl.M12] + m[webgl.M32] * v[webgl.M22] + m[webgl.M33] * v[webgl.M32];\r\n t[webgl.M33] = m[webgl.M30] * v[webgl.M03] + m[webgl.M31] * v[webgl.M13] + m[webgl.M32] * v[webgl.M23] + m[webgl.M33] * v[webgl.M33];\r\n return this.set(this.temp);\r\n };\r\n Matrix4.prototype.lookAt = function (position, direction, up) {\r\n Matrix4.initTemps();\r\n var xAxis = Matrix4.xAxis, yAxis = Matrix4.yAxis, zAxis = Matrix4.zAxis;\r\n zAxis.setFrom(direction).normalize();\r\n xAxis.setFrom(direction).normalize();\r\n xAxis.cross(up).normalize();\r\n yAxis.setFrom(xAxis).cross(zAxis).normalize();\r\n this.identity();\r\n var val = this.values;\r\n val[webgl.M00] = xAxis.x;\r\n val[webgl.M01] = xAxis.y;\r\n val[webgl.M02] = xAxis.z;\r\n val[webgl.M10] = yAxis.x;\r\n val[webgl.M11] = yAxis.y;\r\n val[webgl.M12] = yAxis.z;\r\n val[webgl.M20] = -zAxis.x;\r\n val[webgl.M21] = -zAxis.y;\r\n val[webgl.M22] = -zAxis.z;\r\n Matrix4.tmpMatrix.identity();\r\n Matrix4.tmpMatrix.values[webgl.M03] = -position.x;\r\n Matrix4.tmpMatrix.values[webgl.M13] = -position.y;\r\n Matrix4.tmpMatrix.values[webgl.M23] = -position.z;\r\n this.multiply(Matrix4.tmpMatrix);\r\n return this;\r\n };\r\n Matrix4.initTemps = function () {\r\n if (Matrix4.xAxis === null)\r\n Matrix4.xAxis = new webgl.Vector3();\r\n if (Matrix4.yAxis === null)\r\n Matrix4.yAxis = new webgl.Vector3();\r\n if (Matrix4.zAxis === null)\r\n Matrix4.zAxis = new webgl.Vector3();\r\n };\r\n Matrix4.xAxis = null;\r\n Matrix4.yAxis = null;\r\n Matrix4.zAxis = null;\r\n Matrix4.tmpMatrix = new Matrix4();\r\n return Matrix4;\r\n }());\r\n webgl.Matrix4 = Matrix4;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Mesh = (function () {\r\n function Mesh(context, attributes, maxVertices, maxIndices) {\r\n this.attributes = attributes;\r\n this.verticesLength = 0;\r\n this.dirtyVertices = false;\r\n this.indicesLength = 0;\r\n this.dirtyIndices = false;\r\n this.elementsPerVertex = 0;\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.elementsPerVertex = 0;\r\n for (var i = 0; i < attributes.length; i++) {\r\n this.elementsPerVertex += attributes[i].numElements;\r\n }\r\n this.vertices = new Float32Array(maxVertices * this.elementsPerVertex);\r\n this.indices = new Uint16Array(maxIndices);\r\n this.context.addRestorable(this);\r\n }\r\n Mesh.prototype.getAttributes = function () { return this.attributes; };\r\n Mesh.prototype.maxVertices = function () { return this.vertices.length / this.elementsPerVertex; };\r\n Mesh.prototype.numVertices = function () { return this.verticesLength / this.elementsPerVertex; };\r\n Mesh.prototype.setVerticesLength = function (length) {\r\n this.dirtyVertices = true;\r\n this.verticesLength = length;\r\n };\r\n Mesh.prototype.getVertices = function () { return this.vertices; };\r\n Mesh.prototype.maxIndices = function () { return this.indices.length; };\r\n Mesh.prototype.numIndices = function () { return this.indicesLength; };\r\n Mesh.prototype.setIndicesLength = function (length) {\r\n this.dirtyIndices = true;\r\n this.indicesLength = length;\r\n };\r\n Mesh.prototype.getIndices = function () { return this.indices; };\r\n ;\r\n Mesh.prototype.getVertexSizeInFloats = function () {\r\n var size = 0;\r\n for (var i = 0; i < this.attributes.length; i++) {\r\n var attribute = this.attributes[i];\r\n size += attribute.numElements;\r\n }\r\n return size;\r\n };\r\n Mesh.prototype.setVertices = function (vertices) {\r\n this.dirtyVertices = true;\r\n if (vertices.length > this.vertices.length)\r\n throw Error(\"Mesh can't store more than \" + this.maxVertices() + \" vertices\");\r\n this.vertices.set(vertices, 0);\r\n this.verticesLength = vertices.length;\r\n };\r\n Mesh.prototype.setIndices = function (indices) {\r\n this.dirtyIndices = true;\r\n if (indices.length > this.indices.length)\r\n throw Error(\"Mesh can't store more than \" + this.maxIndices() + \" indices\");\r\n this.indices.set(indices, 0);\r\n this.indicesLength = indices.length;\r\n };\r\n Mesh.prototype.draw = function (shader, primitiveType) {\r\n this.drawWithOffset(shader, primitiveType, 0, this.indicesLength > 0 ? this.indicesLength : this.verticesLength / this.elementsPerVertex);\r\n };\r\n Mesh.prototype.drawWithOffset = function (shader, primitiveType, offset, count) {\r\n var gl = this.context.gl;\r\n if (this.dirtyVertices || this.dirtyIndices)\r\n this.update();\r\n this.bind(shader);\r\n if (this.indicesLength > 0) {\r\n gl.drawElements(primitiveType, count, gl.UNSIGNED_SHORT, offset * 2);\r\n }\r\n else {\r\n gl.drawArrays(primitiveType, offset, count);\r\n }\r\n this.unbind(shader);\r\n };\r\n Mesh.prototype.bind = function (shader) {\r\n var gl = this.context.gl;\r\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\r\n var offset = 0;\r\n for (var i = 0; i < this.attributes.length; i++) {\r\n var attrib = this.attributes[i];\r\n var location_1 = shader.getAttributeLocation(attrib.name);\r\n gl.enableVertexAttribArray(location_1);\r\n gl.vertexAttribPointer(location_1, attrib.numElements, gl.FLOAT, false, this.elementsPerVertex * 4, offset * 4);\r\n offset += attrib.numElements;\r\n }\r\n if (this.indicesLength > 0)\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\r\n };\r\n Mesh.prototype.unbind = function (shader) {\r\n var gl = this.context.gl;\r\n for (var i = 0; i < this.attributes.length; i++) {\r\n var attrib = this.attributes[i];\r\n var location_2 = shader.getAttributeLocation(attrib.name);\r\n gl.disableVertexAttribArray(location_2);\r\n }\r\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\r\n if (this.indicesLength > 0)\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);\r\n };\r\n Mesh.prototype.update = function () {\r\n var gl = this.context.gl;\r\n if (this.dirtyVertices) {\r\n if (!this.verticesBuffer) {\r\n this.verticesBuffer = gl.createBuffer();\r\n }\r\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\r\n gl.bufferData(gl.ARRAY_BUFFER, this.vertices.subarray(0, this.verticesLength), gl.DYNAMIC_DRAW);\r\n this.dirtyVertices = false;\r\n }\r\n if (this.dirtyIndices) {\r\n if (!this.indicesBuffer) {\r\n this.indicesBuffer = gl.createBuffer();\r\n }\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\r\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, this.indices.subarray(0, this.indicesLength), gl.DYNAMIC_DRAW);\r\n this.dirtyIndices = false;\r\n }\r\n };\r\n Mesh.prototype.restore = function () {\r\n this.verticesBuffer = null;\r\n this.indicesBuffer = null;\r\n this.update();\r\n };\r\n Mesh.prototype.dispose = function () {\r\n this.context.removeRestorable(this);\r\n var gl = this.context.gl;\r\n gl.deleteBuffer(this.verticesBuffer);\r\n gl.deleteBuffer(this.indicesBuffer);\r\n };\r\n return Mesh;\r\n }());\r\n webgl.Mesh = Mesh;\r\n var VertexAttribute = (function () {\r\n function VertexAttribute(name, type, numElements) {\r\n this.name = name;\r\n this.type = type;\r\n this.numElements = numElements;\r\n }\r\n return VertexAttribute;\r\n }());\r\n webgl.VertexAttribute = VertexAttribute;\r\n var Position2Attribute = (function (_super) {\r\n __extends(Position2Attribute, _super);\r\n function Position2Attribute() {\r\n return _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 2) || this;\r\n }\r\n return Position2Attribute;\r\n }(VertexAttribute));\r\n webgl.Position2Attribute = Position2Attribute;\r\n var Position3Attribute = (function (_super) {\r\n __extends(Position3Attribute, _super);\r\n function Position3Attribute() {\r\n return _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 3) || this;\r\n }\r\n return Position3Attribute;\r\n }(VertexAttribute));\r\n webgl.Position3Attribute = Position3Attribute;\r\n var TexCoordAttribute = (function (_super) {\r\n __extends(TexCoordAttribute, _super);\r\n function TexCoordAttribute(unit) {\r\n if (unit === void 0) { unit = 0; }\r\n return _super.call(this, webgl.Shader.TEXCOORDS + (unit == 0 ? \"\" : unit), VertexAttributeType.Float, 2) || this;\r\n }\r\n return TexCoordAttribute;\r\n }(VertexAttribute));\r\n webgl.TexCoordAttribute = TexCoordAttribute;\r\n var ColorAttribute = (function (_super) {\r\n __extends(ColorAttribute, _super);\r\n function ColorAttribute() {\r\n return _super.call(this, webgl.Shader.COLOR, VertexAttributeType.Float, 4) || this;\r\n }\r\n return ColorAttribute;\r\n }(VertexAttribute));\r\n webgl.ColorAttribute = ColorAttribute;\r\n var Color2Attribute = (function (_super) {\r\n __extends(Color2Attribute, _super);\r\n function Color2Attribute() {\r\n return _super.call(this, webgl.Shader.COLOR2, VertexAttributeType.Float, 4) || this;\r\n }\r\n return Color2Attribute;\r\n }(VertexAttribute));\r\n webgl.Color2Attribute = Color2Attribute;\r\n var VertexAttributeType;\r\n (function (VertexAttributeType) {\r\n VertexAttributeType[VertexAttributeType[\"Float\"] = 0] = \"Float\";\r\n })(VertexAttributeType = webgl.VertexAttributeType || (webgl.VertexAttributeType = {}));\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var PolygonBatcher = (function () {\r\n function PolygonBatcher(context, twoColorTint, maxVertices) {\r\n if (twoColorTint === void 0) { twoColorTint = true; }\r\n if (maxVertices === void 0) { maxVertices = 10920; }\r\n this.isDrawing = false;\r\n this.shader = null;\r\n this.lastTexture = null;\r\n this.verticesLength = 0;\r\n this.indicesLength = 0;\r\n if (maxVertices > 10920)\r\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n var attributes = twoColorTint ?\r\n [new webgl.Position2Attribute(), new webgl.ColorAttribute(), new webgl.TexCoordAttribute(), new webgl.Color2Attribute()] :\r\n [new webgl.Position2Attribute(), new webgl.ColorAttribute(), new webgl.TexCoordAttribute()];\r\n this.mesh = new webgl.Mesh(context, attributes, maxVertices, maxVertices * 3);\r\n this.srcBlend = this.context.gl.SRC_ALPHA;\r\n this.dstBlend = this.context.gl.ONE_MINUS_SRC_ALPHA;\r\n }\r\n PolygonBatcher.prototype.begin = function (shader) {\r\n var gl = this.context.gl;\r\n if (this.isDrawing)\r\n throw new Error(\"PolygonBatch is already drawing. Call PolygonBatch.end() before calling PolygonBatch.begin()\");\r\n this.drawCalls = 0;\r\n this.shader = shader;\r\n this.lastTexture = null;\r\n this.isDrawing = true;\r\n gl.enable(gl.BLEND);\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n };\r\n PolygonBatcher.prototype.setBlendMode = function (srcBlend, dstBlend) {\r\n var gl = this.context.gl;\r\n this.srcBlend = srcBlend;\r\n this.dstBlend = dstBlend;\r\n if (this.isDrawing) {\r\n this.flush();\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n }\r\n };\r\n PolygonBatcher.prototype.draw = function (texture, vertices, indices) {\r\n if (texture != this.lastTexture) {\r\n this.flush();\r\n this.lastTexture = texture;\r\n }\r\n else if (this.verticesLength + vertices.length > this.mesh.getVertices().length ||\r\n this.indicesLength + indices.length > this.mesh.getIndices().length) {\r\n this.flush();\r\n }\r\n var indexStart = this.mesh.numVertices();\r\n this.mesh.getVertices().set(vertices, this.verticesLength);\r\n this.verticesLength += vertices.length;\r\n this.mesh.setVerticesLength(this.verticesLength);\r\n var indicesArray = this.mesh.getIndices();\r\n for (var i = this.indicesLength, j = 0; j < indices.length; i++, j++)\r\n indicesArray[i] = indices[j] + indexStart;\r\n this.indicesLength += indices.length;\r\n this.mesh.setIndicesLength(this.indicesLength);\r\n };\r\n PolygonBatcher.prototype.flush = function () {\r\n var gl = this.context.gl;\r\n if (this.verticesLength == 0)\r\n return;\r\n this.lastTexture.bind();\r\n this.mesh.draw(this.shader, gl.TRIANGLES);\r\n this.verticesLength = 0;\r\n this.indicesLength = 0;\r\n this.mesh.setVerticesLength(0);\r\n this.mesh.setIndicesLength(0);\r\n this.drawCalls++;\r\n };\r\n PolygonBatcher.prototype.end = function () {\r\n var gl = this.context.gl;\r\n if (!this.isDrawing)\r\n throw new Error(\"PolygonBatch is not drawing. Call PolygonBatch.begin() before calling PolygonBatch.end()\");\r\n if (this.verticesLength > 0 || this.indicesLength > 0)\r\n this.flush();\r\n this.shader = null;\r\n this.lastTexture = null;\r\n this.isDrawing = false;\r\n gl.disable(gl.BLEND);\r\n };\r\n PolygonBatcher.prototype.getDrawCalls = function () { return this.drawCalls; };\r\n PolygonBatcher.prototype.dispose = function () {\r\n this.mesh.dispose();\r\n };\r\n return PolygonBatcher;\r\n }());\r\n webgl.PolygonBatcher = PolygonBatcher;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var SceneRenderer = (function () {\r\n function SceneRenderer(canvas, context, twoColorTint) {\r\n if (twoColorTint === void 0) { twoColorTint = true; }\r\n this.twoColorTint = false;\r\n this.activeRenderer = null;\r\n this.QUAD = [\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n ];\r\n this.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n this.WHITE = new spine.Color(1, 1, 1, 1);\r\n this.canvas = canvas;\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.twoColorTint = twoColorTint;\r\n this.camera = new webgl.OrthoCamera(canvas.width, canvas.height);\r\n this.batcherShader = twoColorTint ? webgl.Shader.newTwoColoredTextured(this.context) : webgl.Shader.newColoredTextured(this.context);\r\n this.batcher = new webgl.PolygonBatcher(this.context, twoColorTint);\r\n this.shapesShader = webgl.Shader.newColored(this.context);\r\n this.shapes = new webgl.ShapeRenderer(this.context);\r\n this.skeletonRenderer = new webgl.SkeletonRenderer(this.context, twoColorTint);\r\n this.skeletonDebugRenderer = new webgl.SkeletonDebugRenderer(this.context);\r\n }\r\n SceneRenderer.prototype.begin = function () {\r\n this.camera.update();\r\n this.enableRenderer(this.batcher);\r\n };\r\n SceneRenderer.prototype.drawSkeleton = function (skeleton, premultipliedAlpha, slotRangeStart, slotRangeEnd) {\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n if (slotRangeStart === void 0) { slotRangeStart = -1; }\r\n if (slotRangeEnd === void 0) { slotRangeEnd = -1; }\r\n this.enableRenderer(this.batcher);\r\n this.skeletonRenderer.premultipliedAlpha = premultipliedAlpha;\r\n this.skeletonRenderer.draw(this.batcher, skeleton, slotRangeStart, slotRangeEnd);\r\n };\r\n SceneRenderer.prototype.drawSkeletonDebug = function (skeleton, premultipliedAlpha, ignoredBones) {\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n if (ignoredBones === void 0) { ignoredBones = null; }\r\n this.enableRenderer(this.shapes);\r\n this.skeletonDebugRenderer.premultipliedAlpha = premultipliedAlpha;\r\n this.skeletonDebugRenderer.draw(this.shapes, skeleton, ignoredBones);\r\n };\r\n SceneRenderer.prototype.drawTexture = function (texture, x, y, width, height, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.drawTextureUV = function (texture, x, y, width, height, u, v, u2, v2, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u;\r\n quad[i++] = v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u2;\r\n quad[i++] = v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u2;\r\n quad[i++] = v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u;\r\n quad[i++] = v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.drawTextureRotated = function (texture, x, y, width, height, pivotX, pivotY, angle, color, premultipliedAlpha) {\r\n if (color === void 0) { color = null; }\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var worldOriginX = x + pivotX;\r\n var worldOriginY = y + pivotY;\r\n var fx = -pivotX;\r\n var fy = -pivotY;\r\n var fx2 = width - pivotX;\r\n var fy2 = height - pivotY;\r\n var p1x = fx;\r\n var p1y = fy;\r\n var p2x = fx;\r\n var p2y = fy2;\r\n var p3x = fx2;\r\n var p3y = fy2;\r\n var p4x = fx2;\r\n var p4y = fy;\r\n var x1 = 0;\r\n var y1 = 0;\r\n var x2 = 0;\r\n var y2 = 0;\r\n var x3 = 0;\r\n var y3 = 0;\r\n var x4 = 0;\r\n var y4 = 0;\r\n if (angle != 0) {\r\n var cos = spine.MathUtils.cosDeg(angle);\r\n var sin = spine.MathUtils.sinDeg(angle);\r\n x1 = cos * p1x - sin * p1y;\r\n y1 = sin * p1x + cos * p1y;\r\n x4 = cos * p2x - sin * p2y;\r\n y4 = sin * p2x + cos * p2y;\r\n x3 = cos * p3x - sin * p3y;\r\n y3 = sin * p3x + cos * p3y;\r\n x2 = x3 + (x1 - x4);\r\n y2 = y3 + (y1 - y4);\r\n }\r\n else {\r\n x1 = p1x;\r\n y1 = p1y;\r\n x4 = p2x;\r\n y4 = p2y;\r\n x3 = p3x;\r\n y3 = p3y;\r\n x2 = p4x;\r\n y2 = p4y;\r\n }\r\n x1 += worldOriginX;\r\n y1 += worldOriginY;\r\n x2 += worldOriginX;\r\n y2 += worldOriginY;\r\n x3 += worldOriginX;\r\n y3 += worldOriginY;\r\n x4 += worldOriginX;\r\n y4 += worldOriginY;\r\n var i = 0;\r\n quad[i++] = x1;\r\n quad[i++] = y1;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x2;\r\n quad[i++] = y2;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x3;\r\n quad[i++] = y3;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x4;\r\n quad[i++] = y4;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.drawRegion = function (region, x, y, width, height, color, premultipliedAlpha) {\r\n if (color === void 0) { color = null; }\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u;\r\n quad[i++] = region.v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u2;\r\n quad[i++] = region.v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u2;\r\n quad[i++] = region.v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u;\r\n quad[i++] = region.v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(region.texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.line = function (x, y, x2, y2, color, color2) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.line(x, y, x2, y2, color);\r\n };\r\n SceneRenderer.prototype.triangle = function (filled, x, y, x2, y2, x3, y3, color, color2, color3) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.triangle(filled, x, y, x2, y2, x3, y3, color, color2, color3);\r\n };\r\n SceneRenderer.prototype.quad = function (filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n if (color4 === void 0) { color4 = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.quad(filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4);\r\n };\r\n SceneRenderer.prototype.rect = function (filled, x, y, width, height, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.rect(filled, x, y, width, height, color);\r\n };\r\n SceneRenderer.prototype.rectLine = function (filled, x1, y1, x2, y2, width, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.rectLine(filled, x1, y1, x2, y2, width, color);\r\n };\r\n SceneRenderer.prototype.polygon = function (polygonVertices, offset, count, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.polygon(polygonVertices, offset, count, color);\r\n };\r\n SceneRenderer.prototype.circle = function (filled, x, y, radius, color, segments) {\r\n if (color === void 0) { color = null; }\r\n if (segments === void 0) { segments = 0; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.circle(filled, x, y, radius, color, segments);\r\n };\r\n SceneRenderer.prototype.curve = function (x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color);\r\n };\r\n SceneRenderer.prototype.end = function () {\r\n if (this.activeRenderer === this.batcher)\r\n this.batcher.end();\r\n else if (this.activeRenderer === this.shapes)\r\n this.shapes.end();\r\n this.activeRenderer = null;\r\n };\r\n SceneRenderer.prototype.resize = function (resizeMode) {\r\n var canvas = this.canvas;\r\n var w = canvas.clientWidth;\r\n var h = canvas.clientHeight;\r\n if (canvas.width != w || canvas.height != h) {\r\n canvas.width = w;\r\n canvas.height = h;\r\n }\r\n this.context.gl.viewport(0, 0, canvas.width, canvas.height);\r\n if (resizeMode === ResizeMode.Stretch) {\r\n }\r\n else if (resizeMode === ResizeMode.Expand) {\r\n this.camera.setViewport(w, h);\r\n }\r\n else if (resizeMode === ResizeMode.Fit) {\r\n var sourceWidth = canvas.width, sourceHeight = canvas.height;\r\n var targetWidth = this.camera.viewportWidth, targetHeight = this.camera.viewportHeight;\r\n var targetRatio = targetHeight / targetWidth;\r\n var sourceRatio = sourceHeight / sourceWidth;\r\n var scale = targetRatio < sourceRatio ? targetWidth / sourceWidth : targetHeight / sourceHeight;\r\n this.camera.viewportWidth = sourceWidth * scale;\r\n this.camera.viewportHeight = sourceHeight * scale;\r\n }\r\n this.camera.update();\r\n };\r\n SceneRenderer.prototype.enableRenderer = function (renderer) {\r\n if (this.activeRenderer === renderer)\r\n return;\r\n this.end();\r\n if (renderer instanceof webgl.PolygonBatcher) {\r\n this.batcherShader.bind();\r\n this.batcherShader.setUniform4x4f(webgl.Shader.MVP_MATRIX, this.camera.projectionView.values);\r\n this.batcherShader.setUniformi(\"u_texture\", 0);\r\n this.batcher.begin(this.batcherShader);\r\n this.activeRenderer = this.batcher;\r\n }\r\n else if (renderer instanceof webgl.ShapeRenderer) {\r\n this.shapesShader.bind();\r\n this.shapesShader.setUniform4x4f(webgl.Shader.MVP_MATRIX, this.camera.projectionView.values);\r\n this.shapes.begin(this.shapesShader);\r\n this.activeRenderer = this.shapes;\r\n }\r\n else {\r\n this.activeRenderer = this.skeletonDebugRenderer;\r\n }\r\n };\r\n SceneRenderer.prototype.dispose = function () {\r\n this.batcher.dispose();\r\n this.batcherShader.dispose();\r\n this.shapes.dispose();\r\n this.shapesShader.dispose();\r\n this.skeletonDebugRenderer.dispose();\r\n };\r\n return SceneRenderer;\r\n }());\r\n webgl.SceneRenderer = SceneRenderer;\r\n var ResizeMode;\r\n (function (ResizeMode) {\r\n ResizeMode[ResizeMode[\"Stretch\"] = 0] = \"Stretch\";\r\n ResizeMode[ResizeMode[\"Expand\"] = 1] = \"Expand\";\r\n ResizeMode[ResizeMode[\"Fit\"] = 2] = \"Fit\";\r\n })(ResizeMode = webgl.ResizeMode || (webgl.ResizeMode = {}));\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Shader = (function () {\r\n function Shader(context, vertexShader, fragmentShader) {\r\n this.vertexShader = vertexShader;\r\n this.fragmentShader = fragmentShader;\r\n this.vs = null;\r\n this.fs = null;\r\n this.program = null;\r\n this.tmp2x2 = new Float32Array(2 * 2);\r\n this.tmp3x3 = new Float32Array(3 * 3);\r\n this.tmp4x4 = new Float32Array(4 * 4);\r\n this.vsSource = vertexShader;\r\n this.fsSource = fragmentShader;\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.context.addRestorable(this);\r\n this.compile();\r\n }\r\n Shader.prototype.getProgram = function () { return this.program; };\r\n Shader.prototype.getVertexShader = function () { return this.vertexShader; };\r\n Shader.prototype.getFragmentShader = function () { return this.fragmentShader; };\r\n Shader.prototype.getVertexShaderSource = function () { return this.vsSource; };\r\n Shader.prototype.getFragmentSource = function () { return this.fsSource; };\r\n Shader.prototype.compile = function () {\r\n var gl = this.context.gl;\r\n try {\r\n this.vs = this.compileShader(gl.VERTEX_SHADER, this.vertexShader);\r\n this.fs = this.compileShader(gl.FRAGMENT_SHADER, this.fragmentShader);\r\n this.program = this.compileProgram(this.vs, this.fs);\r\n }\r\n catch (e) {\r\n this.dispose();\r\n throw e;\r\n }\r\n };\r\n Shader.prototype.compileShader = function (type, source) {\r\n var gl = this.context.gl;\r\n var shader = gl.createShader(type);\r\n gl.shaderSource(shader, source);\r\n gl.compileShader(shader);\r\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\r\n var error = \"Couldn't compile shader: \" + gl.getShaderInfoLog(shader);\r\n gl.deleteShader(shader);\r\n if (!gl.isContextLost())\r\n throw new Error(error);\r\n }\r\n return shader;\r\n };\r\n Shader.prototype.compileProgram = function (vs, fs) {\r\n var gl = this.context.gl;\r\n var program = gl.createProgram();\r\n gl.attachShader(program, vs);\r\n gl.attachShader(program, fs);\r\n gl.linkProgram(program);\r\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\r\n var error = \"Couldn't compile shader program: \" + gl.getProgramInfoLog(program);\r\n gl.deleteProgram(program);\r\n if (!gl.isContextLost())\r\n throw new Error(error);\r\n }\r\n return program;\r\n };\r\n Shader.prototype.restore = function () {\r\n this.compile();\r\n };\r\n Shader.prototype.bind = function () {\r\n this.context.gl.useProgram(this.program);\r\n };\r\n Shader.prototype.unbind = function () {\r\n this.context.gl.useProgram(null);\r\n };\r\n Shader.prototype.setUniformi = function (uniform, value) {\r\n this.context.gl.uniform1i(this.getUniformLocation(uniform), value);\r\n };\r\n Shader.prototype.setUniformf = function (uniform, value) {\r\n this.context.gl.uniform1f(this.getUniformLocation(uniform), value);\r\n };\r\n Shader.prototype.setUniform2f = function (uniform, value, value2) {\r\n this.context.gl.uniform2f(this.getUniformLocation(uniform), value, value2);\r\n };\r\n Shader.prototype.setUniform3f = function (uniform, value, value2, value3) {\r\n this.context.gl.uniform3f(this.getUniformLocation(uniform), value, value2, value3);\r\n };\r\n Shader.prototype.setUniform4f = function (uniform, value, value2, value3, value4) {\r\n this.context.gl.uniform4f(this.getUniformLocation(uniform), value, value2, value3, value4);\r\n };\r\n Shader.prototype.setUniform2x2f = function (uniform, value) {\r\n var gl = this.context.gl;\r\n this.tmp2x2.set(value);\r\n gl.uniformMatrix2fv(this.getUniformLocation(uniform), false, this.tmp2x2);\r\n };\r\n Shader.prototype.setUniform3x3f = function (uniform, value) {\r\n var gl = this.context.gl;\r\n this.tmp3x3.set(value);\r\n gl.uniformMatrix3fv(this.getUniformLocation(uniform), false, this.tmp3x3);\r\n };\r\n Shader.prototype.setUniform4x4f = function (uniform, value) {\r\n var gl = this.context.gl;\r\n this.tmp4x4.set(value);\r\n gl.uniformMatrix4fv(this.getUniformLocation(uniform), false, this.tmp4x4);\r\n };\r\n Shader.prototype.getUniformLocation = function (uniform) {\r\n var gl = this.context.gl;\r\n var location = gl.getUniformLocation(this.program, uniform);\r\n if (!location && !gl.isContextLost())\r\n throw new Error(\"Couldn't find location for uniform \" + uniform);\r\n return location;\r\n };\r\n Shader.prototype.getAttributeLocation = function (attribute) {\r\n var gl = this.context.gl;\r\n var location = gl.getAttribLocation(this.program, attribute);\r\n if (location == -1 && !gl.isContextLost())\r\n throw new Error(\"Couldn't find location for attribute \" + attribute);\r\n return location;\r\n };\r\n Shader.prototype.dispose = function () {\r\n this.context.removeRestorable(this);\r\n var gl = this.context.gl;\r\n if (this.vs) {\r\n gl.deleteShader(this.vs);\r\n this.vs = null;\r\n }\r\n if (this.fs) {\r\n gl.deleteShader(this.fs);\r\n this.fs = null;\r\n }\r\n if (this.program) {\r\n gl.deleteProgram(this.program);\r\n this.program = null;\r\n }\r\n };\r\n Shader.newColoredTextured = function (context) {\r\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \" + Shader.POSITION + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR + \";\\n\\t\\t\\t\\tattribute vec2 \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\tuniform mat4 \" + Shader.MVP_MATRIX + \";\\n\\t\\t\\t\\tvarying vec4 v_color;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_color = \" + Shader.COLOR + \";\\n\\t\\t\\t\\t\\tv_texCoords = \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\t\\tgl_Position = \" + Shader.MVP_MATRIX + \" * \" + Shader.POSITION + \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_color;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\t\\t\\t\\tuniform sampler2D u_texture;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tgl_FragColor = v_color * texture2D(u_texture, v_texCoords);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n return new Shader(context, vs, fs);\r\n };\r\n Shader.newTwoColoredTextured = function (context) {\r\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \" + Shader.POSITION + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR2 + \";\\n\\t\\t\\t\\tattribute vec2 \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\tuniform mat4 \" + Shader.MVP_MATRIX + \";\\n\\t\\t\\t\\tvarying vec4 v_light;\\n\\t\\t\\t\\tvarying vec4 v_dark;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_light = \" + Shader.COLOR + \";\\n\\t\\t\\t\\t\\tv_dark = \" + Shader.COLOR2 + \";\\n\\t\\t\\t\\t\\tv_texCoords = \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\t\\tgl_Position = \" + Shader.MVP_MATRIX + \" * \" + Shader.POSITION + \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_light;\\n\\t\\t\\t\\tvarying LOWP vec4 v_dark;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\t\\t\\t\\tuniform sampler2D u_texture;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tvec4 texColor = texture2D(u_texture, v_texCoords);\\n\\t\\t\\t\\t\\tgl_FragColor.a = texColor.a * v_light.a;\\n\\t\\t\\t\\t\\tgl_FragColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n return new Shader(context, vs, fs);\r\n };\r\n Shader.newColored = function (context) {\r\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \" + Shader.POSITION + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR + \";\\n\\t\\t\\t\\tuniform mat4 \" + Shader.MVP_MATRIX + \";\\n\\t\\t\\t\\tvarying vec4 v_color;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_color = \" + Shader.COLOR + \";\\n\\t\\t\\t\\t\\tgl_Position = \" + Shader.MVP_MATRIX + \" * \" + Shader.POSITION + \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_color;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tgl_FragColor = v_color;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n return new Shader(context, vs, fs);\r\n };\r\n Shader.MVP_MATRIX = \"u_projTrans\";\r\n Shader.POSITION = \"a_position\";\r\n Shader.COLOR = \"a_color\";\r\n Shader.COLOR2 = \"a_color2\";\r\n Shader.TEXCOORDS = \"a_texCoords\";\r\n Shader.SAMPLER = \"u_texture\";\r\n return Shader;\r\n }());\r\n webgl.Shader = Shader;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var ShapeRenderer = (function () {\r\n function ShapeRenderer(context, maxVertices) {\r\n if (maxVertices === void 0) { maxVertices = 10920; }\r\n this.isDrawing = false;\r\n this.shapeType = ShapeType.Filled;\r\n this.color = new spine.Color(1, 1, 1, 1);\r\n this.vertexIndex = 0;\r\n this.tmp = new spine.Vector2();\r\n if (maxVertices > 10920)\r\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.mesh = new webgl.Mesh(context, [new webgl.Position2Attribute(), new webgl.ColorAttribute()], maxVertices, 0);\r\n this.srcBlend = this.context.gl.SRC_ALPHA;\r\n this.dstBlend = this.context.gl.ONE_MINUS_SRC_ALPHA;\r\n }\r\n ShapeRenderer.prototype.begin = function (shader) {\r\n if (this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has already been called\");\r\n this.shader = shader;\r\n this.vertexIndex = 0;\r\n this.isDrawing = true;\r\n var gl = this.context.gl;\r\n gl.enable(gl.BLEND);\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n };\r\n ShapeRenderer.prototype.setBlendMode = function (srcBlend, dstBlend) {\r\n var gl = this.context.gl;\r\n this.srcBlend = srcBlend;\r\n this.dstBlend = dstBlend;\r\n if (this.isDrawing) {\r\n this.flush();\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n }\r\n };\r\n ShapeRenderer.prototype.setColor = function (color) {\r\n this.color.setFromColor(color);\r\n };\r\n ShapeRenderer.prototype.setColorWith = function (r, g, b, a) {\r\n this.color.set(r, g, b, a);\r\n };\r\n ShapeRenderer.prototype.point = function (x, y, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(ShapeType.Point, 1);\r\n if (color === null)\r\n color = this.color;\r\n this.vertex(x, y, color);\r\n };\r\n ShapeRenderer.prototype.line = function (x, y, x2, y2, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(ShapeType.Line, 2);\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n if (color === null)\r\n color = this.color;\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color);\r\n };\r\n ShapeRenderer.prototype.triangle = function (filled, x, y, x2, y2, x3, y3, color, color2, color3) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n if (color === null)\r\n color = this.color;\r\n if (color2 === null)\r\n color2 = this.color;\r\n if (color3 === null)\r\n color3 = this.color;\r\n if (filled) {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n }\r\n else {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x2, y2, color);\r\n this.vertex(x3, y3, color2);\r\n this.vertex(x3, y3, color);\r\n this.vertex(x, y, color2);\r\n }\r\n };\r\n ShapeRenderer.prototype.quad = function (filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n if (color4 === void 0) { color4 = null; }\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n if (color === null)\r\n color = this.color;\r\n if (color2 === null)\r\n color2 = this.color;\r\n if (color3 === null)\r\n color3 = this.color;\r\n if (color4 === null)\r\n color4 = this.color;\r\n if (filled) {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x, y, color);\r\n }\r\n else {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x, y, color);\r\n }\r\n };\r\n ShapeRenderer.prototype.rect = function (filled, x, y, width, height, color) {\r\n if (color === void 0) { color = null; }\r\n this.quad(filled, x, y, x + width, y, x + width, y + height, x, y + height, color, color, color, color);\r\n };\r\n ShapeRenderer.prototype.rectLine = function (filled, x1, y1, x2, y2, width, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 8);\r\n if (color === null)\r\n color = this.color;\r\n var t = this.tmp.set(y2 - y1, x1 - x2);\r\n t.normalize();\r\n width *= 0.5;\r\n var tx = t.x * width;\r\n var ty = t.y * width;\r\n if (!filled) {\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n }\r\n else {\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n }\r\n };\r\n ShapeRenderer.prototype.x = function (x, y, size) {\r\n this.line(x - size, y - size, x + size, y + size);\r\n this.line(x - size, y + size, x + size, y - size);\r\n };\r\n ShapeRenderer.prototype.polygon = function (polygonVertices, offset, count, color) {\r\n if (color === void 0) { color = null; }\r\n if (count < 3)\r\n throw new Error(\"Polygon must contain at least 3 vertices\");\r\n this.check(ShapeType.Line, count * 2);\r\n if (color === null)\r\n color = this.color;\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n offset <<= 1;\r\n count <<= 1;\r\n var firstX = polygonVertices[offset];\r\n var firstY = polygonVertices[offset + 1];\r\n var last = offset + count;\r\n for (var i = offset, n = offset + count - 2; i < n; i += 2) {\r\n var x1 = polygonVertices[i];\r\n var y1 = polygonVertices[i + 1];\r\n var x2 = 0;\r\n var y2 = 0;\r\n if (i + 2 >= last) {\r\n x2 = firstX;\r\n y2 = firstY;\r\n }\r\n else {\r\n x2 = polygonVertices[i + 2];\r\n y2 = polygonVertices[i + 3];\r\n }\r\n this.vertex(x1, y1, color);\r\n this.vertex(x2, y2, color);\r\n }\r\n };\r\n ShapeRenderer.prototype.circle = function (filled, x, y, radius, color, segments) {\r\n if (color === void 0) { color = null; }\r\n if (segments === void 0) { segments = 0; }\r\n if (segments === 0)\r\n segments = Math.max(1, (6 * spine.MathUtils.cbrt(radius)) | 0);\r\n if (segments <= 0)\r\n throw new Error(\"segments must be > 0.\");\r\n if (color === null)\r\n color = this.color;\r\n var angle = 2 * spine.MathUtils.PI / segments;\r\n var cos = Math.cos(angle);\r\n var sin = Math.sin(angle);\r\n var cx = radius, cy = 0;\r\n if (!filled) {\r\n this.check(ShapeType.Line, segments * 2 + 2);\r\n for (var i = 0; i < segments; i++) {\r\n this.vertex(x + cx, y + cy, color);\r\n var temp_1 = cx;\r\n cx = cos * cx - sin * cy;\r\n cy = sin * temp_1 + cos * cy;\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n else {\r\n this.check(ShapeType.Filled, segments * 3 + 3);\r\n segments--;\r\n for (var i = 0; i < segments; i++) {\r\n this.vertex(x, y, color);\r\n this.vertex(x + cx, y + cy, color);\r\n var temp_2 = cx;\r\n cx = cos * cx - sin * cy;\r\n cy = sin * temp_2 + cos * cy;\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n this.vertex(x, y, color);\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n var temp = cx;\r\n cx = radius;\r\n cy = 0;\r\n this.vertex(x + cx, y + cy, color);\r\n };\r\n ShapeRenderer.prototype.curve = function (x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(ShapeType.Line, segments * 2 + 2);\r\n if (color === null)\r\n color = this.color;\r\n var subdiv_step = 1 / segments;\r\n var subdiv_step2 = subdiv_step * subdiv_step;\r\n var subdiv_step3 = subdiv_step * subdiv_step * subdiv_step;\r\n var pre1 = 3 * subdiv_step;\r\n var pre2 = 3 * subdiv_step2;\r\n var pre4 = 6 * subdiv_step2;\r\n var pre5 = 6 * subdiv_step3;\r\n var tmp1x = x1 - cx1 * 2 + cx2;\r\n var tmp1y = y1 - cy1 * 2 + cy2;\r\n var tmp2x = (cx1 - cx2) * 3 - x1 + x2;\r\n var tmp2y = (cy1 - cy2) * 3 - y1 + y2;\r\n var fx = x1;\r\n var fy = y1;\r\n var dfx = (cx1 - x1) * pre1 + tmp1x * pre2 + tmp2x * subdiv_step3;\r\n var dfy = (cy1 - y1) * pre1 + tmp1y * pre2 + tmp2y * subdiv_step3;\r\n var ddfx = tmp1x * pre4 + tmp2x * pre5;\r\n var ddfy = tmp1y * pre4 + tmp2y * pre5;\r\n var dddfx = tmp2x * pre5;\r\n var dddfy = tmp2y * pre5;\r\n while (segments-- > 0) {\r\n this.vertex(fx, fy, color);\r\n fx += dfx;\r\n fy += dfy;\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n this.vertex(fx, fy, color);\r\n }\r\n this.vertex(fx, fy, color);\r\n this.vertex(x2, y2, color);\r\n };\r\n ShapeRenderer.prototype.vertex = function (x, y, color) {\r\n var idx = this.vertexIndex;\r\n var vertices = this.mesh.getVertices();\r\n vertices[idx++] = x;\r\n vertices[idx++] = y;\r\n vertices[idx++] = color.r;\r\n vertices[idx++] = color.g;\r\n vertices[idx++] = color.b;\r\n vertices[idx++] = color.a;\r\n this.vertexIndex = idx;\r\n };\r\n ShapeRenderer.prototype.end = function () {\r\n if (!this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has not been called\");\r\n this.flush();\r\n this.context.gl.disable(this.context.gl.BLEND);\r\n this.isDrawing = false;\r\n };\r\n ShapeRenderer.prototype.flush = function () {\r\n if (this.vertexIndex == 0)\r\n return;\r\n this.mesh.setVerticesLength(this.vertexIndex);\r\n this.mesh.draw(this.shader, this.shapeType);\r\n this.vertexIndex = 0;\r\n };\r\n ShapeRenderer.prototype.check = function (shapeType, numVertices) {\r\n if (!this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has not been called\");\r\n if (this.shapeType == shapeType) {\r\n if (this.mesh.maxVertices() - this.mesh.numVertices() < numVertices)\r\n this.flush();\r\n else\r\n return;\r\n }\r\n else {\r\n this.flush();\r\n this.shapeType = shapeType;\r\n }\r\n };\r\n ShapeRenderer.prototype.dispose = function () {\r\n this.mesh.dispose();\r\n };\r\n return ShapeRenderer;\r\n }());\r\n webgl.ShapeRenderer = ShapeRenderer;\r\n var ShapeType;\r\n (function (ShapeType) {\r\n ShapeType[ShapeType[\"Point\"] = 0] = \"Point\";\r\n ShapeType[ShapeType[\"Line\"] = 1] = \"Line\";\r\n ShapeType[ShapeType[\"Filled\"] = 4] = \"Filled\";\r\n })(ShapeType = webgl.ShapeType || (webgl.ShapeType = {}));\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var SkeletonDebugRenderer = (function () {\r\n function SkeletonDebugRenderer(context) {\r\n this.boneLineColor = new spine.Color(1, 0, 0, 1);\r\n this.boneOriginColor = new spine.Color(0, 1, 0, 1);\r\n this.attachmentLineColor = new spine.Color(0, 0, 1, 0.5);\r\n this.triangleLineColor = new spine.Color(1, 0.64, 0, 0.5);\r\n this.pathColor = new spine.Color().setFromString(\"FF7F00\");\r\n this.clipColor = new spine.Color(0.8, 0, 0, 2);\r\n this.aabbColor = new spine.Color(0, 1, 0, 0.5);\r\n this.drawBones = true;\r\n this.drawRegionAttachments = true;\r\n this.drawBoundingBoxes = true;\r\n this.drawMeshHull = true;\r\n this.drawMeshTriangles = true;\r\n this.drawPaths = true;\r\n this.drawSkeletonXY = false;\r\n this.drawClipping = true;\r\n this.premultipliedAlpha = false;\r\n this.scale = 1;\r\n this.boneWidth = 2;\r\n this.bounds = new spine.SkeletonBounds();\r\n this.temp = new Array();\r\n this.vertices = spine.Utils.newFloatArray(2 * 1024);\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n }\r\n SkeletonDebugRenderer.prototype.draw = function (shapes, skeleton, ignoredBones) {\r\n if (ignoredBones === void 0) { ignoredBones = null; }\r\n var skeletonX = skeleton.x;\r\n var skeletonY = skeleton.y;\r\n var gl = this.context.gl;\r\n var srcFunc = this.premultipliedAlpha ? gl.ONE : gl.SRC_ALPHA;\r\n shapes.setBlendMode(srcFunc, gl.ONE_MINUS_SRC_ALPHA);\r\n var bones = skeleton.bones;\r\n if (this.drawBones) {\r\n shapes.setColor(this.boneLineColor);\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\r\n continue;\r\n if (bone.parent == null)\r\n continue;\r\n var x = skeletonX + bone.data.length * bone.a + bone.worldX;\r\n var y = skeletonY + bone.data.length * bone.c + bone.worldY;\r\n shapes.rectLine(true, skeletonX + bone.worldX, skeletonY + bone.worldY, x, y, this.boneWidth * this.scale);\r\n }\r\n if (this.drawSkeletonXY)\r\n shapes.x(skeletonX, skeletonY, 4 * this.scale);\r\n }\r\n if (this.drawRegionAttachments) {\r\n shapes.setColor(this.attachmentLineColor);\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.RegionAttachment) {\r\n var regionAttachment = attachment;\r\n var vertices = this.vertices;\r\n regionAttachment.computeWorldVertices(slot.bone, vertices, 0, 2);\r\n shapes.line(vertices[0], vertices[1], vertices[2], vertices[3]);\r\n shapes.line(vertices[2], vertices[3], vertices[4], vertices[5]);\r\n shapes.line(vertices[4], vertices[5], vertices[6], vertices[7]);\r\n shapes.line(vertices[6], vertices[7], vertices[0], vertices[1]);\r\n }\r\n }\r\n }\r\n if (this.drawMeshHull || this.drawMeshTriangles) {\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (!(attachment instanceof spine.MeshAttachment))\r\n continue;\r\n var mesh = attachment;\r\n var vertices = this.vertices;\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, 2);\r\n var triangles = mesh.triangles;\r\n var hullLength = mesh.hullLength;\r\n if (this.drawMeshTriangles) {\r\n shapes.setColor(this.triangleLineColor);\r\n for (var ii = 0, nn = triangles.length; ii < nn; ii += 3) {\r\n var v1 = triangles[ii] * 2, v2 = triangles[ii + 1] * 2, v3 = triangles[ii + 2] * 2;\r\n shapes.triangle(false, vertices[v1], vertices[v1 + 1], vertices[v2], vertices[v2 + 1], vertices[v3], vertices[v3 + 1]);\r\n }\r\n }\r\n if (this.drawMeshHull && hullLength > 0) {\r\n shapes.setColor(this.attachmentLineColor);\r\n hullLength = (hullLength >> 1) * 2;\r\n var lastX = vertices[hullLength - 2], lastY = vertices[hullLength - 1];\r\n for (var ii = 0, nn = hullLength; ii < nn; ii += 2) {\r\n var x = vertices[ii], y = vertices[ii + 1];\r\n shapes.line(x, y, lastX, lastY);\r\n lastX = x;\r\n lastY = y;\r\n }\r\n }\r\n }\r\n }\r\n if (this.drawBoundingBoxes) {\r\n var bounds = this.bounds;\r\n bounds.update(skeleton, true);\r\n shapes.setColor(this.aabbColor);\r\n shapes.rect(false, bounds.minX, bounds.minY, bounds.getWidth(), bounds.getHeight());\r\n var polygons = bounds.polygons;\r\n var boxes = bounds.boundingBoxes;\r\n for (var i = 0, n = polygons.length; i < n; i++) {\r\n var polygon = polygons[i];\r\n shapes.setColor(boxes[i].color);\r\n shapes.polygon(polygon, 0, polygon.length);\r\n }\r\n }\r\n if (this.drawPaths) {\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (!(attachment instanceof spine.PathAttachment))\r\n continue;\r\n var path = attachment;\r\n var nn = path.worldVerticesLength;\r\n var world = this.temp = spine.Utils.setArraySize(this.temp, nn, 0);\r\n path.computeWorldVertices(slot, 0, nn, world, 0, 2);\r\n var color = this.pathColor;\r\n var x1 = world[2], y1 = world[3], x2 = 0, y2 = 0;\r\n if (path.closed) {\r\n shapes.setColor(color);\r\n var cx1 = world[0], cy1 = world[1], cx2 = world[nn - 2], cy2 = world[nn - 1];\r\n x2 = world[nn - 4];\r\n y2 = world[nn - 3];\r\n shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, 32);\r\n shapes.setColor(SkeletonDebugRenderer.LIGHT_GRAY);\r\n shapes.line(x1, y1, cx1, cy1);\r\n shapes.line(x2, y2, cx2, cy2);\r\n }\r\n nn -= 4;\r\n for (var ii = 4; ii < nn; ii += 6) {\r\n var cx1 = world[ii], cy1 = world[ii + 1], cx2 = world[ii + 2], cy2 = world[ii + 3];\r\n x2 = world[ii + 4];\r\n y2 = world[ii + 5];\r\n shapes.setColor(color);\r\n shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, 32);\r\n shapes.setColor(SkeletonDebugRenderer.LIGHT_GRAY);\r\n shapes.line(x1, y1, cx1, cy1);\r\n shapes.line(x2, y2, cx2, cy2);\r\n x1 = x2;\r\n y1 = y2;\r\n }\r\n }\r\n }\r\n if (this.drawBones) {\r\n shapes.setColor(this.boneOriginColor);\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\r\n continue;\r\n shapes.circle(true, skeletonX + bone.worldX, skeletonY + bone.worldY, 3 * this.scale, SkeletonDebugRenderer.GREEN, 8);\r\n }\r\n }\r\n if (this.drawClipping) {\r\n var slots = skeleton.slots;\r\n shapes.setColor(this.clipColor);\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (!(attachment instanceof spine.ClippingAttachment))\r\n continue;\r\n var clip = attachment;\r\n var nn = clip.worldVerticesLength;\r\n var world = this.temp = spine.Utils.setArraySize(this.temp, nn, 0);\r\n clip.computeWorldVertices(slot, 0, nn, world, 0, 2);\r\n for (var i_17 = 0, n_3 = world.length; i_17 < n_3; i_17 += 2) {\r\n var x = world[i_17];\r\n var y = world[i_17 + 1];\r\n var x2 = world[(i_17 + 2) % world.length];\r\n var y2 = world[(i_17 + 3) % world.length];\r\n shapes.line(x, y, x2, y2);\r\n }\r\n }\r\n }\r\n };\r\n SkeletonDebugRenderer.prototype.dispose = function () {\r\n };\r\n SkeletonDebugRenderer.LIGHT_GRAY = new spine.Color(192 / 255, 192 / 255, 192 / 255, 1);\r\n SkeletonDebugRenderer.GREEN = new spine.Color(0, 1, 0, 1);\r\n return SkeletonDebugRenderer;\r\n }());\r\n webgl.SkeletonDebugRenderer = SkeletonDebugRenderer;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Renderable = (function () {\r\n function Renderable(vertices, numVertices, numFloats) {\r\n this.vertices = vertices;\r\n this.numVertices = numVertices;\r\n this.numFloats = numFloats;\r\n }\r\n return Renderable;\r\n }());\r\n ;\r\n var SkeletonRenderer = (function () {\r\n function SkeletonRenderer(context, twoColorTint) {\r\n if (twoColorTint === void 0) { twoColorTint = true; }\r\n this.premultipliedAlpha = false;\r\n this.vertexEffect = null;\r\n this.tempColor = new spine.Color();\r\n this.tempColor2 = new spine.Color();\r\n this.vertexSize = 2 + 2 + 4;\r\n this.twoColorTint = false;\r\n this.renderable = new Renderable(null, 0, 0);\r\n this.clipper = new spine.SkeletonClipping();\r\n this.temp = new spine.Vector2();\r\n this.temp2 = new spine.Vector2();\r\n this.temp3 = new spine.Color();\r\n this.temp4 = new spine.Color();\r\n this.twoColorTint = twoColorTint;\r\n if (twoColorTint)\r\n this.vertexSize += 4;\r\n this.vertices = spine.Utils.newFloatArray(this.vertexSize * 1024);\r\n }\r\n SkeletonRenderer.prototype.draw = function (batcher, skeleton, slotRangeStart, slotRangeEnd) {\r\n if (slotRangeStart === void 0) { slotRangeStart = -1; }\r\n if (slotRangeEnd === void 0) { slotRangeEnd = -1; }\r\n var clipper = this.clipper;\r\n var premultipliedAlpha = this.premultipliedAlpha;\r\n var twoColorTint = this.twoColorTint;\r\n var blendMode = null;\r\n var tempPos = this.temp;\r\n var tempUv = this.temp2;\r\n var tempLight = this.temp3;\r\n var tempDark = this.temp4;\r\n var renderable = this.renderable;\r\n var uvs = null;\r\n var triangles = null;\r\n var drawOrder = skeleton.drawOrder;\r\n var attachmentColor = null;\r\n var skeletonColor = skeleton.color;\r\n var vertexSize = twoColorTint ? 12 : 8;\r\n var inRange = false;\r\n if (slotRangeStart == -1)\r\n inRange = true;\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var clippedVertexSize = clipper.isClipping() ? 2 : vertexSize;\r\n var slot = drawOrder[i];\r\n if (!slot.bone.active) {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (slotRangeStart >= 0 && slotRangeStart == slot.data.index) {\r\n inRange = true;\r\n }\r\n if (!inRange) {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (slotRangeEnd >= 0 && slotRangeEnd == slot.data.index) {\r\n inRange = false;\r\n }\r\n var attachment = slot.getAttachment();\r\n var texture = null;\r\n if (attachment instanceof spine.RegionAttachment) {\r\n var region = attachment;\r\n renderable.vertices = this.vertices;\r\n renderable.numVertices = 4;\r\n renderable.numFloats = clippedVertexSize << 2;\r\n region.computeWorldVertices(slot.bone, renderable.vertices, 0, clippedVertexSize);\r\n triangles = SkeletonRenderer.QUAD_TRIANGLES;\r\n uvs = region.uvs;\r\n texture = region.region.renderObject.texture;\r\n attachmentColor = region.color;\r\n }\r\n else if (attachment instanceof spine.MeshAttachment) {\r\n var mesh = attachment;\r\n renderable.vertices = this.vertices;\r\n renderable.numVertices = (mesh.worldVerticesLength >> 1);\r\n renderable.numFloats = renderable.numVertices * clippedVertexSize;\r\n if (renderable.numFloats > renderable.vertices.length) {\r\n renderable.vertices = this.vertices = spine.Utils.newFloatArray(renderable.numFloats);\r\n }\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, renderable.vertices, 0, clippedVertexSize);\r\n triangles = mesh.triangles;\r\n texture = mesh.region.renderObject.texture;\r\n uvs = mesh.uvs;\r\n attachmentColor = mesh.color;\r\n }\r\n else if (attachment instanceof spine.ClippingAttachment) {\r\n var clip = (attachment);\r\n clipper.clipStart(slot, clip);\r\n continue;\r\n }\r\n else {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (texture != null) {\r\n var slotColor = slot.color;\r\n var finalColor = this.tempColor;\r\n finalColor.r = skeletonColor.r * slotColor.r * attachmentColor.r;\r\n finalColor.g = skeletonColor.g * slotColor.g * attachmentColor.g;\r\n finalColor.b = skeletonColor.b * slotColor.b * attachmentColor.b;\r\n finalColor.a = skeletonColor.a * slotColor.a * attachmentColor.a;\r\n if (premultipliedAlpha) {\r\n finalColor.r *= finalColor.a;\r\n finalColor.g *= finalColor.a;\r\n finalColor.b *= finalColor.a;\r\n }\r\n var darkColor = this.tempColor2;\r\n if (slot.darkColor == null)\r\n darkColor.set(0, 0, 0, 1.0);\r\n else {\r\n if (premultipliedAlpha) {\r\n darkColor.r = slot.darkColor.r * finalColor.a;\r\n darkColor.g = slot.darkColor.g * finalColor.a;\r\n darkColor.b = slot.darkColor.b * finalColor.a;\r\n }\r\n else {\r\n darkColor.setFromColor(slot.darkColor);\r\n }\r\n darkColor.a = premultipliedAlpha ? 1.0 : 0.0;\r\n }\r\n var slotBlendMode = slot.data.blendMode;\r\n if (slotBlendMode != blendMode) {\r\n blendMode = slotBlendMode;\r\n batcher.setBlendMode(webgl.WebGLBlendModeConverter.getSourceGLBlendMode(blendMode, premultipliedAlpha), webgl.WebGLBlendModeConverter.getDestGLBlendMode(blendMode));\r\n }\r\n if (clipper.isClipping()) {\r\n clipper.clipTriangles(renderable.vertices, renderable.numFloats, triangles, triangles.length, uvs, finalColor, darkColor, twoColorTint);\r\n var clippedVertices = new Float32Array(clipper.clippedVertices);\r\n var clippedTriangles = clipper.clippedTriangles;\r\n if (this.vertexEffect != null) {\r\n var vertexEffect = this.vertexEffect;\r\n var verts = clippedVertices;\r\n if (!twoColorTint) {\r\n for (var v = 0, n_4 = clippedVertices.length; v < n_4; v += vertexSize) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]);\r\n tempUv.x = verts[v + 6];\r\n tempUv.y = verts[v + 7];\r\n tempDark.set(0, 0, 0, 0);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n }\r\n }\r\n else {\r\n for (var v = 0, n_5 = clippedVertices.length; v < n_5; v += vertexSize) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]);\r\n tempUv.x = verts[v + 6];\r\n tempUv.y = verts[v + 7];\r\n tempDark.set(verts[v + 8], verts[v + 9], verts[v + 10], verts[v + 11]);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n verts[v + 8] = tempDark.r;\r\n verts[v + 9] = tempDark.g;\r\n verts[v + 10] = tempDark.b;\r\n verts[v + 11] = tempDark.a;\r\n }\r\n }\r\n }\r\n batcher.draw(texture, clippedVertices, clippedTriangles);\r\n }\r\n else {\r\n var verts = renderable.vertices;\r\n if (this.vertexEffect != null) {\r\n var vertexEffect = this.vertexEffect;\r\n if (!twoColorTint) {\r\n for (var v = 0, u = 0, n_6 = renderable.numFloats; v < n_6; v += vertexSize, u += 2) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempUv.x = uvs[u];\r\n tempUv.y = uvs[u + 1];\r\n tempLight.setFromColor(finalColor);\r\n tempDark.set(0, 0, 0, 0);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n }\r\n }\r\n else {\r\n for (var v = 0, u = 0, n_7 = renderable.numFloats; v < n_7; v += vertexSize, u += 2) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempUv.x = uvs[u];\r\n tempUv.y = uvs[u + 1];\r\n tempLight.setFromColor(finalColor);\r\n tempDark.setFromColor(darkColor);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n verts[v + 8] = tempDark.r;\r\n verts[v + 9] = tempDark.g;\r\n verts[v + 10] = tempDark.b;\r\n verts[v + 11] = tempDark.a;\r\n }\r\n }\r\n }\r\n else {\r\n if (!twoColorTint) {\r\n for (var v = 2, u = 0, n_8 = renderable.numFloats; v < n_8; v += vertexSize, u += 2) {\r\n verts[v] = finalColor.r;\r\n verts[v + 1] = finalColor.g;\r\n verts[v + 2] = finalColor.b;\r\n verts[v + 3] = finalColor.a;\r\n verts[v + 4] = uvs[u];\r\n verts[v + 5] = uvs[u + 1];\r\n }\r\n }\r\n else {\r\n for (var v = 2, u = 0, n_9 = renderable.numFloats; v < n_9; v += vertexSize, u += 2) {\r\n verts[v] = finalColor.r;\r\n verts[v + 1] = finalColor.g;\r\n verts[v + 2] = finalColor.b;\r\n verts[v + 3] = finalColor.a;\r\n verts[v + 4] = uvs[u];\r\n verts[v + 5] = uvs[u + 1];\r\n verts[v + 6] = darkColor.r;\r\n verts[v + 7] = darkColor.g;\r\n verts[v + 8] = darkColor.b;\r\n verts[v + 9] = darkColor.a;\r\n }\r\n }\r\n }\r\n var view = renderable.vertices.subarray(0, renderable.numFloats);\r\n batcher.draw(texture, view, triangles);\r\n }\r\n }\r\n clipper.clipEndWithSlot(slot);\r\n }\r\n clipper.clipEnd();\r\n };\r\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n return SkeletonRenderer;\r\n }());\r\n webgl.SkeletonRenderer = SkeletonRenderer;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Vector3 = (function () {\r\n function Vector3(x, y, z) {\r\n if (x === void 0) { x = 0; }\r\n if (y === void 0) { y = 0; }\r\n if (z === void 0) { z = 0; }\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n }\r\n Vector3.prototype.setFrom = function (v) {\r\n this.x = v.x;\r\n this.y = v.y;\r\n this.z = v.z;\r\n return this;\r\n };\r\n Vector3.prototype.set = function (x, y, z) {\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n return this;\r\n };\r\n Vector3.prototype.add = function (v) {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z;\r\n return this;\r\n };\r\n Vector3.prototype.sub = function (v) {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z;\r\n return this;\r\n };\r\n Vector3.prototype.scale = function (s) {\r\n this.x *= s;\r\n this.y *= s;\r\n this.z *= s;\r\n return this;\r\n };\r\n Vector3.prototype.normalize = function () {\r\n var len = this.length();\r\n if (len == 0)\r\n return this;\r\n len = 1 / len;\r\n this.x *= len;\r\n this.y *= len;\r\n this.z *= len;\r\n return this;\r\n };\r\n Vector3.prototype.cross = function (v) {\r\n return this.set(this.y * v.z - this.z * v.y, this.z * v.x - this.x * v.z, this.x * v.y - this.y * v.x);\r\n };\r\n Vector3.prototype.multiply = function (matrix) {\r\n var l_mat = matrix.values;\r\n return this.set(this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03], this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13], this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]);\r\n };\r\n Vector3.prototype.project = function (matrix) {\r\n var l_mat = matrix.values;\r\n var l_w = 1 / (this.x * l_mat[webgl.M30] + this.y * l_mat[webgl.M31] + this.z * l_mat[webgl.M32] + l_mat[webgl.M33]);\r\n return this.set((this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03]) * l_w, (this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13]) * l_w, (this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]) * l_w);\r\n };\r\n Vector3.prototype.dot = function (v) {\r\n return this.x * v.x + this.y * v.y + this.z * v.z;\r\n };\r\n Vector3.prototype.length = function () {\r\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\r\n };\r\n Vector3.prototype.distance = function (v) {\r\n var a = v.x - this.x;\r\n var b = v.y - this.y;\r\n var c = v.z - this.z;\r\n return Math.sqrt(a * a + b * b + c * c);\r\n };\r\n return Vector3;\r\n }());\r\n webgl.Vector3 = Vector3;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var ManagedWebGLRenderingContext = (function () {\r\n function ManagedWebGLRenderingContext(canvasOrContext, contextConfig) {\r\n var _this = this;\r\n if (contextConfig === void 0) { contextConfig = { alpha: \"true\" }; }\r\n this.restorables = new Array();\r\n if (canvasOrContext instanceof HTMLCanvasElement) {\r\n var canvas_1 = canvasOrContext;\r\n this.gl = (canvas_1.getContext(\"webgl2\", contextConfig) || canvas_1.getContext(\"webgl\", contextConfig));\r\n this.canvas = canvas_1;\r\n canvas_1.addEventListener(\"webglcontextlost\", function (e) {\r\n var event = e;\r\n if (e) {\r\n e.preventDefault();\r\n }\r\n });\r\n canvas_1.addEventListener(\"webglcontextrestored\", function (e) {\r\n for (var i = 0, n = _this.restorables.length; i < n; i++) {\r\n _this.restorables[i].restore();\r\n }\r\n });\r\n }\r\n else {\r\n this.gl = canvasOrContext;\r\n this.canvas = this.gl.canvas;\r\n }\r\n }\r\n ManagedWebGLRenderingContext.prototype.addRestorable = function (restorable) {\r\n this.restorables.push(restorable);\r\n };\r\n ManagedWebGLRenderingContext.prototype.removeRestorable = function (restorable) {\r\n var index = this.restorables.indexOf(restorable);\r\n if (index > -1)\r\n this.restorables.splice(index, 1);\r\n };\r\n return ManagedWebGLRenderingContext;\r\n }());\r\n webgl.ManagedWebGLRenderingContext = ManagedWebGLRenderingContext;\r\n var WebGLBlendModeConverter = (function () {\r\n function WebGLBlendModeConverter() {\r\n }\r\n WebGLBlendModeConverter.getDestGLBlendMode = function (blendMode) {\r\n switch (blendMode) {\r\n case spine.BlendMode.Normal: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\r\n case spine.BlendMode.Additive: return WebGLBlendModeConverter.ONE;\r\n case spine.BlendMode.Multiply: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\r\n case spine.BlendMode.Screen: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\r\n default: throw new Error(\"Unknown blend mode: \" + blendMode);\r\n }\r\n };\r\n WebGLBlendModeConverter.getSourceGLBlendMode = function (blendMode, premultipliedAlpha) {\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n switch (blendMode) {\r\n case spine.BlendMode.Normal: return premultipliedAlpha ? WebGLBlendModeConverter.ONE : WebGLBlendModeConverter.SRC_ALPHA;\r\n case spine.BlendMode.Additive: return premultipliedAlpha ? WebGLBlendModeConverter.ONE : WebGLBlendModeConverter.SRC_ALPHA;\r\n case spine.BlendMode.Multiply: return WebGLBlendModeConverter.DST_COLOR;\r\n case spine.BlendMode.Screen: return WebGLBlendModeConverter.ONE;\r\n default: throw new Error(\"Unknown blend mode: \" + blendMode);\r\n }\r\n };\r\n WebGLBlendModeConverter.ZERO = 0;\r\n WebGLBlendModeConverter.ONE = 1;\r\n WebGLBlendModeConverter.SRC_COLOR = 0x0300;\r\n WebGLBlendModeConverter.ONE_MINUS_SRC_COLOR = 0x0301;\r\n WebGLBlendModeConverter.SRC_ALPHA = 0x0302;\r\n WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA = 0x0303;\r\n WebGLBlendModeConverter.DST_ALPHA = 0x0304;\r\n WebGLBlendModeConverter.ONE_MINUS_DST_ALPHA = 0x0305;\r\n WebGLBlendModeConverter.DST_COLOR = 0x0306;\r\n return WebGLBlendModeConverter;\r\n }());\r\n webgl.WebGLBlendModeConverter = WebGLBlendModeConverter;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\n//# sourceMappingURL=spine-both.js.map\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = spine;\n\n}.call(window));\n"],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/spine/dist/SpineWebGLPlugin.js b/plugins/spine/dist/SpineWebGLPlugin.js index b600c7e5f..9774ed4ed 100644 --- a/plugins/spine/dist/SpineWebGLPlugin.js +++ b/plugins/spine/dist/SpineWebGLPlugin.js @@ -82,7 +82,7 @@ window["SpinePlugin"] = /******/ /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 35); +/******/ return __webpack_require__(__webpack_require__.s = 62); /******/ }) /************************************************************************/ /******/ ([ @@ -341,154 +341,6 @@ module.exports = Class; /***/ }), /* 1 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var MATH_CONST = { - - /** - * The value of PI * 2. - * - * @name Phaser.Math.PI2 - * @type {number} - * @since 3.0.0 - */ - PI2: Math.PI * 2, - - /** - * The value of PI * 0.5. - * - * @name Phaser.Math.TAU - * @type {number} - * @since 3.0.0 - */ - TAU: Math.PI * 0.5, - - /** - * An epsilon value (1.0e-6) - * - * @name Phaser.Math.EPSILON - * @type {number} - * @since 3.0.0 - */ - EPSILON: 1.0e-6, - - /** - * For converting degrees to radians (PI / 180) - * - * @name Phaser.Math.DEG_TO_RAD - * @type {number} - * @since 3.0.0 - */ - DEG_TO_RAD: Math.PI / 180, - - /** - * For converting radians to degrees (180 / PI) - * - * @name Phaser.Math.RAD_TO_DEG - * @type {number} - * @since 3.0.0 - */ - RAD_TO_DEG: 180 / Math.PI, - - /** - * An instance of the Random Number Generator. - * This is not set until the Game boots. - * - * @name Phaser.Math.RND - * @type {Phaser.Math.RandomDataGenerator} - * @since 3.0.0 - */ - RND: null, - - /** - * The minimum safe integer this browser supports. - * We use a const for backward compatibility with Internet Explorer. - * - * @name Phaser.Math.MIN_SAFE_INTEGER - * @type {number} - * @since 3.21.0 - */ - MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991, - - /** - * The maximum safe integer this browser supports. - * We use a const for backward compatibility with Internet Explorer. - * - * @name Phaser.Math.MAX_SAFE_INTEGER - * @type {number} - * @since 3.21.0 - */ - MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991 - -}; - -module.exports = MATH_CONST; - - -/***/ }), -/* 2 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * This is a slightly modified version of jQuery.isPlainObject. - * A plain object is an object whose internal class property is [object Object]. - * - * @function Phaser.Utils.Objects.IsPlainObject - * @since 3.0.0 - * - * @param {object} obj - The object to inspect. - * - * @return {boolean} `true` if the object is plain, otherwise `false`. - */ -var IsPlainObject = function (obj) -{ - // Not plain objects: - // - Any object or value whose internal [[Class]] property is not "[object Object]" - // - DOM nodes - // - window - if (typeof(obj) !== 'object' || obj.nodeType || obj === obj.window) - { - return false; - } - - // Support: Firefox <20 - // The try/catch suppresses exceptions thrown when attempting to access - // the "constructor" property of certain host objects, ie. |window.location| - // https://bugzilla.mozilla.org/show_bug.cgi?id=814622 - try - { - if (obj.constructor && !({}).hasOwnProperty.call(obj.constructor.prototype, 'isPrototypeOf')) - { - return false; - } - } - catch (e) - { - return false; - } - - // If the function hasn't returned already, we're confident that - // |obj| is a plain object, created by {} or constructed with new Object - return true; -}; - -module.exports = IsPlainObject; - - -/***/ }), -/* 3 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -501,7 +353,7 @@ module.exports = IsPlainObject; // and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl var Class = __webpack_require__(0); -var FuzzyEqual = __webpack_require__(20); +var FuzzyEqual = __webpack_require__(31); /** * @classdesc @@ -1263,10 +1115,367 @@ Vector2.ONE = new Vector2(1, 1); module.exports = Vector2; +/***/ }), +/* 2 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var MATH_CONST = { + + /** + * The value of PI * 2. + * + * @name Phaser.Math.PI2 + * @type {number} + * @since 3.0.0 + */ + PI2: Math.PI * 2, + + /** + * The value of PI * 0.5. + * + * @name Phaser.Math.TAU + * @type {number} + * @since 3.0.0 + */ + TAU: Math.PI * 0.5, + + /** + * An epsilon value (1.0e-6) + * + * @name Phaser.Math.EPSILON + * @type {number} + * @since 3.0.0 + */ + EPSILON: 1.0e-6, + + /** + * For converting degrees to radians (PI / 180) + * + * @name Phaser.Math.DEG_TO_RAD + * @type {number} + * @since 3.0.0 + */ + DEG_TO_RAD: Math.PI / 180, + + /** + * For converting radians to degrees (180 / PI) + * + * @name Phaser.Math.RAD_TO_DEG + * @type {number} + * @since 3.0.0 + */ + RAD_TO_DEG: 180 / Math.PI, + + /** + * An instance of the Random Number Generator. + * This is not set until the Game boots. + * + * @name Phaser.Math.RND + * @type {Phaser.Math.RandomDataGenerator} + * @since 3.0.0 + */ + RND: null, + + /** + * The minimum safe integer this browser supports. + * We use a const for backward compatibility with Internet Explorer. + * + * @name Phaser.Math.MIN_SAFE_INTEGER + * @type {number} + * @since 3.21.0 + */ + MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991, + + /** + * The maximum safe integer this browser supports. + * We use a const for backward compatibility with Internet Explorer. + * + * @name Phaser.Math.MAX_SAFE_INTEGER + * @type {number} + * @since 3.21.0 + */ + MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991 + +}; + +module.exports = MATH_CONST; + + +/***/ }), +/* 3 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Force a value within the boundaries by clamping it to the range `min`, `max`. + * + * @function Phaser.Math.Clamp + * @since 3.0.0 + * + * @param {number} value - The value to be clamped. + * @param {number} min - The minimum bounds. + * @param {number} max - The maximum bounds. + * + * @return {number} The clamped value. + */ +var Clamp = function (value, min, max) +{ + return Math.max(min, Math.min(max, value)); +}; + +module.exports = Clamp; + + /***/ }), /* 4 */ /***/ (function(module, exports) { +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * A NOOP (No Operation) callback function. + * + * Used internally by Phaser when it's more expensive to determine if a callback exists + * than it is to just invoke an empty function. + * + * @function Phaser.Utils.NOOP + * @since 3.0.0 + */ +var NOOP = function () +{ + // NOOP +}; + +module.exports = NOOP; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Tests if the start and end indexes are a safe range for the given array. + * + * @function Phaser.Utils.Array.SafeRange + * @since 3.4.0 + * + * @param {array} array - The array to check. + * @param {integer} startIndex - The start index. + * @param {integer} endIndex - The end index. + * @param {boolean} [throwError=true] - Throw an error if the range is out of bounds. + * + * @return {boolean} True if the range is safe, otherwise false. + */ +var SafeRange = function (array, startIndex, endIndex, throwError) +{ + var len = array.length; + + if (startIndex < 0 || + startIndex > len || + startIndex >= endIndex || + endIndex > len || + startIndex + endIndex > len) + { + if (throwError) + { + throw new Error('Range Error: Values outside acceptable range'); + } + + return false; + } + else + { + return true; + } +}; + +module.exports = SafeRange; + + +/***/ }), +/* 6 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// Source object +// The key as a string, or an array of keys, i.e. 'banner', or 'banner.hideBanner' +// The default value to use if the key doesn't exist + +/** + * Retrieves a value from an object. + * + * @function Phaser.Utils.Objects.GetValue + * @since 3.0.0 + * + * @param {object} source - The object to retrieve the value from. + * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object. + * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object. + * + * @return {*} The value of the requested key. + */ +var GetValue = function (source, key, defaultValue) +{ + if (!source || typeof source === 'number') + { + return defaultValue; + } + else if (source.hasOwnProperty(key)) + { + return source[key]; + } + else if (key.indexOf('.') !== -1) + { + var keys = key.split('.'); + var parent = source; + var value = defaultValue; + + // Use for loop here so we can break early + for (var i = 0; i < keys.length; i++) + { + if (parent.hasOwnProperty(keys[i])) + { + // Yes it has a key property, let's carry on down + value = parent[keys[i]]; + + parent = parent[keys[i]]; + } + else + { + // Can't go any further, so reset to default + value = defaultValue; + break; + } + } + + return value; + } + else + { + return defaultValue; + } +}; + +module.exports = GetValue; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * This is a slightly modified version of jQuery.isPlainObject. + * A plain object is an object whose internal class property is [object Object]. + * + * @function Phaser.Utils.Objects.IsPlainObject + * @since 3.0.0 + * + * @param {object} obj - The object to inspect. + * + * @return {boolean} `true` if the object is plain, otherwise `false`. + */ +var IsPlainObject = function (obj) +{ + // Not plain objects: + // - Any object or value whose internal [[Class]] property is not "[object Object]" + // - DOM nodes + // - window + if (typeof(obj) !== 'object' || obj.nodeType || obj === obj.window) + { + return false; + } + + // Support: Firefox <20 + // The try/catch suppresses exceptions thrown when attempting to access + // the "constructor" property of certain host objects, ie. |window.location| + // https://bugzilla.mozilla.org/show_bug.cgi?id=814622 + try + { + if (obj.constructor && !({}).hasOwnProperty.call(obj.constructor.prototype, 'isPrototypeOf')) + { + return false; + } + } + catch (e) + { + return false; + } + + // If the function hasn't returned already, we're confident that + // |obj| is a plain object, created by {} or constructed with new Object + return true; +}; + +module.exports = IsPlainObject; + + +/***/ }), +/* 8 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Wrap the given `value` between `min` and `max. + * + * @function Phaser.Math.Wrap + * @since 3.0.0 + * + * @param {number} value - The value to wrap. + * @param {number} min - The minimum value. + * @param {number} max - The maximum value. + * + * @return {number} The wrapped value. + */ +var Wrap = function (value, min, max) +{ + var range = max - min; + + return (min + ((((value - min) % range) + range) % range)); +}; + +module.exports = Wrap; + + +/***/ }), +/* 9 */ +/***/ (function(module, exports) { + /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. @@ -1307,8 +1516,8 @@ module.exports = GetFastValue; /***/ }), -/* 5 */ -/***/ (function(module, exports) { +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey @@ -1316,30 +1525,166 @@ module.exports = GetFastValue; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var Class = __webpack_require__(0); +var GEOM_CONST = __webpack_require__(25); + /** - * Wrap the given `value` between `min` and `max. + * @classdesc + * Defines a Point in 2D space, with an x and y component. * - * @function Phaser.Math.Wrap + * @class Point + * @memberof Phaser.Geom + * @constructor * @since 3.0.0 * - * @param {number} value - The value to wrap. - * @param {number} min - The minimum value. - * @param {number} max - The maximum value. - * - * @return {number} The wrapped value. + * @param {number} [x=0] - The x coordinate of this Point. + * @param {number} [y=x] - The y coordinate of this Point. */ -var Wrap = function (value, min, max) -{ - var range = max - min; +var Point = new Class({ - return (min + ((((value - min) % range) + range) % range)); -}; + initialize: -module.exports = Wrap; + function Point (x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = x; } + + /** + * The geometry constant type of this object: `GEOM_CONST.POINT`. + * Used for fast type comparisons. + * + * @name Phaser.Geom.Point#type + * @type {integer} + * @readonly + * @since 3.19.0 + */ + this.type = GEOM_CONST.POINT; + + /** + * The x coordinate of this Point. + * + * @name Phaser.Geom.Point#x + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.x = x; + + /** + * The y coordinate of this Point. + * + * @name Phaser.Geom.Point#y + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.y = y; + }, + + /** + * Set the x and y coordinates of the point to the given values. + * + * @method Phaser.Geom.Point#setTo + * @since 3.0.0 + * + * @param {number} [x=0] - The x coordinate of this Point. + * @param {number} [y=x] - The y coordinate of this Point. + * + * @return {this} This Point object. + */ + setTo: function (x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = x; } + + this.x = x; + this.y = y; + + return this; + } + +}); + +module.exports = Point; /***/ }), -/* 6 */ +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(2); + +/** + * Takes an angle in Phasers default clockwise format and converts it so that + * 0 is North, 90 is West, 180 is South and 270 is East, + * therefore running counter-clockwise instead of clockwise. + * + * You can pass in the angle from a Game Object using: + * + * ```javascript + * var converted = CounterClockwise(gameobject.rotation); + * ``` + * + * All values for this function are in radians. + * + * @function Phaser.Math.Angle.CounterClockwise + * @since 3.16.0 + * + * @param {number} angle - The angle to convert, in radians. + * + * @return {number} The converted angle, in radians. + */ +var CounterClockwise = function (angle) +{ + if (angle > Math.PI) + { + angle -= CONST.PI2; + } + + return Math.abs((((angle + CONST.TAU) % CONST.PI2) - CONST.PI2) % CONST.PI2); +}; + +module.exports = CounterClockwise; + + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(2); + +/** + * Convert the given angle in radians, to the equivalent angle in degrees. + * + * @function Phaser.Math.RadToDeg + * @since 3.0.0 + * + * @param {number} radians - The angle in radians to convert ot degrees. + * + * @return {integer} The given angle converted to degrees. + */ +var RadToDeg = function (radians) +{ + return radians * CONST.RAD_TO_DEG; +}; + +module.exports = RadToDeg; + + +/***/ }), +/* 13 */ /***/ (function(module, exports) { /** @@ -1491,7 +1836,7 @@ module.exports = FILE_CONST; /***/ }), -/* 7 */ +/* 14 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -1500,43 +1845,455 @@ module.exports = FILE_CONST; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(1); +var CheckMatrix = __webpack_require__(23); +var TransposeMatrix = __webpack_require__(56); /** - * Takes an angle in Phasers default clockwise format and converts it so that - * 0 is North, 90 is West, 180 is South and 270 is East, - * therefore running counter-clockwise instead of clockwise. - * - * You can pass in the angle from a Game Object using: - * - * ```javascript - * var converted = CounterClockwise(gameobject.rotation); - * ``` - * - * All values for this function are in radians. + * Rotates the array matrix based on the given rotation value. * - * @function Phaser.Math.Angle.CounterClockwise - * @since 3.16.0 + * The value can be given in degrees: 90, -90, 270, -270 or 180, + * or a string command: `rotateLeft`, `rotateRight` or `rotate180`. * - * @param {number} angle - The angle to convert, in radians. + * Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}. * - * @return {number} The converted angle, in radians. + * @function Phaser.Utils.Array.Matrix.RotateMatrix + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [matrix,$return] + * + * @param {T[][]} [matrix] - The array to rotate. + * @param {(number|string)} [direction=90] - The amount to rotate the matrix by. + * + * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix. */ -var CounterClockwise = function (angle) +var RotateMatrix = function (matrix, direction) { - if (angle > Math.PI) + if (direction === undefined) { direction = 90; } + + if (!CheckMatrix(matrix)) { - angle -= CONST.PI2; + return null; } - return Math.abs((((angle + CONST.TAU) % CONST.PI2) - CONST.PI2) % CONST.PI2); + if (typeof direction !== 'string') + { + direction = ((direction % 360) + 360) % 360; + } + + if (direction === 90 || direction === -270 || direction === 'rotateLeft') + { + matrix = TransposeMatrix(matrix); + matrix.reverse(); + } + else if (direction === -90 || direction === 270 || direction === 'rotateRight') + { + matrix.reverse(); + matrix = TransposeMatrix(matrix); + } + else if (Math.abs(direction) === 180 || direction === 'rotate180') + { + for (var i = 0; i < matrix.length; i++) + { + matrix[i].reverse(); + } + + matrix.reverse(); + } + + return matrix; }; -module.exports = CounterClockwise; +module.exports = RotateMatrix; /***/ }), -/* 8 */ +/* 15 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Removes a single item from an array and returns it without creating gc, like the native splice does. + * Based on code by Mike Reinstein. + * + * @function Phaser.Utils.Array.SpliceOne + * @since 3.0.0 + * + * @param {array} array - The array to splice from. + * @param {integer} index - The index of the item which should be spliced. + * + * @return {*} The item which was spliced (removed). + */ +var SpliceOne = function (array, index) +{ + if (index >= array.length) + { + return; + } + + var len = array.length - 1; + + var item = array[index]; + + for (var i = index; i < len; i++) + { + array[i] = array[i + 1]; + } + + array.length = len; + + return item; +}; + +module.exports = SpliceOne; + + +/***/ }), +/* 16 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Phaser Blend Modes. + * + * @namespace Phaser.BlendModes + * @since 3.0.0 + */ + +module.exports = { + + /** + * Skips the Blend Mode check in the renderer. + * + * @name Phaser.BlendModes.SKIP_CHECK + * @type {integer} + * @const + * @since 3.0.0 + */ + SKIP_CHECK: -1, + + /** + * Normal blend mode. For Canvas and WebGL. + * This is the default setting and draws new shapes on top of the existing canvas content. + * + * @name Phaser.BlendModes.NORMAL + * @type {integer} + * @const + * @since 3.0.0 + */ + NORMAL: 0, + + /** + * Add blend mode. For Canvas and WebGL. + * Where both shapes overlap the color is determined by adding color values. + * + * @name Phaser.BlendModes.ADD + * @type {integer} + * @const + * @since 3.0.0 + */ + ADD: 1, + + /** + * Multiply blend mode. For Canvas and WebGL. + * The pixels are of the top layer are multiplied with the corresponding pixel of the bottom layer. A darker picture is the result. + * + * @name Phaser.BlendModes.MULTIPLY + * @type {integer} + * @const + * @since 3.0.0 + */ + MULTIPLY: 2, + + /** + * Screen blend mode. For Canvas and WebGL. + * The pixels are inverted, multiplied, and inverted again. A lighter picture is the result (opposite of multiply) + * + * @name Phaser.BlendModes.SCREEN + * @type {integer} + * @const + * @since 3.0.0 + */ + SCREEN: 3, + + /** + * Overlay blend mode. For Canvas only. + * A combination of multiply and screen. Dark parts on the base layer become darker, and light parts become lighter. + * + * @name Phaser.BlendModes.OVERLAY + * @type {integer} + * @const + * @since 3.0.0 + */ + OVERLAY: 4, + + /** + * Darken blend mode. For Canvas only. + * Retains the darkest pixels of both layers. + * + * @name Phaser.BlendModes.DARKEN + * @type {integer} + * @const + * @since 3.0.0 + */ + DARKEN: 5, + + /** + * Lighten blend mode. For Canvas only. + * Retains the lightest pixels of both layers. + * + * @name Phaser.BlendModes.LIGHTEN + * @type {integer} + * @const + * @since 3.0.0 + */ + LIGHTEN: 6, + + /** + * Color Dodge blend mode. For Canvas only. + * Divides the bottom layer by the inverted top layer. + * + * @name Phaser.BlendModes.COLOR_DODGE + * @type {integer} + * @const + * @since 3.0.0 + */ + COLOR_DODGE: 7, + + /** + * Color Burn blend mode. For Canvas only. + * Divides the inverted bottom layer by the top layer, and then inverts the result. + * + * @name Phaser.BlendModes.COLOR_BURN + * @type {integer} + * @const + * @since 3.0.0 + */ + COLOR_BURN: 8, + + /** + * Hard Light blend mode. For Canvas only. + * A combination of multiply and screen like overlay, but with top and bottom layer swapped. + * + * @name Phaser.BlendModes.HARD_LIGHT + * @type {integer} + * @const + * @since 3.0.0 + */ + HARD_LIGHT: 9, + + /** + * Soft Light blend mode. For Canvas only. + * A softer version of hard-light. Pure black or white does not result in pure black or white. + * + * @name Phaser.BlendModes.SOFT_LIGHT + * @type {integer} + * @const + * @since 3.0.0 + */ + SOFT_LIGHT: 10, + + /** + * Difference blend mode. For Canvas only. + * Subtracts the bottom layer from the top layer or the other way round to always get a positive value. + * + * @name Phaser.BlendModes.DIFFERENCE + * @type {integer} + * @const + * @since 3.0.0 + */ + DIFFERENCE: 11, + + /** + * Exclusion blend mode. For Canvas only. + * Like difference, but with lower contrast. + * + * @name Phaser.BlendModes.EXCLUSION + * @type {integer} + * @const + * @since 3.0.0 + */ + EXCLUSION: 12, + + /** + * Hue blend mode. For Canvas only. + * Preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer. + * + * @name Phaser.BlendModes.HUE + * @type {integer} + * @const + * @since 3.0.0 + */ + HUE: 13, + + /** + * Saturation blend mode. For Canvas only. + * Preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer. + * + * @name Phaser.BlendModes.SATURATION + * @type {integer} + * @const + * @since 3.0.0 + */ + SATURATION: 14, + + /** + * Color blend mode. For Canvas only. + * Preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer. + * + * @name Phaser.BlendModes.COLOR + * @type {integer} + * @const + * @since 3.0.0 + */ + COLOR: 15, + + /** + * Luminosity blend mode. For Canvas only. + * Preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer. + * + * @name Phaser.BlendModes.LUMINOSITY + * @type {integer} + * @const + * @since 3.0.0 + */ + LUMINOSITY: 16, + + /** + * Alpha erase blend mode. For Canvas and WebGL. + * + * @name Phaser.BlendModes.ERASE + * @type {integer} + * @const + * @since 3.0.0 + */ + ERASE: 17, + + /** + * Source-in blend mode. For Canvas only. + * The new shape is drawn only where both the new shape and the destination canvas overlap. Everything else is made transparent. + * + * @name Phaser.BlendModes.SOURCE_IN + * @type {integer} + * @const + * @since 3.0.0 + */ + SOURCE_IN: 18, + + /** + * Source-out blend mode. For Canvas only. + * The new shape is drawn where it doesn't overlap the existing canvas content. + * + * @name Phaser.BlendModes.SOURCE_OUT + * @type {integer} + * @const + * @since 3.0.0 + */ + SOURCE_OUT: 19, + + /** + * Source-out blend mode. For Canvas only. + * The new shape is only drawn where it overlaps the existing canvas content. + * + * @name Phaser.BlendModes.SOURCE_ATOP + * @type {integer} + * @const + * @since 3.0.0 + */ + SOURCE_ATOP: 20, + + /** + * Destination-over blend mode. For Canvas only. + * New shapes are drawn behind the existing canvas content. + * + * @name Phaser.BlendModes.DESTINATION_OVER + * @type {integer} + * @const + * @since 3.0.0 + */ + DESTINATION_OVER: 21, + + /** + * Destination-in blend mode. For Canvas only. + * The existing canvas content is kept where both the new shape and existing canvas content overlap. Everything else is made transparent. + * + * @name Phaser.BlendModes.DESTINATION_IN + * @type {integer} + * @const + * @since 3.0.0 + */ + DESTINATION_IN: 22, + + /** + * Destination-out blend mode. For Canvas only. + * The existing content is kept where it doesn't overlap the new shape. + * + * @name Phaser.BlendModes.DESTINATION_OUT + * @type {integer} + * @const + * @since 3.0.0 + */ + DESTINATION_OUT: 23, + + /** + * Destination-out blend mode. For Canvas only. + * The existing canvas is only kept where it overlaps the new shape. The new shape is drawn behind the canvas content. + * + * @name Phaser.BlendModes.DESTINATION_ATOP + * @type {integer} + * @const + * @since 3.0.0 + */ + DESTINATION_ATOP: 24, + + /** + * Lighten blend mode. For Canvas only. + * Where both shapes overlap the color is determined by adding color values. + * + * @name Phaser.BlendModes.LIGHTER + * @type {integer} + * @const + * @since 3.0.0 + */ + LIGHTER: 25, + + /** + * Copy blend mode. For Canvas only. + * Only the new shape is shown. + * + * @name Phaser.BlendModes.COPY + * @type {integer} + * @const + * @since 3.0.0 + */ + COPY: 26, + + /** + * Xor blend mode. For Canvas only. + * Shapes are made transparent where both overlap and drawn normal everywhere else. + * + * @name Phaser.BlendModes.XOR + * @type {integer} + * @const + * @since 3.0.0 + */ + XOR: 27 + +}; + + +/***/ }), +/* 17 */ /***/ (function(module, exports) { /** @@ -1565,37 +2322,7 @@ module.exports = FloatBetween; /***/ }), -/* 9 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Force a value within the boundaries by clamping it to the range `min`, `max`. - * - * @function Phaser.Math.Clamp - * @since 3.0.0 - * - * @param {number} value - The value to be clamped. - * @param {number} min - The minimum bounds. - * @param {number} max - The maximum bounds. - * - * @return {number} The clamped value. - */ -var Clamp = function (value, min, max) -{ - return Math.max(min, Math.min(max, value)); -}; - -module.exports = Clamp; - - -/***/ }), -/* 10 */ +/* 18 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -1604,28 +2331,28 @@ module.exports = Clamp; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(1); +var CONST = __webpack_require__(2); /** - * Convert the given angle in radians, to the equivalent angle in degrees. + * Convert the given angle from degrees, to the equivalent angle in radians. * - * @function Phaser.Math.RadToDeg + * @function Phaser.Math.DegToRad * @since 3.0.0 * - * @param {number} radians - The angle in radians to convert ot degrees. + * @param {integer} degrees - The angle (in degrees) to convert to radians. * - * @return {integer} The given angle converted to degrees. + * @return {number} The given angle converted to radians. */ -var RadToDeg = function (radians) +var DegToRad = function (degrees) { - return radians * CONST.RAD_TO_DEG; + return degrees * CONST.DEG_TO_RAD; }; -module.exports = RadToDeg; +module.exports = DegToRad; /***/ }), -/* 11 */ +/* 19 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -2435,78 +3162,7 @@ module.exports = Vector3; /***/ }), -/* 12 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -// Source object -// The key as a string, or an array of keys, i.e. 'banner', or 'banner.hideBanner' -// The default value to use if the key doesn't exist - -/** - * Retrieves a value from an object. - * - * @function Phaser.Utils.Objects.GetValue - * @since 3.0.0 - * - * @param {object} source - The object to retrieve the value from. - * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object. - * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object. - * - * @return {*} The value of the requested key. - */ -var GetValue = function (source, key, defaultValue) -{ - if (!source || typeof source === 'number') - { - return defaultValue; - } - else if (source.hasOwnProperty(key)) - { - return source[key]; - } - else if (key.indexOf('.') !== -1) - { - var keys = key.split('.'); - var parent = source; - var value = defaultValue; - - // Use for loop here so we can break early - for (var i = 0; i < keys.length; i++) - { - if (parent.hasOwnProperty(keys[i])) - { - // Yes it has a key property, let's carry on down - value = parent[keys[i]]; - - parent = parent[keys[i]]; - } - else - { - // Can't go any further, so reset to default - value = defaultValue; - break; - } - } - - return value; - } - else - { - return defaultValue; - } -}; - -module.exports = GetValue; - - -/***/ }), -/* 13 */ +/* 20 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -2516,13 +3172,13 @@ module.exports = GetValue; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(6); -var Events = __webpack_require__(178); -var GetFastValue = __webpack_require__(4); -var GetURL = __webpack_require__(189); -var MergeXHRSettings = __webpack_require__(32); -var XHRLoader = __webpack_require__(190); -var XHRSettings = __webpack_require__(33); +var CONST = __webpack_require__(13); +var Events = __webpack_require__(202); +var GetFastValue = __webpack_require__(9); +var GetURL = __webpack_require__(213); +var MergeXHRSettings = __webpack_require__(44); +var XHRLoader = __webpack_require__(214); +var XHRSettings = __webpack_require__(45); /** * @classdesc @@ -3054,7 +3710,7 @@ module.exports = File; /***/ }), -/* 14 */ +/* 21 */ /***/ (function(module, exports) { /** @@ -3123,7 +3779,7 @@ module.exports = FileTypesManager; /***/ }), -/* 15 */ +/* 22 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -3132,7 +3788,692 @@ module.exports = FileTypesManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var IsPlainObject = __webpack_require__(2); +/** + * @namespace Phaser.GameObjects.Events + */ + +module.exports = { + + ADDED_TO_SCENE: __webpack_require__(225), + DESTROY: __webpack_require__(226), + REMOVED_FROM_SCENE: __webpack_require__(227), + VIDEO_COMPLETE: __webpack_require__(228), + VIDEO_CREATED: __webpack_require__(229), + VIDEO_ERROR: __webpack_require__(230), + VIDEO_LOOP: __webpack_require__(231), + VIDEO_PLAY: __webpack_require__(232), + VIDEO_SEEKED: __webpack_require__(233), + VIDEO_SEEKING: __webpack_require__(234), + VIDEO_STOP: __webpack_require__(235), + VIDEO_TIMEOUT: __webpack_require__(236), + VIDEO_UNLOCKED: __webpack_require__(237) + +}; + + +/***/ }), +/* 23 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Checks if an array can be used as a matrix. + * + * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows) have the same length. There must be at least two rows: + * + * ``` + * [ + * [ 1, 1, 1, 1, 1, 1 ], + * [ 2, 0, 0, 0, 0, 4 ], + * [ 2, 0, 1, 2, 0, 4 ], + * [ 2, 0, 3, 4, 0, 4 ], + * [ 2, 0, 0, 0, 0, 4 ], + * [ 3, 3, 3, 3, 3, 3 ] + * ] + * ``` + * + * @function Phaser.Utils.Array.Matrix.CheckMatrix + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [matrix] + * + * @param {T[][]} [matrix] - The array to check. + * + * @return {boolean} `true` if the given `matrix` array is a valid matrix. + */ +var CheckMatrix = function (matrix) +{ + if (!Array.isArray(matrix) || matrix.length < 2 || !Array.isArray(matrix[0])) + { + return false; + } + + // How long is the first row? + var size = matrix[0].length; + + // Validate the rest of the rows are the same length + for (var i = 1; i < matrix.length; i++) + { + if (matrix[i].length !== size) + { + return false; + } + } + + return true; +}; + +module.exports = CheckMatrix; + + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var Contains = __webpack_require__(312); +var GetPoint = __webpack_require__(60); +var GetPoints = __webpack_require__(313); +var GEOM_CONST = __webpack_require__(25); +var Line = __webpack_require__(314); +var Random = __webpack_require__(319); + +/** + * @classdesc + * Encapsulates a 2D rectangle defined by its corner point in the top-left and its extends in x (width) and y (height) + * + * @class Rectangle + * @memberof Phaser.Geom + * @constructor + * @since 3.0.0 + * + * @param {number} [x=0] - The X coordinate of the top left corner of the Rectangle. + * @param {number} [y=0] - The Y coordinate of the top left corner of the Rectangle. + * @param {number} [width=0] - The width of the Rectangle. + * @param {number} [height=0] - The height of the Rectangle. + */ +var Rectangle = new Class({ + + initialize: + + function Rectangle (x, y, width, height) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + if (width === undefined) { width = 0; } + if (height === undefined) { height = 0; } + + /** + * The geometry constant type of this object: `GEOM_CONST.RECTANGLE`. + * Used for fast type comparisons. + * + * @name Phaser.Geom.Rectangle#type + * @type {integer} + * @readonly + * @since 3.19.0 + */ + this.type = GEOM_CONST.RECTANGLE; + + /** + * The X coordinate of the top left corner of the Rectangle. + * + * @name Phaser.Geom.Rectangle#x + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.x = x; + + /** + * The Y coordinate of the top left corner of the Rectangle. + * + * @name Phaser.Geom.Rectangle#y + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.y = y; + + /** + * The width of the Rectangle, i.e. the distance between its left side (defined by `x`) and its right side. + * + * @name Phaser.Geom.Rectangle#width + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.width = width; + + /** + * The height of the Rectangle, i.e. the distance between its top side (defined by `y`) and its bottom side. + * + * @name Phaser.Geom.Rectangle#height + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.height = height; + }, + + /** + * Checks if the given point is inside the Rectangle's bounds. + * + * @method Phaser.Geom.Rectangle#contains + * @since 3.0.0 + * + * @param {number} x - The X coordinate of the point to check. + * @param {number} y - The Y coordinate of the point to check. + * + * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`. + */ + contains: function (x, y) + { + return Contains(this, x, y); + }, + + /** + * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter. + * + * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is. + * + * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side. + * + * @method Phaser.Geom.Rectangle#getPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [output,$return] + * + * @param {number} position - The normalized distance into the Rectangle's perimeter to return. + * @param {(Phaser.Geom.Point|object)} [output] - An object to update with the `x` and `y` coordinates of the point. + * + * @return {(Phaser.Geom.Point|object)} The updated `output` object, or a new Point if no `output` object was given. + */ + getPoint: function (position, output) + { + return GetPoint(this, position, output); + }, + + /** + * Returns an array of points from the perimeter of the Rectangle, each spaced out based on the quantity or step required. + * + * @method Phaser.Geom.Rectangle#getPoints + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point[]} O - [output,$return] + * + * @param {integer} quantity - The number of points to return. Set to `false` or 0 to return an arbitrary number of points (`perimeter / stepRate`) evenly spaced around the Rectangle based on the `stepRate`. + * @param {number} [stepRate] - If `quantity` is 0, determines the normalized distance between each returned point. + * @param {(array|Phaser.Geom.Point[])} [output] - An array to which to append the points. + * + * @return {(array|Phaser.Geom.Point[])} The modified `output` array, or a new array if none was provided. + */ + getPoints: function (quantity, stepRate, output) + { + return GetPoints(this, quantity, stepRate, output); + }, + + /** + * Returns a random point within the Rectangle's bounds. + * + * @method Phaser.Geom.Rectangle#getRandomPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [point,$return] + * + * @param {Phaser.Geom.Point} [point] - The object in which to store the `x` and `y` coordinates of the point. + * + * @return {Phaser.Geom.Point} The updated `point`, or a new Point if none was provided. + */ + getRandomPoint: function (point) + { + return Random(this, point); + }, + + /** + * Sets the position, width, and height of the Rectangle. + * + * @method Phaser.Geom.Rectangle#setTo + * @since 3.0.0 + * + * @param {number} x - The X coordinate of the top left corner of the Rectangle. + * @param {number} y - The Y coordinate of the top left corner of the Rectangle. + * @param {number} width - The width of the Rectangle. + * @param {number} height - The height of the Rectangle. + * + * @return {this} This Rectangle object. + */ + setTo: function (x, y, width, height) + { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + + return this; + }, + + /** + * Resets the position, width, and height of the Rectangle to 0. + * + * @method Phaser.Geom.Rectangle#setEmpty + * @since 3.0.0 + * + * @return {this} This Rectangle object. + */ + setEmpty: function () + { + return this.setTo(0, 0, 0, 0); + }, + + /** + * Sets the position of the Rectangle. + * + * @method Phaser.Geom.Rectangle#setPosition + * @since 3.0.0 + * + * @param {number} x - The X coordinate of the top left corner of the Rectangle. + * @param {number} [y=x] - The Y coordinate of the top left corner of the Rectangle. + * + * @return {this} This Rectangle object. + */ + setPosition: function (x, y) + { + if (y === undefined) { y = x; } + + this.x = x; + this.y = y; + + return this; + }, + + /** + * Sets the width and height of the Rectangle. + * + * @method Phaser.Geom.Rectangle#setSize + * @since 3.0.0 + * + * @param {number} width - The width to set the Rectangle to. + * @param {number} [height=width] - The height to set the Rectangle to. + * + * @return {this} This Rectangle object. + */ + setSize: function (width, height) + { + if (height === undefined) { height = width; } + + this.width = width; + this.height = height; + + return this; + }, + + /** + * Determines if the Rectangle is empty. A Rectangle is empty if its width or height is less than or equal to 0. + * + * @method Phaser.Geom.Rectangle#isEmpty + * @since 3.0.0 + * + * @return {boolean} `true` if the Rectangle is empty. A Rectangle object is empty if its width or height is less than or equal to 0. + */ + isEmpty: function () + { + return (this.width <= 0 || this.height <= 0); + }, + + /** + * Returns a Line object that corresponds to the top of this Rectangle. + * + * @method Phaser.Geom.Rectangle#getLineA + * @since 3.0.0 + * + * @generic {Phaser.Geom.Line} O - [line,$return] + * + * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created. + * + * @return {Phaser.Geom.Line} A Line object that corresponds to the top of this Rectangle. + */ + getLineA: function (line) + { + if (line === undefined) { line = new Line(); } + + line.setTo(this.x, this.y, this.right, this.y); + + return line; + }, + + /** + * Returns a Line object that corresponds to the right of this Rectangle. + * + * @method Phaser.Geom.Rectangle#getLineB + * @since 3.0.0 + * + * @generic {Phaser.Geom.Line} O - [line,$return] + * + * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created. + * + * @return {Phaser.Geom.Line} A Line object that corresponds to the right of this Rectangle. + */ + getLineB: function (line) + { + if (line === undefined) { line = new Line(); } + + line.setTo(this.right, this.y, this.right, this.bottom); + + return line; + }, + + /** + * Returns a Line object that corresponds to the bottom of this Rectangle. + * + * @method Phaser.Geom.Rectangle#getLineC + * @since 3.0.0 + * + * @generic {Phaser.Geom.Line} O - [line,$return] + * + * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created. + * + * @return {Phaser.Geom.Line} A Line object that corresponds to the bottom of this Rectangle. + */ + getLineC: function (line) + { + if (line === undefined) { line = new Line(); } + + line.setTo(this.right, this.bottom, this.x, this.bottom); + + return line; + }, + + /** + * Returns a Line object that corresponds to the left of this Rectangle. + * + * @method Phaser.Geom.Rectangle#getLineD + * @since 3.0.0 + * + * @generic {Phaser.Geom.Line} O - [line,$return] + * + * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created. + * + * @return {Phaser.Geom.Line} A Line object that corresponds to the left of this Rectangle. + */ + getLineD: function (line) + { + if (line === undefined) { line = new Line(); } + + line.setTo(this.x, this.bottom, this.x, this.y); + + return line; + }, + + /** + * The x coordinate of the left of the Rectangle. + * Changing the left property of a Rectangle object has no effect on the y and height properties. However it does affect the width property, whereas changing the x value does not affect the width property. + * + * @name Phaser.Geom.Rectangle#left + * @type {number} + * @since 3.0.0 + */ + left: { + + get: function () + { + return this.x; + }, + + set: function (value) + { + if (value >= this.right) + { + this.width = 0; + } + else + { + this.width = this.right - value; + } + + this.x = value; + } + + }, + + /** + * The sum of the x and width properties. + * Changing the right property of a Rectangle object has no effect on the x, y and height properties, however it does affect the width property. + * + * @name Phaser.Geom.Rectangle#right + * @type {number} + * @since 3.0.0 + */ + right: { + + get: function () + { + return this.x + this.width; + }, + + set: function (value) + { + if (value <= this.x) + { + this.width = 0; + } + else + { + this.width = value - this.x; + } + } + + }, + + /** + * The y coordinate of the top of the Rectangle. Changing the top property of a Rectangle object has no effect on the x and width properties. + * However it does affect the height property, whereas changing the y value does not affect the height property. + * + * @name Phaser.Geom.Rectangle#top + * @type {number} + * @since 3.0.0 + */ + top: { + + get: function () + { + return this.y; + }, + + set: function (value) + { + if (value >= this.bottom) + { + this.height = 0; + } + else + { + this.height = (this.bottom - value); + } + + this.y = value; + } + + }, + + /** + * The sum of the y and height properties. + * Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property. + * + * @name Phaser.Geom.Rectangle#bottom + * @type {number} + * @since 3.0.0 + */ + bottom: { + + get: function () + { + return this.y + this.height; + }, + + set: function (value) + { + if (value <= this.y) + { + this.height = 0; + } + else + { + this.height = value - this.y; + } + } + + }, + + /** + * The x coordinate of the center of the Rectangle. + * + * @name Phaser.Geom.Rectangle#centerX + * @type {number} + * @since 3.0.0 + */ + centerX: { + + get: function () + { + return this.x + (this.width / 2); + }, + + set: function (value) + { + this.x = value - (this.width / 2); + } + + }, + + /** + * The y coordinate of the center of the Rectangle. + * + * @name Phaser.Geom.Rectangle#centerY + * @type {number} + * @since 3.0.0 + */ + centerY: { + + get: function () + { + return this.y + (this.height / 2); + }, + + set: function (value) + { + this.y = value - (this.height / 2); + } + + } + +}); + +module.exports = Rectangle; + + +/***/ }), +/* 25 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GEOM_CONST = { + + /** + * A Circle Geometry object type. + * + * @name Phaser.Geom.CIRCLE + * @type {integer} + * @since 3.19.0 + */ + CIRCLE: 0, + + /** + * An Ellipse Geometry object type. + * + * @name Phaser.Geom.ELLIPSE + * @type {integer} + * @since 3.19.0 + */ + ELLIPSE: 1, + + /** + * A Line Geometry object type. + * + * @name Phaser.Geom.LINE + * @type {integer} + * @since 3.19.0 + */ + LINE: 2, + + /** + * A Point Geometry object type. + * + * @name Phaser.Geom.POINT + * @type {integer} + * @since 3.19.0 + */ + POINT: 3, + + /** + * A Polygon Geometry object type. + * + * @name Phaser.Geom.POLYGON + * @type {integer} + * @since 3.19.0 + */ + POLYGON: 4, + + /** + * A Rectangle Geometry object type. + * + * @name Phaser.Geom.RECTANGLE + * @type {integer} + * @since 3.19.0 + */ + RECTANGLE: 5, + + /** + * A Triangle Geometry object type. + * + * @name Phaser.Geom.TRIANGLE + * @type {integer} + * @since 3.19.0 + */ + TRIANGLE: 6 + +}; + +module.exports = GEOM_CONST; + + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var IsPlainObject = __webpack_require__(7); // @param {boolean} deep - Perform a deep copy? // @param {object} target - The target object to copy to. @@ -3224,7 +4565,7 @@ module.exports = Extend; /***/ }), -/* 16 */ +/* 27 */ /***/ (function(module, exports) { /** @@ -3255,7 +4596,7 @@ module.exports = Between; /***/ }), -/* 17 */ +/* 28 */ /***/ (function(module, exports) { /** @@ -3292,7 +4633,7 @@ module.exports = Normalize; /***/ }), -/* 18 */ +/* 29 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -3301,7 +4642,7 @@ module.exports = Normalize; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathWrap = __webpack_require__(5); +var MathWrap = __webpack_require__(8); /** * Wrap an angle. @@ -3324,7 +4665,7 @@ module.exports = Wrap; /***/ }), -/* 19 */ +/* 30 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -3333,7 +4674,7 @@ module.exports = Wrap; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Wrap = __webpack_require__(5); +var Wrap = __webpack_require__(8); /** * Wrap an angle in degrees. @@ -3356,7 +4697,7 @@ module.exports = WrapDegrees; /***/ }), -/* 20 */ +/* 31 */ /***/ (function(module, exports) { /** @@ -3390,7 +4731,7 @@ module.exports = Equal; /***/ }), -/* 21 */ +/* 32 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -3399,7 +4740,7 @@ module.exports = Equal; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Factorial = __webpack_require__(22); +var Factorial = __webpack_require__(33); /** * Calculates the Bernstein basis from the three factorial coefficients. @@ -3421,7 +4762,7 @@ module.exports = Bernstein; /***/ }), -/* 22 */ +/* 33 */ /***/ (function(module, exports) { /** @@ -3461,7 +4802,7 @@ module.exports = Factorial; /***/ }), -/* 23 */ +/* 34 */ /***/ (function(module, exports) { /** @@ -3498,7 +4839,7 @@ module.exports = CatmullRom; /***/ }), -/* 24 */ +/* 35 */ /***/ (function(module, exports) { /** @@ -3528,7 +4869,7 @@ module.exports = Linear; /***/ }), -/* 25 */ +/* 36 */ /***/ (function(module, exports) { /** @@ -3575,7 +4916,7 @@ module.exports = SmoothStep; /***/ }), -/* 26 */ +/* 37 */ /***/ (function(module, exports) { /** @@ -3614,8 +4955,8 @@ module.exports = SmootherStep; /***/ }), -/* 27 */ -/***/ (function(module, exports, __webpack_require__) { +/* 38 */ +/***/ (function(module, exports) { /** * @author Richard Davey @@ -3623,28 +4964,71 @@ module.exports = SmootherStep; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(1); - /** - * Convert the given angle from degrees, to the equivalent angle in radians. + * Rotate a `point` around `x` and `y` to the given `angle`, at the same distance. * - * @function Phaser.Math.DegToRad + * In polar notation, this maps a point from (r, t) to (r, angle), vs. the origin (x, y). + * + * @function Phaser.Math.RotateAround * @since 3.0.0 * - * @param {integer} degrees - The angle (in degrees) to convert to radians. + * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return] * - * @return {number} The given angle converted to radians. + * @param {(Phaser.Geom.Point|object)} point - The point to be rotated. + * @param {number} x - The horizontal coordinate to rotate around. + * @param {number} y - The vertical coordinate to rotate around. + * @param {number} angle - The angle of rotation in radians. + * + * @return {Phaser.Types.Math.Vector2Like} The given point. */ -var DegToRad = function (degrees) +var RotateAround = function (point, x, y, angle) { - return degrees * CONST.DEG_TO_RAD; + var c = Math.cos(angle); + var s = Math.sin(angle); + + var tx = point.x - x; + var ty = point.y - y; + + point.x = tx * c - ty * s + x; + point.y = tx * s + ty * c + y; + + return point; }; -module.exports = DegToRad; +module.exports = RotateAround; /***/ }), -/* 28 */ +/* 39 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Round a given number so it is further away from zero. That is, positive numbers are rounded up, and negative numbers are rounded down. + * + * @function Phaser.Math.RoundAwayFromZero + * @since 3.0.0 + * + * @param {number} value - The number to round. + * + * @return {number} The rounded number, rounded away from zero. + */ +var RoundAwayFromZero = function (value) +{ + // "Opposite" of truncate. + return (value > 0) ? Math.ceil(value) : Math.floor(value); +}; + +module.exports = RoundAwayFromZero; + + +/***/ }), +/* 40 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -3653,7 +5037,7 @@ module.exports = DegToRad; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector2 = __webpack_require__(3); +var Vector2 = __webpack_require__(1); /** * Takes the `x` and `y` coordinates and transforms them into the same space as @@ -3699,7 +5083,7 @@ module.exports = TransformXY; /***/ }), -/* 29 */ +/* 41 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -4292,7 +5676,7 @@ module.exports = Matrix3; /***/ }), -/* 30 */ +/* 42 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -5754,7 +7138,7 @@ module.exports = Matrix4; /***/ }), -/* 31 */ +/* 43 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -5767,8 +7151,8 @@ module.exports = Matrix4; // and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl var Class = __webpack_require__(0); -var Vector3 = __webpack_require__(11); -var Matrix3 = __webpack_require__(29); +var Vector3 = __webpack_require__(19); +var Matrix3 = __webpack_require__(41); var EPSILON = 0.000001; @@ -6526,7 +7910,7 @@ module.exports = Quaternion; /***/ }), -/* 32 */ +/* 44 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -6535,8 +7919,8 @@ module.exports = Quaternion; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Extend = __webpack_require__(15); -var XHRSettings = __webpack_require__(33); +var Extend = __webpack_require__(26); +var XHRSettings = __webpack_require__(45); /** * Takes two XHRSettings Objects and creates a new XHRSettings object from them. @@ -6574,7 +7958,7 @@ module.exports = MergeXHRSettings; /***/ }), -/* 33 */ +/* 45 */ /***/ (function(module, exports) { /** @@ -6644,7 +8028,7 @@ module.exports = XHRSettings; /***/ }), -/* 34 */ +/* 46 */ /***/ (function(module, exports) { /** @@ -6654,40 +8038,3690 @@ module.exports = XHRSettings; */ /** - * A NOOP (No Operation) callback function. - * - * Used internally by Phaser when it's more expensive to determine if a callback exists - * than it is to just invoke an empty function. - * - * @function Phaser.Utils.NOOP + * Provides methods used for calculating and setting the size of a non-Frame based Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.ComputedSize * @since 3.0.0 */ -var NOOP = function () -{ - // NOOP + +var ComputedSize = { + + /** + * The native (un-scaled) width of this Game Object. + * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayWidth` property. + * + * @name Phaser.GameObjects.Components.ComputedSize#width + * @type {number} + * @since 3.0.0 + */ + width: 0, + + /** + * The native (un-scaled) height of this Game Object. + * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayHeight` property. + * + * @name Phaser.GameObjects.Components.ComputedSize#height + * @type {number} + * @since 3.0.0 + */ + height: 0, + + /** + * The displayed width of this Game Object. + * + * This value takes into account the scale factor. + * + * Setting this value will adjust the Game Object's scale property. + * + * @name Phaser.GameObjects.Components.ComputedSize#displayWidth + * @type {number} + * @since 3.0.0 + */ + displayWidth: { + + get: function () + { + return this.scaleX * this.width; + }, + + set: function (value) + { + this.scaleX = value / this.width; + } + + }, + + /** + * The displayed height of this Game Object. + * + * This value takes into account the scale factor. + * + * Setting this value will adjust the Game Object's scale property. + * + * @name Phaser.GameObjects.Components.ComputedSize#displayHeight + * @type {number} + * @since 3.0.0 + */ + displayHeight: { + + get: function () + { + return this.scaleY * this.height; + }, + + set: function (value) + { + this.scaleY = value / this.height; + } + + }, + + /** + * Sets the internal size of this Game Object, as used for frame or physics body creation. + * + * This will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or call the + * `setDisplaySize` method, which is the same thing as changing the scale but allows you + * to do so by giving pixel values. + * + * If you have enabled this Game Object for input, changing the size will _not_ change the + * size of the hit area. To do this you should adjust the `input.hitArea` object directly. + * + * @method Phaser.GameObjects.Components.ComputedSize#setSize + * @since 3.4.0 + * + * @param {number} width - The width of this Game Object. + * @param {number} height - The height of this Game Object. + * + * @return {this} This Game Object instance. + */ + setSize: function (width, height) + { + this.width = width; + this.height = height; + + return this; + }, + + /** + * Sets the display size of this Game Object. + * + * Calling this will adjust the scale. + * + * @method Phaser.GameObjects.Components.ComputedSize#setDisplaySize + * @since 3.4.0 + * + * @param {number} width - The width of this Game Object. + * @param {number} height - The height of this Game Object. + * + * @return {this} This Game Object instance. + */ + setDisplaySize: function (width, height) + { + this.displayWidth = width; + this.displayHeight = height; + + return this; + } + }; -module.exports = NOOP; +module.exports = ComputedSize; /***/ }), -/* 35 */ +/* 47 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for setting the depth of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.Depth + * @since 3.0.0 + */ + +var Depth = { + + /** + * Private internal value. Holds the depth of the Game Object. + * + * @name Phaser.GameObjects.Components.Depth#_depth + * @type {integer} + * @private + * @default 0 + * @since 3.0.0 + */ + _depth: 0, + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The default depth is zero. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * + * @name Phaser.GameObjects.Components.Depth#depth + * @type {number} + * @since 3.0.0 + */ + depth: { + + get: function () + { + return this._depth; + }, + + set: function (value) + { + this.scene.sys.queueDepthSort(); + this._depth = value; + } + + }, + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The default depth is zero. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * + * @method Phaser.GameObjects.Components.Depth#setDepth + * @since 3.0.0 + * + * @param {integer} value - The depth of this Game Object. + * + * @return {this} This Game Object instance. + */ + setDepth: function (value) + { + if (value === undefined) { value = 0; } + + this.depth = value; + + return this; + } + +}; + +module.exports = Depth; + + +/***/ }), +/* 48 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for visually flipping a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.Flip + * @since 3.0.0 + */ + +var Flip = { + + /** + * The horizontally flipped state of the Game Object. + * + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + * + * @name Phaser.GameObjects.Components.Flip#flipX + * @type {boolean} + * @default false + * @since 3.0.0 + */ + flipX: false, + + /** + * The vertically flipped state of the Game Object. + * + * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + * + * @name Phaser.GameObjects.Components.Flip#flipY + * @type {boolean} + * @default false + * @since 3.0.0 + */ + flipY: false, + + /** + * Toggles the horizontal flipped state of this Game Object. + * + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + * + * @method Phaser.GameObjects.Components.Flip#toggleFlipX + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + toggleFlipX: function () + { + this.flipX = !this.flipX; + + return this; + }, + + /** + * Toggles the vertical flipped state of this Game Object. + * + * @method Phaser.GameObjects.Components.Flip#toggleFlipY + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + toggleFlipY: function () + { + this.flipY = !this.flipY; + + return this; + }, + + /** + * Sets the horizontal flipped state of this Game Object. + * + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + * + * @method Phaser.GameObjects.Components.Flip#setFlipX + * @since 3.0.0 + * + * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped. + * + * @return {this} This Game Object instance. + */ + setFlipX: function (value) + { + this.flipX = value; + + return this; + }, + + /** + * Sets the vertical flipped state of this Game Object. + * + * @method Phaser.GameObjects.Components.Flip#setFlipY + * @since 3.0.0 + * + * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped. + * + * @return {this} This Game Object instance. + */ + setFlipY: function (value) + { + this.flipY = value; + + return this; + }, + + /** + * Sets the horizontal and vertical flipped state of this Game Object. + * + * A Game Object that is flipped will render inversed on the flipped axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + * + * @method Phaser.GameObjects.Components.Flip#setFlip + * @since 3.0.0 + * + * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped. + * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped. + * + * @return {this} This Game Object instance. + */ + setFlip: function (x, y) + { + this.flipX = x; + this.flipY = y; + + return this; + }, + + /** + * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state. + * + * @method Phaser.GameObjects.Components.Flip#resetFlip + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + resetFlip: function () + { + this.flipX = false; + this.flipY = false; + + return this; + } + +}; + +module.exports = Flip; + + +/***/ }), +/* 49 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for getting and setting the Scroll Factor of a Game Object. + * + * @namespace Phaser.GameObjects.Components.ScrollFactor + * @since 3.0.0 + */ + +var ScrollFactor = { + + /** + * 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. + * + * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorX + * @type {number} + * @default 1 + * @since 3.0.0 + */ + scrollFactorX: 1, + + /** + * 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. + * + * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorY + * @type {number} + * @default 1 + * @since 3.0.0 + */ + scrollFactorY: 1, + + /** + * 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. + * + * @method Phaser.GameObjects.Components.ScrollFactor#setScrollFactor + * @since 3.0.0 + * + * @param {number} x - The horizontal scroll factor of this Game Object. + * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value. + * + * @return {this} This Game Object instance. + */ + setScrollFactor: function (x, y) + { + if (y === undefined) { y = x; } + + this.scrollFactorX = x; + this.scrollFactorY = y; + + return this; + } + +}; + +module.exports = ScrollFactor; + + +/***/ }), +/* 50 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var MATH_CONST = __webpack_require__(2); +var TransformMatrix = __webpack_require__(51); +var TransformXY = __webpack_require__(40); +var WrapAngle = __webpack_require__(29); +var WrapAngleDegrees = __webpack_require__(30); +var Vector2 = __webpack_require__(1); + +// global bitmask flag for GameObject.renderMask (used by Scale) +var _FLAG = 4; // 0100 + +/** + * Provides methods used for getting and setting the position, scale and rotation of a Game Object. + * + * @namespace Phaser.GameObjects.Components.Transform + * @since 3.0.0 + */ + +var Transform = { + + /** + * Private internal value. Holds the horizontal scale value. + * + * @name Phaser.GameObjects.Components.Transform#_scaleX + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _scaleX: 1, + + /** + * Private internal value. Holds the vertical scale value. + * + * @name Phaser.GameObjects.Components.Transform#_scaleY + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _scaleY: 1, + + /** + * Private internal value. Holds the rotation value in radians. + * + * @name Phaser.GameObjects.Components.Transform#_rotation + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + _rotation: 0, + + /** + * The x position of this Game Object. + * + * @name Phaser.GameObjects.Components.Transform#x + * @type {number} + * @default 0 + * @since 3.0.0 + */ + x: 0, + + /** + * The y position of this Game Object. + * + * @name Phaser.GameObjects.Components.Transform#y + * @type {number} + * @default 0 + * @since 3.0.0 + */ + y: 0, + + /** + * The z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. + * + * @name Phaser.GameObjects.Components.Transform#z + * @type {number} + * @default 0 + * @since 3.0.0 + */ + z: 0, + + /** + * The w position of this Game Object. + * + * @name Phaser.GameObjects.Components.Transform#w + * @type {number} + * @default 0 + * @since 3.0.0 + */ + w: 0, + + /** + * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object + * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`. + * + * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this + * isn't the case, use the `scaleX` or `scaleY` properties instead. + * + * @name Phaser.GameObjects.Components.Transform#scale + * @type {number} + * @default 1 + * @since 3.18.0 + */ + scale: { + + get: function () + { + return (this._scaleX + this._scaleY) / 2; + }, + + set: function (value) + { + this._scaleX = value; + this._scaleY = value; + + if (value === 0) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The horizontal scale of this Game Object. + * + * @name Phaser.GameObjects.Components.Transform#scaleX + * @type {number} + * @default 1 + * @since 3.0.0 + */ + scaleX: { + + get: function () + { + return this._scaleX; + }, + + set: function (value) + { + this._scaleX = value; + + if (value === 0) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The vertical scale of this Game Object. + * + * @name Phaser.GameObjects.Components.Transform#scaleY + * @type {number} + * @default 1 + * @since 3.0.0 + */ + scaleY: { + + get: function () + { + return this._scaleY; + }, + + set: function (value) + { + this._scaleY = value; + + if (value === 0) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The angle of this Game Object as expressed in degrees. + * + * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left + * and -90 is up. + * + * If you prefer to work in radians, see the `rotation` property instead. + * + * @name Phaser.GameObjects.Components.Transform#angle + * @type {integer} + * @default 0 + * @since 3.0.0 + */ + angle: { + + get: function () + { + return WrapAngleDegrees(this._rotation * MATH_CONST.RAD_TO_DEG); + }, + + set: function (value) + { + // value is in degrees + this.rotation = WrapAngleDegrees(value) * MATH_CONST.DEG_TO_RAD; + } + }, + + /** + * The angle of this Game Object in radians. + * + * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left + * and -PI/2 is up. + * + * If you prefer to work in degrees, see the `angle` property instead. + * + * @name Phaser.GameObjects.Components.Transform#rotation + * @type {number} + * @default 1 + * @since 3.0.0 + */ + rotation: { + + get: function () + { + return this._rotation; + }, + + set: function (value) + { + // value is in radians + this._rotation = WrapAngle(value); + } + }, + + /** + * Sets the position of this Game Object. + * + * @method Phaser.GameObjects.Components.Transform#setPosition + * @since 3.0.0 + * + * @param {number} [x=0] - The x position of this Game Object. + * @param {number} [y=x] - The y position of this Game Object. If not set it will use the `x` value. + * @param {number} [z=0] - The z position of this Game Object. + * @param {number} [w=0] - The w position of this Game Object. + * + * @return {this} This Game Object instance. + */ + setPosition: function (x, y, z, w) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = x; } + if (z === undefined) { z = 0; } + if (w === undefined) { w = 0; } + + this.x = x; + this.y = y; + this.z = z; + this.w = w; + + return this; + }, + + /** + * Sets the position of this Game Object to be a random position within the confines of + * the given area. + * + * If no area is specified a random position between 0 x 0 and the game width x height is used instead. + * + * The position does not factor in the size of this Game Object, meaning that only the origin is + * guaranteed to be within the area. + * + * @method Phaser.GameObjects.Components.Transform#setRandomPosition + * @since 3.8.0 + * + * @param {number} [x=0] - The x position of the top-left of the random area. + * @param {number} [y=0] - The y position of the top-left of the random area. + * @param {number} [width] - The width of the random area. + * @param {number} [height] - The height of the random area. + * + * @return {this} This Game Object instance. + */ + setRandomPosition: function (x, y, width, height) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + if (width === undefined) { width = this.scene.sys.scale.width; } + if (height === undefined) { height = this.scene.sys.scale.height; } + + this.x = x + (Math.random() * width); + this.y = y + (Math.random() * height); + + return this; + }, + + /** + * Sets the rotation of this Game Object. + * + * @method Phaser.GameObjects.Components.Transform#setRotation + * @since 3.0.0 + * + * @param {number} [radians=0] - The rotation of this Game Object, in radians. + * + * @return {this} This Game Object instance. + */ + setRotation: function (radians) + { + if (radians === undefined) { radians = 0; } + + this.rotation = radians; + + return this; + }, + + /** + * Sets the angle of this Game Object. + * + * @method Phaser.GameObjects.Components.Transform#setAngle + * @since 3.0.0 + * + * @param {number} [degrees=0] - The rotation of this Game Object, in degrees. + * + * @return {this} This Game Object instance. + */ + setAngle: function (degrees) + { + if (degrees === undefined) { degrees = 0; } + + this.angle = degrees; + + return this; + }, + + /** + * Sets the scale of this Game Object. + * + * @method Phaser.GameObjects.Components.Transform#setScale + * @since 3.0.0 + * + * @param {number} x - 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. + */ + setScale: function (x, y) + { + if (x === undefined) { x = 1; } + if (y === undefined) { y = x; } + + this.scaleX = x; + this.scaleY = y; + + return this; + }, + + /** + * Sets the x position of this Game Object. + * + * @method Phaser.GameObjects.Components.Transform#setX + * @since 3.0.0 + * + * @param {number} [value=0] - The x position of this Game Object. + * + * @return {this} This Game Object instance. + */ + setX: function (value) + { + if (value === undefined) { value = 0; } + + this.x = value; + + return this; + }, + + /** + * Sets the y position of this Game Object. + * + * @method Phaser.GameObjects.Components.Transform#setY + * @since 3.0.0 + * + * @param {number} [value=0] - The y position of this Game Object. + * + * @return {this} This Game Object instance. + */ + setY: function (value) + { + if (value === undefined) { value = 0; } + + this.y = value; + + return this; + }, + + /** + * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. + * + * @method Phaser.GameObjects.Components.Transform#setZ + * @since 3.0.0 + * + * @param {number} [value=0] - The z position of this Game Object. + * + * @return {this} This Game Object instance. + */ + setZ: function (value) + { + if (value === undefined) { value = 0; } + + this.z = value; + + return this; + }, + + /** + * Sets the w position of this Game Object. + * + * @method Phaser.GameObjects.Components.Transform#setW + * @since 3.0.0 + * + * @param {number} [value=0] - The w position of this Game Object. + * + * @return {this} This Game Object instance. + */ + setW: function (value) + { + if (value === undefined) { value = 0; } + + this.w = value; + + return this; + }, + + /** + * Gets the local transform matrix for this Game Object. + * + * @method Phaser.GameObjects.Components.Transform#getLocalTransformMatrix + * @since 3.4.0 + * + * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object. + * + * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix. + */ + getLocalTransformMatrix: function (tempMatrix) + { + if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); } + + return tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY); + }, + + /** + * Gets the world transform matrix for this Game Object, factoring in any parent Containers. + * + * @method Phaser.GameObjects.Components.Transform#getWorldTransformMatrix + * @since 3.4.0 + * + * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object. + * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A temporary matrix to hold parent values during the calculations. + * + * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix. + */ + getWorldTransformMatrix: function (tempMatrix, parentMatrix) + { + if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); } + if (parentMatrix === undefined) { parentMatrix = new TransformMatrix(); } + + var parent = this.parentContainer; + + if (!parent) + { + return this.getLocalTransformMatrix(tempMatrix); + } + + tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY); + + while (parent) + { + parentMatrix.applyITRS(parent.x, parent.y, parent._rotation, parent._scaleX, parent._scaleY); + + parentMatrix.multiply(tempMatrix, tempMatrix); + + parent = parent.parentContainer; + } + + return tempMatrix; + }, + + /** + * Takes the given `x` and `y` coordinates and converts them into local space for this + * Game Object, taking into account parent and local transforms, and the Display Origin. + * + * The returned Vector2 contains the translated point in its properties. + * + * A Camera needs to be provided in order to handle modified scroll factors. If no + * camera is specified, it will use the `main` camera from the Scene to which this + * Game Object belongs. + * + * @method Phaser.GameObjects.Components.Transform#getLocalPoint + * @since 3.50.0 + * + * @param {number} x - The x position to translate. + * @param {number} y - The y position to translate. + * @param {Phaser.Math.Vector2} [point] - A Vector2, or point-like object, to store the results in. + * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera which is being tested against. If not given will use the Scene default camera. + * + * @return {Phaser.Math.Vector2} The translated point. + */ + getLocalPoint: function (x, y, point, camera) + { + if (!point) { point = new Vector2(); } + if (!camera) { camera = this.scene.sys.cameras.main; } + + var csx = camera.scrollX; + var csy = camera.scrollY; + + var px = x + (csx * this.scrollFactorX) - csx; + var py = y + (csy * this.scrollFactorY) - csy; + + if (this.parentContainer) + { + this.getWorldTransformMatrix().applyInverse(px, py, point); + } + else + { + TransformXY(px, py, this.x, this.y, this.rotation, this.scaleX, this.scaleY, point); + } + + // Normalize origin + if (this._originComponent) + { + point.x += this._displayOriginX; + point.y += this._displayOriginY; + } + + return point; + }, + + /** + * Gets the sum total rotation of all of this Game Objects parent Containers. + * + * The returned value is in radians and will be zero if this Game Object has no parent container. + * + * @method Phaser.GameObjects.Components.Transform#getParentRotation + * @since 3.18.0 + * + * @return {number} The sum total rotation, in radians, of all parent containers of this Game Object. + */ + getParentRotation: function () + { + var rotation = 0; + + var parent = this.parentContainer; + + while (parent) + { + rotation += parent.rotation; + + parent = parent.parentContainer; + } + + return rotation; + } + +}; + +module.exports = Transform; + + +/***/ }), +/* 51 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var MATH_CONST = __webpack_require__(2); +var Vector2 = __webpack_require__(1); + +/** + * @classdesc + * A Matrix used for display transformations for rendering. + * + * It is represented like so: + * + * ``` + * | a | c | tx | + * | b | d | ty | + * | 0 | 0 | 1 | + * ``` + * + * @class TransformMatrix + * @memberof Phaser.GameObjects.Components + * @constructor + * @since 3.0.0 + * + * @param {number} [a=1] - The Scale X value. + * @param {number} [b=0] - The Skew Y value. + * @param {number} [c=0] - The Skew X value. + * @param {number} [d=1] - The Scale Y value. + * @param {number} [tx=0] - The Translate X value. + * @param {number} [ty=0] - The Translate Y value. + */ +var TransformMatrix = new Class({ + + initialize: + + function TransformMatrix (a, b, c, d, tx, ty) + { + if (a === undefined) { a = 1; } + if (b === undefined) { b = 0; } + if (c === undefined) { c = 0; } + if (d === undefined) { d = 1; } + if (tx === undefined) { tx = 0; } + if (ty === undefined) { ty = 0; } + + /** + * The matrix values. + * + * @name Phaser.GameObjects.Components.TransformMatrix#matrix + * @type {Float32Array} + * @since 3.0.0 + */ + this.matrix = new Float32Array([ a, b, c, d, tx, ty, 0, 0, 1 ]); + + /** + * The decomposed matrix. + * + * @name Phaser.GameObjects.Components.TransformMatrix#decomposedMatrix + * @type {object} + * @since 3.0.0 + */ + this.decomposedMatrix = { + translateX: 0, + translateY: 0, + scaleX: 1, + scaleY: 1, + rotation: 0 + }; + }, + + /** + * The Scale X value. + * + * @name Phaser.GameObjects.Components.TransformMatrix#a + * @type {number} + * @since 3.4.0 + */ + a: { + + get: function () + { + return this.matrix[0]; + }, + + set: function (value) + { + this.matrix[0] = value; + } + + }, + + /** + * The Skew Y value. + * + * @name Phaser.GameObjects.Components.TransformMatrix#b + * @type {number} + * @since 3.4.0 + */ + b: { + + get: function () + { + return this.matrix[1]; + }, + + set: function (value) + { + this.matrix[1] = value; + } + + }, + + /** + * The Skew X value. + * + * @name Phaser.GameObjects.Components.TransformMatrix#c + * @type {number} + * @since 3.4.0 + */ + c: { + + get: function () + { + return this.matrix[2]; + }, + + set: function (value) + { + this.matrix[2] = value; + } + + }, + + /** + * The Scale Y value. + * + * @name Phaser.GameObjects.Components.TransformMatrix#d + * @type {number} + * @since 3.4.0 + */ + d: { + + get: function () + { + return this.matrix[3]; + }, + + set: function (value) + { + this.matrix[3] = value; + } + + }, + + /** + * The Translate X value. + * + * @name Phaser.GameObjects.Components.TransformMatrix#e + * @type {number} + * @since 3.11.0 + */ + e: { + + get: function () + { + return this.matrix[4]; + }, + + set: function (value) + { + this.matrix[4] = value; + } + + }, + + /** + * The Translate Y value. + * + * @name Phaser.GameObjects.Components.TransformMatrix#f + * @type {number} + * @since 3.11.0 + */ + f: { + + get: function () + { + return this.matrix[5]; + }, + + set: function (value) + { + this.matrix[5] = value; + } + + }, + + /** + * The Translate X value. + * + * @name Phaser.GameObjects.Components.TransformMatrix#tx + * @type {number} + * @since 3.4.0 + */ + tx: { + + get: function () + { + return this.matrix[4]; + }, + + set: function (value) + { + this.matrix[4] = value; + } + + }, + + /** + * The Translate Y value. + * + * @name Phaser.GameObjects.Components.TransformMatrix#ty + * @type {number} + * @since 3.4.0 + */ + ty: { + + get: function () + { + return this.matrix[5]; + }, + + set: function (value) + { + this.matrix[5] = value; + } + + }, + + /** + * The rotation of the Matrix. Value is in radians. + * + * @name Phaser.GameObjects.Components.TransformMatrix#rotation + * @type {number} + * @readonly + * @since 3.4.0 + */ + rotation: { + + get: function () + { + return Math.acos(this.a / this.scaleX) * ((Math.atan(-this.c / this.a) < 0) ? -1 : 1); + } + + }, + + /** + * The rotation of the Matrix, normalized to be within the Phaser right-handed + * clockwise rotation space. Value is in radians. + * + * @name Phaser.GameObjects.Components.TransformMatrix#rotationNormalized + * @type {number} + * @readonly + * @since 3.19.0 + */ + rotationNormalized: { + + get: function () + { + var matrix = this.matrix; + + var a = matrix[0]; + var b = matrix[1]; + var c = matrix[2]; + var d = matrix[3]; + + if (a || b) + { + // var r = Math.sqrt(a * a + b * b); + + return (b > 0) ? Math.acos(a / this.scaleX) : -Math.acos(a / this.scaleX); + } + else if (c || d) + { + // var s = Math.sqrt(c * c + d * d); + + return MATH_CONST.TAU - ((d > 0) ? Math.acos(-c / this.scaleY) : -Math.acos(c / this.scaleY)); + } + else + { + return 0; + } + } + + }, + + /** + * The decomposed horizontal scale of the Matrix. This value is always positive. + * + * @name Phaser.GameObjects.Components.TransformMatrix#scaleX + * @type {number} + * @readonly + * @since 3.4.0 + */ + scaleX: { + + get: function () + { + return Math.sqrt((this.a * this.a) + (this.b * this.b)); + } + + }, + + /** + * The decomposed vertical scale of the Matrix. This value is always positive. + * + * @name Phaser.GameObjects.Components.TransformMatrix#scaleY + * @type {number} + * @readonly + * @since 3.4.0 + */ + scaleY: { + + get: function () + { + return Math.sqrt((this.c * this.c) + (this.d * this.d)); + } + + }, + + /** + * Reset the Matrix to an identity matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#loadIdentity + * @since 3.0.0 + * + * @return {this} This TransformMatrix. + */ + loadIdentity: function () + { + var matrix = this.matrix; + + matrix[0] = 1; + matrix[1] = 0; + matrix[2] = 0; + matrix[3] = 1; + matrix[4] = 0; + matrix[5] = 0; + + return this; + }, + + /** + * Translate the Matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#translate + * @since 3.0.0 + * + * @param {number} x - The horizontal translation value. + * @param {number} y - The vertical translation value. + * + * @return {this} This TransformMatrix. + */ + translate: function (x, y) + { + var matrix = this.matrix; + + matrix[4] = matrix[0] * x + matrix[2] * y + matrix[4]; + matrix[5] = matrix[1] * x + matrix[3] * y + matrix[5]; + + return this; + }, + + /** + * Scale the Matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#scale + * @since 3.0.0 + * + * @param {number} x - The horizontal scale value. + * @param {number} y - The vertical scale value. + * + * @return {this} This TransformMatrix. + */ + scale: function (x, y) + { + var matrix = this.matrix; + + matrix[0] *= x; + matrix[1] *= x; + matrix[2] *= y; + matrix[3] *= y; + + return this; + }, + + /** + * Rotate the Matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#rotate + * @since 3.0.0 + * + * @param {number} angle - The angle of rotation in radians. + * + * @return {this} This TransformMatrix. + */ + rotate: function (angle) + { + var sin = Math.sin(angle); + var cos = Math.cos(angle); + + var matrix = this.matrix; + + var a = matrix[0]; + var b = matrix[1]; + var c = matrix[2]; + var d = matrix[3]; + + matrix[0] = a * cos + c * sin; + matrix[1] = b * cos + d * sin; + matrix[2] = a * -sin + c * cos; + matrix[3] = b * -sin + d * cos; + + return this; + }, + + /** + * Multiply this Matrix by the given Matrix. + * + * If an `out` Matrix is given then the results will be stored in it. + * If it is not given, this matrix will be updated in place instead. + * Use an `out` Matrix if you do not wish to mutate this matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#multiply + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by. + * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in. + * + * @return {(this|Phaser.GameObjects.Components.TransformMatrix)} Either this TransformMatrix, or the `out` Matrix, if given in the arguments. + */ + multiply: function (rhs, out) + { + var matrix = this.matrix; + var source = rhs.matrix; + + var localA = matrix[0]; + var localB = matrix[1]; + var localC = matrix[2]; + var localD = matrix[3]; + var localE = matrix[4]; + var localF = matrix[5]; + + var sourceA = source[0]; + var sourceB = source[1]; + var sourceC = source[2]; + var sourceD = source[3]; + var sourceE = source[4]; + var sourceF = source[5]; + + var destinationMatrix = (out === undefined) ? this : out; + + destinationMatrix.a = (sourceA * localA) + (sourceB * localC); + destinationMatrix.b = (sourceA * localB) + (sourceB * localD); + destinationMatrix.c = (sourceC * localA) + (sourceD * localC); + destinationMatrix.d = (sourceC * localB) + (sourceD * localD); + destinationMatrix.e = (sourceE * localA) + (sourceF * localC) + localE; + destinationMatrix.f = (sourceE * localB) + (sourceF * localD) + localF; + + return destinationMatrix; + }, + + /** + * Multiply this Matrix by the matrix given, including the offset. + * + * The offsetX is added to the tx value: `offsetX * a + offsetY * c + tx`. + * The offsetY is added to the ty value: `offsetY * b + offsetY * d + ty`. + * + * @method Phaser.GameObjects.Components.TransformMatrix#multiplyWithOffset + * @since 3.11.0 + * + * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from. + * @param {number} offsetX - Horizontal offset to factor in to the multiplication. + * @param {number} offsetY - Vertical offset to factor in to the multiplication. + * + * @return {this} This TransformMatrix. + */ + multiplyWithOffset: function (src, offsetX, offsetY) + { + var matrix = this.matrix; + var otherMatrix = src.matrix; + + var a0 = matrix[0]; + var b0 = matrix[1]; + var c0 = matrix[2]; + var d0 = matrix[3]; + var tx0 = matrix[4]; + var ty0 = matrix[5]; + + var pse = offsetX * a0 + offsetY * c0 + tx0; + var psf = offsetX * b0 + offsetY * d0 + ty0; + + var a1 = otherMatrix[0]; + var b1 = otherMatrix[1]; + var c1 = otherMatrix[2]; + var d1 = otherMatrix[3]; + var tx1 = otherMatrix[4]; + var ty1 = otherMatrix[5]; + + matrix[0] = a1 * a0 + b1 * c0; + matrix[1] = a1 * b0 + b1 * d0; + matrix[2] = c1 * a0 + d1 * c0; + matrix[3] = c1 * b0 + d1 * d0; + matrix[4] = tx1 * a0 + ty1 * c0 + pse; + matrix[5] = tx1 * b0 + ty1 * d0 + psf; + + return this; + }, + + /** + * Transform the Matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#transform + * @since 3.0.0 + * + * @param {number} a - The Scale X value. + * @param {number} b - The Shear Y value. + * @param {number} c - The Shear X value. + * @param {number} d - The Scale Y value. + * @param {number} tx - The Translate X value. + * @param {number} ty - The Translate Y value. + * + * @return {this} This TransformMatrix. + */ + transform: function (a, b, c, d, tx, ty) + { + var matrix = this.matrix; + + var a0 = matrix[0]; + var b0 = matrix[1]; + var c0 = matrix[2]; + var d0 = matrix[3]; + var tx0 = matrix[4]; + var ty0 = matrix[5]; + + matrix[0] = a * a0 + b * c0; + matrix[1] = a * b0 + b * d0; + matrix[2] = c * a0 + d * c0; + matrix[3] = c * b0 + d * d0; + matrix[4] = tx * a0 + ty * c0 + tx0; + matrix[5] = tx * b0 + ty * d0 + ty0; + + return this; + }, + + /** + * Transform a point using this Matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#transformPoint + * @since 3.0.0 + * + * @param {number} x - The x coordinate of the point to transform. + * @param {number} y - The y coordinate of the point to transform. + * @param {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} point - The Point object to store the transformed coordinates. + * + * @return {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} The Point containing the transformed coordinates. + */ + transformPoint: function (x, y, point) + { + if (point === undefined) { point = { x: 0, y: 0 }; } + + var matrix = this.matrix; + + var a = matrix[0]; + var b = matrix[1]; + var c = matrix[2]; + var d = matrix[3]; + var tx = matrix[4]; + var ty = matrix[5]; + + point.x = x * a + y * c + tx; + point.y = x * b + y * d + ty; + + return point; + }, + + /** + * Invert the Matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#invert + * @since 3.0.0 + * + * @return {this} This TransformMatrix. + */ + invert: function () + { + var matrix = this.matrix; + + var a = matrix[0]; + var b = matrix[1]; + var c = matrix[2]; + var d = matrix[3]; + var tx = matrix[4]; + var ty = matrix[5]; + + var n = a * d - b * c; + + matrix[0] = d / n; + matrix[1] = -b / n; + matrix[2] = -c / n; + matrix[3] = a / n; + matrix[4] = (c * ty - d * tx) / n; + matrix[5] = -(a * ty - b * tx) / n; + + return this; + }, + + /** + * Set the values of this Matrix to copy those of the matrix given. + * + * @method Phaser.GameObjects.Components.TransformMatrix#copyFrom + * @since 3.11.0 + * + * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from. + * + * @return {this} This TransformMatrix. + */ + copyFrom: function (src) + { + var matrix = this.matrix; + + matrix[0] = src.a; + matrix[1] = src.b; + matrix[2] = src.c; + matrix[3] = src.d; + matrix[4] = src.e; + matrix[5] = src.f; + + return this; + }, + + /** + * Set the values of this Matrix to copy those of the array given. + * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f. + * + * @method Phaser.GameObjects.Components.TransformMatrix#copyFromArray + * @since 3.11.0 + * + * @param {array} src - The array of values to set into this matrix. + * + * @return {this} This TransformMatrix. + */ + copyFromArray: function (src) + { + var matrix = this.matrix; + + matrix[0] = src[0]; + matrix[1] = src[1]; + matrix[2] = src[2]; + matrix[3] = src[3]; + matrix[4] = src[4]; + matrix[5] = src[5]; + + return this; + }, + + /** + * Copy the values from this Matrix to the given Canvas Rendering Context. + * This will use the Context.transform method. + * + * @method Phaser.GameObjects.Components.TransformMatrix#copyToContext + * @since 3.12.0 + * + * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to. + * + * @return {CanvasRenderingContext2D} The Canvas Rendering Context. + */ + copyToContext: function (ctx) + { + var matrix = this.matrix; + + ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); + + return ctx; + }, + + /** + * Copy the values from this Matrix to the given Canvas Rendering Context. + * This will use the Context.setTransform method. + * + * @method Phaser.GameObjects.Components.TransformMatrix#setToContext + * @since 3.12.0 + * + * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to. + * + * @return {CanvasRenderingContext2D} The Canvas Rendering Context. + */ + setToContext: function (ctx) + { + var matrix = this.matrix; + + ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); + + return ctx; + }, + + /** + * Copy the values in this Matrix to the array given. + * + * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f. + * + * @method Phaser.GameObjects.Components.TransformMatrix#copyToArray + * @since 3.12.0 + * + * @param {array} [out] - The array to copy the matrix values in to. + * + * @return {array} An array where elements 0 to 5 contain the values from this matrix. + */ + copyToArray: function (out) + { + var matrix = this.matrix; + + if (out === undefined) + { + out = [ matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5] ]; + } + else + { + out[0] = matrix[0]; + out[1] = matrix[1]; + out[2] = matrix[2]; + out[3] = matrix[3]; + out[4] = matrix[4]; + out[5] = matrix[5]; + } + + return out; + }, + + /** + * Set the values of this Matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#setTransform + * @since 3.0.0 + * + * @param {number} a - The Scale X value. + * @param {number} b - The Shear Y value. + * @param {number} c - The Shear X value. + * @param {number} d - The Scale Y value. + * @param {number} tx - The Translate X value. + * @param {number} ty - The Translate Y value. + * + * @return {this} This TransformMatrix. + */ + setTransform: function (a, b, c, d, tx, ty) + { + var matrix = this.matrix; + + matrix[0] = a; + matrix[1] = b; + matrix[2] = c; + matrix[3] = d; + matrix[4] = tx; + matrix[5] = ty; + + return this; + }, + + /** + * Decompose this Matrix into its translation, scale and rotation values using QR decomposition. + * + * The result must be applied in the following order to reproduce the current matrix: + * + * translate -> rotate -> scale + * + * @method Phaser.GameObjects.Components.TransformMatrix#decomposeMatrix + * @since 3.0.0 + * + * @return {object} The decomposed Matrix. + */ + decomposeMatrix: function () + { + var decomposedMatrix = this.decomposedMatrix; + + var matrix = this.matrix; + + // a = scale X (1) + // b = shear Y (0) + // c = shear X (0) + // d = scale Y (1) + + var a = matrix[0]; + var b = matrix[1]; + var c = matrix[2]; + var d = matrix[3]; + + var determ = a * d - b * c; + + decomposedMatrix.translateX = matrix[4]; + decomposedMatrix.translateY = matrix[5]; + + if (a || b) + { + var r = Math.sqrt(a * a + b * b); + + decomposedMatrix.rotation = (b > 0) ? Math.acos(a / r) : -Math.acos(a / r); + decomposedMatrix.scaleX = r; + decomposedMatrix.scaleY = determ / r; + } + else if (c || d) + { + var s = Math.sqrt(c * c + d * d); + + decomposedMatrix.rotation = Math.PI * 0.5 - (d > 0 ? Math.acos(-c / s) : -Math.acos(c / s)); + decomposedMatrix.scaleX = determ / s; + decomposedMatrix.scaleY = s; + } + else + { + decomposedMatrix.rotation = 0; + decomposedMatrix.scaleX = 0; + decomposedMatrix.scaleY = 0; + } + + return decomposedMatrix; + }, + + /** + * Apply the identity, translate, rotate and scale operations on the Matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#applyITRS + * @since 3.0.0 + * + * @param {number} x - The horizontal translation. + * @param {number} y - The vertical translation. + * @param {number} rotation - The angle of rotation in radians. + * @param {number} scaleX - The horizontal scale. + * @param {number} scaleY - The vertical scale. + * + * @return {this} This TransformMatrix. + */ + applyITRS: function (x, y, rotation, scaleX, scaleY) + { + var matrix = this.matrix; + + var radianSin = Math.sin(rotation); + var radianCos = Math.cos(rotation); + + // Translate + matrix[4] = x; + matrix[5] = y; + + // Rotate and Scale + matrix[0] = radianCos * scaleX; + matrix[1] = radianSin * scaleX; + matrix[2] = -radianSin * scaleY; + matrix[3] = radianCos * scaleY; + + return this; + }, + + /** + * Takes the `x` and `y` values and returns a new position in the `output` vector that is the inverse of + * the current matrix with its transformation applied. + * + * Can be used to translate points from world to local space. + * + * @method Phaser.GameObjects.Components.TransformMatrix#applyInverse + * @since 3.12.0 + * + * @param {number} x - The x position to translate. + * @param {number} y - The y position to translate. + * @param {Phaser.Math.Vector2} [output] - A Vector2, or point-like object, to store the results in. + * + * @return {Phaser.Math.Vector2} The coordinates, inverse-transformed through this matrix. + */ + applyInverse: function (x, y, output) + { + if (output === undefined) { output = new Vector2(); } + + var matrix = this.matrix; + + var a = matrix[0]; + var b = matrix[1]; + var c = matrix[2]; + var d = matrix[3]; + var tx = matrix[4]; + var ty = matrix[5]; + + var id = 1 / ((a * d) + (c * -b)); + + output.x = (d * id * x) + (-c * id * y) + (((ty * c) - (tx * d)) * id); + output.y = (a * id * y) + (-b * id * x) + (((-ty * a) + (tx * b)) * id); + + return output; + }, + + /** + * Returns the X component of this matrix multiplied by the given values. + * This is the same as `x * a + y * c + e`. + * + * @method Phaser.GameObjects.Components.TransformMatrix#getX + * @since 3.12.0 + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * + * @return {number} The calculated x value. + */ + getX: function (x, y) + { + return x * this.a + y * this.c + this.e; + }, + + /** + * Returns the Y component of this matrix multiplied by the given values. + * This is the same as `x * b + y * d + f`. + * + * @method Phaser.GameObjects.Components.TransformMatrix#getY + * @since 3.12.0 + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * + * @return {number} The calculated y value. + */ + getY: function (x, y) + { + return x * this.b + y * this.d + this.f; + }, + + /** + * Returns the X component of this matrix multiplied by the given values. + * + * This is the same as `x * a + y * c + e`, optionally passing via `Math.round`. + * + * @method Phaser.GameObjects.Components.TransformMatrix#getXRound + * @since 3.50.0 + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * @param {boolean} [round=false] - Math.round the resulting value? + * + * @return {number} The calculated x value. + */ + getXRound: function (x, y, round) + { + var v = this.getX(x, y); + + if (round) + { + v = Math.round(v); + } + + return v; + }, + + /** + * Returns the Y component of this matrix multiplied by the given values. + * + * This is the same as `x * b + y * d + f`, optionally passing via `Math.round`. + * + * @method Phaser.GameObjects.Components.TransformMatrix#getYRound + * @since 3.50.0 + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * @param {boolean} [round=false] - Math.round the resulting value? + * + * @return {number} The calculated y value. + */ + getYRound: function (x, y, round) + { + var v = this.getY(x, y); + + if (round) + { + v = Math.round(v); + } + + return v; + }, + + /** + * Returns a string that can be used in a CSS Transform call as a `matrix` property. + * + * @method Phaser.GameObjects.Components.TransformMatrix#getCSSMatrix + * @since 3.12.0 + * + * @return {string} A string containing the CSS Transform matrix values. + */ + getCSSMatrix: function () + { + var m = this.matrix; + + return 'matrix(' + m[0] + ',' + m[1] + ',' + m[2] + ',' + m[3] + ',' + m[4] + ',' + m[5] + ')'; + }, + + /** + * Destroys this Transform Matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#destroy + * @since 3.4.0 + */ + destroy: function () + { + this.matrix = null; + this.decomposedMatrix = null; + } + +}); + +module.exports = TransformMatrix; + + +/***/ }), +/* 52 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// bitmask flag for GameObject.renderMask +var _FLAG = 1; // 0001 + +/** + * Provides methods used for setting the visibility of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.Visible + * @since 3.0.0 + */ + +var Visible = { + + /** + * Private internal value. Holds the visible value. + * + * @name Phaser.GameObjects.Components.Visible#_visible + * @type {boolean} + * @private + * @default true + * @since 3.0.0 + */ + _visible: true, + + /** + * The visible state of the Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * + * @name Phaser.GameObjects.Components.Visible#visible + * @type {boolean} + * @since 3.0.0 + */ + visible: { + + get: function () + { + return this._visible; + }, + + set: function (value) + { + if (value) + { + this._visible = true; + this.renderFlags |= _FLAG; + } + else + { + this._visible = false; + this.renderFlags &= ~_FLAG; + } + } + + }, + + /** + * Sets the visibility of this Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * + * @method Phaser.GameObjects.Components.Visible#setVisible + * @since 3.0.0 + * + * @param {boolean} value - The visible state of the Game Object. + * + * @return {this} This Game Object instance. + */ + setVisible: function (value) + { + this.visible = value; + + return this; + } +}; + +module.exports = Visible; + + +/***/ }), +/* 53 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var ComponentsToJSON = __webpack_require__(54); +var DataManager = __webpack_require__(219); +var EventEmitter = __webpack_require__(55); +var Events = __webpack_require__(22); + +/** + * @classdesc + * The base class that all Game Objects extend. + * You don't create GameObjects directly and they cannot be added to the display list. + * Instead, use them as the base for your own custom classes. + * + * @class GameObject + * @memberof Phaser.GameObjects + * @extends Phaser.Events.EventEmitter + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. + * @param {string} type - A textual representation of the type of Game Object, i.e. `sprite`. + */ +var GameObject = new Class({ + + Extends: EventEmitter, + + initialize: + + function GameObject (scene, type) + { + EventEmitter.call(this); + + /** + * The Scene to which this Game Object belongs. + * Game Objects can only belong to one Scene. + * + * @name Phaser.GameObjects.GameObject#scene + * @type {Phaser.Scene} + * @protected + * @since 3.0.0 + */ + this.scene = scene; + + /** + * A textual representation of this Game Object, i.e. `sprite`. + * Used internally by Phaser but is available for your own custom classes to populate. + * + * @name Phaser.GameObjects.GameObject#type + * @type {string} + * @since 3.0.0 + */ + this.type = type; + + /** + * The current state of this Game Object. + * + * Phaser itself will never modify this value, although plugins may do so. + * + * Use this property to track the state of a Game Object during its lifetime. For example, it could change from + * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant + * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons. + * If you need to store complex data about your Game Object, look at using the Data Component instead. + * + * @name Phaser.GameObjects.GameObject#state + * @type {(integer|string)} + * @since 3.16.0 + */ + this.state = 0; + + /** + * The parent Container of this Game Object, if it has one. + * + * @name Phaser.GameObjects.GameObject#parentContainer + * @type {Phaser.GameObjects.Container} + * @since 3.4.0 + */ + this.parentContainer = null; + + /** + * The name of this Game Object. + * Empty by default and never populated by Phaser, this is left for developers to use. + * + * @name Phaser.GameObjects.GameObject#name + * @type {string} + * @default '' + * @since 3.0.0 + */ + this.name = ''; + + /** + * The active state of this Game Object. + * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it. + * An active object is one which is having its logic and internal systems updated. + * + * @name Phaser.GameObjects.GameObject#active + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.active = true; + + /** + * The Tab Index of the Game Object. + * Reserved for future use by plugins and the Input Manager. + * + * @name Phaser.GameObjects.GameObject#tabIndex + * @type {integer} + * @default -1 + * @since 3.0.0 + */ + this.tabIndex = -1; + + /** + * A Data Manager. + * It allows you to store, query and get key/value paired information specific to this Game Object. + * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`. + * + * @name Phaser.GameObjects.GameObject#data + * @type {Phaser.Data.DataManager} + * @default null + * @since 3.0.0 + */ + this.data = null; + + /** + * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not. + * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively. + * If those components are not used by your custom class then you can use this bitmask as you wish. + * + * @name Phaser.GameObjects.GameObject#renderFlags + * @type {integer} + * @default 15 + * @since 3.0.0 + */ + this.renderFlags = 15; + + /** + * A bitmask that controls if this Game Object is drawn by a Camera or not. + * Not usually set directly, instead call `Camera.ignore`, however you can + * set this property directly using the Camera.id property: + * + * @example + * this.cameraFilter |= camera.id + * + * @name Phaser.GameObjects.GameObject#cameraFilter + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.cameraFilter = 0; + + /** + * If this Game Object is enabled for input then this property will contain an InteractiveObject instance. + * Not usually set directly. Instead call `GameObject.setInteractive()`. + * + * @name Phaser.GameObjects.GameObject#input + * @type {?Phaser.Types.Input.InteractiveObject} + * @default null + * @since 3.0.0 + */ + this.input = null; + + /** + * If this Game Object is enabled for Arcade or Matter Physics then this property will contain a reference to a Physics Body. + * + * @name Phaser.GameObjects.GameObject#body + * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|MatterJS.BodyType)} + * @default null + * @since 3.0.0 + */ + this.body = null; + + /** + * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`. + * This includes calls that may come from a Group, Container or the Scene itself. + * While it allows you to persist a Game Object across Scenes, please understand you are entirely + * responsible for managing references to and from this Game Object. + * + * @name Phaser.GameObjects.GameObject#ignoreDestroy + * @type {boolean} + * @default false + * @since 3.5.0 + */ + this.ignoreDestroy = false; + + // Tell the Scene to re-sort the children + scene.sys.queueDepthSort(); + }, + + /** + * Sets the `active` property of this Game Object and returns this Game Object for further chaining. + * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList. + * + * @method Phaser.GameObjects.GameObject#setActive + * @since 3.0.0 + * + * @param {boolean} value - True if this Game Object should be set as active, false if not. + * + * @return {this} This GameObject. + */ + setActive: function (value) + { + this.active = value; + + return this; + }, + + /** + * Sets the `name` property of this Game Object and returns this Game Object for further chaining. + * The `name` property is not populated by Phaser and is presented for your own use. + * + * @method Phaser.GameObjects.GameObject#setName + * @since 3.0.0 + * + * @param {string} value - The name to be given to this Game Object. + * + * @return {this} This GameObject. + */ + setName: function (value) + { + this.name = value; + + return this; + }, + + /** + * Sets the current state of this Game Object. + * + * Phaser itself will never modify the State of a Game Object, although plugins may do so. + * + * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'. + * The state value should typically be an integer (ideally mapped to a constant + * in your game code), but could also be a string. It is recommended to keep it light and simple. + * If you need to store complex data about your Game Object, look at using the Data Component instead. + * + * @method Phaser.GameObjects.GameObject#setState + * @since 3.16.0 + * + * @param {(integer|string)} value - The state of the Game Object. + * + * @return {this} This GameObject. + */ + setState: function (value) + { + this.state = value; + + return this; + }, + + /** + * Adds a Data Manager component to this Game Object. + * + * @method Phaser.GameObjects.GameObject#setDataEnabled + * @since 3.0.0 + * @see Phaser.Data.DataManager + * + * @return {this} This GameObject. + */ + setDataEnabled: function () + { + if (!this.data) + { + this.data = new DataManager(this); + } + + return this; + }, + + /** + * Allows you to store a key value pair within this Game Objects Data Manager. + * + * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled + * before setting the value. + * + * If the key doesn't already exist in the Data Manager then it is created. + * + * ```javascript + * sprite.setData('name', 'Red Gem Stone'); + * ``` + * + * You can also pass in an object of key value pairs as the first argument: + * + * ```javascript + * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 }); + * ``` + * + * To get a value back again you can call `getData`: + * + * ```javascript + * sprite.getData('gold'); + * ``` + * + * Or you can access the value directly via the `values` property, where it works like any other variable: + * + * ```javascript + * sprite.data.values.gold += 50; + * ``` + * + * When the value is first set, a `setdata` event is emitted from this Game Object. + * + * If the key already exists, a `changedata` event is emitted instead, along an event named after the key. + * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`. + * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter. + * + * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings. + * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager. + * + * @method Phaser.GameObjects.GameObject#setData + * @since 3.0.0 + * + * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored. + * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored. + * + * @return {this} This GameObject. + */ + setData: function (key, value) + { + if (!this.data) + { + this.data = new DataManager(this); + } + + this.data.set(key, value); + + return this; + }, + + /** + * Increase a value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is increased from 0. + * + * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled + * before setting the value. + * + * If the key doesn't already exist in the Data Manager then it is created. + * + * When the value is first set, a `setdata` event is emitted from this Game Object. + * + * @method Phaser.GameObjects.GameObject#incData + * @since 3.23.0 + * + * @param {(string|object)} key - The key to increase the value for. + * @param {*} [data] - The value to increase for the given key. + * + * @return {this} This GameObject. + */ + incData: function (key, value) + { + if (!this.data) + { + this.data = new DataManager(this); + } + + this.data.inc(key, value); + + return this; + }, + + /** + * Toggle a boolean value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is toggled from false. + * + * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled + * before setting the value. + * + * If the key doesn't already exist in the Data Manager then it is created. + * + * When the value is first set, a `setdata` event is emitted from this Game Object. + * + * @method Phaser.GameObjects.GameObject#toggleData + * @since 3.23.0 + * + * @param {(string|object)} key - The key to toggle the value for. + * + * @return {this} This GameObject. + */ + toggleData: function (key) + { + if (!this.data) + { + this.data = new DataManager(this); + } + + this.data.toggle(key); + + return this; + }, + + /** + * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist. + * + * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either: + * + * ```javascript + * sprite.getData('gold'); + * ``` + * + * Or access the value directly: + * + * ```javascript + * sprite.data.values.gold; + * ``` + * + * You can also pass in an array of keys, in which case an array of values will be returned: + * + * ```javascript + * sprite.getData([ 'gold', 'armor', 'health' ]); + * ``` + * + * This approach is useful for destructuring arrays in ES6. + * + * @method Phaser.GameObjects.GameObject#getData + * @since 3.0.0 + * + * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys. + * + * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array. + */ + getData: function (key) + { + if (!this.data) + { + this.data = new DataManager(this); + } + + return this.data.get(key); + }, + + /** + * Pass this Game Object to the Input Manager to enable it for Input. + * + * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area + * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced + * input detection. + * + * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If + * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific + * shape for it to use. + * + * You can also provide an Input Configuration Object as the only argument to this method. + * + * @example + * sprite.setInteractive(); + * + * @example + * sprite.setInteractive(new Phaser.Geom.Circle(45, 46, 45), Phaser.Geom.Circle.Contains); + * + * @example + * graphics.setInteractive(new Phaser.Geom.Rectangle(0, 0, 128, 128), Phaser.Geom.Rectangle.Contains); + * + * @method Phaser.GameObjects.GameObject#setInteractive + * @since 3.0.0 + * + * @param {(Phaser.Types.Input.InputConfiguration|any)} [hitArea] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not given it will try to create a Rectangle based on the texture frame. + * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The callback that determines if the pointer is within the Hit Area shape or not. If you provide a shape you must also provide a callback. + * @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target? + * + * @return {this} This GameObject. + */ + setInteractive: function (hitArea, hitAreaCallback, dropZone) + { + this.scene.sys.input.enable(this, hitArea, hitAreaCallback, dropZone); + + return this; + }, + + /** + * If this Game Object has previously been enabled for input, this will disable it. + * + * An object that is disabled for input stops processing or being considered for + * input events, but can be turned back on again at any time by simply calling + * `setInteractive()` with no arguments provided. + * + * If want to completely remove interaction from this Game Object then use `removeInteractive` instead. + * + * @method Phaser.GameObjects.GameObject#disableInteractive + * @since 3.7.0 + * + * @return {this} This GameObject. + */ + disableInteractive: function () + { + if (this.input) + { + this.input.enabled = false; + } + + return this; + }, + + /** + * If this Game Object has previously been enabled for input, this will queue it + * for removal, causing it to no longer be interactive. The removal happens on + * the next game step, it is not immediate. + * + * The Interactive Object that was assigned to this Game Object will be destroyed, + * removed from the Input Manager and cleared from this Game Object. + * + * If you wish to re-enable this Game Object at a later date you will need to + * re-create its InteractiveObject by calling `setInteractive` again. + * + * If you wish to only temporarily stop an object from receiving input then use + * `disableInteractive` instead, as that toggles the interactive state, where-as + * this erases it completely. + * + * If you wish to resize a hit area, don't remove and then set it as being + * interactive. Instead, access the hitarea object directly and resize the shape + * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the + * shape is a Rectangle, which it is by default.) + * + * @method Phaser.GameObjects.GameObject#removeInteractive + * @since 3.7.0 + * + * @return {this} This GameObject. + */ + removeInteractive: function () + { + this.scene.sys.input.clear(this); + + this.input = undefined; + + return this; + }, + + /** + * This callback is invoked when this Game Object is added to a Scene. + * + * Can be overriden by custom Game Objects, but be aware of some Game Objects that + * will use this, such as Sprites, to add themselves into the Update List. + * + * You can also listen for the `ADDED_TO_SCENE` event from this Game Object. + * + * @method Phaser.GameObjects.GameObject#addedToScene + * @since 3.50.0 + */ + addedToScene: function () + { + }, + + /** + * This callback is invoked when this Game Object is removed from a Scene. + * + * Can be overriden by custom Game Objects, but be aware of some Game Objects that + * will use this, such as Sprites, to removed themselves from the Update List. + * + * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object. + * + * @method Phaser.GameObjects.GameObject#removedFromScene + * @since 3.50.0 + */ + removedFromScene: function () + { + }, + + /** + * To be overridden by custom GameObjects. Allows base objects to be used in a Pool. + * + * @method Phaser.GameObjects.GameObject#update + * @since 3.0.0 + * + * @param {...*} [args] - args + */ + update: function () + { + }, + + /** + * Returns a JSON representation of the Game Object. + * + * @method Phaser.GameObjects.GameObject#toJSON + * @since 3.0.0 + * + * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object. + */ + toJSON: function () + { + return ComponentsToJSON(this); + }, + + /** + * Compares the renderMask with the renderFlags to see if this Game Object will render or not. + * Also checks the Game Object against the given Cameras exclusion list. + * + * @method Phaser.GameObjects.GameObject#willRender + * @since 3.0.0 + * + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to check against this Game Object. + * + * @return {boolean} True if the Game Object should be rendered, otherwise false. + */ + willRender: function (camera) + { + return !(GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id))); + }, + + /** + * Returns an array containing the display list index of either this Game Object, or if it has one, + * its parent Container. It then iterates up through all of the parent containers until it hits the + * root of the display list (which is index 0 in the returned array). + * + * Used internally by the InputPlugin but also useful if you wish to find out the display depth of + * this Game Object and all of its ancestors. + * + * @method Phaser.GameObjects.GameObject#getIndexList + * @since 3.4.0 + * + * @return {integer[]} An array of display list position indexes. + */ + getIndexList: function () + { + // eslint-disable-next-line consistent-this + var child = this; + var parent = this.parentContainer; + + var indexes = []; + + while (parent) + { + // indexes.unshift([parent.getIndex(child), parent.name]); + indexes.unshift(parent.getIndex(child)); + + child = parent; + + if (!parent.parentContainer) + { + break; + } + else + { + parent = parent.parentContainer; + } + } + + // indexes.unshift([this.scene.sys.displayList.getIndex(child), 'root']); + indexes.unshift(this.scene.sys.displayList.getIndex(child)); + + return indexes; + }, + + /** + * Destroys this Game Object removing it from the Display List and Update List and + * severing all ties to parent resources. + * + * Also removes itself from the Input Manager and Physics Manager if previously enabled. + * + * Use this to remove a Game Object from your game if you don't ever plan to use it again. + * As long as no reference to it exists within your own code it should become free for + * garbage collection by the browser. + * + * If you just want to temporarily disable an object then look at using the + * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected. + * + * @method Phaser.GameObjects.GameObject#destroy + * @fires Phaser.GameObjects.Events#DESTROY + * @since 3.0.0 + * + * @param {boolean} [fromScene=false] - Is this Game Object being destroyed as the result of a Scene shutdown? + */ + destroy: function (fromScene) + { + if (fromScene === undefined) { fromScene = false; } + + // This Game Object has already been destroyed + if (!this.scene || this.ignoreDestroy) + { + return; + } + + if (this.preDestroy) + { + this.preDestroy.call(this); + } + + this.emit(Events.DESTROY, this); + + var sys = this.scene.sys; + + if (!fromScene) + { + sys.displayList.remove(this); + } + + if (this.input) + { + sys.input.clear(this); + this.input = undefined; + } + + if (this.data) + { + this.data.destroy(); + + this.data = undefined; + } + + if (this.body) + { + this.body.destroy(); + this.body = undefined; + } + + // Tell the Scene to re-sort the children + if (!fromScene) + { + sys.queueDepthSort(); + } + + this.active = false; + this.visible = false; + + this.scene = undefined; + + this.parentContainer = undefined; + + this.removeAllListeners(); + } + +}); + +/** + * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not. + * + * @constant {integer} RENDER_MASK + * @memberof Phaser.GameObjects.GameObject + * @default + */ +GameObject.RENDER_MASK = 15; + +module.exports = GameObject; + + +/***/ }), +/* 54 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Build a JSON representation of the given Game Object. + * + * This is typically extended further by Game Object specific implementations. + * + * @method Phaser.GameObjects.Components.ToJSON + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to export as JSON. + * + * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object. + */ +var ToJSON = function (gameObject) +{ + var out = { + name: gameObject.name, + type: gameObject.type, + x: gameObject.x, + y: gameObject.y, + depth: gameObject.depth, + scale: { + x: gameObject.scaleX, + y: gameObject.scaleY + }, + origin: { + x: gameObject.originX, + y: gameObject.originY + }, + flipX: gameObject.flipX, + flipY: gameObject.flipY, + rotation: gameObject.rotation, + alpha: gameObject.alpha, + visible: gameObject.visible, + blendMode: gameObject.blendMode, + textureKey: '', + frameKey: '', + data: {} + }; + + if (gameObject.texture) + { + out.textureKey = gameObject.texture.key; + out.frameKey = gameObject.frame.name; + } + + return out; +}; + +module.exports = ToJSON; + + +/***/ }), +/* 55 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var has = Object.prototype.hasOwnProperty + , prefix = '~'; + +/** + * Constructor to create a storage for our `EE` objects. + * An `Events` instance is a plain object whose properties are event names. + * + * @constructor + * @private + */ +function Events() {} + +// +// We try to not inherit from `Object.prototype`. In some engines creating an +// instance in this way is faster than calling `Object.create(null)` directly. +// If `Object.create(null)` is not supported we prefix the event names with a +// character to make sure that the built-in object properties are not +// overridden or used as an attack vector. +// +if (Object.create) { + Events.prototype = Object.create(null); + + // + // This hack is needed because the `__proto__` property is still inherited in + // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5. + // + if (!new Events().__proto__) prefix = false; +} + +/** + * Representation of a single event listener. + * + * @param {Function} fn The listener function. + * @param {*} context The context to invoke the listener with. + * @param {Boolean} [once=false] Specify if the listener is a one-time listener. + * @constructor + * @private + */ +function EE(fn, context, once) { + this.fn = fn; + this.context = context; + this.once = once || false; +} + +/** + * Add a listener for a given event. + * + * @param {EventEmitter} emitter Reference to the `EventEmitter` instance. + * @param {(String|Symbol)} event The event name. + * @param {Function} fn The listener function. + * @param {*} context The context to invoke the listener with. + * @param {Boolean} once Specify if the listener is a one-time listener. + * @returns {EventEmitter} + * @private + */ +function addListener(emitter, event, fn, context, once) { + if (typeof fn !== 'function') { + throw new TypeError('The listener must be a function'); + } + + var listener = new EE(fn, context || emitter, once) + , evt = prefix ? prefix + event : event; + + if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++; + else if (!emitter._events[evt].fn) emitter._events[evt].push(listener); + else emitter._events[evt] = [emitter._events[evt], listener]; + + return emitter; +} + +/** + * Clear event by name. + * + * @param {EventEmitter} emitter Reference to the `EventEmitter` instance. + * @param {(String|Symbol)} evt The Event name. + * @private + */ +function clearEvent(emitter, evt) { + if (--emitter._eventsCount === 0) emitter._events = new Events(); + else delete emitter._events[evt]; +} + +/** + * Minimal `EventEmitter` interface that is molded against the Node.js + * `EventEmitter` interface. + * + * @constructor + * @public + */ +function EventEmitter() { + this._events = new Events(); + this._eventsCount = 0; +} + +/** + * Return an array listing the events for which the emitter has registered + * listeners. + * + * @returns {Array} + * @public + */ +EventEmitter.prototype.eventNames = function eventNames() { + var names = [] + , events + , name; + + if (this._eventsCount === 0) return names; + + for (name in (events = this._events)) { + if (has.call(events, name)) names.push(prefix ? name.slice(1) : name); + } + + if (Object.getOwnPropertySymbols) { + return names.concat(Object.getOwnPropertySymbols(events)); + } + + return names; +}; + +/** + * Return the listeners registered for a given event. + * + * @param {(String|Symbol)} event The event name. + * @returns {Array} The registered listeners. + * @public + */ +EventEmitter.prototype.listeners = function listeners(event) { + var evt = prefix ? prefix + event : event + , handlers = this._events[evt]; + + if (!handlers) return []; + if (handlers.fn) return [handlers.fn]; + + for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) { + ee[i] = handlers[i].fn; + } + + return ee; +}; + +/** + * Return the number of listeners listening to a given event. + * + * @param {(String|Symbol)} event The event name. + * @returns {Number} The number of listeners. + * @public + */ +EventEmitter.prototype.listenerCount = function listenerCount(event) { + var evt = prefix ? prefix + event : event + , listeners = this._events[evt]; + + if (!listeners) return 0; + if (listeners.fn) return 1; + return listeners.length; +}; + +/** + * Calls each of the listeners registered for a given event. + * + * @param {(String|Symbol)} event The event name. + * @returns {Boolean} `true` if the event had listeners, else `false`. + * @public + */ +EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) { + var evt = prefix ? prefix + event : event; + + if (!this._events[evt]) return false; + + var listeners = this._events[evt] + , len = arguments.length + , args + , i; + + if (listeners.fn) { + if (listeners.once) this.removeListener(event, listeners.fn, undefined, true); + + switch (len) { + case 1: return listeners.fn.call(listeners.context), true; + case 2: return listeners.fn.call(listeners.context, a1), true; + case 3: return listeners.fn.call(listeners.context, a1, a2), true; + case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true; + case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true; + case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true; + } + + for (i = 1, args = new Array(len -1); i < len; i++) { + args[i - 1] = arguments[i]; + } + + listeners.fn.apply(listeners.context, args); + } else { + var length = listeners.length + , j; + + for (i = 0; i < length; i++) { + if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true); + + switch (len) { + case 1: listeners[i].fn.call(listeners[i].context); break; + case 2: listeners[i].fn.call(listeners[i].context, a1); break; + case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break; + case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break; + default: + if (!args) for (j = 1, args = new Array(len -1); j < len; j++) { + args[j - 1] = arguments[j]; + } + + listeners[i].fn.apply(listeners[i].context, args); + } + } + } + + return true; +}; + +/** + * Add a listener for a given event. + * + * @param {(String|Symbol)} event The event name. + * @param {Function} fn The listener function. + * @param {*} [context=this] The context to invoke the listener with. + * @returns {EventEmitter} `this`. + * @public + */ +EventEmitter.prototype.on = function on(event, fn, context) { + return addListener(this, event, fn, context, false); +}; + +/** + * Add a one-time listener for a given event. + * + * @param {(String|Symbol)} event The event name. + * @param {Function} fn The listener function. + * @param {*} [context=this] The context to invoke the listener with. + * @returns {EventEmitter} `this`. + * @public + */ +EventEmitter.prototype.once = function once(event, fn, context) { + return addListener(this, event, fn, context, true); +}; + +/** + * Remove the listeners of a given event. + * + * @param {(String|Symbol)} event The event name. + * @param {Function} fn Only remove the listeners that match this function. + * @param {*} context Only remove the listeners that have this context. + * @param {Boolean} once Only remove one-time listeners. + * @returns {EventEmitter} `this`. + * @public + */ +EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) { + var evt = prefix ? prefix + event : event; + + if (!this._events[evt]) return this; + if (!fn) { + clearEvent(this, evt); + return this; + } + + var listeners = this._events[evt]; + + if (listeners.fn) { + if ( + listeners.fn === fn && + (!once || listeners.once) && + (!context || listeners.context === context) + ) { + clearEvent(this, evt); + } + } else { + for (var i = 0, events = [], length = listeners.length; i < length; i++) { + if ( + listeners[i].fn !== fn || + (once && !listeners[i].once) || + (context && listeners[i].context !== context) + ) { + events.push(listeners[i]); + } + } + + // + // Reset the array, or remove it completely if we have no more listeners. + // + if (events.length) this._events[evt] = events.length === 1 ? events[0] : events; + else clearEvent(this, evt); + } + + return this; +}; + +/** + * Remove all listeners, or those of the specified event. + * + * @param {(String|Symbol)} [event] The event name. + * @returns {EventEmitter} `this`. + * @public + */ +EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) { + var evt; + + if (event) { + evt = prefix ? prefix + event : event; + if (this._events[evt]) clearEvent(this, evt); + } else { + this._events = new Events(); + this._eventsCount = 0; + } + + return this; +}; + +// +// Alias methods names because people roll like that. +// +EventEmitter.prototype.off = EventEmitter.prototype.removeListener; +EventEmitter.prototype.addListener = EventEmitter.prototype.on; + +// +// Expose the prefix. +// +EventEmitter.prefixed = prefix; + +// +// Allow `EventEmitter` to be imported as module namespace. +// +EventEmitter.EventEmitter = EventEmitter; + +// +// Expose the module. +// +if (true) { + module.exports = EventEmitter; +} + + +/***/ }), +/* 56 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Transposes the elements of the given matrix (array of arrays). + * + * The transpose of a matrix is a new matrix whose rows are the columns of the original. + * + * @function Phaser.Utils.Array.Matrix.TransposeMatrix + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [array,$return] + * + * @param {T[][]} [array] - The array matrix to transpose. + * + * @return {T[][]} A new array matrix which is a transposed version of the given array. + */ +var TransposeMatrix = function (array) +{ + var sourceRowCount = array.length; + var sourceColCount = array[0].length; + + var result = new Array(sourceColCount); + + for (var i = 0; i < sourceColCount; i++) + { + result[i] = new Array(sourceRowCount); + + for (var j = sourceRowCount - 1; j > -1; j--) + { + result[i][j] = array[j][i]; + } + } + + return result; +}; + +module.exports = TransposeMatrix; + + +/***/ }), +/* 57 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Searches a pre-sorted array for the closet value to the given number. + * + * If the `key` argument is given it will assume the array contains objects that all have the required `key` property name, + * and will check for the closest value of those to the given number. + * + * @function Phaser.Utils.Array.FindClosestInSorted + * @since 3.0.0 + * + * @param {number} value - The value to search for in the array. + * @param {array} array - The array to search, which must be sorted. + * @param {string} [key] - An optional property key. If specified the array elements property will be checked against value. + * + * @return {(number|any)} The nearest value found in the array, or if a `key` was given, the nearest object with the matching property value. + */ +var FindClosestInSorted = function (value, array, key) +{ + if (!array.length) + { + return NaN; + } + else if (array.length === 1) + { + return array[0]; + } + + var i = 1; + var low; + var high; + + if (key) + { + if (value < array[0][key]) + { + return array[0]; + } + + while (array[i][key] < value) + { + i++; + } + } + else + { + while (array[i] < value) + { + i++; + } + } + + if (i > array.length) + { + i = array.length; + } + + if (key) + { + low = array[i - 1][key]; + high = array[i][key]; + + return ((high - value) <= (value - low)) ? array[i] : array[i - 1]; + } + else + { + low = array[i - 1]; + high = array[i]; + + return ((high - value) <= (value - low)) ? high : low; + } +}; + +module.exports = FindClosestInSorted; + + +/***/ }), +/* 58 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Shuffles the contents of the given array using the Fisher-Yates implementation. + * + * The original array is modified directly and returned. + * + * @function Phaser.Utils.Array.Shuffle + * @since 3.0.0 + * + * @generic T + * @genericUse {T[]} - [array,$return] + * + * @param {T[]} array - The array to shuffle. This array is modified in place. + * + * @return {T[]} The shuffled array. + */ +var Shuffle = function (array) +{ + for (var i = array.length - 1; i > 0; i--) + { + var j = Math.floor(Math.random() * (i + 1)); + var temp = array[i]; + array[i] = array[j]; + array[j] = temp; + } + + return array; +}; + +module.exports = Shuffle; + + +/***/ }), +/* 59 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Animations.Events + */ + +module.exports = { + + ADD_ANIMATION: __webpack_require__(290), + ANIMATION_COMPLETE: __webpack_require__(291), + ANIMATION_REPEAT: __webpack_require__(292), + ANIMATION_RESTART: __webpack_require__(293), + ANIMATION_START: __webpack_require__(294), + PAUSE_ALL: __webpack_require__(295), + REMOVE_ANIMATION: __webpack_require__(296), + RESUME_ALL: __webpack_require__(297), + SPRITE_ANIMATION_COMPLETE: __webpack_require__(298), + SPRITE_ANIMATION_KEY_COMPLETE: __webpack_require__(299), + SPRITE_ANIMATION_KEY_REPEAT: __webpack_require__(300), + SPRITE_ANIMATION_KEY_RESTART: __webpack_require__(301), + SPRITE_ANIMATION_KEY_START: __webpack_require__(302), + SPRITE_ANIMATION_KEY_UPDATE: __webpack_require__(303), + SPRITE_ANIMATION_REPEAT: __webpack_require__(304), + SPRITE_ANIMATION_RESTART: __webpack_require__(305), + SPRITE_ANIMATION_START: __webpack_require__(306), + SPRITE_ANIMATION_UPDATE: __webpack_require__(307) + +}; + + +/***/ }), +/* 60 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Perimeter = __webpack_require__(61); +var Point = __webpack_require__(10); + +/** + * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter. + * + * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is. + * + * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side. + * + * @function Phaser.Geom.Rectangle.GetPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [out,$return] + * + * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle to get the perimeter point from. + * @param {number} position - The normalized distance into the Rectangle's perimeter to return. + * @param {(Phaser.Geom.Point|object)} [out] - An object to update with the `x` and `y` coordinates of the point. + * + * @return {Phaser.Geom.Point} The updated `output` object, or a new Point if no `output` object was given. + */ +var GetPoint = function (rectangle, position, out) +{ + if (out === undefined) { out = new Point(); } + + if (position <= 0 || position >= 1) + { + out.x = rectangle.x; + out.y = rectangle.y; + + return out; + } + + var p = Perimeter(rectangle) * position; + + if (position > 0.5) + { + p -= (rectangle.width + rectangle.height); + + if (p <= rectangle.width) + { + // Face 3 + out.x = rectangle.right - p; + out.y = rectangle.bottom; + } + else + { + // Face 4 + out.x = rectangle.x; + out.y = rectangle.bottom - (p - rectangle.width); + } + } + else if (p <= rectangle.width) + { + // Face 1 + out.x = rectangle.x + p; + out.y = rectangle.y; + } + else + { + // Face 2 + out.x = rectangle.right; + out.y = rectangle.y + (p - rectangle.width); + } + + return out; +}; + +module.exports = GetPoint; + + +/***/ }), +/* 61 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculates the perimeter of a Rectangle. + * + * @function Phaser.Geom.Rectangle.Perimeter + * @since 3.0.0 + * + * @param {Phaser.Geom.Rectangle} rect - The Rectangle to use. + * + * @return {number} The perimeter of the Rectangle, equal to `(width * 2) + (height * 2)`. + */ +var Perimeter = function (rect) +{ + return 2 * (rect.width + rect.height); +}; + +module.exports = Perimeter; + + +/***/ }), +/* 62 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BuildGameObject = __webpack_require__(36); +var BuildGameObject = __webpack_require__(63); var Class = __webpack_require__(0); -var GetValue = __webpack_require__(12); -var ResizeEvent = __webpack_require__(150); -var ScenePlugin = __webpack_require__(151); -var Spine = __webpack_require__(175); -var SpineFile = __webpack_require__(176); -var SpineGameObject = __webpack_require__(194); +var GetValue = __webpack_require__(6); +var ResizeEvent = __webpack_require__(174); +var ScenePlugin = __webpack_require__(175); +var Spine = __webpack_require__(199); +var SpineFile = __webpack_require__(200); +var SpineGameObject = __webpack_require__(218); +var SpineContainer = __webpack_require__(247); +var NOOP = __webpack_require__(4); /** * @classdesc @@ -6771,6 +11805,13 @@ var SpineGameObject = __webpack_require__(194); * stored in their own caches, which are global, meaning they're accessible from any Scene in your * game, regardless if the Scene loaded the Spine data or not. * + * When destroying a Phaser Game instance, if you need to re-create it again on the same page without + * reloading, you must remember to remove the Spine Plugin as part of your tear-down process: + * + * ```javascript + * this.plugins.removeScenePlugin('SpinePlugin'); + * ``` + * * For details about the Spine Runtime API see http://esotericsoftware.com/spine-api-reference * * @class SpinePlugin @@ -6954,6 +11995,19 @@ var SpinePlugin = new Class({ this.getAtlas = this.getAtlasCanvas; } + // Headless mode? + if (!this.renderer) + { + this.renderer = { + width: game.scale.width, + height: game.scale.height, + preRender: NOOP, + postRender: NOOP, + render: NOOP, + destroy: NOOP + }; + } + var _this = this; var add = function (x, y, key, animationName, loop) @@ -7002,8 +12056,38 @@ var SpinePlugin = new Class({ return spineGO.refresh(); }; + var addContainer = function (x, y, children) + { + var spineGO = new SpineContainer(this.scene, _this, x, y, children); + + this.displayList.add(spineGO); + + return spineGO; + }; + + var makeContainer = function (config, addToScene) + { + if (config === undefined) { config = {}; } + + var x = GetValue(config, 'x', 0); + var y = GetValue(config, 'y', 0); + var children = GetValue(config, 'children', null); + + var container = new SpineContainer(this.scene, _this, x, y, children); + + if (addToScene !== undefined) + { + config.add = addToScene; + } + + BuildGameObject(this.scene, container, config); + + return container; + }; + pluginManager.registerFileType('spine', this.spineFileCallback, scene); pluginManager.registerGameObject('spine', add, make); + pluginManager.registerGameObject('spinecontainer', addContainer, makeContainer); }, /** @@ -7737,6 +12821,8 @@ var SpinePlugin = new Class({ }); +SpinePlugin.SpineGameObject = SpineGameObject; + /** * Creates a new Spine Game Object and adds it to the Scene. * @@ -7807,7 +12893,7 @@ module.exports = SpinePlugin; /***/ }), -/* 36 */ +/* 63 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -7816,8 +12902,8 @@ module.exports = SpinePlugin; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlendModes = __webpack_require__(37); -var GetAdvancedValue = __webpack_require__(38); +var BlendModes = __webpack_require__(16); +var GetAdvancedValue = __webpack_require__(64); /** * Builds a Game Object using the provided configuration object. @@ -7935,346 +13021,7 @@ module.exports = BuildGameObject; /***/ }), -/* 37 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Phaser Blend Modes. - * - * @namespace Phaser.BlendModes - * @since 3.0.0 - */ - -module.exports = { - - /** - * Skips the Blend Mode check in the renderer. - * - * @name Phaser.BlendModes.SKIP_CHECK - * @type {integer} - * @const - * @since 3.0.0 - */ - SKIP_CHECK: -1, - - /** - * Normal blend mode. For Canvas and WebGL. - * This is the default setting and draws new shapes on top of the existing canvas content. - * - * @name Phaser.BlendModes.NORMAL - * @type {integer} - * @const - * @since 3.0.0 - */ - NORMAL: 0, - - /** - * Add blend mode. For Canvas and WebGL. - * Where both shapes overlap the color is determined by adding color values. - * - * @name Phaser.BlendModes.ADD - * @type {integer} - * @const - * @since 3.0.0 - */ - ADD: 1, - - /** - * Multiply blend mode. For Canvas and WebGL. - * The pixels are of the top layer are multiplied with the corresponding pixel of the bottom layer. A darker picture is the result. - * - * @name Phaser.BlendModes.MULTIPLY - * @type {integer} - * @const - * @since 3.0.0 - */ - MULTIPLY: 2, - - /** - * Screen blend mode. For Canvas and WebGL. - * The pixels are inverted, multiplied, and inverted again. A lighter picture is the result (opposite of multiply) - * - * @name Phaser.BlendModes.SCREEN - * @type {integer} - * @const - * @since 3.0.0 - */ - SCREEN: 3, - - /** - * Overlay blend mode. For Canvas only. - * A combination of multiply and screen. Dark parts on the base layer become darker, and light parts become lighter. - * - * @name Phaser.BlendModes.OVERLAY - * @type {integer} - * @const - * @since 3.0.0 - */ - OVERLAY: 4, - - /** - * Darken blend mode. For Canvas only. - * Retains the darkest pixels of both layers. - * - * @name Phaser.BlendModes.DARKEN - * @type {integer} - * @const - * @since 3.0.0 - */ - DARKEN: 5, - - /** - * Lighten blend mode. For Canvas only. - * Retains the lightest pixels of both layers. - * - * @name Phaser.BlendModes.LIGHTEN - * @type {integer} - * @const - * @since 3.0.0 - */ - LIGHTEN: 6, - - /** - * Color Dodge blend mode. For Canvas only. - * Divides the bottom layer by the inverted top layer. - * - * @name Phaser.BlendModes.COLOR_DODGE - * @type {integer} - * @const - * @since 3.0.0 - */ - COLOR_DODGE: 7, - - /** - * Color Burn blend mode. For Canvas only. - * Divides the inverted bottom layer by the top layer, and then inverts the result. - * - * @name Phaser.BlendModes.COLOR_BURN - * @type {integer} - * @const - * @since 3.0.0 - */ - COLOR_BURN: 8, - - /** - * Hard Light blend mode. For Canvas only. - * A combination of multiply and screen like overlay, but with top and bottom layer swapped. - * - * @name Phaser.BlendModes.HARD_LIGHT - * @type {integer} - * @const - * @since 3.0.0 - */ - HARD_LIGHT: 9, - - /** - * Soft Light blend mode. For Canvas only. - * A softer version of hard-light. Pure black or white does not result in pure black or white. - * - * @name Phaser.BlendModes.SOFT_LIGHT - * @type {integer} - * @const - * @since 3.0.0 - */ - SOFT_LIGHT: 10, - - /** - * Difference blend mode. For Canvas only. - * Subtracts the bottom layer from the top layer or the other way round to always get a positive value. - * - * @name Phaser.BlendModes.DIFFERENCE - * @type {integer} - * @const - * @since 3.0.0 - */ - DIFFERENCE: 11, - - /** - * Exclusion blend mode. For Canvas only. - * Like difference, but with lower contrast. - * - * @name Phaser.BlendModes.EXCLUSION - * @type {integer} - * @const - * @since 3.0.0 - */ - EXCLUSION: 12, - - /** - * Hue blend mode. For Canvas only. - * Preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer. - * - * @name Phaser.BlendModes.HUE - * @type {integer} - * @const - * @since 3.0.0 - */ - HUE: 13, - - /** - * Saturation blend mode. For Canvas only. - * Preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer. - * - * @name Phaser.BlendModes.SATURATION - * @type {integer} - * @const - * @since 3.0.0 - */ - SATURATION: 14, - - /** - * Color blend mode. For Canvas only. - * Preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer. - * - * @name Phaser.BlendModes.COLOR - * @type {integer} - * @const - * @since 3.0.0 - */ - COLOR: 15, - - /** - * Luminosity blend mode. For Canvas only. - * Preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer. - * - * @name Phaser.BlendModes.LUMINOSITY - * @type {integer} - * @const - * @since 3.0.0 - */ - LUMINOSITY: 16, - - /** - * Alpha erase blend mode. For Canvas and WebGL. - * - * @name Phaser.BlendModes.ERASE - * @type {integer} - * @const - * @since 3.0.0 - */ - ERASE: 17, - - /** - * Source-in blend mode. For Canvas only. - * The new shape is drawn only where both the new shape and the destination canvas overlap. Everything else is made transparent. - * - * @name Phaser.BlendModes.SOURCE_IN - * @type {integer} - * @const - * @since 3.0.0 - */ - SOURCE_IN: 18, - - /** - * Source-out blend mode. For Canvas only. - * The new shape is drawn where it doesn't overlap the existing canvas content. - * - * @name Phaser.BlendModes.SOURCE_OUT - * @type {integer} - * @const - * @since 3.0.0 - */ - SOURCE_OUT: 19, - - /** - * Source-out blend mode. For Canvas only. - * The new shape is only drawn where it overlaps the existing canvas content. - * - * @name Phaser.BlendModes.SOURCE_ATOP - * @type {integer} - * @const - * @since 3.0.0 - */ - SOURCE_ATOP: 20, - - /** - * Destination-over blend mode. For Canvas only. - * New shapes are drawn behind the existing canvas content. - * - * @name Phaser.BlendModes.DESTINATION_OVER - * @type {integer} - * @const - * @since 3.0.0 - */ - DESTINATION_OVER: 21, - - /** - * Destination-in blend mode. For Canvas only. - * The existing canvas content is kept where both the new shape and existing canvas content overlap. Everything else is made transparent. - * - * @name Phaser.BlendModes.DESTINATION_IN - * @type {integer} - * @const - * @since 3.0.0 - */ - DESTINATION_IN: 22, - - /** - * Destination-out blend mode. For Canvas only. - * The existing content is kept where it doesn't overlap the new shape. - * - * @name Phaser.BlendModes.DESTINATION_OUT - * @type {integer} - * @const - * @since 3.0.0 - */ - DESTINATION_OUT: 23, - - /** - * Destination-out blend mode. For Canvas only. - * The existing canvas is only kept where it overlaps the new shape. The new shape is drawn behind the canvas content. - * - * @name Phaser.BlendModes.DESTINATION_ATOP - * @type {integer} - * @const - * @since 3.0.0 - */ - DESTINATION_ATOP: 24, - - /** - * Lighten blend mode. For Canvas only. - * Where both shapes overlap the color is determined by adding color values. - * - * @name Phaser.BlendModes.LIGHTER - * @type {integer} - * @const - * @since 3.0.0 - */ - LIGHTER: 25, - - /** - * Copy blend mode. For Canvas only. - * Only the new shape is shown. - * - * @name Phaser.BlendModes.COPY - * @type {integer} - * @const - * @since 3.0.0 - */ - COPY: 26, - - /** - * Xor blend mode. For Canvas only. - * Shapes are made transparent where both overlap and drawn normal everywhere else. - * - * @name Phaser.BlendModes.XOR - * @type {integer} - * @const - * @since 3.0.0 - */ - XOR: 27 - -}; - - -/***/ }), -/* 38 */ +/* 64 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8283,8 +13030,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH = __webpack_require__(39); -var GetValue = __webpack_require__(12); +var MATH = __webpack_require__(65); +var GetValue = __webpack_require__(6); /** * Retrieves a value from an object. Allows for more advanced selection options, including: @@ -8361,7 +13108,7 @@ module.exports = GetAdvancedValue; /***/ }), -/* 39 */ +/* 65 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8370,8 +13117,8 @@ module.exports = GetAdvancedValue; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(1); -var Extend = __webpack_require__(15); +var CONST = __webpack_require__(2); +var Extend = __webpack_require__(26); /** * @namespace Phaser.Math @@ -8380,63 +13127,63 @@ var Extend = __webpack_require__(15); var PhaserMath = { // Collections of functions - Angle: __webpack_require__(40), - Distance: __webpack_require__(49), - Easing: __webpack_require__(57), - Fuzzy: __webpack_require__(102), - Interpolation: __webpack_require__(107), - Pow2: __webpack_require__(115), - Snap: __webpack_require__(119), + Angle: __webpack_require__(66), + Distance: __webpack_require__(75), + Easing: __webpack_require__(83), + Fuzzy: __webpack_require__(128), + Interpolation: __webpack_require__(133), + Pow2: __webpack_require__(141), + Snap: __webpack_require__(145), // Expose the RNG Class - RandomDataGenerator: __webpack_require__(123), + RandomDataGenerator: __webpack_require__(149), // Single functions - Average: __webpack_require__(124), - Bernstein: __webpack_require__(21), - Between: __webpack_require__(125), - CatmullRom: __webpack_require__(23), - CeilTo: __webpack_require__(126), - Clamp: __webpack_require__(9), - DegToRad: __webpack_require__(27), - Difference: __webpack_require__(127), - Factorial: __webpack_require__(22), - FloatBetween: __webpack_require__(8), - FloorTo: __webpack_require__(128), - FromPercent: __webpack_require__(129), - GetSpeed: __webpack_require__(130), - IsEven: __webpack_require__(131), - IsEvenStrict: __webpack_require__(132), - Linear: __webpack_require__(24), - MaxAdd: __webpack_require__(133), - MinSub: __webpack_require__(134), - Percent: __webpack_require__(135), - RadToDeg: __webpack_require__(10), - RandomXY: __webpack_require__(136), - RandomXYZ: __webpack_require__(137), - RandomXYZW: __webpack_require__(138), - Rotate: __webpack_require__(139), - RotateAround: __webpack_require__(140), - RotateAroundDistance: __webpack_require__(141), - RotateTo: __webpack_require__(142), - RoundAwayFromZero: __webpack_require__(143), - RoundTo: __webpack_require__(144), - SinCosTableGenerator: __webpack_require__(145), - SmootherStep: __webpack_require__(26), - SmoothStep: __webpack_require__(25), - ToXY: __webpack_require__(146), - TransformXY: __webpack_require__(28), - Within: __webpack_require__(147), - Wrap: __webpack_require__(5), + Average: __webpack_require__(150), + Bernstein: __webpack_require__(32), + Between: __webpack_require__(151), + CatmullRom: __webpack_require__(34), + CeilTo: __webpack_require__(152), + Clamp: __webpack_require__(3), + DegToRad: __webpack_require__(18), + Difference: __webpack_require__(153), + Factorial: __webpack_require__(33), + FloatBetween: __webpack_require__(17), + FloorTo: __webpack_require__(154), + FromPercent: __webpack_require__(155), + GetSpeed: __webpack_require__(156), + IsEven: __webpack_require__(157), + IsEvenStrict: __webpack_require__(158), + Linear: __webpack_require__(35), + MaxAdd: __webpack_require__(159), + MinSub: __webpack_require__(160), + Percent: __webpack_require__(161), + RadToDeg: __webpack_require__(12), + RandomXY: __webpack_require__(162), + RandomXYZ: __webpack_require__(163), + RandomXYZW: __webpack_require__(164), + Rotate: __webpack_require__(165), + RotateAround: __webpack_require__(38), + RotateAroundDistance: __webpack_require__(166), + RotateTo: __webpack_require__(167), + RoundAwayFromZero: __webpack_require__(39), + RoundTo: __webpack_require__(168), + SinCosTableGenerator: __webpack_require__(169), + SmootherStep: __webpack_require__(37), + SmoothStep: __webpack_require__(36), + ToXY: __webpack_require__(170), + TransformXY: __webpack_require__(40), + Within: __webpack_require__(171), + Wrap: __webpack_require__(8), // Vector classes - Vector2: __webpack_require__(3), - Vector3: __webpack_require__(11), - Vector4: __webpack_require__(148), - Matrix3: __webpack_require__(29), - Matrix4: __webpack_require__(30), - Quaternion: __webpack_require__(31), - RotateVec3: __webpack_require__(149) + Vector2: __webpack_require__(1), + Vector3: __webpack_require__(19), + Vector4: __webpack_require__(172), + Matrix3: __webpack_require__(41), + Matrix4: __webpack_require__(42), + Quaternion: __webpack_require__(43), + RotateVec3: __webpack_require__(173) }; @@ -8450,7 +13197,7 @@ module.exports = PhaserMath; /***/ }), -/* 40 */ +/* 66 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8465,25 +13212,25 @@ module.exports = PhaserMath; module.exports = { - Between: __webpack_require__(16), - BetweenPoints: __webpack_require__(41), - BetweenPointsY: __webpack_require__(42), - BetweenY: __webpack_require__(43), - CounterClockwise: __webpack_require__(7), - Normalize: __webpack_require__(17), - Random: __webpack_require__(44), - RandomDegrees: __webpack_require__(45), - Reverse: __webpack_require__(46), - RotateTo: __webpack_require__(47), - ShortestBetween: __webpack_require__(48), - Wrap: __webpack_require__(18), - WrapDegrees: __webpack_require__(19) + Between: __webpack_require__(27), + BetweenPoints: __webpack_require__(67), + BetweenPointsY: __webpack_require__(68), + BetweenY: __webpack_require__(69), + CounterClockwise: __webpack_require__(11), + Normalize: __webpack_require__(28), + Random: __webpack_require__(70), + RandomDegrees: __webpack_require__(71), + Reverse: __webpack_require__(72), + RotateTo: __webpack_require__(73), + ShortestBetween: __webpack_require__(74), + Wrap: __webpack_require__(29), + WrapDegrees: __webpack_require__(30) }; /***/ }), -/* 41 */ +/* 67 */ /***/ (function(module, exports) { /** @@ -8514,7 +13261,7 @@ module.exports = BetweenPoints; /***/ }), -/* 42 */ +/* 68 */ /***/ (function(module, exports) { /** @@ -8546,7 +13293,7 @@ module.exports = BetweenPointsY; /***/ }), -/* 43 */ +/* 69 */ /***/ (function(module, exports) { /** @@ -8580,7 +13327,7 @@ module.exports = BetweenY; /***/ }), -/* 44 */ +/* 70 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8590,7 +13337,7 @@ module.exports = BetweenY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FloatBetween = __webpack_require__(8); +var FloatBetween = __webpack_require__(17); /** * Returns a random angle in the range [-pi, pi]. @@ -8609,7 +13356,7 @@ module.exports = Random; /***/ }), -/* 45 */ +/* 71 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8619,7 +13366,7 @@ module.exports = Random; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FloatBetween = __webpack_require__(8); +var FloatBetween = __webpack_require__(17); /** * Returns a random angle in the range [-180, 180]. @@ -8638,7 +13385,7 @@ module.exports = RandomDegrees; /***/ }), -/* 46 */ +/* 72 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8647,7 +13394,7 @@ module.exports = RandomDegrees; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Normalize = __webpack_require__(17); +var Normalize = __webpack_require__(28); /** * Reverse the given angle. @@ -8668,7 +13415,7 @@ module.exports = Reverse; /***/ }), -/* 47 */ +/* 73 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8677,7 +13424,7 @@ module.exports = Reverse; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH_CONST = __webpack_require__(1); +var MATH_CONST = __webpack_require__(2); /** * Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call. @@ -8735,7 +13482,7 @@ module.exports = RotateTo; /***/ }), -/* 48 */ +/* 74 */ /***/ (function(module, exports) { /** @@ -8784,7 +13531,7 @@ module.exports = ShortestBetween; /***/ }), -/* 49 */ +/* 75 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8799,19 +13546,19 @@ module.exports = ShortestBetween; module.exports = { - Between: __webpack_require__(50), - BetweenPoints: __webpack_require__(51), - BetweenPointsSquared: __webpack_require__(52), - Chebyshev: __webpack_require__(53), - Power: __webpack_require__(54), - Snake: __webpack_require__(55), - Squared: __webpack_require__(56) + Between: __webpack_require__(76), + BetweenPoints: __webpack_require__(77), + BetweenPointsSquared: __webpack_require__(78), + Chebyshev: __webpack_require__(79), + Power: __webpack_require__(80), + Snake: __webpack_require__(81), + Squared: __webpack_require__(82) }; /***/ }), -/* 50 */ +/* 76 */ /***/ (function(module, exports) { /** @@ -8845,7 +13592,7 @@ module.exports = DistanceBetween; /***/ }), -/* 51 */ +/* 77 */ /***/ (function(module, exports) { /** @@ -8877,7 +13624,7 @@ module.exports = DistanceBetweenPoints; /***/ }), -/* 52 */ +/* 78 */ /***/ (function(module, exports) { /** @@ -8909,7 +13656,7 @@ module.exports = DistanceBetweenPointsSquared; /***/ }), -/* 53 */ +/* 79 */ /***/ (function(module, exports) { /** @@ -8943,7 +13690,7 @@ module.exports = ChebyshevDistance; /***/ }), -/* 54 */ +/* 80 */ /***/ (function(module, exports) { /** @@ -8977,7 +13724,7 @@ module.exports = DistancePower; /***/ }), -/* 55 */ +/* 81 */ /***/ (function(module, exports) { /** @@ -9011,7 +13758,7 @@ module.exports = SnakeDistance; /***/ }), -/* 56 */ +/* 82 */ /***/ (function(module, exports) { /** @@ -9045,7 +13792,7 @@ module.exports = DistanceSquared; /***/ }), -/* 57 */ +/* 83 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -9060,24 +13807,24 @@ module.exports = DistanceSquared; module.exports = { - Back: __webpack_require__(58), - Bounce: __webpack_require__(62), - Circular: __webpack_require__(66), - Cubic: __webpack_require__(70), - Elastic: __webpack_require__(74), - Expo: __webpack_require__(78), - Linear: __webpack_require__(82), - Quadratic: __webpack_require__(84), - Quartic: __webpack_require__(88), - Quintic: __webpack_require__(92), - Sine: __webpack_require__(96), - Stepped: __webpack_require__(100) + Back: __webpack_require__(84), + Bounce: __webpack_require__(88), + Circular: __webpack_require__(92), + Cubic: __webpack_require__(96), + Elastic: __webpack_require__(100), + Expo: __webpack_require__(104), + Linear: __webpack_require__(108), + Quadratic: __webpack_require__(110), + Quartic: __webpack_require__(114), + Quintic: __webpack_require__(118), + Sine: __webpack_require__(122), + Stepped: __webpack_require__(126) }; /***/ }), -/* 58 */ +/* 84 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -9092,15 +13839,15 @@ module.exports = { module.exports = { - In: __webpack_require__(59), - Out: __webpack_require__(60), - InOut: __webpack_require__(61) + In: __webpack_require__(85), + Out: __webpack_require__(86), + InOut: __webpack_require__(87) }; /***/ }), -/* 59 */ +/* 85 */ /***/ (function(module, exports) { /** @@ -9131,7 +13878,7 @@ module.exports = In; /***/ }), -/* 60 */ +/* 86 */ /***/ (function(module, exports) { /** @@ -9162,7 +13909,7 @@ module.exports = Out; /***/ }), -/* 61 */ +/* 87 */ /***/ (function(module, exports) { /** @@ -9202,7 +13949,7 @@ module.exports = InOut; /***/ }), -/* 62 */ +/* 88 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -9217,15 +13964,15 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(63), - Out: __webpack_require__(64), - InOut: __webpack_require__(65) + In: __webpack_require__(89), + Out: __webpack_require__(90), + InOut: __webpack_require__(91) }; /***/ }), -/* 63 */ +/* 89 */ /***/ (function(module, exports) { /** @@ -9270,7 +14017,7 @@ module.exports = In; /***/ }), -/* 64 */ +/* 90 */ /***/ (function(module, exports) { /** @@ -9313,7 +14060,7 @@ module.exports = Out; /***/ }), -/* 65 */ +/* 91 */ /***/ (function(module, exports) { /** @@ -9377,7 +14124,7 @@ module.exports = InOut; /***/ }), -/* 66 */ +/* 92 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -9392,15 +14139,15 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(67), - Out: __webpack_require__(68), - InOut: __webpack_require__(69) + In: __webpack_require__(93), + Out: __webpack_require__(94), + InOut: __webpack_require__(95) }; /***/ }), -/* 67 */ +/* 93 */ /***/ (function(module, exports) { /** @@ -9428,7 +14175,7 @@ module.exports = In; /***/ }), -/* 68 */ +/* 94 */ /***/ (function(module, exports) { /** @@ -9456,7 +14203,7 @@ module.exports = Out; /***/ }), -/* 69 */ +/* 95 */ /***/ (function(module, exports) { /** @@ -9491,7 +14238,7 @@ module.exports = InOut; /***/ }), -/* 70 */ +/* 96 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -9506,15 +14253,15 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(71), - Out: __webpack_require__(72), - InOut: __webpack_require__(73) + In: __webpack_require__(97), + Out: __webpack_require__(98), + InOut: __webpack_require__(99) }; /***/ }), -/* 71 */ +/* 97 */ /***/ (function(module, exports) { /** @@ -9542,7 +14289,7 @@ module.exports = In; /***/ }), -/* 72 */ +/* 98 */ /***/ (function(module, exports) { /** @@ -9570,7 +14317,7 @@ module.exports = Out; /***/ }), -/* 73 */ +/* 99 */ /***/ (function(module, exports) { /** @@ -9605,7 +14352,7 @@ module.exports = InOut; /***/ }), -/* 74 */ +/* 100 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -9620,15 +14367,15 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(75), - Out: __webpack_require__(76), - InOut: __webpack_require__(77) + In: __webpack_require__(101), + Out: __webpack_require__(102), + InOut: __webpack_require__(103) }; /***/ }), -/* 75 */ +/* 101 */ /***/ (function(module, exports) { /** @@ -9683,7 +14430,7 @@ module.exports = In; /***/ }), -/* 76 */ +/* 102 */ /***/ (function(module, exports) { /** @@ -9738,7 +14485,7 @@ module.exports = Out; /***/ }), -/* 77 */ +/* 103 */ /***/ (function(module, exports) { /** @@ -9800,7 +14547,7 @@ module.exports = InOut; /***/ }), -/* 78 */ +/* 104 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -9815,15 +14562,15 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(79), - Out: __webpack_require__(80), - InOut: __webpack_require__(81) + In: __webpack_require__(105), + Out: __webpack_require__(106), + InOut: __webpack_require__(107) }; /***/ }), -/* 79 */ +/* 105 */ /***/ (function(module, exports) { /** @@ -9851,7 +14598,7 @@ module.exports = In; /***/ }), -/* 80 */ +/* 106 */ /***/ (function(module, exports) { /** @@ -9879,7 +14626,7 @@ module.exports = Out; /***/ }), -/* 81 */ +/* 107 */ /***/ (function(module, exports) { /** @@ -9914,7 +14661,7 @@ module.exports = InOut; /***/ }), -/* 82 */ +/* 108 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -9923,11 +14670,11 @@ module.exports = InOut; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -module.exports = __webpack_require__(83); +module.exports = __webpack_require__(109); /***/ }), -/* 83 */ +/* 109 */ /***/ (function(module, exports) { /** @@ -9955,7 +14702,7 @@ module.exports = Linear; /***/ }), -/* 84 */ +/* 110 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -9970,15 +14717,15 @@ module.exports = Linear; module.exports = { - In: __webpack_require__(85), - Out: __webpack_require__(86), - InOut: __webpack_require__(87) + In: __webpack_require__(111), + Out: __webpack_require__(112), + InOut: __webpack_require__(113) }; /***/ }), -/* 85 */ +/* 111 */ /***/ (function(module, exports) { /** @@ -10006,7 +14753,7 @@ module.exports = In; /***/ }), -/* 86 */ +/* 112 */ /***/ (function(module, exports) { /** @@ -10034,7 +14781,7 @@ module.exports = Out; /***/ }), -/* 87 */ +/* 113 */ /***/ (function(module, exports) { /** @@ -10069,7 +14816,7 @@ module.exports = InOut; /***/ }), -/* 88 */ +/* 114 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10084,15 +14831,15 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(89), - Out: __webpack_require__(90), - InOut: __webpack_require__(91) + In: __webpack_require__(115), + Out: __webpack_require__(116), + InOut: __webpack_require__(117) }; /***/ }), -/* 89 */ +/* 115 */ /***/ (function(module, exports) { /** @@ -10120,7 +14867,7 @@ module.exports = In; /***/ }), -/* 90 */ +/* 116 */ /***/ (function(module, exports) { /** @@ -10148,7 +14895,7 @@ module.exports = Out; /***/ }), -/* 91 */ +/* 117 */ /***/ (function(module, exports) { /** @@ -10183,7 +14930,7 @@ module.exports = InOut; /***/ }), -/* 92 */ +/* 118 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10198,15 +14945,15 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(93), - Out: __webpack_require__(94), - InOut: __webpack_require__(95) + In: __webpack_require__(119), + Out: __webpack_require__(120), + InOut: __webpack_require__(121) }; /***/ }), -/* 93 */ +/* 119 */ /***/ (function(module, exports) { /** @@ -10234,7 +14981,7 @@ module.exports = In; /***/ }), -/* 94 */ +/* 120 */ /***/ (function(module, exports) { /** @@ -10262,7 +15009,7 @@ module.exports = Out; /***/ }), -/* 95 */ +/* 121 */ /***/ (function(module, exports) { /** @@ -10297,7 +15044,7 @@ module.exports = InOut; /***/ }), -/* 96 */ +/* 122 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10312,15 +15059,15 @@ module.exports = InOut; module.exports = { - In: __webpack_require__(97), - Out: __webpack_require__(98), - InOut: __webpack_require__(99) + In: __webpack_require__(123), + Out: __webpack_require__(124), + InOut: __webpack_require__(125) }; /***/ }), -/* 97 */ +/* 123 */ /***/ (function(module, exports) { /** @@ -10359,7 +15106,7 @@ module.exports = In; /***/ }), -/* 98 */ +/* 124 */ /***/ (function(module, exports) { /** @@ -10398,7 +15145,7 @@ module.exports = Out; /***/ }), -/* 99 */ +/* 125 */ /***/ (function(module, exports) { /** @@ -10437,7 +15184,7 @@ module.exports = InOut; /***/ }), -/* 100 */ +/* 126 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10450,11 +15197,11 @@ module.exports = InOut; * @namespace Phaser.Math.Easing.Stepped */ -module.exports = __webpack_require__(101); +module.exports = __webpack_require__(127); /***/ }), -/* 101 */ +/* 127 */ /***/ (function(module, exports) { /** @@ -10496,7 +15243,7 @@ module.exports = Stepped; /***/ }), -/* 102 */ +/* 128 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10511,17 +15258,17 @@ module.exports = Stepped; module.exports = { - Ceil: __webpack_require__(103), - Equal: __webpack_require__(20), - Floor: __webpack_require__(104), - GreaterThan: __webpack_require__(105), - LessThan: __webpack_require__(106) + Ceil: __webpack_require__(129), + Equal: __webpack_require__(31), + Floor: __webpack_require__(130), + GreaterThan: __webpack_require__(131), + LessThan: __webpack_require__(132) }; /***/ }), -/* 103 */ +/* 129 */ /***/ (function(module, exports) { /** @@ -10552,7 +15299,7 @@ module.exports = Ceil; /***/ }), -/* 104 */ +/* 130 */ /***/ (function(module, exports) { /** @@ -10583,7 +15330,7 @@ module.exports = Floor; /***/ }), -/* 105 */ +/* 131 */ /***/ (function(module, exports) { /** @@ -10617,7 +15364,7 @@ module.exports = GreaterThan; /***/ }), -/* 106 */ +/* 132 */ /***/ (function(module, exports) { /** @@ -10651,7 +15398,7 @@ module.exports = LessThan; /***/ }), -/* 107 */ +/* 133 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10666,19 +15413,19 @@ module.exports = LessThan; module.exports = { - Bezier: __webpack_require__(108), - CatmullRom: __webpack_require__(109), - CubicBezier: __webpack_require__(110), - Linear: __webpack_require__(111), - QuadraticBezier: __webpack_require__(112), - SmoothStep: __webpack_require__(113), - SmootherStep: __webpack_require__(114) + Bezier: __webpack_require__(134), + CatmullRom: __webpack_require__(135), + CubicBezier: __webpack_require__(136), + Linear: __webpack_require__(137), + QuadraticBezier: __webpack_require__(138), + SmoothStep: __webpack_require__(139), + SmootherStep: __webpack_require__(140) }; /***/ }), -/* 108 */ +/* 134 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10687,7 +15434,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bernstein = __webpack_require__(21); +var Bernstein = __webpack_require__(32); /** * A bezier interpolation method. @@ -10717,7 +15464,7 @@ module.exports = BezierInterpolation; /***/ }), -/* 109 */ +/* 135 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10726,7 +15473,7 @@ module.exports = BezierInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CatmullRom = __webpack_require__(23); +var CatmullRom = __webpack_require__(34); /** * A Catmull-Rom interpolation method. @@ -10774,7 +15521,7 @@ module.exports = CatmullRomInterpolation; /***/ }), -/* 110 */ +/* 136 */ /***/ (function(module, exports) { /** @@ -10844,7 +15591,7 @@ module.exports = CubicBezierInterpolation; /***/ }), -/* 111 */ +/* 137 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10853,7 +15600,7 @@ module.exports = CubicBezierInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Linear = __webpack_require__(24); +var Linear = __webpack_require__(35); /** * A linear interpolation method. @@ -10891,7 +15638,7 @@ module.exports = LinearInterpolation; /***/ }), -/* 112 */ +/* 138 */ /***/ (function(module, exports) { /** @@ -10950,7 +15697,7 @@ module.exports = QuadraticBezierInterpolation; /***/ }), -/* 113 */ +/* 139 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10959,7 +15706,7 @@ module.exports = QuadraticBezierInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmoothStep = __webpack_require__(25); +var SmoothStep = __webpack_require__(36); /** * A Smooth Step interpolation method. @@ -10983,7 +15730,7 @@ module.exports = SmoothStepInterpolation; /***/ }), -/* 114 */ +/* 140 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10992,7 +15739,7 @@ module.exports = SmoothStepInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmootherStep = __webpack_require__(26); +var SmootherStep = __webpack_require__(37); /** * A Smoother Step interpolation method. @@ -11016,7 +15763,7 @@ module.exports = SmootherStepInterpolation; /***/ }), -/* 115 */ +/* 141 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -11031,15 +15778,15 @@ module.exports = SmootherStepInterpolation; module.exports = { - GetNext: __webpack_require__(116), - IsSize: __webpack_require__(117), - IsValue: __webpack_require__(118) + GetNext: __webpack_require__(142), + IsSize: __webpack_require__(143), + IsValue: __webpack_require__(144) }; /***/ }), -/* 116 */ +/* 142 */ /***/ (function(module, exports) { /** @@ -11069,7 +15816,7 @@ module.exports = GetPowerOfTwo; /***/ }), -/* 117 */ +/* 143 */ /***/ (function(module, exports) { /** @@ -11099,7 +15846,7 @@ module.exports = IsSizePowerOfTwo; /***/ }), -/* 118 */ +/* 144 */ /***/ (function(module, exports) { /** @@ -11127,7 +15874,7 @@ module.exports = IsValuePowerOfTwo; /***/ }), -/* 119 */ +/* 145 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -11142,15 +15889,15 @@ module.exports = IsValuePowerOfTwo; module.exports = { - Ceil: __webpack_require__(120), - Floor: __webpack_require__(121), - To: __webpack_require__(122) + Ceil: __webpack_require__(146), + Floor: __webpack_require__(147), + To: __webpack_require__(148) }; /***/ }), -/* 120 */ +/* 146 */ /***/ (function(module, exports) { /** @@ -11194,7 +15941,7 @@ module.exports = SnapCeil; /***/ }), -/* 121 */ +/* 147 */ /***/ (function(module, exports) { /** @@ -11238,7 +15985,7 @@ module.exports = SnapFloor; /***/ }), -/* 122 */ +/* 148 */ /***/ (function(module, exports) { /** @@ -11281,7 +16028,7 @@ module.exports = SnapTo; /***/ }), -/* 123 */ +/* 149 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -11791,7 +16538,7 @@ module.exports = RandomDataGenerator; /***/ }), -/* 124 */ +/* 150 */ /***/ (function(module, exports) { /** @@ -11826,7 +16573,7 @@ module.exports = Average; /***/ }), -/* 125 */ +/* 151 */ /***/ (function(module, exports) { /** @@ -11855,7 +16602,7 @@ module.exports = Between; /***/ }), -/* 126 */ +/* 152 */ /***/ (function(module, exports) { /** @@ -11892,7 +16639,7 @@ module.exports = CeilTo; /***/ }), -/* 127 */ +/* 153 */ /***/ (function(module, exports) { /** @@ -11921,7 +16668,7 @@ module.exports = Difference; /***/ }), -/* 128 */ +/* 154 */ /***/ (function(module, exports) { /** @@ -11958,7 +16705,7 @@ module.exports = FloorTo; /***/ }), -/* 129 */ +/* 155 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -11967,7 +16714,7 @@ module.exports = FloorTo; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(9); +var Clamp = __webpack_require__(3); /** * Return a value based on the range between `min` and `max` and the percentage given. @@ -11992,7 +16739,7 @@ module.exports = FromPercent; /***/ }), -/* 130 */ +/* 156 */ /***/ (function(module, exports) { /** @@ -12025,7 +16772,7 @@ module.exports = GetSpeed; /***/ }), -/* 131 */ +/* 157 */ /***/ (function(module, exports) { /** @@ -12056,7 +16803,7 @@ module.exports = IsEven; /***/ }), -/* 132 */ +/* 158 */ /***/ (function(module, exports) { /** @@ -12085,7 +16832,7 @@ module.exports = IsEvenStrict; /***/ }), -/* 133 */ +/* 159 */ /***/ (function(module, exports) { /** @@ -12115,7 +16862,7 @@ module.exports = MaxAdd; /***/ }), -/* 134 */ +/* 160 */ /***/ (function(module, exports) { /** @@ -12145,7 +16892,7 @@ module.exports = MinSub; /***/ }), -/* 135 */ +/* 161 */ /***/ (function(module, exports) { /** @@ -12204,7 +16951,7 @@ module.exports = Percent; /***/ }), -/* 136 */ +/* 162 */ /***/ (function(module, exports) { /** @@ -12244,7 +16991,7 @@ module.exports = RandomXY; /***/ }), -/* 137 */ +/* 163 */ /***/ (function(module, exports) { /** @@ -12283,7 +17030,7 @@ module.exports = RandomXYZ; /***/ }), -/* 138 */ +/* 164 */ /***/ (function(module, exports) { /** @@ -12320,7 +17067,7 @@ module.exports = RandomXYZW; /***/ }), -/* 139 */ +/* 165 */ /***/ (function(module, exports) { /** @@ -12355,51 +17102,7 @@ module.exports = Rotate; /***/ }), -/* 140 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Rotate a `point` around `x` and `y` to the given `angle`, at the same distance. - * - * In polar notation, this maps a point from (r, t) to (r, angle), vs. the origin (x, y). - * - * @function Phaser.Math.RotateAround - * @since 3.0.0 - * - * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return] - * - * @param {(Phaser.Geom.Point|object)} point - The point to be rotated. - * @param {number} x - The horizontal coordinate to rotate around. - * @param {number} y - The vertical coordinate to rotate around. - * @param {number} angle - The angle of rotation in radians. - * - * @return {Phaser.Types.Math.Vector2Like} The given point. - */ -var RotateAround = function (point, x, y, angle) -{ - var c = Math.cos(angle); - var s = Math.sin(angle); - - var tx = point.x - x; - var ty = point.y - y; - - point.x = tx * c - ty * s + x; - point.y = tx * s + ty * c + y; - - return point; -}; - -module.exports = RotateAround; - - -/***/ }), -/* 141 */ +/* 166 */ /***/ (function(module, exports) { /** @@ -12440,7 +17143,7 @@ module.exports = RotateAroundDistance; /***/ }), -/* 142 */ +/* 167 */ /***/ (function(module, exports) { /** @@ -12477,36 +17180,7 @@ module.exports = RotateTo; /***/ }), -/* 143 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Round a given number so it is further away from zero. That is, positive numbers are rounded up, and negative numbers are rounded down. - * - * @function Phaser.Math.RoundAwayFromZero - * @since 3.0.0 - * - * @param {number} value - The number to round. - * - * @return {number} The rounded number, rounded away from zero. - */ -var RoundAwayFromZero = function (value) -{ - // "Opposite" of truncate. - return (value > 0) ? Math.ceil(value) : Math.floor(value); -}; - -module.exports = RoundAwayFromZero; - - -/***/ }), -/* 144 */ +/* 168 */ /***/ (function(module, exports) { /** @@ -12558,7 +17232,7 @@ module.exports = RoundTo; /***/ }), -/* 145 */ +/* 169 */ /***/ (function(module, exports) { /** @@ -12611,7 +17285,7 @@ module.exports = SinCosTableGenerator; /***/ }), -/* 146 */ +/* 170 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -12620,7 +17294,7 @@ module.exports = SinCosTableGenerator; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector2 = __webpack_require__(3); +var Vector2 = __webpack_require__(1); /** * Returns a Vector2 containing the x and y position of the given index in a `width` x `height` sized grid. @@ -12669,7 +17343,7 @@ module.exports = ToXY; /***/ }), -/* 147 */ +/* 171 */ /***/ (function(module, exports) { /** @@ -12699,7 +17373,7 @@ module.exports = Within; /***/ }), -/* 148 */ +/* 172 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -13244,7 +17918,7 @@ module.exports = Vector4; /***/ }), -/* 149 */ +/* 173 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -13253,9 +17927,9 @@ module.exports = Vector4; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector3 = __webpack_require__(11); -var Matrix4 = __webpack_require__(30); -var Quaternion = __webpack_require__(31); +var Vector3 = __webpack_require__(19); +var Matrix4 = __webpack_require__(42); +var Quaternion = __webpack_require__(43); var tmpMat4 = new Matrix4(); var tmpQuat = new Quaternion(); @@ -13292,7 +17966,7 @@ module.exports = RotateVec3; /***/ }), -/* 150 */ +/* 174 */ /***/ (function(module, exports) { /** @@ -13323,7 +17997,7 @@ module.exports = 'resize'; /***/ }), -/* 151 */ +/* 175 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -13332,9 +18006,9 @@ module.exports = 'resize'; * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ -var BasePlugin = __webpack_require__(152); +var BasePlugin = __webpack_require__(176); var Class = __webpack_require__(0); -var SceneEvents = __webpack_require__(153); +var SceneEvents = __webpack_require__(177); /** * @classdesc @@ -13451,7 +18125,7 @@ module.exports = ScenePlugin; /***/ }), -/* 152 */ +/* 176 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -13581,7 +18255,7 @@ module.exports = BasePlugin; /***/ }), -/* 153 */ +/* 177 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -13596,33 +18270,33 @@ module.exports = BasePlugin; module.exports = { - ADDED_TO_SCENE: __webpack_require__(154), - BOOT: __webpack_require__(155), - CREATE: __webpack_require__(156), - DESTROY: __webpack_require__(157), - PAUSE: __webpack_require__(158), - POST_UPDATE: __webpack_require__(159), - PRE_UPDATE: __webpack_require__(160), - READY: __webpack_require__(161), - REMOVED_FROM_SCENE: __webpack_require__(162), - RENDER: __webpack_require__(163), - RESUME: __webpack_require__(164), - SHUTDOWN: __webpack_require__(165), - SLEEP: __webpack_require__(166), - START: __webpack_require__(167), - TRANSITION_COMPLETE: __webpack_require__(168), - TRANSITION_INIT: __webpack_require__(169), - TRANSITION_OUT: __webpack_require__(170), - TRANSITION_START: __webpack_require__(171), - TRANSITION_WAKE: __webpack_require__(172), - UPDATE: __webpack_require__(173), - WAKE: __webpack_require__(174) + ADDED_TO_SCENE: __webpack_require__(178), + BOOT: __webpack_require__(179), + CREATE: __webpack_require__(180), + DESTROY: __webpack_require__(181), + PAUSE: __webpack_require__(182), + POST_UPDATE: __webpack_require__(183), + PRE_UPDATE: __webpack_require__(184), + READY: __webpack_require__(185), + REMOVED_FROM_SCENE: __webpack_require__(186), + RENDER: __webpack_require__(187), + RESUME: __webpack_require__(188), + SHUTDOWN: __webpack_require__(189), + SLEEP: __webpack_require__(190), + START: __webpack_require__(191), + TRANSITION_COMPLETE: __webpack_require__(192), + TRANSITION_INIT: __webpack_require__(193), + TRANSITION_OUT: __webpack_require__(194), + TRANSITION_START: __webpack_require__(195), + TRANSITION_WAKE: __webpack_require__(196), + UPDATE: __webpack_require__(197), + WAKE: __webpack_require__(198) }; /***/ }), -/* 154 */ +/* 178 */ /***/ (function(module, exports) { /** @@ -13648,7 +18322,7 @@ module.exports = 'addedtoscene'; /***/ }), -/* 155 */ +/* 179 */ /***/ (function(module, exports) { /** @@ -13673,7 +18347,7 @@ module.exports = 'boot'; /***/ }), -/* 156 */ +/* 180 */ /***/ (function(module, exports) { /** @@ -13702,7 +18376,7 @@ module.exports = 'create'; /***/ }), -/* 157 */ +/* 181 */ /***/ (function(module, exports) { /** @@ -13729,7 +18403,7 @@ module.exports = 'destroy'; /***/ }), -/* 158 */ +/* 182 */ /***/ (function(module, exports) { /** @@ -13756,7 +18430,7 @@ module.exports = 'pause'; /***/ }), -/* 159 */ +/* 183 */ /***/ (function(module, exports) { /** @@ -13793,7 +18467,7 @@ module.exports = 'postupdate'; /***/ }), -/* 160 */ +/* 184 */ /***/ (function(module, exports) { /** @@ -13830,7 +18504,7 @@ module.exports = 'preupdate'; /***/ }), -/* 161 */ +/* 185 */ /***/ (function(module, exports) { /** @@ -13858,7 +18532,7 @@ module.exports = 'ready'; /***/ }), -/* 162 */ +/* 186 */ /***/ (function(module, exports) { /** @@ -13884,7 +18558,7 @@ module.exports = 'removedfromscene'; /***/ }), -/* 163 */ +/* 187 */ /***/ (function(module, exports) { /** @@ -13920,7 +18594,7 @@ module.exports = 'render'; /***/ }), -/* 164 */ +/* 188 */ /***/ (function(module, exports) { /** @@ -13947,7 +18621,7 @@ module.exports = 'resume'; /***/ }), -/* 165 */ +/* 189 */ /***/ (function(module, exports) { /** @@ -13977,7 +18651,7 @@ module.exports = 'shutdown'; /***/ }), -/* 166 */ +/* 190 */ /***/ (function(module, exports) { /** @@ -14004,7 +18678,7 @@ module.exports = 'sleep'; /***/ }), -/* 167 */ +/* 191 */ /***/ (function(module, exports) { /** @@ -14029,7 +18703,7 @@ module.exports = 'start'; /***/ }), -/* 168 */ +/* 192 */ /***/ (function(module, exports) { /** @@ -14065,7 +18739,7 @@ module.exports = 'transitioncomplete'; /***/ }), -/* 169 */ +/* 193 */ /***/ (function(module, exports) { /** @@ -14102,7 +18776,7 @@ module.exports = 'transitioninit'; /***/ }), -/* 170 */ +/* 194 */ /***/ (function(module, exports) { /** @@ -14136,7 +18810,7 @@ module.exports = 'transitionout'; /***/ }), -/* 171 */ +/* 195 */ /***/ (function(module, exports) { /** @@ -14176,7 +18850,7 @@ module.exports = 'transitionstart'; /***/ }), -/* 172 */ +/* 196 */ /***/ (function(module, exports) { /** @@ -14211,7 +18885,7 @@ module.exports = 'transitionwake'; /***/ }), -/* 173 */ +/* 197 */ /***/ (function(module, exports) { /** @@ -14248,7 +18922,7 @@ module.exports = 'update'; /***/ }), -/* 174 */ +/* 198 */ /***/ (function(module, exports) { /** @@ -14275,7 +18949,7 @@ module.exports = 'wake'; /***/ }), -/* 175 */ +/* 199 */ /***/ (function(module, exports) { /*** IMPORTS FROM imports-loader ***/ @@ -24800,7 +29474,7 @@ module.exports = spine; /***/ }), -/* 176 */ +/* 200 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -24810,12 +29484,12 @@ module.exports = spine; */ var Class = __webpack_require__(0); -var GetFastValue = __webpack_require__(4); -var ImageFile = __webpack_require__(177); -var IsPlainObject = __webpack_require__(2); -var JSONFile = __webpack_require__(191); -var MultiFile = __webpack_require__(192); -var TextFile = __webpack_require__(193); +var GetFastValue = __webpack_require__(9); +var ImageFile = __webpack_require__(201); +var IsPlainObject = __webpack_require__(7); +var JSONFile = __webpack_require__(215); +var MultiFile = __webpack_require__(216); +var TextFile = __webpack_require__(217); /** * @typedef {object} Phaser.Loader.FileTypes.SpineFileConfig @@ -25053,7 +29727,7 @@ module.exports = SpineFile; /***/ }), -/* 177 */ +/* 201 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25063,11 +29737,11 @@ module.exports = SpineFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(6); -var File = __webpack_require__(13); -var FileTypesManager = __webpack_require__(14); -var GetFastValue = __webpack_require__(4); -var IsPlainObject = __webpack_require__(2); +var CONST = __webpack_require__(13); +var File = __webpack_require__(20); +var FileTypesManager = __webpack_require__(21); +var GetFastValue = __webpack_require__(9); +var IsPlainObject = __webpack_require__(7); /** * @classdesc @@ -25327,7 +30001,7 @@ module.exports = ImageFile; /***/ }), -/* 178 */ +/* 202 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25342,22 +30016,22 @@ module.exports = ImageFile; module.exports = { - ADD: __webpack_require__(179), - COMPLETE: __webpack_require__(180), - FILE_COMPLETE: __webpack_require__(181), - FILE_KEY_COMPLETE: __webpack_require__(182), - FILE_LOAD_ERROR: __webpack_require__(183), - FILE_LOAD: __webpack_require__(184), - FILE_PROGRESS: __webpack_require__(185), - POST_PROCESS: __webpack_require__(186), - PROGRESS: __webpack_require__(187), - START: __webpack_require__(188) + ADD: __webpack_require__(203), + COMPLETE: __webpack_require__(204), + FILE_COMPLETE: __webpack_require__(205), + FILE_KEY_COMPLETE: __webpack_require__(206), + FILE_LOAD_ERROR: __webpack_require__(207), + FILE_LOAD: __webpack_require__(208), + FILE_PROGRESS: __webpack_require__(209), + POST_PROCESS: __webpack_require__(210), + PROGRESS: __webpack_require__(211), + START: __webpack_require__(212) }; /***/ }), -/* 179 */ +/* 203 */ /***/ (function(module, exports) { /** @@ -25387,7 +30061,7 @@ module.exports = 'addfile'; /***/ }), -/* 180 */ +/* 204 */ /***/ (function(module, exports) { /** @@ -25415,7 +30089,7 @@ module.exports = 'complete'; /***/ }), -/* 181 */ +/* 205 */ /***/ (function(module, exports) { /** @@ -25444,7 +30118,7 @@ module.exports = 'filecomplete'; /***/ }), -/* 182 */ +/* 206 */ /***/ (function(module, exports) { /** @@ -25498,7 +30172,7 @@ module.exports = 'filecomplete-'; /***/ }), -/* 183 */ +/* 207 */ /***/ (function(module, exports) { /** @@ -25523,7 +30197,7 @@ module.exports = 'loaderror'; /***/ }), -/* 184 */ +/* 208 */ /***/ (function(module, exports) { /** @@ -25549,7 +30223,7 @@ module.exports = 'load'; /***/ }), -/* 185 */ +/* 209 */ /***/ (function(module, exports) { /** @@ -25576,7 +30250,7 @@ module.exports = 'fileprogress'; /***/ }), -/* 186 */ +/* 210 */ /***/ (function(module, exports) { /** @@ -25605,7 +30279,7 @@ module.exports = 'postprocess'; /***/ }), -/* 187 */ +/* 211 */ /***/ (function(module, exports) { /** @@ -25630,7 +30304,7 @@ module.exports = 'progress'; /***/ }), -/* 188 */ +/* 212 */ /***/ (function(module, exports) { /** @@ -25657,7 +30331,7 @@ module.exports = 'start'; /***/ }), -/* 189 */ +/* 213 */ /***/ (function(module, exports) { /** @@ -25698,7 +30372,7 @@ module.exports = GetURL; /***/ }), -/* 190 */ +/* 214 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25707,7 +30381,7 @@ module.exports = GetURL; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MergeXHRSettings = __webpack_require__(32); +var MergeXHRSettings = __webpack_require__(44); /** * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings @@ -25779,7 +30453,7 @@ module.exports = XHRLoader; /***/ }), -/* 191 */ +/* 215 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25789,12 +30463,12 @@ module.exports = XHRLoader; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(6); -var File = __webpack_require__(13); -var FileTypesManager = __webpack_require__(14); -var GetFastValue = __webpack_require__(4); -var GetValue = __webpack_require__(12); -var IsPlainObject = __webpack_require__(2); +var CONST = __webpack_require__(13); +var File = __webpack_require__(20); +var FileTypesManager = __webpack_require__(21); +var GetFastValue = __webpack_require__(9); +var GetValue = __webpack_require__(6); +var IsPlainObject = __webpack_require__(7); /** * @classdesc @@ -26009,7 +30683,7 @@ module.exports = JSONFile; /***/ }), -/* 192 */ +/* 216 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26243,7 +30917,7 @@ module.exports = MultiFile; /***/ }), -/* 193 */ +/* 217 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26253,11 +30927,11 @@ module.exports = MultiFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(6); -var File = __webpack_require__(13); -var FileTypesManager = __webpack_require__(14); -var GetFastValue = __webpack_require__(4); -var IsPlainObject = __webpack_require__(2); +var CONST = __webpack_require__(13); +var File = __webpack_require__(20); +var FileTypesManager = __webpack_require__(21); +var GetFastValue = __webpack_require__(9); +var IsPlainObject = __webpack_require__(7); /** * @classdesc @@ -26418,54 +31092,54 @@ module.exports = TextFile; /***/ }), -/* 194 */ +/* 218 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AngleBetween = __webpack_require__(16); -var Clamp = __webpack_require__(9); +var AngleBetween = __webpack_require__(27); +var Clamp = __webpack_require__(3); var Class = __webpack_require__(0); -var ComponentsComputedSize = __webpack_require__(195); -var ComponentsDepth = __webpack_require__(196); -var ComponentsFlip = __webpack_require__(197); -var ComponentsScrollFactor = __webpack_require__(198); -var ComponentsTransform = __webpack_require__(199); -var ComponentsVisible = __webpack_require__(201); -var CounterClockwise = __webpack_require__(7); -var DegToRad = __webpack_require__(27); -var GameObject = __webpack_require__(202); -var RadToDeg = __webpack_require__(10); -var SpineEvents = __webpack_require__(225); -var SpineGameObjectRender = __webpack_require__(232); +var ComponentsComputedSize = __webpack_require__(46); +var ComponentsDepth = __webpack_require__(47); +var ComponentsFlip = __webpack_require__(48); +var ComponentsScrollFactor = __webpack_require__(49); +var ComponentsTransform = __webpack_require__(50); +var ComponentsVisible = __webpack_require__(52); +var CounterClockwise = __webpack_require__(11); +var DegToRad = __webpack_require__(18); +var GameObject = __webpack_require__(53); +var RadToDeg = __webpack_require__(12); +var SpineEvents = __webpack_require__(238); +var SpineGameObjectRender = __webpack_require__(245); /** * @classdesc * A Spine Game Object is a Phaser level object that can be added to your Phaser Scenes. It encapsulates * a Spine Skeleton with Spine Animation Data and Animation State, with helper methods to allow you to * easily change the skin, slot attachment, bone positions and more. - * + * * Spine Game Objects can be created via the Game Object Factory, Game Object Creator, or directly. * You can only create them if the Spine plugin has been loaded into Phaser. - * + * * The quickest way is the Game Object Factory: - * + * * ```javascript * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true); * ``` - * + * * Here we are creating a new Spine Game Object positioned at 512 x 550. It's using the `jelly` * Spine data, which has previously been loaded into your Scene. The `jelly-think` argument is * an optional animation to start playing on the skeleton. The final argument `true` sets the * animation to loop. Look at the documentation for further details on each of these options. - * + * * For more control, you can use the Game Object Creator, passing in a Spine Game Object * Configuration object: - * + * * ```javascript * let jelly = this.make.spine({ * x: 512, y: 550, key: 'jelly', @@ -26475,28 +31149,28 @@ var SpineGameObjectRender = __webpack_require__(232); * slotName: 'hat', attachmentName: 'images/La_14' * }); * ``` - * + * * Here, you've got the ability to specify extra details, such as the slot name, attachments or * overall scale. - * + * * If you wish to instantiate a Spine Game Object directly you can do so, but in order for it to * update and render, it must be added to the display and update lists of your Scene: - * + * * ```javascript * let jelly = new SpineGameObject(this, this.spine, 512, 550, 'jelly', 'jelly-think', true); * this.sys.displayList.add(jelly); * this.sys.updateList.add(jelly); * ``` - * + * * It's possible to enable Spine Game Objects for input, but you should be aware that it will use * the bounds of the skeletons current pose to create the hit area from. Sometimes this is ok, but * often not. Make use of the `InputPlugin.enableDebug` method to view the input shape being created. * If it's not suitable, provide your own shape to the `setInteractive` method. - * + * * Due to the way Spine handles scaling, it's not recommended to enable a Spine Game Object for * physics directly. Instead, you should look at creating a proxy body and syncing the Spine Game * Object position with it. See the examples for further details. - * + * * If your Spine Game Object has black outlines around the different parts of the texture when it * renders then you have exported the files from Spine with pre-multiplied alpha enabled, but have * forgotten to set that flag when loading the Spine data. Please see the loader docs for more details. @@ -26596,7 +31270,7 @@ var SpineGameObject = new Class({ * @since 3.19.0 */ this.bounds = null; - + /** * A Game Object level flag that allows you to enable debug drawing * to the Skeleton Debug Renderer by toggling it. @@ -26654,7 +31328,7 @@ var SpineGameObject = new Class({ * @readonly * @since 3.19.0 */ - this.blendMode = 0; + this.blendMode = -1; this.setPosition(x, y); @@ -26680,9 +31354,9 @@ var SpineGameObject = new Class({ /** * Set the Alpha level for the whole Skeleton 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. * * @method SpineGameObject#setAlpha @@ -26715,7 +31389,7 @@ var SpineGameObject = new Class({ /** * The alpha value of the Skeleton. - * + * * A value between 0 and 1. * * This is a global value, impacting the entire Skeleton, not just a region of it. @@ -26754,7 +31428,7 @@ var SpineGameObject = new Class({ /** * The amount of red used when rendering the Skeleton. - * + * * A value between 0 and 1. * * This is a global value, impacting the entire Skeleton, not just a region of it. @@ -26784,7 +31458,7 @@ var SpineGameObject = new Class({ /** * The amount of green used when rendering the Skeleton. - * + * * A value between 0 and 1. * * This is a global value, impacting the entire Skeleton, not just a region of it. @@ -26814,7 +31488,7 @@ var SpineGameObject = new Class({ /** * The amount of blue used when rendering the Skeleton. - * + * * A value between 0 and 1. * * This is a global value, impacting the entire Skeleton, not just a region of it. @@ -26850,7 +31524,7 @@ var SpineGameObject = new Class({ * * @param {integer} [color=0xffffff] - The color being applied to the Skeleton or named Slot. Set to white to disable any previously set color. * @param {string} [slotName] - The name of the slot to set the color on. If not give, will be set on the whole skeleton. - * + * * @return {this} This Game Object instance. */ setColor: function (color, slotName) @@ -26892,7 +31566,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#setSkeletonFromJSON * @since 3.19.0 - * + * * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton. * @param {object} skeletonJSON - The JSON data for the Skeleton. * @param {string} [animationName] - Optional name of the animation to set on the Skeleton. @@ -26907,13 +31581,13 @@ var SpineGameObject = new Class({ /** * Sets this Game Object to use the given Skeleton based on its cache key. - * + * * Typically, once set, the Skeleton doesn't change. Instead, you change the skin, * or slot attachment, or any other property to adjust it. * * @method SpineGameObject#setSkeleton * @since 3.19.0 - * + * * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton. * @param {object} skeletonJSON - The JSON data for the Skeleton. * @param {string} [animationName] - Optional name of the animation to set on the Skeleton. @@ -26990,7 +31664,7 @@ var SpineGameObject = new Class({ * @fires SpinePluginEvents#COMPLETE * @private * @since 3.19.0 - * + * * @param {any} entry - The event data from Spine. */ onComplete: function (entry) @@ -27005,7 +31679,7 @@ var SpineGameObject = new Class({ * @fires SpinePluginEvents#DISPOSE * @private * @since 3.19.0 - * + * * @param {any} entry - The event data from Spine. */ onDispose: function (entry) @@ -27020,7 +31694,7 @@ var SpineGameObject = new Class({ * @fires SpinePluginEvents#END * @private * @since 3.19.0 - * + * * @param {any} entry - The event data from Spine. */ onEnd: function (entry) @@ -27035,7 +31709,7 @@ var SpineGameObject = new Class({ * @fires SpinePluginEvents#EVENT * @private * @since 3.19.0 - * + * * @param {any} entry - The event data from Spine. * @param {spine.Event} event - The Spine event. */ @@ -27051,7 +31725,7 @@ var SpineGameObject = new Class({ * @fires SpinePluginEvents#INTERRUPTED * @private * @since 3.19.0 - * + * * @param {any} entry - The event data from Spine. */ onInterrupted: function (entry) @@ -27066,7 +31740,7 @@ var SpineGameObject = new Class({ * @fires SpinePluginEvents#START * @private * @since 3.19.0 - * + * * @param {any} entry - The event data from Spine. */ onStart: function (entry) @@ -27076,15 +31750,15 @@ var SpineGameObject = new Class({ /** * Refreshes the data about the current Skeleton. - * + * * This will reset the rotation, position and size of the Skeleton to match this Game Object. - * + * * Call this method if you need to access the Skeleton data directly, and it may have changed * recently. * * @method SpineGameObject#refresh * @since 3.19.0 - * + * * @return {this} This Game Object. */ refresh: function () @@ -27104,20 +31778,20 @@ var SpineGameObject = new Class({ /** * Sets the size of this Game Object. - * + * * If no arguments are given it uses the current skeleton data dimensions. - * + * * You can use this method to set a fixed size of this Game Object, such as for input detection, * when the skeleton data doesn't match what is required in-game. * * @method SpineGameObject#setSize * @since 3.19.0 - * + * * @param {number} [width] - The width of the Skeleton. If not given it defaults to the Skeleton Data width. * @param {number} [height] - The height of the Skeleton. If not given it defaults to the Skeleton Data height. * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate. * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate. - * + * * @return {this} This Game Object. */ setSize: function (width, height, offsetX, offsetY) @@ -27140,15 +31814,15 @@ var SpineGameObject = new Class({ /** * Sets the offset of this Game Object from the Skeleton position. - * + * * You can use this method to adjust how the position of this Game Object relates to the Skeleton it is using. * * @method SpineGameObject#setOffset * @since 3.19.0 - * + * * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate. * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate. - * + * * @return {this} This Game Object. */ setOffset: function (offsetX, offsetY) @@ -27167,13 +31841,13 @@ var SpineGameObject = new Class({ /** * Internal method that syncs all of the Game Object position and scale data to the Skeleton. * It then syncs the skeleton bounds back to this Game Object. - * + * * This method is called automatically as needed internally, however, it's also exposed should * you require overriding the size settings. * * @method SpineGameObject#updateSize * @since 3.19.0 - * + * * @return {this} This Game Object. */ updateSize: function () @@ -27262,7 +31936,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getBoneList * @since 3.19.0 - * + * * @return {string[]} An array containing the names of all the bones in the Skeleton Data. */ getBoneList: function () @@ -27287,7 +31961,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getSkinList * @since 3.19.0 - * + * * @return {string[]} An array containing the names of all the skins in the Skeleton Data. */ getSkinList: function () @@ -27312,7 +31986,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getSlotList * @since 3.19.0 - * + * * @return {string[]} An array containing the names of all the slots in the Skeleton. */ getSlotList: function () @@ -27334,7 +32008,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getAnimationList * @since 3.19.0 - * + * * @return {string[]} An array containing the names of all the animations in the Skeleton Data. */ getAnimationList: function () @@ -27359,9 +32033,9 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getCurrentAnimation * @since 3.19.0 - * + * * @param {integer} [trackIndex=0] - The track to return the current animation on. - * + * * @return {?spine.Animation} The current Animation on the given track, or `undefined` if there is no current animation. */ getCurrentAnimation: function (trackIndex) @@ -27379,7 +32053,7 @@ var SpineGameObject = new Class({ /** * Sets the current animation for a track, discarding any queued animations. * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from). - * + * * Animations are referenced by a unique string-based key, as defined in the Spine software. * * @method SpineGameObject#play @@ -27402,7 +32076,7 @@ var SpineGameObject = new Class({ /** * Sets the current animation for a track, discarding any queued animations. * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from). - * + * * Animations are referenced by a unique string-based key, as defined in the Spine software. * * @method SpineGameObject#setAnimation @@ -27424,7 +32098,7 @@ var SpineGameObject = new Class({ if (ignoreIfPlaying && this.state) { var currentTrack = this.state.getCurrent(0); - + if (currentTrack && currentTrack.animation.name === animationName && !currentTrack.isComplete()) { return; @@ -27440,9 +32114,9 @@ var SpineGameObject = new Class({ /** * Adds an animation to be played after the current or last queued animation for a track. * If the track is empty, it is equivalent to calling setAnimation. - * + * * Animations are referenced by a unique string-based key, as defined in the Spine software. - * + * * The delay is a float. If > 0, sets delay. If <= 0, the delay set is the duration of the previous * track entry minus any mix duration (from the AnimationStateData) plus the specified delay * (ie the mix ends at (delay = 0) or before (delay < 0) the previous track entry duration). @@ -27466,13 +32140,13 @@ var SpineGameObject = new Class({ /** * Sets an empty animation for a track, discarding any queued animations, and sets the track * entry's mixDuration. An empty animation has no timelines and serves as a placeholder for mixing in or out. - * + * * Mixing out is done by setting an empty animation with a mix duration using either setEmptyAnimation, * setEmptyAnimations, or addEmptyAnimation. Mixing to an empty animation causes the previous animation to be * applied less and less over the mix duration. Properties keyed in the previous animation transition to * the value from lower tracks or to the setup pose value if no lower tracks key the property. * A mix duration of 0 still mixes out over one frame. - * + * * Mixing in is done by first setting an empty animation, then adding an animation using addAnimation * and on the returned track entry, set the mixDuration. Mixing from an empty animation causes the new * animation to be applied more and more over the mix duration. Properties keyed in the new animation @@ -27494,7 +32168,7 @@ var SpineGameObject = new Class({ /** * Removes all animations from the track, leaving skeletons in their current pose. - * + * * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose, * rather than leaving them in their current pose. * @@ -27511,10 +32185,10 @@ var SpineGameObject = new Class({ return this; }, - + /** * Removes all animations from all tracks, leaving skeletons in their current pose. - * + * * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose, * rather than leaving them in their current pose. * @@ -27532,11 +32206,11 @@ var SpineGameObject = new Class({ /** * Sets the skin used to look up attachments before looking in the defaultSkin. - * + * * Attachments from the new skin are attached if the corresponding attachment from the * old skin was attached. If there was no old skin, each slot's setup mode attachment is * attached from the new skin. - * + * * After changing the skin, the visible attachments can be reset to those attached in the * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide @@ -27544,7 +32218,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#setSkinByName * @since 3.19.0 - * + * * @param {string} skinName - The name of the skin to set. * * @return {this} This Game Object. @@ -27564,11 +32238,11 @@ var SpineGameObject = new Class({ /** * Sets the skin used to look up attachments before looking in the defaultSkin. - * + * * Attachments from the new skin are attached if the corresponding attachment from the * old skin was attached. If there was no old skin, each slot's setup mode attachment is * attached from the new skin. - * + * * After changing the skin, the visible attachments can be reset to those attached in the * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide @@ -27576,7 +32250,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#setSkin * @since 3.19.0 - * + * * @param {?spine.Skin} newSkin - The Skin to set. May be `null`. * * @return {this} This Game Object. @@ -27599,7 +32273,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#setMix * @since 3.19.0 - * + * * @param {string} fromName - The animation to mix from. * @param {string} toName - The animation to mix to. * @param {number} [duration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any). @@ -27620,7 +32294,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getAttachment * @since 3.19.0 - * + * * @param {integer} slotIndex - The slot index to search. * @param {string} attachmentName - The attachment name to look for. * @@ -27636,7 +32310,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#getAttachmentByName * @since 3.19.0 - * + * * @param {string} slotName - The slot name to search. * @param {string} attachmentName - The attachment name to look for. * @@ -27653,7 +32327,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#setAttachment * @since 3.19.0 - * + * * @param {string} slotName - The slot name to add the attachment to. * @param {string} attachmentName - The attachment name to add. * @@ -27741,7 +32415,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#angleBoneToXY * @since 3.19.0 - * + * * @param {spine.Bone} bone - The bone to rotate towards the world position. * @param {number} worldX - The world x coordinate to rotate the bone towards. * @param {number} worldY - The world y coordinate to rotate the bone towards. @@ -27773,7 +32447,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findBone * @since 3.19.0 - * + * * @param {string} boneName - The name of the bone to find. * * @return {spine.Bone} The bone, or null. @@ -27789,7 +32463,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findBoneIndex * @since 3.19.0 - * + * * @param {string} boneName - The name of the bone to find. * * @return {integer} The bone index. Or -1 if the bone was not found. @@ -27805,7 +32479,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findSlot * @since 3.19.0 - * + * * @param {string} slotName - The name of the slot to find. * * @return {spine.Slot} The Slot. May be null. @@ -27821,7 +32495,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findSlotIndex * @since 3.19.0 - * + * * @param {string} slotName - The name of the slot to find. * * @return {integer} The slot index. Or -1 if the Slot was not found. @@ -27837,7 +32511,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findSkin * @since 3.19.0 - * + * * @param {string} skinName - The name of the skin to find. * * @return {spine.Skin} The Skin. May be null. @@ -27853,7 +32527,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findEvent * @since 3.19.0 - * + * * @param {string} eventDataName - The name of the event to find. * * @return {spine.EventData} The Event Data. May be null. @@ -27869,7 +32543,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findAnimation * @since 3.19.0 - * + * * @param {string} animationName - The name of the animation to find. * * @return {spine.Animation} The Animation. May be null. @@ -27885,7 +32559,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findIkConstraint * @since 3.19.0 - * + * * @param {string} constraintName - The name of the constraint to find. * * @return {spine.IkConstraintData} The IK constraint. May be null. @@ -27901,7 +32575,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findTransformConstraint * @since 3.19.0 - * + * * @param {string} constraintName - The name of the constraint to find. * * @return {spine.TransformConstraintData} The transform constraint. May be null. @@ -27917,7 +32591,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findPathConstraint * @since 3.19.0 - * + * * @param {string} constraintName - The name of the constraint to find. * * @return {spine.PathConstraintData} The path constraint. May be null. @@ -27933,7 +32607,7 @@ var SpineGameObject = new Class({ * * @method SpineGameObject#findPathConstraintIndex * @since 3.19.0 - * + * * @param {string} constraintName - The name of the constraint to find. * * @return {integer} The constraint index. Or -1 if the constraint was not found. @@ -27945,15 +32619,15 @@ var SpineGameObject = new Class({ /** * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose. - * + * * The returned object contains two properties: `offset` and `size`: - * + * * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB. * `size` - The width and height of the AABB. * * @method SpineGameObject#getBounds * @since 3.19.0 - * + * * @return {any} The bounds object. */ getBounds: function () @@ -27967,7 +32641,7 @@ var SpineGameObject = new Class({ * @method SpineGameObject#preUpdate * @protected * @since 3.19.0 - * + * * @param {number} time - The current timestamp. * @param {number} delta - The delta time, in ms, elapsed since the last frame. */ @@ -28010,1111 +32684,7 @@ module.exports = SpineGameObject; /***/ }), -/* 195 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Provides methods used for calculating and setting the size of a non-Frame based Game Object. - * Should be applied as a mixin and not used directly. - * - * @namespace Phaser.GameObjects.Components.ComputedSize - * @since 3.0.0 - */ - -var ComputedSize = { - - /** - * The native (un-scaled) width of this Game Object. - * - * Changing this value will not change the size that the Game Object is rendered in-game. - * For that you need to either set the scale of the Game Object (`setScale`) or use - * the `displayWidth` property. - * - * @name Phaser.GameObjects.Components.ComputedSize#width - * @type {number} - * @since 3.0.0 - */ - width: 0, - - /** - * The native (un-scaled) height of this Game Object. - * - * Changing this value will not change the size that the Game Object is rendered in-game. - * For that you need to either set the scale of the Game Object (`setScale`) or use - * the `displayHeight` property. - * - * @name Phaser.GameObjects.Components.ComputedSize#height - * @type {number} - * @since 3.0.0 - */ - height: 0, - - /** - * The displayed width of this Game Object. - * - * This value takes into account the scale factor. - * - * Setting this value will adjust the Game Object's scale property. - * - * @name Phaser.GameObjects.Components.ComputedSize#displayWidth - * @type {number} - * @since 3.0.0 - */ - displayWidth: { - - get: function () - { - return this.scaleX * this.width; - }, - - set: function (value) - { - this.scaleX = value / this.width; - } - - }, - - /** - * The displayed height of this Game Object. - * - * This value takes into account the scale factor. - * - * Setting this value will adjust the Game Object's scale property. - * - * @name Phaser.GameObjects.Components.ComputedSize#displayHeight - * @type {number} - * @since 3.0.0 - */ - displayHeight: { - - get: function () - { - return this.scaleY * this.height; - }, - - set: function (value) - { - this.scaleY = value / this.height; - } - - }, - - /** - * Sets the internal size of this Game Object, as used for frame or physics body creation. - * - * This will not change the size that the Game Object is rendered in-game. - * For that you need to either set the scale of the Game Object (`setScale`) or call the - * `setDisplaySize` method, which is the same thing as changing the scale but allows you - * to do so by giving pixel values. - * - * If you have enabled this Game Object for input, changing the size will _not_ change the - * size of the hit area. To do this you should adjust the `input.hitArea` object directly. - * - * @method Phaser.GameObjects.Components.ComputedSize#setSize - * @since 3.4.0 - * - * @param {number} width - The width of this Game Object. - * @param {number} height - The height of this Game Object. - * - * @return {this} This Game Object instance. - */ - setSize: function (width, height) - { - this.width = width; - this.height = height; - - return this; - }, - - /** - * Sets the display size of this Game Object. - * - * Calling this will adjust the scale. - * - * @method Phaser.GameObjects.Components.ComputedSize#setDisplaySize - * @since 3.4.0 - * - * @param {number} width - The width of this Game Object. - * @param {number} height - The height of this Game Object. - * - * @return {this} This Game Object instance. - */ - setDisplaySize: function (width, height) - { - this.displayWidth = width; - this.displayHeight = height; - - return this; - } - -}; - -module.exports = ComputedSize; - - -/***/ }), -/* 196 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Provides methods used for setting the depth of a Game Object. - * Should be applied as a mixin and not used directly. - * - * @namespace Phaser.GameObjects.Components.Depth - * @since 3.0.0 - */ - -var Depth = { - - /** - * Private internal value. Holds the depth of the Game Object. - * - * @name Phaser.GameObjects.Components.Depth#_depth - * @type {integer} - * @private - * @default 0 - * @since 3.0.0 - */ - _depth: 0, - - /** - * The depth of this Game Object within the Scene. - * - * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order - * of Game Objects, without actually moving their position in the display list. - * - * The default depth is zero. A Game Object with a higher depth - * value will always render in front of one with a lower value. - * - * Setting the depth will queue a depth sort event within the Scene. - * - * @name Phaser.GameObjects.Components.Depth#depth - * @type {number} - * @since 3.0.0 - */ - depth: { - - get: function () - { - return this._depth; - }, - - set: function (value) - { - this.scene.sys.queueDepthSort(); - this._depth = value; - } - - }, - - /** - * The depth of this Game Object within the Scene. - * - * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order - * of Game Objects, without actually moving their position in the display list. - * - * The default depth is zero. A Game Object with a higher depth - * value will always render in front of one with a lower value. - * - * Setting the depth will queue a depth sort event within the Scene. - * - * @method Phaser.GameObjects.Components.Depth#setDepth - * @since 3.0.0 - * - * @param {integer} value - The depth of this Game Object. - * - * @return {this} This Game Object instance. - */ - setDepth: function (value) - { - if (value === undefined) { value = 0; } - - this.depth = value; - - return this; - } - -}; - -module.exports = Depth; - - -/***/ }), -/* 197 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Provides methods used for visually flipping a Game Object. - * Should be applied as a mixin and not used directly. - * - * @namespace Phaser.GameObjects.Components.Flip - * @since 3.0.0 - */ - -var Flip = { - - /** - * The horizontally flipped state of the Game Object. - * - * A Game Object that is flipped horizontally will render inversed on the horizontal axis. - * Flipping always takes place from the middle of the texture and does not impact the scale value. - * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - * - * @name Phaser.GameObjects.Components.Flip#flipX - * @type {boolean} - * @default false - * @since 3.0.0 - */ - flipX: false, - - /** - * The vertically flipped state of the Game Object. - * - * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) - * Flipping always takes place from the middle of the texture and does not impact the scale value. - * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - * - * @name Phaser.GameObjects.Components.Flip#flipY - * @type {boolean} - * @default false - * @since 3.0.0 - */ - flipY: false, - - /** - * Toggles the horizontal flipped state of this Game Object. - * - * A Game Object that is flipped horizontally will render inversed on the horizontal axis. - * Flipping always takes place from the middle of the texture and does not impact the scale value. - * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - * - * @method Phaser.GameObjects.Components.Flip#toggleFlipX - * @since 3.0.0 - * - * @return {this} This Game Object instance. - */ - toggleFlipX: function () - { - this.flipX = !this.flipX; - - return this; - }, - - /** - * Toggles the vertical flipped state of this Game Object. - * - * @method Phaser.GameObjects.Components.Flip#toggleFlipY - * @since 3.0.0 - * - * @return {this} This Game Object instance. - */ - toggleFlipY: function () - { - this.flipY = !this.flipY; - - return this; - }, - - /** - * Sets the horizontal flipped state of this Game Object. - * - * A Game Object that is flipped horizontally will render inversed on the horizontal axis. - * Flipping always takes place from the middle of the texture and does not impact the scale value. - * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - * - * @method Phaser.GameObjects.Components.Flip#setFlipX - * @since 3.0.0 - * - * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped. - * - * @return {this} This Game Object instance. - */ - setFlipX: function (value) - { - this.flipX = value; - - return this; - }, - - /** - * Sets the vertical flipped state of this Game Object. - * - * @method Phaser.GameObjects.Components.Flip#setFlipY - * @since 3.0.0 - * - * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped. - * - * @return {this} This Game Object instance. - */ - setFlipY: function (value) - { - this.flipY = value; - - return this; - }, - - /** - * Sets the horizontal and vertical flipped state of this Game Object. - * - * A Game Object that is flipped will render inversed on the flipped axis. - * Flipping always takes place from the middle of the texture and does not impact the scale value. - * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - * - * @method Phaser.GameObjects.Components.Flip#setFlip - * @since 3.0.0 - * - * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped. - * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped. - * - * @return {this} This Game Object instance. - */ - setFlip: function (x, y) - { - this.flipX = x; - this.flipY = y; - - return this; - }, - - /** - * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state. - * - * @method Phaser.GameObjects.Components.Flip#resetFlip - * @since 3.0.0 - * - * @return {this} This Game Object instance. - */ - resetFlip: function () - { - this.flipX = false; - this.flipY = false; - - return this; - } - -}; - -module.exports = Flip; - - -/***/ }), -/* 198 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Provides methods used for getting and setting the Scroll Factor of a Game Object. - * - * @namespace Phaser.GameObjects.Components.ScrollFactor - * @since 3.0.0 - */ - -var ScrollFactor = { - - /** - * 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. - * - * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorX - * @type {number} - * @default 1 - * @since 3.0.0 - */ - scrollFactorX: 1, - - /** - * 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. - * - * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorY - * @type {number} - * @default 1 - * @since 3.0.0 - */ - scrollFactorY: 1, - - /** - * 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. - * - * @method Phaser.GameObjects.Components.ScrollFactor#setScrollFactor - * @since 3.0.0 - * - * @param {number} x - The horizontal scroll factor of this Game Object. - * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value. - * - * @return {this} This Game Object instance. - */ - setScrollFactor: function (x, y) - { - if (y === undefined) { y = x; } - - this.scrollFactorX = x; - this.scrollFactorY = y; - - return this; - } - -}; - -module.exports = ScrollFactor; - - -/***/ }), -/* 199 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var MATH_CONST = __webpack_require__(1); -var TransformMatrix = __webpack_require__(200); -var TransformXY = __webpack_require__(28); -var WrapAngle = __webpack_require__(18); -var WrapAngleDegrees = __webpack_require__(19); -var Vector2 = __webpack_require__(3); - -// global bitmask flag for GameObject.renderMask (used by Scale) -var _FLAG = 4; // 0100 - -/** - * Provides methods used for getting and setting the position, scale and rotation of a Game Object. - * - * @namespace Phaser.GameObjects.Components.Transform - * @since 3.0.0 - */ - -var Transform = { - - /** - * Private internal value. Holds the horizontal scale value. - * - * @name Phaser.GameObjects.Components.Transform#_scaleX - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - _scaleX: 1, - - /** - * Private internal value. Holds the vertical scale value. - * - * @name Phaser.GameObjects.Components.Transform#_scaleY - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - _scaleY: 1, - - /** - * Private internal value. Holds the rotation value in radians. - * - * @name Phaser.GameObjects.Components.Transform#_rotation - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - _rotation: 0, - - /** - * The x position of this Game Object. - * - * @name Phaser.GameObjects.Components.Transform#x - * @type {number} - * @default 0 - * @since 3.0.0 - */ - x: 0, - - /** - * The y position of this Game Object. - * - * @name Phaser.GameObjects.Components.Transform#y - * @type {number} - * @default 0 - * @since 3.0.0 - */ - y: 0, - - /** - * The z position of this Game Object. - * - * Note: The z position does not control the rendering order of 2D Game Objects. Use - * {@link Phaser.GameObjects.Components.Depth#depth} instead. - * - * @name Phaser.GameObjects.Components.Transform#z - * @type {number} - * @default 0 - * @since 3.0.0 - */ - z: 0, - - /** - * The w position of this Game Object. - * - * @name Phaser.GameObjects.Components.Transform#w - * @type {number} - * @default 0 - * @since 3.0.0 - */ - w: 0, - - /** - * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object - * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`. - * - * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this - * isn't the case, use the `scaleX` or `scaleY` properties instead. - * - * @name Phaser.GameObjects.Components.Transform#scale - * @type {number} - * @default 1 - * @since 3.18.0 - */ - scale: { - - get: function () - { - return (this._scaleX + this._scaleY) / 2; - }, - - set: function (value) - { - this._scaleX = value; - this._scaleY = value; - - if (value === 0) - { - this.renderFlags &= ~_FLAG; - } - else - { - this.renderFlags |= _FLAG; - } - } - - }, - - /** - * The horizontal scale of this Game Object. - * - * @name Phaser.GameObjects.Components.Transform#scaleX - * @type {number} - * @default 1 - * @since 3.0.0 - */ - scaleX: { - - get: function () - { - return this._scaleX; - }, - - set: function (value) - { - this._scaleX = value; - - if (value === 0) - { - this.renderFlags &= ~_FLAG; - } - else - { - this.renderFlags |= _FLAG; - } - } - - }, - - /** - * The vertical scale of this Game Object. - * - * @name Phaser.GameObjects.Components.Transform#scaleY - * @type {number} - * @default 1 - * @since 3.0.0 - */ - scaleY: { - - get: function () - { - return this._scaleY; - }, - - set: function (value) - { - this._scaleY = value; - - if (value === 0) - { - this.renderFlags &= ~_FLAG; - } - else - { - this.renderFlags |= _FLAG; - } - } - - }, - - /** - * The angle of this Game Object as expressed in degrees. - * - * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left - * and -90 is up. - * - * If you prefer to work in radians, see the `rotation` property instead. - * - * @name Phaser.GameObjects.Components.Transform#angle - * @type {integer} - * @default 0 - * @since 3.0.0 - */ - angle: { - - get: function () - { - return WrapAngleDegrees(this._rotation * MATH_CONST.RAD_TO_DEG); - }, - - set: function (value) - { - // value is in degrees - this.rotation = WrapAngleDegrees(value) * MATH_CONST.DEG_TO_RAD; - } - }, - - /** - * The angle of this Game Object in radians. - * - * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left - * and -PI/2 is up. - * - * If you prefer to work in degrees, see the `angle` property instead. - * - * @name Phaser.GameObjects.Components.Transform#rotation - * @type {number} - * @default 1 - * @since 3.0.0 - */ - rotation: { - - get: function () - { - return this._rotation; - }, - - set: function (value) - { - // value is in radians - this._rotation = WrapAngle(value); - } - }, - - /** - * Sets the position of this Game Object. - * - * @method Phaser.GameObjects.Components.Transform#setPosition - * @since 3.0.0 - * - * @param {number} [x=0] - The x position of this Game Object. - * @param {number} [y=x] - The y position of this Game Object. If not set it will use the `x` value. - * @param {number} [z=0] - The z position of this Game Object. - * @param {number} [w=0] - The w position of this Game Object. - * - * @return {this} This Game Object instance. - */ - setPosition: function (x, y, z, w) - { - if (x === undefined) { x = 0; } - if (y === undefined) { y = x; } - if (z === undefined) { z = 0; } - if (w === undefined) { w = 0; } - - this.x = x; - this.y = y; - this.z = z; - this.w = w; - - return this; - }, - - /** - * Sets the position of this Game Object to be a random position within the confines of - * the given area. - * - * If no area is specified a random position between 0 x 0 and the game width x height is used instead. - * - * The position does not factor in the size of this Game Object, meaning that only the origin is - * guaranteed to be within the area. - * - * @method Phaser.GameObjects.Components.Transform#setRandomPosition - * @since 3.8.0 - * - * @param {number} [x=0] - The x position of the top-left of the random area. - * @param {number} [y=0] - The y position of the top-left of the random area. - * @param {number} [width] - The width of the random area. - * @param {number} [height] - The height of the random area. - * - * @return {this} This Game Object instance. - */ - setRandomPosition: function (x, y, width, height) - { - if (x === undefined) { x = 0; } - if (y === undefined) { y = 0; } - if (width === undefined) { width = this.scene.sys.scale.width; } - if (height === undefined) { height = this.scene.sys.scale.height; } - - this.x = x + (Math.random() * width); - this.y = y + (Math.random() * height); - - return this; - }, - - /** - * Sets the rotation of this Game Object. - * - * @method Phaser.GameObjects.Components.Transform#setRotation - * @since 3.0.0 - * - * @param {number} [radians=0] - The rotation of this Game Object, in radians. - * - * @return {this} This Game Object instance. - */ - setRotation: function (radians) - { - if (radians === undefined) { radians = 0; } - - this.rotation = radians; - - return this; - }, - - /** - * Sets the angle of this Game Object. - * - * @method Phaser.GameObjects.Components.Transform#setAngle - * @since 3.0.0 - * - * @param {number} [degrees=0] - The rotation of this Game Object, in degrees. - * - * @return {this} This Game Object instance. - */ - setAngle: function (degrees) - { - if (degrees === undefined) { degrees = 0; } - - this.angle = degrees; - - return this; - }, - - /** - * Sets the scale of this Game Object. - * - * @method Phaser.GameObjects.Components.Transform#setScale - * @since 3.0.0 - * - * @param {number} x - 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. - */ - setScale: function (x, y) - { - if (x === undefined) { x = 1; } - if (y === undefined) { y = x; } - - this.scaleX = x; - this.scaleY = y; - - return this; - }, - - /** - * Sets the x position of this Game Object. - * - * @method Phaser.GameObjects.Components.Transform#setX - * @since 3.0.0 - * - * @param {number} [value=0] - The x position of this Game Object. - * - * @return {this} This Game Object instance. - */ - setX: function (value) - { - if (value === undefined) { value = 0; } - - this.x = value; - - return this; - }, - - /** - * Sets the y position of this Game Object. - * - * @method Phaser.GameObjects.Components.Transform#setY - * @since 3.0.0 - * - * @param {number} [value=0] - The y position of this Game Object. - * - * @return {this} This Game Object instance. - */ - setY: function (value) - { - if (value === undefined) { value = 0; } - - this.y = value; - - return this; - }, - - /** - * Sets the z position of this Game Object. - * - * Note: The z position does not control the rendering order of 2D Game Objects. Use - * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. - * - * @method Phaser.GameObjects.Components.Transform#setZ - * @since 3.0.0 - * - * @param {number} [value=0] - The z position of this Game Object. - * - * @return {this} This Game Object instance. - */ - setZ: function (value) - { - if (value === undefined) { value = 0; } - - this.z = value; - - return this; - }, - - /** - * Sets the w position of this Game Object. - * - * @method Phaser.GameObjects.Components.Transform#setW - * @since 3.0.0 - * - * @param {number} [value=0] - The w position of this Game Object. - * - * @return {this} This Game Object instance. - */ - setW: function (value) - { - if (value === undefined) { value = 0; } - - this.w = value; - - return this; - }, - - /** - * Gets the local transform matrix for this Game Object. - * - * @method Phaser.GameObjects.Components.Transform#getLocalTransformMatrix - * @since 3.4.0 - * - * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object. - * - * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix. - */ - getLocalTransformMatrix: function (tempMatrix) - { - if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); } - - return tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY); - }, - - /** - * Gets the world transform matrix for this Game Object, factoring in any parent Containers. - * - * @method Phaser.GameObjects.Components.Transform#getWorldTransformMatrix - * @since 3.4.0 - * - * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object. - * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A temporary matrix to hold parent values during the calculations. - * - * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix. - */ - getWorldTransformMatrix: function (tempMatrix, parentMatrix) - { - if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); } - if (parentMatrix === undefined) { parentMatrix = new TransformMatrix(); } - - var parent = this.parentContainer; - - if (!parent) - { - return this.getLocalTransformMatrix(tempMatrix); - } - - tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY); - - while (parent) - { - parentMatrix.applyITRS(parent.x, parent.y, parent._rotation, parent._scaleX, parent._scaleY); - - parentMatrix.multiply(tempMatrix, tempMatrix); - - parent = parent.parentContainer; - } - - return tempMatrix; - }, - - /** - * Takes the given `x` and `y` coordinates and converts them into local space for this - * Game Object, taking into account parent and local transforms, and the Display Origin. - * - * The returned Vector2 contains the translated point in its properties. - * - * A Camera needs to be provided in order to handle modified scroll factors. If no - * camera is specified, it will use the `main` camera from the Scene to which this - * Game Object belongs. - * - * @method Phaser.GameObjects.Components.Transform#getLocalPoint - * @since 3.50.0 - * - * @param {number} x - The x position to translate. - * @param {number} y - The y position to translate. - * @param {Phaser.Math.Vector2} [point] - A Vector2, or point-like object, to store the results in. - * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera which is being tested against. If not given will use the Scene default camera. - * - * @return {Phaser.Math.Vector2} The translated point. - */ - getLocalPoint: function (x, y, point, camera) - { - if (!point) { point = new Vector2(); } - if (!camera) { camera = this.scene.sys.cameras.main; } - - var csx = camera.scrollX; - var csy = camera.scrollY; - - var px = x + (csx * this.scrollFactorX) - csx; - var py = y + (csy * this.scrollFactorY) - csy; - - if (this.parentContainer) - { - this.getWorldTransformMatrix().applyInverse(px, py, point); - } - else - { - TransformXY(px, py, this.x, this.y, this.rotation, this.scaleX, this.scaleY, point); - } - - // Normalize origin - if (this._originComponent) - { - point.x += this._displayOriginX; - point.y += this._displayOriginY; - } - - return point; - }, - - /** - * Gets the sum total rotation of all of this Game Objects parent Containers. - * - * The returned value is in radians and will be zero if this Game Object has no parent container. - * - * @method Phaser.GameObjects.Components.Transform#getParentRotation - * @since 3.18.0 - * - * @return {number} The sum total rotation, in radians, of all parent containers of this Game Object. - */ - getParentRotation: function () - { - var rotation = 0; - - var parent = this.parentContainer; - - while (parent) - { - rotation += parent.rotation; - - parent = parent.parentContainer; - } - - return rotation; - } - -}; - -module.exports = Transform; - - -/***/ }), -/* 200 */ +/* 219 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29124,1915 +32694,7 @@ module.exports = Transform; */ var Class = __webpack_require__(0); -var MATH_CONST = __webpack_require__(1); -var Vector2 = __webpack_require__(3); - -/** - * @classdesc - * A Matrix used for display transformations for rendering. - * - * It is represented like so: - * - * ``` - * | a | c | tx | - * | b | d | ty | - * | 0 | 0 | 1 | - * ``` - * - * @class TransformMatrix - * @memberof Phaser.GameObjects.Components - * @constructor - * @since 3.0.0 - * - * @param {number} [a=1] - The Scale X value. - * @param {number} [b=0] - The Skew Y value. - * @param {number} [c=0] - The Skew X value. - * @param {number} [d=1] - The Scale Y value. - * @param {number} [tx=0] - The Translate X value. - * @param {number} [ty=0] - The Translate Y value. - */ -var TransformMatrix = new Class({ - - initialize: - - function TransformMatrix (a, b, c, d, tx, ty) - { - if (a === undefined) { a = 1; } - if (b === undefined) { b = 0; } - if (c === undefined) { c = 0; } - if (d === undefined) { d = 1; } - if (tx === undefined) { tx = 0; } - if (ty === undefined) { ty = 0; } - - /** - * The matrix values. - * - * @name Phaser.GameObjects.Components.TransformMatrix#matrix - * @type {Float32Array} - * @since 3.0.0 - */ - this.matrix = new Float32Array([ a, b, c, d, tx, ty, 0, 0, 1 ]); - - /** - * The decomposed matrix. - * - * @name Phaser.GameObjects.Components.TransformMatrix#decomposedMatrix - * @type {object} - * @since 3.0.0 - */ - this.decomposedMatrix = { - translateX: 0, - translateY: 0, - scaleX: 1, - scaleY: 1, - rotation: 0 - }; - }, - - /** - * The Scale X value. - * - * @name Phaser.GameObjects.Components.TransformMatrix#a - * @type {number} - * @since 3.4.0 - */ - a: { - - get: function () - { - return this.matrix[0]; - }, - - set: function (value) - { - this.matrix[0] = value; - } - - }, - - /** - * The Skew Y value. - * - * @name Phaser.GameObjects.Components.TransformMatrix#b - * @type {number} - * @since 3.4.0 - */ - b: { - - get: function () - { - return this.matrix[1]; - }, - - set: function (value) - { - this.matrix[1] = value; - } - - }, - - /** - * The Skew X value. - * - * @name Phaser.GameObjects.Components.TransformMatrix#c - * @type {number} - * @since 3.4.0 - */ - c: { - - get: function () - { - return this.matrix[2]; - }, - - set: function (value) - { - this.matrix[2] = value; - } - - }, - - /** - * The Scale Y value. - * - * @name Phaser.GameObjects.Components.TransformMatrix#d - * @type {number} - * @since 3.4.0 - */ - d: { - - get: function () - { - return this.matrix[3]; - }, - - set: function (value) - { - this.matrix[3] = value; - } - - }, - - /** - * The Translate X value. - * - * @name Phaser.GameObjects.Components.TransformMatrix#e - * @type {number} - * @since 3.11.0 - */ - e: { - - get: function () - { - return this.matrix[4]; - }, - - set: function (value) - { - this.matrix[4] = value; - } - - }, - - /** - * The Translate Y value. - * - * @name Phaser.GameObjects.Components.TransformMatrix#f - * @type {number} - * @since 3.11.0 - */ - f: { - - get: function () - { - return this.matrix[5]; - }, - - set: function (value) - { - this.matrix[5] = value; - } - - }, - - /** - * The Translate X value. - * - * @name Phaser.GameObjects.Components.TransformMatrix#tx - * @type {number} - * @since 3.4.0 - */ - tx: { - - get: function () - { - return this.matrix[4]; - }, - - set: function (value) - { - this.matrix[4] = value; - } - - }, - - /** - * The Translate Y value. - * - * @name Phaser.GameObjects.Components.TransformMatrix#ty - * @type {number} - * @since 3.4.0 - */ - ty: { - - get: function () - { - return this.matrix[5]; - }, - - set: function (value) - { - this.matrix[5] = value; - } - - }, - - /** - * The rotation of the Matrix. Value is in radians. - * - * @name Phaser.GameObjects.Components.TransformMatrix#rotation - * @type {number} - * @readonly - * @since 3.4.0 - */ - rotation: { - - get: function () - { - return Math.acos(this.a / this.scaleX) * ((Math.atan(-this.c / this.a) < 0) ? -1 : 1); - } - - }, - - /** - * The rotation of the Matrix, normalized to be within the Phaser right-handed - * clockwise rotation space. Value is in radians. - * - * @name Phaser.GameObjects.Components.TransformMatrix#rotationNormalized - * @type {number} - * @readonly - * @since 3.19.0 - */ - rotationNormalized: { - - get: function () - { - var matrix = this.matrix; - - var a = matrix[0]; - var b = matrix[1]; - var c = matrix[2]; - var d = matrix[3]; - - if (a || b) - { - // var r = Math.sqrt(a * a + b * b); - - return (b > 0) ? Math.acos(a / this.scaleX) : -Math.acos(a / this.scaleX); - } - else if (c || d) - { - // var s = Math.sqrt(c * c + d * d); - - return MATH_CONST.TAU - ((d > 0) ? Math.acos(-c / this.scaleY) : -Math.acos(c / this.scaleY)); - } - else - { - return 0; - } - } - - }, - - /** - * The decomposed horizontal scale of the Matrix. This value is always positive. - * - * @name Phaser.GameObjects.Components.TransformMatrix#scaleX - * @type {number} - * @readonly - * @since 3.4.0 - */ - scaleX: { - - get: function () - { - return Math.sqrt((this.a * this.a) + (this.b * this.b)); - } - - }, - - /** - * The decomposed vertical scale of the Matrix. This value is always positive. - * - * @name Phaser.GameObjects.Components.TransformMatrix#scaleY - * @type {number} - * @readonly - * @since 3.4.0 - */ - scaleY: { - - get: function () - { - return Math.sqrt((this.c * this.c) + (this.d * this.d)); - } - - }, - - /** - * Reset the Matrix to an identity matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#loadIdentity - * @since 3.0.0 - * - * @return {this} This TransformMatrix. - */ - loadIdentity: function () - { - var matrix = this.matrix; - - matrix[0] = 1; - matrix[1] = 0; - matrix[2] = 0; - matrix[3] = 1; - matrix[4] = 0; - matrix[5] = 0; - - return this; - }, - - /** - * Translate the Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#translate - * @since 3.0.0 - * - * @param {number} x - The horizontal translation value. - * @param {number} y - The vertical translation value. - * - * @return {this} This TransformMatrix. - */ - translate: function (x, y) - { - var matrix = this.matrix; - - matrix[4] = matrix[0] * x + matrix[2] * y + matrix[4]; - matrix[5] = matrix[1] * x + matrix[3] * y + matrix[5]; - - return this; - }, - - /** - * Scale the Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#scale - * @since 3.0.0 - * - * @param {number} x - The horizontal scale value. - * @param {number} y - The vertical scale value. - * - * @return {this} This TransformMatrix. - */ - scale: function (x, y) - { - var matrix = this.matrix; - - matrix[0] *= x; - matrix[1] *= x; - matrix[2] *= y; - matrix[3] *= y; - - return this; - }, - - /** - * Rotate the Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#rotate - * @since 3.0.0 - * - * @param {number} angle - The angle of rotation in radians. - * - * @return {this} This TransformMatrix. - */ - rotate: function (angle) - { - var sin = Math.sin(angle); - var cos = Math.cos(angle); - - var matrix = this.matrix; - - var a = matrix[0]; - var b = matrix[1]; - var c = matrix[2]; - var d = matrix[3]; - - matrix[0] = a * cos + c * sin; - matrix[1] = b * cos + d * sin; - matrix[2] = a * -sin + c * cos; - matrix[3] = b * -sin + d * cos; - - return this; - }, - - /** - * Multiply this Matrix by the given Matrix. - * - * If an `out` Matrix is given then the results will be stored in it. - * If it is not given, this matrix will be updated in place instead. - * Use an `out` Matrix if you do not wish to mutate this matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#multiply - * @since 3.0.0 - * - * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by. - * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in. - * - * @return {(this|Phaser.GameObjects.Components.TransformMatrix)} Either this TransformMatrix, or the `out` Matrix, if given in the arguments. - */ - multiply: function (rhs, out) - { - var matrix = this.matrix; - var source = rhs.matrix; - - var localA = matrix[0]; - var localB = matrix[1]; - var localC = matrix[2]; - var localD = matrix[3]; - var localE = matrix[4]; - var localF = matrix[5]; - - var sourceA = source[0]; - var sourceB = source[1]; - var sourceC = source[2]; - var sourceD = source[3]; - var sourceE = source[4]; - var sourceF = source[5]; - - var destinationMatrix = (out === undefined) ? this : out; - - destinationMatrix.a = (sourceA * localA) + (sourceB * localC); - destinationMatrix.b = (sourceA * localB) + (sourceB * localD); - destinationMatrix.c = (sourceC * localA) + (sourceD * localC); - destinationMatrix.d = (sourceC * localB) + (sourceD * localD); - destinationMatrix.e = (sourceE * localA) + (sourceF * localC) + localE; - destinationMatrix.f = (sourceE * localB) + (sourceF * localD) + localF; - - return destinationMatrix; - }, - - /** - * Multiply this Matrix by the matrix given, including the offset. - * - * The offsetX is added to the tx value: `offsetX * a + offsetY * c + tx`. - * The offsetY is added to the ty value: `offsetY * b + offsetY * d + ty`. - * - * @method Phaser.GameObjects.Components.TransformMatrix#multiplyWithOffset - * @since 3.11.0 - * - * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from. - * @param {number} offsetX - Horizontal offset to factor in to the multiplication. - * @param {number} offsetY - Vertical offset to factor in to the multiplication. - * - * @return {this} This TransformMatrix. - */ - multiplyWithOffset: function (src, offsetX, offsetY) - { - var matrix = this.matrix; - var otherMatrix = src.matrix; - - var a0 = matrix[0]; - var b0 = matrix[1]; - var c0 = matrix[2]; - var d0 = matrix[3]; - var tx0 = matrix[4]; - var ty0 = matrix[5]; - - var pse = offsetX * a0 + offsetY * c0 + tx0; - var psf = offsetX * b0 + offsetY * d0 + ty0; - - var a1 = otherMatrix[0]; - var b1 = otherMatrix[1]; - var c1 = otherMatrix[2]; - var d1 = otherMatrix[3]; - var tx1 = otherMatrix[4]; - var ty1 = otherMatrix[5]; - - matrix[0] = a1 * a0 + b1 * c0; - matrix[1] = a1 * b0 + b1 * d0; - matrix[2] = c1 * a0 + d1 * c0; - matrix[3] = c1 * b0 + d1 * d0; - matrix[4] = tx1 * a0 + ty1 * c0 + pse; - matrix[5] = tx1 * b0 + ty1 * d0 + psf; - - return this; - }, - - /** - * Transform the Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#transform - * @since 3.0.0 - * - * @param {number} a - The Scale X value. - * @param {number} b - The Shear Y value. - * @param {number} c - The Shear X value. - * @param {number} d - The Scale Y value. - * @param {number} tx - The Translate X value. - * @param {number} ty - The Translate Y value. - * - * @return {this} This TransformMatrix. - */ - transform: function (a, b, c, d, tx, ty) - { - var matrix = this.matrix; - - var a0 = matrix[0]; - var b0 = matrix[1]; - var c0 = matrix[2]; - var d0 = matrix[3]; - var tx0 = matrix[4]; - var ty0 = matrix[5]; - - matrix[0] = a * a0 + b * c0; - matrix[1] = a * b0 + b * d0; - matrix[2] = c * a0 + d * c0; - matrix[3] = c * b0 + d * d0; - matrix[4] = tx * a0 + ty * c0 + tx0; - matrix[5] = tx * b0 + ty * d0 + ty0; - - return this; - }, - - /** - * Transform a point using this Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#transformPoint - * @since 3.0.0 - * - * @param {number} x - The x coordinate of the point to transform. - * @param {number} y - The y coordinate of the point to transform. - * @param {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} point - The Point object to store the transformed coordinates. - * - * @return {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} The Point containing the transformed coordinates. - */ - transformPoint: function (x, y, point) - { - if (point === undefined) { point = { x: 0, y: 0 }; } - - var matrix = this.matrix; - - var a = matrix[0]; - var b = matrix[1]; - var c = matrix[2]; - var d = matrix[3]; - var tx = matrix[4]; - var ty = matrix[5]; - - point.x = x * a + y * c + tx; - point.y = x * b + y * d + ty; - - return point; - }, - - /** - * Invert the Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#invert - * @since 3.0.0 - * - * @return {this} This TransformMatrix. - */ - invert: function () - { - var matrix = this.matrix; - - var a = matrix[0]; - var b = matrix[1]; - var c = matrix[2]; - var d = matrix[3]; - var tx = matrix[4]; - var ty = matrix[5]; - - var n = a * d - b * c; - - matrix[0] = d / n; - matrix[1] = -b / n; - matrix[2] = -c / n; - matrix[3] = a / n; - matrix[4] = (c * ty - d * tx) / n; - matrix[5] = -(a * ty - b * tx) / n; - - return this; - }, - - /** - * Set the values of this Matrix to copy those of the matrix given. - * - * @method Phaser.GameObjects.Components.TransformMatrix#copyFrom - * @since 3.11.0 - * - * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from. - * - * @return {this} This TransformMatrix. - */ - copyFrom: function (src) - { - var matrix = this.matrix; - - matrix[0] = src.a; - matrix[1] = src.b; - matrix[2] = src.c; - matrix[3] = src.d; - matrix[4] = src.e; - matrix[5] = src.f; - - return this; - }, - - /** - * Set the values of this Matrix to copy those of the array given. - * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f. - * - * @method Phaser.GameObjects.Components.TransformMatrix#copyFromArray - * @since 3.11.0 - * - * @param {array} src - The array of values to set into this matrix. - * - * @return {this} This TransformMatrix. - */ - copyFromArray: function (src) - { - var matrix = this.matrix; - - matrix[0] = src[0]; - matrix[1] = src[1]; - matrix[2] = src[2]; - matrix[3] = src[3]; - matrix[4] = src[4]; - matrix[5] = src[5]; - - return this; - }, - - /** - * Copy the values from this Matrix to the given Canvas Rendering Context. - * This will use the Context.transform method. - * - * @method Phaser.GameObjects.Components.TransformMatrix#copyToContext - * @since 3.12.0 - * - * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to. - * - * @return {CanvasRenderingContext2D} The Canvas Rendering Context. - */ - copyToContext: function (ctx) - { - var matrix = this.matrix; - - ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); - - return ctx; - }, - - /** - * Copy the values from this Matrix to the given Canvas Rendering Context. - * This will use the Context.setTransform method. - * - * @method Phaser.GameObjects.Components.TransformMatrix#setToContext - * @since 3.12.0 - * - * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to. - * - * @return {CanvasRenderingContext2D} The Canvas Rendering Context. - */ - setToContext: function (ctx) - { - var matrix = this.matrix; - - ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); - - return ctx; - }, - - /** - * Copy the values in this Matrix to the array given. - * - * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f. - * - * @method Phaser.GameObjects.Components.TransformMatrix#copyToArray - * @since 3.12.0 - * - * @param {array} [out] - The array to copy the matrix values in to. - * - * @return {array} An array where elements 0 to 5 contain the values from this matrix. - */ - copyToArray: function (out) - { - var matrix = this.matrix; - - if (out === undefined) - { - out = [ matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5] ]; - } - else - { - out[0] = matrix[0]; - out[1] = matrix[1]; - out[2] = matrix[2]; - out[3] = matrix[3]; - out[4] = matrix[4]; - out[5] = matrix[5]; - } - - return out; - }, - - /** - * Set the values of this Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#setTransform - * @since 3.0.0 - * - * @param {number} a - The Scale X value. - * @param {number} b - The Shear Y value. - * @param {number} c - The Shear X value. - * @param {number} d - The Scale Y value. - * @param {number} tx - The Translate X value. - * @param {number} ty - The Translate Y value. - * - * @return {this} This TransformMatrix. - */ - setTransform: function (a, b, c, d, tx, ty) - { - var matrix = this.matrix; - - matrix[0] = a; - matrix[1] = b; - matrix[2] = c; - matrix[3] = d; - matrix[4] = tx; - matrix[5] = ty; - - return this; - }, - - /** - * Decompose this Matrix into its translation, scale and rotation values using QR decomposition. - * - * The result must be applied in the following order to reproduce the current matrix: - * - * translate -> rotate -> scale - * - * @method Phaser.GameObjects.Components.TransformMatrix#decomposeMatrix - * @since 3.0.0 - * - * @return {object} The decomposed Matrix. - */ - decomposeMatrix: function () - { - var decomposedMatrix = this.decomposedMatrix; - - var matrix = this.matrix; - - // a = scale X (1) - // b = shear Y (0) - // c = shear X (0) - // d = scale Y (1) - - var a = matrix[0]; - var b = matrix[1]; - var c = matrix[2]; - var d = matrix[3]; - - var determ = a * d - b * c; - - decomposedMatrix.translateX = matrix[4]; - decomposedMatrix.translateY = matrix[5]; - - if (a || b) - { - var r = Math.sqrt(a * a + b * b); - - decomposedMatrix.rotation = (b > 0) ? Math.acos(a / r) : -Math.acos(a / r); - decomposedMatrix.scaleX = r; - decomposedMatrix.scaleY = determ / r; - } - else if (c || d) - { - var s = Math.sqrt(c * c + d * d); - - decomposedMatrix.rotation = Math.PI * 0.5 - (d > 0 ? Math.acos(-c / s) : -Math.acos(c / s)); - decomposedMatrix.scaleX = determ / s; - decomposedMatrix.scaleY = s; - } - else - { - decomposedMatrix.rotation = 0; - decomposedMatrix.scaleX = 0; - decomposedMatrix.scaleY = 0; - } - - return decomposedMatrix; - }, - - /** - * Apply the identity, translate, rotate and scale operations on the Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#applyITRS - * @since 3.0.0 - * - * @param {number} x - The horizontal translation. - * @param {number} y - The vertical translation. - * @param {number} rotation - The angle of rotation in radians. - * @param {number} scaleX - The horizontal scale. - * @param {number} scaleY - The vertical scale. - * - * @return {this} This TransformMatrix. - */ - applyITRS: function (x, y, rotation, scaleX, scaleY) - { - var matrix = this.matrix; - - var radianSin = Math.sin(rotation); - var radianCos = Math.cos(rotation); - - // Translate - matrix[4] = x; - matrix[5] = y; - - // Rotate and Scale - matrix[0] = radianCos * scaleX; - matrix[1] = radianSin * scaleX; - matrix[2] = -radianSin * scaleY; - matrix[3] = radianCos * scaleY; - - return this; - }, - - /** - * Takes the `x` and `y` values and returns a new position in the `output` vector that is the inverse of - * the current matrix with its transformation applied. - * - * Can be used to translate points from world to local space. - * - * @method Phaser.GameObjects.Components.TransformMatrix#applyInverse - * @since 3.12.0 - * - * @param {number} x - The x position to translate. - * @param {number} y - The y position to translate. - * @param {Phaser.Math.Vector2} [output] - A Vector2, or point-like object, to store the results in. - * - * @return {Phaser.Math.Vector2} The coordinates, inverse-transformed through this matrix. - */ - applyInverse: function (x, y, output) - { - if (output === undefined) { output = new Vector2(); } - - var matrix = this.matrix; - - var a = matrix[0]; - var b = matrix[1]; - var c = matrix[2]; - var d = matrix[3]; - var tx = matrix[4]; - var ty = matrix[5]; - - var id = 1 / ((a * d) + (c * -b)); - - output.x = (d * id * x) + (-c * id * y) + (((ty * c) - (tx * d)) * id); - output.y = (a * id * y) + (-b * id * x) + (((-ty * a) + (tx * b)) * id); - - return output; - }, - - /** - * Returns the X component of this matrix multiplied by the given values. - * This is the same as `x * a + y * c + e`. - * - * @method Phaser.GameObjects.Components.TransformMatrix#getX - * @since 3.12.0 - * - * @param {number} x - The x value. - * @param {number} y - The y value. - * - * @return {number} The calculated x value. - */ - getX: function (x, y) - { - return x * this.a + y * this.c + this.e; - }, - - /** - * Returns the Y component of this matrix multiplied by the given values. - * This is the same as `x * b + y * d + f`. - * - * @method Phaser.GameObjects.Components.TransformMatrix#getY - * @since 3.12.0 - * - * @param {number} x - The x value. - * @param {number} y - The y value. - * - * @return {number} The calculated y value. - */ - getY: function (x, y) - { - return x * this.b + y * this.d + this.f; - }, - - /** - * Returns the X component of this matrix multiplied by the given values. - * - * This is the same as `x * a + y * c + e`, optionally passing via `Math.round`. - * - * @method Phaser.GameObjects.Components.TransformMatrix#getXRound - * @since 3.50.0 - * - * @param {number} x - The x value. - * @param {number} y - The y value. - * @param {boolean} [round=false] - Math.round the resulting value? - * - * @return {number} The calculated x value. - */ - getXRound: function (x, y, round) - { - var v = this.getX(x, y); - - if (round) - { - v = Math.round(v); - } - - return v; - }, - - /** - * Returns the Y component of this matrix multiplied by the given values. - * - * This is the same as `x * b + y * d + f`, optionally passing via `Math.round`. - * - * @method Phaser.GameObjects.Components.TransformMatrix#getYRound - * @since 3.50.0 - * - * @param {number} x - The x value. - * @param {number} y - The y value. - * @param {boolean} [round=false] - Math.round the resulting value? - * - * @return {number} The calculated y value. - */ - getYRound: function (x, y, round) - { - var v = this.getY(x, y); - - if (round) - { - v = Math.round(v); - } - - return v; - }, - - /** - * Returns a string that can be used in a CSS Transform call as a `matrix` property. - * - * @method Phaser.GameObjects.Components.TransformMatrix#getCSSMatrix - * @since 3.12.0 - * - * @return {string} A string containing the CSS Transform matrix values. - */ - getCSSMatrix: function () - { - var m = this.matrix; - - return 'matrix(' + m[0] + ',' + m[1] + ',' + m[2] + ',' + m[3] + ',' + m[4] + ',' + m[5] + ')'; - }, - - /** - * Destroys this Transform Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#destroy - * @since 3.4.0 - */ - destroy: function () - { - this.matrix = null; - this.decomposedMatrix = null; - } - -}); - -module.exports = TransformMatrix; - - -/***/ }), -/* 201 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -// bitmask flag for GameObject.renderMask -var _FLAG = 1; // 0001 - -/** - * Provides methods used for setting the visibility of a Game Object. - * Should be applied as a mixin and not used directly. - * - * @namespace Phaser.GameObjects.Components.Visible - * @since 3.0.0 - */ - -var Visible = { - - /** - * Private internal value. Holds the visible value. - * - * @name Phaser.GameObjects.Components.Visible#_visible - * @type {boolean} - * @private - * @default true - * @since 3.0.0 - */ - _visible: true, - - /** - * The visible state of the Game Object. - * - * An invisible Game Object will skip rendering, but will still process update logic. - * - * @name Phaser.GameObjects.Components.Visible#visible - * @type {boolean} - * @since 3.0.0 - */ - visible: { - - get: function () - { - return this._visible; - }, - - set: function (value) - { - if (value) - { - this._visible = true; - this.renderFlags |= _FLAG; - } - else - { - this._visible = false; - this.renderFlags &= ~_FLAG; - } - } - - }, - - /** - * Sets the visibility of this Game Object. - * - * An invisible Game Object will skip rendering, but will still process update logic. - * - * @method Phaser.GameObjects.Components.Visible#setVisible - * @since 3.0.0 - * - * @param {boolean} value - The visible state of the Game Object. - * - * @return {this} This Game Object instance. - */ - setVisible: function (value) - { - this.visible = value; - - return this; - } -}; - -module.exports = Visible; - - -/***/ }), -/* 202 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var ComponentsToJSON = __webpack_require__(203); -var DataManager = __webpack_require__(204); -var EventEmitter = __webpack_require__(210); -var Events = __webpack_require__(211); - -/** - * @classdesc - * The base class that all Game Objects extend. - * You don't create GameObjects directly and they cannot be added to the display list. - * Instead, use them as the base for your own custom classes. - * - * @class GameObject - * @memberof Phaser.GameObjects - * @extends Phaser.Events.EventEmitter - * @constructor - * @since 3.0.0 - * - * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. - * @param {string} type - A textual representation of the type of Game Object, i.e. `sprite`. - */ -var GameObject = new Class({ - - Extends: EventEmitter, - - initialize: - - function GameObject (scene, type) - { - EventEmitter.call(this); - - /** - * The Scene to which this Game Object belongs. - * Game Objects can only belong to one Scene. - * - * @name Phaser.GameObjects.GameObject#scene - * @type {Phaser.Scene} - * @protected - * @since 3.0.0 - */ - this.scene = scene; - - /** - * A textual representation of this Game Object, i.e. `sprite`. - * Used internally by Phaser but is available for your own custom classes to populate. - * - * @name Phaser.GameObjects.GameObject#type - * @type {string} - * @since 3.0.0 - */ - this.type = type; - - /** - * The current state of this Game Object. - * - * Phaser itself will never modify this value, although plugins may do so. - * - * Use this property to track the state of a Game Object during its lifetime. For example, it could change from - * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant - * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons. - * If you need to store complex data about your Game Object, look at using the Data Component instead. - * - * @name Phaser.GameObjects.GameObject#state - * @type {(integer|string)} - * @since 3.16.0 - */ - this.state = 0; - - /** - * The parent Container of this Game Object, if it has one. - * - * @name Phaser.GameObjects.GameObject#parentContainer - * @type {Phaser.GameObjects.Container} - * @since 3.4.0 - */ - this.parentContainer = null; - - /** - * The name of this Game Object. - * Empty by default and never populated by Phaser, this is left for developers to use. - * - * @name Phaser.GameObjects.GameObject#name - * @type {string} - * @default '' - * @since 3.0.0 - */ - this.name = ''; - - /** - * The active state of this Game Object. - * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it. - * An active object is one which is having its logic and internal systems updated. - * - * @name Phaser.GameObjects.GameObject#active - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.active = true; - - /** - * The Tab Index of the Game Object. - * Reserved for future use by plugins and the Input Manager. - * - * @name Phaser.GameObjects.GameObject#tabIndex - * @type {integer} - * @default -1 - * @since 3.0.0 - */ - this.tabIndex = -1; - - /** - * A Data Manager. - * It allows you to store, query and get key/value paired information specific to this Game Object. - * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`. - * - * @name Phaser.GameObjects.GameObject#data - * @type {Phaser.Data.DataManager} - * @default null - * @since 3.0.0 - */ - this.data = null; - - /** - * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not. - * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively. - * If those components are not used by your custom class then you can use this bitmask as you wish. - * - * @name Phaser.GameObjects.GameObject#renderFlags - * @type {integer} - * @default 15 - * @since 3.0.0 - */ - this.renderFlags = 15; - - /** - * A bitmask that controls if this Game Object is drawn by a Camera or not. - * Not usually set directly, instead call `Camera.ignore`, however you can - * set this property directly using the Camera.id property: - * - * @example - * this.cameraFilter |= camera.id - * - * @name Phaser.GameObjects.GameObject#cameraFilter - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.cameraFilter = 0; - - /** - * If this Game Object is enabled for input then this property will contain an InteractiveObject instance. - * Not usually set directly. Instead call `GameObject.setInteractive()`. - * - * @name Phaser.GameObjects.GameObject#input - * @type {?Phaser.Types.Input.InteractiveObject} - * @default null - * @since 3.0.0 - */ - this.input = null; - - /** - * If this Game Object is enabled for Arcade or Matter Physics then this property will contain a reference to a Physics Body. - * - * @name Phaser.GameObjects.GameObject#body - * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|MatterJS.BodyType)} - * @default null - * @since 3.0.0 - */ - this.body = null; - - /** - * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`. - * This includes calls that may come from a Group, Container or the Scene itself. - * While it allows you to persist a Game Object across Scenes, please understand you are entirely - * responsible for managing references to and from this Game Object. - * - * @name Phaser.GameObjects.GameObject#ignoreDestroy - * @type {boolean} - * @default false - * @since 3.5.0 - */ - this.ignoreDestroy = false; - - // Tell the Scene to re-sort the children - scene.sys.queueDepthSort(); - }, - - /** - * Sets the `active` property of this Game Object and returns this Game Object for further chaining. - * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList. - * - * @method Phaser.GameObjects.GameObject#setActive - * @since 3.0.0 - * - * @param {boolean} value - True if this Game Object should be set as active, false if not. - * - * @return {this} This GameObject. - */ - setActive: function (value) - { - this.active = value; - - return this; - }, - - /** - * Sets the `name` property of this Game Object and returns this Game Object for further chaining. - * The `name` property is not populated by Phaser and is presented for your own use. - * - * @method Phaser.GameObjects.GameObject#setName - * @since 3.0.0 - * - * @param {string} value - The name to be given to this Game Object. - * - * @return {this} This GameObject. - */ - setName: function (value) - { - this.name = value; - - return this; - }, - - /** - * Sets the current state of this Game Object. - * - * Phaser itself will never modify the State of a Game Object, although plugins may do so. - * - * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'. - * The state value should typically be an integer (ideally mapped to a constant - * in your game code), but could also be a string. It is recommended to keep it light and simple. - * If you need to store complex data about your Game Object, look at using the Data Component instead. - * - * @method Phaser.GameObjects.GameObject#setState - * @since 3.16.0 - * - * @param {(integer|string)} value - The state of the Game Object. - * - * @return {this} This GameObject. - */ - setState: function (value) - { - this.state = value; - - return this; - }, - - /** - * Adds a Data Manager component to this Game Object. - * - * @method Phaser.GameObjects.GameObject#setDataEnabled - * @since 3.0.0 - * @see Phaser.Data.DataManager - * - * @return {this} This GameObject. - */ - setDataEnabled: function () - { - if (!this.data) - { - this.data = new DataManager(this); - } - - return this; - }, - - /** - * Allows you to store a key value pair within this Game Objects Data Manager. - * - * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled - * before setting the value. - * - * If the key doesn't already exist in the Data Manager then it is created. - * - * ```javascript - * sprite.setData('name', 'Red Gem Stone'); - * ``` - * - * You can also pass in an object of key value pairs as the first argument: - * - * ```javascript - * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 }); - * ``` - * - * To get a value back again you can call `getData`: - * - * ```javascript - * sprite.getData('gold'); - * ``` - * - * Or you can access the value directly via the `values` property, where it works like any other variable: - * - * ```javascript - * sprite.data.values.gold += 50; - * ``` - * - * When the value is first set, a `setdata` event is emitted from this Game Object. - * - * If the key already exists, a `changedata` event is emitted instead, along an event named after the key. - * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`. - * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter. - * - * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings. - * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager. - * - * @method Phaser.GameObjects.GameObject#setData - * @since 3.0.0 - * - * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored. - * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored. - * - * @return {this} This GameObject. - */ - setData: function (key, value) - { - if (!this.data) - { - this.data = new DataManager(this); - } - - this.data.set(key, value); - - return this; - }, - - /** - * Increase a value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is increased from 0. - * - * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled - * before setting the value. - * - * If the key doesn't already exist in the Data Manager then it is created. - * - * When the value is first set, a `setdata` event is emitted from this Game Object. - * - * @method Phaser.GameObjects.GameObject#incData - * @since 3.23.0 - * - * @param {(string|object)} key - The key to increase the value for. - * @param {*} [data] - The value to increase for the given key. - * - * @return {this} This GameObject. - */ - incData: function (key, value) - { - if (!this.data) - { - this.data = new DataManager(this); - } - - this.data.inc(key, value); - - return this; - }, - - /** - * Toggle a boolean value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is toggled from false. - * - * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled - * before setting the value. - * - * If the key doesn't already exist in the Data Manager then it is created. - * - * When the value is first set, a `setdata` event is emitted from this Game Object. - * - * @method Phaser.GameObjects.GameObject#toggleData - * @since 3.23.0 - * - * @param {(string|object)} key - The key to toggle the value for. - * - * @return {this} This GameObject. - */ - toggleData: function (key) - { - if (!this.data) - { - this.data = new DataManager(this); - } - - this.data.toggle(key); - - return this; - }, - - /** - * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist. - * - * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either: - * - * ```javascript - * sprite.getData('gold'); - * ``` - * - * Or access the value directly: - * - * ```javascript - * sprite.data.values.gold; - * ``` - * - * You can also pass in an array of keys, in which case an array of values will be returned: - * - * ```javascript - * sprite.getData([ 'gold', 'armor', 'health' ]); - * ``` - * - * This approach is useful for destructuring arrays in ES6. - * - * @method Phaser.GameObjects.GameObject#getData - * @since 3.0.0 - * - * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys. - * - * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array. - */ - getData: function (key) - { - if (!this.data) - { - this.data = new DataManager(this); - } - - return this.data.get(key); - }, - - /** - * Pass this Game Object to the Input Manager to enable it for Input. - * - * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area - * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced - * input detection. - * - * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If - * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific - * shape for it to use. - * - * You can also provide an Input Configuration Object as the only argument to this method. - * - * @example - * sprite.setInteractive(); - * - * @example - * sprite.setInteractive(new Phaser.Geom.Circle(45, 46, 45), Phaser.Geom.Circle.Contains); - * - * @example - * graphics.setInteractive(new Phaser.Geom.Rectangle(0, 0, 128, 128), Phaser.Geom.Rectangle.Contains); - * - * @method Phaser.GameObjects.GameObject#setInteractive - * @since 3.0.0 - * - * @param {(Phaser.Types.Input.InputConfiguration|any)} [hitArea] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not given it will try to create a Rectangle based on the texture frame. - * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The callback that determines if the pointer is within the Hit Area shape or not. If you provide a shape you must also provide a callback. - * @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target? - * - * @return {this} This GameObject. - */ - setInteractive: function (hitArea, hitAreaCallback, dropZone) - { - this.scene.sys.input.enable(this, hitArea, hitAreaCallback, dropZone); - - return this; - }, - - /** - * If this Game Object has previously been enabled for input, this will disable it. - * - * An object that is disabled for input stops processing or being considered for - * input events, but can be turned back on again at any time by simply calling - * `setInteractive()` with no arguments provided. - * - * If want to completely remove interaction from this Game Object then use `removeInteractive` instead. - * - * @method Phaser.GameObjects.GameObject#disableInteractive - * @since 3.7.0 - * - * @return {this} This GameObject. - */ - disableInteractive: function () - { - if (this.input) - { - this.input.enabled = false; - } - - return this; - }, - - /** - * If this Game Object has previously been enabled for input, this will queue it - * for removal, causing it to no longer be interactive. The removal happens on - * the next game step, it is not immediate. - * - * The Interactive Object that was assigned to this Game Object will be destroyed, - * removed from the Input Manager and cleared from this Game Object. - * - * If you wish to re-enable this Game Object at a later date you will need to - * re-create its InteractiveObject by calling `setInteractive` again. - * - * If you wish to only temporarily stop an object from receiving input then use - * `disableInteractive` instead, as that toggles the interactive state, where-as - * this erases it completely. - * - * If you wish to resize a hit area, don't remove and then set it as being - * interactive. Instead, access the hitarea object directly and resize the shape - * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the - * shape is a Rectangle, which it is by default.) - * - * @method Phaser.GameObjects.GameObject#removeInteractive - * @since 3.7.0 - * - * @return {this} This GameObject. - */ - removeInteractive: function () - { - this.scene.sys.input.clear(this); - - this.input = undefined; - - return this; - }, - - /** - * This callback is invoked when this Game Object is added to a Scene. - * - * Can be overriden by custom Game Objects, but be aware of some Game Objects that - * will use this, such as Sprites, to add themselves into the Update List. - * - * You can also listen for the `ADDED_TO_SCENE` event from this Game Object. - * - * @method Phaser.GameObjects.GameObject#addedToScene - * @since 3.50.0 - */ - addedToScene: function () - { - }, - - /** - * This callback is invoked when this Game Object is removed from a Scene. - * - * Can be overriden by custom Game Objects, but be aware of some Game Objects that - * will use this, such as Sprites, to removed themselves from the Update List. - * - * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object. - * - * @method Phaser.GameObjects.GameObject#removedFromScene - * @since 3.50.0 - */ - removedFromScene: function () - { - }, - - /** - * To be overridden by custom GameObjects. Allows base objects to be used in a Pool. - * - * @method Phaser.GameObjects.GameObject#update - * @since 3.0.0 - * - * @param {...*} [args] - args - */ - update: function () - { - }, - - /** - * Returns a JSON representation of the Game Object. - * - * @method Phaser.GameObjects.GameObject#toJSON - * @since 3.0.0 - * - * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object. - */ - toJSON: function () - { - return ComponentsToJSON(this); - }, - - /** - * Compares the renderMask with the renderFlags to see if this Game Object will render or not. - * Also checks the Game Object against the given Cameras exclusion list. - * - * @method Phaser.GameObjects.GameObject#willRender - * @since 3.0.0 - * - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to check against this Game Object. - * - * @return {boolean} True if the Game Object should be rendered, otherwise false. - */ - willRender: function (camera) - { - return !(GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id))); - }, - - /** - * Returns an array containing the display list index of either this Game Object, or if it has one, - * its parent Container. It then iterates up through all of the parent containers until it hits the - * root of the display list (which is index 0 in the returned array). - * - * Used internally by the InputPlugin but also useful if you wish to find out the display depth of - * this Game Object and all of its ancestors. - * - * @method Phaser.GameObjects.GameObject#getIndexList - * @since 3.4.0 - * - * @return {integer[]} An array of display list position indexes. - */ - getIndexList: function () - { - // eslint-disable-next-line consistent-this - var child = this; - var parent = this.parentContainer; - - var indexes = []; - - while (parent) - { - // indexes.unshift([parent.getIndex(child), parent.name]); - indexes.unshift(parent.getIndex(child)); - - child = parent; - - if (!parent.parentContainer) - { - break; - } - else - { - parent = parent.parentContainer; - } - } - - // indexes.unshift([this.scene.sys.displayList.getIndex(child), 'root']); - indexes.unshift(this.scene.sys.displayList.getIndex(child)); - - return indexes; - }, - - /** - * Destroys this Game Object removing it from the Display List and Update List and - * severing all ties to parent resources. - * - * Also removes itself from the Input Manager and Physics Manager if previously enabled. - * - * Use this to remove a Game Object from your game if you don't ever plan to use it again. - * As long as no reference to it exists within your own code it should become free for - * garbage collection by the browser. - * - * If you just want to temporarily disable an object then look at using the - * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected. - * - * @method Phaser.GameObjects.GameObject#destroy - * @fires Phaser.GameObjects.Events#DESTROY - * @since 3.0.0 - * - * @param {boolean} [fromScene=false] - Is this Game Object being destroyed as the result of a Scene shutdown? - */ - destroy: function (fromScene) - { - if (fromScene === undefined) { fromScene = false; } - - // This Game Object has already been destroyed - if (!this.scene || this.ignoreDestroy) - { - return; - } - - if (this.preDestroy) - { - this.preDestroy.call(this); - } - - this.emit(Events.DESTROY, this); - - var sys = this.scene.sys; - - if (!fromScene) - { - sys.displayList.remove(this); - } - - if (this.input) - { - sys.input.clear(this); - this.input = undefined; - } - - if (this.data) - { - this.data.destroy(); - - this.data = undefined; - } - - if (this.body) - { - this.body.destroy(); - this.body = undefined; - } - - // Tell the Scene to re-sort the children - if (!fromScene) - { - sys.queueDepthSort(); - } - - this.active = false; - this.visible = false; - - this.scene = undefined; - - this.parentContainer = undefined; - - this.removeAllListeners(); - } - -}); - -/** - * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not. - * - * @constant {integer} RENDER_MASK - * @memberof Phaser.GameObjects.GameObject - * @default - */ -GameObject.RENDER_MASK = 15; - -module.exports = GameObject; - - -/***/ }), -/* 203 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Build a JSON representation of the given Game Object. - * - * This is typically extended further by Game Object specific implementations. - * - * @method Phaser.GameObjects.Components.ToJSON - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to export as JSON. - * - * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object. - */ -var ToJSON = function (gameObject) -{ - var out = { - name: gameObject.name, - type: gameObject.type, - x: gameObject.x, - y: gameObject.y, - depth: gameObject.depth, - scale: { - x: gameObject.scaleX, - y: gameObject.scaleY - }, - origin: { - x: gameObject.originX, - y: gameObject.originY - }, - flipX: gameObject.flipX, - flipY: gameObject.flipY, - rotation: gameObject.rotation, - alpha: gameObject.alpha, - visible: gameObject.visible, - blendMode: gameObject.blendMode, - textureKey: '', - frameKey: '', - data: {} - }; - - if (gameObject.texture) - { - out.textureKey = gameObject.texture.key; - out.frameKey = gameObject.frame.name; - } - - return out; -}; - -module.exports = ToJSON; - - -/***/ }), -/* 204 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var Events = __webpack_require__(205); +var Events = __webpack_require__(220); /** * @callback DataEachCallback @@ -31729,7 +33391,7 @@ module.exports = DataManager; /***/ }), -/* 205 */ +/* 220 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31744,16 +33406,16 @@ module.exports = DataManager; module.exports = { - CHANGE_DATA: __webpack_require__(206), - CHANGE_DATA_KEY: __webpack_require__(207), - REMOVE_DATA: __webpack_require__(208), - SET_DATA: __webpack_require__(209) + CHANGE_DATA: __webpack_require__(221), + CHANGE_DATA_KEY: __webpack_require__(222), + REMOVE_DATA: __webpack_require__(223), + SET_DATA: __webpack_require__(224) }; /***/ }), -/* 206 */ +/* 221 */ /***/ (function(module, exports) { /** @@ -31785,7 +33447,7 @@ module.exports = 'changedata'; /***/ }), -/* 207 */ +/* 222 */ /***/ (function(module, exports) { /** @@ -31815,7 +33477,7 @@ module.exports = 'changedata-'; /***/ }), -/* 208 */ +/* 223 */ /***/ (function(module, exports) { /** @@ -31843,7 +33505,7 @@ module.exports = 'removedata'; /***/ }), -/* 209 */ +/* 224 */ /***/ (function(module, exports) { /** @@ -31871,383 +33533,7 @@ module.exports = 'setdata'; /***/ }), -/* 210 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var has = Object.prototype.hasOwnProperty - , prefix = '~'; - -/** - * Constructor to create a storage for our `EE` objects. - * An `Events` instance is a plain object whose properties are event names. - * - * @constructor - * @private - */ -function Events() {} - -// -// We try to not inherit from `Object.prototype`. In some engines creating an -// instance in this way is faster than calling `Object.create(null)` directly. -// If `Object.create(null)` is not supported we prefix the event names with a -// character to make sure that the built-in object properties are not -// overridden or used as an attack vector. -// -if (Object.create) { - Events.prototype = Object.create(null); - - // - // This hack is needed because the `__proto__` property is still inherited in - // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5. - // - if (!new Events().__proto__) prefix = false; -} - -/** - * Representation of a single event listener. - * - * @param {Function} fn The listener function. - * @param {*} context The context to invoke the listener with. - * @param {Boolean} [once=false] Specify if the listener is a one-time listener. - * @constructor - * @private - */ -function EE(fn, context, once) { - this.fn = fn; - this.context = context; - this.once = once || false; -} - -/** - * Add a listener for a given event. - * - * @param {EventEmitter} emitter Reference to the `EventEmitter` instance. - * @param {(String|Symbol)} event The event name. - * @param {Function} fn The listener function. - * @param {*} context The context to invoke the listener with. - * @param {Boolean} once Specify if the listener is a one-time listener. - * @returns {EventEmitter} - * @private - */ -function addListener(emitter, event, fn, context, once) { - if (typeof fn !== 'function') { - throw new TypeError('The listener must be a function'); - } - - var listener = new EE(fn, context || emitter, once) - , evt = prefix ? prefix + event : event; - - if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++; - else if (!emitter._events[evt].fn) emitter._events[evt].push(listener); - else emitter._events[evt] = [emitter._events[evt], listener]; - - return emitter; -} - -/** - * Clear event by name. - * - * @param {EventEmitter} emitter Reference to the `EventEmitter` instance. - * @param {(String|Symbol)} evt The Event name. - * @private - */ -function clearEvent(emitter, evt) { - if (--emitter._eventsCount === 0) emitter._events = new Events(); - else delete emitter._events[evt]; -} - -/** - * Minimal `EventEmitter` interface that is molded against the Node.js - * `EventEmitter` interface. - * - * @constructor - * @public - */ -function EventEmitter() { - this._events = new Events(); - this._eventsCount = 0; -} - -/** - * Return an array listing the events for which the emitter has registered - * listeners. - * - * @returns {Array} - * @public - */ -EventEmitter.prototype.eventNames = function eventNames() { - var names = [] - , events - , name; - - if (this._eventsCount === 0) return names; - - for (name in (events = this._events)) { - if (has.call(events, name)) names.push(prefix ? name.slice(1) : name); - } - - if (Object.getOwnPropertySymbols) { - return names.concat(Object.getOwnPropertySymbols(events)); - } - - return names; -}; - -/** - * Return the listeners registered for a given event. - * - * @param {(String|Symbol)} event The event name. - * @returns {Array} The registered listeners. - * @public - */ -EventEmitter.prototype.listeners = function listeners(event) { - var evt = prefix ? prefix + event : event - , handlers = this._events[evt]; - - if (!handlers) return []; - if (handlers.fn) return [handlers.fn]; - - for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) { - ee[i] = handlers[i].fn; - } - - return ee; -}; - -/** - * Return the number of listeners listening to a given event. - * - * @param {(String|Symbol)} event The event name. - * @returns {Number} The number of listeners. - * @public - */ -EventEmitter.prototype.listenerCount = function listenerCount(event) { - var evt = prefix ? prefix + event : event - , listeners = this._events[evt]; - - if (!listeners) return 0; - if (listeners.fn) return 1; - return listeners.length; -}; - -/** - * Calls each of the listeners registered for a given event. - * - * @param {(String|Symbol)} event The event name. - * @returns {Boolean} `true` if the event had listeners, else `false`. - * @public - */ -EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) { - var evt = prefix ? prefix + event : event; - - if (!this._events[evt]) return false; - - var listeners = this._events[evt] - , len = arguments.length - , args - , i; - - if (listeners.fn) { - if (listeners.once) this.removeListener(event, listeners.fn, undefined, true); - - switch (len) { - case 1: return listeners.fn.call(listeners.context), true; - case 2: return listeners.fn.call(listeners.context, a1), true; - case 3: return listeners.fn.call(listeners.context, a1, a2), true; - case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true; - case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true; - case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true; - } - - for (i = 1, args = new Array(len -1); i < len; i++) { - args[i - 1] = arguments[i]; - } - - listeners.fn.apply(listeners.context, args); - } else { - var length = listeners.length - , j; - - for (i = 0; i < length; i++) { - if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true); - - switch (len) { - case 1: listeners[i].fn.call(listeners[i].context); break; - case 2: listeners[i].fn.call(listeners[i].context, a1); break; - case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break; - case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break; - default: - if (!args) for (j = 1, args = new Array(len -1); j < len; j++) { - args[j - 1] = arguments[j]; - } - - listeners[i].fn.apply(listeners[i].context, args); - } - } - } - - return true; -}; - -/** - * Add a listener for a given event. - * - * @param {(String|Symbol)} event The event name. - * @param {Function} fn The listener function. - * @param {*} [context=this] The context to invoke the listener with. - * @returns {EventEmitter} `this`. - * @public - */ -EventEmitter.prototype.on = function on(event, fn, context) { - return addListener(this, event, fn, context, false); -}; - -/** - * Add a one-time listener for a given event. - * - * @param {(String|Symbol)} event The event name. - * @param {Function} fn The listener function. - * @param {*} [context=this] The context to invoke the listener with. - * @returns {EventEmitter} `this`. - * @public - */ -EventEmitter.prototype.once = function once(event, fn, context) { - return addListener(this, event, fn, context, true); -}; - -/** - * Remove the listeners of a given event. - * - * @param {(String|Symbol)} event The event name. - * @param {Function} fn Only remove the listeners that match this function. - * @param {*} context Only remove the listeners that have this context. - * @param {Boolean} once Only remove one-time listeners. - * @returns {EventEmitter} `this`. - * @public - */ -EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) { - var evt = prefix ? prefix + event : event; - - if (!this._events[evt]) return this; - if (!fn) { - clearEvent(this, evt); - return this; - } - - var listeners = this._events[evt]; - - if (listeners.fn) { - if ( - listeners.fn === fn && - (!once || listeners.once) && - (!context || listeners.context === context) - ) { - clearEvent(this, evt); - } - } else { - for (var i = 0, events = [], length = listeners.length; i < length; i++) { - if ( - listeners[i].fn !== fn || - (once && !listeners[i].once) || - (context && listeners[i].context !== context) - ) { - events.push(listeners[i]); - } - } - - // - // Reset the array, or remove it completely if we have no more listeners. - // - if (events.length) this._events[evt] = events.length === 1 ? events[0] : events; - else clearEvent(this, evt); - } - - return this; -}; - -/** - * Remove all listeners, or those of the specified event. - * - * @param {(String|Symbol)} [event] The event name. - * @returns {EventEmitter} `this`. - * @public - */ -EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) { - var evt; - - if (event) { - evt = prefix ? prefix + event : event; - if (this._events[evt]) clearEvent(this, evt); - } else { - this._events = new Events(); - this._eventsCount = 0; - } - - return this; -}; - -// -// Alias methods names because people roll like that. -// -EventEmitter.prototype.off = EventEmitter.prototype.removeListener; -EventEmitter.prototype.addListener = EventEmitter.prototype.on; - -// -// Expose the prefix. -// -EventEmitter.prefixed = prefix; - -// -// Allow `EventEmitter` to be imported as module namespace. -// -EventEmitter.EventEmitter = EventEmitter; - -// -// Expose the module. -// -if (true) { - module.exports = EventEmitter; -} - - -/***/ }), -/* 211 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.GameObjects.Events - */ - -module.exports = { - - ADDED_TO_SCENE: __webpack_require__(212), - DESTROY: __webpack_require__(213), - REMOVED_FROM_SCENE: __webpack_require__(214), - VIDEO_COMPLETE: __webpack_require__(215), - VIDEO_CREATED: __webpack_require__(216), - VIDEO_ERROR: __webpack_require__(217), - VIDEO_LOOP: __webpack_require__(218), - VIDEO_PLAY: __webpack_require__(219), - VIDEO_SEEKED: __webpack_require__(220), - VIDEO_SEEKING: __webpack_require__(221), - VIDEO_STOP: __webpack_require__(222), - VIDEO_TIMEOUT: __webpack_require__(223), - VIDEO_UNLOCKED: __webpack_require__(224) - -}; - - -/***/ }), -/* 212 */ +/* 225 */ /***/ (function(module, exports) { /** @@ -32273,7 +33559,7 @@ module.exports = 'addedtoscene'; /***/ }), -/* 213 */ +/* 226 */ /***/ (function(module, exports) { /** @@ -32298,7 +33584,7 @@ module.exports = 'destroy'; /***/ }), -/* 214 */ +/* 227 */ /***/ (function(module, exports) { /** @@ -32324,7 +33610,7 @@ module.exports = 'removedfromscene'; /***/ }), -/* 215 */ +/* 228 */ /***/ (function(module, exports) { /** @@ -32356,7 +33642,7 @@ module.exports = 'complete'; /***/ }), -/* 216 */ +/* 229 */ /***/ (function(module, exports) { /** @@ -32385,7 +33671,7 @@ module.exports = 'created'; /***/ }), -/* 217 */ +/* 230 */ /***/ (function(module, exports) { /** @@ -32411,7 +33697,7 @@ module.exports = 'error'; /***/ }), -/* 218 */ +/* 231 */ /***/ (function(module, exports) { /** @@ -32443,7 +33729,7 @@ module.exports = 'loop'; /***/ }), -/* 219 */ +/* 232 */ /***/ (function(module, exports) { /** @@ -32471,7 +33757,7 @@ module.exports = 'play'; /***/ }), -/* 220 */ +/* 233 */ /***/ (function(module, exports) { /** @@ -32496,7 +33782,7 @@ module.exports = 'seeked'; /***/ }), -/* 221 */ +/* 234 */ /***/ (function(module, exports) { /** @@ -32522,7 +33808,7 @@ module.exports = 'seeking'; /***/ }), -/* 222 */ +/* 235 */ /***/ (function(module, exports) { /** @@ -32548,7 +33834,7 @@ module.exports = 'stop'; /***/ }), -/* 223 */ +/* 236 */ /***/ (function(module, exports) { /** @@ -32574,7 +33860,7 @@ module.exports = 'timeout'; /***/ }), -/* 224 */ +/* 237 */ /***/ (function(module, exports) { /** @@ -32600,12 +33886,12 @@ module.exports = 'unlocked'; /***/ }), -/* 225 */ +/* 238 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32615,23 +33901,23 @@ module.exports = 'unlocked'; module.exports = { - COMPLETE: __webpack_require__(226), - DISPOSE: __webpack_require__(227), - END: __webpack_require__(228), - EVENT: __webpack_require__(229), - INTERRUPTED: __webpack_require__(230), - START: __webpack_require__(231) + COMPLETE: __webpack_require__(239), + DISPOSE: __webpack_require__(240), + END: __webpack_require__(241), + EVENT: __webpack_require__(242), + INTERRUPTED: __webpack_require__(243), + START: __webpack_require__(244) }; /***/ }), -/* 226 */ +/* 239 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32645,12 +33931,12 @@ module.exports = 'complete'; /***/ }), -/* 227 */ +/* 240 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32664,12 +33950,12 @@ module.exports = 'dispose'; /***/ }), -/* 228 */ +/* 241 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32683,12 +33969,12 @@ module.exports = 'end'; /***/ }), -/* 229 */ +/* 242 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32702,12 +33988,12 @@ module.exports = 'event'; /***/ }), -/* 230 */ +/* 243 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32721,12 +34007,12 @@ module.exports = 'interrupted'; /***/ }), -/* 231 */ +/* 244 */ /***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32740,21 +34026,21 @@ module.exports = 'start'; /***/ }), -/* 232 */ +/* 245 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var renderWebGL = __webpack_require__(34); -var renderCanvas = __webpack_require__(34); +var renderWebGL = __webpack_require__(4); +var renderCanvas = __webpack_require__(4); if (true) { - renderWebGL = __webpack_require__(233); + renderWebGL = __webpack_require__(246); } if (false) @@ -32769,18 +34055,18 @@ module.exports = { /***/ }), -/* 233 */ +/* 246 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2019 Photon Storm Ltd. + * @copyright 2020 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var CounterClockwise = __webpack_require__(7); -var RadToDeg = __webpack_require__(10); -var Wrap = __webpack_require__(5); +var CounterClockwise = __webpack_require__(11); +var RadToDeg = __webpack_require__(12); +var Wrap = __webpack_require__(8); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -32801,24 +34087,28 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent { var plugin = src.plugin; var skeleton = src.skeleton; + var childAlpha = skeleton.color.a; var sceneRenderer = plugin.sceneRenderer; var GameObjectRenderMask = 15; - var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id))); + var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || childAlpha === 0); if (!skeleton || !willRender) { - // Reset the current type - renderer.currentType = ''; - // If there is already a batch running, we need to close it if (!renderer.nextTypeMatch) { // The next object in the display list is not a Spine object, so we end the batch sceneRenderer.end(); - renderer.rebindPipeline(renderer.pipelines.MultiPipeline); + if (!renderer.finalType) + { + // Reset the current type + renderer.currentType = ''; + + renderer.rebindPipeline(renderer.pipelines.MultiPipeline); + } } return; @@ -32892,7 +34182,7 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent } } - if (camera.renderToTexture) + if (camera.renderToTexture || renderer.currentFramebuffer !== null) { skeleton.y = calcMatrix.ty; skeleton.scaleY *= -1; @@ -32926,15 +34216,11606 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent if (!renderer.nextTypeMatch) { - // The next object in the display list is not a Spine object, so we end the batch + // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch. sceneRenderer.end(); - renderer.rebindPipeline(renderer.pipelines.MultiPipeline); + if (!renderer.finalType) + { + renderer.rebindPipeline(renderer.pipelines.MultiPipeline); + } } }; module.exports = SpineGameObjectWebGLRenderer; +/***/ }), +/* 247 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Class = __webpack_require__(0); +var Container = __webpack_require__(248); +var SpineContainerRender = __webpack_require__(353); + +/** + * @classdesc + * A Spine Container is a special kind of Container created specifically for Spine Game Objects. + * + * You have all of the same features of a standard Container, but the rendering functions are optimized specifically + * for Spine Game Objects. You cannot mix and match Spine Game Objects with regular Game Objects inside of this + * type of Container, however. + * + * To create one in a Scene, use the factory methods: + * + * ```javascript + * this.add.spinecontainer(); + * ``` + * + * or + * + * ```javascript + * this.make.spinecontainer(); + * ``` + * + * See the Container documentation for further details. + * + * @class SpineContainer + * @extends Phaser.GameObjects.Container + * @constructor + * @since 3.50.0 + * + * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to. + * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin. + * @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 {SpineGameObject[]} [children] - An optional array of Spine Game Objects to add to this Container. + */ +var SpineContainer = new Class({ + + Extends: Container, + + Mixins: [ + SpineContainerRender + ], + + initialize: + + function SpineContainer (scene, plugin, x, y, children) + { + Container.call(this, scene, x, y, children); + + // Same as SpineGameObject, to prevent the renderer from mis-typing it when batching + this.type = 'Spine'; + + /** + * A reference to the Spine Plugin. + * + * @name SpineGameObject#plugin + * @type {SpinePlugin} + * @since 3.19.0 + */ + this.plugin = plugin; + } + +}); + +module.exports = SpineContainer; + + +/***/ }), +/* 248 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var ArrayUtils = __webpack_require__(249); +var BlendModes = __webpack_require__(16); +var Class = __webpack_require__(0); +var Components = __webpack_require__(285); +var Events = __webpack_require__(22); +var GameObject = __webpack_require__(53); +var GameObjectEvents = __webpack_require__(22); +var Rectangle = __webpack_require__(24); +var Render = __webpack_require__(350); +var Union = __webpack_require__(352); +var Vector2 = __webpack_require__(1); + +/** + * @classdesc + * A Container Game Object. + * + * A Container, as the name implies, can 'contain' other types of Game Object. + * When a Game Object is added to a Container, the Container becomes responsible for the rendering of it. + * By default it will be removed from the Display List and instead added to the Containers own internal list. + * + * The position of the Game Object automatically becomes relative to the position of the Container. + * + * The origin of a Container is 0x0 (in local space) and that cannot be changed. The children you add to the + * Container should be positioned with this value in mind. I.e. you should treat 0x0 as being the center of + * the Container, and position children positively and negative around it as required. + * + * When the Container is rendered, all of its children are rendered as well, in the order in which they exist + * within the Container. Container children can be repositioned using methods such as `MoveUp`, `MoveDown` and `SendToBack`. + * + * If you modify a transform property of the Container, such as `Container.x` or `Container.rotation` then it will + * automatically influence all children as well. + * + * Containers can include other Containers for deeply nested transforms. + * + * Containers can have masks set on them and can be used as a mask too. However, Container children cannot be masked. + * The masks do not 'stack up'. Only a Container on the root of the display list will use its mask. + * + * Containers can be enabled for input. Because they do not have a texture you need to provide a shape for them + * to use as their hit area. Container children can also be enabled for input, independent of the Container. + * + * Containers can be given a physics body for either Arcade Physics, Impact Physics or Matter Physics. However, + * if Container _children_ are enabled for physics you may get unexpected results, such as offset bodies, + * if the Container itself, or any of its ancestors, is positioned anywhere other than at 0 x 0. Container children + * with physics do not factor in the Container due to the excessive extra calculations needed. Please structure + * your game to work around this. + * + * It's important to understand the impact of using Containers. They add additional processing overhead into + * every one of their children. The deeper you nest them, the more the cost escalates. This is especially true + * for input events. You also loose the ability to set the display depth of Container children in the same + * flexible manner as those not within them. In short, don't use them for the sake of it. You pay a small cost + * every time you create one, try to structure your game around avoiding that where possible. + * + * @class Container + * @extends Phaser.GameObjects.GameObject + * @memberof Phaser.GameObjects + * @constructor + * @since 3.4.0 + * + * @extends Phaser.GameObjects.Components.AlphaSingle + * @extends Phaser.GameObjects.Components.BlendMode + * @extends Phaser.GameObjects.Components.ComputedSize + * @extends Phaser.GameObjects.Components.Depth + * @extends Phaser.GameObjects.Components.Mask + * @extends Phaser.GameObjects.Components.Transform + * @extends Phaser.GameObjects.Components.Visible + * + * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time. + * @param {number} [x=0] - The horizontal position of this Game Object in the world. + * @param {number} [y=0] - The vertical position of this Game Object in the world. + * @param {Phaser.GameObjects.GameObject[]} [children] - An optional array of Game Objects to add to this Container. + */ +var Container = new Class({ + + Extends: GameObject, + + Mixins: [ + Components.AlphaSingle, + Components.BlendMode, + Components.ComputedSize, + Components.Depth, + Components.Mask, + Components.Transform, + Components.Visible, + Render + ], + + initialize: + + function Container (scene, x, y, children) + { + GameObject.call(this, scene, 'Container'); + + /** + * An array holding the children of this Container. + * + * @name Phaser.GameObjects.Container#list + * @type {Phaser.GameObjects.GameObject[]} + * @since 3.4.0 + */ + this.list = []; + + /** + * Does this Container exclusively manage its children? + * + * The default is `true` which means a child added to this Container cannot + * belong in another Container, which includes the Scene display list. + * + * If you disable this then this Container will no longer exclusively manage its children. + * This allows you to create all kinds of interesting graphical effects, such as replicating + * Game Objects without reparenting them all over the Scene. + * However, doing so will prevent children from receiving any kind of input event or have + * their physics bodies work by default, as they're no longer a single entity on the + * display list, but are being replicated where-ever this Container is. + * + * @name Phaser.GameObjects.Container#exclusive + * @type {boolean} + * @default true + * @since 3.4.0 + */ + this.exclusive = true; + + /** + * Containers can have an optional maximum size. If set to anything above 0 it + * will constrict the addition of new Game Objects into the Container, capping off + * the maximum limit the Container can grow in size to. + * + * @name Phaser.GameObjects.Container#maxSize + * @type {integer} + * @default -1 + * @since 3.4.0 + */ + this.maxSize = -1; + + /** + * The cursor position. + * + * @name Phaser.GameObjects.Container#position + * @type {integer} + * @since 3.4.0 + */ + this.position = 0; + + /** + * Internal Transform Matrix used for local space conversion. + * + * @name Phaser.GameObjects.Container#localTransform + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @since 3.4.0 + */ + this.localTransform = new Components.TransformMatrix(); + + /** + * Internal temporary Transform Matrix used to avoid object creation. + * + * @name Phaser.GameObjects.Container#tempTransformMatrix + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @private + * @since 3.4.0 + */ + this.tempTransformMatrix = new Components.TransformMatrix(); + + /** + * A reference to the Scene Display List. + * + * @name Phaser.GameObjects.Container#_displayList + * @type {Phaser.GameObjects.DisplayList} + * @private + * @since 3.4.0 + */ + this._displayList = scene.sys.displayList; + + /** + * The property key to sort by. + * + * @name Phaser.GameObjects.Container#_sortKey + * @type {string} + * @private + * @since 3.4.0 + */ + this._sortKey = ''; + + /** + * A reference to the Scene Systems Event Emitter. + * + * @name Phaser.GameObjects.Container#_sysEvents + * @type {Phaser.Events.EventEmitter} + * @private + * @since 3.9.0 + */ + this._sysEvents = scene.sys.events; + + /** + * The horizontal scroll factor of this Container. + * + * The scroll factor controls the influence of the movement of a Camera upon this Container. + * + * When a camera scrolls it will change the location at which this Container is rendered on-screen. + * It does not change the Containers actual position values. + * + * For a Container, setting this value will only update the Container itself, not its children. + * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method. + * + * 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 Container. + * + * 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. + * + * @name Phaser.GameObjects.Container#scrollFactorX + * @type {number} + * @default 1 + * @since 3.0.0 + */ + this.scrollFactorX = 1; + + /** + * The vertical scroll factor of this Container. + * + * The scroll factor controls the influence of the movement of a Camera upon this Container. + * + * When a camera scrolls it will change the location at which this Container is rendered on-screen. + * It does not change the Containers actual position values. + * + * For a Container, setting this value will only update the Container itself, not its children. + * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method. + * + * 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 Container. + * + * 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. + * + * @name Phaser.GameObjects.Container#scrollFactorY + * @type {number} + * @default 1 + * @since 3.0.0 + */ + this.scrollFactorY = 1; + + this.setPosition(x, y); + + this.clearAlpha(); + + this.setBlendMode(BlendModes.SKIP_CHECK); + + if (children) + { + this.add(children); + } + }, + + /** + * Internal value to allow Containers to be used for input and physics. + * Do not change this value. It has no effect other than to break things. + * + * @name Phaser.GameObjects.Container#originX + * @type {number} + * @readonly + * @since 3.4.0 + */ + originX: { + + get: function () + { + return 0.5; + } + + }, + + /** + * Internal value to allow Containers to be used for input and physics. + * Do not change this value. It has no effect other than to break things. + * + * @name Phaser.GameObjects.Container#originY + * @type {number} + * @readonly + * @since 3.4.0 + */ + originY: { + + get: function () + { + return 0.5; + } + + }, + + /** + * Internal value to allow Containers to be used for input and physics. + * Do not change this value. It has no effect other than to break things. + * + * @name Phaser.GameObjects.Container#displayOriginX + * @type {number} + * @readonly + * @since 3.4.0 + */ + displayOriginX: { + + get: function () + { + return this.width * 0.5; + } + + }, + + /** + * Internal value to allow Containers to be used for input and physics. + * Do not change this value. It has no effect other than to break things. + * + * @name Phaser.GameObjects.Container#displayOriginY + * @type {number} + * @readonly + * @since 3.4.0 + */ + displayOriginY: { + + get: function () + { + return this.height * 0.5; + } + + }, + + /** + * Does this Container exclusively manage its children? + * + * The default is `true` which means a child added to this Container cannot + * belong in another Container, which includes the Scene display list. + * + * If you disable this then this Container will no longer exclusively manage its children. + * This allows you to create all kinds of interesting graphical effects, such as replicating + * Game Objects without reparenting them all over the Scene. + * However, doing so will prevent children from receiving any kind of input event or have + * their physics bodies work by default, as they're no longer a single entity on the + * display list, but are being replicated where-ever this Container is. + * + * @method Phaser.GameObjects.Container#setExclusive + * @since 3.4.0 + * + * @param {boolean} [value=true] - The exclusive state of this Container. + * + * @return {this} This Container. + */ + setExclusive: function (value) + { + if (value === undefined) { value = true; } + + this.exclusive = value; + + return this; + }, + + /** + * Gets the bounds of this Container. It works by iterating all children of the Container, + * getting their respective bounds, and then working out a min-max rectangle from that. + * It does not factor in if the children render or not, all are included. + * + * Some children are unable to return their bounds, such as Graphics objects, in which case + * they are skipped. + * + * Depending on the quantity of children in this Container it could be a really expensive call, + * so cache it and only poll it as needed. + * + * The values are stored and returned in a Rectangle object. + * + * @method Phaser.GameObjects.Container#getBounds + * @since 3.4.0 + * + * @param {Phaser.Geom.Rectangle} [output] - A Geom.Rectangle object to store the values in. If not provided a new Rectangle will be created. + * + * @return {Phaser.Geom.Rectangle} The values stored in the output object. + */ + getBounds: function (output) + { + if (output === undefined) { output = new Rectangle(); } + + output.setTo(this.x, this.y, 0, 0); + + if (this.parentContainer) + { + var parentMatrix = this.parentContainer.getBoundsTransformMatrix(); + var transformedPosition = parentMatrix.transformPoint(this.x, this.y); + + output.setTo(transformedPosition.x, transformedPosition.y, 0, 0); + } + + if (this.list.length > 0) + { + var children = this.list; + var tempRect = new Rectangle(); + var hasSetFirst = false; + + output.setEmpty(); + + for (var i = 0; i < children.length; i++) + { + var entry = children[i]; + + if (entry.getBounds) + { + entry.getBounds(tempRect); + + if (!hasSetFirst) + { + output.setTo(tempRect.x, tempRect.y, tempRect.width, tempRect.height); + hasSetFirst = true; + } + else + { + Union(tempRect, output, output); + } + } + } + } + + return output; + }, + + /** + * Internal add handler. + * + * @method Phaser.GameObjects.Container#addHandler + * @private + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just added to this Container. + */ + addHandler: function (gameObject) + { + gameObject.once(Events.DESTROY, this.remove, this); + + if (this.exclusive) + { + this._displayList.remove(gameObject); + + if (gameObject.parentContainer) + { + gameObject.parentContainer.remove(gameObject); + } + + gameObject.parentContainer = this; + } + + // Is only on the Display List via this Container + if (!this.scene.sys.displayList.exists(gameObject)) + { + gameObject.emit(GameObjectEvents.ADDED_TO_SCENE, gameObject, this.scene); + } + }, + + /** + * Internal remove handler. + * + * @method Phaser.GameObjects.Container#removeHandler + * @private + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just removed from this Container. + */ + removeHandler: function (gameObject) + { + gameObject.off(Events.DESTROY, this.remove); + + if (this.exclusive) + { + gameObject.parentContainer = null; + } + + // Is only on the Display List via this Container + if (!this.scene.sys.displayList.exists(gameObject)) + { + gameObject.emit(GameObjectEvents.REMOVED_FROM_SCENE, gameObject, this.scene); + } + }, + + /** + * Takes a Point-like object, such as a Vector2, Geom.Point or object with public x and y properties, + * and transforms it into the space of this Container, then returns it in the output object. + * + * @method Phaser.GameObjects.Container#pointToContainer + * @since 3.4.0 + * + * @param {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} source - The Source Point to be transformed. + * @param {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} [output] - A destination object to store the transformed point in. If none given a Vector2 will be created and returned. + * + * @return {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} The transformed point. + */ + pointToContainer: function (source, output) + { + if (output === undefined) { output = new Vector2(); } + + if (this.parentContainer) + { + this.parentContainer.pointToContainer(source, output); + } + else + { + output = new Vector2(source.x, source.y); + } + + var tempMatrix = this.tempTransformMatrix; + + // No need to loadIdentity because applyITRS overwrites every value anyway + tempMatrix.applyITRS(this.x, this.y, this.rotation, this.scaleX, this.scaleY); + + tempMatrix.invert(); + + tempMatrix.transformPoint(source.x, source.y, output); + + return output; + }, + + /** + * Returns the world transform matrix as used for Bounds checks. + * + * The returned matrix is temporal and shouldn't be stored. + * + * @method Phaser.GameObjects.Container#getBoundsTransformMatrix + * @since 3.4.0 + * + * @return {Phaser.GameObjects.Components.TransformMatrix} The world transform matrix. + */ + getBoundsTransformMatrix: function () + { + return this.getWorldTransformMatrix(this.tempTransformMatrix, this.localTransform); + }, + + /** + * Adds the given Game Object, or array of Game Objects, to this Container. + * + * Each Game Object must be unique within the Container. + * + * @method Phaser.GameObjects.Container#add + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container. + * + * @return {this} This Container instance. + */ + add: function (child) + { + ArrayUtils.Add(this.list, child, this.maxSize, this.addHandler, this); + + return this; + }, + + /** + * Adds the given Game Object, or array of Game Objects, to this Container at the specified position. + * + * Existing Game Objects in the Container are shifted up. + * + * Each Game Object must be unique within the Container. + * + * @method Phaser.GameObjects.Container#addAt + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container. + * @param {integer} [index=0] - The position to insert the Game Object/s at. + * + * @return {this} This Container instance. + */ + addAt: function (child, index) + { + ArrayUtils.AddAt(this.list, child, index, this.maxSize, this.addHandler, this); + + return this; + }, + + /** + * Returns the Game Object at the given position in this Container. + * + * @method Phaser.GameObjects.Container#getAt + * @since 3.4.0 + * + * @param {integer} index - The position to get the Game Object from. + * + * @return {?Phaser.GameObjects.GameObject} The Game Object at the specified index, or `null` if none found. + */ + getAt: function (index) + { + return this.list[index]; + }, + + /** + * Returns the index of the given Game Object in this Container. + * + * @method Phaser.GameObjects.Container#getIndex + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container. + * + * @return {integer} The index of the Game Object in this Container, or -1 if not found. + */ + getIndex: function (child) + { + return this.list.indexOf(child); + }, + + /** + * Sort the contents of this Container so the items are in order based on the given property. + * For example: `sort('alpha')` would sort the elements based on the value of their `alpha` property. + * + * @method Phaser.GameObjects.Container#sort + * @since 3.4.0 + * + * @param {string} property - The property to lexically sort by. + * @param {function} [handler] - Provide your own custom handler function. Will receive 2 children which it should compare and return a boolean. + * + * @return {this} This Container instance. + */ + sort: function (property, handler) + { + if (!property) + { + return this; + } + + if (handler === undefined) + { + handler = function (childA, childB) + { + return childA[property] - childB[property]; + }; + } + + ArrayUtils.StableSort.inplace(this.list, handler); + + return this; + }, + + /** + * Searches for the first instance of a child with its `name` property matching the given argument. + * Should more than one child have the same name only the first is returned. + * + * @method Phaser.GameObjects.Container#getByName + * @since 3.4.0 + * + * @param {string} name - The name to search for. + * + * @return {?Phaser.GameObjects.GameObject} The first child with a matching name, or `null` if none were found. + */ + getByName: function (name) + { + return ArrayUtils.GetFirst(this.list, 'name', name); + }, + + /** + * Returns a random Game Object from this Container. + * + * @method Phaser.GameObjects.Container#getRandom + * @since 3.4.0 + * + * @param {integer} [startIndex=0] - An optional start index. + * @param {integer} [length] - An optional length, the total number of elements (from the startIndex) to choose from. + * + * @return {?Phaser.GameObjects.GameObject} A random child from the Container, or `null` if the Container is empty. + */ + getRandom: function (startIndex, length) + { + return ArrayUtils.GetRandom(this.list, startIndex, length); + }, + + /** + * Gets the first Game Object in this Container. + * + * You can also specify a property and value to search for, in which case it will return the first + * Game Object in this Container with a matching property and / or value. + * + * For example: `getFirst('visible', true)` would return the first Game Object that had its `visible` property set. + * + * You can limit the search to the `startIndex` - `endIndex` range. + * + * @method Phaser.GameObjects.Container#getFirst + * @since 3.4.0 + * + * @param {string} property - The property to test on each Game Object in the Container. + * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check. + * @param {integer} [startIndex=0] - An optional start index to search from. + * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included) + * + * @return {?Phaser.GameObjects.GameObject} The first matching Game Object, or `null` if none was found. + */ + getFirst: function (property, value, startIndex, endIndex) + { + return ArrayUtils.GetFirst(this.list, property, value, startIndex, endIndex); + }, + + /** + * Returns all Game Objects in this Container. + * + * You can optionally specify a matching criteria using the `property` and `value` arguments. + * + * For example: `getAll('body')` would return only Game Objects that have a body property. + * + * You can also specify a value to compare the property to: + * + * `getAll('visible', true)` would return only Game Objects that have their visible property set to `true`. + * + * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects, + * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only + * the first 50 Game Objects. + * + * @method Phaser.GameObjects.Container#getAll + * @since 3.4.0 + * + * @param {string} [property] - The property to test on each Game Object in the Container. + * @param {any} [value] - If property is set then the `property` must strictly equal this value to be included in the results. + * @param {integer} [startIndex=0] - An optional start index to search from. + * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included) + * + * @return {Phaser.GameObjects.GameObject[]} An array of matching Game Objects from this Container. + */ + getAll: function (property, value, startIndex, endIndex) + { + return ArrayUtils.GetAll(this.list, property, value, startIndex, endIndex); + }, + + /** + * Returns the total number of Game Objects in this Container that have a property + * matching the given value. + * + * For example: `count('visible', true)` would count all the elements that have their visible property set. + * + * You can optionally limit the operation to the `startIndex` - `endIndex` range. + * + * @method Phaser.GameObjects.Container#count + * @since 3.4.0 + * + * @param {string} property - The property to check. + * @param {any} value - The value to check. + * @param {integer} [startIndex=0] - An optional start index to search from. + * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included) + * + * @return {integer} The total number of Game Objects in this Container with a property matching the given value. + */ + count: function (property, value, startIndex, endIndex) + { + return ArrayUtils.CountAllMatching(this.list, property, value, startIndex, endIndex); + }, + + /** + * Swaps the position of two Game Objects in this Container. + * Both Game Objects must belong to this Container. + * + * @method Phaser.GameObjects.Container#swap + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} child1 - The first Game Object to swap. + * @param {Phaser.GameObjects.GameObject} child2 - The second Game Object to swap. + * + * @return {this} This Container instance. + */ + swap: function (child1, child2) + { + ArrayUtils.Swap(this.list, child1, child2); + + return this; + }, + + /** + * Moves a Game Object to a new position within this Container. + * + * The Game Object must already be a child of this Container. + * + * The Game Object is removed from its old position and inserted into the new one. + * Therefore the Container size does not change. Other children will change position accordingly. + * + * @method Phaser.GameObjects.Container#moveTo + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} child - The Game Object to move. + * @param {integer} index - The new position of the Game Object in this Container. + * + * @return {this} This Container instance. + */ + moveTo: function (child, index) + { + ArrayUtils.MoveTo(this.list, child, index); + + return this; + }, + + /** + * Removes the given Game Object, or array of Game Objects, from this Container. + * + * The Game Objects must already be children of this Container. + * + * You can also optionally call `destroy` on each Game Object that is removed from the Container. + * + * @method Phaser.GameObjects.Container#remove + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to be removed from the Container. + * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each child successfully removed from this Container. + * + * @return {this} This Container instance. + */ + remove: function (child, destroyChild) + { + var removed = ArrayUtils.Remove(this.list, child, this.removeHandler, this); + + if (destroyChild && removed) + { + if (!Array.isArray(removed)) + { + removed = [ removed ]; + } + + for (var i = 0; i < removed.length; i++) + { + removed[i].destroy(); + } + } + + return this; + }, + + /** + * Removes the Game Object at the given position in this Container. + * + * You can also optionally call `destroy` on the Game Object, if one is found. + * + * @method Phaser.GameObjects.Container#removeAt + * @since 3.4.0 + * + * @param {integer} index - The index of the Game Object to be removed. + * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container. + * + * @return {this} This Container instance. + */ + removeAt: function (index, destroyChild) + { + var removed = ArrayUtils.RemoveAt(this.list, index, this.removeHandler, this); + + if (destroyChild && removed) + { + removed.destroy(); + } + + return this; + }, + + /** + * Removes the Game Objects between the given positions in this Container. + * + * You can also optionally call `destroy` on each Game Object that is removed from the Container. + * + * @method Phaser.GameObjects.Container#removeBetween + * @since 3.4.0 + * + * @param {integer} [startIndex=0] - An optional start index to search from. + * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included) + * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container. + * + * @return {this} This Container instance. + */ + removeBetween: function (startIndex, endIndex, destroyChild) + { + var removed = ArrayUtils.RemoveBetween(this.list, startIndex, endIndex, this.removeHandler, this); + + if (destroyChild) + { + for (var i = 0; i < removed.length; i++) + { + removed[i].destroy(); + } + } + + return this; + }, + + /** + * Removes all Game Objects from this Container. + * + * You can also optionally call `destroy` on each Game Object that is removed from the Container. + * + * @method Phaser.GameObjects.Container#removeAll + * @since 3.4.0 + * + * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container. + * + * @return {this} This Container instance. + */ + removeAll: function (destroyChild) + { + var removed = ArrayUtils.RemoveBetween(this.list, 0, this.list.length, this.removeHandler, this); + + if (destroyChild) + { + for (var i = 0; i < removed.length; i++) + { + removed[i].destroy(); + } + } + + return this; + }, + + /** + * Brings the given Game Object to the top of this Container. + * This will cause it to render on-top of any other objects in the Container. + * + * @method Phaser.GameObjects.Container#bringToTop + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} child - The Game Object to bring to the top of the Container. + * + * @return {this} This Container instance. + */ + bringToTop: function (child) + { + ArrayUtils.BringToTop(this.list, child); + + return this; + }, + + /** + * Sends the given Game Object to the bottom of this Container. + * This will cause it to render below any other objects in the Container. + * + * @method Phaser.GameObjects.Container#sendToBack + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} child - The Game Object to send to the bottom of the Container. + * + * @return {this} This Container instance. + */ + sendToBack: function (child) + { + ArrayUtils.SendToBack(this.list, child); + + return this; + }, + + /** + * Moves the given Game Object up one place in this Container, unless it's already at the top. + * + * @method Phaser.GameObjects.Container#moveUp + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container. + * + * @return {this} This Container instance. + */ + moveUp: function (child) + { + ArrayUtils.MoveUp(this.list, child); + + return this; + }, + + /** + * Moves the given Game Object down one place in this Container, unless it's already at the bottom. + * + * @method Phaser.GameObjects.Container#moveDown + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container. + * + * @return {this} This Container instance. + */ + moveDown: function (child) + { + ArrayUtils.MoveDown(this.list, child); + + return this; + }, + + /** + * Reverses the order of all Game Objects in this Container. + * + * @method Phaser.GameObjects.Container#reverse + * @since 3.4.0 + * + * @return {this} This Container instance. + */ + reverse: function () + { + this.list.reverse(); + + return this; + }, + + /** + * Shuffles the all Game Objects in this Container using the Fisher-Yates implementation. + * + * @method Phaser.GameObjects.Container#shuffle + * @since 3.4.0 + * + * @return {this} This Container instance. + */ + shuffle: function () + { + ArrayUtils.Shuffle(this.list); + + return this; + }, + + /** + * Replaces a Game Object in this Container with the new Game Object. + * The new Game Object cannot already be a child of this Container. + * + * @method Phaser.GameObjects.Container#replace + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} oldChild - The Game Object in this Container that will be replaced. + * @param {Phaser.GameObjects.GameObject} newChild - The Game Object to be added to this Container. + * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container. + * + * @return {this} This Container instance. + */ + replace: function (oldChild, newChild, destroyChild) + { + var moved = ArrayUtils.Replace(this.list, oldChild, newChild); + + if (moved) + { + this.addHandler(newChild); + this.removeHandler(oldChild); + + if (destroyChild) + { + oldChild.destroy(); + } + } + + return this; + }, + + /** + * Returns `true` if the given Game Object is a direct child of this Container. + * + * This check does not scan nested Containers. + * + * @method Phaser.GameObjects.Container#exists + * @since 3.4.0 + * + * @param {Phaser.GameObjects.GameObject} child - The Game Object to check for within this Container. + * + * @return {boolean} True if the Game Object is an immediate child of this Container, otherwise false. + */ + exists: function (child) + { + return (this.list.indexOf(child) > -1); + }, + + /** + * Sets the property to the given value on all Game Objects in this Container. + * + * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects, + * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only + * the first 50 Game Objects. + * + * @method Phaser.GameObjects.Container#setAll + * @since 3.4.0 + * + * @param {string} property - The property that must exist on the Game Object. + * @param {any} value - The value to get the property to. + * @param {integer} [startIndex=0] - An optional start index to search from. + * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included) + * + * @return {this} This Container instance. + */ + setAll: function (property, value, startIndex, endIndex) + { + ArrayUtils.SetAll(this.list, property, value, startIndex, endIndex); + + return this; + }, + + /** + * @callback EachContainerCallback + * @generic I - [item] + * + * @param {*} item - The child Game Object of the Container. + * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child. + */ + + /** + * Passes all Game Objects in this Container to the given callback. + * + * A copy of the Container is made before passing each entry to your callback. + * This protects against the callback itself modifying the Container. + * + * If you know for sure that the callback will not change the size of this Container + * then you can use the more performant `Container.iterate` method instead. + * + * @method Phaser.GameObjects.Container#each + * @since 3.4.0 + * + * @param {function} callback - The function to call. + * @param {object} [context] - Value to use as `this` when executing callback. + * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child. + * + * @return {this} This Container instance. + */ + each: function (callback, context) + { + var args = [ null ]; + var i; + var temp = this.list.slice(); + var len = temp.length; + + for (i = 2; i < arguments.length; i++) + { + args.push(arguments[i]); + } + + for (i = 0; i < len; i++) + { + args[0] = temp[i]; + + callback.apply(context, args); + } + + return this; + }, + + /** + * Passes all Game Objects in this Container to the given callback. + * + * Only use this method when you absolutely know that the Container will not be modified during + * the iteration, i.e. by removing or adding to its contents. + * + * @method Phaser.GameObjects.Container#iterate + * @since 3.4.0 + * + * @param {function} callback - The function to call. + * @param {object} [context] - Value to use as `this` when executing callback. + * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child. + * + * @return {this} This Container instance. + */ + iterate: function (callback, context) + { + var args = [ null ]; + var i; + + for (i = 2; i < arguments.length; i++) + { + args.push(arguments[i]); + } + + for (i = 0; i < this.list.length; i++) + { + args[0] = this.list[i]; + + callback.apply(context, args); + } + + return this; + }, + + /** + * Sets the scroll factor of this Container and optionally all of its children. + * + * 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. + * + * @method Phaser.GameObjects.Container#setScrollFactor + * @since 3.0.0 + * + * @param {number} x - The horizontal scroll factor of this Game Object. + * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value. + * @param {boolean} [updateChildren=false] - Apply this scrollFactor to all Container children as well? + * + * @return {this} This Game Object instance. + */ + setScrollFactor: function (x, y, updateChildren) + { + if (y === undefined) { y = x; } + if (updateChildren === undefined) { updateChildren = false; } + + this.scrollFactorX = x; + this.scrollFactorY = y; + + if (updateChildren) + { + ArrayUtils.SetAll(this.list, 'scrollFactorX', x); + ArrayUtils.SetAll(this.list, 'scrollFactorY', y); + } + + return this; + }, + + /** + * The number of Game Objects inside this Container. + * + * @name Phaser.GameObjects.Container#length + * @type {integer} + * @readonly + * @since 3.4.0 + */ + length: { + + get: function () + { + return this.list.length; + } + + }, + + /** + * Returns the first Game Object within the Container, or `null` if it is empty. + * + * You can move the cursor by calling `Container.next` and `Container.previous`. + * + * @name Phaser.GameObjects.Container#first + * @type {?Phaser.GameObjects.GameObject} + * @readonly + * @since 3.4.0 + */ + first: { + + get: function () + { + this.position = 0; + + if (this.list.length > 0) + { + return this.list[0]; + } + else + { + return null; + } + } + + }, + + /** + * Returns the last Game Object within the Container, or `null` if it is empty. + * + * You can move the cursor by calling `Container.next` and `Container.previous`. + * + * @name Phaser.GameObjects.Container#last + * @type {?Phaser.GameObjects.GameObject} + * @readonly + * @since 3.4.0 + */ + last: { + + get: function () + { + if (this.list.length > 0) + { + this.position = this.list.length - 1; + + return this.list[this.position]; + } + else + { + return null; + } + } + + }, + + /** + * Returns the next Game Object within the Container, or `null` if it is empty. + * + * You can move the cursor by calling `Container.next` and `Container.previous`. + * + * @name Phaser.GameObjects.Container#next + * @type {?Phaser.GameObjects.GameObject} + * @readonly + * @since 3.4.0 + */ + next: { + + get: function () + { + if (this.position < this.list.length) + { + this.position++; + + return this.list[this.position]; + } + else + { + return null; + } + } + + }, + + /** + * Returns the previous Game Object within the Container, or `null` if it is empty. + * + * You can move the cursor by calling `Container.next` and `Container.previous`. + * + * @name Phaser.GameObjects.Container#previous + * @type {?Phaser.GameObjects.GameObject} + * @readonly + * @since 3.4.0 + */ + previous: { + + get: function () + { + if (this.position > 0) + { + this.position--; + + return this.list[this.position]; + } + else + { + return null; + } + } + + }, + + /** + * Internal destroy handler, called as part of the destroy process. + * + * @method Phaser.GameObjects.Container#preDestroy + * @protected + * @since 3.9.0 + */ + preDestroy: function () + { + this.removeAll(!!this.exclusive); + + this.localTransform.destroy(); + this.tempTransformMatrix.destroy(); + + this.list = []; + this._displayList = null; + } + +}); + +module.exports = Container; + + +/***/ }), +/* 249 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Utils.Array + */ + +module.exports = { + + Matrix: __webpack_require__(250), + + Add: __webpack_require__(258), + AddAt: __webpack_require__(259), + BringToTop: __webpack_require__(260), + CountAllMatching: __webpack_require__(261), + Each: __webpack_require__(262), + EachInRange: __webpack_require__(263), + FindClosestInSorted: __webpack_require__(57), + GetAll: __webpack_require__(264), + GetFirst: __webpack_require__(265), + GetRandom: __webpack_require__(266), + MoveDown: __webpack_require__(267), + MoveTo: __webpack_require__(268), + MoveUp: __webpack_require__(269), + NumberArray: __webpack_require__(270), + NumberArrayStep: __webpack_require__(271), + QuickSelect: __webpack_require__(272), + Range: __webpack_require__(273), + Remove: __webpack_require__(274), + RemoveAt: __webpack_require__(275), + RemoveBetween: __webpack_require__(276), + RemoveRandomElement: __webpack_require__(277), + Replace: __webpack_require__(278), + RotateLeft: __webpack_require__(279), + RotateRight: __webpack_require__(280), + SafeRange: __webpack_require__(5), + SendToBack: __webpack_require__(281), + SetAll: __webpack_require__(282), + Shuffle: __webpack_require__(58), + SpliceOne: __webpack_require__(15), + StableSort: __webpack_require__(283), + Swap: __webpack_require__(284) + +}; + + +/***/ }), +/* 250 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Utils.Array.Matrix + */ + +module.exports = { + + CheckMatrix: __webpack_require__(23), + MatrixToString: __webpack_require__(251), + ReverseColumns: __webpack_require__(253), + ReverseRows: __webpack_require__(254), + Rotate180: __webpack_require__(255), + RotateLeft: __webpack_require__(256), + RotateMatrix: __webpack_require__(14), + RotateRight: __webpack_require__(257), + TransposeMatrix: __webpack_require__(56) + +}; + + +/***/ }), +/* 251 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Pad = __webpack_require__(252); +var CheckMatrix = __webpack_require__(23); + +/** + * Generates a string (which you can pass to console.log) from the given Array Matrix. + * + * @function Phaser.Utils.Array.Matrix.MatrixToString + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [matrix] + * + * @param {T[][]} [matrix] - A 2-dimensional array. + * + * @return {string} A string representing the matrix. + */ +var MatrixToString = function (matrix) +{ + var str = ''; + + if (!CheckMatrix(matrix)) + { + return str; + } + + for (var r = 0; r < matrix.length; r++) + { + for (var c = 0; c < matrix[r].length; c++) + { + var cell = matrix[r][c].toString(); + + if (cell !== 'undefined') + { + str += Pad(cell, 2); + } + else + { + str += '?'; + } + + if (c < matrix[r].length - 1) + { + str += ' |'; + } + } + + if (r < matrix.length - 1) + { + str += '\n'; + + for (var i = 0; i < matrix[r].length; i++) + { + str += '---'; + + if (i < matrix[r].length - 1) + { + str += '+'; + } + } + + str += '\n'; + } + + } + + return str; +}; + +module.exports = MatrixToString; + + +/***/ }), +/* 252 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Takes the given string and pads it out, to the length required, using the character + * specified. For example if you need a string to be 6 characters long, you can call: + * + * `pad('bob', 6, '-', 2)` + * + * This would return: `bob---` as it has padded it out to 6 characters, using the `-` on the right. + * + * You can also use it to pad numbers (they are always returned as strings): + * + * `pad(512, 6, '0', 1)` + * + * Would return: `000512` with the string padded to the left. + * + * If you don't specify a direction it'll pad to both sides: + * + * `pad('c64', 7, '*')` + * + * Would return: `**c64**` + * + * @function Phaser.Utils.String.Pad + * @since 3.0.0 + * + * @param {string|number|object} str - The target string. `toString()` will be called on the string, which means you can also pass in common data types like numbers. + * @param {integer} [len=0] - The number of characters to be added. + * @param {string} [pad=" "] - The string to pad it out with (defaults to a space). + * @param {integer} [dir=3] - The direction dir = 1 (left), 2 (right), 3 (both). + * + * @return {string} The padded string. + */ +var Pad = function (str, len, pad, dir) +{ + if (len === undefined) { len = 0; } + if (pad === undefined) { pad = ' '; } + if (dir === undefined) { dir = 3; } + + str = str.toString(); + + var padlen = 0; + + if (len + 1 >= str.length) + { + switch (dir) + { + case 1: + str = new Array(len + 1 - str.length).join(pad) + str; + break; + + case 3: + var right = Math.ceil((padlen = len - str.length) / 2); + var left = padlen - right; + str = new Array(left + 1).join(pad) + str + new Array(right + 1).join(pad); + break; + + default: + str = str + new Array(len + 1 - str.length).join(pad); + break; + } + } + + return str; +}; + +module.exports = Pad; + + +/***/ }), +/* 253 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Reverses the columns in the given Array Matrix. + * + * @function Phaser.Utils.Array.Matrix.ReverseColumns + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [matrix,$return] + * + * @param {T[][]} [matrix] - The array matrix to reverse the columns for. + * + * @return {T[][]} The column reversed matrix. + */ +var ReverseColumns = function (matrix) +{ + return matrix.reverse(); +}; + +module.exports = ReverseColumns; + + +/***/ }), +/* 254 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Reverses the rows in the given Array Matrix. + * + * @function Phaser.Utils.Array.Matrix.ReverseRows + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [matrix,$return] + * + * @param {T[][]} [matrix] - The array matrix to reverse the rows for. + * + * @return {T[][]} The column reversed matrix. + */ +var ReverseRows = function (matrix) +{ + for (var i = 0; i < matrix.length; i++) + { + matrix[i].reverse(); + } + + return matrix; +}; + +module.exports = ReverseRows; + + +/***/ }), +/* 255 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var RotateMatrix = __webpack_require__(14); + +/** + * Rotates the array matrix 180 degrees. + * + * @function Phaser.Utils.Array.Matrix.Rotate180 + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [matrix,$return] + * + * @param {T[][]} [matrix] - The array to rotate. + * + * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix. + */ +var Rotate180 = function (matrix) +{ + return RotateMatrix(matrix, 180); +}; + +module.exports = Rotate180; + + +/***/ }), +/* 256 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var RotateMatrix = __webpack_require__(14); + +/** + * Rotates the array matrix to the left (or 90 degrees) + * + * @function Phaser.Utils.Array.Matrix.RotateLeft + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [matrix,$return] + * + * @param {T[][]} [matrix] - The array to rotate. + * + * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix. + */ +var RotateLeft = function (matrix) +{ + return RotateMatrix(matrix, 90); +}; + +module.exports = RotateLeft; + + +/***/ }), +/* 257 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var RotateMatrix = __webpack_require__(14); + +/** + * Rotates the array matrix to the left (or -90 degrees) + * + * @function Phaser.Utils.Array.Matrix.RotateRight + * @since 3.0.0 + * + * @generic T + * @genericUse {T[][]} - [matrix,$return] + * + * @param {T[][]} [matrix] - The array to rotate. + * + * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix. + */ +var RotateRight = function (matrix) +{ + return RotateMatrix(matrix, -90); +}; + +module.exports = RotateRight; + + +/***/ }), +/* 258 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Adds the given item, or array of items, to the array. + * + * Each item must be unique within the array. + * + * The array is modified in-place and returned. + * + * You can optionally specify a limit to the maximum size of the array. If the quantity of items being + * added will take the array length over this limit, it will stop adding once the limit is reached. + * + * You can optionally specify a callback to be invoked for each item successfully added to the array. + * + * @function Phaser.Utils.Array.Add + * @since 3.4.0 + * + * @param {array} array - The array to be added to. + * @param {any|any[]} item - The item, or array of items, to add to the array. Each item must be unique within the array. + * @param {integer} [limit] - Optional limit which caps the size of the array. + * @param {function} [callback] - A callback to be invoked for each item successfully added to the array. + * @param {object} [context] - The context in which the callback is invoked. + * + * @return {array} The input array. + */ +var Add = function (array, item, limit, callback, context) +{ + if (context === undefined) { context = array; } + + if (limit > 0) + { + var remaining = limit - array.length; + + // There's nothing more we can do here, the array is full + if (remaining <= 0) + { + return null; + } + } + + // Fast path to avoid array mutation and iteration + if (!Array.isArray(item)) + { + if (array.indexOf(item) === -1) + { + array.push(item); + + if (callback) + { + callback.call(context, item); + } + + return item; + } + else + { + return null; + } + } + + // If we got this far, we have an array of items to insert + + // Ensure all the items are unique + var itemLength = item.length - 1; + + while (itemLength >= 0) + { + if (array.indexOf(item[itemLength]) !== -1) + { + // Already exists in array, so remove it + item.splice(itemLength, 1); + } + + itemLength--; + } + + // Anything left? + itemLength = item.length; + + if (itemLength === 0) + { + return null; + } + + if (limit > 0 && itemLength > remaining) + { + item.splice(remaining); + + itemLength = remaining; + } + + for (var i = 0; i < itemLength; i++) + { + var entry = item[i]; + + array.push(entry); + + if (callback) + { + callback.call(context, entry); + } + } + + return item; +}; + +module.exports = Add; + + +/***/ }), +/* 259 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Adds the given item, or array of items, to the array starting at the index specified. + * + * Each item must be unique within the array. + * + * Existing elements in the array are shifted up. + * + * The array is modified in-place and returned. + * + * You can optionally specify a limit to the maximum size of the array. If the quantity of items being + * added will take the array length over this limit, it will stop adding once the limit is reached. + * + * You can optionally specify a callback to be invoked for each item successfully added to the array. + * + * @function Phaser.Utils.Array.AddAt + * @since 3.4.0 + * + * @param {array} array - The array to be added to. + * @param {any|any[]} item - The item, or array of items, to add to the array. + * @param {integer} [index=0] - The index in the array where the item will be inserted. + * @param {integer} [limit] - Optional limit which caps the size of the array. + * @param {function} [callback] - A callback to be invoked for each item successfully added to the array. + * @param {object} [context] - The context in which the callback is invoked. + * + * @return {array} The input array. + */ +var AddAt = function (array, item, index, limit, callback, context) +{ + if (index === undefined) { index = 0; } + if (context === undefined) { context = array; } + + if (limit > 0) + { + var remaining = limit - array.length; + + // There's nothing more we can do here, the array is full + if (remaining <= 0) + { + return null; + } + } + + // Fast path to avoid array mutation and iteration + if (!Array.isArray(item)) + { + if (array.indexOf(item) === -1) + { + array.splice(index, 0, item); + + if (callback) + { + callback.call(context, item); + } + + return item; + } + else + { + return null; + } + } + + // If we got this far, we have an array of items to insert + + // Ensure all the items are unique + var itemLength = item.length - 1; + + while (itemLength >= 0) + { + if (array.indexOf(item[itemLength]) !== -1) + { + // Already exists in array, so remove it + item.pop(); + } + + itemLength--; + } + + // Anything left? + itemLength = item.length; + + if (itemLength === 0) + { + return null; + } + + // Truncate to the limit + if (limit > 0 && itemLength > remaining) + { + item.splice(remaining); + + itemLength = remaining; + } + + for (var i = itemLength - 1; i >= 0; i--) + { + var entry = item[i]; + + array.splice(index, 0, entry); + + if (callback) + { + callback.call(context, entry); + } + } + + return item; +}; + +module.exports = AddAt; + + +/***/ }), +/* 260 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the given element to the top of the array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.BringToTop + * @since 3.4.0 + * + * @param {array} array - The array. + * @param {*} item - The element to move. + * + * @return {*} The element that was moved. + */ +var BringToTop = function (array, item) +{ + var currentIndex = array.indexOf(item); + + if (currentIndex !== -1 && currentIndex < array.length) + { + array.splice(currentIndex, 1); + array.push(item); + } + + return item; +}; + +module.exports = BringToTop; + + +/***/ }), +/* 261 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SafeRange = __webpack_require__(5); + +/** + * Returns the total number of elements in the array which have a property matching the given value. + * + * @function Phaser.Utils.Array.CountAllMatching + * @since 3.4.0 + * + * @param {array} array - The array to search. + * @param {string} property - The property to test on each array element. + * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check. + * @param {integer} [startIndex] - An optional start index to search from. + * @param {integer} [endIndex] - An optional end index to search to. + * + * @return {integer} The total number of elements with properties matching the given value. + */ +var CountAllMatching = function (array, property, value, startIndex, endIndex) +{ + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = array.length; } + + var total = 0; + + if (SafeRange(array, startIndex, endIndex)) + { + for (var i = startIndex; i < endIndex; i++) + { + var child = array[i]; + + if (child[property] === value) + { + total++; + } + } + } + + return total; +}; + +module.exports = CountAllMatching; + + +/***/ }), +/* 262 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Passes each element in the array to the given callback. + * + * @function Phaser.Utils.Array.Each + * @since 3.4.0 + * + * @param {array} array - The array to search. + * @param {function} callback - A callback to be invoked for each item in the array. + * @param {object} context - The context in which the callback is invoked. + * @param {...*} [args] - Additional arguments that will be passed to the callback, after the current array item. + * + * @return {array} The input array. + */ +var Each = function (array, callback, context) +{ + var i; + var args = [ null ]; + + for (i = 3; i < arguments.length; i++) + { + args.push(arguments[i]); + } + + for (i = 0; i < array.length; i++) + { + args[0] = array[i]; + + callback.apply(context, args); + } + + return array; +}; + +module.exports = Each; + + +/***/ }), +/* 263 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SafeRange = __webpack_require__(5); + +/** + * Passes each element in the array, between the start and end indexes, to the given callback. + * + * @function Phaser.Utils.Array.EachInRange + * @since 3.4.0 + * + * @param {array} array - The array to search. + * @param {function} callback - A callback to be invoked for each item in the array. + * @param {object} context - The context in which the callback is invoked. + * @param {integer} startIndex - The start index to search from. + * @param {integer} endIndex - The end index to search to. + * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child. + * + * @return {array} The input array. + */ +var EachInRange = function (array, callback, context, startIndex, endIndex) +{ + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = array.length; } + + if (SafeRange(array, startIndex, endIndex)) + { + var i; + var args = [ null ]; + + for (i = 5; i < arguments.length; i++) + { + args.push(arguments[i]); + } + + for (i = startIndex; i < endIndex; i++) + { + args[0] = array[i]; + + callback.apply(context, args); + } + } + + return array; +}; + +module.exports = EachInRange; + + +/***/ }), +/* 264 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SafeRange = __webpack_require__(5); + +/** + * Returns all elements in the array. + * + * You can optionally specify a matching criteria using the `property` and `value` arguments. + * + * For example: `getAll('visible', true)` would return only elements that have their visible property set. + * + * Optionally you can specify a start and end index. For example if the array had 100 elements, + * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only + * the first 50 elements. + * + * @function Phaser.Utils.Array.GetAll + * @since 3.4.0 + * + * @param {array} array - The array to search. + * @param {string} [property] - The property to test on each array element. + * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check. + * @param {integer} [startIndex] - An optional start index to search from. + * @param {integer} [endIndex] - An optional end index to search to. + * + * @return {array} All matching elements from the array. + */ +var GetAll = function (array, property, value, startIndex, endIndex) +{ + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = array.length; } + + var output = []; + + if (SafeRange(array, startIndex, endIndex)) + { + for (var i = startIndex; i < endIndex; i++) + { + var child = array[i]; + + if (!property || + (property && value === undefined && child.hasOwnProperty(property)) || + (property && value !== undefined && child[property] === value)) + { + output.push(child); + } + } + } + + return output; +}; + +module.exports = GetAll; + + +/***/ }), +/* 265 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SafeRange = __webpack_require__(5); + +/** + * Returns the first element in the array. + * + * You can optionally specify a matching criteria using the `property` and `value` arguments. + * + * For example: `getAll('visible', true)` would return the first element that had its `visible` property set. + * + * Optionally you can specify a start and end index. For example if the array had 100 elements, + * and you set `startIndex` to 0 and `endIndex` to 50, it would search only the first 50 elements. + * + * @function Phaser.Utils.Array.GetFirst + * @since 3.4.0 + * + * @param {array} array - The array to search. + * @param {string} [property] - The property to test on each array element. + * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check. + * @param {integer} [startIndex=0] - An optional start index to search from. + * @param {integer} [endIndex=array.length] - An optional end index to search up to (but not included) + * + * @return {object} The first matching element from the array, or `null` if no element could be found in the range given. + */ +var GetFirst = function (array, property, value, startIndex, endIndex) +{ + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = array.length; } + + if (SafeRange(array, startIndex, endIndex)) + { + for (var i = startIndex; i < endIndex; i++) + { + var child = array[i]; + + if (!property || + (property && value === undefined && child.hasOwnProperty(property)) || + (property && value !== undefined && child[property] === value)) + { + return child; + } + } + } + + return null; +}; + +module.exports = GetFirst; + + +/***/ }), +/* 266 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Returns a Random element from the array. + * + * @function Phaser.Utils.Array.GetRandom + * @since 3.0.0 + * + * @param {array} array - The array to select the random entry from. + * @param {integer} [startIndex=0] - An optional start index. + * @param {integer} [length=array.length] - An optional length, the total number of elements (from the startIndex) to choose from. + * + * @return {*} A random element from the array, or `null` if no element could be found in the range given. + */ +var GetRandom = function (array, startIndex, length) +{ + if (startIndex === undefined) { startIndex = 0; } + if (length === undefined) { length = array.length; } + + var randomIndex = startIndex + Math.floor(Math.random() * length); + + return (array[randomIndex] === undefined) ? null : array[randomIndex]; +}; + +module.exports = GetRandom; + + +/***/ }), +/* 267 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the given array element down one place in the array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.MoveDown + * @since 3.4.0 + * + * @param {array} array - The input array. + * @param {*} item - The element to move down the array. + * + * @return {array} The input array. + */ +var MoveDown = function (array, item) +{ + var currentIndex = array.indexOf(item); + + if (currentIndex > 0) + { + var item2 = array[currentIndex - 1]; + + var index2 = array.indexOf(item2); + + array[currentIndex] = item2; + array[index2] = item; + } + + return array; +}; + +module.exports = MoveDown; + + +/***/ }), +/* 268 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves an element in an array to a new position within the same array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.MoveTo + * @since 3.4.0 + * + * @param {array} array - The array. + * @param {*} item - The element to move. + * @param {integer} index - The new index that the element will be moved to. + * + * @return {*} The element that was moved. + */ +var MoveTo = function (array, item, index) +{ + var currentIndex = array.indexOf(item); + + if (currentIndex === -1 || index < 0 || index >= array.length) + { + throw new Error('Supplied index out of bounds'); + } + + if (currentIndex !== index) + { + // Remove + array.splice(currentIndex, 1); + + // Add in new location + array.splice(index, 0, item); + } + + return item; +}; + +module.exports = MoveTo; + + +/***/ }), +/* 269 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the given array element up one place in the array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.MoveUp + * @since 3.4.0 + * + * @param {array} array - The input array. + * @param {*} item - The element to move up the array. + * + * @return {array} The input array. + */ +var MoveUp = function (array, item) +{ + var currentIndex = array.indexOf(item); + + if (currentIndex !== -1 && currentIndex < array.length - 1) + { + // The element one above `item` in the array + var item2 = array[currentIndex + 1]; + var index2 = array.indexOf(item2); + + array[currentIndex] = item2; + array[index2] = item; + } + + return array; +}; + +module.exports = MoveUp; + + +/***/ }), +/* 270 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Create an array representing the range of numbers (usually integers), between, and inclusive of, + * the given `start` and `end` arguments. For example: + * + * `var array = numberArray(2, 4); // array = [2, 3, 4]` + * `var array = numberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]` + * + * This is equivalent to `numberArrayStep(start, end, 1)`. + * + * You can optionally provide a prefix and / or suffix string. If given the array will contain + * strings, not integers. For example: + * + * `var array = numberArray(1, 4, 'Level '); // array = ["Level 1", "Level 2", "Level 3", "Level 4"]` + * `var array = numberArray(5, 7, 'HD-', '.png'); // array = ["HD-5.png", "HD-6.png", "HD-7.png"]` + * + * @function Phaser.Utils.Array.NumberArray + * @since 3.0.0 + * + * @param {number} start - The minimum value the array starts with. + * @param {number} end - The maximum value the array contains. + * @param {string} [prefix] - Optional prefix to place before the number. If provided the array will contain strings, not integers. + * @param {string} [suffix] - Optional suffix to place after the number. If provided the array will contain strings, not integers. + * + * @return {(number[]|string[])} The array of number values, or strings if a prefix or suffix was provided. + */ +var NumberArray = function (start, end, prefix, suffix) +{ + var result = []; + + for (var i = start; i <= end; i++) + { + if (prefix || suffix) + { + var key = (prefix) ? prefix + i.toString() : i.toString(); + + if (suffix) + { + key = key.concat(suffix); + } + + result.push(key); + } + else + { + result.push(i); + } + } + + return result; +}; + +module.exports = NumberArray; + + +/***/ }), +/* 271 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var RoundAwayFromZero = __webpack_require__(39); + +/** + * Create an array of numbers (positive and/or negative) progressing from `start` + * up to but not including `end` by advancing by `step`. + * + * If `start` is less than `end` a zero-length range is created unless a negative `step` is specified. + * + * Certain values for `start` and `end` (eg. NaN/undefined/null) are currently coerced to 0; + * for forward compatibility make sure to pass in actual numbers. + * + * @example + * NumberArrayStep(4); + * // => [0, 1, 2, 3] + * + * NumberArrayStep(1, 5); + * // => [1, 2, 3, 4] + * + * NumberArrayStep(0, 20, 5); + * // => [0, 5, 10, 15] + * + * NumberArrayStep(0, -4, -1); + * // => [0, -1, -2, -3] + * + * NumberArrayStep(1, 4, 0); + * // => [1, 1, 1] + * + * NumberArrayStep(0); + * // => [] + * + * @function Phaser.Utils.Array.NumberArrayStep + * @since 3.0.0 + * + * @param {number} [start=0] - The start of the range. + * @param {number} [end=null] - The end of the range. + * @param {number} [step=1] - The value to increment or decrement by. + * + * @return {number[]} The array of number values. + */ +var NumberArrayStep = function (start, end, step) +{ + if (start === undefined) { start = 0; } + if (end === undefined) { end = null; } + if (step === undefined) { step = 1; } + + if (end === null) + { + end = start; + start = 0; + } + + var result = []; + + var total = Math.max(RoundAwayFromZero((end - start) / (step || 1)), 0); + + for (var i = 0; i < total; i++) + { + result.push(start); + start += step; + } + + return result; +}; + +module.exports = NumberArrayStep; + + +/***/ }), +/* 272 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @ignore + */ +function swap (arr, i, j) +{ + var tmp = arr[i]; + arr[i] = arr[j]; + arr[j] = tmp; +} + +/** + * @ignore + */ +function defaultCompare (a, b) +{ + return a < b ? -1 : a > b ? 1 : 0; +} + +/** + * A [Floyd-Rivest](https://en.wikipedia.org/wiki/Floyd%E2%80%93Rivest_algorithm) quick selection algorithm. + * + * Rearranges the array items so that all items in the [left, k] range are smaller than all items in [k, right]; + * The k-th element will have the (k - left + 1)th smallest value in [left, right]. + * + * The array is modified in-place. + * + * Based on code by [Vladimir Agafonkin](https://www.npmjs.com/~mourner) + * + * @function Phaser.Utils.Array.QuickSelect + * @since 3.0.0 + * + * @param {array} arr - The array to sort. + * @param {integer} k - The k-th element index. + * @param {integer} [left=0] - The index of the left part of the range. + * @param {integer} [right] - The index of the right part of the range. + * @param {function} [compare] - An optional comparison function. Is passed two elements and should return 0, 1 or -1. + */ +var QuickSelect = function (arr, k, left, right, compare) +{ + if (left === undefined) { left = 0; } + if (right === undefined) { right = arr.length - 1; } + if (compare === undefined) { compare = defaultCompare; } + + while (right > left) + { + if (right - left > 600) + { + var n = right - left + 1; + var m = k - left + 1; + var z = Math.log(n); + var s = 0.5 * Math.exp(2 * z / 3); + var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1); + var newLeft = Math.max(left, Math.floor(k - m * s / n + sd)); + var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd)); + + QuickSelect(arr, k, newLeft, newRight, compare); + } + + var t = arr[k]; + var i = left; + var j = right; + + swap(arr, left, k); + + if (compare(arr[right], t) > 0) + { + swap(arr, left, right); + } + + while (i < j) + { + swap(arr, i, j); + + i++; + j--; + + while (compare(arr[i], t) < 0) + { + i++; + } + + while (compare(arr[j], t) > 0) + { + j--; + } + } + + if (compare(arr[left], t) === 0) + { + swap(arr, left, j); + } + else + { + j++; + swap(arr, j, right); + } + + if (j <= k) + { + left = j + 1; + } + + if (k <= j) + { + right = j - 1; + } + } +}; + +module.exports = QuickSelect; + + +/***/ }), +/* 273 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetValue = __webpack_require__(6); +var Shuffle = __webpack_require__(58); + +var BuildChunk = function (a, b, qty) +{ + var out = []; + + for (var aIndex = 0; aIndex < a.length; aIndex++) + { + for (var bIndex = 0; bIndex < b.length; bIndex++) + { + for (var i = 0; i < qty; i++) + { + out.push({ a: a[aIndex], b: b[bIndex] }); + } + } + } + + return out; +}; + +/** + * Creates an array populated with a range of values, based on the given arguments and configuration object. + * + * Range ([a,b,c], [1,2,3]) = + * a1, a2, a3, b1, b2, b3, c1, c2, c3 + * + * Range ([a,b], [1,2,3], qty = 3) = + * a1, a1, a1, a2, a2, a2, a3, a3, a3, b1, b1, b1, b2, b2, b2, b3, b3, b3 + * + * Range ([a,b,c], [1,2,3], repeat x1) = + * a1, a2, a3, b1, b2, b3, c1, c2, c3, a1, a2, a3, b1, b2, b3, c1, c2, c3 + * + * Range ([a,b], [1,2], repeat -1 = endless, max = 14) = + * Maybe if max is set then repeat goes to -1 automatically? + * a1, a2, b1, b2, a1, a2, b1, b2, a1, a2, b1, b2, a1, a2 (capped at 14 elements) + * + * Range ([a], [1,2,3,4,5], random = true) = + * a4, a1, a5, a2, a3 + * + * Range ([a, b], [1,2,3], random = true) = + * b3, a2, a1, b1, a3, b2 + * + * Range ([a, b, c], [1,2,3], randomB = true) = + * a3, a1, a2, b2, b3, b1, c1, c3, c2 + * + * Range ([a], [1,2,3,4,5], yoyo = true) = + * a1, a2, a3, a4, a5, a5, a4, a3, a2, a1 + * + * Range ([a, b], [1,2,3], yoyo = true) = + * a1, a2, a3, b1, b2, b3, b3, b2, b1, a3, a2, a1 + * + * @function Phaser.Utils.Array.Range + * @since 3.0.0 + * + * @param {array} a - The first array of range elements. + * @param {array} b - The second array of range elements. + * @param {object} [options] - A range configuration object. Can contain: repeat, random, randomB, yoyo, max, qty. + * + * @return {array} An array of arranged elements. + */ +var Range = function (a, b, options) +{ + var max = GetValue(options, 'max', 0); + var qty = GetValue(options, 'qty', 1); + var random = GetValue(options, 'random', false); + var randomB = GetValue(options, 'randomB', false); + var repeat = GetValue(options, 'repeat', 0); + var yoyo = GetValue(options, 'yoyo', false); + + var out = []; + + if (randomB) + { + Shuffle(b); + } + + // Endless repeat, so limit by max + if (repeat === -1) + { + if (max === 0) + { + repeat = 0; + } + else + { + // Work out how many repeats we need + var total = (a.length * b.length) * qty; + + if (yoyo) + { + total *= 2; + } + + repeat = Math.ceil(max / total); + } + } + + for (var i = 0; i <= repeat; i++) + { + var chunk = BuildChunk(a, b, qty); + + if (random) + { + Shuffle(chunk); + } + + out = out.concat(chunk); + + if (yoyo) + { + chunk.reverse(); + + out = out.concat(chunk); + } + } + + if (max) + { + out.splice(max); + } + + return out; +}; + +module.exports = Range; + + +/***/ }), +/* 274 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SpliceOne = __webpack_require__(15); + +/** + * Removes the given item, or array of items, from the array. + * + * The array is modified in-place. + * + * You can optionally specify a callback to be invoked for each item successfully removed from the array. + * + * @function Phaser.Utils.Array.Remove + * @since 3.4.0 + * + * @param {array} array - The array to be modified. + * @param {*|Array.<*>} item - The item, or array of items, to be removed from the array. + * @param {function} [callback] - A callback to be invoked for each item successfully removed from the array. + * @param {object} [context] - The context in which the callback is invoked. + * + * @return {*|Array.<*>} The item, or array of items, that were successfully removed from the array. + */ +var Remove = function (array, item, callback, context) +{ + if (context === undefined) { context = array; } + + var index; + + // Fast path to avoid array mutation and iteration + if (!Array.isArray(item)) + { + index = array.indexOf(item); + + if (index !== -1) + { + SpliceOne(array, index); + + if (callback) + { + callback.call(context, item); + } + + return item; + } + else + { + return null; + } + } + + // If we got this far, we have an array of items to remove + + var itemLength = item.length - 1; + + while (itemLength >= 0) + { + var entry = item[itemLength]; + + index = array.indexOf(entry); + + if (index !== -1) + { + SpliceOne(array, index); + + if (callback) + { + callback.call(context, entry); + } + } + else + { + // Item wasn't found in the array, so remove it from our return results + item.pop(); + } + + itemLength--; + } + + return item; +}; + +module.exports = Remove; + + +/***/ }), +/* 275 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SpliceOne = __webpack_require__(15); + +/** + * Removes the item from the given position in the array. + * + * The array is modified in-place. + * + * You can optionally specify a callback to be invoked for the item if it is successfully removed from the array. + * + * @function Phaser.Utils.Array.RemoveAt + * @since 3.4.0 + * + * @param {array} array - The array to be modified. + * @param {integer} index - The array index to remove the item from. The index must be in bounds or it will throw an error. + * @param {function} [callback] - A callback to be invoked for the item removed from the array. + * @param {object} [context] - The context in which the callback is invoked. + * + * @return {*} The item that was removed. + */ +var RemoveAt = function (array, index, callback, context) +{ + if (context === undefined) { context = array; } + + if (index < 0 || index > array.length - 1) + { + throw new Error('Index out of bounds'); + } + + var item = SpliceOne(array, index); + + if (callback) + { + callback.call(context, item); + } + + return item; +}; + +module.exports = RemoveAt; + + +/***/ }), +/* 276 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SafeRange = __webpack_require__(5); + +/** + * Removes the item within the given range in the array. + * + * The array is modified in-place. + * + * You can optionally specify a callback to be invoked for the item/s successfully removed from the array. + * + * @function Phaser.Utils.Array.RemoveBetween + * @since 3.4.0 + * + * @param {array} array - The array to be modified. + * @param {integer} startIndex - The start index to remove from. + * @param {integer} endIndex - The end index to remove to. + * @param {function} [callback] - A callback to be invoked for the item removed from the array. + * @param {object} [context] - The context in which the callback is invoked. + * + * @return {Array.<*>} An array of items that were removed. + */ +var RemoveBetween = function (array, startIndex, endIndex, callback, context) +{ + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = array.length; } + if (context === undefined) { context = array; } + + if (SafeRange(array, startIndex, endIndex)) + { + var size = endIndex - startIndex; + + var removed = array.splice(startIndex, size); + + if (callback) + { + for (var i = 0; i < removed.length; i++) + { + var entry = removed[i]; + + callback.call(context, entry); + } + } + + return removed; + } + else + { + return []; + } +}; + +module.exports = RemoveBetween; + + +/***/ }), +/* 277 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SpliceOne = __webpack_require__(15); + +/** + * Removes a random object from the given array and returns it. + * Will return null if there are no array items that fall within the specified range or if there is no item for the randomly chosen index. + * + * @function Phaser.Utils.Array.RemoveRandomElement + * @since 3.0.0 + * + * @param {array} array - The array to removed a random element from. + * @param {integer} [start=0] - The array index to start the search from. + * @param {integer} [length=array.length] - Optional restriction on the number of elements to randomly select from. + * + * @return {object} The random element that was removed, or `null` if there were no array elements that fell within the given range. + */ +var RemoveRandomElement = function (array, start, length) +{ + if (start === undefined) { start = 0; } + if (length === undefined) { length = array.length; } + + var randomIndex = start + Math.floor(Math.random() * length); + + return SpliceOne(array, randomIndex); +}; + +module.exports = RemoveRandomElement; + + +/***/ }), +/* 278 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Replaces an element of the array with the new element. + * The new element cannot already be a member of the array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.Replace + * @since 3.4.0 + * + * @param {array} array - The array to search within. + * @param {*} oldChild - The element in the array that will be replaced. + * @param {*} newChild - The element to be inserted into the array at the position of `oldChild`. + * + * @return {boolean} Returns true if the oldChild was successfully replaced, otherwise returns false. + */ +var Replace = function (array, oldChild, newChild) +{ + var index1 = array.indexOf(oldChild); + var index2 = array.indexOf(newChild); + + if (index1 !== -1 && index2 === -1) + { + array[index1] = newChild; + + return true; + } + else + { + return false; + } +}; + +module.exports = Replace; + + +/***/ }), +/* 279 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the element at the start of the array to the end, shifting all items in the process. + * The "rotation" happens to the left. + * + * @function Phaser.Utils.Array.RotateLeft + * @since 3.0.0 + * + * @param {array} array - The array to shift to the left. This array is modified in place. + * @param {integer} [total=1] - The number of times to shift the array. + * + * @return {*} The most recently shifted element. + */ +var RotateLeft = function (array, total) +{ + if (total === undefined) { total = 1; } + + var element = null; + + for (var i = 0; i < total; i++) + { + element = array.shift(); + array.push(element); + } + + return element; +}; + +module.exports = RotateLeft; + + +/***/ }), +/* 280 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the element at the end of the array to the start, shifting all items in the process. + * The "rotation" happens to the right. + * + * @function Phaser.Utils.Array.RotateRight + * @since 3.0.0 + * + * @param {array} array - The array to shift to the right. This array is modified in place. + * @param {integer} [total=1] - The number of times to shift the array. + * + * @return {*} The most recently shifted element. + */ +var RotateRight = function (array, total) +{ + if (total === undefined) { total = 1; } + + var element = null; + + for (var i = 0; i < total; i++) + { + element = array.pop(); + array.unshift(element); + } + + return element; +}; + +module.exports = RotateRight; + + +/***/ }), +/* 281 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Moves the given element to the bottom of the array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.SendToBack + * @since 3.4.0 + * + * @param {array} array - The array. + * @param {*} item - The element to move. + * + * @return {*} The element that was moved. + */ +var SendToBack = function (array, item) +{ + var currentIndex = array.indexOf(item); + + if (currentIndex !== -1 && currentIndex > 0) + { + array.splice(currentIndex, 1); + array.unshift(item); + } + + return item; +}; + +module.exports = SendToBack; + + +/***/ }), +/* 282 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SafeRange = __webpack_require__(5); + +/** + * Scans the array for elements with the given property. If found, the property is set to the `value`. + * + * For example: `SetAll('visible', true)` would set all elements that have a `visible` property to `false`. + * + * Optionally you can specify a start and end index. For example if the array had 100 elements, + * and you set `startIndex` to 0 and `endIndex` to 50, it would update only the first 50 elements. + * + * @function Phaser.Utils.Array.SetAll + * @since 3.4.0 + * + * @param {array} array - The array to search. + * @param {string} property - The property to test for on each array element. + * @param {*} value - The value to set the property to. + * @param {integer} [startIndex] - An optional start index to search from. + * @param {integer} [endIndex] - An optional end index to search to. + * + * @return {array} The input array. + */ +var SetAll = function (array, property, value, startIndex, endIndex) +{ + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = array.length; } + + if (SafeRange(array, startIndex, endIndex)) + { + for (var i = startIndex; i < endIndex; i++) + { + var entry = array[i]; + + if (entry.hasOwnProperty(property)) + { + entry[property] = value; + } + } + } + + return array; +}; + +module.exports = SetAll; + + +/***/ }), +/* 283 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +//! stable.js 0.1.6, https://github.com/Two-Screen/stable +//! © 2017 Angry Bytes and contributors. MIT licensed. + +/** + * @namespace Phaser.Utils.Array.StableSortFunctions + */ + +(function() { + + /** + * A stable array sort, because `Array#sort()` is not guaranteed stable. + * This is an implementation of merge sort, without recursion. + * + * @function Phaser.Utils.Array.StableSort + * @since 3.0.0 + * + * @param {array} arr - The input array to be sorted. + * @param {function} comp - The comparison handler. + * + * @return {array} The sorted result. + */ +var stable = function(arr, comp) { + return exec(arr.slice(), comp); +}; + + /** + * Sort the input array and simply copy it back if the result isn't in the original array, which happens on an odd number of passes. + * + * @function Phaser.Utils.Array.StableSortFunctions.inplace + * @memberof Phaser.Utils.Array.StableSortFunctions + * @since 3.0.0 + * + * @param {array} arr - The input array. + * @param {function} comp - The comparison handler. + * + * @return {array} The sorted array. + */ +stable.inplace = function(arr, comp) { + var result = exec(arr, comp); + + // This simply copies back if the result isn't in the original array, + // which happens on an odd number of passes. + if (result !== arr) { + pass(result, null, arr.length, arr); + } + + return arr; +}; + +// Execute the sort using the input array and a second buffer as work space. +// Returns one of those two, containing the final result. +function exec(arr, comp) { + if (typeof(comp) !== 'function') { + comp = function(a, b) { + return String(a).localeCompare(b); + }; + } + + // Short-circuit when there's nothing to sort. + var len = arr.length; + if (len <= 1) { + return arr; + } + + // Rather than dividing input, simply iterate chunks of 1, 2, 4, 8, etc. + // Chunks are the size of the left or right hand in merge sort. + // Stop when the left-hand covers all of the array. + var buffer = new Array(len); + for (var chk = 1; chk < len; chk *= 2) { + pass(arr, comp, chk, buffer); + + var tmp = arr; + arr = buffer; + buffer = tmp; + } + + return arr; +} + +// Run a single pass with the given chunk size. +var pass = function(arr, comp, chk, result) { + var len = arr.length; + var i = 0; + // Step size / double chunk size. + var dbl = chk * 2; + // Bounds of the left and right chunks. + var l, r, e; + // Iterators over the left and right chunk. + var li, ri; + + // Iterate over pairs of chunks. + for (l = 0; l < len; l += dbl) { + r = l + chk; + e = r + chk; + if (r > len) r = len; + if (e > len) e = len; + + // Iterate both chunks in parallel. + li = l; + ri = r; + while (true) { + // Compare the chunks. + if (li < r && ri < e) { + // This works for a regular `sort()` compatible comparator, + // but also for a simple comparator like: `a > b` + if (comp(arr[li], arr[ri]) <= 0) { + result[i++] = arr[li++]; + } + else { + result[i++] = arr[ri++]; + } + } + // Nothing to compare, just flush what's left. + else if (li < r) { + result[i++] = arr[li++]; + } + else if (ri < e) { + result[i++] = arr[ri++]; + } + // Both iterators are at the chunk ends. + else { + break; + } + } + } +}; + +// Export using CommonJS or to the window. +if (true) { + module.exports = stable; +} +else {} + +})(); + +/***/ }), +/* 284 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Swaps the position of two elements in the given array. + * The elements must exist in the same array. + * The array is modified in-place. + * + * @function Phaser.Utils.Array.Swap + * @since 3.4.0 + * + * @param {array} array - The input array. + * @param {*} item1 - The first element to swap. + * @param {*} item2 - The second element to swap. + * + * @return {array} The input array. + */ +var Swap = function (array, item1, item2) +{ + if (item1 === item2) + { + return; + } + + var index1 = array.indexOf(item1); + var index2 = array.indexOf(item2); + + if (index1 < 0 || index2 < 0) + { + throw new Error('Supplied items must be elements of the same array'); + } + + array[index1] = item2; + array[index2] = item1; + + return array; +}; + +module.exports = Swap; + + +/***/ }), +/* 285 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.GameObjects.Components + */ + +module.exports = { + + Alpha: __webpack_require__(286), + AlphaSingle: __webpack_require__(287), + Animation: __webpack_require__(288), + BlendMode: __webpack_require__(309), + ComputedSize: __webpack_require__(46), + Crop: __webpack_require__(310), + Depth: __webpack_require__(47), + Flip: __webpack_require__(48), + GetBounds: __webpack_require__(311), + Mask: __webpack_require__(320), + Origin: __webpack_require__(340), + PathFollower: __webpack_require__(341), + Pipeline: __webpack_require__(344), + ScrollFactor: __webpack_require__(49), + Size: __webpack_require__(345), + Texture: __webpack_require__(346), + TextureCrop: __webpack_require__(347), + Tint: __webpack_require__(348), + ToJSON: __webpack_require__(54), + Transform: __webpack_require__(50), + TransformMatrix: __webpack_require__(51), + Visible: __webpack_require__(52) + +}; + + +/***/ }), +/* 286 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Clamp = __webpack_require__(3); + +// bitmask flag for GameObject.renderMask +var _FLAG = 2; // 0010 + +/** + * Provides methods used for setting the alpha properties of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.Alpha + * @since 3.0.0 + */ + +var Alpha = { + + /** + * Private internal value. Holds the global alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alpha + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alpha: 1, + + /** + * Private internal value. Holds the top-left alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alphaTL + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alphaTL: 1, + + /** + * Private internal value. Holds the top-right alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alphaTR + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alphaTR: 1, + + /** + * Private internal value. Holds the bottom-left alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alphaBL + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alphaBL: 1, + + /** + * Private internal value. Holds the bottom-right alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alphaBR + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alphaBR: 1, + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + * + * @method Phaser.GameObjects.Components.Alpha#clearAlpha + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + clearAlpha: function () + { + return this.setAlpha(1); + }, + + /** + * 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. + * + * If your game is running under WebGL you can optionally specify four different alpha values, each of which + * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. + * + * @method Phaser.GameObjects.Components.Alpha#setAlpha + * @since 3.0.0 + * + * @param {number} [topLeft=1] - The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. + * @param {number} [topRight] - The alpha value used for the top-right of the Game Object. WebGL only. + * @param {number} [bottomLeft] - The alpha value used for the bottom-left of the Game Object. WebGL only. + * @param {number} [bottomRight] - The alpha value used for the bottom-right of the Game Object. WebGL only. + * + * @return {this} This Game Object instance. + */ + setAlpha: function (topLeft, topRight, bottomLeft, bottomRight) + { + if (topLeft === undefined) { topLeft = 1; } + + // Treat as if there is only one alpha value for the whole Game Object + if (topRight === undefined) + { + this.alpha = topLeft; + } + else + { + this._alphaTL = Clamp(topLeft, 0, 1); + this._alphaTR = Clamp(topRight, 0, 1); + this._alphaBL = Clamp(bottomLeft, 0, 1); + this._alphaBR = Clamp(bottomRight, 0, 1); + } + + return this; + }, + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + * + * @name Phaser.GameObjects.Components.Alpha#alpha + * @type {number} + * @since 3.0.0 + */ + alpha: { + + get: function () + { + return this._alpha; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alpha = v; + this._alphaTL = v; + this._alphaTR = v; + this._alphaBL = v; + this._alphaBR = v; + + if (v === 0) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The alpha value starting from the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Alpha#alphaTopLeft + * @type {number} + * @webglOnly + * @since 3.0.0 + */ + alphaTopLeft: { + + get: function () + { + return this._alphaTL; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alphaTL = v; + + if (v !== 0) + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The alpha value starting from the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Alpha#alphaTopRight + * @type {number} + * @webglOnly + * @since 3.0.0 + */ + alphaTopRight: { + + get: function () + { + return this._alphaTR; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alphaTR = v; + + if (v !== 0) + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The alpha value starting from the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Alpha#alphaBottomLeft + * @type {number} + * @webglOnly + * @since 3.0.0 + */ + alphaBottomLeft: { + + get: function () + { + return this._alphaBL; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alphaBL = v; + + if (v !== 0) + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The alpha value starting from the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Alpha#alphaBottomRight + * @type {number} + * @webglOnly + * @since 3.0.0 + */ + alphaBottomRight: { + + get: function () + { + return this._alphaBR; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alphaBR = v; + + if (v !== 0) + { + this.renderFlags |= _FLAG; + } + } + + } + +}; + +module.exports = Alpha; + + +/***/ }), +/* 287 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Clamp = __webpack_require__(3); + +// bitmask flag for GameObject.renderMask +var _FLAG = 2; // 0010 + +/** + * Provides methods used for setting the alpha property of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.AlphaSingle + * @since 3.22.0 + */ + +var AlphaSingle = { + + /** + * Private internal value. Holds the global alpha value. + * + * @name Phaser.GameObjects.Components.AlphaSingle#_alpha + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alpha: 1, + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + * + * @method Phaser.GameObjects.Components.AlphaSingle#clearAlpha + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + clearAlpha: function () + { + return this.setAlpha(1); + }, + + /** + * 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. + * + * @method Phaser.GameObjects.Components.AlphaSingle#setAlpha + * @since 3.0.0 + * + * @param {number} [value=1] - The alpha value applied across the whole Game Object. + * + * @return {this} This Game Object instance. + */ + setAlpha: function (value) + { + if (value === undefined) { value = 1; } + + this.alpha = value; + + return this; + }, + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + * + * @name Phaser.GameObjects.Components.AlphaSingle#alpha + * @type {number} + * @since 3.0.0 + */ + alpha: { + + get: function () + { + return this._alpha; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alpha = v; + + if (v === 0) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + } + + } + +}; + +module.exports = AlphaSingle; + + +/***/ }), +/* 288 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var BaseAnimation = __webpack_require__(289); +var Class = __webpack_require__(0); +var Events = __webpack_require__(59); + +/** + * @classdesc + * A Game Object Animation Controller. + * + * This controller lives as an instance within a Game Object, accessible as `sprite.anims`. + * + * @class Animation + * @memberof Phaser.GameObjects.Components + * @constructor + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} parent - The Game Object to which this animation controller belongs. + */ +var Animation = new Class({ + + initialize: + + function Animation (parent) + { + /** + * The Game Object to which this animation controller belongs. + * + * @name Phaser.GameObjects.Components.Animation#parent + * @type {Phaser.GameObjects.GameObject} + * @since 3.0.0 + */ + this.parent = parent; + + /** + * A reference to the global Animation Manager. + * + * @name Phaser.GameObjects.Components.Animation#animationManager + * @type {Phaser.Animations.AnimationManager} + * @since 3.0.0 + */ + this.animationManager = parent.scene.sys.anims; + + this.animationManager.once(Events.REMOVE_ANIMATION, this.remove, this); + + /** + * Is an animation currently playing or not? + * + * @name Phaser.GameObjects.Components.Animation#isPlaying + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.isPlaying = false; + + /** + * The current Animation loaded into this Animation Controller. + * + * @name Phaser.GameObjects.Components.Animation#currentAnim + * @type {?Phaser.Animations.Animation} + * @default null + * @since 3.0.0 + */ + this.currentAnim = null; + + /** + * The current AnimationFrame being displayed by this Animation Controller. + * + * @name Phaser.GameObjects.Components.Animation#currentFrame + * @type {?Phaser.Animations.AnimationFrame} + * @default null + * @since 3.0.0 + */ + this.currentFrame = null; + + /** + * The key of the next Animation to be loaded into this Animation Controller when the current animation completes. + * + * @name Phaser.GameObjects.Components.Animation#nextAnim + * @type {?string} + * @default null + * @since 3.16.0 + */ + this.nextAnim = null; + + /** + * A queue of keys of the next Animations to be loaded into this Animation Controller when the current animation completes. + * + * @name Phaser.GameObjects.Components.Animation#nextAnimsQueue + * @type {string[]} + * @since 3.24.0 + */ + this.nextAnimsQueue = []; + + /** + * Time scale factor. + * + * @name Phaser.GameObjects.Components.Animation#_timeScale + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + this._timeScale = 1; + + /** + * The frame rate of playback in frames per second. + * The default is 24 if the `duration` property is `null`. + * + * @name Phaser.GameObjects.Components.Animation#frameRate + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.frameRate = 0; + + /** + * How long the animation should play for, in milliseconds. + * If the `frameRate` property has been set then it overrides this value, + * otherwise the `frameRate` is derived from `duration`. + * + * @name Phaser.GameObjects.Components.Animation#duration + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.duration = 0; + + /** + * ms per frame, not including frame specific modifiers that may be present in the Animation data. + * + * @name Phaser.GameObjects.Components.Animation#msPerFrame + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.msPerFrame = 0; + + /** + * Skip frames if the time lags, or always advanced anyway? + * + * @name Phaser.GameObjects.Components.Animation#skipMissedFrames + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.skipMissedFrames = true; + + /** + * A delay before starting playback, in milliseconds. + * + * @name Phaser.GameObjects.Components.Animation#_delay + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._delay = 0; + + /** + * Number of times to repeat the animation (-1 for infinity) + * + * @name Phaser.GameObjects.Components.Animation#_repeat + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._repeat = 0; + + /** + * Delay before the repeat starts, in milliseconds. + * + * @name Phaser.GameObjects.Components.Animation#_repeatDelay + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._repeatDelay = 0; + + /** + * Should the animation yoyo? (reverse back down to the start) before repeating? + * + * @name Phaser.GameObjects.Components.Animation#_yoyo + * @type {boolean} + * @private + * @default false + * @since 3.0.0 + */ + this._yoyo = false; + + /** + * Will the playhead move forwards (`true`) or in reverse (`false`). + * + * @name Phaser.GameObjects.Components.Animation#forward + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.forward = true; + + /** + * An Internal trigger that's play the animation in reverse mode ('true') or not ('false'), + * needed because forward can be changed by yoyo feature. + * + * @name Phaser.GameObjects.Components.Animation#_reverse + * @type {boolean} + * @default false + * @private + * @since 3.12.0 + */ + this._reverse = false; + + /** + * Internal time overflow accumulator. + * + * @name Phaser.GameObjects.Components.Animation#accumulator + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.accumulator = 0; + + /** + * The time point at which the next animation frame will change. + * + * @name Phaser.GameObjects.Components.Animation#nextTick + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.nextTick = 0; + + /** + * An internal counter keeping track of how many repeats are left to play. + * + * @name Phaser.GameObjects.Components.Animation#repeatCounter + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.repeatCounter = 0; + + /** + * An internal flag keeping track of pending repeats. + * + * @name Phaser.GameObjects.Components.Animation#pendingRepeat + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.pendingRepeat = false; + + /** + * Is the Animation paused? + * + * @name Phaser.GameObjects.Components.Animation#_paused + * @type {boolean} + * @private + * @default false + * @since 3.0.0 + */ + this._paused = false; + + /** + * Was the animation previously playing before being paused? + * + * @name Phaser.GameObjects.Components.Animation#_wasPlaying + * @type {boolean} + * @private + * @default false + * @since 3.0.0 + */ + this._wasPlaying = false; + + /** + * Internal property tracking if this Animation is waiting to stop. + * + * 0 = No + * 1 = Waiting for ms to pass + * 2 = Waiting for repeat + * 3 = Waiting for specific frame + * + * @name Phaser.GameObjects.Components.Animation#_pendingStop + * @type {integer} + * @private + * @since 3.4.0 + */ + this._pendingStop = 0; + + /** + * Internal property used by _pendingStop. + * + * @name Phaser.GameObjects.Components.Animation#_pendingStopValue + * @type {any} + * @private + * @since 3.4.0 + */ + this._pendingStopValue; + }, + + /** + * Sets an animation to be played immediately after the current one completes. + * + * The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc, or have the `stop` method called directly on it. + * + * An animation set to repeat forever will never enter a completed state. + * + * You can chain a new animation at any point, including before the current one starts playing, during it, or when it ends (via its `animationcomplete` callback). + * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained animations without impacting the global animation they're playing. + * + * Call this method with no arguments to reset the chained animation. + * + * @method Phaser.GameObjects.Components.Animation#chain + * @since 3.16.0 + * + * @param {(string|Phaser.Animations.Animation)} [key] - The string-based key of the animation to play next, as defined previously in the Animation Manager. Or an Animation instance. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + chain: function (key) + { + if (key instanceof BaseAnimation) + { + key = key.key; + } + + if (this.nextAnim === null) + { + this.nextAnim = key; + } + else + { + this.nextAnimsQueue.push(key); + } + + return this.parent; + }, + + /** + * Sets the amount of time, in milliseconds, that the animation will be delayed before starting playback. + * + * @method Phaser.GameObjects.Components.Animation#setDelay + * @since 3.4.0 + * + * @param {integer} [value=0] - The amount of time, in milliseconds, to wait before starting playback. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + setDelay: function (value) + { + if (value === undefined) { value = 0; } + + this._delay = value; + + return this.parent; + }, + + /** + * Gets the amount of time, in milliseconds that the animation will be delayed before starting playback. + * + * @method Phaser.GameObjects.Components.Animation#getDelay + * @since 3.4.0 + * + * @return {integer} The amount of time, in milliseconds, the Animation will wait before starting playback. + */ + getDelay: function () + { + return this._delay; + }, + + /** + * Waits for the specified delay, in milliseconds, then starts playback of the requested animation. + * + * @method Phaser.GameObjects.Components.Animation#delayedPlay + * @since 3.0.0 + * + * @param {integer} delay - The delay, in milliseconds, to wait before starting the animation playing. + * @param {string} key - The key of the animation to play. + * @param {integer} [startFrame=0] - The frame of the animation to start from. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + delayedPlay: function (delay, key, startFrame) + { + this.play(key, true, startFrame); + + this.nextTick += delay; + + return this.parent; + }, + + /** + * Returns the key of the animation currently loaded into this component. + * + * @method Phaser.GameObjects.Components.Animation#getCurrentKey + * @since 3.0.0 + * + * @return {string} The key of the Animation loaded into this component. + */ + getCurrentKey: function () + { + if (this.currentAnim) + { + return this.currentAnim.key; + } + }, + + /** + * Internal method used to load an animation into this component. + * + * @method Phaser.GameObjects.Components.Animation#load + * @protected + * @since 3.0.0 + * + * @param {string} key - The key of the animation to load. + * @param {integer} [startFrame=0] - The start frame of the animation to load. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + load: function (key, startFrame) + { + if (startFrame === undefined) { startFrame = 0; } + + if (this.isPlaying) + { + this.stop(); + } + + // Load the new animation in + this.animationManager.load(this, key, startFrame); + + return this.parent; + }, + + /** + * Pause the current animation and set the `isPlaying` property to `false`. + * You can optionally pause it at a specific frame. + * + * @method Phaser.GameObjects.Components.Animation#pause + * @since 3.0.0 + * + * @param {Phaser.Animations.AnimationFrame} [atFrame] - An optional frame to set after pausing the animation. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + pause: function (atFrame) + { + if (!this._paused) + { + this._paused = true; + this._wasPlaying = this.isPlaying; + this.isPlaying = false; + } + + if (atFrame !== undefined) + { + this.updateFrame(atFrame); + } + + return this.parent; + }, + + /** + * Resumes playback of a paused animation and sets the `isPlaying` property to `true`. + * You can optionally tell it to start playback from a specific frame. + * + * @method Phaser.GameObjects.Components.Animation#resume + * @since 3.0.0 + * + * @param {Phaser.Animations.AnimationFrame} [fromFrame] - An optional frame to set before restarting playback. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + resume: function (fromFrame) + { + if (this._paused) + { + this._paused = false; + this.isPlaying = this._wasPlaying; + } + + if (fromFrame !== undefined) + { + this.updateFrame(fromFrame); + } + + return this.parent; + }, + + /** + * `true` if the current animation is paused, otherwise `false`. + * + * @name Phaser.GameObjects.Components.Animation#isPaused + * @readonly + * @type {boolean} + * @since 3.4.0 + */ + isPaused: { + + get: function () + { + return this._paused; + } + + }, + + /** + * Plays an Animation on a Game Object that has the Animation component, such as a Sprite. + * + * Animations are stored in the global Animation Manager and are referenced by a unique string-based key. + * + * @method Phaser.GameObjects.Components.Animation#play + * @fires Phaser.GameObjects.Components.Animation#onStartEvent + * @since 3.0.0 + * + * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance. + * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call. + * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + play: function (key, ignoreIfPlaying, startFrame) + { + if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } + if (startFrame === undefined) { startFrame = 0; } + + if (key instanceof BaseAnimation) + { + key = key.key; + } + + if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key) + { + return this.parent; + } + + this.forward = true; + this._reverse = false; + this._paused = false; + this._wasPlaying = true; + + return this._startAnimation(key, startFrame); + }, + + /** + * Plays an Animation (in reverse mode) on the Game Object that owns this Animation Component. + * + * @method Phaser.GameObjects.Components.Animation#playReverse + * @fires Phaser.GameObjects.Components.Animation#onStartEvent + * @since 3.12.0 + * + * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance. + * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. + * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + playReverse: function (key, ignoreIfPlaying, startFrame) + { + if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } + if (startFrame === undefined) { startFrame = 0; } + + if (key instanceof BaseAnimation) + { + key = key.key; + } + + if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key) + { + return this.parent; + } + + this.forward = false; + this._reverse = true; + + return this._startAnimation(key, startFrame); + }, + + /** + * Load an Animation and fires 'onStartEvent' event, extracted from 'play' method. + * + * @method Phaser.GameObjects.Components.Animation#_startAnimation + * @fires Phaser.Animations.Events#ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START + * @since 3.12.0 + * + * @param {string} key - The string-based key of the animation to play, as defined previously in the Animation Manager. + * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + _startAnimation: function (key, startFrame) + { + this.load(key, startFrame); + + var anim = this.currentAnim; + var gameObject = this.parent; + + if (!anim) + { + return gameObject; + } + + // Should give us 9,007,199,254,740,991 safe repeats + this.repeatCounter = (this._repeat === -1) ? Number.MAX_VALUE : this._repeat; + + anim.getFirstTick(this); + + this.isPlaying = true; + this.pendingRepeat = false; + + if (anim.showOnStart) + { + gameObject.visible = true; + } + + var frame = this.currentFrame; + + anim.emit(Events.ANIMATION_START, anim, frame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_KEY_START + key, anim, frame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_START, anim, frame, gameObject); + + return gameObject; + }, + + /** + * Reverse the Animation that is already playing on the Game Object. + * + * @method Phaser.GameObjects.Components.Animation#reverse + * @since 3.12.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + reverse: function () + { + if (this.isPlaying) + { + this._reverse = !this._reverse; + + this.forward = !this.forward; + } + + return this.parent; + }, + + /** + * Returns a value between 0 and 1 indicating how far this animation is through, ignoring repeats and yoyos. + * If the animation has a non-zero repeat defined, `getProgress` and `getTotalProgress` will be different + * because `getProgress` doesn't include any repeats or repeat delays, whereas `getTotalProgress` does. + * + * @method Phaser.GameObjects.Components.Animation#getProgress + * @since 3.4.0 + * + * @return {number} The progress of the current animation, between 0 and 1. + */ + getProgress: function () + { + var p = this.currentFrame.progress; + + if (!this.forward) + { + p = 1 - p; + } + + return p; + }, + + /** + * Takes a value between 0 and 1 and uses it to set how far this animation is through playback. + * Does not factor in repeats or yoyos, but does handle playing forwards or backwards. + * + * @method Phaser.GameObjects.Components.Animation#setProgress + * @since 3.4.0 + * + * @param {number} [value=0] - The progress value, between 0 and 1. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + setProgress: function (value) + { + if (!this.forward) + { + value = 1 - value; + } + + this.setCurrentFrame(this.currentAnim.getFrameByProgress(value)); + + return this.parent; + }, + + /** + * Handle the removal of an animation from the Animation Manager. + * + * @method Phaser.GameObjects.Components.Animation#remove + * @since 3.0.0 + * + * @param {string} [key] - The key of the removed Animation. + * @param {Phaser.Animations.Animation} [animation] - The removed Animation. + */ + remove: function (key, animation) + { + if (animation === undefined) { animation = this.currentAnim; } + + if (this.isPlaying && animation.key === this.currentAnim.key) + { + this.stop(); + + this.setCurrentFrame(this.currentAnim.frames[0]); + } + }, + + /** + * Gets the number of times that the animation will repeat + * after its first iteration. For example, if returns 1, the animation will + * play a total of twice (the initial play plus 1 repeat). + * A value of -1 means the animation will repeat indefinitely. + * + * @method Phaser.GameObjects.Components.Animation#getRepeat + * @since 3.4.0 + * + * @return {integer} The number of times that the animation will repeat. + */ + getRepeat: function () + { + return this._repeat; + }, + + /** + * Sets the number of times that the animation should repeat + * after its first iteration. For example, if repeat is 1, the animation will + * play a total of twice (the initial play plus 1 repeat). + * To repeat indefinitely, use -1. repeat should always be an integer. + * + * @method Phaser.GameObjects.Components.Animation#setRepeat + * @since 3.4.0 + * + * @param {integer} value - The number of times that the animation should repeat. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + setRepeat: function (value) + { + this._repeat = value; + + this.repeatCounter = (value === -1) ? Number.MAX_VALUE : value; + + return this.parent; + }, + + /** + * Gets the amount of delay between repeats, if any. + * + * @method Phaser.GameObjects.Components.Animation#getRepeatDelay + * @since 3.4.0 + * + * @return {number} The delay between repeats. + */ + getRepeatDelay: function () + { + return this._repeatDelay; + }, + + /** + * Sets the amount of time in seconds between repeats. + * For example, if `repeat` is 2 and `repeatDelay` is 10, the animation will play initially, + * then wait for 10 seconds before repeating, then play again, then wait another 10 seconds + * before doing its final repeat. + * + * @method Phaser.GameObjects.Components.Animation#setRepeatDelay + * @since 3.4.0 + * + * @param {number} value - The delay to wait between repeats, in seconds. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + setRepeatDelay: function (value) + { + this._repeatDelay = value; + + return this.parent; + }, + + /** + * Restarts the current animation from its beginning, optionally including its delay value. + * + * @method Phaser.GameObjects.Components.Animation#restart + * @fires Phaser.Animations.Events#ANIMATION_RESTART + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_RESTART + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART + * @since 3.0.0 + * + * @param {boolean} [includeDelay=false] - Whether to include the delay value of the animation when restarting. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + restart: function (includeDelay) + { + if (includeDelay === undefined) { includeDelay = false; } + + var anim = this.currentAnim; + + anim.getFirstTick(this, includeDelay); + + this.forward = true; + this.isPlaying = true; + this.pendingRepeat = false; + this._paused = false; + + // Set frame + this.updateFrame(anim.frames[0]); + + var gameObject = this.parent; + var frame = this.currentFrame; + + anim.emit(Events.ANIMATION_RESTART, anim, frame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_KEY_RESTART + anim.key, anim, frame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_RESTART, anim, frame, gameObject); + + return this.parent; + }, + + /** + * Immediately stops the current animation from playing and dispatches the `animationcomplete` event. + * + * If no animation is set, no event will be dispatched. + * + * If there is another animation queued (via the `chain` method) then it will start playing immediately. + * + * @method Phaser.GameObjects.Components.Animation#stop + * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent + * @since 3.0.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stop: function () + { + this._pendingStop = 0; + + this.isPlaying = false; + + var gameObject = this.parent; + var anim = this.currentAnim; + var frame = this.currentFrame; + + if (anim) + { + anim.emit(Events.ANIMATION_COMPLETE, anim, frame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_KEY_COMPLETE + anim.key, anim, frame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_COMPLETE, anim, frame, gameObject); + } + + if (this.nextAnim) + { + var key = this.nextAnim; + + this.nextAnim = (this.nextAnimsQueue.length > 0) ? this.nextAnimsQueue.shift() : null; + + this.play(key); + } + + return gameObject; + }, + + /** + * Stops the current animation from playing after the specified time delay, given in milliseconds. + * + * @method Phaser.GameObjects.Components.Animation#stopAfterDelay + * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent + * @since 3.4.0 + * + * @param {integer} delay - The number of milliseconds to wait before stopping this animation. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stopAfterDelay: function (delay) + { + this._pendingStop = 1; + this._pendingStopValue = delay; + + return this.parent; + }, + + /** + * Stops the current animation from playing when it next repeats. + * + * @method Phaser.GameObjects.Components.Animation#stopOnRepeat + * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent + * @since 3.4.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stopOnRepeat: function () + { + this._pendingStop = 2; + + return this.parent; + }, + + /** + * Stops the current animation from playing when it next sets the given frame. + * If this frame doesn't exist within the animation it will not stop it from playing. + * + * @method Phaser.GameObjects.Components.Animation#stopOnFrame + * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent + * @since 3.4.0 + * + * @param {Phaser.Animations.AnimationFrame} frame - The frame to check before stopping this animation. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stopOnFrame: function (frame) + { + this._pendingStop = 3; + this._pendingStopValue = frame; + + return this.parent; + }, + + /** + * Sets the Time Scale factor, allowing you to make the animation go go faster or slower than default. + * Where 1 = normal speed (the default), 0.5 = half speed, 2 = double speed, etc. + * + * @method Phaser.GameObjects.Components.Animation#setTimeScale + * @since 3.4.0 + * + * @param {number} [value=1] - The time scale factor, where 1 is no change, 0.5 is half speed, etc. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + setTimeScale: function (value) + { + if (value === undefined) { value = 1; } + + this._timeScale = value; + + return this.parent; + }, + + /** + * Gets the Time Scale factor. + * + * @method Phaser.GameObjects.Components.Animation#getTimeScale + * @since 3.4.0 + * + * @return {number} The Time Scale value. + */ + getTimeScale: function () + { + return this._timeScale; + }, + + /** + * Returns the total number of frames in this animation. + * + * @method Phaser.GameObjects.Components.Animation#getTotalFrames + * @since 3.4.0 + * + * @return {integer} The total number of frames in this animation. + */ + getTotalFrames: function () + { + return this.currentAnim.frames.length; + }, + + /** + * The internal update loop for the Animation Component. + * + * @method Phaser.GameObjects.Components.Animation#update + * @since 3.0.0 + * + * @param {number} time - The current timestamp. + * @param {number} delta - The delta time, in ms, elapsed since the last frame. + */ + update: function (time, delta) + { + if (!this.currentAnim || !this.isPlaying || this.currentAnim.paused) + { + return; + } + + this.accumulator += delta * this._timeScale; + + if (this._pendingStop === 1) + { + this._pendingStopValue -= delta; + + if (this._pendingStopValue <= 0) + { + return this.currentAnim.completeAnimation(this); + } + } + + if (this.accumulator >= this.nextTick) + { + this.currentAnim.setFrame(this); + } + }, + + /** + * Sets the given Animation Frame as being the current frame + * and applies it to the parent Game Object, adjusting its size and origin as needed. + * + * @method Phaser.GameObjects.Components.Animation#setCurrentFrame + * @since 3.4.0 + * + * @param {Phaser.Animations.AnimationFrame} animationFrame - The Animation Frame to set as being current. + * + * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. + */ + setCurrentFrame: function (animationFrame) + { + var gameObject = this.parent; + + this.currentFrame = animationFrame; + + gameObject.texture = animationFrame.frame.texture; + gameObject.frame = animationFrame.frame; + + if (gameObject.isCropped) + { + gameObject.frame.updateCropUVs(gameObject._crop, gameObject.flipX, gameObject.flipY); + } + + gameObject.setSizeToFrame(); + + if (gameObject._originComponent) + { + if (animationFrame.frame.customPivot) + { + gameObject.setOrigin(animationFrame.frame.pivotX, animationFrame.frame.pivotY); + } + else + { + gameObject.updateDisplayOrigin(); + } + } + + return gameObject; + }, + + /** + * Internal frame change handler. + * + * @method Phaser.GameObjects.Components.Animation#updateFrame + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE + * @private + * @since 3.0.0 + * + * @param {Phaser.Animations.AnimationFrame} animationFrame - The animation frame to change to. + */ + updateFrame: function (animationFrame) + { + var gameObject = this.setCurrentFrame(animationFrame); + + if (this.isPlaying) + { + if (animationFrame.setAlpha) + { + gameObject.alpha = animationFrame.alpha; + } + + var anim = this.currentAnim; + + gameObject.emit(Events.SPRITE_ANIMATION_KEY_UPDATE + anim.key, anim, animationFrame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_UPDATE, anim, animationFrame, gameObject); + + if (this._pendingStop === 3 && this._pendingStopValue === animationFrame) + { + this.currentAnim.completeAnimation(this); + } + } + }, + + /** + * Advances the animation to the next frame, regardless of the time or animation state. + * If the animation is set to repeat, or yoyo, this will still take effect. + * + * Calling this does not change the direction of the animation. I.e. if it was currently + * playing in reverse, calling this method doesn't then change the direction to forwards. + * + * @method Phaser.GameObjects.Components.Animation#nextFrame + * @since 3.16.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. + */ + nextFrame: function () + { + if (this.currentAnim) + { + this.currentAnim.nextFrame(this); + } + + return this.parent; + }, + + /** + * Advances the animation to the previous frame, regardless of the time or animation state. + * If the animation is set to repeat, or yoyo, this will still take effect. + * + * Calling this does not change the direction of the animation. I.e. if it was currently + * playing in forwards, calling this method doesn't then change the direction to backwards. + * + * @method Phaser.GameObjects.Components.Animation#previousFrame + * @since 3.16.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. + */ + previousFrame: function () + { + if (this.currentAnim) + { + this.currentAnim.previousFrame(this); + } + + return this.parent; + }, + + /** + * Sets if the current Animation will yoyo when it reaches the end. + * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again. + * + * @method Phaser.GameObjects.Components.Animation#setYoyo + * @since 3.4.0 + * + * @param {boolean} [value=false] - `true` if the animation should yoyo, `false` to not. + * + * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. + */ + setYoyo: function (value) + { + if (value === undefined) { value = false; } + + this._yoyo = value; + + return this.parent; + }, + + /** + * Gets if the current Animation will yoyo when it reaches the end. + * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again. + * + * @method Phaser.GameObjects.Components.Animation#getYoyo + * @since 3.4.0 + * + * @return {boolean} `true` if the animation is set to yoyo, `false` if not. + */ + getYoyo: function () + { + return this._yoyo; + }, + + /** + * Destroy this Animation component. + * + * Unregisters event listeners and cleans up its references. + * + * @method Phaser.GameObjects.Components.Animation#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.animationManager.off(Events.REMOVE_ANIMATION, this.remove, this); + + this.animationManager = null; + this.parent = null; + this.nextAnimsQueue.length = 0; + + this.currentAnim = null; + this.currentFrame = null; + } + +}); + +module.exports = Animation; + + +/***/ }), +/* 289 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Clamp = __webpack_require__(3); +var Class = __webpack_require__(0); +var EventEmitter = __webpack_require__(55); +var Events = __webpack_require__(59); +var FindClosestInSorted = __webpack_require__(57); +var Frame = __webpack_require__(308); +var GetValue = __webpack_require__(6); + +/** + * @classdesc + * A Frame based Animation. + * + * This consists of a key, some default values (like the frame rate) and a bunch of Frame objects. + * + * The Animation Manager creates these. Game Objects don't own an instance of these directly. + * Game Objects have the Animation Component, which are like playheads to global Animations (these objects) + * So multiple Game Objects can have playheads all pointing to this one Animation instance. + * + * @class Animation + * @memberof Phaser.Animations + * @extends Phaser.Events.EventEmitter + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Animations.AnimationManager} manager - A reference to the global Animation Manager + * @param {string} key - The unique identifying string for this animation. + * @param {Phaser.Types.Animations.Animation} config - The Animation configuration. + */ +var Animation = new Class({ + + Extends: EventEmitter, + + initialize: + + function Animation (manager, key, config) + { + EventEmitter.call(this); + + /** + * A reference to the global Animation Manager. + * + * @name Phaser.Animations.Animation#manager + * @type {Phaser.Animations.AnimationManager} + * @since 3.0.0 + */ + this.manager = manager; + + /** + * The unique identifying string for this animation. + * + * @name Phaser.Animations.Animation#key + * @type {string} + * @since 3.0.0 + */ + this.key = key; + + /** + * A frame based animation (as opposed to a bone based animation) + * + * @name Phaser.Animations.Animation#type + * @type {string} + * @default frame + * @since 3.0.0 + */ + this.type = 'frame'; + + /** + * Extract all the frame data into the frames array. + * + * @name Phaser.Animations.Animation#frames + * @type {Phaser.Animations.AnimationFrame[]} + * @since 3.0.0 + */ + this.frames = this.getFrames( + manager.textureManager, + GetValue(config, 'frames', []), + GetValue(config, 'defaultTextureKey', null) + ); + + /** + * The frame rate of playback in frames per second (default 24 if duration is null) + * + * @name Phaser.Animations.Animation#frameRate + * @type {integer} + * @default 24 + * @since 3.0.0 + */ + this.frameRate = GetValue(config, 'frameRate', null); + + /** + * How long the animation should play for, in milliseconds. + * If the `frameRate` property has been set then it overrides this value, + * otherwise the `frameRate` is derived from `duration`. + * + * @name Phaser.Animations.Animation#duration + * @type {integer} + * @since 3.0.0 + */ + this.duration = GetValue(config, 'duration', null); + + if (this.duration === null && this.frameRate === null) + { + // No duration or frameRate given, use default frameRate of 24fps + this.frameRate = 24; + this.duration = (this.frameRate / this.frames.length) * 1000; + } + else if (this.duration && this.frameRate === null) + { + // Duration given but no frameRate, so set the frameRate based on duration + // I.e. 12 frames in the animation, duration = 4000 ms + // So frameRate is 12 / (4000 / 1000) = 3 fps + this.frameRate = this.frames.length / (this.duration / 1000); + } + else + { + // frameRate given, derive duration from it (even if duration also specified) + // I.e. 15 frames in the animation, frameRate = 30 fps + // So duration is 15 / 30 = 0.5 * 1000 (half a second, or 500ms) + this.duration = (this.frames.length / this.frameRate) * 1000; + } + + /** + * How many ms per frame, not including frame specific modifiers. + * + * @name Phaser.Animations.Animation#msPerFrame + * @type {integer} + * @since 3.0.0 + */ + this.msPerFrame = 1000 / this.frameRate; + + /** + * Skip frames if the time lags, or always advanced anyway? + * + * @name Phaser.Animations.Animation#skipMissedFrames + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.skipMissedFrames = GetValue(config, 'skipMissedFrames', true); + + /** + * The delay in ms before the playback will begin. + * + * @name Phaser.Animations.Animation#delay + * @type {integer} + * @default 0 + * @since 3.0.0 + */ + this.delay = GetValue(config, 'delay', 0); + + /** + * Number of times to repeat the animation. Set to -1 to repeat forever. + * + * @name Phaser.Animations.Animation#repeat + * @type {integer} + * @default 0 + * @since 3.0.0 + */ + this.repeat = GetValue(config, 'repeat', 0); + + /** + * The delay in ms before the a repeat play starts. + * + * @name Phaser.Animations.Animation#repeatDelay + * @type {integer} + * @default 0 + * @since 3.0.0 + */ + this.repeatDelay = GetValue(config, 'repeatDelay', 0); + + /** + * Should the animation yoyo (reverse back down to the start) before repeating? + * + * @name Phaser.Animations.Animation#yoyo + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.yoyo = GetValue(config, 'yoyo', false); + + /** + * Should the GameObject's `visible` property be set to `true` when the animation starts to play? + * + * @name Phaser.Animations.Animation#showOnStart + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.showOnStart = GetValue(config, 'showOnStart', false); + + /** + * Should the GameObject's `visible` property be set to `false` when the animation finishes? + * + * @name Phaser.Animations.Animation#hideOnComplete + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.hideOnComplete = GetValue(config, 'hideOnComplete', false); + + /** + * Global pause. All Game Objects using this Animation instance are impacted by this property. + * + * @name Phaser.Animations.Animation#paused + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.paused = false; + + this.manager.on(Events.PAUSE_ALL, this.pause, this); + this.manager.on(Events.RESUME_ALL, this.resume, this); + }, + + /** + * Add frames to the end of the animation. + * + * @method Phaser.Animations.Animation#addFrame + * @since 3.0.0 + * + * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects. + * + * @return {this} This Animation object. + */ + addFrame: function (config) + { + return this.addFrameAt(this.frames.length, config); + }, + + /** + * Add frame/s into the animation. + * + * @method Phaser.Animations.Animation#addFrameAt + * @since 3.0.0 + * + * @param {integer} index - The index to insert the frame at within the animation. + * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects. + * + * @return {this} This Animation object. + */ + addFrameAt: function (index, config) + { + var newFrames = this.getFrames(this.manager.textureManager, config); + + if (newFrames.length > 0) + { + if (index === 0) + { + this.frames = newFrames.concat(this.frames); + } + else if (index === this.frames.length) + { + this.frames = this.frames.concat(newFrames); + } + else + { + var pre = this.frames.slice(0, index); + var post = this.frames.slice(index); + + this.frames = pre.concat(newFrames, post); + } + + this.updateFrameSequence(); + } + + return this; + }, + + /** + * Check if the given frame index is valid. + * + * @method Phaser.Animations.Animation#checkFrame + * @since 3.0.0 + * + * @param {integer} index - The index to be checked. + * + * @return {boolean} `true` if the index is valid, otherwise `false`. + */ + checkFrame: function (index) + { + return (index >= 0 && index < this.frames.length); + }, + + /** + * Called internally when this Animation completes playback. + * Optionally, hides the parent Game Object, then stops playback. + * + * @method Phaser.Animations.Animation#completeAnimation + * @protected + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. + */ + completeAnimation: function (component) + { + if (this.hideOnComplete) + { + component.parent.visible = false; + } + + component.stop(); + }, + + /** + * Called internally when this Animation first starts to play. + * Sets the accumulator and nextTick properties. + * + * @method Phaser.Animations.Animation#getFirstTick + * @protected + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. + * @param {boolean} [includeDelay=true] - If `true` the Animation Components delay value will be added to the `nextTick` total. + */ + getFirstTick: function (component, includeDelay) + { + if (includeDelay === undefined) { includeDelay = true; } + + // When is the first update due? + component.accumulator = 0; + component.nextTick = component.msPerFrame + component.currentFrame.duration; + + if (includeDelay) + { + component.nextTick += component._delay; + } + }, + + /** + * Returns the AnimationFrame at the provided index + * + * @method Phaser.Animations.Animation#getFrameAt + * @protected + * @since 3.0.0 + * + * @param {integer} index - The index in the AnimationFrame array + * + * @return {Phaser.Animations.AnimationFrame} The frame at the index provided from the animation sequence + */ + getFrameAt: function (index) + { + return this.frames[index]; + }, + + /** + * Creates AnimationFrame instances based on the given frame data. + * + * @method Phaser.Animations.Animation#getFrames + * @since 3.0.0 + * + * @param {Phaser.Textures.TextureManager} textureManager - A reference to the global Texture Manager. + * @param {(string|Phaser.Types.Animations.AnimationFrame[])} frames - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects. + * @param {string} [defaultTextureKey] - The key to use if no key is set in the frame configuration object. + * + * @return {Phaser.Animations.AnimationFrame[]} An array of newly created AnimationFrame instances. + */ + getFrames: function (textureManager, frames, defaultTextureKey) + { + var out = []; + var prev; + var animationFrame; + var index = 1; + var i; + var textureKey; + + // if frames is a string, we'll get all the frames from the texture manager as if it's a sprite sheet + if (typeof frames === 'string') + { + textureKey = frames; + + var texture = textureManager.get(textureKey); + var frameKeys = texture.getFrameNames(); + + frames = []; + + frameKeys.forEach(function (idx, value) + { + frames.push({ key: textureKey, frame: value }); + }); + } + + if (!Array.isArray(frames) || frames.length === 0) + { + return out; + } + + for (i = 0; i < frames.length; i++) + { + var item = frames[i]; + + var key = GetValue(item, 'key', defaultTextureKey); + + if (!key) + { + continue; + } + + // Could be an integer or a string + var frame = GetValue(item, 'frame', 0); + + // The actual texture frame + var textureFrame = textureManager.getFrame(key, frame); + + animationFrame = new Frame(key, frame, index, textureFrame); + + animationFrame.duration = GetValue(item, 'duration', 0); + + animationFrame.isFirst = (!prev); + + // The previously created animationFrame + if (prev) + { + prev.nextFrame = animationFrame; + + animationFrame.prevFrame = prev; + } + + out.push(animationFrame); + + prev = animationFrame; + + index++; + } + + if (out.length > 0) + { + animationFrame.isLast = true; + + // Link them end-to-end, so they loop + animationFrame.nextFrame = out[0]; + + out[0].prevFrame = animationFrame; + + // Generate the progress data + + var slice = 1 / (out.length - 1); + + for (i = 0; i < out.length; i++) + { + out[i].progress = i * slice; + } + } + + return out; + }, + + /** + * Called internally. Sets the accumulator and nextTick values of the current Animation. + * + * @method Phaser.Animations.Animation#getNextTick + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. + */ + getNextTick: function (component) + { + // accumulator += delta * _timeScale + // after a large delta surge (perf issue for example) we need to adjust for it here + + // When is the next update due? + component.accumulator -= component.nextTick; + + component.nextTick = component.msPerFrame + component.currentFrame.duration; + }, + + /** + * Loads the Animation values into the Animation Component. + * + * @method Phaser.Animations.Animation#load + * @private + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to load values into. + * @param {integer} startFrame - The start frame of the animation to load. + */ + load: function (component, startFrame) + { + if (startFrame >= this.frames.length) + { + startFrame = 0; + } + + if (component.currentAnim !== this) + { + component.currentAnim = this; + + component.frameRate = this.frameRate; + component.duration = this.duration; + component.msPerFrame = this.msPerFrame; + component.skipMissedFrames = this.skipMissedFrames; + + component._delay = this.delay; + component._repeat = this.repeat; + component._repeatDelay = this.repeatDelay; + component._yoyo = this.yoyo; + } + + var frame = this.frames[startFrame]; + + if (startFrame === 0 && !component.forward) + { + frame = this.getLastFrame(); + } + + component.updateFrame(frame); + }, + + /** + * Returns the frame closest to the given progress value between 0 and 1. + * + * @method Phaser.Animations.Animation#getFrameByProgress + * @since 3.4.0 + * + * @param {number} value - A value between 0 and 1. + * + * @return {Phaser.Animations.AnimationFrame} The frame closest to the given progress value. + */ + getFrameByProgress: function (value) + { + value = Clamp(value, 0, 1); + + return FindClosestInSorted(value, this.frames, 'progress'); + }, + + /** + * Advance the animation frame. + * + * @method Phaser.Animations.Animation#nextFrame + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to advance. + */ + nextFrame: function (component) + { + var frame = component.currentFrame; + + // TODO: Add frame skip support + + if (frame.isLast) + { + // We're at the end of the animation + + // Yoyo? (happens before repeat) + if (component._yoyo) + { + this.handleYoyoFrame(component, false); + } + else if (component.repeatCounter > 0) + { + // Repeat (happens before complete) + + if (component._reverse && component.forward) + { + component.forward = false; + } + else + { + this.repeatAnimation(component); + } + } + else + { + this.completeAnimation(component); + } + } + else + { + this.updateAndGetNextTick(component, frame.nextFrame); + } + }, + + /** + * Handle the yoyo functionality in nextFrame and previousFrame methods. + * + * @method Phaser.Animations.Animation#handleYoyoFrame + * @private + * @since 3.12.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to advance. + * @param {boolean} isReverse - Is animation in reverse mode? (Default: false) + */ + handleYoyoFrame: function (component, isReverse) + { + if (!isReverse) { isReverse = false; } + + if (component._reverse === !isReverse && component.repeatCounter > 0) + { + if (!component._repeatDelay || component.pendingRepeat) + + { + component.forward = isReverse; + } + + this.repeatAnimation(component); + + return; + } + + if (component._reverse !== isReverse && component.repeatCounter === 0) + { + this.completeAnimation(component); + + return; + } + + component.forward = isReverse; + + var frame = (isReverse) ? component.currentFrame.nextFrame : component.currentFrame.prevFrame; + + this.updateAndGetNextTick(component, frame); + }, + + /** + * Returns the animation last frame. + * + * @method Phaser.Animations.Animation#getLastFrame + * @since 3.12.0 + * + * @return {Phaser.Animations.AnimationFrame} component - The Animation Last Frame. + */ + getLastFrame: function () + { + return this.frames[this.frames.length - 1]; + }, + + /** + * Called internally when the Animation is playing backwards. + * Sets the previous frame, causing a yoyo, repeat, complete or update, accordingly. + * + * @method Phaser.Animations.Animation#previousFrame + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. + */ + previousFrame: function (component) + { + var frame = component.currentFrame; + + // TODO: Add frame skip support + + if (frame.isFirst) + { + // We're at the start of the animation + + if (component._yoyo) + { + this.handleYoyoFrame(component, true); + } + else if (component.repeatCounter > 0) + { + if (component._reverse && !component.forward) + { + component.currentFrame = this.getLastFrame(); + this.repeatAnimation(component); + } + else + { + // Repeat (happens before complete) + component.forward = true; + this.repeatAnimation(component); + } + } + else + { + this.completeAnimation(component); + } + } + else + { + this.updateAndGetNextTick(component, frame.prevFrame); + } + }, + + /** + * Update Frame and Wait next tick. + * + * @method Phaser.Animations.Animation#updateAndGetNextTick + * @private + * @since 3.12.0 + * + * @param {Phaser.Animations.AnimationFrame} frame - An Animation frame. + */ + updateAndGetNextTick: function (component, frame) + { + component.updateFrame(frame); + + this.getNextTick(component); + }, + + /** + * Removes the given AnimationFrame from this Animation instance. + * This is a global action. Any Game Object using this Animation will be impacted by this change. + * + * @method Phaser.Animations.Animation#removeFrame + * @since 3.0.0 + * + * @param {Phaser.Animations.AnimationFrame} frame - The AnimationFrame to be removed. + * + * @return {this} This Animation object. + */ + removeFrame: function (frame) + { + var index = this.frames.indexOf(frame); + + if (index !== -1) + { + this.removeFrameAt(index); + } + + return this; + }, + + /** + * Removes a frame from the AnimationFrame array at the provided index + * and updates the animation accordingly. + * + * @method Phaser.Animations.Animation#removeFrameAt + * @since 3.0.0 + * + * @param {integer} index - The index in the AnimationFrame array + * + * @return {this} This Animation object. + */ + removeFrameAt: function (index) + { + this.frames.splice(index, 1); + + this.updateFrameSequence(); + + return this; + }, + + /** + * Called internally during playback. Forces the animation to repeat, providing there are enough counts left + * in the repeat counter. + * + * @method Phaser.Animations.Animation#repeatAnimation + * @fires Phaser.Animations.Events#ANIMATION_REPEAT + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_REPEAT + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. + */ + repeatAnimation: function (component) + { + if (component._pendingStop === 2) + { + return this.completeAnimation(component); + } + + if (component._repeatDelay > 0 && component.pendingRepeat === false) + { + component.pendingRepeat = true; + component.accumulator -= component.nextTick; + component.nextTick += component._repeatDelay; + } + else + { + component.repeatCounter--; + + component.updateFrame(component.currentFrame[(component.forward) ? 'nextFrame' : 'prevFrame']); + + if (component.isPlaying) + { + this.getNextTick(component); + + component.pendingRepeat = false; + + var frame = component.currentFrame; + var parent = component.parent; + + this.emit(Events.ANIMATION_REPEAT, this, frame); + + parent.emit(Events.SPRITE_ANIMATION_KEY_REPEAT + this.key, this, frame, component.repeatCounter, parent); + + parent.emit(Events.SPRITE_ANIMATION_REPEAT, this, frame, component.repeatCounter, parent); + } + } + }, + + /** + * Sets the texture frame the animation uses for rendering. + * + * @method Phaser.Animations.Animation#setFrame + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. + */ + setFrame: function (component) + { + // Work out which frame should be set next on the child, and set it + if (component.forward) + { + this.nextFrame(component); + } + else + { + this.previousFrame(component); + } + }, + + /** + * Converts the animation data to JSON. + * + * @method Phaser.Animations.Animation#toJSON + * @since 3.0.0 + * + * @return {Phaser.Types.Animations.JSONAnimation} The resulting JSONAnimation formatted object. + */ + toJSON: function () + { + var output = { + 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, + showOnStart: this.showOnStart, + hideOnComplete: this.hideOnComplete + }; + + this.frames.forEach(function (frame) + { + output.frames.push(frame.toJSON()); + }); + + return output; + }, + + /** + * Called internally whenever frames are added to, or removed from, this Animation. + * + * @method Phaser.Animations.Animation#updateFrameSequence + * @since 3.0.0 + * + * @return {this} This Animation object. + */ + updateFrameSequence: function () + { + var len = this.frames.length; + var slice = 1 / (len - 1); + + var frame; + + for (var i = 0; i < len; i++) + { + frame = this.frames[i]; + + frame.index = i + 1; + frame.isFirst = false; + frame.isLast = false; + frame.progress = i * slice; + + if (i === 0) + { + frame.isFirst = true; + + if (len === 1) + { + frame.isLast = true; + frame.nextFrame = frame; + frame.prevFrame = frame; + } + else + { + frame.isLast = false; + frame.prevFrame = this.frames[len - 1]; + frame.nextFrame = this.frames[i + 1]; + } + } + else if (i === len - 1 && len > 1) + { + frame.isLast = true; + frame.prevFrame = this.frames[len - 2]; + frame.nextFrame = this.frames[0]; + } + else if (len > 1) + { + frame.prevFrame = this.frames[i - 1]; + frame.nextFrame = this.frames[i + 1]; + } + } + + return this; + }, + + /** + * Pauses playback of this Animation. The paused state is set immediately. + * + * @method Phaser.Animations.Animation#pause + * @since 3.0.0 + * + * @return {this} This Animation object. + */ + pause: function () + { + this.paused = true; + + return this; + }, + + /** + * Resumes playback of this Animation. The paused state is reset immediately. + * + * @method Phaser.Animations.Animation#resume + * @since 3.0.0 + * + * @return {this} This Animation object. + */ + resume: function () + { + this.paused = false; + + return this; + }, + + /** + * Destroys this Animation instance. It will remove all event listeners, + * remove this animation and its key from the global Animation Manager, + * and then destroy all Animation Frames in turn. + * + * @method Phaser.Animations.Animation#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.removeAllListeners(); + + this.manager.off(Events.PAUSE_ALL, this.pause, this); + this.manager.off(Events.RESUME_ALL, this.resume, this); + + this.manager.remove(this.key); + + for (var i = 0; i < this.frames.length; i++) + { + this.frames[i].destroy(); + } + + this.frames = []; + + this.manager = null; + } + +}); + +module.exports = Animation; + + +/***/ }), +/* 290 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Add Animation Event. + * + * This event is dispatched when a new animation is added to the global Animation Manager. + * + * This can happen either as a result of an animation instance being added to the Animation Manager, + * or the Animation Manager creating a new animation directly. + * + * @event Phaser.Animations.Events#ADD_ANIMATION + * @since 3.0.0 + * + * @param {string} key - The key of the Animation that was added to the global Animation Manager. + * @param {Phaser.Animations.Animation} animation - An instance of the newly created Animation. + */ +module.exports = 'add'; + + +/***/ }), +/* 291 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Complete Event. + * + * This event is dispatched by an Animation instance when it completes, i.e. finishes playing or is manually stopped. + * + * Be careful with the volume of events this could generate. If a group of Sprites all complete the same + * animation at the same time, this event will invoke its handler for each one of them. + * + * @event Phaser.Animations.Events#ANIMATION_COMPLETE + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed. + */ +module.exports = 'complete'; + + +/***/ }), +/* 292 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Repeat Event. + * + * This event is dispatched when a currently playing animation repeats. + * + * The event is dispatched directly from the Animation object itself. Which means that listeners + * bound to this event will be invoked every time the Animation repeats, for every Game Object that may have it. + * + * @event Phaser.Animations.Events#ANIMATION_REPEAT + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that repeated. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation was on when it repeated. + */ +module.exports = 'repeat'; + + +/***/ }), +/* 293 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Restart Event. + * + * This event is dispatched by an Animation instance when it restarts. + * + * Be careful with the volume of events this could generate. If a group of Sprites all restart the same + * animation at the same time, this event will invoke its handler for each one of them. + * + * @event Phaser.Animations.Events#ANIMATION_RESTART + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that restarted playing. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing. + */ +module.exports = 'restart'; + + +/***/ }), +/* 294 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Start Event. + * + * This event is dispatched by an Animation instance when it starts playing. + * + * Be careful with the volume of events this could generate. If a group of Sprites all play the same + * animation at the same time, this event will invoke its handler for each one of them. + * + * @event Phaser.Animations.Events#ANIMATION_START + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that started playing. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing. + */ +module.exports = 'start'; + + +/***/ }), +/* 295 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Pause All Animations Event. + * + * This event is dispatched when the global Animation Manager is told to pause. + * + * When this happens all current animations will stop updating, although it doesn't necessarily mean + * that the game has paused as well. + * + * @event Phaser.Animations.Events#PAUSE_ALL + * @since 3.0.0 + */ +module.exports = 'pauseall'; + + +/***/ }), +/* 296 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Remove Animation Event. + * + * This event is dispatched when an animation is removed from the global Animation Manager. + * + * @event Phaser.Animations.Events#REMOVE_ANIMATION + * @since 3.0.0 + * + * @param {string} key - The key of the Animation that was removed from the global Animation Manager. + * @param {Phaser.Animations.Animation} animation - An instance of the removed Animation. + */ +module.exports = 'remove'; + + +/***/ }), +/* 297 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Resume All Animations Event. + * + * This event is dispatched when the global Animation Manager resumes, having been previously paused. + * + * When this happens all current animations will continue updating again. + * + * @event Phaser.Animations.Events#RESUME_ALL + * @since 3.0.0 + */ +module.exports = 'resumeall'; + + +/***/ }), +/* 298 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Complete Event. + * + * This event is dispatched by a Sprite when an animation finishes playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationcomplete', listener)` + * + * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_COMPLETE` event. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_COMPLETE + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed. + */ +module.exports = 'animationcomplete'; + + +/***/ }), +/* 299 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Key Complete Event. + * + * This event is dispatched by a Sprite when a specific animation finishes playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationcomplete-key', listener)` where `key` is the key of + * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationcomplete-explode`. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_COMPLETE + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed. + */ +module.exports = 'animationcomplete-'; + + +/***/ }), +/* 300 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Key Repeat Event. + * + * This event is dispatched by a Sprite when a specific animation repeats playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationrepeat-key', listener)` where `key` is the key of + * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrepeat-explode`. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. + * @param {integer} repeatCount - The number of times the Animation has repeated so far. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing. + */ +module.exports = 'animationrepeat-'; + + +/***/ }), +/* 301 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Key Restart Event. + * + * This event is dispatched by a Sprite when a specific animation restarts playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationrestart-key', listener)` where `key` is the key of + * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrestart-explode`. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing. + */ +module.exports = 'animationrestart-'; + + +/***/ }), +/* 302 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Key Start Event. + * + * This event is dispatched by a Sprite when a specific animation starts playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationstart-key', listener)` where `key` is the key of + * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationstart-explode`. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing. + */ +module.exports = 'animationstart-'; + + +/***/ }), +/* 303 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Key Update Event. + * + * This event is dispatched by a Sprite when a specific animation playing on it updates. This happens when the animation changes frame, + * based on the animation frame rate and other factors like `timeScale` and `delay`. + * + * Listen for it on the Sprite using `sprite.on('animationupdate-key', listener)` where `key` is the key of + * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationupdate-explode`. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated. + */ +module.exports = 'animationupdate-'; + + +/***/ }), +/* 304 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Repeat Event. + * + * This event is dispatched by a Sprite when an animation repeats playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationrepeat', listener)` + * + * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_REPEAT` event. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_REPEAT + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. + * @param {integer} repeatCount - The number of times the Animation has repeated so far. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing. + */ +module.exports = 'animationrepeat'; + + +/***/ }), +/* 305 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Restart Event. + * + * This event is dispatched by a Sprite when an animation restarts playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationrestart', listener)` + * + * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_RESTART` event. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_RESTART + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing. + */ +module.exports = 'animationrestart'; + + +/***/ }), +/* 306 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Start Event. + * + * This event is dispatched by a Sprite when an animation starts playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationstart', listener)` + * + * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_START` event. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_START + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing. + */ +module.exports = 'animationstart'; + + +/***/ }), +/* 307 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Update Event. + * + * This event is dispatched by a Sprite when an animation playing on it updates. This happens when the animation changes frame, + * based on the animation frame rate and other factors like `timeScale` and `delay`. + * + * Listen for it on the Sprite using `sprite.on('animationupdate', listener)` + * + * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_UPDATE` event. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated. + */ +module.exports = 'animationupdate'; + + +/***/ }), +/* 308 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); + +/** + * @classdesc + * A single frame in an Animation sequence. + * + * An AnimationFrame consists of a reference to the Texture it uses for rendering, references to other + * frames in the animation, and index data. It also has the ability to modify the animation timing. + * + * AnimationFrames are generated automatically by the Animation class. + * + * @class AnimationFrame + * @memberof Phaser.Animations + * @constructor + * @since 3.0.0 + * + * @param {string} textureKey - The key of the Texture this AnimationFrame uses. + * @param {(string|integer)} textureFrame - The key of the Frame within the Texture that this AnimationFrame uses. + * @param {integer} index - The index of this AnimationFrame within the Animation sequence. + * @param {Phaser.Textures.Frame} frame - A reference to the Texture Frame this AnimationFrame uses for rendering. + */ +var AnimationFrame = new Class({ + + initialize: + + function AnimationFrame (textureKey, textureFrame, index, frame) + { + /** + * The key of the Texture this AnimationFrame uses. + * + * @name Phaser.Animations.AnimationFrame#textureKey + * @type {string} + * @since 3.0.0 + */ + this.textureKey = textureKey; + + /** + * The key of the Frame within the Texture that this AnimationFrame uses. + * + * @name Phaser.Animations.AnimationFrame#textureFrame + * @type {(string|integer)} + * @since 3.0.0 + */ + this.textureFrame = textureFrame; + + /** + * The index of this AnimationFrame within the Animation sequence. + * + * @name Phaser.Animations.AnimationFrame#index + * @type {integer} + * @since 3.0.0 + */ + this.index = index; + + /** + * A reference to the Texture Frame this AnimationFrame uses for rendering. + * + * @name Phaser.Animations.AnimationFrame#frame + * @type {Phaser.Textures.Frame} + * @since 3.0.0 + */ + this.frame = frame; + + /** + * Is this the first frame in an animation sequence? + * + * @name Phaser.Animations.AnimationFrame#isFirst + * @type {boolean} + * @default false + * @readonly + * @since 3.0.0 + */ + this.isFirst = false; + + /** + * Is this the last frame in an animation sequence? + * + * @name Phaser.Animations.AnimationFrame#isLast + * @type {boolean} + * @default false + * @readonly + * @since 3.0.0 + */ + this.isLast = false; + + /** + * A reference to the AnimationFrame that comes before this one in the animation, if any. + * + * @name Phaser.Animations.AnimationFrame#prevFrame + * @type {?Phaser.Animations.AnimationFrame} + * @default null + * @readonly + * @since 3.0.0 + */ + this.prevFrame = null; + + /** + * A reference to the AnimationFrame that comes after this one in the animation, if any. + * + * @name Phaser.Animations.AnimationFrame#nextFrame + * @type {?Phaser.Animations.AnimationFrame} + * @default null + * @readonly + * @since 3.0.0 + */ + this.nextFrame = null; + + /** + * Additional time (in ms) that this frame should appear for during playback. + * The value is added onto the msPerFrame set by the animation. + * + * @name Phaser.Animations.AnimationFrame#duration + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.duration = 0; + + /** + * What % through the animation does this frame come? + * This value is generated when the animation is created and cached here. + * + * @name Phaser.Animations.AnimationFrame#progress + * @type {number} + * @default 0 + * @readonly + * @since 3.0.0 + */ + this.progress = 0; + }, + + /** + * Generates a JavaScript object suitable for converting to JSON. + * + * @method Phaser.Animations.AnimationFrame#toJSON + * @since 3.0.0 + * + * @return {Phaser.Types.Animations.JSONAnimationFrame} The AnimationFrame data. + */ + toJSON: function () + { + return { + key: this.textureKey, + frame: this.textureFrame, + duration: this.duration + }; + }, + + /** + * Destroys this object by removing references to external resources and callbacks. + * + * @method Phaser.Animations.AnimationFrame#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.frame = undefined; + } + +}); + +module.exports = AnimationFrame; + + +/***/ }), +/* 309 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var BlendModes = __webpack_require__(16); + +/** + * Provides methods used for setting the blend mode of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.BlendMode + * @since 3.0.0 + */ + +var BlendMode = { + + /** + * Private internal value. Holds the current blend mode. + * + * @name Phaser.GameObjects.Components.BlendMode#_blendMode + * @type {integer} + * @private + * @default 0 + * @since 3.0.0 + */ + _blendMode: BlendModes.NORMAL, + + /** + * 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: + * + * * 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. + * + * @name Phaser.GameObjects.Components.BlendMode#blendMode + * @type {(Phaser.BlendModes|string)} + * @since 3.0.0 + */ + blendMode: { + + get: function () + { + return this._blendMode; + }, + + set: function (value) + { + if (typeof value === 'string') + { + value = BlendModes[value]; + } + + value |= 0; + + if (value >= -1) + { + this._blendMode = value; + } + } + + }, + + /** + * 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: + * + * * 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. + * + * @method Phaser.GameObjects.Components.BlendMode#setBlendMode + * @since 3.0.0 + * + * @param {(string|Phaser.BlendModes)} value - The BlendMode value. Either a string or a CONST. + * + * @return {this} This Game Object instance. + */ + setBlendMode: function (value) + { + this.blendMode = value; + + return this; + } + +}; + +module.exports = BlendMode; + + +/***/ }), +/* 310 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for getting and setting the texture of a Game Object. + * + * @namespace Phaser.GameObjects.Components.Crop + * @since 3.12.0 + */ + +var Crop = { + + /** + * The Texture this Game Object is using to render with. + * + * @name Phaser.GameObjects.Components.Crop#texture + * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture} + * @since 3.0.0 + */ + texture: null, + + /** + * The Texture Frame this Game Object is using to render with. + * + * @name Phaser.GameObjects.Components.Crop#frame + * @type {Phaser.Textures.Frame} + * @since 3.0.0 + */ + frame: null, + + /** + * A boolean flag indicating if this Game Object is being cropped or not. + * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off. + * Equally, calling `setCrop` with no arguments will reset the crop and disable it. + * + * @name Phaser.GameObjects.Components.Crop#isCropped + * @type {boolean} + * @since 3.11.0 + */ + isCropped: false, + + /** + * Applies a crop to a texture based Game Object, such as a Sprite or Image. + * + * The crop is a rectangle that limits the area of the texture frame that is visible during rendering. + * + * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just + * changes what is shown when rendered. + * + * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left. + * + * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left + * half of it, you could call `setCrop(0, 0, 400, 600)`. + * + * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop + * an area of 200x100 when applied to a Game Object that had a scale factor of 2. + * + * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument. + * + * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`. + * + * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow + * the renderer to skip several internal calculations. + * + * @method Phaser.GameObjects.Components.Crop#setCrop + * @since 3.11.0 + * + * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored. + * @param {number} [y] - The y coordinate to start the crop from. + * @param {number} [width] - The width of the crop rectangle in pixels. + * @param {number} [height] - The height of the crop rectangle in pixels. + * + * @return {this} This Game Object instance. + */ + setCrop: function (x, y, width, height) + { + if (x === undefined) + { + this.isCropped = false; + } + else if (this.frame) + { + if (typeof x === 'number') + { + this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY); + } + else + { + var rect = x; + + this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY); + } + + this.isCropped = true; + } + + return this; + }, + + /** + * Internal method that returns a blank, well-formed crop object for use by a Game Object. + * + * @method Phaser.GameObjects.Components.Crop#resetCropObject + * @private + * @since 3.12.0 + * + * @return {object} The crop object. + */ + resetCropObject: function () + { + return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 }; + } + +}; + +module.exports = Crop; + + +/***/ }), +/* 311 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Rectangle = __webpack_require__(24); +var RotateAround = __webpack_require__(38); +var Vector2 = __webpack_require__(1); + +/** + * Provides methods used for obtaining the bounds of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.GetBounds + * @since 3.0.0 + */ + +var GetBounds = { + + /** + * Processes the bounds output vector before returning it. + * + * @method Phaser.GameObjects.Components.GetBounds#prepareBoundsOutput + * @private + * @since 3.18.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} output - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + prepareBoundsOutput: function (output, includeParent) + { + if (includeParent === undefined) { includeParent = false; } + + if (this.rotation !== 0) + { + RotateAround(output, this.x, this.y, this.rotation); + } + + if (includeParent && this.parentContainer) + { + var parentMatrix = this.parentContainer.getBoundsTransformMatrix(); + + parentMatrix.transformPoint(output.x, output.y, output); + } + + return output; + }, + + /** + * Gets the center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getCenter + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getCenter: function (output) + { + if (output === undefined) { output = new Vector2(); } + + output.x = this.x - (this.displayWidth * this.originX) + (this.displayWidth / 2); + output.y = this.y - (this.displayHeight * this.originY) + (this.displayHeight / 2); + + return output; + }, + + /** + * Gets the top-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getTopLeft + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getTopLeft: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = this.x - (this.displayWidth * this.originX); + output.y = this.y - (this.displayHeight * this.originY); + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the top-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getTopCenter + * @since 3.18.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getTopCenter: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2); + output.y = this.y - (this.displayHeight * this.originY); + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the top-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getTopRight + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getTopRight: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth; + output.y = this.y - (this.displayHeight * this.originY); + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the left-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getLeftCenter + * @since 3.18.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getLeftCenter: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = this.x - (this.displayWidth * this.originX); + output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2); + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the right-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getRightCenter + * @since 3.18.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getRightCenter: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth; + output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2); + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the bottom-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getBottomLeft + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getBottomLeft: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = this.x - (this.displayWidth * this.originX); + output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight; + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the bottom-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getBottomCenter + * @since 3.18.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getBottomCenter: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2); + output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight; + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the bottom-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getBottomRight + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getBottomRight: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth; + output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight; + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the bounds of this Game Object, regardless of origin. + * The values are stored and returned in a Rectangle, or Rectangle-like, object. + * + * @method Phaser.GameObjects.Components.GetBounds#getBounds + * @since 3.0.0 + * + * @generic {Phaser.Geom.Rectangle} O - [output,$return] + * + * @param {(Phaser.Geom.Rectangle|object)} [output] - An object to store the values in. If not provided a new Rectangle will be created. + * + * @return {(Phaser.Geom.Rectangle|object)} The values stored in the output object. + */ + getBounds: function (output) + { + if (output === undefined) { output = new Rectangle(); } + + // We can use the output object to temporarily store the x/y coords in: + + var TLx, TLy, TRx, TRy, BLx, BLy, BRx, BRy; + + // Instead of doing a check if parent container is + // defined per corner we only do it once. + if (this.parentContainer) + { + var parentMatrix = this.parentContainer.getBoundsTransformMatrix(); + + this.getTopLeft(output); + parentMatrix.transformPoint(output.x, output.y, output); + + TLx = output.x; + TLy = output.y; + + this.getTopRight(output); + parentMatrix.transformPoint(output.x, output.y, output); + + TRx = output.x; + TRy = output.y; + + this.getBottomLeft(output); + parentMatrix.transformPoint(output.x, output.y, output); + + BLx = output.x; + BLy = output.y; + + this.getBottomRight(output); + parentMatrix.transformPoint(output.x, output.y, output); + + BRx = output.x; + BRy = output.y; + } + else + { + this.getTopLeft(output); + + TLx = output.x; + TLy = output.y; + + this.getTopRight(output); + + TRx = output.x; + TRy = output.y; + + this.getBottomLeft(output); + + BLx = output.x; + BLy = output.y; + + this.getBottomRight(output); + + BRx = output.x; + BRy = output.y; + } + + output.x = Math.min(TLx, TRx, BLx, BRx); + output.y = Math.min(TLy, TRy, BLy, BRy); + output.width = Math.max(TLx, TRx, BLx, BRx) - output.x; + output.height = Math.max(TLy, TRy, BLy, BRy) - output.y; + + return output; + } + +}; + +module.exports = GetBounds; + + +/***/ }), +/* 312 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Checks if a given point is inside a Rectangle's bounds. + * + * @function Phaser.Geom.Rectangle.Contains + * @since 3.0.0 + * + * @param {Phaser.Geom.Rectangle} rect - The Rectangle to check. + * @param {number} x - The X coordinate of the point to check. + * @param {number} y - The Y coordinate of the point to check. + * + * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`. + */ +var Contains = function (rect, x, y) +{ + if (rect.width <= 0 || rect.height <= 0) + { + return false; + } + + return (rect.x <= x && rect.x + rect.width >= x && rect.y <= y && rect.y + rect.height >= y); +}; + +module.exports = Contains; + + +/***/ }), +/* 313 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetPoint = __webpack_require__(60); +var Perimeter = __webpack_require__(61); + +// 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. + * + * @function Phaser.Geom.Rectangle.GetPoints + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point[]} O - [out,$return] + * + * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle object to get the points from. + * @param {number} step - Step between points. Used to calculate the number of points to return when quantity is falsey. Ignored if quantity is positive. + * @param {integer} quantity - The number of evenly spaced points from the rectangles perimeter to return. If falsey, step param will be used to calculate the number of points. + * @param {(array|Phaser.Geom.Point[])} [out] - An optional array to store the points in. + * + * @return {(array|Phaser.Geom.Point[])} An array of Points from the perimeter of the rectangle. + */ +var GetPoints = function (rectangle, quantity, stepRate, out) +{ + if (out === undefined) { out = []; } + + // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. + if (!quantity && stepRate > 0) + { + quantity = Perimeter(rectangle) / stepRate; + } + + for (var i = 0; i < quantity; i++) + { + var position = i / quantity; + + out.push(GetPoint(rectangle, position)); + } + + return out; +}; + +module.exports = GetPoints; + + +/***/ }), +/* 314 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var GetPoint = __webpack_require__(315); +var GetPoints = __webpack_require__(316); +var GEOM_CONST = __webpack_require__(25); +var Random = __webpack_require__(318); +var Vector2 = __webpack_require__(1); + +/** + * @classdesc + * Defines a Line segment, a part of a line between two endpoints. + * + * @class Line + * @memberof Phaser.Geom + * @constructor + * @since 3.0.0 + * + * @param {number} [x1=0] - The x coordinate of the lines starting point. + * @param {number} [y1=0] - The y coordinate of the lines starting point. + * @param {number} [x2=0] - The x coordinate of the lines ending point. + * @param {number} [y2=0] - The y coordinate of the lines ending point. + */ +var Line = new Class({ + + initialize: + + function Line (x1, y1, x2, y2) + { + if (x1 === undefined) { x1 = 0; } + if (y1 === undefined) { y1 = 0; } + if (x2 === undefined) { x2 = 0; } + if (y2 === undefined) { y2 = 0; } + + /** + * The geometry constant type of this object: `GEOM_CONST.LINE`. + * Used for fast type comparisons. + * + * @name Phaser.Geom.Line#type + * @type {integer} + * @readonly + * @since 3.19.0 + */ + this.type = GEOM_CONST.LINE; + + /** + * The x coordinate of the lines starting point. + * + * @name Phaser.Geom.Line#x1 + * @type {number} + * @since 3.0.0 + */ + this.x1 = x1; + + /** + * The y coordinate of the lines starting point. + * + * @name Phaser.Geom.Line#y1 + * @type {number} + * @since 3.0.0 + */ + this.y1 = y1; + + /** + * The x coordinate of the lines ending point. + * + * @name Phaser.Geom.Line#x2 + * @type {number} + * @since 3.0.0 + */ + this.x2 = x2; + + /** + * The y coordinate of the lines ending point. + * + * @name Phaser.Geom.Line#y2 + * @type {number} + * @since 3.0.0 + */ + this.y2 = y2; + }, + + /** + * Get a point on a line that's a given percentage along its length. + * + * @method Phaser.Geom.Line#getPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [output,$return] + * + * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line. + * @param {(Phaser.Geom.Point|object)} [output] - An optional point, or point-like object, to store the coordinates of the point on the line. + * + * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point on the line. + */ + getPoint: function (position, output) + { + return GetPoint(this, position, output); + }, + + /** + * Get a number of points along a line's length. + * + * Provide a `quantity` to get an exact number of points along the line. + * + * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when + * providing a `stepRate`. + * + * @method Phaser.Geom.Line#getPoints + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point[]} O - [output,$return] + * + * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead. + * @param {integer} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`. + * @param {(array|Phaser.Geom.Point[])} [output] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line. + * + * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line. + */ + getPoints: function (quantity, stepRate, output) + { + return GetPoints(this, quantity, stepRate, output); + }, + + /** + * Get a random Point on the Line. + * + * @method Phaser.Geom.Line#getRandomPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [point,$return] + * + * @param {(Phaser.Geom.Point|object)} [point] - An instance of a Point to be modified. + * + * @return {Phaser.Geom.Point} A random Point on the Line. + */ + getRandomPoint: function (point) + { + return Random(this, point); + }, + + /** + * Set new coordinates for the line endpoints. + * + * @method Phaser.Geom.Line#setTo + * @since 3.0.0 + * + * @param {number} [x1=0] - The x coordinate of the lines starting point. + * @param {number} [y1=0] - The y coordinate of the lines starting point. + * @param {number} [x2=0] - The x coordinate of the lines ending point. + * @param {number} [y2=0] - The y coordinate of the lines ending point. + * + * @return {this} This Line object. + */ + setTo: function (x1, y1, x2, y2) + { + if (x1 === undefined) { x1 = 0; } + if (y1 === undefined) { y1 = 0; } + if (x2 === undefined) { x2 = 0; } + if (y2 === undefined) { y2 = 0; } + + this.x1 = x1; + this.y1 = y1; + + this.x2 = x2; + this.y2 = y2; + + return this; + }, + + /** + * Returns a Vector2 object that corresponds to the start of this Line. + * + * @method Phaser.Geom.Line#getPointA + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [vec2,$return] + * + * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created. + * + * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the start of this Line. + */ + getPointA: function (vec2) + { + if (vec2 === undefined) { vec2 = new Vector2(); } + + vec2.set(this.x1, this.y1); + + return vec2; + }, + + /** + * Returns a Vector2 object that corresponds to the end of this Line. + * + * @method Phaser.Geom.Line#getPointB + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [vec2,$return] + * + * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created. + * + * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the end of this Line. + */ + getPointB: function (vec2) + { + if (vec2 === undefined) { vec2 = new Vector2(); } + + vec2.set(this.x2, this.y2); + + return vec2; + }, + + /** + * The left position of the Line. + * + * @name Phaser.Geom.Line#left + * @type {number} + * @since 3.0.0 + */ + left: { + + get: function () + { + return Math.min(this.x1, this.x2); + }, + + set: function (value) + { + if (this.x1 <= this.x2) + { + this.x1 = value; + } + else + { + this.x2 = value; + } + } + + }, + + /** + * The right position of the Line. + * + * @name Phaser.Geom.Line#right + * @type {number} + * @since 3.0.0 + */ + right: { + + get: function () + { + return Math.max(this.x1, this.x2); + }, + + set: function (value) + { + if (this.x1 > this.x2) + { + this.x1 = value; + } + else + { + this.x2 = value; + } + } + + }, + + /** + * The top position of the Line. + * + * @name Phaser.Geom.Line#top + * @type {number} + * @since 3.0.0 + */ + top: { + + get: function () + { + return Math.min(this.y1, this.y2); + }, + + set: function (value) + { + if (this.y1 <= this.y2) + { + this.y1 = value; + } + else + { + this.y2 = value; + } + } + + }, + + /** + * The bottom position of the Line. + * + * @name Phaser.Geom.Line#bottom + * @type {number} + * @since 3.0.0 + */ + bottom: { + + get: function () + { + return Math.max(this.y1, this.y2); + }, + + set: function (value) + { + if (this.y1 > this.y2) + { + this.y1 = value; + } + else + { + this.y2 = value; + } + } + + } + +}); + +module.exports = Line; + + +/***/ }), +/* 315 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Point = __webpack_require__(10); + +/** + * Get a point on a line that's a given percentage along its length. + * + * @function Phaser.Geom.Line.GetPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [out,$return] + * + * @param {Phaser.Geom.Line} line - The line. + * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line. + * @param {(Phaser.Geom.Point|object)} [out] - An optional point, or point-like object, to store the coordinates of the point on the line. + * + * @return {(Phaser.Geom.Point|object)} The point on the line. + */ +var GetPoint = function (line, position, out) +{ + if (out === undefined) { out = new Point(); } + + out.x = line.x1 + (line.x2 - line.x1) * position; + out.y = line.y1 + (line.y2 - line.y1) * position; + + return out; +}; + +module.exports = GetPoint; + + +/***/ }), +/* 316 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Length = __webpack_require__(317); +var Point = __webpack_require__(10); + +/** + * Get a number of points along a line's length. + * + * Provide a `quantity` to get an exact number of points along the line. + * + * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when + * providing a `stepRate`. + * + * @function Phaser.Geom.Line.GetPoints + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point[]} O - [out,$return] + * + * @param {Phaser.Geom.Line} line - The line. + * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead. + * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`. + * @param {(array|Phaser.Geom.Point[])} [out] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line. + * + * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line. + */ +var GetPoints = function (line, quantity, stepRate, out) +{ + if (out === undefined) { out = []; } + + // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. + if (!quantity && stepRate > 0) + { + quantity = Length(line) / stepRate; + } + + var x1 = line.x1; + var y1 = line.y1; + + var x2 = line.x2; + var y2 = line.y2; + + for (var i = 0; i < quantity; i++) + { + var position = i / quantity; + + var x = x1 + (x2 - x1) * position; + var y = y1 + (y2 - y1) * position; + + out.push(new Point(x, y)); + } + + return out; +}; + +module.exports = GetPoints; + + +/***/ }), +/* 317 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the length of the given line. + * + * @function Phaser.Geom.Line.Length + * @since 3.0.0 + * + * @param {Phaser.Geom.Line} line - The line to calculate the length of. + * + * @return {number} The length of the line. + */ +var Length = function (line) +{ + return Math.sqrt((line.x2 - line.x1) * (line.x2 - line.x1) + (line.y2 - line.y1) * (line.y2 - line.y1)); +}; + +module.exports = Length; + + +/***/ }), +/* 318 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Point = __webpack_require__(10); + +/** + * Returns a random point on a given Line. + * + * @function Phaser.Geom.Line.Random + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [out,$return] + * + * @param {Phaser.Geom.Line} line - The Line to calculate the random Point on. + * @param {(Phaser.Geom.Point|object)} [out] - An instance of a Point to be modified. + * + * @return {(Phaser.Geom.Point|object)} A random Point on the Line. + */ +var Random = function (line, out) +{ + if (out === undefined) { out = new Point(); } + + var t = Math.random(); + + out.x = line.x1 + t * (line.x2 - line.x1); + out.y = line.y1 + t * (line.y2 - line.y1); + + return out; +}; + +module.exports = Random; + + +/***/ }), +/* 319 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Point = __webpack_require__(10); + +/** + * Returns a random point within a Rectangle. + * + * @function Phaser.Geom.Rectangle.Random + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [out,$return] + * + * @param {Phaser.Geom.Rectangle} rect - The Rectangle to return a point from. + * @param {Phaser.Geom.Point} out - The object to update with the point's coordinates. + * + * @return {Phaser.Geom.Point} The modified `out` object, or a new Point if none was provided. + */ +var Random = function (rect, out) +{ + if (out === undefined) { out = new Point(); } + + out.x = rect.x + (Math.random() * rect.width); + out.y = rect.y + (Math.random() * rect.height); + + return out; +}; + +module.exports = Random; + + +/***/ }), +/* 320 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var BitmapMask = __webpack_require__(321); +var GeometryMask = __webpack_require__(339); + +/** + * Provides methods used for getting and setting the mask of a Game Object. + * + * @namespace Phaser.GameObjects.Components.Mask + * @since 3.0.0 + */ + +var Mask = { + + /** + * The Mask this Game Object is using during render. + * + * @name Phaser.GameObjects.Components.Mask#mask + * @type {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask} + * @since 3.0.0 + */ + mask: null, + + /** + * 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. + * + * 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. + * + * 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. + * + * @method Phaser.GameObjects.Components.Mask#setMask + * @since 3.6.2 + * + * @param {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask} mask - The mask this Game Object will use when rendering. + * + * @return {this} This Game Object instance. + */ + setMask: function (mask) + { + this.mask = mask; + + return this; + }, + + /** + * Clears the mask that this Game Object was using. + * + * @method Phaser.GameObjects.Components.Mask#clearMask + * @since 3.6.2 + * + * @param {boolean} [destroyMask=false] - Destroy the mask before clearing it? + * + * @return {this} This Game Object instance. + */ + clearMask: function (destroyMask) + { + if (destroyMask === undefined) { destroyMask = false; } + + if (destroyMask && this.mask) + { + this.mask.destroy(); + } + + this.mask = null; + + return this; + }, + + /** + * Creates and returns a Bitmap 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 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 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 Game Object. + * + * @method Phaser.GameObjects.Components.Mask#createBitmapMask + * @since 3.6.2 + * + * @param {Phaser.GameObjects.GameObject} [renderable] - A renderable Game Object that uses a texture, such as a Sprite. + * + * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created. + */ + createBitmapMask: function (renderable) + { + if (renderable === undefined && (this.texture || this.shader)) + { + // eslint-disable-next-line consistent-this + renderable = this; + } + + return new BitmapMask(this.scene, renderable); + }, + + /** + * 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. + * + * This means you can call this method to create a Geometry Mask from any Graphics Game Object. + * + * @method Phaser.GameObjects.Components.Mask#createGeometryMask + * @since 3.6.2 + * + * @param {Phaser.GameObjects.Graphics} [graphics] - A Graphics Game Object. The geometry within it will be used as the mask. + * + * @return {Phaser.Display.Masks.GeometryMask} This Geometry Mask that was created. + */ + createGeometryMask: function (graphics) + { + if (graphics === undefined && this.type === 'Graphics') + { + // eslint-disable-next-line consistent-this + graphics = this; + } + + return new GeometryMask(this.scene, graphics); + } + +}; + +module.exports = Mask; + + +/***/ }), +/* 321 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var GameEvents = __webpack_require__(322); + +/** + * @classdesc + * A Bitmap Mask combines the alpha (opacity) of a masked pixel with the alpha of another pixel. + * Unlike the Geometry Mask, which is a clipping path, a Bitmap Mask behaves like an alpha mask, + * not a clipping path. It is only available when using the WebGL Renderer. + * + * A Bitmap Mask can use any Game Object to determine the alpha of each pixel of the masked Game Object(s). + * For any given point of a masked Game Object's texture, the pixel's alpha will be multiplied by the alpha + * of the pixel at the same position in the Bitmap Mask's Game Object. The color of the pixel from the + * Bitmap Mask doesn't matter. + * + * For example, if a pure blue pixel with an alpha of 0.95 is masked with a pure red pixel with an + * alpha of 0.5, the resulting pixel will be pure blue with an alpha of 0.475. Naturally, this means + * that a pixel in the mask with an alpha of 0 will hide the corresponding pixel in all masked Game Objects + * A pixel with an alpha of 1 in the masked Game Object will receive the same alpha as the + * corresponding pixel in the mask. + * + * The Bitmap Mask's location matches the location of its Game Object, not the location of the + * masked objects. Moving or transforming the underlying Game Object will change the mask + * (and affect the visibility of any masked objects), whereas moving or transforming a masked object + * will not affect the mask. + * + * The Bitmap Mask will not render its Game Object by itself. If the Game Object is not in a + * Scene's display list, it will only be used for the mask and its full texture will not be directly + * visible. Adding the underlying Game Object to a Scene will not cause any problems - it will + * render as a normal Game Object and will also serve as a mask. + * + * @class BitmapMask + * @memberof Phaser.Display.Masks + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - The Scene which this Bitmap Mask will be used in. + * @param {Phaser.GameObjects.GameObject} renderable - A renderable Game Object that uses a texture, such as a Sprite. + */ +var BitmapMask = new Class({ + + initialize: + + function BitmapMask (scene, renderable) + { + var renderer = scene.sys.game.renderer; + + /** + * A reference to either the Canvas or WebGL Renderer that this Mask is using. + * + * @name Phaser.Display.Masks.BitmapMask#renderer + * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} + * @since 3.11.0 + */ + this.renderer = renderer; + + /** + * A renderable Game Object that uses a texture, such as a Sprite. + * + * @name Phaser.Display.Masks.BitmapMask#bitmapMask + * @type {Phaser.GameObjects.GameObject} + * @since 3.0.0 + */ + this.bitmapMask = renderable; + + /** + * The texture used for the mask's framebuffer. + * + * @name Phaser.Display.Masks.BitmapMask#maskTexture + * @type {WebGLTexture} + * @default null + * @since 3.0.0 + */ + this.maskTexture = null; + + /** + * The texture used for the main framebuffer. + * + * @name Phaser.Display.Masks.BitmapMask#mainTexture + * @type {WebGLTexture} + * @default null + * @since 3.0.0 + */ + this.mainTexture = null; + + /** + * Whether the Bitmap Mask is dirty and needs to be updated. + * + * @name Phaser.Display.Masks.BitmapMask#dirty + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.dirty = true; + + /** + * The framebuffer to which a masked Game Object is rendered. + * + * @name Phaser.Display.Masks.BitmapMask#mainFramebuffer + * @type {WebGLFramebuffer} + * @since 3.0.0 + */ + this.mainFramebuffer = null; + + /** + * The framebuffer to which the Bitmap Mask's masking Game Object is rendered. + * + * @name Phaser.Display.Masks.BitmapMask#maskFramebuffer + * @type {WebGLFramebuffer} + * @since 3.0.0 + */ + this.maskFramebuffer = null; + + /** + * The previous framebuffer set in the renderer before this one was enabled. + * + * @name Phaser.Display.Masks.BitmapMask#prevFramebuffer + * @type {WebGLFramebuffer} + * @since 3.17.0 + */ + this.prevFramebuffer = null; + + /** + * Whether to invert the masks alpha. + * + * If `true`, the alpha of the masking pixel will be inverted before it's multiplied with the masked pixel. Essentially, this means that a masked area will be visible only if the corresponding area in the mask is invisible. + * + * @name Phaser.Display.Masks.BitmapMask#invertAlpha + * @type {boolean} + * @since 3.1.2 + */ + this.invertAlpha = false; + + /** + * Is this mask a stencil mask? + * + * @name Phaser.Display.Masks.BitmapMask#isStencil + * @type {boolean} + * @readonly + * @since 3.17.0 + */ + this.isStencil = false; + + if (renderer && renderer.gl) + { + var width = renderer.width; + var height = renderer.height; + var pot = ((width & (width - 1)) === 0 && (height & (height - 1)) === 0); + var gl = renderer.gl; + var wrap = pot ? gl.REPEAT : gl.CLAMP_TO_EDGE; + var filter = gl.LINEAR; + + this.mainTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height); + this.maskTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height); + this.mainFramebuffer = renderer.createFramebuffer(width, height, this.mainTexture, true); + this.maskFramebuffer = renderer.createFramebuffer(width, height, this.maskTexture, true); + + scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, function (renderer) + { + var width = renderer.width; + var height = renderer.height; + var pot = ((width & (width - 1)) === 0 && (height & (height - 1)) === 0); + var gl = renderer.gl; + var wrap = pot ? gl.REPEAT : gl.CLAMP_TO_EDGE; + var filter = gl.LINEAR; + + this.mainTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height); + this.maskTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height); + this.mainFramebuffer = renderer.createFramebuffer(width, height, this.mainTexture, true); + this.maskFramebuffer = renderer.createFramebuffer(width, height, this.maskTexture, true); + + }, this); + } + }, + + /** + * Sets a new masking Game Object for the Bitmap Mask. + * + * @method Phaser.Display.Masks.BitmapMask#setBitmap + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} renderable - A renderable Game Object that uses a texture, such as a Sprite. + */ + setBitmap: function (renderable) + { + this.bitmapMask = renderable; + }, + + /** + * Prepares the WebGL Renderer to render a Game Object with this mask applied. + * + * This renders the masking Game Object to the mask framebuffer and switches to the main framebuffer so that the masked Game Object will be rendered to it instead of being rendered directly to the frame. + * + * @method Phaser.Display.Masks.BitmapMask#preRenderWebGL + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to prepare. + * @param {Phaser.GameObjects.GameObject} maskedObject - The masked Game Object which will be drawn. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to. + */ + preRenderWebGL: function (renderer, maskedObject, camera) + { + renderer.pipelines.BitmapMaskPipeline.beginMask(this, maskedObject, camera); + }, + + /** + * Finalizes rendering of a masked Game Object. + * + * This resets the previously bound framebuffer and switches the WebGL Renderer to the Bitmap Mask Pipeline, which uses a special fragment shader to apply the masking effect. + * + * @method Phaser.Display.Masks.BitmapMask#postRenderWebGL + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to clean up. + */ + postRenderWebGL: function (renderer, camera) + { + renderer.pipelines.BitmapMaskPipeline.endMask(this, camera); + }, + + /** + * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer. + * + * @method Phaser.Display.Masks.BitmapMask#preRenderCanvas + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to. + * @param {Phaser.GameObjects.GameObject} mask - The masked Game Object which would be rendered. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to. + */ + preRenderCanvas: function () + { + // NOOP + }, + + /** + * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer. + * + * @method Phaser.Display.Masks.BitmapMask#postRenderCanvas + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to. + */ + postRenderCanvas: function () + { + // NOOP + }, + + /** + * Destroys this BitmapMask and nulls any references it holds. + * + * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it, + * so be sure to call `clearMask` on any Game Object using it, before destroying it. + * + * @method Phaser.Display.Masks.BitmapMask#destroy + * @since 3.7.0 + */ + destroy: function () + { + this.bitmapMask = null; + + var renderer = this.renderer; + + if (renderer && renderer.gl) + { + renderer.deleteTexture(this.mainTexture); + renderer.deleteTexture(this.maskTexture); + renderer.deleteFramebuffer(this.mainFramebuffer); + renderer.deleteFramebuffer(this.maskFramebuffer); + } + + this.mainTexture = null; + this.maskTexture = null; + this.mainFramebuffer = null; + this.maskFramebuffer = null; + this.prevFramebuffer = null; + this.renderer = null; + } + +}); + +module.exports = BitmapMask; + + +/***/ }), +/* 322 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Core.Events + */ + +module.exports = { + + BLUR: __webpack_require__(323), + BOOT: __webpack_require__(324), + CONTEXT_LOST: __webpack_require__(325), + CONTEXT_RESTORED: __webpack_require__(326), + DESTROY: __webpack_require__(327), + FOCUS: __webpack_require__(328), + HIDDEN: __webpack_require__(329), + PAUSE: __webpack_require__(330), + POST_RENDER: __webpack_require__(331), + POST_STEP: __webpack_require__(332), + PRE_RENDER: __webpack_require__(333), + PRE_STEP: __webpack_require__(334), + READY: __webpack_require__(335), + RESUME: __webpack_require__(336), + STEP: __webpack_require__(337), + VISIBLE: __webpack_require__(338) + +}; + + +/***/ }), +/* 323 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Blur Event. + * + * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded + * enters a blurred state. The blur event is raised when the window loses focus. This can happen if a user swaps + * tab, or if they simply remove focus from the browser to another app. + * + * @event Phaser.Core.Events#BLUR + * @since 3.0.0 + */ +module.exports = 'blur'; + + +/***/ }), +/* 324 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Boot Event. + * + * This event is dispatched when the Phaser Game instance has finished booting, but before it is ready to start running. + * The global systems use this event to know when to set themselves up, dispatching their own `ready` events as required. + * + * @event Phaser.Core.Events#BOOT + * @since 3.0.0 + */ +module.exports = 'boot'; + + +/***/ }), +/* 325 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Context Lost Event. + * + * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Lost event from the browser. + * + * The partner event is `CONTEXT_RESTORED`. + * + * @event Phaser.Core.Events#CONTEXT_LOST + * @since 3.19.0 + */ +module.exports = 'contextlost'; + + +/***/ }), +/* 326 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Context Restored Event. + * + * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Restored event from the browser. + * + * The partner event is `CONTEXT_LOST`. + * + * @event Phaser.Core.Events#CONTEXT_RESTORED + * @since 3.19.0 + */ +module.exports = 'contextrestored'; + + +/***/ }), +/* 327 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Destroy Event. + * + * This event is dispatched when the game instance has been told to destroy itself. + * Lots of internal systems listen to this event in order to clear themselves out. + * Custom plugins and game code should also do the same. + * + * @event Phaser.Core.Events#DESTROY + * @since 3.0.0 + */ +module.exports = 'destroy'; + + +/***/ }), +/* 328 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Focus Event. + * + * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded + * enters a focused state. The focus event is raised when the window re-gains focus, having previously lost it. + * + * @event Phaser.Core.Events#FOCUS + * @since 3.0.0 + */ +module.exports = 'focus'; + + +/***/ }), +/* 329 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Hidden Event. + * + * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded + * enters a hidden state. Only browsers that support the Visibility API will cause this event to be emitted. + * + * In most modern browsers, when the document enters a hidden state, the Request Animation Frame and setTimeout, which + * control the main game loop, will automatically pause. There is no way to stop this from happening. It is something + * your game should account for in its own code, should the pause be an issue (i.e. for multiplayer games) + * + * @event Phaser.Core.Events#HIDDEN + * @since 3.0.0 + */ +module.exports = 'hidden'; + + +/***/ }), +/* 330 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Pause Event. + * + * This event is dispatched when the Game loop enters a paused state, usually as a result of the Visibility Handler. + * + * @event Phaser.Core.Events#PAUSE + * @since 3.0.0 + */ +module.exports = 'pause'; + + +/***/ }), +/* 331 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Post-Render Event. + * + * This event is dispatched right at the end of the render process. + * + * Every Scene will have rendered and been drawn to the canvas by the time this event is fired. + * Use it for any last minute post-processing before the next game step begins. + * + * @event Phaser.Core.Events#POST_RENDER + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - A reference to the current renderer being used by the Game instance. + */ +module.exports = 'postrender'; + + +/***/ }), +/* 332 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Post-Step Event. + * + * This event is dispatched after the Scene Manager has updated. + * Hook into it from plugins or systems that need to do things before the render starts. + * + * @event Phaser.Core.Events#POST_STEP + * @since 3.0.0 + * + * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. + * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. + */ +module.exports = 'poststep'; + + +/***/ }), +/* 333 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Pre-Render Event. + * + * This event is dispatched immediately before any of the Scenes have started to render. + * + * The renderer will already have been initialized this frame, clearing itself and preparing to receive the Scenes for rendering, but it won't have actually drawn anything yet. + * + * @event Phaser.Core.Events#PRE_RENDER + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - A reference to the current renderer being used by the Game instance. + */ +module.exports = 'prerender'; + + +/***/ }), +/* 334 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Pre-Step Event. + * + * This event is dispatched before the main Game Step starts. By this point in the game cycle none of the Scene updates have yet happened. + * Hook into it from plugins or systems that need to update before the Scene Manager does. + * + * @event Phaser.Core.Events#PRE_STEP + * @since 3.0.0 + * + * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. + * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. + */ +module.exports = 'prestep'; + + +/***/ }), +/* 335 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Ready Event. + * + * This event is dispatched when the Phaser Game instance has finished booting, the Texture Manager is fully ready, + * and all local systems are now able to start. + * + * @event Phaser.Core.Events#READY + * @since 3.0.0 + */ +module.exports = 'ready'; + + +/***/ }), +/* 336 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Resume Event. + * + * This event is dispatched when the game loop leaves a paused state and resumes running. + * + * @event Phaser.Core.Events#RESUME + * @since 3.0.0 + */ +module.exports = 'resume'; + + +/***/ }), +/* 337 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Step Event. + * + * This event is dispatched after the Game Pre-Step and before the Scene Manager steps. + * Hook into it from plugins or systems that need to update before the Scene Manager does, but after the core Systems have. + * + * @event Phaser.Core.Events#STEP + * @since 3.0.0 + * + * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. + * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. + */ +module.exports = 'step'; + + +/***/ }), +/* 338 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Visible Event. + * + * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded + * enters a visible state, previously having been hidden. + * + * Only browsers that support the Visibility API will cause this event to be emitted. + * + * @event Phaser.Core.Events#VISIBLE + * @since 3.0.0 + */ +module.exports = 'visible'; + + +/***/ }), +/* 339 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); + +/** + * @classdesc + * A Geometry Mask can be applied to a Game Object to hide any pixels of it which don't intersect + * a visible pixel from the geometry mask. The mask is essentially a clipping path which can only + * make a masked pixel fully visible or fully invisible without changing its alpha (opacity). + * + * A Geometry Mask uses a Graphics Game Object to determine which pixels of the masked Game Object(s) + * should be clipped. For any given point of a masked Game Object's texture, the pixel will only be displayed + * if the Graphics Game Object of the Geometry Mask has a visible pixel at the same position. The color and + * alpha of the pixel from the Geometry Mask do not matter. + * + * The Geometry Mask's location matches the location of its Graphics object, not the location of the masked objects. + * Moving or transforming the underlying Graphics object will change the mask (and affect the visibility + * of any masked objects), whereas moving or transforming a masked object will not affect the mask. + * You can think of the Geometry Mask (or rather, of its Graphics object) as an invisible curtain placed + * in front of all masked objects which has its own visual properties and, naturally, respects the camera's + * visual properties, but isn't affected by and doesn't follow the masked objects by itself. + * + * @class GeometryMask + * @memberof Phaser.Display.Masks + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - This parameter is not used. + * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics Game Object to use for the Geometry Mask. Doesn't have to be in the Display List. + */ +var GeometryMask = new Class({ + + initialize: + + function GeometryMask (scene, graphicsGeometry) + { + /** + * The Graphics object which describes the Geometry Mask. + * + * @name Phaser.Display.Masks.GeometryMask#geometryMask + * @type {Phaser.GameObjects.Graphics} + * @since 3.0.0 + */ + this.geometryMask = graphicsGeometry; + + /** + * Similar to the BitmapMasks invertAlpha setting this to true will then hide all pixels + * drawn to the Geometry Mask. + * + * @name Phaser.Display.Masks.GeometryMask#invertAlpha + * @type {boolean} + * @since 3.16.0 + */ + this.invertAlpha = false; + + /** + * Is this mask a stencil mask? + * + * @name Phaser.Display.Masks.GeometryMask#isStencil + * @type {boolean} + * @readonly + * @since 3.17.0 + */ + this.isStencil = true; + + /** + * The current stencil level. + * + * @name Phaser.Display.Masks.GeometryMask#level + * @type {boolean} + * @private + * @since 3.17.0 + */ + this.level = 0; + }, + + /** + * Sets a new Graphics object for the Geometry Mask. + * + * @method Phaser.Display.Masks.GeometryMask#setShape + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics object which will be used for the Geometry Mask. + * + * @return {this} This Geometry Mask + */ + setShape: function (graphicsGeometry) + { + this.geometryMask = graphicsGeometry; + + return this; + }, + + /** + * Sets the `invertAlpha` property of this Geometry Mask. + * Inverting the alpha essentially flips the way the mask works. + * + * @method Phaser.Display.Masks.GeometryMask#setInvertAlpha + * @since 3.17.0 + * + * @param {boolean} [value=true] - Invert the alpha of this mask? + * + * @return {this} This Geometry Mask + */ + setInvertAlpha: function (value) + { + if (value === undefined) { value = true; } + + this.invertAlpha = value; + + return this; + }, + + /** + * Renders the Geometry Mask's underlying Graphics object to the OpenGL stencil buffer and enables the stencil test, which clips rendered pixels according to the mask. + * + * @method Phaser.Display.Masks.GeometryMask#preRenderWebGL + * @since 3.0.0 + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to. + * @param {Phaser.GameObjects.GameObject} child - The Game Object being rendered. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through. + */ + preRenderWebGL: function (renderer, child, camera) + { + var gl = renderer.gl; + + // Force flushing before drawing to stencil buffer + renderer.flush(); + + if (renderer.maskStack.length === 0) + { + gl.enable(gl.STENCIL_TEST); + gl.clear(gl.STENCIL_BUFFER_BIT); + + renderer.maskCount = 0; + } + + if (renderer.currentCameraMask.mask !== this) + { + renderer.currentMask.mask = this; + } + + renderer.maskStack.push({ mask: this, camera: camera }); + + this.applyStencil(renderer, camera, true); + + renderer.maskCount++; + }, + + /** + * Applies the current stencil mask to the renderer. + * + * @method Phaser.Display.Masks.GeometryMask#applyStencil + * @since 3.17.0 + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through. + * @param {boolean} inc - Is this an INCR stencil or a DECR stencil? + */ + applyStencil: function (renderer, camera, inc) + { + var gl = renderer.gl; + var geometryMask = this.geometryMask; + var level = renderer.maskCount; + + gl.colorMask(false, false, false, false); + + if (inc) + { + gl.stencilFunc(gl.EQUAL, level, 0xFF); + gl.stencilOp(gl.KEEP, gl.KEEP, gl.INCR); + } + else + { + gl.stencilFunc(gl.EQUAL, level + 1, 0xFF); + gl.stencilOp(gl.KEEP, gl.KEEP, gl.DECR); + } + + // Write stencil buffer + geometryMask.renderWebGL(renderer, geometryMask, 0, camera); + + renderer.flush(); + + gl.colorMask(true, true, true, true); + gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP); + + if (inc) + { + if (this.invertAlpha) + { + gl.stencilFunc(gl.NOTEQUAL, level + 1, 0xFF); + } + else + { + gl.stencilFunc(gl.EQUAL, level + 1, 0xFF); + } + } + else if (this.invertAlpha) + { + gl.stencilFunc(gl.NOTEQUAL, level, 0xFF); + } + else + { + gl.stencilFunc(gl.EQUAL, level, 0xFF); + } + }, + + /** + * Flushes all rendered pixels and disables the stencil test of a WebGL context, thus disabling the mask for it. + * + * @method Phaser.Display.Masks.GeometryMask#postRenderWebGL + * @since 3.0.0 + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw flush. + */ + postRenderWebGL: function (renderer) + { + var gl = renderer.gl; + + renderer.maskStack.pop(); + + renderer.maskCount--; + + if (renderer.maskStack.length === 0) + { + // If this is the only mask in the stack, flush and disable + renderer.flush(); + + renderer.currentMask.mask = null; + + gl.disable(gl.STENCIL_TEST); + } + else + { + // Force flush before disabling stencil test + renderer.flush(); + + var prev = renderer.maskStack[renderer.maskStack.length - 1]; + + prev.mask.applyStencil(renderer, prev.camera, false); + + if (renderer.currentCameraMask.mask !== prev.mask) + { + renderer.currentMask.mask = prev.mask; + renderer.currentMask.camera = prev.camera; + } + else + { + renderer.currentMask.mask = null; + } + } + }, + + /** + * Sets the clipping path of a 2D canvas context to the Geometry Mask's underlying Graphics object. + * + * @method Phaser.Display.Masks.GeometryMask#preRenderCanvas + * @since 3.0.0 + * + * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance to set the clipping path on. + * @param {Phaser.GameObjects.GameObject} mask - The Game Object being rendered. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through. + */ + preRenderCanvas: function (renderer, mask, camera) + { + var geometryMask = this.geometryMask; + + renderer.currentContext.save(); + + geometryMask.renderCanvas(renderer, geometryMask, 0, camera, null, null, true); + + renderer.currentContext.clip(); + }, + + /** + * Restore the canvas context's previous clipping path, thus turning off the mask for it. + * + * @method Phaser.Display.Masks.GeometryMask#postRenderCanvas + * @since 3.0.0 + * + * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance being restored. + */ + postRenderCanvas: function (renderer) + { + renderer.currentContext.restore(); + }, + + /** + * Destroys this GeometryMask and nulls any references it holds. + * + * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it, + * so be sure to call `clearMask` on any Game Object using it, before destroying it. + * + * @method Phaser.Display.Masks.GeometryMask#destroy + * @since 3.7.0 + */ + destroy: function () + { + this.geometryMask = null; + } + +}); + +module.exports = GeometryMask; + + +/***/ }), +/* 340 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for getting and setting the origin of a Game Object. + * Values are normalized, given in the range 0 to 1. + * Display values contain the calculated pixel values. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.Origin + * @since 3.0.0 + */ + +var Origin = { + + /** + * A property indicating that a Game Object has this component. + * + * @name Phaser.GameObjects.Components.Origin#_originComponent + * @type {boolean} + * @private + * @default true + * @since 3.2.0 + */ + _originComponent: true, + + /** + * The horizontal 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 left of the Game Object. + * + * @name Phaser.GameObjects.Components.Origin#originX + * @type {number} + * @default 0.5 + * @since 3.0.0 + */ + originX: 0.5, + + /** + * 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. + * + * @name Phaser.GameObjects.Components.Origin#originY + * @type {number} + * @default 0.5 + * @since 3.0.0 + */ + originY: 0.5, + + // private + read only + _displayOriginX: 0, + _displayOriginY: 0, + + /** + * The horizontal display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + * + * @name Phaser.GameObjects.Components.Origin#displayOriginX + * @type {number} + * @since 3.0.0 + */ + displayOriginX: { + + get: function () + { + return this._displayOriginX; + }, + + set: function (value) + { + this._displayOriginX = value; + this.originX = value / this.width; + } + + }, + + /** + * The vertical display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + * + * @name Phaser.GameObjects.Components.Origin#displayOriginY + * @type {number} + * @since 3.0.0 + */ + displayOriginY: { + + get: function () + { + return this._displayOriginY; + }, + + set: function (value) + { + this._displayOriginY = value; + this.originY = value / this.height; + } + + }, + + /** + * Sets the origin of this Game Object. + * + * The values are given in the range 0 to 1. + * + * @method Phaser.GameObjects.Components.Origin#setOrigin + * @since 3.0.0 + * + * @param {number} [x=0.5] - The horizontal origin value. + * @param {number} [y=x] - The vertical origin value. If not defined it will be set to the value of `x`. + * + * @return {this} This Game Object instance. + */ + setOrigin: function (x, y) + { + if (x === undefined) { x = 0.5; } + if (y === undefined) { y = x; } + + this.originX = x; + this.originY = y; + + return this.updateDisplayOrigin(); + }, + + /** + * Sets the origin of this Game Object based on the Pivot values in its Frame. + * + * @method Phaser.GameObjects.Components.Origin#setOriginFromFrame + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + setOriginFromFrame: function () + { + if (!this.frame || !this.frame.customPivot) + { + return this.setOrigin(); + } + else + { + this.originX = this.frame.pivotX; + this.originY = this.frame.pivotY; + } + + return this.updateDisplayOrigin(); + }, + + /** + * Sets the display origin of this Game Object. + * The difference between this and setting the origin is that you can use pixel values for setting the display origin. + * + * @method Phaser.GameObjects.Components.Origin#setDisplayOrigin + * @since 3.0.0 + * + * @param {number} [x=0] - The horizontal display origin value. + * @param {number} [y=x] - The vertical display origin value. If not defined it will be set to the value of `x`. + * + * @return {this} This Game Object instance. + */ + setDisplayOrigin: function (x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = x; } + + this.displayOriginX = x; + this.displayOriginY = y; + + return this; + }, + + /** + * Updates the Display Origin cached values internally stored on this Game Object. + * You don't usually call this directly, but it is exposed for edge-cases where you may. + * + * @method Phaser.GameObjects.Components.Origin#updateDisplayOrigin + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + updateDisplayOrigin: function () + { + this._displayOriginX = this.originX * this.width; + this._displayOriginY = this.originY * this.height; + + return this; + } + +}; + +module.exports = Origin; + + +/***/ }), +/* 341 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var DegToRad = __webpack_require__(18); +var GetBoolean = __webpack_require__(342); +var GetValue = __webpack_require__(6); +var TWEEN_CONST = __webpack_require__(343); +var Vector2 = __webpack_require__(1); + +/** + * Provides methods used for managing a Game Object following a Path. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.PathFollower + * @since 3.17.0 + */ + +var PathFollower = { + + /** + * The Path this PathFollower is following. It can only follow one Path at a time. + * + * @name Phaser.GameObjects.Components.PathFollower#path + * @type {Phaser.Curves.Path} + * @since 3.0.0 + */ + path: null, + + /** + * Should the PathFollower automatically rotate to point in the direction of the Path? + * + * @name Phaser.GameObjects.Components.PathFollower#rotateToPath + * @type {boolean} + * @default false + * @since 3.0.0 + */ + rotateToPath: false, + + /** + * If the PathFollower is rotating to match the Path (@see Phaser.GameObjects.PathFollower#rotateToPath) + * this value is added to the rotation value. This allows you to rotate objects to a path but control + * the angle of the rotation as well. + * + * @name Phaser.GameObjects.PathFollower#pathRotationOffset + * @type {number} + * @default 0 + * @since 3.0.0 + */ + pathRotationOffset: 0, + + /** + * An additional vector to add to the PathFollowers position, allowing you to offset it from the + * Path coordinates. + * + * @name Phaser.GameObjects.PathFollower#pathOffset + * @type {Phaser.Math.Vector2} + * @since 3.0.0 + */ + pathOffset: null, + + /** + * A Vector2 that stores the current point of the path the follower is on. + * + * @name Phaser.GameObjects.PathFollower#pathVector + * @type {Phaser.Math.Vector2} + * @since 3.0.0 + */ + pathVector: null, + + /** + * The distance the follower has traveled from the previous point to the current one, at the last update. + * + * @name Phaser.GameObjects.PathFollower#pathDelta + * @type {Phaser.Math.Vector2} + * @since 3.23.0 + */ + pathDelta: null, + + /** + * The Tween used for following the Path. + * + * @name Phaser.GameObjects.PathFollower#pathTween + * @type {Phaser.Tweens.Tween} + * @since 3.0.0 + */ + pathTween: null, + + /** + * Settings for the PathFollower. + * + * @name Phaser.GameObjects.PathFollower#pathConfig + * @type {?Phaser.Types.GameObjects.PathFollower.PathConfig} + * @default null + * @since 3.0.0 + */ + pathConfig: null, + + /** + * Records the direction of the follower so it can change direction. + * + * @name Phaser.GameObjects.PathFollower#_prevDirection + * @type {integer} + * @private + * @since 3.0.0 + */ + _prevDirection: TWEEN_CONST.PLAYING_FORWARD, + + /** + * Set the Path that this PathFollower should follow. + * + * Optionally accepts {@link Phaser.Types.GameObjects.PathFollower.PathConfig} settings. + * + * @method Phaser.GameObjects.Components.PathFollower#setPath + * @since 3.0.0 + * + * @param {Phaser.Curves.Path} path - The Path this PathFollower is following. It can only follow one Path at a time. + * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config] - Settings for the PathFollower. + * + * @return {this} This Game Object. + */ + setPath: function (path, config) + { + if (config === undefined) { config = this.pathConfig; } + + var tween = this.pathTween; + + if (tween && tween.isPlaying()) + { + tween.stop(); + } + + this.path = path; + + if (config) + { + this.startFollow(config); + } + + return this; + }, + + /** + * Set whether the PathFollower should automatically rotate to point in the direction of the Path. + * + * @method Phaser.GameObjects.Components.PathFollower#setRotateToPath + * @since 3.0.0 + * + * @param {boolean} value - Whether the PathFollower should automatically rotate to point in the direction of the Path. + * @param {number} [offset=0] - Rotation offset in degrees. + * + * @return {this} This Game Object. + */ + setRotateToPath: function (value, offset) + { + if (offset === undefined) { offset = 0; } + + this.rotateToPath = value; + + this.pathRotationOffset = offset; + + return this; + }, + + /** + * Is this PathFollower actively following a Path or not? + * + * To be considered as `isFollowing` it must be currently moving on a Path, and not paused. + * + * @method Phaser.GameObjects.Components.PathFollower#isFollowing + * @since 3.0.0 + * + * @return {boolean} `true` is this PathFollower is actively following a Path, otherwise `false`. + */ + isFollowing: function () + { + var tween = this.pathTween; + + return (tween && tween.isPlaying()); + }, + + /** + * Starts this PathFollower following its given Path. + * + * @method Phaser.GameObjects.Components.PathFollower#startFollow + * @since 3.3.0 + * + * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config={}] - The duration of the follow, or a PathFollower config object. + * @param {number} [startAt=0] - Optional start position of the follow, between 0 and 1. + * + * @return {this} This Game Object. + */ + startFollow: function (config, startAt) + { + if (config === undefined) { config = {}; } + if (startAt === undefined) { startAt = 0; } + + var tween = this.pathTween; + + if (tween && tween.isPlaying()) + { + tween.stop(); + } + + if (typeof config === 'number') + { + config = { duration: config }; + } + + // Override in case they've been specified in the config + config.from = GetValue(config, 'from', 0); + config.to = GetValue(config, 'to', 1); + + var positionOnPath = GetBoolean(config, 'positionOnPath', false); + + this.rotateToPath = GetBoolean(config, 'rotateToPath', false); + this.pathRotationOffset = GetValue(config, 'rotationOffset', 0); + + // This works, but it's not an ideal way of doing it as the follower jumps position + var seek = GetValue(config, 'startAt', startAt); + + if (seek) + { + config.onStart = function (tween) + { + var tweenData = tween.data[0]; + tweenData.progress = seek; + tweenData.elapsed = tweenData.duration * seek; + var v = tweenData.ease(tweenData.progress); + tweenData.current = tweenData.start + ((tweenData.end - tweenData.start) * v); + tweenData.target[tweenData.key] = tweenData.current; + }; + } + + if (!this.pathOffset) + { + this.pathOffset = new Vector2(this.x, this.y); + } + + if (!this.pathVector) + { + this.pathVector = new Vector2(); + } + + if (!this.pathDelta) + { + this.pathDelta = new Vector2(); + } + + this.pathDelta.reset(); + + this.pathTween = this.scene.sys.tweens.addCounter(config); + + // The starting point of the path, relative to this follower + this.path.getStartPoint(this.pathOffset); + + if (positionOnPath) + { + 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 = TWEEN_CONST.PLAYING_FORWARD; + + if (this.rotateToPath) + { + // Set the rotation now (in case the tween has a delay on it, etc) + var nextPoint = this.path.getPoint(0.1); + + this.rotation = Math.atan2(nextPoint.y - this.y, nextPoint.x - this.x) + DegToRad(this.pathRotationOffset); + } + + this.pathConfig = config; + + return this; + }, + + /** + * Pauses this PathFollower. It will still continue to render, but it will remain motionless at the + * point on the Path at which you paused it. + * + * @method Phaser.GameObjects.Components.PathFollower#pauseFollow + * @since 3.3.0 + * + * @return {this} This Game Object. + */ + pauseFollow: function () + { + var tween = this.pathTween; + + if (tween && tween.isPlaying()) + { + tween.pause(); + } + + return this; + }, + + /** + * Resumes a previously paused PathFollower. + * + * If the PathFollower was not paused this has no effect. + * + * @method Phaser.GameObjects.Components.PathFollower#resumeFollow + * @since 3.3.0 + * + * @return {this} This Game Object. + */ + resumeFollow: function () + { + var tween = this.pathTween; + + if (tween && tween.isPaused()) + { + tween.resume(); + } + + return this; + }, + + /** + * Stops this PathFollower from following the path any longer. + * + * This will invoke any 'stop' conditions that may exist on the Path, or for the follower. + * + * @method Phaser.GameObjects.Components.PathFollower#stopFollow + * @since 3.3.0 + * + * @return {this} This Game Object. + */ + stopFollow: function () + { + var tween = this.pathTween; + + if (tween && tween.isPlaying()) + { + tween.stop(); + } + + return this; + }, + + /** + * Internal update handler that advances this PathFollower along the path. + * + * Called automatically by the Scene step, should not typically be called directly. + * + * @method Phaser.GameObjects.Components.PathFollower#pathUpdate + * @since 3.17.0 + */ + pathUpdate: function () + { + var tween = this.pathTween; + + if (tween) + { + var tweenData = tween.data[0]; + var pathDelta = this.pathDelta; + var pathVector = this.pathVector; + + pathDelta.copy(pathVector).negate(); + + if (tweenData.state === TWEEN_CONST.COMPLETE) + { + this.path.getPoint(1, pathVector); + + pathDelta.add(pathVector); + pathVector.add(this.pathOffset); + + this.setPosition(pathVector.x, pathVector.y); + + return; + } + else if (tweenData.state !== TWEEN_CONST.PLAYING_FORWARD && tweenData.state !== TWEEN_CONST.PLAYING_BACKWARD) + { + // If delayed, etc then bail out + return; + } + + this.path.getPoint(tween.getValue(), pathVector); + + pathDelta.add(pathVector); + pathVector.add(this.pathOffset); + + var oldX = this.x; + var oldY = this.y; + + this.setPosition(pathVector.x, pathVector.y); + + var speedX = this.x - oldX; + var speedY = this.y - oldY; + + if (speedX === 0 && speedY === 0) + { + // Bail out early + return; + } + + if (tweenData.state !== this._prevDirection) + { + // We've changed direction, so don't do a rotate this frame + this._prevDirection = tweenData.state; + + return; + } + + if (this.rotateToPath) + { + this.rotation = Math.atan2(speedY, speedX) + DegToRad(this.pathRotationOffset); + } + } + } + +}; + +module.exports = PathFollower; + + +/***/ }), +/* 342 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Retrieves the value of the given key from an object. + * + * @function Phaser.Tweens.Builders.GetBoolean + * @since 3.0.0 + * + * @param {object} source - The object to retrieve the value from. + * @param {string} key - The key to look for in the `source` object. + * @param {*} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided. + * + * @return {*} The retrieved value. + */ +var GetBoolean = function (source, key, defaultValue) +{ + if (!source) + { + return defaultValue; + } + else if (source.hasOwnProperty(key)) + { + return source[key]; + } + else + { + return defaultValue; + } +}; + +module.exports = GetBoolean; + + +/***/ }), +/* 343 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var TWEEN_CONST = { + + /** + * TweenData state. + * + * @name Phaser.Tweens.CREATED + * @type {integer} + * @since 3.0.0 + */ + CREATED: 0, + + /** + * TweenData state. + * + * @name Phaser.Tweens.INIT + * @type {integer} + * @since 3.0.0 + */ + INIT: 1, + + /** + * TweenData state. + * + * @name Phaser.Tweens.DELAY + * @type {integer} + * @since 3.0.0 + */ + DELAY: 2, + + /** + * TweenData state. + * + * @name Phaser.Tweens.OFFSET_DELAY + * @type {integer} + * @since 3.0.0 + */ + OFFSET_DELAY: 3, + + /** + * TweenData state. + * + * @name Phaser.Tweens.PENDING_RENDER + * @type {integer} + * @since 3.0.0 + */ + PENDING_RENDER: 4, + + /** + * TweenData state. + * + * @name Phaser.Tweens.PLAYING_FORWARD + * @type {integer} + * @since 3.0.0 + */ + PLAYING_FORWARD: 5, + + /** + * TweenData state. + * + * @name Phaser.Tweens.PLAYING_BACKWARD + * @type {integer} + * @since 3.0.0 + */ + PLAYING_BACKWARD: 6, + + /** + * TweenData state. + * + * @name Phaser.Tweens.HOLD_DELAY + * @type {integer} + * @since 3.0.0 + */ + HOLD_DELAY: 7, + + /** + * TweenData state. + * + * @name Phaser.Tweens.REPEAT_DELAY + * @type {integer} + * @since 3.0.0 + */ + REPEAT_DELAY: 8, + + /** + * TweenData state. + * + * @name Phaser.Tweens.COMPLETE + * @type {integer} + * @since 3.0.0 + */ + COMPLETE: 9, + + // Tween specific (starts from 20 to cleanly allow extra TweenData consts in the future) + + /** + * Tween state. + * + * @name Phaser.Tweens.PENDING_ADD + * @type {integer} + * @since 3.0.0 + */ + PENDING_ADD: 20, + + /** + * Tween state. + * + * @name Phaser.Tweens.PAUSED + * @type {integer} + * @since 3.0.0 + */ + PAUSED: 21, + + /** + * Tween state. + * + * @name Phaser.Tweens.LOOP_DELAY + * @type {integer} + * @since 3.0.0 + */ + LOOP_DELAY: 22, + + /** + * Tween state. + * + * @name Phaser.Tweens.ACTIVE + * @type {integer} + * @since 3.0.0 + */ + ACTIVE: 23, + + /** + * Tween state. + * + * @name Phaser.Tweens.COMPLETE_DELAY + * @type {integer} + * @since 3.0.0 + */ + COMPLETE_DELAY: 24, + + /** + * Tween state. + * + * @name Phaser.Tweens.PENDING_REMOVE + * @type {integer} + * @since 3.0.0 + */ + PENDING_REMOVE: 25, + + /** + * Tween state. + * + * @name Phaser.Tweens.REMOVED + * @type {integer} + * @since 3.0.0 + */ + REMOVED: 26 + +}; + +module.exports = TWEEN_CONST; + + +/***/ }), +/* 344 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for setting the WebGL rendering pipeline of a Game Object. + * + * @namespace Phaser.GameObjects.Components.Pipeline + * @webglOnly + * @since 3.0.0 + */ + +var Pipeline = { + + /** + * The initial WebGL pipeline of this Game Object. + * + * @name Phaser.GameObjects.Components.Pipeline#defaultPipeline + * @type {Phaser.Renderer.WebGL.WebGLPipeline} + * @default null + * @webglOnly + * @since 3.0.0 + */ + defaultPipeline: null, + + /** + * The current WebGL pipeline of this Game Object. + * + * @name Phaser.GameObjects.Components.Pipeline#pipeline + * @type {Phaser.Renderer.WebGL.WebGLPipeline} + * @default null + * @webglOnly + * @since 3.0.0 + */ + pipeline: null, + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * + * This should only be called during the instantiation of the Game Object. + * + * @method Phaser.GameObjects.Components.Pipeline#initPipeline + * @webglOnly + * @since 3.0.0 + * + * @param {string} [pipelineName=MultiPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Multi Pipeline. + * + * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. + */ + initPipeline: function (pipelineName) + { + if (pipelineName === undefined) { pipelineName = 'MultiPipeline'; } + + var renderer = this.scene.sys.game.renderer; + + if (renderer && renderer.gl && renderer.hasPipeline(pipelineName)) + { + this.defaultPipeline = renderer.getPipeline(pipelineName); + this.pipeline = this.defaultPipeline; + + return true; + } + + return false; + }, + + /** + * Sets the active WebGL Pipeline of this Game Object. + * + * @method Phaser.GameObjects.Components.Pipeline#setPipeline + * @webglOnly + * @since 3.0.0 + * + * @param {string} pipelineName - The name of the pipeline to set on this Game Object. + * + * @return {this} This Game Object instance. + */ + setPipeline: function (pipelineName) + { + var renderer = this.scene.sys.game.renderer; + + if (renderer && renderer.gl && renderer.hasPipeline(pipelineName)) + { + this.pipeline = renderer.getPipeline(pipelineName); + } + + return this; + }, + + /** + * Resets the WebGL Pipeline of this Game Object back to the default it was created with. + * + * @method Phaser.GameObjects.Components.Pipeline#resetPipeline + * @webglOnly + * @since 3.0.0 + * + * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. + */ + resetPipeline: function () + { + this.pipeline = this.defaultPipeline; + + return (this.pipeline !== null); + }, + + /** + * Gets the name of the WebGL Pipeline this Game Object is currently using. + * + * @method Phaser.GameObjects.Components.Pipeline#getPipelineName + * @webglOnly + * @since 3.0.0 + * + * @return {string} The string-based name of the pipeline being used by this Game Object. + */ + getPipelineName: function () + { + return this.pipeline.name; + } + +}; + +module.exports = Pipeline; + + +/***/ }), +/* 345 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for getting and setting the size of a Game Object. + * + * @namespace Phaser.GameObjects.Components.Size + * @since 3.0.0 + */ + +var Size = { + + /** + * A property indicating that a Game Object has this component. + * + * @name Phaser.GameObjects.Components.Size#_sizeComponent + * @type {boolean} + * @private + * @default true + * @since 3.2.0 + */ + _sizeComponent: true, + + /** + * The native (un-scaled) width of this Game Object. + * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayWidth` property. + * + * @name Phaser.GameObjects.Components.Size#width + * @type {number} + * @since 3.0.0 + */ + width: 0, + + /** + * The native (un-scaled) height of this Game Object. + * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayHeight` property. + * + * @name Phaser.GameObjects.Components.Size#height + * @type {number} + * @since 3.0.0 + */ + height: 0, + + /** + * The displayed width of this Game Object. + * + * This value takes into account the scale factor. + * + * Setting this value will adjust the Game Object's scale property. + * + * @name Phaser.GameObjects.Components.Size#displayWidth + * @type {number} + * @since 3.0.0 + */ + displayWidth: { + + get: function () + { + return Math.abs(this.scaleX * this.frame.realWidth); + }, + + set: function (value) + { + this.scaleX = value / this.frame.realWidth; + } + + }, + + /** + * The displayed height of this Game Object. + * + * This value takes into account the scale factor. + * + * Setting this value will adjust the Game Object's scale property. + * + * @name Phaser.GameObjects.Components.Size#displayHeight + * @type {number} + * @since 3.0.0 + */ + displayHeight: { + + get: function () + { + return Math.abs(this.scaleY * this.frame.realHeight); + }, + + set: function (value) + { + this.scaleY = value / this.frame.realHeight; + } + + }, + + /** + * Sets the size of this Game Object to be that of the given Frame. + * + * This will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or call the + * `setDisplaySize` method, which is the same thing as changing the scale but allows you + * to do so by giving pixel values. + * + * If you have enabled this Game Object for input, changing the size will _not_ change the + * size of the hit area. To do this you should adjust the `input.hitArea` object directly. + * + * @method Phaser.GameObjects.Components.Size#setSizeToFrame + * @since 3.0.0 + * + * @param {Phaser.Textures.Frame} frame - The frame to base the size of this Game Object on. + * + * @return {this} This Game Object instance. + */ + setSizeToFrame: function (frame) + { + if (frame === undefined) { frame = this.frame; } + + this.width = frame.realWidth; + this.height = frame.realHeight; + + return this; + }, + + /** + * Sets the internal size of this Game Object, as used for frame or physics body creation. + * + * This will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or call the + * `setDisplaySize` method, which is the same thing as changing the scale but allows you + * to do so by giving pixel values. + * + * If you have enabled this Game Object for input, changing the size will _not_ change the + * size of the hit area. To do this you should adjust the `input.hitArea` object directly. + * + * @method Phaser.GameObjects.Components.Size#setSize + * @since 3.0.0 + * + * @param {number} width - The width of this Game Object. + * @param {number} height - The height of this Game Object. + * + * @return {this} This Game Object instance. + */ + setSize: function (width, height) + { + this.width = width; + this.height = height; + + return this; + }, + + /** + * Sets the display size of this Game Object. + * + * Calling this will adjust the scale. + * + * @method Phaser.GameObjects.Components.Size#setDisplaySize + * @since 3.0.0 + * + * @param {number} width - The width of this Game Object. + * @param {number} height - The height of this Game Object. + * + * @return {this} This Game Object instance. + */ + setDisplaySize: function (width, height) + { + this.displayWidth = width; + this.displayHeight = height; + + return this; + } + +}; + +module.exports = Size; + + +/***/ }), +/* 346 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// bitmask flag for GameObject.renderMask +var _FLAG = 8; // 1000 + +/** + * Provides methods used for getting and setting the texture of a Game Object. + * + * @namespace Phaser.GameObjects.Components.Texture + * @since 3.0.0 + */ + +var Texture = { + + /** + * The Texture this Game Object is using to render with. + * + * @name Phaser.GameObjects.Components.Texture#texture + * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture} + * @since 3.0.0 + */ + texture: null, + + /** + * The Texture Frame this Game Object is using to render with. + * + * @name Phaser.GameObjects.Components.Texture#frame + * @type {Phaser.Textures.Frame} + * @since 3.0.0 + */ + frame: null, + + /** + * Internal flag. Not to be set by this Game Object. + * + * @name Phaser.GameObjects.Components.Texture#isCropped + * @type {boolean} + * @private + * @since 3.11.0 + */ + isCropped: false, + + /** + * 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. + * + * @method Phaser.GameObjects.Components.Texture#setTexture + * @since 3.0.0 + * + * @param {(string|Phaser.Textures.Texture)} key - The key of the texture to be used, as stored in the Texture Manager, or a Texture instance. + * @param {(string|integer)} [frame] - The name or index of the frame within the Texture. + * + * @return {this} This Game Object instance. + */ + setTexture: function (key, frame) + { + this.texture = this.scene.sys.textures.get(key); + + return this.setFrame(frame); + }, + + /** + * Sets the frame this Game Object will use to render with. + * + * The Frame has to belong to the current Texture being used. + * + * It can be either a string or an index. + * + * 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. + * + * @method Phaser.GameObjects.Components.Texture#setFrame + * @since 3.0.0 + * + * @param {(string|integer)} frame - The name or index of the frame within the Texture. + * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object? + * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object? + * + * @return {this} This Game Object instance. + */ + setFrame: function (frame, updateSize, updateOrigin) + { + if (updateSize === undefined) { updateSize = true; } + if (updateOrigin === undefined) { updateOrigin = true; } + + this.frame = this.texture.get(frame); + + if (!this.frame.cutWidth || !this.frame.cutHeight) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + + if (this._sizeComponent && updateSize) + { + this.setSizeToFrame(); + } + + if (this._originComponent && updateOrigin) + { + if (this.frame.customPivot) + { + this.setOrigin(this.frame.pivotX, this.frame.pivotY); + } + else + { + this.updateDisplayOrigin(); + } + } + + return this; + } + +}; + +module.exports = Texture; + + +/***/ }), +/* 347 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// bitmask flag for GameObject.renderMask +var _FLAG = 8; // 1000 + +/** + * Provides methods used for getting and setting the texture of a Game Object. + * + * @namespace Phaser.GameObjects.Components.TextureCrop + * @since 3.0.0 + */ + +var TextureCrop = { + + /** + * The Texture this Game Object is using to render with. + * + * @name Phaser.GameObjects.Components.TextureCrop#texture + * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture} + * @since 3.0.0 + */ + texture: null, + + /** + * The Texture Frame this Game Object is using to render with. + * + * @name Phaser.GameObjects.Components.TextureCrop#frame + * @type {Phaser.Textures.Frame} + * @since 3.0.0 + */ + frame: null, + + /** + * A boolean flag indicating if this Game Object is being cropped or not. + * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off. + * Equally, calling `setCrop` with no arguments will reset the crop and disable it. + * + * @name Phaser.GameObjects.Components.TextureCrop#isCropped + * @type {boolean} + * @since 3.11.0 + */ + isCropped: false, + + /** + * Applies a crop to a texture based Game Object, such as a Sprite or Image. + * + * The crop is a rectangle that limits the area of the texture frame that is visible during rendering. + * + * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just + * changes what is shown when rendered. + * + * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left. + * + * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left + * half of it, you could call `setCrop(0, 0, 400, 600)`. + * + * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop + * an area of 200x100 when applied to a Game Object that had a scale factor of 2. + * + * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument. + * + * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`. + * + * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow + * the renderer to skip several internal calculations. + * + * @method Phaser.GameObjects.Components.TextureCrop#setCrop + * @since 3.11.0 + * + * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored. + * @param {number} [y] - The y coordinate to start the crop from. + * @param {number} [width] - The width of the crop rectangle in pixels. + * @param {number} [height] - The height of the crop rectangle in pixels. + * + * @return {this} This Game Object instance. + */ + setCrop: function (x, y, width, height) + { + if (x === undefined) + { + this.isCropped = false; + } + else if (this.frame) + { + if (typeof x === 'number') + { + this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY); + } + else + { + var rect = x; + + this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY); + } + + this.isCropped = true; + } + + return this; + }, + + /** + * 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. + * + * @method Phaser.GameObjects.Components.TextureCrop#setTexture + * @since 3.0.0 + * + * @param {string} key - The key of the texture to be used, as stored in the Texture Manager. + * @param {(string|integer)} [frame] - The name or index of the frame within the Texture. + * + * @return {this} This Game Object instance. + */ + setTexture: function (key, frame) + { + this.texture = this.scene.sys.textures.get(key); + + return this.setFrame(frame); + }, + + /** + * Sets the frame this Game Object will use to render with. + * + * The Frame has to belong to the current Texture being used. + * + * It can be either a string or an index. + * + * 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. + * + * @method Phaser.GameObjects.Components.TextureCrop#setFrame + * @since 3.0.0 + * + * @param {(string|integer)} frame - The name or index of the frame within the Texture. + * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object? + * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object? + * + * @return {this} This Game Object instance. + */ + setFrame: function (frame, updateSize, updateOrigin) + { + if (updateSize === undefined) { updateSize = true; } + if (updateOrigin === undefined) { updateOrigin = true; } + + this.frame = this.texture.get(frame); + + if (!this.frame.cutWidth || !this.frame.cutHeight) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + + if (this._sizeComponent && updateSize) + { + this.setSizeToFrame(); + } + + if (this._originComponent && updateOrigin) + { + if (this.frame.customPivot) + { + this.setOrigin(this.frame.pivotX, this.frame.pivotY); + } + else + { + this.updateDisplayOrigin(); + } + } + + if (this.isCropped) + { + this.frame.updateCropUVs(this._crop, this.flipX, this.flipY); + } + + return this; + }, + + /** + * Internal method that returns a blank, well-formed crop object for use by a Game Object. + * + * @method Phaser.GameObjects.Components.TextureCrop#resetCropObject + * @private + * @since 3.12.0 + * + * @return {object} The crop object. + */ + resetCropObject: function () + { + return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 }; + } + +}; + +module.exports = TextureCrop; + + +/***/ }), +/* 348 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetColorFromValue = __webpack_require__(349); + +/** + * Provides methods used for setting the tint of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.Tint + * @webglOnly + * @since 3.0.0 + */ + +var Tint = { + + /** + * Private internal value. Holds the top-left tint value. + * + * @name Phaser.GameObjects.Components.Tint#_tintTL + * @type {number} + * @private + * @default 16777215 + * @since 3.0.0 + */ + _tintTL: 16777215, + + /** + * Private internal value. Holds the top-right tint value. + * + * @name Phaser.GameObjects.Components.Tint#_tintTR + * @type {number} + * @private + * @default 16777215 + * @since 3.0.0 + */ + _tintTR: 16777215, + + /** + * Private internal value. Holds the bottom-left tint value. + * + * @name Phaser.GameObjects.Components.Tint#_tintBL + * @type {number} + * @private + * @default 16777215 + * @since 3.0.0 + */ + _tintBL: 16777215, + + /** + * Private internal value. Holds the bottom-right tint value. + * + * @name Phaser.GameObjects.Components.Tint#_tintBR + * @type {number} + * @private + * @default 16777215 + * @since 3.0.0 + */ + _tintBR: 16777215, + + /** + * Private internal value. Holds if the Game Object is tinted or not. + * + * @name Phaser.GameObjects.Components.Tint#_isTinted + * @type {boolean} + * @private + * @default false + * @since 3.11.0 + */ + _isTinted: false, + + /** + * Fill or additive? + * + * @name Phaser.GameObjects.Components.Tint#tintFill + * @type {boolean} + * @default false + * @since 3.11.0 + */ + tintFill: false, + + /** + * Clears all tint values associated with this Game Object. + * + * Immediately sets the color values back to 0xffffff and the tint type to 'additive', + * which results in no visible change to the texture. + * + * @method Phaser.GameObjects.Components.Tint#clearTint + * @webglOnly + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + clearTint: function () + { + this.setTint(0xffffff); + + this._isTinted = false; + + return this; + }, + + /** + * Sets an additive tint on this Game Object. + * + * The tint works by taking the pixel color values from the Game Objects texture, and then + * multiplying it by the color value of the tint. You can provide either one color value, + * in which case the whole Game Object will be tinted in that color. Or you can provide a color + * per corner. The colors are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`. + * + * @method Phaser.GameObjects.Components.Tint#setTint + * @webglOnly + * @since 3.0.0 + * + * @param {integer} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object. + * @param {integer} [topRight] - The tint being applied to the top-right of the Game Object. + * @param {integer} [bottomLeft] - The tint being applied to the bottom-left of the Game Object. + * @param {integer} [bottomRight] - The tint being applied to the bottom-right of the Game Object. + * + * @return {this} This Game Object instance. + */ + setTint: function (topLeft, topRight, bottomLeft, bottomRight) + { + if (topLeft === undefined) { topLeft = 0xffffff; } + + if (topRight === undefined) + { + topRight = topLeft; + bottomLeft = topLeft; + bottomRight = topLeft; + } + + this._tintTL = GetColorFromValue(topLeft); + this._tintTR = GetColorFromValue(topRight); + this._tintBL = GetColorFromValue(bottomLeft); + this._tintBR = GetColorFromValue(bottomRight); + + this._isTinted = true; + + this.tintFill = false; + + return this; + }, + + /** + * Sets a fill-based tint on this Game Object. + * + * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture + * with those in the tint. You can use this for effects such as making a player flash 'white' + * if hit by something. You can provide either one color value, in which case the whole + * Game Object will be rendered in that color. Or you can provide a color per corner. The colors + * are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`. + * + * @method Phaser.GameObjects.Components.Tint#setTintFill + * @webglOnly + * @since 3.11.0 + * + * @param {integer} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. + * @param {integer} [topRight] - The tint being applied to the top-right of the Game Object. + * @param {integer} [bottomLeft] - The tint being applied to the bottom-left of the Game Object. + * @param {integer} [bottomRight] - The tint being applied to the bottom-right of the Game Object. + * + * @return {this} This Game Object instance. + */ + setTintFill: function (topLeft, topRight, bottomLeft, bottomRight) + { + this.setTint(topLeft, topRight, bottomLeft, bottomRight); + + this.tintFill = true; + + return this; + }, + + /** + * The tint value being applied to the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Tint#tintTopLeft + * @type {integer} + * @webglOnly + * @since 3.0.0 + */ + tintTopLeft: { + + get: function () + { + return this._tintTL; + }, + + set: function (value) + { + this._tintTL = GetColorFromValue(value); + this._isTinted = true; + } + + }, + + /** + * The tint value being applied to the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Tint#tintTopRight + * @type {integer} + * @webglOnly + * @since 3.0.0 + */ + tintTopRight: { + + get: function () + { + return this._tintTR; + }, + + set: function (value) + { + this._tintTR = GetColorFromValue(value); + this._isTinted = true; + } + + }, + + /** + * The tint value being applied to the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Tint#tintBottomLeft + * @type {integer} + * @webglOnly + * @since 3.0.0 + */ + tintBottomLeft: { + + get: function () + { + return this._tintBL; + }, + + set: function (value) + { + this._tintBL = GetColorFromValue(value); + this._isTinted = true; + } + + }, + + /** + * The tint value being applied to the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Tint#tintBottomRight + * @type {integer} + * @webglOnly + * @since 3.0.0 + */ + tintBottomRight: { + + get: function () + { + return this._tintBR; + }, + + set: function (value) + { + this._tintBR = GetColorFromValue(value); + this._isTinted = true; + } + + }, + + /** + * The tint value being applied to the whole of the Game Object. + * This property is a setter-only. Use the properties `tintTopLeft` etc to read the current tint value. + * + * @name Phaser.GameObjects.Components.Tint#tint + * @type {integer} + * @webglOnly + * @since 3.0.0 + */ + tint: { + + set: function (value) + { + this.setTint(value, value, value, value); + } + }, + + /** + * Does this Game Object have a tint applied to it or not? + * + * @name Phaser.GameObjects.Components.Tint#isTinted + * @type {boolean} + * @webglOnly + * @readonly + * @since 3.11.0 + */ + isTinted: { + + get: function () + { + return this._isTinted; + } + + } + +}; + +module.exports = Tint; + + +/***/ }), +/* 349 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Given a hex color value, such as 0xff00ff (for purple), it will return a + * numeric representation of it (i.e. 16711935) for use in WebGL tinting. + * + * @function Phaser.Display.Color.GetColorFromValue + * @since 3.50.0 + * + * @param {number} red - The hex color value, such as 0xff0000. + * + * @return {number} The combined color value. + */ +var GetColorFromValue = function (value) +{ + return (value >> 16) + (value & 0xff00) + ((value & 0xff) << 16); +}; + +module.exports = GetColorFromValue; + + +/***/ }), +/* 350 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var renderWebGL = __webpack_require__(4); +var renderCanvas = __webpack_require__(4); + +if (true) +{ + renderWebGL = __webpack_require__(351); +} + +if (false) +{} + +module.exports = { + + renderWebGL: renderWebGL, + renderCanvas: renderCanvas + +}; + + +/***/ }), +/* 351 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Renders this Game Object with the WebGL Renderer to the given Camera. + * 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.Container#renderWebGL + * @since 3.4.0 + * @private + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. + * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call. + * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. + * @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 ContainerWebGLRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix) +{ + var children = container.list; + + if (children.length === 0) + { + return; + } + + var transformMatrix = container.localTransform; + + if (parentMatrix) + { + transformMatrix.loadIdentity(); + transformMatrix.multiply(parentMatrix); + transformMatrix.translate(container.x, container.y); + transformMatrix.rotate(container.rotation); + transformMatrix.scale(container.scaleX, container.scaleY); + } + else + { + transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY); + } + + var containerHasBlendMode = (container.blendMode !== -1); + + if (!containerHasBlendMode) + { + // If Container is SKIP_TEST then set blend mode to be Normal + renderer.setBlendMode(0); + } + + var alpha = container.alpha; + + var scrollFactorX = container.scrollFactorX; + var scrollFactorY = container.scrollFactorY; + + var list = children; + var childCount = children.length; + + for (var i = 0; i < childCount; i++) + { + var child = children[i]; + + if (!child.willRender(camera)) + { + continue; + } + + var childAlphaTopLeft; + var childAlphaTopRight; + var childAlphaBottomLeft; + var childAlphaBottomRight; + + if (child.alphaTopLeft !== undefined) + { + childAlphaTopLeft = child.alphaTopLeft; + childAlphaTopRight = child.alphaTopRight; + childAlphaBottomLeft = child.alphaBottomLeft; + childAlphaBottomRight = child.alphaBottomRight; + } + else + { + var childAlpha = child.alpha; + + childAlphaTopLeft = childAlpha; + childAlphaTopRight = childAlpha; + childAlphaBottomLeft = childAlpha; + childAlphaBottomRight = childAlpha; + } + + var childScrollFactorX = child.scrollFactorX; + var childScrollFactorY = child.scrollFactorY; + + if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode) + { + // If Container doesn't have its own blend mode, then a child can have one + renderer.setBlendMode(child.blendMode); + } + + var mask = child.mask; + + if (mask) + { + mask.preRenderWebGL(renderer, child, camera); + } + + var type = child.type; + + if (type !== renderer.currentType) + { + renderer.newType = true; + renderer.currentType = type; + } + + renderer.nextTypeMatch = (i < childCount - 1) ? (list[i + 1].type === renderer.currentType) : false; + + // Set parent values + child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY); + + child.setAlpha(childAlphaTopLeft * alpha, childAlphaTopRight * alpha, childAlphaBottomLeft * alpha, childAlphaBottomRight * alpha); + + // Render + child.renderWebGL(renderer, child, interpolationPercentage, camera, transformMatrix); + + // Restore original values + + child.setAlpha(childAlphaTopLeft, childAlphaTopRight, childAlphaBottomLeft, childAlphaBottomRight); + + child.setScrollFactor(childScrollFactorX, childScrollFactorY); + + if (mask) + { + mask.postRenderWebGL(renderer, camera); + } + + renderer.newType = false; + } +}; + +module.exports = ContainerWebGLRenderer; + + +/***/ }), +/* 352 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Rectangle = __webpack_require__(24); + +/** + * Creates a new Rectangle or repositions and/or resizes an existing Rectangle so that it encompasses the two given Rectangles, i.e. calculates their union. + * + * @function Phaser.Geom.Rectangle.Union + * @since 3.0.0 + * + * @generic {Phaser.Geom.Rectangle} O - [out,$return] + * + * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle to use. + * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle to use. + * @param {Phaser.Geom.Rectangle} [out] - The Rectangle to store the union in. + * + * @return {Phaser.Geom.Rectangle} The modified `out` Rectangle, or a new Rectangle if none was provided. + */ +var Union = function (rectA, rectB, out) +{ + if (out === undefined) { out = new Rectangle(); } + + // Cache vars so we can use one of the input rects as the output rect + var x = Math.min(rectA.x, rectB.x); + var y = Math.min(rectA.y, rectB.y); + var w = Math.max(rectA.right, rectB.right) - x; + var h = Math.max(rectA.bottom, rectB.bottom) - y; + + return out.setTo(x, y, w, h); +}; + +module.exports = Union; + + +/***/ }), +/* 353 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var renderWebGL = __webpack_require__(4); +var renderCanvas = __webpack_require__(4); + +if (true) +{ + renderWebGL = __webpack_require__(354); +} + +if (false) +{} + +module.exports = { + + renderWebGL: renderWebGL, + renderCanvas: renderCanvas + +}; + + +/***/ }), +/* 354 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CounterClockwise = __webpack_require__(11); +var Clamp = __webpack_require__(3); +var RadToDeg = __webpack_require__(12); +var Wrap = __webpack_require__(8); + +/** + * Renders this Game Object with the WebGL Renderer to the given Camera. + * 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 SpineContainerWebGLRenderer#renderWebGL + * @since 3.50.0 + * @private + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. + * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call. + * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. + * @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 SpineContainerWebGLRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix) +{ + var plugin = container.plugin; + var sceneRenderer = plugin.sceneRenderer; + var children = container.list; + + if (children.length === 0) + { + if (sceneRenderer.batcher.isDrawing && renderer.finalType) + { + sceneRenderer.end(); + } + + return; + } + + var transformMatrix = container.localTransform; + + if (parentMatrix) + { + transformMatrix.loadIdentity(); + transformMatrix.multiply(parentMatrix); + transformMatrix.translate(container.x, container.y); + transformMatrix.rotate(container.rotation); + transformMatrix.scale(container.scaleX, container.scaleY); + } + else + { + transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY); + } + + var alpha = container.alpha; + var scrollFactorX = container.scrollFactorX; + var scrollFactorY = container.scrollFactorY; + + var GameObjectRenderMask = 15; + + if (renderer.newType) + { + sceneRenderer.begin(); + } + + for (var i = 0; i < children.length; i++) + { + var src = children[i]; + + var skeleton = src.skeleton; + var childAlpha = skeleton.color.a; + + var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || childAlpha === 0); + + if (!skeleton || !willRender) + { + continue; + } + + var camMatrix = renderer._tempMatrix1; + var spriteMatrix = renderer._tempMatrix2; + var calcMatrix = renderer._tempMatrix3; + + spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY)); + + camMatrix.copyFrom(camera.matrix); + + // Multiply the camera by the parent matrix + camMatrix.multiplyWithOffset(transformMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY); + + // Undo the camera scroll + spriteMatrix.e = src.x; + spriteMatrix.f = src.y; + + // Multiply by the Sprite matrix, store result in calcMatrix + camMatrix.multiply(spriteMatrix, calcMatrix); + + var viewportHeight = renderer.height; + + skeleton.x = calcMatrix.tx; + skeleton.y = viewportHeight - calcMatrix.ty; + + skeleton.scaleX = calcMatrix.scaleX; + skeleton.scaleY = calcMatrix.scaleY; + + if (src.scaleX < 0) + { + skeleton.scaleX *= -1; + + src.root.rotation = RadToDeg(calcMatrix.rotationNormalized); + } + else + { + // +90 degrees to account for the difference in Spine vs. Phaser rotation + src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360); + } + + if (src.scaleY < 0) + { + skeleton.scaleY *= -1; + + if (src.scaleX < 0) + { + src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2); + } + else + { + src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2); + } + } + + if (camera.renderToTexture || renderer.currentFramebuffer !== null) + { + skeleton.y = calcMatrix.ty; + skeleton.scaleY *= -1; + } + + // Add autoUpdate option + skeleton.updateWorldTransform(); + + skeleton.color.a = Clamp(childAlpha * alpha, 0, 1); + + // Draw the current skeleton + sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha); + + // Restore alpha + skeleton.color.a = childAlpha; + } + + if (!renderer.nextTypeMatch) + { + // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch. + sceneRenderer.end(); + + if (!renderer.finalType) + { + renderer.rebindPipeline(renderer.pipelines.MultiPipeline); + } + } +}; + +module.exports = SpineContainerWebGLRenderer; + + /***/ }) /******/ ]); \ No newline at end of file diff --git a/plugins/spine/dist/SpineWebGLPlugin.min.js b/plugins/spine/dist/SpineWebGLPlugin.min.js index 265582e24..7c6780e5a 100644 --- a/plugins/spine/dist/SpineWebGLPlugin.min.js +++ b/plugins/spine/dist/SpineWebGLPlugin.min.js @@ -1 +1 @@ -window.SpinePlugin=function(n){var i={};function r(t){if(i[t])return i[t].exports;var e=i[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}return r.m=n,r.c=i,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=35)}([function(t,e){function s(t,e,n,i){for(var r in e)if(e.hasOwnProperty(r)){var s=(l=e,u=r,f=d=void 0,f=(c=n)?l[u]:Object.getOwnPropertyDescriptor(l,u),!c&&f.value&&"object"==typeof f.value&&(f=f.value),!(!f||!((d=f).get&&"function"==typeof d.get||d.set&&"function"==typeof d.set))&&(void 0===f.enumerable&&(f.enumerable=!0),void 0===f.configurable&&(f.configurable=!0),f));if(!1!==s){if(o=(i||t).prototype,a=r,h=void 0,(h=Object.getOwnPropertyDescriptor(o,a))&&(h.value&&"object"==typeof h.value&&(h=h.value),!1===h.configurable)){if(p.ignoreFinals)continue;throw new Error("cannot override final property '"+r+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,r,s)}else t.prototype[r]=e[r]}var o,a,h,l,u,c,d,f}function o(t,e){if(e){Array.isArray(e)||(e=[e]);for(var n=0;nMath.PI&&(t-=i.PI2),Math.abs(((t+i.TAU)%i.PI2-i.PI2)%i.PI2)}},function(t,e){t.exports=function(t,e){return Math.random()*(e-t)+t}},function(t,e){t.exports=function(t,e,n){return Math.max(e,Math.min(n,t))}},function(t,e,n){var i=n(1);t.exports=function(t){return t*i.RAD_TO_DEG}},function(t,e,n){var i=new(n(0))({initialize:function(t,e,n){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=n||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new i(this.x,this.y,this.z)},crossVectors:function(t,e){var n=t.x,i=t.y,r=t.z,s=e.x,o=e.y,a=e.z;return this.x=i*a-r*o,this.y=r*s-n*a,this.z=n*o-i*s,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,n){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=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||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,n=t.y-this.y,i=t.z-this.z||0;return Math.sqrt(e*e+n*n+i*i)},distanceSq:function(t){var e=t.x-this.x,n=t.y-this.y,i=t.z-this.z||0;return e*e+n*n+i*i},length:function(){var t=this.x,e=this.y,n=this.z;return Math.sqrt(t*t+e*e+n*n)},lengthSq:function(){var t=this.x,e=this.y,n=this.z;return t*t+e*e+n*n},normalize:function(){var t=this.x,e=this.y,n=this.z,i=t*t+e*e+n*n;return 0s[0]&&(e=1),s[8]>s[3*e+e]&&(e=2),n=a[e],i=a[n],r=Math.sqrt(s[3*e+e]-s[3*n+n]-s[3*i+i]+1),h[e]=.5*r,r=.5/r,h[n]=(s[3*n+e]+s[3*e+n])*r,h[i]=(s[3*i+e]+s[3*e+i])*r,this.x=h[0],this.y=h[1],this.z=h[2],this.w=(s[3*i+n]-s[3*n+i])*r),this}});t.exports=d},function(t,e,n){var r=n(15),s=n(33);t.exports=function(t,e){var n=void 0===t?s():r({},t);if(e)for(var i in e)void 0!==e[i]&&(n[i]=e[i]);return n}},function(t,e){t.exports=function(t,e,n,i,r,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===n&&(n=""),void 0===i&&(i=""),void 0===r&&(r=0),void 0===s&&(s=!1),{responseType:t,async:e,user:n,password:i,timeout:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:s}}},function(t,e){t.exports=function(){}},function(t,e,n){var u=n(36),i=n(0),p=n(12),r=n(150),s=n(151),v=n(175),h=n(176),c=n(194),o=new i({Extends:s,initialize:function(t,e){s.call(this,t,e);var n=e.game;this.isWebGL=2===n.config.renderType,this.cache=n.cache.addCustom("spine"),this.spineTextures=n.cache.addCustom("spineTextures"),this.json=n.cache.json,this.textures=n.textures,this.drawDebug=!1,this.gl,this.renderer,this.sceneRenderer,this.skeletonRenderer,this.skeletonDebugRenderer,this.plugin=v,this.temp1,this.temp2,this.isWebGL?(this.runtime=v.webgl,this.renderer=n.renderer,this.gl=n.renderer.gl,this.getAtlas=this.getAtlasWebGL):(this.runtime=v.canvas,this.renderer=n.renderer,this.getAtlas=this.getAtlasCanvas);var l=this;e.registerFileType("spine",this.spineFileCallback,t),e.registerGameObject("spine",function(t,e,n,i,r){var s=new c(this.scene,l,t,e,n,i,r);return this.displayList.add(s),this.updateList.add(s),s},function(t,e){void 0===t&&(t={});var n=p(t,"key",null),i=p(t,"animationName",null),r=p(t,"loop",!1),s=new c(this.scene,l,0,0,n,i,r);void 0!==e&&(t.add=e),u(this.scene,s,t);var o=p(t,"skinName",!1);o&&s.setSkinByName(o);var a=p(t,"slotName",!1),h=p(t,"attachmentName",null);return a&&s.setAttachment(a,h),s.refresh()})},boot:function(){this.isWebGL?(this.bootWebGL(),this.onResize(),this.game.scale.on(r,this.onResize,this)):this.bootCanvas();var t=this.systems.events;t.once("shutdown",this.shutdown,this),t.once("destroy",this.destroy,this)},bootCanvas:function(){this.skeletonRenderer=new v.canvas.SkeletonRenderer(this.scene.sys.context)},bootWebGL:function(){this.sceneRenderer=new v.webgl.SceneRenderer(this.renderer.canvas,this.gl,!0);function t(t,e){var n;t===this.srcBlend&&e===this.dstBlend||(n=this.context.gl,this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),n.blendFunc(this.srcBlend,this.dstBlend)))}this.sceneRenderer.batcher.setBlendMode=t,this.sceneRenderer.shapes.setBlendMode=t,this.skeletonRenderer=this.sceneRenderer.skeletonRenderer,this.skeletonDebugRenderer=this.sceneRenderer.skeletonDebugRenderer,this.temp1=new v.webgl.Vector3(0,0,0),this.temp2=new v.webgl.Vector3(0,0,0)},getAtlasCanvas:function(t){var e=this.cache.get(t);if(e){var n,i=this.spineTextures;return i.has(t)?i.get(t):(n=this.textures,new v.TextureAtlas(e.data,function(t){return new v.canvas.CanvasTexture(n.get(e.prefix+t).getSourceImage())}))}console.warn("No atlas data for: "+t)},getAtlasWebGL:function(t){var e=this.cache.get(t);if(e){var n,i,r=this.spineTextures,s=r.has(t)?r.get(t):(n=this.textures,(i=this.sceneRenderer.context.gl).pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),new v.TextureAtlas(e.data,function(t){return new v.webgl.GLTexture(i,n.get(e.prefix+t).getSourceImage(),!1)}));return s}console.warn("No atlas data for: "+t)},spineFileCallback:function(t,e,n,i,r,s){var o;if(Array.isArray(t))for(var a=0;a=i.PI2-n?t=e:(Math.abs(e-t)>Math.PI&&(e>>0,n=(e*=n)>>>0,n+=4294967296*(e-=n);return 2.3283064365386963e-10*((this.n=n)>>>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;e= 0.");if(null==e)throw new Error("name cannot be null.");this.index=t,this.name=e,this.parent=n}function de(t,e){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.mix=t.mix,this.softness=t.softness,this.bendDirection=t.bendDirection,this.compress=t.compress,this.stretch=t.stretch,this.bones=new Array;for(var n=0;n= 0.");if(null==e)throw new Error("name cannot be null.");if(null==n)throw new Error("boneData cannot be null.");this.index=t,this.name=e,this.boneData=n}function be(t,e){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new N.Vector2,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.rotateMix=t.rotateMix,this.translateMix=t.translateMix,this.scaleMix=t.scaleMix,this.shearMix=t.shearMix,this.bones=new Array;for(var n=0;n>>1;;){if(t[(s+1)*n]<=e?i=s+1:r=s,i==r)return(i+1)*n;s=i+r>>>1}},r.linearSearch=function(t,e,n){for(var i=0,r=t.length-n;i<=r;i+=n)if(t[i]>e)return i;return-1},r);function r(t,e,n){if(null==t)throw new Error("name cannot be null.");if(null==e)throw new Error("timelines cannot be null.");this.name=t,this.timelines=e,this.timelineIds=[];for(var i=0;i 0: "+t);this.curves=X.Utils.newFloatArray((t-1)*m.BEZIER_SIZE)}X.CurveTimeline=s;var o,a=(oe(M,o=s),M.prototype.getPropertyId=function(){return(n.rotate<<24)+this.boneIndex},M.prototype.setFrame=function(t,e,n){t<<=1,this.frames[t]=e,this.frames[t+M.ROTATION]=n},M.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=a[a.length-M.ENTRIES]){var u=a[a.length+M.PREV_ROTATION];switch(s){case Y.setup:h.rotation=h.data.rotation+u*r;break;case Y.first:case Y.replace:u+=h.data.rotation-h.rotation,u-=360*(16384-(16384.499999999996-u/360|0));case Y.add:h.rotation+=u*r}}else{var c=z.binarySearch(a,n,M.ENTRIES),d=a[c+M.PREV_ROTATION],f=a[c],p=this.getCurvePercent((c>>1)-1,1-(n-f)/(a[c+M.PREV_TIME]-f)),v=d+((v=a[c+M.ROTATION]-d)-360*(16384-(16384.499999999996-v/360|0)))*p;switch(s){case Y.setup:h.rotation=h.data.rotation+(v-360*(16384-(16384.499999999996-v/360|0)))*r;break;case Y.first:case Y.replace:v+=h.data.rotation-h.rotation;case Y.add:h.rotation+=(v-360*(16384-(16384.499999999996-v/360|0)))*r}}},M.ENTRIES=2,M.PREV_TIME=-2,M.PREV_ROTATION=-1,M.ROTATION=1,M);function M(t){var e=o.call(this,t)||this;return e.frames=X.Utils.newFloatArray(t<<1),e}X.RotateTimeline=a;var h,l=(oe(p,h=s),p.prototype.getPropertyId=function(){return(n.translate<<24)+this.boneIndex},p.prototype.setFrame=function(t,e,n,i){t*=p.ENTRIES,this.frames[t]=e,this.frames[t+p.X]=n,this.frames[t+p.Y]=i},p.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=a[a.length-p.ENTRIES]?(d=a[a.length+p.PREV_X],f=a[a.length+p.PREV_Y]):(d=a[(l=z.binarySearch(a,n,p.ENTRIES))+p.PREV_X],f=a[l+p.PREV_Y],u=a[l],c=this.getCurvePercent(l/p.ENTRIES-1,1-(n-u)/(a[l+p.PREV_TIME]-u)),d+=(a[l+p.X]-d)*c,f+=(a[l+p.Y]-f)*c),s){case Y.setup:h.x=h.data.x+d*r,h.y=h.data.y+f*r;break;case Y.first:case Y.replace:h.x+=(h.data.x+d-h.x)*r,h.y+=(h.data.y+f-h.y)*r;break;case Y.add:h.x+=d*r,h.y+=f*r}}},p.ENTRIES=3,p.PREV_TIME=-3,p.PREV_X=-2,p.PREV_Y=-1,p.X=1,p.Y=2,p);function p(t){var e=h.call(this,t)||this;return e.frames=X.Utils.newFloatArray(t*p.ENTRIES),e}X.TranslateTimeline=l;var u,c=(oe(x,u=l),x.prototype.getPropertyId=function(){return(n.scale<<24)+this.boneIndex},x.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=a[a.length-x.ENTRIES]?(d=a[a.length+x.PREV_X]*h.data.scaleX,a[a.length+x.PREV_Y]*h.data.scaleY):(d=a[(l=z.binarySearch(a,n,x.ENTRIES))+x.PREV_X],f=a[l+x.PREV_Y],u=a[l],c=this.getCurvePercent(l/x.ENTRIES-1,1-(n-u)/(a[l+x.PREV_TIME]-u)),d=(d+(a[l+x.X]-d)*c)*h.data.scaleX,(f+(a[l+x.Y]-f)*c)*h.data.scaleY),1==r)s==Y.add?(h.scaleX+=d-h.data.scaleX,h.scaleY+=f-h.data.scaleY):(h.scaleX=d,h.scaleY=f);else{var p=0,v=0;if(o==g.mixOut)switch(s){case Y.setup:p=h.data.scaleX,v=h.data.scaleY,h.scaleX=p+(Math.abs(d)*X.MathUtils.signum(p)-p)*r,h.scaleY=v+(Math.abs(f)*X.MathUtils.signum(v)-v)*r;break;case Y.first:case Y.replace:p=h.scaleX,v=h.scaleY,h.scaleX=p+(Math.abs(d)*X.MathUtils.signum(p)-p)*r,h.scaleY=v+(Math.abs(f)*X.MathUtils.signum(v)-v)*r;break;case Y.add:p=h.scaleX,v=h.scaleY,h.scaleX=p+(Math.abs(d)*X.MathUtils.signum(p)-h.data.scaleX)*r,h.scaleY=v+(Math.abs(f)*X.MathUtils.signum(v)-h.data.scaleY)*r}else switch(s){case Y.setup:p=Math.abs(h.data.scaleX)*X.MathUtils.signum(d),v=Math.abs(h.data.scaleY)*X.MathUtils.signum(f),h.scaleX=p+(d-p)*r,h.scaleY=v+(f-v)*r;break;case Y.first:case Y.replace:p=Math.abs(h.scaleX)*X.MathUtils.signum(d),v=Math.abs(h.scaleY)*X.MathUtils.signum(f),h.scaleX=p+(d-p)*r,h.scaleY=v+(f-v)*r;break;case Y.add:p=X.MathUtils.signum(d),v=X.MathUtils.signum(f),h.scaleX=Math.abs(h.scaleX)*p+(d-Math.abs(h.data.scaleX)*p)*r,h.scaleY=Math.abs(h.scaleY)*v+(f-Math.abs(h.data.scaleY)*v)*r}}}},x);function x(t){return u.call(this,t)||this}X.ScaleTimeline=c;var d,f=(oe(v,d=l),v.prototype.getPropertyId=function(){return(n.shear<<24)+this.boneIndex},v.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n=a[a.length-v.ENTRIES]?(d=a[a.length+v.PREV_X],f=a[a.length+v.PREV_Y]):(d=a[(l=z.binarySearch(a,n,v.ENTRIES))+v.PREV_X],f=a[l+v.PREV_Y],u=a[l],c=this.getCurvePercent(l/v.ENTRIES-1,1-(n-u)/(a[l+v.PREV_TIME]-u)),d+=(a[l+v.X]-d)*c,f+=(a[l+v.Y]-f)*c),s){case Y.setup:h.shearX=h.data.shearX+d*r,h.shearY=h.data.shearY+f*r;break;case Y.first:case Y.replace:h.shearX+=(h.data.shearX+d-h.shearX)*r,h.shearY+=(h.data.shearY+f-h.shearY)*r;break;case Y.add:h.shearX+=d*r,h.shearY+=f*r}}},v);function v(t){return d.call(this,t)||this}X.ShearTimeline=f;var y,w=(oe(E,y=s),E.prototype.getPropertyId=function(){return(n.color<<24)+this.slotIndex},E.prototype.setFrame=function(t,e,n,i,r,s){t*=E.ENTRIES,this.frames[t]=e,this.frames[t+E.R]=n,this.frames[t+E.G]=i,this.frames[t+E.B]=r,this.frames[t+E.A]=s},E.prototype.apply=function(t,e,n,i,r,s,o){var a=t.slots[this.slotIndex];if(a.bone.active){var h=this.frames;if(n=h[h.length-E.ENTRIES]?(v=h[(c=h.length)+E.PREV_R],g=h[c+E.PREV_G],M=h[c+E.PREV_B],m=h[c+E.PREV_A]):(v=h[(d=z.binarySearch(h,n,E.ENTRIES))+E.PREV_R],g=h[d+E.PREV_G],M=h[d+E.PREV_B],m=h[d+E.PREV_A],f=h[d],p=this.getCurvePercent(d/E.ENTRIES-1,1-(n-f)/(h[d+E.PREV_TIME]-f)),v+=(h[d+E.R]-v)*p,g+=(h[d+E.G]-g)*p,M+=(h[d+E.B]-M)*p,m+=(h[d+E.A]-m)*p),1==r?a.color.set(v,g,M,m):(l=a.color,s==Y.setup&&l.setFromColor(a.data.color),l.add((v-l.r)*r,(g-l.g)*r,(M-l.b)*r,(m-l.a)*r))}}},E.ENTRIES=5,E.PREV_TIME=-5,E.PREV_R=-4,E.PREV_G=-3,E.PREV_B=-2,E.PREV_A=-1,E.R=1,E.G=2,E.B=3,E.A=4,E);function E(t){var e=y.call(this,t)||this;return e.frames=X.Utils.newFloatArray(t*E.ENTRIES),e}X.ColorTimeline=w;var T,b=(oe(A,T=s),A.prototype.getPropertyId=function(){return(n.twoColor<<24)+this.slotIndex},A.prototype.setFrame=function(t,e,n,i,r,s,o,a,h){t*=A.ENTRIES,this.frames[t]=e,this.frames[t+A.R]=n,this.frames[t+A.G]=i,this.frames[t+A.B]=r,this.frames[t+A.A]=s,this.frames[t+A.R2]=o,this.frames[t+A.G2]=a,this.frames[t+A.B2]=h},A.prototype.apply=function(t,e,n,i,r,s,o){var a=t.slots[this.slotIndex];if(a.bone.active){var h=this.frames;if(n=h[h.length-A.ENTRIES]?(M=h[(f=h.length)+A.PREV_R],m=h[f+A.PREV_G],x=h[f+A.PREV_B],y=h[f+A.PREV_A],w=h[f+A.PREV_R2],E=h[f+A.PREV_G2],T=h[f+A.PREV_B2]):(M=h[(p=z.binarySearch(h,n,A.ENTRIES))+A.PREV_R],m=h[p+A.PREV_G],x=h[p+A.PREV_B],y=h[p+A.PREV_A],w=h[p+A.PREV_R2],E=h[p+A.PREV_G2],T=h[p+A.PREV_B2],v=h[p],g=this.getCurvePercent(p/A.ENTRIES-1,1-(n-v)/(h[p+A.PREV_TIME]-v)),M+=(h[p+A.R]-M)*g,m+=(h[p+A.G]-m)*g,x+=(h[p+A.B]-x)*g,y+=(h[p+A.A]-y)*g,w+=(h[p+A.R2]-w)*g,E+=(h[p+A.G2]-E)*g,T+=(h[p+A.B2]-T)*g),1==r?(a.color.set(M,m,x,y),a.darkColor.set(w,E,T,1)):(l=a.color,u=a.darkColor,s==Y.setup&&(l.setFromColor(a.data.color),u.setFromColor(a.data.darkColor)),l.add((M-l.r)*r,(m-l.g)*r,(x-l.b)*r,(y-l.a)*r),u.add((w-u.r)*r,(E-u.g)*r,(T-u.b)*r,0))}}},A.ENTRIES=8,A.PREV_TIME=-8,A.PREV_R=-7,A.PREV_G=-6,A.PREV_B=-5,A.PREV_A=-4,A.PREV_R2=-3,A.PREV_G2=-2,A.PREV_B2=-1,A.R=1,A.G=2,A.B=3,A.A=4,A.R2=5,A.G2=6,A.B2=7,A);function A(t){var e=T.call(this,t)||this;return e.frames=X.Utils.newFloatArray(t*A.ENTRIES),e}X.TwoColorTimeline=b;var R=(S.prototype.getPropertyId=function(){return(n.attachment<<24)+this.slotIndex},S.prototype.getFrameCount=function(){return this.frames.length},S.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.attachmentNames[t]=n},S.prototype.apply=function(t,e,n,i,r,s,o){var a,h,l,u=t.slots[this.slotIndex];u.bone.active&&(o!=g.mixOut?n<(a=this.frames)[0]?s!=Y.setup&&s!=Y.first||this.setAttachment(t,u,u.data.attachmentName):(h=0,h=n>=a[a.length-1]?a.length-1:z.binarySearch(a,n,1)-1,l=this.attachmentNames[h],t.slots[this.slotIndex].setAttachment(null==l?null:t.getAttachment(this.slotIndex,l))):s==Y.setup&&this.setAttachment(t,u,u.data.attachmentName))},S.prototype.setAttachment=function(t,e,n){e.attachment=null==n?null:t.getAttachment(this.slotIndex,n)},S);function S(t){this.frames=X.Utils.newFloatArray(t),this.attachmentNames=new Array(t)}X.AttachmentTimeline=R;var I,C=null,P=(oe(L,I=s),L.prototype.getPropertyId=function(){return(n.deform<<27)+ +this.attachment.id+this.slotIndex},L.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.frameVertices[t]=n},L.prototype.apply=function(t,e,n,i,r,s,o){var a=t.slots[this.slotIndex];if(a.bone.active){var h=a.getAttachment();if(h instanceof X.VertexAttachment&&h.deformAttachment==this.attachment){var l=a.deform;0==l.length&&(s=Y.setup);var u=this.frameVertices,c=u[0].length,d=this.frames;if(n=d[d.length-1]){var m=u[d.length-1];if(1==r)if(s==Y.add)if(null==(f=h).bones)for(var v=f.vertices,x=0;x=a[h-1])return;if(!(n=a[l];l++)i.push(this.events[l])}}},k);function k(t){this.frames=X.Utils.newFloatArray(t),this.events=new Array(t)}X.EventTimeline=_;var F=(O.prototype.getPropertyId=function(){return n.drawOrder<<24},O.prototype.getFrameCount=function(){return this.frames.length},O.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.drawOrders[t]=n},O.prototype.apply=function(t,e,n,i,r,s,o){var a=t.drawOrder,h=t.slots;if(o!=g.mixOut){var l=this.frames;if(n=l[l.length-1]?l.length-1:z.binarySearch(l,n)-1,c=this.drawOrders[u];if(null==c)X.Utils.arrayCopy(h,0,a,0,h.length);else for(var d=0,f=c.length;d=d[d.length-N.ENTRIES]?s==Y.setup?(f.mix=f.data.mix+(d[d.length+N.PREV_MIX]-f.data.mix)*r,f.softness=f.data.softness+(d[d.length+N.PREV_SOFTNESS]-f.data.softness)*r,o==g.mixOut?(f.bendDirection=f.data.bendDirection,f.compress=f.data.compress,f.stretch=f.data.stretch):(f.bendDirection=d[d.length+N.PREV_BEND_DIRECTION],f.compress=0!=d[d.length+N.PREV_COMPRESS],f.stretch=0!=d[d.length+N.PREV_STRETCH])):(f.mix+=(d[d.length+N.PREV_MIX]-f.mix)*r,f.softness+=(d[d.length+N.PREV_SOFTNESS]-f.softness)*r,o==g.mixIn&&(f.bendDirection=d[d.length+N.PREV_BEND_DIRECTION],f.compress=0!=d[d.length+N.PREV_COMPRESS],f.stretch=0!=d[d.length+N.PREV_STRETCH])):(h=d[(a=z.binarySearch(d,n,N.ENTRIES))+N.PREV_MIX],l=d[a+N.PREV_SOFTNESS],u=d[a],c=this.getCurvePercent(a/N.ENTRIES-1,1-(n-u)/(d[a+N.PREV_TIME]-u)),s==Y.setup?(f.mix=f.data.mix+(h+(d[a+N.MIX]-h)*c-f.data.mix)*r,f.softness=f.data.softness+(l+(d[a+N.SOFTNESS]-l)*c-f.data.softness)*r,o==g.mixOut?(f.bendDirection=f.data.bendDirection,f.compress=f.data.compress,f.stretch=f.data.stretch):(f.bendDirection=d[a+N.PREV_BEND_DIRECTION],f.compress=0!=d[a+N.PREV_COMPRESS],f.stretch=0!=d[a+N.PREV_STRETCH])):(f.mix+=(h+(d[a+N.MIX]-h)*c-f.mix)*r,f.softness+=(l+(d[a+N.SOFTNESS]-l)*c-f.softness)*r,o==g.mixIn&&(f.bendDirection=d[a+N.PREV_BEND_DIRECTION],f.compress=0!=d[a+N.PREV_COMPRESS],f.stretch=0!=d[a+N.PREV_STRETCH])))},N.ENTRIES=6,N.PREV_TIME=-6,N.PREV_MIX=-5,N.PREV_SOFTNESS=-4,N.PREV_BEND_DIRECTION=-3,N.PREV_COMPRESS=-2,N.PREV_STRETCH=-1,N.MIX=1,N.SOFTNESS=2,N.BEND_DIRECTION=3,N.COMPRESS=4,N.STRETCH=5,N);function N(t){var e=V.call(this,t)||this;return e.frames=X.Utils.newFloatArray(t*N.ENTRIES),e}X.IkConstraintTimeline=D;var U,B=(oe(W,U=s),W.prototype.getPropertyId=function(){return(n.transformConstraint<<24)+this.transformConstraintIndex},W.prototype.setFrame=function(t,e,n,i,r,s){t*=W.ENTRIES,this.frames[t]=e,this.frames[t+W.ROTATE]=n,this.frames[t+W.TRANSLATE]=i,this.frames[t+W.SCALE]=r,this.frames[t+W.SHEAR]=s},W.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.transformConstraints[this.transformConstraintIndex];if(h.active)if(n=a[a.length-W.ENTRIES]?(p=a[(u=a.length)+W.PREV_ROTATE],v=a[u+W.PREV_TRANSLATE],g=a[u+W.PREV_SCALE],M=a[u+W.PREV_SHEAR]):(p=a[(c=z.binarySearch(a,n,W.ENTRIES))+W.PREV_ROTATE],v=a[c+W.PREV_TRANSLATE],g=a[c+W.PREV_SCALE],M=a[c+W.PREV_SHEAR],d=a[c],f=this.getCurvePercent(c/W.ENTRIES-1,1-(n-d)/(a[c+W.PREV_TIME]-d)),p+=(a[c+W.ROTATE]-p)*f,v+=(a[c+W.TRANSLATE]-v)*f,g+=(a[c+W.SCALE]-g)*f,M+=(a[c+W.SHEAR]-M)*f),s==Y.setup?(l=h.data,h.rotateMix=l.rotateMix+(p-l.rotateMix)*r,h.translateMix=l.translateMix+(v-l.translateMix)*r,h.scaleMix=l.scaleMix+(g-l.scaleMix)*r,h.shearMix=l.shearMix+(M-l.shearMix)*r):(h.rotateMix+=(p-h.rotateMix)*r,h.translateMix+=(v-h.translateMix)*r,h.scaleMix+=(g-h.scaleMix)*r,h.shearMix+=(M-h.shearMix)*r)}},W.ENTRIES=5,W.PREV_TIME=-5,W.PREV_ROTATE=-4,W.PREV_TRANSLATE=-3,W.PREV_SCALE=-2,W.PREV_SHEAR=-1,W.ROTATE=1,W.TRANSLATE=2,W.SCALE=3,W.SHEAR=4,W);function W(t){var e=U.call(this,t)||this;return e.frames=X.Utils.newFloatArray(t*W.ENTRIES),e}X.TransformConstraintTimeline=B;var q,G=(oe(H,q=s),H.prototype.getPropertyId=function(){return(n.pathConstraintPosition<<24)+this.pathConstraintIndex},H.prototype.setFrame=function(t,e,n){t*=H.ENTRIES,this.frames[t]=e,this.frames[t+H.VALUE]=n},H.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n=a[a.length-H.ENTRIES]?d=a[a.length+H.PREV_VALUE]:(d=a[(l=z.binarySearch(a,n,H.ENTRIES))+H.PREV_VALUE],u=a[l],c=this.getCurvePercent(l/H.ENTRIES-1,1-(n-u)/(a[l+H.PREV_TIME]-u)),d+=(a[l+H.VALUE]-d)*c),s==Y.setup?h.position=h.data.position+(d-h.data.position)*r:h.position+=(d-h.position)*r}},H.ENTRIES=2,H.PREV_TIME=-2,H.PREV_VALUE=-1,H.VALUE=1,H);function H(t){var e=q.call(this,t)||this;return e.frames=X.Utils.newFloatArray(t*H.ENTRIES),e}X.PathConstraintPositionTimeline=G;var j,Z=(oe(K,j=G),K.prototype.getPropertyId=function(){return(n.pathConstraintSpacing<<24)+this.pathConstraintIndex},K.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n=a[a.length-K.ENTRIES]?d=a[a.length+K.PREV_VALUE]:(d=a[(l=z.binarySearch(a,n,K.ENTRIES))+K.PREV_VALUE],u=a[l],c=this.getCurvePercent(l/K.ENTRIES-1,1-(n-u)/(a[l+K.PREV_TIME]-u)),d+=(a[l+K.VALUE]-d)*c),s==Y.setup?h.spacing=h.data.spacing+(d-h.data.spacing)*r:h.spacing+=(d-h.spacing)*r}},K);function K(t){return j.call(this,t)||this}X.PathConstraintSpacingTimeline=Z;var Q,J=(oe($,Q=s),$.prototype.getPropertyId=function(){return(n.pathConstraintMix<<24)+this.pathConstraintIndex},$.prototype.setFrame=function(t,e,n,i){t*=$.ENTRIES,this.frames[t]=e,this.frames[t+$.ROTATE]=n,this.frames[t+$.TRANSLATE]=i},$.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n=a[a.length-$.ENTRIES]?(d=a[a.length+$.PREV_ROTATE],f=a[a.length+$.PREV_TRANSLATE]):(d=a[(l=z.binarySearch(a,n,$.ENTRIES))+$.PREV_ROTATE],f=a[l+$.PREV_TRANSLATE],u=a[l],c=this.getCurvePercent(l/$.ENTRIES-1,1-(n-u)/(a[l+$.PREV_TIME]-u)),d+=(a[l+$.ROTATE]-d)*c,f+=(a[l+$.TRANSLATE]-f)*c),s==Y.setup?(h.rotateMix=h.data.rotateMix+(d-h.data.rotateMix)*r,h.translateMix=h.data.translateMix+(f-h.data.translateMix)*r):(h.rotateMix+=(d-h.rotateMix)*r,h.translateMix+=(f-h.translateMix)*r)}},$.ENTRIES=3,$.PREV_TIME=-3,$.PREV_ROTATE=-2,$.PREV_TRANSLATE=-1,$.ROTATE=1,$.TRANSLATE=2,$);function $(t){var e=Q.call(this,t)||this;return e.frames=X.Utils.newFloatArray(t*$.ENTRIES),e}X.PathConstraintMixTimeline=J}(re=re||{}),function(R){var t=(S.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,n=0,i=e.length;n=r.trackEnd&&null==r.mixingFrom){e[n]=null,this.queue.end(r),this.disposeNext(r);continue}if(null!=r.mixingFrom&&this.updateMixingFrom(r,t)){var h=r.mixingFrom;for((r.mixingFrom=null)!=h&&(h.mixingTo=null);null!=h;)this.queue.end(h),h=h.mixingFrom}r.trackTime+=s}}this.queue.drain()},S.prototype.updateMixingFrom=function(t,e){var n=t.mixingFrom;if(null==n)return!0;var i=this.updateMixingFrom(n,e);return n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,0=t.mixDuration?(0!=n.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=n.mixingFrom,null!=n.mixingFrom&&(n.mixingFrom.mixingTo=t),t.interruptAlpha=n.interruptAlpha,this.queue.end(n)),i):(n.trackTime+=e*n.timeScale,t.mixTime+=e,!1)},S.prototype.apply=function(t){if(null==t)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var e=this.events,n=this.tracks,i=!1,r=0,s=n.length;r=o.trackEnd&&null==o.next&&(h=0);var l=o.animationLast,u=o.getAnimationTime(),c=o.animation.timelines.length,d=o.animation.timelines;if(0==r&&1==h||a==R.MixBlend.add)for(var f=0;f=s[s.length-1]?s.length-1:R.Animation.binarySearch(s,n)-1,this.setAttachment(e,a,t.attachmentNames[o],r)),a.attachmentState<=this.unkeyedState&&(a.attachmentState=this.unkeyedState+S.SETUP))},S.prototype.setAttachment=function(t,e,n,i){e.attachment=null==n?null:t.getAttachment(e.data.index,n),i&&(e.attachmentState=this.unkeyedState+S.CURRENT)},S.prototype.applyRotateTimeline=function(t,e,n,i,r,s,o,a){if(a&&(s[o]=0),1!=i){var h=t,l=h.frames,u=e.bones[h.boneIndex];if(u.active){var c=0,d=0;if(n=l[l.length-R.RotateTimeline.ENTRIES]?d=u.data.rotation+l[l.length+R.RotateTimeline.PREV_ROTATION]:(p=l[(f=R.Animation.binarySearch(l,n,R.RotateTimeline.ENTRIES))+R.RotateTimeline.PREV_ROTATION],v=l[f],g=h.getCurvePercent((f>>1)-1,1-(n-v)/(l[f+R.RotateTimeline.PREV_TIME]-v)),d=l[f+R.RotateTimeline.ROTATION]-p,d=p+(d-=360*(16384-(16384.499999999996-d/360|0)))*g+u.data.rotation,d-=360*(16384-(16384.499999999996-d/360|0)))}var M,m,x,y,w=0,E=d-c;0==(E-=360*(16384-(16384.499999999996-E/360|0)))?w=s[o]:(m=M=0,m=a?(M=0,E):(M=s[o],s[o+1]),x=0i||this.queue.event(t,l)}for((t.loop?0==r||s>t.trackTime%r:i<=e&&t.animationLast=this.tracks.length)){var e=this.tracks[t];if(null!=e){this.queue.end(e),this.disposeNext(e);for(var n=e;;){var i=n.mixingFrom;if(null==i)break;this.queue.end(i),n.mixingFrom=null,n.mixingTo=null,n=i}this.tracks[e.trackIndex]=null,this.queue.drain()}}},S.prototype.setCurrent=function(t,e,n){var i=this.expandToIndex(t);this.tracks[t]=e,null!=i&&(n&&this.queue.interrupt(i),((e.mixingFrom=i).mixingTo=e).mixTime=0,null!=i.mixingFrom&&0=this.tracks.length?null:this.tracks[t]},S.prototype.addListener=function(t){if(null==t)throw new Error("listener cannot be null.");this.listeners.push(t)},S.prototype.removeListener=function(t){var e=this.listeners.indexOf(t);0<=e&&this.listeners.splice(e,1)},S.prototype.clearListeners=function(){this.listeners.length=0},S.prototype.clearListenerNotifications=function(){this.queue.clear()},S.emptyAnimation=new R.Animation("",[],0),S.SUBSEQUENT=0,S.FIRST=1,S.HOLD_SUBSEQUENT=2,S.HOLD_FIRST=3,S.HOLD_MIX=4,S.SETUP=1,S.CURRENT=2,S);function S(t){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new r(this),this.propertyIDs=new R.IntSet,this.animationsChanged=!1,this.trackEntryPool=new R.Pool(function(){return new e}),this.data=t}R.AnimationState=t;var e=(n.prototype.reset=function(){this.next=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0},n.prototype.getAnimationTime=function(){if(this.loop){var t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)},n.prototype.setAnimationLast=function(t){this.animationLast=t,this.nextAnimationLast=t},n.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},n.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},n);function n(){this.mixBlend=R.MixBlend.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}R.TrackEntry=e;var a,i,r=(s.prototype.start=function(t){this.objects.push(a.start),this.objects.push(t),this.animState.animationsChanged=!0},s.prototype.interrupt=function(t){this.objects.push(a.interrupt),this.objects.push(t)},s.prototype.end=function(t){this.objects.push(a.end),this.objects.push(t),this.animState.animationsChanged=!0},s.prototype.dispose=function(t){this.objects.push(a.dispose),this.objects.push(t)},s.prototype.complete=function(t){this.objects.push(a.complete),this.objects.push(t)},s.prototype.event=function(t,e){this.objects.push(a.event),this.objects.push(t),this.objects.push(e)},s.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var t=this.objects,e=this.animState.listeners,n=0;nj.MathUtils.PI?U-=j.MathUtils.PI2:U<-j.MathUtils.PI&&(U+=j.MathUtils.PI2),U*=e,V=Math.cos(U),D=Math.sin(U),R.a=V*_-D*F,R.b=V*k-D*O,R.c=D*_+V*F,R.d=D*k+V*O),R.appliedValid=!1}}}},pe.prototype.computeWorldPositions=function(t,e,n,i,r){var s=this.target,o=this.position,a=this.spaces,h=j.Utils.setArraySize(this.positions,3*e+2),l=null,u=t.closed,c=t.worldVerticesLength,d=c/6,f=pe.NONE;if(!t.constantSpeed){var p=t.lengths,v=p[d-=u?1:2];if(i&&(o*=v),r)for(var g=1;g>>1^-(1&n)},e.prototype.readStringRef=function(){var t=this.readInt(!0);return 0==t?null:this.strings[t-1]},e.prototype.readString=function(){var t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;for(var e="",n=0;n>4){case 12:case 13:e+=String.fromCharCode((31&i)<<6|63&this.readByte()),n+=2;break;case 14:e+=String.fromCharCode((15&i)<<12|(63&this.readByte())<<6|63&this.readByte()),n+=3;break;default:e+=String.fromCharCode(i),n++}}return e},e.prototype.readFloat=function(){var t=this.buffer.getFloat32(this.index);return this.index+=4,t},e.prototype.readBoolean=function(){return 0!=this.readByte()},e);function e(t,e,n,i){void 0===e&&(e=new Array),void 0===n&&(n=0),void 0===i&&(i=new DataView(t.buffer)),this.strings=e,this.index=n,this.buffer=i}var N=function(t,e,n,i,r){this.mesh=t,this.skin=e,this.slotIndex=n,this.parent=i,this.inheritDeform=r},u=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),this.bones=t,this.vertices=e}}(re=re||{}),C=re=re||{},xe.prototype.update=function(t,e){if(null==t)throw new Error("skeleton cannot be null.");var n=this.boundingBoxes,i=this.polygons,r=this.polygonPool,s=t.slots,o=s.length;n.length=0,r.freeAll(i);for(var a=i.length=0;a=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},xe.prototype.aabbIntersectsSegment=function(t,e,n,i){var r=this.minX,s=this.minY,o=this.maxX,a=this.maxY;if(t<=r&&n<=r||e<=s&&i<=s||o<=t&&o<=n||a<=e&&a<=i)return!1;var h=(i-e)/(n-t),l=h*(r-t)+e;if(st.minX&&this.minYt.minY},xe.prototype.containsPoint=function(t,e){for(var n=this.polygons,i=0,r=n.length;i>1,N=this.clipOutput,U=Z.Utils.setArraySize(l,P+D*f),B=0;B>1;a=i.length&&(i.length=t+1),i[t]||(i[t]={}),i[t][e]=n},e.prototype.addSkin=function(t){for(var e=0;e=this.lines.length?null:this.lines[this.index++]},n.prototype.readValue=function(){var t=this.readLine(),e=t.indexOf(":");if(-1==e)throw new Error("Invalid line: "+t);return t.substring(e+1).trim()},n.prototype.readTuple=function(t){var e=this.readLine(),n=e.indexOf(":");if(-1==n)throw new Error("Invalid line: "+e);for(var i=0,r=n+1;i<3;i++){var s=e.indexOf(",",r);if(-1==s)break;t[i]=e.substr(r,s-r).trim(),r=s+1}return t[i]=e.substring(r).trim(),i+1},n);function n(t){this.index=0,this.lines=t.split(/\r\n|\r|\n/)}var v=function(){};f.TextureAtlasPage=v;var i,g=(i=f.TextureRegion,oe(r,i),r);function r(){return null!==i&&i.apply(this,arguments)||this}f.TextureAtlasRegion=g}(re=re||{}),N=re=re||{},be.prototype.isActive=function(){return this.active},be.prototype.apply=function(){this.update()},be.prototype.update=function(){this.data.local?this.data.relative?this.applyRelativeLocal():this.applyAbsoluteLocal():this.data.relative?this.applyRelativeWorld():this.applyAbsoluteWorld()},be.prototype.applyAbsoluteWorld=function(){for(var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target,s=r.a,o=r.b,a=r.c,h=r.d,l=0N.MathUtils.PI?b-=N.MathUtils.PI2:b<-N.MathUtils.PI&&(b+=N.MathUtils.PI2),b*=t,M=Math.cos(b),m=Math.sin(b),R.a=M*v-m*g,R.b=M*w-m*E,R.c=m*v+M*g,R.d=m*w+M*E,S=!0),0!=e&&(x=this.temp,r.localToWorld(x.set(this.data.offsetX,this.data.offsetY)),R.worldX+=(x.x-R.worldX)*e,R.worldY+=(x.y-R.worldY)*e,S=!0),0N.MathUtils.PI?b-=N.MathUtils.PI2:b<-N.MathUtils.PI&&(b+=N.MathUtils.PI2),b=T+(b+c)*i,A=Math.sqrt(w*w+E*E),R.b=Math.cos(b)*A,R.d=Math.sin(b)*A,S=!0),S&&(R.appliedValid=!1)}},be.prototype.applyRelativeWorld=function(){for(var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target,s=r.a,o=r.b,a=r.c,h=r.d,l=0N.MathUtils.PI?y-=N.MathUtils.PI2:y<-N.MathUtils.PI&&(y+=N.MathUtils.PI2),y*=t,M=Math.cos(y),m=Math.sin(y),b.a=M*v-m*g,b.b=M*w-m*E,b.c=m*v+M*g,b.d=m*w+M*E,A=!0),0!=e&&(x=this.temp,r.localToWorld(x.set(this.data.offsetX,this.data.offsetY)),b.worldX+=x.x*e,b.worldY+=x.y*e,A=!0),0N.MathUtils.PI?y-=N.MathUtils.PI2:y<-N.MathUtils.PI&&(y+=N.MathUtils.PI2),w=b.b,E=b.d,y=Math.atan2(E,w)+(y-N.MathUtils.PI/2+c)*i,T=Math.sqrt(w*w+E*E),b.b=Math.cos(y)*T,b.d=Math.sin(y)*T,A=!0),A&&(b.appliedValid=!1)}},be.prototype.applyAbsoluteLocal=function(){var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target;r.appliedValid||r.updateAppliedTransform();for(var s=this.bones,o=0,a=s.length;o>1,i=this.indicesArray,r=i.length=0;r>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255},r.rgb888ToColor=function(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255},r.WHITE=new r(1,1,1,1),r.RED=new r(1,0,0,1),r.GREEN=new r(0,1,0,1),r.BLUE=new r(0,0,1,1),r.MAGENTA=new r(1,0,1,1),r);function r(t,e,n,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),this.r=t,this.g=e,this.b=n,this.a=i}t.Color=i;var s=(o.clamp=function(t,e,n){return t=e?t:g.setArraySize(t,e,n)},g.newArray=function(t,e){for(var n=new Array(t),i=0;ithis.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,1=this.values.length},R.prototype.addValue=function(t){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0},R.prototype.getMean=function(){if(this.hasEnoughData()){if(this.dirty){for(var t=0,e=0;e>1)*s;var o=t.bone.skeleton,a=t.deform,h=this.vertices,l=this.bones;if(null!=l){for(var u=0,c=0,d=0;dthis.vertices.length)throw Error("Mesh can't store more than "+this.maxVertices()+" vertices");this.vertices.set(t,0),this.verticesLength=t.length},e.prototype.setIndices=function(t){if(this.dirtyIndices=!0,t.length>this.indices.length)throw Error("Mesh can't store more than "+this.maxIndices()+" indices");this.indices.set(t,0),this.indicesLength=t.length},e.prototype.draw=function(t,e){this.drawWithOffset(t,e,0,0this.mesh.getVertices().length||this.indicesLength+n.length>this.mesh.getIndices().length)&&this.flush();var i=this.mesh.numVertices();this.mesh.getVertices().set(e,this.verticesLength),this.verticesLength+=e.length,this.mesh.setVerticesLength(this.verticesLength);for(var r=this.mesh.getIndices(),s=this.indicesLength,o=0;o 0.");null===r&&(r=this.color);var o=2*zt.MathUtils.PI/s,a=Math.cos(o),h=Math.sin(o),l=i,u=0;if(t){for(this.check(qt.Filled,3*s+3),s--,d=0;d>1))-2],w=d[p-1],v=0,g=p;v>1,d.numFloats=d.numVertices*E,d.numFloats>d.vertices.length&&(d.vertices=this.vertices=Qt.Utils.newFloatArray(d.numFloats)),S.computeWorldVertices(T,0,S.worldVerticesLength,d.vertices,0,E),p=S.triangles,A=S.region.renderObject.texture,f=S.uvs,g=S.color}if(null!=A){var I=T.color,C=this.tempColor;C.r=M.r*I.r*g.r,C.g=M.g*I.g*g.g,C.b=M.b*I.b*g.b,C.a=M.a*I.a*g.a,s&&(C.r*=C.a,C.g*=C.a,C.b*=C.a);var P=this.tempColor2;null==T.darkColor?P.set(0,0,0,1):(s?(P.r=T.darkColor.r*C.a,P.g=T.darkColor.g*C.a,P.b=T.darkColor.b*C.a):P.setFromColor(T.darkColor),P.a=s?1:0);var L=T.data.blendMode;if(L!=a&&(a=L,t.setBlendMode(Jt.WebGLBlendModeConverter.getSourceGLBlendMode(a,s),Jt.WebGLBlendModeConverter.getDestGLBlendMode(a))),r.isClipping()){r.clipTriangles(d.vertices,d.numFloats,p,p.length,f,C,P,o);var _=new Float32Array(r.clippedVertices),k=r.clippedTriangles;if(null!=this.vertexEffect){var F=this.vertexEffect,O=_;if(o)for(var V=0,D=_.length;V>16&255)/255,r=(t>>8&255)/255,s=(255&t)/255,o=16777215>>24)/255:null,a=this.skeleton;return!e||(n=this.findSlot(e))&&(a=n),a.color.r=i,a.color.g=r,a.color.b=s,null!==o&&(a.color.a=o),this},setSkeletonFromJSON:function(t,e,n,i){return this.setSkeleton(t,e,n,i)},setSkeleton:function(t,e,n,i){this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications());var r=this.plugin.createSkeleton(t,i);this.skeletonData=r.skeletonData,this.preMultipliedAlpha=r.preMultipliedAlpha;var s=r.skeleton;return s.setSkin(),s.setToSetupPose(),this.skeleton=s,r=this.plugin.createAnimationState(s),this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications()),this.state=r.state,this.stateData=r.stateData,this.state.addListener({event:this.onEvent.bind(this),complete:this.onComplete.bind(this),start:this.onStart.bind(this),end:this.onEnd.bind(this),dispose:this.onDispose.bind(this),interrupted:this.onInterrupted.bind(this)}),e&&this.setAnimation(0,e,n),this.root=this.getRootBone(),this.root&&(this.root.rotation=v(d(this.rotation))+90),this.state.apply(s),s.updateCache(),this.updateSize()},onComplete:function(t){this.emit(g.COMPLETE,t)},onDispose:function(t){this.emit(g.DISPOSE,t)},onEnd:function(t){this.emit(g.END,t)},onEvent:function(t,e){this.emit(g.EVENT,t,e)},onInterrupted:function(t){this.emit(g.INTERRUPTED,t)},onStart:function(t){this.emit(g.START,t)},refresh:function(){return this.root&&(this.root.rotation=v(d(this.rotation))+90),this.updateSize(),this.skeleton.updateCache(),this},setSize:function(t,e,n,i){var r=this.skeleton;return void 0===t&&(t=r.data.width),void 0===e&&(e=r.data.height),void 0===n&&(n=0),void 0===i&&(i=0),this.width=t,this.height=e,this.displayOriginX=r.x-n,this.displayOriginY=r.y-i,this},setOffset:function(t,e){var n=this.skeleton;return void 0===t&&(t=0),void 0===e&&(e=0),this.displayOriginX=n.x-t,this.displayOriginY=n.y-e,this},updateSize:function(){var t=this.skeleton,e=this.plugin.renderer.height,n=this.scaleX,i=this.scaleY;t.x=this.x,t.y=e-this.y,t.scaleX=1,t.scaleY=1,t.updateWorldTransform();var r=this.getBounds();return this.width=r.size.x,this.height=r.size.y,this.displayOriginX=this.x-r.offset.x,this.displayOriginY=this.y-(e-(this.height+r.offset.y)),t.scaleX=n,t.scaleY=i,t.updateWorldTransform(),this},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,this.refresh()}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,this.refresh()}},getBoneList:function(){var t=[],e=this.skeletonData;if(e)for(var n=0;nMath.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},function(t,e,i){var n=i(2);t.exports=function(t){return t*n.RAD_TO_DEG}},function(t,e){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}},function(t,e,i){var n=i(23),r=i(56);t.exports=function(t,e){if(void 0===e&&(e=90),!n(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=r(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=r(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;i=t.length)){for(var i=t.length-1,n=t[e],r=e;r=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},function(t,e){t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},function(t,e,i){var u=i(7),c=function(){var t,e,i,n,r,s,a=arguments[0]||{},o=1,h=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[1]||{},o=2),h===o&&(a=this,--o);os[0]&&(e=1),s[8]>s[3*e+e]&&(e=2),i=o[e],n=o[i],r=Math.sqrt(s[3*e+e]-s[3*i+i]-s[3*n+n]+1),h[e]=.5*r,r=.5/r,h[i]=(s[3*i+e]+s[3*e+i])*r,h[n]=(s[3*n+e]+s[3*e+n])*r,this.x=h[0],this.y=h[1],this.z=h[2],this.w=(s[3*n+i]-s[3*i+n])*r),this}});t.exports=f},function(t,e,i){var r=i(26),s=i(45);t.exports=function(t,e){var i=void 0===t?s():r({},t);if(e)for(var n in e)void 0!==e[n]&&(i[n]=e[n]);return i}},function(t,e){t.exports=function(t,e,i,n,r,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===r&&(r=0),void 0===s&&(s=!1),{responseType:t,async:e,user:i,password:n,timeout:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:s}}},function(t,e){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}}},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e){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}}},function(t,e){var i={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=i},function(t,e,i){var n=i(2),r=i(51),h=i(40),s=i(29),a=i(30),l=i(1),o={_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,0===(this._scaleY=t)?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){0===(this._scaleX=t)?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){0===(this._scaleY=t)?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return a(this._rotation*n.RAD_TO_DEG)},set:function(t){this.rotation=a(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=s(t)}},setPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.z=i,this.w=n,this},setRandomPosition:function(t,e,i,n){return 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),this.x=t+Math.random()*i,this.y=e+Math.random()*n,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 r),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t,e){void 0===t&&(t=new r),void 0===e&&(e=new r);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,n){i=i||new l;var r=(n=n||this.scene.sys.cameras.main).scrollX,s=n.scrollY,a=t+r*this.scrollFactorX-r,o=e+s*this.scrollFactorY-s;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(a,o,i):h(a,o,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=o},function(t,e,i){var n=i(0),s=i(2),c=i(1),r=new n({initialize:function(t,e,i,n,r,s){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=1),void 0===r&&(r=0),void 0===s&&(s=0),this.matrix=new Float32Array([t,e,i,n,r,s,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0}},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],n=t[2],r=t[3];return e||i?0e.length&&(s=e.length),i?(n=e[s-1][i],(r=e[s][i])-t<=t-n?e[s]:e[s-1]):(n=e[s-1],(r=e[s])-t<=t-n?r:n)}},function(t,e){t.exports=function(t){for(var e=t.length-1;0=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(e>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return 2.3283064365386963e-10*((this.n=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;e= 0.");if(null==e)throw new Error("name cannot be null.");this.index=t,this.name=e,this.parent=i}function fe(t,e){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.mix=t.mix,this.softness=t.softness,this.bendDirection=t.bendDirection,this.compress=t.compress,this.stretch=t.stretch,this.bones=new Array;for(var i=0;i= 0.");if(null==e)throw new Error("name cannot be null.");if(null==i)throw new Error("boneData cannot be null.");this.index=t,this.name=e,this.boneData=i}function Ae(t,e){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new V.Vector2,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.rotateMix=t.rotateMix,this.translateMix=t.translateMix,this.scaleMix=t.scaleMix,this.shearMix=t.shearMix,this.bones=new Array;for(var i=0;i>>1;;){if(t[(s+1)*i]<=e?n=s+1:r=s,n==r)return(n+1)*i;s=n+r>>>1}},r.linearSearch=function(t,e,i){for(var n=0,r=t.length-i;n<=r;n+=i)if(t[n]>e)return n;return-1},r);function r(t,e,i){if(null==t)throw new Error("name cannot be null.");if(null==e)throw new Error("timelines cannot be null.");this.name=t,this.timelines=e,this.timelineIds=[];for(var n=0;n 0: "+t);this.curves=Y.Utils.newFloatArray((t-1)*M.BEZIER_SIZE)}Y.CurveTimeline=s;var a,o=(ae(v,a=s),v.prototype.getPropertyId=function(){return(i.rotate<<24)+this.boneIndex},v.prototype.setFrame=function(t,e,i){t<<=1,this.frames[t]=e,this.frames[t+v.ROTATION]=i},v.prototype.apply=function(t,e,i,n,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(i=o[o.length-v.ENTRIES]){var u=o[o.length+v.PREV_ROTATION];switch(s){case X.setup:h.rotation=h.data.rotation+u*r;break;case X.first:case X.replace:u+=h.data.rotation-h.rotation,u-=360*(16384-(16384.499999999996-u/360|0));case X.add:h.rotation+=u*r}}else{var c=z.binarySearch(o,i,v.ENTRIES),f=o[c+v.PREV_ROTATION],d=o[c],p=this.getCurvePercent((c>>1)-1,1-(i-d)/(o[c+v.PREV_TIME]-d)),m=f+((m=o[c+v.ROTATION]-f)-360*(16384-(16384.499999999996-m/360|0)))*p;switch(s){case X.setup:h.rotation=h.data.rotation+(m-360*(16384-(16384.499999999996-m/360|0)))*r;break;case X.first:case X.replace:m+=h.data.rotation-h.rotation;case X.add:h.rotation+=(m-360*(16384-(16384.499999999996-m/360|0)))*r}}},v.ENTRIES=2,v.PREV_TIME=-2,v.PREV_ROTATION=-1,v.ROTATION=1,v);function v(t){var e=a.call(this,t)||this;return e.frames=Y.Utils.newFloatArray(t<<1),e}Y.RotateTimeline=o;var h,l=(ae(p,h=s),p.prototype.getPropertyId=function(){return(i.translate<<24)+this.boneIndex},p.prototype.setFrame=function(t,e,i,n){t*=p.ENTRIES,this.frames[t]=e,this.frames[t+p.X]=i,this.frames[t+p.Y]=n},p.prototype.apply=function(t,e,i,n,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(i=o[o.length-p.ENTRIES]?(f=o[o.length+p.PREV_X],d=o[o.length+p.PREV_Y]):(f=o[(l=z.binarySearch(o,i,p.ENTRIES))+p.PREV_X],d=o[l+p.PREV_Y],u=o[l],c=this.getCurvePercent(l/p.ENTRIES-1,1-(i-u)/(o[l+p.PREV_TIME]-u)),f+=(o[l+p.X]-f)*c,d+=(o[l+p.Y]-d)*c),s){case X.setup:h.x=h.data.x+f*r,h.y=h.data.y+d*r;break;case X.first:case X.replace:h.x+=(h.data.x+f-h.x)*r,h.y+=(h.data.y+d-h.y)*r;break;case X.add:h.x+=f*r,h.y+=d*r}}},p.ENTRIES=3,p.PREV_TIME=-3,p.PREV_X=-2,p.PREV_Y=-1,p.X=1,p.Y=2,p);function p(t){var e=h.call(this,t)||this;return e.frames=Y.Utils.newFloatArray(t*p.ENTRIES),e}Y.TranslateTimeline=l;var u,c=(ae(x,u=l),x.prototype.getPropertyId=function(){return(i.scale<<24)+this.boneIndex},x.prototype.apply=function(t,e,i,n,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(i=o[o.length-x.ENTRIES]?(f=o[o.length+x.PREV_X]*h.data.scaleX,o[o.length+x.PREV_Y]*h.data.scaleY):(f=o[(l=z.binarySearch(o,i,x.ENTRIES))+x.PREV_X],d=o[l+x.PREV_Y],u=o[l],c=this.getCurvePercent(l/x.ENTRIES-1,1-(i-u)/(o[l+x.PREV_TIME]-u)),f=(f+(o[l+x.X]-f)*c)*h.data.scaleX,(d+(o[l+x.Y]-d)*c)*h.data.scaleY),1==r)s==X.add?(h.scaleX+=f-h.data.scaleX,h.scaleY+=d-h.data.scaleY):(h.scaleX=f,h.scaleY=d);else{var p=0,m=0;if(a==g.mixOut)switch(s){case X.setup:p=h.data.scaleX,m=h.data.scaleY,h.scaleX=p+(Math.abs(f)*Y.MathUtils.signum(p)-p)*r,h.scaleY=m+(Math.abs(d)*Y.MathUtils.signum(m)-m)*r;break;case X.first:case X.replace:p=h.scaleX,m=h.scaleY,h.scaleX=p+(Math.abs(f)*Y.MathUtils.signum(p)-p)*r,h.scaleY=m+(Math.abs(d)*Y.MathUtils.signum(m)-m)*r;break;case X.add:p=h.scaleX,m=h.scaleY,h.scaleX=p+(Math.abs(f)*Y.MathUtils.signum(p)-h.data.scaleX)*r,h.scaleY=m+(Math.abs(d)*Y.MathUtils.signum(m)-h.data.scaleY)*r}else switch(s){case X.setup:p=Math.abs(h.data.scaleX)*Y.MathUtils.signum(f),m=Math.abs(h.data.scaleY)*Y.MathUtils.signum(d),h.scaleX=p+(f-p)*r,h.scaleY=m+(d-m)*r;break;case X.first:case X.replace:p=Math.abs(h.scaleX)*Y.MathUtils.signum(f),m=Math.abs(h.scaleY)*Y.MathUtils.signum(d),h.scaleX=p+(f-p)*r,h.scaleY=m+(d-m)*r;break;case X.add:p=Y.MathUtils.signum(f),m=Y.MathUtils.signum(d),h.scaleX=Math.abs(h.scaleX)*p+(f-Math.abs(h.data.scaleX)*p)*r,h.scaleY=Math.abs(h.scaleY)*m+(d-Math.abs(h.data.scaleY)*m)*r}}}},x);function x(t){return u.call(this,t)||this}Y.ScaleTimeline=c;var f,d=(ae(m,f=l),m.prototype.getPropertyId=function(){return(i.shear<<24)+this.boneIndex},m.prototype.apply=function(t,e,i,n,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(i=o[o.length-m.ENTRIES]?(f=o[o.length+m.PREV_X],d=o[o.length+m.PREV_Y]):(f=o[(l=z.binarySearch(o,i,m.ENTRIES))+m.PREV_X],d=o[l+m.PREV_Y],u=o[l],c=this.getCurvePercent(l/m.ENTRIES-1,1-(i-u)/(o[l+m.PREV_TIME]-u)),f+=(o[l+m.X]-f)*c,d+=(o[l+m.Y]-d)*c),s){case X.setup:h.shearX=h.data.shearX+f*r,h.shearY=h.data.shearY+d*r;break;case X.first:case X.replace:h.shearX+=(h.data.shearX+f-h.shearX)*r,h.shearY+=(h.data.shearY+d-h.shearY)*r;break;case X.add:h.shearX+=f*r,h.shearY+=d*r}}},m);function m(t){return f.call(this,t)||this}Y.ShearTimeline=d;var y,w=(ae(T,y=s),T.prototype.getPropertyId=function(){return(i.color<<24)+this.slotIndex},T.prototype.setFrame=function(t,e,i,n,r,s){t*=T.ENTRIES,this.frames[t]=e,this.frames[t+T.R]=i,this.frames[t+T.G]=n,this.frames[t+T.B]=r,this.frames[t+T.A]=s},T.prototype.apply=function(t,e,i,n,r,s,a){var o=t.slots[this.slotIndex];if(o.bone.active){var h=this.frames;if(i=h[h.length-T.ENTRIES]?(m=h[(c=h.length)+T.PREV_R],g=h[c+T.PREV_G],v=h[c+T.PREV_B],M=h[c+T.PREV_A]):(m=h[(f=z.binarySearch(h,i,T.ENTRIES))+T.PREV_R],g=h[f+T.PREV_G],v=h[f+T.PREV_B],M=h[f+T.PREV_A],d=h[f],p=this.getCurvePercent(f/T.ENTRIES-1,1-(i-d)/(h[f+T.PREV_TIME]-d)),m+=(h[f+T.R]-m)*p,g+=(h[f+T.G]-g)*p,v+=(h[f+T.B]-v)*p,M+=(h[f+T.A]-M)*p),1==r?o.color.set(m,g,v,M):(l=o.color,s==X.setup&&l.setFromColor(o.data.color),l.add((m-l.r)*r,(g-l.g)*r,(v-l.b)*r,(M-l.a)*r))}}},T.ENTRIES=5,T.PREV_TIME=-5,T.PREV_R=-4,T.PREV_G=-3,T.PREV_B=-2,T.PREV_A=-1,T.R=1,T.G=2,T.B=3,T.A=4,T);function T(t){var e=y.call(this,t)||this;return e.frames=Y.Utils.newFloatArray(t*T.ENTRIES),e}Y.ColorTimeline=w;var E,A=(ae(b,E=s),b.prototype.getPropertyId=function(){return(i.twoColor<<24)+this.slotIndex},b.prototype.setFrame=function(t,e,i,n,r,s,a,o,h){t*=b.ENTRIES,this.frames[t]=e,this.frames[t+b.R]=i,this.frames[t+b.G]=n,this.frames[t+b.B]=r,this.frames[t+b.A]=s,this.frames[t+b.R2]=a,this.frames[t+b.G2]=o,this.frames[t+b.B2]=h},b.prototype.apply=function(t,e,i,n,r,s,a){var o=t.slots[this.slotIndex];if(o.bone.active){var h=this.frames;if(i=h[h.length-b.ENTRIES]?(v=h[(d=h.length)+b.PREV_R],M=h[d+b.PREV_G],x=h[d+b.PREV_B],y=h[d+b.PREV_A],w=h[d+b.PREV_R2],T=h[d+b.PREV_G2],E=h[d+b.PREV_B2]):(v=h[(p=z.binarySearch(h,i,b.ENTRIES))+b.PREV_R],M=h[p+b.PREV_G],x=h[p+b.PREV_B],y=h[p+b.PREV_A],w=h[p+b.PREV_R2],T=h[p+b.PREV_G2],E=h[p+b.PREV_B2],m=h[p],g=this.getCurvePercent(p/b.ENTRIES-1,1-(i-m)/(h[p+b.PREV_TIME]-m)),v+=(h[p+b.R]-v)*g,M+=(h[p+b.G]-M)*g,x+=(h[p+b.B]-x)*g,y+=(h[p+b.A]-y)*g,w+=(h[p+b.R2]-w)*g,T+=(h[p+b.G2]-T)*g,E+=(h[p+b.B2]-E)*g),1==r?(o.color.set(v,M,x,y),o.darkColor.set(w,T,E,1)):(l=o.color,u=o.darkColor,s==X.setup&&(l.setFromColor(o.data.color),u.setFromColor(o.data.darkColor)),l.add((v-l.r)*r,(M-l.g)*r,(x-l.b)*r,(y-l.a)*r),u.add((w-u.r)*r,(T-u.g)*r,(E-u.b)*r,0))}}},b.ENTRIES=8,b.PREV_TIME=-8,b.PREV_R=-7,b.PREV_G=-6,b.PREV_B=-5,b.PREV_A=-4,b.PREV_R2=-3,b.PREV_G2=-2,b.PREV_B2=-1,b.R=1,b.G=2,b.B=3,b.A=4,b.R2=5,b.G2=6,b.B2=7,b);function b(t){var e=E.call(this,t)||this;return e.frames=Y.Utils.newFloatArray(t*b.ENTRIES),e}Y.TwoColorTimeline=A;var R=(S.prototype.getPropertyId=function(){return(i.attachment<<24)+this.slotIndex},S.prototype.getFrameCount=function(){return this.frames.length},S.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.attachmentNames[t]=i},S.prototype.apply=function(t,e,i,n,r,s,a){var o,h,l,u=t.slots[this.slotIndex];u.bone.active&&(a!=g.mixOut?i<(o=this.frames)[0]?s!=X.setup&&s!=X.first||this.setAttachment(t,u,u.data.attachmentName):(h=0,h=i>=o[o.length-1]?o.length-1:z.binarySearch(o,i,1)-1,l=this.attachmentNames[h],t.slots[this.slotIndex].setAttachment(null==l?null:t.getAttachment(this.slotIndex,l))):s==X.setup&&this.setAttachment(t,u,u.data.attachmentName))},S.prototype.setAttachment=function(t,e,i){e.attachment=null==i?null:t.getAttachment(this.slotIndex,i)},S);function S(t){this.frames=Y.Utils.newFloatArray(t),this.attachmentNames=new Array(t)}Y.AttachmentTimeline=R;var I,C=null,P=(ae(_,I=s),_.prototype.getPropertyId=function(){return(i.deform<<27)+ +this.attachment.id+this.slotIndex},_.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.frameVertices[t]=i},_.prototype.apply=function(t,e,i,n,r,s,a){var o=t.slots[this.slotIndex];if(o.bone.active){var h=o.getAttachment();if(h instanceof Y.VertexAttachment&&h.deformAttachment==this.attachment){var l=o.deform;0==l.length&&(s=X.setup);var u=this.frameVertices,c=u[0].length,f=this.frames;if(i=f[f.length-1]){var M=u[f.length-1];if(1==r)if(s==X.add)if(null==(d=h).bones)for(var m=d.vertices,x=0;x=o[h-1])return;if(!(i=o[l];l++)n.push(this.events[l])}}},L);function L(t){this.frames=Y.Utils.newFloatArray(t),this.events=new Array(t)}Y.EventTimeline=F;var O=(k.prototype.getPropertyId=function(){return i.drawOrder<<24},k.prototype.getFrameCount=function(){return this.frames.length},k.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.drawOrders[t]=i},k.prototype.apply=function(t,e,i,n,r,s,a){var o=t.drawOrder,h=t.slots;if(a!=g.mixOut){var l=this.frames;if(i=l[l.length-1]?l.length-1:z.binarySearch(l,i)-1,c=this.drawOrders[u];if(null==c)Y.Utils.arrayCopy(h,0,o,0,h.length);else for(var f=0,d=c.length;f=f[f.length-V.ENTRIES]?s==X.setup?(d.mix=d.data.mix+(f[f.length+V.PREV_MIX]-d.data.mix)*r,d.softness=d.data.softness+(f[f.length+V.PREV_SOFTNESS]-d.data.softness)*r,a==g.mixOut?(d.bendDirection=d.data.bendDirection,d.compress=d.data.compress,d.stretch=d.data.stretch):(d.bendDirection=f[f.length+V.PREV_BEND_DIRECTION],d.compress=0!=f[f.length+V.PREV_COMPRESS],d.stretch=0!=f[f.length+V.PREV_STRETCH])):(d.mix+=(f[f.length+V.PREV_MIX]-d.mix)*r,d.softness+=(f[f.length+V.PREV_SOFTNESS]-d.softness)*r,a==g.mixIn&&(d.bendDirection=f[f.length+V.PREV_BEND_DIRECTION],d.compress=0!=f[f.length+V.PREV_COMPRESS],d.stretch=0!=f[f.length+V.PREV_STRETCH])):(h=f[(o=z.binarySearch(f,i,V.ENTRIES))+V.PREV_MIX],l=f[o+V.PREV_SOFTNESS],u=f[o],c=this.getCurvePercent(o/V.ENTRIES-1,1-(i-u)/(f[o+V.PREV_TIME]-u)),s==X.setup?(d.mix=d.data.mix+(h+(f[o+V.MIX]-h)*c-d.data.mix)*r,d.softness=d.data.softness+(l+(f[o+V.SOFTNESS]-l)*c-d.data.softness)*r,a==g.mixOut?(d.bendDirection=d.data.bendDirection,d.compress=d.data.compress,d.stretch=d.data.stretch):(d.bendDirection=f[o+V.PREV_BEND_DIRECTION],d.compress=0!=f[o+V.PREV_COMPRESS],d.stretch=0!=f[o+V.PREV_STRETCH])):(d.mix+=(h+(f[o+V.MIX]-h)*c-d.mix)*r,d.softness+=(l+(f[o+V.SOFTNESS]-l)*c-d.softness)*r,a==g.mixIn&&(d.bendDirection=f[o+V.PREV_BEND_DIRECTION],d.compress=0!=f[o+V.PREV_COMPRESS],d.stretch=0!=f[o+V.PREV_STRETCH])))},V.ENTRIES=6,V.PREV_TIME=-6,V.PREV_MIX=-5,V.PREV_SOFTNESS=-4,V.PREV_BEND_DIRECTION=-3,V.PREV_COMPRESS=-2,V.PREV_STRETCH=-1,V.MIX=1,V.SOFTNESS=2,V.BEND_DIRECTION=3,V.COMPRESS=4,V.STRETCH=5,V);function V(t){var e=N.call(this,t)||this;return e.frames=Y.Utils.newFloatArray(t*V.ENTRIES),e}Y.IkConstraintTimeline=D;var B,U=(ae(W,B=s),W.prototype.getPropertyId=function(){return(i.transformConstraint<<24)+this.transformConstraintIndex},W.prototype.setFrame=function(t,e,i,n,r,s){t*=W.ENTRIES,this.frames[t]=e,this.frames[t+W.ROTATE]=i,this.frames[t+W.TRANSLATE]=n,this.frames[t+W.SCALE]=r,this.frames[t+W.SHEAR]=s},W.prototype.apply=function(t,e,i,n,r,s,a){var o=this.frames,h=t.transformConstraints[this.transformConstraintIndex];if(h.active)if(i=o[o.length-W.ENTRIES]?(p=o[(u=o.length)+W.PREV_ROTATE],m=o[u+W.PREV_TRANSLATE],g=o[u+W.PREV_SCALE],v=o[u+W.PREV_SHEAR]):(p=o[(c=z.binarySearch(o,i,W.ENTRIES))+W.PREV_ROTATE],m=o[c+W.PREV_TRANSLATE],g=o[c+W.PREV_SCALE],v=o[c+W.PREV_SHEAR],f=o[c],d=this.getCurvePercent(c/W.ENTRIES-1,1-(i-f)/(o[c+W.PREV_TIME]-f)),p+=(o[c+W.ROTATE]-p)*d,m+=(o[c+W.TRANSLATE]-m)*d,g+=(o[c+W.SCALE]-g)*d,v+=(o[c+W.SHEAR]-v)*d),s==X.setup?(l=h.data,h.rotateMix=l.rotateMix+(p-l.rotateMix)*r,h.translateMix=l.translateMix+(m-l.translateMix)*r,h.scaleMix=l.scaleMix+(g-l.scaleMix)*r,h.shearMix=l.shearMix+(v-l.shearMix)*r):(h.rotateMix+=(p-h.rotateMix)*r,h.translateMix+=(m-h.translateMix)*r,h.scaleMix+=(g-h.scaleMix)*r,h.shearMix+=(v-h.shearMix)*r)}},W.ENTRIES=5,W.PREV_TIME=-5,W.PREV_ROTATE=-4,W.PREV_TRANSLATE=-3,W.PREV_SCALE=-2,W.PREV_SHEAR=-1,W.ROTATE=1,W.TRANSLATE=2,W.SCALE=3,W.SHEAR=4,W);function W(t){var e=B.call(this,t)||this;return e.frames=Y.Utils.newFloatArray(t*W.ENTRIES),e}Y.TransformConstraintTimeline=U;var G,H=(ae(q,G=s),q.prototype.getPropertyId=function(){return(i.pathConstraintPosition<<24)+this.pathConstraintIndex},q.prototype.setFrame=function(t,e,i){t*=q.ENTRIES,this.frames[t]=e,this.frames[t+q.VALUE]=i},q.prototype.apply=function(t,e,i,n,r,s,a){var o=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(i=o[o.length-q.ENTRIES]?f=o[o.length+q.PREV_VALUE]:(f=o[(l=z.binarySearch(o,i,q.ENTRIES))+q.PREV_VALUE],u=o[l],c=this.getCurvePercent(l/q.ENTRIES-1,1-(i-u)/(o[l+q.PREV_TIME]-u)),f+=(o[l+q.VALUE]-f)*c),s==X.setup?h.position=h.data.position+(f-h.data.position)*r:h.position+=(f-h.position)*r}},q.ENTRIES=2,q.PREV_TIME=-2,q.PREV_VALUE=-1,q.VALUE=1,q);function q(t){var e=G.call(this,t)||this;return e.frames=Y.Utils.newFloatArray(t*q.ENTRIES),e}Y.PathConstraintPositionTimeline=H;var j,K=(ae(Q,j=H),Q.prototype.getPropertyId=function(){return(i.pathConstraintSpacing<<24)+this.pathConstraintIndex},Q.prototype.apply=function(t,e,i,n,r,s,a){var o=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(i=o[o.length-Q.ENTRIES]?f=o[o.length+Q.PREV_VALUE]:(f=o[(l=z.binarySearch(o,i,Q.ENTRIES))+Q.PREV_VALUE],u=o[l],c=this.getCurvePercent(l/Q.ENTRIES-1,1-(i-u)/(o[l+Q.PREV_TIME]-u)),f+=(o[l+Q.VALUE]-f)*c),s==X.setup?h.spacing=h.data.spacing+(f-h.data.spacing)*r:h.spacing+=(f-h.spacing)*r}},Q);function Q(t){return j.call(this,t)||this}Y.PathConstraintSpacingTimeline=K;var Z,J=(ae($,Z=s),$.prototype.getPropertyId=function(){return(i.pathConstraintMix<<24)+this.pathConstraintIndex},$.prototype.setFrame=function(t,e,i,n){t*=$.ENTRIES,this.frames[t]=e,this.frames[t+$.ROTATE]=i,this.frames[t+$.TRANSLATE]=n},$.prototype.apply=function(t,e,i,n,r,s,a){var o=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(i=o[o.length-$.ENTRIES]?(f=o[o.length+$.PREV_ROTATE],d=o[o.length+$.PREV_TRANSLATE]):(f=o[(l=z.binarySearch(o,i,$.ENTRIES))+$.PREV_ROTATE],d=o[l+$.PREV_TRANSLATE],u=o[l],c=this.getCurvePercent(l/$.ENTRIES-1,1-(i-u)/(o[l+$.PREV_TIME]-u)),f+=(o[l+$.ROTATE]-f)*c,d+=(o[l+$.TRANSLATE]-d)*c),s==X.setup?(h.rotateMix=h.data.rotateMix+(f-h.data.rotateMix)*r,h.translateMix=h.data.translateMix+(d-h.data.translateMix)*r):(h.rotateMix+=(f-h.rotateMix)*r,h.translateMix+=(d-h.translateMix)*r)}},$.ENTRIES=3,$.PREV_TIME=-3,$.PREV_ROTATE=-2,$.PREV_TRANSLATE=-1,$.ROTATE=1,$.TRANSLATE=2,$);function $(t){var e=Z.call(this,t)||this;return e.frames=Y.Utils.newFloatArray(t*$.ENTRIES),e}Y.PathConstraintMixTimeline=J}(re=re||{}),function(R){var t=(S.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,i=0,n=e.length;i=r.trackEnd&&null==r.mixingFrom){e[i]=null,this.queue.end(r),this.disposeNext(r);continue}if(null!=r.mixingFrom&&this.updateMixingFrom(r,t)){var h=r.mixingFrom;for((r.mixingFrom=null)!=h&&(h.mixingTo=null);null!=h;)this.queue.end(h),h=h.mixingFrom}r.trackTime+=s}}this.queue.drain()},S.prototype.updateMixingFrom=function(t,e){var i=t.mixingFrom;if(null==i)return!0;var n=this.updateMixingFrom(i,e);return i.animationLast=i.nextAnimationLast,i.trackLast=i.nextTrackLast,0=t.mixDuration?(0!=i.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=i.mixingFrom,null!=i.mixingFrom&&(i.mixingFrom.mixingTo=t),t.interruptAlpha=i.interruptAlpha,this.queue.end(i)),n):(i.trackTime+=e*i.timeScale,t.mixTime+=e,!1)},S.prototype.apply=function(t){if(null==t)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var e=this.events,i=this.tracks,n=!1,r=0,s=i.length;r=a.trackEnd&&null==a.next&&(h=0);var l=a.animationLast,u=a.getAnimationTime(),c=a.animation.timelines.length,f=a.animation.timelines;if(0==r&&1==h||o==R.MixBlend.add)for(var d=0;d=s[s.length-1]?s.length-1:R.Animation.binarySearch(s,i)-1,this.setAttachment(e,o,t.attachmentNames[a],r)),o.attachmentState<=this.unkeyedState&&(o.attachmentState=this.unkeyedState+S.SETUP))},S.prototype.setAttachment=function(t,e,i,n){e.attachment=null==i?null:t.getAttachment(e.data.index,i),n&&(e.attachmentState=this.unkeyedState+S.CURRENT)},S.prototype.applyRotateTimeline=function(t,e,i,n,r,s,a,o){if(o&&(s[a]=0),1!=n){var h=t,l=h.frames,u=e.bones[h.boneIndex];if(u.active){var c=0,f=0;if(i=l[l.length-R.RotateTimeline.ENTRIES]?f=u.data.rotation+l[l.length+R.RotateTimeline.PREV_ROTATION]:(p=l[(d=R.Animation.binarySearch(l,i,R.RotateTimeline.ENTRIES))+R.RotateTimeline.PREV_ROTATION],m=l[d],g=h.getCurvePercent((d>>1)-1,1-(i-m)/(l[d+R.RotateTimeline.PREV_TIME]-m)),f=l[d+R.RotateTimeline.ROTATION]-p,f=p+(f-=360*(16384-(16384.499999999996-f/360|0)))*g+u.data.rotation,f-=360*(16384-(16384.499999999996-f/360|0)))}var v,M,x,y,w=0,T=f-c;0==(T-=360*(16384-(16384.499999999996-T/360|0)))?w=s[a]:(M=v=0,M=o?(v=0,T):(v=s[a],s[a+1]),x=0n||this.queue.event(t,l)}for((t.loop?0==r||s>t.trackTime%r:n<=e&&t.animationLast=this.tracks.length)){var e=this.tracks[t];if(null!=e){this.queue.end(e),this.disposeNext(e);for(var i=e;;){var n=i.mixingFrom;if(null==n)break;this.queue.end(n),i.mixingFrom=null,i.mixingTo=null,i=n}this.tracks[e.trackIndex]=null,this.queue.drain()}}},S.prototype.setCurrent=function(t,e,i){var n=this.expandToIndex(t);this.tracks[t]=e,null!=n&&(i&&this.queue.interrupt(n),((e.mixingFrom=n).mixingTo=e).mixTime=0,null!=n.mixingFrom&&0=this.tracks.length?null:this.tracks[t]},S.prototype.addListener=function(t){if(null==t)throw new Error("listener cannot be null.");this.listeners.push(t)},S.prototype.removeListener=function(t){var e=this.listeners.indexOf(t);0<=e&&this.listeners.splice(e,1)},S.prototype.clearListeners=function(){this.listeners.length=0},S.prototype.clearListenerNotifications=function(){this.queue.clear()},S.emptyAnimation=new R.Animation("",[],0),S.SUBSEQUENT=0,S.FIRST=1,S.HOLD_SUBSEQUENT=2,S.HOLD_FIRST=3,S.HOLD_MIX=4,S.SETUP=1,S.CURRENT=2,S);function S(t){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new r(this),this.propertyIDs=new R.IntSet,this.animationsChanged=!1,this.trackEntryPool=new R.Pool(function(){return new e}),this.data=t}R.AnimationState=t;var e=(i.prototype.reset=function(){this.next=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0},i.prototype.getAnimationTime=function(){if(this.loop){var t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)},i.prototype.setAnimationLast=function(t){this.animationLast=t,this.nextAnimationLast=t},i.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},i.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},i);function i(){this.mixBlend=R.MixBlend.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}R.TrackEntry=e;var o,n,r=(s.prototype.start=function(t){this.objects.push(o.start),this.objects.push(t),this.animState.animationsChanged=!0},s.prototype.interrupt=function(t){this.objects.push(o.interrupt),this.objects.push(t)},s.prototype.end=function(t){this.objects.push(o.end),this.objects.push(t),this.animState.animationsChanged=!0},s.prototype.dispose=function(t){this.objects.push(o.dispose),this.objects.push(t)},s.prototype.complete=function(t){this.objects.push(o.complete),this.objects.push(t)},s.prototype.event=function(t,e){this.objects.push(o.event),this.objects.push(t),this.objects.push(e)},s.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var t=this.objects,e=this.animState.listeners,i=0;ij.MathUtils.PI?B-=j.MathUtils.PI2:B<-j.MathUtils.PI&&(B+=j.MathUtils.PI2),B*=e,N=Math.cos(B),D=Math.sin(B),R.a=N*F-D*O,R.b=N*L-D*k,R.c=D*F+N*O,R.d=D*L+N*k),R.appliedValid=!1}}}},pe.prototype.computeWorldPositions=function(t,e,i,n,r){var s=this.target,a=this.position,o=this.spaces,h=j.Utils.setArraySize(this.positions,3*e+2),l=null,u=t.closed,c=t.worldVerticesLength,f=c/6,d=pe.NONE;if(!t.constantSpeed){var p=t.lengths,m=p[f-=u?1:2];if(n&&(a*=m),r)for(var g=1;g>>1^-(1&i)},e.prototype.readStringRef=function(){var t=this.readInt(!0);return 0==t?null:this.strings[t-1]},e.prototype.readString=function(){var t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;for(var e="",i=0;i>4){case 12:case 13:e+=String.fromCharCode((31&n)<<6|63&this.readByte()),i+=2;break;case 14:e+=String.fromCharCode((15&n)<<12|(63&this.readByte())<<6|63&this.readByte()),i+=3;break;default:e+=String.fromCharCode(n),i++}}return e},e.prototype.readFloat=function(){var t=this.buffer.getFloat32(this.index);return this.index+=4,t},e.prototype.readBoolean=function(){return 0!=this.readByte()},e);function e(t,e,i,n){void 0===e&&(e=new Array),void 0===i&&(i=0),void 0===n&&(n=new DataView(t.buffer)),this.strings=e,this.index=i,this.buffer=n}var V=function(t,e,i,n,r){this.mesh=t,this.skin=e,this.slotIndex=i,this.parent=n,this.inheritDeform=r},u=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),this.bones=t,this.vertices=e}}(re=re||{}),C=re=re||{},xe.prototype.update=function(t,e){if(null==t)throw new Error("skeleton cannot be null.");var i=this.boundingBoxes,n=this.polygons,r=this.polygonPool,s=t.slots,a=s.length;i.length=0,r.freeAll(n);for(var o=n.length=0;o=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},xe.prototype.aabbIntersectsSegment=function(t,e,i,n){var r=this.minX,s=this.minY,a=this.maxX,o=this.maxY;if(t<=r&&i<=r||e<=s&&n<=s||a<=t&&a<=i||o<=e&&o<=n)return!1;var h=(n-e)/(i-t),l=h*(r-t)+e;if(st.minX&&this.minYt.minY},xe.prototype.containsPoint=function(t,e){for(var i=this.polygons,n=0,r=i.length;n>1,V=this.clipOutput,B=K.Utils.setArraySize(l,P+D*d),U=0;U<_;U+=2){var Y=V[U],X=V[U+1];B[P]=Y,B[P+1]=X,B[P+2]=s.r,B[P+3]=s.g,B[P+4]=s.b,B[P+5]=s.a;var z=Y-b,W=X-R,G=(F*z+L*W)*N,H=(k*z+O*W)*N,q=1-G-H;B[P+6]=x*G+E*H+S*q,B[P+7]=y*G+A*H+I*q,o&&(B[P+8]=a.r,B[P+9]=a.g,B[P+10]=a.b,B[P+11]=a.a),P+=d}P=u.length;var j=K.Utils.setArraySize(u,P+3*(D-2));for(D--,U=1;U>1;o=n.length&&(n.length=t+1),n[t]||(n[t]={}),n[t][e]=i},e.prototype.addSkin=function(t){for(var e=0;e=this.lines.length?null:this.lines[this.index++]},i.prototype.readValue=function(){var t=this.readLine(),e=t.indexOf(":");if(-1==e)throw new Error("Invalid line: "+t);return t.substring(e+1).trim()},i.prototype.readTuple=function(t){var e=this.readLine(),i=e.indexOf(":");if(-1==i)throw new Error("Invalid line: "+e);for(var n=0,r=i+1;n<3;n++){var s=e.indexOf(",",r);if(-1==s)break;t[n]=e.substr(r,s-r).trim(),r=s+1}return t[n]=e.substring(r).trim(),n+1},i);function i(t){this.index=0,this.lines=t.split(/\r\n|\r|\n/)}var m=function(){};d.TextureAtlasPage=m;var n,g=(n=d.TextureRegion,ae(r,n),r);function r(){return null!==n&&n.apply(this,arguments)||this}d.TextureAtlasRegion=g}(re=re||{}),V=re=re||{},Ae.prototype.isActive=function(){return this.active},Ae.prototype.apply=function(){this.update()},Ae.prototype.update=function(){this.data.local?this.data.relative?this.applyRelativeLocal():this.applyAbsoluteLocal():this.data.relative?this.applyRelativeWorld():this.applyAbsoluteWorld()},Ae.prototype.applyAbsoluteWorld=function(){for(var t=this.rotateMix,e=this.translateMix,i=this.scaleMix,n=this.shearMix,r=this.target,s=r.a,a=r.b,o=r.c,h=r.d,l=0V.MathUtils.PI?A-=V.MathUtils.PI2:A<-V.MathUtils.PI&&(A+=V.MathUtils.PI2),A*=t,v=Math.cos(A),M=Math.sin(A),R.a=v*m-M*g,R.b=v*w-M*T,R.c=M*m+v*g,R.d=M*w+v*T,S=!0),0!=e&&(x=this.temp,r.localToWorld(x.set(this.data.offsetX,this.data.offsetY)),R.worldX+=(x.x-R.worldX)*e,R.worldY+=(x.y-R.worldY)*e,S=!0),0V.MathUtils.PI?A-=V.MathUtils.PI2:A<-V.MathUtils.PI&&(A+=V.MathUtils.PI2),A=E+(A+c)*n,b=Math.sqrt(w*w+T*T),R.b=Math.cos(A)*b,R.d=Math.sin(A)*b,S=!0),S&&(R.appliedValid=!1)}},Ae.prototype.applyRelativeWorld=function(){for(var t=this.rotateMix,e=this.translateMix,i=this.scaleMix,n=this.shearMix,r=this.target,s=r.a,a=r.b,o=r.c,h=r.d,l=0V.MathUtils.PI?y-=V.MathUtils.PI2:y<-V.MathUtils.PI&&(y+=V.MathUtils.PI2),y*=t,v=Math.cos(y),M=Math.sin(y),A.a=v*m-M*g,A.b=v*w-M*T,A.c=M*m+v*g,A.d=M*w+v*T,b=!0),0!=e&&(x=this.temp,r.localToWorld(x.set(this.data.offsetX,this.data.offsetY)),A.worldX+=x.x*e,A.worldY+=x.y*e,b=!0),0V.MathUtils.PI?y-=V.MathUtils.PI2:y<-V.MathUtils.PI&&(y+=V.MathUtils.PI2),w=A.b,T=A.d,y=Math.atan2(T,w)+(y-V.MathUtils.PI/2+c)*n,E=Math.sqrt(w*w+T*T),A.b=Math.cos(y)*E,A.d=Math.sin(y)*E,b=!0),b&&(A.appliedValid=!1)}},Ae.prototype.applyAbsoluteLocal=function(){var t=this.rotateMix,e=this.translateMix,i=this.scaleMix,n=this.shearMix,r=this.target;r.appliedValid||r.updateAppliedTransform();for(var s=this.bones,a=0,o=s.length;a>1,n=this.indicesArray,r=n.length=0;r>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255},r.rgb888ToColor=function(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255},r.WHITE=new r(1,1,1,1),r.RED=new r(1,0,0,1),r.GREEN=new r(0,1,0,1),r.BLUE=new r(0,0,1,1),r.MAGENTA=new r(1,0,1,1),r);function r(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.r=t,this.g=e,this.b=i,this.a=n}t.Color=n;var s=(a.clamp=function(t,e,i){return t=e?t:g.setArraySize(t,e,i)},g.newArray=function(t,e){for(var i=new Array(t),n=0;nthis.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,1=this.values.length},R.prototype.addValue=function(t){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0},R.prototype.getMean=function(){if(this.hasEnoughData()){if(this.dirty){for(var t=0,e=0;e>1)*s;var a=t.bone.skeleton,o=t.deform,h=this.vertices,l=this.bones;if(null!=l){for(var u=0,c=0,f=0;fthis.vertices.length)throw Error("Mesh can't store more than "+this.maxVertices()+" vertices");this.vertices.set(t,0),this.verticesLength=t.length},e.prototype.setIndices=function(t){if(this.dirtyIndices=!0,t.length>this.indices.length)throw Error("Mesh can't store more than "+this.maxIndices()+" indices");this.indices.set(t,0),this.indicesLength=t.length},e.prototype.draw=function(t,e){this.drawWithOffset(t,e,0,0this.mesh.getVertices().length||this.indicesLength+i.length>this.mesh.getIndices().length)&&this.flush();var n=this.mesh.numVertices();this.mesh.getVertices().set(e,this.verticesLength),this.verticesLength+=e.length,this.mesh.setVerticesLength(this.verticesLength);for(var r=this.mesh.getIndices(),s=this.indicesLength,a=0;a 0.");null===r&&(r=this.color);var a=2*zt.MathUtils.PI/s,o=Math.cos(a),h=Math.sin(a),l=n,u=0;if(t){for(this.check(Gt.Filled,3*s+3),s--,f=0;f>1))-2],w=f[p-1],m=0,g=p;m>1,f.numFloats=f.numVertices*T,f.numFloats>f.vertices.length&&(f.vertices=this.vertices=Zt.Utils.newFloatArray(f.numFloats)),S.computeWorldVertices(E,0,S.worldVerticesLength,f.vertices,0,T),p=S.triangles,b=S.region.renderObject.texture,d=S.uvs,g=S.color}if(null!=b){var I=E.color,C=this.tempColor;C.r=v.r*I.r*g.r,C.g=v.g*I.g*g.g,C.b=v.b*I.b*g.b,C.a=v.a*I.a*g.a,s&&(C.r*=C.a,C.g*=C.a,C.b*=C.a);var P=this.tempColor2;null==E.darkColor?P.set(0,0,0,1):(s?(P.r=E.darkColor.r*C.a,P.g=E.darkColor.g*C.a,P.b=E.darkColor.b*C.a):P.setFromColor(E.darkColor),P.a=s?1:0);var _=E.data.blendMode;if(_!=o&&(o=_,t.setBlendMode(Jt.WebGLBlendModeConverter.getSourceGLBlendMode(o,s),Jt.WebGLBlendModeConverter.getDestGLBlendMode(o))),r.isClipping()){r.clipTriangles(f.vertices,f.numFloats,p,p.length,d,C,P,a);var F=new Float32Array(r.clippedVertices),L=r.clippedTriangles;if(null!=this.vertexEffect){var O=this.vertexEffect,k=F;if(a)for(var N=0,D=F.length;N>16&255)/255,r=(t>>8&255)/255,s=(255&t)/255,a=16777215>>24)/255:null,o=this.skeleton;return!e||(i=this.findSlot(e))&&(o=i),o.color.r=n,o.color.g=r,o.color.b=s,null!==a&&(o.color.a=a),this},setSkeletonFromJSON:function(t,e,i,n){return this.setSkeleton(t,e,i,n)},setSkeleton:function(t,e,i,n){this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications());var r=this.plugin.createSkeleton(t,n);this.skeletonData=r.skeletonData,this.preMultipliedAlpha=r.preMultipliedAlpha;var s=r.skeleton;return s.setSkin(),s.setToSetupPose(),this.skeleton=s,r=this.plugin.createAnimationState(s),this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications()),this.state=r.state,this.stateData=r.stateData,this.state.addListener({event:this.onEvent.bind(this),complete:this.onComplete.bind(this),start:this.onStart.bind(this),end:this.onEnd.bind(this),dispose:this.onDispose.bind(this),interrupted:this.onInterrupted.bind(this)}),e&&this.setAnimation(0,e,i),this.root=this.getRootBone(),this.root&&(this.root.rotation=m(f(this.rotation))+90),this.state.apply(s),s.updateCache(),this.updateSize()},onComplete:function(t){this.emit(g.COMPLETE,t)},onDispose:function(t){this.emit(g.DISPOSE,t)},onEnd:function(t){this.emit(g.END,t)},onEvent:function(t,e){this.emit(g.EVENT,t,e)},onInterrupted:function(t){this.emit(g.INTERRUPTED,t)},onStart:function(t){this.emit(g.START,t)},refresh:function(){return this.root&&(this.root.rotation=m(f(this.rotation))+90),this.updateSize(),this.skeleton.updateCache(),this},setSize:function(t,e,i,n){var r=this.skeleton;return void 0===t&&(t=r.data.width),void 0===e&&(e=r.data.height),void 0===i&&(i=0),void 0===n&&(n=0),this.width=t,this.height=e,this.displayOriginX=r.x-i,this.displayOriginY=r.y-n,this},setOffset:function(t,e){var i=this.skeleton;return void 0===t&&(t=0),void 0===e&&(e=0),this.displayOriginX=i.x-t,this.displayOriginY=i.y-e,this},updateSize:function(){var t=this.skeleton,e=this.plugin.renderer.height,i=this.scaleX,n=this.scaleY;t.x=this.x,t.y=e-this.y,t.scaleX=1,t.scaleY=1,t.updateWorldTransform();var r=this.getBounds();return this.width=r.size.x,this.height=r.size.y,this.displayOriginX=this.x-r.offset.x,this.displayOriginY=this.y-(e-(this.height+r.offset.y)),t.scaleX=i,t.scaleY=n,t.updateWorldTransform(),this},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,this.refresh()}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,this.refresh()}},getBoneList:function(){var t=[],e=this.skeletonData;if(e)for(var i=0;i=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var s=Math.ceil((r=e-t.length)/2);t=new Array(1+(r-s)).join(i)+t+new Array(s+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e){t.exports=function(t){return t.reverse()}},function(t,e){t.exports=function(t){for(var e=0;e=t.length)throw new Error("Supplied index out of bounds");return n!==i&&(t.splice(n,1),t.splice(i,0,e)),e}},function(t,e){t.exports=function(t,e){var i,n,r=t.indexOf(e);return-1!==r&&rt.length-1)throw new Error("Index out of bounds");var r=s(t,e);return i&&i.call(n,r),r}},function(t,e,i){var l=i(5);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),l(t,e,i)){var s=i-e,a=t.splice(e,s);if(n)for(var o=0;o=this.nextTick&&this.currentAnim.setFrame(this)}},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),e.setSizeToFrame(),e._originComponent&&(t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin()),e},updateFrame:function(t){var e,i=this.setCurrentFrame(t);this.isPlaying&&(t.setAlpha&&(i.alpha=t.alpha),e=this.currentAnim,i.emit(s.SPRITE_ANIMATION_KEY_UPDATE+e.key,e,t,i),i.emit(s.SPRITE_ANIMATION_UPDATE,e,t,i),3===this._pendingStop&&this._pendingStopValue===t&&this.currentAnim.completeAnimation(this))},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},setYoyo:function(t){return void 0===t&&(t=!1),this._yoyo=t,this.parent},getYoyo:function(){return this._yoyo},destroy:function(){this.animationManager.off(s.REMOVE_ANIMATION,this.remove,this),this.animationManager=null,this.parent=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null}});t.exports=a},function(t,e,i){var n=i(3),r=i(0),s=i(55),a=i(59),o=i(57),m=i(308),g=i(6),h=new r({Extends:s,initialize:function(t,e,i){s.call(this),this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,g(i,"frames",[]),g(i,"defaultTextureKey",null)),this.frameRate=g(i,"frameRate",null),this.duration=g(i,"duration",null),null===this.duration&&null===this.frameRate?(this.frameRate=24,this.duration=this.frameRate/this.frames.length*1e3):this.duration&&null===this.frameRate?this.frameRate=this.frames.length/(this.duration/1e3):this.duration=this.frames.length/this.frameRate*1e3,this.msPerFrame=1e3/this.frameRate,this.skipMissedFrames=g(i,"skipMissedFrames",!0),this.delay=g(i,"delay",0),this.repeat=g(i,"repeat",0),this.repeatDelay=g(i,"repeatDelay",0),this.yoyo=g(i,"yoyo",!1),this.showOnStart=g(i,"showOnStart",!1),this.hideOnComplete=g(i,"hideOnComplete",!1),this.paused=!1,this.manager.on(a.PAUSE_ALL,this.pause,this),this.manager.on(a.RESUME_ALL,this.resume,this)},addFrame:function(t){return this.addFrameAt(this.frames.length,t)},addFrameAt:function(t,e){var i,n,r=this.getFrames(this.manager.textureManager,e);return 0=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo);var i=this.frames[e];0!==e||t.forward||(i=this.getLastFrame()),t.updateFrame(i)},getFrameByProgress:function(t){return t=n(t,0,1),o(t,this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t._yoyo?this.handleYoyoFrame(t,!1):0=e&&t.y<=i&&t.y+t.height>=i)}},function(t,e,i){var a=i(60),o=i(61);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&0this.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},function(t,e,i){var n=i(10);t.exports=function(t,e,i){return void 0===i&&(i=new n),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},function(t,e,i){var f=i(317),d=i(10);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&0>16)+(65280&t)+((255&t)<<16)}},function(t,e,i){var n=i(4),r=i(4),n=i(351);t.exports={renderWebGL:n,renderCanvas:r}},function(t,e){t.exports=function(t,e,i,n,r){var s=e.list;if(0!==s.length){var a=e.localTransform;r?(a.loadIdentity(),a.multiply(r),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);var o=-1!==e.blendMode;o||t.setBlendMode(0);for(var h=e.alpha,l=e.scrollFactorX,u=e.scrollFactorY,c=s,f=s.length,d=0;d Date: Tue, 25 Aug 2020 23:59:42 +0100 Subject: [PATCH 104/241] The `SpineGameObject.setAnimation` method will now use the `trackIndex` parameter if `ignoreIfPlaying` is set and run the check against this track index. Fix #4842 --- plugins/spine/src/gameobject/SpineGameObject.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/spine/src/gameobject/SpineGameObject.js b/plugins/spine/src/gameobject/SpineGameObject.js index 4d1f900a0..bdc5e79d7 100644 --- a/plugins/spine/src/gameobject/SpineGameObject.js +++ b/plugins/spine/src/gameobject/SpineGameObject.js @@ -989,7 +989,7 @@ var SpineGameObject = new Class({ * @param {integer} trackIndex - The track index to play the animation on. * @param {string} animationName - The string-based key of the animation to play. * @param {boolean} [loop=false] - Should the animation be looped when played? - * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call. + * @param {boolean} [ignoreIfPlaying=false] - If the animation specified by the track index is already playing then ignore this call. * * @return {spine.TrackEntry} A track entry to allow further customization of animation playback. */ @@ -1000,7 +1000,7 @@ var SpineGameObject = new Class({ if (ignoreIfPlaying && this.state) { - var currentTrack = this.state.getCurrent(0); + var currentTrack = this.state.getCurrent(trackIndex); if (currentTrack && currentTrack.animation.name === animationName && !currentTrack.isComplete()) { From 413a148a319aae883c9099650eea9c6175bb687d Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 26 Aug 2020 00:00:00 +0100 Subject: [PATCH 105/241] Updated docs and Creator param --- plugins/spine/src/SpinePlugin.js | 13 +++++++-- plugins/spine/src/container/SpineContainer.js | 29 +++++++++++++++---- 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/plugins/spine/src/SpinePlugin.js b/plugins/spine/src/SpinePlugin.js index d4afb9ef7..12a7f9a6c 100644 --- a/plugins/spine/src/SpinePlugin.js +++ b/plugins/spine/src/SpinePlugin.js @@ -76,10 +76,15 @@ var NOOP = require('../../../src/utils/NOOP'); * this.load.spine('stretchyman', 'stretchyman-pro.json', [ 'stretchyman-pma.atlas' ], true); * ``` * - * It also installs a Game Object Factory method, allowing you to create Spine Game Objects: + * It also installs two Game Object Factory methods, allowing you to create Spine Game Objects + * and Spine Containers: * * ```javascript - * this.add.spine(512, 650, 'stretchyman') + * const man = this.add.spine(512, 650, 'stretchyman'); + * + * const container = this.add.spineContainer(); + * + * container.add(man); * ``` * * The first argument is the key which you used when importing the Spine data. There are lots of @@ -379,7 +384,7 @@ var SpinePlugin = new Class({ pluginManager.registerFileType('spine', this.spineFileCallback, scene); pluginManager.registerGameObject('spine', add, make); - pluginManager.registerGameObject('spinecontainer', addContainer, makeContainer); + pluginManager.registerGameObject('spineContainer', addContainer, makeContainer); }, /** @@ -1096,6 +1101,7 @@ var SpinePlugin = new Class({ } this.pluginManager.removeGameObject('spine', true, true); + this.pluginManager.removeGameObject('spineContainer', true, true); this.pluginManager = null; this.game = null; @@ -1114,6 +1120,7 @@ var SpinePlugin = new Class({ }); SpinePlugin.SpineGameObject = SpineGameObject; +SpinePlugin.SpineContainer = SpineContainer; /** * Creates a new Spine Game Object and adds it to the Scene. diff --git a/plugins/spine/src/container/SpineContainer.js b/plugins/spine/src/container/SpineContainer.js index aaa17292f..27ca4a1d4 100644 --- a/plugins/spine/src/container/SpineContainer.js +++ b/plugins/spine/src/container/SpineContainer.js @@ -13,8 +13,8 @@ var SpineContainerRender = require('./SpineContainerRender'); * A Spine Container is a special kind of Container created specifically for Spine Game Objects. * * You have all of the same features of a standard Container, but the rendering functions are optimized specifically - * for Spine Game Objects. You cannot mix and match Spine Game Objects with regular Game Objects inside of this - * type of Container, however. + * for Spine Game Objects. You must only add ever Spine Game Objects to this type of Container. Although Phaser will + * not prevent you from adding other types, they will not render and are likely to throw runtime errors. * * To create one in a Scene, use the factory methods: * @@ -28,7 +28,7 @@ var SpineContainerRender = require('./SpineContainerRender'); * this.make.spinecontainer(); * ``` * - * See the Container documentation for further details. + * See the Container documentation for further details about what Containers can do. * * @class SpineContainer * @extends Phaser.GameObjects.Container @@ -61,11 +61,30 @@ var SpineContainer = new Class({ /** * A reference to the Spine Plugin. * - * @name SpineGameObject#plugin + * @name SpineContainer#plugin * @type {SpinePlugin} - * @since 3.19.0 + * @since 3.50.0 */ this.plugin = plugin; + }, + + /** + * Internal destroy handler, called as part of the destroy process. + * + * @method SpineContainer#preDestroy + * @protected + * @since 3.50.0 + */ + preDestroy: function () + { + this.removeAll(!!this.exclusive); + + this.localTransform.destroy(); + this.tempTransformMatrix.destroy(); + + this.list = []; + this._displayList = null; + this.plugin = null; } }); From e501da684fa81b4d2a787096da066df59cb8c423 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 26 Aug 2020 00:00:09 +0100 Subject: [PATCH 106/241] New SpineContainer defs --- types/SpineContainer.d.ts | 130 +++++++++++++++++++++++++++++++++++++ types/SpineGameObject.d.ts | 18 ++--- types/SpinePlugin.d.ts | 5 +- 3 files changed, 143 insertions(+), 10 deletions(-) create mode 100644 types/SpineContainer.d.ts diff --git a/types/SpineContainer.d.ts b/types/SpineContainer.d.ts new file mode 100644 index 000000000..83f853915 --- /dev/null +++ b/types/SpineContainer.d.ts @@ -0,0 +1,130 @@ +/// +/// +/// + +declare class SpineContainer extends Phaser.GameObjects.Container implements Phaser.GameObjects.Components.AlphaSingle, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.ComputedSize, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { + constructor(scene: Phaser.Scene, pluginManager: SpinePlugin, x?: number, y?: number, children?: SpineGameObject[]); + + list: SpineGameObject[]; + + exclusive: boolean; + + maxSize: number; + position: number; + + localTransform: Phaser.GameObjects.Components.TransformMatrix; + + scrollFactorX: number; + scrollFactorY: number; + + readonly originX: number; + readonly originY: number; + readonly displayOriginX: number; + readonly displayOriginY: number; + + setExclusive(value?: boolean): this; + getBounds(output?: Phaser.Geom.Rectangle): Phaser.Geom.Rectangle; + pointToContainer(source: object | Phaser.Geom.Point | Phaser.Math.Vector2, output?: object | Phaser.Geom.Point | Phaser.Math.Vector2): object | Phaser.Geom.Point | Phaser.Math.Vector2; + getBoundsTransformMatrix(): Phaser.GameObjects.Components.TransformMatrix; + add(child: SpineGameObject | SpineGameObject[]): this; + addAt(child: SpineGameObject | SpineGameObject[], index?: number): this; + getAt(index: number): SpineGameObject; + getIndex(child: SpineGameObject): number; + sort(property: string, handler?: Function): this; + getByName(name: string): SpineGameObject; + getRandom(startIndex?: number, length?: number): SpineGameObject; + getFirst(property: string, value: any, startIndex?: number, endIndex?: number): SpineGameObject; + getAll(property?: string, value?: any, startIndex?: number, endIndex?: number): SpineGameObject[]; + count(property: string, value: any, startIndex?: number, endIndex?: number): number; + swap(child1: SpineGameObject, child2: SpineGameObject): this; + moveTo(child: SpineGameObject, index: number): this; + remove(child: SpineGameObject | SpineGameObject[], destroyChild?: boolean): this; + removeAt(index: number, destroyChild?: boolean): this; + removeBetween(startIndex?: number, endIndex?: number, destroyChild?: boolean): this; + removeAll(destroyChild?: boolean): this; + bringToTop(child: SpineGameObject): this; + sendToBack(child: SpineGameObject): this; + moveUp(child: SpineGameObject): this; + moveDown(child: SpineGameObject): this; + reverse(): this; + shuffle(): this; + replace(oldChild: SpineGameObject, newChild: SpineGameObject, destroyChild?: boolean): this; + exists(child: SpineGameObject): boolean; + setAll(property: string, value: any, startIndex?: number, endIndex?: number): this; + each(callback: Function, context?: object, ...args: any[]): this; + iterate(callback: Function, context?: object, ...args: any[]): this; + setScrollFactor(x: number, y?: number, updateChildren?: boolean): this; + + readonly length: number; + readonly first: SpineGameObject; + readonly last: SpineGameObject; + readonly next: SpineGameObject; + readonly previous: SpineGameObject; + + protected preDestroy(): void; + + clearAlpha(): this; + setAlpha(value?: number): this; + + alpha: number; + blendMode: Phaser.BlendModes | string; + + setBlendMode(value: string | Phaser.BlendModes): this; + + width: number; + height: number; + + displayWidth: number; + displayHeight: number; + + setSize(width: number, height: number): this; + setDisplaySize(width: number, height: number): this; + + depth: number; + + setDepth(value: number): this; + + mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask; + + setMask(mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask): this; + clearMask(destroyMask?: boolean): this; + createBitmapMask(renderable?: Phaser.GameObjects.GameObject): Phaser.Display.Masks.BitmapMask; + createGeometryMask(graphics?: Phaser.GameObjects.Graphics): Phaser.Display.Masks.GeometryMask; + + x: number; + y: number; + z: number; + w: number; + + scale: number; + scaleX: number; + scaleY: number; + + angle: number; + rotation: number; + + setPosition(x?: number, y?: number, z?: number, w?: number): this; + setRandomPosition(x?: number, y?: number, width?: number, height?: number): this; + setRotation(radians?: number): this; + setAngle(degrees?: number): this; + setScale(x: number, y?: number): this; + setX(value?: number): this; + setY(value?: number): this; + setZ(value?: number): this; + setW(value?: number): this; + + getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + getWorldTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix, parentMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; + + getParentRotation(): number; + + visible: boolean; + + setVisible(value: boolean): this; +} + +declare interface SpineContainerConfig extends Phaser.Types.GameObjects.GameObjectConfig { + x?: number; + y?: number; + children?: SpineGameObject | SpineGameObject[]; +} diff --git a/types/SpineGameObject.d.ts b/types/SpineGameObject.d.ts index 90fe56476..a0abff445 100644 --- a/types/SpineGameObject.d.ts +++ b/types/SpineGameObject.d.ts @@ -5,7 +5,7 @@ declare class SpineGameObject extends Phaser.GameObjects.GameObject implements O constructor(scene: Phaser.Scene, pluginManager: SpinePlugin, x: number, y: number, key?: string, animationName?: string, loop?: boolean); alpha: number; - angle: integer; + angle: number; readonly blendMode: number; @@ -44,9 +44,9 @@ declare class SpineGameObject extends Phaser.GameObjects.GameObject implements O w: number; width: number; - addAnimation(trackIndex: integer, animationName: string, loop?: boolean, delay?: integer): spine.TrackEntry; + addAnimation(trackIndex: number, animationName: string, loop?: boolean, delay?: number): spine.TrackEntry; angleBoneToXY(bone: spine.Bone, worldX: number, worldY: number, offset?: number, minAngle?: number, maxAngle?: number): SpineGameObject; - clearTrack(trackIndex: integer): SpineGameObject; + clearTrack(trackIndex: number): SpineGameObject; clearTracks(): SpineGameObject; findAnimation(animationName: string): spine.Animation; findBone(boneName: string): spine.Bone; @@ -60,11 +60,11 @@ declare class SpineGameObject extends Phaser.GameObjects.GameObject implements O findSlotIndex(slotName: string): number; findTransformConstraint(constraintName: string): spine.TransformConstraintData; getAnimationList(): string[]; - getAttachment(slotIndex: integer, attachmentName: string): spine.Attachment; + getAttachment(slotIndex: number, attachmentName: string): spine.Attachment; getAttachmentByName(slotName: string, attachmentName: string): spine.Attachment; getBoneList(): string[]; getBounds(): any; - getCurrentAnimation(trackIndex?: integer): spine.Animation; + getCurrentAnimation(trackIndex?: number): spine.Animation; getLocalTransformMatrix(tempMatrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.GameObjects.Components.TransformMatrix; getParentRotation(): number; getRootBone(): spine.Bone; @@ -80,13 +80,13 @@ declare class SpineGameObject extends Phaser.GameObjects.GameObject implements O resetFlip(): this; setAlpha(value?: number): SpineGameObject; setAngle(degrees?: number): this; - setAnimation(trackIndex: integer, animationName: string, loop?: boolean, ignoreIfPlaying?: boolean): spine.TrackEntry; + setAnimation(trackIndex: number, animationName: string, loop?: boolean, ignoreIfPlaying?: boolean): spine.TrackEntry; setAttachment(slotName: string, attachmentName: string): SpineGameObject; setBonesToSetupPose(): SpineGameObject; - setColor(color?: integer, slotName?: string): SpineGameObject; - setDepth(value: integer): this; + setColor(color?: number, slotName?: string): SpineGameObject; + setDepth(value: number): this; setDisplaySize(width: number, height: number): this; - setEmptyAnimation(trackIndex: integer, mixDuration?: integer): spine.TrackEntry; + setEmptyAnimation(trackIndex: number, mixDuration?: number): spine.TrackEntry; setFlipX(value: boolean): this; setFlipY(value: boolean): this; setFlip(x: boolean, y: boolean): this; diff --git a/types/SpinePlugin.d.ts b/types/SpinePlugin.d.ts index e65e578db..899ff488e 100644 --- a/types/SpinePlugin.d.ts +++ b/types/SpinePlugin.d.ts @@ -1,6 +1,7 @@ /// /// /// +/// declare namespace Phaser.Loader { interface LoaderPlugin extends Phaser.Events.EventEmitter { @@ -10,11 +11,13 @@ declare namespace Phaser.Loader { declare namespace Phaser.GameObjects { interface GameObjectFactory { - spine(x: number, y: number, key?: string, aimationName?: string, loop?: boolean): SpineGameObject; + spine(x: number, y: number, key?: string, animationName?: string, loop?: boolean): SpineGameObject; + spineContainer(x: number, y: number, children?: SpineGameObject | SpineGameObject[]): SpineContainer; } interface GameObjectCreator { spine(config: SpineGameObjectConfig, addToScene?: boolean): SpineGameObject; + spineContainer(config: SpineContainerConfig, addToScene?: boolean): SpineContainer; } } From 07ea83ac39b8f588ede7ebe287805a86e70365d4 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 26 Aug 2020 00:00:17 +0100 Subject: [PATCH 107/241] Update package-lock.json --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8c70f1db3..47f2ea350 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "phaser", - "version": "3.50.0-beta.2", + "version": "3.50.0-beta.3", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -453,7 +453,7 @@ "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "integrity": "sha1-vNZ5HqWuCXJeF+WtmIE0zUCz2RE=", "dev": true, "requires": { "sprintf-js": "~1.0.2" @@ -686,7 +686,7 @@ "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", "dev": true, "requires": { "balanced-match": "^1.0.0", @@ -1187,7 +1187,7 @@ "concat-stream": { "version": "1.6.2", "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "integrity": "sha1-kEvfGUzTEi/Gdcd/xKw9T/D9GjQ=", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -1735,7 +1735,7 @@ "esrecurse": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "integrity": "sha1-AHo7n9vCs7uH5IeeoZyS/b05Qs8=", "dev": true, "requires": { "estraverse": "^4.1.0" @@ -3081,7 +3081,7 @@ "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", "dev": true, "requires": { "brace-expansion": "^1.1.7" From 2c79753ef3a0ae4ce41c5c009f4932b64928c62e Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 26 Aug 2020 00:00:19 +0100 Subject: [PATCH 108/241] Update CHANGELOG.md --- CHANGELOG.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11c74388b..1cc63bdba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -195,17 +195,19 @@ The way in which Game Objects add themselves to the Scene Update List has change ### Spine Plugin Updates -* `SpineContainer` is a new Game Object available via `this.add.spinecontainer` to which you can add Spine Game Objects only. It uses a special rendering function to retain batching, even across multiple container or Spine Game Object instances, resulting in dramatically improved performance over using regular Containers. +* The Spine Runtimes have been updated to 3.8.95, which are the most recent non-beta versions. Please note, you will _need_ to re-export your animations if you're working in a version of Spine lower than 3.8.20. +* `SpineContainer` is a new Game Object available via `this.add.spineContainer` to which you can add Spine Game Objects only. It uses a special rendering function to retain batching, even across multiple container or Spine Game Object instances, resulting in dramatically improved performance over using regular Containers. * A Spine Game Object with `setVisible(false)` will no longer still cause internal gl commands and is now properly skipped, retaining any current batch in the process. Fix #5174 (thanks @Kitsee) * The Spine Game Object WebGL Renderer will no longer clear the type if invisible and will only end the batch if the next type doesn't match. * The Spine Game Object WebGL Renderer will no longer rebind the pipeline if it was the final object on the display list, saving lots of gl commands. -* The Spine Runtimes have been updated to 3.8.95, which are the most recent non-beta versions. Please note, you will _need_ to re-export your animations if you're working in a version of Spine lower than 3.8.20. * The Webpack build scripts have all been updated for Webpack 4.44.x. Fix #5243 (thanks @RollinSafary) * There is a new npm script `npm run plugin.spine.runtimes` which will build all of the Spine runtimes, for ingestion by the plugin. Note: You will need to check-out the Esoteric Spine Runtimes repo into `plugins/spine/` in order for this to work. * Spine Game Objects can now be rendered to Render Textures. Fix #5184 (thanks @Kitsee) * Using > 128 Spine objects in a Container would cause a `WebGL: INVALID_OPERATION: vertexAttribPointer: no ARRAY_BUFFER is bound and offset is non-zero` error if you added any subsequent Spine objects to the Scene. There is now no limit. Fix #5246 (thanks @d7561985) * The Spine Plugin will now work in HEADLESS mode without crashing. Fix #4988 (thanks @raimon-segura) * Spine Game Objects now use -1 as their default blend mode, which means 'skip setting it'. +* The Spine TypeScript defs have been updated for the latest version of the plugin and to add SpineContainers. +* The `SpineGameObject.setAnimation` method will now use the `trackIndex` parameter if `ignoreIfPlaying` is set and run the check against this track index. Fix #4842 (thanks @vinerz) ### New Features From 798fa8f5fdb25896cbbab6712fd9ef9806d5ad23 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 26 Aug 2020 00:14:16 +0100 Subject: [PATCH 109/241] The `SpineFile` will no longer throw a warning if adding a texture into the Texture Manager that already exists. This allows you to have multiple Spine JSON use the same texture file, however, it also means you now get no warning if you accidentally load a texture that exists, so be careful with your keys! Fix #4947 --- plugins/spine/src/SpineFile.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/spine/src/SpineFile.js b/plugins/spine/src/SpineFile.js index 63f4b2ea3..454c7596b 100644 --- a/plugins/spine/src/SpineFile.js +++ b/plugins/spine/src/SpineFile.js @@ -211,6 +211,7 @@ var SpineFile = new Class({ var atlasKey = ''; var combinedAtlasData = ''; var preMultipliedAlpha = (this.config.preMultipliedAlpha) ? true : false; + var textureManager = this.loader.textureManager; for (var i = 1; i < this.files.length; i++) { @@ -230,7 +231,10 @@ var SpineFile = new Class({ var pos = src.indexOf('_'); var key = src.substr(pos + 1); - this.loader.textureManager.addImage(key, file.data); + if (!textureManager.exists(key)) + { + textureManager.addImage(key, file.data); + } } file.pendingDestroy(); From 76ce778688d9ab0c4afae1216da79aac70f738c6 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 26 Aug 2020 00:14:20 +0100 Subject: [PATCH 110/241] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cc63bdba..282e4a619 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -208,6 +208,7 @@ The way in which Game Objects add themselves to the Scene Update List has change * Spine Game Objects now use -1 as their default blend mode, which means 'skip setting it'. * The Spine TypeScript defs have been updated for the latest version of the plugin and to add SpineContainers. * The `SpineGameObject.setAnimation` method will now use the `trackIndex` parameter if `ignoreIfPlaying` is set and run the check against this track index. Fix #4842 (thanks @vinerz) +* The `SpineFile` will no longer throw a warning if adding a texture into the Texture Manager that already exists. This allows you to have multiple Spine JSON use the same texture file, however, it also means you now get no warning if you accidentally load a texture that exists, so be careful with your keys! Fix #4947 (thanks @Nomy1) ### New Features From 809b8a41d91f156a0609e8a245163c5fb977a369 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 26 Aug 2020 00:19:19 +0100 Subject: [PATCH 111/241] The `WebGLRenderer.updateCanvasTexture` method will now set `gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL` to true, which should stop issues where you update a Text Game Object, having added a Render Texture or Spine Game Object to the Scene after it, which switches the PMA setting. Fix #5064 --- src/renderer/webgl/WebGLRenderer.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/renderer/webgl/WebGLRenderer.js b/src/renderer/webgl/WebGLRenderer.js index b7b2f0218..8cd870ccb 100644 --- a/src/renderer/webgl/WebGLRenderer.js +++ b/src/renderer/webgl/WebGLRenderer.js @@ -2812,6 +2812,7 @@ var WebGLRenderer = new Class({ gl.bindTexture(gl.TEXTURE_2D, dstTexture); gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, flipY); + gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true); gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, srcCanvas); From c35c96cd5c19853cab4f30cd3b3c529313587b58 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 26 Aug 2020 00:19:23 +0100 Subject: [PATCH 112/241] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 282e4a619..d49e4f2bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -258,6 +258,7 @@ The way in which Game Objects add themselves to the Scene Update List has change * The `BaseShader` default vertex shader now includes the `outTexCoord` vec2 varying, mapped to be the same as that found in the pipeline shaders. Fix #5120 (@pavel-shirobok) * When using the `GameObjectCreator` for `Containers` you can now specify the `children` property in the configuration object. * `WebGLRenderer.finalType` is a new boolean property that signifies if the current Game Object being rendered is the final one in the list. +* The `WebGLRenderer.updateCanvasTexture` method will now set `gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL` to true, which should stop issues where you update a Text Game Object, having added a Render Texture or Spine Game Object to the Scene after it, which switches the PMA setting. Fix #5064 (thanks @hugoruscitti) ### Bug Fixes From 912bed582059f54757e2047ce0b4cb223689ac26 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 26 Aug 2020 00:39:57 +0100 Subject: [PATCH 113/241] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d49e4f2bf..4fb329991 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -258,7 +258,7 @@ The way in which Game Objects add themselves to the Scene Update List has change * The `BaseShader` default vertex shader now includes the `outTexCoord` vec2 varying, mapped to be the same as that found in the pipeline shaders. Fix #5120 (@pavel-shirobok) * When using the `GameObjectCreator` for `Containers` you can now specify the `children` property in the configuration object. * `WebGLRenderer.finalType` is a new boolean property that signifies if the current Game Object being rendered is the final one in the list. -* The `WebGLRenderer.updateCanvasTexture` method will now set `gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL` to true, which should stop issues where you update a Text Game Object, having added a Render Texture or Spine Game Object to the Scene after it, which switches the PMA setting. Fix #5064 (thanks @hugoruscitti) +* The `WebGLRenderer.updateCanvasTexture` method will now set `gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL` to true, which should stop issues where you update a Text Game Object, having added a Render Texture or Spine Game Object to the Scene after it, which switches the PMA setting. Fix #5064 #5155 (thanks @hugoruscitti @immangrove-supertree) ### Bug Fixes From 55e56b1eff0057abf9924ea2a34150f9d9b31283 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 26 Aug 2020 10:58:06 +0100 Subject: [PATCH 114/241] `Clock.addEvent` can now take an existing `TimerEvent` object, as well as a config object. If a `TimerEvent` is given it will be removed from the Clock, reset and then added. This allows you to pool TimerEvents rather than constantly create and delete them. Fix #4115 `Clock.removeEvent` is a new method that allows you to remove a `TimerEvent`, or an array of them, from all internal lists of the current Clock. --- src/time/Clock.js | 74 +++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 62 insertions(+), 12 deletions(-) diff --git a/src/time/Clock.js b/src/time/Clock.js index 38613e440..16409ec7a 100644 --- a/src/time/Clock.js +++ b/src/time/Clock.js @@ -8,6 +8,7 @@ var Class = require('../utils/Class'); var PluginCache = require('../plugins/PluginCache'); var SceneEvents = require('../scene/events'); var TimerEvent = require('./TimerEvent'); +var Remove = require('../utils/array/Remove'); /** * @classdesc @@ -55,12 +56,9 @@ var Clock = new Class({ */ this.now = 0; - // Scale the delta time coming into the Clock by this factor - // which then influences anything using this Clock for calculations, like TimerEvents - /** * The scale of the Clock's time delta. - * + * * The time delta is the time elapsed between two consecutive frames and influences the speed of time for this Clock and anything which uses it, such as its Timer Events. Values higher than 1 increase the speed of time, while values smaller than 1 decrease it. A value of 0 freezes time and is effectively equivalent to pausing the Clock. * * @name Phaser.Time.Clock#timeScale @@ -94,7 +92,7 @@ var Clock = new Class({ this._active = []; /** - * An array of all Timer Events which will be added to the Clock at the start of the frame. + * An array of all Timer Events which will be added to the Clock at the start of the next frame. * * @name Phaser.Time.Clock#_pendingInsertion * @type {Phaser.Time.TimerEvent[]} @@ -105,7 +103,7 @@ var Clock = new Class({ this._pendingInsertion = []; /** - * An array of all Timer Events which will be removed from the Clock at the start of the frame. + * An array of all Timer Events which will be removed from the Clock at the start of the next frame. * * @name Phaser.Time.Clock#_pendingRemoval * @type {Phaser.Time.TimerEvent[]} @@ -131,7 +129,7 @@ var Clock = new Class({ { // Sync with the TimeStep this.now = this.systems.game.loop.time; - + this.systems.events.once(SceneEvents.DESTROY, this.destroy, this); }, @@ -156,16 +154,36 @@ var Clock = new Class({ /** * Creates a Timer Event and adds it to the Clock at the start of the frame. * + * You can also pass in an existing Timer Event, which will be reset and added to this Clock. + * + * Note that if the Timer Event is being used by _another_ Clock (in another Scene) it will still + * be updated by that Clock as well, so be careful when using this feature. + * * @method Phaser.Time.Clock#addEvent * @since 3.0.0 * - * @param {Phaser.Types.Time.TimerEventConfig} config - The configuration for the Timer Event. + * @param {(Phaser.Time.TimerEvent | Phaser.Types.Time.TimerEventConfig)} config - The configuration for the Timer Event, or an existing Timer Event object. * - * @return {Phaser.Time.TimerEvent} The Timer Event which was created. + * @return {Phaser.Time.TimerEvent} The Timer Event which was created, or passed in. */ addEvent: function (config) { - var event = new TimerEvent(config); + var event; + + if (config instanceof Phaser.Time.TimerEvent) + { + event = config; + + this.removeEvent(event); + + event.elapsed = event.startAt; + event.hasDispatched = false; + event.repeatCount = (event.repeat === -1 || event.loop) ? 999999999999 : event.repeat; + } + else + { + event = new TimerEvent(config); + } this._pendingInsertion.push(event); @@ -198,7 +216,7 @@ var Clock = new Class({ * @method Phaser.Time.Clock#clearPendingEvents * @since 3.0.0 * - * @return {Phaser.Time.Clock} This Clock object. + * @return {this} - This Clock instance. */ clearPendingEvents: function () { @@ -207,13 +225,45 @@ var Clock = new Class({ return this; }, + /** + * Removes the given Timer Event, or an array of Timer Events, from this Clock. + * + * The events are removed from all internal lists (active, pending and removal), + * freeing the event up to be re-used. + * + * @method Phaser.Time.Clock#removeEvent + * @since 3.50.0 + * + * @param {(Phaser.Time.TimerEvent | Phaser.Time.TimerEvent[])} events - The Timer Event, or an array of Timer Events, to remove from this Clock. + * + * @return {this} - This Clock instance. + */ + removeEvent: function (events) + { + if (!Array.isArray(events)) + { + events = [ events ]; + } + + for (var i = 0; i < events.length; i++) + { + var event = events[i]; + + Remove(this._pendingRemoval, event); + Remove(this._pendingInsertion, event); + Remove(this._active, event); + } + + return this; + }, + /** * Schedules all active Timer Events for removal at the start of the frame. * * @method Phaser.Time.Clock#removeAllEvents * @since 3.0.0 * - * @return {Phaser.Time.Clock} This Clock object. + * @return {this} - This Clock instance. */ removeAllEvents: function () { From da4af063b9331037f9b0f17f859c3a496e7853f9 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 26 Aug 2020 10:58:10 +0100 Subject: [PATCH 115/241] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4fb329991..bc715880e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -230,6 +230,8 @@ The way in which Game Objects add themselves to the Scene Update List has change * `WebGLPipeline.hasBooted` is a new boolean property that tracks if the pipeline has been booted or not, which is now far more important in 3.5 than in previous versions. This is checked in the `WebGLRenderer.addPipeline` method, and if not set, the pipeline is booted. Fix #5251 #5255 (thanks @telinc1 @rexrainbow) * The WebGL Renderer will now add the pipelines during the `boot` method, instead of `init`. * You can now use `this.renderer` from within a Scene, as it's now a Scene-level property and part of the Injection Map. +* `Clock.addEvent` can now take an existing `TimerEvent` object, as well as a config object. If a `TimerEvent` is given it will be removed from the Clock, reset and then added. This allows you to pool TimerEvents rather than constantly create and delete them. Fix #4115 (thanks @jcyuan) +* `Clock.removeEvent` is a new method that allows you to remove a `TimerEvent`, or an array of them, from all internal lists of the current Clock. ### Updates and API Changes From 80c571963c0ada30ece864e83ad3d77600d3b96e Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 26 Aug 2020 13:06:04 +0100 Subject: [PATCH 116/241] `Textures.Parsers.JSONHash` will now perform a `hasOwnProperty` check when iterating the frames, skipping anything that isn't a direct property. This should allow you to use generated atlas data that comes from `JSON.parse`. Fix #4768 --- src/textures/parsers/JSONHash.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/textures/parsers/JSONHash.js b/src/textures/parsers/JSONHash.js index bb201531f..32c9d44bc 100644 --- a/src/textures/parsers/JSONHash.js +++ b/src/textures/parsers/JSONHash.js @@ -41,6 +41,11 @@ var JSONHash = function (texture, sourceIndex, json) for (var key in frames) { + if (!frames.hasOwnProperty(key)) + { + continue; + } + var src = frames[key]; // The frame values are the exact coordinates to cut the frame out of the atlas from From 3f9950fc003527150beeb63fed74fb4a6b46eebe Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 26 Aug 2020 13:06:15 +0100 Subject: [PATCH 117/241] Update Sprite3D.js --- plugins/camera3d/src/sprite3d/Sprite3D.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/camera3d/src/sprite3d/Sprite3D.js b/plugins/camera3d/src/sprite3d/Sprite3D.js index 8bc530545..1d1b56d0b 100644 --- a/plugins/camera3d/src/sprite3d/Sprite3D.js +++ b/plugins/camera3d/src/sprite3d/Sprite3D.js @@ -18,7 +18,7 @@ var Vector4 = require('../../../../src/math/Vector4'); * it to be rendered by a 3D Camera. The Sprite can be positioned anywhere within 3D space. * * @class Sprite3D - * @extends Phaser.GameObjects.GameObject + * @extends Phaser.GameObjects.Sprite * @memberOf Phaser.GameObjects * @constructor * @since 3.0.0 From 4d4b3c1cad52253ad988d4e3e93d00a851495ada Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 26 Aug 2020 13:06:18 +0100 Subject: [PATCH 118/241] Update CHANGELOG.md --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc715880e..e47224c16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -261,6 +261,7 @@ The way in which Game Objects add themselves to the Scene Update List has change * When using the `GameObjectCreator` for `Containers` you can now specify the `children` property in the configuration object. * `WebGLRenderer.finalType` is a new boolean property that signifies if the current Game Object being rendered is the final one in the list. * The `WebGLRenderer.updateCanvasTexture` method will now set `gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL` to true, which should stop issues where you update a Text Game Object, having added a Render Texture or Spine Game Object to the Scene after it, which switches the PMA setting. Fix #5064 #5155 (thanks @hugoruscitti @immangrove-supertree) +* `Textures.Parsers.JSONHash` will now perform a `hasOwnProperty` check when iterating the frames, skipping anything that isn't a direct property. This should allow you to use generated atlas data that comes from `JSON.parse`. Fix #4768 (thanks @RollinSafary) ### Bug Fixes @@ -277,7 +278,7 @@ The way in which Game Objects add themselves to the Scene Update List has change My thanks to the following for helping with the Phaser 3 Examples, Docs, and TypeScript definitions, either by reporting errors, fixing them, or helping author the docs: -@samme @16patsle @scott20145 @khasanovbi @mk360 @volkans80 @jaabberwocky +@samme @16patsle @scott20145 @khasanovbi @mk360 @volkans80 @jaabberwocky @maikthomas @atursams @LearningCode2023 @DylanC From f51200479b126699e357bff8ebb1dbe85b9440b0 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 26 Aug 2020 13:19:00 +0100 Subject: [PATCH 119/241] The `Camera3D` Plugin has been rebuilt for Phaser 3.50 and the webpack config updated. --- plugins/camera3d/copy-to-examples.js | 13 + plugins/camera3d/dist/camera3d.js | 36006 +++++++++++++++--------- plugins/camera3d/dist/camera3d.min.js | 2 +- plugins/camera3d/webpack.config.js | 20 +- 4 files changed, 23034 insertions(+), 13007 deletions(-) create mode 100644 plugins/camera3d/copy-to-examples.js diff --git a/plugins/camera3d/copy-to-examples.js b/plugins/camera3d/copy-to-examples.js new file mode 100644 index 000000000..edfea11de --- /dev/null +++ b/plugins/camera3d/copy-to-examples.js @@ -0,0 +1,13 @@ +var fs = require('fs-extra'); + +var source = './plugins/camera3d/dist/'; +var dest = '../phaser3-examples/public/plugins/'; + +if (fs.existsSync(dest)) +{ + fs.copySync(source, dest, { overwrite: true }); +} +else +{ + console.log('Copy-to-Examples failed: Phaser 3 Examples not present at ../phaser3-examples'); +} diff --git a/plugins/camera3d/dist/camera3d.js b/plugins/camera3d/dist/camera3d.js index 3d5710ed0..298be22e0 100644 --- a/plugins/camera3d/dist/camera3d.js +++ b/plugins/camera3d/dist/camera3d.js @@ -37,19 +37,34 @@ var Camera3DPlugin = /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? @@ -67,7 +82,7 @@ var Camera3DPlugin = /******/ /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 74); +/******/ return __webpack_require__(__webpack_require__.s = 43); /******/ }) /************************************************************************/ /******/ ([ @@ -76,8 +91,8 @@ var Camera3DPlugin = /** * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} */ // Taken from klasse by mattdesl https://github.com/mattdesl/klasse @@ -142,6 +157,15 @@ function hasNonConfigurable (obj, k) return false; } +/** + * Extends the given `myClass` object's prototype with the properties of `definition`. + * + * @function extend + * @param {Object} ctor The constructor object to mix into. + * @param {Object} definition A dictionary of functions for the class. + * @param {boolean} isClassDescriptor Is the definition a class descriptor? + * @param {Object} [extend] The parent constructor object. + */ function extend (ctor, definition, isClassDescriptor, extend) { for (var k in definition) @@ -184,6 +208,13 @@ function extend (ctor, definition, isClassDescriptor, extend) } } +/** + * Applies the given `mixins` to the prototype of `myClass`. + * + * @function mixin + * @param {Object} myClass The constructor object to mix into. + * @param {Object|Array} mixins The mixins to apply to the constructor. + */ function mixin (myClass, mixins) { if (!mixins) @@ -212,7 +243,7 @@ function mixin (myClass, mixins) * You can also use `Extends` and `Mixins` to provide subclassing * and inheritance. * - * @class Class + * @class Phaser.Class * @constructor * @param {Object} definition a dictionary of functions for the class * @example @@ -314,89 +345,876 @@ module.exports = Class; /** * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji +// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl + var Class = __webpack_require__(0); +var FuzzyEqual = __webpack_require__(17); /** * @classdesc - * Defines a Point in 2D space, with an x and y component. + * A representation of a vector in 2D space. * - * @class Point - * @memberOf Phaser.Geom + * A two-component vector. + * + * @class Vector2 + * @memberof Phaser.Math * @constructor * @since 3.0.0 * - * @param {number} [x=0] - The x coordinate of this Point. - * @param {number} [y=x] - The y coordinate of this Point. + * @param {number|Phaser.Types.Math.Vector2Like} [x] - The x component, or an object with `x` and `y` properties. + * @param {number} [y] - The y component. */ -var Point = new Class({ +var Vector2 = new Class({ initialize: - function Point (x, y) + function Vector2 (x, y) { - if (x === undefined) { x = 0; } - if (y === undefined) { y = x; } - /** - * The x coordinate of this Point. + * The x component of this Vector. * - * @name Phaser.Geom.Point#x + * @name Phaser.Math.Vector2#x * @type {number} * @default 0 * @since 3.0.0 */ - this.x = x; + this.x = 0; /** - * The y coordinate of this Point. + * The y component of this Vector. * - * @name Phaser.Geom.Point#y + * @name Phaser.Math.Vector2#y * @type {number} * @default 0 * @since 3.0.0 */ - this.y = y; + this.y = 0; + + if (typeof x === 'object') + { + this.x = x.x || 0; + this.y = x.y || 0; + } + else + { + if (y === undefined) { y = x; } + + this.x = x || 0; + this.y = y || 0; + } }, /** - * Set the x and y coordinates of the point to the given values. + * Make a clone of this Vector2. * - * @method Phaser.Geom.Point#setTo + * @method Phaser.Math.Vector2#clone * @since 3.0.0 * - * @param {number} [x=0] - The x coordinate of this Point. - * @param {number} [y=x] - The y coordinate of this Point. - * - * @return {Phaser.Geom.Point} This Point object. + * @return {Phaser.Math.Vector2} A clone of this Vector2. */ - setTo: function (x, y) + clone: function () + { + return new Vector2(this.x, this.y); + }, + + /** + * Copy the components of a given Vector into this Vector. + * + * @method Phaser.Math.Vector2#copy + * @since 3.0.0 + * + * @param {Phaser.Math.Vector2} src - The Vector to copy the components from. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + copy: function (src) + { + this.x = src.x || 0; + this.y = src.y || 0; + + return this; + }, + + /** + * Set the component values of this Vector from a given Vector2Like object. + * + * @method Phaser.Math.Vector2#setFromObject + * @since 3.0.0 + * + * @param {Phaser.Types.Math.Vector2Like} obj - The object containing the component values to set for this Vector. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + setFromObject: function (obj) + { + this.x = obj.x || 0; + this.y = obj.y || 0; + + return this; + }, + + /** + * Set the `x` and `y` components of the this Vector to the given `x` and `y` values. + * + * @method Phaser.Math.Vector2#set + * @since 3.0.0 + * + * @param {number} x - The x value to set for this Vector. + * @param {number} [y=x] - The y value to set for this Vector. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + set: function (x, y) { - if (x === undefined) { x = 0; } if (y === undefined) { y = x; } this.x = x; this.y = y; return this; + }, + + /** + * This method is an alias for `Vector2.set`. + * + * @method Phaser.Math.Vector2#setTo + * @since 3.4.0 + * + * @param {number} x - The x value to set for this Vector. + * @param {number} [y=x] - The y value to set for this Vector. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + setTo: function (x, y) + { + return this.set(x, y); + }, + + /** + * Sets the `x` and `y` values of this object from a given polar coordinate. + * + * @method Phaser.Math.Vector2#setToPolar + * @since 3.0.0 + * + * @param {number} azimuth - The angular coordinate, in radians. + * @param {number} [radius=1] - The radial coordinate (length). + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + setToPolar: function (azimuth, radius) + { + if (radius == null) { radius = 1; } + + this.x = Math.cos(azimuth) * radius; + this.y = Math.sin(azimuth) * radius; + + return this; + }, + + /** + * Check whether this Vector is equal to a given Vector. + * + * Performs a strict equality check against each Vector's components. + * + * @method Phaser.Math.Vector2#equals + * @since 3.0.0 + * + * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector. + * + * @return {boolean} Whether the given Vector is equal to this Vector. + */ + equals: function (v) + { + return ((this.x === v.x) && (this.y === v.y)); + }, + + /** + * Check whether this Vector is approximately equal to a given Vector. + * + * @method Phaser.Math.Vector2#fuzzyEquals + * @since 3.23.0 + * + * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector. + * @param {number} [epsilon=0.0001] - The tolerance value. + * + * @return {boolean} Whether both absolute differences of the x and y components are smaller than `epsilon`. + */ + fuzzyEquals: function (v, epsilon) + { + return (FuzzyEqual(this.x, v.x, epsilon) && FuzzyEqual(this.y, v.y, epsilon)); + }, + + /** + * Calculate the angle between this Vector and the positive x-axis, in radians. + * + * @method Phaser.Math.Vector2#angle + * @since 3.0.0 + * + * @return {number} The angle between this Vector, and the positive x-axis, given in radians. + */ + angle: function () + { + // computes the angle in radians with respect to the positive x-axis + + var angle = Math.atan2(this.y, this.x); + + if (angle < 0) + { + angle += 2 * Math.PI; + } + + return angle; + }, + + /** + * Set the angle of this Vector. + * + * @method Phaser.Math.Vector2#setAngle + * @since 3.23.0 + * + * @param {number} angle - The angle, in radians. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + setAngle: function (angle) + { + return this.setToPolar(angle, this.length()); + }, + + /** + * Add a given Vector to this Vector. Addition is component-wise. + * + * @method Phaser.Math.Vector2#add + * @since 3.0.0 + * + * @param {Phaser.Math.Vector2} src - The Vector to add to this Vector. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + add: function (src) + { + this.x += src.x; + this.y += src.y; + + return this; + }, + + /** + * Subtract the given Vector from this Vector. Subtraction is component-wise. + * + * @method Phaser.Math.Vector2#subtract + * @since 3.0.0 + * + * @param {Phaser.Math.Vector2} src - The Vector to subtract from this Vector. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + subtract: function (src) + { + this.x -= src.x; + this.y -= src.y; + + return this; + }, + + /** + * Perform a component-wise multiplication between this Vector and the given Vector. + * + * Multiplies this Vector by the given Vector. + * + * @method Phaser.Math.Vector2#multiply + * @since 3.0.0 + * + * @param {Phaser.Math.Vector2} src - The Vector to multiply this Vector by. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + multiply: function (src) + { + this.x *= src.x; + this.y *= src.y; + + return this; + }, + + /** + * Scale this Vector by the given value. + * + * @method Phaser.Math.Vector2#scale + * @since 3.0.0 + * + * @param {number} value - The value to scale this Vector by. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + scale: function (value) + { + if (isFinite(value)) + { + this.x *= value; + this.y *= value; + } + else + { + this.x = 0; + this.y = 0; + } + + return this; + }, + + /** + * Perform a component-wise division between this Vector and the given Vector. + * + * Divides this Vector by the given Vector. + * + * @method Phaser.Math.Vector2#divide + * @since 3.0.0 + * + * @param {Phaser.Math.Vector2} src - The Vector to divide this Vector by. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + divide: function (src) + { + this.x /= src.x; + this.y /= src.y; + + return this; + }, + + /** + * Negate the `x` and `y` components of this Vector. + * + * @method Phaser.Math.Vector2#negate + * @since 3.0.0 + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + negate: function () + { + this.x = -this.x; + this.y = -this.y; + + return this; + }, + + /** + * Calculate the distance between this Vector and the given Vector. + * + * @method Phaser.Math.Vector2#distance + * @since 3.0.0 + * + * @param {Phaser.Math.Vector2} src - The Vector to calculate the distance to. + * + * @return {number} The distance from this Vector to the given Vector. + */ + distance: function (src) + { + var dx = src.x - this.x; + var dy = src.y - this.y; + + return Math.sqrt(dx * dx + dy * dy); + }, + + /** + * Calculate the distance between this Vector and the given Vector, squared. + * + * @method Phaser.Math.Vector2#distanceSq + * @since 3.0.0 + * + * @param {Phaser.Math.Vector2} src - The Vector to calculate the distance to. + * + * @return {number} The distance from this Vector to the given Vector, squared. + */ + distanceSq: function (src) + { + var dx = src.x - this.x; + var dy = src.y - this.y; + + return dx * dx + dy * dy; + }, + + /** + * Calculate the length (or magnitude) of this Vector. + * + * @method Phaser.Math.Vector2#length + * @since 3.0.0 + * + * @return {number} The length of this Vector. + */ + length: function () + { + var x = this.x; + var y = this.y; + + return Math.sqrt(x * x + y * y); + }, + + /** + * Set the length (or magnitude) of this Vector. + * + * @method Phaser.Math.Vector2#setLength + * @since 3.23.0 + * + * @param {number} length + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + setLength: function (length) + { + return this.normalize().scale(length); + }, + + /** + * Calculate the length of this Vector squared. + * + * @method Phaser.Math.Vector2#lengthSq + * @since 3.0.0 + * + * @return {number} The length of this Vector, squared. + */ + lengthSq: function () + { + var x = this.x; + var y = this.y; + + return x * x + y * y; + }, + + /** + * Normalize this Vector. + * + * Makes the vector a unit length vector (magnitude of 1) in the same direction. + * + * @method Phaser.Math.Vector2#normalize + * @since 3.0.0 + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + normalize: function () + { + var x = this.x; + var y = this.y; + var len = x * x + y * y; + + if (len > 0) + { + len = 1 / Math.sqrt(len); + + this.x = x * len; + this.y = y * len; + } + + return this; + }, + + /** + * Rotate this Vector to its perpendicular, in the positive direction. + * + * @method Phaser.Math.Vector2#normalizeRightHand + * @since 3.0.0 + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + normalizeRightHand: function () + { + var x = this.x; + + this.x = this.y * -1; + this.y = x; + + return this; + }, + + /** + * Rotate this Vector to its perpendicular, in the negative direction. + * + * @method Phaser.Math.Vector2#normalizeLeftHand + * @since 3.23.0 + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + normalizeLeftHand: function () + { + var x = this.x; + + this.x = this.y; + this.y = x * -1; + + return this; + }, + + /** + * Calculate the dot product of this Vector and the given Vector. + * + * @method Phaser.Math.Vector2#dot + * @since 3.0.0 + * + * @param {Phaser.Math.Vector2} src - The Vector2 to dot product with this Vector2. + * + * @return {number} The dot product of this Vector and the given Vector. + */ + dot: function (src) + { + return this.x * src.x + this.y * src.y; + }, + + /** + * Calculate the cross product of this Vector and the given Vector. + * + * @method Phaser.Math.Vector2#cross + * @since 3.0.0 + * + * @param {Phaser.Math.Vector2} src - The Vector2 to cross with this Vector2. + * + * @return {number} The cross product of this Vector and the given Vector. + */ + cross: function (src) + { + return this.x * src.y - this.y * src.x; + }, + + /** + * Linearly interpolate between this Vector and the given Vector. + * + * Interpolates this Vector towards the given Vector. + * + * @method Phaser.Math.Vector2#lerp + * @since 3.0.0 + * + * @param {Phaser.Math.Vector2} src - The Vector2 to interpolate towards. + * @param {number} [t=0] - The interpolation percentage, between 0 and 1. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + lerp: function (src, t) + { + if (t === undefined) { t = 0; } + + var ax = this.x; + var ay = this.y; + + this.x = ax + t * (src.x - ax); + this.y = ay + t * (src.y - ay); + + return this; + }, + + /** + * Transform this Vector with the given Matrix. + * + * @method Phaser.Math.Vector2#transformMat3 + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector2 with. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + transformMat3: function (mat) + { + var x = this.x; + var y = this.y; + var m = mat.val; + + this.x = m[0] * x + m[3] * y + m[6]; + this.y = m[1] * x + m[4] * y + m[7]; + + return this; + }, + + /** + * Transform this Vector with the given Matrix. + * + * @method Phaser.Math.Vector2#transformMat4 + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector2 with. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + transformMat4: function (mat) + { + var x = this.x; + var y = this.y; + var m = mat.val; + + this.x = m[0] * x + m[4] * y + m[12]; + this.y = m[1] * x + m[5] * y + m[13]; + + return this; + }, + + /** + * Make this Vector the zero vector (0, 0). + * + * @method Phaser.Math.Vector2#reset + * @since 3.0.0 + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + reset: function () + { + this.x = 0; + this.y = 0; + + return this; + }, + + /** + * Limit the length (or magnitude) of this Vector. + * + * @method Phaser.Math.Vector2#limit + * @since 3.23.0 + * + * @param {number} max - The maximum length. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + limit: function (max) + { + var len = this.length(); + + if (len && len > max) + { + this.scale(max / len); + } + + return this; + }, + + /** + * Reflect this Vector off a line defined by a normal. + * + * @method Phaser.Math.Vector2#reflect + * @since 3.23.0 + * + * @param {Phaser.Math.Vector2} normal - A vector perpendicular to the line. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + reflect: function (normal) + { + normal = normal.clone().normalize(); + + return this.subtract(normal.scale(2 * this.dot(normal))); + }, + + /** + * Reflect this Vector across another. + * + * @method Phaser.Math.Vector2#mirror + * @since 3.23.0 + * + * @param {Phaser.Math.Vector2} axis - A vector to reflect across. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + mirror: function (axis) + { + return this.reflect(axis).negate(); + }, + + /** + * Rotate this Vector by an angle amount. + * + * @method Phaser.Math.Vector2#rotate + * @since 3.23.0 + * + * @param {number} delta - The angle to rotate by, in radians. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + rotate: function (delta) + { + var cos = Math.cos(delta); + var sin = Math.sin(delta); + + return this.set(cos * this.x - sin * this.y, sin * this.x + cos * this.y); } }); -module.exports = Point; +/** + * A static zero Vector2 for use by reference. + * + * This constant is meant for comparison operations and should not be modified directly. + * + * @constant + * @name Phaser.Math.Vector2.ZERO + * @type {Phaser.Math.Vector2} + * @since 3.1.0 + */ +Vector2.ZERO = new Vector2(); + +/** + * A static right Vector2 for use by reference. + * + * This constant is meant for comparison operations and should not be modified directly. + * + * @constant + * @name Phaser.Math.Vector2.RIGHT + * @type {Phaser.Math.Vector2} + * @since 3.16.0 + */ +Vector2.RIGHT = new Vector2(1, 0); + +/** + * A static left Vector2 for use by reference. + * + * This constant is meant for comparison operations and should not be modified directly. + * + * @constant + * @name Phaser.Math.Vector2.LEFT + * @type {Phaser.Math.Vector2} + * @since 3.16.0 + */ +Vector2.LEFT = new Vector2(-1, 0); + +/** + * A static up Vector2 for use by reference. + * + * This constant is meant for comparison operations and should not be modified directly. + * + * @constant + * @name Phaser.Math.Vector2.UP + * @type {Phaser.Math.Vector2} + * @since 3.16.0 + */ +Vector2.UP = new Vector2(0, -1); + +/** + * A static down Vector2 for use by reference. + * + * This constant is meant for comparison operations and should not be modified directly. + * + * @constant + * @name Phaser.Math.Vector2.DOWN + * @type {Phaser.Math.Vector2} + * @since 3.16.0 + */ +Vector2.DOWN = new Vector2(0, 1); + +/** + * A static one Vector2 for use by reference. + * + * This constant is meant for comparison operations and should not be modified directly. + * + * @constant + * @name Phaser.Math.Vector2.ONE + * @type {Phaser.Math.Vector2} + * @since 3.16.0 + */ +Vector2.ONE = new Vector2(1, 1); + +module.exports = Vector2; /***/ }), /* 2 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var MATH_CONST = { + + /** + * The value of PI * 2. + * + * @name Phaser.Math.PI2 + * @type {number} + * @since 3.0.0 + */ + PI2: Math.PI * 2, + + /** + * The value of PI * 0.5. + * + * @name Phaser.Math.TAU + * @type {number} + * @since 3.0.0 + */ + TAU: Math.PI * 0.5, + + /** + * An epsilon value (1.0e-6) + * + * @name Phaser.Math.EPSILON + * @type {number} + * @since 3.0.0 + */ + EPSILON: 1.0e-6, + + /** + * For converting degrees to radians (PI / 180) + * + * @name Phaser.Math.DEG_TO_RAD + * @type {number} + * @since 3.0.0 + */ + DEG_TO_RAD: Math.PI / 180, + + /** + * For converting radians to degrees (180 / PI) + * + * @name Phaser.Math.RAD_TO_DEG + * @type {number} + * @since 3.0.0 + */ + RAD_TO_DEG: 180 / Math.PI, + + /** + * An instance of the Random Number Generator. + * This is not set until the Game boots. + * + * @name Phaser.Math.RND + * @type {Phaser.Math.RandomDataGenerator} + * @since 3.0.0 + */ + RND: null, + + /** + * The minimum safe integer this browser supports. + * We use a const for backward compatibility with Internet Explorer. + * + * @name Phaser.Math.MIN_SAFE_INTEGER + * @type {number} + * @since 3.21.0 + */ + MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991, + + /** + * The maximum safe integer this browser supports. + * We use a const for backward compatibility with Internet Explorer. + * + * @name Phaser.Math.MAX_SAFE_INTEGER + * @type {number} + * @since 3.21.0 + */ + MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991 + +}; + +module.exports = MATH_CONST; + + +/***/ }), +/* 3 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} */ // Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji @@ -411,7 +1229,7 @@ var Class = __webpack_require__(0); * A three-component vector. * * @class Vector3 - * @memberOf Phaser.Math + * @memberof Phaser.Math * @constructor * @since 3.0.0 * @@ -502,13 +1320,13 @@ var Vector3 = new Class({ }, /** - * [description] + * Calculate the cross (vector) product of two given Vectors. * * @method Phaser.Math.Vector3#crossVectors * @since 3.0.0 * - * @param {Phaser.Math.Vector3} a - [description] - * @param {Phaser.Math.Vector3} b - [description] + * @param {Phaser.Math.Vector3} a - The first Vector to multiply. + * @param {Phaser.Math.Vector3} b - The second Vector to multiply. * * @return {Phaser.Math.Vector3} This Vector3. */ @@ -828,7 +1646,7 @@ var Vector3 = new Class({ * * @param {Phaser.Math.Vector3} v - The Vector3 to dot product with this Vector3. * - * @return {number} [description] + * @return {number} The dot product of this Vector and `v`. */ dot: function (v) { @@ -836,12 +1654,12 @@ var Vector3 = new Class({ }, /** - * [description] + * Calculate the cross (vector) product of this Vector (which will be modified) and the given Vector. * * @method Phaser.Math.Vector3#cross * @since 3.0.0 * - * @param {Phaser.Math.Vector3} v - [description] + * @param {Phaser.Math.Vector3} v - The Vector to cross product with. * * @return {Phaser.Math.Vector3} This Vector3. */ @@ -938,7 +1756,7 @@ var Vector3 = new Class({ }, /** - * [description] + * Transforms the coordinates of this Vector3 with the given Matrix4. * * @method Phaser.Math.Vector3#transformCoordinates * @since 3.0.0 @@ -1100,716 +1918,280 @@ var Vector3 = new Class({ }); -/* -Vector3.Zero = function () -{ - return new Vector3(0, 0, 0); -}; +/** + * A static zero Vector3 for use by reference. + * + * This constant is meant for comparison operations and should not be modified directly. + * + * @constant + * @name Phaser.Math.Vector3.ZERO + * @type {Phaser.Math.Vector3} + * @since 3.16.0 + */ +Vector3.ZERO = new Vector3(); -Vector3.Up = function () -{ - return new Vector3(0, 1.0, 0); -}; +/** + * A static right Vector3 for use by reference. + * + * This constant is meant for comparison operations and should not be modified directly. + * + * @constant + * @name Phaser.Math.Vector3.RIGHT + * @type {Phaser.Math.Vector3} + * @since 3.16.0 + */ +Vector3.RIGHT = new Vector3(1, 0, 0); -Vector3.Copy = function (source) -{ - return new Vector3(source.x, source.y, source.z); -}; +/** + * A static left Vector3 for use by reference. + * + * This constant is meant for comparison operations and should not be modified directly. + * + * @constant + * @name Phaser.Math.Vector3.LEFT + * @type {Phaser.Math.Vector3} + * @since 3.16.0 + */ +Vector3.LEFT = new Vector3(-1, 0, 0); -Vector3.TransformCoordinates = function (vector, transformation) -{ - var x = (vector.x * transformation.m[0]) + (vector.y * transformation.m[4]) + (vector.z * transformation.m[8]) + transformation.m[12]; - var y = (vector.x * transformation.m[1]) + (vector.y * transformation.m[5]) + (vector.z * transformation.m[9]) + transformation.m[13]; - var z = (vector.x * transformation.m[2]) + (vector.y * transformation.m[6]) + (vector.z * transformation.m[10]) + transformation.m[14]; - var w = (vector.x * transformation.m[3]) + (vector.y * transformation.m[7]) + (vector.z * transformation.m[11]) + transformation.m[15]; +/** + * A static up Vector3 for use by reference. + * + * This constant is meant for comparison operations and should not be modified directly. + * + * @constant + * @name Phaser.Math.Vector3.UP + * @type {Phaser.Math.Vector3} + * @since 3.16.0 + */ +Vector3.UP = new Vector3(0, -1, 0); - return new Vector3(x / w, y / w, z / w); -}; +/** + * A static down Vector3 for use by reference. + * + * This constant is meant for comparison operations and should not be modified directly. + * + * @constant + * @name Phaser.Math.Vector3.DOWN + * @type {Phaser.Math.Vector3} + * @since 3.16.0 + */ +Vector3.DOWN = new Vector3(0, 1, 0); -Vector3.TransformNormal = function (vector, transformation) -{ - var x = (vector.x * transformation.m[0]) + (vector.y * transformation.m[4]) + (vector.z * transformation.m[8]); - var y = (vector.x * transformation.m[1]) + (vector.y * transformation.m[5]) + (vector.z * transformation.m[9]); - var z = (vector.x * transformation.m[2]) + (vector.y * transformation.m[6]) + (vector.z * transformation.m[10]); +/** + * A static forward Vector3 for use by reference. + * + * This constant is meant for comparison operations and should not be modified directly. + * + * @constant + * @name Phaser.Math.Vector3.FORWARD + * @type {Phaser.Math.Vector3} + * @since 3.16.0 + */ +Vector3.FORWARD = new Vector3(0, 0, 1); - return new Vector3(x, y, z); -}; +/** + * A static back Vector3 for use by reference. + * + * This constant is meant for comparison operations and should not be modified directly. + * + * @constant + * @name Phaser.Math.Vector3.BACK + * @type {Phaser.Math.Vector3} + * @since 3.16.0 + */ +Vector3.BACK = new Vector3(0, 0, -1); -Vector3.Dot = function (left, right) -{ - return (left.x * right.x + left.y * right.y + left.z * right.z); -}; - -Vector3.Cross = function (left, right) -{ - var x = left.y * right.z - left.z * right.y; - var y = left.z * right.x - left.x * right.z; - var z = left.x * right.y - left.y * right.x; - - return new Vector3(x, y, z); -}; - -Vector3.Normalize = function (vector) -{ - var newVector = Vector3.Copy(vector); - newVector.normalize(); - - return newVector; -}; - -Vector3.Distance = function (value1, value2) -{ - return Math.sqrt(Vector3.DistanceSquared(value1, value2)); -}; - -Vector3.DistanceSquared = function (value1, value2) -{ - var x = value1.x - value2.x; - var y = value1.y - value2.y; - var z = value1.z - value2.z; - - return (x * x) + (y * y) + (z * z); -}; -*/ +/** + * A static one Vector3 for use by reference. + * + * This constant is meant for comparison operations and should not be modified directly. + * + * @constant + * @name Phaser.Math.Vector3.ONE + * @type {Phaser.Math.Vector3} + * @since 3.16.0 + */ +Vector3.ONE = new Vector3(1, 1, 1); module.exports = Vector3; /***/ }), -/* 3 */ +/* 4 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Force a value within the boundaries by clamping it to the range `min`, `max`. + * + * @function Phaser.Math.Clamp + * @since 3.0.0 + * + * @param {number} value - The value to be clamped. + * @param {number} min - The minimum bounds. + * @param {number} max - The maximum bounds. + * + * @return {number} The clamped value. + */ +var Clamp = function (value, min, max) +{ + return Math.max(min, Math.min(max, value)); +}; + +module.exports = Clamp; + + +/***/ }), +/* 5 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji -// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl - var Class = __webpack_require__(0); - -/** - * @typedef {object} Vector2Like - * - * @property {number} x - The x component. - * @property {number} y - The y component. - */ +var GEOM_CONST = __webpack_require__(12); /** * @classdesc - * A representation of a vector in 2D space. + * Defines a Point in 2D space, with an x and y component. * - * A two-component vector. - * - * @class Vector2 - * @memberOf Phaser.Math + * @class Point + * @memberof Phaser.Geom * @constructor * @since 3.0.0 * - * @param {number|Vector2Like} [x] - The x component, or an object with `x` and `y` properties. - * @param {number} [y] - The y component. + * @param {number} [x=0] - The x coordinate of this Point. + * @param {number} [y=x] - The y coordinate of this Point. */ -var Vector2 = new Class({ +var Point = new Class({ initialize: - function Vector2 (x, y) + function Point (x, y) { + if (x === undefined) { x = 0; } + if (y === undefined) { y = x; } + /** - * The x component of this Vector. + * The geometry constant type of this object: `GEOM_CONST.POINT`. + * Used for fast type comparisons. * - * @name Phaser.Math.Vector2#x + * @name Phaser.Geom.Point#type + * @type {integer} + * @readonly + * @since 3.19.0 + */ + this.type = GEOM_CONST.POINT; + + /** + * The x coordinate of this Point. + * + * @name Phaser.Geom.Point#x * @type {number} * @default 0 * @since 3.0.0 */ - this.x = 0; + this.x = x; /** - * The y component of this Vector. + * The y coordinate of this Point. * - * @name Phaser.Math.Vector2#y + * @name Phaser.Geom.Point#y * @type {number} * @default 0 * @since 3.0.0 */ - this.y = 0; - - if (typeof x === 'object') - { - this.x = x.x || 0; - this.y = x.y || 0; - } - else - { - if (y === undefined) { y = x; } - - this.x = x || 0; - this.y = y || 0; - } + this.y = y; }, /** - * Make a clone of this Vector2. + * Set the x and y coordinates of the point to the given values. * - * @method Phaser.Math.Vector2#clone + * @method Phaser.Geom.Point#setTo * @since 3.0.0 * - * @return {Phaser.Math.Vector2} A clone of this Vector2. + * @param {number} [x=0] - The x coordinate of this Point. + * @param {number} [y=x] - The y coordinate of this Point. + * + * @return {this} This Point object. */ - clone: function () - { - return new Vector2(this.x, this.y); - }, - - /** - * Copy the components of a given Vector into this Vector. - * - * @method Phaser.Math.Vector2#copy - * @since 3.0.0 - * - * @param {Phaser.Math.Vector2} src - The Vector to copy the components from. - * - * @return {Phaser.Math.Vector2} This Vector2. - */ - copy: function (src) - { - this.x = src.x || 0; - this.y = src.y || 0; - - return this; - }, - - /** - * Set the component values of this Vector from a given Vector2Like object. - * - * @method Phaser.Math.Vector2#setFromObject - * @since 3.0.0 - * - * @param {Vector2Like} obj - The object containing the component values to set for this Vector. - * - * @return {Phaser.Math.Vector2} This Vector2. - */ - setFromObject: function (obj) - { - this.x = obj.x || 0; - this.y = obj.y || 0; - - return this; - }, - - /** - * Set the `x` and `y` components of the this Vector to the given `x` and `y` values. - * - * @method Phaser.Math.Vector2#set - * @since 3.0.0 - * - * @param {number} x - The x value to set for this Vector. - * @param {number} [y=x] - The y value to set for this Vector. - * - * @return {Phaser.Math.Vector2} This Vector2. - */ - set: function (x, y) + setTo: function (x, y) { + if (x === undefined) { x = 0; } if (y === undefined) { y = x; } this.x = x; this.y = y; - return this; - }, - - /** - * This method is an alias for `Vector2.set`. - * - * @method Phaser.Math.Vector2#setTo - * @since 3.4.0 - * - * @param {number} x - The x value to set for this Vector. - * @param {number} [y=x] - The y value to set for this Vector. - * - * @return {Phaser.Math.Vector2} This Vector2. - */ - setTo: function (x, y) - { - return this.set(x, y); - }, - - /** - * Sets the `x` and `y` values of this object from a given polar coordinate. - * - * @method Phaser.Math.Vector2#setToPolar - * @since 3.0.0 - * - * @param {number} azimuth - The angular coordinate, in radians. - * @param {number} [radius=1] - The radial coordinate (length). - * - * @return {Phaser.Math.Vector2} This Vector2. - */ - setToPolar: function (azimuth, radius) - { - if (radius == null) { radius = 1; } - - this.x = Math.cos(azimuth) * radius; - this.y = Math.sin(azimuth) * radius; - - return this; - }, - - /** - * Check whether this Vector is equal to a given Vector. - * - * Performs a strict equality check against each Vector's components. - * - * @method Phaser.Math.Vector2#equals - * @since 3.0.0 - * - * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector. - * - * @return {boolean} Whether the given Vector is equal to this Vector. - */ - equals: function (v) - { - return ((this.x === v.x) && (this.y === v.y)); - }, - - /** - * Calculate the angle between this Vector and the positive x-axis, in radians. - * - * @method Phaser.Math.Vector2#angle - * @since 3.0.0 - * - * @return {number} The angle between this Vector, and the positive x-axis, given in radians. - */ - angle: function () - { - // computes the angle in radians with respect to the positive x-axis - - var angle = Math.atan2(this.y, this.x); - - if (angle < 0) - { - angle += 2 * Math.PI; - } - - return angle; - }, - - /** - * Add a given Vector to this Vector. Addition is component-wise. - * - * @method Phaser.Math.Vector2#add - * @since 3.0.0 - * - * @param {Phaser.Math.Vector2} src - The Vector to add to this Vector. - * - * @return {Phaser.Math.Vector2} This Vector2. - */ - add: function (src) - { - this.x += src.x; - this.y += src.y; - - return this; - }, - - /** - * Subtract the given Vector from this Vector. Subtraction is component-wise. - * - * @method Phaser.Math.Vector2#subtract - * @since 3.0.0 - * - * @param {Phaser.Math.Vector2} src - The Vector to subtract from this Vector. - * - * @return {Phaser.Math.Vector2} This Vector2. - */ - subtract: function (src) - { - this.x -= src.x; - this.y -= src.y; - - return this; - }, - - /** - * Perform a component-wise multiplication between this Vector and the given Vector. - * - * Multiplies this Vector by the given Vector. - * - * @method Phaser.Math.Vector2#multiply - * @since 3.0.0 - * - * @param {Phaser.Math.Vector2} src - The Vector to multiply this Vector by. - * - * @return {Phaser.Math.Vector2} This Vector2. - */ - multiply: function (src) - { - this.x *= src.x; - this.y *= src.y; - - return this; - }, - - /** - * Scale this Vector by the given value. - * - * @method Phaser.Math.Vector2#scale - * @since 3.0.0 - * - * @param {number} value - The value to scale this Vector by. - * - * @return {Phaser.Math.Vector2} This Vector2. - */ - scale: function (value) - { - if (isFinite(value)) - { - this.x *= value; - this.y *= value; - } - else - { - this.x = 0; - this.y = 0; - } - - return this; - }, - - /** - * Perform a component-wise division between this Vector and the given Vector. - * - * Divides this Vector by the given Vector. - * - * @method Phaser.Math.Vector2#divide - * @since 3.0.0 - * - * @param {Phaser.Math.Vector2} src - The Vector to divide this Vector by. - * - * @return {Phaser.Math.Vector2} This Vector2. - */ - divide: function (src) - { - this.x /= src.x; - this.y /= src.y; - - return this; - }, - - /** - * Negate the `x` and `y` components of this Vector. - * - * @method Phaser.Math.Vector2#negate - * @since 3.0.0 - * - * @return {Phaser.Math.Vector2} This Vector2. - */ - negate: function () - { - this.x = -this.x; - this.y = -this.y; - - return this; - }, - - /** - * Calculate the distance between this Vector and the given Vector. - * - * @method Phaser.Math.Vector2#distance - * @since 3.0.0 - * - * @param {Phaser.Math.Vector2} src - The Vector to calculate the distance to. - * - * @return {number} The distance from this Vector to the given Vector. - */ - distance: function (src) - { - var dx = src.x - this.x; - var dy = src.y - this.y; - - return Math.sqrt(dx * dx + dy * dy); - }, - - /** - * Calculate the distance between this Vector and the given Vector, squared. - * - * @method Phaser.Math.Vector2#distanceSq - * @since 3.0.0 - * - * @param {Phaser.Math.Vector2} src - The Vector to calculate the distance to. - * - * @return {number} The distance from this Vector to the given Vector, squared. - */ - distanceSq: function (src) - { - var dx = src.x - this.x; - var dy = src.y - this.y; - - return dx * dx + dy * dy; - }, - - /** - * Calculate the length (or magnitude) of this Vector. - * - * @method Phaser.Math.Vector2#length - * @since 3.0.0 - * - * @return {number} The length of this Vector. - */ - length: function () - { - var x = this.x; - var y = this.y; - - return Math.sqrt(x * x + y * y); - }, - - /** - * Calculate the length of this Vector squared. - * - * @method Phaser.Math.Vector2#lengthSq - * @since 3.0.0 - * - * @return {number} The length of this Vector, squared. - */ - lengthSq: function () - { - var x = this.x; - var y = this.y; - - return x * x + y * y; - }, - - /** - * Normalize this Vector. - * - * Makes the vector a unit length vector (magnitude of 1) in the same direction. - * - * @method Phaser.Math.Vector2#normalize - * @since 3.0.0 - * - * @return {Phaser.Math.Vector2} This Vector2. - */ - normalize: function () - { - var x = this.x; - var y = this.y; - var len = x * x + y * y; - - if (len > 0) - { - len = 1 / Math.sqrt(len); - - this.x = x * len; - this.y = y * len; - } - - return this; - }, - - /** - * Right-hand normalize (make unit length) this Vector. - * - * @method Phaser.Math.Vector2#normalizeRightHand - * @since 3.0.0 - * - * @return {Phaser.Math.Vector2} This Vector2. - */ - normalizeRightHand: function () - { - var x = this.x; - - this.x = this.y * -1; - this.y = x; - - return this; - }, - - /** - * Calculate the dot product of this Vector and the given Vector. - * - * @method Phaser.Math.Vector2#dot - * @since 3.0.0 - * - * @param {Phaser.Math.Vector2} src - The Vector2 to dot product with this Vector2. - * - * @return {number} The dot product of this Vector and the given Vector. - */ - dot: function (src) - { - return this.x * src.x + this.y * src.y; - }, - - /** - * [description] - * - * @method Phaser.Math.Vector2#cross - * @since 3.0.0 - * - * @param {Phaser.Math.Vector2} src - [description] - * - * @return {number} [description] - */ - cross: function (src) - { - return this.x * src.y - this.y * src.x; - }, - - /** - * Linearly interpolate between this Vector and the given Vector. - * - * Interpolates this Vector towards the given Vector. - * - * @method Phaser.Math.Vector2#lerp - * @since 3.0.0 - * - * @param {Phaser.Math.Vector2} src - The Vector2 to interpolate towards. - * @param {number} [t=0] - The interpolation percentage, between 0 and 1. - * - * @return {Phaser.Math.Vector2} This Vector2. - */ - lerp: function (src, t) - { - if (t === undefined) { t = 0; } - - var ax = this.x; - var ay = this.y; - - this.x = ax + t * (src.x - ax); - this.y = ay + t * (src.y - ay); - - return this; - }, - - /** - * Transform this Vector with the given Matrix. - * - * @method Phaser.Math.Vector2#transformMat3 - * @since 3.0.0 - * - * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector2 with. - * - * @return {Phaser.Math.Vector2} This Vector2. - */ - transformMat3: function (mat) - { - var x = this.x; - var y = this.y; - var m = mat.val; - - this.x = m[0] * x + m[3] * y + m[6]; - this.y = m[1] * x + m[4] * y + m[7]; - - return this; - }, - - /** - * Transform this Vector with the given Matrix. - * - * @method Phaser.Math.Vector2#transformMat4 - * @since 3.0.0 - * - * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector2 with. - * - * @return {Phaser.Math.Vector2} This Vector2. - */ - transformMat4: function (mat) - { - var x = this.x; - var y = this.y; - var m = mat.val; - - this.x = m[0] * x + m[4] * y + m[12]; - this.y = m[1] * x + m[5] * y + m[13]; - - return this; - }, - - /** - * Make this Vector the zero vector (0, 0). - * - * @method Phaser.Math.Vector2#reset - * @since 3.0.0 - * - * @return {Phaser.Math.Vector2} This Vector2. - */ - reset: function () - { - this.x = 0; - this.y = 0; - return this; } }); -/** - * A static zero Vector2 for use by reference. - * - * @constant - * @name Phaser.Math.Vector2.ZERO - * @type {Vector2} - * @since 3.1.0 - */ -Vector2.ZERO = new Vector2(); - -module.exports = Vector2; +module.exports = Point; /***/ }), -/* 4 */ +/* 6 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH = __webpack_require__(17); -var GetValue = __webpack_require__(71); - -// Allowed types: - -// Implicit -// { -// x: 4 -// } -// -// From function -// { -// x: function () -// } -// -// Randomly pick one element from the array -// { -// x: [a, b, c, d, e, f] -// } -// -// Random integer between min and max: -// { -// x: { randInt: [min, max] } -// } -// -// Random float between min and max: -// { -// x: { randFloat: [min, max] } -// } +var MATH = __webpack_require__(45); +var GetValue = __webpack_require__(11); /** - * [description] + * Retrieves a value from an object. Allows for more advanced selection options, including: + * + * Allowed types: + * + * Implicit + * { + * x: 4 + * } + * + * From function + * { + * x: function () + * } + * + * Randomly pick one element from the array + * { + * x: [a, b, c, d, e, f] + * } + * + * Random integer between min and max: + * { + * x: { randInt: [min, max] } + * } + * + * Random float between min and max: + * { + * x: { randFloat: [min, max] } + * } + * * * @function Phaser.Utils.Objects.GetAdvancedValue * @since 3.0.0 * - * @param {object} source - [description] - * @param {string} key - [description] - * @param {*} defaultValue - [description] + * @param {object} source - The object to retrieve the value from. + * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object. + * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object. * - * @return {*} [description] + * @return {*} The value of the requested key. */ var GetAdvancedValue = function (source, key, defaultValue) { @@ -1846,13 +2228,74 @@ module.exports = GetAdvancedValue; /***/ }), -/* 5 */ +/* 7 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive. + * + * @function Phaser.Math.FloatBetween + * @since 3.0.0 + * + * @param {number} min - The lower bound for the float, inclusive. + * @param {number} max - The upper bound for the float exclusive. + * + * @return {number} A random float within the given range. + */ +var FloatBetween = function (min, max) +{ + return Math.random() * (max - min) + min; +}; + +module.exports = FloatBetween; + + +/***/ }), +/* 8 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Wrap the given `value` between `min` and `max. + * + * @function Phaser.Math.Wrap + * @since 3.0.0 + * + * @param {number} value - The value to wrap. + * @param {number} min - The minimum value. + * @param {number} max - The maximum value. + * + * @return {number} The wrapped value. + */ +var Wrap = function (value, min, max) +{ + var range = max - min; + + return (min + ((((value - min) % range) + range) % range)); +}; + +module.exports = Wrap; + + +/***/ }), +/* 9 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} */ // Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji @@ -1867,7 +2310,7 @@ var Class = __webpack_require__(0); * A four-component vector. * * @class Vector4 - * @memberOf Phaser.Math + * @memberof Phaser.Math * @constructor * @since 3.0.0 * @@ -1979,9 +2422,9 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#equals * @since 3.0.0 * - * @param {Phaser.Math.Vector4} v - [description] + * @param {Phaser.Math.Vector4} v - The vector to check equality with. * - * @return {boolean} [description] + * @return {boolean} A boolean indicating whether the two Vectors are equal or not. */ equals: function (v) { @@ -2243,7 +2686,7 @@ var Vector4 = new Class({ * @method Phaser.Math.Vector4#distance * @since 3.0.0 * - * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - [description] + * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to. * * @return {number} The distance from this Vector to the given Vector. */ @@ -2390,1950 +2833,14 @@ Vector4.prototype.lenSq = Vector4.prototype.lengthSq; module.exports = Vector4; -/***/ }), -/* 6 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * A NOOP (No Operation) callback function. - * - * Used internally by Phaser when it's more expensive to determine if a callback exists - * than it is to just invoke an empty function. - * - * @function Phaser.Utils.NOOP - * @since 3.0.0 - */ -var NOOP = function () -{ - // NOOP -}; - -module.exports = NOOP; - - -/***/ }), -/* 7 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * Wrap the given `value` between `min` and `max. - * - * @function Phaser.Math.Wrap - * @since 3.0.0 - * - * @param {number} value - The value to wrap. - * @param {number} min - The minimum value. - * @param {number} max - The maximum value. - * - * @return {number} The wrapped value. - */ -var Wrap = function (value, min, max) -{ - var range = max - min; - - return (min + ((((value - min) % range) + range) % range)); -}; - -module.exports = Wrap; - - -/***/ }), -/* 8 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Class = __webpack_require__(0); - -/** - * @classdesc - * A Matrix used for display transformations for rendering. - * - * It is represented like so: - * - * ``` - * | a | c | tx | - * | b | d | ty | - * | 0 | 0 | 1 | - * ``` - * - * @class TransformMatrix - * @memberOf Phaser.GameObjects.Components - * @constructor - * @since 3.0.0 - * - * @param {number} [a=1] - The Scale X value. - * @param {number} [b=0] - The Shear Y value. - * @param {number} [c=0] - The Shear X value. - * @param {number} [d=1] - The Scale Y value. - * @param {number} [tx=0] - The Translate X value. - * @param {number} [ty=0] - The Translate Y value. - */ -var TransformMatrix = new Class({ - - initialize: - - function TransformMatrix (a, b, c, d, tx, ty) - { - if (a === undefined) { a = 1; } - if (b === undefined) { b = 0; } - if (c === undefined) { c = 0; } - if (d === undefined) { d = 1; } - if (tx === undefined) { tx = 0; } - if (ty === undefined) { ty = 0; } - - /** - * The matrix values. - * - * @name Phaser.GameObjects.Components.TransformMatrix#matrix - * @type {Float32Array} - * @since 3.0.0 - */ - this.matrix = new Float32Array([ a, b, c, d, tx, ty, 0, 0, 1 ]); - - /** - * The decomposed matrix. - * - * @name Phaser.GameObjects.Components.TransformMatrix#decomposedMatrix - * @type {object} - * @since 3.0.0 - */ - this.decomposedMatrix = { - translateX: 0, - translateY: 0, - scaleX: 1, - scaleY: 1, - rotation: 0 - }; - }, - - /** - * The Scale X value. - * - * @name Phaser.GameObjects.Components.TransformMatrix#a - * @type {number} - * @since 3.4.0 - */ - a: { - - get: function () - { - return this.matrix[0]; - }, - - set: function (value) - { - this.matrix[0] = value; - } - - }, - - /** - * The Shear Y value. - * - * @name Phaser.GameObjects.Components.TransformMatrix#b - * @type {number} - * @since 3.4.0 - */ - b: { - - get: function () - { - return this.matrix[1]; - }, - - set: function (value) - { - this.matrix[1] = value; - } - - }, - - /** - * The Shear X value. - * - * @name Phaser.GameObjects.Components.TransformMatrix#c - * @type {number} - * @since 3.4.0 - */ - c: { - - get: function () - { - return this.matrix[2]; - }, - - set: function (value) - { - this.matrix[2] = value; - } - - }, - - /** - * The Scale Y value. - * - * @name Phaser.GameObjects.Components.TransformMatrix#d - * @type {number} - * @since 3.4.0 - */ - d: { - - get: function () - { - return this.matrix[3]; - }, - - set: function (value) - { - this.matrix[3] = value; - } - - }, - - /** - * The Translate X value. - * - * @name Phaser.GameObjects.Components.TransformMatrix#e - * @type {number} - * @since 3.11.0 - */ - e: { - - get: function () - { - return this.matrix[4]; - }, - - set: function (value) - { - this.matrix[4] = value; - } - - }, - - /** - * The Translate Y value. - * - * @name Phaser.GameObjects.Components.TransformMatrix#f - * @type {number} - * @since 3.11.0 - */ - f: { - - get: function () - { - return this.matrix[5]; - }, - - set: function (value) - { - this.matrix[5] = value; - } - - }, - - /** - * The Translate X value. - * - * @name Phaser.GameObjects.Components.TransformMatrix#tx - * @type {number} - * @since 3.4.0 - */ - tx: { - - get: function () - { - return this.matrix[4]; - }, - - set: function (value) - { - this.matrix[4] = value; - } - - }, - - /** - * The Translate Y value. - * - * @name Phaser.GameObjects.Components.TransformMatrix#ty - * @type {number} - * @since 3.4.0 - */ - ty: { - - get: function () - { - return this.matrix[5]; - }, - - set: function (value) - { - this.matrix[5] = value; - } - - }, - - /** - * The rotation of the Matrix. - * - * @name Phaser.GameObjects.Components.TransformMatrix#rotation - * @type {number} - * @readOnly - * @since 3.4.0 - */ - rotation: { - - get: function () - { - return Math.acos(this.a / this.scaleX) * (Math.atan(-this.c / this.a) < 0 ? -1 : 1); - } - - }, - - /** - * The horizontal scale of the Matrix. - * - * @name Phaser.GameObjects.Components.TransformMatrix#scaleX - * @type {number} - * @readOnly - * @since 3.4.0 - */ - scaleX: { - - get: function () - { - return Math.sqrt((this.a * this.a) + (this.c * this.c)); - } - - }, - - /** - * The vertical scale of the Matrix. - * - * @name Phaser.GameObjects.Components.TransformMatrix#scaleY - * @type {number} - * @readOnly - * @since 3.4.0 - */ - scaleY: { - - get: function () - { - return Math.sqrt((this.b * this.b) + (this.d * this.d)); - } - - }, - - /** - * Reset the Matrix to an identity matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#loadIdentity - * @since 3.0.0 - * - * @return {this} This TransformMatrix. - */ - loadIdentity: function () - { - var matrix = this.matrix; - - matrix[0] = 1; - matrix[1] = 0; - matrix[2] = 0; - matrix[3] = 1; - matrix[4] = 0; - matrix[5] = 0; - - return this; - }, - - /** - * Translate the Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#translate - * @since 3.0.0 - * - * @param {number} x - The horizontal translation value. - * @param {number} y - The vertical translation value. - * - * @return {this} This TransformMatrix. - */ - translate: function (x, y) - { - var matrix = this.matrix; - - matrix[4] = matrix[0] * x + matrix[2] * y + matrix[4]; - matrix[5] = matrix[1] * x + matrix[3] * y + matrix[5]; - - return this; - }, - - /** - * Scale the Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#scale - * @since 3.0.0 - * - * @param {number} x - The horizontal scale value. - * @param {number} y - The vertical scale value. - * - * @return {this} This TransformMatrix. - */ - scale: function (x, y) - { - var matrix = this.matrix; - - matrix[0] *= x; - matrix[1] *= x; - matrix[2] *= y; - matrix[3] *= y; - - return this; - }, - - /** - * Rotate the Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#rotate - * @since 3.0.0 - * - * @param {number} angle - The angle of rotation in radians. - * - * @return {this} This TransformMatrix. - */ - rotate: function (angle) - { - var sin = Math.sin(angle); - var cos = Math.cos(angle); - - var matrix = this.matrix; - - var a = matrix[0]; - var b = matrix[1]; - var c = matrix[2]; - var d = matrix[3]; - - matrix[0] = a * cos + c * sin; - matrix[1] = b * cos + d * sin; - matrix[2] = a * -sin + c * cos; - matrix[3] = b * -sin + d * cos; - - return this; - }, - - /** - * Multiply this Matrix by the given Matrix. - * - * If an `out` Matrix is given then the results will be stored in it. - * If it is not given, this matrix will be updated in place instead. - * Use an `out` Matrix if you do not wish to mutate this matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#multiply - * @since 3.0.0 - * - * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by. - * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in. - * - * @return {Phaser.GameObjects.Components.TransformMatrix} Either this TransformMatrix, or the `out` Matrix, if given in the arguments. - */ - multiply: function (rhs, out) - { - var matrix = this.matrix; - var source = rhs.matrix; - - var localA = matrix[0]; - var localB = matrix[1]; - var localC = matrix[2]; - var localD = matrix[3]; - var localE = matrix[4]; - var localF = matrix[5]; - - var sourceA = source[0]; - var sourceB = source[1]; - var sourceC = source[2]; - var sourceD = source[3]; - var sourceE = source[4]; - var sourceF = source[5]; - - var destinationMatrix = (out === undefined) ? this : out; - - destinationMatrix.a = sourceA * localA + sourceB * localC; - destinationMatrix.b = sourceA * localB + sourceB * localD; - destinationMatrix.c = sourceC * localA + sourceD * localC; - destinationMatrix.d = sourceC * localB + sourceD * localD; - destinationMatrix.e = sourceE * localA + sourceF * localC + localE; - destinationMatrix.f = sourceE * localB + sourceF * localD + localF; - - return destinationMatrix; - }, - - /** - * Multiply this Matrix by the matrix given, including the offset. - * - * The offsetX is added to the tx value: `offsetX * a + offsetY * c + tx`. - * The offsetY is added to the ty value: `offsetY * b + offsetY * d + ty`. - * - * @method Phaser.GameObjects.Components.TransformMatrix#multiplyWithOffset - * @since 3.11.0 - * - * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from. - * @param {number} offsetX - Horizontal offset to factor in to the multiplication. - * @param {number} offsetY - Vertical offset to factor in to the multiplication. - * - * @return {this} This TransformMatrix. - */ - multiplyWithOffset: function (src, offsetX, offsetY) - { - var matrix = this.matrix; - var otherMatrix = src.matrix; - - var a0 = matrix[0]; - var b0 = matrix[1]; - var c0 = matrix[2]; - var d0 = matrix[3]; - var tx0 = matrix[4]; - var ty0 = matrix[5]; - - var pse = offsetX * a0 + offsetY * c0 + tx0; - var psf = offsetX * b0 + offsetY * d0 + ty0; - - var a1 = otherMatrix[0]; - var b1 = otherMatrix[1]; - var c1 = otherMatrix[2]; - var d1 = otherMatrix[3]; - var tx1 = otherMatrix[4]; - var ty1 = otherMatrix[5]; - - matrix[0] = a1 * a0 + b1 * c0; - matrix[1] = a1 * b0 + b1 * d0; - matrix[2] = c1 * a0 + d1 * c0; - matrix[3] = c1 * b0 + d1 * d0; - matrix[4] = tx1 * a0 + ty1 * c0 + pse; - matrix[5] = tx1 * b0 + ty1 * d0 + psf; - - return this; - }, - - /** - * Transform the Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#transform - * @since 3.0.0 - * - * @param {number} a - The Scale X value. - * @param {number} b - The Shear Y value. - * @param {number} c - The Shear X value. - * @param {number} d - The Scale Y value. - * @param {number} tx - The Translate X value. - * @param {number} ty - The Translate Y value. - * - * @return {this} This TransformMatrix. - */ - transform: function (a, b, c, d, tx, ty) - { - var matrix = this.matrix; - - var a0 = matrix[0]; - var b0 = matrix[1]; - var c0 = matrix[2]; - var d0 = matrix[3]; - var tx0 = matrix[4]; - var ty0 = matrix[5]; - - matrix[0] = a * a0 + b * c0; - matrix[1] = a * b0 + b * d0; - matrix[2] = c * a0 + d * c0; - matrix[3] = c * b0 + d * d0; - matrix[4] = tx * a0 + ty * c0 + tx0; - matrix[5] = tx * b0 + ty * d0 + ty0; - - return this; - }, - - /** - * Transform a point using this Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#transformPoint - * @since 3.0.0 - * - * @param {number} x - The x coordinate of the point to transform. - * @param {number} y - The y coordinate of the point to transform. - * @param {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} point - The Point object to store the transformed coordinates. - * - * @return {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} The Point containing the transformed coordinates. - */ - transformPoint: function (x, y, point) - { - if (point === undefined) { point = { x: 0, y: 0 }; } - - var matrix = this.matrix; - - var a = matrix[0]; - var b = matrix[1]; - var c = matrix[2]; - var d = matrix[3]; - var tx = matrix[4]; - var ty = matrix[5]; - - point.x = x * a + y * c + tx; - point.y = x * b + y * d + ty; - - return point; - }, - - /** - * Invert the Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#invert - * @since 3.0.0 - * - * @return {this} This TransformMatrix. - */ - invert: function () - { - var matrix = this.matrix; - - var a = matrix[0]; - var b = matrix[1]; - var c = matrix[2]; - var d = matrix[3]; - var tx = matrix[4]; - var ty = matrix[5]; - - var n = a * d - b * c; - - matrix[0] = d / n; - matrix[1] = -b / n; - matrix[2] = -c / n; - matrix[3] = a / n; - matrix[4] = (c * ty - d * tx) / n; - matrix[5] = -(a * ty - b * tx) / n; - - return this; - }, - - /** - * Set the values of this Matrix to copy those of the matrix given. - * - * @method Phaser.GameObjects.Components.TransformMatrix#copyFrom - * @since 3.11.0 - * - * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from. - * - * @return {this} This TransformMatrix. - */ - copyFrom: function (src) - { - var matrix = this.matrix; - - matrix[0] = src.a; - matrix[1] = src.b; - matrix[2] = src.c; - matrix[3] = src.d; - matrix[4] = src.e; - matrix[5] = src.f; - - return this; - }, - - /** - * Set the values of this Matrix to copy those of the array given. - * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f. - * - * @method Phaser.GameObjects.Components.TransformMatrix#copyFromArray - * @since 3.11.0 - * - * @param {array} src - The array of values to set into this matrix. - * - * @return {this} This TransformMatrix. - */ - copyFromArray: function (src) - { - var matrix = this.matrix; - - matrix[0] = src[0]; - matrix[1] = src[1]; - matrix[2] = src[2]; - matrix[3] = src[3]; - matrix[4] = src[4]; - matrix[5] = src[5]; - - return this; - }, - - /** - * Copy the values from this Matrix to the given Canvas Rendering Context. - * This will use the Context.transform method. - * - * @method Phaser.GameObjects.Components.TransformMatrix#copyToContext - * @since 3.12.0 - * - * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to. - * - * @return {CanvasRenderingContext2D} The Canvas Rendering Context. - */ - copyToContext: function (ctx) - { - var matrix = this.matrix; - - ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); - - return ctx; - }, - - /** - * Copy the values from this Matrix to the given Canvas Rendering Context. - * This will use the Context.setTransform method. - * - * @method Phaser.GameObjects.Components.TransformMatrix#setToContext - * @since 3.12.0 - * - * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to. - * - * @return {CanvasRenderingContext2D} The Canvas Rendering Context. - */ - setToContext: function (ctx) - { - var matrix = this.matrix; - - ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); - - return ctx; - }, - - /** - * Copy the values in this Matrix to the array given. - * - * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f. - * - * @method Phaser.GameObjects.Components.TransformMatrix#copyToArray - * @since 3.12.0 - * - * @param {array} [out] - The array to copy the matrix values in to. - * - * @return {array} An array where elements 0 to 5 contain the values from this matrix. - */ - copyToArray: function (out) - { - var matrix = this.matrix; - - if (out === undefined) - { - out = [ matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5] ]; - } - else - { - out[0] = matrix[0]; - out[1] = matrix[1]; - out[2] = matrix[2]; - out[3] = matrix[3]; - out[4] = matrix[4]; - out[5] = matrix[5]; - } - - return out; - }, - - /** - * Set the values of this Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#setTransform - * @since 3.0.0 - * - * @param {number} a - The Scale X value. - * @param {number} b - The Shear Y value. - * @param {number} c - The Shear X value. - * @param {number} d - The Scale Y value. - * @param {number} tx - The Translate X value. - * @param {number} ty - The Translate Y value. - * - * @return {this} This TransformMatrix. - */ - setTransform: function (a, b, c, d, tx, ty) - { - var matrix = this.matrix; - - matrix[0] = a; - matrix[1] = b; - matrix[2] = c; - matrix[3] = d; - matrix[4] = tx; - matrix[5] = ty; - - return this; - }, - - /** - * Decompose this Matrix into its translation, scale and rotation values. - * - * @method Phaser.GameObjects.Components.TransformMatrix#decomposeMatrix - * @since 3.0.0 - * - * @return {object} The decomposed Matrix. - */ - decomposeMatrix: function () - { - var decomposedMatrix = this.decomposedMatrix; - - var matrix = this.matrix; - - // a = scale X (1) - // b = shear Y (0) - // c = shear X (0) - // d = scale Y (1) - - var a = matrix[0]; - var b = matrix[1]; - var c = matrix[2]; - var d = matrix[3]; - - var a2 = a * a; - var b2 = b * b; - var c2 = c * c; - var d2 = d * d; - - var sx = Math.sqrt(a2 + c2); - var sy = Math.sqrt(b2 + d2); - - decomposedMatrix.translateX = matrix[4]; - decomposedMatrix.translateY = matrix[5]; - - decomposedMatrix.scaleX = sx; - decomposedMatrix.scaleY = sy; - - decomposedMatrix.rotation = Math.acos(a / sx) * (Math.atan(-c / a) < 0 ? -1 : 1); - - return decomposedMatrix; - }, - - /** - * Apply the identity, translate, rotate and scale operations on the Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#applyITRS - * @since 3.0.0 - * - * @param {number} x - The horizontal translation. - * @param {number} y - The vertical translation. - * @param {number} rotation - The angle of rotation in radians. - * @param {number} scaleX - The horizontal scale. - * @param {number} scaleY - The vertical scale. - * - * @return {this} This TransformMatrix. - */ - applyITRS: function (x, y, rotation, scaleX, scaleY) - { - var matrix = this.matrix; - - var radianSin = Math.sin(rotation); - var radianCos = Math.cos(rotation); - - // Translate - matrix[4] = x; - matrix[5] = y; - - // Rotate and Scale - matrix[0] = radianCos * scaleX; - matrix[1] = radianSin * scaleX; - matrix[2] = -radianSin * scaleY; - matrix[3] = radianCos * scaleY; - - return this; - }, - - /** - * Returns the X component of this matrix multiplied by the given values. - * This is the same as `x * a + y * c + e`. - * - * @method Phaser.GameObjects.Components.TransformMatrix#getX - * @since 3.12.0 - * - * @param {number} x - The x value. - * @param {number} y - The y value. - * - * @return {number} The calculated x value. - */ - getX: function (x, y) - { - return x * this.a + y * this.c + this.e; - }, - - /** - * Returns the Y component of this matrix multiplied by the given values. - * This is the same as `x * b + y * d + f`. - * - * @method Phaser.GameObjects.Components.TransformMatrix#getY - * @since 3.12.0 - * - * @param {number} x - The x value. - * @param {number} y - The y value. - * - * @return {number} The calculated y value. - */ - getY: function (x, y) - { - return x * this.b + y * this.d + this.f; - }, - - /** - * Returns a string that can be used in a CSS Transform call as a `matrix` property. - * - * @method Phaser.GameObjects.Components.TransformMatrix#getCSSMatrix - * @since 3.12.0 - * - * @return {string} A string containing the CSS Transform matrix values. - */ - getCSSMatrix: function () - { - var m = this.matrix; - - return 'matrix(' + m[0] + ',' + m[1] + ',' + m[2] + ',' + m[3] + ',' + m[4] + ',' + m[5] + ')'; - }, - - /** - * Destroys this Transform Matrix. - * - * @method Phaser.GameObjects.Components.TransformMatrix#destroy - * @since 3.4.0 - */ - destroy: function () - { - this.matrix = null; - this.decomposedMatrix = null; - } - -}); - -module.exports = TransformMatrix; - - -/***/ }), -/* 9 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * [description] - * - * @function Phaser.Geom.Rectangle.Perimeter - * @since 3.0.0 - * - * @param {Phaser.Geom.Rectangle} rect - [description] - * - * @return {number} [description] - */ -var Perimeter = function (rect) -{ - return 2 * (rect.width + rect.height); -}; - -module.exports = Perimeter; - - /***/ }), /* 10 */ /***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Perimeter = __webpack_require__(9); -var Point = __webpack_require__(1); - -/** - * Position is a value between 0 and 1 where 0 = the top-left of the rectangle and 0.5 = the bottom right. - * - * @function Phaser.Geom.Rectangle.GetPoint - * @since 3.0.0 - * - * @generic {Phaser.Geom.Point} O - [out,$return] - * - * @param {Phaser.Geom.Rectangle} rectangle - [description] - * @param {number} position - [description] - * @param {(Phaser.Geom.Point|object)} [out] - [description] - * - * @return {Phaser.Geom.Point} [description] - */ -var GetPoint = function (rectangle, position, out) -{ - if (out === undefined) { out = new Point(); } - - if (position <= 0 || position >= 1) - { - out.x = rectangle.x; - out.y = rectangle.y; - - return out; - } - - var p = Perimeter(rectangle) * position; - - if (position > 0.5) - { - p -= (rectangle.width + rectangle.height); - - if (p <= rectangle.width) - { - // Face 3 - out.x = rectangle.right - p; - out.y = rectangle.bottom; - } - else - { - // Face 4 - out.x = rectangle.x; - out.y = rectangle.bottom - (p - rectangle.width); - } - } - else if (p <= rectangle.width) - { - // Face 1 - out.x = rectangle.x + p; - out.y = rectangle.y; - } - else - { - // Face 2 - out.x = rectangle.right; - out.y = rectangle.y + (p - rectangle.width); - } - - return out; -}; - -module.exports = GetPoint; - - -/***/ }), -/* 11 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * @namespace Phaser.GameObjects.Components - */ - -module.exports = { - - Alpha: __webpack_require__(62), - Animation: __webpack_require__(60), - BlendMode: __webpack_require__(59), - ComputedSize: __webpack_require__(58), - Crop: __webpack_require__(57), - Depth: __webpack_require__(56), - Flip: __webpack_require__(55), - GetBounds: __webpack_require__(54), - Mask: __webpack_require__(43), - Origin: __webpack_require__(40), - Pipeline: __webpack_require__(39), - ScaleMode: __webpack_require__(38), - ScrollFactor: __webpack_require__(37), - Size: __webpack_require__(36), - Texture: __webpack_require__(35), - TextureCrop: __webpack_require__(34), - Tint: __webpack_require__(33), - ToJSON: __webpack_require__(32), - Transform: __webpack_require__(31), - TransformMatrix: __webpack_require__(8), - Visible: __webpack_require__(28) - -}; - - -/***/ }), -/* 12 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Class = __webpack_require__(0); -var Components = __webpack_require__(11); -var DataManager = __webpack_require__(27); -var EventEmitter = __webpack_require__(26); - -/** - * @classdesc - * The base class that all Game Objects extend. - * You don't create GameObjects directly and they cannot be added to the display list. - * Instead, use them as the base for your own custom classes. - * - * @class GameObject - * @memberOf Phaser.GameObjects - * @extends Phaser.Events.EventEmitter - * @constructor - * @since 3.0.0 - * - * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. - * @param {string} type - A textual representation of the type of Game Object, i.e. `sprite`. - */ -var GameObject = new Class({ - - Extends: EventEmitter, - - initialize: - - function GameObject (scene, type) - { - EventEmitter.call(this); - - /** - * The Scene to which this Game Object belongs. - * Game Objects can only belong to one Scene. - * - * @name Phaser.GameObjects.GameObject#scene - * @type {Phaser.Scene} - * @protected - * @since 3.0.0 - */ - this.scene = scene; - - /** - * A textual representation of this Game Object, i.e. `sprite`. - * Used internally by Phaser but is available for your own custom classes to populate. - * - * @name Phaser.GameObjects.GameObject#type - * @type {string} - * @since 3.0.0 - */ - this.type = type; - - /** - * The parent Container of this Game Object, if it has one. - * - * @name Phaser.GameObjects.GameObject#parentContainer - * @type {Phaser.GameObjects.Container} - * @since 3.4.0 - */ - this.parentContainer = null; - - /** - * The name of this Game Object. - * Empty by default and never populated by Phaser, this is left for developers to use. - * - * @name Phaser.GameObjects.GameObject#name - * @type {string} - * @default '' - * @since 3.0.0 - */ - this.name = ''; - - /** - * The active state of this Game Object. - * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it. - * An active object is one which is having its logic and internal systems updated. - * - * @name Phaser.GameObjects.GameObject#active - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.active = true; - - /** - * The Tab Index of the Game Object. - * Reserved for future use by plugins and the Input Manager. - * - * @name Phaser.GameObjects.GameObject#tabIndex - * @type {integer} - * @default -1 - * @since 3.0.0 - */ - this.tabIndex = -1; - - /** - * A Data Manager. - * It allows you to store, query and get key/value paired information specific to this Game Object. - * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`. - * - * @name Phaser.GameObjects.GameObject#data - * @type {Phaser.Data.DataManager} - * @default null - * @since 3.0.0 - */ - this.data = null; - - /** - * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not. - * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively. - * If those components are not used by your custom class then you can use this bitmask as you wish. - * - * @name Phaser.GameObjects.GameObject#renderFlags - * @type {integer} - * @default 15 - * @since 3.0.0 - */ - this.renderFlags = 15; - - /** - * A bitmask that controls if this Game Object is drawn by a Camera or not. - * Not usually set directly, instead call `Camera.ignore`, however you can - * set this property directly using the Camera.id property: - * - * @example - * this.cameraFilter |= camera.id - * - * @name Phaser.GameObjects.GameObject#cameraFilter - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.cameraFilter = 0; - - /** - * If this Game Object is enabled for input then this property will contain an InteractiveObject instance. - * Not usually set directly. Instead call `GameObject.setInteractive()`. - * - * @name Phaser.GameObjects.GameObject#input - * @type {?Phaser.Input.InteractiveObject} - * @default null - * @since 3.0.0 - */ - this.input = null; - - /** - * If this Game Object is enabled for physics then this property will contain a reference to a Physics Body. - * - * @name Phaser.GameObjects.GameObject#body - * @type {?(object|Phaser.Physics.Arcade.Body|Phaser.Physics.Impact.Body)} - * @default null - * @since 3.0.0 - */ - this.body = null; - - /** - * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`. - * This includes calls that may come from a Group, Container or the Scene itself. - * While it allows you to persist a Game Object across Scenes, please understand you are entirely - * responsible for managing references to and from this Game Object. - * - * @name Phaser.GameObjects.GameObject#ignoreDestroy - * @type {boolean} - * @default false - * @since 3.5.0 - */ - this.ignoreDestroy = false; - - // Tell the Scene to re-sort the children - scene.sys.queueDepthSort(); - - scene.sys.events.once('shutdown', this.destroy, this); - }, - - /** - * Sets the `active` property of this Game Object and returns this Game Object for further chaining. - * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList. - * - * @method Phaser.GameObjects.GameObject#setActive - * @since 3.0.0 - * - * @param {boolean} value - True if this Game Object should be set as active, false if not. - * - * @return {this} This GameObject. - */ - setActive: function (value) - { - this.active = value; - - return this; - }, - - /** - * Sets the `name` property of this Game Object and returns this Game Object for further chaining. - * The `name` property is not populated by Phaser and is presented for your own use. - * - * @method Phaser.GameObjects.GameObject#setName - * @since 3.0.0 - * - * @param {string} value - The name to be given to this Game Object. - * - * @return {this} This GameObject. - */ - setName: function (value) - { - this.name = value; - - return this; - }, - - /** - * Adds a Data Manager component to this Game Object. - * - * @method Phaser.GameObjects.GameObject#setDataEnabled - * @since 3.0.0 - * @see Phaser.Data.DataManager - * - * @return {this} This GameObject. - */ - setDataEnabled: function () - { - if (!this.data) - { - this.data = new DataManager(this); - } - - return this; - }, - - /** - * Allows you to store a key value pair within this Game Objects Data Manager. - * - * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled - * before setting the value. - * - * If the key doesn't already exist in the Data Manager then it is created. - * - * ```javascript - * sprite.setData('name', 'Red Gem Stone'); - * ``` - * - * You can also pass in an object of key value pairs as the first argument: - * - * ```javascript - * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 }); - * ``` - * - * To get a value back again you can call `getData`: - * - * ```javascript - * sprite.getData('gold'); - * ``` - * - * Or you can access the value directly via the `values` property, where it works like any other variable: - * - * ```javascript - * sprite.data.values.gold += 50; - * ``` - * - * When the value is first set, a `setdata` event is emitted from this Game Object. - * - * If the key already exists, a `changedata` event is emitted instead, along an event named after the key. - * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata_PlayerLives`. - * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter. - * - * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings. - * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager. - * - * @method Phaser.GameObjects.GameObject#setData - * @since 3.0.0 - * - * @param {(string|object)} key - The key to set the value for. Or an object or key value pairs. If an object the `data` argument is ignored. - * @param {*} data - The value to set for the given key. If an object is provided as the key this argument is ignored. - * - * @return {this} This GameObject. - */ - setData: function (key, value) - { - if (!this.data) - { - this.data = new DataManager(this); - } - - this.data.set(key, value); - - return this; - }, - - /** - * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist. - * - * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either: - * - * ```javascript - * sprite.getData('gold'); - * ``` - * - * Or access the value directly: - * - * ```javascript - * sprite.data.values.gold; - * ``` - * - * You can also pass in an array of keys, in which case an array of values will be returned: - * - * ```javascript - * sprite.getData([ 'gold', 'armor', 'health' ]); - * ``` - * - * This approach is useful for destructuring arrays in ES6. - * - * @method Phaser.GameObjects.GameObject#getData - * @since 3.0.0 - * - * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys. - * - * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array. - */ - getData: function (key) - { - if (!this.data) - { - this.data = new DataManager(this); - } - - return this.data.get(key); - }, - - /** - * Pass this Game Object to the Input Manager to enable it for Input. - * - * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area - * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced - * input detection. - * - * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If - * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific - * shape for it to use. - * - * You can also provide an Input Configuration Object as the only argument to this method. - * - * @method Phaser.GameObjects.GameObject#setInteractive - * @since 3.0.0 - * - * @param {(Phaser.Input.InputConfiguration|any)} [shape] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used. - * @param {HitAreaCallback} [callback] - A callback to be invoked when the Game Object is interacted with. If you provide a shape you must also provide a callback. - * @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target? - * - * @return {this} This GameObject. - */ - setInteractive: function (shape, callback, dropZone) - { - this.scene.sys.input.enable(this, shape, callback, dropZone); - - return this; - }, - - /** - * If this Game Object has previously been enabled for input, this will disable it. - * - * An object that is disabled for input stops processing or being considered for - * input events, but can be turned back on again at any time by simply calling - * `setInteractive()` with no arguments provided. - * - * If want to completely remove interaction from this Game Object then use `removeInteractive` instead. - * - * @method Phaser.GameObjects.GameObject#disableInteractive - * @since 3.7.0 - * - * @return {this} This GameObject. - */ - disableInteractive: function () - { - if (this.input) - { - this.input.enabled = false; - } - - return this; - }, - - /** - * If this Game Object has previously been enabled for input, this will queue it - * for removal, causing it to no longer be interactive. The removal happens on - * the next game step, it is not immediate. - * - * The Interactive Object that was assigned to this Game Object will be destroyed, - * removed from the Input Manager and cleared from this Game Object. - * - * If you wish to re-enable this Game Object at a later date you will need to - * re-create its InteractiveObject by calling `setInteractive` again. - * - * If you wish to only temporarily stop an object from receiving input then use - * `disableInteractive` instead, as that toggles the interactive state, where-as - * this erases it completely. - * - * If you wish to resize a hit area, don't remove and then set it as being - * interactive. Instead, access the hitarea object directly and resize the shape - * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the - * shape is a Rectangle, which it is by default.) - * - * @method Phaser.GameObjects.GameObject#removeInteractive - * @since 3.7.0 - * - * @return {this} This GameObject. - */ - removeInteractive: function () - { - this.scene.sys.input.clear(this); - - this.input = undefined; - - return this; - }, - - /** - * To be overridden by custom GameObjects. Allows base objects to be used in a Pool. - * - * @method Phaser.GameObjects.GameObject#update - * @since 3.0.0 - * - * @param {...*} [args] - args - */ - update: function () - { - }, - - /** - * Returns a JSON representation of the Game Object. - * - * @method Phaser.GameObjects.GameObject#toJSON - * @since 3.0.0 - * - * @return {JSONGameObject} A JSON representation of the Game Object. - */ - toJSON: function () - { - return Components.ToJSON(this); - }, - - /** - * Compares the renderMask with the renderFlags to see if this Game Object will render or not. - * Also checks the Game Object against the given Cameras exclusion list. - * - * @method Phaser.GameObjects.GameObject#willRender - * @since 3.0.0 - * - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to check against this Game Object. - * - * @return {boolean} True if the Game Object should be rendered, otherwise false. - */ - willRender: function (camera) - { - return !(GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter > 0 && (this.cameraFilter & camera.id))); - }, - - /** - * Returns an array containing the display list index of either this Game Object, or if it has one, - * its parent Container. It then iterates up through all of the parent containers until it hits the - * root of the display list (which is index 0 in the returned array). - * - * Used internally by the InputPlugin but also useful if you wish to find out the display depth of - * this Game Object and all of its ancestors. - * - * @method Phaser.GameObjects.GameObject#getIndexList - * @since 3.4.0 - * - * @return {integer[]} An array of display list position indexes. - */ - getIndexList: function () - { - // eslint-disable-next-line consistent-this - var child = this; - var parent = this.parentContainer; - - var indexes = []; - - while (parent) - { - // indexes.unshift([parent.getIndex(child), parent.name]); - indexes.unshift(parent.getIndex(child)); - - child = parent; - - if (!parent.parentContainer) - { - break; - } - else - { - parent = parent.parentContainer; - } - } - - // indexes.unshift([this.scene.sys.displayList.getIndex(child), 'root']); - indexes.unshift(this.scene.sys.displayList.getIndex(child)); - - return indexes; - }, - - /** - * Destroys this Game Object removing it from the Display List and Update List and - * severing all ties to parent resources. - * - * Also removes itself from the Input Manager and Physics Manager if previously enabled. - * - * Use this to remove a Game Object from your game if you don't ever plan to use it again. - * As long as no reference to it exists within your own code it should become free for - * garbage collection by the browser. - * - * If you just want to temporarily disable an object then look at using the - * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected. - * - * @method Phaser.GameObjects.GameObject#destroy - * @since 3.0.0 - */ - destroy: function () - { - // This Game Object had already been destroyed - if (!this.scene || this.ignoreDestroy) - { - return; - } - - if (this.preDestroy) - { - this.preDestroy.call(this); - } - - this.emit('destroy', this); - - var sys = this.scene.sys; - - sys.displayList.remove(this); - sys.updateList.remove(this); - - if (this.input) - { - sys.input.clear(this); - this.input = undefined; - } - - if (this.data) - { - this.data.destroy(); - - this.data = undefined; - } - - if (this.body) - { - this.body.destroy(); - this.body = undefined; - } - - // Tell the Scene to re-sort the children - sys.queueDepthSort(); - - this.active = false; - this.visible = false; - - this.scene = undefined; - - this.parentContainer = undefined; - - this.removeAllListeners(); - } - -}); - -/** - * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not. - * - * @constant {integer} RENDER_MASK - * @memberOf Phaser.GameObjects.GameObject - * @default - */ -GameObject.RENDER_MASK = 15; - -module.exports = GameObject; - - -/***/ }), -/* 13 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Class = __webpack_require__(0); -var GameObject = __webpack_require__(12); -var Sprite = __webpack_require__(25); -var Vector2 = __webpack_require__(3); -var Vector4 = __webpack_require__(5); - -/** - * @classdesc - * A Sprite 3D Game Object. - * - * The Sprite 3D object is an encapsulation of a standard Sprite object, with additional methods to allow - * it to be rendered by a 3D Camera. The Sprite can be positioned anywhere within 3D space. - * - * @class Sprite3D - * @extends Phaser.GameObjects.GameObject - * @memberOf Phaser.GameObjects - * @constructor - * @since 3.0.0 - * - * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time. - * @param {number} x - The x position of this Game Object. - * @param {number} y - The y position of this Game Object. - * @param {number} z - The z position of this Game Object. - * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. - * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with. - */ -var Sprite3D = new Class({ - - Extends: GameObject, - - initialize: - - function Sprite3D (scene, x, y, z, texture, frame) - { - GameObject.call(this, scene, 'Sprite3D'); - - /** - * The encapsulated Sprite. - * - * @name Phaser.GameObjects.Sprite3D#gameObject - * @type {Phaser.GameObjects.GameObject} - * @since 3.0.0 - */ - this.gameObject = new Sprite(scene, 0, 0, texture, frame); - - /** - * The position of the Sprite. - * - * @name Phaser.GameObjects.Sprite3D#position - * @type {Phaser.Math.Vector4} - * @since 3.0.0 - */ - this.position = new Vector4(x, y, z); - - /** - * The 2D size of the Sprite. - * - * @name Phaser.GameObjects.Sprite3D#size - * @type {Phaser.Math.Vector2} - * @since 3.0.0 - */ - this.size = new Vector2(this.gameObject.width, this.gameObject.height); - - /** - * The 2D scale of the Sprite. - * - * @name Phaser.GameObjects.Sprite3D#scale - * @type {Phaser.Math.Vector2} - * @since 3.0.0 - */ - this.scale = new Vector2(1, 1); - - /** - * Whether to automatically set the horizontal scale of the encapsulated Sprite. - * - * @name Phaser.GameObjects.Sprite3D#adjustScaleX - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.adjustScaleX = true; - - /** - * Whether to automatically set the vertical scale of the encapsulated Sprite. - * - * @name Phaser.GameObjects.Sprite3D#adjustScaleY - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.adjustScaleY = true; - - /** - * The visible state of the Game Object. - * - * @name Phaser.GameObjects.Sprite3D#_visible - * @type {boolean} - * @default true - * @private - * @since 3.0.0 - */ - this._visible = true; - }, - - /** - * Project this Sprite onto the given 3D Camera. - * - * @method Phaser.GameObjects.Sprite3D#project - * @since 3.0.0 - * - * @param {Phaser.Cameras.Sprite3D.Camera} camera - The 3D Camera onto which to project this Sprite. - */ - project: function (camera) - { - var pos = this.position; - - var gameObject = this.gameObject; - - camera.project(pos, gameObject); - - camera.getPointSize(pos, this.size, this.scale); - - if (this.scale.x <= 0 || this.scale.y <= 0) - { - gameObject.setVisible(false); - } - else - { - if (!gameObject.visible) - { - gameObject.setVisible(true); - } - - if (this.adjustScaleX) - { - gameObject.scaleX = this.scale.x; - } - - if (this.adjustScaleY) - { - gameObject.scaleY = this.scale.y; - } - - gameObject.setDepth(gameObject.z * -1); - } - }, - - /** - * Set the visible state of the Game Object. - * - * @method Phaser.GameObjects.Sprite3D#setVisible - * @since 3.0.0 - * - * @param {boolean} value - The visible state of the Game Object. - * - * @return {Phaser.GameObjects.Sprite3D} This Sprite3D Object. - */ - setVisible: function (value) - { - this.visible = value; - - return this; - }, - - /** - * The visible state of the Game Object. - * - * An invisible Game Object will skip rendering, but will still process update logic. - * - * @name Phaser.GameObjects.Sprite3D#visible - * @type {boolean} - * @since 3.0.0 - */ - visible: { - - get: function () - { - return this._visible; - }, - - set: function (value) - { - this._visible = value; - this.gameObject.visible = value; - } - - }, - - /** - * The x position of this Game Object. - * - * @name Phaser.GameObjects.Sprite3D#x - * @type {number} - * @since 3.0.0 - */ - x: { - - get: function () - { - return this.position.x; - }, - - set: function (value) - { - this.position.x = value; - } - - }, - - /** - * The y position of this Game Object. - * - * @name Phaser.GameObjects.Sprite3D#y - * @type {number} - * @since 3.0.0 - */ - y: { - - get: function () - { - return this.position.y; - }, - - set: function (value) - { - this.position.y = value; - } - - }, - - /** - * The z position of this Game Object. - * - * @name Phaser.GameObjects.Sprite3D#z - * @type {number} - * @since 3.0.0 - */ - z: { - - get: function () - { - return this.position.z; - }, - - set: function (value) - { - this.position.z = value; - } - - } - -}); - -module.exports = Sprite3D; - - -/***/ }), -/* 14 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} */ // Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji @@ -4348,7 +2855,7 @@ var EPSILON = 0.000001; * A four-dimensional matrix. * * @class Matrix4 - * @memberOf Phaser.Math + * @memberof Phaser.Math * @constructor * @since 3.0.0 * @@ -4891,12 +3398,12 @@ var Matrix4 = new Class({ }, /** - * [description] + * Multiply the values of this Matrix4 by those given in the `src` argument. * * @method Phaser.Math.Matrix4#multiplyLocal * @since 3.0.0 * - * @param {Phaser.Math.Matrix4} src - [description] + * @param {Phaser.Math.Matrix4} src - The source Matrix4 that this Matrix4 is multiplied by. * * @return {Phaser.Math.Matrix4} This Matrix4. */ @@ -4954,6 +3461,30 @@ var Matrix4 = new Class({ return this; }, + /** + * Translate this Matrix using the given values. + * + * @method Phaser.Math.Matrix4#translateXYZ + * @since 3.16.0 + * + * @param {number} x - The x component. + * @param {number} y - The y component. + * @param {number} z - The z component. + * + * @return {Phaser.Math.Matrix4} This Matrix4. + */ + translateXYZ: function (x, y, z) + { + var a = this.val; + + a[12] = a[0] * x + a[4] * y + a[8] * z + a[12]; + a[13] = a[1] * x + a[5] * y + a[9] * z + a[13]; + a[14] = a[2] * x + a[6] * y + a[10] * z + a[14]; + a[15] = a[3] * x + a[7] * y + a[11] * z + a[15]; + + return this; + }, + /** * Apply a scale transformation to this Matrix. * @@ -4991,6 +3522,40 @@ var Matrix4 = new Class({ return this; }, + /** + * Apply a scale transformation to this Matrix. + * + * @method Phaser.Math.Matrix4#scaleXYZ + * @since 3.16.0 + * + * @param {number} x - The x component. + * @param {number} y - The y component. + * @param {number} z - The z component. + * + * @return {Phaser.Math.Matrix4} This Matrix4. + */ + scaleXYZ: function (x, y, z) + { + var a = this.val; + + a[0] = a[0] * x; + a[1] = a[1] * x; + a[2] = a[2] * x; + a[3] = a[3] * x; + + a[4] = a[4] * y; + a[5] = a[5] * y; + a[6] = a[6] * y; + a[7] = a[7] * y; + + a[8] = a[8] * z; + a[9] = a[9] * z; + a[10] = a[10] * z; + a[11] = a[11] * z; + + return this; + }, + /** * Derive a rotation matrix around the given axis. * @@ -5630,9 +4195,9 @@ var Matrix4 = new Class({ * @method Phaser.Math.Matrix4#yawPitchRoll * @since 3.0.0 * - * @param {number} yaw - [description] - * @param {number} pitch - [description] - * @param {number} roll - [description] + * @param {number} yaw - The yaw value. + * @param {number} pitch - The pitch value. + * @param {number} roll - The roll value. * * @return {Phaser.Math.Matrix4} This Matrix4. */ @@ -5730,10 +4295,2477 @@ var _tempMat2 = new Matrix4(); module.exports = Matrix4; +/***/ }), +/* 11 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// Source object +// The key as a string, or an array of keys, i.e. 'banner', or 'banner.hideBanner' +// The default value to use if the key doesn't exist + +/** + * Retrieves a value from an object. + * + * @function Phaser.Utils.Objects.GetValue + * @since 3.0.0 + * + * @param {object} source - The object to retrieve the value from. + * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object. + * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object. + * + * @return {*} The value of the requested key. + */ +var GetValue = function (source, key, defaultValue) +{ + if (!source || typeof source === 'number') + { + return defaultValue; + } + else if (source.hasOwnProperty(key)) + { + return source[key]; + } + else if (key.indexOf('.') !== -1) + { + var keys = key.split('.'); + var parent = source; + var value = defaultValue; + + // Use for loop here so we can break early + for (var i = 0; i < keys.length; i++) + { + if (parent.hasOwnProperty(keys[i])) + { + // Yes it has a key property, let's carry on down + value = parent[keys[i]]; + + parent = parent[keys[i]]; + } + else + { + // Can't go any further, so reset to default + value = defaultValue; + break; + } + } + + return value; + } + else + { + return defaultValue; + } +}; + +module.exports = GetValue; + + +/***/ }), +/* 12 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GEOM_CONST = { + + /** + * A Circle Geometry object type. + * + * @name Phaser.Geom.CIRCLE + * @type {integer} + * @since 3.19.0 + */ + CIRCLE: 0, + + /** + * An Ellipse Geometry object type. + * + * @name Phaser.Geom.ELLIPSE + * @type {integer} + * @since 3.19.0 + */ + ELLIPSE: 1, + + /** + * A Line Geometry object type. + * + * @name Phaser.Geom.LINE + * @type {integer} + * @since 3.19.0 + */ + LINE: 2, + + /** + * A Point Geometry object type. + * + * @name Phaser.Geom.POINT + * @type {integer} + * @since 3.19.0 + */ + POINT: 3, + + /** + * A Polygon Geometry object type. + * + * @name Phaser.Geom.POLYGON + * @type {integer} + * @since 3.19.0 + */ + POLYGON: 4, + + /** + * A Rectangle Geometry object type. + * + * @name Phaser.Geom.RECTANGLE + * @type {integer} + * @since 3.19.0 + */ + RECTANGLE: 5, + + /** + * A Triangle Geometry object type. + * + * @name Phaser.Geom.TRIANGLE + * @type {integer} + * @since 3.19.0 + */ + TRIANGLE: 6 + +}; + +module.exports = GEOM_CONST; + + +/***/ }), +/* 13 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Phaser Blend Modes. + * + * @namespace Phaser.BlendModes + * @since 3.0.0 + */ + +module.exports = { + + /** + * Skips the Blend Mode check in the renderer. + * + * @name Phaser.BlendModes.SKIP_CHECK + * @type {integer} + * @const + * @since 3.0.0 + */ + SKIP_CHECK: -1, + + /** + * Normal blend mode. For Canvas and WebGL. + * This is the default setting and draws new shapes on top of the existing canvas content. + * + * @name Phaser.BlendModes.NORMAL + * @type {integer} + * @const + * @since 3.0.0 + */ + NORMAL: 0, + + /** + * Add blend mode. For Canvas and WebGL. + * Where both shapes overlap the color is determined by adding color values. + * + * @name Phaser.BlendModes.ADD + * @type {integer} + * @const + * @since 3.0.0 + */ + ADD: 1, + + /** + * Multiply blend mode. For Canvas and WebGL. + * The pixels are of the top layer are multiplied with the corresponding pixel of the bottom layer. A darker picture is the result. + * + * @name Phaser.BlendModes.MULTIPLY + * @type {integer} + * @const + * @since 3.0.0 + */ + MULTIPLY: 2, + + /** + * Screen blend mode. For Canvas and WebGL. + * The pixels are inverted, multiplied, and inverted again. A lighter picture is the result (opposite of multiply) + * + * @name Phaser.BlendModes.SCREEN + * @type {integer} + * @const + * @since 3.0.0 + */ + SCREEN: 3, + + /** + * Overlay blend mode. For Canvas only. + * A combination of multiply and screen. Dark parts on the base layer become darker, and light parts become lighter. + * + * @name Phaser.BlendModes.OVERLAY + * @type {integer} + * @const + * @since 3.0.0 + */ + OVERLAY: 4, + + /** + * Darken blend mode. For Canvas only. + * Retains the darkest pixels of both layers. + * + * @name Phaser.BlendModes.DARKEN + * @type {integer} + * @const + * @since 3.0.0 + */ + DARKEN: 5, + + /** + * Lighten blend mode. For Canvas only. + * Retains the lightest pixels of both layers. + * + * @name Phaser.BlendModes.LIGHTEN + * @type {integer} + * @const + * @since 3.0.0 + */ + LIGHTEN: 6, + + /** + * Color Dodge blend mode. For Canvas only. + * Divides the bottom layer by the inverted top layer. + * + * @name Phaser.BlendModes.COLOR_DODGE + * @type {integer} + * @const + * @since 3.0.0 + */ + COLOR_DODGE: 7, + + /** + * Color Burn blend mode. For Canvas only. + * Divides the inverted bottom layer by the top layer, and then inverts the result. + * + * @name Phaser.BlendModes.COLOR_BURN + * @type {integer} + * @const + * @since 3.0.0 + */ + COLOR_BURN: 8, + + /** + * Hard Light blend mode. For Canvas only. + * A combination of multiply and screen like overlay, but with top and bottom layer swapped. + * + * @name Phaser.BlendModes.HARD_LIGHT + * @type {integer} + * @const + * @since 3.0.0 + */ + HARD_LIGHT: 9, + + /** + * Soft Light blend mode. For Canvas only. + * A softer version of hard-light. Pure black or white does not result in pure black or white. + * + * @name Phaser.BlendModes.SOFT_LIGHT + * @type {integer} + * @const + * @since 3.0.0 + */ + SOFT_LIGHT: 10, + + /** + * Difference blend mode. For Canvas only. + * Subtracts the bottom layer from the top layer or the other way round to always get a positive value. + * + * @name Phaser.BlendModes.DIFFERENCE + * @type {integer} + * @const + * @since 3.0.0 + */ + DIFFERENCE: 11, + + /** + * Exclusion blend mode. For Canvas only. + * Like difference, but with lower contrast. + * + * @name Phaser.BlendModes.EXCLUSION + * @type {integer} + * @const + * @since 3.0.0 + */ + EXCLUSION: 12, + + /** + * Hue blend mode. For Canvas only. + * Preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer. + * + * @name Phaser.BlendModes.HUE + * @type {integer} + * @const + * @since 3.0.0 + */ + HUE: 13, + + /** + * Saturation blend mode. For Canvas only. + * Preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer. + * + * @name Phaser.BlendModes.SATURATION + * @type {integer} + * @const + * @since 3.0.0 + */ + SATURATION: 14, + + /** + * Color blend mode. For Canvas only. + * Preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer. + * + * @name Phaser.BlendModes.COLOR + * @type {integer} + * @const + * @since 3.0.0 + */ + COLOR: 15, + + /** + * Luminosity blend mode. For Canvas only. + * Preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer. + * + * @name Phaser.BlendModes.LUMINOSITY + * @type {integer} + * @const + * @since 3.0.0 + */ + LUMINOSITY: 16, + + /** + * Alpha erase blend mode. For Canvas and WebGL. + * + * @name Phaser.BlendModes.ERASE + * @type {integer} + * @const + * @since 3.0.0 + */ + ERASE: 17, + + /** + * Source-in blend mode. For Canvas only. + * The new shape is drawn only where both the new shape and the destination canvas overlap. Everything else is made transparent. + * + * @name Phaser.BlendModes.SOURCE_IN + * @type {integer} + * @const + * @since 3.0.0 + */ + SOURCE_IN: 18, + + /** + * Source-out blend mode. For Canvas only. + * The new shape is drawn where it doesn't overlap the existing canvas content. + * + * @name Phaser.BlendModes.SOURCE_OUT + * @type {integer} + * @const + * @since 3.0.0 + */ + SOURCE_OUT: 19, + + /** + * Source-out blend mode. For Canvas only. + * The new shape is only drawn where it overlaps the existing canvas content. + * + * @name Phaser.BlendModes.SOURCE_ATOP + * @type {integer} + * @const + * @since 3.0.0 + */ + SOURCE_ATOP: 20, + + /** + * Destination-over blend mode. For Canvas only. + * New shapes are drawn behind the existing canvas content. + * + * @name Phaser.BlendModes.DESTINATION_OVER + * @type {integer} + * @const + * @since 3.0.0 + */ + DESTINATION_OVER: 21, + + /** + * Destination-in blend mode. For Canvas only. + * The existing canvas content is kept where both the new shape and existing canvas content overlap. Everything else is made transparent. + * + * @name Phaser.BlendModes.DESTINATION_IN + * @type {integer} + * @const + * @since 3.0.0 + */ + DESTINATION_IN: 22, + + /** + * Destination-out blend mode. For Canvas only. + * The existing content is kept where it doesn't overlap the new shape. + * + * @name Phaser.BlendModes.DESTINATION_OUT + * @type {integer} + * @const + * @since 3.0.0 + */ + DESTINATION_OUT: 23, + + /** + * Destination-out blend mode. For Canvas only. + * The existing canvas is only kept where it overlaps the new shape. The new shape is drawn behind the canvas content. + * + * @name Phaser.BlendModes.DESTINATION_ATOP + * @type {integer} + * @const + * @since 3.0.0 + */ + DESTINATION_ATOP: 24, + + /** + * Lighten blend mode. For Canvas only. + * Where both shapes overlap the color is determined by adding color values. + * + * @name Phaser.BlendModes.LIGHTER + * @type {integer} + * @const + * @since 3.0.0 + */ + LIGHTER: 25, + + /** + * Copy blend mode. For Canvas only. + * Only the new shape is shown. + * + * @name Phaser.BlendModes.COPY + * @type {integer} + * @const + * @since 3.0.0 + */ + COPY: 26, + + /** + * Xor blend mode. For Canvas only. + * Shapes are made transparent where both overlap and drawn normal everywhere else. + * + * @name Phaser.BlendModes.XOR + * @type {integer} + * @const + * @since 3.0.0 + */ + XOR: 27 + +}; + + +/***/ }), +/* 14 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Normalize an angle to the [0, 2pi] range. + * + * @function Phaser.Math.Angle.Normalize + * @since 3.0.0 + * + * @param {number} angle - The angle to normalize, in radians. + * + * @return {number} The normalized angle, in radians. + */ +var Normalize = function (angle) +{ + angle = angle % (2 * Math.PI); + + if (angle >= 0) + { + return angle; + } + else + { + return angle + 2 * Math.PI; + } +}; + +module.exports = Normalize; + + /***/ }), /* 15 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var MathWrap = __webpack_require__(8); + +/** + * Wrap an angle. + * + * Wraps the angle to a value in the range of -PI to PI. + * + * @function Phaser.Math.Angle.Wrap + * @since 3.0.0 + * + * @param {number} angle - The angle to wrap, in radians. + * + * @return {number} The wrapped angle, in radians. + */ +var Wrap = function (angle) +{ + return MathWrap(angle, -Math.PI, Math.PI); +}; + +module.exports = Wrap; + + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Wrap = __webpack_require__(8); + +/** + * Wrap an angle in degrees. + * + * Wraps the angle to a value in the range of -180 to 180. + * + * @function Phaser.Math.Angle.WrapDegrees + * @since 3.0.0 + * + * @param {number} angle - The angle to wrap, in degrees. + * + * @return {number} The wrapped angle, in degrees. + */ +var WrapDegrees = function (angle) +{ + return Wrap(angle, -180, 180); +}; + +module.exports = WrapDegrees; + + +/***/ }), +/* 17 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Check whether the given values are fuzzily equal. + * + * Two numbers are fuzzily equal if their difference is less than `epsilon`. + * + * @function Phaser.Math.Fuzzy.Equal + * @since 3.0.0 + * + * @param {number} a - The first value. + * @param {number} b - The second value. + * @param {number} [epsilon=0.0001] - The epsilon. + * + * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`. + */ +var Equal = function (a, b, epsilon) +{ + if (epsilon === undefined) { epsilon = 0.0001; } + + return Math.abs(a - b) < epsilon; +}; + +module.exports = Equal; + + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Factorial = __webpack_require__(19); + +/** + * Calculates the Bernstein basis from the three factorial coefficients. + * + * @function Phaser.Math.Bernstein + * @since 3.0.0 + * + * @param {number} n - The first value. + * @param {number} i - The second value. + * + * @return {number} The Bernstein basis of Factorial(n) / Factorial(i) / Factorial(n - i) + */ +var Bernstein = function (n, i) +{ + return Factorial(n) / Factorial(i) / Factorial(n - i); +}; + +module.exports = Bernstein; + + +/***/ }), +/* 19 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculates the factorial of a given number for integer values greater than 0. + * + * @function Phaser.Math.Factorial + * @since 3.0.0 + * + * @param {number} value - A positive integer to calculate the factorial of. + * + * @return {number} The factorial of the given number. + */ +var Factorial = function (value) +{ + if (value === 0) + { + return 1; + } + + var res = value; + + while (--value) + { + res *= value; + } + + return res; +}; + +module.exports = Factorial; + + +/***/ }), +/* 20 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculates a Catmull-Rom value from the given points, based on an alpha of 0.5. + * + * @function Phaser.Math.CatmullRom + * @since 3.0.0 + * + * @param {number} t - The amount to interpolate by. + * @param {number} p0 - The first control point. + * @param {number} p1 - The second control point. + * @param {number} p2 - The third control point. + * @param {number} p3 - The fourth control point. + * + * @return {number} The Catmull-Rom value. + */ +var CatmullRom = function (t, p0, p1, p2, p3) +{ + var v0 = (p2 - p0) * 0.5; + var v1 = (p3 - p1) * 0.5; + var t2 = t * t; + var t3 = t * t2; + + return (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1; +}; + +module.exports = CatmullRom; + + +/***/ }), +/* 21 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculates a linear (interpolation) value over t. + * + * @function Phaser.Math.Linear + * @since 3.0.0 + * + * @param {number} p0 - The first point. + * @param {number} p1 - The second point. + * @param {number} t - The percentage between p0 and p1 to return, represented as a number between 0 and 1. + * + * @return {number} The step t% of the way between p0 and p1. + */ +var Linear = function (p0, p1, t) +{ + return (p1 - p0) * t + p0; +}; + +module.exports = Linear; + + +/***/ }), +/* 22 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate a smooth interpolation percentage of `x` between `min` and `max`. + * + * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge, + * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial, + * between 0 and 1 otherwise. + * + * @function Phaser.Math.SmoothStep + * @since 3.0.0 + * @see {@link https://en.wikipedia.org/wiki/Smoothstep} + * + * @param {number} x - The input value. + * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'. + * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'. + * + * @return {number} The percentage of interpolation, between 0 and 1. + */ +var SmoothStep = function (x, min, max) +{ + if (x <= min) + { + return 0; + } + + if (x >= max) + { + return 1; + } + + x = (x - min) / (max - min); + + return x * x * (3 - 2 * x); +}; + +module.exports = SmoothStep; + + +/***/ }), +/* 23 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate a smoother interpolation percentage of `x` between `min` and `max`. + * + * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge, + * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial, + * between 0 and 1 otherwise. + * + * Produces an even smoother interpolation than {@link Phaser.Math.SmoothStep}. + * + * @function Phaser.Math.SmootherStep + * @since 3.0.0 + * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations} + * + * @param {number} x - The input value. + * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'. + * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'. + * + * @return {number} The percentage of interpolation, between 0 and 1. + */ +var SmootherStep = function (x, min, max) +{ + x = Math.max(0, Math.min(1, (x - min) / (max - min))); + + return x * x * x * (x * (x * 6 - 15) + 10); +}; + +module.exports = SmootherStep; + + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(2); + +/** + * Convert the given angle from degrees, to the equivalent angle in radians. + * + * @function Phaser.Math.DegToRad + * @since 3.0.0 + * + * @param {integer} degrees - The angle (in degrees) to convert to radians. + * + * @return {number} The given angle converted to radians. + */ +var DegToRad = function (degrees) +{ + return degrees * CONST.DEG_TO_RAD; +}; + +module.exports = DegToRad; + + +/***/ }), +/* 25 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Compute a random position vector in a spherical area, optionally defined by the given radius. + * + * @function Phaser.Math.RandomXYZ + * @since 3.0.0 + * + * @param {Phaser.Math.Vector3} vec3 - The Vector to compute random values for. + * @param {number} [radius=1] - The radius. + * + * @return {Phaser.Math.Vector3} The given Vector. + */ +var RandomXYZ = function (vec3, radius) +{ + if (radius === undefined) { radius = 1; } + + var r = Math.random() * 2 * Math.PI; + var z = (Math.random() * 2) - 1; + var zScale = Math.sqrt(1 - z * z) * radius; + + vec3.x = Math.cos(r) * zScale; + vec3.y = Math.sin(r) * zScale; + vec3.z = z * radius; + + return vec3; +}; + +module.exports = RandomXYZ; + + +/***/ }), +/* 26 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Compute a random four-dimensional vector. + * + * @function Phaser.Math.RandomXYZW + * @since 3.0.0 + * + * @param {Phaser.Math.Vector4} vec4 - The Vector to compute random values for. + * @param {number} [scale=1] - The scale of the random values. + * + * @return {Phaser.Math.Vector4} The given Vector. + */ +var RandomXYZW = function (vec4, scale) +{ + if (scale === undefined) { scale = 1; } + + // TODO: Not spherical; should fix this for more uniform distribution + vec4.x = (Math.random() * 2 - 1) * scale; + vec4.y = (Math.random() * 2 - 1) * scale; + vec4.z = (Math.random() * 2 - 1) * scale; + vec4.w = (Math.random() * 2 - 1) * scale; + + return vec4; +}; + +module.exports = RandomXYZW; + + +/***/ }), +/* 27 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Rotate a `point` around `x` and `y` to the given `angle`, at the same distance. + * + * In polar notation, this maps a point from (r, t) to (r, angle), vs. the origin (x, y). + * + * @function Phaser.Math.RotateAround + * @since 3.0.0 + * + * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return] + * + * @param {(Phaser.Geom.Point|object)} point - The point to be rotated. + * @param {number} x - The horizontal coordinate to rotate around. + * @param {number} y - The vertical coordinate to rotate around. + * @param {number} angle - The angle of rotation in radians. + * + * @return {Phaser.Types.Math.Vector2Like} The given point. + */ +var RotateAround = function (point, x, y, angle) +{ + var c = Math.cos(angle); + var s = Math.sin(angle); + + var tx = point.x - x; + var ty = point.y - y; + + point.x = tx * c - ty * s + x; + point.y = tx * s + ty * c + y; + + return point; +}; + +module.exports = RotateAround; + + +/***/ }), +/* 28 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Vector2 = __webpack_require__(1); + +/** + * Takes the `x` and `y` coordinates and transforms them into the same space as + * defined by the position, rotation and scale values. + * + * @function Phaser.Math.TransformXY + * @since 3.0.0 + * + * @param {number} x - The x coordinate to be transformed. + * @param {number} y - The y coordinate to be transformed. + * @param {number} positionX - Horizontal position of the transform point. + * @param {number} positionY - Vertical position of the transform point. + * @param {number} rotation - Rotation of the transform point, in radians. + * @param {number} scaleX - Horizontal scale of the transform point. + * @param {number} scaleY - Vertical scale of the transform point. + * @param {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} [output] - The output vector, point or object for the translated coordinates. + * + * @return {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} The translated point. + */ +var TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output) +{ + if (output === undefined) { output = new Vector2(); } + + var radianSin = Math.sin(rotation); + var radianCos = Math.cos(rotation); + + // Rotate and Scale + var a = radianCos * scaleX; + var b = radianSin * scaleX; + var c = -radianSin * scaleY; + var d = radianCos * scaleY; + + // Invert + var id = 1 / ((a * d) + (c * -b)); + + output.x = (d * id * x) + (-c * id * y) + (((positionY * c) - (positionX * d)) * id); + output.y = (a * id * y) + (-b * id * x) + (((-positionY * a) + (positionX * b)) * id); + + return output; +}; + +module.exports = TransformXY; + + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji +// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl + +var Class = __webpack_require__(0); + +/** + * @classdesc + * A three-dimensional matrix. + * + * Defaults to the identity matrix when instantiated. + * + * @class Matrix3 + * @memberof Phaser.Math + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix3} [m] - Optional Matrix3 to copy values from. + */ +var Matrix3 = new Class({ + + initialize: + + function Matrix3 (m) + { + /** + * The matrix values. + * + * @name Phaser.Math.Matrix3#val + * @type {Float32Array} + * @since 3.0.0 + */ + this.val = new Float32Array(9); + + if (m) + { + // Assume Matrix3 with val: + this.copy(m); + } + else + { + // Default to identity + this.identity(); + } + }, + + /** + * Make a clone of this Matrix3. + * + * @method Phaser.Math.Matrix3#clone + * @since 3.0.0 + * + * @return {Phaser.Math.Matrix3} A clone of this Matrix3. + */ + clone: function () + { + return new Matrix3(this); + }, + + /** + * This method is an alias for `Matrix3.copy`. + * + * @method Phaser.Math.Matrix3#set + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix3} src - The Matrix to set the values of this Matrix's from. + * + * @return {Phaser.Math.Matrix3} This Matrix3. + */ + set: function (src) + { + return this.copy(src); + }, + + /** + * Copy the values of a given Matrix into this Matrix. + * + * @method Phaser.Math.Matrix3#copy + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix3} src - The Matrix to copy the values from. + * + * @return {Phaser.Math.Matrix3} This Matrix3. + */ + copy: function (src) + { + var out = this.val; + var a = src.val; + + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4]; + out[5] = a[5]; + out[6] = a[6]; + out[7] = a[7]; + out[8] = a[8]; + + return this; + }, + + /** + * Copy the values of a given Matrix4 into this Matrix3. + * + * @method Phaser.Math.Matrix3#fromMat4 + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix4} m - The Matrix4 to copy the values from. + * + * @return {Phaser.Math.Matrix3} This Matrix3. + */ + fromMat4: function (m) + { + var a = m.val; + var out = this.val; + + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[4]; + out[4] = a[5]; + out[5] = a[6]; + out[6] = a[8]; + out[7] = a[9]; + out[8] = a[10]; + + return this; + }, + + /** + * Set the values of this Matrix from the given array. + * + * @method Phaser.Math.Matrix3#fromArray + * @since 3.0.0 + * + * @param {array} a - The array to copy the values from. + * + * @return {Phaser.Math.Matrix3} This Matrix3. + */ + fromArray: function (a) + { + var out = this.val; + + out[0] = a[0]; + out[1] = a[1]; + out[2] = a[2]; + out[3] = a[3]; + out[4] = a[4]; + out[5] = a[5]; + out[6] = a[6]; + out[7] = a[7]; + out[8] = a[8]; + + return this; + }, + + /** + * Reset this Matrix to an identity (default) matrix. + * + * @method Phaser.Math.Matrix3#identity + * @since 3.0.0 + * + * @return {Phaser.Math.Matrix3} This Matrix3. + */ + identity: function () + { + var out = this.val; + + out[0] = 1; + out[1] = 0; + out[2] = 0; + out[3] = 0; + out[4] = 1; + out[5] = 0; + out[6] = 0; + out[7] = 0; + out[8] = 1; + + return this; + }, + + /** + * Transpose this Matrix. + * + * @method Phaser.Math.Matrix3#transpose + * @since 3.0.0 + * + * @return {Phaser.Math.Matrix3} This Matrix3. + */ + transpose: function () + { + var a = this.val; + var a01 = a[1]; + var a02 = a[2]; + var a12 = a[5]; + + a[1] = a[3]; + a[2] = a[6]; + a[3] = a01; + a[5] = a[7]; + a[6] = a02; + a[7] = a12; + + return this; + }, + + /** + * Invert this Matrix. + * + * @method Phaser.Math.Matrix3#invert + * @since 3.0.0 + * + * @return {Phaser.Math.Matrix3} This Matrix3. + */ + invert: function () + { + var a = this.val; + + var a00 = a[0]; + var a01 = a[1]; + var a02 = a[2]; + var a10 = a[3]; + var a11 = a[4]; + var a12 = a[5]; + var a20 = a[6]; + var a21 = a[7]; + var a22 = a[8]; + + var b01 = a22 * a11 - a12 * a21; + var b11 = -a22 * a10 + a12 * a20; + var b21 = a21 * a10 - a11 * a20; + + // Calculate the determinant + var det = a00 * b01 + a01 * b11 + a02 * b21; + + if (!det) + { + return null; + } + + det = 1 / det; + + a[0] = b01 * det; + a[1] = (-a22 * a01 + a02 * a21) * det; + a[2] = (a12 * a01 - a02 * a11) * det; + a[3] = b11 * det; + a[4] = (a22 * a00 - a02 * a20) * det; + a[5] = (-a12 * a00 + a02 * a10) * det; + a[6] = b21 * det; + a[7] = (-a21 * a00 + a01 * a20) * det; + a[8] = (a11 * a00 - a01 * a10) * det; + + return this; + }, + + /** + * Calculate the adjoint, or adjugate, of this Matrix. + * + * @method Phaser.Math.Matrix3#adjoint + * @since 3.0.0 + * + * @return {Phaser.Math.Matrix3} This Matrix3. + */ + adjoint: function () + { + var a = this.val; + + var a00 = a[0]; + var a01 = a[1]; + var a02 = a[2]; + var a10 = a[3]; + var a11 = a[4]; + var a12 = a[5]; + var a20 = a[6]; + var a21 = a[7]; + var a22 = a[8]; + + a[0] = (a11 * a22 - a12 * a21); + a[1] = (a02 * a21 - a01 * a22); + a[2] = (a01 * a12 - a02 * a11); + a[3] = (a12 * a20 - a10 * a22); + a[4] = (a00 * a22 - a02 * a20); + a[5] = (a02 * a10 - a00 * a12); + a[6] = (a10 * a21 - a11 * a20); + a[7] = (a01 * a20 - a00 * a21); + a[8] = (a00 * a11 - a01 * a10); + + return this; + }, + + /** + * Calculate the determinant of this Matrix. + * + * @method Phaser.Math.Matrix3#determinant + * @since 3.0.0 + * + * @return {number} The determinant of this Matrix. + */ + determinant: function () + { + var a = this.val; + + var a00 = a[0]; + var a01 = a[1]; + var a02 = a[2]; + var a10 = a[3]; + var a11 = a[4]; + var a12 = a[5]; + var a20 = a[6]; + var a21 = a[7]; + var a22 = a[8]; + + return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20); + }, + + /** + * Multiply this Matrix by the given Matrix. + * + * @method Phaser.Math.Matrix3#multiply + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix3} src - The Matrix to multiply this Matrix by. + * + * @return {Phaser.Math.Matrix3} This Matrix3. + */ + multiply: function (src) + { + var a = this.val; + + var a00 = a[0]; + var a01 = a[1]; + var a02 = a[2]; + var a10 = a[3]; + var a11 = a[4]; + var a12 = a[5]; + var a20 = a[6]; + var a21 = a[7]; + var a22 = a[8]; + + var b = src.val; + + var b00 = b[0]; + var b01 = b[1]; + var b02 = b[2]; + var b10 = b[3]; + var b11 = b[4]; + var b12 = b[5]; + var b20 = b[6]; + var b21 = b[7]; + var b22 = b[8]; + + a[0] = b00 * a00 + b01 * a10 + b02 * a20; + a[1] = b00 * a01 + b01 * a11 + b02 * a21; + a[2] = b00 * a02 + b01 * a12 + b02 * a22; + + a[3] = b10 * a00 + b11 * a10 + b12 * a20; + a[4] = b10 * a01 + b11 * a11 + b12 * a21; + a[5] = b10 * a02 + b11 * a12 + b12 * a22; + + a[6] = b20 * a00 + b21 * a10 + b22 * a20; + a[7] = b20 * a01 + b21 * a11 + b22 * a21; + a[8] = b20 * a02 + b21 * a12 + b22 * a22; + + return this; + }, + + /** + * Translate this Matrix using the given Vector. + * + * @method Phaser.Math.Matrix3#translate + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with. + * + * @return {Phaser.Math.Matrix3} This Matrix3. + */ + translate: function (v) + { + var a = this.val; + var x = v.x; + var y = v.y; + + a[6] = x * a[0] + y * a[3] + a[6]; + a[7] = x * a[1] + y * a[4] + a[7]; + a[8] = x * a[2] + y * a[5] + a[8]; + + return this; + }, + + /** + * Apply a rotation transformation to this Matrix. + * + * @method Phaser.Math.Matrix3#rotate + * @since 3.0.0 + * + * @param {number} rad - The angle in radians to rotate by. + * + * @return {Phaser.Math.Matrix3} This Matrix3. + */ + rotate: function (rad) + { + var a = this.val; + + var a00 = a[0]; + var a01 = a[1]; + var a02 = a[2]; + var a10 = a[3]; + var a11 = a[4]; + var a12 = a[5]; + + var s = Math.sin(rad); + var c = Math.cos(rad); + + a[0] = c * a00 + s * a10; + a[1] = c * a01 + s * a11; + a[2] = c * a02 + s * a12; + + a[3] = c * a10 - s * a00; + a[4] = c * a11 - s * a01; + a[5] = c * a12 - s * a02; + + return this; + }, + + /** + * Apply a scale transformation to this Matrix. + * + * Uses the `x` and `y` components of the given Vector to scale the Matrix. + * + * @method Phaser.Math.Matrix3#scale + * @since 3.0.0 + * + * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with. + * + * @return {Phaser.Math.Matrix3} This Matrix3. + */ + scale: function (v) + { + var a = this.val; + var x = v.x; + var y = v.y; + + a[0] = x * a[0]; + a[1] = x * a[1]; + a[2] = x * a[2]; + + a[3] = y * a[3]; + a[4] = y * a[4]; + a[5] = y * a[5]; + + return this; + }, + + /** + * Set the values of this Matrix from the given Quaternion. + * + * @method Phaser.Math.Matrix3#fromQuat + * @since 3.0.0 + * + * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from. + * + * @return {Phaser.Math.Matrix3} This Matrix3. + */ + fromQuat: function (q) + { + var x = q.x; + var y = q.y; + var z = q.z; + var w = q.w; + + var x2 = x + x; + var y2 = y + y; + var z2 = z + z; + + var xx = x * x2; + var xy = x * y2; + var xz = x * z2; + + var yy = y * y2; + var yz = y * z2; + var zz = z * z2; + + var wx = w * x2; + var wy = w * y2; + var wz = w * z2; + + var out = this.val; + + out[0] = 1 - (yy + zz); + out[3] = xy + wz; + out[6] = xz - wy; + + out[1] = xy - wz; + out[4] = 1 - (xx + zz); + out[7] = yz + wx; + + out[2] = xz + wy; + out[5] = yz - wx; + out[8] = 1 - (xx + yy); + + return this; + }, + + /** + * Set the values of this Matrix3 to be normalized from the given Matrix4. + * + * @method Phaser.Math.Matrix3#normalFromMat4 + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix4} m - The Matrix4 to normalize the values from. + * + * @return {Phaser.Math.Matrix3} This Matrix3. + */ + normalFromMat4: function (m) + { + var a = m.val; + var out = this.val; + + var a00 = a[0]; + var a01 = a[1]; + var a02 = a[2]; + var a03 = a[3]; + + var a10 = a[4]; + var a11 = a[5]; + var a12 = a[6]; + var a13 = a[7]; + + var a20 = a[8]; + var a21 = a[9]; + var a22 = a[10]; + var a23 = a[11]; + + var a30 = a[12]; + var a31 = a[13]; + var a32 = a[14]; + var a33 = a[15]; + + var b00 = a00 * a11 - a01 * a10; + var b01 = a00 * a12 - a02 * a10; + var b02 = a00 * a13 - a03 * a10; + var b03 = a01 * a12 - a02 * a11; + + var b04 = a01 * a13 - a03 * a11; + var b05 = a02 * a13 - a03 * a12; + var b06 = a20 * a31 - a21 * a30; + var b07 = a20 * a32 - a22 * a30; + + var b08 = a20 * a33 - a23 * a30; + var b09 = a21 * a32 - a22 * a31; + var b10 = a21 * a33 - a23 * a31; + var b11 = a22 * a33 - a23 * a32; + + // Calculate the determinant + var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; + + if (!det) + { + return null; + } + + det = 1 / det; + + out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det; + out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det; + out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det; + + out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det; + out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det; + out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det; + + out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det; + out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det; + out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det; + + return this; + } + +}); + +module.exports = Matrix3; + + +/***/ }), +/* 30 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji +// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl + +var Class = __webpack_require__(0); +var Vector3 = __webpack_require__(3); +var Matrix3 = __webpack_require__(29); + +var EPSILON = 0.000001; + +// Some shared 'private' arrays +var siNext = new Int8Array([ 1, 2, 0 ]); +var tmp = new Float32Array([ 0, 0, 0 ]); + +var xUnitVec3 = new Vector3(1, 0, 0); +var yUnitVec3 = new Vector3(0, 1, 0); + +var tmpvec = new Vector3(); +var tmpMat3 = new Matrix3(); + +/** + * @classdesc + * A quaternion. + * + * @class Quaternion + * @memberof Phaser.Math + * @constructor + * @since 3.0.0 + * + * @param {number} [x] - The x component. + * @param {number} [y] - The y component. + * @param {number} [z] - The z component. + * @param {number} [w] - The w component. + */ +var Quaternion = new Class({ + + initialize: + + function Quaternion (x, y, z, w) + { + /** + * The x component of this Quaternion. + * + * @name Phaser.Math.Quaternion#x + * @type {number} + * @default 0 + * @since 3.0.0 + */ + + /** + * The y component of this Quaternion. + * + * @name Phaser.Math.Quaternion#y + * @type {number} + * @default 0 + * @since 3.0.0 + */ + + /** + * The z component of this Quaternion. + * + * @name Phaser.Math.Quaternion#z + * @type {number} + * @default 0 + * @since 3.0.0 + */ + + /** + * The w component of this Quaternion. + * + * @name Phaser.Math.Quaternion#w + * @type {number} + * @default 0 + * @since 3.0.0 + */ + + if (typeof x === 'object') + { + this.x = x.x || 0; + this.y = x.y || 0; + this.z = x.z || 0; + this.w = x.w || 0; + } + else + { + this.x = x || 0; + this.y = y || 0; + this.z = z || 0; + this.w = w || 0; + } + }, + + /** + * Copy the components of a given Quaternion or Vector into this Quaternion. + * + * @method Phaser.Math.Quaternion#copy + * @since 3.0.0 + * + * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} src - The Quaternion or Vector to copy the components from. + * + * @return {Phaser.Math.Quaternion} This Quaternion. + */ + copy: function (src) + { + this.x = src.x; + this.y = src.y; + this.z = src.z; + this.w = src.w; + + return this; + }, + + /** + * Set the components of this Quaternion. + * + * @method Phaser.Math.Quaternion#set + * @since 3.0.0 + * + * @param {(number|object)} [x=0] - The x component, or an object containing x, y, z, and w components. + * @param {number} [y=0] - The y component. + * @param {number} [z=0] - The z component. + * @param {number} [w=0] - The w component. + * + * @return {Phaser.Math.Quaternion} This Quaternion. + */ + set: function (x, y, z, w) + { + if (typeof x === 'object') + { + this.x = x.x || 0; + this.y = x.y || 0; + this.z = x.z || 0; + this.w = x.w || 0; + } + else + { + this.x = x || 0; + this.y = y || 0; + this.z = z || 0; + this.w = w || 0; + } + + return this; + }, + + /** + * Add a given Quaternion or Vector to this Quaternion. Addition is component-wise. + * + * @method Phaser.Math.Quaternion#add + * @since 3.0.0 + * + * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to add to this Quaternion. + * + * @return {Phaser.Math.Quaternion} This Quaternion. + */ + add: function (v) + { + this.x += v.x; + this.y += v.y; + this.z += v.z; + this.w += v.w; + + return this; + }, + + /** + * Subtract a given Quaternion or Vector from this Quaternion. Subtraction is component-wise. + * + * @method Phaser.Math.Quaternion#subtract + * @since 3.0.0 + * + * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to subtract from this Quaternion. + * + * @return {Phaser.Math.Quaternion} This Quaternion. + */ + subtract: function (v) + { + this.x -= v.x; + this.y -= v.y; + this.z -= v.z; + this.w -= v.w; + + return this; + }, + + /** + * Scale this Quaternion by the given value. + * + * @method Phaser.Math.Quaternion#scale + * @since 3.0.0 + * + * @param {number} scale - The value to scale this Quaternion by. + * + * @return {Phaser.Math.Quaternion} This Quaternion. + */ + scale: function (scale) + { + this.x *= scale; + this.y *= scale; + this.z *= scale; + this.w *= scale; + + return this; + }, + + /** + * Calculate the length of this Quaternion. + * + * @method Phaser.Math.Quaternion#length + * @since 3.0.0 + * + * @return {number} The length of this Quaternion. + */ + length: function () + { + var x = this.x; + var y = this.y; + var z = this.z; + var w = this.w; + + return Math.sqrt(x * x + y * y + z * z + w * w); + }, + + /** + * Calculate the length of this Quaternion squared. + * + * @method Phaser.Math.Quaternion#lengthSq + * @since 3.0.0 + * + * @return {number} The length of this Quaternion, squared. + */ + lengthSq: function () + { + var x = this.x; + var y = this.y; + var z = this.z; + var w = this.w; + + return x * x + y * y + z * z + w * w; + }, + + /** + * Normalize this Quaternion. + * + * @method Phaser.Math.Quaternion#normalize + * @since 3.0.0 + * + * @return {Phaser.Math.Quaternion} This Quaternion. + */ + normalize: function () + { + var x = this.x; + var y = this.y; + var z = this.z; + var w = this.w; + var len = x * x + y * y + z * z + w * w; + + if (len > 0) + { + len = 1 / Math.sqrt(len); + + this.x = x * len; + this.y = y * len; + this.z = z * len; + this.w = w * len; + } + + return this; + }, + + /** + * Calculate the dot product of this Quaternion and the given Quaternion or Vector. + * + * @method Phaser.Math.Quaternion#dot + * @since 3.0.0 + * + * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to dot product with this Quaternion. + * + * @return {number} The dot product of this Quaternion and the given Quaternion or Vector. + */ + dot: function (v) + { + return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w; + }, + + /** + * Linearly interpolate this Quaternion towards the given Quaternion or Vector. + * + * @method Phaser.Math.Quaternion#lerp + * @since 3.0.0 + * + * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to interpolate towards. + * @param {number} [t=0] - The percentage of interpolation. + * + * @return {Phaser.Math.Quaternion} This Quaternion. + */ + lerp: function (v, t) + { + if (t === undefined) { t = 0; } + + var ax = this.x; + var ay = this.y; + var az = this.z; + var aw = this.w; + + this.x = ax + t * (v.x - ax); + this.y = ay + t * (v.y - ay); + this.z = az + t * (v.z - az); + this.w = aw + t * (v.w - aw); + + return this; + }, + + /** + * Rotates this Quaternion based on the two given vectors. + * + * @method Phaser.Math.Quaternion#rotationTo + * @since 3.0.0 + * + * @param {Phaser.Math.Vector3} a - The transform rotation vector. + * @param {Phaser.Math.Vector3} b - The target rotation vector. + * + * @return {Phaser.Math.Quaternion} This Quaternion. + */ + rotationTo: function (a, b) + { + var dot = a.x * b.x + a.y * b.y + a.z * b.z; + + if (dot < -0.999999) + { + if (tmpvec.copy(xUnitVec3).cross(a).length() < EPSILON) + { + tmpvec.copy(yUnitVec3).cross(a); + } + + tmpvec.normalize(); + + return this.setAxisAngle(tmpvec, Math.PI); + + } + else if (dot > 0.999999) + { + this.x = 0; + this.y = 0; + this.z = 0; + this.w = 1; + + return this; + } + else + { + tmpvec.copy(a).cross(b); + + this.x = tmpvec.x; + this.y = tmpvec.y; + this.z = tmpvec.z; + this.w = 1 + dot; + + return this.normalize(); + } + }, + + /** + * Set the axes of this Quaternion. + * + * @method Phaser.Math.Quaternion#setAxes + * @since 3.0.0 + * + * @param {Phaser.Math.Vector3} view - The view axis. + * @param {Phaser.Math.Vector3} right - The right axis. + * @param {Phaser.Math.Vector3} up - The upwards axis. + * + * @return {Phaser.Math.Quaternion} This Quaternion. + */ + setAxes: function (view, right, up) + { + var m = tmpMat3.val; + + m[0] = right.x; + m[3] = right.y; + m[6] = right.z; + + m[1] = up.x; + m[4] = up.y; + m[7] = up.z; + + m[2] = -view.x; + m[5] = -view.y; + m[8] = -view.z; + + return this.fromMat3(tmpMat3).normalize(); + }, + + /** + * Reset this Matrix to an identity (default) Quaternion. + * + * @method Phaser.Math.Quaternion#identity + * @since 3.0.0 + * + * @return {Phaser.Math.Quaternion} This Quaternion. + */ + identity: function () + { + this.x = 0; + this.y = 0; + this.z = 0; + this.w = 1; + + return this; + }, + + /** + * Set the axis angle of this Quaternion. + * + * @method Phaser.Math.Quaternion#setAxisAngle + * @since 3.0.0 + * + * @param {Phaser.Math.Vector3} axis - The axis. + * @param {number} rad - The angle in radians. + * + * @return {Phaser.Math.Quaternion} This Quaternion. + */ + setAxisAngle: function (axis, rad) + { + rad = rad * 0.5; + + var s = Math.sin(rad); + + this.x = s * axis.x; + this.y = s * axis.y; + this.z = s * axis.z; + this.w = Math.cos(rad); + + return this; + }, + + /** + * Multiply this Quaternion by the given Quaternion or Vector. + * + * @method Phaser.Math.Quaternion#multiply + * @since 3.0.0 + * + * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to multiply this Quaternion by. + * + * @return {Phaser.Math.Quaternion} This Quaternion. + */ + multiply: function (b) + { + var ax = this.x; + var ay = this.y; + var az = this.z; + var aw = this.w; + + var bx = b.x; + var by = b.y; + var bz = b.z; + var bw = b.w; + + this.x = ax * bw + aw * bx + ay * bz - az * by; + this.y = ay * bw + aw * by + az * bx - ax * bz; + this.z = az * bw + aw * bz + ax * by - ay * bx; + this.w = aw * bw - ax * bx - ay * by - az * bz; + + return this; + }, + + /** + * Smoothly linearly interpolate this Quaternion towards the given Quaternion or Vector. + * + * @method Phaser.Math.Quaternion#slerp + * @since 3.0.0 + * + * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to interpolate towards. + * @param {number} t - The percentage of interpolation. + * + * @return {Phaser.Math.Quaternion} This Quaternion. + */ + slerp: function (b, t) + { + // benchmarks: http://jsperf.com/quaternion-slerp-implementations + + var ax = this.x; + var ay = this.y; + var az = this.z; + var aw = this.w; + + var bx = b.x; + var by = b.y; + var bz = b.z; + var bw = b.w; + + // calc cosine + var cosom = ax * bx + ay * by + az * bz + aw * bw; + + // adjust signs (if necessary) + if (cosom < 0) + { + cosom = -cosom; + bx = - bx; + by = - by; + bz = - bz; + bw = - bw; + } + + // "from" and "to" quaternions are very close + // ... so we can do a linear interpolation + var scale0 = 1 - t; + var scale1 = t; + + // calculate coefficients + if ((1 - cosom) > EPSILON) + { + // standard case (slerp) + var omega = Math.acos(cosom); + var sinom = Math.sin(omega); + + scale0 = Math.sin((1.0 - t) * omega) / sinom; + scale1 = Math.sin(t * omega) / sinom; + } + + // calculate final values + this.x = scale0 * ax + scale1 * bx; + this.y = scale0 * ay + scale1 * by; + this.z = scale0 * az + scale1 * bz; + this.w = scale0 * aw + scale1 * bw; + + return this; + }, + + /** + * Invert this Quaternion. + * + * @method Phaser.Math.Quaternion#invert + * @since 3.0.0 + * + * @return {Phaser.Math.Quaternion} This Quaternion. + */ + invert: function () + { + var a0 = this.x; + var a1 = this.y; + var a2 = this.z; + var a3 = this.w; + + var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3; + var invDot = (dot) ? 1 / dot : 0; + + // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0 + + this.x = -a0 * invDot; + this.y = -a1 * invDot; + this.z = -a2 * invDot; + this.w = a3 * invDot; + + return this; + }, + + /** + * Convert this Quaternion into its conjugate. + * + * Sets the x, y and z components. + * + * @method Phaser.Math.Quaternion#conjugate + * @since 3.0.0 + * + * @return {Phaser.Math.Quaternion} This Quaternion. + */ + conjugate: function () + { + this.x = -this.x; + this.y = -this.y; + this.z = -this.z; + + return this; + }, + + /** + * Rotate this Quaternion on the X axis. + * + * @method Phaser.Math.Quaternion#rotateX + * @since 3.0.0 + * + * @param {number} rad - The rotation angle in radians. + * + * @return {Phaser.Math.Quaternion} This Quaternion. + */ + rotateX: function (rad) + { + rad *= 0.5; + + var ax = this.x; + var ay = this.y; + var az = this.z; + var aw = this.w; + + var bx = Math.sin(rad); + var bw = Math.cos(rad); + + this.x = ax * bw + aw * bx; + this.y = ay * bw + az * bx; + this.z = az * bw - ay * bx; + this.w = aw * bw - ax * bx; + + return this; + }, + + /** + * Rotate this Quaternion on the Y axis. + * + * @method Phaser.Math.Quaternion#rotateY + * @since 3.0.0 + * + * @param {number} rad - The rotation angle in radians. + * + * @return {Phaser.Math.Quaternion} This Quaternion. + */ + rotateY: function (rad) + { + rad *= 0.5; + + var ax = this.x; + var ay = this.y; + var az = this.z; + var aw = this.w; + + var by = Math.sin(rad); + var bw = Math.cos(rad); + + this.x = ax * bw - az * by; + this.y = ay * bw + aw * by; + this.z = az * bw + ax * by; + this.w = aw * bw - ay * by; + + return this; + }, + + /** + * Rotate this Quaternion on the Z axis. + * + * @method Phaser.Math.Quaternion#rotateZ + * @since 3.0.0 + * + * @param {number} rad - The rotation angle in radians. + * + * @return {Phaser.Math.Quaternion} This Quaternion. + */ + rotateZ: function (rad) + { + rad *= 0.5; + + var ax = this.x; + var ay = this.y; + var az = this.z; + var aw = this.w; + + var bz = Math.sin(rad); + var bw = Math.cos(rad); + + this.x = ax * bw + ay * bz; + this.y = ay * bw - ax * bz; + this.z = az * bw + aw * bz; + this.w = aw * bw - az * bz; + + return this; + }, + + /** + * Create a unit (or rotation) Quaternion from its x, y, and z components. + * + * Sets the w component. + * + * @method Phaser.Math.Quaternion#calculateW + * @since 3.0.0 + * + * @return {Phaser.Math.Quaternion} This Quaternion. + */ + calculateW: function () + { + var x = this.x; + var y = this.y; + var z = this.z; + + this.w = -Math.sqrt(1.0 - x * x - y * y - z * z); + + return this; + }, + + /** + * Convert the given Matrix into this Quaternion. + * + * @method Phaser.Math.Quaternion#fromMat3 + * @since 3.0.0 + * + * @param {Phaser.Math.Matrix3} mat - The Matrix to convert from. + * + * @return {Phaser.Math.Quaternion} This Quaternion. + */ + fromMat3: function (mat) + { + // benchmarks: + // http://jsperf.com/typed-array-access-speed + // http://jsperf.com/conversion-of-3x3-matrix-to-quaternion + + // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes + // article "Quaternion Calculus and Fast Animation". + var m = mat.val; + var fTrace = m[0] + m[4] + m[8]; + var fRoot; + + if (fTrace > 0) + { + // |w| > 1/2, may as well choose w > 1/2 + fRoot = Math.sqrt(fTrace + 1.0); // 2w + + this.w = 0.5 * fRoot; + + fRoot = 0.5 / fRoot; // 1/(4w) + + this.x = (m[7] - m[5]) * fRoot; + this.y = (m[2] - m[6]) * fRoot; + this.z = (m[3] - m[1]) * fRoot; + } + else + { + // |w| <= 1/2 + var i = 0; + + if (m[4] > m[0]) + { + i = 1; + } + + if (m[8] > m[i * 3 + i]) + { + i = 2; + } + + var j = siNext[i]; + var k = siNext[j]; + + // This isn't quite as clean without array access + fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1); + tmp[i] = 0.5 * fRoot; + + fRoot = 0.5 / fRoot; + + tmp[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot; + tmp[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot; + + this.x = tmp[0]; + this.y = tmp[1]; + this.z = tmp[2]; + this.w = (m[k * 3 + j] - m[j * 3 + k]) * fRoot; + } + + return this; + } + +}); + +module.exports = Quaternion; + + +/***/ }), +/* 31 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Vector3 = __webpack_require__(3); +var Matrix4 = __webpack_require__(10); +var Quaternion = __webpack_require__(30); + +var tmpMat4 = new Matrix4(); +var tmpQuat = new Quaternion(); +var tmpVec3 = new Vector3(); + +/** + * Rotates a vector in place by axis angle. + * + * This is the same as transforming a point by an + * axis-angle quaternion, but it has higher precision. + * + * @function Phaser.Math.RotateVec3 + * @since 3.0.0 + * + * @param {Phaser.Math.Vector3} vec - The vector to be rotated. + * @param {Phaser.Math.Vector3} axis - The axis to rotate around. + * @param {number} radians - The angle of rotation in radians. + * + * @return {Phaser.Math.Vector3} The given vector. + */ +var RotateVec3 = function (vec, axis, radians) +{ + // Set the quaternion to our axis angle + tmpQuat.setAxisAngle(axis, radians); + + // Create a rotation matrix from the axis angle + tmpMat4.fromRotationTranslation(tmpQuat, tmpVec3.set(0, 0, 0)); + + // Multiply our vector by the rotation matrix + return vec.transformMat4(tmpMat4); +}; + +module.exports = RotateVec3; + + +/***/ }), +/* 32 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2018 Photon Storm Ltd. @@ -5741,15 +6773,15 @@ module.exports = Matrix4; */ var Class = __webpack_require__(0); -var Matrix4 = __webpack_require__(14); -var RandomXYZ = __webpack_require__(68); -var RandomXYZW = __webpack_require__(67); -var RotateVec3 = __webpack_require__(66); -var Set = __webpack_require__(63); -var Sprite3D = __webpack_require__(13); -var Vector2 = __webpack_require__(3); -var Vector3 = __webpack_require__(2); -var Vector4 = __webpack_require__(5); +var Matrix4 = __webpack_require__(10); +var RandomXYZ = __webpack_require__(25); +var RandomXYZW = __webpack_require__(26); +var RotateVec3 = __webpack_require__(31); +var Set = __webpack_require__(158); +var Sprite3D = __webpack_require__(33); +var Vector2 = __webpack_require__(1); +var Vector3 = __webpack_require__(3); +var Vector4 = __webpack_require__(9); // Local cache vars var tmpVec3 = new Vector3(); @@ -5848,13 +6880,12 @@ var Camera = new Class({ */ this.position = new Vector3(); - // The mapping from 3D size units to pixels. - // In the default case 1 3D unit = 128 pixels. So a sprite that is - // 256 x 128 px in size will be 2 x 1 units. - // Change to whatever best fits your game assets. /** - * [description] + * The mapping from 3D size units to pixels. + * In the default case 1 3D unit = 128 pixels. So a sprite that is + * 256 x 128 px in size will be 2 x 1 units. + * Change to whatever best fits your game assets. * * @name Phaser.Cameras.Sprite3D#pixelScale * @type {number} @@ -6558,7 +7589,7 @@ var Camera = new Class({ return this; }, - // Overriden by subclasses + // Overridden by subclasses /** * [description] * @@ -6809,783 +7840,7 @@ module.exports = Camera; /***/ }), -/* 16 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * Phaser Scale Modes. - * - * @name Phaser.ScaleModes - * @enum {integer} - * @memberOf Phaser - * @readOnly - * @since 3.0.0 - */ - -module.exports = { - - /** - * Default Scale Mode (Linear). - * - * @name Phaser.ScaleModes.DEFAULT - */ - DEFAULT: 0, - - /** - * Linear Scale Mode. - * - * @name Phaser.ScaleModes.LINEAR - */ - LINEAR: 0, - - /** - * Nearest Scale Mode. - * - * @name Phaser.ScaleModes.NEAREST - */ - NEAREST: 1 - -}; - - -/***/ }), -/* 17 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var RND = __webpack_require__(72); - -var MATH_CONST = { - - /** - * The value of PI * 2. - * - * @name Phaser.Math.PI2 - * @type {number} - * @since 3.0.0 - */ - PI2: Math.PI * 2, - - /** - * The value of PI * 0.5. - * - * @name Phaser.Math.TAU - * @type {number} - * @since 3.0.0 - */ - TAU: Math.PI * 0.5, - - /** - * An epsilon value (1.0e-6) - * - * @name Phaser.Math.EPSILON - * @type {number} - * @since 3.0.0 - */ - EPSILON: 1.0e-6, - - /** - * For converting degrees to radians (PI / 180) - * - * @name Phaser.Math.DEG_TO_RAD - * @type {number} - * @since 3.0.0 - */ - DEG_TO_RAD: Math.PI / 180, - - /** - * For converting radians to degrees (180 / PI) - * - * @name Phaser.Math.RAD_TO_DEG - * @type {number} - * @since 3.0.0 - */ - RAD_TO_DEG: 180 / Math.PI, - - /** - * An instance of the Random Number Generator. - * - * @name Phaser.Math.RND - * @type {Phaser.Math.RandomDataGenerator} - * @since 3.0.0 - */ - RND: new RND() - -}; - -module.exports = MATH_CONST; - - -/***/ }), -/* 18 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * Phaser Blend Modes. - * - * @name Phaser.BlendModes - * @enum {integer} - * @memberOf Phaser - * @readOnly - * @since 3.0.0 - */ - -module.exports = { - - /** - * Skips the Blend Mode check in the renderer. - * - * @name Phaser.BlendModes.SKIP_CHECK - */ - SKIP_CHECK: -1, - - /** - * Normal blend mode. - * - * @name Phaser.BlendModes.NORMAL - */ - NORMAL: 0, - - /** - * Add blend mode. - * - * @name Phaser.BlendModes.ADD - */ - ADD: 1, - - /** - * Multiply blend mode. - * - * @name Phaser.BlendModes.MULTIPLY - */ - MULTIPLY: 2, - - /** - * Screen blend mode. - * - * @name Phaser.BlendModes.SCREEN - */ - SCREEN: 3, - - /** - * Overlay blend mode. - * - * @name Phaser.BlendModes.OVERLAY - */ - OVERLAY: 4, - - /** - * Darken blend mode. - * - * @name Phaser.BlendModes.DARKEN - */ - DARKEN: 5, - - /** - * Lighten blend mode. - * - * @name Phaser.BlendModes.LIGHTEN - */ - LIGHTEN: 6, - - /** - * Color Dodge blend mode. - * - * @name Phaser.BlendModes.COLOR_DODGE - */ - COLOR_DODGE: 7, - - /** - * Color Burn blend mode. - * - * @name Phaser.BlendModes.COLOR_BURN - */ - COLOR_BURN: 8, - - /** - * Hard Light blend mode. - * - * @name Phaser.BlendModes.HARD_LIGHT - */ - HARD_LIGHT: 9, - - /** - * Soft Light blend mode. - * - * @name Phaser.BlendModes.SOFT_LIGHT - */ - SOFT_LIGHT: 10, - - /** - * Difference blend mode. - * - * @name Phaser.BlendModes.DIFFERENCE - */ - DIFFERENCE: 11, - - /** - * Exclusion blend mode. - * - * @name Phaser.BlendModes.EXCLUSION - */ - EXCLUSION: 12, - - /** - * Hue blend mode. - * - * @name Phaser.BlendModes.HUE - */ - HUE: 13, - - /** - * Saturation blend mode. - * - * @name Phaser.BlendModes.SATURATION - */ - SATURATION: 14, - - /** - * Color blend mode. - * - * @name Phaser.BlendModes.COLOR - */ - COLOR: 15, - - /** - * Luminosity blend mode. - * - * @name Phaser.BlendModes.LUMINOSITY - */ - LUMINOSITY: 16 - -}; - - -/***/ }), -/* 19 */ -/***/ (function(module, exports, __webpack_require__) { - -/** -* @author Richard Davey -* @copyright 2018 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} -*/ - -var Class = __webpack_require__(0); - -/** - * @classdesc - * A Global Plugin is installed just once into the Game owned Plugin Manager. - * It can listen for Game events and respond to them. - * - * @class BasePlugin - * @memberOf Phaser.Plugins - * @constructor - * @since 3.8.0 - * - * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager. - */ -var BasePlugin = new Class({ - - initialize: - - function BasePlugin (pluginManager) - { - /** - * A handy reference to the Plugin Manager that is responsible for this plugin. - * Can be used as a route to gain access to game systems and events. - * - * @name Phaser.Plugins.BasePlugin#pluginManager - * @type {Phaser.Plugins.PluginManager} - * @protected - * @since 3.8.0 - */ - this.pluginManager = pluginManager; - - /** - * A reference to the Game instance this plugin is running under. - * - * @name Phaser.Plugins.BasePlugin#game - * @type {Phaser.Game} - * @protected - * @since 3.8.0 - */ - this.game = pluginManager.game; - - /** - * A reference to the Scene that has installed this plugin. - * Only set if it's a Scene Plugin, otherwise `null`. - * This property is only set when the plugin is instantiated and added to the Scene, not before. - * You cannot use it during the `init` method, but you can during the `boot` method. - * - * @name Phaser.Plugins.BasePlugin#scene - * @type {?Phaser.Scene} - * @protected - * @since 3.8.0 - */ - this.scene; - - /** - * A reference to the Scene Systems of the Scene that has installed this plugin. - * Only set if it's a Scene Plugin, otherwise `null`. - * This property is only set when the plugin is instantiated and added to the Scene, not before. - * You cannot use it during the `init` method, but you can during the `boot` method. - * - * @name Phaser.Plugins.BasePlugin#systems - * @type {?Phaser.Scenes.Systems} - * @protected - * @since 3.8.0 - */ - this.systems; - }, - - /** - * Called by the PluginManager when this plugin is first instantiated. - * It will never be called again on this instance. - * In here you can set-up whatever you need for this plugin to run. - * If a plugin is set to automatically start then `BasePlugin.start` will be called immediately after this. - * - * @method Phaser.Plugins.BasePlugin#init - * @since 3.8.0 - * - * @param {?any} [data] - A value specified by the user, if any, from the `data` property of the plugin's configuration object (if started at game boot) or passed in the PluginManager's `install` method (if started manually). - */ - init: function () - { - }, - - /** - * Called by the PluginManager when this plugin is started. - * If a plugin is stopped, and then started again, this will get called again. - * Typically called immediately after `BasePlugin.init`. - * - * @method Phaser.Plugins.BasePlugin#start - * @since 3.8.0 - */ - start: function () - { - // Here are the game-level events you can listen to. - // At the very least you should offer a destroy handler for when the game closes down. - - // var eventEmitter = this.game.events; - - // eventEmitter.once('destroy', this.gameDestroy, this); - // eventEmitter.on('pause', this.gamePause, this); - // eventEmitter.on('resume', this.gameResume, this); - // eventEmitter.on('resize', this.gameResize, this); - // eventEmitter.on('prestep', this.gamePreStep, this); - // eventEmitter.on('step', this.gameStep, this); - // eventEmitter.on('poststep', this.gamePostStep, this); - // eventEmitter.on('prerender', this.gamePreRender, this); - // eventEmitter.on('postrender', this.gamePostRender, this); - }, - - /** - * Called by the PluginManager when this plugin is stopped. - * The game code has requested that your plugin stop doing whatever it does. - * It is now considered as 'inactive' by the PluginManager. - * Handle that process here (i.e. stop listening for events, etc) - * If the plugin is started again then `BasePlugin.start` will be called again. - * - * @method Phaser.Plugins.BasePlugin#stop - * @since 3.8.0 - */ - stop: function () - { - }, - - /** - * If this is a Scene Plugin (i.e. installed into a Scene) then this method is called when the Scene boots. - * By this point the plugin properties `scene` and `systems` will have already been set. - * In here you can listen for Scene events and set-up whatever you need for this plugin to run. - * - * @method Phaser.Plugins.BasePlugin#boot - * @since 3.8.0 - */ - boot: function () - { - // Here are the Scene events you can listen to. - // At the very least you should offer a destroy handler for when the Scene closes down. - - // var eventEmitter = this.systems.events; - - // eventEmitter.once('destroy', this.sceneDestroy, this); - // eventEmitter.on('start', this.sceneStart, this); - // eventEmitter.on('preupdate', this.scenePreUpdate, this); - // eventEmitter.on('update', this.sceneUpdate, this); - // eventEmitter.on('postupdate', this.scenePostUpdate, this); - // eventEmitter.on('pause', this.scenePause, this); - // eventEmitter.on('resume', this.sceneResume, this); - // eventEmitter.on('sleep', this.sceneSleep, this); - // eventEmitter.on('wake', this.sceneWake, this); - // eventEmitter.on('shutdown', this.sceneShutdown, this); - // eventEmitter.on('destroy', this.sceneDestroy, this); - }, - - /** - * Game instance has been destroyed. - * You must release everything in here, all references, all objects, free it all up. - * - * @method Phaser.Plugins.BasePlugin#destroy - * @since 3.8.0 - */ - destroy: function () - { - this.pluginManager = null; - this.game = null; - this.scene = null; - this.systems = null; - } - -}); - -module.exports = BasePlugin; - - -/***/ }), -/* 20 */ -/***/ (function(module, exports, __webpack_require__) { - -/** -* @author Richard Davey -* @copyright 2018 Photon Storm Ltd. -* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} -*/ - -var BasePlugin = __webpack_require__(19); -var Class = __webpack_require__(0); - -/** - * @classdesc - * A Scene Level Plugin is installed into every Scene and belongs to that Scene. - * It can listen for Scene events and respond to them. - * It can map itself to a Scene property, or into the Scene Systems, or both. - * - * @class ScenePlugin - * @memberOf Phaser.Plugins - * @extends Phaser.Plugins.BasePlugin - * @constructor - * @since 3.8.0 - * - * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin. - * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager. - */ -var ScenePlugin = new Class({ - - Extends: BasePlugin, - - initialize: - - function ScenePlugin (scene, pluginManager) - { - BasePlugin.call(this, pluginManager); - - this.scene = scene; - this.systems = scene.sys; - - scene.sys.events.once('boot', this.boot, this); - }, - - /** - * This method is called when the Scene boots. It is only ever called once. - * - * By this point the plugin properties `scene` and `systems` will have already been set. - * - * In here you can listen for Scene events and set-up whatever you need for this plugin to run. - * Here are the Scene events you can listen to: - * - * start - * ready - * preupdate - * update - * postupdate - * resize - * pause - * resume - * sleep - * wake - * transitioninit - * transitionstart - * transitioncomplete - * transitionout - * shutdown - * destroy - * - * At the very least you should offer a destroy handler for when the Scene closes down, i.e: - * - * ```javascript - * var eventEmitter = this.systems.events; - * eventEmitter.once('destroy', this.sceneDestroy, this); - * ``` - * - * @method Phaser.Plugins.ScenePlugin#boot - * @since 3.8.0 - */ - boot: function () - { - } - -}); - -module.exports = ScenePlugin; - - -/***/ }), -/* 21 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Camera = __webpack_require__(15); -var Class = __webpack_require__(0); -var Vector3 = __webpack_require__(2); - -// Local cache vars -var tmpVec3 = new Vector3(); - -/** - * @classdesc - * [description] - * - * @class PerspectiveCamera - * @extends Phaser.Cameras.Sprite3D.Camera - * @memberOf Phaser.Cameras.Sprite3D - * @constructor - * @since 3.0.0 - * - * @param {Phaser.Scene} scene - [description] - * @param {integer} [fieldOfView=80] - [description] - * @param {integer} [viewportWidth=0] - [description] - * @param {integer} [viewportHeight=0] - [description] - */ -var PerspectiveCamera = new Class({ - - Extends: Camera, - - // FOV is converted to radians automatically - initialize: - - function PerspectiveCamera (scene, fieldOfView, viewportWidth, viewportHeight) - { - if (fieldOfView === undefined) { fieldOfView = 80; } - if (viewportWidth === undefined) { viewportWidth = 0; } - if (viewportHeight === undefined) { viewportHeight = 0; } - - Camera.call(this, scene); - - /** - * [description] - * - * @name Phaser.Cameras.Sprite3D.PerspectiveCamera#viewportWidth - * @type {integer} - * @default 0 - * @since 3.0.0 - */ - this.viewportWidth = viewportWidth; - - /** - * [description] - * - * @name Phaser.Cameras.Sprite3D.PerspectiveCamera#viewportHeight - * @type {integer} - * @default 0 - * @since 3.0.0 - */ - this.viewportHeight = viewportHeight; - - /** - * [description] - * - * @name Phaser.Cameras.Sprite3D.PerspectiveCamera#fieldOfView - * @type {integer} - * @default 80 - * @since 3.0.0 - */ - this.fieldOfView = fieldOfView * Math.PI / 180; - - this.update(); - }, - - /** - * [description] - * - * @method Phaser.Cameras.Sprite3D.PerspectiveCamera#setFOV - * @since 3.0.0 - * - * @param {number} value - [description] - * - * @return {Phaser.Cameras.Sprite3D.PerspectiveCamera} [description] - */ - setFOV: function (value) - { - this.fieldOfView = value * Math.PI / 180; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Cameras.Sprite3D.PerspectiveCamera#update - * @since 3.0.0 - * - * @return {Phaser.Cameras.Sprite3D.PerspectiveCamera} [description] - */ - update: function () - { - var aspect = this.viewportWidth / this.viewportHeight; - - // Create a perspective matrix for our camera - this.projection.perspective( - this.fieldOfView, - aspect, - Math.abs(this.near), - Math.abs(this.far) - ); - - // Build the view matrix - tmpVec3.copy(this.position).add(this.direction); - - this.view.lookAt(this.position, tmpVec3, this.up); - - // Projection * view matrix - this.combined.copy(this.projection).multiply(this.view); - - // Invert combined matrix, used for unproject - this.invProjectionView.copy(this.combined).invert(); - - this.billboardMatrixDirty = true; - - this.updateChildren(); - - return this; - } - -}); - -module.exports = PerspectiveCamera; - - -/***/ }), -/* 22 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * Renders this Game Object with the Canvas Renderer to the given Camera. - * 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.Sprite#renderCanvas - * @since 3.0.0 - * @private - * - * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. - * @param {Phaser.GameObjects.Sprite} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. - * @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 SpriteCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) -{ - renderer.batchSprite(src, src.frame, camera, parentMatrix); -}; - -module.exports = SpriteCanvasRenderer; - - -/***/ }), -/* 23 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * Renders this Game Object with the WebGL Renderer to the given Camera. - * 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.Sprite#renderWebGL - * @since 3.0.0 - * @private - * - * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. - * @param {Phaser.GameObjects.Sprite} src - The Game Object being rendered in this call. - * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. - * @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 SpriteWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) -{ - this.pipeline.batchSprite(src, camera, parentMatrix); -}; - -module.exports = SpriteWebGLRenderer; - - -/***/ }), -/* 24 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var renderWebGL = __webpack_require__(6); -var renderCanvas = __webpack_require__(6); - -if (typeof WEBGL_RENDERER) -{ - renderWebGL = __webpack_require__(23); -} - -if (typeof CANVAS_RENDERER) -{ - renderCanvas = __webpack_require__(22); -} - -module.exports = { - - renderWebGL: renderWebGL, - renderCanvas: renderCanvas - -}; - - -/***/ }), -/* 25 */ +/* 33 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -7595,163 +7850,1062 @@ module.exports = { */ var Class = __webpack_require__(0); -var Components = __webpack_require__(11); -var GameObject = __webpack_require__(12); -var SpriteRender = __webpack_require__(24); +var GameObject = __webpack_require__(34); +var Sprite = __webpack_require__(178); +var Vector2 = __webpack_require__(1); +var Vector4 = __webpack_require__(9); /** * @classdesc - * A Sprite Game Object. + * A Sprite 3D Game Object. * - * A Sprite Game Object is used for the display of both static and animated images in your game. - * Sprites can have input events and physics bodies. They can also be tweened, tinted, scrolled - * and animated. + * The Sprite 3D object is an encapsulation of a standard Sprite object, with additional methods to allow + * it to be rendered by a 3D Camera. The Sprite can be positioned anywhere within 3D space. * - * The main difference between a Sprite and an Image Game Object is that you cannot animate Images. - * As such, Sprites take a fraction longer to process and have a larger API footprint due to the Animation - * Component. If you do not require animation then you can safely use Images to replace Sprites in all cases. - * - * @class Sprite - * @extends Phaser.GameObjects.GameObject + * @class Sprite3D + * @extends Phaser.GameObjects.Sprite * @memberOf Phaser.GameObjects * @constructor * @since 3.0.0 * - * @extends Phaser.GameObjects.Components.Alpha - * @extends Phaser.GameObjects.Components.BlendMode - * @extends Phaser.GameObjects.Components.Depth - * @extends Phaser.GameObjects.Components.Flip - * @extends Phaser.GameObjects.Components.GetBounds - * @extends Phaser.GameObjects.Components.Mask - * @extends Phaser.GameObjects.Components.Origin - * @extends Phaser.GameObjects.Components.Pipeline - * @extends Phaser.GameObjects.Components.ScaleMode - * @extends Phaser.GameObjects.Components.ScrollFactor - * @extends Phaser.GameObjects.Components.Size - * @extends Phaser.GameObjects.Components.TextureCrop - * @extends Phaser.GameObjects.Components.Tint - * @extends Phaser.GameObjects.Components.Transform - * @extends Phaser.GameObjects.Components.Visible - * * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time. - * @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 {number} x - The x position of this Game Object. + * @param {number} y - The y position of this Game Object. + * @param {number} z - The z position of this Game Object. * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with. */ -var Sprite = new Class({ +var Sprite3D = new Class({ Extends: GameObject, - Mixins: [ - Components.Alpha, - Components.BlendMode, - Components.Depth, - Components.Flip, - Components.GetBounds, - Components.Mask, - Components.Origin, - Components.Pipeline, - Components.ScaleMode, - Components.ScrollFactor, - Components.Size, - Components.TextureCrop, - Components.Tint, - Components.Transform, - Components.Visible, - SpriteRender - ], - initialize: - function Sprite (scene, x, y, texture, frame) + function Sprite3D (scene, x, y, z, texture, frame) { - GameObject.call(this, scene, 'Sprite'); + GameObject.call(this, scene, 'Sprite3D'); /** - * The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method. + * The encapsulated Sprite. * - * @name Phaser.GameObjects.Sprite#_crop - * @type {object} - * @private - * @since 3.11.0 - */ - this._crop = this.resetCropObject(); - - /** - * The Animation Controller of this Sprite. - * - * @name Phaser.GameObjects.Sprite#anims - * @type {Phaser.GameObjects.Components.Animation} + * @name Phaser.GameObjects.Sprite3D#gameObject + * @type {Phaser.GameObjects.GameObject} * @since 3.0.0 */ - this.anims = new Components.Animation(this); + this.gameObject = new Sprite(scene, 0, 0, texture, frame); - this.setTexture(texture, frame); - this.setPosition(x, y); - this.setSizeToFrame(); - this.setOriginFromFrame(); - this.initPipeline('TextureTintPipeline'); + /** + * The position of the Sprite. + * + * @name Phaser.GameObjects.Sprite3D#position + * @type {Phaser.Math.Vector4} + * @since 3.0.0 + */ + this.position = new Vector4(x, y, z); + + /** + * The 2D size of the Sprite. + * + * @name Phaser.GameObjects.Sprite3D#size + * @type {Phaser.Math.Vector2} + * @since 3.0.0 + */ + this.size = new Vector2(this.gameObject.width, this.gameObject.height); + + /** + * The 2D scale of the Sprite. + * + * @name Phaser.GameObjects.Sprite3D#scale + * @type {Phaser.Math.Vector2} + * @since 3.0.0 + */ + this.scale = new Vector2(1, 1); + + /** + * Whether to automatically set the horizontal scale of the encapsulated Sprite. + * + * @name Phaser.GameObjects.Sprite3D#adjustScaleX + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.adjustScaleX = true; + + /** + * Whether to automatically set the vertical scale of the encapsulated Sprite. + * + * @name Phaser.GameObjects.Sprite3D#adjustScaleY + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.adjustScaleY = true; + + /** + * The visible state of the Game Object. + * + * @name Phaser.GameObjects.Sprite3D#_visible + * @type {boolean} + * @default true + * @private + * @since 3.0.0 + */ + this._visible = true; }, /** - * Update this Sprite's animations. + * Project this Sprite onto the given 3D Camera. * - * @method Phaser.GameObjects.Sprite#preUpdate - * @protected + * @method Phaser.GameObjects.Sprite3D#project * @since 3.0.0 * - * @param {number} time - The current timestamp. - * @param {number} delta - The delta time, in ms, elapsed since the last frame. + * @param {Phaser.Cameras.Sprite3D.Camera} camera - The 3D Camera onto which to project this Sprite. */ - preUpdate: function (time, delta) + project: function (camera) { - this.anims.update(time, delta); + var pos = this.position; + + var gameObject = this.gameObject; + + camera.project(pos, gameObject); + + camera.getPointSize(pos, this.size, this.scale); + + if (this.scale.x <= 0 || this.scale.y <= 0) + { + gameObject.setVisible(false); + } + else + { + if (!gameObject.visible) + { + gameObject.setVisible(true); + } + + if (this.adjustScaleX) + { + gameObject.scaleX = this.scale.x; + } + + if (this.adjustScaleY) + { + gameObject.scaleY = this.scale.y; + } + + gameObject.setDepth(gameObject.z * -1); + } }, /** - * Start playing the given animation. + * Set the visible state of the Game Object. * - * @method Phaser.GameObjects.Sprite#play + * @method Phaser.GameObjects.Sprite3D#setVisible * @since 3.0.0 * - * @param {string} key - The string-based key of the animation to play. - * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. - * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. + * @param {boolean} value - The visible state of the Game Object. * - * @return {Phaser.GameObjects.Sprite} This Game Object. + * @return {Phaser.GameObjects.Sprite3D} This Sprite3D Object. */ - play: function (key, ignoreIfPlaying, startFrame) + setVisible: function (value) { - this.anims.play(key, ignoreIfPlaying, startFrame); + this.visible = value; return this; }, /** - * Build a JSON representation of this Sprite. + * The visible state of the Game Object. * - * @method Phaser.GameObjects.Sprite#toJSON + * An invisible Game Object will skip rendering, but will still process update logic. + * + * @name Phaser.GameObjects.Sprite3D#visible + * @type {boolean} * @since 3.0.0 - * - * @return {JSONGameObject} A JSON representation of the Game Object. */ - toJSON: function () - { - var data = Components.ToJSON(this); + visible: { - // Extra Sprite data is added here + get: function () + { + return this._visible; + }, + + set: function (value) + { + this._visible = value; + this.gameObject.visible = value; + } + + }, + + /** + * The x position of this Game Object. + * + * @name Phaser.GameObjects.Sprite3D#x + * @type {number} + * @since 3.0.0 + */ + x: { + + get: function () + { + return this.position.x; + }, + + set: function (value) + { + this.position.x = value; + } + + }, + + /** + * The y position of this Game Object. + * + * @name Phaser.GameObjects.Sprite3D#y + * @type {number} + * @since 3.0.0 + */ + y: { + + get: function () + { + return this.position.y; + }, + + set: function (value) + { + this.position.y = value; + } + + }, + + /** + * The z position of this Game Object. + * + * @name Phaser.GameObjects.Sprite3D#z + * @type {number} + * @since 3.0.0 + */ + z: { + + get: function () + { + return this.position.z; + }, + + set: function (value) + { + this.position.z = value; + } - return data; } }); -module.exports = Sprite; +module.exports = Sprite3D; /***/ }), -/* 26 */ +/* 34 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var ComponentsToJSON = __webpack_require__(35); +var DataManager = __webpack_require__(159); +var EventEmitter = __webpack_require__(36); +var Events = __webpack_require__(37); + +/** + * @classdesc + * The base class that all Game Objects extend. + * You don't create GameObjects directly and they cannot be added to the display list. + * Instead, use them as the base for your own custom classes. + * + * @class GameObject + * @memberof Phaser.GameObjects + * @extends Phaser.Events.EventEmitter + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. + * @param {string} type - A textual representation of the type of Game Object, i.e. `sprite`. + */ +var GameObject = new Class({ + + Extends: EventEmitter, + + initialize: + + function GameObject (scene, type) + { + EventEmitter.call(this); + + /** + * The Scene to which this Game Object belongs. + * Game Objects can only belong to one Scene. + * + * @name Phaser.GameObjects.GameObject#scene + * @type {Phaser.Scene} + * @protected + * @since 3.0.0 + */ + this.scene = scene; + + /** + * A textual representation of this Game Object, i.e. `sprite`. + * Used internally by Phaser but is available for your own custom classes to populate. + * + * @name Phaser.GameObjects.GameObject#type + * @type {string} + * @since 3.0.0 + */ + this.type = type; + + /** + * The current state of this Game Object. + * + * Phaser itself will never modify this value, although plugins may do so. + * + * Use this property to track the state of a Game Object during its lifetime. For example, it could change from + * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant + * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons. + * If you need to store complex data about your Game Object, look at using the Data Component instead. + * + * @name Phaser.GameObjects.GameObject#state + * @type {(integer|string)} + * @since 3.16.0 + */ + this.state = 0; + + /** + * The parent Container of this Game Object, if it has one. + * + * @name Phaser.GameObjects.GameObject#parentContainer + * @type {Phaser.GameObjects.Container} + * @since 3.4.0 + */ + this.parentContainer = null; + + /** + * The name of this Game Object. + * Empty by default and never populated by Phaser, this is left for developers to use. + * + * @name Phaser.GameObjects.GameObject#name + * @type {string} + * @default '' + * @since 3.0.0 + */ + this.name = ''; + + /** + * The active state of this Game Object. + * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it. + * An active object is one which is having its logic and internal systems updated. + * + * @name Phaser.GameObjects.GameObject#active + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.active = true; + + /** + * The Tab Index of the Game Object. + * Reserved for future use by plugins and the Input Manager. + * + * @name Phaser.GameObjects.GameObject#tabIndex + * @type {integer} + * @default -1 + * @since 3.0.0 + */ + this.tabIndex = -1; + + /** + * A Data Manager. + * It allows you to store, query and get key/value paired information specific to this Game Object. + * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`. + * + * @name Phaser.GameObjects.GameObject#data + * @type {Phaser.Data.DataManager} + * @default null + * @since 3.0.0 + */ + this.data = null; + + /** + * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not. + * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively. + * If those components are not used by your custom class then you can use this bitmask as you wish. + * + * @name Phaser.GameObjects.GameObject#renderFlags + * @type {integer} + * @default 15 + * @since 3.0.0 + */ + this.renderFlags = 15; + + /** + * A bitmask that controls if this Game Object is drawn by a Camera or not. + * Not usually set directly, instead call `Camera.ignore`, however you can + * set this property directly using the Camera.id property: + * + * @example + * this.cameraFilter |= camera.id + * + * @name Phaser.GameObjects.GameObject#cameraFilter + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.cameraFilter = 0; + + /** + * If this Game Object is enabled for input then this property will contain an InteractiveObject instance. + * Not usually set directly. Instead call `GameObject.setInteractive()`. + * + * @name Phaser.GameObjects.GameObject#input + * @type {?Phaser.Types.Input.InteractiveObject} + * @default null + * @since 3.0.0 + */ + this.input = null; + + /** + * If this Game Object is enabled for Arcade or Matter Physics then this property will contain a reference to a Physics Body. + * + * @name Phaser.GameObjects.GameObject#body + * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|MatterJS.BodyType)} + * @default null + * @since 3.0.0 + */ + this.body = null; + + /** + * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`. + * This includes calls that may come from a Group, Container or the Scene itself. + * While it allows you to persist a Game Object across Scenes, please understand you are entirely + * responsible for managing references to and from this Game Object. + * + * @name Phaser.GameObjects.GameObject#ignoreDestroy + * @type {boolean} + * @default false + * @since 3.5.0 + */ + this.ignoreDestroy = false; + + // Tell the Scene to re-sort the children + scene.sys.queueDepthSort(); + }, + + /** + * Sets the `active` property of this Game Object and returns this Game Object for further chaining. + * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList. + * + * @method Phaser.GameObjects.GameObject#setActive + * @since 3.0.0 + * + * @param {boolean} value - True if this Game Object should be set as active, false if not. + * + * @return {this} This GameObject. + */ + setActive: function (value) + { + this.active = value; + + return this; + }, + + /** + * Sets the `name` property of this Game Object and returns this Game Object for further chaining. + * The `name` property is not populated by Phaser and is presented for your own use. + * + * @method Phaser.GameObjects.GameObject#setName + * @since 3.0.0 + * + * @param {string} value - The name to be given to this Game Object. + * + * @return {this} This GameObject. + */ + setName: function (value) + { + this.name = value; + + return this; + }, + + /** + * Sets the current state of this Game Object. + * + * Phaser itself will never modify the State of a Game Object, although plugins may do so. + * + * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'. + * The state value should typically be an integer (ideally mapped to a constant + * in your game code), but could also be a string. It is recommended to keep it light and simple. + * If you need to store complex data about your Game Object, look at using the Data Component instead. + * + * @method Phaser.GameObjects.GameObject#setState + * @since 3.16.0 + * + * @param {(integer|string)} value - The state of the Game Object. + * + * @return {this} This GameObject. + */ + setState: function (value) + { + this.state = value; + + return this; + }, + + /** + * Adds a Data Manager component to this Game Object. + * + * @method Phaser.GameObjects.GameObject#setDataEnabled + * @since 3.0.0 + * @see Phaser.Data.DataManager + * + * @return {this} This GameObject. + */ + setDataEnabled: function () + { + if (!this.data) + { + this.data = new DataManager(this); + } + + return this; + }, + + /** + * Allows you to store a key value pair within this Game Objects Data Manager. + * + * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled + * before setting the value. + * + * If the key doesn't already exist in the Data Manager then it is created. + * + * ```javascript + * sprite.setData('name', 'Red Gem Stone'); + * ``` + * + * You can also pass in an object of key value pairs as the first argument: + * + * ```javascript + * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 }); + * ``` + * + * To get a value back again you can call `getData`: + * + * ```javascript + * sprite.getData('gold'); + * ``` + * + * Or you can access the value directly via the `values` property, where it works like any other variable: + * + * ```javascript + * sprite.data.values.gold += 50; + * ``` + * + * When the value is first set, a `setdata` event is emitted from this Game Object. + * + * If the key already exists, a `changedata` event is emitted instead, along an event named after the key. + * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`. + * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter. + * + * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings. + * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager. + * + * @method Phaser.GameObjects.GameObject#setData + * @since 3.0.0 + * + * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored. + * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored. + * + * @return {this} This GameObject. + */ + setData: function (key, value) + { + if (!this.data) + { + this.data = new DataManager(this); + } + + this.data.set(key, value); + + return this; + }, + + /** + * Increase a value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is increased from 0. + * + * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled + * before setting the value. + * + * If the key doesn't already exist in the Data Manager then it is created. + * + * When the value is first set, a `setdata` event is emitted from this Game Object. + * + * @method Phaser.GameObjects.GameObject#incData + * @since 3.23.0 + * + * @param {(string|object)} key - The key to increase the value for. + * @param {*} [data] - The value to increase for the given key. + * + * @return {this} This GameObject. + */ + incData: function (key, value) + { + if (!this.data) + { + this.data = new DataManager(this); + } + + this.data.inc(key, value); + + return this; + }, + + /** + * Toggle a boolean value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is toggled from false. + * + * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled + * before setting the value. + * + * If the key doesn't already exist in the Data Manager then it is created. + * + * When the value is first set, a `setdata` event is emitted from this Game Object. + * + * @method Phaser.GameObjects.GameObject#toggleData + * @since 3.23.0 + * + * @param {(string|object)} key - The key to toggle the value for. + * + * @return {this} This GameObject. + */ + toggleData: function (key) + { + if (!this.data) + { + this.data = new DataManager(this); + } + + this.data.toggle(key); + + return this; + }, + + /** + * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist. + * + * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either: + * + * ```javascript + * sprite.getData('gold'); + * ``` + * + * Or access the value directly: + * + * ```javascript + * sprite.data.values.gold; + * ``` + * + * You can also pass in an array of keys, in which case an array of values will be returned: + * + * ```javascript + * sprite.getData([ 'gold', 'armor', 'health' ]); + * ``` + * + * This approach is useful for destructuring arrays in ES6. + * + * @method Phaser.GameObjects.GameObject#getData + * @since 3.0.0 + * + * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys. + * + * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array. + */ + getData: function (key) + { + if (!this.data) + { + this.data = new DataManager(this); + } + + return this.data.get(key); + }, + + /** + * Pass this Game Object to the Input Manager to enable it for Input. + * + * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area + * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced + * input detection. + * + * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If + * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific + * shape for it to use. + * + * You can also provide an Input Configuration Object as the only argument to this method. + * + * @example + * sprite.setInteractive(); + * + * @example + * sprite.setInteractive(new Phaser.Geom.Circle(45, 46, 45), Phaser.Geom.Circle.Contains); + * + * @example + * graphics.setInteractive(new Phaser.Geom.Rectangle(0, 0, 128, 128), Phaser.Geom.Rectangle.Contains); + * + * @method Phaser.GameObjects.GameObject#setInteractive + * @since 3.0.0 + * + * @param {(Phaser.Types.Input.InputConfiguration|any)} [hitArea] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not given it will try to create a Rectangle based on the texture frame. + * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The callback that determines if the pointer is within the Hit Area shape or not. If you provide a shape you must also provide a callback. + * @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target? + * + * @return {this} This GameObject. + */ + setInteractive: function (hitArea, hitAreaCallback, dropZone) + { + this.scene.sys.input.enable(this, hitArea, hitAreaCallback, dropZone); + + return this; + }, + + /** + * If this Game Object has previously been enabled for input, this will disable it. + * + * An object that is disabled for input stops processing or being considered for + * input events, but can be turned back on again at any time by simply calling + * `setInteractive()` with no arguments provided. + * + * If want to completely remove interaction from this Game Object then use `removeInteractive` instead. + * + * @method Phaser.GameObjects.GameObject#disableInteractive + * @since 3.7.0 + * + * @return {this} This GameObject. + */ + disableInteractive: function () + { + if (this.input) + { + this.input.enabled = false; + } + + return this; + }, + + /** + * If this Game Object has previously been enabled for input, this will queue it + * for removal, causing it to no longer be interactive. The removal happens on + * the next game step, it is not immediate. + * + * The Interactive Object that was assigned to this Game Object will be destroyed, + * removed from the Input Manager and cleared from this Game Object. + * + * If you wish to re-enable this Game Object at a later date you will need to + * re-create its InteractiveObject by calling `setInteractive` again. + * + * If you wish to only temporarily stop an object from receiving input then use + * `disableInteractive` instead, as that toggles the interactive state, where-as + * this erases it completely. + * + * If you wish to resize a hit area, don't remove and then set it as being + * interactive. Instead, access the hitarea object directly and resize the shape + * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the + * shape is a Rectangle, which it is by default.) + * + * @method Phaser.GameObjects.GameObject#removeInteractive + * @since 3.7.0 + * + * @return {this} This GameObject. + */ + removeInteractive: function () + { + this.scene.sys.input.clear(this); + + this.input = undefined; + + return this; + }, + + /** + * This callback is invoked when this Game Object is added to a Scene. + * + * Can be overriden by custom Game Objects, but be aware of some Game Objects that + * will use this, such as Sprites, to add themselves into the Update List. + * + * You can also listen for the `ADDED_TO_SCENE` event from this Game Object. + * + * @method Phaser.GameObjects.GameObject#addedToScene + * @since 3.50.0 + */ + addedToScene: function () + { + }, + + /** + * This callback is invoked when this Game Object is removed from a Scene. + * + * Can be overriden by custom Game Objects, but be aware of some Game Objects that + * will use this, such as Sprites, to removed themselves from the Update List. + * + * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object. + * + * @method Phaser.GameObjects.GameObject#removedFromScene + * @since 3.50.0 + */ + removedFromScene: function () + { + }, + + /** + * To be overridden by custom GameObjects. Allows base objects to be used in a Pool. + * + * @method Phaser.GameObjects.GameObject#update + * @since 3.0.0 + * + * @param {...*} [args] - args + */ + update: function () + { + }, + + /** + * Returns a JSON representation of the Game Object. + * + * @method Phaser.GameObjects.GameObject#toJSON + * @since 3.0.0 + * + * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object. + */ + toJSON: function () + { + return ComponentsToJSON(this); + }, + + /** + * Compares the renderMask with the renderFlags to see if this Game Object will render or not. + * Also checks the Game Object against the given Cameras exclusion list. + * + * @method Phaser.GameObjects.GameObject#willRender + * @since 3.0.0 + * + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to check against this Game Object. + * + * @return {boolean} True if the Game Object should be rendered, otherwise false. + */ + willRender: function (camera) + { + return !(GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id))); + }, + + /** + * Returns an array containing the display list index of either this Game Object, or if it has one, + * its parent Container. It then iterates up through all of the parent containers until it hits the + * root of the display list (which is index 0 in the returned array). + * + * Used internally by the InputPlugin but also useful if you wish to find out the display depth of + * this Game Object and all of its ancestors. + * + * @method Phaser.GameObjects.GameObject#getIndexList + * @since 3.4.0 + * + * @return {integer[]} An array of display list position indexes. + */ + getIndexList: function () + { + // eslint-disable-next-line consistent-this + var child = this; + var parent = this.parentContainer; + + var indexes = []; + + while (parent) + { + // indexes.unshift([parent.getIndex(child), parent.name]); + indexes.unshift(parent.getIndex(child)); + + child = parent; + + if (!parent.parentContainer) + { + break; + } + else + { + parent = parent.parentContainer; + } + } + + // indexes.unshift([this.scene.sys.displayList.getIndex(child), 'root']); + indexes.unshift(this.scene.sys.displayList.getIndex(child)); + + return indexes; + }, + + /** + * Destroys this Game Object removing it from the Display List and Update List and + * severing all ties to parent resources. + * + * Also removes itself from the Input Manager and Physics Manager if previously enabled. + * + * Use this to remove a Game Object from your game if you don't ever plan to use it again. + * As long as no reference to it exists within your own code it should become free for + * garbage collection by the browser. + * + * If you just want to temporarily disable an object then look at using the + * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected. + * + * @method Phaser.GameObjects.GameObject#destroy + * @fires Phaser.GameObjects.Events#DESTROY + * @since 3.0.0 + * + * @param {boolean} [fromScene=false] - Is this Game Object being destroyed as the result of a Scene shutdown? + */ + destroy: function (fromScene) + { + if (fromScene === undefined) { fromScene = false; } + + // This Game Object has already been destroyed + if (!this.scene || this.ignoreDestroy) + { + return; + } + + if (this.preDestroy) + { + this.preDestroy.call(this); + } + + this.emit(Events.DESTROY, this); + + var sys = this.scene.sys; + + if (!fromScene) + { + sys.displayList.remove(this); + } + + if (this.input) + { + sys.input.clear(this); + this.input = undefined; + } + + if (this.data) + { + this.data.destroy(); + + this.data = undefined; + } + + if (this.body) + { + this.body.destroy(); + this.body = undefined; + } + + // Tell the Scene to re-sort the children + if (!fromScene) + { + sys.queueDepthSort(); + } + + this.active = false; + this.visible = false; + + this.scene = undefined; + + this.parentContainer = undefined; + + this.removeAllListeners(); + } + +}); + +/** + * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not. + * + * @constant {integer} RENDER_MASK + * @memberof Phaser.GameObjects.GameObject + * @default + */ +GameObject.RENDER_MASK = 15; + +module.exports = GameObject; + + +/***/ }), +/* 35 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Build a JSON representation of the given Game Object. + * + * This is typically extended further by Game Object specific implementations. + * + * @method Phaser.GameObjects.Components.ToJSON + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to export as JSON. + * + * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object. + */ +var ToJSON = function (gameObject) +{ + var out = { + name: gameObject.name, + type: gameObject.type, + x: gameObject.x, + y: gameObject.y, + depth: gameObject.depth, + scale: { + x: gameObject.scaleX, + y: gameObject.scaleY + }, + origin: { + x: gameObject.originX, + y: gameObject.originY + }, + flipX: gameObject.flipX, + flipY: gameObject.flipY, + rotation: gameObject.rotation, + alpha: gameObject.alpha, + visible: gameObject.visible, + blendMode: gameObject.blendMode, + textureKey: '', + frameKey: '', + data: {} + }; + + if (gameObject.texture) + { + out.textureKey = gameObject.texture.key; + out.frameKey = gameObject.frame.name; + } + + return out; +}; + +module.exports = ToJSON; + + +/***/ }), +/* 36 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -8093,2321 +9247,38 @@ if (true) { } -/***/ }), -/* 27 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Class = __webpack_require__(0); - -/** - * @callback DataEachCallback - * - * @param {*} parent - The parent object of the DataManager. - * @param {string} key - The key of the value. - * @param {*} value - The value. - * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data. - */ - -/** - * @classdesc - * The Data Component features a means to store pieces of data specific to a Game Object, System or Plugin. - * You can then search, query it, and retrieve the data. The parent must either extend EventEmitter, - * or have a property called `events` that is an instance of it. - * - * @class DataManager - * @memberOf Phaser.Data - * @constructor - * @since 3.0.0 - * - * @param {object} parent - The object that this DataManager belongs to. - * @param {Phaser.Events.EventEmitter} eventEmitter - The DataManager's event emitter. - */ -var DataManager = new Class({ - - initialize: - - function DataManager (parent, eventEmitter) - { - /** - * The object that this DataManager belongs to. - * - * @name Phaser.Data.DataManager#parent - * @type {*} - * @since 3.0.0 - */ - this.parent = parent; - - /** - * The DataManager's event emitter. - * - * @name Phaser.Data.DataManager#events - * @type {Phaser.Events.EventEmitter} - * @since 3.0.0 - */ - this.events = eventEmitter; - - if (!eventEmitter) - { - this.events = (parent.events) ? parent.events : parent; - } - - /** - * The data list. - * - * @name Phaser.Data.DataManager#list - * @type {Object.} - * @default {} - * @since 3.0.0 - */ - this.list = {}; - - /** - * The public values list. You can use this to access anything you have stored - * in this Data Manager. For example, if you set a value called `gold` you can - * access it via: - * - * ```javascript - * this.data.values.gold; - * ``` - * - * You can also modify it directly: - * - * ```javascript - * this.data.values.gold += 1000; - * ``` - * - * Doing so will emit a `setdata` event from the parent of this Data Manager. - * - * @name Phaser.Data.DataManager#values - * @type {Object.} - * @default {} - * @since 3.10.0 - */ - this.values = {}; - - /** - * Whether setting data is frozen for this DataManager. - * - * @name Phaser.Data.DataManager#_frozen - * @type {boolean} - * @private - * @default false - * @since 3.0.0 - */ - this._frozen = false; - - if (!parent.hasOwnProperty('sys') && this.events) - { - this.events.once('destroy', this.destroy, this); - } - }, - - /** - * Retrieves the value for the given key, or undefined if it doesn't exist. - * - * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either: - * - * ```javascript - * this.data.get('gold'); - * ``` - * - * Or access the value directly: - * - * ```javascript - * this.data.values.gold; - * ``` - * - * You can also pass in an array of keys, in which case an array of values will be returned: - * - * ```javascript - * this.data.get([ 'gold', 'armor', 'health' ]); - * ``` - * - * This approach is useful for destructuring arrays in ES6. - * - * @method Phaser.Data.DataManager#get - * @since 3.0.0 - * - * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys. - * - * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array. - */ - get: function (key) - { - var list = this.list; - - if (Array.isArray(key)) - { - var output = []; - - for (var i = 0; i < key.length; i++) - { - output.push(list[key[i]]); - } - - return output; - } - else - { - return list[key]; - } - }, - - /** - * Retrieves all data values in a new object. - * - * @method Phaser.Data.DataManager#getAll - * @since 3.0.0 - * - * @return {Object.} All data values. - */ - getAll: function () - { - var results = {}; - - for (var key in this.list) - { - if (this.list.hasOwnProperty(key)) - { - results[key] = this.list[key]; - } - } - - return results; - }, - - /** - * Queries the DataManager for the values of keys matching the given regular expression. - * - * @method Phaser.Data.DataManager#query - * @since 3.0.0 - * - * @param {RegExp} search - A regular expression object. If a non-RegExp object obj is passed, it is implicitly converted to a RegExp by using new RegExp(obj). - * - * @return {Object.} The values of the keys matching the search string. - */ - query: function (search) - { - var results = {}; - - for (var key in this.list) - { - if (this.list.hasOwnProperty(key) && key.match(search)) - { - results[key] = this.list[key]; - } - } - - return results; - }, - - /** - * Sets a value for the given key. If the key doesn't already exist in the Data Manager then it is created. - * - * ```javascript - * data.set('name', 'Red Gem Stone'); - * ``` - * - * You can also pass in an object of key value pairs as the first argument: - * - * ```javascript - * data.set({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 }); - * ``` - * - * To get a value back again you can call `get`: - * - * ```javascript - * data.get('gold'); - * ``` - * - * Or you can access the value directly via the `values` property, where it works like any other variable: - * - * ```javascript - * data.values.gold += 50; - * ``` - * - * When the value is first set, a `setdata` event is emitted. - * - * If the key already exists, a `changedata` event is emitted instead, along an event named after the key. - * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata_PlayerLives`. - * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter. - * - * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings. - * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager. - * - * @method Phaser.Data.DataManager#set - * @since 3.0.0 - * - * @param {(string|object)} key - The key to set the value for. Or an object or key value pairs. If an object the `data` argument is ignored. - * @param {*} data - The value to set for the given key. If an object is provided as the key this argument is ignored. - * - * @return {Phaser.Data.DataManager} This DataManager object. - */ - set: function (key, data) - { - if (this._frozen) - { - return this; - } - - if (typeof key === 'string') - { - return this.setValue(key, data); - } - else - { - for (var entry in key) - { - this.setValue(entry, key[entry]); - } - } - - return this; - }, - - /** - * Internal value setter, called automatically by the `set` method. - * - * @method Phaser.Data.DataManager#setValue - * @private - * @since 3.10.0 - * - * @param {string} key - The key to set the value for. - * @param {*} data - The value to set. - * - * @return {Phaser.Data.DataManager} This DataManager object. - */ - setValue: function (key, data) - { - if (this._frozen) - { - return this; - } - - if (this.has(key)) - { - // Hit the key getter, which will in turn emit the events. - this.values[key] = data; - } - else - { - var _this = this; - var list = this.list; - var events = this.events; - var parent = this.parent; - - Object.defineProperty(this.values, key, { - - enumerable: true, - - configurable: true, - - get: function () - { - return list[key]; - }, - - set: function (value) - { - if (!_this._frozen) - { - var previousValue = list[key]; - list[key] = value; - - events.emit('changedata', parent, key, value, previousValue); - events.emit('changedata_' + key, parent, value, previousValue); - } - } - - }); - - list[key] = data; - - events.emit('setdata', parent, key, data); - } - - return this; - }, - - /** - * Passes all data entries to the given callback. - * - * @method Phaser.Data.DataManager#each - * @since 3.0.0 - * - * @param {DataEachCallback} callback - The function to call. - * @param {*} [context] - Value to use as `this` when executing callback. - * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data. - * - * @return {Phaser.Data.DataManager} This DataManager object. - */ - each: function (callback, context) - { - var args = [ this.parent, null, undefined ]; - - for (var i = 1; i < arguments.length; i++) - { - args.push(arguments[i]); - } - - for (var key in this.list) - { - args[1] = key; - args[2] = this.list[key]; - - callback.apply(context, args); - } - - return this; - }, - - /** - * Merge the given object of key value pairs into this DataManager. - * - * Any newly created values will emit a `setdata` event. Any updated values (see the `overwrite` argument) - * will emit a `changedata` event. - * - * @method Phaser.Data.DataManager#merge - * @since 3.0.0 - * - * @param {Object.} data - The data to merge. - * @param {boolean} [overwrite=true] - Whether to overwrite existing data. Defaults to true. - * - * @return {Phaser.Data.DataManager} This DataManager object. - */ - merge: function (data, overwrite) - { - if (overwrite === undefined) { overwrite = true; } - - // Merge data from another component into this one - for (var key in data) - { - if (data.hasOwnProperty(key) && (overwrite || (!overwrite && !this.has(key)))) - { - this.setValue(key, data[key]); - } - } - - return this; - }, - - /** - * Remove the value for the given key. - * - * If the key is found in this Data Manager it is removed from the internal lists and a - * `removedata` event is emitted. - * - * You can also pass in an array of keys, in which case all keys in the array will be removed: - * - * ```javascript - * this.data.remove([ 'gold', 'armor', 'health' ]); - * ``` - * - * @method Phaser.Data.DataManager#remove - * @since 3.0.0 - * - * @param {(string|string[])} key - The key to remove, or an array of keys to remove. - * - * @return {Phaser.Data.DataManager} This DataManager object. - */ - remove: function (key) - { - if (this._frozen) - { - return this; - } - - if (Array.isArray(key)) - { - for (var i = 0; i < key.length; i++) - { - this.removeValue(key[i]); - } - } - else - { - return this.removeValue(key); - } - - return this; - }, - - /** - * Internal value remover, called automatically by the `remove` method. - * - * @method Phaser.Data.DataManager#removeValue - * @private - * @since 3.10.0 - * - * @param {string} key - The key to set the value for. - * - * @return {Phaser.Data.DataManager} This DataManager object. - */ - removeValue: function (key) - { - if (this.has(key)) - { - var data = this.list[key]; - - delete this.list[key]; - delete this.values[key]; - - this.events.emit('removedata', this.parent, key, data); - } - - return this; - }, - - /** - * Retrieves the data associated with the given 'key', deletes it from this Data Manager, then returns it. - * - * @method Phaser.Data.DataManager#pop - * @since 3.0.0 - * - * @param {string} key - The key of the value to retrieve and delete. - * - * @return {*} The value of the given key. - */ - pop: function (key) - { - var data = undefined; - - if (!this._frozen && this.has(key)) - { - data = this.list[key]; - - delete this.list[key]; - delete this.values[key]; - - this.events.emit('removedata', this, key, data); - } - - return data; - }, - - /** - * Determines whether the given key is set in this Data Manager. - * - * Please note that the keys are case-sensitive and must be valid JavaScript Object property strings. - * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager. - * - * @method Phaser.Data.DataManager#has - * @since 3.0.0 - * - * @param {string} key - The key to check. - * - * @return {boolean} Returns `true` if the key exists, otherwise `false`. - */ - has: function (key) - { - return this.list.hasOwnProperty(key); - }, - - /** - * Freeze or unfreeze this Data Manager. A frozen Data Manager will block all attempts - * to create new values or update existing ones. - * - * @method Phaser.Data.DataManager#setFreeze - * @since 3.0.0 - * - * @param {boolean} value - Whether to freeze or unfreeze the Data Manager. - * - * @return {Phaser.Data.DataManager} This DataManager object. - */ - setFreeze: function (value) - { - this._frozen = value; - - return this; - }, - - /** - * Delete all data in this Data Manager and unfreeze it. - * - * @method Phaser.Data.DataManager#reset - * @since 3.0.0 - * - * @return {Phaser.Data.DataManager} This DataManager object. - */ - reset: function () - { - for (var key in this.list) - { - delete this.list[key]; - delete this.values[key]; - } - - this._frozen = false; - - return this; - }, - - /** - * Destroy this data manager. - * - * @method Phaser.Data.DataManager#destroy - * @since 3.0.0 - */ - destroy: function () - { - this.reset(); - - this.events.off('changedata'); - this.events.off('setdata'); - this.events.off('removedata'); - - this.parent = null; - }, - - /** - * Gets or sets the frozen state of this Data Manager. - * A frozen Data Manager will block all attempts to create new values or update existing ones. - * - * @name Phaser.Data.DataManager#freeze - * @type {boolean} - * @since 3.0.0 - */ - freeze: { - - get: function () - { - return this._frozen; - }, - - set: function (value) - { - this._frozen = (value) ? true : false; - } - - }, - - /** - * Return the total number of entries in this Data Manager. - * - * @name Phaser.Data.DataManager#count - * @type {integer} - * @since 3.0.0 - */ - count: { - - get: function () - { - var i = 0; - - for (var key in this.list) - { - if (this.list[key] !== undefined) - { - i++; - } - } - - return i; - } - - } - -}); - -module.exports = DataManager; - - -/***/ }), -/* 28 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -// bitmask flag for GameObject.renderMask -var _FLAG = 1; // 0001 - -/** - * Provides methods used for setting the visibility of a Game Object. - * Should be applied as a mixin and not used directly. - * - * @name Phaser.GameObjects.Components.Visible - * @since 3.0.0 - */ - -var Visible = { - - /** - * Private internal value. Holds the visible value. - * - * @name Phaser.GameObjects.Components.Visible#_visible - * @type {boolean} - * @private - * @default true - * @since 3.0.0 - */ - _visible: true, - - /** - * The visible state of the Game Object. - * - * An invisible Game Object will skip rendering, but will still process update logic. - * - * @name Phaser.GameObjects.Components.Visible#visible - * @type {boolean} - * @since 3.0.0 - */ - visible: { - - get: function () - { - return this._visible; - }, - - set: function (value) - { - if (value) - { - this._visible = true; - this.renderFlags |= _FLAG; - } - else - { - this._visible = false; - this.renderFlags &= ~_FLAG; - } - } - - }, - - /** - * Sets the visibility of this Game Object. - * - * An invisible Game Object will skip rendering, but will still process update logic. - * - * @method Phaser.GameObjects.Components.Visible#setVisible - * @since 3.0.0 - * - * @param {boolean} value - The visible state of the Game Object. - * - * @return {this} This Game Object instance. - */ - setVisible: function (value) - { - this.visible = value; - - return this; - } -}; - -module.exports = Visible; - - -/***/ }), -/* 29 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Wrap = __webpack_require__(7); - -/** - * Wrap an angle in degrees. - * - * Wraps the angle to a value in the range of -180 to 180. - * - * @function Phaser.Math.Angle.WrapDegrees - * @since 3.0.0 - * - * @param {number} angle - The angle to wrap, in degrees. - * - * @return {number} The wrapped angle, in degrees. - */ -var WrapDegrees = function (angle) -{ - return Wrap(angle, -180, 180); -}; - -module.exports = WrapDegrees; - - -/***/ }), -/* 30 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var MathWrap = __webpack_require__(7); - -/** - * Wrap an angle. - * - * Wraps the angle to a value in the range of -PI to PI. - * - * @function Phaser.Math.Angle.Wrap - * @since 3.0.0 - * - * @param {number} angle - The angle to wrap, in radians. - * - * @return {number} The wrapped angle, in radians. - */ -var Wrap = function (angle) -{ - return MathWrap(angle, -Math.PI, Math.PI); -}; - -module.exports = Wrap; - - -/***/ }), -/* 31 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var MATH_CONST = __webpack_require__(17); -var TransformMatrix = __webpack_require__(8); -var WrapAngle = __webpack_require__(30); -var WrapAngleDegrees = __webpack_require__(29); - -// global bitmask flag for GameObject.renderMask (used by Scale) -var _FLAG = 4; // 0100 - -/** - * Provides methods used for getting and setting the position, scale and rotation of a Game Object. - * - * @name Phaser.GameObjects.Components.Transform - * @since 3.0.0 - */ - -var Transform = { - - /** - * Private internal value. Holds the horizontal scale value. - * - * @name Phaser.GameObjects.Components.Transform#_scaleX - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - _scaleX: 1, - - /** - * Private internal value. Holds the vertical scale value. - * - * @name Phaser.GameObjects.Components.Transform#_scaleY - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - _scaleY: 1, - - /** - * Private internal value. Holds the rotation value in radians. - * - * @name Phaser.GameObjects.Components.Transform#_rotation - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - _rotation: 0, - - /** - * The x position of this Game Object. - * - * @name Phaser.GameObjects.Components.Transform#x - * @type {number} - * @default 0 - * @since 3.0.0 - */ - x: 0, - - /** - * The y position of this Game Object. - * - * @name Phaser.GameObjects.Components.Transform#y - * @type {number} - * @default 0 - * @since 3.0.0 - */ - y: 0, - - /** - * The z position of this Game Object. - * Note: Do not use this value to set the z-index, instead see the `depth` property. - * - * @name Phaser.GameObjects.Components.Transform#z - * @type {number} - * @default 0 - * @since 3.0.0 - */ - z: 0, - - /** - * The w position of this Game Object. - * - * @name Phaser.GameObjects.Components.Transform#w - * @type {number} - * @default 0 - * @since 3.0.0 - */ - w: 0, - - /** - * The horizontal scale of this Game Object. - * - * @name Phaser.GameObjects.Components.Transform#scaleX - * @type {number} - * @default 1 - * @since 3.0.0 - */ - scaleX: { - - get: function () - { - return this._scaleX; - }, - - set: function (value) - { - this._scaleX = value; - - if (this._scaleX === 0) - { - this.renderFlags &= ~_FLAG; - } - else - { - this.renderFlags |= _FLAG; - } - } - - }, - - /** - * The vertical scale of this Game Object. - * - * @name Phaser.GameObjects.Components.Transform#scaleY - * @type {number} - * @default 1 - * @since 3.0.0 - */ - scaleY: { - - get: function () - { - return this._scaleY; - }, - - set: function (value) - { - this._scaleY = value; - - if (this._scaleY === 0) - { - this.renderFlags &= ~_FLAG; - } - else - { - this.renderFlags |= _FLAG; - } - } - - }, - - /** - * The angle of this Game Object as expressed in degrees. - * - * Where 0 is to the right, 90 is down, 180 is left. - * - * If you prefer to work in radians, see the `rotation` property instead. - * - * @name Phaser.GameObjects.Components.Transform#angle - * @type {integer} - * @default 0 - * @since 3.0.0 - */ - angle: { - - get: function () - { - return WrapAngleDegrees(this._rotation * MATH_CONST.RAD_TO_DEG); - }, - - set: function (value) - { - // value is in degrees - this.rotation = WrapAngleDegrees(value) * MATH_CONST.DEG_TO_RAD; - } - }, - - /** - * The angle of this Game Object in radians. - * - * If you prefer to work in degrees, see the `angle` property instead. - * - * @name Phaser.GameObjects.Components.Transform#rotation - * @type {number} - * @default 1 - * @since 3.0.0 - */ - rotation: { - - get: function () - { - return this._rotation; - }, - - set: function (value) - { - // value is in radians - this._rotation = WrapAngle(value); - } - }, - - /** - * Sets the position of this Game Object. - * - * @method Phaser.GameObjects.Components.Transform#setPosition - * @since 3.0.0 - * - * @param {number} [x=0] - The x position of this Game Object. - * @param {number} [y=x] - The y position of this Game Object. If not set it will use the `x` value. - * @param {number} [z=0] - The z position of this Game Object. - * @param {number} [w=0] - The w position of this Game Object. - * - * @return {this} This Game Object instance. - */ - setPosition: function (x, y, z, w) - { - if (x === undefined) { x = 0; } - if (y === undefined) { y = x; } - if (z === undefined) { z = 0; } - if (w === undefined) { w = 0; } - - this.x = x; - this.y = y; - this.z = z; - this.w = w; - - return this; - }, - - /** - * Sets the position of this Game Object to be a random position within the confines of - * the given area. - * - * If no area is specified a random position between 0 x 0 and the game width x height is used instead. - * - * The position does not factor in the size of this Game Object, meaning that only the origin is - * guaranteed to be within the area. - * - * @method Phaser.GameObjects.Components.Transform#setRandomPosition - * @since 3.8.0 - * - * @param {number} [x=0] - The x position of the top-left of the random area. - * @param {number} [y=0] - The y position of the top-left of the random area. - * @param {number} [width] - The width of the random area. - * @param {number} [height] - The height of the random area. - * - * @return {this} This Game Object instance. - */ - setRandomPosition: function (x, y, width, height) - { - if (x === undefined) { x = 0; } - if (y === undefined) { y = 0; } - if (width === undefined) { width = this.scene.sys.game.config.width; } - if (height === undefined) { height = this.scene.sys.game.config.height; } - - this.x = x + (Math.random() * width); - this.y = y + (Math.random() * height); - - return this; - }, - - /** - * Sets the rotation of this Game Object. - * - * @method Phaser.GameObjects.Components.Transform#setRotation - * @since 3.0.0 - * - * @param {number} [radians=0] - The rotation of this Game Object, in radians. - * - * @return {this} This Game Object instance. - */ - setRotation: function (radians) - { - if (radians === undefined) { radians = 0; } - - this.rotation = radians; - - return this; - }, - - /** - * Sets the angle of this Game Object. - * - * @method Phaser.GameObjects.Components.Transform#setAngle - * @since 3.0.0 - * - * @param {number} [degrees=0] - The rotation of this Game Object, in degrees. - * - * @return {this} This Game Object instance. - */ - setAngle: function (degrees) - { - if (degrees === undefined) { degrees = 0; } - - this.angle = degrees; - - return this; - }, - - /** - * Sets the scale of this Game Object. - * - * @method Phaser.GameObjects.Components.Transform#setScale - * @since 3.0.0 - * - * @param {number} x - 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. - */ - setScale: function (x, y) - { - if (x === undefined) { x = 1; } - if (y === undefined) { y = x; } - - this.scaleX = x; - this.scaleY = y; - - return this; - }, - - /** - * Sets the x position of this Game Object. - * - * @method Phaser.GameObjects.Components.Transform#setX - * @since 3.0.0 - * - * @param {number} [value=0] - The x position of this Game Object. - * - * @return {this} This Game Object instance. - */ - setX: function (value) - { - if (value === undefined) { value = 0; } - - this.x = value; - - return this; - }, - - /** - * Sets the y position of this Game Object. - * - * @method Phaser.GameObjects.Components.Transform#setY - * @since 3.0.0 - * - * @param {number} [value=0] - The y position of this Game Object. - * - * @return {this} This Game Object instance. - */ - setY: function (value) - { - if (value === undefined) { value = 0; } - - this.y = value; - - return this; - }, - - /** - * Sets the z position of this Game Object. - * - * @method Phaser.GameObjects.Components.Transform#setZ - * @since 3.0.0 - * - * @param {number} [value=0] - The z position of this Game Object. - * - * @return {this} This Game Object instance. - */ - setZ: function (value) - { - if (value === undefined) { value = 0; } - - this.z = value; - - return this; - }, - - /** - * Sets the w position of this Game Object. - * - * @method Phaser.GameObjects.Components.Transform#setW - * @since 3.0.0 - * - * @param {number} [value=0] - The w position of this Game Object. - * - * @return {this} This Game Object instance. - */ - setW: function (value) - { - if (value === undefined) { value = 0; } - - this.w = value; - - return this; - }, - - /** - * Gets the local transform matrix for this Game Object. - * - * @method Phaser.GameObjects.Components.Transform#getLocalTransformMatrix - * @since 3.4.0 - * - * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object. - * - * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix. - */ - getLocalTransformMatrix: function (tempMatrix) - { - if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); } - - return tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY); - }, - - /** - * Gets the world transform matrix for this Game Object, factoring in any parent Containers. - * - * @method Phaser.GameObjects.Components.Transform#getWorldTransformMatrix - * @since 3.4.0 - * - * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object. - * - * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix. - */ - getWorldTransformMatrix: function (tempMatrix) - { - if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); } - - var parent = this.parentContainer; - - if (!parent) - { - return this.getLocalTransformMatrix(tempMatrix); - } - - var parents = []; - - while (parent) - { - parents.unshift(parent); - parent = parent.parentContainer; - } - - tempMatrix.loadIdentity(); - - var length = parents.length; - - for (var i = 0; i < length; ++i) - { - parent = parents[i]; - - tempMatrix.translate(parent.x, parent.y); - tempMatrix.rotate(parent.rotation); - tempMatrix.scale(parent.scaleX, parent.scaleY); - } - - tempMatrix.translate(this.x, this.y); - tempMatrix.rotate(this._rotation); - tempMatrix.scale(this._scaleX, this._scaleY); - - return tempMatrix; - } - -}; - -module.exports = Transform; - - -/***/ }), -/* 32 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * @typedef {object} JSONGameObject - * - * @property {string} name - The name of this Game Object. - * @property {string} type - A textual representation of this Game Object, i.e. `sprite`. - * @property {number} x - The x position of this Game Object. - * @property {number} y - The y position of this Game Object. - * @property {object} scale - The scale of this Game Object - * @property {number} scale.x - The horizontal scale of this Game Object. - * @property {number} scale.y - The vertical scale of this Game Object. - * @property {object} origin - The origin of this Game Object. - * @property {number} origin.x - The horizontal origin of this Game Object. - * @property {number} origin.y - The vertical origin of this Game Object. - * @property {boolean} flipX - The horizontally flipped state of the Game Object. - * @property {boolean} flipY - The vertically flipped state of the Game Object. - * @property {number} rotation - The angle of this Game Object in radians. - * @property {number} alpha - The alpha value of the Game Object. - * @property {boolean} visible - The visible state of the Game Object. - * @property {integer} scaleMode - The Scale Mode being used by this Game Object. - * @property {(integer|string)} blendMode - Sets the Blend Mode being used by this Game Object. - * @property {string} textureKey - The texture key of this Game Object. - * @property {string} frameKey - The frame key of this Game Object. - * @property {object} data - The data of this Game Object. - */ - -/** - * Build a JSON representation of the given Game Object. - * - * This is typically extended further by Game Object specific implementations. - * - * @method Phaser.GameObjects.Components.ToJSON - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to export as JSON. - * - * @return {JSONGameObject} A JSON representation of the Game Object. - */ -var ToJSON = function (gameObject) -{ - var out = { - name: gameObject.name, - type: gameObject.type, - x: gameObject.x, - y: gameObject.y, - depth: gameObject.depth, - scale: { - x: gameObject.scaleX, - y: gameObject.scaleY - }, - origin: { - x: gameObject.originX, - y: gameObject.originY - }, - flipX: gameObject.flipX, - flipY: gameObject.flipY, - rotation: gameObject.rotation, - alpha: gameObject.alpha, - visible: gameObject.visible, - scaleMode: gameObject.scaleMode, - blendMode: gameObject.blendMode, - textureKey: '', - frameKey: '', - data: {} - }; - - if (gameObject.texture) - { - out.textureKey = gameObject.texture.key; - out.frameKey = gameObject.frame.name; - } - - return out; -}; - -module.exports = ToJSON; - - -/***/ }), -/* 33 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * @function GetColor - * @since 3.0.0 - * @private - */ -var GetColor = function (value) -{ - return (value >> 16) + (value & 0xff00) + ((value & 0xff) << 16); -}; - -/** - * Provides methods used for setting the tint of a Game Object. - * Should be applied as a mixin and not used directly. - * - * @name Phaser.GameObjects.Components.Tint - * @webglOnly - * @since 3.0.0 - */ - -var Tint = { - - /** - * Private internal value. Holds the top-left tint value. - * - * @name Phaser.GameObjects.Components.Tint#_tintTL - * @type {number} - * @private - * @default 16777215 - * @since 3.0.0 - */ - _tintTL: 16777215, - - /** - * Private internal value. Holds the top-right tint value. - * - * @name Phaser.GameObjects.Components.Tint#_tintTR - * @type {number} - * @private - * @default 16777215 - * @since 3.0.0 - */ - _tintTR: 16777215, - - /** - * Private internal value. Holds the bottom-left tint value. - * - * @name Phaser.GameObjects.Components.Tint#_tintBL - * @type {number} - * @private - * @default 16777215 - * @since 3.0.0 - */ - _tintBL: 16777215, - - /** - * Private internal value. Holds the bottom-right tint value. - * - * @name Phaser.GameObjects.Components.Tint#_tintBR - * @type {number} - * @private - * @default 16777215 - * @since 3.0.0 - */ - _tintBR: 16777215, - - /** - * Private internal value. Holds if the Game Object is tinted or not. - * - * @name Phaser.GameObjects.Components.Tint#_isTinted - * @type {boolean} - * @private - * @default false - * @since 3.11.0 - */ - _isTinted: false, - - /** - * Fill or additive? - * - * @name Phaser.GameObjects.Components.Tint#tintFill - * @type {boolean} - * @default false - * @since 3.11.0 - */ - tintFill: false, - - /** - * Clears all tint values associated with this Game Object. - * - * Immediately sets the color values back to 0xffffff and the tint type to 'additive', - * which results in no visible change to the texture. - * - * @method Phaser.GameObjects.Components.Tint#clearTint - * @webglOnly - * @since 3.0.0 - * - * @return {this} This Game Object instance. - */ - clearTint: function () - { - this.setTint(0xffffff); - - this._isTinted = false; - - return this; - }, - - /** - * Sets an additive tint on this Game Object. - * - * The tint works by taking the pixel color values from the Game Objects texture, and then - * multiplying it by the color value of the tint. You can provide either one color value, - * in which case the whole Game Object will be tinted in that color. Or you can provide a color - * per corner. The colors are blended together across the extent of the Game Object. - * - * To modify the tint color once set, either call this method again with new values or use the - * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, - * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. - * - * To remove a tint call `clearTint`. - * - * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`. - * - * @method Phaser.GameObjects.Components.Tint#setTint - * @webglOnly - * @since 3.0.0 - * - * @param {integer} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object. - * @param {integer} [topRight] - The tint being applied to the top-right of the Game Object. - * @param {integer} [bottomLeft] - The tint being applied to the bottom-left of the Game Object. - * @param {integer} [bottomRight] - The tint being applied to the bottom-right of the Game Object. - * - * @return {this} This Game Object instance. - */ - setTint: function (topLeft, topRight, bottomLeft, bottomRight) - { - if (topLeft === undefined) { topLeft = 0xffffff; } - - if (topRight === undefined) - { - topRight = topLeft; - bottomLeft = topLeft; - bottomRight = topLeft; - } - - this._tintTL = GetColor(topLeft); - this._tintTR = GetColor(topRight); - this._tintBL = GetColor(bottomLeft); - this._tintBR = GetColor(bottomRight); - - this._isTinted = true; - - this.tintFill = false; - - return this; - }, - - /** - * Sets a fill-based tint on this Game Object. - * - * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture - * with those in the tint. You can use this for effects such as making a player flash 'white' - * if hit by something. You can provide either one color value, in which case the whole - * Game Object will be rendered in that color. Or you can provide a color per corner. The colors - * are blended together across the extent of the Game Object. - * - * To modify the tint color once set, either call this method again with new values or use the - * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, - * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. - * - * To remove a tint call `clearTint`. - * - * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`. - * - * @method Phaser.GameObjects.Components.Tint#setTintFill - * @webglOnly - * @since 3.11.0 - * - * @param {integer} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. - * @param {integer} [topRight] - The tint being applied to the top-right of the Game Object. - * @param {integer} [bottomLeft] - The tint being applied to the bottom-left of the Game Object. - * @param {integer} [bottomRight] - The tint being applied to the bottom-right of the Game Object. - * - * @return {this} This Game Object instance. - */ - setTintFill: function (topLeft, topRight, bottomLeft, bottomRight) - { - this.setTint(topLeft, topRight, bottomLeft, bottomRight); - - this.tintFill = true; - - return this; - }, - - /** - * The tint value being applied to the top-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * - * @name Phaser.GameObjects.Components.Tint#tintTopLeft - * @type {integer} - * @webglOnly - * @since 3.0.0 - */ - tintTopLeft: { - - get: function () - { - return this._tintTL; - }, - - set: function (value) - { - this._tintTL = GetColor(value); - this._isTinted = true; - } - - }, - - /** - * The tint value being applied to the top-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * - * @name Phaser.GameObjects.Components.Tint#tintTopRight - * @type {integer} - * @webglOnly - * @since 3.0.0 - */ - tintTopRight: { - - get: function () - { - return this._tintTR; - }, - - set: function (value) - { - this._tintTR = GetColor(value); - this._isTinted = true; - } - - }, - - /** - * The tint value being applied to the bottom-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * - * @name Phaser.GameObjects.Components.Tint#tintBottomLeft - * @type {integer} - * @webglOnly - * @since 3.0.0 - */ - tintBottomLeft: { - - get: function () - { - return this._tintBL; - }, - - set: function (value) - { - this._tintBL = GetColor(value); - this._isTinted = true; - } - - }, - - /** - * The tint value being applied to the bottom-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * - * @name Phaser.GameObjects.Components.Tint#tintBottomRight - * @type {integer} - * @webglOnly - * @since 3.0.0 - */ - tintBottomRight: { - - get: function () - { - return this._tintBR; - }, - - set: function (value) - { - this._tintBR = GetColor(value); - this._isTinted = true; - } - - }, - - /** - * The tint value being applied to the whole of the Game Object. - * - * @name Phaser.GameObjects.Components.Tint#tint - * @type {integer} - * @webglOnly - * @since 3.0.0 - */ - tint: { - - set: function (value) - { - this.setTint(value, value, value, value); - } - }, - - /** - * Does this Game Object have a tint applied to it or not? - * - * @name Phaser.GameObjects.Components.Tint#isTinted - * @type {boolean} - * @webglOnly - * @readOnly - * @since 3.11.0 - */ - isTinted: { - - get: function () - { - return this._isTinted; - } - - } - -}; - -module.exports = Tint; - - -/***/ }), -/* 34 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -// bitmask flag for GameObject.renderMask -var _FLAG = 8; // 1000 - -/** - * Provides methods used for getting and setting the texture of a Game Object. - * - * @name Phaser.GameObjects.Components.TextureCrop - * @since 3.0.0 - */ - -var TextureCrop = { - - /** - * The Texture this Game Object is using to render with. - * - * @name Phaser.GameObjects.Components.TextureCrop#texture - * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture} - * @since 3.0.0 - */ - texture: null, - - /** - * The Texture Frame this Game Object is using to render with. - * - * @name Phaser.GameObjects.Components.TextureCrop#frame - * @type {Phaser.Textures.Frame} - * @since 3.0.0 - */ - frame: null, - - /** - * A boolean flag indicating if this Game Object is being cropped or not. - * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off. - * Equally, calling `setCrop` with no arguments will reset the crop and disable it. - * - * @name Phaser.GameObjects.Components.TextureCrop#isCropped - * @type {boolean} - * @since 3.11.0 - */ - isCropped: false, - - /** - * Applies a crop to a texture based Game Object, such as a Sprite or Image. - * - * The crop is a rectangle that limits the area of the texture frame that is visible during rendering. - * - * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just - * changes what is shown when rendered. - * - * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left. - * - * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left - * half of it, you could call `setCrop(0, 0, 400, 600)`. - * - * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop - * an area of 200x100 when applied to a Game Object that had a scale factor of 2. - * - * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument. - * - * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`. - * - * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow - * the renderer to skip several internal calculations. - * - * @method Phaser.GameObjects.Components.TextureCrop#setCrop - * @since 3.11.0 - * - * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored. - * @param {number} [y] - The y coordinate to start the crop from. - * @param {number} [width] - The width of the crop rectangle in pixels. - * @param {number} [height] - The height of the crop rectangle in pixels. - * - * @return {this} This Game Object instance. - */ - setCrop: function (x, y, width, height) - { - if (x === undefined) - { - this.isCropped = false; - } - else if (this.frame) - { - if (typeof x === 'number') - { - this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY); - } - else - { - var rect = x; - - this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY); - } - - this.isCropped = true; - } - - return this; - }, - - /** - * 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. - * - * @method Phaser.GameObjects.Components.TextureCrop#setTexture - * @since 3.0.0 - * - * @param {string} key - The key of the texture to be used, as stored in the Texture Manager. - * @param {(string|integer)} [frame] - The name or index of the frame within the Texture. - * - * @return {this} This Game Object instance. - */ - setTexture: function (key, frame) - { - this.texture = this.scene.sys.textures.get(key); - - return this.setFrame(frame); - }, - - /** - * Sets the frame this Game Object will use to render with. - * - * The Frame has to belong to the current Texture being used. - * - * It can be either a string or an index. - * - * 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. - * - * @method Phaser.GameObjects.Components.TextureCrop#setFrame - * @since 3.0.0 - * - * @param {(string|integer)} frame - The name or index of the frame within the Texture. - * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object? - * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object? - * - * @return {this} This Game Object instance. - */ - setFrame: function (frame, updateSize, updateOrigin) - { - if (updateSize === undefined) { updateSize = true; } - if (updateOrigin === undefined) { updateOrigin = true; } - - this.frame = this.texture.get(frame); - - if (!this.frame.cutWidth || !this.frame.cutHeight) - { - this.renderFlags &= ~_FLAG; - } - else - { - this.renderFlags |= _FLAG; - } - - if (this._sizeComponent && updateSize) - { - this.setSizeToFrame(); - } - - if (this._originComponent && updateOrigin) - { - if (this.frame.customPivot) - { - this.setOrigin(this.frame.pivotX, this.frame.pivotY); - } - else - { - this.updateDisplayOrigin(); - } - } - - if (this.isCropped) - { - this.frame.updateCropUVs(this._crop, this.flipX, this.flipY); - } - - return this; - }, - - /** - * Internal method that returns a blank, well-formed crop object for use by a Game Object. - * - * @method Phaser.GameObjects.Components.TextureCrop#resetCropObject - * @private - * @since 3.12.0 - * - * @return {object} The crop object. - */ - resetCropObject: function () - { - return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 }; - } - -}; - -module.exports = TextureCrop; - - -/***/ }), -/* 35 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -// bitmask flag for GameObject.renderMask -var _FLAG = 8; // 1000 - -/** - * Provides methods used for getting and setting the texture of a Game Object. - * - * @name Phaser.GameObjects.Components.Texture - * @since 3.0.0 - */ - -var Texture = { - - /** - * The Texture this Game Object is using to render with. - * - * @name Phaser.GameObjects.Components.Texture#texture - * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture} - * @since 3.0.0 - */ - texture: null, - - /** - * The Texture Frame this Game Object is using to render with. - * - * @name Phaser.GameObjects.Components.Texture#frame - * @type {Phaser.Textures.Frame} - * @since 3.0.0 - */ - frame: null, - - /** - * Internal flag. Not to be set by this Game Object. - * - * @name Phaser.GameObjects.Components.Texture#isCropped - * @type {boolean} - * @private - * @since 3.11.0 - */ - isCropped: false, - - /** - * 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. - * - * @method Phaser.GameObjects.Components.Texture#setTexture - * @since 3.0.0 - * - * @param {string} key - The key of the texture to be used, as stored in the Texture Manager. - * @param {(string|integer)} [frame] - The name or index of the frame within the Texture. - * - * @return {this} This Game Object instance. - */ - setTexture: function (key, frame) - { - this.texture = this.scene.sys.textures.get(key); - - return this.setFrame(frame); - }, - - /** - * Sets the frame this Game Object will use to render with. - * - * The Frame has to belong to the current Texture being used. - * - * It can be either a string or an index. - * - * 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. - * - * @method Phaser.GameObjects.Components.Texture#setFrame - * @since 3.0.0 - * - * @param {(string|integer)} frame - The name or index of the frame within the Texture. - * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object? - * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object? - * - * @return {this} This Game Object instance. - */ - setFrame: function (frame, updateSize, updateOrigin) - { - if (updateSize === undefined) { updateSize = true; } - if (updateOrigin === undefined) { updateOrigin = true; } - - this.frame = this.texture.get(frame); - - if (!this.frame.cutWidth || !this.frame.cutHeight) - { - this.renderFlags &= ~_FLAG; - } - else - { - this.renderFlags |= _FLAG; - } - - if (this._sizeComponent && updateSize) - { - this.setSizeToFrame(); - } - - if (this._originComponent && updateOrigin) - { - if (this.frame.customPivot) - { - this.setOrigin(this.frame.pivotX, this.frame.pivotY); - } - else - { - this.updateDisplayOrigin(); - } - } - - return this; - } - -}; - -module.exports = Texture; - - -/***/ }), -/* 36 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * Provides methods used for getting and setting the size of a Game Object. - * - * @name Phaser.GameObjects.Components.Size - * @since 3.0.0 - */ - -var Size = { - - /** - * A property indicating that a Game Object has this component. - * - * @name Phaser.GameObjects.Components.Size#_sizeComponent - * @type {boolean} - * @private - * @default true - * @since 3.2.0 - */ - _sizeComponent: true, - - /** - * The native (un-scaled) width of this Game Object. - * - * Changing this value will not change the size that the Game Object is rendered in-game. - * For that you need to either set the scale of the Game Object (`setScale`) or use - * the `displayWidth` property. - * - * @name Phaser.GameObjects.Components.Size#width - * @type {number} - * @since 3.0.0 - */ - width: 0, - - /** - * The native (un-scaled) height of this Game Object. - * - * Changing this value will not change the size that the Game Object is rendered in-game. - * For that you need to either set the scale of the Game Object (`setScale`) or use - * the `displayHeight` property. - * - * @name Phaser.GameObjects.Components.Size#height - * @type {number} - * @since 3.0.0 - */ - height: 0, - - /** - * The displayed width of this Game Object. - * - * This value takes into account the scale factor. - * - * Setting this value will adjust the Game Object's scale property. - * - * @name Phaser.GameObjects.Components.Size#displayWidth - * @type {number} - * @since 3.0.0 - */ - displayWidth: { - - get: function () - { - return this.scaleX * this.frame.realWidth; - }, - - set: function (value) - { - this.scaleX = value / this.frame.realWidth; - } - - }, - - /** - * The displayed height of this Game Object. - * - * This value takes into account the scale factor. - * - * Setting this value will adjust the Game Object's scale property. - * - * @name Phaser.GameObjects.Components.Size#displayHeight - * @type {number} - * @since 3.0.0 - */ - displayHeight: { - - get: function () - { - return this.scaleY * this.frame.realHeight; - }, - - set: function (value) - { - this.scaleY = value / this.frame.realHeight; - } - - }, - - /** - * Sets the size of this Game Object to be that of the given Frame. - * - * This will not change the size that the Game Object is rendered in-game. - * For that you need to either set the scale of the Game Object (`setScale`) or call the - * `setDisplaySize` method, which is the same thing as changing the scale but allows you - * to do so by giving pixel values. - * - * If you have enabled this Game Object for input, changing the size will _not_ change the - * size of the hit area. To do this you should adjust the `input.hitArea` object directly. - * - * @method Phaser.GameObjects.Components.Size#setSizeToFrame - * @since 3.0.0 - * - * @param {Phaser.Textures.Frame} frame - The frame to base the size of this Game Object on. - * - * @return {this} This Game Object instance. - */ - setSizeToFrame: function (frame) - { - if (frame === undefined) { frame = this.frame; } - - this.width = frame.realWidth; - this.height = frame.realHeight; - - return this; - }, - - /** - * Sets the internal size of this Game Object, as used for frame or physics body creation. - * - * This will not change the size that the Game Object is rendered in-game. - * For that you need to either set the scale of the Game Object (`setScale`) or call the - * `setDisplaySize` method, which is the same thing as changing the scale but allows you - * to do so by giving pixel values. - * - * If you have enabled this Game Object for input, changing the size will _not_ change the - * size of the hit area. To do this you should adjust the `input.hitArea` object directly. - * - * @method Phaser.GameObjects.Components.Size#setSize - * @since 3.0.0 - * - * @param {number} width - The width of this Game Object. - * @param {number} height - The height of this Game Object. - * - * @return {this} This Game Object instance. - */ - setSize: function (width, height) - { - this.width = width; - this.height = height; - - return this; - }, - - /** - * Sets the display size of this Game Object. - * - * Calling this will adjust the scale. - * - * @method Phaser.GameObjects.Components.Size#setDisplaySize - * @since 3.0.0 - * - * @param {number} width - The width of this Game Object. - * @param {number} height - The height of this Game Object. - * - * @return {this} This Game Object instance. - */ - setDisplaySize: function (width, height) - { - this.displayWidth = width; - this.displayHeight = height; - - return this; - } - -}; - -module.exports = Size; - - /***/ }), /* 37 */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * Provides methods used for getting and setting the Scroll Factor of a Game Object. - * - * @name Phaser.GameObjects.Components.ScrollFactor - * @since 3.0.0 + * @namespace Phaser.GameObjects.Events */ -var ScrollFactor = { +module.exports = { - /** - * 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. - * - * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorX - * @type {number} - * @default 1 - * @since 3.0.0 - */ - scrollFactorX: 1, - - /** - * 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. - * - * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorY - * @type {number} - * @default 1 - * @since 3.0.0 - */ - scrollFactorY: 1, - - /** - * 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. - * - * @method Phaser.GameObjects.Components.ScrollFactor#setScrollFactor - * @since 3.0.0 - * - * @param {number} x - The horizontal scroll factor of this Game Object. - * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value. - * - * @return {this} This Game Object instance. - */ - setScrollFactor: function (x, y) - { - if (y === undefined) { y = x; } - - this.scrollFactorX = x; - this.scrollFactorY = y; - - return this; - } + ADDED_TO_SCENE: __webpack_require__(165), + DESTROY: __webpack_require__(166), + REMOVED_FROM_SCENE: __webpack_require__(167), + VIDEO_COMPLETE: __webpack_require__(168), + VIDEO_CREATED: __webpack_require__(169), + VIDEO_ERROR: __webpack_require__(170), + VIDEO_LOOP: __webpack_require__(171), + VIDEO_PLAY: __webpack_require__(172), + VIDEO_SEEKED: __webpack_require__(173), + VIDEO_SEEKING: __webpack_require__(174), + VIDEO_STOP: __webpack_require__(175), + VIDEO_TIMEOUT: __webpack_require__(176), + VIDEO_UNLOCKED: __webpack_require__(177) }; -module.exports = ScrollFactor; - /***/ }), /* 38 */ @@ -10415,196 +9286,117 @@ module.exports = ScrollFactor; /** * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ScaleModes = __webpack_require__(16); - /** - * Provides methods used for getting and setting the scale of a Game Object. - * - * @name Phaser.GameObjects.Components.ScaleMode - * @since 3.0.0 + * @namespace Phaser.Animations.Events */ -var ScaleMode = { +module.exports = { - _scaleMode: ScaleModes.DEFAULT, - - /** - * The Scale Mode being used by this Game Object. - * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. - * - * @name Phaser.GameObjects.Components.ScaleMode#scaleMode - * @type {Phaser.ScaleModes} - * @since 3.0.0 - */ - scaleMode: { - - get: function () - { - return this._scaleMode; - }, - - set: function (value) - { - if (value === ScaleModes.LINEAR || value === ScaleModes.NEAREST) - { - this._scaleMode = value; - } - } - - }, - - /** - * Sets the Scale Mode being used by this Game Object. - * Can be either `ScaleModes.LINEAR` or `ScaleModes.NEAREST`. - * - * @method Phaser.GameObjects.Components.ScaleMode#setScaleMode - * @since 3.0.0 - * - * @param {Phaser.ScaleModes} value - The Scale Mode to be used by this Game Object. - * - * @return {this} This Game Object instance. - */ - setScaleMode: function (value) - { - this.scaleMode = value; - - return this; - } + ADD_ANIMATION: __webpack_require__(184), + ANIMATION_COMPLETE: __webpack_require__(185), + ANIMATION_REPEAT: __webpack_require__(186), + ANIMATION_RESTART: __webpack_require__(187), + ANIMATION_START: __webpack_require__(188), + PAUSE_ALL: __webpack_require__(189), + REMOVE_ANIMATION: __webpack_require__(190), + RESUME_ALL: __webpack_require__(191), + SPRITE_ANIMATION_COMPLETE: __webpack_require__(192), + SPRITE_ANIMATION_KEY_COMPLETE: __webpack_require__(193), + SPRITE_ANIMATION_KEY_REPEAT: __webpack_require__(194), + SPRITE_ANIMATION_KEY_RESTART: __webpack_require__(195), + SPRITE_ANIMATION_KEY_START: __webpack_require__(196), + SPRITE_ANIMATION_KEY_UPDATE: __webpack_require__(197), + SPRITE_ANIMATION_REPEAT: __webpack_require__(198), + SPRITE_ANIMATION_RESTART: __webpack_require__(199), + SPRITE_ANIMATION_START: __webpack_require__(200), + SPRITE_ANIMATION_UPDATE: __webpack_require__(201) }; -module.exports = ScaleMode; - /***/ }), /* 39 */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var Perimeter = __webpack_require__(40); +var Point = __webpack_require__(5); + /** - * Provides methods used for setting the WebGL rendering pipeline of a Game Object. + * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter. + * + * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is. + * + * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side. * - * @name Phaser.GameObjects.Components.Pipeline - * @webglOnly + * @function Phaser.Geom.Rectangle.GetPoint * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [out,$return] + * + * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle to get the perimeter point from. + * @param {number} position - The normalized distance into the Rectangle's perimeter to return. + * @param {(Phaser.Geom.Point|object)} [out] - An object to update with the `x` and `y` coordinates of the point. + * + * @return {Phaser.Geom.Point} The updated `output` object, or a new Point if no `output` object was given. */ +var GetPoint = function (rectangle, position, out) +{ + if (out === undefined) { out = new Point(); } -var Pipeline = { - - /** - * The initial WebGL pipeline of this Game Object. - * - * @name Phaser.GameObjects.Components.Pipeline#defaultPipeline - * @type {Phaser.Renderer.WebGL.WebGLPipeline} - * @default null - * @webglOnly - * @since 3.0.0 - */ - defaultPipeline: null, - - /** - * The current WebGL pipeline of this Game Object. - * - * @name Phaser.GameObjects.Components.Pipeline#pipeline - * @type {Phaser.Renderer.WebGL.WebGLPipeline} - * @default null - * @webglOnly - * @since 3.0.0 - */ - pipeline: null, - - /** - * Sets the initial WebGL Pipeline of this Game Object. - * This should only be called during the instantiation of the Game Object. - * - * @method Phaser.GameObjects.Components.Pipeline#initPipeline - * @webglOnly - * @since 3.0.0 - * - * @param {string} pipelineName - The name of the pipeline to set on this Game Object. - * - * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. - */ - initPipeline: function (pipelineName) + if (position <= 0 || position >= 1) { - var renderer = this.scene.sys.game.renderer; + out.x = rectangle.x; + out.y = rectangle.y; - if (renderer && renderer.gl && renderer.hasPipeline(pipelineName)) - { - this.defaultPipeline = renderer.getPipeline(pipelineName); - this.pipeline = this.defaultPipeline; - - return true; - } - - return false; - }, - - /** - * Sets the active WebGL Pipeline of this Game Object. - * - * @method Phaser.GameObjects.Components.Pipeline#setPipeline - * @webglOnly - * @since 3.0.0 - * - * @param {string} pipelineName - The name of the pipeline to set on this Game Object. - * - * @return {this} This Game Object instance. - */ - setPipeline: function (pipelineName) - { - var renderer = this.scene.sys.game.renderer; - - if (renderer && renderer.gl && renderer.hasPipeline(pipelineName)) - { - this.pipeline = renderer.getPipeline(pipelineName); - } - - return this; - }, - - /** - * Resets the WebGL Pipeline of this Game Object back to the default it was created with. - * - * @method Phaser.GameObjects.Components.Pipeline#resetPipeline - * @webglOnly - * @since 3.0.0 - * - * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. - */ - resetPipeline: function () - { - this.pipeline = this.defaultPipeline; - - return (this.pipeline !== null); - }, - - /** - * Gets the name of the WebGL Pipeline this Game Object is currently using. - * - * @method Phaser.GameObjects.Components.Pipeline#getPipelineName - * @webglOnly - * @since 3.0.0 - * - * @return {string} The string-based name of the pipeline being used by this Game Object. - */ - getPipelineName: function () - { - return this.pipeline.name; + return out; } + var p = Perimeter(rectangle) * position; + + if (position > 0.5) + { + p -= (rectangle.width + rectangle.height); + + if (p <= rectangle.width) + { + // Face 3 + out.x = rectangle.right - p; + out.y = rectangle.bottom; + } + else + { + // Face 4 + out.x = rectangle.x; + out.y = rectangle.bottom - (p - rectangle.width); + } + } + else if (p <= rectangle.width) + { + // Face 1 + out.x = rectangle.x + p; + out.y = rectangle.y; + } + else + { + // Face 2 + out.x = rectangle.right; + out.y = rectangle.y + (p - rectangle.width); + } + + return out; }; -module.exports = Pipeline; +module.exports = GetPoint; /***/ }), @@ -10613,201 +9405,26 @@ module.exports = Pipeline; /** * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** - * Provides methods used for getting and setting the origin of a Game Object. - * Values are normalized, given in the range 0 to 1. - * Display values contain the calculated pixel values. - * Should be applied as a mixin and not used directly. + * Calculates the perimeter of a Rectangle. * - * @name Phaser.GameObjects.Components.Origin + * @function Phaser.Geom.Rectangle.Perimeter * @since 3.0.0 + * + * @param {Phaser.Geom.Rectangle} rect - The Rectangle to use. + * + * @return {number} The perimeter of the Rectangle, equal to `(width * 2) + (height * 2)`. */ - -var Origin = { - - /** - * A property indicating that a Game Object has this component. - * - * @name Phaser.GameObjects.Components.Origin#_originComponent - * @type {boolean} - * @private - * @default true - * @since 3.2.0 - */ - _originComponent: true, - - /** - * The horizontal 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 left of the Game Object. - * - * @name Phaser.GameObjects.Components.Origin#originX - * @type {number} - * @default 0.5 - * @since 3.0.0 - */ - originX: 0.5, - - /** - * 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. - * - * @name Phaser.GameObjects.Components.Origin#originY - * @type {number} - * @default 0.5 - * @since 3.0.0 - */ - originY: 0.5, - - // private + read only - _displayOriginX: 0, - _displayOriginY: 0, - - /** - * The horizontal display origin of this Game Object. - * The origin is a normalized value between 0 and 1. - * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. - * - * @name Phaser.GameObjects.Components.Origin#displayOriginX - * @type {number} - * @since 3.0.0 - */ - displayOriginX: { - - get: function () - { - return this._displayOriginX; - }, - - set: function (value) - { - this._displayOriginX = value; - this.originX = value / this.width; - } - - }, - - /** - * The vertical display origin of this Game Object. - * The origin is a normalized value between 0 and 1. - * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. - * - * @name Phaser.GameObjects.Components.Origin#displayOriginY - * @type {number} - * @since 3.0.0 - */ - displayOriginY: { - - get: function () - { - return this._displayOriginY; - }, - - set: function (value) - { - this._displayOriginY = value; - this.originY = value / this.height; - } - - }, - - /** - * Sets the origin of this Game Object. - * - * The values are given in the range 0 to 1. - * - * @method Phaser.GameObjects.Components.Origin#setOrigin - * @since 3.0.0 - * - * @param {number} [x=0.5] - The horizontal origin value. - * @param {number} [y=x] - The vertical origin value. If not defined it will be set to the value of `x`. - * - * @return {this} This Game Object instance. - */ - setOrigin: function (x, y) - { - if (x === undefined) { x = 0.5; } - if (y === undefined) { y = x; } - - this.originX = x; - this.originY = y; - - return this.updateDisplayOrigin(); - }, - - /** - * Sets the origin of this Game Object based on the Pivot values in its Frame. - * - * @method Phaser.GameObjects.Components.Origin#setOriginFromFrame - * @since 3.0.0 - * - * @return {this} This Game Object instance. - */ - setOriginFromFrame: function () - { - if (!this.frame || !this.frame.customPivot) - { - return this.setOrigin(); - } - else - { - this.originX = this.frame.pivotX; - this.originY = this.frame.pivotY; - } - - return this.updateDisplayOrigin(); - }, - - /** - * Sets the display origin of this Game Object. - * The difference between this and setting the origin is that you can use pixel values for setting the display origin. - * - * @method Phaser.GameObjects.Components.Origin#setDisplayOrigin - * @since 3.0.0 - * - * @param {number} [x=0] - The horizontal display origin value. - * @param {number} [y=x] - The vertical display origin value. If not defined it will be set to the value of `x`. - * - * @return {this} This Game Object instance. - */ - setDisplayOrigin: function (x, y) - { - if (x === undefined) { x = 0; } - if (y === undefined) { y = x; } - - this.displayOriginX = x; - this.displayOriginY = y; - - return this; - }, - - /** - * Updates the Display Origin cached values internally stored on this Game Object. - * You don't usually call this directly, but it is exposed for edge-cases where you may. - * - * @method Phaser.GameObjects.Components.Origin#updateDisplayOrigin - * @since 3.0.0 - * - * @return {this} This Game Object instance. - */ - updateDisplayOrigin: function () - { - this._displayOriginX = Math.round(this.originX * this.width); - this._displayOriginY = Math.round(this.originY * this.height); - - return this; - } - +var Perimeter = function (rect) +{ + return 2 * (rect.width + rect.height); }; -module.exports = Origin; +module.exports = Perimeter; /***/ }), @@ -10816,399 +9433,1045 @@ module.exports = Origin; /** * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(0); +var MATH_CONST = __webpack_require__(2); +var Vector2 = __webpack_require__(1); /** * @classdesc - * [description] + * A Matrix used for display transformations for rendering. * - * @class GeometryMask - * @memberOf Phaser.Display.Masks + * It is represented like so: + * + * ``` + * | a | c | tx | + * | b | d | ty | + * | 0 | 0 | 1 | + * ``` + * + * @class TransformMatrix + * @memberof Phaser.GameObjects.Components * @constructor * @since 3.0.0 * - * @param {Phaser.Scene} scene - [description] - * @param {Phaser.GameObjects.Graphics} graphicsGeometry - [description] + * @param {number} [a=1] - The Scale X value. + * @param {number} [b=0] - The Skew Y value. + * @param {number} [c=0] - The Skew X value. + * @param {number} [d=1] - The Scale Y value. + * @param {number} [tx=0] - The Translate X value. + * @param {number} [ty=0] - The Translate Y value. */ -var GeometryMask = new Class({ +var TransformMatrix = new Class({ initialize: - function GeometryMask (scene, graphicsGeometry) + function TransformMatrix (a, b, c, d, tx, ty) { + if (a === undefined) { a = 1; } + if (b === undefined) { b = 0; } + if (c === undefined) { c = 0; } + if (d === undefined) { d = 1; } + if (tx === undefined) { tx = 0; } + if (ty === undefined) { ty = 0; } + /** - * [description] + * The matrix values. * - * @name Phaser.Display.Masks.GeometryMask#geometryMask - * @type {Phaser.GameObjects.Graphics} + * @name Phaser.GameObjects.Components.TransformMatrix#matrix + * @type {Float32Array} * @since 3.0.0 */ - this.geometryMask = graphicsGeometry; + this.matrix = new Float32Array([ a, b, c, d, tx, ty, 0, 0, 1 ]); + + /** + * The decomposed matrix. + * + * @name Phaser.GameObjects.Components.TransformMatrix#decomposedMatrix + * @type {object} + * @since 3.0.0 + */ + this.decomposedMatrix = { + translateX: 0, + translateY: 0, + scaleX: 1, + scaleY: 1, + rotation: 0 + }; }, /** - * [description] + * The Scale X value. * - * @method Phaser.Display.Masks.GeometryMask#setShape + * @name Phaser.GameObjects.Components.TransformMatrix#a + * @type {number} + * @since 3.4.0 + */ + a: { + + get: function () + { + return this.matrix[0]; + }, + + set: function (value) + { + this.matrix[0] = value; + } + + }, + + /** + * The Skew Y value. + * + * @name Phaser.GameObjects.Components.TransformMatrix#b + * @type {number} + * @since 3.4.0 + */ + b: { + + get: function () + { + return this.matrix[1]; + }, + + set: function (value) + { + this.matrix[1] = value; + } + + }, + + /** + * The Skew X value. + * + * @name Phaser.GameObjects.Components.TransformMatrix#c + * @type {number} + * @since 3.4.0 + */ + c: { + + get: function () + { + return this.matrix[2]; + }, + + set: function (value) + { + this.matrix[2] = value; + } + + }, + + /** + * The Scale Y value. + * + * @name Phaser.GameObjects.Components.TransformMatrix#d + * @type {number} + * @since 3.4.0 + */ + d: { + + get: function () + { + return this.matrix[3]; + }, + + set: function (value) + { + this.matrix[3] = value; + } + + }, + + /** + * The Translate X value. + * + * @name Phaser.GameObjects.Components.TransformMatrix#e + * @type {number} + * @since 3.11.0 + */ + e: { + + get: function () + { + return this.matrix[4]; + }, + + set: function (value) + { + this.matrix[4] = value; + } + + }, + + /** + * The Translate Y value. + * + * @name Phaser.GameObjects.Components.TransformMatrix#f + * @type {number} + * @since 3.11.0 + */ + f: { + + get: function () + { + return this.matrix[5]; + }, + + set: function (value) + { + this.matrix[5] = value; + } + + }, + + /** + * The Translate X value. + * + * @name Phaser.GameObjects.Components.TransformMatrix#tx + * @type {number} + * @since 3.4.0 + */ + tx: { + + get: function () + { + return this.matrix[4]; + }, + + set: function (value) + { + this.matrix[4] = value; + } + + }, + + /** + * The Translate Y value. + * + * @name Phaser.GameObjects.Components.TransformMatrix#ty + * @type {number} + * @since 3.4.0 + */ + ty: { + + get: function () + { + return this.matrix[5]; + }, + + set: function (value) + { + this.matrix[5] = value; + } + + }, + + /** + * The rotation of the Matrix. Value is in radians. + * + * @name Phaser.GameObjects.Components.TransformMatrix#rotation + * @type {number} + * @readonly + * @since 3.4.0 + */ + rotation: { + + get: function () + { + return Math.acos(this.a / this.scaleX) * ((Math.atan(-this.c / this.a) < 0) ? -1 : 1); + } + + }, + + /** + * The rotation of the Matrix, normalized to be within the Phaser right-handed + * clockwise rotation space. Value is in radians. + * + * @name Phaser.GameObjects.Components.TransformMatrix#rotationNormalized + * @type {number} + * @readonly + * @since 3.19.0 + */ + rotationNormalized: { + + get: function () + { + var matrix = this.matrix; + + var a = matrix[0]; + var b = matrix[1]; + var c = matrix[2]; + var d = matrix[3]; + + if (a || b) + { + // var r = Math.sqrt(a * a + b * b); + + return (b > 0) ? Math.acos(a / this.scaleX) : -Math.acos(a / this.scaleX); + } + else if (c || d) + { + // var s = Math.sqrt(c * c + d * d); + + return MATH_CONST.TAU - ((d > 0) ? Math.acos(-c / this.scaleY) : -Math.acos(c / this.scaleY)); + } + else + { + return 0; + } + } + + }, + + /** + * The decomposed horizontal scale of the Matrix. This value is always positive. + * + * @name Phaser.GameObjects.Components.TransformMatrix#scaleX + * @type {number} + * @readonly + * @since 3.4.0 + */ + scaleX: { + + get: function () + { + return Math.sqrt((this.a * this.a) + (this.b * this.b)); + } + + }, + + /** + * The decomposed vertical scale of the Matrix. This value is always positive. + * + * @name Phaser.GameObjects.Components.TransformMatrix#scaleY + * @type {number} + * @readonly + * @since 3.4.0 + */ + scaleY: { + + get: function () + { + return Math.sqrt((this.c * this.c) + (this.d * this.d)); + } + + }, + + /** + * Reset the Matrix to an identity matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#loadIdentity * @since 3.0.0 * - * @param {Phaser.GameObjects.Graphics} graphicsGeometry - [description] + * @return {this} This TransformMatrix. */ - setShape: function (graphicsGeometry) + loadIdentity: function () { - this.geometryMask = graphicsGeometry; + var matrix = this.matrix; + + matrix[0] = 1; + matrix[1] = 0; + matrix[2] = 0; + matrix[3] = 1; + matrix[4] = 0; + matrix[5] = 0; + + return this; }, /** - * [description] + * Translate the Matrix. * - * @method Phaser.Display.Masks.GeometryMask#preRenderWebGL + * @method Phaser.GameObjects.Components.TransformMatrix#translate * @since 3.0.0 * - * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - [description] - * @param {Phaser.GameObjects.GameObject} mask - [description] - * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {number} x - The horizontal translation value. + * @param {number} y - The vertical translation value. + * + * @return {this} This TransformMatrix. */ - preRenderWebGL: function (renderer, mask, camera) + translate: function (x, y) { - var gl = renderer.gl; - var geometryMask = this.geometryMask; + var matrix = this.matrix; - // Force flushing before drawing to stencil buffer - renderer.flush(); + matrix[4] = matrix[0] * x + matrix[2] * y + matrix[4]; + matrix[5] = matrix[1] * x + matrix[3] * y + matrix[5]; - // Enable and setup GL state to write to stencil buffer - gl.enable(gl.STENCIL_TEST); - gl.clear(gl.STENCIL_BUFFER_BIT); - gl.colorMask(false, false, false, false); - gl.stencilFunc(gl.NOTEQUAL, 1, 1); - gl.stencilOp(gl.REPLACE, gl.REPLACE, gl.REPLACE); - - // Write stencil buffer - geometryMask.renderWebGL(renderer, geometryMask, 0.0, camera); - renderer.flush(); - - // Use stencil buffer to affect next rendering object - gl.colorMask(true, true, true, true); - gl.stencilFunc(gl.EQUAL, 1, 1); - gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP); + return this; }, /** - * [description] + * Scale the Matrix. * - * @method Phaser.Display.Masks.GeometryMask#postRenderWebGL + * @method Phaser.GameObjects.Components.TransformMatrix#scale * @since 3.0.0 * - * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - [description] + * @param {number} x - The horizontal scale value. + * @param {number} y - The vertical scale value. + * + * @return {this} This TransformMatrix. */ - postRenderWebGL: function (renderer) + scale: function (x, y) { - var gl = renderer.gl; + var matrix = this.matrix; - // Force flush before disabling stencil test - renderer.flush(); - gl.disable(gl.STENCIL_TEST); + matrix[0] *= x; + matrix[1] *= x; + matrix[2] *= y; + matrix[3] *= y; + + return this; }, /** - * [description] + * Rotate the Matrix. * - * @method Phaser.Display.Masks.GeometryMask#preRenderCanvas + * @method Phaser.GameObjects.Components.TransformMatrix#rotate * @since 3.0.0 * - * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - [description] - * @param {Phaser.GameObjects.GameObject} mask - [description] - * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {number} angle - The angle of rotation in radians. + * + * @return {this} This TransformMatrix. */ - preRenderCanvas: function (renderer, mask, camera) + rotate: function (angle) { - var geometryMask = this.geometryMask; + var sin = Math.sin(angle); + var cos = Math.cos(angle); - renderer.currentContext.save(); + var matrix = this.matrix; - geometryMask.renderCanvas(renderer, geometryMask, 0, camera, null, null, true); + var a = matrix[0]; + var b = matrix[1]; + var c = matrix[2]; + var d = matrix[3]; - renderer.currentContext.clip(); + matrix[0] = a * cos + c * sin; + matrix[1] = b * cos + d * sin; + matrix[2] = a * -sin + c * cos; + matrix[3] = b * -sin + d * cos; + + return this; }, /** - * [description] - * - * @method Phaser.Display.Masks.GeometryMask#postRenderCanvas - * @since 3.0.0 - * - * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - [description] - */ - postRenderCanvas: function (renderer) - { - renderer.currentContext.restore(); - }, - - /** - * Destroys this GeometryMask and nulls any references it holds. + * Multiply this Matrix by the given Matrix. * - * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it, - * so be sure to call `clearMask` on any Game Object using it, before destroying it. + * If an `out` Matrix is given then the results will be stored in it. + * If it is not given, this matrix will be updated in place instead. + * Use an `out` Matrix if you do not wish to mutate this matrix. * - * @method Phaser.Display.Masks.GeometryMask#destroy - * @since 3.7.0 + * @method Phaser.GameObjects.Components.TransformMatrix#multiply + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by. + * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in. + * + * @return {(this|Phaser.GameObjects.Components.TransformMatrix)} Either this TransformMatrix, or the `out` Matrix, if given in the arguments. + */ + multiply: function (rhs, out) + { + var matrix = this.matrix; + var source = rhs.matrix; + + var localA = matrix[0]; + var localB = matrix[1]; + var localC = matrix[2]; + var localD = matrix[3]; + var localE = matrix[4]; + var localF = matrix[5]; + + var sourceA = source[0]; + var sourceB = source[1]; + var sourceC = source[2]; + var sourceD = source[3]; + var sourceE = source[4]; + var sourceF = source[5]; + + var destinationMatrix = (out === undefined) ? this : out; + + destinationMatrix.a = (sourceA * localA) + (sourceB * localC); + destinationMatrix.b = (sourceA * localB) + (sourceB * localD); + destinationMatrix.c = (sourceC * localA) + (sourceD * localC); + destinationMatrix.d = (sourceC * localB) + (sourceD * localD); + destinationMatrix.e = (sourceE * localA) + (sourceF * localC) + localE; + destinationMatrix.f = (sourceE * localB) + (sourceF * localD) + localF; + + return destinationMatrix; + }, + + /** + * Multiply this Matrix by the matrix given, including the offset. + * + * The offsetX is added to the tx value: `offsetX * a + offsetY * c + tx`. + * The offsetY is added to the ty value: `offsetY * b + offsetY * d + ty`. + * + * @method Phaser.GameObjects.Components.TransformMatrix#multiplyWithOffset + * @since 3.11.0 + * + * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from. + * @param {number} offsetX - Horizontal offset to factor in to the multiplication. + * @param {number} offsetY - Vertical offset to factor in to the multiplication. + * + * @return {this} This TransformMatrix. + */ + multiplyWithOffset: function (src, offsetX, offsetY) + { + var matrix = this.matrix; + var otherMatrix = src.matrix; + + var a0 = matrix[0]; + var b0 = matrix[1]; + var c0 = matrix[2]; + var d0 = matrix[3]; + var tx0 = matrix[4]; + var ty0 = matrix[5]; + + var pse = offsetX * a0 + offsetY * c0 + tx0; + var psf = offsetX * b0 + offsetY * d0 + ty0; + + var a1 = otherMatrix[0]; + var b1 = otherMatrix[1]; + var c1 = otherMatrix[2]; + var d1 = otherMatrix[3]; + var tx1 = otherMatrix[4]; + var ty1 = otherMatrix[5]; + + matrix[0] = a1 * a0 + b1 * c0; + matrix[1] = a1 * b0 + b1 * d0; + matrix[2] = c1 * a0 + d1 * c0; + matrix[3] = c1 * b0 + d1 * d0; + matrix[4] = tx1 * a0 + ty1 * c0 + pse; + matrix[5] = tx1 * b0 + ty1 * d0 + psf; + + return this; + }, + + /** + * Transform the Matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#transform + * @since 3.0.0 + * + * @param {number} a - The Scale X value. + * @param {number} b - The Shear Y value. + * @param {number} c - The Shear X value. + * @param {number} d - The Scale Y value. + * @param {number} tx - The Translate X value. + * @param {number} ty - The Translate Y value. + * + * @return {this} This TransformMatrix. + */ + transform: function (a, b, c, d, tx, ty) + { + var matrix = this.matrix; + + var a0 = matrix[0]; + var b0 = matrix[1]; + var c0 = matrix[2]; + var d0 = matrix[3]; + var tx0 = matrix[4]; + var ty0 = matrix[5]; + + matrix[0] = a * a0 + b * c0; + matrix[1] = a * b0 + b * d0; + matrix[2] = c * a0 + d * c0; + matrix[3] = c * b0 + d * d0; + matrix[4] = tx * a0 + ty * c0 + tx0; + matrix[5] = tx * b0 + ty * d0 + ty0; + + return this; + }, + + /** + * Transform a point using this Matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#transformPoint + * @since 3.0.0 + * + * @param {number} x - The x coordinate of the point to transform. + * @param {number} y - The y coordinate of the point to transform. + * @param {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} point - The Point object to store the transformed coordinates. + * + * @return {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} The Point containing the transformed coordinates. + */ + transformPoint: function (x, y, point) + { + if (point === undefined) { point = { x: 0, y: 0 }; } + + var matrix = this.matrix; + + var a = matrix[0]; + var b = matrix[1]; + var c = matrix[2]; + var d = matrix[3]; + var tx = matrix[4]; + var ty = matrix[5]; + + point.x = x * a + y * c + tx; + point.y = x * b + y * d + ty; + + return point; + }, + + /** + * Invert the Matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#invert + * @since 3.0.0 + * + * @return {this} This TransformMatrix. + */ + invert: function () + { + var matrix = this.matrix; + + var a = matrix[0]; + var b = matrix[1]; + var c = matrix[2]; + var d = matrix[3]; + var tx = matrix[4]; + var ty = matrix[5]; + + var n = a * d - b * c; + + matrix[0] = d / n; + matrix[1] = -b / n; + matrix[2] = -c / n; + matrix[3] = a / n; + matrix[4] = (c * ty - d * tx) / n; + matrix[5] = -(a * ty - b * tx) / n; + + return this; + }, + + /** + * Set the values of this Matrix to copy those of the matrix given. + * + * @method Phaser.GameObjects.Components.TransformMatrix#copyFrom + * @since 3.11.0 + * + * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from. + * + * @return {this} This TransformMatrix. + */ + copyFrom: function (src) + { + var matrix = this.matrix; + + matrix[0] = src.a; + matrix[1] = src.b; + matrix[2] = src.c; + matrix[3] = src.d; + matrix[4] = src.e; + matrix[5] = src.f; + + return this; + }, + + /** + * Set the values of this Matrix to copy those of the array given. + * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f. + * + * @method Phaser.GameObjects.Components.TransformMatrix#copyFromArray + * @since 3.11.0 + * + * @param {array} src - The array of values to set into this matrix. + * + * @return {this} This TransformMatrix. + */ + copyFromArray: function (src) + { + var matrix = this.matrix; + + matrix[0] = src[0]; + matrix[1] = src[1]; + matrix[2] = src[2]; + matrix[3] = src[3]; + matrix[4] = src[4]; + matrix[5] = src[5]; + + return this; + }, + + /** + * Copy the values from this Matrix to the given Canvas Rendering Context. + * This will use the Context.transform method. + * + * @method Phaser.GameObjects.Components.TransformMatrix#copyToContext + * @since 3.12.0 + * + * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to. + * + * @return {CanvasRenderingContext2D} The Canvas Rendering Context. + */ + copyToContext: function (ctx) + { + var matrix = this.matrix; + + ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); + + return ctx; + }, + + /** + * Copy the values from this Matrix to the given Canvas Rendering Context. + * This will use the Context.setTransform method. + * + * @method Phaser.GameObjects.Components.TransformMatrix#setToContext + * @since 3.12.0 + * + * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to. + * + * @return {CanvasRenderingContext2D} The Canvas Rendering Context. + */ + setToContext: function (ctx) + { + var matrix = this.matrix; + + ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); + + return ctx; + }, + + /** + * Copy the values in this Matrix to the array given. + * + * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f. + * + * @method Phaser.GameObjects.Components.TransformMatrix#copyToArray + * @since 3.12.0 + * + * @param {array} [out] - The array to copy the matrix values in to. + * + * @return {array} An array where elements 0 to 5 contain the values from this matrix. + */ + copyToArray: function (out) + { + var matrix = this.matrix; + + if (out === undefined) + { + out = [ matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5] ]; + } + else + { + out[0] = matrix[0]; + out[1] = matrix[1]; + out[2] = matrix[2]; + out[3] = matrix[3]; + out[4] = matrix[4]; + out[5] = matrix[5]; + } + + return out; + }, + + /** + * Set the values of this Matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#setTransform + * @since 3.0.0 + * + * @param {number} a - The Scale X value. + * @param {number} b - The Shear Y value. + * @param {number} c - The Shear X value. + * @param {number} d - The Scale Y value. + * @param {number} tx - The Translate X value. + * @param {number} ty - The Translate Y value. + * + * @return {this} This TransformMatrix. + */ + setTransform: function (a, b, c, d, tx, ty) + { + var matrix = this.matrix; + + matrix[0] = a; + matrix[1] = b; + matrix[2] = c; + matrix[3] = d; + matrix[4] = tx; + matrix[5] = ty; + + return this; + }, + + /** + * Decompose this Matrix into its translation, scale and rotation values using QR decomposition. + * + * The result must be applied in the following order to reproduce the current matrix: + * + * translate -> rotate -> scale + * + * @method Phaser.GameObjects.Components.TransformMatrix#decomposeMatrix + * @since 3.0.0 + * + * @return {object} The decomposed Matrix. + */ + decomposeMatrix: function () + { + var decomposedMatrix = this.decomposedMatrix; + + var matrix = this.matrix; + + // a = scale X (1) + // b = shear Y (0) + // c = shear X (0) + // d = scale Y (1) + + var a = matrix[0]; + var b = matrix[1]; + var c = matrix[2]; + var d = matrix[3]; + + var determ = a * d - b * c; + + decomposedMatrix.translateX = matrix[4]; + decomposedMatrix.translateY = matrix[5]; + + if (a || b) + { + var r = Math.sqrt(a * a + b * b); + + decomposedMatrix.rotation = (b > 0) ? Math.acos(a / r) : -Math.acos(a / r); + decomposedMatrix.scaleX = r; + decomposedMatrix.scaleY = determ / r; + } + else if (c || d) + { + var s = Math.sqrt(c * c + d * d); + + decomposedMatrix.rotation = Math.PI * 0.5 - (d > 0 ? Math.acos(-c / s) : -Math.acos(c / s)); + decomposedMatrix.scaleX = determ / s; + decomposedMatrix.scaleY = s; + } + else + { + decomposedMatrix.rotation = 0; + decomposedMatrix.scaleX = 0; + decomposedMatrix.scaleY = 0; + } + + return decomposedMatrix; + }, + + /** + * Apply the identity, translate, rotate and scale operations on the Matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#applyITRS + * @since 3.0.0 + * + * @param {number} x - The horizontal translation. + * @param {number} y - The vertical translation. + * @param {number} rotation - The angle of rotation in radians. + * @param {number} scaleX - The horizontal scale. + * @param {number} scaleY - The vertical scale. + * + * @return {this} This TransformMatrix. + */ + applyITRS: function (x, y, rotation, scaleX, scaleY) + { + var matrix = this.matrix; + + var radianSin = Math.sin(rotation); + var radianCos = Math.cos(rotation); + + // Translate + matrix[4] = x; + matrix[5] = y; + + // Rotate and Scale + matrix[0] = radianCos * scaleX; + matrix[1] = radianSin * scaleX; + matrix[2] = -radianSin * scaleY; + matrix[3] = radianCos * scaleY; + + return this; + }, + + /** + * Takes the `x` and `y` values and returns a new position in the `output` vector that is the inverse of + * the current matrix with its transformation applied. + * + * Can be used to translate points from world to local space. + * + * @method Phaser.GameObjects.Components.TransformMatrix#applyInverse + * @since 3.12.0 + * + * @param {number} x - The x position to translate. + * @param {number} y - The y position to translate. + * @param {Phaser.Math.Vector2} [output] - A Vector2, or point-like object, to store the results in. + * + * @return {Phaser.Math.Vector2} The coordinates, inverse-transformed through this matrix. + */ + applyInverse: function (x, y, output) + { + if (output === undefined) { output = new Vector2(); } + + var matrix = this.matrix; + + var a = matrix[0]; + var b = matrix[1]; + var c = matrix[2]; + var d = matrix[3]; + var tx = matrix[4]; + var ty = matrix[5]; + + var id = 1 / ((a * d) + (c * -b)); + + output.x = (d * id * x) + (-c * id * y) + (((ty * c) - (tx * d)) * id); + output.y = (a * id * y) + (-b * id * x) + (((-ty * a) + (tx * b)) * id); + + return output; + }, + + /** + * Returns the X component of this matrix multiplied by the given values. + * This is the same as `x * a + y * c + e`. + * + * @method Phaser.GameObjects.Components.TransformMatrix#getX + * @since 3.12.0 + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * + * @return {number} The calculated x value. + */ + getX: function (x, y) + { + return x * this.a + y * this.c + this.e; + }, + + /** + * Returns the Y component of this matrix multiplied by the given values. + * This is the same as `x * b + y * d + f`. + * + * @method Phaser.GameObjects.Components.TransformMatrix#getY + * @since 3.12.0 + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * + * @return {number} The calculated y value. + */ + getY: function (x, y) + { + return x * this.b + y * this.d + this.f; + }, + + /** + * Returns the X component of this matrix multiplied by the given values. + * + * This is the same as `x * a + y * c + e`, optionally passing via `Math.round`. + * + * @method Phaser.GameObjects.Components.TransformMatrix#getXRound + * @since 3.50.0 + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * @param {boolean} [round=false] - Math.round the resulting value? + * + * @return {number} The calculated x value. + */ + getXRound: function (x, y, round) + { + var v = this.getX(x, y); + + if (round) + { + v = Math.round(v); + } + + return v; + }, + + /** + * Returns the Y component of this matrix multiplied by the given values. + * + * This is the same as `x * b + y * d + f`, optionally passing via `Math.round`. + * + * @method Phaser.GameObjects.Components.TransformMatrix#getYRound + * @since 3.50.0 + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * @param {boolean} [round=false] - Math.round the resulting value? + * + * @return {number} The calculated y value. + */ + getYRound: function (x, y, round) + { + var v = this.getY(x, y); + + if (round) + { + v = Math.round(v); + } + + return v; + }, + + /** + * Returns a string that can be used in a CSS Transform call as a `matrix` property. + * + * @method Phaser.GameObjects.Components.TransformMatrix#getCSSMatrix + * @since 3.12.0 + * + * @return {string} A string containing the CSS Transform matrix values. + */ + getCSSMatrix: function () + { + var m = this.matrix; + + return 'matrix(' + m[0] + ',' + m[1] + ',' + m[2] + ',' + m[3] + ',' + m[4] + ',' + m[5] + ')'; + }, + + /** + * Destroys this Transform Matrix. + * + * @method Phaser.GameObjects.Components.TransformMatrix#destroy + * @since 3.4.0 */ destroy: function () { - this.geometryMask = null; + this.matrix = null; + this.decomposedMatrix = null; } }); -module.exports = GeometryMask; +module.exports = TransformMatrix; /***/ }), /* 42 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { /** * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Class = __webpack_require__(0); - /** - * @classdesc - * [description] + * A NOOP (No Operation) callback function. * - * @class BitmapMask - * @memberOf Phaser.Display.Masks - * @constructor + * Used internally by Phaser when it's more expensive to determine if a callback exists + * than it is to just invoke an empty function. + * + * @function Phaser.Utils.NOOP * @since 3.0.0 - * - * @param {Phaser.Scene} scene - [description] - * @param {Phaser.GameObjects.GameObject} renderable - A renderable Game Object that uses a texture, such as a Sprite. */ -var BitmapMask = new Class({ +var NOOP = function () +{ + // NOOP +}; - initialize: - - function BitmapMask (scene, renderable) - { - var renderer = scene.sys.game.renderer; - - /** - * A reference to either the Canvas or WebGL Renderer that this Mask is using. - * - * @name Phaser.Display.Masks.BitmapMask#renderer - * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} - * @since 3.11.0 - */ - this.renderer = renderer; - - /** - * A renderable Game Object that uses a texture, such as a Sprite. - * - * @name Phaser.Display.Masks.BitmapMask#bitmapMask - * @type {Phaser.GameObjects.GameObject} - * @since 3.0.0 - */ - this.bitmapMask = renderable; - - /** - * [description] - * - * @name Phaser.Display.Masks.BitmapMask#maskTexture - * @type {WebGLTexture} - * @default null - * @since 3.0.0 - */ - this.maskTexture = null; - - /** - * [description] - * - * @name Phaser.Display.Masks.BitmapMask#mainTexture - * @type {WebGLTexture} - * @default null - * @since 3.0.0 - */ - this.mainTexture = null; - - /** - * [description] - * - * @name Phaser.Display.Masks.BitmapMask#dirty - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.dirty = true; - - /** - * [description] - * - * @name Phaser.Display.Masks.BitmapMask#mainFramebuffer - * @type {WebGLFramebuffer} - * @since 3.0.0 - */ - this.mainFramebuffer = null; - - /** - * [description] - * - * @name Phaser.Display.Masks.BitmapMask#maskFramebuffer - * @type {WebGLFramebuffer} - * @since 3.0.0 - */ - this.maskFramebuffer = null; - - /** - * [description] - * - * @name Phaser.Display.Masks.BitmapMask#invertAlpha - * @type {boolean} - * @since 3.1.2 - */ - this.invertAlpha = false; - - if (renderer && renderer.gl) - { - var width = renderer.width; - var height = renderer.height; - var pot = ((width & (width - 1)) === 0 && (height & (height - 1)) === 0); - var gl = renderer.gl; - var wrap = pot ? gl.REPEAT : gl.CLAMP_TO_EDGE; - var filter = gl.LINEAR; - - this.mainTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height); - this.maskTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height); - this.mainFramebuffer = renderer.createFramebuffer(width, height, this.mainTexture, false); - this.maskFramebuffer = renderer.createFramebuffer(width, height, this.maskTexture, false); - - renderer.onContextRestored(function (renderer) - { - var width = renderer.width; - var height = renderer.height; - var pot = ((width & (width - 1)) === 0 && (height & (height - 1)) === 0); - var gl = renderer.gl; - var wrap = pot ? gl.REPEAT : gl.CLAMP_TO_EDGE; - var filter = gl.LINEAR; - - this.mainTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height); - this.maskTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height); - this.mainFramebuffer = renderer.createFramebuffer(width, height, this.mainTexture, false); - this.maskFramebuffer = renderer.createFramebuffer(width, height, this.maskTexture, false); - - }, this); - } - }, - - /** - * [description] - * - * @method Phaser.Display.Masks.BitmapMask#setBitmap - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject} renderable - A renderable Game Object that uses a texture, such as a Sprite. - */ - setBitmap: function (renderable) - { - this.bitmapMask = renderable; - }, - - /** - * [description] - * - * @method Phaser.Display.Masks.BitmapMask#preRenderWebGL - * @since 3.0.0 - * - * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - [description] - * @param {Phaser.GameObjects.GameObject} maskedObject - [description] - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to. - */ - preRenderWebGL: function (renderer, maskedObject, camera) - { - renderer.pipelines.BitmapMaskPipeline.beginMask(this, maskedObject, camera); - }, - - /** - * [description] - * - * @method Phaser.Display.Masks.BitmapMask#postRenderWebGL - * @since 3.0.0 - * - * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - [description] - */ - postRenderWebGL: function (renderer) - { - renderer.pipelines.BitmapMaskPipeline.endMask(this); - }, - - /** - * [description] - * - * @method Phaser.Display.Masks.BitmapMask#preRenderCanvas - * @since 3.0.0 - * - * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - [description] - * @param {Phaser.GameObjects.GameObject} mask - [description] - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to. - */ - preRenderCanvas: function () - { - // NOOP - }, - - /** - * [description] - * - * @method Phaser.Display.Masks.BitmapMask#postRenderCanvas - * @since 3.0.0 - * - * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - [description] - */ - postRenderCanvas: function () - { - // NOOP - }, - - /** - * Destroys this BitmapMask and nulls any references it holds. - * - * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it, - * so be sure to call `clearMask` on any Game Object using it, before destroying it. - * - * @method Phaser.Display.Masks.BitmapMask#destroy - * @since 3.7.0 - */ - destroy: function () - { - this.bitmapMask = null; - - var renderer = this.renderer; - - if (renderer && renderer.gl) - { - renderer.deleteTexture(this.mainTexture); - renderer.deleteTexture(this.maskTexture); - renderer.deleteFramebuffer(this.mainFramebuffer); - renderer.deleteFramebuffer(this.maskFramebuffer); - } - - this.mainTexture = null; - this.maskTexture = null; - this.mainFramebuffer = null; - this.maskFramebuffer = null; - this.renderer = null; - } - -}); - -module.exports = BitmapMask; +module.exports = NOOP; /***/ }), @@ -11221,6532 +10484,14 @@ module.exports = BitmapMask; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var BitmapMask = __webpack_require__(42); -var GeometryMask = __webpack_require__(41); - -/** - * Provides methods used for getting and setting the mask of a Game Object. - * - * @name Phaser.GameObjects.Components.Mask - * @since 3.0.0 - */ - -var Mask = { - - /** - * The Mask this Game Object is using during render. - * - * @name Phaser.GameObjects.Components.Mask#mask - * @type {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask} - * @since 3.0.0 - */ - mask: null, - - /** - * 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. - * - * 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. - * - * 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. - * - * @method Phaser.GameObjects.Components.Mask#setMask - * @since 3.6.2 - * - * @param {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask} mask - The mask this Game Object will use when rendering. - * - * @return {this} This Game Object instance. - */ - setMask: function (mask) - { - this.mask = mask; - - return this; - }, - - /** - * Clears the mask that this Game Object was using. - * - * @method Phaser.GameObjects.Components.Mask#clearMask - * @since 3.6.2 - * - * @param {boolean} [destroyMask=false] - Destroy the mask before clearing it? - * - * @return {this} This Game Object instance. - */ - clearMask: function (destroyMask) - { - if (destroyMask === undefined) { destroyMask = false; } - - if (destroyMask && this.mask) - { - this.mask.destroy(); - } - - this.mask = null; - - return this; - }, - - /** - * Creates and returns a Bitmap 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 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 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 Game Object. - * - * @method Phaser.GameObjects.Components.Mask#createBitmapMask - * @since 3.6.2 - * - * @param {Phaser.GameObjects.GameObject} [renderable] - A renderable Game Object that uses a texture, such as a Sprite. - * - * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created. - */ - createBitmapMask: function (renderable) - { - if (renderable === undefined && this.texture) - { - // eslint-disable-next-line consistent-this - renderable = this; - } - - return new BitmapMask(this.scene, renderable); - }, - - /** - * 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. - * - * This means you can call this method to create a Geometry Mask from any Graphics Game Object. - * - * @method Phaser.GameObjects.Components.Mask#createGeometryMask - * @since 3.6.2 - * - * @param {Phaser.GameObjects.Graphics} [graphics] - A Graphics Game Object. The geometry within it will be used as the mask. - * - * @return {Phaser.Display.Masks.GeometryMask} This Geometry Mask that was created. - */ - createGeometryMask: function (graphics) - { - if (graphics === undefined && this.type === 'Graphics') - { - // eslint-disable-next-line consistent-this - graphics = this; - } - - return new GeometryMask(this.scene, graphics); - } - -}; - -module.exports = Mask; - - -/***/ }), -/* 44 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * Rotate a `point` around `x` and `y` by the given `angle`. - * - * @function Phaser.Math.RotateAround - * @since 3.0.0 - * - * @param {(Phaser.Geom.Point|object)} point - The point to be rotated. - * @param {number} x - The horizontal coordinate to rotate around. - * @param {number} y - The vertical coordinate to rotate around. - * @param {number} angle - The angle of rotation in radians. - * - * @return {Phaser.Geom.Point} The given point, rotated by the given angle around the given coordinates. - */ -var RotateAround = function (point, x, y, angle) -{ - var c = Math.cos(angle); - var s = Math.sin(angle); - - var tx = point.x - x; - var ty = point.y - y; - - point.x = tx * c - ty * s + x; - point.y = tx * s + ty * c + y; - - return point; -}; - -module.exports = RotateAround; - - -/***/ }), -/* 45 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Point = __webpack_require__(1); - -/** - * [description] - * - * @function Phaser.Geom.Rectangle.Random - * @since 3.0.0 - * - * @generic {Phaser.Geom.Point} O - [out,$return] - * - * @param {Phaser.Geom.Rectangle} rect - [description] - * @param {Phaser.Geom.Point} out - [description] - * - * @return {Phaser.Geom.Point} [description] - */ -var Random = function (rect, out) -{ - if (out === undefined) { out = new Point(); } - - out.x = rect.x + (Math.random() * rect.width); - out.y = rect.y + (Math.random() * rect.height); - - return out; -}; - -module.exports = Random; - - -/***/ }), -/* 46 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Point = __webpack_require__(1); - -/** - * Returns a random point on a given Line. - * - * @function Phaser.Geom.Line.Random - * @since 3.0.0 - * - * @generic {Phaser.Geom.Point} O - [out,$return] - * - * @param {Phaser.Geom.Line} line - The Line to calculate the random Point on. - * @param {(Phaser.Geom.Point|object)} [out] - An instance of a Point to be modified. - * - * @return {(Phaser.Geom.Point|object)} A random Point on the Line. - */ -var Random = function (line, out) -{ - if (out === undefined) { out = new Point(); } - - var t = Math.random(); - - out.x = line.x1 + t * (line.x2 - line.x1); - out.y = line.y1 + t * (line.y2 - line.y1); - - return out; -}; - -module.exports = Random; - - -/***/ }), -/* 47 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * Calculate the length of the given line. - * - * @function Phaser.Geom.Line.Length - * @since 3.0.0 - * - * @param {Phaser.Geom.Line} line - The line to calculate the length of. - * - * @return {number} The length of the line. - */ -var Length = function (line) -{ - return Math.sqrt((line.x2 - line.x1) * (line.x2 - line.x1) + (line.y2 - line.y1) * (line.y2 - line.y1)); -}; - -module.exports = Length; - - -/***/ }), -/* 48 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Length = __webpack_require__(47); -var Point = __webpack_require__(1); - -/** - * Get a number of points along a line's length. - * - * Provide a `quantity` to get an exact number of points along the line. - * - * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when - * providing a `stepRate`. - * - * @function Phaser.Geom.Line.GetPoints - * @since 3.0.0 - * - * @generic {Phaser.Geom.Point[]} O - [out,$return] - * - * @param {Phaser.Geom.Line} line - The line. - * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead. - * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`. - * @param {(array|Phaser.Geom.Point[])} [out] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line. - * - * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line. - */ -var GetPoints = function (line, quantity, stepRate, out) -{ - if (out === undefined) { out = []; } - - // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. - if (!quantity) - { - quantity = Length(line) / stepRate; - } - - var x1 = line.x1; - var y1 = line.y1; - - var x2 = line.x2; - var y2 = line.y2; - - for (var i = 0; i < quantity; i++) - { - var position = i / quantity; - - var x = x1 + (x2 - x1) * position; - var y = y1 + (y2 - y1) * position; - - out.push(new Point(x, y)); - } - - return out; -}; - -module.exports = GetPoints; - - -/***/ }), -/* 49 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Point = __webpack_require__(1); - -/** - * Get a point on a line that's a given percentage along its length. - * - * @function Phaser.Geom.Line.GetPoint - * @since 3.0.0 - * - * @generic {Phaser.Geom.Point} O - [out,$return] - * - * @param {Phaser.Geom.Line} line - The line. - * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line. - * @param {(Phaser.Geom.Point|object)} [out] - An optional point, or point-like object, to store the coordinates of the point on the line. - * - * @return {(Phaser.Geom.Point|object)} The point on the line. - */ -var GetPoint = function (line, position, out) -{ - if (out === undefined) { out = new Point(); } - - out.x = line.x1 + (line.x2 - line.x1) * position; - out.y = line.y1 + (line.y2 - line.y1) * position; - - return out; -}; - -module.exports = GetPoint; - - -/***/ }), -/* 50 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - +var BuildGameObject = __webpack_require__(44); +var BuildGameObjectAnimation = __webpack_require__(156); var Class = __webpack_require__(0); -var GetPoint = __webpack_require__(49); -var GetPoints = __webpack_require__(48); -var Random = __webpack_require__(46); -var Vector2 = __webpack_require__(3); - -/** - * @classdesc - * Defines a Line segment, a part of a line between two endpoints. - * - * @class Line - * @memberOf Phaser.Geom - * @constructor - * @since 3.0.0 - * - * @param {number} [x1=0] - The x coordinate of the lines starting point. - * @param {number} [y1=0] - The y coordinate of the lines starting point. - * @param {number} [x2=0] - The x coordinate of the lines ending point. - * @param {number} [y2=0] - The y coordinate of the lines ending point. - */ -var Line = new Class({ - - initialize: - - function Line (x1, y1, x2, y2) - { - if (x1 === undefined) { x1 = 0; } - if (y1 === undefined) { y1 = 0; } - if (x2 === undefined) { x2 = 0; } - if (y2 === undefined) { y2 = 0; } - - /** - * The x coordinate of the lines starting point. - * - * @name Phaser.Geom.Line#x1 - * @type {number} - * @since 3.0.0 - */ - this.x1 = x1; - - /** - * The y coordinate of the lines starting point. - * - * @name Phaser.Geom.Line#y1 - * @type {number} - * @since 3.0.0 - */ - this.y1 = y1; - - /** - * The x coordinate of the lines ending point. - * - * @name Phaser.Geom.Line#x2 - * @type {number} - * @since 3.0.0 - */ - this.x2 = x2; - - /** - * The y coordinate of the lines ending point. - * - * @name Phaser.Geom.Line#y2 - * @type {number} - * @since 3.0.0 - */ - this.y2 = y2; - }, - - /** - * Get a point on a line that's a given percentage along its length. - * - * @method Phaser.Geom.Line#getPoint - * @since 3.0.0 - * - * @generic {Phaser.Geom.Point} O - [output,$return] - * - * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line. - * @param {(Phaser.Geom.Point|object)} [output] - An optional point, or point-like object, to store the coordinates of the point on the line. - * - * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point on the line. - */ - getPoint: function (position, output) - { - return GetPoint(this, position, output); - }, - - /** - * Get a number of points along a line's length. - * - * Provide a `quantity` to get an exact number of points along the line. - * - * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when - * providing a `stepRate`. - * - * @method Phaser.Geom.Line#getPoints - * @since 3.0.0 - * - * @generic {Phaser.Geom.Point} O - [output,$return] - * - * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead. - * @param {integer} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`. - * @param {(array|Phaser.Geom.Point[])} [output] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line. - * - * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line. - */ - getPoints: function (quantity, stepRate, output) - { - return GetPoints(this, quantity, stepRate, output); - }, - - /** - * Get a random Point on the Line. - * - * @method Phaser.Geom.Line#getRandomPoint - * @since 3.0.0 - * - * @generic {Phaser.Geom.Point} O - [point,$return] - * - * @param {(Phaser.Geom.Point|object)} [point] - An instance of a Point to be modified. - * - * @return {Phaser.Geom.Point} A random Point on the Line. - */ - getRandomPoint: function (point) - { - return Random(this, point); - }, - - /** - * Set new coordinates for the line endpoints. - * - * @method Phaser.Geom.Line#setTo - * @since 3.0.0 - * - * @param {number} [x1=0] - The x coordinate of the lines starting point. - * @param {number} [y1=0] - The y coordinate of the lines starting point. - * @param {number} [x2=0] - The x coordinate of the lines ending point. - * @param {number} [y2=0] - The y coordinate of the lines ending point. - * - * @return {Phaser.Geom.Line} This Line object. - */ - setTo: function (x1, y1, x2, y2) - { - if (x1 === undefined) { x1 = 0; } - if (y1 === undefined) { y1 = 0; } - if (x2 === undefined) { x2 = 0; } - if (y2 === undefined) { y2 = 0; } - - this.x1 = x1; - this.y1 = y1; - - this.x2 = x2; - this.y2 = y2; - - return this; - }, - - /** - * Returns a Vector2 object that corresponds to the start of this Line. - * - * @method Phaser.Geom.Line#getPointA - * @since 3.0.0 - * - * @generic {Phaser.Math.Vector2} O - [vec2,$return] - * - * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created. - * - * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the start of this Line. - */ - getPointA: function (vec2) - { - if (vec2 === undefined) { vec2 = new Vector2(); } - - vec2.set(this.x1, this.y1); - - return vec2; - }, - - /** - * Returns a Vector2 object that corresponds to the end of this Line. - * - * @method Phaser.Geom.Line#getPointB - * @since 3.0.0 - * - * @generic {Phaser.Math.Vector2} O - [vec2,$return] - * - * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created. - * - * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the end of this Line. - */ - getPointB: function (vec2) - { - if (vec2 === undefined) { vec2 = new Vector2(); } - - vec2.set(this.x2, this.y2); - - return vec2; - }, - - /** - * The left position of the Line. - * - * @name Phaser.Geom.Line#left - * @type {number} - * @since 3.0.0 - */ - left: { - - get: function () - { - return Math.min(this.x1, this.x2); - }, - - set: function (value) - { - if (this.x1 <= this.x2) - { - this.x1 = value; - } - else - { - this.x2 = value; - } - } - - }, - - /** - * The right position of the Line. - * - * @name Phaser.Geom.Line#right - * @type {number} - * @since 3.0.0 - */ - right: { - - get: function () - { - return Math.max(this.x1, this.x2); - }, - - set: function (value) - { - if (this.x1 > this.x2) - { - this.x1 = value; - } - else - { - this.x2 = value; - } - } - - }, - - /** - * The top position of the Line. - * - * @name Phaser.Geom.Line#top - * @type {number} - * @since 3.0.0 - */ - top: { - - get: function () - { - return Math.min(this.y1, this.y2); - }, - - set: function (value) - { - if (this.y1 <= this.y2) - { - this.y1 = value; - } - else - { - this.y2 = value; - } - } - - }, - - /** - * The bottom position of the Line. - * - * @name Phaser.Geom.Line#bottom - * @type {number} - * @since 3.0.0 - */ - bottom: { - - get: function () - { - return Math.max(this.y1, this.y2); - }, - - set: function (value) - { - if (this.y1 > this.y2) - { - this.y1 = value; - } - else - { - this.y2 = value; - } - } - - } - -}); - -module.exports = Line; - - -/***/ }), -/* 51 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var GetPoint = __webpack_require__(10); -var Perimeter = __webpack_require__(9); - -// Return an array of points from the perimeter of the rectangle -// each spaced out based on the quantity or step required - -/** - * [description] - * - * @function Phaser.Geom.Rectangle.GetPoints - * @since 3.0.0 - * - * @generic {Phaser.Geom.Point[]} O - [out,$return] - * - * @param {Phaser.Geom.Rectangle} rectangle - [description] - * @param {number} step - [description] - * @param {integer} quantity - [description] - * @param {(array|Phaser.Geom.Point[])} [out] - [description] - * - * @return {(array|Phaser.Geom.Point[])} [description] - */ -var GetPoints = function (rectangle, quantity, stepRate, out) -{ - if (out === undefined) { out = []; } - - // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. - if (!quantity) - { - quantity = Perimeter(rectangle) / stepRate; - } - - for (var i = 0; i < quantity; i++) - { - var position = i / quantity; - - out.push(GetPoint(rectangle, position)); - } - - return out; -}; - -module.exports = GetPoints; - - -/***/ }), -/* 52 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * [description] - * - * @function Phaser.Geom.Rectangle.Contains - * @since 3.0.0 - * - * @param {Phaser.Geom.Rectangle} rect - [description] - * @param {number} x - [description] - * @param {number} y - [description] - * - * @return {boolean} [description] - */ -var Contains = function (rect, x, y) -{ - if (rect.width <= 0 || rect.height <= 0) - { - return false; - } - - return (rect.x <= x && rect.x + rect.width >= x && rect.y <= y && rect.y + rect.height >= y); -}; - -module.exports = Contains; - - -/***/ }), -/* 53 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Class = __webpack_require__(0); -var Contains = __webpack_require__(52); -var GetPoint = __webpack_require__(10); -var GetPoints = __webpack_require__(51); -var Line = __webpack_require__(50); -var Random = __webpack_require__(45); - -/** - * @classdesc - * Encapsulates a 2D rectangle defined by its corner point in the top-left and its extends in x (width) and y (height) - * - * @class Rectangle - * @memberOf Phaser.Geom - * @constructor - * @since 3.0.0 - * - * @param {number} [x=0] - [description] - * @param {number} [y=0] - [description] - * @param {number} [width=0] - [description] - * @param {number} [height=0] - [description] - */ -var Rectangle = new Class({ - - initialize: - - function Rectangle (x, y, width, height) - { - if (x === undefined) { x = 0; } - if (y === undefined) { y = 0; } - if (width === undefined) { width = 0; } - if (height === undefined) { height = 0; } - - /** - * [description] - * - * @name Phaser.Geom.Rectangle#x - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.x = x; - - /** - * [description] - * - * @name Phaser.Geom.Rectangle#y - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.y = y; - - /** - * [description] - * - * @name Phaser.Geom.Rectangle#width - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.width = width; - - /** - * [description] - * - * @name Phaser.Geom.Rectangle#height - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.height = height; - }, - - /** - * [description] - * - * @method Phaser.Geom.Rectangle#contains - * @since 3.0.0 - * - * @param {number} x - [description] - * @param {number} y - [description] - * - * @return {boolean} [description] - */ - contains: function (x, y) - { - return Contains(this, x, y); - }, - - /** - * [description] - * - * @method Phaser.Geom.Rectangle#getPoint - * @since 3.0.0 - * - * @generic {Phaser.Geom.Point} O - [output,$return] - * - * @param {number} position - [description] - * @param {(Phaser.Geom.Point|object)} [output] - [description] - * - * @return {(Phaser.Geom.Point|object)} [description] - */ - getPoint: function (position, output) - { - return GetPoint(this, position, output); - }, - - /** - * [description] - * - * @method Phaser.Geom.Rectangle#getPoints - * @since 3.0.0 - * - * @generic {Phaser.Geom.Point[]} O - [output,$return] - * - * @param {integer} quantity - [description] - * @param {number} [stepRate] - [description] - * @param {(array|Phaser.Geom.Point[])} [output] - [description] - * - * @return {(array|Phaser.Geom.Point[])} [description] - */ - getPoints: function (quantity, stepRate, output) - { - return GetPoints(this, quantity, stepRate, output); - }, - - /** - * [description] - * - * @method Phaser.Geom.Rectangle#getRandomPoint - * @since 3.0.0 - * - * @generic {Phaser.Geom.Point} O - [point,$return] - * - * @param {Phaser.Geom.Point} [point] - [description] - * - * @return {Phaser.Geom.Point} [description] - */ - getRandomPoint: function (point) - { - return Random(this, point); - }, - - /** - * [description] - * - * @method Phaser.Geom.Rectangle#setTo - * @since 3.0.0 - * - * @param {number} x - [description] - * @param {number} y - [description] - * @param {number} width - [description] - * @param {number} height - [description] - * - * @return {Phaser.Geom.Rectangle} This Rectangle object. - */ - setTo: function (x, y, width, height) - { - this.x = x; - this.y = y; - this.width = width; - this.height = height; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Geom.Rectangle#setEmpty - * @since 3.0.0 - * - * @return {Phaser.Geom.Rectangle} This Rectangle object. - */ - setEmpty: function () - { - return this.setTo(0, 0, 0, 0); - }, - - /** - * [description] - * - * @method Phaser.Geom.Rectangle#setPosition - * @since 3.0.0 - * - * @param {number} x - [description] - * @param {number} [y=x] - [description] - * - * @return {Phaser.Geom.Rectangle} This Rectangle object. - */ - setPosition: function (x, y) - { - if (y === undefined) { y = x; } - - this.x = x; - this.y = y; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Geom.Rectangle#setSize - * @since 3.0.0 - * - * @param {number} width - [description] - * @param {number} [height=width] - [description] - * - * @return {Phaser.Geom.Rectangle} This Rectangle object. - */ - setSize: function (width, height) - { - if (height === undefined) { height = width; } - - this.width = width; - this.height = height; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Geom.Rectangle#isEmpty - * @since 3.0.0 - * - * @return {boolean} [description] - */ - isEmpty: function () - { - return (this.width <= 0 || this.height <= 0); - }, - - /** - * Returns a Line object that corresponds to the top of this Rectangle. - * - * @method Phaser.Geom.Rectangle#getLineA - * @since 3.0.0 - * - * @generic {Phaser.Geom.Line} O - [line,$return] - * - * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created. - * - * @return {Phaser.Geom.Line} A Line object that corresponds to the top of this Rectangle. - */ - getLineA: function (line) - { - if (line === undefined) { line = new Line(); } - - line.setTo(this.x, this.y, this.right, this.y); - - return line; - }, - - /** - * Returns a Line object that corresponds to the right of this Rectangle. - * - * @method Phaser.Geom.Rectangle#getLineB - * @since 3.0.0 - * - * @generic {Phaser.Geom.Line} O - [line,$return] - * - * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created. - * - * @return {Phaser.Geom.Line} A Line object that corresponds to the right of this Rectangle. - */ - getLineB: function (line) - { - if (line === undefined) { line = new Line(); } - - line.setTo(this.right, this.y, this.right, this.bottom); - - return line; - }, - - /** - * Returns a Line object that corresponds to the bottom of this Rectangle. - * - * @method Phaser.Geom.Rectangle#getLineC - * @since 3.0.0 - * - * @generic {Phaser.Geom.Line} O - [line,$return] - * - * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created. - * - * @return {Phaser.Geom.Line} A Line object that corresponds to the bottom of this Rectangle. - */ - getLineC: function (line) - { - if (line === undefined) { line = new Line(); } - - line.setTo(this.right, this.bottom, this.x, this.bottom); - - return line; - }, - - /** - * Returns a Line object that corresponds to the left of this Rectangle. - * - * @method Phaser.Geom.Rectangle#getLineD - * @since 3.0.0 - * - * @generic {Phaser.Geom.Line} O - [line,$return] - * - * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created. - * - * @return {Phaser.Geom.Line} A Line object that corresponds to the left of this Rectangle. - */ - getLineD: function (line) - { - if (line === undefined) { line = new Line(); } - - line.setTo(this.x, this.bottom, this.x, this.y); - - return line; - }, - - /** - * [description] - * - * @name Phaser.Geom.Rectangle#left - * @type {number} - * @since 3.0.0 - */ - left: { - - get: function () - { - return this.x; - }, - - set: function (value) - { - if (value >= this.right) - { - this.width = 0; - } - else - { - this.width = this.right - value; - } - - this.x = value; - } - - }, - - /** - * [description] - * - * @name Phaser.Geom.Rectangle#right - * @type {number} - * @since 3.0.0 - */ - right: { - - get: function () - { - return this.x + this.width; - }, - - set: function (value) - { - if (value <= this.x) - { - this.width = 0; - } - else - { - this.width = value - this.x; - } - } - - }, - - /** - * [description] - * - * @name Phaser.Geom.Rectangle#top - * @type {number} - * @since 3.0.0 - */ - top: { - - get: function () - { - return this.y; - }, - - set: function (value) - { - if (value >= this.bottom) - { - this.height = 0; - } - else - { - this.height = (this.bottom - value); - } - - this.y = value; - } - - }, - - /** - * [description] - * - * @name Phaser.Geom.Rectangle#bottom - * @type {number} - * @since 3.0.0 - */ - bottom: { - - get: function () - { - return this.y + this.height; - }, - - set: function (value) - { - if (value <= this.y) - { - this.height = 0; - } - else - { - this.height = value - this.y; - } - } - - }, - - /** - * [description] - * - * @name Phaser.Geom.Rectangle#centerX - * @type {number} - * @since 3.0.0 - */ - centerX: { - - get: function () - { - return this.x + (this.width / 2); - }, - - set: function (value) - { - this.x = value - (this.width / 2); - } - - }, - - /** - * [description] - * - * @name Phaser.Geom.Rectangle#centerY - * @type {number} - * @since 3.0.0 - */ - centerY: { - - get: function () - { - return this.y + (this.height / 2); - }, - - set: function (value) - { - this.y = value - (this.height / 2); - } - - } - -}); - -module.exports = Rectangle; - - -/***/ }), -/* 54 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Rectangle = __webpack_require__(53); -var RotateAround = __webpack_require__(44); -var Vector2 = __webpack_require__(3); - -/** - * Provides methods used for obtaining the bounds of a Game Object. - * Should be applied as a mixin and not used directly. - * - * @name Phaser.GameObjects.Components.GetBounds - * @since 3.0.0 - */ - -var GetBounds = { - - /** - * Gets the center coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * - * @method Phaser.GameObjects.Components.GetBounds#getCenter - * @since 3.0.0 - * - * @generic {Phaser.Math.Vector2} O - [output,$return] - * - * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. - * - * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. - */ - getCenter: function (output) - { - if (output === undefined) { output = new Vector2(); } - - output.x = this.x - (this.displayWidth * this.originX) + (this.displayWidth / 2); - output.y = this.y - (this.displayHeight * this.originY) + (this.displayHeight / 2); - - return output; - }, - - /** - * Gets the top-left corner coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * - * @method Phaser.GameObjects.Components.GetBounds#getTopLeft - * @since 3.0.0 - * - * @generic {Phaser.Math.Vector2} O - [output,$return] - * - * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. - * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? - * - * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. - */ - getTopLeft: function (output, includeParent) - { - if (!output) { output = new Vector2(); } - if (includeParent === undefined) { includeParent = false; } - - output.x = this.x - (this.displayWidth * this.originX); - output.y = this.y - (this.displayHeight * this.originY); - - if (this.rotation !== 0) - { - RotateAround(output, this.x, this.y, this.rotation); - } - - if (includeParent && this.parentContainer) - { - var parentMatrix = this.parentContainer.getBoundsTransformMatrix(); - - parentMatrix.transformPoint(output.x, output.y, output); - } - - return output; - }, - - /** - * Gets the top-right corner coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * - * @method Phaser.GameObjects.Components.GetBounds#getTopRight - * @since 3.0.0 - * - * @generic {Phaser.Math.Vector2} O - [output,$return] - * - * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. - * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? - * - * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. - */ - getTopRight: function (output, includeParent) - { - if (!output) { output = new Vector2(); } - if (includeParent === undefined) { includeParent = false; } - - output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth; - output.y = this.y - (this.displayHeight * this.originY); - - if (this.rotation !== 0) - { - RotateAround(output, this.x, this.y, this.rotation); - } - - if (includeParent && this.parentContainer) - { - var parentMatrix = this.parentContainer.getBoundsTransformMatrix(); - - parentMatrix.transformPoint(output.x, output.y, output); - } - - return output; - }, - - /** - * Gets the bottom-left corner coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * - * @method Phaser.GameObjects.Components.GetBounds#getBottomLeft - * @since 3.0.0 - * - * @generic {Phaser.Math.Vector2} O - [output,$return] - * - * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. - * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? - * - * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. - */ - getBottomLeft: function (output, includeParent) - { - if (!output) { output = new Vector2(); } - if (includeParent === undefined) { includeParent = false; } - - output.x = this.x - (this.displayWidth * this.originX); - output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight; - - if (this.rotation !== 0) - { - RotateAround(output, this.x, this.y, this.rotation); - } - - if (includeParent && this.parentContainer) - { - var parentMatrix = this.parentContainer.getBoundsTransformMatrix(); - - parentMatrix.transformPoint(output.x, output.y, output); - } - - return output; - }, - - /** - * Gets the bottom-right corner coordinate of this Game Object, regardless of origin. - * The returned point is calculated in local space and does not factor in any parent containers - * - * @method Phaser.GameObjects.Components.GetBounds#getBottomRight - * @since 3.0.0 - * - * @generic {Phaser.Math.Vector2} O - [output,$return] - * - * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. - * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? - * - * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. - */ - getBottomRight: function (output, includeParent) - { - if (!output) { output = new Vector2(); } - if (includeParent === undefined) { includeParent = false; } - - output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth; - output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight; - - if (this.rotation !== 0) - { - RotateAround(output, this.x, this.y, this.rotation); - } - - if (includeParent && this.parentContainer) - { - var parentMatrix = this.parentContainer.getBoundsTransformMatrix(); - - parentMatrix.transformPoint(output.x, output.y, output); - } - - return output; - }, - - /** - * Gets the bounds of this Game Object, regardless of origin. - * The values are stored and returned in a Rectangle, or Rectangle-like, object. - * - * @method Phaser.GameObjects.Components.GetBounds#getBounds - * @since 3.0.0 - * - * @generic {Phaser.Geom.Rectangle} O - [output,$return] - * - * @param {(Phaser.Geom.Rectangle|object)} [output] - An object to store the values in. If not provided a new Rectangle will be created. - * - * @return {(Phaser.Geom.Rectangle|object)} The values stored in the output object. - */ - getBounds: function (output) - { - if (output === undefined) { output = new Rectangle(); } - - // We can use the output object to temporarily store the x/y coords in: - - var TLx, TLy, TRx, TRy, BLx, BLy, BRx, BRy; - - // Instead of doing a check if parent container is - // defined per corner we only do it once. - if (this.parentContainer) - { - var parentMatrix = this.parentContainer.getBoundsTransformMatrix(); - - this.getTopLeft(output); - parentMatrix.transformPoint(output.x, output.y, output); - - TLx = output.x; - TLy = output.y; - - this.getTopRight(output); - parentMatrix.transformPoint(output.x, output.y, output); - - TRx = output.x; - TRy = output.y; - - this.getBottomLeft(output); - parentMatrix.transformPoint(output.x, output.y, output); - - BLx = output.x; - BLy = output.y; - - this.getBottomRight(output); - parentMatrix.transformPoint(output.x, output.y, output); - - BRx = output.x; - BRy = output.y; - } - else - { - this.getTopLeft(output); - - TLx = output.x; - TLy = output.y; - - this.getTopRight(output); - - TRx = output.x; - TRy = output.y; - - this.getBottomLeft(output); - - BLx = output.x; - BLy = output.y; - - this.getBottomRight(output); - - BRx = output.x; - BRy = output.y; - } - - output.x = Math.min(TLx, TRx, BLx, BRx); - output.y = Math.min(TLy, TRy, BLy, BRy); - output.width = Math.max(TLx, TRx, BLx, BRx) - output.x; - output.height = Math.max(TLy, TRy, BLy, BRy) - output.y; - - return output; - } - -}; - -module.exports = GetBounds; - - -/***/ }), -/* 55 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * Provides methods used for visually flipping a Game Object. - * Should be applied as a mixin and not used directly. - * - * @name Phaser.GameObjects.Components.Flip - * @since 3.0.0 - */ - -var Flip = { - - /** - * The horizontally flipped state of the Game Object. - * A Game Object that is flipped horizontally will render inversed on the horizontal axis. - * Flipping always takes place from the middle of the texture and does not impact the scale value. - * - * @name Phaser.GameObjects.Components.Flip#flipX - * @type {boolean} - * @default false - * @since 3.0.0 - */ - flipX: false, - - /** - * The vertically flipped state of the Game Object. - * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) - * Flipping always takes place from the middle of the texture and does not impact the scale value. - * - * @name Phaser.GameObjects.Components.Flip#flipY - * @type {boolean} - * @default false - * @since 3.0.0 - */ - flipY: false, - - /** - * Toggles the horizontal flipped state of this Game Object. - * - * @method Phaser.GameObjects.Components.Flip#toggleFlipX - * @since 3.0.0 - * - * @return {this} This Game Object instance. - */ - toggleFlipX: function () - { - this.flipX = !this.flipX; - - return this; - }, - - /** - * Toggles the vertical flipped state of this Game Object. - * - * @method Phaser.GameObjects.Components.Flip#toggleFlipY - * @since 3.0.0 - * - * @return {this} This Game Object instance. - */ - toggleFlipY: function () - { - this.flipY = !this.flipY; - - return this; - }, - - /** - * Sets the horizontal flipped state of this Game Object. - * - * @method Phaser.GameObjects.Components.Flip#setFlipX - * @since 3.0.0 - * - * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped. - * - * @return {this} This Game Object instance. - */ - setFlipX: function (value) - { - this.flipX = value; - - return this; - }, - - /** - * Sets the vertical flipped state of this Game Object. - * - * @method Phaser.GameObjects.Components.Flip#setFlipY - * @since 3.0.0 - * - * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped. - * - * @return {this} This Game Object instance. - */ - setFlipY: function (value) - { - this.flipY = value; - - return this; - }, - - /** - * Sets the horizontal and vertical flipped state of this Game Object. - * - * @method Phaser.GameObjects.Components.Flip#setFlip - * @since 3.0.0 - * - * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped. - * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped. - * - * @return {this} This Game Object instance. - */ - setFlip: function (x, y) - { - this.flipX = x; - this.flipY = y; - - return this; - }, - - /** - * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state. - * - * @method Phaser.GameObjects.Components.Flip#resetFlip - * @since 3.0.0 - * - * @return {this} This Game Object instance. - */ - resetFlip: function () - { - this.flipX = false; - this.flipY = false; - - return this; - } - -}; - -module.exports = Flip; - - -/***/ }), -/* 56 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * Provides methods used for setting the depth of a Game Object. - * Should be applied as a mixin and not used directly. - * - * @name Phaser.GameObjects.Components.Depth - * @since 3.0.0 - */ - -var Depth = { - - /** - * Private internal value. Holds the depth of the Game Object. - * - * @name Phaser.GameObjects.Components.Depth#_depth - * @type {integer} - * @private - * @default 0 - * @since 3.0.0 - */ - _depth: 0, - - /** - * The depth of this Game Object within the Scene. - * - * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order - * of Game Objects, without actually moving their position in the display list. - * - * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth - * value will always render in front of one with a lower value. - * - * Setting the depth will queue a depth sort event within the Scene. - * - * @name Phaser.GameObjects.Components.Depth#depth - * @type {number} - * @since 3.0.0 - */ - depth: { - - get: function () - { - return this._depth; - }, - - set: function (value) - { - this.scene.sys.queueDepthSort(); - this._depth = value; - } - - }, - - /** - * The depth of this Game Object within the Scene. - * - * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order - * of Game Objects, without actually moving their position in the display list. - * - * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth - * value will always render in front of one with a lower value. - * - * Setting the depth will queue a depth sort event within the Scene. - * - * @method Phaser.GameObjects.Components.Depth#setDepth - * @since 3.0.0 - * - * @param {integer} value - The depth of this Game Object. - * - * @return {this} This Game Object instance. - */ - setDepth: function (value) - { - if (value === undefined) { value = 0; } - - this.depth = value; - - return this; - } - -}; - -module.exports = Depth; - - -/***/ }), -/* 57 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * Provides methods used for getting and setting the texture of a Game Object. - * - * @name Phaser.GameObjects.Components.Crop - * @since 3.12.0 - */ - -var Crop = { - - /** - * The Texture this Game Object is using to render with. - * - * @name Phaser.GameObjects.Components.Crop#texture - * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture} - * @since 3.0.0 - */ - texture: null, - - /** - * The Texture Frame this Game Object is using to render with. - * - * @name Phaser.GameObjects.Components.Crop#frame - * @type {Phaser.Textures.Frame} - * @since 3.0.0 - */ - frame: null, - - /** - * A boolean flag indicating if this Game Object is being cropped or not. - * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off. - * Equally, calling `setCrop` with no arguments will reset the crop and disable it. - * - * @name Phaser.GameObjects.Components.Crop#isCropped - * @type {boolean} - * @since 3.11.0 - */ - isCropped: false, - - /** - * Applies a crop to a texture based Game Object, such as a Sprite or Image. - * - * The crop is a rectangle that limits the area of the texture frame that is visible during rendering. - * - * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just - * changes what is shown when rendered. - * - * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left. - * - * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left - * half of it, you could call `setCrop(0, 0, 400, 600)`. - * - * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop - * an area of 200x100 when applied to a Game Object that had a scale factor of 2. - * - * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument. - * - * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`. - * - * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow - * the renderer to skip several internal calculations. - * - * @method Phaser.GameObjects.Components.Crop#setCrop - * @since 3.11.0 - * - * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored. - * @param {number} [y] - The y coordinate to start the crop from. - * @param {number} [width] - The width of the crop rectangle in pixels. - * @param {number} [height] - The height of the crop rectangle in pixels. - * - * @return {this} This Game Object instance. - */ - setCrop: function (x, y, width, height) - { - if (x === undefined) - { - this.isCropped = false; - } - else if (this.frame) - { - if (typeof x === 'number') - { - this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY); - } - else - { - var rect = x; - - this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY); - } - - this.isCropped = true; - } - - return this; - }, - - /** - * Internal method that returns a blank, well-formed crop object for use by a Game Object. - * - * @method Phaser.GameObjects.Components.Crop#resetCropObject - * @private - * @since 3.12.0 - * - * @return {object} The crop object. - */ - resetCropObject: function () - { - return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 }; - } - -}; - -module.exports = Crop; - - -/***/ }), -/* 58 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * Provides methods used for calculating and setting the size of a non-Frame based Game Object. - * Should be applied as a mixin and not used directly. - * - * @name Phaser.GameObjects.Components.ComputedSize - * @since 3.0.0 - */ - -var ComputedSize = { - - /** - * The native (un-scaled) width of this Game Object. - * - * Changing this value will not change the size that the Game Object is rendered in-game. - * For that you need to either set the scale of the Game Object (`setScale`) or use - * the `displayWidth` property. - * - * @name Phaser.GameObjects.Components.ComputedSize#width - * @type {number} - * @since 3.0.0 - */ - width: 0, - - /** - * The native (un-scaled) height of this Game Object. - * - * Changing this value will not change the size that the Game Object is rendered in-game. - * For that you need to either set the scale of the Game Object (`setScale`) or use - * the `displayHeight` property. - * - * @name Phaser.GameObjects.Components.ComputedSize#height - * @type {number} - * @since 3.0.0 - */ - height: 0, - - /** - * The displayed width of this Game Object. - * - * This value takes into account the scale factor. - * - * Setting this value will adjust the Game Object's scale property. - * - * @name Phaser.GameObjects.Components.ComputedSize#displayWidth - * @type {number} - * @since 3.0.0 - */ - displayWidth: { - - get: function () - { - return this.scaleX * this.width; - }, - - set: function (value) - { - this.scaleX = value / this.width; - } - - }, - - /** - * The displayed height of this Game Object. - * - * This value takes into account the scale factor. - * - * Setting this value will adjust the Game Object's scale property. - * - * @name Phaser.GameObjects.Components.ComputedSize#displayHeight - * @type {number} - * @since 3.0.0 - */ - displayHeight: { - - get: function () - { - return this.scaleY * this.height; - }, - - set: function (value) - { - this.scaleY = value / this.height; - } - - }, - - /** - * Sets the internal size of this Game Object, as used for frame or physics body creation. - * - * This will not change the size that the Game Object is rendered in-game. - * For that you need to either set the scale of the Game Object (`setScale`) or call the - * `setDisplaySize` method, which is the same thing as changing the scale but allows you - * to do so by giving pixel values. - * - * If you have enabled this Game Object for input, changing the size will _not_ change the - * size of the hit area. To do this you should adjust the `input.hitArea` object directly. - * - * @method Phaser.GameObjects.Components.ComputedSize#setSize - * @since 3.4.0 - * - * @param {number} width - The width of this Game Object. - * @param {number} height - The height of this Game Object. - * - * @return {this} This Game Object instance. - */ - setSize: function (width, height) - { - this.width = width; - this.height = height; - - return this; - }, - - /** - * Sets the display size of this Game Object. - * - * Calling this will adjust the scale. - * - * @method Phaser.GameObjects.Components.ComputedSize#setDisplaySize - * @since 3.4.0 - * - * @param {number} width - The width of this Game Object. - * @param {number} height - The height of this Game Object. - * - * @return {this} This Game Object instance. - */ - setDisplaySize: function (width, height) - { - this.displayWidth = width; - this.displayHeight = height; - - return this; - } - -}; - -module.exports = ComputedSize; - - -/***/ }), -/* 59 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var BlendModes = __webpack_require__(18); - -/** - * Provides methods used for setting the blend mode of a Game Object. - * Should be applied as a mixin and not used directly. - * - * @name Phaser.GameObjects.Components.BlendMode - * @since 3.0.0 - */ - -var BlendMode = { - - /** - * Private internal value. Holds the current blend mode. - * - * @name Phaser.GameObjects.Components.BlendMode#_blendMode - * @type {integer} - * @private - * @default 0 - * @since 3.0.0 - */ - _blendMode: BlendModes.NORMAL, - - /** - * 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: - * - * * ADD - * * MULTIPLY - * * SCREEN - * - * 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. - * - * @name Phaser.GameObjects.Components.BlendMode#blendMode - * @type {(Phaser.BlendModes|string)} - * @since 3.0.0 - */ - blendMode: { - - get: function () - { - return this._blendMode; - }, - - set: function (value) - { - if (typeof value === 'string') - { - value = BlendModes[value]; - } - - value |= 0; - - if (value >= -1) - { - this._blendMode = value; - } - } - - }, - - /** - * 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: - * - * * ADD - * * MULTIPLY - * * SCREEN - * - * 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. - * - * @method Phaser.GameObjects.Components.BlendMode#setBlendMode - * @since 3.0.0 - * - * @param {(string|Phaser.BlendModes)} value - The BlendMode value. Either a string or a CONST. - * - * @return {this} This Game Object instance. - */ - setBlendMode: function (value) - { - this.blendMode = value; - - return this; - } - -}; - -module.exports = BlendMode; - - -/***/ }), -/* 60 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Class = __webpack_require__(0); - -/** - * This event is dispatched when an animation starts playing. - * - * @event Phaser.GameObjects.Components.Animation#onStartEvent - * @param {Phaser.Animations.Animation} animation - Reference to the currently playing animation. - * @param {Phaser.Animations.AnimationFrame} frame - Reference to the current Animation Frame. - */ - -/** - * This event is dispatched when an animation repeats. - * - * @event Phaser.GameObjects.Components.Animation#onRepeatEvent - * @param {Phaser.Animations.Animation} animation - Reference to the currently playing animation. - * @param {Phaser.Animations.AnimationFrame} frame - Reference to the current Animation Frame. - * @param {integer} repeatCount - The number of times this animation has repeated. - */ - -/** - * This event is dispatched when an animation updates. This happens when the animation frame changes, - * based on the animation frame rate and other factors like timeScale and delay. - * - * @event Phaser.GameObjects.Components.Animation#onUpdateEvent - * @param {Phaser.Animations.Animation} animation - Reference to the currently playing animation. - * @param {Phaser.Animations.AnimationFrame} frame - Reference to the current Animation Frame. - */ - -/** - * This event is dispatched when an animation completes playing, either naturally or via Animation.stop. - * - * @event Phaser.GameObjects.Components.Animation#onCompleteEvent - * @param {Phaser.Animations.Animation} animation - Reference to the currently playing animation. - * @param {Phaser.Animations.AnimationFrame} frame - Reference to the current Animation Frame. - */ - -/** - * @classdesc - * A Game Object Animation Controller. - * - * This controller lives as an instance within a Game Object, accessible as `sprite.anims`. - * - * @class Animation - * @memberOf Phaser.GameObjects.Components - * @constructor - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject} parent - The Game Object to which this animation controller belongs. - */ -var Animation = new Class({ - - initialize: - - function Animation (parent) - { - /** - * The Game Object to which this animation controller belongs. - * - * @name Phaser.GameObjects.Components.Animation#parent - * @type {Phaser.GameObjects.GameObject} - * @since 3.0.0 - */ - this.parent = parent; - - /** - * A reference to the global Animation Manager. - * - * @name Phaser.GameObjects.Components.Animation#animationManager - * @type {Phaser.Animations.AnimationManager} - * @since 3.0.0 - */ - this.animationManager = parent.scene.sys.anims; - - this.animationManager.once('remove', this.remove, this); - - /** - * Is an animation currently playing or not? - * - * @name Phaser.GameObjects.Components.Animation#isPlaying - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.isPlaying = false; - - /** - * The current Animation loaded into this Animation Controller. - * - * @name Phaser.GameObjects.Components.Animation#currentAnim - * @type {?Phaser.Animations.Animation} - * @default null - * @since 3.0.0 - */ - this.currentAnim = null; - - /** - * The current AnimationFrame being displayed by this Animation Controller. - * - * @name Phaser.GameObjects.Components.Animation#currentFrame - * @type {?Phaser.Animations.AnimationFrame} - * @default null - * @since 3.0.0 - */ - this.currentFrame = null; - - /** - * Time scale factor. - * - * @name Phaser.GameObjects.Components.Animation#_timeScale - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - this._timeScale = 1; - - /** - * The frame rate of playback in frames per second. - * The default is 24 if the `duration` property is `null`. - * - * @name Phaser.GameObjects.Components.Animation#frameRate - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.frameRate = 0; - - /** - * How long the animation should play for, in milliseconds. - * If the `frameRate` property has been set then it overrides this value, - * otherwise the `frameRate` is derived from `duration`. - * - * @name Phaser.GameObjects.Components.Animation#duration - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.duration = 0; - - /** - * ms per frame, not including frame specific modifiers that may be present in the Animation data. - * - * @name Phaser.GameObjects.Components.Animation#msPerFrame - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.msPerFrame = 0; - - /** - * Skip frames if the time lags, or always advanced anyway? - * - * @name Phaser.GameObjects.Components.Animation#skipMissedFrames - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.skipMissedFrames = true; - - /** - * A delay before starting playback, in milliseconds. - * - * @name Phaser.GameObjects.Components.Animation#_delay - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._delay = 0; - - /** - * Number of times to repeat the animation (-1 for infinity) - * - * @name Phaser.GameObjects.Components.Animation#_repeat - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._repeat = 0; - - /** - * Delay before the repeat starts, in milliseconds. - * - * @name Phaser.GameObjects.Components.Animation#_repeatDelay - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._repeatDelay = 0; - - /** - * Should the animation yoyo? (reverse back down to the start) before repeating? - * - * @name Phaser.GameObjects.Components.Animation#_yoyo - * @type {boolean} - * @private - * @default false - * @since 3.0.0 - */ - this._yoyo = false; - - /** - * Will the playhead move forwards (`true`) or in reverse (`false`). - * - * @name Phaser.GameObjects.Components.Animation#forward - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.forward = true; - - /** - * An Internal trigger that's play the animation in reverse mode ('true') or not ('false'), - * needed because forward can be changed by yoyo feature. - * - * @name Phaser.GameObjects.Components.Animation#forward - * @type {boolean} - * @default false - * @since 3.12.0 - */ - this._reverse = false; - - /** - * Internal time overflow accumulator. - * - * @name Phaser.GameObjects.Components.Animation#accumulator - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.accumulator = 0; - - /** - * The time point at which the next animation frame will change. - * - * @name Phaser.GameObjects.Components.Animation#nextTick - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.nextTick = 0; - - /** - * An internal counter keeping track of how many repeats are left to play. - * - * @name Phaser.GameObjects.Components.Animation#repeatCounter - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.repeatCounter = 0; - - /** - * An internal flag keeping track of pending repeats. - * - * @name Phaser.GameObjects.Components.Animation#pendingRepeat - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.pendingRepeat = false; - - /** - * Is the Animation paused? - * - * @name Phaser.GameObjects.Components.Animation#_paused - * @type {boolean} - * @private - * @default false - * @since 3.0.0 - */ - this._paused = false; - - /** - * Was the animation previously playing before being paused? - * - * @name Phaser.GameObjects.Components.Animation#_wasPlaying - * @type {boolean} - * @private - * @default false - * @since 3.0.0 - */ - this._wasPlaying = false; - - /** - * Internal property tracking if this Animation is waiting to stop. - * - * 0 = No - * 1 = Waiting for ms to pass - * 2 = Waiting for repeat - * 3 = Waiting for specific frame - * - * @name Phaser.GameObjects.Components.Animation#_pendingStop - * @type {integer} - * @private - * @since 3.4.0 - */ - this._pendingStop = 0; - - /** - * Internal property used by _pendingStop. - * - * @name Phaser.GameObjects.Components.Animation#_pendingStopValue - * @type {any} - * @private - * @since 3.4.0 - */ - this._pendingStopValue; - }, - - /** - * Sets the amount of time, in milliseconds, that the animation will be delayed before starting playback. - * - * @method Phaser.GameObjects.Components.Animation#setDelay - * @since 3.4.0 - * - * @param {integer} [value=0] - The amount of time, in milliseconds, to wait before starting playback. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - setDelay: function (value) - { - if (value === undefined) { value = 0; } - - this._delay = value; - - return this.parent; - }, - - /** - * Gets the amount of time, in milliseconds that the animation will be delayed before starting playback. - * - * @method Phaser.GameObjects.Components.Animation#getDelay - * @since 3.4.0 - * - * @return {integer} The amount of time, in milliseconds, the Animation will wait before starting playback. - */ - getDelay: function () - { - return this._delay; - }, - - /** - * Waits for the specified delay, in milliseconds, then starts playback of the requested animation. - * - * @method Phaser.GameObjects.Components.Animation#delayedPlay - * @since 3.0.0 - * - * @param {integer} delay - The delay, in milliseconds, to wait before starting the animation playing. - * @param {string} key - The key of the animation to play. - * @param {integer} [startFrame=0] - The frame of the animation to start from. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - delayedPlay: function (delay, key, startFrame) - { - this.play(key, true, startFrame); - - this.nextTick += delay; - - return this.parent; - }, - - /** - * Returns the key of the animation currently loaded into this component. - * - * @method Phaser.GameObjects.Components.Animation#getCurrentKey - * @since 3.0.0 - * - * @return {string} The key of the Animation loaded into this component. - */ - getCurrentKey: function () - { - if (this.currentAnim) - { - return this.currentAnim.key; - } - }, - - /** - * Internal method used to load an animation into this component. - * - * @method Phaser.GameObjects.Components.Animation#load - * @protected - * @since 3.0.0 - * - * @param {string} key - The key of the animation to load. - * @param {integer} [startFrame=0] - The start frame of the animation to load. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - load: function (key, startFrame) - { - if (startFrame === undefined) { startFrame = 0; } - - if (this.isPlaying) - { - this.stop(); - } - - // Load the new animation in - this.animationManager.load(this, key, startFrame); - - return this.parent; - }, - - /** - * Pause the current animation and set the `isPlaying` property to `false`. - * You can optionally pause it at a specific frame. - * - * @method Phaser.GameObjects.Components.Animation#pause - * @since 3.0.0 - * - * @param {Phaser.Animations.AnimationFrame} [atFrame] - An optional frame to set after pausing the animation. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - pause: function (atFrame) - { - if (!this._paused) - { - this._paused = true; - this._wasPlaying = this.isPlaying; - this.isPlaying = false; - } - - if (atFrame !== undefined) - { - this.updateFrame(atFrame); - } - - return this.parent; - }, - - /** - * Resumes playback of a paused animation and sets the `isPlaying` property to `true`. - * You can optionally tell it to start playback from a specific frame. - * - * @method Phaser.GameObjects.Components.Animation#resume - * @since 3.0.0 - * - * @param {Phaser.Animations.AnimationFrame} [fromFrame] - An optional frame to set before restarting playback. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - resume: function (fromFrame) - { - if (this._paused) - { - this._paused = false; - this.isPlaying = this._wasPlaying; - } - - if (fromFrame !== undefined) - { - this.updateFrame(fromFrame); - } - - return this.parent; - }, - - /** - * `true` if the current animation is paused, otherwise `false`. - * - * @name Phaser.GameObjects.Components.Animation#isPaused - * @readOnly - * @type {boolean} - * @since 3.4.0 - */ - isPaused: { - - get: function () - { - return this._paused; - } - - }, - - /** - * Plays an Animation on the Game Object that owns this Animation Component. - * - * @method Phaser.GameObjects.Components.Animation#play - * @fires Phaser.GameObjects.Components.Animation#onStartEvent - * @since 3.0.0 - * - * @param {string} key - The string-based key of the animation to play, as defined previously in the Animation Manager. - * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. - * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - play: function (key, ignoreIfPlaying, startFrame) - { - if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } - if (startFrame === undefined) { startFrame = 0; } - - if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key) - { - return this.parent; - } - - this.forward = true; - this._reverse = false; - return this._startAnimation(key, startFrame); - }, - - /** - * Plays an Animation (in reverse mode) on the Game Object that owns this Animation Component. - * - * @method Phaser.GameObjects.Components.Animation#playReverse - * @fires Phaser.GameObjects.Components.Animation#onStartEvent - * @since 3.12.0 - * - * @param {string} key - The string-based key of the animation to play, as defined previously in the Animation Manager. - * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. - * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - playReverse: function (key, ignoreIfPlaying, startFrame) - { - if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } - if (startFrame === undefined) { startFrame = 0; } - - if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key) - { - return this.parent; - } - - this.forward = false; - this._reverse = true; - return this._startAnimation(key, startFrame); - }, - - /** - * Load an Animation and fires 'onStartEvent' event, - * extracted from 'play' method - * - * @method Phaser.GameObjects.Components.Animation#_startAnimation - * @fires Phaser.GameObjects.Components.Animation#onStartEvent - * @since 3.12.0 - * - * @param {string} key - The string-based key of the animation to play, as defined previously in the Animation Manager. - * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - _startAnimation: function (key, startFrame) - { - this.load(key, startFrame); - - var anim = this.currentAnim; - var gameObject = this.parent; - - // Should give us 9,007,199,254,740,991 safe repeats - this.repeatCounter = (this._repeat === -1) ? Number.MAX_VALUE : this._repeat; - - anim.getFirstTick(this); - - this.isPlaying = true; - this.pendingRepeat = false; - - if (anim.showOnStart) - { - gameObject.visible = true; - } - - gameObject.emit('animationstart', this.currentAnim, this.currentFrame); - - return gameObject; - }, - - /** - * Reverse an Animation that is already playing on the Game Object. - * - * @method Phaser.GameObjects.Components.Animation#reverse - * @since 3.12.0 - * - * @param {string} key - The string-based key of the animation to play, as defined previously in the Animation Manager. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - reverse: function (key) - { - if (!this.isPlaying || this.currentAnim.key !== key) { return this.parent; } - this._reverse = !this._reverse; - this.forward = !this.forward; - - return this.parent; - }, - - /** - * Returns a value between 0 and 1 indicating how far this animation is through, ignoring repeats and yoyos. - * If the animation has a non-zero repeat defined, `getProgress` and `getTotalProgress` will be different - * because `getProgress` doesn't include any repeats or repeat delays, whereas `getTotalProgress` does. - * - * @method Phaser.GameObjects.Components.Animation#getProgress - * @since 3.4.0 - * - * @return {number} The progress of the current animation, between 0 and 1. - */ - getProgress: function () - { - var p = this.currentFrame.progress; - - if (!this.forward) - { - p = 1 - p; - } - - return p; - }, - - /** - * Takes a value between 0 and 1 and uses it to set how far this animation is through playback. - * Does not factor in repeats or yoyos, but does handle playing forwards or backwards. - * - * @method Phaser.GameObjects.Components.Animation#setProgress - * @since 3.4.0 - * - * @param {number} [value=0] - The progress value, between 0 and 1. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - setProgress: function (value) - { - if (!this.forward) - { - value = 1 - value; - } - - this.setCurrentFrame(this.currentAnim.getFrameByProgress(value)); - - return this.parent; - }, - - /** - * Handle the removal of an animation from the Animation Manager. - * - * @method Phaser.GameObjects.Components.Animation#remove - * @since 3.0.0 - * - * @param {string} [key] - The key of the removed Animation. - * @param {Phaser.Animations.Animation} [animation] - The removed Animation. - */ - remove: function (key, animation) - { - if (animation === undefined) { animation = this.currentAnim; } - - if (this.isPlaying && animation.key === this.currentAnim.key) - { - this.stop(); - - this.setCurrentFrame(this.currentAnim.frames[0]); - } - }, - - /** - * Gets the number of times that the animation will repeat - * after its first iteration. For example, if returns 1, the animation will - * play a total of twice (the initial play plus 1 repeat). - * A value of -1 means the animation will repeat indefinitely. - * - * @method Phaser.GameObjects.Components.Animation#getRepeat - * @since 3.4.0 - * - * @return {integer} The number of times that the animation will repeat. - */ - getRepeat: function () - { - return this._repeat; - }, - - /** - * Sets the number of times that the animation should repeat - * after its first iteration. For example, if repeat is 1, the animation will - * play a total of twice (the initial play plus 1 repeat). - * To repeat indefinitely, use -1. repeat should always be an integer. - * - * @method Phaser.GameObjects.Components.Animation#setRepeat - * @since 3.4.0 - * - * @param {integer} value - The number of times that the animation should repeat. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - setRepeat: function (value) - { - this._repeat = value; - - this.repeatCounter = 0; - - return this.parent; - }, - - /** - * Gets the amount of delay between repeats, if any. - * - * @method Phaser.GameObjects.Components.Animation#getRepeatDelay - * @since 3.4.0 - * - * @return {number} The delay between repeats. - */ - getRepeatDelay: function () - { - return this._repeatDelay; - }, - - /** - * Sets the amount of time in seconds between repeats. - * For example, if `repeat` is 2 and `repeatDelay` is 10, the animation will play initially, - * then wait for 10 seconds before repeating, then play again, then wait another 10 seconds - * before doing its final repeat. - * - * @method Phaser.GameObjects.Components.Animation#setRepeatDelay - * @since 3.4.0 - * - * @param {number} value - The delay to wait between repeats, in seconds. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - setRepeatDelay: function (value) - { - this._repeatDelay = value; - - return this.parent; - }, - - /** - * Restarts the current animation from its beginning, optionally including its delay value. - * - * @method Phaser.GameObjects.Components.Animation#restart - * @since 3.0.0 - * - * @param {boolean} [includeDelay=false] - Whether to include the delay value of the animation when restarting. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - restart: function (includeDelay) - { - if (includeDelay === undefined) { includeDelay = false; } - - this.currentAnim.getFirstTick(this, includeDelay); - - this.forward = true; - this.isPlaying = true; - this.pendingRepeat = false; - this._paused = false; - - // Set frame - this.updateFrame(this.currentAnim.frames[0]); - - return this.parent; - }, - - /** - * Immediately stops the current animation from playing and dispatches the `animationcomplete` event. - * - * @method Phaser.GameObjects.Components.Animation#stop - * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent - * @since 3.0.0 - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - stop: function () - { - this._pendingStop = 0; - - this.isPlaying = false; - - var gameObject = this.parent; - - gameObject.emit('animationcomplete', this.currentAnim, this.currentFrame); - - return gameObject; - }, - - /** - * Stops the current animation from playing after the specified time delay, given in milliseconds. - * - * @method Phaser.GameObjects.Components.Animation#stopAfterDelay - * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent - * @since 3.4.0 - * - * @param {integer} delay - The number of milliseconds to wait before stopping this animation. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - stopAfterDelay: function (delay) - { - this._pendingStop = 1; - this._pendingStopValue = delay; - - return this.parent; - }, - - /** - * Stops the current animation from playing when it next repeats. - * - * @method Phaser.GameObjects.Components.Animation#stopOnRepeat - * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent - * @since 3.4.0 - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - stopOnRepeat: function () - { - this._pendingStop = 2; - - return this.parent; - }, - - /** - * Stops the current animation from playing when it next sets the given frame. - * If this frame doesn't exist within the animation it will not stop it from playing. - * - * @method Phaser.GameObjects.Components.Animation#stopOnFrame - * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent - * @since 3.4.0 - * - * @param {Phaser.Animations.AnimationFrame} delay - The frame to check before stopping this animation. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - stopOnFrame: function (frame) - { - this._pendingStop = 3; - this._pendingStopValue = frame; - - return this.parent; - }, - - /** - * Sets the Time Scale factor, allowing you to make the animation go go faster or slower than default. - * Where 1 = normal speed (the default), 0.5 = half speed, 2 = double speed, etc. - * - * @method Phaser.GameObjects.Components.Animation#setTimeScale - * @since 3.4.0 - * - * @param {number} [value=1] - The time scale factor, where 1 is no change, 0.5 is half speed, etc. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - setTimeScale: function (value) - { - if (value === undefined) { value = 1; } - - this._timeScale = value; - - return this.parent; - }, - - /** - * Gets the Time Scale factor. - * - * @method Phaser.GameObjects.Components.Animation#getTimeScale - * @since 3.4.0 - * - * @return {number} The Time Scale value. - */ - getTimeScale: function () - { - return this._timeScale; - }, - - /** - * Returns the total number of frames in this animation. - * - * @method Phaser.GameObjects.Components.Animation#getTotalFrames - * @since 3.4.0 - * - * @return {integer} The total number of frames in this animation. - */ - getTotalFrames: function () - { - return this.currentAnim.frames.length; - }, - - /** - * The internal update loop for the Animation Component. - * - * @method Phaser.GameObjects.Components.Animation#update - * @since 3.0.0 - * - * @param {number} time - The current timestamp. - * @param {number} delta - The delta time, in ms, elapsed since the last frame. - */ - update: function (time, delta) - { - if (!this.currentAnim || !this.isPlaying || this.currentAnim.paused) - { - return; - } - - this.accumulator += delta * this._timeScale; - - if (this._pendingStop === 1) - { - this._pendingStopValue -= delta; - - if (this._pendingStopValue <= 0) - { - return this.currentAnim.completeAnimation(this); - } - } - - if (this.accumulator >= this.nextTick) - { - this.currentAnim.setFrame(this); - } - }, - - /** - * Sets the given Animation Frame as being the current frame - * and applies it to the parent Game Object, adjusting its size and origin as needed. - * - * @method Phaser.GameObjects.Components.Animation#setCurrentFrame - * @since 3.4.0 - * - * @param {Phaser.Animations.AnimationFrame} animationFrame - The Animation Frame to set as being current. - * - * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. - */ - setCurrentFrame: function (animationFrame) - { - var gameObject = this.parent; - - this.currentFrame = animationFrame; - - gameObject.texture = animationFrame.frame.texture; - gameObject.frame = animationFrame.frame; - - gameObject.setSizeToFrame(); - - if (animationFrame.frame.customPivot) - { - gameObject.setOrigin(animationFrame.frame.pivotX, animationFrame.frame.pivotY); - } - else - { - gameObject.updateDisplayOrigin(); - } - - return gameObject; - }, - - /** - * Internal frame change handler. - * - * @method Phaser.GameObjects.Components.Animation#updateFrame - * @fires Phaser.GameObjects.Components.Animation#onUpdateEvent - * @private - * @since 3.0.0 - * - * @param {Phaser.Animations.AnimationFrame} animationFrame - The animation frame to change to. - */ - updateFrame: function (animationFrame) - { - var gameObject = this.setCurrentFrame(animationFrame); - - if (this.isPlaying) - { - if (animationFrame.setAlpha) - { - gameObject.alpha = animationFrame.alpha; - } - - var anim = this.currentAnim; - - gameObject.emit('animationupdate', anim, animationFrame); - - if (this._pendingStop === 3 && this._pendingStopValue === animationFrame) - { - this.currentAnim.completeAnimation(this); - } - } - }, - - /** - * Sets if the current Animation will yoyo when it reaches the end. - * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again. - * - * @method Phaser.GameObjects.Components.Animation#setYoyo - * @since 3.4.0 - * - * @param {boolean} [value=false] - `true` if the animation should yoyo, `false` to not. - * - * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. - */ - setYoyo: function (value) - { - if (value === undefined) { value = false; } - - this._yoyo = value; - - return this.parent; - }, - - /** - * Gets if the current Animation will yoyo when it reaches the end. - * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again. - * - * @method Phaser.GameObjects.Components.Animation#getYoyo - * @since 3.4.0 - * - * @return {boolean} `true` if the animation is set to yoyo, `false` if not. - */ - getYoyo: function () - { - return this._yoyo; - }, - - /** - * Destroy this Animation component. - * - * Unregisters event listeners and cleans up its references. - * - * @method Phaser.GameObjects.Components.Animation#destroy - * @since 3.0.0 - */ - destroy: function () - { - this.animationManager.off('remove', this.remove, this); - - this.animationManager = null; - this.parent = null; - - this.currentAnim = null; - this.currentFrame = null; - } - -}); - -module.exports = Animation; - - -/***/ }), -/* 61 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * Force a value within the boundaries by clamping it to the range `min`, `max`. - * - * @function Phaser.Math.Clamp - * @since 3.0.0 - * - * @param {number} value - The value to be clamped. - * @param {number} min - The minimum bounds. - * @param {number} max - The maximum bounds. - * - * @return {number} The clamped value. - */ -var Clamp = function (value, min, max) -{ - return Math.max(min, Math.min(max, value)); -}; - -module.exports = Clamp; - - -/***/ }), -/* 62 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Clamp = __webpack_require__(61); - -// bitmask flag for GameObject.renderMask -var _FLAG = 2; // 0010 - -/** - * Provides methods used for setting the alpha properties of a Game Object. - * Should be applied as a mixin and not used directly. - * - * @name Phaser.GameObjects.Components.Alpha - * @since 3.0.0 - */ - -var Alpha = { - - /** - * Private internal value. Holds the global alpha value. - * - * @name Phaser.GameObjects.Components.Alpha#_alpha - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - _alpha: 1, - - /** - * Private internal value. Holds the top-left alpha value. - * - * @name Phaser.GameObjects.Components.Alpha#_alphaTL - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - _alphaTL: 1, - - /** - * Private internal value. Holds the top-right alpha value. - * - * @name Phaser.GameObjects.Components.Alpha#_alphaTR - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - _alphaTR: 1, - - /** - * Private internal value. Holds the bottom-left alpha value. - * - * @name Phaser.GameObjects.Components.Alpha#_alphaBL - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - _alphaBL: 1, - - /** - * Private internal value. Holds the bottom-right alpha value. - * - * @name Phaser.GameObjects.Components.Alpha#_alphaBR - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - _alphaBR: 1, - - /** - * Clears all alpha values associated with this Game Object. - * - * Immediately sets the alpha levels back to 1 (fully opaque). - * - * @method Phaser.GameObjects.Components.Alpha#clearAlpha - * @since 3.0.0 - * - * @return {this} This Game Object instance. - */ - clearAlpha: function () - { - return this.setAlpha(1); - }, - - /** - * 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. - * - * If your game is running under WebGL you can optionally specify four different alpha values, each of which - * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. - * - * @method Phaser.GameObjects.Components.Alpha#setAlpha - * @since 3.0.0 - * - * @param {number} [topLeft=1] - The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. - * @param {number} [topRight] - The alpha value used for the top-right of the Game Object. WebGL only. - * @param {number} [bottomLeft] - The alpha value used for the bottom-left of the Game Object. WebGL only. - * @param {number} [bottomRight] - The alpha value used for the bottom-right of the Game Object. WebGL only. - * - * @return {this} This Game Object instance. - */ - setAlpha: function (topLeft, topRight, bottomLeft, bottomRight) - { - if (topLeft === undefined) { topLeft = 1; } - - // Treat as if there is only one alpha value for the whole Game Object - if (topRight === undefined) - { - this.alpha = topLeft; - } - else - { - this._alphaTL = Clamp(topLeft, 0, 1); - this._alphaTR = Clamp(topRight, 0, 1); - this._alphaBL = Clamp(bottomLeft, 0, 1); - this._alphaBR = Clamp(bottomRight, 0, 1); - } - - return this; - }, - - /** - * The alpha value of the Game Object. - * - * This is a global value, impacting the entire Game Object, not just a region of it. - * - * @name Phaser.GameObjects.Components.Alpha#alpha - * @type {number} - * @since 3.0.0 - */ - alpha: { - - get: function () - { - return this._alpha; - }, - - set: function (value) - { - var v = Clamp(value, 0, 1); - - this._alpha = v; - this._alphaTL = v; - this._alphaTR = v; - this._alphaBL = v; - this._alphaBR = v; - - if (v === 0) - { - this.renderFlags &= ~_FLAG; - } - else - { - this.renderFlags |= _FLAG; - } - } - - }, - - /** - * The alpha value starting from the top-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * - * @name Phaser.GameObjects.Components.Alpha#alphaTopLeft - * @type {number} - * @webglOnly - * @since 3.0.0 - */ - alphaTopLeft: { - - get: function () - { - return this._alphaTL; - }, - - set: function (value) - { - var v = Clamp(value, 0, 1); - - this._alphaTL = v; - - if (v !== 0) - { - this.renderFlags |= _FLAG; - } - } - - }, - - /** - * The alpha value starting from the top-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * - * @name Phaser.GameObjects.Components.Alpha#alphaTopRight - * @type {number} - * @webglOnly - * @since 3.0.0 - */ - alphaTopRight: { - - get: function () - { - return this._alphaTR; - }, - - set: function (value) - { - var v = Clamp(value, 0, 1); - - this._alphaTR = v; - - if (v !== 0) - { - this.renderFlags |= _FLAG; - } - } - - }, - - /** - * The alpha value starting from the bottom-left of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * - * @name Phaser.GameObjects.Components.Alpha#alphaBottomLeft - * @type {number} - * @webglOnly - * @since 3.0.0 - */ - alphaBottomLeft: { - - get: function () - { - return this._alphaBL; - }, - - set: function (value) - { - var v = Clamp(value, 0, 1); - - this._alphaBL = v; - - if (v !== 0) - { - this.renderFlags |= _FLAG; - } - } - - }, - - /** - * The alpha value starting from the bottom-right of the Game Object. - * This value is interpolated from the corner to the center of the Game Object. - * - * @name Phaser.GameObjects.Components.Alpha#alphaBottomRight - * @type {number} - * @webglOnly - * @since 3.0.0 - */ - alphaBottomRight: { - - get: function () - { - return this._alphaBR; - }, - - set: function (value) - { - var v = Clamp(value, 0, 1); - - this._alphaBR = v; - - if (v !== 0) - { - this.renderFlags |= _FLAG; - } - } - - } - -}; - -module.exports = Alpha; - - -/***/ }), -/* 63 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Class = __webpack_require__(0); - -/** - * @callback EachSetCallback - * @generic E - [entry] - * - * @param {*} entry - [description] - * @param {number} index - [description] - * - * @return {?boolean} [description] - */ - -/** - * @classdesc - * A Set is a collection of unique elements. - * - * @class Set - * @memberOf Phaser.Structs - * @constructor - * @since 3.0.0 - * - * @generic T - * @genericUse {T[]} - [elements] - * - * @param {Array.<*>} [elements] - [description] - */ -var Set = new Class({ - - initialize: - - function Set (elements) - { - /** - * [description] - * - * @genericUse {T[]} - [$type] - * - * @name Phaser.Structs.Set#entries - * @type {Array.<*>} - * @default [] - * @since 3.0.0 - */ - this.entries = []; - - if (Array.isArray(elements)) - { - for (var i = 0; i < elements.length; i++) - { - this.set(elements[i]); - } - } - }, - - /** - * [description] - * - * @method Phaser.Structs.Set#set - * @since 3.0.0 - * - * @genericUse {T} - [value] - * @genericUse {Phaser.Structs.Set.} - [$return] - * - * @param {*} value - [description] - * - * @return {Phaser.Structs.Set} This Set object. - */ - set: function (value) - { - if (this.entries.indexOf(value) === -1) - { - this.entries.push(value); - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Structs.Set#get - * @since 3.0.0 - * - * @genericUse {T} - [value,$return] - * - * @param {string} property - [description] - * @param {*} value - [description] - * - * @return {*} [description] - */ - get: function (property, value) - { - for (var i = 0; i < this.entries.length; i++) - { - var entry = this.entries[i]; - - if (entry[property] === value) - { - return entry; - } - } - }, - - /** - * [description] - * - * @method Phaser.Structs.Set#getArray - * @since 3.0.0 - * - * @genericUse {T[]} - [$return] - * - * @return {Array.<*>} [description] - */ - getArray: function () - { - return this.entries.slice(0); - }, - - /** - * [description] - * - * @method Phaser.Structs.Set#delete - * @since 3.0.0 - * - * @genericUse {T} - [value] - * @genericUse {Phaser.Structs.Set.} - [$return] - * - * @param {*} value - [description] - * - * @return {Phaser.Structs.Set} This Set object. - */ - delete: function (value) - { - var index = this.entries.indexOf(value); - - if (index > -1) - { - this.entries.splice(index, 1); - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Structs.Set#dump - * @since 3.0.0 - */ - dump: function () - { - // eslint-disable-next-line no-console - console.group('Set'); - - for (var i = 0; i < this.entries.length; i++) - { - var entry = this.entries[i]; - console.log(entry); - } - - // eslint-disable-next-line no-console - console.groupEnd(); - }, - - /** - * For when you know this Set will be modified during the iteration. - * - * @method Phaser.Structs.Set#each - * @since 3.0.0 - * - * @genericUse {EachSetCallback.} - [callback] - * @genericUse {Phaser.Structs.Set.} - [$return] - * - * @param {EachSetCallback} callback - [description] - * @param {*} callbackScope - [description] - * - * @return {Phaser.Structs.Set} This Set object. - */ - each: function (callback, callbackScope) - { - var i; - var temp = this.entries.slice(); - var len = temp.length; - - if (callbackScope) - { - for (i = 0; i < len; i++) - { - if (callback.call(callbackScope, temp[i], i) === false) - { - break; - } - } - } - else - { - for (i = 0; i < len; i++) - { - if (callback(temp[i], i) === false) - { - break; - } - } - } - - return this; - }, - - /** - * For when you absolutely know this Set won't be modified during the iteration. - * - * @method Phaser.Structs.Set#iterate - * @since 3.0.0 - * - * @genericUse {EachSetCallback.} - [callback] - * @genericUse {Phaser.Structs.Set.} - [$return] - * - * @param {EachSetCallback} callback - [description] - * @param {*} [callbackScope] - [description] - * - * @return {Phaser.Structs.Set} This Set object. - */ - iterate: function (callback, callbackScope) - { - var i; - var len = this.entries.length; - - if (callbackScope) - { - for (i = 0; i < len; i++) - { - if (callback.call(callbackScope, this.entries[i], i) === false) - { - break; - } - } - } - else - { - for (i = 0; i < len; i++) - { - if (callback(this.entries[i], i) === false) - { - break; - } - } - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Structs.Set#iterateLocal - * @since 3.0.0 - * - * @genericUse {Phaser.Structs.Set.} - [$return] - * - * @param {string} callbackKey - [description] - * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child. - * - * @return {Phaser.Structs.Set} This Set object. - */ - iterateLocal: function (callbackKey) - { - var i; - var args = []; - - for (i = 1; i < arguments.length; i++) - { - args.push(arguments[i]); - } - - var len = this.entries.length; - - for (i = 0; i < len; i++) - { - var entry = this.entries[i]; - - entry[callbackKey].apply(entry, args); - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Structs.Set#clear - * @since 3.0.0 - * - * @genericUse {Phaser.Structs.Set.} - [$return] - * - * @return {Phaser.Structs.Set} This Set object. - */ - clear: function () - { - this.entries.length = 0; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Structs.Set#contains - * @since 3.0.0 - * - * @genericUse {T} - [value] - * - * @param {*} value - [description] - * - * @return {boolean} [description] - */ - contains: function (value) - { - return (this.entries.indexOf(value) > -1); - }, - - /** - * [description] - * - * @method Phaser.Structs.Set#union - * @since 3.0.0 - * - * @genericUse {Phaser.Structs.Set.} - [set,$return] - * - * @param {Phaser.Structs.Set} set - [description] - * - * @return {Phaser.Structs.Set} [description] - */ - union: function (set) - { - var newSet = new Set(); - - set.entries.forEach(function (value) - { - newSet.set(value); - }); - - this.entries.forEach(function (value) - { - newSet.set(value); - }); - - return newSet; - }, - - /** - * [description] - * - * @method Phaser.Structs.Set#intersect - * @since 3.0.0 - * - * @genericUse {Phaser.Structs.Set.} - [set,$return] - * - * @param {Phaser.Structs.Set} set - [description] - * - * @return {Phaser.Structs.Set} [description] - */ - intersect: function (set) - { - var newSet = new Set(); - - this.entries.forEach(function (value) - { - if (set.contains(value)) - { - newSet.set(value); - } - }); - - return newSet; - }, - - /** - * [description] - * - * @method Phaser.Structs.Set#difference - * @since 3.0.0 - * - * @genericUse {Phaser.Structs.Set.} - [set,$return] - * - * @param {Phaser.Structs.Set} set - [description] - * - * @return {Phaser.Structs.Set} [description] - */ - difference: function (set) - { - var newSet = new Set(); - - this.entries.forEach(function (value) - { - if (!set.contains(value)) - { - newSet.set(value); - } - }); - - return newSet; - }, - - /** - * [description] - * - * @name Phaser.Structs.Set#size - * @type {integer} - * @since 3.0.0 - */ - size: { - - get: function () - { - return this.entries.length; - }, - - set: function (value) - { - return this.entries.length = value; - } - - } - -}); - -module.exports = Set; - - -/***/ }), -/* 64 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji -// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl - -var Class = __webpack_require__(0); - -/** - * @classdesc - * A three-dimensional matrix. - * - * Defaults to the identity matrix when instantiated. - * - * @class Matrix3 - * @memberOf Phaser.Math - * @constructor - * @since 3.0.0 - * - * @param {Phaser.Math.Matrix3} [m] - Optional Matrix3 to copy values from. - */ -var Matrix3 = new Class({ - - initialize: - - function Matrix3 (m) - { - /** - * The matrix values. - * - * @name Phaser.Math.Matrix3#val - * @type {Float32Array} - * @since 3.0.0 - */ - this.val = new Float32Array(9); - - if (m) - { - // Assume Matrix3 with val: - this.copy(m); - } - else - { - // Default to identity - this.identity(); - } - }, - - /** - * Make a clone of this Matrix3. - * - * @method Phaser.Math.Matrix3#clone - * @since 3.0.0 - * - * @return {Phaser.Math.Matrix3} A clone of this Matrix3. - */ - clone: function () - { - return new Matrix3(this); - }, - - /** - * This method is an alias for `Matrix3.copy`. - * - * @method Phaser.Math.Matrix3#set - * @since 3.0.0 - * - * @param {Phaser.Math.Matrix3} src - The Matrix to set the values of this Matrix's from. - * - * @return {Phaser.Math.Matrix3} This Matrix3. - */ - set: function (src) - { - return this.copy(src); - }, - - /** - * Copy the values of a given Matrix into this Matrix. - * - * @method Phaser.Math.Matrix3#copy - * @since 3.0.0 - * - * @param {Phaser.Math.Matrix3} src - The Matrix to copy the values from. - * - * @return {Phaser.Math.Matrix3} This Matrix3. - */ - copy: function (src) - { - var out = this.val; - var a = src.val; - - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[8] = a[8]; - - return this; - }, - - /** - * Copy the values of a given Matrix4 into this Matrix3. - * - * @method Phaser.Math.Matrix3#fromMat4 - * @since 3.0.0 - * - * @param {Phaser.Math.Matrix4} m - The Matrix4 to copy the values from. - * - * @return {Phaser.Math.Matrix3} This Matrix3. - */ - fromMat4: function (m) - { - var a = m.val; - var out = this.val; - - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[4]; - out[4] = a[5]; - out[5] = a[6]; - out[6] = a[8]; - out[7] = a[9]; - out[8] = a[10]; - - return this; - }, - - /** - * Set the values of this Matrix from the given array. - * - * @method Phaser.Math.Matrix3#fromArray - * @since 3.0.0 - * - * @param {array} a - The array to copy the values from. - * - * @return {Phaser.Math.Matrix3} This Matrix3. - */ - fromArray: function (a) - { - var out = this.val; - - out[0] = a[0]; - out[1] = a[1]; - out[2] = a[2]; - out[3] = a[3]; - out[4] = a[4]; - out[5] = a[5]; - out[6] = a[6]; - out[7] = a[7]; - out[8] = a[8]; - - return this; - }, - - /** - * Reset this Matrix to an identity (default) matrix. - * - * @method Phaser.Math.Matrix3#identity - * @since 3.0.0 - * - * @return {Phaser.Math.Matrix3} This Matrix3. - */ - identity: function () - { - var out = this.val; - - out[0] = 1; - out[1] = 0; - out[2] = 0; - out[3] = 0; - out[4] = 1; - out[5] = 0; - out[6] = 0; - out[7] = 0; - out[8] = 1; - - return this; - }, - - /** - * Transpose this Matrix. - * - * @method Phaser.Math.Matrix3#transpose - * @since 3.0.0 - * - * @return {Phaser.Math.Matrix3} This Matrix3. - */ - transpose: function () - { - var a = this.val; - var a01 = a[1]; - var a02 = a[2]; - var a12 = a[5]; - - a[1] = a[3]; - a[2] = a[6]; - a[3] = a01; - a[5] = a[7]; - a[6] = a02; - a[7] = a12; - - return this; - }, - - /** - * Invert this Matrix. - * - * @method Phaser.Math.Matrix3#invert - * @since 3.0.0 - * - * @return {Phaser.Math.Matrix3} This Matrix3. - */ - invert: function () - { - var a = this.val; - - var a00 = a[0]; - var a01 = a[1]; - var a02 = a[2]; - var a10 = a[3]; - var a11 = a[4]; - var a12 = a[5]; - var a20 = a[6]; - var a21 = a[7]; - var a22 = a[8]; - - var b01 = a22 * a11 - a12 * a21; - var b11 = -a22 * a10 + a12 * a20; - var b21 = a21 * a10 - a11 * a20; - - // Calculate the determinant - var det = a00 * b01 + a01 * b11 + a02 * b21; - - if (!det) - { - return null; - } - - det = 1 / det; - - a[0] = b01 * det; - a[1] = (-a22 * a01 + a02 * a21) * det; - a[2] = (a12 * a01 - a02 * a11) * det; - a[3] = b11 * det; - a[4] = (a22 * a00 - a02 * a20) * det; - a[5] = (-a12 * a00 + a02 * a10) * det; - a[6] = b21 * det; - a[7] = (-a21 * a00 + a01 * a20) * det; - a[8] = (a11 * a00 - a01 * a10) * det; - - return this; - }, - - /** - * Calculate the adjoint, or adjugate, of this Matrix. - * - * @method Phaser.Math.Matrix3#adjoint - * @since 3.0.0 - * - * @return {Phaser.Math.Matrix3} This Matrix3. - */ - adjoint: function () - { - var a = this.val; - - var a00 = a[0]; - var a01 = a[1]; - var a02 = a[2]; - var a10 = a[3]; - var a11 = a[4]; - var a12 = a[5]; - var a20 = a[6]; - var a21 = a[7]; - var a22 = a[8]; - - a[0] = (a11 * a22 - a12 * a21); - a[1] = (a02 * a21 - a01 * a22); - a[2] = (a01 * a12 - a02 * a11); - a[3] = (a12 * a20 - a10 * a22); - a[4] = (a00 * a22 - a02 * a20); - a[5] = (a02 * a10 - a00 * a12); - a[6] = (a10 * a21 - a11 * a20); - a[7] = (a01 * a20 - a00 * a21); - a[8] = (a00 * a11 - a01 * a10); - - return this; - }, - - /** - * Calculate the determinant of this Matrix. - * - * @method Phaser.Math.Matrix3#determinant - * @since 3.0.0 - * - * @return {number} The determinant of this Matrix. - */ - determinant: function () - { - var a = this.val; - - var a00 = a[0]; - var a01 = a[1]; - var a02 = a[2]; - var a10 = a[3]; - var a11 = a[4]; - var a12 = a[5]; - var a20 = a[6]; - var a21 = a[7]; - var a22 = a[8]; - - return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20); - }, - - /** - * Multiply this Matrix by the given Matrix. - * - * @method Phaser.Math.Matrix3#multiply - * @since 3.0.0 - * - * @param {Phaser.Math.Matrix3} src - The Matrix to multiply this Matrix by. - * - * @return {Phaser.Math.Matrix3} This Matrix3. - */ - multiply: function (src) - { - var a = this.val; - - var a00 = a[0]; - var a01 = a[1]; - var a02 = a[2]; - var a10 = a[3]; - var a11 = a[4]; - var a12 = a[5]; - var a20 = a[6]; - var a21 = a[7]; - var a22 = a[8]; - - var b = src.val; - - var b00 = b[0]; - var b01 = b[1]; - var b02 = b[2]; - var b10 = b[3]; - var b11 = b[4]; - var b12 = b[5]; - var b20 = b[6]; - var b21 = b[7]; - var b22 = b[8]; - - a[0] = b00 * a00 + b01 * a10 + b02 * a20; - a[1] = b00 * a01 + b01 * a11 + b02 * a21; - a[2] = b00 * a02 + b01 * a12 + b02 * a22; - - a[3] = b10 * a00 + b11 * a10 + b12 * a20; - a[4] = b10 * a01 + b11 * a11 + b12 * a21; - a[5] = b10 * a02 + b11 * a12 + b12 * a22; - - a[6] = b20 * a00 + b21 * a10 + b22 * a20; - a[7] = b20 * a01 + b21 * a11 + b22 * a21; - a[8] = b20 * a02 + b21 * a12 + b22 * a22; - - return this; - }, - - /** - * Translate this Matrix using the given Vector. - * - * @method Phaser.Math.Matrix3#translate - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with. - * - * @return {Phaser.Math.Matrix3} This Matrix3. - */ - translate: function (v) - { - var a = this.val; - var x = v.x; - var y = v.y; - - a[6] = x * a[0] + y * a[3] + a[6]; - a[7] = x * a[1] + y * a[4] + a[7]; - a[8] = x * a[2] + y * a[5] + a[8]; - - return this; - }, - - /** - * Apply a rotation transformation to this Matrix. - * - * @method Phaser.Math.Matrix3#rotate - * @since 3.0.0 - * - * @param {number} rad - The angle in radians to rotate by. - * - * @return {Phaser.Math.Matrix3} This Matrix3. - */ - rotate: function (rad) - { - var a = this.val; - - var a00 = a[0]; - var a01 = a[1]; - var a02 = a[2]; - var a10 = a[3]; - var a11 = a[4]; - var a12 = a[5]; - - var s = Math.sin(rad); - var c = Math.cos(rad); - - a[0] = c * a00 + s * a10; - a[1] = c * a01 + s * a11; - a[2] = c * a02 + s * a12; - - a[3] = c * a10 - s * a00; - a[4] = c * a11 - s * a01; - a[5] = c * a12 - s * a02; - - return this; - }, - - /** - * Apply a scale transformation to this Matrix. - * - * Uses the `x` and `y` components of the given Vector to scale the Matrix. - * - * @method Phaser.Math.Matrix3#scale - * @since 3.0.0 - * - * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with. - * - * @return {Phaser.Math.Matrix3} This Matrix3. - */ - scale: function (v) - { - var a = this.val; - var x = v.x; - var y = v.y; - - a[0] = x * a[0]; - a[1] = x * a[1]; - a[2] = x * a[2]; - - a[3] = y * a[3]; - a[4] = y * a[4]; - a[5] = y * a[5]; - - return this; - }, - - /** - * Set the values of this Matrix from the given Quaternion. - * - * @method Phaser.Math.Matrix3#fromQuat - * @since 3.0.0 - * - * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from. - * - * @return {Phaser.Math.Matrix3} This Matrix3. - */ - fromQuat: function (q) - { - var x = q.x; - var y = q.y; - var z = q.z; - var w = q.w; - - var x2 = x + x; - var y2 = y + y; - var z2 = z + z; - - var xx = x * x2; - var xy = x * y2; - var xz = x * z2; - - var yy = y * y2; - var yz = y * z2; - var zz = z * z2; - - var wx = w * x2; - var wy = w * y2; - var wz = w * z2; - - var out = this.val; - - out[0] = 1 - (yy + zz); - out[3] = xy + wz; - out[6] = xz - wy; - - out[1] = xy - wz; - out[4] = 1 - (xx + zz); - out[7] = yz + wx; - - out[2] = xz + wy; - out[5] = yz - wx; - out[8] = 1 - (xx + yy); - - return this; - }, - - /** - * [description] - * - * @method Phaser.Math.Matrix3#normalFromMat4 - * @since 3.0.0 - * - * @param {Phaser.Math.Matrix4} m - [description] - * - * @return {Phaser.Math.Matrix3} This Matrix3. - */ - normalFromMat4: function (m) - { - var a = m.val; - var out = this.val; - - var a00 = a[0]; - var a01 = a[1]; - var a02 = a[2]; - var a03 = a[3]; - - var a10 = a[4]; - var a11 = a[5]; - var a12 = a[6]; - var a13 = a[7]; - - var a20 = a[8]; - var a21 = a[9]; - var a22 = a[10]; - var a23 = a[11]; - - var a30 = a[12]; - var a31 = a[13]; - var a32 = a[14]; - var a33 = a[15]; - - var b00 = a00 * a11 - a01 * a10; - var b01 = a00 * a12 - a02 * a10; - var b02 = a00 * a13 - a03 * a10; - var b03 = a01 * a12 - a02 * a11; - - var b04 = a01 * a13 - a03 * a11; - var b05 = a02 * a13 - a03 * a12; - var b06 = a20 * a31 - a21 * a30; - var b07 = a20 * a32 - a22 * a30; - - var b08 = a20 * a33 - a23 * a30; - var b09 = a21 * a32 - a22 * a31; - var b10 = a21 * a33 - a23 * a31; - var b11 = a22 * a33 - a23 * a32; - - // Calculate the determinant - var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06; - - if (!det) - { - return null; - } - - det = 1 / det; - - out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det; - out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det; - out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det; - - out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det; - out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det; - out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det; - - out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det; - out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det; - out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det; - - return this; - } - -}); - -module.exports = Matrix3; - - -/***/ }), -/* 65 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji -// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl - -var Class = __webpack_require__(0); -var Vector3 = __webpack_require__(2); -var Matrix3 = __webpack_require__(64); - -var EPSILON = 0.000001; - -// Some shared 'private' arrays -var siNext = new Int8Array([ 1, 2, 0 ]); -var tmp = new Float32Array([ 0, 0, 0 ]); - -var xUnitVec3 = new Vector3(1, 0, 0); -var yUnitVec3 = new Vector3(0, 1, 0); - -var tmpvec = new Vector3(); -var tmpMat3 = new Matrix3(); - -/** - * @classdesc - * A quaternion. - * - * @class Quaternion - * @memberOf Phaser.Math - * @constructor - * @since 3.0.0 - * - * @param {number} [x] - The x component. - * @param {number} [y] - The y component. - * @param {number} [z] - The z component. - * @param {number} [w] - The w component. - */ -var Quaternion = new Class({ - - initialize: - - function Quaternion (x, y, z, w) - { - /** - * The x component of this Quaternion. - * - * @name Phaser.Math.Quaternion#x - * @type {number} - * @default 0 - * @since 3.0.0 - */ - - /** - * The y component of this Quaternion. - * - * @name Phaser.Math.Quaternion#y - * @type {number} - * @default 0 - * @since 3.0.0 - */ - - /** - * The z component of this Quaternion. - * - * @name Phaser.Math.Quaternion#z - * @type {number} - * @default 0 - * @since 3.0.0 - */ - - /** - * The w component of this Quaternion. - * - * @name Phaser.Math.Quaternion#w - * @type {number} - * @default 0 - * @since 3.0.0 - */ - - if (typeof x === 'object') - { - this.x = x.x || 0; - this.y = x.y || 0; - this.z = x.z || 0; - this.w = x.w || 0; - } - else - { - this.x = x || 0; - this.y = y || 0; - this.z = z || 0; - this.w = w || 0; - } - }, - - /** - * Copy the components of a given Quaternion or Vector into this Quaternion. - * - * @method Phaser.Math.Quaternion#copy - * @since 3.0.0 - * - * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} src - The Quaternion or Vector to copy the components from. - * - * @return {Phaser.Math.Quaternion} This Quaternion. - */ - copy: function (src) - { - this.x = src.x; - this.y = src.y; - this.z = src.z; - this.w = src.w; - - return this; - }, - - /** - * Set the components of this Quaternion. - * - * @method Phaser.Math.Quaternion#set - * @since 3.0.0 - * - * @param {(number|object)} [x=0] - The x component, or an object containing x, y, z, and w components. - * @param {number} [y=0] - The y component. - * @param {number} [z=0] - The z component. - * @param {number} [w=0] - The w component. - * - * @return {Phaser.Math.Quaternion} This Quaternion. - */ - set: function (x, y, z, w) - { - if (typeof x === 'object') - { - this.x = x.x || 0; - this.y = x.y || 0; - this.z = x.z || 0; - this.w = x.w || 0; - } - else - { - this.x = x || 0; - this.y = y || 0; - this.z = z || 0; - this.w = w || 0; - } - - return this; - }, - - /** - * Add a given Quaternion or Vector to this Quaternion. Addition is component-wise. - * - * @method Phaser.Math.Quaternion#add - * @since 3.0.0 - * - * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to add to this Quaternion. - * - * @return {Phaser.Math.Quaternion} This Quaternion. - */ - add: function (v) - { - this.x += v.x; - this.y += v.y; - this.z += v.z; - this.w += v.w; - - return this; - }, - - /** - * Subtract a given Quaternion or Vector from this Quaternion. Subtraction is component-wise. - * - * @method Phaser.Math.Quaternion#subtract - * @since 3.0.0 - * - * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to subtract from this Quaternion. - * - * @return {Phaser.Math.Quaternion} This Quaternion. - */ - subtract: function (v) - { - this.x -= v.x; - this.y -= v.y; - this.z -= v.z; - this.w -= v.w; - - return this; - }, - - /** - * Scale this Quaternion by the given value. - * - * @method Phaser.Math.Quaternion#scale - * @since 3.0.0 - * - * @param {number} scale - The value to scale this Quaternion by. - * - * @return {Phaser.Math.Quaternion} This Quaternion. - */ - scale: function (scale) - { - this.x *= scale; - this.y *= scale; - this.z *= scale; - this.w *= scale; - - return this; - }, - - /** - * Calculate the length of this Quaternion. - * - * @method Phaser.Math.Quaternion#length - * @since 3.0.0 - * - * @return {number} The length of this Quaternion. - */ - length: function () - { - var x = this.x; - var y = this.y; - var z = this.z; - var w = this.w; - - return Math.sqrt(x * x + y * y + z * z + w * w); - }, - - /** - * Calculate the length of this Quaternion squared. - * - * @method Phaser.Math.Quaternion#lengthSq - * @since 3.0.0 - * - * @return {number} The length of this Quaternion, squared. - */ - lengthSq: function () - { - var x = this.x; - var y = this.y; - var z = this.z; - var w = this.w; - - return x * x + y * y + z * z + w * w; - }, - - /** - * Normalize this Quaternion. - * - * @method Phaser.Math.Quaternion#normalize - * @since 3.0.0 - * - * @return {Phaser.Math.Quaternion} This Quaternion. - */ - normalize: function () - { - var x = this.x; - var y = this.y; - var z = this.z; - var w = this.w; - var len = x * x + y * y + z * z + w * w; - - if (len > 0) - { - len = 1 / Math.sqrt(len); - - this.x = x * len; - this.y = y * len; - this.z = z * len; - this.w = w * len; - } - - return this; - }, - - /** - * Calculate the dot product of this Quaternion and the given Quaternion or Vector. - * - * @method Phaser.Math.Quaternion#dot - * @since 3.0.0 - * - * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to dot product with this Quaternion. - * - * @return {number} The dot product of this Quaternion and the given Quaternion or Vector. - */ - dot: function (v) - { - return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w; - }, - - /** - * Linearly interpolate this Quaternion towards the given Quaternion or Vector. - * - * @method Phaser.Math.Quaternion#lerp - * @since 3.0.0 - * - * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to interpolate towards. - * @param {number} [t=0] - The percentage of interpolation. - * - * @return {Phaser.Math.Quaternion} This Quaternion. - */ - lerp: function (v, t) - { - if (t === undefined) { t = 0; } - - var ax = this.x; - var ay = this.y; - var az = this.z; - var aw = this.w; - - this.x = ax + t * (v.x - ax); - this.y = ay + t * (v.y - ay); - this.z = az + t * (v.z - az); - this.w = aw + t * (v.w - aw); - - return this; - }, - - /** - * [description] - * - * @method Phaser.Math.Quaternion#rotationTo - * @since 3.0.0 - * - * @param {Phaser.Math.Vector3} a - [description] - * @param {Phaser.Math.Vector3} b - [description] - * - * @return {Phaser.Math.Quaternion} This Quaternion. - */ - rotationTo: function (a, b) - { - var dot = a.x * b.x + a.y * b.y + a.z * b.z; - - if (dot < -0.999999) - { - if (tmpvec.copy(xUnitVec3).cross(a).length() < EPSILON) - { - tmpvec.copy(yUnitVec3).cross(a); - } - - tmpvec.normalize(); - - return this.setAxisAngle(tmpvec, Math.PI); - - } - else if (dot > 0.999999) - { - this.x = 0; - this.y = 0; - this.z = 0; - this.w = 1; - - return this; - } - else - { - tmpvec.copy(a).cross(b); - - this.x = tmpvec.x; - this.y = tmpvec.y; - this.z = tmpvec.z; - this.w = 1 + dot; - - return this.normalize(); - } - }, - - /** - * Set the axes of this Quaternion. - * - * @method Phaser.Math.Quaternion#setAxes - * @since 3.0.0 - * - * @param {Phaser.Math.Vector3} view - The view axis. - * @param {Phaser.Math.Vector3} right - The right axis. - * @param {Phaser.Math.Vector3} up - The upwards axis. - * - * @return {Phaser.Math.Quaternion} This Quaternion. - */ - setAxes: function (view, right, up) - { - var m = tmpMat3.val; - - m[0] = right.x; - m[3] = right.y; - m[6] = right.z; - - m[1] = up.x; - m[4] = up.y; - m[7] = up.z; - - m[2] = -view.x; - m[5] = -view.y; - m[8] = -view.z; - - return this.fromMat3(tmpMat3).normalize(); - }, - - /** - * Reset this Matrix to an identity (default) Quaternion. - * - * @method Phaser.Math.Quaternion#identity - * @since 3.0.0 - * - * @return {Phaser.Math.Quaternion} This Quaternion. - */ - identity: function () - { - this.x = 0; - this.y = 0; - this.z = 0; - this.w = 1; - - return this; - }, - - /** - * Set the axis angle of this Quaternion. - * - * @method Phaser.Math.Quaternion#setAxisAngle - * @since 3.0.0 - * - * @param {Phaser.Math.Vector3} axis - The axis. - * @param {number} rad - The angle in radians. - * - * @return {Phaser.Math.Quaternion} This Quaternion. - */ - setAxisAngle: function (axis, rad) - { - rad = rad * 0.5; - - var s = Math.sin(rad); - - this.x = s * axis.x; - this.y = s * axis.y; - this.z = s * axis.z; - this.w = Math.cos(rad); - - return this; - }, - - /** - * Multiply this Quaternion by the given Quaternion or Vector. - * - * @method Phaser.Math.Quaternion#multiply - * @since 3.0.0 - * - * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to multiply this Quaternion by. - * - * @return {Phaser.Math.Quaternion} This Quaternion. - */ - multiply: function (b) - { - var ax = this.x; - var ay = this.y; - var az = this.z; - var aw = this.w; - - var bx = b.x; - var by = b.y; - var bz = b.z; - var bw = b.w; - - this.x = ax * bw + aw * bx + ay * bz - az * by; - this.y = ay * bw + aw * by + az * bx - ax * bz; - this.z = az * bw + aw * bz + ax * by - ay * bx; - this.w = aw * bw - ax * bx - ay * by - az * bz; - - return this; - }, - - /** - * Smoothly linearly interpolate this Quaternion towards the given Quaternion or Vector. - * - * @method Phaser.Math.Quaternion#slerp - * @since 3.0.0 - * - * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to interpolate towards. - * @param {number} t - The percentage of interpolation. - * - * @return {Phaser.Math.Quaternion} This Quaternion. - */ - slerp: function (b, t) - { - // benchmarks: http://jsperf.com/quaternion-slerp-implementations - - var ax = this.x; - var ay = this.y; - var az = this.z; - var aw = this.w; - - var bx = b.x; - var by = b.y; - var bz = b.z; - var bw = b.w; - - // calc cosine - var cosom = ax * bx + ay * by + az * bz + aw * bw; - - // adjust signs (if necessary) - if (cosom < 0) - { - cosom = -cosom; - bx = - bx; - by = - by; - bz = - bz; - bw = - bw; - } - - // "from" and "to" quaternions are very close - // ... so we can do a linear interpolation - var scale0 = 1 - t; - var scale1 = t; - - // calculate coefficients - if ((1 - cosom) > EPSILON) - { - // standard case (slerp) - var omega = Math.acos(cosom); - var sinom = Math.sin(omega); - - scale0 = Math.sin((1.0 - t) * omega) / sinom; - scale1 = Math.sin(t * omega) / sinom; - } - - // calculate final values - this.x = scale0 * ax + scale1 * bx; - this.y = scale0 * ay + scale1 * by; - this.z = scale0 * az + scale1 * bz; - this.w = scale0 * aw + scale1 * bw; - - return this; - }, - - /** - * Invert this Quaternion. - * - * @method Phaser.Math.Quaternion#invert - * @since 3.0.0 - * - * @return {Phaser.Math.Quaternion} This Quaternion. - */ - invert: function () - { - var a0 = this.x; - var a1 = this.y; - var a2 = this.z; - var a3 = this.w; - - var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3; - var invDot = (dot) ? 1 / dot : 0; - - // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0 - - this.x = -a0 * invDot; - this.y = -a1 * invDot; - this.z = -a2 * invDot; - this.w = a3 * invDot; - - return this; - }, - - /** - * Convert this Quaternion into its conjugate. - * - * Sets the x, y and z components. - * - * @method Phaser.Math.Quaternion#conjugate - * @since 3.0.0 - * - * @return {Phaser.Math.Quaternion} This Quaternion. - */ - conjugate: function () - { - this.x = -this.x; - this.y = -this.y; - this.z = -this.z; - - return this; - }, - - /** - * Rotate this Quaternion on the X axis. - * - * @method Phaser.Math.Quaternion#rotateX - * @since 3.0.0 - * - * @param {number} rad - The rotation angle in radians. - * - * @return {Phaser.Math.Quaternion} This Quaternion. - */ - rotateX: function (rad) - { - rad *= 0.5; - - var ax = this.x; - var ay = this.y; - var az = this.z; - var aw = this.w; - - var bx = Math.sin(rad); - var bw = Math.cos(rad); - - this.x = ax * bw + aw * bx; - this.y = ay * bw + az * bx; - this.z = az * bw - ay * bx; - this.w = aw * bw - ax * bx; - - return this; - }, - - /** - * Rotate this Quaternion on the Y axis. - * - * @method Phaser.Math.Quaternion#rotateY - * @since 3.0.0 - * - * @param {number} rad - The rotation angle in radians. - * - * @return {Phaser.Math.Quaternion} This Quaternion. - */ - rotateY: function (rad) - { - rad *= 0.5; - - var ax = this.x; - var ay = this.y; - var az = this.z; - var aw = this.w; - - var by = Math.sin(rad); - var bw = Math.cos(rad); - - this.x = ax * bw - az * by; - this.y = ay * bw + aw * by; - this.z = az * bw + ax * by; - this.w = aw * bw - ay * by; - - return this; - }, - - /** - * Rotate this Quaternion on the Z axis. - * - * @method Phaser.Math.Quaternion#rotateZ - * @since 3.0.0 - * - * @param {number} rad - The rotation angle in radians. - * - * @return {Phaser.Math.Quaternion} This Quaternion. - */ - rotateZ: function (rad) - { - rad *= 0.5; - - var ax = this.x; - var ay = this.y; - var az = this.z; - var aw = this.w; - - var bz = Math.sin(rad); - var bw = Math.cos(rad); - - this.x = ax * bw + ay * bz; - this.y = ay * bw - ax * bz; - this.z = az * bw + aw * bz; - this.w = aw * bw - az * bz; - - return this; - }, - - /** - * Create a unit (or rotation) Quaternion from its x, y, and z components. - * - * Sets the w component. - * - * @method Phaser.Math.Quaternion#calculateW - * @since 3.0.0 - * - * @return {Phaser.Math.Quaternion} This Quaternion. - */ - calculateW: function () - { - var x = this.x; - var y = this.y; - var z = this.z; - - this.w = -Math.sqrt(1.0 - x * x - y * y - z * z); - - return this; - }, - - /** - * Convert the given Matrix into this Quaternion. - * - * @method Phaser.Math.Quaternion#fromMat3 - * @since 3.0.0 - * - * @param {Phaser.Math.Matrix3} mat - The Matrix to convert from. - * - * @return {Phaser.Math.Quaternion} This Quaternion. - */ - fromMat3: function (mat) - { - // benchmarks: - // http://jsperf.com/typed-array-access-speed - // http://jsperf.com/conversion-of-3x3-matrix-to-quaternion - - // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes - // article "Quaternion Calculus and Fast Animation". - var m = mat.val; - var fTrace = m[0] + m[4] + m[8]; - var fRoot; - - if (fTrace > 0) - { - // |w| > 1/2, may as well choose w > 1/2 - fRoot = Math.sqrt(fTrace + 1.0); // 2w - - this.w = 0.5 * fRoot; - - fRoot = 0.5 / fRoot; // 1/(4w) - - this.x = (m[7] - m[5]) * fRoot; - this.y = (m[2] - m[6]) * fRoot; - this.z = (m[3] - m[1]) * fRoot; - } - else - { - // |w| <= 1/2 - var i = 0; - - if (m[4] > m[0]) - { - i = 1; - } - - if (m[8] > m[i * 3 + i]) - { - i = 2; - } - - var j = siNext[i]; - var k = siNext[j]; - - // This isn't quite as clean without array access - fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1); - tmp[i] = 0.5 * fRoot; - - fRoot = 0.5 / fRoot; - - tmp[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot; - tmp[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot; - - this.x = tmp[0]; - this.y = tmp[1]; - this.z = tmp[2]; - this.w = (m[k * 3 + j] - m[j * 3 + k]) * fRoot; - } - - return this; - } - -}); - -module.exports = Quaternion; - - -/***/ }), -/* 66 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Vector3 = __webpack_require__(2); -var Matrix4 = __webpack_require__(14); -var Quaternion = __webpack_require__(65); - -var tmpMat4 = new Matrix4(); -var tmpQuat = new Quaternion(); -var tmpVec3 = new Vector3(); - -/** - * Rotates a vector in place by axis angle. - * - * This is the same as transforming a point by an - * axis-angle quaternion, but it has higher precision. - * - * @function Phaser.Math.RotateVec3 - * @since 3.0.0 - * - * @param {Phaser.Math.Vector3} vec - The vector to be rotated. - * @param {Phaser.Math.Vector3} axis - The axis to rotate around. - * @param {number} radians - The angle of rotation in radians. - * - * @return {Phaser.Math.Vector3} The given vector. - */ -var RotateVec3 = function (vec, axis, radians) -{ - // Set the quaternion to our axis angle - tmpQuat.setAxisAngle(axis, radians); - - // Create a rotation matrix from the axis angle - tmpMat4.fromRotationTranslation(tmpQuat, tmpVec3.set(0, 0, 0)); - - // Multiply our vector by the rotation matrix - return vec.transformMat4(tmpMat4); -}; - -module.exports = RotateVec3; - - -/***/ }), -/* 67 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * Compute a random four-dimensional vector. - * - * @function Phaser.Math.RandomXYZW - * @since 3.0.0 - * - * @param {Phaser.Math.Vector4} vec4 - The Vector to compute random values for. - * @param {number} [scale=1] - The scale of the random values. - * - * @return {Phaser.Math.Vector4} The given Vector. - */ -var RandomXYZW = function (vec4, scale) -{ - if (scale === undefined) { scale = 1; } - - // TODO: Not spherical; should fix this for more uniform distribution - vec4.x = (Math.random() * 2 - 1) * scale; - vec4.y = (Math.random() * 2 - 1) * scale; - vec4.z = (Math.random() * 2 - 1) * scale; - vec4.w = (Math.random() * 2 - 1) * scale; - - return vec4; -}; - -module.exports = RandomXYZW; - - -/***/ }), -/* 68 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -/** - * Compute a random position vector in a spherical area, optionally defined by the given radius. - * - * @function Phaser.Math.RandomXYZ - * @since 3.0.0 - * - * @param {Phaser.Math.Vector3} vec3 - The Vector to compute random values for. - * @param {number} [radius=1] - The radius. - * - * @return {Phaser.Math.Vector3} The given Vector. - */ -var RandomXYZ = function (vec3, radius) -{ - if (radius === undefined) { radius = 1; } - - var r = Math.random() * 2 * Math.PI; - var z = (Math.random() * 2) - 1; - var zScale = Math.sqrt(1 - z * z) * radius; - - vec3.x = Math.cos(r) * zScale; - vec3.y = Math.sin(r) * zScale; - vec3.z = z * radius; - - return vec3; -}; - -module.exports = RandomXYZ; - - -/***/ }), -/* 69 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Camera = __webpack_require__(15); -var Class = __webpack_require__(0); -var Vector3 = __webpack_require__(2); - -// Local cache vars -var tmpVec3 = new Vector3(); - -/** - * @classdesc - * [description] - * - * @class OrthographicCamera - * @extends Phaser.Cameras.Sprite3D.Camera - * @memberOf Phaser.Cameras.Sprite3D - * @constructor - * @since 3.0.0 - * - * @param {Phaser.Scene} scene - [description] - * @param {integer} [viewportWidth=0] - [description] - * @param {integer} [viewportHeight=0] - [description] - */ -var OrthographicCamera = new Class({ - - Extends: Camera, - - initialize: - - function OrthographicCamera (scene, viewportWidth, viewportHeight) - { - if (viewportWidth === undefined) { viewportWidth = 0; } - if (viewportHeight === undefined) { viewportHeight = 0; } - - Camera.call(this, scene); - - /** - * [description] - * - * @name Phaser.Cameras.Sprite3D.OrthographicCamera#viewportWidth - * @type {integer} - * @since 3.0.0 - */ - this.viewportWidth = viewportWidth; - - /** - * [description] - * - * @name Phaser.Cameras.Sprite3D.OrthographicCamera#viewportHeight - * @type {integer} - * @since 3.0.0 - */ - this.viewportHeight = viewportHeight; - - /** - * [description] - * - * @name Phaser.Cameras.Sprite3D.OrthographicCamera#_zoom - * @type {number} - * @private - * @since 3.0.0 - */ - this._zoom = 1.0; - - /** - * [description] - * - * @name Phaser.Cameras.Sprite3D.OrthographicCamera#near - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.near = 0; - - this.update(); - }, - - /** - * [description] - * - * @method Phaser.Cameras.Sprite3D.OrthographicCamera#setToOrtho - * @since 3.0.0 - * - * @param {number} yDown - [description] - * @param {number} [viewportWidth] - [description] - * @param {number} [viewportHeight] - [description] - * - * @return {Phaser.Cameras.Sprite3D.OrthographicCamera} [description] - */ - setToOrtho: function (yDown, viewportWidth, viewportHeight) - { - if (viewportWidth === undefined) { viewportWidth = this.viewportWidth; } - if (viewportHeight === undefined) { viewportHeight = this.viewportHeight; } - - var zoom = this.zoom; - - this.up.set(0, (yDown) ? -1 : 1, 0); - this.direction.set(0, 0, (yDown) ? 1 : -1); - this.position.set(zoom * viewportWidth / 2, zoom * viewportHeight / 2, 0); - - this.viewportWidth = viewportWidth; - this.viewportHeight = viewportHeight; - - return this.update(); - }, - - /** - * [description] - * - * @method Phaser.Cameras.Sprite3D.OrthographicCamera#update - * @since 3.0.0 - * - * @return {Phaser.Cameras.Sprite3D.OrthographicCamera} [description] - */ - update: function () - { - var w = this.viewportWidth; - var h = this.viewportHeight; - var near = Math.abs(this.near); - var far = Math.abs(this.far); - var zoom = this.zoom; - - if (w === 0 || h === 0) - { - // What to do here... hmm? - return this; - } - - this.projection.ortho( - zoom * -w / 2, zoom * w / 2, - zoom * -h / 2, zoom * h / 2, - near, - far - ); - - // Build the view matrix - tmpVec3.copy(this.position).add(this.direction); - - this.view.lookAt(this.position, tmpVec3, this.up); - - // Projection * view matrix - this.combined.copy(this.projection).multiply(this.view); - - // Invert combined matrix, used for unproject - this.invProjectionView.copy(this.combined).invert(); - - this.billboardMatrixDirty = true; - - this.updateChildren(); - - return this; - }, - - /** - * [description] - * - * @name Phaser.Cameras.Sprite3D.OrthographicCamera#zoom - * @type {number} - * @since 3.0.0 - */ - zoom: { - - get: function () - { - return this._zoom; - }, - - set: function (value) - { - this._zoom = value; - this.update(); - } - } - -}); - -module.exports = OrthographicCamera; - - -/***/ }), -/* 70 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var GetAdvancedValue = __webpack_require__(4); - -/** - * Adds an Animation component to a Sprite and populates it based on the given config. - * - * @function Phaser.GameObjects.BuildGameObjectAnimation - * @since 3.0.0 - * - * @param {Phaser.GameObjects.Sprite} sprite - The sprite to add an Animation component to. - * @param {object} config - The animation config. - * - * @return {Phaser.GameObjects.Sprite} The updated Sprite. - */ -var BuildGameObjectAnimation = function (sprite, config) -{ - var animConfig = GetAdvancedValue(config, 'anims', null); - - if (animConfig === null) - { - return sprite; - } - - if (typeof animConfig === 'string') - { - // { anims: 'key' } - sprite.anims.play(animConfig); - } - else if (typeof animConfig === 'object') - { - // { anims: { - // key: string - // startFrame: [string|integer] - // delay: [float] - // repeat: [integer] - // repeatDelay: [float] - // yoyo: [boolean] - // play: [boolean] - // delayedPlay: [boolean] - // } - // } - - var anims = sprite.anims; - - var key = GetAdvancedValue(animConfig, 'key', undefined); - var startFrame = GetAdvancedValue(animConfig, 'startFrame', undefined); - - var delay = GetAdvancedValue(animConfig, 'delay', 0); - var repeat = GetAdvancedValue(animConfig, 'repeat', 0); - var repeatDelay = GetAdvancedValue(animConfig, 'repeatDelay', 0); - var yoyo = GetAdvancedValue(animConfig, 'yoyo', false); - - var play = GetAdvancedValue(animConfig, 'play', false); - var delayedPlay = GetAdvancedValue(animConfig, 'delayedPlay', 0); - - anims.setDelay(delay); - anims.setRepeat(repeat); - anims.setRepeatDelay(repeatDelay); - anims.setYoyo(yoyo); - - if (play) - { - anims.play(key, startFrame); - } - else if (delayedPlay > 0) - { - anims.delayedPlay(delayedPlay, key, startFrame); - } - else - { - anims.load(key); - } - } - - return sprite; -}; - -module.exports = BuildGameObjectAnimation; - - -/***/ }), -/* 71 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -// Source object -// The key as a string, or an array of keys, i.e. 'banner', or 'banner.hideBanner' -// The default value to use if the key doesn't exist - -/** - * [description] - * - * @function Phaser.Utils.Objects.GetValue - * @since 3.0.0 - * - * @param {object} source - [description] - * @param {string} key - [description] - * @param {*} defaultValue - [description] - * - * @return {*} [description] - */ -var GetValue = function (source, key, defaultValue) -{ - if (!source || typeof source === 'number') - { - return defaultValue; - } - else if (source.hasOwnProperty(key)) - { - return source[key]; - } - else if (key.indexOf('.')) - { - var keys = key.split('.'); - var parent = source; - var value = defaultValue; - - // Use for loop here so we can break early - for (var i = 0; i < keys.length; i++) - { - if (parent.hasOwnProperty(keys[i])) - { - // Yes it has a key property, let's carry on down - value = parent[keys[i]]; - - parent = parent[keys[i]]; - } - else - { - // Can't go any further, so reset to default - value = defaultValue; - break; - } - } - - return value; - } - else - { - return defaultValue; - } -}; - -module.exports = GetValue; - - -/***/ }), -/* 72 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var Class = __webpack_require__(0); - -/** - * @classdesc - * A seeded Random Data Generator. - * - * Access via `Phaser.Math.RND` which is an instance of this class pre-defined - * by Phaser. Or, create your own instance to use as you require. - * - * The `Math.RND` generator is seeded by the Game Config property value `seed`. - * If no such config property exists, a random number is used. - * - * If you create your own instance of this class you should provide a seed for it. - * If no seed is given it will use a 'random' one based on Date.now. - * - * @class RandomDataGenerator - * @memberOf Phaser.Math - * @constructor - * @since 3.0.0 - * - * @param {(string|string[])} [seeds] - The seeds to use for the random number generator. - */ -var RandomDataGenerator = new Class({ - - initialize: - - function RandomDataGenerator (seeds) - { - if (seeds === undefined) { seeds = [ (Date.now() * Math.random()).toString() ]; } - - /** - * Internal var. - * - * @name Phaser.Math.RandomDataGenerator#c - * @type {number} - * @default 1 - * @private - * @since 3.0.0 - */ - this.c = 1; - - /** - * Internal var. - * - * @name Phaser.Math.RandomDataGenerator#s0 - * @type {number} - * @default 0 - * @private - * @since 3.0.0 - */ - this.s0 = 0; - - /** - * Internal var. - * - * @name Phaser.Math.RandomDataGenerator#s1 - * @type {number} - * @default 0 - * @private - * @since 3.0.0 - */ - this.s1 = 0; - - /** - * Internal var. - * - * @name Phaser.Math.RandomDataGenerator#s2 - * @type {number} - * @default 0 - * @private - * @since 3.0.0 - */ - this.s2 = 0; - - /** - * Internal var. - * - * @name Phaser.Math.RandomDataGenerator#n - * @type {number} - * @default 0 - * @private - * @since 3.2.0 - */ - this.n = 0; - - /** - * Signs to choose from. - * - * @name Phaser.Math.RandomDataGenerator#signs - * @type {number[]} - * @since 3.0.0 - */ - this.signs = [ -1, 1 ]; - - if (seeds) - { - this.init(seeds); - } - }, - - /** - * Private random helper. - * - * @method Phaser.Math.RandomDataGenerator#rnd - * @since 3.0.0 - * @private - * - * @return {number} A random number. - */ - rnd: function () - { - var t = 2091639 * this.s0 + this.c * 2.3283064365386963e-10; // 2^-32 - - this.c = t | 0; - this.s0 = this.s1; - this.s1 = this.s2; - this.s2 = t - this.c; - - return this.s2; - }, - - /** - * Internal method that creates a seed hash. - * - * @method Phaser.Math.RandomDataGenerator#hash - * @since 3.0.0 - * @private - * - * @param {string} data - The value to hash. - * - * @return {number} The hashed value. - */ - hash: function (data) - { - var h; - var n = this.n; - - data = data.toString(); - - for (var i = 0; i < data.length; i++) - { - n += data.charCodeAt(i); - h = 0.02519603282416938 * n; - n = h >>> 0; - h -= n; - h *= n; - n = h >>> 0; - h -= n; - n += h * 0x100000000;// 2^32 - } - - this.n = n; - - return (n >>> 0) * 2.3283064365386963e-10;// 2^-32 - }, - - /** - * Initialize the state of the random data generator. - * - * @method Phaser.Math.RandomDataGenerator#init - * @since 3.0.0 - * - * @param {(string|string[])} seeds - The seeds to initialize the random data generator with. - */ - init: function (seeds) - { - if (typeof seeds === 'string') - { - this.state(seeds); - } - else - { - this.sow(seeds); - } - }, - - /** - * Reset the seed of the random data generator. - * - * _Note_: the seed array is only processed up to the first `undefined` (or `null`) value, should such be present. - * - * @method Phaser.Math.RandomDataGenerator#sow - * @since 3.0.0 - * - * @param {string[]} seeds - The array of seeds: the `toString()` of each value is used. - */ - sow: function (seeds) - { - // Always reset to default seed - this.n = 0xefc8249d; - this.s0 = this.hash(' '); - this.s1 = this.hash(' '); - this.s2 = this.hash(' '); - this.c = 1; - - if (!seeds) - { - return; - } - - // Apply any seeds - for (var i = 0; i < seeds.length && (seeds[i] != null); i++) - { - var seed = seeds[i]; - - this.s0 -= this.hash(seed); - this.s0 += ~~(this.s0 < 0); - this.s1 -= this.hash(seed); - this.s1 += ~~(this.s1 < 0); - this.s2 -= this.hash(seed); - this.s2 += ~~(this.s2 < 0); - } - }, - - /** - * Returns a random integer between 0 and 2^32. - * - * @method Phaser.Math.RandomDataGenerator#integer - * @since 3.0.0 - * - * @return {number} A random integer between 0 and 2^32. - */ - integer: function () - { - // 2^32 - return this.rnd() * 0x100000000; - }, - - /** - * Returns a random real number between 0 and 1. - * - * @method Phaser.Math.RandomDataGenerator#frac - * @since 3.0.0 - * - * @return {number} A random real number between 0 and 1. - */ - frac: function () - { - // 2^-53 - return this.rnd() + (this.rnd() * 0x200000 | 0) * 1.1102230246251565e-16; - }, - - /** - * Returns a random real number between 0 and 2^32. - * - * @method Phaser.Math.RandomDataGenerator#real - * @since 3.0.0 - * - * @return {number} A random real number between 0 and 2^32. - */ - real: function () - { - return this.integer() + this.frac(); - }, - - /** - * Returns a random integer between and including min and max. - * - * @method Phaser.Math.RandomDataGenerator#integerInRange - * @since 3.0.0 - * - * @param {number} min - The minimum value in the range. - * @param {number} max - The maximum value in the range. - * - * @return {number} A random number between min and max. - */ - integerInRange: function (min, max) - { - return Math.floor(this.realInRange(0, max - min + 1) + min); - }, - - /** - * Returns a random integer between and including min and max. - * This method is an alias for RandomDataGenerator.integerInRange. - * - * @method Phaser.Math.RandomDataGenerator#between - * @since 3.0.0 - * - * @param {number} min - The minimum value in the range. - * @param {number} max - The maximum value in the range. - * - * @return {number} A random number between min and max. - */ - between: function (min, max) - { - return Math.floor(this.realInRange(0, max - min + 1) + min); - }, - - /** - * Returns a random real number between min and max. - * - * @method Phaser.Math.RandomDataGenerator#realInRange - * @since 3.0.0 - * - * @param {number} min - The minimum value in the range. - * @param {number} max - The maximum value in the range. - * - * @return {number} A random number between min and max. - */ - realInRange: function (min, max) - { - return this.frac() * (max - min) + min; - }, - - /** - * Returns a random real number between -1 and 1. - * - * @method Phaser.Math.RandomDataGenerator#normal - * @since 3.0.0 - * - * @return {number} A random real number between -1 and 1. - */ - normal: function () - { - return 1 - (2 * this.frac()); - }, - - /** - * Returns a valid RFC4122 version4 ID hex string from https://gist.github.com/1308368 - * - * @method Phaser.Math.RandomDataGenerator#uuid - * @since 3.0.0 - * - * @return {string} A valid RFC4122 version4 ID hex string - */ - uuid: function () - { - var a = ''; - var b = ''; - - for (b = a = ''; a++ < 36; b += ~a % 5 | a * 3 & 4 ? (a ^ 15 ? 8 ^ this.frac() * (a ^ 20 ? 16 : 4) : 4).toString(16) : '-') - { - // eslint-disable-next-line no-empty - } - - return b; - }, - - /** - * Returns a random element from within the given array. - * - * @method Phaser.Math.RandomDataGenerator#pick - * @since 3.0.0 - * - * @param {array} array - The array to pick a random element from. - * - * @return {*} A random member of the array. - */ - pick: function (array) - { - return array[this.integerInRange(0, array.length - 1)]; - }, - - /** - * Returns a sign to be used with multiplication operator. - * - * @method Phaser.Math.RandomDataGenerator#sign - * @since 3.0.0 - * - * @return {number} -1 or +1. - */ - sign: function () - { - return this.pick(this.signs); - }, - - /** - * Returns a random element from within the given array, favoring the earlier entries. - * - * @method Phaser.Math.RandomDataGenerator#weightedPick - * @since 3.0.0 - * - * @param {array} array - The array to pick a random element from. - * - * @return {*} A random member of the array. - */ - weightedPick: function (array) - { - return array[~~(Math.pow(this.frac(), 2) * (array.length - 1) + 0.5)]; - }, - - /** - * Returns a random timestamp between min and max, or between the beginning of 2000 and the end of 2020 if min and max aren't specified. - * - * @method Phaser.Math.RandomDataGenerator#timestamp - * @since 3.0.0 - * - * @param {number} min - The minimum value in the range. - * @param {number} max - The maximum value in the range. - * - * @return {number} A random timestamp between min and max. - */ - timestamp: function (min, max) - { - return this.realInRange(min || 946684800000, max || 1577862000000); - }, - - /** - * Returns a random angle between -180 and 180. - * - * @method Phaser.Math.RandomDataGenerator#angle - * @since 3.0.0 - * - * @return {number} A random number between -180 and 180. - */ - angle: function () - { - return this.integerInRange(-180, 180); - }, - - /** - * Returns a random rotation in radians, between -3.141 and 3.141 - * - * @method Phaser.Math.RandomDataGenerator#rotation - * @since 3.0.0 - * - * @return {number} A random number between -3.141 and 3.141 - */ - rotation: function () - { - return this.realInRange(-3.1415926, 3.1415926); - }, - - /** - * Gets or Sets the state of the generator. This allows you to retain the values - * that the generator is using between games, i.e. in a game save file. - * - * To seed this generator with a previously saved state you can pass it as the - * `seed` value in your game config, or call this method directly after Phaser has booted. - * - * Call this method with no parameters to return the current state. - * - * If providing a state it should match the same format that this method - * returns, which is a string with a header `!rnd` followed by the `c`, - * `s0`, `s1` and `s2` values respectively, each comma-delimited. - * - * @method Phaser.Math.RandomDataGenerator#state - * @since 3.0.0 - * - * @param {string} [state] - Generator state to be set. - * - * @return {string} The current state of the generator. - */ - state: function (state) - { - if (typeof state === 'string' && state.match(/^!rnd/)) - { - state = state.split(','); - - this.c = parseFloat(state[1]); - this.s0 = parseFloat(state[2]); - this.s1 = parseFloat(state[3]); - this.s2 = parseFloat(state[4]); - } - - return [ '!rnd', this.c, this.s0, this.s1, this.s2 ].join(','); - }, - - /** - * Shuffles the given array, using the current seed. - * - * @method Phaser.Math.RandomDataGenerator#shuffle - * @since 3.7.0 - * - * @param {array} [array] - The array to be shuffled. - * - * @return {array} The shuffled array. - */ - shuffle: function (array) - { - var len = array.length - 1; - - for (var i = len; i > 0; i--) - { - var randomIndex = Math.floor(this.frac() * (len + 1)); - var itemAtIndex = array[randomIndex]; - - array[randomIndex] = array[i]; - array[i] = itemAtIndex; - } - - return array; - } - -}); - -module.exports = RandomDataGenerator; - - -/***/ }), -/* 73 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var BlendModes = __webpack_require__(18); -var GetAdvancedValue = __webpack_require__(4); -var ScaleModes = __webpack_require__(16); - -/** - * @typedef {object} GameObjectConfig - * - * @property {number} [x=0] - The x position of the Game Object. - * @property {number} [y=0] - The y position of the Game Object. - * @property {number} [depth=0] - The depth of the GameObject. - * @property {boolean} [flipX=false] - The horizontally flipped state of the Game Object. - * @property {boolean} [flipY=false] - The vertically flipped state of the Game Object. - * @property {?(number|object)} [scale=null] - The scale of the GameObject. - * @property {?(number|object)} [scrollFactor=null] - The scroll factor of the GameObject. - * @property {number} [rotation=0] - The rotation angle of the Game Object, in radians. - * @property {?number} [angle=null] - The rotation angle of the Game Object, in degrees. - * @property {number} [alpha=1] - The alpha (opacity) of the Game Object. - * @property {?(number|object)} [origin=null] - The origin of the Game Object. - * @property {number} [scaleMode=ScaleModes.DEFAULT] - The scale mode of the GameObject. - * @property {number} [blendMode=BlendModes.DEFAULT] - The blend mode of the GameObject. - * @property {boolean} [visible=true] - The visible state of the Game Object. - * @property {boolean} [add=true] - Add the GameObject to the scene. - */ - -/** - * Builds a Game Object using the provided configuration object. - * - * @function Phaser.GameObjects.BuildGameObject - * @since 3.0.0 - * - * @param {Phaser.Scene} scene - A reference to the Scene. - * @param {Phaser.GameObjects.GameObject} gameObject - The initial GameObject. - * @param {GameObjectConfig} config - The config to build the GameObject with. - * - * @return {Phaser.GameObjects.GameObject} The built Game Object. - */ -var BuildGameObject = function (scene, gameObject, config) -{ - // Position - - gameObject.x = GetAdvancedValue(config, 'x', 0); - gameObject.y = GetAdvancedValue(config, 'y', 0); - gameObject.depth = GetAdvancedValue(config, 'depth', 0); - - // Flip - - gameObject.flipX = GetAdvancedValue(config, 'flipX', false); - gameObject.flipY = GetAdvancedValue(config, 'flipY', false); - - // Scale - // Either: { scale: 2 } or { scale: { x: 2, y: 2 }} - - var scale = GetAdvancedValue(config, 'scale', null); - - if (typeof scale === 'number') - { - gameObject.setScale(scale); - } - else if (scale !== null) - { - gameObject.scaleX = GetAdvancedValue(scale, 'x', 1); - gameObject.scaleY = GetAdvancedValue(scale, 'y', 1); - } - - // ScrollFactor - // Either: { scrollFactor: 2 } or { scrollFactor: { x: 2, y: 2 }} - - var scrollFactor = GetAdvancedValue(config, 'scrollFactor', null); - - if (typeof scrollFactor === 'number') - { - gameObject.setScrollFactor(scrollFactor); - } - else if (scrollFactor !== null) - { - gameObject.scrollFactorX = GetAdvancedValue(scrollFactor, 'x', 1); - gameObject.scrollFactorY = GetAdvancedValue(scrollFactor, 'y', 1); - } - - // Rotation - - gameObject.rotation = GetAdvancedValue(config, 'rotation', 0); - - var angle = GetAdvancedValue(config, 'angle', null); - - if (angle !== null) - { - gameObject.angle = angle; - } - - // Alpha - - gameObject.alpha = GetAdvancedValue(config, 'alpha', 1); - - // Origin - // Either: { origin: 0.5 } or { origin: { x: 0.5, y: 0.5 }} - - var origin = GetAdvancedValue(config, 'origin', null); - - if (typeof origin === 'number') - { - gameObject.setOrigin(origin); - } - else if (origin !== null) - { - var ox = GetAdvancedValue(origin, 'x', 0.5); - var oy = GetAdvancedValue(origin, 'y', 0.5); - - gameObject.setOrigin(ox, oy); - } - - // ScaleMode - - gameObject.scaleMode = GetAdvancedValue(config, 'scaleMode', ScaleModes.DEFAULT); - - // BlendMode - - gameObject.blendMode = GetAdvancedValue(config, 'blendMode', BlendModes.NORMAL); - - // Visible - - gameObject.visible = GetAdvancedValue(config, 'visible', true); - - // Add to Scene - - var add = GetAdvancedValue(config, 'add', true); - - if (add) - { - scene.sys.displayList.add(gameObject); - } - - if (gameObject.preUpdate) - { - scene.sys.updateList.add(gameObject); - } - - return gameObject; -}; - -module.exports = BuildGameObject; - - -/***/ }), -/* 74 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */ - -var BuildGameObject = __webpack_require__(73); -var BuildGameObjectAnimation = __webpack_require__(70); -var Class = __webpack_require__(0); -var GetAdvancedValue = __webpack_require__(4); -var OrthographicCamera = __webpack_require__(69); -var PerspectiveCamera = __webpack_require__(21); -var ScenePlugin = __webpack_require__(20); -var Sprite3D = __webpack_require__(13); +var GetAdvancedValue = __webpack_require__(6); +var OrthographicCamera = __webpack_require__(157); +var PerspectiveCamera = __webpack_require__(255); +var ScenePlugin = __webpack_require__(256); +var Sprite3D = __webpack_require__(33); /** * @classdesc @@ -18075,5 +10820,17258 @@ var Camera3DPlugin = new Class({ module.exports = Camera3DPlugin; +/***/ }), +/* 44 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var BlendModes = __webpack_require__(13); +var GetAdvancedValue = __webpack_require__(6); + +/** + * Builds a Game Object using the provided configuration object. + * + * @function Phaser.GameObjects.BuildGameObject + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - A reference to the Scene. + * @param {Phaser.GameObjects.GameObject} gameObject - The initial GameObject. + * @param {Phaser.Types.GameObjects.GameObjectConfig} config - The config to build the GameObject with. + * + * @return {Phaser.GameObjects.GameObject} The built Game Object. + */ +var BuildGameObject = function (scene, gameObject, config) +{ + // Position + + gameObject.x = GetAdvancedValue(config, 'x', 0); + gameObject.y = GetAdvancedValue(config, 'y', 0); + gameObject.depth = GetAdvancedValue(config, 'depth', 0); + + // Flip + + gameObject.flipX = GetAdvancedValue(config, 'flipX', false); + gameObject.flipY = GetAdvancedValue(config, 'flipY', false); + + // Scale + // Either: { scale: 2 } or { scale: { x: 2, y: 2 }} + + var scale = GetAdvancedValue(config, 'scale', null); + + if (typeof scale === 'number') + { + gameObject.setScale(scale); + } + else if (scale !== null) + { + gameObject.scaleX = GetAdvancedValue(scale, 'x', 1); + gameObject.scaleY = GetAdvancedValue(scale, 'y', 1); + } + + // ScrollFactor + // Either: { scrollFactor: 2 } or { scrollFactor: { x: 2, y: 2 }} + + var scrollFactor = GetAdvancedValue(config, 'scrollFactor', null); + + if (typeof scrollFactor === 'number') + { + gameObject.setScrollFactor(scrollFactor); + } + else if (scrollFactor !== null) + { + gameObject.scrollFactorX = GetAdvancedValue(scrollFactor, 'x', 1); + gameObject.scrollFactorY = GetAdvancedValue(scrollFactor, 'y', 1); + } + + // Rotation + + gameObject.rotation = GetAdvancedValue(config, 'rotation', 0); + + var angle = GetAdvancedValue(config, 'angle', null); + + if (angle !== null) + { + gameObject.angle = angle; + } + + // Alpha + + gameObject.alpha = GetAdvancedValue(config, 'alpha', 1); + + // Origin + // Either: { origin: 0.5 } or { origin: { x: 0.5, y: 0.5 }} + + var origin = GetAdvancedValue(config, 'origin', null); + + if (typeof origin === 'number') + { + gameObject.setOrigin(origin); + } + else if (origin !== null) + { + var ox = GetAdvancedValue(origin, 'x', 0.5); + var oy = GetAdvancedValue(origin, 'y', 0.5); + + gameObject.setOrigin(ox, oy); + } + + // BlendMode + + gameObject.blendMode = GetAdvancedValue(config, 'blendMode', BlendModes.NORMAL); + + // Visible + + gameObject.visible = GetAdvancedValue(config, 'visible', true); + + // Add to Scene + + var add = GetAdvancedValue(config, 'add', true); + + if (add) + { + scene.sys.displayList.add(gameObject); + } + + if (gameObject.preUpdate) + { + scene.sys.updateList.add(gameObject); + } + + return gameObject; +}; + +module.exports = BuildGameObject; + + +/***/ }), +/* 45 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(2); +var Extend = __webpack_require__(46); + +/** + * @namespace Phaser.Math + */ + +var PhaserMath = { + + // Collections of functions + Angle: __webpack_require__(48), + Distance: __webpack_require__(59), + Easing: __webpack_require__(67), + Fuzzy: __webpack_require__(112), + Interpolation: __webpack_require__(117), + Pow2: __webpack_require__(125), + Snap: __webpack_require__(129), + + // Expose the RNG Class + RandomDataGenerator: __webpack_require__(133), + + // Single functions + Average: __webpack_require__(134), + Bernstein: __webpack_require__(18), + Between: __webpack_require__(135), + CatmullRom: __webpack_require__(20), + CeilTo: __webpack_require__(136), + Clamp: __webpack_require__(4), + DegToRad: __webpack_require__(24), + Difference: __webpack_require__(137), + Factorial: __webpack_require__(19), + FloatBetween: __webpack_require__(7), + FloorTo: __webpack_require__(138), + FromPercent: __webpack_require__(139), + GetSpeed: __webpack_require__(140), + IsEven: __webpack_require__(141), + IsEvenStrict: __webpack_require__(142), + Linear: __webpack_require__(21), + MaxAdd: __webpack_require__(143), + MinSub: __webpack_require__(144), + Percent: __webpack_require__(145), + RadToDeg: __webpack_require__(146), + RandomXY: __webpack_require__(147), + RandomXYZ: __webpack_require__(25), + RandomXYZW: __webpack_require__(26), + Rotate: __webpack_require__(148), + RotateAround: __webpack_require__(27), + RotateAroundDistance: __webpack_require__(149), + RotateTo: __webpack_require__(150), + RoundAwayFromZero: __webpack_require__(151), + RoundTo: __webpack_require__(152), + SinCosTableGenerator: __webpack_require__(153), + SmootherStep: __webpack_require__(23), + SmoothStep: __webpack_require__(22), + ToXY: __webpack_require__(154), + TransformXY: __webpack_require__(28), + Within: __webpack_require__(155), + Wrap: __webpack_require__(8), + + // Vector classes + Vector2: __webpack_require__(1), + Vector3: __webpack_require__(3), + Vector4: __webpack_require__(9), + Matrix3: __webpack_require__(29), + Matrix4: __webpack_require__(10), + Quaternion: __webpack_require__(30), + RotateVec3: __webpack_require__(31) + +}; + +// Merge in the consts + +PhaserMath = Extend(false, PhaserMath, CONST); + +// Export it + +module.exports = PhaserMath; + + +/***/ }), +/* 46 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var IsPlainObject = __webpack_require__(47); + +// @param {boolean} deep - Perform a deep copy? +// @param {object} target - The target object to copy to. +// @return {object} The extended object. + +/** + * This is a slightly modified version of http://api.jquery.com/jQuery.extend/ + * + * @function Phaser.Utils.Objects.Extend + * @since 3.0.0 + * + * @param {...*} [args] - The objects that will be mixed. + * + * @return {object} The extended object. + */ +var Extend = function () +{ + var options, name, src, copy, copyIsArray, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if (typeof target === 'boolean') + { + deep = target; + target = arguments[1] || {}; + + // skip the boolean and the target + i = 2; + } + + // extend Phaser if only one argument is passed + if (length === i) + { + target = this; + --i; + } + + for (; i < length; i++) + { + // Only deal with non-null/undefined values + if ((options = arguments[i]) != null) + { + // Extend the base object + for (name in options) + { + src = target[name]; + copy = options[name]; + + // Prevent never-ending loop + if (target === copy) + { + continue; + } + + // Recurse if we're merging plain objects or arrays + if (deep && copy && (IsPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) + { + if (copyIsArray) + { + copyIsArray = false; + clone = src && Array.isArray(src) ? src : []; + } + else + { + clone = src && IsPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[name] = Extend(deep, clone, copy); + + // Don't bring in undefined values + } + else if (copy !== undefined) + { + target[name] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +module.exports = Extend; + + +/***/ }), +/* 47 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * This is a slightly modified version of jQuery.isPlainObject. + * A plain object is an object whose internal class property is [object Object]. + * + * @function Phaser.Utils.Objects.IsPlainObject + * @since 3.0.0 + * + * @param {object} obj - The object to inspect. + * + * @return {boolean} `true` if the object is plain, otherwise `false`. + */ +var IsPlainObject = function (obj) +{ + // Not plain objects: + // - Any object or value whose internal [[Class]] property is not "[object Object]" + // - DOM nodes + // - window + if (typeof(obj) !== 'object' || obj.nodeType || obj === obj.window) + { + return false; + } + + // Support: Firefox <20 + // The try/catch suppresses exceptions thrown when attempting to access + // the "constructor" property of certain host objects, ie. |window.location| + // https://bugzilla.mozilla.org/show_bug.cgi?id=814622 + try + { + if (obj.constructor && !({}).hasOwnProperty.call(obj.constructor.prototype, 'isPrototypeOf')) + { + return false; + } + } + catch (e) + { + return false; + } + + // If the function hasn't returned already, we're confident that + // |obj| is a plain object, created by {} or constructed with new Object + return true; +}; + +module.exports = IsPlainObject; + + +/***/ }), +/* 48 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Angle + */ + +module.exports = { + + Between: __webpack_require__(49), + BetweenPoints: __webpack_require__(50), + BetweenPointsY: __webpack_require__(51), + BetweenY: __webpack_require__(52), + CounterClockwise: __webpack_require__(53), + Normalize: __webpack_require__(14), + Random: __webpack_require__(54), + RandomDegrees: __webpack_require__(55), + Reverse: __webpack_require__(56), + RotateTo: __webpack_require__(57), + ShortestBetween: __webpack_require__(58), + Wrap: __webpack_require__(15), + WrapDegrees: __webpack_require__(16) + +}; + + +/***/ }), +/* 49 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Find the angle of a segment from (x1, y1) -> (x2, y2). + * + * @function Phaser.Math.Angle.Between + * @since 3.0.0 + * + * @param {number} x1 - The x coordinate of the first point. + * @param {number} y1 - The y coordinate of the first point. + * @param {number} x2 - The x coordinate of the second point. + * @param {number} y2 - The y coordinate of the second point. + * + * @return {number} The angle in radians. + */ +var Between = function (x1, y1, x2, y2) +{ + return Math.atan2(y2 - y1, x2 - x1); +}; + +module.exports = Between; + + +/***/ }), +/* 50 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y). + * + * Calculates the angle of the vector from the first point to the second point. + * + * @function Phaser.Math.Angle.BetweenPoints + * @since 3.0.0 + * + * @param {Phaser.Types.Math.Vector2Like} point1 - The first point. + * @param {Phaser.Types.Math.Vector2Like} point2 - The second point. + * + * @return {number} The angle in radians. + */ +var BetweenPoints = function (point1, point2) +{ + return Math.atan2(point2.y - point1.y, point2.x - point1.x); +}; + +module.exports = BetweenPoints; + + +/***/ }), +/* 51 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y). + * + * The difference between this method and {@link Phaser.Math.Angle.BetweenPoints} is that this assumes the y coordinate + * travels down the screen. + * + * @function Phaser.Math.Angle.BetweenPointsY + * @since 3.0.0 + * + * @param {Phaser.Types.Math.Vector2Like} point1 - The first point. + * @param {Phaser.Types.Math.Vector2Like} point2 - The second point. + * + * @return {number} The angle in radians. + */ +var BetweenPointsY = function (point1, point2) +{ + return Math.atan2(point2.x - point1.x, point2.y - point1.y); +}; + +module.exports = BetweenPointsY; + + +/***/ }), +/* 52 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Find the angle of a segment from (x1, y1) -> (x2, y2). + * + * The difference between this method and {@link Phaser.Math.Angle.Between} is that this assumes the y coordinate + * travels down the screen. + * + * @function Phaser.Math.Angle.BetweenY + * @since 3.0.0 + * + * @param {number} x1 - The x coordinate of the first point. + * @param {number} y1 - The y coordinate of the first point. + * @param {number} x2 - The x coordinate of the second point. + * @param {number} y2 - The y coordinate of the second point. + * + * @return {number} The angle in radians. + */ +var BetweenY = function (x1, y1, x2, y2) +{ + return Math.atan2(x2 - x1, y2 - y1); +}; + +module.exports = BetweenY; + + +/***/ }), +/* 53 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(2); + +/** + * Takes an angle in Phasers default clockwise format and converts it so that + * 0 is North, 90 is West, 180 is South and 270 is East, + * therefore running counter-clockwise instead of clockwise. + * + * You can pass in the angle from a Game Object using: + * + * ```javascript + * var converted = CounterClockwise(gameobject.rotation); + * ``` + * + * All values for this function are in radians. + * + * @function Phaser.Math.Angle.CounterClockwise + * @since 3.16.0 + * + * @param {number} angle - The angle to convert, in radians. + * + * @return {number} The converted angle, in radians. + */ +var CounterClockwise = function (angle) +{ + if (angle > Math.PI) + { + angle -= CONST.PI2; + } + + return Math.abs((((angle + CONST.TAU) % CONST.PI2) - CONST.PI2) % CONST.PI2); +}; + +module.exports = CounterClockwise; + + +/***/ }), +/* 54 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author @samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var FloatBetween = __webpack_require__(7); + +/** + * Returns a random angle in the range [-pi, pi]. + * + * @function Phaser.Math.Angle.Random + * @since 3.23.0 + * + * @return {number} The angle, in radians. + */ +var Random = function () +{ + return FloatBetween(-Math.PI, Math.PI); +}; + +module.exports = Random; + + +/***/ }), +/* 55 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author @samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var FloatBetween = __webpack_require__(7); + +/** + * Returns a random angle in the range [-180, 180]. + * + * @function Phaser.Math.Angle.RandomDegrees + * @since 3.23.0 + * + * @return {number} The angle, in degrees. + */ +var RandomDegrees = function () +{ + return FloatBetween(-180, 180); +}; + +module.exports = RandomDegrees; + + +/***/ }), +/* 56 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Normalize = __webpack_require__(14); + +/** + * Reverse the given angle. + * + * @function Phaser.Math.Angle.Reverse + * @since 3.0.0 + * + * @param {number} angle - The angle to reverse, in radians. + * + * @return {number} The reversed angle, in radians. + */ +var Reverse = function (angle) +{ + return Normalize(angle + Math.PI); +}; + +module.exports = Reverse; + + +/***/ }), +/* 57 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var MATH_CONST = __webpack_require__(2); + +/** + * Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call. + * + * @function Phaser.Math.Angle.RotateTo + * @since 3.0.0 + * + * @param {number} currentAngle - The current angle, in radians. + * @param {number} targetAngle - The target angle to rotate to, in radians. + * @param {number} [lerp=0.05] - The lerp value to add to the current angle. + * + * @return {number} The adjusted angle. + */ +var RotateTo = function (currentAngle, targetAngle, lerp) +{ + if (lerp === undefined) { lerp = 0.05; } + + if (currentAngle === targetAngle) + { + return currentAngle; + } + + if (Math.abs(targetAngle - currentAngle) <= lerp || Math.abs(targetAngle - currentAngle) >= (MATH_CONST.PI2 - lerp)) + { + currentAngle = targetAngle; + } + else + { + if (Math.abs(targetAngle - currentAngle) > Math.PI) + { + if (targetAngle < currentAngle) + { + targetAngle += MATH_CONST.PI2; + } + else + { + targetAngle -= MATH_CONST.PI2; + } + } + + if (targetAngle > currentAngle) + { + currentAngle += lerp; + } + else if (targetAngle < currentAngle) + { + currentAngle -= lerp; + } + } + + return currentAngle; +}; + +module.exports = RotateTo; + + +/***/ }), +/* 58 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Gets the shortest angle between `angle1` and `angle2`. + * + * Both angles must be in the range -180 to 180, which is the same clamped + * range that `sprite.angle` uses, so you can pass in two sprite angles to + * this method and get the shortest angle back between the two of them. + * + * The angle returned will be in the same range. If the returned angle is + * greater than 0 then it's a counter-clockwise rotation, if < 0 then it's + * a clockwise rotation. + * + * TODO: Wrap the angles in this function? + * + * @function Phaser.Math.Angle.ShortestBetween + * @since 3.0.0 + * + * @param {number} angle1 - The first angle in the range -180 to 180. + * @param {number} angle2 - The second angle in the range -180 to 180. + * + * @return {number} The shortest angle, in degrees. If greater than zero it's a counter-clockwise rotation. + */ +var ShortestBetween = function (angle1, angle2) +{ + var difference = angle2 - angle1; + + if (difference === 0) + { + return 0; + } + + var times = Math.floor((difference - (-180)) / 360); + + return difference - (times * 360); + +}; + +module.exports = ShortestBetween; + + +/***/ }), +/* 59 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Distance + */ + +module.exports = { + + Between: __webpack_require__(60), + BetweenPoints: __webpack_require__(61), + BetweenPointsSquared: __webpack_require__(62), + Chebyshev: __webpack_require__(63), + Power: __webpack_require__(64), + Snake: __webpack_require__(65), + Squared: __webpack_require__(66) + +}; + + +/***/ }), +/* 60 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the distance between two sets of coordinates (points). + * + * @function Phaser.Math.Distance.Between + * @since 3.0.0 + * + * @param {number} x1 - The x coordinate of the first point. + * @param {number} y1 - The y coordinate of the first point. + * @param {number} x2 - The x coordinate of the second point. + * @param {number} y2 - The y coordinate of the second point. + * + * @return {number} The distance between each point. + */ +var DistanceBetween = function (x1, y1, x2, y2) +{ + var dx = x1 - x2; + var dy = y1 - y2; + + return Math.sqrt(dx * dx + dy * dy); +}; + +module.exports = DistanceBetween; + + +/***/ }), +/* 61 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the distance between two points. + * + * @function Phaser.Math.Distance.BetweenPoints + * @since 3.22.0 + * + * @param {Phaser.Types.Math.Vector2Like} a - The first point. + * @param {Phaser.Types.Math.Vector2Like} b - The second point. + * + * @return {number} The distance between the points. + */ +var DistanceBetweenPoints = function (a, b) +{ + var dx = a.x - b.x; + var dy = a.y - b.y; + + return Math.sqrt(dx * dx + dy * dy); +}; + +module.exports = DistanceBetweenPoints; + + +/***/ }), +/* 62 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the squared distance between two points. + * + * @function Phaser.Math.Distance.BetweenPointsSquared + * @since 3.22.0 + * + * @param {Phaser.Types.Math.Vector2Like} a - The first point. + * @param {Phaser.Types.Math.Vector2Like} b - The second point. + * + * @return {number} The squared distance between the points. + */ +var DistanceBetweenPointsSquared = function (a, b) +{ + var dx = a.x - b.x; + var dy = a.y - b.y; + + return dx * dx + dy * dy; +}; + +module.exports = DistanceBetweenPointsSquared; + + +/***/ }), +/* 63 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the Chebyshev distance between two sets of coordinates (points). + * + * Chebyshev distance (or chessboard distance) is the maximum of the horizontal and vertical distances. + * It's the effective distance when movement can be horizontal, vertical, or diagonal. + * + * @function Phaser.Math.Distance.Chebyshev + * @since 3.22.0 + * + * @param {number} x1 - The x coordinate of the first point. + * @param {number} y1 - The y coordinate of the first point. + * @param {number} x2 - The x coordinate of the second point. + * @param {number} y2 - The y coordinate of the second point. + * + * @return {number} The distance between each point. + */ +var ChebyshevDistance = function (x1, y1, x2, y2) +{ + return Math.max(Math.abs(x1 - x2), Math.abs(y1 - y2)); +}; + +module.exports = ChebyshevDistance; + + +/***/ }), +/* 64 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the distance between two sets of coordinates (points) to the power of `pow`. + * + * @function Phaser.Math.Distance.Power + * @since 3.0.0 + * + * @param {number} x1 - The x coordinate of the first point. + * @param {number} y1 - The y coordinate of the first point. + * @param {number} x2 - The x coordinate of the second point. + * @param {number} y2 - The y coordinate of the second point. + * @param {number} pow - The exponent. + * + * @return {number} The distance between each point. + */ +var DistancePower = function (x1, y1, x2, y2, pow) +{ + if (pow === undefined) { pow = 2; } + + return Math.sqrt(Math.pow(x2 - x1, pow) + Math.pow(y2 - y1, pow)); +}; + +module.exports = DistancePower; + + +/***/ }), +/* 65 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the snake distance between two sets of coordinates (points). + * + * Snake distance (rectilinear distance, Manhattan distance) is the sum of the horizontal and vertical distances. + * It's the effective distance when movement is allowed only horizontally or vertically (but not both). + * + * @function Phaser.Math.Distance.Snake + * @since 3.22.0 + * + * @param {number} x1 - The x coordinate of the first point. + * @param {number} y1 - The y coordinate of the first point. + * @param {number} x2 - The x coordinate of the second point. + * @param {number} y2 - The y coordinate of the second point. + * + * @return {number} The distance between each point. + */ +var SnakeDistance = function (x1, y1, x2, y2) +{ + return Math.abs(x1 - x2) + Math.abs(y1 - y2); +}; + +module.exports = SnakeDistance; + + +/***/ }), +/* 66 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the distance between two sets of coordinates (points), squared. + * + * @function Phaser.Math.Distance.Squared + * @since 3.0.0 + * + * @param {number} x1 - The x coordinate of the first point. + * @param {number} y1 - The y coordinate of the first point. + * @param {number} x2 - The x coordinate of the second point. + * @param {number} y2 - The y coordinate of the second point. + * + * @return {number} The distance between each point, squared. + */ +var DistanceSquared = function (x1, y1, x2, y2) +{ + var dx = x1 - x2; + var dy = y1 - y2; + + return dx * dx + dy * dy; +}; + +module.exports = DistanceSquared; + + +/***/ }), +/* 67 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing + */ + +module.exports = { + + Back: __webpack_require__(68), + Bounce: __webpack_require__(72), + Circular: __webpack_require__(76), + Cubic: __webpack_require__(80), + Elastic: __webpack_require__(84), + Expo: __webpack_require__(88), + Linear: __webpack_require__(92), + Quadratic: __webpack_require__(94), + Quartic: __webpack_require__(98), + Quintic: __webpack_require__(102), + Sine: __webpack_require__(106), + Stepped: __webpack_require__(110) + +}; + + +/***/ }), +/* 68 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Back + */ + +module.exports = { + + In: __webpack_require__(69), + Out: __webpack_require__(70), + InOut: __webpack_require__(71) + +}; + + +/***/ }), +/* 69 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Back ease-in. + * + * @function Phaser.Math.Easing.Back.In + * @since 3.0.0 + * + * @param {number} v - The value to be tweened. + * @param {number} [overshoot=1.70158] - The overshoot amount. + * + * @return {number} The tweened value. + */ +var In = function (v, overshoot) +{ + if (overshoot === undefined) { overshoot = 1.70158; } + + return v * v * ((overshoot + 1) * v - overshoot); +}; + +module.exports = In; + + +/***/ }), +/* 70 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Back ease-out. + * + * @function Phaser.Math.Easing.Back.Out + * @since 3.0.0 + * + * @param {number} v - The value to be tweened. + * @param {number} [overshoot=1.70158] - The overshoot amount. + * + * @return {number} The tweened value. + */ +var Out = function (v, overshoot) +{ + if (overshoot === undefined) { overshoot = 1.70158; } + + return --v * v * ((overshoot + 1) * v + overshoot) + 1; +}; + +module.exports = Out; + + +/***/ }), +/* 71 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Back ease-in/out. + * + * @function Phaser.Math.Easing.Back.InOut + * @since 3.0.0 + * + * @param {number} v - The value to be tweened. + * @param {number} [overshoot=1.70158] - The overshoot amount. + * + * @return {number} The tweened value. + */ +var InOut = function (v, overshoot) +{ + if (overshoot === undefined) { overshoot = 1.70158; } + + var s = overshoot * 1.525; + + if ((v *= 2) < 1) + { + return 0.5 * (v * v * ((s + 1) * v - s)); + } + else + { + return 0.5 * ((v -= 2) * v * ((s + 1) * v + s) + 2); + } +}; + +module.exports = InOut; + + +/***/ }), +/* 72 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Bounce + */ + +module.exports = { + + In: __webpack_require__(73), + Out: __webpack_require__(74), + InOut: __webpack_require__(75) + +}; + + +/***/ }), +/* 73 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Bounce ease-in. + * + * @function Phaser.Math.Easing.Bounce.In + * @since 3.0.0 + * + * @param {number} v - The value to be tweened. + * + * @return {number} The tweened value. + */ +var In = function (v) +{ + v = 1 - v; + + if (v < 1 / 2.75) + { + return 1 - (7.5625 * v * v); + } + else if (v < 2 / 2.75) + { + return 1 - (7.5625 * (v -= 1.5 / 2.75) * v + 0.75); + } + else if (v < 2.5 / 2.75) + { + return 1 - (7.5625 * (v -= 2.25 / 2.75) * v + 0.9375); + } + else + { + return 1 - (7.5625 * (v -= 2.625 / 2.75) * v + 0.984375); + } +}; + +module.exports = In; + + +/***/ }), +/* 74 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Bounce ease-out. + * + * @function Phaser.Math.Easing.Bounce.Out + * @since 3.0.0 + * + * @param {number} v - The value to be tweened. + * + * @return {number} The tweened value. + */ +var Out = function (v) +{ + if (v < 1 / 2.75) + { + return 7.5625 * v * v; + } + else if (v < 2 / 2.75) + { + return 7.5625 * (v -= 1.5 / 2.75) * v + 0.75; + } + else if (v < 2.5 / 2.75) + { + return 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375; + } + else + { + return 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375; + } +}; + +module.exports = Out; + + +/***/ }), +/* 75 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Bounce ease-in/out. + * + * @function Phaser.Math.Easing.Bounce.InOut + * @since 3.0.0 + * + * @param {number} v - The value to be tweened. + * + * @return {number} The tweened value. + */ +var InOut = function (v) +{ + var reverse = false; + + if (v < 0.5) + { + v = 1 - (v * 2); + reverse = true; + } + else + { + v = (v * 2) - 1; + } + + if (v < 1 / 2.75) + { + v = 7.5625 * v * v; + } + else if (v < 2 / 2.75) + { + v = 7.5625 * (v -= 1.5 / 2.75) * v + 0.75; + } + else if (v < 2.5 / 2.75) + { + v = 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375; + } + else + { + v = 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375; + } + + if (reverse) + { + return (1 - v) * 0.5; + } + else + { + return v * 0.5 + 0.5; + } +}; + +module.exports = InOut; + + +/***/ }), +/* 76 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Circular + */ + +module.exports = { + + In: __webpack_require__(77), + Out: __webpack_require__(78), + InOut: __webpack_require__(79) + +}; + + +/***/ }), +/* 77 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Circular ease-in. + * + * @function Phaser.Math.Easing.Circular.In + * @since 3.0.0 + * + * @param {number} v - The value to be tweened. + * + * @return {number} The tweened value. + */ +var In = function (v) +{ + return 1 - Math.sqrt(1 - v * v); +}; + +module.exports = In; + + +/***/ }), +/* 78 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Circular ease-out. + * + * @function Phaser.Math.Easing.Circular.Out + * @since 3.0.0 + * + * @param {number} v - The value to be tweened. + * + * @return {number} The tweened value. + */ +var Out = function (v) +{ + return Math.sqrt(1 - (--v * v)); +}; + +module.exports = Out; + + +/***/ }), +/* 79 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Circular ease-in/out. + * + * @function Phaser.Math.Easing.Circular.InOut + * @since 3.0.0 + * + * @param {number} v - The value to be tweened. + * + * @return {number} The tweened value. + */ +var InOut = function (v) +{ + if ((v *= 2) < 1) + { + return -0.5 * (Math.sqrt(1 - v * v) - 1); + } + else + { + return 0.5 * (Math.sqrt(1 - (v -= 2) * v) + 1); + } +}; + +module.exports = InOut; + + +/***/ }), +/* 80 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Cubic + */ + +module.exports = { + + In: __webpack_require__(81), + Out: __webpack_require__(82), + InOut: __webpack_require__(83) + +}; + + +/***/ }), +/* 81 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Cubic ease-in. + * + * @function Phaser.Math.Easing.Cubic.In + * @since 3.0.0 + * + * @param {number} v - The value to be tweened. + * + * @return {number} The tweened value. + */ +var In = function (v) +{ + return v * v * v; +}; + +module.exports = In; + + +/***/ }), +/* 82 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Cubic ease-out. + * + * @function Phaser.Math.Easing.Cubic.Out + * @since 3.0.0 + * + * @param {number} v - The value to be tweened. + * + * @return {number} The tweened value. + */ +var Out = function (v) +{ + return --v * v * v + 1; +}; + +module.exports = Out; + + +/***/ }), +/* 83 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Cubic ease-in/out. + * + * @function Phaser.Math.Easing.Cubic.InOut + * @since 3.0.0 + * + * @param {number} v - The value to be tweened. + * + * @return {number} The tweened value. + */ +var InOut = function (v) +{ + if ((v *= 2) < 1) + { + return 0.5 * v * v * v; + } + else + { + return 0.5 * ((v -= 2) * v * v + 2); + } +}; + +module.exports = InOut; + + +/***/ }), +/* 84 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Elastic + */ + +module.exports = { + + In: __webpack_require__(85), + Out: __webpack_require__(86), + InOut: __webpack_require__(87) + +}; + + +/***/ }), +/* 85 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Elastic ease-in. + * + * @function Phaser.Math.Easing.Elastic.In + * @since 3.0.0 + * + * @param {number} v - The value to be tweened. + * @param {number} [amplitude=0.1] - The amplitude of the elastic ease. + * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles. + * + * @return {number} The tweened value. + */ +var In = function (v, amplitude, period) +{ + if (amplitude === undefined) { amplitude = 0.1; } + if (period === undefined) { period = 0.1; } + + if (v === 0) + { + return 0; + } + else if (v === 1) + { + return 1; + } + else + { + var s = period / 4; + + if (amplitude < 1) + { + amplitude = 1; + } + else + { + s = period * Math.asin(1 / amplitude) / (2 * Math.PI); + } + + return -(amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period)); + } +}; + +module.exports = In; + + +/***/ }), +/* 86 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Elastic ease-out. + * + * @function Phaser.Math.Easing.Elastic.Out + * @since 3.0.0 + * + * @param {number} v - The value to be tweened. + * @param {number} [amplitude=0.1] - The amplitude of the elastic ease. + * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles. + * + * @return {number} The tweened value. + */ +var Out = function (v, amplitude, period) +{ + if (amplitude === undefined) { amplitude = 0.1; } + if (period === undefined) { period = 0.1; } + + if (v === 0) + { + return 0; + } + else if (v === 1) + { + return 1; + } + else + { + var s = period / 4; + + if (amplitude < 1) + { + amplitude = 1; + } + else + { + s = period * Math.asin(1 / amplitude) / (2 * Math.PI); + } + + return (amplitude * Math.pow(2, -10 * v) * Math.sin((v - s) * (2 * Math.PI) / period) + 1); + } +}; + +module.exports = Out; + + +/***/ }), +/* 87 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Elastic ease-in/out. + * + * @function Phaser.Math.Easing.Elastic.InOut + * @since 3.0.0 + * + * @param {number} v - The value to be tweened. + * @param {number} [amplitude=0.1] - The amplitude of the elastic ease. + * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles. + * + * @return {number} The tweened value. + */ +var InOut = function (v, amplitude, period) +{ + if (amplitude === undefined) { amplitude = 0.1; } + if (period === undefined) { period = 0.1; } + + if (v === 0) + { + return 0; + } + else if (v === 1) + { + return 1; + } + else + { + var s = period / 4; + + if (amplitude < 1) + { + amplitude = 1; + } + else + { + s = period * Math.asin(1 / amplitude) / (2 * Math.PI); + } + + if ((v *= 2) < 1) + { + return -0.5 * (amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period)); + } + else + { + return amplitude * Math.pow(2, -10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period) * 0.5 + 1; + } + } +}; + +module.exports = InOut; + + +/***/ }), +/* 88 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Expo + */ + +module.exports = { + + In: __webpack_require__(89), + Out: __webpack_require__(90), + InOut: __webpack_require__(91) + +}; + + +/***/ }), +/* 89 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Exponential ease-in. + * + * @function Phaser.Math.Easing.Expo.In + * @since 3.0.0 + * + * @param {number} v - The value to be tweened. + * + * @return {number} The tweened value. + */ +var In = function (v) +{ + return Math.pow(2, 10 * (v - 1)) - 0.001; +}; + +module.exports = In; + + +/***/ }), +/* 90 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Exponential ease-out. + * + * @function Phaser.Math.Easing.Expo.Out + * @since 3.0.0 + * + * @param {number} v - The value to be tweened. + * + * @return {number} The tweened value. + */ +var Out = function (v) +{ + return 1 - Math.pow(2, -10 * v); +}; + +module.exports = Out; + + +/***/ }), +/* 91 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Exponential ease-in/out. + * + * @function Phaser.Math.Easing.Expo.InOut + * @since 3.0.0 + * + * @param {number} v - The value to be tweened. + * + * @return {number} The tweened value. + */ +var InOut = function (v) +{ + if ((v *= 2) < 1) + { + return 0.5 * Math.pow(2, 10 * (v - 1)); + } + else + { + return 0.5 * (2 - Math.pow(2, -10 * (v - 1))); + } +}; + +module.exports = InOut; + + +/***/ }), +/* 92 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +module.exports = __webpack_require__(93); + + +/***/ }), +/* 93 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Linear easing (no variation). + * + * @function Phaser.Math.Easing.Linear + * @since 3.0.0 + * + * @param {number} v - The value to be tweened. + * + * @return {number} The tweened value. + */ +var Linear = function (v) +{ + return v; +}; + +module.exports = Linear; + + +/***/ }), +/* 94 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Quadratic + */ + +module.exports = { + + In: __webpack_require__(95), + Out: __webpack_require__(96), + InOut: __webpack_require__(97) + +}; + + +/***/ }), +/* 95 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Quadratic ease-in. + * + * @function Phaser.Math.Easing.Quadratic.In + * @since 3.0.0 + * + * @param {number} v - The value to be tweened. + * + * @return {number} The tweened value. + */ +var In = function (v) +{ + return v * v; +}; + +module.exports = In; + + +/***/ }), +/* 96 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Quadratic ease-out. + * + * @function Phaser.Math.Easing.Quadratic.Out + * @since 3.0.0 + * + * @param {number} v - The value to be tweened. + * + * @return {number} The tweened value. + */ +var Out = function (v) +{ + return v * (2 - v); +}; + +module.exports = Out; + + +/***/ }), +/* 97 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Quadratic ease-in/out. + * + * @function Phaser.Math.Easing.Quadratic.InOut + * @since 3.0.0 + * + * @param {number} v - The value to be tweened. + * + * @return {number} The tweened value. + */ +var InOut = function (v) +{ + if ((v *= 2) < 1) + { + return 0.5 * v * v; + } + else + { + return -0.5 * (--v * (v - 2) - 1); + } +}; + +module.exports = InOut; + + +/***/ }), +/* 98 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Quartic + */ + +module.exports = { + + In: __webpack_require__(99), + Out: __webpack_require__(100), + InOut: __webpack_require__(101) + +}; + + +/***/ }), +/* 99 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Quartic ease-in. + * + * @function Phaser.Math.Easing.Quartic.In + * @since 3.0.0 + * + * @param {number} v - The value to be tweened. + * + * @return {number} The tweened value. + */ +var In = function (v) +{ + return v * v * v * v; +}; + +module.exports = In; + + +/***/ }), +/* 100 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Quartic ease-out. + * + * @function Phaser.Math.Easing.Quartic.Out + * @since 3.0.0 + * + * @param {number} v - The value to be tweened. + * + * @return {number} The tweened value. + */ +var Out = function (v) +{ + return 1 - (--v * v * v * v); +}; + +module.exports = Out; + + +/***/ }), +/* 101 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Quartic ease-in/out. + * + * @function Phaser.Math.Easing.Quartic.InOut + * @since 3.0.0 + * + * @param {number} v - The value to be tweened. + * + * @return {number} The tweened value. + */ +var InOut = function (v) +{ + if ((v *= 2) < 1) + { + return 0.5 * v * v * v * v; + } + else + { + return -0.5 * ((v -= 2) * v * v * v - 2); + } +}; + +module.exports = InOut; + + +/***/ }), +/* 102 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Quintic + */ + +module.exports = { + + In: __webpack_require__(103), + Out: __webpack_require__(104), + InOut: __webpack_require__(105) + +}; + + +/***/ }), +/* 103 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Quintic ease-in. + * + * @function Phaser.Math.Easing.Quintic.In + * @since 3.0.0 + * + * @param {number} v - The value to be tweened. + * + * @return {number} The tweened value. + */ +var In = function (v) +{ + return v * v * v * v * v; +}; + +module.exports = In; + + +/***/ }), +/* 104 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Quintic ease-out. + * + * @function Phaser.Math.Easing.Quintic.Out + * @since 3.0.0 + * + * @param {number} v - The value to be tweened. + * + * @return {number} The tweened value. + */ +var Out = function (v) +{ + return --v * v * v * v * v + 1; +}; + +module.exports = Out; + + +/***/ }), +/* 105 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Quintic ease-in/out. + * + * @function Phaser.Math.Easing.Quintic.InOut + * @since 3.0.0 + * + * @param {number} v - The value to be tweened. + * + * @return {number} The tweened value. + */ +var InOut = function (v) +{ + if ((v *= 2) < 1) + { + return 0.5 * v * v * v * v * v; + } + else + { + return 0.5 * ((v -= 2) * v * v * v * v + 2); + } +}; + +module.exports = InOut; + + +/***/ }), +/* 106 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Sine + */ + +module.exports = { + + In: __webpack_require__(107), + Out: __webpack_require__(108), + InOut: __webpack_require__(109) + +}; + + +/***/ }), +/* 107 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Sinusoidal ease-in. + * + * @function Phaser.Math.Easing.Sine.In + * @since 3.0.0 + * + * @param {number} v - The value to be tweened. + * + * @return {number} The tweened value. + */ +var In = function (v) +{ + if (v === 0) + { + return 0; + } + else if (v === 1) + { + return 1; + } + else + { + return 1 - Math.cos(v * Math.PI / 2); + } +}; + +module.exports = In; + + +/***/ }), +/* 108 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Sinusoidal ease-out. + * + * @function Phaser.Math.Easing.Sine.Out + * @since 3.0.0 + * + * @param {number} v - The value to be tweened. + * + * @return {number} The tweened value. + */ +var Out = function (v) +{ + if (v === 0) + { + return 0; + } + else if (v === 1) + { + return 1; + } + else + { + return Math.sin(v * Math.PI / 2); + } +}; + +module.exports = Out; + + +/***/ }), +/* 109 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Sinusoidal ease-in/out. + * + * @function Phaser.Math.Easing.Sine.InOut + * @since 3.0.0 + * + * @param {number} v - The value to be tweened. + * + * @return {number} The tweened value. + */ +var InOut = function (v) +{ + if (v === 0) + { + return 0; + } + else if (v === 1) + { + return 1; + } + else + { + return 0.5 * (1 - Math.cos(Math.PI * v)); + } +}; + +module.exports = InOut; + + +/***/ }), +/* 110 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Stepped + */ + +module.exports = __webpack_require__(111); + + +/***/ }), +/* 111 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Stepped easing. + * + * @function Phaser.Math.Easing.Stepped + * @since 3.0.0 + * + * @param {number} v - The value to be tweened. + * @param {number} [steps=1] - The number of steps in the ease. + * + * @return {number} The tweened value. + */ +var Stepped = function (v, steps) +{ + if (steps === undefined) { steps = 1; } + + if (v <= 0) + { + return 0; + } + else if (v >= 1) + { + return 1; + } + else + { + return (((steps * v) | 0) + 1) * (1 / steps); + } +}; + +module.exports = Stepped; + + +/***/ }), +/* 112 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Fuzzy + */ + +module.exports = { + + Ceil: __webpack_require__(113), + Equal: __webpack_require__(17), + Floor: __webpack_require__(114), + GreaterThan: __webpack_require__(115), + LessThan: __webpack_require__(116) + +}; + + +/***/ }), +/* 113 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the fuzzy ceiling of the given value. + * + * @function Phaser.Math.Fuzzy.Ceil + * @since 3.0.0 + * + * @param {number} value - The value. + * @param {number} [epsilon=0.0001] - The epsilon. + * + * @return {number} The fuzzy ceiling of the value. + */ +var Ceil = function (value, epsilon) +{ + if (epsilon === undefined) { epsilon = 0.0001; } + + return Math.ceil(value - epsilon); +}; + +module.exports = Ceil; + + +/***/ }), +/* 114 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the fuzzy floor of the given value. + * + * @function Phaser.Math.Fuzzy.Floor + * @since 3.0.0 + * + * @param {number} value - The value. + * @param {number} [epsilon=0.0001] - The epsilon. + * + * @return {number} The floor of the value. + */ +var Floor = function (value, epsilon) +{ + if (epsilon === undefined) { epsilon = 0.0001; } + + return Math.floor(value + epsilon); +}; + +module.exports = Floor; + + +/***/ }), +/* 115 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Check whether `a` is fuzzily greater than `b`. + * + * `a` is fuzzily greater than `b` if it is more than `b - epsilon`. + * + * @function Phaser.Math.Fuzzy.GreaterThan + * @since 3.0.0 + * + * @param {number} a - The first value. + * @param {number} b - The second value. + * @param {number} [epsilon=0.0001] - The epsilon. + * + * @return {boolean} `true` if `a` is fuzzily greater than than `b`, otherwise `false`. + */ +var GreaterThan = function (a, b, epsilon) +{ + if (epsilon === undefined) { epsilon = 0.0001; } + + return a > b - epsilon; +}; + +module.exports = GreaterThan; + + +/***/ }), +/* 116 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Check whether `a` is fuzzily less than `b`. + * + * `a` is fuzzily less than `b` if it is less than `b + epsilon`. + * + * @function Phaser.Math.Fuzzy.LessThan + * @since 3.0.0 + * + * @param {number} a - The first value. + * @param {number} b - The second value. + * @param {number} [epsilon=0.0001] - The epsilon. + * + * @return {boolean} `true` if `a` is fuzzily less than `b`, otherwise `false`. + */ +var LessThan = function (a, b, epsilon) +{ + if (epsilon === undefined) { epsilon = 0.0001; } + + return a < b + epsilon; +}; + +module.exports = LessThan; + + +/***/ }), +/* 117 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Interpolation + */ + +module.exports = { + + Bezier: __webpack_require__(118), + CatmullRom: __webpack_require__(119), + CubicBezier: __webpack_require__(120), + Linear: __webpack_require__(121), + QuadraticBezier: __webpack_require__(122), + SmoothStep: __webpack_require__(123), + SmootherStep: __webpack_require__(124) + +}; + + +/***/ }), +/* 118 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Bernstein = __webpack_require__(18); + +/** + * A bezier interpolation method. + * + * @function Phaser.Math.Interpolation.Bezier + * @since 3.0.0 + * + * @param {number[]} v - The input array of values to interpolate between. + * @param {number} k - The percentage of interpolation, between 0 and 1. + * + * @return {number} The interpolated value. + */ +var BezierInterpolation = function (v, k) +{ + var b = 0; + var n = v.length - 1; + + for (var i = 0; i <= n; i++) + { + b += Math.pow(1 - k, n - i) * Math.pow(k, i) * v[i] * Bernstein(n, i); + } + + return b; +}; + +module.exports = BezierInterpolation; + + +/***/ }), +/* 119 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CatmullRom = __webpack_require__(20); + +/** + * A Catmull-Rom interpolation method. + * + * @function Phaser.Math.Interpolation.CatmullRom + * @since 3.0.0 + * + * @param {number[]} v - The input array of values to interpolate between. + * @param {number} k - The percentage of interpolation, between 0 and 1. + * + * @return {number} The interpolated value. + */ +var CatmullRomInterpolation = function (v, k) +{ + var m = v.length - 1; + var f = m * k; + var i = Math.floor(f); + + if (v[0] === v[m]) + { + if (k < 0) + { + i = Math.floor(f = m * (1 + k)); + } + + return CatmullRom(f - i, v[(i - 1 + m) % m], v[i], v[(i + 1) % m], v[(i + 2) % m]); + } + else + { + if (k < 0) + { + return v[0] - (CatmullRom(-f, v[0], v[0], v[1], v[1]) - v[0]); + } + + if (k > 1) + { + return v[m] - (CatmullRom(f - m, v[m], v[m], v[m - 1], v[m - 1]) - v[m]); + } + + return CatmullRom(f - i, v[i ? i - 1 : 0], v[i], v[m < i + 1 ? m : i + 1], v[m < i + 2 ? m : i + 2]); + } +}; + +module.exports = CatmullRomInterpolation; + + +/***/ }), +/* 120 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @ignore + */ +function P0 (t, p) +{ + var k = 1 - t; + + return k * k * k * p; +} + +/** + * @ignore + */ +function P1 (t, p) +{ + var k = 1 - t; + + return 3 * k * k * t * p; +} + +/** + * @ignore + */ +function P2 (t, p) +{ + return 3 * (1 - t) * t * t * p; +} + +/** + * @ignore + */ +function P3 (t, p) +{ + return t * t * t * p; +} + +/** + * A cubic bezier interpolation method. + * + * https://medium.com/@adrian_cooney/bezier-interpolation-13b68563313a + * + * @function Phaser.Math.Interpolation.CubicBezier + * @since 3.0.0 + * + * @param {number} t - The percentage of interpolation, between 0 and 1. + * @param {number} p0 - The start point. + * @param {number} p1 - The first control point. + * @param {number} p2 - The second control point. + * @param {number} p3 - The end point. + * + * @return {number} The interpolated value. + */ +var CubicBezierInterpolation = function (t, p0, p1, p2, p3) +{ + return P0(t, p0) + P1(t, p1) + P2(t, p2) + P3(t, p3); +}; + +module.exports = CubicBezierInterpolation; + + +/***/ }), +/* 121 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Linear = __webpack_require__(21); + +/** + * A linear interpolation method. + * + * @function Phaser.Math.Interpolation.Linear + * @since 3.0.0 + * @see {@link https://en.wikipedia.org/wiki/Linear_interpolation} + * + * @param {number[]} v - The input array of values to interpolate between. + * @param {!number} k - The percentage of interpolation, between 0 and 1. + * + * @return {!number} The interpolated value. + */ +var LinearInterpolation = function (v, k) +{ + var m = v.length - 1; + var f = m * k; + var i = Math.floor(f); + + if (k < 0) + { + return Linear(v[0], v[1], f); + } + else if (k > 1) + { + return Linear(v[m], v[m - 1], m - f); + } + else + { + return Linear(v[i], v[(i + 1 > m) ? m : i + 1], f - i); + } +}; + +module.exports = LinearInterpolation; + + +/***/ }), +/* 122 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @ignore + */ +function P0 (t, p) +{ + var k = 1 - t; + + return k * k * p; +} + +/** + * @ignore + */ +function P1 (t, p) +{ + return 2 * (1 - t) * t * p; +} + +/** + * @ignore + */ +function P2 (t, p) +{ + return t * t * p; +} + +// https://github.com/mrdoob/three.js/blob/master/src/extras/core/Interpolations.js + +/** + * A quadratic bezier interpolation method. + * + * @function Phaser.Math.Interpolation.QuadraticBezier + * @since 3.2.0 + * + * @param {number} t - The percentage of interpolation, between 0 and 1. + * @param {number} p0 - The start point. + * @param {number} p1 - The control point. + * @param {number} p2 - The end point. + * + * @return {number} The interpolated value. + */ +var QuadraticBezierInterpolation = function (t, p0, p1, p2) +{ + return P0(t, p0) + P1(t, p1) + P2(t, p2); +}; + +module.exports = QuadraticBezierInterpolation; + + +/***/ }), +/* 123 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SmoothStep = __webpack_require__(22); + +/** + * A Smooth Step interpolation method. + * + * @function Phaser.Math.Interpolation.SmoothStep + * @since 3.9.0 + * @see {@link https://en.wikipedia.org/wiki/Smoothstep} + * + * @param {number} t - The percentage of interpolation, between 0 and 1. + * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'. + * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'. + * + * @return {number} The interpolated value. + */ +var SmoothStepInterpolation = function (t, min, max) +{ + return min + (max - min) * SmoothStep(t, 0, 1); +}; + +module.exports = SmoothStepInterpolation; + + +/***/ }), +/* 124 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SmootherStep = __webpack_require__(23); + +/** + * A Smoother Step interpolation method. + * + * @function Phaser.Math.Interpolation.SmootherStep + * @since 3.9.0 + * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations} + * + * @param {number} t - The percentage of interpolation, between 0 and 1. + * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'. + * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'. + * + * @return {number} The interpolated value. + */ +var SmootherStepInterpolation = function (t, min, max) +{ + return min + (max - min) * SmootherStep(t, 0, 1); +}; + +module.exports = SmootherStepInterpolation; + + +/***/ }), +/* 125 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Pow2 + */ + +module.exports = { + + GetNext: __webpack_require__(126), + IsSize: __webpack_require__(127), + IsValue: __webpack_require__(128) + +}; + + +/***/ }), +/* 126 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Returns the nearest power of 2 to the given `value`. + * + * @function Phaser.Math.Pow2.GetNext + * @since 3.0.0 + * + * @param {number} value - The value. + * + * @return {integer} The nearest power of 2 to `value`. + */ +var GetPowerOfTwo = function (value) +{ + var index = Math.log(value) / 0.6931471805599453; + + return (1 << Math.ceil(index)); +}; + +module.exports = GetPowerOfTwo; + + +/***/ }), +/* 127 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Checks if the given `width` and `height` are a power of two. + * Useful for checking texture dimensions. + * + * @function Phaser.Math.Pow2.IsSize + * @since 3.0.0 + * + * @param {number} width - The width. + * @param {number} height - The height. + * + * @return {boolean} `true` if `width` and `height` are a power of two, otherwise `false`. + */ +var IsSizePowerOfTwo = function (width, height) +{ + return (width > 0 && (width & (width - 1)) === 0 && height > 0 && (height & (height - 1)) === 0); +}; + +module.exports = IsSizePowerOfTwo; + + +/***/ }), +/* 128 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Tests the value and returns `true` if it is a power of two. + * + * @function Phaser.Math.Pow2.IsValue + * @since 3.0.0 + * + * @param {number} value - The value to check if it's a power of two. + * + * @return {boolean} Returns `true` if `value` is a power of two, otherwise `false`. + */ +var IsValuePowerOfTwo = function (value) +{ + return (value > 0 && (value & (value - 1)) === 0); +}; + +module.exports = IsValuePowerOfTwo; + + +/***/ }), +/* 129 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Snap + */ + +module.exports = { + + Ceil: __webpack_require__(130), + Floor: __webpack_require__(131), + To: __webpack_require__(132) + +}; + + +/***/ }), +/* 130 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Snap a value to nearest grid slice, using ceil. + * + * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `15`. + * As will `14` snap to `15`... but `16` will snap to `20`. + * + * @function Phaser.Math.Snap.Ceil + * @since 3.0.0 + * + * @param {number} value - The value to snap. + * @param {number} gap - The interval gap of the grid. + * @param {number} [start=0] - Optional starting offset for gap. + * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning. + * + * @return {number} The snapped value. + */ +var SnapCeil = function (value, gap, start, divide) +{ + if (start === undefined) { start = 0; } + + if (gap === 0) + { + return value; + } + + value -= start; + value = gap * Math.ceil(value / gap); + + return (divide) ? (start + value) / gap : start + value; +}; + +module.exports = SnapCeil; + + +/***/ }), +/* 131 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Snap a value to nearest grid slice, using floor. + * + * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10`. + * As will `14` snap to `10`... but `16` will snap to `15`. + * + * @function Phaser.Math.Snap.Floor + * @since 3.0.0 + * + * @param {number} value - The value to snap. + * @param {number} gap - The interval gap of the grid. + * @param {number} [start=0] - Optional starting offset for gap. + * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning. + * + * @return {number} The snapped value. + */ +var SnapFloor = function (value, gap, start, divide) +{ + if (start === undefined) { start = 0; } + + if (gap === 0) + { + return value; + } + + value -= start; + value = gap * Math.floor(value / gap); + + return (divide) ? (start + value) / gap : start + value; +}; + +module.exports = SnapFloor; + + +/***/ }), +/* 132 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Snap a value to nearest grid slice, using rounding. + * + * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10` whereas `14` will snap to `15`. + * + * @function Phaser.Math.Snap.To + * @since 3.0.0 + * + * @param {number} value - The value to snap. + * @param {number} gap - The interval gap of the grid. + * @param {number} [start=0] - Optional starting offset for gap. + * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning. + * + * @return {number} The snapped value. + */ +var SnapTo = function (value, gap, start, divide) +{ + if (start === undefined) { start = 0; } + + if (gap === 0) + { + return value; + } + + value -= start; + value = gap * Math.round(value / gap); + + return (divide) ? (start + value) / gap : start + value; +}; + +module.exports = SnapTo; + + +/***/ }), +/* 133 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); + +/** + * @classdesc + * A seeded Random Data Generator. + * + * Access via `Phaser.Math.RND` which is an instance of this class pre-defined + * by Phaser. Or, create your own instance to use as you require. + * + * The `Math.RND` generator is seeded by the Game Config property value `seed`. + * If no such config property exists, a random number is used. + * + * If you create your own instance of this class you should provide a seed for it. + * If no seed is given it will use a 'random' one based on Date.now. + * + * @class RandomDataGenerator + * @memberof Phaser.Math + * @constructor + * @since 3.0.0 + * + * @param {(string|string[])} [seeds] - The seeds to use for the random number generator. + */ +var RandomDataGenerator = new Class({ + + initialize: + + function RandomDataGenerator (seeds) + { + if (seeds === undefined) { seeds = [ (Date.now() * Math.random()).toString() ]; } + + /** + * Internal var. + * + * @name Phaser.Math.RandomDataGenerator#c + * @type {number} + * @default 1 + * @private + * @since 3.0.0 + */ + this.c = 1; + + /** + * Internal var. + * + * @name Phaser.Math.RandomDataGenerator#s0 + * @type {number} + * @default 0 + * @private + * @since 3.0.0 + */ + this.s0 = 0; + + /** + * Internal var. + * + * @name Phaser.Math.RandomDataGenerator#s1 + * @type {number} + * @default 0 + * @private + * @since 3.0.0 + */ + this.s1 = 0; + + /** + * Internal var. + * + * @name Phaser.Math.RandomDataGenerator#s2 + * @type {number} + * @default 0 + * @private + * @since 3.0.0 + */ + this.s2 = 0; + + /** + * Internal var. + * + * @name Phaser.Math.RandomDataGenerator#n + * @type {number} + * @default 0 + * @private + * @since 3.2.0 + */ + this.n = 0; + + /** + * Signs to choose from. + * + * @name Phaser.Math.RandomDataGenerator#signs + * @type {number[]} + * @since 3.0.0 + */ + this.signs = [ -1, 1 ]; + + if (seeds) + { + this.init(seeds); + } + }, + + /** + * Private random helper. + * + * @method Phaser.Math.RandomDataGenerator#rnd + * @since 3.0.0 + * @private + * + * @return {number} A random number. + */ + rnd: function () + { + var t = 2091639 * this.s0 + this.c * 2.3283064365386963e-10; // 2^-32 + + this.c = t | 0; + this.s0 = this.s1; + this.s1 = this.s2; + this.s2 = t - this.c; + + return this.s2; + }, + + /** + * Internal method that creates a seed hash. + * + * @method Phaser.Math.RandomDataGenerator#hash + * @since 3.0.0 + * @private + * + * @param {string} data - The value to hash. + * + * @return {number} The hashed value. + */ + hash: function (data) + { + var h; + var n = this.n; + + data = data.toString(); + + for (var i = 0; i < data.length; i++) + { + n += data.charCodeAt(i); + h = 0.02519603282416938 * n; + n = h >>> 0; + h -= n; + h *= n; + n = h >>> 0; + h -= n; + n += h * 0x100000000;// 2^32 + } + + this.n = n; + + return (n >>> 0) * 2.3283064365386963e-10;// 2^-32 + }, + + /** + * Initialize the state of the random data generator. + * + * @method Phaser.Math.RandomDataGenerator#init + * @since 3.0.0 + * + * @param {(string|string[])} seeds - The seeds to initialize the random data generator with. + */ + init: function (seeds) + { + if (typeof seeds === 'string') + { + this.state(seeds); + } + else + { + this.sow(seeds); + } + }, + + /** + * Reset the seed of the random data generator. + * + * _Note_: the seed array is only processed up to the first `undefined` (or `null`) value, should such be present. + * + * @method Phaser.Math.RandomDataGenerator#sow + * @since 3.0.0 + * + * @param {string[]} seeds - The array of seeds: the `toString()` of each value is used. + */ + sow: function (seeds) + { + // Always reset to default seed + this.n = 0xefc8249d; + this.s0 = this.hash(' '); + this.s1 = this.hash(' '); + this.s2 = this.hash(' '); + this.c = 1; + + if (!seeds) + { + return; + } + + // Apply any seeds + for (var i = 0; i < seeds.length && (seeds[i] != null); i++) + { + var seed = seeds[i]; + + this.s0 -= this.hash(seed); + this.s0 += ~~(this.s0 < 0); + this.s1 -= this.hash(seed); + this.s1 += ~~(this.s1 < 0); + this.s2 -= this.hash(seed); + this.s2 += ~~(this.s2 < 0); + } + }, + + /** + * Returns a random integer between 0 and 2^32. + * + * @method Phaser.Math.RandomDataGenerator#integer + * @since 3.0.0 + * + * @return {number} A random integer between 0 and 2^32. + */ + integer: function () + { + // 2^32 + return this.rnd() * 0x100000000; + }, + + /** + * Returns a random real number between 0 and 1. + * + * @method Phaser.Math.RandomDataGenerator#frac + * @since 3.0.0 + * + * @return {number} A random real number between 0 and 1. + */ + frac: function () + { + // 2^-53 + return this.rnd() + (this.rnd() * 0x200000 | 0) * 1.1102230246251565e-16; + }, + + /** + * Returns a random real number between 0 and 2^32. + * + * @method Phaser.Math.RandomDataGenerator#real + * @since 3.0.0 + * + * @return {number} A random real number between 0 and 2^32. + */ + real: function () + { + return this.integer() + this.frac(); + }, + + /** + * Returns a random integer between and including min and max. + * + * @method Phaser.Math.RandomDataGenerator#integerInRange + * @since 3.0.0 + * + * @param {number} min - The minimum value in the range. + * @param {number} max - The maximum value in the range. + * + * @return {number} A random number between min and max. + */ + integerInRange: function (min, max) + { + return Math.floor(this.realInRange(0, max - min + 1) + min); + }, + + /** + * Returns a random integer between and including min and max. + * This method is an alias for RandomDataGenerator.integerInRange. + * + * @method Phaser.Math.RandomDataGenerator#between + * @since 3.0.0 + * + * @param {number} min - The minimum value in the range. + * @param {number} max - The maximum value in the range. + * + * @return {number} A random number between min and max. + */ + between: function (min, max) + { + return Math.floor(this.realInRange(0, max - min + 1) + min); + }, + + /** + * Returns a random real number between min and max. + * + * @method Phaser.Math.RandomDataGenerator#realInRange + * @since 3.0.0 + * + * @param {number} min - The minimum value in the range. + * @param {number} max - The maximum value in the range. + * + * @return {number} A random number between min and max. + */ + realInRange: function (min, max) + { + return this.frac() * (max - min) + min; + }, + + /** + * Returns a random real number between -1 and 1. + * + * @method Phaser.Math.RandomDataGenerator#normal + * @since 3.0.0 + * + * @return {number} A random real number between -1 and 1. + */ + normal: function () + { + return 1 - (2 * this.frac()); + }, + + /** + * Returns a valid RFC4122 version4 ID hex string from https://gist.github.com/1308368 + * + * @method Phaser.Math.RandomDataGenerator#uuid + * @since 3.0.0 + * + * @return {string} A valid RFC4122 version4 ID hex string + */ + uuid: function () + { + var a = ''; + var b = ''; + + for (b = a = ''; a++ < 36; b += ~a % 5 | a * 3 & 4 ? (a ^ 15 ? 8 ^ this.frac() * (a ^ 20 ? 16 : 4) : 4).toString(16) : '-') + { + // eslint-disable-next-line no-empty + } + + return b; + }, + + /** + * Returns a random element from within the given array. + * + * @method Phaser.Math.RandomDataGenerator#pick + * @since 3.0.0 + * + * @generic T + * @genericUse {T[]} - [array] + * @genericUse {T} - [$return] + * + * @param {T[]} array - The array to pick a random element from. + * + * @return {T} A random member of the array. + */ + pick: function (array) + { + return array[this.integerInRange(0, array.length - 1)]; + }, + + /** + * Returns a sign to be used with multiplication operator. + * + * @method Phaser.Math.RandomDataGenerator#sign + * @since 3.0.0 + * + * @return {number} -1 or +1. + */ + sign: function () + { + return this.pick(this.signs); + }, + + /** + * Returns a random element from within the given array, favoring the earlier entries. + * + * @method Phaser.Math.RandomDataGenerator#weightedPick + * @since 3.0.0 + * + * @generic T + * @genericUse {T[]} - [array] + * @genericUse {T} - [$return] + * + * @param {T[]} array - The array to pick a random element from. + * + * @return {T} A random member of the array. + */ + weightedPick: function (array) + { + return array[~~(Math.pow(this.frac(), 2) * (array.length - 1) + 0.5)]; + }, + + /** + * Returns a random timestamp between min and max, or between the beginning of 2000 and the end of 2020 if min and max aren't specified. + * + * @method Phaser.Math.RandomDataGenerator#timestamp + * @since 3.0.0 + * + * @param {number} min - The minimum value in the range. + * @param {number} max - The maximum value in the range. + * + * @return {number} A random timestamp between min and max. + */ + timestamp: function (min, max) + { + return this.realInRange(min || 946684800000, max || 1577862000000); + }, + + /** + * Returns a random angle between -180 and 180. + * + * @method Phaser.Math.RandomDataGenerator#angle + * @since 3.0.0 + * + * @return {number} A random number between -180 and 180. + */ + angle: function () + { + return this.integerInRange(-180, 180); + }, + + /** + * Returns a random rotation in radians, between -3.141 and 3.141 + * + * @method Phaser.Math.RandomDataGenerator#rotation + * @since 3.0.0 + * + * @return {number} A random number between -3.141 and 3.141 + */ + rotation: function () + { + return this.realInRange(-3.1415926, 3.1415926); + }, + + /** + * Gets or Sets the state of the generator. This allows you to retain the values + * that the generator is using between games, i.e. in a game save file. + * + * To seed this generator with a previously saved state you can pass it as the + * `seed` value in your game config, or call this method directly after Phaser has booted. + * + * Call this method with no parameters to return the current state. + * + * If providing a state it should match the same format that this method + * returns, which is a string with a header `!rnd` followed by the `c`, + * `s0`, `s1` and `s2` values respectively, each comma-delimited. + * + * @method Phaser.Math.RandomDataGenerator#state + * @since 3.0.0 + * + * @param {string} [state] - Generator state to be set. + * + * @return {string} The current state of the generator. + */ + state: function (state) + { + if (typeof state === 'string' && state.match(/^!rnd/)) + { + state = state.split(','); + + this.c = parseFloat(state[1]); + this.s0 = parseFloat(state[2]); + this.s1 = parseFloat(state[3]); + this.s2 = parseFloat(state[4]); + } + + return [ '!rnd', this.c, this.s0, this.s1, this.s2 ].join(','); + }, + + /** + * Shuffles the given array, using the current seed. + * + * @method Phaser.Math.RandomDataGenerator#shuffle + * @since 3.7.0 + * + * @generic T + * @genericUse {T[]} - [array,$return] + * + * @param {T[]} [array] - The array to be shuffled. + * + * @return {T[]} The shuffled array. + */ + shuffle: function (array) + { + var len = array.length - 1; + + for (var i = len; i > 0; i--) + { + var randomIndex = Math.floor(this.frac() * (i + 1)); + var itemAtIndex = array[randomIndex]; + + array[randomIndex] = array[i]; + array[i] = itemAtIndex; + } + + return array; + } + +}); + +module.exports = RandomDataGenerator; + + +/***/ }), +/* 134 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the mean average of the given values. + * + * @function Phaser.Math.Average + * @since 3.0.0 + * + * @param {number[]} values - The values to average. + * + * @return {number} The average value. + */ +var Average = function (values) +{ + var sum = 0; + + for (var i = 0; i < values.length; i++) + { + sum += (+values[i]); + } + + return sum / values.length; +}; + +module.exports = Average; + + +/***/ }), +/* 135 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Compute a random integer between the `min` and `max` values, inclusive. + * + * @function Phaser.Math.Between + * @since 3.0.0 + * + * @param {integer} min - The minimum value. + * @param {integer} max - The maximum value. + * + * @return {integer} The random integer. + */ +var Between = function (min, max) +{ + return Math.floor(Math.random() * (max - min + 1) + min); +}; + +module.exports = Between; + + +/***/ }), +/* 136 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Ceils to some place comparative to a `base`, default is 10 for decimal place. + * + * The `place` is represented by the power applied to `base` to get that place. + * + * @function Phaser.Math.CeilTo + * @since 3.0.0 + * + * @param {number} value - The value to round. + * @param {number} [place=0] - The place to round to. + * @param {integer} [base=10] - The base to round in. Default is 10 for decimal. + * + * @return {number} The rounded value. + */ +var CeilTo = function (value, place, base) +{ + if (place === undefined) { place = 0; } + if (base === undefined) { base = 10; } + + var p = Math.pow(base, -place); + + return Math.ceil(value * p) / p; +}; + +module.exports = CeilTo; + + +/***/ }), +/* 137 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculates the positive difference of two given numbers. + * + * @function Phaser.Math.Difference + * @since 3.0.0 + * + * @param {number} a - The first number in the calculation. + * @param {number} b - The second number in the calculation. + * + * @return {number} The positive difference of the two given numbers. + */ +var Difference = function (a, b) +{ + return Math.abs(a - b); +}; + +module.exports = Difference; + + +/***/ }), +/* 138 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Floors to some place comparative to a `base`, default is 10 for decimal place. + * + * The `place` is represented by the power applied to `base` to get that place. + * + * @function Phaser.Math.FloorTo + * @since 3.0.0 + * + * @param {number} value - The value to round. + * @param {integer} [place=0] - The place to round to. + * @param {integer} [base=10] - The base to round in. Default is 10 for decimal. + * + * @return {number} The rounded value. + */ +var FloorTo = function (value, place, base) +{ + if (place === undefined) { place = 0; } + if (base === undefined) { base = 10; } + + var p = Math.pow(base, -place); + + return Math.floor(value * p) / p; +}; + +module.exports = FloorTo; + + +/***/ }), +/* 139 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Clamp = __webpack_require__(4); + +/** + * Return a value based on the range between `min` and `max` and the percentage given. + * + * @function Phaser.Math.FromPercent + * @since 3.0.0 + * + * @param {number} percent - A value between 0 and 1 representing the percentage. + * @param {number} min - The minimum value. + * @param {number} [max] - The maximum value. + * + * @return {number} The value that is `percent` percent between `min` and `max`. + */ +var FromPercent = function (percent, min, max) +{ + percent = Clamp(percent, 0, 1); + + return (max - min) * percent; +}; + +module.exports = FromPercent; + + +/***/ }), +/* 140 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate a per-ms speed from a distance and time (given in seconds). + * + * @function Phaser.Math.GetSpeed + * @since 3.0.0 + * + * @param {number} distance - The distance. + * @param {integer} time - The time, in seconds. + * + * @return {number} The speed, in distance per ms. + * + * @example + * // 400px over 1 second is 0.4 px/ms + * Phaser.Math.GetSpeed(400, 1) // -> 0.4 + */ +var GetSpeed = function (distance, time) +{ + return (distance / time) / 1000; +}; + +module.exports = GetSpeed; + + +/***/ }), +/* 141 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Check if a given value is an even number. + * + * @function Phaser.Math.IsEven + * @since 3.0.0 + * + * @param {number} value - The number to perform the check with. + * + * @return {boolean} Whether the number is even or not. + */ +var IsEven = function (value) +{ + // Use abstract equality == for "is number" test + + // eslint-disable-next-line eqeqeq + return (value == parseFloat(value)) ? !(value % 2) : void 0; +}; + +module.exports = IsEven; + + +/***/ }), +/* 142 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Check if a given value is an even number using a strict type check. + * + * @function Phaser.Math.IsEvenStrict + * @since 3.0.0 + * + * @param {number} value - The number to perform the check with. + * + * @return {boolean} Whether the number is even or not. + */ +var IsEvenStrict = function (value) +{ + // Use strict equality === for "is number" test + return (value === parseFloat(value)) ? !(value % 2) : void 0; +}; + +module.exports = IsEvenStrict; + + +/***/ }), +/* 143 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Add an `amount` to a `value`, limiting the maximum result to `max`. + * + * @function Phaser.Math.MaxAdd + * @since 3.0.0 + * + * @param {number} value - The value to add to. + * @param {number} amount - The amount to add. + * @param {number} max - The maximum value to return. + * + * @return {number} The resulting value. + */ +var MaxAdd = function (value, amount, max) +{ + return Math.min(value + amount, max); +}; + +module.exports = MaxAdd; + + +/***/ }), +/* 144 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Subtract an `amount` from `value`, limiting the minimum result to `min`. + * + * @function Phaser.Math.MinSub + * @since 3.0.0 + * + * @param {number} value - The value to subtract from. + * @param {number} amount - The amount to subtract. + * @param {number} min - The minimum value to return. + * + * @return {number} The resulting value. + */ +var MinSub = function (value, amount, min) +{ + return Math.max(value - amount, min); +}; + +module.exports = MinSub; + + +/***/ }), +/* 145 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Work out what percentage `value` is of the range between `min` and `max`. + * If `max` isn't given then it will return the percentage of `value` to `min`. + * + * You can optionally specify an `upperMax` value, which is a mid-way point in the range that represents 100%, after which the % starts to go down to zero again. + * + * @function Phaser.Math.Percent + * @since 3.0.0 + * + * @param {number} value - The value to determine the percentage of. + * @param {number} min - The minimum value. + * @param {number} [max] - The maximum value. + * @param {number} [upperMax] - The mid-way point in the range that represents 100%. + * + * @return {number} A value between 0 and 1 representing the percentage. + */ +var Percent = function (value, min, max, upperMax) +{ + if (max === undefined) { max = min + 1; } + + var percentage = (value - min) / (max - min); + + if (percentage > 1) + { + if (upperMax !== undefined) + { + percentage = ((upperMax - value)) / (upperMax - max); + + if (percentage < 0) + { + percentage = 0; + } + } + else + { + percentage = 1; + } + } + else if (percentage < 0) + { + percentage = 0; + } + + return percentage; +}; + +module.exports = Percent; + + +/***/ }), +/* 146 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(2); + +/** + * Convert the given angle in radians, to the equivalent angle in degrees. + * + * @function Phaser.Math.RadToDeg + * @since 3.0.0 + * + * @param {number} radians - The angle in radians to convert ot degrees. + * + * @return {integer} The given angle converted to degrees. + */ +var RadToDeg = function (radians) +{ + return radians * CONST.RAD_TO_DEG; +}; + +module.exports = RadToDeg; + + +/***/ }), +/* 147 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Compute a random unit vector. + * + * Computes random values for the given vector between -1 and 1 that can be used to represent a direction. + * + * Optionally accepts a scale value to scale the resulting vector by. + * + * @function Phaser.Math.RandomXY + * @since 3.0.0 + * + * @param {Phaser.Math.Vector2} vector - The Vector to compute random values for. + * @param {number} [scale=1] - The scale of the random values. + * + * @return {Phaser.Math.Vector2} The given Vector. + */ +var RandomXY = function (vector, scale) +{ + if (scale === undefined) { scale = 1; } + + var r = Math.random() * 2 * Math.PI; + + vector.x = Math.cos(r) * scale; + vector.y = Math.sin(r) * scale; + + return vector; +}; + +module.exports = RandomXY; + + +/***/ }), +/* 148 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Rotate a given point by a given angle around the origin (0, 0), in an anti-clockwise direction. + * + * @function Phaser.Math.Rotate + * @since 3.0.0 + * + * @param {(Phaser.Geom.Point|object)} point - The point to be rotated. + * @param {number} angle - The angle to be rotated by in an anticlockwise direction. + * + * @return {Phaser.Geom.Point} The given point, rotated by the given angle in an anticlockwise direction. + */ +var Rotate = function (point, angle) +{ + var x = point.x; + var y = point.y; + + point.x = (x * Math.cos(angle)) - (y * Math.sin(angle)); + point.y = (x * Math.sin(angle)) + (y * Math.cos(angle)); + + return point; +}; + +module.exports = Rotate; + + +/***/ }), +/* 149 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Rotate a `point` around `x` and `y` by the given `angle` and `distance`. + * + * In polar notation, this maps a point from (r, t) to (distance, t + angle), vs. the origin (x, y). + * + * @function Phaser.Math.RotateAroundDistance + * @since 3.0.0 + * + * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return] + * + * @param {(Phaser.Geom.Point|object)} point - The point to be rotated. + * @param {number} x - The horizontal coordinate to rotate around. + * @param {number} y - The vertical coordinate to rotate around. + * @param {number} angle - The angle of rotation in radians. + * @param {number} distance - The distance from (x, y) to place the point at. + * + * @return {Phaser.Types.Math.Vector2Like} The given point. + */ +var RotateAroundDistance = function (point, x, y, angle, distance) +{ + var t = angle + Math.atan2(point.y - y, point.x - x); + + point.x = x + (distance * Math.cos(t)); + point.y = y + (distance * Math.sin(t)); + + return point; +}; + +module.exports = RotateAroundDistance; + + +/***/ }), +/* 150 */ +/***/ (function(module, exports) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Position a `point` at the given `angle` and `distance` to (`x`, `y`). + * + * @function Phaser.Math.RotateTo + * @since 3.24.0 + * + * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return] + * + * @param {Phaser.Types.Math.Vector2Like} point - The point to be positioned. + * @param {number} x - The horizontal coordinate to position from. + * @param {number} y - The vertical coordinate to position from. + * @param {number} angle - The angle of rotation in radians. + * @param {number} distance - The distance from (x, y) to place the point at. + * + * @return {Phaser.Types.Math.Vector2Like} The given point. + */ +var RotateTo = function (point, x, y, angle, distance) +{ + point.x = x + (distance * Math.cos(angle)); + point.y = y + (distance * Math.sin(angle)); + + return point; +}; + +module.exports = RotateTo; + + +/***/ }), +/* 151 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Round a given number so it is further away from zero. That is, positive numbers are rounded up, and negative numbers are rounded down. + * + * @function Phaser.Math.RoundAwayFromZero + * @since 3.0.0 + * + * @param {number} value - The number to round. + * + * @return {number} The rounded number, rounded away from zero. + */ +var RoundAwayFromZero = function (value) +{ + // "Opposite" of truncate. + return (value > 0) ? Math.ceil(value) : Math.floor(value); +}; + +module.exports = RoundAwayFromZero; + + +/***/ }), +/* 152 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Round a value to the given precision. + * + * For example: + * + * ```javascript + * RoundTo(123.456, 0) = 123 + * RoundTo(123.456, 1) = 120 + * RoundTo(123.456, 2) = 100 + * ``` + * + * To round the decimal, i.e. to round to precision, pass in a negative `place`: + * + * ```javascript + * RoundTo(123.456789, 0) = 123 + * RoundTo(123.456789, -1) = 123.5 + * RoundTo(123.456789, -2) = 123.46 + * RoundTo(123.456789, -3) = 123.457 + * ``` + * + * @function Phaser.Math.RoundTo + * @since 3.0.0 + * + * @param {number} value - The value to round. + * @param {integer} [place=0] - The place to round to. Positive to round the units, negative to round the decimal. + * @param {integer} [base=10] - The base to round in. Default is 10 for decimal. + * + * @return {number} The rounded value. + */ +var RoundTo = function (value, place, base) +{ + if (place === undefined) { place = 0; } + if (base === undefined) { base = 10; } + + var p = Math.pow(base, -place); + + return Math.round(value * p) / p; +}; + +module.exports = RoundTo; + + +/***/ }), +/* 153 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Generate a series of sine and cosine values. + * + * @function Phaser.Math.SinCosTableGenerator + * @since 3.0.0 + * + * @param {number} length - The number of values to generate. + * @param {number} [sinAmp=1] - The sine value amplitude. + * @param {number} [cosAmp=1] - The cosine value amplitude. + * @param {number} [frequency=1] - The frequency of the values. + * + * @return {Phaser.Types.Math.SinCosTable} The generated values. + */ +var SinCosTableGenerator = function (length, sinAmp, cosAmp, frequency) +{ + if (sinAmp === undefined) { sinAmp = 1; } + if (cosAmp === undefined) { cosAmp = 1; } + if (frequency === undefined) { frequency = 1; } + + frequency *= Math.PI / length; + + var cos = []; + var sin = []; + + for (var c = 0; c < length; c++) + { + cosAmp -= sinAmp * frequency; + sinAmp += cosAmp * frequency; + + cos[c] = cosAmp; + sin[c] = sinAmp; + } + + return { + sin: sin, + cos: cos, + length: length + }; +}; + +module.exports = SinCosTableGenerator; + + +/***/ }), +/* 154 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Vector2 = __webpack_require__(1); + +/** + * Returns a Vector2 containing the x and y position of the given index in a `width` x `height` sized grid. + * + * For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2. + * + * If the given index is out of range an empty Vector2 is returned. + * + * @function Phaser.Math.ToXY + * @since 3.19.0 + * + * @param {integer} index - The position within the grid to get the x/y value for. + * @param {integer} width - The width of the grid. + * @param {integer} height - The height of the grid. + * @param {Phaser.Math.Vector2} [out] - An optional Vector2 to store the result in. If not given, a new Vector2 instance will be created. + * + * @return {Phaser.Math.Vector2} A Vector2 where the x and y properties contain the given grid index. + */ +var ToXY = function (index, width, height, out) +{ + if (out === undefined) { out = new Vector2(); } + + var x = 0; + var y = 0; + var total = width * height; + + if (index > 0 && index <= total) + { + if (index > width - 1) + { + y = Math.floor(index / width); + x = index - (y * width); + } + else + { + x = index; + } + + out.set(x, y); + } + + return out; +}; + +module.exports = ToXY; + + +/***/ }), +/* 155 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Checks if the two values are within the given `tolerance` of each other. + * + * @function Phaser.Math.Within + * @since 3.0.0 + * + * @param {number} a - The first value to use in the calculation. + * @param {number} b - The second value to use in the calculation. + * @param {number} tolerance - The tolerance. Anything equal to or less than this value is considered as being within range. + * + * @return {boolean} Returns `true` if `a` is less than or equal to the tolerance of `b`. + */ +var Within = function (a, b, tolerance) +{ + return (Math.abs(a - b) <= tolerance); +}; + +module.exports = Within; + + +/***/ }), +/* 156 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetAdvancedValue = __webpack_require__(6); + +/** + * Adds an Animation component to a Sprite and populates it based on the given config. + * + * @function Phaser.GameObjects.BuildGameObjectAnimation + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Sprite} sprite - The sprite to add an Animation component to. + * @param {object} config - The animation config. + * + * @return {Phaser.GameObjects.Sprite} The updated Sprite. + */ +var BuildGameObjectAnimation = function (sprite, config) +{ + var animConfig = GetAdvancedValue(config, 'anims', null); + + if (animConfig === null) + { + return sprite; + } + + if (typeof animConfig === 'string') + { + // { anims: 'key' } + sprite.anims.play(animConfig); + } + else if (typeof animConfig === 'object') + { + // { anims: { + // key: string + // startFrame: [string|integer] + // delay: [float] + // repeat: [integer] + // repeatDelay: [float] + // yoyo: [boolean] + // play: [boolean] + // delayedPlay: [boolean] + // } + // } + + var anims = sprite.anims; + + var key = GetAdvancedValue(animConfig, 'key', undefined); + var startFrame = GetAdvancedValue(animConfig, 'startFrame', undefined); + + var delay = GetAdvancedValue(animConfig, 'delay', 0); + var repeat = GetAdvancedValue(animConfig, 'repeat', 0); + var repeatDelay = GetAdvancedValue(animConfig, 'repeatDelay', 0); + var yoyo = GetAdvancedValue(animConfig, 'yoyo', false); + + var play = GetAdvancedValue(animConfig, 'play', false); + var delayedPlay = GetAdvancedValue(animConfig, 'delayedPlay', 0); + + anims.setDelay(delay); + anims.setRepeat(repeat); + anims.setRepeatDelay(repeatDelay); + anims.setYoyo(yoyo); + + if (play) + { + anims.play(key, startFrame); + } + else if (delayedPlay > 0) + { + anims.delayedPlay(delayedPlay, key, startFrame); + } + else + { + anims.load(key); + } + } + + return sprite; +}; + +module.exports = BuildGameObjectAnimation; + + +/***/ }), +/* 157 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Camera = __webpack_require__(32); +var Class = __webpack_require__(0); +var Vector3 = __webpack_require__(3); + +// Local cache vars +var tmpVec3 = new Vector3(); + +/** + * @classdesc + * [description] + * + * @class OrthographicCamera + * @extends Phaser.Cameras.Sprite3D.Camera + * @memberOf Phaser.Cameras.Sprite3D + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - [description] + * @param {integer} [viewportWidth=0] - [description] + * @param {integer} [viewportHeight=0] - [description] + */ +var OrthographicCamera = new Class({ + + Extends: Camera, + + initialize: + + function OrthographicCamera (scene, viewportWidth, viewportHeight) + { + if (viewportWidth === undefined) { viewportWidth = 0; } + if (viewportHeight === undefined) { viewportHeight = 0; } + + Camera.call(this, scene); + + /** + * [description] + * + * @name Phaser.Cameras.Sprite3D.OrthographicCamera#viewportWidth + * @type {integer} + * @since 3.0.0 + */ + this.viewportWidth = viewportWidth; + + /** + * [description] + * + * @name Phaser.Cameras.Sprite3D.OrthographicCamera#viewportHeight + * @type {integer} + * @since 3.0.0 + */ + this.viewportHeight = viewportHeight; + + /** + * [description] + * + * @name Phaser.Cameras.Sprite3D.OrthographicCamera#_zoom + * @type {number} + * @private + * @since 3.0.0 + */ + this._zoom = 1.0; + + /** + * [description] + * + * @name Phaser.Cameras.Sprite3D.OrthographicCamera#near + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.near = 0; + + this.update(); + }, + + /** + * [description] + * + * @method Phaser.Cameras.Sprite3D.OrthographicCamera#setToOrtho + * @since 3.0.0 + * + * @param {number} yDown - [description] + * @param {number} [viewportWidth] - [description] + * @param {number} [viewportHeight] - [description] + * + * @return {Phaser.Cameras.Sprite3D.OrthographicCamera} [description] + */ + setToOrtho: function (yDown, viewportWidth, viewportHeight) + { + if (viewportWidth === undefined) { viewportWidth = this.viewportWidth; } + if (viewportHeight === undefined) { viewportHeight = this.viewportHeight; } + + var zoom = this.zoom; + + this.up.set(0, (yDown) ? -1 : 1, 0); + this.direction.set(0, 0, (yDown) ? 1 : -1); + this.position.set(zoom * viewportWidth / 2, zoom * viewportHeight / 2, 0); + + this.viewportWidth = viewportWidth; + this.viewportHeight = viewportHeight; + + return this.update(); + }, + + /** + * [description] + * + * @method Phaser.Cameras.Sprite3D.OrthographicCamera#update + * @since 3.0.0 + * + * @return {Phaser.Cameras.Sprite3D.OrthographicCamera} [description] + */ + update: function () + { + var w = this.viewportWidth; + var h = this.viewportHeight; + var near = Math.abs(this.near); + var far = Math.abs(this.far); + var zoom = this.zoom; + + if (w === 0 || h === 0) + { + // What to do here... hmm? + return this; + } + + this.projection.ortho( + zoom * -w / 2, zoom * w / 2, + zoom * -h / 2, zoom * h / 2, + near, + far + ); + + // Build the view matrix + tmpVec3.copy(this.position).add(this.direction); + + this.view.lookAt(this.position, tmpVec3, this.up); + + // Projection * view matrix + this.combined.copy(this.projection).multiply(this.view); + + // Invert combined matrix, used for unproject + this.invProjectionView.copy(this.combined).invert(); + + this.billboardMatrixDirty = true; + + this.updateChildren(); + + return this; + }, + + /** + * [description] + * + * @name Phaser.Cameras.Sprite3D.OrthographicCamera#zoom + * @type {number} + * @since 3.0.0 + */ + zoom: { + + get: function () + { + return this._zoom; + }, + + set: function (value) + { + this._zoom = value; + this.update(); + } + } + +}); + +module.exports = OrthographicCamera; + + +/***/ }), +/* 158 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); + +/** + * @callback EachSetCallback + * + * @param {E} entry - The Set entry. + * @param {number} index - The index of the entry within the Set. + * + * @return {?boolean} The callback result. + */ + +/** + * @classdesc + * A Set is a collection of unique elements. + * + * @class Set + * @memberof Phaser.Structs + * @constructor + * @since 3.0.0 + * + * @generic T + * @genericUse {T[]} - [elements] + * + * @param {Array.<*>} [elements] - An optional array of elements to insert into this Set. + */ +var Set = new Class({ + + initialize: + + function Set (elements) + { + /** + * The entries of this Set. Stored internally as an array. + * + * @genericUse {T[]} - [$type] + * + * @name Phaser.Structs.Set#entries + * @type {Array.<*>} + * @default [] + * @since 3.0.0 + */ + this.entries = []; + + if (Array.isArray(elements)) + { + for (var i = 0; i < elements.length; i++) + { + this.set(elements[i]); + } + } + }, + + /** + * Inserts the provided value into this Set. If the value is already contained in this Set this method will have no effect. + * + * @method Phaser.Structs.Set#set + * @since 3.0.0 + * + * @genericUse {T} - [value] + * @genericUse {Phaser.Structs.Set.} - [$return] + * + * @param {*} value - The value to insert into this Set. + * + * @return {Phaser.Structs.Set} This Set object. + */ + set: function (value) + { + if (this.entries.indexOf(value) === -1) + { + this.entries.push(value); + } + + return this; + }, + + /** + * Get an element of this Set which has a property of the specified name, if that property is equal to the specified value. + * If no elements of this Set satisfy the condition then this method will return `null`. + * + * @method Phaser.Structs.Set#get + * @since 3.0.0 + * + * @genericUse {T} - [value,$return] + * + * @param {string} property - The property name to check on the elements of this Set. + * @param {*} value - The value to check for. + * + * @return {*} The first element of this Set that meets the required condition, or `null` if this Set contains no elements that meet the condition. + */ + get: function (property, value) + { + for (var i = 0; i < this.entries.length; i++) + { + var entry = this.entries[i]; + + if (entry[property] === value) + { + return entry; + } + } + }, + + /** + * Returns an array containing all the values in this Set. + * + * @method Phaser.Structs.Set#getArray + * @since 3.0.0 + * + * @genericUse {T[]} - [$return] + * + * @return {Array.<*>} An array containing all the values in this Set. + */ + getArray: function () + { + return this.entries.slice(0); + }, + + /** + * Removes the given value from this Set if this Set contains that value. + * + * @method Phaser.Structs.Set#delete + * @since 3.0.0 + * + * @genericUse {T} - [value] + * @genericUse {Phaser.Structs.Set.} - [$return] + * + * @param {*} value - The value to remove from the Set. + * + * @return {Phaser.Structs.Set} This Set object. + */ + delete: function (value) + { + var index = this.entries.indexOf(value); + + if (index > -1) + { + this.entries.splice(index, 1); + } + + return this; + }, + + /** + * Dumps the contents of this Set to the console via `console.group`. + * + * @method Phaser.Structs.Set#dump + * @since 3.0.0 + */ + dump: function () + { + // eslint-disable-next-line no-console + console.group('Set'); + + for (var i = 0; i < this.entries.length; i++) + { + var entry = this.entries[i]; + console.log(entry); + } + + // eslint-disable-next-line no-console + console.groupEnd(); + }, + + /** + * Passes each value in this Set to the given callback. + * Use this function when you know this Set will be modified during the iteration, otherwise use `iterate`. + * + * @method Phaser.Structs.Set#each + * @since 3.0.0 + * + * @genericUse {EachSetCallback.} - [callback] + * @genericUse {Phaser.Structs.Set.} - [$return] + * + * @param {EachSetCallback} callback - The callback to be invoked and passed each value this Set contains. + * @param {*} [callbackScope] - The scope of the callback. + * + * @return {Phaser.Structs.Set} This Set object. + */ + each: function (callback, callbackScope) + { + var i; + var temp = this.entries.slice(); + var len = temp.length; + + if (callbackScope) + { + for (i = 0; i < len; i++) + { + if (callback.call(callbackScope, temp[i], i) === false) + { + break; + } + } + } + else + { + for (i = 0; i < len; i++) + { + if (callback(temp[i], i) === false) + { + break; + } + } + } + + return this; + }, + + /** + * Passes each value in this Set to the given callback. + * For when you absolutely know this Set won't be modified during the iteration. + * + * @method Phaser.Structs.Set#iterate + * @since 3.0.0 + * + * @genericUse {EachSetCallback.} - [callback] + * @genericUse {Phaser.Structs.Set.} - [$return] + * + * @param {EachSetCallback} callback - The callback to be invoked and passed each value this Set contains. + * @param {*} [callbackScope] - The scope of the callback. + * + * @return {Phaser.Structs.Set} This Set object. + */ + iterate: function (callback, callbackScope) + { + var i; + var len = this.entries.length; + + if (callbackScope) + { + for (i = 0; i < len; i++) + { + if (callback.call(callbackScope, this.entries[i], i) === false) + { + break; + } + } + } + else + { + for (i = 0; i < len; i++) + { + if (callback(this.entries[i], i) === false) + { + break; + } + } + } + + return this; + }, + + /** + * Goes through each entry in this Set and invokes the given function on them, passing in the arguments. + * + * @method Phaser.Structs.Set#iterateLocal + * @since 3.0.0 + * + * @genericUse {Phaser.Structs.Set.} - [$return] + * + * @param {string} callbackKey - The key of the function to be invoked on each Set entry. + * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child. + * + * @return {Phaser.Structs.Set} This Set object. + */ + iterateLocal: function (callbackKey) + { + var i; + var args = []; + + for (i = 1; i < arguments.length; i++) + { + args.push(arguments[i]); + } + + var len = this.entries.length; + + for (i = 0; i < len; i++) + { + var entry = this.entries[i]; + + entry[callbackKey].apply(entry, args); + } + + return this; + }, + + /** + * Clears this Set so that it no longer contains any values. + * + * @method Phaser.Structs.Set#clear + * @since 3.0.0 + * + * @genericUse {Phaser.Structs.Set.} - [$return] + * + * @return {Phaser.Structs.Set} This Set object. + */ + clear: function () + { + this.entries.length = 0; + + return this; + }, + + /** + * Returns `true` if this Set contains the given value, otherwise returns `false`. + * + * @method Phaser.Structs.Set#contains + * @since 3.0.0 + * + * @genericUse {T} - [value] + * + * @param {*} value - The value to check for in this Set. + * + * @return {boolean} `true` if the given value was found in this Set, otherwise `false`. + */ + contains: function (value) + { + return (this.entries.indexOf(value) > -1); + }, + + /** + * Returns a new Set containing all values that are either in this Set or in the Set provided as an argument. + * + * @method Phaser.Structs.Set#union + * @since 3.0.0 + * + * @genericUse {Phaser.Structs.Set.} - [set,$return] + * + * @param {Phaser.Structs.Set} set - The Set to perform the union with. + * + * @return {Phaser.Structs.Set} A new Set containing all the values in this Set and the Set provided as an argument. + */ + union: function (set) + { + var newSet = new Set(); + + set.entries.forEach(function (value) + { + newSet.set(value); + }); + + this.entries.forEach(function (value) + { + newSet.set(value); + }); + + return newSet; + }, + + /** + * Returns a new Set that contains only the values which are in this Set and that are also in the given Set. + * + * @method Phaser.Structs.Set#intersect + * @since 3.0.0 + * + * @genericUse {Phaser.Structs.Set.} - [set,$return] + * + * @param {Phaser.Structs.Set} set - The Set to intersect this set with. + * + * @return {Phaser.Structs.Set} The result of the intersection, as a new Set. + */ + intersect: function (set) + { + var newSet = new Set(); + + this.entries.forEach(function (value) + { + if (set.contains(value)) + { + newSet.set(value); + } + }); + + return newSet; + }, + + /** + * Returns a new Set containing all the values in this Set which are *not* also in the given Set. + * + * @method Phaser.Structs.Set#difference + * @since 3.0.0 + * + * @genericUse {Phaser.Structs.Set.} - [set,$return] + * + * @param {Phaser.Structs.Set} set - The Set to perform the difference with. + * + * @return {Phaser.Structs.Set} A new Set containing all the values in this Set that are not also in the Set provided as an argument to this method. + */ + difference: function (set) + { + var newSet = new Set(); + + this.entries.forEach(function (value) + { + if (!set.contains(value)) + { + newSet.set(value); + } + }); + + return newSet; + }, + + /** + * The size of this Set. This is the number of entries within it. + * Changing the size will truncate the Set if the given value is smaller than the current size. + * Increasing the size larger than the current size has no effect. + * + * @name Phaser.Structs.Set#size + * @type {integer} + * @since 3.0.0 + */ + size: { + + get: function () + { + return this.entries.length; + }, + + set: function (value) + { + if (value < this.entries.length) + { + return this.entries.length = value; + } + else + { + return this.entries.length; + } + } + + } + +}); + +module.exports = Set; + + +/***/ }), +/* 159 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var Events = __webpack_require__(160); + +/** + * @callback DataEachCallback + * + * @param {*} parent - The parent object of the DataManager. + * @param {string} key - The key of the value. + * @param {*} value - The value. + * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data. + */ + +/** + * @classdesc + * The Data Manager Component features a means to store pieces of data specific to a Game Object, System or Plugin. + * You can then search, query it, and retrieve the data. The parent must either extend EventEmitter, + * or have a property called `events` that is an instance of it. + * + * @class DataManager + * @memberof Phaser.Data + * @constructor + * @since 3.0.0 + * + * @param {object} parent - The object that this DataManager belongs to. + * @param {Phaser.Events.EventEmitter} [eventEmitter] - The DataManager's event emitter. + */ +var DataManager = new Class({ + + initialize: + + function DataManager (parent, eventEmitter) + { + /** + * The object that this DataManager belongs to. + * + * @name Phaser.Data.DataManager#parent + * @type {*} + * @since 3.0.0 + */ + this.parent = parent; + + /** + * The DataManager's event emitter. + * + * @name Phaser.Data.DataManager#events + * @type {Phaser.Events.EventEmitter} + * @since 3.0.0 + */ + this.events = eventEmitter; + + if (!eventEmitter) + { + this.events = (parent.events) ? parent.events : parent; + } + + /** + * The data list. + * + * @name Phaser.Data.DataManager#list + * @type {Object.} + * @default {} + * @since 3.0.0 + */ + this.list = {}; + + /** + * The public values list. You can use this to access anything you have stored + * in this Data Manager. For example, if you set a value called `gold` you can + * access it via: + * + * ```javascript + * this.data.values.gold; + * ``` + * + * You can also modify it directly: + * + * ```javascript + * this.data.values.gold += 1000; + * ``` + * + * Doing so will emit a `setdata` event from the parent of this Data Manager. + * + * Do not modify this object directly. Adding properties directly to this object will not + * emit any events. Always use `DataManager.set` to create new items the first time around. + * + * @name Phaser.Data.DataManager#values + * @type {Object.} + * @default {} + * @since 3.10.0 + */ + this.values = {}; + + /** + * Whether setting data is frozen for this DataManager. + * + * @name Phaser.Data.DataManager#_frozen + * @type {boolean} + * @private + * @default false + * @since 3.0.0 + */ + this._frozen = false; + + if (!parent.hasOwnProperty('sys') && this.events) + { + this.events.once('destroy', this.destroy, this); + } + }, + + /** + * Retrieves the value for the given key, or undefined if it doesn't exist. + * + * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either: + * + * ```javascript + * this.data.get('gold'); + * ``` + * + * Or access the value directly: + * + * ```javascript + * this.data.values.gold; + * ``` + * + * You can also pass in an array of keys, in which case an array of values will be returned: + * + * ```javascript + * this.data.get([ 'gold', 'armor', 'health' ]); + * ``` + * + * This approach is useful for destructuring arrays in ES6. + * + * @method Phaser.Data.DataManager#get + * @since 3.0.0 + * + * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys. + * + * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array. + */ + get: function (key) + { + var list = this.list; + + if (Array.isArray(key)) + { + var output = []; + + for (var i = 0; i < key.length; i++) + { + output.push(list[key[i]]); + } + + return output; + } + else + { + return list[key]; + } + }, + + /** + * Retrieves all data values in a new object. + * + * @method Phaser.Data.DataManager#getAll + * @since 3.0.0 + * + * @return {Object.} All data values. + */ + getAll: function () + { + var results = {}; + + for (var key in this.list) + { + if (this.list.hasOwnProperty(key)) + { + results[key] = this.list[key]; + } + } + + return results; + }, + + /** + * Queries the DataManager for the values of keys matching the given regular expression. + * + * @method Phaser.Data.DataManager#query + * @since 3.0.0 + * + * @param {RegExp} search - A regular expression object. If a non-RegExp object obj is passed, it is implicitly converted to a RegExp by using new RegExp(obj). + * + * @return {Object.} The values of the keys matching the search string. + */ + query: function (search) + { + var results = {}; + + for (var key in this.list) + { + if (this.list.hasOwnProperty(key) && key.match(search)) + { + results[key] = this.list[key]; + } + } + + return results; + }, + + /** + * Sets a value for the given key. If the key doesn't already exist in the Data Manager then it is created. + * + * ```javascript + * data.set('name', 'Red Gem Stone'); + * ``` + * + * You can also pass in an object of key value pairs as the first argument: + * + * ```javascript + * data.set({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 }); + * ``` + * + * To get a value back again you can call `get`: + * + * ```javascript + * data.get('gold'); + * ``` + * + * Or you can access the value directly via the `values` property, where it works like any other variable: + * + * ```javascript + * data.values.gold += 50; + * ``` + * + * When the value is first set, a `setdata` event is emitted. + * + * If the key already exists, a `changedata` event is emitted instead, along an event named after the key. + * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`. + * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter. + * + * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings. + * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager. + * + * @method Phaser.Data.DataManager#set + * @fires Phaser.Data.Events#SET_DATA + * @fires Phaser.Data.Events#CHANGE_DATA + * @fires Phaser.Data.Events#CHANGE_DATA_KEY + * @since 3.0.0 + * + * @param {(string|object)} key - The key to set the value for. Or an object or key value pairs. If an object the `data` argument is ignored. + * @param {*} data - The value to set for the given key. If an object is provided as the key this argument is ignored. + * + * @return {this} This DataManager object. + */ + set: function (key, data) + { + if (this._frozen) + { + return this; + } + + if (typeof key === 'string') + { + return this.setValue(key, data); + } + else + { + for (var entry in key) + { + this.setValue(entry, key[entry]); + } + } + + return this; + }, + + /** + * Increase a value for the given key. If the key doesn't already exist in the Data Manager then it is increased from 0. + * + * When the value is first set, a `setdata` event is emitted. + * + * @method Phaser.Data.DataManager#inc + * @fires Phaser.Data.Events#SET_DATA + * @fires Phaser.Data.Events#CHANGE_DATA + * @fires Phaser.Data.Events#CHANGE_DATA_KEY + * @since 3.23.0 + * + * @param {(string|object)} key - The key to increase the value for. + * @param {*} [data] - The value to increase for the given key. + * + * @return {Phaser.Data.DataManager} This DataManager object. + */ + inc: function (key, data) + { + if (this._frozen) + { + return this; + } + + if (data === undefined) + { + data = 1; + } + + var value = this.get(key); + if (value === undefined) + { + value = 0; + } + + this.set(key, (value + data)); + + return this; + }, + + /** + * Toggle a boolean value for the given key. If the key doesn't already exist in the Data Manager then it is toggled from false. + * + * When the value is first set, a `setdata` event is emitted. + * + * @method Phaser.Data.DataManager#toggle + * @fires Phaser.Data.Events#SET_DATA + * @fires Phaser.Data.Events#CHANGE_DATA + * @fires Phaser.Data.Events#CHANGE_DATA_KEY + * @since 3.23.0 + * + * @param {(string|object)} key - The key to toggle the value for. + * + * @return {Phaser.Data.DataManager} This DataManager object. + */ + toggle: function (key) + { + if (this._frozen) + { + return this; + } + + this.set(key, !this.get(key)); + + return this; + }, + + /** + * Internal value setter, called automatically by the `set` method. + * + * @method Phaser.Data.DataManager#setValue + * @fires Phaser.Data.Events#SET_DATA + * @fires Phaser.Data.Events#CHANGE_DATA + * @fires Phaser.Data.Events#CHANGE_DATA_KEY + * @private + * @since 3.10.0 + * + * @param {string} key - The key to set the value for. + * @param {*} data - The value to set. + * + * @return {this} This DataManager object. + */ + setValue: function (key, data) + { + if (this._frozen) + { + return this; + } + + if (this.has(key)) + { + // Hit the key getter, which will in turn emit the events. + this.values[key] = data; + } + else + { + var _this = this; + var list = this.list; + var events = this.events; + var parent = this.parent; + + Object.defineProperty(this.values, key, { + + enumerable: true, + + configurable: true, + + get: function () + { + return list[key]; + }, + + set: function (value) + { + if (!_this._frozen) + { + var previousValue = list[key]; + list[key] = value; + + events.emit(Events.CHANGE_DATA, parent, key, value, previousValue); + events.emit(Events.CHANGE_DATA_KEY + key, parent, value, previousValue); + } + } + + }); + + list[key] = data; + + events.emit(Events.SET_DATA, parent, key, data); + } + + return this; + }, + + /** + * Passes all data entries to the given callback. + * + * @method Phaser.Data.DataManager#each + * @since 3.0.0 + * + * @param {DataEachCallback} callback - The function to call. + * @param {*} [context] - Value to use as `this` when executing callback. + * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data. + * + * @return {this} This DataManager object. + */ + each: function (callback, context) + { + var args = [ this.parent, null, undefined ]; + + for (var i = 1; i < arguments.length; i++) + { + args.push(arguments[i]); + } + + for (var key in this.list) + { + args[1] = key; + args[2] = this.list[key]; + + callback.apply(context, args); + } + + return this; + }, + + /** + * Merge the given object of key value pairs into this DataManager. + * + * Any newly created values will emit a `setdata` event. Any updated values (see the `overwrite` argument) + * will emit a `changedata` event. + * + * @method Phaser.Data.DataManager#merge + * @fires Phaser.Data.Events#SET_DATA + * @fires Phaser.Data.Events#CHANGE_DATA + * @fires Phaser.Data.Events#CHANGE_DATA_KEY + * @since 3.0.0 + * + * @param {Object.} data - The data to merge. + * @param {boolean} [overwrite=true] - Whether to overwrite existing data. Defaults to true. + * + * @return {this} This DataManager object. + */ + merge: function (data, overwrite) + { + if (overwrite === undefined) { overwrite = true; } + + // Merge data from another component into this one + for (var key in data) + { + if (data.hasOwnProperty(key) && (overwrite || (!overwrite && !this.has(key)))) + { + this.setValue(key, data[key]); + } + } + + return this; + }, + + /** + * Remove the value for the given key. + * + * If the key is found in this Data Manager it is removed from the internal lists and a + * `removedata` event is emitted. + * + * You can also pass in an array of keys, in which case all keys in the array will be removed: + * + * ```javascript + * this.data.remove([ 'gold', 'armor', 'health' ]); + * ``` + * + * @method Phaser.Data.DataManager#remove + * @fires Phaser.Data.Events#REMOVE_DATA + * @since 3.0.0 + * + * @param {(string|string[])} key - The key to remove, or an array of keys to remove. + * + * @return {this} This DataManager object. + */ + remove: function (key) + { + if (this._frozen) + { + return this; + } + + if (Array.isArray(key)) + { + for (var i = 0; i < key.length; i++) + { + this.removeValue(key[i]); + } + } + else + { + return this.removeValue(key); + } + + return this; + }, + + /** + * Internal value remover, called automatically by the `remove` method. + * + * @method Phaser.Data.DataManager#removeValue + * @private + * @fires Phaser.Data.Events#REMOVE_DATA + * @since 3.10.0 + * + * @param {string} key - The key to set the value for. + * + * @return {this} This DataManager object. + */ + removeValue: function (key) + { + if (this.has(key)) + { + var data = this.list[key]; + + delete this.list[key]; + delete this.values[key]; + + this.events.emit(Events.REMOVE_DATA, this.parent, key, data); + } + + return this; + }, + + /** + * Retrieves the data associated with the given 'key', deletes it from this Data Manager, then returns it. + * + * @method Phaser.Data.DataManager#pop + * @fires Phaser.Data.Events#REMOVE_DATA + * @since 3.0.0 + * + * @param {string} key - The key of the value to retrieve and delete. + * + * @return {*} The value of the given key. + */ + pop: function (key) + { + var data = undefined; + + if (!this._frozen && this.has(key)) + { + data = this.list[key]; + + delete this.list[key]; + delete this.values[key]; + + this.events.emit(Events.REMOVE_DATA, this.parent, key, data); + } + + return data; + }, + + /** + * Determines whether the given key is set in this Data Manager. + * + * Please note that the keys are case-sensitive and must be valid JavaScript Object property strings. + * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager. + * + * @method Phaser.Data.DataManager#has + * @since 3.0.0 + * + * @param {string} key - The key to check. + * + * @return {boolean} Returns `true` if the key exists, otherwise `false`. + */ + has: function (key) + { + return this.list.hasOwnProperty(key); + }, + + /** + * Freeze or unfreeze this Data Manager. A frozen Data Manager will block all attempts + * to create new values or update existing ones. + * + * @method Phaser.Data.DataManager#setFreeze + * @since 3.0.0 + * + * @param {boolean} value - Whether to freeze or unfreeze the Data Manager. + * + * @return {this} This DataManager object. + */ + setFreeze: function (value) + { + this._frozen = value; + + return this; + }, + + /** + * Delete all data in this Data Manager and unfreeze it. + * + * @method Phaser.Data.DataManager#reset + * @since 3.0.0 + * + * @return {this} This DataManager object. + */ + reset: function () + { + for (var key in this.list) + { + delete this.list[key]; + delete this.values[key]; + } + + this._frozen = false; + + return this; + }, + + /** + * Destroy this data manager. + * + * @method Phaser.Data.DataManager#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.reset(); + + this.events.off(Events.CHANGE_DATA); + this.events.off(Events.SET_DATA); + this.events.off(Events.REMOVE_DATA); + + this.parent = null; + }, + + /** + * Gets or sets the frozen state of this Data Manager. + * A frozen Data Manager will block all attempts to create new values or update existing ones. + * + * @name Phaser.Data.DataManager#freeze + * @type {boolean} + * @since 3.0.0 + */ + freeze: { + + get: function () + { + return this._frozen; + }, + + set: function (value) + { + this._frozen = (value) ? true : false; + } + + }, + + /** + * Return the total number of entries in this Data Manager. + * + * @name Phaser.Data.DataManager#count + * @type {integer} + * @since 3.0.0 + */ + count: { + + get: function () + { + var i = 0; + + for (var key in this.list) + { + if (this.list[key] !== undefined) + { + i++; + } + } + + return i; + } + + } + +}); + +module.exports = DataManager; + + +/***/ }), +/* 160 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Data.Events + */ + +module.exports = { + + CHANGE_DATA: __webpack_require__(161), + CHANGE_DATA_KEY: __webpack_require__(162), + REMOVE_DATA: __webpack_require__(163), + SET_DATA: __webpack_require__(164) + +}; + + +/***/ }), +/* 161 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Change Data Event. + * + * This event is dispatched by a Data Manager when an item in the data store is changed. + * + * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for + * a change data event from a Game Object you would use: `sprite.data.on('changedata', listener)`. + * + * This event is dispatched for all items that change in the Data Manager. + * To listen for the change of a specific item, use the `CHANGE_DATA_KEY_EVENT` event. + * + * @event Phaser.Data.Events#CHANGE_DATA + * @since 3.0.0 + * + * @param {any} parent - A reference to the object that the Data Manager responsible for this event belongs to. + * @param {string} key - The unique key of the data item within the Data Manager. + * @param {any} value - The new value of the item in the Data Manager. + * @param {any} previousValue - The previous value of the item in the Data Manager. + */ +module.exports = 'changedata'; + + +/***/ }), +/* 162 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Change Data Key Event. + * + * This event is dispatched by a Data Manager when an item in the data store is changed. + * + * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for + * the change of a specific data item from a Game Object you would use: `sprite.data.on('changedata-key', listener)`, + * where `key` is the unique string key of the data item. For example, if you have a data item stored called `gold` + * then you can listen for `sprite.data.on('changedata-gold')`. + * + * @event Phaser.Data.Events#CHANGE_DATA_KEY + * @since 3.16.1 + * + * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event. + * @param {any} value - The item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance. + * @param {any} previousValue - The previous item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance. + */ +module.exports = 'changedata-'; + + +/***/ }), +/* 163 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Remove Data Event. + * + * This event is dispatched by a Data Manager when an item is removed from it. + * + * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for + * the removal of a data item on a Game Object you would use: `sprite.data.on('removedata', listener)`. + * + * @event Phaser.Data.Events#REMOVE_DATA + * @since 3.0.0 + * + * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event. + * @param {string} key - The unique key of the data item within the Data Manager. + * @param {any} data - The item that was removed from the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance. + */ +module.exports = 'removedata'; + + +/***/ }), +/* 164 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Set Data Event. + * + * This event is dispatched by a Data Manager when a new item is added to the data store. + * + * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for + * the addition of a new data item on a Game Object you would use: `sprite.data.on('setdata', listener)`. + * + * @event Phaser.Data.Events#SET_DATA + * @since 3.0.0 + * + * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event. + * @param {string} key - The unique key of the data item within the Data Manager. + * @param {any} data - The item that was added to the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance. + */ +module.exports = 'setdata'; + + +/***/ }), +/* 165 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Object Added to Scene Event. + * + * This event is dispatched when a Game Object is added to a Scene. + * + * Listen for it on a Game Object instance using `GameObject.on('addedtoscene', listener)`. + * + * @event Phaser.GameObjects.Events#ADDED_TO_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene. + * @param {Phaser.Scene} scene - The Scene to which the Game Object was added. + */ +module.exports = 'addedtoscene'; + + +/***/ }), +/* 166 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Object Destroy Event. + * + * This event is dispatched when a Game Object instance is being destroyed. + * + * Listen for it on a Game Object instance using `GameObject.on('destroy', listener)`. + * + * @event Phaser.GameObjects.Events#DESTROY + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed. + */ +module.exports = 'destroy'; + + +/***/ }), +/* 167 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Object Removed from Scene Event. + * + * This event is dispatched when a Game Object is removed from a Scene. + * + * Listen for it on a Game Object instance using `GameObject.on('removedfromscene', listener)`. + * + * @event Phaser.GameObjects.Events#REMOVED_FROM_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene. + * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed. + */ +module.exports = 'removedfromscene'; + + +/***/ }), +/* 168 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Video Game Object Complete Event. + * + * This event is dispatched when a Video finishes playback by reaching the end of its duration. It + * is also dispatched if a video marker sequence is being played and reaches the end. + * + * Note that not all videos can fire this event. Live streams, for example, have no fixed duration, + * so never technically 'complete'. + * + * If a video is stopped from playback, via the `Video.stop` method, it will emit the + * `VIDEO_STOP` event instead of this one. + * + * Listen for it from a Video Game Object instance using `Video.on('complete', listener)`. + * + * @event Phaser.GameObjects.Events#VIDEO_COMPLETE + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed playback. + */ +module.exports = 'complete'; + + +/***/ }), +/* 169 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Video Game Object Created Event. + * + * This event is dispatched when the texture for a Video has been created. This happens + * when enough of the video source has been loaded that the browser is able to render a + * frame from it. + * + * Listen for it from a Video Game Object instance using `Video.on('created', listener)`. + * + * @event Phaser.GameObjects.Events#VIDEO_CREATED + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event. + * @param {integer} width - The width of the video. + * @param {integer} height - The height of the video. + */ +module.exports = 'created'; + + +/***/ }), +/* 170 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Video Game Object Error Event. + * + * This event is dispatched when a Video tries to play a source that does not exist, or is the wrong file type. + * + * Listen for it from a Video Game Object instance using `Video.on('error', listener)`. + * + * @event Phaser.GameObjects.Events#VIDEO_ERROR + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which threw the error. + * @param {Event} event - The native DOM event the browser raised during playback. + */ +module.exports = 'error'; + + +/***/ }), +/* 171 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Video Game Object Loop Event. + * + * This event is dispatched when a Video that is currently playing has looped. This only + * happens if the `loop` parameter was specified, or the `setLoop` method was called, + * and if the video has a fixed duration. Video streams, for example, cannot loop, as + * they have no duration. + * + * Looping is based on the result of the Video `timeupdate` event. This event is not + * frame-accurate, due to the way browsers work, so please do not rely on this loop + * event to be time or frame precise. + * + * Listen for it from a Video Game Object instance using `Video.on('loop', listener)`. + * + * @event Phaser.GameObjects.Events#VIDEO_LOOP + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which has looped. + */ +module.exports = 'loop'; + + +/***/ }), +/* 172 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Video Game Object Play Event. + * + * This event is dispatched when a Video begins playback. For videos that do not require + * interaction unlocking, this is usually as soon as the `Video.play` method is called. + * However, for videos that require unlocking, it is fired once playback begins after + * they've been unlocked. + * + * Listen for it from a Video Game Object instance using `Video.on('play', listener)`. + * + * @event Phaser.GameObjects.Events#VIDEO_PLAY + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which started playback. + */ +module.exports = 'play'; + + +/***/ }), +/* 173 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Video Game Object Seeked Event. + * + * This event is dispatched when a Video completes seeking to a new point in its timeline. + * + * Listen for it from a Video Game Object instance using `Video.on('seeked', listener)`. + * + * @event Phaser.GameObjects.Events#VIDEO_SEEKED + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed seeking. + */ +module.exports = 'seeked'; + + +/***/ }), +/* 174 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Video Game Object Seeking Event. + * + * This event is dispatched when a Video _begins_ seeking to a new point in its timeline. + * When the seek is complete, it will dispatch the `VIDEO_SEEKED` event to conclude. + * + * Listen for it from a Video Game Object instance using `Video.on('seeking', listener)`. + * + * @event Phaser.GameObjects.Events#VIDEO_SEEKING + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which started seeking. + */ +module.exports = 'seeking'; + + +/***/ }), +/* 175 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Video Game Object Stopped Event. + * + * This event is dispatched when a Video is stopped from playback via a call to the `Video.stop` method, + * either directly via game code, or indirectly as the result of changing a video source or destroying it. + * + * Listen for it from a Video Game Object instance using `Video.on('stop', listener)`. + * + * @event Phaser.GameObjects.Events#VIDEO_STOP + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which stopped playback. + */ +module.exports = 'stop'; + + +/***/ }), +/* 176 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Video Game Object Timeout Event. + * + * This event is dispatched when a Video has exhausted its allocated time while trying to connect to a video + * source to start playback. + * + * Listen for it from a Video Game Object instance using `Video.on('timeout', listener)`. + * + * @event Phaser.GameObjects.Events#VIDEO_TIMEOUT + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which timed out. + */ +module.exports = 'timeout'; + + +/***/ }), +/* 177 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Video Game Object Unlocked Event. + * + * This event is dispatched when a Video that was prevented from playback due to the browsers + * Media Engagement Interaction policy, is unlocked by a user gesture. + * + * Listen for it from a Video Game Object instance using `Video.on('unlocked', listener)`. + * + * @event Phaser.GameObjects.Events#VIDEO_UNLOCKED + * @since 3.20.0 + * + * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event. + */ +module.exports = 'unlocked'; + + +/***/ }), +/* 178 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var Components = __webpack_require__(179); +var GameObject = __webpack_require__(34); +var GameObjectEvents = __webpack_require__(37); +var SpriteRender = __webpack_require__(252); + +/** + * @classdesc + * A Sprite Game Object. + * + * A Sprite Game Object is used for the display of both static and animated images in your game. + * Sprites can have input events and physics bodies. They can also be tweened, tinted, scrolled + * and animated. + * + * The main difference between a Sprite and an Image Game Object is that you cannot animate Images. + * As such, Sprites take a fraction longer to process and have a larger API footprint due to the Animation + * Component. If you do not require animation then you can safely use Images to replace Sprites in all cases. + * + * @class Sprite + * @extends Phaser.GameObjects.GameObject + * @memberof Phaser.GameObjects + * @constructor + * @since 3.0.0 + * + * @extends Phaser.GameObjects.Components.Alpha + * @extends Phaser.GameObjects.Components.BlendMode + * @extends Phaser.GameObjects.Components.Depth + * @extends Phaser.GameObjects.Components.Flip + * @extends Phaser.GameObjects.Components.GetBounds + * @extends Phaser.GameObjects.Components.Mask + * @extends Phaser.GameObjects.Components.Origin + * @extends Phaser.GameObjects.Components.Pipeline + * @extends Phaser.GameObjects.Components.ScrollFactor + * @extends Phaser.GameObjects.Components.Size + * @extends Phaser.GameObjects.Components.TextureCrop + * @extends Phaser.GameObjects.Components.Tint + * @extends Phaser.GameObjects.Components.Transform + * @extends Phaser.GameObjects.Components.Visible + * + * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time. + * @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 {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with. + */ +var Sprite = new Class({ + + Extends: GameObject, + + Mixins: [ + Components.Alpha, + Components.BlendMode, + Components.Depth, + Components.Flip, + Components.GetBounds, + Components.Mask, + Components.Origin, + Components.Pipeline, + Components.ScrollFactor, + Components.Size, + Components.TextureCrop, + Components.Tint, + Components.Transform, + Components.Visible, + SpriteRender + ], + + initialize: + + function Sprite (scene, x, y, texture, frame) + { + GameObject.call(this, scene, 'Sprite'); + + /** + * The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method. + * + * @name Phaser.GameObjects.Sprite#_crop + * @type {object} + * @private + * @since 3.11.0 + */ + this._crop = this.resetCropObject(); + + /** + * The Animation Controller of this Sprite. + * + * @name Phaser.GameObjects.Sprite#anims + * @type {Phaser.GameObjects.Components.Animation} + * @since 3.0.0 + */ + this.anims = new Components.Animation(this); + + this.setTexture(texture, frame); + this.setPosition(x, y); + this.setSizeToFrame(); + this.setOriginFromFrame(); + this.initPipeline(); + + this.on(GameObjectEvents.ADDED_TO_SCENE, this.addedToScene, this); + this.on(GameObjectEvents.REMOVED_FROM_SCENE, this.removedFromScene, this); + }, + + // Overrides Game Object method + addedToScene: function () + { + this.scene.sys.updateList.add(this); + }, + + // Overrides Game Object method + removedFromScene: function () + { + this.scene.sys.updateList.remove(this); + }, + + /** + * Update this Sprite's animations. + * + * @method Phaser.GameObjects.Sprite#preUpdate + * @protected + * @since 3.0.0 + * + * @param {number} time - The current timestamp. + * @param {number} delta - The delta time, in ms, elapsed since the last frame. + */ + preUpdate: function (time, delta) + { + this.anims.update(time, delta); + }, + + /** + * Start playing the given animation. + * + * @method Phaser.GameObjects.Sprite#play + * @since 3.0.0 + * + * @param {string} key - The string-based key of the animation to play. + * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. + * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. + * + * @return {this} This Game Object. + */ + play: function (key, ignoreIfPlaying, startFrame) + { + this.anims.play(key, ignoreIfPlaying, startFrame); + + return this; + }, + + /** + * Build a JSON representation of this Sprite. + * + * @method Phaser.GameObjects.Sprite#toJSON + * @since 3.0.0 + * + * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object. + */ + toJSON: function () + { + var data = Components.ToJSON(this); + + // Extra Sprite data is added here + + return data; + }, + + /** + * Handles the pre-destroy step for the Sprite, which removes the Animation component. + * + * @method Phaser.GameObjects.Sprite#preDestroy + * @private + * @since 3.14.0 + */ + preDestroy: function () + { + this.anims.destroy(); + + this.anims = undefined; + } + +}); + +module.exports = Sprite; + + +/***/ }), +/* 179 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.GameObjects.Components + */ + +module.exports = { + + Alpha: __webpack_require__(180), + AlphaSingle: __webpack_require__(181), + Animation: __webpack_require__(182), + BlendMode: __webpack_require__(204), + ComputedSize: __webpack_require__(205), + Crop: __webpack_require__(206), + Depth: __webpack_require__(207), + Flip: __webpack_require__(208), + GetBounds: __webpack_require__(209), + Mask: __webpack_require__(219), + Origin: __webpack_require__(239), + PathFollower: __webpack_require__(240), + Pipeline: __webpack_require__(243), + ScrollFactor: __webpack_require__(244), + Size: __webpack_require__(245), + Texture: __webpack_require__(246), + TextureCrop: __webpack_require__(247), + Tint: __webpack_require__(248), + ToJSON: __webpack_require__(35), + Transform: __webpack_require__(250), + TransformMatrix: __webpack_require__(41), + Visible: __webpack_require__(251) + +}; + + +/***/ }), +/* 180 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Clamp = __webpack_require__(4); + +// bitmask flag for GameObject.renderMask +var _FLAG = 2; // 0010 + +/** + * Provides methods used for setting the alpha properties of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.Alpha + * @since 3.0.0 + */ + +var Alpha = { + + /** + * Private internal value. Holds the global alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alpha + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alpha: 1, + + /** + * Private internal value. Holds the top-left alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alphaTL + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alphaTL: 1, + + /** + * Private internal value. Holds the top-right alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alphaTR + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alphaTR: 1, + + /** + * Private internal value. Holds the bottom-left alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alphaBL + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alphaBL: 1, + + /** + * Private internal value. Holds the bottom-right alpha value. + * + * @name Phaser.GameObjects.Components.Alpha#_alphaBR + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alphaBR: 1, + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + * + * @method Phaser.GameObjects.Components.Alpha#clearAlpha + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + clearAlpha: function () + { + return this.setAlpha(1); + }, + + /** + * 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. + * + * If your game is running under WebGL you can optionally specify four different alpha values, each of which + * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used. + * + * @method Phaser.GameObjects.Components.Alpha#setAlpha + * @since 3.0.0 + * + * @param {number} [topLeft=1] - The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object. + * @param {number} [topRight] - The alpha value used for the top-right of the Game Object. WebGL only. + * @param {number} [bottomLeft] - The alpha value used for the bottom-left of the Game Object. WebGL only. + * @param {number} [bottomRight] - The alpha value used for the bottom-right of the Game Object. WebGL only. + * + * @return {this} This Game Object instance. + */ + setAlpha: function (topLeft, topRight, bottomLeft, bottomRight) + { + if (topLeft === undefined) { topLeft = 1; } + + // Treat as if there is only one alpha value for the whole Game Object + if (topRight === undefined) + { + this.alpha = topLeft; + } + else + { + this._alphaTL = Clamp(topLeft, 0, 1); + this._alphaTR = Clamp(topRight, 0, 1); + this._alphaBL = Clamp(bottomLeft, 0, 1); + this._alphaBR = Clamp(bottomRight, 0, 1); + } + + return this; + }, + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + * + * @name Phaser.GameObjects.Components.Alpha#alpha + * @type {number} + * @since 3.0.0 + */ + alpha: { + + get: function () + { + return this._alpha; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alpha = v; + this._alphaTL = v; + this._alphaTR = v; + this._alphaBL = v; + this._alphaBR = v; + + if (v === 0) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The alpha value starting from the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Alpha#alphaTopLeft + * @type {number} + * @webglOnly + * @since 3.0.0 + */ + alphaTopLeft: { + + get: function () + { + return this._alphaTL; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alphaTL = v; + + if (v !== 0) + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The alpha value starting from the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Alpha#alphaTopRight + * @type {number} + * @webglOnly + * @since 3.0.0 + */ + alphaTopRight: { + + get: function () + { + return this._alphaTR; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alphaTR = v; + + if (v !== 0) + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The alpha value starting from the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Alpha#alphaBottomLeft + * @type {number} + * @webglOnly + * @since 3.0.0 + */ + alphaBottomLeft: { + + get: function () + { + return this._alphaBL; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alphaBL = v; + + if (v !== 0) + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The alpha value starting from the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Alpha#alphaBottomRight + * @type {number} + * @webglOnly + * @since 3.0.0 + */ + alphaBottomRight: { + + get: function () + { + return this._alphaBR; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alphaBR = v; + + if (v !== 0) + { + this.renderFlags |= _FLAG; + } + } + + } + +}; + +module.exports = Alpha; + + +/***/ }), +/* 181 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Clamp = __webpack_require__(4); + +// bitmask flag for GameObject.renderMask +var _FLAG = 2; // 0010 + +/** + * Provides methods used for setting the alpha property of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.AlphaSingle + * @since 3.22.0 + */ + +var AlphaSingle = { + + /** + * Private internal value. Holds the global alpha value. + * + * @name Phaser.GameObjects.Components.AlphaSingle#_alpha + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _alpha: 1, + + /** + * Clears all alpha values associated with this Game Object. + * + * Immediately sets the alpha levels back to 1 (fully opaque). + * + * @method Phaser.GameObjects.Components.AlphaSingle#clearAlpha + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + clearAlpha: function () + { + return this.setAlpha(1); + }, + + /** + * 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. + * + * @method Phaser.GameObjects.Components.AlphaSingle#setAlpha + * @since 3.0.0 + * + * @param {number} [value=1] - The alpha value applied across the whole Game Object. + * + * @return {this} This Game Object instance. + */ + setAlpha: function (value) + { + if (value === undefined) { value = 1; } + + this.alpha = value; + + return this; + }, + + /** + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. + * + * @name Phaser.GameObjects.Components.AlphaSingle#alpha + * @type {number} + * @since 3.0.0 + */ + alpha: { + + get: function () + { + return this._alpha; + }, + + set: function (value) + { + var v = Clamp(value, 0, 1); + + this._alpha = v; + + if (v === 0) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + } + + } + +}; + +module.exports = AlphaSingle; + + +/***/ }), +/* 182 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var BaseAnimation = __webpack_require__(183); +var Class = __webpack_require__(0); +var Events = __webpack_require__(38); + +/** + * @classdesc + * A Game Object Animation Controller. + * + * This controller lives as an instance within a Game Object, accessible as `sprite.anims`. + * + * @class Animation + * @memberof Phaser.GameObjects.Components + * @constructor + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} parent - The Game Object to which this animation controller belongs. + */ +var Animation = new Class({ + + initialize: + + function Animation (parent) + { + /** + * The Game Object to which this animation controller belongs. + * + * @name Phaser.GameObjects.Components.Animation#parent + * @type {Phaser.GameObjects.GameObject} + * @since 3.0.0 + */ + this.parent = parent; + + /** + * A reference to the global Animation Manager. + * + * @name Phaser.GameObjects.Components.Animation#animationManager + * @type {Phaser.Animations.AnimationManager} + * @since 3.0.0 + */ + this.animationManager = parent.scene.sys.anims; + + this.animationManager.once(Events.REMOVE_ANIMATION, this.remove, this); + + /** + * Is an animation currently playing or not? + * + * @name Phaser.GameObjects.Components.Animation#isPlaying + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.isPlaying = false; + + /** + * The current Animation loaded into this Animation Controller. + * + * @name Phaser.GameObjects.Components.Animation#currentAnim + * @type {?Phaser.Animations.Animation} + * @default null + * @since 3.0.0 + */ + this.currentAnim = null; + + /** + * The current AnimationFrame being displayed by this Animation Controller. + * + * @name Phaser.GameObjects.Components.Animation#currentFrame + * @type {?Phaser.Animations.AnimationFrame} + * @default null + * @since 3.0.0 + */ + this.currentFrame = null; + + /** + * The key of the next Animation to be loaded into this Animation Controller when the current animation completes. + * + * @name Phaser.GameObjects.Components.Animation#nextAnim + * @type {?string} + * @default null + * @since 3.16.0 + */ + this.nextAnim = null; + + /** + * A queue of keys of the next Animations to be loaded into this Animation Controller when the current animation completes. + * + * @name Phaser.GameObjects.Components.Animation#nextAnimsQueue + * @type {string[]} + * @since 3.24.0 + */ + this.nextAnimsQueue = []; + + /** + * Time scale factor. + * + * @name Phaser.GameObjects.Components.Animation#_timeScale + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + this._timeScale = 1; + + /** + * The frame rate of playback in frames per second. + * The default is 24 if the `duration` property is `null`. + * + * @name Phaser.GameObjects.Components.Animation#frameRate + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.frameRate = 0; + + /** + * How long the animation should play for, in milliseconds. + * If the `frameRate` property has been set then it overrides this value, + * otherwise the `frameRate` is derived from `duration`. + * + * @name Phaser.GameObjects.Components.Animation#duration + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.duration = 0; + + /** + * ms per frame, not including frame specific modifiers that may be present in the Animation data. + * + * @name Phaser.GameObjects.Components.Animation#msPerFrame + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.msPerFrame = 0; + + /** + * Skip frames if the time lags, or always advanced anyway? + * + * @name Phaser.GameObjects.Components.Animation#skipMissedFrames + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.skipMissedFrames = true; + + /** + * A delay before starting playback, in milliseconds. + * + * @name Phaser.GameObjects.Components.Animation#_delay + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._delay = 0; + + /** + * Number of times to repeat the animation (-1 for infinity) + * + * @name Phaser.GameObjects.Components.Animation#_repeat + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._repeat = 0; + + /** + * Delay before the repeat starts, in milliseconds. + * + * @name Phaser.GameObjects.Components.Animation#_repeatDelay + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + this._repeatDelay = 0; + + /** + * Should the animation yoyo? (reverse back down to the start) before repeating? + * + * @name Phaser.GameObjects.Components.Animation#_yoyo + * @type {boolean} + * @private + * @default false + * @since 3.0.0 + */ + this._yoyo = false; + + /** + * Will the playhead move forwards (`true`) or in reverse (`false`). + * + * @name Phaser.GameObjects.Components.Animation#forward + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.forward = true; + + /** + * An Internal trigger that's play the animation in reverse mode ('true') or not ('false'), + * needed because forward can be changed by yoyo feature. + * + * @name Phaser.GameObjects.Components.Animation#_reverse + * @type {boolean} + * @default false + * @private + * @since 3.12.0 + */ + this._reverse = false; + + /** + * Internal time overflow accumulator. + * + * @name Phaser.GameObjects.Components.Animation#accumulator + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.accumulator = 0; + + /** + * The time point at which the next animation frame will change. + * + * @name Phaser.GameObjects.Components.Animation#nextTick + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.nextTick = 0; + + /** + * An internal counter keeping track of how many repeats are left to play. + * + * @name Phaser.GameObjects.Components.Animation#repeatCounter + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.repeatCounter = 0; + + /** + * An internal flag keeping track of pending repeats. + * + * @name Phaser.GameObjects.Components.Animation#pendingRepeat + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.pendingRepeat = false; + + /** + * Is the Animation paused? + * + * @name Phaser.GameObjects.Components.Animation#_paused + * @type {boolean} + * @private + * @default false + * @since 3.0.0 + */ + this._paused = false; + + /** + * Was the animation previously playing before being paused? + * + * @name Phaser.GameObjects.Components.Animation#_wasPlaying + * @type {boolean} + * @private + * @default false + * @since 3.0.0 + */ + this._wasPlaying = false; + + /** + * Internal property tracking if this Animation is waiting to stop. + * + * 0 = No + * 1 = Waiting for ms to pass + * 2 = Waiting for repeat + * 3 = Waiting for specific frame + * + * @name Phaser.GameObjects.Components.Animation#_pendingStop + * @type {integer} + * @private + * @since 3.4.0 + */ + this._pendingStop = 0; + + /** + * Internal property used by _pendingStop. + * + * @name Phaser.GameObjects.Components.Animation#_pendingStopValue + * @type {any} + * @private + * @since 3.4.0 + */ + this._pendingStopValue; + }, + + /** + * Sets an animation to be played immediately after the current one completes. + * + * The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc, or have the `stop` method called directly on it. + * + * An animation set to repeat forever will never enter a completed state. + * + * You can chain a new animation at any point, including before the current one starts playing, during it, or when it ends (via its `animationcomplete` callback). + * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained animations without impacting the global animation they're playing. + * + * Call this method with no arguments to reset the chained animation. + * + * @method Phaser.GameObjects.Components.Animation#chain + * @since 3.16.0 + * + * @param {(string|Phaser.Animations.Animation)} [key] - The string-based key of the animation to play next, as defined previously in the Animation Manager. Or an Animation instance. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + chain: function (key) + { + if (key instanceof BaseAnimation) + { + key = key.key; + } + + if (this.nextAnim === null) + { + this.nextAnim = key; + } + else + { + this.nextAnimsQueue.push(key); + } + + return this.parent; + }, + + /** + * Sets the amount of time, in milliseconds, that the animation will be delayed before starting playback. + * + * @method Phaser.GameObjects.Components.Animation#setDelay + * @since 3.4.0 + * + * @param {integer} [value=0] - The amount of time, in milliseconds, to wait before starting playback. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + setDelay: function (value) + { + if (value === undefined) { value = 0; } + + this._delay = value; + + return this.parent; + }, + + /** + * Gets the amount of time, in milliseconds that the animation will be delayed before starting playback. + * + * @method Phaser.GameObjects.Components.Animation#getDelay + * @since 3.4.0 + * + * @return {integer} The amount of time, in milliseconds, the Animation will wait before starting playback. + */ + getDelay: function () + { + return this._delay; + }, + + /** + * Waits for the specified delay, in milliseconds, then starts playback of the requested animation. + * + * @method Phaser.GameObjects.Components.Animation#delayedPlay + * @since 3.0.0 + * + * @param {integer} delay - The delay, in milliseconds, to wait before starting the animation playing. + * @param {string} key - The key of the animation to play. + * @param {integer} [startFrame=0] - The frame of the animation to start from. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + delayedPlay: function (delay, key, startFrame) + { + this.play(key, true, startFrame); + + this.nextTick += delay; + + return this.parent; + }, + + /** + * Returns the key of the animation currently loaded into this component. + * + * @method Phaser.GameObjects.Components.Animation#getCurrentKey + * @since 3.0.0 + * + * @return {string} The key of the Animation loaded into this component. + */ + getCurrentKey: function () + { + if (this.currentAnim) + { + return this.currentAnim.key; + } + }, + + /** + * Internal method used to load an animation into this component. + * + * @method Phaser.GameObjects.Components.Animation#load + * @protected + * @since 3.0.0 + * + * @param {string} key - The key of the animation to load. + * @param {integer} [startFrame=0] - The start frame of the animation to load. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + load: function (key, startFrame) + { + if (startFrame === undefined) { startFrame = 0; } + + if (this.isPlaying) + { + this.stop(); + } + + // Load the new animation in + this.animationManager.load(this, key, startFrame); + + return this.parent; + }, + + /** + * Pause the current animation and set the `isPlaying` property to `false`. + * You can optionally pause it at a specific frame. + * + * @method Phaser.GameObjects.Components.Animation#pause + * @since 3.0.0 + * + * @param {Phaser.Animations.AnimationFrame} [atFrame] - An optional frame to set after pausing the animation. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + pause: function (atFrame) + { + if (!this._paused) + { + this._paused = true; + this._wasPlaying = this.isPlaying; + this.isPlaying = false; + } + + if (atFrame !== undefined) + { + this.updateFrame(atFrame); + } + + return this.parent; + }, + + /** + * Resumes playback of a paused animation and sets the `isPlaying` property to `true`. + * You can optionally tell it to start playback from a specific frame. + * + * @method Phaser.GameObjects.Components.Animation#resume + * @since 3.0.0 + * + * @param {Phaser.Animations.AnimationFrame} [fromFrame] - An optional frame to set before restarting playback. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + resume: function (fromFrame) + { + if (this._paused) + { + this._paused = false; + this.isPlaying = this._wasPlaying; + } + + if (fromFrame !== undefined) + { + this.updateFrame(fromFrame); + } + + return this.parent; + }, + + /** + * `true` if the current animation is paused, otherwise `false`. + * + * @name Phaser.GameObjects.Components.Animation#isPaused + * @readonly + * @type {boolean} + * @since 3.4.0 + */ + isPaused: { + + get: function () + { + return this._paused; + } + + }, + + /** + * Plays an Animation on a Game Object that has the Animation component, such as a Sprite. + * + * Animations are stored in the global Animation Manager and are referenced by a unique string-based key. + * + * @method Phaser.GameObjects.Components.Animation#play + * @fires Phaser.GameObjects.Components.Animation#onStartEvent + * @since 3.0.0 + * + * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance. + * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call. + * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + play: function (key, ignoreIfPlaying, startFrame) + { + if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } + if (startFrame === undefined) { startFrame = 0; } + + if (key instanceof BaseAnimation) + { + key = key.key; + } + + if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key) + { + return this.parent; + } + + this.forward = true; + this._reverse = false; + this._paused = false; + this._wasPlaying = true; + + return this._startAnimation(key, startFrame); + }, + + /** + * Plays an Animation (in reverse mode) on the Game Object that owns this Animation Component. + * + * @method Phaser.GameObjects.Components.Animation#playReverse + * @fires Phaser.GameObjects.Components.Animation#onStartEvent + * @since 3.12.0 + * + * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance. + * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. + * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + playReverse: function (key, ignoreIfPlaying, startFrame) + { + if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } + if (startFrame === undefined) { startFrame = 0; } + + if (key instanceof BaseAnimation) + { + key = key.key; + } + + if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key) + { + return this.parent; + } + + this.forward = false; + this._reverse = true; + + return this._startAnimation(key, startFrame); + }, + + /** + * Load an Animation and fires 'onStartEvent' event, extracted from 'play' method. + * + * @method Phaser.GameObjects.Components.Animation#_startAnimation + * @fires Phaser.Animations.Events#ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START + * @since 3.12.0 + * + * @param {string} key - The string-based key of the animation to play, as defined previously in the Animation Manager. + * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + _startAnimation: function (key, startFrame) + { + this.load(key, startFrame); + + var anim = this.currentAnim; + var gameObject = this.parent; + + if (!anim) + { + return gameObject; + } + + // Should give us 9,007,199,254,740,991 safe repeats + this.repeatCounter = (this._repeat === -1) ? Number.MAX_VALUE : this._repeat; + + anim.getFirstTick(this); + + this.isPlaying = true; + this.pendingRepeat = false; + + if (anim.showOnStart) + { + gameObject.visible = true; + } + + var frame = this.currentFrame; + + anim.emit(Events.ANIMATION_START, anim, frame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_KEY_START + key, anim, frame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_START, anim, frame, gameObject); + + return gameObject; + }, + + /** + * Reverse the Animation that is already playing on the Game Object. + * + * @method Phaser.GameObjects.Components.Animation#reverse + * @since 3.12.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + reverse: function () + { + if (this.isPlaying) + { + this._reverse = !this._reverse; + + this.forward = !this.forward; + } + + return this.parent; + }, + + /** + * Returns a value between 0 and 1 indicating how far this animation is through, ignoring repeats and yoyos. + * If the animation has a non-zero repeat defined, `getProgress` and `getTotalProgress` will be different + * because `getProgress` doesn't include any repeats or repeat delays, whereas `getTotalProgress` does. + * + * @method Phaser.GameObjects.Components.Animation#getProgress + * @since 3.4.0 + * + * @return {number} The progress of the current animation, between 0 and 1. + */ + getProgress: function () + { + var p = this.currentFrame.progress; + + if (!this.forward) + { + p = 1 - p; + } + + return p; + }, + + /** + * Takes a value between 0 and 1 and uses it to set how far this animation is through playback. + * Does not factor in repeats or yoyos, but does handle playing forwards or backwards. + * + * @method Phaser.GameObjects.Components.Animation#setProgress + * @since 3.4.0 + * + * @param {number} [value=0] - The progress value, between 0 and 1. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + setProgress: function (value) + { + if (!this.forward) + { + value = 1 - value; + } + + this.setCurrentFrame(this.currentAnim.getFrameByProgress(value)); + + return this.parent; + }, + + /** + * Handle the removal of an animation from the Animation Manager. + * + * @method Phaser.GameObjects.Components.Animation#remove + * @since 3.0.0 + * + * @param {string} [key] - The key of the removed Animation. + * @param {Phaser.Animations.Animation} [animation] - The removed Animation. + */ + remove: function (key, animation) + { + if (animation === undefined) { animation = this.currentAnim; } + + if (this.isPlaying && animation.key === this.currentAnim.key) + { + this.stop(); + + this.setCurrentFrame(this.currentAnim.frames[0]); + } + }, + + /** + * Gets the number of times that the animation will repeat + * after its first iteration. For example, if returns 1, the animation will + * play a total of twice (the initial play plus 1 repeat). + * A value of -1 means the animation will repeat indefinitely. + * + * @method Phaser.GameObjects.Components.Animation#getRepeat + * @since 3.4.0 + * + * @return {integer} The number of times that the animation will repeat. + */ + getRepeat: function () + { + return this._repeat; + }, + + /** + * Sets the number of times that the animation should repeat + * after its first iteration. For example, if repeat is 1, the animation will + * play a total of twice (the initial play plus 1 repeat). + * To repeat indefinitely, use -1. repeat should always be an integer. + * + * @method Phaser.GameObjects.Components.Animation#setRepeat + * @since 3.4.0 + * + * @param {integer} value - The number of times that the animation should repeat. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + setRepeat: function (value) + { + this._repeat = value; + + this.repeatCounter = (value === -1) ? Number.MAX_VALUE : value; + + return this.parent; + }, + + /** + * Gets the amount of delay between repeats, if any. + * + * @method Phaser.GameObjects.Components.Animation#getRepeatDelay + * @since 3.4.0 + * + * @return {number} The delay between repeats. + */ + getRepeatDelay: function () + { + return this._repeatDelay; + }, + + /** + * Sets the amount of time in seconds between repeats. + * For example, if `repeat` is 2 and `repeatDelay` is 10, the animation will play initially, + * then wait for 10 seconds before repeating, then play again, then wait another 10 seconds + * before doing its final repeat. + * + * @method Phaser.GameObjects.Components.Animation#setRepeatDelay + * @since 3.4.0 + * + * @param {number} value - The delay to wait between repeats, in seconds. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + setRepeatDelay: function (value) + { + this._repeatDelay = value; + + return this.parent; + }, + + /** + * Restarts the current animation from its beginning, optionally including its delay value. + * + * @method Phaser.GameObjects.Components.Animation#restart + * @fires Phaser.Animations.Events#ANIMATION_RESTART + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_RESTART + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART + * @since 3.0.0 + * + * @param {boolean} [includeDelay=false] - Whether to include the delay value of the animation when restarting. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + restart: function (includeDelay) + { + if (includeDelay === undefined) { includeDelay = false; } + + var anim = this.currentAnim; + + anim.getFirstTick(this, includeDelay); + + this.forward = true; + this.isPlaying = true; + this.pendingRepeat = false; + this._paused = false; + + // Set frame + this.updateFrame(anim.frames[0]); + + var gameObject = this.parent; + var frame = this.currentFrame; + + anim.emit(Events.ANIMATION_RESTART, anim, frame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_KEY_RESTART + anim.key, anim, frame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_RESTART, anim, frame, gameObject); + + return this.parent; + }, + + /** + * Immediately stops the current animation from playing and dispatches the `animationcomplete` event. + * + * If no animation is set, no event will be dispatched. + * + * If there is another animation queued (via the `chain` method) then it will start playing immediately. + * + * @method Phaser.GameObjects.Components.Animation#stop + * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent + * @since 3.0.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stop: function () + { + this._pendingStop = 0; + + this.isPlaying = false; + + var gameObject = this.parent; + var anim = this.currentAnim; + var frame = this.currentFrame; + + if (anim) + { + anim.emit(Events.ANIMATION_COMPLETE, anim, frame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_KEY_COMPLETE + anim.key, anim, frame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_COMPLETE, anim, frame, gameObject); + } + + if (this.nextAnim) + { + var key = this.nextAnim; + + this.nextAnim = (this.nextAnimsQueue.length > 0) ? this.nextAnimsQueue.shift() : null; + + this.play(key); + } + + return gameObject; + }, + + /** + * Stops the current animation from playing after the specified time delay, given in milliseconds. + * + * @method Phaser.GameObjects.Components.Animation#stopAfterDelay + * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent + * @since 3.4.0 + * + * @param {integer} delay - The number of milliseconds to wait before stopping this animation. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stopAfterDelay: function (delay) + { + this._pendingStop = 1; + this._pendingStopValue = delay; + + return this.parent; + }, + + /** + * Stops the current animation from playing when it next repeats. + * + * @method Phaser.GameObjects.Components.Animation#stopOnRepeat + * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent + * @since 3.4.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stopOnRepeat: function () + { + this._pendingStop = 2; + + return this.parent; + }, + + /** + * Stops the current animation from playing when it next sets the given frame. + * If this frame doesn't exist within the animation it will not stop it from playing. + * + * @method Phaser.GameObjects.Components.Animation#stopOnFrame + * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent + * @since 3.4.0 + * + * @param {Phaser.Animations.AnimationFrame} frame - The frame to check before stopping this animation. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stopOnFrame: function (frame) + { + this._pendingStop = 3; + this._pendingStopValue = frame; + + return this.parent; + }, + + /** + * Sets the Time Scale factor, allowing you to make the animation go go faster or slower than default. + * Where 1 = normal speed (the default), 0.5 = half speed, 2 = double speed, etc. + * + * @method Phaser.GameObjects.Components.Animation#setTimeScale + * @since 3.4.0 + * + * @param {number} [value=1] - The time scale factor, where 1 is no change, 0.5 is half speed, etc. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + setTimeScale: function (value) + { + if (value === undefined) { value = 1; } + + this._timeScale = value; + + return this.parent; + }, + + /** + * Gets the Time Scale factor. + * + * @method Phaser.GameObjects.Components.Animation#getTimeScale + * @since 3.4.0 + * + * @return {number} The Time Scale value. + */ + getTimeScale: function () + { + return this._timeScale; + }, + + /** + * Returns the total number of frames in this animation. + * + * @method Phaser.GameObjects.Components.Animation#getTotalFrames + * @since 3.4.0 + * + * @return {integer} The total number of frames in this animation. + */ + getTotalFrames: function () + { + return this.currentAnim.frames.length; + }, + + /** + * The internal update loop for the Animation Component. + * + * @method Phaser.GameObjects.Components.Animation#update + * @since 3.0.0 + * + * @param {number} time - The current timestamp. + * @param {number} delta - The delta time, in ms, elapsed since the last frame. + */ + update: function (time, delta) + { + if (!this.currentAnim || !this.isPlaying || this.currentAnim.paused) + { + return; + } + + this.accumulator += delta * this._timeScale; + + if (this._pendingStop === 1) + { + this._pendingStopValue -= delta; + + if (this._pendingStopValue <= 0) + { + return this.currentAnim.completeAnimation(this); + } + } + + if (this.accumulator >= this.nextTick) + { + this.currentAnim.setFrame(this); + } + }, + + /** + * Sets the given Animation Frame as being the current frame + * and applies it to the parent Game Object, adjusting its size and origin as needed. + * + * @method Phaser.GameObjects.Components.Animation#setCurrentFrame + * @since 3.4.0 + * + * @param {Phaser.Animations.AnimationFrame} animationFrame - The Animation Frame to set as being current. + * + * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. + */ + setCurrentFrame: function (animationFrame) + { + var gameObject = this.parent; + + this.currentFrame = animationFrame; + + gameObject.texture = animationFrame.frame.texture; + gameObject.frame = animationFrame.frame; + + if (gameObject.isCropped) + { + gameObject.frame.updateCropUVs(gameObject._crop, gameObject.flipX, gameObject.flipY); + } + + gameObject.setSizeToFrame(); + + if (gameObject._originComponent) + { + if (animationFrame.frame.customPivot) + { + gameObject.setOrigin(animationFrame.frame.pivotX, animationFrame.frame.pivotY); + } + else + { + gameObject.updateDisplayOrigin(); + } + } + + return gameObject; + }, + + /** + * Internal frame change handler. + * + * @method Phaser.GameObjects.Components.Animation#updateFrame + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE + * @private + * @since 3.0.0 + * + * @param {Phaser.Animations.AnimationFrame} animationFrame - The animation frame to change to. + */ + updateFrame: function (animationFrame) + { + var gameObject = this.setCurrentFrame(animationFrame); + + if (this.isPlaying) + { + if (animationFrame.setAlpha) + { + gameObject.alpha = animationFrame.alpha; + } + + var anim = this.currentAnim; + + gameObject.emit(Events.SPRITE_ANIMATION_KEY_UPDATE + anim.key, anim, animationFrame, gameObject); + + gameObject.emit(Events.SPRITE_ANIMATION_UPDATE, anim, animationFrame, gameObject); + + if (this._pendingStop === 3 && this._pendingStopValue === animationFrame) + { + this.currentAnim.completeAnimation(this); + } + } + }, + + /** + * Advances the animation to the next frame, regardless of the time or animation state. + * If the animation is set to repeat, or yoyo, this will still take effect. + * + * Calling this does not change the direction of the animation. I.e. if it was currently + * playing in reverse, calling this method doesn't then change the direction to forwards. + * + * @method Phaser.GameObjects.Components.Animation#nextFrame + * @since 3.16.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. + */ + nextFrame: function () + { + if (this.currentAnim) + { + this.currentAnim.nextFrame(this); + } + + return this.parent; + }, + + /** + * Advances the animation to the previous frame, regardless of the time or animation state. + * If the animation is set to repeat, or yoyo, this will still take effect. + * + * Calling this does not change the direction of the animation. I.e. if it was currently + * playing in forwards, calling this method doesn't then change the direction to backwards. + * + * @method Phaser.GameObjects.Components.Animation#previousFrame + * @since 3.16.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. + */ + previousFrame: function () + { + if (this.currentAnim) + { + this.currentAnim.previousFrame(this); + } + + return this.parent; + }, + + /** + * Sets if the current Animation will yoyo when it reaches the end. + * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again. + * + * @method Phaser.GameObjects.Components.Animation#setYoyo + * @since 3.4.0 + * + * @param {boolean} [value=false] - `true` if the animation should yoyo, `false` to not. + * + * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. + */ + setYoyo: function (value) + { + if (value === undefined) { value = false; } + + this._yoyo = value; + + return this.parent; + }, + + /** + * Gets if the current Animation will yoyo when it reaches the end. + * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again. + * + * @method Phaser.GameObjects.Components.Animation#getYoyo + * @since 3.4.0 + * + * @return {boolean} `true` if the animation is set to yoyo, `false` if not. + */ + getYoyo: function () + { + return this._yoyo; + }, + + /** + * Destroy this Animation component. + * + * Unregisters event listeners and cleans up its references. + * + * @method Phaser.GameObjects.Components.Animation#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.animationManager.off(Events.REMOVE_ANIMATION, this.remove, this); + + this.animationManager = null; + this.parent = null; + this.nextAnimsQueue.length = 0; + + this.currentAnim = null; + this.currentFrame = null; + } + +}); + +module.exports = Animation; + + +/***/ }), +/* 183 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Clamp = __webpack_require__(4); +var Class = __webpack_require__(0); +var EventEmitter = __webpack_require__(36); +var Events = __webpack_require__(38); +var FindClosestInSorted = __webpack_require__(202); +var Frame = __webpack_require__(203); +var GetValue = __webpack_require__(11); + +/** + * @classdesc + * A Frame based Animation. + * + * This consists of a key, some default values (like the frame rate) and a bunch of Frame objects. + * + * The Animation Manager creates these. Game Objects don't own an instance of these directly. + * Game Objects have the Animation Component, which are like playheads to global Animations (these objects) + * So multiple Game Objects can have playheads all pointing to this one Animation instance. + * + * @class Animation + * @memberof Phaser.Animations + * @extends Phaser.Events.EventEmitter + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Animations.AnimationManager} manager - A reference to the global Animation Manager + * @param {string} key - The unique identifying string for this animation. + * @param {Phaser.Types.Animations.Animation} config - The Animation configuration. + */ +var Animation = new Class({ + + Extends: EventEmitter, + + initialize: + + function Animation (manager, key, config) + { + EventEmitter.call(this); + + /** + * A reference to the global Animation Manager. + * + * @name Phaser.Animations.Animation#manager + * @type {Phaser.Animations.AnimationManager} + * @since 3.0.0 + */ + this.manager = manager; + + /** + * The unique identifying string for this animation. + * + * @name Phaser.Animations.Animation#key + * @type {string} + * @since 3.0.0 + */ + this.key = key; + + /** + * A frame based animation (as opposed to a bone based animation) + * + * @name Phaser.Animations.Animation#type + * @type {string} + * @default frame + * @since 3.0.0 + */ + this.type = 'frame'; + + /** + * Extract all the frame data into the frames array. + * + * @name Phaser.Animations.Animation#frames + * @type {Phaser.Animations.AnimationFrame[]} + * @since 3.0.0 + */ + this.frames = this.getFrames( + manager.textureManager, + GetValue(config, 'frames', []), + GetValue(config, 'defaultTextureKey', null) + ); + + /** + * The frame rate of playback in frames per second (default 24 if duration is null) + * + * @name Phaser.Animations.Animation#frameRate + * @type {integer} + * @default 24 + * @since 3.0.0 + */ + this.frameRate = GetValue(config, 'frameRate', null); + + /** + * How long the animation should play for, in milliseconds. + * If the `frameRate` property has been set then it overrides this value, + * otherwise the `frameRate` is derived from `duration`. + * + * @name Phaser.Animations.Animation#duration + * @type {integer} + * @since 3.0.0 + */ + this.duration = GetValue(config, 'duration', null); + + if (this.duration === null && this.frameRate === null) + { + // No duration or frameRate given, use default frameRate of 24fps + this.frameRate = 24; + this.duration = (this.frameRate / this.frames.length) * 1000; + } + else if (this.duration && this.frameRate === null) + { + // Duration given but no frameRate, so set the frameRate based on duration + // I.e. 12 frames in the animation, duration = 4000 ms + // So frameRate is 12 / (4000 / 1000) = 3 fps + this.frameRate = this.frames.length / (this.duration / 1000); + } + else + { + // frameRate given, derive duration from it (even if duration also specified) + // I.e. 15 frames in the animation, frameRate = 30 fps + // So duration is 15 / 30 = 0.5 * 1000 (half a second, or 500ms) + this.duration = (this.frames.length / this.frameRate) * 1000; + } + + /** + * How many ms per frame, not including frame specific modifiers. + * + * @name Phaser.Animations.Animation#msPerFrame + * @type {integer} + * @since 3.0.0 + */ + this.msPerFrame = 1000 / this.frameRate; + + /** + * Skip frames if the time lags, or always advanced anyway? + * + * @name Phaser.Animations.Animation#skipMissedFrames + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.skipMissedFrames = GetValue(config, 'skipMissedFrames', true); + + /** + * The delay in ms before the playback will begin. + * + * @name Phaser.Animations.Animation#delay + * @type {integer} + * @default 0 + * @since 3.0.0 + */ + this.delay = GetValue(config, 'delay', 0); + + /** + * Number of times to repeat the animation. Set to -1 to repeat forever. + * + * @name Phaser.Animations.Animation#repeat + * @type {integer} + * @default 0 + * @since 3.0.0 + */ + this.repeat = GetValue(config, 'repeat', 0); + + /** + * The delay in ms before the a repeat play starts. + * + * @name Phaser.Animations.Animation#repeatDelay + * @type {integer} + * @default 0 + * @since 3.0.0 + */ + this.repeatDelay = GetValue(config, 'repeatDelay', 0); + + /** + * Should the animation yoyo (reverse back down to the start) before repeating? + * + * @name Phaser.Animations.Animation#yoyo + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.yoyo = GetValue(config, 'yoyo', false); + + /** + * Should the GameObject's `visible` property be set to `true` when the animation starts to play? + * + * @name Phaser.Animations.Animation#showOnStart + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.showOnStart = GetValue(config, 'showOnStart', false); + + /** + * Should the GameObject's `visible` property be set to `false` when the animation finishes? + * + * @name Phaser.Animations.Animation#hideOnComplete + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.hideOnComplete = GetValue(config, 'hideOnComplete', false); + + /** + * Global pause. All Game Objects using this Animation instance are impacted by this property. + * + * @name Phaser.Animations.Animation#paused + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.paused = false; + + this.manager.on(Events.PAUSE_ALL, this.pause, this); + this.manager.on(Events.RESUME_ALL, this.resume, this); + }, + + /** + * Add frames to the end of the animation. + * + * @method Phaser.Animations.Animation#addFrame + * @since 3.0.0 + * + * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects. + * + * @return {this} This Animation object. + */ + addFrame: function (config) + { + return this.addFrameAt(this.frames.length, config); + }, + + /** + * Add frame/s into the animation. + * + * @method Phaser.Animations.Animation#addFrameAt + * @since 3.0.0 + * + * @param {integer} index - The index to insert the frame at within the animation. + * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects. + * + * @return {this} This Animation object. + */ + addFrameAt: function (index, config) + { + var newFrames = this.getFrames(this.manager.textureManager, config); + + if (newFrames.length > 0) + { + if (index === 0) + { + this.frames = newFrames.concat(this.frames); + } + else if (index === this.frames.length) + { + this.frames = this.frames.concat(newFrames); + } + else + { + var pre = this.frames.slice(0, index); + var post = this.frames.slice(index); + + this.frames = pre.concat(newFrames, post); + } + + this.updateFrameSequence(); + } + + return this; + }, + + /** + * Check if the given frame index is valid. + * + * @method Phaser.Animations.Animation#checkFrame + * @since 3.0.0 + * + * @param {integer} index - The index to be checked. + * + * @return {boolean} `true` if the index is valid, otherwise `false`. + */ + checkFrame: function (index) + { + return (index >= 0 && index < this.frames.length); + }, + + /** + * Called internally when this Animation completes playback. + * Optionally, hides the parent Game Object, then stops playback. + * + * @method Phaser.Animations.Animation#completeAnimation + * @protected + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. + */ + completeAnimation: function (component) + { + if (this.hideOnComplete) + { + component.parent.visible = false; + } + + component.stop(); + }, + + /** + * Called internally when this Animation first starts to play. + * Sets the accumulator and nextTick properties. + * + * @method Phaser.Animations.Animation#getFirstTick + * @protected + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. + * @param {boolean} [includeDelay=true] - If `true` the Animation Components delay value will be added to the `nextTick` total. + */ + getFirstTick: function (component, includeDelay) + { + if (includeDelay === undefined) { includeDelay = true; } + + // When is the first update due? + component.accumulator = 0; + component.nextTick = component.msPerFrame + component.currentFrame.duration; + + if (includeDelay) + { + component.nextTick += component._delay; + } + }, + + /** + * Returns the AnimationFrame at the provided index + * + * @method Phaser.Animations.Animation#getFrameAt + * @protected + * @since 3.0.0 + * + * @param {integer} index - The index in the AnimationFrame array + * + * @return {Phaser.Animations.AnimationFrame} The frame at the index provided from the animation sequence + */ + getFrameAt: function (index) + { + return this.frames[index]; + }, + + /** + * Creates AnimationFrame instances based on the given frame data. + * + * @method Phaser.Animations.Animation#getFrames + * @since 3.0.0 + * + * @param {Phaser.Textures.TextureManager} textureManager - A reference to the global Texture Manager. + * @param {(string|Phaser.Types.Animations.AnimationFrame[])} frames - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects. + * @param {string} [defaultTextureKey] - The key to use if no key is set in the frame configuration object. + * + * @return {Phaser.Animations.AnimationFrame[]} An array of newly created AnimationFrame instances. + */ + getFrames: function (textureManager, frames, defaultTextureKey) + { + var out = []; + var prev; + var animationFrame; + var index = 1; + var i; + var textureKey; + + // if frames is a string, we'll get all the frames from the texture manager as if it's a sprite sheet + if (typeof frames === 'string') + { + textureKey = frames; + + var texture = textureManager.get(textureKey); + var frameKeys = texture.getFrameNames(); + + frames = []; + + frameKeys.forEach(function (idx, value) + { + frames.push({ key: textureKey, frame: value }); + }); + } + + if (!Array.isArray(frames) || frames.length === 0) + { + return out; + } + + for (i = 0; i < frames.length; i++) + { + var item = frames[i]; + + var key = GetValue(item, 'key', defaultTextureKey); + + if (!key) + { + continue; + } + + // Could be an integer or a string + var frame = GetValue(item, 'frame', 0); + + // The actual texture frame + var textureFrame = textureManager.getFrame(key, frame); + + animationFrame = new Frame(key, frame, index, textureFrame); + + animationFrame.duration = GetValue(item, 'duration', 0); + + animationFrame.isFirst = (!prev); + + // The previously created animationFrame + if (prev) + { + prev.nextFrame = animationFrame; + + animationFrame.prevFrame = prev; + } + + out.push(animationFrame); + + prev = animationFrame; + + index++; + } + + if (out.length > 0) + { + animationFrame.isLast = true; + + // Link them end-to-end, so they loop + animationFrame.nextFrame = out[0]; + + out[0].prevFrame = animationFrame; + + // Generate the progress data + + var slice = 1 / (out.length - 1); + + for (i = 0; i < out.length; i++) + { + out[i].progress = i * slice; + } + } + + return out; + }, + + /** + * Called internally. Sets the accumulator and nextTick values of the current Animation. + * + * @method Phaser.Animations.Animation#getNextTick + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. + */ + getNextTick: function (component) + { + // accumulator += delta * _timeScale + // after a large delta surge (perf issue for example) we need to adjust for it here + + // When is the next update due? + component.accumulator -= component.nextTick; + + component.nextTick = component.msPerFrame + component.currentFrame.duration; + }, + + /** + * Loads the Animation values into the Animation Component. + * + * @method Phaser.Animations.Animation#load + * @private + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to load values into. + * @param {integer} startFrame - The start frame of the animation to load. + */ + load: function (component, startFrame) + { + if (startFrame >= this.frames.length) + { + startFrame = 0; + } + + if (component.currentAnim !== this) + { + component.currentAnim = this; + + component.frameRate = this.frameRate; + component.duration = this.duration; + component.msPerFrame = this.msPerFrame; + component.skipMissedFrames = this.skipMissedFrames; + + component._delay = this.delay; + component._repeat = this.repeat; + component._repeatDelay = this.repeatDelay; + component._yoyo = this.yoyo; + } + + var frame = this.frames[startFrame]; + + if (startFrame === 0 && !component.forward) + { + frame = this.getLastFrame(); + } + + component.updateFrame(frame); + }, + + /** + * Returns the frame closest to the given progress value between 0 and 1. + * + * @method Phaser.Animations.Animation#getFrameByProgress + * @since 3.4.0 + * + * @param {number} value - A value between 0 and 1. + * + * @return {Phaser.Animations.AnimationFrame} The frame closest to the given progress value. + */ + getFrameByProgress: function (value) + { + value = Clamp(value, 0, 1); + + return FindClosestInSorted(value, this.frames, 'progress'); + }, + + /** + * Advance the animation frame. + * + * @method Phaser.Animations.Animation#nextFrame + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to advance. + */ + nextFrame: function (component) + { + var frame = component.currentFrame; + + // TODO: Add frame skip support + + if (frame.isLast) + { + // We're at the end of the animation + + // Yoyo? (happens before repeat) + if (component._yoyo) + { + this.handleYoyoFrame(component, false); + } + else if (component.repeatCounter > 0) + { + // Repeat (happens before complete) + + if (component._reverse && component.forward) + { + component.forward = false; + } + else + { + this.repeatAnimation(component); + } + } + else + { + this.completeAnimation(component); + } + } + else + { + this.updateAndGetNextTick(component, frame.nextFrame); + } + }, + + /** + * Handle the yoyo functionality in nextFrame and previousFrame methods. + * + * @method Phaser.Animations.Animation#handleYoyoFrame + * @private + * @since 3.12.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to advance. + * @param {boolean} isReverse - Is animation in reverse mode? (Default: false) + */ + handleYoyoFrame: function (component, isReverse) + { + if (!isReverse) { isReverse = false; } + + if (component._reverse === !isReverse && component.repeatCounter > 0) + { + if (!component._repeatDelay || component.pendingRepeat) + + { + component.forward = isReverse; + } + + this.repeatAnimation(component); + + return; + } + + if (component._reverse !== isReverse && component.repeatCounter === 0) + { + this.completeAnimation(component); + + return; + } + + component.forward = isReverse; + + var frame = (isReverse) ? component.currentFrame.nextFrame : component.currentFrame.prevFrame; + + this.updateAndGetNextTick(component, frame); + }, + + /** + * Returns the animation last frame. + * + * @method Phaser.Animations.Animation#getLastFrame + * @since 3.12.0 + * + * @return {Phaser.Animations.AnimationFrame} component - The Animation Last Frame. + */ + getLastFrame: function () + { + return this.frames[this.frames.length - 1]; + }, + + /** + * Called internally when the Animation is playing backwards. + * Sets the previous frame, causing a yoyo, repeat, complete or update, accordingly. + * + * @method Phaser.Animations.Animation#previousFrame + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. + */ + previousFrame: function (component) + { + var frame = component.currentFrame; + + // TODO: Add frame skip support + + if (frame.isFirst) + { + // We're at the start of the animation + + if (component._yoyo) + { + this.handleYoyoFrame(component, true); + } + else if (component.repeatCounter > 0) + { + if (component._reverse && !component.forward) + { + component.currentFrame = this.getLastFrame(); + this.repeatAnimation(component); + } + else + { + // Repeat (happens before complete) + component.forward = true; + this.repeatAnimation(component); + } + } + else + { + this.completeAnimation(component); + } + } + else + { + this.updateAndGetNextTick(component, frame.prevFrame); + } + }, + + /** + * Update Frame and Wait next tick. + * + * @method Phaser.Animations.Animation#updateAndGetNextTick + * @private + * @since 3.12.0 + * + * @param {Phaser.Animations.AnimationFrame} frame - An Animation frame. + */ + updateAndGetNextTick: function (component, frame) + { + component.updateFrame(frame); + + this.getNextTick(component); + }, + + /** + * Removes the given AnimationFrame from this Animation instance. + * This is a global action. Any Game Object using this Animation will be impacted by this change. + * + * @method Phaser.Animations.Animation#removeFrame + * @since 3.0.0 + * + * @param {Phaser.Animations.AnimationFrame} frame - The AnimationFrame to be removed. + * + * @return {this} This Animation object. + */ + removeFrame: function (frame) + { + var index = this.frames.indexOf(frame); + + if (index !== -1) + { + this.removeFrameAt(index); + } + + return this; + }, + + /** + * Removes a frame from the AnimationFrame array at the provided index + * and updates the animation accordingly. + * + * @method Phaser.Animations.Animation#removeFrameAt + * @since 3.0.0 + * + * @param {integer} index - The index in the AnimationFrame array + * + * @return {this} This Animation object. + */ + removeFrameAt: function (index) + { + this.frames.splice(index, 1); + + this.updateFrameSequence(); + + return this; + }, + + /** + * Called internally during playback. Forces the animation to repeat, providing there are enough counts left + * in the repeat counter. + * + * @method Phaser.Animations.Animation#repeatAnimation + * @fires Phaser.Animations.Events#ANIMATION_REPEAT + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_REPEAT + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. + */ + repeatAnimation: function (component) + { + if (component._pendingStop === 2) + { + return this.completeAnimation(component); + } + + if (component._repeatDelay > 0 && component.pendingRepeat === false) + { + component.pendingRepeat = true; + component.accumulator -= component.nextTick; + component.nextTick += component._repeatDelay; + } + else + { + component.repeatCounter--; + + component.updateFrame(component.currentFrame[(component.forward) ? 'nextFrame' : 'prevFrame']); + + if (component.isPlaying) + { + this.getNextTick(component); + + component.pendingRepeat = false; + + var frame = component.currentFrame; + var parent = component.parent; + + this.emit(Events.ANIMATION_REPEAT, this, frame); + + parent.emit(Events.SPRITE_ANIMATION_KEY_REPEAT + this.key, this, frame, component.repeatCounter, parent); + + parent.emit(Events.SPRITE_ANIMATION_REPEAT, this, frame, component.repeatCounter, parent); + } + } + }, + + /** + * Sets the texture frame the animation uses for rendering. + * + * @method Phaser.Animations.Animation#setFrame + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. + */ + setFrame: function (component) + { + // Work out which frame should be set next on the child, and set it + if (component.forward) + { + this.nextFrame(component); + } + else + { + this.previousFrame(component); + } + }, + + /** + * Converts the animation data to JSON. + * + * @method Phaser.Animations.Animation#toJSON + * @since 3.0.0 + * + * @return {Phaser.Types.Animations.JSONAnimation} The resulting JSONAnimation formatted object. + */ + toJSON: function () + { + var output = { + 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, + showOnStart: this.showOnStart, + hideOnComplete: this.hideOnComplete + }; + + this.frames.forEach(function (frame) + { + output.frames.push(frame.toJSON()); + }); + + return output; + }, + + /** + * Called internally whenever frames are added to, or removed from, this Animation. + * + * @method Phaser.Animations.Animation#updateFrameSequence + * @since 3.0.0 + * + * @return {this} This Animation object. + */ + updateFrameSequence: function () + { + var len = this.frames.length; + var slice = 1 / (len - 1); + + var frame; + + for (var i = 0; i < len; i++) + { + frame = this.frames[i]; + + frame.index = i + 1; + frame.isFirst = false; + frame.isLast = false; + frame.progress = i * slice; + + if (i === 0) + { + frame.isFirst = true; + + if (len === 1) + { + frame.isLast = true; + frame.nextFrame = frame; + frame.prevFrame = frame; + } + else + { + frame.isLast = false; + frame.prevFrame = this.frames[len - 1]; + frame.nextFrame = this.frames[i + 1]; + } + } + else if (i === len - 1 && len > 1) + { + frame.isLast = true; + frame.prevFrame = this.frames[len - 2]; + frame.nextFrame = this.frames[0]; + } + else if (len > 1) + { + frame.prevFrame = this.frames[i - 1]; + frame.nextFrame = this.frames[i + 1]; + } + } + + return this; + }, + + /** + * Pauses playback of this Animation. The paused state is set immediately. + * + * @method Phaser.Animations.Animation#pause + * @since 3.0.0 + * + * @return {this} This Animation object. + */ + pause: function () + { + this.paused = true; + + return this; + }, + + /** + * Resumes playback of this Animation. The paused state is reset immediately. + * + * @method Phaser.Animations.Animation#resume + * @since 3.0.0 + * + * @return {this} This Animation object. + */ + resume: function () + { + this.paused = false; + + return this; + }, + + /** + * Destroys this Animation instance. It will remove all event listeners, + * remove this animation and its key from the global Animation Manager, + * and then destroy all Animation Frames in turn. + * + * @method Phaser.Animations.Animation#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.removeAllListeners(); + + this.manager.off(Events.PAUSE_ALL, this.pause, this); + this.manager.off(Events.RESUME_ALL, this.resume, this); + + this.manager.remove(this.key); + + for (var i = 0; i < this.frames.length; i++) + { + this.frames[i].destroy(); + } + + this.frames = []; + + this.manager = null; + } + +}); + +module.exports = Animation; + + +/***/ }), +/* 184 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Add Animation Event. + * + * This event is dispatched when a new animation is added to the global Animation Manager. + * + * This can happen either as a result of an animation instance being added to the Animation Manager, + * or the Animation Manager creating a new animation directly. + * + * @event Phaser.Animations.Events#ADD_ANIMATION + * @since 3.0.0 + * + * @param {string} key - The key of the Animation that was added to the global Animation Manager. + * @param {Phaser.Animations.Animation} animation - An instance of the newly created Animation. + */ +module.exports = 'add'; + + +/***/ }), +/* 185 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Complete Event. + * + * This event is dispatched by an Animation instance when it completes, i.e. finishes playing or is manually stopped. + * + * Be careful with the volume of events this could generate. If a group of Sprites all complete the same + * animation at the same time, this event will invoke its handler for each one of them. + * + * @event Phaser.Animations.Events#ANIMATION_COMPLETE + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed. + */ +module.exports = 'complete'; + + +/***/ }), +/* 186 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Repeat Event. + * + * This event is dispatched when a currently playing animation repeats. + * + * The event is dispatched directly from the Animation object itself. Which means that listeners + * bound to this event will be invoked every time the Animation repeats, for every Game Object that may have it. + * + * @event Phaser.Animations.Events#ANIMATION_REPEAT + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that repeated. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation was on when it repeated. + */ +module.exports = 'repeat'; + + +/***/ }), +/* 187 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Restart Event. + * + * This event is dispatched by an Animation instance when it restarts. + * + * Be careful with the volume of events this could generate. If a group of Sprites all restart the same + * animation at the same time, this event will invoke its handler for each one of them. + * + * @event Phaser.Animations.Events#ANIMATION_RESTART + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that restarted playing. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing. + */ +module.exports = 'restart'; + + +/***/ }), +/* 188 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Start Event. + * + * This event is dispatched by an Animation instance when it starts playing. + * + * Be careful with the volume of events this could generate. If a group of Sprites all play the same + * animation at the same time, this event will invoke its handler for each one of them. + * + * @event Phaser.Animations.Events#ANIMATION_START + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that started playing. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing. + */ +module.exports = 'start'; + + +/***/ }), +/* 189 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Pause All Animations Event. + * + * This event is dispatched when the global Animation Manager is told to pause. + * + * When this happens all current animations will stop updating, although it doesn't necessarily mean + * that the game has paused as well. + * + * @event Phaser.Animations.Events#PAUSE_ALL + * @since 3.0.0 + */ +module.exports = 'pauseall'; + + +/***/ }), +/* 190 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Remove Animation Event. + * + * This event is dispatched when an animation is removed from the global Animation Manager. + * + * @event Phaser.Animations.Events#REMOVE_ANIMATION + * @since 3.0.0 + * + * @param {string} key - The key of the Animation that was removed from the global Animation Manager. + * @param {Phaser.Animations.Animation} animation - An instance of the removed Animation. + */ +module.exports = 'remove'; + + +/***/ }), +/* 191 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Resume All Animations Event. + * + * This event is dispatched when the global Animation Manager resumes, having been previously paused. + * + * When this happens all current animations will continue updating again. + * + * @event Phaser.Animations.Events#RESUME_ALL + * @since 3.0.0 + */ +module.exports = 'resumeall'; + + +/***/ }), +/* 192 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Complete Event. + * + * This event is dispatched by a Sprite when an animation finishes playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationcomplete', listener)` + * + * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_COMPLETE` event. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_COMPLETE + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed. + */ +module.exports = 'animationcomplete'; + + +/***/ }), +/* 193 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Key Complete Event. + * + * This event is dispatched by a Sprite when a specific animation finishes playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationcomplete-key', listener)` where `key` is the key of + * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationcomplete-explode`. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_COMPLETE + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed. + */ +module.exports = 'animationcomplete-'; + + +/***/ }), +/* 194 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Key Repeat Event. + * + * This event is dispatched by a Sprite when a specific animation repeats playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationrepeat-key', listener)` where `key` is the key of + * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrepeat-explode`. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. + * @param {integer} repeatCount - The number of times the Animation has repeated so far. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing. + */ +module.exports = 'animationrepeat-'; + + +/***/ }), +/* 195 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Key Restart Event. + * + * This event is dispatched by a Sprite when a specific animation restarts playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationrestart-key', listener)` where `key` is the key of + * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrestart-explode`. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing. + */ +module.exports = 'animationrestart-'; + + +/***/ }), +/* 196 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Key Start Event. + * + * This event is dispatched by a Sprite when a specific animation starts playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationstart-key', listener)` where `key` is the key of + * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationstart-explode`. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing. + */ +module.exports = 'animationstart-'; + + +/***/ }), +/* 197 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Key Update Event. + * + * This event is dispatched by a Sprite when a specific animation playing on it updates. This happens when the animation changes frame, + * based on the animation frame rate and other factors like `timeScale` and `delay`. + * + * Listen for it on the Sprite using `sprite.on('animationupdate-key', listener)` where `key` is the key of + * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationupdate-explode`. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated. + */ +module.exports = 'animationupdate-'; + + +/***/ }), +/* 198 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Repeat Event. + * + * This event is dispatched by a Sprite when an animation repeats playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationrepeat', listener)` + * + * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_REPEAT` event. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_REPEAT + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. + * @param {integer} repeatCount - The number of times the Animation has repeated so far. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing. + */ +module.exports = 'animationrepeat'; + + +/***/ }), +/* 199 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Restart Event. + * + * This event is dispatched by a Sprite when an animation restarts playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationrestart', listener)` + * + * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_RESTART` event. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_RESTART + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing. + */ +module.exports = 'animationrestart'; + + +/***/ }), +/* 200 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Start Event. + * + * This event is dispatched by a Sprite when an animation starts playing on it. + * + * Listen for it on the Sprite using `sprite.on('animationstart', listener)` + * + * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_START` event. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_START + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing. + */ +module.exports = 'animationstart'; + + +/***/ }), +/* 201 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Update Event. + * + * This event is dispatched by a Sprite when an animation playing on it updates. This happens when the animation changes frame, + * based on the animation frame rate and other factors like `timeScale` and `delay`. + * + * Listen for it on the Sprite using `sprite.on('animationupdate', listener)` + * + * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_UPDATE` event. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE + * @since 3.16.1 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated. + */ +module.exports = 'animationupdate'; + + +/***/ }), +/* 202 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Searches a pre-sorted array for the closet value to the given number. + * + * If the `key` argument is given it will assume the array contains objects that all have the required `key` property name, + * and will check for the closest value of those to the given number. + * + * @function Phaser.Utils.Array.FindClosestInSorted + * @since 3.0.0 + * + * @param {number} value - The value to search for in the array. + * @param {array} array - The array to search, which must be sorted. + * @param {string} [key] - An optional property key. If specified the array elements property will be checked against value. + * + * @return {(number|any)} The nearest value found in the array, or if a `key` was given, the nearest object with the matching property value. + */ +var FindClosestInSorted = function (value, array, key) +{ + if (!array.length) + { + return NaN; + } + else if (array.length === 1) + { + return array[0]; + } + + var i = 1; + var low; + var high; + + if (key) + { + if (value < array[0][key]) + { + return array[0]; + } + + while (array[i][key] < value) + { + i++; + } + } + else + { + while (array[i] < value) + { + i++; + } + } + + if (i > array.length) + { + i = array.length; + } + + if (key) + { + low = array[i - 1][key]; + high = array[i][key]; + + return ((high - value) <= (value - low)) ? array[i] : array[i - 1]; + } + else + { + low = array[i - 1]; + high = array[i]; + + return ((high - value) <= (value - low)) ? high : low; + } +}; + +module.exports = FindClosestInSorted; + + +/***/ }), +/* 203 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); + +/** + * @classdesc + * A single frame in an Animation sequence. + * + * An AnimationFrame consists of a reference to the Texture it uses for rendering, references to other + * frames in the animation, and index data. It also has the ability to modify the animation timing. + * + * AnimationFrames are generated automatically by the Animation class. + * + * @class AnimationFrame + * @memberof Phaser.Animations + * @constructor + * @since 3.0.0 + * + * @param {string} textureKey - The key of the Texture this AnimationFrame uses. + * @param {(string|integer)} textureFrame - The key of the Frame within the Texture that this AnimationFrame uses. + * @param {integer} index - The index of this AnimationFrame within the Animation sequence. + * @param {Phaser.Textures.Frame} frame - A reference to the Texture Frame this AnimationFrame uses for rendering. + */ +var AnimationFrame = new Class({ + + initialize: + + function AnimationFrame (textureKey, textureFrame, index, frame) + { + /** + * The key of the Texture this AnimationFrame uses. + * + * @name Phaser.Animations.AnimationFrame#textureKey + * @type {string} + * @since 3.0.0 + */ + this.textureKey = textureKey; + + /** + * The key of the Frame within the Texture that this AnimationFrame uses. + * + * @name Phaser.Animations.AnimationFrame#textureFrame + * @type {(string|integer)} + * @since 3.0.0 + */ + this.textureFrame = textureFrame; + + /** + * The index of this AnimationFrame within the Animation sequence. + * + * @name Phaser.Animations.AnimationFrame#index + * @type {integer} + * @since 3.0.0 + */ + this.index = index; + + /** + * A reference to the Texture Frame this AnimationFrame uses for rendering. + * + * @name Phaser.Animations.AnimationFrame#frame + * @type {Phaser.Textures.Frame} + * @since 3.0.0 + */ + this.frame = frame; + + /** + * Is this the first frame in an animation sequence? + * + * @name Phaser.Animations.AnimationFrame#isFirst + * @type {boolean} + * @default false + * @readonly + * @since 3.0.0 + */ + this.isFirst = false; + + /** + * Is this the last frame in an animation sequence? + * + * @name Phaser.Animations.AnimationFrame#isLast + * @type {boolean} + * @default false + * @readonly + * @since 3.0.0 + */ + this.isLast = false; + + /** + * A reference to the AnimationFrame that comes before this one in the animation, if any. + * + * @name Phaser.Animations.AnimationFrame#prevFrame + * @type {?Phaser.Animations.AnimationFrame} + * @default null + * @readonly + * @since 3.0.0 + */ + this.prevFrame = null; + + /** + * A reference to the AnimationFrame that comes after this one in the animation, if any. + * + * @name Phaser.Animations.AnimationFrame#nextFrame + * @type {?Phaser.Animations.AnimationFrame} + * @default null + * @readonly + * @since 3.0.0 + */ + this.nextFrame = null; + + /** + * Additional time (in ms) that this frame should appear for during playback. + * The value is added onto the msPerFrame set by the animation. + * + * @name Phaser.Animations.AnimationFrame#duration + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.duration = 0; + + /** + * What % through the animation does this frame come? + * This value is generated when the animation is created and cached here. + * + * @name Phaser.Animations.AnimationFrame#progress + * @type {number} + * @default 0 + * @readonly + * @since 3.0.0 + */ + this.progress = 0; + }, + + /** + * Generates a JavaScript object suitable for converting to JSON. + * + * @method Phaser.Animations.AnimationFrame#toJSON + * @since 3.0.0 + * + * @return {Phaser.Types.Animations.JSONAnimationFrame} The AnimationFrame data. + */ + toJSON: function () + { + return { + key: this.textureKey, + frame: this.textureFrame, + duration: this.duration + }; + }, + + /** + * Destroys this object by removing references to external resources and callbacks. + * + * @method Phaser.Animations.AnimationFrame#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.frame = undefined; + } + +}); + +module.exports = AnimationFrame; + + +/***/ }), +/* 204 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var BlendModes = __webpack_require__(13); + +/** + * Provides methods used for setting the blend mode of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.BlendMode + * @since 3.0.0 + */ + +var BlendMode = { + + /** + * Private internal value. Holds the current blend mode. + * + * @name Phaser.GameObjects.Components.BlendMode#_blendMode + * @type {integer} + * @private + * @default 0 + * @since 3.0.0 + */ + _blendMode: BlendModes.NORMAL, + + /** + * 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: + * + * * 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. + * + * @name Phaser.GameObjects.Components.BlendMode#blendMode + * @type {(Phaser.BlendModes|string)} + * @since 3.0.0 + */ + blendMode: { + + get: function () + { + return this._blendMode; + }, + + set: function (value) + { + if (typeof value === 'string') + { + value = BlendModes[value]; + } + + value |= 0; + + if (value >= -1) + { + this._blendMode = value; + } + } + + }, + + /** + * 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: + * + * * 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. + * + * @method Phaser.GameObjects.Components.BlendMode#setBlendMode + * @since 3.0.0 + * + * @param {(string|Phaser.BlendModes)} value - The BlendMode value. Either a string or a CONST. + * + * @return {this} This Game Object instance. + */ + setBlendMode: function (value) + { + this.blendMode = value; + + return this; + } + +}; + +module.exports = BlendMode; + + +/***/ }), +/* 205 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for calculating and setting the size of a non-Frame based Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.ComputedSize + * @since 3.0.0 + */ + +var ComputedSize = { + + /** + * The native (un-scaled) width of this Game Object. + * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayWidth` property. + * + * @name Phaser.GameObjects.Components.ComputedSize#width + * @type {number} + * @since 3.0.0 + */ + width: 0, + + /** + * The native (un-scaled) height of this Game Object. + * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayHeight` property. + * + * @name Phaser.GameObjects.Components.ComputedSize#height + * @type {number} + * @since 3.0.0 + */ + height: 0, + + /** + * The displayed width of this Game Object. + * + * This value takes into account the scale factor. + * + * Setting this value will adjust the Game Object's scale property. + * + * @name Phaser.GameObjects.Components.ComputedSize#displayWidth + * @type {number} + * @since 3.0.0 + */ + displayWidth: { + + get: function () + { + return this.scaleX * this.width; + }, + + set: function (value) + { + this.scaleX = value / this.width; + } + + }, + + /** + * The displayed height of this Game Object. + * + * This value takes into account the scale factor. + * + * Setting this value will adjust the Game Object's scale property. + * + * @name Phaser.GameObjects.Components.ComputedSize#displayHeight + * @type {number} + * @since 3.0.0 + */ + displayHeight: { + + get: function () + { + return this.scaleY * this.height; + }, + + set: function (value) + { + this.scaleY = value / this.height; + } + + }, + + /** + * Sets the internal size of this Game Object, as used for frame or physics body creation. + * + * This will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or call the + * `setDisplaySize` method, which is the same thing as changing the scale but allows you + * to do so by giving pixel values. + * + * If you have enabled this Game Object for input, changing the size will _not_ change the + * size of the hit area. To do this you should adjust the `input.hitArea` object directly. + * + * @method Phaser.GameObjects.Components.ComputedSize#setSize + * @since 3.4.0 + * + * @param {number} width - The width of this Game Object. + * @param {number} height - The height of this Game Object. + * + * @return {this} This Game Object instance. + */ + setSize: function (width, height) + { + this.width = width; + this.height = height; + + return this; + }, + + /** + * Sets the display size of this Game Object. + * + * Calling this will adjust the scale. + * + * @method Phaser.GameObjects.Components.ComputedSize#setDisplaySize + * @since 3.4.0 + * + * @param {number} width - The width of this Game Object. + * @param {number} height - The height of this Game Object. + * + * @return {this} This Game Object instance. + */ + setDisplaySize: function (width, height) + { + this.displayWidth = width; + this.displayHeight = height; + + return this; + } + +}; + +module.exports = ComputedSize; + + +/***/ }), +/* 206 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for getting and setting the texture of a Game Object. + * + * @namespace Phaser.GameObjects.Components.Crop + * @since 3.12.0 + */ + +var Crop = { + + /** + * The Texture this Game Object is using to render with. + * + * @name Phaser.GameObjects.Components.Crop#texture + * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture} + * @since 3.0.0 + */ + texture: null, + + /** + * The Texture Frame this Game Object is using to render with. + * + * @name Phaser.GameObjects.Components.Crop#frame + * @type {Phaser.Textures.Frame} + * @since 3.0.0 + */ + frame: null, + + /** + * A boolean flag indicating if this Game Object is being cropped or not. + * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off. + * Equally, calling `setCrop` with no arguments will reset the crop and disable it. + * + * @name Phaser.GameObjects.Components.Crop#isCropped + * @type {boolean} + * @since 3.11.0 + */ + isCropped: false, + + /** + * Applies a crop to a texture based Game Object, such as a Sprite or Image. + * + * The crop is a rectangle that limits the area of the texture frame that is visible during rendering. + * + * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just + * changes what is shown when rendered. + * + * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left. + * + * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left + * half of it, you could call `setCrop(0, 0, 400, 600)`. + * + * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop + * an area of 200x100 when applied to a Game Object that had a scale factor of 2. + * + * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument. + * + * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`. + * + * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow + * the renderer to skip several internal calculations. + * + * @method Phaser.GameObjects.Components.Crop#setCrop + * @since 3.11.0 + * + * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored. + * @param {number} [y] - The y coordinate to start the crop from. + * @param {number} [width] - The width of the crop rectangle in pixels. + * @param {number} [height] - The height of the crop rectangle in pixels. + * + * @return {this} This Game Object instance. + */ + setCrop: function (x, y, width, height) + { + if (x === undefined) + { + this.isCropped = false; + } + else if (this.frame) + { + if (typeof x === 'number') + { + this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY); + } + else + { + var rect = x; + + this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY); + } + + this.isCropped = true; + } + + return this; + }, + + /** + * Internal method that returns a blank, well-formed crop object for use by a Game Object. + * + * @method Phaser.GameObjects.Components.Crop#resetCropObject + * @private + * @since 3.12.0 + * + * @return {object} The crop object. + */ + resetCropObject: function () + { + return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 }; + } + +}; + +module.exports = Crop; + + +/***/ }), +/* 207 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for setting the depth of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.Depth + * @since 3.0.0 + */ + +var Depth = { + + /** + * Private internal value. Holds the depth of the Game Object. + * + * @name Phaser.GameObjects.Components.Depth#_depth + * @type {integer} + * @private + * @default 0 + * @since 3.0.0 + */ + _depth: 0, + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The default depth is zero. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * + * @name Phaser.GameObjects.Components.Depth#depth + * @type {number} + * @since 3.0.0 + */ + depth: { + + get: function () + { + return this._depth; + }, + + set: function (value) + { + this.scene.sys.queueDepthSort(); + this._depth = value; + } + + }, + + /** + * The depth of this Game Object within the Scene. + * + * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order + * of Game Objects, without actually moving their position in the display list. + * + * The default depth is zero. A Game Object with a higher depth + * value will always render in front of one with a lower value. + * + * Setting the depth will queue a depth sort event within the Scene. + * + * @method Phaser.GameObjects.Components.Depth#setDepth + * @since 3.0.0 + * + * @param {integer} value - The depth of this Game Object. + * + * @return {this} This Game Object instance. + */ + setDepth: function (value) + { + if (value === undefined) { value = 0; } + + this.depth = value; + + return this; + } + +}; + +module.exports = Depth; + + +/***/ }), +/* 208 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for visually flipping a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.Flip + * @since 3.0.0 + */ + +var Flip = { + + /** + * The horizontally flipped state of the Game Object. + * + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + * + * @name Phaser.GameObjects.Components.Flip#flipX + * @type {boolean} + * @default false + * @since 3.0.0 + */ + flipX: false, + + /** + * The vertically flipped state of the Game Object. + * + * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + * + * @name Phaser.GameObjects.Components.Flip#flipY + * @type {boolean} + * @default false + * @since 3.0.0 + */ + flipY: false, + + /** + * Toggles the horizontal flipped state of this Game Object. + * + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + * + * @method Phaser.GameObjects.Components.Flip#toggleFlipX + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + toggleFlipX: function () + { + this.flipX = !this.flipX; + + return this; + }, + + /** + * Toggles the vertical flipped state of this Game Object. + * + * @method Phaser.GameObjects.Components.Flip#toggleFlipY + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + toggleFlipY: function () + { + this.flipY = !this.flipY; + + return this; + }, + + /** + * Sets the horizontal flipped state of this Game Object. + * + * A Game Object that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + * + * @method Phaser.GameObjects.Components.Flip#setFlipX + * @since 3.0.0 + * + * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped. + * + * @return {this} This Game Object instance. + */ + setFlipX: function (value) + { + this.flipX = value; + + return this; + }, + + /** + * Sets the vertical flipped state of this Game Object. + * + * @method Phaser.GameObjects.Components.Flip#setFlipY + * @since 3.0.0 + * + * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped. + * + * @return {this} This Game Object instance. + */ + setFlipY: function (value) + { + this.flipY = value; + + return this; + }, + + /** + * Sets the horizontal and vertical flipped state of this Game Object. + * + * A Game Object that is flipped will render inversed on the flipped axis. + * Flipping always takes place from the middle of the texture and does not impact the scale value. + * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. + * + * @method Phaser.GameObjects.Components.Flip#setFlip + * @since 3.0.0 + * + * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped. + * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped. + * + * @return {this} This Game Object instance. + */ + setFlip: function (x, y) + { + this.flipX = x; + this.flipY = y; + + return this; + }, + + /** + * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state. + * + * @method Phaser.GameObjects.Components.Flip#resetFlip + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + resetFlip: function () + { + this.flipX = false; + this.flipY = false; + + return this; + } + +}; + +module.exports = Flip; + + +/***/ }), +/* 209 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Rectangle = __webpack_require__(210); +var RotateAround = __webpack_require__(27); +var Vector2 = __webpack_require__(1); + +/** + * Provides methods used for obtaining the bounds of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.GetBounds + * @since 3.0.0 + */ + +var GetBounds = { + + /** + * Processes the bounds output vector before returning it. + * + * @method Phaser.GameObjects.Components.GetBounds#prepareBoundsOutput + * @private + * @since 3.18.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} output - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + prepareBoundsOutput: function (output, includeParent) + { + if (includeParent === undefined) { includeParent = false; } + + if (this.rotation !== 0) + { + RotateAround(output, this.x, this.y, this.rotation); + } + + if (includeParent && this.parentContainer) + { + var parentMatrix = this.parentContainer.getBoundsTransformMatrix(); + + parentMatrix.transformPoint(output.x, output.y, output); + } + + return output; + }, + + /** + * Gets the center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getCenter + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getCenter: function (output) + { + if (output === undefined) { output = new Vector2(); } + + output.x = this.x - (this.displayWidth * this.originX) + (this.displayWidth / 2); + output.y = this.y - (this.displayHeight * this.originY) + (this.displayHeight / 2); + + return output; + }, + + /** + * Gets the top-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getTopLeft + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getTopLeft: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = this.x - (this.displayWidth * this.originX); + output.y = this.y - (this.displayHeight * this.originY); + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the top-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getTopCenter + * @since 3.18.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getTopCenter: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2); + output.y = this.y - (this.displayHeight * this.originY); + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the top-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getTopRight + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getTopRight: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth; + output.y = this.y - (this.displayHeight * this.originY); + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the left-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getLeftCenter + * @since 3.18.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getLeftCenter: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = this.x - (this.displayWidth * this.originX); + output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2); + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the right-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getRightCenter + * @since 3.18.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getRightCenter: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth; + output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2); + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the bottom-left corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getBottomLeft + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getBottomLeft: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = this.x - (this.displayWidth * this.originX); + output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight; + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the bottom-center coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getBottomCenter + * @since 3.18.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getBottomCenter: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2); + output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight; + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the bottom-right corner coordinate of this Game Object, regardless of origin. + * The returned point is calculated in local space and does not factor in any parent containers + * + * @method Phaser.GameObjects.Components.GetBounds#getBottomRight + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [output,$return] + * + * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created. + * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector? + * + * @return {(Phaser.Math.Vector2|object)} The values stored in the output object. + */ + getBottomRight: function (output, includeParent) + { + if (!output) { output = new Vector2(); } + + output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth; + output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight; + + return this.prepareBoundsOutput(output, includeParent); + }, + + /** + * Gets the bounds of this Game Object, regardless of origin. + * The values are stored and returned in a Rectangle, or Rectangle-like, object. + * + * @method Phaser.GameObjects.Components.GetBounds#getBounds + * @since 3.0.0 + * + * @generic {Phaser.Geom.Rectangle} O - [output,$return] + * + * @param {(Phaser.Geom.Rectangle|object)} [output] - An object to store the values in. If not provided a new Rectangle will be created. + * + * @return {(Phaser.Geom.Rectangle|object)} The values stored in the output object. + */ + getBounds: function (output) + { + if (output === undefined) { output = new Rectangle(); } + + // We can use the output object to temporarily store the x/y coords in: + + var TLx, TLy, TRx, TRy, BLx, BLy, BRx, BRy; + + // Instead of doing a check if parent container is + // defined per corner we only do it once. + if (this.parentContainer) + { + var parentMatrix = this.parentContainer.getBoundsTransformMatrix(); + + this.getTopLeft(output); + parentMatrix.transformPoint(output.x, output.y, output); + + TLx = output.x; + TLy = output.y; + + this.getTopRight(output); + parentMatrix.transformPoint(output.x, output.y, output); + + TRx = output.x; + TRy = output.y; + + this.getBottomLeft(output); + parentMatrix.transformPoint(output.x, output.y, output); + + BLx = output.x; + BLy = output.y; + + this.getBottomRight(output); + parentMatrix.transformPoint(output.x, output.y, output); + + BRx = output.x; + BRy = output.y; + } + else + { + this.getTopLeft(output); + + TLx = output.x; + TLy = output.y; + + this.getTopRight(output); + + TRx = output.x; + TRy = output.y; + + this.getBottomLeft(output); + + BLx = output.x; + BLy = output.y; + + this.getBottomRight(output); + + BRx = output.x; + BRy = output.y; + } + + output.x = Math.min(TLx, TRx, BLx, BRx); + output.y = Math.min(TLy, TRy, BLy, BRy); + output.width = Math.max(TLx, TRx, BLx, BRx) - output.x; + output.height = Math.max(TLy, TRy, BLy, BRy) - output.y; + + return output; + } + +}; + +module.exports = GetBounds; + + +/***/ }), +/* 210 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var Contains = __webpack_require__(211); +var GetPoint = __webpack_require__(39); +var GetPoints = __webpack_require__(212); +var GEOM_CONST = __webpack_require__(12); +var Line = __webpack_require__(213); +var Random = __webpack_require__(218); + +/** + * @classdesc + * Encapsulates a 2D rectangle defined by its corner point in the top-left and its extends in x (width) and y (height) + * + * @class Rectangle + * @memberof Phaser.Geom + * @constructor + * @since 3.0.0 + * + * @param {number} [x=0] - The X coordinate of the top left corner of the Rectangle. + * @param {number} [y=0] - The Y coordinate of the top left corner of the Rectangle. + * @param {number} [width=0] - The width of the Rectangle. + * @param {number} [height=0] - The height of the Rectangle. + */ +var Rectangle = new Class({ + + initialize: + + function Rectangle (x, y, width, height) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + if (width === undefined) { width = 0; } + if (height === undefined) { height = 0; } + + /** + * The geometry constant type of this object: `GEOM_CONST.RECTANGLE`. + * Used for fast type comparisons. + * + * @name Phaser.Geom.Rectangle#type + * @type {integer} + * @readonly + * @since 3.19.0 + */ + this.type = GEOM_CONST.RECTANGLE; + + /** + * The X coordinate of the top left corner of the Rectangle. + * + * @name Phaser.Geom.Rectangle#x + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.x = x; + + /** + * The Y coordinate of the top left corner of the Rectangle. + * + * @name Phaser.Geom.Rectangle#y + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.y = y; + + /** + * The width of the Rectangle, i.e. the distance between its left side (defined by `x`) and its right side. + * + * @name Phaser.Geom.Rectangle#width + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.width = width; + + /** + * The height of the Rectangle, i.e. the distance between its top side (defined by `y`) and its bottom side. + * + * @name Phaser.Geom.Rectangle#height + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.height = height; + }, + + /** + * Checks if the given point is inside the Rectangle's bounds. + * + * @method Phaser.Geom.Rectangle#contains + * @since 3.0.0 + * + * @param {number} x - The X coordinate of the point to check. + * @param {number} y - The Y coordinate of the point to check. + * + * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`. + */ + contains: function (x, y) + { + return Contains(this, x, y); + }, + + /** + * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter. + * + * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is. + * + * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side. + * + * @method Phaser.Geom.Rectangle#getPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [output,$return] + * + * @param {number} position - The normalized distance into the Rectangle's perimeter to return. + * @param {(Phaser.Geom.Point|object)} [output] - An object to update with the `x` and `y` coordinates of the point. + * + * @return {(Phaser.Geom.Point|object)} The updated `output` object, or a new Point if no `output` object was given. + */ + getPoint: function (position, output) + { + return GetPoint(this, position, output); + }, + + /** + * Returns an array of points from the perimeter of the Rectangle, each spaced out based on the quantity or step required. + * + * @method Phaser.Geom.Rectangle#getPoints + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point[]} O - [output,$return] + * + * @param {integer} quantity - The number of points to return. Set to `false` or 0 to return an arbitrary number of points (`perimeter / stepRate`) evenly spaced around the Rectangle based on the `stepRate`. + * @param {number} [stepRate] - If `quantity` is 0, determines the normalized distance between each returned point. + * @param {(array|Phaser.Geom.Point[])} [output] - An array to which to append the points. + * + * @return {(array|Phaser.Geom.Point[])} The modified `output` array, or a new array if none was provided. + */ + getPoints: function (quantity, stepRate, output) + { + return GetPoints(this, quantity, stepRate, output); + }, + + /** + * Returns a random point within the Rectangle's bounds. + * + * @method Phaser.Geom.Rectangle#getRandomPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [point,$return] + * + * @param {Phaser.Geom.Point} [point] - The object in which to store the `x` and `y` coordinates of the point. + * + * @return {Phaser.Geom.Point} The updated `point`, or a new Point if none was provided. + */ + getRandomPoint: function (point) + { + return Random(this, point); + }, + + /** + * Sets the position, width, and height of the Rectangle. + * + * @method Phaser.Geom.Rectangle#setTo + * @since 3.0.0 + * + * @param {number} x - The X coordinate of the top left corner of the Rectangle. + * @param {number} y - The Y coordinate of the top left corner of the Rectangle. + * @param {number} width - The width of the Rectangle. + * @param {number} height - The height of the Rectangle. + * + * @return {this} This Rectangle object. + */ + setTo: function (x, y, width, height) + { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + + return this; + }, + + /** + * Resets the position, width, and height of the Rectangle to 0. + * + * @method Phaser.Geom.Rectangle#setEmpty + * @since 3.0.0 + * + * @return {this} This Rectangle object. + */ + setEmpty: function () + { + return this.setTo(0, 0, 0, 0); + }, + + /** + * Sets the position of the Rectangle. + * + * @method Phaser.Geom.Rectangle#setPosition + * @since 3.0.0 + * + * @param {number} x - The X coordinate of the top left corner of the Rectangle. + * @param {number} [y=x] - The Y coordinate of the top left corner of the Rectangle. + * + * @return {this} This Rectangle object. + */ + setPosition: function (x, y) + { + if (y === undefined) { y = x; } + + this.x = x; + this.y = y; + + return this; + }, + + /** + * Sets the width and height of the Rectangle. + * + * @method Phaser.Geom.Rectangle#setSize + * @since 3.0.0 + * + * @param {number} width - The width to set the Rectangle to. + * @param {number} [height=width] - The height to set the Rectangle to. + * + * @return {this} This Rectangle object. + */ + setSize: function (width, height) + { + if (height === undefined) { height = width; } + + this.width = width; + this.height = height; + + return this; + }, + + /** + * Determines if the Rectangle is empty. A Rectangle is empty if its width or height is less than or equal to 0. + * + * @method Phaser.Geom.Rectangle#isEmpty + * @since 3.0.0 + * + * @return {boolean} `true` if the Rectangle is empty. A Rectangle object is empty if its width or height is less than or equal to 0. + */ + isEmpty: function () + { + return (this.width <= 0 || this.height <= 0); + }, + + /** + * Returns a Line object that corresponds to the top of this Rectangle. + * + * @method Phaser.Geom.Rectangle#getLineA + * @since 3.0.0 + * + * @generic {Phaser.Geom.Line} O - [line,$return] + * + * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created. + * + * @return {Phaser.Geom.Line} A Line object that corresponds to the top of this Rectangle. + */ + getLineA: function (line) + { + if (line === undefined) { line = new Line(); } + + line.setTo(this.x, this.y, this.right, this.y); + + return line; + }, + + /** + * Returns a Line object that corresponds to the right of this Rectangle. + * + * @method Phaser.Geom.Rectangle#getLineB + * @since 3.0.0 + * + * @generic {Phaser.Geom.Line} O - [line,$return] + * + * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created. + * + * @return {Phaser.Geom.Line} A Line object that corresponds to the right of this Rectangle. + */ + getLineB: function (line) + { + if (line === undefined) { line = new Line(); } + + line.setTo(this.right, this.y, this.right, this.bottom); + + return line; + }, + + /** + * Returns a Line object that corresponds to the bottom of this Rectangle. + * + * @method Phaser.Geom.Rectangle#getLineC + * @since 3.0.0 + * + * @generic {Phaser.Geom.Line} O - [line,$return] + * + * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created. + * + * @return {Phaser.Geom.Line} A Line object that corresponds to the bottom of this Rectangle. + */ + getLineC: function (line) + { + if (line === undefined) { line = new Line(); } + + line.setTo(this.right, this.bottom, this.x, this.bottom); + + return line; + }, + + /** + * Returns a Line object that corresponds to the left of this Rectangle. + * + * @method Phaser.Geom.Rectangle#getLineD + * @since 3.0.0 + * + * @generic {Phaser.Geom.Line} O - [line,$return] + * + * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created. + * + * @return {Phaser.Geom.Line} A Line object that corresponds to the left of this Rectangle. + */ + getLineD: function (line) + { + if (line === undefined) { line = new Line(); } + + line.setTo(this.x, this.bottom, this.x, this.y); + + return line; + }, + + /** + * The x coordinate of the left of the Rectangle. + * Changing the left property of a Rectangle object has no effect on the y and height properties. However it does affect the width property, whereas changing the x value does not affect the width property. + * + * @name Phaser.Geom.Rectangle#left + * @type {number} + * @since 3.0.0 + */ + left: { + + get: function () + { + return this.x; + }, + + set: function (value) + { + if (value >= this.right) + { + this.width = 0; + } + else + { + this.width = this.right - value; + } + + this.x = value; + } + + }, + + /** + * The sum of the x and width properties. + * Changing the right property of a Rectangle object has no effect on the x, y and height properties, however it does affect the width property. + * + * @name Phaser.Geom.Rectangle#right + * @type {number} + * @since 3.0.0 + */ + right: { + + get: function () + { + return this.x + this.width; + }, + + set: function (value) + { + if (value <= this.x) + { + this.width = 0; + } + else + { + this.width = value - this.x; + } + } + + }, + + /** + * The y coordinate of the top of the Rectangle. Changing the top property of a Rectangle object has no effect on the x and width properties. + * However it does affect the height property, whereas changing the y value does not affect the height property. + * + * @name Phaser.Geom.Rectangle#top + * @type {number} + * @since 3.0.0 + */ + top: { + + get: function () + { + return this.y; + }, + + set: function (value) + { + if (value >= this.bottom) + { + this.height = 0; + } + else + { + this.height = (this.bottom - value); + } + + this.y = value; + } + + }, + + /** + * The sum of the y and height properties. + * Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property. + * + * @name Phaser.Geom.Rectangle#bottom + * @type {number} + * @since 3.0.0 + */ + bottom: { + + get: function () + { + return this.y + this.height; + }, + + set: function (value) + { + if (value <= this.y) + { + this.height = 0; + } + else + { + this.height = value - this.y; + } + } + + }, + + /** + * The x coordinate of the center of the Rectangle. + * + * @name Phaser.Geom.Rectangle#centerX + * @type {number} + * @since 3.0.0 + */ + centerX: { + + get: function () + { + return this.x + (this.width / 2); + }, + + set: function (value) + { + this.x = value - (this.width / 2); + } + + }, + + /** + * The y coordinate of the center of the Rectangle. + * + * @name Phaser.Geom.Rectangle#centerY + * @type {number} + * @since 3.0.0 + */ + centerY: { + + get: function () + { + return this.y + (this.height / 2); + }, + + set: function (value) + { + this.y = value - (this.height / 2); + } + + } + +}); + +module.exports = Rectangle; + + +/***/ }), +/* 211 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Checks if a given point is inside a Rectangle's bounds. + * + * @function Phaser.Geom.Rectangle.Contains + * @since 3.0.0 + * + * @param {Phaser.Geom.Rectangle} rect - The Rectangle to check. + * @param {number} x - The X coordinate of the point to check. + * @param {number} y - The Y coordinate of the point to check. + * + * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`. + */ +var Contains = function (rect, x, y) +{ + if (rect.width <= 0 || rect.height <= 0) + { + return false; + } + + return (rect.x <= x && rect.x + rect.width >= x && rect.y <= y && rect.y + rect.height >= y); +}; + +module.exports = Contains; + + +/***/ }), +/* 212 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetPoint = __webpack_require__(39); +var Perimeter = __webpack_require__(40); + +// 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. + * + * @function Phaser.Geom.Rectangle.GetPoints + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point[]} O - [out,$return] + * + * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle object to get the points from. + * @param {number} step - Step between points. Used to calculate the number of points to return when quantity is falsey. Ignored if quantity is positive. + * @param {integer} quantity - The number of evenly spaced points from the rectangles perimeter to return. If falsey, step param will be used to calculate the number of points. + * @param {(array|Phaser.Geom.Point[])} [out] - An optional array to store the points in. + * + * @return {(array|Phaser.Geom.Point[])} An array of Points from the perimeter of the rectangle. + */ +var GetPoints = function (rectangle, quantity, stepRate, out) +{ + if (out === undefined) { out = []; } + + // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. + if (!quantity && stepRate > 0) + { + quantity = Perimeter(rectangle) / stepRate; + } + + for (var i = 0; i < quantity; i++) + { + var position = i / quantity; + + out.push(GetPoint(rectangle, position)); + } + + return out; +}; + +module.exports = GetPoints; + + +/***/ }), +/* 213 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var GetPoint = __webpack_require__(214); +var GetPoints = __webpack_require__(215); +var GEOM_CONST = __webpack_require__(12); +var Random = __webpack_require__(217); +var Vector2 = __webpack_require__(1); + +/** + * @classdesc + * Defines a Line segment, a part of a line between two endpoints. + * + * @class Line + * @memberof Phaser.Geom + * @constructor + * @since 3.0.0 + * + * @param {number} [x1=0] - The x coordinate of the lines starting point. + * @param {number} [y1=0] - The y coordinate of the lines starting point. + * @param {number} [x2=0] - The x coordinate of the lines ending point. + * @param {number} [y2=0] - The y coordinate of the lines ending point. + */ +var Line = new Class({ + + initialize: + + function Line (x1, y1, x2, y2) + { + if (x1 === undefined) { x1 = 0; } + if (y1 === undefined) { y1 = 0; } + if (x2 === undefined) { x2 = 0; } + if (y2 === undefined) { y2 = 0; } + + /** + * The geometry constant type of this object: `GEOM_CONST.LINE`. + * Used for fast type comparisons. + * + * @name Phaser.Geom.Line#type + * @type {integer} + * @readonly + * @since 3.19.0 + */ + this.type = GEOM_CONST.LINE; + + /** + * The x coordinate of the lines starting point. + * + * @name Phaser.Geom.Line#x1 + * @type {number} + * @since 3.0.0 + */ + this.x1 = x1; + + /** + * The y coordinate of the lines starting point. + * + * @name Phaser.Geom.Line#y1 + * @type {number} + * @since 3.0.0 + */ + this.y1 = y1; + + /** + * The x coordinate of the lines ending point. + * + * @name Phaser.Geom.Line#x2 + * @type {number} + * @since 3.0.0 + */ + this.x2 = x2; + + /** + * The y coordinate of the lines ending point. + * + * @name Phaser.Geom.Line#y2 + * @type {number} + * @since 3.0.0 + */ + this.y2 = y2; + }, + + /** + * Get a point on a line that's a given percentage along its length. + * + * @method Phaser.Geom.Line#getPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [output,$return] + * + * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line. + * @param {(Phaser.Geom.Point|object)} [output] - An optional point, or point-like object, to store the coordinates of the point on the line. + * + * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point on the line. + */ + getPoint: function (position, output) + { + return GetPoint(this, position, output); + }, + + /** + * Get a number of points along a line's length. + * + * Provide a `quantity` to get an exact number of points along the line. + * + * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when + * providing a `stepRate`. + * + * @method Phaser.Geom.Line#getPoints + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point[]} O - [output,$return] + * + * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead. + * @param {integer} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`. + * @param {(array|Phaser.Geom.Point[])} [output] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line. + * + * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line. + */ + getPoints: function (quantity, stepRate, output) + { + return GetPoints(this, quantity, stepRate, output); + }, + + /** + * Get a random Point on the Line. + * + * @method Phaser.Geom.Line#getRandomPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [point,$return] + * + * @param {(Phaser.Geom.Point|object)} [point] - An instance of a Point to be modified. + * + * @return {Phaser.Geom.Point} A random Point on the Line. + */ + getRandomPoint: function (point) + { + return Random(this, point); + }, + + /** + * Set new coordinates for the line endpoints. + * + * @method Phaser.Geom.Line#setTo + * @since 3.0.0 + * + * @param {number} [x1=0] - The x coordinate of the lines starting point. + * @param {number} [y1=0] - The y coordinate of the lines starting point. + * @param {number} [x2=0] - The x coordinate of the lines ending point. + * @param {number} [y2=0] - The y coordinate of the lines ending point. + * + * @return {this} This Line object. + */ + setTo: function (x1, y1, x2, y2) + { + if (x1 === undefined) { x1 = 0; } + if (y1 === undefined) { y1 = 0; } + if (x2 === undefined) { x2 = 0; } + if (y2 === undefined) { y2 = 0; } + + this.x1 = x1; + this.y1 = y1; + + this.x2 = x2; + this.y2 = y2; + + return this; + }, + + /** + * Returns a Vector2 object that corresponds to the start of this Line. + * + * @method Phaser.Geom.Line#getPointA + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [vec2,$return] + * + * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created. + * + * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the start of this Line. + */ + getPointA: function (vec2) + { + if (vec2 === undefined) { vec2 = new Vector2(); } + + vec2.set(this.x1, this.y1); + + return vec2; + }, + + /** + * Returns a Vector2 object that corresponds to the end of this Line. + * + * @method Phaser.Geom.Line#getPointB + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [vec2,$return] + * + * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created. + * + * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the end of this Line. + */ + getPointB: function (vec2) + { + if (vec2 === undefined) { vec2 = new Vector2(); } + + vec2.set(this.x2, this.y2); + + return vec2; + }, + + /** + * The left position of the Line. + * + * @name Phaser.Geom.Line#left + * @type {number} + * @since 3.0.0 + */ + left: { + + get: function () + { + return Math.min(this.x1, this.x2); + }, + + set: function (value) + { + if (this.x1 <= this.x2) + { + this.x1 = value; + } + else + { + this.x2 = value; + } + } + + }, + + /** + * The right position of the Line. + * + * @name Phaser.Geom.Line#right + * @type {number} + * @since 3.0.0 + */ + right: { + + get: function () + { + return Math.max(this.x1, this.x2); + }, + + set: function (value) + { + if (this.x1 > this.x2) + { + this.x1 = value; + } + else + { + this.x2 = value; + } + } + + }, + + /** + * The top position of the Line. + * + * @name Phaser.Geom.Line#top + * @type {number} + * @since 3.0.0 + */ + top: { + + get: function () + { + return Math.min(this.y1, this.y2); + }, + + set: function (value) + { + if (this.y1 <= this.y2) + { + this.y1 = value; + } + else + { + this.y2 = value; + } + } + + }, + + /** + * The bottom position of the Line. + * + * @name Phaser.Geom.Line#bottom + * @type {number} + * @since 3.0.0 + */ + bottom: { + + get: function () + { + return Math.max(this.y1, this.y2); + }, + + set: function (value) + { + if (this.y1 > this.y2) + { + this.y1 = value; + } + else + { + this.y2 = value; + } + } + + } + +}); + +module.exports = Line; + + +/***/ }), +/* 214 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Point = __webpack_require__(5); + +/** + * Get a point on a line that's a given percentage along its length. + * + * @function Phaser.Geom.Line.GetPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [out,$return] + * + * @param {Phaser.Geom.Line} line - The line. + * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line. + * @param {(Phaser.Geom.Point|object)} [out] - An optional point, or point-like object, to store the coordinates of the point on the line. + * + * @return {(Phaser.Geom.Point|object)} The point on the line. + */ +var GetPoint = function (line, position, out) +{ + if (out === undefined) { out = new Point(); } + + out.x = line.x1 + (line.x2 - line.x1) * position; + out.y = line.y1 + (line.y2 - line.y1) * position; + + return out; +}; + +module.exports = GetPoint; + + +/***/ }), +/* 215 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Length = __webpack_require__(216); +var Point = __webpack_require__(5); + +/** + * Get a number of points along a line's length. + * + * Provide a `quantity` to get an exact number of points along the line. + * + * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when + * providing a `stepRate`. + * + * @function Phaser.Geom.Line.GetPoints + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point[]} O - [out,$return] + * + * @param {Phaser.Geom.Line} line - The line. + * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead. + * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`. + * @param {(array|Phaser.Geom.Point[])} [out] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line. + * + * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line. + */ +var GetPoints = function (line, quantity, stepRate, out) +{ + if (out === undefined) { out = []; } + + // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. + if (!quantity && stepRate > 0) + { + quantity = Length(line) / stepRate; + } + + var x1 = line.x1; + var y1 = line.y1; + + var x2 = line.x2; + var y2 = line.y2; + + for (var i = 0; i < quantity; i++) + { + var position = i / quantity; + + var x = x1 + (x2 - x1) * position; + var y = y1 + (y2 - y1) * position; + + out.push(new Point(x, y)); + } + + return out; +}; + +module.exports = GetPoints; + + +/***/ }), +/* 216 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate the length of the given line. + * + * @function Phaser.Geom.Line.Length + * @since 3.0.0 + * + * @param {Phaser.Geom.Line} line - The line to calculate the length of. + * + * @return {number} The length of the line. + */ +var Length = function (line) +{ + return Math.sqrt((line.x2 - line.x1) * (line.x2 - line.x1) + (line.y2 - line.y1) * (line.y2 - line.y1)); +}; + +module.exports = Length; + + +/***/ }), +/* 217 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Point = __webpack_require__(5); + +/** + * Returns a random point on a given Line. + * + * @function Phaser.Geom.Line.Random + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [out,$return] + * + * @param {Phaser.Geom.Line} line - The Line to calculate the random Point on. + * @param {(Phaser.Geom.Point|object)} [out] - An instance of a Point to be modified. + * + * @return {(Phaser.Geom.Point|object)} A random Point on the Line. + */ +var Random = function (line, out) +{ + if (out === undefined) { out = new Point(); } + + var t = Math.random(); + + out.x = line.x1 + t * (line.x2 - line.x1); + out.y = line.y1 + t * (line.y2 - line.y1); + + return out; +}; + +module.exports = Random; + + +/***/ }), +/* 218 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Point = __webpack_require__(5); + +/** + * Returns a random point within a Rectangle. + * + * @function Phaser.Geom.Rectangle.Random + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [out,$return] + * + * @param {Phaser.Geom.Rectangle} rect - The Rectangle to return a point from. + * @param {Phaser.Geom.Point} out - The object to update with the point's coordinates. + * + * @return {Phaser.Geom.Point} The modified `out` object, or a new Point if none was provided. + */ +var Random = function (rect, out) +{ + if (out === undefined) { out = new Point(); } + + out.x = rect.x + (Math.random() * rect.width); + out.y = rect.y + (Math.random() * rect.height); + + return out; +}; + +module.exports = Random; + + +/***/ }), +/* 219 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var BitmapMask = __webpack_require__(220); +var GeometryMask = __webpack_require__(238); + +/** + * Provides methods used for getting and setting the mask of a Game Object. + * + * @namespace Phaser.GameObjects.Components.Mask + * @since 3.0.0 + */ + +var Mask = { + + /** + * The Mask this Game Object is using during render. + * + * @name Phaser.GameObjects.Components.Mask#mask + * @type {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask} + * @since 3.0.0 + */ + mask: null, + + /** + * 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. + * + * 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. + * + * 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. + * + * @method Phaser.GameObjects.Components.Mask#setMask + * @since 3.6.2 + * + * @param {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask} mask - The mask this Game Object will use when rendering. + * + * @return {this} This Game Object instance. + */ + setMask: function (mask) + { + this.mask = mask; + + return this; + }, + + /** + * Clears the mask that this Game Object was using. + * + * @method Phaser.GameObjects.Components.Mask#clearMask + * @since 3.6.2 + * + * @param {boolean} [destroyMask=false] - Destroy the mask before clearing it? + * + * @return {this} This Game Object instance. + */ + clearMask: function (destroyMask) + { + if (destroyMask === undefined) { destroyMask = false; } + + if (destroyMask && this.mask) + { + this.mask.destroy(); + } + + this.mask = null; + + return this; + }, + + /** + * Creates and returns a Bitmap 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 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 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 Game Object. + * + * @method Phaser.GameObjects.Components.Mask#createBitmapMask + * @since 3.6.2 + * + * @param {Phaser.GameObjects.GameObject} [renderable] - A renderable Game Object that uses a texture, such as a Sprite. + * + * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created. + */ + createBitmapMask: function (renderable) + { + if (renderable === undefined && (this.texture || this.shader)) + { + // eslint-disable-next-line consistent-this + renderable = this; + } + + return new BitmapMask(this.scene, renderable); + }, + + /** + * 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. + * + * This means you can call this method to create a Geometry Mask from any Graphics Game Object. + * + * @method Phaser.GameObjects.Components.Mask#createGeometryMask + * @since 3.6.2 + * + * @param {Phaser.GameObjects.Graphics} [graphics] - A Graphics Game Object. The geometry within it will be used as the mask. + * + * @return {Phaser.Display.Masks.GeometryMask} This Geometry Mask that was created. + */ + createGeometryMask: function (graphics) + { + if (graphics === undefined && this.type === 'Graphics') + { + // eslint-disable-next-line consistent-this + graphics = this; + } + + return new GeometryMask(this.scene, graphics); + } + +}; + +module.exports = Mask; + + +/***/ }), +/* 220 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var GameEvents = __webpack_require__(221); + +/** + * @classdesc + * A Bitmap Mask combines the alpha (opacity) of a masked pixel with the alpha of another pixel. + * Unlike the Geometry Mask, which is a clipping path, a Bitmap Mask behaves like an alpha mask, + * not a clipping path. It is only available when using the WebGL Renderer. + * + * A Bitmap Mask can use any Game Object to determine the alpha of each pixel of the masked Game Object(s). + * For any given point of a masked Game Object's texture, the pixel's alpha will be multiplied by the alpha + * of the pixel at the same position in the Bitmap Mask's Game Object. The color of the pixel from the + * Bitmap Mask doesn't matter. + * + * For example, if a pure blue pixel with an alpha of 0.95 is masked with a pure red pixel with an + * alpha of 0.5, the resulting pixel will be pure blue with an alpha of 0.475. Naturally, this means + * that a pixel in the mask with an alpha of 0 will hide the corresponding pixel in all masked Game Objects + * A pixel with an alpha of 1 in the masked Game Object will receive the same alpha as the + * corresponding pixel in the mask. + * + * The Bitmap Mask's location matches the location of its Game Object, not the location of the + * masked objects. Moving or transforming the underlying Game Object will change the mask + * (and affect the visibility of any masked objects), whereas moving or transforming a masked object + * will not affect the mask. + * + * The Bitmap Mask will not render its Game Object by itself. If the Game Object is not in a + * Scene's display list, it will only be used for the mask and its full texture will not be directly + * visible. Adding the underlying Game Object to a Scene will not cause any problems - it will + * render as a normal Game Object and will also serve as a mask. + * + * @class BitmapMask + * @memberof Phaser.Display.Masks + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - The Scene which this Bitmap Mask will be used in. + * @param {Phaser.GameObjects.GameObject} renderable - A renderable Game Object that uses a texture, such as a Sprite. + */ +var BitmapMask = new Class({ + + initialize: + + function BitmapMask (scene, renderable) + { + var renderer = scene.sys.game.renderer; + + /** + * A reference to either the Canvas or WebGL Renderer that this Mask is using. + * + * @name Phaser.Display.Masks.BitmapMask#renderer + * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} + * @since 3.11.0 + */ + this.renderer = renderer; + + /** + * A renderable Game Object that uses a texture, such as a Sprite. + * + * @name Phaser.Display.Masks.BitmapMask#bitmapMask + * @type {Phaser.GameObjects.GameObject} + * @since 3.0.0 + */ + this.bitmapMask = renderable; + + /** + * The texture used for the mask's framebuffer. + * + * @name Phaser.Display.Masks.BitmapMask#maskTexture + * @type {WebGLTexture} + * @default null + * @since 3.0.0 + */ + this.maskTexture = null; + + /** + * The texture used for the main framebuffer. + * + * @name Phaser.Display.Masks.BitmapMask#mainTexture + * @type {WebGLTexture} + * @default null + * @since 3.0.0 + */ + this.mainTexture = null; + + /** + * Whether the Bitmap Mask is dirty and needs to be updated. + * + * @name Phaser.Display.Masks.BitmapMask#dirty + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.dirty = true; + + /** + * The framebuffer to which a masked Game Object is rendered. + * + * @name Phaser.Display.Masks.BitmapMask#mainFramebuffer + * @type {WebGLFramebuffer} + * @since 3.0.0 + */ + this.mainFramebuffer = null; + + /** + * The framebuffer to which the Bitmap Mask's masking Game Object is rendered. + * + * @name Phaser.Display.Masks.BitmapMask#maskFramebuffer + * @type {WebGLFramebuffer} + * @since 3.0.0 + */ + this.maskFramebuffer = null; + + /** + * The previous framebuffer set in the renderer before this one was enabled. + * + * @name Phaser.Display.Masks.BitmapMask#prevFramebuffer + * @type {WebGLFramebuffer} + * @since 3.17.0 + */ + this.prevFramebuffer = null; + + /** + * Whether to invert the masks alpha. + * + * If `true`, the alpha of the masking pixel will be inverted before it's multiplied with the masked pixel. Essentially, this means that a masked area will be visible only if the corresponding area in the mask is invisible. + * + * @name Phaser.Display.Masks.BitmapMask#invertAlpha + * @type {boolean} + * @since 3.1.2 + */ + this.invertAlpha = false; + + /** + * Is this mask a stencil mask? + * + * @name Phaser.Display.Masks.BitmapMask#isStencil + * @type {boolean} + * @readonly + * @since 3.17.0 + */ + this.isStencil = false; + + if (renderer && renderer.gl) + { + var width = renderer.width; + var height = renderer.height; + var pot = ((width & (width - 1)) === 0 && (height & (height - 1)) === 0); + var gl = renderer.gl; + var wrap = pot ? gl.REPEAT : gl.CLAMP_TO_EDGE; + var filter = gl.LINEAR; + + this.mainTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height); + this.maskTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height); + this.mainFramebuffer = renderer.createFramebuffer(width, height, this.mainTexture, true); + this.maskFramebuffer = renderer.createFramebuffer(width, height, this.maskTexture, true); + + scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, function (renderer) + { + var width = renderer.width; + var height = renderer.height; + var pot = ((width & (width - 1)) === 0 && (height & (height - 1)) === 0); + var gl = renderer.gl; + var wrap = pot ? gl.REPEAT : gl.CLAMP_TO_EDGE; + var filter = gl.LINEAR; + + this.mainTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height); + this.maskTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height); + this.mainFramebuffer = renderer.createFramebuffer(width, height, this.mainTexture, true); + this.maskFramebuffer = renderer.createFramebuffer(width, height, this.maskTexture, true); + + }, this); + } + }, + + /** + * Sets a new masking Game Object for the Bitmap Mask. + * + * @method Phaser.Display.Masks.BitmapMask#setBitmap + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} renderable - A renderable Game Object that uses a texture, such as a Sprite. + */ + setBitmap: function (renderable) + { + this.bitmapMask = renderable; + }, + + /** + * Prepares the WebGL Renderer to render a Game Object with this mask applied. + * + * This renders the masking Game Object to the mask framebuffer and switches to the main framebuffer so that the masked Game Object will be rendered to it instead of being rendered directly to the frame. + * + * @method Phaser.Display.Masks.BitmapMask#preRenderWebGL + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to prepare. + * @param {Phaser.GameObjects.GameObject} maskedObject - The masked Game Object which will be drawn. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to. + */ + preRenderWebGL: function (renderer, maskedObject, camera) + { + renderer.pipelines.BitmapMaskPipeline.beginMask(this, maskedObject, camera); + }, + + /** + * Finalizes rendering of a masked Game Object. + * + * This resets the previously bound framebuffer and switches the WebGL Renderer to the Bitmap Mask Pipeline, which uses a special fragment shader to apply the masking effect. + * + * @method Phaser.Display.Masks.BitmapMask#postRenderWebGL + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to clean up. + */ + postRenderWebGL: function (renderer, camera) + { + renderer.pipelines.BitmapMaskPipeline.endMask(this, camera); + }, + + /** + * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer. + * + * @method Phaser.Display.Masks.BitmapMask#preRenderCanvas + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to. + * @param {Phaser.GameObjects.GameObject} mask - The masked Game Object which would be rendered. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to. + */ + preRenderCanvas: function () + { + // NOOP + }, + + /** + * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer. + * + * @method Phaser.Display.Masks.BitmapMask#postRenderCanvas + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to. + */ + postRenderCanvas: function () + { + // NOOP + }, + + /** + * Destroys this BitmapMask and nulls any references it holds. + * + * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it, + * so be sure to call `clearMask` on any Game Object using it, before destroying it. + * + * @method Phaser.Display.Masks.BitmapMask#destroy + * @since 3.7.0 + */ + destroy: function () + { + this.bitmapMask = null; + + var renderer = this.renderer; + + if (renderer && renderer.gl) + { + renderer.deleteTexture(this.mainTexture); + renderer.deleteTexture(this.maskTexture); + renderer.deleteFramebuffer(this.mainFramebuffer); + renderer.deleteFramebuffer(this.maskFramebuffer); + } + + this.mainTexture = null; + this.maskTexture = null; + this.mainFramebuffer = null; + this.maskFramebuffer = null; + this.prevFramebuffer = null; + this.renderer = null; + } + +}); + +module.exports = BitmapMask; + + +/***/ }), +/* 221 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Core.Events + */ + +module.exports = { + + BLUR: __webpack_require__(222), + BOOT: __webpack_require__(223), + CONTEXT_LOST: __webpack_require__(224), + CONTEXT_RESTORED: __webpack_require__(225), + DESTROY: __webpack_require__(226), + FOCUS: __webpack_require__(227), + HIDDEN: __webpack_require__(228), + PAUSE: __webpack_require__(229), + POST_RENDER: __webpack_require__(230), + POST_STEP: __webpack_require__(231), + PRE_RENDER: __webpack_require__(232), + PRE_STEP: __webpack_require__(233), + READY: __webpack_require__(234), + RESUME: __webpack_require__(235), + STEP: __webpack_require__(236), + VISIBLE: __webpack_require__(237) + +}; + + +/***/ }), +/* 222 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Blur Event. + * + * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded + * enters a blurred state. The blur event is raised when the window loses focus. This can happen if a user swaps + * tab, or if they simply remove focus from the browser to another app. + * + * @event Phaser.Core.Events#BLUR + * @since 3.0.0 + */ +module.exports = 'blur'; + + +/***/ }), +/* 223 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Boot Event. + * + * This event is dispatched when the Phaser Game instance has finished booting, but before it is ready to start running. + * The global systems use this event to know when to set themselves up, dispatching their own `ready` events as required. + * + * @event Phaser.Core.Events#BOOT + * @since 3.0.0 + */ +module.exports = 'boot'; + + +/***/ }), +/* 224 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Context Lost Event. + * + * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Lost event from the browser. + * + * The partner event is `CONTEXT_RESTORED`. + * + * @event Phaser.Core.Events#CONTEXT_LOST + * @since 3.19.0 + */ +module.exports = 'contextlost'; + + +/***/ }), +/* 225 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Context Restored Event. + * + * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Restored event from the browser. + * + * The partner event is `CONTEXT_LOST`. + * + * @event Phaser.Core.Events#CONTEXT_RESTORED + * @since 3.19.0 + */ +module.exports = 'contextrestored'; + + +/***/ }), +/* 226 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Destroy Event. + * + * This event is dispatched when the game instance has been told to destroy itself. + * Lots of internal systems listen to this event in order to clear themselves out. + * Custom plugins and game code should also do the same. + * + * @event Phaser.Core.Events#DESTROY + * @since 3.0.0 + */ +module.exports = 'destroy'; + + +/***/ }), +/* 227 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Focus Event. + * + * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded + * enters a focused state. The focus event is raised when the window re-gains focus, having previously lost it. + * + * @event Phaser.Core.Events#FOCUS + * @since 3.0.0 + */ +module.exports = 'focus'; + + +/***/ }), +/* 228 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Hidden Event. + * + * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded + * enters a hidden state. Only browsers that support the Visibility API will cause this event to be emitted. + * + * In most modern browsers, when the document enters a hidden state, the Request Animation Frame and setTimeout, which + * control the main game loop, will automatically pause. There is no way to stop this from happening. It is something + * your game should account for in its own code, should the pause be an issue (i.e. for multiplayer games) + * + * @event Phaser.Core.Events#HIDDEN + * @since 3.0.0 + */ +module.exports = 'hidden'; + + +/***/ }), +/* 229 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Pause Event. + * + * This event is dispatched when the Game loop enters a paused state, usually as a result of the Visibility Handler. + * + * @event Phaser.Core.Events#PAUSE + * @since 3.0.0 + */ +module.exports = 'pause'; + + +/***/ }), +/* 230 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Post-Render Event. + * + * This event is dispatched right at the end of the render process. + * + * Every Scene will have rendered and been drawn to the canvas by the time this event is fired. + * Use it for any last minute post-processing before the next game step begins. + * + * @event Phaser.Core.Events#POST_RENDER + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - A reference to the current renderer being used by the Game instance. + */ +module.exports = 'postrender'; + + +/***/ }), +/* 231 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Post-Step Event. + * + * This event is dispatched after the Scene Manager has updated. + * Hook into it from plugins or systems that need to do things before the render starts. + * + * @event Phaser.Core.Events#POST_STEP + * @since 3.0.0 + * + * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. + * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. + */ +module.exports = 'poststep'; + + +/***/ }), +/* 232 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Pre-Render Event. + * + * This event is dispatched immediately before any of the Scenes have started to render. + * + * The renderer will already have been initialized this frame, clearing itself and preparing to receive the Scenes for rendering, but it won't have actually drawn anything yet. + * + * @event Phaser.Core.Events#PRE_RENDER + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - A reference to the current renderer being used by the Game instance. + */ +module.exports = 'prerender'; + + +/***/ }), +/* 233 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Pre-Step Event. + * + * This event is dispatched before the main Game Step starts. By this point in the game cycle none of the Scene updates have yet happened. + * Hook into it from plugins or systems that need to update before the Scene Manager does. + * + * @event Phaser.Core.Events#PRE_STEP + * @since 3.0.0 + * + * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. + * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. + */ +module.exports = 'prestep'; + + +/***/ }), +/* 234 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Ready Event. + * + * This event is dispatched when the Phaser Game instance has finished booting, the Texture Manager is fully ready, + * and all local systems are now able to start. + * + * @event Phaser.Core.Events#READY + * @since 3.0.0 + */ +module.exports = 'ready'; + + +/***/ }), +/* 235 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Resume Event. + * + * This event is dispatched when the game loop leaves a paused state and resumes running. + * + * @event Phaser.Core.Events#RESUME + * @since 3.0.0 + */ +module.exports = 'resume'; + + +/***/ }), +/* 236 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Step Event. + * + * This event is dispatched after the Game Pre-Step and before the Scene Manager steps. + * Hook into it from plugins or systems that need to update before the Scene Manager does, but after the core Systems have. + * + * @event Phaser.Core.Events#STEP + * @since 3.0.0 + * + * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. + * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. + */ +module.exports = 'step'; + + +/***/ }), +/* 237 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Visible Event. + * + * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded + * enters a visible state, previously having been hidden. + * + * Only browsers that support the Visibility API will cause this event to be emitted. + * + * @event Phaser.Core.Events#VISIBLE + * @since 3.0.0 + */ +module.exports = 'visible'; + + +/***/ }), +/* 238 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); + +/** + * @classdesc + * A Geometry Mask can be applied to a Game Object to hide any pixels of it which don't intersect + * a visible pixel from the geometry mask. The mask is essentially a clipping path which can only + * make a masked pixel fully visible or fully invisible without changing its alpha (opacity). + * + * A Geometry Mask uses a Graphics Game Object to determine which pixels of the masked Game Object(s) + * should be clipped. For any given point of a masked Game Object's texture, the pixel will only be displayed + * if the Graphics Game Object of the Geometry Mask has a visible pixel at the same position. The color and + * alpha of the pixel from the Geometry Mask do not matter. + * + * The Geometry Mask's location matches the location of its Graphics object, not the location of the masked objects. + * Moving or transforming the underlying Graphics object will change the mask (and affect the visibility + * of any masked objects), whereas moving or transforming a masked object will not affect the mask. + * You can think of the Geometry Mask (or rather, of its Graphics object) as an invisible curtain placed + * in front of all masked objects which has its own visual properties and, naturally, respects the camera's + * visual properties, but isn't affected by and doesn't follow the masked objects by itself. + * + * @class GeometryMask + * @memberof Phaser.Display.Masks + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - This parameter is not used. + * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics Game Object to use for the Geometry Mask. Doesn't have to be in the Display List. + */ +var GeometryMask = new Class({ + + initialize: + + function GeometryMask (scene, graphicsGeometry) + { + /** + * The Graphics object which describes the Geometry Mask. + * + * @name Phaser.Display.Masks.GeometryMask#geometryMask + * @type {Phaser.GameObjects.Graphics} + * @since 3.0.0 + */ + this.geometryMask = graphicsGeometry; + + /** + * Similar to the BitmapMasks invertAlpha setting this to true will then hide all pixels + * drawn to the Geometry Mask. + * + * @name Phaser.Display.Masks.GeometryMask#invertAlpha + * @type {boolean} + * @since 3.16.0 + */ + this.invertAlpha = false; + + /** + * Is this mask a stencil mask? + * + * @name Phaser.Display.Masks.GeometryMask#isStencil + * @type {boolean} + * @readonly + * @since 3.17.0 + */ + this.isStencil = true; + + /** + * The current stencil level. + * + * @name Phaser.Display.Masks.GeometryMask#level + * @type {boolean} + * @private + * @since 3.17.0 + */ + this.level = 0; + }, + + /** + * Sets a new Graphics object for the Geometry Mask. + * + * @method Phaser.Display.Masks.GeometryMask#setShape + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics object which will be used for the Geometry Mask. + * + * @return {this} This Geometry Mask + */ + setShape: function (graphicsGeometry) + { + this.geometryMask = graphicsGeometry; + + return this; + }, + + /** + * Sets the `invertAlpha` property of this Geometry Mask. + * Inverting the alpha essentially flips the way the mask works. + * + * @method Phaser.Display.Masks.GeometryMask#setInvertAlpha + * @since 3.17.0 + * + * @param {boolean} [value=true] - Invert the alpha of this mask? + * + * @return {this} This Geometry Mask + */ + setInvertAlpha: function (value) + { + if (value === undefined) { value = true; } + + this.invertAlpha = value; + + return this; + }, + + /** + * Renders the Geometry Mask's underlying Graphics object to the OpenGL stencil buffer and enables the stencil test, which clips rendered pixels according to the mask. + * + * @method Phaser.Display.Masks.GeometryMask#preRenderWebGL + * @since 3.0.0 + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to. + * @param {Phaser.GameObjects.GameObject} child - The Game Object being rendered. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through. + */ + preRenderWebGL: function (renderer, child, camera) + { + var gl = renderer.gl; + + // Force flushing before drawing to stencil buffer + renderer.flush(); + + if (renderer.maskStack.length === 0) + { + gl.enable(gl.STENCIL_TEST); + gl.clear(gl.STENCIL_BUFFER_BIT); + + renderer.maskCount = 0; + } + + if (renderer.currentCameraMask.mask !== this) + { + renderer.currentMask.mask = this; + } + + renderer.maskStack.push({ mask: this, camera: camera }); + + this.applyStencil(renderer, camera, true); + + renderer.maskCount++; + }, + + /** + * Applies the current stencil mask to the renderer. + * + * @method Phaser.Display.Masks.GeometryMask#applyStencil + * @since 3.17.0 + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through. + * @param {boolean} inc - Is this an INCR stencil or a DECR stencil? + */ + applyStencil: function (renderer, camera, inc) + { + var gl = renderer.gl; + var geometryMask = this.geometryMask; + var level = renderer.maskCount; + + gl.colorMask(false, false, false, false); + + if (inc) + { + gl.stencilFunc(gl.EQUAL, level, 0xFF); + gl.stencilOp(gl.KEEP, gl.KEEP, gl.INCR); + } + else + { + gl.stencilFunc(gl.EQUAL, level + 1, 0xFF); + gl.stencilOp(gl.KEEP, gl.KEEP, gl.DECR); + } + + // Write stencil buffer + geometryMask.renderWebGL(renderer, geometryMask, 0, camera); + + renderer.flush(); + + gl.colorMask(true, true, true, true); + gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP); + + if (inc) + { + if (this.invertAlpha) + { + gl.stencilFunc(gl.NOTEQUAL, level + 1, 0xFF); + } + else + { + gl.stencilFunc(gl.EQUAL, level + 1, 0xFF); + } + } + else if (this.invertAlpha) + { + gl.stencilFunc(gl.NOTEQUAL, level, 0xFF); + } + else + { + gl.stencilFunc(gl.EQUAL, level, 0xFF); + } + }, + + /** + * Flushes all rendered pixels and disables the stencil test of a WebGL context, thus disabling the mask for it. + * + * @method Phaser.Display.Masks.GeometryMask#postRenderWebGL + * @since 3.0.0 + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw flush. + */ + postRenderWebGL: function (renderer) + { + var gl = renderer.gl; + + renderer.maskStack.pop(); + + renderer.maskCount--; + + if (renderer.maskStack.length === 0) + { + // If this is the only mask in the stack, flush and disable + renderer.flush(); + + renderer.currentMask.mask = null; + + gl.disable(gl.STENCIL_TEST); + } + else + { + // Force flush before disabling stencil test + renderer.flush(); + + var prev = renderer.maskStack[renderer.maskStack.length - 1]; + + prev.mask.applyStencil(renderer, prev.camera, false); + + if (renderer.currentCameraMask.mask !== prev.mask) + { + renderer.currentMask.mask = prev.mask; + renderer.currentMask.camera = prev.camera; + } + else + { + renderer.currentMask.mask = null; + } + } + }, + + /** + * Sets the clipping path of a 2D canvas context to the Geometry Mask's underlying Graphics object. + * + * @method Phaser.Display.Masks.GeometryMask#preRenderCanvas + * @since 3.0.0 + * + * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance to set the clipping path on. + * @param {Phaser.GameObjects.GameObject} mask - The Game Object being rendered. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through. + */ + preRenderCanvas: function (renderer, mask, camera) + { + var geometryMask = this.geometryMask; + + renderer.currentContext.save(); + + geometryMask.renderCanvas(renderer, geometryMask, 0, camera, null, null, true); + + renderer.currentContext.clip(); + }, + + /** + * Restore the canvas context's previous clipping path, thus turning off the mask for it. + * + * @method Phaser.Display.Masks.GeometryMask#postRenderCanvas + * @since 3.0.0 + * + * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance being restored. + */ + postRenderCanvas: function (renderer) + { + renderer.currentContext.restore(); + }, + + /** + * Destroys this GeometryMask and nulls any references it holds. + * + * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it, + * so be sure to call `clearMask` on any Game Object using it, before destroying it. + * + * @method Phaser.Display.Masks.GeometryMask#destroy + * @since 3.7.0 + */ + destroy: function () + { + this.geometryMask = null; + } + +}); + +module.exports = GeometryMask; + + +/***/ }), +/* 239 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for getting and setting the origin of a Game Object. + * Values are normalized, given in the range 0 to 1. + * Display values contain the calculated pixel values. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.Origin + * @since 3.0.0 + */ + +var Origin = { + + /** + * A property indicating that a Game Object has this component. + * + * @name Phaser.GameObjects.Components.Origin#_originComponent + * @type {boolean} + * @private + * @default true + * @since 3.2.0 + */ + _originComponent: true, + + /** + * The horizontal 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 left of the Game Object. + * + * @name Phaser.GameObjects.Components.Origin#originX + * @type {number} + * @default 0.5 + * @since 3.0.0 + */ + originX: 0.5, + + /** + * 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. + * + * @name Phaser.GameObjects.Components.Origin#originY + * @type {number} + * @default 0.5 + * @since 3.0.0 + */ + originY: 0.5, + + // private + read only + _displayOriginX: 0, + _displayOriginY: 0, + + /** + * The horizontal display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + * + * @name Phaser.GameObjects.Components.Origin#displayOriginX + * @type {number} + * @since 3.0.0 + */ + displayOriginX: { + + get: function () + { + return this._displayOriginX; + }, + + set: function (value) + { + this._displayOriginX = value; + this.originX = value / this.width; + } + + }, + + /** + * The vertical display origin of this Game Object. + * The origin is a normalized value between 0 and 1. + * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin. + * + * @name Phaser.GameObjects.Components.Origin#displayOriginY + * @type {number} + * @since 3.0.0 + */ + displayOriginY: { + + get: function () + { + return this._displayOriginY; + }, + + set: function (value) + { + this._displayOriginY = value; + this.originY = value / this.height; + } + + }, + + /** + * Sets the origin of this Game Object. + * + * The values are given in the range 0 to 1. + * + * @method Phaser.GameObjects.Components.Origin#setOrigin + * @since 3.0.0 + * + * @param {number} [x=0.5] - The horizontal origin value. + * @param {number} [y=x] - The vertical origin value. If not defined it will be set to the value of `x`. + * + * @return {this} This Game Object instance. + */ + setOrigin: function (x, y) + { + if (x === undefined) { x = 0.5; } + if (y === undefined) { y = x; } + + this.originX = x; + this.originY = y; + + return this.updateDisplayOrigin(); + }, + + /** + * Sets the origin of this Game Object based on the Pivot values in its Frame. + * + * @method Phaser.GameObjects.Components.Origin#setOriginFromFrame + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + setOriginFromFrame: function () + { + if (!this.frame || !this.frame.customPivot) + { + return this.setOrigin(); + } + else + { + this.originX = this.frame.pivotX; + this.originY = this.frame.pivotY; + } + + return this.updateDisplayOrigin(); + }, + + /** + * Sets the display origin of this Game Object. + * The difference between this and setting the origin is that you can use pixel values for setting the display origin. + * + * @method Phaser.GameObjects.Components.Origin#setDisplayOrigin + * @since 3.0.0 + * + * @param {number} [x=0] - The horizontal display origin value. + * @param {number} [y=x] - The vertical display origin value. If not defined it will be set to the value of `x`. + * + * @return {this} This Game Object instance. + */ + setDisplayOrigin: function (x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = x; } + + this.displayOriginX = x; + this.displayOriginY = y; + + return this; + }, + + /** + * Updates the Display Origin cached values internally stored on this Game Object. + * You don't usually call this directly, but it is exposed for edge-cases where you may. + * + * @method Phaser.GameObjects.Components.Origin#updateDisplayOrigin + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + updateDisplayOrigin: function () + { + this._displayOriginX = this.originX * this.width; + this._displayOriginY = this.originY * this.height; + + return this; + } + +}; + +module.exports = Origin; + + +/***/ }), +/* 240 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var DegToRad = __webpack_require__(24); +var GetBoolean = __webpack_require__(241); +var GetValue = __webpack_require__(11); +var TWEEN_CONST = __webpack_require__(242); +var Vector2 = __webpack_require__(1); + +/** + * Provides methods used for managing a Game Object following a Path. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.PathFollower + * @since 3.17.0 + */ + +var PathFollower = { + + /** + * The Path this PathFollower is following. It can only follow one Path at a time. + * + * @name Phaser.GameObjects.Components.PathFollower#path + * @type {Phaser.Curves.Path} + * @since 3.0.0 + */ + path: null, + + /** + * Should the PathFollower automatically rotate to point in the direction of the Path? + * + * @name Phaser.GameObjects.Components.PathFollower#rotateToPath + * @type {boolean} + * @default false + * @since 3.0.0 + */ + rotateToPath: false, + + /** + * If the PathFollower is rotating to match the Path (@see Phaser.GameObjects.PathFollower#rotateToPath) + * this value is added to the rotation value. This allows you to rotate objects to a path but control + * the angle of the rotation as well. + * + * @name Phaser.GameObjects.PathFollower#pathRotationOffset + * @type {number} + * @default 0 + * @since 3.0.0 + */ + pathRotationOffset: 0, + + /** + * An additional vector to add to the PathFollowers position, allowing you to offset it from the + * Path coordinates. + * + * @name Phaser.GameObjects.PathFollower#pathOffset + * @type {Phaser.Math.Vector2} + * @since 3.0.0 + */ + pathOffset: null, + + /** + * A Vector2 that stores the current point of the path the follower is on. + * + * @name Phaser.GameObjects.PathFollower#pathVector + * @type {Phaser.Math.Vector2} + * @since 3.0.0 + */ + pathVector: null, + + /** + * The distance the follower has traveled from the previous point to the current one, at the last update. + * + * @name Phaser.GameObjects.PathFollower#pathDelta + * @type {Phaser.Math.Vector2} + * @since 3.23.0 + */ + pathDelta: null, + + /** + * The Tween used for following the Path. + * + * @name Phaser.GameObjects.PathFollower#pathTween + * @type {Phaser.Tweens.Tween} + * @since 3.0.0 + */ + pathTween: null, + + /** + * Settings for the PathFollower. + * + * @name Phaser.GameObjects.PathFollower#pathConfig + * @type {?Phaser.Types.GameObjects.PathFollower.PathConfig} + * @default null + * @since 3.0.0 + */ + pathConfig: null, + + /** + * Records the direction of the follower so it can change direction. + * + * @name Phaser.GameObjects.PathFollower#_prevDirection + * @type {integer} + * @private + * @since 3.0.0 + */ + _prevDirection: TWEEN_CONST.PLAYING_FORWARD, + + /** + * Set the Path that this PathFollower should follow. + * + * Optionally accepts {@link Phaser.Types.GameObjects.PathFollower.PathConfig} settings. + * + * @method Phaser.GameObjects.Components.PathFollower#setPath + * @since 3.0.0 + * + * @param {Phaser.Curves.Path} path - The Path this PathFollower is following. It can only follow one Path at a time. + * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config] - Settings for the PathFollower. + * + * @return {this} This Game Object. + */ + setPath: function (path, config) + { + if (config === undefined) { config = this.pathConfig; } + + var tween = this.pathTween; + + if (tween && tween.isPlaying()) + { + tween.stop(); + } + + this.path = path; + + if (config) + { + this.startFollow(config); + } + + return this; + }, + + /** + * Set whether the PathFollower should automatically rotate to point in the direction of the Path. + * + * @method Phaser.GameObjects.Components.PathFollower#setRotateToPath + * @since 3.0.0 + * + * @param {boolean} value - Whether the PathFollower should automatically rotate to point in the direction of the Path. + * @param {number} [offset=0] - Rotation offset in degrees. + * + * @return {this} This Game Object. + */ + setRotateToPath: function (value, offset) + { + if (offset === undefined) { offset = 0; } + + this.rotateToPath = value; + + this.pathRotationOffset = offset; + + return this; + }, + + /** + * Is this PathFollower actively following a Path or not? + * + * To be considered as `isFollowing` it must be currently moving on a Path, and not paused. + * + * @method Phaser.GameObjects.Components.PathFollower#isFollowing + * @since 3.0.0 + * + * @return {boolean} `true` is this PathFollower is actively following a Path, otherwise `false`. + */ + isFollowing: function () + { + var tween = this.pathTween; + + return (tween && tween.isPlaying()); + }, + + /** + * Starts this PathFollower following its given Path. + * + * @method Phaser.GameObjects.Components.PathFollower#startFollow + * @since 3.3.0 + * + * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config={}] - The duration of the follow, or a PathFollower config object. + * @param {number} [startAt=0] - Optional start position of the follow, between 0 and 1. + * + * @return {this} This Game Object. + */ + startFollow: function (config, startAt) + { + if (config === undefined) { config = {}; } + if (startAt === undefined) { startAt = 0; } + + var tween = this.pathTween; + + if (tween && tween.isPlaying()) + { + tween.stop(); + } + + if (typeof config === 'number') + { + config = { duration: config }; + } + + // Override in case they've been specified in the config + config.from = GetValue(config, 'from', 0); + config.to = GetValue(config, 'to', 1); + + var positionOnPath = GetBoolean(config, 'positionOnPath', false); + + this.rotateToPath = GetBoolean(config, 'rotateToPath', false); + this.pathRotationOffset = GetValue(config, 'rotationOffset', 0); + + // This works, but it's not an ideal way of doing it as the follower jumps position + var seek = GetValue(config, 'startAt', startAt); + + if (seek) + { + config.onStart = function (tween) + { + var tweenData = tween.data[0]; + tweenData.progress = seek; + tweenData.elapsed = tweenData.duration * seek; + var v = tweenData.ease(tweenData.progress); + tweenData.current = tweenData.start + ((tweenData.end - tweenData.start) * v); + tweenData.target[tweenData.key] = tweenData.current; + }; + } + + if (!this.pathOffset) + { + this.pathOffset = new Vector2(this.x, this.y); + } + + if (!this.pathVector) + { + this.pathVector = new Vector2(); + } + + if (!this.pathDelta) + { + this.pathDelta = new Vector2(); + } + + this.pathDelta.reset(); + + this.pathTween = this.scene.sys.tweens.addCounter(config); + + // The starting point of the path, relative to this follower + this.path.getStartPoint(this.pathOffset); + + if (positionOnPath) + { + 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 = TWEEN_CONST.PLAYING_FORWARD; + + if (this.rotateToPath) + { + // Set the rotation now (in case the tween has a delay on it, etc) + var nextPoint = this.path.getPoint(0.1); + + this.rotation = Math.atan2(nextPoint.y - this.y, nextPoint.x - this.x) + DegToRad(this.pathRotationOffset); + } + + this.pathConfig = config; + + return this; + }, + + /** + * Pauses this PathFollower. It will still continue to render, but it will remain motionless at the + * point on the Path at which you paused it. + * + * @method Phaser.GameObjects.Components.PathFollower#pauseFollow + * @since 3.3.0 + * + * @return {this} This Game Object. + */ + pauseFollow: function () + { + var tween = this.pathTween; + + if (tween && tween.isPlaying()) + { + tween.pause(); + } + + return this; + }, + + /** + * Resumes a previously paused PathFollower. + * + * If the PathFollower was not paused this has no effect. + * + * @method Phaser.GameObjects.Components.PathFollower#resumeFollow + * @since 3.3.0 + * + * @return {this} This Game Object. + */ + resumeFollow: function () + { + var tween = this.pathTween; + + if (tween && tween.isPaused()) + { + tween.resume(); + } + + return this; + }, + + /** + * Stops this PathFollower from following the path any longer. + * + * This will invoke any 'stop' conditions that may exist on the Path, or for the follower. + * + * @method Phaser.GameObjects.Components.PathFollower#stopFollow + * @since 3.3.0 + * + * @return {this} This Game Object. + */ + stopFollow: function () + { + var tween = this.pathTween; + + if (tween && tween.isPlaying()) + { + tween.stop(); + } + + return this; + }, + + /** + * Internal update handler that advances this PathFollower along the path. + * + * Called automatically by the Scene step, should not typically be called directly. + * + * @method Phaser.GameObjects.Components.PathFollower#pathUpdate + * @since 3.17.0 + */ + pathUpdate: function () + { + var tween = this.pathTween; + + if (tween) + { + var tweenData = tween.data[0]; + var pathDelta = this.pathDelta; + var pathVector = this.pathVector; + + pathDelta.copy(pathVector).negate(); + + if (tweenData.state === TWEEN_CONST.COMPLETE) + { + this.path.getPoint(1, pathVector); + + pathDelta.add(pathVector); + pathVector.add(this.pathOffset); + + this.setPosition(pathVector.x, pathVector.y); + + return; + } + else if (tweenData.state !== TWEEN_CONST.PLAYING_FORWARD && tweenData.state !== TWEEN_CONST.PLAYING_BACKWARD) + { + // If delayed, etc then bail out + return; + } + + this.path.getPoint(tween.getValue(), pathVector); + + pathDelta.add(pathVector); + pathVector.add(this.pathOffset); + + var oldX = this.x; + var oldY = this.y; + + this.setPosition(pathVector.x, pathVector.y); + + var speedX = this.x - oldX; + var speedY = this.y - oldY; + + if (speedX === 0 && speedY === 0) + { + // Bail out early + return; + } + + if (tweenData.state !== this._prevDirection) + { + // We've changed direction, so don't do a rotate this frame + this._prevDirection = tweenData.state; + + return; + } + + if (this.rotateToPath) + { + this.rotation = Math.atan2(speedY, speedX) + DegToRad(this.pathRotationOffset); + } + } + } + +}; + +module.exports = PathFollower; + + +/***/ }), +/* 241 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Retrieves the value of the given key from an object. + * + * @function Phaser.Tweens.Builders.GetBoolean + * @since 3.0.0 + * + * @param {object} source - The object to retrieve the value from. + * @param {string} key - The key to look for in the `source` object. + * @param {*} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided. + * + * @return {*} The retrieved value. + */ +var GetBoolean = function (source, key, defaultValue) +{ + if (!source) + { + return defaultValue; + } + else if (source.hasOwnProperty(key)) + { + return source[key]; + } + else + { + return defaultValue; + } +}; + +module.exports = GetBoolean; + + +/***/ }), +/* 242 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var TWEEN_CONST = { + + /** + * TweenData state. + * + * @name Phaser.Tweens.CREATED + * @type {integer} + * @since 3.0.0 + */ + CREATED: 0, + + /** + * TweenData state. + * + * @name Phaser.Tweens.INIT + * @type {integer} + * @since 3.0.0 + */ + INIT: 1, + + /** + * TweenData state. + * + * @name Phaser.Tweens.DELAY + * @type {integer} + * @since 3.0.0 + */ + DELAY: 2, + + /** + * TweenData state. + * + * @name Phaser.Tweens.OFFSET_DELAY + * @type {integer} + * @since 3.0.0 + */ + OFFSET_DELAY: 3, + + /** + * TweenData state. + * + * @name Phaser.Tweens.PENDING_RENDER + * @type {integer} + * @since 3.0.0 + */ + PENDING_RENDER: 4, + + /** + * TweenData state. + * + * @name Phaser.Tweens.PLAYING_FORWARD + * @type {integer} + * @since 3.0.0 + */ + PLAYING_FORWARD: 5, + + /** + * TweenData state. + * + * @name Phaser.Tweens.PLAYING_BACKWARD + * @type {integer} + * @since 3.0.0 + */ + PLAYING_BACKWARD: 6, + + /** + * TweenData state. + * + * @name Phaser.Tweens.HOLD_DELAY + * @type {integer} + * @since 3.0.0 + */ + HOLD_DELAY: 7, + + /** + * TweenData state. + * + * @name Phaser.Tweens.REPEAT_DELAY + * @type {integer} + * @since 3.0.0 + */ + REPEAT_DELAY: 8, + + /** + * TweenData state. + * + * @name Phaser.Tweens.COMPLETE + * @type {integer} + * @since 3.0.0 + */ + COMPLETE: 9, + + // Tween specific (starts from 20 to cleanly allow extra TweenData consts in the future) + + /** + * Tween state. + * + * @name Phaser.Tweens.PENDING_ADD + * @type {integer} + * @since 3.0.0 + */ + PENDING_ADD: 20, + + /** + * Tween state. + * + * @name Phaser.Tweens.PAUSED + * @type {integer} + * @since 3.0.0 + */ + PAUSED: 21, + + /** + * Tween state. + * + * @name Phaser.Tweens.LOOP_DELAY + * @type {integer} + * @since 3.0.0 + */ + LOOP_DELAY: 22, + + /** + * Tween state. + * + * @name Phaser.Tweens.ACTIVE + * @type {integer} + * @since 3.0.0 + */ + ACTIVE: 23, + + /** + * Tween state. + * + * @name Phaser.Tweens.COMPLETE_DELAY + * @type {integer} + * @since 3.0.0 + */ + COMPLETE_DELAY: 24, + + /** + * Tween state. + * + * @name Phaser.Tweens.PENDING_REMOVE + * @type {integer} + * @since 3.0.0 + */ + PENDING_REMOVE: 25, + + /** + * Tween state. + * + * @name Phaser.Tweens.REMOVED + * @type {integer} + * @since 3.0.0 + */ + REMOVED: 26 + +}; + +module.exports = TWEEN_CONST; + + +/***/ }), +/* 243 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for setting the WebGL rendering pipeline of a Game Object. + * + * @namespace Phaser.GameObjects.Components.Pipeline + * @webglOnly + * @since 3.0.0 + */ + +var Pipeline = { + + /** + * The initial WebGL pipeline of this Game Object. + * + * @name Phaser.GameObjects.Components.Pipeline#defaultPipeline + * @type {Phaser.Renderer.WebGL.WebGLPipeline} + * @default null + * @webglOnly + * @since 3.0.0 + */ + defaultPipeline: null, + + /** + * The current WebGL pipeline of this Game Object. + * + * @name Phaser.GameObjects.Components.Pipeline#pipeline + * @type {Phaser.Renderer.WebGL.WebGLPipeline} + * @default null + * @webglOnly + * @since 3.0.0 + */ + pipeline: null, + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * + * This should only be called during the instantiation of the Game Object. + * + * @method Phaser.GameObjects.Components.Pipeline#initPipeline + * @webglOnly + * @since 3.0.0 + * + * @param {string} [pipelineName=MultiPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Multi Pipeline. + * + * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. + */ + initPipeline: function (pipelineName) + { + if (pipelineName === undefined) { pipelineName = 'MultiPipeline'; } + + var renderer = this.scene.sys.game.renderer; + + if (renderer && renderer.gl && renderer.hasPipeline(pipelineName)) + { + this.defaultPipeline = renderer.getPipeline(pipelineName); + this.pipeline = this.defaultPipeline; + + return true; + } + + return false; + }, + + /** + * Sets the active WebGL Pipeline of this Game Object. + * + * @method Phaser.GameObjects.Components.Pipeline#setPipeline + * @webglOnly + * @since 3.0.0 + * + * @param {string} pipelineName - The name of the pipeline to set on this Game Object. + * + * @return {this} This Game Object instance. + */ + setPipeline: function (pipelineName) + { + var renderer = this.scene.sys.game.renderer; + + if (renderer && renderer.gl && renderer.hasPipeline(pipelineName)) + { + this.pipeline = renderer.getPipeline(pipelineName); + } + + return this; + }, + + /** + * Resets the WebGL Pipeline of this Game Object back to the default it was created with. + * + * @method Phaser.GameObjects.Components.Pipeline#resetPipeline + * @webglOnly + * @since 3.0.0 + * + * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. + */ + resetPipeline: function () + { + this.pipeline = this.defaultPipeline; + + return (this.pipeline !== null); + }, + + /** + * Gets the name of the WebGL Pipeline this Game Object is currently using. + * + * @method Phaser.GameObjects.Components.Pipeline#getPipelineName + * @webglOnly + * @since 3.0.0 + * + * @return {string} The string-based name of the pipeline being used by this Game Object. + */ + getPipelineName: function () + { + return this.pipeline.name; + } + +}; + +module.exports = Pipeline; + + +/***/ }), +/* 244 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for getting and setting the Scroll Factor of a Game Object. + * + * @namespace Phaser.GameObjects.Components.ScrollFactor + * @since 3.0.0 + */ + +var ScrollFactor = { + + /** + * 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. + * + * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorX + * @type {number} + * @default 1 + * @since 3.0.0 + */ + scrollFactorX: 1, + + /** + * 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. + * + * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorY + * @type {number} + * @default 1 + * @since 3.0.0 + */ + scrollFactorY: 1, + + /** + * 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. + * + * @method Phaser.GameObjects.Components.ScrollFactor#setScrollFactor + * @since 3.0.0 + * + * @param {number} x - The horizontal scroll factor of this Game Object. + * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value. + * + * @return {this} This Game Object instance. + */ + setScrollFactor: function (x, y) + { + if (y === undefined) { y = x; } + + this.scrollFactorX = x; + this.scrollFactorY = y; + + return this; + } + +}; + +module.exports = ScrollFactor; + + +/***/ }), +/* 245 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for getting and setting the size of a Game Object. + * + * @namespace Phaser.GameObjects.Components.Size + * @since 3.0.0 + */ + +var Size = { + + /** + * A property indicating that a Game Object has this component. + * + * @name Phaser.GameObjects.Components.Size#_sizeComponent + * @type {boolean} + * @private + * @default true + * @since 3.2.0 + */ + _sizeComponent: true, + + /** + * The native (un-scaled) width of this Game Object. + * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayWidth` property. + * + * @name Phaser.GameObjects.Components.Size#width + * @type {number} + * @since 3.0.0 + */ + width: 0, + + /** + * The native (un-scaled) height of this Game Object. + * + * Changing this value will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or use + * the `displayHeight` property. + * + * @name Phaser.GameObjects.Components.Size#height + * @type {number} + * @since 3.0.0 + */ + height: 0, + + /** + * The displayed width of this Game Object. + * + * This value takes into account the scale factor. + * + * Setting this value will adjust the Game Object's scale property. + * + * @name Phaser.GameObjects.Components.Size#displayWidth + * @type {number} + * @since 3.0.0 + */ + displayWidth: { + + get: function () + { + return Math.abs(this.scaleX * this.frame.realWidth); + }, + + set: function (value) + { + this.scaleX = value / this.frame.realWidth; + } + + }, + + /** + * The displayed height of this Game Object. + * + * This value takes into account the scale factor. + * + * Setting this value will adjust the Game Object's scale property. + * + * @name Phaser.GameObjects.Components.Size#displayHeight + * @type {number} + * @since 3.0.0 + */ + displayHeight: { + + get: function () + { + return Math.abs(this.scaleY * this.frame.realHeight); + }, + + set: function (value) + { + this.scaleY = value / this.frame.realHeight; + } + + }, + + /** + * Sets the size of this Game Object to be that of the given Frame. + * + * This will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or call the + * `setDisplaySize` method, which is the same thing as changing the scale but allows you + * to do so by giving pixel values. + * + * If you have enabled this Game Object for input, changing the size will _not_ change the + * size of the hit area. To do this you should adjust the `input.hitArea` object directly. + * + * @method Phaser.GameObjects.Components.Size#setSizeToFrame + * @since 3.0.0 + * + * @param {Phaser.Textures.Frame} frame - The frame to base the size of this Game Object on. + * + * @return {this} This Game Object instance. + */ + setSizeToFrame: function (frame) + { + if (frame === undefined) { frame = this.frame; } + + this.width = frame.realWidth; + this.height = frame.realHeight; + + return this; + }, + + /** + * Sets the internal size of this Game Object, as used for frame or physics body creation. + * + * This will not change the size that the Game Object is rendered in-game. + * For that you need to either set the scale of the Game Object (`setScale`) or call the + * `setDisplaySize` method, which is the same thing as changing the scale but allows you + * to do so by giving pixel values. + * + * If you have enabled this Game Object for input, changing the size will _not_ change the + * size of the hit area. To do this you should adjust the `input.hitArea` object directly. + * + * @method Phaser.GameObjects.Components.Size#setSize + * @since 3.0.0 + * + * @param {number} width - The width of this Game Object. + * @param {number} height - The height of this Game Object. + * + * @return {this} This Game Object instance. + */ + setSize: function (width, height) + { + this.width = width; + this.height = height; + + return this; + }, + + /** + * Sets the display size of this Game Object. + * + * Calling this will adjust the scale. + * + * @method Phaser.GameObjects.Components.Size#setDisplaySize + * @since 3.0.0 + * + * @param {number} width - The width of this Game Object. + * @param {number} height - The height of this Game Object. + * + * @return {this} This Game Object instance. + */ + setDisplaySize: function (width, height) + { + this.displayWidth = width; + this.displayHeight = height; + + return this; + } + +}; + +module.exports = Size; + + +/***/ }), +/* 246 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// bitmask flag for GameObject.renderMask +var _FLAG = 8; // 1000 + +/** + * Provides methods used for getting and setting the texture of a Game Object. + * + * @namespace Phaser.GameObjects.Components.Texture + * @since 3.0.0 + */ + +var Texture = { + + /** + * The Texture this Game Object is using to render with. + * + * @name Phaser.GameObjects.Components.Texture#texture + * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture} + * @since 3.0.0 + */ + texture: null, + + /** + * The Texture Frame this Game Object is using to render with. + * + * @name Phaser.GameObjects.Components.Texture#frame + * @type {Phaser.Textures.Frame} + * @since 3.0.0 + */ + frame: null, + + /** + * Internal flag. Not to be set by this Game Object. + * + * @name Phaser.GameObjects.Components.Texture#isCropped + * @type {boolean} + * @private + * @since 3.11.0 + */ + isCropped: false, + + /** + * 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. + * + * @method Phaser.GameObjects.Components.Texture#setTexture + * @since 3.0.0 + * + * @param {(string|Phaser.Textures.Texture)} key - The key of the texture to be used, as stored in the Texture Manager, or a Texture instance. + * @param {(string|integer)} [frame] - The name or index of the frame within the Texture. + * + * @return {this} This Game Object instance. + */ + setTexture: function (key, frame) + { + this.texture = this.scene.sys.textures.get(key); + + return this.setFrame(frame); + }, + + /** + * Sets the frame this Game Object will use to render with. + * + * The Frame has to belong to the current Texture being used. + * + * It can be either a string or an index. + * + * 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. + * + * @method Phaser.GameObjects.Components.Texture#setFrame + * @since 3.0.0 + * + * @param {(string|integer)} frame - The name or index of the frame within the Texture. + * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object? + * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object? + * + * @return {this} This Game Object instance. + */ + setFrame: function (frame, updateSize, updateOrigin) + { + if (updateSize === undefined) { updateSize = true; } + if (updateOrigin === undefined) { updateOrigin = true; } + + this.frame = this.texture.get(frame); + + if (!this.frame.cutWidth || !this.frame.cutHeight) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + + if (this._sizeComponent && updateSize) + { + this.setSizeToFrame(); + } + + if (this._originComponent && updateOrigin) + { + if (this.frame.customPivot) + { + this.setOrigin(this.frame.pivotX, this.frame.pivotY); + } + else + { + this.updateDisplayOrigin(); + } + } + + return this; + } + +}; + +module.exports = Texture; + + +/***/ }), +/* 247 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// bitmask flag for GameObject.renderMask +var _FLAG = 8; // 1000 + +/** + * Provides methods used for getting and setting the texture of a Game Object. + * + * @namespace Phaser.GameObjects.Components.TextureCrop + * @since 3.0.0 + */ + +var TextureCrop = { + + /** + * The Texture this Game Object is using to render with. + * + * @name Phaser.GameObjects.Components.TextureCrop#texture + * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture} + * @since 3.0.0 + */ + texture: null, + + /** + * The Texture Frame this Game Object is using to render with. + * + * @name Phaser.GameObjects.Components.TextureCrop#frame + * @type {Phaser.Textures.Frame} + * @since 3.0.0 + */ + frame: null, + + /** + * A boolean flag indicating if this Game Object is being cropped or not. + * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off. + * Equally, calling `setCrop` with no arguments will reset the crop and disable it. + * + * @name Phaser.GameObjects.Components.TextureCrop#isCropped + * @type {boolean} + * @since 3.11.0 + */ + isCropped: false, + + /** + * Applies a crop to a texture based Game Object, such as a Sprite or Image. + * + * The crop is a rectangle that limits the area of the texture frame that is visible during rendering. + * + * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just + * changes what is shown when rendered. + * + * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left. + * + * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left + * half of it, you could call `setCrop(0, 0, 400, 600)`. + * + * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop + * an area of 200x100 when applied to a Game Object that had a scale factor of 2. + * + * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument. + * + * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`. + * + * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow + * the renderer to skip several internal calculations. + * + * @method Phaser.GameObjects.Components.TextureCrop#setCrop + * @since 3.11.0 + * + * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored. + * @param {number} [y] - The y coordinate to start the crop from. + * @param {number} [width] - The width of the crop rectangle in pixels. + * @param {number} [height] - The height of the crop rectangle in pixels. + * + * @return {this} This Game Object instance. + */ + setCrop: function (x, y, width, height) + { + if (x === undefined) + { + this.isCropped = false; + } + else if (this.frame) + { + if (typeof x === 'number') + { + this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY); + } + else + { + var rect = x; + + this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY); + } + + this.isCropped = true; + } + + return this; + }, + + /** + * 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. + * + * @method Phaser.GameObjects.Components.TextureCrop#setTexture + * @since 3.0.0 + * + * @param {string} key - The key of the texture to be used, as stored in the Texture Manager. + * @param {(string|integer)} [frame] - The name or index of the frame within the Texture. + * + * @return {this} This Game Object instance. + */ + setTexture: function (key, frame) + { + this.texture = this.scene.sys.textures.get(key); + + return this.setFrame(frame); + }, + + /** + * Sets the frame this Game Object will use to render with. + * + * The Frame has to belong to the current Texture being used. + * + * It can be either a string or an index. + * + * 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. + * + * @method Phaser.GameObjects.Components.TextureCrop#setFrame + * @since 3.0.0 + * + * @param {(string|integer)} frame - The name or index of the frame within the Texture. + * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object? + * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object? + * + * @return {this} This Game Object instance. + */ + setFrame: function (frame, updateSize, updateOrigin) + { + if (updateSize === undefined) { updateSize = true; } + if (updateOrigin === undefined) { updateOrigin = true; } + + this.frame = this.texture.get(frame); + + if (!this.frame.cutWidth || !this.frame.cutHeight) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + + if (this._sizeComponent && updateSize) + { + this.setSizeToFrame(); + } + + if (this._originComponent && updateOrigin) + { + if (this.frame.customPivot) + { + this.setOrigin(this.frame.pivotX, this.frame.pivotY); + } + else + { + this.updateDisplayOrigin(); + } + } + + if (this.isCropped) + { + this.frame.updateCropUVs(this._crop, this.flipX, this.flipY); + } + + return this; + }, + + /** + * Internal method that returns a blank, well-formed crop object for use by a Game Object. + * + * @method Phaser.GameObjects.Components.TextureCrop#resetCropObject + * @private + * @since 3.12.0 + * + * @return {object} The crop object. + */ + resetCropObject: function () + { + return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 }; + } + +}; + +module.exports = TextureCrop; + + +/***/ }), +/* 248 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetColorFromValue = __webpack_require__(249); + +/** + * Provides methods used for setting the tint of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.Tint + * @webglOnly + * @since 3.0.0 + */ + +var Tint = { + + /** + * Private internal value. Holds the top-left tint value. + * + * @name Phaser.GameObjects.Components.Tint#_tintTL + * @type {number} + * @private + * @default 16777215 + * @since 3.0.0 + */ + _tintTL: 16777215, + + /** + * Private internal value. Holds the top-right tint value. + * + * @name Phaser.GameObjects.Components.Tint#_tintTR + * @type {number} + * @private + * @default 16777215 + * @since 3.0.0 + */ + _tintTR: 16777215, + + /** + * Private internal value. Holds the bottom-left tint value. + * + * @name Phaser.GameObjects.Components.Tint#_tintBL + * @type {number} + * @private + * @default 16777215 + * @since 3.0.0 + */ + _tintBL: 16777215, + + /** + * Private internal value. Holds the bottom-right tint value. + * + * @name Phaser.GameObjects.Components.Tint#_tintBR + * @type {number} + * @private + * @default 16777215 + * @since 3.0.0 + */ + _tintBR: 16777215, + + /** + * Private internal value. Holds if the Game Object is tinted or not. + * + * @name Phaser.GameObjects.Components.Tint#_isTinted + * @type {boolean} + * @private + * @default false + * @since 3.11.0 + */ + _isTinted: false, + + /** + * Fill or additive? + * + * @name Phaser.GameObjects.Components.Tint#tintFill + * @type {boolean} + * @default false + * @since 3.11.0 + */ + tintFill: false, + + /** + * Clears all tint values associated with this Game Object. + * + * Immediately sets the color values back to 0xffffff and the tint type to 'additive', + * which results in no visible change to the texture. + * + * @method Phaser.GameObjects.Components.Tint#clearTint + * @webglOnly + * @since 3.0.0 + * + * @return {this} This Game Object instance. + */ + clearTint: function () + { + this.setTint(0xffffff); + + this._isTinted = false; + + return this; + }, + + /** + * Sets an additive tint on this Game Object. + * + * The tint works by taking the pixel color values from the Game Objects texture, and then + * multiplying it by the color value of the tint. You can provide either one color value, + * in which case the whole Game Object will be tinted in that color. Or you can provide a color + * per corner. The colors are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`. + * + * @method Phaser.GameObjects.Components.Tint#setTint + * @webglOnly + * @since 3.0.0 + * + * @param {integer} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object. + * @param {integer} [topRight] - The tint being applied to the top-right of the Game Object. + * @param {integer} [bottomLeft] - The tint being applied to the bottom-left of the Game Object. + * @param {integer} [bottomRight] - The tint being applied to the bottom-right of the Game Object. + * + * @return {this} This Game Object instance. + */ + setTint: function (topLeft, topRight, bottomLeft, bottomRight) + { + if (topLeft === undefined) { topLeft = 0xffffff; } + + if (topRight === undefined) + { + topRight = topLeft; + bottomLeft = topLeft; + bottomRight = topLeft; + } + + this._tintTL = GetColorFromValue(topLeft); + this._tintTR = GetColorFromValue(topRight); + this._tintBL = GetColorFromValue(bottomLeft); + this._tintBR = GetColorFromValue(bottomRight); + + this._isTinted = true; + + this.tintFill = false; + + return this; + }, + + /** + * Sets a fill-based tint on this Game Object. + * + * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture + * with those in the tint. You can use this for effects such as making a player flash 'white' + * if hit by something. You can provide either one color value, in which case the whole + * Game Object will be rendered in that color. Or you can provide a color per corner. The colors + * are blended together across the extent of the Game Object. + * + * To modify the tint color once set, either call this method again with new values or use the + * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight, + * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently. + * + * To remove a tint call `clearTint`. + * + * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`. + * + * @method Phaser.GameObjects.Components.Tint#setTintFill + * @webglOnly + * @since 3.11.0 + * + * @param {integer} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object. + * @param {integer} [topRight] - The tint being applied to the top-right of the Game Object. + * @param {integer} [bottomLeft] - The tint being applied to the bottom-left of the Game Object. + * @param {integer} [bottomRight] - The tint being applied to the bottom-right of the Game Object. + * + * @return {this} This Game Object instance. + */ + setTintFill: function (topLeft, topRight, bottomLeft, bottomRight) + { + this.setTint(topLeft, topRight, bottomLeft, bottomRight); + + this.tintFill = true; + + return this; + }, + + /** + * The tint value being applied to the top-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Tint#tintTopLeft + * @type {integer} + * @webglOnly + * @since 3.0.0 + */ + tintTopLeft: { + + get: function () + { + return this._tintTL; + }, + + set: function (value) + { + this._tintTL = GetColorFromValue(value); + this._isTinted = true; + } + + }, + + /** + * The tint value being applied to the top-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Tint#tintTopRight + * @type {integer} + * @webglOnly + * @since 3.0.0 + */ + tintTopRight: { + + get: function () + { + return this._tintTR; + }, + + set: function (value) + { + this._tintTR = GetColorFromValue(value); + this._isTinted = true; + } + + }, + + /** + * The tint value being applied to the bottom-left of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Tint#tintBottomLeft + * @type {integer} + * @webglOnly + * @since 3.0.0 + */ + tintBottomLeft: { + + get: function () + { + return this._tintBL; + }, + + set: function (value) + { + this._tintBL = GetColorFromValue(value); + this._isTinted = true; + } + + }, + + /** + * The tint value being applied to the bottom-right of the Game Object. + * This value is interpolated from the corner to the center of the Game Object. + * + * @name Phaser.GameObjects.Components.Tint#tintBottomRight + * @type {integer} + * @webglOnly + * @since 3.0.0 + */ + tintBottomRight: { + + get: function () + { + return this._tintBR; + }, + + set: function (value) + { + this._tintBR = GetColorFromValue(value); + this._isTinted = true; + } + + }, + + /** + * The tint value being applied to the whole of the Game Object. + * This property is a setter-only. Use the properties `tintTopLeft` etc to read the current tint value. + * + * @name Phaser.GameObjects.Components.Tint#tint + * @type {integer} + * @webglOnly + * @since 3.0.0 + */ + tint: { + + set: function (value) + { + this.setTint(value, value, value, value); + } + }, + + /** + * Does this Game Object have a tint applied to it or not? + * + * @name Phaser.GameObjects.Components.Tint#isTinted + * @type {boolean} + * @webglOnly + * @readonly + * @since 3.11.0 + */ + isTinted: { + + get: function () + { + return this._isTinted; + } + + } + +}; + +module.exports = Tint; + + +/***/ }), +/* 249 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Given a hex color value, such as 0xff00ff (for purple), it will return a + * numeric representation of it (i.e. 16711935) for use in WebGL tinting. + * + * @function Phaser.Display.Color.GetColorFromValue + * @since 3.50.0 + * + * @param {number} red - The hex color value, such as 0xff0000. + * + * @return {number} The combined color value. + */ +var GetColorFromValue = function (value) +{ + return (value >> 16) + (value & 0xff00) + ((value & 0xff) << 16); +}; + +module.exports = GetColorFromValue; + + +/***/ }), +/* 250 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var MATH_CONST = __webpack_require__(2); +var TransformMatrix = __webpack_require__(41); +var TransformXY = __webpack_require__(28); +var WrapAngle = __webpack_require__(15); +var WrapAngleDegrees = __webpack_require__(16); +var Vector2 = __webpack_require__(1); + +// global bitmask flag for GameObject.renderMask (used by Scale) +var _FLAG = 4; // 0100 + +/** + * Provides methods used for getting and setting the position, scale and rotation of a Game Object. + * + * @namespace Phaser.GameObjects.Components.Transform + * @since 3.0.0 + */ + +var Transform = { + + /** + * Private internal value. Holds the horizontal scale value. + * + * @name Phaser.GameObjects.Components.Transform#_scaleX + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _scaleX: 1, + + /** + * Private internal value. Holds the vertical scale value. + * + * @name Phaser.GameObjects.Components.Transform#_scaleY + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + _scaleY: 1, + + /** + * Private internal value. Holds the rotation value in radians. + * + * @name Phaser.GameObjects.Components.Transform#_rotation + * @type {number} + * @private + * @default 0 + * @since 3.0.0 + */ + _rotation: 0, + + /** + * The x position of this Game Object. + * + * @name Phaser.GameObjects.Components.Transform#x + * @type {number} + * @default 0 + * @since 3.0.0 + */ + x: 0, + + /** + * The y position of this Game Object. + * + * @name Phaser.GameObjects.Components.Transform#y + * @type {number} + * @default 0 + * @since 3.0.0 + */ + y: 0, + + /** + * The z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#depth} instead. + * + * @name Phaser.GameObjects.Components.Transform#z + * @type {number} + * @default 0 + * @since 3.0.0 + */ + z: 0, + + /** + * The w position of this Game Object. + * + * @name Phaser.GameObjects.Components.Transform#w + * @type {number} + * @default 0 + * @since 3.0.0 + */ + w: 0, + + /** + * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object + * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`. + * + * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this + * isn't the case, use the `scaleX` or `scaleY` properties instead. + * + * @name Phaser.GameObjects.Components.Transform#scale + * @type {number} + * @default 1 + * @since 3.18.0 + */ + scale: { + + get: function () + { + return (this._scaleX + this._scaleY) / 2; + }, + + set: function (value) + { + this._scaleX = value; + this._scaleY = value; + + if (value === 0) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The horizontal scale of this Game Object. + * + * @name Phaser.GameObjects.Components.Transform#scaleX + * @type {number} + * @default 1 + * @since 3.0.0 + */ + scaleX: { + + get: function () + { + return this._scaleX; + }, + + set: function (value) + { + this._scaleX = value; + + if (value === 0) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The vertical scale of this Game Object. + * + * @name Phaser.GameObjects.Components.Transform#scaleY + * @type {number} + * @default 1 + * @since 3.0.0 + */ + scaleY: { + + get: function () + { + return this._scaleY; + }, + + set: function (value) + { + this._scaleY = value; + + if (value === 0) + { + this.renderFlags &= ~_FLAG; + } + else + { + this.renderFlags |= _FLAG; + } + } + + }, + + /** + * The angle of this Game Object as expressed in degrees. + * + * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left + * and -90 is up. + * + * If you prefer to work in radians, see the `rotation` property instead. + * + * @name Phaser.GameObjects.Components.Transform#angle + * @type {integer} + * @default 0 + * @since 3.0.0 + */ + angle: { + + get: function () + { + return WrapAngleDegrees(this._rotation * MATH_CONST.RAD_TO_DEG); + }, + + set: function (value) + { + // value is in degrees + this.rotation = WrapAngleDegrees(value) * MATH_CONST.DEG_TO_RAD; + } + }, + + /** + * The angle of this Game Object in radians. + * + * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left + * and -PI/2 is up. + * + * If you prefer to work in degrees, see the `angle` property instead. + * + * @name Phaser.GameObjects.Components.Transform#rotation + * @type {number} + * @default 1 + * @since 3.0.0 + */ + rotation: { + + get: function () + { + return this._rotation; + }, + + set: function (value) + { + // value is in radians + this._rotation = WrapAngle(value); + } + }, + + /** + * Sets the position of this Game Object. + * + * @method Phaser.GameObjects.Components.Transform#setPosition + * @since 3.0.0 + * + * @param {number} [x=0] - The x position of this Game Object. + * @param {number} [y=x] - The y position of this Game Object. If not set it will use the `x` value. + * @param {number} [z=0] - The z position of this Game Object. + * @param {number} [w=0] - The w position of this Game Object. + * + * @return {this} This Game Object instance. + */ + setPosition: function (x, y, z, w) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = x; } + if (z === undefined) { z = 0; } + if (w === undefined) { w = 0; } + + this.x = x; + this.y = y; + this.z = z; + this.w = w; + + return this; + }, + + /** + * Sets the position of this Game Object to be a random position within the confines of + * the given area. + * + * If no area is specified a random position between 0 x 0 and the game width x height is used instead. + * + * The position does not factor in the size of this Game Object, meaning that only the origin is + * guaranteed to be within the area. + * + * @method Phaser.GameObjects.Components.Transform#setRandomPosition + * @since 3.8.0 + * + * @param {number} [x=0] - The x position of the top-left of the random area. + * @param {number} [y=0] - The y position of the top-left of the random area. + * @param {number} [width] - The width of the random area. + * @param {number} [height] - The height of the random area. + * + * @return {this} This Game Object instance. + */ + setRandomPosition: function (x, y, width, height) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + if (width === undefined) { width = this.scene.sys.scale.width; } + if (height === undefined) { height = this.scene.sys.scale.height; } + + this.x = x + (Math.random() * width); + this.y = y + (Math.random() * height); + + return this; + }, + + /** + * Sets the rotation of this Game Object. + * + * @method Phaser.GameObjects.Components.Transform#setRotation + * @since 3.0.0 + * + * @param {number} [radians=0] - The rotation of this Game Object, in radians. + * + * @return {this} This Game Object instance. + */ + setRotation: function (radians) + { + if (radians === undefined) { radians = 0; } + + this.rotation = radians; + + return this; + }, + + /** + * Sets the angle of this Game Object. + * + * @method Phaser.GameObjects.Components.Transform#setAngle + * @since 3.0.0 + * + * @param {number} [degrees=0] - The rotation of this Game Object, in degrees. + * + * @return {this} This Game Object instance. + */ + setAngle: function (degrees) + { + if (degrees === undefined) { degrees = 0; } + + this.angle = degrees; + + return this; + }, + + /** + * Sets the scale of this Game Object. + * + * @method Phaser.GameObjects.Components.Transform#setScale + * @since 3.0.0 + * + * @param {number} x - 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. + */ + setScale: function (x, y) + { + if (x === undefined) { x = 1; } + if (y === undefined) { y = x; } + + this.scaleX = x; + this.scaleY = y; + + return this; + }, + + /** + * Sets the x position of this Game Object. + * + * @method Phaser.GameObjects.Components.Transform#setX + * @since 3.0.0 + * + * @param {number} [value=0] - The x position of this Game Object. + * + * @return {this} This Game Object instance. + */ + setX: function (value) + { + if (value === undefined) { value = 0; } + + this.x = value; + + return this; + }, + + /** + * Sets the y position of this Game Object. + * + * @method Phaser.GameObjects.Components.Transform#setY + * @since 3.0.0 + * + * @param {number} [value=0] - The y position of this Game Object. + * + * @return {this} This Game Object instance. + */ + setY: function (value) + { + if (value === undefined) { value = 0; } + + this.y = value; + + return this; + }, + + /** + * Sets the z position of this Game Object. + * + * Note: The z position does not control the rendering order of 2D Game Objects. Use + * {@link Phaser.GameObjects.Components.Depth#setDepth} instead. + * + * @method Phaser.GameObjects.Components.Transform#setZ + * @since 3.0.0 + * + * @param {number} [value=0] - The z position of this Game Object. + * + * @return {this} This Game Object instance. + */ + setZ: function (value) + { + if (value === undefined) { value = 0; } + + this.z = value; + + return this; + }, + + /** + * Sets the w position of this Game Object. + * + * @method Phaser.GameObjects.Components.Transform#setW + * @since 3.0.0 + * + * @param {number} [value=0] - The w position of this Game Object. + * + * @return {this} This Game Object instance. + */ + setW: function (value) + { + if (value === undefined) { value = 0; } + + this.w = value; + + return this; + }, + + /** + * Gets the local transform matrix for this Game Object. + * + * @method Phaser.GameObjects.Components.Transform#getLocalTransformMatrix + * @since 3.4.0 + * + * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object. + * + * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix. + */ + getLocalTransformMatrix: function (tempMatrix) + { + if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); } + + return tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY); + }, + + /** + * Gets the world transform matrix for this Game Object, factoring in any parent Containers. + * + * @method Phaser.GameObjects.Components.Transform#getWorldTransformMatrix + * @since 3.4.0 + * + * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object. + * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A temporary matrix to hold parent values during the calculations. + * + * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix. + */ + getWorldTransformMatrix: function (tempMatrix, parentMatrix) + { + if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); } + if (parentMatrix === undefined) { parentMatrix = new TransformMatrix(); } + + var parent = this.parentContainer; + + if (!parent) + { + return this.getLocalTransformMatrix(tempMatrix); + } + + tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY); + + while (parent) + { + parentMatrix.applyITRS(parent.x, parent.y, parent._rotation, parent._scaleX, parent._scaleY); + + parentMatrix.multiply(tempMatrix, tempMatrix); + + parent = parent.parentContainer; + } + + return tempMatrix; + }, + + /** + * Takes the given `x` and `y` coordinates and converts them into local space for this + * Game Object, taking into account parent and local transforms, and the Display Origin. + * + * The returned Vector2 contains the translated point in its properties. + * + * A Camera needs to be provided in order to handle modified scroll factors. If no + * camera is specified, it will use the `main` camera from the Scene to which this + * Game Object belongs. + * + * @method Phaser.GameObjects.Components.Transform#getLocalPoint + * @since 3.50.0 + * + * @param {number} x - The x position to translate. + * @param {number} y - The y position to translate. + * @param {Phaser.Math.Vector2} [point] - A Vector2, or point-like object, to store the results in. + * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera which is being tested against. If not given will use the Scene default camera. + * + * @return {Phaser.Math.Vector2} The translated point. + */ + getLocalPoint: function (x, y, point, camera) + { + if (!point) { point = new Vector2(); } + if (!camera) { camera = this.scene.sys.cameras.main; } + + var csx = camera.scrollX; + var csy = camera.scrollY; + + var px = x + (csx * this.scrollFactorX) - csx; + var py = y + (csy * this.scrollFactorY) - csy; + + if (this.parentContainer) + { + this.getWorldTransformMatrix().applyInverse(px, py, point); + } + else + { + TransformXY(px, py, this.x, this.y, this.rotation, this.scaleX, this.scaleY, point); + } + + // Normalize origin + if (this._originComponent) + { + point.x += this._displayOriginX; + point.y += this._displayOriginY; + } + + return point; + }, + + /** + * Gets the sum total rotation of all of this Game Objects parent Containers. + * + * The returned value is in radians and will be zero if this Game Object has no parent container. + * + * @method Phaser.GameObjects.Components.Transform#getParentRotation + * @since 3.18.0 + * + * @return {number} The sum total rotation, in radians, of all parent containers of this Game Object. + */ + getParentRotation: function () + { + var rotation = 0; + + var parent = this.parentContainer; + + while (parent) + { + rotation += parent.rotation; + + parent = parent.parentContainer; + } + + return rotation; + } + +}; + +module.exports = Transform; + + +/***/ }), +/* 251 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// bitmask flag for GameObject.renderMask +var _FLAG = 1; // 0001 + +/** + * Provides methods used for setting the visibility of a Game Object. + * Should be applied as a mixin and not used directly. + * + * @namespace Phaser.GameObjects.Components.Visible + * @since 3.0.0 + */ + +var Visible = { + + /** + * Private internal value. Holds the visible value. + * + * @name Phaser.GameObjects.Components.Visible#_visible + * @type {boolean} + * @private + * @default true + * @since 3.0.0 + */ + _visible: true, + + /** + * The visible state of the Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * + * @name Phaser.GameObjects.Components.Visible#visible + * @type {boolean} + * @since 3.0.0 + */ + visible: { + + get: function () + { + return this._visible; + }, + + set: function (value) + { + if (value) + { + this._visible = true; + this.renderFlags |= _FLAG; + } + else + { + this._visible = false; + this.renderFlags &= ~_FLAG; + } + } + + }, + + /** + * Sets the visibility of this Game Object. + * + * An invisible Game Object will skip rendering, but will still process update logic. + * + * @method Phaser.GameObjects.Components.Visible#setVisible + * @since 3.0.0 + * + * @param {boolean} value - The visible state of the Game Object. + * + * @return {this} This Game Object instance. + */ + setVisible: function (value) + { + this.visible = value; + + return this; + } +}; + +module.exports = Visible; + + +/***/ }), +/* 252 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var renderWebGL = __webpack_require__(42); +var renderCanvas = __webpack_require__(42); + +if (typeof WEBGL_RENDERER) +{ + renderWebGL = __webpack_require__(253); +} + +if (typeof CANVAS_RENDERER) +{ + renderCanvas = __webpack_require__(254); +} + +module.exports = { + + renderWebGL: renderWebGL, + renderCanvas: renderCanvas + +}; + + +/***/ }), +/* 253 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Renders this Game Object with the WebGL Renderer to the given Camera. + * 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.Sprite#renderWebGL + * @since 3.0.0 + * @private + * + * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. + * @param {Phaser.GameObjects.Sprite} src - The Game Object being rendered in this call. + * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. + * @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 SpriteWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +{ + this.pipeline.batchSprite(src, camera, parentMatrix); +}; + +module.exports = SpriteWebGLRenderer; + + +/***/ }), +/* 254 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Renders this Game Object with the Canvas Renderer to the given Camera. + * 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.Sprite#renderCanvas + * @since 3.0.0 + * @private + * + * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. + * @param {Phaser.GameObjects.Sprite} src - The Game Object being rendered in this call. + * @param {number} interpolationPercentage - Reserved for future use and custom pipelines. + * @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 SpriteCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix) +{ + renderer.batchSprite(src, src.frame, camera, parentMatrix); +}; + +module.exports = SpriteCanvasRenderer; + + +/***/ }), +/* 255 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Camera = __webpack_require__(32); +var Class = __webpack_require__(0); +var Vector3 = __webpack_require__(3); + +// Local cache vars +var tmpVec3 = new Vector3(); + +/** + * @classdesc + * [description] + * + * @class PerspectiveCamera + * @extends Phaser.Cameras.Sprite3D.Camera + * @memberOf Phaser.Cameras.Sprite3D + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - [description] + * @param {integer} [fieldOfView=80] - [description] + * @param {integer} [viewportWidth=0] - [description] + * @param {integer} [viewportHeight=0] - [description] + */ +var PerspectiveCamera = new Class({ + + Extends: Camera, + + // FOV is converted to radians automatically + initialize: + + function PerspectiveCamera (scene, fieldOfView, viewportWidth, viewportHeight) + { + if (fieldOfView === undefined) { fieldOfView = 80; } + if (viewportWidth === undefined) { viewportWidth = 0; } + if (viewportHeight === undefined) { viewportHeight = 0; } + + Camera.call(this, scene); + + /** + * [description] + * + * @name Phaser.Cameras.Sprite3D.PerspectiveCamera#viewportWidth + * @type {integer} + * @default 0 + * @since 3.0.0 + */ + this.viewportWidth = viewportWidth; + + /** + * [description] + * + * @name Phaser.Cameras.Sprite3D.PerspectiveCamera#viewportHeight + * @type {integer} + * @default 0 + * @since 3.0.0 + */ + this.viewportHeight = viewportHeight; + + /** + * [description] + * + * @name Phaser.Cameras.Sprite3D.PerspectiveCamera#fieldOfView + * @type {integer} + * @default 80 + * @since 3.0.0 + */ + this.fieldOfView = fieldOfView * Math.PI / 180; + + this.update(); + }, + + /** + * [description] + * + * @method Phaser.Cameras.Sprite3D.PerspectiveCamera#setFOV + * @since 3.0.0 + * + * @param {number} value - [description] + * + * @return {Phaser.Cameras.Sprite3D.PerspectiveCamera} [description] + */ + setFOV: function (value) + { + this.fieldOfView = value * Math.PI / 180; + + return this; + }, + + /** + * [description] + * + * @method Phaser.Cameras.Sprite3D.PerspectiveCamera#update + * @since 3.0.0 + * + * @return {Phaser.Cameras.Sprite3D.PerspectiveCamera} [description] + */ + update: function () + { + var aspect = this.viewportWidth / this.viewportHeight; + + // Create a perspective matrix for our camera + this.projection.perspective( + this.fieldOfView, + aspect, + Math.abs(this.near), + Math.abs(this.far) + ); + + // Build the view matrix + tmpVec3.copy(this.position).add(this.direction); + + this.view.lookAt(this.position, tmpVec3, this.up); + + // Projection * view matrix + this.combined.copy(this.projection).multiply(this.view); + + // Invert combined matrix, used for unproject + this.invProjectionView.copy(this.combined).invert(); + + this.billboardMatrixDirty = true; + + this.updateChildren(); + + return this; + } + +}); + +module.exports = PerspectiveCamera; + + +/***/ }), +/* 256 */ +/***/ (function(module, exports, __webpack_require__) { + +/** +* @author Richard Davey +* @copyright 2020 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} +*/ + +var BasePlugin = __webpack_require__(257); +var Class = __webpack_require__(0); +var SceneEvents = __webpack_require__(258); + +/** + * @classdesc + * A Scene Level Plugin is installed into every Scene and belongs to that Scene. + * It can listen for Scene events and respond to them. + * It can map itself to a Scene property, or into the Scene Systems, or both. + * + * @class ScenePlugin + * @memberof Phaser.Plugins + * @extends Phaser.Plugins.BasePlugin + * @constructor + * @since 3.8.0 + * + * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin. + * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager. + */ +var ScenePlugin = new Class({ + + Extends: BasePlugin, + + initialize: + + function ScenePlugin (scene, pluginManager) + { + BasePlugin.call(this, pluginManager); + + /** + * A reference to the Scene that has installed this plugin. + * Only set if it's a Scene Plugin, otherwise `null`. + * This property is only set when the plugin is instantiated and added to the Scene, not before. + * You can use it during the `boot` method. + * + * @name Phaser.Plugins.ScenePlugin#scene + * @type {?Phaser.Scene} + * @protected + * @since 3.8.0 + */ + this.scene = scene; + + /** + * A reference to the Scene Systems of the Scene that has installed this plugin. + * Only set if it's a Scene Plugin, otherwise `null`. + * This property is only set when the plugin is instantiated and added to the Scene, not before. + * You can use it during the `boot` method. + * + * @name Phaser.Plugins.ScenePlugin#systems + * @type {?Phaser.Scenes.Systems} + * @protected + * @since 3.8.0 + */ + this.systems = scene.sys; + + scene.sys.events.once(SceneEvents.BOOT, this.boot, this); + }, + + /** + * This method is called when the Scene boots. It is only ever called once. + * + * By this point the plugin properties `scene` and `systems` will have already been set. + * + * In here you can listen for {@link Phaser.Scenes.Events Scene events} and set-up whatever you need for this plugin to run. + * Here are the Scene events you can listen to: + * + * - start + * - ready + * - preupdate + * - update + * - postupdate + * - resize + * - pause + * - resume + * - sleep + * - wake + * - transitioninit + * - transitionstart + * - transitioncomplete + * - transitionout + * - shutdown + * - destroy + * + * At the very least you should offer a destroy handler for when the Scene closes down, i.e: + * + * ```javascript + * var eventEmitter = this.systems.events; + * eventEmitter.once('destroy', this.sceneDestroy, this); + * ``` + * + * @method Phaser.Plugins.ScenePlugin#boot + * @since 3.8.0 + */ + boot: function () + { + }, + + /** + * Game instance has been destroyed. + * + * You must release everything in here, all references, all objects, free it all up. + * + * @method Phaser.Plugins.ScenePlugin#destroy + * @since 3.8.0 + */ + destroy: function () + { + this.pluginManager = null; + this.game = null; + this.scene = null; + this.systems = null; + } + +}); + +module.exports = ScenePlugin; + + +/***/ }), +/* 257 */ +/***/ (function(module, exports, __webpack_require__) { + +/** +* @author Richard Davey +* @copyright 2020 Photon Storm Ltd. +* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} +*/ + +var Class = __webpack_require__(0); + +/** + * @classdesc + * A Global Plugin is installed just once into the Game owned Plugin Manager. + * It can listen for Game events and respond to them. + * + * @class BasePlugin + * @memberof Phaser.Plugins + * @constructor + * @since 3.8.0 + * + * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager. + */ +var BasePlugin = new Class({ + + initialize: + + function BasePlugin (pluginManager) + { + /** + * A handy reference to the Plugin Manager that is responsible for this plugin. + * Can be used as a route to gain access to game systems and events. + * + * @name Phaser.Plugins.BasePlugin#pluginManager + * @type {Phaser.Plugins.PluginManager} + * @protected + * @since 3.8.0 + */ + this.pluginManager = pluginManager; + + /** + * A reference to the Game instance this plugin is running under. + * + * @name Phaser.Plugins.BasePlugin#game + * @type {Phaser.Game} + * @protected + * @since 3.8.0 + */ + this.game = pluginManager.game; + }, + + /** + * The PluginManager calls this method on a Global Plugin when the plugin is first instantiated. + * It will never be called again on this instance. + * In here you can set-up whatever you need for this plugin to run. + * If a plugin is set to automatically start then `BasePlugin.start` will be called immediately after this. + * On a Scene Plugin, this method is never called. Use {@link Phaser.Plugins.ScenePlugin#boot} instead. + * + * @method Phaser.Plugins.BasePlugin#init + * @since 3.8.0 + * + * @param {?any} [data] - A value specified by the user, if any, from the `data` property of the plugin's configuration object (if started at game boot) or passed in the PluginManager's `install` method (if started manually). + */ + init: function () + { + }, + + /** + * The PluginManager calls this method on a Global Plugin when the plugin is started. + * If a plugin is stopped, and then started again, this will get called again. + * Typically called immediately after `BasePlugin.init`. + * On a Scene Plugin, this method is never called. + * + * @method Phaser.Plugins.BasePlugin#start + * @since 3.8.0 + */ + start: function () + { + // Here are the game-level events you can listen to. + // At the very least you should offer a destroy handler for when the game closes down. + + // var eventEmitter = this.game.events; + + // eventEmitter.once('destroy', this.gameDestroy, this); + // eventEmitter.on('pause', this.gamePause, this); + // eventEmitter.on('resume', this.gameResume, this); + // eventEmitter.on('resize', this.gameResize, this); + // eventEmitter.on('prestep', this.gamePreStep, this); + // eventEmitter.on('step', this.gameStep, this); + // eventEmitter.on('poststep', this.gamePostStep, this); + // eventEmitter.on('prerender', this.gamePreRender, this); + // eventEmitter.on('postrender', this.gamePostRender, this); + }, + + /** + * The PluginManager calls this method on a Global Plugin when the plugin is stopped. + * The game code has requested that your plugin stop doing whatever it does. + * It is now considered as 'inactive' by the PluginManager. + * Handle that process here (i.e. stop listening for events, etc) + * If the plugin is started again then `BasePlugin.start` will be called again. + * On a Scene Plugin, this method is never called. + * + * @method Phaser.Plugins.BasePlugin#stop + * @since 3.8.0 + */ + stop: function () + { + }, + + /** + * Game instance has been destroyed. + * You must release everything in here, all references, all objects, free it all up. + * + * @method Phaser.Plugins.BasePlugin#destroy + * @since 3.8.0 + */ + destroy: function () + { + this.pluginManager = null; + this.game = null; + this.scene = null; + this.systems = null; + } + +}); + +module.exports = BasePlugin; + + +/***/ }), +/* 258 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Scenes.Events + */ + +module.exports = { + + ADDED_TO_SCENE: __webpack_require__(259), + BOOT: __webpack_require__(260), + CREATE: __webpack_require__(261), + DESTROY: __webpack_require__(262), + PAUSE: __webpack_require__(263), + POST_UPDATE: __webpack_require__(264), + PRE_UPDATE: __webpack_require__(265), + READY: __webpack_require__(266), + REMOVED_FROM_SCENE: __webpack_require__(267), + RENDER: __webpack_require__(268), + RESUME: __webpack_require__(269), + SHUTDOWN: __webpack_require__(270), + SLEEP: __webpack_require__(271), + START: __webpack_require__(272), + TRANSITION_COMPLETE: __webpack_require__(273), + TRANSITION_INIT: __webpack_require__(274), + TRANSITION_OUT: __webpack_require__(275), + TRANSITION_START: __webpack_require__(276), + TRANSITION_WAKE: __webpack_require__(277), + UPDATE: __webpack_require__(278), + WAKE: __webpack_require__(279) + +}; + + +/***/ }), +/* 259 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Object Added to Scene Event. + * + * This event is dispatched when a Game Object is added to a Scene. + * + * Listen for it from a Scene using `this.scene.events.on('addedtoscene', listener)`. + * + * @event Phaser.Scenes.Events#ADDED_TO_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene. + * @param {Phaser.Scene} scene - The Scene to which the Game Object was added. + */ +module.exports = 'addedtoscene'; + + +/***/ }), +/* 260 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Scene Systems Boot Event. + * + * This event is dispatched by a Scene during the Scene Systems boot process. Primarily used by Scene Plugins. + * + * Listen to it from a Scene using `this.scene.events.on('boot', listener)`. + * + * @event Phaser.Scenes.Events#BOOT + * @since 3.0.0 + * + * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event. + */ +module.exports = 'boot'; + + +/***/ }), +/* 261 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Scene Create Event. + * + * This event is dispatched by a Scene after it has been created by the Scene Manager. + * + * If a Scene has a `create` method then this event is emitted _after_ that has run. + * + * If there is a transition, this event will be fired after the `TRANSITION_START` event. + * + * Listen to it from a Scene using `this.scene.events.on('create', listener)`. + * + * @event Phaser.Scenes.Events#CREATE + * @since 3.17.0 + * + * @param {Phaser.Scene} scene - A reference to the Scene that emitted this event. + */ +module.exports = 'create'; + + +/***/ }), +/* 262 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Scene Systems Destroy Event. + * + * This event is dispatched by a Scene during the Scene Systems destroy process. + * + * Listen to it from a Scene using `this.scene.events.on('destroy', listener)`. + * + * You should destroy any resources that may be in use by your Scene in this event handler. + * + * @event Phaser.Scenes.Events#DESTROY + * @since 3.0.0 + * + * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event. + */ +module.exports = 'destroy'; + + +/***/ }), +/* 263 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Scene Systems Pause Event. + * + * This event is dispatched by a Scene when it is paused, either directly via the `pause` method, or as an + * action from another Scene. + * + * Listen to it from a Scene using `this.scene.events.on('pause', listener)`. + * + * @event Phaser.Scenes.Events#PAUSE + * @since 3.0.0 + * + * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event. + * @param {any} [data] - An optional data object that was passed to this Scene when it was paused. + */ +module.exports = 'pause'; + + +/***/ }), +/* 264 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Scene Systems Post Update Event. + * + * This event is dispatched by a Scene during the main game loop step. + * + * The event flow for a single step of a Scene is as follows: + * + * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE} + * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE} + * 3. The `Scene.update` method is called, if it exists + * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE} + * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} + * + * Listen to it from a Scene using `this.scene.events.on('postupdate', listener)`. + * + * A Scene will only run its step if it is active. + * + * @event Phaser.Scenes.Events#POST_UPDATE + * @since 3.0.0 + * + * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event. + * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. + * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. + */ +module.exports = 'postupdate'; + + +/***/ }), +/* 265 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Scene Systems Pre Update Event. + * + * This event is dispatched by a Scene during the main game loop step. + * + * The event flow for a single step of a Scene is as follows: + * + * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE} + * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE} + * 3. The `Scene.update` method is called, if it exists + * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE} + * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} + * + * Listen to it from a Scene using `this.scene.events.on('preupdate', listener)`. + * + * A Scene will only run its step if it is active. + * + * @event Phaser.Scenes.Events#PRE_UPDATE + * @since 3.0.0 + * + * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event. + * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. + * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. + */ +module.exports = 'preupdate'; + + +/***/ }), +/* 266 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Scene Systems Ready Event. + * + * This event is dispatched by a Scene during the Scene Systems start process. + * By this point in the process the Scene is now fully active and rendering. + * This event is meant for your game code to use, as all plugins have responded to the earlier 'start' event. + * + * Listen to it from a Scene using `this.scene.events.on('ready', listener)`. + * + * @event Phaser.Scenes.Events#READY + * @since 3.0.0 + * + * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event. + * @param {any} [data] - An optional data object that was passed to this Scene when it was started. + */ +module.exports = 'ready'; + + +/***/ }), +/* 267 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Object Removed from Scene Event. + * + * This event is dispatched when a Game Object is removed from a Scene. + * + * Listen for it from a Scene using `this.scene.events.on('removedfromscene', listener)`. + * + * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene. + * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed. + */ +module.exports = 'removedfromscene'; + + +/***/ }), +/* 268 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Scene Systems Render Event. + * + * This event is dispatched by a Scene during the main game loop step. + * + * The event flow for a single step of a Scene is as follows: + * + * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE} + * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE} + * 3. The `Scene.update` method is called, if it exists + * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE} + * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} + * + * Listen to it from a Scene using `this.scene.events.on('render', listener)`. + * + * A Scene will only render if it is visible and active. + * By the time this event is dispatched, the Scene will have already been rendered. + * + * @event Phaser.Scenes.Events#RENDER + * @since 3.0.0 + * + * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene. + */ +module.exports = 'render'; + + +/***/ }), +/* 269 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Scene Systems Resume Event. + * + * This event is dispatched by a Scene when it is resumed from a paused state, either directly via the `resume` method, + * or as an action from another Scene. + * + * Listen to it from a Scene using `this.scene.events.on('resume', listener)`. + * + * @event Phaser.Scenes.Events#RESUME + * @since 3.0.0 + * + * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event. + * @param {any} [data] - An optional data object that was passed to this Scene when it was resumed. + */ +module.exports = 'resume'; + + +/***/ }), +/* 270 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Scene Systems Shutdown Event. + * + * This event is dispatched by a Scene during the Scene Systems shutdown process. + * + * Listen to it from a Scene using `this.scene.events.on('shutdown', listener)`. + * + * You should free-up any resources that may be in use by your Scene in this event handler, on the understanding + * that the Scene may, at any time, become active again. A shutdown Scene is not 'destroyed', it's simply not + * currently active. Use the [DESTROY]{@linkcode Phaser.Scenes.Events#event:DESTROY} event to completely clear resources. + * + * @event Phaser.Scenes.Events#SHUTDOWN + * @since 3.0.0 + * + * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event. + * @param {any} [data] - An optional data object that was passed to this Scene when it was shutdown. + */ +module.exports = 'shutdown'; + + +/***/ }), +/* 271 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Scene Systems Sleep Event. + * + * This event is dispatched by a Scene when it is sent to sleep, either directly via the `sleep` method, + * or as an action from another Scene. + * + * Listen to it from a Scene using `this.scene.events.on('sleep', listener)`. + * + * @event Phaser.Scenes.Events#SLEEP + * @since 3.0.0 + * + * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event. + * @param {any} [data] - An optional data object that was passed to this Scene when it was sent to sleep. + */ +module.exports = 'sleep'; + + +/***/ }), +/* 272 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Scene Systems Start Event. + * + * This event is dispatched by a Scene during the Scene Systems start process. Primarily used by Scene Plugins. + * + * Listen to it from a Scene using `this.scene.events.on('start', listener)`. + * + * @event Phaser.Scenes.Events#START + * @since 3.0.0 + * + * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event. + */ +module.exports = 'start'; + + +/***/ }), +/* 273 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Scene Transition Complete Event. + * + * This event is dispatched by the Target Scene of a transition. + * + * It happens when the transition process has completed. This occurs when the duration timer equals or exceeds the duration + * of the transition. + * + * Listen to it from a Scene using `this.scene.events.on('transitioncomplete', listener)`. + * + * The Scene Transition event flow is as follows: + * + * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event. + * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method. + * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ... + * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to. + * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes. + * + * @event Phaser.Scenes.Events#TRANSITION_COMPLETE + * @since 3.5.0 + * + * @param {Phaser.Scene} scene -The Scene on which the transitioned completed. + */ +module.exports = 'transitioncomplete'; + + +/***/ }), +/* 274 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Scene Transition Init Event. + * + * This event is dispatched by the Target Scene of a transition. + * + * It happens immediately after the `Scene.init` method is called. If the Scene does not have an `init` method, + * this event is not dispatched. + * + * Listen to it from a Scene using `this.scene.events.on('transitioninit', listener)`. + * + * The Scene Transition event flow is as follows: + * + * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event. + * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method. + * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ... + * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to. + * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes. + * + * @event Phaser.Scenes.Events#TRANSITION_INIT + * @since 3.5.0 + * + * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from. + * @param {number} duration - The duration of the transition in ms. + */ +module.exports = 'transitioninit'; + + +/***/ }), +/* 275 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Scene Transition Out Event. + * + * This event is dispatched by a Scene when it initiates a transition to another Scene. + * + * Listen to it from a Scene using `this.scene.events.on('transitionout', listener)`. + * + * The Scene Transition event flow is as follows: + * + * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event. + * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method. + * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ... + * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to. + * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes. + * + * @event Phaser.Scenes.Events#TRANSITION_OUT + * @since 3.5.0 + * + * @param {Phaser.Scene} target - A reference to the Scene that is being transitioned to. + * @param {number} duration - The duration of the transition in ms. + */ +module.exports = 'transitionout'; + + +/***/ }), +/* 276 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Scene Transition Start Event. + * + * This event is dispatched by the Target Scene of a transition, only if that Scene was not asleep. + * + * It happens immediately after the `Scene.create` method is called. If the Scene does not have a `create` method, + * this event is dispatched anyway. + * + * If the Target Scene was sleeping then the [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} event is + * dispatched instead of this event. + * + * Listen to it from a Scene using `this.scene.events.on('transitionstart', listener)`. + * + * The Scene Transition event flow is as follows: + * + * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event. + * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method. + * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ... + * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to. + * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes. + * + * @event Phaser.Scenes.Events#TRANSITION_START + * @since 3.5.0 + * + * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from. + * @param {number} duration - The duration of the transition in ms. + */ +module.exports = 'transitionstart'; + + +/***/ }), +/* 277 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Scene Transition Wake Event. + * + * This event is dispatched by the Target Scene of a transition, only if that Scene was asleep before + * the transition began. If the Scene was not asleep the [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} event is dispatched instead. + * + * Listen to it from a Scene using `this.scene.events.on('transitionwake', listener)`. + * + * The Scene Transition event flow is as follows: + * + * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event. + * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method. + * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ... + * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to. + * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes. + * + * @event Phaser.Scenes.Events#TRANSITION_WAKE + * @since 3.5.0 + * + * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from. + * @param {number} duration - The duration of the transition in ms. + */ +module.exports = 'transitionwake'; + + +/***/ }), +/* 278 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Scene Systems Update Event. + * + * This event is dispatched by a Scene during the main game loop step. + * + * The event flow for a single step of a Scene is as follows: + * + * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE} + * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE} + * 3. The `Scene.update` method is called, if it exists + * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE} + * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER} + * + * Listen to it from a Scene using `this.scene.events.on('update', listener)`. + * + * A Scene will only run its step if it is active. + * + * @event Phaser.Scenes.Events#UPDATE + * @since 3.0.0 + * + * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event. + * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. + * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. + */ +module.exports = 'update'; + + +/***/ }), +/* 279 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Scene Systems Wake Event. + * + * This event is dispatched by a Scene when it is woken from sleep, either directly via the `wake` method, + * or as an action from another Scene. + * + * Listen to it from a Scene using `this.scene.events.on('wake', listener)`. + * + * @event Phaser.Scenes.Events#WAKE + * @since 3.0.0 + * + * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event. + * @param {any} [data] - An optional data object that was passed to this Scene when it was woken up. + */ +module.exports = 'wake'; + + /***/ }) /******/ ]); \ No newline at end of file diff --git a/plugins/camera3d/dist/camera3d.min.js b/plugins/camera3d/dist/camera3d.min.js index 7162f2be1..598872860 100644 --- a/plugins/camera3d/dist/camera3d.min.js +++ b/plugins/camera3d/dist/camera3d.min.js @@ -1 +1 @@ -var Camera3DPlugin=function(t){var i={};function e(n){if(i[n])return i[n].exports;var s=i[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,e),s.l=!0,s.exports}return e.m=t,e.c=i,e.d=function(t,i,n){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:n})},e.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},e.p="",e(e.s=74)}([function(t,i){function e(t,i,e){var n=e?t[i]:Object.getOwnPropertyDescriptor(t,i);return!e&&n.value&&"object"==typeof n.value&&(n=n.value),!(!n||!function(t){return!!t.get&&"function"==typeof t.get||!!t.set&&"function"==typeof t.set}(n))&&(void 0===n.enumerable&&(n.enumerable=!0),void 0===n.configurable&&(n.configurable=!0),n)}function n(t,i){var e=Object.getOwnPropertyDescriptor(t,i);return!!e&&(e.value&&"object"==typeof e.value&&(e=e.value),!1===e.configurable)}function s(t,i,s,r){for(var o in i)if(i.hasOwnProperty(o)){var a=e(i,o,s);if(!1!==a){if(n((r||t).prototype,o)){if(h.ignoreFinals)continue;throw new Error("cannot override final property '"+o+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,o,a)}else t.prototype[o]=i[o]}}function r(t,i){if(i){Array.isArray(i)||(i=[i]);for(var e=0;e0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=i*n,this.z=e*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var i=this.x,e=this.y,n=this.z,s=t.x,r=t.y,h=t.z;return this.x=e*h-n*r,this.y=n*s-i*h,this.z=i*r-e*s,this},lerp:function(t,i){void 0===i&&(i=0);var e=this.x,n=this.y,s=this.z;return this.x=e+i*(t.x-e),this.y=n+i*(t.y-n),this.z=s+i*(t.z-s),this},transformMat3:function(t){var i=this.x,e=this.y,n=this.z,s=t.val;return this.x=i*s[0]+e*s[3]+n*s[6],this.y=i*s[1]+e*s[4]+n*s[7],this.z=i*s[2]+e*s[5]+n*s[8],this},transformMat4:function(t){var i=this.x,e=this.y,n=this.z,s=t.val;return this.x=s[0]*i+s[4]*e+s[8]*n+s[12],this.y=s[1]*i+s[5]*e+s[9]*n+s[13],this.z=s[2]*i+s[6]*e+s[10]*n+s[14],this},transformCoordinates:function(t){var i=this.x,e=this.y,n=this.z,s=t.val,r=i*s[0]+e*s[4]+n*s[8]+s[12],h=i*s[1]+e*s[5]+n*s[9]+s[13],o=i*s[2]+e*s[6]+n*s[10]+s[14],a=i*s[3]+e*s[7]+n*s[11]+s[15];return this.x=r/a,this.y=h/a,this.z=o/a,this},transformQuat:function(t){var i=this.x,e=this.y,n=this.z,s=t.x,r=t.y,h=t.z,o=t.w,a=o*i+r*n-h*e,u=o*e+h*i-s*n,c=o*n+s*e-r*i,f=-s*i-r*e-h*n;return this.x=a*o+f*-s+u*-h-c*-r,this.y=u*o+f*-r+c*-s-a*-h,this.z=c*o+f*-h+a*-r-u*-s,this},project:function(t){var i=this.x,e=this.y,n=this.z,s=t.val,r=s[0],h=s[1],o=s[2],a=s[3],u=s[4],c=s[5],f=s[6],l=s[7],p=s[8],d=s[9],y=s[10],v=s[11],x=s[12],m=s[13],g=s[14],w=1/(i*a+e*l+n*v+s[15]);return this.x=(i*r+e*u+n*p+x)*w,this.y=(i*h+e*c+n*d+m)*w,this.z=(i*o+e*f+n*y+g)*w,this},unproject:function(t,i){var e=t.x,n=t.y,s=t.z,r=t.w,h=this.x-e,o=r-this.y-1-n,a=this.z;return this.x=2*h/s-1,this.y=2*o/r-1,this.z=2*a-1,this.project(i)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});t.exports=n},function(t,i,e){var n=new(e(0))({initialize:function(t,i){this.x=0,this.y=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0):(void 0===i&&(i=t),this.x=t||0,this.y=i||0)},clone:function(){return new n(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,i){return void 0===i&&(i=t),this.x=t,this.y=i,this},setTo:function(t,i){return this.set(t,i)},setToPolar:function(t,i){return null==i&&(i=1),this.x=Math.cos(t)*i,this.y=Math.sin(t)*i,this},equals:function(t){return this.x===t.x&&this.y===t.y},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},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 i=t.x-this.x,e=t.y-this.y;return Math.sqrt(i*i+e*e)},distanceSq:function(t){var i=t.x-this.x,e=t.y-this.y;return i*i+e*e},length:function(){var t=this.x,i=this.y;return Math.sqrt(t*t+i*i)},lengthSq:function(){var t=this.x,i=this.y;return t*t+i*i},normalize:function(){var t=this.x,i=this.y,e=t*t+i*i;return e>0&&(e=1/Math.sqrt(e),this.x=t*e,this.y=i*e),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=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,i){void 0===i&&(i=0);var e=this.x,n=this.y;return this.x=e+i*(t.x-e),this.y=n+i*(t.y-n),this},transformMat3:function(t){var i=this.x,e=this.y,n=t.val;return this.x=n[0]*i+n[3]*e+n[6],this.y=n[1]*i+n[4]*e+n[7],this},transformMat4:function(t){var i=this.x,e=this.y,n=t.val;return this.x=n[0]*i+n[4]*e+n[12],this.y=n[1]*i+n[5]*e+n[13],this},reset:function(){return this.x=0,this.y=0,this}});n.ZERO=new n,t.exports=n},function(t,i,e){var n=e(17),s=e(71);t.exports=function(t,i,e){var r=s(t,i,null);if(null===r)return e;if(Array.isArray(r))return n.RND.pick(r);if("object"==typeof r){if(r.hasOwnProperty("randInt"))return n.RND.integerInRange(r.randInt[0],r.randInt[1]);if(r.hasOwnProperty("randFloat"))return n.RND.realInRange(r.randFloat[0],r.randFloat[1])}else if("function"==typeof r)return r(i);return r}},function(t,i,e){var n=new(e(0))({initialize:function(t,i,e,n){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=i||0,this.z=e||0,this.w=n||0)},clone:function(){return new n(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,i,e,n){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=i||0,this.z=e||0,this.w=n||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,i=this.y,e=this.z,n=this.w;return Math.sqrt(t*t+i*i+e*e+n*n)},lengthSq:function(){var t=this.x,i=this.y,e=this.z,n=this.w;return t*t+i*i+e*e+n*n},normalize:function(){var t=this.x,i=this.y,e=this.z,n=this.w,s=t*t+i*i+e*e+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=i*s,this.z=e*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,i){void 0===i&&(i=0);var e=this.x,n=this.y,s=this.z,r=this.w;return this.x=e+i*(t.x-e),this.y=n+i*(t.y-n),this.z=s+i*(t.z-s),this.w=r+i*(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 i=t.x-this.x,e=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return Math.sqrt(i*i+e*e+n*n+s*s)},distanceSq:function(t){var i=t.x-this.x,e=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return i*i+e*e+n*n+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var i=this.x,e=this.y,n=this.z,s=this.w,r=t.val;return this.x=r[0]*i+r[4]*e+r[8]*n+r[12]*s,this.y=r[1]*i+r[5]*e+r[9]*n+r[13]*s,this.z=r[2]*i+r[6]*e+r[10]*n+r[14]*s,this.w=r[3]*i+r[7]*e+r[11]*n+r[15]*s,this},transformQuat:function(t){var i=this.x,e=this.y,n=this.z,s=t.x,r=t.y,h=t.z,o=t.w,a=o*i+r*n-h*e,u=o*e+h*i-s*n,c=o*n+s*e-r*i,f=-s*i-r*e-h*n;return this.x=a*o+f*-s+u*-h-c*-r,this.y=u*o+f*-r+c*-s-a*-h,this.z=c*o+f*-h+a*-r-u*-s,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});n.prototype.sub=n.prototype.subtract,n.prototype.mul=n.prototype.multiply,n.prototype.div=n.prototype.divide,n.prototype.dist=n.prototype.distance,n.prototype.distSq=n.prototype.distanceSq,n.prototype.len=n.prototype.length,n.prototype.lenSq=n.prototype.lengthSq,t.exports=n},function(t,i){t.exports=function(){}},function(t,i){t.exports=function(t,i,e){var n=e-i;return i+((t-i)%n+n)%n}},function(t,i,e){var n=new(e(0))({initialize:function(t,i,e,n,s,r){void 0===t&&(t=1),void 0===i&&(i=0),void 0===e&&(e=0),void 0===n&&(n=1),void 0===s&&(s=0),void 0===r&&(r=0),this.matrix=new Float32Array([t,i,e,n,s,r,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0}},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)}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.c*this.c)}},scaleY:{get:function(){return Math.sqrt(this.b*this.b+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,i){var e=this.matrix;return e[4]=e[0]*t+e[2]*i+e[4],e[5]=e[1]*t+e[3]*i+e[5],this},scale:function(t,i){var e=this.matrix;return e[0]*=t,e[1]*=t,e[2]*=i,e[3]*=i,this},rotate:function(t){var i=Math.sin(t),e=Math.cos(t),n=this.matrix,s=n[0],r=n[1],h=n[2],o=n[3];return n[0]=s*e+h*i,n[1]=r*e+o*i,n[2]=s*-i+h*e,n[3]=r*-i+o*e,this},multiply:function(t,i){var e=this.matrix,n=t.matrix,s=e[0],r=e[1],h=e[2],o=e[3],a=e[4],u=e[5],c=n[0],f=n[1],l=n[2],p=n[3],d=n[4],y=n[5],v=void 0===i?this:i;return v.a=c*s+f*h,v.b=c*r+f*o,v.c=l*s+p*h,v.d=l*r+p*o,v.e=d*s+y*h+a,v.f=d*r+y*o+u,v},multiplyWithOffset:function(t,i,e){var n=this.matrix,s=t.matrix,r=n[0],h=n[1],o=n[2],a=n[3],u=i*r+e*o+n[4],c=i*h+e*a+n[5],f=s[0],l=s[1],p=s[2],d=s[3],y=s[4],v=s[5];return n[0]=f*r+l*o,n[1]=f*h+l*a,n[2]=p*r+d*o,n[3]=p*h+d*a,n[4]=y*r+v*o+u,n[5]=y*h+v*a+c,this},transform:function(t,i,e,n,s,r){var h=this.matrix,o=h[0],a=h[1],u=h[2],c=h[3],f=h[4],l=h[5];return h[0]=t*o+i*u,h[1]=t*a+i*c,h[2]=e*o+n*u,h[3]=e*a+n*c,h[4]=s*o+r*u+f,h[5]=s*a+r*c+l,this},transformPoint:function(t,i,e){void 0===e&&(e={x:0,y:0});var n=this.matrix,s=n[0],r=n[1],h=n[2],o=n[3],a=n[4],u=n[5];return e.x=t*s+i*h+a,e.y=t*r+i*o+u,e},invert:function(){var t=this.matrix,i=t[0],e=t[1],n=t[2],s=t[3],r=t[4],h=t[5],o=i*s-e*n;return t[0]=s/o,t[1]=-e/o,t[2]=-n/o,t[3]=i/o,t[4]=(n*h-s*r)/o,t[5]=-(i*h-e*r)/o,this},copyFrom:function(t){var i=this.matrix;return i[0]=t.a,i[1]=t.b,i[2]=t.c,i[3]=t.d,i[4]=t.e,i[5]=t.f,this},copyFromArray:function(t){var i=this.matrix;return i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3],i[4]=t[4],i[5]=t[5],this},copyToContext:function(t){var i=this.matrix;return t.transform(i[0],i[1],i[2],i[3],i[4],i[5]),t},setToContext:function(t){var i=this.matrix;return t.setTransform(i[0],i[1],i[2],i[3],i[4],i[5]),t},copyToArray:function(t){var i=this.matrix;return void 0===t?t=[i[0],i[1],i[2],i[3],i[4],i[5]]:(t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5]),t},setTransform:function(t,i,e,n,s,r){var h=this.matrix;return h[0]=t,h[1]=i,h[2]=e,h[3]=n,h[4]=s,h[5]=r,this},decomposeMatrix:function(){var t=this.decomposedMatrix,i=this.matrix,e=i[0],n=i[1],s=i[2],r=i[3],h=e*e,o=n*n,a=s*s,u=r*r,c=Math.sqrt(h+a),f=Math.sqrt(o+u);return t.translateX=i[4],t.translateY=i[5],t.scaleX=c,t.scaleY=f,t.rotation=Math.acos(e/c)*(Math.atan(-s/e)<0?-1:1),t},applyITRS:function(t,i,e,n,s){var r=this.matrix,h=Math.sin(e),o=Math.cos(e);return r[4]=t,r[5]=i,r[0]=o*n,r[1]=h*n,r[2]=-h*s,r[3]=o*s,this},getX:function(t,i){return t*this.a+i*this.c+this.e},getY:function(t,i){return t*this.b+i*this.d+this.f},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.decomposedMatrix=null}});t.exports=n},function(t,i){t.exports=function(t){return 2*(t.width+t.height)}},function(t,i,e){var n=e(9),s=e(1);t.exports=function(t,i,e){if(void 0===e&&(e=new s),i<=0||i>=1)return e.x=t.x,e.y=t.y,e;var r=n(t)*i;return i>.5?(r-=t.width+t.height)<=t.width?(e.x=t.right-r,e.y=t.bottom):(e.x=t.x,e.y=t.bottom-(r-t.width)):r<=t.width?(e.x=t.x+r,e.y=t.y):(e.x=t.right,e.y=t.y+(r-t.width)),e}},function(t,i,e){t.exports={Alpha:e(62),Animation:e(60),BlendMode:e(59),ComputedSize:e(58),Crop:e(57),Depth:e(56),Flip:e(55),GetBounds:e(54),Mask:e(43),Origin:e(40),Pipeline:e(39),ScaleMode:e(38),ScrollFactor:e(37),Size:e(36),Texture:e(35),TextureCrop:e(34),Tint:e(33),ToJSON:e(32),Transform:e(31),TransformMatrix:e(8),Visible:e(28)}},function(t,i,e){var n=e(0),s=e(11),r=e(27),h=e(26),o=new n({Extends:h,initialize:function(t,i){h.call(this),this.scene=t,this.type=i,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,t.sys.queueDepthSort(),t.sys.events.once("shutdown",this.destroy,this)},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setDataEnabled:function(){return this.data||(this.data=new r(this)),this},setData:function(t,i){return this.data||(this.data=new r(this)),this.data.set(t,i),this},getData:function(t){return this.data||(this.data=new r(this)),this.data.get(t)},setInteractive:function(t,i,e){return this.scene.sys.input.enable(this,t,i,e),this},disableInteractive:function(){return this.input&&(this.input.enabled=!1),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},update:function(){},toJSON:function(){return s.ToJSON(this)},willRender:function(t){return!(o.RENDER_MASK!==this.renderFlags||this.cameraFilter>0&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,i=this.parentContainer,e=[];i&&(e.unshift(i.getIndex(t)),t=i,i.parentContainer);)i=i.parentContainer;return e.unshift(this.scene.sys.displayList.getIndex(t)),e},destroy:function(){if(this.scene&&!this.ignoreDestroy){this.preDestroy&&this.preDestroy.call(this),this.emit("destroy",this);var t=this.scene.sys;t.displayList.remove(this),t.updateList.remove(this),this.input&&(t.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),t.queueDepthSort(),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0,this.removeAllListeners()}}});o.RENDER_MASK=15,t.exports=o},function(t,i,e){var n=e(0),s=e(12),r=e(25),h=e(3),o=e(5),a=new n({Extends:s,initialize:function(t,i,e,n,a,u){s.call(this,t,"Sprite3D"),this.gameObject=new r(t,0,0,a,u),this.position=new o(i,e,n),this.size=new h(this.gameObject.width,this.gameObject.height),this.scale=new h(1,1),this.adjustScaleX=!0,this.adjustScaleY=!0,this._visible=!0},project:function(t){var i=this.position,e=this.gameObject;t.project(i,e),t.getPointSize(i,this.size,this.scale),this.scale.x<=0||this.scale.y<=0?e.setVisible(!1):(e.visible||e.setVisible(!0),this.adjustScaleX&&(e.scaleX=this.scale.x),this.adjustScaleY&&(e.scaleY=this.scale.y),e.setDepth(-1*e.z))},setVisible:function(t){return this.visible=t,this},visible:{get:function(){return this._visible},set:function(t){this._visible=t,this.gameObject.visible=t}},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}},z:{get:function(){return this.position.z},set:function(t){this.position.z=t}}});t.exports=a},function(t,i,e){var n=new(e(0))({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var i=this.val,e=t.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[4]=e[4],i[5]=e[5],i[6]=e[6],i[7]=e[7],i[8]=e[8],i[9]=e[9],i[10]=e[10],i[11]=e[11],i[12]=e[12],i[13]=e[13],i[14]=e[14],i[15]=e[15],this},fromArray:function(t){var i=this.val;return i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3],i[4]=t[4],i[5]=t[5],i[6]=t[6],i[7]=t[7],i[8]=t[8],i[9]=t[9],i[10]=t[10],i[11]=t[11],i[12]=t[12],i[13]=t[13],i[14]=t[14],i[15]=t[15],this},zero:function(){var t=this.val;return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=0,this},xyz:function(t,i,e){this.identity();var n=this.val;return n[12]=t,n[13]=i,n[14]=e,this},scaling:function(t,i,e){this.zero();var n=this.val;return n[0]=t,n[5]=i,n[10]=e,n[15]=1,this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},transpose:function(){var t=this.val,i=t[1],e=t[2],n=t[3],s=t[6],r=t[7],h=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=i,t[6]=t[9],t[7]=t[13],t[8]=e,t[9]=s,t[11]=t[14],t[12]=n,t[13]=r,t[14]=h,this},invert:function(){var t=this.val,i=t[0],e=t[1],n=t[2],s=t[3],r=t[4],h=t[5],o=t[6],a=t[7],u=t[8],c=t[9],f=t[10],l=t[11],p=t[12],d=t[13],y=t[14],v=t[15],x=i*h-e*r,m=i*o-n*r,g=i*a-s*r,w=e*o-n*h,z=e*a-s*h,M=n*a-s*o,_=u*d-c*p,b=u*y-f*p,T=u*v-l*p,A=c*y-f*d,F=c*v-l*d,P=f*v-l*y,O=x*P-m*F+g*A+w*T-z*b+M*_;return O?(O=1/O,t[0]=(h*P-o*F+a*A)*O,t[1]=(n*F-e*P-s*A)*O,t[2]=(d*M-y*z+v*w)*O,t[3]=(f*z-c*M-l*w)*O,t[4]=(o*T-r*P-a*b)*O,t[5]=(i*P-n*T+s*b)*O,t[6]=(y*g-p*M-v*m)*O,t[7]=(u*M-f*g+l*m)*O,t[8]=(r*F-h*T+a*_)*O,t[9]=(e*T-i*F-s*_)*O,t[10]=(p*z-d*g+v*x)*O,t[11]=(c*g-u*z-l*x)*O,t[12]=(h*b-r*A-o*_)*O,t[13]=(i*A-e*b+n*_)*O,t[14]=(d*m-p*w-y*x)*O,t[15]=(u*w-c*m+f*x)*O,this):null},adjoint:function(){var t=this.val,i=t[0],e=t[1],n=t[2],s=t[3],r=t[4],h=t[5],o=t[6],a=t[7],u=t[8],c=t[9],f=t[10],l=t[11],p=t[12],d=t[13],y=t[14],v=t[15];return t[0]=h*(f*v-l*y)-c*(o*v-a*y)+d*(o*l-a*f),t[1]=-(e*(f*v-l*y)-c*(n*v-s*y)+d*(n*l-s*f)),t[2]=e*(o*v-a*y)-h*(n*v-s*y)+d*(n*a-s*o),t[3]=-(e*(o*l-a*f)-h*(n*l-s*f)+c*(n*a-s*o)),t[4]=-(r*(f*v-l*y)-u*(o*v-a*y)+p*(o*l-a*f)),t[5]=i*(f*v-l*y)-u*(n*v-s*y)+p*(n*l-s*f),t[6]=-(i*(o*v-a*y)-r*(n*v-s*y)+p*(n*a-s*o)),t[7]=i*(o*l-a*f)-r*(n*l-s*f)+u*(n*a-s*o),t[8]=r*(c*v-l*d)-u*(h*v-a*d)+p*(h*l-a*c),t[9]=-(i*(c*v-l*d)-u*(e*v-s*d)+p*(e*l-s*c)),t[10]=i*(h*v-a*d)-r*(e*v-s*d)+p*(e*a-s*h),t[11]=-(i*(h*l-a*c)-r*(e*l-s*c)+u*(e*a-s*h)),t[12]=-(r*(c*y-f*d)-u*(h*y-o*d)+p*(h*f-o*c)),t[13]=i*(c*y-f*d)-u*(e*y-n*d)+p*(e*f-n*c),t[14]=-(i*(h*y-o*d)-r*(e*y-n*d)+p*(e*o-n*h)),t[15]=i*(h*f-o*c)-r*(e*f-n*c)+u*(e*o-n*h),this},determinant:function(){var t=this.val,i=t[0],e=t[1],n=t[2],s=t[3],r=t[4],h=t[5],o=t[6],a=t[7],u=t[8],c=t[9],f=t[10],l=t[11],p=t[12],d=t[13],y=t[14],v=t[15];return(i*h-e*r)*(f*v-l*y)-(i*o-n*r)*(c*v-l*d)+(i*a-s*r)*(c*y-f*d)+(e*o-n*h)*(u*v-l*p)-(e*a-s*h)*(u*y-f*p)+(n*a-s*o)*(u*d-c*p)},multiply:function(t){var i=this.val,e=i[0],n=i[1],s=i[2],r=i[3],h=i[4],o=i[5],a=i[6],u=i[7],c=i[8],f=i[9],l=i[10],p=i[11],d=i[12],y=i[13],v=i[14],x=i[15],m=t.val,g=m[0],w=m[1],z=m[2],M=m[3];return i[0]=g*e+w*h+z*c+M*d,i[1]=g*n+w*o+z*f+M*y,i[2]=g*s+w*a+z*l+M*v,i[3]=g*r+w*u+z*p+M*x,g=m[4],w=m[5],z=m[6],M=m[7],i[4]=g*e+w*h+z*c+M*d,i[5]=g*n+w*o+z*f+M*y,i[6]=g*s+w*a+z*l+M*v,i[7]=g*r+w*u+z*p+M*x,g=m[8],w=m[9],z=m[10],M=m[11],i[8]=g*e+w*h+z*c+M*d,i[9]=g*n+w*o+z*f+M*y,i[10]=g*s+w*a+z*l+M*v,i[11]=g*r+w*u+z*p+M*x,g=m[12],w=m[13],z=m[14],M=m[15],i[12]=g*e+w*h+z*c+M*d,i[13]=g*n+w*o+z*f+M*y,i[14]=g*s+w*a+z*l+M*v,i[15]=g*r+w*u+z*p+M*x,this},multiplyLocal:function(t){var i=[],e=this.val,n=t.val;return i[0]=e[0]*n[0]+e[1]*n[4]+e[2]*n[8]+e[3]*n[12],i[1]=e[0]*n[1]+e[1]*n[5]+e[2]*n[9]+e[3]*n[13],i[2]=e[0]*n[2]+e[1]*n[6]+e[2]*n[10]+e[3]*n[14],i[3]=e[0]*n[3]+e[1]*n[7]+e[2]*n[11]+e[3]*n[15],i[4]=e[4]*n[0]+e[5]*n[4]+e[6]*n[8]+e[7]*n[12],i[5]=e[4]*n[1]+e[5]*n[5]+e[6]*n[9]+e[7]*n[13],i[6]=e[4]*n[2]+e[5]*n[6]+e[6]*n[10]+e[7]*n[14],i[7]=e[4]*n[3]+e[5]*n[7]+e[6]*n[11]+e[7]*n[15],i[8]=e[8]*n[0]+e[9]*n[4]+e[10]*n[8]+e[11]*n[12],i[9]=e[8]*n[1]+e[9]*n[5]+e[10]*n[9]+e[11]*n[13],i[10]=e[8]*n[2]+e[9]*n[6]+e[10]*n[10]+e[11]*n[14],i[11]=e[8]*n[3]+e[9]*n[7]+e[10]*n[11]+e[11]*n[15],i[12]=e[12]*n[0]+e[13]*n[4]+e[14]*n[8]+e[15]*n[12],i[13]=e[12]*n[1]+e[13]*n[5]+e[14]*n[9]+e[15]*n[13],i[14]=e[12]*n[2]+e[13]*n[6]+e[14]*n[10]+e[15]*n[14],i[15]=e[12]*n[3]+e[13]*n[7]+e[14]*n[11]+e[15]*n[15],this.fromArray(i)},translate:function(t){var i=t.x,e=t.y,n=t.z,s=this.val;return s[12]=s[0]*i+s[4]*e+s[8]*n+s[12],s[13]=s[1]*i+s[5]*e+s[9]*n+s[13],s[14]=s[2]*i+s[6]*e+s[10]*n+s[14],s[15]=s[3]*i+s[7]*e+s[11]*n+s[15],this},scale:function(t){var i=t.x,e=t.y,n=t.z,s=this.val;return s[0]=s[0]*i,s[1]=s[1]*i,s[2]=s[2]*i,s[3]=s[3]*i,s[4]=s[4]*e,s[5]=s[5]*e,s[6]=s[6]*e,s[7]=s[7]*e,s[8]=s[8]*n,s[9]=s[9]*n,s[10]=s[10]*n,s[11]=s[11]*n,this},makeRotationAxis:function(t,i){var e=Math.cos(i),n=Math.sin(i),s=1-e,r=t.x,h=t.y,o=t.z,a=s*r,u=s*h;return this.fromArray([a*r+e,a*h-n*o,a*o+n*h,0,a*h+n*o,u*h+e,u*o-n*r,0,a*o-n*h,u*o+n*r,s*o*o+e,0,0,0,0,1]),this},rotate:function(t,i){var e=this.val,n=i.x,s=i.y,r=i.z,h=Math.sqrt(n*n+s*s+r*r);if(Math.abs(h)<1e-6)return null;n*=h=1/h,s*=h,r*=h;var o=Math.sin(t),a=Math.cos(t),u=1-a,c=e[0],f=e[1],l=e[2],p=e[3],d=e[4],y=e[5],v=e[6],x=e[7],m=e[8],g=e[9],w=e[10],z=e[11],M=n*n*u+a,_=s*n*u+r*o,b=r*n*u-s*o,T=n*s*u-r*o,A=s*s*u+a,F=r*s*u+n*o,P=n*r*u+s*o,O=s*r*u-n*o,R=r*r*u+a;return e[0]=c*M+d*_+m*b,e[1]=f*M+y*_+g*b,e[2]=l*M+v*_+w*b,e[3]=p*M+x*_+z*b,e[4]=c*T+d*A+m*F,e[5]=f*T+y*A+g*F,e[6]=l*T+v*A+w*F,e[7]=p*T+x*A+z*F,e[8]=c*P+d*O+m*R,e[9]=f*P+y*O+g*R,e[10]=l*P+v*O+w*R,e[11]=p*P+x*O+z*R,this},rotateX:function(t){var i=this.val,e=Math.sin(t),n=Math.cos(t),s=i[4],r=i[5],h=i[6],o=i[7],a=i[8],u=i[9],c=i[10],f=i[11];return i[4]=s*n+a*e,i[5]=r*n+u*e,i[6]=h*n+c*e,i[7]=o*n+f*e,i[8]=a*n-s*e,i[9]=u*n-r*e,i[10]=c*n-h*e,i[11]=f*n-o*e,this},rotateY:function(t){var i=this.val,e=Math.sin(t),n=Math.cos(t),s=i[0],r=i[1],h=i[2],o=i[3],a=i[8],u=i[9],c=i[10],f=i[11];return i[0]=s*n-a*e,i[1]=r*n-u*e,i[2]=h*n-c*e,i[3]=o*n-f*e,i[8]=s*e+a*n,i[9]=r*e+u*n,i[10]=h*e+c*n,i[11]=o*e+f*n,this},rotateZ:function(t){var i=this.val,e=Math.sin(t),n=Math.cos(t),s=i[0],r=i[1],h=i[2],o=i[3],a=i[4],u=i[5],c=i[6],f=i[7];return i[0]=s*n+a*e,i[1]=r*n+u*e,i[2]=h*n+c*e,i[3]=o*n+f*e,i[4]=a*n-s*e,i[5]=u*n-r*e,i[6]=c*n-h*e,i[7]=f*n-o*e,this},fromRotationTranslation:function(t,i){var e=this.val,n=t.x,s=t.y,r=t.z,h=t.w,o=n+n,a=s+s,u=r+r,c=n*o,f=n*a,l=n*u,p=s*a,d=s*u,y=r*u,v=h*o,x=h*a,m=h*u;return e[0]=1-(p+y),e[1]=f+m,e[2]=l-x,e[3]=0,e[4]=f-m,e[5]=1-(c+y),e[6]=d+v,e[7]=0,e[8]=l+x,e[9]=d-v,e[10]=1-(c+p),e[11]=0,e[12]=i.x,e[13]=i.y,e[14]=i.z,e[15]=1,this},fromQuat:function(t){var i=this.val,e=t.x,n=t.y,s=t.z,r=t.w,h=e+e,o=n+n,a=s+s,u=e*h,c=e*o,f=e*a,l=n*o,p=n*a,d=s*a,y=r*h,v=r*o,x=r*a;return i[0]=1-(l+d),i[1]=c+x,i[2]=f-v,i[3]=0,i[4]=c-x,i[5]=1-(u+d),i[6]=p+y,i[7]=0,i[8]=f+v,i[9]=p-y,i[10]=1-(u+l),i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,this},frustum:function(t,i,e,n,s,r){var h=this.val,o=1/(i-t),a=1/(n-e),u=1/(s-r);return h[0]=2*s*o,h[1]=0,h[2]=0,h[3]=0,h[4]=0,h[5]=2*s*a,h[6]=0,h[7]=0,h[8]=(i+t)*o,h[9]=(n+e)*a,h[10]=(r+s)*u,h[11]=-1,h[12]=0,h[13]=0,h[14]=r*s*2*u,h[15]=0,this},perspective:function(t,i,e,n){var s=this.val,r=1/Math.tan(t/2),h=1/(e-n);return s[0]=r/i,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+e)*h,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*e*h,s[15]=0,this},perspectiveLH:function(t,i,e,n){var s=this.val;return s[0]=2*e/t,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=2*e/i,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=-n/(e-n),s[11]=1,s[12]=0,s[13]=0,s[14]=e*n/(e-n),s[15]=0,this},ortho:function(t,i,e,n,s,r){var h=this.val,o=t-i,a=e-n,u=s-r;return o=0===o?o:1/o,a=0===a?a:1/a,u=0===u?u:1/u,h[0]=-2*o,h[1]=0,h[2]=0,h[3]=0,h[4]=0,h[5]=-2*a,h[6]=0,h[7]=0,h[8]=0,h[9]=0,h[10]=2*u,h[11]=0,h[12]=(t+i)*o,h[13]=(n+e)*a,h[14]=(r+s)*u,h[15]=1,this},lookAt:function(t,i,e){var n=this.val,s=t.x,r=t.y,h=t.z,o=e.x,a=e.y,u=e.z,c=i.x,f=i.y,l=i.z;if(Math.abs(s-c)<1e-6&&Math.abs(r-f)<1e-6&&Math.abs(h-l)<1e-6)return this.identity();var p=s-c,d=r-f,y=h-l,v=1/Math.sqrt(p*p+d*d+y*y),x=a*(y*=v)-u*(d*=v),m=u*(p*=v)-o*y,g=o*d-a*p;(v=Math.sqrt(x*x+m*m+g*g))?(x*=v=1/v,m*=v,g*=v):(x=0,m=0,g=0);var w=d*g-y*m,z=y*x-p*g,M=p*m-d*x;return(v=Math.sqrt(w*w+z*z+M*M))?(w*=v=1/v,z*=v,M*=v):(w=0,z=0,M=0),n[0]=x,n[1]=w,n[2]=p,n[3]=0,n[4]=m,n[5]=z,n[6]=d,n[7]=0,n[8]=g,n[9]=M,n[10]=y,n[11]=0,n[12]=-(x*s+m*r+g*h),n[13]=-(w*s+z*r+M*h),n[14]=-(p*s+d*r+y*h),n[15]=1,this},yawPitchRoll:function(t,i,e){this.zero(),s.zero(),r.zero();var n=this.val,h=s.val,o=r.val,a=Math.sin(e),u=Math.cos(e);return n[10]=1,n[15]=1,n[0]=u,n[1]=a,n[4]=-a,n[5]=u,a=Math.sin(i),u=Math.cos(i),h[0]=1,h[15]=1,h[5]=u,h[10]=u,h[9]=-a,h[6]=a,a=Math.sin(t),u=Math.cos(t),o[5]=1,o[15]=1,o[0]=u,o[2]=-a,o[8]=a,o[10]=u,this.multiplyLocal(s),this.multiplyLocal(r),this},setWorldMatrix:function(t,i,e,n,h){return this.yawPitchRoll(t.y,t.x,t.z),s.scaling(e.x,e.y,e.z),r.xyz(i.x,i.y,i.z),this.multiplyLocal(s),this.multiplyLocal(r),void 0!==n&&this.multiplyLocal(n),void 0!==h&&this.multiplyLocal(h),this}}),s=new n,r=new n;t.exports=n},function(t,i,e){var n=e(0),s=e(14),r=e(68),h=e(67),o=e(66),a=e(63),u=e(13),c=e(3),f=e(2),l=e(5),p=new f,d=new l,y=new f,v=new f,x=new s,m=new n({initialize:function(t){this.scene=t,this.displayList=t.sys.displayList,this.updateList=t.sys.updateList,this.name="",this.direction=new f(0,0,-1),this.up=new f(0,1,0),this.position=new f,this.pixelScale=128,this.projection=new s,this.view=new s,this.combined=new s,this.invProjectionView=new s,this.near=1,this.far=100,this.ray={origin:new f,direction:new f},this.viewportWidth=0,this.viewportHeight=0,this.billboardMatrixDirty=!0,this.children=new a},setPosition:function(t,i,e){return this.position.set(t,i,e),this.update()},setScene:function(t){return this.scene=t,this},setPixelScale:function(t){return this.pixelScale=t,this.update()},add:function(t){return this.children.set(t),this.displayList.add(t.gameObject),this.updateList.add(t.gameObject),this.updateChildren(),t},remove:function(t){return this.displayList.remove(t.gameObject),this.updateList.remove(t.gameObject),this.children.delete(t),this},clear:function(){for(var t=this.getChildren(),i=0;i>16)+(65280&t)+((255&t)<<16)},n={_tintTL:16777215,_tintTR:16777215,_tintBL:16777215,_tintBR:16777215,_isTinted:!1,tintFill:!1,clearTint:function(){return this.setTint(16777215),this._isTinted=!1,this},setTint:function(t,i,n,s){return void 0===t&&(t=16777215),void 0===i&&(i=t,n=t,s=t),this._tintTL=e(t),this._tintTR=e(i),this._tintBL=e(n),this._tintBR=e(s),this._isTinted=!0,this.tintFill=!1,this},setTintFill:function(t,i,e,n){return this.setTint(t,i,e,n),this.tintFill=!0,this},tintTopLeft:{get:function(){return this._tintTL},set:function(t){this._tintTL=e(t),this._isTinted=!0}},tintTopRight:{get:function(){return this._tintTR},set:function(t){this._tintTR=e(t),this._isTinted=!0}},tintBottomLeft:{get:function(){return this._tintBL},set:function(t){this._tintBL=e(t),this._isTinted=!0}},tintBottomRight:{get:function(){return this._tintBR},set:function(t){this._tintBR=e(t),this._isTinted=!0}},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){return this._isTinted}}};t.exports=n},function(t,i){var e={texture:null,frame:null,isCropped:!1,setCrop:function(t,i,e,n){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,i,e,n,this.flipX,this.flipY);else{var s=t;this.frame.setCropUVs(this._crop,s.x,s.y,s.width,s.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(t,i){return this.texture=this.scene.sys.textures.get(t),this.setFrame(i)},setFrame:function(t,i,e){return void 0===i&&(i=!0),void 0===e&&(e=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&i&&this.setSizeToFrame(),this._originComponent&&e&&(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=e},function(t,i){var e={texture:null,frame:null,isCropped:!1,setTexture:function(t,i){return this.texture=this.scene.sys.textures.get(t),this.setFrame(i)},setFrame:function(t,i,e){return void 0===i&&(i=!0),void 0===e&&(e=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&i&&this.setSizeToFrame(),this._originComponent&&e&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=e},function(t,i){var e={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.frame.realWidth},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return this.scaleY*this.frame.realHeight},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){return void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,this},setSize:function(t,i){return this.width=t,this.height=i,this},setDisplaySize:function(t,i){return this.displayWidth=t,this.displayHeight=i,this}};t.exports=e},function(t,i){var e={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,i){return void 0===i&&(i=t),this.scrollFactorX=t,this.scrollFactorY=i,this}};t.exports=e},function(t,i,e){var n=e(16),s={_scaleMode:n.DEFAULT,scaleMode:{get:function(){return this._scaleMode},set:function(t){t!==n.LINEAR&&t!==n.NEAREST||(this._scaleMode=t)}},setScaleMode:function(t){return this.scaleMode=t,this}};t.exports=s},function(t,i){t.exports={defaultPipeline:null,pipeline:null,initPipeline:function(t){var i=this.scene.sys.game.renderer;return!!(i&&i.gl&&i.hasPipeline(t))&&(this.defaultPipeline=i.getPipeline(t),this.pipeline=this.defaultPipeline,!0)},setPipeline:function(t){var i=this.scene.sys.game.renderer;return i&&i.gl&&i.hasPipeline(t)&&(this.pipeline=i.getPipeline(t)),this},resetPipeline:function(){return this.pipeline=this.defaultPipeline,null!==this.pipeline},getPipelineName:function(){return this.pipeline.name}}},function(t,i){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,i){return void 0===t&&(t=.5),void 0===i&&(i=t),this.originX=t,this.originY=i,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,i){return void 0===t&&(t=0),void 0===i&&(i=t),this.displayOriginX=t,this.displayOriginY=i,this},updateDisplayOrigin:function(){return this._displayOriginX=Math.round(this.originX*this.width),this._displayOriginY=Math.round(this.originY*this.height),this}};t.exports=e},function(t,i,e){var n=new(e(0))({initialize:function(t,i){this.geometryMask=i},setShape:function(t){this.geometryMask=t},preRenderWebGL:function(t,i,e){var n=t.gl,s=this.geometryMask;t.flush(),n.enable(n.STENCIL_TEST),n.clear(n.STENCIL_BUFFER_BIT),n.colorMask(!1,!1,!1,!1),n.stencilFunc(n.NOTEQUAL,1,1),n.stencilOp(n.REPLACE,n.REPLACE,n.REPLACE),s.renderWebGL(t,s,0,e),t.flush(),n.colorMask(!0,!0,!0,!0),n.stencilFunc(n.EQUAL,1,1),n.stencilOp(n.KEEP,n.KEEP,n.KEEP)},postRenderWebGL:function(t){var i=t.gl;t.flush(),i.disable(i.STENCIL_TEST)},preRenderCanvas:function(t,i,e){var n=this.geometryMask;t.currentContext.save(),n.renderCanvas(t,n,0,e,null,null,!0),t.currentContext.clip()},postRenderCanvas:function(t){t.currentContext.restore()},destroy:function(){this.geometryMask=null}});t.exports=n},function(t,i,e){var n=new(e(0))({initialize:function(t,i){var e=t.sys.game.renderer;if(this.renderer=e,this.bitmapMask=i,this.maskTexture=null,this.mainTexture=null,this.dirty=!0,this.mainFramebuffer=null,this.maskFramebuffer=null,this.invertAlpha=!1,e&&e.gl){var n=e.width,s=e.height,r=0==(n&n-1)&&0==(s&s-1),h=e.gl,o=r?h.REPEAT:h.CLAMP_TO_EDGE,a=h.LINEAR;this.mainTexture=e.createTexture2D(0,a,a,o,o,h.RGBA,null,n,s),this.maskTexture=e.createTexture2D(0,a,a,o,o,h.RGBA,null,n,s),this.mainFramebuffer=e.createFramebuffer(n,s,this.mainTexture,!1),this.maskFramebuffer=e.createFramebuffer(n,s,this.maskTexture,!1),e.onContextRestored(function(t){var i=t.width,e=t.height,n=0==(i&i-1)&&0==(e&e-1),s=t.gl,r=n?s.REPEAT:s.CLAMP_TO_EDGE,h=s.LINEAR;this.mainTexture=t.createTexture2D(0,h,h,r,r,s.RGBA,null,i,e),this.maskTexture=t.createTexture2D(0,h,h,r,r,s.RGBA,null,i,e),this.mainFramebuffer=t.createFramebuffer(i,e,this.mainTexture,!1),this.maskFramebuffer=t.createFramebuffer(i,e,this.maskTexture,!1)},this)}},setBitmap:function(t){this.bitmapMask=t},preRenderWebGL:function(t,i,e){t.pipelines.BitmapMaskPipeline.beginMask(this,i,e)},postRenderWebGL:function(t){t.pipelines.BitmapMaskPipeline.endMask(this)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null;var t=this.renderer;t&&t.gl&&(t.deleteTexture(this.mainTexture),t.deleteTexture(this.maskTexture),t.deleteFramebuffer(this.mainFramebuffer),t.deleteFramebuffer(this.maskFramebuffer)),this.mainTexture=null,this.maskTexture=null,this.mainFramebuffer=null,this.maskFramebuffer=null,this.renderer=null}});t.exports=n},function(t,i,e){var n=e(42),s=e(41),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){return void 0===t&&this.texture&&(t=this),new n(this.scene,t)},createGeometryMask:function(t){return void 0===t&&"Graphics"===this.type&&(t=this),new s(this.scene,t)}};t.exports=r},function(t,i){t.exports=function(t,i,e,n){var s=Math.cos(n),r=Math.sin(n),h=t.x-i,o=t.y-e;return t.x=h*s-o*r+i,t.y=h*r+o*s+e,t}},function(t,i,e){var n=e(1);t.exports=function(t,i){return void 0===i&&(i=new n),i.x=t.x+Math.random()*t.width,i.y=t.y+Math.random()*t.height,i}},function(t,i,e){var n=e(1);t.exports=function(t,i){void 0===i&&(i=new n);var e=Math.random();return i.x=t.x1+e*(t.x2-t.x1),i.y=t.y1+e*(t.y2-t.y1),i}},function(t,i){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,i,e){var n=e(47),s=e(1);t.exports=function(t,i,e,r){void 0===r&&(r=[]),i||(i=n(t)/e);for(var h=t.x1,o=t.y1,a=t.x2,u=t.y2,c=0;cthis.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=a},function(t,i,e){var n=e(10),s=e(9);t.exports=function(t,i,e,r){void 0===r&&(r=[]),i||(i=s(t)/e);for(var h=0;h=i&&t.y<=e&&t.y+t.height>=e}},function(t,i,e){var n=e(0),s=e(52),r=e(10),h=e(51),o=e(50),a=e(45),u=new n({initialize:function(t,i,e,n){void 0===t&&(t=0),void 0===i&&(i=0),void 0===e&&(e=0),void 0===n&&(n=0),this.x=t,this.y=i,this.width=e,this.height=n},contains:function(t,i){return s(this,t,i)},getPoint:function(t,i){return r(this,t,i)},getPoints:function(t,i,e){return h(this,t,i,e)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,i,e,n){return this.x=t,this.y=i,this.width=e,this.height=n,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(t,i){return void 0===i&&(i=t),this.x=t,this.y=i,this},setSize:function(t,i){return void 0===i&&(i=t),this.width=t,this.height=i,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(t){return void 0===t&&(t=new o),t.setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return void 0===t&&(t=new o),t.setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return void 0===t&&(t=new o),t.setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return void 0===t&&(t=new o),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},function(t,i,e){var n=e(53),s=e(44),r=e(3),h={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,i){(t||(t=new r),void 0===i&&(i=!1),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),i&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getTopRight:function(t,i){(t||(t=new r),void 0===i&&(i=!1),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,0!==this.rotation&&s(t,this.x,this.y,this.rotation),i&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getBottomLeft:function(t,i){(t||(t=new r),void 0===i&&(i=!1),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),i&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getBottomRight:function(t,i){(t||(t=new r),void 0===i&&(i=!1),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,0!==this.rotation&&s(t,this.x,this.y,this.rotation),i&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getBounds:function(t){var i,e,s,r,h,o,a,u;if(void 0===t&&(t=new n),this.parentContainer){var c=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(t),c.transformPoint(t.x,t.y,t),i=t.x,e=t.y,this.getTopRight(t),c.transformPoint(t.x,t.y,t),s=t.x,r=t.y,this.getBottomLeft(t),c.transformPoint(t.x,t.y,t),h=t.x,o=t.y,this.getBottomRight(t),c.transformPoint(t.x,t.y,t),a=t.x,u=t.y}else this.getTopLeft(t),i=t.x,e=t.y,this.getTopRight(t),s=t.x,r=t.y,this.getBottomLeft(t),h=t.x,o=t.y,this.getBottomRight(t),a=t.x,u=t.y;return t.x=Math.min(i,s,h,a),t.y=Math.min(e,r,o,u),t.width=Math.max(i,s,h,a)-t.x,t.height=Math.max(e,r,o,u)-t.y,t}};t.exports=h},function(t,i){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,i){return this.flipX=t,this.flipY=i,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},function(t,i){var e={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=e},function(t,i){var e={texture:null,frame:null,isCropped:!1,setCrop:function(t,i,e,n){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,i,e,n,this.flipX,this.flipY);else{var s=t;this.frame.setCropUVs(this._crop,s.x,s.y,s.width,s.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},function(t,i){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,i){return this.width=t,this.height=i,this},setDisplaySize:function(t,i){return this.displayWidth=t,this.displayHeight=i,this}}},function(t,i,e){var n=e(18),s={_blendMode:n.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=n[t]),(t|=0)>=-1&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,i,e){var n=new(e(0))({initialize:function(t){this.parent=t,this.animationManager=t.scene.sys.anims,this.animationManager.once("remove",this.remove,this),this.isPlaying=!1,this.currentAnim=null,this.currentFrame=null,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.forward=!0,this._reverse=!1,this.accumulator=0,this.nextTick=0,this.repeatCounter=0,this.pendingRepeat=!1,this._paused=!1,this._wasPlaying=!1,this._pendingStop=0,this._pendingStopValue},setDelay:function(t){return void 0===t&&(t=0),this._delay=t,this.parent},getDelay:function(){return this._delay},delayedPlay:function(t,i,e){return this.play(i,!0,e),this.nextTick+=t,this.parent},getCurrentKey:function(){if(this.currentAnim)return this.currentAnim.key},load:function(t,i){return void 0===i&&(i=0),this.isPlaying&&this.stop(),this.animationManager.load(this,t,i),this.parent},pause:function(t){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),void 0!==t&&this.updateFrame(t),this.parent},resume:function(t){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),void 0!==t&&this.updateFrame(t),this.parent},isPaused:{get:function(){return this._paused}},play:function(t,i,e){return void 0===i&&(i=!1),void 0===e&&(e=0),i&&this.isPlaying&&this.currentAnim.key===t?this.parent:(this.forward=!0,this._reverse=!1,this._startAnimation(t,e))},playReverse:function(t,i,e){return void 0===i&&(i=!1),void 0===e&&(e=0),i&&this.isPlaying&&this.currentAnim.key===t?this.parent:(this.forward=!1,this._reverse=!0,this._startAnimation(t,e))},_startAnimation:function(t,i){this.load(t,i);var e=this.currentAnim,n=this.parent;return this.repeatCounter=-1===this._repeat?Number.MAX_VALUE:this._repeat,e.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,e.showOnStart&&(n.visible=!0),n.emit("animationstart",this.currentAnim,this.currentFrame),n},reverse:function(t){return this.isPlaying&&this.currentAnim.key===t?(this._reverse=!this._reverse,this.forward=!this.forward,this.parent):this.parent},getProgress:function(){var t=this.currentFrame.progress;return this.forward||(t=1-t),t},setProgress:function(t){return this.forward||(t=1-t),this.setCurrentFrame(this.currentAnim.getFrameByProgress(t)),this.parent},remove:function(t,i){void 0===i&&(i=this.currentAnim),this.isPlaying&&i.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},getRepeat:function(){return this._repeat},setRepeat:function(t){return this._repeat=t,this.repeatCounter=0,this.parent},getRepeatDelay:function(){return this._repeatDelay},setRepeatDelay:function(t){return this._repeatDelay=t,this.parent},restart:function(t){return void 0===t&&(t=!1),this.currentAnim.getFirstTick(this,t),this.forward=!0,this.isPlaying=!0,this.pendingRepeat=!1,this._paused=!1,this.updateFrame(this.currentAnim.frames[0]),this.parent},stop:function(){this._pendingStop=0,this.isPlaying=!1;var t=this.parent;return t.emit("animationcomplete",this.currentAnim,this.currentFrame),t},stopAfterDelay:function(t){return this._pendingStop=1,this._pendingStopValue=t,this.parent},stopOnRepeat:function(){return this._pendingStop=2,this.parent},stopOnFrame:function(t){return this._pendingStop=3,this._pendingStopValue=t,this.parent},setTimeScale:function(t){return void 0===t&&(t=1),this._timeScale=t,this.parent},getTimeScale:function(){return this._timeScale},getTotalFrames:function(){return this.currentAnim.frames.length},update:function(t,i){if(this.currentAnim&&this.isPlaying&&!this.currentAnim.paused){if(this.accumulator+=i*this._timeScale,1===this._pendingStop&&(this._pendingStopValue-=i,this._pendingStopValue<=0))return this.currentAnim.completeAnimation(this);this.accumulator>=this.nextTick&&this.currentAnim.setFrame(this)}},setCurrentFrame:function(t){var i=this.parent;return this.currentFrame=t,i.texture=t.frame.texture,i.frame=t.frame,i.setSizeToFrame(),t.frame.customPivot?i.setOrigin(t.frame.pivotX,t.frame.pivotY):i.updateDisplayOrigin(),i},updateFrame:function(t){var i=this.setCurrentFrame(t);if(this.isPlaying){t.setAlpha&&(i.alpha=t.alpha);var e=this.currentAnim;i.emit("animationupdate",e,t),3===this._pendingStop&&this._pendingStopValue===t&&this.currentAnim.completeAnimation(this)}},setYoyo:function(t){return void 0===t&&(t=!1),this._yoyo=t,this.parent},getYoyo:function(){return this._yoyo},destroy:function(){this.animationManager.off("remove",this.remove,this),this.animationManager=null,this.parent=null,this.currentAnim=null,this.currentFrame=null}});t.exports=n},function(t,i){t.exports=function(t,i,e){return Math.max(i,Math.min(e,t))}},function(t,i,e){var n=e(61),s={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,i,e,s){return void 0===t&&(t=1),void 0===i?this.alpha=t:(this._alphaTL=n(t,0,1),this._alphaTR=n(i,0,1),this._alphaBL=n(e,0,1),this._alphaBR=n(s,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var i=n(t,0,1);this._alpha=i,this._alphaTL=i,this._alphaTR=i,this._alphaBL=i,this._alphaBR=i,0===i?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var i=n(t,0,1);this._alphaTL=i,0!==i&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var i=n(t,0,1);this._alphaTR=i,0!==i&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var i=n(t,0,1);this._alphaBL=i,0!==i&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var i=n(t,0,1);this._alphaBR=i,0!==i&&(this.renderFlags|=2)}}};t.exports=s},function(t,i,e){var n=new(e(0))({initialize:function(t){if(this.entries=[],Array.isArray(t))for(var i=0;i-1&&this.entries.splice(i,1),this},dump:function(){console.group("Set");for(var t=0;t-1},union:function(t){var i=new n;return t.entries.forEach(function(t){i.set(t)}),this.entries.forEach(function(t){i.set(t)}),i},intersect:function(t){var i=new n;return this.entries.forEach(function(e){t.contains(e)&&i.set(e)}),i},difference:function(t){var i=new n;return this.entries.forEach(function(e){t.contains(e)||i.set(e)}),i},size:{get:function(){return this.entries.length},set:function(t){return this.entries.length=t}}});t.exports=n},function(t,i,e){var n=new(e(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var i=this.val,e=t.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[4]=e[4],i[5]=e[5],i[6]=e[6],i[7]=e[7],i[8]=e[8],this},fromMat4:function(t){var i=t.val,e=this.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[4],e[4]=i[5],e[5]=i[6],e[6]=i[8],e[7]=i[9],e[8]=i[10],this},fromArray:function(t){var i=this.val;return i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3],i[4]=t[4],i[5]=t[5],i[6]=t[6],i[7]=t[7],i[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,i=t[1],e=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=i,t[5]=t[7],t[6]=e,t[7]=n,this},invert:function(){var t=this.val,i=t[0],e=t[1],n=t[2],s=t[3],r=t[4],h=t[5],o=t[6],a=t[7],u=t[8],c=u*r-h*a,f=-u*s+h*o,l=a*s-r*o,p=i*c+e*f+n*l;return p?(p=1/p,t[0]=c*p,t[1]=(-u*e+n*a)*p,t[2]=(h*e-n*r)*p,t[3]=f*p,t[4]=(u*i-n*o)*p,t[5]=(-h*i+n*s)*p,t[6]=l*p,t[7]=(-a*i+e*o)*p,t[8]=(r*i-e*s)*p,this):null},adjoint:function(){var t=this.val,i=t[0],e=t[1],n=t[2],s=t[3],r=t[4],h=t[5],o=t[6],a=t[7],u=t[8];return t[0]=r*u-h*a,t[1]=n*a-e*u,t[2]=e*h-n*r,t[3]=h*o-s*u,t[4]=i*u-n*o,t[5]=n*s-i*h,t[6]=s*a-r*o,t[7]=e*o-i*a,t[8]=i*r-e*s,this},determinant:function(){var t=this.val,i=t[0],e=t[1],n=t[2],s=t[3],r=t[4],h=t[5],o=t[6],a=t[7],u=t[8];return i*(u*r-h*a)+e*(-u*s+h*o)+n*(a*s-r*o)},multiply:function(t){var i=this.val,e=i[0],n=i[1],s=i[2],r=i[3],h=i[4],o=i[5],a=i[6],u=i[7],c=i[8],f=t.val,l=f[0],p=f[1],d=f[2],y=f[3],v=f[4],x=f[5],m=f[6],g=f[7],w=f[8];return i[0]=l*e+p*r+d*a,i[1]=l*n+p*h+d*u,i[2]=l*s+p*o+d*c,i[3]=y*e+v*r+x*a,i[4]=y*n+v*h+x*u,i[5]=y*s+v*o+x*c,i[6]=m*e+g*r+w*a,i[7]=m*n+g*h+w*u,i[8]=m*s+g*o+w*c,this},translate:function(t){var i=this.val,e=t.x,n=t.y;return i[6]=e*i[0]+n*i[3]+i[6],i[7]=e*i[1]+n*i[4]+i[7],i[8]=e*i[2]+n*i[5]+i[8],this},rotate:function(t){var i=this.val,e=i[0],n=i[1],s=i[2],r=i[3],h=i[4],o=i[5],a=Math.sin(t),u=Math.cos(t);return i[0]=u*e+a*r,i[1]=u*n+a*h,i[2]=u*s+a*o,i[3]=u*r-a*e,i[4]=u*h-a*n,i[5]=u*o-a*s,this},scale:function(t){var i=this.val,e=t.x,n=t.y;return i[0]=e*i[0],i[1]=e*i[1],i[2]=e*i[2],i[3]=n*i[3],i[4]=n*i[4],i[5]=n*i[5],this},fromQuat:function(t){var i=t.x,e=t.y,n=t.z,s=t.w,r=i+i,h=e+e,o=n+n,a=i*r,u=i*h,c=i*o,f=e*h,l=e*o,p=n*o,d=s*r,y=s*h,v=s*o,x=this.val;return x[0]=1-(f+p),x[3]=u+v,x[6]=c-y,x[1]=u-v,x[4]=1-(a+p),x[7]=l+d,x[2]=c+y,x[5]=l-d,x[8]=1-(a+f),this},normalFromMat4:function(t){var i=t.val,e=this.val,n=i[0],s=i[1],r=i[2],h=i[3],o=i[4],a=i[5],u=i[6],c=i[7],f=i[8],l=i[9],p=i[10],d=i[11],y=i[12],v=i[13],x=i[14],m=i[15],g=n*a-s*o,w=n*u-r*o,z=n*c-h*o,M=s*u-r*a,_=s*c-h*a,b=r*c-h*u,T=f*v-l*y,A=f*x-p*y,F=f*m-d*y,P=l*x-p*v,O=l*m-d*v,R=p*m-d*x,C=g*R-w*O+z*P+M*F-_*A+b*T;return C?(C=1/C,e[0]=(a*R-u*O+c*P)*C,e[1]=(u*F-o*R-c*A)*C,e[2]=(o*O-a*F+c*T)*C,e[3]=(r*O-s*R-h*P)*C,e[4]=(n*R-r*F+h*A)*C,e[5]=(s*F-n*O-h*T)*C,e[6]=(v*b-x*_+m*M)*C,e[7]=(x*z-y*b-m*w)*C,e[8]=(y*_-v*z+m*g)*C,this):null}});t.exports=n},function(t,i,e){var n=e(0),s=e(2),r=e(64),h=new Int8Array([1,2,0]),o=new Float32Array([0,0,0]),a=new s(1,0,0),u=new s(0,1,0),c=new s,f=new r,l=new n({initialize:function(t,i,e,n){"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=i||0,this.z=e||0,this.w=n||0)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},set:function(t,i,e,n){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=i||0,this.z=e||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,i=this.y,e=this.z,n=this.w;return Math.sqrt(t*t+i*i+e*e+n*n)},lengthSq:function(){var t=this.x,i=this.y,e=this.z,n=this.w;return t*t+i*i+e*e+n*n},normalize:function(){var t=this.x,i=this.y,e=this.z,n=this.w,s=t*t+i*i+e*e+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=i*s,this.z=e*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,i){void 0===i&&(i=0);var e=this.x,n=this.y,s=this.z,r=this.w;return this.x=e+i*(t.x-e),this.y=n+i*(t.y-n),this.z=s+i*(t.z-s),this.w=r+i*(t.w-r),this},rotationTo:function(t,i){var e=t.x*i.x+t.y*i.y+t.z*i.z;return e<-.999999?(c.copy(a).cross(t).length()<1e-6&&c.copy(u).cross(t),c.normalize(),this.setAxisAngle(c,Math.PI)):e>.999999?(this.x=0,this.y=0,this.z=0,this.w=1,this):(c.copy(t).cross(i),this.x=c.x,this.y=c.y,this.z=c.z,this.w=1+e,this.normalize())},setAxes:function(t,i,e){var n=f.val;return n[0]=i.x,n[3]=i.y,n[6]=i.z,n[1]=e.x,n[4]=e.y,n[7]=e.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(f).normalize()},identity:function(){return this.x=0,this.y=0,this.z=0,this.w=1,this},setAxisAngle:function(t,i){i*=.5;var e=Math.sin(i);return this.x=e*t.x,this.y=e*t.y,this.z=e*t.z,this.w=Math.cos(i),this},multiply:function(t){var i=this.x,e=this.y,n=this.z,s=this.w,r=t.x,h=t.y,o=t.z,a=t.w;return this.x=i*a+s*r+e*o-n*h,this.y=e*a+s*h+n*r-i*o,this.z=n*a+s*o+i*h-e*r,this.w=s*a-i*r-e*h-n*o,this},slerp:function(t,i){var e=this.x,n=this.y,s=this.z,r=this.w,h=t.x,o=t.y,a=t.z,u=t.w,c=e*h+n*o+s*a+r*u;c<0&&(c=-c,h=-h,o=-o,a=-a,u=-u);var f=1-i,l=i;if(1-c>1e-6){var p=Math.acos(c),d=Math.sin(p);f=Math.sin((1-i)*p)/d,l=Math.sin(i*p)/d}return this.x=f*e+l*h,this.y=f*n+l*o,this.z=f*s+l*a,this.w=f*r+l*u,this},invert:function(){var t=this.x,i=this.y,e=this.z,n=this.w,s=t*t+i*i+e*e+n*n,r=s?1/s:0;return this.x=-t*r,this.y=-i*r,this.z=-e*r,this.w=n*r,this},conjugate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},rotateX:function(t){t*=.5;var i=this.x,e=this.y,n=this.z,s=this.w,r=Math.sin(t),h=Math.cos(t);return this.x=i*h+s*r,this.y=e*h+n*r,this.z=n*h-e*r,this.w=s*h-i*r,this},rotateY:function(t){t*=.5;var i=this.x,e=this.y,n=this.z,s=this.w,r=Math.sin(t),h=Math.cos(t);return this.x=i*h-n*r,this.y=e*h+s*r,this.z=n*h+i*r,this.w=s*h-e*r,this},rotateZ:function(t){t*=.5;var i=this.x,e=this.y,n=this.z,s=this.w,r=Math.sin(t),h=Math.cos(t);return this.x=i*h+e*r,this.y=e*h-i*r,this.z=n*h+s*r,this.w=s*h-n*r,this},calculateW:function(){var t=this.x,i=this.y,e=this.z;return this.w=-Math.sqrt(1-t*t-i*i-e*e),this},fromMat3:function(t){var i,e=t.val,n=e[0]+e[4]+e[8];if(n>0)i=Math.sqrt(n+1),this.w=.5*i,i=.5/i,this.x=(e[7]-e[5])*i,this.y=(e[2]-e[6])*i,this.z=(e[3]-e[1])*i;else{var s=0;e[4]>e[0]&&(s=1),e[8]>e[3*s+s]&&(s=2);var r=h[s],a=h[r];i=Math.sqrt(e[3*s+s]-e[3*r+r]-e[3*a+a]+1),o[s]=.5*i,i=.5/i,o[r]=(e[3*r+s]+e[3*s+r])*i,o[a]=(e[3*a+s]+e[3*s+a])*i,this.x=o[0],this.y=o[1],this.z=o[2],this.w=(e[3*a+r]-e[3*r+a])*i}return this}});t.exports=l},function(t,i,e){var n=e(2),s=e(14),r=e(65),h=new s,o=new r,a=new n;t.exports=function(t,i,e){return o.setAxisAngle(i,e),h.fromRotationTranslation(o,a.set(0,0,0)),t.transformMat4(h)}},function(t,i){t.exports=function(t,i){return void 0===i&&(i=1),t.x=(2*Math.random()-1)*i,t.y=(2*Math.random()-1)*i,t.z=(2*Math.random()-1)*i,t.w=(2*Math.random()-1)*i,t}},function(t,i){t.exports=function(t,i){void 0===i&&(i=1);var e=2*Math.random()*Math.PI,n=2*Math.random()-1,s=Math.sqrt(1-n*n)*i;return t.x=Math.cos(e)*s,t.y=Math.sin(e)*s,t.z=n*i,t}},function(t,i,e){var n=e(15),s=e(0),r=new(e(2)),h=new s({Extends:n,initialize:function(t,i,e){void 0===i&&(i=0),void 0===e&&(e=0),n.call(this,t),this.viewportWidth=i,this.viewportHeight=e,this._zoom=1,this.near=0,this.update()},setToOrtho:function(t,i,e){void 0===i&&(i=this.viewportWidth),void 0===e&&(e=this.viewportHeight);var n=this.zoom;return this.up.set(0,t?-1:1,0),this.direction.set(0,0,t?1:-1),this.position.set(n*i/2,n*e/2,0),this.viewportWidth=i,this.viewportHeight=e,this.update()},update:function(){var t=this.viewportWidth,i=this.viewportHeight,e=Math.abs(this.near),n=Math.abs(this.far),s=this.zoom;return 0===t||0===i?this:(this.projection.ortho(s*-t/2,s*t/2,s*-i/2,s*i/2,e,n),r.copy(this.position).add(this.direction),this.view.lookAt(this.position,r,this.up),this.combined.copy(this.projection).multiply(this.view),this.invProjectionView.copy(this.combined).invert(),this.billboardMatrixDirty=!0,this.updateChildren(),this)},zoom:{get:function(){return this._zoom},set:function(t){this._zoom=t,this.update()}}});t.exports=h},function(t,i,e){var n=e(4);t.exports=function(t,i){var e=n(i,"anims",null);if(null===e)return t;if("string"==typeof e)t.anims.play(e);else if("object"==typeof e){var s=t.anims,r=n(e,"key",void 0),h=n(e,"startFrame",void 0),o=n(e,"delay",0),a=n(e,"repeat",0),u=n(e,"repeatDelay",0),c=n(e,"yoyo",!1),f=n(e,"play",!1),l=n(e,"delayedPlay",0);s.setDelay(o),s.setRepeat(a),s.setRepeatDelay(u),s.setYoyo(c),f?s.play(r,h):l>0?s.delayedPlay(l,r,h):s.load(r)}return t}},function(t,i){t.exports=function(t,i,e){if(t&&"number"!=typeof t){if(t.hasOwnProperty(i))return t[i];if(i.indexOf(".")){for(var n=i.split("."),s=t,r=e,h=0;h>>0,e=(i*=e)>>>0,e+=4294967296*(i-=e);return this.n=e,2.3283064365386963e-10*(e>>>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 i=0;i0;e--){var n=Math.floor(this.frac()*(i+1)),s=t[n];t[n]=t[e],t[e]=s}return t}});t.exports=n},function(t,i,e){var n=e(18),s=e(4),r=e(16);t.exports=function(t,i,e){i.x=s(e,"x",0),i.y=s(e,"y",0),i.depth=s(e,"depth",0),i.flipX=s(e,"flipX",!1),i.flipY=s(e,"flipY",!1);var h=s(e,"scale",null);"number"==typeof h?i.setScale(h):null!==h&&(i.scaleX=s(h,"x",1),i.scaleY=s(h,"y",1));var o=s(e,"scrollFactor",null);"number"==typeof o?i.setScrollFactor(o):null!==o&&(i.scrollFactorX=s(o,"x",1),i.scrollFactorY=s(o,"y",1)),i.rotation=s(e,"rotation",0);var a=s(e,"angle",null);null!==a&&(i.angle=a),i.alpha=s(e,"alpha",1);var u=s(e,"origin",null);if("number"==typeof u)i.setOrigin(u);else if(null!==u){var c=s(u,"x",.5),f=s(u,"y",.5);i.setOrigin(c,f)}return i.scaleMode=s(e,"scaleMode",r.DEFAULT),i.blendMode=s(e,"blendMode",n.NORMAL),i.visible=s(e,"visible",!0),s(e,"add",!0)&&t.sys.displayList.add(i),i.preUpdate&&t.sys.updateList.add(i),i}},function(t,i,e){var n=e(73),s=e(70),r=e(0),h=e(4),o=e(69),a=e(21),u=e(20),c=e(13),f=new r({Extends:u,initialize:function(t,i){u.call(this,t,i),this.cameras=[],i.registerGameObject("sprite3D",this.sprite3DFactory,this.sprite3DCreator)},sprite3DFactory:function(t,i,e,n,s){var r=new c(this.scene,t,i,e,n,s);return this.displayList.add(r.gameObject),this.updateList.add(r.gameObject),r},sprite3DCreator:function(t,i){void 0===t&&(t={});var e=h(t,"key",null),r=h(t,"frame",null),o=new c(this.scene,0,0,e,r);return void 0!==i&&(t.add=i),n(this.scene,o,t),s(o,t),o},boot:function(){this.systems.events.once("destroy",this.destroy,this)},start:function(){var t=this.systems.events;t.on("update",this.update,this),t.once("shutdown",this.shutdown,this)},add:function(t,i,e){return this.addPerspectiveCamera(t,i,e)},addOrthographicCamera:function(t,i){var e=this.scene.sys.game.config;void 0===t&&(t=e.width),void 0===i&&(i=e.height);var n=new o(this.scene,t,i);return this.cameras.push(n),n},addPerspectiveCamera:function(t,i,e){var n=this.scene.sys.game.config;void 0===t&&(t=80),void 0===i&&(i=n.width),void 0===e&&(e=n.height);var s=new a(this.scene,t,i,e);return this.cameras.push(s),s},getCamera:function(t){for(var i=0;i0;){this.cameras.pop().destroy()}return this.main},update:function(t,i){for(var e=0,n=this.cameras.length;er[0]&&(i=1),r[8]>r[3*i+i]&&(i=2),n=h[i],e=h[n],s=Math.sqrt(r[3*i+i]-r[3*n+n]-r[3*e+e]+1),a[i]=.5*s,s=.5/s,a[n]=(r[3*n+i]+r[3*i+n])*s,a[e]=(r[3*e+i]+r[3*i+e])*s,this.x=a[0],this.y=a[1],this.z=a[2],this.w=(r[3*e+n]-r[3*n+e])*s),this}});t.exports=p},function(t,i,n){var e=n(3),s=n(10),r=n(30),o=new s,h=new r,a=new e;t.exports=function(t,i,n){return h.setAxisAngle(i,n),o.fromRotationTranslation(h,a.set(0,0,0)),t.transformMat4(o)}},function(t,i,n){var e=n(0),s=n(10),r=n(25),o=n(26),h=n(31),a=n(158),u=n(33),c=n(1),f=n(3),p=n(9),l=new f,d=new p,y=new f,x=new f,v=new s,m=new e({initialize:function(t){this.scene=t,this.displayList=t.sys.displayList,this.updateList=t.sys.updateList,this.name="",this.direction=new f(0,0,-1),this.up=new f(0,1,0),this.position=new f,this.pixelScale=128,this.projection=new s,this.view=new s,this.combined=new s,this.invProjectionView=new s,this.near=1,this.far=100,this.ray={origin:new f,direction:new f},this.viewportWidth=0,this.viewportHeight=0,this.billboardMatrixDirty=!0,this.children=new a},setPosition:function(t,i,n){return this.position.set(t,i,n),this.update()},setScene:function(t){return this.scene=t,this},setPixelScale:function(t){return this.pixelScale=t,this.update()},add:function(t){return this.children.set(t),this.displayList.add(t.gameObject),this.updateList.add(t.gameObject),this.updateChildren(),t},remove:function(t){return this.displayList.remove(t.gameObject),this.updateList.remove(t.gameObject),this.children.delete(t),this},clear:function(){for(var t=this.getChildren(),i=0;iMath.PI&&(t-=e.PI2),Math.abs(((t+e.TAU)%e.PI2-e.PI2)%e.PI2)}},function(t,i,n){var e=n(7);t.exports=function(){return e(-Math.PI,Math.PI)}},function(t,i,n){var e=n(7);t.exports=function(){return e(-180,180)}},function(t,i,n){var e=n(14);t.exports=function(t){return e(t+Math.PI)}},function(t,i,n){var e=n(2);t.exports=function(t,i,n){return void 0===n&&(n=.05),t===i||(Math.abs(i-t)<=n||Math.abs(i-t)>=e.PI2-n?t=i:(Math.abs(i-t)>Math.PI&&(i>>0,n=(i*=n)>>>0,n+=4294967296*(i-=n);return 2.3283064365386963e-10*((this.n=n)>>>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 i=0;i=this.nextTick&&this.currentAnim.setFrame(this)}},setCurrentFrame:function(t){var i=this.parent;return this.currentFrame=t,i.texture=t.frame.texture,i.frame=t.frame,i.isCropped&&i.frame.updateCropUVs(i._crop,i.flipX,i.flipY),i.setSizeToFrame(),i._originComponent&&(t.frame.customPivot?i.setOrigin(t.frame.pivotX,t.frame.pivotY):i.updateDisplayOrigin()),i},updateFrame:function(t){var i,n=this.setCurrentFrame(t);this.isPlaying&&(t.setAlpha&&(n.alpha=t.alpha),i=this.currentAnim,n.emit(r.SPRITE_ANIMATION_KEY_UPDATE+i.key,i,t,n),n.emit(r.SPRITE_ANIMATION_UPDATE,i,t,n),3===this._pendingStop&&this._pendingStopValue===t&&this.currentAnim.completeAnimation(this))},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},setYoyo:function(t){return void 0===t&&(t=!1),this._yoyo=t,this.parent},getYoyo:function(){return this._yoyo},destroy:function(){this.animationManager.off(r.REMOVE_ANIMATION,this.remove,this),this.animationManager=null,this.parent=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null}});t.exports=o},function(t,i,n){var e=n(4),s=n(0),r=n(36),o=n(38),h=n(202),y=n(203),x=n(11),a=new s({Extends:r,initialize:function(t,i,n){r.call(this),this.manager=t,this.key=i,this.type="frame",this.frames=this.getFrames(t.textureManager,x(n,"frames",[]),x(n,"defaultTextureKey",null)),this.frameRate=x(n,"frameRate",null),this.duration=x(n,"duration",null),null===this.duration&&null===this.frameRate?(this.frameRate=24,this.duration=this.frameRate/this.frames.length*1e3):this.duration&&null===this.frameRate?this.frameRate=this.frames.length/(this.duration/1e3):this.duration=this.frames.length/this.frameRate*1e3,this.msPerFrame=1e3/this.frameRate,this.skipMissedFrames=x(n,"skipMissedFrames",!0),this.delay=x(n,"delay",0),this.repeat=x(n,"repeat",0),this.repeatDelay=x(n,"repeatDelay",0),this.yoyo=x(n,"yoyo",!1),this.showOnStart=x(n,"showOnStart",!1),this.hideOnComplete=x(n,"hideOnComplete",!1),this.paused=!1,this.manager.on(o.PAUSE_ALL,this.pause,this),this.manager.on(o.RESUME_ALL,this.resume,this)},addFrame:function(t){return this.addFrameAt(this.frames.length,t)},addFrameAt:function(t,i){var n,e,s=this.getFrames(this.manager.textureManager,i);return 0=this.frames.length&&(i=0),t.currentAnim!==this&&(t.currentAnim=this,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo);var n=this.frames[i];0!==i||t.forward||(n=this.getLastFrame()),t.updateFrame(n)},getFrameByProgress:function(t){return t=e(t,0,1),h(t,this.frames,"progress")},nextFrame:function(t){var i=t.currentFrame;i.isLast?t._yoyo?this.handleYoyoFrame(t,!1):0i.length&&(r=i.length),n?(e=i[r-1][n],(s=i[r][n])-t<=t-e?i[r]:i[r-1]):(e=i[r-1],(s=i[r])-t<=t-e?s:e)}},function(t,i,n){var e=new(n(0))({initialize:function(t,i,n,e){this.textureKey=t,this.textureFrame=i,this.index=n,this.frame=e,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0}});t.exports=e},function(t,i,n){var e=n(13),s={_blendMode:e.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=e[t]),-1<=(t|=0)&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,i){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,i){return this.width=t,this.height=i,this},setDisplaySize:function(t,i){return this.displayWidth=t,this.displayHeight=i,this}}},function(t,i){var n={texture:null,frame:null,isCropped:!1,setCrop:function(t,i,n,e){return void 0===t?this.isCropped=!1:this.frame&&("number"==typeof t?this.frame.setCropUVs(this._crop,t,i,n,e,this.flipX,this.flipY):this.frame.setCropUVs(this._crop,t.x,t.y,t.width,t.height,this.flipX,this.flipY),this.isCropped=!0),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},function(t,i){var n={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=n},function(t,i){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,i){return this.flipX=t,this.flipY=i,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},function(t,i,n){var c=n(210),e=n(27),s=n(1),r={prepareBoundsOutput:function(t,i){return void 0===i&&(i=!1),0!==this.rotation&&e(t,this.x,this.y,this.rotation),i&&this.parentContainer&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t),t},getCenter:function(t){return void 0===t&&(t=new s),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,i){return(t=t||new s).x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,i)},getTopCenter:function(t,i){return(t=t||new s).x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,i)},getTopRight:function(t,i){return(t=t||new s).x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,i)},getLeftCenter:function(t,i){return(t=t||new s).x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,i)},getRightCenter:function(t,i){return(t=t||new s).x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,i)},getBottomLeft:function(t,i){return(t=t||new s).x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,i)},getBottomCenter:function(t,i){return(t=t||new s).x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,i)},getBottomRight:function(t,i){return(t=t||new s).x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,i)},getBounds:function(t){var i,n,e,s,r,o,h,a,u;return void 0===t&&(t=new c),a=(h=(this.parentContainer?(u=this.parentContainer.getBoundsTransformMatrix(),this.getTopLeft(t),u.transformPoint(t.x,t.y,t),i=t.x,n=t.y,this.getTopRight(t),u.transformPoint(t.x,t.y,t),e=t.x,s=t.y,this.getBottomLeft(t),u.transformPoint(t.x,t.y,t),r=t.x,o=t.y,this.getBottomRight(t),u.transformPoint(t.x,t.y,t)):(this.getTopLeft(t),i=t.x,n=t.y,this.getTopRight(t),e=t.x,s=t.y,this.getBottomLeft(t),r=t.x,o=t.y,this.getBottomRight(t)),t.x),t.y),t.x=Math.min(i,e,r,h),t.y=Math.min(n,s,o,a),t.width=Math.max(i,e,r,h)-t.x,t.height=Math.max(n,s,o,a)-t.y,t}};t.exports=r},function(t,i,n){var e=n(0),s=n(211),r=n(39),o=n(212),h=n(12),a=n(213),u=n(218),c=new e({initialize:function(t,i,n,e){void 0===t&&(t=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===e&&(e=0),this.type=h.RECTANGLE,this.x=t,this.y=i,this.width=n,this.height=e},contains:function(t,i){return s(this,t,i)},getPoint:function(t,i){return r(this,t,i)},getPoints:function(t,i,n){return o(this,t,i,n)},getRandomPoint:function(t){return u(this,t)},setTo:function(t,i,n,e){return this.x=t,this.y=i,this.width=n,this.height=e,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(t,i){return void 0===i&&(i=t),this.x=t,this.y=i,this},setSize:function(t,i){return void 0===i&&(i=t),this.width=t,this.height=i,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(t){return void 0===t&&(t=new a),t.setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return void 0===t&&(t=new a),t.setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return void 0===t&&(t=new a),t.setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return void 0===t&&(t=new a),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=c},function(t,i){t.exports=function(t,i,n){return!(t.width<=0||t.height<=0)&&(t.x<=i&&t.x+t.width>=i&&t.y<=n&&t.y+t.height>=n)}},function(t,i,n){var o=n(39),h=n(40);t.exports=function(t,i,n,e){void 0===e&&(e=[]),!i&&0this.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=u},function(t,i,n){var e=n(5);t.exports=function(t,i,n){return void 0===n&&(n=new e),n.x=t.x1+(t.x2-t.x1)*i,n.y=t.y1+(t.y2-t.y1)*i,n}},function(t,i,n){var p=n(216),l=n(5);t.exports=function(t,i,n,e){void 0===e&&(e=[]),!i&&0>16)+(65280&t)+((255&t)<<16)}},function(t,i,n){var e=n(2),s=n(41),a=n(28),r=n(15),o=n(16),u=n(1),h={_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,0===(this._scaleY=t)?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){0===(this._scaleX=t)?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){0===(this._scaleY=t)?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return o(this._rotation*e.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*e.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=r(t)}},setPosition:function(t,i,n,e){return void 0===t&&(t=0),void 0===i&&(i=t),void 0===n&&(n=0),void 0===e&&(e=0),this.x=t,this.y=i,this.z=n,this.w=e,this},setRandomPosition:function(t,i,n,e){return void 0===t&&(t=0),void 0===i&&(i=0),void 0===n&&(n=this.scene.sys.scale.width),void 0===e&&(e=this.scene.sys.scale.height),this.x=t+Math.random()*n,this.y=i+Math.random()*e,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,i){return void 0===t&&(t=1),void 0===i&&(i=t),this.scaleX=t,this.scaleY=i,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 s),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t,i){void 0===t&&(t=new s),void 0===i&&(i=new s);var n=this.parentContainer;if(!n)return this.getLocalTransformMatrix(t);for(t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);n;)i.applyITRS(n.x,n.y,n._rotation,n._scaleX,n._scaleY),i.multiply(t,t),n=n.parentContainer;return t},getLocalPoint:function(t,i,n,e){n=n||new u;var s=(e=e||this.scene.sys.cameras.main).scrollX,r=e.scrollY,o=t+s*this.scrollFactorX-s,h=i+r*this.scrollFactorY-r;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(o,h,n):a(o,h,this.x,this.y,this.rotation,this.scaleX,this.scaleY,n),this._originComponent&&(n.x+=this._displayOriginX,n.y+=this._displayOriginY),n},getParentRotation:function(){for(var t=0,i=this.parentContainer;i;)t+=i.rotation,i=i.parentContainer;return t}};t.exports=h},function(t,i){var n={_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=n},function(t,i,n){var e=n(42),s=n(42),e=n(253),s=n(254);t.exports={renderWebGL:e,renderCanvas:s}},function(t,i){t.exports=function(t,i,n,e,s){this.pipeline.batchSprite(i,e,s)}},function(t,i){t.exports=function(t,i,n,e,s){t.batchSprite(i,i.frame,e,s)}},function(t,i,n){var s=n(32),e=n(0),r=new(n(3)),o=new e({Extends:s,initialize:function(t,i,n,e){void 0===i&&(i=80),void 0===n&&(n=0),void 0===e&&(e=0),s.call(this,t),this.viewportWidth=n,this.viewportHeight=e,this.fieldOfView=i*Math.PI/180,this.update()},setFOV:function(t){return this.fieldOfView=t*Math.PI/180,this},update:function(){var t=this.viewportWidth/this.viewportHeight;return this.projection.perspective(this.fieldOfView,t,Math.abs(this.near),Math.abs(this.far)),r.copy(this.position).add(this.direction),this.view.lookAt(this.position,r,this.up),this.combined.copy(this.projection).multiply(this.view),this.invProjectionView.copy(this.combined).invert(),this.billboardMatrixDirty=!0,this.updateChildren(),this}});t.exports=o},function(t,i,n){var e=n(257),s=n(0),r=n(258),o=new s({Extends:e,initialize:function(t,i){e.call(this,i),this.scene=t,this.systems=t.sys,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},function(t,i,n){var e=new(n(0))({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=e},function(t,i,n){t.exports={ADDED_TO_SCENE:n(259),BOOT:n(260),CREATE:n(261),DESTROY:n(262),PAUSE:n(263),POST_UPDATE:n(264),PRE_UPDATE:n(265),READY:n(266),REMOVED_FROM_SCENE:n(267),RENDER:n(268),RESUME:n(269),SHUTDOWN:n(270),SLEEP:n(271),START:n(272),TRANSITION_COMPLETE:n(273),TRANSITION_INIT:n(274),TRANSITION_OUT:n(275),TRANSITION_START:n(276),TRANSITION_WAKE:n(277),UPDATE:n(278),WAKE:n(279)}},function(t,i){t.exports="addedtoscene"},function(t,i){t.exports="boot"},function(t,i){t.exports="create"},function(t,i){t.exports="destroy"},function(t,i){t.exports="pause"},function(t,i){t.exports="postupdate"},function(t,i){t.exports="preupdate"},function(t,i){t.exports="ready"},function(t,i){t.exports="removedfromscene"},function(t,i){t.exports="render"},function(t,i){t.exports="resume"},function(t,i){t.exports="shutdown"},function(t,i){t.exports="sleep"},function(t,i){t.exports="start"},function(t,i){t.exports="transitioncomplete"},function(t,i){t.exports="transitioninit"},function(t,i){t.exports="transitionout"},function(t,i){t.exports="transitionstart"},function(t,i){t.exports="transitionwake"},function(t,i){t.exports="update"},function(t,i){t.exports="wake"}]); \ No newline at end of file diff --git a/plugins/camera3d/webpack.config.js b/plugins/camera3d/webpack.config.js index c5f8f5f9a..3b39894de 100644 --- a/plugins/camera3d/webpack.config.js +++ b/plugins/camera3d/webpack.config.js @@ -2,7 +2,8 @@ const webpack = require('webpack'); const UglifyJSPlugin = require('uglifyjs-webpack-plugin'); -const CleanWebpackPlugin = require('clean-webpack-plugin'); +const exec = require('child_process').exec; +const RemovePlugin = require('remove-files-webpack-plugin'); module.exports = { mode: 'production', @@ -42,6 +43,21 @@ module.exports = { }, plugins: [ - new CleanWebpackPlugin([ 'dist' ]) + new RemovePlugin({ + before: { + root: './plugins/camera3d/dist/', + include: [ 'camera3d.js', 'camera3d.min.js' ] + } + }), + { + apply: (compiler) => { + compiler.hooks.afterEmit.tap('AfterEmitPlugin', (compilation) => { + exec('node plugins/camera3d/copy-to-examples.js', (err, stdout, stderr) => { + if (stdout) process.stdout.write(stdout); + if (stderr) process.stderr.write(stderr); + }); + }); + } + } ] }; From 3eb79f61ffd9e814842713e53c3b95209a1c6ea9 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 26 Aug 2020 13:19:03 +0100 Subject: [PATCH 120/241] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e47224c16..dd393c819 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -262,6 +262,7 @@ The way in which Game Objects add themselves to the Scene Update List has change * `WebGLRenderer.finalType` is a new boolean property that signifies if the current Game Object being rendered is the final one in the list. * The `WebGLRenderer.updateCanvasTexture` method will now set `gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL` to true, which should stop issues where you update a Text Game Object, having added a Render Texture or Spine Game Object to the Scene after it, which switches the PMA setting. Fix #5064 #5155 (thanks @hugoruscitti @immangrove-supertree) * `Textures.Parsers.JSONHash` will now perform a `hasOwnProperty` check when iterating the frames, skipping anything that isn't a direct property. This should allow you to use generated atlas data that comes from `JSON.parse`. Fix #4768 (thanks @RollinSafary) +* The `Camera3D` Plugin has been rebuilt for Phaser 3.50 and the webpack config updated. ### Bug Fixes From ab83fd7e388f19f7b94ea614587f300d37725a32 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 26 Aug 2020 13:50:54 +0100 Subject: [PATCH 121/241] `Tween.seek` will no longer issue a console warning for `'Tween.seek duration too long'`, it's now up to you to check on the performance of tween seeking. --- src/tweens/tween/Tween.js | 48 +++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 27 deletions(-) diff --git a/src/tweens/tween/Tween.js b/src/tweens/tween/Tween.js index fd31af4f6..fee57d4c0 100644 --- a/src/tweens/tween/Tween.js +++ b/src/tweens/tween/Tween.js @@ -310,9 +310,9 @@ var Tween = new Class({ /** * An object containing the different Tween callback functions. - * + * * You can either set these in the Tween config, or by calling the `Tween.setCallback` method. - * + * * `onActive` When the Tween is moved from the pending to the active list in the Tween Manager, even if playback paused. * `onStart` When the Tween starts playing after a delayed state. Will happen at the same time as `onActive` if it has no delay. * `onYoyo` When a TweenData starts a yoyo. This happens _after_ the `hold` delay expires, if set. @@ -346,12 +346,12 @@ var Tween = new Class({ this.callbackScope; }, - /** + /** * Returns the current value of the specified Tween Data. * * @method Phaser.Tweens.Tween#getValue * @since 3.0.0 - * + * * @param {integer} [index=0] - The Tween Data to return the value from. * * @return {number} The value of the requested Tween Data. @@ -436,9 +436,9 @@ var Tween = new Class({ /** * Updates the 'end' value of the given property across all matching targets. - * + * * Calling this does not adjust the duration of the tween, or the current progress. - * + * * You can optionally tell it to set the 'start' value to be the current value (before the change). * * @method Phaser.Tweens.Tween#updateTo @@ -720,12 +720,12 @@ var Tween = new Class({ /** * Starts a Tween playing. - * + * * You only need to call this method if you have configured the tween to be paused on creation. - * + * * If the Tween is already playing, calling this method again will have no effect. If you wish to * restart the Tween, use `Tween.restart` instead. - * + * * Calling this method after the Tween has completed will start the Tween playing again from the start. * This is the same as calling `Tween.seek(0)` and then `Tween.play()`. * @@ -877,16 +877,17 @@ var Tween = new Class({ /** * Seeks to a specific point in the Tween. - * - * **Note:** You cannot seek a Tween that repeats or loops forever, or that has an unusually long total duration. - * + * + * **Note:** Be careful when seeking a Tween that repeats or loops forever, + * or that has an unusually long total duration, as it's possible to hang the browser. + * * The given position is a value between 0 and 1 which represents how far through the Tween to seek to. * A value of 0.5 would seek to half-way through the Tween, where-as a value of zero would seek to the start. - * + * * Note that the seek takes the entire duration of the Tween into account, including delays, loops and repeats. * For example, a Tween that lasts for 2 seconds, but that loops 3 times, would have a total duration of 6 seconds, * so seeking to 0.5 would seek to 3 seconds into the Tween, as that's half-way through its _entire_ duration. - * + * * Seeking works by resetting the Tween to its initial values and then iterating through the Tween at `delta` * jumps per step. The longer the Tween, the longer this can take. * @@ -902,13 +903,6 @@ var Tween = new Class({ { if (delta === undefined) { delta = 16.6; } - if (this.totalDuration >= 3600000) - { - console.warn('Tween.seek duration too long'); - - return this; - } - if (this.state === TWEEN_CONST.REMOVED) { this.makeActive(); @@ -987,11 +981,11 @@ var Tween = new Class({ /** * Sets an event based callback to be invoked during playback. - * + * * Calling this method will replace a previously set callback for the given type, if any exists. - * + * * The types available are: - * + * * `onActive` When the Tween is moved from the pending to the active list in the Tween Manager, even if playback paused. * `onStart` When the Tween starts playing after a delayed state. Will happen at the same time as `onActive` if it has no delay. * `onYoyo` When a TweenData starts a yoyo. This happens _after_ the `hold` delay expires, if set. @@ -1056,7 +1050,7 @@ var Tween = new Class({ /** * Immediately removes this Tween from the TweenManager and all of its internal arrays, * no matter what stage it as it. Then sets the tween state to `REMOVED`. - * + * * You should dispose of your reference to this tween after calling this method, to * free it from memory. * @@ -1159,7 +1153,7 @@ var Tween = new Class({ if (!this.hasStarted && !this.isSeeking) { this.startDelay -= delta; - + if (this.startDelay <= 0) { this.hasStarted = true; @@ -1272,7 +1266,7 @@ var Tween = new Class({ if (callback) { callback.params[1] = this.targets; - + callback.func.apply(callback.scope, callback.params); } } From 00b341f200a228796f1bb0664bc316271d2d1322 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 26 Aug 2020 13:50:57 +0100 Subject: [PATCH 122/241] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd393c819..0fdb6a070 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -263,6 +263,7 @@ The way in which Game Objects add themselves to the Scene Update List has change * The `WebGLRenderer.updateCanvasTexture` method will now set `gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL` to true, which should stop issues where you update a Text Game Object, having added a Render Texture or Spine Game Object to the Scene after it, which switches the PMA setting. Fix #5064 #5155 (thanks @hugoruscitti @immangrove-supertree) * `Textures.Parsers.JSONHash` will now perform a `hasOwnProperty` check when iterating the frames, skipping anything that isn't a direct property. This should allow you to use generated atlas data that comes from `JSON.parse`. Fix #4768 (thanks @RollinSafary) * The `Camera3D` Plugin has been rebuilt for Phaser 3.50 and the webpack config updated. +* `Tween.seek` will no longer issue a console warning for `'Tween.seek duration too long'`, it's now up to you to check on the performance of tween seeking. ### Bug Fixes From 141dd127320e8810e119064e07c5d2ee05cc26e6 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 26 Aug 2020 13:55:19 +0100 Subject: [PATCH 123/241] Update readme.md --- plugins/camera3d/readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/camera3d/readme.md b/plugins/camera3d/readme.md index ea327a091..a25f3d0d6 100644 --- a/plugins/camera3d/readme.md +++ b/plugins/camera3d/readme.md @@ -1,6 +1,8 @@ Phaser 3 Camera 3D Plugin ========================= +Note: As of 26th August 2020 this plugin is now considered deprecated and will not be supported any further. It has been fixed to work with the Phaser 3.50 release, but will not be updated beyond this. You're free to use it as you see fit, but please do not open issues about it on GitHub, thank you. + In Phaser 3.12 Camera 3D support was moved to its own external plugin. There are two ways to use this in your games: From 9277ccedd1555da53e03924952520fa27d03c21f Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 26 Aug 2020 13:57:10 +0100 Subject: [PATCH 124/241] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fdb6a070..85248bf93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -262,7 +262,7 @@ The way in which Game Objects add themselves to the Scene Update List has change * `WebGLRenderer.finalType` is a new boolean property that signifies if the current Game Object being rendered is the final one in the list. * The `WebGLRenderer.updateCanvasTexture` method will now set `gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL` to true, which should stop issues where you update a Text Game Object, having added a Render Texture or Spine Game Object to the Scene after it, which switches the PMA setting. Fix #5064 #5155 (thanks @hugoruscitti @immangrove-supertree) * `Textures.Parsers.JSONHash` will now perform a `hasOwnProperty` check when iterating the frames, skipping anything that isn't a direct property. This should allow you to use generated atlas data that comes from `JSON.parse`. Fix #4768 (thanks @RollinSafary) -* The `Camera3D` Plugin has been rebuilt for Phaser 3.50 and the webpack config updated. +* The `Camera3D` Plugin has been rebuilt for Phaser 3.50 and the webpack config updated. This plugin is now considered deprecated and will not be updated beyond this release. * `Tween.seek` will no longer issue a console warning for `'Tween.seek duration too long'`, it's now up to you to check on the performance of tween seeking. ### Bug Fixes From 57ee895437ca4c54f4b5925f6902e7d94836d504 Mon Sep 17 00:00:00 2001 From: samme Date: Thu, 27 Aug 2020 12:35:01 -0700 Subject: [PATCH 125/241] Reset flags during reset --- src/physics/arcade/Body.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/physics/arcade/Body.js b/src/physics/arcade/Body.js index 78d178729..3d489ffcd 100644 --- a/src/physics/arcade/Body.js +++ b/src/physics/arcade/Body.js @@ -1353,6 +1353,7 @@ var Body = new Class({ this.updateBounds(); this.updateCenter(); + this.resetFlags(); }, /** From 9451ac02859eb2a6259a927912e691d51f60c8db Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 29 Aug 2020 11:00:55 +0100 Subject: [PATCH 126/241] `Group.getMatching` is a new method that will return any members of the Group that match the given criteria, such as `getMatching('visible', true)` --- src/gameobjects/group/Group.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/gameobjects/group/Group.js b/src/gameobjects/group/Group.js index b5e7d2c80..98ca9d3f0 100644 --- a/src/gameobjects/group/Group.js +++ b/src/gameobjects/group/Group.js @@ -7,6 +7,7 @@ var Actions = require('../../actions/'); var Class = require('../../utils/Class'); var Events = require('../events'); +var GetAll = require('../../utils/array/GetAll'); var GetFastValue = require('../../utils/object/GetFastValue'); var GetValue = require('../../utils/object/GetValue'); var IsPlainObject = require('../../utils/object/IsPlainObject'); @@ -733,6 +734,30 @@ var Group = new Class({ return this.children.size; }, + /** + * Returns all children in this Group that match the given criteria based on the `property` and `value` arguments. + * + * For example: `getAll('visible', true)` would return only children that have their `visible` property set. + * + * Optionally, you can specify a start and end index. For example if the Group has 100 elements, + * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only + * the first 50. + * + * @method Phaser.GameObjects.Group#getMatching + * @since 3.50.0 + * + * @param {string} [property] - The property to test on each array element. + * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check. + * @param {integer} [startIndex] - An optional start index to search from. + * @param {integer} [endIndex] - An optional end index to search to. + * + * @return {any[]} An array of matching Group members. The array will be empty if nothing matched. + */ + getMatching: function (property, value, startIndex, endIndex) + { + return GetAll(this.children, property, value, startIndex, endIndex); + }, + /** * Scans the Group, from top to bottom, for the first member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument, * assigns `x` and `y`, and returns the member. From 8f48d39934239bac5ab68a5df560ac03ac1dac13 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 29 Aug 2020 11:00:58 +0100 Subject: [PATCH 127/241] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85248bf93..5add3a2a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -232,6 +232,7 @@ The way in which Game Objects add themselves to the Scene Update List has change * You can now use `this.renderer` from within a Scene, as it's now a Scene-level property and part of the Injection Map. * `Clock.addEvent` can now take an existing `TimerEvent` object, as well as a config object. If a `TimerEvent` is given it will be removed from the Clock, reset and then added. This allows you to pool TimerEvents rather than constantly create and delete them. Fix #4115 (thanks @jcyuan) * `Clock.removeEvent` is a new method that allows you to remove a `TimerEvent`, or an array of them, from all internal lists of the current Clock. +* `Group.getMatching` is a new method that will return any members of the Group that match the given criteria, such as `getMatching('visible', true)` (thanks @atursams) ### Updates and API Changes From 11c0520d36ba4a1f1665900cdb70db6854193c2e Mon Sep 17 00:00:00 2001 From: samme Date: Sat, 29 Aug 2020 11:56:15 -0700 Subject: [PATCH 128/241] Clear wasTouching when resetting body --- src/physics/arcade/Body.js | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/src/physics/arcade/Body.js b/src/physics/arcade/Body.js index 3d489ffcd..a0b5ac624 100644 --- a/src/physics/arcade/Body.js +++ b/src/physics/arcade/Body.js @@ -934,19 +934,37 @@ var Body = new Class({ * * @method Phaser.Physics.Arcade.Body#resetFlags * @since 3.18.0 + * + * @param {boolean} [clear=false] - Set the `wasTouching` values to their defaults. */ - resetFlags: function () + resetFlags: function (clear) { + if (clear === undefined) + { + clear = false; + } + // Store and reset collision flags var wasTouching = this.wasTouching; var touching = this.touching; var blocked = this.blocked; - wasTouching.none = touching.none; - wasTouching.up = touching.up; - wasTouching.down = touching.down; - wasTouching.left = touching.left; - wasTouching.right = touching.right; + if (clear) + { + wasTouching.none = true; + wasTouching.up = false; + wasTouching.down = false; + wasTouching.left = false; + wasTouching.right = false; + } + else + { + wasTouching.none = touching.none; + wasTouching.up = touching.up; + wasTouching.down = touching.down; + wasTouching.left = touching.left; + wasTouching.right = touching.right; + } touching.none = true; touching.up = false; @@ -1353,7 +1371,7 @@ var Body = new Class({ this.updateBounds(); this.updateCenter(); - this.resetFlags(); + this.resetFlags(true); }, /** From 1fa91daa39a6fc00e97d157e8ad1a90a63998d78 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 1 Sep 2020 10:46:22 +0100 Subject: [PATCH 129/241] The Spine Plugin `destroy` method will now no longer remove the Game Objects from the Game Object Factory, or dispose of the Scene Renderer. This means when a Scene is destroyed, it will keep the Game Objects in the factory for other Scene's to use. Fix #5279 `SpinePlugin.gameDestroy` is a new method that is called if the Game instance emits a `destroy` event. It removes the Spine Game Objects from the factory and disposes of the Spine scene renderer. --- plugins/spine/src/SpinePlugin.js | 37 +++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/plugins/spine/src/SpinePlugin.js b/plugins/spine/src/SpinePlugin.js index 12a7f9a6c..66e0a4dcf 100644 --- a/plugins/spine/src/SpinePlugin.js +++ b/plugins/spine/src/SpinePlugin.js @@ -411,6 +411,8 @@ var SpinePlugin = new Class({ eventEmitter.once('shutdown', this.shutdown, this); eventEmitter.once('destroy', this.destroy, this); + + this.game.events.once('destroy', this.gameDestroy, this); }, /** @@ -1095,15 +1097,6 @@ var SpinePlugin = new Class({ { this.shutdown(); - if (this.sceneRenderer) - { - this.sceneRenderer.dispose(); - } - - this.pluginManager.removeGameObject('spine', true, true); - this.pluginManager.removeGameObject('spineContainer', true, true); - - this.pluginManager = null; this.game = null; this.scene = null; this.systems = null; @@ -1112,9 +1105,33 @@ var SpinePlugin = new Class({ this.spineTextures = null; this.json = null; this.textures = null; - this.sceneRenderer = null; this.skeletonRenderer = null; this.gl = null; + }, + + /** + * The Game that owns this plugin is being destroyed. + * + * Dispose of the Scene Renderer and remove the Game Objects. + * + * @method SpinePlugin#gameDestroy + * @private + * @since 3.50.0 + */ + gameDestroy: function () + { + this.destroy(); + + if (this.sceneRenderer) + { + this.sceneRenderer.dispose(); + } + + this.sceneRenderer = null; + this.pluginManager = null; + + this.pluginManager.removeGameObject('spine', true, true); + this.pluginManager.removeGameObject('spineContainer', true, true); } }); From 4fef74ab87e27f6089901270a624a68180b13cc1 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 1 Sep 2020 10:46:25 +0100 Subject: [PATCH 130/241] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5add3a2a8..662870ae8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -209,6 +209,8 @@ The way in which Game Objects add themselves to the Scene Update List has change * The Spine TypeScript defs have been updated for the latest version of the plugin and to add SpineContainers. * The `SpineGameObject.setAnimation` method will now use the `trackIndex` parameter if `ignoreIfPlaying` is set and run the check against this track index. Fix #4842 (thanks @vinerz) * The `SpineFile` will no longer throw a warning if adding a texture into the Texture Manager that already exists. This allows you to have multiple Spine JSON use the same texture file, however, it also means you now get no warning if you accidentally load a texture that exists, so be careful with your keys! Fix #4947 (thanks @Nomy1) +* The Spine Plugin `destroy` method will now no longer remove the Game Objects from the Game Object Factory, or dispose of the Scene Renderer. This means when a Scene is destroyed, it will keep the Game Objects in the factory for other Scene's to use. Fix #5279 (thanks @Racoonacoon) +* `SpinePlugin.gameDestroy` is a new method that is called if the Game instance emits a `destroy` event. It removes the Spine Game Objects from the factory and disposes of the Spine scene renderer. ### New Features From 6aef37572def988baa0e9db93096009f2a1e473b Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 1 Sep 2020 13:05:31 +0100 Subject: [PATCH 131/241] `WebGLRenderer.previousPipeline` is a new property that is set during a call to `clearPipeline` and used during calls to `rebindPipeline`, allowing the renderer to rebind any previous pipeline, not just the Multi Pipeline. The `WebGLRenderer.rebindPipeline` method has been changed slightly. Previously, you had to specify the `pipelineInstance`, but this is now optional. If you don't, it will use the new `previousPipeline` property instead. If not set, or none given, it will now return without throwing gl errors as well. --- src/renderer/webgl/WebGLRenderer.js | 31 +++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/src/renderer/webgl/WebGLRenderer.js b/src/renderer/webgl/WebGLRenderer.js index 8cd870ccb..99533fe18 100644 --- a/src/renderer/webgl/WebGLRenderer.js +++ b/src/renderer/webgl/WebGLRenderer.js @@ -274,7 +274,7 @@ var WebGLRenderer = new Class({ this.normalTexture; /** - * Current framebuffer in use + * Current framebuffer in use. * * @name Phaser.Renderer.WebGL.WebGLRenderer#currentFramebuffer * @type {WebGLFramebuffer} @@ -284,7 +284,7 @@ var WebGLRenderer = new Class({ this.currentFramebuffer = null; /** - * Current WebGLPipeline in use + * Current WebGLPipeline in use. * * @name Phaser.Renderer.WebGL.WebGLRenderer#currentPipeline * @type {Phaser.Renderer.WebGL.WebGLPipeline} @@ -294,7 +294,18 @@ var WebGLRenderer = new Class({ this.currentPipeline = null; /** - * Current WebGLProgram in use + * The previous WebGLPipeline in use. + * This is set when `clearPipeline` is called and restored in `rebindPipeline` if none is given. + * + * @name Phaser.Renderer.WebGL.WebGLRenderer#previousPipeline + * @type {Phaser.Renderer.WebGL.WebGLPipeline} + * @default null + * @since 3.50.0 + */ + this.previousPipeline = null; + + /** + * Current WebGLProgram in use. * * @name Phaser.Renderer.WebGL.WebGLRenderer#currentProgram * @type {WebGLProgram} @@ -1206,10 +1217,20 @@ var WebGLRenderer = new Class({ * @method Phaser.Renderer.WebGL.WebGLRenderer#rebindPipeline * @since 3.16.0 * - * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipelineInstance - The pipeline instance to be activated. + * @param {Phaser.Renderer.WebGL.WebGLPipeline} [pipelineInstance] - The pipeline instance to be activated. */ rebindPipeline: function (pipelineInstance) { + if (pipelineInstance === undefined && this.previousPipeline) + { + pipelineInstance = this.previousPipeline; + } + + if (!pipelineInstance) + { + return; + } + var gl = this.gl; gl.disable(gl.DEPTH_TEST); @@ -1254,6 +1275,8 @@ var WebGLRenderer = new Class({ { this.flush(); + this.previousPipeline = this.currentPipeline; + this.currentPipeline = null; this.currentProgram = null; this.currentVertexBuffer = null; From d18e44d665ef7021eb09c2abf5595ed5082085e2 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 1 Sep 2020 13:05:54 +0100 Subject: [PATCH 132/241] Fixed rebind order. Fix #5277 --- .../SpineGameObjectWebGLRenderer.js | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js b/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js index 9a289d919..64dd7cc6c 100644 --- a/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js +++ b/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js @@ -30,6 +30,12 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent var childAlpha = skeleton.color.a; var sceneRenderer = plugin.sceneRenderer; + if (renderer.newType) + { + // flush + clear if this is a new type, even if it doesn't render + renderer.clearPipeline(); + } + var GameObjectRenderMask = 15; var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || childAlpha === 0); @@ -47,18 +53,13 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent // Reset the current type renderer.currentType = ''; - renderer.rebindPipeline(renderer.pipelines.MultiPipeline); + renderer.rebindPipeline(); } } return; } - if (renderer.newType) - { - renderer.clearPipeline(); - } - var camMatrix = renderer._tempMatrix1; var spriteMatrix = renderer._tempMatrix2; var calcMatrix = renderer._tempMatrix3; @@ -156,13 +157,11 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent if (!renderer.nextTypeMatch) { - // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch. + // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch sceneRenderer.end(); - if (!renderer.finalType) - { - renderer.rebindPipeline(renderer.pipelines.MultiPipeline); - } + // And rebind the previous pipeline + renderer.rebindPipeline(); } }; From 4ffa1bdbc57c524c50bee3dc929d6d2513707d27 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 1 Sep 2020 13:05:57 +0100 Subject: [PATCH 133/241] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 662870ae8..54af9ab0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -267,6 +267,8 @@ The way in which Game Objects add themselves to the Scene Update List has change * `Textures.Parsers.JSONHash` will now perform a `hasOwnProperty` check when iterating the frames, skipping anything that isn't a direct property. This should allow you to use generated atlas data that comes from `JSON.parse`. Fix #4768 (thanks @RollinSafary) * The `Camera3D` Plugin has been rebuilt for Phaser 3.50 and the webpack config updated. This plugin is now considered deprecated and will not be updated beyond this release. * `Tween.seek` will no longer issue a console warning for `'Tween.seek duration too long'`, it's now up to you to check on the performance of tween seeking. +* `WebGLRenderer.previousPipeline` is a new property that is set during a call to `clearPipeline` and used during calls to `rebindPipeline`, allowing the renderer to rebind any previous pipeline, not just the Multi Pipeline. +* The `WebGLRenderer.rebindPipeline` method has been changed slightly. Previously, you had to specify the `pipelineInstance`, but this is now optional. If you don't, it will use the new `previousPipeline` property instead. If not set, or none given, it will now return without throwing gl errors as well. ### Bug Fixes From 1406f23bd6278331e838f1f0985237bde8a6aede Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 1 Sep 2020 13:06:07 +0100 Subject: [PATCH 134/241] New dist debug builds --- plugins/spine/dist/SpinePluginDebug.js | 2148 ++++++++++---------- plugins/spine/dist/SpinePluginDebug.js.map | 2 +- 2 files changed, 1098 insertions(+), 1052 deletions(-) diff --git a/plugins/spine/dist/SpinePluginDebug.js b/plugins/spine/dist/SpinePluginDebug.js index cef4870fd..e4150385a 100644 --- a/plugins/spine/dist/SpinePluginDebug.js +++ b/plugins/spine/dist/SpinePluginDebug.js @@ -88,9 +88,9 @@ window["SpinePlugin"] = /******/ ({ /***/ "../../../node_modules/eventemitter3/index.js": -/*!**************************************************************!*\ - !*** D:/wamp/www/phaser/node_modules/eventemitter3/index.js ***! - \**************************************************************/ +/*!*******************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/node_modules/eventemitter3/index.js ***! + \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -436,9 +436,9 @@ if (true) { /***/ }), /***/ "../../../src/animations/Animation.js": -/*!******************************************************!*\ - !*** D:/wamp/www/phaser/src/animations/Animation.js ***! - \******************************************************/ +/*!***********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/animations/Animation.js ***! + \***********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -1405,9 +1405,9 @@ module.exports = Animation; /***/ }), /***/ "../../../src/animations/AnimationFrame.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/animations/AnimationFrame.js ***! - \***********************************************************/ +/*!****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/animations/AnimationFrame.js ***! + \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -1584,9 +1584,9 @@ module.exports = AnimationFrame; /***/ }), /***/ "../../../src/animations/events/ADD_ANIMATION_EVENT.js": -/*!***********************************************************************!*\ - !*** D:/wamp/www/phaser/src/animations/events/ADD_ANIMATION_EVENT.js ***! - \***********************************************************************/ +/*!****************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/ADD_ANIMATION_EVENT.js ***! + \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -1616,9 +1616,9 @@ module.exports = 'add'; /***/ }), /***/ "../../../src/animations/events/ANIMATION_COMPLETE_EVENT.js": -/*!****************************************************************************!*\ - !*** D:/wamp/www/phaser/src/animations/events/ANIMATION_COMPLETE_EVENT.js ***! - \****************************************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/ANIMATION_COMPLETE_EVENT.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -1649,9 +1649,9 @@ module.exports = 'complete'; /***/ }), /***/ "../../../src/animations/events/ANIMATION_REPEAT_EVENT.js": -/*!**************************************************************************!*\ - !*** D:/wamp/www/phaser/src/animations/events/ANIMATION_REPEAT_EVENT.js ***! - \**************************************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/ANIMATION_REPEAT_EVENT.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -1681,9 +1681,9 @@ module.exports = 'repeat'; /***/ }), /***/ "../../../src/animations/events/ANIMATION_RESTART_EVENT.js": -/*!***************************************************************************!*\ - !*** D:/wamp/www/phaser/src/animations/events/ANIMATION_RESTART_EVENT.js ***! - \***************************************************************************/ +/*!********************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/ANIMATION_RESTART_EVENT.js ***! + \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -1714,9 +1714,9 @@ module.exports = 'restart'; /***/ }), /***/ "../../../src/animations/events/ANIMATION_START_EVENT.js": -/*!*************************************************************************!*\ - !*** D:/wamp/www/phaser/src/animations/events/ANIMATION_START_EVENT.js ***! - \*************************************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/ANIMATION_START_EVENT.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -1747,9 +1747,9 @@ module.exports = 'start'; /***/ }), /***/ "../../../src/animations/events/PAUSE_ALL_EVENT.js": -/*!*******************************************************************!*\ - !*** D:/wamp/www/phaser/src/animations/events/PAUSE_ALL_EVENT.js ***! - \*******************************************************************/ +/*!************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/PAUSE_ALL_EVENT.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -1776,9 +1776,9 @@ module.exports = 'pauseall'; /***/ }), /***/ "../../../src/animations/events/REMOVE_ANIMATION_EVENT.js": -/*!**************************************************************************!*\ - !*** D:/wamp/www/phaser/src/animations/events/REMOVE_ANIMATION_EVENT.js ***! - \**************************************************************************/ +/*!*******************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/REMOVE_ANIMATION_EVENT.js ***! + \*******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -1805,9 +1805,9 @@ module.exports = 'remove'; /***/ }), /***/ "../../../src/animations/events/RESUME_ALL_EVENT.js": -/*!********************************************************************!*\ - !*** D:/wamp/www/phaser/src/animations/events/RESUME_ALL_EVENT.js ***! - \********************************************************************/ +/*!*************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/RESUME_ALL_EVENT.js ***! + \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -1833,9 +1833,9 @@ module.exports = 'resumeall'; /***/ }), /***/ "../../../src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js": -/*!***********************************************************************************!*\ - !*** D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js ***! - \***********************************************************************************/ +/*!****************************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js ***! + \****************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -1867,9 +1867,9 @@ module.exports = 'animationcomplete'; /***/ }), /***/ "../../../src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js": -/*!***************************************************************************************!*\ - !*** D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js ***! - \***************************************************************************************/ +/*!********************************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js ***! + \********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -1900,9 +1900,9 @@ module.exports = 'animationcomplete-'; /***/ }), /***/ "../../../src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js": -/*!*************************************************************************************!*\ - !*** D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js ***! - \*************************************************************************************/ +/*!******************************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js ***! + \******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -1934,9 +1934,9 @@ module.exports = 'animationrepeat-'; /***/ }), /***/ "../../../src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js": -/*!**************************************************************************************!*\ - !*** D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js ***! - \**************************************************************************************/ +/*!*******************************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js ***! + \*******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -1967,9 +1967,9 @@ module.exports = 'animationrestart-'; /***/ }), /***/ "../../../src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js": -/*!************************************************************************************!*\ - !*** D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js ***! - \************************************************************************************/ +/*!*****************************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js ***! + \*****************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2000,9 +2000,9 @@ module.exports = 'animationstart-'; /***/ }), /***/ "../../../src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js": -/*!*************************************************************************************!*\ - !*** D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js ***! - \*************************************************************************************/ +/*!******************************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js ***! + \******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2034,9 +2034,9 @@ module.exports = 'animationupdate-'; /***/ }), /***/ "../../../src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js": -/*!*********************************************************************************!*\ - !*** D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js ***! - \*********************************************************************************/ +/*!**************************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js ***! + \**************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2069,9 +2069,9 @@ module.exports = 'animationrepeat'; /***/ }), /***/ "../../../src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js": -/*!**********************************************************************************!*\ - !*** D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js ***! - \**********************************************************************************/ +/*!***************************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js ***! + \***************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2103,9 +2103,9 @@ module.exports = 'animationrestart'; /***/ }), /***/ "../../../src/animations/events/SPRITE_ANIMATION_START_EVENT.js": -/*!********************************************************************************!*\ - !*** D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_START_EVENT.js ***! - \********************************************************************************/ +/*!*************************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_START_EVENT.js ***! + \*************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2137,9 +2137,9 @@ module.exports = 'animationstart'; /***/ }), /***/ "../../../src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js": -/*!*********************************************************************************!*\ - !*** D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js ***! - \*********************************************************************************/ +/*!**************************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js ***! + \**************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2172,9 +2172,9 @@ module.exports = 'animationupdate'; /***/ }), /***/ "../../../src/animations/events/index.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/animations/events/index.js ***! - \*********************************************************/ +/*!**************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/animations/events/index.js ***! + \**************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -2215,9 +2215,9 @@ module.exports = { /***/ }), /***/ "../../../src/core/events/BLUR_EVENT.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/core/events/BLUR_EVENT.js ***! - \********************************************************/ +/*!*************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/core/events/BLUR_EVENT.js ***! + \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2243,9 +2243,9 @@ module.exports = 'blur'; /***/ }), /***/ "../../../src/core/events/BOOT_EVENT.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/core/events/BOOT_EVENT.js ***! - \********************************************************/ +/*!*************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/core/events/BOOT_EVENT.js ***! + \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2270,9 +2270,9 @@ module.exports = 'boot'; /***/ }), /***/ "../../../src/core/events/CONTEXT_LOST_EVENT.js": -/*!****************************************************************!*\ - !*** D:/wamp/www/phaser/src/core/events/CONTEXT_LOST_EVENT.js ***! - \****************************************************************/ +/*!*********************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/core/events/CONTEXT_LOST_EVENT.js ***! + \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2298,9 +2298,9 @@ module.exports = 'contextlost'; /***/ }), /***/ "../../../src/core/events/CONTEXT_RESTORED_EVENT.js": -/*!********************************************************************!*\ - !*** D:/wamp/www/phaser/src/core/events/CONTEXT_RESTORED_EVENT.js ***! - \********************************************************************/ +/*!*************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/core/events/CONTEXT_RESTORED_EVENT.js ***! + \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2326,9 +2326,9 @@ module.exports = 'contextrestored'; /***/ }), /***/ "../../../src/core/events/DESTROY_EVENT.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/core/events/DESTROY_EVENT.js ***! - \***********************************************************/ +/*!****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/core/events/DESTROY_EVENT.js ***! + \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2354,9 +2354,9 @@ module.exports = 'destroy'; /***/ }), /***/ "../../../src/core/events/FOCUS_EVENT.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/core/events/FOCUS_EVENT.js ***! - \*********************************************************/ +/*!**************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/core/events/FOCUS_EVENT.js ***! + \**************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2381,9 +2381,9 @@ module.exports = 'focus'; /***/ }), /***/ "../../../src/core/events/HIDDEN_EVENT.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/core/events/HIDDEN_EVENT.js ***! - \**********************************************************/ +/*!***************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/core/events/HIDDEN_EVENT.js ***! + \***************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2412,9 +2412,9 @@ module.exports = 'hidden'; /***/ }), /***/ "../../../src/core/events/PAUSE_EVENT.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/core/events/PAUSE_EVENT.js ***! - \*********************************************************/ +/*!**************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/core/events/PAUSE_EVENT.js ***! + \**************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2438,9 +2438,9 @@ module.exports = 'pause'; /***/ }), /***/ "../../../src/core/events/POST_RENDER_EVENT.js": -/*!***************************************************************!*\ - !*** D:/wamp/www/phaser/src/core/events/POST_RENDER_EVENT.js ***! - \***************************************************************/ +/*!********************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/core/events/POST_RENDER_EVENT.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2469,9 +2469,9 @@ module.exports = 'postrender'; /***/ }), /***/ "../../../src/core/events/POST_STEP_EVENT.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/core/events/POST_STEP_EVENT.js ***! - \*************************************************************/ +/*!******************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/core/events/POST_STEP_EVENT.js ***! + \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2499,9 +2499,9 @@ module.exports = 'poststep'; /***/ }), /***/ "../../../src/core/events/PRE_RENDER_EVENT.js": -/*!**************************************************************!*\ - !*** D:/wamp/www/phaser/src/core/events/PRE_RENDER_EVENT.js ***! - \**************************************************************/ +/*!*******************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/core/events/PRE_RENDER_EVENT.js ***! + \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2529,9 +2529,9 @@ module.exports = 'prerender'; /***/ }), /***/ "../../../src/core/events/PRE_STEP_EVENT.js": -/*!************************************************************!*\ - !*** D:/wamp/www/phaser/src/core/events/PRE_STEP_EVENT.js ***! - \************************************************************/ +/*!*****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/core/events/PRE_STEP_EVENT.js ***! + \*****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2559,9 +2559,9 @@ module.exports = 'prestep'; /***/ }), /***/ "../../../src/core/events/READY_EVENT.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/core/events/READY_EVENT.js ***! - \*********************************************************/ +/*!**************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/core/events/READY_EVENT.js ***! + \**************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2586,9 +2586,9 @@ module.exports = 'ready'; /***/ }), /***/ "../../../src/core/events/RESUME_EVENT.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/core/events/RESUME_EVENT.js ***! - \**********************************************************/ +/*!***************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/core/events/RESUME_EVENT.js ***! + \***************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2612,9 +2612,9 @@ module.exports = 'resume'; /***/ }), /***/ "../../../src/core/events/STEP_EVENT.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/core/events/STEP_EVENT.js ***! - \********************************************************/ +/*!*************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/core/events/STEP_EVENT.js ***! + \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2642,9 +2642,9 @@ module.exports = 'step'; /***/ }), /***/ "../../../src/core/events/VISIBLE_EVENT.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/core/events/VISIBLE_EVENT.js ***! - \***********************************************************/ +/*!****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/core/events/VISIBLE_EVENT.js ***! + \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -2671,9 +2671,9 @@ module.exports = 'visible'; /***/ }), /***/ "../../../src/core/events/index.js": -/*!***************************************************!*\ - !*** D:/wamp/www/phaser/src/core/events/index.js ***! - \***************************************************/ +/*!********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/core/events/index.js ***! + \********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -2712,9 +2712,9 @@ module.exports = { /***/ }), /***/ "../../../src/data/DataManager.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/data/DataManager.js ***! - \**************************************************/ +/*!*******************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/data/DataManager.js ***! + \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -3424,9 +3424,9 @@ module.exports = DataManager; /***/ }), /***/ "../../../src/data/events/CHANGE_DATA_EVENT.js": -/*!***************************************************************!*\ - !*** D:/wamp/www/phaser/src/data/events/CHANGE_DATA_EVENT.js ***! - \***************************************************************/ +/*!********************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/data/events/CHANGE_DATA_EVENT.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -3461,9 +3461,9 @@ module.exports = 'changedata'; /***/ }), /***/ "../../../src/data/events/CHANGE_DATA_KEY_EVENT.js": -/*!*******************************************************************!*\ - !*** D:/wamp/www/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js ***! - \*******************************************************************/ +/*!************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -3496,9 +3496,9 @@ module.exports = 'changedata-'; /***/ }), /***/ "../../../src/data/events/REMOVE_DATA_EVENT.js": -/*!***************************************************************!*\ - !*** D:/wamp/www/phaser/src/data/events/REMOVE_DATA_EVENT.js ***! - \***************************************************************/ +/*!********************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/data/events/REMOVE_DATA_EVENT.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -3529,9 +3529,9 @@ module.exports = 'removedata'; /***/ }), /***/ "../../../src/data/events/SET_DATA_EVENT.js": -/*!************************************************************!*\ - !*** D:/wamp/www/phaser/src/data/events/SET_DATA_EVENT.js ***! - \************************************************************/ +/*!*****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/data/events/SET_DATA_EVENT.js ***! + \*****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -3562,9 +3562,9 @@ module.exports = 'setdata'; /***/ }), /***/ "../../../src/data/events/index.js": -/*!***************************************************!*\ - !*** D:/wamp/www/phaser/src/data/events/index.js ***! - \***************************************************/ +/*!********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/data/events/index.js ***! + \********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -3591,9 +3591,9 @@ module.exports = { /***/ }), /***/ "../../../src/display/color/GetColorFromValue.js": -/*!*****************************************************************!*\ - !*** D:/wamp/www/phaser/src/display/color/GetColorFromValue.js ***! - \*****************************************************************/ +/*!**********************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/display/color/GetColorFromValue.js ***! + \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -3625,9 +3625,9 @@ module.exports = GetColorFromValue; /***/ }), /***/ "../../../src/display/mask/BitmapMask.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/display/mask/BitmapMask.js ***! - \*********************************************************/ +/*!**************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/display/mask/BitmapMask.js ***! + \**************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -3923,9 +3923,9 @@ module.exports = BitmapMask; /***/ }), /***/ "../../../src/display/mask/GeometryMask.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/display/mask/GeometryMask.js ***! - \***********************************************************/ +/*!****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/display/mask/GeometryMask.js ***! + \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -4243,9 +4243,9 @@ module.exports = GeometryMask; /***/ }), /***/ "../../../src/gameobjects/BuildGameObject.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/BuildGameObject.js ***! - \*************************************************************/ +/*!******************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/BuildGameObject.js ***! + \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -4376,9 +4376,9 @@ module.exports = BuildGameObject; /***/ }), /***/ "../../../src/gameobjects/GameObject.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/GameObject.js ***! - \********************************************************/ +/*!*************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/GameObject.js ***! + \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -5119,9 +5119,9 @@ module.exports = GameObject; /***/ }), /***/ "../../../src/gameobjects/components/Alpha.js": -/*!**************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Alpha.js ***! - \**************************************************************/ +/*!*******************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Alpha.js ***! + \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -5419,9 +5419,9 @@ module.exports = Alpha; /***/ }), /***/ "../../../src/gameobjects/components/AlphaSingle.js": -/*!********************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/AlphaSingle.js ***! - \********************************************************************/ +/*!*************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/AlphaSingle.js ***! + \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -5534,9 +5534,9 @@ module.exports = AlphaSingle; /***/ }), /***/ "../../../src/gameobjects/components/Animation.js": -/*!******************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Animation.js ***! - \******************************************************************/ +/*!***********************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Animation.js ***! + \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -6734,9 +6734,9 @@ module.exports = Animation; /***/ }), /***/ "../../../src/gameobjects/components/BlendMode.js": -/*!******************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/BlendMode.js ***! - \******************************************************************/ +/*!***********************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/BlendMode.js ***! + \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -6861,9 +6861,9 @@ module.exports = BlendMode; /***/ }), /***/ "../../../src/gameobjects/components/ComputedSize.js": -/*!*********************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/ComputedSize.js ***! - \*********************************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/ComputedSize.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -7015,9 +7015,9 @@ module.exports = ComputedSize; /***/ }), /***/ "../../../src/gameobjects/components/Crop.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Crop.js ***! - \*************************************************************/ +/*!******************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Crop.js ***! + \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -7145,9 +7145,9 @@ module.exports = Crop; /***/ }), /***/ "../../../src/gameobjects/components/Depth.js": -/*!**************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Depth.js ***! - \**************************************************************/ +/*!*******************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Depth.js ***! + \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -7243,9 +7243,9 @@ module.exports = Depth; /***/ }), /***/ "../../../src/gameobjects/components/Flip.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Flip.js ***! - \*************************************************************/ +/*!******************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Flip.js ***! + \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -7412,9 +7412,9 @@ module.exports = Flip; /***/ }), /***/ "../../../src/gameobjects/components/GetBounds.js": -/*!******************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/GetBounds.js ***! - \******************************************************************/ +/*!***********************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/GetBounds.js ***! + \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -7776,9 +7776,9 @@ module.exports = GetBounds; /***/ }), /***/ "../../../src/gameobjects/components/Mask.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Mask.js ***! - \*************************************************************/ +/*!******************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Mask.js ***! + \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -7928,9 +7928,9 @@ module.exports = Mask; /***/ }), /***/ "../../../src/gameobjects/components/Origin.js": -/*!***************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Origin.js ***! - \***************************************************************/ +/*!********************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Origin.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -8136,9 +8136,9 @@ module.exports = Origin; /***/ }), /***/ "../../../src/gameobjects/components/PathFollower.js": -/*!*********************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/PathFollower.js ***! - \*********************************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/PathFollower.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -8568,9 +8568,9 @@ module.exports = PathFollower; /***/ }), /***/ "../../../src/gameobjects/components/Pipeline.js": -/*!*****************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Pipeline.js ***! - \*****************************************************************/ +/*!**********************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Pipeline.js ***! + \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -8703,9 +8703,9 @@ module.exports = Pipeline; /***/ }), /***/ "../../../src/gameobjects/components/ScrollFactor.js": -/*!*********************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/ScrollFactor.js ***! - \*********************************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/ScrollFactor.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -8815,9 +8815,9 @@ module.exports = ScrollFactor; /***/ }), /***/ "../../../src/gameobjects/components/Size.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Size.js ***! - \*************************************************************/ +/*!******************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Size.js ***! + \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -9007,9 +9007,9 @@ module.exports = Size; /***/ }), /***/ "../../../src/gameobjects/components/Texture.js": -/*!****************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Texture.js ***! - \****************************************************************/ +/*!*********************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Texture.js ***! + \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -9142,9 +9142,9 @@ module.exports = Texture; /***/ }), /***/ "../../../src/gameobjects/components/TextureCrop.js": -/*!********************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/TextureCrop.js ***! - \********************************************************************/ +/*!*************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/TextureCrop.js ***! + \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -9355,9 +9355,9 @@ module.exports = TextureCrop; /***/ }), /***/ "../../../src/gameobjects/components/Tint.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Tint.js ***! - \*************************************************************/ +/*!******************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Tint.js ***! + \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -9692,9 +9692,9 @@ module.exports = Tint; /***/ }), /***/ "../../../src/gameobjects/components/ToJSON.js": -/*!***************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/ToJSON.js ***! - \***************************************************************/ +/*!********************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/ToJSON.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -9758,9 +9758,9 @@ module.exports = ToJSON; /***/ }), /***/ "../../../src/gameobjects/components/Transform.js": -/*!******************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Transform.js ***! - \******************************************************************/ +/*!***********************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Transform.js ***! + \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -10354,9 +10354,9 @@ module.exports = Transform; /***/ }), /***/ "../../../src/gameobjects/components/TransformMatrix.js": -/*!************************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/TransformMatrix.js ***! - \************************************************************************/ +/*!*****************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/TransformMatrix.js ***! + \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -11379,9 +11379,9 @@ module.exports = TransformMatrix; /***/ }), /***/ "../../../src/gameobjects/components/Visible.js": -/*!****************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/Visible.js ***! - \****************************************************************/ +/*!*********************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Visible.js ***! + \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -11473,9 +11473,9 @@ module.exports = Visible; /***/ }), /***/ "../../../src/gameobjects/components/index.js": -/*!**************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/components/index.js ***! - \**************************************************************/ +/*!*******************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/components/index.js ***! + \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -11520,9 +11520,9 @@ module.exports = { /***/ }), /***/ "../../../src/gameobjects/container/Container.js": -/*!*****************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/container/Container.js ***! - \*****************************************************************/ +/*!**********************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/container/Container.js ***! + \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -12890,9 +12890,9 @@ module.exports = Container; /***/ }), /***/ "../../../src/gameobjects/container/ContainerCanvasRenderer.js": -/*!*******************************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/container/ContainerCanvasRenderer.js ***! - \*******************************************************************************/ +/*!************************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/container/ContainerCanvasRenderer.js ***! + \************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -13002,9 +13002,9 @@ module.exports = ContainerCanvasRenderer; /***/ }), /***/ "../../../src/gameobjects/container/ContainerRender.js": -/*!***********************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/container/ContainerRender.js ***! - \***********************************************************************/ +/*!****************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/container/ContainerRender.js ***! + \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -13039,9 +13039,9 @@ module.exports = { /***/ }), /***/ "../../../src/gameobjects/container/ContainerWebGLRenderer.js": -/*!******************************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/container/ContainerWebGLRenderer.js ***! - \******************************************************************************/ +/*!***********************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/container/ContainerWebGLRenderer.js ***! + \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -13193,9 +13193,9 @@ module.exports = ContainerWebGLRenderer; /***/ }), /***/ "../../../src/gameobjects/events/ADDED_TO_SCENE_EVENT.js": -/*!*************************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/ADDED_TO_SCENE_EVENT.js ***! - \*************************************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/events/ADDED_TO_SCENE_EVENT.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -13224,9 +13224,9 @@ module.exports = 'addedtoscene'; /***/ }), /***/ "../../../src/gameobjects/events/DESTROY_EVENT.js": -/*!******************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/DESTROY_EVENT.js ***! - \******************************************************************/ +/*!***********************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/events/DESTROY_EVENT.js ***! + \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -13254,9 +13254,9 @@ module.exports = 'destroy'; /***/ }), /***/ "../../../src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js": -/*!*****************************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js ***! - \*****************************************************************************/ +/*!**********************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js ***! + \**********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -13285,9 +13285,9 @@ module.exports = 'removedfromscene'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_COMPLETE_EVENT.js": -/*!*************************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_COMPLETE_EVENT.js ***! - \*************************************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_COMPLETE_EVENT.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -13322,9 +13322,9 @@ module.exports = 'complete'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_CREATED_EVENT.js": -/*!************************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_CREATED_EVENT.js ***! - \************************************************************************/ +/*!*****************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_CREATED_EVENT.js ***! + \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -13356,9 +13356,9 @@ module.exports = 'created'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_ERROR_EVENT.js": -/*!**********************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_ERROR_EVENT.js ***! - \**********************************************************************/ +/*!***************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_ERROR_EVENT.js ***! + \***************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -13387,9 +13387,9 @@ module.exports = 'error'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_LOOP_EVENT.js": -/*!*********************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_LOOP_EVENT.js ***! - \*********************************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_LOOP_EVENT.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -13424,9 +13424,9 @@ module.exports = 'loop'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_PLAY_EVENT.js": -/*!*********************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_PLAY_EVENT.js ***! - \*********************************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_PLAY_EVENT.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -13457,9 +13457,9 @@ module.exports = 'play'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_SEEKED_EVENT.js": -/*!***********************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_SEEKED_EVENT.js ***! - \***********************************************************************/ +/*!****************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_SEEKED_EVENT.js ***! + \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -13487,9 +13487,9 @@ module.exports = 'seeked'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_SEEKING_EVENT.js": -/*!************************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_SEEKING_EVENT.js ***! - \************************************************************************/ +/*!*****************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_SEEKING_EVENT.js ***! + \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -13518,9 +13518,9 @@ module.exports = 'seeking'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_STOP_EVENT.js": -/*!*********************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_STOP_EVENT.js ***! - \*********************************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_STOP_EVENT.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -13549,9 +13549,9 @@ module.exports = 'stop'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js": -/*!************************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js ***! - \************************************************************************/ +/*!*****************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js ***! + \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -13580,9 +13580,9 @@ module.exports = 'timeout'; /***/ }), /***/ "../../../src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js": -/*!*************************************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js ***! - \*************************************************************************/ +/*!******************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js ***! + \******************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -13611,9 +13611,9 @@ module.exports = 'unlocked'; /***/ }), /***/ "../../../src/gameobjects/events/index.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/gameobjects/events/index.js ***! - \**********************************************************/ +/*!***************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/gameobjects/events/index.js ***! + \***************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -13649,9 +13649,9 @@ module.exports = { /***/ }), /***/ "../../../src/geom/const.js": -/*!********************************************!*\ - !*** D:/wamp/www/phaser/src/geom/const.js ***! - \********************************************/ +/*!*************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/geom/const.js ***! + \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -13734,9 +13734,9 @@ module.exports = GEOM_CONST; /***/ }), /***/ "../../../src/geom/line/GetPoint.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/line/GetPoint.js ***! - \****************************************************/ +/*!*********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/geom/line/GetPoint.js ***! + \*********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -13778,9 +13778,9 @@ module.exports = GetPoint; /***/ }), /***/ "../../../src/geom/line/GetPoints.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/line/GetPoints.js ***! - \*****************************************************/ +/*!**********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/geom/line/GetPoints.js ***! + \**********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -13848,9 +13848,9 @@ module.exports = GetPoints; /***/ }), /***/ "../../../src/geom/line/Length.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/line/Length.js ***! - \**************************************************/ +/*!*******************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/geom/line/Length.js ***! + \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -13881,9 +13881,9 @@ module.exports = Length; /***/ }), /***/ "../../../src/geom/line/Line.js": -/*!************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/line/Line.js ***! - \************************************************/ +/*!*****************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/geom/line/Line.js ***! + \*****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -14223,9 +14223,9 @@ module.exports = Line; /***/ }), /***/ "../../../src/geom/line/Random.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/line/Random.js ***! - \**************************************************/ +/*!*******************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/geom/line/Random.js ***! + \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -14268,9 +14268,9 @@ module.exports = Random; /***/ }), /***/ "../../../src/geom/point/Point.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/point/Point.js ***! - \**************************************************/ +/*!*******************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/geom/point/Point.js ***! + \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -14366,9 +14366,9 @@ module.exports = Point; /***/ }), /***/ "../../../src/geom/rectangle/Contains.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/rectangle/Contains.js ***! - \*********************************************************/ +/*!**************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/geom/rectangle/Contains.js ***! + \**************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -14406,9 +14406,9 @@ module.exports = Contains; /***/ }), /***/ "../../../src/geom/rectangle/GetPoint.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/rectangle/GetPoint.js ***! - \*********************************************************/ +/*!**************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/geom/rectangle/GetPoint.js ***! + \**************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -14492,9 +14492,9 @@ module.exports = GetPoint; /***/ }), /***/ "../../../src/geom/rectangle/GetPoints.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/rectangle/GetPoints.js ***! - \**********************************************************/ +/*!***************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/geom/rectangle/GetPoints.js ***! + \***************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -14551,9 +14551,9 @@ module.exports = GetPoints; /***/ }), /***/ "../../../src/geom/rectangle/Perimeter.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/rectangle/Perimeter.js ***! - \**********************************************************/ +/*!***************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/geom/rectangle/Perimeter.js ***! + \***************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -14584,9 +14584,9 @@ module.exports = Perimeter; /***/ }), /***/ "../../../src/geom/rectangle/Random.js": -/*!*******************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/rectangle/Random.js ***! - \*******************************************************/ +/*!************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/geom/rectangle/Random.js ***! + \************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -14627,9 +14627,9 @@ module.exports = Random; /***/ }), /***/ "../../../src/geom/rectangle/Rectangle.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/rectangle/Rectangle.js ***! - \**********************************************************/ +/*!***************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/geom/rectangle/Rectangle.js ***! + \***************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -15143,9 +15143,9 @@ module.exports = Rectangle; /***/ }), /***/ "../../../src/geom/rectangle/Union.js": -/*!******************************************************!*\ - !*** D:/wamp/www/phaser/src/geom/rectangle/Union.js ***! - \******************************************************/ +/*!***********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/geom/rectangle/Union.js ***! + \***********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -15190,9 +15190,9 @@ module.exports = Union; /***/ }), /***/ "../../../src/loader/File.js": -/*!*********************************************!*\ - !*** D:/wamp/www/phaser/src/loader/File.js ***! - \*********************************************/ +/*!**************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/loader/File.js ***! + \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -15743,9 +15743,9 @@ module.exports = File; /***/ }), /***/ "../../../src/loader/FileTypesManager.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/FileTypesManager.js ***! - \*********************************************************/ +/*!**************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/loader/FileTypesManager.js ***! + \**************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -15817,9 +15817,9 @@ module.exports = FileTypesManager; /***/ }), /***/ "../../../src/loader/GetURL.js": -/*!***********************************************!*\ - !*** D:/wamp/www/phaser/src/loader/GetURL.js ***! - \***********************************************/ +/*!****************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/loader/GetURL.js ***! + \****************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -15863,9 +15863,9 @@ module.exports = GetURL; /***/ }), /***/ "../../../src/loader/MergeXHRSettings.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/MergeXHRSettings.js ***! - \*********************************************************/ +/*!**************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/loader/MergeXHRSettings.js ***! + \**************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -15916,9 +15916,9 @@ module.exports = MergeXHRSettings; /***/ }), /***/ "../../../src/loader/MultiFile.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/MultiFile.js ***! - \**************************************************/ +/*!*******************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/loader/MultiFile.js ***! + \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -16155,9 +16155,9 @@ module.exports = MultiFile; /***/ }), /***/ "../../../src/loader/XHRLoader.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/XHRLoader.js ***! - \**************************************************/ +/*!*******************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/loader/XHRLoader.js ***! + \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -16241,9 +16241,9 @@ module.exports = XHRLoader; /***/ }), /***/ "../../../src/loader/XHRSettings.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/XHRSettings.js ***! - \****************************************************/ +/*!*********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/loader/XHRSettings.js ***! + \*********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -16316,9 +16316,9 @@ module.exports = XHRSettings; /***/ }), /***/ "../../../src/loader/const.js": -/*!**********************************************!*\ - !*** D:/wamp/www/phaser/src/loader/const.js ***! - \**********************************************/ +/*!***************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/loader/const.js ***! + \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -16473,9 +16473,9 @@ module.exports = FILE_CONST; /***/ }), /***/ "../../../src/loader/events/ADD_EVENT.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/events/ADD_EVENT.js ***! - \*********************************************************/ +/*!**************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/loader/events/ADD_EVENT.js ***! + \**************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -16508,9 +16508,9 @@ module.exports = 'addfile'; /***/ }), /***/ "../../../src/loader/events/COMPLETE_EVENT.js": -/*!**************************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/events/COMPLETE_EVENT.js ***! - \**************************************************************/ +/*!*******************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/loader/events/COMPLETE_EVENT.js ***! + \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -16541,9 +16541,9 @@ module.exports = 'complete'; /***/ }), /***/ "../../../src/loader/events/FILE_COMPLETE_EVENT.js": -/*!*******************************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/events/FILE_COMPLETE_EVENT.js ***! - \*******************************************************************/ +/*!************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/loader/events/FILE_COMPLETE_EVENT.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -16575,9 +16575,9 @@ module.exports = 'filecomplete'; /***/ }), /***/ "../../../src/loader/events/FILE_KEY_COMPLETE_EVENT.js": -/*!***********************************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js ***! - \***********************************************************************/ +/*!****************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js ***! + \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -16634,9 +16634,9 @@ module.exports = 'filecomplete-'; /***/ }), /***/ "../../../src/loader/events/FILE_LOAD_ERROR_EVENT.js": -/*!*********************************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js ***! - \*********************************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -16664,9 +16664,9 @@ module.exports = 'loaderror'; /***/ }), /***/ "../../../src/loader/events/FILE_LOAD_EVENT.js": -/*!***************************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/events/FILE_LOAD_EVENT.js ***! - \***************************************************************/ +/*!********************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/loader/events/FILE_LOAD_EVENT.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -16695,9 +16695,9 @@ module.exports = 'load'; /***/ }), /***/ "../../../src/loader/events/FILE_PROGRESS_EVENT.js": -/*!*******************************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/events/FILE_PROGRESS_EVENT.js ***! - \*******************************************************************/ +/*!************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/loader/events/FILE_PROGRESS_EVENT.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -16727,9 +16727,9 @@ module.exports = 'fileprogress'; /***/ }), /***/ "../../../src/loader/events/POST_PROCESS_EVENT.js": -/*!******************************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/events/POST_PROCESS_EVENT.js ***! - \******************************************************************/ +/*!***********************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/loader/events/POST_PROCESS_EVENT.js ***! + \***********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -16761,9 +16761,9 @@ module.exports = 'postprocess'; /***/ }), /***/ "../../../src/loader/events/PROGRESS_EVENT.js": -/*!**************************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/events/PROGRESS_EVENT.js ***! - \**************************************************************/ +/*!*******************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/loader/events/PROGRESS_EVENT.js ***! + \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -16791,9 +16791,9 @@ module.exports = 'progress'; /***/ }), /***/ "../../../src/loader/events/START_EVENT.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/events/START_EVENT.js ***! - \***********************************************************/ +/*!****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/loader/events/START_EVENT.js ***! + \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -16823,9 +16823,9 @@ module.exports = 'start'; /***/ }), /***/ "../../../src/loader/events/index.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/events/index.js ***! - \*****************************************************/ +/*!**********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/loader/events/index.js ***! + \**********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -16858,9 +16858,9 @@ module.exports = { /***/ }), /***/ "../../../src/loader/filetypes/ImageFile.js": -/*!************************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/filetypes/ImageFile.js ***! - \************************************************************/ +/*!*****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/loader/filetypes/ImageFile.js ***! + \*****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -17137,9 +17137,9 @@ module.exports = ImageFile; /***/ }), /***/ "../../../src/loader/filetypes/JSONFile.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/filetypes/JSONFile.js ***! - \***********************************************************/ +/*!****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/loader/filetypes/JSONFile.js ***! + \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -17372,9 +17372,9 @@ module.exports = JSONFile; /***/ }), /***/ "../../../src/loader/filetypes/TextFile.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/loader/filetypes/TextFile.js ***! - \***********************************************************/ +/*!****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/loader/filetypes/TextFile.js ***! + \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -17552,9 +17552,9 @@ module.exports = TextFile; /***/ }), /***/ "../../../src/math/Average.js": -/*!**********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Average.js ***! - \**********************************************/ +/*!***************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/Average.js ***! + \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -17592,9 +17592,9 @@ module.exports = Average; /***/ }), /***/ "../../../src/math/Bernstein.js": -/*!************************************************!*\ - !*** D:/wamp/www/phaser/src/math/Bernstein.js ***! - \************************************************/ +/*!*****************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/Bernstein.js ***! + \*****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -17628,9 +17628,9 @@ module.exports = Bernstein; /***/ }), /***/ "../../../src/math/Between.js": -/*!**********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Between.js ***! - \**********************************************/ +/*!***************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/Between.js ***! + \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -17662,9 +17662,9 @@ module.exports = Between; /***/ }), /***/ "../../../src/math/CatmullRom.js": -/*!*************************************************!*\ - !*** D:/wamp/www/phaser/src/math/CatmullRom.js ***! - \*************************************************/ +/*!******************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/CatmullRom.js ***! + \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -17704,9 +17704,9 @@ module.exports = CatmullRom; /***/ }), /***/ "../../../src/math/CeilTo.js": -/*!*********************************************!*\ - !*** D:/wamp/www/phaser/src/math/CeilTo.js ***! - \*********************************************/ +/*!**************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/CeilTo.js ***! + \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -17746,9 +17746,9 @@ module.exports = CeilTo; /***/ }), /***/ "../../../src/math/Clamp.js": -/*!********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Clamp.js ***! - \********************************************/ +/*!*************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/Clamp.js ***! + \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -17781,9 +17781,9 @@ module.exports = Clamp; /***/ }), /***/ "../../../src/math/DegToRad.js": -/*!***********************************************!*\ - !*** D:/wamp/www/phaser/src/math/DegToRad.js ***! - \***********************************************/ +/*!****************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/DegToRad.js ***! + \****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -17816,9 +17816,9 @@ module.exports = DegToRad; /***/ }), /***/ "../../../src/math/Difference.js": -/*!*************************************************!*\ - !*** D:/wamp/www/phaser/src/math/Difference.js ***! - \*************************************************/ +/*!******************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/Difference.js ***! + \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -17850,9 +17850,9 @@ module.exports = Difference; /***/ }), /***/ "../../../src/math/Factorial.js": -/*!************************************************!*\ - !*** D:/wamp/www/phaser/src/math/Factorial.js ***! - \************************************************/ +/*!*****************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/Factorial.js ***! + \*****************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -17895,9 +17895,9 @@ module.exports = Factorial; /***/ }), /***/ "../../../src/math/FloatBetween.js": -/*!***************************************************!*\ - !*** D:/wamp/www/phaser/src/math/FloatBetween.js ***! - \***************************************************/ +/*!********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/FloatBetween.js ***! + \********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -17929,9 +17929,9 @@ module.exports = FloatBetween; /***/ }), /***/ "../../../src/math/FloorTo.js": -/*!**********************************************!*\ - !*** D:/wamp/www/phaser/src/math/FloorTo.js ***! - \**********************************************/ +/*!***************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/FloorTo.js ***! + \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -17971,9 +17971,9 @@ module.exports = FloorTo; /***/ }), /***/ "../../../src/math/FromPercent.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/math/FromPercent.js ***! - \**************************************************/ +/*!*******************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/FromPercent.js ***! + \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -18010,9 +18010,9 @@ module.exports = FromPercent; /***/ }), /***/ "../../../src/math/GetSpeed.js": -/*!***********************************************!*\ - !*** D:/wamp/www/phaser/src/math/GetSpeed.js ***! - \***********************************************/ +/*!****************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/GetSpeed.js ***! + \****************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -18048,9 +18048,9 @@ module.exports = GetSpeed; /***/ }), /***/ "../../../src/math/IsEven.js": -/*!*********************************************!*\ - !*** D:/wamp/www/phaser/src/math/IsEven.js ***! - \*********************************************/ +/*!**************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/IsEven.js ***! + \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -18084,9 +18084,9 @@ module.exports = IsEven; /***/ }), /***/ "../../../src/math/IsEvenStrict.js": -/*!***************************************************!*\ - !*** D:/wamp/www/phaser/src/math/IsEvenStrict.js ***! - \***************************************************/ +/*!********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/IsEvenStrict.js ***! + \********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -18118,9 +18118,9 @@ module.exports = IsEvenStrict; /***/ }), /***/ "../../../src/math/Linear.js": -/*!*********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Linear.js ***! - \*********************************************/ +/*!**************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/Linear.js ***! + \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -18153,9 +18153,9 @@ module.exports = Linear; /***/ }), /***/ "../../../src/math/Matrix3.js": -/*!**********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Matrix3.js ***! - \**********************************************/ +/*!***************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/Matrix3.js ***! + \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -18751,9 +18751,9 @@ module.exports = Matrix3; /***/ }), /***/ "../../../src/math/Matrix4.js": -/*!**********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Matrix4.js ***! - \**********************************************/ +/*!***************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/Matrix4.js ***! + \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -20218,9 +20218,9 @@ module.exports = Matrix4; /***/ }), /***/ "../../../src/math/MaxAdd.js": -/*!*********************************************!*\ - !*** D:/wamp/www/phaser/src/math/MaxAdd.js ***! - \*********************************************/ +/*!**************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/MaxAdd.js ***! + \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -20253,9 +20253,9 @@ module.exports = MaxAdd; /***/ }), /***/ "../../../src/math/MinSub.js": -/*!*********************************************!*\ - !*** D:/wamp/www/phaser/src/math/MinSub.js ***! - \*********************************************/ +/*!**************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/MinSub.js ***! + \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -20288,9 +20288,9 @@ module.exports = MinSub; /***/ }), /***/ "../../../src/math/Percent.js": -/*!**********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Percent.js ***! - \**********************************************/ +/*!***************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/Percent.js ***! + \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -20352,9 +20352,9 @@ module.exports = Percent; /***/ }), /***/ "../../../src/math/Quaternion.js": -/*!*************************************************!*\ - !*** D:/wamp/www/phaser/src/math/Quaternion.js ***! - \*************************************************/ +/*!******************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/Quaternion.js ***! + \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -21129,9 +21129,9 @@ module.exports = Quaternion; /***/ }), /***/ "../../../src/math/RadToDeg.js": -/*!***********************************************!*\ - !*** D:/wamp/www/phaser/src/math/RadToDeg.js ***! - \***********************************************/ +/*!****************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/RadToDeg.js ***! + \****************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -21164,9 +21164,9 @@ module.exports = RadToDeg; /***/ }), /***/ "../../../src/math/RandomXY.js": -/*!***********************************************!*\ - !*** D:/wamp/www/phaser/src/math/RandomXY.js ***! - \***********************************************/ +/*!****************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/RandomXY.js ***! + \****************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -21209,9 +21209,9 @@ module.exports = RandomXY; /***/ }), /***/ "../../../src/math/RandomXYZ.js": -/*!************************************************!*\ - !*** D:/wamp/www/phaser/src/math/RandomXYZ.js ***! - \************************************************/ +/*!*****************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/RandomXYZ.js ***! + \*****************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -21253,9 +21253,9 @@ module.exports = RandomXYZ; /***/ }), /***/ "../../../src/math/RandomXYZW.js": -/*!*************************************************!*\ - !*** D:/wamp/www/phaser/src/math/RandomXYZW.js ***! - \*************************************************/ +/*!******************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/RandomXYZW.js ***! + \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -21295,9 +21295,9 @@ module.exports = RandomXYZW; /***/ }), /***/ "../../../src/math/Rotate.js": -/*!*********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Rotate.js ***! - \*********************************************/ +/*!**************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/Rotate.js ***! + \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -21335,9 +21335,9 @@ module.exports = Rotate; /***/ }), /***/ "../../../src/math/RotateAround.js": -/*!***************************************************!*\ - !*** D:/wamp/www/phaser/src/math/RotateAround.js ***! - \***************************************************/ +/*!********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/RotateAround.js ***! + \********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -21384,9 +21384,9 @@ module.exports = RotateAround; /***/ }), /***/ "../../../src/math/RotateAroundDistance.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/RotateAroundDistance.js ***! - \***********************************************************/ +/*!****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/RotateAroundDistance.js ***! + \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -21430,9 +21430,9 @@ module.exports = RotateAroundDistance; /***/ }), /***/ "../../../src/math/RotateTo.js": -/*!***********************************************!*\ - !*** D:/wamp/www/phaser/src/math/RotateTo.js ***! - \***********************************************/ +/*!****************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/RotateTo.js ***! + \****************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -21472,9 +21472,9 @@ module.exports = RotateTo; /***/ }), /***/ "../../../src/math/RotateVec3.js": -/*!*************************************************!*\ - !*** D:/wamp/www/phaser/src/math/RotateVec3.js ***! - \*************************************************/ +/*!******************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/RotateVec3.js ***! + \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -21525,9 +21525,9 @@ module.exports = RotateVec3; /***/ }), /***/ "../../../src/math/RoundAwayFromZero.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/RoundAwayFromZero.js ***! - \********************************************************/ +/*!*************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/RoundAwayFromZero.js ***! + \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -21559,9 +21559,9 @@ module.exports = RoundAwayFromZero; /***/ }), /***/ "../../../src/math/RoundTo.js": -/*!**********************************************!*\ - !*** D:/wamp/www/phaser/src/math/RoundTo.js ***! - \**********************************************/ +/*!***************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/RoundTo.js ***! + \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -21616,9 +21616,9 @@ module.exports = RoundTo; /***/ }), /***/ "../../../src/math/SinCosTableGenerator.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/SinCosTableGenerator.js ***! - \***********************************************************/ +/*!****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/SinCosTableGenerator.js ***! + \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -21674,9 +21674,9 @@ module.exports = SinCosTableGenerator; /***/ }), /***/ "../../../src/math/SmoothStep.js": -/*!*************************************************!*\ - !*** D:/wamp/www/phaser/src/math/SmoothStep.js ***! - \*************************************************/ +/*!******************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/SmoothStep.js ***! + \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -21726,9 +21726,9 @@ module.exports = SmoothStep; /***/ }), /***/ "../../../src/math/SmootherStep.js": -/*!***************************************************!*\ - !*** D:/wamp/www/phaser/src/math/SmootherStep.js ***! - \***************************************************/ +/*!********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/SmootherStep.js ***! + \********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -21770,9 +21770,9 @@ module.exports = SmootherStep; /***/ }), /***/ "../../../src/math/ToXY.js": -/*!*******************************************!*\ - !*** D:/wamp/www/phaser/src/math/ToXY.js ***! - \*******************************************/ +/*!************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/ToXY.js ***! + \************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -21833,9 +21833,9 @@ module.exports = ToXY; /***/ }), /***/ "../../../src/math/TransformXY.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/math/TransformXY.js ***! - \**************************************************/ +/*!*******************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/TransformXY.js ***! + \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -21893,9 +21893,9 @@ module.exports = TransformXY; /***/ }), /***/ "../../../src/math/Vector2.js": -/*!**********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Vector2.js ***! - \**********************************************/ +/*!***************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/Vector2.js ***! + \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -22674,9 +22674,9 @@ module.exports = Vector2; /***/ }), /***/ "../../../src/math/Vector3.js": -/*!**********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Vector3.js ***! - \**********************************************/ +/*!***************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/Vector3.js ***! + \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -23489,9 +23489,9 @@ module.exports = Vector3; /***/ }), /***/ "../../../src/math/Vector4.js": -/*!**********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Vector4.js ***! - \**********************************************/ +/*!***************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/Vector4.js ***! + \***************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -24039,9 +24039,9 @@ module.exports = Vector4; /***/ }), /***/ "../../../src/math/Within.js": -/*!*********************************************!*\ - !*** D:/wamp/www/phaser/src/math/Within.js ***! - \*********************************************/ +/*!**************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/Within.js ***! + \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -24074,9 +24074,9 @@ module.exports = Within; /***/ }), /***/ "../../../src/math/Wrap.js": -/*!*******************************************!*\ - !*** D:/wamp/www/phaser/src/math/Wrap.js ***! - \*******************************************/ +/*!************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/Wrap.js ***! + \************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -24111,9 +24111,9 @@ module.exports = Wrap; /***/ }), /***/ "../../../src/math/angle/Between.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/Between.js ***! - \****************************************************/ +/*!*********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/angle/Between.js ***! + \*********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -24147,9 +24147,9 @@ module.exports = Between; /***/ }), /***/ "../../../src/math/angle/BetweenPoints.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/BetweenPoints.js ***! - \**********************************************************/ +/*!***************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/angle/BetweenPoints.js ***! + \***************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -24183,9 +24183,9 @@ module.exports = BetweenPoints; /***/ }), /***/ "../../../src/math/angle/BetweenPointsY.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/BetweenPointsY.js ***! - \***********************************************************/ +/*!****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/angle/BetweenPointsY.js ***! + \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -24220,9 +24220,9 @@ module.exports = BetweenPointsY; /***/ }), /***/ "../../../src/math/angle/BetweenY.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/BetweenY.js ***! - \*****************************************************/ +/*!**********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/angle/BetweenY.js ***! + \**********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -24259,9 +24259,9 @@ module.exports = BetweenY; /***/ }), /***/ "../../../src/math/angle/CounterClockwise.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/CounterClockwise.js ***! - \*************************************************************/ +/*!******************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/angle/CounterClockwise.js ***! + \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -24309,9 +24309,9 @@ module.exports = CounterClockwise; /***/ }), /***/ "../../../src/math/angle/Normalize.js": -/*!******************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/Normalize.js ***! - \******************************************************/ +/*!***********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/angle/Normalize.js ***! + \***********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -24351,9 +24351,9 @@ module.exports = Normalize; /***/ }), /***/ "../../../src/math/angle/Random.js": -/*!***************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/Random.js ***! - \***************************************************/ +/*!********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/angle/Random.js ***! + \********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -24385,9 +24385,9 @@ module.exports = Random; /***/ }), /***/ "../../../src/math/angle/RandomDegrees.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/RandomDegrees.js ***! - \**********************************************************/ +/*!***************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/angle/RandomDegrees.js ***! + \***************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -24419,9 +24419,9 @@ module.exports = RandomDegrees; /***/ }), /***/ "../../../src/math/angle/Reverse.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/Reverse.js ***! - \****************************************************/ +/*!*********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/angle/Reverse.js ***! + \*********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -24454,9 +24454,9 @@ module.exports = Reverse; /***/ }), /***/ "../../../src/math/angle/RotateTo.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/RotateTo.js ***! - \*****************************************************/ +/*!**********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/angle/RotateTo.js ***! + \**********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -24526,9 +24526,9 @@ module.exports = RotateTo; /***/ }), /***/ "../../../src/math/angle/ShortestBetween.js": -/*!************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/ShortestBetween.js ***! - \************************************************************/ +/*!*****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/angle/ShortestBetween.js ***! + \*****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -24580,9 +24580,9 @@ module.exports = ShortestBetween; /***/ }), /***/ "../../../src/math/angle/Wrap.js": -/*!*************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/Wrap.js ***! - \*************************************************/ +/*!******************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/angle/Wrap.js ***! + \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -24617,9 +24617,9 @@ module.exports = Wrap; /***/ }), /***/ "../../../src/math/angle/WrapDegrees.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/WrapDegrees.js ***! - \********************************************************/ +/*!*************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/angle/WrapDegrees.js ***! + \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -24654,9 +24654,9 @@ module.exports = WrapDegrees; /***/ }), /***/ "../../../src/math/angle/index.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/math/angle/index.js ***! - \**************************************************/ +/*!*******************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/angle/index.js ***! + \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -24692,9 +24692,9 @@ module.exports = { /***/ }), /***/ "../../../src/math/const.js": -/*!********************************************!*\ - !*** D:/wamp/www/phaser/src/math/const.js ***! - \********************************************/ +/*!*************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/const.js ***! + \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -24789,9 +24789,9 @@ module.exports = MATH_CONST; /***/ }), /***/ "../../../src/math/distance/DistanceBetween.js": -/*!***************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/distance/DistanceBetween.js ***! - \***************************************************************/ +/*!********************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceBetween.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -24828,9 +24828,9 @@ module.exports = DistanceBetween; /***/ }), /***/ "../../../src/math/distance/DistanceBetweenPoints.js": -/*!*********************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/distance/DistanceBetweenPoints.js ***! - \*********************************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceBetweenPoints.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -24865,9 +24865,9 @@ module.exports = DistanceBetweenPoints; /***/ }), /***/ "../../../src/math/distance/DistanceBetweenPointsSquared.js": -/*!****************************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/distance/DistanceBetweenPointsSquared.js ***! - \****************************************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceBetweenPointsSquared.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -24902,9 +24902,9 @@ module.exports = DistanceBetweenPointsSquared; /***/ }), /***/ "../../../src/math/distance/DistanceChebyshev.js": -/*!*****************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/distance/DistanceChebyshev.js ***! - \*****************************************************************/ +/*!**********************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceChebyshev.js ***! + \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -24941,9 +24941,9 @@ module.exports = ChebyshevDistance; /***/ }), /***/ "../../../src/math/distance/DistancePower.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/distance/DistancePower.js ***! - \*************************************************************/ +/*!******************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/distance/DistancePower.js ***! + \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -24980,9 +24980,9 @@ module.exports = DistancePower; /***/ }), /***/ "../../../src/math/distance/DistanceSnake.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/distance/DistanceSnake.js ***! - \*************************************************************/ +/*!******************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceSnake.js ***! + \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25019,9 +25019,9 @@ module.exports = SnakeDistance; /***/ }), /***/ "../../../src/math/distance/DistanceSquared.js": -/*!***************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/distance/DistanceSquared.js ***! - \***************************************************************/ +/*!********************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceSquared.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25058,9 +25058,9 @@ module.exports = DistanceSquared; /***/ }), /***/ "../../../src/math/distance/index.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/math/distance/index.js ***! - \*****************************************************/ +/*!**********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/distance/index.js ***! + \**********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -25090,9 +25090,9 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/back/In.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/back/In.js ***! - \*****************************************************/ +/*!**********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/back/In.js ***! + \**********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25126,9 +25126,9 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/back/InOut.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/back/InOut.js ***! - \********************************************************/ +/*!*************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/back/InOut.js ***! + \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25171,9 +25171,9 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/back/Out.js": -/*!******************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/back/Out.js ***! - \******************************************************/ +/*!***********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/back/Out.js ***! + \***********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25207,9 +25207,9 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/back/index.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/back/index.js ***! - \********************************************************/ +/*!*************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/back/index.js ***! + \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -25235,9 +25235,9 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/bounce/In.js": -/*!*******************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/bounce/In.js ***! - \*******************************************************/ +/*!************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/bounce/In.js ***! + \************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25285,9 +25285,9 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/bounce/InOut.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/bounce/InOut.js ***! - \**********************************************************/ +/*!***************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/bounce/InOut.js ***! + \***************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25354,9 +25354,9 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/bounce/Out.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/bounce/Out.js ***! - \********************************************************/ +/*!*************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/bounce/Out.js ***! + \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25402,9 +25402,9 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/bounce/index.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/bounce/index.js ***! - \**********************************************************/ +/*!***************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/bounce/index.js ***! + \***************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -25430,9 +25430,9 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/circular/In.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/circular/In.js ***! - \*********************************************************/ +/*!**************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/circular/In.js ***! + \**************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25463,9 +25463,9 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/circular/InOut.js": -/*!************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/circular/InOut.js ***! - \************************************************************/ +/*!*****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/circular/InOut.js ***! + \*****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25503,9 +25503,9 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/circular/Out.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/circular/Out.js ***! - \**********************************************************/ +/*!***************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/circular/Out.js ***! + \***************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25536,9 +25536,9 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/circular/index.js": -/*!************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/circular/index.js ***! - \************************************************************/ +/*!*****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/circular/index.js ***! + \*****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -25564,9 +25564,9 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/cubic/In.js": -/*!******************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/cubic/In.js ***! - \******************************************************/ +/*!***********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/cubic/In.js ***! + \***********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25597,9 +25597,9 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/cubic/InOut.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/cubic/InOut.js ***! - \*********************************************************/ +/*!**************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/cubic/InOut.js ***! + \**************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25637,9 +25637,9 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/cubic/Out.js": -/*!*******************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/cubic/Out.js ***! - \*******************************************************/ +/*!************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/cubic/Out.js ***! + \************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25670,9 +25670,9 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/cubic/index.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/cubic/index.js ***! - \*********************************************************/ +/*!**************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/cubic/index.js ***! + \**************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -25698,9 +25698,9 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/elastic/In.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/elastic/In.js ***! - \********************************************************/ +/*!*************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/elastic/In.js ***! + \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25758,9 +25758,9 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/elastic/InOut.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/elastic/InOut.js ***! - \***********************************************************/ +/*!****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/elastic/InOut.js ***! + \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25825,9 +25825,9 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/elastic/Out.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/elastic/Out.js ***! - \*********************************************************/ +/*!**************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/elastic/Out.js ***! + \**************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25885,9 +25885,9 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/elastic/index.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/elastic/index.js ***! - \***********************************************************/ +/*!****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/elastic/index.js ***! + \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -25913,9 +25913,9 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/expo/In.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/expo/In.js ***! - \*****************************************************/ +/*!**********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/expo/In.js ***! + \**********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25946,9 +25946,9 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/expo/InOut.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/expo/InOut.js ***! - \********************************************************/ +/*!*************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/expo/InOut.js ***! + \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -25986,9 +25986,9 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/expo/Out.js": -/*!******************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/expo/Out.js ***! - \******************************************************/ +/*!***********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/expo/Out.js ***! + \***********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26019,9 +26019,9 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/expo/index.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/expo/index.js ***! - \********************************************************/ +/*!*************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/expo/index.js ***! + \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -26047,9 +26047,9 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/index.js": -/*!***************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/index.js ***! - \***************************************************/ +/*!********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/index.js ***! + \********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -26084,9 +26084,9 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/linear/Linear.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/linear/Linear.js ***! - \***********************************************************/ +/*!****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/linear/Linear.js ***! + \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26117,9 +26117,9 @@ module.exports = Linear; /***/ }), /***/ "../../../src/math/easing/linear/index.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/linear/index.js ***! - \**********************************************************/ +/*!***************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/linear/index.js ***! + \***************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -26135,9 +26135,9 @@ module.exports = __webpack_require__(/*! ./Linear */ "../../../src/math/easing/l /***/ }), /***/ "../../../src/math/easing/quadratic/In.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/quadratic/In.js ***! - \**********************************************************/ +/*!***************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/quadratic/In.js ***! + \***************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26168,9 +26168,9 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/quadratic/InOut.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/quadratic/InOut.js ***! - \*************************************************************/ +/*!******************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/quadratic/InOut.js ***! + \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26208,9 +26208,9 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/quadratic/Out.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/quadratic/Out.js ***! - \***********************************************************/ +/*!****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/quadratic/Out.js ***! + \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26241,9 +26241,9 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/quadratic/index.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/quadratic/index.js ***! - \*************************************************************/ +/*!******************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/quadratic/index.js ***! + \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -26269,9 +26269,9 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/quartic/In.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/quartic/In.js ***! - \********************************************************/ +/*!*************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/quartic/In.js ***! + \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26302,9 +26302,9 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/quartic/InOut.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/quartic/InOut.js ***! - \***********************************************************/ +/*!****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/quartic/InOut.js ***! + \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26342,9 +26342,9 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/quartic/Out.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/quartic/Out.js ***! - \*********************************************************/ +/*!**************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/quartic/Out.js ***! + \**************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26375,9 +26375,9 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/quartic/index.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/quartic/index.js ***! - \***********************************************************/ +/*!****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/quartic/index.js ***! + \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -26403,9 +26403,9 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/quintic/In.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/quintic/In.js ***! - \********************************************************/ +/*!*************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/quintic/In.js ***! + \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26436,9 +26436,9 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/quintic/InOut.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/quintic/InOut.js ***! - \***********************************************************/ +/*!****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/quintic/InOut.js ***! + \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26476,9 +26476,9 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/quintic/Out.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/quintic/Out.js ***! - \*********************************************************/ +/*!**************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/quintic/Out.js ***! + \**************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26509,9 +26509,9 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/quintic/index.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/quintic/index.js ***! - \***********************************************************/ +/*!****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/quintic/index.js ***! + \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -26537,9 +26537,9 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/sine/In.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/sine/In.js ***! - \*****************************************************/ +/*!**********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/sine/In.js ***! + \**********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26581,9 +26581,9 @@ module.exports = In; /***/ }), /***/ "../../../src/math/easing/sine/InOut.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/sine/InOut.js ***! - \********************************************************/ +/*!*************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/sine/InOut.js ***! + \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26625,9 +26625,9 @@ module.exports = InOut; /***/ }), /***/ "../../../src/math/easing/sine/Out.js": -/*!******************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/sine/Out.js ***! - \******************************************************/ +/*!***********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/sine/Out.js ***! + \***********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26669,9 +26669,9 @@ module.exports = Out; /***/ }), /***/ "../../../src/math/easing/sine/index.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/sine/index.js ***! - \********************************************************/ +/*!*************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/sine/index.js ***! + \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -26697,9 +26697,9 @@ module.exports = { /***/ }), /***/ "../../../src/math/easing/stepped/Stepped.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/stepped/Stepped.js ***! - \*************************************************************/ +/*!******************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/stepped/Stepped.js ***! + \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26744,9 +26744,9 @@ module.exports = Stepped; /***/ }), /***/ "../../../src/math/easing/stepped/index.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/easing/stepped/index.js ***! - \***********************************************************/ +/*!****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/easing/stepped/index.js ***! + \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -26766,9 +26766,9 @@ module.exports = __webpack_require__(/*! ./Stepped */ "../../../src/math/easing/ /***/ }), /***/ "../../../src/math/fuzzy/Ceil.js": -/*!*************************************************!*\ - !*** D:/wamp/www/phaser/src/math/fuzzy/Ceil.js ***! - \*************************************************/ +/*!******************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/fuzzy/Ceil.js ***! + \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26802,9 +26802,9 @@ module.exports = Ceil; /***/ }), /***/ "../../../src/math/fuzzy/Equal.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/math/fuzzy/Equal.js ***! - \**************************************************/ +/*!*******************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/fuzzy/Equal.js ***! + \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26841,9 +26841,9 @@ module.exports = Equal; /***/ }), /***/ "../../../src/math/fuzzy/Floor.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/math/fuzzy/Floor.js ***! - \**************************************************/ +/*!*******************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/fuzzy/Floor.js ***! + \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26877,9 +26877,9 @@ module.exports = Floor; /***/ }), /***/ "../../../src/math/fuzzy/GreaterThan.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/fuzzy/GreaterThan.js ***! - \********************************************************/ +/*!*************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/fuzzy/GreaterThan.js ***! + \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26916,9 +26916,9 @@ module.exports = GreaterThan; /***/ }), /***/ "../../../src/math/fuzzy/LessThan.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/math/fuzzy/LessThan.js ***! - \*****************************************************/ +/*!**********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/fuzzy/LessThan.js ***! + \**********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -26955,9 +26955,9 @@ module.exports = LessThan; /***/ }), /***/ "../../../src/math/fuzzy/index.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/math/fuzzy/index.js ***! - \**************************************************/ +/*!*******************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/fuzzy/index.js ***! + \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -26985,9 +26985,9 @@ module.exports = { /***/ }), /***/ "../../../src/math/index.js": -/*!********************************************!*\ - !*** D:/wamp/www/phaser/src/math/index.js ***! - \********************************************/ +/*!*************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/index.js ***! + \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -27079,9 +27079,9 @@ module.exports = PhaserMath; /***/ }), /***/ "../../../src/math/interpolation/BezierInterpolation.js": -/*!************************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/interpolation/BezierInterpolation.js ***! - \************************************************************************/ +/*!*****************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/interpolation/BezierInterpolation.js ***! + \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -27123,9 +27123,9 @@ module.exports = BezierInterpolation; /***/ }), /***/ "../../../src/math/interpolation/CatmullRomInterpolation.js": -/*!****************************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/interpolation/CatmullRomInterpolation.js ***! - \****************************************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/interpolation/CatmullRomInterpolation.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -27185,9 +27185,9 @@ module.exports = CatmullRomInterpolation; /***/ }), /***/ "../../../src/math/interpolation/CubicBezierInterpolation.js": -/*!*****************************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/interpolation/CubicBezierInterpolation.js ***! - \*****************************************************************************/ +/*!**********************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/interpolation/CubicBezierInterpolation.js ***! + \**********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -27260,9 +27260,9 @@ module.exports = CubicBezierInterpolation; /***/ }), /***/ "../../../src/math/interpolation/LinearInterpolation.js": -/*!************************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/interpolation/LinearInterpolation.js ***! - \************************************************************************/ +/*!*****************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/interpolation/LinearInterpolation.js ***! + \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -27312,9 +27312,9 @@ module.exports = LinearInterpolation; /***/ }), /***/ "../../../src/math/interpolation/QuadraticBezierInterpolation.js": -/*!*********************************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/interpolation/QuadraticBezierInterpolation.js ***! - \*********************************************************************************/ +/*!**************************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/interpolation/QuadraticBezierInterpolation.js ***! + \**************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -27376,9 +27376,9 @@ module.exports = QuadraticBezierInterpolation; /***/ }), /***/ "../../../src/math/interpolation/SmoothStepInterpolation.js": -/*!****************************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/interpolation/SmoothStepInterpolation.js ***! - \****************************************************************************/ +/*!*********************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/interpolation/SmoothStepInterpolation.js ***! + \*********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -27414,9 +27414,9 @@ module.exports = SmoothStepInterpolation; /***/ }), /***/ "../../../src/math/interpolation/SmootherStepInterpolation.js": -/*!******************************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/interpolation/SmootherStepInterpolation.js ***! - \******************************************************************************/ +/*!***********************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/interpolation/SmootherStepInterpolation.js ***! + \***********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -27452,9 +27452,9 @@ module.exports = SmootherStepInterpolation; /***/ }), /***/ "../../../src/math/interpolation/index.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/interpolation/index.js ***! - \**********************************************************/ +/*!***************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/interpolation/index.js ***! + \***************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -27484,9 +27484,9 @@ module.exports = { /***/ }), /***/ "../../../src/math/pow2/GetPowerOfTwo.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/math/pow2/GetPowerOfTwo.js ***! - \*********************************************************/ +/*!**************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/pow2/GetPowerOfTwo.js ***! + \**************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -27519,9 +27519,9 @@ module.exports = GetPowerOfTwo; /***/ }), /***/ "../../../src/math/pow2/IsSizePowerOfTwo.js": -/*!************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/pow2/IsSizePowerOfTwo.js ***! - \************************************************************/ +/*!*****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/pow2/IsSizePowerOfTwo.js ***! + \*****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -27554,9 +27554,9 @@ module.exports = IsSizePowerOfTwo; /***/ }), /***/ "../../../src/math/pow2/IsValuePowerOfTwo.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/pow2/IsValuePowerOfTwo.js ***! - \*************************************************************/ +/*!******************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/pow2/IsValuePowerOfTwo.js ***! + \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -27587,9 +27587,9 @@ module.exports = IsValuePowerOfTwo; /***/ }), /***/ "../../../src/math/pow2/index.js": -/*!*************************************************!*\ - !*** D:/wamp/www/phaser/src/math/pow2/index.js ***! - \*************************************************/ +/*!******************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/pow2/index.js ***! + \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -27615,9 +27615,9 @@ module.exports = { /***/ }), /***/ "../../../src/math/random-data-generator/RandomDataGenerator.js": -/*!********************************************************************************!*\ - !*** D:/wamp/www/phaser/src/math/random-data-generator/RandomDataGenerator.js ***! - \********************************************************************************/ +/*!*************************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/random-data-generator/RandomDataGenerator.js ***! + \*************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -28130,9 +28130,9 @@ module.exports = RandomDataGenerator; /***/ }), /***/ "../../../src/math/snap/SnapCeil.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/math/snap/SnapCeil.js ***! - \****************************************************/ +/*!*********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/snap/SnapCeil.js ***! + \*********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -28179,9 +28179,9 @@ module.exports = SnapCeil; /***/ }), /***/ "../../../src/math/snap/SnapFloor.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/math/snap/SnapFloor.js ***! - \*****************************************************/ +/*!**********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/snap/SnapFloor.js ***! + \**********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -28228,9 +28228,9 @@ module.exports = SnapFloor; /***/ }), /***/ "../../../src/math/snap/SnapTo.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/math/snap/SnapTo.js ***! - \**************************************************/ +/*!*******************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/snap/SnapTo.js ***! + \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -28276,9 +28276,9 @@ module.exports = SnapTo; /***/ }), /***/ "../../../src/math/snap/index.js": -/*!*************************************************!*\ - !*** D:/wamp/www/phaser/src/math/snap/index.js ***! - \*************************************************/ +/*!******************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/math/snap/index.js ***! + \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -28304,9 +28304,9 @@ module.exports = { /***/ }), /***/ "../../../src/plugins/BasePlugin.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/plugins/BasePlugin.js ***! - \****************************************************/ +/*!*********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/plugins/BasePlugin.js ***! + \*********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -28439,9 +28439,9 @@ module.exports = BasePlugin; /***/ }), /***/ "../../../src/plugins/ScenePlugin.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/plugins/ScenePlugin.js ***! - \*****************************************************/ +/*!**********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/plugins/ScenePlugin.js ***! + \**********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -28572,9 +28572,9 @@ module.exports = ScenePlugin; /***/ }), /***/ "../../../src/renderer/BlendModes.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/renderer/BlendModes.js ***! - \*****************************************************/ +/*!**********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/renderer/BlendModes.js ***! + \**********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -28916,9 +28916,9 @@ module.exports = { /***/ }), /***/ "../../../src/scale/events/RESIZE_EVENT.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/scale/events/RESIZE_EVENT.js ***! - \***********************************************************/ +/*!****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/scale/events/RESIZE_EVENT.js ***! + \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -28952,9 +28952,9 @@ module.exports = 'resize'; /***/ }), /***/ "../../../src/scene/events/ADDED_TO_SCENE_EVENT.js": -/*!*******************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/ADDED_TO_SCENE_EVENT.js ***! - \*******************************************************************/ +/*!************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/ADDED_TO_SCENE_EVENT.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -28983,9 +28983,9 @@ module.exports = 'addedtoscene'; /***/ }), /***/ "../../../src/scene/events/BOOT_EVENT.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/BOOT_EVENT.js ***! - \*********************************************************/ +/*!**************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/BOOT_EVENT.js ***! + \**************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29013,9 +29013,9 @@ module.exports = 'boot'; /***/ }), /***/ "../../../src/scene/events/CREATE_EVENT.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/CREATE_EVENT.js ***! - \***********************************************************/ +/*!****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/CREATE_EVENT.js ***! + \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29047,9 +29047,9 @@ module.exports = 'create'; /***/ }), /***/ "../../../src/scene/events/DESTROY_EVENT.js": -/*!************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/DESTROY_EVENT.js ***! - \************************************************************/ +/*!*****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/DESTROY_EVENT.js ***! + \*****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29079,9 +29079,9 @@ module.exports = 'destroy'; /***/ }), /***/ "../../../src/scene/events/PAUSE_EVENT.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/PAUSE_EVENT.js ***! - \**********************************************************/ +/*!***************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/PAUSE_EVENT.js ***! + \***************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29111,9 +29111,9 @@ module.exports = 'pause'; /***/ }), /***/ "../../../src/scene/events/POST_UPDATE_EVENT.js": -/*!****************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/POST_UPDATE_EVENT.js ***! - \****************************************************************/ +/*!*********************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/POST_UPDATE_EVENT.js ***! + \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29153,9 +29153,9 @@ module.exports = 'postupdate'; /***/ }), /***/ "../../../src/scene/events/PRE_UPDATE_EVENT.js": -/*!***************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/PRE_UPDATE_EVENT.js ***! - \***************************************************************/ +/*!********************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/PRE_UPDATE_EVENT.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29195,9 +29195,9 @@ module.exports = 'preupdate'; /***/ }), /***/ "../../../src/scene/events/READY_EVENT.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/READY_EVENT.js ***! - \**********************************************************/ +/*!***************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/READY_EVENT.js ***! + \***************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29228,9 +29228,9 @@ module.exports = 'ready'; /***/ }), /***/ "../../../src/scene/events/REMOVED_FROM_SCENE_EVENT.js": -/*!***********************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/REMOVED_FROM_SCENE_EVENT.js ***! - \***********************************************************************/ +/*!****************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/REMOVED_FROM_SCENE_EVENT.js ***! + \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29259,9 +29259,9 @@ module.exports = 'removedfromscene'; /***/ }), /***/ "../../../src/scene/events/RENDER_EVENT.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/RENDER_EVENT.js ***! - \***********************************************************/ +/*!****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/RENDER_EVENT.js ***! + \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29300,9 +29300,9 @@ module.exports = 'render'; /***/ }), /***/ "../../../src/scene/events/RESUME_EVENT.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/RESUME_EVENT.js ***! - \***********************************************************/ +/*!****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/RESUME_EVENT.js ***! + \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29332,9 +29332,9 @@ module.exports = 'resume'; /***/ }), /***/ "../../../src/scene/events/SHUTDOWN_EVENT.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/SHUTDOWN_EVENT.js ***! - \*************************************************************/ +/*!******************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/SHUTDOWN_EVENT.js ***! + \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29367,9 +29367,9 @@ module.exports = 'shutdown'; /***/ }), /***/ "../../../src/scene/events/SLEEP_EVENT.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/SLEEP_EVENT.js ***! - \**********************************************************/ +/*!***************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/SLEEP_EVENT.js ***! + \***************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29399,9 +29399,9 @@ module.exports = 'sleep'; /***/ }), /***/ "../../../src/scene/events/START_EVENT.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/START_EVENT.js ***! - \**********************************************************/ +/*!***************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/START_EVENT.js ***! + \***************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29429,9 +29429,9 @@ module.exports = 'start'; /***/ }), /***/ "../../../src/scene/events/TRANSITION_COMPLETE_EVENT.js": -/*!************************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js ***! - \************************************************************************/ +/*!*****************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js ***! + \*****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29470,9 +29470,9 @@ module.exports = 'transitioncomplete'; /***/ }), /***/ "../../../src/scene/events/TRANSITION_INIT_EVENT.js": -/*!********************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/TRANSITION_INIT_EVENT.js ***! - \********************************************************************/ +/*!*************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/TRANSITION_INIT_EVENT.js ***! + \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29512,9 +29512,9 @@ module.exports = 'transitioninit'; /***/ }), /***/ "../../../src/scene/events/TRANSITION_OUT_EVENT.js": -/*!*******************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/TRANSITION_OUT_EVENT.js ***! - \*******************************************************************/ +/*!************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/TRANSITION_OUT_EVENT.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29551,9 +29551,9 @@ module.exports = 'transitionout'; /***/ }), /***/ "../../../src/scene/events/TRANSITION_START_EVENT.js": -/*!*********************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/TRANSITION_START_EVENT.js ***! - \*********************************************************************/ +/*!**************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/TRANSITION_START_EVENT.js ***! + \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29596,9 +29596,9 @@ module.exports = 'transitionstart'; /***/ }), /***/ "../../../src/scene/events/TRANSITION_WAKE_EVENT.js": -/*!********************************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js ***! - \********************************************************************/ +/*!*************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js ***! + \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29636,9 +29636,9 @@ module.exports = 'transitionwake'; /***/ }), /***/ "../../../src/scene/events/UPDATE_EVENT.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/UPDATE_EVENT.js ***! - \***********************************************************/ +/*!****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/UPDATE_EVENT.js ***! + \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29678,9 +29678,9 @@ module.exports = 'update'; /***/ }), /***/ "../../../src/scene/events/WAKE_EVENT.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/WAKE_EVENT.js ***! - \*********************************************************/ +/*!**************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/WAKE_EVENT.js ***! + \**************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29710,9 +29710,9 @@ module.exports = 'wake'; /***/ }), /***/ "../../../src/scene/events/index.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/scene/events/index.js ***! - \****************************************************/ +/*!*********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/scene/events/index.js ***! + \*********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -29756,9 +29756,9 @@ module.exports = { /***/ }), /***/ "../../../src/tweens/builders/GetBoolean.js": -/*!************************************************************!*\ - !*** D:/wamp/www/phaser/src/tweens/builders/GetBoolean.js ***! - \************************************************************/ +/*!*****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/tweens/builders/GetBoolean.js ***! + \*****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29802,9 +29802,9 @@ module.exports = GetBoolean; /***/ }), /***/ "../../../src/tweens/tween/const.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/tweens/tween/const.js ***! - \****************************************************/ +/*!*********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/tweens/tween/const.js ***! + \*********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -29979,9 +29979,9 @@ module.exports = TWEEN_CONST; /***/ }), /***/ "../../../src/utils/Class.js": -/*!*********************************************!*\ - !*** D:/wamp/www/phaser/src/utils/Class.js ***! - \*********************************************/ +/*!**************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/Class.js ***! + \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -30238,9 +30238,9 @@ module.exports = Class; /***/ }), /***/ "../../../src/utils/NOOP.js": -/*!********************************************!*\ - !*** D:/wamp/www/phaser/src/utils/NOOP.js ***! - \********************************************/ +/*!*************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/NOOP.js ***! + \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -30270,9 +30270,9 @@ module.exports = NOOP; /***/ }), /***/ "../../../src/utils/array/Add.js": -/*!*************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/Add.js ***! - \*************************************************/ +/*!******************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/Add.js ***! + \******************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -30392,9 +30392,9 @@ module.exports = Add; /***/ }), /***/ "../../../src/utils/array/AddAt.js": -/*!***************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/AddAt.js ***! - \***************************************************/ +/*!********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/AddAt.js ***! + \********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -30519,9 +30519,9 @@ module.exports = AddAt; /***/ }), /***/ "../../../src/utils/array/BringToTop.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/BringToTop.js ***! - \********************************************************/ +/*!*************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/BringToTop.js ***! + \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -30562,9 +30562,9 @@ module.exports = BringToTop; /***/ }), /***/ "../../../src/utils/array/CountAllMatching.js": -/*!**************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/CountAllMatching.js ***! - \**************************************************************/ +/*!*******************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/CountAllMatching.js ***! + \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -30619,9 +30619,9 @@ module.exports = CountAllMatching; /***/ }), /***/ "../../../src/utils/array/Each.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/Each.js ***! - \**************************************************/ +/*!*******************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/Each.js ***! + \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -30670,9 +30670,9 @@ module.exports = Each; /***/ }), /***/ "../../../src/utils/array/EachInRange.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/EachInRange.js ***! - \*********************************************************/ +/*!**************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/EachInRange.js ***! + \**************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -30731,9 +30731,9 @@ module.exports = EachInRange; /***/ }), /***/ "../../../src/utils/array/FindClosestInSorted.js": -/*!*****************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/FindClosestInSorted.js ***! - \*****************************************************************/ +/*!**********************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/FindClosestInSorted.js ***! + \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -30820,9 +30820,9 @@ module.exports = FindClosestInSorted; /***/ }), /***/ "../../../src/utils/array/GetAll.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/GetAll.js ***! - \****************************************************/ +/*!*********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/GetAll.js ***! + \*********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -30887,9 +30887,9 @@ module.exports = GetAll; /***/ }), /***/ "../../../src/utils/array/GetFirst.js": -/*!******************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/GetFirst.js ***! - \******************************************************/ +/*!***********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/GetFirst.js ***! + \***********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -30951,9 +30951,9 @@ module.exports = GetFirst; /***/ }), /***/ "../../../src/utils/array/GetRandom.js": -/*!*******************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/GetRandom.js ***! - \*******************************************************/ +/*!************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/GetRandom.js ***! + \************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -30991,9 +30991,9 @@ module.exports = GetRandom; /***/ }), /***/ "../../../src/utils/array/MoveDown.js": -/*!******************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/MoveDown.js ***! - \******************************************************/ +/*!***********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/MoveDown.js ***! + \***********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -31038,9 +31038,9 @@ module.exports = MoveDown; /***/ }), /***/ "../../../src/utils/array/MoveTo.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/MoveTo.js ***! - \****************************************************/ +/*!*********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/MoveTo.js ***! + \*********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -31090,9 +31090,9 @@ module.exports = MoveTo; /***/ }), /***/ "../../../src/utils/array/MoveUp.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/MoveUp.js ***! - \****************************************************/ +/*!*********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/MoveUp.js ***! + \*********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -31137,9 +31137,9 @@ module.exports = MoveUp; /***/ }), /***/ "../../../src/utils/array/NumberArray.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/NumberArray.js ***! - \*********************************************************/ +/*!**************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/NumberArray.js ***! + \**************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -31206,9 +31206,9 @@ module.exports = NumberArray; /***/ }), /***/ "../../../src/utils/array/NumberArrayStep.js": -/*!*************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/NumberArrayStep.js ***! - \*************************************************************/ +/*!******************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/NumberArrayStep.js ***! + \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -31288,9 +31288,9 @@ module.exports = NumberArrayStep; /***/ }), /***/ "../../../src/utils/array/QuickSelect.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/QuickSelect.js ***! - \*********************************************************/ +/*!**************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/QuickSelect.js ***! + \**************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -31415,9 +31415,9 @@ module.exports = QuickSelect; /***/ }), /***/ "../../../src/utils/array/Range.js": -/*!***************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/Range.js ***! - \***************************************************/ +/*!********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/Range.js ***! + \********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -31558,9 +31558,9 @@ module.exports = Range; /***/ }), /***/ "../../../src/utils/array/Remove.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/Remove.js ***! - \****************************************************/ +/*!*********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/Remove.js ***! + \*********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -31654,9 +31654,9 @@ module.exports = Remove; /***/ }), /***/ "../../../src/utils/array/RemoveAt.js": -/*!******************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/RemoveAt.js ***! - \******************************************************/ +/*!***********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/RemoveAt.js ***! + \***********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -31710,9 +31710,9 @@ module.exports = RemoveAt; /***/ }), /***/ "../../../src/utils/array/RemoveBetween.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/RemoveBetween.js ***! - \***********************************************************/ +/*!****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/RemoveBetween.js ***! + \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -31778,9 +31778,9 @@ module.exports = RemoveBetween; /***/ }), /***/ "../../../src/utils/array/RemoveRandomElement.js": -/*!*****************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/RemoveRandomElement.js ***! - \*****************************************************************/ +/*!**********************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/RemoveRandomElement.js ***! + \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -31821,9 +31821,9 @@ module.exports = RemoveRandomElement; /***/ }), /***/ "../../../src/utils/array/Replace.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/Replace.js ***! - \*****************************************************/ +/*!**********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/Replace.js ***! + \**********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -31870,9 +31870,9 @@ module.exports = Replace; /***/ }), /***/ "../../../src/utils/array/RotateLeft.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/RotateLeft.js ***! - \********************************************************/ +/*!*************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/RotateLeft.js ***! + \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -31915,9 +31915,9 @@ module.exports = RotateLeft; /***/ }), /***/ "../../../src/utils/array/RotateRight.js": -/*!*********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/RotateRight.js ***! - \*********************************************************/ +/*!**************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/RotateRight.js ***! + \**************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -31960,9 +31960,9 @@ module.exports = RotateRight; /***/ }), /***/ "../../../src/utils/array/SafeRange.js": -/*!*******************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/SafeRange.js ***! - \*******************************************************/ +/*!************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/SafeRange.js ***! + \************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -32014,9 +32014,9 @@ module.exports = SafeRange; /***/ }), /***/ "../../../src/utils/array/SendToBack.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/SendToBack.js ***! - \********************************************************/ +/*!*************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/SendToBack.js ***! + \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -32057,9 +32057,9 @@ module.exports = SendToBack; /***/ }), /***/ "../../../src/utils/array/SetAll.js": -/*!****************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/SetAll.js ***! - \****************************************************/ +/*!*********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/SetAll.js ***! + \*********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -32117,9 +32117,9 @@ module.exports = SetAll; /***/ }), /***/ "../../../src/utils/array/Shuffle.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/Shuffle.js ***! - \*****************************************************/ +/*!**********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/Shuffle.js ***! + \**********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -32163,9 +32163,9 @@ module.exports = Shuffle; /***/ }), /***/ "../../../src/utils/array/SpliceOne.js": -/*!*******************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/SpliceOne.js ***! - \*******************************************************/ +/*!************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/SpliceOne.js ***! + \************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -32214,9 +32214,9 @@ module.exports = SpliceOne; /***/ }), /***/ "../../../src/utils/array/StableSort.js": -/*!********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/StableSort.js ***! - \********************************************************/ +/*!*************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/StableSort.js ***! + \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -32364,9 +32364,9 @@ else {} /***/ }), /***/ "../../../src/utils/array/Swap.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/Swap.js ***! - \**************************************************/ +/*!*******************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/Swap.js ***! + \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -32417,9 +32417,9 @@ module.exports = Swap; /***/ }), /***/ "../../../src/utils/array/index.js": -/*!***************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/index.js ***! - \***************************************************/ +/*!********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/index.js ***! + \********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -32475,9 +32475,9 @@ module.exports = { /***/ }), /***/ "../../../src/utils/array/matrix/CheckMatrix.js": -/*!****************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/matrix/CheckMatrix.js ***! - \****************************************************************/ +/*!*********************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/CheckMatrix.js ***! + \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -32541,9 +32541,9 @@ module.exports = CheckMatrix; /***/ }), /***/ "../../../src/utils/array/matrix/MatrixToString.js": -/*!*******************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/matrix/MatrixToString.js ***! - \*******************************************************************/ +/*!************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/MatrixToString.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -32627,9 +32627,9 @@ module.exports = MatrixToString; /***/ }), /***/ "../../../src/utils/array/matrix/ReverseColumns.js": -/*!*******************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/matrix/ReverseColumns.js ***! - \*******************************************************************/ +/*!************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/ReverseColumns.js ***! + \************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -32663,9 +32663,9 @@ module.exports = ReverseColumns; /***/ }), /***/ "../../../src/utils/array/matrix/ReverseRows.js": -/*!****************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/matrix/ReverseRows.js ***! - \****************************************************************/ +/*!*********************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/ReverseRows.js ***! + \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -32704,9 +32704,9 @@ module.exports = ReverseRows; /***/ }), /***/ "../../../src/utils/array/matrix/Rotate180.js": -/*!**************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/matrix/Rotate180.js ***! - \**************************************************************/ +/*!*******************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/Rotate180.js ***! + \*******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -32742,9 +32742,9 @@ module.exports = Rotate180; /***/ }), /***/ "../../../src/utils/array/matrix/RotateLeft.js": -/*!***************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/matrix/RotateLeft.js ***! - \***************************************************************/ +/*!********************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/RotateLeft.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -32780,9 +32780,9 @@ module.exports = RotateLeft; /***/ }), /***/ "../../../src/utils/array/matrix/RotateMatrix.js": -/*!*****************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/matrix/RotateMatrix.js ***! - \*****************************************************************/ +/*!**********************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/RotateMatrix.js ***! + \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -32857,9 +32857,9 @@ module.exports = RotateMatrix; /***/ }), /***/ "../../../src/utils/array/matrix/RotateRight.js": -/*!****************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/matrix/RotateRight.js ***! - \****************************************************************/ +/*!*********************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/RotateRight.js ***! + \*********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -32895,9 +32895,9 @@ module.exports = RotateRight; /***/ }), /***/ "../../../src/utils/array/matrix/TransposeMatrix.js": -/*!********************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/matrix/TransposeMatrix.js ***! - \********************************************************************/ +/*!*************************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/TransposeMatrix.js ***! + \*************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -32948,9 +32948,9 @@ module.exports = TransposeMatrix; /***/ }), /***/ "../../../src/utils/array/matrix/index.js": -/*!**********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/array/matrix/index.js ***! - \**********************************************************/ +/*!***************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/index.js ***! + \***************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -32982,9 +32982,9 @@ module.exports = { /***/ }), /***/ "../../../src/utils/object/Extend.js": -/*!*****************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/object/Extend.js ***! - \*****************************************************/ +/*!**********************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/object/Extend.js ***! + \**********************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -33088,9 +33088,9 @@ module.exports = Extend; /***/ }), /***/ "../../../src/utils/object/GetAdvancedValue.js": -/*!***************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/object/GetAdvancedValue.js ***! - \***************************************************************/ +/*!********************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/object/GetAdvancedValue.js ***! + \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { @@ -33180,9 +33180,9 @@ module.exports = GetAdvancedValue; /***/ }), /***/ "../../../src/utils/object/GetFastValue.js": -/*!***********************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/object/GetFastValue.js ***! - \***********************************************************/ +/*!****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/object/GetFastValue.js ***! + \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -33228,9 +33228,9 @@ module.exports = GetFastValue; /***/ }), /***/ "../../../src/utils/object/GetValue.js": -/*!*******************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/object/GetValue.js ***! - \*******************************************************/ +/*!************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/object/GetValue.js ***! + \************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -33304,9 +33304,9 @@ module.exports = GetValue; /***/ }), /***/ "../../../src/utils/object/IsPlainObject.js": -/*!************************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/object/IsPlainObject.js ***! - \************************************************************/ +/*!*****************************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/object/IsPlainObject.js ***! + \*****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -33365,9 +33365,9 @@ module.exports = IsPlainObject; /***/ }), /***/ "../../../src/utils/string/Pad.js": -/*!**************************************************!*\ - !*** D:/wamp/www/phaser/src/utils/string/Pad.js ***! - \**************************************************/ +/*!*******************************************************************!*\ + !*** /Users/rich/Documents/GitHub/phaser/src/utils/string/Pad.js ***! + \*******************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { @@ -33665,6 +33665,7 @@ var SpineFile = new Class({ var atlasKey = ''; var combinedAtlasData = ''; var preMultipliedAlpha = (this.config.preMultipliedAlpha) ? true : false; + var textureManager = this.loader.textureManager; for (var i = 1; i < this.files.length; i++) { @@ -33684,7 +33685,10 @@ var SpineFile = new Class({ var pos = src.indexOf('_'); var key = src.substr(pos + 1); - this.loader.textureManager.addImage(key, file.data); + if (!textureManager.exists(key)) + { + textureManager.addImage(key, file.data); + } } file.pendingDestroy(); @@ -33788,10 +33792,15 @@ var NOOP = __webpack_require__(/*! ../../../src/utils/NOOP */ "../../../src/util * this.load.spine('stretchyman', 'stretchyman-pro.json', [ 'stretchyman-pma.atlas' ], true); * ``` * - * It also installs a Game Object Factory method, allowing you to create Spine Game Objects: + * It also installs two Game Object Factory methods, allowing you to create Spine Game Objects + * and Spine Containers: * * ```javascript - * this.add.spine(512, 650, 'stretchyman') + * const man = this.add.spine(512, 650, 'stretchyman'); + * + * const container = this.add.spineContainer(); + * + * container.add(man); * ``` * * The first argument is the key which you used when importing the Spine data. There are lots of @@ -34091,7 +34100,7 @@ var SpinePlugin = new Class({ pluginManager.registerFileType('spine', this.spineFileCallback, scene); pluginManager.registerGameObject('spine', add, make); - pluginManager.registerGameObject('spinecontainer', addContainer, makeContainer); + pluginManager.registerGameObject('spineContainer', addContainer, makeContainer); }, /** @@ -34118,6 +34127,8 @@ var SpinePlugin = new Class({ eventEmitter.once('shutdown', this.shutdown, this); eventEmitter.once('destroy', this.destroy, this); + + this.game.events.once('destroy', this.gameDestroy, this); }, /** @@ -34802,14 +34813,6 @@ var SpinePlugin = new Class({ { this.shutdown(); - if (this.sceneRenderer) - { - this.sceneRenderer.dispose(); - } - - this.pluginManager.removeGameObject('spine', true, true); - - this.pluginManager = null; this.game = null; this.scene = null; this.systems = null; @@ -34818,14 +34821,39 @@ var SpinePlugin = new Class({ this.spineTextures = null; this.json = null; this.textures = null; - this.sceneRenderer = null; this.skeletonRenderer = null; this.gl = null; + }, + + /** + * The Game that owns this plugin is being destroyed. + * + * Dispose of the Scene Renderer and remove the Game Objects. + * + * @method SpinePlugin#gameDestroy + * @private + * @since 3.50.0 + */ + gameDestroy: function () + { + this.destroy(); + + if (this.sceneRenderer) + { + this.sceneRenderer.dispose(); + } + + this.sceneRenderer = null; + this.pluginManager = null; + + this.pluginManager.removeGameObject('spine', true, true); + this.pluginManager.removeGameObject('spineContainer', true, true); } }); SpinePlugin.SpineGameObject = SpineGameObject; +SpinePlugin.SpineContainer = SpineContainer; /** * Creates a new Spine Game Object and adds it to the Scene. @@ -34920,8 +34948,8 @@ var SpineContainerRender = __webpack_require__(/*! ./SpineContainerRender */ "./ * A Spine Container is a special kind of Container created specifically for Spine Game Objects. * * You have all of the same features of a standard Container, but the rendering functions are optimized specifically - * for Spine Game Objects. You cannot mix and match Spine Game Objects with regular Game Objects inside of this - * type of Container, however. + * for Spine Game Objects. You must only add ever Spine Game Objects to this type of Container. Although Phaser will + * not prevent you from adding other types, they will not render and are likely to throw runtime errors. * * To create one in a Scene, use the factory methods: * @@ -34935,7 +34963,7 @@ var SpineContainerRender = __webpack_require__(/*! ./SpineContainerRender */ "./ * this.make.spinecontainer(); * ``` * - * See the Container documentation for further details. + * See the Container documentation for further details about what Containers can do. * * @class SpineContainer * @extends Phaser.GameObjects.Container @@ -34968,11 +34996,30 @@ var SpineContainer = new Class({ /** * A reference to the Spine Plugin. * - * @name SpineGameObject#plugin + * @name SpineContainer#plugin * @type {SpinePlugin} - * @since 3.19.0 + * @since 3.50.0 */ this.plugin = plugin; + }, + + /** + * Internal destroy handler, called as part of the destroy process. + * + * @method SpineContainer#preDestroy + * @protected + * @since 3.50.0 + */ + preDestroy: function () + { + this.removeAll(!!this.exclusive); + + this.localTransform.destroy(); + this.tempTransformMatrix.destroy(); + + this.list = []; + this._displayList = null; + this.plugin = null; } }); @@ -36478,7 +36525,7 @@ var SpineGameObject = new Class({ * @param {integer} trackIndex - The track index to play the animation on. * @param {string} animationName - The string-based key of the animation to play. * @param {boolean} [loop=false] - Should the animation be looped when played? - * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call. + * @param {boolean} [ignoreIfPlaying=false] - If the animation specified by the track index is already playing then ignore this call. * * @return {spine.TrackEntry} A track entry to allow further customization of animation playback. */ @@ -36489,7 +36536,7 @@ var SpineGameObject = new Class({ if (ignoreIfPlaying && this.state) { - var currentTrack = this.state.getCurrent(0); + var currentTrack = this.state.getCurrent(trackIndex); if (currentTrack && currentTrack.animation.name === animationName && !currentTrack.isComplete()) { @@ -37288,6 +37335,12 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent var childAlpha = skeleton.color.a; var sceneRenderer = plugin.sceneRenderer; + if (renderer.newType) + { + // flush + clear if this is a new type, even if it doesn't render + renderer.clearPipeline(); + } + var GameObjectRenderMask = 15; var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || childAlpha === 0); @@ -37305,18 +37358,13 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent // Reset the current type renderer.currentType = ''; - renderer.rebindPipeline(renderer.pipelines.MultiPipeline); + renderer.rebindPipeline(); } } return; } - if (renderer.newType) - { - renderer.clearPipeline(); - } - var camMatrix = renderer._tempMatrix1; var spriteMatrix = renderer._tempMatrix2; var calcMatrix = renderer._tempMatrix3; @@ -37414,13 +37462,11 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent if (!renderer.nextTypeMatch) { - // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch. + // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch sceneRenderer.end(); - if (!renderer.finalType) - { - renderer.rebindPipeline(renderer.pipelines.MultiPipeline); - } + // And rebind the previous pipeline + renderer.rebindPipeline(); } }; diff --git a/plugins/spine/dist/SpinePluginDebug.js.map b/plugins/spine/dist/SpinePluginDebug.js.map index 1488a6911..88a0bb071 100644 --- a/plugins/spine/dist/SpinePluginDebug.js.map +++ b/plugins/spine/dist/SpinePluginDebug.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///D:/wamp/www/phaser/node_modules/eventemitter3/index.js","webpack:///D:/wamp/www/phaser/src/animations/Animation.js","webpack:///D:/wamp/www/phaser/src/animations/AnimationFrame.js","webpack:///D:/wamp/www/phaser/src/animations/events/ADD_ANIMATION_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/ANIMATION_COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/ANIMATION_REPEAT_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/ANIMATION_RESTART_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/ANIMATION_START_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/PAUSE_ALL_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/REMOVE_ANIMATION_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/RESUME_ALL_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_START_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js","webpack:///D:/wamp/www/phaser/src/animations/events/index.js","webpack:///D:/wamp/www/phaser/src/core/events/BLUR_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/BOOT_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/CONTEXT_LOST_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/CONTEXT_RESTORED_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/DESTROY_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/FOCUS_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/HIDDEN_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/PAUSE_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/POST_RENDER_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/POST_STEP_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/PRE_RENDER_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/PRE_STEP_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/READY_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/RESUME_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/STEP_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/VISIBLE_EVENT.js","webpack:///D:/wamp/www/phaser/src/core/events/index.js","webpack:///D:/wamp/www/phaser/src/data/DataManager.js","webpack:///D:/wamp/www/phaser/src/data/events/CHANGE_DATA_EVENT.js","webpack:///D:/wamp/www/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js","webpack:///D:/wamp/www/phaser/src/data/events/REMOVE_DATA_EVENT.js","webpack:///D:/wamp/www/phaser/src/data/events/SET_DATA_EVENT.js","webpack:///D:/wamp/www/phaser/src/data/events/index.js","webpack:///D:/wamp/www/phaser/src/display/color/GetColorFromValue.js","webpack:///D:/wamp/www/phaser/src/display/mask/BitmapMask.js","webpack:///D:/wamp/www/phaser/src/display/mask/GeometryMask.js","webpack:///D:/wamp/www/phaser/src/gameobjects/BuildGameObject.js","webpack:///D:/wamp/www/phaser/src/gameobjects/GameObject.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Alpha.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/AlphaSingle.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Animation.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/BlendMode.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/ComputedSize.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Crop.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Depth.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Flip.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/GetBounds.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Mask.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Origin.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/PathFollower.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Pipeline.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/ScrollFactor.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Size.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Texture.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/TextureCrop.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Tint.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/ToJSON.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Transform.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/TransformMatrix.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/Visible.js","webpack:///D:/wamp/www/phaser/src/gameobjects/components/index.js","webpack:///D:/wamp/www/phaser/src/gameobjects/container/Container.js","webpack:///D:/wamp/www/phaser/src/gameobjects/container/ContainerCanvasRenderer.js","webpack:///D:/wamp/www/phaser/src/gameobjects/container/ContainerRender.js","webpack:///D:/wamp/www/phaser/src/gameobjects/container/ContainerWebGLRenderer.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/ADDED_TO_SCENE_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/DESTROY_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_CREATED_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_ERROR_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_LOOP_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_PLAY_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_SEEKED_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_SEEKING_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_STOP_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js","webpack:///D:/wamp/www/phaser/src/gameobjects/events/index.js","webpack:///D:/wamp/www/phaser/src/geom/const.js","webpack:///D:/wamp/www/phaser/src/geom/line/GetPoint.js","webpack:///D:/wamp/www/phaser/src/geom/line/GetPoints.js","webpack:///D:/wamp/www/phaser/src/geom/line/Length.js","webpack:///D:/wamp/www/phaser/src/geom/line/Line.js","webpack:///D:/wamp/www/phaser/src/geom/line/Random.js","webpack:///D:/wamp/www/phaser/src/geom/point/Point.js","webpack:///D:/wamp/www/phaser/src/geom/rectangle/Contains.js","webpack:///D:/wamp/www/phaser/src/geom/rectangle/GetPoint.js","webpack:///D:/wamp/www/phaser/src/geom/rectangle/GetPoints.js","webpack:///D:/wamp/www/phaser/src/geom/rectangle/Perimeter.js","webpack:///D:/wamp/www/phaser/src/geom/rectangle/Random.js","webpack:///D:/wamp/www/phaser/src/geom/rectangle/Rectangle.js","webpack:///D:/wamp/www/phaser/src/geom/rectangle/Union.js","webpack:///D:/wamp/www/phaser/src/loader/File.js","webpack:///D:/wamp/www/phaser/src/loader/FileTypesManager.js","webpack:///D:/wamp/www/phaser/src/loader/GetURL.js","webpack:///D:/wamp/www/phaser/src/loader/MergeXHRSettings.js","webpack:///D:/wamp/www/phaser/src/loader/MultiFile.js","webpack:///D:/wamp/www/phaser/src/loader/XHRLoader.js","webpack:///D:/wamp/www/phaser/src/loader/XHRSettings.js","webpack:///D:/wamp/www/phaser/src/loader/const.js","webpack:///D:/wamp/www/phaser/src/loader/events/ADD_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/FILE_COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/FILE_LOAD_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/FILE_PROGRESS_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/POST_PROCESS_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/PROGRESS_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/START_EVENT.js","webpack:///D:/wamp/www/phaser/src/loader/events/index.js","webpack:///D:/wamp/www/phaser/src/loader/filetypes/ImageFile.js","webpack:///D:/wamp/www/phaser/src/loader/filetypes/JSONFile.js","webpack:///D:/wamp/www/phaser/src/loader/filetypes/TextFile.js","webpack:///D:/wamp/www/phaser/src/math/Average.js","webpack:///D:/wamp/www/phaser/src/math/Bernstein.js","webpack:///D:/wamp/www/phaser/src/math/Between.js","webpack:///D:/wamp/www/phaser/src/math/CatmullRom.js","webpack:///D:/wamp/www/phaser/src/math/CeilTo.js","webpack:///D:/wamp/www/phaser/src/math/Clamp.js","webpack:///D:/wamp/www/phaser/src/math/DegToRad.js","webpack:///D:/wamp/www/phaser/src/math/Difference.js","webpack:///D:/wamp/www/phaser/src/math/Factorial.js","webpack:///D:/wamp/www/phaser/src/math/FloatBetween.js","webpack:///D:/wamp/www/phaser/src/math/FloorTo.js","webpack:///D:/wamp/www/phaser/src/math/FromPercent.js","webpack:///D:/wamp/www/phaser/src/math/GetSpeed.js","webpack:///D:/wamp/www/phaser/src/math/IsEven.js","webpack:///D:/wamp/www/phaser/src/math/IsEvenStrict.js","webpack:///D:/wamp/www/phaser/src/math/Linear.js","webpack:///D:/wamp/www/phaser/src/math/Matrix3.js","webpack:///D:/wamp/www/phaser/src/math/Matrix4.js","webpack:///D:/wamp/www/phaser/src/math/MaxAdd.js","webpack:///D:/wamp/www/phaser/src/math/MinSub.js","webpack:///D:/wamp/www/phaser/src/math/Percent.js","webpack:///D:/wamp/www/phaser/src/math/Quaternion.js","webpack:///D:/wamp/www/phaser/src/math/RadToDeg.js","webpack:///D:/wamp/www/phaser/src/math/RandomXY.js","webpack:///D:/wamp/www/phaser/src/math/RandomXYZ.js","webpack:///D:/wamp/www/phaser/src/math/RandomXYZW.js","webpack:///D:/wamp/www/phaser/src/math/Rotate.js","webpack:///D:/wamp/www/phaser/src/math/RotateAround.js","webpack:///D:/wamp/www/phaser/src/math/RotateAroundDistance.js","webpack:///D:/wamp/www/phaser/src/math/RotateTo.js","webpack:///D:/wamp/www/phaser/src/math/RotateVec3.js","webpack:///D:/wamp/www/phaser/src/math/RoundAwayFromZero.js","webpack:///D:/wamp/www/phaser/src/math/RoundTo.js","webpack:///D:/wamp/www/phaser/src/math/SinCosTableGenerator.js","webpack:///D:/wamp/www/phaser/src/math/SmoothStep.js","webpack:///D:/wamp/www/phaser/src/math/SmootherStep.js","webpack:///D:/wamp/www/phaser/src/math/ToXY.js","webpack:///D:/wamp/www/phaser/src/math/TransformXY.js","webpack:///D:/wamp/www/phaser/src/math/Vector2.js","webpack:///D:/wamp/www/phaser/src/math/Vector3.js","webpack:///D:/wamp/www/phaser/src/math/Vector4.js","webpack:///D:/wamp/www/phaser/src/math/Within.js","webpack:///D:/wamp/www/phaser/src/math/Wrap.js","webpack:///D:/wamp/www/phaser/src/math/angle/Between.js","webpack:///D:/wamp/www/phaser/src/math/angle/BetweenPoints.js","webpack:///D:/wamp/www/phaser/src/math/angle/BetweenPointsY.js","webpack:///D:/wamp/www/phaser/src/math/angle/BetweenY.js","webpack:///D:/wamp/www/phaser/src/math/angle/CounterClockwise.js","webpack:///D:/wamp/www/phaser/src/math/angle/Normalize.js","webpack:///D:/wamp/www/phaser/src/math/angle/Random.js","webpack:///D:/wamp/www/phaser/src/math/angle/RandomDegrees.js","webpack:///D:/wamp/www/phaser/src/math/angle/Reverse.js","webpack:///D:/wamp/www/phaser/src/math/angle/RotateTo.js","webpack:///D:/wamp/www/phaser/src/math/angle/ShortestBetween.js","webpack:///D:/wamp/www/phaser/src/math/angle/Wrap.js","webpack:///D:/wamp/www/phaser/src/math/angle/WrapDegrees.js","webpack:///D:/wamp/www/phaser/src/math/angle/index.js","webpack:///D:/wamp/www/phaser/src/math/const.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistanceBetween.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistanceBetweenPoints.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistanceBetweenPointsSquared.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistanceChebyshev.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistancePower.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistanceSnake.js","webpack:///D:/wamp/www/phaser/src/math/distance/DistanceSquared.js","webpack:///D:/wamp/www/phaser/src/math/distance/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/back/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/back/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/back/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/back/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/bounce/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/bounce/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/bounce/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/bounce/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/circular/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/circular/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/circular/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/circular/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/cubic/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/cubic/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/cubic/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/cubic/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/elastic/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/elastic/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/elastic/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/elastic/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/expo/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/expo/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/expo/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/expo/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/linear/Linear.js","webpack:///D:/wamp/www/phaser/src/math/easing/linear/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/quadratic/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/quadratic/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/quadratic/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/quadratic/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/quartic/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/quartic/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/quartic/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/quartic/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/quintic/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/quintic/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/quintic/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/quintic/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/sine/In.js","webpack:///D:/wamp/www/phaser/src/math/easing/sine/InOut.js","webpack:///D:/wamp/www/phaser/src/math/easing/sine/Out.js","webpack:///D:/wamp/www/phaser/src/math/easing/sine/index.js","webpack:///D:/wamp/www/phaser/src/math/easing/stepped/Stepped.js","webpack:///D:/wamp/www/phaser/src/math/easing/stepped/index.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/Ceil.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/Equal.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/Floor.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/GreaterThan.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/LessThan.js","webpack:///D:/wamp/www/phaser/src/math/fuzzy/index.js","webpack:///D:/wamp/www/phaser/src/math/index.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/BezierInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/CatmullRomInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/CubicBezierInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/LinearInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/QuadraticBezierInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/SmoothStepInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/SmootherStepInterpolation.js","webpack:///D:/wamp/www/phaser/src/math/interpolation/index.js","webpack:///D:/wamp/www/phaser/src/math/pow2/GetPowerOfTwo.js","webpack:///D:/wamp/www/phaser/src/math/pow2/IsSizePowerOfTwo.js","webpack:///D:/wamp/www/phaser/src/math/pow2/IsValuePowerOfTwo.js","webpack:///D:/wamp/www/phaser/src/math/pow2/index.js","webpack:///D:/wamp/www/phaser/src/math/random-data-generator/RandomDataGenerator.js","webpack:///D:/wamp/www/phaser/src/math/snap/SnapCeil.js","webpack:///D:/wamp/www/phaser/src/math/snap/SnapFloor.js","webpack:///D:/wamp/www/phaser/src/math/snap/SnapTo.js","webpack:///D:/wamp/www/phaser/src/math/snap/index.js","webpack:///D:/wamp/www/phaser/src/plugins/BasePlugin.js","webpack:///D:/wamp/www/phaser/src/plugins/ScenePlugin.js","webpack:///D:/wamp/www/phaser/src/renderer/BlendModes.js","webpack:///D:/wamp/www/phaser/src/scale/events/RESIZE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/ADDED_TO_SCENE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/BOOT_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/CREATE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/DESTROY_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/PAUSE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/POST_UPDATE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/PRE_UPDATE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/READY_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/REMOVED_FROM_SCENE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/RENDER_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/RESUME_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/SHUTDOWN_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/SLEEP_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/START_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/TRANSITION_INIT_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/TRANSITION_OUT_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/TRANSITION_START_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/UPDATE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/WAKE_EVENT.js","webpack:///D:/wamp/www/phaser/src/scene/events/index.js","webpack:///D:/wamp/www/phaser/src/tweens/builders/GetBoolean.js","webpack:///D:/wamp/www/phaser/src/tweens/tween/const.js","webpack:///D:/wamp/www/phaser/src/utils/Class.js","webpack:///D:/wamp/www/phaser/src/utils/NOOP.js","webpack:///D:/wamp/www/phaser/src/utils/array/Add.js","webpack:///D:/wamp/www/phaser/src/utils/array/AddAt.js","webpack:///D:/wamp/www/phaser/src/utils/array/BringToTop.js","webpack:///D:/wamp/www/phaser/src/utils/array/CountAllMatching.js","webpack:///D:/wamp/www/phaser/src/utils/array/Each.js","webpack:///D:/wamp/www/phaser/src/utils/array/EachInRange.js","webpack:///D:/wamp/www/phaser/src/utils/array/FindClosestInSorted.js","webpack:///D:/wamp/www/phaser/src/utils/array/GetAll.js","webpack:///D:/wamp/www/phaser/src/utils/array/GetFirst.js","webpack:///D:/wamp/www/phaser/src/utils/array/GetRandom.js","webpack:///D:/wamp/www/phaser/src/utils/array/MoveDown.js","webpack:///D:/wamp/www/phaser/src/utils/array/MoveTo.js","webpack:///D:/wamp/www/phaser/src/utils/array/MoveUp.js","webpack:///D:/wamp/www/phaser/src/utils/array/NumberArray.js","webpack:///D:/wamp/www/phaser/src/utils/array/NumberArrayStep.js","webpack:///D:/wamp/www/phaser/src/utils/array/QuickSelect.js","webpack:///D:/wamp/www/phaser/src/utils/array/Range.js","webpack:///D:/wamp/www/phaser/src/utils/array/Remove.js","webpack:///D:/wamp/www/phaser/src/utils/array/RemoveAt.js","webpack:///D:/wamp/www/phaser/src/utils/array/RemoveBetween.js","webpack:///D:/wamp/www/phaser/src/utils/array/RemoveRandomElement.js","webpack:///D:/wamp/www/phaser/src/utils/array/Replace.js","webpack:///D:/wamp/www/phaser/src/utils/array/RotateLeft.js","webpack:///D:/wamp/www/phaser/src/utils/array/RotateRight.js","webpack:///D:/wamp/www/phaser/src/utils/array/SafeRange.js","webpack:///D:/wamp/www/phaser/src/utils/array/SendToBack.js","webpack:///D:/wamp/www/phaser/src/utils/array/SetAll.js","webpack:///D:/wamp/www/phaser/src/utils/array/Shuffle.js","webpack:///D:/wamp/www/phaser/src/utils/array/SpliceOne.js","webpack:///D:/wamp/www/phaser/src/utils/array/StableSort.js","webpack:///D:/wamp/www/phaser/src/utils/array/Swap.js","webpack:///D:/wamp/www/phaser/src/utils/array/index.js","webpack:///D:/wamp/www/phaser/src/utils/array/matrix/CheckMatrix.js","webpack:///D:/wamp/www/phaser/src/utils/array/matrix/MatrixToString.js","webpack:///D:/wamp/www/phaser/src/utils/array/matrix/ReverseColumns.js","webpack:///D:/wamp/www/phaser/src/utils/array/matrix/ReverseRows.js","webpack:///D:/wamp/www/phaser/src/utils/array/matrix/Rotate180.js","webpack:///D:/wamp/www/phaser/src/utils/array/matrix/RotateLeft.js","webpack:///D:/wamp/www/phaser/src/utils/array/matrix/RotateMatrix.js","webpack:///D:/wamp/www/phaser/src/utils/array/matrix/RotateRight.js","webpack:///D:/wamp/www/phaser/src/utils/array/matrix/TransposeMatrix.js","webpack:///D:/wamp/www/phaser/src/utils/array/matrix/index.js","webpack:///D:/wamp/www/phaser/src/utils/object/Extend.js","webpack:///D:/wamp/www/phaser/src/utils/object/GetAdvancedValue.js","webpack:///D:/wamp/www/phaser/src/utils/object/GetFastValue.js","webpack:///D:/wamp/www/phaser/src/utils/object/GetValue.js","webpack:///D:/wamp/www/phaser/src/utils/object/IsPlainObject.js","webpack:///D:/wamp/www/phaser/src/utils/string/Pad.js","webpack:///./SpineFile.js","webpack:///./SpinePlugin.js","webpack:///./container/SpineContainer.js","webpack:///./container/SpineContainerCanvasRenderer.js","webpack:///./container/SpineContainerRender.js","webpack:///./container/SpineContainerWebGLRenderer.js","webpack:///./events/COMPLETE_EVENT.js","webpack:///./events/DISPOSE_EVENT.js","webpack:///./events/END_EVENT.js","webpack:///./events/EVENT_EVENT.js","webpack:///./events/INTERRUPTED_EVENT.js","webpack:///./events/START_EVENT.js","webpack:///./events/index.js","webpack:///./gameobject/SpineGameObject.js","webpack:///./gameobject/SpineGameObjectCanvasRenderer.js","webpack:///./gameobject/SpineGameObjectRender.js","webpack:///./gameobject/SpineGameObjectWebGLRenderer.js","webpack:///./runtimes/spine-both.js"],"names":[],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFa;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,yDAAyD,OAAO;AAChE;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yCAAyC,SAAS;AAClD;AACA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA,eAAe,YAAY;AAC3B;;AAEA;AACA,2DAA2D;AAC3D,+DAA+D;AAC/D,mEAAmE;AACnE,uEAAuE;AACvE;AACA,0DAA0D,SAAS;AACnE;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,aAAa,aAAa;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,2DAA2D,YAAY;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,aAAa;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI,IAA6B;AACjC;AACA;;;;;;;;;;;;AC/UA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,iDAAe;AACnC,YAAY,mBAAO,CAAC,mDAAgB;AACpC,mBAAmB,mBAAO,CAAC,mEAAe;AAC1C,aAAa,mBAAO,CAAC,yDAAU;AAC/B,0BAA0B,mBAAO,CAAC,2FAAoC;AACtE,YAAY,mBAAO,CAAC,mEAAkB;AACtC,eAAe,mBAAO,CAAC,uEAA0B;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mCAAmC;AAC9C,WAAW,OAAO;AAClB,WAAW,kCAAkC;AAC7C;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,kDAAkD;AACjE;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD,eAAe,QAAQ;AACvB;AACA;AACA;AACA,yCAAyC,qBAAqB;;AAE9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,kDAAkD;AACjE,eAAe,OAAO;AACtB;AACA,gBAAgB,mCAAmC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,6BAA6B,gCAAgC;AAC7D,aAAa;AACb;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD,eAAe,QAAQ;AACvB;AACA;AACA;AACA,yBAAyB,mBAAmB;;AAE5C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sCAAsC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA,uBAAuB,SAAS;AAChC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,uBAAuB,wBAAwB;AAC/C;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC77BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,sBAAsB;AACjC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,2CAA2C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACvKA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,4BAA4B;AACvC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,4BAA4B;AACvC;AACA;;;;;;;;;;;;ACjBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,QAAQ;AACnB,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,QAAQ;AACnB,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACtBA;AACA;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ClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACdA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;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AW,EAAE;AACb,WAAW,KAAK;AAChB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,2BAA2B;AACtC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2BAA2B,gBAAgB;AAC3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,2DAA2D;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,aAAa;;AAEb;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,EAAE;AACjB,eAAe,KAAK;AACpB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,sCAAsC,kBAAkB;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC5rBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,qBAAqB,mBAAO,CAAC,kFAAyB;AACtD,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,cAAc,mBAAO,CAAC,oEAAkB;;AAExC;;;;;;;;;;;;ACjBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,4DAAmB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,8BAA8B;AACzC;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4EAA4E;AAC3F,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4EAA4E;AAC3F;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4EAA4E;AAC3F,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4EAA4E;AAC3F;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC9RA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,4BAA4B;AACvC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iCAAiC,6BAA6B;;AAE9D;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD,eAAe,8BAA8B;AAC7C,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sCAAsC;AACrD,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sCAAsC;AACrD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACpTA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,mEAAwB;AACjD,uBAAuB,mBAAO,CAAC,uFAAkC;;AAEjE;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,8BAA8B;AACzC,WAAW,0CAA0C;AACrD;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,iBAAiB,WAAW,KAAK,SAAS;;AAE1C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,kBAAkB,KAAK,gBAAgB;;AAExD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,iBAAiB,cAAc,KAAK,UAAU;;AAE9C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,uBAAuB,mBAAO,CAAC,0EAAqB;AACpD,kBAAkB,mBAAO,CAAC,6DAAqB;AAC/C,mBAAmB,mBAAO,CAAC,mEAAe;AAC1C,aAAa,mBAAO,CAAC,0DAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,2DAA2D;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4CAA4C;AAC3D,eAAe,mCAAmC;AAClD,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wCAAwC;AACxD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA,sCAAsC,mBAAmB;;AAEzD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3tBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,oDAAkB;;AAEtC;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;AChSA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,oDAAkB;;AAEtC;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACvGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,oBAAoB,mBAAO,CAAC,wEAA4B;AACxD,YAAY,mBAAO,CAAC,sDAAmB;AACvC,aAAa,mBAAO,CAAC,wEAAyB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uCAAuC,gBAAgB;;AAEvD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,4CAA4C,yBAAyB;AACrE,uCAAuC,gBAAgB;;AAEvD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,4CAA4C,yBAAyB;AACrE,uCAAuC,gBAAgB;;AAEvD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA,sCAAsC,8BAA8B;;AAEpE;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,yCAAyC,sBAAsB;;AAE/D;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,kCAAkC,eAAe;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACpqCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,sEAA2B;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2BAA2B;AAC1C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC9IA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,gBAAgB;AAChB;;AAEA;;AAEA;;;;;;;;;;;;ACtHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC7JA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,gFAAgC;AACxD,mBAAmB,mBAAO,CAAC,kEAAyB;AACpD,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,6BAA6B;AAC5C,eAAe,QAAQ;AACvB;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA,0CAA0C,uBAAuB;;AAEjE;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,6BAA6B;AAC5C;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA,mCAAmC,wBAAwB;;AAE3D;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EL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,6BAA6B;AAC5C,eAAe,QAAQ;AACvB;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA,sBAAsB,wBAAwB;;AAE9C;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,6BAA6B;AAC5C,eAAe,QAAQ;AACvB;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA,sBAAsB,wBAAwB;;AAE9C;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,sBAAsB;AACvC;AACA,eAAe,+BAA+B;AAC9C;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,mCAAmC,0BAA0B;;AAE7D;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AChWA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,8EAA+B;AACxD,mBAAmB,mBAAO,CAAC,kFAAiC;;AAE5D;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kEAAkE;AACjF;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,wCAAwC,qBAAqB;;AAE7D;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,kCAAkC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC5IA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,SAAS;AACvC,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpMA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,0DAAqB;AAC5C,iBAAiB,mBAAO,CAAC,oFAAkC;AAC3D,eAAe,mBAAO,CAAC,0EAA6B;AACpD,kBAAkB,mBAAO,CAAC,oEAA0B;AACpD,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,2BAA2B,uDAAuD;AAClF;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC,eAAe,uGAAuG;AACtH;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,0BAA0B;;AAE7D;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,YAAY;;AAE/C;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uGAAuG,WAAW;AACjI,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,aAAa;AAChD,oCAAoC,aAAa;;AAEjD;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,sBAAsB;AACtB;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpaA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,yCAAyC,gCAAgC;;AAEzE;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC3HA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,oBAAoB;;AAEtD;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpLA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD,eAAe,iBAAiB;AAChC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,yCAAyC,qBAAqB;;AAE9D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC3HA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,iBAAiB;AAChC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,yCAAyC,qBAAqB;;AAE9D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,gBAAgB;AAChB;;AAEA;;AAEA;;;;;;;;;;;;ACzMA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,wBAAwB,mBAAO,CAAC,8FAAuC;;AAEvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,oBAAoB;;AAExD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACrUA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA,YAAY,wCAAwC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,sBAAsB,mBAAO,CAAC,iFAAmB;AACjD,kBAAkB,mBAAO,CAAC,gEAAwB;AAClD,gBAAgB,mBAAO,CAAC,8DAAuB;AAC/C,uBAAuB,mBAAO,CAAC,4EAA8B;AAC7D,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ,gDAAgD;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,kCAAkC,oCAAoC;AACtE,mCAAmC,sCAAsC;;AAEzE;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,QAAQ,mDAAmD;AAC3D;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,8CAA8C;AAC9D;AACA;AACA;AACA,uCAAuC,oCAAoC;;AAE3E;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,8CAA8C;AAC9D;AACA;AACA;AACA,uCAAuC,oCAAoC;AAC3E,yCAAyC,sCAAsC;;AAE/E;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C,sBAAsB,sCAAsC;;AAE5D;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACxkBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;;AAEvC;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,qDAAqD;AACrE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,kCAAkC,UAAU,cAAc;;AAE1D;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,mCAAmC,wBAAwB;;AAE3D;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACr/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,c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AAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,mEAAe;AACxC,aAAa,mBAAO,CAAC,2DAAW;AAChC,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,uBAAuB,mBAAO,CAAC,2DAAW;AAC1C,gBAAgB,mBAAO,CAAC,gFAAgC;AACxD,aAAa,mBAAO,CAAC,gFAAmB;AACxC,YAAY,mBAAO,CAAC,wEAA4B;AAChD,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,gCAAgC;AAC3C;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA,mCAAmC,0BAA0B;;AAE7D;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,2BAA2B,qBAAqB;AAChD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,mCAAmC,wBAAwB;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8CAA8C;AAC9D;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,SAAS;AACxB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,EAAE;AACjB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,KAAK;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,OAAO;AACtB,eAAe,KAAK;AACpB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;AACA;;AAEA,mBAAmB,SAAS;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,OAAO;AACtB,eAAe,KAAK;AACpB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;AACA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,2CAA2C,wBAAwB;;AAEnE;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC90CA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,qBAAqB;AACxC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpGA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,oDAAkB;AAC5C,mBAAmB,mBAAO,CAAC,oDAAkB;;AAE7C,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,8FAA0B;AACpD;;AAEA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,gGAA2B;AACtD;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9IA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,MAAM;AACjB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,oBAAoB,mBAAO,CAAC,uFAAwB;AACpD,aAAa,mBAAO,CAAC,yEAAiB;AACtC,wBAAwB,mBAAO,CAAC,+FAA4B;AAC5D,oBAAoB,mBAAO,CAAC,uFAAwB;AACpD,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,iBAAiB,mBAA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AO;AAClB,WAAW,4BAA4B;AACvC;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA,4BAA4B,UAAU;;AAEtC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,mBAAmB,cAAc;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,eAAe,mBAAO,CAAC,sDAAY;AACnC,gBAAgB,mBAAO,CAAC,wDAAa;AACrC,iBAAiB,mBAAO,CAAC,4CAAU;AACnC,aAAa,mBAAO,CAAC,kDAAU;AAC/B,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;;AAEvC;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,OAAO;AACtB,eAAe,2BAA2B;AAC1C;AACA,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,2BAA2B;AAC1C;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;;AAEvC;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,iCAAiC,sBAAsB;;AAEvD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,iCAAiC,sBAAsB;;AAEvD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC1UA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,wDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA,WAAW,iBAAiB;AAC5B,WAAW,2BAA2B;AACtC;AACA,YAAY,2BAA2B;AACvC;AACA;AACA;AACA,4BAA4B,mBAAmB;;AAE/C;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,4CAAU;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,6DAAa;AACrC,YAAY,mBAAO,CAAC,wDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,2BAA2B;AACtC;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA,4BAA4B,mBAAmB;;AAE/C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,2DAAY;AACnC,gBAAgB,mBAAO,CAAC,6DAAa;;AAErC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA,4BAA4B,UAAU;;AAEtC;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,cAAc;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,wDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA,WAAW,sBAAsB;AACjC,WAAW,kBAAkB;AAC7B;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA,4BAA4B,mBAAmB;;AAE/C;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,eAAe,mBAAO,CAAC,2DAAY;AACnC,eAAe,mBAAO,CAAC,2DAAY;AACnC,gBAAgB,mBAAO,CAAC,6DAAa;AACrC,iBAAiB,mBAAO,CAAC,4CAAU;AACnC,WAAW,mBAAO,CAAC,oDAAc;AACjC,aAAa,mBAAO,CAAC,uDAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,kCAAkC,WAAW;AAC7C,mCAAmC,YAAY;;AAE/C;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,OAAO;AACtB,eAAe,2BAA2B;AAC1C;AACA,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,gBAAgB;;AAEnD;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,mBAAmB;;AAEpD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,mBAAmB;;AAEpD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,mBAAmB;;AAEpD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,mBAAmB;;AAEpD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACxfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,6DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,sBAAsB;AACnC;AACA,WAAW,sBAAsB;AACjC,WAAW,sBAAsB;AACjC,WAAW,sBAAsB;AACjC;AACA,YAAY,sBAAsB;AAClC;AACA;AACA;AACA,4BAA4B,uBAAuB;;AAEnD;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;AAC/B,mBAAmB,mBAAO,CAAC,+EAA8B;AACzD,aAAa,mBAAO,CAAC,+CAAU;AAC/B,uBAAuB,mBAAO,CAAC,mEAAoB;AACnD,gBAAgB,mBAAO,CAAC,qDAAa;AACrC,kBAAkB,mBAAO,CAAC,yDAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,+BAA+B;AAC1C;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA,4GAA4G;AAC5G;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,2DAA2D;;AAE3D;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B,eAAe,cAAc;AAC7B;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B,eAAe,cAAc;AAC7B;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,kBAAkB;;AAEnD;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iEAAiE;AACjE;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,eAAe,2BAA2B;AAC1C;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC7hBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2BAA2B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC9DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,mEAAwB;AAC7C,kBAAkB,mBAAO,CAAC,yDAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,sCAAsC;AACjD;AACA,YAAY,sCAAsC;AAClD;AACA;AACA;AACA,mEAAmE;;AAEnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACnOA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,uBAAuB,mBAAO,CAAC,mEAAoB;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,sCAAsC;AACjD;AACA,YAAY,eAAe;AAC3B;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,sCAAsC;AAClD;AACA;AACA;AACA,qCAAqC,mBAAmB;AACxD,8BAA8B,cAAc;AAC5C,6BAA6B,WAAW;AACxC,iCAAiC,eAAe;AAChD,gCAAgC,aAAa;AAC7C,wCAAwC,yBAAyB;;AAEjE;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACjJA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,2BAA2B;AACtC,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,uDAAuD;AACjJ;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,oFAAoF,mDAAmD;AACvI;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;AC/CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,SAAS,mBAAO,CAAC,4DAAa;AAC9B,cAAc,mBAAO,CAAC,sEAAkB;AACxC,mBAAmB,mBAAO,CAAC,gFAAuB;AAClD,uBAAuB,mBAAO,CAAC,wFAA2B;AAC1D,qBAAqB,mBAAO,CAAC,oFAAyB;AACtD,eAAe,mBAAO,CAAC,wEAAmB;AAC1C,mBAAmB,mBAAO,CAAC,gFAAuB;AAClD,kBAAkB,mBAAO,CAAC,8EAAsB;AAChD,cAAc,mBAAO,CAAC,sEAAkB;AACxC,WAAW,mBAAO,CAAC,gEAAe;;AAElC;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,oBAAoB,mBAAO,CAAC,oFAAkC;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,uDAAuD;AAClE,WAAW,gBAAgB;AAC3B,WAAW,sCAAsC;AACjD,WAAW,+CAA+C;AAC1D;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uGAAuG;AAClH,WAAW,gBAAgB;AAC3B,WAAW,sCAAsC;AACjD;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;;;;;;;;;;;AC3QA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,eAAe,mBAAO,CAAC,0EAA6B;AACpD,oBAAoB,mBAAO,CAAC,oFAAkC;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,sDAAsD;AACjE,WAAW,gBAAgB;AAC3B,WAAW,sCAAsC;AACjD,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA,QAAQ;AACR,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qGAAqG;AAChH,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,WAAW,sCAAsC;AACjD;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;;;;;;;;;;;AC/NA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,oBAAoB,mBAAO,CAAC,oFAAkC;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,sDAAsD;AACjE,WAAW,OAAO;AAClB,WAAW,sCAAsC;AACjD;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qGAAqG;AAChH,WAAW,OAAO;AAClB,WAAW,sCAAsC;AACjD;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;;;;;;;;;;;ACxKA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,mDAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,6BAA6B,WAAW;;AAExC;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,6BAA6B,WAAW;;AAExC;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC1kBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;;AAEA;;;;;;;;;;;;AC/6CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,4BAA4B,eAAe;;AAE3C;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,4CAA4C;;AAE5C;;AAEA,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC7vBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,+BAA+B,YAAY;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA,WAAW,8BAA8B;AACzC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,qDAAiB;AACvC,cAAc,mBAAO,CAAC,qDAAiB;AACvC,iBAAiB,mBAAO,CAAC,2DAAoB;;AAE7C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,6BAA6B,WAAW;;AAExC;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA;AACA,+BAA+B,YAAY;AAC3C,+BAA+B,YAAY;AAC3C,kCAAkC,eAAe;;AAEjD;;AAEA;AACA;;AAEA,mBAAmB,YAAY;AAC/B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,6BAA6B;AAC9E;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,oBAAoB;AAC/B;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,4BAA4B,qBAAqB;;AAEjD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,+CAA+C;AAC1D;AACA,YAAY,+CAA+C;AAC3D;AACA;AACA;AACA,+BAA+B,wBAAwB;;AAEvD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,6DAAqB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,OAAO;;AAEzC;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,6BAA6B,YAAY;;AAEzC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;;;;;;;;;;;;ACjwBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;;;;;;;;;;;;ACnyBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1hBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA,2CAA2C,sCAAsC;AACjF;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA,2CAA2C,gCAAgC;AAC3E;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,4CAAU;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,0DAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,0DAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,yDAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,4CAAU;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,6BAA6B,aAAa;;AAE1C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;AC1CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,0CAAS;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,WAAW,mBAAO,CAAC,0CAAS;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,aAAa,mBAAO,CAAC,qDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAiB;AAC5C,oBAAoB,mBAAO,CAAC,mEAAkB;AAC9C,cAAc,mBAAO,CAAC,uDAAY;AAClC,sBAAsB,mBAAO,CAAC,uEAAoB;AAClD,eAAe,mBAAO,CAAC,yDAAa;AACpC,YAAY,mBAAO,CAAC,mDAAU;AAC9B,mBAAmB,mBAAO,CAAC,iEAAiB;AAC5C,aAAa,mBAAO,CAAC,qDAAW;AAChC,cAAc,mBAAO,CAAC,uDAAY;AAClC,qBAAqB,mBAAO,CAAC,qEAAmB;AAChD,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,iBAAiB,mBAAO,CAAC,6DAAe;;AAExC;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACrFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,4BAA4B,SAAS;;AAErC;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,aAAa,mBAAO,CAAC,wEAAmB;AACxC,mBAAmB,mBAAO,CAAC,oFAAyB;AACpD,0BAA0B,mBAAO,CAAC,kGAAgC;AAClE,eAAe,mBAAO,CAAC,4EAAqB;AAC5C,WAAW,mBAAO,CAAC,oEAAiB;AACpC,WAAW,mBAAO,CAAC,oEAAiB;AACpC,aAAa,mBAAO,CAAC,wEAAmB;;AAExC;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,qBAAqB;;AAEvD;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,qBAAqB;;AAEvD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,qBAAqB;;AAEvD;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,mDAAM;AACtB,SAAS,mBAAO,CAAC,qDAAO;AACxB,WAAW,mBAAO,CAAC,yDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,qDAAM;AACtB,SAAS,mBAAO,CAAC,uDAAO;AACxB,WAAW,mBAAO,CAAC,2DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,kDAAM;AACtB,SAAS,mBAAO,CAAC,oDAAO;AACxB,WAAW,mBAAO,CAAC,wDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD,+BAA+B,cAAc;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD,+BAA+B,cAAc;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD,+BAA+B,cAAc;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrB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;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,sDAAM;AACtB,SAAS,mBAAO,CAAC,wDAAO;AACxB,WAAW,mBAAO,CAAC,4DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA,iBAAiB,mBAAO,CAAC,8DAAW;;;;;;;;;;;;ACVpC;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,gCAAgC,kBAAkB;;AAElD;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,gCAAgC,kBAAkB;;AAElD;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,gCAAgC,kBAAkB;;AAElD;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,gCAAgC,kBAAkB;;AAElD;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AA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AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,QAAQ;AAC3B;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,sDAAe;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,8CAAW;;AAEhC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AAC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EA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,aAAa,mBAAO,CAAC,gEAAiB;AACtC,YAAY,mBAAO,CAAC,sEAAoB;AACxC,aAAa,mBAAO,CAAC,wEAAqB;;AAE1C;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;;AAEA;;AAEA;AACA;AACA,kCAAkC,qDAAqD;;AAEvF;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,oEAAoE;;AAEpE;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;;AAEA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;;AAEA;;AAEA,kDAAkD;AAClD,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,wCAAwC;AAC/D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA,wBAAwB,UAAU;AAClC;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,IAAI;AACxB,oBAAoB,EAAE;AACtB;AACA,eAAe,IAAI;AACnB;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,IAAI;AACxB,oBAAoB,EAAE;AACtB;AACA,eAAe,IAAI;AACnB;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,IAAI;AACxB;AACA,eAAe,IAAI;AACnB;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;;AAEA,yBAAyB,OAAO;AAChC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACvfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,UAAU,mBAAO,CAAC,sDAAY;AAC9B,WAAW,mBAAO,CAAC,wDAAa;AAChC,QAAQ,mBAAO,CAAC,kDAAU;;AAE1B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,6BAA6B;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,4DAA4D,sCAAsC;AAClG;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC3HA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA,iBAAiB,mBAAO,CAAC,wDAAc;AACvC,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,2DAAiB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,6BAA6B;AACxC;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,mCAAmC,wCAAwC;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACzHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5UA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,6CAA6C;AACpF;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,qDAAqD;AACpH;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA,4EAA4E,sDAAsD;AAClI;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;A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d;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACrKA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvPA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,gCAAgC,iBAAiB;;AAEjD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9GA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,gCAAgC,iBAAiB;;AAEjD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,gCAAgC,QAAQ;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;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AAO;AAClB,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC7EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,iCAAiC,yBAAyB;;AAE1D;;AAEA;AACA;AACA,gCAAgC,cAAc;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,iCAAiC,yBAAyB;;AAE1D;AACA;AACA,gCAAgC,cAAc;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,+BAA+B,uBAAuB;;AAEtD;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C,iDAAiD;AACjD;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;;AAEA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,wBAAwB,mBAAO,CAAC,4EAA8B;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,4BAA4B,YAAY;AACxC,6BAA6B,UAAU;;AAEvC;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA,6BAA6B,UAAU;AACvC,8BAA8B,wBAAwB;AACtD,gCAAgC,0BAA0B;;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,iEAAoB;AAC3C,cAAc,mBAAO,CAAC,sDAAW;;AAEjC;AACA;AACA;;AAEA,wBAAwB,mBAAmB;AAC3C;AACA,4BAA4B,mBAAmB;AAC/C;AACA,2BAA2B,SAAS;AACpC;AACA,0BAA0B,6BAA6B;AACvD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mBAAmB,aAAa;AAChC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnIA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,YAAY;AACvB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,YAAY;AACxB;AACA;AACA;AACA,gCAAgC,iBAAiB;;AAEjD;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA,gCAAgC,iBAAiB;;AAEjD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,iCAAiC,yBAAyB;AAC1D,gCAAgC,iBAAiB;;AAEjD;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,+BAA+B,uBAAuB;;AAEtD;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;;AAEA,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;;AAEA,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,iCAAiC,yBAAyB;;AAE1D;AACA;AACA,gCAAgC,cAAc;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,IAAI;AACpB;AACA,WAAW,IAAI;AACf;AACA,YAAY,IAAI;AAChB;AACA;AACA;AACA,kCAAkC,OAAO;AACzC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,uBAAuB,SAAS;AAChC;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACvCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB,WAAW;AAChC;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI,IAA8B;AAClC;AACA;AACA,KAAK,EAEJ;;AAED,CAAC,I;;;;;;;;;;;AC7ID;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,YAAY,mBAAO,CAAC,0DAAU;;AAE9B,SAAS,mBAAO,CAAC,8CAAO;AACxB,WAAW,mBAAO,CAAC,kDAAS;AAC5B,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,sBAAsB,mBAAO,CAAC,wEAAoB;AAClD,UAAU,mBAAO,CAAC,gDAAQ;AAC1B,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,eAAe,mBAAO,CAAC,0DAAa;AACpC,cAAc,mBAAO,CAAC,wDAAY;AAClC,YAAY,mBAAO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O;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA,uBAAuB,sBAAsB;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2BAA2B,sBAAsB;AACjD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,qEAAe;AACzC,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,uEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,qBAAqB,mBAAO,CAAC,6EAAmB;;AAEhD;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,oBAAoB,mBAAO,CAAC,mEAAiB;;AAE7C,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,YAAY,OAAO;;AAEnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,UAAU,YAAY;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,WAAW,mBAAO,CAAC,8CAAY;AAC/B,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA,8CAA8C,aAAa,qBAAqB;AAChF;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb;AACA,YAAY,EAAE,oBAAoB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;;AAEA;;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,4BAA4B,SAAS;AACrC,4B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A,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,+BAA+B,oBAAoB;AACnD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,+BAA+B,qBAAqB;AACpD;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,2BAA2B,uBAAuB;AAClD;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,sCAAsC,uFAAuF;;AAE7H;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACtPA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,sBAAsB,mBAAO,CAAC,6FAA0C;AACxE,YAAY,mBAAO,CAAC,6DAA0B;AAC9C,eAAe,mBAAO,CAAC,iFAAoC;AAC3D,kBAAkB,mBAAO,CAAC,yFAAwC;AAClE,kBAAkB,mBAAO,CAAC,6EAAkC;AAC5D,YAAY,mBAAO,CAAC,uCAAO;AAC3B,gBAAgB,mBAAO,CAAC,mCAAa;AACrC,sBAAsB,mBAAO,CAAC,qEAA8B;AAC5D,qBAAqB,mBAAO,CAAC,iEAA4B;AACzD,WAAW,mBAAO,CAAC,2DAAyB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,6BAA6B;AACxC;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qGAAqG;AACpH,eAAe,OAAO;AACtB,eAAe,gBAAgB;AAC/B,eAAe,QAAQ;AACvB,eAAe,sCAAsC;AACrD,eAAe,sCAAsC;AACrD;AACA,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,eAAe;AAC9B,eAAe,WAAW;AAC1B;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;;AAEA;;AAEA,gBAAgB;AAChB,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;AACA;;AAEA;;AAEA,gBAAgB;AAChB,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,gBAAgB;AAC5B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,QAAQ;AACnB;AACA,YAAY,gBAAgB;AAC5B;;AAEA;;;;;;;;;;;;AC/pCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,gEAA6B;AACjD,gBAAgB,mBAAO,CAAC,wGAAiD;AACzE,2BAA2B,mBAAO,CAAC,mEAAwB;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,YAAY;AACvB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,kBAAkB;AAC7B;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACxEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,qBAAqB;AACxC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACnGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,iFAA+B;AACzD;;AAEA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,mFAAgC;AAC3D;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,YAAY,mBAAO,CAAC,8DAA4B;AAChD,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,qBAAqB;AACxC;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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qD;AAC1F,0BAA0B,mBAAO,CAAC,0GAAkD;AACpF,wBAAwB,mBAAO,CAAC,sGAAgD;AAChF,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,eAAe,mBAAO,CAAC,oEAA+B;AACtD,iBAAiB,mBAAO,CAAC,sFAAwC;AACjE,eAAe,mBAAO,CAAC,oEAA+B;AACtD,kBAAkB,mBAAO,CAAC,qCAAY;AACtC,4BAA4B,mBAAO,CAAC,sEAAyB;;AAE7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,YAAY;AACvB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,kBAAkB;;AAEpD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB,eAAe,YAAY;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,kCAAkC,6BAA6B;AAC/D,mCAAmC,+BAA+B;AAClE,oCAAoC,aAAa;AACjD,oCAAoC,aAAa;;AAEjD;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,oCAAoC,aAAa;AACjD,oCAAoC,aAAa;;AAEjD;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA,uBAAuB,2BAA2B;AAClD;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,oCAAoC;AAC/D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,uCAAuC,gBAAgB;;AAEvD;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C,4CAA4C,yBAAyB;;AAErE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA,2BAA2B,qBAAqB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,YAAY;AAC/C,qCAAqC,cAAc;AACnD,qCAAqC,gBAAgB;;AAErD;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AA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E,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxKA;;AAEA;AACA;AACA;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA,kCAAkC,UAAU;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,mDAAmD;AACxD;AACA;AACA;AACA;AACA,KAAK,+DAA+D;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,+DAA+D;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,OAAO;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,OAAO;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,iBAAiB;AAC5D;AACA;AACA;AACA;AACA,2CAA2C,iBAAiB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,mBAAmB;AAC5D;AACA;AACA;AACA;AACA;AACA,yCAAyC,mBAAmB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,oBAAoB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,oBAAoB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,6CAA6C;AAC/D;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,OAAO;AACxE;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,yBAAyB,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,YAAY;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,oBAAoB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,oBAAoB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA;AACA,kCAAkC,oBAAoB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,cAAc;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,sDAAsD;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA,wCAAwC,iBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yGAAyG;AACzG;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,qGAAqG;AACrG;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,2DAA2D,0BAA0B;AACrF;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,sDAAsD;AAC3D,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,kEAAkE;AACvE,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,OAAO;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,iBAAiB;AACpD;AACA;AACA;AACA,iDAAiD,iBAAiB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,gBAAgB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA,0DAA0D,iBAAiB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK,+DAA+D;AACpE;AACA;AACA;AACA;AACA;AACA,KAAK,4DAA4D;AACjE;AACA;AACA;AACA;AACA;AACA,KAAK,yDAAyD;AAC9D,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,wCAAwC,iBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,gCAAgC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;AACA,2BAA2B,sCAAsC;AACjE;AACA;AACA;AACA;AACA,2BAA2B,iCAAiC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,OAAO;AAClE;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qBAAqB;AACvD,gCAAgC,cAAc;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,qBAAqB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,eAAe;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,eAAe;AAC9C;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qBAAqB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,OAAO;AAC7B;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA,wDAAwD,OAAO;AAC/D;AACA,wDAAwD,OAAO;AAC/D;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,OAAO;AACtC;AACA;AACA;AACA,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA;AACA;AACA,wCAAwC,yBAAyB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA;AACA;AACA,wCAAwC,yBAAyB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA,0DAA0D,SAAS;AACnE;AACA,gEAAgE,WAAW;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,yBAAyB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,SAAS;AAChE;AACA;AACA;AACA,uDAAuD,SAAS;AAChE;AACA;AACA;AACA,uEAAuE,QAAQ;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;AACA;AACA;AACA,oCAAoC,kBAAkB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,qCAAqC,uBAAuB;AAC5D,mCAAmC,WAAW;AAC9C,oCAAoC,oCAAoC;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,mCAAmC,cAAc;AACjD,sCAAsC,iBAAiB;AACvD;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA,qDAAqD,SAAS;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qBAAqB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,sBAAsB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA,gCAAgC,0BAA0B;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,OAAO;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,OAAO;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,2BAA2B;AAC1D;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA,wCAAwC,2BAA2B;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,wBAAwB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,+BAA+B;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,0BAA0B;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,OAAO;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,wBAAwB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA,gDAAgD,QAAQ;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0BAA0B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0BAA0B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yFAAyF,OAAO;AAChG;AACA;AACA;AACA,uDAAuD,kBAAkB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,0BAA0B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,oBAAoB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6BAA6B;AACxD;AACA;AACA,+BAA+B,6BAA6B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,wBAAwB;AACnD;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6BAA6B;AACxD;AACA;AACA,+BAA+B,6BAA6B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,wBAAwB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6BAA6B;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,kEAAkE;AACvE;AACA;AACA;AACA;AACA;AACA,KAAK,4DAA4D;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E;AAC5E,kEAAkE;AAClE,qDAAqD;AACrD;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,yBAAyB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,gBAAgB;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,oDAAoD,+BAA+B;AACnF;AACA;AACA;AACA;AACA,mCAAmC,WAAW;AAC9C;AACA;AACA;AACA;AACA;AACA,qCAAqC,UAAU;AAC/C;AACA;AACA;AACA;AACA;AACA,mCAAmC,WAAW;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,UAAU;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,iBAAiB;AACvD,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,wCAAwC,iBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,wBAAwB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,WAAW;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,WAAW;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,WAAW;AAC7D;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,WAAW;AAC5E;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,qEAAqE;AAC1E,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,iBAAiB;AAC7D,2DAA2D,8CAA8C,EAAE;AAC3G;AACA;AACA,SAAS;AACT;AACA,KAAK,6CAA6C;AAClD,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kFAAkF;AAClF,wEAAwE;AACxE,2DAA2D;AAC3D;AACA,SAAS;AACT;AACA,KAAK,6CAA6C;AAClD,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,sBAAsB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,OAAO;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,6CAA6C;AAClD,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,iBAAiB;AAC7D;AACA;AACA,iBAAiB;AACjB;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,oBAAoB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,UAAU;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,wBAAwB;AAChF,sDAAsD,sDAAsD;AAC5G,sDAAsD,qDAAqD;AAC3G;AACA;AACA;AACA;AACA,sDAAsD,sBAAsB;AAC5E,qDAAqD,4BAA4B;AACjF,qDAAqD,2BAA2B;AAChF;AACA;AACA;AACA;AACA,qDAAqD,qBAAqB;AAC1E;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,sCAAsC,UAAU;AAChD;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS,oFAAoF;AAC7F,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE,6CAA6C,qBAAqB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,oBAAoB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,uBAAuB;AACxF;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF,gDAAgD,qBAAqB;AACrE,8CAA8C,mBAAmB;AACjE;AACA;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,0CAA0C,cAAc;AACxD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,yDAAyD;AAClE,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,qBAAqB;AAC5E,4DAA4D,0BAA0B;AACtF,8DAA8D,4BAA4B;AAC1F,kEAAkE,sBAAsB;AACxF,8DAA8D,sBAAsB;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,8CAA8C,kDAAkD,iDAAiD,+BAA+B,mCAAmC,0BAA0B,2CAA2C,mDAAmD,8EAA8E,WAAW;AAC/e,iHAAiH,2FAA2F,mCAAmC,sCAAsC,0BAA0B,uEAAuE,WAAW;AACjY;AACA;AACA;AACA,2EAA2E,8CAA8C,+CAA+C,kDAAkD,iDAAiD,+BAA+B,8BAA8B,mCAAmC,0BAA0B,2CAA2C,2CAA2C,mDAAmD,8EAA8E,WAAW;AACvmB,iHAAiH,2FAA2F,mCAAmC,mCAAmC,sCAAsC,0BAA0B,8DAA8D,oDAAoD,8HAA8H,WAAW;AAC7kB;AACA;AACA;AACA,2EAA2E,8CAA8C,iDAAiD,+BAA+B,0BAA0B,2CAA2C,8EAA8E,WAAW;AACvW,iHAAiH,2FAA2F,0BAA0B,mCAAmC,WAAW;AACpR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,qBAAqB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,0CAA0C,cAAc;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,sDAAsD;AAC/D,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,SAAS;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,SAAS;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,YAAY;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,qBAAqB;AACrE,8CAA8C,mBAAmB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,SAAS;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,SAAS;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,OAAO;AAC1C,mCAAmC,OAAO;AAC1C,mCAAmC,OAAO;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,kBAAkB,iBAAiB;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,qEAAqE,OAAO;AAC5E;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;;AAEA,CAAC","file":"SpinePluginDebug.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./SpinePlugin.js\");\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('../math/Clamp');\r\nvar Class = require('../utils/Class');\r\nvar EventEmitter = require('eventemitter3');\r\nvar Events = require('./events');\r\nvar FindClosestInSorted = require('../utils/array/FindClosestInSorted');\r\nvar Frame = require('./AnimationFrame');\r\nvar GetValue = require('../utils/object/GetValue');\r\n\r\n/**\r\n * @classdesc\r\n * A Frame based Animation.\r\n *\r\n * This consists of a key, some default values (like the frame rate) and a bunch of Frame objects.\r\n *\r\n * The Animation Manager creates these. Game Objects don't own an instance of these directly.\r\n * Game Objects have the Animation Component, which are like playheads to global Animations (these objects)\r\n * So multiple Game Objects can have playheads all pointing to this one Animation instance.\r\n *\r\n * @class Animation\r\n * @memberof Phaser.Animations\r\n * @extends Phaser.Events.EventEmitter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Animations.AnimationManager} manager - A reference to the global Animation Manager\r\n * @param {string} key - The unique identifying string for this animation.\r\n * @param {Phaser.Types.Animations.Animation} config - The Animation configuration.\r\n */\r\nvar Animation = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function Animation (manager, key, config)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the global Animation Manager.\r\n *\r\n * @name Phaser.Animations.Animation#manager\r\n * @type {Phaser.Animations.AnimationManager}\r\n * @since 3.0.0\r\n */\r\n this.manager = manager;\r\n\r\n /**\r\n * The unique identifying string for this animation.\r\n *\r\n * @name Phaser.Animations.Animation#key\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.key = key;\r\n\r\n /**\r\n * A frame based animation (as opposed to a bone based animation)\r\n *\r\n * @name Phaser.Animations.Animation#type\r\n * @type {string}\r\n * @default frame\r\n * @since 3.0.0\r\n */\r\n this.type = 'frame';\r\n\r\n /**\r\n * Extract all the frame data into the frames array.\r\n *\r\n * @name Phaser.Animations.Animation#frames\r\n * @type {Phaser.Animations.AnimationFrame[]}\r\n * @since 3.0.0\r\n */\r\n this.frames = this.getFrames(\r\n manager.textureManager,\r\n GetValue(config, 'frames', []),\r\n GetValue(config, 'defaultTextureKey', null)\r\n );\r\n\r\n /**\r\n * The frame rate of playback in frames per second (default 24 if duration is null)\r\n *\r\n * @name Phaser.Animations.Animation#frameRate\r\n * @type {integer}\r\n * @default 24\r\n * @since 3.0.0\r\n */\r\n this.frameRate = GetValue(config, 'frameRate', null);\r\n\r\n /**\r\n * How long the animation should play for, in milliseconds.\r\n * If the `frameRate` property has been set then it overrides this value,\r\n * otherwise the `frameRate` is derived from `duration`.\r\n *\r\n * @name Phaser.Animations.Animation#duration\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.duration = GetValue(config, 'duration', null);\r\n\r\n if (this.duration === null && this.frameRate === null)\r\n {\r\n // No duration or frameRate given, use default frameRate of 24fps\r\n this.frameRate = 24;\r\n this.duration = (this.frameRate / this.frames.length) * 1000;\r\n }\r\n else if (this.duration && this.frameRate === null)\r\n {\r\n // Duration given but no frameRate, so set the frameRate based on duration\r\n // I.e. 12 frames in the animation, duration = 4000 ms\r\n // So frameRate is 12 / (4000 / 1000) = 3 fps\r\n this.frameRate = this.frames.length / (this.duration / 1000);\r\n }\r\n else\r\n {\r\n // frameRate given, derive duration from it (even if duration also specified)\r\n // I.e. 15 frames in the animation, frameRate = 30 fps\r\n // So duration is 15 / 30 = 0.5 * 1000 (half a second, or 500ms)\r\n this.duration = (this.frames.length / this.frameRate) * 1000;\r\n }\r\n\r\n /**\r\n * How many ms per frame, not including frame specific modifiers.\r\n *\r\n * @name Phaser.Animations.Animation#msPerFrame\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.msPerFrame = 1000 / this.frameRate;\r\n\r\n /**\r\n * Skip frames if the time lags, or always advanced anyway?\r\n *\r\n * @name Phaser.Animations.Animation#skipMissedFrames\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.skipMissedFrames = GetValue(config, 'skipMissedFrames', true);\r\n\r\n /**\r\n * The delay in ms before the playback will begin.\r\n *\r\n * @name Phaser.Animations.Animation#delay\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.delay = GetValue(config, 'delay', 0);\r\n\r\n /**\r\n * Number of times to repeat the animation. Set to -1 to repeat forever.\r\n *\r\n * @name Phaser.Animations.Animation#repeat\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.repeat = GetValue(config, 'repeat', 0);\r\n\r\n /**\r\n * The delay in ms before the a repeat play starts.\r\n *\r\n * @name Phaser.Animations.Animation#repeatDelay\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.repeatDelay = GetValue(config, 'repeatDelay', 0);\r\n\r\n /**\r\n * Should the animation yoyo (reverse back down to the start) before repeating?\r\n *\r\n * @name Phaser.Animations.Animation#yoyo\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.yoyo = GetValue(config, 'yoyo', false);\r\n\r\n /**\r\n * Should the GameObject's `visible` property be set to `true` when the animation starts to play?\r\n *\r\n * @name Phaser.Animations.Animation#showOnStart\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.showOnStart = GetValue(config, 'showOnStart', false);\r\n\r\n /**\r\n * Should the GameObject's `visible` property be set to `false` when the animation finishes?\r\n *\r\n * @name Phaser.Animations.Animation#hideOnComplete\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.hideOnComplete = GetValue(config, 'hideOnComplete', false);\r\n\r\n /**\r\n * Global pause. All Game Objects using this Animation instance are impacted by this property.\r\n *\r\n * @name Phaser.Animations.Animation#paused\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.paused = false;\r\n\r\n this.manager.on(Events.PAUSE_ALL, this.pause, this);\r\n this.manager.on(Events.RESUME_ALL, this.resume, this);\r\n },\r\n\r\n /**\r\n * Add frames to the end of the animation.\r\n *\r\n * @method Phaser.Animations.Animation#addFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects.\r\n *\r\n * @return {this} This Animation object.\r\n */\r\n addFrame: function (config)\r\n {\r\n return this.addFrameAt(this.frames.length, config);\r\n },\r\n\r\n /**\r\n * Add frame/s into the animation.\r\n *\r\n * @method Phaser.Animations.Animation#addFrameAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The index to insert the frame at within the animation.\r\n * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects.\r\n *\r\n * @return {this} This Animation object.\r\n */\r\n addFrameAt: function (index, config)\r\n {\r\n var newFrames = this.getFrames(this.manager.textureManager, config);\r\n\r\n if (newFrames.length > 0)\r\n {\r\n if (index === 0)\r\n {\r\n this.frames = newFrames.concat(this.frames);\r\n }\r\n else if (index === this.frames.length)\r\n {\r\n this.frames = this.frames.concat(newFrames);\r\n }\r\n else\r\n {\r\n var pre = this.frames.slice(0, index);\r\n var post = this.frames.slice(index);\r\n\r\n this.frames = pre.concat(newFrames, post);\r\n }\r\n\r\n this.updateFrameSequence();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check if the given frame index is valid.\r\n *\r\n * @method Phaser.Animations.Animation#checkFrame\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The index to be checked.\r\n *\r\n * @return {boolean} `true` if the index is valid, otherwise `false`.\r\n */\r\n checkFrame: function (index)\r\n {\r\n return (index >= 0 && index < this.frames.length);\r\n },\r\n\r\n /**\r\n * Called internally when this Animation completes playback.\r\n * Optionally, hides the parent Game Object, then stops playback.\r\n *\r\n * @method Phaser.Animations.Animation#completeAnimation\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\r\n */\r\n completeAnimation: function (component)\r\n {\r\n if (this.hideOnComplete)\r\n {\r\n component.parent.visible = false;\r\n }\r\n\r\n component.stop();\r\n },\r\n\r\n /**\r\n * Called internally when this Animation first starts to play.\r\n * Sets the accumulator and nextTick properties.\r\n *\r\n * @method Phaser.Animations.Animation#getFirstTick\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\r\n * @param {boolean} [includeDelay=true] - If `true` the Animation Components delay value will be added to the `nextTick` total.\r\n */\r\n getFirstTick: function (component, includeDelay)\r\n {\r\n if (includeDelay === undefined) { includeDelay = true; }\r\n\r\n // When is the first update due?\r\n component.accumulator = 0;\r\n component.nextTick = component.msPerFrame + component.currentFrame.duration;\r\n\r\n if (includeDelay)\r\n {\r\n component.nextTick += component._delay;\r\n }\r\n },\r\n\r\n /**\r\n * Returns the AnimationFrame at the provided index\r\n *\r\n * @method Phaser.Animations.Animation#getFrameAt\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The index in the AnimationFrame array\r\n *\r\n * @return {Phaser.Animations.AnimationFrame} The frame at the index provided from the animation sequence\r\n */\r\n getFrameAt: function (index)\r\n {\r\n return this.frames[index];\r\n },\r\n\r\n /**\r\n * Creates AnimationFrame instances based on the given frame data.\r\n *\r\n * @method Phaser.Animations.Animation#getFrames\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.TextureManager} textureManager - A reference to the global Texture Manager.\r\n * @param {(string|Phaser.Types.Animations.AnimationFrame[])} frames - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects.\r\n * @param {string} [defaultTextureKey] - The key to use if no key is set in the frame configuration object.\r\n *\r\n * @return {Phaser.Animations.AnimationFrame[]} An array of newly created AnimationFrame instances.\r\n */\r\n getFrames: function (textureManager, frames, defaultTextureKey)\r\n {\r\n var out = [];\r\n var prev;\r\n var animationFrame;\r\n var index = 1;\r\n var i;\r\n var textureKey;\r\n\r\n // if frames is a string, we'll get all the frames from the texture manager as if it's a sprite sheet\r\n if (typeof frames === 'string')\r\n {\r\n textureKey = frames;\r\n\r\n var texture = textureManager.get(textureKey);\r\n var frameKeys = texture.getFrameNames();\r\n\r\n frames = [];\r\n\r\n frameKeys.forEach(function (idx, value)\r\n {\r\n frames.push({ key: textureKey, frame: value });\r\n });\r\n }\r\n\r\n if (!Array.isArray(frames) || frames.length === 0)\r\n {\r\n return out;\r\n }\r\n\r\n for (i = 0; i < frames.length; i++)\r\n {\r\n var item = frames[i];\r\n\r\n var key = GetValue(item, 'key', defaultTextureKey);\r\n\r\n if (!key)\r\n {\r\n continue;\r\n }\r\n\r\n // Could be an integer or a string\r\n var frame = GetValue(item, 'frame', 0);\r\n\r\n // The actual texture frame\r\n var textureFrame = textureManager.getFrame(key, frame);\r\n\r\n animationFrame = new Frame(key, frame, index, textureFrame);\r\n\r\n animationFrame.duration = GetValue(item, 'duration', 0);\r\n\r\n animationFrame.isFirst = (!prev);\r\n\r\n // The previously created animationFrame\r\n if (prev)\r\n {\r\n prev.nextFrame = animationFrame;\r\n\r\n animationFrame.prevFrame = prev;\r\n }\r\n\r\n out.push(animationFrame);\r\n\r\n prev = animationFrame;\r\n\r\n index++;\r\n }\r\n\r\n if (out.length > 0)\r\n {\r\n animationFrame.isLast = true;\r\n\r\n // Link them end-to-end, so they loop\r\n animationFrame.nextFrame = out[0];\r\n\r\n out[0].prevFrame = animationFrame;\r\n\r\n // Generate the progress data\r\n\r\n var slice = 1 / (out.length - 1);\r\n\r\n for (i = 0; i < out.length; i++)\r\n {\r\n out[i].progress = i * slice;\r\n }\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Called internally. Sets the accumulator and nextTick values of the current Animation.\r\n *\r\n * @method Phaser.Animations.Animation#getNextTick\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\r\n */\r\n getNextTick: function (component)\r\n {\r\n // accumulator += delta * _timeScale\r\n // after a large delta surge (perf issue for example) we need to adjust for it here\r\n\r\n // When is the next update due?\r\n component.accumulator -= component.nextTick;\r\n\r\n component.nextTick = component.msPerFrame + component.currentFrame.duration;\r\n },\r\n\r\n /**\r\n * Loads the Animation values into the Animation Component.\r\n *\r\n * @method Phaser.Animations.Animation#load\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to load values into.\r\n * @param {integer} startFrame - The start frame of the animation to load.\r\n */\r\n load: function (component, startFrame)\r\n {\r\n if (startFrame >= this.frames.length)\r\n {\r\n startFrame = 0;\r\n }\r\n\r\n if (component.currentAnim !== this)\r\n {\r\n component.currentAnim = this;\r\n\r\n component.frameRate = this.frameRate;\r\n component.duration = this.duration;\r\n component.msPerFrame = this.msPerFrame;\r\n component.skipMissedFrames = this.skipMissedFrames;\r\n\r\n component._delay = this.delay;\r\n component._repeat = this.repeat;\r\n component._repeatDelay = this.repeatDelay;\r\n component._yoyo = this.yoyo;\r\n }\r\n\r\n var frame = this.frames[startFrame];\r\n\r\n if (startFrame === 0 && !component.forward)\r\n {\r\n frame = this.getLastFrame();\r\n }\r\n\r\n component.updateFrame(frame);\r\n },\r\n\r\n /**\r\n * Returns the frame closest to the given progress value between 0 and 1.\r\n *\r\n * @method Phaser.Animations.Animation#getFrameByProgress\r\n * @since 3.4.0\r\n *\r\n * @param {number} value - A value between 0 and 1.\r\n *\r\n * @return {Phaser.Animations.AnimationFrame} The frame closest to the given progress value.\r\n */\r\n getFrameByProgress: function (value)\r\n {\r\n value = Clamp(value, 0, 1);\r\n\r\n return FindClosestInSorted(value, this.frames, 'progress');\r\n },\r\n\r\n /**\r\n * Advance the animation frame.\r\n *\r\n * @method Phaser.Animations.Animation#nextFrame\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to advance.\r\n */\r\n nextFrame: function (component)\r\n {\r\n var frame = component.currentFrame;\r\n\r\n // TODO: Add frame skip support\r\n\r\n if (frame.isLast)\r\n {\r\n // We're at the end of the animation\r\n\r\n // Yoyo? (happens before repeat)\r\n if (component._yoyo)\r\n {\r\n this.handleYoyoFrame(component, false);\r\n }\r\n else if (component.repeatCounter > 0)\r\n {\r\n // Repeat (happens before complete)\r\n\r\n if (component._reverse && component.forward)\r\n {\r\n component.forward = false;\r\n }\r\n else\r\n {\r\n this.repeatAnimation(component);\r\n }\r\n }\r\n else\r\n {\r\n this.completeAnimation(component);\r\n }\r\n }\r\n else\r\n {\r\n this.updateAndGetNextTick(component, frame.nextFrame);\r\n }\r\n },\r\n\r\n /**\r\n * Handle the yoyo functionality in nextFrame and previousFrame methods.\r\n *\r\n * @method Phaser.Animations.Animation#handleYoyoFrame\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to advance.\r\n * @param {boolean} isReverse - Is animation in reverse mode? (Default: false)\r\n */\r\n handleYoyoFrame: function (component, isReverse)\r\n {\r\n if (!isReverse) { isReverse = false; }\r\n\r\n if (component._reverse === !isReverse && component.repeatCounter > 0)\r\n {\r\n if (!component._repeatDelay || component.pendingRepeat)\r\n\r\n {\r\n component.forward = isReverse;\r\n }\r\n\r\n this.repeatAnimation(component);\r\n\r\n return;\r\n }\r\n\r\n if (component._reverse !== isReverse && component.repeatCounter === 0)\r\n {\r\n this.completeAnimation(component);\r\n\r\n return;\r\n }\r\n \r\n component.forward = isReverse;\r\n\r\n var frame = (isReverse) ? component.currentFrame.nextFrame : component.currentFrame.prevFrame;\r\n\r\n this.updateAndGetNextTick(component, frame);\r\n },\r\n\r\n /**\r\n * Returns the animation last frame.\r\n *\r\n * @method Phaser.Animations.Animation#getLastFrame\r\n * @since 3.12.0\r\n *\r\n * @return {Phaser.Animations.AnimationFrame} component - The Animation Last Frame.\r\n */\r\n getLastFrame: function ()\r\n {\r\n return this.frames[this.frames.length - 1];\r\n },\r\n\r\n /**\r\n * Called internally when the Animation is playing backwards.\r\n * Sets the previous frame, causing a yoyo, repeat, complete or update, accordingly.\r\n *\r\n * @method Phaser.Animations.Animation#previousFrame\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\r\n */\r\n previousFrame: function (component)\r\n {\r\n var frame = component.currentFrame;\r\n\r\n // TODO: Add frame skip support\r\n\r\n if (frame.isFirst)\r\n {\r\n // We're at the start of the animation\r\n\r\n if (component._yoyo)\r\n {\r\n this.handleYoyoFrame(component, true);\r\n }\r\n else if (component.repeatCounter > 0)\r\n {\r\n if (component._reverse && !component.forward)\r\n {\r\n component.currentFrame = this.getLastFrame();\r\n this.repeatAnimation(component);\r\n }\r\n else\r\n {\r\n // Repeat (happens before complete)\r\n component.forward = true;\r\n this.repeatAnimation(component);\r\n }\r\n }\r\n else\r\n {\r\n this.completeAnimation(component);\r\n }\r\n }\r\n else\r\n {\r\n this.updateAndGetNextTick(component, frame.prevFrame);\r\n }\r\n },\r\n\r\n /**\r\n * Update Frame and Wait next tick.\r\n *\r\n * @method Phaser.Animations.Animation#updateAndGetNextTick\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} frame - An Animation frame.\r\n */\r\n updateAndGetNextTick: function (component, frame)\r\n {\r\n component.updateFrame(frame);\r\n\r\n this.getNextTick(component);\r\n },\r\n\r\n /**\r\n * Removes the given AnimationFrame from this Animation instance.\r\n * This is a global action. Any Game Object using this Animation will be impacted by this change.\r\n *\r\n * @method Phaser.Animations.Animation#removeFrame\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} frame - The AnimationFrame to be removed.\r\n *\r\n * @return {this} This Animation object.\r\n */\r\n removeFrame: function (frame)\r\n {\r\n var index = this.frames.indexOf(frame);\r\n\r\n if (index !== -1)\r\n {\r\n this.removeFrameAt(index);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes a frame from the AnimationFrame array at the provided index\r\n * and updates the animation accordingly.\r\n *\r\n * @method Phaser.Animations.Animation#removeFrameAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The index in the AnimationFrame array\r\n *\r\n * @return {this} This Animation object.\r\n */\r\n removeFrameAt: function (index)\r\n {\r\n this.frames.splice(index, 1);\r\n\r\n this.updateFrameSequence();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Called internally during playback. Forces the animation to repeat, providing there are enough counts left\r\n * in the repeat counter.\r\n *\r\n * @method Phaser.Animations.Animation#repeatAnimation\r\n * @fires Phaser.Animations.Events#ANIMATION_REPEAT\r\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_REPEAT\r\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\r\n */\r\n repeatAnimation: function (component)\r\n {\r\n if (component._pendingStop === 2)\r\n {\r\n return this.completeAnimation(component);\r\n }\r\n\r\n if (component._repeatDelay > 0 && component.pendingRepeat === false)\r\n {\r\n component.pendingRepeat = true;\r\n component.accumulator -= component.nextTick;\r\n component.nextTick += component._repeatDelay;\r\n }\r\n else\r\n {\r\n component.repeatCounter--;\r\n\r\n component.updateFrame(component.currentFrame[(component.forward) ? 'nextFrame' : 'prevFrame']);\r\n\r\n if (component.isPlaying)\r\n {\r\n this.getNextTick(component);\r\n\r\n component.pendingRepeat = false;\r\n\r\n var frame = component.currentFrame;\r\n var parent = component.parent;\r\n\r\n this.emit(Events.ANIMATION_REPEAT, this, frame);\r\n\r\n parent.emit(Events.SPRITE_ANIMATION_KEY_REPEAT + this.key, this, frame, component.repeatCounter, parent);\r\n\r\n parent.emit(Events.SPRITE_ANIMATION_REPEAT, this, frame, component.repeatCounter, parent);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Sets the texture frame the animation uses for rendering.\r\n *\r\n * @method Phaser.Animations.Animation#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\r\n */\r\n setFrame: function (component)\r\n {\r\n // Work out which frame should be set next on the child, and set it\r\n if (component.forward)\r\n {\r\n this.nextFrame(component);\r\n }\r\n else\r\n {\r\n this.previousFrame(component);\r\n }\r\n },\r\n\r\n /**\r\n * Converts the animation data to JSON.\r\n *\r\n * @method Phaser.Animations.Animation#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.Animations.JSONAnimation} The resulting JSONAnimation formatted object.\r\n */\r\n toJSON: function ()\r\n {\r\n var output = {\r\n key: this.key,\r\n type: this.type,\r\n frames: [],\r\n frameRate: this.frameRate,\r\n duration: this.duration,\r\n skipMissedFrames: this.skipMissedFrames,\r\n delay: this.delay,\r\n repeat: this.repeat,\r\n repeatDelay: this.repeatDelay,\r\n yoyo: this.yoyo,\r\n showOnStart: this.showOnStart,\r\n hideOnComplete: this.hideOnComplete\r\n };\r\n\r\n this.frames.forEach(function (frame)\r\n {\r\n output.frames.push(frame.toJSON());\r\n });\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Called internally whenever frames are added to, or removed from, this Animation.\r\n *\r\n * @method Phaser.Animations.Animation#updateFrameSequence\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Animation object.\r\n */\r\n updateFrameSequence: function ()\r\n {\r\n var len = this.frames.length;\r\n var slice = 1 / (len - 1);\r\n\r\n var frame;\r\n\r\n for (var i = 0; i < len; i++)\r\n {\r\n frame = this.frames[i];\r\n\r\n frame.index = i + 1;\r\n frame.isFirst = false;\r\n frame.isLast = false;\r\n frame.progress = i * slice;\r\n\r\n if (i === 0)\r\n {\r\n frame.isFirst = true;\r\n\r\n if (len === 1)\r\n {\r\n frame.isLast = true;\r\n frame.nextFrame = frame;\r\n frame.prevFrame = frame;\r\n }\r\n else\r\n {\r\n frame.isLast = false;\r\n frame.prevFrame = this.frames[len - 1];\r\n frame.nextFrame = this.frames[i + 1];\r\n }\r\n }\r\n else if (i === len - 1 && len > 1)\r\n {\r\n frame.isLast = true;\r\n frame.prevFrame = this.frames[len - 2];\r\n frame.nextFrame = this.frames[0];\r\n }\r\n else if (len > 1)\r\n {\r\n frame.prevFrame = this.frames[i - 1];\r\n frame.nextFrame = this.frames[i + 1];\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Pauses playback of this Animation. The paused state is set immediately.\r\n *\r\n * @method Phaser.Animations.Animation#pause\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Animation object.\r\n */\r\n pause: function ()\r\n {\r\n this.paused = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resumes playback of this Animation. The paused state is reset immediately.\r\n *\r\n * @method Phaser.Animations.Animation#resume\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Animation object.\r\n */\r\n resume: function ()\r\n {\r\n this.paused = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroys this Animation instance. It will remove all event listeners,\r\n * remove this animation and its key from the global Animation Manager,\r\n * and then destroy all Animation Frames in turn.\r\n *\r\n * @method Phaser.Animations.Animation#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.removeAllListeners();\r\n\r\n this.manager.off(Events.PAUSE_ALL, this.pause, this);\r\n this.manager.off(Events.RESUME_ALL, this.resume, this);\r\n\r\n this.manager.remove(this.key);\r\n\r\n for (var i = 0; i < this.frames.length; i++)\r\n {\r\n this.frames[i].destroy();\r\n }\r\n\r\n this.frames = [];\r\n\r\n this.manager = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Animation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A single frame in an Animation sequence.\r\n *\r\n * An AnimationFrame consists of a reference to the Texture it uses for rendering, references to other\r\n * frames in the animation, and index data. It also has the ability to modify the animation timing.\r\n *\r\n * AnimationFrames are generated automatically by the Animation class.\r\n *\r\n * @class AnimationFrame\r\n * @memberof Phaser.Animations\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {string} textureKey - The key of the Texture this AnimationFrame uses.\r\n * @param {(string|integer)} textureFrame - The key of the Frame within the Texture that this AnimationFrame uses.\r\n * @param {integer} index - The index of this AnimationFrame within the Animation sequence.\r\n * @param {Phaser.Textures.Frame} frame - A reference to the Texture Frame this AnimationFrame uses for rendering.\r\n */\r\nvar AnimationFrame = new Class({\r\n\r\n initialize:\r\n\r\n function AnimationFrame (textureKey, textureFrame, index, frame)\r\n {\r\n /**\r\n * The key of the Texture this AnimationFrame uses.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#textureKey\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.textureKey = textureKey;\r\n\r\n /**\r\n * The key of the Frame within the Texture that this AnimationFrame uses.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#textureFrame\r\n * @type {(string|integer)}\r\n * @since 3.0.0\r\n */\r\n this.textureFrame = textureFrame;\r\n\r\n /**\r\n * The index of this AnimationFrame within the Animation sequence.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#index\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.index = index;\r\n\r\n /**\r\n * A reference to the Texture Frame this AnimationFrame uses for rendering.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n this.frame = frame;\r\n\r\n /**\r\n * Is this the first frame in an animation sequence?\r\n *\r\n * @name Phaser.Animations.AnimationFrame#isFirst\r\n * @type {boolean}\r\n * @default false\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.isFirst = false;\r\n\r\n /**\r\n * Is this the last frame in an animation sequence?\r\n *\r\n * @name Phaser.Animations.AnimationFrame#isLast\r\n * @type {boolean}\r\n * @default false\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.isLast = false;\r\n\r\n /**\r\n * A reference to the AnimationFrame that comes before this one in the animation, if any.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#prevFrame\r\n * @type {?Phaser.Animations.AnimationFrame}\r\n * @default null\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.prevFrame = null;\r\n\r\n /**\r\n * A reference to the AnimationFrame that comes after this one in the animation, if any.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#nextFrame\r\n * @type {?Phaser.Animations.AnimationFrame}\r\n * @default null\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.nextFrame = null;\r\n\r\n /**\r\n * Additional time (in ms) that this frame should appear for during playback.\r\n * The value is added onto the msPerFrame set by the animation.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#duration\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.duration = 0;\r\n\r\n /**\r\n * What % through the animation does this frame come?\r\n * This value is generated when the animation is created and cached here.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#progress\r\n * @type {number}\r\n * @default 0\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.progress = 0;\r\n },\r\n\r\n /**\r\n * Generates a JavaScript object suitable for converting to JSON.\r\n *\r\n * @method Phaser.Animations.AnimationFrame#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.Animations.JSONAnimationFrame} The AnimationFrame data.\r\n */\r\n toJSON: function ()\r\n {\r\n return {\r\n key: this.textureKey,\r\n frame: this.textureFrame,\r\n duration: this.duration\r\n };\r\n },\r\n\r\n /**\r\n * Destroys this object by removing references to external resources and callbacks.\r\n *\r\n * @method Phaser.Animations.AnimationFrame#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.frame = undefined;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = AnimationFrame;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Add Animation Event.\r\n * \r\n * This event is dispatched when a new animation is added to the global Animation Manager.\r\n * \r\n * This can happen either as a result of an animation instance being added to the Animation Manager,\r\n * or the Animation Manager creating a new animation directly.\r\n *\r\n * @event Phaser.Animations.Events#ADD_ANIMATION\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the Animation that was added to the global Animation Manager.\r\n * @param {Phaser.Animations.Animation} animation - An instance of the newly created Animation.\r\n */\r\nmodule.exports = 'add';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Animation Complete Event.\r\n * \r\n * This event is dispatched by an Animation instance when it completes, i.e. finishes playing or is manually stopped.\r\n * \r\n * Be careful with the volume of events this could generate. If a group of Sprites all complete the same\r\n * animation at the same time, this event will invoke its handler for each one of them.\r\n *\r\n * @event Phaser.Animations.Events#ANIMATION_COMPLETE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed.\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Animation Repeat Event.\r\n * \r\n * This event is dispatched when a currently playing animation repeats.\r\n * \r\n * The event is dispatched directly from the Animation object itself. Which means that listeners\r\n * bound to this event will be invoked every time the Animation repeats, for every Game Object that may have it.\r\n *\r\n * @event Phaser.Animations.Events#ANIMATION_REPEAT\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that repeated.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation was on when it repeated.\r\n */\r\nmodule.exports = 'repeat';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Animation Restart Event.\r\n * \r\n * This event is dispatched by an Animation instance when it restarts.\r\n * \r\n * Be careful with the volume of events this could generate. If a group of Sprites all restart the same\r\n * animation at the same time, this event will invoke its handler for each one of them.\r\n *\r\n * @event Phaser.Animations.Events#ANIMATION_RESTART\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that restarted playing.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing.\r\n */\r\nmodule.exports = 'restart';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Animation Start Event.\r\n * \r\n * This event is dispatched by an Animation instance when it starts playing.\r\n * \r\n * Be careful with the volume of events this could generate. If a group of Sprites all play the same\r\n * animation at the same time, this event will invoke its handler for each one of them.\r\n *\r\n * @event Phaser.Animations.Events#ANIMATION_START\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that started playing.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing.\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pause All Animations Event.\r\n * \r\n * This event is dispatched when the global Animation Manager is told to pause.\r\n * \r\n * When this happens all current animations will stop updating, although it doesn't necessarily mean\r\n * that the game has paused as well.\r\n *\r\n * @event Phaser.Animations.Events#PAUSE_ALL\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'pauseall';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Remove Animation Event.\r\n * \r\n * This event is dispatched when an animation is removed from the global Animation Manager.\r\n *\r\n * @event Phaser.Animations.Events#REMOVE_ANIMATION\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the Animation that was removed from the global Animation Manager.\r\n * @param {Phaser.Animations.Animation} animation - An instance of the removed Animation.\r\n */\r\nmodule.exports = 'remove';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Resume All Animations Event.\r\n * \r\n * This event is dispatched when the global Animation Manager resumes, having been previously paused.\r\n * \r\n * When this happens all current animations will continue updating again.\r\n *\r\n * @event Phaser.Animations.Events#RESUME_ALL\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'resumeall';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Complete Event.\r\n * \r\n * This event is dispatched by a Sprite when an animation finishes playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationcomplete', listener)`\r\n * \r\n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_COMPLETE` event.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_COMPLETE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed.\r\n */\r\nmodule.exports = 'animationcomplete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Key Complete Event.\r\n * \r\n * This event is dispatched by a Sprite when a specific animation finishes playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationcomplete-key', listener)` where `key` is the key of\r\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationcomplete-explode`.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_COMPLETE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed.\r\n */\r\nmodule.exports = 'animationcomplete-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Key Repeat Event.\r\n * \r\n * This event is dispatched by a Sprite when a specific animation repeats playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationrepeat-key', listener)` where `key` is the key of\r\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrepeat-explode`.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\r\n * @param {integer} repeatCount - The number of times the Animation has repeated so far.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing.\r\n */\r\nmodule.exports = 'animationrepeat-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Key Restart Event.\r\n * \r\n * This event is dispatched by a Sprite when a specific animation restarts playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationrestart-key', listener)` where `key` is the key of\r\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrestart-explode`.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing.\r\n */\r\nmodule.exports = 'animationrestart-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Key Start Event.\r\n * \r\n * This event is dispatched by a Sprite when a specific animation starts playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationstart-key', listener)` where `key` is the key of\r\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationstart-explode`.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing.\r\n */\r\nmodule.exports = 'animationstart-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Key Update Event.\r\n * \r\n * This event is dispatched by a Sprite when a specific animation playing on it updates. This happens when the animation changes frame,\r\n * based on the animation frame rate and other factors like `timeScale` and `delay`.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationupdate-key', listener)` where `key` is the key of\r\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationupdate-explode`.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated.\r\n */\r\nmodule.exports = 'animationupdate-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Repeat Event.\r\n * \r\n * This event is dispatched by a Sprite when an animation repeats playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationrepeat', listener)`\r\n * \r\n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_REPEAT` event.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_REPEAT\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\r\n * @param {integer} repeatCount - The number of times the Animation has repeated so far.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing.\r\n */\r\nmodule.exports = 'animationrepeat';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Restart Event.\r\n * \r\n * This event is dispatched by a Sprite when an animation restarts playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationrestart', listener)`\r\n * \r\n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_RESTART` event.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_RESTART\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing.\r\n */\r\nmodule.exports = 'animationrestart';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Start Event.\r\n * \r\n * This event is dispatched by a Sprite when an animation starts playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationstart', listener)`\r\n * \r\n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_START` event.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_START\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing.\r\n */\r\nmodule.exports = 'animationstart';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Update Event.\r\n * \r\n * This event is dispatched by a Sprite when an animation playing on it updates. This happens when the animation changes frame,\r\n * based on the animation frame rate and other factors like `timeScale` and `delay`.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationupdate', listener)`\r\n * \r\n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_UPDATE` event.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated.\r\n */\r\nmodule.exports = 'animationupdate';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Animations.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADD_ANIMATION: require('./ADD_ANIMATION_EVENT'),\r\n ANIMATION_COMPLETE: require('./ANIMATION_COMPLETE_EVENT'),\r\n ANIMATION_REPEAT: require('./ANIMATION_REPEAT_EVENT'),\r\n ANIMATION_RESTART: require('./ANIMATION_RESTART_EVENT'),\r\n ANIMATION_START: require('./ANIMATION_START_EVENT'),\r\n PAUSE_ALL: require('./PAUSE_ALL_EVENT'),\r\n REMOVE_ANIMATION: require('./REMOVE_ANIMATION_EVENT'),\r\n RESUME_ALL: require('./RESUME_ALL_EVENT'),\r\n SPRITE_ANIMATION_COMPLETE: require('./SPRITE_ANIMATION_COMPLETE_EVENT'),\r\n SPRITE_ANIMATION_KEY_COMPLETE: require('./SPRITE_ANIMATION_KEY_COMPLETE_EVENT'),\r\n SPRITE_ANIMATION_KEY_REPEAT: require('./SPRITE_ANIMATION_KEY_REPEAT_EVENT'),\r\n SPRITE_ANIMATION_KEY_RESTART: require('./SPRITE_ANIMATION_KEY_RESTART_EVENT'),\r\n SPRITE_ANIMATION_KEY_START: require('./SPRITE_ANIMATION_KEY_START_EVENT'),\r\n SPRITE_ANIMATION_KEY_UPDATE: require('./SPRITE_ANIMATION_KEY_UPDATE_EVENT'),\r\n SPRITE_ANIMATION_REPEAT: require('./SPRITE_ANIMATION_REPEAT_EVENT'),\r\n SPRITE_ANIMATION_RESTART: require('./SPRITE_ANIMATION_RESTART_EVENT'),\r\n SPRITE_ANIMATION_START: require('./SPRITE_ANIMATION_START_EVENT'),\r\n SPRITE_ANIMATION_UPDATE: require('./SPRITE_ANIMATION_UPDATE_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Blur Event.\r\n * \r\n * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded\r\n * enters a blurred state. The blur event is raised when the window loses focus. This can happen if a user swaps\r\n * tab, or if they simply remove focus from the browser to another app.\r\n *\r\n * @event Phaser.Core.Events#BLUR\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'blur';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Boot Event.\r\n * \r\n * This event is dispatched when the Phaser Game instance has finished booting, but before it is ready to start running.\r\n * The global systems use this event to know when to set themselves up, dispatching their own `ready` events as required.\r\n *\r\n * @event Phaser.Core.Events#BOOT\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'boot';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Context Lost Event.\r\n * \r\n * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Lost event from the browser.\r\n * \r\n * The partner event is `CONTEXT_RESTORED`.\r\n *\r\n * @event Phaser.Core.Events#CONTEXT_LOST\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'contextlost';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Context Restored Event.\r\n * \r\n * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Restored event from the browser.\r\n * \r\n * The partner event is `CONTEXT_LOST`.\r\n *\r\n * @event Phaser.Core.Events#CONTEXT_RESTORED\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'contextrestored';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Destroy Event.\r\n * \r\n * This event is dispatched when the game instance has been told to destroy itself.\r\n * Lots of internal systems listen to this event in order to clear themselves out.\r\n * Custom plugins and game code should also do the same.\r\n *\r\n * @event Phaser.Core.Events#DESTROY\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Focus Event.\r\n * \r\n * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded\r\n * enters a focused state. The focus event is raised when the window re-gains focus, having previously lost it.\r\n *\r\n * @event Phaser.Core.Events#FOCUS\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'focus';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Hidden Event.\r\n * \r\n * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded\r\n * enters a hidden state. Only browsers that support the Visibility API will cause this event to be emitted.\r\n * \r\n * In most modern browsers, when the document enters a hidden state, the Request Animation Frame and setTimeout, which\r\n * control the main game loop, will automatically pause. There is no way to stop this from happening. It is something\r\n * your game should account for in its own code, should the pause be an issue (i.e. for multiplayer games)\r\n *\r\n * @event Phaser.Core.Events#HIDDEN\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'hidden';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Pause Event.\r\n * \r\n * This event is dispatched when the Game loop enters a paused state, usually as a result of the Visibility Handler.\r\n *\r\n * @event Phaser.Core.Events#PAUSE\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'pause';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Post-Render Event.\r\n * \r\n * This event is dispatched right at the end of the render process.\r\n * \r\n * Every Scene will have rendered and been drawn to the canvas by the time this event is fired.\r\n * Use it for any last minute post-processing before the next game step begins.\r\n *\r\n * @event Phaser.Core.Events#POST_RENDER\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - A reference to the current renderer being used by the Game instance.\r\n */\r\nmodule.exports = 'postrender';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Post-Step Event.\r\n * \r\n * This event is dispatched after the Scene Manager has updated.\r\n * Hook into it from plugins or systems that need to do things before the render starts.\r\n *\r\n * @event Phaser.Core.Events#POST_STEP\r\n * @since 3.0.0\r\n * \r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'poststep';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Pre-Render Event.\r\n * \r\n * This event is dispatched immediately before any of the Scenes have started to render.\r\n * \r\n * The renderer will already have been initialized this frame, clearing itself and preparing to receive the Scenes for rendering, but it won't have actually drawn anything yet.\r\n *\r\n * @event Phaser.Core.Events#PRE_RENDER\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - A reference to the current renderer being used by the Game instance.\r\n */\r\nmodule.exports = 'prerender';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Pre-Step Event.\r\n * \r\n * This event is dispatched before the main Game Step starts. By this point in the game cycle none of the Scene updates have yet happened.\r\n * Hook into it from plugins or systems that need to update before the Scene Manager does.\r\n *\r\n * @event Phaser.Core.Events#PRE_STEP\r\n * @since 3.0.0\r\n * \r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'prestep';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Ready Event.\r\n * \r\n * This event is dispatched when the Phaser Game instance has finished booting, the Texture Manager is fully ready,\r\n * and all local systems are now able to start.\r\n *\r\n * @event Phaser.Core.Events#READY\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'ready';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Resume Event.\r\n * \r\n * This event is dispatched when the game loop leaves a paused state and resumes running.\r\n *\r\n * @event Phaser.Core.Events#RESUME\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'resume';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Step Event.\r\n * \r\n * This event is dispatched after the Game Pre-Step and before the Scene Manager steps.\r\n * Hook into it from plugins or systems that need to update before the Scene Manager does, but after the core Systems have.\r\n *\r\n * @event Phaser.Core.Events#STEP\r\n * @since 3.0.0\r\n * \r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'step';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Visible Event.\r\n * \r\n * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded\r\n * enters a visible state, previously having been hidden.\r\n * \r\n * Only browsers that support the Visibility API will cause this event to be emitted.\r\n *\r\n * @event Phaser.Core.Events#VISIBLE\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'visible';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Core.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n BLUR: require('./BLUR_EVENT'),\r\n BOOT: require('./BOOT_EVENT'),\r\n CONTEXT_LOST: require('./CONTEXT_LOST_EVENT'),\r\n CONTEXT_RESTORED: require('./CONTEXT_RESTORED_EVENT'),\r\n DESTROY: require('./DESTROY_EVENT'),\r\n FOCUS: require('./FOCUS_EVENT'),\r\n HIDDEN: require('./HIDDEN_EVENT'),\r\n PAUSE: require('./PAUSE_EVENT'),\r\n POST_RENDER: require('./POST_RENDER_EVENT'),\r\n POST_STEP: require('./POST_STEP_EVENT'),\r\n PRE_RENDER: require('./PRE_RENDER_EVENT'),\r\n PRE_STEP: require('./PRE_STEP_EVENT'),\r\n READY: require('./READY_EVENT'),\r\n RESUME: require('./RESUME_EVENT'),\r\n STEP: require('./STEP_EVENT'),\r\n VISIBLE: require('./VISIBLE_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\nvar Events = require('./events');\r\n\r\n/**\r\n * @callback DataEachCallback\r\n *\r\n * @param {*} parent - The parent object of the DataManager.\r\n * @param {string} key - The key of the value.\r\n * @param {*} value - The value.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The Data Manager Component features a means to store pieces of data specific to a Game Object, System or Plugin.\r\n * You can then search, query it, and retrieve the data. The parent must either extend EventEmitter,\r\n * or have a property called `events` that is an instance of it.\r\n *\r\n * @class DataManager\r\n * @memberof Phaser.Data\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {object} parent - The object that this DataManager belongs to.\r\n * @param {Phaser.Events.EventEmitter} [eventEmitter] - The DataManager's event emitter.\r\n */\r\nvar DataManager = new Class({\r\n\r\n initialize:\r\n\r\n function DataManager (parent, eventEmitter)\r\n {\r\n /**\r\n * The object that this DataManager belongs to.\r\n *\r\n * @name Phaser.Data.DataManager#parent\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.parent = parent;\r\n\r\n /**\r\n * The DataManager's event emitter.\r\n *\r\n * @name Phaser.Data.DataManager#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events = eventEmitter;\r\n\r\n if (!eventEmitter)\r\n {\r\n this.events = (parent.events) ? parent.events : parent;\r\n }\r\n\r\n /**\r\n * The data list.\r\n *\r\n * @name Phaser.Data.DataManager#list\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.0.0\r\n */\r\n this.list = {};\r\n\r\n /**\r\n * The public values list. You can use this to access anything you have stored\r\n * in this Data Manager. For example, if you set a value called `gold` you can\r\n * access it via:\r\n *\r\n * ```javascript\r\n * this.data.values.gold;\r\n * ```\r\n *\r\n * You can also modify it directly:\r\n * \r\n * ```javascript\r\n * this.data.values.gold += 1000;\r\n * ```\r\n *\r\n * Doing so will emit a `setdata` event from the parent of this Data Manager.\r\n * \r\n * Do not modify this object directly. Adding properties directly to this object will not\r\n * emit any events. Always use `DataManager.set` to create new items the first time around.\r\n *\r\n * @name Phaser.Data.DataManager#values\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.10.0\r\n */\r\n this.values = {};\r\n\r\n /**\r\n * Whether setting data is frozen for this DataManager.\r\n *\r\n * @name Phaser.Data.DataManager#_frozen\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._frozen = false;\r\n\r\n if (!parent.hasOwnProperty('sys') && this.events)\r\n {\r\n this.events.once('destroy', this.destroy, this);\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves the value for the given key, or undefined if it doesn't exist.\r\n *\r\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\r\n * \r\n * ```javascript\r\n * this.data.get('gold');\r\n * ```\r\n *\r\n * Or access the value directly:\r\n * \r\n * ```javascript\r\n * this.data.values.gold;\r\n * ```\r\n *\r\n * You can also pass in an array of keys, in which case an array of values will be returned:\r\n * \r\n * ```javascript\r\n * this.data.get([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * This approach is useful for destructuring arrays in ES6.\r\n *\r\n * @method Phaser.Data.DataManager#get\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\r\n *\r\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\r\n */\r\n get: function (key)\r\n {\r\n var list = this.list;\r\n\r\n if (Array.isArray(key))\r\n {\r\n var output = [];\r\n\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n output.push(list[key[i]]);\r\n }\r\n\r\n return output;\r\n }\r\n else\r\n {\r\n return list[key];\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves all data values in a new object.\r\n *\r\n * @method Phaser.Data.DataManager#getAll\r\n * @since 3.0.0\r\n *\r\n * @return {Object.} All data values.\r\n */\r\n getAll: function ()\r\n {\r\n var results = {};\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list.hasOwnProperty(key))\r\n {\r\n results[key] = this.list[key];\r\n }\r\n }\r\n\r\n return results;\r\n },\r\n\r\n /**\r\n * Queries the DataManager for the values of keys matching the given regular expression.\r\n *\r\n * @method Phaser.Data.DataManager#query\r\n * @since 3.0.0\r\n *\r\n * @param {RegExp} search - A regular expression object. If a non-RegExp object obj is passed, it is implicitly converted to a RegExp by using new RegExp(obj).\r\n *\r\n * @return {Object.} The values of the keys matching the search string.\r\n */\r\n query: function (search)\r\n {\r\n var results = {};\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list.hasOwnProperty(key) && key.match(search))\r\n {\r\n results[key] = this.list[key];\r\n }\r\n }\r\n\r\n return results;\r\n },\r\n\r\n /**\r\n * Sets a value for the given key. If the key doesn't already exist in the Data Manager then it is created.\r\n * \r\n * ```javascript\r\n * data.set('name', 'Red Gem Stone');\r\n * ```\r\n *\r\n * You can also pass in an object of key value pairs as the first argument:\r\n *\r\n * ```javascript\r\n * data.set({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\r\n * ```\r\n *\r\n * To get a value back again you can call `get`:\r\n * \r\n * ```javascript\r\n * data.get('gold');\r\n * ```\r\n * \r\n * Or you can access the value directly via the `values` property, where it works like any other variable:\r\n * \r\n * ```javascript\r\n * data.values.gold += 50;\r\n * ```\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\r\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\r\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\r\n *\r\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.Data.DataManager#set\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.0.0\r\n *\r\n * @param {(string|object)} key - The key to set the value for. Or an object or key value pairs. If an object the `data` argument is ignored.\r\n * @param {*} data - The value to set for the given key. If an object is provided as the key this argument is ignored.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n set: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (typeof key === 'string')\r\n {\r\n return this.setValue(key, data);\r\n }\r\n else\r\n {\r\n for (var entry in key)\r\n {\r\n this.setValue(entry, key[entry]);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Increase a value for the given key. If the key doesn't already exist in the Data Manager then it is increased from 0.\r\n * \r\n * When the value is first set, a `setdata` event is emitted.\r\n * \r\n * @method Phaser.Data.DataManager#inc\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.23.0\r\n *\r\n * @param {(string|object)} key - The key to increase the value for.\r\n * @param {*} [data] - The value to increase for the given key.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n inc: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (data === undefined)\r\n {\r\n data = 1;\r\n }\r\n\r\n var value = this.get(key);\r\n if (value === undefined)\r\n {\r\n value = 0;\r\n }\r\n\r\n this.set(key, (value + data));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggle a boolean value for the given key. If the key doesn't already exist in the Data Manager then it is toggled from false.\r\n * \r\n * When the value is first set, a `setdata` event is emitted.\r\n * \r\n * @method Phaser.Data.DataManager#toggle\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.23.0\r\n *\r\n * @param {(string|object)} key - The key to toggle the value for.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n toggle: function (key)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n this.set(key, !this.get(key));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal value setter, called automatically by the `set` method.\r\n *\r\n * @method Phaser.Data.DataManager#setValue\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @private\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The key to set the value for.\r\n * @param {*} data - The value to set.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n setValue: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (this.has(key))\r\n {\r\n // Hit the key getter, which will in turn emit the events.\r\n this.values[key] = data;\r\n }\r\n else\r\n {\r\n var _this = this;\r\n var list = this.list;\r\n var events = this.events;\r\n var parent = this.parent;\r\n\r\n Object.defineProperty(this.values, key, {\r\n\r\n enumerable: true,\r\n \r\n configurable: true,\r\n\r\n get: function ()\r\n {\r\n return list[key];\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (!_this._frozen)\r\n {\r\n var previousValue = list[key];\r\n list[key] = value;\r\n\r\n events.emit(Events.CHANGE_DATA, parent, key, value, previousValue);\r\n events.emit(Events.CHANGE_DATA_KEY + key, parent, value, previousValue);\r\n }\r\n }\r\n\r\n });\r\n\r\n list[key] = data;\r\n\r\n events.emit(Events.SET_DATA, parent, key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all data entries to the given callback.\r\n *\r\n * @method Phaser.Data.DataManager#each\r\n * @since 3.0.0\r\n *\r\n * @param {DataEachCallback} callback - The function to call.\r\n * @param {*} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ this.parent, null, undefined ];\r\n\r\n for (var i = 1; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (var key in this.list)\r\n {\r\n args[1] = key;\r\n args[2] = this.list[key];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Merge the given object of key value pairs into this DataManager.\r\n *\r\n * Any newly created values will emit a `setdata` event. Any updated values (see the `overwrite` argument)\r\n * will emit a `changedata` event.\r\n *\r\n * @method Phaser.Data.DataManager#merge\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.0.0\r\n *\r\n * @param {Object.} data - The data to merge.\r\n * @param {boolean} [overwrite=true] - Whether to overwrite existing data. Defaults to true.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n merge: function (data, overwrite)\r\n {\r\n if (overwrite === undefined) { overwrite = true; }\r\n\r\n // Merge data from another component into this one\r\n for (var key in data)\r\n {\r\n if (data.hasOwnProperty(key) && (overwrite || (!overwrite && !this.has(key))))\r\n {\r\n this.setValue(key, data[key]);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Remove the value for the given key.\r\n *\r\n * If the key is found in this Data Manager it is removed from the internal lists and a\r\n * `removedata` event is emitted.\r\n * \r\n * You can also pass in an array of keys, in which case all keys in the array will be removed:\r\n * \r\n * ```javascript\r\n * this.data.remove([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * @method Phaser.Data.DataManager#remove\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key to remove, or an array of keys to remove.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n remove: function (key)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n this.removeValue(key[i]);\r\n }\r\n }\r\n else\r\n {\r\n return this.removeValue(key);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal value remover, called automatically by the `remove` method.\r\n *\r\n * @method Phaser.Data.DataManager#removeValue\r\n * @private\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The key to set the value for.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n removeValue: function (key)\r\n {\r\n if (this.has(key))\r\n {\r\n var data = this.list[key];\r\n\r\n delete this.list[key];\r\n delete this.values[key];\r\n\r\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves the data associated with the given 'key', deletes it from this Data Manager, then returns it.\r\n *\r\n * @method Phaser.Data.DataManager#pop\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the value to retrieve and delete.\r\n *\r\n * @return {*} The value of the given key.\r\n */\r\n pop: function (key)\r\n {\r\n var data = undefined;\r\n\r\n if (!this._frozen && this.has(key))\r\n {\r\n data = this.list[key];\r\n\r\n delete this.list[key];\r\n delete this.values[key];\r\n\r\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\r\n }\r\n\r\n return data;\r\n },\r\n\r\n /**\r\n * Determines whether the given key is set in this Data Manager.\r\n * \r\n * Please note that the keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.Data.DataManager#has\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key to check.\r\n *\r\n * @return {boolean} Returns `true` if the key exists, otherwise `false`.\r\n */\r\n has: function (key)\r\n {\r\n return this.list.hasOwnProperty(key);\r\n },\r\n\r\n /**\r\n * Freeze or unfreeze this Data Manager. A frozen Data Manager will block all attempts\r\n * to create new values or update existing ones.\r\n *\r\n * @method Phaser.Data.DataManager#setFreeze\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Whether to freeze or unfreeze the Data Manager.\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n setFreeze: function (value)\r\n {\r\n this._frozen = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Delete all data in this Data Manager and unfreeze it.\r\n *\r\n * @method Phaser.Data.DataManager#reset\r\n * @since 3.0.0\r\n *\r\n * @return {this} This DataManager object.\r\n */\r\n reset: function ()\r\n {\r\n for (var key in this.list)\r\n {\r\n delete this.list[key];\r\n delete this.values[key];\r\n }\r\n\r\n this._frozen = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroy this data manager.\r\n *\r\n * @method Phaser.Data.DataManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.reset();\r\n\r\n this.events.off(Events.CHANGE_DATA);\r\n this.events.off(Events.SET_DATA);\r\n this.events.off(Events.REMOVE_DATA);\r\n\r\n this.parent = null;\r\n },\r\n\r\n /**\r\n * Gets or sets the frozen state of this Data Manager.\r\n * A frozen Data Manager will block all attempts to create new values or update existing ones.\r\n *\r\n * @name Phaser.Data.DataManager#freeze\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n freeze: {\r\n\r\n get: function ()\r\n {\r\n return this._frozen;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._frozen = (value) ? true : false;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Return the total number of entries in this Data Manager.\r\n *\r\n * @name Phaser.Data.DataManager#count\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n count: {\r\n\r\n get: function ()\r\n {\r\n var i = 0;\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list[key] !== undefined)\r\n {\r\n i++;\r\n }\r\n }\r\n\r\n return i;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = DataManager;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Change Data Event.\r\n * \r\n * This event is dispatched by a Data Manager when an item in the data store is changed.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * a change data event from a Game Object you would use: `sprite.data.on('changedata', listener)`.\r\n * \r\n * This event is dispatched for all items that change in the Data Manager.\r\n * To listen for the change of a specific item, use the `CHANGE_DATA_KEY_EVENT` event.\r\n *\r\n * @event Phaser.Data.Events#CHANGE_DATA\r\n * @since 3.0.0\r\n * \r\n * @param {any} parent - A reference to the object that the Data Manager responsible for this event belongs to.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} value - The new value of the item in the Data Manager.\r\n * @param {any} previousValue - The previous value of the item in the Data Manager.\r\n */\r\nmodule.exports = 'changedata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Change Data Key Event.\r\n * \r\n * This event is dispatched by a Data Manager when an item in the data store is changed.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the change of a specific data item from a Game Object you would use: `sprite.data.on('changedata-key', listener)`,\r\n * where `key` is the unique string key of the data item. For example, if you have a data item stored called `gold`\r\n * then you can listen for `sprite.data.on('changedata-gold')`.\r\n *\r\n * @event Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.16.1\r\n * \r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {any} value - The item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n * @param {any} previousValue - The previous item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'changedata-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Remove Data Event.\r\n * \r\n * This event is dispatched by a Data Manager when an item is removed from it.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the removal of a data item on a Game Object you would use: `sprite.data.on('removedata', listener)`.\r\n *\r\n * @event Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n * \r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} data - The item that was removed from the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'removedata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Set Data Event.\r\n * \r\n * This event is dispatched by a Data Manager when a new item is added to the data store.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the addition of a new data item on a Game Object you would use: `sprite.data.on('setdata', listener)`.\r\n *\r\n * @event Phaser.Data.Events#SET_DATA\r\n * @since 3.0.0\r\n * \r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} data - The item that was added to the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'setdata';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Data.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CHANGE_DATA: require('./CHANGE_DATA_EVENT'),\r\n CHANGE_DATA_KEY: require('./CHANGE_DATA_KEY_EVENT'),\r\n REMOVE_DATA: require('./REMOVE_DATA_EVENT'),\r\n SET_DATA: require('./SET_DATA_EVENT')\r\n\r\n};\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Given a hex color value, such as 0xff00ff (for purple), it will return a\n * numeric representation of it (i.e. 16711935) for use in WebGL tinting.\n *\n * @function Phaser.Display.Color.GetColorFromValue\n * @since 3.50.0\n *\n * @param {number} red - The hex color value, such as 0xff0000.\n *\n * @return {number} The combined color value.\n */\nvar GetColorFromValue = function (value)\n{\n return (value >> 16) + (value & 0xff00) + ((value & 0xff) << 16);\n};\n\nmodule.exports = GetColorFromValue;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar GameEvents = require('../../core/events');\r\n\r\n/**\r\n * @classdesc\r\n * A Bitmap Mask combines the alpha (opacity) of a masked pixel with the alpha of another pixel.\r\n * Unlike the Geometry Mask, which is a clipping path, a Bitmap Mask behaves like an alpha mask,\r\n * not a clipping path. It is only available when using the WebGL Renderer.\r\n *\r\n * A Bitmap Mask can use any Game Object to determine the alpha of each pixel of the masked Game Object(s).\r\n * For any given point of a masked Game Object's texture, the pixel's alpha will be multiplied by the alpha\r\n * of the pixel at the same position in the Bitmap Mask's Game Object. The color of the pixel from the\r\n * Bitmap Mask doesn't matter.\r\n *\r\n * For example, if a pure blue pixel with an alpha of 0.95 is masked with a pure red pixel with an\r\n * alpha of 0.5, the resulting pixel will be pure blue with an alpha of 0.475. Naturally, this means\r\n * that a pixel in the mask with an alpha of 0 will hide the corresponding pixel in all masked Game Objects\r\n * A pixel with an alpha of 1 in the masked Game Object will receive the same alpha as the\r\n * corresponding pixel in the mask.\r\n *\r\n * The Bitmap Mask's location matches the location of its Game Object, not the location of the\r\n * masked objects. Moving or transforming the underlying Game Object will change the mask\r\n * (and affect the visibility of any masked objects), whereas moving or transforming a masked object\r\n * will not affect the mask.\r\n *\r\n * The Bitmap Mask will not render its Game Object by itself. If the Game Object is not in a\r\n * Scene's display list, it will only be used for the mask and its full texture will not be directly\r\n * visible. Adding the underlying Game Object to a Scene will not cause any problems - it will\r\n * render as a normal Game Object and will also serve as a mask.\r\n *\r\n * @class BitmapMask\r\n * @memberof Phaser.Display.Masks\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene which this Bitmap Mask will be used in.\r\n * @param {Phaser.GameObjects.GameObject} renderable - A renderable Game Object that uses a texture, such as a Sprite.\r\n */\r\nvar BitmapMask = new Class({\r\n\r\n initialize:\r\n\r\n function BitmapMask (scene, renderable)\r\n {\r\n var renderer = scene.sys.game.renderer;\r\n\r\n /**\r\n * A reference to either the Canvas or WebGL Renderer that this Mask is using.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.11.0\r\n */\r\n this.renderer = renderer;\r\n\r\n /**\r\n * A renderable Game Object that uses a texture, such as a Sprite.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#bitmapMask\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.0.0\r\n */\r\n this.bitmapMask = renderable;\r\n\r\n /**\r\n * The texture used for the mask's framebuffer.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#maskTexture\r\n * @type {WebGLTexture}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.maskTexture = null;\r\n\r\n /**\r\n * The texture used for the main framebuffer.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#mainTexture\r\n * @type {WebGLTexture}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.mainTexture = null;\r\n\r\n /**\r\n * Whether the Bitmap Mask is dirty and needs to be updated.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#dirty\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.dirty = true;\r\n\r\n /**\r\n * The framebuffer to which a masked Game Object is rendered.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#mainFramebuffer\r\n * @type {WebGLFramebuffer}\r\n * @since 3.0.0\r\n */\r\n this.mainFramebuffer = null;\r\n\r\n /**\r\n * The framebuffer to which the Bitmap Mask's masking Game Object is rendered.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#maskFramebuffer\r\n * @type {WebGLFramebuffer}\r\n * @since 3.0.0\r\n */\r\n this.maskFramebuffer = null;\r\n\r\n /**\r\n * The previous framebuffer set in the renderer before this one was enabled.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#prevFramebuffer\r\n * @type {WebGLFramebuffer}\r\n * @since 3.17.0\r\n */\r\n this.prevFramebuffer = null;\r\n\r\n /**\r\n * Whether to invert the masks alpha.\r\n *\r\n * If `true`, the alpha of the masking pixel will be inverted before it's multiplied with the masked pixel. Essentially, this means that a masked area will be visible only if the corresponding area in the mask is invisible.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#invertAlpha\r\n * @type {boolean}\r\n * @since 3.1.2\r\n */\r\n this.invertAlpha = false;\r\n\r\n /**\r\n * Is this mask a stencil mask?\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#isStencil\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.isStencil = false;\r\n\r\n if (renderer && renderer.gl)\r\n {\r\n var width = renderer.width;\r\n var height = renderer.height;\r\n var pot = ((width & (width - 1)) === 0 && (height & (height - 1)) === 0);\r\n var gl = renderer.gl;\r\n var wrap = pot ? gl.REPEAT : gl.CLAMP_TO_EDGE;\r\n var filter = gl.LINEAR;\r\n\r\n this.mainTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\r\n this.maskTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\r\n this.mainFramebuffer = renderer.createFramebuffer(width, height, this.mainTexture, true);\r\n this.maskFramebuffer = renderer.createFramebuffer(width, height, this.maskTexture, true);\r\n\r\n scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, function (renderer)\r\n {\r\n var width = renderer.width;\r\n var height = renderer.height;\r\n var pot = ((width & (width - 1)) === 0 && (height & (height - 1)) === 0);\r\n var gl = renderer.gl;\r\n var wrap = pot ? gl.REPEAT : gl.CLAMP_TO_EDGE;\r\n var filter = gl.LINEAR;\r\n\r\n this.mainTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\r\n this.maskTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\r\n this.mainFramebuffer = renderer.createFramebuffer(width, height, this.mainTexture, true);\r\n this.maskFramebuffer = renderer.createFramebuffer(width, height, this.maskTexture, true);\r\n\r\n }, this);\r\n }\r\n },\r\n\r\n /**\r\n * Sets a new masking Game Object for the Bitmap Mask.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#setBitmap\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} renderable - A renderable Game Object that uses a texture, such as a Sprite.\r\n */\r\n setBitmap: function (renderable)\r\n {\r\n this.bitmapMask = renderable;\r\n },\r\n\r\n /**\r\n * Prepares the WebGL Renderer to render a Game Object with this mask applied.\r\n *\r\n * This renders the masking Game Object to the mask framebuffer and switches to the main framebuffer so that the masked Game Object will be rendered to it instead of being rendered directly to the frame.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#preRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to prepare.\r\n * @param {Phaser.GameObjects.GameObject} maskedObject - The masked Game Object which will be drawn.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n */\r\n preRenderWebGL: function (renderer, maskedObject, camera)\r\n {\r\n renderer.pipelines.BitmapMaskPipeline.beginMask(this, maskedObject, camera);\r\n },\r\n\r\n /**\r\n * Finalizes rendering of a masked Game Object.\r\n *\r\n * This resets the previously bound framebuffer and switches the WebGL Renderer to the Bitmap Mask Pipeline, which uses a special fragment shader to apply the masking effect.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#postRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to clean up.\r\n */\r\n postRenderWebGL: function (renderer, camera)\r\n {\r\n renderer.pipelines.BitmapMaskPipeline.endMask(this, camera);\r\n },\r\n\r\n /**\r\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#preRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\r\n * @param {Phaser.GameObjects.GameObject} mask - The masked Game Object which would be rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n */\r\n preRenderCanvas: function ()\r\n {\r\n // NOOP\r\n },\r\n\r\n /**\r\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#postRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\r\n */\r\n postRenderCanvas: function ()\r\n {\r\n // NOOP\r\n },\r\n\r\n /**\r\n * Destroys this BitmapMask and nulls any references it holds.\r\n * \r\n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\r\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.bitmapMask = null;\r\n\r\n var renderer = this.renderer;\r\n\r\n if (renderer && renderer.gl)\r\n {\r\n renderer.deleteTexture(this.mainTexture);\r\n renderer.deleteTexture(this.maskTexture);\r\n renderer.deleteFramebuffer(this.mainFramebuffer);\r\n renderer.deleteFramebuffer(this.maskFramebuffer);\r\n }\r\n\r\n this.mainTexture = null;\r\n this.maskTexture = null;\r\n this.mainFramebuffer = null;\r\n this.maskFramebuffer = null;\r\n this.prevFramebuffer = null;\r\n this.renderer = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BitmapMask;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A Geometry Mask can be applied to a Game Object to hide any pixels of it which don't intersect\r\n * a visible pixel from the geometry mask. The mask is essentially a clipping path which can only\r\n * make a masked pixel fully visible or fully invisible without changing its alpha (opacity).\r\n *\r\n * A Geometry Mask uses a Graphics Game Object to determine which pixels of the masked Game Object(s)\r\n * should be clipped. For any given point of a masked Game Object's texture, the pixel will only be displayed\r\n * if the Graphics Game Object of the Geometry Mask has a visible pixel at the same position. The color and\r\n * alpha of the pixel from the Geometry Mask do not matter.\r\n *\r\n * The Geometry Mask's location matches the location of its Graphics object, not the location of the masked objects.\r\n * Moving or transforming the underlying Graphics object will change the mask (and affect the visibility\r\n * of any masked objects), whereas moving or transforming a masked object will not affect the mask.\r\n * You can think of the Geometry Mask (or rather, of its Graphics object) as an invisible curtain placed\r\n * in front of all masked objects which has its own visual properties and, naturally, respects the camera's\r\n * visual properties, but isn't affected by and doesn't follow the masked objects by itself.\r\n *\r\n * @class GeometryMask\r\n * @memberof Phaser.Display.Masks\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - This parameter is not used.\r\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics Game Object to use for the Geometry Mask. Doesn't have to be in the Display List.\r\n */\r\nvar GeometryMask = new Class({\r\n\r\n initialize:\r\n\r\n function GeometryMask (scene, graphicsGeometry)\r\n {\r\n /**\r\n * The Graphics object which describes the Geometry Mask.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#geometryMask\r\n * @type {Phaser.GameObjects.Graphics}\r\n * @since 3.0.0\r\n */\r\n this.geometryMask = graphicsGeometry;\r\n\r\n /**\r\n * Similar to the BitmapMasks invertAlpha setting this to true will then hide all pixels\r\n * drawn to the Geometry Mask.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#invertAlpha\r\n * @type {boolean}\r\n * @since 3.16.0\r\n */\r\n this.invertAlpha = false;\r\n\r\n /**\r\n * Is this mask a stencil mask?\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#isStencil\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.isStencil = true;\r\n\r\n /**\r\n * The current stencil level.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#level\r\n * @type {boolean}\r\n * @private\r\n * @since 3.17.0\r\n */\r\n this.level = 0;\r\n },\r\n\r\n /**\r\n * Sets a new Graphics object for the Geometry Mask.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#setShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics object which will be used for the Geometry Mask.\r\n * \r\n * @return {this} This Geometry Mask\r\n */\r\n setShape: function (graphicsGeometry)\r\n {\r\n this.geometryMask = graphicsGeometry;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the `invertAlpha` property of this Geometry Mask.\r\n * Inverting the alpha essentially flips the way the mask works.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#setInvertAlpha\r\n * @since 3.17.0\r\n *\r\n * @param {boolean} [value=true] - Invert the alpha of this mask?\r\n * \r\n * @return {this} This Geometry Mask\r\n */\r\n setInvertAlpha: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.invertAlpha = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Renders the Geometry Mask's underlying Graphics object to the OpenGL stencil buffer and enables the stencil test, which clips rendered pixels according to the mask.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#preRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n */\r\n preRenderWebGL: function (renderer, child, camera)\r\n {\r\n var gl = renderer.gl;\r\n\r\n // Force flushing before drawing to stencil buffer\r\n renderer.flush();\r\n\r\n if (renderer.maskStack.length === 0)\r\n {\r\n gl.enable(gl.STENCIL_TEST);\r\n gl.clear(gl.STENCIL_BUFFER_BIT);\r\n\r\n renderer.maskCount = 0;\r\n }\r\n\r\n if (renderer.currentCameraMask.mask !== this)\r\n {\r\n renderer.currentMask.mask = this;\r\n }\r\n\r\n renderer.maskStack.push({ mask: this, camera: camera });\r\n\r\n this.applyStencil(renderer, camera, true);\r\n\r\n renderer.maskCount++;\r\n },\r\n\r\n /**\r\n * Applies the current stencil mask to the renderer.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#applyStencil\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n * @param {boolean} inc - Is this an INCR stencil or a DECR stencil?\r\n */\r\n applyStencil: function (renderer, camera, inc)\r\n {\r\n var gl = renderer.gl;\r\n var geometryMask = this.geometryMask;\r\n var level = renderer.maskCount;\r\n\r\n gl.colorMask(false, false, false, false);\r\n\r\n if (inc)\r\n {\r\n gl.stencilFunc(gl.EQUAL, level, 0xFF);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.INCR);\r\n }\r\n else\r\n {\r\n gl.stencilFunc(gl.EQUAL, level + 1, 0xFF);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.DECR);\r\n }\r\n\r\n // Write stencil buffer\r\n geometryMask.renderWebGL(renderer, geometryMask, 0, camera);\r\n\r\n renderer.flush();\r\n\r\n gl.colorMask(true, true, true, true);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP);\r\n\r\n if (inc)\r\n {\r\n if (this.invertAlpha)\r\n {\r\n gl.stencilFunc(gl.NOTEQUAL, level + 1, 0xFF);\r\n }\r\n else\r\n {\r\n gl.stencilFunc(gl.EQUAL, level + 1, 0xFF);\r\n }\r\n }\r\n else if (this.invertAlpha)\r\n {\r\n gl.stencilFunc(gl.NOTEQUAL, level, 0xFF);\r\n }\r\n else\r\n {\r\n gl.stencilFunc(gl.EQUAL, level, 0xFF);\r\n }\r\n },\r\n\r\n /**\r\n * Flushes all rendered pixels and disables the stencil test of a WebGL context, thus disabling the mask for it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#postRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw flush.\r\n */\r\n postRenderWebGL: function (renderer)\r\n {\r\n var gl = renderer.gl;\r\n\r\n renderer.maskStack.pop();\r\n\r\n renderer.maskCount--;\r\n\r\n if (renderer.maskStack.length === 0)\r\n {\r\n // If this is the only mask in the stack, flush and disable\r\n renderer.flush();\r\n\r\n renderer.currentMask.mask = null;\r\n\r\n gl.disable(gl.STENCIL_TEST);\r\n }\r\n else\r\n {\r\n // Force flush before disabling stencil test\r\n renderer.flush();\r\n\r\n var prev = renderer.maskStack[renderer.maskStack.length - 1];\r\n\r\n prev.mask.applyStencil(renderer, prev.camera, false);\r\n\r\n if (renderer.currentCameraMask.mask !== prev.mask)\r\n {\r\n renderer.currentMask.mask = prev.mask;\r\n renderer.currentMask.camera = prev.camera;\r\n }\r\n else\r\n {\r\n renderer.currentMask.mask = null;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Sets the clipping path of a 2D canvas context to the Geometry Mask's underlying Graphics object.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#preRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance to set the clipping path on.\r\n * @param {Phaser.GameObjects.GameObject} mask - The Game Object being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n */\r\n preRenderCanvas: function (renderer, mask, camera)\r\n {\r\n var geometryMask = this.geometryMask;\r\n\r\n renderer.currentContext.save();\r\n\r\n geometryMask.renderCanvas(renderer, geometryMask, 0, camera, null, null, true);\r\n\r\n renderer.currentContext.clip();\r\n },\r\n\r\n /**\r\n * Restore the canvas context's previous clipping path, thus turning off the mask for it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#postRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance being restored.\r\n */\r\n postRenderCanvas: function (renderer)\r\n {\r\n renderer.currentContext.restore();\r\n },\r\n\r\n /**\r\n * Destroys this GeometryMask and nulls any references it holds.\r\n *\r\n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\r\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.geometryMask = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = GeometryMask;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = require('../renderer/BlendModes');\r\nvar GetAdvancedValue = require('../utils/object/GetAdvancedValue');\r\n\r\n/**\r\n * Builds a Game Object using the provided configuration object.\r\n *\r\n * @function Phaser.GameObjects.BuildGameObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The initial GameObject.\r\n * @param {Phaser.Types.GameObjects.GameObjectConfig} config - The config to build the GameObject with.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The built Game Object.\r\n */\r\nvar BuildGameObject = function (scene, gameObject, config)\r\n{\r\n // Position\r\n\r\n gameObject.x = GetAdvancedValue(config, 'x', 0);\r\n gameObject.y = GetAdvancedValue(config, 'y', 0);\r\n gameObject.depth = GetAdvancedValue(config, 'depth', 0);\r\n\r\n // Flip\r\n\r\n gameObject.flipX = GetAdvancedValue(config, 'flipX', false);\r\n gameObject.flipY = GetAdvancedValue(config, 'flipY', false);\r\n\r\n // Scale\r\n // Either: { scale: 2 } or { scale: { x: 2, y: 2 }}\r\n\r\n var scale = GetAdvancedValue(config, 'scale', null);\r\n\r\n if (typeof scale === 'number')\r\n {\r\n gameObject.setScale(scale);\r\n }\r\n else if (scale !== null)\r\n {\r\n gameObject.scaleX = GetAdvancedValue(scale, 'x', 1);\r\n gameObject.scaleY = GetAdvancedValue(scale, 'y', 1);\r\n }\r\n\r\n // ScrollFactor\r\n // Either: { scrollFactor: 2 } or { scrollFactor: { x: 2, y: 2 }}\r\n\r\n var scrollFactor = GetAdvancedValue(config, 'scrollFactor', null);\r\n\r\n if (typeof scrollFactor === 'number')\r\n {\r\n gameObject.setScrollFactor(scrollFactor);\r\n }\r\n else if (scrollFactor !== null)\r\n {\r\n gameObject.scrollFactorX = GetAdvancedValue(scrollFactor, 'x', 1);\r\n gameObject.scrollFactorY = GetAdvancedValue(scrollFactor, 'y', 1);\r\n }\r\n\r\n // Rotation\r\n\r\n gameObject.rotation = GetAdvancedValue(config, 'rotation', 0);\r\n\r\n var angle = GetAdvancedValue(config, 'angle', null);\r\n\r\n if (angle !== null)\r\n {\r\n gameObject.angle = angle;\r\n }\r\n\r\n // Alpha\r\n\r\n gameObject.alpha = GetAdvancedValue(config, 'alpha', 1);\r\n\r\n // Origin\r\n // Either: { origin: 0.5 } or { origin: { x: 0.5, y: 0.5 }}\r\n\r\n var origin = GetAdvancedValue(config, 'origin', null);\r\n\r\n if (typeof origin === 'number')\r\n {\r\n gameObject.setOrigin(origin);\r\n }\r\n else if (origin !== null)\r\n {\r\n var ox = GetAdvancedValue(origin, 'x', 0.5);\r\n var oy = GetAdvancedValue(origin, 'y', 0.5);\r\n\r\n gameObject.setOrigin(ox, oy);\r\n }\r\n\r\n // BlendMode\r\n\r\n gameObject.blendMode = GetAdvancedValue(config, 'blendMode', BlendModes.NORMAL);\r\n\r\n // Visible\r\n\r\n gameObject.visible = GetAdvancedValue(config, 'visible', true);\r\n\r\n // Add to Scene\r\n\r\n var add = GetAdvancedValue(config, 'add', true);\r\n\r\n if (add)\r\n {\r\n scene.sys.displayList.add(gameObject);\r\n }\r\n\r\n if (gameObject.preUpdate)\r\n {\r\n scene.sys.updateList.add(gameObject);\r\n }\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BuildGameObject;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar ComponentsToJSON = require('./components/ToJSON');\nvar DataManager = require('../data/DataManager');\nvar EventEmitter = require('eventemitter3');\nvar Events = require('./events');\n\n/**\n * @classdesc\n * The base class that all Game Objects extend.\n * You don't create GameObjects directly and they cannot be added to the display list.\n * Instead, use them as the base for your own custom classes.\n *\n * @class GameObject\n * @memberof Phaser.GameObjects\n * @extends Phaser.Events.EventEmitter\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs.\n * @param {string} type - A textual representation of the type of Game Object, i.e. `sprite`.\n */\nvar GameObject = new Class({\n\n Extends: EventEmitter,\n\n initialize:\n\n function GameObject (scene, type)\n {\n EventEmitter.call(this);\n\n /**\n * The Scene to which this Game Object belongs.\n * Game Objects can only belong to one Scene.\n *\n * @name Phaser.GameObjects.GameObject#scene\n * @type {Phaser.Scene}\n * @protected\n * @since 3.0.0\n */\n this.scene = scene;\n\n /**\n * A textual representation of this Game Object, i.e. `sprite`.\n * Used internally by Phaser but is available for your own custom classes to populate.\n *\n * @name Phaser.GameObjects.GameObject#type\n * @type {string}\n * @since 3.0.0\n */\n this.type = type;\n\n /**\n * The current state of this Game Object.\n *\n * Phaser itself will never modify this value, although plugins may do so.\n *\n * Use this property to track the state of a Game Object during its lifetime. For example, it could change from\n * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant\n * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons.\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\n *\n * @name Phaser.GameObjects.GameObject#state\n * @type {(integer|string)}\n * @since 3.16.0\n */\n this.state = 0;\n\n /**\n * The parent Container of this Game Object, if it has one.\n *\n * @name Phaser.GameObjects.GameObject#parentContainer\n * @type {Phaser.GameObjects.Container}\n * @since 3.4.0\n */\n this.parentContainer = null;\n\n /**\n * The name of this Game Object.\n * Empty by default and never populated by Phaser, this is left for developers to use.\n *\n * @name Phaser.GameObjects.GameObject#name\n * @type {string}\n * @default ''\n * @since 3.0.0\n */\n this.name = '';\n\n /**\n * The active state of this Game Object.\n * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it.\n * An active object is one which is having its logic and internal systems updated.\n *\n * @name Phaser.GameObjects.GameObject#active\n * @type {boolean}\n * @default true\n * @since 3.0.0\n */\n this.active = true;\n\n /**\n * The Tab Index of the Game Object.\n * Reserved for future use by plugins and the Input Manager.\n *\n * @name Phaser.GameObjects.GameObject#tabIndex\n * @type {integer}\n * @default -1\n * @since 3.0.0\n */\n this.tabIndex = -1;\n\n /**\n * A Data Manager.\n * It allows you to store, query and get key/value paired information specific to this Game Object.\n * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`.\n *\n * @name Phaser.GameObjects.GameObject#data\n * @type {Phaser.Data.DataManager}\n * @default null\n * @since 3.0.0\n */\n this.data = null;\n\n /**\n * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not.\n * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively.\n * If those components are not used by your custom class then you can use this bitmask as you wish.\n *\n * @name Phaser.GameObjects.GameObject#renderFlags\n * @type {integer}\n * @default 15\n * @since 3.0.0\n */\n this.renderFlags = 15;\n\n /**\n * A bitmask that controls if this Game Object is drawn by a Camera or not.\n * Not usually set directly, instead call `Camera.ignore`, however you can\n * set this property directly using the Camera.id property:\n *\n * @example\n * this.cameraFilter |= camera.id\n *\n * @name Phaser.GameObjects.GameObject#cameraFilter\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.cameraFilter = 0;\n\n /**\n * If this Game Object is enabled for input then this property will contain an InteractiveObject instance.\n * Not usually set directly. Instead call `GameObject.setInteractive()`.\n *\n * @name Phaser.GameObjects.GameObject#input\n * @type {?Phaser.Types.Input.InteractiveObject}\n * @default null\n * @since 3.0.0\n */\n this.input = null;\n\n /**\n * If this Game Object is enabled for Arcade or Matter Physics then this property will contain a reference to a Physics Body.\n *\n * @name Phaser.GameObjects.GameObject#body\n * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|MatterJS.BodyType)}\n * @default null\n * @since 3.0.0\n */\n this.body = null;\n\n /**\n * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`.\n * This includes calls that may come from a Group, Container or the Scene itself.\n * While it allows you to persist a Game Object across Scenes, please understand you are entirely\n * responsible for managing references to and from this Game Object.\n *\n * @name Phaser.GameObjects.GameObject#ignoreDestroy\n * @type {boolean}\n * @default false\n * @since 3.5.0\n */\n this.ignoreDestroy = false;\n\n // Tell the Scene to re-sort the children\n scene.sys.queueDepthSort();\n },\n\n /**\n * Sets the `active` property of this Game Object and returns this Game Object for further chaining.\n * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList.\n *\n * @method Phaser.GameObjects.GameObject#setActive\n * @since 3.0.0\n *\n * @param {boolean} value - True if this Game Object should be set as active, false if not.\n *\n * @return {this} This GameObject.\n */\n setActive: function (value)\n {\n this.active = value;\n\n return this;\n },\n\n /**\n * Sets the `name` property of this Game Object and returns this Game Object for further chaining.\n * The `name` property is not populated by Phaser and is presented for your own use.\n *\n * @method Phaser.GameObjects.GameObject#setName\n * @since 3.0.0\n *\n * @param {string} value - The name to be given to this Game Object.\n *\n * @return {this} This GameObject.\n */\n setName: function (value)\n {\n this.name = value;\n\n return this;\n },\n\n /**\n * Sets the current state of this Game Object.\n *\n * Phaser itself will never modify the State of a Game Object, although plugins may do so.\n *\n * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'.\n * The state value should typically be an integer (ideally mapped to a constant\n * in your game code), but could also be a string. It is recommended to keep it light and simple.\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\n *\n * @method Phaser.GameObjects.GameObject#setState\n * @since 3.16.0\n *\n * @param {(integer|string)} value - The state of the Game Object.\n *\n * @return {this} This GameObject.\n */\n setState: function (value)\n {\n this.state = value;\n\n return this;\n },\n\n /**\n * Adds a Data Manager component to this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#setDataEnabled\n * @since 3.0.0\n * @see Phaser.Data.DataManager\n *\n * @return {this} This GameObject.\n */\n setDataEnabled: function ()\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n return this;\n },\n\n /**\n * Allows you to store a key value pair within this Game Objects Data Manager.\n *\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\n * before setting the value.\n *\n * If the key doesn't already exist in the Data Manager then it is created.\n *\n * ```javascript\n * sprite.setData('name', 'Red Gem Stone');\n * ```\n *\n * You can also pass in an object of key value pairs as the first argument:\n *\n * ```javascript\n * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\n * ```\n *\n * To get a value back again you can call `getData`:\n *\n * ```javascript\n * sprite.getData('gold');\n * ```\n *\n * Or you can access the value directly via the `values` property, where it works like any other variable:\n *\n * ```javascript\n * sprite.data.values.gold += 50;\n * ```\n *\n * When the value is first set, a `setdata` event is emitted from this Game Object.\n *\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\n *\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\n *\n * @method Phaser.GameObjects.GameObject#setData\n * @since 3.0.0\n *\n * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored.\n * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored.\n *\n * @return {this} This GameObject.\n */\n setData: function (key, value)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n this.data.set(key, value);\n\n return this;\n },\n\n /**\n * Increase a value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is increased from 0.\n *\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\n * before setting the value.\n *\n * If the key doesn't already exist in the Data Manager then it is created.\n *\n * When the value is first set, a `setdata` event is emitted from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#incData\n * @since 3.23.0\n *\n * @param {(string|object)} key - The key to increase the value for.\n * @param {*} [data] - The value to increase for the given key.\n *\n * @return {this} This GameObject.\n */\n incData: function (key, value)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n this.data.inc(key, value);\n\n return this;\n },\n\n /**\n * Toggle a boolean value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is toggled from false.\n *\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\n * before setting the value.\n *\n * If the key doesn't already exist in the Data Manager then it is created.\n *\n * When the value is first set, a `setdata` event is emitted from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#toggleData\n * @since 3.23.0\n *\n * @param {(string|object)} key - The key to toggle the value for.\n *\n * @return {this} This GameObject.\n */\n toggleData: function (key)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n this.data.toggle(key);\n\n return this;\n },\n\n /**\n * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist.\n *\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\n *\n * ```javascript\n * sprite.getData('gold');\n * ```\n *\n * Or access the value directly:\n *\n * ```javascript\n * sprite.data.values.gold;\n * ```\n *\n * You can also pass in an array of keys, in which case an array of values will be returned:\n *\n * ```javascript\n * sprite.getData([ 'gold', 'armor', 'health' ]);\n * ```\n *\n * This approach is useful for destructuring arrays in ES6.\n *\n * @method Phaser.GameObjects.GameObject#getData\n * @since 3.0.0\n *\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\n *\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\n */\n getData: function (key)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n return this.data.get(key);\n },\n\n /**\n * Pass this Game Object to the Input Manager to enable it for Input.\n *\n * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area\n * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced\n * input detection.\n *\n * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If\n * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific\n * shape for it to use.\n *\n * You can also provide an Input Configuration Object as the only argument to this method.\n *\n * @example\n * sprite.setInteractive();\n *\n * @example\n * sprite.setInteractive(new Phaser.Geom.Circle(45, 46, 45), Phaser.Geom.Circle.Contains);\n *\n * @example\n * graphics.setInteractive(new Phaser.Geom.Rectangle(0, 0, 128, 128), Phaser.Geom.Rectangle.Contains);\n *\n * @method Phaser.GameObjects.GameObject#setInteractive\n * @since 3.0.0\n *\n * @param {(Phaser.Types.Input.InputConfiguration|any)} [hitArea] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not given it will try to create a Rectangle based on the texture frame.\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The callback that determines if the pointer is within the Hit Area shape or not. If you provide a shape you must also provide a callback.\n * @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target?\n *\n * @return {this} This GameObject.\n */\n setInteractive: function (hitArea, hitAreaCallback, dropZone)\n {\n this.scene.sys.input.enable(this, hitArea, hitAreaCallback, dropZone);\n\n return this;\n },\n\n /**\n * If this Game Object has previously been enabled for input, this will disable it.\n *\n * An object that is disabled for input stops processing or being considered for\n * input events, but can be turned back on again at any time by simply calling\n * `setInteractive()` with no arguments provided.\n *\n * If want to completely remove interaction from this Game Object then use `removeInteractive` instead.\n *\n * @method Phaser.GameObjects.GameObject#disableInteractive\n * @since 3.7.0\n *\n * @return {this} This GameObject.\n */\n disableInteractive: function ()\n {\n if (this.input)\n {\n this.input.enabled = false;\n }\n\n return this;\n },\n\n /**\n * If this Game Object has previously been enabled for input, this will queue it\n * for removal, causing it to no longer be interactive. The removal happens on\n * the next game step, it is not immediate.\n *\n * The Interactive Object that was assigned to this Game Object will be destroyed,\n * removed from the Input Manager and cleared from this Game Object.\n *\n * If you wish to re-enable this Game Object at a later date you will need to\n * re-create its InteractiveObject by calling `setInteractive` again.\n *\n * If you wish to only temporarily stop an object from receiving input then use\n * `disableInteractive` instead, as that toggles the interactive state, where-as\n * this erases it completely.\n *\n * If you wish to resize a hit area, don't remove and then set it as being\n * interactive. Instead, access the hitarea object directly and resize the shape\n * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the\n * shape is a Rectangle, which it is by default.)\n *\n * @method Phaser.GameObjects.GameObject#removeInteractive\n * @since 3.7.0\n *\n * @return {this} This GameObject.\n */\n removeInteractive: function ()\n {\n this.scene.sys.input.clear(this);\n\n this.input = undefined;\n\n return this;\n },\n\n /**\n * This callback is invoked when this Game Object is added to a Scene.\n *\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\n * will use this, such as Sprites, to add themselves into the Update List.\n *\n * You can also listen for the `ADDED_TO_SCENE` event from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#addedToScene\n * @since 3.50.0\n */\n addedToScene: function ()\n {\n },\n\n /**\n * This callback is invoked when this Game Object is removed from a Scene.\n *\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\n * will use this, such as Sprites, to removed themselves from the Update List.\n *\n * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#removedFromScene\n * @since 3.50.0\n */\n removedFromScene: function ()\n {\n },\n\n /**\n * To be overridden by custom GameObjects. Allows base objects to be used in a Pool.\n *\n * @method Phaser.GameObjects.GameObject#update\n * @since 3.0.0\n *\n * @param {...*} [args] - args\n */\n update: function ()\n {\n },\n\n /**\n * Returns a JSON representation of the Game Object.\n *\n * @method Phaser.GameObjects.GameObject#toJSON\n * @since 3.0.0\n *\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\n */\n toJSON: function ()\n {\n return ComponentsToJSON(this);\n },\n\n /**\n * Compares the renderMask with the renderFlags to see if this Game Object will render or not.\n * Also checks the Game Object against the given Cameras exclusion list.\n *\n * @method Phaser.GameObjects.GameObject#willRender\n * @since 3.0.0\n *\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to check against this Game Object.\n *\n * @return {boolean} True if the Game Object should be rendered, otherwise false.\n */\n willRender: function (camera)\n {\n return !(GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id)));\n },\n\n /**\n * Returns an array containing the display list index of either this Game Object, or if it has one,\n * its parent Container. It then iterates up through all of the parent containers until it hits the\n * root of the display list (which is index 0 in the returned array).\n *\n * Used internally by the InputPlugin but also useful if you wish to find out the display depth of\n * this Game Object and all of its ancestors.\n *\n * @method Phaser.GameObjects.GameObject#getIndexList\n * @since 3.4.0\n *\n * @return {integer[]} An array of display list position indexes.\n */\n getIndexList: function ()\n {\n // eslint-disable-next-line consistent-this\n var child = this;\n var parent = this.parentContainer;\n\n var indexes = [];\n\n while (parent)\n {\n // indexes.unshift([parent.getIndex(child), parent.name]);\n indexes.unshift(parent.getIndex(child));\n\n child = parent;\n\n if (!parent.parentContainer)\n {\n break;\n }\n else\n {\n parent = parent.parentContainer;\n }\n }\n\n // indexes.unshift([this.scene.sys.displayList.getIndex(child), 'root']);\n indexes.unshift(this.scene.sys.displayList.getIndex(child));\n\n return indexes;\n },\n\n /**\n * Destroys this Game Object removing it from the Display List and Update List and\n * severing all ties to parent resources.\n *\n * Also removes itself from the Input Manager and Physics Manager if previously enabled.\n *\n * Use this to remove a Game Object from your game if you don't ever plan to use it again.\n * As long as no reference to it exists within your own code it should become free for\n * garbage collection by the browser.\n *\n * If you just want to temporarily disable an object then look at using the\n * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected.\n *\n * @method Phaser.GameObjects.GameObject#destroy\n * @fires Phaser.GameObjects.Events#DESTROY\n * @since 3.0.0\n *\n * @param {boolean} [fromScene=false] - Is this Game Object being destroyed as the result of a Scene shutdown?\n */\n destroy: function (fromScene)\n {\n if (fromScene === undefined) { fromScene = false; }\n\n // This Game Object has already been destroyed\n if (!this.scene || this.ignoreDestroy)\n {\n return;\n }\n\n if (this.preDestroy)\n {\n this.preDestroy.call(this);\n }\n\n this.emit(Events.DESTROY, this);\n\n var sys = this.scene.sys;\n\n if (!fromScene)\n {\n sys.displayList.remove(this);\n }\n\n if (this.input)\n {\n sys.input.clear(this);\n this.input = undefined;\n }\n\n if (this.data)\n {\n this.data.destroy();\n\n this.data = undefined;\n }\n\n if (this.body)\n {\n this.body.destroy();\n this.body = undefined;\n }\n\n // Tell the Scene to re-sort the children\n if (!fromScene)\n {\n sys.queueDepthSort();\n }\n\n this.active = false;\n this.visible = false;\n\n this.scene = undefined;\n\n this.parentContainer = undefined;\n\n this.removeAllListeners();\n }\n\n});\n\n/**\n * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not.\n *\n * @constant {integer} RENDER_MASK\n * @memberof Phaser.GameObjects.GameObject\n * @default\n */\nGameObject.RENDER_MASK = 15;\n\nmodule.exports = GameObject;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../math/Clamp');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 2; // 0010\r\n\r\n/**\r\n * Provides methods used for setting the alpha properties of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Alpha\r\n * @since 3.0.0\r\n */\r\n\r\nvar Alpha = {\r\n\r\n /**\r\n * Private internal value. Holds the global alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alpha\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alpha: 1,\r\n\r\n /**\r\n * Private internal value. Holds the top-left alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaTL\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaTL: 1,\r\n\r\n /**\r\n * Private internal value. Holds the top-right alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaTR\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaTR: 1,\r\n\r\n /**\r\n * Private internal value. Holds the bottom-left alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaBL\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaBL: 1,\r\n\r\n /**\r\n * Private internal value. Holds the bottom-right alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaBR\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaBR: 1,\r\n\r\n /**\r\n * Clears all alpha values associated with this Game Object.\r\n *\r\n * Immediately sets the alpha levels back to 1 (fully opaque).\r\n *\r\n * @method Phaser.GameObjects.Components.Alpha#clearAlpha\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearAlpha: function ()\r\n {\r\n return this.setAlpha(1);\r\n },\r\n\r\n /**\r\n * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * If your game is running under WebGL you can optionally specify four different alpha values, each of which\r\n * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.\r\n *\r\n * @method Phaser.GameObjects.Components.Alpha#setAlpha\r\n * @since 3.0.0\r\n *\r\n * @param {number} [topLeft=1] - The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object.\r\n * @param {number} [topRight] - The alpha value used for the top-right of the Game Object. WebGL only.\r\n * @param {number} [bottomLeft] - The alpha value used for the bottom-left of the Game Object. WebGL only.\r\n * @param {number} [bottomRight] - The alpha value used for the bottom-right of the Game Object. WebGL only.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n if (topLeft === undefined) { topLeft = 1; }\r\n\r\n // Treat as if there is only one alpha value for the whole Game Object\r\n if (topRight === undefined)\r\n {\r\n this.alpha = topLeft;\r\n }\r\n else\r\n {\r\n this._alphaTL = Clamp(topLeft, 0, 1);\r\n this._alphaTR = Clamp(topRight, 0, 1);\r\n this._alphaBL = Clamp(bottomLeft, 0, 1);\r\n this._alphaBR = Clamp(bottomRight, 0, 1);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Game Object.\r\n *\r\n * This is a global value, impacting the entire Game Object, not just a region of it.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this._alpha;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alpha = v;\r\n this._alphaTL = v;\r\n this._alphaTR = v;\r\n this._alphaBL = v;\r\n this._alphaBR = v;\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the top-left of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaTopLeft\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaTopLeft: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaTL;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaTL = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the top-right of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaTopRight\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaTopRight: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaTR;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaTR = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the bottom-left of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomLeft\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaBottomLeft: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaBL;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaBL = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the bottom-right of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomRight\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaBottomRight: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaBR;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaBR = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Alpha;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('../../math/Clamp');\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 2; // 0010\r\n\r\n/**\r\n * Provides methods used for setting the alpha property of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.AlphaSingle\r\n * @since 3.22.0\r\n */\r\n\r\nvar AlphaSingle = {\r\n\r\n /**\r\n * Private internal value. Holds the global alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.AlphaSingle#_alpha\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alpha: 1,\r\n\r\n /**\r\n * Clears all alpha values associated with this Game Object.\r\n *\r\n * Immediately sets the alpha levels back to 1 (fully opaque).\r\n *\r\n * @method Phaser.GameObjects.Components.AlphaSingle#clearAlpha\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearAlpha: function ()\r\n {\r\n return this.setAlpha(1);\r\n },\r\n\r\n /**\r\n * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * @method Phaser.GameObjects.Components.AlphaSingle#setAlpha\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=1] - The alpha value applied across the whole Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (value)\r\n {\r\n if (value === undefined) { value = 1; }\r\n\r\n this.alpha = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Game Object.\r\n *\r\n * This is a global value, impacting the entire Game Object, not just a region of it.\r\n *\r\n * @name Phaser.GameObjects.Components.AlphaSingle#alpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this._alpha;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alpha = v;\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = AlphaSingle;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BaseAnimation = require('../../animations/Animation');\r\nvar Class = require('../../utils/Class');\r\nvar Events = require('../../animations/events');\r\n\r\n/**\r\n * @classdesc\r\n * A Game Object Animation Controller.\r\n *\r\n * This controller lives as an instance within a Game Object, accessible as `sprite.anims`.\r\n *\r\n * @class Animation\r\n * @memberof Phaser.GameObjects.Components\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} parent - The Game Object to which this animation controller belongs.\r\n */\r\nvar Animation = new Class({\r\n\r\n initialize:\r\n\r\n function Animation (parent)\r\n {\r\n /**\r\n * The Game Object to which this animation controller belongs.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#parent\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.0.0\r\n */\r\n this.parent = parent;\r\n\r\n /**\r\n * A reference to the global Animation Manager.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#animationManager\r\n * @type {Phaser.Animations.AnimationManager}\r\n * @since 3.0.0\r\n */\r\n this.animationManager = parent.scene.sys.anims;\r\n\r\n this.animationManager.once(Events.REMOVE_ANIMATION, this.remove, this);\r\n\r\n /**\r\n * Is an animation currently playing or not?\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#isPlaying\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.isPlaying = false;\r\n\r\n /**\r\n * The current Animation loaded into this Animation Controller.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#currentAnim\r\n * @type {?Phaser.Animations.Animation}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.currentAnim = null;\r\n\r\n /**\r\n * The current AnimationFrame being displayed by this Animation Controller.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#currentFrame\r\n * @type {?Phaser.Animations.AnimationFrame}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.currentFrame = null;\r\n\r\n /**\r\n * The key of the next Animation to be loaded into this Animation Controller when the current animation completes.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#nextAnim\r\n * @type {?string}\r\n * @default null\r\n * @since 3.16.0\r\n */\r\n this.nextAnim = null;\r\n\r\n /**\r\n * A queue of keys of the next Animations to be loaded into this Animation Controller when the current animation completes.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#nextAnimsQueue\r\n * @type {string[]}\r\n * @since 3.24.0\r\n */\r\n this.nextAnimsQueue = [];\r\n\r\n /**\r\n * Time scale factor.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_timeScale\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this._timeScale = 1;\r\n\r\n /**\r\n * The frame rate of playback in frames per second.\r\n * The default is 24 if the `duration` property is `null`.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#frameRate\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.frameRate = 0;\r\n\r\n /**\r\n * How long the animation should play for, in milliseconds.\r\n * If the `frameRate` property has been set then it overrides this value,\r\n * otherwise the `frameRate` is derived from `duration`.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#duration\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.duration = 0;\r\n\r\n /**\r\n * ms per frame, not including frame specific modifiers that may be present in the Animation data.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#msPerFrame\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.msPerFrame = 0;\r\n\r\n /**\r\n * Skip frames if the time lags, or always advanced anyway?\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#skipMissedFrames\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.skipMissedFrames = true;\r\n\r\n /**\r\n * A delay before starting playback, in milliseconds.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_delay\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._delay = 0;\r\n\r\n /**\r\n * Number of times to repeat the animation (-1 for infinity)\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_repeat\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._repeat = 0;\r\n\r\n /**\r\n * Delay before the repeat starts, in milliseconds.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_repeatDelay\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._repeatDelay = 0;\r\n\r\n /**\r\n * Should the animation yoyo? (reverse back down to the start) before repeating?\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_yoyo\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._yoyo = false;\r\n\r\n /**\r\n * Will the playhead move forwards (`true`) or in reverse (`false`).\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#forward\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.forward = true;\r\n\r\n /**\r\n * An Internal trigger that's play the animation in reverse mode ('true') or not ('false'),\r\n * needed because forward can be changed by yoyo feature.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_reverse\r\n * @type {boolean}\r\n * @default false\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._reverse = false;\r\n\r\n /**\r\n * Internal time overflow accumulator.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#accumulator\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.accumulator = 0;\r\n\r\n /**\r\n * The time point at which the next animation frame will change.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#nextTick\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.nextTick = 0;\r\n\r\n /**\r\n * An internal counter keeping track of how many repeats are left to play.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#repeatCounter\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.repeatCounter = 0;\r\n\r\n /**\r\n * An internal flag keeping track of pending repeats.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#pendingRepeat\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.pendingRepeat = false;\r\n\r\n /**\r\n * Is the Animation paused?\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_paused\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._paused = false;\r\n\r\n /**\r\n * Was the animation previously playing before being paused?\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_wasPlaying\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._wasPlaying = false;\r\n\r\n /**\r\n * Internal property tracking if this Animation is waiting to stop.\r\n *\r\n * 0 = No\r\n * 1 = Waiting for ms to pass\r\n * 2 = Waiting for repeat\r\n * 3 = Waiting for specific frame\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_pendingStop\r\n * @type {integer}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._pendingStop = 0;\r\n\r\n /**\r\n * Internal property used by _pendingStop.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_pendingStopValue\r\n * @type {any}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._pendingStopValue;\r\n },\r\n\r\n /**\r\n * Sets an animation to be played immediately after the current one completes.\r\n *\r\n * The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc, or have the `stop` method called directly on it.\r\n *\r\n * An animation set to repeat forever will never enter a completed state.\r\n *\r\n * You can chain a new animation at any point, including before the current one starts playing, during it, or when it ends (via its `animationcomplete` callback).\r\n * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained animations without impacting the global animation they're playing.\r\n *\r\n * Call this method with no arguments to reset the chained animation.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#chain\r\n * @since 3.16.0\r\n *\r\n * @param {(string|Phaser.Animations.Animation)} [key] - The string-based key of the animation to play next, as defined previously in the Animation Manager. Or an Animation instance.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n chain: function (key)\r\n {\r\n if (key instanceof BaseAnimation)\r\n {\r\n key = key.key;\r\n }\r\n\r\n if (this.nextAnim === null)\r\n {\r\n this.nextAnim = key;\r\n }\r\n else\r\n {\r\n this.nextAnimsQueue.push(key);\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Sets the amount of time, in milliseconds, that the animation will be delayed before starting playback.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setDelay\r\n * @since 3.4.0\r\n *\r\n * @param {integer} [value=0] - The amount of time, in milliseconds, to wait before starting playback.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n setDelay: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this._delay = value;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Gets the amount of time, in milliseconds that the animation will be delayed before starting playback.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getDelay\r\n * @since 3.4.0\r\n *\r\n * @return {integer} The amount of time, in milliseconds, the Animation will wait before starting playback.\r\n */\r\n getDelay: function ()\r\n {\r\n return this._delay;\r\n },\r\n\r\n /**\r\n * Waits for the specified delay, in milliseconds, then starts playback of the requested animation.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#delayedPlay\r\n * @since 3.0.0\r\n *\r\n * @param {integer} delay - The delay, in milliseconds, to wait before starting the animation playing.\r\n * @param {string} key - The key of the animation to play.\r\n * @param {integer} [startFrame=0] - The frame of the animation to start from.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n delayedPlay: function (delay, key, startFrame)\r\n {\r\n this.play(key, true, startFrame);\r\n\r\n this.nextTick += delay;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Returns the key of the animation currently loaded into this component.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getCurrentKey\r\n * @since 3.0.0\r\n *\r\n * @return {string} The key of the Animation loaded into this component.\r\n */\r\n getCurrentKey: function ()\r\n {\r\n if (this.currentAnim)\r\n {\r\n return this.currentAnim.key;\r\n }\r\n },\r\n\r\n /**\r\n * Internal method used to load an animation into this component.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#load\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the animation to load.\r\n * @param {integer} [startFrame=0] - The start frame of the animation to load.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n load: function (key, startFrame)\r\n {\r\n if (startFrame === undefined) { startFrame = 0; }\r\n\r\n if (this.isPlaying)\r\n {\r\n this.stop();\r\n }\r\n\r\n // Load the new animation in\r\n this.animationManager.load(this, key, startFrame);\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Pause the current animation and set the `isPlaying` property to `false`.\r\n * You can optionally pause it at a specific frame.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#pause\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} [atFrame] - An optional frame to set after pausing the animation.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n pause: function (atFrame)\r\n {\r\n if (!this._paused)\r\n {\r\n this._paused = true;\r\n this._wasPlaying = this.isPlaying;\r\n this.isPlaying = false;\r\n }\r\n\r\n if (atFrame !== undefined)\r\n {\r\n this.updateFrame(atFrame);\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Resumes playback of a paused animation and sets the `isPlaying` property to `true`.\r\n * You can optionally tell it to start playback from a specific frame.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#resume\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} [fromFrame] - An optional frame to set before restarting playback.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n resume: function (fromFrame)\r\n {\r\n if (this._paused)\r\n {\r\n this._paused = false;\r\n this.isPlaying = this._wasPlaying;\r\n }\r\n\r\n if (fromFrame !== undefined)\r\n {\r\n this.updateFrame(fromFrame);\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * `true` if the current animation is paused, otherwise `false`.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#isPaused\r\n * @readonly\r\n * @type {boolean}\r\n * @since 3.4.0\r\n */\r\n isPaused: {\r\n\r\n get: function ()\r\n {\r\n return this._paused;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Plays an Animation on a Game Object that has the Animation component, such as a Sprite.\r\n *\r\n * Animations are stored in the global Animation Manager and are referenced by a unique string-based key.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#play\r\n * @fires Phaser.GameObjects.Components.Animation#onStartEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance.\r\n * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call.\r\n * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n play: function (key, ignoreIfPlaying, startFrame)\r\n {\r\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\r\n if (startFrame === undefined) { startFrame = 0; }\r\n\r\n if (key instanceof BaseAnimation)\r\n {\r\n key = key.key;\r\n }\r\n\r\n if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key)\r\n {\r\n return this.parent;\r\n }\r\n\r\n this.forward = true;\r\n this._reverse = false;\r\n this._paused = false;\r\n this._wasPlaying = true;\r\n\r\n return this._startAnimation(key, startFrame);\r\n },\r\n\r\n /**\r\n * Plays an Animation (in reverse mode) on the Game Object that owns this Animation Component.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#playReverse\r\n * @fires Phaser.GameObjects.Components.Animation#onStartEvent\r\n * @since 3.12.0\r\n *\r\n * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance.\r\n * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call.\r\n * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n playReverse: function (key, ignoreIfPlaying, startFrame)\r\n {\r\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\r\n if (startFrame === undefined) { startFrame = 0; }\r\n\r\n if (key instanceof BaseAnimation)\r\n {\r\n key = key.key;\r\n }\r\n\r\n if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key)\r\n {\r\n return this.parent;\r\n }\r\n\r\n this.forward = false;\r\n this._reverse = true;\r\n\r\n return this._startAnimation(key, startFrame);\r\n },\r\n\r\n /**\r\n * Load an Animation and fires 'onStartEvent' event, extracted from 'play' method.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#_startAnimation\r\n * @fires Phaser.Animations.Events#ANIMATION_START\r\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START\r\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START\r\n * @since 3.12.0\r\n *\r\n * @param {string} key - The string-based key of the animation to play, as defined previously in the Animation Manager.\r\n * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n _startAnimation: function (key, startFrame)\r\n {\r\n this.load(key, startFrame);\r\n\r\n var anim = this.currentAnim;\r\n var gameObject = this.parent;\r\n\r\n if (!anim)\r\n {\r\n return gameObject;\r\n }\r\n\r\n // Should give us 9,007,199,254,740,991 safe repeats\r\n this.repeatCounter = (this._repeat === -1) ? Number.MAX_VALUE : this._repeat;\r\n\r\n anim.getFirstTick(this);\r\n\r\n this.isPlaying = true;\r\n this.pendingRepeat = false;\r\n\r\n if (anim.showOnStart)\r\n {\r\n gameObject.visible = true;\r\n }\r\n\r\n var frame = this.currentFrame;\r\n\r\n anim.emit(Events.ANIMATION_START, anim, frame, gameObject);\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_START + key, anim, frame, gameObject);\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_START, anim, frame, gameObject);\r\n\r\n return gameObject;\r\n },\r\n\r\n /**\r\n * Reverse the Animation that is already playing on the Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#reverse\r\n * @since 3.12.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n reverse: function ()\r\n {\r\n if (this.isPlaying)\r\n {\r\n this._reverse = !this._reverse;\r\n\r\n this.forward = !this.forward;\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Returns a value between 0 and 1 indicating how far this animation is through, ignoring repeats and yoyos.\r\n * If the animation has a non-zero repeat defined, `getProgress` and `getTotalProgress` will be different\r\n * because `getProgress` doesn't include any repeats or repeat delays, whereas `getTotalProgress` does.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getProgress\r\n * @since 3.4.0\r\n *\r\n * @return {number} The progress of the current animation, between 0 and 1.\r\n */\r\n getProgress: function ()\r\n {\r\n var p = this.currentFrame.progress;\r\n\r\n if (!this.forward)\r\n {\r\n p = 1 - p;\r\n }\r\n\r\n return p;\r\n },\r\n\r\n /**\r\n * Takes a value between 0 and 1 and uses it to set how far this animation is through playback.\r\n * Does not factor in repeats or yoyos, but does handle playing forwards or backwards.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setProgress\r\n * @since 3.4.0\r\n *\r\n * @param {number} [value=0] - The progress value, between 0 and 1.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n setProgress: function (value)\r\n {\r\n if (!this.forward)\r\n {\r\n value = 1 - value;\r\n }\r\n\r\n this.setCurrentFrame(this.currentAnim.getFrameByProgress(value));\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Handle the removal of an animation from the Animation Manager.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#remove\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The key of the removed Animation.\r\n * @param {Phaser.Animations.Animation} [animation] - The removed Animation.\r\n */\r\n remove: function (key, animation)\r\n {\r\n if (animation === undefined) { animation = this.currentAnim; }\r\n\r\n if (this.isPlaying && animation.key === this.currentAnim.key)\r\n {\r\n this.stop();\r\n\r\n this.setCurrentFrame(this.currentAnim.frames[0]);\r\n }\r\n },\r\n\r\n /**\r\n * Gets the number of times that the animation will repeat\r\n * after its first iteration. For example, if returns 1, the animation will\r\n * play a total of twice (the initial play plus 1 repeat).\r\n * A value of -1 means the animation will repeat indefinitely.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getRepeat\r\n * @since 3.4.0\r\n *\r\n * @return {integer} The number of times that the animation will repeat.\r\n */\r\n getRepeat: function ()\r\n {\r\n return this._repeat;\r\n },\r\n\r\n /**\r\n * Sets the number of times that the animation should repeat\r\n * after its first iteration. For example, if repeat is 1, the animation will\r\n * play a total of twice (the initial play plus 1 repeat).\r\n * To repeat indefinitely, use -1. repeat should always be an integer.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setRepeat\r\n * @since 3.4.0\r\n *\r\n * @param {integer} value - The number of times that the animation should repeat.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n setRepeat: function (value)\r\n {\r\n this._repeat = value;\r\n\r\n this.repeatCounter = (value === -1) ? Number.MAX_VALUE : value;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Gets the amount of delay between repeats, if any.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getRepeatDelay\r\n * @since 3.4.0\r\n *\r\n * @return {number} The delay between repeats.\r\n */\r\n getRepeatDelay: function ()\r\n {\r\n return this._repeatDelay;\r\n },\r\n\r\n /**\r\n * Sets the amount of time in seconds between repeats.\r\n * For example, if `repeat` is 2 and `repeatDelay` is 10, the animation will play initially,\r\n * then wait for 10 seconds before repeating, then play again, then wait another 10 seconds\r\n * before doing its final repeat.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setRepeatDelay\r\n * @since 3.4.0\r\n *\r\n * @param {number} value - The delay to wait between repeats, in seconds.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n setRepeatDelay: function (value)\r\n {\r\n this._repeatDelay = value;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Restarts the current animation from its beginning, optionally including its delay value.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#restart\r\n * @fires Phaser.Animations.Events#ANIMATION_RESTART\r\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_RESTART\r\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [includeDelay=false] - Whether to include the delay value of the animation when restarting.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n restart: function (includeDelay)\r\n {\r\n if (includeDelay === undefined) { includeDelay = false; }\r\n\r\n var anim = this.currentAnim;\r\n\r\n anim.getFirstTick(this, includeDelay);\r\n\r\n this.forward = true;\r\n this.isPlaying = true;\r\n this.pendingRepeat = false;\r\n this._paused = false;\r\n\r\n // Set frame\r\n this.updateFrame(anim.frames[0]);\r\n\r\n var gameObject = this.parent;\r\n var frame = this.currentFrame;\r\n\r\n anim.emit(Events.ANIMATION_RESTART, anim, frame, gameObject);\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_RESTART + anim.key, anim, frame, gameObject);\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_RESTART, anim, frame, gameObject);\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Immediately stops the current animation from playing and dispatches the `animationcomplete` event.\r\n *\r\n * If no animation is set, no event will be dispatched.\r\n *\r\n * If there is another animation queued (via the `chain` method) then it will start playing immediately.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#stop\r\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n stop: function ()\r\n {\r\n this._pendingStop = 0;\r\n\r\n this.isPlaying = false;\r\n\r\n var gameObject = this.parent;\r\n var anim = this.currentAnim;\r\n var frame = this.currentFrame;\r\n\r\n if (anim)\r\n {\r\n anim.emit(Events.ANIMATION_COMPLETE, anim, frame, gameObject);\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_COMPLETE + anim.key, anim, frame, gameObject);\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_COMPLETE, anim, frame, gameObject);\r\n }\r\n\r\n if (this.nextAnim)\r\n {\r\n var key = this.nextAnim;\r\n\r\n this.nextAnim = (this.nextAnimsQueue.length > 0) ? this.nextAnimsQueue.shift() : null;\r\n\r\n this.play(key);\r\n }\r\n\r\n return gameObject;\r\n },\r\n\r\n /**\r\n * Stops the current animation from playing after the specified time delay, given in milliseconds.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#stopAfterDelay\r\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\r\n * @since 3.4.0\r\n *\r\n * @param {integer} delay - The number of milliseconds to wait before stopping this animation.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n stopAfterDelay: function (delay)\r\n {\r\n this._pendingStop = 1;\r\n this._pendingStopValue = delay;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Stops the current animation from playing when it next repeats.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#stopOnRepeat\r\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\r\n * @since 3.4.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n stopOnRepeat: function ()\r\n {\r\n this._pendingStop = 2;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Stops the current animation from playing when it next sets the given frame.\r\n * If this frame doesn't exist within the animation it will not stop it from playing.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#stopOnFrame\r\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} frame - The frame to check before stopping this animation.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n stopOnFrame: function (frame)\r\n {\r\n this._pendingStop = 3;\r\n this._pendingStopValue = frame;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Sets the Time Scale factor, allowing you to make the animation go go faster or slower than default.\r\n * Where 1 = normal speed (the default), 0.5 = half speed, 2 = double speed, etc.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setTimeScale\r\n * @since 3.4.0\r\n *\r\n * @param {number} [value=1] - The time scale factor, where 1 is no change, 0.5 is half speed, etc.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n setTimeScale: function (value)\r\n {\r\n if (value === undefined) { value = 1; }\r\n\r\n this._timeScale = value;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Gets the Time Scale factor.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getTimeScale\r\n * @since 3.4.0\r\n *\r\n * @return {number} The Time Scale value.\r\n */\r\n getTimeScale: function ()\r\n {\r\n return this._timeScale;\r\n },\r\n\r\n /**\r\n * Returns the total number of frames in this animation.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getTotalFrames\r\n * @since 3.4.0\r\n *\r\n * @return {integer} The total number of frames in this animation.\r\n */\r\n getTotalFrames: function ()\r\n {\r\n return this.currentAnim.frames.length;\r\n },\r\n\r\n /**\r\n * The internal update loop for the Animation Component.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current timestamp.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (!this.currentAnim || !this.isPlaying || this.currentAnim.paused)\r\n {\r\n return;\r\n }\r\n\r\n this.accumulator += delta * this._timeScale;\r\n\r\n if (this._pendingStop === 1)\r\n {\r\n this._pendingStopValue -= delta;\r\n\r\n if (this._pendingStopValue <= 0)\r\n {\r\n return this.currentAnim.completeAnimation(this);\r\n }\r\n }\r\n\r\n if (this.accumulator >= this.nextTick)\r\n {\r\n this.currentAnim.setFrame(this);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the given Animation Frame as being the current frame\r\n * and applies it to the parent Game Object, adjusting its size and origin as needed.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setCurrentFrame\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} animationFrame - The Animation Frame to set as being current.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\r\n */\r\n setCurrentFrame: function (animationFrame)\r\n {\r\n var gameObject = this.parent;\r\n\r\n this.currentFrame = animationFrame;\r\n\r\n gameObject.texture = animationFrame.frame.texture;\r\n gameObject.frame = animationFrame.frame;\r\n\r\n if (gameObject.isCropped)\r\n {\r\n gameObject.frame.updateCropUVs(gameObject._crop, gameObject.flipX, gameObject.flipY);\r\n }\r\n\r\n gameObject.setSizeToFrame();\r\n\r\n if (gameObject._originComponent)\r\n {\r\n if (animationFrame.frame.customPivot)\r\n {\r\n gameObject.setOrigin(animationFrame.frame.pivotX, animationFrame.frame.pivotY);\r\n }\r\n else\r\n {\r\n gameObject.updateDisplayOrigin();\r\n }\r\n }\r\n\r\n return gameObject;\r\n },\r\n\r\n /**\r\n * Internal frame change handler.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#updateFrame\r\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE\r\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} animationFrame - The animation frame to change to.\r\n */\r\n updateFrame: function (animationFrame)\r\n {\r\n var gameObject = this.setCurrentFrame(animationFrame);\r\n\r\n if (this.isPlaying)\r\n {\r\n if (animationFrame.setAlpha)\r\n {\r\n gameObject.alpha = animationFrame.alpha;\r\n }\r\n\r\n var anim = this.currentAnim;\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_UPDATE + anim.key, anim, animationFrame, gameObject);\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_UPDATE, anim, animationFrame, gameObject);\r\n\r\n if (this._pendingStop === 3 && this._pendingStopValue === animationFrame)\r\n {\r\n this.currentAnim.completeAnimation(this);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Advances the animation to the next frame, regardless of the time or animation state.\r\n * If the animation is set to repeat, or yoyo, this will still take effect.\r\n *\r\n * Calling this does not change the direction of the animation. I.e. if it was currently\r\n * playing in reverse, calling this method doesn't then change the direction to forwards.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#nextFrame\r\n * @since 3.16.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\r\n */\r\n nextFrame: function ()\r\n {\r\n if (this.currentAnim)\r\n {\r\n this.currentAnim.nextFrame(this);\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Advances the animation to the previous frame, regardless of the time or animation state.\r\n * If the animation is set to repeat, or yoyo, this will still take effect.\r\n *\r\n * Calling this does not change the direction of the animation. I.e. if it was currently\r\n * playing in forwards, calling this method doesn't then change the direction to backwards.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#previousFrame\r\n * @since 3.16.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\r\n */\r\n previousFrame: function ()\r\n {\r\n if (this.currentAnim)\r\n {\r\n this.currentAnim.previousFrame(this);\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Sets if the current Animation will yoyo when it reaches the end.\r\n * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setYoyo\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [value=false] - `true` if the animation should yoyo, `false` to not.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\r\n */\r\n setYoyo: function (value)\r\n {\r\n if (value === undefined) { value = false; }\r\n\r\n this._yoyo = value;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Gets if the current Animation will yoyo when it reaches the end.\r\n * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getYoyo\r\n * @since 3.4.0\r\n *\r\n * @return {boolean} `true` if the animation is set to yoyo, `false` if not.\r\n */\r\n getYoyo: function ()\r\n {\r\n return this._yoyo;\r\n },\r\n\r\n /**\r\n * Destroy this Animation component.\r\n *\r\n * Unregisters event listeners and cleans up its references.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.animationManager.off(Events.REMOVE_ANIMATION, this.remove, this);\r\n\r\n this.animationManager = null;\r\n this.parent = null;\r\n this.nextAnimsQueue.length = 0;\r\n\r\n this.currentAnim = null;\r\n this.currentFrame = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Animation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = require('../../renderer/BlendModes');\r\n\r\n/**\r\n * Provides methods used for setting the blend mode of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.BlendMode\r\n * @since 3.0.0\r\n */\r\n\r\nvar BlendMode = {\r\n\r\n /**\r\n * Private internal value. Holds the current blend mode.\r\n * \r\n * @name Phaser.GameObjects.Components.BlendMode#_blendMode\r\n * @type {integer}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _blendMode: BlendModes.NORMAL,\r\n\r\n /**\r\n * Sets the Blend Mode being used by this Game Object.\r\n *\r\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\r\n *\r\n * Under WebGL only the following Blend Modes are available:\r\n *\r\n * * ADD\r\n * * MULTIPLY\r\n * * SCREEN\r\n * * ERASE\r\n *\r\n * Canvas has more available depending on browser support.\r\n *\r\n * You can also create your own custom Blend Modes in WebGL.\r\n *\r\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\r\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\r\n * reasons try to be careful about the construction of your Scene and the frequency of which blend modes\r\n * are used.\r\n *\r\n * @name Phaser.GameObjects.Components.BlendMode#blendMode\r\n * @type {(Phaser.BlendModes|string)}\r\n * @since 3.0.0\r\n */\r\n blendMode: {\r\n\r\n get: function ()\r\n {\r\n return this._blendMode;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (typeof value === 'string')\r\n {\r\n value = BlendModes[value];\r\n }\r\n\r\n value |= 0;\r\n\r\n if (value >= -1)\r\n {\r\n this._blendMode = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the Blend Mode being used by this Game Object.\r\n *\r\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\r\n *\r\n * Under WebGL only the following Blend Modes are available:\r\n *\r\n * * ADD\r\n * * MULTIPLY\r\n * * SCREEN\r\n * * ERASE (only works when rendering to a framebuffer, like a Render Texture)\r\n *\r\n * Canvas has more available depending on browser support.\r\n *\r\n * You can also create your own custom Blend Modes in WebGL.\r\n *\r\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\r\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\r\n * reasons try to be careful about the construction of your Scene and the frequency in which blend modes\r\n * are used.\r\n *\r\n * @method Phaser.GameObjects.Components.BlendMode#setBlendMode\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.BlendModes)} value - The BlendMode value. Either a string or a CONST.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setBlendMode: function (value)\r\n {\r\n this.blendMode = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = BlendMode;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for calculating and setting the size of a non-Frame based Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.ComputedSize\r\n * @since 3.0.0\r\n */\r\n\r\nvar ComputedSize = {\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n * \r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayWidth` property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n width: 0,\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n * \r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayHeight` property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n height: 0,\r\n\r\n /**\r\n * The displayed width of this Game Object.\r\n * \r\n * This value takes into account the scale factor.\r\n * \r\n * Setting this value will adjust the Game Object's scale property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#displayWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleX * this.width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleX = value / this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of this Game Object.\r\n * \r\n * This value takes into account the scale factor.\r\n * \r\n * Setting this value will adjust the Game Object's scale property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#displayHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleY * this.height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleY = value / this.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\r\n * \r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n * \r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n * \r\n * @method Phaser.GameObjects.Components.ComputedSize#setSize\r\n * @since 3.4.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the display size of this Game Object.\r\n * \r\n * Calling this will adjust the scale.\r\n * \r\n * @method Phaser.GameObjects.Components.ComputedSize#setDisplaySize\r\n * @since 3.4.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplaySize: function (width, height)\r\n {\r\n this.displayWidth = width;\r\n this.displayHeight = height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = ComputedSize;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Crop\r\n * @since 3.12.0\r\n */\r\n\r\nvar Crop = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * A boolean flag indicating if this Game Object is being cropped or not.\r\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\r\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#isCropped\r\n * @type {boolean}\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\r\n * \r\n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\r\n * \r\n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\r\n * changes what is shown when rendered.\r\n * \r\n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\r\n * \r\n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\r\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\r\n * \r\n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\r\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\r\n * \r\n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\r\n * \r\n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\r\n * \r\n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\r\n * the renderer to skip several internal calculations.\r\n *\r\n * @method Phaser.GameObjects.Components.Crop#setCrop\r\n * @since 3.11.0\r\n *\r\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\r\n * @param {number} [y] - The y coordinate to start the crop from.\r\n * @param {number} [width] - The width of the crop rectangle in pixels.\r\n * @param {number} [height] - The height of the crop rectangle in pixels.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setCrop: function (x, y, width, height)\r\n {\r\n if (x === undefined)\r\n {\r\n this.isCropped = false;\r\n }\r\n else if (this.frame)\r\n {\r\n if (typeof x === 'number')\r\n {\r\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\r\n }\r\n else\r\n {\r\n var rect = x;\r\n\r\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\r\n }\r\n\r\n this.isCropped = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Crop#resetCropObject\r\n * @private\r\n * @since 3.12.0\r\n * \r\n * @return {object} The crop object.\r\n */\r\n resetCropObject: function ()\r\n {\r\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Crop;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for setting the depth of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Depth\r\n * @since 3.0.0\r\n */\r\n\r\nvar Depth = {\r\n\r\n /**\r\n * Private internal value. Holds the depth of the Game Object.\r\n * \r\n * @name Phaser.GameObjects.Components.Depth#_depth\r\n * @type {integer}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _depth: 0,\r\n\r\n /**\r\n * The depth of this Game Object within the Scene.\r\n * \r\n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\r\n * of Game Objects, without actually moving their position in the display list.\r\n *\r\n * The default depth is zero. A Game Object with a higher depth\r\n * value will always render in front of one with a lower value.\r\n *\r\n * Setting the depth will queue a depth sort event within the Scene.\r\n * \r\n * @name Phaser.GameObjects.Components.Depth#depth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n depth: {\r\n\r\n get: function ()\r\n {\r\n return this._depth;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scene.sys.queueDepthSort();\r\n this._depth = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The depth of this Game Object within the Scene.\r\n * \r\n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\r\n * of Game Objects, without actually moving their position in the display list.\r\n *\r\n * The default depth is zero. A Game Object with a higher depth\r\n * value will always render in front of one with a lower value.\r\n *\r\n * Setting the depth will queue a depth sort event within the Scene.\r\n * \r\n * @method Phaser.GameObjects.Components.Depth#setDepth\r\n * @since 3.0.0\r\n *\r\n * @param {integer} value - The depth of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setDepth: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.depth = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Depth;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for visually flipping a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Flip\r\n * @since 3.0.0\r\n */\r\n\r\nvar Flip = {\r\n\r\n /**\r\n * The horizontally flipped state of the Game Object.\r\n * \r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @name Phaser.GameObjects.Components.Flip#flipX\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n flipX: false,\r\n\r\n /**\r\n * The vertically flipped state of the Game Object.\r\n * \r\n * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down)\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @name Phaser.GameObjects.Components.Flip#flipY\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n flipY: false,\r\n\r\n /**\r\n * Toggles the horizontal flipped state of this Game Object.\r\n * \r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#toggleFlipX\r\n * @since 3.0.0\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n toggleFlipX: function ()\r\n {\r\n this.flipX = !this.flipX;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggles the vertical flipped state of this Game Object.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#toggleFlipY\r\n * @since 3.0.0\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n toggleFlipY: function ()\r\n {\r\n this.flipY = !this.flipY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal flipped state of this Game Object.\r\n * \r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#setFlipX\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setFlipX: function (value)\r\n {\r\n this.flipX = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical flipped state of this Game Object.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#setFlipY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setFlipY: function (value)\r\n {\r\n this.flipY = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal and vertical flipped state of this Game Object.\r\n * \r\n * A Game Object that is flipped will render inversed on the flipped axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#setFlip\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setFlip: function (x, y)\r\n {\r\n this.flipX = x;\r\n this.flipY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#resetFlip\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n resetFlip: function ()\r\n {\r\n this.flipX = false;\r\n this.flipY = false;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Flip;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = require('../../geom/rectangle/Rectangle');\r\nvar RotateAround = require('../../math/RotateAround');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * Provides methods used for obtaining the bounds of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.GetBounds\r\n * @since 3.0.0\r\n */\r\n\r\nvar GetBounds = {\r\n\r\n /**\r\n * Processes the bounds output vector before returning it.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#prepareBoundsOutput\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} output - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n prepareBoundsOutput: function (output, includeParent)\r\n {\r\n if (includeParent === undefined) { includeParent = false; }\r\n\r\n if (this.rotation !== 0)\r\n {\r\n RotateAround(output, this.x, this.y, this.rotation);\r\n }\r\n\r\n if (includeParent && this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Gets the center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getCenter: function (output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX) + (this.displayWidth / 2);\r\n output.y = this.y - (this.displayHeight * this.originY) + (this.displayHeight / 2);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Gets the top-left corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getTopLeft: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the top-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getTopCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the top-right corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getTopRight: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the left-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getLeftCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getLeftCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the right-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getRightCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getRightCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getBottomLeft: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getBottomCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getBottomRight: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bounds of this Game Object, regardless of origin.\r\n * The values are stored and returned in a Rectangle, or Rectangle-like, object.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBounds\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [output,$return]\r\n *\r\n * @param {(Phaser.Geom.Rectangle|object)} [output] - An object to store the values in. If not provided a new Rectangle will be created.\r\n *\r\n * @return {(Phaser.Geom.Rectangle|object)} The values stored in the output object.\r\n */\r\n getBounds: function (output)\r\n {\r\n if (output === undefined) { output = new Rectangle(); }\r\n\r\n // We can use the output object to temporarily store the x/y coords in:\r\n\r\n var TLx, TLy, TRx, TRy, BLx, BLy, BRx, BRy;\r\n\r\n // Instead of doing a check if parent container is \r\n // defined per corner we only do it once.\r\n if (this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n\r\n this.getTopLeft(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n TLx = output.x;\r\n TLy = output.y;\r\n\r\n this.getTopRight(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n TRx = output.x;\r\n TRy = output.y;\r\n\r\n this.getBottomLeft(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n BLx = output.x;\r\n BLy = output.y;\r\n\r\n this.getBottomRight(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n BRx = output.x;\r\n BRy = output.y;\r\n }\r\n else\r\n {\r\n this.getTopLeft(output);\r\n\r\n TLx = output.x;\r\n TLy = output.y;\r\n\r\n this.getTopRight(output);\r\n\r\n TRx = output.x;\r\n TRy = output.y;\r\n\r\n this.getBottomLeft(output);\r\n\r\n BLx = output.x;\r\n BLy = output.y;\r\n\r\n this.getBottomRight(output);\r\n\r\n BRx = output.x;\r\n BRy = output.y;\r\n }\r\n\r\n output.x = Math.min(TLx, TRx, BLx, BRx);\r\n output.y = Math.min(TLy, TRy, BLy, BRy);\r\n output.width = Math.max(TLx, TRx, BLx, BRx) - output.x;\r\n output.height = Math.max(TLy, TRy, BLy, BRy) - output.y;\r\n\r\n return output;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = GetBounds;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BitmapMask = require('../../display/mask/BitmapMask');\r\nvar GeometryMask = require('../../display/mask/GeometryMask');\r\n\r\n/**\r\n * Provides methods used for getting and setting the mask of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Mask\r\n * @since 3.0.0\r\n */\r\n\r\nvar Mask = {\r\n\r\n /**\r\n * The Mask this Game Object is using during render.\r\n *\r\n * @name Phaser.GameObjects.Components.Mask#mask\r\n * @type {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask}\r\n * @since 3.0.0\r\n */\r\n mask: null,\r\n\r\n /**\r\n * Sets the mask that this Game Object will use to render with.\r\n *\r\n * The mask must have been previously created and can be either a GeometryMask or a BitmapMask.\r\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\r\n *\r\n * If a mask is already set on this Game Object it will be immediately replaced.\r\n * \r\n * Masks are positioned in global space and are not relative to the Game Object to which they\r\n * are applied. The reason for this is that multiple Game Objects can all share the same mask.\r\n * \r\n * Masks have no impact on physics or input detection. They are purely a rendering component\r\n * that allows you to limit what is visible during the render pass.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#setMask\r\n * @since 3.6.2\r\n *\r\n * @param {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask} mask - The mask this Game Object will use when rendering.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setMask: function (mask)\r\n {\r\n this.mask = mask;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clears the mask that this Game Object was using.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#clearMask\r\n * @since 3.6.2\r\n *\r\n * @param {boolean} [destroyMask=false] - Destroy the mask before clearing it?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearMask: function (destroyMask)\r\n {\r\n if (destroyMask === undefined) { destroyMask = false; }\r\n\r\n if (destroyMask && this.mask)\r\n {\r\n this.mask.destroy();\r\n }\r\n\r\n this.mask = null;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates and returns a Bitmap Mask. This mask can be used by any Game Object,\r\n * including this one.\r\n *\r\n * To create the mask you need to pass in a reference to a renderable Game Object.\r\n * A renderable Game Object is one that uses a texture to render with, such as an\r\n * Image, Sprite, Render Texture or BitmapText.\r\n *\r\n * If you do not provide a renderable object, and this Game Object has a texture,\r\n * it will use itself as the object. This means you can call this method to create\r\n * a Bitmap Mask from any renderable Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#createBitmapMask\r\n * @since 3.6.2\r\n * \r\n * @param {Phaser.GameObjects.GameObject} [renderable] - A renderable Game Object that uses a texture, such as a Sprite.\r\n *\r\n * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created.\r\n */\r\n createBitmapMask: function (renderable)\r\n {\r\n if (renderable === undefined && (this.texture || this.shader))\r\n {\r\n // eslint-disable-next-line consistent-this\r\n renderable = this;\r\n }\r\n\r\n return new BitmapMask(this.scene, renderable);\r\n },\r\n\r\n /**\r\n * Creates and returns a Geometry Mask. This mask can be used by any Game Object,\r\n * including this one.\r\n *\r\n * To create the mask you need to pass in a reference to a Graphics Game Object.\r\n *\r\n * If you do not provide a graphics object, and this Game Object is an instance\r\n * of a Graphics object, then it will use itself to create the mask.\r\n * \r\n * This means you can call this method to create a Geometry Mask from any Graphics Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#createGeometryMask\r\n * @since 3.6.2\r\n * \r\n * @param {Phaser.GameObjects.Graphics} [graphics] - A Graphics Game Object. The geometry within it will be used as the mask.\r\n *\r\n * @return {Phaser.Display.Masks.GeometryMask} This Geometry Mask that was created.\r\n */\r\n createGeometryMask: function (graphics)\r\n {\r\n if (graphics === undefined && this.type === 'Graphics')\r\n {\r\n // eslint-disable-next-line consistent-this\r\n graphics = this;\r\n }\r\n\r\n return new GeometryMask(this.scene, graphics);\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Mask;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the origin of a Game Object.\r\n * Values are normalized, given in the range 0 to 1.\r\n * Display values contain the calculated pixel values.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Origin\r\n * @since 3.0.0\r\n */\r\n\r\nvar Origin = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#_originComponent\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.2.0\r\n */\r\n _originComponent: true,\r\n\r\n /**\r\n * The horizontal origin of this Game Object.\r\n * The origin maps the relationship between the size and position of the Game Object.\r\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\r\n * Setting the value to 0 means the position now relates to the left of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#originX\r\n * @type {number}\r\n * @default 0.5\r\n * @since 3.0.0\r\n */\r\n originX: 0.5,\r\n\r\n /**\r\n * The vertical origin of this Game Object.\r\n * The origin maps the relationship between the size and position of the Game Object.\r\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\r\n * Setting the value to 0 means the position now relates to the top of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#originY\r\n * @type {number}\r\n * @default 0.5\r\n * @since 3.0.0\r\n */\r\n originY: 0.5,\r\n\r\n // private + read only\r\n _displayOriginX: 0,\r\n _displayOriginY: 0,\r\n\r\n /**\r\n * The horizontal display origin of this Game Object.\r\n * The origin is a normalized value between 0 and 1.\r\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#displayOriginX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayOriginX: {\r\n\r\n get: function ()\r\n {\r\n return this._displayOriginX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._displayOriginX = value;\r\n this.originX = value / this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical display origin of this Game Object.\r\n * The origin is a normalized value between 0 and 1.\r\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#displayOriginY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayOriginY: {\r\n\r\n get: function ()\r\n {\r\n return this._displayOriginY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._displayOriginY = value;\r\n this.originY = value / this.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the origin of this Game Object.\r\n *\r\n * The values are given in the range 0 to 1.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setOrigin\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0.5] - The horizontal origin value.\r\n * @param {number} [y=x] - The vertical origin value. If not defined it will be set to the value of `x`.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setOrigin: function (x, y)\r\n {\r\n if (x === undefined) { x = 0.5; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.originX = x;\r\n this.originY = y;\r\n\r\n return this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the origin of this Game Object based on the Pivot values in its Frame.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setOriginFromFrame\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setOriginFromFrame: function ()\r\n {\r\n if (!this.frame || !this.frame.customPivot)\r\n {\r\n return this.setOrigin();\r\n }\r\n else\r\n {\r\n this.originX = this.frame.pivotX;\r\n this.originY = this.frame.pivotY;\r\n }\r\n\r\n return this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the display origin of this Game Object.\r\n * The difference between this and setting the origin is that you can use pixel values for setting the display origin.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setDisplayOrigin\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The horizontal display origin value.\r\n * @param {number} [y=x] - The vertical display origin value. If not defined it will be set to the value of `x`.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplayOrigin: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.displayOriginX = x;\r\n this.displayOriginY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the Display Origin cached values internally stored on this Game Object.\r\n * You don't usually call this directly, but it is exposed for edge-cases where you may.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#updateDisplayOrigin\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateDisplayOrigin: function ()\r\n {\r\n this._displayOriginX = this.originX * this.width;\r\n this._displayOriginY = this.originY * this.height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Origin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DegToRad = require('../../math/DegToRad');\r\nvar GetBoolean = require('../../tweens/builders/GetBoolean');\r\nvar GetValue = require('../../utils/object/GetValue');\r\nvar TWEEN_CONST = require('../../tweens/tween/const');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * Provides methods used for managing a Game Object following a Path.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.PathFollower\r\n * @since 3.17.0\r\n */\r\n\r\nvar PathFollower = {\r\n\r\n /**\r\n * The Path this PathFollower is following. It can only follow one Path at a time.\r\n *\r\n * @name Phaser.GameObjects.Components.PathFollower#path\r\n * @type {Phaser.Curves.Path}\r\n * @since 3.0.0\r\n */\r\n path: null,\r\n\r\n /**\r\n * Should the PathFollower automatically rotate to point in the direction of the Path?\r\n *\r\n * @name Phaser.GameObjects.Components.PathFollower#rotateToPath\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n rotateToPath: false,\r\n\r\n /**\r\n * If the PathFollower is rotating to match the Path (@see Phaser.GameObjects.PathFollower#rotateToPath)\r\n * this value is added to the rotation value. This allows you to rotate objects to a path but control\r\n * the angle of the rotation as well.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathRotationOffset\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n pathRotationOffset: 0,\r\n\r\n /**\r\n * An additional vector to add to the PathFollowers position, allowing you to offset it from the\r\n * Path coordinates.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathOffset\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n pathOffset: null,\r\n\r\n /**\r\n * A Vector2 that stores the current point of the path the follower is on.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathVector\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n pathVector: null,\r\n\r\n /**\r\n * The distance the follower has traveled from the previous point to the current one, at the last update.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathDelta\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.23.0\r\n */\r\n pathDelta: null,\r\n\r\n /**\r\n * The Tween used for following the Path.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathTween\r\n * @type {Phaser.Tweens.Tween}\r\n * @since 3.0.0\r\n */\r\n pathTween: null,\r\n\r\n /**\r\n * Settings for the PathFollower.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathConfig\r\n * @type {?Phaser.Types.GameObjects.PathFollower.PathConfig}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n pathConfig: null,\r\n\r\n /**\r\n * Records the direction of the follower so it can change direction.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#_prevDirection\r\n * @type {integer}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n _prevDirection: TWEEN_CONST.PLAYING_FORWARD,\r\n\r\n /**\r\n * Set the Path that this PathFollower should follow.\r\n *\r\n * Optionally accepts {@link Phaser.Types.GameObjects.PathFollower.PathConfig} settings.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#setPath\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Curves.Path} path - The Path this PathFollower is following. It can only follow one Path at a time.\r\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config] - Settings for the PathFollower.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setPath: function (path, config)\r\n {\r\n if (config === undefined) { config = this.pathConfig; }\r\n\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n this.path = path;\r\n\r\n if (config)\r\n {\r\n this.startFollow(config);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set whether the PathFollower should automatically rotate to point in the direction of the Path.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#setRotateToPath\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Whether the PathFollower should automatically rotate to point in the direction of the Path.\r\n * @param {number} [offset=0] - Rotation offset in degrees.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setRotateToPath: function (value, offset)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n\r\n this.rotateToPath = value;\r\n\r\n this.pathRotationOffset = offset;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Is this PathFollower actively following a Path or not?\r\n *\r\n * To be considered as `isFollowing` it must be currently moving on a Path, and not paused.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#isFollowing\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` is this PathFollower is actively following a Path, otherwise `false`.\r\n */\r\n isFollowing: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n return (tween && tween.isPlaying());\r\n },\r\n\r\n /**\r\n * Starts this PathFollower following its given Path.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#startFollow\r\n * @since 3.3.0\r\n *\r\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config={}] - The duration of the follow, or a PathFollower config object.\r\n * @param {number} [startAt=0] - Optional start position of the follow, between 0 and 1.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n startFollow: function (config, startAt)\r\n {\r\n if (config === undefined) { config = {}; }\r\n if (startAt === undefined) { startAt = 0; }\r\n\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n if (typeof config === 'number')\r\n {\r\n config = { duration: config };\r\n }\r\n\r\n // Override in case they've been specified in the config\r\n config.from = GetValue(config, 'from', 0);\r\n config.to = GetValue(config, 'to', 1);\r\n\r\n var positionOnPath = GetBoolean(config, 'positionOnPath', false);\r\n\r\n this.rotateToPath = GetBoolean(config, 'rotateToPath', false);\r\n this.pathRotationOffset = GetValue(config, 'rotationOffset', 0);\r\n\r\n // This works, but it's not an ideal way of doing it as the follower jumps position\r\n var seek = GetValue(config, 'startAt', startAt);\r\n\r\n if (seek)\r\n {\r\n config.onStart = function (tween)\r\n {\r\n var tweenData = tween.data[0];\r\n tweenData.progress = seek;\r\n tweenData.elapsed = tweenData.duration * seek;\r\n var v = tweenData.ease(tweenData.progress);\r\n tweenData.current = tweenData.start + ((tweenData.end - tweenData.start) * v);\r\n tweenData.target[tweenData.key] = tweenData.current;\r\n };\r\n }\r\n\r\n if (!this.pathOffset)\r\n {\r\n this.pathOffset = new Vector2(this.x, this.y);\r\n }\r\n\r\n if (!this.pathVector)\r\n {\r\n this.pathVector = new Vector2();\r\n }\r\n\r\n if (!this.pathDelta)\r\n {\r\n this.pathDelta = new Vector2();\r\n }\r\n\r\n this.pathDelta.reset();\r\n\r\n this.pathTween = this.scene.sys.tweens.addCounter(config);\r\n\r\n // The starting point of the path, relative to this follower\r\n this.path.getStartPoint(this.pathOffset);\r\n\r\n if (positionOnPath)\r\n {\r\n this.x = this.pathOffset.x;\r\n this.y = this.pathOffset.y;\r\n }\r\n\r\n this.pathOffset.x = this.x - this.pathOffset.x;\r\n this.pathOffset.y = this.y - this.pathOffset.y;\r\n\r\n this._prevDirection = TWEEN_CONST.PLAYING_FORWARD;\r\n\r\n if (this.rotateToPath)\r\n {\r\n // Set the rotation now (in case the tween has a delay on it, etc)\r\n var nextPoint = this.path.getPoint(0.1);\r\n\r\n this.rotation = Math.atan2(nextPoint.y - this.y, nextPoint.x - this.x) + DegToRad(this.pathRotationOffset);\r\n }\r\n\r\n this.pathConfig = config;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Pauses this PathFollower. It will still continue to render, but it will remain motionless at the\r\n * point on the Path at which you paused it.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#pauseFollow\r\n * @since 3.3.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n pauseFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.pause();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resumes a previously paused PathFollower.\r\n *\r\n * If the PathFollower was not paused this has no effect.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#resumeFollow\r\n * @since 3.3.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n resumeFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPaused())\r\n {\r\n tween.resume();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops this PathFollower from following the path any longer.\r\n *\r\n * This will invoke any 'stop' conditions that may exist on the Path, or for the follower.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#stopFollow\r\n * @since 3.3.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n stopFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal update handler that advances this PathFollower along the path.\r\n *\r\n * Called automatically by the Scene step, should not typically be called directly.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#pathUpdate\r\n * @since 3.17.0\r\n */\r\n pathUpdate: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween)\r\n {\r\n var tweenData = tween.data[0];\r\n var pathDelta = this.pathDelta;\r\n var pathVector = this.pathVector;\r\n\r\n pathDelta.copy(pathVector).negate();\r\n\r\n if (tweenData.state === TWEEN_CONST.COMPLETE)\r\n {\r\n this.path.getPoint(1, pathVector);\r\n\r\n pathDelta.add(pathVector);\r\n pathVector.add(this.pathOffset);\r\n\r\n this.setPosition(pathVector.x, pathVector.y);\r\n\r\n return;\r\n }\r\n else if (tweenData.state !== TWEEN_CONST.PLAYING_FORWARD && tweenData.state !== TWEEN_CONST.PLAYING_BACKWARD)\r\n {\r\n // If delayed, etc then bail out\r\n return;\r\n }\r\n\r\n this.path.getPoint(tween.getValue(), pathVector);\r\n\r\n pathDelta.add(pathVector);\r\n pathVector.add(this.pathOffset);\r\n\r\n var oldX = this.x;\r\n var oldY = this.y;\r\n\r\n this.setPosition(pathVector.x, pathVector.y);\r\n\r\n var speedX = this.x - oldX;\r\n var speedY = this.y - oldY;\r\n\r\n if (speedX === 0 && speedY === 0)\r\n {\r\n // Bail out early\r\n return;\r\n }\r\n\r\n if (tweenData.state !== this._prevDirection)\r\n {\r\n // We've changed direction, so don't do a rotate this frame\r\n this._prevDirection = tweenData.state;\r\n\r\n return;\r\n }\r\n\r\n if (this.rotateToPath)\r\n {\r\n this.rotation = Math.atan2(speedY, speedX) + DegToRad(this.pathRotationOffset);\r\n }\r\n }\r\n }\r\n\r\n};\r\n\r\nmodule.exports = PathFollower;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the WebGL rendering pipeline of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.Pipeline\n * @webglOnly\n * @since 3.0.0\n */\n\nvar Pipeline = {\n\n /**\n * The initial WebGL pipeline of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Pipeline#defaultPipeline\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\n * @default null\n * @webglOnly\n * @since 3.0.0\n */\n defaultPipeline: null,\n\n /**\n * The current WebGL pipeline of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Pipeline#pipeline\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\n * @default null\n * @webglOnly\n * @since 3.0.0\n */\n pipeline: null,\n\n /**\n * Sets the initial WebGL Pipeline of this Game Object.\n *\n * This should only be called during the instantiation of the Game Object.\n *\n * @method Phaser.GameObjects.Components.Pipeline#initPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @param {string} [pipelineName=MultiPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Multi Pipeline.\n *\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\n */\n initPipeline: function (pipelineName)\n {\n if (pipelineName === undefined) { pipelineName = 'MultiPipeline'; }\n\n var renderer = this.scene.sys.game.renderer;\n\n if (renderer && renderer.gl && renderer.hasPipeline(pipelineName))\n {\n this.defaultPipeline = renderer.getPipeline(pipelineName);\n this.pipeline = this.defaultPipeline;\n\n return true;\n }\n\n return false;\n },\n\n /**\n * Sets the active WebGL Pipeline of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Pipeline#setPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @param {string} pipelineName - The name of the pipeline to set on this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setPipeline: function (pipelineName)\n {\n var renderer = this.scene.sys.game.renderer;\n\n if (renderer && renderer.gl && renderer.hasPipeline(pipelineName))\n {\n this.pipeline = renderer.getPipeline(pipelineName);\n }\n\n return this;\n },\n\n /**\n * Resets the WebGL Pipeline of this Game Object back to the default it was created with.\n *\n * @method Phaser.GameObjects.Components.Pipeline#resetPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\n */\n resetPipeline: function ()\n {\n this.pipeline = this.defaultPipeline;\n\n return (this.pipeline !== null);\n },\n\n /**\n * Gets the name of the WebGL Pipeline this Game Object is currently using.\n *\n * @method Phaser.GameObjects.Components.Pipeline#getPipelineName\n * @webglOnly\n * @since 3.0.0\n *\n * @return {string} The string-based name of the pipeline being used by this Game Object.\n */\n getPipelineName: function ()\n {\n return this.pipeline.name;\n }\n\n};\n\nmodule.exports = Pipeline;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the Scroll Factor of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.ScrollFactor\r\n * @since 3.0.0\r\n */\r\n\r\nvar ScrollFactor = {\r\n\r\n /**\r\n * The horizontal scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scrollFactorX: 1,\r\n\r\n /**\r\n * The vertical scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scrollFactorY: 1,\r\n\r\n /**\r\n * Sets the scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @method Phaser.GameObjects.Components.ScrollFactor#setScrollFactor\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scroll factor of this Game Object.\r\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScrollFactor: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = ScrollFactor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the size of a Game Object.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Size\r\n * @since 3.0.0\r\n */\r\n\r\nvar Size = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n * \r\n * @name Phaser.GameObjects.Components.Size#_sizeComponent\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.2.0\r\n */\r\n _sizeComponent: true,\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n * \r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayWidth` property.\r\n * \r\n * @name Phaser.GameObjects.Components.Size#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n width: 0,\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n * \r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayHeight` property.\r\n * \r\n * @name Phaser.GameObjects.Components.Size#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n height: 0,\r\n\r\n /**\r\n * The displayed width of this Game Object.\r\n * \r\n * This value takes into account the scale factor.\r\n * \r\n * Setting this value will adjust the Game Object's scale property.\r\n * \r\n * @name Phaser.GameObjects.Components.Size#displayWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return Math.abs(this.scaleX * this.frame.realWidth);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleX = value / this.frame.realWidth;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of this Game Object.\r\n * \r\n * This value takes into account the scale factor.\r\n * \r\n * Setting this value will adjust the Game Object's scale property.\r\n * \r\n * @name Phaser.GameObjects.Components.Size#displayHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return Math.abs(this.scaleY * this.frame.realHeight);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleY = value / this.frame.realHeight;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the size of this Game Object to be that of the given Frame.\r\n * \r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n * \r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n * \r\n * @method Phaser.GameObjects.Components.Size#setSizeToFrame\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Frame} frame - The frame to base the size of this Game Object on.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setSizeToFrame: function (frame)\r\n {\r\n if (frame === undefined) { frame = this.frame; }\r\n\r\n this.width = frame.realWidth;\r\n this.height = frame.realHeight;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\r\n * \r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n * \r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n * \r\n * @method Phaser.GameObjects.Components.Size#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the display size of this Game Object.\r\n * \r\n * Calling this will adjust the scale.\r\n * \r\n * @method Phaser.GameObjects.Components.Size#setDisplaySize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplaySize: function (width, height)\r\n {\r\n this.displayWidth = width;\r\n this.displayHeight = height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Size;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 8; // 1000\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Texture\r\n * @since 3.0.0\r\n */\r\n\r\nvar Texture = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * Internal flag. Not to be set by this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#isCropped\r\n * @type {boolean}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Sets the texture and frame this Game Object will use to render with.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * @method Phaser.GameObjects.Components.Texture#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Textures.Texture)} key - The key of the texture to be used, as stored in the Texture Manager, or a Texture instance.\r\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTexture: function (key, frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(key);\r\n\r\n return this.setFrame(frame);\r\n },\r\n\r\n /**\r\n * Sets the frame this Game Object will use to render with.\r\n *\r\n * The Frame has to belong to the current Texture being used.\r\n *\r\n * It can be either a string or an index.\r\n *\r\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\r\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\r\n *\r\n * @method Phaser.GameObjects.Components.Texture#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer)} frame - The name or index of the frame within the Texture.\r\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\r\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFrame: function (frame, updateSize, updateOrigin)\r\n {\r\n if (updateSize === undefined) { updateSize = true; }\r\n if (updateOrigin === undefined) { updateOrigin = true; }\r\n\r\n this.frame = this.texture.get(frame);\r\n\r\n if (!this.frame.cutWidth || !this.frame.cutHeight)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n if (this._sizeComponent && updateSize)\r\n {\r\n this.setSizeToFrame();\r\n }\r\n\r\n if (this._originComponent && updateOrigin)\r\n {\r\n if (this.frame.customPivot)\r\n {\r\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\r\n }\r\n else\r\n {\r\n this.updateDisplayOrigin();\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Texture;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 8; // 1000\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.TextureCrop\r\n * @since 3.0.0\r\n */\r\n\r\nvar TextureCrop = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * A boolean flag indicating if this Game Object is being cropped or not.\r\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\r\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#isCropped\r\n * @type {boolean}\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\r\n * \r\n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\r\n * \r\n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\r\n * changes what is shown when rendered.\r\n * \r\n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\r\n * \r\n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\r\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\r\n * \r\n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\r\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\r\n * \r\n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\r\n * \r\n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\r\n * \r\n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\r\n * the renderer to skip several internal calculations.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setCrop\r\n * @since 3.11.0\r\n *\r\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\r\n * @param {number} [y] - The y coordinate to start the crop from.\r\n * @param {number} [width] - The width of the crop rectangle in pixels.\r\n * @param {number} [height] - The height of the crop rectangle in pixels.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setCrop: function (x, y, width, height)\r\n {\r\n if (x === undefined)\r\n {\r\n this.isCropped = false;\r\n }\r\n else if (this.frame)\r\n {\r\n if (typeof x === 'number')\r\n {\r\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\r\n }\r\n else\r\n {\r\n var rect = x;\r\n\r\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\r\n }\r\n\r\n this.isCropped = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the texture and frame this Game Object will use to render with.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the texture to be used, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTexture: function (key, frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(key);\r\n\r\n return this.setFrame(frame);\r\n },\r\n\r\n /**\r\n * Sets the frame this Game Object will use to render with.\r\n *\r\n * The Frame has to belong to the current Texture being used.\r\n *\r\n * It can be either a string or an index.\r\n *\r\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\r\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer)} frame - The name or index of the frame within the Texture.\r\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\r\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFrame: function (frame, updateSize, updateOrigin)\r\n {\r\n if (updateSize === undefined) { updateSize = true; }\r\n if (updateOrigin === undefined) { updateOrigin = true; }\r\n\r\n this.frame = this.texture.get(frame);\r\n\r\n if (!this.frame.cutWidth || !this.frame.cutHeight)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n if (this._sizeComponent && updateSize)\r\n {\r\n this.setSizeToFrame();\r\n }\r\n\r\n if (this._originComponent && updateOrigin)\r\n {\r\n if (this.frame.customPivot)\r\n {\r\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\r\n }\r\n else\r\n {\r\n this.updateDisplayOrigin();\r\n }\r\n }\r\n\r\n if (this.isCropped)\r\n {\r\n this.frame.updateCropUVs(this._crop, this.flipX, this.flipY);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#resetCropObject\r\n * @private\r\n * @since 3.12.0\r\n * \r\n * @return {object} The crop object.\r\n */\r\n resetCropObject: function ()\r\n {\r\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\r\n }\r\n\r\n};\r\n\r\nmodule.exports = TextureCrop;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar GetColorFromValue = require('../../display/color/GetColorFromValue');\n\n/**\n * Provides methods used for setting the tint of a Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.Tint\n * @webglOnly\n * @since 3.0.0\n */\n\nvar Tint = {\n\n /**\n * Private internal value. Holds the top-left tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#_tintTL\n * @type {number}\n * @private\n * @default 16777215\n * @since 3.0.0\n */\n _tintTL: 16777215,\n\n /**\n * Private internal value. Holds the top-right tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#_tintTR\n * @type {number}\n * @private\n * @default 16777215\n * @since 3.0.0\n */\n _tintTR: 16777215,\n\n /**\n * Private internal value. Holds the bottom-left tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#_tintBL\n * @type {number}\n * @private\n * @default 16777215\n * @since 3.0.0\n */\n _tintBL: 16777215,\n\n /**\n * Private internal value. Holds the bottom-right tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#_tintBR\n * @type {number}\n * @private\n * @default 16777215\n * @since 3.0.0\n */\n _tintBR: 16777215,\n\n /**\n * Private internal value. Holds if the Game Object is tinted or not.\n *\n * @name Phaser.GameObjects.Components.Tint#_isTinted\n * @type {boolean}\n * @private\n * @default false\n * @since 3.11.0\n */\n _isTinted: false,\n\n /**\n * Fill or additive?\n *\n * @name Phaser.GameObjects.Components.Tint#tintFill\n * @type {boolean}\n * @default false\n * @since 3.11.0\n */\n tintFill: false,\n\n /**\n * Clears all tint values associated with this Game Object.\n *\n * Immediately sets the color values back to 0xffffff and the tint type to 'additive',\n * which results in no visible change to the texture.\n *\n * @method Phaser.GameObjects.Components.Tint#clearTint\n * @webglOnly\n * @since 3.0.0\n *\n * @return {this} This Game Object instance.\n */\n clearTint: function ()\n {\n this.setTint(0xffffff);\n\n this._isTinted = false;\n\n return this;\n },\n\n /**\n * Sets an additive tint on this Game Object.\n *\n * The tint works by taking the pixel color values from the Game Objects texture, and then\n * multiplying it by the color value of the tint. You can provide either one color value,\n * in which case the whole Game Object will be tinted in that color. Or you can provide a color\n * per corner. The colors are blended together across the extent of the Game Object.\n *\n * To modify the tint color once set, either call this method again with new values or use the\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\n *\n * To remove a tint call `clearTint`.\n *\n * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`.\n *\n * @method Phaser.GameObjects.Components.Tint#setTint\n * @webglOnly\n * @since 3.0.0\n *\n * @param {integer} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object.\n * @param {integer} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {integer} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {integer} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setTint: function (topLeft, topRight, bottomLeft, bottomRight)\n {\n if (topLeft === undefined) { topLeft = 0xffffff; }\n\n if (topRight === undefined)\n {\n topRight = topLeft;\n bottomLeft = topLeft;\n bottomRight = topLeft;\n }\n\n this._tintTL = GetColorFromValue(topLeft);\n this._tintTR = GetColorFromValue(topRight);\n this._tintBL = GetColorFromValue(bottomLeft);\n this._tintBR = GetColorFromValue(bottomRight);\n\n this._isTinted = true;\n\n this.tintFill = false;\n\n return this;\n },\n\n /**\n * Sets a fill-based tint on this Game Object.\n *\n * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture\n * with those in the tint. You can use this for effects such as making a player flash 'white'\n * if hit by something. You can provide either one color value, in which case the whole\n * Game Object will be rendered in that color. Or you can provide a color per corner. The colors\n * are blended together across the extent of the Game Object.\n *\n * To modify the tint color once set, either call this method again with new values or use the\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\n *\n * To remove a tint call `clearTint`.\n *\n * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`.\n *\n * @method Phaser.GameObjects.Components.Tint#setTintFill\n * @webglOnly\n * @since 3.11.0\n *\n * @param {integer} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object.\n * @param {integer} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {integer} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {integer} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setTintFill: function (topLeft, topRight, bottomLeft, bottomRight)\n {\n this.setTint(topLeft, topRight, bottomLeft, bottomRight);\n\n this.tintFill = true;\n\n return this;\n },\n\n /**\n * The tint value being applied to the top-left of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopLeft\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tintTopLeft: {\n\n get: function ()\n {\n return this._tintTL;\n },\n\n set: function (value)\n {\n this._tintTL = GetColorFromValue(value);\n this._isTinted = true;\n }\n\n },\n\n /**\n * The tint value being applied to the top-right of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopRight\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tintTopRight: {\n\n get: function ()\n {\n return this._tintTR;\n },\n\n set: function (value)\n {\n this._tintTR = GetColorFromValue(value);\n this._isTinted = true;\n }\n\n },\n\n /**\n * The tint value being applied to the bottom-left of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomLeft\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tintBottomLeft: {\n\n get: function ()\n {\n return this._tintBL;\n },\n\n set: function (value)\n {\n this._tintBL = GetColorFromValue(value);\n this._isTinted = true;\n }\n\n },\n\n /**\n * The tint value being applied to the bottom-right of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomRight\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tintBottomRight: {\n\n get: function ()\n {\n return this._tintBR;\n },\n\n set: function (value)\n {\n this._tintBR = GetColorFromValue(value);\n this._isTinted = true;\n }\n\n },\n\n /**\n * The tint value being applied to the whole of the Game Object.\n * This property is a setter-only. Use the properties `tintTopLeft` etc to read the current tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#tint\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tint: {\n\n set: function (value)\n {\n this.setTint(value, value, value, value);\n }\n },\n\n /**\n * Does this Game Object have a tint applied to it or not?\n *\n * @name Phaser.GameObjects.Components.Tint#isTinted\n * @type {boolean}\n * @webglOnly\n * @readonly\n * @since 3.11.0\n */\n isTinted: {\n\n get: function ()\n {\n return this._isTinted;\n }\n\n }\n\n};\n\nmodule.exports = Tint;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Build a JSON representation of the given Game Object.\r\n *\r\n * This is typically extended further by Game Object specific implementations.\r\n *\r\n * @method Phaser.GameObjects.Components.ToJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to export as JSON.\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\r\n */\r\nvar ToJSON = function (gameObject)\r\n{\r\n var out = {\r\n name: gameObject.name,\r\n type: gameObject.type,\r\n x: gameObject.x,\r\n y: gameObject.y,\r\n depth: gameObject.depth,\r\n scale: {\r\n x: gameObject.scaleX,\r\n y: gameObject.scaleY\r\n },\r\n origin: {\r\n x: gameObject.originX,\r\n y: gameObject.originY\r\n },\r\n flipX: gameObject.flipX,\r\n flipY: gameObject.flipY,\r\n rotation: gameObject.rotation,\r\n alpha: gameObject.alpha,\r\n visible: gameObject.visible,\r\n blendMode: gameObject.blendMode,\r\n textureKey: '',\r\n frameKey: '',\r\n data: {}\r\n };\r\n\r\n if (gameObject.texture)\r\n {\r\n out.textureKey = gameObject.texture.key;\r\n out.frameKey = gameObject.frame.name;\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = ToJSON;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar MATH_CONST = require('../../math/const');\nvar TransformMatrix = require('./TransformMatrix');\nvar TransformXY = require('../../math/TransformXY');\nvar WrapAngle = require('../../math/angle/Wrap');\nvar WrapAngleDegrees = require('../../math/angle/WrapDegrees');\nvar Vector2 = require('../../math/Vector2');\n\n// global bitmask flag for GameObject.renderMask (used by Scale)\nvar _FLAG = 4; // 0100\n\n/**\n * Provides methods used for getting and setting the position, scale and rotation of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.Transform\n * @since 3.0.0\n */\n\nvar Transform = {\n\n /**\n * Private internal value. Holds the horizontal scale value.\n *\n * @name Phaser.GameObjects.Components.Transform#_scaleX\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _scaleX: 1,\n\n /**\n * Private internal value. Holds the vertical scale value.\n *\n * @name Phaser.GameObjects.Components.Transform#_scaleY\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _scaleY: 1,\n\n /**\n * Private internal value. Holds the rotation value in radians.\n *\n * @name Phaser.GameObjects.Components.Transform#_rotation\n * @type {number}\n * @private\n * @default 0\n * @since 3.0.0\n */\n _rotation: 0,\n\n /**\n * The x position of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n x: 0,\n\n /**\n * The y position of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n y: 0,\n\n /**\n * The z position of this Game Object.\n *\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\n * {@link Phaser.GameObjects.Components.Depth#depth} instead.\n *\n * @name Phaser.GameObjects.Components.Transform#z\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n z: 0,\n\n /**\n * The w position of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#w\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n w: 0,\n\n /**\n * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object\n * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.\n *\n * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this\n * isn't the case, use the `scaleX` or `scaleY` properties instead.\n *\n * @name Phaser.GameObjects.Components.Transform#scale\n * @type {number}\n * @default 1\n * @since 3.18.0\n */\n scale: {\n\n get: function ()\n {\n return (this._scaleX + this._scaleY) / 2;\n },\n\n set: function (value)\n {\n this._scaleX = value;\n this._scaleY = value;\n\n if (value === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The horizontal scale of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#scaleX\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n scaleX: {\n\n get: function ()\n {\n return this._scaleX;\n },\n\n set: function (value)\n {\n this._scaleX = value;\n\n if (value === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The vertical scale of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#scaleY\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n scaleY: {\n\n get: function ()\n {\n return this._scaleY;\n },\n\n set: function (value)\n {\n this._scaleY = value;\n\n if (value === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The angle of this Game Object as expressed in degrees.\n *\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left\n * and -90 is up.\n *\n * If you prefer to work in radians, see the `rotation` property instead.\n *\n * @name Phaser.GameObjects.Components.Transform#angle\n * @type {integer}\n * @default 0\n * @since 3.0.0\n */\n angle: {\n\n get: function ()\n {\n return WrapAngleDegrees(this._rotation * MATH_CONST.RAD_TO_DEG);\n },\n\n set: function (value)\n {\n // value is in degrees\n this.rotation = WrapAngleDegrees(value) * MATH_CONST.DEG_TO_RAD;\n }\n },\n\n /**\n * The angle of this Game Object in radians.\n *\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left\n * and -PI/2 is up.\n *\n * If you prefer to work in degrees, see the `angle` property instead.\n *\n * @name Phaser.GameObjects.Components.Transform#rotation\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n rotation: {\n\n get: function ()\n {\n return this._rotation;\n },\n\n set: function (value)\n {\n // value is in radians\n this._rotation = WrapAngle(value);\n }\n },\n\n /**\n * Sets the position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setPosition\n * @since 3.0.0\n *\n * @param {number} [x=0] - The x position of this Game Object.\n * @param {number} [y=x] - The y position of this Game Object. If not set it will use the `x` value.\n * @param {number} [z=0] - The z position of this Game Object.\n * @param {number} [w=0] - The w position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setPosition: function (x, y, z, w)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = x; }\n if (z === undefined) { z = 0; }\n if (w === undefined) { w = 0; }\n\n this.x = x;\n this.y = y;\n this.z = z;\n this.w = w;\n\n return this;\n },\n\n /**\n * Sets the position of this Game Object to be a random position within the confines of\n * the given area.\n *\n * If no area is specified a random position between 0 x 0 and the game width x height is used instead.\n *\n * The position does not factor in the size of this Game Object, meaning that only the origin is\n * guaranteed to be within the area.\n *\n * @method Phaser.GameObjects.Components.Transform#setRandomPosition\n * @since 3.8.0\n *\n * @param {number} [x=0] - The x position of the top-left of the random area.\n * @param {number} [y=0] - The y position of the top-left of the random area.\n * @param {number} [width] - The width of the random area.\n * @param {number} [height] - The height of the random area.\n *\n * @return {this} This Game Object instance.\n */\n setRandomPosition: function (x, y, width, height)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n if (width === undefined) { width = this.scene.sys.scale.width; }\n if (height === undefined) { height = this.scene.sys.scale.height; }\n\n this.x = x + (Math.random() * width);\n this.y = y + (Math.random() * height);\n\n return this;\n },\n\n /**\n * Sets the rotation of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setRotation\n * @since 3.0.0\n *\n * @param {number} [radians=0] - The rotation of this Game Object, in radians.\n *\n * @return {this} This Game Object instance.\n */\n setRotation: function (radians)\n {\n if (radians === undefined) { radians = 0; }\n\n this.rotation = radians;\n\n return this;\n },\n\n /**\n * Sets the angle of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setAngle\n * @since 3.0.0\n *\n * @param {number} [degrees=0] - The rotation of this Game Object, in degrees.\n *\n * @return {this} This Game Object instance.\n */\n setAngle: function (degrees)\n {\n if (degrees === undefined) { degrees = 0; }\n\n this.angle = degrees;\n\n return this;\n },\n\n /**\n * Sets the scale of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setScale\n * @since 3.0.0\n *\n * @param {number} x - The horizontal scale of this Game Object.\n * @param {number} [y=x] - The vertical scale of this Game Object. If not set it will use the `x` value.\n *\n * @return {this} This Game Object instance.\n */\n setScale: function (x, y)\n {\n if (x === undefined) { x = 1; }\n if (y === undefined) { y = x; }\n\n this.scaleX = x;\n this.scaleY = y;\n\n return this;\n },\n\n /**\n * Sets the x position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setX\n * @since 3.0.0\n *\n * @param {number} [value=0] - The x position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setX: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.x = value;\n\n return this;\n },\n\n /**\n * Sets the y position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setY\n * @since 3.0.0\n *\n * @param {number} [value=0] - The y position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setY: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.y = value;\n\n return this;\n },\n\n /**\n * Sets the z position of this Game Object.\n *\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\n * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.\n *\n * @method Phaser.GameObjects.Components.Transform#setZ\n * @since 3.0.0\n *\n * @param {number} [value=0] - The z position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setZ: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.z = value;\n\n return this;\n },\n\n /**\n * Sets the w position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setW\n * @since 3.0.0\n *\n * @param {number} [value=0] - The w position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setW: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.w = value;\n\n return this;\n },\n\n /**\n * Gets the local transform matrix for this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#getLocalTransformMatrix\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\n *\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\n */\n getLocalTransformMatrix: function (tempMatrix)\n {\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\n\n return tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\n },\n\n /**\n * Gets the world transform matrix for this Game Object, factoring in any parent Containers.\n *\n * @method Phaser.GameObjects.Components.Transform#getWorldTransformMatrix\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A temporary matrix to hold parent values during the calculations.\n *\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\n */\n getWorldTransformMatrix: function (tempMatrix, parentMatrix)\n {\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\n if (parentMatrix === undefined) { parentMatrix = new TransformMatrix(); }\n\n var parent = this.parentContainer;\n\n if (!parent)\n {\n return this.getLocalTransformMatrix(tempMatrix);\n }\n\n tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\n\n while (parent)\n {\n parentMatrix.applyITRS(parent.x, parent.y, parent._rotation, parent._scaleX, parent._scaleY);\n\n parentMatrix.multiply(tempMatrix, tempMatrix);\n\n parent = parent.parentContainer;\n }\n\n return tempMatrix;\n },\n\n /**\n * Takes the given `x` and `y` coordinates and converts them into local space for this\n * Game Object, taking into account parent and local transforms, and the Display Origin.\n *\n * The returned Vector2 contains the translated point in its properties.\n *\n * A Camera needs to be provided in order to handle modified scroll factors. If no\n * camera is specified, it will use the `main` camera from the Scene to which this\n * Game Object belongs.\n *\n * @method Phaser.GameObjects.Components.Transform#getLocalPoint\n * @since 3.50.0\n *\n * @param {number} x - The x position to translate.\n * @param {number} y - The y position to translate.\n * @param {Phaser.Math.Vector2} [point] - A Vector2, or point-like object, to store the results in.\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera which is being tested against. If not given will use the Scene default camera.\n *\n * @return {Phaser.Math.Vector2} The translated point.\n */\n getLocalPoint: function (x, y, point, camera)\n {\n if (!point) { point = new Vector2(); }\n if (!camera) { camera = this.scene.sys.cameras.main; }\n\n var csx = camera.scrollX;\n var csy = camera.scrollY;\n\n var px = x + (csx * this.scrollFactorX) - csx;\n var py = y + (csy * this.scrollFactorY) - csy;\n\n if (this.parentContainer)\n {\n this.getWorldTransformMatrix().applyInverse(px, py, point);\n }\n else\n {\n TransformXY(px, py, this.x, this.y, this.rotation, this.scaleX, this.scaleY, point);\n }\n\n // Normalize origin\n if (this._originComponent)\n {\n point.x += this._displayOriginX;\n point.y += this._displayOriginY;\n }\n\n return point;\n },\n\n /**\n * Gets the sum total rotation of all of this Game Objects parent Containers.\n *\n * The returned value is in radians and will be zero if this Game Object has no parent container.\n *\n * @method Phaser.GameObjects.Components.Transform#getParentRotation\n * @since 3.18.0\n *\n * @return {number} The sum total rotation, in radians, of all parent containers of this Game Object.\n */\n getParentRotation: function ()\n {\n var rotation = 0;\n\n var parent = this.parentContainer;\n\n while (parent)\n {\n rotation += parent.rotation;\n\n parent = parent.parentContainer;\n }\n\n return rotation;\n }\n\n};\n\nmodule.exports = Transform;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar MATH_CONST = require('../../math/const');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * A Matrix used for display transformations for rendering.\r\n *\r\n * It is represented like so:\r\n *\r\n * ```\r\n * | a | c | tx |\r\n * | b | d | ty |\r\n * | 0 | 0 | 1 |\r\n * ```\r\n *\r\n * @class TransformMatrix\r\n * @memberof Phaser.GameObjects.Components\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [a=1] - The Scale X value.\r\n * @param {number} [b=0] - The Skew Y value.\r\n * @param {number} [c=0] - The Skew X value.\r\n * @param {number} [d=1] - The Scale Y value.\r\n * @param {number} [tx=0] - The Translate X value.\r\n * @param {number} [ty=0] - The Translate Y value.\r\n */\r\nvar TransformMatrix = new Class({\r\n\r\n initialize:\r\n\r\n function TransformMatrix (a, b, c, d, tx, ty)\r\n {\r\n if (a === undefined) { a = 1; }\r\n if (b === undefined) { b = 0; }\r\n if (c === undefined) { c = 0; }\r\n if (d === undefined) { d = 1; }\r\n if (tx === undefined) { tx = 0; }\r\n if (ty === undefined) { ty = 0; }\r\n\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#matrix\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.matrix = new Float32Array([ a, b, c, d, tx, ty, 0, 0, 1 ]);\r\n\r\n /**\r\n * The decomposed matrix.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#decomposedMatrix\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.decomposedMatrix = {\r\n translateX: 0,\r\n translateY: 0,\r\n scaleX: 1,\r\n scaleY: 1,\r\n rotation: 0\r\n };\r\n },\r\n\r\n /**\r\n * The Scale X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#a\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n a: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[0];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[0] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Skew Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#b\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n b: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[1];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[1] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Skew X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#c\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n c: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[2];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[2] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Scale Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#d\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n d: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[3];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[3] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#e\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n e: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#f\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n f: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#tx\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n tx: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#ty\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n ty: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Matrix. Value is in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#rotation\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return Math.acos(this.a / this.scaleX) * ((Math.atan(-this.c / this.a) < 0) ? -1 : 1);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Matrix, normalized to be within the Phaser right-handed\r\n * clockwise rotation space. Value is in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#rotationNormalized\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n rotationNormalized: {\r\n\r\n get: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n if (a || b)\r\n {\r\n // var r = Math.sqrt(a * a + b * b);\r\n \r\n return (b > 0) ? Math.acos(a / this.scaleX) : -Math.acos(a / this.scaleX);\r\n }\r\n else if (c || d)\r\n {\r\n // var s = Math.sqrt(c * c + d * d);\r\n \r\n return MATH_CONST.TAU - ((d > 0) ? Math.acos(-c / this.scaleY) : -Math.acos(c / this.scaleY));\r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The decomposed horizontal scale of the Matrix. This value is always positive.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleX\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt((this.a * this.a) + (this.b * this.b));\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The decomposed vertical scale of the Matrix. This value is always positive.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleY\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt((this.c * this.c) + (this.d * this.d));\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Reset the Matrix to an identity matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#loadIdentity\r\n * @since 3.0.0\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n loadIdentity: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = 1;\r\n matrix[1] = 0;\r\n matrix[2] = 0;\r\n matrix[3] = 1;\r\n matrix[4] = 0;\r\n matrix[5] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#translate\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation value.\r\n * @param {number} y - The vertical translation value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n translate: function (x, y)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[4] = matrix[0] * x + matrix[2] * y + matrix[4];\r\n matrix[5] = matrix[1] * x + matrix[3] * y + matrix[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scale value.\r\n * @param {number} y - The vertical scale value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n scale: function (x, y)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] *= x;\r\n matrix[1] *= x;\r\n matrix[2] *= y;\r\n matrix[3] *= y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n rotate: function (angle)\r\n {\r\n var sin = Math.sin(angle);\r\n var cos = Math.cos(angle);\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n matrix[0] = a * cos + c * sin;\r\n matrix[1] = b * cos + d * sin;\r\n matrix[2] = a * -sin + c * cos;\r\n matrix[3] = b * -sin + d * cos;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n * \r\n * If an `out` Matrix is given then the results will be stored in it.\r\n * If it is not given, this matrix will be updated in place instead.\r\n * Use an `out` Matrix if you do not wish to mutate this matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in.\r\n *\r\n * @return {(this|Phaser.GameObjects.Components.TransformMatrix)} Either this TransformMatrix, or the `out` Matrix, if given in the arguments.\r\n */\r\n multiply: function (rhs, out)\r\n {\r\n var matrix = this.matrix;\r\n var source = rhs.matrix;\r\n\r\n var localA = matrix[0];\r\n var localB = matrix[1];\r\n var localC = matrix[2];\r\n var localD = matrix[3];\r\n var localE = matrix[4];\r\n var localF = matrix[5];\r\n\r\n var sourceA = source[0];\r\n var sourceB = source[1];\r\n var sourceC = source[2];\r\n var sourceD = source[3];\r\n var sourceE = source[4];\r\n var sourceF = source[5];\r\n\r\n var destinationMatrix = (out === undefined) ? this : out;\r\n\r\n destinationMatrix.a = (sourceA * localA) + (sourceB * localC);\r\n destinationMatrix.b = (sourceA * localB) + (sourceB * localD);\r\n destinationMatrix.c = (sourceC * localA) + (sourceD * localC);\r\n destinationMatrix.d = (sourceC * localB) + (sourceD * localD);\r\n destinationMatrix.e = (sourceE * localA) + (sourceF * localC) + localE;\r\n destinationMatrix.f = (sourceE * localB) + (sourceF * localD) + localF;\r\n\r\n return destinationMatrix;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the matrix given, including the offset.\r\n * \r\n * The offsetX is added to the tx value: `offsetX * a + offsetY * c + tx`.\r\n * The offsetY is added to the ty value: `offsetY * b + offsetY * d + ty`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#multiplyWithOffset\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\r\n * @param {number} offsetX - Horizontal offset to factor in to the multiplication.\r\n * @param {number} offsetY - Vertical offset to factor in to the multiplication.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n multiplyWithOffset: function (src, offsetX, offsetY)\r\n {\r\n var matrix = this.matrix;\r\n var otherMatrix = src.matrix;\r\n\r\n var a0 = matrix[0];\r\n var b0 = matrix[1];\r\n var c0 = matrix[2];\r\n var d0 = matrix[3];\r\n var tx0 = matrix[4];\r\n var ty0 = matrix[5];\r\n\r\n var pse = offsetX * a0 + offsetY * c0 + tx0;\r\n var psf = offsetX * b0 + offsetY * d0 + ty0;\r\n\r\n var a1 = otherMatrix[0];\r\n var b1 = otherMatrix[1];\r\n var c1 = otherMatrix[2];\r\n var d1 = otherMatrix[3];\r\n var tx1 = otherMatrix[4];\r\n var ty1 = otherMatrix[5];\r\n\r\n matrix[0] = a1 * a0 + b1 * c0;\r\n matrix[1] = a1 * b0 + b1 * d0;\r\n matrix[2] = c1 * a0 + d1 * c0;\r\n matrix[3] = c1 * b0 + d1 * d0;\r\n matrix[4] = tx1 * a0 + ty1 * c0 + pse;\r\n matrix[5] = tx1 * b0 + ty1 * d0 + psf;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#transform\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The Scale X value.\r\n * @param {number} b - The Shear Y value.\r\n * @param {number} c - The Shear X value.\r\n * @param {number} d - The Scale Y value.\r\n * @param {number} tx - The Translate X value.\r\n * @param {number} ty - The Translate Y value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n transform: function (a, b, c, d, tx, ty)\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a0 = matrix[0];\r\n var b0 = matrix[1];\r\n var c0 = matrix[2];\r\n var d0 = matrix[3];\r\n var tx0 = matrix[4];\r\n var ty0 = matrix[5];\r\n\r\n matrix[0] = a * a0 + b * c0;\r\n matrix[1] = a * b0 + b * d0;\r\n matrix[2] = c * a0 + d * c0;\r\n matrix[3] = c * b0 + d * d0;\r\n matrix[4] = tx * a0 + ty * c0 + tx0;\r\n matrix[5] = tx * b0 + ty * d0 + ty0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform a point using this Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#transformPoint\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the point to transform.\r\n * @param {number} y - The y coordinate of the point to transform.\r\n * @param {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} point - The Point object to store the transformed coordinates.\r\n *\r\n * @return {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} The Point containing the transformed coordinates.\r\n */\r\n transformPoint: function (x, y, point)\r\n {\r\n if (point === undefined) { point = { x: 0, y: 0 }; }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n point.x = x * a + y * c + tx;\r\n point.y = x * b + y * d + ty;\r\n\r\n return point;\r\n },\r\n\r\n /**\r\n * Invert the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#invert\r\n * @since 3.0.0\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n invert: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n var n = a * d - b * c;\r\n\r\n matrix[0] = d / n;\r\n matrix[1] = -b / n;\r\n matrix[2] = -c / n;\r\n matrix[3] = a / n;\r\n matrix[4] = (c * ty - d * tx) / n;\r\n matrix[5] = -(a * ty - b * tx) / n;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix to copy those of the matrix given.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFrom\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n copyFrom: function (src)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = src.a;\r\n matrix[1] = src.b;\r\n matrix[2] = src.c;\r\n matrix[3] = src.d;\r\n matrix[4] = src.e;\r\n matrix[5] = src.f;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix to copy those of the array given.\r\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFromArray\r\n * @since 3.11.0\r\n *\r\n * @param {array} src - The array of values to set into this matrix.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n copyFromArray: function (src)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = src[0];\r\n matrix[1] = src[1];\r\n matrix[2] = src[2];\r\n matrix[3] = src[3];\r\n matrix[4] = src[4];\r\n matrix[5] = src[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values from this Matrix to the given Canvas Rendering Context.\r\n * This will use the Context.transform method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToContext\r\n * @since 3.12.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\r\n */\r\n copyToContext: function (ctx)\r\n {\r\n var matrix = this.matrix;\r\n\r\n ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n return ctx;\r\n },\r\n\r\n /**\r\n * Copy the values from this Matrix to the given Canvas Rendering Context.\r\n * This will use the Context.setTransform method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setToContext\r\n * @since 3.12.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\r\n */\r\n setToContext: function (ctx)\r\n {\r\n var matrix = this.matrix;\r\n\r\n ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n return ctx;\r\n },\r\n\r\n /**\r\n * Copy the values in this Matrix to the array given.\r\n * \r\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToArray\r\n * @since 3.12.0\r\n *\r\n * @param {array} [out] - The array to copy the matrix values in to.\r\n *\r\n * @return {array} An array where elements 0 to 5 contain the values from this matrix.\r\n */\r\n copyToArray: function (out)\r\n {\r\n var matrix = this.matrix;\r\n\r\n if (out === undefined)\r\n {\r\n out = [ matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5] ];\r\n }\r\n else\r\n {\r\n out[0] = matrix[0];\r\n out[1] = matrix[1];\r\n out[2] = matrix[2];\r\n out[3] = matrix[3];\r\n out[4] = matrix[4];\r\n out[5] = matrix[5];\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setTransform\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The Scale X value.\r\n * @param {number} b - The Shear Y value.\r\n * @param {number} c - The Shear X value.\r\n * @param {number} d - The Scale Y value.\r\n * @param {number} tx - The Translate X value.\r\n * @param {number} ty - The Translate Y value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n setTransform: function (a, b, c, d, tx, ty)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = a;\r\n matrix[1] = b;\r\n matrix[2] = c;\r\n matrix[3] = d;\r\n matrix[4] = tx;\r\n matrix[5] = ty;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Decompose this Matrix into its translation, scale and rotation values using QR decomposition.\r\n * \r\n * The result must be applied in the following order to reproduce the current matrix:\r\n * \r\n * translate -> rotate -> scale\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#decomposeMatrix\r\n * @since 3.0.0\r\n *\r\n * @return {object} The decomposed Matrix.\r\n */\r\n decomposeMatrix: function ()\r\n {\r\n var decomposedMatrix = this.decomposedMatrix;\r\n\r\n var matrix = this.matrix;\r\n\r\n // a = scale X (1)\r\n // b = shear Y (0)\r\n // c = shear X (0)\r\n // d = scale Y (1)\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n var determ = a * d - b * c;\r\n\r\n decomposedMatrix.translateX = matrix[4];\r\n decomposedMatrix.translateY = matrix[5];\r\n\r\n if (a || b)\r\n {\r\n var r = Math.sqrt(a * a + b * b);\r\n\r\n decomposedMatrix.rotation = (b > 0) ? Math.acos(a / r) : -Math.acos(a / r);\r\n decomposedMatrix.scaleX = r;\r\n decomposedMatrix.scaleY = determ / r;\r\n }\r\n else if (c || d)\r\n {\r\n var s = Math.sqrt(c * c + d * d);\r\n\r\n decomposedMatrix.rotation = Math.PI * 0.5 - (d > 0 ? Math.acos(-c / s) : -Math.acos(c / s));\r\n decomposedMatrix.scaleX = determ / s;\r\n decomposedMatrix.scaleY = s;\r\n }\r\n else\r\n {\r\n decomposedMatrix.rotation = 0;\r\n decomposedMatrix.scaleX = 0;\r\n decomposedMatrix.scaleY = 0;\r\n }\r\n\r\n return decomposedMatrix;\r\n },\r\n\r\n /**\r\n * Apply the identity, translate, rotate and scale operations on the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#applyITRS\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation.\r\n * @param {number} y - The vertical translation.\r\n * @param {number} rotation - The angle of rotation in radians.\r\n * @param {number} scaleX - The horizontal scale.\r\n * @param {number} scaleY - The vertical scale.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n applyITRS: function (x, y, rotation, scaleX, scaleY)\r\n {\r\n var matrix = this.matrix;\r\n\r\n var radianSin = Math.sin(rotation);\r\n var radianCos = Math.cos(rotation);\r\n\r\n // Translate\r\n matrix[4] = x;\r\n matrix[5] = y;\r\n\r\n // Rotate and Scale\r\n matrix[0] = radianCos * scaleX;\r\n matrix[1] = radianSin * scaleX;\r\n matrix[2] = -radianSin * scaleY;\r\n matrix[3] = radianCos * scaleY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes the `x` and `y` values and returns a new position in the `output` vector that is the inverse of\r\n * the current matrix with its transformation applied.\r\n * \r\n * Can be used to translate points from world to local space.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#applyInverse\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - The x position to translate.\r\n * @param {number} y - The y position to translate.\r\n * @param {Phaser.Math.Vector2} [output] - A Vector2, or point-like object, to store the results in.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates, inverse-transformed through this matrix.\r\n */\r\n applyInverse: function (x, y, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n var id = 1 / ((a * d) + (c * -b));\r\n\r\n output.x = (d * id * x) + (-c * id * y) + (((ty * c) - (tx * d)) * id);\r\n output.y = (a * id * y) + (-b * id * x) + (((-ty * a) + (tx * b)) * id);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the X component of this matrix multiplied by the given values.\r\n * This is the same as `x * a + y * c + e`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getX\r\n * @since 3.12.0\r\n * \r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n *\r\n * @return {number} The calculated x value.\r\n */\r\n getX: function (x, y)\r\n {\r\n return x * this.a + y * this.c + this.e;\r\n },\r\n\r\n /**\r\n * Returns the Y component of this matrix multiplied by the given values.\r\n * This is the same as `x * b + y * d + f`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getY\r\n * @since 3.12.0\r\n * \r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n *\r\n * @return {number} The calculated y value.\r\n */\r\n getY: function (x, y)\r\n {\r\n return x * this.b + y * this.d + this.f;\r\n },\r\n\r\n /**\r\n * Returns the X component of this matrix multiplied by the given values.\r\n * \r\n * This is the same as `x * a + y * c + e`, optionally passing via `Math.round`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getXRound\r\n * @since 3.50.0\r\n * \r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {boolean} [round=false] - Math.round the resulting value?\r\n *\r\n * @return {number} The calculated x value.\r\n */\r\n getXRound: function (x, y, round)\r\n {\r\n var v = this.getX(x, y);\r\n\r\n if (round)\r\n {\r\n v = Math.round(v);\r\n }\r\n\r\n return v;\r\n },\r\n\r\n /**\r\n * Returns the Y component of this matrix multiplied by the given values.\r\n * \r\n * This is the same as `x * b + y * d + f`, optionally passing via `Math.round`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getYRound\r\n * @since 3.50.0\r\n * \r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {boolean} [round=false] - Math.round the resulting value?\r\n *\r\n * @return {number} The calculated y value.\r\n */\r\n getYRound: function (x, y, round)\r\n {\r\n var v = this.getY(x, y);\r\n\r\n if (round)\r\n {\r\n v = Math.round(v);\r\n }\r\n\r\n return v;\r\n },\r\n\r\n /**\r\n * Returns a string that can be used in a CSS Transform call as a `matrix` property.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getCSSMatrix\r\n * @since 3.12.0\r\n *\r\n * @return {string} A string containing the CSS Transform matrix values.\r\n */\r\n getCSSMatrix: function ()\r\n {\r\n var m = this.matrix;\r\n\r\n return 'matrix(' + m[0] + ',' + m[1] + ',' + m[2] + ',' + m[3] + ',' + m[4] + ',' + m[5] + ')';\r\n },\r\n\r\n /**\r\n * Destroys this Transform Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#destroy\r\n * @since 3.4.0\r\n */\r\n destroy: function ()\r\n {\r\n this.matrix = null;\r\n this.decomposedMatrix = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TransformMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 1; // 0001\r\n\r\n/**\r\n * Provides methods used for setting the visibility of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Visible\r\n * @since 3.0.0\r\n */\r\n\r\nvar Visible = {\r\n\r\n /**\r\n * Private internal value. Holds the visible value.\r\n * \r\n * @name Phaser.GameObjects.Components.Visible#_visible\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n _visible: true,\r\n\r\n /**\r\n * The visible state of the Game Object.\r\n * \r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n * \r\n * @name Phaser.GameObjects.Components.Visible#visible\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n visible: {\r\n\r\n get: function ()\r\n {\r\n return this._visible;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value)\r\n {\r\n this._visible = true;\r\n this.renderFlags |= _FLAG;\r\n }\r\n else\r\n {\r\n this._visible = false;\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the visibility of this Game Object.\r\n * \r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n *\r\n * @method Phaser.GameObjects.Components.Visible#setVisible\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The visible state of the Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setVisible: function (value)\r\n {\r\n this.visible = value;\r\n\r\n return this;\r\n }\r\n};\r\n\r\nmodule.exports = Visible;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.GameObjects.Components\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Alpha: require('./Alpha'),\r\n AlphaSingle: require('./AlphaSingle'),\r\n Animation: require('./Animation'),\r\n BlendMode: require('./BlendMode'),\r\n ComputedSize: require('./ComputedSize'),\r\n Crop: require('./Crop'),\r\n Depth: require('./Depth'),\r\n Flip: require('./Flip'),\r\n GetBounds: require('./GetBounds'),\r\n Mask: require('./Mask'),\r\n Origin: require('./Origin'),\r\n PathFollower: require('./PathFollower'),\r\n Pipeline: require('./Pipeline'),\r\n ScrollFactor: require('./ScrollFactor'),\r\n Size: require('./Size'),\r\n Texture: require('./Texture'),\r\n TextureCrop: require('./TextureCrop'),\r\n Tint: require('./Tint'),\r\n ToJSON: require('./ToJSON'),\r\n Transform: require('./Transform'),\r\n TransformMatrix: require('./TransformMatrix'),\r\n Visible: require('./Visible')\r\n\r\n};\r\n","/**\n * @author Richard Davey \n * @author Felipe Alfonso <@bitnenfer>\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar ArrayUtils = require('../../utils/array');\nvar BlendModes = require('../../renderer/BlendModes');\nvar Class = require('../../utils/Class');\nvar Components = require('../components');\nvar Events = require('../events');\nvar GameObject = require('../GameObject');\nvar GameObjectEvents = require('../events');\nvar Rectangle = require('../../geom/rectangle/Rectangle');\nvar Render = require('./ContainerRender');\nvar Union = require('../../geom/rectangle/Union');\nvar Vector2 = require('../../math/Vector2');\n\n/**\n * @classdesc\n * A Container Game Object.\n *\n * A Container, as the name implies, can 'contain' other types of Game Object.\n * When a Game Object is added to a Container, the Container becomes responsible for the rendering of it.\n * By default it will be removed from the Display List and instead added to the Containers own internal list.\n *\n * The position of the Game Object automatically becomes relative to the position of the Container.\n *\n * The origin of a Container is 0x0 (in local space) and that cannot be changed. The children you add to the\n * Container should be positioned with this value in mind. I.e. you should treat 0x0 as being the center of\n * the Container, and position children positively and negative around it as required.\n *\n * When the Container is rendered, all of its children are rendered as well, in the order in which they exist\n * within the Container. Container children can be repositioned using methods such as `MoveUp`, `MoveDown` and `SendToBack`.\n *\n * If you modify a transform property of the Container, such as `Container.x` or `Container.rotation` then it will\n * automatically influence all children as well.\n *\n * Containers can include other Containers for deeply nested transforms.\n *\n * Containers can have masks set on them and can be used as a mask too. However, Container children cannot be masked.\n * The masks do not 'stack up'. Only a Container on the root of the display list will use its mask.\n *\n * Containers can be enabled for input. Because they do not have a texture you need to provide a shape for them\n * to use as their hit area. Container children can also be enabled for input, independent of the Container.\n *\n * Containers can be given a physics body for either Arcade Physics, Impact Physics or Matter Physics. However,\n * if Container _children_ are enabled for physics you may get unexpected results, such as offset bodies,\n * if the Container itself, or any of its ancestors, is positioned anywhere other than at 0 x 0. Container children\n * with physics do not factor in the Container due to the excessive extra calculations needed. Please structure\n * your game to work around this.\n *\n * It's important to understand the impact of using Containers. They add additional processing overhead into\n * every one of their children. The deeper you nest them, the more the cost escalates. This is especially true\n * for input events. You also loose the ability to set the display depth of Container children in the same\n * flexible manner as those not within them. In short, don't use them for the sake of it. You pay a small cost\n * every time you create one, try to structure your game around avoiding that where possible.\n *\n * @class Container\n * @extends Phaser.GameObjects.GameObject\n * @memberof Phaser.GameObjects\n * @constructor\n * @since 3.4.0\n *\n * @extends Phaser.GameObjects.Components.AlphaSingle\n * @extends Phaser.GameObjects.Components.BlendMode\n * @extends Phaser.GameObjects.Components.ComputedSize\n * @extends Phaser.GameObjects.Components.Depth\n * @extends Phaser.GameObjects.Components.Mask\n * @extends Phaser.GameObjects.Components.Transform\n * @extends Phaser.GameObjects.Components.Visible\n *\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\n * @param {Phaser.GameObjects.GameObject[]} [children] - An optional array of Game Objects to add to this Container.\n */\nvar Container = new Class({\n\n Extends: GameObject,\n\n Mixins: [\n Components.AlphaSingle,\n Components.BlendMode,\n Components.ComputedSize,\n Components.Depth,\n Components.Mask,\n Components.Transform,\n Components.Visible,\n Render\n ],\n\n initialize:\n\n function Container (scene, x, y, children)\n {\n GameObject.call(this, scene, 'Container');\n\n /**\n * An array holding the children of this Container.\n *\n * @name Phaser.GameObjects.Container#list\n * @type {Phaser.GameObjects.GameObject[]}\n * @since 3.4.0\n */\n this.list = [];\n\n /**\n * Does this Container exclusively manage its children?\n *\n * The default is `true` which means a child added to this Container cannot\n * belong in another Container, which includes the Scene display list.\n *\n * If you disable this then this Container will no longer exclusively manage its children.\n * This allows you to create all kinds of interesting graphical effects, such as replicating\n * Game Objects without reparenting them all over the Scene.\n * However, doing so will prevent children from receiving any kind of input event or have\n * their physics bodies work by default, as they're no longer a single entity on the\n * display list, but are being replicated where-ever this Container is.\n *\n * @name Phaser.GameObjects.Container#exclusive\n * @type {boolean}\n * @default true\n * @since 3.4.0\n */\n this.exclusive = true;\n\n /**\n * Containers can have an optional maximum size. If set to anything above 0 it\n * will constrict the addition of new Game Objects into the Container, capping off\n * the maximum limit the Container can grow in size to.\n *\n * @name Phaser.GameObjects.Container#maxSize\n * @type {integer}\n * @default -1\n * @since 3.4.0\n */\n this.maxSize = -1;\n\n /**\n * The cursor position.\n *\n * @name Phaser.GameObjects.Container#position\n * @type {integer}\n * @since 3.4.0\n */\n this.position = 0;\n\n /**\n * Internal Transform Matrix used for local space conversion.\n *\n * @name Phaser.GameObjects.Container#localTransform\n * @type {Phaser.GameObjects.Components.TransformMatrix}\n * @since 3.4.0\n */\n this.localTransform = new Components.TransformMatrix();\n\n /**\n * Internal temporary Transform Matrix used to avoid object creation.\n *\n * @name Phaser.GameObjects.Container#tempTransformMatrix\n * @type {Phaser.GameObjects.Components.TransformMatrix}\n * @private\n * @since 3.4.0\n */\n this.tempTransformMatrix = new Components.TransformMatrix();\n\n /**\n * A reference to the Scene Display List.\n *\n * @name Phaser.GameObjects.Container#_displayList\n * @type {Phaser.GameObjects.DisplayList}\n * @private\n * @since 3.4.0\n */\n this._displayList = scene.sys.displayList;\n\n /**\n * The property key to sort by.\n *\n * @name Phaser.GameObjects.Container#_sortKey\n * @type {string}\n * @private\n * @since 3.4.0\n */\n this._sortKey = '';\n\n /**\n * A reference to the Scene Systems Event Emitter.\n *\n * @name Phaser.GameObjects.Container#_sysEvents\n * @type {Phaser.Events.EventEmitter}\n * @private\n * @since 3.9.0\n */\n this._sysEvents = scene.sys.events;\n\n /**\n * The horizontal scroll factor of this Container.\n *\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\n *\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\n * It does not change the Containers actual position values.\n *\n * For a Container, setting this value will only update the Container itself, not its children.\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\n *\n * A value of 1 means it will move exactly in sync with a camera.\n * A value of 0 means it will not move at all, even if the camera moves.\n * Other values control the degree to which the camera movement is mapped to this Container.\n *\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\n * calculating physics collisions. Bodies always collide based on their world position, but changing\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\n * them from physics bodies if not accounted for in your code.\n *\n * @name Phaser.GameObjects.Container#scrollFactorX\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n this.scrollFactorX = 1;\n\n /**\n * The vertical scroll factor of this Container.\n *\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\n *\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\n * It does not change the Containers actual position values.\n *\n * For a Container, setting this value will only update the Container itself, not its children.\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\n *\n * A value of 1 means it will move exactly in sync with a camera.\n * A value of 0 means it will not move at all, even if the camera moves.\n * Other values control the degree to which the camera movement is mapped to this Container.\n *\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\n * calculating physics collisions. Bodies always collide based on their world position, but changing\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\n * them from physics bodies if not accounted for in your code.\n *\n * @name Phaser.GameObjects.Container#scrollFactorY\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n this.scrollFactorY = 1;\n\n this.setPosition(x, y);\n\n this.clearAlpha();\n\n this.setBlendMode(BlendModes.SKIP_CHECK);\n\n if (children)\n {\n this.add(children);\n }\n },\n\n /**\n * Internal value to allow Containers to be used for input and physics.\n * Do not change this value. It has no effect other than to break things.\n *\n * @name Phaser.GameObjects.Container#originX\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n originX: {\n\n get: function ()\n {\n return 0.5;\n }\n\n },\n\n /**\n * Internal value to allow Containers to be used for input and physics.\n * Do not change this value. It has no effect other than to break things.\n *\n * @name Phaser.GameObjects.Container#originY\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n originY: {\n\n get: function ()\n {\n return 0.5;\n }\n\n },\n\n /**\n * Internal value to allow Containers to be used for input and physics.\n * Do not change this value. It has no effect other than to break things.\n *\n * @name Phaser.GameObjects.Container#displayOriginX\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n displayOriginX: {\n\n get: function ()\n {\n return this.width * 0.5;\n }\n\n },\n\n /**\n * Internal value to allow Containers to be used for input and physics.\n * Do not change this value. It has no effect other than to break things.\n *\n * @name Phaser.GameObjects.Container#displayOriginY\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n displayOriginY: {\n\n get: function ()\n {\n return this.height * 0.5;\n }\n\n },\n\n /**\n * Does this Container exclusively manage its children?\n *\n * The default is `true` which means a child added to this Container cannot\n * belong in another Container, which includes the Scene display list.\n *\n * If you disable this then this Container will no longer exclusively manage its children.\n * This allows you to create all kinds of interesting graphical effects, such as replicating\n * Game Objects without reparenting them all over the Scene.\n * However, doing so will prevent children from receiving any kind of input event or have\n * their physics bodies work by default, as they're no longer a single entity on the\n * display list, but are being replicated where-ever this Container is.\n *\n * @method Phaser.GameObjects.Container#setExclusive\n * @since 3.4.0\n *\n * @param {boolean} [value=true] - The exclusive state of this Container.\n *\n * @return {this} This Container.\n */\n setExclusive: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.exclusive = value;\n\n return this;\n },\n\n /**\n * Gets the bounds of this Container. It works by iterating all children of the Container,\n * getting their respective bounds, and then working out a min-max rectangle from that.\n * It does not factor in if the children render or not, all are included.\n *\n * Some children are unable to return their bounds, such as Graphics objects, in which case\n * they are skipped.\n *\n * Depending on the quantity of children in this Container it could be a really expensive call,\n * so cache it and only poll it as needed.\n *\n * The values are stored and returned in a Rectangle object.\n *\n * @method Phaser.GameObjects.Container#getBounds\n * @since 3.4.0\n *\n * @param {Phaser.Geom.Rectangle} [output] - A Geom.Rectangle object to store the values in. If not provided a new Rectangle will be created.\n *\n * @return {Phaser.Geom.Rectangle} The values stored in the output object.\n */\n getBounds: function (output)\n {\n if (output === undefined) { output = new Rectangle(); }\n\n output.setTo(this.x, this.y, 0, 0);\n\n if (this.parentContainer)\n {\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\n var transformedPosition = parentMatrix.transformPoint(this.x, this.y);\n\n output.setTo(transformedPosition.x, transformedPosition.y, 0, 0);\n }\n\n if (this.list.length > 0)\n {\n var children = this.list;\n var tempRect = new Rectangle();\n var hasSetFirst = false;\n\n output.setEmpty();\n\n for (var i = 0; i < children.length; i++)\n {\n var entry = children[i];\n\n if (entry.getBounds)\n {\n entry.getBounds(tempRect);\n\n if (!hasSetFirst)\n {\n output.setTo(tempRect.x, tempRect.y, tempRect.width, tempRect.height);\n hasSetFirst = true;\n }\n else\n {\n Union(tempRect, output, output);\n }\n }\n }\n }\n\n return output;\n },\n\n /**\n * Internal add handler.\n *\n * @method Phaser.GameObjects.Container#addHandler\n * @private\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just added to this Container.\n */\n addHandler: function (gameObject)\n {\n gameObject.once(Events.DESTROY, this.remove, this);\n\n if (this.exclusive)\n {\n this._displayList.remove(gameObject);\n\n if (gameObject.parentContainer)\n {\n gameObject.parentContainer.remove(gameObject);\n }\n\n gameObject.parentContainer = this;\n }\n\n // Is only on the Display List via this Container\n if (!this.scene.sys.displayList.exists(gameObject))\n {\n gameObject.emit(GameObjectEvents.ADDED_TO_SCENE, gameObject, this.scene);\n }\n },\n\n /**\n * Internal remove handler.\n *\n * @method Phaser.GameObjects.Container#removeHandler\n * @private\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just removed from this Container.\n */\n removeHandler: function (gameObject)\n {\n gameObject.off(Events.DESTROY, this.remove);\n\n if (this.exclusive)\n {\n gameObject.parentContainer = null;\n }\n\n // Is only on the Display List via this Container\n if (!this.scene.sys.displayList.exists(gameObject))\n {\n gameObject.emit(GameObjectEvents.REMOVED_FROM_SCENE, gameObject, this.scene);\n }\n },\n\n /**\n * Takes a Point-like object, such as a Vector2, Geom.Point or object with public x and y properties,\n * and transforms it into the space of this Container, then returns it in the output object.\n *\n * @method Phaser.GameObjects.Container#pointToContainer\n * @since 3.4.0\n *\n * @param {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} source - The Source Point to be transformed.\n * @param {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} [output] - A destination object to store the transformed point in. If none given a Vector2 will be created and returned.\n *\n * @return {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} The transformed point.\n */\n pointToContainer: function (source, output)\n {\n if (output === undefined) { output = new Vector2(); }\n\n if (this.parentContainer)\n {\n this.parentContainer.pointToContainer(source, output);\n }\n else\n {\n output = new Vector2(source.x, source.y);\n }\n\n var tempMatrix = this.tempTransformMatrix;\n\n // No need to loadIdentity because applyITRS overwrites every value anyway\n tempMatrix.applyITRS(this.x, this.y, this.rotation, this.scaleX, this.scaleY);\n\n tempMatrix.invert();\n\n tempMatrix.transformPoint(source.x, source.y, output);\n\n return output;\n },\n\n /**\n * Returns the world transform matrix as used for Bounds checks.\n *\n * The returned matrix is temporal and shouldn't be stored.\n *\n * @method Phaser.GameObjects.Container#getBoundsTransformMatrix\n * @since 3.4.0\n *\n * @return {Phaser.GameObjects.Components.TransformMatrix} The world transform matrix.\n */\n getBoundsTransformMatrix: function ()\n {\n return this.getWorldTransformMatrix(this.tempTransformMatrix, this.localTransform);\n },\n\n /**\n * Adds the given Game Object, or array of Game Objects, to this Container.\n *\n * Each Game Object must be unique within the Container.\n *\n * @method Phaser.GameObjects.Container#add\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\n *\n * @return {this} This Container instance.\n */\n add: function (child)\n {\n ArrayUtils.Add(this.list, child, this.maxSize, this.addHandler, this);\n\n return this;\n },\n\n /**\n * Adds the given Game Object, or array of Game Objects, to this Container at the specified position.\n *\n * Existing Game Objects in the Container are shifted up.\n *\n * Each Game Object must be unique within the Container.\n *\n * @method Phaser.GameObjects.Container#addAt\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\n * @param {integer} [index=0] - The position to insert the Game Object/s at.\n *\n * @return {this} This Container instance.\n */\n addAt: function (child, index)\n {\n ArrayUtils.AddAt(this.list, child, index, this.maxSize, this.addHandler, this);\n\n return this;\n },\n\n /**\n * Returns the Game Object at the given position in this Container.\n *\n * @method Phaser.GameObjects.Container#getAt\n * @since 3.4.0\n *\n * @param {integer} index - The position to get the Game Object from.\n *\n * @return {?Phaser.GameObjects.GameObject} The Game Object at the specified index, or `null` if none found.\n */\n getAt: function (index)\n {\n return this.list[index];\n },\n\n /**\n * Returns the index of the given Game Object in this Container.\n *\n * @method Phaser.GameObjects.Container#getIndex\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container.\n *\n * @return {integer} The index of the Game Object in this Container, or -1 if not found.\n */\n getIndex: function (child)\n {\n return this.list.indexOf(child);\n },\n\n /**\n * Sort the contents of this Container so the items are in order based on the given property.\n * For example: `sort('alpha')` would sort the elements based on the value of their `alpha` property.\n *\n * @method Phaser.GameObjects.Container#sort\n * @since 3.4.0\n *\n * @param {string} property - The property to lexically sort by.\n * @param {function} [handler] - Provide your own custom handler function. Will receive 2 children which it should compare and return a boolean.\n *\n * @return {this} This Container instance.\n */\n sort: function (property, handler)\n {\n if (!property)\n {\n return this;\n }\n\n if (handler === undefined)\n {\n handler = function (childA, childB)\n {\n return childA[property] - childB[property];\n };\n }\n\n ArrayUtils.StableSort.inplace(this.list, handler);\n\n return this;\n },\n\n /**\n * Searches for the first instance of a child with its `name` property matching the given argument.\n * Should more than one child have the same name only the first is returned.\n *\n * @method Phaser.GameObjects.Container#getByName\n * @since 3.4.0\n *\n * @param {string} name - The name to search for.\n *\n * @return {?Phaser.GameObjects.GameObject} The first child with a matching name, or `null` if none were found.\n */\n getByName: function (name)\n {\n return ArrayUtils.GetFirst(this.list, 'name', name);\n },\n\n /**\n * Returns a random Game Object from this Container.\n *\n * @method Phaser.GameObjects.Container#getRandom\n * @since 3.4.0\n *\n * @param {integer} [startIndex=0] - An optional start index.\n * @param {integer} [length] - An optional length, the total number of elements (from the startIndex) to choose from.\n *\n * @return {?Phaser.GameObjects.GameObject} A random child from the Container, or `null` if the Container is empty.\n */\n getRandom: function (startIndex, length)\n {\n return ArrayUtils.GetRandom(this.list, startIndex, length);\n },\n\n /**\n * Gets the first Game Object in this Container.\n *\n * You can also specify a property and value to search for, in which case it will return the first\n * Game Object in this Container with a matching property and / or value.\n *\n * For example: `getFirst('visible', true)` would return the first Game Object that had its `visible` property set.\n *\n * You can limit the search to the `startIndex` - `endIndex` range.\n *\n * @method Phaser.GameObjects.Container#getFirst\n * @since 3.4.0\n *\n * @param {string} property - The property to test on each Game Object in the Container.\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\n * @param {integer} [startIndex=0] - An optional start index to search from.\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\n *\n * @return {?Phaser.GameObjects.GameObject} The first matching Game Object, or `null` if none was found.\n */\n getFirst: function (property, value, startIndex, endIndex)\n {\n return ArrayUtils.GetFirst(this.list, property, value, startIndex, endIndex);\n },\n\n /**\n * Returns all Game Objects in this Container.\n *\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\n *\n * For example: `getAll('body')` would return only Game Objects that have a body property.\n *\n * You can also specify a value to compare the property to:\n *\n * `getAll('visible', true)` would return only Game Objects that have their visible property set to `true`.\n *\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\n * the first 50 Game Objects.\n *\n * @method Phaser.GameObjects.Container#getAll\n * @since 3.4.0\n *\n * @param {string} [property] - The property to test on each Game Object in the Container.\n * @param {any} [value] - If property is set then the `property` must strictly equal this value to be included in the results.\n * @param {integer} [startIndex=0] - An optional start index to search from.\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\n *\n * @return {Phaser.GameObjects.GameObject[]} An array of matching Game Objects from this Container.\n */\n getAll: function (property, value, startIndex, endIndex)\n {\n return ArrayUtils.GetAll(this.list, property, value, startIndex, endIndex);\n },\n\n /**\n * Returns the total number of Game Objects in this Container that have a property\n * matching the given value.\n *\n * For example: `count('visible', true)` would count all the elements that have their visible property set.\n *\n * You can optionally limit the operation to the `startIndex` - `endIndex` range.\n *\n * @method Phaser.GameObjects.Container#count\n * @since 3.4.0\n *\n * @param {string} property - The property to check.\n * @param {any} value - The value to check.\n * @param {integer} [startIndex=0] - An optional start index to search from.\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\n *\n * @return {integer} The total number of Game Objects in this Container with a property matching the given value.\n */\n count: function (property, value, startIndex, endIndex)\n {\n return ArrayUtils.CountAllMatching(this.list, property, value, startIndex, endIndex);\n },\n\n /**\n * Swaps the position of two Game Objects in this Container.\n * Both Game Objects must belong to this Container.\n *\n * @method Phaser.GameObjects.Container#swap\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child1 - The first Game Object to swap.\n * @param {Phaser.GameObjects.GameObject} child2 - The second Game Object to swap.\n *\n * @return {this} This Container instance.\n */\n swap: function (child1, child2)\n {\n ArrayUtils.Swap(this.list, child1, child2);\n\n return this;\n },\n\n /**\n * Moves a Game Object to a new position within this Container.\n *\n * The Game Object must already be a child of this Container.\n *\n * The Game Object is removed from its old position and inserted into the new one.\n * Therefore the Container size does not change. Other children will change position accordingly.\n *\n * @method Phaser.GameObjects.Container#moveTo\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to move.\n * @param {integer} index - The new position of the Game Object in this Container.\n *\n * @return {this} This Container instance.\n */\n moveTo: function (child, index)\n {\n ArrayUtils.MoveTo(this.list, child, index);\n\n return this;\n },\n\n /**\n * Removes the given Game Object, or array of Game Objects, from this Container.\n *\n * The Game Objects must already be children of this Container.\n *\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\n *\n * @method Phaser.GameObjects.Container#remove\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to be removed from the Container.\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each child successfully removed from this Container.\n *\n * @return {this} This Container instance.\n */\n remove: function (child, destroyChild)\n {\n var removed = ArrayUtils.Remove(this.list, child, this.removeHandler, this);\n\n if (destroyChild && removed)\n {\n if (!Array.isArray(removed))\n {\n removed = [ removed ];\n }\n\n for (var i = 0; i < removed.length; i++)\n {\n removed[i].destroy();\n }\n }\n\n return this;\n },\n\n /**\n * Removes the Game Object at the given position in this Container.\n *\n * You can also optionally call `destroy` on the Game Object, if one is found.\n *\n * @method Phaser.GameObjects.Container#removeAt\n * @since 3.4.0\n *\n * @param {integer} index - The index of the Game Object to be removed.\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\n *\n * @return {this} This Container instance.\n */\n removeAt: function (index, destroyChild)\n {\n var removed = ArrayUtils.RemoveAt(this.list, index, this.removeHandler, this);\n\n if (destroyChild && removed)\n {\n removed.destroy();\n }\n\n return this;\n },\n\n /**\n * Removes the Game Objects between the given positions in this Container.\n *\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\n *\n * @method Phaser.GameObjects.Container#removeBetween\n * @since 3.4.0\n *\n * @param {integer} [startIndex=0] - An optional start index to search from.\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\n *\n * @return {this} This Container instance.\n */\n removeBetween: function (startIndex, endIndex, destroyChild)\n {\n var removed = ArrayUtils.RemoveBetween(this.list, startIndex, endIndex, this.removeHandler, this);\n\n if (destroyChild)\n {\n for (var i = 0; i < removed.length; i++)\n {\n removed[i].destroy();\n }\n }\n\n return this;\n },\n\n /**\n * Removes all Game Objects from this Container.\n *\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\n *\n * @method Phaser.GameObjects.Container#removeAll\n * @since 3.4.0\n *\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\n *\n * @return {this} This Container instance.\n */\n removeAll: function (destroyChild)\n {\n var removed = ArrayUtils.RemoveBetween(this.list, 0, this.list.length, this.removeHandler, this);\n\n if (destroyChild)\n {\n for (var i = 0; i < removed.length; i++)\n {\n removed[i].destroy();\n }\n }\n\n return this;\n },\n\n /**\n * Brings the given Game Object to the top of this Container.\n * This will cause it to render on-top of any other objects in the Container.\n *\n * @method Phaser.GameObjects.Container#bringToTop\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to bring to the top of the Container.\n *\n * @return {this} This Container instance.\n */\n bringToTop: function (child)\n {\n ArrayUtils.BringToTop(this.list, child);\n\n return this;\n },\n\n /**\n * Sends the given Game Object to the bottom of this Container.\n * This will cause it to render below any other objects in the Container.\n *\n * @method Phaser.GameObjects.Container#sendToBack\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to send to the bottom of the Container.\n *\n * @return {this} This Container instance.\n */\n sendToBack: function (child)\n {\n ArrayUtils.SendToBack(this.list, child);\n\n return this;\n },\n\n /**\n * Moves the given Game Object up one place in this Container, unless it's already at the top.\n *\n * @method Phaser.GameObjects.Container#moveUp\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\n *\n * @return {this} This Container instance.\n */\n moveUp: function (child)\n {\n ArrayUtils.MoveUp(this.list, child);\n\n return this;\n },\n\n /**\n * Moves the given Game Object down one place in this Container, unless it's already at the bottom.\n *\n * @method Phaser.GameObjects.Container#moveDown\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\n *\n * @return {this} This Container instance.\n */\n moveDown: function (child)\n {\n ArrayUtils.MoveDown(this.list, child);\n\n return this;\n },\n\n /**\n * Reverses the order of all Game Objects in this Container.\n *\n * @method Phaser.GameObjects.Container#reverse\n * @since 3.4.0\n *\n * @return {this} This Container instance.\n */\n reverse: function ()\n {\n this.list.reverse();\n\n return this;\n },\n\n /**\n * Shuffles the all Game Objects in this Container using the Fisher-Yates implementation.\n *\n * @method Phaser.GameObjects.Container#shuffle\n * @since 3.4.0\n *\n * @return {this} This Container instance.\n */\n shuffle: function ()\n {\n ArrayUtils.Shuffle(this.list);\n\n return this;\n },\n\n /**\n * Replaces a Game Object in this Container with the new Game Object.\n * The new Game Object cannot already be a child of this Container.\n *\n * @method Phaser.GameObjects.Container#replace\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} oldChild - The Game Object in this Container that will be replaced.\n * @param {Phaser.GameObjects.GameObject} newChild - The Game Object to be added to this Container.\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\n *\n * @return {this} This Container instance.\n */\n replace: function (oldChild, newChild, destroyChild)\n {\n var moved = ArrayUtils.Replace(this.list, oldChild, newChild);\n\n if (moved)\n {\n this.addHandler(newChild);\n this.removeHandler(oldChild);\n\n if (destroyChild)\n {\n oldChild.destroy();\n }\n }\n\n return this;\n },\n\n /**\n * Returns `true` if the given Game Object is a direct child of this Container.\n *\n * This check does not scan nested Containers.\n *\n * @method Phaser.GameObjects.Container#exists\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to check for within this Container.\n *\n * @return {boolean} True if the Game Object is an immediate child of this Container, otherwise false.\n */\n exists: function (child)\n {\n return (this.list.indexOf(child) > -1);\n },\n\n /**\n * Sets the property to the given value on all Game Objects in this Container.\n *\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\n * the first 50 Game Objects.\n *\n * @method Phaser.GameObjects.Container#setAll\n * @since 3.4.0\n *\n * @param {string} property - The property that must exist on the Game Object.\n * @param {any} value - The value to get the property to.\n * @param {integer} [startIndex=0] - An optional start index to search from.\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\n *\n * @return {this} This Container instance.\n */\n setAll: function (property, value, startIndex, endIndex)\n {\n ArrayUtils.SetAll(this.list, property, value, startIndex, endIndex);\n\n return this;\n },\n\n /**\n * @callback EachContainerCallback\n * @generic I - [item]\n *\n * @param {*} item - The child Game Object of the Container.\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\n */\n\n /**\n * Passes all Game Objects in this Container to the given callback.\n *\n * A copy of the Container is made before passing each entry to your callback.\n * This protects against the callback itself modifying the Container.\n *\n * If you know for sure that the callback will not change the size of this Container\n * then you can use the more performant `Container.iterate` method instead.\n *\n * @method Phaser.GameObjects.Container#each\n * @since 3.4.0\n *\n * @param {function} callback - The function to call.\n * @param {object} [context] - Value to use as `this` when executing callback.\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\n *\n * @return {this} This Container instance.\n */\n each: function (callback, context)\n {\n var args = [ null ];\n var i;\n var temp = this.list.slice();\n var len = temp.length;\n\n for (i = 2; i < arguments.length; i++)\n {\n args.push(arguments[i]);\n }\n\n for (i = 0; i < len; i++)\n {\n args[0] = temp[i];\n\n callback.apply(context, args);\n }\n\n return this;\n },\n\n /**\n * Passes all Game Objects in this Container to the given callback.\n *\n * Only use this method when you absolutely know that the Container will not be modified during\n * the iteration, i.e. by removing or adding to its contents.\n *\n * @method Phaser.GameObjects.Container#iterate\n * @since 3.4.0\n *\n * @param {function} callback - The function to call.\n * @param {object} [context] - Value to use as `this` when executing callback.\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\n *\n * @return {this} This Container instance.\n */\n iterate: function (callback, context)\n {\n var args = [ null ];\n var i;\n\n for (i = 2; i < arguments.length; i++)\n {\n args.push(arguments[i]);\n }\n\n for (i = 0; i < this.list.length; i++)\n {\n args[0] = this.list[i];\n\n callback.apply(context, args);\n }\n\n return this;\n },\n\n /**\n * Sets the scroll factor of this Container and optionally all of its children.\n *\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\n *\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\n * It does not change the Game Objects actual position values.\n *\n * A value of 1 means it will move exactly in sync with a camera.\n * A value of 0 means it will not move at all, even if the camera moves.\n * Other values control the degree to which the camera movement is mapped to this Game Object.\n *\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\n * calculating physics collisions. Bodies always collide based on their world position, but changing\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\n * them from physics bodies if not accounted for in your code.\n *\n * @method Phaser.GameObjects.Container#setScrollFactor\n * @since 3.0.0\n *\n * @param {number} x - The horizontal scroll factor of this Game Object.\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\n * @param {boolean} [updateChildren=false] - Apply this scrollFactor to all Container children as well?\n *\n * @return {this} This Game Object instance.\n */\n setScrollFactor: function (x, y, updateChildren)\n {\n if (y === undefined) { y = x; }\n if (updateChildren === undefined) { updateChildren = false; }\n\n this.scrollFactorX = x;\n this.scrollFactorY = y;\n\n if (updateChildren)\n {\n ArrayUtils.SetAll(this.list, 'scrollFactorX', x);\n ArrayUtils.SetAll(this.list, 'scrollFactorY', y);\n }\n\n return this;\n },\n\n /**\n * The number of Game Objects inside this Container.\n *\n * @name Phaser.GameObjects.Container#length\n * @type {integer}\n * @readonly\n * @since 3.4.0\n */\n length: {\n\n get: function ()\n {\n return this.list.length;\n }\n\n },\n\n /**\n * Returns the first Game Object within the Container, or `null` if it is empty.\n *\n * You can move the cursor by calling `Container.next` and `Container.previous`.\n *\n * @name Phaser.GameObjects.Container#first\n * @type {?Phaser.GameObjects.GameObject}\n * @readonly\n * @since 3.4.0\n */\n first: {\n\n get: function ()\n {\n this.position = 0;\n\n if (this.list.length > 0)\n {\n return this.list[0];\n }\n else\n {\n return null;\n }\n }\n\n },\n\n /**\n * Returns the last Game Object within the Container, or `null` if it is empty.\n *\n * You can move the cursor by calling `Container.next` and `Container.previous`.\n *\n * @name Phaser.GameObjects.Container#last\n * @type {?Phaser.GameObjects.GameObject}\n * @readonly\n * @since 3.4.0\n */\n last: {\n\n get: function ()\n {\n if (this.list.length > 0)\n {\n this.position = this.list.length - 1;\n\n return this.list[this.position];\n }\n else\n {\n return null;\n }\n }\n\n },\n\n /**\n * Returns the next Game Object within the Container, or `null` if it is empty.\n *\n * You can move the cursor by calling `Container.next` and `Container.previous`.\n *\n * @name Phaser.GameObjects.Container#next\n * @type {?Phaser.GameObjects.GameObject}\n * @readonly\n * @since 3.4.0\n */\n next: {\n\n get: function ()\n {\n if (this.position < this.list.length)\n {\n this.position++;\n\n return this.list[this.position];\n }\n else\n {\n return null;\n }\n }\n\n },\n\n /**\n * Returns the previous Game Object within the Container, or `null` if it is empty.\n *\n * You can move the cursor by calling `Container.next` and `Container.previous`.\n *\n * @name Phaser.GameObjects.Container#previous\n * @type {?Phaser.GameObjects.GameObject}\n * @readonly\n * @since 3.4.0\n */\n previous: {\n\n get: function ()\n {\n if (this.position > 0)\n {\n this.position--;\n\n return this.list[this.position];\n }\n else\n {\n return null;\n }\n }\n\n },\n\n /**\n * Internal destroy handler, called as part of the destroy process.\n *\n * @method Phaser.GameObjects.Container#preDestroy\n * @protected\n * @since 3.9.0\n */\n preDestroy: function ()\n {\n this.removeAll(!!this.exclusive);\n\n this.localTransform.destroy();\n this.tempTransformMatrix.destroy();\n\n this.list = [];\n this._displayList = null;\n }\n\n});\n\nmodule.exports = Container;\n","/**\n * @author Richard Davey \n * @author Felipe Alfonso <@bitnenfer>\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Renders this Game Object with the Canvas Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method Phaser.GameObjects.Container#renderCanvas\n * @since 3.4.0\n * @private\n *\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar ContainerCanvasRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix)\n{\n var children = container.list;\n\n if (children.length === 0)\n {\n return;\n }\n\n var transformMatrix = container.localTransform;\n\n if (parentMatrix)\n {\n transformMatrix.loadIdentity();\n transformMatrix.multiply(parentMatrix);\n transformMatrix.translate(container.x, container.y);\n transformMatrix.rotate(container.rotation);\n transformMatrix.scale(container.scaleX, container.scaleY);\n }\n else\n {\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\n }\n\n var containerHasBlendMode = (container.blendMode !== -1);\n\n if (!containerHasBlendMode)\n {\n // If Container is SKIP_TEST then set blend mode to be Normal\n renderer.setBlendMode(0);\n }\n\n var alpha = container._alpha;\n var scrollFactorX = container.scrollFactorX;\n var scrollFactorY = container.scrollFactorY;\n\n if (container.mask)\n {\n container.mask.preRenderCanvas(renderer, null, camera);\n }\n\n for (var i = 0; i < children.length; i++)\n {\n var child = children[i];\n\n if (!child.willRender(camera))\n {\n continue;\n }\n\n var childAlpha = child.alpha;\n var childScrollFactorX = child.scrollFactorX;\n var childScrollFactorY = child.scrollFactorY;\n\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\n {\n // If Container doesn't have its own blend mode, then a child can have one\n renderer.setBlendMode(child.blendMode);\n }\n\n // Set parent values\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\n child.setAlpha(childAlpha * alpha);\n\n // Render\n child.renderCanvas(renderer, child, interpolationPercentage, camera, transformMatrix);\n\n // Restore original values\n child.setAlpha(childAlpha);\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\n }\n\n if (container.mask)\n {\n container.mask.postRenderCanvas(renderer);\n }\n};\n\nmodule.exports = ContainerCanvasRenderer;\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = require('../../utils/NOOP');\r\nvar renderCanvas = require('../../utils/NOOP');\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = require('./ContainerWebGLRenderer');\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = require('./ContainerCanvasRenderer');\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Container#renderWebGL\r\n * @since 3.4.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ContainerWebGLRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var children = container.list;\r\n\r\n if (children.length === 0)\r\n {\r\n return;\r\n }\r\n\r\n var transformMatrix = container.localTransform;\r\n \r\n if (parentMatrix)\r\n {\r\n transformMatrix.loadIdentity();\r\n transformMatrix.multiply(parentMatrix);\r\n transformMatrix.translate(container.x, container.y);\r\n transformMatrix.rotate(container.rotation);\r\n transformMatrix.scale(container.scaleX, container.scaleY);\r\n }\r\n else\r\n {\r\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\r\n }\r\n\r\n var containerHasBlendMode = (container.blendMode !== -1);\r\n\r\n if (!containerHasBlendMode)\r\n {\r\n // If Container is SKIP_TEST then set blend mode to be Normal\r\n renderer.setBlendMode(0);\r\n }\r\n\r\n var alpha = container.alpha;\r\n\r\n var scrollFactorX = container.scrollFactorX;\r\n var scrollFactorY = container.scrollFactorY;\r\n\r\n var list = children;\r\n var childCount = children.length;\r\n\r\n for (var i = 0; i < childCount; i++)\r\n {\r\n var child = children[i];\r\n\r\n if (!child.willRender(camera))\r\n {\r\n continue;\r\n }\r\n\r\n var childAlphaTopLeft;\r\n var childAlphaTopRight;\r\n var childAlphaBottomLeft;\r\n var childAlphaBottomRight;\r\n\r\n if (child.alphaTopLeft !== undefined)\r\n {\r\n childAlphaTopLeft = child.alphaTopLeft;\r\n childAlphaTopRight = child.alphaTopRight;\r\n childAlphaBottomLeft = child.alphaBottomLeft;\r\n childAlphaBottomRight = child.alphaBottomRight;\r\n }\r\n else\r\n {\r\n var childAlpha = child.alpha;\r\n\r\n childAlphaTopLeft = childAlpha;\r\n childAlphaTopRight = childAlpha;\r\n childAlphaBottomLeft = childAlpha;\r\n childAlphaBottomRight = childAlpha;\r\n }\r\n\r\n var childScrollFactorX = child.scrollFactorX;\r\n var childScrollFactorY = child.scrollFactorY;\r\n\r\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\r\n {\r\n // If Container doesn't have its own blend mode, then a child can have one\r\n renderer.setBlendMode(child.blendMode);\r\n }\r\n\r\n var mask = child.mask;\r\n\r\n if (mask)\r\n {\r\n mask.preRenderWebGL(renderer, child, camera);\r\n }\r\n\r\n var type = child.type;\r\n\r\n if (type !== renderer.currentType)\r\n {\r\n renderer.newType = true;\r\n renderer.currentType = type;\r\n }\r\n\r\n renderer.nextTypeMatch = (i < childCount - 1) ? (list[i + 1].type === renderer.currentType) : false;\r\n\r\n // Set parent values\r\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\r\n\r\n child.setAlpha(childAlphaTopLeft * alpha, childAlphaTopRight * alpha, childAlphaBottomLeft * alpha, childAlphaBottomRight * alpha);\r\n\r\n // Render\r\n child.renderWebGL(renderer, child, interpolationPercentage, camera, transformMatrix);\r\n\r\n // Restore original values\r\n\r\n child.setAlpha(childAlphaTopLeft, childAlphaTopRight, childAlphaBottomLeft, childAlphaBottomRight);\r\n\r\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\r\n\r\n if (mask)\r\n {\r\n mask.postRenderWebGL(renderer, camera);\r\n }\r\n\r\n renderer.newType = false;\r\n }\r\n};\r\n\r\nmodule.exports = ContainerWebGLRenderer;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Added to Scene Event.\n *\n * This event is dispatched when a Game Object is added to a Scene.\n *\n * Listen for it on a Game Object instance using `GameObject.on('addedtoscene', listener)`.\n *\n * @event Phaser.GameObjects.Events#ADDED_TO_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\n */\nmodule.exports = 'addedtoscene';\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Destroy Event.\r\n * \r\n * This event is dispatched when a Game Object instance is being destroyed.\r\n * \r\n * Listen for it on a Game Object instance using `GameObject.on('destroy', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#DESTROY\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed.\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Removed from Scene Event.\n *\n * This event is dispatched when a Game Object is removed from a Scene.\n *\n * Listen for it on a Game Object instance using `GameObject.on('removedfromscene', listener)`.\n *\n * @event Phaser.GameObjects.Events#REMOVED_FROM_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\n */\nmodule.exports = 'removedfromscene';\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Complete Event.\r\n * \r\n * This event is dispatched when a Video finishes playback by reaching the end of its duration. It\r\n * is also dispatched if a video marker sequence is being played and reaches the end.\r\n * \r\n * Note that not all videos can fire this event. Live streams, for example, have no fixed duration,\r\n * so never technically 'complete'.\r\n * \r\n * If a video is stopped from playback, via the `Video.stop` method, it will emit the\r\n * `VIDEO_STOP` event instead of this one.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('complete', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_COMPLETE\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed playback.\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Created Event.\r\n * \r\n * This event is dispatched when the texture for a Video has been created. This happens\r\n * when enough of the video source has been loaded that the browser is able to render a\r\n * frame from it.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('created', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_CREATED\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\r\n * @param {integer} width - The width of the video.\r\n * @param {integer} height - The height of the video.\r\n */\r\nmodule.exports = 'created';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Error Event.\r\n * \r\n * This event is dispatched when a Video tries to play a source that does not exist, or is the wrong file type.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('error', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_ERROR\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which threw the error.\r\n * @param {Event} event - The native DOM event the browser raised during playback.\r\n */\r\nmodule.exports = 'error';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Loop Event.\r\n * \r\n * This event is dispatched when a Video that is currently playing has looped. This only\r\n * happens if the `loop` parameter was specified, or the `setLoop` method was called,\r\n * and if the video has a fixed duration. Video streams, for example, cannot loop, as\r\n * they have no duration.\r\n * \r\n * Looping is based on the result of the Video `timeupdate` event. This event is not\r\n * frame-accurate, due to the way browsers work, so please do not rely on this loop\r\n * event to be time or frame precise.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('loop', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_LOOP\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which has looped.\r\n */\r\nmodule.exports = 'loop';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Play Event.\r\n * \r\n * This event is dispatched when a Video begins playback. For videos that do not require\r\n * interaction unlocking, this is usually as soon as the `Video.play` method is called.\r\n * However, for videos that require unlocking, it is fired once playback begins after\r\n * they've been unlocked.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('play', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_PLAY\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started playback.\r\n */\r\nmodule.exports = 'play';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Seeked Event.\r\n * \r\n * This event is dispatched when a Video completes seeking to a new point in its timeline.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('seeked', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_SEEKED\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed seeking.\r\n */\r\nmodule.exports = 'seeked';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Seeking Event.\r\n * \r\n * This event is dispatched when a Video _begins_ seeking to a new point in its timeline.\r\n * When the seek is complete, it will dispatch the `VIDEO_SEEKED` event to conclude.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('seeking', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_SEEKING\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started seeking.\r\n */\r\nmodule.exports = 'seeking';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Stopped Event.\r\n * \r\n * This event is dispatched when a Video is stopped from playback via a call to the `Video.stop` method,\r\n * either directly via game code, or indirectly as the result of changing a video source or destroying it.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('stop', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_STOP\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which stopped playback.\r\n */\r\nmodule.exports = 'stop';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Timeout Event.\r\n * \r\n * This event is dispatched when a Video has exhausted its allocated time while trying to connect to a video\r\n * source to start playback.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('timeout', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_TIMEOUT\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which timed out.\r\n */\r\nmodule.exports = 'timeout';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Video Game Object Unlocked Event.\r\n * \r\n * This event is dispatched when a Video that was prevented from playback due to the browsers\r\n * Media Engagement Interaction policy, is unlocked by a user gesture.\r\n * \r\n * Listen for it from a Video Game Object instance using `Video.on('unlocked', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#VIDEO_UNLOCKED\r\n * @since 3.20.0\r\n * \r\n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\r\n */\r\nmodule.exports = 'unlocked';\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.GameObjects.Events\n */\n\nmodule.exports = {\n\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\n DESTROY: require('./DESTROY_EVENT'),\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'),\n VIDEO_COMPLETE: require('./VIDEO_COMPLETE_EVENT'),\n VIDEO_CREATED: require('./VIDEO_CREATED_EVENT'),\n VIDEO_ERROR: require('./VIDEO_ERROR_EVENT'),\n VIDEO_LOOP: require('./VIDEO_LOOP_EVENT'),\n VIDEO_PLAY: require('./VIDEO_PLAY_EVENT'),\n VIDEO_SEEKED: require('./VIDEO_SEEKED_EVENT'),\n VIDEO_SEEKING: require('./VIDEO_SEEKING_EVENT'),\n VIDEO_STOP: require('./VIDEO_STOP_EVENT'),\n VIDEO_TIMEOUT: require('./VIDEO_TIMEOUT_EVENT'),\n VIDEO_UNLOCKED: require('./VIDEO_UNLOCKED_EVENT')\n\n};\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GEOM_CONST = {\r\n\r\n /**\r\n * A Circle Geometry object type.\r\n * \r\n * @name Phaser.Geom.CIRCLE\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n CIRCLE: 0,\r\n\r\n /**\r\n * An Ellipse Geometry object type.\r\n * \r\n * @name Phaser.Geom.ELLIPSE\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n ELLIPSE: 1,\r\n\r\n /**\r\n * A Line Geometry object type.\r\n * \r\n * @name Phaser.Geom.LINE\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n LINE: 2,\r\n\r\n /**\r\n * A Point Geometry object type.\r\n * \r\n * @name Phaser.Geom.POINT\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n POINT: 3,\r\n\r\n /**\r\n * A Polygon Geometry object type.\r\n * \r\n * @name Phaser.Geom.POLYGON\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n POLYGON: 4,\r\n\r\n /**\r\n * A Rectangle Geometry object type.\r\n * \r\n * @name Phaser.Geom.RECTANGLE\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n RECTANGLE: 5,\r\n\r\n /**\r\n * A Triangle Geometry object type.\r\n * \r\n * @name Phaser.Geom.TRIANGLE\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n TRIANGLE: 6\r\n\r\n};\r\n\r\nmodule.exports = GEOM_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Get a point on a line that's a given percentage along its length.\r\n *\r\n * @function Phaser.Geom.Line.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line.\r\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An optional point, or point-like object, to store the coordinates of the point on the line.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The point on the line.\r\n */\r\nvar GetPoint = function (line, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = line.x1 + (line.x2 - line.x1) * position;\r\n out.y = line.y1 + (line.y2 - line.y1) * position;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Length = require('./Length');\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Get a number of points along a line's length.\r\n *\r\n * Provide a `quantity` to get an exact number of points along the line.\r\n *\r\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\r\n * providing a `stepRate`.\r\n *\r\n * @function Phaser.Geom.Line.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line.\r\n * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\r\n * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\r\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\r\n */\r\nvar GetPoints = function (line, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity && stepRate > 0)\r\n {\r\n quantity = Length(line) / stepRate;\r\n }\r\n\r\n var x1 = line.x1;\r\n var y1 = line.y1;\r\n\r\n var x2 = line.x2;\r\n var y2 = line.y2;\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var position = i / quantity;\r\n\r\n var x = x1 + (x2 - x1) * position;\r\n var y = y1 + (y2 - y1) * position;\r\n\r\n out.push(new Point(x, y));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the length of the given line.\r\n *\r\n * @function Phaser.Geom.Line.Length\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the length of.\r\n *\r\n * @return {number} The length of the line.\r\n */\r\nvar Length = function (line)\r\n{\r\n return Math.sqrt((line.x2 - line.x1) * (line.x2 - line.x1) + (line.y2 - line.y1) * (line.y2 - line.y1));\r\n};\r\n\r\nmodule.exports = Length;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar GetPoint = require('./GetPoint');\r\nvar GetPoints = require('./GetPoints');\r\nvar GEOM_CONST = require('../const');\r\nvar Random = require('./Random');\r\nvar Vector2 = require('../../math/Vector2');\r\n\r\n/**\r\n * @classdesc\r\n * Defines a Line segment, a part of a line between two endpoints.\r\n *\r\n * @class Line\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\r\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\r\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\r\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\r\n */\r\nvar Line = new Class({\r\n\r\n initialize:\r\n\r\n function Line (x1, y1, x2, y2)\r\n {\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 0; }\r\n if (y2 === undefined) { y2 = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.LINE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Line#type\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.LINE;\r\n\r\n /**\r\n * The x coordinate of the lines starting point.\r\n *\r\n * @name Phaser.Geom.Line#x1\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x1 = x1;\r\n\r\n /**\r\n * The y coordinate of the lines starting point.\r\n *\r\n * @name Phaser.Geom.Line#y1\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y1 = y1;\r\n\r\n /**\r\n * The x coordinate of the lines ending point.\r\n *\r\n * @name Phaser.Geom.Line#x2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x2 = x2;\r\n\r\n /**\r\n * The y coordinate of the lines ending point.\r\n *\r\n * @name Phaser.Geom.Line#y2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y2 = y2;\r\n },\r\n\r\n /**\r\n * Get a point on a line that's a given percentage along its length.\r\n *\r\n * @method Phaser.Geom.Line#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [output,$return]\r\n *\r\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\r\n * @param {(Phaser.Geom.Point|object)} [output] - An optional point, or point-like object, to store the coordinates of the point on the line.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point on the line.\r\n */\r\n getPoint: function (position, output)\r\n {\r\n return GetPoint(this, position, output);\r\n },\r\n\r\n /**\r\n * Get a number of points along a line's length.\r\n *\r\n * Provide a `quantity` to get an exact number of points along the line.\r\n *\r\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\r\n * providing a `stepRate`.\r\n *\r\n * @method Phaser.Geom.Line#getPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\r\n *\r\n * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\r\n * @param {integer} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\r\n * @param {(array|Phaser.Geom.Point[])} [output] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Get a random Point on the Line.\r\n *\r\n * @method Phaser.Geom.Line#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} [point] - An instance of a Point to be modified.\r\n *\r\n * @return {Phaser.Geom.Point} A random Point on the Line.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Set new coordinates for the line endpoints.\r\n *\r\n * @method Phaser.Geom.Line#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\r\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\r\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\r\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\r\n *\r\n * @return {this} This Line object.\r\n */\r\n setTo: function (x1, y1, x2, y2)\r\n {\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 0; }\r\n if (y2 === undefined) { y2 = 0; }\r\n\r\n this.x1 = x1;\r\n this.y1 = y1;\r\n\r\n this.x2 = x2;\r\n this.y2 = y2;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns a Vector2 object that corresponds to the start of this Line.\r\n *\r\n * @method Phaser.Geom.Line#getPointA\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the start of this Line.\r\n */\r\n getPointA: function (vec2)\r\n {\r\n if (vec2 === undefined) { vec2 = new Vector2(); }\r\n\r\n vec2.set(this.x1, this.y1);\r\n\r\n return vec2;\r\n },\r\n\r\n /**\r\n * Returns a Vector2 object that corresponds to the end of this Line.\r\n *\r\n * @method Phaser.Geom.Line#getPointB\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the end of this Line.\r\n */\r\n getPointB: function (vec2)\r\n {\r\n if (vec2 === undefined) { vec2 = new Vector2(); }\r\n\r\n vec2.set(this.x2, this.y2);\r\n\r\n return vec2;\r\n },\r\n\r\n /**\r\n * The left position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return Math.min(this.x1, this.x2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.x1 <= this.x2)\r\n {\r\n this.x1 = value;\r\n }\r\n else\r\n {\r\n this.x2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The right position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return Math.max(this.x1, this.x2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.x1 > this.x2)\r\n {\r\n this.x1 = value;\r\n }\r\n else\r\n {\r\n this.x2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return Math.min(this.y1, this.y2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.y1 <= this.y2)\r\n {\r\n this.y1 = value;\r\n }\r\n else\r\n {\r\n this.y2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return Math.max(this.y1, this.y2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.y1 > this.y2)\r\n {\r\n this.y1 = value;\r\n }\r\n else\r\n {\r\n this.y2 = value;\r\n }\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Line;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Returns a random point on a given Line.\r\n *\r\n * @function Phaser.Geom.Line.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The Line to calculate the random Point on.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An instance of a Point to be modified.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A random Point on the Line.\r\n */\r\nvar Random = function (line, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var t = Math.random();\r\n\r\n out.x = line.x1 + t * (line.x2 - line.x1);\r\n out.y = line.y1 + t * (line.y2 - line.y1);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar GEOM_CONST = require('../const');\r\n\r\n/**\r\n * @classdesc\r\n * Defines a Point in 2D space, with an x and y component.\r\n *\r\n * @class Point\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x coordinate of this Point.\r\n * @param {number} [y=x] - The y coordinate of this Point.\r\n */\r\nvar Point = new Class({\r\n\r\n initialize:\r\n\r\n function Point (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.POINT`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Point#type\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.POINT;\r\n\r\n /**\r\n * The x coordinate of this Point.\r\n *\r\n * @name Phaser.Geom.Point#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The y coordinate of this Point.\r\n *\r\n * @name Phaser.Geom.Point#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n },\r\n\r\n /**\r\n * Set the x and y coordinates of the point to the given values.\r\n *\r\n * @method Phaser.Geom.Point#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x coordinate of this Point.\r\n * @param {number} [y=x] - The y coordinate of this Point.\r\n *\r\n * @return {this} This Point object.\r\n */\r\n setTo: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Point;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if a given point is inside a Rectangle's bounds.\r\n *\r\n * @function Phaser.Geom.Rectangle.Contains\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to check.\r\n * @param {number} x - The X coordinate of the point to check.\r\n * @param {number} y - The Y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`.\r\n */\r\nvar Contains = function (rect, x, y)\r\n{\r\n if (rect.width <= 0 || rect.height <= 0)\r\n {\r\n return false;\r\n }\r\n\r\n return (rect.x <= x && rect.x + rect.width >= x && rect.y <= y && rect.y + rect.height >= y);\r\n};\r\n\r\nmodule.exports = Contains;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Perimeter = require('./Perimeter');\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter.\r\n * \r\n * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.\r\n * \r\n * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle to get the perimeter point from.\r\n * @param {number} position - The normalized distance into the Rectangle's perimeter to return.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An object to update with the `x` and `y` coordinates of the point.\r\n *\r\n * @return {Phaser.Geom.Point} The updated `output` object, or a new Point if no `output` object was given.\r\n */\r\nvar GetPoint = function (rectangle, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n if (position <= 0 || position >= 1)\r\n {\r\n out.x = rectangle.x;\r\n out.y = rectangle.y;\r\n\r\n return out;\r\n }\r\n\r\n var p = Perimeter(rectangle) * position;\r\n\r\n if (position > 0.5)\r\n {\r\n p -= (rectangle.width + rectangle.height);\r\n\r\n if (p <= rectangle.width)\r\n {\r\n // Face 3\r\n out.x = rectangle.right - p;\r\n out.y = rectangle.bottom;\r\n }\r\n else\r\n {\r\n // Face 4\r\n out.x = rectangle.x;\r\n out.y = rectangle.bottom - (p - rectangle.width);\r\n }\r\n }\r\n else if (p <= rectangle.width)\r\n {\r\n // Face 1\r\n out.x = rectangle.x + p;\r\n out.y = rectangle.y;\r\n }\r\n else\r\n {\r\n // Face 2\r\n out.x = rectangle.right;\r\n out.y = rectangle.y + (p - rectangle.width);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetPoint = require('./GetPoint');\r\nvar Perimeter = require('./Perimeter');\r\n\r\n// Return an array of points from the perimeter of the rectangle\r\n// each spaced out based on the quantity or step required\r\n\r\n/**\r\n * Return an array of points from the perimeter of the rectangle, each spaced out based on the quantity or step required.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle object to get the points from.\r\n * @param {number} step - Step between points. Used to calculate the number of points to return when quantity is falsey. Ignored if quantity is positive.\r\n * @param {integer} quantity - The number of evenly spaced points from the rectangles perimeter to return. If falsey, step param will be used to calculate the number of points.\r\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array to store the points in.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points from the perimeter of the rectangle.\r\n */\r\nvar GetPoints = function (rectangle, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity && stepRate > 0)\r\n {\r\n quantity = Perimeter(rectangle) / stepRate;\r\n }\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var position = i / quantity;\r\n\r\n out.push(GetPoint(rectangle, position));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the perimeter of a Rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.Perimeter\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to use.\r\n *\r\n * @return {number} The perimeter of the Rectangle, equal to `(width * 2) + (height * 2)`.\r\n */\r\nvar Perimeter = function (rect)\r\n{\r\n return 2 * (rect.width + rect.height);\r\n};\r\n\r\nmodule.exports = Perimeter;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = require('../point/Point');\r\n\r\n/**\r\n * Returns a random point within a Rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to return a point from.\r\n * @param {Phaser.Geom.Point} out - The object to update with the point's coordinates.\r\n *\r\n * @return {Phaser.Geom.Point} The modified `out` object, or a new Point if none was provided.\r\n */\r\nvar Random = function (rect, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = rect.x + (Math.random() * rect.width);\r\n out.y = rect.y + (Math.random() * rect.height);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar Contains = require('./Contains');\r\nvar GetPoint = require('./GetPoint');\r\nvar GetPoints = require('./GetPoints');\r\nvar GEOM_CONST = require('../const');\r\nvar Line = require('../line/Line');\r\nvar Random = require('./Random');\r\n\r\n/**\r\n * @classdesc\r\n * Encapsulates a 2D rectangle defined by its corner point in the top-left and its extends in x (width) and y (height)\r\n *\r\n * @class Rectangle\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} [y=0] - The Y coordinate of the top left corner of the Rectangle.\r\n * @param {number} [width=0] - The width of the Rectangle.\r\n * @param {number} [height=0] - The height of the Rectangle.\r\n */\r\nvar Rectangle = new Class({\r\n\r\n initialize:\r\n\r\n function Rectangle (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 0; }\r\n if (height === undefined) { height = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.RECTANGLE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Rectangle#type\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.RECTANGLE;\r\n\r\n /**\r\n * The X coordinate of the top left corner of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The Y coordinate of the top left corner of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The width of the Rectangle, i.e. the distance between its left side (defined by `x`) and its right side.\r\n *\r\n * @name Phaser.Geom.Rectangle#width\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.width = width;\r\n\r\n /**\r\n * The height of the Rectangle, i.e. the distance between its top side (defined by `y`) and its bottom side.\r\n *\r\n * @name Phaser.Geom.Rectangle#height\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.height = height;\r\n },\r\n\r\n /**\r\n * Checks if the given point is inside the Rectangle's bounds.\r\n *\r\n * @method Phaser.Geom.Rectangle#contains\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the point to check.\r\n * @param {number} y - The Y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`.\r\n */\r\n contains: function (x, y)\r\n {\r\n return Contains(this, x, y);\r\n },\r\n\r\n /**\r\n * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter.\r\n * \r\n * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.\r\n * \r\n * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.\r\n *\r\n * @method Phaser.Geom.Rectangle#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [output,$return]\r\n *\r\n * @param {number} position - The normalized distance into the Rectangle's perimeter to return.\r\n * @param {(Phaser.Geom.Point|object)} [output] - An object to update with the `x` and `y` coordinates of the point.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The updated `output` object, or a new Point if no `output` object was given.\r\n */\r\n getPoint: function (position, output)\r\n {\r\n return GetPoint(this, position, output);\r\n },\r\n\r\n /**\r\n * Returns an array of points from the perimeter of the Rectangle, each spaced out based on the quantity or step required.\r\n *\r\n * @method Phaser.Geom.Rectangle#getPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\r\n *\r\n * @param {integer} quantity - The number of points to return. Set to `false` or 0 to return an arbitrary number of points (`perimeter / stepRate`) evenly spaced around the Rectangle based on the `stepRate`.\r\n * @param {number} [stepRate] - If `quantity` is 0, determines the normalized distance between each returned point.\r\n * @param {(array|Phaser.Geom.Point[])} [output] - An array to which to append the points.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} The modified `output` array, or a new array if none was provided.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Returns a random point within the Rectangle's bounds.\r\n *\r\n * @method Phaser.Geom.Rectangle#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {Phaser.Geom.Point} [point] - The object in which to store the `x` and `y` coordinates of the point.\r\n *\r\n * @return {Phaser.Geom.Point} The updated `point`, or a new Point if none was provided.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Sets the position, width, and height of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} y - The Y coordinate of the top left corner of the Rectangle.\r\n * @param {number} width - The width of the Rectangle.\r\n * @param {number} height - The height of the Rectangle.\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setTo: function (x, y, width, height)\r\n {\r\n this.x = x;\r\n this.y = y;\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the position, width, and height of the Rectangle to 0.\r\n *\r\n * @method Phaser.Geom.Rectangle#setEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setEmpty: function ()\r\n {\r\n return this.setTo(0, 0, 0, 0);\r\n },\r\n\r\n /**\r\n * Sets the position of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} [y=x] - The Y coordinate of the top left corner of the Rectangle.\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setPosition: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the width and height of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width to set the Rectangle to.\r\n * @param {number} [height=width] - The height to set the Rectangle to.\r\n *\r\n * @return {this} This Rectangle object.\r\n */\r\n setSize: function (width, height)\r\n {\r\n if (height === undefined) { height = width; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Determines if the Rectangle is empty. A Rectangle is empty if its width or height is less than or equal to 0.\r\n *\r\n * @method Phaser.Geom.Rectangle#isEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the Rectangle is empty. A Rectangle object is empty if its width or height is less than or equal to 0.\r\n */\r\n isEmpty: function ()\r\n {\r\n return (this.width <= 0 || this.height <= 0);\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the top of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineA\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the top of this Rectangle.\r\n */\r\n getLineA: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x, this.y, this.right, this.y);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the right of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineB\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the right of this Rectangle.\r\n */\r\n getLineB: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.right, this.y, this.right, this.bottom);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the bottom of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineC\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the bottom of this Rectangle.\r\n */\r\n getLineC: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.right, this.bottom, this.x, this.bottom);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the left of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineD\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the left of this Rectangle.\r\n */\r\n getLineD: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x, this.bottom, this.x, this.y);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * The x coordinate of the left of the Rectangle.\r\n * Changing the left property of a Rectangle object has no effect on the y and height properties. However it does affect the width property, whereas changing the x value does not affect the width property.\r\n *\r\n * @name Phaser.Geom.Rectangle#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return this.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value >= this.right)\r\n {\r\n this.width = 0;\r\n }\r\n else\r\n {\r\n this.width = this.right - value;\r\n }\r\n\r\n this.x = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The sum of the x and width properties.\r\n * Changing the right property of a Rectangle object has no effect on the x, y and height properties, however it does affect the width property.\r\n *\r\n * @name Phaser.Geom.Rectangle#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return this.x + this.width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value <= this.x)\r\n {\r\n this.width = 0;\r\n }\r\n else\r\n {\r\n this.width = value - this.x;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinate of the top of the Rectangle. Changing the top property of a Rectangle object has no effect on the x and width properties.\r\n * However it does affect the height property, whereas changing the y value does not affect the height property.\r\n *\r\n * @name Phaser.Geom.Rectangle#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return this.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value >= this.bottom)\r\n {\r\n this.height = 0;\r\n }\r\n else\r\n {\r\n this.height = (this.bottom - value);\r\n }\r\n\r\n this.y = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The sum of the y and height properties.\r\n * Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property.\r\n *\r\n * @name Phaser.Geom.Rectangle#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return this.y + this.height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value <= this.y)\r\n {\r\n this.height = 0;\r\n }\r\n else\r\n {\r\n this.height = value - this.y;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The x coordinate of the center of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#centerX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n centerX: {\r\n\r\n get: function ()\r\n {\r\n return this.x + (this.width / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.x = value - (this.width / 2);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinate of the center of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#centerY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n centerY: {\r\n\r\n get: function ()\r\n {\r\n return this.y + (this.height / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.y = value - (this.height / 2);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Rectangle;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = require('./Rectangle');\r\n\r\n/**\r\n * Creates a new Rectangle or repositions and/or resizes an existing Rectangle so that it encompasses the two given Rectangles, i.e. calculates their union.\r\n *\r\n * @function Phaser.Geom.Rectangle.Union\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle to use.\r\n * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle to use.\r\n * @param {Phaser.Geom.Rectangle} [out] - The Rectangle to store the union in.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The modified `out` Rectangle, or a new Rectangle if none was provided.\r\n */\r\nvar Union = function (rectA, rectB, out)\r\n{\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n // Cache vars so we can use one of the input rects as the output rect\r\n var x = Math.min(rectA.x, rectB.x);\r\n var y = Math.min(rectA.y, rectB.y);\r\n var w = Math.max(rectA.right, rectB.right) - x;\r\n var h = Math.max(rectA.bottom, rectB.bottom) - y;\r\n\r\n return out.setTo(x, y, w, h);\r\n};\r\n\r\nmodule.exports = Union;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar CONST = require('./const');\nvar Events = require('./events');\nvar GetFastValue = require('../utils/object/GetFastValue');\nvar GetURL = require('./GetURL');\nvar MergeXHRSettings = require('./MergeXHRSettings');\nvar XHRLoader = require('./XHRLoader');\nvar XHRSettings = require('./XHRSettings');\n\n/**\n * @classdesc\n * The base File class used by all File Types that the Loader can support.\n * You shouldn't create an instance of a File directly, but should extend it with your own class, setting a custom type and processing methods.\n *\n * @class File\n * @memberof Phaser.Loader\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\n * @param {Phaser.Types.Loader.FileConfig} fileConfig - The file configuration object, as created by the file type.\n */\nvar File = new Class({\n\n initialize:\n\n function File (loader, fileConfig)\n {\n /**\n * A reference to the Loader that is going to load this file.\n *\n * @name Phaser.Loader.File#loader\n * @type {Phaser.Loader.LoaderPlugin}\n * @since 3.0.0\n */\n this.loader = loader;\n\n /**\n * A reference to the Cache, or Texture Manager, that is going to store this file if it loads.\n *\n * @name Phaser.Loader.File#cache\n * @type {(Phaser.Cache.BaseCache|Phaser.Textures.TextureManager)}\n * @since 3.7.0\n */\n this.cache = GetFastValue(fileConfig, 'cache', false);\n\n /**\n * The file type string (image, json, etc) for sorting within the Loader.\n *\n * @name Phaser.Loader.File#type\n * @type {string}\n * @since 3.0.0\n */\n this.type = GetFastValue(fileConfig, 'type', false);\n\n /**\n * Unique cache key (unique within its file type)\n *\n * @name Phaser.Loader.File#key\n * @type {string}\n * @since 3.0.0\n */\n this.key = GetFastValue(fileConfig, 'key', false);\n\n var loadKey = this.key;\n\n if (loader.prefix && loader.prefix !== '')\n {\n this.key = loader.prefix + loadKey;\n }\n\n if (!this.type || !this.key)\n {\n throw new Error('Error calling \\'Loader.' + this.type + '\\' invalid key provided.');\n }\n\n /**\n * The URL of the file, not including baseURL.\n *\n * Automatically has Loader.path prepended to it if a string.\n *\n * Can also be a JavaScript Object, such as the results of parsing JSON data.\n *\n * @name Phaser.Loader.File#url\n * @type {object|string}\n * @since 3.0.0\n */\n this.url = GetFastValue(fileConfig, 'url');\n\n if (this.url === undefined)\n {\n this.url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', '');\n }\n else if (typeof this.url === 'string' && this.url.indexOf('blob:') !== 0 && this.url.indexOf('data:') !== 0)\n {\n this.url = loader.path + this.url;\n }\n\n /**\n * The final URL this file will load from, including baseURL and path.\n * Set automatically when the Loader calls 'load' on this file.\n *\n * @name Phaser.Loader.File#src\n * @type {string}\n * @since 3.0.0\n */\n this.src = '';\n\n /**\n * The merged XHRSettings for this file.\n *\n * @name Phaser.Loader.File#xhrSettings\n * @type {Phaser.Types.Loader.XHRSettingsObject}\n * @since 3.0.0\n */\n this.xhrSettings = XHRSettings(GetFastValue(fileConfig, 'responseType', undefined));\n\n if (GetFastValue(fileConfig, 'xhrSettings', false))\n {\n this.xhrSettings = MergeXHRSettings(this.xhrSettings, GetFastValue(fileConfig, 'xhrSettings', {}));\n }\n\n /**\n * The XMLHttpRequest instance (as created by XHR Loader) that is loading this File.\n *\n * @name Phaser.Loader.File#xhrLoader\n * @type {?XMLHttpRequest}\n * @since 3.0.0\n */\n this.xhrLoader = null;\n\n /**\n * The current state of the file. One of the FILE_CONST values.\n *\n * @name Phaser.Loader.File#state\n * @type {integer}\n * @since 3.0.0\n */\n this.state = (typeof(this.url) === 'function') ? CONST.FILE_POPULATED : CONST.FILE_PENDING;\n\n /**\n * The total size of this file.\n * Set by onProgress and only if loading via XHR.\n *\n * @name Phaser.Loader.File#bytesTotal\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.bytesTotal = 0;\n\n /**\n * Updated as the file loads.\n * Only set if loading via XHR.\n *\n * @name Phaser.Loader.File#bytesLoaded\n * @type {number}\n * @default -1\n * @since 3.0.0\n */\n this.bytesLoaded = -1;\n\n /**\n * A percentage value between 0 and 1 indicating how much of this file has loaded.\n * Only set if loading via XHR.\n *\n * @name Phaser.Loader.File#percentComplete\n * @type {number}\n * @default -1\n * @since 3.0.0\n */\n this.percentComplete = -1;\n\n /**\n * For CORs based loading.\n * If this is undefined then the File will check BaseLoader.crossOrigin and use that (if set)\n *\n * @name Phaser.Loader.File#crossOrigin\n * @type {(string|undefined)}\n * @since 3.0.0\n */\n this.crossOrigin = undefined;\n\n /**\n * The processed file data, stored here after the file has loaded.\n *\n * @name Phaser.Loader.File#data\n * @type {*}\n * @since 3.0.0\n */\n this.data = undefined;\n\n /**\n * A config object that can be used by file types to store transitional data.\n *\n * @name Phaser.Loader.File#config\n * @type {*}\n * @since 3.0.0\n */\n this.config = GetFastValue(fileConfig, 'config', {});\n\n /**\n * If this is a multipart file, i.e. an atlas and its json together, then this is a reference\n * to the parent MultiFile. Set and used internally by the Loader or specific file types.\n *\n * @name Phaser.Loader.File#multiFile\n * @type {?Phaser.Loader.MultiFile}\n * @since 3.7.0\n */\n this.multiFile;\n\n /**\n * Does this file have an associated linked file? Such as an image and a normal map.\n * Atlases and Bitmap Fonts use the multiFile, because those files need loading together but aren't\n * actually bound by data, where-as a linkFile is.\n *\n * @name Phaser.Loader.File#linkFile\n * @type {?Phaser.Loader.File}\n * @since 3.7.0\n */\n this.linkFile;\n },\n\n /**\n * Links this File with another, so they depend upon each other for loading and processing.\n *\n * @method Phaser.Loader.File#setLink\n * @since 3.7.0\n *\n * @param {Phaser.Loader.File} fileB - The file to link to this one.\n */\n setLink: function (fileB)\n {\n this.linkFile = fileB;\n\n fileB.linkFile = this;\n },\n\n /**\n * Resets the XHRLoader instance this file is using.\n *\n * @method Phaser.Loader.File#resetXHR\n * @since 3.0.0\n */\n resetXHR: function ()\n {\n if (this.xhrLoader)\n {\n this.xhrLoader.onload = undefined;\n this.xhrLoader.onerror = undefined;\n this.xhrLoader.onprogress = undefined;\n }\n },\n\n /**\n * Called by the Loader, starts the actual file downloading.\n * During the load the methods onLoad, onError and onProgress are called, based on the XHR events.\n * You shouldn't normally call this method directly, it's meant to be invoked by the Loader.\n *\n * @method Phaser.Loader.File#load\n * @since 3.0.0\n */\n load: function ()\n {\n if (this.state === CONST.FILE_POPULATED)\n {\n // Can happen for example in a JSONFile if they've provided a JSON object instead of a URL\n this.loader.nextFile(this, true);\n }\n else\n {\n this.state = CONST.FILE_LOADING;\n\n this.src = GetURL(this, this.loader.baseURL);\n\n if (this.src.indexOf('data:') === 0)\n {\n console.warn('Local data URIs are not supported: ' + this.key);\n }\n else\n {\n // The creation of this XHRLoader starts the load process going.\n // It will automatically call the following, based on the load outcome:\n //\n // xhr.onload = this.onLoad\n // xhr.onerror = this.onError\n // xhr.onprogress = this.onProgress\n\n this.xhrLoader = XHRLoader(this, this.loader.xhr);\n }\n }\n },\n\n /**\n * Called when the file finishes loading, is sent a DOM ProgressEvent.\n *\n * @method Phaser.Loader.File#onLoad\n * @since 3.0.0\n *\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this load.\n */\n onLoad: function (xhr, event)\n {\n var localFileOk = ((xhr.responseURL && xhr.responseURL.indexOf('file://') === 0 && event.target.status === 0));\n\n var success = !(event.target && event.target.status !== 200) || localFileOk;\n\n // Handle HTTP status codes of 4xx and 5xx as errors, even if xhr.onerror was not called.\n if (xhr.readyState === 4 && xhr.status >= 400 && xhr.status <= 599)\n {\n success = false;\n }\n\n this.state = CONST.FILE_LOADED;\n\n this.resetXHR();\n\n this.loader.nextFile(this, success);\n },\n\n /**\n * Called if the file errors while loading, is sent a DOM ProgressEvent.\n *\n * @method Phaser.Loader.File#onError\n * @since 3.0.0\n *\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this error.\n */\n onError: function ()\n {\n this.resetXHR();\n\n this.loader.nextFile(this, false);\n },\n\n /**\n * Called during the file load progress. Is sent a DOM ProgressEvent.\n *\n * @method Phaser.Loader.File#onProgress\n * @fires Phaser.Loader.Events#FILE_PROGRESS\n * @since 3.0.0\n *\n * @param {ProgressEvent} event - The DOM ProgressEvent.\n */\n onProgress: function (event)\n {\n if (event.lengthComputable)\n {\n this.bytesLoaded = event.loaded;\n this.bytesTotal = event.total;\n\n this.percentComplete = Math.min((this.bytesLoaded / this.bytesTotal), 1);\n\n this.loader.emit(Events.FILE_PROGRESS, this, this.percentComplete);\n }\n },\n\n /**\n * Usually overridden by the FileTypes and is called by Loader.nextFile.\n * This method controls what extra work this File does with its loaded data, for example a JSON file will parse itself during this stage.\n *\n * @method Phaser.Loader.File#onProcess\n * @since 3.0.0\n */\n onProcess: function ()\n {\n this.state = CONST.FILE_PROCESSING;\n\n this.onProcessComplete();\n },\n\n /**\n * Called when the File has completed processing.\n * Checks on the state of its multifile, if set.\n *\n * @method Phaser.Loader.File#onProcessComplete\n * @since 3.7.0\n */\n onProcessComplete: function ()\n {\n this.state = CONST.FILE_COMPLETE;\n\n if (this.multiFile)\n {\n this.multiFile.onFileComplete(this);\n }\n\n this.loader.fileProcessComplete(this);\n },\n\n /**\n * Called when the File has completed processing but it generated an error.\n * Checks on the state of its multifile, if set.\n *\n * @method Phaser.Loader.File#onProcessError\n * @since 3.7.0\n */\n onProcessError: function ()\n {\n this.state = CONST.FILE_ERRORED;\n\n if (this.multiFile)\n {\n this.multiFile.onFileFailed(this);\n }\n\n this.loader.fileProcessComplete(this);\n },\n\n /**\n * Checks if a key matching the one used by this file exists in the target Cache or not.\n * This is called automatically by the LoaderPlugin to decide if the file can be safely\n * loaded or will conflict.\n *\n * @method Phaser.Loader.File#hasCacheConflict\n * @since 3.7.0\n *\n * @return {boolean} `true` if adding this file will cause a conflict, otherwise `false`.\n */\n hasCacheConflict: function ()\n {\n return (this.cache && this.cache.exists(this.key));\n },\n\n /**\n * Adds this file to its target cache upon successful loading and processing.\n * This method is often overridden by specific file types.\n *\n * @method Phaser.Loader.File#addToCache\n * @since 3.7.0\n */\n addToCache: function ()\n {\n if (this.cache)\n {\n this.cache.add(this.key, this.data);\n }\n\n this.pendingDestroy();\n },\n\n /**\n * Called once the file has been added to its cache and is now ready for deletion from the Loader.\n * It will emit a `filecomplete` event from the LoaderPlugin.\n *\n * @method Phaser.Loader.File#pendingDestroy\n * @fires Phaser.Loader.Events#FILE_COMPLETE\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\n * @since 3.7.0\n */\n pendingDestroy: function (data)\n {\n if (data === undefined) { data = this.data; }\n\n var key = this.key;\n var type = this.type;\n\n this.loader.emit(Events.FILE_COMPLETE, key, type, data);\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type, data);\n\n this.loader.flagForRemoval(this);\n },\n\n /**\n * Destroy this File and any references it holds.\n *\n * @method Phaser.Loader.File#destroy\n * @since 3.7.0\n */\n destroy: function ()\n {\n this.loader = null;\n this.cache = null;\n this.xhrSettings = null;\n this.multiFile = null;\n this.linkFile = null;\n this.data = null;\n }\n\n});\n\n/**\n * Static method for creating object URL using URL API and setting it as image 'src' attribute.\n * If URL API is not supported (usually on old browsers) it falls back to creating Base64 encoded url using FileReader.\n *\n * @method Phaser.Loader.File.createObjectURL\n * @static\n * @since 3.7.0\n *\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be set to object URL.\n * @param {Blob} blob - A Blob object to create an object URL for.\n * @param {string} defaultType - Default mime type used if blob type is not available.\n */\nFile.createObjectURL = function (image, blob, defaultType)\n{\n if (typeof URL === 'function')\n {\n image.src = URL.createObjectURL(blob);\n }\n else\n {\n var reader = new FileReader();\n\n reader.onload = function ()\n {\n image.removeAttribute('crossOrigin');\n image.src = 'data:' + (blob.type || defaultType) + ';base64,' + reader.result.split(',')[1];\n };\n\n reader.onerror = image.onerror;\n\n reader.readAsDataURL(blob);\n }\n};\n\n/**\n * Static method for releasing an existing object URL which was previously created\n * by calling {@link File#createObjectURL} method.\n *\n * @method Phaser.Loader.File.revokeObjectURL\n * @static\n * @since 3.7.0\n *\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be revoked.\n */\nFile.revokeObjectURL = function (image)\n{\n if (typeof URL === 'function')\n {\n URL.revokeObjectURL(image.src);\n }\n};\n\nmodule.exports = File;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar types = {};\r\n\r\n/**\r\n * @namespace Phaser.Loader.FileTypesManager\r\n */\r\n\r\nvar FileTypesManager = {\r\n\r\n /**\r\n * Static method called when a LoaderPlugin is created.\r\n * \r\n * Loops through the local types object and injects all of them as\r\n * properties into the LoaderPlugin instance.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.install\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - The LoaderPlugin to install the types into.\r\n */\r\n install: function (loader)\r\n {\r\n for (var key in types)\r\n {\r\n loader[key] = types[key];\r\n }\r\n },\r\n\r\n /**\r\n * Static method called directly by the File Types.\r\n * \r\n * The key is a reference to the function used to load the files via the Loader, i.e. `image`.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.register\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key that will be used as the method name in the LoaderPlugin.\r\n * @param {function} factoryFunction - The function that will be called when LoaderPlugin.key is invoked.\r\n */\r\n register: function (key, factoryFunction)\r\n {\r\n types[key] = factoryFunction;\r\n },\r\n\r\n /**\r\n * Removed all associated file types.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n types = {};\r\n }\r\n\r\n};\r\n\r\nmodule.exports = FileTypesManager;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Given a File and a baseURL value this returns the URL the File will use to download from.\r\n *\r\n * @function Phaser.Loader.GetURL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File object.\r\n * @param {string} baseURL - A default base URL.\r\n *\r\n * @return {string} The URL the File will use.\r\n */\r\nvar GetURL = function (file, baseURL)\r\n{\r\n if (!file.url)\r\n {\r\n return false;\r\n }\r\n\r\n if (file.url.match(/^(?:blob:|data:|http:\\/\\/|https:\\/\\/|\\/\\/)/))\r\n {\r\n return file.url;\r\n }\r\n else\r\n {\r\n return baseURL + file.url;\r\n }\r\n};\r\n\r\nmodule.exports = GetURL;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extend = require('../utils/object/Extend');\r\nvar XHRSettings = require('./XHRSettings');\r\n\r\n/**\r\n * Takes two XHRSettings Objects and creates a new XHRSettings object from them.\r\n *\r\n * The new object is seeded by the values given in the global settings, but any setting in\r\n * the local object overrides the global ones.\r\n *\r\n * @function Phaser.Loader.MergeXHRSettings\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} global - The global XHRSettings object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} local - The local XHRSettings object.\r\n *\r\n * @return {Phaser.Types.Loader.XHRSettingsObject} A newly formed XHRSettings object.\r\n */\r\nvar MergeXHRSettings = function (global, local)\r\n{\r\n var output = (global === undefined) ? XHRSettings() : Extend({}, global);\r\n\r\n if (local)\r\n {\r\n for (var setting in local)\r\n {\r\n if (local[setting] !== undefined)\r\n {\r\n output[setting] = local[setting];\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = MergeXHRSettings;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A MultiFile is a special kind of parent that contains two, or more, Files as children and looks after\r\n * the loading and processing of them all. It is commonly extended and used as a base class for file types such as AtlasJSON or BitmapFont.\r\n * \r\n * You shouldn't create an instance of a MultiFile directly, but should extend it with your own class, setting a custom type and processing methods.\r\n *\r\n * @class MultiFile\r\n * @memberof Phaser.Loader\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\r\n * @param {string} type - The file type string for sorting within the Loader.\r\n * @param {string} key - The key of the file within the loader.\r\n * @param {Phaser.Loader.File[]} files - An array of Files that make-up this MultiFile.\r\n */\r\nvar MultiFile = new Class({\r\n\r\n initialize:\r\n\r\n function MultiFile (loader, type, key, files)\r\n {\r\n /**\r\n * A reference to the Loader that is going to load this file.\r\n *\r\n * @name Phaser.Loader.MultiFile#loader\r\n * @type {Phaser.Loader.LoaderPlugin}\r\n * @since 3.7.0\r\n */\r\n this.loader = loader;\r\n\r\n /**\r\n * The file type string for sorting within the Loader.\r\n *\r\n * @name Phaser.Loader.MultiFile#type\r\n * @type {string}\r\n * @since 3.7.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * Unique cache key (unique within its file type)\r\n *\r\n * @name Phaser.Loader.MultiFile#key\r\n * @type {string}\r\n * @since 3.7.0\r\n */\r\n this.key = key;\r\n\r\n /**\r\n * The current index being used by multi-file loaders to avoid key clashes.\r\n *\r\n * @name Phaser.Loader.MultiFile#multiKeyIndex\r\n * @type {integer}\r\n * @private\r\n * @since 3.20.0\r\n */\r\n this.multiKeyIndex = loader.multiKeyIndex++;\r\n\r\n /**\r\n * Array of files that make up this MultiFile.\r\n *\r\n * @name Phaser.Loader.MultiFile#files\r\n * @type {Phaser.Loader.File[]}\r\n * @since 3.7.0\r\n */\r\n this.files = files;\r\n\r\n /**\r\n * The completion status of this MultiFile.\r\n *\r\n * @name Phaser.Loader.MultiFile#complete\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.7.0\r\n */\r\n this.complete = false;\r\n\r\n /**\r\n * The number of files to load.\r\n *\r\n * @name Phaser.Loader.MultiFile#pending\r\n * @type {integer}\r\n * @since 3.7.0\r\n */\r\n\r\n this.pending = files.length;\r\n\r\n /**\r\n * The number of files that failed to load.\r\n *\r\n * @name Phaser.Loader.MultiFile#failed\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.7.0\r\n */\r\n this.failed = 0;\r\n\r\n /**\r\n * A storage container for transient data that the loading files need.\r\n *\r\n * @name Phaser.Loader.MultiFile#config\r\n * @type {any}\r\n * @since 3.7.0\r\n */\r\n this.config = {};\r\n\r\n /**\r\n * A reference to the Loaders baseURL at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#baseURL\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.baseURL = loader.baseURL;\r\n\r\n /**\r\n * A reference to the Loaders path at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#path\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.path = loader.path;\r\n\r\n /**\r\n * A reference to the Loaders prefix at the time this MultiFile was created.\r\n * Used to populate child-files.\r\n *\r\n * @name Phaser.Loader.MultiFile#prefix\r\n * @type {string}\r\n * @since 3.20.0\r\n */\r\n this.prefix = loader.prefix;\r\n\r\n // Link the files\r\n for (var i = 0; i < files.length; i++)\r\n {\r\n files[i].multiFile = this;\r\n }\r\n },\r\n\r\n /**\r\n * Checks if this MultiFile is ready to process its children or not.\r\n *\r\n * @method Phaser.Loader.MultiFile#isReadyToProcess\r\n * @since 3.7.0\r\n *\r\n * @return {boolean} `true` if all children of this MultiFile have loaded, otherwise `false`.\r\n */\r\n isReadyToProcess: function ()\r\n {\r\n return (this.pending === 0 && this.failed === 0 && !this.complete);\r\n },\r\n\r\n /**\r\n * Adds another child to this MultiFile, increases the pending count and resets the completion status.\r\n *\r\n * @method Phaser.Loader.MultiFile#addToMultiFile\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} files - The File to add to this MultiFile.\r\n *\r\n * @return {Phaser.Loader.MultiFile} This MultiFile instance.\r\n */\r\n addToMultiFile: function (file)\r\n {\r\n this.files.push(file);\r\n\r\n file.multiFile = this;\r\n\r\n this.pending++;\r\n\r\n this.complete = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Called by each File when it finishes loading.\r\n *\r\n * @method Phaser.Loader.MultiFile#onFileComplete\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has completed processing.\r\n */\r\n onFileComplete: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.pending--;\r\n }\r\n },\r\n\r\n /**\r\n * Called by each File that fails to load.\r\n *\r\n * @method Phaser.Loader.MultiFile#onFileFailed\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has failed to load.\r\n */\r\n onFileFailed: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.failed++;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MultiFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MergeXHRSettings = require('./MergeXHRSettings');\r\n\r\n/**\r\n * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings\r\n * and starts the download of it. It uses the Files own XHRSettings and merges them\r\n * with the global XHRSettings object to set the xhr values before download.\r\n *\r\n * @function Phaser.Loader.XHRLoader\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File to download.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} globalXHRSettings - The global XHRSettings object.\r\n *\r\n * @return {XMLHttpRequest} The XHR object.\r\n */\r\nvar XHRLoader = function (file, globalXHRSettings)\r\n{\r\n var config = MergeXHRSettings(globalXHRSettings, file.xhrSettings);\r\n\r\n var xhr = new XMLHttpRequest();\r\n\r\n xhr.open('GET', file.src, config.async, config.user, config.password);\r\n\r\n xhr.responseType = file.xhrSettings.responseType;\r\n xhr.timeout = config.timeout;\r\n\r\n if (config.headers)\r\n {\r\n for (var key in config.headers)\r\n {\r\n xhr.setRequestHeader(key, config.headers[key]);\r\n }\r\n }\r\n\r\n if (config.header && config.headerValue)\r\n {\r\n xhr.setRequestHeader(config.header, config.headerValue);\r\n }\r\n\r\n if (config.requestedWith)\r\n {\r\n xhr.setRequestHeader('X-Requested-With', config.requestedWith);\r\n }\r\n\r\n if (config.overrideMimeType)\r\n {\r\n xhr.overrideMimeType(config.overrideMimeType);\r\n }\r\n\r\n if (config.withCredentials)\r\n {\r\n xhr.withCredentials = true;\r\n }\r\n\r\n // After a successful request, the xhr.response property will contain the requested data as a DOMString, ArrayBuffer, Blob, or Document (depending on what was set for responseType.)\r\n\r\n xhr.onload = file.onLoad.bind(file, xhr);\r\n xhr.onerror = file.onError.bind(file, xhr);\r\n xhr.onprogress = file.onProgress.bind(file);\r\n\r\n // This is the only standard method, the ones above are browser additions (maybe not universal?)\r\n // xhr.onreadystatechange\r\n\r\n xhr.send();\r\n\r\n return xhr;\r\n};\r\n\r\nmodule.exports = XHRLoader;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Creates an XHRSettings Object with default values.\r\n *\r\n * @function Phaser.Loader.XHRSettings\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequestResponseType} [responseType=''] - The responseType, such as 'text'.\r\n * @param {boolean} [async=true] - Should the XHR request use async or not?\r\n * @param {string} [user=''] - Optional username for the XHR request.\r\n * @param {string} [password=''] - Optional password for the XHR request.\r\n * @param {integer} [timeout=0] - Optional XHR timeout value.\r\n * @param {boolean} [withCredentials=false] - Optional XHR withCredentials value.\r\n *\r\n * @return {Phaser.Types.Loader.XHRSettingsObject} The XHRSettings object as used by the Loader.\r\n */\r\nvar XHRSettings = function (responseType, async, user, password, timeout, withCredentials)\r\n{\r\n if (responseType === undefined) { responseType = ''; }\r\n if (async === undefined) { async = true; }\r\n if (user === undefined) { user = ''; }\r\n if (password === undefined) { password = ''; }\r\n if (timeout === undefined) { timeout = 0; }\r\n if (withCredentials === undefined) { withCredentials = false; }\r\n\r\n // Before sending a request, set the xhr.responseType to \"text\",\r\n // \"arraybuffer\", \"blob\", or \"document\", depending on your data needs.\r\n // Note, setting xhr.responseType = '' (or omitting) will default the response to \"text\".\r\n\r\n return {\r\n\r\n // Ignored by the Loader, only used by File.\r\n responseType: responseType,\r\n\r\n async: async,\r\n\r\n // credentials\r\n user: user,\r\n password: password,\r\n\r\n // timeout in ms (0 = no timeout)\r\n timeout: timeout,\r\n\r\n // setRequestHeader\r\n headers: undefined,\r\n header: undefined,\r\n headerValue: undefined,\r\n requestedWith: false,\r\n\r\n // overrideMimeType\r\n overrideMimeType: undefined,\r\n\r\n // withCredentials\r\n withCredentials: withCredentials\r\n\r\n };\r\n};\r\n\r\nmodule.exports = XHRSettings;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FILE_CONST = {\r\n\r\n /**\r\n * The Loader is idle.\r\n * \r\n * @name Phaser.Loader.LOADER_IDLE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_IDLE: 0,\r\n\r\n /**\r\n * The Loader is actively loading.\r\n * \r\n * @name Phaser.Loader.LOADER_LOADING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_LOADING: 1,\r\n\r\n /**\r\n * The Loader is processing files is has loaded.\r\n * \r\n * @name Phaser.Loader.LOADER_PROCESSING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_PROCESSING: 2,\r\n\r\n /**\r\n * The Loader has completed loading and processing.\r\n * \r\n * @name Phaser.Loader.LOADER_COMPLETE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_COMPLETE: 3,\r\n\r\n /**\r\n * The Loader is shutting down.\r\n * \r\n * @name Phaser.Loader.LOADER_SHUTDOWN\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_SHUTDOWN: 4,\r\n\r\n /**\r\n * The Loader has been destroyed.\r\n * \r\n * @name Phaser.Loader.LOADER_DESTROYED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_DESTROYED: 5,\r\n\r\n /**\r\n * File is in the load queue but not yet started\r\n * \r\n * @name Phaser.Loader.FILE_PENDING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_PENDING: 10,\r\n\r\n /**\r\n * File has been started to load by the loader (onLoad called)\r\n * \r\n * @name Phaser.Loader.FILE_LOADING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_LOADING: 11,\r\n\r\n /**\r\n * File has loaded successfully, awaiting processing \r\n * \r\n * @name Phaser.Loader.FILE_LOADED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_LOADED: 12,\r\n\r\n /**\r\n * File failed to load\r\n * \r\n * @name Phaser.Loader.FILE_FAILED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_FAILED: 13,\r\n\r\n /**\r\n * File is being processed (onProcess callback)\r\n * \r\n * @name Phaser.Loader.FILE_PROCESSING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_PROCESSING: 14,\r\n\r\n /**\r\n * The File has errored somehow during processing.\r\n * \r\n * @name Phaser.Loader.FILE_ERRORED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_ERRORED: 16,\r\n\r\n /**\r\n * File has finished processing.\r\n * \r\n * @name Phaser.Loader.FILE_COMPLETE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_COMPLETE: 17,\r\n\r\n /**\r\n * File has been destroyed\r\n * \r\n * @name Phaser.Loader.FILE_DESTROYED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_DESTROYED: 18,\r\n\r\n /**\r\n * File was populated from local data and doesn't need an HTTP request\r\n * \r\n * @name Phaser.Loader.FILE_POPULATED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_POPULATED: 19\r\n\r\n};\r\n\r\nmodule.exports = FILE_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Add File Event.\r\n * \r\n * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('addfile', listener)`.\r\n * \r\n * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them.\r\n *\r\n * @event Phaser.Loader.Events#ADD\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The unique key of the file that was added to the Loader.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} string of the file that was added to the Loader, i.e. `image`.\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n * @param {Phaser.Loader.File} file - A reference to the File which was added to the Loader.\r\n */\r\nmodule.exports = 'addfile';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Complete Event.\r\n * \r\n * This event is dispatched when the Loader has fully processed everything in the load queue.\r\n * By this point every loaded file will now be in its associated cache and ready for use.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('complete', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#COMPLETE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n * @param {integer} totalComplete - The total number of files that successfully loaded.\r\n * @param {integer} totalFailed - The total number of files that failed to load.\r\n */\r\nmodule.exports = 'complete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Complete Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`.\r\n * \r\n * You can also listen for the completion of a specific file. See the [FILE_KEY_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_KEY_COMPLETE} event.\r\n *\r\n * @event Phaser.Loader.Events#FILE_COMPLETE\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the file that just loaded and finished processing.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\r\n * @param {any} data - The raw data the file contained.\r\n */\r\nmodule.exports = 'filecomplete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Complete Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.\r\n * \r\n * It uses a special dynamic event name constructed from the key and type of the file.\r\n * \r\n * For example, if you have loaded an `image` with a key of `monster`, you can listen for it\r\n * using the following:\r\n *\r\n * ```javascript\r\n * this.load.on('filecomplete-image-monster', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n *\r\n * Or, if you have loaded a texture `atlas` with a key of `Level1`:\r\n * \r\n * ```javascript\r\n * this.load.on('filecomplete-atlas-Level1', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n * \r\n * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`:\r\n * \r\n * ```javascript\r\n * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n * \r\n * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event.\r\n *\r\n * @event Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the file that just loaded and finished processing.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\r\n * @param {any} data - The raw data the file contained.\r\n */\r\nmodule.exports = 'filecomplete-';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Error Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when a file fails to load.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('loaderror', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_LOAD_ERROR\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\r\n */\r\nmodule.exports = 'loaderror';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when a file finishes loading,\r\n * but _before_ it is processed and added to the internal Phaser caches.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('load', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_LOAD\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.File} file - A reference to the File which just finished loading.\r\n */\r\nmodule.exports = 'load';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Progress Event.\r\n * \r\n * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and\r\n * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_PROGRESS\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\r\n * @param {number} percentComplete - A value between 0 and 1 indicating how 'complete' this file is.\r\n */\r\nmodule.exports = 'fileprogress';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Post Process Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue.\r\n * It is dispatched before the internal lists are cleared and each File is destroyed.\r\n * \r\n * Use this hook to perform any last minute processing of files that can only happen once the\r\n * Loader has completed, but prior to it emitting the `complete` event.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('postprocess', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#POST_PROCESS\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n */\r\nmodule.exports = 'postprocess';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Progress Event.\r\n * \r\n * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('progress', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#PROGRESS\r\n * @since 3.0.0\r\n * \r\n * @param {number} progress - The current progress of the load. A value between 0 and 1.\r\n */\r\nmodule.exports = 'progress';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Start Event.\r\n * \r\n * This event is dispatched when the Loader starts running. At this point load progress is zero.\r\n * \r\n * This event is dispatched even if there aren't any files in the load queue.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('start', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#START\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Loader.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADD: require('./ADD_EVENT'),\r\n COMPLETE: require('./COMPLETE_EVENT'),\r\n FILE_COMPLETE: require('./FILE_COMPLETE_EVENT'),\r\n FILE_KEY_COMPLETE: require('./FILE_KEY_COMPLETE_EVENT'),\r\n FILE_LOAD_ERROR: require('./FILE_LOAD_ERROR_EVENT'),\r\n FILE_LOAD: require('./FILE_LOAD_EVENT'),\r\n FILE_PROGRESS: require('./FILE_PROGRESS_EVENT'),\r\n POST_PROCESS: require('./POST_PROCESS_EVENT'),\r\n PROGRESS: require('./PROGRESS_EVENT'),\r\n START: require('./START_EVENT')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\n\r\n/**\r\n * @classdesc\r\n * A single Image File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#image method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#image.\r\n *\r\n * @class ImageFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. Only provided for, and used by, Sprite Sheets.\r\n */\r\nvar ImageFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function ImageFile (loader, key, url, xhrSettings, frameConfig)\r\n {\r\n var extension = 'png';\r\n var normalMapURL;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n normalMapURL = GetFastValue(config, 'normalMap');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n frameConfig = GetFastValue(config, 'frameConfig');\r\n }\r\n\r\n if (Array.isArray(url))\r\n {\r\n normalMapURL = url[1];\r\n url = url[0];\r\n }\r\n\r\n var fileConfig = {\r\n type: 'image',\r\n cache: loader.textureManager,\r\n extension: extension,\r\n responseType: 'blob',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: frameConfig\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n // Do we have a normal map to load as well?\r\n if (normalMapURL)\r\n {\r\n var normalMap = new ImageFile(loader, this.key, normalMapURL, xhrSettings, frameConfig);\r\n\r\n normalMap.type = 'normalMap';\r\n\r\n this.setLink(normalMap);\r\n\r\n loader.addFile(normalMap);\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = new Image();\r\n\r\n this.data.crossOrigin = this.crossOrigin;\r\n\r\n var _this = this;\r\n\r\n this.data.onload = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessComplete();\r\n };\r\n\r\n this.data.onerror = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessError();\r\n };\r\n\r\n File.createObjectURL(this.data, this.xhrLoader.response, 'image/png');\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n var texture;\r\n var linkFile = this.linkFile;\r\n\r\n if (linkFile && linkFile.state === CONST.FILE_COMPLETE)\r\n {\r\n if (this.type === 'image')\r\n {\r\n texture = this.cache.addImage(this.key, this.data, linkFile.data);\r\n }\r\n else\r\n {\r\n texture = this.cache.addImage(linkFile.key, linkFile.data, this.data);\r\n }\r\n\r\n this.pendingDestroy(texture);\r\n\r\n linkFile.pendingDestroy(texture);\r\n }\r\n else if (!linkFile)\r\n {\r\n texture = this.cache.addImage(this.key, this.data);\r\n\r\n this.pendingDestroy(texture);\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an Image, or array of Images, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.image('logo', 'images/phaserLogo.png');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\r\n * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback\r\n * of animated gifs to Canvas elements.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.image({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.ImageFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:\r\n *\r\n * ```javascript\r\n * this.load.image('logo', 'images/AtariLogo.png');\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'logo');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\r\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\r\n *\r\n * ```javascript\r\n * this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]);\r\n * ```\r\n *\r\n * Or, if you are using a config object use the `normalMap` property:\r\n *\r\n * ```javascript\r\n * this.load.image({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png',\r\n * normalMap: 'images/AtariLogo-n.png'\r\n * });\r\n * ```\r\n *\r\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\r\n * Normal maps are a WebGL only feature.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Image File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#image\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig|Phaser.Types.Loader.FileTypes.ImageFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {this} The Loader instance.\r\n */\r\nFileTypesManager.register('image', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new ImageFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new ImageFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = ImageFile;\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar CONST = require('../const');\nvar File = require('../File');\nvar FileTypesManager = require('../FileTypesManager');\nvar GetFastValue = require('../../utils/object/GetFastValue');\nvar GetValue = require('../../utils/object/GetValue');\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\n\n/**\n * @classdesc\n * A single JSON File suitable for loading by the Loader.\n *\n * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly.\n *\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json.\n *\n * @class JSONFile\n * @extends Phaser.Loader.File\n * @memberof Phaser.Loader.FileTypes\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object.\n * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\n */\nvar JSONFile = new Class({\n\n Extends: File,\n\n initialize:\n\n // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object\n // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing\n\n function JSONFile (loader, key, url, xhrSettings, dataKey)\n {\n var extension = 'json';\n\n if (IsPlainObject(key))\n {\n var config = key;\n\n key = GetFastValue(config, 'key');\n url = GetFastValue(config, 'url');\n xhrSettings = GetFastValue(config, 'xhrSettings');\n extension = GetFastValue(config, 'extension', extension);\n dataKey = GetFastValue(config, 'dataKey', dataKey);\n }\n\n var fileConfig = {\n type: 'json',\n cache: loader.cacheManager.json,\n extension: extension,\n responseType: 'text',\n key: key,\n url: url,\n xhrSettings: xhrSettings,\n config: dataKey\n };\n\n File.call(this, loader, fileConfig);\n\n if (IsPlainObject(url))\n {\n // Object provided instead of a URL, so no need to actually load it (populate data with value)\n if (dataKey)\n {\n this.data = GetValue(url, dataKey);\n }\n else\n {\n this.data = url;\n }\n\n this.state = CONST.FILE_POPULATED;\n }\n },\n\n /**\n * Called automatically by Loader.nextFile.\n * This method controls what extra work this File does with its loaded data.\n *\n * @method Phaser.Loader.FileTypes.JSONFile#onProcess\n * @since 3.7.0\n */\n onProcess: function ()\n {\n if (this.state !== CONST.FILE_POPULATED)\n {\n this.state = CONST.FILE_PROCESSING;\n\n var json = JSON.parse(this.xhrLoader.responseText);\n\n var key = this.config;\n\n if (typeof key === 'string')\n {\n this.data = GetValue(json, key, json);\n }\n else\n {\n this.data = json;\n }\n }\n\n this.onProcessComplete();\n }\n\n});\n\n/**\n * Adds a JSON file, or array of JSON files, to the current load queue.\n *\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\n *\n * ```javascript\n * function preload ()\n * {\n * this.load.json('wavedata', 'files/AlienWaveData.json');\n * }\n * ```\n *\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\n * loaded.\n *\n * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.\n * The key should be unique both in terms of files being loaded and files already present in the JSON Cache.\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\n * then remove it from the JSON Cache first, before loading a new one.\n *\n * Instead of passing arguments you can pass a configuration object, such as:\n *\n * ```javascript\n * this.load.json({\n * key: 'wavedata',\n * url: 'files/AlienWaveData.json'\n * });\n * ```\n *\n * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details.\n *\n * Once the file has finished loading you can access it from its Cache using its key:\n *\n * ```javascript\n * this.load.json('wavedata', 'files/AlienWaveData.json');\n * // and later in your game ...\n * var data = this.cache.json.get('wavedata');\n * ```\n *\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\n * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and\n * this is what you would use to retrieve the text from the JSON Cache.\n *\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\n *\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"data\"\n * and no URL is given then the Loader will set the URL to be \"data.json\". It will always add `.json` as the extension, although\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\n *\n * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache,\n * rather than the whole file. For example, if your JSON data had a structure like this:\n *\n * ```json\n * {\n * \"level1\": {\n * \"baddies\": {\n * \"aliens\": {},\n * \"boss\": {}\n * }\n * },\n * \"level2\": {},\n * \"level3\": {}\n * }\n * ```\n *\n * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`.\n *\n * Note: The ability to load this type of file will only be available if the JSON File type has been built into Phaser.\n * It is available in the default build but can be excluded from custom builds.\n *\n * @method Phaser.Loader.LoaderPlugin#json\n * @fires Phaser.Loader.LoaderPlugin#ADD\n * @since 3.0.0\n *\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\n * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\n *\n * @return {this} The Loader instance.\n */\nFileTypesManager.register('json', function (key, url, dataKey, xhrSettings)\n{\n if (Array.isArray(key))\n {\n for (var i = 0; i < key.length; i++)\n {\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\n this.addFile(new JSONFile(this, key[i]));\n }\n }\n else\n {\n this.addFile(new JSONFile(this, key, url, xhrSettings, dataKey));\n }\n\n return this;\n});\n\nmodule.exports = JSONFile;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\nvar CONST = require('../const');\r\nvar File = require('../File');\r\nvar FileTypesManager = require('../FileTypesManager');\r\nvar GetFastValue = require('../../utils/object/GetFastValue');\r\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\r\n\r\n/**\r\n * @classdesc\r\n * A single Text File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text.\r\n *\r\n * @class TextFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar TextFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function TextFile (loader, key, url, xhrSettings)\r\n {\r\n var extension = 'txt';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'text',\r\n cache: loader.cacheManager.text,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.TextFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = this.xhrLoader.responseText;\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Text file, or array of Text files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.text('story', 'files/IntroStory.txt');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Text Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Text Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Text Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.text({\r\n * key: 'story',\r\n * url: 'files/IntroStory.txt'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.TextFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.text('story', 'files/IntroStory.txt');\r\n * // and later in your game ...\r\n * var data = this.cache.text.get('story');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and\r\n * this is what you would use to retrieve the text from the Text Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"story\"\r\n * and no URL is given then the Loader will set the URL to be \"story.txt\". It will always add `.txt` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Text File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#text\r\n * @fires Phaser.Loader.LoaderPlugin#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig|Phaser.Types.Loader.FileTypes.TextFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {this} The Loader instance.\r\n */\r\nFileTypesManager.register('text', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new TextFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new TextFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = TextFile;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the mean average of the given values.\r\n *\r\n * @function Phaser.Math.Average\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} values - The values to average.\r\n *\r\n * @return {number} The average value.\r\n */\r\nvar Average = function (values)\r\n{\r\n var sum = 0;\r\n\r\n for (var i = 0; i < values.length; i++)\r\n {\r\n sum += (+values[i]);\r\n }\r\n\r\n return sum / values.length;\r\n};\r\n\r\nmodule.exports = Average;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Factorial = require('./Factorial');\r\n\r\n/**\r\n * Calculates the Bernstein basis from the three factorial coefficients.\r\n *\r\n * @function Phaser.Math.Bernstein\r\n * @since 3.0.0\r\n *\r\n * @param {number} n - The first value.\r\n * @param {number} i - The second value.\r\n *\r\n * @return {number} The Bernstein basis of Factorial(n) / Factorial(i) / Factorial(n - i)\r\n */\r\nvar Bernstein = function (n, i)\r\n{\r\n return Factorial(n) / Factorial(i) / Factorial(n - i);\r\n};\r\n\r\nmodule.exports = Bernstein;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random integer between the `min` and `max` values, inclusive.\r\n *\r\n * @function Phaser.Math.Between\r\n * @since 3.0.0\r\n *\r\n * @param {integer} min - The minimum value.\r\n * @param {integer} max - The maximum value.\r\n *\r\n * @return {integer} The random integer.\r\n */\r\nvar Between = function (min, max)\r\n{\r\n return Math.floor(Math.random() * (max - min + 1) + min);\r\n};\r\n\r\nmodule.exports = Between;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates a Catmull-Rom value from the given points, based on an alpha of 0.5.\r\n *\r\n * @function Phaser.Math.CatmullRom\r\n * @since 3.0.0\r\n *\r\n * @param {number} t - The amount to interpolate by.\r\n * @param {number} p0 - The first control point.\r\n * @param {number} p1 - The second control point.\r\n * @param {number} p2 - The third control point.\r\n * @param {number} p3 - The fourth control point.\r\n *\r\n * @return {number} The Catmull-Rom value.\r\n */\r\nvar CatmullRom = function (t, p0, p1, p2, p3)\r\n{\r\n var v0 = (p2 - p0) * 0.5;\r\n var v1 = (p3 - p1) * 0.5;\r\n var t2 = t * t;\r\n var t3 = t * t2;\r\n\r\n return (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1;\r\n};\r\n\r\nmodule.exports = CatmullRom;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Ceils to some place comparative to a `base`, default is 10 for decimal place.\r\n *\r\n * The `place` is represented by the power applied to `base` to get that place.\r\n *\r\n * @function Phaser.Math.CeilTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {number} [place=0] - The place to round to.\r\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar CeilTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.ceil(value * p) / p;\r\n};\r\n\r\nmodule.exports = CeilTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Force a value within the boundaries by clamping it to the range `min`, `max`.\r\n *\r\n * @function Phaser.Math.Clamp\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to be clamped.\r\n * @param {number} min - The minimum bounds.\r\n * @param {number} max - The maximum bounds.\r\n *\r\n * @return {number} The clamped value.\r\n */\r\nvar Clamp = function (value, min, max)\r\n{\r\n return Math.max(min, Math.min(max, value));\r\n};\r\n\r\nmodule.exports = Clamp;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\n\r\n/**\r\n * Convert the given angle from degrees, to the equivalent angle in radians.\r\n *\r\n * @function Phaser.Math.DegToRad\r\n * @since 3.0.0\r\n *\r\n * @param {integer} degrees - The angle (in degrees) to convert to radians.\r\n *\r\n * @return {number} The given angle converted to radians.\r\n */\r\nvar DegToRad = function (degrees)\r\n{\r\n return degrees * CONST.DEG_TO_RAD;\r\n};\r\n\r\nmodule.exports = DegToRad;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the positive difference of two given numbers.\r\n *\r\n * @function Phaser.Math.Difference\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first number in the calculation.\r\n * @param {number} b - The second number in the calculation.\r\n *\r\n * @return {number} The positive difference of the two given numbers.\r\n */\r\nvar Difference = function (a, b)\r\n{\r\n return Math.abs(a - b);\r\n};\r\n\r\nmodule.exports = Difference;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the factorial of a given number for integer values greater than 0.\r\n *\r\n * @function Phaser.Math.Factorial\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - A positive integer to calculate the factorial of.\r\n *\r\n * @return {number} The factorial of the given number.\r\n */\r\nvar Factorial = function (value)\r\n{\r\n if (value === 0)\r\n {\r\n return 1;\r\n }\r\n\r\n var res = value;\r\n\r\n while (--value)\r\n {\r\n res *= value;\r\n }\r\n\r\n return res;\r\n};\r\n\r\nmodule.exports = Factorial;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive.\r\n *\r\n * @function Phaser.Math.FloatBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The lower bound for the float, inclusive.\r\n * @param {number} max - The upper bound for the float exclusive.\r\n *\r\n * @return {number} A random float within the given range.\r\n */\r\nvar FloatBetween = function (min, max)\r\n{\r\n return Math.random() * (max - min) + min;\r\n};\r\n\r\nmodule.exports = FloatBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Floors to some place comparative to a `base`, default is 10 for decimal place.\r\n *\r\n * The `place` is represented by the power applied to `base` to get that place.\r\n *\r\n * @function Phaser.Math.FloorTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {integer} [place=0] - The place to round to.\r\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar FloorTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.floor(value * p) / p;\r\n};\r\n\r\nmodule.exports = FloorTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = require('./Clamp');\r\n\r\n/**\r\n * Return a value based on the range between `min` and `max` and the percentage given.\r\n *\r\n * @function Phaser.Math.FromPercent\r\n * @since 3.0.0\r\n *\r\n * @param {number} percent - A value between 0 and 1 representing the percentage.\r\n * @param {number} min - The minimum value.\r\n * @param {number} [max] - The maximum value.\r\n *\r\n * @return {number} The value that is `percent` percent between `min` and `max`.\r\n */\r\nvar FromPercent = function (percent, min, max)\r\n{\r\n percent = Clamp(percent, 0, 1);\r\n\r\n return (max - min) * percent;\r\n};\r\n\r\nmodule.exports = FromPercent;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a per-ms speed from a distance and time (given in seconds).\r\n *\r\n * @function Phaser.Math.GetSpeed\r\n * @since 3.0.0\r\n *\r\n * @param {number} distance - The distance.\r\n * @param {integer} time - The time, in seconds.\r\n *\r\n * @return {number} The speed, in distance per ms.\r\n *\r\n * @example\r\n * // 400px over 1 second is 0.4 px/ms\r\n * Phaser.Math.GetSpeed(400, 1) // -> 0.4\r\n */\r\nvar GetSpeed = function (distance, time)\r\n{\r\n return (distance / time) / 1000;\r\n};\r\n\r\nmodule.exports = GetSpeed;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if a given value is an even number.\r\n *\r\n * @function Phaser.Math.IsEven\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to perform the check with.\r\n *\r\n * @return {boolean} Whether the number is even or not.\r\n */\r\nvar IsEven = function (value)\r\n{\r\n // Use abstract equality == for \"is number\" test\r\n\r\n // eslint-disable-next-line eqeqeq\r\n return (value == parseFloat(value)) ? !(value % 2) : void 0;\r\n};\r\n\r\nmodule.exports = IsEven;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if a given value is an even number using a strict type check.\r\n *\r\n * @function Phaser.Math.IsEvenStrict\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to perform the check with.\r\n *\r\n * @return {boolean} Whether the number is even or not.\r\n */\r\nvar IsEvenStrict = function (value)\r\n{\r\n // Use strict equality === for \"is number\" test\r\n return (value === parseFloat(value)) ? !(value % 2) : void 0;\r\n};\r\n\r\nmodule.exports = IsEvenStrict;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates a linear (interpolation) value over t.\r\n *\r\n * @function Phaser.Math.Linear\r\n * @since 3.0.0\r\n *\r\n * @param {number} p0 - The first point.\r\n * @param {number} p1 - The second point.\r\n * @param {number} t - The percentage between p0 and p1 to return, represented as a number between 0 and 1.\r\n *\r\n * @return {number} The step t% of the way between p0 and p1.\r\n */\r\nvar Linear = function (p0, p1, t)\r\n{\r\n return (p1 - p0) * t + p0;\r\n};\r\n\r\nmodule.exports = Linear;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A three-dimensional matrix.\r\n *\r\n * Defaults to the identity matrix when instantiated.\r\n *\r\n * @class Matrix3\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} [m] - Optional Matrix3 to copy values from.\r\n */\r\nvar Matrix3 = new Class({\r\n\r\n initialize:\r\n\r\n function Matrix3 (m)\r\n {\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.Math.Matrix3#val\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.val = new Float32Array(9);\r\n\r\n if (m)\r\n {\r\n // Assume Matrix3 with val:\r\n this.copy(m);\r\n }\r\n else\r\n {\r\n // Default to identity\r\n this.identity();\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Matrix3.\r\n *\r\n * @method Phaser.Math.Matrix3#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} A clone of this Matrix3.\r\n */\r\n clone: function ()\r\n {\r\n return new Matrix3(this);\r\n },\r\n\r\n /**\r\n * This method is an alias for `Matrix3.copy`.\r\n *\r\n * @method Phaser.Math.Matrix3#set\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to set the values of this Matrix's from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n set: function (src)\r\n {\r\n return this.copy(src);\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix into this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n copy: function (src)\r\n {\r\n var out = this.val;\r\n var a = src.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix4 into this Matrix3.\r\n *\r\n * @method Phaser.Math.Matrix3#fromMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromMat4: function (m)\r\n {\r\n var a = m.val;\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[4];\r\n out[4] = a[5];\r\n out[5] = a[6];\r\n out[6] = a[8];\r\n out[7] = a[9];\r\n out[8] = a[10];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given array.\r\n *\r\n * @method Phaser.Math.Matrix3#fromArray\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The array to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromArray: function (a)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n identity: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 1;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 1;\r\n out[5] = 0;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transpose this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#transpose\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n transpose: function ()\r\n {\r\n var a = this.val;\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a12 = a[5];\r\n\r\n a[1] = a[3];\r\n a[2] = a[6];\r\n a[3] = a01;\r\n a[5] = a[7];\r\n a[6] = a02;\r\n a[7] = a12;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n invert: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n var b01 = a22 * a11 - a12 * a21;\r\n var b11 = -a22 * a10 + a12 * a20;\r\n var b21 = a21 * a10 - a11 * a20;\r\n\r\n // Calculate the determinant\r\n var det = a00 * b01 + a01 * b11 + a02 * b21;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n a[0] = b01 * det;\r\n a[1] = (-a22 * a01 + a02 * a21) * det;\r\n a[2] = (a12 * a01 - a02 * a11) * det;\r\n a[3] = b11 * det;\r\n a[4] = (a22 * a00 - a02 * a20) * det;\r\n a[5] = (-a12 * a00 + a02 * a10) * det;\r\n a[6] = b21 * det;\r\n a[7] = (-a21 * a00 + a01 * a20) * det;\r\n a[8] = (a11 * a00 - a01 * a10) * det;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the adjoint, or adjugate, of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#adjoint\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n adjoint: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n a[0] = (a11 * a22 - a12 * a21);\r\n a[1] = (a02 * a21 - a01 * a22);\r\n a[2] = (a01 * a12 - a02 * a11);\r\n a[3] = (a12 * a20 - a10 * a22);\r\n a[4] = (a00 * a22 - a02 * a20);\r\n a[5] = (a02 * a10 - a00 * a12);\r\n a[6] = (a10 * a21 - a11 * a20);\r\n a[7] = (a01 * a20 - a00 * a21);\r\n a[8] = (a00 * a11 - a01 * a10);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the determinant of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#determinant\r\n * @since 3.0.0\r\n *\r\n * @return {number} The determinant of this Matrix.\r\n */\r\n determinant: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to multiply this Matrix by.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n multiply: function (src)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n var b = src.val;\r\n\r\n var b00 = b[0];\r\n var b01 = b[1];\r\n var b02 = b[2];\r\n var b10 = b[3];\r\n var b11 = b[4];\r\n var b12 = b[5];\r\n var b20 = b[6];\r\n var b21 = b[7];\r\n var b22 = b[8];\r\n\r\n a[0] = b00 * a00 + b01 * a10 + b02 * a20;\r\n a[1] = b00 * a01 + b01 * a11 + b02 * a21;\r\n a[2] = b00 * a02 + b01 * a12 + b02 * a22;\r\n\r\n a[3] = b10 * a00 + b11 * a10 + b12 * a20;\r\n a[4] = b10 * a01 + b11 * a11 + b12 * a21;\r\n a[5] = b10 * a02 + b11 * a12 + b12 * a22;\r\n\r\n a[6] = b20 * a00 + b21 * a10 + b22 * a20;\r\n a[7] = b20 * a01 + b21 * a11 + b22 * a21;\r\n a[8] = b20 * a02 + b21 * a12 + b22 * a22;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given Vector.\r\n *\r\n * @method Phaser.Math.Matrix3#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n translate: function (v)\r\n {\r\n var a = this.val;\r\n var x = v.x;\r\n var y = v.y;\r\n\r\n a[6] = x * a[0] + y * a[3] + a[6];\r\n a[7] = x * a[1] + y * a[4] + a[7];\r\n a[8] = x * a[2] + y * a[5] + a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a rotation transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n rotate: function (rad)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n a[0] = c * a00 + s * a10;\r\n a[1] = c * a01 + s * a11;\r\n a[2] = c * a02 + s * a12;\r\n\r\n a[3] = c * a10 - s * a00;\r\n a[4] = c * a11 - s * a01;\r\n a[5] = c * a12 - s * a02;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * Uses the `x` and `y` components of the given Vector to scale the Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#scale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n scale: function (v)\r\n {\r\n var a = this.val;\r\n var x = v.x;\r\n var y = v.y;\r\n\r\n a[0] = x * a[0];\r\n a[1] = x * a[1];\r\n a[2] = x * a[2];\r\n\r\n a[3] = y * a[3];\r\n a[4] = y * a[4];\r\n a[5] = y * a[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given Quaternion.\r\n *\r\n * @method Phaser.Math.Matrix3#fromQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromQuat: function (q)\r\n {\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n var out = this.val;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[3] = xy + wz;\r\n out[6] = xz - wy;\r\n\r\n out[1] = xy - wz;\r\n out[4] = 1 - (xx + zz);\r\n out[7] = yz + wx;\r\n\r\n out[2] = xz + wy;\r\n out[5] = yz - wx;\r\n out[8] = 1 - (xx + yy);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix3 to be normalized from the given Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix3#normalFromMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to normalize the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n normalFromMat4: function (m)\r\n {\r\n var a = m.val;\r\n var out = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\r\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\r\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\r\n\r\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\r\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\r\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\r\n\r\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\r\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\r\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Matrix3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\nvar EPSILON = 0.000001;\r\n\r\n/**\r\n * @classdesc\r\n * A four-dimensional matrix.\r\n *\r\n * @class Matrix4\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} [m] - Optional Matrix4 to copy values from.\r\n */\r\nvar Matrix4 = new Class({\r\n\r\n initialize:\r\n\r\n function Matrix4 (m)\r\n {\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.Math.Matrix4#val\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.val = new Float32Array(16);\r\n\r\n if (m)\r\n {\r\n // Assume Matrix4 with val:\r\n this.copy(m);\r\n }\r\n else\r\n {\r\n // Default to identity\r\n this.identity();\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} A clone of this Matrix4.\r\n */\r\n clone: function ()\r\n {\r\n return new Matrix4(this);\r\n },\r\n\r\n // TODO - Should work with basic values\r\n\r\n /**\r\n * This method is an alias for `Matrix4.copy`.\r\n *\r\n * @method Phaser.Math.Matrix4#set\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to set the values of this Matrix's from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n set: function (src)\r\n {\r\n return this.copy(src);\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix into this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n copy: function (src)\r\n {\r\n var out = this.val;\r\n var a = src.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n out[9] = a[9];\r\n out[10] = a[10];\r\n out[11] = a[11];\r\n out[12] = a[12];\r\n out[13] = a[13];\r\n out[14] = a[14];\r\n out[15] = a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given array.\r\n *\r\n * @method Phaser.Math.Matrix4#fromArray\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The array to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n fromArray: function (a)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n out[9] = a[9];\r\n out[10] = a[10];\r\n out[11] = a[11];\r\n out[12] = a[12];\r\n out[13] = a[13];\r\n out[14] = a[14];\r\n out[15] = a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix.\r\n *\r\n * Sets all values to `0`.\r\n *\r\n * @method Phaser.Math.Matrix4#zero\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n zero: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 0;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 0;\r\n out[5] = 0;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = 0;\r\n out[11] = 0;\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = 0;\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x`, `y` and `z` values of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#xyz\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {number} z - The z value.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n xyz: function (x, y, z)\r\n {\r\n this.identity();\r\n\r\n var out = this.val;\r\n\r\n out[12] = x;\r\n out[13] = y;\r\n out[14] = z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the scaling values of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scaling\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x scaling value.\r\n * @param {number} y - The y scaling value.\r\n * @param {number} z - The z scaling value.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n scaling: function (x, y, z)\r\n {\r\n this.zero();\r\n\r\n var out = this.val;\r\n\r\n out[0] = x;\r\n out[5] = y;\r\n out[10] = z;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n identity: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 1;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 0;\r\n out[5] = 1;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = 1;\r\n out[11] = 0;\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = 0;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transpose this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#transpose\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n transpose: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n var a23 = a[11];\r\n\r\n a[1] = a[4];\r\n a[2] = a[8];\r\n a[3] = a[12];\r\n a[4] = a01;\r\n a[6] = a[9];\r\n a[7] = a[13];\r\n a[8] = a02;\r\n a[9] = a12;\r\n a[11] = a[14];\r\n a[12] = a03;\r\n a[13] = a13;\r\n a[14] = a23;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n invert: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n a[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\r\n a[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\r\n a[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\r\n a[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\r\n a[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\r\n a[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\r\n a[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\r\n a[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\r\n a[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\r\n a[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\r\n a[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\r\n a[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\r\n a[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\r\n a[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\r\n a[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\r\n a[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the adjoint, or adjugate, of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#adjoint\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n adjoint: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n a[0] = (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22));\r\n a[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));\r\n a[2] = (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12));\r\n a[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));\r\n a[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));\r\n a[5] = (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22));\r\n a[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));\r\n a[7] = (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12));\r\n a[8] = (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21));\r\n a[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));\r\n a[10] = (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11));\r\n a[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));\r\n a[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));\r\n a[13] = (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21));\r\n a[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));\r\n a[15] = (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the determinant of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#determinant\r\n * @since 3.0.0\r\n *\r\n * @return {number} The determinant of this Matrix.\r\n */\r\n determinant: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to multiply this Matrix by.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n multiply: function (src)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b = src.val;\r\n\r\n // Cache only the current line of the second matrix\r\n var b0 = b[0];\r\n var b1 = b[1];\r\n var b2 = b[2];\r\n var b3 = b[3];\r\n\r\n a[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[4];\r\n b1 = b[5];\r\n b2 = b[6];\r\n b3 = b[7];\r\n\r\n a[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[8];\r\n b1 = b[9];\r\n b2 = b[10];\r\n b3 = b[11];\r\n\r\n a[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[12];\r\n b1 = b[13];\r\n b2 = b[14];\r\n b3 = b[15];\r\n\r\n a[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply the values of this Matrix4 by those given in the `src` argument.\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyLocal\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The source Matrix4 that this Matrix4 is multiplied by.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n multiplyLocal: function (src)\r\n {\r\n var a = [];\r\n var m1 = this.val;\r\n var m2 = src.val;\r\n\r\n a[0] = m1[0] * m2[0] + m1[1] * m2[4] + m1[2] * m2[8] + m1[3] * m2[12];\r\n a[1] = m1[0] * m2[1] + m1[1] * m2[5] + m1[2] * m2[9] + m1[3] * m2[13];\r\n a[2] = m1[0] * m2[2] + m1[1] * m2[6] + m1[2] * m2[10] + m1[3] * m2[14];\r\n a[3] = m1[0] * m2[3] + m1[1] * m2[7] + m1[2] * m2[11] + m1[3] * m2[15];\r\n\r\n a[4] = m1[4] * m2[0] + m1[5] * m2[4] + m1[6] * m2[8] + m1[7] * m2[12];\r\n a[5] = m1[4] * m2[1] + m1[5] * m2[5] + m1[6] * m2[9] + m1[7] * m2[13];\r\n a[6] = m1[4] * m2[2] + m1[5] * m2[6] + m1[6] * m2[10] + m1[7] * m2[14];\r\n a[7] = m1[4] * m2[3] + m1[5] * m2[7] + m1[6] * m2[11] + m1[7] * m2[15];\r\n\r\n a[8] = m1[8] * m2[0] + m1[9] * m2[4] + m1[10] * m2[8] + m1[11] * m2[12];\r\n a[9] = m1[8] * m2[1] + m1[9] * m2[5] + m1[10] * m2[9] + m1[11] * m2[13];\r\n a[10] = m1[8] * m2[2] + m1[9] * m2[6] + m1[10] * m2[10] + m1[11] * m2[14];\r\n a[11] = m1[8] * m2[3] + m1[9] * m2[7] + m1[10] * m2[11] + m1[11] * m2[15];\r\n\r\n a[12] = m1[12] * m2[0] + m1[13] * m2[4] + m1[14] * m2[8] + m1[15] * m2[12];\r\n a[13] = m1[12] * m2[1] + m1[13] * m2[5] + m1[14] * m2[9] + m1[15] * m2[13];\r\n a[14] = m1[12] * m2[2] + m1[13] * m2[6] + m1[14] * m2[10] + m1[15] * m2[14];\r\n a[15] = m1[12] * m2[3] + m1[13] * m2[7] + m1[14] * m2[11] + m1[15] * m2[15];\r\n\r\n return this.fromArray(a);\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given Vector.\r\n *\r\n * @method Phaser.Math.Matrix4#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n translate: function (v)\r\n {\r\n var x = v.x;\r\n var y = v.y;\r\n var z = v.z;\r\n var a = this.val;\r\n\r\n a[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\r\n a[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\r\n a[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\r\n a[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given values.\r\n *\r\n * @method Phaser.Math.Matrix4#translateXYZ\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n translateXYZ: function (x, y, z)\r\n {\r\n var a = this.val;\r\n\r\n a[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\r\n a[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\r\n a[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\r\n a[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * Uses the `x`, `y` and `z` components of the given Vector to scale the Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n scale: function (v)\r\n {\r\n var x = v.x;\r\n var y = v.y;\r\n var z = v.z;\r\n var a = this.val;\r\n\r\n a[0] = a[0] * x;\r\n a[1] = a[1] * x;\r\n a[2] = a[2] * x;\r\n a[3] = a[3] * x;\r\n\r\n a[4] = a[4] * y;\r\n a[5] = a[5] * y;\r\n a[6] = a[6] * y;\r\n a[7] = a[7] * y;\r\n\r\n a[8] = a[8] * z;\r\n a[9] = a[9] * z;\r\n a[10] = a[10] * z;\r\n a[11] = a[11] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scaleXYZ\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n scaleXYZ: function (x, y, z)\r\n {\r\n var a = this.val;\r\n\r\n a[0] = a[0] * x;\r\n a[1] = a[1] * x;\r\n a[2] = a[2] * x;\r\n a[3] = a[3] * x;\r\n\r\n a[4] = a[4] * y;\r\n a[5] = a[5] * y;\r\n a[6] = a[6] * y;\r\n a[7] = a[7] * y;\r\n\r\n a[8] = a[8] * z;\r\n a[9] = a[9] * z;\r\n a[10] = a[10] * z;\r\n a[11] = a[11] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Derive a rotation matrix around the given axis.\r\n *\r\n * @method Phaser.Math.Matrix4#makeRotationAxis\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} axis - The rotation axis.\r\n * @param {number} angle - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n makeRotationAxis: function (axis, angle)\r\n {\r\n // Based on http://www.gamedev.net/reference/articles/article1199.asp\r\n\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n var t = 1 - c;\r\n var x = axis.x;\r\n var y = axis.y;\r\n var z = axis.z;\r\n var tx = t * x;\r\n var ty = t * y;\r\n\r\n this.fromArray([\r\n tx * x + c, tx * y - s * z, tx * z + s * y, 0,\r\n tx * y + s * z, ty * y + c, ty * z - s * x, 0,\r\n tx * z - s * y, ty * z + s * x, t * z * z + c, 0,\r\n 0, 0, 0, 1\r\n ]);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a rotation transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n * @param {Phaser.Math.Vector3} axis - The axis to rotate upon.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotate: function (rad, axis)\r\n {\r\n var a = this.val;\r\n var x = axis.x;\r\n var y = axis.y;\r\n var z = axis.z;\r\n var len = Math.sqrt(x * x + y * y + z * z);\r\n\r\n if (Math.abs(len) < EPSILON)\r\n {\r\n return null;\r\n }\r\n\r\n len = 1 / len;\r\n x *= len;\r\n y *= len;\r\n z *= len;\r\n\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n var t = 1 - c;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Construct the elements of the rotation matrix\r\n var b00 = x * x * t + c;\r\n var b01 = y * x * t + z * s;\r\n var b02 = z * x * t - y * s;\r\n\r\n var b10 = x * y * t - z * s;\r\n var b11 = y * y * t + c;\r\n var b12 = z * y * t + x * s;\r\n\r\n var b20 = x * z * t + y * s;\r\n var b21 = y * z * t - x * s;\r\n var b22 = z * z * t + c;\r\n\r\n // Perform rotation-specific matrix multiplication\r\n a[0] = a00 * b00 + a10 * b01 + a20 * b02;\r\n a[1] = a01 * b00 + a11 * b01 + a21 * b02;\r\n a[2] = a02 * b00 + a12 * b01 + a22 * b02;\r\n a[3] = a03 * b00 + a13 * b01 + a23 * b02;\r\n a[4] = a00 * b10 + a10 * b11 + a20 * b12;\r\n a[5] = a01 * b10 + a11 * b11 + a21 * b12;\r\n a[6] = a02 * b10 + a12 * b11 + a22 * b12;\r\n a[7] = a03 * b10 + a13 * b11 + a23 * b12;\r\n a[8] = a00 * b20 + a10 * b21 + a20 * b22;\r\n a[9] = a01 * b20 + a11 * b21 + a21 * b22;\r\n a[10] = a02 * b20 + a12 * b21 + a22 * b22;\r\n a[11] = a03 * b20 + a13 * b21 + a23 * b22;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its X axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotateX: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[4] = a10 * c + a20 * s;\r\n a[5] = a11 * c + a21 * s;\r\n a[6] = a12 * c + a22 * s;\r\n a[7] = a13 * c + a23 * s;\r\n a[8] = a20 * c - a10 * s;\r\n a[9] = a21 * c - a11 * s;\r\n a[10] = a22 * c - a12 * s;\r\n a[11] = a23 * c - a13 * s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its Y axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle to rotate by, in radians.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotateY: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[0] = a00 * c - a20 * s;\r\n a[1] = a01 * c - a21 * s;\r\n a[2] = a02 * c - a22 * s;\r\n a[3] = a03 * c - a23 * s;\r\n a[8] = a00 * s + a20 * c;\r\n a[9] = a01 * s + a21 * c;\r\n a[10] = a02 * s + a22 * c;\r\n a[11] = a03 * s + a23 * c;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its Z axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle to rotate by, in radians.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotateZ: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[0] = a00 * c + a10 * s;\r\n a[1] = a01 * c + a11 * s;\r\n a[2] = a02 * c + a12 * s;\r\n a[3] = a03 * c + a13 * s;\r\n a[4] = a10 * c - a00 * s;\r\n a[5] = a11 * c - a01 * s;\r\n a[6] = a12 * c - a02 * s;\r\n a[7] = a13 * c - a03 * s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given rotation Quaternion and translation Vector.\r\n *\r\n * @method Phaser.Math.Matrix4#fromRotationTranslation\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set rotation from.\r\n * @param {Phaser.Math.Vector3} v - The Vector to set translation from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n fromRotationTranslation: function (q, v)\r\n {\r\n // Quaternion math\r\n var out = this.val;\r\n\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[1] = xy + wz;\r\n out[2] = xz - wy;\r\n out[3] = 0;\r\n\r\n out[4] = xy - wz;\r\n out[5] = 1 - (xx + zz);\r\n out[6] = yz + wx;\r\n out[7] = 0;\r\n\r\n out[8] = xz + wy;\r\n out[9] = yz - wx;\r\n out[10] = 1 - (xx + yy);\r\n out[11] = 0;\r\n\r\n out[12] = v.x;\r\n out[13] = v.y;\r\n out[14] = v.z;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given Quaternion.\r\n *\r\n * @method Phaser.Math.Matrix4#fromQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n fromQuat: function (q)\r\n {\r\n var out = this.val;\r\n\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[1] = xy + wz;\r\n out[2] = xz - wy;\r\n out[3] = 0;\r\n\r\n out[4] = xy - wz;\r\n out[5] = 1 - (xx + zz);\r\n out[6] = yz + wx;\r\n out[7] = 0;\r\n\r\n out[8] = xz + wy;\r\n out[9] = yz - wx;\r\n out[10] = 1 - (xx + yy);\r\n out[11] = 0;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = 0;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a frustum matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#frustum\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left bound of the frustum.\r\n * @param {number} right - The right bound of the frustum.\r\n * @param {number} bottom - The bottom bound of the frustum.\r\n * @param {number} top - The top bound of the frustum.\r\n * @param {number} near - The near bound of the frustum.\r\n * @param {number} far - The far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n frustum: function (left, right, bottom, top, near, far)\r\n {\r\n var out = this.val;\r\n\r\n var rl = 1 / (right - left);\r\n var tb = 1 / (top - bottom);\r\n var nf = 1 / (near - far);\r\n\r\n out[0] = (near * 2) * rl;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = (near * 2) * tb;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = (right + left) * rl;\r\n out[9] = (top + bottom) * tb;\r\n out[10] = (far + near) * nf;\r\n out[11] = -1;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = (far * near * 2) * nf;\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a perspective projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#perspective\r\n * @since 3.0.0\r\n *\r\n * @param {number} fovy - Vertical field of view in radians\r\n * @param {number} aspect - Aspect ratio. Typically viewport width /height.\r\n * @param {number} near - Near bound of the frustum.\r\n * @param {number} far - Far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n perspective: function (fovy, aspect, near, far)\r\n {\r\n var out = this.val;\r\n var f = 1.0 / Math.tan(fovy / 2);\r\n var nf = 1 / (near - far);\r\n\r\n out[0] = f / aspect;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = f;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = (far + near) * nf;\r\n out[11] = -1;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = (2 * far * near) * nf;\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a perspective projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#perspectiveLH\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of the frustum.\r\n * @param {number} height - The height of the frustum.\r\n * @param {number} near - Near bound of the frustum.\r\n * @param {number} far - Far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n perspectiveLH: function (width, height, near, far)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = (2 * near) / width;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = (2 * near) / height;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = -far / (near - far);\r\n out[11] = 1;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = (near * far) / (near - far);\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate an orthogonal projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#ortho\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left bound of the frustum.\r\n * @param {number} right - The right bound of the frustum.\r\n * @param {number} bottom - The bottom bound of the frustum.\r\n * @param {number} top - The top bound of the frustum.\r\n * @param {number} near - The near bound of the frustum.\r\n * @param {number} far - The far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n ortho: function (left, right, bottom, top, near, far)\r\n {\r\n var out = this.val;\r\n var lr = left - right;\r\n var bt = bottom - top;\r\n var nf = near - far;\r\n\r\n // Avoid division by zero\r\n lr = (lr === 0) ? lr : 1 / lr;\r\n bt = (bt === 0) ? bt : 1 / bt;\r\n nf = (nf === 0) ? nf : 1 / nf;\r\n\r\n out[0] = -2 * lr;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = -2 * bt;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = 2 * nf;\r\n out[11] = 0;\r\n\r\n out[12] = (left + right) * lr;\r\n out[13] = (top + bottom) * bt;\r\n out[14] = (far + near) * nf;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a look-at matrix with the given eye position, focal point, and up axis.\r\n *\r\n * @method Phaser.Math.Matrix4#lookAt\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} eye - Position of the viewer\r\n * @param {Phaser.Math.Vector3} center - Point the viewer is looking at\r\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n lookAt: function (eye, center, up)\r\n {\r\n var out = this.val;\r\n\r\n var eyex = eye.x;\r\n var eyey = eye.y;\r\n var eyez = eye.z;\r\n\r\n var upx = up.x;\r\n var upy = up.y;\r\n var upz = up.z;\r\n\r\n var centerx = center.x;\r\n var centery = center.y;\r\n var centerz = center.z;\r\n\r\n if (Math.abs(eyex - centerx) < EPSILON &&\r\n Math.abs(eyey - centery) < EPSILON &&\r\n Math.abs(eyez - centerz) < EPSILON)\r\n {\r\n return this.identity();\r\n }\r\n\r\n var z0 = eyex - centerx;\r\n var z1 = eyey - centery;\r\n var z2 = eyez - centerz;\r\n\r\n var len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);\r\n\r\n z0 *= len;\r\n z1 *= len;\r\n z2 *= len;\r\n\r\n var x0 = upy * z2 - upz * z1;\r\n var x1 = upz * z0 - upx * z2;\r\n var x2 = upx * z1 - upy * z0;\r\n\r\n len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);\r\n\r\n if (!len)\r\n {\r\n x0 = 0;\r\n x1 = 0;\r\n x2 = 0;\r\n }\r\n else\r\n {\r\n len = 1 / len;\r\n x0 *= len;\r\n x1 *= len;\r\n x2 *= len;\r\n }\r\n\r\n var y0 = z1 * x2 - z2 * x1;\r\n var y1 = z2 * x0 - z0 * x2;\r\n var y2 = z0 * x1 - z1 * x0;\r\n\r\n len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);\r\n\r\n if (!len)\r\n {\r\n y0 = 0;\r\n y1 = 0;\r\n y2 = 0;\r\n }\r\n else\r\n {\r\n len = 1 / len;\r\n y0 *= len;\r\n y1 *= len;\r\n y2 *= len;\r\n }\r\n\r\n out[0] = x0;\r\n out[1] = y0;\r\n out[2] = z0;\r\n out[3] = 0;\r\n\r\n out[4] = x1;\r\n out[5] = y1;\r\n out[6] = z1;\r\n out[7] = 0;\r\n\r\n out[8] = x2;\r\n out[9] = y2;\r\n out[10] = z2;\r\n out[11] = 0;\r\n\r\n out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\r\n out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\r\n out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this matrix from the given `yaw`, `pitch` and `roll` values.\r\n *\r\n * @method Phaser.Math.Matrix4#yawPitchRoll\r\n * @since 3.0.0\r\n *\r\n * @param {number} yaw - The yaw value.\r\n * @param {number} pitch - The pitch value.\r\n * @param {number} roll - The roll value.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n yawPitchRoll: function (yaw, pitch, roll)\r\n {\r\n this.zero();\r\n _tempMat1.zero();\r\n _tempMat2.zero();\r\n\r\n var m0 = this.val;\r\n var m1 = _tempMat1.val;\r\n var m2 = _tempMat2.val;\r\n\r\n // Rotate Z\r\n var s = Math.sin(roll);\r\n var c = Math.cos(roll);\r\n\r\n m0[10] = 1;\r\n m0[15] = 1;\r\n m0[0] = c;\r\n m0[1] = s;\r\n m0[4] = -s;\r\n m0[5] = c;\r\n\r\n // Rotate X\r\n s = Math.sin(pitch);\r\n c = Math.cos(pitch);\r\n\r\n m1[0] = 1;\r\n m1[15] = 1;\r\n m1[5] = c;\r\n m1[10] = c;\r\n m1[9] = -s;\r\n m1[6] = s;\r\n\r\n // Rotate Y\r\n s = Math.sin(yaw);\r\n c = Math.cos(yaw);\r\n\r\n m2[5] = 1;\r\n m2[15] = 1;\r\n m2[0] = c;\r\n m2[2] = -s;\r\n m2[8] = s;\r\n m2[10] = c;\r\n\r\n this.multiplyLocal(_tempMat1);\r\n this.multiplyLocal(_tempMat2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a world matrix from the given rotation, position, scale, view matrix and projection matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#setWorldMatrix\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} rotation - The rotation of the world matrix.\r\n * @param {Phaser.Math.Vector3} position - The position of the world matrix.\r\n * @param {Phaser.Math.Vector3} scale - The scale of the world matrix.\r\n * @param {Phaser.Math.Matrix4} [viewMatrix] - The view matrix.\r\n * @param {Phaser.Math.Matrix4} [projectionMatrix] - The projection matrix.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n setWorldMatrix: function (rotation, position, scale, viewMatrix, projectionMatrix)\r\n {\r\n this.yawPitchRoll(rotation.y, rotation.x, rotation.z);\r\n\r\n _tempMat1.scaling(scale.x, scale.y, scale.z);\r\n _tempMat2.xyz(position.x, position.y, position.z);\r\n\r\n this.multiplyLocal(_tempMat1);\r\n this.multiplyLocal(_tempMat2);\r\n\r\n if (viewMatrix !== undefined)\r\n {\r\n this.multiplyLocal(viewMatrix);\r\n }\r\n\r\n if (projectionMatrix !== undefined)\r\n {\r\n this.multiplyLocal(projectionMatrix);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nvar _tempMat1 = new Matrix4();\r\nvar _tempMat2 = new Matrix4();\r\n\r\nmodule.exports = Matrix4;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Add an `amount` to a `value`, limiting the maximum result to `max`.\r\n *\r\n * @function Phaser.Math.MaxAdd\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to add to.\r\n * @param {number} amount - The amount to add.\r\n * @param {number} max - The maximum value to return.\r\n *\r\n * @return {number} The resulting value.\r\n */\r\nvar MaxAdd = function (value, amount, max)\r\n{\r\n return Math.min(value + amount, max);\r\n};\r\n\r\nmodule.exports = MaxAdd;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Subtract an `amount` from `value`, limiting the minimum result to `min`.\r\n *\r\n * @function Phaser.Math.MinSub\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to subtract from.\r\n * @param {number} amount - The amount to subtract.\r\n * @param {number} min - The minimum value to return.\r\n *\r\n * @return {number} The resulting value.\r\n */\r\nvar MinSub = function (value, amount, min)\r\n{\r\n return Math.max(value - amount, min);\r\n};\r\n\r\nmodule.exports = MinSub;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Work out what percentage `value` is of the range between `min` and `max`.\r\n * If `max` isn't given then it will return the percentage of `value` to `min`.\r\n *\r\n * You can optionally specify an `upperMax` value, which is a mid-way point in the range that represents 100%, after which the % starts to go down to zero again.\r\n *\r\n * @function Phaser.Math.Percent\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to determine the percentage of.\r\n * @param {number} min - The minimum value.\r\n * @param {number} [max] - The maximum value.\r\n * @param {number} [upperMax] - The mid-way point in the range that represents 100%.\r\n *\r\n * @return {number} A value between 0 and 1 representing the percentage.\r\n */\r\nvar Percent = function (value, min, max, upperMax)\r\n{\r\n if (max === undefined) { max = min + 1; }\r\n\r\n var percentage = (value - min) / (max - min);\r\n\r\n if (percentage > 1)\r\n {\r\n if (upperMax !== undefined)\r\n {\r\n percentage = ((upperMax - value)) / (upperMax - max);\r\n\r\n if (percentage < 0)\r\n {\r\n percentage = 0;\r\n }\r\n }\r\n else\r\n {\r\n percentage = 1;\r\n }\r\n }\r\n else if (percentage < 0)\r\n {\r\n percentage = 0;\r\n }\r\n\r\n return percentage;\r\n};\r\n\r\nmodule.exports = Percent;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\nvar Vector3 = require('./Vector3');\r\nvar Matrix3 = require('./Matrix3');\r\n\r\nvar EPSILON = 0.000001;\r\n\r\n// Some shared 'private' arrays\r\nvar siNext = new Int8Array([ 1, 2, 0 ]);\r\nvar tmp = new Float32Array([ 0, 0, 0 ]);\r\n\r\nvar xUnitVec3 = new Vector3(1, 0, 0);\r\nvar yUnitVec3 = new Vector3(0, 1, 0);\r\n\r\nvar tmpvec = new Vector3();\r\nvar tmpMat3 = new Matrix3();\r\n\r\n/**\r\n * @classdesc\r\n * A quaternion.\r\n *\r\n * @class Quaternion\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n * @param {number} [w] - The w component.\r\n */\r\nvar Quaternion = new Class({\r\n\r\n initialize:\r\n\r\n function Quaternion (x, y, z, w)\r\n {\r\n /**\r\n * The x component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n /**\r\n * The y component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n /**\r\n * The z component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n /**\r\n * The w component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Copy the components of a given Quaternion or Vector into this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#copy\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} src - The Quaternion or Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z;\r\n this.w = src.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the components of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} [x=0] - The x component, or an object containing x, y, z, and w components.\r\n * @param {number} [y=0] - The y component.\r\n * @param {number} [z=0] - The z component.\r\n * @param {number} [w=0] - The w component.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n set: function (x, y, z, w)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Quaternion or Vector to this Quaternion. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Quaternion#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to add to this Quaternion.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z;\r\n this.w += v.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract a given Quaternion or Vector from this Quaternion. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Quaternion#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to subtract from this Quaternion.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z;\r\n this.w -= v.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Quaternion by the given value.\r\n *\r\n * @method Phaser.Math.Quaternion#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Quaternion by.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n scale: function (scale)\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n this.w *= scale;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the length of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Quaternion.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return Math.sqrt(x * x + y * y + z * z + w * w);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Quaternion squared.\r\n *\r\n * @method Phaser.Math.Quaternion#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Quaternion, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n },\r\n\r\n /**\r\n * Normalize this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var len = x * x + y * y + z * z + w * w;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n this.w = w * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Quaternion and the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#dot\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to dot product with this Quaternion.\r\n *\r\n * @return {number} The dot product of this Quaternion and the given Quaternion or Vector.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\r\n },\r\n\r\n /**\r\n * Linearly interpolate this Quaternion towards the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to interpolate towards.\r\n * @param {number} [t=0] - The percentage of interpolation.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n this.w = aw + t * (v.w - aw);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotates this Quaternion based on the two given vectors.\r\n *\r\n * @method Phaser.Math.Quaternion#rotationTo\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The transform rotation vector.\r\n * @param {Phaser.Math.Vector3} b - The target rotation vector.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotationTo: function (a, b)\r\n {\r\n var dot = a.x * b.x + a.y * b.y + a.z * b.z;\r\n\r\n if (dot < -0.999999)\r\n {\r\n if (tmpvec.copy(xUnitVec3).cross(a).length() < EPSILON)\r\n {\r\n tmpvec.copy(yUnitVec3).cross(a);\r\n }\r\n\r\n tmpvec.normalize();\r\n\r\n return this.setAxisAngle(tmpvec, Math.PI);\r\n\r\n }\r\n else if (dot > 0.999999)\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 1;\r\n\r\n return this;\r\n }\r\n else\r\n {\r\n tmpvec.copy(a).cross(b);\r\n\r\n this.x = tmpvec.x;\r\n this.y = tmpvec.y;\r\n this.z = tmpvec.z;\r\n this.w = 1 + dot;\r\n\r\n return this.normalize();\r\n }\r\n },\r\n\r\n /**\r\n * Set the axes of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#setAxes\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} view - The view axis.\r\n * @param {Phaser.Math.Vector3} right - The right axis.\r\n * @param {Phaser.Math.Vector3} up - The upwards axis.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setAxes: function (view, right, up)\r\n {\r\n var m = tmpMat3.val;\r\n\r\n m[0] = right.x;\r\n m[3] = right.y;\r\n m[6] = right.z;\r\n\r\n m[1] = up.x;\r\n m[4] = up.y;\r\n m[7] = up.z;\r\n\r\n m[2] = -view.x;\r\n m[5] = -view.y;\r\n m[8] = -view.z;\r\n\r\n return this.fromMat3(tmpMat3).normalize();\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n identity: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the axis angle of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#setAxisAngle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} axis - The axis.\r\n * @param {number} rad - The angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setAxisAngle: function (axis, rad)\r\n {\r\n rad = rad * 0.5;\r\n\r\n var s = Math.sin(rad);\r\n\r\n this.x = s * axis.x;\r\n this.y = s * axis.y;\r\n this.z = s * axis.z;\r\n this.w = Math.cos(rad);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply this Quaternion by the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to multiply this Quaternion by.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n multiply: function (b)\r\n {\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n var bw = b.w;\r\n\r\n this.x = ax * bw + aw * bx + ay * bz - az * by;\r\n this.y = ay * bw + aw * by + az * bx - ax * bz;\r\n this.z = az * bw + aw * bz + ax * by - ay * bx;\r\n this.w = aw * bw - ax * bx - ay * by - az * bz;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Smoothly linearly interpolate this Quaternion towards the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#slerp\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to interpolate towards.\r\n * @param {number} t - The percentage of interpolation.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n slerp: function (b, t)\r\n {\r\n // benchmarks: http://jsperf.com/quaternion-slerp-implementations\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n var bw = b.w;\r\n\r\n // calc cosine\r\n var cosom = ax * bx + ay * by + az * bz + aw * bw;\r\n\r\n // adjust signs (if necessary)\r\n if (cosom < 0)\r\n {\r\n cosom = -cosom;\r\n bx = - bx;\r\n by = - by;\r\n bz = - bz;\r\n bw = - bw;\r\n }\r\n\r\n // \"from\" and \"to\" quaternions are very close\r\n // ... so we can do a linear interpolation\r\n var scale0 = 1 - t;\r\n var scale1 = t;\r\n\r\n // calculate coefficients\r\n if ((1 - cosom) > EPSILON)\r\n {\r\n // standard case (slerp)\r\n var omega = Math.acos(cosom);\r\n var sinom = Math.sin(omega);\r\n\r\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\r\n scale1 = Math.sin(t * omega) / sinom;\r\n }\r\n\r\n // calculate final values\r\n this.x = scale0 * ax + scale1 * bx;\r\n this.y = scale0 * ay + scale1 * by;\r\n this.z = scale0 * az + scale1 * bz;\r\n this.w = scale0 * aw + scale1 * bw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n invert: function ()\r\n {\r\n var a0 = this.x;\r\n var a1 = this.y;\r\n var a2 = this.z;\r\n var a3 = this.w;\r\n\r\n var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;\r\n var invDot = (dot) ? 1 / dot : 0;\r\n\r\n // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0\r\n\r\n this.x = -a0 * invDot;\r\n this.y = -a1 * invDot;\r\n this.z = -a2 * invDot;\r\n this.w = a3 * invDot;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Convert this Quaternion into its conjugate.\r\n *\r\n * Sets the x, y and z components.\r\n *\r\n * @method Phaser.Math.Quaternion#conjugate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n conjugate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the X axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateX: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n this.x = ax * bw + aw * bx;\r\n this.y = ay * bw + az * bx;\r\n this.z = az * bw - ay * bx;\r\n this.w = aw * bw - ax * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the Y axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateY: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var by = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n this.x = ax * bw - az * by;\r\n this.y = ay * bw + aw * by;\r\n this.z = az * bw + ax * by;\r\n this.w = aw * bw - ay * by;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the Z axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateZ: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bz = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n this.x = ax * bw + ay * bz;\r\n this.y = ay * bw - ax * bz;\r\n this.z = az * bw + aw * bz;\r\n this.w = aw * bw - az * bz;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Create a unit (or rotation) Quaternion from its x, y, and z components.\r\n *\r\n * Sets the w component.\r\n *\r\n * @method Phaser.Math.Quaternion#calculateW\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n calculateW: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n this.w = -Math.sqrt(1.0 - x * x - y * y - z * z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Convert the given Matrix into this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#fromMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix to convert from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n fromMat3: function (mat)\r\n {\r\n // benchmarks:\r\n // http://jsperf.com/typed-array-access-speed\r\n // http://jsperf.com/conversion-of-3x3-matrix-to-quaternion\r\n\r\n // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\r\n // article \"Quaternion Calculus and Fast Animation\".\r\n var m = mat.val;\r\n var fTrace = m[0] + m[4] + m[8];\r\n var fRoot;\r\n\r\n if (fTrace > 0)\r\n {\r\n // |w| > 1/2, may as well choose w > 1/2\r\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\r\n\r\n this.w = 0.5 * fRoot;\r\n\r\n fRoot = 0.5 / fRoot; // 1/(4w)\r\n\r\n this.x = (m[7] - m[5]) * fRoot;\r\n this.y = (m[2] - m[6]) * fRoot;\r\n this.z = (m[3] - m[1]) * fRoot;\r\n }\r\n else\r\n {\r\n // |w| <= 1/2\r\n var i = 0;\r\n\r\n if (m[4] > m[0])\r\n {\r\n i = 1;\r\n }\r\n\r\n if (m[8] > m[i * 3 + i])\r\n {\r\n i = 2;\r\n }\r\n\r\n var j = siNext[i];\r\n var k = siNext[j];\r\n\r\n // This isn't quite as clean without array access\r\n fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1);\r\n tmp[i] = 0.5 * fRoot;\r\n\r\n fRoot = 0.5 / fRoot;\r\n\r\n tmp[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;\r\n tmp[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;\r\n\r\n this.x = tmp[0];\r\n this.y = tmp[1];\r\n this.z = tmp[2];\r\n this.w = (m[k * 3 + j] - m[j * 3 + k]) * fRoot;\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Quaternion;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\n\r\n/**\r\n * Convert the given angle in radians, to the equivalent angle in degrees.\r\n *\r\n * @function Phaser.Math.RadToDeg\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The angle in radians to convert ot degrees.\r\n *\r\n * @return {integer} The given angle converted to degrees.\r\n */\r\nvar RadToDeg = function (radians)\r\n{\r\n return radians * CONST.RAD_TO_DEG;\r\n};\r\n\r\nmodule.exports = RadToDeg;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random unit vector.\r\n *\r\n * Computes random values for the given vector between -1 and 1 that can be used to represent a direction.\r\n *\r\n * Optionally accepts a scale value to scale the resulting vector by.\r\n *\r\n * @function Phaser.Math.RandomXY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} vector - The Vector to compute random values for.\r\n * @param {number} [scale=1] - The scale of the random values.\r\n *\r\n * @return {Phaser.Math.Vector2} The given Vector.\r\n */\r\nvar RandomXY = function (vector, scale)\r\n{\r\n if (scale === undefined) { scale = 1; }\r\n\r\n var r = Math.random() * 2 * Math.PI;\r\n\r\n vector.x = Math.cos(r) * scale;\r\n vector.y = Math.sin(r) * scale;\r\n\r\n return vector;\r\n};\r\n\r\nmodule.exports = RandomXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random position vector in a spherical area, optionally defined by the given radius.\r\n *\r\n * @function Phaser.Math.RandomXYZ\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec3 - The Vector to compute random values for.\r\n * @param {number} [radius=1] - The radius.\r\n *\r\n * @return {Phaser.Math.Vector3} The given Vector.\r\n */\r\nvar RandomXYZ = function (vec3, radius)\r\n{\r\n if (radius === undefined) { radius = 1; }\r\n\r\n var r = Math.random() * 2 * Math.PI;\r\n var z = (Math.random() * 2) - 1;\r\n var zScale = Math.sqrt(1 - z * z) * radius;\r\n\r\n vec3.x = Math.cos(r) * zScale;\r\n vec3.y = Math.sin(r) * zScale;\r\n vec3.z = z * radius;\r\n\r\n return vec3;\r\n};\r\n\r\nmodule.exports = RandomXYZ;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random four-dimensional vector.\r\n *\r\n * @function Phaser.Math.RandomXYZW\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} vec4 - The Vector to compute random values for.\r\n * @param {number} [scale=1] - The scale of the random values.\r\n *\r\n * @return {Phaser.Math.Vector4} The given Vector.\r\n */\r\nvar RandomXYZW = function (vec4, scale)\r\n{\r\n if (scale === undefined) { scale = 1; }\r\n\r\n // TODO: Not spherical; should fix this for more uniform distribution\r\n vec4.x = (Math.random() * 2 - 1) * scale;\r\n vec4.y = (Math.random() * 2 - 1) * scale;\r\n vec4.z = (Math.random() * 2 - 1) * scale;\r\n vec4.w = (Math.random() * 2 - 1) * scale;\r\n\r\n return vec4;\r\n};\r\n\r\nmodule.exports = RandomXYZW;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a given point by a given angle around the origin (0, 0), in an anti-clockwise direction.\r\n *\r\n * @function Phaser.Math.Rotate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} angle - The angle to be rotated by in an anticlockwise direction.\r\n *\r\n * @return {Phaser.Geom.Point} The given point, rotated by the given angle in an anticlockwise direction.\r\n */\r\nvar Rotate = function (point, angle)\r\n{\r\n var x = point.x;\r\n var y = point.y;\r\n\r\n point.x = (x * Math.cos(angle)) - (y * Math.sin(angle));\r\n point.y = (x * Math.sin(angle)) + (y * Math.cos(angle));\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = Rotate;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a `point` around `x` and `y` to the given `angle`, at the same distance.\r\n *\r\n * In polar notation, this maps a point from (r, t) to (r, angle), vs. the origin (x, y).\r\n *\r\n * @function Phaser.Math.RotateAround\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} x - The horizontal coordinate to rotate around.\r\n * @param {number} y - The vertical coordinate to rotate around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The given point.\r\n */\r\nvar RotateAround = function (point, x, y, angle)\r\n{\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n\r\n var tx = point.x - x;\r\n var ty = point.y - y;\r\n\r\n point.x = tx * c - ty * s + x;\r\n point.y = tx * s + ty * c + y;\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = RotateAround;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a `point` around `x` and `y` by the given `angle` and `distance`.\r\n *\r\n * In polar notation, this maps a point from (r, t) to (distance, t + angle), vs. the origin (x, y).\r\n *\r\n * @function Phaser.Math.RotateAroundDistance\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} x - The horizontal coordinate to rotate around.\r\n * @param {number} y - The vertical coordinate to rotate around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n * @param {number} distance - The distance from (x, y) to place the point at.\r\n *\r\n * @return {Phaser.Types.Math.Vector2Like} The given point.\r\n */\r\nvar RotateAroundDistance = function (point, x, y, angle, distance)\r\n{\r\n var t = angle + Math.atan2(point.y - y, point.x - x);\r\n\r\n point.x = x + (distance * Math.cos(t));\r\n point.y = y + (distance * Math.sin(t));\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = RotateAroundDistance;\r\n","/**\n * @author samme\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Position a `point` at the given `angle` and `distance` to (`x`, `y`).\n *\n * @function Phaser.Math.RotateTo\n * @since 3.24.0\n *\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\n *\n * @param {Phaser.Types.Math.Vector2Like} point - The point to be positioned.\n * @param {number} x - The horizontal coordinate to position from.\n * @param {number} y - The vertical coordinate to position from.\n * @param {number} angle - The angle of rotation in radians.\n * @param {number} distance - The distance from (x, y) to place the point at.\n *\n * @return {Phaser.Types.Math.Vector2Like} The given point.\n */\nvar RotateTo = function (point, x, y, angle, distance)\n{\n point.x = x + (distance * Math.cos(angle));\n point.y = y + (distance * Math.sin(angle));\n\n return point;\n};\n\nmodule.exports = RotateTo;\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector3 = require('../math/Vector3');\r\nvar Matrix4 = require('../math/Matrix4');\r\nvar Quaternion = require('../math/Quaternion');\r\n\r\nvar tmpMat4 = new Matrix4();\r\nvar tmpQuat = new Quaternion();\r\nvar tmpVec3 = new Vector3();\r\n\r\n/**\r\n * Rotates a vector in place by axis angle.\r\n *\r\n * This is the same as transforming a point by an\r\n * axis-angle quaternion, but it has higher precision.\r\n *\r\n * @function Phaser.Math.RotateVec3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec - The vector to be rotated.\r\n * @param {Phaser.Math.Vector3} axis - The axis to rotate around.\r\n * @param {number} radians - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Math.Vector3} The given vector.\r\n */\r\nvar RotateVec3 = function (vec, axis, radians)\r\n{\r\n // Set the quaternion to our axis angle\r\n tmpQuat.setAxisAngle(axis, radians);\r\n\r\n // Create a rotation matrix from the axis angle\r\n tmpMat4.fromRotationTranslation(tmpQuat, tmpVec3.set(0, 0, 0));\r\n\r\n // Multiply our vector by the rotation matrix\r\n return vec.transformMat4(tmpMat4);\r\n};\r\n\r\nmodule.exports = RotateVec3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Round a given number so it is further away from zero. That is, positive numbers are rounded up, and negative numbers are rounded down.\r\n *\r\n * @function Phaser.Math.RoundAwayFromZero\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to round.\r\n *\r\n * @return {number} The rounded number, rounded away from zero.\r\n */\r\nvar RoundAwayFromZero = function (value)\r\n{\r\n // \"Opposite\" of truncate.\r\n return (value > 0) ? Math.ceil(value) : Math.floor(value);\r\n};\r\n\r\nmodule.exports = RoundAwayFromZero;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Round a value to the given precision.\r\n * \r\n * For example:\r\n * \r\n * ```javascript\r\n * RoundTo(123.456, 0) = 123\r\n * RoundTo(123.456, 1) = 120\r\n * RoundTo(123.456, 2) = 100\r\n * ```\r\n * \r\n * To round the decimal, i.e. to round to precision, pass in a negative `place`:\r\n * \r\n * ```javascript\r\n * RoundTo(123.456789, 0) = 123\r\n * RoundTo(123.456789, -1) = 123.5\r\n * RoundTo(123.456789, -2) = 123.46\r\n * RoundTo(123.456789, -3) = 123.457\r\n * ```\r\n *\r\n * @function Phaser.Math.RoundTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {integer} [place=0] - The place to round to. Positive to round the units, negative to round the decimal.\r\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar RoundTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.round(value * p) / p;\r\n};\r\n\r\nmodule.exports = RoundTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Generate a series of sine and cosine values.\r\n *\r\n * @function Phaser.Math.SinCosTableGenerator\r\n * @since 3.0.0\r\n *\r\n * @param {number} length - The number of values to generate.\r\n * @param {number} [sinAmp=1] - The sine value amplitude.\r\n * @param {number} [cosAmp=1] - The cosine value amplitude.\r\n * @param {number} [frequency=1] - The frequency of the values.\r\n *\r\n * @return {Phaser.Types.Math.SinCosTable} The generated values.\r\n */\r\nvar SinCosTableGenerator = function (length, sinAmp, cosAmp, frequency)\r\n{\r\n if (sinAmp === undefined) { sinAmp = 1; }\r\n if (cosAmp === undefined) { cosAmp = 1; }\r\n if (frequency === undefined) { frequency = 1; }\r\n\r\n frequency *= Math.PI / length;\r\n\r\n var cos = [];\r\n var sin = [];\r\n\r\n for (var c = 0; c < length; c++)\r\n {\r\n cosAmp -= sinAmp * frequency;\r\n sinAmp += cosAmp * frequency;\r\n\r\n cos[c] = cosAmp;\r\n sin[c] = sinAmp;\r\n }\r\n\r\n return {\r\n sin: sin,\r\n cos: cos,\r\n length: length\r\n };\r\n};\r\n\r\nmodule.exports = SinCosTableGenerator;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a smooth interpolation percentage of `x` between `min` and `max`.\r\n *\r\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\r\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\r\n * between 0 and 1 otherwise.\r\n *\r\n * @function Phaser.Math.SmoothStep\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\r\n *\r\n * @param {number} x - The input value.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The percentage of interpolation, between 0 and 1.\r\n */\r\nvar SmoothStep = function (x, min, max)\r\n{\r\n if (x <= min)\r\n {\r\n return 0;\r\n }\r\n\r\n if (x >= max)\r\n {\r\n return 1;\r\n }\r\n\r\n x = (x - min) / (max - min);\r\n\r\n return x * x * (3 - 2 * x);\r\n};\r\n\r\nmodule.exports = SmoothStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a smoother interpolation percentage of `x` between `min` and `max`.\r\n *\r\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\r\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\r\n * between 0 and 1 otherwise.\r\n *\r\n * Produces an even smoother interpolation than {@link Phaser.Math.SmoothStep}.\r\n *\r\n * @function Phaser.Math.SmootherStep\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\r\n *\r\n * @param {number} x - The input value.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The percentage of interpolation, between 0 and 1.\r\n */\r\nvar SmootherStep = function (x, min, max)\r\n{\r\n x = Math.max(0, Math.min(1, (x - min) / (max - min)));\r\n\r\n return x * x * x * (x * (x * 6 - 15) + 10);\r\n};\r\n\r\nmodule.exports = SmootherStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = require('./Vector2');\r\n\r\n/**\r\n * Returns a Vector2 containing the x and y position of the given index in a `width` x `height` sized grid.\r\n * \r\n * For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2.\r\n * \r\n * If the given index is out of range an empty Vector2 is returned.\r\n *\r\n * @function Phaser.Math.ToXY\r\n * @since 3.19.0\r\n *\r\n * @param {integer} index - The position within the grid to get the x/y value for.\r\n * @param {integer} width - The width of the grid.\r\n * @param {integer} height - The height of the grid.\r\n * @param {Phaser.Math.Vector2} [out] - An optional Vector2 to store the result in. If not given, a new Vector2 instance will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 where the x and y properties contain the given grid index.\r\n */\r\nvar ToXY = function (index, width, height, out)\r\n{\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var x = 0;\r\n var y = 0;\r\n var total = width * height;\r\n\r\n if (index > 0 && index <= total)\r\n {\r\n if (index > width - 1)\r\n {\r\n y = Math.floor(index / width);\r\n x = index - (y * width);\r\n }\r\n else\r\n {\r\n x = index;\r\n }\r\n\r\n out.set(x, y);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = ToXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = require('./Vector2');\r\n\r\n/**\r\n * Takes the `x` and `y` coordinates and transforms them into the same space as\r\n * defined by the position, rotation and scale values.\r\n *\r\n * @function Phaser.Math.TransformXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to be transformed.\r\n * @param {number} y - The y coordinate to be transformed.\r\n * @param {number} positionX - Horizontal position of the transform point.\r\n * @param {number} positionY - Vertical position of the transform point.\r\n * @param {number} rotation - Rotation of the transform point, in radians.\r\n * @param {number} scaleX - Horizontal scale of the transform point.\r\n * @param {number} scaleY - Vertical scale of the transform point.\r\n * @param {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} [output] - The output vector, point or object for the translated coordinates.\r\n *\r\n * @return {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} The translated point.\r\n */\r\nvar TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output)\r\n{\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var radianSin = Math.sin(rotation);\r\n var radianCos = Math.cos(rotation);\r\n\r\n // Rotate and Scale\r\n var a = radianCos * scaleX;\r\n var b = radianSin * scaleX;\r\n var c = -radianSin * scaleY;\r\n var d = radianCos * scaleY;\r\n\r\n // Invert\r\n var id = 1 / ((a * d) + (c * -b));\r\n\r\n output.x = (d * id * x) + (-c * id * y) + (((positionY * c) - (positionX * d)) * id);\r\n output.y = (a * id * y) + (-b * id * x) + (((-positionY * a) + (positionX * b)) * id);\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = TransformXY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\nvar FuzzyEqual = require('../math/fuzzy/Equal');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 2D space.\r\n *\r\n * A two-component vector.\r\n *\r\n * @class Vector2\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number|Phaser.Types.Math.Vector2Like} [x] - The x component, or an object with `x` and `y` properties.\r\n * @param {number} [y] - The y component.\r\n */\r\nvar Vector2 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector2 (x, y)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector2#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector2#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n }\r\n else\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector2.\r\n *\r\n * @method Phaser.Math.Vector2#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} A clone of this Vector2.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector2(this.x, this.y);\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x || 0;\r\n this.y = src.y || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the component values of this Vector from a given Vector2Like object.\r\n *\r\n * @method Phaser.Math.Vector2#setFromObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} obj - The object containing the component values to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setFromObject: function (obj)\r\n {\r\n this.x = obj.x || 0;\r\n this.y = obj.y || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x` and `y` components of the this Vector to the given `x` and `y` values.\r\n *\r\n * @method Phaser.Math.Vector2#set\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x value to set for this Vector.\r\n * @param {number} [y=x] - The y value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n set: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This method is an alias for `Vector2.set`.\r\n *\r\n * @method Phaser.Math.Vector2#setTo\r\n * @since 3.4.0\r\n *\r\n * @param {number} x - The x value to set for this Vector.\r\n * @param {number} [y=x] - The y value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setTo: function (x, y)\r\n {\r\n return this.set(x, y);\r\n },\r\n\r\n /**\r\n * Sets the `x` and `y` values of this object from a given polar coordinate.\r\n *\r\n * @method Phaser.Math.Vector2#setToPolar\r\n * @since 3.0.0\r\n *\r\n * @param {number} azimuth - The angular coordinate, in radians.\r\n * @param {number} [radius=1] - The radial coordinate (length).\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setToPolar: function (azimuth, radius)\r\n {\r\n if (radius == null) { radius = 1; }\r\n\r\n this.x = Math.cos(azimuth) * radius;\r\n this.y = Math.sin(azimuth) * radius;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict equality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector2#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector.\r\n *\r\n * @return {boolean} Whether the given Vector is equal to this Vector.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y));\r\n },\r\n\r\n /**\r\n * Check whether this Vector is approximately equal to a given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#fuzzyEquals\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector.\r\n * @param {number} [epsilon=0.0001] - The tolerance value.\r\n *\r\n * @return {boolean} Whether both absolute differences of the x and y components are smaller than `epsilon`.\r\n */\r\n fuzzyEquals: function (v, epsilon)\r\n {\r\n return (FuzzyEqual(this.x, v.x, epsilon) && FuzzyEqual(this.y, v.y, epsilon));\r\n },\r\n\r\n /**\r\n * Calculate the angle between this Vector and the positive x-axis, in radians.\r\n *\r\n * @method Phaser.Math.Vector2#angle\r\n * @since 3.0.0\r\n *\r\n * @return {number} The angle between this Vector, and the positive x-axis, given in radians.\r\n */\r\n angle: function ()\r\n {\r\n // computes the angle in radians with respect to the positive x-axis\r\n\r\n var angle = Math.atan2(this.y, this.x);\r\n\r\n if (angle < 0)\r\n {\r\n angle += 2 * Math.PI;\r\n }\r\n\r\n return angle;\r\n },\r\n\r\n /**\r\n * Set the angle of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#setAngle\r\n * @since 3.23.0\r\n *\r\n * @param {number} angle - The angle, in radians.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setAngle: function (angle)\r\n {\r\n return this.setToPolar(angle, this.length());\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector2#add\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n add: function (src)\r\n {\r\n this.x += src.x;\r\n this.y += src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector2#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n subtract: function (src)\r\n {\r\n this.x -= src.x;\r\n this.y -= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n multiply: function (src)\r\n {\r\n this.x *= src.x;\r\n this.y *= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector2#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n scale: function (value)\r\n {\r\n if (isFinite(value))\r\n {\r\n this.x *= value;\r\n this.y *= value;\r\n }\r\n else\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#divide\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n divide: function (src)\r\n {\r\n this.x /= src.x;\r\n this.y /= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Negate the `x` and `y` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#distance\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (src)\r\n {\r\n var dx = src.x - this.x;\r\n var dy = src.y - this.y;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector2#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (src)\r\n {\r\n var dx = src.x - this.x;\r\n var dy = src.y - this.y;\r\n\r\n return dx * dx + dy * dy;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n return Math.sqrt(x * x + y * y);\r\n },\r\n\r\n /**\r\n * Set the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#setLength\r\n * @since 3.23.0\r\n *\r\n * @param {number} length\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setLength: function (length)\r\n {\r\n return this.normalize().scale(length);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector2#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n return x * x + y * y;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var len = x * x + y * y;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Vector to its perpendicular, in the positive direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalizeRightHand\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalizeRightHand: function ()\r\n {\r\n var x = this.x;\r\n\r\n this.x = this.y * -1;\r\n this.y = x;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Vector to its perpendicular, in the negative direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalizeLeftHand\r\n * @since 3.23.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalizeLeftHand: function ()\r\n {\r\n var x = this.x;\r\n\r\n this.x = this.y;\r\n this.y = x * -1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector2 to dot product with this Vector2.\r\n *\r\n * @return {number} The dot product of this Vector and the given Vector.\r\n */\r\n dot: function (src)\r\n {\r\n return this.x * src.x + this.y * src.y;\r\n },\r\n\r\n /**\r\n * Calculate the cross product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#cross\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector2 to cross with this Vector2.\r\n *\r\n * @return {number} The cross product of this Vector and the given Vector.\r\n */\r\n cross: function (src)\r\n {\r\n return this.x * src.y - this.y * src.x;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector2 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n lerp: function (src, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n\r\n this.x = ax + t * (src.x - ax);\r\n this.y = ay + t * (src.y - ay);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector2#transformMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector2 with.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n transformMat3: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[3] * y + m[6];\r\n this.y = m[1] * x + m[4] * y + m[7];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector2#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector2 with.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[12];\r\n this.y = m[1] * x + m[5] * y + m[13];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0).\r\n *\r\n * @method Phaser.Math.Vector2#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Limit the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#limit\r\n * @since 3.23.0\r\n *\r\n * @param {number} max - The maximum length.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n limit: function (max)\r\n {\r\n var len = this.length();\r\n\r\n if (len && len > max)\r\n {\r\n this.scale(max / len);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reflect this Vector off a line defined by a normal.\r\n *\r\n * @method Phaser.Math.Vector2#reflect\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Math.Vector2} normal - A vector perpendicular to the line.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n reflect: function (normal)\r\n {\r\n normal = normal.clone().normalize();\r\n\r\n return this.subtract(normal.scale(2 * this.dot(normal)));\r\n },\r\n\r\n /**\r\n * Reflect this Vector across another.\r\n *\r\n * @method Phaser.Math.Vector2#mirror\r\n * @since 3.23.0\r\n *\r\n * @param {Phaser.Math.Vector2} axis - A vector to reflect across.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n mirror: function (axis)\r\n {\r\n return this.reflect(axis).negate();\r\n },\r\n\r\n /**\r\n * Rotate this Vector by an angle amount.\r\n *\r\n * @method Phaser.Math.Vector2#rotate\r\n * @since 3.23.0\r\n *\r\n * @param {number} delta - The angle to rotate by, in radians.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n rotate: function (delta)\r\n {\r\n var cos = Math.cos(delta);\r\n var sin = Math.sin(delta);\r\n\r\n return this.set(cos * this.x - sin * this.y, sin * this.x + cos * this.y);\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A static zero Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.ZERO\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.1.0\r\n */\r\nVector2.ZERO = new Vector2();\r\n\r\n/**\r\n * A static right Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.RIGHT\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.RIGHT = new Vector2(1, 0);\r\n\r\n/**\r\n * A static left Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.LEFT\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.LEFT = new Vector2(-1, 0);\r\n\r\n/**\r\n * A static up Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.UP\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.UP = new Vector2(0, -1);\r\n\r\n/**\r\n * A static down Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.DOWN\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.DOWN = new Vector2(0, 1);\r\n\r\n/**\r\n * A static one Vector2 for use by reference.\r\n *\r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.ONE\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.ONE = new Vector2(1, 1);\r\n\r\nmodule.exports = Vector2;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 3D space.\r\n *\r\n * A three-component vector.\r\n *\r\n * @class Vector3\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n */\r\nvar Vector3 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector3 (x, y, z)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The z component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.z = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Set this Vector to point up.\r\n *\r\n * Sets the y component of the vector to 1, and the others to 0.\r\n *\r\n * @method Phaser.Math.Vector3#up\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n up: function ()\r\n {\r\n this.x = 0;\r\n this.y = 1;\r\n this.z = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} A new Vector3 object containing this Vectors values.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector3(this.x, this.y, this.z);\r\n },\r\n\r\n /**\r\n * Calculate the cross (vector) product of two given Vectors.\r\n *\r\n * @method Phaser.Math.Vector3#crossVectors\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The first Vector to multiply.\r\n * @param {Phaser.Math.Vector3} b - The second Vector to multiply.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n crossVectors: function (a, b)\r\n {\r\n var ax = a.x;\r\n var ay = a.y;\r\n var az = a.z;\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n\r\n this.x = ay * bz - az * by;\r\n this.y = az * bx - ax * bz;\r\n this.z = ax * by - ay * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict equality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector3#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to compare against.\r\n *\r\n * @return {boolean} True if the two vectors strictly match, otherwise false.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z));\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#copy\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x`, `y`, and `z` components of this Vector to the given `x`, `y`, and `z` values.\r\n *\r\n * @method Phaser.Math.Vector3#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y and z components.\r\n * @param {number} [y] - The y value to set for this Vector.\r\n * @param {number} [z] - The z value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n set: function (x, y, z)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n multiply: function (v)\r\n {\r\n this.x *= v.x;\r\n this.y *= v.y;\r\n this.z *= v.z || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector3#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n scale: function (scale)\r\n {\r\n if (isFinite(scale))\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n }\r\n else\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#divide\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n divide: function (v)\r\n {\r\n this.x /= v.x;\r\n this.y /= v.y;\r\n this.z /= v.z || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Negate the `x`, `y` and `z` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#distance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n\r\n return Math.sqrt(dx * dx + dy * dy + dz * dz);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector3#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n\r\n return dx * dx + dy * dy + dz * dz;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n return Math.sqrt(x * x + y * y + z * z);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector3#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n return x * x + y * y + z * z;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector3#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var len = x * x + y * y + z * z;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to dot product with this Vector3.\r\n *\r\n * @return {number} The dot product of this Vector and `v`.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z;\r\n },\r\n\r\n /**\r\n * Calculate the cross (vector) product of this Vector (which will be modified) and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#cross\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector to cross product with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n cross: function (v)\r\n {\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var bx = v.x;\r\n var by = v.y;\r\n var bz = v.z;\r\n\r\n this.x = ay * bz - az * by;\r\n this.y = az * bx - ax * bz;\r\n this.z = ax * by - ay * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector3#transformMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformMat3: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n this.x = x * m[0] + y * m[3] + z * m[6];\r\n this.y = x * m[1] + y * m[4] + z * m[7];\r\n this.z = x * m[2] + y * m[5] + z * m[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector3#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12];\r\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13];\r\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transforms the coordinates of this Vector3 with the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#transformCoordinates\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformCoordinates: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n var tx = (x * m[0]) + (y * m[4]) + (z * m[8]) + m[12];\r\n var ty = (x * m[1]) + (y * m[5]) + (z * m[9]) + m[13];\r\n var tz = (x * m[2]) + (y * m[6]) + (z * m[10]) + m[14];\r\n var tw = (x * m[3]) + (y * m[7]) + (z * m[11]) + m[15];\r\n\r\n this.x = tx / tw;\r\n this.y = ty / tw;\r\n this.z = tz / tw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Quaternion.\r\n *\r\n * @method Phaser.Math.Vector3#transformQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformQuat: function (q)\r\n {\r\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var qx = q.x;\r\n var qy = q.y;\r\n var qz = q.z;\r\n var qw = q.w;\r\n\r\n // calculate quat * vec\r\n var ix = qw * x + qy * z - qz * y;\r\n var iy = qw * y + qz * x - qx * z;\r\n var iz = qw * z + qx * y - qy * x;\r\n var iw = -qx * x - qy * y - qz * z;\r\n\r\n // calculate result * inverse quat\r\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\r\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\r\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the specified matrix, applying a W divide. This is useful for projection,\r\n * e.g. unprojecting a 2D point into 3D space.\r\n *\r\n * @method Phaser.Math.Vector3#project\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to multiply this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n project: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n var a00 = m[0];\r\n var a01 = m[1];\r\n var a02 = m[2];\r\n var a03 = m[3];\r\n var a10 = m[4];\r\n var a11 = m[5];\r\n var a12 = m[6];\r\n var a13 = m[7];\r\n var a20 = m[8];\r\n var a21 = m[9];\r\n var a22 = m[10];\r\n var a23 = m[11];\r\n var a30 = m[12];\r\n var a31 = m[13];\r\n var a32 = m[14];\r\n var a33 = m[15];\r\n\r\n var lw = 1 / (x * a03 + y * a13 + z * a23 + a33);\r\n\r\n this.x = (x * a00 + y * a10 + z * a20 + a30) * lw;\r\n this.y = (x * a01 + y * a11 + z * a21 + a31) * lw;\r\n this.z = (x * a02 + y * a12 + z * a22 + a32) * lw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Unproject this point from 2D space to 3D space.\r\n * The point should have its x and y properties set to\r\n * 2D screen space, and the z either at 0 (near plane)\r\n * or 1 (far plane). The provided matrix is assumed to already\r\n * be combined, i.e. projection * view * model.\r\n *\r\n * After this operation, this vector's (x, y, z) components will\r\n * represent the unprojected 3D coordinate.\r\n *\r\n * @method Phaser.Math.Vector3#unproject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} viewport - Screen x, y, width and height in pixels.\r\n * @param {Phaser.Math.Matrix4} invProjectionView - Combined projection and view matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n unproject: function (viewport, invProjectionView)\r\n {\r\n var viewX = viewport.x;\r\n var viewY = viewport.y;\r\n var viewWidth = viewport.z;\r\n var viewHeight = viewport.w;\r\n\r\n var x = this.x - viewX;\r\n var y = (viewHeight - this.y - 1) - viewY;\r\n var z = this.z;\r\n\r\n this.x = (2 * x) / viewWidth - 1;\r\n this.y = (2 * y) / viewHeight - 1;\r\n this.z = 2 * z - 1;\r\n\r\n return this.project(invProjectionView);\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0, 0).\r\n *\r\n * @method Phaser.Math.Vector3#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A static zero Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.ZERO\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.ZERO = new Vector3();\r\n\r\n/**\r\n * A static right Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.RIGHT\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.RIGHT = new Vector3(1, 0, 0);\r\n\r\n/**\r\n * A static left Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.LEFT\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.LEFT = new Vector3(-1, 0, 0);\r\n\r\n/**\r\n * A static up Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.UP\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.UP = new Vector3(0, -1, 0);\r\n\r\n/**\r\n * A static down Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.DOWN\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.DOWN = new Vector3(0, 1, 0);\r\n\r\n/**\r\n * A static forward Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.FORWARD\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.FORWARD = new Vector3(0, 0, 1);\r\n\r\n/**\r\n * A static back Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.BACK\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.BACK = new Vector3(0, 0, -1);\r\n\r\n/**\r\n * A static one Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.ONE\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.ONE = new Vector3(1, 1, 1);\r\n\r\nmodule.exports = Vector3;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 4D space.\r\n *\r\n * A four-component vector.\r\n *\r\n * @class Vector4\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n * @param {number} [w] - The w component.\r\n */\r\nvar Vector4 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector4 (x, y, z, w)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The z component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.z = 0;\r\n\r\n /**\r\n * The w component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.w = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector4.\r\n *\r\n * @method Phaser.Math.Vector4#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} A clone of this Vector4.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector4(this.x, this.y, this.z, this.w);\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z || 0;\r\n this.w = src.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict quality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector4#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The vector to check equality with.\r\n *\r\n * @return {boolean} A boolean indicating whether the two Vectors are equal or not.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z) && (this.w === v.w));\r\n },\r\n\r\n /**\r\n * Set the `x`, `y`, `z` and `w` components of the this Vector to the given `x`, `y`, `z` and `w` values.\r\n *\r\n * @method Phaser.Math.Vector4#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y, z and w components.\r\n * @param {number} y - The y value to set for this Vector.\r\n * @param {number} z - The z value to set for this Vector.\r\n * @param {number} w - The z value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n set: function (x, y, z, w)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector4#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z || 0;\r\n this.w += v.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector4#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z || 0;\r\n this.w -= v.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector4#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n scale: function (scale)\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n this.w *= scale;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return Math.sqrt(x * x + y * y + z * z + w * w);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector4#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector4#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var len = x * x + y * y + z * z + w * w;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n this.w = w * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The Vector4 to dot product with this Vector4.\r\n *\r\n * @return {number} The dot product of this Vector and the given Vector.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The Vector4 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n this.w = aw + t * (v.w - aw);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n multiply: function (v)\r\n {\r\n this.x *= v.x;\r\n this.y *= v.y;\r\n this.z *= v.z || 1;\r\n this.w *= v.w || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#divide\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n divide: function (v)\r\n {\r\n this.x /= v.x;\r\n this.y /= v.y;\r\n this.z /= v.z || 1;\r\n this.w /= v.w || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#distance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n var dw = v.w - this.w || 0;\r\n\r\n return Math.sqrt(dx * dx + dy * dy + dz * dz + dw * dw);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector4#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n var dw = v.w - this.w || 0;\r\n\r\n return dx * dx + dy * dy + dz * dz + dw * dw;\r\n },\r\n\r\n /**\r\n * Negate the `x`, `y`, `z` and `w` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n this.w = -this.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector4#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector4 with.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\r\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\r\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\r\n this.w = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Quaternion.\r\n *\r\n * @method Phaser.Math.Vector4#transformQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n transformQuat: function (q)\r\n {\r\n // TODO: is this really the same as Vector3?\r\n // Also, what about this: http://molecularmusings.wordpress.com/2013/05/24/a-faster-quaternion-vector-multiplication/\r\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var qx = q.x;\r\n var qy = q.y;\r\n var qz = q.z;\r\n var qw = q.w;\r\n\r\n // calculate quat * vec\r\n var ix = qw * x + qy * z - qz * y;\r\n var iy = qw * y + qz * x - qx * z;\r\n var iz = qw * z + qx * y - qy * x;\r\n var iw = -qx * x - qy * y - qz * z;\r\n\r\n // calculate result * inverse quat\r\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\r\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\r\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0, 0, 0).\r\n *\r\n * @method Phaser.Math.Vector4#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n// TODO: Check if these are required internally, if not, remove.\r\nVector4.prototype.sub = Vector4.prototype.subtract;\r\nVector4.prototype.mul = Vector4.prototype.multiply;\r\nVector4.prototype.div = Vector4.prototype.divide;\r\nVector4.prototype.dist = Vector4.prototype.distance;\r\nVector4.prototype.distSq = Vector4.prototype.distanceSq;\r\nVector4.prototype.len = Vector4.prototype.length;\r\nVector4.prototype.lenSq = Vector4.prototype.lengthSq;\r\n\r\nmodule.exports = Vector4;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the two values are within the given `tolerance` of each other.\r\n *\r\n * @function Phaser.Math.Within\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value to use in the calculation.\r\n * @param {number} b - The second value to use in the calculation.\r\n * @param {number} tolerance - The tolerance. Anything equal to or less than this value is considered as being within range.\r\n *\r\n * @return {boolean} Returns `true` if `a` is less than or equal to the tolerance of `b`.\r\n */\r\nvar Within = function (a, b, tolerance)\r\n{\r\n return (Math.abs(a - b) <= tolerance);\r\n};\r\n\r\nmodule.exports = Within;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Wrap the given `value` between `min` and `max.\r\n *\r\n * @function Phaser.Math.Wrap\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to wrap.\r\n * @param {number} min - The minimum value.\r\n * @param {number} max - The maximum value.\r\n *\r\n * @return {number} The wrapped value.\r\n */\r\nvar Wrap = function (value, min, max)\r\n{\r\n var range = max - min;\r\n\r\n return (min + ((((value - min) % range) + range) % range));\r\n};\r\n\r\nmodule.exports = Wrap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\r\n *\r\n * @function Phaser.Math.Angle.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar Between = function (x1, y1, x2, y2)\r\n{\r\n return Math.atan2(y2 - y1, x2 - x1);\r\n};\r\n\r\nmodule.exports = Between;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\r\n *\r\n * Calculates the angle of the vector from the first point to the second point.\r\n *\r\n * @function Phaser.Math.Angle.BetweenPoints\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} point1 - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} point2 - The second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenPoints = function (point1, point2)\r\n{\r\n return Math.atan2(point2.y - point1.y, point2.x - point1.x);\r\n};\r\n\r\nmodule.exports = BetweenPoints;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\r\n *\r\n * The difference between this method and {@link Phaser.Math.Angle.BetweenPoints} is that this assumes the y coordinate\r\n * travels down the screen.\r\n *\r\n * @function Phaser.Math.Angle.BetweenPointsY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} point1 - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} point2 - The second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenPointsY = function (point1, point2)\r\n{\r\n return Math.atan2(point2.x - point1.x, point2.y - point1.y);\r\n};\r\n\r\nmodule.exports = BetweenPointsY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\r\n *\r\n * The difference between this method and {@link Phaser.Math.Angle.Between} is that this assumes the y coordinate\r\n * travels down the screen.\r\n *\r\n * @function Phaser.Math.Angle.BetweenY\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenY = function (x1, y1, x2, y2)\r\n{\r\n return Math.atan2(x2 - x1, y2 - y1);\r\n};\r\n\r\nmodule.exports = BetweenY;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('../const');\r\n\r\n/**\r\n * Takes an angle in Phasers default clockwise format and converts it so that\r\n * 0 is North, 90 is West, 180 is South and 270 is East,\r\n * therefore running counter-clockwise instead of clockwise.\r\n * \r\n * You can pass in the angle from a Game Object using:\r\n * \r\n * ```javascript\r\n * var converted = CounterClockwise(gameobject.rotation);\r\n * ```\r\n * \r\n * All values for this function are in radians.\r\n *\r\n * @function Phaser.Math.Angle.CounterClockwise\r\n * @since 3.16.0\r\n *\r\n * @param {number} angle - The angle to convert, in radians.\r\n *\r\n * @return {number} The converted angle, in radians.\r\n */\r\nvar CounterClockwise = function (angle)\r\n{\r\n if (angle > Math.PI)\r\n {\r\n angle -= CONST.PI2;\r\n }\r\n\r\n return Math.abs((((angle + CONST.TAU) % CONST.PI2) - CONST.PI2) % CONST.PI2);\r\n};\r\n\r\nmodule.exports = CounterClockwise;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Normalize an angle to the [0, 2pi] range.\r\n *\r\n * @function Phaser.Math.Angle.Normalize\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to normalize, in radians.\r\n *\r\n * @return {number} The normalized angle, in radians.\r\n */\r\nvar Normalize = function (angle)\r\n{\r\n angle = angle % (2 * Math.PI);\r\n\r\n if (angle >= 0)\r\n {\r\n return angle;\r\n }\r\n else\r\n {\r\n return angle + 2 * Math.PI;\r\n }\r\n};\r\n\r\nmodule.exports = Normalize;\r\n","/**\r\n * @author Richard Davey \r\n * @author @samme\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FloatBetween = require('../FloatBetween');\r\n\r\n/**\r\n * Returns a random angle in the range [-pi, pi].\r\n *\r\n * @function Phaser.Math.Angle.Random\r\n * @since 3.23.0\r\n *\r\n * @return {number} The angle, in radians.\r\n */\r\nvar Random = function ()\r\n{\r\n return FloatBetween(-Math.PI, Math.PI);\r\n};\r\n\r\nmodule.exports = Random;\r\n","/**\r\n * @author Richard Davey \r\n * @author @samme\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FloatBetween = require('../FloatBetween');\r\n\r\n/**\r\n * Returns a random angle in the range [-180, 180].\r\n *\r\n * @function Phaser.Math.Angle.RandomDegrees\r\n * @since 3.23.0\r\n *\r\n * @return {number} The angle, in degrees.\r\n */\r\nvar RandomDegrees = function ()\r\n{\r\n return FloatBetween(-180, 180);\r\n};\r\n\r\nmodule.exports = RandomDegrees;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Normalize = require('./Normalize');\r\n\r\n/**\r\n * Reverse the given angle.\r\n *\r\n * @function Phaser.Math.Angle.Reverse\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to reverse, in radians.\r\n *\r\n * @return {number} The reversed angle, in radians.\r\n */\r\nvar Reverse = function (angle)\r\n{\r\n return Normalize(angle + Math.PI);\r\n};\r\n\r\nmodule.exports = Reverse;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = require('../const');\r\n\r\n/**\r\n * Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call.\r\n *\r\n * @function Phaser.Math.Angle.RotateTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} currentAngle - The current angle, in radians.\r\n * @param {number} targetAngle - The target angle to rotate to, in radians.\r\n * @param {number} [lerp=0.05] - The lerp value to add to the current angle.\r\n *\r\n * @return {number} The adjusted angle.\r\n */\r\nvar RotateTo = function (currentAngle, targetAngle, lerp)\r\n{\r\n if (lerp === undefined) { lerp = 0.05; }\r\n\r\n if (currentAngle === targetAngle)\r\n {\r\n return currentAngle;\r\n }\r\n\r\n if (Math.abs(targetAngle - currentAngle) <= lerp || Math.abs(targetAngle - currentAngle) >= (MATH_CONST.PI2 - lerp))\r\n {\r\n currentAngle = targetAngle;\r\n }\r\n else\r\n {\r\n if (Math.abs(targetAngle - currentAngle) > Math.PI)\r\n {\r\n if (targetAngle < currentAngle)\r\n {\r\n targetAngle += MATH_CONST.PI2;\r\n }\r\n else\r\n {\r\n targetAngle -= MATH_CONST.PI2;\r\n }\r\n }\r\n\r\n if (targetAngle > currentAngle)\r\n {\r\n currentAngle += lerp;\r\n }\r\n else if (targetAngle < currentAngle)\r\n {\r\n currentAngle -= lerp;\r\n }\r\n }\r\n\r\n return currentAngle;\r\n};\r\n\r\nmodule.exports = RotateTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Gets the shortest angle between `angle1` and `angle2`.\r\n *\r\n * Both angles must be in the range -180 to 180, which is the same clamped\r\n * range that `sprite.angle` uses, so you can pass in two sprite angles to\r\n * this method and get the shortest angle back between the two of them.\r\n *\r\n * The angle returned will be in the same range. If the returned angle is\r\n * greater than 0 then it's a counter-clockwise rotation, if < 0 then it's\r\n * a clockwise rotation.\r\n *\r\n * TODO: Wrap the angles in this function?\r\n *\r\n * @function Phaser.Math.Angle.ShortestBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle1 - The first angle in the range -180 to 180.\r\n * @param {number} angle2 - The second angle in the range -180 to 180.\r\n *\r\n * @return {number} The shortest angle, in degrees. If greater than zero it's a counter-clockwise rotation.\r\n */\r\nvar ShortestBetween = function (angle1, angle2)\r\n{\r\n var difference = angle2 - angle1;\r\n\r\n if (difference === 0)\r\n {\r\n return 0;\r\n }\r\n\r\n var times = Math.floor((difference - (-180)) / 360);\r\n\r\n return difference - (times * 360);\r\n\r\n};\r\n\r\nmodule.exports = ShortestBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MathWrap = require('../Wrap');\r\n\r\n/**\r\n * Wrap an angle.\r\n *\r\n * Wraps the angle to a value in the range of -PI to PI.\r\n *\r\n * @function Phaser.Math.Angle.Wrap\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to wrap, in radians.\r\n *\r\n * @return {number} The wrapped angle, in radians.\r\n */\r\nvar Wrap = function (angle)\r\n{\r\n return MathWrap(angle, -Math.PI, Math.PI);\r\n};\r\n\r\nmodule.exports = Wrap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Wrap = require('../Wrap');\r\n\r\n/**\r\n * Wrap an angle in degrees.\r\n *\r\n * Wraps the angle to a value in the range of -180 to 180.\r\n *\r\n * @function Phaser.Math.Angle.WrapDegrees\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to wrap, in degrees.\r\n *\r\n * @return {number} The wrapped angle, in degrees.\r\n */\r\nvar WrapDegrees = function (angle)\r\n{\r\n return Wrap(angle, -180, 180);\r\n};\r\n\r\nmodule.exports = WrapDegrees;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Angle\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Between: require('./Between'),\r\n BetweenPoints: require('./BetweenPoints'),\r\n BetweenPointsY: require('./BetweenPointsY'),\r\n BetweenY: require('./BetweenY'),\r\n CounterClockwise: require('./CounterClockwise'),\r\n Normalize: require('./Normalize'),\r\n Random: require('./Random'),\r\n RandomDegrees: require('./RandomDegrees'),\r\n Reverse: require('./Reverse'),\r\n RotateTo: require('./RotateTo'),\r\n ShortestBetween: require('./ShortestBetween'),\r\n Wrap: require('./Wrap'),\r\n WrapDegrees: require('./WrapDegrees')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = {\r\n\r\n /**\r\n * The value of PI * 2.\r\n * \r\n * @name Phaser.Math.PI2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n PI2: Math.PI * 2,\r\n\r\n /**\r\n * The value of PI * 0.5.\r\n * \r\n * @name Phaser.Math.TAU\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n TAU: Math.PI * 0.5,\r\n\r\n /**\r\n * An epsilon value (1.0e-6)\r\n * \r\n * @name Phaser.Math.EPSILON\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n EPSILON: 1.0e-6,\r\n\r\n /**\r\n * For converting degrees to radians (PI / 180)\r\n * \r\n * @name Phaser.Math.DEG_TO_RAD\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n DEG_TO_RAD: Math.PI / 180,\r\n\r\n /**\r\n * For converting radians to degrees (180 / PI)\r\n * \r\n * @name Phaser.Math.RAD_TO_DEG\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n RAD_TO_DEG: 180 / Math.PI,\r\n\r\n /**\r\n * An instance of the Random Number Generator.\r\n * This is not set until the Game boots.\r\n * \r\n * @name Phaser.Math.RND\r\n * @type {Phaser.Math.RandomDataGenerator}\r\n * @since 3.0.0\r\n */\r\n RND: null,\r\n\r\n /**\r\n * The minimum safe integer this browser supports.\r\n * We use a const for backward compatibility with Internet Explorer.\r\n * \r\n * @name Phaser.Math.MIN_SAFE_INTEGER\r\n * @type {number}\r\n * @since 3.21.0\r\n */\r\n MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991,\r\n\r\n /**\r\n * The maximum safe integer this browser supports.\r\n * We use a const for backward compatibility with Internet Explorer.\r\n * \r\n * @name Phaser.Math.MAX_SAFE_INTEGER\r\n * @type {number}\r\n * @since 3.21.0\r\n */\r\n MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991\r\n\r\n};\r\n\r\nmodule.exports = MATH_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points).\r\n *\r\n * @function Phaser.Math.Distance.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar DistanceBetween = function (x1, y1, x2, y2)\r\n{\r\n var dx = x1 - x2;\r\n var dy = y1 - y2;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n};\r\n\r\nmodule.exports = DistanceBetween;\r\n","/**\r\n * @author samme\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two points.\r\n *\r\n * @function Phaser.Math.Distance.BetweenPoints\r\n * @since 3.22.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} a - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} b - The second point.\r\n *\r\n * @return {number} The distance between the points.\r\n */\r\nvar DistanceBetweenPoints = function (a, b)\r\n{\r\n var dx = a.x - b.x;\r\n var dy = a.y - b.y;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n};\r\n\r\nmodule.exports = DistanceBetweenPoints;\r\n","/**\r\n * @author samme\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the squared distance between two points.\r\n *\r\n * @function Phaser.Math.Distance.BetweenPointsSquared\r\n * @since 3.22.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} a - The first point.\r\n * @param {Phaser.Types.Math.Vector2Like} b - The second point.\r\n *\r\n * @return {number} The squared distance between the points.\r\n */\r\nvar DistanceBetweenPointsSquared = function (a, b)\r\n{\r\n var dx = a.x - b.x;\r\n var dy = a.y - b.y;\r\n\r\n return dx * dx + dy * dy;\r\n};\r\n\r\nmodule.exports = DistanceBetweenPointsSquared;\r\n","/**\r\n * @author samme\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the Chebyshev distance between two sets of coordinates (points).\r\n *\r\n * Chebyshev distance (or chessboard distance) is the maximum of the horizontal and vertical distances.\r\n * It's the effective distance when movement can be horizontal, vertical, or diagonal.\r\n *\r\n * @function Phaser.Math.Distance.Chebyshev\r\n * @since 3.22.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar ChebyshevDistance = function (x1, y1, x2, y2)\r\n{\r\n return Math.max(Math.abs(x1 - x2), Math.abs(y1 - y2));\r\n};\r\n\r\nmodule.exports = ChebyshevDistance;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points) to the power of `pow`.\r\n *\r\n * @function Phaser.Math.Distance.Power\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n * @param {number} pow - The exponent.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar DistancePower = function (x1, y1, x2, y2, pow)\r\n{\r\n if (pow === undefined) { pow = 2; }\r\n\r\n return Math.sqrt(Math.pow(x2 - x1, pow) + Math.pow(y2 - y1, pow));\r\n};\r\n\r\nmodule.exports = DistancePower;\r\n","/**\r\n * @author samme\r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the snake distance between two sets of coordinates (points).\r\n *\r\n * Snake distance (rectilinear distance, Manhattan distance) is the sum of the horizontal and vertical distances.\r\n * It's the effective distance when movement is allowed only horizontally or vertically (but not both).\r\n *\r\n * @function Phaser.Math.Distance.Snake\r\n * @since 3.22.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar SnakeDistance = function (x1, y1, x2, y2)\r\n{\r\n return Math.abs(x1 - x2) + Math.abs(y1 - y2);\r\n};\r\n\r\nmodule.exports = SnakeDistance;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points), squared.\r\n *\r\n * @function Phaser.Math.Distance.Squared\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point, squared.\r\n */\r\nvar DistanceSquared = function (x1, y1, x2, y2)\r\n{\r\n var dx = x1 - x2;\r\n var dy = y1 - y2;\r\n\r\n return dx * dx + dy * dy;\r\n};\r\n\r\nmodule.exports = DistanceSquared;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Distance\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Between: require('./DistanceBetween'),\r\n BetweenPoints: require('./DistanceBetweenPoints'),\r\n BetweenPointsSquared: require('./DistanceBetweenPointsSquared'),\r\n Chebyshev: require('./DistanceChebyshev'),\r\n Power: require('./DistancePower'),\r\n Snake: require('./DistanceSnake'),\r\n Squared: require('./DistanceSquared')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Back.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n return v * v * ((overshoot + 1) * v - overshoot);\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Back.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n var s = overshoot * 1.525;\r\n\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * (v * v * ((s + 1) * v - s));\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * ((s + 1) * v + s) + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Back.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n return --v * v * ((overshoot + 1) * v + overshoot) + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Back\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n v = 1 - v;\r\n\r\n if (v < 1 / 2.75)\r\n {\r\n return 1 - (7.5625 * v * v);\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n return 1 - (7.5625 * (v -= 1.5 / 2.75) * v + 0.75);\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n return 1 - (7.5625 * (v -= 2.25 / 2.75) * v + 0.9375);\r\n }\r\n else\r\n {\r\n return 1 - (7.5625 * (v -= 2.625 / 2.75) * v + 0.984375);\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n var reverse = false;\r\n\r\n if (v < 0.5)\r\n {\r\n v = 1 - (v * 2);\r\n reverse = true;\r\n }\r\n else\r\n {\r\n v = (v * 2) - 1;\r\n }\r\n\r\n if (v < 1 / 2.75)\r\n {\r\n v = 7.5625 * v * v;\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n v = 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n v = 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\r\n }\r\n else\r\n {\r\n v = 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\r\n }\r\n\r\n if (reverse)\r\n {\r\n return (1 - v) * 0.5;\r\n }\r\n else\r\n {\r\n return v * 0.5 + 0.5;\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n if (v < 1 / 2.75)\r\n {\r\n return 7.5625 * v * v;\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n return 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n return 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\r\n }\r\n else\r\n {\r\n return 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Bounce\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Circular.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return 1 - Math.sqrt(1 - v * v);\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Circular.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return -0.5 * (Math.sqrt(1 - v * v) - 1);\r\n }\r\n else\r\n {\r\n return 0.5 * (Math.sqrt(1 - (v -= 2) * v) + 1);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Circular.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return Math.sqrt(1 - (--v * v));\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Circular\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v;\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * v + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return --v * v * v + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Cubic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n return -(amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n if ((v *= 2) < 1)\r\n {\r\n return -0.5 * (amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\r\n }\r\n else\r\n {\r\n return amplitude * Math.pow(2, -10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period) * 0.5 + 1;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n return (amplitude * Math.pow(2, -10 * v) * Math.sin((v - s) * (2 * Math.PI) / period) + 1);\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Elastic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Expo.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return Math.pow(2, 10 * (v - 1)) - 0.001;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Expo.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * Math.pow(2, 10 * (v - 1));\r\n }\r\n else\r\n {\r\n return 0.5 * (2 - Math.pow(2, -10 * (v - 1)));\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Expo.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return 1 - Math.pow(2, -10 * v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Expo\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Back: require('./back'),\r\n Bounce: require('./bounce'),\r\n Circular: require('./circular'),\r\n Cubic: require('./cubic'),\r\n Elastic: require('./elastic'),\r\n Expo: require('./expo'),\r\n Linear: require('./linear'),\r\n Quadratic: require('./quadratic'),\r\n Quartic: require('./quartic'),\r\n Quintic: require('./quintic'),\r\n Sine: require('./sine'),\r\n Stepped: require('./stepped')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Linear easing (no variation).\r\n *\r\n * @function Phaser.Math.Easing.Linear\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Linear = function (v)\r\n{\r\n return v;\r\n};\r\n\r\nmodule.exports = Linear;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nmodule.exports = require('./Linear');\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v;\r\n }\r\n else\r\n {\r\n return -0.5 * (--v * (v - 2) - 1);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return v * (2 - v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quadratic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v * v;\r\n }\r\n else\r\n {\r\n return -0.5 * ((v -= 2) * v * v * v - 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return 1 - (--v * v * v * v);\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quartic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v * v * v;\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * v * v * v + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return --v * v * v * v * v + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quintic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Sine.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 1 - Math.cos(v * Math.PI / 2);\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Sine.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 0.5 * (1 - Math.cos(Math.PI * v));\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Sine.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return Math.sin(v * Math.PI / 2);\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Sine\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: require('./In'),\r\n Out: require('./Out'),\r\n InOut: require('./InOut')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Stepped easing.\r\n *\r\n * @function Phaser.Math.Easing.Stepped\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [steps=1] - The number of steps in the ease.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Stepped = function (v, steps)\r\n{\r\n if (steps === undefined) { steps = 1; }\r\n\r\n if (v <= 0)\r\n {\r\n return 0;\r\n }\r\n else if (v >= 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return (((steps * v) | 0) + 1) * (1 / steps);\r\n }\r\n};\r\n\r\nmodule.exports = Stepped;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Stepped\r\n */\r\n\r\nmodule.exports = require('./Stepped');\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the fuzzy ceiling of the given value.\r\n *\r\n * @function Phaser.Math.Fuzzy.Ceil\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {number} The fuzzy ceiling of the value.\r\n */\r\nvar Ceil = function (value, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.ceil(value - epsilon);\r\n};\r\n\r\nmodule.exports = Ceil;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether the given values are fuzzily equal.\r\n *\r\n * Two numbers are fuzzily equal if their difference is less than `epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.Equal\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`.\r\n */\r\nvar Equal = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.abs(a - b) < epsilon;\r\n};\r\n\r\nmodule.exports = Equal;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the fuzzy floor of the given value.\r\n *\r\n * @function Phaser.Math.Fuzzy.Floor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {number} The floor of the value.\r\n */\r\nvar Floor = function (value, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.floor(value + epsilon);\r\n};\r\n\r\nmodule.exports = Floor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether `a` is fuzzily greater than `b`.\r\n *\r\n * `a` is fuzzily greater than `b` if it is more than `b - epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.GreaterThan\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if `a` is fuzzily greater than than `b`, otherwise `false`.\r\n */\r\nvar GreaterThan = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return a > b - epsilon;\r\n};\r\n\r\nmodule.exports = GreaterThan;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether `a` is fuzzily less than `b`.\r\n *\r\n * `a` is fuzzily less than `b` if it is less than `b + epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.LessThan\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if `a` is fuzzily less than `b`, otherwise `false`.\r\n */\r\nvar LessThan = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return a < b + epsilon;\r\n};\r\n\r\nmodule.exports = LessThan;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Fuzzy\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Ceil: require('./Ceil'),\r\n Equal: require('./Equal'),\r\n Floor: require('./Floor'),\r\n GreaterThan: require('./GreaterThan'),\r\n LessThan: require('./LessThan')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = require('./const');\r\nvar Extend = require('../utils/object/Extend');\r\n\r\n/**\r\n * @namespace Phaser.Math\r\n */\r\n\r\nvar PhaserMath = {\r\n\r\n // Collections of functions\r\n Angle: require('./angle/'),\r\n Distance: require('./distance/'),\r\n Easing: require('./easing/'),\r\n Fuzzy: require('./fuzzy/'),\r\n Interpolation: require('./interpolation/'),\r\n Pow2: require('./pow2/'),\r\n Snap: require('./snap/'),\r\n\r\n // Expose the RNG Class\r\n RandomDataGenerator: require('./random-data-generator/RandomDataGenerator'),\r\n\r\n // Single functions\r\n Average: require('./Average'),\r\n Bernstein: require('./Bernstein'),\r\n Between: require('./Between'),\r\n CatmullRom: require('./CatmullRom'),\r\n CeilTo: require('./CeilTo'),\r\n Clamp: require('./Clamp'),\r\n DegToRad: require('./DegToRad'),\r\n Difference: require('./Difference'),\r\n Factorial: require('./Factorial'),\r\n FloatBetween: require('./FloatBetween'),\r\n FloorTo: require('./FloorTo'),\r\n FromPercent: require('./FromPercent'),\r\n GetSpeed: require('./GetSpeed'),\r\n IsEven: require('./IsEven'),\r\n IsEvenStrict: require('./IsEvenStrict'),\r\n Linear: require('./Linear'),\r\n MaxAdd: require('./MaxAdd'),\r\n MinSub: require('./MinSub'),\r\n Percent: require('./Percent'),\r\n RadToDeg: require('./RadToDeg'),\r\n RandomXY: require('./RandomXY'),\r\n RandomXYZ: require('./RandomXYZ'),\r\n RandomXYZW: require('./RandomXYZW'),\r\n Rotate: require('./Rotate'),\r\n RotateAround: require('./RotateAround'),\r\n RotateAroundDistance: require('./RotateAroundDistance'),\r\n RotateTo: require('./RotateTo'),\r\n RoundAwayFromZero: require('./RoundAwayFromZero'),\r\n RoundTo: require('./RoundTo'),\r\n SinCosTableGenerator: require('./SinCosTableGenerator'),\r\n SmootherStep: require('./SmootherStep'),\r\n SmoothStep: require('./SmoothStep'),\r\n ToXY: require('./ToXY'),\r\n TransformXY: require('./TransformXY'),\r\n Within: require('./Within'),\r\n Wrap: require('./Wrap'),\r\n\r\n // Vector classes\r\n Vector2: require('./Vector2'),\r\n Vector3: require('./Vector3'),\r\n Vector4: require('./Vector4'),\r\n Matrix3: require('./Matrix3'),\r\n Matrix4: require('./Matrix4'),\r\n Quaternion: require('./Quaternion'),\r\n RotateVec3: require('./RotateVec3')\r\n\r\n};\r\n\r\n// Merge in the consts\r\n\r\nPhaserMath = Extend(false, PhaserMath, CONST);\r\n\r\n// Export it\r\n\r\nmodule.exports = PhaserMath;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bernstein = require('../Bernstein');\r\n\r\n/**\r\n * A bezier interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.Bezier\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar BezierInterpolation = function (v, k)\r\n{\r\n var b = 0;\r\n var n = v.length - 1;\r\n\r\n for (var i = 0; i <= n; i++)\r\n {\r\n b += Math.pow(1 - k, n - i) * Math.pow(k, i) * v[i] * Bernstein(n, i);\r\n }\r\n\r\n return b;\r\n};\r\n\r\nmodule.exports = BezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CatmullRom = require('../CatmullRom');\r\n\r\n/**\r\n * A Catmull-Rom interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.CatmullRom\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar CatmullRomInterpolation = function (v, k)\r\n{\r\n var m = v.length - 1;\r\n var f = m * k;\r\n var i = Math.floor(f);\r\n\r\n if (v[0] === v[m])\r\n {\r\n if (k < 0)\r\n {\r\n i = Math.floor(f = m * (1 + k));\r\n }\r\n\r\n return CatmullRom(f - i, v[(i - 1 + m) % m], v[i], v[(i + 1) % m], v[(i + 2) % m]);\r\n }\r\n else\r\n {\r\n if (k < 0)\r\n {\r\n return v[0] - (CatmullRom(-f, v[0], v[0], v[1], v[1]) - v[0]);\r\n }\r\n\r\n if (k > 1)\r\n {\r\n return v[m] - (CatmullRom(f - m, v[m], v[m], v[m - 1], v[m - 1]) - v[m]);\r\n }\r\n\r\n return CatmullRom(f - i, v[i ? i - 1 : 0], v[i], v[m < i + 1 ? m : i + 1], v[m < i + 2 ? m : i + 2]);\r\n }\r\n};\r\n\r\nmodule.exports = CatmullRomInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P0 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return k * k * k * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P1 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return 3 * k * k * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P2 (t, p)\r\n{\r\n return 3 * (1 - t) * t * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P3 (t, p)\r\n{\r\n return t * t * t * p;\r\n}\r\n\r\n/**\r\n * A cubic bezier interpolation method.\r\n *\r\n * https://medium.com/@adrian_cooney/bezier-interpolation-13b68563313a\r\n *\r\n * @function Phaser.Math.Interpolation.CubicBezier\r\n * @since 3.0.0\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} p0 - The start point.\r\n * @param {number} p1 - The first control point.\r\n * @param {number} p2 - The second control point.\r\n * @param {number} p3 - The end point.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar CubicBezierInterpolation = function (t, p0, p1, p2, p3)\r\n{\r\n return P0(t, p0) + P1(t, p1) + P2(t, p2) + P3(t, p3);\r\n};\r\n\r\nmodule.exports = CubicBezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Linear = require('../Linear');\r\n\r\n/**\r\n * A linear interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.Linear\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Linear_interpolation}\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {!number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {!number} The interpolated value.\r\n */\r\nvar LinearInterpolation = function (v, k)\r\n{\r\n var m = v.length - 1;\r\n var f = m * k;\r\n var i = Math.floor(f);\r\n\r\n if (k < 0)\r\n {\r\n return Linear(v[0], v[1], f);\r\n }\r\n else if (k > 1)\r\n {\r\n return Linear(v[m], v[m - 1], m - f);\r\n }\r\n else\r\n {\r\n return Linear(v[i], v[(i + 1 > m) ? m : i + 1], f - i);\r\n }\r\n};\r\n\r\nmodule.exports = LinearInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P0 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return k * k * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P1 (t, p)\r\n{\r\n return 2 * (1 - t) * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P2 (t, p)\r\n{\r\n return t * t * p;\r\n}\r\n\r\n// https://github.com/mrdoob/three.js/blob/master/src/extras/core/Interpolations.js\r\n\r\n/**\r\n * A quadratic bezier interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.QuadraticBezier\r\n * @since 3.2.0\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} p0 - The start point.\r\n * @param {number} p1 - The control point.\r\n * @param {number} p2 - The end point.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar QuadraticBezierInterpolation = function (t, p0, p1, p2)\r\n{\r\n return P0(t, p0) + P1(t, p1) + P2(t, p2);\r\n};\r\n\r\nmodule.exports = QuadraticBezierInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SmoothStep = require('../SmoothStep');\r\n\r\n/**\r\n * A Smooth Step interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.SmoothStep\r\n * @since 3.9.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar SmoothStepInterpolation = function (t, min, max)\r\n{\r\n return min + (max - min) * SmoothStep(t, 0, 1);\r\n};\r\n\r\nmodule.exports = SmoothStepInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SmootherStep = require('../SmootherStep');\r\n\r\n/**\r\n * A Smoother Step interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.SmootherStep\r\n * @since 3.9.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar SmootherStepInterpolation = function (t, min, max)\r\n{\r\n return min + (max - min) * SmootherStep(t, 0, 1);\r\n};\r\n\r\nmodule.exports = SmootherStepInterpolation;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Interpolation\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Bezier: require('./BezierInterpolation'),\r\n CatmullRom: require('./CatmullRomInterpolation'),\r\n CubicBezier: require('./CubicBezierInterpolation'),\r\n Linear: require('./LinearInterpolation'),\r\n QuadraticBezier: require('./QuadraticBezierInterpolation'),\r\n SmoothStep: require('./SmoothStepInterpolation'),\r\n SmootherStep: require('./SmootherStepInterpolation')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the nearest power of 2 to the given `value`.\r\n *\r\n * @function Phaser.Math.Pow2.GetNext\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n *\r\n * @return {integer} The nearest power of 2 to `value`.\r\n */\r\nvar GetPowerOfTwo = function (value)\r\n{\r\n var index = Math.log(value) / 0.6931471805599453;\r\n\r\n return (1 << Math.ceil(index));\r\n};\r\n\r\nmodule.exports = GetPowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the given `width` and `height` are a power of two.\r\n * Useful for checking texture dimensions.\r\n *\r\n * @function Phaser.Math.Pow2.IsSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width.\r\n * @param {number} height - The height.\r\n *\r\n * @return {boolean} `true` if `width` and `height` are a power of two, otherwise `false`.\r\n */\r\nvar IsSizePowerOfTwo = function (width, height)\r\n{\r\n return (width > 0 && (width & (width - 1)) === 0 && height > 0 && (height & (height - 1)) === 0);\r\n};\r\n\r\nmodule.exports = IsSizePowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tests the value and returns `true` if it is a power of two.\r\n *\r\n * @function Phaser.Math.Pow2.IsValue\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to check if it's a power of two.\r\n *\r\n * @return {boolean} Returns `true` if `value` is a power of two, otherwise `false`.\r\n */\r\nvar IsValuePowerOfTwo = function (value)\r\n{\r\n return (value > 0 && (value & (value - 1)) === 0);\r\n};\r\n\r\nmodule.exports = IsValuePowerOfTwo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Pow2\r\n */\r\n\r\nmodule.exports = {\r\n\r\n GetNext: require('./GetPowerOfTwo'),\r\n IsSize: require('./IsSizePowerOfTwo'),\r\n IsValue: require('./IsValuePowerOfTwo')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = require('../../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A seeded Random Data Generator.\r\n * \r\n * Access via `Phaser.Math.RND` which is an instance of this class pre-defined\r\n * by Phaser. Or, create your own instance to use as you require.\r\n * \r\n * The `Math.RND` generator is seeded by the Game Config property value `seed`.\r\n * If no such config property exists, a random number is used.\r\n * \r\n * If you create your own instance of this class you should provide a seed for it.\r\n * If no seed is given it will use a 'random' one based on Date.now.\r\n *\r\n * @class RandomDataGenerator\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} [seeds] - The seeds to use for the random number generator.\r\n */\r\nvar RandomDataGenerator = new Class({\r\n\r\n initialize:\r\n\r\n function RandomDataGenerator (seeds)\r\n {\r\n if (seeds === undefined) { seeds = [ (Date.now() * Math.random()).toString() ]; }\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#c\r\n * @type {number}\r\n * @default 1\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.c = 1;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s0\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s0 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s1\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s1 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s2\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s2 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#n\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.2.0\r\n */\r\n this.n = 0;\r\n\r\n /**\r\n * Signs to choose from.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#signs\r\n * @type {number[]}\r\n * @since 3.0.0\r\n */\r\n this.signs = [ -1, 1 ];\r\n\r\n if (seeds)\r\n {\r\n this.init(seeds);\r\n }\r\n },\r\n\r\n /**\r\n * Private random helper.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#rnd\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @return {number} A random number.\r\n */\r\n rnd: function ()\r\n {\r\n var t = 2091639 * this.s0 + this.c * 2.3283064365386963e-10; // 2^-32\r\n\r\n this.c = t | 0;\r\n this.s0 = this.s1;\r\n this.s1 = this.s2;\r\n this.s2 = t - this.c;\r\n\r\n return this.s2;\r\n },\r\n\r\n /**\r\n * Internal method that creates a seed hash.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#hash\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {string} data - The value to hash.\r\n *\r\n * @return {number} The hashed value.\r\n */\r\n hash: function (data)\r\n {\r\n var h;\r\n var n = this.n;\r\n\r\n data = data.toString();\r\n\r\n for (var i = 0; i < data.length; i++)\r\n {\r\n n += data.charCodeAt(i);\r\n h = 0.02519603282416938 * n;\r\n n = h >>> 0;\r\n h -= n;\r\n h *= n;\r\n n = h >>> 0;\r\n h -= n;\r\n n += h * 0x100000000;// 2^32\r\n }\r\n\r\n this.n = n;\r\n\r\n return (n >>> 0) * 2.3283064365386963e-10;// 2^-32\r\n },\r\n\r\n /**\r\n * Initialize the state of the random data generator.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#init\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} seeds - The seeds to initialize the random data generator with.\r\n */\r\n init: function (seeds)\r\n {\r\n if (typeof seeds === 'string')\r\n {\r\n this.state(seeds);\r\n }\r\n else\r\n {\r\n this.sow(seeds);\r\n }\r\n },\r\n\r\n /**\r\n * Reset the seed of the random data generator.\r\n *\r\n * _Note_: the seed array is only processed up to the first `undefined` (or `null`) value, should such be present.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#sow\r\n * @since 3.0.0\r\n *\r\n * @param {string[]} seeds - The array of seeds: the `toString()` of each value is used.\r\n */\r\n sow: function (seeds)\r\n {\r\n // Always reset to default seed\r\n this.n = 0xefc8249d;\r\n this.s0 = this.hash(' ');\r\n this.s1 = this.hash(' ');\r\n this.s2 = this.hash(' ');\r\n this.c = 1;\r\n\r\n if (!seeds)\r\n {\r\n return;\r\n }\r\n\r\n // Apply any seeds\r\n for (var i = 0; i < seeds.length && (seeds[i] != null); i++)\r\n {\r\n var seed = seeds[i];\r\n\r\n this.s0 -= this.hash(seed);\r\n this.s0 += ~~(this.s0 < 0);\r\n this.s1 -= this.hash(seed);\r\n this.s1 += ~~(this.s1 < 0);\r\n this.s2 -= this.hash(seed);\r\n this.s2 += ~~(this.s2 < 0);\r\n }\r\n },\r\n\r\n /**\r\n * Returns a random integer between 0 and 2^32.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#integer\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random integer between 0 and 2^32.\r\n */\r\n integer: function ()\r\n {\r\n // 2^32\r\n return this.rnd() * 0x100000000;\r\n },\r\n\r\n /**\r\n * Returns a random real number between 0 and 1.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#frac\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between 0 and 1.\r\n */\r\n frac: function ()\r\n {\r\n // 2^-53\r\n return this.rnd() + (this.rnd() * 0x200000 | 0) * 1.1102230246251565e-16;\r\n },\r\n\r\n /**\r\n * Returns a random real number between 0 and 2^32.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#real\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between 0 and 2^32.\r\n */\r\n real: function ()\r\n {\r\n return this.integer() + this.frac();\r\n },\r\n\r\n /**\r\n * Returns a random integer between and including min and max.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#integerInRange\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n integerInRange: function (min, max)\r\n {\r\n return Math.floor(this.realInRange(0, max - min + 1) + min);\r\n },\r\n\r\n /**\r\n * Returns a random integer between and including min and max.\r\n * This method is an alias for RandomDataGenerator.integerInRange.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#between\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n between: function (min, max)\r\n {\r\n return Math.floor(this.realInRange(0, max - min + 1) + min);\r\n },\r\n\r\n /**\r\n * Returns a random real number between min and max.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#realInRange\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n realInRange: function (min, max)\r\n {\r\n return this.frac() * (max - min) + min;\r\n },\r\n\r\n /**\r\n * Returns a random real number between -1 and 1.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#normal\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between -1 and 1.\r\n */\r\n normal: function ()\r\n {\r\n return 1 - (2 * this.frac());\r\n },\r\n\r\n /**\r\n * Returns a valid RFC4122 version4 ID hex string from https://gist.github.com/1308368\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#uuid\r\n * @since 3.0.0\r\n *\r\n * @return {string} A valid RFC4122 version4 ID hex string\r\n */\r\n uuid: function ()\r\n {\r\n var a = '';\r\n var b = '';\r\n\r\n for (b = a = ''; a++ < 36; b += ~a % 5 | a * 3 & 4 ? (a ^ 15 ? 8 ^ this.frac() * (a ^ 20 ? 16 : 4) : 4).toString(16) : '-')\r\n {\r\n // eslint-disable-next-line no-empty\r\n }\r\n\r\n return b;\r\n },\r\n\r\n /**\r\n * Returns a random element from within the given array.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#pick\r\n * @since 3.0.0\r\n * \r\n * @generic T\r\n * @genericUse {T[]} - [array]\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {T[]} array - The array to pick a random element from.\r\n *\r\n * @return {T} A random member of the array.\r\n */\r\n pick: function (array)\r\n {\r\n return array[this.integerInRange(0, array.length - 1)];\r\n },\r\n\r\n /**\r\n * Returns a sign to be used with multiplication operator.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#sign\r\n * @since 3.0.0\r\n *\r\n * @return {number} -1 or +1.\r\n */\r\n sign: function ()\r\n {\r\n return this.pick(this.signs);\r\n },\r\n\r\n /**\r\n * Returns a random element from within the given array, favoring the earlier entries.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#weightedPick\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array]\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {T[]} array - The array to pick a random element from.\r\n *\r\n * @return {T} A random member of the array.\r\n */\r\n weightedPick: function (array)\r\n {\r\n return array[~~(Math.pow(this.frac(), 2) * (array.length - 1) + 0.5)];\r\n },\r\n\r\n /**\r\n * Returns a random timestamp between min and max, or between the beginning of 2000 and the end of 2020 if min and max aren't specified.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#timestamp\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random timestamp between min and max.\r\n */\r\n timestamp: function (min, max)\r\n {\r\n return this.realInRange(min || 946684800000, max || 1577862000000);\r\n },\r\n\r\n /**\r\n * Returns a random angle between -180 and 180.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#angle\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random number between -180 and 180.\r\n */\r\n angle: function ()\r\n {\r\n return this.integerInRange(-180, 180);\r\n },\r\n\r\n /**\r\n * Returns a random rotation in radians, between -3.141 and 3.141\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#rotation\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random number between -3.141 and 3.141\r\n */\r\n rotation: function ()\r\n {\r\n return this.realInRange(-3.1415926, 3.1415926);\r\n },\r\n\r\n /**\r\n * Gets or Sets the state of the generator. This allows you to retain the values\r\n * that the generator is using between games, i.e. in a game save file.\r\n *\r\n * To seed this generator with a previously saved state you can pass it as the\r\n * `seed` value in your game config, or call this method directly after Phaser has booted.\r\n *\r\n * Call this method with no parameters to return the current state.\r\n *\r\n * If providing a state it should match the same format that this method\r\n * returns, which is a string with a header `!rnd` followed by the `c`,\r\n * `s0`, `s1` and `s2` values respectively, each comma-delimited.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#state\r\n * @since 3.0.0\r\n *\r\n * @param {string} [state] - Generator state to be set.\r\n *\r\n * @return {string} The current state of the generator.\r\n */\r\n state: function (state)\r\n {\r\n if (typeof state === 'string' && state.match(/^!rnd/))\r\n {\r\n state = state.split(',');\r\n\r\n this.c = parseFloat(state[1]);\r\n this.s0 = parseFloat(state[2]);\r\n this.s1 = parseFloat(state[3]);\r\n this.s2 = parseFloat(state[4]);\r\n }\r\n\r\n return [ '!rnd', this.c, this.s0, this.s1, this.s2 ].join(',');\r\n },\r\n\r\n /**\r\n * Shuffles the given array, using the current seed.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#shuffle\r\n * @since 3.7.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array,$return]\r\n *\r\n * @param {T[]} [array] - The array to be shuffled.\r\n *\r\n * @return {T[]} The shuffled array.\r\n */\r\n shuffle: function (array)\r\n {\r\n var len = array.length - 1;\r\n\r\n for (var i = len; i > 0; i--)\r\n {\r\n var randomIndex = Math.floor(this.frac() * (i + 1));\r\n var itemAtIndex = array[randomIndex];\r\n\r\n array[randomIndex] = array[i];\r\n array[i] = itemAtIndex;\r\n }\r\n\r\n return array;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = RandomDataGenerator;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using ceil.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `15`.\r\n * As will `14` snap to `15`... but `16` will snap to `20`.\r\n *\r\n * @function Phaser.Math.Snap.Ceil\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapCeil = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.ceil(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapCeil;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using floor.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10`.\r\n * As will `14` snap to `10`... but `16` will snap to `15`.\r\n *\r\n * @function Phaser.Math.Snap.Floor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapFloor = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.floor(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapFloor;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using rounding.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10` whereas `14` will snap to `15`.\r\n *\r\n * @function Phaser.Math.Snap.To\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapTo = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.round(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Snap\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Ceil: require('./SnapCeil'),\r\n Floor: require('./SnapFloor'),\r\n To: require('./SnapTo')\r\n\r\n};\r\n","/**\r\n* @author Richard Davey \r\n* @copyright 2020 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar Class = require('../utils/Class');\r\n\r\n/**\r\n * @classdesc\r\n * A Global Plugin is installed just once into the Game owned Plugin Manager.\r\n * It can listen for Game events and respond to them.\r\n *\r\n * @class BasePlugin\r\n * @memberof Phaser.Plugins\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n */\r\nvar BasePlugin = new Class({\r\n\r\n initialize:\r\n\r\n function BasePlugin (pluginManager)\r\n {\r\n /**\r\n * A handy reference to the Plugin Manager that is responsible for this plugin.\r\n * Can be used as a route to gain access to game systems and events.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#pluginManager\r\n * @type {Phaser.Plugins.PluginManager}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.pluginManager = pluginManager;\r\n\r\n /**\r\n * A reference to the Game instance this plugin is running under.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#game\r\n * @type {Phaser.Game}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.game = pluginManager.game;\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is first instantiated.\r\n * It will never be called again on this instance.\r\n * In here you can set-up whatever you need for this plugin to run.\r\n * If a plugin is set to automatically start then `BasePlugin.start` will be called immediately after this.\r\n * On a Scene Plugin, this method is never called. Use {@link Phaser.Plugins.ScenePlugin#boot} instead.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#init\r\n * @since 3.8.0\r\n *\r\n * @param {?any} [data] - A value specified by the user, if any, from the `data` property of the plugin's configuration object (if started at game boot) or passed in the PluginManager's `install` method (if started manually).\r\n */\r\n init: function ()\r\n {\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is started.\r\n * If a plugin is stopped, and then started again, this will get called again.\r\n * Typically called immediately after `BasePlugin.init`.\r\n * On a Scene Plugin, this method is never called.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#start\r\n * @since 3.8.0\r\n */\r\n start: function ()\r\n {\r\n // Here are the game-level events you can listen to.\r\n // At the very least you should offer a destroy handler for when the game closes down.\r\n\r\n // var eventEmitter = this.game.events;\r\n\r\n // eventEmitter.once('destroy', this.gameDestroy, this);\r\n // eventEmitter.on('pause', this.gamePause, this);\r\n // eventEmitter.on('resume', this.gameResume, this);\r\n // eventEmitter.on('resize', this.gameResize, this);\r\n // eventEmitter.on('prestep', this.gamePreStep, this);\r\n // eventEmitter.on('step', this.gameStep, this);\r\n // eventEmitter.on('poststep', this.gamePostStep, this);\r\n // eventEmitter.on('prerender', this.gamePreRender, this);\r\n // eventEmitter.on('postrender', this.gamePostRender, this);\r\n },\r\n\r\n /**\r\n * The PluginManager calls this method on a Global Plugin when the plugin is stopped.\r\n * The game code has requested that your plugin stop doing whatever it does.\r\n * It is now considered as 'inactive' by the PluginManager.\r\n * Handle that process here (i.e. stop listening for events, etc)\r\n * If the plugin is started again then `BasePlugin.start` will be called again.\r\n * On a Scene Plugin, this method is never called.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#stop\r\n * @since 3.8.0\r\n */\r\n stop: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Game instance has been destroyed.\r\n * You must release everything in here, all references, all objects, free it all up.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pluginManager = null;\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BasePlugin;\r\n","/**\r\n* @author Richard Davey \r\n* @copyright 2020 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar BasePlugin = require('./BasePlugin');\r\nvar Class = require('../utils/Class');\r\nvar SceneEvents = require('../scene/events');\r\n\r\n/**\r\n * @classdesc\r\n * A Scene Level Plugin is installed into every Scene and belongs to that Scene.\r\n * It can listen for Scene events and respond to them.\r\n * It can map itself to a Scene property, or into the Scene Systems, or both.\r\n *\r\n * @class ScenePlugin\r\n * @memberof Phaser.Plugins\r\n * @extends Phaser.Plugins.BasePlugin\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n */\r\nvar ScenePlugin = new Class({\r\n\r\n Extends: BasePlugin,\r\n\r\n initialize:\r\n\r\n function ScenePlugin (scene, pluginManager)\r\n {\r\n BasePlugin.call(this, pluginManager);\r\n\r\n /**\r\n * A reference to the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#scene\r\n * @type {?Phaser.Scene}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene Systems of the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You can use it during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.ScenePlugin#systems\r\n * @type {?Phaser.Scenes.Systems}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * This method is called when the Scene boots. It is only ever called once.\r\n *\r\n * By this point the plugin properties `scene` and `systems` will have already been set.\r\n *\r\n * In here you can listen for {@link Phaser.Scenes.Events Scene events} and set-up whatever you need for this plugin to run.\r\n * Here are the Scene events you can listen to:\r\n *\r\n * - start\r\n * - ready\r\n * - preupdate\r\n * - update\r\n * - postupdate\r\n * - resize\r\n * - pause\r\n * - resume\r\n * - sleep\r\n * - wake\r\n * - transitioninit\r\n * - transitionstart\r\n * - transitioncomplete\r\n * - transitionout\r\n * - shutdown\r\n * - destroy\r\n *\r\n * At the very least you should offer a destroy handler for when the Scene closes down, i.e:\r\n *\r\n * ```javascript\r\n * var eventEmitter = this.systems.events;\r\n * eventEmitter.once('destroy', this.sceneDestroy, this);\r\n * ```\r\n *\r\n * @method Phaser.Plugins.ScenePlugin#boot\r\n * @since 3.8.0\r\n */\r\n boot: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Game instance has been destroyed.\r\n * \r\n * You must release everything in here, all references, all objects, free it all up.\r\n *\r\n * @method Phaser.Plugins.ScenePlugin#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pluginManager = null;\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ScenePlugin;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Blend Modes.\r\n * \r\n * @namespace Phaser.BlendModes\r\n * @since 3.0.0\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * Skips the Blend Mode check in the renderer.\r\n * \r\n * @name Phaser.BlendModes.SKIP_CHECK\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SKIP_CHECK: -1,\r\n\r\n /**\r\n * Normal blend mode. For Canvas and WebGL.\r\n * This is the default setting and draws new shapes on top of the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.NORMAL\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n NORMAL: 0,\r\n\r\n /**\r\n * Add blend mode. For Canvas and WebGL.\r\n * Where both shapes overlap the color is determined by adding color values.\r\n * \r\n * @name Phaser.BlendModes.ADD\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ADD: 1,\r\n\r\n /**\r\n * Multiply blend mode. For Canvas and WebGL.\r\n * The pixels are of the top layer are multiplied with the corresponding pixel of the bottom layer. A darker picture is the result.\r\n * \r\n * @name Phaser.BlendModes.MULTIPLY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n MULTIPLY: 2,\r\n\r\n /**\r\n * Screen blend mode. For Canvas and WebGL.\r\n * The pixels are inverted, multiplied, and inverted again. A lighter picture is the result (opposite of multiply)\r\n * \r\n * @name Phaser.BlendModes.SCREEN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SCREEN: 3,\r\n\r\n /**\r\n * Overlay blend mode. For Canvas only.\r\n * A combination of multiply and screen. Dark parts on the base layer become darker, and light parts become lighter.\r\n * \r\n * @name Phaser.BlendModes.OVERLAY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n OVERLAY: 4,\r\n\r\n /**\r\n * Darken blend mode. For Canvas only.\r\n * Retains the darkest pixels of both layers.\r\n * \r\n * @name Phaser.BlendModes.DARKEN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DARKEN: 5,\r\n\r\n /**\r\n * Lighten blend mode. For Canvas only.\r\n * Retains the lightest pixels of both layers.\r\n * \r\n * @name Phaser.BlendModes.LIGHTEN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LIGHTEN: 6,\r\n\r\n /**\r\n * Color Dodge blend mode. For Canvas only.\r\n * Divides the bottom layer by the inverted top layer.\r\n * \r\n * @name Phaser.BlendModes.COLOR_DODGE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR_DODGE: 7,\r\n\r\n /**\r\n * Color Burn blend mode. For Canvas only.\r\n * Divides the inverted bottom layer by the top layer, and then inverts the result.\r\n * \r\n * @name Phaser.BlendModes.COLOR_BURN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR_BURN: 8,\r\n\r\n /**\r\n * Hard Light blend mode. For Canvas only.\r\n * A combination of multiply and screen like overlay, but with top and bottom layer swapped.\r\n * \r\n * @name Phaser.BlendModes.HARD_LIGHT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HARD_LIGHT: 9,\r\n\r\n /**\r\n * Soft Light blend mode. For Canvas only.\r\n * A softer version of hard-light. Pure black or white does not result in pure black or white.\r\n * \r\n * @name Phaser.BlendModes.SOFT_LIGHT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOFT_LIGHT: 10,\r\n\r\n /**\r\n * Difference blend mode. For Canvas only.\r\n * Subtracts the bottom layer from the top layer or the other way round to always get a positive value.\r\n * \r\n * @name Phaser.BlendModes.DIFFERENCE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DIFFERENCE: 11,\r\n\r\n /**\r\n * Exclusion blend mode. For Canvas only.\r\n * Like difference, but with lower contrast.\r\n * \r\n * @name Phaser.BlendModes.EXCLUSION\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n EXCLUSION: 12,\r\n\r\n /**\r\n * Hue blend mode. For Canvas only.\r\n * Preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer.\r\n * \r\n * @name Phaser.BlendModes.HUE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HUE: 13,\r\n\r\n /**\r\n * Saturation blend mode. For Canvas only.\r\n * Preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer.\r\n * \r\n * @name Phaser.BlendModes.SATURATION\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SATURATION: 14,\r\n\r\n /**\r\n * Color blend mode. For Canvas only.\r\n * Preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer.\r\n * \r\n * @name Phaser.BlendModes.COLOR\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR: 15,\r\n\r\n /**\r\n * Luminosity blend mode. For Canvas only.\r\n * Preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer.\r\n * \r\n * @name Phaser.BlendModes.LUMINOSITY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LUMINOSITY: 16,\r\n\r\n /**\r\n * Alpha erase blend mode. For Canvas and WebGL.\r\n * \r\n * @name Phaser.BlendModes.ERASE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ERASE: 17,\r\n\r\n /**\r\n * Source-in blend mode. For Canvas only.\r\n * The new shape is drawn only where both the new shape and the destination canvas overlap. Everything else is made transparent.\r\n * \r\n * @name Phaser.BlendModes.SOURCE_IN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_IN: 18,\r\n\r\n /**\r\n * Source-out blend mode. For Canvas only.\r\n * The new shape is drawn where it doesn't overlap the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.SOURCE_OUT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_OUT: 19,\r\n\r\n /**\r\n * Source-out blend mode. For Canvas only.\r\n * The new shape is only drawn where it overlaps the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.SOURCE_ATOP\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_ATOP: 20,\r\n\r\n /**\r\n * Destination-over blend mode. For Canvas only.\r\n * New shapes are drawn behind the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_OVER\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_OVER: 21,\r\n\r\n /**\r\n * Destination-in blend mode. For Canvas only.\r\n * The existing canvas content is kept where both the new shape and existing canvas content overlap. Everything else is made transparent.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_IN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_IN: 22,\r\n\r\n /**\r\n * Destination-out blend mode. For Canvas only.\r\n * The existing content is kept where it doesn't overlap the new shape.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_OUT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_OUT: 23,\r\n\r\n /**\r\n * Destination-out blend mode. For Canvas only.\r\n * The existing canvas is only kept where it overlaps the new shape. The new shape is drawn behind the canvas content.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_ATOP\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_ATOP: 24,\r\n\r\n /**\r\n * Lighten blend mode. For Canvas only.\r\n * Where both shapes overlap the color is determined by adding color values.\r\n * \r\n * @name Phaser.BlendModes.LIGHTER\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LIGHTER: 25,\r\n\r\n /**\r\n * Copy blend mode. For Canvas only.\r\n * Only the new shape is shown.\r\n * \r\n * @name Phaser.BlendModes.COPY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COPY: 26,\r\n\r\n /**\r\n * Xor blend mode. For Canvas only.\r\n * Shapes are made transparent where both overlap and drawn normal everywhere else.\r\n * \r\n * @name Phaser.BlendModes.XOR\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n XOR: 27\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scale Manager Resize Event.\r\n * \r\n * This event is dispatched whenever the Scale Manager detects a resize event from the browser.\r\n * It sends three parameters to the callback, each of them being Size components. You can read\r\n * the `width`, `height`, `aspectRatio` and other properties of these components to help with\r\n * scaling your own game content.\r\n *\r\n * @event Phaser.Scale.Events#RESIZE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Structs.Size} gameSize - A reference to the Game Size component. This is the un-scaled size of your game canvas.\r\n * @param {Phaser.Structs.Size} baseSize - A reference to the Base Size component. This is the game size multiplied by resolution.\r\n * @param {Phaser.Structs.Size} displaySize - A reference to the Display Size component. This is the scaled canvas size, after applying zoom and scale mode.\r\n * @param {number} resolution - The current resolution. Defaults to 1 at the moment.\r\n * @param {number} previousWidth - If the `gameSize` has changed, this value contains its previous width, otherwise it contains the current width.\r\n * @param {number} previousHeight - If the `gameSize` has changed, this value contains its previous height, otherwise it contains the current height.\r\n */\r\nmodule.exports = 'resize';\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Added to Scene Event.\n *\n * This event is dispatched when a Game Object is added to a Scene.\n *\n * Listen for it from a Scene using `this.scene.events.on('addedtoscene', listener)`.\n *\n * @event Phaser.Scenes.Events#ADDED_TO_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\n */\nmodule.exports = 'addedtoscene';\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Boot Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems boot process. Primarily used by Scene Plugins.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('boot', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#BOOT\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'boot';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Create Event.\r\n * \r\n * This event is dispatched by a Scene after it has been created by the Scene Manager.\r\n * \r\n * If a Scene has a `create` method then this event is emitted _after_ that has run.\r\n * \r\n * If there is a transition, this event will be fired after the `TRANSITION_START` event.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('create', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#CREATE\r\n * @since 3.17.0\r\n * \r\n * @param {Phaser.Scene} scene - A reference to the Scene that emitted this event.\r\n */\r\nmodule.exports = 'create';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Destroy Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems destroy process.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('destroy', listener)`.\r\n * \r\n * You should destroy any resources that may be in use by your Scene in this event handler.\r\n * \r\n * @event Phaser.Scenes.Events#DESTROY\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'destroy';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pause Event.\r\n * \r\n * This event is dispatched by a Scene when it is paused, either directly via the `pause` method, or as an\r\n * action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('pause', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#PAUSE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was paused.\r\n */\r\nmodule.exports = 'pause';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Post Update Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('postupdate', listener)`.\r\n * \r\n * A Scene will only run its step if it is active.\r\n * \r\n * @event Phaser.Scenes.Events#POST_UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'postupdate';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pre Update Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('preupdate', listener)`.\r\n * \r\n * A Scene will only run its step if it is active.\r\n * \r\n * @event Phaser.Scenes.Events#PRE_UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'preupdate';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Ready Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems start process.\r\n * By this point in the process the Scene is now fully active and rendering.\r\n * This event is meant for your game code to use, as all plugins have responded to the earlier 'start' event.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('ready', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#READY\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was started.\r\n */\r\nmodule.exports = 'ready';\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Removed from Scene Event.\n *\n * This event is dispatched when a Game Object is removed from a Scene.\n *\n * Listen for it from a Scene using `this.scene.events.on('removedfromscene', listener)`.\n *\n * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\n */\nmodule.exports = 'removedfromscene';\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Render Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('render', listener)`.\r\n * \r\n * A Scene will only render if it is visible and active.\r\n * By the time this event is dispatched, the Scene will have already been rendered.\r\n * \r\n * @event Phaser.Scenes.Events#RENDER\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\r\n */\r\nmodule.exports = 'render';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Resume Event.\r\n * \r\n * This event is dispatched by a Scene when it is resumed from a paused state, either directly via the `resume` method,\r\n * or as an action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('resume', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#RESUME\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was resumed.\r\n */\r\nmodule.exports = 'resume';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Shutdown Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems shutdown process.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('shutdown', listener)`.\r\n * \r\n * You should free-up any resources that may be in use by your Scene in this event handler, on the understanding\r\n * that the Scene may, at any time, become active again. A shutdown Scene is not 'destroyed', it's simply not\r\n * currently active. Use the [DESTROY]{@linkcode Phaser.Scenes.Events#event:DESTROY} event to completely clear resources.\r\n * \r\n * @event Phaser.Scenes.Events#SHUTDOWN\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was shutdown.\r\n */\r\nmodule.exports = 'shutdown';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Sleep Event.\r\n * \r\n * This event is dispatched by a Scene when it is sent to sleep, either directly via the `sleep` method,\r\n * or as an action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('sleep', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#SLEEP\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was sent to sleep.\r\n */\r\nmodule.exports = 'sleep';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Start Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems start process. Primarily used by Scene Plugins.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('start', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#START\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'start';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Complete Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition.\r\n * \r\n * It happens when the transition process has completed. This occurs when the duration timer equals or exceeds the duration\r\n * of the transition.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitioncomplete', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_COMPLETE\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} scene -The Scene on which the transitioned completed.\r\n */\r\nmodule.exports = 'transitioncomplete';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Init Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition.\r\n * \r\n * It happens immediately after the `Scene.init` method is called. If the Scene does not have an `init` method,\r\n * this event is not dispatched.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitioninit', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_INIT\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitioninit';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Out Event.\r\n * \r\n * This event is dispatched by a Scene when it initiates a transition to another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitionout', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_OUT\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} target - A reference to the Scene that is being transitioned to.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionout';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Start Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition, only if that Scene was not asleep.\r\n * \r\n * It happens immediately after the `Scene.create` method is called. If the Scene does not have a `create` method,\r\n * this event is dispatched anyway.\r\n * \r\n * If the Target Scene was sleeping then the [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} event is\r\n * dispatched instead of this event.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitionstart', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_START\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionstart';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Wake Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition, only if that Scene was asleep before\r\n * the transition began. If the Scene was not asleep the [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} event is dispatched instead.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitionwake', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_WAKE\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionwake';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Update Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('update', listener)`.\r\n * \r\n * A Scene will only run its step if it is active.\r\n * \r\n * @event Phaser.Scenes.Events#UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'update';\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Wake Event.\r\n * \r\n * This event is dispatched by a Scene when it is woken from sleep, either directly via the `wake` method,\r\n * or as an action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('wake', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#WAKE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was woken up.\r\n */\r\nmodule.exports = 'wake';\r\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Scenes.Events\n */\n\nmodule.exports = {\n\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\n BOOT: require('./BOOT_EVENT'),\n CREATE: require('./CREATE_EVENT'),\n DESTROY: require('./DESTROY_EVENT'),\n PAUSE: require('./PAUSE_EVENT'),\n POST_UPDATE: require('./POST_UPDATE_EVENT'),\n PRE_UPDATE: require('./PRE_UPDATE_EVENT'),\n READY: require('./READY_EVENT'),\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'),\n RENDER: require('./RENDER_EVENT'),\n RESUME: require('./RESUME_EVENT'),\n SHUTDOWN: require('./SHUTDOWN_EVENT'),\n SLEEP: require('./SLEEP_EVENT'),\n START: require('./START_EVENT'),\n TRANSITION_COMPLETE: require('./TRANSITION_COMPLETE_EVENT'),\n TRANSITION_INIT: require('./TRANSITION_INIT_EVENT'),\n TRANSITION_OUT: require('./TRANSITION_OUT_EVENT'),\n TRANSITION_START: require('./TRANSITION_START_EVENT'),\n TRANSITION_WAKE: require('./TRANSITION_WAKE_EVENT'),\n UPDATE: require('./UPDATE_EVENT'),\n WAKE: require('./WAKE_EVENT')\n\n};\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Retrieves the value of the given key from an object.\r\n *\r\n * @function Phaser.Tweens.Builders.GetBoolean\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The key to look for in the `source` object.\r\n * @param {*} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided.\r\n *\r\n * @return {*} The retrieved value.\r\n */\r\nvar GetBoolean = function (source, key, defaultValue)\r\n{\r\n if (!source)\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key))\r\n {\r\n return source[key];\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetBoolean;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar TWEEN_CONST = {\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.CREATED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n CREATED: 0,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.INIT\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n INIT: 1,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n DELAY: 2,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.OFFSET_DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n OFFSET_DELAY: 3,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.PENDING_RENDER\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PENDING_RENDER: 4,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.PLAYING_FORWARD\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PLAYING_FORWARD: 5,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.PLAYING_BACKWARD\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PLAYING_BACKWARD: 6,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.HOLD_DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n HOLD_DELAY: 7,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.REPEAT_DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n REPEAT_DELAY: 8,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.COMPLETE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n COMPLETE: 9,\r\n\r\n // Tween specific (starts from 20 to cleanly allow extra TweenData consts in the future)\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.PENDING_ADD\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PENDING_ADD: 20,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.PAUSED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PAUSED: 21,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.LOOP_DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOOP_DELAY: 22,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.ACTIVE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n ACTIVE: 23,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.COMPLETE_DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n COMPLETE_DELAY: 24,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.PENDING_REMOVE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PENDING_REMOVE: 25,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.REMOVED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n REMOVED: 26\r\n\r\n};\r\n\r\nmodule.exports = TWEEN_CONST;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Taken from klasse by mattdesl https://github.com/mattdesl/klasse\r\n\r\nfunction hasGetterOrSetter (def)\r\n{\r\n return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function');\r\n}\r\n\r\nfunction getProperty (definition, k, isClassDescriptor)\r\n{\r\n // This may be a lightweight object, OR it might be a property that was defined previously.\r\n\r\n // For simple class descriptors we can just assume its NOT previously defined.\r\n var def = (isClassDescriptor) ? definition[k] : Object.getOwnPropertyDescriptor(definition, k);\r\n\r\n if (!isClassDescriptor && def.value && typeof def.value === 'object')\r\n {\r\n def = def.value;\r\n }\r\n\r\n // This might be a regular property, or it may be a getter/setter the user defined in a class.\r\n if (def && hasGetterOrSetter(def))\r\n {\r\n if (typeof def.enumerable === 'undefined')\r\n {\r\n def.enumerable = true;\r\n }\r\n\r\n if (typeof def.configurable === 'undefined')\r\n {\r\n def.configurable = true;\r\n }\r\n\r\n return def;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n}\r\n\r\nfunction hasNonConfigurable (obj, k)\r\n{\r\n var prop = Object.getOwnPropertyDescriptor(obj, k);\r\n\r\n if (!prop)\r\n {\r\n return false;\r\n }\r\n\r\n if (prop.value && typeof prop.value === 'object')\r\n {\r\n prop = prop.value;\r\n }\r\n\r\n if (prop.configurable === false)\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\n/**\r\n * Extends the given `myClass` object's prototype with the properties of `definition`.\r\n *\r\n * @function extend\r\n * @param {Object} ctor The constructor object to mix into.\r\n * @param {Object} definition A dictionary of functions for the class.\r\n * @param {boolean} isClassDescriptor Is the definition a class descriptor?\r\n * @param {Object} [extend] The parent constructor object.\r\n */\r\nfunction extend (ctor, definition, isClassDescriptor, extend)\r\n{\r\n for (var k in definition)\r\n {\r\n if (!definition.hasOwnProperty(k))\r\n {\r\n continue;\r\n }\r\n\r\n var def = getProperty(definition, k, isClassDescriptor);\r\n\r\n if (def !== false)\r\n {\r\n // If Extends is used, we will check its prototype to see if the final variable exists.\r\n\r\n var parent = extend || ctor;\r\n\r\n if (hasNonConfigurable(parent.prototype, k))\r\n {\r\n // Just skip the final property\r\n if (Class.ignoreFinals)\r\n {\r\n continue;\r\n }\r\n\r\n // We cannot re-define a property that is configurable=false.\r\n // So we will consider them final and throw an error. This is by\r\n // default so it is clear to the developer what is happening.\r\n // You can set ignoreFinals to true if you need to extend a class\r\n // which has configurable=false; it will simply not re-define final properties.\r\n throw new Error('cannot override final property \\'' + k + '\\', set Class.ignoreFinals = true to skip');\r\n }\r\n\r\n Object.defineProperty(ctor.prototype, k, def);\r\n }\r\n else\r\n {\r\n ctor.prototype[k] = definition[k];\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Applies the given `mixins` to the prototype of `myClass`.\r\n *\r\n * @function mixin\r\n * @param {Object} myClass The constructor object to mix into.\r\n * @param {Object|Array} mixins The mixins to apply to the constructor.\r\n */\r\nfunction mixin (myClass, mixins)\r\n{\r\n if (!mixins)\r\n {\r\n return;\r\n }\r\n\r\n if (!Array.isArray(mixins))\r\n {\r\n mixins = [ mixins ];\r\n }\r\n\r\n for (var i = 0; i < mixins.length; i++)\r\n {\r\n extend(myClass, mixins[i].prototype || mixins[i]);\r\n }\r\n}\r\n\r\n/**\r\n * Creates a new class with the given descriptor.\r\n * The constructor, defined by the name `initialize`,\r\n * is an optional function. If unspecified, an anonymous\r\n * function will be used which calls the parent class (if\r\n * one exists).\r\n *\r\n * You can also use `Extends` and `Mixins` to provide subclassing\r\n * and inheritance.\r\n *\r\n * @class Phaser.Class\r\n * @constructor\r\n * @param {Object} definition a dictionary of functions for the class\r\n * @example\r\n *\r\n * var MyClass = new Phaser.Class({\r\n *\r\n * initialize: function() {\r\n * this.foo = 2.0;\r\n * },\r\n *\r\n * bar: function() {\r\n * return this.foo + 5;\r\n * }\r\n * });\r\n */\r\nfunction Class (definition)\r\n{\r\n if (!definition)\r\n {\r\n definition = {};\r\n }\r\n\r\n // The variable name here dictates what we see in Chrome debugger\r\n var initialize;\r\n var Extends;\r\n\r\n if (definition.initialize)\r\n {\r\n if (typeof definition.initialize !== 'function')\r\n {\r\n throw new Error('initialize must be a function');\r\n }\r\n\r\n initialize = definition.initialize;\r\n\r\n // Usually we should avoid 'delete' in V8 at all costs.\r\n // However, its unlikely to make any performance difference\r\n // here since we only call this on class creation (i.e. not object creation).\r\n delete definition.initialize;\r\n }\r\n else if (definition.Extends)\r\n {\r\n var base = definition.Extends;\r\n\r\n initialize = function ()\r\n {\r\n base.apply(this, arguments);\r\n };\r\n }\r\n else\r\n {\r\n initialize = function () {};\r\n }\r\n\r\n if (definition.Extends)\r\n {\r\n initialize.prototype = Object.create(definition.Extends.prototype);\r\n initialize.prototype.constructor = initialize;\r\n\r\n // For getOwnPropertyDescriptor to work, we need to act directly on the Extends (or Mixin)\r\n\r\n Extends = definition.Extends;\r\n\r\n delete definition.Extends;\r\n }\r\n else\r\n {\r\n initialize.prototype.constructor = initialize;\r\n }\r\n\r\n // Grab the mixins, if they are specified...\r\n var mixins = null;\r\n\r\n if (definition.Mixins)\r\n {\r\n mixins = definition.Mixins;\r\n delete definition.Mixins;\r\n }\r\n\r\n // First, mixin if we can.\r\n mixin(initialize, mixins);\r\n\r\n // Now we grab the actual definition which defines the overrides.\r\n extend(initialize, definition, true, Extends);\r\n\r\n return initialize;\r\n}\r\n\r\nClass.extend = extend;\r\nClass.mixin = mixin;\r\nClass.ignoreFinals = false;\r\n\r\nmodule.exports = Class;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A NOOP (No Operation) callback function.\r\n *\r\n * Used internally by Phaser when it's more expensive to determine if a callback exists\r\n * than it is to just invoke an empty function.\r\n *\r\n * @function Phaser.Utils.NOOP\r\n * @since 3.0.0\r\n */\r\nvar NOOP = function ()\r\n{\r\n // NOOP\r\n};\r\n\r\nmodule.exports = NOOP;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds the given item, or array of items, to the array.\r\n *\r\n * Each item must be unique within the array.\r\n *\r\n * The array is modified in-place and returned.\r\n *\r\n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\r\n * added will take the array length over this limit, it will stop adding once the limit is reached.\r\n *\r\n * You can optionally specify a callback to be invoked for each item successfully added to the array.\r\n *\r\n * @function Phaser.Utils.Array.Add\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be added to.\r\n * @param {any|any[]} item - The item, or array of items, to add to the array. Each item must be unique within the array.\r\n * @param {integer} [limit] - Optional limit which caps the size of the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Add = function (array, item, limit, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n if (limit > 0)\r\n {\r\n var remaining = limit - array.length;\r\n\r\n // There's nothing more we can do here, the array is full\r\n if (remaining <= 0)\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n if (array.indexOf(item) === -1)\r\n {\r\n array.push(item);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to insert\r\n\r\n // Ensure all the items are unique\r\n var itemLength = item.length - 1;\r\n\r\n while (itemLength >= 0)\r\n {\r\n if (array.indexOf(item[itemLength]) !== -1)\r\n {\r\n // Already exists in array, so remove it\r\n item.splice(itemLength, 1);\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n // Anything left?\r\n itemLength = item.length;\r\n\r\n if (itemLength === 0)\r\n {\r\n return null;\r\n }\r\n\r\n if (limit > 0 && itemLength > remaining)\r\n {\r\n item.splice(remaining);\r\n\r\n itemLength = remaining;\r\n }\r\n\r\n for (var i = 0; i < itemLength; i++)\r\n {\r\n var entry = item[i];\r\n\r\n array.push(entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = Add;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds the given item, or array of items, to the array starting at the index specified.\r\n * \r\n * Each item must be unique within the array.\r\n * \r\n * Existing elements in the array are shifted up.\r\n * \r\n * The array is modified in-place and returned.\r\n * \r\n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\r\n * added will take the array length over this limit, it will stop adding once the limit is reached.\r\n * \r\n * You can optionally specify a callback to be invoked for each item successfully added to the array.\r\n *\r\n * @function Phaser.Utils.Array.AddAt\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be added to.\r\n * @param {any|any[]} item - The item, or array of items, to add to the array.\r\n * @param {integer} [index=0] - The index in the array where the item will be inserted.\r\n * @param {integer} [limit] - Optional limit which caps the size of the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar AddAt = function (array, item, index, limit, callback, context)\r\n{\r\n if (index === undefined) { index = 0; }\r\n if (context === undefined) { context = array; }\r\n\r\n if (limit > 0)\r\n {\r\n var remaining = limit - array.length;\r\n\r\n // There's nothing more we can do here, the array is full\r\n if (remaining <= 0)\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n if (array.indexOf(item) === -1)\r\n {\r\n array.splice(index, 0, item);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to insert\r\n\r\n // Ensure all the items are unique\r\n var itemLength = item.length - 1;\r\n\r\n while (itemLength >= 0)\r\n {\r\n if (array.indexOf(item[itemLength]) !== -1)\r\n {\r\n // Already exists in array, so remove it\r\n item.pop();\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n // Anything left?\r\n itemLength = item.length;\r\n\r\n if (itemLength === 0)\r\n {\r\n return null;\r\n }\r\n\r\n // Truncate to the limit\r\n if (limit > 0 && itemLength > remaining)\r\n {\r\n item.splice(remaining);\r\n\r\n itemLength = remaining;\r\n }\r\n\r\n for (var i = itemLength - 1; i >= 0; i--)\r\n {\r\n var entry = item[i];\r\n\r\n array.splice(index, 0, entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = AddAt;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given element to the top of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.BringToTop\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar BringToTop = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex < array.length)\r\n {\r\n array.splice(currentIndex, 1);\r\n array.push(item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = BringToTop;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Returns the total number of elements in the array which have a property matching the given value.\r\n *\r\n * @function Phaser.Utils.Array.CountAllMatching\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} property - The property to test on each array element.\r\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {integer} [startIndex] - An optional start index to search from.\r\n * @param {integer} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {integer} The total number of elements with properties matching the given value.\r\n */\r\nvar CountAllMatching = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n var total = 0;\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (child[property] === value)\r\n {\r\n total++;\r\n }\r\n }\r\n }\r\n\r\n return total;\r\n};\r\n\r\nmodule.exports = CountAllMatching;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Passes each element in the array to the given callback.\r\n *\r\n * @function Phaser.Utils.Array.Each\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {function} callback - A callback to be invoked for each item in the array.\r\n * @param {object} context - The context in which the callback is invoked.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the current array item.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Each = function (array, callback, context)\r\n{\r\n var i;\r\n var args = [ null ];\r\n\r\n for (i = 3; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < array.length; i++)\r\n {\r\n args[0] = array[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Each;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Passes each element in the array, between the start and end indexes, to the given callback.\r\n *\r\n * @function Phaser.Utils.Array.EachInRange\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {function} callback - A callback to be invoked for each item in the array.\r\n * @param {object} context - The context in which the callback is invoked.\r\n * @param {integer} startIndex - The start index to search from.\r\n * @param {integer} endIndex - The end index to search to.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar EachInRange = function (array, callback, context, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n var i;\r\n var args = [ null ];\r\n\r\n for (i = 5; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = startIndex; i < endIndex; i++)\r\n {\r\n args[0] = array[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = EachInRange;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Searches a pre-sorted array for the closet value to the given number.\r\n *\r\n * If the `key` argument is given it will assume the array contains objects that all have the required `key` property name,\r\n * and will check for the closest value of those to the given number.\r\n *\r\n * @function Phaser.Utils.Array.FindClosestInSorted\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to search for in the array.\r\n * @param {array} array - The array to search, which must be sorted.\r\n * @param {string} [key] - An optional property key. If specified the array elements property will be checked against value.\r\n *\r\n * @return {(number|any)} The nearest value found in the array, or if a `key` was given, the nearest object with the matching property value.\r\n */\r\nvar FindClosestInSorted = function (value, array, key)\r\n{\r\n if (!array.length)\r\n {\r\n return NaN;\r\n }\r\n else if (array.length === 1)\r\n {\r\n return array[0];\r\n }\r\n\r\n var i = 1;\r\n var low;\r\n var high;\r\n\r\n if (key)\r\n {\r\n if (value < array[0][key])\r\n {\r\n return array[0];\r\n }\r\n\r\n while (array[i][key] < value)\r\n {\r\n i++;\r\n }\r\n }\r\n else\r\n {\r\n while (array[i] < value)\r\n {\r\n i++;\r\n }\r\n }\r\n\r\n if (i > array.length)\r\n {\r\n i = array.length;\r\n }\r\n\r\n if (key)\r\n {\r\n low = array[i - 1][key];\r\n high = array[i][key];\r\n\r\n return ((high - value) <= (value - low)) ? array[i] : array[i - 1];\r\n }\r\n else\r\n {\r\n low = array[i - 1];\r\n high = array[i];\r\n\r\n return ((high - value) <= (value - low)) ? high : low;\r\n }\r\n};\r\n\r\nmodule.exports = FindClosestInSorted;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Returns all elements in the array.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('visible', true)` would return only elements that have their visible property set.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.GetAll\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} [property] - The property to test on each array element.\r\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {integer} [startIndex] - An optional start index to search from.\r\n * @param {integer} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {array} All matching elements from the array.\r\n */\r\nvar GetAll = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n var output = [];\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (!property ||\r\n (property && value === undefined && child.hasOwnProperty(property)) ||\r\n (property && value !== undefined && child[property] === value))\r\n {\r\n output.push(child);\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = GetAll;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Returns the first element in the array.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('visible', true)` would return the first element that had its `visible` property set.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would search only the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.GetFirst\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} [property] - The property to test on each array element.\r\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {integer} [startIndex=0] - An optional start index to search from.\r\n * @param {integer} [endIndex=array.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {object} The first matching element from the array, or `null` if no element could be found in the range given.\r\n */\r\nvar GetFirst = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (!property ||\r\n (property && value === undefined && child.hasOwnProperty(property)) ||\r\n (property && value !== undefined && child[property] === value))\r\n {\r\n return child;\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n};\r\n\r\nmodule.exports = GetFirst;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns a Random element from the array.\r\n *\r\n * @function Phaser.Utils.Array.GetRandom\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to select the random entry from.\r\n * @param {integer} [startIndex=0] - An optional start index.\r\n * @param {integer} [length=array.length] - An optional length, the total number of elements (from the startIndex) to choose from.\r\n *\r\n * @return {*} A random element from the array, or `null` if no element could be found in the range given.\r\n */\r\nvar GetRandom = function (array, startIndex, length)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (length === undefined) { length = array.length; }\r\n\r\n var randomIndex = startIndex + Math.floor(Math.random() * length);\r\n\r\n return (array[randomIndex] === undefined) ? null : array[randomIndex];\r\n};\r\n\r\nmodule.exports = GetRandom;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element down one place in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveDown\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item - The element to move down the array.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveDown = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex > 0)\r\n {\r\n var item2 = array[currentIndex - 1];\r\n\r\n var index2 = array.indexOf(item2);\r\n\r\n array[currentIndex] = item2;\r\n array[index2] = item;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveDown;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves an element in an array to a new position within the same array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveTo\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n * @param {integer} index - The new index that the element will be moved to.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar MoveTo = function (array, item, index)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex === -1 || index < 0 || index >= array.length)\r\n {\r\n throw new Error('Supplied index out of bounds');\r\n }\r\n\r\n if (currentIndex !== index)\r\n {\r\n // Remove\r\n array.splice(currentIndex, 1);\r\n\r\n // Add in new location\r\n array.splice(index, 0, item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = MoveTo;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element up one place in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveUp\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item - The element to move up the array.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveUp = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex < array.length - 1)\r\n {\r\n // The element one above `item` in the array\r\n var item2 = array[currentIndex + 1];\r\n var index2 = array.indexOf(item2);\r\n\r\n array[currentIndex] = item2;\r\n array[index2] = item;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveUp;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Create an array representing the range of numbers (usually integers), between, and inclusive of,\r\n * the given `start` and `end` arguments. For example:\r\n *\r\n * `var array = numberArray(2, 4); // array = [2, 3, 4]`\r\n * `var array = numberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]`\r\n *\r\n * This is equivalent to `numberArrayStep(start, end, 1)`.\r\n *\r\n * You can optionally provide a prefix and / or suffix string. If given the array will contain\r\n * strings, not integers. For example:\r\n *\r\n * `var array = numberArray(1, 4, 'Level '); // array = [\"Level 1\", \"Level 2\", \"Level 3\", \"Level 4\"]`\r\n * `var array = numberArray(5, 7, 'HD-', '.png'); // array = [\"HD-5.png\", \"HD-6.png\", \"HD-7.png\"]`\r\n *\r\n * @function Phaser.Utils.Array.NumberArray\r\n * @since 3.0.0\r\n *\r\n * @param {number} start - The minimum value the array starts with.\r\n * @param {number} end - The maximum value the array contains.\r\n * @param {string} [prefix] - Optional prefix to place before the number. If provided the array will contain strings, not integers.\r\n * @param {string} [suffix] - Optional suffix to place after the number. If provided the array will contain strings, not integers.\r\n *\r\n * @return {(number[]|string[])} The array of number values, or strings if a prefix or suffix was provided.\r\n */\r\nvar NumberArray = function (start, end, prefix, suffix)\r\n{\r\n var result = [];\r\n\r\n for (var i = start; i <= end; i++)\r\n {\r\n if (prefix || suffix)\r\n {\r\n var key = (prefix) ? prefix + i.toString() : i.toString();\r\n\r\n if (suffix)\r\n {\r\n key = key.concat(suffix);\r\n }\r\n\r\n result.push(key);\r\n }\r\n else\r\n {\r\n result.push(i);\r\n }\r\n }\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = NumberArray;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RoundAwayFromZero = require('../../math/RoundAwayFromZero');\r\n\r\n/**\r\n * Create an array of numbers (positive and/or negative) progressing from `start`\r\n * up to but not including `end` by advancing by `step`.\r\n *\r\n * If `start` is less than `end` a zero-length range is created unless a negative `step` is specified.\r\n *\r\n * Certain values for `start` and `end` (eg. NaN/undefined/null) are currently coerced to 0;\r\n * for forward compatibility make sure to pass in actual numbers.\r\n * \r\n * @example\r\n * NumberArrayStep(4);\r\n * // => [0, 1, 2, 3]\r\n *\r\n * NumberArrayStep(1, 5);\r\n * // => [1, 2, 3, 4]\r\n *\r\n * NumberArrayStep(0, 20, 5);\r\n * // => [0, 5, 10, 15]\r\n *\r\n * NumberArrayStep(0, -4, -1);\r\n * // => [0, -1, -2, -3]\r\n *\r\n * NumberArrayStep(1, 4, 0);\r\n * // => [1, 1, 1]\r\n *\r\n * NumberArrayStep(0);\r\n * // => []\r\n *\r\n * @function Phaser.Utils.Array.NumberArrayStep\r\n * @since 3.0.0\r\n *\r\n * @param {number} [start=0] - The start of the range.\r\n * @param {number} [end=null] - The end of the range.\r\n * @param {number} [step=1] - The value to increment or decrement by.\r\n *\r\n * @return {number[]} The array of number values.\r\n */\r\nvar NumberArrayStep = function (start, end, step)\r\n{\r\n if (start === undefined) { start = 0; }\r\n if (end === undefined) { end = null; }\r\n if (step === undefined) { step = 1; }\r\n\r\n if (end === null)\r\n {\r\n end = start;\r\n start = 0;\r\n }\r\n\r\n var result = [];\r\n\r\n var total = Math.max(RoundAwayFromZero((end - start) / (step || 1)), 0);\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n result.push(start);\r\n start += step;\r\n }\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = NumberArrayStep;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction swap (arr, i, j)\r\n{\r\n var tmp = arr[i];\r\n arr[i] = arr[j];\r\n arr[j] = tmp;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction defaultCompare (a, b)\r\n{\r\n return a < b ? -1 : a > b ? 1 : 0;\r\n}\r\n\r\n/**\r\n * A [Floyd-Rivest](https://en.wikipedia.org/wiki/Floyd%E2%80%93Rivest_algorithm) quick selection algorithm.\r\n *\r\n * Rearranges the array items so that all items in the [left, k] range are smaller than all items in [k, right];\r\n * The k-th element will have the (k - left + 1)th smallest value in [left, right].\r\n *\r\n * The array is modified in-place.\r\n *\r\n * Based on code by [Vladimir Agafonkin](https://www.npmjs.com/~mourner)\r\n *\r\n * @function Phaser.Utils.Array.QuickSelect\r\n * @since 3.0.0\r\n *\r\n * @param {array} arr - The array to sort.\r\n * @param {integer} k - The k-th element index.\r\n * @param {integer} [left=0] - The index of the left part of the range.\r\n * @param {integer} [right] - The index of the right part of the range.\r\n * @param {function} [compare] - An optional comparison function. Is passed two elements and should return 0, 1 or -1.\r\n */\r\nvar QuickSelect = function (arr, k, left, right, compare)\r\n{\r\n if (left === undefined) { left = 0; }\r\n if (right === undefined) { right = arr.length - 1; }\r\n if (compare === undefined) { compare = defaultCompare; }\r\n\r\n while (right > left)\r\n {\r\n if (right - left > 600)\r\n {\r\n var n = right - left + 1;\r\n var m = k - left + 1;\r\n var z = Math.log(n);\r\n var s = 0.5 * Math.exp(2 * z / 3);\r\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\r\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\r\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\r\n\r\n QuickSelect(arr, k, newLeft, newRight, compare);\r\n }\r\n\r\n var t = arr[k];\r\n var i = left;\r\n var j = right;\r\n\r\n swap(arr, left, k);\r\n\r\n if (compare(arr[right], t) > 0)\r\n {\r\n swap(arr, left, right);\r\n }\r\n\r\n while (i < j)\r\n {\r\n swap(arr, i, j);\r\n\r\n i++;\r\n j--;\r\n\r\n while (compare(arr[i], t) < 0)\r\n {\r\n i++;\r\n }\r\n\r\n while (compare(arr[j], t) > 0)\r\n {\r\n j--;\r\n }\r\n }\r\n\r\n if (compare(arr[left], t) === 0)\r\n {\r\n swap(arr, left, j);\r\n }\r\n else\r\n {\r\n j++;\r\n swap(arr, j, right);\r\n }\r\n\r\n if (j <= k)\r\n {\r\n left = j + 1;\r\n }\r\n\r\n if (k <= j)\r\n {\r\n right = j - 1;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = QuickSelect;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetValue = require('../object/GetValue');\r\nvar Shuffle = require('./Shuffle');\r\n\r\nvar BuildChunk = function (a, b, qty)\r\n{\r\n var out = [];\r\n\r\n for (var aIndex = 0; aIndex < a.length; aIndex++)\r\n {\r\n for (var bIndex = 0; bIndex < b.length; bIndex++)\r\n {\r\n for (var i = 0; i < qty; i++)\r\n {\r\n out.push({ a: a[aIndex], b: b[bIndex] });\r\n }\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\n/**\r\n * Creates an array populated with a range of values, based on the given arguments and configuration object.\r\n *\r\n * Range ([a,b,c], [1,2,3]) =\r\n * a1, a2, a3, b1, b2, b3, c1, c2, c3\r\n * \r\n * Range ([a,b], [1,2,3], qty = 3) =\r\n * a1, a1, a1, a2, a2, a2, a3, a3, a3, b1, b1, b1, b2, b2, b2, b3, b3, b3\r\n * \r\n * Range ([a,b,c], [1,2,3], repeat x1) =\r\n * a1, a2, a3, b1, b2, b3, c1, c2, c3, a1, a2, a3, b1, b2, b3, c1, c2, c3\r\n * \r\n * Range ([a,b], [1,2], repeat -1 = endless, max = 14) =\r\n * Maybe if max is set then repeat goes to -1 automatically?\r\n * a1, a2, b1, b2, a1, a2, b1, b2, a1, a2, b1, b2, a1, a2 (capped at 14 elements)\r\n * \r\n * Range ([a], [1,2,3,4,5], random = true) =\r\n * a4, a1, a5, a2, a3\r\n * \r\n * Range ([a, b], [1,2,3], random = true) =\r\n * b3, a2, a1, b1, a3, b2\r\n * \r\n * Range ([a, b, c], [1,2,3], randomB = true) =\r\n * a3, a1, a2, b2, b3, b1, c1, c3, c2\r\n * \r\n * Range ([a], [1,2,3,4,5], yoyo = true) =\r\n * a1, a2, a3, a4, a5, a5, a4, a3, a2, a1\r\n * \r\n * Range ([a, b], [1,2,3], yoyo = true) =\r\n * a1, a2, a3, b1, b2, b3, b3, b2, b1, a3, a2, a1\r\n *\r\n * @function Phaser.Utils.Array.Range\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The first array of range elements.\r\n * @param {array} b - The second array of range elements.\r\n * @param {object} [options] - A range configuration object. Can contain: repeat, random, randomB, yoyo, max, qty.\r\n *\r\n * @return {array} An array of arranged elements.\r\n */\r\nvar Range = function (a, b, options)\r\n{\r\n var max = GetValue(options, 'max', 0);\r\n var qty = GetValue(options, 'qty', 1);\r\n var random = GetValue(options, 'random', false);\r\n var randomB = GetValue(options, 'randomB', false);\r\n var repeat = GetValue(options, 'repeat', 0);\r\n var yoyo = GetValue(options, 'yoyo', false);\r\n\r\n var out = [];\r\n\r\n if (randomB)\r\n {\r\n Shuffle(b);\r\n }\r\n\r\n // Endless repeat, so limit by max\r\n if (repeat === -1)\r\n {\r\n if (max === 0)\r\n {\r\n repeat = 0;\r\n }\r\n else\r\n {\r\n // Work out how many repeats we need\r\n var total = (a.length * b.length) * qty;\r\n\r\n if (yoyo)\r\n {\r\n total *= 2;\r\n }\r\n\r\n repeat = Math.ceil(max / total);\r\n }\r\n }\r\n\r\n for (var i = 0; i <= repeat; i++)\r\n {\r\n var chunk = BuildChunk(a, b, qty);\r\n\r\n if (random)\r\n {\r\n Shuffle(chunk);\r\n }\r\n\r\n out = out.concat(chunk);\r\n\r\n if (yoyo)\r\n {\r\n chunk.reverse();\r\n\r\n out = out.concat(chunk);\r\n }\r\n }\r\n\r\n if (max)\r\n {\r\n out.splice(max);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Range;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = require('./SpliceOne');\r\n\r\n/**\r\n * Removes the given item, or array of items, from the array.\r\n * \r\n * The array is modified in-place.\r\n * \r\n * You can optionally specify a callback to be invoked for each item successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.Remove\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {*|Array.<*>} item - The item, or array of items, to be removed from the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {*|Array.<*>} The item, or array of items, that were successfully removed from the array.\r\n */\r\nvar Remove = function (array, item, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n var index;\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n index = array.indexOf(item);\r\n\r\n if (index !== -1)\r\n {\r\n SpliceOne(array, index);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to remove\r\n\r\n var itemLength = item.length - 1;\r\n\r\n while (itemLength >= 0)\r\n {\r\n var entry = item[itemLength];\r\n\r\n index = array.indexOf(entry);\r\n\r\n if (index !== -1)\r\n {\r\n SpliceOne(array, index);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n else\r\n {\r\n // Item wasn't found in the array, so remove it from our return results\r\n item.pop();\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = Remove;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = require('./SpliceOne');\r\n\r\n/**\r\n * Removes the item from the given position in the array.\r\n * \r\n * The array is modified in-place.\r\n * \r\n * You can optionally specify a callback to be invoked for the item if it is successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.RemoveAt\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {integer} index - The array index to remove the item from. The index must be in bounds or it will throw an error.\r\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {*} The item that was removed.\r\n */\r\nvar RemoveAt = function (array, index, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n if (index < 0 || index > array.length - 1)\r\n {\r\n throw new Error('Index out of bounds');\r\n }\r\n\r\n var item = SpliceOne(array, index);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = RemoveAt;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Removes the item within the given range in the array.\r\n * \r\n * The array is modified in-place.\r\n * \r\n * You can optionally specify a callback to be invoked for the item/s successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.RemoveBetween\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {integer} startIndex - The start index to remove from.\r\n * @param {integer} endIndex - The end index to remove to.\r\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {Array.<*>} An array of items that were removed.\r\n */\r\nvar RemoveBetween = function (array, startIndex, endIndex, callback, context)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n if (context === undefined) { context = array; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n var size = endIndex - startIndex;\r\n\r\n var removed = array.splice(startIndex, size);\r\n\r\n if (callback)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n var entry = removed[i];\r\n\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return removed;\r\n }\r\n else\r\n {\r\n return [];\r\n }\r\n};\r\n\r\nmodule.exports = RemoveBetween;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = require('./SpliceOne');\r\n\r\n/**\r\n * Removes a random object from the given array and returns it.\r\n * Will return null if there are no array items that fall within the specified range or if there is no item for the randomly chosen index.\r\n *\r\n * @function Phaser.Utils.Array.RemoveRandomElement\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to removed a random element from.\r\n * @param {integer} [start=0] - The array index to start the search from.\r\n * @param {integer} [length=array.length] - Optional restriction on the number of elements to randomly select from.\r\n *\r\n * @return {object} The random element that was removed, or `null` if there were no array elements that fell within the given range.\r\n */\r\nvar RemoveRandomElement = function (array, start, length)\r\n{\r\n if (start === undefined) { start = 0; }\r\n if (length === undefined) { length = array.length; }\r\n\r\n var randomIndex = start + Math.floor(Math.random() * length);\r\n\r\n return SpliceOne(array, randomIndex);\r\n};\r\n\r\nmodule.exports = RemoveRandomElement;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Replaces an element of the array with the new element.\r\n * The new element cannot already be a member of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.Replace\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search within.\r\n * @param {*} oldChild - The element in the array that will be replaced.\r\n * @param {*} newChild - The element to be inserted into the array at the position of `oldChild`.\r\n *\r\n * @return {boolean} Returns true if the oldChild was successfully replaced, otherwise returns false.\r\n */\r\nvar Replace = function (array, oldChild, newChild)\r\n{\r\n var index1 = array.indexOf(oldChild);\r\n var index2 = array.indexOf(newChild);\r\n\r\n if (index1 !== -1 && index2 === -1)\r\n {\r\n array[index1] = newChild;\r\n\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n};\r\n\r\nmodule.exports = Replace;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the element at the start of the array to the end, shifting all items in the process.\r\n * The \"rotation\" happens to the left.\r\n *\r\n * @function Phaser.Utils.Array.RotateLeft\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to shift to the left. This array is modified in place.\r\n * @param {integer} [total=1] - The number of times to shift the array.\r\n *\r\n * @return {*} The most recently shifted element.\r\n */\r\nvar RotateLeft = function (array, total)\r\n{\r\n if (total === undefined) { total = 1; }\r\n\r\n var element = null;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n element = array.shift();\r\n array.push(element);\r\n }\r\n\r\n return element;\r\n};\r\n\r\nmodule.exports = RotateLeft;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the element at the end of the array to the start, shifting all items in the process.\r\n * The \"rotation\" happens to the right.\r\n *\r\n * @function Phaser.Utils.Array.RotateRight\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to shift to the right. This array is modified in place.\r\n * @param {integer} [total=1] - The number of times to shift the array.\r\n *\r\n * @return {*} The most recently shifted element.\r\n */\r\nvar RotateRight = function (array, total)\r\n{\r\n if (total === undefined) { total = 1; }\r\n\r\n var element = null;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n element = array.pop();\r\n array.unshift(element);\r\n }\r\n\r\n return element;\r\n};\r\n\r\nmodule.exports = RotateRight;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tests if the start and end indexes are a safe range for the given array.\r\n * \r\n * @function Phaser.Utils.Array.SafeRange\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to check.\r\n * @param {integer} startIndex - The start index.\r\n * @param {integer} endIndex - The end index.\r\n * @param {boolean} [throwError=true] - Throw an error if the range is out of bounds.\r\n *\r\n * @return {boolean} True if the range is safe, otherwise false.\r\n */\r\nvar SafeRange = function (array, startIndex, endIndex, throwError)\r\n{\r\n var len = array.length;\r\n\r\n if (startIndex < 0 ||\r\n startIndex > len ||\r\n startIndex >= endIndex ||\r\n endIndex > len ||\r\n startIndex + endIndex > len)\r\n {\r\n if (throwError)\r\n {\r\n throw new Error('Range Error: Values outside acceptable range');\r\n }\r\n\r\n return false;\r\n }\r\n else\r\n {\r\n return true;\r\n }\r\n};\r\n\r\nmodule.exports = SafeRange;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given element to the bottom of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.SendToBack\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar SendToBack = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex > 0)\r\n {\r\n array.splice(currentIndex, 1);\r\n array.unshift(item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = SendToBack;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = require('./SafeRange');\r\n\r\n/**\r\n * Scans the array for elements with the given property. If found, the property is set to the `value`.\r\n *\r\n * For example: `SetAll('visible', true)` would set all elements that have a `visible` property to `false`.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would update only the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.SetAll\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} property - The property to test for on each array element.\r\n * @param {*} value - The value to set the property to.\r\n * @param {integer} [startIndex] - An optional start index to search from.\r\n * @param {integer} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar SetAll = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var entry = array[i];\r\n\r\n if (entry.hasOwnProperty(property))\r\n {\r\n entry[property] = value;\r\n }\r\n }\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = SetAll;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Shuffles the contents of the given array using the Fisher-Yates implementation.\r\n *\r\n * The original array is modified directly and returned.\r\n *\r\n * @function Phaser.Utils.Array.Shuffle\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [array,$return]\r\n *\r\n * @param {T[]} array - The array to shuffle. This array is modified in place.\r\n *\r\n * @return {T[]} The shuffled array.\r\n */\r\nvar Shuffle = function (array)\r\n{\r\n for (var i = array.length - 1; i > 0; i--)\r\n {\r\n var j = Math.floor(Math.random() * (i + 1));\r\n var temp = array[i];\r\n array[i] = array[j];\r\n array[j] = temp;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Shuffle;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Removes a single item from an array and returns it without creating gc, like the native splice does.\r\n * Based on code by Mike Reinstein.\r\n *\r\n * @function Phaser.Utils.Array.SpliceOne\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to splice from.\r\n * @param {integer} index - The index of the item which should be spliced.\r\n *\r\n * @return {*} The item which was spliced (removed).\r\n */\r\nvar SpliceOne = function (array, index)\r\n{\r\n if (index >= array.length)\r\n {\r\n return;\r\n }\r\n\r\n var len = array.length - 1;\r\n\r\n var item = array[index];\r\n\r\n for (var i = index; i < len; i++)\r\n {\r\n array[i] = array[i + 1];\r\n }\r\n\r\n array.length = len;\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = SpliceOne;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n//! stable.js 0.1.6, https://github.com/Two-Screen/stable\r\n//! © 2017 Angry Bytes and contributors. MIT licensed.\r\n\r\n/**\r\n * @namespace Phaser.Utils.Array.StableSortFunctions\r\n */\r\n\r\n(function() {\r\n\r\n /**\r\n * A stable array sort, because `Array#sort()` is not guaranteed stable.\r\n * This is an implementation of merge sort, without recursion.\r\n *\r\n * @function Phaser.Utils.Array.StableSort\r\n * @since 3.0.0\r\n *\r\n * @param {array} arr - The input array to be sorted.\r\n * @param {function} comp - The comparison handler.\r\n *\r\n * @return {array} The sorted result.\r\n */\r\nvar stable = function(arr, comp) {\r\n return exec(arr.slice(), comp);\r\n};\r\n\r\n /**\r\n * Sort the input array and simply copy it back if the result isn't in the original array, which happens on an odd number of passes.\r\n *\r\n * @function Phaser.Utils.Array.StableSortFunctions.inplace\r\n * @memberof Phaser.Utils.Array.StableSortFunctions\r\n * @since 3.0.0\r\n *\r\n * @param {array} arr - The input array.\r\n * @param {function} comp - The comparison handler.\r\n *\r\n * @return {array} The sorted array.\r\n */\r\nstable.inplace = function(arr, comp) {\r\n var result = exec(arr, comp);\r\n\r\n // This simply copies back if the result isn't in the original array,\r\n // which happens on an odd number of passes.\r\n if (result !== arr) {\r\n pass(result, null, arr.length, arr);\r\n }\r\n\r\n return arr;\r\n};\r\n\r\n// Execute the sort using the input array and a second buffer as work space.\r\n// Returns one of those two, containing the final result.\r\nfunction exec(arr, comp) {\r\n if (typeof(comp) !== 'function') {\r\n comp = function(a, b) {\r\n return String(a).localeCompare(b);\r\n };\r\n }\r\n\r\n // Short-circuit when there's nothing to sort.\r\n var len = arr.length;\r\n if (len <= 1) {\r\n return arr;\r\n }\r\n\r\n // Rather than dividing input, simply iterate chunks of 1, 2, 4, 8, etc.\r\n // Chunks are the size of the left or right hand in merge sort.\r\n // Stop when the left-hand covers all of the array.\r\n var buffer = new Array(len);\r\n for (var chk = 1; chk < len; chk *= 2) {\r\n pass(arr, comp, chk, buffer);\r\n\r\n var tmp = arr;\r\n arr = buffer;\r\n buffer = tmp;\r\n }\r\n\r\n return arr;\r\n}\r\n\r\n// Run a single pass with the given chunk size.\r\nvar pass = function(arr, comp, chk, result) {\r\n var len = arr.length;\r\n var i = 0;\r\n // Step size / double chunk size.\r\n var dbl = chk * 2;\r\n // Bounds of the left and right chunks.\r\n var l, r, e;\r\n // Iterators over the left and right chunk.\r\n var li, ri;\r\n\r\n // Iterate over pairs of chunks.\r\n for (l = 0; l < len; l += dbl) {\r\n r = l + chk;\r\n e = r + chk;\r\n if (r > len) r = len;\r\n if (e > len) e = len;\r\n\r\n // Iterate both chunks in parallel.\r\n li = l;\r\n ri = r;\r\n while (true) {\r\n // Compare the chunks.\r\n if (li < r && ri < e) {\r\n // This works for a regular `sort()` compatible comparator,\r\n // but also for a simple comparator like: `a > b`\r\n if (comp(arr[li], arr[ri]) <= 0) {\r\n result[i++] = arr[li++];\r\n }\r\n else {\r\n result[i++] = arr[ri++];\r\n }\r\n }\r\n // Nothing to compare, just flush what's left.\r\n else if (li < r) {\r\n result[i++] = arr[li++];\r\n }\r\n else if (ri < e) {\r\n result[i++] = arr[ri++];\r\n }\r\n // Both iterators are at the chunk ends.\r\n else {\r\n break;\r\n }\r\n }\r\n }\r\n};\r\n\r\n// Export using CommonJS or to the window.\r\nif (typeof(module) !== 'undefined') {\r\n module.exports = stable;\r\n}\r\nelse {\r\n window.stable = stable;\r\n}\r\n\r\n})();","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Swaps the position of two elements in the given array.\r\n * The elements must exist in the same array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.Swap\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item1 - The first element to swap.\r\n * @param {*} item2 - The second element to swap.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Swap = function (array, item1, item2)\r\n{\r\n if (item1 === item2)\r\n {\r\n return;\r\n }\r\n\r\n var index1 = array.indexOf(item1);\r\n var index2 = array.indexOf(item2);\r\n\r\n if (index1 < 0 || index2 < 0)\r\n {\r\n throw new Error('Supplied items must be elements of the same array');\r\n }\r\n\r\n array[index1] = item2;\r\n array[index2] = item1;\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Swap;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.Array\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Matrix: require('./matrix'),\r\n\r\n Add: require('./Add'),\r\n AddAt: require('./AddAt'),\r\n BringToTop: require('./BringToTop'),\r\n CountAllMatching: require('./CountAllMatching'),\r\n Each: require('./Each'),\r\n EachInRange: require('./EachInRange'),\r\n FindClosestInSorted: require('./FindClosestInSorted'),\r\n GetAll: require('./GetAll'),\r\n GetFirst: require('./GetFirst'),\r\n GetRandom: require('./GetRandom'),\r\n MoveDown: require('./MoveDown'),\r\n MoveTo: require('./MoveTo'),\r\n MoveUp: require('./MoveUp'),\r\n NumberArray: require('./NumberArray'),\r\n NumberArrayStep: require('./NumberArrayStep'),\r\n QuickSelect: require('./QuickSelect'),\r\n Range: require('./Range'),\r\n Remove: require('./Remove'),\r\n RemoveAt: require('./RemoveAt'),\r\n RemoveBetween: require('./RemoveBetween'),\r\n RemoveRandomElement: require('./RemoveRandomElement'),\r\n Replace: require('./Replace'),\r\n RotateLeft: require('./RotateLeft'),\r\n RotateRight: require('./RotateRight'),\r\n SafeRange: require('./SafeRange'),\r\n SendToBack: require('./SendToBack'),\r\n SetAll: require('./SetAll'),\r\n Shuffle: require('./Shuffle'),\r\n SpliceOne: require('./SpliceOne'),\r\n StableSort: require('./StableSort'),\r\n Swap: require('./Swap')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if an array can be used as a matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows) have the same length. There must be at least two rows:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.CheckMatrix\r\n * @since 3.0.0\r\n * \r\n * @generic T\r\n * @genericUse {T[][]} - [matrix]\r\n *\r\n * @param {T[][]} [matrix] - The array to check.\r\n *\r\n * @return {boolean} `true` if the given `matrix` array is a valid matrix.\r\n */\r\nvar CheckMatrix = function (matrix)\r\n{\r\n if (!Array.isArray(matrix) || matrix.length < 2 || !Array.isArray(matrix[0]))\r\n {\r\n return false;\r\n }\r\n\r\n // How long is the first row?\r\n var size = matrix[0].length;\r\n\r\n // Validate the rest of the rows are the same length\r\n for (var i = 1; i < matrix.length; i++)\r\n {\r\n if (matrix[i].length !== size)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n};\r\n\r\nmodule.exports = CheckMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Pad = require('../../string/Pad');\r\nvar CheckMatrix = require('./CheckMatrix');\r\n\r\n/**\r\n * Generates a string (which you can pass to console.log) from the given Array Matrix.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.MatrixToString\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix]\r\n *\r\n * @param {T[][]} [matrix] - A 2-dimensional array.\r\n *\r\n * @return {string} A string representing the matrix.\r\n */\r\nvar MatrixToString = function (matrix)\r\n{\r\n var str = '';\r\n\r\n if (!CheckMatrix(matrix))\r\n {\r\n return str;\r\n }\r\n\r\n for (var r = 0; r < matrix.length; r++)\r\n {\r\n for (var c = 0; c < matrix[r].length; c++)\r\n {\r\n var cell = matrix[r][c].toString();\r\n\r\n if (cell !== 'undefined')\r\n {\r\n str += Pad(cell, 2);\r\n }\r\n else\r\n {\r\n str += '?';\r\n }\r\n\r\n if (c < matrix[r].length - 1)\r\n {\r\n str += ' |';\r\n }\r\n }\r\n\r\n if (r < matrix.length - 1)\r\n {\r\n str += '\\n';\r\n\r\n for (var i = 0; i < matrix[r].length; i++)\r\n {\r\n str += '---';\r\n\r\n if (i < matrix[r].length - 1)\r\n {\r\n str += '+';\r\n }\r\n }\r\n\r\n str += '\\n';\r\n }\r\n\r\n }\r\n\r\n return str;\r\n};\r\n\r\nmodule.exports = MatrixToString;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Reverses the columns in the given Array Matrix.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.ReverseColumns\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to reverse the columns for.\r\n *\r\n * @return {T[][]} The column reversed matrix.\r\n */\r\nvar ReverseColumns = function (matrix)\r\n{\r\n return matrix.reverse();\r\n};\r\n\r\nmodule.exports = ReverseColumns;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Reverses the rows in the given Array Matrix.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.ReverseRows\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to reverse the rows for.\r\n *\r\n * @return {T[][]} The column reversed matrix.\r\n */\r\nvar ReverseRows = function (matrix)\r\n{\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n matrix[i].reverse();\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = ReverseRows;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = require('./RotateMatrix');\r\n\r\n/**\r\n * Rotates the array matrix 180 degrees.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.Rotate180\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar Rotate180 = function (matrix)\r\n{\r\n return RotateMatrix(matrix, 180);\r\n};\r\n\r\nmodule.exports = Rotate180;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = require('./RotateMatrix');\r\n\r\n/**\r\n * Rotates the array matrix to the left (or 90 degrees)\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateLeft\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateLeft = function (matrix)\r\n{\r\n return RotateMatrix(matrix, 90);\r\n};\r\n\r\nmodule.exports = RotateLeft;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CheckMatrix = require('./CheckMatrix');\r\nvar TransposeMatrix = require('./TransposeMatrix');\r\n\r\n/**\r\n * Rotates the array matrix based on the given rotation value.\r\n *\r\n * The value can be given in degrees: 90, -90, 270, -270 or 180,\r\n * or a string command: `rotateLeft`, `rotateRight` or `rotate180`.\r\n *\r\n * Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateMatrix\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n * @param {(number|string)} [direction=90] - The amount to rotate the matrix by.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateMatrix = function (matrix, direction)\r\n{\r\n if (direction === undefined) { direction = 90; }\r\n\r\n if (!CheckMatrix(matrix))\r\n {\r\n return null;\r\n }\r\n\r\n if (typeof direction !== 'string')\r\n {\r\n direction = ((direction % 360) + 360) % 360;\r\n }\r\n\r\n if (direction === 90 || direction === -270 || direction === 'rotateLeft')\r\n {\r\n matrix = TransposeMatrix(matrix);\r\n matrix.reverse();\r\n }\r\n else if (direction === -90 || direction === 270 || direction === 'rotateRight')\r\n {\r\n matrix.reverse();\r\n matrix = TransposeMatrix(matrix);\r\n }\r\n else if (Math.abs(direction) === 180 || direction === 'rotate180')\r\n {\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n matrix[i].reverse();\r\n }\r\n\r\n matrix.reverse();\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = RotateMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = require('./RotateMatrix');\r\n\r\n/**\r\n * Rotates the array matrix to the left (or -90 degrees)\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateRight\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateRight = function (matrix)\r\n{\r\n return RotateMatrix(matrix, -90);\r\n};\r\n\r\nmodule.exports = RotateRight;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Transposes the elements of the given matrix (array of arrays).\r\n *\r\n * The transpose of a matrix is a new matrix whose rows are the columns of the original.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.TransposeMatrix\r\n * @since 3.0.0\r\n * \r\n * @generic T\r\n * @genericUse {T[][]} - [array,$return]\r\n * \r\n * @param {T[][]} [array] - The array matrix to transpose.\r\n *\r\n * @return {T[][]} A new array matrix which is a transposed version of the given array.\r\n */\r\nvar TransposeMatrix = function (array)\r\n{\r\n var sourceRowCount = array.length;\r\n var sourceColCount = array[0].length;\r\n\r\n var result = new Array(sourceColCount);\r\n\r\n for (var i = 0; i < sourceColCount; i++)\r\n {\r\n result[i] = new Array(sourceRowCount);\r\n\r\n for (var j = sourceRowCount - 1; j > -1; j--)\r\n {\r\n result[i][j] = array[j][i];\r\n }\r\n }\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = TransposeMatrix;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.Array.Matrix\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CheckMatrix: require('./CheckMatrix'),\r\n MatrixToString: require('./MatrixToString'),\r\n ReverseColumns: require('./ReverseColumns'),\r\n ReverseRows: require('./ReverseRows'),\r\n Rotate180: require('./Rotate180'),\r\n RotateLeft: require('./RotateLeft'),\r\n RotateMatrix: require('./RotateMatrix'),\r\n RotateRight: require('./RotateRight'),\r\n TransposeMatrix: require('./TransposeMatrix')\r\n\r\n};\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar IsPlainObject = require('./IsPlainObject');\r\n\r\n// @param {boolean} deep - Perform a deep copy?\r\n// @param {object} target - The target object to copy to.\r\n// @return {object} The extended object.\r\n\r\n/**\r\n * This is a slightly modified version of http://api.jquery.com/jQuery.extend/\r\n *\r\n * @function Phaser.Utils.Objects.Extend\r\n * @since 3.0.0\r\n *\r\n * @param {...*} [args] - The objects that will be mixed.\r\n *\r\n * @return {object} The extended object.\r\n */\r\nvar Extend = function ()\r\n{\r\n var options, name, src, copy, copyIsArray, clone,\r\n target = arguments[0] || {},\r\n i = 1,\r\n length = arguments.length,\r\n deep = false;\r\n\r\n // Handle a deep copy situation\r\n if (typeof target === 'boolean')\r\n {\r\n deep = target;\r\n target = arguments[1] || {};\r\n\r\n // skip the boolean and the target\r\n i = 2;\r\n }\r\n\r\n // extend Phaser if only one argument is passed\r\n if (length === i)\r\n {\r\n target = this;\r\n --i;\r\n }\r\n\r\n for (; i < length; i++)\r\n {\r\n // Only deal with non-null/undefined values\r\n if ((options = arguments[i]) != null)\r\n {\r\n // Extend the base object\r\n for (name in options)\r\n {\r\n src = target[name];\r\n copy = options[name];\r\n\r\n // Prevent never-ending loop\r\n if (target === copy)\r\n {\r\n continue;\r\n }\r\n\r\n // Recurse if we're merging plain objects or arrays\r\n if (deep && copy && (IsPlainObject(copy) || (copyIsArray = Array.isArray(copy))))\r\n {\r\n if (copyIsArray)\r\n {\r\n copyIsArray = false;\r\n clone = src && Array.isArray(src) ? src : [];\r\n }\r\n else\r\n {\r\n clone = src && IsPlainObject(src) ? src : {};\r\n }\r\n\r\n // Never move original objects, clone them\r\n target[name] = Extend(deep, clone, copy);\r\n\r\n // Don't bring in undefined values\r\n }\r\n else if (copy !== undefined)\r\n {\r\n target[name] = copy;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Return the modified object\r\n return target;\r\n};\r\n\r\nmodule.exports = Extend;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH = require('../../math');\r\nvar GetValue = require('./GetValue');\r\n\r\n/**\r\n * Retrieves a value from an object. Allows for more advanced selection options, including:\r\n *\r\n * Allowed types:\r\n * \r\n * Implicit\r\n * {\r\n * x: 4\r\n * }\r\n *\r\n * From function\r\n * {\r\n * x: function ()\r\n * }\r\n *\r\n * Randomly pick one element from the array\r\n * {\r\n * x: [a, b, c, d, e, f]\r\n * }\r\n *\r\n * Random integer between min and max:\r\n * {\r\n * x: { randInt: [min, max] }\r\n * }\r\n *\r\n * Random float between min and max:\r\n * {\r\n * x: { randFloat: [min, max] }\r\n * }\r\n * \r\n *\r\n * @function Phaser.Utils.Objects.GetAdvancedValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\r\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetAdvancedValue = function (source, key, defaultValue)\r\n{\r\n var value = GetValue(source, key, null);\r\n\r\n if (value === null)\r\n {\r\n return defaultValue;\r\n }\r\n else if (Array.isArray(value))\r\n {\r\n return MATH.RND.pick(value);\r\n }\r\n else if (typeof value === 'object')\r\n {\r\n if (value.hasOwnProperty('randInt'))\r\n {\r\n return MATH.RND.integerInRange(value.randInt[0], value.randInt[1]);\r\n }\r\n else if (value.hasOwnProperty('randFloat'))\r\n {\r\n return MATH.RND.realInRange(value.randFloat[0], value.randFloat[1]);\r\n }\r\n }\r\n else if (typeof value === 'function')\r\n {\r\n return value(key);\r\n }\r\n\r\n return value;\r\n};\r\n\r\nmodule.exports = GetAdvancedValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Finds the key within the top level of the {@link source} object, or returns {@link defaultValue}\r\n *\r\n * @function Phaser.Utils.Objects.GetFastValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to search\r\n * @param {string} key - The key for the property on source. Must exist at the top level of the source object (no periods)\r\n * @param {*} [defaultValue] - The default value to use if the key does not exist.\r\n *\r\n * @return {*} The value if found; otherwise, defaultValue (null if none provided)\r\n */\r\nvar GetFastValue = function (source, key, defaultValue)\r\n{\r\n var t = typeof(source);\r\n\r\n if (!source || t === 'number' || t === 'string')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key) && source[key] !== undefined)\r\n {\r\n return source[key];\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetFastValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Source object\r\n// The key as a string, or an array of keys, i.e. 'banner', or 'banner.hideBanner'\r\n// The default value to use if the key doesn't exist\r\n\r\n/**\r\n * Retrieves a value from an object.\r\n *\r\n * @function Phaser.Utils.Objects.GetValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\r\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetValue = function (source, key, defaultValue)\r\n{\r\n if (!source || typeof source === 'number')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key))\r\n {\r\n return source[key];\r\n }\r\n else if (key.indexOf('.') !== -1)\r\n {\r\n var keys = key.split('.');\r\n var parent = source;\r\n var value = defaultValue;\r\n\r\n // Use for loop here so we can break early\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n if (parent.hasOwnProperty(keys[i]))\r\n {\r\n // Yes it has a key property, let's carry on down\r\n value = parent[keys[i]];\r\n\r\n parent = parent[keys[i]];\r\n }\r\n else\r\n {\r\n // Can't go any further, so reset to default\r\n value = defaultValue;\r\n break;\r\n }\r\n }\r\n\r\n return value;\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetValue;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * This is a slightly modified version of jQuery.isPlainObject.\r\n * A plain object is an object whose internal class property is [object Object].\r\n *\r\n * @function Phaser.Utils.Objects.IsPlainObject\r\n * @since 3.0.0\r\n *\r\n * @param {object} obj - The object to inspect.\r\n *\r\n * @return {boolean} `true` if the object is plain, otherwise `false`.\r\n */\r\nvar IsPlainObject = function (obj)\r\n{\r\n // Not plain objects:\r\n // - Any object or value whose internal [[Class]] property is not \"[object Object]\"\r\n // - DOM nodes\r\n // - window\r\n if (typeof(obj) !== 'object' || obj.nodeType || obj === obj.window)\r\n {\r\n return false;\r\n }\r\n\r\n // Support: Firefox <20\r\n // The try/catch suppresses exceptions thrown when attempting to access\r\n // the \"constructor\" property of certain host objects, ie. |window.location|\r\n // https://bugzilla.mozilla.org/show_bug.cgi?id=814622\r\n try\r\n {\r\n if (obj.constructor && !({}).hasOwnProperty.call(obj.constructor.prototype, 'isPrototypeOf'))\r\n {\r\n return false;\r\n }\r\n }\r\n catch (e)\r\n {\r\n return false;\r\n }\r\n\r\n // If the function hasn't returned already, we're confident that\r\n // |obj| is a plain object, created by {} or constructed with new Object\r\n return true;\r\n};\r\n\r\nmodule.exports = IsPlainObject;\r\n","/**\r\n * @author Richard Davey \r\n * @copyright 2020 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes the given string and pads it out, to the length required, using the character\r\n * specified. For example if you need a string to be 6 characters long, you can call:\r\n *\r\n * `pad('bob', 6, '-', 2)`\r\n *\r\n * This would return: `bob---` as it has padded it out to 6 characters, using the `-` on the right.\r\n *\r\n * You can also use it to pad numbers (they are always returned as strings):\r\n * \r\n * `pad(512, 6, '0', 1)`\r\n *\r\n * Would return: `000512` with the string padded to the left.\r\n *\r\n * If you don't specify a direction it'll pad to both sides:\r\n * \r\n * `pad('c64', 7, '*')`\r\n *\r\n * Would return: `**c64**`\r\n *\r\n * @function Phaser.Utils.String.Pad\r\n * @since 3.0.0\r\n *\r\n * @param {string|number|object} str - The target string. `toString()` will be called on the string, which means you can also pass in common data types like numbers.\r\n * @param {integer} [len=0] - The number of characters to be added.\r\n * @param {string} [pad=\" \"] - The string to pad it out with (defaults to a space).\r\n * @param {integer} [dir=3] - The direction dir = 1 (left), 2 (right), 3 (both).\r\n * \r\n * @return {string} The padded string.\r\n */\r\nvar Pad = function (str, len, pad, dir)\r\n{\r\n if (len === undefined) { len = 0; }\r\n if (pad === undefined) { pad = ' '; }\r\n if (dir === undefined) { dir = 3; }\r\n\r\n str = str.toString();\r\n\r\n var padlen = 0;\r\n\r\n if (len + 1 >= str.length)\r\n {\r\n switch (dir)\r\n {\r\n case 1:\r\n str = new Array(len + 1 - str.length).join(pad) + str;\r\n break;\r\n\r\n case 3:\r\n var right = Math.ceil((padlen = len - str.length) / 2);\r\n var left = padlen - right;\r\n str = new Array(left + 1).join(pad) + str + new Array(right + 1).join(pad);\r\n break;\r\n\r\n default:\r\n str = str + new Array(len + 1 - str.length).join(pad);\r\n break;\r\n }\r\n }\r\n\r\n return str;\r\n};\r\n\r\nmodule.exports = Pad;\r\n","/**\n * @author Richard Davey \n * @copyright 2018 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar Class = require('../../../src/utils/Class');\nvar GetFastValue = require('../../../src/utils/object/GetFastValue');\nvar ImageFile = require('../../../src/loader/filetypes/ImageFile.js');\nvar IsPlainObject = require('../../../src/utils/object/IsPlainObject');\nvar JSONFile = require('../../../src/loader/filetypes/JSONFile.js');\nvar MultiFile = require('../../../src/loader/MultiFile.js');\nvar TextFile = require('../../../src/loader/filetypes/TextFile.js');\n\n/**\n * @typedef {object} Phaser.Loader.FileTypes.SpineFileConfig\n *\n * @property {string} key - The key of the file. Must be unique within both the Loader and the Texture Manager.\n * @property {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\n * @property {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\n * @property {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\n * @property {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\n * @property {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\n */\n\n/**\n * @classdesc\n * A Spine File suitable for loading by the Loader.\n *\n * These are created when you use the Phaser.Loader.LoaderPlugin#spine method and are not typically created directly.\n *\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#spine.\n *\n * @class SpineFile\n * @extends Phaser.Loader.MultiFile\n * @memberof Phaser.Loader.FileTypes\n * @constructor\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\n * @param {(string|Phaser.Loader.FileTypes.SpineFileConfig)} key - The key to use for this file, or a file configuration object.\n * @param {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\n * @param {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\n * @param {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\n * @param {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\n */\nvar SpineFile = new Class({\n\n Extends: MultiFile,\n\n initialize:\n\n function SpineFile (loader, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings)\n {\n var i;\n var json;\n var atlas;\n var files = [];\n var cache = loader.cacheManager.custom.spine;\n\n // atlas can be an array of atlas files, not just a single one\n\n if (IsPlainObject(key))\n {\n var config = key;\n\n key = GetFastValue(config, 'key');\n\n json = new JSONFile(loader, {\n key: key,\n url: GetFastValue(config, 'jsonURL'),\n extension: GetFastValue(config, 'jsonExtension', 'json'),\n xhrSettings: GetFastValue(config, 'jsonXhrSettings')\n });\n\n atlasURL = GetFastValue(config, 'atlasURL');\n preMultipliedAlpha = GetFastValue(config, 'preMultipliedAlpha');\n\n if (!Array.isArray(atlasURL))\n {\n atlasURL = [ atlasURL ];\n }\n\n for (i = 0; i < atlasURL.length; i++)\n {\n atlas = new TextFile(loader, {\n key: key + '_' + i,\n url: atlasURL[i],\n extension: GetFastValue(config, 'atlasExtension', 'atlas'),\n xhrSettings: GetFastValue(config, 'atlasXhrSettings')\n });\n\n atlas.cache = cache;\n\n files.push(atlas);\n }\n }\n else\n {\n json = new JSONFile(loader, key, jsonURL, jsonXhrSettings);\n\n if (!Array.isArray(atlasURL))\n {\n atlasURL = [ atlasURL ];\n }\n\n for (i = 0; i < atlasURL.length; i++)\n {\n atlas = new TextFile(loader, key + '_' + i, atlasURL[i], atlasXhrSettings);\n atlas.cache = cache;\n\n files.push(atlas);\n }\n }\n\n files.unshift(json);\n\n MultiFile.call(this, loader, 'spine', key, files);\n\n this.config.preMultipliedAlpha = preMultipliedAlpha;\n },\n\n /**\n * Called by each File when it finishes loading.\n *\n * @method Phaser.Loader.FileTypes.SpineFile#onFileComplete\n * @since 3.19.0\n *\n * @param {Phaser.Loader.File} file - The File that has completed processing.\n */\n onFileComplete: function (file)\n {\n var index = this.files.indexOf(file);\n\n if (index !== -1)\n {\n this.pending--;\n\n if (file.type === 'text')\n {\n // Inspect the data for the files to now load\n var content = file.data.split('\\n');\n\n // Extract the textures\n var textures = [];\n\n for (var t = 0; t < content.length; t++)\n {\n var line = content[t];\n\n if (line.trim() === '' && t < content.length - 1)\n {\n line = content[t + 1];\n\n textures.push(line);\n }\n }\n\n var config = this.config;\n var loader = this.loader;\n\n var currentBaseURL = loader.baseURL;\n var currentPath = loader.path;\n var currentPrefix = loader.prefix;\n\n var baseURL = GetFastValue(config, 'baseURL', this.baseURL);\n var path = GetFastValue(config, 'path', file.src.match(/^.*\\//))[0];\n var prefix = GetFastValue(config, 'prefix', this.prefix);\n var textureXhrSettings = GetFastValue(config, 'textureXhrSettings');\n\n loader.setBaseURL(baseURL);\n loader.setPath(path);\n loader.setPrefix(prefix);\n\n for (var i = 0; i < textures.length; i++)\n {\n var textureURL = textures[i];\n\n var key = this.prefix + textureURL;\n\n var image = new ImageFile(loader, key, textureURL, textureXhrSettings);\n\n this.addToMultiFile(image);\n\n loader.addFile(image);\n }\n\n // Reset the loader settings\n loader.setBaseURL(currentBaseURL);\n loader.setPath(currentPath);\n loader.setPrefix(currentPrefix);\n }\n }\n },\n\n /**\n * Adds this file to its target cache upon successful loading and processing.\n *\n * @method Phaser.Loader.FileTypes.SpineFile#addToCache\n * @since 3.19.0\n */\n addToCache: function ()\n {\n if (this.isReadyToProcess())\n {\n var fileJSON = this.files[0];\n\n fileJSON.addToCache();\n\n var atlasCache;\n var atlasKey = '';\n var combinedAtlasData = '';\n var preMultipliedAlpha = (this.config.preMultipliedAlpha) ? true : false;\n\n for (var i = 1; i < this.files.length; i++)\n {\n var file = this.files[i];\n\n if (file.type === 'text')\n {\n atlasKey = file.key.replace(/_[\\d]$/, '');\n\n atlasCache = file.cache;\n\n combinedAtlasData = combinedAtlasData.concat(file.data);\n }\n else\n {\n var src = file.key.trim();\n var pos = src.indexOf('_');\n var key = src.substr(pos + 1);\n\n this.loader.textureManager.addImage(key, file.data);\n }\n\n file.pendingDestroy();\n }\n\n atlasCache.add(atlasKey, { preMultipliedAlpha: preMultipliedAlpha, data: combinedAtlasData, prefix: this.prefix });\n\n this.complete = true;\n }\n }\n\n});\n\nmodule.exports = SpineFile;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar BuildGameObject = require('../../../src/gameobjects/BuildGameObject');\nvar Class = require('../../../src/utils/Class');\nvar GetValue = require('../../../src/utils/object/GetValue');\nvar ResizeEvent = require('../../../src/scale/events/RESIZE_EVENT');\nvar ScenePlugin = require('../../../src/plugins/ScenePlugin');\nvar Spine = require('Spine');\nvar SpineFile = require('./SpineFile');\nvar SpineGameObject = require('./gameobject/SpineGameObject');\nvar SpineContainer = require('./container/SpineContainer');\nvar NOOP = require('../../../src/utils/NOOP');\n\n/**\n * @classdesc\n * The Spine Plugin is a Scene based plugin that handles the creation and rendering of Spine Game Objects.\n *\n * Find more details about Spine itself at http://esotericsoftware.com/.\n *\n * All rendering and object creation is handled via the official Spine Runtimes. This version of the plugin\n * uses the Spine 3.8.95 runtimes. Please note that due to the way the Spine runtimes use semver, you will\n * get breaking changes in point-releases. Therefore, files created in a different version of Spine may not\n * work as a result, without you first updating the runtimes and rebuilding the plugin.\n *\n * Esoteric themselves recommend that you freeze your Spine editor version against the runtime versions.\n * You can find more information about this here: http://esotericsoftware.com/spine-settings#Version\n *\n * Please note that you require a Spine license in order to use Spine Runtimes in your games.\n *\n * You can install this plugin into your Phaser game by either importing it, if you're using ES6:\n *\n * ```javascript\n * import * as SpinePlugin from './SpinePlugin.js';\n * ```\n *\n * and then adding it to your Phaser Game configuration:\n *\n * ```javascript\n * plugins: {\n * scene: [\n * { key: 'SpinePlugin', plugin: window.SpinePlugin, mapping: 'spine' }\n * ]\n * }\n * ```\n *\n * If you're using ES5 then you can load the Spine Plugin in a Scene files payload, _within_ your\n * Game Configuration object, like this:\n *\n * ```javascript\n * scene: {\n * preload: preload,\n * create: create,\n * pack: {\n * files: [\n * { type: 'scenePlugin', key: 'SpinePlugin', url: 'plugins/SpinePlugin.js', sceneKey: 'spine' }\n * ]\n * }\n * }\n * ```\n *\n * Loading it like this allows you to then use commands such as `this.load.spine` from within the\n * same Scene. Alternatively, you can use the method `this.load.plugin` to load the plugin via the normal\n * Phaser Loader. However, doing so will not add it to the current Scene. It will be available from any\n * subsequent Scenes.\n *\n * Assuming a default environment you access it from within a Scene by using the `this.spine` reference.\n *\n * When this plugin is installed into a Scene it will add a Loader File Type, allowing you to load\n * Spine files directly, i.e.:\n *\n * ```javascript\n * this.load.spine('stretchyman', 'stretchyman-pro.json', [ 'stretchyman-pma.atlas' ], true);\n * ```\n *\n * It also installs a Game Object Factory method, allowing you to create Spine Game Objects:\n *\n * ```javascript\n * this.add.spine(512, 650, 'stretchyman')\n * ```\n *\n * The first argument is the key which you used when importing the Spine data. There are lots of\n * things you can specify, such as the animation name, skeleton, slot attachments and more. Please\n * see the respective documentation and examples for further details.\n *\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary.\n * The associated atlas files are scanned for any texture files present in them, which are then loaded.\n * If you have exported your Spine data with preMultipliedAlpha set, then you should enable this in the\n * load arguments, or you may see black outlines around skeleton textures.\n *\n * The Spine plugin is local to the Scene in which it is installed. This means a change to something,\n * such as the Skeleton Debug Renderer, in this Scene, will not impact the renderer in any other Scene.\n * The only exception to this is with the caches this plugin creates. Spine atlas and texture data are\n * stored in their own caches, which are global, meaning they're accessible from any Scene in your\n * game, regardless if the Scene loaded the Spine data or not.\n *\n * When destroying a Phaser Game instance, if you need to re-create it again on the same page without\n * reloading, you must remember to remove the Spine Plugin as part of your tear-down process:\n *\n * ```javascript\n * this.plugins.removeScenePlugin('SpinePlugin');\n * ```\n *\n * For details about the Spine Runtime API see http://esotericsoftware.com/spine-api-reference\n *\n * @class SpinePlugin\n * @extends Phaser.Plugins.ScenePlugin\n * @constructor\n * @since 3.19.0\n *\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Phaser Plugin Manager.\n */\nvar SpinePlugin = new Class({\n\n Extends: ScenePlugin,\n\n initialize:\n\n function SpinePlugin (scene, pluginManager)\n {\n ScenePlugin.call(this, scene, pluginManager);\n\n var game = pluginManager.game;\n\n /**\n * A read-only flag that indicates if the game is running under WebGL or Canvas.\n *\n * @name SpinePlugin#isWebGL\n * @type {boolean}\n * @readonly\n * @since 3.19.0\n */\n this.isWebGL = (game.config.renderType === 2);\n\n /**\n * A custom cache that stores the Spine atlas data.\n *\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\n * no matter which Scene you are in.\n *\n * @name SpinePlugin#cache\n * @type {Phaser.Cache.BaseCache}\n * @since 3.19.0\n */\n this.cache = game.cache.addCustom('spine');\n\n /**\n * A custom cache that stores the Spine Textures.\n *\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\n * no matter which Scene you are in.\n *\n * @name SpinePlugin#spineTextures\n * @type {Phaser.Cache.BaseCache}\n * @since 3.19.0\n */\n this.spineTextures = game.cache.addCustom('spineTextures');\n\n /**\n * A reference to the global JSON Cache.\n *\n * @name SpinePlugin#json\n * @type {Phaser.Cache.BaseCache}\n * @since 3.19.0\n */\n this.json = game.cache.json;\n\n /**\n * A reference to the global Texture Manager.\n *\n * @name SpinePlugin#textures\n * @type {Phaser.Textures.TextureManager}\n * @since 3.19.0\n */\n this.textures = game.textures;\n\n /**\n * A flag that sets if the Skeleton Renderers will render debug information over the top\n * of the skeleton or not.\n *\n * @name SpinePlugin#drawDebug\n * @type {boolean}\n * @since 3.19.0\n */\n this.drawDebug = false;\n\n /**\n * The underlying WebGL context of the Phaser renderer.\n *\n * Only set if running in WebGL mode.\n *\n * @name SpinePlugin#gl\n * @type {WebGLRenderingContext}\n * @since 3.19.0\n */\n this.gl;\n\n /**\n * A reference to either the Canvas or WebGL Renderer that this Game is using.\n *\n * @name SpinePlugin#renderer\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\n * @since 3.19.0\n */\n this.renderer;\n\n /**\n * An instance of the Spine WebGL Scene Renderer.\n *\n * Only set if running in WebGL mode.\n *\n * @name SpinePlugin#sceneRenderer\n * @type {spine.webgl.SceneRenderer}\n * @since 3.19.0\n */\n this.sceneRenderer;\n\n /**\n * An instance of the Spine Skeleton Renderer.\n *\n * @name SpinePlugin#skeletonRenderer\n * @type {(spine.canvas.SkeletonRenderer|spine.webgl.SkeletonRenderer)}\n * @since 3.19.0\n */\n this.skeletonRenderer;\n\n /**\n * An instance of the Spine Skeleton Debug Renderer.\n *\n * Only set if running in WebGL mode.\n *\n * @name SpinePlugin#skeletonDebugRenderer\n * @type {spine.webgl.skeletonDebugRenderer}\n * @since 3.19.0\n */\n this.skeletonDebugRenderer;\n\n /**\n * A reference to the Spine runtime.\n * This is the runtime created by Esoteric Software\n *\n * @name SpinePlugin#plugin\n * @type {spine}\n * @since 3.19.0\n */\n this.plugin = Spine;\n\n /**\n * An internal vector3 used by the screen to world method.\n *\n * @name SpinePlugin#temp1\n * @private\n * @type {spine.webgl.Vector3}\n * @since 3.19.0\n */\n this.temp1;\n\n /**\n * An internal vector3 used by the screen to world method.\n *\n * @name SpinePlugin#temp2\n * @private\n * @type {spine.webgl.Vector3}\n * @since 3.19.0\n */\n this.temp2;\n\n if (this.isWebGL)\n {\n this.runtime = Spine.webgl;\n\n this.renderer = game.renderer;\n this.gl = game.renderer.gl;\n\n this.getAtlas = this.getAtlasWebGL;\n }\n else\n {\n this.runtime = Spine.canvas;\n\n this.renderer = game.renderer;\n\n this.getAtlas = this.getAtlasCanvas;\n }\n\n // Headless mode?\n if (!this.renderer)\n {\n this.renderer = {\n width: game.scale.width,\n height: game.scale.height,\n preRender: NOOP,\n postRender: NOOP,\n render: NOOP,\n destroy: NOOP\n };\n }\n\n var _this = this;\n\n var add = function (x, y, key, animationName, loop)\n {\n var spineGO = new SpineGameObject(this.scene, _this, x, y, key, animationName, loop);\n\n this.displayList.add(spineGO);\n this.updateList.add(spineGO);\n\n return spineGO;\n };\n\n var make = function (config, addToScene)\n {\n if (config === undefined) { config = {}; }\n\n var key = GetValue(config, 'key', null);\n var animationName = GetValue(config, 'animationName', null);\n var loop = GetValue(config, 'loop', false);\n\n var spineGO = new SpineGameObject(this.scene, _this, 0, 0, key, animationName, loop);\n\n if (addToScene !== undefined)\n {\n config.add = addToScene;\n }\n\n BuildGameObject(this.scene, spineGO, config);\n\n // Spine specific\n var skinName = GetValue(config, 'skinName', false);\n\n if (skinName)\n {\n spineGO.setSkinByName(skinName);\n }\n\n var slotName = GetValue(config, 'slotName', false);\n var attachmentName = GetValue(config, 'attachmentName', null);\n\n if (slotName)\n {\n spineGO.setAttachment(slotName, attachmentName);\n }\n\n return spineGO.refresh();\n };\n\n var addContainer = function (x, y, children)\n {\n var spineGO = new SpineContainer(this.scene, _this, x, y, children);\n\n this.displayList.add(spineGO);\n\n return spineGO;\n };\n\n var makeContainer = function (config, addToScene)\n {\n if (config === undefined) { config = {}; }\n\n var x = GetValue(config, 'x', 0);\n var y = GetValue(config, 'y', 0);\n var children = GetValue(config, 'children', null);\n\n var container = new SpineContainer(this.scene, _this, x, y, children);\n\n if (addToScene !== undefined)\n {\n config.add = addToScene;\n }\n\n BuildGameObject(this.scene, container, config);\n\n return container;\n };\n\n pluginManager.registerFileType('spine', this.spineFileCallback, scene);\n pluginManager.registerGameObject('spine', add, make);\n pluginManager.registerGameObject('spinecontainer', addContainer, makeContainer);\n },\n\n /**\n * Internal boot handler.\n *\n * @method SpinePlugin#boot\n * @private\n * @since 3.19.0\n */\n boot: function ()\n {\n if (this.isWebGL)\n {\n this.bootWebGL();\n this.onResize();\n this.game.scale.on(ResizeEvent, this.onResize, this);\n }\n else\n {\n this.bootCanvas();\n }\n\n var eventEmitter = this.systems.events;\n\n eventEmitter.once('shutdown', this.shutdown, this);\n eventEmitter.once('destroy', this.destroy, this);\n },\n\n /**\n * Internal boot handler for the Canvas Renderer.\n *\n * @method SpinePlugin#bootCanvas\n * @private\n * @since 3.19.0\n */\n bootCanvas: function ()\n {\n this.skeletonRenderer = new Spine.canvas.SkeletonRenderer(this.scene.sys.context);\n },\n\n /**\n * Internal boot handler for the WebGL Renderer.\n *\n * @method SpinePlugin#bootWebGL\n * @private\n * @since 3.19.0\n */\n bootWebGL: function ()\n {\n this.sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true);\n\n // Monkeypatch the Spine setBlendMode functions, or batching is destroyed!\n\n var setBlendMode = function (srcBlend, dstBlend)\n {\n if (srcBlend !== this.srcBlend || dstBlend !== this.dstBlend)\n {\n var gl = this.context.gl;\n\n this.srcBlend = srcBlend;\n this.dstBlend = dstBlend;\n\n if (this.isDrawing)\n {\n this.flush();\n gl.blendFunc(this.srcBlend, this.dstBlend);\n }\n }\n };\n\n this.sceneRenderer.batcher.setBlendMode = setBlendMode;\n this.sceneRenderer.shapes.setBlendMode = setBlendMode;\n\n this.skeletonRenderer = this.sceneRenderer.skeletonRenderer;\n this.skeletonDebugRenderer = this.sceneRenderer.skeletonDebugRenderer;\n\n this.temp1 = new Spine.webgl.Vector3(0, 0, 0);\n this.temp2 = new Spine.webgl.Vector3(0, 0, 0);\n },\n\n /**\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\n * then returns it. You do not normally need to invoke this method directly.\n *\n * @method SpinePlugin#getAtlasCanvas\n * @since 3.19.0\n *\n * @param {string} key - The key of the Spine Atlas to create.\n *\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\n */\n getAtlasCanvas: function (key)\n {\n var atlasEntry = this.cache.get(key);\n\n if (!atlasEntry)\n {\n console.warn('No atlas data for: ' + key);\n return;\n }\n\n var atlas;\n var spineTextures = this.spineTextures;\n\n if (spineTextures.has(key))\n {\n atlas = spineTextures.get(key);\n }\n else\n {\n var textures = this.textures;\n\n atlas = new Spine.TextureAtlas(atlasEntry.data, function (path)\n {\n return new Spine.canvas.CanvasTexture(textures.get(atlasEntry.prefix + path).getSourceImage());\n });\n }\n\n return atlas;\n },\n\n /**\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\n * then returns it. You do not normally need to invoke this method directly.\n *\n * @method SpinePlugin#getAtlasWebGL\n * @since 3.19.0\n *\n * @param {string} key - The key of the Spine Atlas to create.\n *\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\n */\n getAtlasWebGL: function (key)\n {\n var atlasEntry = this.cache.get(key);\n\n if (!atlasEntry)\n {\n console.warn('No atlas data for: ' + key);\n return;\n }\n\n var atlas;\n var spineTextures = this.spineTextures;\n\n if (spineTextures.has(key))\n {\n atlas = spineTextures.get(key);\n }\n else\n {\n var textures = this.textures;\n\n var gl = this.sceneRenderer.context.gl;\n\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\n\n atlas = new Spine.TextureAtlas(atlasEntry.data, function (path)\n {\n return new Spine.webgl.GLTexture(gl, textures.get(atlasEntry.prefix + path).getSourceImage(), false);\n });\n }\n\n return atlas;\n },\n\n /**\n * Adds a Spine Skeleton and Atlas file, or array of files, to the current load queue.\n *\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\n *\n * ```javascript\n * function preload ()\n * {\n * this.load.spine('spineBoy', 'boy.json', 'boy.atlas', true);\n * }\n * ```\n *\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\n * loaded.\n *\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\n *\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary. The associated\n * atlas files are scanned for any texture files present in them, which are then loaded. If you have exported\n * your Spine data with preMultipliedAlpha set, then you should enable this in the arguments, or you may see black\n * outlines around skeleton textures.\n *\n * The key must be a unique String. It is used to add the file to the global Spine cache upon a successful load.\n * The key should be unique both in terms of files being loaded and files already present in the Spine cache.\n * Loading a file using a key that is already taken will result in a warning.\n *\n * Instead of passing arguments you can pass a configuration object, such as:\n *\n * ```javascript\n * this.load.spine({\n * key: 'mainmenu',\n * jsonURL: 'boy.json',\n * atlasURL: 'boy.atlas',\n * preMultipliedAlpha: true\n * });\n * ```\n *\n * If you need to load multiple Spine atlas files, provide them as an array:\n *\n * ```javascript\n * function preload ()\n * {\n * this.load.spine('demos', 'demos.json', [ 'atlas1.atlas', 'atlas2.atlas' ], true);\n * }\n * ```\n *\n * See the documentation for `Phaser.Types.Loader.FileTypes.SpineFileConfig` for more details.\n *\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\n * this is what you would use to retrieve the data from the Spine plugin.\n *\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\n *\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\n * and no URL is given then the Loader will set the URL to be \"alien.json\". It will always add `.json` as the extension, although\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\n *\n * Note: The ability to load this type of file will only be available if the Spine Plugin has been built or loaded into Phaser.\n *\n * @method Phaser.Loader.LoaderPlugin#spine\n * @fires Phaser.Loader.LoaderPlugin#ADD\n * @since 3.19.0\n *\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\n * @param {string} jsonURL - The absolute or relative URL to load the Spine json file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\n * @param {string|string[]} atlasURL - The absolute or relative URL to load the Spine atlas file from. If undefined or `null` it will be set to `.atlas`, i.e. if `key` was \"alien\" then the URL will be \"alien.atlas\".\n * @param {boolean} [preMultipliedAlpha=false] - Do the texture files include pre-multiplied alpha or not?\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the Spine json file. Used in replacement of the Loaders default XHR Settings.\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the Spine atlas file. Used in replacement of the Loaders default XHR Settings.\n *\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\n */\n spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings)\n {\n var multifile;\n\n if (Array.isArray(key))\n {\n for (var i = 0; i < key.length; i++)\n {\n multifile = new SpineFile(this, key[i]);\n\n this.addFile(multifile.files);\n }\n }\n else\n {\n multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings);\n\n this.addFile(multifile.files);\n }\n\n return this;\n },\n\n /**\n * Converts the given x and y screen coordinates into the world space of the given Skeleton.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#worldToLocal\n * @since 3.19.0\n *\n * @param {number} x - The screen space x coordinate to convert.\n * @param {number} y - The screen space y coordinate to convert.\n * @param {spine.Skeleton} skeleton - The Spine Skeleton to convert into.\n * @param {spine.Bone} [bone] - Optional bone of the Skeleton to convert into.\n *\n * @return {spine.Vector2} A Vector2 containing the translated point.\n */\n worldToLocal: function (x, y, skeleton, bone)\n {\n var temp1 = this.temp1;\n var temp2 = this.temp2;\n var camera = this.sceneRenderer.camera;\n\n temp1.set(x + skeleton.x, y - skeleton.y, 0);\n\n var width = camera.viewportWidth;\n var height = camera.viewportHeight;\n\n camera.screenToWorld(temp1, width, height);\n\n if (bone && bone.parent !== null)\n {\n bone.parent.worldToLocal(temp2.set(temp1.x - skeleton.x, temp1.y - skeleton.y, 0));\n\n return new Spine.Vector2(temp2.x, temp2.y);\n }\n else if (bone)\n {\n return new Spine.Vector2(temp1.x - skeleton.x, temp1.y - skeleton.y);\n }\n else\n {\n return new Spine.Vector2(temp1.x, temp1.y);\n }\n },\n\n /**\n * Returns a Spine Vector2 based on the given x and y values.\n *\n * @method SpinePlugin#getVector2\n * @since 3.19.0\n *\n * @param {number} x - The Vector x value.\n * @param {number} y - The Vector y value.\n *\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\n */\n getVector2: function (x, y)\n {\n return new Spine.Vector2(x, y);\n },\n\n /**\n * Returns a Spine Vector2 based on the given x, y and z values.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#getVector3\n * @since 3.19.0\n *\n * @param {number} x - The Vector x value.\n * @param {number} y - The Vector y value.\n * @param {number} z - The Vector z value.\n *\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\n */\n getVector3: function (x, y, z)\n {\n return new Spine.webgl.Vector3(x, y, z);\n },\n\n /**\n * Sets `drawBones` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugBones\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugBones: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawBones = value;\n\n return this;\n },\n\n /**\n * Sets `drawRegionAttachments` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugRegionAttachments\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugRegionAttachments: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawRegionAttachments = value;\n\n return this;\n },\n\n /**\n * Sets `drawBoundingBoxes` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugBoundingBoxes\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugBoundingBoxes: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawBoundingBoxes = value;\n\n return this;\n },\n\n /**\n * Sets `drawMeshHull` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugMeshHull\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugMeshHull: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawMeshHull = value;\n\n return this;\n },\n\n /**\n * Sets `drawMeshTriangles` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugMeshTriangles\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugMeshTriangles: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawMeshTriangles = value;\n\n return this;\n },\n\n /**\n * Sets `drawPaths` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugPaths\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugPaths: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawPaths = value;\n\n return this;\n },\n\n /**\n * Sets `drawSkeletonXY` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugSkeletonXY\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugSkeletonXY: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawSkeletonXY = value;\n\n return this;\n },\n\n /**\n * Sets `drawClipping` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugClipping\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugClipping: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawClipping = value;\n\n return this;\n },\n\n /**\n * Sets the given vertex effect on the Spine Skeleton Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setEffect\n * @since 3.19.0\n *\n * @param {spine.VertexEffect} [effect] - The vertex effect to set on the Skeleton Renderer.\n *\n * @return {this} This Spine Plugin.\n */\n setEffect: function (effect)\n {\n this.sceneRenderer.skeletonRenderer.vertexEffect = effect;\n\n return this;\n },\n\n /**\n * Creates a Spine Skeleton based on the given key and optional Skeleton JSON data.\n *\n * The Skeleton data should have already been loaded before calling this method.\n *\n * @method SpinePlugin#createSkeleton\n * @since 3.19.0\n *\n * @param {string} key - The key of the Spine skeleton data, as loaded by the plugin. If the Spine JSON contains multiple skeletons, reference them with a period, i.e. `set.spineBoy`.\n * @param {object} [skeletonJSON] - Optional Skeleton JSON data to use, instead of getting it from the cache.\n *\n * @return {(any|null)} This Spine Skeleton data object, or `null` if the key was invalid.\n */\n createSkeleton: function (key, skeletonJSON)\n {\n var atlasKey = key;\n var jsonKey = key;\n var split = (key.indexOf('.') !== -1);\n\n if (split)\n {\n var parts = key.split('.');\n\n atlasKey = parts.shift();\n jsonKey = parts.join('.');\n }\n\n var atlasData = this.cache.get(atlasKey);\n var atlas = this.getAtlas(atlasKey);\n\n if (!atlas)\n {\n return null;\n }\n\n if (!this.spineTextures.has(atlasKey))\n {\n this.spineTextures.add(atlasKey, atlas);\n }\n\n var preMultipliedAlpha = atlasData.preMultipliedAlpha;\n\n var atlasLoader = new Spine.AtlasAttachmentLoader(atlas);\n\n var skeletonJson = new Spine.SkeletonJson(atlasLoader);\n\n var data;\n\n if (skeletonJSON)\n {\n data = skeletonJSON;\n }\n else\n {\n var json = this.json.get(atlasKey);\n\n data = (split) ? GetValue(json, jsonKey) : json;\n }\n\n if (data)\n {\n var skeletonData = skeletonJson.readSkeletonData(data);\n\n var skeleton = new Spine.Skeleton(skeletonData);\n\n return { skeletonData: skeletonData, skeleton: skeleton, preMultipliedAlpha: preMultipliedAlpha };\n }\n else\n {\n return null;\n }\n },\n\n /**\n * Creates a new Animation State and Animation State Data for the given skeleton.\n *\n * The returned object contains two properties: `state` and `stateData` respectively.\n *\n * @method SpinePlugin#createAnimationState\n * @since 3.19.0\n *\n * @param {spine.Skeleton} skeleton - The Skeleton to create the Animation State for.\n *\n * @return {any} An object containing the Animation State and Animation State Data instances.\n */\n createAnimationState: function (skeleton)\n {\n var stateData = new Spine.AnimationStateData(skeleton.data);\n\n var state = new Spine.AnimationState(stateData);\n\n return { stateData: stateData, state: state };\n },\n\n /**\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\n *\n * The returned object contains two properties: `offset` and `size`:\n *\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\n * `size` - The width and height of the AABB.\n *\n * @method SpinePlugin#getBounds\n * @since 3.19.0\n *\n * @param {spine.Skeleton} skeleton - The Skeleton to get the bounds from.\n *\n * @return {any} The bounds object.\n */\n getBounds: function (skeleton)\n {\n var offset = new Spine.Vector2();\n var size = new Spine.Vector2();\n\n skeleton.getBounds(offset, size, []);\n\n return { offset: offset, size: size };\n },\n\n /**\n * Internal handler for when the renderer resizes.\n *\n * Only called if running in WebGL.\n *\n * @method SpinePlugin#onResize\n * @since 3.19.0\n */\n onResize: function ()\n {\n var renderer = this.renderer;\n var sceneRenderer = this.sceneRenderer;\n\n var viewportWidth = renderer.width;\n var viewportHeight = renderer.height;\n\n sceneRenderer.camera.position.x = viewportWidth / 2;\n sceneRenderer.camera.position.y = viewportHeight / 2;\n\n sceneRenderer.camera.viewportWidth = viewportWidth;\n sceneRenderer.camera.viewportHeight = viewportHeight;\n },\n\n /**\n * The Scene that owns this plugin is shutting down.\n *\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\n *\n * @method SpinePlugin#shutdown\n * @private\n * @since 3.19.0\n */\n shutdown: function ()\n {\n var eventEmitter = this.systems.events;\n\n eventEmitter.off('shutdown', this.shutdown, this);\n\n if (this.isWebGL)\n {\n this.game.scale.off(ResizeEvent, this.onResize, this);\n }\n },\n\n /**\n * The Scene that owns this plugin is being destroyed.\n *\n * We need to shutdown and then kill off all external references.\n *\n * @method SpinePlugin#destroy\n * @private\n * @since 3.19.0\n */\n destroy: function ()\n {\n this.shutdown();\n\n if (this.sceneRenderer)\n {\n this.sceneRenderer.dispose();\n }\n\n this.pluginManager.removeGameObject('spine', true, true);\n\n this.pluginManager = null;\n this.game = null;\n this.scene = null;\n this.systems = null;\n\n this.cache = null;\n this.spineTextures = null;\n this.json = null;\n this.textures = null;\n this.sceneRenderer = null;\n this.skeletonRenderer = null;\n this.gl = null;\n }\n\n});\n\nSpinePlugin.SpineGameObject = SpineGameObject;\n\n/**\n * Creates a new Spine Game Object and adds it to the Scene.\n *\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\n * do not have a Phaser origin.\n *\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\n * that.\n *\n * ```javascript\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\n * ```\n *\n * The key is optional. If not passed here, you need to call `SpineGameObject.setSkeleton()` to use it.\n *\n * The animation name is also optional and can be set later via `SpineGameObject.setAnimation`.\n *\n * Should you wish for more control over the object creation, such as setting a slot attachment or skin\n * name, then use `SpinePlugin.make` instead.\n *\n * @method SpinePlugin#add\n * @since 3.19.0\n *\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\n *\n * @return {SpineGameObject} The Game Object that was created.\n */\n\n/**\n * Creates a new Spine Game Object from the given configuration file and optionally adds it to the Scene.\n *\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\n * do not have a Phaser origin.\n *\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\n * that.\n *\n * ```javascript\n * let jelly = this.make.spine({\n * x: 500, y: 500, key: 'jelly',\n * scale: 1.5,\n * skinName: 'square_Green',\n * animationName: 'jelly-idle', loop: true,\n * slotName: 'hat', attachmentName: 'images/La_14'\n * });\n * ```\n *\n * @method SpinePlugin#make\n * @since 3.19.0\n *\n * @param {any} config - The configuration object this Game Object will use to create itself.\n * @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.\n *\n * @return {SpineGameObject} The Game Object that was created.\n */\n\nmodule.exports = SpinePlugin;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar Class = require('../../../../src/utils/Class');\nvar Container = require('../../../../src/gameobjects/container/Container');\nvar SpineContainerRender = require('./SpineContainerRender');\n\n/**\n * @classdesc\n * A Spine Container is a special kind of Container created specifically for Spine Game Objects.\n *\n * You have all of the same features of a standard Container, but the rendering functions are optimized specifically\n * for Spine Game Objects. You cannot mix and match Spine Game Objects with regular Game Objects inside of this\n * type of Container, however.\n *\n * To create one in a Scene, use the factory methods:\n *\n * ```javascript\n * this.add.spinecontainer();\n * ```\n *\n * or\n *\n * ```javascript\n * this.make.spinecontainer();\n * ```\n *\n * See the Container documentation for further details.\n *\n * @class SpineContainer\n * @extends Phaser.GameObjects.Container\n * @constructor\n * @since 3.50.0\n *\n * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to.\n * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin.\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {SpineGameObject[]} [children] - An optional array of Spine Game Objects to add to this Container.\n */\nvar SpineContainer = new Class({\n\n Extends: Container,\n\n Mixins: [\n SpineContainerRender\n ],\n\n initialize:\n\n function SpineContainer (scene, plugin, x, y, children)\n {\n Container.call(this, scene, x, y, children);\n\n // Same as SpineGameObject, to prevent the renderer from mis-typing it when batching\n this.type = 'Spine';\n\n /**\n * A reference to the Spine Plugin.\n *\n * @name SpineGameObject#plugin\n * @type {SpinePlugin}\n * @since 3.19.0\n */\n this.plugin = plugin;\n }\n\n});\n\nmodule.exports = SpineContainer;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Renders this Game Object with the Canvas Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method Phaser.GameObjects.Container#renderCanvas\n * @since 3.4.0\n * @private\n *\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar SpineContainerCanvasRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix)\n{\n var children = container.list;\n\n if (children.length === 0)\n {\n return;\n }\n\n var transformMatrix = container.localTransform;\n\n if (parentMatrix)\n {\n transformMatrix.loadIdentity();\n transformMatrix.multiply(parentMatrix);\n transformMatrix.translate(container.x, container.y);\n transformMatrix.rotate(container.rotation);\n transformMatrix.scale(container.scaleX, container.scaleY);\n }\n else\n {\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\n }\n\n var containerHasBlendMode = (container.blendMode !== -1);\n\n if (!containerHasBlendMode)\n {\n // If Container is SKIP_TEST then set blend mode to be Normal\n renderer.setBlendMode(0);\n }\n\n var alpha = container._alpha;\n var scrollFactorX = container.scrollFactorX;\n var scrollFactorY = container.scrollFactorY;\n\n if (container.mask)\n {\n container.mask.preRenderCanvas(renderer, null, camera);\n }\n\n for (var i = 0; i < children.length; i++)\n {\n var child = children[i];\n\n if (!child.willRender(camera))\n {\n continue;\n }\n\n var childAlpha = child.alpha;\n var childScrollFactorX = child.scrollFactorX;\n var childScrollFactorY = child.scrollFactorY;\n\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\n {\n // If Container doesn't have its own blend mode, then a child can have one\n renderer.setBlendMode(child.blendMode);\n }\n\n // Set parent values\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\n child.setAlpha(childAlpha * alpha);\n\n // Render\n child.renderCanvas(renderer, child, interpolationPercentage, camera, transformMatrix);\n\n // Restore original values\n child.setAlpha(childAlpha);\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\n }\n\n if (container.mask)\n {\n container.mask.postRenderCanvas(renderer);\n }\n};\n\nmodule.exports = SpineContainerCanvasRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar renderWebGL = require('../../../../src/utils/NOOP');\nvar renderCanvas = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineContainerWebGLRenderer');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineContainerCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar Clamp = require('../../../../src/math/Clamp');\nvar RadToDeg = require('../../../../src/math/RadToDeg');\nvar Wrap = require('../../../../src/math/Wrap');\n\n/**\n * Renders this Game Object with the WebGL Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method SpineContainerWebGLRenderer#renderWebGL\n * @since 3.50.0\n * @private\n *\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar SpineContainerWebGLRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix)\n{\n var plugin = container.plugin;\n var sceneRenderer = plugin.sceneRenderer;\n var children = container.list;\n\n if (children.length === 0)\n {\n if (sceneRenderer.batcher.isDrawing && renderer.finalType)\n {\n sceneRenderer.end();\n }\n\n return;\n }\n\n var transformMatrix = container.localTransform;\n\n if (parentMatrix)\n {\n transformMatrix.loadIdentity();\n transformMatrix.multiply(parentMatrix);\n transformMatrix.translate(container.x, container.y);\n transformMatrix.rotate(container.rotation);\n transformMatrix.scale(container.scaleX, container.scaleY);\n }\n else\n {\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\n }\n\n var alpha = container.alpha;\n var scrollFactorX = container.scrollFactorX;\n var scrollFactorY = container.scrollFactorY;\n\n var GameObjectRenderMask = 15;\n\n if (renderer.newType)\n {\n sceneRenderer.begin();\n }\n\n for (var i = 0; i < children.length; i++)\n {\n var src = children[i];\n\n var skeleton = src.skeleton;\n var childAlpha = skeleton.color.a;\n\n var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || childAlpha === 0);\n\n if (!skeleton || !willRender)\n {\n continue;\n }\n\n var camMatrix = renderer._tempMatrix1;\n var spriteMatrix = renderer._tempMatrix2;\n var calcMatrix = renderer._tempMatrix3;\n\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));\n\n camMatrix.copyFrom(camera.matrix);\n\n // Multiply the camera by the parent matrix\n camMatrix.multiplyWithOffset(transformMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY);\n\n // Undo the camera scroll\n spriteMatrix.e = src.x;\n spriteMatrix.f = src.y;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n\n var viewportHeight = renderer.height;\n\n skeleton.x = calcMatrix.tx;\n skeleton.y = viewportHeight - calcMatrix.ty;\n\n skeleton.scaleX = calcMatrix.scaleX;\n skeleton.scaleY = calcMatrix.scaleY;\n\n if (src.scaleX < 0)\n {\n skeleton.scaleX *= -1;\n\n src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);\n }\n else\n {\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\n }\n\n if (src.scaleY < 0)\n {\n skeleton.scaleY *= -1;\n\n if (src.scaleX < 0)\n {\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n else\n {\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n }\n\n if (camera.renderToTexture || renderer.currentFramebuffer !== null)\n {\n skeleton.y = calcMatrix.ty;\n skeleton.scaleY *= -1;\n }\n\n // Add autoUpdate option\n skeleton.updateWorldTransform();\n\n skeleton.color.a = Clamp(childAlpha * alpha, 0, 1);\n\n // Draw the current skeleton\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\n\n // Restore alpha\n skeleton.color.a = childAlpha;\n }\n\n if (!renderer.nextTypeMatch)\n {\n // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch.\n sceneRenderer.end();\n\n if (!renderer.finalType)\n {\n renderer.rebindPipeline(renderer.pipelines.MultiPipeline);\n }\n }\n};\n\nmodule.exports = SpineContainerWebGLRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Complete Event.\n *\n * @event SpinePluginEvents#COMPLETE\n * @since 3.19.0\n */\nmodule.exports = 'complete';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Dispose Event.\n *\n * @event SpinePluginEvents#DISPOSE\n * @since 3.19.0\n */\nmodule.exports = 'dispose';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The End Event.\n *\n * @event SpinePluginEvents#END\n * @since 3.19.0\n */\nmodule.exports = 'end';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Custom Event Event.\n *\n * @event SpinePluginEvents#EVENT\n * @since 3.19.0\n */\nmodule.exports = 'event';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Interrupted Event.\n *\n * @event SpinePluginEvents#INTERRUPTED\n * @since 3.19.0\n */\nmodule.exports = 'interrupted';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Start Event.\n *\n * @event SpinePluginEvents#START\n * @since 3.19.0\n */\nmodule.exports = 'start';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace SpinePluginEvents\n */\n\nmodule.exports = {\n\n COMPLETE: require('./COMPLETE_EVENT'),\n DISPOSE: require('./DISPOSE_EVENT'),\n END: require('./END_EVENT'),\n EVENT: require('./EVENT_EVENT'),\n INTERRUPTED: require('./INTERRUPTED_EVENT'),\n START: require('./START_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar AngleBetween = require('../../../../src/math/angle/Between');\nvar Clamp = require('../../../../src/math/Clamp');\nvar Class = require('../../../../src/utils/Class');\nvar ComponentsComputedSize = require('../../../../src/gameobjects/components/ComputedSize');\nvar ComponentsDepth = require('../../../../src/gameobjects/components/Depth');\nvar ComponentsFlip = require('../../../../src/gameobjects/components/Flip');\nvar ComponentsScrollFactor = require('../../../../src/gameobjects/components/ScrollFactor');\nvar ComponentsTransform = require('../../../../src/gameobjects/components/Transform');\nvar ComponentsVisible = require('../../../../src/gameobjects/components/Visible');\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar DegToRad = require('../../../../src/math/DegToRad');\nvar GameObject = require('../../../../src/gameobjects/GameObject');\nvar RadToDeg = require('../../../../src/math/RadToDeg');\nvar SpineEvents = require('../events/');\nvar SpineGameObjectRender = require('./SpineGameObjectRender');\n\n/**\n * @classdesc\n * A Spine Game Object is a Phaser level object that can be added to your Phaser Scenes. It encapsulates\n * a Spine Skeleton with Spine Animation Data and Animation State, with helper methods to allow you to\n * easily change the skin, slot attachment, bone positions and more.\n *\n * Spine Game Objects can be created via the Game Object Factory, Game Object Creator, or directly.\n * You can only create them if the Spine plugin has been loaded into Phaser.\n *\n * The quickest way is the Game Object Factory:\n *\n * ```javascript\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\n * ```\n *\n * Here we are creating a new Spine Game Object positioned at 512 x 550. It's using the `jelly`\n * Spine data, which has previously been loaded into your Scene. The `jelly-think` argument is\n * an optional animation to start playing on the skeleton. The final argument `true` sets the\n * animation to loop. Look at the documentation for further details on each of these options.\n *\n * For more control, you can use the Game Object Creator, passing in a Spine Game Object\n * Configuration object:\n *\n * ```javascript\n * let jelly = this.make.spine({\n * x: 512, y: 550, key: 'jelly',\n * scale: 1.5,\n * skinName: 'square_Green',\n * animationName: 'jelly-think', loop: true,\n * slotName: 'hat', attachmentName: 'images/La_14'\n * });\n * ```\n *\n * Here, you've got the ability to specify extra details, such as the slot name, attachments or\n * overall scale.\n *\n * If you wish to instantiate a Spine Game Object directly you can do so, but in order for it to\n * update and render, it must be added to the display and update lists of your Scene:\n *\n * ```javascript\n * let jelly = new SpineGameObject(this, this.spine, 512, 550, 'jelly', 'jelly-think', true);\n * this.sys.displayList.add(jelly);\n * this.sys.updateList.add(jelly);\n * ```\n *\n * It's possible to enable Spine Game Objects for input, but you should be aware that it will use\n * the bounds of the skeletons current pose to create the hit area from. Sometimes this is ok, but\n * often not. Make use of the `InputPlugin.enableDebug` method to view the input shape being created.\n * If it's not suitable, provide your own shape to the `setInteractive` method.\n *\n * Due to the way Spine handles scaling, it's not recommended to enable a Spine Game Object for\n * physics directly. Instead, you should look at creating a proxy body and syncing the Spine Game\n * Object position with it. See the examples for further details.\n *\n * If your Spine Game Object has black outlines around the different parts of the texture when it\n * renders then you have exported the files from Spine with pre-multiplied alpha enabled, but have\n * forgotten to set that flag when loading the Spine data. Please see the loader docs for more details.\n *\n * @class SpineGameObject\n * @constructor\n * @since 3.19.0\n *\n * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to.\n * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin.\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\n */\nvar SpineGameObject = new Class({\n\n Extends: GameObject,\n\n Mixins: [\n ComponentsComputedSize,\n ComponentsDepth,\n ComponentsFlip,\n ComponentsScrollFactor,\n ComponentsTransform,\n ComponentsVisible,\n SpineGameObjectRender\n ],\n\n initialize:\n\n function SpineGameObject (scene, plugin, x, y, key, animationName, loop)\n {\n GameObject.call(this, scene, 'Spine');\n\n /**\n * A reference to the Spine Plugin.\n *\n * @name SpineGameObject#plugin\n * @type {SpinePlugin}\n * @since 3.19.0\n */\n this.plugin = plugin;\n\n /**\n * The Spine Skeleton this Game Object is using.\n *\n * @name SpineGameObject#skeleton\n * @type {spine.Skeleton}\n * @since 3.19.0\n */\n this.skeleton = null;\n\n /**\n * The Spine Skeleton Data associated with the Skeleton this Game Object is using.\n *\n * @name SpineGameObject#skeletonData\n * @type {spine.SkeletonData}\n * @since 3.19.0\n */\n this.skeletonData = null;\n\n /**\n * The Spine Animation State this Game Object is using.\n *\n * @name SpineGameObject#state\n * @type {spine.AnimationState}\n * @since 3.19.0\n */\n this.state = null;\n\n /**\n * The Spine Animation State Data associated with the Animation State this Game Object is using.\n *\n * @name SpineGameObject#stateData\n * @type {spine.AnimationStateData}\n * @since 3.19.0\n */\n this.stateData = null;\n\n /**\n * A reference to the root bone of the Skeleton.\n *\n * @name SpineGameObject#root\n * @type {spine.Bone}\n * @since 3.19.0\n */\n this.root = null;\n\n /**\n * This object holds the calculated bounds of the current\n * pose, as set when a new Skeleton is applied.\n *\n * @name SpineGameObject#bounds\n * @type {any}\n * @since 3.19.0\n */\n this.bounds = null;\n\n /**\n * A Game Object level flag that allows you to enable debug drawing\n * to the Skeleton Debug Renderer by toggling it.\n *\n * @name SpineGameObject#drawDebug\n * @type {boolean}\n * @since 3.19.0\n */\n this.drawDebug = false;\n\n /**\n * The factor to scale the Animation update time by.\n *\n * @name SpineGameObject#timeScale\n * @type {number}\n * @since 3.19.0\n */\n this.timeScale = 1;\n\n /**\n * The calculated Display Origin of this Game Object.\n *\n * @name SpineGameObject#displayOriginX\n * @type {number}\n * @since 3.19.0\n */\n this.displayOriginX = 0;\n\n /**\n * The calculated Display Origin of this Game Object.\n *\n * @name SpineGameObject#displayOriginY\n * @type {number}\n * @since 3.19.0\n */\n this.displayOriginY = 0;\n\n /**\n * A flag that stores if the texture associated with the current\n * Skin being used by this Game Object, has its alpha pre-multiplied\n * into it, or not.\n *\n * @name SpineGameObject#preMultipliedAlpha\n * @type {boolean}\n * @since 3.19.0\n */\n this.preMultipliedAlpha = false;\n\n /**\n * A default Blend Mode. You cannot change the blend mode of a\n * Spine Game Object.\n *\n * @name SpineGameObject#blendMode\n * @type {number}\n * @readonly\n * @since 3.19.0\n */\n this.blendMode = -1;\n\n this.setPosition(x, y);\n\n if (key)\n {\n this.setSkeleton(key, animationName, loop);\n }\n },\n\n /**\n * Overrides the default Game Object method and always returns true.\n * Rendering is decided in the renderer functions.\n *\n * @method SpineGameObject#willRender\n * @since 3.19.0\n *\n * @return {boolean} Always returns `true`.\n */\n willRender: function ()\n {\n return true;\n },\n\n /**\n * Set the Alpha level for the whole Skeleton of this Game Object.\n *\n * The alpha controls the opacity of the Game Object as it renders.\n *\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\n *\n * @method SpineGameObject#setAlpha\n * @since 3.19.0\n *\n * @param {number} [value=1] - The alpha value used for the whole Skeleton.\n *\n * @return {this} This Game Object instance.\n */\n setAlpha: function (value, slotName)\n {\n if (value === undefined) { value = 1; }\n\n if (slotName)\n {\n var slot = this.findSlot(slotName);\n\n if (slot)\n {\n slot.color.a = Clamp(value, 0, 1);\n }\n }\n else\n {\n this.alpha = value;\n }\n\n return this;\n },\n\n /**\n * The alpha value of the Skeleton.\n *\n * A value between 0 and 1.\n *\n * This is a global value, impacting the entire Skeleton, not just a region of it.\n *\n * @name SpineGameObject#alpha\n * @type {number}\n * @since 3.19.0\n */\n alpha: {\n\n get: function ()\n {\n return this.skeleton.color.a;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n if (this.skeleton)\n {\n this.skeleton.color.a = v;\n }\n\n if (v === 0)\n {\n this.renderFlags &= ~2;\n }\n else\n {\n this.renderFlags |= 2;\n }\n }\n\n },\n\n /**\n * The amount of red used when rendering the Skeleton.\n *\n * A value between 0 and 1.\n *\n * This is a global value, impacting the entire Skeleton, not just a region of it.\n *\n * @name SpineGameObject#red\n * @type {number}\n * @since 3.19.0\n */\n red: {\n\n get: function ()\n {\n return this.skeleton.color.r;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n if (this.skeleton)\n {\n this.skeleton.color.r = v;\n }\n }\n\n },\n\n /**\n * The amount of green used when rendering the Skeleton.\n *\n * A value between 0 and 1.\n *\n * This is a global value, impacting the entire Skeleton, not just a region of it.\n *\n * @name SpineGameObject#green\n * @type {number}\n * @since 3.19.0\n */\n green: {\n\n get: function ()\n {\n return this.skeleton.color.g;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n if (this.skeleton)\n {\n this.skeleton.color.g = v;\n }\n }\n\n },\n\n /**\n * The amount of blue used when rendering the Skeleton.\n *\n * A value between 0 and 1.\n *\n * This is a global value, impacting the entire Skeleton, not just a region of it.\n *\n * @name SpineGameObject#blue\n * @type {number}\n * @since 3.19.0\n */\n blue: {\n\n get: function ()\n {\n return this.skeleton.color.b;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n if (this.skeleton)\n {\n this.skeleton.color.b = v;\n }\n }\n\n },\n\n /**\n * Sets the color on the given attachment slot. Or, if no slot is given, on the whole skeleton.\n *\n * @method SpineGameObject#setColor\n * @since 3.19.0\n *\n * @param {integer} [color=0xffffff] - The color being applied to the Skeleton or named Slot. Set to white to disable any previously set color.\n * @param {string} [slotName] - The name of the slot to set the color on. If not give, will be set on the whole skeleton.\n *\n * @return {this} This Game Object instance.\n */\n setColor: function (color, slotName)\n {\n if (color === undefined) { color = 0xffffff; }\n\n var red = (color >> 16 & 0xFF) / 255;\n var green = (color >> 8 & 0xFF) / 255;\n var blue = (color & 0xFF) / 255;\n var alpha = (color > 16777215) ? (color >>> 24) / 255 : null;\n\n var target = this.skeleton;\n\n if (slotName)\n {\n var slot = this.findSlot(slotName);\n\n if (slot)\n {\n target = slot;\n }\n }\n\n target.color.r = red;\n target.color.g = green;\n target.color.b = blue;\n\n if (alpha !== null)\n {\n target.color.a = alpha;\n }\n\n return this;\n },\n\n /**\n * Sets this Game Object to use the given Skeleton based on the Atlas Data Key and a provided JSON object\n * that contains the Skeleton data.\n *\n * @method SpineGameObject#setSkeletonFromJSON\n * @since 3.19.0\n *\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\n * @param {object} skeletonJSON - The JSON data for the Skeleton.\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\n *\n * @return {this} This Game Object.\n */\n setSkeletonFromJSON: function (atlasDataKey, skeletonJSON, animationName, loop)\n {\n return this.setSkeleton(atlasDataKey, skeletonJSON, animationName, loop);\n },\n\n /**\n * Sets this Game Object to use the given Skeleton based on its cache key.\n *\n * Typically, once set, the Skeleton doesn't change. Instead, you change the skin,\n * or slot attachment, or any other property to adjust it.\n *\n * @method SpineGameObject#setSkeleton\n * @since 3.19.0\n *\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\n * @param {object} skeletonJSON - The JSON data for the Skeleton.\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\n *\n * @return {this} This Game Object.\n */\n setSkeleton: function (atlasDataKey, animationName, loop, skeletonJSON)\n {\n if (this.state)\n {\n this.state.clearListeners();\n this.state.clearListenerNotifications();\n }\n\n var data = this.plugin.createSkeleton(atlasDataKey, skeletonJSON);\n\n this.skeletonData = data.skeletonData;\n\n this.preMultipliedAlpha = data.preMultipliedAlpha;\n\n var skeleton = data.skeleton;\n\n skeleton.setSkin();\n skeleton.setToSetupPose();\n\n this.skeleton = skeleton;\n\n // AnimationState\n data = this.plugin.createAnimationState(skeleton);\n\n if (this.state)\n {\n this.state.clearListeners();\n this.state.clearListenerNotifications();\n }\n\n this.state = data.state;\n this.stateData = data.stateData;\n\n this.state.addListener({\n event: this.onEvent.bind(this),\n complete: this.onComplete.bind(this),\n start: this.onStart.bind(this),\n end: this.onEnd.bind(this),\n dispose: this.onDispose.bind(this),\n interrupted: this.onInterrupted.bind(this)\n });\n\n if (animationName)\n {\n this.setAnimation(0, animationName, loop);\n }\n\n this.root = this.getRootBone();\n\n if (this.root)\n {\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\n }\n\n this.state.apply(skeleton);\n\n skeleton.updateCache();\n\n return this.updateSize();\n },\n\n /**\n * Internal event handler that emits the Spine onComplete event via this Game Object.\n *\n * @method SpineGameObject#onComplete\n * @fires SpinePluginEvents#COMPLETE\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n */\n onComplete: function (entry)\n {\n this.emit(SpineEvents.COMPLETE, entry);\n },\n\n /**\n * Internal event handler that emits the Spine onDispose event via this Game Object.\n *\n * @method SpineGameObject#onDispose\n * @fires SpinePluginEvents#DISPOSE\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n */\n onDispose: function (entry)\n {\n this.emit(SpineEvents.DISPOSE, entry);\n },\n\n /**\n * Internal event handler that emits the Spine onEnd event via this Game Object.\n *\n * @method SpineGameObject#onEnd\n * @fires SpinePluginEvents#END\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n */\n onEnd: function (entry)\n {\n this.emit(SpineEvents.END, entry);\n },\n\n /**\n * Internal event handler that emits the Spine Event event via this Game Object.\n *\n * @method SpineGameObject#onEvent\n * @fires SpinePluginEvents#EVENT\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n * @param {spine.Event} event - The Spine event.\n */\n onEvent: function (entry, event)\n {\n this.emit(SpineEvents.EVENT, entry, event);\n },\n\n /**\n * Internal event handler that emits the Spine onInterrupted event via this Game Object.\n *\n * @method SpineGameObject#onInterrupted\n * @fires SpinePluginEvents#INTERRUPTED\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n */\n onInterrupted: function (entry)\n {\n this.emit(SpineEvents.INTERRUPTED, entry);\n },\n\n /**\n * Internal event handler that emits the Spine onStart event via this Game Object.\n *\n * @method SpineGameObject#onStart\n * @fires SpinePluginEvents#START\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n */\n onStart: function (entry)\n {\n this.emit(SpineEvents.START, entry);\n },\n\n /**\n * Refreshes the data about the current Skeleton.\n *\n * This will reset the rotation, position and size of the Skeleton to match this Game Object.\n *\n * Call this method if you need to access the Skeleton data directly, and it may have changed\n * recently.\n *\n * @method SpineGameObject#refresh\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n refresh: function ()\n {\n if (this.root)\n {\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\n }\n\n this.updateSize();\n\n this.skeleton.updateCache();\n\n return this;\n },\n\n /**\n * Sets the size of this Game Object.\n *\n * If no arguments are given it uses the current skeleton data dimensions.\n *\n * You can use this method to set a fixed size of this Game Object, such as for input detection,\n * when the skeleton data doesn't match what is required in-game.\n *\n * @method SpineGameObject#setSize\n * @since 3.19.0\n *\n * @param {number} [width] - The width of the Skeleton. If not given it defaults to the Skeleton Data width.\n * @param {number} [height] - The height of the Skeleton. If not given it defaults to the Skeleton Data height.\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\n *\n * @return {this} This Game Object.\n */\n setSize: function (width, height, offsetX, offsetY)\n {\n var skeleton = this.skeleton;\n\n if (width === undefined) { width = skeleton.data.width; }\n if (height === undefined) { height = skeleton.data.height; }\n if (offsetX === undefined) { offsetX = 0; }\n if (offsetY === undefined) { offsetY = 0; }\n\n this.width = width;\n this.height = height;\n\n this.displayOriginX = skeleton.x - offsetX;\n this.displayOriginY = skeleton.y - offsetY;\n\n return this;\n },\n\n /**\n * Sets the offset of this Game Object from the Skeleton position.\n *\n * You can use this method to adjust how the position of this Game Object relates to the Skeleton it is using.\n *\n * @method SpineGameObject#setOffset\n * @since 3.19.0\n *\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\n *\n * @return {this} This Game Object.\n */\n setOffset: function (offsetX, offsetY)\n {\n var skeleton = this.skeleton;\n\n if (offsetX === undefined) { offsetX = 0; }\n if (offsetY === undefined) { offsetY = 0; }\n\n this.displayOriginX = skeleton.x - offsetX;\n this.displayOriginY = skeleton.y - offsetY;\n\n return this;\n },\n\n /**\n * Internal method that syncs all of the Game Object position and scale data to the Skeleton.\n * It then syncs the skeleton bounds back to this Game Object.\n *\n * This method is called automatically as needed internally, however, it's also exposed should\n * you require overriding the size settings.\n *\n * @method SpineGameObject#updateSize\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n updateSize: function ()\n {\n var skeleton = this.skeleton;\n var renderer = this.plugin.renderer;\n\n var height = renderer.height;\n\n var oldScaleX = this.scaleX;\n var oldScaleY = this.scaleY;\n\n skeleton.x = this.x;\n skeleton.y = height - this.y;\n skeleton.scaleX = 1;\n skeleton.scaleY = 1;\n\n skeleton.updateWorldTransform();\n\n var bounds = this.getBounds();\n\n this.width = bounds.size.x;\n this.height = bounds.size.y;\n\n this.displayOriginX = this.x - bounds.offset.x;\n this.displayOriginY = this.y - (height - (this.height + bounds.offset.y));\n\n skeleton.scaleX = oldScaleX;\n skeleton.scaleY = oldScaleY;\n\n skeleton.updateWorldTransform();\n\n return this;\n },\n\n /**\n * The horizontal scale of this Game Object, as applied to the Skeleton it is using.\n *\n * @name SpineGameObject#scaleX\n * @type {number}\n * @default 1\n * @since 3.19.0\n */\n scaleX: {\n\n get: function ()\n {\n return this._scaleX;\n },\n\n set: function (value)\n {\n this._scaleX = value;\n\n this.refresh();\n }\n\n },\n\n /**\n * The vertical scale of this Game Object, as applied to the Skeleton it is using.\n *\n * @name SpineGameObject#scaleY\n * @type {number}\n * @default 1\n * @since 3.19.0\n */\n scaleY: {\n\n get: function ()\n {\n return this._scaleY;\n },\n\n set: function (value)\n {\n this._scaleY = value;\n\n this.refresh();\n }\n\n },\n\n /**\n * Returns an array containing the names of all the bones in the Skeleton Data.\n *\n * @method SpineGameObject#getBoneList\n * @since 3.19.0\n *\n * @return {string[]} An array containing the names of all the bones in the Skeleton Data.\n */\n getBoneList: function ()\n {\n var output = [];\n\n var skeletonData = this.skeletonData;\n\n if (skeletonData)\n {\n for (var i = 0; i < skeletonData.bones.length; i++)\n {\n output.push(skeletonData.bones[i].name);\n }\n }\n\n return output;\n },\n\n /**\n * Returns an array containing the names of all the skins in the Skeleton Data.\n *\n * @method SpineGameObject#getSkinList\n * @since 3.19.0\n *\n * @return {string[]} An array containing the names of all the skins in the Skeleton Data.\n */\n getSkinList: function ()\n {\n var output = [];\n\n var skeletonData = this.skeletonData;\n\n if (skeletonData)\n {\n for (var i = 0; i < skeletonData.skins.length; i++)\n {\n output.push(skeletonData.skins[i].name);\n }\n }\n\n return output;\n },\n\n /**\n * Returns an array containing the names of all the slots in the Skeleton.\n *\n * @method SpineGameObject#getSlotList\n * @since 3.19.0\n *\n * @return {string[]} An array containing the names of all the slots in the Skeleton.\n */\n getSlotList: function ()\n {\n var output = [];\n\n var skeleton = this.skeleton;\n\n for (var i = 0; i < skeleton.slots.length; i++)\n {\n output.push(skeleton.slots[i].data.name);\n }\n\n return output;\n },\n\n /**\n * Returns an array containing the names of all the animations in the Skeleton Data.\n *\n * @method SpineGameObject#getAnimationList\n * @since 3.19.0\n *\n * @return {string[]} An array containing the names of all the animations in the Skeleton Data.\n */\n getAnimationList: function ()\n {\n var output = [];\n\n var skeletonData = this.skeletonData;\n\n if (skeletonData)\n {\n for (var i = 0; i < skeletonData.animations.length; i++)\n {\n output.push(skeletonData.animations[i].name);\n }\n }\n\n return output;\n },\n\n /**\n * Returns the current animation being played on the given track, if any.\n *\n * @method SpineGameObject#getCurrentAnimation\n * @since 3.19.0\n *\n * @param {integer} [trackIndex=0] - The track to return the current animation on.\n *\n * @return {?spine.Animation} The current Animation on the given track, or `undefined` if there is no current animation.\n */\n getCurrentAnimation: function (trackIndex)\n {\n if (trackIndex === undefined) { trackIndex = 0; }\n\n var current = this.state.getCurrent(trackIndex);\n\n if (current)\n {\n return current.animation;\n }\n },\n\n /**\n * Sets the current animation for a track, discarding any queued animations.\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\n *\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\n *\n * @method SpineGameObject#play\n * @fires SpinePluginEvents#START\n * @since 3.19.0\n *\n * @param {string} animationName - The string-based key of the animation to play.\n * @param {boolean} [loop=false] - Should the animation be looped when played?\n * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call.\n *\n * @return {this} This Game Object. If you need the TrackEntry, see `setAnimation` instead.\n */\n play: function (animationName, loop, ignoreIfPlaying)\n {\n this.setAnimation(0, animationName, loop, ignoreIfPlaying);\n\n return this;\n },\n\n /**\n * Sets the current animation for a track, discarding any queued animations.\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\n *\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\n *\n * @method SpineGameObject#setAnimation\n * @fires SpinePluginEvents#START\n * @since 3.19.0\n *\n * @param {integer} trackIndex - The track index to play the animation on.\n * @param {string} animationName - The string-based key of the animation to play.\n * @param {boolean} [loop=false] - Should the animation be looped when played?\n * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call.\n *\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\n */\n setAnimation: function (trackIndex, animationName, loop, ignoreIfPlaying)\n {\n if (loop === undefined) { loop = false; }\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\n\n if (ignoreIfPlaying && this.state)\n {\n var currentTrack = this.state.getCurrent(0);\n\n if (currentTrack && currentTrack.animation.name === animationName && !currentTrack.isComplete())\n {\n return;\n }\n }\n\n if (this.findAnimation(animationName))\n {\n return this.state.setAnimation(trackIndex, animationName, loop);\n }\n },\n\n /**\n * Adds an animation to be played after the current or last queued animation for a track.\n * If the track is empty, it is equivalent to calling setAnimation.\n *\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\n *\n * The delay is a float. If > 0, sets delay. If <= 0, the delay set is the duration of the previous\n * track entry minus any mix duration (from the AnimationStateData) plus the specified delay\n * (ie the mix ends at (delay = 0) or before (delay < 0) the previous track entry duration).\n * If the previous entry is looping, its next loop completion is used instead of its duration.\n *\n * @method SpineGameObject#addAnimation\n * @since 3.19.0\n *\n * @param {integer} trackIndex - The track index to add the animation to.\n * @param {string} animationName - The string-based key of the animation to add.\n * @param {boolean} [loop=false] - Should the animation be looped when played?\n * @param {integer} [delay=0] - A delay, in ms, before which this animation will start when played.\n *\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\n */\n addAnimation: function (trackIndex, animationName, loop, delay)\n {\n return this.state.addAnimation(trackIndex, animationName, loop, delay);\n },\n\n /**\n * Sets an empty animation for a track, discarding any queued animations, and sets the track\n * entry's mixDuration. An empty animation has no timelines and serves as a placeholder for mixing in or out.\n *\n * Mixing out is done by setting an empty animation with a mix duration using either setEmptyAnimation,\n * setEmptyAnimations, or addEmptyAnimation. Mixing to an empty animation causes the previous animation to be\n * applied less and less over the mix duration. Properties keyed in the previous animation transition to\n * the value from lower tracks or to the setup pose value if no lower tracks key the property.\n * A mix duration of 0 still mixes out over one frame.\n *\n * Mixing in is done by first setting an empty animation, then adding an animation using addAnimation\n * and on the returned track entry, set the mixDuration. Mixing from an empty animation causes the new\n * animation to be applied more and more over the mix duration. Properties keyed in the new animation\n * transition from the value from lower tracks or from the setup pose value if no lower tracks key the\n * property to the value keyed in the new animation.\n *\n * @method SpineGameObject#setEmptyAnimation\n * @since 3.19.0\n *\n * @param {integer} trackIndex - The track index to add the animation to.\n * @param {integer} [mixDuration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\n *\n * @return {spine.TrackEntry} The returned Track Entry.\n */\n setEmptyAnimation: function (trackIndex, mixDuration)\n {\n return this.state.setEmptyAnimation(trackIndex, mixDuration);\n },\n\n /**\n * Removes all animations from the track, leaving skeletons in their current pose.\n *\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\n * rather than leaving them in their current pose.\n *\n * @method SpineGameObject#clearTrack\n * @since 3.19.0\n *\n * @param {integer} trackIndex - The track index to add the animation to.\n *\n * @return {this} This Game Object.\n */\n clearTrack: function (trackIndex)\n {\n this.state.clearTrack(trackIndex);\n\n return this;\n },\n\n /**\n * Removes all animations from all tracks, leaving skeletons in their current pose.\n *\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\n * rather than leaving them in their current pose.\n *\n * @method SpineGameObject#clearTracks\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n clearTracks: function ()\n {\n this.state.clearTracks();\n\n return this;\n },\n\n /**\n * Sets the skin used to look up attachments before looking in the defaultSkin.\n *\n * Attachments from the new skin are attached if the corresponding attachment from the\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\n * attached from the new skin.\n *\n * After changing the skin, the visible attachments can be reset to those attached in the\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\n * or show attachments from the new skin.\n *\n * @method SpineGameObject#setSkinByName\n * @since 3.19.0\n *\n * @param {string} skinName - The name of the skin to set.\n *\n * @return {this} This Game Object.\n */\n setSkinByName: function (skinName)\n {\n var skeleton = this.skeleton;\n\n skeleton.setSkinByName(skinName);\n\n skeleton.setSlotsToSetupPose();\n\n this.state.apply(skeleton);\n\n return this;\n },\n\n /**\n * Sets the skin used to look up attachments before looking in the defaultSkin.\n *\n * Attachments from the new skin are attached if the corresponding attachment from the\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\n * attached from the new skin.\n *\n * After changing the skin, the visible attachments can be reset to those attached in the\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\n * or show attachments from the new skin.\n *\n * @method SpineGameObject#setSkin\n * @since 3.19.0\n *\n * @param {?spine.Skin} newSkin - The Skin to set. May be `null`.\n *\n * @return {this} This Game Object.\n */\n setSkin: function (newSkin)\n {\n var skeleton = this.skeleton;\n\n skeleton.setSkin(newSkin);\n\n skeleton.setSlotsToSetupPose();\n\n this.state.apply(skeleton);\n\n return this;\n },\n\n /**\n * Sets the mix duration when changing from the specified animation to the other.\n *\n * @method SpineGameObject#setMix\n * @since 3.19.0\n *\n * @param {string} fromName - The animation to mix from.\n * @param {string} toName - The animation to mix to.\n * @param {number} [duration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\n *\n * @return {this} This Game Object.\n */\n setMix: function (fromName, toName, duration)\n {\n this.stateData.setMix(fromName, toName, duration);\n\n return this;\n },\n\n /**\n * Finds an attachment by looking in the skin and defaultSkin using the slot\n * index and attachment name. First the skin is checked and if the attachment was not found,\n * the default skin is checked.\n *\n * @method SpineGameObject#getAttachment\n * @since 3.19.0\n *\n * @param {integer} slotIndex - The slot index to search.\n * @param {string} attachmentName - The attachment name to look for.\n *\n * @return {?spine.Attachment} The Attachment, if found. May be null.\n */\n getAttachment: function (slotIndex, attachmentName)\n {\n return this.skeleton.getAttachment(slotIndex, attachmentName);\n },\n\n /**\n * Finds an attachment by looking in the skin and defaultSkin using the slot name and attachment name.\n *\n * @method SpineGameObject#getAttachmentByName\n * @since 3.19.0\n *\n * @param {string} slotName - The slot name to search.\n * @param {string} attachmentName - The attachment name to look for.\n *\n * @return {?spine.Attachment} The Attachment, if found. May be null.\n */\n getAttachmentByName: function (slotName, attachmentName)\n {\n return this.skeleton.getAttachmentByName(slotName, attachmentName);\n },\n\n /**\n * A convenience method to set an attachment by finding the slot with findSlot,\n * finding the attachment with getAttachment, then setting the slot's attachment.\n *\n * @method SpineGameObject#setAttachment\n * @since 3.19.0\n *\n * @param {string} slotName - The slot name to add the attachment to.\n * @param {string} attachmentName - The attachment name to add.\n *\n * @return {this} This Game Object.\n */\n setAttachment: function (slotName, attachmentName)\n {\n if (Array.isArray(slotName) && Array.isArray(attachmentName) && slotName.length === attachmentName.length)\n {\n for (var i = 0; i < slotName.length; i++)\n {\n this.skeleton.setAttachment(slotName[i], attachmentName[i]);\n }\n }\n else\n {\n this.skeleton.setAttachment(slotName, attachmentName);\n }\n\n return this;\n },\n\n /**\n * Sets the bones, constraints, slots, and draw order to their setup pose values.\n *\n * @method SpineGameObject#setToSetupPose\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n setToSetupPose: function ()\n {\n this.skeleton.setToSetupPose();\n\n return this;\n },\n\n /**\n * Sets the slots and draw order to their setup pose values.\n *\n * @method SpineGameObject#setSlotsToSetupPose\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n setSlotsToSetupPose: function ()\n {\n this.skeleton.setSlotsToSetupPose();\n\n return this;\n },\n\n /**\n * Sets the bones and constraints to their setup pose values.\n *\n * @method SpineGameObject#setBonesToSetupPose\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n setBonesToSetupPose: function ()\n {\n this.skeleton.setBonesToSetupPose();\n\n return this;\n },\n\n /**\n * Gets the root bone, or null.\n *\n * @method SpineGameObject#getRootBone\n * @since 3.19.0\n *\n * @return {spine.Bone} The root bone, or null.\n */\n getRootBone: function ()\n {\n return this.skeleton.getRootBone();\n },\n\n /**\n * Takes a Bone object and a position in world space and rotates the Bone so it is angled\n * towards the given position. You can set an optional angle offset, should the bone be\n * designed at a specific angle already. You can also set a minimum and maximum range for the angle.\n *\n * @method SpineGameObject#angleBoneToXY\n * @since 3.19.0\n *\n * @param {spine.Bone} bone - The bone to rotate towards the world position.\n * @param {number} worldX - The world x coordinate to rotate the bone towards.\n * @param {number} worldY - The world y coordinate to rotate the bone towards.\n * @param {number} [offset=0] - An offset to add to the rotation angle.\n * @param {number} [minAngle=0] - The minimum range of the rotation angle.\n * @param {number} [maxAngle=360] - The maximum range of the rotation angle.\n *\n * @return {this} This Game Object.\n */\n angleBoneToXY: function (bone, worldX, worldY, offset, minAngle, maxAngle)\n {\n if (offset === undefined) { offset = 0; }\n if (minAngle === undefined) { minAngle = 0; }\n if (maxAngle === undefined) { maxAngle = 360; }\n\n var renderer = this.plugin.renderer;\n var height = renderer.height;\n\n var angle = CounterClockwise(AngleBetween(bone.worldX, height - bone.worldY, worldX, worldY) + DegToRad(offset));\n\n bone.rotation = Clamp(RadToDeg(angle), minAngle, maxAngle);\n\n return this;\n },\n\n /**\n * Finds a bone by comparing each bone's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findBone\n * @since 3.19.0\n *\n * @param {string} boneName - The name of the bone to find.\n *\n * @return {spine.Bone} The bone, or null.\n */\n findBone: function (boneName)\n {\n return this.skeleton.findBone(boneName);\n },\n\n /**\n * Finds the index of a bone by comparing each bone's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findBoneIndex\n * @since 3.19.0\n *\n * @param {string} boneName - The name of the bone to find.\n *\n * @return {integer} The bone index. Or -1 if the bone was not found.\n */\n findBoneIndex: function (boneName)\n {\n return this.skeleton.findBoneIndex(boneName);\n },\n\n /**\n * Finds a slot by comparing each slot's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findSlot\n * @since 3.19.0\n *\n * @param {string} slotName - The name of the slot to find.\n *\n * @return {spine.Slot} The Slot. May be null.\n */\n findSlot: function (slotName)\n {\n return this.skeleton.findSlot(slotName);\n },\n\n /**\n * Finds the index of a slot by comparing each slot's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findSlotIndex\n * @since 3.19.0\n *\n * @param {string} slotName - The name of the slot to find.\n *\n * @return {integer} The slot index. Or -1 if the Slot was not found.\n */\n findSlotIndex: function (slotName)\n {\n return this.skeleton.findSlotIndex(slotName);\n },\n\n /**\n * Finds a skin by comparing each skin's name. It is more efficient to cache the results of\n * this method than to call it multiple times.\n *\n * @method SpineGameObject#findSkin\n * @since 3.19.0\n *\n * @param {string} skinName - The name of the skin to find.\n *\n * @return {spine.Skin} The Skin. May be null.\n */\n findSkin: function (skinName)\n {\n return this.skeletonData.findSkin(skinName);\n },\n\n /**\n * Finds an event by comparing each events's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findEvent\n * @since 3.19.0\n *\n * @param {string} eventDataName - The name of the event to find.\n *\n * @return {spine.EventData} The Event Data. May be null.\n */\n findEvent: function (eventDataName)\n {\n return this.skeletonData.findEvent(eventDataName);\n },\n\n /**\n * Finds an animation by comparing each animation's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findAnimation\n * @since 3.19.0\n *\n * @param {string} animationName - The name of the animation to find.\n *\n * @return {spine.Animation} The Animation. May be null.\n */\n findAnimation: function (animationName)\n {\n return this.skeletonData.findAnimation(animationName);\n },\n\n /**\n * Finds an IK constraint by comparing each IK constraint's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findIkConstraint\n * @since 3.19.0\n *\n * @param {string} constraintName - The name of the constraint to find.\n *\n * @return {spine.IkConstraintData} The IK constraint. May be null.\n */\n findIkConstraint: function (constraintName)\n {\n return this.skeletonData.findIkConstraint(constraintName);\n },\n\n /**\n * Finds an transform constraint by comparing each transform constraint's name.\n * It is more efficient to cache the results of this method than to call it multiple times.\n *\n * @method SpineGameObject#findTransformConstraint\n * @since 3.19.0\n *\n * @param {string} constraintName - The name of the constraint to find.\n *\n * @return {spine.TransformConstraintData} The transform constraint. May be null.\n */\n findTransformConstraint: function (constraintName)\n {\n return this.skeletonData.findTransformConstraint(constraintName);\n },\n\n /**\n * Finds a path constraint by comparing each path constraint's name.\n * It is more efficient to cache the results of this method than to call it multiple times.\n *\n * @method SpineGameObject#findPathConstraint\n * @since 3.19.0\n *\n * @param {string} constraintName - The name of the constraint to find.\n *\n * @return {spine.PathConstraintData} The path constraint. May be null.\n */\n findPathConstraint: function (constraintName)\n {\n return this.skeletonData.findPathConstraint(constraintName);\n },\n\n /**\n * Finds the index of a path constraint by comparing each path constraint's name.\n * It is more efficient to cache the results of this method than to call it multiple times.\n *\n * @method SpineGameObject#findPathConstraintIndex\n * @since 3.19.0\n *\n * @param {string} constraintName - The name of the constraint to find.\n *\n * @return {integer} The constraint index. Or -1 if the constraint was not found.\n */\n findPathConstraintIndex: function (constraintName)\n {\n return this.skeletonData.findPathConstraintIndex(constraintName);\n },\n\n /**\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\n *\n * The returned object contains two properties: `offset` and `size`:\n *\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\n * `size` - The width and height of the AABB.\n *\n * @method SpineGameObject#getBounds\n * @since 3.19.0\n *\n * @return {any} The bounds object.\n */\n getBounds: function ()\n {\n return this.plugin.getBounds(this.skeleton);\n },\n\n /**\n * Internal update handler.\n *\n * @method SpineGameObject#preUpdate\n * @protected\n * @since 3.19.0\n *\n * @param {number} time - The current timestamp.\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\n */\n preUpdate: function (time, delta)\n {\n var skeleton = this.skeleton;\n\n this.state.update((delta / 1000) * this.timeScale);\n\n this.state.apply(skeleton);\n },\n\n /**\n * Internal destroy handler, called as part of the destroy process.\n *\n * @method SpineGameObject#preDestroy\n * @protected\n * @since 3.19.0\n */\n preDestroy: function ()\n {\n if (this.state)\n {\n this.state.clearListeners();\n this.state.clearListenerNotifications();\n }\n\n this.plugin = null;\n\n this.skeleton = null;\n this.skeletonData = null;\n\n this.state = null;\n this.stateData = null;\n }\n\n});\n\nmodule.exports = SpineGameObject;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar RadToDeg = require('../../../../src/math/RadToDeg');\nvar Wrap = require('../../../../src/math/Wrap');\n\n/**\n * Renders this Game Object with the Canvas Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method SpineGameObject#renderCanvas\n * @since 3.19.0\n * @private\n *\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar SpineGameObjectCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\n{\n var context = renderer.currentContext;\n\n var plugin = src.plugin;\n var skeleton = src.skeleton;\n var skeletonRenderer = plugin.skeletonRenderer;\n\n var GameObjectRenderMask = 15;\n\n var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)));\n\n if (!skeleton || !willRender)\n {\n return;\n }\n\n var camMatrix = renderer._tempMatrix1;\n var spriteMatrix = renderer._tempMatrix2;\n var calcMatrix = renderer._tempMatrix3;\n\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));\n\n camMatrix.copyFrom(camera.matrix);\n\n if (parentMatrix)\n {\n // Multiply the camera by the parent matrix\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\n\n // Undo the camera scroll\n spriteMatrix.e = src.x;\n spriteMatrix.f = src.y;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n }\n else\n {\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n }\n\n skeleton.x = calcMatrix.tx;\n skeleton.y = calcMatrix.ty;\n\n skeleton.scaleX = calcMatrix.scaleX;\n\n // Inverse or we get upside-down skeletons\n skeleton.scaleY = calcMatrix.scaleY * -1;\n\n if (src.scaleX < 0)\n {\n skeleton.scaleX *= -1;\n\n src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);\n }\n else\n {\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\n }\n\n if (src.scaleY < 0)\n {\n skeleton.scaleY *= -1;\n\n if (src.scaleX < 0)\n {\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n else\n {\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n }\n\n if (camera.renderToTexture)\n {\n skeleton.y = calcMatrix.ty;\n skeleton.scaleY *= -1;\n }\n\n // Add autoUpdate option\n skeleton.updateWorldTransform();\n\n skeletonRenderer.ctx = context;\n skeletonRenderer.debugRendering = (plugin.drawDebug || src.drawDebug);\n\n context.save();\n\n skeletonRenderer.draw(skeleton);\n\n context.restore();\n};\n\nmodule.exports = SpineGameObjectCanvasRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar renderWebGL = require('../../../../src/utils/NOOP');\nvar renderCanvas = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineGameObjectWebGLRenderer');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineGameObjectCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar RadToDeg = require('../../../../src/math/RadToDeg');\nvar Wrap = require('../../../../src/math/Wrap');\n\n/**\n * Renders this Game Object with the WebGL Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method SpineGameObject#renderWebGL\n * @since 3.19.0\n * @private\n *\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\n{\n var plugin = src.plugin;\n var skeleton = src.skeleton;\n var childAlpha = skeleton.color.a;\n var sceneRenderer = plugin.sceneRenderer;\n\n var GameObjectRenderMask = 15;\n\n var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || childAlpha === 0);\n\n if (!skeleton || !willRender)\n {\n // If there is already a batch running, we need to close it\n if (!renderer.nextTypeMatch)\n {\n // The next object in the display list is not a Spine object, so we end the batch\n sceneRenderer.end();\n\n if (!renderer.finalType)\n {\n // Reset the current type\n renderer.currentType = '';\n\n renderer.rebindPipeline(renderer.pipelines.MultiPipeline);\n }\n }\n\n return;\n }\n\n if (renderer.newType)\n {\n renderer.clearPipeline();\n }\n\n var camMatrix = renderer._tempMatrix1;\n var spriteMatrix = renderer._tempMatrix2;\n var calcMatrix = renderer._tempMatrix3;\n\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));\n\n camMatrix.copyFrom(camera.matrix);\n\n if (parentMatrix)\n {\n // Multiply the camera by the parent matrix\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\n\n // Undo the camera scroll\n spriteMatrix.e = src.x;\n spriteMatrix.f = src.y;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n }\n else\n {\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n }\n\n var viewportHeight = renderer.height;\n\n skeleton.x = calcMatrix.tx;\n skeleton.y = viewportHeight - calcMatrix.ty;\n\n skeleton.scaleX = calcMatrix.scaleX;\n skeleton.scaleY = calcMatrix.scaleY;\n\n if (src.scaleX < 0)\n {\n skeleton.scaleX *= -1;\n\n src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);\n }\n else\n {\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\n }\n\n if (src.scaleY < 0)\n {\n skeleton.scaleY *= -1;\n\n if (src.scaleX < 0)\n {\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n else\n {\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n }\n\n if (camera.renderToTexture || renderer.currentFramebuffer !== null)\n {\n skeleton.y = calcMatrix.ty;\n skeleton.scaleY *= -1;\n }\n\n // Add autoUpdate option\n skeleton.updateWorldTransform();\n\n if (renderer.newType)\n {\n sceneRenderer.begin();\n }\n\n // Draw the current skeleton\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\n\n if (plugin.drawDebug || src.drawDebug)\n {\n // Because if we don't, the bones render positions are completely wrong (*sigh*)\n var oldX = skeleton.x;\n var oldY = skeleton.y;\n\n skeleton.x = 0;\n skeleton.y = 0;\n\n sceneRenderer.drawSkeletonDebug(skeleton, src.preMultipliedAlpha);\n\n skeleton.x = oldX;\n skeleton.y = oldY;\n }\n\n if (!renderer.nextTypeMatch)\n {\n // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch.\n sceneRenderer.end();\n\n if (!renderer.finalType)\n {\n renderer.rebindPipeline(renderer.pipelines.MultiPipeline);\n }\n }\n};\n\nmodule.exports = SpineGameObjectWebGLRenderer;\n","/*** IMPORTS FROM imports-loader ***/\n\n(function() {\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar spine;\r\n(function (spine) {\r\n var Animation = (function () {\r\n function Animation(name, timelines, duration) {\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n if (timelines == null)\r\n throw new Error(\"timelines cannot be null.\");\r\n this.name = name;\r\n this.timelines = timelines;\r\n this.timelineIds = [];\r\n for (var i = 0; i < timelines.length; i++)\r\n this.timelineIds[timelines[i].getPropertyId()] = true;\r\n this.duration = duration;\r\n }\r\n Animation.prototype.hasTimeline = function (id) {\r\n return this.timelineIds[id] == true;\r\n };\r\n Animation.prototype.apply = function (skeleton, lastTime, time, loop, events, alpha, blend, direction) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n if (loop && this.duration != 0) {\r\n time %= this.duration;\r\n if (lastTime > 0)\r\n lastTime %= this.duration;\r\n }\r\n var timelines = this.timelines;\r\n for (var i = 0, n = timelines.length; i < n; i++)\r\n timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\r\n };\r\n Animation.binarySearch = function (values, target, step) {\r\n if (step === void 0) { step = 1; }\r\n var low = 0;\r\n var high = values.length / step - 2;\r\n if (high == 0)\r\n return step;\r\n var current = high >>> 1;\r\n while (true) {\r\n if (values[(current + 1) * step] <= target)\r\n low = current + 1;\r\n else\r\n high = current;\r\n if (low == high)\r\n return (low + 1) * step;\r\n current = (low + high) >>> 1;\r\n }\r\n };\r\n Animation.linearSearch = function (values, target, step) {\r\n for (var i = 0, last = values.length - step; i <= last; i += step)\r\n if (values[i] > target)\r\n return i;\r\n return -1;\r\n };\r\n return Animation;\r\n }());\r\n spine.Animation = Animation;\r\n var MixBlend;\r\n (function (MixBlend) {\r\n MixBlend[MixBlend[\"setup\"] = 0] = \"setup\";\r\n MixBlend[MixBlend[\"first\"] = 1] = \"first\";\r\n MixBlend[MixBlend[\"replace\"] = 2] = \"replace\";\r\n MixBlend[MixBlend[\"add\"] = 3] = \"add\";\r\n })(MixBlend = spine.MixBlend || (spine.MixBlend = {}));\r\n var MixDirection;\r\n (function (MixDirection) {\r\n MixDirection[MixDirection[\"mixIn\"] = 0] = \"mixIn\";\r\n MixDirection[MixDirection[\"mixOut\"] = 1] = \"mixOut\";\r\n })(MixDirection = spine.MixDirection || (spine.MixDirection = {}));\r\n var TimelineType;\r\n (function (TimelineType) {\r\n TimelineType[TimelineType[\"rotate\"] = 0] = \"rotate\";\r\n TimelineType[TimelineType[\"translate\"] = 1] = \"translate\";\r\n TimelineType[TimelineType[\"scale\"] = 2] = \"scale\";\r\n TimelineType[TimelineType[\"shear\"] = 3] = \"shear\";\r\n TimelineType[TimelineType[\"attachment\"] = 4] = \"attachment\";\r\n TimelineType[TimelineType[\"color\"] = 5] = \"color\";\r\n TimelineType[TimelineType[\"deform\"] = 6] = \"deform\";\r\n TimelineType[TimelineType[\"event\"] = 7] = \"event\";\r\n TimelineType[TimelineType[\"drawOrder\"] = 8] = \"drawOrder\";\r\n TimelineType[TimelineType[\"ikConstraint\"] = 9] = \"ikConstraint\";\r\n TimelineType[TimelineType[\"transformConstraint\"] = 10] = \"transformConstraint\";\r\n TimelineType[TimelineType[\"pathConstraintPosition\"] = 11] = \"pathConstraintPosition\";\r\n TimelineType[TimelineType[\"pathConstraintSpacing\"] = 12] = \"pathConstraintSpacing\";\r\n TimelineType[TimelineType[\"pathConstraintMix\"] = 13] = \"pathConstraintMix\";\r\n TimelineType[TimelineType[\"twoColor\"] = 14] = \"twoColor\";\r\n })(TimelineType = spine.TimelineType || (spine.TimelineType = {}));\r\n var CurveTimeline = (function () {\r\n function CurveTimeline(frameCount) {\r\n if (frameCount <= 0)\r\n throw new Error(\"frameCount must be > 0: \" + frameCount);\r\n this.curves = spine.Utils.newFloatArray((frameCount - 1) * CurveTimeline.BEZIER_SIZE);\r\n }\r\n CurveTimeline.prototype.getFrameCount = function () {\r\n return this.curves.length / CurveTimeline.BEZIER_SIZE + 1;\r\n };\r\n CurveTimeline.prototype.setLinear = function (frameIndex) {\r\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.LINEAR;\r\n };\r\n CurveTimeline.prototype.setStepped = function (frameIndex) {\r\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.STEPPED;\r\n };\r\n CurveTimeline.prototype.getCurveType = function (frameIndex) {\r\n var index = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n if (index == this.curves.length)\r\n return CurveTimeline.LINEAR;\r\n var type = this.curves[index];\r\n if (type == CurveTimeline.LINEAR)\r\n return CurveTimeline.LINEAR;\r\n if (type == CurveTimeline.STEPPED)\r\n return CurveTimeline.STEPPED;\r\n return CurveTimeline.BEZIER;\r\n };\r\n CurveTimeline.prototype.setCurve = function (frameIndex, cx1, cy1, cx2, cy2) {\r\n var tmpx = (-cx1 * 2 + cx2) * 0.03, tmpy = (-cy1 * 2 + cy2) * 0.03;\r\n var dddfx = ((cx1 - cx2) * 3 + 1) * 0.006, dddfy = ((cy1 - cy2) * 3 + 1) * 0.006;\r\n var ddfx = tmpx * 2 + dddfx, ddfy = tmpy * 2 + dddfy;\r\n var dfx = cx1 * 0.3 + tmpx + dddfx * 0.16666667, dfy = cy1 * 0.3 + tmpy + dddfy * 0.16666667;\r\n var i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n var curves = this.curves;\r\n curves[i++] = CurveTimeline.BEZIER;\r\n var x = dfx, y = dfy;\r\n for (var n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n curves[i] = x;\r\n curves[i + 1] = y;\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n x += dfx;\r\n y += dfy;\r\n }\r\n };\r\n CurveTimeline.prototype.getCurvePercent = function (frameIndex, percent) {\r\n percent = spine.MathUtils.clamp(percent, 0, 1);\r\n var curves = this.curves;\r\n var i = frameIndex * CurveTimeline.BEZIER_SIZE;\r\n var type = curves[i];\r\n if (type == CurveTimeline.LINEAR)\r\n return percent;\r\n if (type == CurveTimeline.STEPPED)\r\n return 0;\r\n i++;\r\n var x = 0;\r\n for (var start = i, n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\r\n x = curves[i];\r\n if (x >= percent) {\r\n var prevX = void 0, prevY = void 0;\r\n if (i == start) {\r\n prevX = 0;\r\n prevY = 0;\r\n }\r\n else {\r\n prevX = curves[i - 2];\r\n prevY = curves[i - 1];\r\n }\r\n return prevY + (curves[i + 1] - prevY) * (percent - prevX) / (x - prevX);\r\n }\r\n }\r\n var y = curves[i - 1];\r\n return y + (1 - y) * (percent - x) / (1 - x);\r\n };\r\n CurveTimeline.LINEAR = 0;\r\n CurveTimeline.STEPPED = 1;\r\n CurveTimeline.BEZIER = 2;\r\n CurveTimeline.BEZIER_SIZE = 10 * 2 - 1;\r\n return CurveTimeline;\r\n }());\r\n spine.CurveTimeline = CurveTimeline;\r\n var RotateTimeline = (function (_super) {\r\n __extends(RotateTimeline, _super);\r\n function RotateTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount << 1);\r\n return _this;\r\n }\r\n RotateTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.rotate << 24) + this.boneIndex;\r\n };\r\n RotateTimeline.prototype.setFrame = function (frameIndex, time, degrees) {\r\n frameIndex <<= 1;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + RotateTimeline.ROTATION] = degrees;\r\n };\r\n RotateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation;\r\n return;\r\n case MixBlend.first:\r\n var r_1 = bone.data.rotation - bone.rotation;\r\n bone.rotation += (r_1 - (16384 - ((16384.499999999996 - r_1 / 360) | 0)) * 360) * alpha;\r\n }\r\n return;\r\n }\r\n if (time >= frames[frames.length - RotateTimeline.ENTRIES]) {\r\n var r_2 = frames[frames.length + RotateTimeline.PREV_ROTATION];\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation + r_2 * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n r_2 += bone.data.rotation - bone.rotation;\r\n r_2 -= (16384 - ((16384.499999999996 - r_2 / 360) | 0)) * 360;\r\n case MixBlend.add:\r\n bone.rotation += r_2 * alpha;\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time, RotateTimeline.ENTRIES);\r\n var prevRotation = frames[frame + RotateTimeline.PREV_ROTATION];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime));\r\n var r = frames[frame + RotateTimeline.ROTATION] - prevRotation;\r\n r = prevRotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * percent;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.rotation = bone.data.rotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n r += bone.data.rotation - bone.rotation;\r\n case MixBlend.add:\r\n bone.rotation += (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\r\n }\r\n };\r\n RotateTimeline.ENTRIES = 2;\r\n RotateTimeline.PREV_TIME = -2;\r\n RotateTimeline.PREV_ROTATION = -1;\r\n RotateTimeline.ROTATION = 1;\r\n return RotateTimeline;\r\n }(CurveTimeline));\r\n spine.RotateTimeline = RotateTimeline;\r\n var TranslateTimeline = (function (_super) {\r\n __extends(TranslateTimeline, _super);\r\n function TranslateTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TranslateTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.translate << 24) + this.boneIndex;\r\n };\r\n TranslateTimeline.prototype.setFrame = function (frameIndex, time, x, y) {\r\n frameIndex *= TranslateTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TranslateTimeline.X] = x;\r\n this.frames[frameIndex + TranslateTimeline.Y] = y;\r\n };\r\n TranslateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.x = bone.data.x;\r\n bone.y = bone.data.y;\r\n return;\r\n case MixBlend.first:\r\n bone.x += (bone.data.x - bone.x) * alpha;\r\n bone.y += (bone.data.y - bone.y) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - TranslateTimeline.ENTRIES]) {\r\n x = frames[frames.length + TranslateTimeline.PREV_X];\r\n y = frames[frames.length + TranslateTimeline.PREV_Y];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TranslateTimeline.ENTRIES);\r\n x = frames[frame + TranslateTimeline.PREV_X];\r\n y = frames[frame + TranslateTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TranslateTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TranslateTimeline.PREV_TIME] - frameTime));\r\n x += (frames[frame + TranslateTimeline.X] - x) * percent;\r\n y += (frames[frame + TranslateTimeline.Y] - y) * percent;\r\n }\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.x = bone.data.x + x * alpha;\r\n bone.y = bone.data.y + y * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bone.x += (bone.data.x + x - bone.x) * alpha;\r\n bone.y += (bone.data.y + y - bone.y) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bone.x += x * alpha;\r\n bone.y += y * alpha;\r\n }\r\n };\r\n TranslateTimeline.ENTRIES = 3;\r\n TranslateTimeline.PREV_TIME = -3;\r\n TranslateTimeline.PREV_X = -2;\r\n TranslateTimeline.PREV_Y = -1;\r\n TranslateTimeline.X = 1;\r\n TranslateTimeline.Y = 2;\r\n return TranslateTimeline;\r\n }(CurveTimeline));\r\n spine.TranslateTimeline = TranslateTimeline;\r\n var ScaleTimeline = (function (_super) {\r\n __extends(ScaleTimeline, _super);\r\n function ScaleTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n ScaleTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.scale << 24) + this.boneIndex;\r\n };\r\n ScaleTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.scaleX = bone.data.scaleX;\r\n bone.scaleY = bone.data.scaleY;\r\n return;\r\n case MixBlend.first:\r\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\r\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - ScaleTimeline.ENTRIES]) {\r\n x = frames[frames.length + ScaleTimeline.PREV_X] * bone.data.scaleX;\r\n y = frames[frames.length + ScaleTimeline.PREV_Y] * bone.data.scaleY;\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ScaleTimeline.ENTRIES);\r\n x = frames[frame + ScaleTimeline.PREV_X];\r\n y = frames[frame + ScaleTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ScaleTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ScaleTimeline.PREV_TIME] - frameTime));\r\n x = (x + (frames[frame + ScaleTimeline.X] - x) * percent) * bone.data.scaleX;\r\n y = (y + (frames[frame + ScaleTimeline.Y] - y) * percent) * bone.data.scaleY;\r\n }\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n bone.scaleX += x - bone.data.scaleX;\r\n bone.scaleY += y - bone.data.scaleY;\r\n }\r\n else {\r\n bone.scaleX = x;\r\n bone.scaleY = y;\r\n }\r\n }\r\n else {\r\n var bx = 0, by = 0;\r\n if (direction == MixDirection.mixOut) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bx = bone.data.scaleX;\r\n by = bone.data.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bx = bone.scaleX;\r\n by = bone.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bx) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - by) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bx = bone.scaleX;\r\n by = bone.scaleY;\r\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bone.data.scaleX) * alpha;\r\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - bone.data.scaleY) * alpha;\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bx = Math.abs(bone.data.scaleX) * spine.MathUtils.signum(x);\r\n by = Math.abs(bone.data.scaleY) * spine.MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bx = Math.abs(bone.scaleX) * spine.MathUtils.signum(x);\r\n by = Math.abs(bone.scaleY) * spine.MathUtils.signum(y);\r\n bone.scaleX = bx + (x - bx) * alpha;\r\n bone.scaleY = by + (y - by) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bx = spine.MathUtils.signum(x);\r\n by = spine.MathUtils.signum(y);\r\n bone.scaleX = Math.abs(bone.scaleX) * bx + (x - Math.abs(bone.data.scaleX) * bx) * alpha;\r\n bone.scaleY = Math.abs(bone.scaleY) * by + (y - Math.abs(bone.data.scaleY) * by) * alpha;\r\n }\r\n }\r\n }\r\n };\r\n return ScaleTimeline;\r\n }(TranslateTimeline));\r\n spine.ScaleTimeline = ScaleTimeline;\r\n var ShearTimeline = (function (_super) {\r\n __extends(ShearTimeline, _super);\r\n function ShearTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n ShearTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.shear << 24) + this.boneIndex;\r\n };\r\n ShearTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var bone = skeleton.bones[this.boneIndex];\r\n if (!bone.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.shearX = bone.data.shearX;\r\n bone.shearY = bone.data.shearY;\r\n return;\r\n case MixBlend.first:\r\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\r\n }\r\n return;\r\n }\r\n var x = 0, y = 0;\r\n if (time >= frames[frames.length - ShearTimeline.ENTRIES]) {\r\n x = frames[frames.length + ShearTimeline.PREV_X];\r\n y = frames[frames.length + ShearTimeline.PREV_Y];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ShearTimeline.ENTRIES);\r\n x = frames[frame + ShearTimeline.PREV_X];\r\n y = frames[frame + ShearTimeline.PREV_Y];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ShearTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ShearTimeline.PREV_TIME] - frameTime));\r\n x = x + (frames[frame + ShearTimeline.X] - x) * percent;\r\n y = y + (frames[frame + ShearTimeline.Y] - y) * percent;\r\n }\r\n switch (blend) {\r\n case MixBlend.setup:\r\n bone.shearX = bone.data.shearX + x * alpha;\r\n bone.shearY = bone.data.shearY + y * alpha;\r\n break;\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\r\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\r\n break;\r\n case MixBlend.add:\r\n bone.shearX += x * alpha;\r\n bone.shearY += y * alpha;\r\n }\r\n };\r\n return ShearTimeline;\r\n }(TranslateTimeline));\r\n spine.ShearTimeline = ShearTimeline;\r\n var ColorTimeline = (function (_super) {\r\n __extends(ColorTimeline, _super);\r\n function ColorTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES);\r\n return _this;\r\n }\r\n ColorTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.color << 24) + this.slotIndex;\r\n };\r\n ColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a) {\r\n frameIndex *= ColorTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + ColorTimeline.R] = r;\r\n this.frames[frameIndex + ColorTimeline.G] = g;\r\n this.frames[frameIndex + ColorTimeline.B] = b;\r\n this.frames[frameIndex + ColorTimeline.A] = a;\r\n };\r\n ColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n slot.color.setFromColor(slot.data.color);\r\n return;\r\n case MixBlend.first:\r\n var color = slot.color, setup = slot.data.color;\r\n color.add((setup.r - color.r) * alpha, (setup.g - color.g) * alpha, (setup.b - color.b) * alpha, (setup.a - color.a) * alpha);\r\n }\r\n return;\r\n }\r\n var r = 0, g = 0, b = 0, a = 0;\r\n if (time >= frames[frames.length - ColorTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n r = frames[i + ColorTimeline.PREV_R];\r\n g = frames[i + ColorTimeline.PREV_G];\r\n b = frames[i + ColorTimeline.PREV_B];\r\n a = frames[i + ColorTimeline.PREV_A];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, ColorTimeline.ENTRIES);\r\n r = frames[frame + ColorTimeline.PREV_R];\r\n g = frames[frame + ColorTimeline.PREV_G];\r\n b = frames[frame + ColorTimeline.PREV_B];\r\n a = frames[frame + ColorTimeline.PREV_A];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / ColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ColorTimeline.PREV_TIME] - frameTime));\r\n r += (frames[frame + ColorTimeline.R] - r) * percent;\r\n g += (frames[frame + ColorTimeline.G] - g) * percent;\r\n b += (frames[frame + ColorTimeline.B] - b) * percent;\r\n a += (frames[frame + ColorTimeline.A] - a) * percent;\r\n }\r\n if (alpha == 1)\r\n slot.color.set(r, g, b, a);\r\n else {\r\n var color = slot.color;\r\n if (blend == MixBlend.setup)\r\n color.setFromColor(slot.data.color);\r\n color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);\r\n }\r\n };\r\n ColorTimeline.ENTRIES = 5;\r\n ColorTimeline.PREV_TIME = -5;\r\n ColorTimeline.PREV_R = -4;\r\n ColorTimeline.PREV_G = -3;\r\n ColorTimeline.PREV_B = -2;\r\n ColorTimeline.PREV_A = -1;\r\n ColorTimeline.R = 1;\r\n ColorTimeline.G = 2;\r\n ColorTimeline.B = 3;\r\n ColorTimeline.A = 4;\r\n return ColorTimeline;\r\n }(CurveTimeline));\r\n spine.ColorTimeline = ColorTimeline;\r\n var TwoColorTimeline = (function (_super) {\r\n __extends(TwoColorTimeline, _super);\r\n function TwoColorTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TwoColorTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TwoColorTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.twoColor << 24) + this.slotIndex;\r\n };\r\n TwoColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a, r2, g2, b2) {\r\n frameIndex *= TwoColorTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TwoColorTimeline.R] = r;\r\n this.frames[frameIndex + TwoColorTimeline.G] = g;\r\n this.frames[frameIndex + TwoColorTimeline.B] = b;\r\n this.frames[frameIndex + TwoColorTimeline.A] = a;\r\n this.frames[frameIndex + TwoColorTimeline.R2] = r2;\r\n this.frames[frameIndex + TwoColorTimeline.G2] = g2;\r\n this.frames[frameIndex + TwoColorTimeline.B2] = b2;\r\n };\r\n TwoColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n slot.color.setFromColor(slot.data.color);\r\n slot.darkColor.setFromColor(slot.data.darkColor);\r\n return;\r\n case MixBlend.first:\r\n var light = slot.color, dark = slot.darkColor, setupLight = slot.data.color, setupDark = slot.data.darkColor;\r\n light.add((setupLight.r - light.r) * alpha, (setupLight.g - light.g) * alpha, (setupLight.b - light.b) * alpha, (setupLight.a - light.a) * alpha);\r\n dark.add((setupDark.r - dark.r) * alpha, (setupDark.g - dark.g) * alpha, (setupDark.b - dark.b) * alpha, 0);\r\n }\r\n return;\r\n }\r\n var r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\r\n if (time >= frames[frames.length - TwoColorTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n r = frames[i + TwoColorTimeline.PREV_R];\r\n g = frames[i + TwoColorTimeline.PREV_G];\r\n b = frames[i + TwoColorTimeline.PREV_B];\r\n a = frames[i + TwoColorTimeline.PREV_A];\r\n r2 = frames[i + TwoColorTimeline.PREV_R2];\r\n g2 = frames[i + TwoColorTimeline.PREV_G2];\r\n b2 = frames[i + TwoColorTimeline.PREV_B2];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TwoColorTimeline.ENTRIES);\r\n r = frames[frame + TwoColorTimeline.PREV_R];\r\n g = frames[frame + TwoColorTimeline.PREV_G];\r\n b = frames[frame + TwoColorTimeline.PREV_B];\r\n a = frames[frame + TwoColorTimeline.PREV_A];\r\n r2 = frames[frame + TwoColorTimeline.PREV_R2];\r\n g2 = frames[frame + TwoColorTimeline.PREV_G2];\r\n b2 = frames[frame + TwoColorTimeline.PREV_B2];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TwoColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TwoColorTimeline.PREV_TIME] - frameTime));\r\n r += (frames[frame + TwoColorTimeline.R] - r) * percent;\r\n g += (frames[frame + TwoColorTimeline.G] - g) * percent;\r\n b += (frames[frame + TwoColorTimeline.B] - b) * percent;\r\n a += (frames[frame + TwoColorTimeline.A] - a) * percent;\r\n r2 += (frames[frame + TwoColorTimeline.R2] - r2) * percent;\r\n g2 += (frames[frame + TwoColorTimeline.G2] - g2) * percent;\r\n b2 += (frames[frame + TwoColorTimeline.B2] - b2) * percent;\r\n }\r\n if (alpha == 1) {\r\n slot.color.set(r, g, b, a);\r\n slot.darkColor.set(r2, g2, b2, 1);\r\n }\r\n else {\r\n var light = slot.color, dark = slot.darkColor;\r\n if (blend == MixBlend.setup) {\r\n light.setFromColor(slot.data.color);\r\n dark.setFromColor(slot.data.darkColor);\r\n }\r\n light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\r\n dark.add((r2 - dark.r) * alpha, (g2 - dark.g) * alpha, (b2 - dark.b) * alpha, 0);\r\n }\r\n };\r\n TwoColorTimeline.ENTRIES = 8;\r\n TwoColorTimeline.PREV_TIME = -8;\r\n TwoColorTimeline.PREV_R = -7;\r\n TwoColorTimeline.PREV_G = -6;\r\n TwoColorTimeline.PREV_B = -5;\r\n TwoColorTimeline.PREV_A = -4;\r\n TwoColorTimeline.PREV_R2 = -3;\r\n TwoColorTimeline.PREV_G2 = -2;\r\n TwoColorTimeline.PREV_B2 = -1;\r\n TwoColorTimeline.R = 1;\r\n TwoColorTimeline.G = 2;\r\n TwoColorTimeline.B = 3;\r\n TwoColorTimeline.A = 4;\r\n TwoColorTimeline.R2 = 5;\r\n TwoColorTimeline.G2 = 6;\r\n TwoColorTimeline.B2 = 7;\r\n return TwoColorTimeline;\r\n }(CurveTimeline));\r\n spine.TwoColorTimeline = TwoColorTimeline;\r\n var AttachmentTimeline = (function () {\r\n function AttachmentTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.attachmentNames = new Array(frameCount);\r\n }\r\n AttachmentTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.attachment << 24) + this.slotIndex;\r\n };\r\n AttachmentTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n AttachmentTimeline.prototype.setFrame = function (frameIndex, time, attachmentName) {\r\n this.frames[frameIndex] = time;\r\n this.attachmentNames[frameIndex] = attachmentName;\r\n };\r\n AttachmentTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n if (direction == MixDirection.mixOut) {\r\n if (blend == MixBlend.setup)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n return;\r\n }\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n if (blend == MixBlend.setup || blend == MixBlend.first)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\r\n return;\r\n }\r\n var frameIndex = 0;\r\n if (time >= frames[frames.length - 1])\r\n frameIndex = frames.length - 1;\r\n else\r\n frameIndex = Animation.binarySearch(frames, time, 1) - 1;\r\n var attachmentName = this.attachmentNames[frameIndex];\r\n skeleton.slots[this.slotIndex]\r\n .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\r\n };\r\n AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) {\r\n slot.attachment = attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName);\r\n };\r\n return AttachmentTimeline;\r\n }());\r\n spine.AttachmentTimeline = AttachmentTimeline;\r\n var zeros = null;\r\n var DeformTimeline = (function (_super) {\r\n __extends(DeformTimeline, _super);\r\n function DeformTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount);\r\n _this.frameVertices = new Array(frameCount);\r\n if (zeros == null)\r\n zeros = spine.Utils.newFloatArray(64);\r\n return _this;\r\n }\r\n DeformTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.deform << 27) + +this.attachment.id + this.slotIndex;\r\n };\r\n DeformTimeline.prototype.setFrame = function (frameIndex, time, vertices) {\r\n this.frames[frameIndex] = time;\r\n this.frameVertices[frameIndex] = vertices;\r\n };\r\n DeformTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var slot = skeleton.slots[this.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var slotAttachment = slot.getAttachment();\r\n if (!(slotAttachment instanceof spine.VertexAttachment) || !(slotAttachment.deformAttachment == this.attachment))\r\n return;\r\n var deformArray = slot.deform;\r\n if (deformArray.length == 0)\r\n blend = MixBlend.setup;\r\n var frameVertices = this.frameVertices;\r\n var vertexCount = frameVertices[0].length;\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n var vertexAttachment = slotAttachment;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n deformArray.length = 0;\r\n return;\r\n case MixBlend.first:\r\n if (alpha == 1) {\r\n deformArray.length = 0;\r\n break;\r\n }\r\n var deform_1 = spine.Utils.setArraySize(deformArray, vertexCount);\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform_1[i] += (setupVertices[i] - deform_1[i]) * alpha;\r\n }\r\n else {\r\n alpha = 1 - alpha;\r\n for (var i = 0; i < vertexCount; i++)\r\n deform_1[i] *= alpha;\r\n }\r\n }\r\n return;\r\n }\r\n var deform = spine.Utils.setArraySize(deformArray, vertexCount);\r\n if (time >= frames[frames.length - 1]) {\r\n var lastVertices = frameVertices[frames.length - 1];\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_1 = 0; i_1 < vertexCount; i_1++) {\r\n deform[i_1] += lastVertices[i_1] - setupVertices[i_1];\r\n }\r\n }\r\n else {\r\n for (var i_2 = 0; i_2 < vertexCount; i_2++)\r\n deform[i_2] += lastVertices[i_2];\r\n }\r\n }\r\n else {\r\n spine.Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup: {\r\n var vertexAttachment_1 = slotAttachment;\r\n if (vertexAttachment_1.bones == null) {\r\n var setupVertices = vertexAttachment_1.vertices;\r\n for (var i_3 = 0; i_3 < vertexCount; i_3++) {\r\n var setup = setupVertices[i_3];\r\n deform[i_3] = setup + (lastVertices[i_3] - setup) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_4 = 0; i_4 < vertexCount; i_4++)\r\n deform[i_4] = lastVertices[i_4] * alpha;\r\n }\r\n break;\r\n }\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n for (var i_5 = 0; i_5 < vertexCount; i_5++)\r\n deform[i_5] += (lastVertices[i_5] - deform[i_5]) * alpha;\r\n break;\r\n case MixBlend.add:\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_6 = 0; i_6 < vertexCount; i_6++) {\r\n deform[i_6] += (lastVertices[i_6] - setupVertices[i_6]) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_7 = 0; i_7 < vertexCount; i_7++)\r\n deform[i_7] += lastVertices[i_7] * alpha;\r\n }\r\n }\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time);\r\n var prevVertices = frameVertices[frame - 1];\r\n var nextVertices = frameVertices[frame];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame - 1, 1 - (time - frameTime) / (frames[frame - 1] - frameTime));\r\n if (alpha == 1) {\r\n if (blend == MixBlend.add) {\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_8 = 0; i_8 < vertexCount; i_8++) {\r\n var prev = prevVertices[i_8];\r\n deform[i_8] += prev + (nextVertices[i_8] - prev) * percent - setupVertices[i_8];\r\n }\r\n }\r\n else {\r\n for (var i_9 = 0; i_9 < vertexCount; i_9++) {\r\n var prev = prevVertices[i_9];\r\n deform[i_9] += prev + (nextVertices[i_9] - prev) * percent;\r\n }\r\n }\r\n }\r\n else {\r\n for (var i_10 = 0; i_10 < vertexCount; i_10++) {\r\n var prev = prevVertices[i_10];\r\n deform[i_10] = prev + (nextVertices[i_10] - prev) * percent;\r\n }\r\n }\r\n }\r\n else {\r\n switch (blend) {\r\n case MixBlend.setup: {\r\n var vertexAttachment_2 = slotAttachment;\r\n if (vertexAttachment_2.bones == null) {\r\n var setupVertices = vertexAttachment_2.vertices;\r\n for (var i_11 = 0; i_11 < vertexCount; i_11++) {\r\n var prev = prevVertices[i_11], setup = setupVertices[i_11];\r\n deform[i_11] = setup + (prev + (nextVertices[i_11] - prev) * percent - setup) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_12 = 0; i_12 < vertexCount; i_12++) {\r\n var prev = prevVertices[i_12];\r\n deform[i_12] = (prev + (nextVertices[i_12] - prev) * percent) * alpha;\r\n }\r\n }\r\n break;\r\n }\r\n case MixBlend.first:\r\n case MixBlend.replace:\r\n for (var i_13 = 0; i_13 < vertexCount; i_13++) {\r\n var prev = prevVertices[i_13];\r\n deform[i_13] += (prev + (nextVertices[i_13] - prev) * percent - deform[i_13]) * alpha;\r\n }\r\n break;\r\n case MixBlend.add:\r\n var vertexAttachment = slotAttachment;\r\n if (vertexAttachment.bones == null) {\r\n var setupVertices = vertexAttachment.vertices;\r\n for (var i_14 = 0; i_14 < vertexCount; i_14++) {\r\n var prev = prevVertices[i_14];\r\n deform[i_14] += (prev + (nextVertices[i_14] - prev) * percent - setupVertices[i_14]) * alpha;\r\n }\r\n }\r\n else {\r\n for (var i_15 = 0; i_15 < vertexCount; i_15++) {\r\n var prev = prevVertices[i_15];\r\n deform[i_15] += (prev + (nextVertices[i_15] - prev) * percent) * alpha;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n return DeformTimeline;\r\n }(CurveTimeline));\r\n spine.DeformTimeline = DeformTimeline;\r\n var EventTimeline = (function () {\r\n function EventTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.events = new Array(frameCount);\r\n }\r\n EventTimeline.prototype.getPropertyId = function () {\r\n return TimelineType.event << 24;\r\n };\r\n EventTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n EventTimeline.prototype.setFrame = function (frameIndex, event) {\r\n this.frames[frameIndex] = event.time;\r\n this.events[frameIndex] = event;\r\n };\r\n EventTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n if (firedEvents == null)\r\n return;\r\n var frames = this.frames;\r\n var frameCount = this.frames.length;\r\n if (lastTime > time) {\r\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\r\n lastTime = -1;\r\n }\r\n else if (lastTime >= frames[frameCount - 1])\r\n return;\r\n if (time < frames[0])\r\n return;\r\n var frame = 0;\r\n if (lastTime < frames[0])\r\n frame = 0;\r\n else {\r\n frame = Animation.binarySearch(frames, lastTime);\r\n var frameTime = frames[frame];\r\n while (frame > 0) {\r\n if (frames[frame - 1] != frameTime)\r\n break;\r\n frame--;\r\n }\r\n }\r\n for (; frame < frameCount && time >= frames[frame]; frame++)\r\n firedEvents.push(this.events[frame]);\r\n };\r\n return EventTimeline;\r\n }());\r\n spine.EventTimeline = EventTimeline;\r\n var DrawOrderTimeline = (function () {\r\n function DrawOrderTimeline(frameCount) {\r\n this.frames = spine.Utils.newFloatArray(frameCount);\r\n this.drawOrders = new Array(frameCount);\r\n }\r\n DrawOrderTimeline.prototype.getPropertyId = function () {\r\n return TimelineType.drawOrder << 24;\r\n };\r\n DrawOrderTimeline.prototype.getFrameCount = function () {\r\n return this.frames.length;\r\n };\r\n DrawOrderTimeline.prototype.setFrame = function (frameIndex, time, drawOrder) {\r\n this.frames[frameIndex] = time;\r\n this.drawOrders[frameIndex] = drawOrder;\r\n };\r\n DrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var drawOrder = skeleton.drawOrder;\r\n var slots = skeleton.slots;\r\n if (direction == MixDirection.mixOut) {\r\n if (blend == MixBlend.setup)\r\n spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n var frames = this.frames;\r\n if (time < frames[0]) {\r\n if (blend == MixBlend.setup || blend == MixBlend.first)\r\n spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\r\n return;\r\n }\r\n var frame = 0;\r\n if (time >= frames[frames.length - 1])\r\n frame = frames.length - 1;\r\n else\r\n frame = Animation.binarySearch(frames, time) - 1;\r\n var drawOrderToSetupIndex = this.drawOrders[frame];\r\n if (drawOrderToSetupIndex == null)\r\n spine.Utils.arrayCopy(slots, 0, drawOrder, 0, slots.length);\r\n else {\r\n for (var i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\r\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\r\n }\r\n };\r\n return DrawOrderTimeline;\r\n }());\r\n spine.DrawOrderTimeline = DrawOrderTimeline;\r\n var IkConstraintTimeline = (function (_super) {\r\n __extends(IkConstraintTimeline, _super);\r\n function IkConstraintTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES);\r\n return _this;\r\n }\r\n IkConstraintTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.ikConstraint << 24) + this.ikConstraintIndex;\r\n };\r\n IkConstraintTimeline.prototype.setFrame = function (frameIndex, time, mix, softness, bendDirection, compress, stretch) {\r\n frameIndex *= IkConstraintTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + IkConstraintTimeline.MIX] = mix;\r\n this.frames[frameIndex + IkConstraintTimeline.SOFTNESS] = softness;\r\n this.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection;\r\n this.frames[frameIndex + IkConstraintTimeline.COMPRESS] = compress ? 1 : 0;\r\n this.frames[frameIndex + IkConstraintTimeline.STRETCH] = stretch ? 1 : 0;\r\n };\r\n IkConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.ikConstraints[this.ikConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n return;\r\n case MixBlend.first:\r\n constraint.mix += (constraint.data.mix - constraint.mix) * alpha;\r\n constraint.softness += (constraint.data.softness - constraint.softness) * alpha;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n return;\r\n }\r\n if (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) {\r\n if (blend == MixBlend.setup) {\r\n constraint.mix = constraint.data.mix + (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.data.mix) * alpha;\r\n constraint.softness = constraint.data.softness\r\n + (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.data.softness) * alpha;\r\n if (direction == MixDirection.mixOut) {\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n else {\r\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n else {\r\n constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha;\r\n constraint.softness += (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.softness) * alpha;\r\n if (direction == MixDirection.mixIn) {\r\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n return;\r\n }\r\n var frame = Animation.binarySearch(frames, time, IkConstraintTimeline.ENTRIES);\r\n var mix = frames[frame + IkConstraintTimeline.PREV_MIX];\r\n var softness = frames[frame + IkConstraintTimeline.PREV_SOFTNESS];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime));\r\n if (blend == MixBlend.setup) {\r\n constraint.mix = constraint.data.mix + (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.data.mix) * alpha;\r\n constraint.softness = constraint.data.softness\r\n + (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.data.softness) * alpha;\r\n if (direction == MixDirection.mixOut) {\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n else {\r\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n else {\r\n constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha;\r\n constraint.softness += (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.softness) * alpha;\r\n if (direction == MixDirection.mixIn) {\r\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\r\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\r\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\r\n }\r\n }\r\n };\r\n IkConstraintTimeline.ENTRIES = 6;\r\n IkConstraintTimeline.PREV_TIME = -6;\r\n IkConstraintTimeline.PREV_MIX = -5;\r\n IkConstraintTimeline.PREV_SOFTNESS = -4;\r\n IkConstraintTimeline.PREV_BEND_DIRECTION = -3;\r\n IkConstraintTimeline.PREV_COMPRESS = -2;\r\n IkConstraintTimeline.PREV_STRETCH = -1;\r\n IkConstraintTimeline.MIX = 1;\r\n IkConstraintTimeline.SOFTNESS = 2;\r\n IkConstraintTimeline.BEND_DIRECTION = 3;\r\n IkConstraintTimeline.COMPRESS = 4;\r\n IkConstraintTimeline.STRETCH = 5;\r\n return IkConstraintTimeline;\r\n }(CurveTimeline));\r\n spine.IkConstraintTimeline = IkConstraintTimeline;\r\n var TransformConstraintTimeline = (function (_super) {\r\n __extends(TransformConstraintTimeline, _super);\r\n function TransformConstraintTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES);\r\n return _this;\r\n }\r\n TransformConstraintTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.transformConstraint << 24) + this.transformConstraintIndex;\r\n };\r\n TransformConstraintTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix, scaleMix, shearMix) {\r\n frameIndex *= TransformConstraintTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + TransformConstraintTimeline.ROTATE] = rotateMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.TRANSLATE] = translateMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.SCALE] = scaleMix;\r\n this.frames[frameIndex + TransformConstraintTimeline.SHEAR] = shearMix;\r\n };\r\n TransformConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.transformConstraints[this.transformConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n var data = constraint.data;\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n constraint.scaleMix = data.scaleMix;\r\n constraint.shearMix = data.shearMix;\r\n return;\r\n case MixBlend.first:\r\n constraint.rotateMix += (data.rotateMix - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (data.translateMix - constraint.translateMix) * alpha;\r\n constraint.scaleMix += (data.scaleMix - constraint.scaleMix) * alpha;\r\n constraint.shearMix += (data.shearMix - constraint.shearMix) * alpha;\r\n }\r\n return;\r\n }\r\n var rotate = 0, translate = 0, scale = 0, shear = 0;\r\n if (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) {\r\n var i = frames.length;\r\n rotate = frames[i + TransformConstraintTimeline.PREV_ROTATE];\r\n translate = frames[i + TransformConstraintTimeline.PREV_TRANSLATE];\r\n scale = frames[i + TransformConstraintTimeline.PREV_SCALE];\r\n shear = frames[i + TransformConstraintTimeline.PREV_SHEAR];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES);\r\n rotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE];\r\n translate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE];\r\n scale = frames[frame + TransformConstraintTimeline.PREV_SCALE];\r\n shear = frames[frame + TransformConstraintTimeline.PREV_SHEAR];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime));\r\n rotate += (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent;\r\n translate += (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent;\r\n scale += (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent;\r\n shear += (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent;\r\n }\r\n if (blend == MixBlend.setup) {\r\n var data = constraint.data;\r\n constraint.rotateMix = data.rotateMix + (rotate - data.rotateMix) * alpha;\r\n constraint.translateMix = data.translateMix + (translate - data.translateMix) * alpha;\r\n constraint.scaleMix = data.scaleMix + (scale - data.scaleMix) * alpha;\r\n constraint.shearMix = data.shearMix + (shear - data.shearMix) * alpha;\r\n }\r\n else {\r\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n constraint.scaleMix += (scale - constraint.scaleMix) * alpha;\r\n constraint.shearMix += (shear - constraint.shearMix) * alpha;\r\n }\r\n };\r\n TransformConstraintTimeline.ENTRIES = 5;\r\n TransformConstraintTimeline.PREV_TIME = -5;\r\n TransformConstraintTimeline.PREV_ROTATE = -4;\r\n TransformConstraintTimeline.PREV_TRANSLATE = -3;\r\n TransformConstraintTimeline.PREV_SCALE = -2;\r\n TransformConstraintTimeline.PREV_SHEAR = -1;\r\n TransformConstraintTimeline.ROTATE = 1;\r\n TransformConstraintTimeline.TRANSLATE = 2;\r\n TransformConstraintTimeline.SCALE = 3;\r\n TransformConstraintTimeline.SHEAR = 4;\r\n return TransformConstraintTimeline;\r\n }(CurveTimeline));\r\n spine.TransformConstraintTimeline = TransformConstraintTimeline;\r\n var PathConstraintPositionTimeline = (function (_super) {\r\n __extends(PathConstraintPositionTimeline, _super);\r\n function PathConstraintPositionTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES);\r\n return _this;\r\n }\r\n PathConstraintPositionTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintPosition << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintPositionTimeline.prototype.setFrame = function (frameIndex, time, value) {\r\n frameIndex *= PathConstraintPositionTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + PathConstraintPositionTimeline.VALUE] = value;\r\n };\r\n PathConstraintPositionTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.position = constraint.data.position;\r\n return;\r\n case MixBlend.first:\r\n constraint.position += (constraint.data.position - constraint.position) * alpha;\r\n }\r\n return;\r\n }\r\n var position = 0;\r\n if (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES])\r\n position = frames[frames.length + PathConstraintPositionTimeline.PREV_VALUE];\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES);\r\n position = frames[frame + PathConstraintPositionTimeline.PREV_VALUE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintPositionTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintPositionTimeline.PREV_TIME] - frameTime));\r\n position += (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent;\r\n }\r\n if (blend == MixBlend.setup)\r\n constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\r\n else\r\n constraint.position += (position - constraint.position) * alpha;\r\n };\r\n PathConstraintPositionTimeline.ENTRIES = 2;\r\n PathConstraintPositionTimeline.PREV_TIME = -2;\r\n PathConstraintPositionTimeline.PREV_VALUE = -1;\r\n PathConstraintPositionTimeline.VALUE = 1;\r\n return PathConstraintPositionTimeline;\r\n }(CurveTimeline));\r\n spine.PathConstraintPositionTimeline = PathConstraintPositionTimeline;\r\n var PathConstraintSpacingTimeline = (function (_super) {\r\n __extends(PathConstraintSpacingTimeline, _super);\r\n function PathConstraintSpacingTimeline(frameCount) {\r\n return _super.call(this, frameCount) || this;\r\n }\r\n PathConstraintSpacingTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintSpacing << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintSpacingTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.spacing = constraint.data.spacing;\r\n return;\r\n case MixBlend.first:\r\n constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\r\n }\r\n return;\r\n }\r\n var spacing = 0;\r\n if (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES])\r\n spacing = frames[frames.length + PathConstraintSpacingTimeline.PREV_VALUE];\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES);\r\n spacing = frames[frame + PathConstraintSpacingTimeline.PREV_VALUE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintSpacingTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintSpacingTimeline.PREV_TIME] - frameTime));\r\n spacing += (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent;\r\n }\r\n if (blend == MixBlend.setup)\r\n constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\r\n else\r\n constraint.spacing += (spacing - constraint.spacing) * alpha;\r\n };\r\n return PathConstraintSpacingTimeline;\r\n }(PathConstraintPositionTimeline));\r\n spine.PathConstraintSpacingTimeline = PathConstraintSpacingTimeline;\r\n var PathConstraintMixTimeline = (function (_super) {\r\n __extends(PathConstraintMixTimeline, _super);\r\n function PathConstraintMixTimeline(frameCount) {\r\n var _this = _super.call(this, frameCount) || this;\r\n _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES);\r\n return _this;\r\n }\r\n PathConstraintMixTimeline.prototype.getPropertyId = function () {\r\n return (TimelineType.pathConstraintMix << 24) + this.pathConstraintIndex;\r\n };\r\n PathConstraintMixTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix) {\r\n frameIndex *= PathConstraintMixTimeline.ENTRIES;\r\n this.frames[frameIndex] = time;\r\n this.frames[frameIndex + PathConstraintMixTimeline.ROTATE] = rotateMix;\r\n this.frames[frameIndex + PathConstraintMixTimeline.TRANSLATE] = translateMix;\r\n };\r\n PathConstraintMixTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\r\n var frames = this.frames;\r\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\r\n if (!constraint.active)\r\n return;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case MixBlend.setup:\r\n constraint.rotateMix = constraint.data.rotateMix;\r\n constraint.translateMix = constraint.data.translateMix;\r\n return;\r\n case MixBlend.first:\r\n constraint.rotateMix += (constraint.data.rotateMix - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (constraint.data.translateMix - constraint.translateMix) * alpha;\r\n }\r\n return;\r\n }\r\n var rotate = 0, translate = 0;\r\n if (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) {\r\n rotate = frames[frames.length + PathConstraintMixTimeline.PREV_ROTATE];\r\n translate = frames[frames.length + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n }\r\n else {\r\n var frame = Animation.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES);\r\n rotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE];\r\n translate = frames[frame + PathConstraintMixTimeline.PREV_TRANSLATE];\r\n var frameTime = frames[frame];\r\n var percent = this.getCurvePercent(frame / PathConstraintMixTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintMixTimeline.PREV_TIME] - frameTime));\r\n rotate += (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent;\r\n translate += (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent;\r\n }\r\n if (blend == MixBlend.setup) {\r\n constraint.rotateMix = constraint.data.rotateMix + (rotate - constraint.data.rotateMix) * alpha;\r\n constraint.translateMix = constraint.data.translateMix + (translate - constraint.data.translateMix) * alpha;\r\n }\r\n else {\r\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\r\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\r\n }\r\n };\r\n PathConstraintMixTimeline.ENTRIES = 3;\r\n PathConstraintMixTimeline.PREV_TIME = -3;\r\n PathConstraintMixTimeline.PREV_ROTATE = -2;\r\n PathConstraintMixTimeline.PREV_TRANSLATE = -1;\r\n PathConstraintMixTimeline.ROTATE = 1;\r\n PathConstraintMixTimeline.TRANSLATE = 2;\r\n return PathConstraintMixTimeline;\r\n }(CurveTimeline));\r\n spine.PathConstraintMixTimeline = PathConstraintMixTimeline;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AnimationState = (function () {\r\n function AnimationState(data) {\r\n this.tracks = new Array();\r\n this.timeScale = 1;\r\n this.unkeyedState = 0;\r\n this.events = new Array();\r\n this.listeners = new Array();\r\n this.queue = new EventQueue(this);\r\n this.propertyIDs = new spine.IntSet();\r\n this.animationsChanged = false;\r\n this.trackEntryPool = new spine.Pool(function () { return new TrackEntry(); });\r\n this.data = data;\r\n }\r\n AnimationState.prototype.update = function (delta) {\r\n delta *= this.timeScale;\r\n var tracks = this.tracks;\r\n for (var i = 0, n = tracks.length; i < n; i++) {\r\n var current = tracks[i];\r\n if (current == null)\r\n continue;\r\n current.animationLast = current.nextAnimationLast;\r\n current.trackLast = current.nextTrackLast;\r\n var currentDelta = delta * current.timeScale;\r\n if (current.delay > 0) {\r\n current.delay -= currentDelta;\r\n if (current.delay > 0)\r\n continue;\r\n currentDelta = -current.delay;\r\n current.delay = 0;\r\n }\r\n var next = current.next;\r\n if (next != null) {\r\n var nextTime = current.trackLast - next.delay;\r\n if (nextTime >= 0) {\r\n next.delay = 0;\r\n next.trackTime += current.timeScale == 0 ? 0 : (nextTime / current.timeScale + delta) * next.timeScale;\r\n current.trackTime += currentDelta;\r\n this.setCurrent(i, next, true);\r\n while (next.mixingFrom != null) {\r\n next.mixTime += delta;\r\n next = next.mixingFrom;\r\n }\r\n continue;\r\n }\r\n }\r\n else if (current.trackLast >= current.trackEnd && current.mixingFrom == null) {\r\n tracks[i] = null;\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n continue;\r\n }\r\n if (current.mixingFrom != null && this.updateMixingFrom(current, delta)) {\r\n var from = current.mixingFrom;\r\n current.mixingFrom = null;\r\n if (from != null)\r\n from.mixingTo = null;\r\n while (from != null) {\r\n this.queue.end(from);\r\n from = from.mixingFrom;\r\n }\r\n }\r\n current.trackTime += currentDelta;\r\n }\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.updateMixingFrom = function (to, delta) {\r\n var from = to.mixingFrom;\r\n if (from == null)\r\n return true;\r\n var finished = this.updateMixingFrom(from, delta);\r\n from.animationLast = from.nextAnimationLast;\r\n from.trackLast = from.nextTrackLast;\r\n if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {\r\n if (from.totalAlpha == 0 || to.mixDuration == 0) {\r\n to.mixingFrom = from.mixingFrom;\r\n if (from.mixingFrom != null)\r\n from.mixingFrom.mixingTo = to;\r\n to.interruptAlpha = from.interruptAlpha;\r\n this.queue.end(from);\r\n }\r\n return finished;\r\n }\r\n from.trackTime += delta * from.timeScale;\r\n to.mixTime += delta;\r\n return false;\r\n };\r\n AnimationState.prototype.apply = function (skeleton) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n if (this.animationsChanged)\r\n this._animationsChanged();\r\n var events = this.events;\r\n var tracks = this.tracks;\r\n var applied = false;\r\n for (var i_16 = 0, n_1 = tracks.length; i_16 < n_1; i_16++) {\r\n var current = tracks[i_16];\r\n if (current == null || current.delay > 0)\r\n continue;\r\n applied = true;\r\n var blend = i_16 == 0 ? spine.MixBlend.first : current.mixBlend;\r\n var mix = current.alpha;\r\n if (current.mixingFrom != null)\r\n mix *= this.applyMixingFrom(current, skeleton, blend);\r\n else if (current.trackTime >= current.trackEnd && current.next == null)\r\n mix = 0;\r\n var animationLast = current.animationLast, animationTime = current.getAnimationTime();\r\n var timelineCount = current.animation.timelines.length;\r\n var timelines = current.animation.timelines;\r\n if ((i_16 == 0 && mix == 1) || blend == spine.MixBlend.add) {\r\n for (var ii = 0; ii < timelineCount; ii++) {\r\n spine.Utils.webkit602BugfixHelper(mix, blend);\r\n var timeline = timelines[ii];\r\n if (timeline instanceof spine.AttachmentTimeline)\r\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, blend, true);\r\n else\r\n timeline.apply(skeleton, animationLast, animationTime, events, mix, blend, spine.MixDirection.mixIn);\r\n }\r\n }\r\n else {\r\n var timelineMode = current.timelineMode;\r\n var firstFrame = current.timelinesRotation.length == 0;\r\n if (firstFrame)\r\n spine.Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null);\r\n var timelinesRotation = current.timelinesRotation;\r\n for (var ii = 0; ii < timelineCount; ii++) {\r\n var timeline_1 = timelines[ii];\r\n var timelineBlend = timelineMode[ii] == AnimationState.SUBSEQUENT ? blend : spine.MixBlend.setup;\r\n if (timeline_1 instanceof spine.RotateTimeline) {\r\n this.applyRotateTimeline(timeline_1, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame);\r\n }\r\n else if (timeline_1 instanceof spine.AttachmentTimeline) {\r\n this.applyAttachmentTimeline(timeline_1, skeleton, animationTime, blend, true);\r\n }\r\n else {\r\n spine.Utils.webkit602BugfixHelper(mix, blend);\r\n timeline_1.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, spine.MixDirection.mixIn);\r\n }\r\n }\r\n }\r\n this.queueEvents(current, animationTime);\r\n events.length = 0;\r\n current.nextAnimationLast = animationTime;\r\n current.nextTrackLast = current.trackTime;\r\n }\r\n var setupState = this.unkeyedState + AnimationState.SETUP;\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = skeleton.slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.attachmentState == setupState) {\r\n var attachmentName = slot.data.attachmentName;\r\n slot.attachment = (attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));\r\n }\r\n }\r\n this.unkeyedState += 2;\r\n this.queue.drain();\r\n return applied;\r\n };\r\n AnimationState.prototype.applyMixingFrom = function (to, skeleton, blend) {\r\n var from = to.mixingFrom;\r\n if (from.mixingFrom != null)\r\n this.applyMixingFrom(from, skeleton, blend);\r\n var mix = 0;\r\n if (to.mixDuration == 0) {\r\n mix = 1;\r\n if (blend == spine.MixBlend.first)\r\n blend = spine.MixBlend.setup;\r\n }\r\n else {\r\n mix = to.mixTime / to.mixDuration;\r\n if (mix > 1)\r\n mix = 1;\r\n if (blend != spine.MixBlend.first)\r\n blend = from.mixBlend;\r\n }\r\n var events = mix < from.eventThreshold ? this.events : null;\r\n var attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\r\n var animationLast = from.animationLast, animationTime = from.getAnimationTime();\r\n var timelineCount = from.animation.timelines.length;\r\n var timelines = from.animation.timelines;\r\n var alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\r\n if (blend == spine.MixBlend.add) {\r\n for (var i = 0; i < timelineCount; i++)\r\n timelines[i].apply(skeleton, animationLast, animationTime, events, alphaMix, blend, spine.MixDirection.mixOut);\r\n }\r\n else {\r\n var timelineMode = from.timelineMode;\r\n var timelineHoldMix = from.timelineHoldMix;\r\n var firstFrame = from.timelinesRotation.length == 0;\r\n if (firstFrame)\r\n spine.Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null);\r\n var timelinesRotation = from.timelinesRotation;\r\n from.totalAlpha = 0;\r\n for (var i = 0; i < timelineCount; i++) {\r\n var timeline = timelines[i];\r\n var direction = spine.MixDirection.mixOut;\r\n var timelineBlend = void 0;\r\n var alpha = 0;\r\n switch (timelineMode[i]) {\r\n case AnimationState.SUBSEQUENT:\r\n if (!drawOrder && timeline instanceof spine.DrawOrderTimeline)\r\n continue;\r\n timelineBlend = blend;\r\n alpha = alphaMix;\r\n break;\r\n case AnimationState.FIRST:\r\n timelineBlend = spine.MixBlend.setup;\r\n alpha = alphaMix;\r\n break;\r\n case AnimationState.HOLD_SUBSEQUENT:\r\n timelineBlend = blend;\r\n alpha = alphaHold;\r\n break;\r\n case AnimationState.HOLD_FIRST:\r\n timelineBlend = spine.MixBlend.setup;\r\n alpha = alphaHold;\r\n break;\r\n default:\r\n timelineBlend = spine.MixBlend.setup;\r\n var holdMix = timelineHoldMix[i];\r\n alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\r\n break;\r\n }\r\n from.totalAlpha += alpha;\r\n if (timeline instanceof spine.RotateTimeline)\r\n this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame);\r\n else if (timeline instanceof spine.AttachmentTimeline)\r\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, timelineBlend, attachments);\r\n else {\r\n spine.Utils.webkit602BugfixHelper(alpha, blend);\r\n if (drawOrder && timeline instanceof spine.DrawOrderTimeline && timelineBlend == spine.MixBlend.setup)\r\n direction = spine.MixDirection.mixIn;\r\n timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, direction);\r\n }\r\n }\r\n }\r\n if (to.mixDuration > 0)\r\n this.queueEvents(from, animationTime);\r\n this.events.length = 0;\r\n from.nextAnimationLast = animationTime;\r\n from.nextTrackLast = from.trackTime;\r\n return mix;\r\n };\r\n AnimationState.prototype.applyAttachmentTimeline = function (timeline, skeleton, time, blend, attachments) {\r\n var slot = skeleton.slots[timeline.slotIndex];\r\n if (!slot.bone.active)\r\n return;\r\n var frames = timeline.frames;\r\n if (time < frames[0]) {\r\n if (blend == spine.MixBlend.setup || blend == spine.MixBlend.first)\r\n this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments);\r\n }\r\n else {\r\n var frameIndex;\r\n if (time >= frames[frames.length - 1])\r\n frameIndex = frames.length - 1;\r\n else\r\n frameIndex = spine.Animation.binarySearch(frames, time) - 1;\r\n this.setAttachment(skeleton, slot, timeline.attachmentNames[frameIndex], attachments);\r\n }\r\n if (slot.attachmentState <= this.unkeyedState)\r\n slot.attachmentState = this.unkeyedState + AnimationState.SETUP;\r\n };\r\n AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) {\r\n slot.attachment = attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName);\r\n if (attachments)\r\n slot.attachmentState = this.unkeyedState + AnimationState.CURRENT;\r\n };\r\n AnimationState.prototype.applyRotateTimeline = function (timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) {\r\n if (firstFrame)\r\n timelinesRotation[i] = 0;\r\n if (alpha == 1) {\r\n timeline.apply(skeleton, 0, time, null, 1, blend, spine.MixDirection.mixIn);\r\n return;\r\n }\r\n var rotateTimeline = timeline;\r\n var frames = rotateTimeline.frames;\r\n var bone = skeleton.bones[rotateTimeline.boneIndex];\r\n if (!bone.active)\r\n return;\r\n var r1 = 0, r2 = 0;\r\n if (time < frames[0]) {\r\n switch (blend) {\r\n case spine.MixBlend.setup:\r\n bone.rotation = bone.data.rotation;\r\n default:\r\n return;\r\n case spine.MixBlend.first:\r\n r1 = bone.rotation;\r\n r2 = bone.data.rotation;\r\n }\r\n }\r\n else {\r\n r1 = blend == spine.MixBlend.setup ? bone.data.rotation : bone.rotation;\r\n if (time >= frames[frames.length - spine.RotateTimeline.ENTRIES])\r\n r2 = bone.data.rotation + frames[frames.length + spine.RotateTimeline.PREV_ROTATION];\r\n else {\r\n var frame = spine.Animation.binarySearch(frames, time, spine.RotateTimeline.ENTRIES);\r\n var prevRotation = frames[frame + spine.RotateTimeline.PREV_ROTATION];\r\n var frameTime = frames[frame];\r\n var percent = rotateTimeline.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + spine.RotateTimeline.PREV_TIME] - frameTime));\r\n r2 = frames[frame + spine.RotateTimeline.ROTATION] - prevRotation;\r\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n r2 = prevRotation + r2 * percent + bone.data.rotation;\r\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\r\n }\r\n }\r\n var total = 0, diff = r2 - r1;\r\n diff -= (16384 - ((16384.499999999996 - diff / 360) | 0)) * 360;\r\n if (diff == 0) {\r\n total = timelinesRotation[i];\r\n }\r\n else {\r\n var lastTotal = 0, lastDiff = 0;\r\n if (firstFrame) {\r\n lastTotal = 0;\r\n lastDiff = diff;\r\n }\r\n else {\r\n lastTotal = timelinesRotation[i];\r\n lastDiff = timelinesRotation[i + 1];\r\n }\r\n var current = diff > 0, dir = lastTotal >= 0;\r\n if (spine.MathUtils.signum(lastDiff) != spine.MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\r\n if (Math.abs(lastTotal) > 180)\r\n lastTotal += 360 * spine.MathUtils.signum(lastTotal);\r\n dir = current;\r\n }\r\n total = diff + lastTotal - lastTotal % 360;\r\n if (dir != current)\r\n total += 360 * spine.MathUtils.signum(lastTotal);\r\n timelinesRotation[i] = total;\r\n }\r\n timelinesRotation[i + 1] = diff;\r\n r1 += total * alpha;\r\n bone.rotation = r1 - (16384 - ((16384.499999999996 - r1 / 360) | 0)) * 360;\r\n };\r\n AnimationState.prototype.queueEvents = function (entry, animationTime) {\r\n var animationStart = entry.animationStart, animationEnd = entry.animationEnd;\r\n var duration = animationEnd - animationStart;\r\n var trackLastWrapped = entry.trackLast % duration;\r\n var events = this.events;\r\n var i = 0, n = events.length;\r\n for (; i < n; i++) {\r\n var event_1 = events[i];\r\n if (event_1.time < trackLastWrapped)\r\n break;\r\n if (event_1.time > animationEnd)\r\n continue;\r\n this.queue.event(entry, event_1);\r\n }\r\n var complete = false;\r\n if (entry.loop)\r\n complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;\r\n else\r\n complete = animationTime >= animationEnd && entry.animationLast < animationEnd;\r\n if (complete)\r\n this.queue.complete(entry);\r\n for (; i < n; i++) {\r\n var event_2 = events[i];\r\n if (event_2.time < animationStart)\r\n continue;\r\n this.queue.event(entry, events[i]);\r\n }\r\n };\r\n AnimationState.prototype.clearTracks = function () {\r\n var oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (var i = 0, n = this.tracks.length; i < n; i++)\r\n this.clearTrack(i);\r\n this.tracks.length = 0;\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.clearTrack = function (trackIndex) {\r\n if (trackIndex >= this.tracks.length)\r\n return;\r\n var current = this.tracks[trackIndex];\r\n if (current == null)\r\n return;\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n var entry = current;\r\n while (true) {\r\n var from = entry.mixingFrom;\r\n if (from == null)\r\n break;\r\n this.queue.end(from);\r\n entry.mixingFrom = null;\r\n entry.mixingTo = null;\r\n entry = from;\r\n }\r\n this.tracks[current.trackIndex] = null;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.setCurrent = function (index, current, interrupt) {\r\n var from = this.expandToIndex(index);\r\n this.tracks[index] = current;\r\n if (from != null) {\r\n if (interrupt)\r\n this.queue.interrupt(from);\r\n current.mixingFrom = from;\r\n from.mixingTo = current;\r\n current.mixTime = 0;\r\n if (from.mixingFrom != null && from.mixDuration > 0)\r\n current.interruptAlpha *= Math.min(1, from.mixTime / from.mixDuration);\r\n from.timelinesRotation.length = 0;\r\n }\r\n this.queue.start(current);\r\n };\r\n AnimationState.prototype.setAnimation = function (trackIndex, animationName, loop) {\r\n var animation = this.data.skeletonData.findAnimation(animationName);\r\n if (animation == null)\r\n throw new Error(\"Animation not found: \" + animationName);\r\n return this.setAnimationWith(trackIndex, animation, loop);\r\n };\r\n AnimationState.prototype.setAnimationWith = function (trackIndex, animation, loop) {\r\n if (animation == null)\r\n throw new Error(\"animation cannot be null.\");\r\n var interrupt = true;\r\n var current = this.expandToIndex(trackIndex);\r\n if (current != null) {\r\n if (current.nextTrackLast == -1) {\r\n this.tracks[trackIndex] = current.mixingFrom;\r\n this.queue.interrupt(current);\r\n this.queue.end(current);\r\n this.disposeNext(current);\r\n current = current.mixingFrom;\r\n interrupt = false;\r\n }\r\n else\r\n this.disposeNext(current);\r\n }\r\n var entry = this.trackEntry(trackIndex, animation, loop, current);\r\n this.setCurrent(trackIndex, entry, interrupt);\r\n this.queue.drain();\r\n return entry;\r\n };\r\n AnimationState.prototype.addAnimation = function (trackIndex, animationName, loop, delay) {\r\n var animation = this.data.skeletonData.findAnimation(animationName);\r\n if (animation == null)\r\n throw new Error(\"Animation not found: \" + animationName);\r\n return this.addAnimationWith(trackIndex, animation, loop, delay);\r\n };\r\n AnimationState.prototype.addAnimationWith = function (trackIndex, animation, loop, delay) {\r\n if (animation == null)\r\n throw new Error(\"animation cannot be null.\");\r\n var last = this.expandToIndex(trackIndex);\r\n if (last != null) {\r\n while (last.next != null)\r\n last = last.next;\r\n }\r\n var entry = this.trackEntry(trackIndex, animation, loop, last);\r\n if (last == null) {\r\n this.setCurrent(trackIndex, entry, true);\r\n this.queue.drain();\r\n }\r\n else {\r\n last.next = entry;\r\n if (delay <= 0) {\r\n var duration = last.animationEnd - last.animationStart;\r\n if (duration != 0) {\r\n if (last.loop)\r\n delay += duration * (1 + ((last.trackTime / duration) | 0));\r\n else\r\n delay += Math.max(duration, last.trackTime);\r\n delay -= this.data.getMix(last.animation, animation);\r\n }\r\n else\r\n delay = last.trackTime;\r\n }\r\n }\r\n entry.delay = delay;\r\n return entry;\r\n };\r\n AnimationState.prototype.setEmptyAnimation = function (trackIndex, mixDuration) {\r\n var entry = this.setAnimationWith(trackIndex, AnimationState.emptyAnimation, false);\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n };\r\n AnimationState.prototype.addEmptyAnimation = function (trackIndex, mixDuration, delay) {\r\n if (delay <= 0)\r\n delay -= mixDuration;\r\n var entry = this.addAnimationWith(trackIndex, AnimationState.emptyAnimation, false, delay);\r\n entry.mixDuration = mixDuration;\r\n entry.trackEnd = mixDuration;\r\n return entry;\r\n };\r\n AnimationState.prototype.setEmptyAnimations = function (mixDuration) {\r\n var oldDrainDisabled = this.queue.drainDisabled;\r\n this.queue.drainDisabled = true;\r\n for (var i = 0, n = this.tracks.length; i < n; i++) {\r\n var current = this.tracks[i];\r\n if (current != null)\r\n this.setEmptyAnimation(current.trackIndex, mixDuration);\r\n }\r\n this.queue.drainDisabled = oldDrainDisabled;\r\n this.queue.drain();\r\n };\r\n AnimationState.prototype.expandToIndex = function (index) {\r\n if (index < this.tracks.length)\r\n return this.tracks[index];\r\n spine.Utils.ensureArrayCapacity(this.tracks, index + 1, null);\r\n this.tracks.length = index + 1;\r\n return null;\r\n };\r\n AnimationState.prototype.trackEntry = function (trackIndex, animation, loop, last) {\r\n var entry = this.trackEntryPool.obtain();\r\n entry.trackIndex = trackIndex;\r\n entry.animation = animation;\r\n entry.loop = loop;\r\n entry.holdPrevious = false;\r\n entry.eventThreshold = 0;\r\n entry.attachmentThreshold = 0;\r\n entry.drawOrderThreshold = 0;\r\n entry.animationStart = 0;\r\n entry.animationEnd = animation.duration;\r\n entry.animationLast = -1;\r\n entry.nextAnimationLast = -1;\r\n entry.delay = 0;\r\n entry.trackTime = 0;\r\n entry.trackLast = -1;\r\n entry.nextTrackLast = -1;\r\n entry.trackEnd = Number.MAX_VALUE;\r\n entry.timeScale = 1;\r\n entry.alpha = 1;\r\n entry.interruptAlpha = 1;\r\n entry.mixTime = 0;\r\n entry.mixDuration = last == null ? 0 : this.data.getMix(last.animation, animation);\r\n entry.mixBlend = spine.MixBlend.replace;\r\n return entry;\r\n };\r\n AnimationState.prototype.disposeNext = function (entry) {\r\n var next = entry.next;\r\n while (next != null) {\r\n this.queue.dispose(next);\r\n next = next.next;\r\n }\r\n entry.next = null;\r\n };\r\n AnimationState.prototype._animationsChanged = function () {\r\n this.animationsChanged = false;\r\n this.propertyIDs.clear();\r\n for (var i = 0, n = this.tracks.length; i < n; i++) {\r\n var entry = this.tracks[i];\r\n if (entry == null)\r\n continue;\r\n while (entry.mixingFrom != null)\r\n entry = entry.mixingFrom;\r\n do {\r\n if (entry.mixingFrom == null || entry.mixBlend != spine.MixBlend.add)\r\n this.computeHold(entry);\r\n entry = entry.mixingTo;\r\n } while (entry != null);\r\n }\r\n };\r\n AnimationState.prototype.computeHold = function (entry) {\r\n var to = entry.mixingTo;\r\n var timelines = entry.animation.timelines;\r\n var timelinesCount = entry.animation.timelines.length;\r\n var timelineMode = spine.Utils.setArraySize(entry.timelineMode, timelinesCount);\r\n entry.timelineHoldMix.length = 0;\r\n var timelineDipMix = spine.Utils.setArraySize(entry.timelineHoldMix, timelinesCount);\r\n var propertyIDs = this.propertyIDs;\r\n if (to != null && to.holdPrevious) {\r\n for (var i = 0; i < timelinesCount; i++) {\r\n timelineMode[i] = propertyIDs.add(timelines[i].getPropertyId()) ? AnimationState.HOLD_FIRST : AnimationState.HOLD_SUBSEQUENT;\r\n }\r\n return;\r\n }\r\n outer: for (var i = 0; i < timelinesCount; i++) {\r\n var timeline = timelines[i];\r\n var id = timeline.getPropertyId();\r\n if (!propertyIDs.add(id))\r\n timelineMode[i] = AnimationState.SUBSEQUENT;\r\n else if (to == null || timeline instanceof spine.AttachmentTimeline || timeline instanceof spine.DrawOrderTimeline\r\n || timeline instanceof spine.EventTimeline || !to.animation.hasTimeline(id)) {\r\n timelineMode[i] = AnimationState.FIRST;\r\n }\r\n else {\r\n for (var next = to.mixingTo; next != null; next = next.mixingTo) {\r\n if (next.animation.hasTimeline(id))\r\n continue;\r\n if (entry.mixDuration > 0) {\r\n timelineMode[i] = AnimationState.HOLD_MIX;\r\n timelineDipMix[i] = next;\r\n continue outer;\r\n }\r\n break;\r\n }\r\n timelineMode[i] = AnimationState.HOLD_FIRST;\r\n }\r\n }\r\n };\r\n AnimationState.prototype.getCurrent = function (trackIndex) {\r\n if (trackIndex >= this.tracks.length)\r\n return null;\r\n return this.tracks[trackIndex];\r\n };\r\n AnimationState.prototype.addListener = function (listener) {\r\n if (listener == null)\r\n throw new Error(\"listener cannot be null.\");\r\n this.listeners.push(listener);\r\n };\r\n AnimationState.prototype.removeListener = function (listener) {\r\n var index = this.listeners.indexOf(listener);\r\n if (index >= 0)\r\n this.listeners.splice(index, 1);\r\n };\r\n AnimationState.prototype.clearListeners = function () {\r\n this.listeners.length = 0;\r\n };\r\n AnimationState.prototype.clearListenerNotifications = function () {\r\n this.queue.clear();\r\n };\r\n AnimationState.emptyAnimation = new spine.Animation(\"\", [], 0);\r\n AnimationState.SUBSEQUENT = 0;\r\n AnimationState.FIRST = 1;\r\n AnimationState.HOLD_SUBSEQUENT = 2;\r\n AnimationState.HOLD_FIRST = 3;\r\n AnimationState.HOLD_MIX = 4;\r\n AnimationState.SETUP = 1;\r\n AnimationState.CURRENT = 2;\r\n return AnimationState;\r\n }());\r\n spine.AnimationState = AnimationState;\r\n var TrackEntry = (function () {\r\n function TrackEntry() {\r\n this.mixBlend = spine.MixBlend.replace;\r\n this.timelineMode = new Array();\r\n this.timelineHoldMix = new Array();\r\n this.timelinesRotation = new Array();\r\n }\r\n TrackEntry.prototype.reset = function () {\r\n this.next = null;\r\n this.mixingFrom = null;\r\n this.mixingTo = null;\r\n this.animation = null;\r\n this.listener = null;\r\n this.timelineMode.length = 0;\r\n this.timelineHoldMix.length = 0;\r\n this.timelinesRotation.length = 0;\r\n };\r\n TrackEntry.prototype.getAnimationTime = function () {\r\n if (this.loop) {\r\n var duration = this.animationEnd - this.animationStart;\r\n if (duration == 0)\r\n return this.animationStart;\r\n return (this.trackTime % duration) + this.animationStart;\r\n }\r\n return Math.min(this.trackTime + this.animationStart, this.animationEnd);\r\n };\r\n TrackEntry.prototype.setAnimationLast = function (animationLast) {\r\n this.animationLast = animationLast;\r\n this.nextAnimationLast = animationLast;\r\n };\r\n TrackEntry.prototype.isComplete = function () {\r\n return this.trackTime >= this.animationEnd - this.animationStart;\r\n };\r\n TrackEntry.prototype.resetRotationDirections = function () {\r\n this.timelinesRotation.length = 0;\r\n };\r\n return TrackEntry;\r\n }());\r\n spine.TrackEntry = TrackEntry;\r\n var EventQueue = (function () {\r\n function EventQueue(animState) {\r\n this.objects = [];\r\n this.drainDisabled = false;\r\n this.animState = animState;\r\n }\r\n EventQueue.prototype.start = function (entry) {\r\n this.objects.push(EventType.start);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n };\r\n EventQueue.prototype.interrupt = function (entry) {\r\n this.objects.push(EventType.interrupt);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.end = function (entry) {\r\n this.objects.push(EventType.end);\r\n this.objects.push(entry);\r\n this.animState.animationsChanged = true;\r\n };\r\n EventQueue.prototype.dispose = function (entry) {\r\n this.objects.push(EventType.dispose);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.complete = function (entry) {\r\n this.objects.push(EventType.complete);\r\n this.objects.push(entry);\r\n };\r\n EventQueue.prototype.event = function (entry, event) {\r\n this.objects.push(EventType.event);\r\n this.objects.push(entry);\r\n this.objects.push(event);\r\n };\r\n EventQueue.prototype.drain = function () {\r\n if (this.drainDisabled)\r\n return;\r\n this.drainDisabled = true;\r\n var objects = this.objects;\r\n var listeners = this.animState.listeners;\r\n for (var i = 0; i < objects.length; i += 2) {\r\n var type = objects[i];\r\n var entry = objects[i + 1];\r\n switch (type) {\r\n case EventType.start:\r\n if (entry.listener != null && entry.listener.start)\r\n entry.listener.start(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].start)\r\n listeners[ii].start(entry);\r\n break;\r\n case EventType.interrupt:\r\n if (entry.listener != null && entry.listener.interrupt)\r\n entry.listener.interrupt(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].interrupt)\r\n listeners[ii].interrupt(entry);\r\n break;\r\n case EventType.end:\r\n if (entry.listener != null && entry.listener.end)\r\n entry.listener.end(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].end)\r\n listeners[ii].end(entry);\r\n case EventType.dispose:\r\n if (entry.listener != null && entry.listener.dispose)\r\n entry.listener.dispose(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].dispose)\r\n listeners[ii].dispose(entry);\r\n this.animState.trackEntryPool.free(entry);\r\n break;\r\n case EventType.complete:\r\n if (entry.listener != null && entry.listener.complete)\r\n entry.listener.complete(entry);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].complete)\r\n listeners[ii].complete(entry);\r\n break;\r\n case EventType.event:\r\n var event_3 = objects[i++ + 2];\r\n if (entry.listener != null && entry.listener.event)\r\n entry.listener.event(entry, event_3);\r\n for (var ii = 0; ii < listeners.length; ii++)\r\n if (listeners[ii].event)\r\n listeners[ii].event(entry, event_3);\r\n break;\r\n }\r\n }\r\n this.clear();\r\n this.drainDisabled = false;\r\n };\r\n EventQueue.prototype.clear = function () {\r\n this.objects.length = 0;\r\n };\r\n return EventQueue;\r\n }());\r\n spine.EventQueue = EventQueue;\r\n var EventType;\r\n (function (EventType) {\r\n EventType[EventType[\"start\"] = 0] = \"start\";\r\n EventType[EventType[\"interrupt\"] = 1] = \"interrupt\";\r\n EventType[EventType[\"end\"] = 2] = \"end\";\r\n EventType[EventType[\"dispose\"] = 3] = \"dispose\";\r\n EventType[EventType[\"complete\"] = 4] = \"complete\";\r\n EventType[EventType[\"event\"] = 5] = \"event\";\r\n })(EventType = spine.EventType || (spine.EventType = {}));\r\n var AnimationStateAdapter = (function () {\r\n function AnimationStateAdapter() {\r\n }\r\n AnimationStateAdapter.prototype.start = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.interrupt = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.end = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.dispose = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.complete = function (entry) {\r\n };\r\n AnimationStateAdapter.prototype.event = function (entry, event) {\r\n };\r\n return AnimationStateAdapter;\r\n }());\r\n spine.AnimationStateAdapter = AnimationStateAdapter;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AnimationStateData = (function () {\r\n function AnimationStateData(skeletonData) {\r\n this.animationToMixTime = {};\r\n this.defaultMix = 0;\r\n if (skeletonData == null)\r\n throw new Error(\"skeletonData cannot be null.\");\r\n this.skeletonData = skeletonData;\r\n }\r\n AnimationStateData.prototype.setMix = function (fromName, toName, duration) {\r\n var from = this.skeletonData.findAnimation(fromName);\r\n if (from == null)\r\n throw new Error(\"Animation not found: \" + fromName);\r\n var to = this.skeletonData.findAnimation(toName);\r\n if (to == null)\r\n throw new Error(\"Animation not found: \" + toName);\r\n this.setMixWith(from, to, duration);\r\n };\r\n AnimationStateData.prototype.setMixWith = function (from, to, duration) {\r\n if (from == null)\r\n throw new Error(\"from cannot be null.\");\r\n if (to == null)\r\n throw new Error(\"to cannot be null.\");\r\n var key = from.name + \".\" + to.name;\r\n this.animationToMixTime[key] = duration;\r\n };\r\n AnimationStateData.prototype.getMix = function (from, to) {\r\n var key = from.name + \".\" + to.name;\r\n var value = this.animationToMixTime[key];\r\n return value === undefined ? this.defaultMix : value;\r\n };\r\n return AnimationStateData;\r\n }());\r\n spine.AnimationStateData = AnimationStateData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AssetManager = (function () {\r\n function AssetManager(textureLoader, pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n this.assets = {};\r\n this.errors = {};\r\n this.toLoad = 0;\r\n this.loaded = 0;\r\n this.rawDataUris = {};\r\n this.textureLoader = textureLoader;\r\n this.pathPrefix = pathPrefix;\r\n }\r\n AssetManager.prototype.downloadText = function (url, success, error) {\r\n var request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n if (this.rawDataUris[url])\r\n url = this.rawDataUris[url];\r\n request.open(\"GET\", url, true);\r\n request.onload = function () {\r\n if (request.status == 200) {\r\n success(request.responseText);\r\n }\r\n else {\r\n error(request.status, request.responseText);\r\n }\r\n };\r\n request.onerror = function () {\r\n error(request.status, request.responseText);\r\n };\r\n request.send();\r\n };\r\n AssetManager.prototype.downloadBinary = function (url, success, error) {\r\n var request = new XMLHttpRequest();\r\n if (this.rawDataUris[url])\r\n url = this.rawDataUris[url];\r\n request.open(\"GET\", url, true);\r\n request.responseType = \"arraybuffer\";\r\n request.onload = function () {\r\n if (request.status == 200) {\r\n success(new Uint8Array(request.response));\r\n }\r\n else {\r\n error(request.status, request.responseText);\r\n }\r\n };\r\n request.onerror = function () {\r\n error(request.status, request.responseText);\r\n };\r\n request.send();\r\n };\r\n AssetManager.prototype.setRawDataURI = function (path, data) {\r\n this.rawDataUris[this.pathPrefix + path] = data;\r\n };\r\n AssetManager.prototype.loadBinary = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n this.downloadBinary(path, function (data) {\r\n _this.assets[path] = data;\r\n if (success)\r\n success(path, data);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load binary \" + path + \": status \" + status + \", \" + responseText;\r\n if (error)\r\n error(path, \"Couldn't load binary \" + path + \": status \" + status + \", \" + responseText);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.loadText = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n this.downloadText(path, function (data) {\r\n _this.assets[path] = data;\r\n if (success)\r\n success(path, data);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load text \" + path + \": status \" + status + \", \" + responseText;\r\n if (error)\r\n error(path, \"Couldn't load text \" + path + \": status \" + status + \", \" + responseText);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.loadTexture = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n path = this.pathPrefix + path;\r\n var storagePath = path;\r\n this.toLoad++;\r\n var img = new Image();\r\n img.crossOrigin = \"anonymous\";\r\n img.onload = function (ev) {\r\n var texture = _this.textureLoader(img);\r\n _this.assets[storagePath] = texture;\r\n _this.toLoad--;\r\n _this.loaded++;\r\n if (success)\r\n success(path, img);\r\n };\r\n img.onerror = function (ev) {\r\n _this.errors[path] = \"Couldn't load image \" + path;\r\n _this.toLoad--;\r\n _this.loaded++;\r\n if (error)\r\n error(path, \"Couldn't load image \" + path);\r\n };\r\n if (this.rawDataUris[path])\r\n path = this.rawDataUris[path];\r\n img.src = path;\r\n };\r\n AssetManager.prototype.loadTextureAtlas = function (path, success, error) {\r\n var _this = this;\r\n if (success === void 0) { success = null; }\r\n if (error === void 0) { error = null; }\r\n var parent = path.lastIndexOf(\"/\") >= 0 ? path.substring(0, path.lastIndexOf(\"/\")) : \"\";\r\n path = this.pathPrefix + path;\r\n this.toLoad++;\r\n this.downloadText(path, function (atlasData) {\r\n var pagesLoaded = { count: 0 };\r\n var atlasPages = new Array();\r\n try {\r\n var atlas = new spine.TextureAtlas(atlasData, function (path) {\r\n atlasPages.push(parent == \"\" ? path : parent + \"/\" + path);\r\n var image = document.createElement(\"img\");\r\n image.width = 16;\r\n image.height = 16;\r\n return new spine.FakeTexture(image);\r\n });\r\n }\r\n catch (e) {\r\n var ex = e;\r\n _this.errors[path] = \"Couldn't load texture atlas \" + path + \": \" + ex.message;\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \" + path + \": \" + ex.message);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n return;\r\n }\r\n var _loop_1 = function (atlasPage) {\r\n var pageLoadError = false;\r\n _this.loadTexture(atlasPage, function (imagePath, image) {\r\n pagesLoaded.count++;\r\n if (pagesLoaded.count == atlasPages.length) {\r\n if (!pageLoadError) {\r\n try {\r\n var atlas = new spine.TextureAtlas(atlasData, function (path) {\r\n return _this.get(parent == \"\" ? path : parent + \"/\" + path);\r\n });\r\n _this.assets[path] = atlas;\r\n if (success)\r\n success(path, atlas);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n catch (e) {\r\n var ex = e;\r\n _this.errors[path] = \"Couldn't load texture atlas \" + path + \": \" + ex.message;\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \" + path + \": \" + ex.message);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load texture atlas page \" + imagePath + \"} of atlas \" + path;\r\n if (error)\r\n error(path, \"Couldn't load texture atlas page \" + imagePath + \" of atlas \" + path);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n }\r\n }, function (imagePath, errorMessage) {\r\n pageLoadError = true;\r\n pagesLoaded.count++;\r\n if (pagesLoaded.count == atlasPages.length) {\r\n _this.errors[path] = \"Couldn't load texture atlas page \" + imagePath + \"} of atlas \" + path;\r\n if (error)\r\n error(path, \"Couldn't load texture atlas page \" + imagePath + \" of atlas \" + path);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n }\r\n });\r\n };\r\n for (var _i = 0, atlasPages_1 = atlasPages; _i < atlasPages_1.length; _i++) {\r\n var atlasPage = atlasPages_1[_i];\r\n _loop_1(atlasPage);\r\n }\r\n }, function (state, responseText) {\r\n _this.errors[path] = \"Couldn't load texture atlas \" + path + \": status \" + status + \", \" + responseText;\r\n if (error)\r\n error(path, \"Couldn't load texture atlas \" + path + \": status \" + status + \", \" + responseText);\r\n _this.toLoad--;\r\n _this.loaded++;\r\n });\r\n };\r\n AssetManager.prototype.get = function (path) {\r\n path = this.pathPrefix + path;\r\n return this.assets[path];\r\n };\r\n AssetManager.prototype.remove = function (path) {\r\n path = this.pathPrefix + path;\r\n var asset = this.assets[path];\r\n if (asset.dispose)\r\n asset.dispose();\r\n this.assets[path] = null;\r\n };\r\n AssetManager.prototype.removeAll = function () {\r\n for (var key in this.assets) {\r\n var asset = this.assets[key];\r\n if (asset.dispose)\r\n asset.dispose();\r\n }\r\n this.assets = {};\r\n };\r\n AssetManager.prototype.isLoadingComplete = function () {\r\n return this.toLoad == 0;\r\n };\r\n AssetManager.prototype.getToLoad = function () {\r\n return this.toLoad;\r\n };\r\n AssetManager.prototype.getLoaded = function () {\r\n return this.loaded;\r\n };\r\n AssetManager.prototype.dispose = function () {\r\n this.removeAll();\r\n };\r\n AssetManager.prototype.hasErrors = function () {\r\n return Object.keys(this.errors).length > 0;\r\n };\r\n AssetManager.prototype.getErrors = function () {\r\n return this.errors;\r\n };\r\n return AssetManager;\r\n }());\r\n spine.AssetManager = AssetManager;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AtlasAttachmentLoader = (function () {\r\n function AtlasAttachmentLoader(atlas) {\r\n this.atlas = atlas;\r\n }\r\n AtlasAttachmentLoader.prototype.newRegionAttachment = function (skin, name, path) {\r\n var region = this.atlas.findRegion(path);\r\n if (region == null)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\r\n region.renderObject = region;\r\n var attachment = new spine.RegionAttachment(name);\r\n attachment.setRegion(region);\r\n return attachment;\r\n };\r\n AtlasAttachmentLoader.prototype.newMeshAttachment = function (skin, name, path) {\r\n var region = this.atlas.findRegion(path);\r\n if (region == null)\r\n throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\r\n region.renderObject = region;\r\n var attachment = new spine.MeshAttachment(name);\r\n attachment.region = region;\r\n return attachment;\r\n };\r\n AtlasAttachmentLoader.prototype.newBoundingBoxAttachment = function (skin, name) {\r\n return new spine.BoundingBoxAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newPathAttachment = function (skin, name) {\r\n return new spine.PathAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newPointAttachment = function (skin, name) {\r\n return new spine.PointAttachment(name);\r\n };\r\n AtlasAttachmentLoader.prototype.newClippingAttachment = function (skin, name) {\r\n return new spine.ClippingAttachment(name);\r\n };\r\n return AtlasAttachmentLoader;\r\n }());\r\n spine.AtlasAttachmentLoader = AtlasAttachmentLoader;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BlendMode;\r\n (function (BlendMode) {\r\n BlendMode[BlendMode[\"Normal\"] = 0] = \"Normal\";\r\n BlendMode[BlendMode[\"Additive\"] = 1] = \"Additive\";\r\n BlendMode[BlendMode[\"Multiply\"] = 2] = \"Multiply\";\r\n BlendMode[BlendMode[\"Screen\"] = 3] = \"Screen\";\r\n })(BlendMode = spine.BlendMode || (spine.BlendMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Bone = (function () {\r\n function Bone(data, skeleton, parent) {\r\n this.children = new Array();\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.scaleX = 0;\r\n this.scaleY = 0;\r\n this.shearX = 0;\r\n this.shearY = 0;\r\n this.ax = 0;\r\n this.ay = 0;\r\n this.arotation = 0;\r\n this.ascaleX = 0;\r\n this.ascaleY = 0;\r\n this.ashearX = 0;\r\n this.ashearY = 0;\r\n this.appliedValid = false;\r\n this.a = 0;\r\n this.b = 0;\r\n this.c = 0;\r\n this.d = 0;\r\n this.worldY = 0;\r\n this.worldX = 0;\r\n this.sorted = false;\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.skeleton = skeleton;\r\n this.parent = parent;\r\n this.setToSetupPose();\r\n }\r\n Bone.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n Bone.prototype.update = function () {\r\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n };\r\n Bone.prototype.updateWorldTransform = function () {\r\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\r\n };\r\n Bone.prototype.updateWorldTransformWith = function (x, y, rotation, scaleX, scaleY, shearX, shearY) {\r\n this.ax = x;\r\n this.ay = y;\r\n this.arotation = rotation;\r\n this.ascaleX = scaleX;\r\n this.ascaleY = scaleY;\r\n this.ashearX = shearX;\r\n this.ashearY = shearY;\r\n this.appliedValid = true;\r\n var parent = this.parent;\r\n if (parent == null) {\r\n var skeleton = this.skeleton;\r\n var rotationY = rotation + 90 + shearY;\r\n var sx = skeleton.scaleX;\r\n var sy = skeleton.scaleY;\r\n this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\r\n this.b = spine.MathUtils.cosDeg(rotationY) * scaleY * sx;\r\n this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\r\n this.d = spine.MathUtils.sinDeg(rotationY) * scaleY * sy;\r\n this.worldX = x * sx + skeleton.x;\r\n this.worldY = y * sy + skeleton.y;\r\n return;\r\n }\r\n var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n this.worldX = pa * x + pb * y + parent.worldX;\r\n this.worldY = pc * x + pd * y + parent.worldY;\r\n switch (this.data.transformMode) {\r\n case spine.TransformMode.Normal: {\r\n var rotationY = rotation + 90 + shearY;\r\n var la = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(rotationY) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(rotationY) * scaleY;\r\n this.a = pa * la + pb * lc;\r\n this.b = pa * lb + pb * ld;\r\n this.c = pc * la + pd * lc;\r\n this.d = pc * lb + pd * ld;\r\n return;\r\n }\r\n case spine.TransformMode.OnlyTranslation: {\r\n var rotationY = rotation + 90 + shearY;\r\n this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\r\n this.b = spine.MathUtils.cosDeg(rotationY) * scaleY;\r\n this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\r\n this.d = spine.MathUtils.sinDeg(rotationY) * scaleY;\r\n break;\r\n }\r\n case spine.TransformMode.NoRotationOrReflection: {\r\n var s = pa * pa + pc * pc;\r\n var prx = 0;\r\n if (s > 0.0001) {\r\n s = Math.abs(pa * pd - pb * pc) / s;\r\n pa /= this.skeleton.scaleX;\r\n pc /= this.skeleton.scaleY;\r\n pb = pc * s;\r\n pd = pa * s;\r\n prx = Math.atan2(pc, pa) * spine.MathUtils.radDeg;\r\n }\r\n else {\r\n pa = 0;\r\n pc = 0;\r\n prx = 90 - Math.atan2(pd, pb) * spine.MathUtils.radDeg;\r\n }\r\n var rx = rotation + shearX - prx;\r\n var ry = rotation + shearY - prx + 90;\r\n var la = spine.MathUtils.cosDeg(rx) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(ry) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(rx) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(ry) * scaleY;\r\n this.a = pa * la - pb * lc;\r\n this.b = pa * lb - pb * ld;\r\n this.c = pc * la + pd * lc;\r\n this.d = pc * lb + pd * ld;\r\n break;\r\n }\r\n case spine.TransformMode.NoScale:\r\n case spine.TransformMode.NoScaleOrReflection: {\r\n var cos = spine.MathUtils.cosDeg(rotation);\r\n var sin = spine.MathUtils.sinDeg(rotation);\r\n var za = (pa * cos + pb * sin) / this.skeleton.scaleX;\r\n var zc = (pc * cos + pd * sin) / this.skeleton.scaleY;\r\n var s = Math.sqrt(za * za + zc * zc);\r\n if (s > 0.00001)\r\n s = 1 / s;\r\n za *= s;\r\n zc *= s;\r\n s = Math.sqrt(za * za + zc * zc);\r\n if (this.data.transformMode == spine.TransformMode.NoScale\r\n && (pa * pd - pb * pc < 0) != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))\r\n s = -s;\r\n var r = Math.PI / 2 + Math.atan2(zc, za);\r\n var zb = Math.cos(r) * s;\r\n var zd = Math.sin(r) * s;\r\n var la = spine.MathUtils.cosDeg(shearX) * scaleX;\r\n var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;\r\n var lc = spine.MathUtils.sinDeg(shearX) * scaleX;\r\n var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;\r\n this.a = za * la + zb * lc;\r\n this.b = za * lb + zb * ld;\r\n this.c = zc * la + zd * lc;\r\n this.d = zc * lb + zd * ld;\r\n break;\r\n }\r\n }\r\n this.a *= this.skeleton.scaleX;\r\n this.b *= this.skeleton.scaleX;\r\n this.c *= this.skeleton.scaleY;\r\n this.d *= this.skeleton.scaleY;\r\n };\r\n Bone.prototype.setToSetupPose = function () {\r\n var data = this.data;\r\n this.x = data.x;\r\n this.y = data.y;\r\n this.rotation = data.rotation;\r\n this.scaleX = data.scaleX;\r\n this.scaleY = data.scaleY;\r\n this.shearX = data.shearX;\r\n this.shearY = data.shearY;\r\n };\r\n Bone.prototype.getWorldRotationX = function () {\r\n return Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.getWorldRotationY = function () {\r\n return Math.atan2(this.d, this.b) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.getWorldScaleX = function () {\r\n return Math.sqrt(this.a * this.a + this.c * this.c);\r\n };\r\n Bone.prototype.getWorldScaleY = function () {\r\n return Math.sqrt(this.b * this.b + this.d * this.d);\r\n };\r\n Bone.prototype.updateAppliedTransform = function () {\r\n this.appliedValid = true;\r\n var parent = this.parent;\r\n if (parent == null) {\r\n this.ax = this.worldX;\r\n this.ay = this.worldY;\r\n this.arotation = Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\r\n this.ascaleX = Math.sqrt(this.a * this.a + this.c * this.c);\r\n this.ascaleY = Math.sqrt(this.b * this.b + this.d * this.d);\r\n this.ashearX = 0;\r\n this.ashearY = Math.atan2(this.a * this.b + this.c * this.d, this.a * this.d - this.b * this.c) * spine.MathUtils.radDeg;\r\n return;\r\n }\r\n var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\r\n var pid = 1 / (pa * pd - pb * pc);\r\n var dx = this.worldX - parent.worldX, dy = this.worldY - parent.worldY;\r\n this.ax = (dx * pd * pid - dy * pb * pid);\r\n this.ay = (dy * pa * pid - dx * pc * pid);\r\n var ia = pid * pd;\r\n var id = pid * pa;\r\n var ib = pid * pb;\r\n var ic = pid * pc;\r\n var ra = ia * this.a - ib * this.c;\r\n var rb = ia * this.b - ib * this.d;\r\n var rc = id * this.c - ic * this.a;\r\n var rd = id * this.d - ic * this.b;\r\n this.ashearX = 0;\r\n this.ascaleX = Math.sqrt(ra * ra + rc * rc);\r\n if (this.ascaleX > 0.0001) {\r\n var det = ra * rd - rb * rc;\r\n this.ascaleY = det / this.ascaleX;\r\n this.ashearY = Math.atan2(ra * rb + rc * rd, det) * spine.MathUtils.radDeg;\r\n this.arotation = Math.atan2(rc, ra) * spine.MathUtils.radDeg;\r\n }\r\n else {\r\n this.ascaleX = 0;\r\n this.ascaleY = Math.sqrt(rb * rb + rd * rd);\r\n this.ashearY = 0;\r\n this.arotation = 90 - Math.atan2(rd, rb) * spine.MathUtils.radDeg;\r\n }\r\n };\r\n Bone.prototype.worldToLocal = function (world) {\r\n var a = this.a, b = this.b, c = this.c, d = this.d;\r\n var invDet = 1 / (a * d - b * c);\r\n var x = world.x - this.worldX, y = world.y - this.worldY;\r\n world.x = (x * d * invDet - y * b * invDet);\r\n world.y = (y * a * invDet - x * c * invDet);\r\n return world;\r\n };\r\n Bone.prototype.localToWorld = function (local) {\r\n var x = local.x, y = local.y;\r\n local.x = x * this.a + y * this.b + this.worldX;\r\n local.y = x * this.c + y * this.d + this.worldY;\r\n return local;\r\n };\r\n Bone.prototype.worldToLocalRotation = function (worldRotation) {\r\n var sin = spine.MathUtils.sinDeg(worldRotation), cos = spine.MathUtils.cosDeg(worldRotation);\r\n return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * spine.MathUtils.radDeg + this.rotation - this.shearX;\r\n };\r\n Bone.prototype.localToWorldRotation = function (localRotation) {\r\n localRotation -= this.rotation - this.shearX;\r\n var sin = spine.MathUtils.sinDeg(localRotation), cos = spine.MathUtils.cosDeg(localRotation);\r\n return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * spine.MathUtils.radDeg;\r\n };\r\n Bone.prototype.rotateWorld = function (degrees) {\r\n var a = this.a, b = this.b, c = this.c, d = this.d;\r\n var cos = spine.MathUtils.cosDeg(degrees), sin = spine.MathUtils.sinDeg(degrees);\r\n this.a = cos * a - sin * c;\r\n this.b = cos * b - sin * d;\r\n this.c = sin * a + cos * c;\r\n this.d = sin * b + cos * d;\r\n this.appliedValid = false;\r\n };\r\n return Bone;\r\n }());\r\n spine.Bone = Bone;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BoneData = (function () {\r\n function BoneData(index, name, parent) {\r\n this.x = 0;\r\n this.y = 0;\r\n this.rotation = 0;\r\n this.scaleX = 1;\r\n this.scaleY = 1;\r\n this.shearX = 0;\r\n this.shearY = 0;\r\n this.transformMode = TransformMode.Normal;\r\n this.skinRequired = false;\r\n this.color = new spine.Color();\r\n if (index < 0)\r\n throw new Error(\"index must be >= 0.\");\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.parent = parent;\r\n }\r\n return BoneData;\r\n }());\r\n spine.BoneData = BoneData;\r\n var TransformMode;\r\n (function (TransformMode) {\r\n TransformMode[TransformMode[\"Normal\"] = 0] = \"Normal\";\r\n TransformMode[TransformMode[\"OnlyTranslation\"] = 1] = \"OnlyTranslation\";\r\n TransformMode[TransformMode[\"NoRotationOrReflection\"] = 2] = \"NoRotationOrReflection\";\r\n TransformMode[TransformMode[\"NoScale\"] = 3] = \"NoScale\";\r\n TransformMode[TransformMode[\"NoScaleOrReflection\"] = 4] = \"NoScaleOrReflection\";\r\n })(TransformMode = spine.TransformMode || (spine.TransformMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var ConstraintData = (function () {\r\n function ConstraintData(name, order, skinRequired) {\r\n this.name = name;\r\n this.order = order;\r\n this.skinRequired = skinRequired;\r\n }\r\n return ConstraintData;\r\n }());\r\n spine.ConstraintData = ConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Event = (function () {\r\n function Event(time, data) {\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n this.time = time;\r\n this.data = data;\r\n }\r\n return Event;\r\n }());\r\n spine.Event = Event;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var EventData = (function () {\r\n function EventData(name) {\r\n this.name = name;\r\n }\r\n return EventData;\r\n }());\r\n spine.EventData = EventData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IkConstraint = (function () {\r\n function IkConstraint(data, skeleton) {\r\n this.bendDirection = 0;\r\n this.compress = false;\r\n this.stretch = false;\r\n this.mix = 1;\r\n this.softness = 0;\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.mix = data.mix;\r\n this.softness = data.softness;\r\n this.bendDirection = data.bendDirection;\r\n this.compress = data.compress;\r\n this.stretch = data.stretch;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findBone(data.target.name);\r\n }\r\n IkConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n IkConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n IkConstraint.prototype.update = function () {\r\n var target = this.target;\r\n var bones = this.bones;\r\n switch (bones.length) {\r\n case 1:\r\n this.apply1(bones[0], target.worldX, target.worldY, this.compress, this.stretch, this.data.uniform, this.mix);\r\n break;\r\n case 2:\r\n this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.stretch, this.softness, this.mix);\r\n break;\r\n }\r\n };\r\n IkConstraint.prototype.apply1 = function (bone, targetX, targetY, compress, stretch, uniform, alpha) {\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var p = bone.parent;\r\n var pa = p.a, pb = p.b, pc = p.c, pd = p.d;\r\n var rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;\r\n switch (bone.data.transformMode) {\r\n case spine.TransformMode.OnlyTranslation:\r\n tx = targetX - bone.worldX;\r\n ty = targetY - bone.worldY;\r\n break;\r\n case spine.TransformMode.NoRotationOrReflection:\r\n var s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);\r\n var sa = pa / bone.skeleton.scaleX;\r\n var sc = pc / bone.skeleton.scaleY;\r\n pb = -sc * s * bone.skeleton.scaleX;\r\n pd = sa * s * bone.skeleton.scaleY;\r\n rotationIK += Math.atan2(sc, sa) * spine.MathUtils.radDeg;\r\n default:\r\n var x = targetX - p.worldX, y = targetY - p.worldY;\r\n var d = pa * pd - pb * pc;\r\n tx = (x * pd - y * pb) / d - bone.ax;\r\n ty = (y * pa - x * pc) / d - bone.ay;\r\n }\r\n rotationIK += Math.atan2(ty, tx) * spine.MathUtils.radDeg;\r\n if (bone.ascaleX < 0)\r\n rotationIK += 180;\r\n if (rotationIK > 180)\r\n rotationIK -= 360;\r\n else if (rotationIK < -180)\r\n rotationIK += 360;\r\n var sx = bone.ascaleX, sy = bone.ascaleY;\r\n if (compress || stretch) {\r\n switch (bone.data.transformMode) {\r\n case spine.TransformMode.NoScale:\r\n case spine.TransformMode.NoScaleOrReflection:\r\n tx = targetX - bone.worldX;\r\n ty = targetY - bone.worldY;\r\n }\r\n var b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\r\n if ((compress && dd < b) || (stretch && dd > b) && b > 0.0001) {\r\n var s = (dd / b - 1) * alpha + 1;\r\n sx *= s;\r\n if (uniform)\r\n sy *= s;\r\n }\r\n }\r\n bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, sx, sy, bone.ashearX, bone.ashearY);\r\n };\r\n IkConstraint.prototype.apply2 = function (parent, child, targetX, targetY, bendDir, stretch, softness, alpha) {\r\n if (alpha == 0) {\r\n child.updateWorldTransform();\r\n return;\r\n }\r\n if (!parent.appliedValid)\r\n parent.updateAppliedTransform();\r\n if (!child.appliedValid)\r\n child.updateAppliedTransform();\r\n var px = parent.ax, py = parent.ay, psx = parent.ascaleX, sx = psx, psy = parent.ascaleY, csx = child.ascaleX;\r\n var os1 = 0, os2 = 0, s2 = 0;\r\n if (psx < 0) {\r\n psx = -psx;\r\n os1 = 180;\r\n s2 = -1;\r\n }\r\n else {\r\n os1 = 0;\r\n s2 = 1;\r\n }\r\n if (psy < 0) {\r\n psy = -psy;\r\n s2 = -s2;\r\n }\r\n if (csx < 0) {\r\n csx = -csx;\r\n os2 = 180;\r\n }\r\n else\r\n os2 = 0;\r\n var cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d;\r\n var u = Math.abs(psx - psy) <= 0.0001;\r\n if (!u) {\r\n cy = 0;\r\n cwx = a * cx + parent.worldX;\r\n cwy = c * cx + parent.worldY;\r\n }\r\n else {\r\n cy = child.ay;\r\n cwx = a * cx + b * cy + parent.worldX;\r\n cwy = c * cx + d * cy + parent.worldY;\r\n }\r\n var pp = parent.parent;\r\n a = pp.a;\r\n b = pp.b;\r\n c = pp.c;\r\n d = pp.d;\r\n var id = 1 / (a * d - b * c), x = cwx - pp.worldX, y = cwy - pp.worldY;\r\n var dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\r\n var l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\r\n if (l1 < 0.0001) {\r\n this.apply1(parent, targetX, targetY, false, stretch, false, alpha);\r\n child.updateWorldTransformWith(cx, cy, 0, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n return;\r\n }\r\n x = targetX - pp.worldX;\r\n y = targetY - pp.worldY;\r\n var tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\r\n var dd = tx * tx + ty * ty;\r\n if (softness != 0) {\r\n softness *= psx * (csx + 1) / 2;\r\n var td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\r\n if (sd > 0) {\r\n var p = Math.min(1, sd / (softness * 2)) - 1;\r\n p = (sd - softness * (1 - p * p)) / td;\r\n tx -= p * tx;\r\n ty -= p * ty;\r\n dd = tx * tx + ty * ty;\r\n }\r\n }\r\n outer: if (u) {\r\n l2 *= psx;\r\n var cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\r\n if (cos < -1)\r\n cos = -1;\r\n else if (cos > 1) {\r\n cos = 1;\r\n if (stretch)\r\n sx *= (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\r\n }\r\n a2 = Math.acos(cos) * bendDir;\r\n a = l1 + l2 * cos;\r\n b = l2 * Math.sin(a2);\r\n a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b);\r\n }\r\n else {\r\n a = psx * l2;\r\n b = psy * l2;\r\n var aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\r\n c = bb * l1 * l1 + aa * dd - aa * bb;\r\n var c1 = -2 * bb * l1, c2 = bb - aa;\r\n d = c1 * c1 - 4 * c2 * c;\r\n if (d >= 0) {\r\n var q = Math.sqrt(d);\r\n if (c1 < 0)\r\n q = -q;\r\n q = -(c1 + q) / 2;\r\n var r0 = q / c2, r1 = c / q;\r\n var r = Math.abs(r0) < Math.abs(r1) ? r0 : r1;\r\n if (r * r <= dd) {\r\n y = Math.sqrt(dd - r * r) * bendDir;\r\n a1 = ta - Math.atan2(y, r);\r\n a2 = Math.atan2(y / psy, (r - l1) / psx);\r\n break outer;\r\n }\r\n }\r\n var minAngle = spine.MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\r\n var maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;\r\n c = -a * l1 / (aa - bb);\r\n if (c >= -1 && c <= 1) {\r\n c = Math.acos(c);\r\n x = a * Math.cos(c) + l1;\r\n y = b * Math.sin(c);\r\n d = x * x + y * y;\r\n if (d < minDist) {\r\n minAngle = c;\r\n minDist = d;\r\n minX = x;\r\n minY = y;\r\n }\r\n if (d > maxDist) {\r\n maxAngle = c;\r\n maxDist = d;\r\n maxX = x;\r\n maxY = y;\r\n }\r\n }\r\n if (dd <= (minDist + maxDist) / 2) {\r\n a1 = ta - Math.atan2(minY * bendDir, minX);\r\n a2 = minAngle * bendDir;\r\n }\r\n else {\r\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\r\n a2 = maxAngle * bendDir;\r\n }\r\n }\r\n var os = Math.atan2(cy, cx) * s2;\r\n var rotation = parent.arotation;\r\n a1 = (a1 - os) * spine.MathUtils.radDeg + os1 - rotation;\r\n if (a1 > 180)\r\n a1 -= 360;\r\n else if (a1 < -180)\r\n a1 += 360;\r\n parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, sx, parent.ascaleY, 0, 0);\r\n rotation = child.arotation;\r\n a2 = ((a2 + os) * spine.MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation;\r\n if (a2 > 180)\r\n a2 -= 360;\r\n else if (a2 < -180)\r\n a2 += 360;\r\n child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\r\n };\r\n return IkConstraint;\r\n }());\r\n spine.IkConstraint = IkConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IkConstraintData = (function (_super) {\r\n __extends(IkConstraintData, _super);\r\n function IkConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n _this.bendDirection = 1;\r\n _this.compress = false;\r\n _this.stretch = false;\r\n _this.uniform = false;\r\n _this.mix = 1;\r\n _this.softness = 0;\r\n return _this;\r\n }\r\n return IkConstraintData;\r\n }(spine.ConstraintData));\r\n spine.IkConstraintData = IkConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathConstraint = (function () {\r\n function PathConstraint(data, skeleton) {\r\n this.position = 0;\r\n this.spacing = 0;\r\n this.rotateMix = 0;\r\n this.translateMix = 0;\r\n this.spaces = new Array();\r\n this.positions = new Array();\r\n this.world = new Array();\r\n this.curves = new Array();\r\n this.lengths = new Array();\r\n this.segments = new Array();\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (var i = 0, n = data.bones.length; i < n; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findSlot(data.target.name);\r\n this.position = data.position;\r\n this.spacing = data.spacing;\r\n this.rotateMix = data.rotateMix;\r\n this.translateMix = data.translateMix;\r\n }\r\n PathConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n PathConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n PathConstraint.prototype.update = function () {\r\n var attachment = this.target.getAttachment();\r\n if (!(attachment instanceof spine.PathAttachment))\r\n return;\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix;\r\n var translate = translateMix > 0, rotate = rotateMix > 0;\r\n if (!translate && !rotate)\r\n return;\r\n var data = this.data;\r\n var percentSpacing = data.spacingMode == spine.SpacingMode.Percent;\r\n var rotateMode = data.rotateMode;\r\n var tangents = rotateMode == spine.RotateMode.Tangent, scale = rotateMode == spine.RotateMode.ChainScale;\r\n var boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\r\n var bones = this.bones;\r\n var spaces = spine.Utils.setArraySize(this.spaces, spacesCount), lengths = null;\r\n var spacing = this.spacing;\r\n if (scale || !percentSpacing) {\r\n if (scale)\r\n lengths = spine.Utils.setArraySize(this.lengths, boneCount);\r\n var lengthSpacing = data.spacingMode == spine.SpacingMode.Length;\r\n for (var i = 0, n = spacesCount - 1; i < n;) {\r\n var bone = bones[i];\r\n var setupLength = bone.data.length;\r\n if (setupLength < PathConstraint.epsilon) {\r\n if (scale)\r\n lengths[i] = 0;\r\n spaces[++i] = 0;\r\n }\r\n else if (percentSpacing) {\r\n if (scale) {\r\n var x = setupLength * bone.a, y = setupLength * bone.c;\r\n var length_1 = Math.sqrt(x * x + y * y);\r\n lengths[i] = length_1;\r\n }\r\n spaces[++i] = spacing;\r\n }\r\n else {\r\n var x = setupLength * bone.a, y = setupLength * bone.c;\r\n var length_2 = Math.sqrt(x * x + y * y);\r\n if (scale)\r\n lengths[i] = length_2;\r\n spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length_2 / setupLength;\r\n }\r\n }\r\n }\r\n else {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] = spacing;\r\n }\r\n var positions = this.computeWorldPositions(attachment, spacesCount, tangents, data.positionMode == spine.PositionMode.Percent, percentSpacing);\r\n var boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\r\n var tip = false;\r\n if (offsetRotation == 0)\r\n tip = rotateMode == spine.RotateMode.Chain;\r\n else {\r\n tip = false;\r\n var p = this.target.bone;\r\n offsetRotation *= p.a * p.d - p.b * p.c > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n }\r\n for (var i = 0, p = 3; i < boneCount; i++, p += 3) {\r\n var bone = bones[i];\r\n bone.worldX += (boneX - bone.worldX) * translateMix;\r\n bone.worldY += (boneY - bone.worldY) * translateMix;\r\n var x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\r\n if (scale) {\r\n var length_3 = lengths[i];\r\n if (length_3 != 0) {\r\n var s = (Math.sqrt(dx * dx + dy * dy) / length_3 - 1) * rotateMix + 1;\r\n bone.a *= s;\r\n bone.c *= s;\r\n }\r\n }\r\n boneX = x;\r\n boneY = y;\r\n if (rotate) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d, r = 0, cos = 0, sin = 0;\r\n if (tangents)\r\n r = positions[p - 1];\r\n else if (spaces[i + 1] == 0)\r\n r = positions[p + 2];\r\n else\r\n r = Math.atan2(dy, dx);\r\n r -= Math.atan2(c, a);\r\n if (tip) {\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n var length_4 = bone.data.length;\r\n boneX += (length_4 * (cos * a - sin * c) - dx) * rotateMix;\r\n boneY += (length_4 * (sin * a + cos * c) - dy) * rotateMix;\r\n }\r\n else {\r\n r += offsetRotation;\r\n }\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n cos = Math.cos(r);\r\n sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n }\r\n bone.appliedValid = false;\r\n }\r\n };\r\n PathConstraint.prototype.computeWorldPositions = function (path, spacesCount, tangents, percentPosition, percentSpacing) {\r\n var target = this.target;\r\n var position = this.position;\r\n var spaces = this.spaces, out = spine.Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = null;\r\n var closed = path.closed;\r\n var verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = PathConstraint.NONE;\r\n if (!path.constantSpeed) {\r\n var lengths = path.lengths;\r\n curveCount -= closed ? 1 : 2;\r\n var pathLength_1 = lengths[curveCount];\r\n if (percentPosition)\r\n position *= pathLength_1;\r\n if (percentSpacing) {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] *= pathLength_1;\r\n }\r\n world = spine.Utils.setArraySize(this.world, 8);\r\n for (var i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\r\n var space = spaces[i];\r\n position += space;\r\n var p = position;\r\n if (closed) {\r\n p %= pathLength_1;\r\n if (p < 0)\r\n p += pathLength_1;\r\n curve = 0;\r\n }\r\n else if (p < 0) {\r\n if (prevCurve != PathConstraint.BEFORE) {\r\n prevCurve = PathConstraint.BEFORE;\r\n path.computeWorldVertices(target, 2, 4, world, 0, 2);\r\n }\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n }\r\n else if (p > pathLength_1) {\r\n if (prevCurve != PathConstraint.AFTER) {\r\n prevCurve = PathConstraint.AFTER;\r\n path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\r\n }\r\n this.addAfterPosition(p - pathLength_1, world, 0, out, o);\r\n continue;\r\n }\r\n for (;; curve++) {\r\n var length_5 = lengths[curve];\r\n if (p > length_5)\r\n continue;\r\n if (curve == 0)\r\n p /= length_5;\r\n else {\r\n var prev = lengths[curve - 1];\r\n p = (p - prev) / (length_5 - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n if (closed && curve == curveCount) {\r\n path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 4, world, 4, 2);\r\n }\r\n else\r\n path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\r\n }\r\n this.addCurvePosition(p, world[0], world[1], world[2], world[3], world[4], world[5], world[6], world[7], out, o, tangents || (i > 0 && space == 0));\r\n }\r\n return out;\r\n }\r\n if (closed) {\r\n verticesLength += 2;\r\n world = spine.Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength - 4, world, 0, 2);\r\n path.computeWorldVertices(target, 0, 2, world, verticesLength - 4, 2);\r\n world[verticesLength - 2] = world[0];\r\n world[verticesLength - 1] = world[1];\r\n }\r\n else {\r\n curveCount--;\r\n verticesLength -= 4;\r\n world = spine.Utils.setArraySize(this.world, verticesLength);\r\n path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\r\n }\r\n var curves = spine.Utils.setArraySize(this.curves, curveCount);\r\n var pathLength = 0;\r\n var x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\r\n var tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\r\n for (var i = 0, w = 2; i < curveCount; i++, w += 6) {\r\n cx1 = world[w];\r\n cy1 = world[w + 1];\r\n cx2 = world[w + 2];\r\n cy2 = world[w + 3];\r\n x2 = world[w + 4];\r\n y2 = world[w + 5];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.1875;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.1875;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n curves[i] = pathLength;\r\n x1 = x2;\r\n y1 = y2;\r\n }\r\n if (percentPosition)\r\n position *= pathLength;\r\n else\r\n position *= pathLength / path.lengths[curveCount - 1];\r\n if (percentSpacing) {\r\n for (var i = 1; i < spacesCount; i++)\r\n spaces[i] *= pathLength;\r\n }\r\n var segments = this.segments;\r\n var curveLength = 0;\r\n for (var i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\r\n var space = spaces[i];\r\n position += space;\r\n var p = position;\r\n if (closed) {\r\n p %= pathLength;\r\n if (p < 0)\r\n p += pathLength;\r\n curve = 0;\r\n }\r\n else if (p < 0) {\r\n this.addBeforePosition(p, world, 0, out, o);\r\n continue;\r\n }\r\n else if (p > pathLength) {\r\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\r\n continue;\r\n }\r\n for (;; curve++) {\r\n var length_6 = curves[curve];\r\n if (p > length_6)\r\n continue;\r\n if (curve == 0)\r\n p /= length_6;\r\n else {\r\n var prev = curves[curve - 1];\r\n p = (p - prev) / (length_6 - prev);\r\n }\r\n break;\r\n }\r\n if (curve != prevCurve) {\r\n prevCurve = curve;\r\n var ii = curve * 6;\r\n x1 = world[ii];\r\n y1 = world[ii + 1];\r\n cx1 = world[ii + 2];\r\n cy1 = world[ii + 3];\r\n cx2 = world[ii + 4];\r\n cy2 = world[ii + 5];\r\n x2 = world[ii + 6];\r\n y2 = world[ii + 7];\r\n tmpx = (x1 - cx1 * 2 + cx2) * 0.03;\r\n tmpy = (y1 - cy1 * 2 + cy2) * 0.03;\r\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.006;\r\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.006;\r\n ddfx = tmpx * 2 + dddfx;\r\n ddfy = tmpy * 2 + dddfy;\r\n dfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667;\r\n dfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667;\r\n curveLength = Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[0] = curveLength;\r\n for (ii = 1; ii < 8; ii++) {\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[ii] = curveLength;\r\n }\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[8] = curveLength;\r\n dfx += ddfx + dddfx;\r\n dfy += ddfy + dddfy;\r\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\r\n segments[9] = curveLength;\r\n segment = 0;\r\n }\r\n p *= curveLength;\r\n for (;; segment++) {\r\n var length_7 = segments[segment];\r\n if (p > length_7)\r\n continue;\r\n if (segment == 0)\r\n p /= length_7;\r\n else {\r\n var prev = segments[segment - 1];\r\n p = segment + (p - prev) / (length_7 - prev);\r\n }\r\n break;\r\n }\r\n this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || (i > 0 && space == 0));\r\n }\r\n return out;\r\n };\r\n PathConstraint.prototype.addBeforePosition = function (p, temp, i, out, o) {\r\n var x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n };\r\n PathConstraint.prototype.addAfterPosition = function (p, temp, i, out, o) {\r\n var x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx);\r\n out[o] = x1 + p * Math.cos(r);\r\n out[o + 1] = y1 + p * Math.sin(r);\r\n out[o + 2] = r;\r\n };\r\n PathConstraint.prototype.addCurvePosition = function (p, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents) {\r\n if (p == 0 || isNaN(p)) {\r\n out[o] = x1;\r\n out[o + 1] = y1;\r\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\r\n return;\r\n }\r\n var tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\r\n var ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\r\n var x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt;\r\n out[o] = x;\r\n out[o + 1] = y;\r\n if (tangents) {\r\n if (p < 0.001)\r\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\r\n else\r\n out[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt));\r\n }\r\n };\r\n PathConstraint.NONE = -1;\r\n PathConstraint.BEFORE = -2;\r\n PathConstraint.AFTER = -3;\r\n PathConstraint.epsilon = 0.00001;\r\n return PathConstraint;\r\n }());\r\n spine.PathConstraint = PathConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathConstraintData = (function (_super) {\r\n __extends(PathConstraintData, _super);\r\n function PathConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n return _this;\r\n }\r\n return PathConstraintData;\r\n }(spine.ConstraintData));\r\n spine.PathConstraintData = PathConstraintData;\r\n var PositionMode;\r\n (function (PositionMode) {\r\n PositionMode[PositionMode[\"Fixed\"] = 0] = \"Fixed\";\r\n PositionMode[PositionMode[\"Percent\"] = 1] = \"Percent\";\r\n })(PositionMode = spine.PositionMode || (spine.PositionMode = {}));\r\n var SpacingMode;\r\n (function (SpacingMode) {\r\n SpacingMode[SpacingMode[\"Length\"] = 0] = \"Length\";\r\n SpacingMode[SpacingMode[\"Fixed\"] = 1] = \"Fixed\";\r\n SpacingMode[SpacingMode[\"Percent\"] = 2] = \"Percent\";\r\n })(SpacingMode = spine.SpacingMode || (spine.SpacingMode = {}));\r\n var RotateMode;\r\n (function (RotateMode) {\r\n RotateMode[RotateMode[\"Tangent\"] = 0] = \"Tangent\";\r\n RotateMode[RotateMode[\"Chain\"] = 1] = \"Chain\";\r\n RotateMode[RotateMode[\"ChainScale\"] = 2] = \"ChainScale\";\r\n })(RotateMode = spine.RotateMode || (spine.RotateMode = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Assets = (function () {\r\n function Assets(clientId) {\r\n this.toLoad = new Array();\r\n this.assets = {};\r\n this.clientId = clientId;\r\n }\r\n Assets.prototype.loaded = function () {\r\n var i = 0;\r\n for (var v in this.assets)\r\n i++;\r\n return i;\r\n };\r\n return Assets;\r\n }());\r\n var SharedAssetManager = (function () {\r\n function SharedAssetManager(pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n this.clientAssets = {};\r\n this.queuedAssets = {};\r\n this.rawAssets = {};\r\n this.errors = {};\r\n this.pathPrefix = pathPrefix;\r\n }\r\n SharedAssetManager.prototype.queueAsset = function (clientId, textureLoader, path) {\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined) {\r\n clientAssets = new Assets(clientId);\r\n this.clientAssets[clientId] = clientAssets;\r\n }\r\n if (textureLoader !== null)\r\n clientAssets.textureLoader = textureLoader;\r\n clientAssets.toLoad.push(path);\r\n if (this.queuedAssets[path] === path) {\r\n return false;\r\n }\r\n else {\r\n this.queuedAssets[path] = path;\r\n return true;\r\n }\r\n };\r\n SharedAssetManager.prototype.loadText = function (clientId, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, null, path))\r\n return;\r\n var request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n request.onreadystatechange = function () {\r\n if (request.readyState == XMLHttpRequest.DONE) {\r\n if (request.status >= 200 && request.status < 300) {\r\n _this.rawAssets[path] = request.responseText;\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load text \" + path + \": status \" + request.status + \", \" + request.responseText;\r\n }\r\n }\r\n };\r\n request.open(\"GET\", path, true);\r\n request.send();\r\n };\r\n SharedAssetManager.prototype.loadJson = function (clientId, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, null, path))\r\n return;\r\n var request = new XMLHttpRequest();\r\n request.overrideMimeType(\"text/html\");\r\n request.onreadystatechange = function () {\r\n if (request.readyState == XMLHttpRequest.DONE) {\r\n if (request.status >= 200 && request.status < 300) {\r\n _this.rawAssets[path] = JSON.parse(request.responseText);\r\n }\r\n else {\r\n _this.errors[path] = \"Couldn't load text \" + path + \": status \" + request.status + \", \" + request.responseText;\r\n }\r\n }\r\n };\r\n request.open(\"GET\", path, true);\r\n request.send();\r\n };\r\n SharedAssetManager.prototype.loadTexture = function (clientId, textureLoader, path) {\r\n var _this = this;\r\n path = this.pathPrefix + path;\r\n if (!this.queueAsset(clientId, textureLoader, path))\r\n return;\r\n var img = new Image();\r\n img.crossOrigin = \"anonymous\";\r\n img.onload = function (ev) {\r\n _this.rawAssets[path] = img;\r\n };\r\n img.onerror = function (ev) {\r\n _this.errors[path] = \"Couldn't load image \" + path;\r\n };\r\n img.src = path;\r\n };\r\n SharedAssetManager.prototype.get = function (clientId, path) {\r\n path = this.pathPrefix + path;\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined)\r\n return true;\r\n return clientAssets.assets[path];\r\n };\r\n SharedAssetManager.prototype.updateClientAssets = function (clientAssets) {\r\n for (var i = 0; i < clientAssets.toLoad.length; i++) {\r\n var path = clientAssets.toLoad[i];\r\n var asset = clientAssets.assets[path];\r\n if (asset === null || asset === undefined) {\r\n var rawAsset = this.rawAssets[path];\r\n if (rawAsset === null || rawAsset === undefined)\r\n continue;\r\n if (rawAsset instanceof HTMLImageElement) {\r\n clientAssets.assets[path] = clientAssets.textureLoader(rawAsset);\r\n }\r\n else {\r\n clientAssets.assets[path] = rawAsset;\r\n }\r\n }\r\n }\r\n };\r\n SharedAssetManager.prototype.isLoadingComplete = function (clientId) {\r\n var clientAssets = this.clientAssets[clientId];\r\n if (clientAssets === null || clientAssets === undefined)\r\n return true;\r\n this.updateClientAssets(clientAssets);\r\n return clientAssets.toLoad.length == clientAssets.loaded();\r\n };\r\n SharedAssetManager.prototype.dispose = function () {\r\n };\r\n SharedAssetManager.prototype.hasErrors = function () {\r\n return Object.keys(this.errors).length > 0;\r\n };\r\n SharedAssetManager.prototype.getErrors = function () {\r\n return this.errors;\r\n };\r\n return SharedAssetManager;\r\n }());\r\n spine.SharedAssetManager = SharedAssetManager;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Skeleton = (function () {\r\n function Skeleton(data) {\r\n this._updateCache = new Array();\r\n this.updateCacheReset = new Array();\r\n this.time = 0;\r\n this.scaleX = 1;\r\n this.scaleY = 1;\r\n this.x = 0;\r\n this.y = 0;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n this.data = data;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++) {\r\n var boneData = data.bones[i];\r\n var bone = void 0;\r\n if (boneData.parent == null)\r\n bone = new spine.Bone(boneData, this, null);\r\n else {\r\n var parent_1 = this.bones[boneData.parent.index];\r\n bone = new spine.Bone(boneData, this, parent_1);\r\n parent_1.children.push(bone);\r\n }\r\n this.bones.push(bone);\r\n }\r\n this.slots = new Array();\r\n this.drawOrder = new Array();\r\n for (var i = 0; i < data.slots.length; i++) {\r\n var slotData = data.slots[i];\r\n var bone = this.bones[slotData.boneData.index];\r\n var slot = new spine.Slot(slotData, bone);\r\n this.slots.push(slot);\r\n this.drawOrder.push(slot);\r\n }\r\n this.ikConstraints = new Array();\r\n for (var i = 0; i < data.ikConstraints.length; i++) {\r\n var ikConstraintData = data.ikConstraints[i];\r\n this.ikConstraints.push(new spine.IkConstraint(ikConstraintData, this));\r\n }\r\n this.transformConstraints = new Array();\r\n for (var i = 0; i < data.transformConstraints.length; i++) {\r\n var transformConstraintData = data.transformConstraints[i];\r\n this.transformConstraints.push(new spine.TransformConstraint(transformConstraintData, this));\r\n }\r\n this.pathConstraints = new Array();\r\n for (var i = 0; i < data.pathConstraints.length; i++) {\r\n var pathConstraintData = data.pathConstraints[i];\r\n this.pathConstraints.push(new spine.PathConstraint(pathConstraintData, this));\r\n }\r\n this.color = new spine.Color(1, 1, 1, 1);\r\n this.updateCache();\r\n }\r\n Skeleton.prototype.updateCache = function () {\r\n var updateCache = this._updateCache;\r\n updateCache.length = 0;\r\n this.updateCacheReset.length = 0;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n bone.sorted = bone.data.skinRequired;\r\n bone.active = !bone.sorted;\r\n }\r\n if (this.skin != null) {\r\n var skinBones = this.skin.bones;\r\n for (var i = 0, n = this.skin.bones.length; i < n; i++) {\r\n var bone = this.bones[skinBones[i].index];\r\n do {\r\n bone.sorted = false;\r\n bone.active = true;\r\n bone = bone.parent;\r\n } while (bone != null);\r\n }\r\n }\r\n var ikConstraints = this.ikConstraints;\r\n var transformConstraints = this.transformConstraints;\r\n var pathConstraints = this.pathConstraints;\r\n var ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\r\n var constraintCount = ikCount + transformCount + pathCount;\r\n outer: for (var i = 0; i < constraintCount; i++) {\r\n for (var ii = 0; ii < ikCount; ii++) {\r\n var constraint = ikConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortIkConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (var ii = 0; ii < transformCount; ii++) {\r\n var constraint = transformConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortTransformConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n for (var ii = 0; ii < pathCount; ii++) {\r\n var constraint = pathConstraints[ii];\r\n if (constraint.data.order == i) {\r\n this.sortPathConstraint(constraint);\r\n continue outer;\r\n }\r\n }\r\n }\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n this.sortBone(bones[i]);\r\n };\r\n Skeleton.prototype.sortIkConstraint = function (constraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n var target = constraint.target;\r\n this.sortBone(target);\r\n var constrained = constraint.bones;\r\n var parent = constrained[0];\r\n this.sortBone(parent);\r\n if (constrained.length > 1) {\r\n var child = constrained[constrained.length - 1];\r\n if (!(this._updateCache.indexOf(child) > -1))\r\n this.updateCacheReset.push(child);\r\n }\r\n this._updateCache.push(constraint);\r\n this.sortReset(parent.children);\r\n constrained[constrained.length - 1].sorted = true;\r\n };\r\n Skeleton.prototype.sortPathConstraint = function (constraint) {\r\n constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n var slot = constraint.target;\r\n var slotIndex = slot.data.index;\r\n var slotBone = slot.bone;\r\n if (this.skin != null)\r\n this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\r\n if (this.data.defaultSkin != null && this.data.defaultSkin != this.skin)\r\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\r\n for (var i = 0, n = this.data.skins.length; i < n; i++)\r\n this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.PathAttachment)\r\n this.sortPathConstraintAttachmentWith(attachment, slotBone);\r\n var constrained = constraint.bones;\r\n var boneCount = constrained.length;\r\n for (var i = 0; i < boneCount; i++)\r\n this.sortBone(constrained[i]);\r\n this._updateCache.push(constraint);\r\n for (var i = 0; i < boneCount; i++)\r\n this.sortReset(constrained[i].children);\r\n for (var i = 0; i < boneCount; i++)\r\n constrained[i].sorted = true;\r\n };\r\n Skeleton.prototype.sortTransformConstraint = function (constraint) {\r\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\r\n if (!constraint.active)\r\n return;\r\n this.sortBone(constraint.target);\r\n var constrained = constraint.bones;\r\n var boneCount = constrained.length;\r\n if (constraint.data.local) {\r\n for (var i = 0; i < boneCount; i++) {\r\n var child = constrained[i];\r\n this.sortBone(child.parent);\r\n if (!(this._updateCache.indexOf(child) > -1))\r\n this.updateCacheReset.push(child);\r\n }\r\n }\r\n else {\r\n for (var i = 0; i < boneCount; i++) {\r\n this.sortBone(constrained[i]);\r\n }\r\n }\r\n this._updateCache.push(constraint);\r\n for (var ii = 0; ii < boneCount; ii++)\r\n this.sortReset(constrained[ii].children);\r\n for (var ii = 0; ii < boneCount; ii++)\r\n constrained[ii].sorted = true;\r\n };\r\n Skeleton.prototype.sortPathConstraintAttachment = function (skin, slotIndex, slotBone) {\r\n var attachments = skin.attachments[slotIndex];\r\n if (!attachments)\r\n return;\r\n for (var key in attachments) {\r\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\r\n }\r\n };\r\n Skeleton.prototype.sortPathConstraintAttachmentWith = function (attachment, slotBone) {\r\n if (!(attachment instanceof spine.PathAttachment))\r\n return;\r\n var pathBones = attachment.bones;\r\n if (pathBones == null)\r\n this.sortBone(slotBone);\r\n else {\r\n var bones = this.bones;\r\n var i = 0;\r\n while (i < pathBones.length) {\r\n var boneCount = pathBones[i++];\r\n for (var n = i + boneCount; i < n; i++) {\r\n var boneIndex = pathBones[i];\r\n this.sortBone(bones[boneIndex]);\r\n }\r\n }\r\n }\r\n };\r\n Skeleton.prototype.sortBone = function (bone) {\r\n if (bone.sorted)\r\n return;\r\n var parent = bone.parent;\r\n if (parent != null)\r\n this.sortBone(parent);\r\n bone.sorted = true;\r\n this._updateCache.push(bone);\r\n };\r\n Skeleton.prototype.sortReset = function (bones) {\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.active)\r\n continue;\r\n if (bone.sorted)\r\n this.sortReset(bone.children);\r\n bone.sorted = false;\r\n }\r\n };\r\n Skeleton.prototype.updateWorldTransform = function () {\r\n var updateCacheReset = this.updateCacheReset;\r\n for (var i = 0, n = updateCacheReset.length; i < n; i++) {\r\n var bone = updateCacheReset[i];\r\n bone.ax = bone.x;\r\n bone.ay = bone.y;\r\n bone.arotation = bone.rotation;\r\n bone.ascaleX = bone.scaleX;\r\n bone.ascaleY = bone.scaleY;\r\n bone.ashearX = bone.shearX;\r\n bone.ashearY = bone.shearY;\r\n bone.appliedValid = true;\r\n }\r\n var updateCache = this._updateCache;\r\n for (var i = 0, n = updateCache.length; i < n; i++)\r\n updateCache[i].update();\r\n };\r\n Skeleton.prototype.setToSetupPose = function () {\r\n this.setBonesToSetupPose();\r\n this.setSlotsToSetupPose();\r\n };\r\n Skeleton.prototype.setBonesToSetupPose = function () {\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n bones[i].setToSetupPose();\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var constraint = ikConstraints[i];\r\n constraint.mix = constraint.data.mix;\r\n constraint.softness = constraint.data.softness;\r\n constraint.bendDirection = constraint.data.bendDirection;\r\n constraint.compress = constraint.data.compress;\r\n constraint.stretch = constraint.data.stretch;\r\n }\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n var data = constraint.data;\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n constraint.scaleMix = data.scaleMix;\r\n constraint.shearMix = data.shearMix;\r\n }\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n var data = constraint.data;\r\n constraint.position = data.position;\r\n constraint.spacing = data.spacing;\r\n constraint.rotateMix = data.rotateMix;\r\n constraint.translateMix = data.translateMix;\r\n }\r\n };\r\n Skeleton.prototype.setSlotsToSetupPose = function () {\r\n var slots = this.slots;\r\n spine.Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n slots[i].setToSetupPose();\r\n };\r\n Skeleton.prototype.getRootBone = function () {\r\n if (this.bones.length == 0)\r\n return null;\r\n return this.bones[0];\r\n };\r\n Skeleton.prototype.findBone = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (bone.data.name == boneName)\r\n return bone;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findBoneIndex = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n if (bones[i].data.name == boneName)\r\n return i;\r\n return -1;\r\n };\r\n Skeleton.prototype.findSlot = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.data.name == slotName)\r\n return slot;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findSlotIndex = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n if (slots[i].data.name == slotName)\r\n return i;\r\n return -1;\r\n };\r\n Skeleton.prototype.setSkinByName = function (skinName) {\r\n var skin = this.data.findSkin(skinName);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + skinName);\r\n this.setSkin(skin);\r\n };\r\n Skeleton.prototype.setSkin = function (newSkin) {\r\n if (newSkin == this.skin)\r\n return;\r\n if (newSkin != null) {\r\n if (this.skin != null)\r\n newSkin.attachAll(this, this.skin);\r\n else {\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n var name_1 = slot.data.attachmentName;\r\n if (name_1 != null) {\r\n var attachment = newSkin.getAttachment(i, name_1);\r\n if (attachment != null)\r\n slot.setAttachment(attachment);\r\n }\r\n }\r\n }\r\n }\r\n this.skin = newSkin;\r\n this.updateCache();\r\n };\r\n Skeleton.prototype.getAttachmentByName = function (slotName, attachmentName) {\r\n return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName);\r\n };\r\n Skeleton.prototype.getAttachment = function (slotIndex, attachmentName) {\r\n if (attachmentName == null)\r\n throw new Error(\"attachmentName cannot be null.\");\r\n if (this.skin != null) {\r\n var attachment = this.skin.getAttachment(slotIndex, attachmentName);\r\n if (attachment != null)\r\n return attachment;\r\n }\r\n if (this.data.defaultSkin != null)\r\n return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\r\n return null;\r\n };\r\n Skeleton.prototype.setAttachment = function (slotName, attachmentName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.data.name == slotName) {\r\n var attachment = null;\r\n if (attachmentName != null) {\r\n attachment = this.getAttachment(i, attachmentName);\r\n if (attachment == null)\r\n throw new Error(\"Attachment not found: \" + attachmentName + \", for slot: \" + slotName);\r\n }\r\n slot.setAttachment(attachment);\r\n return;\r\n }\r\n }\r\n throw new Error(\"Slot not found: \" + slotName);\r\n };\r\n Skeleton.prototype.findIkConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var ikConstraint = ikConstraints[i];\r\n if (ikConstraint.data.name == constraintName)\r\n return ikConstraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findTransformConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n if (constraint.data.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.findPathConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n if (constraint.data.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n Skeleton.prototype.getBounds = function (offset, size, temp) {\r\n if (temp === void 0) { temp = new Array(2); }\r\n if (offset == null)\r\n throw new Error(\"offset cannot be null.\");\r\n if (size == null)\r\n throw new Error(\"size cannot be null.\");\r\n var drawOrder = this.drawOrder;\r\n var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var slot = drawOrder[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var verticesLength = 0;\r\n var vertices = null;\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.RegionAttachment) {\r\n verticesLength = 8;\r\n vertices = spine.Utils.setArraySize(temp, verticesLength, 0);\r\n attachment.computeWorldVertices(slot.bone, vertices, 0, 2);\r\n }\r\n else if (attachment instanceof spine.MeshAttachment) {\r\n var mesh = attachment;\r\n verticesLength = mesh.worldVerticesLength;\r\n vertices = spine.Utils.setArraySize(temp, verticesLength, 0);\r\n mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\r\n }\r\n if (vertices != null) {\r\n for (var ii = 0, nn = vertices.length; ii < nn; ii += 2) {\r\n var x = vertices[ii], y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n }\r\n offset.set(minX, minY);\r\n size.set(maxX - minX, maxY - minY);\r\n };\r\n Skeleton.prototype.update = function (delta) {\r\n this.time += delta;\r\n };\r\n return Skeleton;\r\n }());\r\n spine.Skeleton = Skeleton;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonBinary = (function () {\r\n function SkeletonBinary(attachmentLoader) {\r\n this.scale = 1;\r\n this.linkedMeshes = new Array();\r\n this.attachmentLoader = attachmentLoader;\r\n }\r\n SkeletonBinary.prototype.readSkeletonData = function (binary) {\r\n var scale = this.scale;\r\n var skeletonData = new spine.SkeletonData();\r\n skeletonData.name = \"\";\r\n var input = new BinaryInput(binary);\r\n skeletonData.hash = input.readString();\r\n skeletonData.version = input.readString();\r\n if (\"3.8.75\" == skeletonData.version)\r\n throw new Error(\"Unsupported skeleton data, please export with a newer version of Spine.\");\r\n skeletonData.x = input.readFloat();\r\n skeletonData.y = input.readFloat();\r\n skeletonData.width = input.readFloat();\r\n skeletonData.height = input.readFloat();\r\n var nonessential = input.readBoolean();\r\n if (nonessential) {\r\n skeletonData.fps = input.readFloat();\r\n skeletonData.imagesPath = input.readString();\r\n skeletonData.audioPath = input.readString();\r\n }\r\n var n = 0;\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++)\r\n input.strings.push(input.readString());\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var name_2 = input.readString();\r\n var parent_2 = i == 0 ? null : skeletonData.bones[input.readInt(true)];\r\n var data = new spine.BoneData(i, name_2, parent_2);\r\n data.rotation = input.readFloat();\r\n data.x = input.readFloat() * scale;\r\n data.y = input.readFloat() * scale;\r\n data.scaleX = input.readFloat();\r\n data.scaleY = input.readFloat();\r\n data.shearX = input.readFloat();\r\n data.shearY = input.readFloat();\r\n data.length = input.readFloat() * scale;\r\n data.transformMode = SkeletonBinary.TransformModeValues[input.readInt(true)];\r\n data.skinRequired = input.readBoolean();\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(data.color, input.readInt32());\r\n skeletonData.bones.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var slotName = input.readString();\r\n var boneData = skeletonData.bones[input.readInt(true)];\r\n var data = new spine.SlotData(i, slotName, boneData);\r\n spine.Color.rgba8888ToColor(data.color, input.readInt32());\r\n var darkColor = input.readInt32();\r\n if (darkColor != -1)\r\n spine.Color.rgb888ToColor(data.darkColor = new spine.Color(), darkColor);\r\n data.attachmentName = input.readStringRef();\r\n data.blendMode = SkeletonBinary.BlendModeValues[input.readInt(true)];\r\n skeletonData.slots.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.IkConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.bones[input.readInt(true)];\r\n data.mix = input.readFloat();\r\n data.softness = input.readFloat() * scale;\r\n data.bendDirection = input.readByte();\r\n data.compress = input.readBoolean();\r\n data.stretch = input.readBoolean();\r\n data.uniform = input.readBoolean();\r\n skeletonData.ikConstraints.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.TransformConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.bones[input.readInt(true)];\r\n data.local = input.readBoolean();\r\n data.relative = input.readBoolean();\r\n data.offsetRotation = input.readFloat();\r\n data.offsetX = input.readFloat() * scale;\r\n data.offsetY = input.readFloat() * scale;\r\n data.offsetScaleX = input.readFloat();\r\n data.offsetScaleY = input.readFloat();\r\n data.offsetShearY = input.readFloat();\r\n data.rotateMix = input.readFloat();\r\n data.translateMix = input.readFloat();\r\n data.scaleMix = input.readFloat();\r\n data.shearMix = input.readFloat();\r\n skeletonData.transformConstraints.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0, nn = void 0; i < n; i++) {\r\n var data = new spine.PathConstraintData(input.readString());\r\n data.order = input.readInt(true);\r\n data.skinRequired = input.readBoolean();\r\n nn = input.readInt(true);\r\n for (var ii = 0; ii < nn; ii++)\r\n data.bones.push(skeletonData.bones[input.readInt(true)]);\r\n data.target = skeletonData.slots[input.readInt(true)];\r\n data.positionMode = SkeletonBinary.PositionModeValues[input.readInt(true)];\r\n data.spacingMode = SkeletonBinary.SpacingModeValues[input.readInt(true)];\r\n data.rotateMode = SkeletonBinary.RotateModeValues[input.readInt(true)];\r\n data.offsetRotation = input.readFloat();\r\n data.position = input.readFloat();\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n data.position *= scale;\r\n data.spacing = input.readFloat();\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n data.spacing *= scale;\r\n data.rotateMix = input.readFloat();\r\n data.translateMix = input.readFloat();\r\n skeletonData.pathConstraints.push(data);\r\n }\r\n var defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\r\n if (defaultSkin != null) {\r\n skeletonData.defaultSkin = defaultSkin;\r\n skeletonData.skins.push(defaultSkin);\r\n }\r\n {\r\n var i = skeletonData.skins.length;\r\n spine.Utils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\r\n for (; i < n; i++)\r\n skeletonData.skins[i] = this.readSkin(input, skeletonData, false, nonessential);\r\n }\r\n n = this.linkedMeshes.length;\r\n for (var i = 0; i < n; i++) {\r\n var linkedMesh = this.linkedMeshes[i];\r\n var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + linkedMesh.skin);\r\n var parent_3 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n if (parent_3 == null)\r\n throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\r\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_3 : linkedMesh.mesh;\r\n linkedMesh.mesh.setParentMesh(parent_3);\r\n linkedMesh.mesh.updateUVs();\r\n }\r\n this.linkedMeshes.length = 0;\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++) {\r\n var data = new spine.EventData(input.readStringRef());\r\n data.intValue = input.readInt(false);\r\n data.floatValue = input.readFloat();\r\n data.stringValue = input.readString();\r\n data.audioPath = input.readString();\r\n if (data.audioPath != null) {\r\n data.volume = input.readFloat();\r\n data.balance = input.readFloat();\r\n }\r\n skeletonData.events.push(data);\r\n }\r\n n = input.readInt(true);\r\n for (var i = 0; i < n; i++)\r\n skeletonData.animations.push(this.readAnimation(input, input.readString(), skeletonData));\r\n return skeletonData;\r\n };\r\n SkeletonBinary.prototype.readSkin = function (input, skeletonData, defaultSkin, nonessential) {\r\n var skin = null;\r\n var slotCount = 0;\r\n if (defaultSkin) {\r\n slotCount = input.readInt(true);\r\n if (slotCount == 0)\r\n return null;\r\n skin = new spine.Skin(\"default\");\r\n }\r\n else {\r\n skin = new spine.Skin(input.readStringRef());\r\n skin.bones.length = input.readInt(true);\r\n for (var i = 0, n = skin.bones.length; i < n; i++)\r\n skin.bones[i] = skeletonData.bones[input.readInt(true)];\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\r\n for (var i = 0, n = input.readInt(true); i < n; i++)\r\n skin.constraints.push(skeletonData.pathConstraints[input.readInt(true)]);\r\n slotCount = input.readInt(true);\r\n }\r\n for (var i = 0; i < slotCount; i++) {\r\n var slotIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var name_3 = input.readStringRef();\r\n var attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name_3, nonessential);\r\n if (attachment != null)\r\n skin.setAttachment(slotIndex, name_3, attachment);\r\n }\r\n }\r\n return skin;\r\n };\r\n SkeletonBinary.prototype.readAttachment = function (input, skeletonData, skin, slotIndex, attachmentName, nonessential) {\r\n var scale = this.scale;\r\n var name = input.readStringRef();\r\n if (name == null)\r\n name = attachmentName;\r\n var typeIndex = input.readByte();\r\n var type = SkeletonBinary.AttachmentTypeValues[typeIndex];\r\n switch (type) {\r\n case spine.AttachmentType.Region: {\r\n var path = input.readStringRef();\r\n var rotation = input.readFloat();\r\n var x = input.readFloat();\r\n var y = input.readFloat();\r\n var scaleX = input.readFloat();\r\n var scaleY = input.readFloat();\r\n var width = input.readFloat();\r\n var height = input.readFloat();\r\n var color = input.readInt32();\r\n if (path == null)\r\n path = name;\r\n var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\r\n if (region == null)\r\n return null;\r\n region.path = path;\r\n region.x = x * scale;\r\n region.y = y * scale;\r\n region.scaleX = scaleX;\r\n region.scaleY = scaleY;\r\n region.rotation = rotation;\r\n region.width = width * scale;\r\n region.height = height * scale;\r\n spine.Color.rgba8888ToColor(region.color, color);\r\n region.updateOffset();\r\n return region;\r\n }\r\n case spine.AttachmentType.BoundingBox: {\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var color = nonessential ? input.readInt32() : 0;\r\n var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n if (box == null)\r\n return null;\r\n box.worldVerticesLength = vertexCount << 1;\r\n box.vertices = vertices.vertices;\r\n box.bones = vertices.bones;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(box.color, color);\r\n return box;\r\n }\r\n case spine.AttachmentType.Mesh: {\r\n var path = input.readStringRef();\r\n var color = input.readInt32();\r\n var vertexCount = input.readInt(true);\r\n var uvs = this.readFloatArray(input, vertexCount << 1, 1);\r\n var triangles = this.readShortArray(input);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var hullLength = input.readInt(true);\r\n var edges = null;\r\n var width = 0, height = 0;\r\n if (nonessential) {\r\n edges = this.readShortArray(input);\r\n width = input.readFloat();\r\n height = input.readFloat();\r\n }\r\n if (path == null)\r\n path = name;\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n spine.Color.rgba8888ToColor(mesh.color, color);\r\n mesh.bones = vertices.bones;\r\n mesh.vertices = vertices.vertices;\r\n mesh.worldVerticesLength = vertexCount << 1;\r\n mesh.triangles = triangles;\r\n mesh.regionUVs = uvs;\r\n mesh.updateUVs();\r\n mesh.hullLength = hullLength << 1;\r\n if (nonessential) {\r\n mesh.edges = edges;\r\n mesh.width = width * scale;\r\n mesh.height = height * scale;\r\n }\r\n return mesh;\r\n }\r\n case spine.AttachmentType.LinkedMesh: {\r\n var path = input.readStringRef();\r\n var color = input.readInt32();\r\n var skinName = input.readStringRef();\r\n var parent_4 = input.readStringRef();\r\n var inheritDeform = input.readBoolean();\r\n var width = 0, height = 0;\r\n if (nonessential) {\r\n width = input.readFloat();\r\n height = input.readFloat();\r\n }\r\n if (path == null)\r\n path = name;\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n spine.Color.rgba8888ToColor(mesh.color, color);\r\n if (nonessential) {\r\n mesh.width = width * scale;\r\n mesh.height = height * scale;\r\n }\r\n this.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent_4, inheritDeform));\r\n return mesh;\r\n }\r\n case spine.AttachmentType.Path: {\r\n var closed_1 = input.readBoolean();\r\n var constantSpeed = input.readBoolean();\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var lengths = spine.Utils.newArray(vertexCount / 3, 0);\r\n for (var i = 0, n = lengths.length; i < n; i++)\r\n lengths[i] = input.readFloat() * scale;\r\n var color = nonessential ? input.readInt32() : 0;\r\n var path = this.attachmentLoader.newPathAttachment(skin, name);\r\n if (path == null)\r\n return null;\r\n path.closed = closed_1;\r\n path.constantSpeed = constantSpeed;\r\n path.worldVerticesLength = vertexCount << 1;\r\n path.vertices = vertices.vertices;\r\n path.bones = vertices.bones;\r\n path.lengths = lengths;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(path.color, color);\r\n return path;\r\n }\r\n case spine.AttachmentType.Point: {\r\n var rotation = input.readFloat();\r\n var x = input.readFloat();\r\n var y = input.readFloat();\r\n var color = nonessential ? input.readInt32() : 0;\r\n var point = this.attachmentLoader.newPointAttachment(skin, name);\r\n if (point == null)\r\n return null;\r\n point.x = x * scale;\r\n point.y = y * scale;\r\n point.rotation = rotation;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(point.color, color);\r\n return point;\r\n }\r\n case spine.AttachmentType.Clipping: {\r\n var endSlotIndex = input.readInt(true);\r\n var vertexCount = input.readInt(true);\r\n var vertices = this.readVertices(input, vertexCount);\r\n var color = nonessential ? input.readInt32() : 0;\r\n var clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n if (clip == null)\r\n return null;\r\n clip.endSlot = skeletonData.slots[endSlotIndex];\r\n clip.worldVerticesLength = vertexCount << 1;\r\n clip.vertices = vertices.vertices;\r\n clip.bones = vertices.bones;\r\n if (nonessential)\r\n spine.Color.rgba8888ToColor(clip.color, color);\r\n return clip;\r\n }\r\n }\r\n return null;\r\n };\r\n SkeletonBinary.prototype.readVertices = function (input, vertexCount) {\r\n var verticesLength = vertexCount << 1;\r\n var vertices = new Vertices();\r\n var scale = this.scale;\r\n if (!input.readBoolean()) {\r\n vertices.vertices = this.readFloatArray(input, verticesLength, scale);\r\n return vertices;\r\n }\r\n var weights = new Array();\r\n var bonesArray = new Array();\r\n for (var i = 0; i < vertexCount; i++) {\r\n var boneCount = input.readInt(true);\r\n bonesArray.push(boneCount);\r\n for (var ii = 0; ii < boneCount; ii++) {\r\n bonesArray.push(input.readInt(true));\r\n weights.push(input.readFloat() * scale);\r\n weights.push(input.readFloat() * scale);\r\n weights.push(input.readFloat());\r\n }\r\n }\r\n vertices.vertices = spine.Utils.toFloatArray(weights);\r\n vertices.bones = bonesArray;\r\n return vertices;\r\n };\r\n SkeletonBinary.prototype.readFloatArray = function (input, n, scale) {\r\n var array = new Array(n);\r\n if (scale == 1) {\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readFloat();\r\n }\r\n else {\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readFloat() * scale;\r\n }\r\n return array;\r\n };\r\n SkeletonBinary.prototype.readShortArray = function (input) {\r\n var n = input.readInt(true);\r\n var array = new Array(n);\r\n for (var i = 0; i < n; i++)\r\n array[i] = input.readShort();\r\n return array;\r\n };\r\n SkeletonBinary.prototype.readAnimation = function (input, name, skeletonData) {\r\n var timelines = new Array();\r\n var scale = this.scale;\r\n var duration = 0;\r\n var tempColor1 = new spine.Color();\r\n var tempColor2 = new spine.Color();\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var slotIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.SLOT_ATTACHMENT: {\r\n var timeline = new spine.AttachmentTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++)\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readStringRef());\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[frameCount - 1]);\r\n break;\r\n }\r\n case SkeletonBinary.SLOT_COLOR: {\r\n var timeline = new spine.ColorTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n spine.Color.rgba8888ToColor(tempColor1, input.readInt32());\r\n timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.ColorTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.SLOT_TWO_COLOR: {\r\n var timeline = new spine.TwoColorTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n spine.Color.rgba8888ToColor(tempColor1, input.readInt32());\r\n spine.Color.rgb888ToColor(tempColor2, input.readInt32());\r\n timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a, tempColor2.r, tempColor2.g, tempColor2.b);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TwoColorTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var boneIndex = input.readInt(true);\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.BONE_ROTATE: {\r\n var timeline = new spine.RotateTimeline(frameCount);\r\n timeline.boneIndex = boneIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.RotateTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.BONE_TRANSLATE:\r\n case SkeletonBinary.BONE_SCALE:\r\n case SkeletonBinary.BONE_SHEAR: {\r\n var timeline = void 0;\r\n var timelineScale = 1;\r\n if (timelineType == SkeletonBinary.BONE_SCALE)\r\n timeline = new spine.ScaleTimeline(frameCount);\r\n else if (timelineType == SkeletonBinary.BONE_SHEAR)\r\n timeline = new spine.ShearTimeline(frameCount);\r\n else {\r\n timeline = new spine.TranslateTimeline(frameCount);\r\n timelineScale = scale;\r\n }\r\n timeline.boneIndex = boneIndex;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale, input.readFloat() * timelineScale);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TranslateTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.IkConstraintTimeline(frameCount);\r\n timeline.ikConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat() * scale, input.readByte(), input.readBoolean(), input.readBoolean());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.IkConstraintTimeline.ENTRIES]);\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.TransformConstraintTimeline(frameCount);\r\n timeline.transformConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TransformConstraintTimeline.ENTRIES]);\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var index = input.readInt(true);\r\n var data = skeletonData.pathConstraints[index];\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var timelineType = input.readByte();\r\n var frameCount = input.readInt(true);\r\n switch (timelineType) {\r\n case SkeletonBinary.PATH_POSITION:\r\n case SkeletonBinary.PATH_SPACING: {\r\n var timeline = void 0;\r\n var timelineScale = 1;\r\n if (timelineType == SkeletonBinary.PATH_SPACING) {\r\n timeline = new spine.PathConstraintSpacingTimeline(frameCount);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n else {\r\n timeline = new spine.PathConstraintPositionTimeline(frameCount);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n timeline.pathConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\r\n break;\r\n }\r\n case SkeletonBinary.PATH_MIX: {\r\n var timeline = new spine.PathConstraintMixTimeline(frameCount);\r\n timeline.pathConstraintIndex = index;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat());\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n for (var i = 0, n = input.readInt(true); i < n; i++) {\r\n var skin = skeletonData.skins[input.readInt(true)];\r\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\r\n var slotIndex = input.readInt(true);\r\n for (var iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\r\n var attachment = skin.getAttachment(slotIndex, input.readStringRef());\r\n var weighted = attachment.bones != null;\r\n var vertices = attachment.vertices;\r\n var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n var frameCount = input.readInt(true);\r\n var timeline = new spine.DeformTimeline(frameCount);\r\n timeline.slotIndex = slotIndex;\r\n timeline.attachment = attachment;\r\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\r\n var time = input.readFloat();\r\n var deform = void 0;\r\n var end = input.readInt(true);\r\n if (end == 0)\r\n deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\r\n else {\r\n deform = spine.Utils.newFloatArray(deformLength);\r\n var start = input.readInt(true);\r\n end += start;\r\n if (scale == 1) {\r\n for (var v = start; v < end; v++)\r\n deform[v] = input.readFloat();\r\n }\r\n else {\r\n for (var v = start; v < end; v++)\r\n deform[v] = input.readFloat() * scale;\r\n }\r\n if (!weighted) {\r\n for (var v = 0, vn = deform.length; v < vn; v++)\r\n deform[v] += vertices[v];\r\n }\r\n }\r\n timeline.setFrame(frameIndex, time, deform);\r\n if (frameIndex < frameCount - 1)\r\n this.readCurve(input, frameIndex, timeline);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[frameCount - 1]);\r\n }\r\n }\r\n }\r\n var drawOrderCount = input.readInt(true);\r\n if (drawOrderCount > 0) {\r\n var timeline = new spine.DrawOrderTimeline(drawOrderCount);\r\n var slotCount = skeletonData.slots.length;\r\n for (var i = 0; i < drawOrderCount; i++) {\r\n var time = input.readFloat();\r\n var offsetCount = input.readInt(true);\r\n var drawOrder = spine.Utils.newArray(slotCount, 0);\r\n for (var ii = slotCount - 1; ii >= 0; ii--)\r\n drawOrder[ii] = -1;\r\n var unchanged = spine.Utils.newArray(slotCount - offsetCount, 0);\r\n var originalIndex = 0, unchangedIndex = 0;\r\n for (var ii = 0; ii < offsetCount; ii++) {\r\n var slotIndex = input.readInt(true);\r\n while (originalIndex != slotIndex)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n drawOrder[originalIndex + input.readInt(true)] = originalIndex++;\r\n }\r\n while (originalIndex < slotCount)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n for (var ii = slotCount - 1; ii >= 0; ii--)\r\n if (drawOrder[ii] == -1)\r\n drawOrder[ii] = unchanged[--unchangedIndex];\r\n timeline.setFrame(i, time, drawOrder);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[drawOrderCount - 1]);\r\n }\r\n var eventCount = input.readInt(true);\r\n if (eventCount > 0) {\r\n var timeline = new spine.EventTimeline(eventCount);\r\n for (var i = 0; i < eventCount; i++) {\r\n var time = input.readFloat();\r\n var eventData = skeletonData.events[input.readInt(true)];\r\n var event_4 = new spine.Event(time, eventData);\r\n event_4.intValue = input.readInt(false);\r\n event_4.floatValue = input.readFloat();\r\n event_4.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\r\n if (event_4.data.audioPath != null) {\r\n event_4.volume = input.readFloat();\r\n event_4.balance = input.readFloat();\r\n }\r\n timeline.setFrame(i, event_4);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[eventCount - 1]);\r\n }\r\n return new spine.Animation(name, timelines, duration);\r\n };\r\n SkeletonBinary.prototype.readCurve = function (input, frameIndex, timeline) {\r\n switch (input.readByte()) {\r\n case SkeletonBinary.CURVE_STEPPED:\r\n timeline.setStepped(frameIndex);\r\n break;\r\n case SkeletonBinary.CURVE_BEZIER:\r\n this.setCurve(timeline, frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\r\n break;\r\n }\r\n };\r\n SkeletonBinary.prototype.setCurve = function (timeline, frameIndex, cx1, cy1, cx2, cy2) {\r\n timeline.setCurve(frameIndex, cx1, cy1, cx2, cy2);\r\n };\r\n SkeletonBinary.AttachmentTypeValues = [0, 1, 2, 3, 4, 5, 6];\r\n SkeletonBinary.TransformModeValues = [spine.TransformMode.Normal, spine.TransformMode.OnlyTranslation, spine.TransformMode.NoRotationOrReflection, spine.TransformMode.NoScale, spine.TransformMode.NoScaleOrReflection];\r\n SkeletonBinary.PositionModeValues = [spine.PositionMode.Fixed, spine.PositionMode.Percent];\r\n SkeletonBinary.SpacingModeValues = [spine.SpacingMode.Length, spine.SpacingMode.Fixed, spine.SpacingMode.Percent];\r\n SkeletonBinary.RotateModeValues = [spine.RotateMode.Tangent, spine.RotateMode.Chain, spine.RotateMode.ChainScale];\r\n SkeletonBinary.BlendModeValues = [spine.BlendMode.Normal, spine.BlendMode.Additive, spine.BlendMode.Multiply, spine.BlendMode.Screen];\r\n SkeletonBinary.BONE_ROTATE = 0;\r\n SkeletonBinary.BONE_TRANSLATE = 1;\r\n SkeletonBinary.BONE_SCALE = 2;\r\n SkeletonBinary.BONE_SHEAR = 3;\r\n SkeletonBinary.SLOT_ATTACHMENT = 0;\r\n SkeletonBinary.SLOT_COLOR = 1;\r\n SkeletonBinary.SLOT_TWO_COLOR = 2;\r\n SkeletonBinary.PATH_POSITION = 0;\r\n SkeletonBinary.PATH_SPACING = 1;\r\n SkeletonBinary.PATH_MIX = 2;\r\n SkeletonBinary.CURVE_LINEAR = 0;\r\n SkeletonBinary.CURVE_STEPPED = 1;\r\n SkeletonBinary.CURVE_BEZIER = 2;\r\n return SkeletonBinary;\r\n }());\r\n spine.SkeletonBinary = SkeletonBinary;\r\n var BinaryInput = (function () {\r\n function BinaryInput(data, strings, index, buffer) {\r\n if (strings === void 0) { strings = new Array(); }\r\n if (index === void 0) { index = 0; }\r\n if (buffer === void 0) { buffer = new DataView(data.buffer); }\r\n this.strings = strings;\r\n this.index = index;\r\n this.buffer = buffer;\r\n }\r\n BinaryInput.prototype.readByte = function () {\r\n return this.buffer.getInt8(this.index++);\r\n };\r\n BinaryInput.prototype.readShort = function () {\r\n var value = this.buffer.getInt16(this.index);\r\n this.index += 2;\r\n return value;\r\n };\r\n BinaryInput.prototype.readInt32 = function () {\r\n var value = this.buffer.getInt32(this.index);\r\n this.index += 4;\r\n return value;\r\n };\r\n BinaryInput.prototype.readInt = function (optimizePositive) {\r\n var b = this.readByte();\r\n var result = b & 0x7F;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 7;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 14;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 21;\r\n if ((b & 0x80) != 0) {\r\n b = this.readByte();\r\n result |= (b & 0x7F) << 28;\r\n }\r\n }\r\n }\r\n }\r\n return optimizePositive ? result : ((result >>> 1) ^ -(result & 1));\r\n };\r\n BinaryInput.prototype.readStringRef = function () {\r\n var index = this.readInt(true);\r\n return index == 0 ? null : this.strings[index - 1];\r\n };\r\n BinaryInput.prototype.readString = function () {\r\n var byteCount = this.readInt(true);\r\n switch (byteCount) {\r\n case 0:\r\n return null;\r\n case 1:\r\n return \"\";\r\n }\r\n byteCount--;\r\n var chars = \"\";\r\n var charCount = 0;\r\n for (var i = 0; i < byteCount;) {\r\n var b = this.readByte();\r\n switch (b >> 4) {\r\n case 12:\r\n case 13:\r\n chars += String.fromCharCode(((b & 0x1F) << 6 | this.readByte() & 0x3F));\r\n i += 2;\r\n break;\r\n case 14:\r\n chars += String.fromCharCode(((b & 0x0F) << 12 | (this.readByte() & 0x3F) << 6 | this.readByte() & 0x3F));\r\n i += 3;\r\n break;\r\n default:\r\n chars += String.fromCharCode(b);\r\n i++;\r\n }\r\n }\r\n return chars;\r\n };\r\n BinaryInput.prototype.readFloat = function () {\r\n var value = this.buffer.getFloat32(this.index);\r\n this.index += 4;\r\n return value;\r\n };\r\n BinaryInput.prototype.readBoolean = function () {\r\n return this.readByte() != 0;\r\n };\r\n return BinaryInput;\r\n }());\r\n var LinkedMesh = (function () {\r\n function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\r\n this.mesh = mesh;\r\n this.skin = skin;\r\n this.slotIndex = slotIndex;\r\n this.parent = parent;\r\n this.inheritDeform = inheritDeform;\r\n }\r\n return LinkedMesh;\r\n }());\r\n var Vertices = (function () {\r\n function Vertices(bones, vertices) {\r\n if (bones === void 0) { bones = null; }\r\n if (vertices === void 0) { vertices = null; }\r\n this.bones = bones;\r\n this.vertices = vertices;\r\n }\r\n return Vertices;\r\n }());\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonBounds = (function () {\r\n function SkeletonBounds() {\r\n this.minX = 0;\r\n this.minY = 0;\r\n this.maxX = 0;\r\n this.maxY = 0;\r\n this.boundingBoxes = new Array();\r\n this.polygons = new Array();\r\n this.polygonPool = new spine.Pool(function () {\r\n return spine.Utils.newFloatArray(16);\r\n });\r\n }\r\n SkeletonBounds.prototype.update = function (skeleton, updateAabb) {\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n var boundingBoxes = this.boundingBoxes;\r\n var polygons = this.polygons;\r\n var polygonPool = this.polygonPool;\r\n var slots = skeleton.slots;\r\n var slotCount = slots.length;\r\n boundingBoxes.length = 0;\r\n polygonPool.freeAll(polygons);\r\n polygons.length = 0;\r\n for (var i = 0; i < slotCount; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.BoundingBoxAttachment) {\r\n var boundingBox = attachment;\r\n boundingBoxes.push(boundingBox);\r\n var polygon = polygonPool.obtain();\r\n if (polygon.length != boundingBox.worldVerticesLength) {\r\n polygon = spine.Utils.newFloatArray(boundingBox.worldVerticesLength);\r\n }\r\n polygons.push(polygon);\r\n boundingBox.computeWorldVertices(slot, 0, boundingBox.worldVerticesLength, polygon, 0, 2);\r\n }\r\n }\r\n if (updateAabb) {\r\n this.aabbCompute();\r\n }\r\n else {\r\n this.minX = Number.POSITIVE_INFINITY;\r\n this.minY = Number.POSITIVE_INFINITY;\r\n this.maxX = Number.NEGATIVE_INFINITY;\r\n this.maxY = Number.NEGATIVE_INFINITY;\r\n }\r\n };\r\n SkeletonBounds.prototype.aabbCompute = function () {\r\n var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++) {\r\n var polygon = polygons[i];\r\n var vertices = polygon;\r\n for (var ii = 0, nn = polygon.length; ii < nn; ii += 2) {\r\n var x = vertices[ii];\r\n var y = vertices[ii + 1];\r\n minX = Math.min(minX, x);\r\n minY = Math.min(minY, y);\r\n maxX = Math.max(maxX, x);\r\n maxY = Math.max(maxY, y);\r\n }\r\n }\r\n this.minX = minX;\r\n this.minY = minY;\r\n this.maxX = maxX;\r\n this.maxY = maxY;\r\n };\r\n SkeletonBounds.prototype.aabbContainsPoint = function (x, y) {\r\n return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\r\n };\r\n SkeletonBounds.prototype.aabbIntersectsSegment = function (x1, y1, x2, y2) {\r\n var minX = this.minX;\r\n var minY = this.minY;\r\n var maxX = this.maxX;\r\n var maxY = this.maxY;\r\n if ((x1 <= minX && x2 <= minX) || (y1 <= minY && y2 <= minY) || (x1 >= maxX && x2 >= maxX) || (y1 >= maxY && y2 >= maxY))\r\n return false;\r\n var m = (y2 - y1) / (x2 - x1);\r\n var y = m * (minX - x1) + y1;\r\n if (y > minY && y < maxY)\r\n return true;\r\n y = m * (maxX - x1) + y1;\r\n if (y > minY && y < maxY)\r\n return true;\r\n var x = (minY - y1) / m + x1;\r\n if (x > minX && x < maxX)\r\n return true;\r\n x = (maxY - y1) / m + x1;\r\n if (x > minX && x < maxX)\r\n return true;\r\n return false;\r\n };\r\n SkeletonBounds.prototype.aabbIntersectsSkeleton = function (bounds) {\r\n return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\r\n };\r\n SkeletonBounds.prototype.containsPoint = function (x, y) {\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++)\r\n if (this.containsPointPolygon(polygons[i], x, y))\r\n return this.boundingBoxes[i];\r\n return null;\r\n };\r\n SkeletonBounds.prototype.containsPointPolygon = function (polygon, x, y) {\r\n var vertices = polygon;\r\n var nn = polygon.length;\r\n var prevIndex = nn - 2;\r\n var inside = false;\r\n for (var ii = 0; ii < nn; ii += 2) {\r\n var vertexY = vertices[ii + 1];\r\n var prevY = vertices[prevIndex + 1];\r\n if ((vertexY < y && prevY >= y) || (prevY < y && vertexY >= y)) {\r\n var vertexX = vertices[ii];\r\n if (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x)\r\n inside = !inside;\r\n }\r\n prevIndex = ii;\r\n }\r\n return inside;\r\n };\r\n SkeletonBounds.prototype.intersectsSegment = function (x1, y1, x2, y2) {\r\n var polygons = this.polygons;\r\n for (var i = 0, n = polygons.length; i < n; i++)\r\n if (this.intersectsSegmentPolygon(polygons[i], x1, y1, x2, y2))\r\n return this.boundingBoxes[i];\r\n return null;\r\n };\r\n SkeletonBounds.prototype.intersectsSegmentPolygon = function (polygon, x1, y1, x2, y2) {\r\n var vertices = polygon;\r\n var nn = polygon.length;\r\n var width12 = x1 - x2, height12 = y1 - y2;\r\n var det1 = x1 * y2 - y1 * x2;\r\n var x3 = vertices[nn - 2], y3 = vertices[nn - 1];\r\n for (var ii = 0; ii < nn; ii += 2) {\r\n var x4 = vertices[ii], y4 = vertices[ii + 1];\r\n var det2 = x3 * y4 - y3 * x4;\r\n var width34 = x3 - x4, height34 = y3 - y4;\r\n var det3 = width12 * height34 - height12 * width34;\r\n var x = (det1 * width34 - width12 * det2) / det3;\r\n if (((x >= x3 && x <= x4) || (x >= x4 && x <= x3)) && ((x >= x1 && x <= x2) || (x >= x2 && x <= x1))) {\r\n var y = (det1 * height34 - height12 * det2) / det3;\r\n if (((y >= y3 && y <= y4) || (y >= y4 && y <= y3)) && ((y >= y1 && y <= y2) || (y >= y2 && y <= y1)))\r\n return true;\r\n }\r\n x3 = x4;\r\n y3 = y4;\r\n }\r\n return false;\r\n };\r\n SkeletonBounds.prototype.getPolygon = function (boundingBox) {\r\n if (boundingBox == null)\r\n throw new Error(\"boundingBox cannot be null.\");\r\n var index = this.boundingBoxes.indexOf(boundingBox);\r\n return index == -1 ? null : this.polygons[index];\r\n };\r\n SkeletonBounds.prototype.getWidth = function () {\r\n return this.maxX - this.minX;\r\n };\r\n SkeletonBounds.prototype.getHeight = function () {\r\n return this.maxY - this.minY;\r\n };\r\n return SkeletonBounds;\r\n }());\r\n spine.SkeletonBounds = SkeletonBounds;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonClipping = (function () {\r\n function SkeletonClipping() {\r\n this.triangulator = new spine.Triangulator();\r\n this.clippingPolygon = new Array();\r\n this.clipOutput = new Array();\r\n this.clippedVertices = new Array();\r\n this.clippedTriangles = new Array();\r\n this.scratch = new Array();\r\n }\r\n SkeletonClipping.prototype.clipStart = function (slot, clip) {\r\n if (this.clipAttachment != null)\r\n return 0;\r\n this.clipAttachment = clip;\r\n var n = clip.worldVerticesLength;\r\n var vertices = spine.Utils.setArraySize(this.clippingPolygon, n);\r\n clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\r\n var clippingPolygon = this.clippingPolygon;\r\n SkeletonClipping.makeClockwise(clippingPolygon);\r\n var clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon));\r\n for (var i = 0, n_2 = clippingPolygons.length; i < n_2; i++) {\r\n var polygon = clippingPolygons[i];\r\n SkeletonClipping.makeClockwise(polygon);\r\n polygon.push(polygon[0]);\r\n polygon.push(polygon[1]);\r\n }\r\n return clippingPolygons.length;\r\n };\r\n SkeletonClipping.prototype.clipEndWithSlot = function (slot) {\r\n if (this.clipAttachment != null && this.clipAttachment.endSlot == slot.data)\r\n this.clipEnd();\r\n };\r\n SkeletonClipping.prototype.clipEnd = function () {\r\n if (this.clipAttachment == null)\r\n return;\r\n this.clipAttachment = null;\r\n this.clippingPolygons = null;\r\n this.clippedVertices.length = 0;\r\n this.clippedTriangles.length = 0;\r\n this.clippingPolygon.length = 0;\r\n };\r\n SkeletonClipping.prototype.isClipping = function () {\r\n return this.clipAttachment != null;\r\n };\r\n SkeletonClipping.prototype.clipTriangles = function (vertices, verticesLength, triangles, trianglesLength, uvs, light, dark, twoColor) {\r\n var clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;\r\n var clippedTriangles = this.clippedTriangles;\r\n var polygons = this.clippingPolygons;\r\n var polygonsCount = this.clippingPolygons.length;\r\n var vertexSize = twoColor ? 12 : 8;\r\n var index = 0;\r\n clippedVertices.length = 0;\r\n clippedTriangles.length = 0;\r\n outer: for (var i = 0; i < trianglesLength; i += 3) {\r\n var vertexOffset = triangles[i] << 1;\r\n var x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\r\n var u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];\r\n vertexOffset = triangles[i + 1] << 1;\r\n var x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\r\n var u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];\r\n vertexOffset = triangles[i + 2] << 1;\r\n var x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\r\n var u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];\r\n for (var p = 0; p < polygonsCount; p++) {\r\n var s = clippedVertices.length;\r\n if (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) {\r\n var clipOutputLength = clipOutput.length;\r\n if (clipOutputLength == 0)\r\n continue;\r\n var d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\r\n var d = 1 / (d0 * d2 + d1 * (y1 - y3));\r\n var clipOutputCount = clipOutputLength >> 1;\r\n var clipOutputItems = this.clipOutput;\r\n var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);\r\n for (var ii = 0; ii < clipOutputLength; ii += 2) {\r\n var x = clipOutputItems[ii], y = clipOutputItems[ii + 1];\r\n clippedVerticesItems[s] = x;\r\n clippedVerticesItems[s + 1] = y;\r\n clippedVerticesItems[s + 2] = light.r;\r\n clippedVerticesItems[s + 3] = light.g;\r\n clippedVerticesItems[s + 4] = light.b;\r\n clippedVerticesItems[s + 5] = light.a;\r\n var c0 = x - x3, c1 = y - y3;\r\n var a = (d0 * c0 + d1 * c1) * d;\r\n var b = (d4 * c0 + d2 * c1) * d;\r\n var c = 1 - a - b;\r\n clippedVerticesItems[s + 6] = u1 * a + u2 * b + u3 * c;\r\n clippedVerticesItems[s + 7] = v1 * a + v2 * b + v3 * c;\r\n if (twoColor) {\r\n clippedVerticesItems[s + 8] = dark.r;\r\n clippedVerticesItems[s + 9] = dark.g;\r\n clippedVerticesItems[s + 10] = dark.b;\r\n clippedVerticesItems[s + 11] = dark.a;\r\n }\r\n s += vertexSize;\r\n }\r\n s = clippedTriangles.length;\r\n var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));\r\n clipOutputCount--;\r\n for (var ii = 1; ii < clipOutputCount; ii++) {\r\n clippedTrianglesItems[s] = index;\r\n clippedTrianglesItems[s + 1] = (index + ii);\r\n clippedTrianglesItems[s + 2] = (index + ii + 1);\r\n s += 3;\r\n }\r\n index += clipOutputCount + 1;\r\n }\r\n else {\r\n var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + 3 * vertexSize);\r\n clippedVerticesItems[s] = x1;\r\n clippedVerticesItems[s + 1] = y1;\r\n clippedVerticesItems[s + 2] = light.r;\r\n clippedVerticesItems[s + 3] = light.g;\r\n clippedVerticesItems[s + 4] = light.b;\r\n clippedVerticesItems[s + 5] = light.a;\r\n if (!twoColor) {\r\n clippedVerticesItems[s + 6] = u1;\r\n clippedVerticesItems[s + 7] = v1;\r\n clippedVerticesItems[s + 8] = x2;\r\n clippedVerticesItems[s + 9] = y2;\r\n clippedVerticesItems[s + 10] = light.r;\r\n clippedVerticesItems[s + 11] = light.g;\r\n clippedVerticesItems[s + 12] = light.b;\r\n clippedVerticesItems[s + 13] = light.a;\r\n clippedVerticesItems[s + 14] = u2;\r\n clippedVerticesItems[s + 15] = v2;\r\n clippedVerticesItems[s + 16] = x3;\r\n clippedVerticesItems[s + 17] = y3;\r\n clippedVerticesItems[s + 18] = light.r;\r\n clippedVerticesItems[s + 19] = light.g;\r\n clippedVerticesItems[s + 20] = light.b;\r\n clippedVerticesItems[s + 21] = light.a;\r\n clippedVerticesItems[s + 22] = u3;\r\n clippedVerticesItems[s + 23] = v3;\r\n }\r\n else {\r\n clippedVerticesItems[s + 6] = u1;\r\n clippedVerticesItems[s + 7] = v1;\r\n clippedVerticesItems[s + 8] = dark.r;\r\n clippedVerticesItems[s + 9] = dark.g;\r\n clippedVerticesItems[s + 10] = dark.b;\r\n clippedVerticesItems[s + 11] = dark.a;\r\n clippedVerticesItems[s + 12] = x2;\r\n clippedVerticesItems[s + 13] = y2;\r\n clippedVerticesItems[s + 14] = light.r;\r\n clippedVerticesItems[s + 15] = light.g;\r\n clippedVerticesItems[s + 16] = light.b;\r\n clippedVerticesItems[s + 17] = light.a;\r\n clippedVerticesItems[s + 18] = u2;\r\n clippedVerticesItems[s + 19] = v2;\r\n clippedVerticesItems[s + 20] = dark.r;\r\n clippedVerticesItems[s + 21] = dark.g;\r\n clippedVerticesItems[s + 22] = dark.b;\r\n clippedVerticesItems[s + 23] = dark.a;\r\n clippedVerticesItems[s + 24] = x3;\r\n clippedVerticesItems[s + 25] = y3;\r\n clippedVerticesItems[s + 26] = light.r;\r\n clippedVerticesItems[s + 27] = light.g;\r\n clippedVerticesItems[s + 28] = light.b;\r\n clippedVerticesItems[s + 29] = light.a;\r\n clippedVerticesItems[s + 30] = u3;\r\n clippedVerticesItems[s + 31] = v3;\r\n clippedVerticesItems[s + 32] = dark.r;\r\n clippedVerticesItems[s + 33] = dark.g;\r\n clippedVerticesItems[s + 34] = dark.b;\r\n clippedVerticesItems[s + 35] = dark.a;\r\n }\r\n s = clippedTriangles.length;\r\n var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3);\r\n clippedTrianglesItems[s] = index;\r\n clippedTrianglesItems[s + 1] = (index + 1);\r\n clippedTrianglesItems[s + 2] = (index + 2);\r\n index += 3;\r\n continue outer;\r\n }\r\n }\r\n }\r\n };\r\n SkeletonClipping.prototype.clip = function (x1, y1, x2, y2, x3, y3, clippingArea, output) {\r\n var originalOutput = output;\r\n var clipped = false;\r\n var input = null;\r\n if (clippingArea.length % 4 >= 2) {\r\n input = output;\r\n output = this.scratch;\r\n }\r\n else\r\n input = this.scratch;\r\n input.length = 0;\r\n input.push(x1);\r\n input.push(y1);\r\n input.push(x2);\r\n input.push(y2);\r\n input.push(x3);\r\n input.push(y3);\r\n input.push(x1);\r\n input.push(y1);\r\n output.length = 0;\r\n var clippingVertices = clippingArea;\r\n var clippingVerticesLast = clippingArea.length - 4;\r\n for (var i = 0;; i += 2) {\r\n var edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\r\n var edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];\r\n var deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;\r\n var inputVertices = input;\r\n var inputVerticesLength = input.length - 2, outputStart = output.length;\r\n for (var ii = 0; ii < inputVerticesLength; ii += 2) {\r\n var inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\r\n var inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];\r\n var side2 = deltaX * (inputY2 - edgeY2) - deltaY * (inputX2 - edgeX2) > 0;\r\n if (deltaX * (inputY - edgeY2) - deltaY * (inputX - edgeX2) > 0) {\r\n if (side2) {\r\n output.push(inputX2);\r\n output.push(inputY2);\r\n continue;\r\n }\r\n var c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n var s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\r\n if (Math.abs(s) > 0.000001) {\r\n var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\r\n output.push(edgeX + (edgeX2 - edgeX) * ua);\r\n output.push(edgeY + (edgeY2 - edgeY) * ua);\r\n }\r\n else {\r\n output.push(edgeX);\r\n output.push(edgeY);\r\n }\r\n }\r\n else if (side2) {\r\n var c0 = inputY2 - inputY, c2 = inputX2 - inputX;\r\n var s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\r\n if (Math.abs(s) > 0.000001) {\r\n var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\r\n output.push(edgeX + (edgeX2 - edgeX) * ua);\r\n output.push(edgeY + (edgeY2 - edgeY) * ua);\r\n }\r\n else {\r\n output.push(edgeX);\r\n output.push(edgeY);\r\n }\r\n output.push(inputX2);\r\n output.push(inputY2);\r\n }\r\n clipped = true;\r\n }\r\n if (outputStart == output.length) {\r\n originalOutput.length = 0;\r\n return true;\r\n }\r\n output.push(output[0]);\r\n output.push(output[1]);\r\n if (i == clippingVerticesLast)\r\n break;\r\n var temp = output;\r\n output = input;\r\n output.length = 0;\r\n input = temp;\r\n }\r\n if (originalOutput != output) {\r\n originalOutput.length = 0;\r\n for (var i = 0, n = output.length - 2; i < n; i++)\r\n originalOutput[i] = output[i];\r\n }\r\n else\r\n originalOutput.length = originalOutput.length - 2;\r\n return clipped;\r\n };\r\n SkeletonClipping.makeClockwise = function (polygon) {\r\n var vertices = polygon;\r\n var verticeslength = polygon.length;\r\n var area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0;\r\n for (var i = 0, n = verticeslength - 3; i < n; i += 2) {\r\n p1x = vertices[i];\r\n p1y = vertices[i + 1];\r\n p2x = vertices[i + 2];\r\n p2y = vertices[i + 3];\r\n area += p1x * p2y - p2x * p1y;\r\n }\r\n if (area < 0)\r\n return;\r\n for (var i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\r\n var x = vertices[i], y = vertices[i + 1];\r\n var other = lastX - i;\r\n vertices[i] = vertices[other];\r\n vertices[i + 1] = vertices[other + 1];\r\n vertices[other] = x;\r\n vertices[other + 1] = y;\r\n }\r\n };\r\n return SkeletonClipping;\r\n }());\r\n spine.SkeletonClipping = SkeletonClipping;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonData = (function () {\r\n function SkeletonData() {\r\n this.bones = new Array();\r\n this.slots = new Array();\r\n this.skins = new Array();\r\n this.events = new Array();\r\n this.animations = new Array();\r\n this.ikConstraints = new Array();\r\n this.transformConstraints = new Array();\r\n this.pathConstraints = new Array();\r\n this.fps = 0;\r\n }\r\n SkeletonData.prototype.findBone = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (bone.name == boneName)\r\n return bone;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findBoneIndex = function (boneName) {\r\n if (boneName == null)\r\n throw new Error(\"boneName cannot be null.\");\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++)\r\n if (bones[i].name == boneName)\r\n return i;\r\n return -1;\r\n };\r\n SkeletonData.prototype.findSlot = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (slot.name == slotName)\r\n return slot;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findSlotIndex = function (slotName) {\r\n if (slotName == null)\r\n throw new Error(\"slotName cannot be null.\");\r\n var slots = this.slots;\r\n for (var i = 0, n = slots.length; i < n; i++)\r\n if (slots[i].name == slotName)\r\n return i;\r\n return -1;\r\n };\r\n SkeletonData.prototype.findSkin = function (skinName) {\r\n if (skinName == null)\r\n throw new Error(\"skinName cannot be null.\");\r\n var skins = this.skins;\r\n for (var i = 0, n = skins.length; i < n; i++) {\r\n var skin = skins[i];\r\n if (skin.name == skinName)\r\n return skin;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findEvent = function (eventDataName) {\r\n if (eventDataName == null)\r\n throw new Error(\"eventDataName cannot be null.\");\r\n var events = this.events;\r\n for (var i = 0, n = events.length; i < n; i++) {\r\n var event_5 = events[i];\r\n if (event_5.name == eventDataName)\r\n return event_5;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findAnimation = function (animationName) {\r\n if (animationName == null)\r\n throw new Error(\"animationName cannot be null.\");\r\n var animations = this.animations;\r\n for (var i = 0, n = animations.length; i < n; i++) {\r\n var animation = animations[i];\r\n if (animation.name == animationName)\r\n return animation;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findIkConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var ikConstraints = this.ikConstraints;\r\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\r\n var constraint = ikConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findTransformConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var transformConstraints = this.transformConstraints;\r\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\r\n var constraint = transformConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findPathConstraint = function (constraintName) {\r\n if (constraintName == null)\r\n throw new Error(\"constraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\r\n var constraint = pathConstraints[i];\r\n if (constraint.name == constraintName)\r\n return constraint;\r\n }\r\n return null;\r\n };\r\n SkeletonData.prototype.findPathConstraintIndex = function (pathConstraintName) {\r\n if (pathConstraintName == null)\r\n throw new Error(\"pathConstraintName cannot be null.\");\r\n var pathConstraints = this.pathConstraints;\r\n for (var i = 0, n = pathConstraints.length; i < n; i++)\r\n if (pathConstraints[i].name == pathConstraintName)\r\n return i;\r\n return -1;\r\n };\r\n return SkeletonData;\r\n }());\r\n spine.SkeletonData = SkeletonData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkeletonJson = (function () {\r\n function SkeletonJson(attachmentLoader) {\r\n this.scale = 1;\r\n this.linkedMeshes = new Array();\r\n this.attachmentLoader = attachmentLoader;\r\n }\r\n SkeletonJson.prototype.readSkeletonData = function (json) {\r\n var scale = this.scale;\r\n var skeletonData = new spine.SkeletonData();\r\n var root = typeof (json) === \"string\" ? JSON.parse(json) : json;\r\n var skeletonMap = root.skeleton;\r\n if (skeletonMap != null) {\r\n skeletonData.hash = skeletonMap.hash;\r\n skeletonData.version = skeletonMap.spine;\r\n if (\"3.8.75\" == skeletonData.version)\r\n throw new Error(\"Unsupported skeleton data, please export with a newer version of Spine.\");\r\n skeletonData.x = skeletonMap.x;\r\n skeletonData.y = skeletonMap.y;\r\n skeletonData.width = skeletonMap.width;\r\n skeletonData.height = skeletonMap.height;\r\n skeletonData.fps = skeletonMap.fps;\r\n skeletonData.imagesPath = skeletonMap.images;\r\n }\r\n if (root.bones) {\r\n for (var i = 0; i < root.bones.length; i++) {\r\n var boneMap = root.bones[i];\r\n var parent_5 = null;\r\n var parentName = this.getValue(boneMap, \"parent\", null);\r\n if (parentName != null) {\r\n parent_5 = skeletonData.findBone(parentName);\r\n if (parent_5 == null)\r\n throw new Error(\"Parent bone not found: \" + parentName);\r\n }\r\n var data = new spine.BoneData(skeletonData.bones.length, boneMap.name, parent_5);\r\n data.length = this.getValue(boneMap, \"length\", 0) * scale;\r\n data.x = this.getValue(boneMap, \"x\", 0) * scale;\r\n data.y = this.getValue(boneMap, \"y\", 0) * scale;\r\n data.rotation = this.getValue(boneMap, \"rotation\", 0);\r\n data.scaleX = this.getValue(boneMap, \"scaleX\", 1);\r\n data.scaleY = this.getValue(boneMap, \"scaleY\", 1);\r\n data.shearX = this.getValue(boneMap, \"shearX\", 0);\r\n data.shearY = this.getValue(boneMap, \"shearY\", 0);\r\n data.transformMode = SkeletonJson.transformModeFromString(this.getValue(boneMap, \"transform\", \"normal\"));\r\n data.skinRequired = this.getValue(boneMap, \"skin\", false);\r\n skeletonData.bones.push(data);\r\n }\r\n }\r\n if (root.slots) {\r\n for (var i = 0; i < root.slots.length; i++) {\r\n var slotMap = root.slots[i];\r\n var slotName = slotMap.name;\r\n var boneName = slotMap.bone;\r\n var boneData = skeletonData.findBone(boneName);\r\n if (boneData == null)\r\n throw new Error(\"Slot bone not found: \" + boneName);\r\n var data = new spine.SlotData(skeletonData.slots.length, slotName, boneData);\r\n var color = this.getValue(slotMap, \"color\", null);\r\n if (color != null)\r\n data.color.setFromString(color);\r\n var dark = this.getValue(slotMap, \"dark\", null);\r\n if (dark != null) {\r\n data.darkColor = new spine.Color(1, 1, 1, 1);\r\n data.darkColor.setFromString(dark);\r\n }\r\n data.attachmentName = this.getValue(slotMap, \"attachment\", null);\r\n data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, \"blend\", \"normal\"));\r\n skeletonData.slots.push(data);\r\n }\r\n }\r\n if (root.ik) {\r\n for (var i = 0; i < root.ik.length; i++) {\r\n var constraintMap = root.ik[i];\r\n var data = new spine.IkConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"IK bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findBone(targetName);\r\n if (data.target == null)\r\n throw new Error(\"IK target bone not found: \" + targetName);\r\n data.mix = this.getValue(constraintMap, \"mix\", 1);\r\n data.softness = this.getValue(constraintMap, \"softness\", 0) * scale;\r\n data.bendDirection = this.getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\r\n data.compress = this.getValue(constraintMap, \"compress\", false);\r\n data.stretch = this.getValue(constraintMap, \"stretch\", false);\r\n data.uniform = this.getValue(constraintMap, \"uniform\", false);\r\n skeletonData.ikConstraints.push(data);\r\n }\r\n }\r\n if (root.transform) {\r\n for (var i = 0; i < root.transform.length; i++) {\r\n var constraintMap = root.transform[i];\r\n var data = new spine.TransformConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"Transform constraint bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findBone(targetName);\r\n if (data.target == null)\r\n throw new Error(\"Transform constraint target bone not found: \" + targetName);\r\n data.local = this.getValue(constraintMap, \"local\", false);\r\n data.relative = this.getValue(constraintMap, \"relative\", false);\r\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\r\n data.offsetX = this.getValue(constraintMap, \"x\", 0) * scale;\r\n data.offsetY = this.getValue(constraintMap, \"y\", 0) * scale;\r\n data.offsetScaleX = this.getValue(constraintMap, \"scaleX\", 0);\r\n data.offsetScaleY = this.getValue(constraintMap, \"scaleY\", 0);\r\n data.offsetShearY = this.getValue(constraintMap, \"shearY\", 0);\r\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\r\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\r\n data.scaleMix = this.getValue(constraintMap, \"scaleMix\", 1);\r\n data.shearMix = this.getValue(constraintMap, \"shearMix\", 1);\r\n skeletonData.transformConstraints.push(data);\r\n }\r\n }\r\n if (root.path) {\r\n for (var i = 0; i < root.path.length; i++) {\r\n var constraintMap = root.path[i];\r\n var data = new spine.PathConstraintData(constraintMap.name);\r\n data.order = this.getValue(constraintMap, \"order\", 0);\r\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\r\n for (var j = 0; j < constraintMap.bones.length; j++) {\r\n var boneName = constraintMap.bones[j];\r\n var bone = skeletonData.findBone(boneName);\r\n if (bone == null)\r\n throw new Error(\"Transform constraint bone not found: \" + boneName);\r\n data.bones.push(bone);\r\n }\r\n var targetName = constraintMap.target;\r\n data.target = skeletonData.findSlot(targetName);\r\n if (data.target == null)\r\n throw new Error(\"Path target slot not found: \" + targetName);\r\n data.positionMode = SkeletonJson.positionModeFromString(this.getValue(constraintMap, \"positionMode\", \"percent\"));\r\n data.spacingMode = SkeletonJson.spacingModeFromString(this.getValue(constraintMap, \"spacingMode\", \"length\"));\r\n data.rotateMode = SkeletonJson.rotateModeFromString(this.getValue(constraintMap, \"rotateMode\", \"tangent\"));\r\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\r\n data.position = this.getValue(constraintMap, \"position\", 0);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n data.position *= scale;\r\n data.spacing = this.getValue(constraintMap, \"spacing\", 0);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n data.spacing *= scale;\r\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\r\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\r\n skeletonData.pathConstraints.push(data);\r\n }\r\n }\r\n if (root.skins) {\r\n for (var i = 0; i < root.skins.length; i++) {\r\n var skinMap = root.skins[i];\r\n var skin = new spine.Skin(skinMap.name);\r\n if (skinMap.bones) {\r\n for (var ii = 0; ii < skinMap.bones.length; ii++) {\r\n var bone = skeletonData.findBone(skinMap.bones[ii]);\r\n if (bone == null)\r\n throw new Error(\"Skin bone not found: \" + skinMap.bones[i]);\r\n skin.bones.push(bone);\r\n }\r\n }\r\n if (skinMap.ik) {\r\n for (var ii = 0; ii < skinMap.ik.length; ii++) {\r\n var constraint = skeletonData.findIkConstraint(skinMap.ik[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin IK constraint not found: \" + skinMap.ik[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n if (skinMap.transform) {\r\n for (var ii = 0; ii < skinMap.transform.length; ii++) {\r\n var constraint = skeletonData.findTransformConstraint(skinMap.transform[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin transform constraint not found: \" + skinMap.transform[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n if (skinMap.path) {\r\n for (var ii = 0; ii < skinMap.path.length; ii++) {\r\n var constraint = skeletonData.findPathConstraint(skinMap.path[ii]);\r\n if (constraint == null)\r\n throw new Error(\"Skin path constraint not found: \" + skinMap.path[i]);\r\n skin.constraints.push(constraint);\r\n }\r\n }\r\n for (var slotName in skinMap.attachments) {\r\n var slot = skeletonData.findSlot(slotName);\r\n if (slot == null)\r\n throw new Error(\"Slot not found: \" + slotName);\r\n var slotMap = skinMap.attachments[slotName];\r\n for (var entryName in slotMap) {\r\n var attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\r\n if (attachment != null)\r\n skin.setAttachment(slot.index, entryName, attachment);\r\n }\r\n }\r\n skeletonData.skins.push(skin);\r\n if (skin.name == \"default\")\r\n skeletonData.defaultSkin = skin;\r\n }\r\n }\r\n for (var i = 0, n = this.linkedMeshes.length; i < n; i++) {\r\n var linkedMesh = this.linkedMeshes[i];\r\n var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + linkedMesh.skin);\r\n var parent_6 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\r\n if (parent_6 == null)\r\n throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\r\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_6 : linkedMesh.mesh;\r\n linkedMesh.mesh.setParentMesh(parent_6);\r\n linkedMesh.mesh.updateUVs();\r\n }\r\n this.linkedMeshes.length = 0;\r\n if (root.events) {\r\n for (var eventName in root.events) {\r\n var eventMap = root.events[eventName];\r\n var data = new spine.EventData(eventName);\r\n data.intValue = this.getValue(eventMap, \"int\", 0);\r\n data.floatValue = this.getValue(eventMap, \"float\", 0);\r\n data.stringValue = this.getValue(eventMap, \"string\", \"\");\r\n data.audioPath = this.getValue(eventMap, \"audio\", null);\r\n if (data.audioPath != null) {\r\n data.volume = this.getValue(eventMap, \"volume\", 1);\r\n data.balance = this.getValue(eventMap, \"balance\", 0);\r\n }\r\n skeletonData.events.push(data);\r\n }\r\n }\r\n if (root.animations) {\r\n for (var animationName in root.animations) {\r\n var animationMap = root.animations[animationName];\r\n this.readAnimation(animationMap, animationName, skeletonData);\r\n }\r\n }\r\n return skeletonData;\r\n };\r\n SkeletonJson.prototype.readAttachment = function (map, skin, slotIndex, name, skeletonData) {\r\n var scale = this.scale;\r\n name = this.getValue(map, \"name\", name);\r\n var type = this.getValue(map, \"type\", \"region\");\r\n switch (type) {\r\n case \"region\": {\r\n var path = this.getValue(map, \"path\", name);\r\n var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\r\n if (region == null)\r\n return null;\r\n region.path = path;\r\n region.x = this.getValue(map, \"x\", 0) * scale;\r\n region.y = this.getValue(map, \"y\", 0) * scale;\r\n region.scaleX = this.getValue(map, \"scaleX\", 1);\r\n region.scaleY = this.getValue(map, \"scaleY\", 1);\r\n region.rotation = this.getValue(map, \"rotation\", 0);\r\n region.width = map.width * scale;\r\n region.height = map.height * scale;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n region.color.setFromString(color);\r\n region.updateOffset();\r\n return region;\r\n }\r\n case \"boundingbox\": {\r\n var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\r\n if (box == null)\r\n return null;\r\n this.readVertices(map, box, map.vertexCount << 1);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n box.color.setFromString(color);\r\n return box;\r\n }\r\n case \"mesh\":\r\n case \"linkedmesh\": {\r\n var path = this.getValue(map, \"path\", name);\r\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\r\n if (mesh == null)\r\n return null;\r\n mesh.path = path;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n mesh.color.setFromString(color);\r\n mesh.width = this.getValue(map, \"width\", 0) * scale;\r\n mesh.height = this.getValue(map, \"height\", 0) * scale;\r\n var parent_7 = this.getValue(map, \"parent\", null);\r\n if (parent_7 != null) {\r\n this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, \"skin\", null), slotIndex, parent_7, this.getValue(map, \"deform\", true)));\r\n return mesh;\r\n }\r\n var uvs = map.uvs;\r\n this.readVertices(map, mesh, uvs.length);\r\n mesh.triangles = map.triangles;\r\n mesh.regionUVs = uvs;\r\n mesh.updateUVs();\r\n mesh.edges = this.getValue(map, \"edges\", null);\r\n mesh.hullLength = this.getValue(map, \"hull\", 0) * 2;\r\n return mesh;\r\n }\r\n case \"path\": {\r\n var path = this.attachmentLoader.newPathAttachment(skin, name);\r\n if (path == null)\r\n return null;\r\n path.closed = this.getValue(map, \"closed\", false);\r\n path.constantSpeed = this.getValue(map, \"constantSpeed\", true);\r\n var vertexCount = map.vertexCount;\r\n this.readVertices(map, path, vertexCount << 1);\r\n var lengths = spine.Utils.newArray(vertexCount / 3, 0);\r\n for (var i = 0; i < map.lengths.length; i++)\r\n lengths[i] = map.lengths[i] * scale;\r\n path.lengths = lengths;\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n path.color.setFromString(color);\r\n return path;\r\n }\r\n case \"point\": {\r\n var point = this.attachmentLoader.newPointAttachment(skin, name);\r\n if (point == null)\r\n return null;\r\n point.x = this.getValue(map, \"x\", 0) * scale;\r\n point.y = this.getValue(map, \"y\", 0) * scale;\r\n point.rotation = this.getValue(map, \"rotation\", 0);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n point.color.setFromString(color);\r\n return point;\r\n }\r\n case \"clipping\": {\r\n var clip = this.attachmentLoader.newClippingAttachment(skin, name);\r\n if (clip == null)\r\n return null;\r\n var end = this.getValue(map, \"end\", null);\r\n if (end != null) {\r\n var slot = skeletonData.findSlot(end);\r\n if (slot == null)\r\n throw new Error(\"Clipping end slot not found: \" + end);\r\n clip.endSlot = slot;\r\n }\r\n var vertexCount = map.vertexCount;\r\n this.readVertices(map, clip, vertexCount << 1);\r\n var color = this.getValue(map, \"color\", null);\r\n if (color != null)\r\n clip.color.setFromString(color);\r\n return clip;\r\n }\r\n }\r\n return null;\r\n };\r\n SkeletonJson.prototype.readVertices = function (map, attachment, verticesLength) {\r\n var scale = this.scale;\r\n attachment.worldVerticesLength = verticesLength;\r\n var vertices = map.vertices;\r\n if (verticesLength == vertices.length) {\r\n var scaledVertices = spine.Utils.toFloatArray(vertices);\r\n if (scale != 1) {\r\n for (var i = 0, n = vertices.length; i < n; i++)\r\n scaledVertices[i] *= scale;\r\n }\r\n attachment.vertices = scaledVertices;\r\n return;\r\n }\r\n var weights = new Array();\r\n var bones = new Array();\r\n for (var i = 0, n = vertices.length; i < n;) {\r\n var boneCount = vertices[i++];\r\n bones.push(boneCount);\r\n for (var nn = i + boneCount * 4; i < nn; i += 4) {\r\n bones.push(vertices[i]);\r\n weights.push(vertices[i + 1] * scale);\r\n weights.push(vertices[i + 2] * scale);\r\n weights.push(vertices[i + 3]);\r\n }\r\n }\r\n attachment.bones = bones;\r\n attachment.vertices = spine.Utils.toFloatArray(weights);\r\n };\r\n SkeletonJson.prototype.readAnimation = function (map, name, skeletonData) {\r\n var scale = this.scale;\r\n var timelines = new Array();\r\n var duration = 0;\r\n if (map.slots) {\r\n for (var slotName in map.slots) {\r\n var slotMap = map.slots[slotName];\r\n var slotIndex = skeletonData.findSlotIndex(slotName);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + slotName);\r\n for (var timelineName in slotMap) {\r\n var timelineMap = slotMap[timelineName];\r\n if (timelineName == \"attachment\") {\r\n var timeline = new spine.AttachmentTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex++, this.getValue(valueMap, \"time\", 0), valueMap.name);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n else if (timelineName == \"color\") {\r\n var timeline = new spine.ColorTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var color = new spine.Color();\r\n color.setFromString(valueMap.color);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), color.r, color.g, color.b, color.a);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.ColorTimeline.ENTRIES]);\r\n }\r\n else if (timelineName == \"twoColor\") {\r\n var timeline = new spine.TwoColorTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var light = new spine.Color();\r\n var dark = new spine.Color();\r\n light.setFromString(valueMap.light);\r\n dark.setFromString(valueMap.dark);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), light.r, light.g, light.b, light.a, dark.r, dark.g, dark.b);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TwoColorTimeline.ENTRIES]);\r\n }\r\n else\r\n throw new Error(\"Invalid timeline type for a slot: \" + timelineName + \" (\" + slotName + \")\");\r\n }\r\n }\r\n }\r\n if (map.bones) {\r\n for (var boneName in map.bones) {\r\n var boneMap = map.bones[boneName];\r\n var boneIndex = skeletonData.findBoneIndex(boneName);\r\n if (boneIndex == -1)\r\n throw new Error(\"Bone not found: \" + boneName);\r\n for (var timelineName in boneMap) {\r\n var timelineMap = boneMap[timelineName];\r\n if (timelineName === \"rotate\") {\r\n var timeline = new spine.RotateTimeline(timelineMap.length);\r\n timeline.boneIndex = boneIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"angle\", 0));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.RotateTimeline.ENTRIES]);\r\n }\r\n else if (timelineName === \"translate\" || timelineName === \"scale\" || timelineName === \"shear\") {\r\n var timeline = null;\r\n var timelineScale = 1, defaultValue = 0;\r\n if (timelineName === \"scale\") {\r\n timeline = new spine.ScaleTimeline(timelineMap.length);\r\n defaultValue = 1;\r\n }\r\n else if (timelineName === \"shear\")\r\n timeline = new spine.ShearTimeline(timelineMap.length);\r\n else {\r\n timeline = new spine.TranslateTimeline(timelineMap.length);\r\n timelineScale = scale;\r\n }\r\n timeline.boneIndex = boneIndex;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n var x = this.getValue(valueMap, \"x\", defaultValue), y = this.getValue(valueMap, \"y\", defaultValue);\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), x * timelineScale, y * timelineScale);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TranslateTimeline.ENTRIES]);\r\n }\r\n else\r\n throw new Error(\"Invalid timeline type for a bone: \" + timelineName + \" (\" + boneName + \")\");\r\n }\r\n }\r\n }\r\n if (map.ik) {\r\n for (var constraintName in map.ik) {\r\n var constraintMap = map.ik[constraintName];\r\n var constraint = skeletonData.findIkConstraint(constraintName);\r\n var timeline = new spine.IkConstraintTimeline(constraintMap.length);\r\n timeline.ikConstraintIndex = skeletonData.ikConstraints.indexOf(constraint);\r\n var frameIndex = 0;\r\n for (var i = 0; i < constraintMap.length; i++) {\r\n var valueMap = constraintMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"mix\", 1), this.getValue(valueMap, \"softness\", 0) * scale, this.getValue(valueMap, \"bendPositive\", true) ? 1 : -1, this.getValue(valueMap, \"compress\", false), this.getValue(valueMap, \"stretch\", false));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.IkConstraintTimeline.ENTRIES]);\r\n }\r\n }\r\n if (map.transform) {\r\n for (var constraintName in map.transform) {\r\n var constraintMap = map.transform[constraintName];\r\n var constraint = skeletonData.findTransformConstraint(constraintName);\r\n var timeline = new spine.TransformConstraintTimeline(constraintMap.length);\r\n timeline.transformConstraintIndex = skeletonData.transformConstraints.indexOf(constraint);\r\n var frameIndex = 0;\r\n for (var i = 0; i < constraintMap.length; i++) {\r\n var valueMap = constraintMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1), this.getValue(valueMap, \"scaleMix\", 1), this.getValue(valueMap, \"shearMix\", 1));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TransformConstraintTimeline.ENTRIES]);\r\n }\r\n }\r\n if (map.path) {\r\n for (var constraintName in map.path) {\r\n var constraintMap = map.path[constraintName];\r\n var index = skeletonData.findPathConstraintIndex(constraintName);\r\n if (index == -1)\r\n throw new Error(\"Path constraint not found: \" + constraintName);\r\n var data = skeletonData.pathConstraints[index];\r\n for (var timelineName in constraintMap) {\r\n var timelineMap = constraintMap[timelineName];\r\n if (timelineName === \"position\" || timelineName === \"spacing\") {\r\n var timeline = null;\r\n var timelineScale = 1;\r\n if (timelineName === \"spacing\") {\r\n timeline = new spine.PathConstraintSpacingTimeline(timelineMap.length);\r\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n else {\r\n timeline = new spine.PathConstraintPositionTimeline(timelineMap.length);\r\n if (data.positionMode == spine.PositionMode.Fixed)\r\n timelineScale = scale;\r\n }\r\n timeline.pathConstraintIndex = index;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, timelineName, 0) * timelineScale);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\r\n }\r\n else if (timelineName === \"mix\") {\r\n var timeline = new spine.PathConstraintMixTimeline(timelineMap.length);\r\n timeline.pathConstraintIndex = index;\r\n var frameIndex = 0;\r\n for (var i = 0; i < timelineMap.length; i++) {\r\n var valueMap = timelineMap[i];\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1));\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\r\n }\r\n }\r\n }\r\n }\r\n if (map.deform) {\r\n for (var deformName in map.deform) {\r\n var deformMap = map.deform[deformName];\r\n var skin = skeletonData.findSkin(deformName);\r\n if (skin == null)\r\n throw new Error(\"Skin not found: \" + deformName);\r\n for (var slotName in deformMap) {\r\n var slotMap = deformMap[slotName];\r\n var slotIndex = skeletonData.findSlotIndex(slotName);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + slotMap.name);\r\n for (var timelineName in slotMap) {\r\n var timelineMap = slotMap[timelineName];\r\n var attachment = skin.getAttachment(slotIndex, timelineName);\r\n if (attachment == null)\r\n throw new Error(\"Deform attachment not found: \" + timelineMap.name);\r\n var weighted = attachment.bones != null;\r\n var vertices = attachment.vertices;\r\n var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\r\n var timeline = new spine.DeformTimeline(timelineMap.length);\r\n timeline.slotIndex = slotIndex;\r\n timeline.attachment = attachment;\r\n var frameIndex = 0;\r\n for (var j = 0; j < timelineMap.length; j++) {\r\n var valueMap = timelineMap[j];\r\n var deform = void 0;\r\n var verticesValue = this.getValue(valueMap, \"vertices\", null);\r\n if (verticesValue == null)\r\n deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\r\n else {\r\n deform = spine.Utils.newFloatArray(deformLength);\r\n var start = this.getValue(valueMap, \"offset\", 0);\r\n spine.Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\r\n if (scale != 1) {\r\n for (var i = start, n = i + verticesValue.length; i < n; i++)\r\n deform[i] *= scale;\r\n }\r\n if (!weighted) {\r\n for (var i = 0; i < deformLength; i++)\r\n deform[i] += vertices[i];\r\n }\r\n }\r\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), deform);\r\n this.readCurve(valueMap, timeline, frameIndex);\r\n frameIndex++;\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n }\r\n }\r\n }\r\n var drawOrderNode = map.drawOrder;\r\n if (drawOrderNode == null)\r\n drawOrderNode = map.draworder;\r\n if (drawOrderNode != null) {\r\n var timeline = new spine.DrawOrderTimeline(drawOrderNode.length);\r\n var slotCount = skeletonData.slots.length;\r\n var frameIndex = 0;\r\n for (var j = 0; j < drawOrderNode.length; j++) {\r\n var drawOrderMap = drawOrderNode[j];\r\n var drawOrder = null;\r\n var offsets = this.getValue(drawOrderMap, \"offsets\", null);\r\n if (offsets != null) {\r\n drawOrder = spine.Utils.newArray(slotCount, -1);\r\n var unchanged = spine.Utils.newArray(slotCount - offsets.length, 0);\r\n var originalIndex = 0, unchangedIndex = 0;\r\n for (var i = 0; i < offsets.length; i++) {\r\n var offsetMap = offsets[i];\r\n var slotIndex = skeletonData.findSlotIndex(offsetMap.slot);\r\n if (slotIndex == -1)\r\n throw new Error(\"Slot not found: \" + offsetMap.slot);\r\n while (originalIndex != slotIndex)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n drawOrder[originalIndex + offsetMap.offset] = originalIndex++;\r\n }\r\n while (originalIndex < slotCount)\r\n unchanged[unchangedIndex++] = originalIndex++;\r\n for (var i = slotCount - 1; i >= 0; i--)\r\n if (drawOrder[i] == -1)\r\n drawOrder[i] = unchanged[--unchangedIndex];\r\n }\r\n timeline.setFrame(frameIndex++, this.getValue(drawOrderMap, \"time\", 0), drawOrder);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n if (map.events) {\r\n var timeline = new spine.EventTimeline(map.events.length);\r\n var frameIndex = 0;\r\n for (var i = 0; i < map.events.length; i++) {\r\n var eventMap = map.events[i];\r\n var eventData = skeletonData.findEvent(eventMap.name);\r\n if (eventData == null)\r\n throw new Error(\"Event not found: \" + eventMap.name);\r\n var event_6 = new spine.Event(spine.Utils.toSinglePrecision(this.getValue(eventMap, \"time\", 0)), eventData);\r\n event_6.intValue = this.getValue(eventMap, \"int\", eventData.intValue);\r\n event_6.floatValue = this.getValue(eventMap, \"float\", eventData.floatValue);\r\n event_6.stringValue = this.getValue(eventMap, \"string\", eventData.stringValue);\r\n if (event_6.data.audioPath != null) {\r\n event_6.volume = this.getValue(eventMap, \"volume\", 1);\r\n event_6.balance = this.getValue(eventMap, \"balance\", 0);\r\n }\r\n timeline.setFrame(frameIndex++, event_6);\r\n }\r\n timelines.push(timeline);\r\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\r\n }\r\n if (isNaN(duration)) {\r\n throw new Error(\"Error while parsing animation, duration is NaN\");\r\n }\r\n skeletonData.animations.push(new spine.Animation(name, timelines, duration));\r\n };\r\n SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) {\r\n if (!map.hasOwnProperty(\"curve\"))\r\n return;\r\n if (map.curve == \"stepped\")\r\n timeline.setStepped(frameIndex);\r\n else {\r\n var curve = map.curve;\r\n timeline.setCurve(frameIndex, curve, this.getValue(map, \"c2\", 0), this.getValue(map, \"c3\", 1), this.getValue(map, \"c4\", 1));\r\n }\r\n };\r\n SkeletonJson.prototype.getValue = function (map, prop, defaultValue) {\r\n return map[prop] !== undefined ? map[prop] : defaultValue;\r\n };\r\n SkeletonJson.blendModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"normal\")\r\n return spine.BlendMode.Normal;\r\n if (str == \"additive\")\r\n return spine.BlendMode.Additive;\r\n if (str == \"multiply\")\r\n return spine.BlendMode.Multiply;\r\n if (str == \"screen\")\r\n return spine.BlendMode.Screen;\r\n throw new Error(\"Unknown blend mode: \" + str);\r\n };\r\n SkeletonJson.positionModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"fixed\")\r\n return spine.PositionMode.Fixed;\r\n if (str == \"percent\")\r\n return spine.PositionMode.Percent;\r\n throw new Error(\"Unknown position mode: \" + str);\r\n };\r\n SkeletonJson.spacingModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"length\")\r\n return spine.SpacingMode.Length;\r\n if (str == \"fixed\")\r\n return spine.SpacingMode.Fixed;\r\n if (str == \"percent\")\r\n return spine.SpacingMode.Percent;\r\n throw new Error(\"Unknown position mode: \" + str);\r\n };\r\n SkeletonJson.rotateModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"tangent\")\r\n return spine.RotateMode.Tangent;\r\n if (str == \"chain\")\r\n return spine.RotateMode.Chain;\r\n if (str == \"chainscale\")\r\n return spine.RotateMode.ChainScale;\r\n throw new Error(\"Unknown rotate mode: \" + str);\r\n };\r\n SkeletonJson.transformModeFromString = function (str) {\r\n str = str.toLowerCase();\r\n if (str == \"normal\")\r\n return spine.TransformMode.Normal;\r\n if (str == \"onlytranslation\")\r\n return spine.TransformMode.OnlyTranslation;\r\n if (str == \"norotationorreflection\")\r\n return spine.TransformMode.NoRotationOrReflection;\r\n if (str == \"noscale\")\r\n return spine.TransformMode.NoScale;\r\n if (str == \"noscaleorreflection\")\r\n return spine.TransformMode.NoScaleOrReflection;\r\n throw new Error(\"Unknown transform mode: \" + str);\r\n };\r\n return SkeletonJson;\r\n }());\r\n spine.SkeletonJson = SkeletonJson;\r\n var LinkedMesh = (function () {\r\n function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\r\n this.mesh = mesh;\r\n this.skin = skin;\r\n this.slotIndex = slotIndex;\r\n this.parent = parent;\r\n this.inheritDeform = inheritDeform;\r\n }\r\n return LinkedMesh;\r\n }());\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SkinEntry = (function () {\r\n function SkinEntry(slotIndex, name, attachment) {\r\n this.slotIndex = slotIndex;\r\n this.name = name;\r\n this.attachment = attachment;\r\n }\r\n return SkinEntry;\r\n }());\r\n spine.SkinEntry = SkinEntry;\r\n var Skin = (function () {\r\n function Skin(name) {\r\n this.attachments = new Array();\r\n this.bones = Array();\r\n this.constraints = new Array();\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n Skin.prototype.setAttachment = function (slotIndex, name, attachment) {\r\n if (attachment == null)\r\n throw new Error(\"attachment cannot be null.\");\r\n var attachments = this.attachments;\r\n if (slotIndex >= attachments.length)\r\n attachments.length = slotIndex + 1;\r\n if (!attachments[slotIndex])\r\n attachments[slotIndex] = {};\r\n attachments[slotIndex][name] = attachment;\r\n };\r\n Skin.prototype.addSkin = function (skin) {\r\n for (var i = 0; i < skin.bones.length; i++) {\r\n var bone = skin.bones[i];\r\n var contained = false;\r\n for (var j = 0; j < this.bones.length; j++) {\r\n if (this.bones[j] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.bones.push(bone);\r\n }\r\n for (var i = 0; i < skin.constraints.length; i++) {\r\n var constraint = skin.constraints[i];\r\n var contained = false;\r\n for (var j = 0; j < this.constraints.length; j++) {\r\n if (this.constraints[j] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.constraints.push(constraint);\r\n }\r\n var attachments = skin.getAttachments();\r\n for (var i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n };\r\n Skin.prototype.copySkin = function (skin) {\r\n for (var i = 0; i < skin.bones.length; i++) {\r\n var bone = skin.bones[i];\r\n var contained = false;\r\n for (var j = 0; j < this.bones.length; j++) {\r\n if (this.bones[j] == bone) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.bones.push(bone);\r\n }\r\n for (var i = 0; i < skin.constraints.length; i++) {\r\n var constraint = skin.constraints[i];\r\n var contained = false;\r\n for (var j = 0; j < this.constraints.length; j++) {\r\n if (this.constraints[j] == constraint) {\r\n contained = true;\r\n break;\r\n }\r\n }\r\n if (!contained)\r\n this.constraints.push(constraint);\r\n }\r\n var attachments = skin.getAttachments();\r\n for (var i = 0; i < attachments.length; i++) {\r\n var attachment = attachments[i];\r\n if (attachment.attachment == null)\r\n continue;\r\n if (attachment.attachment instanceof spine.MeshAttachment) {\r\n attachment.attachment = attachment.attachment.newLinkedMesh();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n else {\r\n attachment.attachment = attachment.attachment.copy();\r\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\r\n }\r\n }\r\n };\r\n Skin.prototype.getAttachment = function (slotIndex, name) {\r\n var dictionary = this.attachments[slotIndex];\r\n return dictionary ? dictionary[name] : null;\r\n };\r\n Skin.prototype.removeAttachment = function (slotIndex, name) {\r\n var dictionary = this.attachments[slotIndex];\r\n if (dictionary)\r\n dictionary[name] = null;\r\n };\r\n Skin.prototype.getAttachments = function () {\r\n var entries = new Array();\r\n for (var i = 0; i < this.attachments.length; i++) {\r\n var slotAttachments = this.attachments[i];\r\n if (slotAttachments) {\r\n for (var name_4 in slotAttachments) {\r\n var attachment = slotAttachments[name_4];\r\n if (attachment)\r\n entries.push(new SkinEntry(i, name_4, attachment));\r\n }\r\n }\r\n }\r\n return entries;\r\n };\r\n Skin.prototype.getAttachmentsForSlot = function (slotIndex, attachments) {\r\n var slotAttachments = this.attachments[slotIndex];\r\n if (slotAttachments) {\r\n for (var name_5 in slotAttachments) {\r\n var attachment = slotAttachments[name_5];\r\n if (attachment)\r\n attachments.push(new SkinEntry(slotIndex, name_5, attachment));\r\n }\r\n }\r\n };\r\n Skin.prototype.clear = function () {\r\n this.attachments.length = 0;\r\n this.bones.length = 0;\r\n this.constraints.length = 0;\r\n };\r\n Skin.prototype.attachAll = function (skeleton, oldSkin) {\r\n var slotIndex = 0;\r\n for (var i = 0; i < skeleton.slots.length; i++) {\r\n var slot = skeleton.slots[i];\r\n var slotAttachment = slot.getAttachment();\r\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\r\n var dictionary = oldSkin.attachments[slotIndex];\r\n for (var key in dictionary) {\r\n var skinAttachment = dictionary[key];\r\n if (slotAttachment == skinAttachment) {\r\n var attachment = this.getAttachment(slotIndex, key);\r\n if (attachment != null)\r\n slot.setAttachment(attachment);\r\n break;\r\n }\r\n }\r\n }\r\n slotIndex++;\r\n }\r\n };\r\n return Skin;\r\n }());\r\n spine.Skin = Skin;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Slot = (function () {\r\n function Slot(data, bone) {\r\n this.deform = new Array();\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (bone == null)\r\n throw new Error(\"bone cannot be null.\");\r\n this.data = data;\r\n this.bone = bone;\r\n this.color = new spine.Color();\r\n this.darkColor = data.darkColor == null ? null : new spine.Color();\r\n this.setToSetupPose();\r\n }\r\n Slot.prototype.getSkeleton = function () {\r\n return this.bone.skeleton;\r\n };\r\n Slot.prototype.getAttachment = function () {\r\n return this.attachment;\r\n };\r\n Slot.prototype.setAttachment = function (attachment) {\r\n if (this.attachment == attachment)\r\n return;\r\n this.attachment = attachment;\r\n this.attachmentTime = this.bone.skeleton.time;\r\n this.deform.length = 0;\r\n };\r\n Slot.prototype.setAttachmentTime = function (time) {\r\n this.attachmentTime = this.bone.skeleton.time - time;\r\n };\r\n Slot.prototype.getAttachmentTime = function () {\r\n return this.bone.skeleton.time - this.attachmentTime;\r\n };\r\n Slot.prototype.setToSetupPose = function () {\r\n this.color.setFromColor(this.data.color);\r\n if (this.darkColor != null)\r\n this.darkColor.setFromColor(this.data.darkColor);\r\n if (this.data.attachmentName == null)\r\n this.attachment = null;\r\n else {\r\n this.attachment = null;\r\n this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName));\r\n }\r\n };\r\n return Slot;\r\n }());\r\n spine.Slot = Slot;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SlotData = (function () {\r\n function SlotData(index, name, boneData) {\r\n this.color = new spine.Color(1, 1, 1, 1);\r\n if (index < 0)\r\n throw new Error(\"index must be >= 0.\");\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n if (boneData == null)\r\n throw new Error(\"boneData cannot be null.\");\r\n this.index = index;\r\n this.name = name;\r\n this.boneData = boneData;\r\n }\r\n return SlotData;\r\n }());\r\n spine.SlotData = SlotData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Texture = (function () {\r\n function Texture(image) {\r\n this._image = image;\r\n }\r\n Texture.prototype.getImage = function () {\r\n return this._image;\r\n };\r\n Texture.filterFromString = function (text) {\r\n switch (text.toLowerCase()) {\r\n case \"nearest\": return TextureFilter.Nearest;\r\n case \"linear\": return TextureFilter.Linear;\r\n case \"mipmap\": return TextureFilter.MipMap;\r\n case \"mipmapnearestnearest\": return TextureFilter.MipMapNearestNearest;\r\n case \"mipmaplinearnearest\": return TextureFilter.MipMapLinearNearest;\r\n case \"mipmapnearestlinear\": return TextureFilter.MipMapNearestLinear;\r\n case \"mipmaplinearlinear\": return TextureFilter.MipMapLinearLinear;\r\n default: throw new Error(\"Unknown texture filter \" + text);\r\n }\r\n };\r\n Texture.wrapFromString = function (text) {\r\n switch (text.toLowerCase()) {\r\n case \"mirroredtepeat\": return TextureWrap.MirroredRepeat;\r\n case \"clamptoedge\": return TextureWrap.ClampToEdge;\r\n case \"repeat\": return TextureWrap.Repeat;\r\n default: throw new Error(\"Unknown texture wrap \" + text);\r\n }\r\n };\r\n return Texture;\r\n }());\r\n spine.Texture = Texture;\r\n var TextureFilter;\r\n (function (TextureFilter) {\r\n TextureFilter[TextureFilter[\"Nearest\"] = 9728] = \"Nearest\";\r\n TextureFilter[TextureFilter[\"Linear\"] = 9729] = \"Linear\";\r\n TextureFilter[TextureFilter[\"MipMap\"] = 9987] = \"MipMap\";\r\n TextureFilter[TextureFilter[\"MipMapNearestNearest\"] = 9984] = \"MipMapNearestNearest\";\r\n TextureFilter[TextureFilter[\"MipMapLinearNearest\"] = 9985] = \"MipMapLinearNearest\";\r\n TextureFilter[TextureFilter[\"MipMapNearestLinear\"] = 9986] = \"MipMapNearestLinear\";\r\n TextureFilter[TextureFilter[\"MipMapLinearLinear\"] = 9987] = \"MipMapLinearLinear\";\r\n })(TextureFilter = spine.TextureFilter || (spine.TextureFilter = {}));\r\n var TextureWrap;\r\n (function (TextureWrap) {\r\n TextureWrap[TextureWrap[\"MirroredRepeat\"] = 33648] = \"MirroredRepeat\";\r\n TextureWrap[TextureWrap[\"ClampToEdge\"] = 33071] = \"ClampToEdge\";\r\n TextureWrap[TextureWrap[\"Repeat\"] = 10497] = \"Repeat\";\r\n })(TextureWrap = spine.TextureWrap || (spine.TextureWrap = {}));\r\n var TextureRegion = (function () {\r\n function TextureRegion() {\r\n this.u = 0;\r\n this.v = 0;\r\n this.u2 = 0;\r\n this.v2 = 0;\r\n this.width = 0;\r\n this.height = 0;\r\n this.rotate = false;\r\n this.offsetX = 0;\r\n this.offsetY = 0;\r\n this.originalWidth = 0;\r\n this.originalHeight = 0;\r\n }\r\n return TextureRegion;\r\n }());\r\n spine.TextureRegion = TextureRegion;\r\n var FakeTexture = (function (_super) {\r\n __extends(FakeTexture, _super);\r\n function FakeTexture() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n FakeTexture.prototype.setFilters = function (minFilter, magFilter) { };\r\n FakeTexture.prototype.setWraps = function (uWrap, vWrap) { };\r\n FakeTexture.prototype.dispose = function () { };\r\n return FakeTexture;\r\n }(Texture));\r\n spine.FakeTexture = FakeTexture;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TextureAtlas = (function () {\r\n function TextureAtlas(atlasText, textureLoader) {\r\n this.pages = new Array();\r\n this.regions = new Array();\r\n this.load(atlasText, textureLoader);\r\n }\r\n TextureAtlas.prototype.load = function (atlasText, textureLoader) {\r\n if (textureLoader == null)\r\n throw new Error(\"textureLoader cannot be null.\");\r\n var reader = new TextureAtlasReader(atlasText);\r\n var tuple = new Array(4);\r\n var page = null;\r\n while (true) {\r\n var line = reader.readLine();\r\n if (line == null)\r\n break;\r\n line = line.trim();\r\n if (line.length == 0)\r\n page = null;\r\n else if (!page) {\r\n page = new TextureAtlasPage();\r\n page.name = line;\r\n if (reader.readTuple(tuple) == 2) {\r\n page.width = parseInt(tuple[0]);\r\n page.height = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n }\r\n reader.readTuple(tuple);\r\n page.minFilter = spine.Texture.filterFromString(tuple[0]);\r\n page.magFilter = spine.Texture.filterFromString(tuple[1]);\r\n var direction = reader.readValue();\r\n page.uWrap = spine.TextureWrap.ClampToEdge;\r\n page.vWrap = spine.TextureWrap.ClampToEdge;\r\n if (direction == \"x\")\r\n page.uWrap = spine.TextureWrap.Repeat;\r\n else if (direction == \"y\")\r\n page.vWrap = spine.TextureWrap.Repeat;\r\n else if (direction == \"xy\")\r\n page.uWrap = page.vWrap = spine.TextureWrap.Repeat;\r\n page.texture = textureLoader(line);\r\n page.texture.setFilters(page.minFilter, page.magFilter);\r\n page.texture.setWraps(page.uWrap, page.vWrap);\r\n page.width = page.texture.getImage().width;\r\n page.height = page.texture.getImage().height;\r\n this.pages.push(page);\r\n }\r\n else {\r\n var region = new TextureAtlasRegion();\r\n region.name = line;\r\n region.page = page;\r\n var rotateValue = reader.readValue();\r\n if (rotateValue.toLocaleLowerCase() == \"true\") {\r\n region.degrees = 90;\r\n }\r\n else if (rotateValue.toLocaleLowerCase() == \"false\") {\r\n region.degrees = 0;\r\n }\r\n else {\r\n region.degrees = parseFloat(rotateValue);\r\n }\r\n region.rotate = region.degrees == 90;\r\n reader.readTuple(tuple);\r\n var x = parseInt(tuple[0]);\r\n var y = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n var width = parseInt(tuple[0]);\r\n var height = parseInt(tuple[1]);\r\n region.u = x / page.width;\r\n region.v = y / page.height;\r\n if (region.rotate) {\r\n region.u2 = (x + height) / page.width;\r\n region.v2 = (y + width) / page.height;\r\n }\r\n else {\r\n region.u2 = (x + width) / page.width;\r\n region.v2 = (y + height) / page.height;\r\n }\r\n region.x = x;\r\n region.y = y;\r\n region.width = Math.abs(width);\r\n region.height = Math.abs(height);\r\n if (reader.readTuple(tuple) == 4) {\r\n if (reader.readTuple(tuple) == 4) {\r\n reader.readTuple(tuple);\r\n }\r\n }\r\n region.originalWidth = parseInt(tuple[0]);\r\n region.originalHeight = parseInt(tuple[1]);\r\n reader.readTuple(tuple);\r\n region.offsetX = parseInt(tuple[0]);\r\n region.offsetY = parseInt(tuple[1]);\r\n region.index = parseInt(reader.readValue());\r\n region.texture = page.texture;\r\n this.regions.push(region);\r\n }\r\n }\r\n };\r\n TextureAtlas.prototype.findRegion = function (name) {\r\n for (var i = 0; i < this.regions.length; i++) {\r\n if (this.regions[i].name == name) {\r\n return this.regions[i];\r\n }\r\n }\r\n return null;\r\n };\r\n TextureAtlas.prototype.dispose = function () {\r\n for (var i = 0; i < this.pages.length; i++) {\r\n this.pages[i].texture.dispose();\r\n }\r\n };\r\n return TextureAtlas;\r\n }());\r\n spine.TextureAtlas = TextureAtlas;\r\n var TextureAtlasReader = (function () {\r\n function TextureAtlasReader(text) {\r\n this.index = 0;\r\n this.lines = text.split(/\\r\\n|\\r|\\n/);\r\n }\r\n TextureAtlasReader.prototype.readLine = function () {\r\n if (this.index >= this.lines.length)\r\n return null;\r\n return this.lines[this.index++];\r\n };\r\n TextureAtlasReader.prototype.readValue = function () {\r\n var line = this.readLine();\r\n var colon = line.indexOf(\":\");\r\n if (colon == -1)\r\n throw new Error(\"Invalid line: \" + line);\r\n return line.substring(colon + 1).trim();\r\n };\r\n TextureAtlasReader.prototype.readTuple = function (tuple) {\r\n var line = this.readLine();\r\n var colon = line.indexOf(\":\");\r\n if (colon == -1)\r\n throw new Error(\"Invalid line: \" + line);\r\n var i = 0, lastMatch = colon + 1;\r\n for (; i < 3; i++) {\r\n var comma = line.indexOf(\",\", lastMatch);\r\n if (comma == -1)\r\n break;\r\n tuple[i] = line.substr(lastMatch, comma - lastMatch).trim();\r\n lastMatch = comma + 1;\r\n }\r\n tuple[i] = line.substring(lastMatch).trim();\r\n return i + 1;\r\n };\r\n return TextureAtlasReader;\r\n }());\r\n var TextureAtlasPage = (function () {\r\n function TextureAtlasPage() {\r\n }\r\n return TextureAtlasPage;\r\n }());\r\n spine.TextureAtlasPage = TextureAtlasPage;\r\n var TextureAtlasRegion = (function (_super) {\r\n __extends(TextureAtlasRegion, _super);\r\n function TextureAtlasRegion() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return TextureAtlasRegion;\r\n }(spine.TextureRegion));\r\n spine.TextureAtlasRegion = TextureAtlasRegion;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TransformConstraint = (function () {\r\n function TransformConstraint(data, skeleton) {\r\n this.rotateMix = 0;\r\n this.translateMix = 0;\r\n this.scaleMix = 0;\r\n this.shearMix = 0;\r\n this.temp = new spine.Vector2();\r\n this.active = false;\r\n if (data == null)\r\n throw new Error(\"data cannot be null.\");\r\n if (skeleton == null)\r\n throw new Error(\"skeleton cannot be null.\");\r\n this.data = data;\r\n this.rotateMix = data.rotateMix;\r\n this.translateMix = data.translateMix;\r\n this.scaleMix = data.scaleMix;\r\n this.shearMix = data.shearMix;\r\n this.bones = new Array();\r\n for (var i = 0; i < data.bones.length; i++)\r\n this.bones.push(skeleton.findBone(data.bones[i].name));\r\n this.target = skeleton.findBone(data.target.name);\r\n }\r\n TransformConstraint.prototype.isActive = function () {\r\n return this.active;\r\n };\r\n TransformConstraint.prototype.apply = function () {\r\n this.update();\r\n };\r\n TransformConstraint.prototype.update = function () {\r\n if (this.data.local) {\r\n if (this.data.relative)\r\n this.applyRelativeLocal();\r\n else\r\n this.applyAbsoluteLocal();\r\n }\r\n else {\r\n if (this.data.relative)\r\n this.applyRelativeWorld();\r\n else\r\n this.applyAbsoluteWorld();\r\n }\r\n };\r\n TransformConstraint.prototype.applyAbsoluteWorld = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n var ta = target.a, tb = target.b, tc = target.c, td = target.d;\r\n var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n var offsetRotation = this.data.offsetRotation * degRadReflect;\r\n var offsetShearY = this.data.offsetShearY * degRadReflect;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n var modified = false;\r\n if (rotateMix != 0) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n var cos = Math.cos(r), sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n modified = true;\r\n }\r\n if (translateMix != 0) {\r\n var temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n bone.worldX += (temp.x - bone.worldX) * translateMix;\r\n bone.worldY += (temp.y - bone.worldY) * translateMix;\r\n modified = true;\r\n }\r\n if (scaleMix > 0) {\r\n var s = Math.sqrt(bone.a * bone.a + bone.c * bone.c);\r\n var ts = Math.sqrt(ta * ta + tc * tc);\r\n if (s > 0.00001)\r\n s = (s + (ts - s + this.data.offsetScaleX) * scaleMix) / s;\r\n bone.a *= s;\r\n bone.c *= s;\r\n s = Math.sqrt(bone.b * bone.b + bone.d * bone.d);\r\n ts = Math.sqrt(tb * tb + td * td);\r\n if (s > 0.00001)\r\n s = (s + (ts - s + this.data.offsetScaleY) * scaleMix) / s;\r\n bone.b *= s;\r\n bone.d *= s;\r\n modified = true;\r\n }\r\n if (shearMix > 0) {\r\n var b = bone.b, d = bone.d;\r\n var by = Math.atan2(d, b);\r\n var r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a));\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r = by + (r + offsetShearY) * shearMix;\r\n var s = Math.sqrt(b * b + d * d);\r\n bone.b = Math.cos(r) * s;\r\n bone.d = Math.sin(r) * s;\r\n modified = true;\r\n }\r\n if (modified)\r\n bone.appliedValid = false;\r\n }\r\n };\r\n TransformConstraint.prototype.applyRelativeWorld = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n var ta = target.a, tb = target.b, tc = target.c, td = target.d;\r\n var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\r\n var offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect;\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n var modified = false;\r\n if (rotateMix != 0) {\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var r = Math.atan2(tc, ta) + offsetRotation;\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n r *= rotateMix;\r\n var cos = Math.cos(r), sin = Math.sin(r);\r\n bone.a = cos * a - sin * c;\r\n bone.b = cos * b - sin * d;\r\n bone.c = sin * a + cos * c;\r\n bone.d = sin * b + cos * d;\r\n modified = true;\r\n }\r\n if (translateMix != 0) {\r\n var temp = this.temp;\r\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\r\n bone.worldX += temp.x * translateMix;\r\n bone.worldY += temp.y * translateMix;\r\n modified = true;\r\n }\r\n if (scaleMix > 0) {\r\n var s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * scaleMix + 1;\r\n bone.a *= s;\r\n bone.c *= s;\r\n s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * scaleMix + 1;\r\n bone.b *= s;\r\n bone.d *= s;\r\n modified = true;\r\n }\r\n if (shearMix > 0) {\r\n var r = Math.atan2(td, tb) - Math.atan2(tc, ta);\r\n if (r > spine.MathUtils.PI)\r\n r -= spine.MathUtils.PI2;\r\n else if (r < -spine.MathUtils.PI)\r\n r += spine.MathUtils.PI2;\r\n var b = bone.b, d = bone.d;\r\n r = Math.atan2(d, b) + (r - spine.MathUtils.PI / 2 + offsetShearY) * shearMix;\r\n var s = Math.sqrt(b * b + d * d);\r\n bone.b = Math.cos(r) * s;\r\n bone.d = Math.sin(r) * s;\r\n modified = true;\r\n }\r\n if (modified)\r\n bone.appliedValid = false;\r\n }\r\n };\r\n TransformConstraint.prototype.applyAbsoluteLocal = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n if (!target.appliedValid)\r\n target.updateAppliedTransform();\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var rotation = bone.arotation;\r\n if (rotateMix != 0) {\r\n var r = target.arotation - rotation + this.data.offsetRotation;\r\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n rotation += r * rotateMix;\r\n }\r\n var x = bone.ax, y = bone.ay;\r\n if (translateMix != 0) {\r\n x += (target.ax - x + this.data.offsetX) * translateMix;\r\n y += (target.ay - y + this.data.offsetY) * translateMix;\r\n }\r\n var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n if (scaleMix != 0) {\r\n if (scaleX > 0.00001)\r\n scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * scaleMix) / scaleX;\r\n if (scaleY > 0.00001)\r\n scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * scaleMix) / scaleY;\r\n }\r\n var shearY = bone.ashearY;\r\n if (shearMix != 0) {\r\n var r = target.ashearY - shearY + this.data.offsetShearY;\r\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\r\n bone.shearY += r * shearMix;\r\n }\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n };\r\n TransformConstraint.prototype.applyRelativeLocal = function () {\r\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\r\n var target = this.target;\r\n if (!target.appliedValid)\r\n target.updateAppliedTransform();\r\n var bones = this.bones;\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (!bone.appliedValid)\r\n bone.updateAppliedTransform();\r\n var rotation = bone.arotation;\r\n if (rotateMix != 0)\r\n rotation += (target.arotation + this.data.offsetRotation) * rotateMix;\r\n var x = bone.ax, y = bone.ay;\r\n if (translateMix != 0) {\r\n x += (target.ax + this.data.offsetX) * translateMix;\r\n y += (target.ay + this.data.offsetY) * translateMix;\r\n }\r\n var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\r\n if (scaleMix != 0) {\r\n if (scaleX > 0.00001)\r\n scaleX *= ((target.ascaleX - 1 + this.data.offsetScaleX) * scaleMix) + 1;\r\n if (scaleY > 0.00001)\r\n scaleY *= ((target.ascaleY - 1 + this.data.offsetScaleY) * scaleMix) + 1;\r\n }\r\n var shearY = bone.ashearY;\r\n if (shearMix != 0)\r\n shearY += (target.ashearY + this.data.offsetShearY) * shearMix;\r\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\r\n }\r\n };\r\n return TransformConstraint;\r\n }());\r\n spine.TransformConstraint = TransformConstraint;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var TransformConstraintData = (function (_super) {\r\n __extends(TransformConstraintData, _super);\r\n function TransformConstraintData(name) {\r\n var _this = _super.call(this, name, 0, false) || this;\r\n _this.bones = new Array();\r\n _this.rotateMix = 0;\r\n _this.translateMix = 0;\r\n _this.scaleMix = 0;\r\n _this.shearMix = 0;\r\n _this.offsetRotation = 0;\r\n _this.offsetX = 0;\r\n _this.offsetY = 0;\r\n _this.offsetScaleX = 0;\r\n _this.offsetScaleY = 0;\r\n _this.offsetShearY = 0;\r\n _this.relative = false;\r\n _this.local = false;\r\n return _this;\r\n }\r\n return TransformConstraintData;\r\n }(spine.ConstraintData));\r\n spine.TransformConstraintData = TransformConstraintData;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var Triangulator = (function () {\r\n function Triangulator() {\r\n this.convexPolygons = new Array();\r\n this.convexPolygonsIndices = new Array();\r\n this.indicesArray = new Array();\r\n this.isConcaveArray = new Array();\r\n this.triangles = new Array();\r\n this.polygonPool = new spine.Pool(function () {\r\n return new Array();\r\n });\r\n this.polygonIndicesPool = new spine.Pool(function () {\r\n return new Array();\r\n });\r\n }\r\n Triangulator.prototype.triangulate = function (verticesArray) {\r\n var vertices = verticesArray;\r\n var vertexCount = verticesArray.length >> 1;\r\n var indices = this.indicesArray;\r\n indices.length = 0;\r\n for (var i = 0; i < vertexCount; i++)\r\n indices[i] = i;\r\n var isConcave = this.isConcaveArray;\r\n isConcave.length = 0;\r\n for (var i = 0, n = vertexCount; i < n; ++i)\r\n isConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices);\r\n var triangles = this.triangles;\r\n triangles.length = 0;\r\n while (vertexCount > 3) {\r\n var previous = vertexCount - 1, i = 0, next = 1;\r\n while (true) {\r\n outer: if (!isConcave[i]) {\r\n var p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\r\n var p1x = vertices[p1], p1y = vertices[p1 + 1];\r\n var p2x = vertices[p2], p2y = vertices[p2 + 1];\r\n var p3x = vertices[p3], p3y = vertices[p3 + 1];\r\n for (var ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\r\n if (!isConcave[ii])\r\n continue;\r\n var v = indices[ii] << 1;\r\n var vx = vertices[v], vy = vertices[v + 1];\r\n if (Triangulator.positiveArea(p3x, p3y, p1x, p1y, vx, vy)) {\r\n if (Triangulator.positiveArea(p1x, p1y, p2x, p2y, vx, vy)) {\r\n if (Triangulator.positiveArea(p2x, p2y, p3x, p3y, vx, vy))\r\n break outer;\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n if (next == 0) {\r\n do {\r\n if (!isConcave[i])\r\n break;\r\n i--;\r\n } while (i > 0);\r\n break;\r\n }\r\n previous = i;\r\n i = next;\r\n next = (next + 1) % vertexCount;\r\n }\r\n triangles.push(indices[(vertexCount + i - 1) % vertexCount]);\r\n triangles.push(indices[i]);\r\n triangles.push(indices[(i + 1) % vertexCount]);\r\n indices.splice(i, 1);\r\n isConcave.splice(i, 1);\r\n vertexCount--;\r\n var previousIndex = (vertexCount + i - 1) % vertexCount;\r\n var nextIndex = i == vertexCount ? 0 : i;\r\n isConcave[previousIndex] = Triangulator.isConcave(previousIndex, vertexCount, vertices, indices);\r\n isConcave[nextIndex] = Triangulator.isConcave(nextIndex, vertexCount, vertices, indices);\r\n }\r\n if (vertexCount == 3) {\r\n triangles.push(indices[2]);\r\n triangles.push(indices[0]);\r\n triangles.push(indices[1]);\r\n }\r\n return triangles;\r\n };\r\n Triangulator.prototype.decompose = function (verticesArray, triangles) {\r\n var vertices = verticesArray;\r\n var convexPolygons = this.convexPolygons;\r\n this.polygonPool.freeAll(convexPolygons);\r\n convexPolygons.length = 0;\r\n var convexPolygonsIndices = this.convexPolygonsIndices;\r\n this.polygonIndicesPool.freeAll(convexPolygonsIndices);\r\n convexPolygonsIndices.length = 0;\r\n var polygonIndices = this.polygonIndicesPool.obtain();\r\n polygonIndices.length = 0;\r\n var polygon = this.polygonPool.obtain();\r\n polygon.length = 0;\r\n var fanBaseIndex = -1, lastWinding = 0;\r\n for (var i = 0, n = triangles.length; i < n; i += 3) {\r\n var t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\r\n var x1 = vertices[t1], y1 = vertices[t1 + 1];\r\n var x2 = vertices[t2], y2 = vertices[t2 + 1];\r\n var x3 = vertices[t3], y3 = vertices[t3 + 1];\r\n var merged = false;\r\n if (fanBaseIndex == t1) {\r\n var o = polygon.length - 4;\r\n var winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3);\r\n var winding2 = Triangulator.winding(x3, y3, polygon[0], polygon[1], polygon[2], polygon[3]);\r\n if (winding1 == lastWinding && winding2 == lastWinding) {\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices.push(t3);\r\n merged = true;\r\n }\r\n }\r\n if (!merged) {\r\n if (polygon.length > 0) {\r\n convexPolygons.push(polygon);\r\n convexPolygonsIndices.push(polygonIndices);\r\n }\r\n else {\r\n this.polygonPool.free(polygon);\r\n this.polygonIndicesPool.free(polygonIndices);\r\n }\r\n polygon = this.polygonPool.obtain();\r\n polygon.length = 0;\r\n polygon.push(x1);\r\n polygon.push(y1);\r\n polygon.push(x2);\r\n polygon.push(y2);\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices = this.polygonIndicesPool.obtain();\r\n polygonIndices.length = 0;\r\n polygonIndices.push(t1);\r\n polygonIndices.push(t2);\r\n polygonIndices.push(t3);\r\n lastWinding = Triangulator.winding(x1, y1, x2, y2, x3, y3);\r\n fanBaseIndex = t1;\r\n }\r\n }\r\n if (polygon.length > 0) {\r\n convexPolygons.push(polygon);\r\n convexPolygonsIndices.push(polygonIndices);\r\n }\r\n for (var i = 0, n = convexPolygons.length; i < n; i++) {\r\n polygonIndices = convexPolygonsIndices[i];\r\n if (polygonIndices.length == 0)\r\n continue;\r\n var firstIndex = polygonIndices[0];\r\n var lastIndex = polygonIndices[polygonIndices.length - 1];\r\n polygon = convexPolygons[i];\r\n var o = polygon.length - 4;\r\n var prevPrevX = polygon[o], prevPrevY = polygon[o + 1];\r\n var prevX = polygon[o + 2], prevY = polygon[o + 3];\r\n var firstX = polygon[0], firstY = polygon[1];\r\n var secondX = polygon[2], secondY = polygon[3];\r\n var winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\r\n for (var ii = 0; ii < n; ii++) {\r\n if (ii == i)\r\n continue;\r\n var otherIndices = convexPolygonsIndices[ii];\r\n if (otherIndices.length != 3)\r\n continue;\r\n var otherFirstIndex = otherIndices[0];\r\n var otherSecondIndex = otherIndices[1];\r\n var otherLastIndex = otherIndices[2];\r\n var otherPoly = convexPolygons[ii];\r\n var x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1];\r\n if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex)\r\n continue;\r\n var winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\r\n var winding2 = Triangulator.winding(x3, y3, firstX, firstY, secondX, secondY);\r\n if (winding1 == winding && winding2 == winding) {\r\n otherPoly.length = 0;\r\n otherIndices.length = 0;\r\n polygon.push(x3);\r\n polygon.push(y3);\r\n polygonIndices.push(otherLastIndex);\r\n prevPrevX = prevX;\r\n prevPrevY = prevY;\r\n prevX = x3;\r\n prevY = y3;\r\n ii = 0;\r\n }\r\n }\r\n }\r\n for (var i = convexPolygons.length - 1; i >= 0; i--) {\r\n polygon = convexPolygons[i];\r\n if (polygon.length == 0) {\r\n convexPolygons.splice(i, 1);\r\n this.polygonPool.free(polygon);\r\n polygonIndices = convexPolygonsIndices[i];\r\n convexPolygonsIndices.splice(i, 1);\r\n this.polygonIndicesPool.free(polygonIndices);\r\n }\r\n }\r\n return convexPolygons;\r\n };\r\n Triangulator.isConcave = function (index, vertexCount, vertices, indices) {\r\n var previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\r\n var current = indices[index] << 1;\r\n var next = indices[(index + 1) % vertexCount] << 1;\r\n return !this.positiveArea(vertices[previous], vertices[previous + 1], vertices[current], vertices[current + 1], vertices[next], vertices[next + 1]);\r\n };\r\n Triangulator.positiveArea = function (p1x, p1y, p2x, p2y, p3x, p3y) {\r\n return p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\r\n };\r\n Triangulator.winding = function (p1x, p1y, p2x, p2y, p3x, p3y) {\r\n var px = p2x - p1x, py = p2y - p1y;\r\n return p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\r\n };\r\n return Triangulator;\r\n }());\r\n spine.Triangulator = Triangulator;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var IntSet = (function () {\r\n function IntSet() {\r\n this.array = new Array();\r\n }\r\n IntSet.prototype.add = function (value) {\r\n var contains = this.contains(value);\r\n this.array[value | 0] = value | 0;\r\n return !contains;\r\n };\r\n IntSet.prototype.contains = function (value) {\r\n return this.array[value | 0] != undefined;\r\n };\r\n IntSet.prototype.remove = function (value) {\r\n this.array[value | 0] = undefined;\r\n };\r\n IntSet.prototype.clear = function () {\r\n this.array.length = 0;\r\n };\r\n return IntSet;\r\n }());\r\n spine.IntSet = IntSet;\r\n var Color = (function () {\r\n function Color(r, g, b, a) {\r\n if (r === void 0) { r = 0; }\r\n if (g === void 0) { g = 0; }\r\n if (b === void 0) { b = 0; }\r\n if (a === void 0) { a = 0; }\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n }\r\n Color.prototype.set = function (r, g, b, a) {\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n this.a = a;\r\n this.clamp();\r\n return this;\r\n };\r\n Color.prototype.setFromColor = function (c) {\r\n this.r = c.r;\r\n this.g = c.g;\r\n this.b = c.b;\r\n this.a = c.a;\r\n return this;\r\n };\r\n Color.prototype.setFromString = function (hex) {\r\n hex = hex.charAt(0) == '#' ? hex.substr(1) : hex;\r\n this.r = parseInt(hex.substr(0, 2), 16) / 255.0;\r\n this.g = parseInt(hex.substr(2, 2), 16) / 255.0;\r\n this.b = parseInt(hex.substr(4, 2), 16) / 255.0;\r\n this.a = (hex.length != 8 ? 255 : parseInt(hex.substr(6, 2), 16)) / 255.0;\r\n return this;\r\n };\r\n Color.prototype.add = function (r, g, b, a) {\r\n this.r += r;\r\n this.g += g;\r\n this.b += b;\r\n this.a += a;\r\n this.clamp();\r\n return this;\r\n };\r\n Color.prototype.clamp = function () {\r\n if (this.r < 0)\r\n this.r = 0;\r\n else if (this.r > 1)\r\n this.r = 1;\r\n if (this.g < 0)\r\n this.g = 0;\r\n else if (this.g > 1)\r\n this.g = 1;\r\n if (this.b < 0)\r\n this.b = 0;\r\n else if (this.b > 1)\r\n this.b = 1;\r\n if (this.a < 0)\r\n this.a = 0;\r\n else if (this.a > 1)\r\n this.a = 1;\r\n return this;\r\n };\r\n Color.rgba8888ToColor = function (color, value) {\r\n color.r = ((value & 0xff000000) >>> 24) / 255;\r\n color.g = ((value & 0x00ff0000) >>> 16) / 255;\r\n color.b = ((value & 0x0000ff00) >>> 8) / 255;\r\n color.a = ((value & 0x000000ff)) / 255;\r\n };\r\n Color.rgb888ToColor = function (color, value) {\r\n color.r = ((value & 0x00ff0000) >>> 16) / 255;\r\n color.g = ((value & 0x0000ff00) >>> 8) / 255;\r\n color.b = ((value & 0x000000ff)) / 255;\r\n };\r\n Color.WHITE = new Color(1, 1, 1, 1);\r\n Color.RED = new Color(1, 0, 0, 1);\r\n Color.GREEN = new Color(0, 1, 0, 1);\r\n Color.BLUE = new Color(0, 0, 1, 1);\r\n Color.MAGENTA = new Color(1, 0, 1, 1);\r\n return Color;\r\n }());\r\n spine.Color = Color;\r\n var MathUtils = (function () {\r\n function MathUtils() {\r\n }\r\n MathUtils.clamp = function (value, min, max) {\r\n if (value < min)\r\n return min;\r\n if (value > max)\r\n return max;\r\n return value;\r\n };\r\n MathUtils.cosDeg = function (degrees) {\r\n return Math.cos(degrees * MathUtils.degRad);\r\n };\r\n MathUtils.sinDeg = function (degrees) {\r\n return Math.sin(degrees * MathUtils.degRad);\r\n };\r\n MathUtils.signum = function (value) {\r\n return value > 0 ? 1 : value < 0 ? -1 : 0;\r\n };\r\n MathUtils.toInt = function (x) {\r\n return x > 0 ? Math.floor(x) : Math.ceil(x);\r\n };\r\n MathUtils.cbrt = function (x) {\r\n var y = Math.pow(Math.abs(x), 1 / 3);\r\n return x < 0 ? -y : y;\r\n };\r\n MathUtils.randomTriangular = function (min, max) {\r\n return MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\r\n };\r\n MathUtils.randomTriangularWith = function (min, max, mode) {\r\n var u = Math.random();\r\n var d = max - min;\r\n if (u <= (mode - min) / d)\r\n return min + Math.sqrt(u * d * (mode - min));\r\n return max - Math.sqrt((1 - u) * d * (max - mode));\r\n };\r\n MathUtils.PI = 3.1415927;\r\n MathUtils.PI2 = MathUtils.PI * 2;\r\n MathUtils.radiansToDegrees = 180 / MathUtils.PI;\r\n MathUtils.radDeg = MathUtils.radiansToDegrees;\r\n MathUtils.degreesToRadians = MathUtils.PI / 180;\r\n MathUtils.degRad = MathUtils.degreesToRadians;\r\n return MathUtils;\r\n }());\r\n spine.MathUtils = MathUtils;\r\n var Interpolation = (function () {\r\n function Interpolation() {\r\n }\r\n Interpolation.prototype.apply = function (start, end, a) {\r\n return start + (end - start) * this.applyInternal(a);\r\n };\r\n return Interpolation;\r\n }());\r\n spine.Interpolation = Interpolation;\r\n var Pow = (function (_super) {\r\n __extends(Pow, _super);\r\n function Pow(power) {\r\n var _this = _super.call(this) || this;\r\n _this.power = 2;\r\n _this.power = power;\r\n return _this;\r\n }\r\n Pow.prototype.applyInternal = function (a) {\r\n if (a <= 0.5)\r\n return Math.pow(a * 2, this.power) / 2;\r\n return Math.pow((a - 1) * 2, this.power) / (this.power % 2 == 0 ? -2 : 2) + 1;\r\n };\r\n return Pow;\r\n }(Interpolation));\r\n spine.Pow = Pow;\r\n var PowOut = (function (_super) {\r\n __extends(PowOut, _super);\r\n function PowOut(power) {\r\n return _super.call(this, power) || this;\r\n }\r\n PowOut.prototype.applyInternal = function (a) {\r\n return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\r\n };\r\n return PowOut;\r\n }(Pow));\r\n spine.PowOut = PowOut;\r\n var Utils = (function () {\r\n function Utils() {\r\n }\r\n Utils.arrayCopy = function (source, sourceStart, dest, destStart, numElements) {\r\n for (var i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\r\n dest[j] = source[i];\r\n }\r\n };\r\n Utils.setArraySize = function (array, size, value) {\r\n if (value === void 0) { value = 0; }\r\n var oldSize = array.length;\r\n if (oldSize == size)\r\n return array;\r\n array.length = size;\r\n if (oldSize < size) {\r\n for (var i = oldSize; i < size; i++)\r\n array[i] = value;\r\n }\r\n return array;\r\n };\r\n Utils.ensureArrayCapacity = function (array, size, value) {\r\n if (value === void 0) { value = 0; }\r\n if (array.length >= size)\r\n return array;\r\n return Utils.setArraySize(array, size, value);\r\n };\r\n Utils.newArray = function (size, defaultValue) {\r\n var array = new Array(size);\r\n for (var i = 0; i < size; i++)\r\n array[i] = defaultValue;\r\n return array;\r\n };\r\n Utils.newFloatArray = function (size) {\r\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\r\n return new Float32Array(size);\r\n }\r\n else {\r\n var array = new Array(size);\r\n for (var i = 0; i < array.length; i++)\r\n array[i] = 0;\r\n return array;\r\n }\r\n };\r\n Utils.newShortArray = function (size) {\r\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\r\n return new Int16Array(size);\r\n }\r\n else {\r\n var array = new Array(size);\r\n for (var i = 0; i < array.length; i++)\r\n array[i] = 0;\r\n return array;\r\n }\r\n };\r\n Utils.toFloatArray = function (array) {\r\n return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\r\n };\r\n Utils.toSinglePrecision = function (value) {\r\n return Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;\r\n };\r\n Utils.webkit602BugfixHelper = function (alpha, blend) {\r\n };\r\n Utils.contains = function (array, element, identity) {\r\n if (identity === void 0) { identity = true; }\r\n for (var i = 0; i < array.length; i++) {\r\n if (array[i] == element)\r\n return true;\r\n }\r\n return false;\r\n };\r\n Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== \"undefined\";\r\n return Utils;\r\n }());\r\n spine.Utils = Utils;\r\n var DebugUtils = (function () {\r\n function DebugUtils() {\r\n }\r\n DebugUtils.logBones = function (skeleton) {\r\n for (var i = 0; i < skeleton.bones.length; i++) {\r\n var bone = skeleton.bones[i];\r\n console.log(bone.data.name + \", \" + bone.a + \", \" + bone.b + \", \" + bone.c + \", \" + bone.d + \", \" + bone.worldX + \", \" + bone.worldY);\r\n }\r\n };\r\n return DebugUtils;\r\n }());\r\n spine.DebugUtils = DebugUtils;\r\n var Pool = (function () {\r\n function Pool(instantiator) {\r\n this.items = new Array();\r\n this.instantiator = instantiator;\r\n }\r\n Pool.prototype.obtain = function () {\r\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\r\n };\r\n Pool.prototype.free = function (item) {\r\n if (item.reset)\r\n item.reset();\r\n this.items.push(item);\r\n };\r\n Pool.prototype.freeAll = function (items) {\r\n for (var i = 0; i < items.length; i++) {\r\n this.free(items[i]);\r\n }\r\n };\r\n Pool.prototype.clear = function () {\r\n this.items.length = 0;\r\n };\r\n return Pool;\r\n }());\r\n spine.Pool = Pool;\r\n var Vector2 = (function () {\r\n function Vector2(x, y) {\r\n if (x === void 0) { x = 0; }\r\n if (y === void 0) { y = 0; }\r\n this.x = x;\r\n this.y = y;\r\n }\r\n Vector2.prototype.set = function (x, y) {\r\n this.x = x;\r\n this.y = y;\r\n return this;\r\n };\r\n Vector2.prototype.length = function () {\r\n var x = this.x;\r\n var y = this.y;\r\n return Math.sqrt(x * x + y * y);\r\n };\r\n Vector2.prototype.normalize = function () {\r\n var len = this.length();\r\n if (len != 0) {\r\n this.x /= len;\r\n this.y /= len;\r\n }\r\n return this;\r\n };\r\n return Vector2;\r\n }());\r\n spine.Vector2 = Vector2;\r\n var TimeKeeper = (function () {\r\n function TimeKeeper() {\r\n this.maxDelta = 0.064;\r\n this.framesPerSecond = 0;\r\n this.delta = 0;\r\n this.totalTime = 0;\r\n this.lastTime = Date.now() / 1000;\r\n this.frameCount = 0;\r\n this.frameTime = 0;\r\n }\r\n TimeKeeper.prototype.update = function () {\r\n var now = Date.now() / 1000;\r\n this.delta = now - this.lastTime;\r\n this.frameTime += this.delta;\r\n this.totalTime += this.delta;\r\n if (this.delta > this.maxDelta)\r\n this.delta = this.maxDelta;\r\n this.lastTime = now;\r\n this.frameCount++;\r\n if (this.frameTime > 1) {\r\n this.framesPerSecond = this.frameCount / this.frameTime;\r\n this.frameTime = 0;\r\n this.frameCount = 0;\r\n }\r\n };\r\n return TimeKeeper;\r\n }());\r\n spine.TimeKeeper = TimeKeeper;\r\n var WindowedMean = (function () {\r\n function WindowedMean(windowSize) {\r\n if (windowSize === void 0) { windowSize = 32; }\r\n this.addedValues = 0;\r\n this.lastValue = 0;\r\n this.mean = 0;\r\n this.dirty = true;\r\n this.values = new Array(windowSize);\r\n }\r\n WindowedMean.prototype.hasEnoughData = function () {\r\n return this.addedValues >= this.values.length;\r\n };\r\n WindowedMean.prototype.addValue = function (value) {\r\n if (this.addedValues < this.values.length)\r\n this.addedValues++;\r\n this.values[this.lastValue++] = value;\r\n if (this.lastValue > this.values.length - 1)\r\n this.lastValue = 0;\r\n this.dirty = true;\r\n };\r\n WindowedMean.prototype.getMean = function () {\r\n if (this.hasEnoughData()) {\r\n if (this.dirty) {\r\n var mean = 0;\r\n for (var i = 0; i < this.values.length; i++) {\r\n mean += this.values[i];\r\n }\r\n this.mean = mean / this.values.length;\r\n this.dirty = false;\r\n }\r\n return this.mean;\r\n }\r\n else {\r\n return 0;\r\n }\r\n };\r\n return WindowedMean;\r\n }());\r\n spine.WindowedMean = WindowedMean;\r\n})(spine || (spine = {}));\r\n(function () {\r\n if (!Math.fround) {\r\n Math.fround = (function (array) {\r\n return function (x) {\r\n return array[0] = x, array[0];\r\n };\r\n })(new Float32Array(1));\r\n }\r\n})();\r\nvar spine;\r\n(function (spine) {\r\n var Attachment = (function () {\r\n function Attachment(name) {\r\n if (name == null)\r\n throw new Error(\"name cannot be null.\");\r\n this.name = name;\r\n }\r\n return Attachment;\r\n }());\r\n spine.Attachment = Attachment;\r\n var VertexAttachment = (function (_super) {\r\n __extends(VertexAttachment, _super);\r\n function VertexAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.id = (VertexAttachment.nextID++ & 65535) << 11;\r\n _this.worldVerticesLength = 0;\r\n _this.deformAttachment = _this;\r\n return _this;\r\n }\r\n VertexAttachment.prototype.computeWorldVertices = function (slot, start, count, worldVertices, offset, stride) {\r\n count = offset + (count >> 1) * stride;\r\n var skeleton = slot.bone.skeleton;\r\n var deformArray = slot.deform;\r\n var vertices = this.vertices;\r\n var bones = this.bones;\r\n if (bones == null) {\r\n if (deformArray.length > 0)\r\n vertices = deformArray;\r\n var bone = slot.bone;\r\n var x = bone.worldX;\r\n var y = bone.worldY;\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n for (var v_1 = start, w = offset; w < count; v_1 += 2, w += stride) {\r\n var vx = vertices[v_1], vy = vertices[v_1 + 1];\r\n worldVertices[w] = vx * a + vy * b + x;\r\n worldVertices[w + 1] = vx * c + vy * d + y;\r\n }\r\n return;\r\n }\r\n var v = 0, skip = 0;\r\n for (var i = 0; i < start; i += 2) {\r\n var n = bones[v];\r\n v += n + 1;\r\n skip += n;\r\n }\r\n var skeletonBones = skeleton.bones;\r\n if (deformArray.length == 0) {\r\n for (var w = offset, b = skip * 3; w < count; w += stride) {\r\n var wx = 0, wy = 0;\r\n var n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3) {\r\n var bone = skeletonBones[bones[v]];\r\n var vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];\r\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\r\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\r\n }\r\n worldVertices[w] = wx;\r\n worldVertices[w + 1] = wy;\r\n }\r\n }\r\n else {\r\n var deform = deformArray;\r\n for (var w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\r\n var wx = 0, wy = 0;\r\n var n = bones[v++];\r\n n += v;\r\n for (; v < n; v++, b += 3, f += 2) {\r\n var bone = skeletonBones[bones[v]];\r\n var vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];\r\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\r\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\r\n }\r\n worldVertices[w] = wx;\r\n worldVertices[w + 1] = wy;\r\n }\r\n }\r\n };\r\n VertexAttachment.prototype.copyTo = function (attachment) {\r\n if (this.bones != null) {\r\n attachment.bones = new Array(this.bones.length);\r\n spine.Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\r\n }\r\n else\r\n attachment.bones = null;\r\n if (this.vertices != null) {\r\n attachment.vertices = spine.Utils.newFloatArray(this.vertices.length);\r\n spine.Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\r\n }\r\n else\r\n attachment.vertices = null;\r\n attachment.worldVerticesLength = this.worldVerticesLength;\r\n attachment.deformAttachment = this.deformAttachment;\r\n };\r\n VertexAttachment.nextID = 0;\r\n return VertexAttachment;\r\n }(Attachment));\r\n spine.VertexAttachment = VertexAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var AttachmentType;\r\n (function (AttachmentType) {\r\n AttachmentType[AttachmentType[\"Region\"] = 0] = \"Region\";\r\n AttachmentType[AttachmentType[\"BoundingBox\"] = 1] = \"BoundingBox\";\r\n AttachmentType[AttachmentType[\"Mesh\"] = 2] = \"Mesh\";\r\n AttachmentType[AttachmentType[\"LinkedMesh\"] = 3] = \"LinkedMesh\";\r\n AttachmentType[AttachmentType[\"Path\"] = 4] = \"Path\";\r\n AttachmentType[AttachmentType[\"Point\"] = 5] = \"Point\";\r\n AttachmentType[AttachmentType[\"Clipping\"] = 6] = \"Clipping\";\r\n })(AttachmentType = spine.AttachmentType || (spine.AttachmentType = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var BoundingBoxAttachment = (function (_super) {\r\n __extends(BoundingBoxAttachment, _super);\r\n function BoundingBoxAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n BoundingBoxAttachment.prototype.copy = function () {\r\n var copy = new BoundingBoxAttachment(name);\r\n this.copyTo(copy);\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return BoundingBoxAttachment;\r\n }(spine.VertexAttachment));\r\n spine.BoundingBoxAttachment = BoundingBoxAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var ClippingAttachment = (function (_super) {\r\n __extends(ClippingAttachment, _super);\r\n function ClippingAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(0.2275, 0.2275, 0.8078, 1);\r\n return _this;\r\n }\r\n ClippingAttachment.prototype.copy = function () {\r\n var copy = new ClippingAttachment(name);\r\n this.copyTo(copy);\r\n copy.endSlot = this.endSlot;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return ClippingAttachment;\r\n }(spine.VertexAttachment));\r\n spine.ClippingAttachment = ClippingAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var MeshAttachment = (function (_super) {\r\n __extends(MeshAttachment, _super);\r\n function MeshAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n _this.tempColor = new spine.Color(0, 0, 0, 0);\r\n return _this;\r\n }\r\n MeshAttachment.prototype.updateUVs = function () {\r\n var regionUVs = this.regionUVs;\r\n if (this.uvs == null || this.uvs.length != regionUVs.length)\r\n this.uvs = spine.Utils.newFloatArray(regionUVs.length);\r\n var uvs = this.uvs;\r\n var n = this.uvs.length;\r\n var u = this.region.u, v = this.region.v, width = 0, height = 0;\r\n if (this.region instanceof spine.TextureAtlasRegion) {\r\n var region = this.region;\r\n var textureWidth = region.texture.getImage().width, textureHeight = region.texture.getImage().height;\r\n switch (region.degrees) {\r\n case 90:\r\n u -= (region.originalHeight - region.offsetY - region.height) / textureWidth;\r\n v -= (region.originalWidth - region.offsetX - region.width) / textureHeight;\r\n width = region.originalHeight / textureWidth;\r\n height = region.originalWidth / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + regionUVs[i + 1] * width;\r\n uvs[i + 1] = v + (1 - regionUVs[i]) * height;\r\n }\r\n return;\r\n case 180:\r\n u -= (region.originalWidth - region.offsetX - region.width) / textureWidth;\r\n v -= region.offsetY / textureHeight;\r\n width = region.originalWidth / textureWidth;\r\n height = region.originalHeight / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + (1 - regionUVs[i]) * width;\r\n uvs[i + 1] = v + (1 - regionUVs[i + 1]) * height;\r\n }\r\n return;\r\n case 270:\r\n u -= region.offsetY / textureWidth;\r\n v -= region.offsetX / textureHeight;\r\n width = region.originalHeight / textureWidth;\r\n height = region.originalWidth / textureHeight;\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + (1 - regionUVs[i + 1]) * width;\r\n uvs[i + 1] = v + regionUVs[i] * height;\r\n }\r\n return;\r\n }\r\n u -= region.offsetX / textureWidth;\r\n v -= (region.originalHeight - region.offsetY - region.height) / textureHeight;\r\n width = region.originalWidth / textureWidth;\r\n height = region.originalHeight / textureHeight;\r\n }\r\n else if (this.region == null) {\r\n u = v = 0;\r\n width = height = 1;\r\n }\r\n else {\r\n width = this.region.u2 - u;\r\n height = this.region.v2 - v;\r\n }\r\n for (var i = 0; i < n; i += 2) {\r\n uvs[i] = u + regionUVs[i] * width;\r\n uvs[i + 1] = v + regionUVs[i + 1] * height;\r\n }\r\n };\r\n MeshAttachment.prototype.getParentMesh = function () {\r\n return this.parentMesh;\r\n };\r\n MeshAttachment.prototype.setParentMesh = function (parentMesh) {\r\n this.parentMesh = parentMesh;\r\n if (parentMesh != null) {\r\n this.bones = parentMesh.bones;\r\n this.vertices = parentMesh.vertices;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n this.regionUVs = parentMesh.regionUVs;\r\n this.triangles = parentMesh.triangles;\r\n this.hullLength = parentMesh.hullLength;\r\n this.worldVerticesLength = parentMesh.worldVerticesLength;\r\n }\r\n };\r\n MeshAttachment.prototype.copy = function () {\r\n if (this.parentMesh != null)\r\n return this.newLinkedMesh();\r\n var copy = new MeshAttachment(this.name);\r\n copy.region = this.region;\r\n copy.path = this.path;\r\n copy.color.setFromColor(this.color);\r\n this.copyTo(copy);\r\n copy.regionUVs = new Array(this.regionUVs.length);\r\n spine.Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\r\n copy.uvs = new Array(this.uvs.length);\r\n spine.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);\r\n copy.triangles = new Array(this.triangles.length);\r\n spine.Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\r\n copy.hullLength = this.hullLength;\r\n if (this.edges != null) {\r\n copy.edges = new Array(this.edges.length);\r\n spine.Utils.arrayCopy(this.edges, 0, copy.edges, 0, this.edges.length);\r\n }\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n return copy;\r\n };\r\n MeshAttachment.prototype.newLinkedMesh = function () {\r\n var copy = new MeshAttachment(this.name);\r\n copy.region = this.region;\r\n copy.path = this.path;\r\n copy.color.setFromColor(this.color);\r\n copy.deformAttachment = this.deformAttachment;\r\n copy.setParentMesh(this.parentMesh != null ? this.parentMesh : this);\r\n copy.updateUVs();\r\n return copy;\r\n };\r\n return MeshAttachment;\r\n }(spine.VertexAttachment));\r\n spine.MeshAttachment = MeshAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PathAttachment = (function (_super) {\r\n __extends(PathAttachment, _super);\r\n function PathAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.closed = false;\r\n _this.constantSpeed = false;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n PathAttachment.prototype.copy = function () {\r\n var copy = new PathAttachment(name);\r\n this.copyTo(copy);\r\n copy.lengths = new Array(this.lengths.length);\r\n spine.Utils.arrayCopy(this.lengths, 0, copy.lengths, 0, this.lengths.length);\r\n copy.closed = closed;\r\n copy.constantSpeed = this.constantSpeed;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return PathAttachment;\r\n }(spine.VertexAttachment));\r\n spine.PathAttachment = PathAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var PointAttachment = (function (_super) {\r\n __extends(PointAttachment, _super);\r\n function PointAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.color = new spine.Color(0.38, 0.94, 0, 1);\r\n return _this;\r\n }\r\n PointAttachment.prototype.computeWorldPosition = function (bone, point) {\r\n point.x = this.x * bone.a + this.y * bone.b + bone.worldX;\r\n point.y = this.x * bone.c + this.y * bone.d + bone.worldY;\r\n return point;\r\n };\r\n PointAttachment.prototype.computeWorldRotation = function (bone) {\r\n var cos = spine.MathUtils.cosDeg(this.rotation), sin = spine.MathUtils.sinDeg(this.rotation);\r\n var x = cos * bone.a + sin * bone.b;\r\n var y = cos * bone.c + sin * bone.d;\r\n return Math.atan2(y, x) * spine.MathUtils.radDeg;\r\n };\r\n PointAttachment.prototype.copy = function () {\r\n var copy = new PointAttachment(name);\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.rotation = this.rotation;\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n return PointAttachment;\r\n }(spine.VertexAttachment));\r\n spine.PointAttachment = PointAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var RegionAttachment = (function (_super) {\r\n __extends(RegionAttachment, _super);\r\n function RegionAttachment(name) {\r\n var _this = _super.call(this, name) || this;\r\n _this.x = 0;\r\n _this.y = 0;\r\n _this.scaleX = 1;\r\n _this.scaleY = 1;\r\n _this.rotation = 0;\r\n _this.width = 0;\r\n _this.height = 0;\r\n _this.color = new spine.Color(1, 1, 1, 1);\r\n _this.offset = spine.Utils.newFloatArray(8);\r\n _this.uvs = spine.Utils.newFloatArray(8);\r\n _this.tempColor = new spine.Color(1, 1, 1, 1);\r\n return _this;\r\n }\r\n RegionAttachment.prototype.updateOffset = function () {\r\n var regionScaleX = this.width / this.region.originalWidth * this.scaleX;\r\n var regionScaleY = this.height / this.region.originalHeight * this.scaleY;\r\n var localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\r\n var localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\r\n var localX2 = localX + this.region.width * regionScaleX;\r\n var localY2 = localY + this.region.height * regionScaleY;\r\n var radians = this.rotation * Math.PI / 180;\r\n var cos = Math.cos(radians);\r\n var sin = Math.sin(radians);\r\n var localXCos = localX * cos + this.x;\r\n var localXSin = localX * sin;\r\n var localYCos = localY * cos + this.y;\r\n var localYSin = localY * sin;\r\n var localX2Cos = localX2 * cos + this.x;\r\n var localX2Sin = localX2 * sin;\r\n var localY2Cos = localY2 * cos + this.y;\r\n var localY2Sin = localY2 * sin;\r\n var offset = this.offset;\r\n offset[RegionAttachment.OX1] = localXCos - localYSin;\r\n offset[RegionAttachment.OY1] = localYCos + localXSin;\r\n offset[RegionAttachment.OX2] = localXCos - localY2Sin;\r\n offset[RegionAttachment.OY2] = localY2Cos + localXSin;\r\n offset[RegionAttachment.OX3] = localX2Cos - localY2Sin;\r\n offset[RegionAttachment.OY3] = localY2Cos + localX2Sin;\r\n offset[RegionAttachment.OX4] = localX2Cos - localYSin;\r\n offset[RegionAttachment.OY4] = localYCos + localX2Sin;\r\n };\r\n RegionAttachment.prototype.setRegion = function (region) {\r\n this.region = region;\r\n var uvs = this.uvs;\r\n if (region.rotate) {\r\n uvs[2] = region.u;\r\n uvs[3] = region.v2;\r\n uvs[4] = region.u;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v;\r\n uvs[0] = region.u2;\r\n uvs[1] = region.v2;\r\n }\r\n else {\r\n uvs[0] = region.u;\r\n uvs[1] = region.v2;\r\n uvs[2] = region.u;\r\n uvs[3] = region.v;\r\n uvs[4] = region.u2;\r\n uvs[5] = region.v;\r\n uvs[6] = region.u2;\r\n uvs[7] = region.v2;\r\n }\r\n };\r\n RegionAttachment.prototype.computeWorldVertices = function (bone, worldVertices, offset, stride) {\r\n var vertexOffset = this.offset;\r\n var x = bone.worldX, y = bone.worldY;\r\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\r\n var offsetX = 0, offsetY = 0;\r\n offsetX = vertexOffset[RegionAttachment.OX1];\r\n offsetY = vertexOffset[RegionAttachment.OY1];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX2];\r\n offsetY = vertexOffset[RegionAttachment.OY2];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX3];\r\n offsetY = vertexOffset[RegionAttachment.OY3];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n offset += stride;\r\n offsetX = vertexOffset[RegionAttachment.OX4];\r\n offsetY = vertexOffset[RegionAttachment.OY4];\r\n worldVertices[offset] = offsetX * a + offsetY * b + x;\r\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\r\n };\r\n RegionAttachment.prototype.copy = function () {\r\n var copy = new RegionAttachment(this.name);\r\n copy.region = this.region;\r\n copy.rendererObject = this.rendererObject;\r\n copy.path = this.path;\r\n copy.x = this.x;\r\n copy.y = this.y;\r\n copy.scaleX = this.scaleX;\r\n copy.scaleY = this.scaleY;\r\n copy.rotation = this.rotation;\r\n copy.width = this.width;\r\n copy.height = this.height;\r\n spine.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\r\n spine.Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\r\n copy.color.setFromColor(this.color);\r\n return copy;\r\n };\r\n RegionAttachment.OX1 = 0;\r\n RegionAttachment.OY1 = 1;\r\n RegionAttachment.OX2 = 2;\r\n RegionAttachment.OY2 = 3;\r\n RegionAttachment.OX3 = 4;\r\n RegionAttachment.OY3 = 5;\r\n RegionAttachment.OX4 = 6;\r\n RegionAttachment.OY4 = 7;\r\n RegionAttachment.X1 = 0;\r\n RegionAttachment.Y1 = 1;\r\n RegionAttachment.C1R = 2;\r\n RegionAttachment.C1G = 3;\r\n RegionAttachment.C1B = 4;\r\n RegionAttachment.C1A = 5;\r\n RegionAttachment.U1 = 6;\r\n RegionAttachment.V1 = 7;\r\n RegionAttachment.X2 = 8;\r\n RegionAttachment.Y2 = 9;\r\n RegionAttachment.C2R = 10;\r\n RegionAttachment.C2G = 11;\r\n RegionAttachment.C2B = 12;\r\n RegionAttachment.C2A = 13;\r\n RegionAttachment.U2 = 14;\r\n RegionAttachment.V2 = 15;\r\n RegionAttachment.X3 = 16;\r\n RegionAttachment.Y3 = 17;\r\n RegionAttachment.C3R = 18;\r\n RegionAttachment.C3G = 19;\r\n RegionAttachment.C3B = 20;\r\n RegionAttachment.C3A = 21;\r\n RegionAttachment.U3 = 22;\r\n RegionAttachment.V3 = 23;\r\n RegionAttachment.X4 = 24;\r\n RegionAttachment.Y4 = 25;\r\n RegionAttachment.C4R = 26;\r\n RegionAttachment.C4G = 27;\r\n RegionAttachment.C4B = 28;\r\n RegionAttachment.C4A = 29;\r\n RegionAttachment.U4 = 30;\r\n RegionAttachment.V4 = 31;\r\n return RegionAttachment;\r\n }(spine.Attachment));\r\n spine.RegionAttachment = RegionAttachment;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var JitterEffect = (function () {\r\n function JitterEffect(jitterX, jitterY) {\r\n this.jitterX = 0;\r\n this.jitterY = 0;\r\n this.jitterX = jitterX;\r\n this.jitterY = jitterY;\r\n }\r\n JitterEffect.prototype.begin = function (skeleton) {\r\n };\r\n JitterEffect.prototype.transform = function (position, uv, light, dark) {\r\n position.x += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n position.y += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\r\n };\r\n JitterEffect.prototype.end = function () {\r\n };\r\n return JitterEffect;\r\n }());\r\n spine.JitterEffect = JitterEffect;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var SwirlEffect = (function () {\r\n function SwirlEffect(radius) {\r\n this.centerX = 0;\r\n this.centerY = 0;\r\n this.radius = 0;\r\n this.angle = 0;\r\n this.worldX = 0;\r\n this.worldY = 0;\r\n this.radius = radius;\r\n }\r\n SwirlEffect.prototype.begin = function (skeleton) {\r\n this.worldX = skeleton.x + this.centerX;\r\n this.worldY = skeleton.y + this.centerY;\r\n };\r\n SwirlEffect.prototype.transform = function (position, uv, light, dark) {\r\n var radAngle = this.angle * spine.MathUtils.degreesToRadians;\r\n var x = position.x - this.worldX;\r\n var y = position.y - this.worldY;\r\n var dist = Math.sqrt(x * x + y * y);\r\n if (dist < this.radius) {\r\n var theta = SwirlEffect.interpolation.apply(0, radAngle, (this.radius - dist) / this.radius);\r\n var cos = Math.cos(theta);\r\n var sin = Math.sin(theta);\r\n position.x = cos * x - sin * y + this.worldX;\r\n position.y = sin * x + cos * y + this.worldY;\r\n }\r\n };\r\n SwirlEffect.prototype.end = function () {\r\n };\r\n SwirlEffect.interpolation = new spine.PowOut(2);\r\n return SwirlEffect;\r\n }());\r\n spine.SwirlEffect = SwirlEffect;\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var canvas;\r\n (function (canvas) {\r\n var AssetManager = (function (_super) {\r\n __extends(AssetManager, _super);\r\n function AssetManager(pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n return _super.call(this, function (image) { return new spine.canvas.CanvasTexture(image); }, pathPrefix) || this;\r\n }\r\n return AssetManager;\r\n }(spine.AssetManager));\r\n canvas.AssetManager = AssetManager;\r\n })(canvas = spine.canvas || (spine.canvas = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var canvas;\r\n (function (canvas) {\r\n var CanvasTexture = (function (_super) {\r\n __extends(CanvasTexture, _super);\r\n function CanvasTexture(image) {\r\n return _super.call(this, image) || this;\r\n }\r\n CanvasTexture.prototype.setFilters = function (minFilter, magFilter) { };\r\n CanvasTexture.prototype.setWraps = function (uWrap, vWrap) { };\r\n CanvasTexture.prototype.dispose = function () { };\r\n return CanvasTexture;\r\n }(spine.Texture));\r\n canvas.CanvasTexture = CanvasTexture;\r\n })(canvas = spine.canvas || (spine.canvas = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var canvas;\r\n (function (canvas) {\r\n var SkeletonRenderer = (function () {\r\n function SkeletonRenderer(context) {\r\n this.triangleRendering = false;\r\n this.debugRendering = false;\r\n this.vertices = spine.Utils.newFloatArray(8 * 1024);\r\n this.tempColor = new spine.Color();\r\n this.ctx = context;\r\n }\r\n SkeletonRenderer.prototype.draw = function (skeleton) {\r\n if (this.triangleRendering)\r\n this.drawTriangles(skeleton);\r\n else\r\n this.drawImages(skeleton);\r\n };\r\n SkeletonRenderer.prototype.drawImages = function (skeleton) {\r\n var ctx = this.ctx;\r\n var drawOrder = skeleton.drawOrder;\r\n if (this.debugRendering)\r\n ctx.strokeStyle = \"green\";\r\n ctx.save();\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var slot = drawOrder[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n var regionAttachment = null;\r\n var region = null;\r\n var image = null;\r\n if (attachment instanceof spine.RegionAttachment) {\r\n regionAttachment = attachment;\r\n region = regionAttachment.region;\r\n image = region.texture.getImage();\r\n }\r\n else\r\n continue;\r\n var skeleton_1 = slot.bone.skeleton;\r\n var skeletonColor = skeleton_1.color;\r\n var slotColor = slot.color;\r\n var regionColor = regionAttachment.color;\r\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * regionColor.r, skeletonColor.g * slotColor.g * regionColor.g, skeletonColor.b * slotColor.b * regionColor.b, alpha);\r\n var att = attachment;\r\n var bone = slot.bone;\r\n var w = region.width;\r\n var h = region.height;\r\n ctx.save();\r\n ctx.transform(bone.a, bone.c, bone.b, bone.d, bone.worldX, bone.worldY);\r\n ctx.translate(attachment.offset[0], attachment.offset[1]);\r\n ctx.rotate(attachment.rotation * Math.PI / 180);\r\n var atlasScale = att.width / w;\r\n ctx.scale(atlasScale * attachment.scaleX, atlasScale * attachment.scaleY);\r\n ctx.translate(w / 2, h / 2);\r\n if (attachment.region.rotate) {\r\n var t = w;\r\n w = h;\r\n h = t;\r\n ctx.rotate(-Math.PI / 2);\r\n }\r\n ctx.scale(1, -1);\r\n ctx.translate(-w / 2, -h / 2);\r\n if (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) {\r\n ctx.globalAlpha = color.a;\r\n }\r\n ctx.drawImage(image, region.x, region.y, w, h, 0, 0, w, h);\r\n if (this.debugRendering)\r\n ctx.strokeRect(0, 0, w, h);\r\n ctx.restore();\r\n }\r\n ctx.restore();\r\n };\r\n SkeletonRenderer.prototype.drawTriangles = function (skeleton) {\r\n var blendMode = null;\r\n var vertices = this.vertices;\r\n var triangles = null;\r\n var drawOrder = skeleton.drawOrder;\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var slot = drawOrder[i];\r\n var attachment = slot.getAttachment();\r\n var texture = null;\r\n var region = null;\r\n if (attachment instanceof spine.RegionAttachment) {\r\n var regionAttachment = attachment;\r\n vertices = this.computeRegionVertices(slot, regionAttachment, false);\r\n triangles = SkeletonRenderer.QUAD_TRIANGLES;\r\n region = regionAttachment.region;\r\n texture = region.texture.getImage();\r\n }\r\n else if (attachment instanceof spine.MeshAttachment) {\r\n var mesh = attachment;\r\n vertices = this.computeMeshVertices(slot, mesh, false);\r\n triangles = mesh.triangles;\r\n texture = mesh.region.renderObject.texture.getImage();\r\n }\r\n else\r\n continue;\r\n if (texture != null) {\r\n var slotBlendMode = slot.data.blendMode;\r\n if (slotBlendMode != blendMode) {\r\n blendMode = slotBlendMode;\r\n }\r\n var skeleton_2 = slot.bone.skeleton;\r\n var skeletonColor = skeleton_2.color;\r\n var slotColor = slot.color;\r\n var attachmentColor = attachment.color;\r\n var alpha = skeletonColor.a * slotColor.a * attachmentColor.a;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * attachmentColor.r, skeletonColor.g * slotColor.g * attachmentColor.g, skeletonColor.b * slotColor.b * attachmentColor.b, alpha);\r\n var ctx = this.ctx;\r\n if (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) {\r\n ctx.globalAlpha = color.a;\r\n }\r\n for (var j = 0; j < triangles.length; j += 3) {\r\n var t1 = triangles[j] * 8, t2 = triangles[j + 1] * 8, t3 = triangles[j + 2] * 8;\r\n var x0 = vertices[t1], y0 = vertices[t1 + 1], u0 = vertices[t1 + 6], v0 = vertices[t1 + 7];\r\n var x1 = vertices[t2], y1 = vertices[t2 + 1], u1 = vertices[t2 + 6], v1 = vertices[t2 + 7];\r\n var x2 = vertices[t3], y2 = vertices[t3 + 1], u2 = vertices[t3 + 6], v2 = vertices[t3 + 7];\r\n this.drawTriangle(texture, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2);\r\n if (this.debugRendering) {\r\n ctx.strokeStyle = \"green\";\r\n ctx.beginPath();\r\n ctx.moveTo(x0, y0);\r\n ctx.lineTo(x1, y1);\r\n ctx.lineTo(x2, y2);\r\n ctx.lineTo(x0, y0);\r\n ctx.stroke();\r\n }\r\n }\r\n }\r\n }\r\n this.ctx.globalAlpha = 1;\r\n };\r\n SkeletonRenderer.prototype.drawTriangle = function (img, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2) {\r\n var ctx = this.ctx;\r\n u0 *= img.width;\r\n v0 *= img.height;\r\n u1 *= img.width;\r\n v1 *= img.height;\r\n u2 *= img.width;\r\n v2 *= img.height;\r\n ctx.beginPath();\r\n ctx.moveTo(x0, y0);\r\n ctx.lineTo(x1, y1);\r\n ctx.lineTo(x2, y2);\r\n ctx.closePath();\r\n x1 -= x0;\r\n y1 -= y0;\r\n x2 -= x0;\r\n y2 -= y0;\r\n u1 -= u0;\r\n v1 -= v0;\r\n u2 -= u0;\r\n v2 -= v0;\r\n var det = 1 / (u1 * v2 - u2 * v1), a = (v2 * x1 - v1 * x2) * det, b = (v2 * y1 - v1 * y2) * det, c = (u1 * x2 - u2 * x1) * det, d = (u1 * y2 - u2 * y1) * det, e = x0 - a * u0 - c * v0, f = y0 - b * u0 - d * v0;\r\n ctx.save();\r\n ctx.transform(a, b, c, d, e, f);\r\n ctx.clip();\r\n ctx.drawImage(img, 0, 0);\r\n ctx.restore();\r\n };\r\n SkeletonRenderer.prototype.computeRegionVertices = function (slot, region, pma) {\r\n var skeleton = slot.bone.skeleton;\r\n var skeletonColor = skeleton.color;\r\n var slotColor = slot.color;\r\n var regionColor = region.color;\r\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n var multiplier = pma ? alpha : 1;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha);\r\n region.computeWorldVertices(slot.bone, this.vertices, 0, SkeletonRenderer.VERTEX_SIZE);\r\n var vertices = this.vertices;\r\n var uvs = region.uvs;\r\n vertices[spine.RegionAttachment.C1R] = color.r;\r\n vertices[spine.RegionAttachment.C1G] = color.g;\r\n vertices[spine.RegionAttachment.C1B] = color.b;\r\n vertices[spine.RegionAttachment.C1A] = color.a;\r\n vertices[spine.RegionAttachment.U1] = uvs[0];\r\n vertices[spine.RegionAttachment.V1] = uvs[1];\r\n vertices[spine.RegionAttachment.C2R] = color.r;\r\n vertices[spine.RegionAttachment.C2G] = color.g;\r\n vertices[spine.RegionAttachment.C2B] = color.b;\r\n vertices[spine.RegionAttachment.C2A] = color.a;\r\n vertices[spine.RegionAttachment.U2] = uvs[2];\r\n vertices[spine.RegionAttachment.V2] = uvs[3];\r\n vertices[spine.RegionAttachment.C3R] = color.r;\r\n vertices[spine.RegionAttachment.C3G] = color.g;\r\n vertices[spine.RegionAttachment.C3B] = color.b;\r\n vertices[spine.RegionAttachment.C3A] = color.a;\r\n vertices[spine.RegionAttachment.U3] = uvs[4];\r\n vertices[spine.RegionAttachment.V3] = uvs[5];\r\n vertices[spine.RegionAttachment.C4R] = color.r;\r\n vertices[spine.RegionAttachment.C4G] = color.g;\r\n vertices[spine.RegionAttachment.C4B] = color.b;\r\n vertices[spine.RegionAttachment.C4A] = color.a;\r\n vertices[spine.RegionAttachment.U4] = uvs[6];\r\n vertices[spine.RegionAttachment.V4] = uvs[7];\r\n return vertices;\r\n };\r\n SkeletonRenderer.prototype.computeMeshVertices = function (slot, mesh, pma) {\r\n var skeleton = slot.bone.skeleton;\r\n var skeletonColor = skeleton.color;\r\n var slotColor = slot.color;\r\n var regionColor = mesh.color;\r\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\r\n var multiplier = pma ? alpha : 1;\r\n var color = this.tempColor;\r\n color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha);\r\n var numVertices = mesh.worldVerticesLength / 2;\r\n if (this.vertices.length < mesh.worldVerticesLength) {\r\n this.vertices = spine.Utils.newFloatArray(mesh.worldVerticesLength);\r\n }\r\n var vertices = this.vertices;\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, SkeletonRenderer.VERTEX_SIZE);\r\n var uvs = mesh.uvs;\r\n for (var i = 0, n = numVertices, u = 0, v = 2; i < n; i++) {\r\n vertices[v++] = color.r;\r\n vertices[v++] = color.g;\r\n vertices[v++] = color.b;\r\n vertices[v++] = color.a;\r\n vertices[v++] = uvs[u++];\r\n vertices[v++] = uvs[u++];\r\n v += 2;\r\n }\r\n return vertices;\r\n };\r\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n SkeletonRenderer.VERTEX_SIZE = 2 + 2 + 4;\r\n return SkeletonRenderer;\r\n }());\r\n canvas.SkeletonRenderer = SkeletonRenderer;\r\n })(canvas = spine.canvas || (spine.canvas = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var AssetManager = (function (_super) {\r\n __extends(AssetManager, _super);\r\n function AssetManager(context, pathPrefix) {\r\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\r\n return _super.call(this, function (image) {\r\n return new spine.webgl.GLTexture(context, image);\r\n }, pathPrefix) || this;\r\n }\r\n return AssetManager;\r\n }(spine.AssetManager));\r\n webgl.AssetManager = AssetManager;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var OrthoCamera = (function () {\r\n function OrthoCamera(viewportWidth, viewportHeight) {\r\n this.position = new webgl.Vector3(0, 0, 0);\r\n this.direction = new webgl.Vector3(0, 0, -1);\r\n this.up = new webgl.Vector3(0, 1, 0);\r\n this.near = 0;\r\n this.far = 100;\r\n this.zoom = 1;\r\n this.viewportWidth = 0;\r\n this.viewportHeight = 0;\r\n this.projectionView = new webgl.Matrix4();\r\n this.inverseProjectionView = new webgl.Matrix4();\r\n this.projection = new webgl.Matrix4();\r\n this.view = new webgl.Matrix4();\r\n this.tmp = new webgl.Vector3();\r\n this.viewportWidth = viewportWidth;\r\n this.viewportHeight = viewportHeight;\r\n this.update();\r\n }\r\n OrthoCamera.prototype.update = function () {\r\n var projection = this.projection;\r\n var view = this.view;\r\n var projectionView = this.projectionView;\r\n var inverseProjectionView = this.inverseProjectionView;\r\n var zoom = this.zoom, viewportWidth = this.viewportWidth, viewportHeight = this.viewportHeight;\r\n projection.ortho(zoom * (-viewportWidth / 2), zoom * (viewportWidth / 2), zoom * (-viewportHeight / 2), zoom * (viewportHeight / 2), this.near, this.far);\r\n view.lookAt(this.position, this.direction, this.up);\r\n projectionView.set(projection.values);\r\n projectionView.multiply(view);\r\n inverseProjectionView.set(projectionView.values).invert();\r\n };\r\n OrthoCamera.prototype.screenToWorld = function (screenCoords, screenWidth, screenHeight) {\r\n var x = screenCoords.x, y = screenHeight - screenCoords.y - 1;\r\n var tmp = this.tmp;\r\n tmp.x = (2 * x) / screenWidth - 1;\r\n tmp.y = (2 * y) / screenHeight - 1;\r\n tmp.z = (2 * screenCoords.z) - 1;\r\n tmp.project(this.inverseProjectionView);\r\n screenCoords.set(tmp.x, tmp.y, tmp.z);\r\n return screenCoords;\r\n };\r\n OrthoCamera.prototype.setViewport = function (viewportWidth, viewportHeight) {\r\n this.viewportWidth = viewportWidth;\r\n this.viewportHeight = viewportHeight;\r\n };\r\n return OrthoCamera;\r\n }());\r\n webgl.OrthoCamera = OrthoCamera;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var GLTexture = (function (_super) {\r\n __extends(GLTexture, _super);\r\n function GLTexture(context, image, useMipMaps) {\r\n if (useMipMaps === void 0) { useMipMaps = false; }\r\n var _this = _super.call(this, image) || this;\r\n _this.texture = null;\r\n _this.boundUnit = 0;\r\n _this.useMipMaps = false;\r\n _this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n _this.useMipMaps = useMipMaps;\r\n _this.restore();\r\n _this.context.addRestorable(_this);\r\n return _this;\r\n }\r\n GLTexture.prototype.setFilters = function (minFilter, magFilter) {\r\n var gl = this.context.gl;\r\n this.bind();\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, minFilter);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, GLTexture.validateMagFilter(magFilter));\r\n };\r\n GLTexture.validateMagFilter = function (magFilter) {\r\n switch (magFilter) {\r\n case spine.TextureFilter.MipMap:\r\n case spine.TextureFilter.MipMapLinearLinear:\r\n case spine.TextureFilter.MipMapLinearNearest:\r\n case spine.TextureFilter.MipMapNearestLinear:\r\n case spine.TextureFilter.MipMapNearestNearest:\r\n return spine.TextureFilter.Linear;\r\n default:\r\n return magFilter;\r\n }\r\n };\r\n GLTexture.prototype.setWraps = function (uWrap, vWrap) {\r\n var gl = this.context.gl;\r\n this.bind();\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, uWrap);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, vWrap);\r\n };\r\n GLTexture.prototype.update = function (useMipMaps) {\r\n var gl = this.context.gl;\r\n if (!this.texture) {\r\n this.texture = this.context.gl.createTexture();\r\n }\r\n this.bind();\r\n if (GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL)\r\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\r\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this._image);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, useMipMaps ? gl.LINEAR_MIPMAP_LINEAR : gl.LINEAR);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\r\n if (useMipMaps)\r\n gl.generateMipmap(gl.TEXTURE_2D);\r\n };\r\n GLTexture.prototype.restore = function () {\r\n this.texture = null;\r\n this.update(this.useMipMaps);\r\n };\r\n GLTexture.prototype.bind = function (unit) {\r\n if (unit === void 0) { unit = 0; }\r\n var gl = this.context.gl;\r\n this.boundUnit = unit;\r\n gl.activeTexture(gl.TEXTURE0 + unit);\r\n gl.bindTexture(gl.TEXTURE_2D, this.texture);\r\n };\r\n GLTexture.prototype.unbind = function () {\r\n var gl = this.context.gl;\r\n gl.activeTexture(gl.TEXTURE0 + this.boundUnit);\r\n gl.bindTexture(gl.TEXTURE_2D, null);\r\n };\r\n GLTexture.prototype.dispose = function () {\r\n this.context.removeRestorable(this);\r\n var gl = this.context.gl;\r\n gl.deleteTexture(this.texture);\r\n };\r\n GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL = false;\r\n return GLTexture;\r\n }(spine.Texture));\r\n webgl.GLTexture = GLTexture;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n webgl.M00 = 0;\r\n webgl.M01 = 4;\r\n webgl.M02 = 8;\r\n webgl.M03 = 12;\r\n webgl.M10 = 1;\r\n webgl.M11 = 5;\r\n webgl.M12 = 9;\r\n webgl.M13 = 13;\r\n webgl.M20 = 2;\r\n webgl.M21 = 6;\r\n webgl.M22 = 10;\r\n webgl.M23 = 14;\r\n webgl.M30 = 3;\r\n webgl.M31 = 7;\r\n webgl.M32 = 11;\r\n webgl.M33 = 15;\r\n var Matrix4 = (function () {\r\n function Matrix4() {\r\n this.temp = new Float32Array(16);\r\n this.values = new Float32Array(16);\r\n var v = this.values;\r\n v[webgl.M00] = 1;\r\n v[webgl.M11] = 1;\r\n v[webgl.M22] = 1;\r\n v[webgl.M33] = 1;\r\n }\r\n Matrix4.prototype.set = function (values) {\r\n this.values.set(values);\r\n return this;\r\n };\r\n Matrix4.prototype.transpose = function () {\r\n var t = this.temp;\r\n var v = this.values;\r\n t[webgl.M00] = v[webgl.M00];\r\n t[webgl.M01] = v[webgl.M10];\r\n t[webgl.M02] = v[webgl.M20];\r\n t[webgl.M03] = v[webgl.M30];\r\n t[webgl.M10] = v[webgl.M01];\r\n t[webgl.M11] = v[webgl.M11];\r\n t[webgl.M12] = v[webgl.M21];\r\n t[webgl.M13] = v[webgl.M31];\r\n t[webgl.M20] = v[webgl.M02];\r\n t[webgl.M21] = v[webgl.M12];\r\n t[webgl.M22] = v[webgl.M22];\r\n t[webgl.M23] = v[webgl.M32];\r\n t[webgl.M30] = v[webgl.M03];\r\n t[webgl.M31] = v[webgl.M13];\r\n t[webgl.M32] = v[webgl.M23];\r\n t[webgl.M33] = v[webgl.M33];\r\n return this.set(t);\r\n };\r\n Matrix4.prototype.identity = function () {\r\n var v = this.values;\r\n v[webgl.M00] = 1;\r\n v[webgl.M01] = 0;\r\n v[webgl.M02] = 0;\r\n v[webgl.M03] = 0;\r\n v[webgl.M10] = 0;\r\n v[webgl.M11] = 1;\r\n v[webgl.M12] = 0;\r\n v[webgl.M13] = 0;\r\n v[webgl.M20] = 0;\r\n v[webgl.M21] = 0;\r\n v[webgl.M22] = 1;\r\n v[webgl.M23] = 0;\r\n v[webgl.M30] = 0;\r\n v[webgl.M31] = 0;\r\n v[webgl.M32] = 0;\r\n v[webgl.M33] = 1;\r\n return this;\r\n };\r\n Matrix4.prototype.invert = function () {\r\n var v = this.values;\r\n var t = this.temp;\r\n var l_det = v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03]\r\n + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03]\r\n - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13]\r\n - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13]\r\n + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23]\r\n + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23]\r\n - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33]\r\n - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\r\n if (l_det == 0)\r\n throw new Error(\"non-invertible matrix\");\r\n var inv_det = 1.0 / l_det;\r\n t[webgl.M00] = v[webgl.M12] * v[webgl.M23] * v[webgl.M31] - v[webgl.M13] * v[webgl.M22] * v[webgl.M31] + v[webgl.M13] * v[webgl.M21] * v[webgl.M32]\r\n - v[webgl.M11] * v[webgl.M23] * v[webgl.M32] - v[webgl.M12] * v[webgl.M21] * v[webgl.M33] + v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M01] = v[webgl.M03] * v[webgl.M22] * v[webgl.M31] - v[webgl.M02] * v[webgl.M23] * v[webgl.M31] - v[webgl.M03] * v[webgl.M21] * v[webgl.M32]\r\n + v[webgl.M01] * v[webgl.M23] * v[webgl.M32] + v[webgl.M02] * v[webgl.M21] * v[webgl.M33] - v[webgl.M01] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M02] = v[webgl.M02] * v[webgl.M13] * v[webgl.M31] - v[webgl.M03] * v[webgl.M12] * v[webgl.M31] + v[webgl.M03] * v[webgl.M11] * v[webgl.M32]\r\n - v[webgl.M01] * v[webgl.M13] * v[webgl.M32] - v[webgl.M02] * v[webgl.M11] * v[webgl.M33] + v[webgl.M01] * v[webgl.M12] * v[webgl.M33];\r\n t[webgl.M03] = v[webgl.M03] * v[webgl.M12] * v[webgl.M21] - v[webgl.M02] * v[webgl.M13] * v[webgl.M21] - v[webgl.M03] * v[webgl.M11] * v[webgl.M22]\r\n + v[webgl.M01] * v[webgl.M13] * v[webgl.M22] + v[webgl.M02] * v[webgl.M11] * v[webgl.M23] - v[webgl.M01] * v[webgl.M12] * v[webgl.M23];\r\n t[webgl.M10] = v[webgl.M13] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M20] * v[webgl.M32]\r\n + v[webgl.M10] * v[webgl.M23] * v[webgl.M32] + v[webgl.M12] * v[webgl.M20] * v[webgl.M33] - v[webgl.M10] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M11] = v[webgl.M02] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M22] * v[webgl.M30] + v[webgl.M03] * v[webgl.M20] * v[webgl.M32]\r\n - v[webgl.M00] * v[webgl.M23] * v[webgl.M32] - v[webgl.M02] * v[webgl.M20] * v[webgl.M33] + v[webgl.M00] * v[webgl.M22] * v[webgl.M33];\r\n t[webgl.M12] = v[webgl.M03] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M10] * v[webgl.M32]\r\n + v[webgl.M00] * v[webgl.M13] * v[webgl.M32] + v[webgl.M02] * v[webgl.M10] * v[webgl.M33] - v[webgl.M00] * v[webgl.M12] * v[webgl.M33];\r\n t[webgl.M13] = v[webgl.M02] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M12] * v[webgl.M20] + v[webgl.M03] * v[webgl.M10] * v[webgl.M22]\r\n - v[webgl.M00] * v[webgl.M13] * v[webgl.M22] - v[webgl.M02] * v[webgl.M10] * v[webgl.M23] + v[webgl.M00] * v[webgl.M12] * v[webgl.M23];\r\n t[webgl.M20] = v[webgl.M11] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M21] * v[webgl.M30] + v[webgl.M13] * v[webgl.M20] * v[webgl.M31]\r\n - v[webgl.M10] * v[webgl.M23] * v[webgl.M31] - v[webgl.M11] * v[webgl.M20] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M33];\r\n t[webgl.M21] = v[webgl.M03] * v[webgl.M21] * v[webgl.M30] - v[webgl.M01] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M20] * v[webgl.M31]\r\n + v[webgl.M00] * v[webgl.M23] * v[webgl.M31] + v[webgl.M01] * v[webgl.M20] * v[webgl.M33] - v[webgl.M00] * v[webgl.M21] * v[webgl.M33];\r\n t[webgl.M22] = v[webgl.M01] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M11] * v[webgl.M30] + v[webgl.M03] * v[webgl.M10] * v[webgl.M31]\r\n - v[webgl.M00] * v[webgl.M13] * v[webgl.M31] - v[webgl.M01] * v[webgl.M10] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M33];\r\n t[webgl.M23] = v[webgl.M03] * v[webgl.M11] * v[webgl.M20] - v[webgl.M01] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M10] * v[webgl.M21]\r\n + v[webgl.M00] * v[webgl.M13] * v[webgl.M21] + v[webgl.M01] * v[webgl.M10] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M23];\r\n t[webgl.M30] = v[webgl.M12] * v[webgl.M21] * v[webgl.M30] - v[webgl.M11] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M20] * v[webgl.M31]\r\n + v[webgl.M10] * v[webgl.M22] * v[webgl.M31] + v[webgl.M11] * v[webgl.M20] * v[webgl.M32] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32];\r\n t[webgl.M31] = v[webgl.M01] * v[webgl.M22] * v[webgl.M30] - v[webgl.M02] * v[webgl.M21] * v[webgl.M30] + v[webgl.M02] * v[webgl.M20] * v[webgl.M31]\r\n - v[webgl.M00] * v[webgl.M22] * v[webgl.M31] - v[webgl.M01] * v[webgl.M20] * v[webgl.M32] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32];\r\n t[webgl.M32] = v[webgl.M02] * v[webgl.M11] * v[webgl.M30] - v[webgl.M01] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M10] * v[webgl.M31]\r\n + v[webgl.M00] * v[webgl.M12] * v[webgl.M31] + v[webgl.M01] * v[webgl.M10] * v[webgl.M32] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32];\r\n t[webgl.M33] = v[webgl.M01] * v[webgl.M12] * v[webgl.M20] - v[webgl.M02] * v[webgl.M11] * v[webgl.M20] + v[webgl.M02] * v[webgl.M10] * v[webgl.M21]\r\n - v[webgl.M00] * v[webgl.M12] * v[webgl.M21] - v[webgl.M01] * v[webgl.M10] * v[webgl.M22] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22];\r\n v[webgl.M00] = t[webgl.M00] * inv_det;\r\n v[webgl.M01] = t[webgl.M01] * inv_det;\r\n v[webgl.M02] = t[webgl.M02] * inv_det;\r\n v[webgl.M03] = t[webgl.M03] * inv_det;\r\n v[webgl.M10] = t[webgl.M10] * inv_det;\r\n v[webgl.M11] = t[webgl.M11] * inv_det;\r\n v[webgl.M12] = t[webgl.M12] * inv_det;\r\n v[webgl.M13] = t[webgl.M13] * inv_det;\r\n v[webgl.M20] = t[webgl.M20] * inv_det;\r\n v[webgl.M21] = t[webgl.M21] * inv_det;\r\n v[webgl.M22] = t[webgl.M22] * inv_det;\r\n v[webgl.M23] = t[webgl.M23] * inv_det;\r\n v[webgl.M30] = t[webgl.M30] * inv_det;\r\n v[webgl.M31] = t[webgl.M31] * inv_det;\r\n v[webgl.M32] = t[webgl.M32] * inv_det;\r\n v[webgl.M33] = t[webgl.M33] * inv_det;\r\n return this;\r\n };\r\n Matrix4.prototype.determinant = function () {\r\n var v = this.values;\r\n return v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03]\r\n + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03]\r\n - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13]\r\n - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13]\r\n + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23]\r\n + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23]\r\n - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33]\r\n - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\r\n };\r\n Matrix4.prototype.translate = function (x, y, z) {\r\n var v = this.values;\r\n v[webgl.M03] += x;\r\n v[webgl.M13] += y;\r\n v[webgl.M23] += z;\r\n return this;\r\n };\r\n Matrix4.prototype.copy = function () {\r\n return new Matrix4().set(this.values);\r\n };\r\n Matrix4.prototype.projection = function (near, far, fovy, aspectRatio) {\r\n this.identity();\r\n var l_fd = (1.0 / Math.tan((fovy * (Math.PI / 180)) / 2.0));\r\n var l_a1 = (far + near) / (near - far);\r\n var l_a2 = (2 * far * near) / (near - far);\r\n var v = this.values;\r\n v[webgl.M00] = l_fd / aspectRatio;\r\n v[webgl.M10] = 0;\r\n v[webgl.M20] = 0;\r\n v[webgl.M30] = 0;\r\n v[webgl.M01] = 0;\r\n v[webgl.M11] = l_fd;\r\n v[webgl.M21] = 0;\r\n v[webgl.M31] = 0;\r\n v[webgl.M02] = 0;\r\n v[webgl.M12] = 0;\r\n v[webgl.M22] = l_a1;\r\n v[webgl.M32] = -1;\r\n v[webgl.M03] = 0;\r\n v[webgl.M13] = 0;\r\n v[webgl.M23] = l_a2;\r\n v[webgl.M33] = 0;\r\n return this;\r\n };\r\n Matrix4.prototype.ortho2d = function (x, y, width, height) {\r\n return this.ortho(x, x + width, y, y + height, 0, 1);\r\n };\r\n Matrix4.prototype.ortho = function (left, right, bottom, top, near, far) {\r\n this.identity();\r\n var x_orth = 2 / (right - left);\r\n var y_orth = 2 / (top - bottom);\r\n var z_orth = -2 / (far - near);\r\n var tx = -(right + left) / (right - left);\r\n var ty = -(top + bottom) / (top - bottom);\r\n var tz = -(far + near) / (far - near);\r\n var v = this.values;\r\n v[webgl.M00] = x_orth;\r\n v[webgl.M10] = 0;\r\n v[webgl.M20] = 0;\r\n v[webgl.M30] = 0;\r\n v[webgl.M01] = 0;\r\n v[webgl.M11] = y_orth;\r\n v[webgl.M21] = 0;\r\n v[webgl.M31] = 0;\r\n v[webgl.M02] = 0;\r\n v[webgl.M12] = 0;\r\n v[webgl.M22] = z_orth;\r\n v[webgl.M32] = 0;\r\n v[webgl.M03] = tx;\r\n v[webgl.M13] = ty;\r\n v[webgl.M23] = tz;\r\n v[webgl.M33] = 1;\r\n return this;\r\n };\r\n Matrix4.prototype.multiply = function (matrix) {\r\n var t = this.temp;\r\n var v = this.values;\r\n var m = matrix.values;\r\n t[webgl.M00] = v[webgl.M00] * m[webgl.M00] + v[webgl.M01] * m[webgl.M10] + v[webgl.M02] * m[webgl.M20] + v[webgl.M03] * m[webgl.M30];\r\n t[webgl.M01] = v[webgl.M00] * m[webgl.M01] + v[webgl.M01] * m[webgl.M11] + v[webgl.M02] * m[webgl.M21] + v[webgl.M03] * m[webgl.M31];\r\n t[webgl.M02] = v[webgl.M00] * m[webgl.M02] + v[webgl.M01] * m[webgl.M12] + v[webgl.M02] * m[webgl.M22] + v[webgl.M03] * m[webgl.M32];\r\n t[webgl.M03] = v[webgl.M00] * m[webgl.M03] + v[webgl.M01] * m[webgl.M13] + v[webgl.M02] * m[webgl.M23] + v[webgl.M03] * m[webgl.M33];\r\n t[webgl.M10] = v[webgl.M10] * m[webgl.M00] + v[webgl.M11] * m[webgl.M10] + v[webgl.M12] * m[webgl.M20] + v[webgl.M13] * m[webgl.M30];\r\n t[webgl.M11] = v[webgl.M10] * m[webgl.M01] + v[webgl.M11] * m[webgl.M11] + v[webgl.M12] * m[webgl.M21] + v[webgl.M13] * m[webgl.M31];\r\n t[webgl.M12] = v[webgl.M10] * m[webgl.M02] + v[webgl.M11] * m[webgl.M12] + v[webgl.M12] * m[webgl.M22] + v[webgl.M13] * m[webgl.M32];\r\n t[webgl.M13] = v[webgl.M10] * m[webgl.M03] + v[webgl.M11] * m[webgl.M13] + v[webgl.M12] * m[webgl.M23] + v[webgl.M13] * m[webgl.M33];\r\n t[webgl.M20] = v[webgl.M20] * m[webgl.M00] + v[webgl.M21] * m[webgl.M10] + v[webgl.M22] * m[webgl.M20] + v[webgl.M23] * m[webgl.M30];\r\n t[webgl.M21] = v[webgl.M20] * m[webgl.M01] + v[webgl.M21] * m[webgl.M11] + v[webgl.M22] * m[webgl.M21] + v[webgl.M23] * m[webgl.M31];\r\n t[webgl.M22] = v[webgl.M20] * m[webgl.M02] + v[webgl.M21] * m[webgl.M12] + v[webgl.M22] * m[webgl.M22] + v[webgl.M23] * m[webgl.M32];\r\n t[webgl.M23] = v[webgl.M20] * m[webgl.M03] + v[webgl.M21] * m[webgl.M13] + v[webgl.M22] * m[webgl.M23] + v[webgl.M23] * m[webgl.M33];\r\n t[webgl.M30] = v[webgl.M30] * m[webgl.M00] + v[webgl.M31] * m[webgl.M10] + v[webgl.M32] * m[webgl.M20] + v[webgl.M33] * m[webgl.M30];\r\n t[webgl.M31] = v[webgl.M30] * m[webgl.M01] + v[webgl.M31] * m[webgl.M11] + v[webgl.M32] * m[webgl.M21] + v[webgl.M33] * m[webgl.M31];\r\n t[webgl.M32] = v[webgl.M30] * m[webgl.M02] + v[webgl.M31] * m[webgl.M12] + v[webgl.M32] * m[webgl.M22] + v[webgl.M33] * m[webgl.M32];\r\n t[webgl.M33] = v[webgl.M30] * m[webgl.M03] + v[webgl.M31] * m[webgl.M13] + v[webgl.M32] * m[webgl.M23] + v[webgl.M33] * m[webgl.M33];\r\n return this.set(this.temp);\r\n };\r\n Matrix4.prototype.multiplyLeft = function (matrix) {\r\n var t = this.temp;\r\n var v = this.values;\r\n var m = matrix.values;\r\n t[webgl.M00] = m[webgl.M00] * v[webgl.M00] + m[webgl.M01] * v[webgl.M10] + m[webgl.M02] * v[webgl.M20] + m[webgl.M03] * v[webgl.M30];\r\n t[webgl.M01] = m[webgl.M00] * v[webgl.M01] + m[webgl.M01] * v[webgl.M11] + m[webgl.M02] * v[webgl.M21] + m[webgl.M03] * v[webgl.M31];\r\n t[webgl.M02] = m[webgl.M00] * v[webgl.M02] + m[webgl.M01] * v[webgl.M12] + m[webgl.M02] * v[webgl.M22] + m[webgl.M03] * v[webgl.M32];\r\n t[webgl.M03] = m[webgl.M00] * v[webgl.M03] + m[webgl.M01] * v[webgl.M13] + m[webgl.M02] * v[webgl.M23] + m[webgl.M03] * v[webgl.M33];\r\n t[webgl.M10] = m[webgl.M10] * v[webgl.M00] + m[webgl.M11] * v[webgl.M10] + m[webgl.M12] * v[webgl.M20] + m[webgl.M13] * v[webgl.M30];\r\n t[webgl.M11] = m[webgl.M10] * v[webgl.M01] + m[webgl.M11] * v[webgl.M11] + m[webgl.M12] * v[webgl.M21] + m[webgl.M13] * v[webgl.M31];\r\n t[webgl.M12] = m[webgl.M10] * v[webgl.M02] + m[webgl.M11] * v[webgl.M12] + m[webgl.M12] * v[webgl.M22] + m[webgl.M13] * v[webgl.M32];\r\n t[webgl.M13] = m[webgl.M10] * v[webgl.M03] + m[webgl.M11] * v[webgl.M13] + m[webgl.M12] * v[webgl.M23] + m[webgl.M13] * v[webgl.M33];\r\n t[webgl.M20] = m[webgl.M20] * v[webgl.M00] + m[webgl.M21] * v[webgl.M10] + m[webgl.M22] * v[webgl.M20] + m[webgl.M23] * v[webgl.M30];\r\n t[webgl.M21] = m[webgl.M20] * v[webgl.M01] + m[webgl.M21] * v[webgl.M11] + m[webgl.M22] * v[webgl.M21] + m[webgl.M23] * v[webgl.M31];\r\n t[webgl.M22] = m[webgl.M20] * v[webgl.M02] + m[webgl.M21] * v[webgl.M12] + m[webgl.M22] * v[webgl.M22] + m[webgl.M23] * v[webgl.M32];\r\n t[webgl.M23] = m[webgl.M20] * v[webgl.M03] + m[webgl.M21] * v[webgl.M13] + m[webgl.M22] * v[webgl.M23] + m[webgl.M23] * v[webgl.M33];\r\n t[webgl.M30] = m[webgl.M30] * v[webgl.M00] + m[webgl.M31] * v[webgl.M10] + m[webgl.M32] * v[webgl.M20] + m[webgl.M33] * v[webgl.M30];\r\n t[webgl.M31] = m[webgl.M30] * v[webgl.M01] + m[webgl.M31] * v[webgl.M11] + m[webgl.M32] * v[webgl.M21] + m[webgl.M33] * v[webgl.M31];\r\n t[webgl.M32] = m[webgl.M30] * v[webgl.M02] + m[webgl.M31] * v[webgl.M12] + m[webgl.M32] * v[webgl.M22] + m[webgl.M33] * v[webgl.M32];\r\n t[webgl.M33] = m[webgl.M30] * v[webgl.M03] + m[webgl.M31] * v[webgl.M13] + m[webgl.M32] * v[webgl.M23] + m[webgl.M33] * v[webgl.M33];\r\n return this.set(this.temp);\r\n };\r\n Matrix4.prototype.lookAt = function (position, direction, up) {\r\n Matrix4.initTemps();\r\n var xAxis = Matrix4.xAxis, yAxis = Matrix4.yAxis, zAxis = Matrix4.zAxis;\r\n zAxis.setFrom(direction).normalize();\r\n xAxis.setFrom(direction).normalize();\r\n xAxis.cross(up).normalize();\r\n yAxis.setFrom(xAxis).cross(zAxis).normalize();\r\n this.identity();\r\n var val = this.values;\r\n val[webgl.M00] = xAxis.x;\r\n val[webgl.M01] = xAxis.y;\r\n val[webgl.M02] = xAxis.z;\r\n val[webgl.M10] = yAxis.x;\r\n val[webgl.M11] = yAxis.y;\r\n val[webgl.M12] = yAxis.z;\r\n val[webgl.M20] = -zAxis.x;\r\n val[webgl.M21] = -zAxis.y;\r\n val[webgl.M22] = -zAxis.z;\r\n Matrix4.tmpMatrix.identity();\r\n Matrix4.tmpMatrix.values[webgl.M03] = -position.x;\r\n Matrix4.tmpMatrix.values[webgl.M13] = -position.y;\r\n Matrix4.tmpMatrix.values[webgl.M23] = -position.z;\r\n this.multiply(Matrix4.tmpMatrix);\r\n return this;\r\n };\r\n Matrix4.initTemps = function () {\r\n if (Matrix4.xAxis === null)\r\n Matrix4.xAxis = new webgl.Vector3();\r\n if (Matrix4.yAxis === null)\r\n Matrix4.yAxis = new webgl.Vector3();\r\n if (Matrix4.zAxis === null)\r\n Matrix4.zAxis = new webgl.Vector3();\r\n };\r\n Matrix4.xAxis = null;\r\n Matrix4.yAxis = null;\r\n Matrix4.zAxis = null;\r\n Matrix4.tmpMatrix = new Matrix4();\r\n return Matrix4;\r\n }());\r\n webgl.Matrix4 = Matrix4;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Mesh = (function () {\r\n function Mesh(context, attributes, maxVertices, maxIndices) {\r\n this.attributes = attributes;\r\n this.verticesLength = 0;\r\n this.dirtyVertices = false;\r\n this.indicesLength = 0;\r\n this.dirtyIndices = false;\r\n this.elementsPerVertex = 0;\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.elementsPerVertex = 0;\r\n for (var i = 0; i < attributes.length; i++) {\r\n this.elementsPerVertex += attributes[i].numElements;\r\n }\r\n this.vertices = new Float32Array(maxVertices * this.elementsPerVertex);\r\n this.indices = new Uint16Array(maxIndices);\r\n this.context.addRestorable(this);\r\n }\r\n Mesh.prototype.getAttributes = function () { return this.attributes; };\r\n Mesh.prototype.maxVertices = function () { return this.vertices.length / this.elementsPerVertex; };\r\n Mesh.prototype.numVertices = function () { return this.verticesLength / this.elementsPerVertex; };\r\n Mesh.prototype.setVerticesLength = function (length) {\r\n this.dirtyVertices = true;\r\n this.verticesLength = length;\r\n };\r\n Mesh.prototype.getVertices = function () { return this.vertices; };\r\n Mesh.prototype.maxIndices = function () { return this.indices.length; };\r\n Mesh.prototype.numIndices = function () { return this.indicesLength; };\r\n Mesh.prototype.setIndicesLength = function (length) {\r\n this.dirtyIndices = true;\r\n this.indicesLength = length;\r\n };\r\n Mesh.prototype.getIndices = function () { return this.indices; };\r\n ;\r\n Mesh.prototype.getVertexSizeInFloats = function () {\r\n var size = 0;\r\n for (var i = 0; i < this.attributes.length; i++) {\r\n var attribute = this.attributes[i];\r\n size += attribute.numElements;\r\n }\r\n return size;\r\n };\r\n Mesh.prototype.setVertices = function (vertices) {\r\n this.dirtyVertices = true;\r\n if (vertices.length > this.vertices.length)\r\n throw Error(\"Mesh can't store more than \" + this.maxVertices() + \" vertices\");\r\n this.vertices.set(vertices, 0);\r\n this.verticesLength = vertices.length;\r\n };\r\n Mesh.prototype.setIndices = function (indices) {\r\n this.dirtyIndices = true;\r\n if (indices.length > this.indices.length)\r\n throw Error(\"Mesh can't store more than \" + this.maxIndices() + \" indices\");\r\n this.indices.set(indices, 0);\r\n this.indicesLength = indices.length;\r\n };\r\n Mesh.prototype.draw = function (shader, primitiveType) {\r\n this.drawWithOffset(shader, primitiveType, 0, this.indicesLength > 0 ? this.indicesLength : this.verticesLength / this.elementsPerVertex);\r\n };\r\n Mesh.prototype.drawWithOffset = function (shader, primitiveType, offset, count) {\r\n var gl = this.context.gl;\r\n if (this.dirtyVertices || this.dirtyIndices)\r\n this.update();\r\n this.bind(shader);\r\n if (this.indicesLength > 0) {\r\n gl.drawElements(primitiveType, count, gl.UNSIGNED_SHORT, offset * 2);\r\n }\r\n else {\r\n gl.drawArrays(primitiveType, offset, count);\r\n }\r\n this.unbind(shader);\r\n };\r\n Mesh.prototype.bind = function (shader) {\r\n var gl = this.context.gl;\r\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\r\n var offset = 0;\r\n for (var i = 0; i < this.attributes.length; i++) {\r\n var attrib = this.attributes[i];\r\n var location_1 = shader.getAttributeLocation(attrib.name);\r\n gl.enableVertexAttribArray(location_1);\r\n gl.vertexAttribPointer(location_1, attrib.numElements, gl.FLOAT, false, this.elementsPerVertex * 4, offset * 4);\r\n offset += attrib.numElements;\r\n }\r\n if (this.indicesLength > 0)\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\r\n };\r\n Mesh.prototype.unbind = function (shader) {\r\n var gl = this.context.gl;\r\n for (var i = 0; i < this.attributes.length; i++) {\r\n var attrib = this.attributes[i];\r\n var location_2 = shader.getAttributeLocation(attrib.name);\r\n gl.disableVertexAttribArray(location_2);\r\n }\r\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\r\n if (this.indicesLength > 0)\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);\r\n };\r\n Mesh.prototype.update = function () {\r\n var gl = this.context.gl;\r\n if (this.dirtyVertices) {\r\n if (!this.verticesBuffer) {\r\n this.verticesBuffer = gl.createBuffer();\r\n }\r\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\r\n gl.bufferData(gl.ARRAY_BUFFER, this.vertices.subarray(0, this.verticesLength), gl.DYNAMIC_DRAW);\r\n this.dirtyVertices = false;\r\n }\r\n if (this.dirtyIndices) {\r\n if (!this.indicesBuffer) {\r\n this.indicesBuffer = gl.createBuffer();\r\n }\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\r\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, this.indices.subarray(0, this.indicesLength), gl.DYNAMIC_DRAW);\r\n this.dirtyIndices = false;\r\n }\r\n };\r\n Mesh.prototype.restore = function () {\r\n this.verticesBuffer = null;\r\n this.indicesBuffer = null;\r\n this.update();\r\n };\r\n Mesh.prototype.dispose = function () {\r\n this.context.removeRestorable(this);\r\n var gl = this.context.gl;\r\n gl.deleteBuffer(this.verticesBuffer);\r\n gl.deleteBuffer(this.indicesBuffer);\r\n };\r\n return Mesh;\r\n }());\r\n webgl.Mesh = Mesh;\r\n var VertexAttribute = (function () {\r\n function VertexAttribute(name, type, numElements) {\r\n this.name = name;\r\n this.type = type;\r\n this.numElements = numElements;\r\n }\r\n return VertexAttribute;\r\n }());\r\n webgl.VertexAttribute = VertexAttribute;\r\n var Position2Attribute = (function (_super) {\r\n __extends(Position2Attribute, _super);\r\n function Position2Attribute() {\r\n return _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 2) || this;\r\n }\r\n return Position2Attribute;\r\n }(VertexAttribute));\r\n webgl.Position2Attribute = Position2Attribute;\r\n var Position3Attribute = (function (_super) {\r\n __extends(Position3Attribute, _super);\r\n function Position3Attribute() {\r\n return _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 3) || this;\r\n }\r\n return Position3Attribute;\r\n }(VertexAttribute));\r\n webgl.Position3Attribute = Position3Attribute;\r\n var TexCoordAttribute = (function (_super) {\r\n __extends(TexCoordAttribute, _super);\r\n function TexCoordAttribute(unit) {\r\n if (unit === void 0) { unit = 0; }\r\n return _super.call(this, webgl.Shader.TEXCOORDS + (unit == 0 ? \"\" : unit), VertexAttributeType.Float, 2) || this;\r\n }\r\n return TexCoordAttribute;\r\n }(VertexAttribute));\r\n webgl.TexCoordAttribute = TexCoordAttribute;\r\n var ColorAttribute = (function (_super) {\r\n __extends(ColorAttribute, _super);\r\n function ColorAttribute() {\r\n return _super.call(this, webgl.Shader.COLOR, VertexAttributeType.Float, 4) || this;\r\n }\r\n return ColorAttribute;\r\n }(VertexAttribute));\r\n webgl.ColorAttribute = ColorAttribute;\r\n var Color2Attribute = (function (_super) {\r\n __extends(Color2Attribute, _super);\r\n function Color2Attribute() {\r\n return _super.call(this, webgl.Shader.COLOR2, VertexAttributeType.Float, 4) || this;\r\n }\r\n return Color2Attribute;\r\n }(VertexAttribute));\r\n webgl.Color2Attribute = Color2Attribute;\r\n var VertexAttributeType;\r\n (function (VertexAttributeType) {\r\n VertexAttributeType[VertexAttributeType[\"Float\"] = 0] = \"Float\";\r\n })(VertexAttributeType = webgl.VertexAttributeType || (webgl.VertexAttributeType = {}));\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var PolygonBatcher = (function () {\r\n function PolygonBatcher(context, twoColorTint, maxVertices) {\r\n if (twoColorTint === void 0) { twoColorTint = true; }\r\n if (maxVertices === void 0) { maxVertices = 10920; }\r\n this.isDrawing = false;\r\n this.shader = null;\r\n this.lastTexture = null;\r\n this.verticesLength = 0;\r\n this.indicesLength = 0;\r\n if (maxVertices > 10920)\r\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n var attributes = twoColorTint ?\r\n [new webgl.Position2Attribute(), new webgl.ColorAttribute(), new webgl.TexCoordAttribute(), new webgl.Color2Attribute()] :\r\n [new webgl.Position2Attribute(), new webgl.ColorAttribute(), new webgl.TexCoordAttribute()];\r\n this.mesh = new webgl.Mesh(context, attributes, maxVertices, maxVertices * 3);\r\n this.srcBlend = this.context.gl.SRC_ALPHA;\r\n this.dstBlend = this.context.gl.ONE_MINUS_SRC_ALPHA;\r\n }\r\n PolygonBatcher.prototype.begin = function (shader) {\r\n var gl = this.context.gl;\r\n if (this.isDrawing)\r\n throw new Error(\"PolygonBatch is already drawing. Call PolygonBatch.end() before calling PolygonBatch.begin()\");\r\n this.drawCalls = 0;\r\n this.shader = shader;\r\n this.lastTexture = null;\r\n this.isDrawing = true;\r\n gl.enable(gl.BLEND);\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n };\r\n PolygonBatcher.prototype.setBlendMode = function (srcBlend, dstBlend) {\r\n var gl = this.context.gl;\r\n this.srcBlend = srcBlend;\r\n this.dstBlend = dstBlend;\r\n if (this.isDrawing) {\r\n this.flush();\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n }\r\n };\r\n PolygonBatcher.prototype.draw = function (texture, vertices, indices) {\r\n if (texture != this.lastTexture) {\r\n this.flush();\r\n this.lastTexture = texture;\r\n }\r\n else if (this.verticesLength + vertices.length > this.mesh.getVertices().length ||\r\n this.indicesLength + indices.length > this.mesh.getIndices().length) {\r\n this.flush();\r\n }\r\n var indexStart = this.mesh.numVertices();\r\n this.mesh.getVertices().set(vertices, this.verticesLength);\r\n this.verticesLength += vertices.length;\r\n this.mesh.setVerticesLength(this.verticesLength);\r\n var indicesArray = this.mesh.getIndices();\r\n for (var i = this.indicesLength, j = 0; j < indices.length; i++, j++)\r\n indicesArray[i] = indices[j] + indexStart;\r\n this.indicesLength += indices.length;\r\n this.mesh.setIndicesLength(this.indicesLength);\r\n };\r\n PolygonBatcher.prototype.flush = function () {\r\n var gl = this.context.gl;\r\n if (this.verticesLength == 0)\r\n return;\r\n this.lastTexture.bind();\r\n this.mesh.draw(this.shader, gl.TRIANGLES);\r\n this.verticesLength = 0;\r\n this.indicesLength = 0;\r\n this.mesh.setVerticesLength(0);\r\n this.mesh.setIndicesLength(0);\r\n this.drawCalls++;\r\n };\r\n PolygonBatcher.prototype.end = function () {\r\n var gl = this.context.gl;\r\n if (!this.isDrawing)\r\n throw new Error(\"PolygonBatch is not drawing. Call PolygonBatch.begin() before calling PolygonBatch.end()\");\r\n if (this.verticesLength > 0 || this.indicesLength > 0)\r\n this.flush();\r\n this.shader = null;\r\n this.lastTexture = null;\r\n this.isDrawing = false;\r\n gl.disable(gl.BLEND);\r\n };\r\n PolygonBatcher.prototype.getDrawCalls = function () { return this.drawCalls; };\r\n PolygonBatcher.prototype.dispose = function () {\r\n this.mesh.dispose();\r\n };\r\n return PolygonBatcher;\r\n }());\r\n webgl.PolygonBatcher = PolygonBatcher;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var SceneRenderer = (function () {\r\n function SceneRenderer(canvas, context, twoColorTint) {\r\n if (twoColorTint === void 0) { twoColorTint = true; }\r\n this.twoColorTint = false;\r\n this.activeRenderer = null;\r\n this.QUAD = [\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n 0, 0, 1, 1, 1, 1, 0, 0,\r\n ];\r\n this.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n this.WHITE = new spine.Color(1, 1, 1, 1);\r\n this.canvas = canvas;\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.twoColorTint = twoColorTint;\r\n this.camera = new webgl.OrthoCamera(canvas.width, canvas.height);\r\n this.batcherShader = twoColorTint ? webgl.Shader.newTwoColoredTextured(this.context) : webgl.Shader.newColoredTextured(this.context);\r\n this.batcher = new webgl.PolygonBatcher(this.context, twoColorTint);\r\n this.shapesShader = webgl.Shader.newColored(this.context);\r\n this.shapes = new webgl.ShapeRenderer(this.context);\r\n this.skeletonRenderer = new webgl.SkeletonRenderer(this.context, twoColorTint);\r\n this.skeletonDebugRenderer = new webgl.SkeletonDebugRenderer(this.context);\r\n }\r\n SceneRenderer.prototype.begin = function () {\r\n this.camera.update();\r\n this.enableRenderer(this.batcher);\r\n };\r\n SceneRenderer.prototype.drawSkeleton = function (skeleton, premultipliedAlpha, slotRangeStart, slotRangeEnd) {\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n if (slotRangeStart === void 0) { slotRangeStart = -1; }\r\n if (slotRangeEnd === void 0) { slotRangeEnd = -1; }\r\n this.enableRenderer(this.batcher);\r\n this.skeletonRenderer.premultipliedAlpha = premultipliedAlpha;\r\n this.skeletonRenderer.draw(this.batcher, skeleton, slotRangeStart, slotRangeEnd);\r\n };\r\n SceneRenderer.prototype.drawSkeletonDebug = function (skeleton, premultipliedAlpha, ignoredBones) {\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n if (ignoredBones === void 0) { ignoredBones = null; }\r\n this.enableRenderer(this.shapes);\r\n this.skeletonDebugRenderer.premultipliedAlpha = premultipliedAlpha;\r\n this.skeletonDebugRenderer.draw(this.shapes, skeleton, ignoredBones);\r\n };\r\n SceneRenderer.prototype.drawTexture = function (texture, x, y, width, height, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.drawTextureUV = function (texture, x, y, width, height, u, v, u2, v2, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u;\r\n quad[i++] = v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u2;\r\n quad[i++] = v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u2;\r\n quad[i++] = v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = u;\r\n quad[i++] = v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.drawTextureRotated = function (texture, x, y, width, height, pivotX, pivotY, angle, color, premultipliedAlpha) {\r\n if (color === void 0) { color = null; }\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var worldOriginX = x + pivotX;\r\n var worldOriginY = y + pivotY;\r\n var fx = -pivotX;\r\n var fy = -pivotY;\r\n var fx2 = width - pivotX;\r\n var fy2 = height - pivotY;\r\n var p1x = fx;\r\n var p1y = fy;\r\n var p2x = fx;\r\n var p2y = fy2;\r\n var p3x = fx2;\r\n var p3y = fy2;\r\n var p4x = fx2;\r\n var p4y = fy;\r\n var x1 = 0;\r\n var y1 = 0;\r\n var x2 = 0;\r\n var y2 = 0;\r\n var x3 = 0;\r\n var y3 = 0;\r\n var x4 = 0;\r\n var y4 = 0;\r\n if (angle != 0) {\r\n var cos = spine.MathUtils.cosDeg(angle);\r\n var sin = spine.MathUtils.sinDeg(angle);\r\n x1 = cos * p1x - sin * p1y;\r\n y1 = sin * p1x + cos * p1y;\r\n x4 = cos * p2x - sin * p2y;\r\n y4 = sin * p2x + cos * p2y;\r\n x3 = cos * p3x - sin * p3y;\r\n y3 = sin * p3x + cos * p3y;\r\n x2 = x3 + (x1 - x4);\r\n y2 = y3 + (y1 - y4);\r\n }\r\n else {\r\n x1 = p1x;\r\n y1 = p1y;\r\n x4 = p2x;\r\n y4 = p2y;\r\n x3 = p3x;\r\n y3 = p3y;\r\n x2 = p4x;\r\n y2 = p4y;\r\n }\r\n x1 += worldOriginX;\r\n y1 += worldOriginY;\r\n x2 += worldOriginX;\r\n y2 += worldOriginY;\r\n x3 += worldOriginX;\r\n y3 += worldOriginY;\r\n x4 += worldOriginX;\r\n y4 += worldOriginY;\r\n var i = 0;\r\n quad[i++] = x1;\r\n quad[i++] = y1;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x2;\r\n quad[i++] = y2;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 1;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x3;\r\n quad[i++] = y3;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 1;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x4;\r\n quad[i++] = y4;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.drawRegion = function (region, x, y, width, height, color, premultipliedAlpha) {\r\n if (color === void 0) { color = null; }\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n this.enableRenderer(this.batcher);\r\n if (color === null)\r\n color = this.WHITE;\r\n var quad = this.QUAD;\r\n var i = 0;\r\n quad[i++] = x;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u;\r\n quad[i++] = region.v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u2;\r\n quad[i++] = region.v2;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x + width;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u2;\r\n quad[i++] = region.v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n quad[i++] = x;\r\n quad[i++] = y + height;\r\n quad[i++] = color.r;\r\n quad[i++] = color.g;\r\n quad[i++] = color.b;\r\n quad[i++] = color.a;\r\n quad[i++] = region.u;\r\n quad[i++] = region.v;\r\n if (this.twoColorTint) {\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n quad[i++] = 0;\r\n }\r\n this.batcher.draw(region.texture, quad, this.QUAD_TRIANGLES);\r\n };\r\n SceneRenderer.prototype.line = function (x, y, x2, y2, color, color2) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.line(x, y, x2, y2, color);\r\n };\r\n SceneRenderer.prototype.triangle = function (filled, x, y, x2, y2, x3, y3, color, color2, color3) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.triangle(filled, x, y, x2, y2, x3, y3, color, color2, color3);\r\n };\r\n SceneRenderer.prototype.quad = function (filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n if (color4 === void 0) { color4 = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.quad(filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4);\r\n };\r\n SceneRenderer.prototype.rect = function (filled, x, y, width, height, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.rect(filled, x, y, width, height, color);\r\n };\r\n SceneRenderer.prototype.rectLine = function (filled, x1, y1, x2, y2, width, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.rectLine(filled, x1, y1, x2, y2, width, color);\r\n };\r\n SceneRenderer.prototype.polygon = function (polygonVertices, offset, count, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.polygon(polygonVertices, offset, count, color);\r\n };\r\n SceneRenderer.prototype.circle = function (filled, x, y, radius, color, segments) {\r\n if (color === void 0) { color = null; }\r\n if (segments === void 0) { segments = 0; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.circle(filled, x, y, radius, color, segments);\r\n };\r\n SceneRenderer.prototype.curve = function (x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\r\n if (color === void 0) { color = null; }\r\n this.enableRenderer(this.shapes);\r\n this.shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color);\r\n };\r\n SceneRenderer.prototype.end = function () {\r\n if (this.activeRenderer === this.batcher)\r\n this.batcher.end();\r\n else if (this.activeRenderer === this.shapes)\r\n this.shapes.end();\r\n this.activeRenderer = null;\r\n };\r\n SceneRenderer.prototype.resize = function (resizeMode) {\r\n var canvas = this.canvas;\r\n var w = canvas.clientWidth;\r\n var h = canvas.clientHeight;\r\n if (canvas.width != w || canvas.height != h) {\r\n canvas.width = w;\r\n canvas.height = h;\r\n }\r\n this.context.gl.viewport(0, 0, canvas.width, canvas.height);\r\n if (resizeMode === ResizeMode.Stretch) {\r\n }\r\n else if (resizeMode === ResizeMode.Expand) {\r\n this.camera.setViewport(w, h);\r\n }\r\n else if (resizeMode === ResizeMode.Fit) {\r\n var sourceWidth = canvas.width, sourceHeight = canvas.height;\r\n var targetWidth = this.camera.viewportWidth, targetHeight = this.camera.viewportHeight;\r\n var targetRatio = targetHeight / targetWidth;\r\n var sourceRatio = sourceHeight / sourceWidth;\r\n var scale = targetRatio < sourceRatio ? targetWidth / sourceWidth : targetHeight / sourceHeight;\r\n this.camera.viewportWidth = sourceWidth * scale;\r\n this.camera.viewportHeight = sourceHeight * scale;\r\n }\r\n this.camera.update();\r\n };\r\n SceneRenderer.prototype.enableRenderer = function (renderer) {\r\n if (this.activeRenderer === renderer)\r\n return;\r\n this.end();\r\n if (renderer instanceof webgl.PolygonBatcher) {\r\n this.batcherShader.bind();\r\n this.batcherShader.setUniform4x4f(webgl.Shader.MVP_MATRIX, this.camera.projectionView.values);\r\n this.batcherShader.setUniformi(\"u_texture\", 0);\r\n this.batcher.begin(this.batcherShader);\r\n this.activeRenderer = this.batcher;\r\n }\r\n else if (renderer instanceof webgl.ShapeRenderer) {\r\n this.shapesShader.bind();\r\n this.shapesShader.setUniform4x4f(webgl.Shader.MVP_MATRIX, this.camera.projectionView.values);\r\n this.shapes.begin(this.shapesShader);\r\n this.activeRenderer = this.shapes;\r\n }\r\n else {\r\n this.activeRenderer = this.skeletonDebugRenderer;\r\n }\r\n };\r\n SceneRenderer.prototype.dispose = function () {\r\n this.batcher.dispose();\r\n this.batcherShader.dispose();\r\n this.shapes.dispose();\r\n this.shapesShader.dispose();\r\n this.skeletonDebugRenderer.dispose();\r\n };\r\n return SceneRenderer;\r\n }());\r\n webgl.SceneRenderer = SceneRenderer;\r\n var ResizeMode;\r\n (function (ResizeMode) {\r\n ResizeMode[ResizeMode[\"Stretch\"] = 0] = \"Stretch\";\r\n ResizeMode[ResizeMode[\"Expand\"] = 1] = \"Expand\";\r\n ResizeMode[ResizeMode[\"Fit\"] = 2] = \"Fit\";\r\n })(ResizeMode = webgl.ResizeMode || (webgl.ResizeMode = {}));\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Shader = (function () {\r\n function Shader(context, vertexShader, fragmentShader) {\r\n this.vertexShader = vertexShader;\r\n this.fragmentShader = fragmentShader;\r\n this.vs = null;\r\n this.fs = null;\r\n this.program = null;\r\n this.tmp2x2 = new Float32Array(2 * 2);\r\n this.tmp3x3 = new Float32Array(3 * 3);\r\n this.tmp4x4 = new Float32Array(4 * 4);\r\n this.vsSource = vertexShader;\r\n this.fsSource = fragmentShader;\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.context.addRestorable(this);\r\n this.compile();\r\n }\r\n Shader.prototype.getProgram = function () { return this.program; };\r\n Shader.prototype.getVertexShader = function () { return this.vertexShader; };\r\n Shader.prototype.getFragmentShader = function () { return this.fragmentShader; };\r\n Shader.prototype.getVertexShaderSource = function () { return this.vsSource; };\r\n Shader.prototype.getFragmentSource = function () { return this.fsSource; };\r\n Shader.prototype.compile = function () {\r\n var gl = this.context.gl;\r\n try {\r\n this.vs = this.compileShader(gl.VERTEX_SHADER, this.vertexShader);\r\n this.fs = this.compileShader(gl.FRAGMENT_SHADER, this.fragmentShader);\r\n this.program = this.compileProgram(this.vs, this.fs);\r\n }\r\n catch (e) {\r\n this.dispose();\r\n throw e;\r\n }\r\n };\r\n Shader.prototype.compileShader = function (type, source) {\r\n var gl = this.context.gl;\r\n var shader = gl.createShader(type);\r\n gl.shaderSource(shader, source);\r\n gl.compileShader(shader);\r\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\r\n var error = \"Couldn't compile shader: \" + gl.getShaderInfoLog(shader);\r\n gl.deleteShader(shader);\r\n if (!gl.isContextLost())\r\n throw new Error(error);\r\n }\r\n return shader;\r\n };\r\n Shader.prototype.compileProgram = function (vs, fs) {\r\n var gl = this.context.gl;\r\n var program = gl.createProgram();\r\n gl.attachShader(program, vs);\r\n gl.attachShader(program, fs);\r\n gl.linkProgram(program);\r\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\r\n var error = \"Couldn't compile shader program: \" + gl.getProgramInfoLog(program);\r\n gl.deleteProgram(program);\r\n if (!gl.isContextLost())\r\n throw new Error(error);\r\n }\r\n return program;\r\n };\r\n Shader.prototype.restore = function () {\r\n this.compile();\r\n };\r\n Shader.prototype.bind = function () {\r\n this.context.gl.useProgram(this.program);\r\n };\r\n Shader.prototype.unbind = function () {\r\n this.context.gl.useProgram(null);\r\n };\r\n Shader.prototype.setUniformi = function (uniform, value) {\r\n this.context.gl.uniform1i(this.getUniformLocation(uniform), value);\r\n };\r\n Shader.prototype.setUniformf = function (uniform, value) {\r\n this.context.gl.uniform1f(this.getUniformLocation(uniform), value);\r\n };\r\n Shader.prototype.setUniform2f = function (uniform, value, value2) {\r\n this.context.gl.uniform2f(this.getUniformLocation(uniform), value, value2);\r\n };\r\n Shader.prototype.setUniform3f = function (uniform, value, value2, value3) {\r\n this.context.gl.uniform3f(this.getUniformLocation(uniform), value, value2, value3);\r\n };\r\n Shader.prototype.setUniform4f = function (uniform, value, value2, value3, value4) {\r\n this.context.gl.uniform4f(this.getUniformLocation(uniform), value, value2, value3, value4);\r\n };\r\n Shader.prototype.setUniform2x2f = function (uniform, value) {\r\n var gl = this.context.gl;\r\n this.tmp2x2.set(value);\r\n gl.uniformMatrix2fv(this.getUniformLocation(uniform), false, this.tmp2x2);\r\n };\r\n Shader.prototype.setUniform3x3f = function (uniform, value) {\r\n var gl = this.context.gl;\r\n this.tmp3x3.set(value);\r\n gl.uniformMatrix3fv(this.getUniformLocation(uniform), false, this.tmp3x3);\r\n };\r\n Shader.prototype.setUniform4x4f = function (uniform, value) {\r\n var gl = this.context.gl;\r\n this.tmp4x4.set(value);\r\n gl.uniformMatrix4fv(this.getUniformLocation(uniform), false, this.tmp4x4);\r\n };\r\n Shader.prototype.getUniformLocation = function (uniform) {\r\n var gl = this.context.gl;\r\n var location = gl.getUniformLocation(this.program, uniform);\r\n if (!location && !gl.isContextLost())\r\n throw new Error(\"Couldn't find location for uniform \" + uniform);\r\n return location;\r\n };\r\n Shader.prototype.getAttributeLocation = function (attribute) {\r\n var gl = this.context.gl;\r\n var location = gl.getAttribLocation(this.program, attribute);\r\n if (location == -1 && !gl.isContextLost())\r\n throw new Error(\"Couldn't find location for attribute \" + attribute);\r\n return location;\r\n };\r\n Shader.prototype.dispose = function () {\r\n this.context.removeRestorable(this);\r\n var gl = this.context.gl;\r\n if (this.vs) {\r\n gl.deleteShader(this.vs);\r\n this.vs = null;\r\n }\r\n if (this.fs) {\r\n gl.deleteShader(this.fs);\r\n this.fs = null;\r\n }\r\n if (this.program) {\r\n gl.deleteProgram(this.program);\r\n this.program = null;\r\n }\r\n };\r\n Shader.newColoredTextured = function (context) {\r\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \" + Shader.POSITION + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR + \";\\n\\t\\t\\t\\tattribute vec2 \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\tuniform mat4 \" + Shader.MVP_MATRIX + \";\\n\\t\\t\\t\\tvarying vec4 v_color;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_color = \" + Shader.COLOR + \";\\n\\t\\t\\t\\t\\tv_texCoords = \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\t\\tgl_Position = \" + Shader.MVP_MATRIX + \" * \" + Shader.POSITION + \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_color;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\t\\t\\t\\tuniform sampler2D u_texture;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tgl_FragColor = v_color * texture2D(u_texture, v_texCoords);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n return new Shader(context, vs, fs);\r\n };\r\n Shader.newTwoColoredTextured = function (context) {\r\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \" + Shader.POSITION + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR2 + \";\\n\\t\\t\\t\\tattribute vec2 \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\tuniform mat4 \" + Shader.MVP_MATRIX + \";\\n\\t\\t\\t\\tvarying vec4 v_light;\\n\\t\\t\\t\\tvarying vec4 v_dark;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_light = \" + Shader.COLOR + \";\\n\\t\\t\\t\\t\\tv_dark = \" + Shader.COLOR2 + \";\\n\\t\\t\\t\\t\\tv_texCoords = \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\t\\tgl_Position = \" + Shader.MVP_MATRIX + \" * \" + Shader.POSITION + \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_light;\\n\\t\\t\\t\\tvarying LOWP vec4 v_dark;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\t\\t\\t\\tuniform sampler2D u_texture;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tvec4 texColor = texture2D(u_texture, v_texCoords);\\n\\t\\t\\t\\t\\tgl_FragColor.a = texColor.a * v_light.a;\\n\\t\\t\\t\\t\\tgl_FragColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n return new Shader(context, vs, fs);\r\n };\r\n Shader.newColored = function (context) {\r\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \" + Shader.POSITION + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR + \";\\n\\t\\t\\t\\tuniform mat4 \" + Shader.MVP_MATRIX + \";\\n\\t\\t\\t\\tvarying vec4 v_color;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_color = \" + Shader.COLOR + \";\\n\\t\\t\\t\\t\\tgl_Position = \" + Shader.MVP_MATRIX + \" * \" + Shader.POSITION + \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_color;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tgl_FragColor = v_color;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\r\n return new Shader(context, vs, fs);\r\n };\r\n Shader.MVP_MATRIX = \"u_projTrans\";\r\n Shader.POSITION = \"a_position\";\r\n Shader.COLOR = \"a_color\";\r\n Shader.COLOR2 = \"a_color2\";\r\n Shader.TEXCOORDS = \"a_texCoords\";\r\n Shader.SAMPLER = \"u_texture\";\r\n return Shader;\r\n }());\r\n webgl.Shader = Shader;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var ShapeRenderer = (function () {\r\n function ShapeRenderer(context, maxVertices) {\r\n if (maxVertices === void 0) { maxVertices = 10920; }\r\n this.isDrawing = false;\r\n this.shapeType = ShapeType.Filled;\r\n this.color = new spine.Color(1, 1, 1, 1);\r\n this.vertexIndex = 0;\r\n this.tmp = new spine.Vector2();\r\n if (maxVertices > 10920)\r\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n this.mesh = new webgl.Mesh(context, [new webgl.Position2Attribute(), new webgl.ColorAttribute()], maxVertices, 0);\r\n this.srcBlend = this.context.gl.SRC_ALPHA;\r\n this.dstBlend = this.context.gl.ONE_MINUS_SRC_ALPHA;\r\n }\r\n ShapeRenderer.prototype.begin = function (shader) {\r\n if (this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has already been called\");\r\n this.shader = shader;\r\n this.vertexIndex = 0;\r\n this.isDrawing = true;\r\n var gl = this.context.gl;\r\n gl.enable(gl.BLEND);\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n };\r\n ShapeRenderer.prototype.setBlendMode = function (srcBlend, dstBlend) {\r\n var gl = this.context.gl;\r\n this.srcBlend = srcBlend;\r\n this.dstBlend = dstBlend;\r\n if (this.isDrawing) {\r\n this.flush();\r\n gl.blendFunc(this.srcBlend, this.dstBlend);\r\n }\r\n };\r\n ShapeRenderer.prototype.setColor = function (color) {\r\n this.color.setFromColor(color);\r\n };\r\n ShapeRenderer.prototype.setColorWith = function (r, g, b, a) {\r\n this.color.set(r, g, b, a);\r\n };\r\n ShapeRenderer.prototype.point = function (x, y, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(ShapeType.Point, 1);\r\n if (color === null)\r\n color = this.color;\r\n this.vertex(x, y, color);\r\n };\r\n ShapeRenderer.prototype.line = function (x, y, x2, y2, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(ShapeType.Line, 2);\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n if (color === null)\r\n color = this.color;\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color);\r\n };\r\n ShapeRenderer.prototype.triangle = function (filled, x, y, x2, y2, x3, y3, color, color2, color3) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n if (color === null)\r\n color = this.color;\r\n if (color2 === null)\r\n color2 = this.color;\r\n if (color3 === null)\r\n color3 = this.color;\r\n if (filled) {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n }\r\n else {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x2, y2, color);\r\n this.vertex(x3, y3, color2);\r\n this.vertex(x3, y3, color);\r\n this.vertex(x, y, color2);\r\n }\r\n };\r\n ShapeRenderer.prototype.quad = function (filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\r\n if (color === void 0) { color = null; }\r\n if (color2 === void 0) { color2 = null; }\r\n if (color3 === void 0) { color3 = null; }\r\n if (color4 === void 0) { color4 = null; }\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n if (color === null)\r\n color = this.color;\r\n if (color2 === null)\r\n color2 = this.color;\r\n if (color3 === null)\r\n color3 = this.color;\r\n if (color4 === null)\r\n color4 = this.color;\r\n if (filled) {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x, y, color);\r\n }\r\n else {\r\n this.vertex(x, y, color);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x2, y2, color2);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x3, y3, color3);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x4, y4, color4);\r\n this.vertex(x, y, color);\r\n }\r\n };\r\n ShapeRenderer.prototype.rect = function (filled, x, y, width, height, color) {\r\n if (color === void 0) { color = null; }\r\n this.quad(filled, x, y, x + width, y, x + width, y + height, x, y + height, color, color, color, color);\r\n };\r\n ShapeRenderer.prototype.rectLine = function (filled, x1, y1, x2, y2, width, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 8);\r\n if (color === null)\r\n color = this.color;\r\n var t = this.tmp.set(y2 - y1, x1 - x2);\r\n t.normalize();\r\n width *= 0.5;\r\n var tx = t.x * width;\r\n var ty = t.y * width;\r\n if (!filled) {\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n }\r\n else {\r\n this.vertex(x1 + tx, y1 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x2 - tx, y2 - ty, color);\r\n this.vertex(x2 + tx, y2 + ty, color);\r\n this.vertex(x1 - tx, y1 - ty, color);\r\n }\r\n };\r\n ShapeRenderer.prototype.x = function (x, y, size) {\r\n this.line(x - size, y - size, x + size, y + size);\r\n this.line(x - size, y + size, x + size, y - size);\r\n };\r\n ShapeRenderer.prototype.polygon = function (polygonVertices, offset, count, color) {\r\n if (color === void 0) { color = null; }\r\n if (count < 3)\r\n throw new Error(\"Polygon must contain at least 3 vertices\");\r\n this.check(ShapeType.Line, count * 2);\r\n if (color === null)\r\n color = this.color;\r\n var vertices = this.mesh.getVertices();\r\n var idx = this.vertexIndex;\r\n offset <<= 1;\r\n count <<= 1;\r\n var firstX = polygonVertices[offset];\r\n var firstY = polygonVertices[offset + 1];\r\n var last = offset + count;\r\n for (var i = offset, n = offset + count - 2; i < n; i += 2) {\r\n var x1 = polygonVertices[i];\r\n var y1 = polygonVertices[i + 1];\r\n var x2 = 0;\r\n var y2 = 0;\r\n if (i + 2 >= last) {\r\n x2 = firstX;\r\n y2 = firstY;\r\n }\r\n else {\r\n x2 = polygonVertices[i + 2];\r\n y2 = polygonVertices[i + 3];\r\n }\r\n this.vertex(x1, y1, color);\r\n this.vertex(x2, y2, color);\r\n }\r\n };\r\n ShapeRenderer.prototype.circle = function (filled, x, y, radius, color, segments) {\r\n if (color === void 0) { color = null; }\r\n if (segments === void 0) { segments = 0; }\r\n if (segments === 0)\r\n segments = Math.max(1, (6 * spine.MathUtils.cbrt(radius)) | 0);\r\n if (segments <= 0)\r\n throw new Error(\"segments must be > 0.\");\r\n if (color === null)\r\n color = this.color;\r\n var angle = 2 * spine.MathUtils.PI / segments;\r\n var cos = Math.cos(angle);\r\n var sin = Math.sin(angle);\r\n var cx = radius, cy = 0;\r\n if (!filled) {\r\n this.check(ShapeType.Line, segments * 2 + 2);\r\n for (var i = 0; i < segments; i++) {\r\n this.vertex(x + cx, y + cy, color);\r\n var temp_1 = cx;\r\n cx = cos * cx - sin * cy;\r\n cy = sin * temp_1 + cos * cy;\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n else {\r\n this.check(ShapeType.Filled, segments * 3 + 3);\r\n segments--;\r\n for (var i = 0; i < segments; i++) {\r\n this.vertex(x, y, color);\r\n this.vertex(x + cx, y + cy, color);\r\n var temp_2 = cx;\r\n cx = cos * cx - sin * cy;\r\n cy = sin * temp_2 + cos * cy;\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n this.vertex(x, y, color);\r\n this.vertex(x + cx, y + cy, color);\r\n }\r\n var temp = cx;\r\n cx = radius;\r\n cy = 0;\r\n this.vertex(x + cx, y + cy, color);\r\n };\r\n ShapeRenderer.prototype.curve = function (x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\r\n if (color === void 0) { color = null; }\r\n this.check(ShapeType.Line, segments * 2 + 2);\r\n if (color === null)\r\n color = this.color;\r\n var subdiv_step = 1 / segments;\r\n var subdiv_step2 = subdiv_step * subdiv_step;\r\n var subdiv_step3 = subdiv_step * subdiv_step * subdiv_step;\r\n var pre1 = 3 * subdiv_step;\r\n var pre2 = 3 * subdiv_step2;\r\n var pre4 = 6 * subdiv_step2;\r\n var pre5 = 6 * subdiv_step3;\r\n var tmp1x = x1 - cx1 * 2 + cx2;\r\n var tmp1y = y1 - cy1 * 2 + cy2;\r\n var tmp2x = (cx1 - cx2) * 3 - x1 + x2;\r\n var tmp2y = (cy1 - cy2) * 3 - y1 + y2;\r\n var fx = x1;\r\n var fy = y1;\r\n var dfx = (cx1 - x1) * pre1 + tmp1x * pre2 + tmp2x * subdiv_step3;\r\n var dfy = (cy1 - y1) * pre1 + tmp1y * pre2 + tmp2y * subdiv_step3;\r\n var ddfx = tmp1x * pre4 + tmp2x * pre5;\r\n var ddfy = tmp1y * pre4 + tmp2y * pre5;\r\n var dddfx = tmp2x * pre5;\r\n var dddfy = tmp2y * pre5;\r\n while (segments-- > 0) {\r\n this.vertex(fx, fy, color);\r\n fx += dfx;\r\n fy += dfy;\r\n dfx += ddfx;\r\n dfy += ddfy;\r\n ddfx += dddfx;\r\n ddfy += dddfy;\r\n this.vertex(fx, fy, color);\r\n }\r\n this.vertex(fx, fy, color);\r\n this.vertex(x2, y2, color);\r\n };\r\n ShapeRenderer.prototype.vertex = function (x, y, color) {\r\n var idx = this.vertexIndex;\r\n var vertices = this.mesh.getVertices();\r\n vertices[idx++] = x;\r\n vertices[idx++] = y;\r\n vertices[idx++] = color.r;\r\n vertices[idx++] = color.g;\r\n vertices[idx++] = color.b;\r\n vertices[idx++] = color.a;\r\n this.vertexIndex = idx;\r\n };\r\n ShapeRenderer.prototype.end = function () {\r\n if (!this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has not been called\");\r\n this.flush();\r\n this.context.gl.disable(this.context.gl.BLEND);\r\n this.isDrawing = false;\r\n };\r\n ShapeRenderer.prototype.flush = function () {\r\n if (this.vertexIndex == 0)\r\n return;\r\n this.mesh.setVerticesLength(this.vertexIndex);\r\n this.mesh.draw(this.shader, this.shapeType);\r\n this.vertexIndex = 0;\r\n };\r\n ShapeRenderer.prototype.check = function (shapeType, numVertices) {\r\n if (!this.isDrawing)\r\n throw new Error(\"ShapeRenderer.begin() has not been called\");\r\n if (this.shapeType == shapeType) {\r\n if (this.mesh.maxVertices() - this.mesh.numVertices() < numVertices)\r\n this.flush();\r\n else\r\n return;\r\n }\r\n else {\r\n this.flush();\r\n this.shapeType = shapeType;\r\n }\r\n };\r\n ShapeRenderer.prototype.dispose = function () {\r\n this.mesh.dispose();\r\n };\r\n return ShapeRenderer;\r\n }());\r\n webgl.ShapeRenderer = ShapeRenderer;\r\n var ShapeType;\r\n (function (ShapeType) {\r\n ShapeType[ShapeType[\"Point\"] = 0] = \"Point\";\r\n ShapeType[ShapeType[\"Line\"] = 1] = \"Line\";\r\n ShapeType[ShapeType[\"Filled\"] = 4] = \"Filled\";\r\n })(ShapeType = webgl.ShapeType || (webgl.ShapeType = {}));\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var SkeletonDebugRenderer = (function () {\r\n function SkeletonDebugRenderer(context) {\r\n this.boneLineColor = new spine.Color(1, 0, 0, 1);\r\n this.boneOriginColor = new spine.Color(0, 1, 0, 1);\r\n this.attachmentLineColor = new spine.Color(0, 0, 1, 0.5);\r\n this.triangleLineColor = new spine.Color(1, 0.64, 0, 0.5);\r\n this.pathColor = new spine.Color().setFromString(\"FF7F00\");\r\n this.clipColor = new spine.Color(0.8, 0, 0, 2);\r\n this.aabbColor = new spine.Color(0, 1, 0, 0.5);\r\n this.drawBones = true;\r\n this.drawRegionAttachments = true;\r\n this.drawBoundingBoxes = true;\r\n this.drawMeshHull = true;\r\n this.drawMeshTriangles = true;\r\n this.drawPaths = true;\r\n this.drawSkeletonXY = false;\r\n this.drawClipping = true;\r\n this.premultipliedAlpha = false;\r\n this.scale = 1;\r\n this.boneWidth = 2;\r\n this.bounds = new spine.SkeletonBounds();\r\n this.temp = new Array();\r\n this.vertices = spine.Utils.newFloatArray(2 * 1024);\r\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\r\n }\r\n SkeletonDebugRenderer.prototype.draw = function (shapes, skeleton, ignoredBones) {\r\n if (ignoredBones === void 0) { ignoredBones = null; }\r\n var skeletonX = skeleton.x;\r\n var skeletonY = skeleton.y;\r\n var gl = this.context.gl;\r\n var srcFunc = this.premultipliedAlpha ? gl.ONE : gl.SRC_ALPHA;\r\n shapes.setBlendMode(srcFunc, gl.ONE_MINUS_SRC_ALPHA);\r\n var bones = skeleton.bones;\r\n if (this.drawBones) {\r\n shapes.setColor(this.boneLineColor);\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\r\n continue;\r\n if (bone.parent == null)\r\n continue;\r\n var x = skeletonX + bone.data.length * bone.a + bone.worldX;\r\n var y = skeletonY + bone.data.length * bone.c + bone.worldY;\r\n shapes.rectLine(true, skeletonX + bone.worldX, skeletonY + bone.worldY, x, y, this.boneWidth * this.scale);\r\n }\r\n if (this.drawSkeletonXY)\r\n shapes.x(skeletonX, skeletonY, 4 * this.scale);\r\n }\r\n if (this.drawRegionAttachments) {\r\n shapes.setColor(this.attachmentLineColor);\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n var attachment = slot.getAttachment();\r\n if (attachment instanceof spine.RegionAttachment) {\r\n var regionAttachment = attachment;\r\n var vertices = this.vertices;\r\n regionAttachment.computeWorldVertices(slot.bone, vertices, 0, 2);\r\n shapes.line(vertices[0], vertices[1], vertices[2], vertices[3]);\r\n shapes.line(vertices[2], vertices[3], vertices[4], vertices[5]);\r\n shapes.line(vertices[4], vertices[5], vertices[6], vertices[7]);\r\n shapes.line(vertices[6], vertices[7], vertices[0], vertices[1]);\r\n }\r\n }\r\n }\r\n if (this.drawMeshHull || this.drawMeshTriangles) {\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (!(attachment instanceof spine.MeshAttachment))\r\n continue;\r\n var mesh = attachment;\r\n var vertices = this.vertices;\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, 2);\r\n var triangles = mesh.triangles;\r\n var hullLength = mesh.hullLength;\r\n if (this.drawMeshTriangles) {\r\n shapes.setColor(this.triangleLineColor);\r\n for (var ii = 0, nn = triangles.length; ii < nn; ii += 3) {\r\n var v1 = triangles[ii] * 2, v2 = triangles[ii + 1] * 2, v3 = triangles[ii + 2] * 2;\r\n shapes.triangle(false, vertices[v1], vertices[v1 + 1], vertices[v2], vertices[v2 + 1], vertices[v3], vertices[v3 + 1]);\r\n }\r\n }\r\n if (this.drawMeshHull && hullLength > 0) {\r\n shapes.setColor(this.attachmentLineColor);\r\n hullLength = (hullLength >> 1) * 2;\r\n var lastX = vertices[hullLength - 2], lastY = vertices[hullLength - 1];\r\n for (var ii = 0, nn = hullLength; ii < nn; ii += 2) {\r\n var x = vertices[ii], y = vertices[ii + 1];\r\n shapes.line(x, y, lastX, lastY);\r\n lastX = x;\r\n lastY = y;\r\n }\r\n }\r\n }\r\n }\r\n if (this.drawBoundingBoxes) {\r\n var bounds = this.bounds;\r\n bounds.update(skeleton, true);\r\n shapes.setColor(this.aabbColor);\r\n shapes.rect(false, bounds.minX, bounds.minY, bounds.getWidth(), bounds.getHeight());\r\n var polygons = bounds.polygons;\r\n var boxes = bounds.boundingBoxes;\r\n for (var i = 0, n = polygons.length; i < n; i++) {\r\n var polygon = polygons[i];\r\n shapes.setColor(boxes[i].color);\r\n shapes.polygon(polygon, 0, polygon.length);\r\n }\r\n }\r\n if (this.drawPaths) {\r\n var slots = skeleton.slots;\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (!(attachment instanceof spine.PathAttachment))\r\n continue;\r\n var path = attachment;\r\n var nn = path.worldVerticesLength;\r\n var world = this.temp = spine.Utils.setArraySize(this.temp, nn, 0);\r\n path.computeWorldVertices(slot, 0, nn, world, 0, 2);\r\n var color = this.pathColor;\r\n var x1 = world[2], y1 = world[3], x2 = 0, y2 = 0;\r\n if (path.closed) {\r\n shapes.setColor(color);\r\n var cx1 = world[0], cy1 = world[1], cx2 = world[nn - 2], cy2 = world[nn - 1];\r\n x2 = world[nn - 4];\r\n y2 = world[nn - 3];\r\n shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, 32);\r\n shapes.setColor(SkeletonDebugRenderer.LIGHT_GRAY);\r\n shapes.line(x1, y1, cx1, cy1);\r\n shapes.line(x2, y2, cx2, cy2);\r\n }\r\n nn -= 4;\r\n for (var ii = 4; ii < nn; ii += 6) {\r\n var cx1 = world[ii], cy1 = world[ii + 1], cx2 = world[ii + 2], cy2 = world[ii + 3];\r\n x2 = world[ii + 4];\r\n y2 = world[ii + 5];\r\n shapes.setColor(color);\r\n shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, 32);\r\n shapes.setColor(SkeletonDebugRenderer.LIGHT_GRAY);\r\n shapes.line(x1, y1, cx1, cy1);\r\n shapes.line(x2, y2, cx2, cy2);\r\n x1 = x2;\r\n y1 = y2;\r\n }\r\n }\r\n }\r\n if (this.drawBones) {\r\n shapes.setColor(this.boneOriginColor);\r\n for (var i = 0, n = bones.length; i < n; i++) {\r\n var bone = bones[i];\r\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\r\n continue;\r\n shapes.circle(true, skeletonX + bone.worldX, skeletonY + bone.worldY, 3 * this.scale, SkeletonDebugRenderer.GREEN, 8);\r\n }\r\n }\r\n if (this.drawClipping) {\r\n var slots = skeleton.slots;\r\n shapes.setColor(this.clipColor);\r\n for (var i = 0, n = slots.length; i < n; i++) {\r\n var slot = slots[i];\r\n if (!slot.bone.active)\r\n continue;\r\n var attachment = slot.getAttachment();\r\n if (!(attachment instanceof spine.ClippingAttachment))\r\n continue;\r\n var clip = attachment;\r\n var nn = clip.worldVerticesLength;\r\n var world = this.temp = spine.Utils.setArraySize(this.temp, nn, 0);\r\n clip.computeWorldVertices(slot, 0, nn, world, 0, 2);\r\n for (var i_17 = 0, n_3 = world.length; i_17 < n_3; i_17 += 2) {\r\n var x = world[i_17];\r\n var y = world[i_17 + 1];\r\n var x2 = world[(i_17 + 2) % world.length];\r\n var y2 = world[(i_17 + 3) % world.length];\r\n shapes.line(x, y, x2, y2);\r\n }\r\n }\r\n }\r\n };\r\n SkeletonDebugRenderer.prototype.dispose = function () {\r\n };\r\n SkeletonDebugRenderer.LIGHT_GRAY = new spine.Color(192 / 255, 192 / 255, 192 / 255, 1);\r\n SkeletonDebugRenderer.GREEN = new spine.Color(0, 1, 0, 1);\r\n return SkeletonDebugRenderer;\r\n }());\r\n webgl.SkeletonDebugRenderer = SkeletonDebugRenderer;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Renderable = (function () {\r\n function Renderable(vertices, numVertices, numFloats) {\r\n this.vertices = vertices;\r\n this.numVertices = numVertices;\r\n this.numFloats = numFloats;\r\n }\r\n return Renderable;\r\n }());\r\n ;\r\n var SkeletonRenderer = (function () {\r\n function SkeletonRenderer(context, twoColorTint) {\r\n if (twoColorTint === void 0) { twoColorTint = true; }\r\n this.premultipliedAlpha = false;\r\n this.vertexEffect = null;\r\n this.tempColor = new spine.Color();\r\n this.tempColor2 = new spine.Color();\r\n this.vertexSize = 2 + 2 + 4;\r\n this.twoColorTint = false;\r\n this.renderable = new Renderable(null, 0, 0);\r\n this.clipper = new spine.SkeletonClipping();\r\n this.temp = new spine.Vector2();\r\n this.temp2 = new spine.Vector2();\r\n this.temp3 = new spine.Color();\r\n this.temp4 = new spine.Color();\r\n this.twoColorTint = twoColorTint;\r\n if (twoColorTint)\r\n this.vertexSize += 4;\r\n this.vertices = spine.Utils.newFloatArray(this.vertexSize * 1024);\r\n }\r\n SkeletonRenderer.prototype.draw = function (batcher, skeleton, slotRangeStart, slotRangeEnd) {\r\n if (slotRangeStart === void 0) { slotRangeStart = -1; }\r\n if (slotRangeEnd === void 0) { slotRangeEnd = -1; }\r\n var clipper = this.clipper;\r\n var premultipliedAlpha = this.premultipliedAlpha;\r\n var twoColorTint = this.twoColorTint;\r\n var blendMode = null;\r\n var tempPos = this.temp;\r\n var tempUv = this.temp2;\r\n var tempLight = this.temp3;\r\n var tempDark = this.temp4;\r\n var renderable = this.renderable;\r\n var uvs = null;\r\n var triangles = null;\r\n var drawOrder = skeleton.drawOrder;\r\n var attachmentColor = null;\r\n var skeletonColor = skeleton.color;\r\n var vertexSize = twoColorTint ? 12 : 8;\r\n var inRange = false;\r\n if (slotRangeStart == -1)\r\n inRange = true;\r\n for (var i = 0, n = drawOrder.length; i < n; i++) {\r\n var clippedVertexSize = clipper.isClipping() ? 2 : vertexSize;\r\n var slot = drawOrder[i];\r\n if (!slot.bone.active) {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (slotRangeStart >= 0 && slotRangeStart == slot.data.index) {\r\n inRange = true;\r\n }\r\n if (!inRange) {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (slotRangeEnd >= 0 && slotRangeEnd == slot.data.index) {\r\n inRange = false;\r\n }\r\n var attachment = slot.getAttachment();\r\n var texture = null;\r\n if (attachment instanceof spine.RegionAttachment) {\r\n var region = attachment;\r\n renderable.vertices = this.vertices;\r\n renderable.numVertices = 4;\r\n renderable.numFloats = clippedVertexSize << 2;\r\n region.computeWorldVertices(slot.bone, renderable.vertices, 0, clippedVertexSize);\r\n triangles = SkeletonRenderer.QUAD_TRIANGLES;\r\n uvs = region.uvs;\r\n texture = region.region.renderObject.texture;\r\n attachmentColor = region.color;\r\n }\r\n else if (attachment instanceof spine.MeshAttachment) {\r\n var mesh = attachment;\r\n renderable.vertices = this.vertices;\r\n renderable.numVertices = (mesh.worldVerticesLength >> 1);\r\n renderable.numFloats = renderable.numVertices * clippedVertexSize;\r\n if (renderable.numFloats > renderable.vertices.length) {\r\n renderable.vertices = this.vertices = spine.Utils.newFloatArray(renderable.numFloats);\r\n }\r\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, renderable.vertices, 0, clippedVertexSize);\r\n triangles = mesh.triangles;\r\n texture = mesh.region.renderObject.texture;\r\n uvs = mesh.uvs;\r\n attachmentColor = mesh.color;\r\n }\r\n else if (attachment instanceof spine.ClippingAttachment) {\r\n var clip = (attachment);\r\n clipper.clipStart(slot, clip);\r\n continue;\r\n }\r\n else {\r\n clipper.clipEndWithSlot(slot);\r\n continue;\r\n }\r\n if (texture != null) {\r\n var slotColor = slot.color;\r\n var finalColor = this.tempColor;\r\n finalColor.r = skeletonColor.r * slotColor.r * attachmentColor.r;\r\n finalColor.g = skeletonColor.g * slotColor.g * attachmentColor.g;\r\n finalColor.b = skeletonColor.b * slotColor.b * attachmentColor.b;\r\n finalColor.a = skeletonColor.a * slotColor.a * attachmentColor.a;\r\n if (premultipliedAlpha) {\r\n finalColor.r *= finalColor.a;\r\n finalColor.g *= finalColor.a;\r\n finalColor.b *= finalColor.a;\r\n }\r\n var darkColor = this.tempColor2;\r\n if (slot.darkColor == null)\r\n darkColor.set(0, 0, 0, 1.0);\r\n else {\r\n if (premultipliedAlpha) {\r\n darkColor.r = slot.darkColor.r * finalColor.a;\r\n darkColor.g = slot.darkColor.g * finalColor.a;\r\n darkColor.b = slot.darkColor.b * finalColor.a;\r\n }\r\n else {\r\n darkColor.setFromColor(slot.darkColor);\r\n }\r\n darkColor.a = premultipliedAlpha ? 1.0 : 0.0;\r\n }\r\n var slotBlendMode = slot.data.blendMode;\r\n if (slotBlendMode != blendMode) {\r\n blendMode = slotBlendMode;\r\n batcher.setBlendMode(webgl.WebGLBlendModeConverter.getSourceGLBlendMode(blendMode, premultipliedAlpha), webgl.WebGLBlendModeConverter.getDestGLBlendMode(blendMode));\r\n }\r\n if (clipper.isClipping()) {\r\n clipper.clipTriangles(renderable.vertices, renderable.numFloats, triangles, triangles.length, uvs, finalColor, darkColor, twoColorTint);\r\n var clippedVertices = new Float32Array(clipper.clippedVertices);\r\n var clippedTriangles = clipper.clippedTriangles;\r\n if (this.vertexEffect != null) {\r\n var vertexEffect = this.vertexEffect;\r\n var verts = clippedVertices;\r\n if (!twoColorTint) {\r\n for (var v = 0, n_4 = clippedVertices.length; v < n_4; v += vertexSize) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]);\r\n tempUv.x = verts[v + 6];\r\n tempUv.y = verts[v + 7];\r\n tempDark.set(0, 0, 0, 0);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n }\r\n }\r\n else {\r\n for (var v = 0, n_5 = clippedVertices.length; v < n_5; v += vertexSize) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]);\r\n tempUv.x = verts[v + 6];\r\n tempUv.y = verts[v + 7];\r\n tempDark.set(verts[v + 8], verts[v + 9], verts[v + 10], verts[v + 11]);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n verts[v + 8] = tempDark.r;\r\n verts[v + 9] = tempDark.g;\r\n verts[v + 10] = tempDark.b;\r\n verts[v + 11] = tempDark.a;\r\n }\r\n }\r\n }\r\n batcher.draw(texture, clippedVertices, clippedTriangles);\r\n }\r\n else {\r\n var verts = renderable.vertices;\r\n if (this.vertexEffect != null) {\r\n var vertexEffect = this.vertexEffect;\r\n if (!twoColorTint) {\r\n for (var v = 0, u = 0, n_6 = renderable.numFloats; v < n_6; v += vertexSize, u += 2) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempUv.x = uvs[u];\r\n tempUv.y = uvs[u + 1];\r\n tempLight.setFromColor(finalColor);\r\n tempDark.set(0, 0, 0, 0);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n }\r\n }\r\n else {\r\n for (var v = 0, u = 0, n_7 = renderable.numFloats; v < n_7; v += vertexSize, u += 2) {\r\n tempPos.x = verts[v];\r\n tempPos.y = verts[v + 1];\r\n tempUv.x = uvs[u];\r\n tempUv.y = uvs[u + 1];\r\n tempLight.setFromColor(finalColor);\r\n tempDark.setFromColor(darkColor);\r\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\r\n verts[v] = tempPos.x;\r\n verts[v + 1] = tempPos.y;\r\n verts[v + 2] = tempLight.r;\r\n verts[v + 3] = tempLight.g;\r\n verts[v + 4] = tempLight.b;\r\n verts[v + 5] = tempLight.a;\r\n verts[v + 6] = tempUv.x;\r\n verts[v + 7] = tempUv.y;\r\n verts[v + 8] = tempDark.r;\r\n verts[v + 9] = tempDark.g;\r\n verts[v + 10] = tempDark.b;\r\n verts[v + 11] = tempDark.a;\r\n }\r\n }\r\n }\r\n else {\r\n if (!twoColorTint) {\r\n for (var v = 2, u = 0, n_8 = renderable.numFloats; v < n_8; v += vertexSize, u += 2) {\r\n verts[v] = finalColor.r;\r\n verts[v + 1] = finalColor.g;\r\n verts[v + 2] = finalColor.b;\r\n verts[v + 3] = finalColor.a;\r\n verts[v + 4] = uvs[u];\r\n verts[v + 5] = uvs[u + 1];\r\n }\r\n }\r\n else {\r\n for (var v = 2, u = 0, n_9 = renderable.numFloats; v < n_9; v += vertexSize, u += 2) {\r\n verts[v] = finalColor.r;\r\n verts[v + 1] = finalColor.g;\r\n verts[v + 2] = finalColor.b;\r\n verts[v + 3] = finalColor.a;\r\n verts[v + 4] = uvs[u];\r\n verts[v + 5] = uvs[u + 1];\r\n verts[v + 6] = darkColor.r;\r\n verts[v + 7] = darkColor.g;\r\n verts[v + 8] = darkColor.b;\r\n verts[v + 9] = darkColor.a;\r\n }\r\n }\r\n }\r\n var view = renderable.vertices.subarray(0, renderable.numFloats);\r\n batcher.draw(texture, view, triangles);\r\n }\r\n }\r\n clipper.clipEndWithSlot(slot);\r\n }\r\n clipper.clipEnd();\r\n };\r\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\r\n return SkeletonRenderer;\r\n }());\r\n webgl.SkeletonRenderer = SkeletonRenderer;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var Vector3 = (function () {\r\n function Vector3(x, y, z) {\r\n if (x === void 0) { x = 0; }\r\n if (y === void 0) { y = 0; }\r\n if (z === void 0) { z = 0; }\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n }\r\n Vector3.prototype.setFrom = function (v) {\r\n this.x = v.x;\r\n this.y = v.y;\r\n this.z = v.z;\r\n return this;\r\n };\r\n Vector3.prototype.set = function (x, y, z) {\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n return this;\r\n };\r\n Vector3.prototype.add = function (v) {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z;\r\n return this;\r\n };\r\n Vector3.prototype.sub = function (v) {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z;\r\n return this;\r\n };\r\n Vector3.prototype.scale = function (s) {\r\n this.x *= s;\r\n this.y *= s;\r\n this.z *= s;\r\n return this;\r\n };\r\n Vector3.prototype.normalize = function () {\r\n var len = this.length();\r\n if (len == 0)\r\n return this;\r\n len = 1 / len;\r\n this.x *= len;\r\n this.y *= len;\r\n this.z *= len;\r\n return this;\r\n };\r\n Vector3.prototype.cross = function (v) {\r\n return this.set(this.y * v.z - this.z * v.y, this.z * v.x - this.x * v.z, this.x * v.y - this.y * v.x);\r\n };\r\n Vector3.prototype.multiply = function (matrix) {\r\n var l_mat = matrix.values;\r\n return this.set(this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03], this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13], this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]);\r\n };\r\n Vector3.prototype.project = function (matrix) {\r\n var l_mat = matrix.values;\r\n var l_w = 1 / (this.x * l_mat[webgl.M30] + this.y * l_mat[webgl.M31] + this.z * l_mat[webgl.M32] + l_mat[webgl.M33]);\r\n return this.set((this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03]) * l_w, (this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13]) * l_w, (this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]) * l_w);\r\n };\r\n Vector3.prototype.dot = function (v) {\r\n return this.x * v.x + this.y * v.y + this.z * v.z;\r\n };\r\n Vector3.prototype.length = function () {\r\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\r\n };\r\n Vector3.prototype.distance = function (v) {\r\n var a = v.x - this.x;\r\n var b = v.y - this.y;\r\n var c = v.z - this.z;\r\n return Math.sqrt(a * a + b * b + c * c);\r\n };\r\n return Vector3;\r\n }());\r\n webgl.Vector3 = Vector3;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\nvar spine;\r\n(function (spine) {\r\n var webgl;\r\n (function (webgl) {\r\n var ManagedWebGLRenderingContext = (function () {\r\n function ManagedWebGLRenderingContext(canvasOrContext, contextConfig) {\r\n var _this = this;\r\n if (contextConfig === void 0) { contextConfig = { alpha: \"true\" }; }\r\n this.restorables = new Array();\r\n if (canvasOrContext instanceof HTMLCanvasElement) {\r\n var canvas_1 = canvasOrContext;\r\n this.gl = (canvas_1.getContext(\"webgl2\", contextConfig) || canvas_1.getContext(\"webgl\", contextConfig));\r\n this.canvas = canvas_1;\r\n canvas_1.addEventListener(\"webglcontextlost\", function (e) {\r\n var event = e;\r\n if (e) {\r\n e.preventDefault();\r\n }\r\n });\r\n canvas_1.addEventListener(\"webglcontextrestored\", function (e) {\r\n for (var i = 0, n = _this.restorables.length; i < n; i++) {\r\n _this.restorables[i].restore();\r\n }\r\n });\r\n }\r\n else {\r\n this.gl = canvasOrContext;\r\n this.canvas = this.gl.canvas;\r\n }\r\n }\r\n ManagedWebGLRenderingContext.prototype.addRestorable = function (restorable) {\r\n this.restorables.push(restorable);\r\n };\r\n ManagedWebGLRenderingContext.prototype.removeRestorable = function (restorable) {\r\n var index = this.restorables.indexOf(restorable);\r\n if (index > -1)\r\n this.restorables.splice(index, 1);\r\n };\r\n return ManagedWebGLRenderingContext;\r\n }());\r\n webgl.ManagedWebGLRenderingContext = ManagedWebGLRenderingContext;\r\n var WebGLBlendModeConverter = (function () {\r\n function WebGLBlendModeConverter() {\r\n }\r\n WebGLBlendModeConverter.getDestGLBlendMode = function (blendMode) {\r\n switch (blendMode) {\r\n case spine.BlendMode.Normal: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\r\n case spine.BlendMode.Additive: return WebGLBlendModeConverter.ONE;\r\n case spine.BlendMode.Multiply: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\r\n case spine.BlendMode.Screen: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\r\n default: throw new Error(\"Unknown blend mode: \" + blendMode);\r\n }\r\n };\r\n WebGLBlendModeConverter.getSourceGLBlendMode = function (blendMode, premultipliedAlpha) {\r\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\r\n switch (blendMode) {\r\n case spine.BlendMode.Normal: return premultipliedAlpha ? WebGLBlendModeConverter.ONE : WebGLBlendModeConverter.SRC_ALPHA;\r\n case spine.BlendMode.Additive: return premultipliedAlpha ? WebGLBlendModeConverter.ONE : WebGLBlendModeConverter.SRC_ALPHA;\r\n case spine.BlendMode.Multiply: return WebGLBlendModeConverter.DST_COLOR;\r\n case spine.BlendMode.Screen: return WebGLBlendModeConverter.ONE;\r\n default: throw new Error(\"Unknown blend mode: \" + blendMode);\r\n }\r\n };\r\n WebGLBlendModeConverter.ZERO = 0;\r\n WebGLBlendModeConverter.ONE = 1;\r\n WebGLBlendModeConverter.SRC_COLOR = 0x0300;\r\n WebGLBlendModeConverter.ONE_MINUS_SRC_COLOR = 0x0301;\r\n WebGLBlendModeConverter.SRC_ALPHA = 0x0302;\r\n WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA = 0x0303;\r\n WebGLBlendModeConverter.DST_ALPHA = 0x0304;\r\n WebGLBlendModeConverter.ONE_MINUS_DST_ALPHA = 0x0305;\r\n WebGLBlendModeConverter.DST_COLOR = 0x0306;\r\n return WebGLBlendModeConverter;\r\n }());\r\n webgl.WebGLBlendModeConverter = WebGLBlendModeConverter;\r\n })(webgl = spine.webgl || (spine.webgl = {}));\r\n})(spine || (spine = {}));\r\n//# sourceMappingURL=spine-both.js.map\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = spine;\n\n}.call(window));\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:////Users/rich/Documents/GitHub/phaser/node_modules/eventemitter3/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/Animation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/AnimationFrame.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/ADD_ANIMATION_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/ANIMATION_COMPLETE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/ANIMATION_REPEAT_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/ANIMATION_RESTART_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/ANIMATION_START_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/PAUSE_ALL_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/REMOVE_ANIMATION_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/RESUME_ALL_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_START_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/BLUR_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/BOOT_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/CONTEXT_LOST_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/CONTEXT_RESTORED_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/DESTROY_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/FOCUS_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/HIDDEN_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/PAUSE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/POST_RENDER_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/POST_STEP_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/PRE_RENDER_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/PRE_STEP_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/READY_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/RESUME_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/STEP_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/VISIBLE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/data/DataManager.js","webpack:////Users/rich/Documents/GitHub/phaser/src/data/events/CHANGE_DATA_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/data/events/REMOVE_DATA_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/data/events/SET_DATA_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/data/events/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/display/color/GetColorFromValue.js","webpack:////Users/rich/Documents/GitHub/phaser/src/display/mask/BitmapMask.js","webpack:////Users/rich/Documents/GitHub/phaser/src/display/mask/GeometryMask.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/BuildGameObject.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/GameObject.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Alpha.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/AlphaSingle.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Animation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/BlendMode.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/ComputedSize.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Crop.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Depth.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Flip.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/GetBounds.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Mask.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Origin.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/PathFollower.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Pipeline.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/ScrollFactor.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Size.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Texture.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/TextureCrop.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Tint.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/ToJSON.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Transform.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/TransformMatrix.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Visible.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/container/Container.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/container/ContainerCanvasRenderer.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/container/ContainerRender.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/container/ContainerWebGLRenderer.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/ADDED_TO_SCENE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/DESTROY_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_COMPLETE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_CREATED_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_ERROR_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_LOOP_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_PLAY_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_SEEKED_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_SEEKING_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_STOP_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/const.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/line/GetPoint.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/line/GetPoints.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/line/Length.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/line/Line.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/line/Random.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/point/Point.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/rectangle/Contains.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/rectangle/GetPoint.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/rectangle/GetPoints.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/rectangle/Perimeter.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/rectangle/Random.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/rectangle/Rectangle.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/rectangle/Union.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/File.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/FileTypesManager.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/GetURL.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/MergeXHRSettings.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/MultiFile.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/XHRLoader.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/XHRSettings.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/const.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/ADD_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/COMPLETE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/FILE_COMPLETE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/FILE_LOAD_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/FILE_PROGRESS_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/POST_PROCESS_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/PROGRESS_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/START_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/filetypes/ImageFile.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/filetypes/JSONFile.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/filetypes/TextFile.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Average.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Bernstein.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Between.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/CatmullRom.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/CeilTo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Clamp.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/DegToRad.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Difference.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Factorial.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/FloatBetween.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/FloorTo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/FromPercent.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/GetSpeed.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/IsEven.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/IsEvenStrict.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Linear.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Matrix3.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Matrix4.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/MaxAdd.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/MinSub.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Percent.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Quaternion.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RadToDeg.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RandomXY.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RandomXYZ.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RandomXYZW.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Rotate.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RotateAround.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RotateAroundDistance.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RotateTo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RotateVec3.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RoundAwayFromZero.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RoundTo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/SinCosTableGenerator.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/SmoothStep.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/SmootherStep.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/ToXY.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/TransformXY.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Vector2.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Vector3.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Vector4.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Within.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Wrap.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/Between.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/BetweenPoints.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/BetweenPointsY.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/BetweenY.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/CounterClockwise.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/Normalize.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/Random.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/RandomDegrees.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/Reverse.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/RotateTo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/ShortestBetween.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/Wrap.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/WrapDegrees.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/const.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceBetween.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceBetweenPoints.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceBetweenPointsSquared.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceChebyshev.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/distance/DistancePower.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceSnake.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceSquared.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/distance/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/back/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/back/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/back/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/back/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/bounce/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/bounce/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/bounce/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/bounce/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/circular/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/circular/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/circular/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/circular/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/cubic/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/cubic/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/cubic/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/cubic/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/elastic/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/elastic/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/elastic/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/elastic/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/expo/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/expo/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/expo/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/expo/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/linear/Linear.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/linear/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quadratic/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quadratic/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quadratic/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quadratic/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quartic/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quartic/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quartic/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quartic/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quintic/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quintic/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quintic/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quintic/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/sine/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/sine/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/sine/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/sine/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/stepped/Stepped.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/stepped/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/fuzzy/Ceil.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/fuzzy/Equal.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/fuzzy/Floor.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/fuzzy/GreaterThan.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/fuzzy/LessThan.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/fuzzy/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/interpolation/BezierInterpolation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/interpolation/CatmullRomInterpolation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/interpolation/CubicBezierInterpolation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/interpolation/LinearInterpolation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/interpolation/QuadraticBezierInterpolation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/interpolation/SmoothStepInterpolation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/interpolation/SmootherStepInterpolation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/interpolation/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/pow2/GetPowerOfTwo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/pow2/IsSizePowerOfTwo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/pow2/IsValuePowerOfTwo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/pow2/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/random-data-generator/RandomDataGenerator.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/snap/SnapCeil.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/snap/SnapFloor.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/snap/SnapTo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/snap/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/plugins/BasePlugin.js","webpack:////Users/rich/Documents/GitHub/phaser/src/plugins/ScenePlugin.js","webpack:////Users/rich/Documents/GitHub/phaser/src/renderer/BlendModes.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scale/events/RESIZE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/ADDED_TO_SCENE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/BOOT_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/CREATE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/DESTROY_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/PAUSE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/POST_UPDATE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/PRE_UPDATE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/READY_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/REMOVED_FROM_SCENE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/RENDER_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/RESUME_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/SHUTDOWN_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/SLEEP_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/START_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/TRANSITION_INIT_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/TRANSITION_OUT_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/TRANSITION_START_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/UPDATE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/WAKE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/tweens/builders/GetBoolean.js","webpack:////Users/rich/Documents/GitHub/phaser/src/tweens/tween/const.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/Class.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/NOOP.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/Add.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/AddAt.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/BringToTop.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/CountAllMatching.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/Each.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/EachInRange.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/FindClosestInSorted.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/GetAll.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/GetFirst.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/GetRandom.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/MoveDown.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/MoveTo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/MoveUp.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/NumberArray.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/NumberArrayStep.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/QuickSelect.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/Range.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/Remove.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/RemoveAt.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/RemoveBetween.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/RemoveRandomElement.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/Replace.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/RotateLeft.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/RotateRight.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/SafeRange.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/SendToBack.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/SetAll.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/Shuffle.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/SpliceOne.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/StableSort.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/Swap.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/CheckMatrix.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/MatrixToString.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/ReverseColumns.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/ReverseRows.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/Rotate180.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/RotateLeft.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/RotateMatrix.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/RotateRight.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/TransposeMatrix.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/object/Extend.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/object/GetAdvancedValue.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/object/GetFastValue.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/object/GetValue.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/object/IsPlainObject.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/string/Pad.js","webpack:///./SpineFile.js","webpack:///./SpinePlugin.js","webpack:///./container/SpineContainer.js","webpack:///./container/SpineContainerCanvasRenderer.js","webpack:///./container/SpineContainerRender.js","webpack:///./container/SpineContainerWebGLRenderer.js","webpack:///./events/COMPLETE_EVENT.js","webpack:///./events/DISPOSE_EVENT.js","webpack:///./events/END_EVENT.js","webpack:///./events/EVENT_EVENT.js","webpack:///./events/INTERRUPTED_EVENT.js","webpack:///./events/START_EVENT.js","webpack:///./events/index.js","webpack:///./gameobject/SpineGameObject.js","webpack:///./gameobject/SpineGameObjectCanvasRenderer.js","webpack:///./gameobject/SpineGameObjectRender.js","webpack:///./gameobject/SpineGameObjectWebGLRenderer.js","webpack:///./runtimes/spine-both.js"],"names":[],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFa;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,yDAAyD,OAAO;AAChE;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yCAAyC,SAAS;AAClD;AACA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA,eAAe,YAAY;AAC3B;;AAEA;AACA,2DAA2D;AAC3D,+DAA+D;AAC/D,mEAAmE;AACnE,uEAAuE;AACvE;AACA,0DAA0D,SAAS;AACnE;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,aAAa,aAAa;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,2DAA2D,YAAY;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,aAAa;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI,IAA6B;AACjC;AACA;;;;;;;;;;;;AC/UA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,iDAAe;AACnC,YAAY,mBAAO,CAAC,mDAAgB;AACpC,mBAAmB,mBAAO,CAAC,mEAAe;AAC1C,aAAa,mBAAO,CAAC,yDAAU;AAC/B,0BAA0B,mBAAO,CAAC,2FAAoC;AACtE,YAAY,mBAAO,CAAC,mEAAkB;AACtC,eAAe,mBAAO,CAAC,uEAA0B;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mCAAmC;AAC9C,WAAW,OAAO;AAClB,WAAW,kCAAkC;AAC7C;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,kDAAkD;AACjE;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD,eAAe,QAAQ;AACvB;AACA;AACA;AACA,yCAAyC,qBAAqB;;AAE9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,kDAAkD;AACjE,eAAe,OAAO;AACtB;AACA,gBAAgB,mCAAmC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,6BAA6B,gCAAgC;AAC7D,aAAa;AACb;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD,eAAe,QAAQ;AACvB;AACA;AACA;AACA,yBAAyB,mBAAmB;;AAE5C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sCAAsC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA,uBAAuB,SAAS;AAChC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,uBAAuB,wBAAwB;AAC/C;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC77BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,sBAAsB;AACjC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,2CAA2C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACvKA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,4BAA4B;AACvC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,4BAA4B;AACvC;AACA;;;;;;;;;;;;ACjBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,QAAQ;AACnB,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,QAAQ;AACnB,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,mBAAmB,mBAAO,CAAC,oFAAuB;AAClD,wBAAwB,mBAAO,CAAC,8FAA4B;AAC5D,sBAAsB,mBAAO,CAAC,0FAA0B;AACxD,uBAAuB,mBAAO,CAAC,4FAA2B;AAC1D,qBAAqB,mBAAO,CAAC,wFAAyB;AACtD,eAAe,mBAAO,CAAC,4EAAmB;AAC1C,sBAAsB,mBAAO,CAAC,0FAA0B;AACxD,gBAAgB,mBAAO,CAAC,8EAAoB;AAC5C,+BAA+B,mBAAO,CAAC,4GAAmC;AAC1E,mCAAmC,mBAAO,CAAC,oHAAuC;AAClF,iCAAiC,mBAAO,CAAC,gHAAqC;AAC9E,kCAAkC,mBAAO,CAAC,kHAAsC;AAChF,gCAAgC,mBAAO,CAAC,8GAAoC;AAC5E,iCAAiC,mBAAO,CAAC,gHAAqC;AAC9E,6BAA6B,mBAAO,CAAC,wGAAiC;AACtE,8BAA8B,mBAAO,CAAC,0GAAkC;AACxE,4BAA4B,mBAAO,CAAC,sGAAgC;AACpE,6BAA6B,mBAAO,CAAC,wGAAiC;;AAEtE;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACdA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACdA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,UAAU,mBAAO,CAAC,4DAAc;AAChC,UAAU,mBAAO,CAAC,4DAAc;AAChC,kBAAkB,mBAAO,CAAC,4EAAsB;AAChD,sBAAsB,mBAAO,CAAC,oFAA0B;AACxD,aAAa,mBAAO,CAAC,kEAAiB;AACtC,WAAW,mBAAO,CAAC,8DAAe;AAClC,YAAY,mBAAO,CAAC,gEAAgB;AACpC,WAAW,mBAAO,CAAC,8DAAe;AAClC,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,eAAe,mBAAO,CAAC,sEAAmB;AAC1C,gBAAgB,mBAAO,CAAC,wEAAoB;AAC5C,cAAc,mBAAO,CAAC,oEAAkB;AACxC,WAAW,mBAAO,CAAC,8DAAe;AAClC,YAAY,mBAAO,CAAC,gEAAgB;AACpC,UAAU,mBAAO,CAAC,4DAAc;AAChC,aAAa,mBAAO,CAAC,kEAAiB;;AAEtC;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,aAAa,mBAAO,CAAC,mDAAU;;AAE/B;AACA;AACA;AACA,WAAW,EAAE;AACb,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,KAAK;AAChB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,2BAA2B;AACtC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2BAA2B,gBAAgB;AAC3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,2DAA2D;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,aAAa;;AAEb;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,EAAE;AACjB,eAAe,KAAK;AACpB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,sCAAsC,kBAAkB;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC5rBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,qBAAqB,mBAAO,CAAC,kFAAyB;AACtD,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,cAAc,mBAAO,CAAC,oEAAkB;;AAExC;;;;;;;;;;;;ACjBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,4DAAmB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,8BAA8B;AACzC;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4EAA4E;AAC3F,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4EAA4E;AAC3F;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4EAA4E;AAC3F,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4EAA4E;AAC3F;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC9RA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,4BAA4B;AACvC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iCAAiC,6BAA6B;;AAE9D;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD,eAAe,8BAA8B;AAC7C,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sCAAsC;AACrD,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sCAAsC;AACrD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACpTA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,mEAAwB;AACjD,uBAAuB,mBAAO,CAAC,uFAAkC;;AAEjE;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,8BAA8B;AACzC,WAAW,0CAA0C;AACrD;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,iBAAiB,WAAW,KAAK,SAAS;;AAE1C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,kBAAkB,KAAK,gBAAgB;;AAExD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,iBAAiB,cAAc,KAAK,UAAU;;AAE9C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,uBAAuB,mBAAO,CAAC,0EAAqB;AACpD,kBAAkB,mBAAO,CAAC,6DAAqB;AAC/C,mBAAmB,mBAAO,CAAC,mEAAe;AAC1C,aAAa,mBAAO,CAAC,0DAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,2DAA2D;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4CAA4C;AAC3D,eAAe,mCAAmC;AAClD,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wCAAwC;AACxD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA,sCAAsC,mBAAmB;;AAEzD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3tBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,oDAAkB;;AAEtC;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;AChSA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,oDAAkB;;AAEtC;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACvGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,oBAAoB,mBAAO,CAAC,wEAA4B;AACxD,YAAY,mBAAO,CAAC,sDAAmB;AACvC,aAAa,mBAAO,CAAC,wEAAyB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uCAAuC,gBAAgB;;AAEvD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,4CAA4C,yBAAyB;AACrE,uCAAuC,gBAAgB;;AAEvD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,4CAA4C,yBAAyB;AACrE,uCAAuC,gBAAgB;;AAEvD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA,sCAAsC,8BAA8B;;AAEpE;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,yCAAyC,sBAAsB;;AAE/D;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,kCAAkC,eAAe;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACpqCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,sEAA2B;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2BAA2B;AAC1C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC9IA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,gBAAgB;AAChB;;AAEA;;AAEA;;;;;;;;;;;;ACtHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;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;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AChWA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,8EAA+B;AACxD,mBAAmB,mBAAO,CAAC,kFAAiC;;AAE5D;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kEAAkE;AACjF;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,wCAAwC,qBAAqB;;AAE7D;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,kCAAkC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC5IA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,SAAS;AACvC,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpMA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,0DAAqB;AAC5C,iBAAiB,mBAAO,CAAC,oFAAkC;AAC3D,eAAe,mBAAO,CAAC,0EAA6B;AACpD,kBAAkB,mBAAO,CAAC,oEAA0B;AACpD,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,2BAA2B,uDAAuD;AAClF;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC,eAAe,uGAAuG;AACtH;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,0BAA0B;;AAE7D;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,YAAY;;AAE/C;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uGAAuG,WAAW;AACjI,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,aAAa;AAChD,oCAAoC,aAAa;;AAEjD;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,sBAAsB;AACtB;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpaA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,yCAAyC,gCAAgC;;AAEzE;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC3HA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,oBAAoB;;AAEtD;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpLA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD,eAAe,iBAAiB;AAChC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,yCAAyC,qBAAqB;;AAE9D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC3HA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,iBAAiB;AAChC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,yCAAyC,qBAAqB;;AAE9D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,gBAAgB;AAChB;;AAEA;;AAEA;;;;;;;;;;;;ACzMA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,wBAAwB,mBAAO,CAAC,8FAAuC;;AAEvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,oBAAoB;;AAExD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACrUA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA,YAAY,wCAAwC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,sBAAsB,mBAAO,CAAC,iFAAmB;AACjD,kBAAkB,mBAAO,CAAC,gEAAwB;AAClD,gBAAgB,mBAAO,CAAC,8DAAuB;AAC/C,uBAAuB,mBAAO,CAAC,4EAA8B;AAC7D,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ,gDAAgD;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,kCAAkC,oCAAoC;AACtE,mCAAmC,sCAAsC;;AAEzE;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,QAAQ,mDAAmD;AAC3D;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,8CAA8C;AAC9D;AACA;AACA;AACA,uCAAuC,oCAAoC;;AAE3E;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,8CAA8C;AAC9D;AACA;AACA;AACA,uCAAuC,oCAAoC;AAC3E,yCAAyC,sCAAsC;;AAE/E;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C,sBAAsB,sCAAsC;;AAE5D;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACxkBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;;AAEvC;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,qDAAqD;AACrE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,kCAAkC,UAAU,cAAc;;AAE1D;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,mCAAmC,wBAAwB;;AAE3D;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACr/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,WAAW,mBAAO,CAAC,6DAAS;AAC5B,iBAAiB,mBAAO,CAAC,yEAAe;AACxC,eAAe,mBAAO,CAAC,qEAAa;AACpC,eAAe,mBAAO,CAAC,qEAAa;AACpC,kBAAkB,mBAAO,CAAC,2EAAgB;AAC1C,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,WAAW,mBAAO,CAAC,6DAAS;AAC5B,UAAU,mBAAO,CAAC,2DAAQ;AA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AW,OAAO;AAClB,WAAW,gCAAgC;AAC3C;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA,mCAAmC,0BAA0B;;AAE7D;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,2BAA2B,qBAAqB;AAChD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,mCAAmC,wBAAwB;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8CAA8C;AAC9D;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,SAAS;AACxB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,EAAE;AACjB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,KAAK;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,OAAO;AACtB,eAAe,KAAK;AACpB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;AACA;;AAEA,mBAAmB,SAAS;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,OAAO;AACtB,eAAe,KAAK;AACpB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;AACA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,2CAA2C,wBAAwB;;AAEnE;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC90CA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,qBAAqB;AACxC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpGA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,oDAAkB;AAC5C,mBAAmB,mBAAO,CAAC,oDAAkB;;AAE7C,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,8FAA0B;AACpD;;AAEA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,gGAA2B;AACtD;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9IA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,MAAM;AACjB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,oBAAoB,mBAAO,CAAC,uFAAwB;AACpD,aAAa,mBAAO,CAAC,yEAAiB;AACtC,wBAAwB,mBAAO,CAAC,+FAA4B;AAC5D,oBAAoB,mBAAO,CAAC,uFAAwB;AACpD,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,iBAAiB,mBAAO,CAAC,iFAAqB;AAC9C,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,kBAAkB,mBAAO,CAAC,mFAAsB;AAChD,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,gBAAgB,mBAAO,CAAC,+EAAoB;AAC5C,mBAAmB,mBAAO,CAAC,qFAAuB;AAClD,oBAAoB,mBAAO,CAAC,uFAAwB;;AAEpD;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,c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BAAO,CAAC,wDAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;;AAEvC;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,OAAO;AACtB,eAAe,2BAA2B;AAC1C;AACA,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,2BAA2B;AAC1C;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;;AAEvC;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,iCAAiC,sBAAsB;;AAEvD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,iCAAiC,sBAAsB;;AAEvD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC1UA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,wDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA,WAAW,iBAAiB;AAC5B,WAAW,2BAA2B;AACtC;AACA,YAAY,2BAA2B;AACvC;AACA;AACA;AACA,4BAA4B,mBAAmB;;AAE/C;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,4CAAU;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,6DAAa;AACrC,YAAY,mBAAO,CAAC,wDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,2BAA2B;AACtC;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA,4BAA4B,mBAAmB;;AAE/C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,2DAAY;AACnC,gBAAgB,mBAAO,CAAC,6DAAa;;AAErC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC;AACA,YAAY,4BAA4B;AACxC;AACA;AACA;AACA,4BAA4B,UAAU;;AAEtC;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,cAAc;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,wDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA,WAAW,sBAAsB;AACjC,WAAW,kBAAkB;AAC7B;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA,4BAA4B,mBAAmB;;AAE/C;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,eAAe,mBAAO,CAAC,2DAAY;AACnC,eAAe,mBAAO,CAAC,2DAAY;AACnC,gBAAgB,mBAAO,CAAC,6DAAa;AACrC,iBAAiB,mBAAO,CAAC,4CAAU;AACnC,WAAW,mBAAO,CAAC,oDAAc;AACjC,aAAa,mBAAO,CAAC,uDAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,kCAAkC,WAAW;AAC7C,mCAAmC,YAAY;;AAE/C;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,OAAO;AACtB,eAAe,2BAA2B;AAC1C;AACA,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,gBAAgB;;AAEnD;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,mBAAmB;;AAEpD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,mBAAmB;;AAEpD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,mBAAmB;;AAEpD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,mBAAmB;;AAEpD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACxfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,6DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,sBAAsB;AACnC;AACA,WAAW,sBAAsB;AACjC,WAAW,sBAAsB;AACjC,WAAW,sBAAsB;AACjC;AACA,YAAY,sBAAsB;AAClC;AACA;AACA;AACA,4BAA4B,uBAAuB;;AAEnD;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;AAC/B,mBAAmB,mBAAO,CAAC,+EAA8B;AACzD,aAAa,mBAAO,CAAC,+CAAU;AAC/B,uBAAuB,mBAAO,CAAC,mEAAoB;AACnD,gBAAgB,mBAAO,CAAC,qDAAa;AACrC,kBAAkB,mBAAO,CAAC,yDAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,+BAA+B;AAC1C;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA,4GAA4G;AAC5G;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,2DAA2D;;AAE3D;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B,eAAe,cAAc;AAC7B;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B,eAAe,cAAc;AAC7B;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,kBAAkB;;AAEnD;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iEAAiE;AACjE;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,eAAe,2BAA2B;AAC1C;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC7hBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2BAA2B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC9DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,mEAAwB;AAC7C,kBAAkB,mBAAO,CAAC,yDAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,sCAAsC;AACjD;AACA,YAAY,sCAAsC;AAClD;AACA;AACA;AACA,mEAAmE;;AAEnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACnOA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,uBAAuB,mBAAO,CAAC,mEAAoB;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,sCAAsC;AACjD;AACA,YAAY,eAAe;AAC3B;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,sCAAsC;AAClD;AACA;AACA;AACA,qCAAqC,mBAAmB;AACxD,8BAA8B,cAAc;AAC5C,6BAA6B,WAAW;AACxC,iCAAiC,eAAe;AAChD,gCAAgC,aAAa;AAC7C,wCAAwC,yBAAyB;;AAEjE;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACjJA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,2BAA2B;AACtC,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,uDAAuD;AACjJ;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,oFAAoF,mDAAmD;AACvI;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;AC/CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,OAAO;AAClB;AACA;;;;;;;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AAC3B,WAAW,sCAAsC;AACjD,WAAW,+CAA+C;AAC1D;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uGAAuG;AAClH,WAAW,gBAAgB;AAC3B,WAAW,sCAAsC;AACjD;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;;;;;;;;;;;AC3QA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,eAAe,mBAAO,CAAC,0EAA6B;AACpD,oBAAoB,mBAAO,CAAC,oFAAkC;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,sDAAsD;AACjE,WAAW,gBAAgB;AAC3B,WAAW,sCAAsC;AACjD,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA,QAAQ;AACR,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qGAAqG;AAChH,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,WAAW,sCAAsC;AACjD;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;;;;;;;;;;;AC/NA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,oBAAoB,mBAAO,CAAC,oFAAkC;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,sDAAsD;AACjE,WAAW,OAAO;AAClB,WAAW,sCAAsC;AACjD;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qGAAqG;AAChH,WAAW,OAAO;AAClB,WAAW,sCAAsC;AACjD;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;;;;;;;;;;;ACxKA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,mDAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,6BAA6B,WAAW;;AAExC;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,6BAA6B,WAAW;;AAExC;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC1kBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;;AAEA;;;;;;;;;;;;AC/6CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,4BAA4B,eAAe;;AAE3C;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,4CAA4C;;AAE5C;;AAEA,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC7vBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,+BAA+B,YAAY;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC,2BAA2B;AAC3B;AACA;AACA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;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,6BAA6B,WAAW;;AAExC;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA;AACA,+BAA+B,YAAY;AAC3C,+BAA+B,YAAY;AAC3C,kCAAkC,eAAe;;AAEjD;;AAEA;AACA;;AAEA,mBAAmB,YAAY;AAC/B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,6BAA6B;AAC9E;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,oBAAoB;AAC/B;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,4BAA4B,qBAAqB;;AAEjD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,+CAA+C;AAC1D;AACA,YAAY,+CAA+C;AAC3D;AACA;AACA;AACA,+BAA+B,wBAAwB;;AAEvD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,6DAAqB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,OAAO;;AAEzC;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,6BAA6B,YAAY;;AAEzC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;;;;;;;;;;;;ACjwBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;;;;;;;;;;;;ACnyBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1hBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA,2CAA2C,sCAAsC;AACjF;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA,2CAA2C,gCAAgC;AAC3E;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,4CAAU;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,0DAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,0DAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,yDAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,4CAAU;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,6BAA6B,aAAa;;AAE1C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;AC1CA;AACA;AACA;A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;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACrFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,4BAA4B,SAAS;;AAErC;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,aAAa,mBAAO,CAAC,wEAAmB;AACxC,mBAAmB,mBAAO,CAAC,oFAAyB;AACpD,0BAA0B,mBAAO,CAAC,kGAAgC;AAClE,eAAe,mBAAO,CAAC,4EAAqB;AAC5C,WAAW,mBAAO,CAAC,oEAAiB;AACpC,WAAW,mBAAO,CAAC,oEAAiB;AACpC,aAAa,mBAAO,CAAC,wEAAmB;;AAExC;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,qBAAqB;;AAEvD;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,qBAAqB;;AAEvD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,qBAAqB;;AAEvD;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,mDAAM;AACtB,SAAS,mBAAO,CAAC,qDAAO;AACxB,WAAW,mBAAO,CAAC,yDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,qDAAM;AACtB,SAAS,mBAAO,CAAC,uDAAO;AACxB,WAAW,mBAAO,CAAC,2DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,kDAAM;AACtB,SAAS,mBAAO,CAAC,oDAAO;AACxB,WAAW,mBAAO,CAAC,wDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD,+BAA+B,cAAc;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD,+BAA+B,cAAc;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD,+BAA+B,cAAc;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA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;AAC1B,aAAa,mBAAO,CAAC,4DAAW;;AAEhC;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,2DAAU;;;;;;;;;;;;ACNnC;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,sDAAM;AACtB,SAAS,mBAAO,CAAC,wDAAO;AACxB,WAAW,mBAAO,CAAC,4DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA,iBAAiB,mBAAO,CAAC,8DAAW;;;;;;;;;;;;ACVpC;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,gCAAgC,kBAAkB;;AAElD;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;A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ACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,8CAAW;;AAEhC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,sDAAe;;AAExC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,0DAAiB;;AAE5C;AACA;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;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;;AAEA;;AAEA;AACA;AACA,kCAAkC,qDAAqD;;AAEvF;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,oEAAoE;;AAEpE;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;;AAEA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;;AAEA;;AAEA,kDAAkD;AAClD,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,wCAAwC;AAC/D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA,wBAAwB,UAAU;AAClC;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,IAAI;AACxB,oBAAoB,EAAE;AACtB;AACA,eAAe,IAAI;AACnB;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,IAAI;AACxB,oBAAoB,EAAE;AACtB;AACA,eAAe,IAAI;AACnB;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,IAAI;AACxB;AACA,eAAe,IAAI;AACnB;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;;AAEA,yBAAyB,OAAO;AAChC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACvfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,UAAU,mBAAO,CAAC,sDAAY;AAC9B,WAAW,mBAAO,CAAC,wDAAa;AAChC,QAAQ,mBAAO,CAAC,kDAAU;;AAE1B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,6BAA6B;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,4DAA4D,sCAAsC;AAClG;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC3HA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA,iBAAiB,mBAAO,CAAC,wDAAc;AACvC,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,2DAAiB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,6BAA6B;AACxC;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,mCAAmC,wCAAwC;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACzHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5UA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,6CAA6C;AACpF;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,qDAAqD;AACpH;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACx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CAAC,+DAAe;AAClC,WAAW,mBAAO,CAAC,+DAAe;AAClC,yBAAyB,mBAAO,CAAC,2FAA6B;AAC9D,qBAAqB,mBAAO,CAAC,mFAAyB;AACtD,oBAAoB,mBAAO,CAAC,iFAAwB;AACpD,sBAAsB,mBAAO,CAAC,qFAA0B;AACxD,qBAAqB,mBAAO,CAAC,mFAAyB;AACtD,YAAY,mBAAO,CAAC,iEAAgB;AACpC,UAAU,mBAAO,CAAC,6DAAc;;AAEhC;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACrKA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvPA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,gCAAgC,iBAAiB;;AAEjD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9GA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,gCAAgC,iBAAiB;;AAEjD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,gCAAgC,QAAQ;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,iCAAiC,yBAAyB;;AAE1D;;AAEA;AACA;AACA,gCAAgC,cAAc;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,KAAK;AAChB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA,eAAe,sBAAsB;AACrC;AACA;AACA;;AAEA,eAAe,kBAAkB;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACvCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,KAAK;AAChB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,iCAAiC,yBAAyB;;AAE1D;AACA;AACA;AACA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;AACA;;AAEA,4BAA4B,cAAc;AAC1C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC7EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,iCAAiC,yBAAyB;;AAE1D;;AAEA;AACA;AACA,gCAAgC,cAAc;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,iCAAiC,yBAAyB;;AAE1D;AACA;AACA,gCAAgC,cAAc;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,+BAA+B,uBAAuB;;AAEtD;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C,iDAAiD;AACjD;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;;AAEA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,wBAAwB,mBAAO,CAAC,4EAA8B;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,4BAA4B,YAAY;AACxC,6BAA6B,UAAU;;AAEvC;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA,6BAA6B,UAAU;AACvC,8BAA8B,wBAAwB;AACtD,gCAAgC,0BAA0B;;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,iEAAoB;AAC3C,cAAc,mBAAO,CAAC,sDAAW;;AAEjC;AACA;AACA;;AAEA,wBAAwB,mBAAmB;AAC3C;AACA,4BAA4B,mBAAmB;AAC/C;AACA,2BAA2B,SAAS;AACpC;AACA,0BAA0B,6BAA6B;AACvD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mBAAmB,aAAa;AAChC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnIA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,YAAY;AACvB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,YAAY;AACxB;AACA;AACA;AACA,gCAAgC,iBAAiB;;AAEjD;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA,gCAAgC,iBAAiB;;AAEjD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,iCAAiC,yBAAyB;AAC1D,gCAAgC,iBAAiB;;AAEjD;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,+BAA+B,uBAAuB;;AAEtD;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;;AAEA,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;;AAEA,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,iCAAiC,yBAAyB;;AAE1D;AACA;AACA,gCAAgC,cAAc;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,IAAI;AACpB;AACA,WAAW,IAAI;AACf;AACA,YAAY,IAAI;AAChB;AACA;AACA;AACA,kCAAkC,OAAO;AACzC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,uBAAuB,SAAS;AAChC;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACvCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB,WAAW;AAChC;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI,IAA8B;AAClC;AACA;AACA,KAAK,EAEJ;;AAED,CAAC,I;;;;;;;;;;;AC7ID;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb,WAAW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,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,UAAU,mBAAO,CAAC,gDAAQ;;AAE1B;;;;;;;;;;;;AC9CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,UAAU,mBAAO,CAAC,0DAAkB;AACpC,kBAAkB,mBAAO,CAAC,qEAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA,uBAAuB,sBAAsB;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2BAA2B,sBAAsB;AACjD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,qEAAe;AACzC,sBAAsB,mBAAO,CAAC,6EAAmB;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,6CAA6C;AAC3E;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB,WAAW,gBAAgB;AAC3B;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,kCAAkC,gBAAgB;;AAElD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,WAAW,mBAAO,CAAC,8CAAY;AAC/B,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA,8CAA8C,aAAa,qBAAqB;AAChF;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb;AACA,YAAY,EAAE,oBAAoB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;;AAEA;;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,4BAA4B,SAAS;AACrC,4BAA4B,WAAW;AACvC,4BAA4B,SAAS;;AAErC;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACrEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,6DAA0B;AAC9C,mBAAmB,mBAAO,CAAC,yFAAwC;AACnE,gBAAgB,mBAAO,CAAC,8FAA4C;AACpE,oBAAoB,mBAAO,CAAC,2FAAyC;AACrE,eAAe,mBAAO,CAAC,4FAA2C;AAClE,gBAAgB,mBAAO,CAAC,0EAAkC;AAC1D,eAAe,mBAAO,CAAC,4FAA2C;;AAElE;AACA,aAAa,OAAO;AACpB;AACA,cAAc,OAAO;AACrB,cAAc,gBAAgB;AAC9B,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,cAAc,kBAAkB;AAChC,cAAc,kBAAkB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,iDAAiD;AAC5D,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,kBAAkB;AAC7B,WAAW,kBAAkB;AAC7B;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;AACA;;AAEA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;;AAEjB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,+BAA+B,oBAAoB;AACnD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,+BAA+B,qBAAqB;AACpD;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,uBAAuB;AAClD;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sCAAsC,uFAAuF;;AAE7H;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC1PA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,sBAAsB,mBAAO,CAAC,6FAA0C;AACxE,YAAY,mBAAO,CAAC,6DAA0B;AAC9C,eAAe,mBAAO,CAAC,iFAAoC;AAC3D,kBAAkB,mBAAO,CAAC,yFAAwC;AAClE,kBAAkB,mBAAO,CAAC,6EAAkC;AAC5D,YAAY,mBAAO,CAAC,uCAAO;AAC3B,gBAAgB,mBAAO,CAAC,mCAAa;AACrC,sBAAsB,mBAAO,CAAC,qEAA8B;AAC5D,qBAAqB,mBAAO,CAAC,iEAA4B;AACzD,WAAW,mBAAO,CAAC,2DAAyB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,6BAA6B;AACxC;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qGAAqG;AACpH,eAAe,OAAO;AACtB,eAAe,gBAAgB;AAC/B,eAAe,QAAQ;AACvB,eAAe,sCAAsC;AACrD,eAAe,sCAAsC;AACrD;AACA,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,eAAe;AAC9B,eAAe,WAAW;AAC1B;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;;AAEA;;AAEA,gBAAgB;AAChB,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;AACA;;AAEA;;AAEA,gBAAgB;AAChB,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,gBAAgB;AAC5B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,QAAQ;AACnB;AACA,YAAY,gBAAgB;AAC5B;;AAEA;;;;;;;;;;;;ACvrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,gEAA6B;AACjD,gBAAgB,mBAAO,CAAC,wGAAiD;AACzE,2BAA2B,mBAAO,CAAC,mEAAwB;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,YAAY;AACvB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,kBAAkB;AAC7B;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC3FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,qBAAqB;AACxC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACnGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,iFAA+B;AACzD;;AAEA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,mFAAgC;AAC3D;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,YAAY,mBAAO,CAAC,8DAA4B;AAChD,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,qBAAqB;AACxC;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpKA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;A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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,YAAY;AACvB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,kBAAkB;;AAEpD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB,eAAe,YAAY;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,kCAAkC,6BAA6B;AAC/D,mCAAmC,+BAA+B;AAClE,oCAAoC,aAAa;AACjD,oCAAoC,aAAa;;AAEjD;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,oCAAoC,aAAa;AACjD,oCAAoC,aAAa;;AAEjD;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA,uBAAuB,2BAA2B;AAClD;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,oCAAoC;AAC/D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,uCAAuC,gBAAgB;;AAEvD;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C,4CAA4C,yBAAyB;;AAErE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA,2BAA2B,qBAAqB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,YAAY;AAC/C,qCAAqC,cAAc;AACnD,qCAAqC,gBAAgB;;AAErD;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACjjDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,gBAAgB;AAC3B,WAAW,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EA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvKA;;AAEA;AACA;AACA;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA,kCAAkC,UAAU;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,mDAAmD;AACxD;AACA;AACA;AACA;AACA,KAAK,+DAA+D;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,+DAA+D;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,OAAO;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,OAAO;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,iBAAiB;AAC5D;AACA;AACA;AACA;AACA,2CAA2C,iBAAiB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,mBAAmB;AAC5D;AACA;AACA;AACA;AACA;AACA,yCAAyC,mBAAmB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,oBAAoB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,oBAAoB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,6CAA6C;AAC/D;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,OAAO;AACxE;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,yBAAyB,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,YAAY;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,oBAAoB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,oBAAoB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA;AACA,kCAAkC,oBAAoB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,cAAc;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,sDAAsD;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA,wCAAwC,iBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yGAAyG;AACzG;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,qGAAqG;AACrG;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,2DAA2D,0BAA0B;AACrF;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,sDAAsD;AAC3D,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,kEAAkE;AACvE,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,OAAO;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,iBAAiB;AACpD;AACA;AACA;AACA,iDAAiD,iBAAiB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,gBAAgB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA,0DAA0D,iBAAiB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK,+DAA+D;AACpE;AACA;AACA;AACA;AACA;AACA,KAAK,4DAA4D;AACjE;AACA;AACA;AACA;AACA;AACA,KAAK,yDAAyD;AAC9D,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,wCAAwC,iBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,gCAAgC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;AACA,2BAA2B,sCAAsC;AACjE;AACA;AACA;AACA;AACA,2BAA2B,iCAAiC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,OAAO;AAClE;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qBAAqB;AACvD,gCAAgC,cAAc;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,qBAAqB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,eAAe;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,eAAe;AAC9C;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qBAAqB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,OAAO;AAC7B;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA,wDAAwD,OAAO;AAC/D;AACA,wDAAwD,OAAO;AAC/D;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,OAAO;AACtC;AACA;AACA;AACA,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA;AACA;AACA,wCAAwC,yBAAyB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA;AACA;AACA,wCAAwC,yBAAyB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA,0DAA0D,SAAS;AACnE;AACA,gEAAgE,WAAW;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,yBAAyB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,SAAS;AAChE;AACA;AACA;AACA,uDAAuD,SAAS;AAChE;AACA;AACA;AACA,uEAAuE,QAAQ;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;AACA;AACA;AACA,oCAAoC,kBAAkB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,qCAAqC,uBAAuB;AAC5D,mCAAmC,WAAW;AAC9C,oCAAoC,oCAAoC;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,mCAAmC,cAAc;AACjD,sCAAsC,iBAAiB;AACvD;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA,qDAAqD,SAAS;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qBAAqB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,sBAAsB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA,gCAAgC,0BAA0B;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,OAAO;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,OAAO;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,2BAA2B;AAC1D;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA,wCAAwC,2BAA2B;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,wBAAwB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,+BAA+B;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,0BAA0B;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,OAAO;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,wBAAwB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA,gDAAgD,QAAQ;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0BAA0B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0BAA0B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yFAAyF,OAAO;AAChG;AACA;AACA;AACA,uDAAuD,kBAAkB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,0BAA0B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,oBAAoB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6BAA6B;AACxD;AACA;AACA,+BAA+B,6BAA6B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,wBAAwB;AACnD;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6BAA6B;AACxD;AACA;AACA,+BAA+B,6BAA6B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,wBAAwB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6BAA6B;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,kEAAkE;AACvE;AACA;AACA;AACA;AACA;AACA,KAAK,4DAA4D;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E;AAC5E,kEAAkE;AAClE,qDAAqD;AACrD;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,yBAAyB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,gBAAgB;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,oDAAoD,+BAA+B;AACnF;AACA;AACA;AACA;AACA,mCAAmC,WAAW;AAC9C;AACA;AACA;AACA;AACA;AACA,qCAAqC,UAAU;AAC/C;AACA;AACA;AACA;AACA;AACA,mCAAmC,WAAW;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,UAAU;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,iBAAiB;AACvD,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,wCAAwC,iBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,wBAAwB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,WAAW;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,WAAW;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,WAAW;AAC7D;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,WAAW;AAC5E;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,qEAAqE;AAC1E,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,iBAAiB;AAC7D,2DAA2D,8CAA8C,EAAE;AAC3G;AACA;AACA,SAAS;AACT;AACA,KAAK,6CAA6C;AAClD,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kFAAkF;AAClF,wEAAwE;AACxE,2DAA2D;AAC3D;AACA,SAAS;AACT;AACA,KAAK,6CAA6C;AAClD,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,sBAAsB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,OAAO;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,6CAA6C;AAClD,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,iBAAiB;AAC7D;AACA;AACA,iBAAiB;AACjB;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,oBAAoB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,UAAU;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,wBAAwB;AAChF,sDAAsD,sDAAsD;AAC5G,sDAAsD,qDAAqD;AAC3G;AACA;AACA;AACA;AACA,sDAAsD,sBAAsB;AAC5E,qDAAqD,4BAA4B;AACjF,qDAAqD,2BAA2B;AAChF;AACA;AACA;AACA;AACA,qDAAqD,qBAAqB;AAC1E;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,sCAAsC,UAAU;AAChD;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS,oFAAoF;AAC7F,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE,6CAA6C,qBAAqB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,oBAAoB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,uBAAuB;AACxF;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF,gDAAgD,qBAAqB;AACrE,8CAA8C,mBAAmB;AACjE;AACA;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,0CAA0C,cAAc;AACxD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,yDAAyD;AAClE,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,qBAAqB;AAC5E,4DAA4D,0BAA0B;AACtF,8DAA8D,4BAA4B;AAC1F,kEAAkE,sBAAsB;AACxF,8DAA8D,sBAAsB;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,8CAA8C,kDAAkD,iDAAiD,+BAA+B,mCAAmC,0BAA0B,2CAA2C,mDAAmD,8EAA8E,WAAW;AAC/e,iHAAiH,2FAA2F,mCAAmC,sCAAsC,0BAA0B,uEAAuE,WAAW;AACjY;AACA;AACA;AACA,2EAA2E,8CAA8C,+CAA+C,kDAAkD,iDAAiD,+BAA+B,8BAA8B,mCAAmC,0BAA0B,2CAA2C,2CAA2C,mDAAmD,8EAA8E,WAAW;AACvmB,iHAAiH,2FAA2F,mCAAmC,mCAAmC,sCAAsC,0BAA0B,8DAA8D,oDAAoD,8HAA8H,WAAW;AAC7kB;AACA;AACA;AACA,2EAA2E,8CAA8C,iDAAiD,+BAA+B,0BAA0B,2CAA2C,8EAA8E,WAAW;AACvW,iHAAiH,2FAA2F,0BAA0B,mCAAmC,WAAW;AACpR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,qBAAqB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,0CAA0C,cAAc;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,sDAAsD;AAC/D,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,SAAS;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,SAAS;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,YAAY;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,qBAAqB;AACrE,8CAA8C,mBAAmB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,SAAS;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,SAAS;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,OAAO;AAC1C,mCAAmC,OAAO;AAC1C,mCAAmC,OAAO;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,kBAAkB,iBAAiB;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,qEAAqE,OAAO;AAC5E;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;;AAEA,CAAC","file":"SpinePluginDebug.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./SpinePlugin.js\");\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Clamp = require('../math/Clamp');\nvar Class = require('../utils/Class');\nvar EventEmitter = require('eventemitter3');\nvar Events = require('./events');\nvar FindClosestInSorted = require('../utils/array/FindClosestInSorted');\nvar Frame = require('./AnimationFrame');\nvar GetValue = require('../utils/object/GetValue');\n\n/**\n * @classdesc\n * A Frame based Animation.\n *\n * This consists of a key, some default values (like the frame rate) and a bunch of Frame objects.\n *\n * The Animation Manager creates these. Game Objects don't own an instance of these directly.\n * Game Objects have the Animation Component, which are like playheads to global Animations (these objects)\n * So multiple Game Objects can have playheads all pointing to this one Animation instance.\n *\n * @class Animation\n * @memberof Phaser.Animations\n * @extends Phaser.Events.EventEmitter\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Animations.AnimationManager} manager - A reference to the global Animation Manager\n * @param {string} key - The unique identifying string for this animation.\n * @param {Phaser.Types.Animations.Animation} config - The Animation configuration.\n */\nvar Animation = new Class({\n\n Extends: EventEmitter,\n\n initialize:\n\n function Animation (manager, key, config)\n {\n EventEmitter.call(this);\n\n /**\n * A reference to the global Animation Manager.\n *\n * @name Phaser.Animations.Animation#manager\n * @type {Phaser.Animations.AnimationManager}\n * @since 3.0.0\n */\n this.manager = manager;\n\n /**\n * The unique identifying string for this animation.\n *\n * @name Phaser.Animations.Animation#key\n * @type {string}\n * @since 3.0.0\n */\n this.key = key;\n\n /**\n * A frame based animation (as opposed to a bone based animation)\n *\n * @name Phaser.Animations.Animation#type\n * @type {string}\n * @default frame\n * @since 3.0.0\n */\n this.type = 'frame';\n\n /**\n * Extract all the frame data into the frames array.\n *\n * @name Phaser.Animations.Animation#frames\n * @type {Phaser.Animations.AnimationFrame[]}\n * @since 3.0.0\n */\n this.frames = this.getFrames(\n manager.textureManager,\n GetValue(config, 'frames', []),\n GetValue(config, 'defaultTextureKey', null)\n );\n\n /**\n * The frame rate of playback in frames per second (default 24 if duration is null)\n *\n * @name Phaser.Animations.Animation#frameRate\n * @type {integer}\n * @default 24\n * @since 3.0.0\n */\n this.frameRate = GetValue(config, 'frameRate', null);\n\n /**\n * How long the animation should play for, in milliseconds.\n * If the `frameRate` property has been set then it overrides this value,\n * otherwise the `frameRate` is derived from `duration`.\n *\n * @name Phaser.Animations.Animation#duration\n * @type {integer}\n * @since 3.0.0\n */\n this.duration = GetValue(config, 'duration', null);\n\n if (this.duration === null && this.frameRate === null)\n {\n // No duration or frameRate given, use default frameRate of 24fps\n this.frameRate = 24;\n this.duration = (this.frameRate / this.frames.length) * 1000;\n }\n else if (this.duration && this.frameRate === null)\n {\n // Duration given but no frameRate, so set the frameRate based on duration\n // I.e. 12 frames in the animation, duration = 4000 ms\n // So frameRate is 12 / (4000 / 1000) = 3 fps\n this.frameRate = this.frames.length / (this.duration / 1000);\n }\n else\n {\n // frameRate given, derive duration from it (even if duration also specified)\n // I.e. 15 frames in the animation, frameRate = 30 fps\n // So duration is 15 / 30 = 0.5 * 1000 (half a second, or 500ms)\n this.duration = (this.frames.length / this.frameRate) * 1000;\n }\n\n /**\n * How many ms per frame, not including frame specific modifiers.\n *\n * @name Phaser.Animations.Animation#msPerFrame\n * @type {integer}\n * @since 3.0.0\n */\n this.msPerFrame = 1000 / this.frameRate;\n\n /**\n * Skip frames if the time lags, or always advanced anyway?\n *\n * @name Phaser.Animations.Animation#skipMissedFrames\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.skipMissedFrames = GetValue(config, 'skipMissedFrames', true);\n\n /**\n * The delay in ms before the playback will begin.\n *\n * @name Phaser.Animations.Animation#delay\n * @type {integer}\n * @default 0\n * @since 3.0.0\n */\n this.delay = GetValue(config, 'delay', 0);\n\n /**\n * Number of times to repeat the animation. Set to -1 to repeat forever.\n *\n * @name Phaser.Animations.Animation#repeat\n * @type {integer}\n * @default 0\n * @since 3.0.0\n */\n this.repeat = GetValue(config, 'repeat', 0);\n\n /**\n * The delay in ms before the a repeat play starts.\n *\n * @name Phaser.Animations.Animation#repeatDelay\n * @type {integer}\n * @default 0\n * @since 3.0.0\n */\n this.repeatDelay = GetValue(config, 'repeatDelay', 0);\n\n /**\n * Should the animation yoyo (reverse back down to the start) before repeating?\n *\n * @name Phaser.Animations.Animation#yoyo\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.yoyo = GetValue(config, 'yoyo', false);\n\n /**\n * Should the GameObject's `visible` property be set to `true` when the animation starts to play?\n *\n * @name Phaser.Animations.Animation#showOnStart\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.showOnStart = GetValue(config, 'showOnStart', false);\n\n /**\n * Should the GameObject's `visible` property be set to `false` when the animation finishes?\n *\n * @name Phaser.Animations.Animation#hideOnComplete\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.hideOnComplete = GetValue(config, 'hideOnComplete', false);\n\n /**\n * Global pause. All Game Objects using this Animation instance are impacted by this property.\n *\n * @name Phaser.Animations.Animation#paused\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.paused = false;\n\n this.manager.on(Events.PAUSE_ALL, this.pause, this);\n this.manager.on(Events.RESUME_ALL, this.resume, this);\n },\n\n /**\n * Add frames to the end of the animation.\n *\n * @method Phaser.Animations.Animation#addFrame\n * @since 3.0.0\n *\n * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects.\n *\n * @return {this} This Animation object.\n */\n addFrame: function (config)\n {\n return this.addFrameAt(this.frames.length, config);\n },\n\n /**\n * Add frame/s into the animation.\n *\n * @method Phaser.Animations.Animation#addFrameAt\n * @since 3.0.0\n *\n * @param {integer} index - The index to insert the frame at within the animation.\n * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects.\n *\n * @return {this} This Animation object.\n */\n addFrameAt: function (index, config)\n {\n var newFrames = this.getFrames(this.manager.textureManager, config);\n\n if (newFrames.length > 0)\n {\n if (index === 0)\n {\n this.frames = newFrames.concat(this.frames);\n }\n else if (index === this.frames.length)\n {\n this.frames = this.frames.concat(newFrames);\n }\n else\n {\n var pre = this.frames.slice(0, index);\n var post = this.frames.slice(index);\n\n this.frames = pre.concat(newFrames, post);\n }\n\n this.updateFrameSequence();\n }\n\n return this;\n },\n\n /**\n * Check if the given frame index is valid.\n *\n * @method Phaser.Animations.Animation#checkFrame\n * @since 3.0.0\n *\n * @param {integer} index - The index to be checked.\n *\n * @return {boolean} `true` if the index is valid, otherwise `false`.\n */\n checkFrame: function (index)\n {\n return (index >= 0 && index < this.frames.length);\n },\n\n /**\n * Called internally when this Animation completes playback.\n * Optionally, hides the parent Game Object, then stops playback.\n *\n * @method Phaser.Animations.Animation#completeAnimation\n * @protected\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\n */\n completeAnimation: function (component)\n {\n if (this.hideOnComplete)\n {\n component.parent.visible = false;\n }\n\n component.stop();\n },\n\n /**\n * Called internally when this Animation first starts to play.\n * Sets the accumulator and nextTick properties.\n *\n * @method Phaser.Animations.Animation#getFirstTick\n * @protected\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\n * @param {boolean} [includeDelay=true] - If `true` the Animation Components delay value will be added to the `nextTick` total.\n */\n getFirstTick: function (component, includeDelay)\n {\n if (includeDelay === undefined) { includeDelay = true; }\n\n // When is the first update due?\n component.accumulator = 0;\n component.nextTick = component.msPerFrame + component.currentFrame.duration;\n\n if (includeDelay)\n {\n component.nextTick += component._delay;\n }\n },\n\n /**\n * Returns the AnimationFrame at the provided index\n *\n * @method Phaser.Animations.Animation#getFrameAt\n * @protected\n * @since 3.0.0\n *\n * @param {integer} index - The index in the AnimationFrame array\n *\n * @return {Phaser.Animations.AnimationFrame} The frame at the index provided from the animation sequence\n */\n getFrameAt: function (index)\n {\n return this.frames[index];\n },\n\n /**\n * Creates AnimationFrame instances based on the given frame data.\n *\n * @method Phaser.Animations.Animation#getFrames\n * @since 3.0.0\n *\n * @param {Phaser.Textures.TextureManager} textureManager - A reference to the global Texture Manager.\n * @param {(string|Phaser.Types.Animations.AnimationFrame[])} frames - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects.\n * @param {string} [defaultTextureKey] - The key to use if no key is set in the frame configuration object.\n *\n * @return {Phaser.Animations.AnimationFrame[]} An array of newly created AnimationFrame instances.\n */\n getFrames: function (textureManager, frames, defaultTextureKey)\n {\n var out = [];\n var prev;\n var animationFrame;\n var index = 1;\n var i;\n var textureKey;\n\n // if frames is a string, we'll get all the frames from the texture manager as if it's a sprite sheet\n if (typeof frames === 'string')\n {\n textureKey = frames;\n\n var texture = textureManager.get(textureKey);\n var frameKeys = texture.getFrameNames();\n\n frames = [];\n\n frameKeys.forEach(function (idx, value)\n {\n frames.push({ key: textureKey, frame: value });\n });\n }\n\n if (!Array.isArray(frames) || frames.length === 0)\n {\n return out;\n }\n\n for (i = 0; i < frames.length; i++)\n {\n var item = frames[i];\n\n var key = GetValue(item, 'key', defaultTextureKey);\n\n if (!key)\n {\n continue;\n }\n\n // Could be an integer or a string\n var frame = GetValue(item, 'frame', 0);\n\n // The actual texture frame\n var textureFrame = textureManager.getFrame(key, frame);\n\n animationFrame = new Frame(key, frame, index, textureFrame);\n\n animationFrame.duration = GetValue(item, 'duration', 0);\n\n animationFrame.isFirst = (!prev);\n\n // The previously created animationFrame\n if (prev)\n {\n prev.nextFrame = animationFrame;\n\n animationFrame.prevFrame = prev;\n }\n\n out.push(animationFrame);\n\n prev = animationFrame;\n\n index++;\n }\n\n if (out.length > 0)\n {\n animationFrame.isLast = true;\n\n // Link them end-to-end, so they loop\n animationFrame.nextFrame = out[0];\n\n out[0].prevFrame = animationFrame;\n\n // Generate the progress data\n\n var slice = 1 / (out.length - 1);\n\n for (i = 0; i < out.length; i++)\n {\n out[i].progress = i * slice;\n }\n }\n\n return out;\n },\n\n /**\n * Called internally. Sets the accumulator and nextTick values of the current Animation.\n *\n * @method Phaser.Animations.Animation#getNextTick\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\n */\n getNextTick: function (component)\n {\n // accumulator += delta * _timeScale\n // after a large delta surge (perf issue for example) we need to adjust for it here\n\n // When is the next update due?\n component.accumulator -= component.nextTick;\n\n component.nextTick = component.msPerFrame + component.currentFrame.duration;\n },\n\n /**\n * Loads the Animation values into the Animation Component.\n *\n * @method Phaser.Animations.Animation#load\n * @private\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to load values into.\n * @param {integer} startFrame - The start frame of the animation to load.\n */\n load: function (component, startFrame)\n {\n if (startFrame >= this.frames.length)\n {\n startFrame = 0;\n }\n\n if (component.currentAnim !== this)\n {\n component.currentAnim = this;\n\n component.frameRate = this.frameRate;\n component.duration = this.duration;\n component.msPerFrame = this.msPerFrame;\n component.skipMissedFrames = this.skipMissedFrames;\n\n component._delay = this.delay;\n component._repeat = this.repeat;\n component._repeatDelay = this.repeatDelay;\n component._yoyo = this.yoyo;\n }\n\n var frame = this.frames[startFrame];\n\n if (startFrame === 0 && !component.forward)\n {\n frame = this.getLastFrame();\n }\n\n component.updateFrame(frame);\n },\n\n /**\n * Returns the frame closest to the given progress value between 0 and 1.\n *\n * @method Phaser.Animations.Animation#getFrameByProgress\n * @since 3.4.0\n *\n * @param {number} value - A value between 0 and 1.\n *\n * @return {Phaser.Animations.AnimationFrame} The frame closest to the given progress value.\n */\n getFrameByProgress: function (value)\n {\n value = Clamp(value, 0, 1);\n\n return FindClosestInSorted(value, this.frames, 'progress');\n },\n\n /**\n * Advance the animation frame.\n *\n * @method Phaser.Animations.Animation#nextFrame\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to advance.\n */\n nextFrame: function (component)\n {\n var frame = component.currentFrame;\n\n // TODO: Add frame skip support\n\n if (frame.isLast)\n {\n // We're at the end of the animation\n\n // Yoyo? (happens before repeat)\n if (component._yoyo)\n {\n this.handleYoyoFrame(component, false);\n }\n else if (component.repeatCounter > 0)\n {\n // Repeat (happens before complete)\n\n if (component._reverse && component.forward)\n {\n component.forward = false;\n }\n else\n {\n this.repeatAnimation(component);\n }\n }\n else\n {\n this.completeAnimation(component);\n }\n }\n else\n {\n this.updateAndGetNextTick(component, frame.nextFrame);\n }\n },\n\n /**\n * Handle the yoyo functionality in nextFrame and previousFrame methods.\n *\n * @method Phaser.Animations.Animation#handleYoyoFrame\n * @private\n * @since 3.12.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to advance.\n * @param {boolean} isReverse - Is animation in reverse mode? (Default: false)\n */\n handleYoyoFrame: function (component, isReverse)\n {\n if (!isReverse) { isReverse = false; }\n\n if (component._reverse === !isReverse && component.repeatCounter > 0)\n {\n if (!component._repeatDelay || component.pendingRepeat)\n\n {\n component.forward = isReverse;\n }\n\n this.repeatAnimation(component);\n\n return;\n }\n\n if (component._reverse !== isReverse && component.repeatCounter === 0)\n {\n this.completeAnimation(component);\n\n return;\n }\n \n component.forward = isReverse;\n\n var frame = (isReverse) ? component.currentFrame.nextFrame : component.currentFrame.prevFrame;\n\n this.updateAndGetNextTick(component, frame);\n },\n\n /**\n * Returns the animation last frame.\n *\n * @method Phaser.Animations.Animation#getLastFrame\n * @since 3.12.0\n *\n * @return {Phaser.Animations.AnimationFrame} component - The Animation Last Frame.\n */\n getLastFrame: function ()\n {\n return this.frames[this.frames.length - 1];\n },\n\n /**\n * Called internally when the Animation is playing backwards.\n * Sets the previous frame, causing a yoyo, repeat, complete or update, accordingly.\n *\n * @method Phaser.Animations.Animation#previousFrame\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\n */\n previousFrame: function (component)\n {\n var frame = component.currentFrame;\n\n // TODO: Add frame skip support\n\n if (frame.isFirst)\n {\n // We're at the start of the animation\n\n if (component._yoyo)\n {\n this.handleYoyoFrame(component, true);\n }\n else if (component.repeatCounter > 0)\n {\n if (component._reverse && !component.forward)\n {\n component.currentFrame = this.getLastFrame();\n this.repeatAnimation(component);\n }\n else\n {\n // Repeat (happens before complete)\n component.forward = true;\n this.repeatAnimation(component);\n }\n }\n else\n {\n this.completeAnimation(component);\n }\n }\n else\n {\n this.updateAndGetNextTick(component, frame.prevFrame);\n }\n },\n\n /**\n * Update Frame and Wait next tick.\n *\n * @method Phaser.Animations.Animation#updateAndGetNextTick\n * @private\n * @since 3.12.0\n *\n * @param {Phaser.Animations.AnimationFrame} frame - An Animation frame.\n */\n updateAndGetNextTick: function (component, frame)\n {\n component.updateFrame(frame);\n\n this.getNextTick(component);\n },\n\n /**\n * Removes the given AnimationFrame from this Animation instance.\n * This is a global action. Any Game Object using this Animation will be impacted by this change.\n *\n * @method Phaser.Animations.Animation#removeFrame\n * @since 3.0.0\n *\n * @param {Phaser.Animations.AnimationFrame} frame - The AnimationFrame to be removed.\n *\n * @return {this} This Animation object.\n */\n removeFrame: function (frame)\n {\n var index = this.frames.indexOf(frame);\n\n if (index !== -1)\n {\n this.removeFrameAt(index);\n }\n\n return this;\n },\n\n /**\n * Removes a frame from the AnimationFrame array at the provided index\n * and updates the animation accordingly.\n *\n * @method Phaser.Animations.Animation#removeFrameAt\n * @since 3.0.0\n *\n * @param {integer} index - The index in the AnimationFrame array\n *\n * @return {this} This Animation object.\n */\n removeFrameAt: function (index)\n {\n this.frames.splice(index, 1);\n\n this.updateFrameSequence();\n\n return this;\n },\n\n /**\n * Called internally during playback. Forces the animation to repeat, providing there are enough counts left\n * in the repeat counter.\n *\n * @method Phaser.Animations.Animation#repeatAnimation\n * @fires Phaser.Animations.Events#ANIMATION_REPEAT\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_REPEAT\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\n */\n repeatAnimation: function (component)\n {\n if (component._pendingStop === 2)\n {\n return this.completeAnimation(component);\n }\n\n if (component._repeatDelay > 0 && component.pendingRepeat === false)\n {\n component.pendingRepeat = true;\n component.accumulator -= component.nextTick;\n component.nextTick += component._repeatDelay;\n }\n else\n {\n component.repeatCounter--;\n\n component.updateFrame(component.currentFrame[(component.forward) ? 'nextFrame' : 'prevFrame']);\n\n if (component.isPlaying)\n {\n this.getNextTick(component);\n\n component.pendingRepeat = false;\n\n var frame = component.currentFrame;\n var parent = component.parent;\n\n this.emit(Events.ANIMATION_REPEAT, this, frame);\n\n parent.emit(Events.SPRITE_ANIMATION_KEY_REPEAT + this.key, this, frame, component.repeatCounter, parent);\n\n parent.emit(Events.SPRITE_ANIMATION_REPEAT, this, frame, component.repeatCounter, parent);\n }\n }\n },\n\n /**\n * Sets the texture frame the animation uses for rendering.\n *\n * @method Phaser.Animations.Animation#setFrame\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\n */\n setFrame: function (component)\n {\n // Work out which frame should be set next on the child, and set it\n if (component.forward)\n {\n this.nextFrame(component);\n }\n else\n {\n this.previousFrame(component);\n }\n },\n\n /**\n * Converts the animation data to JSON.\n *\n * @method Phaser.Animations.Animation#toJSON\n * @since 3.0.0\n *\n * @return {Phaser.Types.Animations.JSONAnimation} The resulting JSONAnimation formatted object.\n */\n toJSON: function ()\n {\n var output = {\n key: this.key,\n type: this.type,\n frames: [],\n frameRate: this.frameRate,\n duration: this.duration,\n skipMissedFrames: this.skipMissedFrames,\n delay: this.delay,\n repeat: this.repeat,\n repeatDelay: this.repeatDelay,\n yoyo: this.yoyo,\n showOnStart: this.showOnStart,\n hideOnComplete: this.hideOnComplete\n };\n\n this.frames.forEach(function (frame)\n {\n output.frames.push(frame.toJSON());\n });\n\n return output;\n },\n\n /**\n * Called internally whenever frames are added to, or removed from, this Animation.\n *\n * @method Phaser.Animations.Animation#updateFrameSequence\n * @since 3.0.0\n *\n * @return {this} This Animation object.\n */\n updateFrameSequence: function ()\n {\n var len = this.frames.length;\n var slice = 1 / (len - 1);\n\n var frame;\n\n for (var i = 0; i < len; i++)\n {\n frame = this.frames[i];\n\n frame.index = i + 1;\n frame.isFirst = false;\n frame.isLast = false;\n frame.progress = i * slice;\n\n if (i === 0)\n {\n frame.isFirst = true;\n\n if (len === 1)\n {\n frame.isLast = true;\n frame.nextFrame = frame;\n frame.prevFrame = frame;\n }\n else\n {\n frame.isLast = false;\n frame.prevFrame = this.frames[len - 1];\n frame.nextFrame = this.frames[i + 1];\n }\n }\n else if (i === len - 1 && len > 1)\n {\n frame.isLast = true;\n frame.prevFrame = this.frames[len - 2];\n frame.nextFrame = this.frames[0];\n }\n else if (len > 1)\n {\n frame.prevFrame = this.frames[i - 1];\n frame.nextFrame = this.frames[i + 1];\n }\n }\n\n return this;\n },\n\n /**\n * Pauses playback of this Animation. The paused state is set immediately.\n *\n * @method Phaser.Animations.Animation#pause\n * @since 3.0.0\n *\n * @return {this} This Animation object.\n */\n pause: function ()\n {\n this.paused = true;\n\n return this;\n },\n\n /**\n * Resumes playback of this Animation. The paused state is reset immediately.\n *\n * @method Phaser.Animations.Animation#resume\n * @since 3.0.0\n *\n * @return {this} This Animation object.\n */\n resume: function ()\n {\n this.paused = false;\n\n return this;\n },\n\n /**\n * Destroys this Animation instance. It will remove all event listeners,\n * remove this animation and its key from the global Animation Manager,\n * and then destroy all Animation Frames in turn.\n *\n * @method Phaser.Animations.Animation#destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.removeAllListeners();\n\n this.manager.off(Events.PAUSE_ALL, this.pause, this);\n this.manager.off(Events.RESUME_ALL, this.resume, this);\n\n this.manager.remove(this.key);\n\n for (var i = 0; i < this.frames.length; i++)\n {\n this.frames[i].destroy();\n }\n\n this.frames = [];\n\n this.manager = null;\n }\n\n});\n\nmodule.exports = Animation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\n\n/**\n * @classdesc\n * A single frame in an Animation sequence.\n *\n * An AnimationFrame consists of a reference to the Texture it uses for rendering, references to other\n * frames in the animation, and index data. It also has the ability to modify the animation timing.\n *\n * AnimationFrames are generated automatically by the Animation class.\n *\n * @class AnimationFrame\n * @memberof Phaser.Animations\n * @constructor\n * @since 3.0.0\n *\n * @param {string} textureKey - The key of the Texture this AnimationFrame uses.\n * @param {(string|integer)} textureFrame - The key of the Frame within the Texture that this AnimationFrame uses.\n * @param {integer} index - The index of this AnimationFrame within the Animation sequence.\n * @param {Phaser.Textures.Frame} frame - A reference to the Texture Frame this AnimationFrame uses for rendering.\n */\nvar AnimationFrame = new Class({\n\n initialize:\n\n function AnimationFrame (textureKey, textureFrame, index, frame)\n {\n /**\n * The key of the Texture this AnimationFrame uses.\n *\n * @name Phaser.Animations.AnimationFrame#textureKey\n * @type {string}\n * @since 3.0.0\n */\n this.textureKey = textureKey;\n\n /**\n * The key of the Frame within the Texture that this AnimationFrame uses.\n *\n * @name Phaser.Animations.AnimationFrame#textureFrame\n * @type {(string|integer)}\n * @since 3.0.0\n */\n this.textureFrame = textureFrame;\n\n /**\n * The index of this AnimationFrame within the Animation sequence.\n *\n * @name Phaser.Animations.AnimationFrame#index\n * @type {integer}\n * @since 3.0.0\n */\n this.index = index;\n\n /**\n * A reference to the Texture Frame this AnimationFrame uses for rendering.\n *\n * @name Phaser.Animations.AnimationFrame#frame\n * @type {Phaser.Textures.Frame}\n * @since 3.0.0\n */\n this.frame = frame;\n\n /**\n * Is this the first frame in an animation sequence?\n *\n * @name Phaser.Animations.AnimationFrame#isFirst\n * @type {boolean}\n * @default false\n * @readonly\n * @since 3.0.0\n */\n this.isFirst = false;\n\n /**\n * Is this the last frame in an animation sequence?\n *\n * @name Phaser.Animations.AnimationFrame#isLast\n * @type {boolean}\n * @default false\n * @readonly\n * @since 3.0.0\n */\n this.isLast = false;\n\n /**\n * A reference to the AnimationFrame that comes before this one in the animation, if any.\n *\n * @name Phaser.Animations.AnimationFrame#prevFrame\n * @type {?Phaser.Animations.AnimationFrame}\n * @default null\n * @readonly\n * @since 3.0.0\n */\n this.prevFrame = null;\n\n /**\n * A reference to the AnimationFrame that comes after this one in the animation, if any.\n *\n * @name Phaser.Animations.AnimationFrame#nextFrame\n * @type {?Phaser.Animations.AnimationFrame}\n * @default null\n * @readonly\n * @since 3.0.0\n */\n this.nextFrame = null;\n\n /**\n * Additional time (in ms) that this frame should appear for during playback.\n * The value is added onto the msPerFrame set by the animation.\n *\n * @name Phaser.Animations.AnimationFrame#duration\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.duration = 0;\n\n /**\n * What % through the animation does this frame come?\n * This value is generated when the animation is created and cached here.\n *\n * @name Phaser.Animations.AnimationFrame#progress\n * @type {number}\n * @default 0\n * @readonly\n * @since 3.0.0\n */\n this.progress = 0;\n },\n\n /**\n * Generates a JavaScript object suitable for converting to JSON.\n *\n * @method Phaser.Animations.AnimationFrame#toJSON\n * @since 3.0.0\n *\n * @return {Phaser.Types.Animations.JSONAnimationFrame} The AnimationFrame data.\n */\n toJSON: function ()\n {\n return {\n key: this.textureKey,\n frame: this.textureFrame,\n duration: this.duration\n };\n },\n\n /**\n * Destroys this object by removing references to external resources and callbacks.\n *\n * @method Phaser.Animations.AnimationFrame#destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.frame = undefined;\n }\n\n});\n\nmodule.exports = AnimationFrame;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Add Animation Event.\n * \n * This event is dispatched when a new animation is added to the global Animation Manager.\n * \n * This can happen either as a result of an animation instance being added to the Animation Manager,\n * or the Animation Manager creating a new animation directly.\n *\n * @event Phaser.Animations.Events#ADD_ANIMATION\n * @since 3.0.0\n * \n * @param {string} key - The key of the Animation that was added to the global Animation Manager.\n * @param {Phaser.Animations.Animation} animation - An instance of the newly created Animation.\n */\nmodule.exports = 'add';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Animation Complete Event.\n * \n * This event is dispatched by an Animation instance when it completes, i.e. finishes playing or is manually stopped.\n * \n * Be careful with the volume of events this could generate. If a group of Sprites all complete the same\n * animation at the same time, this event will invoke its handler for each one of them.\n *\n * @event Phaser.Animations.Events#ANIMATION_COMPLETE\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed.\n */\nmodule.exports = 'complete';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Animation Repeat Event.\n * \n * This event is dispatched when a currently playing animation repeats.\n * \n * The event is dispatched directly from the Animation object itself. Which means that listeners\n * bound to this event will be invoked every time the Animation repeats, for every Game Object that may have it.\n *\n * @event Phaser.Animations.Events#ANIMATION_REPEAT\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that repeated.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation was on when it repeated.\n */\nmodule.exports = 'repeat';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Animation Restart Event.\n * \n * This event is dispatched by an Animation instance when it restarts.\n * \n * Be careful with the volume of events this could generate. If a group of Sprites all restart the same\n * animation at the same time, this event will invoke its handler for each one of them.\n *\n * @event Phaser.Animations.Events#ANIMATION_RESTART\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that restarted playing.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing.\n */\nmodule.exports = 'restart';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Animation Start Event.\n * \n * This event is dispatched by an Animation instance when it starts playing.\n * \n * Be careful with the volume of events this could generate. If a group of Sprites all play the same\n * animation at the same time, this event will invoke its handler for each one of them.\n *\n * @event Phaser.Animations.Events#ANIMATION_START\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that started playing.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing.\n */\nmodule.exports = 'start';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Pause All Animations Event.\n * \n * This event is dispatched when the global Animation Manager is told to pause.\n * \n * When this happens all current animations will stop updating, although it doesn't necessarily mean\n * that the game has paused as well.\n *\n * @event Phaser.Animations.Events#PAUSE_ALL\n * @since 3.0.0\n */\nmodule.exports = 'pauseall';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Remove Animation Event.\n * \n * This event is dispatched when an animation is removed from the global Animation Manager.\n *\n * @event Phaser.Animations.Events#REMOVE_ANIMATION\n * @since 3.0.0\n * \n * @param {string} key - The key of the Animation that was removed from the global Animation Manager.\n * @param {Phaser.Animations.Animation} animation - An instance of the removed Animation.\n */\nmodule.exports = 'remove';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Resume All Animations Event.\n * \n * This event is dispatched when the global Animation Manager resumes, having been previously paused.\n * \n * When this happens all current animations will continue updating again.\n *\n * @event Phaser.Animations.Events#RESUME_ALL\n * @since 3.0.0\n */\nmodule.exports = 'resumeall';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Complete Event.\n * \n * This event is dispatched by a Sprite when an animation finishes playing on it.\n * \n * Listen for it on the Sprite using `sprite.on('animationcomplete', listener)`\n * \n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_COMPLETE` event.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_COMPLETE\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed.\n */\nmodule.exports = 'animationcomplete';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Key Complete Event.\n * \n * This event is dispatched by a Sprite when a specific animation finishes playing on it.\n * \n * Listen for it on the Sprite using `sprite.on('animationcomplete-key', listener)` where `key` is the key of\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationcomplete-explode`.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_COMPLETE\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed.\n */\nmodule.exports = 'animationcomplete-';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Key Repeat Event.\n * \n * This event is dispatched by a Sprite when a specific animation repeats playing on it.\n * \n * Listen for it on the Sprite using `sprite.on('animationrepeat-key', listener)` where `key` is the key of\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrepeat-explode`.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\n * @param {integer} repeatCount - The number of times the Animation has repeated so far.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing.\n */\nmodule.exports = 'animationrepeat-';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Key Restart Event.\n * \n * This event is dispatched by a Sprite when a specific animation restarts playing on it.\n * \n * Listen for it on the Sprite using `sprite.on('animationrestart-key', listener)` where `key` is the key of\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrestart-explode`.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing.\n */\nmodule.exports = 'animationrestart-';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Key Start Event.\n * \n * This event is dispatched by a Sprite when a specific animation starts playing on it.\n * \n * Listen for it on the Sprite using `sprite.on('animationstart-key', listener)` where `key` is the key of\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationstart-explode`.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing.\n */\nmodule.exports = 'animationstart-';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Key Update Event.\n * \n * This event is dispatched by a Sprite when a specific animation playing on it updates. This happens when the animation changes frame,\n * based on the animation frame rate and other factors like `timeScale` and `delay`.\n * \n * Listen for it on the Sprite using `sprite.on('animationupdate-key', listener)` where `key` is the key of\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationupdate-explode`.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated.\n */\nmodule.exports = 'animationupdate-';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Repeat Event.\n * \n * This event is dispatched by a Sprite when an animation repeats playing on it.\n * \n * Listen for it on the Sprite using `sprite.on('animationrepeat', listener)`\n * \n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_REPEAT` event.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_REPEAT\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\n * @param {integer} repeatCount - The number of times the Animation has repeated so far.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing.\n */\nmodule.exports = 'animationrepeat';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Restart Event.\n * \n * This event is dispatched by a Sprite when an animation restarts playing on it.\n * \n * Listen for it on the Sprite using `sprite.on('animationrestart', listener)`\n * \n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_RESTART` event.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_RESTART\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing.\n */\nmodule.exports = 'animationrestart';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Start Event.\n * \n * This event is dispatched by a Sprite when an animation starts playing on it.\n * \n * Listen for it on the Sprite using `sprite.on('animationstart', listener)`\n * \n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_START` event.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_START\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing.\n */\nmodule.exports = 'animationstart';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Update Event.\n * \n * This event is dispatched by a Sprite when an animation playing on it updates. This happens when the animation changes frame,\n * based on the animation frame rate and other factors like `timeScale` and `delay`.\n * \n * Listen for it on the Sprite using `sprite.on('animationupdate', listener)`\n * \n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_UPDATE` event.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated.\n */\nmodule.exports = 'animationupdate';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Animations.Events\n */\n\nmodule.exports = {\n\n ADD_ANIMATION: require('./ADD_ANIMATION_EVENT'),\n ANIMATION_COMPLETE: require('./ANIMATION_COMPLETE_EVENT'),\n ANIMATION_REPEAT: require('./ANIMATION_REPEAT_EVENT'),\n ANIMATION_RESTART: require('./ANIMATION_RESTART_EVENT'),\n ANIMATION_START: require('./ANIMATION_START_EVENT'),\n PAUSE_ALL: require('./PAUSE_ALL_EVENT'),\n REMOVE_ANIMATION: require('./REMOVE_ANIMATION_EVENT'),\n RESUME_ALL: require('./RESUME_ALL_EVENT'),\n SPRITE_ANIMATION_COMPLETE: require('./SPRITE_ANIMATION_COMPLETE_EVENT'),\n SPRITE_ANIMATION_KEY_COMPLETE: require('./SPRITE_ANIMATION_KEY_COMPLETE_EVENT'),\n SPRITE_ANIMATION_KEY_REPEAT: require('./SPRITE_ANIMATION_KEY_REPEAT_EVENT'),\n SPRITE_ANIMATION_KEY_RESTART: require('./SPRITE_ANIMATION_KEY_RESTART_EVENT'),\n SPRITE_ANIMATION_KEY_START: require('./SPRITE_ANIMATION_KEY_START_EVENT'),\n SPRITE_ANIMATION_KEY_UPDATE: require('./SPRITE_ANIMATION_KEY_UPDATE_EVENT'),\n SPRITE_ANIMATION_REPEAT: require('./SPRITE_ANIMATION_REPEAT_EVENT'),\n SPRITE_ANIMATION_RESTART: require('./SPRITE_ANIMATION_RESTART_EVENT'),\n SPRITE_ANIMATION_START: require('./SPRITE_ANIMATION_START_EVENT'),\n SPRITE_ANIMATION_UPDATE: require('./SPRITE_ANIMATION_UPDATE_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Blur Event.\n * \n * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded\n * enters a blurred state. The blur event is raised when the window loses focus. This can happen if a user swaps\n * tab, or if they simply remove focus from the browser to another app.\n *\n * @event Phaser.Core.Events#BLUR\n * @since 3.0.0\n */\nmodule.exports = 'blur';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Boot Event.\n * \n * This event is dispatched when the Phaser Game instance has finished booting, but before it is ready to start running.\n * The global systems use this event to know when to set themselves up, dispatching their own `ready` events as required.\n *\n * @event Phaser.Core.Events#BOOT\n * @since 3.0.0\n */\nmodule.exports = 'boot';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Context Lost Event.\n * \n * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Lost event from the browser.\n * \n * The partner event is `CONTEXT_RESTORED`.\n *\n * @event Phaser.Core.Events#CONTEXT_LOST\n * @since 3.19.0\n */\nmodule.exports = 'contextlost';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Context Restored Event.\n * \n * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Restored event from the browser.\n * \n * The partner event is `CONTEXT_LOST`.\n *\n * @event Phaser.Core.Events#CONTEXT_RESTORED\n * @since 3.19.0\n */\nmodule.exports = 'contextrestored';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Destroy Event.\n * \n * This event is dispatched when the game instance has been told to destroy itself.\n * Lots of internal systems listen to this event in order to clear themselves out.\n * Custom plugins and game code should also do the same.\n *\n * @event Phaser.Core.Events#DESTROY\n * @since 3.0.0\n */\nmodule.exports = 'destroy';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Focus Event.\n * \n * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded\n * enters a focused state. The focus event is raised when the window re-gains focus, having previously lost it.\n *\n * @event Phaser.Core.Events#FOCUS\n * @since 3.0.0\n */\nmodule.exports = 'focus';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Hidden Event.\n * \n * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded\n * enters a hidden state. Only browsers that support the Visibility API will cause this event to be emitted.\n * \n * In most modern browsers, when the document enters a hidden state, the Request Animation Frame and setTimeout, which\n * control the main game loop, will automatically pause. There is no way to stop this from happening. It is something\n * your game should account for in its own code, should the pause be an issue (i.e. for multiplayer games)\n *\n * @event Phaser.Core.Events#HIDDEN\n * @since 3.0.0\n */\nmodule.exports = 'hidden';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Pause Event.\n * \n * This event is dispatched when the Game loop enters a paused state, usually as a result of the Visibility Handler.\n *\n * @event Phaser.Core.Events#PAUSE\n * @since 3.0.0\n */\nmodule.exports = 'pause';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Post-Render Event.\n * \n * This event is dispatched right at the end of the render process.\n * \n * Every Scene will have rendered and been drawn to the canvas by the time this event is fired.\n * Use it for any last minute post-processing before the next game step begins.\n *\n * @event Phaser.Core.Events#POST_RENDER\n * @since 3.0.0\n * \n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - A reference to the current renderer being used by the Game instance.\n */\nmodule.exports = 'postrender';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Post-Step Event.\n * \n * This event is dispatched after the Scene Manager has updated.\n * Hook into it from plugins or systems that need to do things before the render starts.\n *\n * @event Phaser.Core.Events#POST_STEP\n * @since 3.0.0\n * \n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\n */\nmodule.exports = 'poststep';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Pre-Render Event.\n * \n * This event is dispatched immediately before any of the Scenes have started to render.\n * \n * The renderer will already have been initialized this frame, clearing itself and preparing to receive the Scenes for rendering, but it won't have actually drawn anything yet.\n *\n * @event Phaser.Core.Events#PRE_RENDER\n * @since 3.0.0\n * \n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - A reference to the current renderer being used by the Game instance.\n */\nmodule.exports = 'prerender';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Pre-Step Event.\n * \n * This event is dispatched before the main Game Step starts. By this point in the game cycle none of the Scene updates have yet happened.\n * Hook into it from plugins or systems that need to update before the Scene Manager does.\n *\n * @event Phaser.Core.Events#PRE_STEP\n * @since 3.0.0\n * \n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\n */\nmodule.exports = 'prestep';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Ready Event.\n * \n * This event is dispatched when the Phaser Game instance has finished booting, the Texture Manager is fully ready,\n * and all local systems are now able to start.\n *\n * @event Phaser.Core.Events#READY\n * @since 3.0.0\n */\nmodule.exports = 'ready';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Resume Event.\n * \n * This event is dispatched when the game loop leaves a paused state and resumes running.\n *\n * @event Phaser.Core.Events#RESUME\n * @since 3.0.0\n */\nmodule.exports = 'resume';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Step Event.\n * \n * This event is dispatched after the Game Pre-Step and before the Scene Manager steps.\n * Hook into it from plugins or systems that need to update before the Scene Manager does, but after the core Systems have.\n *\n * @event Phaser.Core.Events#STEP\n * @since 3.0.0\n * \n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\n */\nmodule.exports = 'step';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Visible Event.\n * \n * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded\n * enters a visible state, previously having been hidden.\n * \n * Only browsers that support the Visibility API will cause this event to be emitted.\n *\n * @event Phaser.Core.Events#VISIBLE\n * @since 3.0.0\n */\nmodule.exports = 'visible';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Core.Events\n */\n\nmodule.exports = {\n\n BLUR: require('./BLUR_EVENT'),\n BOOT: require('./BOOT_EVENT'),\n CONTEXT_LOST: require('./CONTEXT_LOST_EVENT'),\n CONTEXT_RESTORED: require('./CONTEXT_RESTORED_EVENT'),\n DESTROY: require('./DESTROY_EVENT'),\n FOCUS: require('./FOCUS_EVENT'),\n HIDDEN: require('./HIDDEN_EVENT'),\n PAUSE: require('./PAUSE_EVENT'),\n POST_RENDER: require('./POST_RENDER_EVENT'),\n POST_STEP: require('./POST_STEP_EVENT'),\n PRE_RENDER: require('./PRE_RENDER_EVENT'),\n PRE_STEP: require('./PRE_STEP_EVENT'),\n READY: require('./READY_EVENT'),\n RESUME: require('./RESUME_EVENT'),\n STEP: require('./STEP_EVENT'),\n VISIBLE: require('./VISIBLE_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar Events = require('./events');\n\n/**\n * @callback DataEachCallback\n *\n * @param {*} parent - The parent object of the DataManager.\n * @param {string} key - The key of the value.\n * @param {*} value - The value.\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\n */\n\n/**\n * @classdesc\n * The Data Manager Component features a means to store pieces of data specific to a Game Object, System or Plugin.\n * You can then search, query it, and retrieve the data. The parent must either extend EventEmitter,\n * or have a property called `events` that is an instance of it.\n *\n * @class DataManager\n * @memberof Phaser.Data\n * @constructor\n * @since 3.0.0\n *\n * @param {object} parent - The object that this DataManager belongs to.\n * @param {Phaser.Events.EventEmitter} [eventEmitter] - The DataManager's event emitter.\n */\nvar DataManager = new Class({\n\n initialize:\n\n function DataManager (parent, eventEmitter)\n {\n /**\n * The object that this DataManager belongs to.\n *\n * @name Phaser.Data.DataManager#parent\n * @type {*}\n * @since 3.0.0\n */\n this.parent = parent;\n\n /**\n * The DataManager's event emitter.\n *\n * @name Phaser.Data.DataManager#events\n * @type {Phaser.Events.EventEmitter}\n * @since 3.0.0\n */\n this.events = eventEmitter;\n\n if (!eventEmitter)\n {\n this.events = (parent.events) ? parent.events : parent;\n }\n\n /**\n * The data list.\n *\n * @name Phaser.Data.DataManager#list\n * @type {Object.}\n * @default {}\n * @since 3.0.0\n */\n this.list = {};\n\n /**\n * The public values list. You can use this to access anything you have stored\n * in this Data Manager. For example, if you set a value called `gold` you can\n * access it via:\n *\n * ```javascript\n * this.data.values.gold;\n * ```\n *\n * You can also modify it directly:\n * \n * ```javascript\n * this.data.values.gold += 1000;\n * ```\n *\n * Doing so will emit a `setdata` event from the parent of this Data Manager.\n * \n * Do not modify this object directly. Adding properties directly to this object will not\n * emit any events. Always use `DataManager.set` to create new items the first time around.\n *\n * @name Phaser.Data.DataManager#values\n * @type {Object.}\n * @default {}\n * @since 3.10.0\n */\n this.values = {};\n\n /**\n * Whether setting data is frozen for this DataManager.\n *\n * @name Phaser.Data.DataManager#_frozen\n * @type {boolean}\n * @private\n * @default false\n * @since 3.0.0\n */\n this._frozen = false;\n\n if (!parent.hasOwnProperty('sys') && this.events)\n {\n this.events.once('destroy', this.destroy, this);\n }\n },\n\n /**\n * Retrieves the value for the given key, or undefined if it doesn't exist.\n *\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\n * \n * ```javascript\n * this.data.get('gold');\n * ```\n *\n * Or access the value directly:\n * \n * ```javascript\n * this.data.values.gold;\n * ```\n *\n * You can also pass in an array of keys, in which case an array of values will be returned:\n * \n * ```javascript\n * this.data.get([ 'gold', 'armor', 'health' ]);\n * ```\n *\n * This approach is useful for destructuring arrays in ES6.\n *\n * @method Phaser.Data.DataManager#get\n * @since 3.0.0\n *\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\n *\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\n */\n get: function (key)\n {\n var list = this.list;\n\n if (Array.isArray(key))\n {\n var output = [];\n\n for (var i = 0; i < key.length; i++)\n {\n output.push(list[key[i]]);\n }\n\n return output;\n }\n else\n {\n return list[key];\n }\n },\n\n /**\n * Retrieves all data values in a new object.\n *\n * @method Phaser.Data.DataManager#getAll\n * @since 3.0.0\n *\n * @return {Object.} All data values.\n */\n getAll: function ()\n {\n var results = {};\n\n for (var key in this.list)\n {\n if (this.list.hasOwnProperty(key))\n {\n results[key] = this.list[key];\n }\n }\n\n return results;\n },\n\n /**\n * Queries the DataManager for the values of keys matching the given regular expression.\n *\n * @method Phaser.Data.DataManager#query\n * @since 3.0.0\n *\n * @param {RegExp} search - A regular expression object. If a non-RegExp object obj is passed, it is implicitly converted to a RegExp by using new RegExp(obj).\n *\n * @return {Object.} The values of the keys matching the search string.\n */\n query: function (search)\n {\n var results = {};\n\n for (var key in this.list)\n {\n if (this.list.hasOwnProperty(key) && key.match(search))\n {\n results[key] = this.list[key];\n }\n }\n\n return results;\n },\n\n /**\n * Sets a value for the given key. If the key doesn't already exist in the Data Manager then it is created.\n * \n * ```javascript\n * data.set('name', 'Red Gem Stone');\n * ```\n *\n * You can also pass in an object of key value pairs as the first argument:\n *\n * ```javascript\n * data.set({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\n * ```\n *\n * To get a value back again you can call `get`:\n * \n * ```javascript\n * data.get('gold');\n * ```\n * \n * Or you can access the value directly via the `values` property, where it works like any other variable:\n * \n * ```javascript\n * data.values.gold += 50;\n * ```\n *\n * When the value is first set, a `setdata` event is emitted.\n *\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\n *\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\n *\n * @method Phaser.Data.DataManager#set\n * @fires Phaser.Data.Events#SET_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\n * @since 3.0.0\n *\n * @param {(string|object)} key - The key to set the value for. Or an object or key value pairs. If an object the `data` argument is ignored.\n * @param {*} data - The value to set for the given key. If an object is provided as the key this argument is ignored.\n *\n * @return {this} This DataManager object.\n */\n set: function (key, data)\n {\n if (this._frozen)\n {\n return this;\n }\n\n if (typeof key === 'string')\n {\n return this.setValue(key, data);\n }\n else\n {\n for (var entry in key)\n {\n this.setValue(entry, key[entry]);\n }\n }\n\n return this;\n },\n\n /**\n * Increase a value for the given key. If the key doesn't already exist in the Data Manager then it is increased from 0.\n * \n * When the value is first set, a `setdata` event is emitted.\n * \n * @method Phaser.Data.DataManager#inc\n * @fires Phaser.Data.Events#SET_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\n * @since 3.23.0\n *\n * @param {(string|object)} key - The key to increase the value for.\n * @param {*} [data] - The value to increase for the given key.\n *\n * @return {Phaser.Data.DataManager} This DataManager object.\n */\n inc: function (key, data)\n {\n if (this._frozen)\n {\n return this;\n }\n\n if (data === undefined)\n {\n data = 1;\n }\n\n var value = this.get(key);\n if (value === undefined)\n {\n value = 0;\n }\n\n this.set(key, (value + data));\n\n return this;\n },\n\n /**\n * Toggle a boolean value for the given key. If the key doesn't already exist in the Data Manager then it is toggled from false.\n * \n * When the value is first set, a `setdata` event is emitted.\n * \n * @method Phaser.Data.DataManager#toggle\n * @fires Phaser.Data.Events#SET_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\n * @since 3.23.0\n *\n * @param {(string|object)} key - The key to toggle the value for.\n *\n * @return {Phaser.Data.DataManager} This DataManager object.\n */\n toggle: function (key)\n {\n if (this._frozen)\n {\n return this;\n }\n\n this.set(key, !this.get(key));\n\n return this;\n },\n\n /**\n * Internal value setter, called automatically by the `set` method.\n *\n * @method Phaser.Data.DataManager#setValue\n * @fires Phaser.Data.Events#SET_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\n * @private\n * @since 3.10.0\n *\n * @param {string} key - The key to set the value for.\n * @param {*} data - The value to set.\n *\n * @return {this} This DataManager object.\n */\n setValue: function (key, data)\n {\n if (this._frozen)\n {\n return this;\n }\n\n if (this.has(key))\n {\n // Hit the key getter, which will in turn emit the events.\n this.values[key] = data;\n }\n else\n {\n var _this = this;\n var list = this.list;\n var events = this.events;\n var parent = this.parent;\n\n Object.defineProperty(this.values, key, {\n\n enumerable: true,\n \n configurable: true,\n\n get: function ()\n {\n return list[key];\n },\n\n set: function (value)\n {\n if (!_this._frozen)\n {\n var previousValue = list[key];\n list[key] = value;\n\n events.emit(Events.CHANGE_DATA, parent, key, value, previousValue);\n events.emit(Events.CHANGE_DATA_KEY + key, parent, value, previousValue);\n }\n }\n\n });\n\n list[key] = data;\n\n events.emit(Events.SET_DATA, parent, key, data);\n }\n\n return this;\n },\n\n /**\n * Passes all data entries to the given callback.\n *\n * @method Phaser.Data.DataManager#each\n * @since 3.0.0\n *\n * @param {DataEachCallback} callback - The function to call.\n * @param {*} [context] - Value to use as `this` when executing callback.\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\n *\n * @return {this} This DataManager object.\n */\n each: function (callback, context)\n {\n var args = [ this.parent, null, undefined ];\n\n for (var i = 1; i < arguments.length; i++)\n {\n args.push(arguments[i]);\n }\n\n for (var key in this.list)\n {\n args[1] = key;\n args[2] = this.list[key];\n\n callback.apply(context, args);\n }\n\n return this;\n },\n\n /**\n * Merge the given object of key value pairs into this DataManager.\n *\n * Any newly created values will emit a `setdata` event. Any updated values (see the `overwrite` argument)\n * will emit a `changedata` event.\n *\n * @method Phaser.Data.DataManager#merge\n * @fires Phaser.Data.Events#SET_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\n * @since 3.0.0\n *\n * @param {Object.} data - The data to merge.\n * @param {boolean} [overwrite=true] - Whether to overwrite existing data. Defaults to true.\n *\n * @return {this} This DataManager object.\n */\n merge: function (data, overwrite)\n {\n if (overwrite === undefined) { overwrite = true; }\n\n // Merge data from another component into this one\n for (var key in data)\n {\n if (data.hasOwnProperty(key) && (overwrite || (!overwrite && !this.has(key))))\n {\n this.setValue(key, data[key]);\n }\n }\n\n return this;\n },\n\n /**\n * Remove the value for the given key.\n *\n * If the key is found in this Data Manager it is removed from the internal lists and a\n * `removedata` event is emitted.\n * \n * You can also pass in an array of keys, in which case all keys in the array will be removed:\n * \n * ```javascript\n * this.data.remove([ 'gold', 'armor', 'health' ]);\n * ```\n *\n * @method Phaser.Data.DataManager#remove\n * @fires Phaser.Data.Events#REMOVE_DATA\n * @since 3.0.0\n *\n * @param {(string|string[])} key - The key to remove, or an array of keys to remove.\n *\n * @return {this} This DataManager object.\n */\n remove: function (key)\n {\n if (this._frozen)\n {\n return this;\n }\n\n if (Array.isArray(key))\n {\n for (var i = 0; i < key.length; i++)\n {\n this.removeValue(key[i]);\n }\n }\n else\n {\n return this.removeValue(key);\n }\n\n return this;\n },\n\n /**\n * Internal value remover, called automatically by the `remove` method.\n *\n * @method Phaser.Data.DataManager#removeValue\n * @private\n * @fires Phaser.Data.Events#REMOVE_DATA\n * @since 3.10.0\n *\n * @param {string} key - The key to set the value for.\n *\n * @return {this} This DataManager object.\n */\n removeValue: function (key)\n {\n if (this.has(key))\n {\n var data = this.list[key];\n\n delete this.list[key];\n delete this.values[key];\n\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\n }\n\n return this;\n },\n\n /**\n * Retrieves the data associated with the given 'key', deletes it from this Data Manager, then returns it.\n *\n * @method Phaser.Data.DataManager#pop\n * @fires Phaser.Data.Events#REMOVE_DATA\n * @since 3.0.0\n *\n * @param {string} key - The key of the value to retrieve and delete.\n *\n * @return {*} The value of the given key.\n */\n pop: function (key)\n {\n var data = undefined;\n\n if (!this._frozen && this.has(key))\n {\n data = this.list[key];\n\n delete this.list[key];\n delete this.values[key];\n\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\n }\n\n return data;\n },\n\n /**\n * Determines whether the given key is set in this Data Manager.\n * \n * Please note that the keys are case-sensitive and must be valid JavaScript Object property strings.\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\n *\n * @method Phaser.Data.DataManager#has\n * @since 3.0.0\n *\n * @param {string} key - The key to check.\n *\n * @return {boolean} Returns `true` if the key exists, otherwise `false`.\n */\n has: function (key)\n {\n return this.list.hasOwnProperty(key);\n },\n\n /**\n * Freeze or unfreeze this Data Manager. A frozen Data Manager will block all attempts\n * to create new values or update existing ones.\n *\n * @method Phaser.Data.DataManager#setFreeze\n * @since 3.0.0\n *\n * @param {boolean} value - Whether to freeze or unfreeze the Data Manager.\n *\n * @return {this} This DataManager object.\n */\n setFreeze: function (value)\n {\n this._frozen = value;\n\n return this;\n },\n\n /**\n * Delete all data in this Data Manager and unfreeze it.\n *\n * @method Phaser.Data.DataManager#reset\n * @since 3.0.0\n *\n * @return {this} This DataManager object.\n */\n reset: function ()\n {\n for (var key in this.list)\n {\n delete this.list[key];\n delete this.values[key];\n }\n\n this._frozen = false;\n\n return this;\n },\n\n /**\n * Destroy this data manager.\n *\n * @method Phaser.Data.DataManager#destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.reset();\n\n this.events.off(Events.CHANGE_DATA);\n this.events.off(Events.SET_DATA);\n this.events.off(Events.REMOVE_DATA);\n\n this.parent = null;\n },\n\n /**\n * Gets or sets the frozen state of this Data Manager.\n * A frozen Data Manager will block all attempts to create new values or update existing ones.\n *\n * @name Phaser.Data.DataManager#freeze\n * @type {boolean}\n * @since 3.0.0\n */\n freeze: {\n\n get: function ()\n {\n return this._frozen;\n },\n\n set: function (value)\n {\n this._frozen = (value) ? true : false;\n }\n\n },\n\n /**\n * Return the total number of entries in this Data Manager.\n *\n * @name Phaser.Data.DataManager#count\n * @type {integer}\n * @since 3.0.0\n */\n count: {\n\n get: function ()\n {\n var i = 0;\n\n for (var key in this.list)\n {\n if (this.list[key] !== undefined)\n {\n i++;\n }\n }\n\n return i;\n }\n\n }\n\n});\n\nmodule.exports = DataManager;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Change Data Event.\n * \n * This event is dispatched by a Data Manager when an item in the data store is changed.\n * \n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\n * a change data event from a Game Object you would use: `sprite.data.on('changedata', listener)`.\n * \n * This event is dispatched for all items that change in the Data Manager.\n * To listen for the change of a specific item, use the `CHANGE_DATA_KEY_EVENT` event.\n *\n * @event Phaser.Data.Events#CHANGE_DATA\n * @since 3.0.0\n * \n * @param {any} parent - A reference to the object that the Data Manager responsible for this event belongs to.\n * @param {string} key - The unique key of the data item within the Data Manager.\n * @param {any} value - The new value of the item in the Data Manager.\n * @param {any} previousValue - The previous value of the item in the Data Manager.\n */\nmodule.exports = 'changedata';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Change Data Key Event.\n * \n * This event is dispatched by a Data Manager when an item in the data store is changed.\n * \n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\n * the change of a specific data item from a Game Object you would use: `sprite.data.on('changedata-key', listener)`,\n * where `key` is the unique string key of the data item. For example, if you have a data item stored called `gold`\n * then you can listen for `sprite.data.on('changedata-gold')`.\n *\n * @event Phaser.Data.Events#CHANGE_DATA_KEY\n * @since 3.16.1\n * \n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\n * @param {any} value - The item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\n * @param {any} previousValue - The previous item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\n */\nmodule.exports = 'changedata-';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Remove Data Event.\n * \n * This event is dispatched by a Data Manager when an item is removed from it.\n * \n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\n * the removal of a data item on a Game Object you would use: `sprite.data.on('removedata', listener)`.\n *\n * @event Phaser.Data.Events#REMOVE_DATA\n * @since 3.0.0\n * \n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\n * @param {string} key - The unique key of the data item within the Data Manager.\n * @param {any} data - The item that was removed from the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\n */\nmodule.exports = 'removedata';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Set Data Event.\n * \n * This event is dispatched by a Data Manager when a new item is added to the data store.\n * \n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\n * the addition of a new data item on a Game Object you would use: `sprite.data.on('setdata', listener)`.\n *\n * @event Phaser.Data.Events#SET_DATA\n * @since 3.0.0\n * \n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\n * @param {string} key - The unique key of the data item within the Data Manager.\n * @param {any} data - The item that was added to the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\n */\nmodule.exports = 'setdata';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Data.Events\n */\n\nmodule.exports = {\n\n CHANGE_DATA: require('./CHANGE_DATA_EVENT'),\n CHANGE_DATA_KEY: require('./CHANGE_DATA_KEY_EVENT'),\n REMOVE_DATA: require('./REMOVE_DATA_EVENT'),\n SET_DATA: require('./SET_DATA_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Given a hex color value, such as 0xff00ff (for purple), it will return a\n * numeric representation of it (i.e. 16711935) for use in WebGL tinting.\n *\n * @function Phaser.Display.Color.GetColorFromValue\n * @since 3.50.0\n *\n * @param {number} red - The hex color value, such as 0xff0000.\n *\n * @return {number} The combined color value.\n */\nvar GetColorFromValue = function (value)\n{\n return (value >> 16) + (value & 0xff00) + ((value & 0xff) << 16);\n};\n\nmodule.exports = GetColorFromValue;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar GameEvents = require('../../core/events');\n\n/**\n * @classdesc\n * A Bitmap Mask combines the alpha (opacity) of a masked pixel with the alpha of another pixel.\n * Unlike the Geometry Mask, which is a clipping path, a Bitmap Mask behaves like an alpha mask,\n * not a clipping path. It is only available when using the WebGL Renderer.\n *\n * A Bitmap Mask can use any Game Object to determine the alpha of each pixel of the masked Game Object(s).\n * For any given point of a masked Game Object's texture, the pixel's alpha will be multiplied by the alpha\n * of the pixel at the same position in the Bitmap Mask's Game Object. The color of the pixel from the\n * Bitmap Mask doesn't matter.\n *\n * For example, if a pure blue pixel with an alpha of 0.95 is masked with a pure red pixel with an\n * alpha of 0.5, the resulting pixel will be pure blue with an alpha of 0.475. Naturally, this means\n * that a pixel in the mask with an alpha of 0 will hide the corresponding pixel in all masked Game Objects\n * A pixel with an alpha of 1 in the masked Game Object will receive the same alpha as the\n * corresponding pixel in the mask.\n *\n * The Bitmap Mask's location matches the location of its Game Object, not the location of the\n * masked objects. Moving or transforming the underlying Game Object will change the mask\n * (and affect the visibility of any masked objects), whereas moving or transforming a masked object\n * will not affect the mask.\n *\n * The Bitmap Mask will not render its Game Object by itself. If the Game Object is not in a\n * Scene's display list, it will only be used for the mask and its full texture will not be directly\n * visible. Adding the underlying Game Object to a Scene will not cause any problems - it will\n * render as a normal Game Object and will also serve as a mask.\n *\n * @class BitmapMask\n * @memberof Phaser.Display.Masks\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Scene} scene - The Scene which this Bitmap Mask will be used in.\n * @param {Phaser.GameObjects.GameObject} renderable - A renderable Game Object that uses a texture, such as a Sprite.\n */\nvar BitmapMask = new Class({\n\n initialize:\n\n function BitmapMask (scene, renderable)\n {\n var renderer = scene.sys.game.renderer;\n\n /**\n * A reference to either the Canvas or WebGL Renderer that this Mask is using.\n *\n * @name Phaser.Display.Masks.BitmapMask#renderer\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\n * @since 3.11.0\n */\n this.renderer = renderer;\n\n /**\n * A renderable Game Object that uses a texture, such as a Sprite.\n *\n * @name Phaser.Display.Masks.BitmapMask#bitmapMask\n * @type {Phaser.GameObjects.GameObject}\n * @since 3.0.0\n */\n this.bitmapMask = renderable;\n\n /**\n * The texture used for the mask's framebuffer.\n *\n * @name Phaser.Display.Masks.BitmapMask#maskTexture\n * @type {WebGLTexture}\n * @default null\n * @since 3.0.0\n */\n this.maskTexture = null;\n\n /**\n * The texture used for the main framebuffer.\n *\n * @name Phaser.Display.Masks.BitmapMask#mainTexture\n * @type {WebGLTexture}\n * @default null\n * @since 3.0.0\n */\n this.mainTexture = null;\n\n /**\n * Whether the Bitmap Mask is dirty and needs to be updated.\n *\n * @name Phaser.Display.Masks.BitmapMask#dirty\n * @type {boolean}\n * @default true\n * @since 3.0.0\n */\n this.dirty = true;\n\n /**\n * The framebuffer to which a masked Game Object is rendered.\n *\n * @name Phaser.Display.Masks.BitmapMask#mainFramebuffer\n * @type {WebGLFramebuffer}\n * @since 3.0.0\n */\n this.mainFramebuffer = null;\n\n /**\n * The framebuffer to which the Bitmap Mask's masking Game Object is rendered.\n *\n * @name Phaser.Display.Masks.BitmapMask#maskFramebuffer\n * @type {WebGLFramebuffer}\n * @since 3.0.0\n */\n this.maskFramebuffer = null;\n\n /**\n * The previous framebuffer set in the renderer before this one was enabled.\n *\n * @name Phaser.Display.Masks.BitmapMask#prevFramebuffer\n * @type {WebGLFramebuffer}\n * @since 3.17.0\n */\n this.prevFramebuffer = null;\n\n /**\n * Whether to invert the masks alpha.\n *\n * If `true`, the alpha of the masking pixel will be inverted before it's multiplied with the masked pixel. Essentially, this means that a masked area will be visible only if the corresponding area in the mask is invisible.\n *\n * @name Phaser.Display.Masks.BitmapMask#invertAlpha\n * @type {boolean}\n * @since 3.1.2\n */\n this.invertAlpha = false;\n\n /**\n * Is this mask a stencil mask?\n *\n * @name Phaser.Display.Masks.BitmapMask#isStencil\n * @type {boolean}\n * @readonly\n * @since 3.17.0\n */\n this.isStencil = false;\n\n if (renderer && renderer.gl)\n {\n var width = renderer.width;\n var height = renderer.height;\n var pot = ((width & (width - 1)) === 0 && (height & (height - 1)) === 0);\n var gl = renderer.gl;\n var wrap = pot ? gl.REPEAT : gl.CLAMP_TO_EDGE;\n var filter = gl.LINEAR;\n\n this.mainTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\n this.maskTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\n this.mainFramebuffer = renderer.createFramebuffer(width, height, this.mainTexture, true);\n this.maskFramebuffer = renderer.createFramebuffer(width, height, this.maskTexture, true);\n\n scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, function (renderer)\n {\n var width = renderer.width;\n var height = renderer.height;\n var pot = ((width & (width - 1)) === 0 && (height & (height - 1)) === 0);\n var gl = renderer.gl;\n var wrap = pot ? gl.REPEAT : gl.CLAMP_TO_EDGE;\n var filter = gl.LINEAR;\n\n this.mainTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\n this.maskTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\n this.mainFramebuffer = renderer.createFramebuffer(width, height, this.mainTexture, true);\n this.maskFramebuffer = renderer.createFramebuffer(width, height, this.maskTexture, true);\n\n }, this);\n }\n },\n\n /**\n * Sets a new masking Game Object for the Bitmap Mask.\n *\n * @method Phaser.Display.Masks.BitmapMask#setBitmap\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} renderable - A renderable Game Object that uses a texture, such as a Sprite.\n */\n setBitmap: function (renderable)\n {\n this.bitmapMask = renderable;\n },\n\n /**\n * Prepares the WebGL Renderer to render a Game Object with this mask applied.\n *\n * This renders the masking Game Object to the mask framebuffer and switches to the main framebuffer so that the masked Game Object will be rendered to it instead of being rendered directly to the frame.\n *\n * @method Phaser.Display.Masks.BitmapMask#preRenderWebGL\n * @since 3.0.0\n *\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to prepare.\n * @param {Phaser.GameObjects.GameObject} maskedObject - The masked Game Object which will be drawn.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\n */\n preRenderWebGL: function (renderer, maskedObject, camera)\n {\n renderer.pipelines.BitmapMaskPipeline.beginMask(this, maskedObject, camera);\n },\n\n /**\n * Finalizes rendering of a masked Game Object.\n *\n * This resets the previously bound framebuffer and switches the WebGL Renderer to the Bitmap Mask Pipeline, which uses a special fragment shader to apply the masking effect.\n *\n * @method Phaser.Display.Masks.BitmapMask#postRenderWebGL\n * @since 3.0.0\n *\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to clean up.\n */\n postRenderWebGL: function (renderer, camera)\n {\n renderer.pipelines.BitmapMaskPipeline.endMask(this, camera);\n },\n\n /**\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\n *\n * @method Phaser.Display.Masks.BitmapMask#preRenderCanvas\n * @since 3.0.0\n *\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\n * @param {Phaser.GameObjects.GameObject} mask - The masked Game Object which would be rendered.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\n */\n preRenderCanvas: function ()\n {\n // NOOP\n },\n\n /**\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\n *\n * @method Phaser.Display.Masks.BitmapMask#postRenderCanvas\n * @since 3.0.0\n *\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\n */\n postRenderCanvas: function ()\n {\n // NOOP\n },\n\n /**\n * Destroys this BitmapMask and nulls any references it holds.\n * \n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\n *\n * @method Phaser.Display.Masks.BitmapMask#destroy\n * @since 3.7.0\n */\n destroy: function ()\n {\n this.bitmapMask = null;\n\n var renderer = this.renderer;\n\n if (renderer && renderer.gl)\n {\n renderer.deleteTexture(this.mainTexture);\n renderer.deleteTexture(this.maskTexture);\n renderer.deleteFramebuffer(this.mainFramebuffer);\n renderer.deleteFramebuffer(this.maskFramebuffer);\n }\n\n this.mainTexture = null;\n this.maskTexture = null;\n this.mainFramebuffer = null;\n this.maskFramebuffer = null;\n this.prevFramebuffer = null;\n this.renderer = null;\n }\n\n});\n\nmodule.exports = BitmapMask;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\n\n/**\n * @classdesc\n * A Geometry Mask can be applied to a Game Object to hide any pixels of it which don't intersect\n * a visible pixel from the geometry mask. The mask is essentially a clipping path which can only\n * make a masked pixel fully visible or fully invisible without changing its alpha (opacity).\n *\n * A Geometry Mask uses a Graphics Game Object to determine which pixels of the masked Game Object(s)\n * should be clipped. For any given point of a masked Game Object's texture, the pixel will only be displayed\n * if the Graphics Game Object of the Geometry Mask has a visible pixel at the same position. The color and\n * alpha of the pixel from the Geometry Mask do not matter.\n *\n * The Geometry Mask's location matches the location of its Graphics object, not the location of the masked objects.\n * Moving or transforming the underlying Graphics object will change the mask (and affect the visibility\n * of any masked objects), whereas moving or transforming a masked object will not affect the mask.\n * You can think of the Geometry Mask (or rather, of its Graphics object) as an invisible curtain placed\n * in front of all masked objects which has its own visual properties and, naturally, respects the camera's\n * visual properties, but isn't affected by and doesn't follow the masked objects by itself.\n *\n * @class GeometryMask\n * @memberof Phaser.Display.Masks\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Scene} scene - This parameter is not used.\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics Game Object to use for the Geometry Mask. Doesn't have to be in the Display List.\n */\nvar GeometryMask = new Class({\n\n initialize:\n\n function GeometryMask (scene, graphicsGeometry)\n {\n /**\n * The Graphics object which describes the Geometry Mask.\n *\n * @name Phaser.Display.Masks.GeometryMask#geometryMask\n * @type {Phaser.GameObjects.Graphics}\n * @since 3.0.0\n */\n this.geometryMask = graphicsGeometry;\n\n /**\n * Similar to the BitmapMasks invertAlpha setting this to true will then hide all pixels\n * drawn to the Geometry Mask.\n *\n * @name Phaser.Display.Masks.GeometryMask#invertAlpha\n * @type {boolean}\n * @since 3.16.0\n */\n this.invertAlpha = false;\n\n /**\n * Is this mask a stencil mask?\n *\n * @name Phaser.Display.Masks.GeometryMask#isStencil\n * @type {boolean}\n * @readonly\n * @since 3.17.0\n */\n this.isStencil = true;\n\n /**\n * The current stencil level.\n *\n * @name Phaser.Display.Masks.GeometryMask#level\n * @type {boolean}\n * @private\n * @since 3.17.0\n */\n this.level = 0;\n },\n\n /**\n * Sets a new Graphics object for the Geometry Mask.\n *\n * @method Phaser.Display.Masks.GeometryMask#setShape\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics object which will be used for the Geometry Mask.\n * \n * @return {this} This Geometry Mask\n */\n setShape: function (graphicsGeometry)\n {\n this.geometryMask = graphicsGeometry;\n\n return this;\n },\n\n /**\n * Sets the `invertAlpha` property of this Geometry Mask.\n * Inverting the alpha essentially flips the way the mask works.\n *\n * @method Phaser.Display.Masks.GeometryMask#setInvertAlpha\n * @since 3.17.0\n *\n * @param {boolean} [value=true] - Invert the alpha of this mask?\n * \n * @return {this} This Geometry Mask\n */\n setInvertAlpha: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.invertAlpha = value;\n\n return this;\n },\n\n /**\n * Renders the Geometry Mask's underlying Graphics object to the OpenGL stencil buffer and enables the stencil test, which clips rendered pixels according to the mask.\n *\n * @method Phaser.Display.Masks.GeometryMask#preRenderWebGL\n * @since 3.0.0\n *\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\n * @param {Phaser.GameObjects.GameObject} child - The Game Object being rendered.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\n */\n preRenderWebGL: function (renderer, child, camera)\n {\n var gl = renderer.gl;\n\n // Force flushing before drawing to stencil buffer\n renderer.flush();\n\n if (renderer.maskStack.length === 0)\n {\n gl.enable(gl.STENCIL_TEST);\n gl.clear(gl.STENCIL_BUFFER_BIT);\n\n renderer.maskCount = 0;\n }\n\n if (renderer.currentCameraMask.mask !== this)\n {\n renderer.currentMask.mask = this;\n }\n\n renderer.maskStack.push({ mask: this, camera: camera });\n\n this.applyStencil(renderer, camera, true);\n\n renderer.maskCount++;\n },\n\n /**\n * Applies the current stencil mask to the renderer.\n *\n * @method Phaser.Display.Masks.GeometryMask#applyStencil\n * @since 3.17.0\n *\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\n * @param {boolean} inc - Is this an INCR stencil or a DECR stencil?\n */\n applyStencil: function (renderer, camera, inc)\n {\n var gl = renderer.gl;\n var geometryMask = this.geometryMask;\n var level = renderer.maskCount;\n\n gl.colorMask(false, false, false, false);\n\n if (inc)\n {\n gl.stencilFunc(gl.EQUAL, level, 0xFF);\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.INCR);\n }\n else\n {\n gl.stencilFunc(gl.EQUAL, level + 1, 0xFF);\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.DECR);\n }\n\n // Write stencil buffer\n geometryMask.renderWebGL(renderer, geometryMask, 0, camera);\n\n renderer.flush();\n\n gl.colorMask(true, true, true, true);\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP);\n\n if (inc)\n {\n if (this.invertAlpha)\n {\n gl.stencilFunc(gl.NOTEQUAL, level + 1, 0xFF);\n }\n else\n {\n gl.stencilFunc(gl.EQUAL, level + 1, 0xFF);\n }\n }\n else if (this.invertAlpha)\n {\n gl.stencilFunc(gl.NOTEQUAL, level, 0xFF);\n }\n else\n {\n gl.stencilFunc(gl.EQUAL, level, 0xFF);\n }\n },\n\n /**\n * Flushes all rendered pixels and disables the stencil test of a WebGL context, thus disabling the mask for it.\n *\n * @method Phaser.Display.Masks.GeometryMask#postRenderWebGL\n * @since 3.0.0\n *\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw flush.\n */\n postRenderWebGL: function (renderer)\n {\n var gl = renderer.gl;\n\n renderer.maskStack.pop();\n\n renderer.maskCount--;\n\n if (renderer.maskStack.length === 0)\n {\n // If this is the only mask in the stack, flush and disable\n renderer.flush();\n\n renderer.currentMask.mask = null;\n\n gl.disable(gl.STENCIL_TEST);\n }\n else\n {\n // Force flush before disabling stencil test\n renderer.flush();\n\n var prev = renderer.maskStack[renderer.maskStack.length - 1];\n\n prev.mask.applyStencil(renderer, prev.camera, false);\n\n if (renderer.currentCameraMask.mask !== prev.mask)\n {\n renderer.currentMask.mask = prev.mask;\n renderer.currentMask.camera = prev.camera;\n }\n else\n {\n renderer.currentMask.mask = null;\n }\n }\n },\n\n /**\n * Sets the clipping path of a 2D canvas context to the Geometry Mask's underlying Graphics object.\n *\n * @method Phaser.Display.Masks.GeometryMask#preRenderCanvas\n * @since 3.0.0\n *\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance to set the clipping path on.\n * @param {Phaser.GameObjects.GameObject} mask - The Game Object being rendered.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\n */\n preRenderCanvas: function (renderer, mask, camera)\n {\n var geometryMask = this.geometryMask;\n\n renderer.currentContext.save();\n\n geometryMask.renderCanvas(renderer, geometryMask, 0, camera, null, null, true);\n\n renderer.currentContext.clip();\n },\n\n /**\n * Restore the canvas context's previous clipping path, thus turning off the mask for it.\n *\n * @method Phaser.Display.Masks.GeometryMask#postRenderCanvas\n * @since 3.0.0\n *\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance being restored.\n */\n postRenderCanvas: function (renderer)\n {\n renderer.currentContext.restore();\n },\n\n /**\n * Destroys this GeometryMask and nulls any references it holds.\n *\n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\n *\n * @method Phaser.Display.Masks.GeometryMask#destroy\n * @since 3.7.0\n */\n destroy: function ()\n {\n this.geometryMask = null;\n }\n\n});\n\nmodule.exports = GeometryMask;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar BlendModes = require('../renderer/BlendModes');\nvar GetAdvancedValue = require('../utils/object/GetAdvancedValue');\n\n/**\n * Builds a Game Object using the provided configuration object.\n *\n * @function Phaser.GameObjects.BuildGameObject\n * @since 3.0.0\n *\n * @param {Phaser.Scene} scene - A reference to the Scene.\n * @param {Phaser.GameObjects.GameObject} gameObject - The initial GameObject.\n * @param {Phaser.Types.GameObjects.GameObjectConfig} config - The config to build the GameObject with.\n *\n * @return {Phaser.GameObjects.GameObject} The built Game Object.\n */\nvar BuildGameObject = function (scene, gameObject, config)\n{\n // Position\n\n gameObject.x = GetAdvancedValue(config, 'x', 0);\n gameObject.y = GetAdvancedValue(config, 'y', 0);\n gameObject.depth = GetAdvancedValue(config, 'depth', 0);\n\n // Flip\n\n gameObject.flipX = GetAdvancedValue(config, 'flipX', false);\n gameObject.flipY = GetAdvancedValue(config, 'flipY', false);\n\n // Scale\n // Either: { scale: 2 } or { scale: { x: 2, y: 2 }}\n\n var scale = GetAdvancedValue(config, 'scale', null);\n\n if (typeof scale === 'number')\n {\n gameObject.setScale(scale);\n }\n else if (scale !== null)\n {\n gameObject.scaleX = GetAdvancedValue(scale, 'x', 1);\n gameObject.scaleY = GetAdvancedValue(scale, 'y', 1);\n }\n\n // ScrollFactor\n // Either: { scrollFactor: 2 } or { scrollFactor: { x: 2, y: 2 }}\n\n var scrollFactor = GetAdvancedValue(config, 'scrollFactor', null);\n\n if (typeof scrollFactor === 'number')\n {\n gameObject.setScrollFactor(scrollFactor);\n }\n else if (scrollFactor !== null)\n {\n gameObject.scrollFactorX = GetAdvancedValue(scrollFactor, 'x', 1);\n gameObject.scrollFactorY = GetAdvancedValue(scrollFactor, 'y', 1);\n }\n\n // Rotation\n\n gameObject.rotation = GetAdvancedValue(config, 'rotation', 0);\n\n var angle = GetAdvancedValue(config, 'angle', null);\n\n if (angle !== null)\n {\n gameObject.angle = angle;\n }\n\n // Alpha\n\n gameObject.alpha = GetAdvancedValue(config, 'alpha', 1);\n\n // Origin\n // Either: { origin: 0.5 } or { origin: { x: 0.5, y: 0.5 }}\n\n var origin = GetAdvancedValue(config, 'origin', null);\n\n if (typeof origin === 'number')\n {\n gameObject.setOrigin(origin);\n }\n else if (origin !== null)\n {\n var ox = GetAdvancedValue(origin, 'x', 0.5);\n var oy = GetAdvancedValue(origin, 'y', 0.5);\n\n gameObject.setOrigin(ox, oy);\n }\n\n // BlendMode\n\n gameObject.blendMode = GetAdvancedValue(config, 'blendMode', BlendModes.NORMAL);\n\n // Visible\n\n gameObject.visible = GetAdvancedValue(config, 'visible', true);\n\n // Add to Scene\n\n var add = GetAdvancedValue(config, 'add', true);\n\n if (add)\n {\n scene.sys.displayList.add(gameObject);\n }\n\n if (gameObject.preUpdate)\n {\n scene.sys.updateList.add(gameObject);\n }\n\n return gameObject;\n};\n\nmodule.exports = BuildGameObject;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar ComponentsToJSON = require('./components/ToJSON');\nvar DataManager = require('../data/DataManager');\nvar EventEmitter = require('eventemitter3');\nvar Events = require('./events');\n\n/**\n * @classdesc\n * The base class that all Game Objects extend.\n * You don't create GameObjects directly and they cannot be added to the display list.\n * Instead, use them as the base for your own custom classes.\n *\n * @class GameObject\n * @memberof Phaser.GameObjects\n * @extends Phaser.Events.EventEmitter\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs.\n * @param {string} type - A textual representation of the type of Game Object, i.e. `sprite`.\n */\nvar GameObject = new Class({\n\n Extends: EventEmitter,\n\n initialize:\n\n function GameObject (scene, type)\n {\n EventEmitter.call(this);\n\n /**\n * The Scene to which this Game Object belongs.\n * Game Objects can only belong to one Scene.\n *\n * @name Phaser.GameObjects.GameObject#scene\n * @type {Phaser.Scene}\n * @protected\n * @since 3.0.0\n */\n this.scene = scene;\n\n /**\n * A textual representation of this Game Object, i.e. `sprite`.\n * Used internally by Phaser but is available for your own custom classes to populate.\n *\n * @name Phaser.GameObjects.GameObject#type\n * @type {string}\n * @since 3.0.0\n */\n this.type = type;\n\n /**\n * The current state of this Game Object.\n *\n * Phaser itself will never modify this value, although plugins may do so.\n *\n * Use this property to track the state of a Game Object during its lifetime. For example, it could change from\n * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant\n * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons.\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\n *\n * @name Phaser.GameObjects.GameObject#state\n * @type {(integer|string)}\n * @since 3.16.0\n */\n this.state = 0;\n\n /**\n * The parent Container of this Game Object, if it has one.\n *\n * @name Phaser.GameObjects.GameObject#parentContainer\n * @type {Phaser.GameObjects.Container}\n * @since 3.4.0\n */\n this.parentContainer = null;\n\n /**\n * The name of this Game Object.\n * Empty by default and never populated by Phaser, this is left for developers to use.\n *\n * @name Phaser.GameObjects.GameObject#name\n * @type {string}\n * @default ''\n * @since 3.0.0\n */\n this.name = '';\n\n /**\n * The active state of this Game Object.\n * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it.\n * An active object is one which is having its logic and internal systems updated.\n *\n * @name Phaser.GameObjects.GameObject#active\n * @type {boolean}\n * @default true\n * @since 3.0.0\n */\n this.active = true;\n\n /**\n * The Tab Index of the Game Object.\n * Reserved for future use by plugins and the Input Manager.\n *\n * @name Phaser.GameObjects.GameObject#tabIndex\n * @type {integer}\n * @default -1\n * @since 3.0.0\n */\n this.tabIndex = -1;\n\n /**\n * A Data Manager.\n * It allows you to store, query and get key/value paired information specific to this Game Object.\n * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`.\n *\n * @name Phaser.GameObjects.GameObject#data\n * @type {Phaser.Data.DataManager}\n * @default null\n * @since 3.0.0\n */\n this.data = null;\n\n /**\n * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not.\n * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively.\n * If those components are not used by your custom class then you can use this bitmask as you wish.\n *\n * @name Phaser.GameObjects.GameObject#renderFlags\n * @type {integer}\n * @default 15\n * @since 3.0.0\n */\n this.renderFlags = 15;\n\n /**\n * A bitmask that controls if this Game Object is drawn by a Camera or not.\n * Not usually set directly, instead call `Camera.ignore`, however you can\n * set this property directly using the Camera.id property:\n *\n * @example\n * this.cameraFilter |= camera.id\n *\n * @name Phaser.GameObjects.GameObject#cameraFilter\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.cameraFilter = 0;\n\n /**\n * If this Game Object is enabled for input then this property will contain an InteractiveObject instance.\n * Not usually set directly. Instead call `GameObject.setInteractive()`.\n *\n * @name Phaser.GameObjects.GameObject#input\n * @type {?Phaser.Types.Input.InteractiveObject}\n * @default null\n * @since 3.0.0\n */\n this.input = null;\n\n /**\n * If this Game Object is enabled for Arcade or Matter Physics then this property will contain a reference to a Physics Body.\n *\n * @name Phaser.GameObjects.GameObject#body\n * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|MatterJS.BodyType)}\n * @default null\n * @since 3.0.0\n */\n this.body = null;\n\n /**\n * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`.\n * This includes calls that may come from a Group, Container or the Scene itself.\n * While it allows you to persist a Game Object across Scenes, please understand you are entirely\n * responsible for managing references to and from this Game Object.\n *\n * @name Phaser.GameObjects.GameObject#ignoreDestroy\n * @type {boolean}\n * @default false\n * @since 3.5.0\n */\n this.ignoreDestroy = false;\n\n // Tell the Scene to re-sort the children\n scene.sys.queueDepthSort();\n },\n\n /**\n * Sets the `active` property of this Game Object and returns this Game Object for further chaining.\n * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList.\n *\n * @method Phaser.GameObjects.GameObject#setActive\n * @since 3.0.0\n *\n * @param {boolean} value - True if this Game Object should be set as active, false if not.\n *\n * @return {this} This GameObject.\n */\n setActive: function (value)\n {\n this.active = value;\n\n return this;\n },\n\n /**\n * Sets the `name` property of this Game Object and returns this Game Object for further chaining.\n * The `name` property is not populated by Phaser and is presented for your own use.\n *\n * @method Phaser.GameObjects.GameObject#setName\n * @since 3.0.0\n *\n * @param {string} value - The name to be given to this Game Object.\n *\n * @return {this} This GameObject.\n */\n setName: function (value)\n {\n this.name = value;\n\n return this;\n },\n\n /**\n * Sets the current state of this Game Object.\n *\n * Phaser itself will never modify the State of a Game Object, although plugins may do so.\n *\n * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'.\n * The state value should typically be an integer (ideally mapped to a constant\n * in your game code), but could also be a string. It is recommended to keep it light and simple.\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\n *\n * @method Phaser.GameObjects.GameObject#setState\n * @since 3.16.0\n *\n * @param {(integer|string)} value - The state of the Game Object.\n *\n * @return {this} This GameObject.\n */\n setState: function (value)\n {\n this.state = value;\n\n return this;\n },\n\n /**\n * Adds a Data Manager component to this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#setDataEnabled\n * @since 3.0.0\n * @see Phaser.Data.DataManager\n *\n * @return {this} This GameObject.\n */\n setDataEnabled: function ()\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n return this;\n },\n\n /**\n * Allows you to store a key value pair within this Game Objects Data Manager.\n *\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\n * before setting the value.\n *\n * If the key doesn't already exist in the Data Manager then it is created.\n *\n * ```javascript\n * sprite.setData('name', 'Red Gem Stone');\n * ```\n *\n * You can also pass in an object of key value pairs as the first argument:\n *\n * ```javascript\n * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\n * ```\n *\n * To get a value back again you can call `getData`:\n *\n * ```javascript\n * sprite.getData('gold');\n * ```\n *\n * Or you can access the value directly via the `values` property, where it works like any other variable:\n *\n * ```javascript\n * sprite.data.values.gold += 50;\n * ```\n *\n * When the value is first set, a `setdata` event is emitted from this Game Object.\n *\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\n *\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\n *\n * @method Phaser.GameObjects.GameObject#setData\n * @since 3.0.0\n *\n * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored.\n * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored.\n *\n * @return {this} This GameObject.\n */\n setData: function (key, value)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n this.data.set(key, value);\n\n return this;\n },\n\n /**\n * Increase a value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is increased from 0.\n *\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\n * before setting the value.\n *\n * If the key doesn't already exist in the Data Manager then it is created.\n *\n * When the value is first set, a `setdata` event is emitted from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#incData\n * @since 3.23.0\n *\n * @param {(string|object)} key - The key to increase the value for.\n * @param {*} [data] - The value to increase for the given key.\n *\n * @return {this} This GameObject.\n */\n incData: function (key, value)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n this.data.inc(key, value);\n\n return this;\n },\n\n /**\n * Toggle a boolean value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is toggled from false.\n *\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\n * before setting the value.\n *\n * If the key doesn't already exist in the Data Manager then it is created.\n *\n * When the value is first set, a `setdata` event is emitted from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#toggleData\n * @since 3.23.0\n *\n * @param {(string|object)} key - The key to toggle the value for.\n *\n * @return {this} This GameObject.\n */\n toggleData: function (key)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n this.data.toggle(key);\n\n return this;\n },\n\n /**\n * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist.\n *\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\n *\n * ```javascript\n * sprite.getData('gold');\n * ```\n *\n * Or access the value directly:\n *\n * ```javascript\n * sprite.data.values.gold;\n * ```\n *\n * You can also pass in an array of keys, in which case an array of values will be returned:\n *\n * ```javascript\n * sprite.getData([ 'gold', 'armor', 'health' ]);\n * ```\n *\n * This approach is useful for destructuring arrays in ES6.\n *\n * @method Phaser.GameObjects.GameObject#getData\n * @since 3.0.0\n *\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\n *\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\n */\n getData: function (key)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n return this.data.get(key);\n },\n\n /**\n * Pass this Game Object to the Input Manager to enable it for Input.\n *\n * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area\n * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced\n * input detection.\n *\n * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If\n * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific\n * shape for it to use.\n *\n * You can also provide an Input Configuration Object as the only argument to this method.\n *\n * @example\n * sprite.setInteractive();\n *\n * @example\n * sprite.setInteractive(new Phaser.Geom.Circle(45, 46, 45), Phaser.Geom.Circle.Contains);\n *\n * @example\n * graphics.setInteractive(new Phaser.Geom.Rectangle(0, 0, 128, 128), Phaser.Geom.Rectangle.Contains);\n *\n * @method Phaser.GameObjects.GameObject#setInteractive\n * @since 3.0.0\n *\n * @param {(Phaser.Types.Input.InputConfiguration|any)} [hitArea] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not given it will try to create a Rectangle based on the texture frame.\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The callback that determines if the pointer is within the Hit Area shape or not. If you provide a shape you must also provide a callback.\n * @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target?\n *\n * @return {this} This GameObject.\n */\n setInteractive: function (hitArea, hitAreaCallback, dropZone)\n {\n this.scene.sys.input.enable(this, hitArea, hitAreaCallback, dropZone);\n\n return this;\n },\n\n /**\n * If this Game Object has previously been enabled for input, this will disable it.\n *\n * An object that is disabled for input stops processing or being considered for\n * input events, but can be turned back on again at any time by simply calling\n * `setInteractive()` with no arguments provided.\n *\n * If want to completely remove interaction from this Game Object then use `removeInteractive` instead.\n *\n * @method Phaser.GameObjects.GameObject#disableInteractive\n * @since 3.7.0\n *\n * @return {this} This GameObject.\n */\n disableInteractive: function ()\n {\n if (this.input)\n {\n this.input.enabled = false;\n }\n\n return this;\n },\n\n /**\n * If this Game Object has previously been enabled for input, this will queue it\n * for removal, causing it to no longer be interactive. The removal happens on\n * the next game step, it is not immediate.\n *\n * The Interactive Object that was assigned to this Game Object will be destroyed,\n * removed from the Input Manager and cleared from this Game Object.\n *\n * If you wish to re-enable this Game Object at a later date you will need to\n * re-create its InteractiveObject by calling `setInteractive` again.\n *\n * If you wish to only temporarily stop an object from receiving input then use\n * `disableInteractive` instead, as that toggles the interactive state, where-as\n * this erases it completely.\n *\n * If you wish to resize a hit area, don't remove and then set it as being\n * interactive. Instead, access the hitarea object directly and resize the shape\n * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the\n * shape is a Rectangle, which it is by default.)\n *\n * @method Phaser.GameObjects.GameObject#removeInteractive\n * @since 3.7.0\n *\n * @return {this} This GameObject.\n */\n removeInteractive: function ()\n {\n this.scene.sys.input.clear(this);\n\n this.input = undefined;\n\n return this;\n },\n\n /**\n * This callback is invoked when this Game Object is added to a Scene.\n *\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\n * will use this, such as Sprites, to add themselves into the Update List.\n *\n * You can also listen for the `ADDED_TO_SCENE` event from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#addedToScene\n * @since 3.50.0\n */\n addedToScene: function ()\n {\n },\n\n /**\n * This callback is invoked when this Game Object is removed from a Scene.\n *\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\n * will use this, such as Sprites, to removed themselves from the Update List.\n *\n * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#removedFromScene\n * @since 3.50.0\n */\n removedFromScene: function ()\n {\n },\n\n /**\n * To be overridden by custom GameObjects. Allows base objects to be used in a Pool.\n *\n * @method Phaser.GameObjects.GameObject#update\n * @since 3.0.0\n *\n * @param {...*} [args] - args\n */\n update: function ()\n {\n },\n\n /**\n * Returns a JSON representation of the Game Object.\n *\n * @method Phaser.GameObjects.GameObject#toJSON\n * @since 3.0.0\n *\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\n */\n toJSON: function ()\n {\n return ComponentsToJSON(this);\n },\n\n /**\n * Compares the renderMask with the renderFlags to see if this Game Object will render or not.\n * Also checks the Game Object against the given Cameras exclusion list.\n *\n * @method Phaser.GameObjects.GameObject#willRender\n * @since 3.0.0\n *\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to check against this Game Object.\n *\n * @return {boolean} True if the Game Object should be rendered, otherwise false.\n */\n willRender: function (camera)\n {\n return !(GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id)));\n },\n\n /**\n * Returns an array containing the display list index of either this Game Object, or if it has one,\n * its parent Container. It then iterates up through all of the parent containers until it hits the\n * root of the display list (which is index 0 in the returned array).\n *\n * Used internally by the InputPlugin but also useful if you wish to find out the display depth of\n * this Game Object and all of its ancestors.\n *\n * @method Phaser.GameObjects.GameObject#getIndexList\n * @since 3.4.0\n *\n * @return {integer[]} An array of display list position indexes.\n */\n getIndexList: function ()\n {\n // eslint-disable-next-line consistent-this\n var child = this;\n var parent = this.parentContainer;\n\n var indexes = [];\n\n while (parent)\n {\n // indexes.unshift([parent.getIndex(child), parent.name]);\n indexes.unshift(parent.getIndex(child));\n\n child = parent;\n\n if (!parent.parentContainer)\n {\n break;\n }\n else\n {\n parent = parent.parentContainer;\n }\n }\n\n // indexes.unshift([this.scene.sys.displayList.getIndex(child), 'root']);\n indexes.unshift(this.scene.sys.displayList.getIndex(child));\n\n return indexes;\n },\n\n /**\n * Destroys this Game Object removing it from the Display List and Update List and\n * severing all ties to parent resources.\n *\n * Also removes itself from the Input Manager and Physics Manager if previously enabled.\n *\n * Use this to remove a Game Object from your game if you don't ever plan to use it again.\n * As long as no reference to it exists within your own code it should become free for\n * garbage collection by the browser.\n *\n * If you just want to temporarily disable an object then look at using the\n * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected.\n *\n * @method Phaser.GameObjects.GameObject#destroy\n * @fires Phaser.GameObjects.Events#DESTROY\n * @since 3.0.0\n *\n * @param {boolean} [fromScene=false] - Is this Game Object being destroyed as the result of a Scene shutdown?\n */\n destroy: function (fromScene)\n {\n if (fromScene === undefined) { fromScene = false; }\n\n // This Game Object has already been destroyed\n if (!this.scene || this.ignoreDestroy)\n {\n return;\n }\n\n if (this.preDestroy)\n {\n this.preDestroy.call(this);\n }\n\n this.emit(Events.DESTROY, this);\n\n var sys = this.scene.sys;\n\n if (!fromScene)\n {\n sys.displayList.remove(this);\n }\n\n if (this.input)\n {\n sys.input.clear(this);\n this.input = undefined;\n }\n\n if (this.data)\n {\n this.data.destroy();\n\n this.data = undefined;\n }\n\n if (this.body)\n {\n this.body.destroy();\n this.body = undefined;\n }\n\n // Tell the Scene to re-sort the children\n if (!fromScene)\n {\n sys.queueDepthSort();\n }\n\n this.active = false;\n this.visible = false;\n\n this.scene = undefined;\n\n this.parentContainer = undefined;\n\n this.removeAllListeners();\n }\n\n});\n\n/**\n * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not.\n *\n * @constant {integer} RENDER_MASK\n * @memberof Phaser.GameObjects.GameObject\n * @default\n */\nGameObject.RENDER_MASK = 15;\n\nmodule.exports = GameObject;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Clamp = require('../../math/Clamp');\n\n// bitmask flag for GameObject.renderMask\nvar _FLAG = 2; // 0010\n\n/**\n * Provides methods used for setting the alpha properties of a Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.Alpha\n * @since 3.0.0\n */\n\nvar Alpha = {\n\n /**\n * Private internal value. Holds the global alpha value.\n *\n * @name Phaser.GameObjects.Components.Alpha#_alpha\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _alpha: 1,\n\n /**\n * Private internal value. Holds the top-left alpha value.\n *\n * @name Phaser.GameObjects.Components.Alpha#_alphaTL\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _alphaTL: 1,\n\n /**\n * Private internal value. Holds the top-right alpha value.\n *\n * @name Phaser.GameObjects.Components.Alpha#_alphaTR\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _alphaTR: 1,\n\n /**\n * Private internal value. Holds the bottom-left alpha value.\n *\n * @name Phaser.GameObjects.Components.Alpha#_alphaBL\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _alphaBL: 1,\n\n /**\n * Private internal value. Holds the bottom-right alpha value.\n *\n * @name Phaser.GameObjects.Components.Alpha#_alphaBR\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _alphaBR: 1,\n\n /**\n * Clears all alpha values associated with this Game Object.\n *\n * Immediately sets the alpha levels back to 1 (fully opaque).\n *\n * @method Phaser.GameObjects.Components.Alpha#clearAlpha\n * @since 3.0.0\n *\n * @return {this} This Game Object instance.\n */\n clearAlpha: function ()\n {\n return this.setAlpha(1);\n },\n\n /**\n * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\n *\n * If your game is running under WebGL you can optionally specify four different alpha values, each of which\n * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.\n *\n * @method Phaser.GameObjects.Components.Alpha#setAlpha\n * @since 3.0.0\n *\n * @param {number} [topLeft=1] - The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object.\n * @param {number} [topRight] - The alpha value used for the top-right of the Game Object. WebGL only.\n * @param {number} [bottomLeft] - The alpha value used for the bottom-left of the Game Object. WebGL only.\n * @param {number} [bottomRight] - The alpha value used for the bottom-right of the Game Object. WebGL only.\n *\n * @return {this} This Game Object instance.\n */\n setAlpha: function (topLeft, topRight, bottomLeft, bottomRight)\n {\n if (topLeft === undefined) { topLeft = 1; }\n\n // Treat as if there is only one alpha value for the whole Game Object\n if (topRight === undefined)\n {\n this.alpha = topLeft;\n }\n else\n {\n this._alphaTL = Clamp(topLeft, 0, 1);\n this._alphaTR = Clamp(topRight, 0, 1);\n this._alphaBL = Clamp(bottomLeft, 0, 1);\n this._alphaBR = Clamp(bottomRight, 0, 1);\n }\n\n return this;\n },\n\n /**\n * The alpha value of the Game Object.\n *\n * This is a global value, impacting the entire Game Object, not just a region of it.\n *\n * @name Phaser.GameObjects.Components.Alpha#alpha\n * @type {number}\n * @since 3.0.0\n */\n alpha: {\n\n get: function ()\n {\n return this._alpha;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n this._alpha = v;\n this._alphaTL = v;\n this._alphaTR = v;\n this._alphaBL = v;\n this._alphaBR = v;\n\n if (v === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The alpha value starting from the top-left of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Alpha#alphaTopLeft\n * @type {number}\n * @webglOnly\n * @since 3.0.0\n */\n alphaTopLeft: {\n\n get: function ()\n {\n return this._alphaTL;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n this._alphaTL = v;\n\n if (v !== 0)\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The alpha value starting from the top-right of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Alpha#alphaTopRight\n * @type {number}\n * @webglOnly\n * @since 3.0.0\n */\n alphaTopRight: {\n\n get: function ()\n {\n return this._alphaTR;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n this._alphaTR = v;\n\n if (v !== 0)\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The alpha value starting from the bottom-left of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomLeft\n * @type {number}\n * @webglOnly\n * @since 3.0.0\n */\n alphaBottomLeft: {\n\n get: function ()\n {\n return this._alphaBL;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n this._alphaBL = v;\n\n if (v !== 0)\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The alpha value starting from the bottom-right of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomRight\n * @type {number}\n * @webglOnly\n * @since 3.0.0\n */\n alphaBottomRight: {\n\n get: function ()\n {\n return this._alphaBR;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n this._alphaBR = v;\n\n if (v !== 0)\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n }\n\n};\n\nmodule.exports = Alpha;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Clamp = require('../../math/Clamp');\n\n// bitmask flag for GameObject.renderMask\nvar _FLAG = 2; // 0010\n\n/**\n * Provides methods used for setting the alpha property of a Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.AlphaSingle\n * @since 3.22.0\n */\n\nvar AlphaSingle = {\n\n /**\n * Private internal value. Holds the global alpha value.\n *\n * @name Phaser.GameObjects.Components.AlphaSingle#_alpha\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _alpha: 1,\n\n /**\n * Clears all alpha values associated with this Game Object.\n *\n * Immediately sets the alpha levels back to 1 (fully opaque).\n *\n * @method Phaser.GameObjects.Components.AlphaSingle#clearAlpha\n * @since 3.0.0\n *\n * @return {this} This Game Object instance.\n */\n clearAlpha: function ()\n {\n return this.setAlpha(1);\n },\n\n /**\n * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\n *\n * @method Phaser.GameObjects.Components.AlphaSingle#setAlpha\n * @since 3.0.0\n *\n * @param {number} [value=1] - The alpha value applied across the whole Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setAlpha: function (value)\n {\n if (value === undefined) { value = 1; }\n\n this.alpha = value;\n\n return this;\n },\n\n /**\n * The alpha value of the Game Object.\n *\n * This is a global value, impacting the entire Game Object, not just a region of it.\n *\n * @name Phaser.GameObjects.Components.AlphaSingle#alpha\n * @type {number}\n * @since 3.0.0\n */\n alpha: {\n\n get: function ()\n {\n return this._alpha;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n this._alpha = v;\n\n if (v === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n }\n\n};\n\nmodule.exports = AlphaSingle;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar BaseAnimation = require('../../animations/Animation');\nvar Class = require('../../utils/Class');\nvar Events = require('../../animations/events');\n\n/**\n * @classdesc\n * A Game Object Animation Controller.\n *\n * This controller lives as an instance within a Game Object, accessible as `sprite.anims`.\n *\n * @class Animation\n * @memberof Phaser.GameObjects.Components\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} parent - The Game Object to which this animation controller belongs.\n */\nvar Animation = new Class({\n\n initialize:\n\n function Animation (parent)\n {\n /**\n * The Game Object to which this animation controller belongs.\n *\n * @name Phaser.GameObjects.Components.Animation#parent\n * @type {Phaser.GameObjects.GameObject}\n * @since 3.0.0\n */\n this.parent = parent;\n\n /**\n * A reference to the global Animation Manager.\n *\n * @name Phaser.GameObjects.Components.Animation#animationManager\n * @type {Phaser.Animations.AnimationManager}\n * @since 3.0.0\n */\n this.animationManager = parent.scene.sys.anims;\n\n this.animationManager.once(Events.REMOVE_ANIMATION, this.remove, this);\n\n /**\n * Is an animation currently playing or not?\n *\n * @name Phaser.GameObjects.Components.Animation#isPlaying\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.isPlaying = false;\n\n /**\n * The current Animation loaded into this Animation Controller.\n *\n * @name Phaser.GameObjects.Components.Animation#currentAnim\n * @type {?Phaser.Animations.Animation}\n * @default null\n * @since 3.0.0\n */\n this.currentAnim = null;\n\n /**\n * The current AnimationFrame being displayed by this Animation Controller.\n *\n * @name Phaser.GameObjects.Components.Animation#currentFrame\n * @type {?Phaser.Animations.AnimationFrame}\n * @default null\n * @since 3.0.0\n */\n this.currentFrame = null;\n\n /**\n * The key of the next Animation to be loaded into this Animation Controller when the current animation completes.\n *\n * @name Phaser.GameObjects.Components.Animation#nextAnim\n * @type {?string}\n * @default null\n * @since 3.16.0\n */\n this.nextAnim = null;\n\n /**\n * A queue of keys of the next Animations to be loaded into this Animation Controller when the current animation completes.\n *\n * @name Phaser.GameObjects.Components.Animation#nextAnimsQueue\n * @type {string[]}\n * @since 3.24.0\n */\n this.nextAnimsQueue = [];\n\n /**\n * Time scale factor.\n *\n * @name Phaser.GameObjects.Components.Animation#_timeScale\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n this._timeScale = 1;\n\n /**\n * The frame rate of playback in frames per second.\n * The default is 24 if the `duration` property is `null`.\n *\n * @name Phaser.GameObjects.Components.Animation#frameRate\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.frameRate = 0;\n\n /**\n * How long the animation should play for, in milliseconds.\n * If the `frameRate` property has been set then it overrides this value,\n * otherwise the `frameRate` is derived from `duration`.\n *\n * @name Phaser.GameObjects.Components.Animation#duration\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.duration = 0;\n\n /**\n * ms per frame, not including frame specific modifiers that may be present in the Animation data.\n *\n * @name Phaser.GameObjects.Components.Animation#msPerFrame\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.msPerFrame = 0;\n\n /**\n * Skip frames if the time lags, or always advanced anyway?\n *\n * @name Phaser.GameObjects.Components.Animation#skipMissedFrames\n * @type {boolean}\n * @default true\n * @since 3.0.0\n */\n this.skipMissedFrames = true;\n\n /**\n * A delay before starting playback, in milliseconds.\n *\n * @name Phaser.GameObjects.Components.Animation#_delay\n * @type {number}\n * @private\n * @default 0\n * @since 3.0.0\n */\n this._delay = 0;\n\n /**\n * Number of times to repeat the animation (-1 for infinity)\n *\n * @name Phaser.GameObjects.Components.Animation#_repeat\n * @type {number}\n * @private\n * @default 0\n * @since 3.0.0\n */\n this._repeat = 0;\n\n /**\n * Delay before the repeat starts, in milliseconds.\n *\n * @name Phaser.GameObjects.Components.Animation#_repeatDelay\n * @type {number}\n * @private\n * @default 0\n * @since 3.0.0\n */\n this._repeatDelay = 0;\n\n /**\n * Should the animation yoyo? (reverse back down to the start) before repeating?\n *\n * @name Phaser.GameObjects.Components.Animation#_yoyo\n * @type {boolean}\n * @private\n * @default false\n * @since 3.0.0\n */\n this._yoyo = false;\n\n /**\n * Will the playhead move forwards (`true`) or in reverse (`false`).\n *\n * @name Phaser.GameObjects.Components.Animation#forward\n * @type {boolean}\n * @default true\n * @since 3.0.0\n */\n this.forward = true;\n\n /**\n * An Internal trigger that's play the animation in reverse mode ('true') or not ('false'),\n * needed because forward can be changed by yoyo feature.\n *\n * @name Phaser.GameObjects.Components.Animation#_reverse\n * @type {boolean}\n * @default false\n * @private\n * @since 3.12.0\n */\n this._reverse = false;\n\n /**\n * Internal time overflow accumulator.\n *\n * @name Phaser.GameObjects.Components.Animation#accumulator\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.accumulator = 0;\n\n /**\n * The time point at which the next animation frame will change.\n *\n * @name Phaser.GameObjects.Components.Animation#nextTick\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.nextTick = 0;\n\n /**\n * An internal counter keeping track of how many repeats are left to play.\n *\n * @name Phaser.GameObjects.Components.Animation#repeatCounter\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.repeatCounter = 0;\n\n /**\n * An internal flag keeping track of pending repeats.\n *\n * @name Phaser.GameObjects.Components.Animation#pendingRepeat\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.pendingRepeat = false;\n\n /**\n * Is the Animation paused?\n *\n * @name Phaser.GameObjects.Components.Animation#_paused\n * @type {boolean}\n * @private\n * @default false\n * @since 3.0.0\n */\n this._paused = false;\n\n /**\n * Was the animation previously playing before being paused?\n *\n * @name Phaser.GameObjects.Components.Animation#_wasPlaying\n * @type {boolean}\n * @private\n * @default false\n * @since 3.0.0\n */\n this._wasPlaying = false;\n\n /**\n * Internal property tracking if this Animation is waiting to stop.\n *\n * 0 = No\n * 1 = Waiting for ms to pass\n * 2 = Waiting for repeat\n * 3 = Waiting for specific frame\n *\n * @name Phaser.GameObjects.Components.Animation#_pendingStop\n * @type {integer}\n * @private\n * @since 3.4.0\n */\n this._pendingStop = 0;\n\n /**\n * Internal property used by _pendingStop.\n *\n * @name Phaser.GameObjects.Components.Animation#_pendingStopValue\n * @type {any}\n * @private\n * @since 3.4.0\n */\n this._pendingStopValue;\n },\n\n /**\n * Sets an animation to be played immediately after the current one completes.\n *\n * The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc, or have the `stop` method called directly on it.\n *\n * An animation set to repeat forever will never enter a completed state.\n *\n * You can chain a new animation at any point, including before the current one starts playing, during it, or when it ends (via its `animationcomplete` callback).\n * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained animations without impacting the global animation they're playing.\n *\n * Call this method with no arguments to reset the chained animation.\n *\n * @method Phaser.GameObjects.Components.Animation#chain\n * @since 3.16.0\n *\n * @param {(string|Phaser.Animations.Animation)} [key] - The string-based key of the animation to play next, as defined previously in the Animation Manager. Or an Animation instance.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n chain: function (key)\n {\n if (key instanceof BaseAnimation)\n {\n key = key.key;\n }\n\n if (this.nextAnim === null)\n {\n this.nextAnim = key;\n }\n else\n {\n this.nextAnimsQueue.push(key);\n }\n\n return this.parent;\n },\n\n /**\n * Sets the amount of time, in milliseconds, that the animation will be delayed before starting playback.\n *\n * @method Phaser.GameObjects.Components.Animation#setDelay\n * @since 3.4.0\n *\n * @param {integer} [value=0] - The amount of time, in milliseconds, to wait before starting playback.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n setDelay: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this._delay = value;\n\n return this.parent;\n },\n\n /**\n * Gets the amount of time, in milliseconds that the animation will be delayed before starting playback.\n *\n * @method Phaser.GameObjects.Components.Animation#getDelay\n * @since 3.4.0\n *\n * @return {integer} The amount of time, in milliseconds, the Animation will wait before starting playback.\n */\n getDelay: function ()\n {\n return this._delay;\n },\n\n /**\n * Waits for the specified delay, in milliseconds, then starts playback of the requested animation.\n *\n * @method Phaser.GameObjects.Components.Animation#delayedPlay\n * @since 3.0.0\n *\n * @param {integer} delay - The delay, in milliseconds, to wait before starting the animation playing.\n * @param {string} key - The key of the animation to play.\n * @param {integer} [startFrame=0] - The frame of the animation to start from.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n delayedPlay: function (delay, key, startFrame)\n {\n this.play(key, true, startFrame);\n\n this.nextTick += delay;\n\n return this.parent;\n },\n\n /**\n * Returns the key of the animation currently loaded into this component.\n *\n * @method Phaser.GameObjects.Components.Animation#getCurrentKey\n * @since 3.0.0\n *\n * @return {string} The key of the Animation loaded into this component.\n */\n getCurrentKey: function ()\n {\n if (this.currentAnim)\n {\n return this.currentAnim.key;\n }\n },\n\n /**\n * Internal method used to load an animation into this component.\n *\n * @method Phaser.GameObjects.Components.Animation#load\n * @protected\n * @since 3.0.0\n *\n * @param {string} key - The key of the animation to load.\n * @param {integer} [startFrame=0] - The start frame of the animation to load.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n load: function (key, startFrame)\n {\n if (startFrame === undefined) { startFrame = 0; }\n\n if (this.isPlaying)\n {\n this.stop();\n }\n\n // Load the new animation in\n this.animationManager.load(this, key, startFrame);\n\n return this.parent;\n },\n\n /**\n * Pause the current animation and set the `isPlaying` property to `false`.\n * You can optionally pause it at a specific frame.\n *\n * @method Phaser.GameObjects.Components.Animation#pause\n * @since 3.0.0\n *\n * @param {Phaser.Animations.AnimationFrame} [atFrame] - An optional frame to set after pausing the animation.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n pause: function (atFrame)\n {\n if (!this._paused)\n {\n this._paused = true;\n this._wasPlaying = this.isPlaying;\n this.isPlaying = false;\n }\n\n if (atFrame !== undefined)\n {\n this.updateFrame(atFrame);\n }\n\n return this.parent;\n },\n\n /**\n * Resumes playback of a paused animation and sets the `isPlaying` property to `true`.\n * You can optionally tell it to start playback from a specific frame.\n *\n * @method Phaser.GameObjects.Components.Animation#resume\n * @since 3.0.0\n *\n * @param {Phaser.Animations.AnimationFrame} [fromFrame] - An optional frame to set before restarting playback.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n resume: function (fromFrame)\n {\n if (this._paused)\n {\n this._paused = false;\n this.isPlaying = this._wasPlaying;\n }\n\n if (fromFrame !== undefined)\n {\n this.updateFrame(fromFrame);\n }\n\n return this.parent;\n },\n\n /**\n * `true` if the current animation is paused, otherwise `false`.\n *\n * @name Phaser.GameObjects.Components.Animation#isPaused\n * @readonly\n * @type {boolean}\n * @since 3.4.0\n */\n isPaused: {\n\n get: function ()\n {\n return this._paused;\n }\n\n },\n\n /**\n * Plays an Animation on a Game Object that has the Animation component, such as a Sprite.\n *\n * Animations are stored in the global Animation Manager and are referenced by a unique string-based key.\n *\n * @method Phaser.GameObjects.Components.Animation#play\n * @fires Phaser.GameObjects.Components.Animation#onStartEvent\n * @since 3.0.0\n *\n * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance.\n * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call.\n * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n play: function (key, ignoreIfPlaying, startFrame)\n {\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\n if (startFrame === undefined) { startFrame = 0; }\n\n if (key instanceof BaseAnimation)\n {\n key = key.key;\n }\n\n if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key)\n {\n return this.parent;\n }\n\n this.forward = true;\n this._reverse = false;\n this._paused = false;\n this._wasPlaying = true;\n\n return this._startAnimation(key, startFrame);\n },\n\n /**\n * Plays an Animation (in reverse mode) on the Game Object that owns this Animation Component.\n *\n * @method Phaser.GameObjects.Components.Animation#playReverse\n * @fires Phaser.GameObjects.Components.Animation#onStartEvent\n * @since 3.12.0\n *\n * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance.\n * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call.\n * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n playReverse: function (key, ignoreIfPlaying, startFrame)\n {\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\n if (startFrame === undefined) { startFrame = 0; }\n\n if (key instanceof BaseAnimation)\n {\n key = key.key;\n }\n\n if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key)\n {\n return this.parent;\n }\n\n this.forward = false;\n this._reverse = true;\n\n return this._startAnimation(key, startFrame);\n },\n\n /**\n * Load an Animation and fires 'onStartEvent' event, extracted from 'play' method.\n *\n * @method Phaser.GameObjects.Components.Animation#_startAnimation\n * @fires Phaser.Animations.Events#ANIMATION_START\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START\n * @since 3.12.0\n *\n * @param {string} key - The string-based key of the animation to play, as defined previously in the Animation Manager.\n * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n _startAnimation: function (key, startFrame)\n {\n this.load(key, startFrame);\n\n var anim = this.currentAnim;\n var gameObject = this.parent;\n\n if (!anim)\n {\n return gameObject;\n }\n\n // Should give us 9,007,199,254,740,991 safe repeats\n this.repeatCounter = (this._repeat === -1) ? Number.MAX_VALUE : this._repeat;\n\n anim.getFirstTick(this);\n\n this.isPlaying = true;\n this.pendingRepeat = false;\n\n if (anim.showOnStart)\n {\n gameObject.visible = true;\n }\n\n var frame = this.currentFrame;\n\n anim.emit(Events.ANIMATION_START, anim, frame, gameObject);\n\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_START + key, anim, frame, gameObject);\n\n gameObject.emit(Events.SPRITE_ANIMATION_START, anim, frame, gameObject);\n\n return gameObject;\n },\n\n /**\n * Reverse the Animation that is already playing on the Game Object.\n *\n * @method Phaser.GameObjects.Components.Animation#reverse\n * @since 3.12.0\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n reverse: function ()\n {\n if (this.isPlaying)\n {\n this._reverse = !this._reverse;\n\n this.forward = !this.forward;\n }\n\n return this.parent;\n },\n\n /**\n * Returns a value between 0 and 1 indicating how far this animation is through, ignoring repeats and yoyos.\n * If the animation has a non-zero repeat defined, `getProgress` and `getTotalProgress` will be different\n * because `getProgress` doesn't include any repeats or repeat delays, whereas `getTotalProgress` does.\n *\n * @method Phaser.GameObjects.Components.Animation#getProgress\n * @since 3.4.0\n *\n * @return {number} The progress of the current animation, between 0 and 1.\n */\n getProgress: function ()\n {\n var p = this.currentFrame.progress;\n\n if (!this.forward)\n {\n p = 1 - p;\n }\n\n return p;\n },\n\n /**\n * Takes a value between 0 and 1 and uses it to set how far this animation is through playback.\n * Does not factor in repeats or yoyos, but does handle playing forwards or backwards.\n *\n * @method Phaser.GameObjects.Components.Animation#setProgress\n * @since 3.4.0\n *\n * @param {number} [value=0] - The progress value, between 0 and 1.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n setProgress: function (value)\n {\n if (!this.forward)\n {\n value = 1 - value;\n }\n\n this.setCurrentFrame(this.currentAnim.getFrameByProgress(value));\n\n return this.parent;\n },\n\n /**\n * Handle the removal of an animation from the Animation Manager.\n *\n * @method Phaser.GameObjects.Components.Animation#remove\n * @since 3.0.0\n *\n * @param {string} [key] - The key of the removed Animation.\n * @param {Phaser.Animations.Animation} [animation] - The removed Animation.\n */\n remove: function (key, animation)\n {\n if (animation === undefined) { animation = this.currentAnim; }\n\n if (this.isPlaying && animation.key === this.currentAnim.key)\n {\n this.stop();\n\n this.setCurrentFrame(this.currentAnim.frames[0]);\n }\n },\n\n /**\n * Gets the number of times that the animation will repeat\n * after its first iteration. For example, if returns 1, the animation will\n * play a total of twice (the initial play plus 1 repeat).\n * A value of -1 means the animation will repeat indefinitely.\n *\n * @method Phaser.GameObjects.Components.Animation#getRepeat\n * @since 3.4.0\n *\n * @return {integer} The number of times that the animation will repeat.\n */\n getRepeat: function ()\n {\n return this._repeat;\n },\n\n /**\n * Sets the number of times that the animation should repeat\n * after its first iteration. For example, if repeat is 1, the animation will\n * play a total of twice (the initial play plus 1 repeat).\n * To repeat indefinitely, use -1. repeat should always be an integer.\n *\n * @method Phaser.GameObjects.Components.Animation#setRepeat\n * @since 3.4.0\n *\n * @param {integer} value - The number of times that the animation should repeat.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n setRepeat: function (value)\n {\n this._repeat = value;\n\n this.repeatCounter = (value === -1) ? Number.MAX_VALUE : value;\n\n return this.parent;\n },\n\n /**\n * Gets the amount of delay between repeats, if any.\n *\n * @method Phaser.GameObjects.Components.Animation#getRepeatDelay\n * @since 3.4.0\n *\n * @return {number} The delay between repeats.\n */\n getRepeatDelay: function ()\n {\n return this._repeatDelay;\n },\n\n /**\n * Sets the amount of time in seconds between repeats.\n * For example, if `repeat` is 2 and `repeatDelay` is 10, the animation will play initially,\n * then wait for 10 seconds before repeating, then play again, then wait another 10 seconds\n * before doing its final repeat.\n *\n * @method Phaser.GameObjects.Components.Animation#setRepeatDelay\n * @since 3.4.0\n *\n * @param {number} value - The delay to wait between repeats, in seconds.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n setRepeatDelay: function (value)\n {\n this._repeatDelay = value;\n\n return this.parent;\n },\n\n /**\n * Restarts the current animation from its beginning, optionally including its delay value.\n *\n * @method Phaser.GameObjects.Components.Animation#restart\n * @fires Phaser.Animations.Events#ANIMATION_RESTART\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_RESTART\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART\n * @since 3.0.0\n *\n * @param {boolean} [includeDelay=false] - Whether to include the delay value of the animation when restarting.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n restart: function (includeDelay)\n {\n if (includeDelay === undefined) { includeDelay = false; }\n\n var anim = this.currentAnim;\n\n anim.getFirstTick(this, includeDelay);\n\n this.forward = true;\n this.isPlaying = true;\n this.pendingRepeat = false;\n this._paused = false;\n\n // Set frame\n this.updateFrame(anim.frames[0]);\n\n var gameObject = this.parent;\n var frame = this.currentFrame;\n\n anim.emit(Events.ANIMATION_RESTART, anim, frame, gameObject);\n\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_RESTART + anim.key, anim, frame, gameObject);\n\n gameObject.emit(Events.SPRITE_ANIMATION_RESTART, anim, frame, gameObject);\n\n return this.parent;\n },\n\n /**\n * Immediately stops the current animation from playing and dispatches the `animationcomplete` event.\n *\n * If no animation is set, no event will be dispatched.\n *\n * If there is another animation queued (via the `chain` method) then it will start playing immediately.\n *\n * @method Phaser.GameObjects.Components.Animation#stop\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\n * @since 3.0.0\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n stop: function ()\n {\n this._pendingStop = 0;\n\n this.isPlaying = false;\n\n var gameObject = this.parent;\n var anim = this.currentAnim;\n var frame = this.currentFrame;\n\n if (anim)\n {\n anim.emit(Events.ANIMATION_COMPLETE, anim, frame, gameObject);\n\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_COMPLETE + anim.key, anim, frame, gameObject);\n\n gameObject.emit(Events.SPRITE_ANIMATION_COMPLETE, anim, frame, gameObject);\n }\n\n if (this.nextAnim)\n {\n var key = this.nextAnim;\n\n this.nextAnim = (this.nextAnimsQueue.length > 0) ? this.nextAnimsQueue.shift() : null;\n\n this.play(key);\n }\n\n return gameObject;\n },\n\n /**\n * Stops the current animation from playing after the specified time delay, given in milliseconds.\n *\n * @method Phaser.GameObjects.Components.Animation#stopAfterDelay\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\n * @since 3.4.0\n *\n * @param {integer} delay - The number of milliseconds to wait before stopping this animation.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n stopAfterDelay: function (delay)\n {\n this._pendingStop = 1;\n this._pendingStopValue = delay;\n\n return this.parent;\n },\n\n /**\n * Stops the current animation from playing when it next repeats.\n *\n * @method Phaser.GameObjects.Components.Animation#stopOnRepeat\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\n * @since 3.4.0\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n stopOnRepeat: function ()\n {\n this._pendingStop = 2;\n\n return this.parent;\n },\n\n /**\n * Stops the current animation from playing when it next sets the given frame.\n * If this frame doesn't exist within the animation it will not stop it from playing.\n *\n * @method Phaser.GameObjects.Components.Animation#stopOnFrame\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\n * @since 3.4.0\n *\n * @param {Phaser.Animations.AnimationFrame} frame - The frame to check before stopping this animation.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n stopOnFrame: function (frame)\n {\n this._pendingStop = 3;\n this._pendingStopValue = frame;\n\n return this.parent;\n },\n\n /**\n * Sets the Time Scale factor, allowing you to make the animation go go faster or slower than default.\n * Where 1 = normal speed (the default), 0.5 = half speed, 2 = double speed, etc.\n *\n * @method Phaser.GameObjects.Components.Animation#setTimeScale\n * @since 3.4.0\n *\n * @param {number} [value=1] - The time scale factor, where 1 is no change, 0.5 is half speed, etc.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n setTimeScale: function (value)\n {\n if (value === undefined) { value = 1; }\n\n this._timeScale = value;\n\n return this.parent;\n },\n\n /**\n * Gets the Time Scale factor.\n *\n * @method Phaser.GameObjects.Components.Animation#getTimeScale\n * @since 3.4.0\n *\n * @return {number} The Time Scale value.\n */\n getTimeScale: function ()\n {\n return this._timeScale;\n },\n\n /**\n * Returns the total number of frames in this animation.\n *\n * @method Phaser.GameObjects.Components.Animation#getTotalFrames\n * @since 3.4.0\n *\n * @return {integer} The total number of frames in this animation.\n */\n getTotalFrames: function ()\n {\n return this.currentAnim.frames.length;\n },\n\n /**\n * The internal update loop for the Animation Component.\n *\n * @method Phaser.GameObjects.Components.Animation#update\n * @since 3.0.0\n *\n * @param {number} time - The current timestamp.\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\n */\n update: function (time, delta)\n {\n if (!this.currentAnim || !this.isPlaying || this.currentAnim.paused)\n {\n return;\n }\n\n this.accumulator += delta * this._timeScale;\n\n if (this._pendingStop === 1)\n {\n this._pendingStopValue -= delta;\n\n if (this._pendingStopValue <= 0)\n {\n return this.currentAnim.completeAnimation(this);\n }\n }\n\n if (this.accumulator >= this.nextTick)\n {\n this.currentAnim.setFrame(this);\n }\n },\n\n /**\n * Sets the given Animation Frame as being the current frame\n * and applies it to the parent Game Object, adjusting its size and origin as needed.\n *\n * @method Phaser.GameObjects.Components.Animation#setCurrentFrame\n * @since 3.4.0\n *\n * @param {Phaser.Animations.AnimationFrame} animationFrame - The Animation Frame to set as being current.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\n */\n setCurrentFrame: function (animationFrame)\n {\n var gameObject = this.parent;\n\n this.currentFrame = animationFrame;\n\n gameObject.texture = animationFrame.frame.texture;\n gameObject.frame = animationFrame.frame;\n\n if (gameObject.isCropped)\n {\n gameObject.frame.updateCropUVs(gameObject._crop, gameObject.flipX, gameObject.flipY);\n }\n\n gameObject.setSizeToFrame();\n\n if (gameObject._originComponent)\n {\n if (animationFrame.frame.customPivot)\n {\n gameObject.setOrigin(animationFrame.frame.pivotX, animationFrame.frame.pivotY);\n }\n else\n {\n gameObject.updateDisplayOrigin();\n }\n }\n\n return gameObject;\n },\n\n /**\n * Internal frame change handler.\n *\n * @method Phaser.GameObjects.Components.Animation#updateFrame\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE\n * @private\n * @since 3.0.0\n *\n * @param {Phaser.Animations.AnimationFrame} animationFrame - The animation frame to change to.\n */\n updateFrame: function (animationFrame)\n {\n var gameObject = this.setCurrentFrame(animationFrame);\n\n if (this.isPlaying)\n {\n if (animationFrame.setAlpha)\n {\n gameObject.alpha = animationFrame.alpha;\n }\n\n var anim = this.currentAnim;\n\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_UPDATE + anim.key, anim, animationFrame, gameObject);\n\n gameObject.emit(Events.SPRITE_ANIMATION_UPDATE, anim, animationFrame, gameObject);\n\n if (this._pendingStop === 3 && this._pendingStopValue === animationFrame)\n {\n this.currentAnim.completeAnimation(this);\n }\n }\n },\n\n /**\n * Advances the animation to the next frame, regardless of the time or animation state.\n * If the animation is set to repeat, or yoyo, this will still take effect.\n *\n * Calling this does not change the direction of the animation. I.e. if it was currently\n * playing in reverse, calling this method doesn't then change the direction to forwards.\n *\n * @method Phaser.GameObjects.Components.Animation#nextFrame\n * @since 3.16.0\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\n */\n nextFrame: function ()\n {\n if (this.currentAnim)\n {\n this.currentAnim.nextFrame(this);\n }\n\n return this.parent;\n },\n\n /**\n * Advances the animation to the previous frame, regardless of the time or animation state.\n * If the animation is set to repeat, or yoyo, this will still take effect.\n *\n * Calling this does not change the direction of the animation. I.e. if it was currently\n * playing in forwards, calling this method doesn't then change the direction to backwards.\n *\n * @method Phaser.GameObjects.Components.Animation#previousFrame\n * @since 3.16.0\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\n */\n previousFrame: function ()\n {\n if (this.currentAnim)\n {\n this.currentAnim.previousFrame(this);\n }\n\n return this.parent;\n },\n\n /**\n * Sets if the current Animation will yoyo when it reaches the end.\n * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again.\n *\n * @method Phaser.GameObjects.Components.Animation#setYoyo\n * @since 3.4.0\n *\n * @param {boolean} [value=false] - `true` if the animation should yoyo, `false` to not.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\n */\n setYoyo: function (value)\n {\n if (value === undefined) { value = false; }\n\n this._yoyo = value;\n\n return this.parent;\n },\n\n /**\n * Gets if the current Animation will yoyo when it reaches the end.\n * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again.\n *\n * @method Phaser.GameObjects.Components.Animation#getYoyo\n * @since 3.4.0\n *\n * @return {boolean} `true` if the animation is set to yoyo, `false` if not.\n */\n getYoyo: function ()\n {\n return this._yoyo;\n },\n\n /**\n * Destroy this Animation component.\n *\n * Unregisters event listeners and cleans up its references.\n *\n * @method Phaser.GameObjects.Components.Animation#destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.animationManager.off(Events.REMOVE_ANIMATION, this.remove, this);\n\n this.animationManager = null;\n this.parent = null;\n this.nextAnimsQueue.length = 0;\n\n this.currentAnim = null;\n this.currentFrame = null;\n }\n\n});\n\nmodule.exports = Animation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar BlendModes = require('../../renderer/BlendModes');\n\n/**\n * Provides methods used for setting the blend mode of a Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.BlendMode\n * @since 3.0.0\n */\n\nvar BlendMode = {\n\n /**\n * Private internal value. Holds the current blend mode.\n * \n * @name Phaser.GameObjects.Components.BlendMode#_blendMode\n * @type {integer}\n * @private\n * @default 0\n * @since 3.0.0\n */\n _blendMode: BlendModes.NORMAL,\n\n /**\n * Sets the Blend Mode being used by this Game Object.\n *\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\n *\n * Under WebGL only the following Blend Modes are available:\n *\n * * ADD\n * * MULTIPLY\n * * SCREEN\n * * ERASE\n *\n * Canvas has more available depending on browser support.\n *\n * You can also create your own custom Blend Modes in WebGL.\n *\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\n * reasons try to be careful about the construction of your Scene and the frequency of which blend modes\n * are used.\n *\n * @name Phaser.GameObjects.Components.BlendMode#blendMode\n * @type {(Phaser.BlendModes|string)}\n * @since 3.0.0\n */\n blendMode: {\n\n get: function ()\n {\n return this._blendMode;\n },\n\n set: function (value)\n {\n if (typeof value === 'string')\n {\n value = BlendModes[value];\n }\n\n value |= 0;\n\n if (value >= -1)\n {\n this._blendMode = value;\n }\n }\n\n },\n\n /**\n * Sets the Blend Mode being used by this Game Object.\n *\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\n *\n * Under WebGL only the following Blend Modes are available:\n *\n * * ADD\n * * MULTIPLY\n * * SCREEN\n * * ERASE (only works when rendering to a framebuffer, like a Render Texture)\n *\n * Canvas has more available depending on browser support.\n *\n * You can also create your own custom Blend Modes in WebGL.\n *\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\n * reasons try to be careful about the construction of your Scene and the frequency in which blend modes\n * are used.\n *\n * @method Phaser.GameObjects.Components.BlendMode#setBlendMode\n * @since 3.0.0\n *\n * @param {(string|Phaser.BlendModes)} value - The BlendMode value. Either a string or a CONST.\n *\n * @return {this} This Game Object instance.\n */\n setBlendMode: function (value)\n {\n this.blendMode = value;\n\n return this;\n }\n\n};\n\nmodule.exports = BlendMode;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for calculating and setting the size of a non-Frame based Game Object.\n * Should be applied as a mixin and not used directly.\n * \n * @namespace Phaser.GameObjects.Components.ComputedSize\n * @since 3.0.0\n */\n\nvar ComputedSize = {\n\n /**\n * The native (un-scaled) width of this Game Object.\n * \n * Changing this value will not change the size that the Game Object is rendered in-game.\n * For that you need to either set the scale of the Game Object (`setScale`) or use\n * the `displayWidth` property.\n * \n * @name Phaser.GameObjects.Components.ComputedSize#width\n * @type {number}\n * @since 3.0.0\n */\n width: 0,\n\n /**\n * The native (un-scaled) height of this Game Object.\n * \n * Changing this value will not change the size that the Game Object is rendered in-game.\n * For that you need to either set the scale of the Game Object (`setScale`) or use\n * the `displayHeight` property.\n * \n * @name Phaser.GameObjects.Components.ComputedSize#height\n * @type {number}\n * @since 3.0.0\n */\n height: 0,\n\n /**\n * The displayed width of this Game Object.\n * \n * This value takes into account the scale factor.\n * \n * Setting this value will adjust the Game Object's scale property.\n * \n * @name Phaser.GameObjects.Components.ComputedSize#displayWidth\n * @type {number}\n * @since 3.0.0\n */\n displayWidth: {\n\n get: function ()\n {\n return this.scaleX * this.width;\n },\n\n set: function (value)\n {\n this.scaleX = value / this.width;\n }\n\n },\n\n /**\n * The displayed height of this Game Object.\n * \n * This value takes into account the scale factor.\n * \n * Setting this value will adjust the Game Object's scale property.\n * \n * @name Phaser.GameObjects.Components.ComputedSize#displayHeight\n * @type {number}\n * @since 3.0.0\n */\n displayHeight: {\n\n get: function ()\n {\n return this.scaleY * this.height;\n },\n\n set: function (value)\n {\n this.scaleY = value / this.height;\n }\n\n },\n\n /**\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\n * \n * This will not change the size that the Game Object is rendered in-game.\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\n * to do so by giving pixel values.\n * \n * If you have enabled this Game Object for input, changing the size will _not_ change the\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\n * \n * @method Phaser.GameObjects.Components.ComputedSize#setSize\n * @since 3.4.0\n *\n * @param {number} width - The width of this Game Object.\n * @param {number} height - The height of this Game Object.\n * \n * @return {this} This Game Object instance.\n */\n setSize: function (width, height)\n {\n this.width = width;\n this.height = height;\n\n return this;\n },\n\n /**\n * Sets the display size of this Game Object.\n * \n * Calling this will adjust the scale.\n * \n * @method Phaser.GameObjects.Components.ComputedSize#setDisplaySize\n * @since 3.4.0\n *\n * @param {number} width - The width of this Game Object.\n * @param {number} height - The height of this Game Object.\n * \n * @return {this} This Game Object instance.\n */\n setDisplaySize: function (width, height)\n {\n this.displayWidth = width;\n this.displayHeight = height;\n\n return this;\n }\n\n};\n\nmodule.exports = ComputedSize;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for getting and setting the texture of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.Crop\n * @since 3.12.0\n */\n\nvar Crop = {\n\n /**\n * The Texture this Game Object is using to render with.\n *\n * @name Phaser.GameObjects.Components.Crop#texture\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\n * @since 3.0.0\n */\n texture: null,\n\n /**\n * The Texture Frame this Game Object is using to render with.\n *\n * @name Phaser.GameObjects.Components.Crop#frame\n * @type {Phaser.Textures.Frame}\n * @since 3.0.0\n */\n frame: null,\n\n /**\n * A boolean flag indicating if this Game Object is being cropped or not.\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\n *\n * @name Phaser.GameObjects.Components.Crop#isCropped\n * @type {boolean}\n * @since 3.11.0\n */\n isCropped: false,\n\n /**\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\n * \n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\n * \n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\n * changes what is shown when rendered.\n * \n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\n * \n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\n * \n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\n * \n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\n * \n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\n * \n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\n * the renderer to skip several internal calculations.\n *\n * @method Phaser.GameObjects.Components.Crop#setCrop\n * @since 3.11.0\n *\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\n * @param {number} [y] - The y coordinate to start the crop from.\n * @param {number} [width] - The width of the crop rectangle in pixels.\n * @param {number} [height] - The height of the crop rectangle in pixels.\n *\n * @return {this} This Game Object instance.\n */\n setCrop: function (x, y, width, height)\n {\n if (x === undefined)\n {\n this.isCropped = false;\n }\n else if (this.frame)\n {\n if (typeof x === 'number')\n {\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\n }\n else\n {\n var rect = x;\n\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\n }\n\n this.isCropped = true;\n }\n\n return this;\n },\n\n /**\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\n *\n * @method Phaser.GameObjects.Components.Crop#resetCropObject\n * @private\n * @since 3.12.0\n * \n * @return {object} The crop object.\n */\n resetCropObject: function ()\n {\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\n }\n\n};\n\nmodule.exports = Crop;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the depth of a Game Object.\n * Should be applied as a mixin and not used directly.\n * \n * @namespace Phaser.GameObjects.Components.Depth\n * @since 3.0.0\n */\n\nvar Depth = {\n\n /**\n * Private internal value. Holds the depth of the Game Object.\n * \n * @name Phaser.GameObjects.Components.Depth#_depth\n * @type {integer}\n * @private\n * @default 0\n * @since 3.0.0\n */\n _depth: 0,\n\n /**\n * The depth of this Game Object within the Scene.\n * \n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\n * of Game Objects, without actually moving their position in the display list.\n *\n * The default depth is zero. A Game Object with a higher depth\n * value will always render in front of one with a lower value.\n *\n * Setting the depth will queue a depth sort event within the Scene.\n * \n * @name Phaser.GameObjects.Components.Depth#depth\n * @type {number}\n * @since 3.0.0\n */\n depth: {\n\n get: function ()\n {\n return this._depth;\n },\n\n set: function (value)\n {\n this.scene.sys.queueDepthSort();\n this._depth = value;\n }\n\n },\n\n /**\n * The depth of this Game Object within the Scene.\n * \n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\n * of Game Objects, without actually moving their position in the display list.\n *\n * The default depth is zero. A Game Object with a higher depth\n * value will always render in front of one with a lower value.\n *\n * Setting the depth will queue a depth sort event within the Scene.\n * \n * @method Phaser.GameObjects.Components.Depth#setDepth\n * @since 3.0.0\n *\n * @param {integer} value - The depth of this Game Object.\n * \n * @return {this} This Game Object instance.\n */\n setDepth: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.depth = value;\n\n return this;\n }\n\n};\n\nmodule.exports = Depth;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for visually flipping a Game Object.\n * Should be applied as a mixin and not used directly.\n * \n * @namespace Phaser.GameObjects.Components.Flip\n * @since 3.0.0\n */\n\nvar Flip = {\n\n /**\n * The horizontally flipped state of the Game Object.\n * \n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\n * \n * @name Phaser.GameObjects.Components.Flip#flipX\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n flipX: false,\n\n /**\n * The vertically flipped state of the Game Object.\n * \n * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down)\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\n * \n * @name Phaser.GameObjects.Components.Flip#flipY\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n flipY: false,\n\n /**\n * Toggles the horizontal flipped state of this Game Object.\n * \n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\n * \n * @method Phaser.GameObjects.Components.Flip#toggleFlipX\n * @since 3.0.0\n * \n * @return {this} This Game Object instance.\n */\n toggleFlipX: function ()\n {\n this.flipX = !this.flipX;\n\n return this;\n },\n\n /**\n * Toggles the vertical flipped state of this Game Object.\n * \n * @method Phaser.GameObjects.Components.Flip#toggleFlipY\n * @since 3.0.0\n * \n * @return {this} This Game Object instance.\n */\n toggleFlipY: function ()\n {\n this.flipY = !this.flipY;\n\n return this;\n },\n\n /**\n * Sets the horizontal flipped state of this Game Object.\n * \n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\n * \n * @method Phaser.GameObjects.Components.Flip#setFlipX\n * @since 3.0.0\n *\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\n * \n * @return {this} This Game Object instance.\n */\n setFlipX: function (value)\n {\n this.flipX = value;\n\n return this;\n },\n\n /**\n * Sets the vertical flipped state of this Game Object.\n * \n * @method Phaser.GameObjects.Components.Flip#setFlipY\n * @since 3.0.0\n *\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\n * \n * @return {this} This Game Object instance.\n */\n setFlipY: function (value)\n {\n this.flipY = value;\n\n return this;\n },\n\n /**\n * Sets the horizontal and vertical flipped state of this Game Object.\n * \n * A Game Object that is flipped will render inversed on the flipped axis.\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\n * \n * @method Phaser.GameObjects.Components.Flip#setFlip\n * @since 3.0.0\n *\n * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\n * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\n * \n * @return {this} This Game Object instance.\n */\n setFlip: function (x, y)\n {\n this.flipX = x;\n this.flipY = y;\n\n return this;\n },\n\n /**\n * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.\n * \n * @method Phaser.GameObjects.Components.Flip#resetFlip\n * @since 3.0.0\n *\n * @return {this} This Game Object instance.\n */\n resetFlip: function ()\n {\n this.flipX = false;\n this.flipY = false;\n\n return this;\n }\n\n};\n\nmodule.exports = Flip;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Rectangle = require('../../geom/rectangle/Rectangle');\nvar RotateAround = require('../../math/RotateAround');\nvar Vector2 = require('../../math/Vector2');\n\n/**\n * Provides methods used for obtaining the bounds of a Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.GetBounds\n * @since 3.0.0\n */\n\nvar GetBounds = {\n\n /**\n * Processes the bounds output vector before returning it.\n *\n * @method Phaser.GameObjects.Components.GetBounds#prepareBoundsOutput\n * @private\n * @since 3.18.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} output - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n prepareBoundsOutput: function (output, includeParent)\n {\n if (includeParent === undefined) { includeParent = false; }\n\n if (this.rotation !== 0)\n {\n RotateAround(output, this.x, this.y, this.rotation);\n }\n\n if (includeParent && this.parentContainer)\n {\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\n\n parentMatrix.transformPoint(output.x, output.y, output);\n }\n\n return output;\n },\n\n /**\n * Gets the center coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getCenter\n * @since 3.0.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getCenter: function (output)\n {\n if (output === undefined) { output = new Vector2(); }\n\n output.x = this.x - (this.displayWidth * this.originX) + (this.displayWidth / 2);\n output.y = this.y - (this.displayHeight * this.originY) + (this.displayHeight / 2);\n\n return output;\n },\n\n /**\n * Gets the top-left corner coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getTopLeft\n * @since 3.0.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getTopLeft: function (output, includeParent)\n {\n if (!output) { output = new Vector2(); }\n\n output.x = this.x - (this.displayWidth * this.originX);\n output.y = this.y - (this.displayHeight * this.originY);\n\n return this.prepareBoundsOutput(output, includeParent);\n },\n\n /**\n * Gets the top-center coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getTopCenter\n * @since 3.18.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getTopCenter: function (output, includeParent)\n {\n if (!output) { output = new Vector2(); }\n\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\n output.y = this.y - (this.displayHeight * this.originY);\n\n return this.prepareBoundsOutput(output, includeParent);\n },\n\n /**\n * Gets the top-right corner coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getTopRight\n * @since 3.0.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getTopRight: function (output, includeParent)\n {\n if (!output) { output = new Vector2(); }\n\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\n output.y = this.y - (this.displayHeight * this.originY);\n\n return this.prepareBoundsOutput(output, includeParent);\n },\n\n /**\n * Gets the left-center coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getLeftCenter\n * @since 3.18.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getLeftCenter: function (output, includeParent)\n {\n if (!output) { output = new Vector2(); }\n\n output.x = this.x - (this.displayWidth * this.originX);\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\n\n return this.prepareBoundsOutput(output, includeParent);\n },\n\n /**\n * Gets the right-center coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getRightCenter\n * @since 3.18.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getRightCenter: function (output, includeParent)\n {\n if (!output) { output = new Vector2(); }\n\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\n\n return this.prepareBoundsOutput(output, includeParent);\n },\n\n /**\n * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getBottomLeft\n * @since 3.0.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getBottomLeft: function (output, includeParent)\n {\n if (!output) { output = new Vector2(); }\n\n output.x = this.x - (this.displayWidth * this.originX);\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\n\n return this.prepareBoundsOutput(output, includeParent);\n },\n\n /**\n * Gets the bottom-center coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getBottomCenter\n * @since 3.18.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getBottomCenter: function (output, includeParent)\n {\n if (!output) { output = new Vector2(); }\n\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\n\n return this.prepareBoundsOutput(output, includeParent);\n },\n\n /**\n * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getBottomRight\n * @since 3.0.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getBottomRight: function (output, includeParent)\n {\n if (!output) { output = new Vector2(); }\n\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\n\n return this.prepareBoundsOutput(output, includeParent);\n },\n\n /**\n * Gets the bounds of this Game Object, regardless of origin.\n * The values are stored and returned in a Rectangle, or Rectangle-like, object.\n *\n * @method Phaser.GameObjects.Components.GetBounds#getBounds\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Rectangle} O - [output,$return]\n *\n * @param {(Phaser.Geom.Rectangle|object)} [output] - An object to store the values in. If not provided a new Rectangle will be created.\n *\n * @return {(Phaser.Geom.Rectangle|object)} The values stored in the output object.\n */\n getBounds: function (output)\n {\n if (output === undefined) { output = new Rectangle(); }\n\n // We can use the output object to temporarily store the x/y coords in:\n\n var TLx, TLy, TRx, TRy, BLx, BLy, BRx, BRy;\n\n // Instead of doing a check if parent container is \n // defined per corner we only do it once.\n if (this.parentContainer)\n {\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\n\n this.getTopLeft(output);\n parentMatrix.transformPoint(output.x, output.y, output);\n\n TLx = output.x;\n TLy = output.y;\n\n this.getTopRight(output);\n parentMatrix.transformPoint(output.x, output.y, output);\n\n TRx = output.x;\n TRy = output.y;\n\n this.getBottomLeft(output);\n parentMatrix.transformPoint(output.x, output.y, output);\n\n BLx = output.x;\n BLy = output.y;\n\n this.getBottomRight(output);\n parentMatrix.transformPoint(output.x, output.y, output);\n\n BRx = output.x;\n BRy = output.y;\n }\n else\n {\n this.getTopLeft(output);\n\n TLx = output.x;\n TLy = output.y;\n\n this.getTopRight(output);\n\n TRx = output.x;\n TRy = output.y;\n\n this.getBottomLeft(output);\n\n BLx = output.x;\n BLy = output.y;\n\n this.getBottomRight(output);\n\n BRx = output.x;\n BRy = output.y;\n }\n\n output.x = Math.min(TLx, TRx, BLx, BRx);\n output.y = Math.min(TLy, TRy, BLy, BRy);\n output.width = Math.max(TLx, TRx, BLx, BRx) - output.x;\n output.height = Math.max(TLy, TRy, BLy, BRy) - output.y;\n\n return output;\n }\n\n};\n\nmodule.exports = GetBounds;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar BitmapMask = require('../../display/mask/BitmapMask');\nvar GeometryMask = require('../../display/mask/GeometryMask');\n\n/**\n * Provides methods used for getting and setting the mask of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.Mask\n * @since 3.0.0\n */\n\nvar Mask = {\n\n /**\n * The Mask this Game Object is using during render.\n *\n * @name Phaser.GameObjects.Components.Mask#mask\n * @type {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask}\n * @since 3.0.0\n */\n mask: null,\n\n /**\n * Sets the mask that this Game Object will use to render with.\n *\n * The mask must have been previously created and can be either a GeometryMask or a BitmapMask.\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\n *\n * If a mask is already set on this Game Object it will be immediately replaced.\n * \n * Masks are positioned in global space and are not relative to the Game Object to which they\n * are applied. The reason for this is that multiple Game Objects can all share the same mask.\n * \n * Masks have no impact on physics or input detection. They are purely a rendering component\n * that allows you to limit what is visible during the render pass.\n *\n * @method Phaser.GameObjects.Components.Mask#setMask\n * @since 3.6.2\n *\n * @param {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask} mask - The mask this Game Object will use when rendering.\n *\n * @return {this} This Game Object instance.\n */\n setMask: function (mask)\n {\n this.mask = mask;\n\n return this;\n },\n\n /**\n * Clears the mask that this Game Object was using.\n *\n * @method Phaser.GameObjects.Components.Mask#clearMask\n * @since 3.6.2\n *\n * @param {boolean} [destroyMask=false] - Destroy the mask before clearing it?\n *\n * @return {this} This Game Object instance.\n */\n clearMask: function (destroyMask)\n {\n if (destroyMask === undefined) { destroyMask = false; }\n\n if (destroyMask && this.mask)\n {\n this.mask.destroy();\n }\n\n this.mask = null;\n\n return this;\n },\n\n /**\n * Creates and returns a Bitmap Mask. This mask can be used by any Game Object,\n * including this one.\n *\n * To create the mask you need to pass in a reference to a renderable Game Object.\n * A renderable Game Object is one that uses a texture to render with, such as an\n * Image, Sprite, Render Texture or BitmapText.\n *\n * If you do not provide a renderable object, and this Game Object has a texture,\n * it will use itself as the object. This means you can call this method to create\n * a Bitmap Mask from any renderable Game Object.\n *\n * @method Phaser.GameObjects.Components.Mask#createBitmapMask\n * @since 3.6.2\n * \n * @param {Phaser.GameObjects.GameObject} [renderable] - A renderable Game Object that uses a texture, such as a Sprite.\n *\n * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created.\n */\n createBitmapMask: function (renderable)\n {\n if (renderable === undefined && (this.texture || this.shader))\n {\n // eslint-disable-next-line consistent-this\n renderable = this;\n }\n\n return new BitmapMask(this.scene, renderable);\n },\n\n /**\n * Creates and returns a Geometry Mask. This mask can be used by any Game Object,\n * including this one.\n *\n * To create the mask you need to pass in a reference to a Graphics Game Object.\n *\n * If you do not provide a graphics object, and this Game Object is an instance\n * of a Graphics object, then it will use itself to create the mask.\n * \n * This means you can call this method to create a Geometry Mask from any Graphics Game Object.\n *\n * @method Phaser.GameObjects.Components.Mask#createGeometryMask\n * @since 3.6.2\n * \n * @param {Phaser.GameObjects.Graphics} [graphics] - A Graphics Game Object. The geometry within it will be used as the mask.\n *\n * @return {Phaser.Display.Masks.GeometryMask} This Geometry Mask that was created.\n */\n createGeometryMask: function (graphics)\n {\n if (graphics === undefined && this.type === 'Graphics')\n {\n // eslint-disable-next-line consistent-this\n graphics = this;\n }\n\n return new GeometryMask(this.scene, graphics);\n }\n\n};\n\nmodule.exports = Mask;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for getting and setting the origin of a Game Object.\n * Values are normalized, given in the range 0 to 1.\n * Display values contain the calculated pixel values.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.Origin\n * @since 3.0.0\n */\n\nvar Origin = {\n\n /**\n * A property indicating that a Game Object has this component.\n *\n * @name Phaser.GameObjects.Components.Origin#_originComponent\n * @type {boolean}\n * @private\n * @default true\n * @since 3.2.0\n */\n _originComponent: true,\n\n /**\n * The horizontal origin of this Game Object.\n * The origin maps the relationship between the size and position of the Game Object.\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\n * Setting the value to 0 means the position now relates to the left of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Origin#originX\n * @type {number}\n * @default 0.5\n * @since 3.0.0\n */\n originX: 0.5,\n\n /**\n * The vertical origin of this Game Object.\n * The origin maps the relationship between the size and position of the Game Object.\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\n * Setting the value to 0 means the position now relates to the top of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Origin#originY\n * @type {number}\n * @default 0.5\n * @since 3.0.0\n */\n originY: 0.5,\n\n // private + read only\n _displayOriginX: 0,\n _displayOriginY: 0,\n\n /**\n * The horizontal display origin of this Game Object.\n * The origin is a normalized value between 0 and 1.\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\n *\n * @name Phaser.GameObjects.Components.Origin#displayOriginX\n * @type {number}\n * @since 3.0.0\n */\n displayOriginX: {\n\n get: function ()\n {\n return this._displayOriginX;\n },\n\n set: function (value)\n {\n this._displayOriginX = value;\n this.originX = value / this.width;\n }\n\n },\n\n /**\n * The vertical display origin of this Game Object.\n * The origin is a normalized value between 0 and 1.\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\n *\n * @name Phaser.GameObjects.Components.Origin#displayOriginY\n * @type {number}\n * @since 3.0.0\n */\n displayOriginY: {\n\n get: function ()\n {\n return this._displayOriginY;\n },\n\n set: function (value)\n {\n this._displayOriginY = value;\n this.originY = value / this.height;\n }\n\n },\n\n /**\n * Sets the origin of this Game Object.\n *\n * The values are given in the range 0 to 1.\n *\n * @method Phaser.GameObjects.Components.Origin#setOrigin\n * @since 3.0.0\n *\n * @param {number} [x=0.5] - The horizontal origin value.\n * @param {number} [y=x] - The vertical origin value. If not defined it will be set to the value of `x`.\n *\n * @return {this} This Game Object instance.\n */\n setOrigin: function (x, y)\n {\n if (x === undefined) { x = 0.5; }\n if (y === undefined) { y = x; }\n\n this.originX = x;\n this.originY = y;\n\n return this.updateDisplayOrigin();\n },\n\n /**\n * Sets the origin of this Game Object based on the Pivot values in its Frame.\n *\n * @method Phaser.GameObjects.Components.Origin#setOriginFromFrame\n * @since 3.0.0\n *\n * @return {this} This Game Object instance.\n */\n setOriginFromFrame: function ()\n {\n if (!this.frame || !this.frame.customPivot)\n {\n return this.setOrigin();\n }\n else\n {\n this.originX = this.frame.pivotX;\n this.originY = this.frame.pivotY;\n }\n\n return this.updateDisplayOrigin();\n },\n\n /**\n * Sets the display origin of this Game Object.\n * The difference between this and setting the origin is that you can use pixel values for setting the display origin.\n *\n * @method Phaser.GameObjects.Components.Origin#setDisplayOrigin\n * @since 3.0.0\n *\n * @param {number} [x=0] - The horizontal display origin value.\n * @param {number} [y=x] - The vertical display origin value. If not defined it will be set to the value of `x`.\n *\n * @return {this} This Game Object instance.\n */\n setDisplayOrigin: function (x, y)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = x; }\n\n this.displayOriginX = x;\n this.displayOriginY = y;\n\n return this;\n },\n\n /**\n * Updates the Display Origin cached values internally stored on this Game Object.\n * You don't usually call this directly, but it is exposed for edge-cases where you may.\n *\n * @method Phaser.GameObjects.Components.Origin#updateDisplayOrigin\n * @since 3.0.0\n *\n * @return {this} This Game Object instance.\n */\n updateDisplayOrigin: function ()\n {\n this._displayOriginX = this.originX * this.width;\n this._displayOriginY = this.originY * this.height;\n\n return this;\n }\n\n};\n\nmodule.exports = Origin;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar DegToRad = require('../../math/DegToRad');\nvar GetBoolean = require('../../tweens/builders/GetBoolean');\nvar GetValue = require('../../utils/object/GetValue');\nvar TWEEN_CONST = require('../../tweens/tween/const');\nvar Vector2 = require('../../math/Vector2');\n\n/**\n * Provides methods used for managing a Game Object following a Path.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.PathFollower\n * @since 3.17.0\n */\n\nvar PathFollower = {\n\n /**\n * The Path this PathFollower is following. It can only follow one Path at a time.\n *\n * @name Phaser.GameObjects.Components.PathFollower#path\n * @type {Phaser.Curves.Path}\n * @since 3.0.0\n */\n path: null,\n\n /**\n * Should the PathFollower automatically rotate to point in the direction of the Path?\n *\n * @name Phaser.GameObjects.Components.PathFollower#rotateToPath\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n rotateToPath: false,\n\n /**\n * If the PathFollower is rotating to match the Path (@see Phaser.GameObjects.PathFollower#rotateToPath)\n * this value is added to the rotation value. This allows you to rotate objects to a path but control\n * the angle of the rotation as well.\n *\n * @name Phaser.GameObjects.PathFollower#pathRotationOffset\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n pathRotationOffset: 0,\n\n /**\n * An additional vector to add to the PathFollowers position, allowing you to offset it from the\n * Path coordinates.\n *\n * @name Phaser.GameObjects.PathFollower#pathOffset\n * @type {Phaser.Math.Vector2}\n * @since 3.0.0\n */\n pathOffset: null,\n\n /**\n * A Vector2 that stores the current point of the path the follower is on.\n *\n * @name Phaser.GameObjects.PathFollower#pathVector\n * @type {Phaser.Math.Vector2}\n * @since 3.0.0\n */\n pathVector: null,\n\n /**\n * The distance the follower has traveled from the previous point to the current one, at the last update.\n *\n * @name Phaser.GameObjects.PathFollower#pathDelta\n * @type {Phaser.Math.Vector2}\n * @since 3.23.0\n */\n pathDelta: null,\n\n /**\n * The Tween used for following the Path.\n *\n * @name Phaser.GameObjects.PathFollower#pathTween\n * @type {Phaser.Tweens.Tween}\n * @since 3.0.0\n */\n pathTween: null,\n\n /**\n * Settings for the PathFollower.\n *\n * @name Phaser.GameObjects.PathFollower#pathConfig\n * @type {?Phaser.Types.GameObjects.PathFollower.PathConfig}\n * @default null\n * @since 3.0.0\n */\n pathConfig: null,\n\n /**\n * Records the direction of the follower so it can change direction.\n *\n * @name Phaser.GameObjects.PathFollower#_prevDirection\n * @type {integer}\n * @private\n * @since 3.0.0\n */\n _prevDirection: TWEEN_CONST.PLAYING_FORWARD,\n\n /**\n * Set the Path that this PathFollower should follow.\n *\n * Optionally accepts {@link Phaser.Types.GameObjects.PathFollower.PathConfig} settings.\n *\n * @method Phaser.GameObjects.Components.PathFollower#setPath\n * @since 3.0.0\n *\n * @param {Phaser.Curves.Path} path - The Path this PathFollower is following. It can only follow one Path at a time.\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config] - Settings for the PathFollower.\n *\n * @return {this} This Game Object.\n */\n setPath: function (path, config)\n {\n if (config === undefined) { config = this.pathConfig; }\n\n var tween = this.pathTween;\n\n if (tween && tween.isPlaying())\n {\n tween.stop();\n }\n\n this.path = path;\n\n if (config)\n {\n this.startFollow(config);\n }\n\n return this;\n },\n\n /**\n * Set whether the PathFollower should automatically rotate to point in the direction of the Path.\n *\n * @method Phaser.GameObjects.Components.PathFollower#setRotateToPath\n * @since 3.0.0\n *\n * @param {boolean} value - Whether the PathFollower should automatically rotate to point in the direction of the Path.\n * @param {number} [offset=0] - Rotation offset in degrees.\n *\n * @return {this} This Game Object.\n */\n setRotateToPath: function (value, offset)\n {\n if (offset === undefined) { offset = 0; }\n\n this.rotateToPath = value;\n\n this.pathRotationOffset = offset;\n\n return this;\n },\n\n /**\n * Is this PathFollower actively following a Path or not?\n *\n * To be considered as `isFollowing` it must be currently moving on a Path, and not paused.\n *\n * @method Phaser.GameObjects.Components.PathFollower#isFollowing\n * @since 3.0.0\n *\n * @return {boolean} `true` is this PathFollower is actively following a Path, otherwise `false`.\n */\n isFollowing: function ()\n {\n var tween = this.pathTween;\n\n return (tween && tween.isPlaying());\n },\n\n /**\n * Starts this PathFollower following its given Path.\n *\n * @method Phaser.GameObjects.Components.PathFollower#startFollow\n * @since 3.3.0\n *\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config={}] - The duration of the follow, or a PathFollower config object.\n * @param {number} [startAt=0] - Optional start position of the follow, between 0 and 1.\n *\n * @return {this} This Game Object.\n */\n startFollow: function (config, startAt)\n {\n if (config === undefined) { config = {}; }\n if (startAt === undefined) { startAt = 0; }\n\n var tween = this.pathTween;\n\n if (tween && tween.isPlaying())\n {\n tween.stop();\n }\n\n if (typeof config === 'number')\n {\n config = { duration: config };\n }\n\n // Override in case they've been specified in the config\n config.from = GetValue(config, 'from', 0);\n config.to = GetValue(config, 'to', 1);\n\n var positionOnPath = GetBoolean(config, 'positionOnPath', false);\n\n this.rotateToPath = GetBoolean(config, 'rotateToPath', false);\n this.pathRotationOffset = GetValue(config, 'rotationOffset', 0);\n\n // This works, but it's not an ideal way of doing it as the follower jumps position\n var seek = GetValue(config, 'startAt', startAt);\n\n if (seek)\n {\n config.onStart = function (tween)\n {\n var tweenData = tween.data[0];\n tweenData.progress = seek;\n tweenData.elapsed = tweenData.duration * seek;\n var v = tweenData.ease(tweenData.progress);\n tweenData.current = tweenData.start + ((tweenData.end - tweenData.start) * v);\n tweenData.target[tweenData.key] = tweenData.current;\n };\n }\n\n if (!this.pathOffset)\n {\n this.pathOffset = new Vector2(this.x, this.y);\n }\n\n if (!this.pathVector)\n {\n this.pathVector = new Vector2();\n }\n\n if (!this.pathDelta)\n {\n this.pathDelta = new Vector2();\n }\n\n this.pathDelta.reset();\n\n this.pathTween = this.scene.sys.tweens.addCounter(config);\n\n // The starting point of the path, relative to this follower\n this.path.getStartPoint(this.pathOffset);\n\n if (positionOnPath)\n {\n this.x = this.pathOffset.x;\n this.y = this.pathOffset.y;\n }\n\n this.pathOffset.x = this.x - this.pathOffset.x;\n this.pathOffset.y = this.y - this.pathOffset.y;\n\n this._prevDirection = TWEEN_CONST.PLAYING_FORWARD;\n\n if (this.rotateToPath)\n {\n // Set the rotation now (in case the tween has a delay on it, etc)\n var nextPoint = this.path.getPoint(0.1);\n\n this.rotation = Math.atan2(nextPoint.y - this.y, nextPoint.x - this.x) + DegToRad(this.pathRotationOffset);\n }\n\n this.pathConfig = config;\n\n return this;\n },\n\n /**\n * Pauses this PathFollower. It will still continue to render, but it will remain motionless at the\n * point on the Path at which you paused it.\n *\n * @method Phaser.GameObjects.Components.PathFollower#pauseFollow\n * @since 3.3.0\n *\n * @return {this} This Game Object.\n */\n pauseFollow: function ()\n {\n var tween = this.pathTween;\n\n if (tween && tween.isPlaying())\n {\n tween.pause();\n }\n\n return this;\n },\n\n /**\n * Resumes a previously paused PathFollower.\n *\n * If the PathFollower was not paused this has no effect.\n *\n * @method Phaser.GameObjects.Components.PathFollower#resumeFollow\n * @since 3.3.0\n *\n * @return {this} This Game Object.\n */\n resumeFollow: function ()\n {\n var tween = this.pathTween;\n\n if (tween && tween.isPaused())\n {\n tween.resume();\n }\n\n return this;\n },\n\n /**\n * Stops this PathFollower from following the path any longer.\n *\n * This will invoke any 'stop' conditions that may exist on the Path, or for the follower.\n *\n * @method Phaser.GameObjects.Components.PathFollower#stopFollow\n * @since 3.3.0\n *\n * @return {this} This Game Object.\n */\n stopFollow: function ()\n {\n var tween = this.pathTween;\n\n if (tween && tween.isPlaying())\n {\n tween.stop();\n }\n\n return this;\n },\n\n /**\n * Internal update handler that advances this PathFollower along the path.\n *\n * Called automatically by the Scene step, should not typically be called directly.\n *\n * @method Phaser.GameObjects.Components.PathFollower#pathUpdate\n * @since 3.17.0\n */\n pathUpdate: function ()\n {\n var tween = this.pathTween;\n\n if (tween)\n {\n var tweenData = tween.data[0];\n var pathDelta = this.pathDelta;\n var pathVector = this.pathVector;\n\n pathDelta.copy(pathVector).negate();\n\n if (tweenData.state === TWEEN_CONST.COMPLETE)\n {\n this.path.getPoint(1, pathVector);\n\n pathDelta.add(pathVector);\n pathVector.add(this.pathOffset);\n\n this.setPosition(pathVector.x, pathVector.y);\n\n return;\n }\n else if (tweenData.state !== TWEEN_CONST.PLAYING_FORWARD && tweenData.state !== TWEEN_CONST.PLAYING_BACKWARD)\n {\n // If delayed, etc then bail out\n return;\n }\n\n this.path.getPoint(tween.getValue(), pathVector);\n\n pathDelta.add(pathVector);\n pathVector.add(this.pathOffset);\n\n var oldX = this.x;\n var oldY = this.y;\n\n this.setPosition(pathVector.x, pathVector.y);\n\n var speedX = this.x - oldX;\n var speedY = this.y - oldY;\n\n if (speedX === 0 && speedY === 0)\n {\n // Bail out early\n return;\n }\n\n if (tweenData.state !== this._prevDirection)\n {\n // We've changed direction, so don't do a rotate this frame\n this._prevDirection = tweenData.state;\n\n return;\n }\n\n if (this.rotateToPath)\n {\n this.rotation = Math.atan2(speedY, speedX) + DegToRad(this.pathRotationOffset);\n }\n }\n }\n\n};\n\nmodule.exports = PathFollower;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the WebGL rendering pipeline of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.Pipeline\n * @webglOnly\n * @since 3.0.0\n */\n\nvar Pipeline = {\n\n /**\n * The initial WebGL pipeline of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Pipeline#defaultPipeline\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\n * @default null\n * @webglOnly\n * @since 3.0.0\n */\n defaultPipeline: null,\n\n /**\n * The current WebGL pipeline of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Pipeline#pipeline\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\n * @default null\n * @webglOnly\n * @since 3.0.0\n */\n pipeline: null,\n\n /**\n * Sets the initial WebGL Pipeline of this Game Object.\n *\n * This should only be called during the instantiation of the Game Object.\n *\n * @method Phaser.GameObjects.Components.Pipeline#initPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @param {string} [pipelineName=MultiPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Multi Pipeline.\n *\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\n */\n initPipeline: function (pipelineName)\n {\n if (pipelineName === undefined) { pipelineName = 'MultiPipeline'; }\n\n var renderer = this.scene.sys.game.renderer;\n\n if (renderer && renderer.gl && renderer.hasPipeline(pipelineName))\n {\n this.defaultPipeline = renderer.getPipeline(pipelineName);\n this.pipeline = this.defaultPipeline;\n\n return true;\n }\n\n return false;\n },\n\n /**\n * Sets the active WebGL Pipeline of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Pipeline#setPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @param {string} pipelineName - The name of the pipeline to set on this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setPipeline: function (pipelineName)\n {\n var renderer = this.scene.sys.game.renderer;\n\n if (renderer && renderer.gl && renderer.hasPipeline(pipelineName))\n {\n this.pipeline = renderer.getPipeline(pipelineName);\n }\n\n return this;\n },\n\n /**\n * Resets the WebGL Pipeline of this Game Object back to the default it was created with.\n *\n * @method Phaser.GameObjects.Components.Pipeline#resetPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\n */\n resetPipeline: function ()\n {\n this.pipeline = this.defaultPipeline;\n\n return (this.pipeline !== null);\n },\n\n /**\n * Gets the name of the WebGL Pipeline this Game Object is currently using.\n *\n * @method Phaser.GameObjects.Components.Pipeline#getPipelineName\n * @webglOnly\n * @since 3.0.0\n *\n * @return {string} The string-based name of the pipeline being used by this Game Object.\n */\n getPipelineName: function ()\n {\n return this.pipeline.name;\n }\n\n};\n\nmodule.exports = Pipeline;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for getting and setting the Scroll Factor of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.ScrollFactor\n * @since 3.0.0\n */\n\nvar ScrollFactor = {\n\n /**\n * The horizontal scroll factor of this Game Object.\n *\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\n *\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\n * It does not change the Game Objects actual position values.\n *\n * A value of 1 means it will move exactly in sync with a camera.\n * A value of 0 means it will not move at all, even if the camera moves.\n * Other values control the degree to which the camera movement is mapped to this Game Object.\n * \n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\n * calculating physics collisions. Bodies always collide based on their world position, but changing\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\n * them from physics bodies if not accounted for in your code.\n *\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorX\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n scrollFactorX: 1,\n\n /**\n * The vertical scroll factor of this Game Object.\n *\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\n *\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\n * It does not change the Game Objects actual position values.\n *\n * A value of 1 means it will move exactly in sync with a camera.\n * A value of 0 means it will not move at all, even if the camera moves.\n * Other values control the degree to which the camera movement is mapped to this Game Object.\n * \n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\n * calculating physics collisions. Bodies always collide based on their world position, but changing\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\n * them from physics bodies if not accounted for in your code.\n *\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorY\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n scrollFactorY: 1,\n\n /**\n * Sets the scroll factor of this Game Object.\n *\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\n *\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\n * It does not change the Game Objects actual position values.\n *\n * A value of 1 means it will move exactly in sync with a camera.\n * A value of 0 means it will not move at all, even if the camera moves.\n * Other values control the degree to which the camera movement is mapped to this Game Object.\n * \n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\n * calculating physics collisions. Bodies always collide based on their world position, but changing\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\n * them from physics bodies if not accounted for in your code.\n *\n * @method Phaser.GameObjects.Components.ScrollFactor#setScrollFactor\n * @since 3.0.0\n *\n * @param {number} x - The horizontal scroll factor of this Game Object.\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\n *\n * @return {this} This Game Object instance.\n */\n setScrollFactor: function (x, y)\n {\n if (y === undefined) { y = x; }\n\n this.scrollFactorX = x;\n this.scrollFactorY = y;\n\n return this;\n }\n\n};\n\nmodule.exports = ScrollFactor;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for getting and setting the size of a Game Object.\n * \n * @namespace Phaser.GameObjects.Components.Size\n * @since 3.0.0\n */\n\nvar Size = {\n\n /**\n * A property indicating that a Game Object has this component.\n * \n * @name Phaser.GameObjects.Components.Size#_sizeComponent\n * @type {boolean}\n * @private\n * @default true\n * @since 3.2.0\n */\n _sizeComponent: true,\n\n /**\n * The native (un-scaled) width of this Game Object.\n * \n * Changing this value will not change the size that the Game Object is rendered in-game.\n * For that you need to either set the scale of the Game Object (`setScale`) or use\n * the `displayWidth` property.\n * \n * @name Phaser.GameObjects.Components.Size#width\n * @type {number}\n * @since 3.0.0\n */\n width: 0,\n\n /**\n * The native (un-scaled) height of this Game Object.\n * \n * Changing this value will not change the size that the Game Object is rendered in-game.\n * For that you need to either set the scale of the Game Object (`setScale`) or use\n * the `displayHeight` property.\n * \n * @name Phaser.GameObjects.Components.Size#height\n * @type {number}\n * @since 3.0.0\n */\n height: 0,\n\n /**\n * The displayed width of this Game Object.\n * \n * This value takes into account the scale factor.\n * \n * Setting this value will adjust the Game Object's scale property.\n * \n * @name Phaser.GameObjects.Components.Size#displayWidth\n * @type {number}\n * @since 3.0.0\n */\n displayWidth: {\n\n get: function ()\n {\n return Math.abs(this.scaleX * this.frame.realWidth);\n },\n\n set: function (value)\n {\n this.scaleX = value / this.frame.realWidth;\n }\n\n },\n\n /**\n * The displayed height of this Game Object.\n * \n * This value takes into account the scale factor.\n * \n * Setting this value will adjust the Game Object's scale property.\n * \n * @name Phaser.GameObjects.Components.Size#displayHeight\n * @type {number}\n * @since 3.0.0\n */\n displayHeight: {\n\n get: function ()\n {\n return Math.abs(this.scaleY * this.frame.realHeight);\n },\n\n set: function (value)\n {\n this.scaleY = value / this.frame.realHeight;\n }\n\n },\n\n /**\n * Sets the size of this Game Object to be that of the given Frame.\n * \n * This will not change the size that the Game Object is rendered in-game.\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\n * to do so by giving pixel values.\n * \n * If you have enabled this Game Object for input, changing the size will _not_ change the\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\n * \n * @method Phaser.GameObjects.Components.Size#setSizeToFrame\n * @since 3.0.0\n *\n * @param {Phaser.Textures.Frame} frame - The frame to base the size of this Game Object on.\n * \n * @return {this} This Game Object instance.\n */\n setSizeToFrame: function (frame)\n {\n if (frame === undefined) { frame = this.frame; }\n\n this.width = frame.realWidth;\n this.height = frame.realHeight;\n\n return this;\n },\n\n /**\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\n * \n * This will not change the size that the Game Object is rendered in-game.\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\n * to do so by giving pixel values.\n * \n * If you have enabled this Game Object for input, changing the size will _not_ change the\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\n * \n * @method Phaser.GameObjects.Components.Size#setSize\n * @since 3.0.0\n *\n * @param {number} width - The width of this Game Object.\n * @param {number} height - The height of this Game Object.\n * \n * @return {this} This Game Object instance.\n */\n setSize: function (width, height)\n {\n this.width = width;\n this.height = height;\n\n return this;\n },\n\n /**\n * Sets the display size of this Game Object.\n * \n * Calling this will adjust the scale.\n * \n * @method Phaser.GameObjects.Components.Size#setDisplaySize\n * @since 3.0.0\n *\n * @param {number} width - The width of this Game Object.\n * @param {number} height - The height of this Game Object.\n * \n * @return {this} This Game Object instance.\n */\n setDisplaySize: function (width, height)\n {\n this.displayWidth = width;\n this.displayHeight = height;\n\n return this;\n }\n\n};\n\nmodule.exports = Size;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// bitmask flag for GameObject.renderMask\nvar _FLAG = 8; // 1000\n\n/**\n * Provides methods used for getting and setting the texture of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.Texture\n * @since 3.0.0\n */\n\nvar Texture = {\n\n /**\n * The Texture this Game Object is using to render with.\n *\n * @name Phaser.GameObjects.Components.Texture#texture\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\n * @since 3.0.0\n */\n texture: null,\n\n /**\n * The Texture Frame this Game Object is using to render with.\n *\n * @name Phaser.GameObjects.Components.Texture#frame\n * @type {Phaser.Textures.Frame}\n * @since 3.0.0\n */\n frame: null,\n\n /**\n * Internal flag. Not to be set by this Game Object.\n *\n * @name Phaser.GameObjects.Components.Texture#isCropped\n * @type {boolean}\n * @private\n * @since 3.11.0\n */\n isCropped: false,\n\n /**\n * Sets the texture and frame this Game Object will use to render with.\n *\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\n *\n * @method Phaser.GameObjects.Components.Texture#setTexture\n * @since 3.0.0\n *\n * @param {(string|Phaser.Textures.Texture)} key - The key of the texture to be used, as stored in the Texture Manager, or a Texture instance.\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\n *\n * @return {this} This Game Object instance.\n */\n setTexture: function (key, frame)\n {\n this.texture = this.scene.sys.textures.get(key);\n\n return this.setFrame(frame);\n },\n\n /**\n * Sets the frame this Game Object will use to render with.\n *\n * The Frame has to belong to the current Texture being used.\n *\n * It can be either a string or an index.\n *\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\n *\n * @method Phaser.GameObjects.Components.Texture#setFrame\n * @since 3.0.0\n *\n * @param {(string|integer)} frame - The name or index of the frame within the Texture.\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\n *\n * @return {this} This Game Object instance.\n */\n setFrame: function (frame, updateSize, updateOrigin)\n {\n if (updateSize === undefined) { updateSize = true; }\n if (updateOrigin === undefined) { updateOrigin = true; }\n\n this.frame = this.texture.get(frame);\n\n if (!this.frame.cutWidth || !this.frame.cutHeight)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n\n if (this._sizeComponent && updateSize)\n {\n this.setSizeToFrame();\n }\n\n if (this._originComponent && updateOrigin)\n {\n if (this.frame.customPivot)\n {\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\n }\n else\n {\n this.updateDisplayOrigin();\n }\n }\n\n return this;\n }\n\n};\n\nmodule.exports = Texture;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// bitmask flag for GameObject.renderMask\nvar _FLAG = 8; // 1000\n\n/**\n * Provides methods used for getting and setting the texture of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.TextureCrop\n * @since 3.0.0\n */\n\nvar TextureCrop = {\n\n /**\n * The Texture this Game Object is using to render with.\n *\n * @name Phaser.GameObjects.Components.TextureCrop#texture\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\n * @since 3.0.0\n */\n texture: null,\n\n /**\n * The Texture Frame this Game Object is using to render with.\n *\n * @name Phaser.GameObjects.Components.TextureCrop#frame\n * @type {Phaser.Textures.Frame}\n * @since 3.0.0\n */\n frame: null,\n\n /**\n * A boolean flag indicating if this Game Object is being cropped or not.\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\n *\n * @name Phaser.GameObjects.Components.TextureCrop#isCropped\n * @type {boolean}\n * @since 3.11.0\n */\n isCropped: false,\n\n /**\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\n * \n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\n * \n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\n * changes what is shown when rendered.\n * \n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\n * \n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\n * \n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\n * \n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\n * \n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\n * \n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\n * the renderer to skip several internal calculations.\n *\n * @method Phaser.GameObjects.Components.TextureCrop#setCrop\n * @since 3.11.0\n *\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\n * @param {number} [y] - The y coordinate to start the crop from.\n * @param {number} [width] - The width of the crop rectangle in pixels.\n * @param {number} [height] - The height of the crop rectangle in pixels.\n *\n * @return {this} This Game Object instance.\n */\n setCrop: function (x, y, width, height)\n {\n if (x === undefined)\n {\n this.isCropped = false;\n }\n else if (this.frame)\n {\n if (typeof x === 'number')\n {\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\n }\n else\n {\n var rect = x;\n\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\n }\n\n this.isCropped = true;\n }\n\n return this;\n },\n\n /**\n * Sets the texture and frame this Game Object will use to render with.\n *\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\n *\n * @method Phaser.GameObjects.Components.TextureCrop#setTexture\n * @since 3.0.0\n *\n * @param {string} key - The key of the texture to be used, as stored in the Texture Manager.\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\n *\n * @return {this} This Game Object instance.\n */\n setTexture: function (key, frame)\n {\n this.texture = this.scene.sys.textures.get(key);\n\n return this.setFrame(frame);\n },\n\n /**\n * Sets the frame this Game Object will use to render with.\n *\n * The Frame has to belong to the current Texture being used.\n *\n * It can be either a string or an index.\n *\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\n *\n * @method Phaser.GameObjects.Components.TextureCrop#setFrame\n * @since 3.0.0\n *\n * @param {(string|integer)} frame - The name or index of the frame within the Texture.\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\n *\n * @return {this} This Game Object instance.\n */\n setFrame: function (frame, updateSize, updateOrigin)\n {\n if (updateSize === undefined) { updateSize = true; }\n if (updateOrigin === undefined) { updateOrigin = true; }\n\n this.frame = this.texture.get(frame);\n\n if (!this.frame.cutWidth || !this.frame.cutHeight)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n\n if (this._sizeComponent && updateSize)\n {\n this.setSizeToFrame();\n }\n\n if (this._originComponent && updateOrigin)\n {\n if (this.frame.customPivot)\n {\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\n }\n else\n {\n this.updateDisplayOrigin();\n }\n }\n\n if (this.isCropped)\n {\n this.frame.updateCropUVs(this._crop, this.flipX, this.flipY);\n }\n\n return this;\n },\n\n /**\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\n *\n * @method Phaser.GameObjects.Components.TextureCrop#resetCropObject\n * @private\n * @since 3.12.0\n * \n * @return {object} The crop object.\n */\n resetCropObject: function ()\n {\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\n }\n\n};\n\nmodule.exports = TextureCrop;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar GetColorFromValue = require('../../display/color/GetColorFromValue');\n\n/**\n * Provides methods used for setting the tint of a Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.Tint\n * @webglOnly\n * @since 3.0.0\n */\n\nvar Tint = {\n\n /**\n * Private internal value. Holds the top-left tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#_tintTL\n * @type {number}\n * @private\n * @default 16777215\n * @since 3.0.0\n */\n _tintTL: 16777215,\n\n /**\n * Private internal value. Holds the top-right tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#_tintTR\n * @type {number}\n * @private\n * @default 16777215\n * @since 3.0.0\n */\n _tintTR: 16777215,\n\n /**\n * Private internal value. Holds the bottom-left tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#_tintBL\n * @type {number}\n * @private\n * @default 16777215\n * @since 3.0.0\n */\n _tintBL: 16777215,\n\n /**\n * Private internal value. Holds the bottom-right tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#_tintBR\n * @type {number}\n * @private\n * @default 16777215\n * @since 3.0.0\n */\n _tintBR: 16777215,\n\n /**\n * Private internal value. Holds if the Game Object is tinted or not.\n *\n * @name Phaser.GameObjects.Components.Tint#_isTinted\n * @type {boolean}\n * @private\n * @default false\n * @since 3.11.0\n */\n _isTinted: false,\n\n /**\n * Fill or additive?\n *\n * @name Phaser.GameObjects.Components.Tint#tintFill\n * @type {boolean}\n * @default false\n * @since 3.11.0\n */\n tintFill: false,\n\n /**\n * Clears all tint values associated with this Game Object.\n *\n * Immediately sets the color values back to 0xffffff and the tint type to 'additive',\n * which results in no visible change to the texture.\n *\n * @method Phaser.GameObjects.Components.Tint#clearTint\n * @webglOnly\n * @since 3.0.0\n *\n * @return {this} This Game Object instance.\n */\n clearTint: function ()\n {\n this.setTint(0xffffff);\n\n this._isTinted = false;\n\n return this;\n },\n\n /**\n * Sets an additive tint on this Game Object.\n *\n * The tint works by taking the pixel color values from the Game Objects texture, and then\n * multiplying it by the color value of the tint. You can provide either one color value,\n * in which case the whole Game Object will be tinted in that color. Or you can provide a color\n * per corner. The colors are blended together across the extent of the Game Object.\n *\n * To modify the tint color once set, either call this method again with new values or use the\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\n *\n * To remove a tint call `clearTint`.\n *\n * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`.\n *\n * @method Phaser.GameObjects.Components.Tint#setTint\n * @webglOnly\n * @since 3.0.0\n *\n * @param {integer} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object.\n * @param {integer} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {integer} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {integer} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setTint: function (topLeft, topRight, bottomLeft, bottomRight)\n {\n if (topLeft === undefined) { topLeft = 0xffffff; }\n\n if (topRight === undefined)\n {\n topRight = topLeft;\n bottomLeft = topLeft;\n bottomRight = topLeft;\n }\n\n this._tintTL = GetColorFromValue(topLeft);\n this._tintTR = GetColorFromValue(topRight);\n this._tintBL = GetColorFromValue(bottomLeft);\n this._tintBR = GetColorFromValue(bottomRight);\n\n this._isTinted = true;\n\n this.tintFill = false;\n\n return this;\n },\n\n /**\n * Sets a fill-based tint on this Game Object.\n *\n * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture\n * with those in the tint. You can use this for effects such as making a player flash 'white'\n * if hit by something. You can provide either one color value, in which case the whole\n * Game Object will be rendered in that color. Or you can provide a color per corner. The colors\n * are blended together across the extent of the Game Object.\n *\n * To modify the tint color once set, either call this method again with new values or use the\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\n *\n * To remove a tint call `clearTint`.\n *\n * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`.\n *\n * @method Phaser.GameObjects.Components.Tint#setTintFill\n * @webglOnly\n * @since 3.11.0\n *\n * @param {integer} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object.\n * @param {integer} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {integer} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {integer} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setTintFill: function (topLeft, topRight, bottomLeft, bottomRight)\n {\n this.setTint(topLeft, topRight, bottomLeft, bottomRight);\n\n this.tintFill = true;\n\n return this;\n },\n\n /**\n * The tint value being applied to the top-left of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopLeft\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tintTopLeft: {\n\n get: function ()\n {\n return this._tintTL;\n },\n\n set: function (value)\n {\n this._tintTL = GetColorFromValue(value);\n this._isTinted = true;\n }\n\n },\n\n /**\n * The tint value being applied to the top-right of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopRight\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tintTopRight: {\n\n get: function ()\n {\n return this._tintTR;\n },\n\n set: function (value)\n {\n this._tintTR = GetColorFromValue(value);\n this._isTinted = true;\n }\n\n },\n\n /**\n * The tint value being applied to the bottom-left of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomLeft\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tintBottomLeft: {\n\n get: function ()\n {\n return this._tintBL;\n },\n\n set: function (value)\n {\n this._tintBL = GetColorFromValue(value);\n this._isTinted = true;\n }\n\n },\n\n /**\n * The tint value being applied to the bottom-right of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomRight\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tintBottomRight: {\n\n get: function ()\n {\n return this._tintBR;\n },\n\n set: function (value)\n {\n this._tintBR = GetColorFromValue(value);\n this._isTinted = true;\n }\n\n },\n\n /**\n * The tint value being applied to the whole of the Game Object.\n * This property is a setter-only. Use the properties `tintTopLeft` etc to read the current tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#tint\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tint: {\n\n set: function (value)\n {\n this.setTint(value, value, value, value);\n }\n },\n\n /**\n * Does this Game Object have a tint applied to it or not?\n *\n * @name Phaser.GameObjects.Components.Tint#isTinted\n * @type {boolean}\n * @webglOnly\n * @readonly\n * @since 3.11.0\n */\n isTinted: {\n\n get: function ()\n {\n return this._isTinted;\n }\n\n }\n\n};\n\nmodule.exports = Tint;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Build a JSON representation of the given Game Object.\n *\n * This is typically extended further by Game Object specific implementations.\n *\n * @method Phaser.GameObjects.Components.ToJSON\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to export as JSON.\n *\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\n */\nvar ToJSON = function (gameObject)\n{\n var out = {\n name: gameObject.name,\n type: gameObject.type,\n x: gameObject.x,\n y: gameObject.y,\n depth: gameObject.depth,\n scale: {\n x: gameObject.scaleX,\n y: gameObject.scaleY\n },\n origin: {\n x: gameObject.originX,\n y: gameObject.originY\n },\n flipX: gameObject.flipX,\n flipY: gameObject.flipY,\n rotation: gameObject.rotation,\n alpha: gameObject.alpha,\n visible: gameObject.visible,\n blendMode: gameObject.blendMode,\n textureKey: '',\n frameKey: '',\n data: {}\n };\n\n if (gameObject.texture)\n {\n out.textureKey = gameObject.texture.key;\n out.frameKey = gameObject.frame.name;\n }\n\n return out;\n};\n\nmodule.exports = ToJSON;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar MATH_CONST = require('../../math/const');\nvar TransformMatrix = require('./TransformMatrix');\nvar TransformXY = require('../../math/TransformXY');\nvar WrapAngle = require('../../math/angle/Wrap');\nvar WrapAngleDegrees = require('../../math/angle/WrapDegrees');\nvar Vector2 = require('../../math/Vector2');\n\n// global bitmask flag for GameObject.renderMask (used by Scale)\nvar _FLAG = 4; // 0100\n\n/**\n * Provides methods used for getting and setting the position, scale and rotation of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.Transform\n * @since 3.0.0\n */\n\nvar Transform = {\n\n /**\n * Private internal value. Holds the horizontal scale value.\n *\n * @name Phaser.GameObjects.Components.Transform#_scaleX\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _scaleX: 1,\n\n /**\n * Private internal value. Holds the vertical scale value.\n *\n * @name Phaser.GameObjects.Components.Transform#_scaleY\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _scaleY: 1,\n\n /**\n * Private internal value. Holds the rotation value in radians.\n *\n * @name Phaser.GameObjects.Components.Transform#_rotation\n * @type {number}\n * @private\n * @default 0\n * @since 3.0.0\n */\n _rotation: 0,\n\n /**\n * The x position of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n x: 0,\n\n /**\n * The y position of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n y: 0,\n\n /**\n * The z position of this Game Object.\n *\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\n * {@link Phaser.GameObjects.Components.Depth#depth} instead.\n *\n * @name Phaser.GameObjects.Components.Transform#z\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n z: 0,\n\n /**\n * The w position of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#w\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n w: 0,\n\n /**\n * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object\n * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.\n *\n * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this\n * isn't the case, use the `scaleX` or `scaleY` properties instead.\n *\n * @name Phaser.GameObjects.Components.Transform#scale\n * @type {number}\n * @default 1\n * @since 3.18.0\n */\n scale: {\n\n get: function ()\n {\n return (this._scaleX + this._scaleY) / 2;\n },\n\n set: function (value)\n {\n this._scaleX = value;\n this._scaleY = value;\n\n if (value === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The horizontal scale of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#scaleX\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n scaleX: {\n\n get: function ()\n {\n return this._scaleX;\n },\n\n set: function (value)\n {\n this._scaleX = value;\n\n if (value === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The vertical scale of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#scaleY\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n scaleY: {\n\n get: function ()\n {\n return this._scaleY;\n },\n\n set: function (value)\n {\n this._scaleY = value;\n\n if (value === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The angle of this Game Object as expressed in degrees.\n *\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left\n * and -90 is up.\n *\n * If you prefer to work in radians, see the `rotation` property instead.\n *\n * @name Phaser.GameObjects.Components.Transform#angle\n * @type {integer}\n * @default 0\n * @since 3.0.0\n */\n angle: {\n\n get: function ()\n {\n return WrapAngleDegrees(this._rotation * MATH_CONST.RAD_TO_DEG);\n },\n\n set: function (value)\n {\n // value is in degrees\n this.rotation = WrapAngleDegrees(value) * MATH_CONST.DEG_TO_RAD;\n }\n },\n\n /**\n * The angle of this Game Object in radians.\n *\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left\n * and -PI/2 is up.\n *\n * If you prefer to work in degrees, see the `angle` property instead.\n *\n * @name Phaser.GameObjects.Components.Transform#rotation\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n rotation: {\n\n get: function ()\n {\n return this._rotation;\n },\n\n set: function (value)\n {\n // value is in radians\n this._rotation = WrapAngle(value);\n }\n },\n\n /**\n * Sets the position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setPosition\n * @since 3.0.0\n *\n * @param {number} [x=0] - The x position of this Game Object.\n * @param {number} [y=x] - The y position of this Game Object. If not set it will use the `x` value.\n * @param {number} [z=0] - The z position of this Game Object.\n * @param {number} [w=0] - The w position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setPosition: function (x, y, z, w)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = x; }\n if (z === undefined) { z = 0; }\n if (w === undefined) { w = 0; }\n\n this.x = x;\n this.y = y;\n this.z = z;\n this.w = w;\n\n return this;\n },\n\n /**\n * Sets the position of this Game Object to be a random position within the confines of\n * the given area.\n *\n * If no area is specified a random position between 0 x 0 and the game width x height is used instead.\n *\n * The position does not factor in the size of this Game Object, meaning that only the origin is\n * guaranteed to be within the area.\n *\n * @method Phaser.GameObjects.Components.Transform#setRandomPosition\n * @since 3.8.0\n *\n * @param {number} [x=0] - The x position of the top-left of the random area.\n * @param {number} [y=0] - The y position of the top-left of the random area.\n * @param {number} [width] - The width of the random area.\n * @param {number} [height] - The height of the random area.\n *\n * @return {this} This Game Object instance.\n */\n setRandomPosition: function (x, y, width, height)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n if (width === undefined) { width = this.scene.sys.scale.width; }\n if (height === undefined) { height = this.scene.sys.scale.height; }\n\n this.x = x + (Math.random() * width);\n this.y = y + (Math.random() * height);\n\n return this;\n },\n\n /**\n * Sets the rotation of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setRotation\n * @since 3.0.0\n *\n * @param {number} [radians=0] - The rotation of this Game Object, in radians.\n *\n * @return {this} This Game Object instance.\n */\n setRotation: function (radians)\n {\n if (radians === undefined) { radians = 0; }\n\n this.rotation = radians;\n\n return this;\n },\n\n /**\n * Sets the angle of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setAngle\n * @since 3.0.0\n *\n * @param {number} [degrees=0] - The rotation of this Game Object, in degrees.\n *\n * @return {this} This Game Object instance.\n */\n setAngle: function (degrees)\n {\n if (degrees === undefined) { degrees = 0; }\n\n this.angle = degrees;\n\n return this;\n },\n\n /**\n * Sets the scale of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setScale\n * @since 3.0.0\n *\n * @param {number} x - The horizontal scale of this Game Object.\n * @param {number} [y=x] - The vertical scale of this Game Object. If not set it will use the `x` value.\n *\n * @return {this} This Game Object instance.\n */\n setScale: function (x, y)\n {\n if (x === undefined) { x = 1; }\n if (y === undefined) { y = x; }\n\n this.scaleX = x;\n this.scaleY = y;\n\n return this;\n },\n\n /**\n * Sets the x position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setX\n * @since 3.0.0\n *\n * @param {number} [value=0] - The x position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setX: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.x = value;\n\n return this;\n },\n\n /**\n * Sets the y position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setY\n * @since 3.0.0\n *\n * @param {number} [value=0] - The y position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setY: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.y = value;\n\n return this;\n },\n\n /**\n * Sets the z position of this Game Object.\n *\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\n * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.\n *\n * @method Phaser.GameObjects.Components.Transform#setZ\n * @since 3.0.0\n *\n * @param {number} [value=0] - The z position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setZ: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.z = value;\n\n return this;\n },\n\n /**\n * Sets the w position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setW\n * @since 3.0.0\n *\n * @param {number} [value=0] - The w position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setW: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.w = value;\n\n return this;\n },\n\n /**\n * Gets the local transform matrix for this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#getLocalTransformMatrix\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\n *\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\n */\n getLocalTransformMatrix: function (tempMatrix)\n {\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\n\n return tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\n },\n\n /**\n * Gets the world transform matrix for this Game Object, factoring in any parent Containers.\n *\n * @method Phaser.GameObjects.Components.Transform#getWorldTransformMatrix\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A temporary matrix to hold parent values during the calculations.\n *\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\n */\n getWorldTransformMatrix: function (tempMatrix, parentMatrix)\n {\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\n if (parentMatrix === undefined) { parentMatrix = new TransformMatrix(); }\n\n var parent = this.parentContainer;\n\n if (!parent)\n {\n return this.getLocalTransformMatrix(tempMatrix);\n }\n\n tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\n\n while (parent)\n {\n parentMatrix.applyITRS(parent.x, parent.y, parent._rotation, parent._scaleX, parent._scaleY);\n\n parentMatrix.multiply(tempMatrix, tempMatrix);\n\n parent = parent.parentContainer;\n }\n\n return tempMatrix;\n },\n\n /**\n * Takes the given `x` and `y` coordinates and converts them into local space for this\n * Game Object, taking into account parent and local transforms, and the Display Origin.\n *\n * The returned Vector2 contains the translated point in its properties.\n *\n * A Camera needs to be provided in order to handle modified scroll factors. If no\n * camera is specified, it will use the `main` camera from the Scene to which this\n * Game Object belongs.\n *\n * @method Phaser.GameObjects.Components.Transform#getLocalPoint\n * @since 3.50.0\n *\n * @param {number} x - The x position to translate.\n * @param {number} y - The y position to translate.\n * @param {Phaser.Math.Vector2} [point] - A Vector2, or point-like object, to store the results in.\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera which is being tested against. If not given will use the Scene default camera.\n *\n * @return {Phaser.Math.Vector2} The translated point.\n */\n getLocalPoint: function (x, y, point, camera)\n {\n if (!point) { point = new Vector2(); }\n if (!camera) { camera = this.scene.sys.cameras.main; }\n\n var csx = camera.scrollX;\n var csy = camera.scrollY;\n\n var px = x + (csx * this.scrollFactorX) - csx;\n var py = y + (csy * this.scrollFactorY) - csy;\n\n if (this.parentContainer)\n {\n this.getWorldTransformMatrix().applyInverse(px, py, point);\n }\n else\n {\n TransformXY(px, py, this.x, this.y, this.rotation, this.scaleX, this.scaleY, point);\n }\n\n // Normalize origin\n if (this._originComponent)\n {\n point.x += this._displayOriginX;\n point.y += this._displayOriginY;\n }\n\n return point;\n },\n\n /**\n * Gets the sum total rotation of all of this Game Objects parent Containers.\n *\n * The returned value is in radians and will be zero if this Game Object has no parent container.\n *\n * @method Phaser.GameObjects.Components.Transform#getParentRotation\n * @since 3.18.0\n *\n * @return {number} The sum total rotation, in radians, of all parent containers of this Game Object.\n */\n getParentRotation: function ()\n {\n var rotation = 0;\n\n var parent = this.parentContainer;\n\n while (parent)\n {\n rotation += parent.rotation;\n\n parent = parent.parentContainer;\n }\n\n return rotation;\n }\n\n};\n\nmodule.exports = Transform;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar MATH_CONST = require('../../math/const');\nvar Vector2 = require('../../math/Vector2');\n\n/**\n * @classdesc\n * A Matrix used for display transformations for rendering.\n *\n * It is represented like so:\n *\n * ```\n * | a | c | tx |\n * | b | d | ty |\n * | 0 | 0 | 1 |\n * ```\n *\n * @class TransformMatrix\n * @memberof Phaser.GameObjects.Components\n * @constructor\n * @since 3.0.0\n *\n * @param {number} [a=1] - The Scale X value.\n * @param {number} [b=0] - The Skew Y value.\n * @param {number} [c=0] - The Skew X value.\n * @param {number} [d=1] - The Scale Y value.\n * @param {number} [tx=0] - The Translate X value.\n * @param {number} [ty=0] - The Translate Y value.\n */\nvar TransformMatrix = new Class({\n\n initialize:\n\n function TransformMatrix (a, b, c, d, tx, ty)\n {\n if (a === undefined) { a = 1; }\n if (b === undefined) { b = 0; }\n if (c === undefined) { c = 0; }\n if (d === undefined) { d = 1; }\n if (tx === undefined) { tx = 0; }\n if (ty === undefined) { ty = 0; }\n\n /**\n * The matrix values.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#matrix\n * @type {Float32Array}\n * @since 3.0.0\n */\n this.matrix = new Float32Array([ a, b, c, d, tx, ty, 0, 0, 1 ]);\n\n /**\n * The decomposed matrix.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#decomposedMatrix\n * @type {object}\n * @since 3.0.0\n */\n this.decomposedMatrix = {\n translateX: 0,\n translateY: 0,\n scaleX: 1,\n scaleY: 1,\n rotation: 0\n };\n },\n\n /**\n * The Scale X value.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#a\n * @type {number}\n * @since 3.4.0\n */\n a: {\n\n get: function ()\n {\n return this.matrix[0];\n },\n\n set: function (value)\n {\n this.matrix[0] = value;\n }\n\n },\n\n /**\n * The Skew Y value.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#b\n * @type {number}\n * @since 3.4.0\n */\n b: {\n\n get: function ()\n {\n return this.matrix[1];\n },\n\n set: function (value)\n {\n this.matrix[1] = value;\n }\n\n },\n\n /**\n * The Skew X value.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#c\n * @type {number}\n * @since 3.4.0\n */\n c: {\n\n get: function ()\n {\n return this.matrix[2];\n },\n\n set: function (value)\n {\n this.matrix[2] = value;\n }\n\n },\n\n /**\n * The Scale Y value.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#d\n * @type {number}\n * @since 3.4.0\n */\n d: {\n\n get: function ()\n {\n return this.matrix[3];\n },\n\n set: function (value)\n {\n this.matrix[3] = value;\n }\n\n },\n\n /**\n * The Translate X value.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#e\n * @type {number}\n * @since 3.11.0\n */\n e: {\n\n get: function ()\n {\n return this.matrix[4];\n },\n\n set: function (value)\n {\n this.matrix[4] = value;\n }\n\n },\n\n /**\n * The Translate Y value.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#f\n * @type {number}\n * @since 3.11.0\n */\n f: {\n\n get: function ()\n {\n return this.matrix[5];\n },\n\n set: function (value)\n {\n this.matrix[5] = value;\n }\n\n },\n\n /**\n * The Translate X value.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#tx\n * @type {number}\n * @since 3.4.0\n */\n tx: {\n\n get: function ()\n {\n return this.matrix[4];\n },\n\n set: function (value)\n {\n this.matrix[4] = value;\n }\n\n },\n\n /**\n * The Translate Y value.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#ty\n * @type {number}\n * @since 3.4.0\n */\n ty: {\n\n get: function ()\n {\n return this.matrix[5];\n },\n\n set: function (value)\n {\n this.matrix[5] = value;\n }\n\n },\n\n /**\n * The rotation of the Matrix. Value is in radians.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#rotation\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n rotation: {\n\n get: function ()\n {\n return Math.acos(this.a / this.scaleX) * ((Math.atan(-this.c / this.a) < 0) ? -1 : 1);\n }\n\n },\n\n /**\n * The rotation of the Matrix, normalized to be within the Phaser right-handed\n * clockwise rotation space. Value is in radians.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#rotationNormalized\n * @type {number}\n * @readonly\n * @since 3.19.0\n */\n rotationNormalized: {\n\n get: function ()\n {\n var matrix = this.matrix;\n\n var a = matrix[0];\n var b = matrix[1];\n var c = matrix[2];\n var d = matrix[3];\n\n if (a || b)\n {\n // var r = Math.sqrt(a * a + b * b);\n \n return (b > 0) ? Math.acos(a / this.scaleX) : -Math.acos(a / this.scaleX);\n }\n else if (c || d)\n {\n // var s = Math.sqrt(c * c + d * d);\n \n return MATH_CONST.TAU - ((d > 0) ? Math.acos(-c / this.scaleY) : -Math.acos(c / this.scaleY));\n }\n else\n {\n return 0;\n }\n }\n\n },\n\n /**\n * The decomposed horizontal scale of the Matrix. This value is always positive.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleX\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n scaleX: {\n\n get: function ()\n {\n return Math.sqrt((this.a * this.a) + (this.b * this.b));\n }\n\n },\n\n /**\n * The decomposed vertical scale of the Matrix. This value is always positive.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleY\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n scaleY: {\n\n get: function ()\n {\n return Math.sqrt((this.c * this.c) + (this.d * this.d));\n }\n\n },\n\n /**\n * Reset the Matrix to an identity matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#loadIdentity\n * @since 3.0.0\n *\n * @return {this} This TransformMatrix.\n */\n loadIdentity: function ()\n {\n var matrix = this.matrix;\n\n matrix[0] = 1;\n matrix[1] = 0;\n matrix[2] = 0;\n matrix[3] = 1;\n matrix[4] = 0;\n matrix[5] = 0;\n\n return this;\n },\n\n /**\n * Translate the Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#translate\n * @since 3.0.0\n *\n * @param {number} x - The horizontal translation value.\n * @param {number} y - The vertical translation value.\n *\n * @return {this} This TransformMatrix.\n */\n translate: function (x, y)\n {\n var matrix = this.matrix;\n\n matrix[4] = matrix[0] * x + matrix[2] * y + matrix[4];\n matrix[5] = matrix[1] * x + matrix[3] * y + matrix[5];\n\n return this;\n },\n\n /**\n * Scale the Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#scale\n * @since 3.0.0\n *\n * @param {number} x - The horizontal scale value.\n * @param {number} y - The vertical scale value.\n *\n * @return {this} This TransformMatrix.\n */\n scale: function (x, y)\n {\n var matrix = this.matrix;\n\n matrix[0] *= x;\n matrix[1] *= x;\n matrix[2] *= y;\n matrix[3] *= y;\n\n return this;\n },\n\n /**\n * Rotate the Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#rotate\n * @since 3.0.0\n *\n * @param {number} angle - The angle of rotation in radians.\n *\n * @return {this} This TransformMatrix.\n */\n rotate: function (angle)\n {\n var sin = Math.sin(angle);\n var cos = Math.cos(angle);\n\n var matrix = this.matrix;\n\n var a = matrix[0];\n var b = matrix[1];\n var c = matrix[2];\n var d = matrix[3];\n\n matrix[0] = a * cos + c * sin;\n matrix[1] = b * cos + d * sin;\n matrix[2] = a * -sin + c * cos;\n matrix[3] = b * -sin + d * cos;\n\n return this;\n },\n\n /**\n * Multiply this Matrix by the given Matrix.\n * \n * If an `out` Matrix is given then the results will be stored in it.\n * If it is not given, this matrix will be updated in place instead.\n * Use an `out` Matrix if you do not wish to mutate this matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#multiply\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by.\n * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in.\n *\n * @return {(this|Phaser.GameObjects.Components.TransformMatrix)} Either this TransformMatrix, or the `out` Matrix, if given in the arguments.\n */\n multiply: function (rhs, out)\n {\n var matrix = this.matrix;\n var source = rhs.matrix;\n\n var localA = matrix[0];\n var localB = matrix[1];\n var localC = matrix[2];\n var localD = matrix[3];\n var localE = matrix[4];\n var localF = matrix[5];\n\n var sourceA = source[0];\n var sourceB = source[1];\n var sourceC = source[2];\n var sourceD = source[3];\n var sourceE = source[4];\n var sourceF = source[5];\n\n var destinationMatrix = (out === undefined) ? this : out;\n\n destinationMatrix.a = (sourceA * localA) + (sourceB * localC);\n destinationMatrix.b = (sourceA * localB) + (sourceB * localD);\n destinationMatrix.c = (sourceC * localA) + (sourceD * localC);\n destinationMatrix.d = (sourceC * localB) + (sourceD * localD);\n destinationMatrix.e = (sourceE * localA) + (sourceF * localC) + localE;\n destinationMatrix.f = (sourceE * localB) + (sourceF * localD) + localF;\n\n return destinationMatrix;\n },\n\n /**\n * Multiply this Matrix by the matrix given, including the offset.\n * \n * The offsetX is added to the tx value: `offsetX * a + offsetY * c + tx`.\n * The offsetY is added to the ty value: `offsetY * b + offsetY * d + ty`.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#multiplyWithOffset\n * @since 3.11.0\n *\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\n * @param {number} offsetX - Horizontal offset to factor in to the multiplication.\n * @param {number} offsetY - Vertical offset to factor in to the multiplication.\n *\n * @return {this} This TransformMatrix.\n */\n multiplyWithOffset: function (src, offsetX, offsetY)\n {\n var matrix = this.matrix;\n var otherMatrix = src.matrix;\n\n var a0 = matrix[0];\n var b0 = matrix[1];\n var c0 = matrix[2];\n var d0 = matrix[3];\n var tx0 = matrix[4];\n var ty0 = matrix[5];\n\n var pse = offsetX * a0 + offsetY * c0 + tx0;\n var psf = offsetX * b0 + offsetY * d0 + ty0;\n\n var a1 = otherMatrix[0];\n var b1 = otherMatrix[1];\n var c1 = otherMatrix[2];\n var d1 = otherMatrix[3];\n var tx1 = otherMatrix[4];\n var ty1 = otherMatrix[5];\n\n matrix[0] = a1 * a0 + b1 * c0;\n matrix[1] = a1 * b0 + b1 * d0;\n matrix[2] = c1 * a0 + d1 * c0;\n matrix[3] = c1 * b0 + d1 * d0;\n matrix[4] = tx1 * a0 + ty1 * c0 + pse;\n matrix[5] = tx1 * b0 + ty1 * d0 + psf;\n\n return this;\n },\n\n /**\n * Transform the Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#transform\n * @since 3.0.0\n *\n * @param {number} a - The Scale X value.\n * @param {number} b - The Shear Y value.\n * @param {number} c - The Shear X value.\n * @param {number} d - The Scale Y value.\n * @param {number} tx - The Translate X value.\n * @param {number} ty - The Translate Y value.\n *\n * @return {this} This TransformMatrix.\n */\n transform: function (a, b, c, d, tx, ty)\n {\n var matrix = this.matrix;\n\n var a0 = matrix[0];\n var b0 = matrix[1];\n var c0 = matrix[2];\n var d0 = matrix[3];\n var tx0 = matrix[4];\n var ty0 = matrix[5];\n\n matrix[0] = a * a0 + b * c0;\n matrix[1] = a * b0 + b * d0;\n matrix[2] = c * a0 + d * c0;\n matrix[3] = c * b0 + d * d0;\n matrix[4] = tx * a0 + ty * c0 + tx0;\n matrix[5] = tx * b0 + ty * d0 + ty0;\n\n return this;\n },\n\n /**\n * Transform a point using this Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#transformPoint\n * @since 3.0.0\n *\n * @param {number} x - The x coordinate of the point to transform.\n * @param {number} y - The y coordinate of the point to transform.\n * @param {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} point - The Point object to store the transformed coordinates.\n *\n * @return {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} The Point containing the transformed coordinates.\n */\n transformPoint: function (x, y, point)\n {\n if (point === undefined) { point = { x: 0, y: 0 }; }\n\n var matrix = this.matrix;\n\n var a = matrix[0];\n var b = matrix[1];\n var c = matrix[2];\n var d = matrix[3];\n var tx = matrix[4];\n var ty = matrix[5];\n\n point.x = x * a + y * c + tx;\n point.y = x * b + y * d + ty;\n\n return point;\n },\n\n /**\n * Invert the Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#invert\n * @since 3.0.0\n *\n * @return {this} This TransformMatrix.\n */\n invert: function ()\n {\n var matrix = this.matrix;\n\n var a = matrix[0];\n var b = matrix[1];\n var c = matrix[2];\n var d = matrix[3];\n var tx = matrix[4];\n var ty = matrix[5];\n\n var n = a * d - b * c;\n\n matrix[0] = d / n;\n matrix[1] = -b / n;\n matrix[2] = -c / n;\n matrix[3] = a / n;\n matrix[4] = (c * ty - d * tx) / n;\n matrix[5] = -(a * ty - b * tx) / n;\n\n return this;\n },\n\n /**\n * Set the values of this Matrix to copy those of the matrix given.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFrom\n * @since 3.11.0\n *\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\n *\n * @return {this} This TransformMatrix.\n */\n copyFrom: function (src)\n {\n var matrix = this.matrix;\n\n matrix[0] = src.a;\n matrix[1] = src.b;\n matrix[2] = src.c;\n matrix[3] = src.d;\n matrix[4] = src.e;\n matrix[5] = src.f;\n\n return this;\n },\n\n /**\n * Set the values of this Matrix to copy those of the array given.\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFromArray\n * @since 3.11.0\n *\n * @param {array} src - The array of values to set into this matrix.\n *\n * @return {this} This TransformMatrix.\n */\n copyFromArray: function (src)\n {\n var matrix = this.matrix;\n\n matrix[0] = src[0];\n matrix[1] = src[1];\n matrix[2] = src[2];\n matrix[3] = src[3];\n matrix[4] = src[4];\n matrix[5] = src[5];\n\n return this;\n },\n\n /**\n * Copy the values from this Matrix to the given Canvas Rendering Context.\n * This will use the Context.transform method.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToContext\n * @since 3.12.0\n *\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\n *\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\n */\n copyToContext: function (ctx)\n {\n var matrix = this.matrix;\n\n ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\n\n return ctx;\n },\n\n /**\n * Copy the values from this Matrix to the given Canvas Rendering Context.\n * This will use the Context.setTransform method.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#setToContext\n * @since 3.12.0\n *\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\n *\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\n */\n setToContext: function (ctx)\n {\n var matrix = this.matrix;\n\n ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\n\n return ctx;\n },\n\n /**\n * Copy the values in this Matrix to the array given.\n * \n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToArray\n * @since 3.12.0\n *\n * @param {array} [out] - The array to copy the matrix values in to.\n *\n * @return {array} An array where elements 0 to 5 contain the values from this matrix.\n */\n copyToArray: function (out)\n {\n var matrix = this.matrix;\n\n if (out === undefined)\n {\n out = [ matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5] ];\n }\n else\n {\n out[0] = matrix[0];\n out[1] = matrix[1];\n out[2] = matrix[2];\n out[3] = matrix[3];\n out[4] = matrix[4];\n out[5] = matrix[5];\n }\n\n return out;\n },\n\n /**\n * Set the values of this Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#setTransform\n * @since 3.0.0\n *\n * @param {number} a - The Scale X value.\n * @param {number} b - The Shear Y value.\n * @param {number} c - The Shear X value.\n * @param {number} d - The Scale Y value.\n * @param {number} tx - The Translate X value.\n * @param {number} ty - The Translate Y value.\n *\n * @return {this} This TransformMatrix.\n */\n setTransform: function (a, b, c, d, tx, ty)\n {\n var matrix = this.matrix;\n\n matrix[0] = a;\n matrix[1] = b;\n matrix[2] = c;\n matrix[3] = d;\n matrix[4] = tx;\n matrix[5] = ty;\n\n return this;\n },\n\n /**\n * Decompose this Matrix into its translation, scale and rotation values using QR decomposition.\n * \n * The result must be applied in the following order to reproduce the current matrix:\n * \n * translate -> rotate -> scale\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#decomposeMatrix\n * @since 3.0.0\n *\n * @return {object} The decomposed Matrix.\n */\n decomposeMatrix: function ()\n {\n var decomposedMatrix = this.decomposedMatrix;\n\n var matrix = this.matrix;\n\n // a = scale X (1)\n // b = shear Y (0)\n // c = shear X (0)\n // d = scale Y (1)\n\n var a = matrix[0];\n var b = matrix[1];\n var c = matrix[2];\n var d = matrix[3];\n\n var determ = a * d - b * c;\n\n decomposedMatrix.translateX = matrix[4];\n decomposedMatrix.translateY = matrix[5];\n\n if (a || b)\n {\n var r = Math.sqrt(a * a + b * b);\n\n decomposedMatrix.rotation = (b > 0) ? Math.acos(a / r) : -Math.acos(a / r);\n decomposedMatrix.scaleX = r;\n decomposedMatrix.scaleY = determ / r;\n }\n else if (c || d)\n {\n var s = Math.sqrt(c * c + d * d);\n\n decomposedMatrix.rotation = Math.PI * 0.5 - (d > 0 ? Math.acos(-c / s) : -Math.acos(c / s));\n decomposedMatrix.scaleX = determ / s;\n decomposedMatrix.scaleY = s;\n }\n else\n {\n decomposedMatrix.rotation = 0;\n decomposedMatrix.scaleX = 0;\n decomposedMatrix.scaleY = 0;\n }\n\n return decomposedMatrix;\n },\n\n /**\n * Apply the identity, translate, rotate and scale operations on the Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#applyITRS\n * @since 3.0.0\n *\n * @param {number} x - The horizontal translation.\n * @param {number} y - The vertical translation.\n * @param {number} rotation - The angle of rotation in radians.\n * @param {number} scaleX - The horizontal scale.\n * @param {number} scaleY - The vertical scale.\n *\n * @return {this} This TransformMatrix.\n */\n applyITRS: function (x, y, rotation, scaleX, scaleY)\n {\n var matrix = this.matrix;\n\n var radianSin = Math.sin(rotation);\n var radianCos = Math.cos(rotation);\n\n // Translate\n matrix[4] = x;\n matrix[5] = y;\n\n // Rotate and Scale\n matrix[0] = radianCos * scaleX;\n matrix[1] = radianSin * scaleX;\n matrix[2] = -radianSin * scaleY;\n matrix[3] = radianCos * scaleY;\n\n return this;\n },\n\n /**\n * Takes the `x` and `y` values and returns a new position in the `output` vector that is the inverse of\n * the current matrix with its transformation applied.\n * \n * Can be used to translate points from world to local space.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#applyInverse\n * @since 3.12.0\n *\n * @param {number} x - The x position to translate.\n * @param {number} y - The y position to translate.\n * @param {Phaser.Math.Vector2} [output] - A Vector2, or point-like object, to store the results in.\n *\n * @return {Phaser.Math.Vector2} The coordinates, inverse-transformed through this matrix.\n */\n applyInverse: function (x, y, output)\n {\n if (output === undefined) { output = new Vector2(); }\n\n var matrix = this.matrix;\n\n var a = matrix[0];\n var b = matrix[1];\n var c = matrix[2];\n var d = matrix[3];\n var tx = matrix[4];\n var ty = matrix[5];\n\n var id = 1 / ((a * d) + (c * -b));\n\n output.x = (d * id * x) + (-c * id * y) + (((ty * c) - (tx * d)) * id);\n output.y = (a * id * y) + (-b * id * x) + (((-ty * a) + (tx * b)) * id);\n\n return output;\n },\n\n /**\n * Returns the X component of this matrix multiplied by the given values.\n * This is the same as `x * a + y * c + e`.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#getX\n * @since 3.12.0\n * \n * @param {number} x - The x value.\n * @param {number} y - The y value.\n *\n * @return {number} The calculated x value.\n */\n getX: function (x, y)\n {\n return x * this.a + y * this.c + this.e;\n },\n\n /**\n * Returns the Y component of this matrix multiplied by the given values.\n * This is the same as `x * b + y * d + f`.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#getY\n * @since 3.12.0\n * \n * @param {number} x - The x value.\n * @param {number} y - The y value.\n *\n * @return {number} The calculated y value.\n */\n getY: function (x, y)\n {\n return x * this.b + y * this.d + this.f;\n },\n\n /**\n * Returns the X component of this matrix multiplied by the given values.\n * \n * This is the same as `x * a + y * c + e`, optionally passing via `Math.round`.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#getXRound\n * @since 3.50.0\n * \n * @param {number} x - The x value.\n * @param {number} y - The y value.\n * @param {boolean} [round=false] - Math.round the resulting value?\n *\n * @return {number} The calculated x value.\n */\n getXRound: function (x, y, round)\n {\n var v = this.getX(x, y);\n\n if (round)\n {\n v = Math.round(v);\n }\n\n return v;\n },\n\n /**\n * Returns the Y component of this matrix multiplied by the given values.\n * \n * This is the same as `x * b + y * d + f`, optionally passing via `Math.round`.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#getYRound\n * @since 3.50.0\n * \n * @param {number} x - The x value.\n * @param {number} y - The y value.\n * @param {boolean} [round=false] - Math.round the resulting value?\n *\n * @return {number} The calculated y value.\n */\n getYRound: function (x, y, round)\n {\n var v = this.getY(x, y);\n\n if (round)\n {\n v = Math.round(v);\n }\n\n return v;\n },\n\n /**\n * Returns a string that can be used in a CSS Transform call as a `matrix` property.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#getCSSMatrix\n * @since 3.12.0\n *\n * @return {string} A string containing the CSS Transform matrix values.\n */\n getCSSMatrix: function ()\n {\n var m = this.matrix;\n\n return 'matrix(' + m[0] + ',' + m[1] + ',' + m[2] + ',' + m[3] + ',' + m[4] + ',' + m[5] + ')';\n },\n\n /**\n * Destroys this Transform Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#destroy\n * @since 3.4.0\n */\n destroy: function ()\n {\n this.matrix = null;\n this.decomposedMatrix = null;\n }\n\n});\n\nmodule.exports = TransformMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// bitmask flag for GameObject.renderMask\nvar _FLAG = 1; // 0001\n\n/**\n * Provides methods used for setting the visibility of a Game Object.\n * Should be applied as a mixin and not used directly.\n * \n * @namespace Phaser.GameObjects.Components.Visible\n * @since 3.0.0\n */\n\nvar Visible = {\n\n /**\n * Private internal value. Holds the visible value.\n * \n * @name Phaser.GameObjects.Components.Visible#_visible\n * @type {boolean}\n * @private\n * @default true\n * @since 3.0.0\n */\n _visible: true,\n\n /**\n * The visible state of the Game Object.\n * \n * An invisible Game Object will skip rendering, but will still process update logic.\n * \n * @name Phaser.GameObjects.Components.Visible#visible\n * @type {boolean}\n * @since 3.0.0\n */\n visible: {\n\n get: function ()\n {\n return this._visible;\n },\n\n set: function (value)\n {\n if (value)\n {\n this._visible = true;\n this.renderFlags |= _FLAG;\n }\n else\n {\n this._visible = false;\n this.renderFlags &= ~_FLAG;\n }\n }\n\n },\n\n /**\n * Sets the visibility of this Game Object.\n * \n * An invisible Game Object will skip rendering, but will still process update logic.\n *\n * @method Phaser.GameObjects.Components.Visible#setVisible\n * @since 3.0.0\n *\n * @param {boolean} value - The visible state of the Game Object.\n * \n * @return {this} This Game Object instance.\n */\n setVisible: function (value)\n {\n this.visible = value;\n\n return this;\n }\n};\n\nmodule.exports = Visible;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.GameObjects.Components\n */\n\nmodule.exports = {\n\n Alpha: require('./Alpha'),\n AlphaSingle: require('./AlphaSingle'),\n Animation: require('./Animation'),\n BlendMode: require('./BlendMode'),\n ComputedSize: require('./ComputedSize'),\n Crop: require('./Crop'),\n Depth: require('./Depth'),\n Flip: require('./Flip'),\n GetBounds: require('./GetBounds'),\n Mask: require('./Mask'),\n Origin: require('./Origin'),\n PathFollower: require('./PathFollower'),\n Pipeline: require('./Pipeline'),\n ScrollFactor: require('./ScrollFactor'),\n Size: require('./Size'),\n Texture: require('./Texture'),\n TextureCrop: require('./TextureCrop'),\n Tint: require('./Tint'),\n ToJSON: require('./ToJSON'),\n Transform: require('./Transform'),\n TransformMatrix: require('./TransformMatrix'),\n Visible: require('./Visible')\n\n};\n","/**\n * @author Richard Davey \n * @author Felipe Alfonso <@bitnenfer>\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar ArrayUtils = require('../../utils/array');\nvar BlendModes = require('../../renderer/BlendModes');\nvar Class = require('../../utils/Class');\nvar Components = require('../components');\nvar Events = require('../events');\nvar GameObject = require('../GameObject');\nvar GameObjectEvents = require('../events');\nvar Rectangle = require('../../geom/rectangle/Rectangle');\nvar Render = require('./ContainerRender');\nvar Union = require('../../geom/rectangle/Union');\nvar Vector2 = require('../../math/Vector2');\n\n/**\n * @classdesc\n * A Container Game Object.\n *\n * A Container, as the name implies, can 'contain' other types of Game Object.\n * When a Game Object is added to a Container, the Container becomes responsible for the rendering of it.\n * By default it will be removed from the Display List and instead added to the Containers own internal list.\n *\n * The position of the Game Object automatically becomes relative to the position of the Container.\n *\n * The origin of a Container is 0x0 (in local space) and that cannot be changed. The children you add to the\n * Container should be positioned with this value in mind. I.e. you should treat 0x0 as being the center of\n * the Container, and position children positively and negative around it as required.\n *\n * When the Container is rendered, all of its children are rendered as well, in the order in which they exist\n * within the Container. Container children can be repositioned using methods such as `MoveUp`, `MoveDown` and `SendToBack`.\n *\n * If you modify a transform property of the Container, such as `Container.x` or `Container.rotation` then it will\n * automatically influence all children as well.\n *\n * Containers can include other Containers for deeply nested transforms.\n *\n * Containers can have masks set on them and can be used as a mask too. However, Container children cannot be masked.\n * The masks do not 'stack up'. Only a Container on the root of the display list will use its mask.\n *\n * Containers can be enabled for input. Because they do not have a texture you need to provide a shape for them\n * to use as their hit area. Container children can also be enabled for input, independent of the Container.\n *\n * Containers can be given a physics body for either Arcade Physics, Impact Physics or Matter Physics. However,\n * if Container _children_ are enabled for physics you may get unexpected results, such as offset bodies,\n * if the Container itself, or any of its ancestors, is positioned anywhere other than at 0 x 0. Container children\n * with physics do not factor in the Container due to the excessive extra calculations needed. Please structure\n * your game to work around this.\n *\n * It's important to understand the impact of using Containers. They add additional processing overhead into\n * every one of their children. The deeper you nest them, the more the cost escalates. This is especially true\n * for input events. You also loose the ability to set the display depth of Container children in the same\n * flexible manner as those not within them. In short, don't use them for the sake of it. You pay a small cost\n * every time you create one, try to structure your game around avoiding that where possible.\n *\n * @class Container\n * @extends Phaser.GameObjects.GameObject\n * @memberof Phaser.GameObjects\n * @constructor\n * @since 3.4.0\n *\n * @extends Phaser.GameObjects.Components.AlphaSingle\n * @extends Phaser.GameObjects.Components.BlendMode\n * @extends Phaser.GameObjects.Components.ComputedSize\n * @extends Phaser.GameObjects.Components.Depth\n * @extends Phaser.GameObjects.Components.Mask\n * @extends Phaser.GameObjects.Components.Transform\n * @extends Phaser.GameObjects.Components.Visible\n *\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\n * @param {Phaser.GameObjects.GameObject[]} [children] - An optional array of Game Objects to add to this Container.\n */\nvar Container = new Class({\n\n Extends: GameObject,\n\n Mixins: [\n Components.AlphaSingle,\n Components.BlendMode,\n Components.ComputedSize,\n Components.Depth,\n Components.Mask,\n Components.Transform,\n Components.Visible,\n Render\n ],\n\n initialize:\n\n function Container (scene, x, y, children)\n {\n GameObject.call(this, scene, 'Container');\n\n /**\n * An array holding the children of this Container.\n *\n * @name Phaser.GameObjects.Container#list\n * @type {Phaser.GameObjects.GameObject[]}\n * @since 3.4.0\n */\n this.list = [];\n\n /**\n * Does this Container exclusively manage its children?\n *\n * The default is `true` which means a child added to this Container cannot\n * belong in another Container, which includes the Scene display list.\n *\n * If you disable this then this Container will no longer exclusively manage its children.\n * This allows you to create all kinds of interesting graphical effects, such as replicating\n * Game Objects without reparenting them all over the Scene.\n * However, doing so will prevent children from receiving any kind of input event or have\n * their physics bodies work by default, as they're no longer a single entity on the\n * display list, but are being replicated where-ever this Container is.\n *\n * @name Phaser.GameObjects.Container#exclusive\n * @type {boolean}\n * @default true\n * @since 3.4.0\n */\n this.exclusive = true;\n\n /**\n * Containers can have an optional maximum size. If set to anything above 0 it\n * will constrict the addition of new Game Objects into the Container, capping off\n * the maximum limit the Container can grow in size to.\n *\n * @name Phaser.GameObjects.Container#maxSize\n * @type {integer}\n * @default -1\n * @since 3.4.0\n */\n this.maxSize = -1;\n\n /**\n * The cursor position.\n *\n * @name Phaser.GameObjects.Container#position\n * @type {integer}\n * @since 3.4.0\n */\n this.position = 0;\n\n /**\n * Internal Transform Matrix used for local space conversion.\n *\n * @name Phaser.GameObjects.Container#localTransform\n * @type {Phaser.GameObjects.Components.TransformMatrix}\n * @since 3.4.0\n */\n this.localTransform = new Components.TransformMatrix();\n\n /**\n * Internal temporary Transform Matrix used to avoid object creation.\n *\n * @name Phaser.GameObjects.Container#tempTransformMatrix\n * @type {Phaser.GameObjects.Components.TransformMatrix}\n * @private\n * @since 3.4.0\n */\n this.tempTransformMatrix = new Components.TransformMatrix();\n\n /**\n * A reference to the Scene Display List.\n *\n * @name Phaser.GameObjects.Container#_displayList\n * @type {Phaser.GameObjects.DisplayList}\n * @private\n * @since 3.4.0\n */\n this._displayList = scene.sys.displayList;\n\n /**\n * The property key to sort by.\n *\n * @name Phaser.GameObjects.Container#_sortKey\n * @type {string}\n * @private\n * @since 3.4.0\n */\n this._sortKey = '';\n\n /**\n * A reference to the Scene Systems Event Emitter.\n *\n * @name Phaser.GameObjects.Container#_sysEvents\n * @type {Phaser.Events.EventEmitter}\n * @private\n * @since 3.9.0\n */\n this._sysEvents = scene.sys.events;\n\n /**\n * The horizontal scroll factor of this Container.\n *\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\n *\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\n * It does not change the Containers actual position values.\n *\n * For a Container, setting this value will only update the Container itself, not its children.\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\n *\n * A value of 1 means it will move exactly in sync with a camera.\n * A value of 0 means it will not move at all, even if the camera moves.\n * Other values control the degree to which the camera movement is mapped to this Container.\n *\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\n * calculating physics collisions. Bodies always collide based on their world position, but changing\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\n * them from physics bodies if not accounted for in your code.\n *\n * @name Phaser.GameObjects.Container#scrollFactorX\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n this.scrollFactorX = 1;\n\n /**\n * The vertical scroll factor of this Container.\n *\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\n *\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\n * It does not change the Containers actual position values.\n *\n * For a Container, setting this value will only update the Container itself, not its children.\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\n *\n * A value of 1 means it will move exactly in sync with a camera.\n * A value of 0 means it will not move at all, even if the camera moves.\n * Other values control the degree to which the camera movement is mapped to this Container.\n *\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\n * calculating physics collisions. Bodies always collide based on their world position, but changing\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\n * them from physics bodies if not accounted for in your code.\n *\n * @name Phaser.GameObjects.Container#scrollFactorY\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n this.scrollFactorY = 1;\n\n this.setPosition(x, y);\n\n this.clearAlpha();\n\n this.setBlendMode(BlendModes.SKIP_CHECK);\n\n if (children)\n {\n this.add(children);\n }\n },\n\n /**\n * Internal value to allow Containers to be used for input and physics.\n * Do not change this value. It has no effect other than to break things.\n *\n * @name Phaser.GameObjects.Container#originX\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n originX: {\n\n get: function ()\n {\n return 0.5;\n }\n\n },\n\n /**\n * Internal value to allow Containers to be used for input and physics.\n * Do not change this value. It has no effect other than to break things.\n *\n * @name Phaser.GameObjects.Container#originY\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n originY: {\n\n get: function ()\n {\n return 0.5;\n }\n\n },\n\n /**\n * Internal value to allow Containers to be used for input and physics.\n * Do not change this value. It has no effect other than to break things.\n *\n * @name Phaser.GameObjects.Container#displayOriginX\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n displayOriginX: {\n\n get: function ()\n {\n return this.width * 0.5;\n }\n\n },\n\n /**\n * Internal value to allow Containers to be used for input and physics.\n * Do not change this value. It has no effect other than to break things.\n *\n * @name Phaser.GameObjects.Container#displayOriginY\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n displayOriginY: {\n\n get: function ()\n {\n return this.height * 0.5;\n }\n\n },\n\n /**\n * Does this Container exclusively manage its children?\n *\n * The default is `true` which means a child added to this Container cannot\n * belong in another Container, which includes the Scene display list.\n *\n * If you disable this then this Container will no longer exclusively manage its children.\n * This allows you to create all kinds of interesting graphical effects, such as replicating\n * Game Objects without reparenting them all over the Scene.\n * However, doing so will prevent children from receiving any kind of input event or have\n * their physics bodies work by default, as they're no longer a single entity on the\n * display list, but are being replicated where-ever this Container is.\n *\n * @method Phaser.GameObjects.Container#setExclusive\n * @since 3.4.0\n *\n * @param {boolean} [value=true] - The exclusive state of this Container.\n *\n * @return {this} This Container.\n */\n setExclusive: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.exclusive = value;\n\n return this;\n },\n\n /**\n * Gets the bounds of this Container. It works by iterating all children of the Container,\n * getting their respective bounds, and then working out a min-max rectangle from that.\n * It does not factor in if the children render or not, all are included.\n *\n * Some children are unable to return their bounds, such as Graphics objects, in which case\n * they are skipped.\n *\n * Depending on the quantity of children in this Container it could be a really expensive call,\n * so cache it and only poll it as needed.\n *\n * The values are stored and returned in a Rectangle object.\n *\n * @method Phaser.GameObjects.Container#getBounds\n * @since 3.4.0\n *\n * @param {Phaser.Geom.Rectangle} [output] - A Geom.Rectangle object to store the values in. If not provided a new Rectangle will be created.\n *\n * @return {Phaser.Geom.Rectangle} The values stored in the output object.\n */\n getBounds: function (output)\n {\n if (output === undefined) { output = new Rectangle(); }\n\n output.setTo(this.x, this.y, 0, 0);\n\n if (this.parentContainer)\n {\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\n var transformedPosition = parentMatrix.transformPoint(this.x, this.y);\n\n output.setTo(transformedPosition.x, transformedPosition.y, 0, 0);\n }\n\n if (this.list.length > 0)\n {\n var children = this.list;\n var tempRect = new Rectangle();\n var hasSetFirst = false;\n\n output.setEmpty();\n\n for (var i = 0; i < children.length; i++)\n {\n var entry = children[i];\n\n if (entry.getBounds)\n {\n entry.getBounds(tempRect);\n\n if (!hasSetFirst)\n {\n output.setTo(tempRect.x, tempRect.y, tempRect.width, tempRect.height);\n hasSetFirst = true;\n }\n else\n {\n Union(tempRect, output, output);\n }\n }\n }\n }\n\n return output;\n },\n\n /**\n * Internal add handler.\n *\n * @method Phaser.GameObjects.Container#addHandler\n * @private\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just added to this Container.\n */\n addHandler: function (gameObject)\n {\n gameObject.once(Events.DESTROY, this.remove, this);\n\n if (this.exclusive)\n {\n this._displayList.remove(gameObject);\n\n if (gameObject.parentContainer)\n {\n gameObject.parentContainer.remove(gameObject);\n }\n\n gameObject.parentContainer = this;\n }\n\n // Is only on the Display List via this Container\n if (!this.scene.sys.displayList.exists(gameObject))\n {\n gameObject.emit(GameObjectEvents.ADDED_TO_SCENE, gameObject, this.scene);\n }\n },\n\n /**\n * Internal remove handler.\n *\n * @method Phaser.GameObjects.Container#removeHandler\n * @private\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just removed from this Container.\n */\n removeHandler: function (gameObject)\n {\n gameObject.off(Events.DESTROY, this.remove);\n\n if (this.exclusive)\n {\n gameObject.parentContainer = null;\n }\n\n // Is only on the Display List via this Container\n if (!this.scene.sys.displayList.exists(gameObject))\n {\n gameObject.emit(GameObjectEvents.REMOVED_FROM_SCENE, gameObject, this.scene);\n }\n },\n\n /**\n * Takes a Point-like object, such as a Vector2, Geom.Point or object with public x and y properties,\n * and transforms it into the space of this Container, then returns it in the output object.\n *\n * @method Phaser.GameObjects.Container#pointToContainer\n * @since 3.4.0\n *\n * @param {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} source - The Source Point to be transformed.\n * @param {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} [output] - A destination object to store the transformed point in. If none given a Vector2 will be created and returned.\n *\n * @return {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} The transformed point.\n */\n pointToContainer: function (source, output)\n {\n if (output === undefined) { output = new Vector2(); }\n\n if (this.parentContainer)\n {\n this.parentContainer.pointToContainer(source, output);\n }\n else\n {\n output = new Vector2(source.x, source.y);\n }\n\n var tempMatrix = this.tempTransformMatrix;\n\n // No need to loadIdentity because applyITRS overwrites every value anyway\n tempMatrix.applyITRS(this.x, this.y, this.rotation, this.scaleX, this.scaleY);\n\n tempMatrix.invert();\n\n tempMatrix.transformPoint(source.x, source.y, output);\n\n return output;\n },\n\n /**\n * Returns the world transform matrix as used for Bounds checks.\n *\n * The returned matrix is temporal and shouldn't be stored.\n *\n * @method Phaser.GameObjects.Container#getBoundsTransformMatrix\n * @since 3.4.0\n *\n * @return {Phaser.GameObjects.Components.TransformMatrix} The world transform matrix.\n */\n getBoundsTransformMatrix: function ()\n {\n return this.getWorldTransformMatrix(this.tempTransformMatrix, this.localTransform);\n },\n\n /**\n * Adds the given Game Object, or array of Game Objects, to this Container.\n *\n * Each Game Object must be unique within the Container.\n *\n * @method Phaser.GameObjects.Container#add\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\n *\n * @return {this} This Container instance.\n */\n add: function (child)\n {\n ArrayUtils.Add(this.list, child, this.maxSize, this.addHandler, this);\n\n return this;\n },\n\n /**\n * Adds the given Game Object, or array of Game Objects, to this Container at the specified position.\n *\n * Existing Game Objects in the Container are shifted up.\n *\n * Each Game Object must be unique within the Container.\n *\n * @method Phaser.GameObjects.Container#addAt\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\n * @param {integer} [index=0] - The position to insert the Game Object/s at.\n *\n * @return {this} This Container instance.\n */\n addAt: function (child, index)\n {\n ArrayUtils.AddAt(this.list, child, index, this.maxSize, this.addHandler, this);\n\n return this;\n },\n\n /**\n * Returns the Game Object at the given position in this Container.\n *\n * @method Phaser.GameObjects.Container#getAt\n * @since 3.4.0\n *\n * @param {integer} index - The position to get the Game Object from.\n *\n * @return {?Phaser.GameObjects.GameObject} The Game Object at the specified index, or `null` if none found.\n */\n getAt: function (index)\n {\n return this.list[index];\n },\n\n /**\n * Returns the index of the given Game Object in this Container.\n *\n * @method Phaser.GameObjects.Container#getIndex\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container.\n *\n * @return {integer} The index of the Game Object in this Container, or -1 if not found.\n */\n getIndex: function (child)\n {\n return this.list.indexOf(child);\n },\n\n /**\n * Sort the contents of this Container so the items are in order based on the given property.\n * For example: `sort('alpha')` would sort the elements based on the value of their `alpha` property.\n *\n * @method Phaser.GameObjects.Container#sort\n * @since 3.4.0\n *\n * @param {string} property - The property to lexically sort by.\n * @param {function} [handler] - Provide your own custom handler function. Will receive 2 children which it should compare and return a boolean.\n *\n * @return {this} This Container instance.\n */\n sort: function (property, handler)\n {\n if (!property)\n {\n return this;\n }\n\n if (handler === undefined)\n {\n handler = function (childA, childB)\n {\n return childA[property] - childB[property];\n };\n }\n\n ArrayUtils.StableSort.inplace(this.list, handler);\n\n return this;\n },\n\n /**\n * Searches for the first instance of a child with its `name` property matching the given argument.\n * Should more than one child have the same name only the first is returned.\n *\n * @method Phaser.GameObjects.Container#getByName\n * @since 3.4.0\n *\n * @param {string} name - The name to search for.\n *\n * @return {?Phaser.GameObjects.GameObject} The first child with a matching name, or `null` if none were found.\n */\n getByName: function (name)\n {\n return ArrayUtils.GetFirst(this.list, 'name', name);\n },\n\n /**\n * Returns a random Game Object from this Container.\n *\n * @method Phaser.GameObjects.Container#getRandom\n * @since 3.4.0\n *\n * @param {integer} [startIndex=0] - An optional start index.\n * @param {integer} [length] - An optional length, the total number of elements (from the startIndex) to choose from.\n *\n * @return {?Phaser.GameObjects.GameObject} A random child from the Container, or `null` if the Container is empty.\n */\n getRandom: function (startIndex, length)\n {\n return ArrayUtils.GetRandom(this.list, startIndex, length);\n },\n\n /**\n * Gets the first Game Object in this Container.\n *\n * You can also specify a property and value to search for, in which case it will return the first\n * Game Object in this Container with a matching property and / or value.\n *\n * For example: `getFirst('visible', true)` would return the first Game Object that had its `visible` property set.\n *\n * You can limit the search to the `startIndex` - `endIndex` range.\n *\n * @method Phaser.GameObjects.Container#getFirst\n * @since 3.4.0\n *\n * @param {string} property - The property to test on each Game Object in the Container.\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\n * @param {integer} [startIndex=0] - An optional start index to search from.\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\n *\n * @return {?Phaser.GameObjects.GameObject} The first matching Game Object, or `null` if none was found.\n */\n getFirst: function (property, value, startIndex, endIndex)\n {\n return ArrayUtils.GetFirst(this.list, property, value, startIndex, endIndex);\n },\n\n /**\n * Returns all Game Objects in this Container.\n *\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\n *\n * For example: `getAll('body')` would return only Game Objects that have a body property.\n *\n * You can also specify a value to compare the property to:\n *\n * `getAll('visible', true)` would return only Game Objects that have their visible property set to `true`.\n *\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\n * the first 50 Game Objects.\n *\n * @method Phaser.GameObjects.Container#getAll\n * @since 3.4.0\n *\n * @param {string} [property] - The property to test on each Game Object in the Container.\n * @param {any} [value] - If property is set then the `property` must strictly equal this value to be included in the results.\n * @param {integer} [startIndex=0] - An optional start index to search from.\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\n *\n * @return {Phaser.GameObjects.GameObject[]} An array of matching Game Objects from this Container.\n */\n getAll: function (property, value, startIndex, endIndex)\n {\n return ArrayUtils.GetAll(this.list, property, value, startIndex, endIndex);\n },\n\n /**\n * Returns the total number of Game Objects in this Container that have a property\n * matching the given value.\n *\n * For example: `count('visible', true)` would count all the elements that have their visible property set.\n *\n * You can optionally limit the operation to the `startIndex` - `endIndex` range.\n *\n * @method Phaser.GameObjects.Container#count\n * @since 3.4.0\n *\n * @param {string} property - The property to check.\n * @param {any} value - The value to check.\n * @param {integer} [startIndex=0] - An optional start index to search from.\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\n *\n * @return {integer} The total number of Game Objects in this Container with a property matching the given value.\n */\n count: function (property, value, startIndex, endIndex)\n {\n return ArrayUtils.CountAllMatching(this.list, property, value, startIndex, endIndex);\n },\n\n /**\n * Swaps the position of two Game Objects in this Container.\n * Both Game Objects must belong to this Container.\n *\n * @method Phaser.GameObjects.Container#swap\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child1 - The first Game Object to swap.\n * @param {Phaser.GameObjects.GameObject} child2 - The second Game Object to swap.\n *\n * @return {this} This Container instance.\n */\n swap: function (child1, child2)\n {\n ArrayUtils.Swap(this.list, child1, child2);\n\n return this;\n },\n\n /**\n * Moves a Game Object to a new position within this Container.\n *\n * The Game Object must already be a child of this Container.\n *\n * The Game Object is removed from its old position and inserted into the new one.\n * Therefore the Container size does not change. Other children will change position accordingly.\n *\n * @method Phaser.GameObjects.Container#moveTo\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to move.\n * @param {integer} index - The new position of the Game Object in this Container.\n *\n * @return {this} This Container instance.\n */\n moveTo: function (child, index)\n {\n ArrayUtils.MoveTo(this.list, child, index);\n\n return this;\n },\n\n /**\n * Removes the given Game Object, or array of Game Objects, from this Container.\n *\n * The Game Objects must already be children of this Container.\n *\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\n *\n * @method Phaser.GameObjects.Container#remove\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to be removed from the Container.\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each child successfully removed from this Container.\n *\n * @return {this} This Container instance.\n */\n remove: function (child, destroyChild)\n {\n var removed = ArrayUtils.Remove(this.list, child, this.removeHandler, this);\n\n if (destroyChild && removed)\n {\n if (!Array.isArray(removed))\n {\n removed = [ removed ];\n }\n\n for (var i = 0; i < removed.length; i++)\n {\n removed[i].destroy();\n }\n }\n\n return this;\n },\n\n /**\n * Removes the Game Object at the given position in this Container.\n *\n * You can also optionally call `destroy` on the Game Object, if one is found.\n *\n * @method Phaser.GameObjects.Container#removeAt\n * @since 3.4.0\n *\n * @param {integer} index - The index of the Game Object to be removed.\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\n *\n * @return {this} This Container instance.\n */\n removeAt: function (index, destroyChild)\n {\n var removed = ArrayUtils.RemoveAt(this.list, index, this.removeHandler, this);\n\n if (destroyChild && removed)\n {\n removed.destroy();\n }\n\n return this;\n },\n\n /**\n * Removes the Game Objects between the given positions in this Container.\n *\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\n *\n * @method Phaser.GameObjects.Container#removeBetween\n * @since 3.4.0\n *\n * @param {integer} [startIndex=0] - An optional start index to search from.\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\n *\n * @return {this} This Container instance.\n */\n removeBetween: function (startIndex, endIndex, destroyChild)\n {\n var removed = ArrayUtils.RemoveBetween(this.list, startIndex, endIndex, this.removeHandler, this);\n\n if (destroyChild)\n {\n for (var i = 0; i < removed.length; i++)\n {\n removed[i].destroy();\n }\n }\n\n return this;\n },\n\n /**\n * Removes all Game Objects from this Container.\n *\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\n *\n * @method Phaser.GameObjects.Container#removeAll\n * @since 3.4.0\n *\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\n *\n * @return {this} This Container instance.\n */\n removeAll: function (destroyChild)\n {\n var removed = ArrayUtils.RemoveBetween(this.list, 0, this.list.length, this.removeHandler, this);\n\n if (destroyChild)\n {\n for (var i = 0; i < removed.length; i++)\n {\n removed[i].destroy();\n }\n }\n\n return this;\n },\n\n /**\n * Brings the given Game Object to the top of this Container.\n * This will cause it to render on-top of any other objects in the Container.\n *\n * @method Phaser.GameObjects.Container#bringToTop\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to bring to the top of the Container.\n *\n * @return {this} This Container instance.\n */\n bringToTop: function (child)\n {\n ArrayUtils.BringToTop(this.list, child);\n\n return this;\n },\n\n /**\n * Sends the given Game Object to the bottom of this Container.\n * This will cause it to render below any other objects in the Container.\n *\n * @method Phaser.GameObjects.Container#sendToBack\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to send to the bottom of the Container.\n *\n * @return {this} This Container instance.\n */\n sendToBack: function (child)\n {\n ArrayUtils.SendToBack(this.list, child);\n\n return this;\n },\n\n /**\n * Moves the given Game Object up one place in this Container, unless it's already at the top.\n *\n * @method Phaser.GameObjects.Container#moveUp\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\n *\n * @return {this} This Container instance.\n */\n moveUp: function (child)\n {\n ArrayUtils.MoveUp(this.list, child);\n\n return this;\n },\n\n /**\n * Moves the given Game Object down one place in this Container, unless it's already at the bottom.\n *\n * @method Phaser.GameObjects.Container#moveDown\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\n *\n * @return {this} This Container instance.\n */\n moveDown: function (child)\n {\n ArrayUtils.MoveDown(this.list, child);\n\n return this;\n },\n\n /**\n * Reverses the order of all Game Objects in this Container.\n *\n * @method Phaser.GameObjects.Container#reverse\n * @since 3.4.0\n *\n * @return {this} This Container instance.\n */\n reverse: function ()\n {\n this.list.reverse();\n\n return this;\n },\n\n /**\n * Shuffles the all Game Objects in this Container using the Fisher-Yates implementation.\n *\n * @method Phaser.GameObjects.Container#shuffle\n * @since 3.4.0\n *\n * @return {this} This Container instance.\n */\n shuffle: function ()\n {\n ArrayUtils.Shuffle(this.list);\n\n return this;\n },\n\n /**\n * Replaces a Game Object in this Container with the new Game Object.\n * The new Game Object cannot already be a child of this Container.\n *\n * @method Phaser.GameObjects.Container#replace\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} oldChild - The Game Object in this Container that will be replaced.\n * @param {Phaser.GameObjects.GameObject} newChild - The Game Object to be added to this Container.\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\n *\n * @return {this} This Container instance.\n */\n replace: function (oldChild, newChild, destroyChild)\n {\n var moved = ArrayUtils.Replace(this.list, oldChild, newChild);\n\n if (moved)\n {\n this.addHandler(newChild);\n this.removeHandler(oldChild);\n\n if (destroyChild)\n {\n oldChild.destroy();\n }\n }\n\n return this;\n },\n\n /**\n * Returns `true` if the given Game Object is a direct child of this Container.\n *\n * This check does not scan nested Containers.\n *\n * @method Phaser.GameObjects.Container#exists\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to check for within this Container.\n *\n * @return {boolean} True if the Game Object is an immediate child of this Container, otherwise false.\n */\n exists: function (child)\n {\n return (this.list.indexOf(child) > -1);\n },\n\n /**\n * Sets the property to the given value on all Game Objects in this Container.\n *\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\n * the first 50 Game Objects.\n *\n * @method Phaser.GameObjects.Container#setAll\n * @since 3.4.0\n *\n * @param {string} property - The property that must exist on the Game Object.\n * @param {any} value - The value to get the property to.\n * @param {integer} [startIndex=0] - An optional start index to search from.\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\n *\n * @return {this} This Container instance.\n */\n setAll: function (property, value, startIndex, endIndex)\n {\n ArrayUtils.SetAll(this.list, property, value, startIndex, endIndex);\n\n return this;\n },\n\n /**\n * @callback EachContainerCallback\n * @generic I - [item]\n *\n * @param {*} item - The child Game Object of the Container.\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\n */\n\n /**\n * Passes all Game Objects in this Container to the given callback.\n *\n * A copy of the Container is made before passing each entry to your callback.\n * This protects against the callback itself modifying the Container.\n *\n * If you know for sure that the callback will not change the size of this Container\n * then you can use the more performant `Container.iterate` method instead.\n *\n * @method Phaser.GameObjects.Container#each\n * @since 3.4.0\n *\n * @param {function} callback - The function to call.\n * @param {object} [context] - Value to use as `this` when executing callback.\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\n *\n * @return {this} This Container instance.\n */\n each: function (callback, context)\n {\n var args = [ null ];\n var i;\n var temp = this.list.slice();\n var len = temp.length;\n\n for (i = 2; i < arguments.length; i++)\n {\n args.push(arguments[i]);\n }\n\n for (i = 0; i < len; i++)\n {\n args[0] = temp[i];\n\n callback.apply(context, args);\n }\n\n return this;\n },\n\n /**\n * Passes all Game Objects in this Container to the given callback.\n *\n * Only use this method when you absolutely know that the Container will not be modified during\n * the iteration, i.e. by removing or adding to its contents.\n *\n * @method Phaser.GameObjects.Container#iterate\n * @since 3.4.0\n *\n * @param {function} callback - The function to call.\n * @param {object} [context] - Value to use as `this` when executing callback.\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\n *\n * @return {this} This Container instance.\n */\n iterate: function (callback, context)\n {\n var args = [ null ];\n var i;\n\n for (i = 2; i < arguments.length; i++)\n {\n args.push(arguments[i]);\n }\n\n for (i = 0; i < this.list.length; i++)\n {\n args[0] = this.list[i];\n\n callback.apply(context, args);\n }\n\n return this;\n },\n\n /**\n * Sets the scroll factor of this Container and optionally all of its children.\n *\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\n *\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\n * It does not change the Game Objects actual position values.\n *\n * A value of 1 means it will move exactly in sync with a camera.\n * A value of 0 means it will not move at all, even if the camera moves.\n * Other values control the degree to which the camera movement is mapped to this Game Object.\n *\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\n * calculating physics collisions. Bodies always collide based on their world position, but changing\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\n * them from physics bodies if not accounted for in your code.\n *\n * @method Phaser.GameObjects.Container#setScrollFactor\n * @since 3.0.0\n *\n * @param {number} x - The horizontal scroll factor of this Game Object.\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\n * @param {boolean} [updateChildren=false] - Apply this scrollFactor to all Container children as well?\n *\n * @return {this} This Game Object instance.\n */\n setScrollFactor: function (x, y, updateChildren)\n {\n if (y === undefined) { y = x; }\n if (updateChildren === undefined) { updateChildren = false; }\n\n this.scrollFactorX = x;\n this.scrollFactorY = y;\n\n if (updateChildren)\n {\n ArrayUtils.SetAll(this.list, 'scrollFactorX', x);\n ArrayUtils.SetAll(this.list, 'scrollFactorY', y);\n }\n\n return this;\n },\n\n /**\n * The number of Game Objects inside this Container.\n *\n * @name Phaser.GameObjects.Container#length\n * @type {integer}\n * @readonly\n * @since 3.4.0\n */\n length: {\n\n get: function ()\n {\n return this.list.length;\n }\n\n },\n\n /**\n * Returns the first Game Object within the Container, or `null` if it is empty.\n *\n * You can move the cursor by calling `Container.next` and `Container.previous`.\n *\n * @name Phaser.GameObjects.Container#first\n * @type {?Phaser.GameObjects.GameObject}\n * @readonly\n * @since 3.4.0\n */\n first: {\n\n get: function ()\n {\n this.position = 0;\n\n if (this.list.length > 0)\n {\n return this.list[0];\n }\n else\n {\n return null;\n }\n }\n\n },\n\n /**\n * Returns the last Game Object within the Container, or `null` if it is empty.\n *\n * You can move the cursor by calling `Container.next` and `Container.previous`.\n *\n * @name Phaser.GameObjects.Container#last\n * @type {?Phaser.GameObjects.GameObject}\n * @readonly\n * @since 3.4.0\n */\n last: {\n\n get: function ()\n {\n if (this.list.length > 0)\n {\n this.position = this.list.length - 1;\n\n return this.list[this.position];\n }\n else\n {\n return null;\n }\n }\n\n },\n\n /**\n * Returns the next Game Object within the Container, or `null` if it is empty.\n *\n * You can move the cursor by calling `Container.next` and `Container.previous`.\n *\n * @name Phaser.GameObjects.Container#next\n * @type {?Phaser.GameObjects.GameObject}\n * @readonly\n * @since 3.4.0\n */\n next: {\n\n get: function ()\n {\n if (this.position < this.list.length)\n {\n this.position++;\n\n return this.list[this.position];\n }\n else\n {\n return null;\n }\n }\n\n },\n\n /**\n * Returns the previous Game Object within the Container, or `null` if it is empty.\n *\n * You can move the cursor by calling `Container.next` and `Container.previous`.\n *\n * @name Phaser.GameObjects.Container#previous\n * @type {?Phaser.GameObjects.GameObject}\n * @readonly\n * @since 3.4.0\n */\n previous: {\n\n get: function ()\n {\n if (this.position > 0)\n {\n this.position--;\n\n return this.list[this.position];\n }\n else\n {\n return null;\n }\n }\n\n },\n\n /**\n * Internal destroy handler, called as part of the destroy process.\n *\n * @method Phaser.GameObjects.Container#preDestroy\n * @protected\n * @since 3.9.0\n */\n preDestroy: function ()\n {\n this.removeAll(!!this.exclusive);\n\n this.localTransform.destroy();\n this.tempTransformMatrix.destroy();\n\n this.list = [];\n this._displayList = null;\n }\n\n});\n\nmodule.exports = Container;\n","/**\n * @author Richard Davey \n * @author Felipe Alfonso <@bitnenfer>\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Renders this Game Object with the Canvas Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method Phaser.GameObjects.Container#renderCanvas\n * @since 3.4.0\n * @private\n *\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar ContainerCanvasRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix)\n{\n var children = container.list;\n\n if (children.length === 0)\n {\n return;\n }\n\n var transformMatrix = container.localTransform;\n\n if (parentMatrix)\n {\n transformMatrix.loadIdentity();\n transformMatrix.multiply(parentMatrix);\n transformMatrix.translate(container.x, container.y);\n transformMatrix.rotate(container.rotation);\n transformMatrix.scale(container.scaleX, container.scaleY);\n }\n else\n {\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\n }\n\n var containerHasBlendMode = (container.blendMode !== -1);\n\n if (!containerHasBlendMode)\n {\n // If Container is SKIP_TEST then set blend mode to be Normal\n renderer.setBlendMode(0);\n }\n\n var alpha = container._alpha;\n var scrollFactorX = container.scrollFactorX;\n var scrollFactorY = container.scrollFactorY;\n\n if (container.mask)\n {\n container.mask.preRenderCanvas(renderer, null, camera);\n }\n\n for (var i = 0; i < children.length; i++)\n {\n var child = children[i];\n\n if (!child.willRender(camera))\n {\n continue;\n }\n\n var childAlpha = child.alpha;\n var childScrollFactorX = child.scrollFactorX;\n var childScrollFactorY = child.scrollFactorY;\n\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\n {\n // If Container doesn't have its own blend mode, then a child can have one\n renderer.setBlendMode(child.blendMode);\n }\n\n // Set parent values\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\n child.setAlpha(childAlpha * alpha);\n\n // Render\n child.renderCanvas(renderer, child, interpolationPercentage, camera, transformMatrix);\n\n // Restore original values\n child.setAlpha(childAlpha);\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\n }\n\n if (container.mask)\n {\n container.mask.postRenderCanvas(renderer);\n }\n};\n\nmodule.exports = ContainerCanvasRenderer;\n","/**\n * @author Richard Davey \n * @author Felipe Alfonso <@bitnenfer>\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar renderWebGL = require('../../utils/NOOP');\nvar renderCanvas = require('../../utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./ContainerWebGLRenderer');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./ContainerCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas\n\n};\n","/**\n * @author Richard Davey \n * @author Felipe Alfonso <@bitnenfer>\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Renders this Game Object with the WebGL Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method Phaser.GameObjects.Container#renderWebGL\n * @since 3.4.0\n * @private\n *\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar ContainerWebGLRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix)\n{\n var children = container.list;\n\n if (children.length === 0)\n {\n return;\n }\n\n var transformMatrix = container.localTransform;\n \n if (parentMatrix)\n {\n transformMatrix.loadIdentity();\n transformMatrix.multiply(parentMatrix);\n transformMatrix.translate(container.x, container.y);\n transformMatrix.rotate(container.rotation);\n transformMatrix.scale(container.scaleX, container.scaleY);\n }\n else\n {\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\n }\n\n var containerHasBlendMode = (container.blendMode !== -1);\n\n if (!containerHasBlendMode)\n {\n // If Container is SKIP_TEST then set blend mode to be Normal\n renderer.setBlendMode(0);\n }\n\n var alpha = container.alpha;\n\n var scrollFactorX = container.scrollFactorX;\n var scrollFactorY = container.scrollFactorY;\n\n var list = children;\n var childCount = children.length;\n\n for (var i = 0; i < childCount; i++)\n {\n var child = children[i];\n\n if (!child.willRender(camera))\n {\n continue;\n }\n\n var childAlphaTopLeft;\n var childAlphaTopRight;\n var childAlphaBottomLeft;\n var childAlphaBottomRight;\n\n if (child.alphaTopLeft !== undefined)\n {\n childAlphaTopLeft = child.alphaTopLeft;\n childAlphaTopRight = child.alphaTopRight;\n childAlphaBottomLeft = child.alphaBottomLeft;\n childAlphaBottomRight = child.alphaBottomRight;\n }\n else\n {\n var childAlpha = child.alpha;\n\n childAlphaTopLeft = childAlpha;\n childAlphaTopRight = childAlpha;\n childAlphaBottomLeft = childAlpha;\n childAlphaBottomRight = childAlpha;\n }\n\n var childScrollFactorX = child.scrollFactorX;\n var childScrollFactorY = child.scrollFactorY;\n\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\n {\n // If Container doesn't have its own blend mode, then a child can have one\n renderer.setBlendMode(child.blendMode);\n }\n\n var mask = child.mask;\n\n if (mask)\n {\n mask.preRenderWebGL(renderer, child, camera);\n }\n\n var type = child.type;\n\n if (type !== renderer.currentType)\n {\n renderer.newType = true;\n renderer.currentType = type;\n }\n\n renderer.nextTypeMatch = (i < childCount - 1) ? (list[i + 1].type === renderer.currentType) : false;\n\n // Set parent values\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\n\n child.setAlpha(childAlphaTopLeft * alpha, childAlphaTopRight * alpha, childAlphaBottomLeft * alpha, childAlphaBottomRight * alpha);\n\n // Render\n child.renderWebGL(renderer, child, interpolationPercentage, camera, transformMatrix);\n\n // Restore original values\n\n child.setAlpha(childAlphaTopLeft, childAlphaTopRight, childAlphaBottomLeft, childAlphaBottomRight);\n\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\n\n if (mask)\n {\n mask.postRenderWebGL(renderer, camera);\n }\n\n renderer.newType = false;\n }\n};\n\nmodule.exports = ContainerWebGLRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Added to Scene Event.\n *\n * This event is dispatched when a Game Object is added to a Scene.\n *\n * Listen for it on a Game Object instance using `GameObject.on('addedtoscene', listener)`.\n *\n * @event Phaser.GameObjects.Events#ADDED_TO_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\n */\nmodule.exports = 'addedtoscene';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Destroy Event.\n * \n * This event is dispatched when a Game Object instance is being destroyed.\n * \n * Listen for it on a Game Object instance using `GameObject.on('destroy', listener)`.\n *\n * @event Phaser.GameObjects.Events#DESTROY\n * @since 3.0.0\n * \n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed.\n */\nmodule.exports = 'destroy';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Removed from Scene Event.\n *\n * This event is dispatched when a Game Object is removed from a Scene.\n *\n * Listen for it on a Game Object instance using `GameObject.on('removedfromscene', listener)`.\n *\n * @event Phaser.GameObjects.Events#REMOVED_FROM_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\n */\nmodule.exports = 'removedfromscene';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Complete Event.\n * \n * This event is dispatched when a Video finishes playback by reaching the end of its duration. It\n * is also dispatched if a video marker sequence is being played and reaches the end.\n * \n * Note that not all videos can fire this event. Live streams, for example, have no fixed duration,\n * so never technically 'complete'.\n * \n * If a video is stopped from playback, via the `Video.stop` method, it will emit the\n * `VIDEO_STOP` event instead of this one.\n * \n * Listen for it from a Video Game Object instance using `Video.on('complete', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_COMPLETE\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed playback.\n */\nmodule.exports = 'complete';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Created Event.\n * \n * This event is dispatched when the texture for a Video has been created. This happens\n * when enough of the video source has been loaded that the browser is able to render a\n * frame from it.\n * \n * Listen for it from a Video Game Object instance using `Video.on('created', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_CREATED\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\n * @param {integer} width - The width of the video.\n * @param {integer} height - The height of the video.\n */\nmodule.exports = 'created';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Error Event.\n * \n * This event is dispatched when a Video tries to play a source that does not exist, or is the wrong file type.\n * \n * Listen for it from a Video Game Object instance using `Video.on('error', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_ERROR\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which threw the error.\n * @param {Event} event - The native DOM event the browser raised during playback.\n */\nmodule.exports = 'error';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Loop Event.\n * \n * This event is dispatched when a Video that is currently playing has looped. This only\n * happens if the `loop` parameter was specified, or the `setLoop` method was called,\n * and if the video has a fixed duration. Video streams, for example, cannot loop, as\n * they have no duration.\n * \n * Looping is based on the result of the Video `timeupdate` event. This event is not\n * frame-accurate, due to the way browsers work, so please do not rely on this loop\n * event to be time or frame precise.\n * \n * Listen for it from a Video Game Object instance using `Video.on('loop', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_LOOP\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which has looped.\n */\nmodule.exports = 'loop';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Play Event.\n * \n * This event is dispatched when a Video begins playback. For videos that do not require\n * interaction unlocking, this is usually as soon as the `Video.play` method is called.\n * However, for videos that require unlocking, it is fired once playback begins after\n * they've been unlocked.\n * \n * Listen for it from a Video Game Object instance using `Video.on('play', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_PLAY\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started playback.\n */\nmodule.exports = 'play';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Seeked Event.\n * \n * This event is dispatched when a Video completes seeking to a new point in its timeline.\n * \n * Listen for it from a Video Game Object instance using `Video.on('seeked', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_SEEKED\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed seeking.\n */\nmodule.exports = 'seeked';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Seeking Event.\n * \n * This event is dispatched when a Video _begins_ seeking to a new point in its timeline.\n * When the seek is complete, it will dispatch the `VIDEO_SEEKED` event to conclude.\n * \n * Listen for it from a Video Game Object instance using `Video.on('seeking', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_SEEKING\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started seeking.\n */\nmodule.exports = 'seeking';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Stopped Event.\n * \n * This event is dispatched when a Video is stopped from playback via a call to the `Video.stop` method,\n * either directly via game code, or indirectly as the result of changing a video source or destroying it.\n * \n * Listen for it from a Video Game Object instance using `Video.on('stop', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_STOP\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which stopped playback.\n */\nmodule.exports = 'stop';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Timeout Event.\n * \n * This event is dispatched when a Video has exhausted its allocated time while trying to connect to a video\n * source to start playback.\n * \n * Listen for it from a Video Game Object instance using `Video.on('timeout', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_TIMEOUT\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which timed out.\n */\nmodule.exports = 'timeout';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Unlocked Event.\n * \n * This event is dispatched when a Video that was prevented from playback due to the browsers\n * Media Engagement Interaction policy, is unlocked by a user gesture.\n * \n * Listen for it from a Video Game Object instance using `Video.on('unlocked', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_UNLOCKED\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\n */\nmodule.exports = 'unlocked';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.GameObjects.Events\n */\n\nmodule.exports = {\n\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\n DESTROY: require('./DESTROY_EVENT'),\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'),\n VIDEO_COMPLETE: require('./VIDEO_COMPLETE_EVENT'),\n VIDEO_CREATED: require('./VIDEO_CREATED_EVENT'),\n VIDEO_ERROR: require('./VIDEO_ERROR_EVENT'),\n VIDEO_LOOP: require('./VIDEO_LOOP_EVENT'),\n VIDEO_PLAY: require('./VIDEO_PLAY_EVENT'),\n VIDEO_SEEKED: require('./VIDEO_SEEKED_EVENT'),\n VIDEO_SEEKING: require('./VIDEO_SEEKING_EVENT'),\n VIDEO_STOP: require('./VIDEO_STOP_EVENT'),\n VIDEO_TIMEOUT: require('./VIDEO_TIMEOUT_EVENT'),\n VIDEO_UNLOCKED: require('./VIDEO_UNLOCKED_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar GEOM_CONST = {\n\n /**\n * A Circle Geometry object type.\n * \n * @name Phaser.Geom.CIRCLE\n * @type {integer}\n * @since 3.19.0\n */\n CIRCLE: 0,\n\n /**\n * An Ellipse Geometry object type.\n * \n * @name Phaser.Geom.ELLIPSE\n * @type {integer}\n * @since 3.19.0\n */\n ELLIPSE: 1,\n\n /**\n * A Line Geometry object type.\n * \n * @name Phaser.Geom.LINE\n * @type {integer}\n * @since 3.19.0\n */\n LINE: 2,\n\n /**\n * A Point Geometry object type.\n * \n * @name Phaser.Geom.POINT\n * @type {integer}\n * @since 3.19.0\n */\n POINT: 3,\n\n /**\n * A Polygon Geometry object type.\n * \n * @name Phaser.Geom.POLYGON\n * @type {integer}\n * @since 3.19.0\n */\n POLYGON: 4,\n\n /**\n * A Rectangle Geometry object type.\n * \n * @name Phaser.Geom.RECTANGLE\n * @type {integer}\n * @since 3.19.0\n */\n RECTANGLE: 5,\n\n /**\n * A Triangle Geometry object type.\n * \n * @name Phaser.Geom.TRIANGLE\n * @type {integer}\n * @since 3.19.0\n */\n TRIANGLE: 6\n\n};\n\nmodule.exports = GEOM_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Point = require('../point/Point');\n\n/**\n * Get a point on a line that's a given percentage along its length.\n *\n * @function Phaser.Geom.Line.GetPoint\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point} O - [out,$return]\n *\n * @param {Phaser.Geom.Line} line - The line.\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\n * @param {(Phaser.Geom.Point|object)} [out] - An optional point, or point-like object, to store the coordinates of the point on the line.\n *\n * @return {(Phaser.Geom.Point|object)} The point on the line.\n */\nvar GetPoint = function (line, position, out)\n{\n if (out === undefined) { out = new Point(); }\n\n out.x = line.x1 + (line.x2 - line.x1) * position;\n out.y = line.y1 + (line.y2 - line.y1) * position;\n\n return out;\n};\n\nmodule.exports = GetPoint;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Length = require('./Length');\nvar Point = require('../point/Point');\n\n/**\n * Get a number of points along a line's length.\n *\n * Provide a `quantity` to get an exact number of points along the line.\n *\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\n * providing a `stepRate`.\n *\n * @function Phaser.Geom.Line.GetPoints\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\n *\n * @param {Phaser.Geom.Line} line - The line.\n * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\n * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\n *\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\n */\nvar GetPoints = function (line, quantity, stepRate, out)\n{\n if (out === undefined) { out = []; }\n\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\n if (!quantity && stepRate > 0)\n {\n quantity = Length(line) / stepRate;\n }\n\n var x1 = line.x1;\n var y1 = line.y1;\n\n var x2 = line.x2;\n var y2 = line.y2;\n\n for (var i = 0; i < quantity; i++)\n {\n var position = i / quantity;\n\n var x = x1 + (x2 - x1) * position;\n var y = y1 + (y2 - y1) * position;\n\n out.push(new Point(x, y));\n }\n\n return out;\n};\n\nmodule.exports = GetPoints;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the length of the given line.\n *\n * @function Phaser.Geom.Line.Length\n * @since 3.0.0\n *\n * @param {Phaser.Geom.Line} line - The line to calculate the length of.\n *\n * @return {number} The length of the line.\n */\nvar Length = function (line)\n{\n return Math.sqrt((line.x2 - line.x1) * (line.x2 - line.x1) + (line.y2 - line.y1) * (line.y2 - line.y1));\n};\n\nmodule.exports = Length;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar GetPoint = require('./GetPoint');\nvar GetPoints = require('./GetPoints');\nvar GEOM_CONST = require('../const');\nvar Random = require('./Random');\nvar Vector2 = require('../../math/Vector2');\n\n/**\n * @classdesc\n * Defines a Line segment, a part of a line between two endpoints.\n *\n * @class Line\n * @memberof Phaser.Geom\n * @constructor\n * @since 3.0.0\n *\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\n */\nvar Line = new Class({\n\n initialize:\n\n function Line (x1, y1, x2, y2)\n {\n if (x1 === undefined) { x1 = 0; }\n if (y1 === undefined) { y1 = 0; }\n if (x2 === undefined) { x2 = 0; }\n if (y2 === undefined) { y2 = 0; }\n\n /**\n * The geometry constant type of this object: `GEOM_CONST.LINE`.\n * Used for fast type comparisons.\n *\n * @name Phaser.Geom.Line#type\n * @type {integer}\n * @readonly\n * @since 3.19.0\n */\n this.type = GEOM_CONST.LINE;\n\n /**\n * The x coordinate of the lines starting point.\n *\n * @name Phaser.Geom.Line#x1\n * @type {number}\n * @since 3.0.0\n */\n this.x1 = x1;\n\n /**\n * The y coordinate of the lines starting point.\n *\n * @name Phaser.Geom.Line#y1\n * @type {number}\n * @since 3.0.0\n */\n this.y1 = y1;\n\n /**\n * The x coordinate of the lines ending point.\n *\n * @name Phaser.Geom.Line#x2\n * @type {number}\n * @since 3.0.0\n */\n this.x2 = x2;\n\n /**\n * The y coordinate of the lines ending point.\n *\n * @name Phaser.Geom.Line#y2\n * @type {number}\n * @since 3.0.0\n */\n this.y2 = y2;\n },\n\n /**\n * Get a point on a line that's a given percentage along its length.\n *\n * @method Phaser.Geom.Line#getPoint\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point} O - [output,$return]\n *\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\n * @param {(Phaser.Geom.Point|object)} [output] - An optional point, or point-like object, to store the coordinates of the point on the line.\n *\n * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point on the line.\n */\n getPoint: function (position, output)\n {\n return GetPoint(this, position, output);\n },\n\n /**\n * Get a number of points along a line's length.\n *\n * Provide a `quantity` to get an exact number of points along the line.\n *\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\n * providing a `stepRate`.\n *\n * @method Phaser.Geom.Line#getPoints\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\n *\n * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\n * @param {integer} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\n * @param {(array|Phaser.Geom.Point[])} [output] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\n *\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\n */\n getPoints: function (quantity, stepRate, output)\n {\n return GetPoints(this, quantity, stepRate, output);\n },\n\n /**\n * Get a random Point on the Line.\n *\n * @method Phaser.Geom.Line#getRandomPoint\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point} O - [point,$return]\n *\n * @param {(Phaser.Geom.Point|object)} [point] - An instance of a Point to be modified.\n *\n * @return {Phaser.Geom.Point} A random Point on the Line.\n */\n getRandomPoint: function (point)\n {\n return Random(this, point);\n },\n\n /**\n * Set new coordinates for the line endpoints.\n *\n * @method Phaser.Geom.Line#setTo\n * @since 3.0.0\n *\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\n *\n * @return {this} This Line object.\n */\n setTo: function (x1, y1, x2, y2)\n {\n if (x1 === undefined) { x1 = 0; }\n if (y1 === undefined) { y1 = 0; }\n if (x2 === undefined) { x2 = 0; }\n if (y2 === undefined) { y2 = 0; }\n\n this.x1 = x1;\n this.y1 = y1;\n\n this.x2 = x2;\n this.y2 = y2;\n\n return this;\n },\n\n /**\n * Returns a Vector2 object that corresponds to the start of this Line.\n *\n * @method Phaser.Geom.Line#getPointA\n * @since 3.0.0\n *\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\n *\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\n *\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the start of this Line.\n */\n getPointA: function (vec2)\n {\n if (vec2 === undefined) { vec2 = new Vector2(); }\n\n vec2.set(this.x1, this.y1);\n\n return vec2;\n },\n\n /**\n * Returns a Vector2 object that corresponds to the end of this Line.\n *\n * @method Phaser.Geom.Line#getPointB\n * @since 3.0.0\n *\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\n *\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\n *\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the end of this Line.\n */\n getPointB: function (vec2)\n {\n if (vec2 === undefined) { vec2 = new Vector2(); }\n\n vec2.set(this.x2, this.y2);\n\n return vec2;\n },\n\n /**\n * The left position of the Line.\n *\n * @name Phaser.Geom.Line#left\n * @type {number}\n * @since 3.0.0\n */\n left: {\n\n get: function ()\n {\n return Math.min(this.x1, this.x2);\n },\n\n set: function (value)\n {\n if (this.x1 <= this.x2)\n {\n this.x1 = value;\n }\n else\n {\n this.x2 = value;\n }\n }\n\n },\n\n /**\n * The right position of the Line.\n *\n * @name Phaser.Geom.Line#right\n * @type {number}\n * @since 3.0.0\n */\n right: {\n\n get: function ()\n {\n return Math.max(this.x1, this.x2);\n },\n\n set: function (value)\n {\n if (this.x1 > this.x2)\n {\n this.x1 = value;\n }\n else\n {\n this.x2 = value;\n }\n }\n\n },\n\n /**\n * The top position of the Line.\n *\n * @name Phaser.Geom.Line#top\n * @type {number}\n * @since 3.0.0\n */\n top: {\n\n get: function ()\n {\n return Math.min(this.y1, this.y2);\n },\n\n set: function (value)\n {\n if (this.y1 <= this.y2)\n {\n this.y1 = value;\n }\n else\n {\n this.y2 = value;\n }\n }\n\n },\n\n /**\n * The bottom position of the Line.\n *\n * @name Phaser.Geom.Line#bottom\n * @type {number}\n * @since 3.0.0\n */\n bottom: {\n\n get: function ()\n {\n return Math.max(this.y1, this.y2);\n },\n\n set: function (value)\n {\n if (this.y1 > this.y2)\n {\n this.y1 = value;\n }\n else\n {\n this.y2 = value;\n }\n }\n\n }\n\n});\n\nmodule.exports = Line;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Point = require('../point/Point');\n\n/**\n * Returns a random point on a given Line.\n *\n * @function Phaser.Geom.Line.Random\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point} O - [out,$return]\n *\n * @param {Phaser.Geom.Line} line - The Line to calculate the random Point on.\n * @param {(Phaser.Geom.Point|object)} [out] - An instance of a Point to be modified.\n *\n * @return {(Phaser.Geom.Point|object)} A random Point on the Line.\n */\nvar Random = function (line, out)\n{\n if (out === undefined) { out = new Point(); }\n\n var t = Math.random();\n\n out.x = line.x1 + t * (line.x2 - line.x1);\n out.y = line.y1 + t * (line.y2 - line.y1);\n\n return out;\n};\n\nmodule.exports = Random;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar GEOM_CONST = require('../const');\n\n/**\n * @classdesc\n * Defines a Point in 2D space, with an x and y component.\n *\n * @class Point\n * @memberof Phaser.Geom\n * @constructor\n * @since 3.0.0\n *\n * @param {number} [x=0] - The x coordinate of this Point.\n * @param {number} [y=x] - The y coordinate of this Point.\n */\nvar Point = new Class({\n\n initialize:\n\n function Point (x, y)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = x; }\n\n /**\n * The geometry constant type of this object: `GEOM_CONST.POINT`.\n * Used for fast type comparisons.\n *\n * @name Phaser.Geom.Point#type\n * @type {integer}\n * @readonly\n * @since 3.19.0\n */\n this.type = GEOM_CONST.POINT;\n\n /**\n * The x coordinate of this Point.\n *\n * @name Phaser.Geom.Point#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.x = x;\n\n /**\n * The y coordinate of this Point.\n *\n * @name Phaser.Geom.Point#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.y = y;\n },\n\n /**\n * Set the x and y coordinates of the point to the given values.\n *\n * @method Phaser.Geom.Point#setTo\n * @since 3.0.0\n *\n * @param {number} [x=0] - The x coordinate of this Point.\n * @param {number} [y=x] - The y coordinate of this Point.\n *\n * @return {this} This Point object.\n */\n setTo: function (x, y)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = x; }\n\n this.x = x;\n this.y = y;\n\n return this;\n }\n\n});\n\nmodule.exports = Point;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Checks if a given point is inside a Rectangle's bounds.\n *\n * @function Phaser.Geom.Rectangle.Contains\n * @since 3.0.0\n *\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to check.\n * @param {number} x - The X coordinate of the point to check.\n * @param {number} y - The Y coordinate of the point to check.\n *\n * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`.\n */\nvar Contains = function (rect, x, y)\n{\n if (rect.width <= 0 || rect.height <= 0)\n {\n return false;\n }\n\n return (rect.x <= x && rect.x + rect.width >= x && rect.y <= y && rect.y + rect.height >= y);\n};\n\nmodule.exports = Contains;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Perimeter = require('./Perimeter');\nvar Point = require('../point/Point');\n\n/**\n * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter.\n * \n * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.\n * \n * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.\n *\n * @function Phaser.Geom.Rectangle.GetPoint\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point} O - [out,$return]\n *\n * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle to get the perimeter point from.\n * @param {number} position - The normalized distance into the Rectangle's perimeter to return.\n * @param {(Phaser.Geom.Point|object)} [out] - An object to update with the `x` and `y` coordinates of the point.\n *\n * @return {Phaser.Geom.Point} The updated `output` object, or a new Point if no `output` object was given.\n */\nvar GetPoint = function (rectangle, position, out)\n{\n if (out === undefined) { out = new Point(); }\n\n if (position <= 0 || position >= 1)\n {\n out.x = rectangle.x;\n out.y = rectangle.y;\n\n return out;\n }\n\n var p = Perimeter(rectangle) * position;\n\n if (position > 0.5)\n {\n p -= (rectangle.width + rectangle.height);\n\n if (p <= rectangle.width)\n {\n // Face 3\n out.x = rectangle.right - p;\n out.y = rectangle.bottom;\n }\n else\n {\n // Face 4\n out.x = rectangle.x;\n out.y = rectangle.bottom - (p - rectangle.width);\n }\n }\n else if (p <= rectangle.width)\n {\n // Face 1\n out.x = rectangle.x + p;\n out.y = rectangle.y;\n }\n else\n {\n // Face 2\n out.x = rectangle.right;\n out.y = rectangle.y + (p - rectangle.width);\n }\n\n return out;\n};\n\nmodule.exports = GetPoint;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar GetPoint = require('./GetPoint');\nvar Perimeter = require('./Perimeter');\n\n// Return an array of points from the perimeter of the rectangle\n// each spaced out based on the quantity or step required\n\n/**\n * Return an array of points from the perimeter of the rectangle, each spaced out based on the quantity or step required.\n *\n * @function Phaser.Geom.Rectangle.GetPoints\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\n *\n * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle object to get the points from.\n * @param {number} step - Step between points. Used to calculate the number of points to return when quantity is falsey. Ignored if quantity is positive.\n * @param {integer} quantity - The number of evenly spaced points from the rectangles perimeter to return. If falsey, step param will be used to calculate the number of points.\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array to store the points in.\n *\n * @return {(array|Phaser.Geom.Point[])} An array of Points from the perimeter of the rectangle.\n */\nvar GetPoints = function (rectangle, quantity, stepRate, out)\n{\n if (out === undefined) { out = []; }\n\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\n if (!quantity && stepRate > 0)\n {\n quantity = Perimeter(rectangle) / stepRate;\n }\n\n for (var i = 0; i < quantity; i++)\n {\n var position = i / quantity;\n\n out.push(GetPoint(rectangle, position));\n }\n\n return out;\n};\n\nmodule.exports = GetPoints;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculates the perimeter of a Rectangle.\n *\n * @function Phaser.Geom.Rectangle.Perimeter\n * @since 3.0.0\n *\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to use.\n *\n * @return {number} The perimeter of the Rectangle, equal to `(width * 2) + (height * 2)`.\n */\nvar Perimeter = function (rect)\n{\n return 2 * (rect.width + rect.height);\n};\n\nmodule.exports = Perimeter;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Point = require('../point/Point');\n\n/**\n * Returns a random point within a Rectangle.\n *\n * @function Phaser.Geom.Rectangle.Random\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point} O - [out,$return]\n *\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to return a point from.\n * @param {Phaser.Geom.Point} out - The object to update with the point's coordinates.\n *\n * @return {Phaser.Geom.Point} The modified `out` object, or a new Point if none was provided.\n */\nvar Random = function (rect, out)\n{\n if (out === undefined) { out = new Point(); }\n\n out.x = rect.x + (Math.random() * rect.width);\n out.y = rect.y + (Math.random() * rect.height);\n\n return out;\n};\n\nmodule.exports = Random;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar Contains = require('./Contains');\nvar GetPoint = require('./GetPoint');\nvar GetPoints = require('./GetPoints');\nvar GEOM_CONST = require('../const');\nvar Line = require('../line/Line');\nvar Random = require('./Random');\n\n/**\n * @classdesc\n * Encapsulates a 2D rectangle defined by its corner point in the top-left and its extends in x (width) and y (height)\n *\n * @class Rectangle\n * @memberof Phaser.Geom\n * @constructor\n * @since 3.0.0\n *\n * @param {number} [x=0] - The X coordinate of the top left corner of the Rectangle.\n * @param {number} [y=0] - The Y coordinate of the top left corner of the Rectangle.\n * @param {number} [width=0] - The width of the Rectangle.\n * @param {number} [height=0] - The height of the Rectangle.\n */\nvar Rectangle = new Class({\n\n initialize:\n\n function Rectangle (x, y, width, height)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n if (width === undefined) { width = 0; }\n if (height === undefined) { height = 0; }\n\n /**\n * The geometry constant type of this object: `GEOM_CONST.RECTANGLE`.\n * Used for fast type comparisons.\n *\n * @name Phaser.Geom.Rectangle#type\n * @type {integer}\n * @readonly\n * @since 3.19.0\n */\n this.type = GEOM_CONST.RECTANGLE;\n\n /**\n * The X coordinate of the top left corner of the Rectangle.\n *\n * @name Phaser.Geom.Rectangle#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.x = x;\n\n /**\n * The Y coordinate of the top left corner of the Rectangle.\n *\n * @name Phaser.Geom.Rectangle#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.y = y;\n\n /**\n * The width of the Rectangle, i.e. the distance between its left side (defined by `x`) and its right side.\n *\n * @name Phaser.Geom.Rectangle#width\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.width = width;\n\n /**\n * The height of the Rectangle, i.e. the distance between its top side (defined by `y`) and its bottom side.\n *\n * @name Phaser.Geom.Rectangle#height\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.height = height;\n },\n\n /**\n * Checks if the given point is inside the Rectangle's bounds.\n *\n * @method Phaser.Geom.Rectangle#contains\n * @since 3.0.0\n *\n * @param {number} x - The X coordinate of the point to check.\n * @param {number} y - The Y coordinate of the point to check.\n *\n * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`.\n */\n contains: function (x, y)\n {\n return Contains(this, x, y);\n },\n\n /**\n * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter.\n * \n * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.\n * \n * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.\n *\n * @method Phaser.Geom.Rectangle#getPoint\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point} O - [output,$return]\n *\n * @param {number} position - The normalized distance into the Rectangle's perimeter to return.\n * @param {(Phaser.Geom.Point|object)} [output] - An object to update with the `x` and `y` coordinates of the point.\n *\n * @return {(Phaser.Geom.Point|object)} The updated `output` object, or a new Point if no `output` object was given.\n */\n getPoint: function (position, output)\n {\n return GetPoint(this, position, output);\n },\n\n /**\n * Returns an array of points from the perimeter of the Rectangle, each spaced out based on the quantity or step required.\n *\n * @method Phaser.Geom.Rectangle#getPoints\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\n *\n * @param {integer} quantity - The number of points to return. Set to `false` or 0 to return an arbitrary number of points (`perimeter / stepRate`) evenly spaced around the Rectangle based on the `stepRate`.\n * @param {number} [stepRate] - If `quantity` is 0, determines the normalized distance between each returned point.\n * @param {(array|Phaser.Geom.Point[])} [output] - An array to which to append the points.\n *\n * @return {(array|Phaser.Geom.Point[])} The modified `output` array, or a new array if none was provided.\n */\n getPoints: function (quantity, stepRate, output)\n {\n return GetPoints(this, quantity, stepRate, output);\n },\n\n /**\n * Returns a random point within the Rectangle's bounds.\n *\n * @method Phaser.Geom.Rectangle#getRandomPoint\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point} O - [point,$return]\n *\n * @param {Phaser.Geom.Point} [point] - The object in which to store the `x` and `y` coordinates of the point.\n *\n * @return {Phaser.Geom.Point} The updated `point`, or a new Point if none was provided.\n */\n getRandomPoint: function (point)\n {\n return Random(this, point);\n },\n\n /**\n * Sets the position, width, and height of the Rectangle.\n *\n * @method Phaser.Geom.Rectangle#setTo\n * @since 3.0.0\n *\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\n * @param {number} y - The Y coordinate of the top left corner of the Rectangle.\n * @param {number} width - The width of the Rectangle.\n * @param {number} height - The height of the Rectangle.\n *\n * @return {this} This Rectangle object.\n */\n setTo: function (x, y, width, height)\n {\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n\n return this;\n },\n\n /**\n * Resets the position, width, and height of the Rectangle to 0.\n *\n * @method Phaser.Geom.Rectangle#setEmpty\n * @since 3.0.0\n *\n * @return {this} This Rectangle object.\n */\n setEmpty: function ()\n {\n return this.setTo(0, 0, 0, 0);\n },\n\n /**\n * Sets the position of the Rectangle.\n *\n * @method Phaser.Geom.Rectangle#setPosition\n * @since 3.0.0\n *\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\n * @param {number} [y=x] - The Y coordinate of the top left corner of the Rectangle.\n *\n * @return {this} This Rectangle object.\n */\n setPosition: function (x, y)\n {\n if (y === undefined) { y = x; }\n\n this.x = x;\n this.y = y;\n\n return this;\n },\n\n /**\n * Sets the width and height of the Rectangle.\n *\n * @method Phaser.Geom.Rectangle#setSize\n * @since 3.0.0\n *\n * @param {number} width - The width to set the Rectangle to.\n * @param {number} [height=width] - The height to set the Rectangle to.\n *\n * @return {this} This Rectangle object.\n */\n setSize: function (width, height)\n {\n if (height === undefined) { height = width; }\n\n this.width = width;\n this.height = height;\n\n return this;\n },\n\n /**\n * Determines if the Rectangle is empty. A Rectangle is empty if its width or height is less than or equal to 0.\n *\n * @method Phaser.Geom.Rectangle#isEmpty\n * @since 3.0.0\n *\n * @return {boolean} `true` if the Rectangle is empty. A Rectangle object is empty if its width or height is less than or equal to 0.\n */\n isEmpty: function ()\n {\n return (this.width <= 0 || this.height <= 0);\n },\n\n /**\n * Returns a Line object that corresponds to the top of this Rectangle.\n *\n * @method Phaser.Geom.Rectangle#getLineA\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Line} O - [line,$return]\n *\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\n *\n * @return {Phaser.Geom.Line} A Line object that corresponds to the top of this Rectangle.\n */\n getLineA: function (line)\n {\n if (line === undefined) { line = new Line(); }\n\n line.setTo(this.x, this.y, this.right, this.y);\n\n return line;\n },\n\n /**\n * Returns a Line object that corresponds to the right of this Rectangle.\n *\n * @method Phaser.Geom.Rectangle#getLineB\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Line} O - [line,$return]\n *\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\n *\n * @return {Phaser.Geom.Line} A Line object that corresponds to the right of this Rectangle.\n */\n getLineB: function (line)\n {\n if (line === undefined) { line = new Line(); }\n\n line.setTo(this.right, this.y, this.right, this.bottom);\n\n return line;\n },\n\n /**\n * Returns a Line object that corresponds to the bottom of this Rectangle.\n *\n * @method Phaser.Geom.Rectangle#getLineC\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Line} O - [line,$return]\n *\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\n *\n * @return {Phaser.Geom.Line} A Line object that corresponds to the bottom of this Rectangle.\n */\n getLineC: function (line)\n {\n if (line === undefined) { line = new Line(); }\n\n line.setTo(this.right, this.bottom, this.x, this.bottom);\n\n return line;\n },\n\n /**\n * Returns a Line object that corresponds to the left of this Rectangle.\n *\n * @method Phaser.Geom.Rectangle#getLineD\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Line} O - [line,$return]\n *\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\n *\n * @return {Phaser.Geom.Line} A Line object that corresponds to the left of this Rectangle.\n */\n getLineD: function (line)\n {\n if (line === undefined) { line = new Line(); }\n\n line.setTo(this.x, this.bottom, this.x, this.y);\n\n return line;\n },\n\n /**\n * The x coordinate of the left of the Rectangle.\n * Changing the left property of a Rectangle object has no effect on the y and height properties. However it does affect the width property, whereas changing the x value does not affect the width property.\n *\n * @name Phaser.Geom.Rectangle#left\n * @type {number}\n * @since 3.0.0\n */\n left: {\n\n get: function ()\n {\n return this.x;\n },\n\n set: function (value)\n {\n if (value >= this.right)\n {\n this.width = 0;\n }\n else\n {\n this.width = this.right - value;\n }\n\n this.x = value;\n }\n\n },\n\n /**\n * The sum of the x and width properties.\n * Changing the right property of a Rectangle object has no effect on the x, y and height properties, however it does affect the width property.\n *\n * @name Phaser.Geom.Rectangle#right\n * @type {number}\n * @since 3.0.0\n */\n right: {\n\n get: function ()\n {\n return this.x + this.width;\n },\n\n set: function (value)\n {\n if (value <= this.x)\n {\n this.width = 0;\n }\n else\n {\n this.width = value - this.x;\n }\n }\n\n },\n\n /**\n * The y coordinate of the top of the Rectangle. Changing the top property of a Rectangle object has no effect on the x and width properties.\n * However it does affect the height property, whereas changing the y value does not affect the height property.\n *\n * @name Phaser.Geom.Rectangle#top\n * @type {number}\n * @since 3.0.0\n */\n top: {\n\n get: function ()\n {\n return this.y;\n },\n\n set: function (value)\n {\n if (value >= this.bottom)\n {\n this.height = 0;\n }\n else\n {\n this.height = (this.bottom - value);\n }\n\n this.y = value;\n }\n\n },\n\n /**\n * The sum of the y and height properties.\n * Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property.\n *\n * @name Phaser.Geom.Rectangle#bottom\n * @type {number}\n * @since 3.0.0\n */\n bottom: {\n\n get: function ()\n {\n return this.y + this.height;\n },\n\n set: function (value)\n {\n if (value <= this.y)\n {\n this.height = 0;\n }\n else\n {\n this.height = value - this.y;\n }\n }\n\n },\n\n /**\n * The x coordinate of the center of the Rectangle.\n *\n * @name Phaser.Geom.Rectangle#centerX\n * @type {number}\n * @since 3.0.0\n */\n centerX: {\n\n get: function ()\n {\n return this.x + (this.width / 2);\n },\n\n set: function (value)\n {\n this.x = value - (this.width / 2);\n }\n\n },\n\n /**\n * The y coordinate of the center of the Rectangle.\n *\n * @name Phaser.Geom.Rectangle#centerY\n * @type {number}\n * @since 3.0.0\n */\n centerY: {\n\n get: function ()\n {\n return this.y + (this.height / 2);\n },\n\n set: function (value)\n {\n this.y = value - (this.height / 2);\n }\n\n }\n\n});\n\nmodule.exports = Rectangle;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Rectangle = require('./Rectangle');\n\n/**\n * Creates a new Rectangle or repositions and/or resizes an existing Rectangle so that it encompasses the two given Rectangles, i.e. calculates their union.\n *\n * @function Phaser.Geom.Rectangle.Union\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\n *\n * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle to use.\n * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle to use.\n * @param {Phaser.Geom.Rectangle} [out] - The Rectangle to store the union in.\n *\n * @return {Phaser.Geom.Rectangle} The modified `out` Rectangle, or a new Rectangle if none was provided.\n */\nvar Union = function (rectA, rectB, out)\n{\n if (out === undefined) { out = new Rectangle(); }\n\n // Cache vars so we can use one of the input rects as the output rect\n var x = Math.min(rectA.x, rectB.x);\n var y = Math.min(rectA.y, rectB.y);\n var w = Math.max(rectA.right, rectB.right) - x;\n var h = Math.max(rectA.bottom, rectB.bottom) - y;\n\n return out.setTo(x, y, w, h);\n};\n\nmodule.exports = Union;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar CONST = require('./const');\nvar Events = require('./events');\nvar GetFastValue = require('../utils/object/GetFastValue');\nvar GetURL = require('./GetURL');\nvar MergeXHRSettings = require('./MergeXHRSettings');\nvar XHRLoader = require('./XHRLoader');\nvar XHRSettings = require('./XHRSettings');\n\n/**\n * @classdesc\n * The base File class used by all File Types that the Loader can support.\n * You shouldn't create an instance of a File directly, but should extend it with your own class, setting a custom type and processing methods.\n *\n * @class File\n * @memberof Phaser.Loader\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\n * @param {Phaser.Types.Loader.FileConfig} fileConfig - The file configuration object, as created by the file type.\n */\nvar File = new Class({\n\n initialize:\n\n function File (loader, fileConfig)\n {\n /**\n * A reference to the Loader that is going to load this file.\n *\n * @name Phaser.Loader.File#loader\n * @type {Phaser.Loader.LoaderPlugin}\n * @since 3.0.0\n */\n this.loader = loader;\n\n /**\n * A reference to the Cache, or Texture Manager, that is going to store this file if it loads.\n *\n * @name Phaser.Loader.File#cache\n * @type {(Phaser.Cache.BaseCache|Phaser.Textures.TextureManager)}\n * @since 3.7.0\n */\n this.cache = GetFastValue(fileConfig, 'cache', false);\n\n /**\n * The file type string (image, json, etc) for sorting within the Loader.\n *\n * @name Phaser.Loader.File#type\n * @type {string}\n * @since 3.0.0\n */\n this.type = GetFastValue(fileConfig, 'type', false);\n\n /**\n * Unique cache key (unique within its file type)\n *\n * @name Phaser.Loader.File#key\n * @type {string}\n * @since 3.0.0\n */\n this.key = GetFastValue(fileConfig, 'key', false);\n\n var loadKey = this.key;\n\n if (loader.prefix && loader.prefix !== '')\n {\n this.key = loader.prefix + loadKey;\n }\n\n if (!this.type || !this.key)\n {\n throw new Error('Error calling \\'Loader.' + this.type + '\\' invalid key provided.');\n }\n\n /**\n * The URL of the file, not including baseURL.\n *\n * Automatically has Loader.path prepended to it if a string.\n *\n * Can also be a JavaScript Object, such as the results of parsing JSON data.\n *\n * @name Phaser.Loader.File#url\n * @type {object|string}\n * @since 3.0.0\n */\n this.url = GetFastValue(fileConfig, 'url');\n\n if (this.url === undefined)\n {\n this.url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', '');\n }\n else if (typeof this.url === 'string' && this.url.indexOf('blob:') !== 0 && this.url.indexOf('data:') !== 0)\n {\n this.url = loader.path + this.url;\n }\n\n /**\n * The final URL this file will load from, including baseURL and path.\n * Set automatically when the Loader calls 'load' on this file.\n *\n * @name Phaser.Loader.File#src\n * @type {string}\n * @since 3.0.0\n */\n this.src = '';\n\n /**\n * The merged XHRSettings for this file.\n *\n * @name Phaser.Loader.File#xhrSettings\n * @type {Phaser.Types.Loader.XHRSettingsObject}\n * @since 3.0.0\n */\n this.xhrSettings = XHRSettings(GetFastValue(fileConfig, 'responseType', undefined));\n\n if (GetFastValue(fileConfig, 'xhrSettings', false))\n {\n this.xhrSettings = MergeXHRSettings(this.xhrSettings, GetFastValue(fileConfig, 'xhrSettings', {}));\n }\n\n /**\n * The XMLHttpRequest instance (as created by XHR Loader) that is loading this File.\n *\n * @name Phaser.Loader.File#xhrLoader\n * @type {?XMLHttpRequest}\n * @since 3.0.0\n */\n this.xhrLoader = null;\n\n /**\n * The current state of the file. One of the FILE_CONST values.\n *\n * @name Phaser.Loader.File#state\n * @type {integer}\n * @since 3.0.0\n */\n this.state = (typeof(this.url) === 'function') ? CONST.FILE_POPULATED : CONST.FILE_PENDING;\n\n /**\n * The total size of this file.\n * Set by onProgress and only if loading via XHR.\n *\n * @name Phaser.Loader.File#bytesTotal\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.bytesTotal = 0;\n\n /**\n * Updated as the file loads.\n * Only set if loading via XHR.\n *\n * @name Phaser.Loader.File#bytesLoaded\n * @type {number}\n * @default -1\n * @since 3.0.0\n */\n this.bytesLoaded = -1;\n\n /**\n * A percentage value between 0 and 1 indicating how much of this file has loaded.\n * Only set if loading via XHR.\n *\n * @name Phaser.Loader.File#percentComplete\n * @type {number}\n * @default -1\n * @since 3.0.0\n */\n this.percentComplete = -1;\n\n /**\n * For CORs based loading.\n * If this is undefined then the File will check BaseLoader.crossOrigin and use that (if set)\n *\n * @name Phaser.Loader.File#crossOrigin\n * @type {(string|undefined)}\n * @since 3.0.0\n */\n this.crossOrigin = undefined;\n\n /**\n * The processed file data, stored here after the file has loaded.\n *\n * @name Phaser.Loader.File#data\n * @type {*}\n * @since 3.0.0\n */\n this.data = undefined;\n\n /**\n * A config object that can be used by file types to store transitional data.\n *\n * @name Phaser.Loader.File#config\n * @type {*}\n * @since 3.0.0\n */\n this.config = GetFastValue(fileConfig, 'config', {});\n\n /**\n * If this is a multipart file, i.e. an atlas and its json together, then this is a reference\n * to the parent MultiFile. Set and used internally by the Loader or specific file types.\n *\n * @name Phaser.Loader.File#multiFile\n * @type {?Phaser.Loader.MultiFile}\n * @since 3.7.0\n */\n this.multiFile;\n\n /**\n * Does this file have an associated linked file? Such as an image and a normal map.\n * Atlases and Bitmap Fonts use the multiFile, because those files need loading together but aren't\n * actually bound by data, where-as a linkFile is.\n *\n * @name Phaser.Loader.File#linkFile\n * @type {?Phaser.Loader.File}\n * @since 3.7.0\n */\n this.linkFile;\n },\n\n /**\n * Links this File with another, so they depend upon each other for loading and processing.\n *\n * @method Phaser.Loader.File#setLink\n * @since 3.7.0\n *\n * @param {Phaser.Loader.File} fileB - The file to link to this one.\n */\n setLink: function (fileB)\n {\n this.linkFile = fileB;\n\n fileB.linkFile = this;\n },\n\n /**\n * Resets the XHRLoader instance this file is using.\n *\n * @method Phaser.Loader.File#resetXHR\n * @since 3.0.0\n */\n resetXHR: function ()\n {\n if (this.xhrLoader)\n {\n this.xhrLoader.onload = undefined;\n this.xhrLoader.onerror = undefined;\n this.xhrLoader.onprogress = undefined;\n }\n },\n\n /**\n * Called by the Loader, starts the actual file downloading.\n * During the load the methods onLoad, onError and onProgress are called, based on the XHR events.\n * You shouldn't normally call this method directly, it's meant to be invoked by the Loader.\n *\n * @method Phaser.Loader.File#load\n * @since 3.0.0\n */\n load: function ()\n {\n if (this.state === CONST.FILE_POPULATED)\n {\n // Can happen for example in a JSONFile if they've provided a JSON object instead of a URL\n this.loader.nextFile(this, true);\n }\n else\n {\n this.state = CONST.FILE_LOADING;\n\n this.src = GetURL(this, this.loader.baseURL);\n\n if (this.src.indexOf('data:') === 0)\n {\n console.warn('Local data URIs are not supported: ' + this.key);\n }\n else\n {\n // The creation of this XHRLoader starts the load process going.\n // It will automatically call the following, based on the load outcome:\n //\n // xhr.onload = this.onLoad\n // xhr.onerror = this.onError\n // xhr.onprogress = this.onProgress\n\n this.xhrLoader = XHRLoader(this, this.loader.xhr);\n }\n }\n },\n\n /**\n * Called when the file finishes loading, is sent a DOM ProgressEvent.\n *\n * @method Phaser.Loader.File#onLoad\n * @since 3.0.0\n *\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this load.\n */\n onLoad: function (xhr, event)\n {\n var localFileOk = ((xhr.responseURL && xhr.responseURL.indexOf('file://') === 0 && event.target.status === 0));\n\n var success = !(event.target && event.target.status !== 200) || localFileOk;\n\n // Handle HTTP status codes of 4xx and 5xx as errors, even if xhr.onerror was not called.\n if (xhr.readyState === 4 && xhr.status >= 400 && xhr.status <= 599)\n {\n success = false;\n }\n\n this.state = CONST.FILE_LOADED;\n\n this.resetXHR();\n\n this.loader.nextFile(this, success);\n },\n\n /**\n * Called if the file errors while loading, is sent a DOM ProgressEvent.\n *\n * @method Phaser.Loader.File#onError\n * @since 3.0.0\n *\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this error.\n */\n onError: function ()\n {\n this.resetXHR();\n\n this.loader.nextFile(this, false);\n },\n\n /**\n * Called during the file load progress. Is sent a DOM ProgressEvent.\n *\n * @method Phaser.Loader.File#onProgress\n * @fires Phaser.Loader.Events#FILE_PROGRESS\n * @since 3.0.0\n *\n * @param {ProgressEvent} event - The DOM ProgressEvent.\n */\n onProgress: function (event)\n {\n if (event.lengthComputable)\n {\n this.bytesLoaded = event.loaded;\n this.bytesTotal = event.total;\n\n this.percentComplete = Math.min((this.bytesLoaded / this.bytesTotal), 1);\n\n this.loader.emit(Events.FILE_PROGRESS, this, this.percentComplete);\n }\n },\n\n /**\n * Usually overridden by the FileTypes and is called by Loader.nextFile.\n * This method controls what extra work this File does with its loaded data, for example a JSON file will parse itself during this stage.\n *\n * @method Phaser.Loader.File#onProcess\n * @since 3.0.0\n */\n onProcess: function ()\n {\n this.state = CONST.FILE_PROCESSING;\n\n this.onProcessComplete();\n },\n\n /**\n * Called when the File has completed processing.\n * Checks on the state of its multifile, if set.\n *\n * @method Phaser.Loader.File#onProcessComplete\n * @since 3.7.0\n */\n onProcessComplete: function ()\n {\n this.state = CONST.FILE_COMPLETE;\n\n if (this.multiFile)\n {\n this.multiFile.onFileComplete(this);\n }\n\n this.loader.fileProcessComplete(this);\n },\n\n /**\n * Called when the File has completed processing but it generated an error.\n * Checks on the state of its multifile, if set.\n *\n * @method Phaser.Loader.File#onProcessError\n * @since 3.7.0\n */\n onProcessError: function ()\n {\n this.state = CONST.FILE_ERRORED;\n\n if (this.multiFile)\n {\n this.multiFile.onFileFailed(this);\n }\n\n this.loader.fileProcessComplete(this);\n },\n\n /**\n * Checks if a key matching the one used by this file exists in the target Cache or not.\n * This is called automatically by the LoaderPlugin to decide if the file can be safely\n * loaded or will conflict.\n *\n * @method Phaser.Loader.File#hasCacheConflict\n * @since 3.7.0\n *\n * @return {boolean} `true` if adding this file will cause a conflict, otherwise `false`.\n */\n hasCacheConflict: function ()\n {\n return (this.cache && this.cache.exists(this.key));\n },\n\n /**\n * Adds this file to its target cache upon successful loading and processing.\n * This method is often overridden by specific file types.\n *\n * @method Phaser.Loader.File#addToCache\n * @since 3.7.0\n */\n addToCache: function ()\n {\n if (this.cache)\n {\n this.cache.add(this.key, this.data);\n }\n\n this.pendingDestroy();\n },\n\n /**\n * Called once the file has been added to its cache and is now ready for deletion from the Loader.\n * It will emit a `filecomplete` event from the LoaderPlugin.\n *\n * @method Phaser.Loader.File#pendingDestroy\n * @fires Phaser.Loader.Events#FILE_COMPLETE\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\n * @since 3.7.0\n */\n pendingDestroy: function (data)\n {\n if (data === undefined) { data = this.data; }\n\n var key = this.key;\n var type = this.type;\n\n this.loader.emit(Events.FILE_COMPLETE, key, type, data);\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type, data);\n\n this.loader.flagForRemoval(this);\n },\n\n /**\n * Destroy this File and any references it holds.\n *\n * @method Phaser.Loader.File#destroy\n * @since 3.7.0\n */\n destroy: function ()\n {\n this.loader = null;\n this.cache = null;\n this.xhrSettings = null;\n this.multiFile = null;\n this.linkFile = null;\n this.data = null;\n }\n\n});\n\n/**\n * Static method for creating object URL using URL API and setting it as image 'src' attribute.\n * If URL API is not supported (usually on old browsers) it falls back to creating Base64 encoded url using FileReader.\n *\n * @method Phaser.Loader.File.createObjectURL\n * @static\n * @since 3.7.0\n *\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be set to object URL.\n * @param {Blob} blob - A Blob object to create an object URL for.\n * @param {string} defaultType - Default mime type used if blob type is not available.\n */\nFile.createObjectURL = function (image, blob, defaultType)\n{\n if (typeof URL === 'function')\n {\n image.src = URL.createObjectURL(blob);\n }\n else\n {\n var reader = new FileReader();\n\n reader.onload = function ()\n {\n image.removeAttribute('crossOrigin');\n image.src = 'data:' + (blob.type || defaultType) + ';base64,' + reader.result.split(',')[1];\n };\n\n reader.onerror = image.onerror;\n\n reader.readAsDataURL(blob);\n }\n};\n\n/**\n * Static method for releasing an existing object URL which was previously created\n * by calling {@link File#createObjectURL} method.\n *\n * @method Phaser.Loader.File.revokeObjectURL\n * @static\n * @since 3.7.0\n *\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be revoked.\n */\nFile.revokeObjectURL = function (image)\n{\n if (typeof URL === 'function')\n {\n URL.revokeObjectURL(image.src);\n }\n};\n\nmodule.exports = File;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar types = {};\n\n/**\n * @namespace Phaser.Loader.FileTypesManager\n */\n\nvar FileTypesManager = {\n\n /**\n * Static method called when a LoaderPlugin is created.\n * \n * Loops through the local types object and injects all of them as\n * properties into the LoaderPlugin instance.\n *\n * @method Phaser.Loader.FileTypesManager.install\n * @since 3.0.0\n * \n * @param {Phaser.Loader.LoaderPlugin} loader - The LoaderPlugin to install the types into.\n */\n install: function (loader)\n {\n for (var key in types)\n {\n loader[key] = types[key];\n }\n },\n\n /**\n * Static method called directly by the File Types.\n * \n * The key is a reference to the function used to load the files via the Loader, i.e. `image`.\n *\n * @method Phaser.Loader.FileTypesManager.register\n * @since 3.0.0\n * \n * @param {string} key - The key that will be used as the method name in the LoaderPlugin.\n * @param {function} factoryFunction - The function that will be called when LoaderPlugin.key is invoked.\n */\n register: function (key, factoryFunction)\n {\n types[key] = factoryFunction;\n },\n\n /**\n * Removed all associated file types.\n *\n * @method Phaser.Loader.FileTypesManager.destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n types = {};\n }\n\n};\n\nmodule.exports = FileTypesManager;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Given a File and a baseURL value this returns the URL the File will use to download from.\n *\n * @function Phaser.Loader.GetURL\n * @since 3.0.0\n *\n * @param {Phaser.Loader.File} file - The File object.\n * @param {string} baseURL - A default base URL.\n *\n * @return {string} The URL the File will use.\n */\nvar GetURL = function (file, baseURL)\n{\n if (!file.url)\n {\n return false;\n }\n\n if (file.url.match(/^(?:blob:|data:|http:\\/\\/|https:\\/\\/|\\/\\/)/))\n {\n return file.url;\n }\n else\n {\n return baseURL + file.url;\n }\n};\n\nmodule.exports = GetURL;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Extend = require('../utils/object/Extend');\nvar XHRSettings = require('./XHRSettings');\n\n/**\n * Takes two XHRSettings Objects and creates a new XHRSettings object from them.\n *\n * The new object is seeded by the values given in the global settings, but any setting in\n * the local object overrides the global ones.\n *\n * @function Phaser.Loader.MergeXHRSettings\n * @since 3.0.0\n *\n * @param {Phaser.Types.Loader.XHRSettingsObject} global - The global XHRSettings object.\n * @param {Phaser.Types.Loader.XHRSettingsObject} local - The local XHRSettings object.\n *\n * @return {Phaser.Types.Loader.XHRSettingsObject} A newly formed XHRSettings object.\n */\nvar MergeXHRSettings = function (global, local)\n{\n var output = (global === undefined) ? XHRSettings() : Extend({}, global);\n\n if (local)\n {\n for (var setting in local)\n {\n if (local[setting] !== undefined)\n {\n output[setting] = local[setting];\n }\n }\n }\n\n return output;\n};\n\nmodule.exports = MergeXHRSettings;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\n\n/**\n * @classdesc\n * A MultiFile is a special kind of parent that contains two, or more, Files as children and looks after\n * the loading and processing of them all. It is commonly extended and used as a base class for file types such as AtlasJSON or BitmapFont.\n * \n * You shouldn't create an instance of a MultiFile directly, but should extend it with your own class, setting a custom type and processing methods.\n *\n * @class MultiFile\n * @memberof Phaser.Loader\n * @constructor\n * @since 3.7.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\n * @param {string} type - The file type string for sorting within the Loader.\n * @param {string} key - The key of the file within the loader.\n * @param {Phaser.Loader.File[]} files - An array of Files that make-up this MultiFile.\n */\nvar MultiFile = new Class({\n\n initialize:\n\n function MultiFile (loader, type, key, files)\n {\n /**\n * A reference to the Loader that is going to load this file.\n *\n * @name Phaser.Loader.MultiFile#loader\n * @type {Phaser.Loader.LoaderPlugin}\n * @since 3.7.0\n */\n this.loader = loader;\n\n /**\n * The file type string for sorting within the Loader.\n *\n * @name Phaser.Loader.MultiFile#type\n * @type {string}\n * @since 3.7.0\n */\n this.type = type;\n\n /**\n * Unique cache key (unique within its file type)\n *\n * @name Phaser.Loader.MultiFile#key\n * @type {string}\n * @since 3.7.0\n */\n this.key = key;\n\n /**\n * The current index being used by multi-file loaders to avoid key clashes.\n *\n * @name Phaser.Loader.MultiFile#multiKeyIndex\n * @type {integer}\n * @private\n * @since 3.20.0\n */\n this.multiKeyIndex = loader.multiKeyIndex++;\n\n /**\n * Array of files that make up this MultiFile.\n *\n * @name Phaser.Loader.MultiFile#files\n * @type {Phaser.Loader.File[]}\n * @since 3.7.0\n */\n this.files = files;\n\n /**\n * The completion status of this MultiFile.\n *\n * @name Phaser.Loader.MultiFile#complete\n * @type {boolean}\n * @default false\n * @since 3.7.0\n */\n this.complete = false;\n\n /**\n * The number of files to load.\n *\n * @name Phaser.Loader.MultiFile#pending\n * @type {integer}\n * @since 3.7.0\n */\n\n this.pending = files.length;\n\n /**\n * The number of files that failed to load.\n *\n * @name Phaser.Loader.MultiFile#failed\n * @type {integer}\n * @default 0\n * @since 3.7.0\n */\n this.failed = 0;\n\n /**\n * A storage container for transient data that the loading files need.\n *\n * @name Phaser.Loader.MultiFile#config\n * @type {any}\n * @since 3.7.0\n */\n this.config = {};\n\n /**\n * A reference to the Loaders baseURL at the time this MultiFile was created.\n * Used to populate child-files.\n *\n * @name Phaser.Loader.MultiFile#baseURL\n * @type {string}\n * @since 3.20.0\n */\n this.baseURL = loader.baseURL;\n\n /**\n * A reference to the Loaders path at the time this MultiFile was created.\n * Used to populate child-files.\n *\n * @name Phaser.Loader.MultiFile#path\n * @type {string}\n * @since 3.20.0\n */\n this.path = loader.path;\n\n /**\n * A reference to the Loaders prefix at the time this MultiFile was created.\n * Used to populate child-files.\n *\n * @name Phaser.Loader.MultiFile#prefix\n * @type {string}\n * @since 3.20.0\n */\n this.prefix = loader.prefix;\n\n // Link the files\n for (var i = 0; i < files.length; i++)\n {\n files[i].multiFile = this;\n }\n },\n\n /**\n * Checks if this MultiFile is ready to process its children or not.\n *\n * @method Phaser.Loader.MultiFile#isReadyToProcess\n * @since 3.7.0\n *\n * @return {boolean} `true` if all children of this MultiFile have loaded, otherwise `false`.\n */\n isReadyToProcess: function ()\n {\n return (this.pending === 0 && this.failed === 0 && !this.complete);\n },\n\n /**\n * Adds another child to this MultiFile, increases the pending count and resets the completion status.\n *\n * @method Phaser.Loader.MultiFile#addToMultiFile\n * @since 3.7.0\n *\n * @param {Phaser.Loader.File} files - The File to add to this MultiFile.\n *\n * @return {Phaser.Loader.MultiFile} This MultiFile instance.\n */\n addToMultiFile: function (file)\n {\n this.files.push(file);\n\n file.multiFile = this;\n\n this.pending++;\n\n this.complete = false;\n\n return this;\n },\n\n /**\n * Called by each File when it finishes loading.\n *\n * @method Phaser.Loader.MultiFile#onFileComplete\n * @since 3.7.0\n *\n * @param {Phaser.Loader.File} file - The File that has completed processing.\n */\n onFileComplete: function (file)\n {\n var index = this.files.indexOf(file);\n\n if (index !== -1)\n {\n this.pending--;\n }\n },\n\n /**\n * Called by each File that fails to load.\n *\n * @method Phaser.Loader.MultiFile#onFileFailed\n * @since 3.7.0\n *\n * @param {Phaser.Loader.File} file - The File that has failed to load.\n */\n onFileFailed: function (file)\n {\n var index = this.files.indexOf(file);\n\n if (index !== -1)\n {\n this.failed++;\n }\n }\n\n});\n\nmodule.exports = MultiFile;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar MergeXHRSettings = require('./MergeXHRSettings');\n\n/**\n * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings\n * and starts the download of it. It uses the Files own XHRSettings and merges them\n * with the global XHRSettings object to set the xhr values before download.\n *\n * @function Phaser.Loader.XHRLoader\n * @since 3.0.0\n *\n * @param {Phaser.Loader.File} file - The File to download.\n * @param {Phaser.Types.Loader.XHRSettingsObject} globalXHRSettings - The global XHRSettings object.\n *\n * @return {XMLHttpRequest} The XHR object.\n */\nvar XHRLoader = function (file, globalXHRSettings)\n{\n var config = MergeXHRSettings(globalXHRSettings, file.xhrSettings);\n\n var xhr = new XMLHttpRequest();\n\n xhr.open('GET', file.src, config.async, config.user, config.password);\n\n xhr.responseType = file.xhrSettings.responseType;\n xhr.timeout = config.timeout;\n\n if (config.headers)\n {\n for (var key in config.headers)\n {\n xhr.setRequestHeader(key, config.headers[key]);\n }\n }\n\n if (config.header && config.headerValue)\n {\n xhr.setRequestHeader(config.header, config.headerValue);\n }\n\n if (config.requestedWith)\n {\n xhr.setRequestHeader('X-Requested-With', config.requestedWith);\n }\n\n if (config.overrideMimeType)\n {\n xhr.overrideMimeType(config.overrideMimeType);\n }\n\n if (config.withCredentials)\n {\n xhr.withCredentials = true;\n }\n\n // After a successful request, the xhr.response property will contain the requested data as a DOMString, ArrayBuffer, Blob, or Document (depending on what was set for responseType.)\n\n xhr.onload = file.onLoad.bind(file, xhr);\n xhr.onerror = file.onError.bind(file, xhr);\n xhr.onprogress = file.onProgress.bind(file);\n\n // This is the only standard method, the ones above are browser additions (maybe not universal?)\n // xhr.onreadystatechange\n\n xhr.send();\n\n return xhr;\n};\n\nmodule.exports = XHRLoader;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Creates an XHRSettings Object with default values.\n *\n * @function Phaser.Loader.XHRSettings\n * @since 3.0.0\n *\n * @param {XMLHttpRequestResponseType} [responseType=''] - The responseType, such as 'text'.\n * @param {boolean} [async=true] - Should the XHR request use async or not?\n * @param {string} [user=''] - Optional username for the XHR request.\n * @param {string} [password=''] - Optional password for the XHR request.\n * @param {integer} [timeout=0] - Optional XHR timeout value.\n * @param {boolean} [withCredentials=false] - Optional XHR withCredentials value.\n *\n * @return {Phaser.Types.Loader.XHRSettingsObject} The XHRSettings object as used by the Loader.\n */\nvar XHRSettings = function (responseType, async, user, password, timeout, withCredentials)\n{\n if (responseType === undefined) { responseType = ''; }\n if (async === undefined) { async = true; }\n if (user === undefined) { user = ''; }\n if (password === undefined) { password = ''; }\n if (timeout === undefined) { timeout = 0; }\n if (withCredentials === undefined) { withCredentials = false; }\n\n // Before sending a request, set the xhr.responseType to \"text\",\n // \"arraybuffer\", \"blob\", or \"document\", depending on your data needs.\n // Note, setting xhr.responseType = '' (or omitting) will default the response to \"text\".\n\n return {\n\n // Ignored by the Loader, only used by File.\n responseType: responseType,\n\n async: async,\n\n // credentials\n user: user,\n password: password,\n\n // timeout in ms (0 = no timeout)\n timeout: timeout,\n\n // setRequestHeader\n headers: undefined,\n header: undefined,\n headerValue: undefined,\n requestedWith: false,\n\n // overrideMimeType\n overrideMimeType: undefined,\n\n // withCredentials\n withCredentials: withCredentials\n\n };\n};\n\nmodule.exports = XHRSettings;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar FILE_CONST = {\n\n /**\n * The Loader is idle.\n * \n * @name Phaser.Loader.LOADER_IDLE\n * @type {integer}\n * @since 3.0.0\n */\n LOADER_IDLE: 0,\n\n /**\n * The Loader is actively loading.\n * \n * @name Phaser.Loader.LOADER_LOADING\n * @type {integer}\n * @since 3.0.0\n */\n LOADER_LOADING: 1,\n\n /**\n * The Loader is processing files is has loaded.\n * \n * @name Phaser.Loader.LOADER_PROCESSING\n * @type {integer}\n * @since 3.0.0\n */\n LOADER_PROCESSING: 2,\n\n /**\n * The Loader has completed loading and processing.\n * \n * @name Phaser.Loader.LOADER_COMPLETE\n * @type {integer}\n * @since 3.0.0\n */\n LOADER_COMPLETE: 3,\n\n /**\n * The Loader is shutting down.\n * \n * @name Phaser.Loader.LOADER_SHUTDOWN\n * @type {integer}\n * @since 3.0.0\n */\n LOADER_SHUTDOWN: 4,\n\n /**\n * The Loader has been destroyed.\n * \n * @name Phaser.Loader.LOADER_DESTROYED\n * @type {integer}\n * @since 3.0.0\n */\n LOADER_DESTROYED: 5,\n\n /**\n * File is in the load queue but not yet started\n * \n * @name Phaser.Loader.FILE_PENDING\n * @type {integer}\n * @since 3.0.0\n */\n FILE_PENDING: 10,\n\n /**\n * File has been started to load by the loader (onLoad called)\n * \n * @name Phaser.Loader.FILE_LOADING\n * @type {integer}\n * @since 3.0.0\n */\n FILE_LOADING: 11,\n\n /**\n * File has loaded successfully, awaiting processing \n * \n * @name Phaser.Loader.FILE_LOADED\n * @type {integer}\n * @since 3.0.0\n */\n FILE_LOADED: 12,\n\n /**\n * File failed to load\n * \n * @name Phaser.Loader.FILE_FAILED\n * @type {integer}\n * @since 3.0.0\n */\n FILE_FAILED: 13,\n\n /**\n * File is being processed (onProcess callback)\n * \n * @name Phaser.Loader.FILE_PROCESSING\n * @type {integer}\n * @since 3.0.0\n */\n FILE_PROCESSING: 14,\n\n /**\n * The File has errored somehow during processing.\n * \n * @name Phaser.Loader.FILE_ERRORED\n * @type {integer}\n * @since 3.0.0\n */\n FILE_ERRORED: 16,\n\n /**\n * File has finished processing.\n * \n * @name Phaser.Loader.FILE_COMPLETE\n * @type {integer}\n * @since 3.0.0\n */\n FILE_COMPLETE: 17,\n\n /**\n * File has been destroyed\n * \n * @name Phaser.Loader.FILE_DESTROYED\n * @type {integer}\n * @since 3.0.0\n */\n FILE_DESTROYED: 18,\n\n /**\n * File was populated from local data and doesn't need an HTTP request\n * \n * @name Phaser.Loader.FILE_POPULATED\n * @type {integer}\n * @since 3.0.0\n */\n FILE_POPULATED: 19\n\n};\n\nmodule.exports = FILE_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Loader Plugin Add File Event.\n * \n * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue.\n * \n * Listen to it from a Scene using: `this.load.on('addfile', listener)`.\n * \n * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them.\n *\n * @event Phaser.Loader.Events#ADD\n * @since 3.0.0\n * \n * @param {string} key - The unique key of the file that was added to the Loader.\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} string of the file that was added to the Loader, i.e. `image`.\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\n * @param {Phaser.Loader.File} file - A reference to the File which was added to the Loader.\n */\nmodule.exports = 'addfile';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Loader Plugin Complete Event.\n * \n * This event is dispatched when the Loader has fully processed everything in the load queue.\n * By this point every loaded file will now be in its associated cache and ready for use.\n * \n * Listen to it from a Scene using: `this.load.on('complete', listener)`.\n *\n * @event Phaser.Loader.Events#COMPLETE\n * @since 3.0.0\n * \n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\n * @param {integer} totalComplete - The total number of files that successfully loaded.\n * @param {integer} totalFailed - The total number of files that failed to load.\n */\nmodule.exports = 'complete';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The File Load Complete Event.\n * \n * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.\n * \n * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`.\n * \n * You can also listen for the completion of a specific file. See the [FILE_KEY_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_KEY_COMPLETE} event.\n *\n * @event Phaser.Loader.Events#FILE_COMPLETE\n * @since 3.0.0\n * \n * @param {string} key - The key of the file that just loaded and finished processing.\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\n * @param {any} data - The raw data the file contained.\n */\nmodule.exports = 'filecomplete';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The File Load Complete Event.\n * \n * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.\n * \n * It uses a special dynamic event name constructed from the key and type of the file.\n * \n * For example, if you have loaded an `image` with a key of `monster`, you can listen for it\n * using the following:\n *\n * ```javascript\n * this.load.on('filecomplete-image-monster', function (key, type, data) {\n * // Your handler code\n * });\n * ```\n *\n * Or, if you have loaded a texture `atlas` with a key of `Level1`:\n * \n * ```javascript\n * this.load.on('filecomplete-atlas-Level1', function (key, type, data) {\n * // Your handler code\n * });\n * ```\n * \n * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`:\n * \n * ```javascript\n * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) {\n * // Your handler code\n * });\n * ```\n * \n * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event.\n *\n * @event Phaser.Loader.Events#FILE_KEY_COMPLETE\n * @since 3.0.0\n * \n * @param {string} key - The key of the file that just loaded and finished processing.\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\n * @param {any} data - The raw data the file contained.\n */\nmodule.exports = 'filecomplete-';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The File Load Error Event.\n * \n * This event is dispatched by the Loader Plugin when a file fails to load.\n * \n * Listen to it from a Scene using: `this.load.on('loaderror', listener)`.\n *\n * @event Phaser.Loader.Events#FILE_LOAD_ERROR\n * @since 3.0.0\n * \n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\n */\nmodule.exports = 'loaderror';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The File Load Event.\n * \n * This event is dispatched by the Loader Plugin when a file finishes loading,\n * but _before_ it is processed and added to the internal Phaser caches.\n * \n * Listen to it from a Scene using: `this.load.on('load', listener)`.\n *\n * @event Phaser.Loader.Events#FILE_LOAD\n * @since 3.0.0\n * \n * @param {Phaser.Loader.File} file - A reference to the File which just finished loading.\n */\nmodule.exports = 'load';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The File Load Progress Event.\n * \n * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and\n * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen.\n * \n * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`.\n *\n * @event Phaser.Loader.Events#FILE_PROGRESS\n * @since 3.0.0\n * \n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\n * @param {number} percentComplete - A value between 0 and 1 indicating how 'complete' this file is.\n */\nmodule.exports = 'fileprogress';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Loader Plugin Post Process Event.\n * \n * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue.\n * It is dispatched before the internal lists are cleared and each File is destroyed.\n * \n * Use this hook to perform any last minute processing of files that can only happen once the\n * Loader has completed, but prior to it emitting the `complete` event.\n * \n * Listen to it from a Scene using: `this.load.on('postprocess', listener)`.\n *\n * @event Phaser.Loader.Events#POST_PROCESS\n * @since 3.0.0\n * \n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\n */\nmodule.exports = 'postprocess';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Loader Plugin Progress Event.\n * \n * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading.\n * \n * Listen to it from a Scene using: `this.load.on('progress', listener)`.\n *\n * @event Phaser.Loader.Events#PROGRESS\n * @since 3.0.0\n * \n * @param {number} progress - The current progress of the load. A value between 0 and 1.\n */\nmodule.exports = 'progress';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Loader Plugin Start Event.\n * \n * This event is dispatched when the Loader starts running. At this point load progress is zero.\n * \n * This event is dispatched even if there aren't any files in the load queue.\n * \n * Listen to it from a Scene using: `this.load.on('start', listener)`.\n *\n * @event Phaser.Loader.Events#START\n * @since 3.0.0\n * \n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\n */\nmodule.exports = 'start';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Loader.Events\n */\n\nmodule.exports = {\n\n ADD: require('./ADD_EVENT'),\n COMPLETE: require('./COMPLETE_EVENT'),\n FILE_COMPLETE: require('./FILE_COMPLETE_EVENT'),\n FILE_KEY_COMPLETE: require('./FILE_KEY_COMPLETE_EVENT'),\n FILE_LOAD_ERROR: require('./FILE_LOAD_ERROR_EVENT'),\n FILE_LOAD: require('./FILE_LOAD_EVENT'),\n FILE_PROGRESS: require('./FILE_PROGRESS_EVENT'),\n POST_PROCESS: require('./POST_PROCESS_EVENT'),\n PROGRESS: require('./PROGRESS_EVENT'),\n START: require('./START_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar CONST = require('../const');\nvar File = require('../File');\nvar FileTypesManager = require('../FileTypesManager');\nvar GetFastValue = require('../../utils/object/GetFastValue');\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\n\n/**\n * @classdesc\n * A single Image File suitable for loading by the Loader.\n *\n * These are created when you use the Phaser.Loader.LoaderPlugin#image method and are not typically created directly.\n *\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#image.\n *\n * @class ImageFile\n * @extends Phaser.Loader.File\n * @memberof Phaser.Loader.FileTypes\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig)} key - The key to use for this file, or a file configuration object.\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\n * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. Only provided for, and used by, Sprite Sheets.\n */\nvar ImageFile = new Class({\n\n Extends: File,\n\n initialize:\n\n function ImageFile (loader, key, url, xhrSettings, frameConfig)\n {\n var extension = 'png';\n var normalMapURL;\n\n if (IsPlainObject(key))\n {\n var config = key;\n\n key = GetFastValue(config, 'key');\n url = GetFastValue(config, 'url');\n normalMapURL = GetFastValue(config, 'normalMap');\n xhrSettings = GetFastValue(config, 'xhrSettings');\n extension = GetFastValue(config, 'extension', extension);\n frameConfig = GetFastValue(config, 'frameConfig');\n }\n\n if (Array.isArray(url))\n {\n normalMapURL = url[1];\n url = url[0];\n }\n\n var fileConfig = {\n type: 'image',\n cache: loader.textureManager,\n extension: extension,\n responseType: 'blob',\n key: key,\n url: url,\n xhrSettings: xhrSettings,\n config: frameConfig\n };\n\n File.call(this, loader, fileConfig);\n\n // Do we have a normal map to load as well?\n if (normalMapURL)\n {\n var normalMap = new ImageFile(loader, this.key, normalMapURL, xhrSettings, frameConfig);\n\n normalMap.type = 'normalMap';\n\n this.setLink(normalMap);\n\n loader.addFile(normalMap);\n }\n },\n\n /**\n * Called automatically by Loader.nextFile.\n * This method controls what extra work this File does with its loaded data.\n *\n * @method Phaser.Loader.FileTypes.ImageFile#onProcess\n * @since 3.7.0\n */\n onProcess: function ()\n {\n this.state = CONST.FILE_PROCESSING;\n\n this.data = new Image();\n\n this.data.crossOrigin = this.crossOrigin;\n\n var _this = this;\n\n this.data.onload = function ()\n {\n File.revokeObjectURL(_this.data);\n\n _this.onProcessComplete();\n };\n\n this.data.onerror = function ()\n {\n File.revokeObjectURL(_this.data);\n\n _this.onProcessError();\n };\n\n File.createObjectURL(this.data, this.xhrLoader.response, 'image/png');\n },\n\n /**\n * Adds this file to its target cache upon successful loading and processing.\n *\n * @method Phaser.Loader.FileTypes.ImageFile#addToCache\n * @since 3.7.0\n */\n addToCache: function ()\n {\n var texture;\n var linkFile = this.linkFile;\n\n if (linkFile && linkFile.state === CONST.FILE_COMPLETE)\n {\n if (this.type === 'image')\n {\n texture = this.cache.addImage(this.key, this.data, linkFile.data);\n }\n else\n {\n texture = this.cache.addImage(linkFile.key, linkFile.data, this.data);\n }\n\n this.pendingDestroy(texture);\n\n linkFile.pendingDestroy(texture);\n }\n else if (!linkFile)\n {\n texture = this.cache.addImage(this.key, this.data);\n\n this.pendingDestroy(texture);\n }\n }\n\n});\n\n/**\n * Adds an Image, or array of Images, to the current load queue.\n *\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\n *\n * ```javascript\n * function preload ()\n * {\n * this.load.image('logo', 'images/phaserLogo.png');\n * }\n * ```\n *\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\n * loaded.\n *\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\n * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback\n * of animated gifs to Canvas elements.\n *\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\n * then remove it from the Texture Manager first, before loading a new one.\n *\n * Instead of passing arguments you can pass a configuration object, such as:\n *\n * ```javascript\n * this.load.image({\n * key: 'logo',\n * url: 'images/AtariLogo.png'\n * });\n * ```\n *\n * See the documentation for `Phaser.Types.Loader.FileTypes.ImageFileConfig` for more details.\n *\n * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:\n *\n * ```javascript\n * this.load.image('logo', 'images/AtariLogo.png');\n * // and later in your game ...\n * this.add.image(x, y, 'logo');\n * ```\n *\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\n * this is what you would use to retrieve the image from the Texture Manager.\n *\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\n *\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\n *\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\n *\n * ```javascript\n * this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]);\n * ```\n *\n * Or, if you are using a config object use the `normalMap` property:\n *\n * ```javascript\n * this.load.image({\n * key: 'logo',\n * url: 'images/AtariLogo.png',\n * normalMap: 'images/AtariLogo-n.png'\n * });\n * ```\n *\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\n * Normal maps are a WebGL only feature.\n *\n * Note: The ability to load this type of file will only be available if the Image File type has been built into Phaser.\n * It is available in the default build but can be excluded from custom builds.\n *\n * @method Phaser.Loader.LoaderPlugin#image\n * @fires Phaser.Loader.LoaderPlugin#ADD\n * @since 3.0.0\n *\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig|Phaser.Types.Loader.FileTypes.ImageFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\n *\n * @return {this} The Loader instance.\n */\nFileTypesManager.register('image', function (key, url, xhrSettings)\n{\n if (Array.isArray(key))\n {\n for (var i = 0; i < key.length; i++)\n {\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\n this.addFile(new ImageFile(this, key[i]));\n }\n }\n else\n {\n this.addFile(new ImageFile(this, key, url, xhrSettings));\n }\n\n return this;\n});\n\nmodule.exports = ImageFile;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar CONST = require('../const');\nvar File = require('../File');\nvar FileTypesManager = require('../FileTypesManager');\nvar GetFastValue = require('../../utils/object/GetFastValue');\nvar GetValue = require('../../utils/object/GetValue');\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\n\n/**\n * @classdesc\n * A single JSON File suitable for loading by the Loader.\n *\n * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly.\n *\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json.\n *\n * @class JSONFile\n * @extends Phaser.Loader.File\n * @memberof Phaser.Loader.FileTypes\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object.\n * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\n */\nvar JSONFile = new Class({\n\n Extends: File,\n\n initialize:\n\n // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object\n // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing\n\n function JSONFile (loader, key, url, xhrSettings, dataKey)\n {\n var extension = 'json';\n\n if (IsPlainObject(key))\n {\n var config = key;\n\n key = GetFastValue(config, 'key');\n url = GetFastValue(config, 'url');\n xhrSettings = GetFastValue(config, 'xhrSettings');\n extension = GetFastValue(config, 'extension', extension);\n dataKey = GetFastValue(config, 'dataKey', dataKey);\n }\n\n var fileConfig = {\n type: 'json',\n cache: loader.cacheManager.json,\n extension: extension,\n responseType: 'text',\n key: key,\n url: url,\n xhrSettings: xhrSettings,\n config: dataKey\n };\n\n File.call(this, loader, fileConfig);\n\n if (IsPlainObject(url))\n {\n // Object provided instead of a URL, so no need to actually load it (populate data with value)\n if (dataKey)\n {\n this.data = GetValue(url, dataKey);\n }\n else\n {\n this.data = url;\n }\n\n this.state = CONST.FILE_POPULATED;\n }\n },\n\n /**\n * Called automatically by Loader.nextFile.\n * This method controls what extra work this File does with its loaded data.\n *\n * @method Phaser.Loader.FileTypes.JSONFile#onProcess\n * @since 3.7.0\n */\n onProcess: function ()\n {\n if (this.state !== CONST.FILE_POPULATED)\n {\n this.state = CONST.FILE_PROCESSING;\n\n var json = JSON.parse(this.xhrLoader.responseText);\n\n var key = this.config;\n\n if (typeof key === 'string')\n {\n this.data = GetValue(json, key, json);\n }\n else\n {\n this.data = json;\n }\n }\n\n this.onProcessComplete();\n }\n\n});\n\n/**\n * Adds a JSON file, or array of JSON files, to the current load queue.\n *\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\n *\n * ```javascript\n * function preload ()\n * {\n * this.load.json('wavedata', 'files/AlienWaveData.json');\n * }\n * ```\n *\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\n * loaded.\n *\n * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.\n * The key should be unique both in terms of files being loaded and files already present in the JSON Cache.\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\n * then remove it from the JSON Cache first, before loading a new one.\n *\n * Instead of passing arguments you can pass a configuration object, such as:\n *\n * ```javascript\n * this.load.json({\n * key: 'wavedata',\n * url: 'files/AlienWaveData.json'\n * });\n * ```\n *\n * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details.\n *\n * Once the file has finished loading you can access it from its Cache using its key:\n *\n * ```javascript\n * this.load.json('wavedata', 'files/AlienWaveData.json');\n * // and later in your game ...\n * var data = this.cache.json.get('wavedata');\n * ```\n *\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\n * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and\n * this is what you would use to retrieve the text from the JSON Cache.\n *\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\n *\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"data\"\n * and no URL is given then the Loader will set the URL to be \"data.json\". It will always add `.json` as the extension, although\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\n *\n * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache,\n * rather than the whole file. For example, if your JSON data had a structure like this:\n *\n * ```json\n * {\n * \"level1\": {\n * \"baddies\": {\n * \"aliens\": {},\n * \"boss\": {}\n * }\n * },\n * \"level2\": {},\n * \"level3\": {}\n * }\n * ```\n *\n * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`.\n *\n * Note: The ability to load this type of file will only be available if the JSON File type has been built into Phaser.\n * It is available in the default build but can be excluded from custom builds.\n *\n * @method Phaser.Loader.LoaderPlugin#json\n * @fires Phaser.Loader.LoaderPlugin#ADD\n * @since 3.0.0\n *\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\n * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\n *\n * @return {this} The Loader instance.\n */\nFileTypesManager.register('json', function (key, url, dataKey, xhrSettings)\n{\n if (Array.isArray(key))\n {\n for (var i = 0; i < key.length; i++)\n {\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\n this.addFile(new JSONFile(this, key[i]));\n }\n }\n else\n {\n this.addFile(new JSONFile(this, key, url, xhrSettings, dataKey));\n }\n\n return this;\n});\n\nmodule.exports = JSONFile;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar CONST = require('../const');\nvar File = require('../File');\nvar FileTypesManager = require('../FileTypesManager');\nvar GetFastValue = require('../../utils/object/GetFastValue');\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\n\n/**\n * @classdesc\n * A single Text File suitable for loading by the Loader.\n *\n * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly.\n *\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text.\n *\n * @class TextFile\n * @extends Phaser.Loader.File\n * @memberof Phaser.Loader.FileTypes\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig)} key - The key to use for this file, or a file configuration object.\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\n */\nvar TextFile = new Class({\n\n Extends: File,\n\n initialize:\n\n function TextFile (loader, key, url, xhrSettings)\n {\n var extension = 'txt';\n\n if (IsPlainObject(key))\n {\n var config = key;\n\n key = GetFastValue(config, 'key');\n url = GetFastValue(config, 'url');\n xhrSettings = GetFastValue(config, 'xhrSettings');\n extension = GetFastValue(config, 'extension', extension);\n }\n\n var fileConfig = {\n type: 'text',\n cache: loader.cacheManager.text,\n extension: extension,\n responseType: 'text',\n key: key,\n url: url,\n xhrSettings: xhrSettings\n };\n\n File.call(this, loader, fileConfig);\n },\n\n /**\n * Called automatically by Loader.nextFile.\n * This method controls what extra work this File does with its loaded data.\n *\n * @method Phaser.Loader.FileTypes.TextFile#onProcess\n * @since 3.7.0\n */\n onProcess: function ()\n {\n this.state = CONST.FILE_PROCESSING;\n\n this.data = this.xhrLoader.responseText;\n\n this.onProcessComplete();\n }\n\n});\n\n/**\n * Adds a Text file, or array of Text files, to the current load queue.\n *\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\n *\n * ```javascript\n * function preload ()\n * {\n * this.load.text('story', 'files/IntroStory.txt');\n * }\n * ```\n *\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\n * loaded.\n *\n * The key must be a unique String. It is used to add the file to the global Text Cache upon a successful load.\n * The key should be unique both in terms of files being loaded and files already present in the Text Cache.\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\n * then remove it from the Text Cache first, before loading a new one.\n *\n * Instead of passing arguments you can pass a configuration object, such as:\n *\n * ```javascript\n * this.load.text({\n * key: 'story',\n * url: 'files/IntroStory.txt'\n * });\n * ```\n *\n * See the documentation for `Phaser.Types.Loader.FileTypes.TextFileConfig` for more details.\n *\n * Once the file has finished loading you can access it from its Cache using its key:\n *\n * ```javascript\n * this.load.text('story', 'files/IntroStory.txt');\n * // and later in your game ...\n * var data = this.cache.text.get('story');\n * ```\n *\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\n * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and\n * this is what you would use to retrieve the text from the Text Cache.\n *\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\n *\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"story\"\n * and no URL is given then the Loader will set the URL to be \"story.txt\". It will always add `.txt` as the extension, although\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\n *\n * Note: The ability to load this type of file will only be available if the Text File type has been built into Phaser.\n * It is available in the default build but can be excluded from custom builds.\n *\n * @method Phaser.Loader.LoaderPlugin#text\n * @fires Phaser.Loader.LoaderPlugin#ADD\n * @since 3.0.0\n *\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig|Phaser.Types.Loader.FileTypes.TextFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\n *\n * @return {this} The Loader instance.\n */\nFileTypesManager.register('text', function (key, url, xhrSettings)\n{\n if (Array.isArray(key))\n {\n for (var i = 0; i < key.length; i++)\n {\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\n this.addFile(new TextFile(this, key[i]));\n }\n }\n else\n {\n this.addFile(new TextFile(this, key, url, xhrSettings));\n }\n\n return this;\n});\n\nmodule.exports = TextFile;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the mean average of the given values.\n *\n * @function Phaser.Math.Average\n * @since 3.0.0\n *\n * @param {number[]} values - The values to average.\n *\n * @return {number} The average value.\n */\nvar Average = function (values)\n{\n var sum = 0;\n\n for (var i = 0; i < values.length; i++)\n {\n sum += (+values[i]);\n }\n\n return sum / values.length;\n};\n\nmodule.exports = Average;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Factorial = require('./Factorial');\n\n/**\n * Calculates the Bernstein basis from the three factorial coefficients.\n *\n * @function Phaser.Math.Bernstein\n * @since 3.0.0\n *\n * @param {number} n - The first value.\n * @param {number} i - The second value.\n *\n * @return {number} The Bernstein basis of Factorial(n) / Factorial(i) / Factorial(n - i)\n */\nvar Bernstein = function (n, i)\n{\n return Factorial(n) / Factorial(i) / Factorial(n - i);\n};\n\nmodule.exports = Bernstein;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Compute a random integer between the `min` and `max` values, inclusive.\n *\n * @function Phaser.Math.Between\n * @since 3.0.0\n *\n * @param {integer} min - The minimum value.\n * @param {integer} max - The maximum value.\n *\n * @return {integer} The random integer.\n */\nvar Between = function (min, max)\n{\n return Math.floor(Math.random() * (max - min + 1) + min);\n};\n\nmodule.exports = Between;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculates a Catmull-Rom value from the given points, based on an alpha of 0.5.\n *\n * @function Phaser.Math.CatmullRom\n * @since 3.0.0\n *\n * @param {number} t - The amount to interpolate by.\n * @param {number} p0 - The first control point.\n * @param {number} p1 - The second control point.\n * @param {number} p2 - The third control point.\n * @param {number} p3 - The fourth control point.\n *\n * @return {number} The Catmull-Rom value.\n */\nvar CatmullRom = function (t, p0, p1, p2, p3)\n{\n var v0 = (p2 - p0) * 0.5;\n var v1 = (p3 - p1) * 0.5;\n var t2 = t * t;\n var t3 = t * t2;\n\n return (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1;\n};\n\nmodule.exports = CatmullRom;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Ceils to some place comparative to a `base`, default is 10 for decimal place.\n *\n * The `place` is represented by the power applied to `base` to get that place.\n *\n * @function Phaser.Math.CeilTo\n * @since 3.0.0\n *\n * @param {number} value - The value to round.\n * @param {number} [place=0] - The place to round to.\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\n *\n * @return {number} The rounded value.\n */\nvar CeilTo = function (value, place, base)\n{\n if (place === undefined) { place = 0; }\n if (base === undefined) { base = 10; }\n\n var p = Math.pow(base, -place);\n\n return Math.ceil(value * p) / p;\n};\n\nmodule.exports = CeilTo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Force a value within the boundaries by clamping it to the range `min`, `max`.\n *\n * @function Phaser.Math.Clamp\n * @since 3.0.0\n *\n * @param {number} value - The value to be clamped.\n * @param {number} min - The minimum bounds.\n * @param {number} max - The maximum bounds.\n *\n * @return {number} The clamped value.\n */\nvar Clamp = function (value, min, max)\n{\n return Math.max(min, Math.min(max, value));\n};\n\nmodule.exports = Clamp;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CONST = require('./const');\n\n/**\n * Convert the given angle from degrees, to the equivalent angle in radians.\n *\n * @function Phaser.Math.DegToRad\n * @since 3.0.0\n *\n * @param {integer} degrees - The angle (in degrees) to convert to radians.\n *\n * @return {number} The given angle converted to radians.\n */\nvar DegToRad = function (degrees)\n{\n return degrees * CONST.DEG_TO_RAD;\n};\n\nmodule.exports = DegToRad;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculates the positive difference of two given numbers.\n *\n * @function Phaser.Math.Difference\n * @since 3.0.0\n *\n * @param {number} a - The first number in the calculation.\n * @param {number} b - The second number in the calculation.\n *\n * @return {number} The positive difference of the two given numbers.\n */\nvar Difference = function (a, b)\n{\n return Math.abs(a - b);\n};\n\nmodule.exports = Difference;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculates the factorial of a given number for integer values greater than 0.\n *\n * @function Phaser.Math.Factorial\n * @since 3.0.0\n *\n * @param {number} value - A positive integer to calculate the factorial of.\n *\n * @return {number} The factorial of the given number.\n */\nvar Factorial = function (value)\n{\n if (value === 0)\n {\n return 1;\n }\n\n var res = value;\n\n while (--value)\n {\n res *= value;\n }\n\n return res;\n};\n\nmodule.exports = Factorial;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive.\n *\n * @function Phaser.Math.FloatBetween\n * @since 3.0.0\n *\n * @param {number} min - The lower bound for the float, inclusive.\n * @param {number} max - The upper bound for the float exclusive.\n *\n * @return {number} A random float within the given range.\n */\nvar FloatBetween = function (min, max)\n{\n return Math.random() * (max - min) + min;\n};\n\nmodule.exports = FloatBetween;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Floors to some place comparative to a `base`, default is 10 for decimal place.\n *\n * The `place` is represented by the power applied to `base` to get that place.\n *\n * @function Phaser.Math.FloorTo\n * @since 3.0.0\n *\n * @param {number} value - The value to round.\n * @param {integer} [place=0] - The place to round to.\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\n *\n * @return {number} The rounded value.\n */\nvar FloorTo = function (value, place, base)\n{\n if (place === undefined) { place = 0; }\n if (base === undefined) { base = 10; }\n\n var p = Math.pow(base, -place);\n\n return Math.floor(value * p) / p;\n};\n\nmodule.exports = FloorTo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Clamp = require('./Clamp');\n\n/**\n * Return a value based on the range between `min` and `max` and the percentage given.\n *\n * @function Phaser.Math.FromPercent\n * @since 3.0.0\n *\n * @param {number} percent - A value between 0 and 1 representing the percentage.\n * @param {number} min - The minimum value.\n * @param {number} [max] - The maximum value.\n *\n * @return {number} The value that is `percent` percent between `min` and `max`.\n */\nvar FromPercent = function (percent, min, max)\n{\n percent = Clamp(percent, 0, 1);\n\n return (max - min) * percent;\n};\n\nmodule.exports = FromPercent;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate a per-ms speed from a distance and time (given in seconds).\n *\n * @function Phaser.Math.GetSpeed\n * @since 3.0.0\n *\n * @param {number} distance - The distance.\n * @param {integer} time - The time, in seconds.\n *\n * @return {number} The speed, in distance per ms.\n *\n * @example\n * // 400px over 1 second is 0.4 px/ms\n * Phaser.Math.GetSpeed(400, 1) // -> 0.4\n */\nvar GetSpeed = function (distance, time)\n{\n return (distance / time) / 1000;\n};\n\nmodule.exports = GetSpeed;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Check if a given value is an even number.\n *\n * @function Phaser.Math.IsEven\n * @since 3.0.0\n *\n * @param {number} value - The number to perform the check with.\n *\n * @return {boolean} Whether the number is even or not.\n */\nvar IsEven = function (value)\n{\n // Use abstract equality == for \"is number\" test\n\n // eslint-disable-next-line eqeqeq\n return (value == parseFloat(value)) ? !(value % 2) : void 0;\n};\n\nmodule.exports = IsEven;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Check if a given value is an even number using a strict type check.\n *\n * @function Phaser.Math.IsEvenStrict\n * @since 3.0.0\n *\n * @param {number} value - The number to perform the check with.\n *\n * @return {boolean} Whether the number is even or not.\n */\nvar IsEvenStrict = function (value)\n{\n // Use strict equality === for \"is number\" test\n return (value === parseFloat(value)) ? !(value % 2) : void 0;\n};\n\nmodule.exports = IsEvenStrict;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculates a linear (interpolation) value over t.\n *\n * @function Phaser.Math.Linear\n * @since 3.0.0\n *\n * @param {number} p0 - The first point.\n * @param {number} p1 - The second point.\n * @param {number} t - The percentage between p0 and p1 to return, represented as a number between 0 and 1.\n *\n * @return {number} The step t% of the way between p0 and p1.\n */\nvar Linear = function (p0, p1, t)\n{\n return (p1 - p0) * t + p0;\n};\n\nmodule.exports = Linear;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\n\nvar Class = require('../utils/Class');\n\n/**\n * @classdesc\n * A three-dimensional matrix.\n *\n * Defaults to the identity matrix when instantiated.\n *\n * @class Matrix3\n * @memberof Phaser.Math\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix3} [m] - Optional Matrix3 to copy values from.\n */\nvar Matrix3 = new Class({\n\n initialize:\n\n function Matrix3 (m)\n {\n /**\n * The matrix values.\n *\n * @name Phaser.Math.Matrix3#val\n * @type {Float32Array}\n * @since 3.0.0\n */\n this.val = new Float32Array(9);\n\n if (m)\n {\n // Assume Matrix3 with val:\n this.copy(m);\n }\n else\n {\n // Default to identity\n this.identity();\n }\n },\n\n /**\n * Make a clone of this Matrix3.\n *\n * @method Phaser.Math.Matrix3#clone\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix3} A clone of this Matrix3.\n */\n clone: function ()\n {\n return new Matrix3(this);\n },\n\n /**\n * This method is an alias for `Matrix3.copy`.\n *\n * @method Phaser.Math.Matrix3#set\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix3} src - The Matrix to set the values of this Matrix's from.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n set: function (src)\n {\n return this.copy(src);\n },\n\n /**\n * Copy the values of a given Matrix into this Matrix.\n *\n * @method Phaser.Math.Matrix3#copy\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix3} src - The Matrix to copy the values from.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n copy: function (src)\n {\n var out = this.val;\n var a = src.val;\n\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n\n return this;\n },\n\n /**\n * Copy the values of a given Matrix4 into this Matrix3.\n *\n * @method Phaser.Math.Matrix3#fromMat4\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to copy the values from.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n fromMat4: function (m)\n {\n var a = m.val;\n var out = this.val;\n\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[4];\n out[4] = a[5];\n out[5] = a[6];\n out[6] = a[8];\n out[7] = a[9];\n out[8] = a[10];\n\n return this;\n },\n\n /**\n * Set the values of this Matrix from the given array.\n *\n * @method Phaser.Math.Matrix3#fromArray\n * @since 3.0.0\n *\n * @param {array} a - The array to copy the values from.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n fromArray: function (a)\n {\n var out = this.val;\n\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n\n return this;\n },\n\n /**\n * Reset this Matrix to an identity (default) matrix.\n *\n * @method Phaser.Math.Matrix3#identity\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n identity: function ()\n {\n var out = this.val;\n\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 1;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n\n return this;\n },\n\n /**\n * Transpose this Matrix.\n *\n * @method Phaser.Math.Matrix3#transpose\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n transpose: function ()\n {\n var a = this.val;\n var a01 = a[1];\n var a02 = a[2];\n var a12 = a[5];\n\n a[1] = a[3];\n a[2] = a[6];\n a[3] = a01;\n a[5] = a[7];\n a[6] = a02;\n a[7] = a12;\n\n return this;\n },\n\n /**\n * Invert this Matrix.\n *\n * @method Phaser.Math.Matrix3#invert\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n invert: function ()\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a10 = a[3];\n var a11 = a[4];\n var a12 = a[5];\n var a20 = a[6];\n var a21 = a[7];\n var a22 = a[8];\n\n var b01 = a22 * a11 - a12 * a21;\n var b11 = -a22 * a10 + a12 * a20;\n var b21 = a21 * a10 - a11 * a20;\n\n // Calculate the determinant\n var det = a00 * b01 + a01 * b11 + a02 * b21;\n\n if (!det)\n {\n return null;\n }\n\n det = 1 / det;\n\n a[0] = b01 * det;\n a[1] = (-a22 * a01 + a02 * a21) * det;\n a[2] = (a12 * a01 - a02 * a11) * det;\n a[3] = b11 * det;\n a[4] = (a22 * a00 - a02 * a20) * det;\n a[5] = (-a12 * a00 + a02 * a10) * det;\n a[6] = b21 * det;\n a[7] = (-a21 * a00 + a01 * a20) * det;\n a[8] = (a11 * a00 - a01 * a10) * det;\n\n return this;\n },\n\n /**\n * Calculate the adjoint, or adjugate, of this Matrix.\n *\n * @method Phaser.Math.Matrix3#adjoint\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n adjoint: function ()\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a10 = a[3];\n var a11 = a[4];\n var a12 = a[5];\n var a20 = a[6];\n var a21 = a[7];\n var a22 = a[8];\n\n a[0] = (a11 * a22 - a12 * a21);\n a[1] = (a02 * a21 - a01 * a22);\n a[2] = (a01 * a12 - a02 * a11);\n a[3] = (a12 * a20 - a10 * a22);\n a[4] = (a00 * a22 - a02 * a20);\n a[5] = (a02 * a10 - a00 * a12);\n a[6] = (a10 * a21 - a11 * a20);\n a[7] = (a01 * a20 - a00 * a21);\n a[8] = (a00 * a11 - a01 * a10);\n\n return this;\n },\n\n /**\n * Calculate the determinant of this Matrix.\n *\n * @method Phaser.Math.Matrix3#determinant\n * @since 3.0.0\n *\n * @return {number} The determinant of this Matrix.\n */\n determinant: function ()\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a10 = a[3];\n var a11 = a[4];\n var a12 = a[5];\n var a20 = a[6];\n var a21 = a[7];\n var a22 = a[8];\n\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\n },\n\n /**\n * Multiply this Matrix by the given Matrix.\n *\n * @method Phaser.Math.Matrix3#multiply\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix3} src - The Matrix to multiply this Matrix by.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n multiply: function (src)\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a10 = a[3];\n var a11 = a[4];\n var a12 = a[5];\n var a20 = a[6];\n var a21 = a[7];\n var a22 = a[8];\n\n var b = src.val;\n\n var b00 = b[0];\n var b01 = b[1];\n var b02 = b[2];\n var b10 = b[3];\n var b11 = b[4];\n var b12 = b[5];\n var b20 = b[6];\n var b21 = b[7];\n var b22 = b[8];\n\n a[0] = b00 * a00 + b01 * a10 + b02 * a20;\n a[1] = b00 * a01 + b01 * a11 + b02 * a21;\n a[2] = b00 * a02 + b01 * a12 + b02 * a22;\n\n a[3] = b10 * a00 + b11 * a10 + b12 * a20;\n a[4] = b10 * a01 + b11 * a11 + b12 * a21;\n a[5] = b10 * a02 + b11 * a12 + b12 * a22;\n\n a[6] = b20 * a00 + b21 * a10 + b22 * a20;\n a[7] = b20 * a01 + b21 * a11 + b22 * a21;\n a[8] = b20 * a02 + b21 * a12 + b22 * a22;\n\n return this;\n },\n\n /**\n * Translate this Matrix using the given Vector.\n *\n * @method Phaser.Math.Matrix3#translate\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n translate: function (v)\n {\n var a = this.val;\n var x = v.x;\n var y = v.y;\n\n a[6] = x * a[0] + y * a[3] + a[6];\n a[7] = x * a[1] + y * a[4] + a[7];\n a[8] = x * a[2] + y * a[5] + a[8];\n\n return this;\n },\n\n /**\n * Apply a rotation transformation to this Matrix.\n *\n * @method Phaser.Math.Matrix3#rotate\n * @since 3.0.0\n *\n * @param {number} rad - The angle in radians to rotate by.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n rotate: function (rad)\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a10 = a[3];\n var a11 = a[4];\n var a12 = a[5];\n\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n\n a[0] = c * a00 + s * a10;\n a[1] = c * a01 + s * a11;\n a[2] = c * a02 + s * a12;\n\n a[3] = c * a10 - s * a00;\n a[4] = c * a11 - s * a01;\n a[5] = c * a12 - s * a02;\n\n return this;\n },\n\n /**\n * Apply a scale transformation to this Matrix.\n *\n * Uses the `x` and `y` components of the given Vector to scale the Matrix.\n *\n * @method Phaser.Math.Matrix3#scale\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n scale: function (v)\n {\n var a = this.val;\n var x = v.x;\n var y = v.y;\n\n a[0] = x * a[0];\n a[1] = x * a[1];\n a[2] = x * a[2];\n\n a[3] = y * a[3];\n a[4] = y * a[4];\n a[5] = y * a[5];\n\n return this;\n },\n\n /**\n * Set the values of this Matrix from the given Quaternion.\n *\n * @method Phaser.Math.Matrix3#fromQuat\n * @since 3.0.0\n *\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n fromQuat: function (q)\n {\n var x = q.x;\n var y = q.y;\n var z = q.z;\n var w = q.w;\n\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n\n var out = this.val;\n\n out[0] = 1 - (yy + zz);\n out[3] = xy + wz;\n out[6] = xz - wy;\n\n out[1] = xy - wz;\n out[4] = 1 - (xx + zz);\n out[7] = yz + wx;\n\n out[2] = xz + wy;\n out[5] = yz - wx;\n out[8] = 1 - (xx + yy);\n\n return this;\n },\n\n /**\n * Set the values of this Matrix3 to be normalized from the given Matrix4.\n *\n * @method Phaser.Math.Matrix3#normalFromMat4\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to normalize the values from.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n normalFromMat4: function (m)\n {\n var a = m.val;\n var out = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\n\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32;\n\n // Calculate the determinant\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det)\n {\n return null;\n }\n\n det = 1 / det;\n\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n\n return this;\n }\n\n});\n\nmodule.exports = Matrix3;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\n\nvar Class = require('../utils/Class');\n\nvar EPSILON = 0.000001;\n\n/**\n * @classdesc\n * A four-dimensional matrix.\n *\n * @class Matrix4\n * @memberof Phaser.Math\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} [m] - Optional Matrix4 to copy values from.\n */\nvar Matrix4 = new Class({\n\n initialize:\n\n function Matrix4 (m)\n {\n /**\n * The matrix values.\n *\n * @name Phaser.Math.Matrix4#val\n * @type {Float32Array}\n * @since 3.0.0\n */\n this.val = new Float32Array(16);\n\n if (m)\n {\n // Assume Matrix4 with val:\n this.copy(m);\n }\n else\n {\n // Default to identity\n this.identity();\n }\n },\n\n /**\n * Make a clone of this Matrix4.\n *\n * @method Phaser.Math.Matrix4#clone\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix4} A clone of this Matrix4.\n */\n clone: function ()\n {\n return new Matrix4(this);\n },\n\n // TODO - Should work with basic values\n\n /**\n * This method is an alias for `Matrix4.copy`.\n *\n * @method Phaser.Math.Matrix4#set\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} src - The Matrix to set the values of this Matrix's from.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n set: function (src)\n {\n return this.copy(src);\n },\n\n /**\n * Copy the values of a given Matrix into this Matrix.\n *\n * @method Phaser.Math.Matrix4#copy\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} src - The Matrix to copy the values from.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n copy: function (src)\n {\n var out = this.val;\n var a = src.val;\n\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n\n return this;\n },\n\n /**\n * Set the values of this Matrix from the given array.\n *\n * @method Phaser.Math.Matrix4#fromArray\n * @since 3.0.0\n *\n * @param {array} a - The array to copy the values from.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n fromArray: function (a)\n {\n var out = this.val;\n\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n\n return this;\n },\n\n /**\n * Reset this Matrix.\n *\n * Sets all values to `0`.\n *\n * @method Phaser.Math.Matrix4#zero\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n zero: function ()\n {\n var out = this.val;\n\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 0;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 0;\n\n return this;\n },\n\n /**\n * Set the `x`, `y` and `z` values of this Matrix.\n *\n * @method Phaser.Math.Matrix4#xyz\n * @since 3.0.0\n *\n * @param {number} x - The x value.\n * @param {number} y - The y value.\n * @param {number} z - The z value.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n xyz: function (x, y, z)\n {\n this.identity();\n\n var out = this.val;\n\n out[12] = x;\n out[13] = y;\n out[14] = z;\n\n return this;\n },\n\n /**\n * Set the scaling values of this Matrix.\n *\n * @method Phaser.Math.Matrix4#scaling\n * @since 3.0.0\n *\n * @param {number} x - The x scaling value.\n * @param {number} y - The y scaling value.\n * @param {number} z - The z scaling value.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n scaling: function (x, y, z)\n {\n this.zero();\n\n var out = this.val;\n\n out[0] = x;\n out[5] = y;\n out[10] = z;\n out[15] = 1;\n\n return this;\n },\n\n /**\n * Reset this Matrix to an identity (default) matrix.\n *\n * @method Phaser.Math.Matrix4#identity\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n identity: function ()\n {\n var out = this.val;\n\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n\n return this;\n },\n\n /**\n * Transpose this Matrix.\n *\n * @method Phaser.Math.Matrix4#transpose\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n transpose: function ()\n {\n var a = this.val;\n\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a12 = a[6];\n var a13 = a[7];\n var a23 = a[11];\n\n a[1] = a[4];\n a[2] = a[8];\n a[3] = a[12];\n a[4] = a01;\n a[6] = a[9];\n a[7] = a[13];\n a[8] = a02;\n a[9] = a12;\n a[11] = a[14];\n a[12] = a03;\n a[13] = a13;\n a[14] = a23;\n\n return this;\n },\n\n /**\n * Invert this Matrix.\n *\n * @method Phaser.Math.Matrix4#invert\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n invert: function ()\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\n\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32;\n\n // Calculate the determinant\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det)\n {\n return null;\n }\n\n det = 1 / det;\n\n a[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n a[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n a[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n a[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\n a[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n a[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n a[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n a[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\n a[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n a[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n a[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n a[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\n a[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\n a[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\n a[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\n a[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\n\n return this;\n },\n\n /**\n * Calculate the adjoint, or adjugate, of this Matrix.\n *\n * @method Phaser.Math.Matrix4#adjoint\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n adjoint: function ()\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\n\n a[0] = (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22));\n a[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));\n a[2] = (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12));\n a[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));\n a[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));\n a[5] = (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22));\n a[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));\n a[7] = (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12));\n a[8] = (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21));\n a[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));\n a[10] = (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11));\n a[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));\n a[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));\n a[13] = (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21));\n a[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));\n a[15] = (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11));\n\n return this;\n },\n\n /**\n * Calculate the determinant of this Matrix.\n *\n * @method Phaser.Math.Matrix4#determinant\n * @since 3.0.0\n *\n * @return {number} The determinant of this Matrix.\n */\n determinant: function ()\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\n\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32;\n\n // Calculate the determinant\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n },\n\n /**\n * Multiply this Matrix by the given Matrix.\n *\n * @method Phaser.Math.Matrix4#multiply\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} src - The Matrix to multiply this Matrix by.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n multiply: function (src)\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\n\n var b = src.val;\n\n // Cache only the current line of the second matrix\n var b0 = b[0];\n var b1 = b[1];\n var b2 = b[2];\n var b3 = b[3];\n\n a[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n a[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n a[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n a[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n\n b0 = b[4];\n b1 = b[5];\n b2 = b[6];\n b3 = b[7];\n\n a[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n a[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n a[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n a[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n\n b0 = b[8];\n b1 = b[9];\n b2 = b[10];\n b3 = b[11];\n\n a[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n a[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n a[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n a[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n\n b0 = b[12];\n b1 = b[13];\n b2 = b[14];\n b3 = b[15];\n\n a[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n a[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n a[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n a[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n\n return this;\n },\n\n /**\n * Multiply the values of this Matrix4 by those given in the `src` argument.\n *\n * @method Phaser.Math.Matrix4#multiplyLocal\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} src - The source Matrix4 that this Matrix4 is multiplied by.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n multiplyLocal: function (src)\n {\n var a = [];\n var m1 = this.val;\n var m2 = src.val;\n\n a[0] = m1[0] * m2[0] + m1[1] * m2[4] + m1[2] * m2[8] + m1[3] * m2[12];\n a[1] = m1[0] * m2[1] + m1[1] * m2[5] + m1[2] * m2[9] + m1[3] * m2[13];\n a[2] = m1[0] * m2[2] + m1[1] * m2[6] + m1[2] * m2[10] + m1[3] * m2[14];\n a[3] = m1[0] * m2[3] + m1[1] * m2[7] + m1[2] * m2[11] + m1[3] * m2[15];\n\n a[4] = m1[4] * m2[0] + m1[5] * m2[4] + m1[6] * m2[8] + m1[7] * m2[12];\n a[5] = m1[4] * m2[1] + m1[5] * m2[5] + m1[6] * m2[9] + m1[7] * m2[13];\n a[6] = m1[4] * m2[2] + m1[5] * m2[6] + m1[6] * m2[10] + m1[7] * m2[14];\n a[7] = m1[4] * m2[3] + m1[5] * m2[7] + m1[6] * m2[11] + m1[7] * m2[15];\n\n a[8] = m1[8] * m2[0] + m1[9] * m2[4] + m1[10] * m2[8] + m1[11] * m2[12];\n a[9] = m1[8] * m2[1] + m1[9] * m2[5] + m1[10] * m2[9] + m1[11] * m2[13];\n a[10] = m1[8] * m2[2] + m1[9] * m2[6] + m1[10] * m2[10] + m1[11] * m2[14];\n a[11] = m1[8] * m2[3] + m1[9] * m2[7] + m1[10] * m2[11] + m1[11] * m2[15];\n\n a[12] = m1[12] * m2[0] + m1[13] * m2[4] + m1[14] * m2[8] + m1[15] * m2[12];\n a[13] = m1[12] * m2[1] + m1[13] * m2[5] + m1[14] * m2[9] + m1[15] * m2[13];\n a[14] = m1[12] * m2[2] + m1[13] * m2[6] + m1[14] * m2[10] + m1[15] * m2[14];\n a[15] = m1[12] * m2[3] + m1[13] * m2[7] + m1[14] * m2[11] + m1[15] * m2[15];\n\n return this.fromArray(a);\n },\n\n /**\n * Translate this Matrix using the given Vector.\n *\n * @method Phaser.Math.Matrix4#translate\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n translate: function (v)\n {\n var x = v.x;\n var y = v.y;\n var z = v.z;\n var a = this.val;\n\n a[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\n a[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\n a[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\n a[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\n\n return this;\n },\n\n /**\n * Translate this Matrix using the given values.\n *\n * @method Phaser.Math.Matrix4#translateXYZ\n * @since 3.16.0\n *\n * @param {number} x - The x component.\n * @param {number} y - The y component.\n * @param {number} z - The z component.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n translateXYZ: function (x, y, z)\n {\n var a = this.val;\n\n a[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\n a[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\n a[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\n a[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\n\n return this;\n },\n\n /**\n * Apply a scale transformation to this Matrix.\n *\n * Uses the `x`, `y` and `z` components of the given Vector to scale the Matrix.\n *\n * @method Phaser.Math.Matrix4#scale\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n scale: function (v)\n {\n var x = v.x;\n var y = v.y;\n var z = v.z;\n var a = this.val;\n\n a[0] = a[0] * x;\n a[1] = a[1] * x;\n a[2] = a[2] * x;\n a[3] = a[3] * x;\n\n a[4] = a[4] * y;\n a[5] = a[5] * y;\n a[6] = a[6] * y;\n a[7] = a[7] * y;\n\n a[8] = a[8] * z;\n a[9] = a[9] * z;\n a[10] = a[10] * z;\n a[11] = a[11] * z;\n\n return this;\n },\n\n /**\n * Apply a scale transformation to this Matrix.\n *\n * @method Phaser.Math.Matrix4#scaleXYZ\n * @since 3.16.0\n *\n * @param {number} x - The x component.\n * @param {number} y - The y component.\n * @param {number} z - The z component.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n scaleXYZ: function (x, y, z)\n {\n var a = this.val;\n\n a[0] = a[0] * x;\n a[1] = a[1] * x;\n a[2] = a[2] * x;\n a[3] = a[3] * x;\n\n a[4] = a[4] * y;\n a[5] = a[5] * y;\n a[6] = a[6] * y;\n a[7] = a[7] * y;\n\n a[8] = a[8] * z;\n a[9] = a[9] * z;\n a[10] = a[10] * z;\n a[11] = a[11] * z;\n\n return this;\n },\n\n /**\n * Derive a rotation matrix around the given axis.\n *\n * @method Phaser.Math.Matrix4#makeRotationAxis\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} axis - The rotation axis.\n * @param {number} angle - The rotation angle in radians.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n makeRotationAxis: function (axis, angle)\n {\n // Based on http://www.gamedev.net/reference/articles/article1199.asp\n\n var c = Math.cos(angle);\n var s = Math.sin(angle);\n var t = 1 - c;\n var x = axis.x;\n var y = axis.y;\n var z = axis.z;\n var tx = t * x;\n var ty = t * y;\n\n this.fromArray([\n tx * x + c, tx * y - s * z, tx * z + s * y, 0,\n tx * y + s * z, ty * y + c, ty * z - s * x, 0,\n tx * z - s * y, ty * z + s * x, t * z * z + c, 0,\n 0, 0, 0, 1\n ]);\n\n return this;\n },\n\n /**\n * Apply a rotation transformation to this Matrix.\n *\n * @method Phaser.Math.Matrix4#rotate\n * @since 3.0.0\n *\n * @param {number} rad - The angle in radians to rotate by.\n * @param {Phaser.Math.Vector3} axis - The axis to rotate upon.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n rotate: function (rad, axis)\n {\n var a = this.val;\n var x = axis.x;\n var y = axis.y;\n var z = axis.z;\n var len = Math.sqrt(x * x + y * y + z * z);\n\n if (Math.abs(len) < EPSILON)\n {\n return null;\n }\n\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var t = 1 - c;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n // Construct the elements of the rotation matrix\n var b00 = x * x * t + c;\n var b01 = y * x * t + z * s;\n var b02 = z * x * t - y * s;\n\n var b10 = x * y * t - z * s;\n var b11 = y * y * t + c;\n var b12 = z * y * t + x * s;\n\n var b20 = x * z * t + y * s;\n var b21 = y * z * t - x * s;\n var b22 = z * z * t + c;\n\n // Perform rotation-specific matrix multiplication\n a[0] = a00 * b00 + a10 * b01 + a20 * b02;\n a[1] = a01 * b00 + a11 * b01 + a21 * b02;\n a[2] = a02 * b00 + a12 * b01 + a22 * b02;\n a[3] = a03 * b00 + a13 * b01 + a23 * b02;\n a[4] = a00 * b10 + a10 * b11 + a20 * b12;\n a[5] = a01 * b10 + a11 * b11 + a21 * b12;\n a[6] = a02 * b10 + a12 * b11 + a22 * b12;\n a[7] = a03 * b10 + a13 * b11 + a23 * b12;\n a[8] = a00 * b20 + a10 * b21 + a20 * b22;\n a[9] = a01 * b20 + a11 * b21 + a21 * b22;\n a[10] = a02 * b20 + a12 * b21 + a22 * b22;\n a[11] = a03 * b20 + a13 * b21 + a23 * b22;\n\n return this;\n },\n\n /**\n * Rotate this matrix on its X axis.\n *\n * @method Phaser.Math.Matrix4#rotateX\n * @since 3.0.0\n *\n * @param {number} rad - The angle in radians to rotate by.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n rotateX: function (rad)\n {\n var a = this.val;\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n // Perform axis-specific matrix multiplication\n a[4] = a10 * c + a20 * s;\n a[5] = a11 * c + a21 * s;\n a[6] = a12 * c + a22 * s;\n a[7] = a13 * c + a23 * s;\n a[8] = a20 * c - a10 * s;\n a[9] = a21 * c - a11 * s;\n a[10] = a22 * c - a12 * s;\n a[11] = a23 * c - a13 * s;\n\n return this;\n },\n\n /**\n * Rotate this matrix on its Y axis.\n *\n * @method Phaser.Math.Matrix4#rotateY\n * @since 3.0.0\n *\n * @param {number} rad - The angle to rotate by, in radians.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n rotateY: function (rad)\n {\n var a = this.val;\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n // Perform axis-specific matrix multiplication\n a[0] = a00 * c - a20 * s;\n a[1] = a01 * c - a21 * s;\n a[2] = a02 * c - a22 * s;\n a[3] = a03 * c - a23 * s;\n a[8] = a00 * s + a20 * c;\n a[9] = a01 * s + a21 * c;\n a[10] = a02 * s + a22 * c;\n a[11] = a03 * s + a23 * c;\n\n return this;\n },\n\n /**\n * Rotate this matrix on its Z axis.\n *\n * @method Phaser.Math.Matrix4#rotateZ\n * @since 3.0.0\n *\n * @param {number} rad - The angle to rotate by, in radians.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n rotateZ: function (rad)\n {\n var a = this.val;\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n // Perform axis-specific matrix multiplication\n a[0] = a00 * c + a10 * s;\n a[1] = a01 * c + a11 * s;\n a[2] = a02 * c + a12 * s;\n a[3] = a03 * c + a13 * s;\n a[4] = a10 * c - a00 * s;\n a[5] = a11 * c - a01 * s;\n a[6] = a12 * c - a02 * s;\n a[7] = a13 * c - a03 * s;\n\n return this;\n },\n\n /**\n * Set the values of this Matrix from the given rotation Quaternion and translation Vector.\n *\n * @method Phaser.Math.Matrix4#fromRotationTranslation\n * @since 3.0.0\n *\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set rotation from.\n * @param {Phaser.Math.Vector3} v - The Vector to set translation from.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n fromRotationTranslation: function (q, v)\n {\n // Quaternion math\n var out = this.val;\n\n var x = q.x;\n var y = q.y;\n var z = q.z;\n var w = q.w;\n\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n\n out[0] = 1 - (yy + zz);\n out[1] = xy + wz;\n out[2] = xz - wy;\n out[3] = 0;\n\n out[4] = xy - wz;\n out[5] = 1 - (xx + zz);\n out[6] = yz + wx;\n out[7] = 0;\n\n out[8] = xz + wy;\n out[9] = yz - wx;\n out[10] = 1 - (xx + yy);\n out[11] = 0;\n\n out[12] = v.x;\n out[13] = v.y;\n out[14] = v.z;\n out[15] = 1;\n\n return this;\n },\n\n /**\n * Set the values of this Matrix from the given Quaternion.\n *\n * @method Phaser.Math.Matrix4#fromQuat\n * @since 3.0.0\n *\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n fromQuat: function (q)\n {\n var out = this.val;\n\n var x = q.x;\n var y = q.y;\n var z = q.z;\n var w = q.w;\n\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n\n out[0] = 1 - (yy + zz);\n out[1] = xy + wz;\n out[2] = xz - wy;\n out[3] = 0;\n\n out[4] = xy - wz;\n out[5] = 1 - (xx + zz);\n out[6] = yz + wx;\n out[7] = 0;\n\n out[8] = xz + wy;\n out[9] = yz - wx;\n out[10] = 1 - (xx + yy);\n out[11] = 0;\n\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n\n return this;\n },\n\n /**\n * Generate a frustum matrix with the given bounds.\n *\n * @method Phaser.Math.Matrix4#frustum\n * @since 3.0.0\n *\n * @param {number} left - The left bound of the frustum.\n * @param {number} right - The right bound of the frustum.\n * @param {number} bottom - The bottom bound of the frustum.\n * @param {number} top - The top bound of the frustum.\n * @param {number} near - The near bound of the frustum.\n * @param {number} far - The far bound of the frustum.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n frustum: function (left, right, bottom, top, near, far)\n {\n var out = this.val;\n\n var rl = 1 / (right - left);\n var tb = 1 / (top - bottom);\n var nf = 1 / (near - far);\n\n out[0] = (near * 2) * rl;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n\n out[4] = 0;\n out[5] = (near * 2) * tb;\n out[6] = 0;\n out[7] = 0;\n\n out[8] = (right + left) * rl;\n out[9] = (top + bottom) * tb;\n out[10] = (far + near) * nf;\n out[11] = -1;\n\n out[12] = 0;\n out[13] = 0;\n out[14] = (far * near * 2) * nf;\n out[15] = 0;\n\n return this;\n },\n\n /**\n * Generate a perspective projection matrix with the given bounds.\n *\n * @method Phaser.Math.Matrix4#perspective\n * @since 3.0.0\n *\n * @param {number} fovy - Vertical field of view in radians\n * @param {number} aspect - Aspect ratio. Typically viewport width /height.\n * @param {number} near - Near bound of the frustum.\n * @param {number} far - Far bound of the frustum.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n perspective: function (fovy, aspect, near, far)\n {\n var out = this.val;\n var f = 1.0 / Math.tan(fovy / 2);\n var nf = 1 / (near - far);\n\n out[0] = f / aspect;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n\n out[4] = 0;\n out[5] = f;\n out[6] = 0;\n out[7] = 0;\n\n out[8] = 0;\n out[9] = 0;\n out[10] = (far + near) * nf;\n out[11] = -1;\n\n out[12] = 0;\n out[13] = 0;\n out[14] = (2 * far * near) * nf;\n out[15] = 0;\n\n return this;\n },\n\n /**\n * Generate a perspective projection matrix with the given bounds.\n *\n * @method Phaser.Math.Matrix4#perspectiveLH\n * @since 3.0.0\n *\n * @param {number} width - The width of the frustum.\n * @param {number} height - The height of the frustum.\n * @param {number} near - Near bound of the frustum.\n * @param {number} far - Far bound of the frustum.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n perspectiveLH: function (width, height, near, far)\n {\n var out = this.val;\n\n out[0] = (2 * near) / width;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n\n out[4] = 0;\n out[5] = (2 * near) / height;\n out[6] = 0;\n out[7] = 0;\n\n out[8] = 0;\n out[9] = 0;\n out[10] = -far / (near - far);\n out[11] = 1;\n\n out[12] = 0;\n out[13] = 0;\n out[14] = (near * far) / (near - far);\n out[15] = 0;\n\n return this;\n },\n\n /**\n * Generate an orthogonal projection matrix with the given bounds.\n *\n * @method Phaser.Math.Matrix4#ortho\n * @since 3.0.0\n *\n * @param {number} left - The left bound of the frustum.\n * @param {number} right - The right bound of the frustum.\n * @param {number} bottom - The bottom bound of the frustum.\n * @param {number} top - The top bound of the frustum.\n * @param {number} near - The near bound of the frustum.\n * @param {number} far - The far bound of the frustum.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n ortho: function (left, right, bottom, top, near, far)\n {\n var out = this.val;\n var lr = left - right;\n var bt = bottom - top;\n var nf = near - far;\n\n // Avoid division by zero\n lr = (lr === 0) ? lr : 1 / lr;\n bt = (bt === 0) ? bt : 1 / bt;\n nf = (nf === 0) ? nf : 1 / nf;\n\n out[0] = -2 * lr;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n\n out[4] = 0;\n out[5] = -2 * bt;\n out[6] = 0;\n out[7] = 0;\n\n out[8] = 0;\n out[9] = 0;\n out[10] = 2 * nf;\n out[11] = 0;\n\n out[12] = (left + right) * lr;\n out[13] = (top + bottom) * bt;\n out[14] = (far + near) * nf;\n out[15] = 1;\n\n return this;\n },\n\n /**\n * Generate a look-at matrix with the given eye position, focal point, and up axis.\n *\n * @method Phaser.Math.Matrix4#lookAt\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} eye - Position of the viewer\n * @param {Phaser.Math.Vector3} center - Point the viewer is looking at\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n lookAt: function (eye, center, up)\n {\n var out = this.val;\n\n var eyex = eye.x;\n var eyey = eye.y;\n var eyez = eye.z;\n\n var upx = up.x;\n var upy = up.y;\n var upz = up.z;\n\n var centerx = center.x;\n var centery = center.y;\n var centerz = center.z;\n\n if (Math.abs(eyex - centerx) < EPSILON &&\n Math.abs(eyey - centery) < EPSILON &&\n Math.abs(eyez - centerz) < EPSILON)\n {\n return this.identity();\n }\n\n var z0 = eyex - centerx;\n var z1 = eyey - centery;\n var z2 = eyez - centerz;\n\n var len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);\n\n z0 *= len;\n z1 *= len;\n z2 *= len;\n\n var x0 = upy * z2 - upz * z1;\n var x1 = upz * z0 - upx * z2;\n var x2 = upx * z1 - upy * z0;\n\n len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);\n\n if (!len)\n {\n x0 = 0;\n x1 = 0;\n x2 = 0;\n }\n else\n {\n len = 1 / len;\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n\n var y0 = z1 * x2 - z2 * x1;\n var y1 = z2 * x0 - z0 * x2;\n var y2 = z0 * x1 - z1 * x0;\n\n len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);\n\n if (!len)\n {\n y0 = 0;\n y1 = 0;\n y2 = 0;\n }\n else\n {\n len = 1 / len;\n y0 *= len;\n y1 *= len;\n y2 *= len;\n }\n\n out[0] = x0;\n out[1] = y0;\n out[2] = z0;\n out[3] = 0;\n\n out[4] = x1;\n out[5] = y1;\n out[6] = z1;\n out[7] = 0;\n\n out[8] = x2;\n out[9] = y2;\n out[10] = z2;\n out[11] = 0;\n\n out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\n out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\n out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\n out[15] = 1;\n\n return this;\n },\n\n /**\n * Set the values of this matrix from the given `yaw`, `pitch` and `roll` values.\n *\n * @method Phaser.Math.Matrix4#yawPitchRoll\n * @since 3.0.0\n *\n * @param {number} yaw - The yaw value.\n * @param {number} pitch - The pitch value.\n * @param {number} roll - The roll value.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n yawPitchRoll: function (yaw, pitch, roll)\n {\n this.zero();\n _tempMat1.zero();\n _tempMat2.zero();\n\n var m0 = this.val;\n var m1 = _tempMat1.val;\n var m2 = _tempMat2.val;\n\n // Rotate Z\n var s = Math.sin(roll);\n var c = Math.cos(roll);\n\n m0[10] = 1;\n m0[15] = 1;\n m0[0] = c;\n m0[1] = s;\n m0[4] = -s;\n m0[5] = c;\n\n // Rotate X\n s = Math.sin(pitch);\n c = Math.cos(pitch);\n\n m1[0] = 1;\n m1[15] = 1;\n m1[5] = c;\n m1[10] = c;\n m1[9] = -s;\n m1[6] = s;\n\n // Rotate Y\n s = Math.sin(yaw);\n c = Math.cos(yaw);\n\n m2[5] = 1;\n m2[15] = 1;\n m2[0] = c;\n m2[2] = -s;\n m2[8] = s;\n m2[10] = c;\n\n this.multiplyLocal(_tempMat1);\n this.multiplyLocal(_tempMat2);\n\n return this;\n },\n\n /**\n * Generate a world matrix from the given rotation, position, scale, view matrix and projection matrix.\n *\n * @method Phaser.Math.Matrix4#setWorldMatrix\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} rotation - The rotation of the world matrix.\n * @param {Phaser.Math.Vector3} position - The position of the world matrix.\n * @param {Phaser.Math.Vector3} scale - The scale of the world matrix.\n * @param {Phaser.Math.Matrix4} [viewMatrix] - The view matrix.\n * @param {Phaser.Math.Matrix4} [projectionMatrix] - The projection matrix.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n setWorldMatrix: function (rotation, position, scale, viewMatrix, projectionMatrix)\n {\n this.yawPitchRoll(rotation.y, rotation.x, rotation.z);\n\n _tempMat1.scaling(scale.x, scale.y, scale.z);\n _tempMat2.xyz(position.x, position.y, position.z);\n\n this.multiplyLocal(_tempMat1);\n this.multiplyLocal(_tempMat2);\n\n if (viewMatrix !== undefined)\n {\n this.multiplyLocal(viewMatrix);\n }\n\n if (projectionMatrix !== undefined)\n {\n this.multiplyLocal(projectionMatrix);\n }\n\n return this;\n }\n\n});\n\nvar _tempMat1 = new Matrix4();\nvar _tempMat2 = new Matrix4();\n\nmodule.exports = Matrix4;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Add an `amount` to a `value`, limiting the maximum result to `max`.\n *\n * @function Phaser.Math.MaxAdd\n * @since 3.0.0\n *\n * @param {number} value - The value to add to.\n * @param {number} amount - The amount to add.\n * @param {number} max - The maximum value to return.\n *\n * @return {number} The resulting value.\n */\nvar MaxAdd = function (value, amount, max)\n{\n return Math.min(value + amount, max);\n};\n\nmodule.exports = MaxAdd;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Subtract an `amount` from `value`, limiting the minimum result to `min`.\n *\n * @function Phaser.Math.MinSub\n * @since 3.0.0\n *\n * @param {number} value - The value to subtract from.\n * @param {number} amount - The amount to subtract.\n * @param {number} min - The minimum value to return.\n *\n * @return {number} The resulting value.\n */\nvar MinSub = function (value, amount, min)\n{\n return Math.max(value - amount, min);\n};\n\nmodule.exports = MinSub;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Work out what percentage `value` is of the range between `min` and `max`.\n * If `max` isn't given then it will return the percentage of `value` to `min`.\n *\n * You can optionally specify an `upperMax` value, which is a mid-way point in the range that represents 100%, after which the % starts to go down to zero again.\n *\n * @function Phaser.Math.Percent\n * @since 3.0.0\n *\n * @param {number} value - The value to determine the percentage of.\n * @param {number} min - The minimum value.\n * @param {number} [max] - The maximum value.\n * @param {number} [upperMax] - The mid-way point in the range that represents 100%.\n *\n * @return {number} A value between 0 and 1 representing the percentage.\n */\nvar Percent = function (value, min, max, upperMax)\n{\n if (max === undefined) { max = min + 1; }\n\n var percentage = (value - min) / (max - min);\n\n if (percentage > 1)\n {\n if (upperMax !== undefined)\n {\n percentage = ((upperMax - value)) / (upperMax - max);\n\n if (percentage < 0)\n {\n percentage = 0;\n }\n }\n else\n {\n percentage = 1;\n }\n }\n else if (percentage < 0)\n {\n percentage = 0;\n }\n\n return percentage;\n};\n\nmodule.exports = Percent;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\n\nvar Class = require('../utils/Class');\nvar Vector3 = require('./Vector3');\nvar Matrix3 = require('./Matrix3');\n\nvar EPSILON = 0.000001;\n\n// Some shared 'private' arrays\nvar siNext = new Int8Array([ 1, 2, 0 ]);\nvar tmp = new Float32Array([ 0, 0, 0 ]);\n\nvar xUnitVec3 = new Vector3(1, 0, 0);\nvar yUnitVec3 = new Vector3(0, 1, 0);\n\nvar tmpvec = new Vector3();\nvar tmpMat3 = new Matrix3();\n\n/**\n * @classdesc\n * A quaternion.\n *\n * @class Quaternion\n * @memberof Phaser.Math\n * @constructor\n * @since 3.0.0\n *\n * @param {number} [x] - The x component.\n * @param {number} [y] - The y component.\n * @param {number} [z] - The z component.\n * @param {number} [w] - The w component.\n */\nvar Quaternion = new Class({\n\n initialize:\n\n function Quaternion (x, y, z, w)\n {\n /**\n * The x component of this Quaternion.\n *\n * @name Phaser.Math.Quaternion#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n\n /**\n * The y component of this Quaternion.\n *\n * @name Phaser.Math.Quaternion#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n\n /**\n * The z component of this Quaternion.\n *\n * @name Phaser.Math.Quaternion#z\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n\n /**\n * The w component of this Quaternion.\n *\n * @name Phaser.Math.Quaternion#w\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n\n if (typeof x === 'object')\n {\n this.x = x.x || 0;\n this.y = x.y || 0;\n this.z = x.z || 0;\n this.w = x.w || 0;\n }\n else\n {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n this.w = w || 0;\n }\n },\n\n /**\n * Copy the components of a given Quaternion or Vector into this Quaternion.\n *\n * @method Phaser.Math.Quaternion#copy\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} src - The Quaternion or Vector to copy the components from.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n copy: function (src)\n {\n this.x = src.x;\n this.y = src.y;\n this.z = src.z;\n this.w = src.w;\n\n return this;\n },\n\n /**\n * Set the components of this Quaternion.\n *\n * @method Phaser.Math.Quaternion#set\n * @since 3.0.0\n *\n * @param {(number|object)} [x=0] - The x component, or an object containing x, y, z, and w components.\n * @param {number} [y=0] - The y component.\n * @param {number} [z=0] - The z component.\n * @param {number} [w=0] - The w component.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n set: function (x, y, z, w)\n {\n if (typeof x === 'object')\n {\n this.x = x.x || 0;\n this.y = x.y || 0;\n this.z = x.z || 0;\n this.w = x.w || 0;\n }\n else\n {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n this.w = w || 0;\n }\n\n return this;\n },\n\n /**\n * Add a given Quaternion or Vector to this Quaternion. Addition is component-wise.\n *\n * @method Phaser.Math.Quaternion#add\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to add to this Quaternion.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n add: function (v)\n {\n this.x += v.x;\n this.y += v.y;\n this.z += v.z;\n this.w += v.w;\n\n return this;\n },\n\n /**\n * Subtract a given Quaternion or Vector from this Quaternion. Subtraction is component-wise.\n *\n * @method Phaser.Math.Quaternion#subtract\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to subtract from this Quaternion.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n subtract: function (v)\n {\n this.x -= v.x;\n this.y -= v.y;\n this.z -= v.z;\n this.w -= v.w;\n\n return this;\n },\n\n /**\n * Scale this Quaternion by the given value.\n *\n * @method Phaser.Math.Quaternion#scale\n * @since 3.0.0\n *\n * @param {number} scale - The value to scale this Quaternion by.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n scale: function (scale)\n {\n this.x *= scale;\n this.y *= scale;\n this.z *= scale;\n this.w *= scale;\n\n return this;\n },\n\n /**\n * Calculate the length of this Quaternion.\n *\n * @method Phaser.Math.Quaternion#length\n * @since 3.0.0\n *\n * @return {number} The length of this Quaternion.\n */\n length: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var w = this.w;\n\n return Math.sqrt(x * x + y * y + z * z + w * w);\n },\n\n /**\n * Calculate the length of this Quaternion squared.\n *\n * @method Phaser.Math.Quaternion#lengthSq\n * @since 3.0.0\n *\n * @return {number} The length of this Quaternion, squared.\n */\n lengthSq: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var w = this.w;\n\n return x * x + y * y + z * z + w * w;\n },\n\n /**\n * Normalize this Quaternion.\n *\n * @method Phaser.Math.Quaternion#normalize\n * @since 3.0.0\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n normalize: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var w = this.w;\n var len = x * x + y * y + z * z + w * w;\n\n if (len > 0)\n {\n len = 1 / Math.sqrt(len);\n\n this.x = x * len;\n this.y = y * len;\n this.z = z * len;\n this.w = w * len;\n }\n\n return this;\n },\n\n /**\n * Calculate the dot product of this Quaternion and the given Quaternion or Vector.\n *\n * @method Phaser.Math.Quaternion#dot\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to dot product with this Quaternion.\n *\n * @return {number} The dot product of this Quaternion and the given Quaternion or Vector.\n */\n dot: function (v)\n {\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\n },\n\n /**\n * Linearly interpolate this Quaternion towards the given Quaternion or Vector.\n *\n * @method Phaser.Math.Quaternion#lerp\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to interpolate towards.\n * @param {number} [t=0] - The percentage of interpolation.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n lerp: function (v, t)\n {\n if (t === undefined) { t = 0; }\n\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n var aw = this.w;\n\n this.x = ax + t * (v.x - ax);\n this.y = ay + t * (v.y - ay);\n this.z = az + t * (v.z - az);\n this.w = aw + t * (v.w - aw);\n\n return this;\n },\n\n /**\n * Rotates this Quaternion based on the two given vectors.\n *\n * @method Phaser.Math.Quaternion#rotationTo\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} a - The transform rotation vector.\n * @param {Phaser.Math.Vector3} b - The target rotation vector.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n rotationTo: function (a, b)\n {\n var dot = a.x * b.x + a.y * b.y + a.z * b.z;\n\n if (dot < -0.999999)\n {\n if (tmpvec.copy(xUnitVec3).cross(a).length() < EPSILON)\n {\n tmpvec.copy(yUnitVec3).cross(a);\n }\n\n tmpvec.normalize();\n\n return this.setAxisAngle(tmpvec, Math.PI);\n\n }\n else if (dot > 0.999999)\n {\n this.x = 0;\n this.y = 0;\n this.z = 0;\n this.w = 1;\n\n return this;\n }\n else\n {\n tmpvec.copy(a).cross(b);\n\n this.x = tmpvec.x;\n this.y = tmpvec.y;\n this.z = tmpvec.z;\n this.w = 1 + dot;\n\n return this.normalize();\n }\n },\n\n /**\n * Set the axes of this Quaternion.\n *\n * @method Phaser.Math.Quaternion#setAxes\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} view - The view axis.\n * @param {Phaser.Math.Vector3} right - The right axis.\n * @param {Phaser.Math.Vector3} up - The upwards axis.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n setAxes: function (view, right, up)\n {\n var m = tmpMat3.val;\n\n m[0] = right.x;\n m[3] = right.y;\n m[6] = right.z;\n\n m[1] = up.x;\n m[4] = up.y;\n m[7] = up.z;\n\n m[2] = -view.x;\n m[5] = -view.y;\n m[8] = -view.z;\n\n return this.fromMat3(tmpMat3).normalize();\n },\n\n /**\n * Reset this Matrix to an identity (default) Quaternion.\n *\n * @method Phaser.Math.Quaternion#identity\n * @since 3.0.0\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n identity: function ()\n {\n this.x = 0;\n this.y = 0;\n this.z = 0;\n this.w = 1;\n\n return this;\n },\n\n /**\n * Set the axis angle of this Quaternion.\n *\n * @method Phaser.Math.Quaternion#setAxisAngle\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} axis - The axis.\n * @param {number} rad - The angle in radians.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n setAxisAngle: function (axis, rad)\n {\n rad = rad * 0.5;\n\n var s = Math.sin(rad);\n\n this.x = s * axis.x;\n this.y = s * axis.y;\n this.z = s * axis.z;\n this.w = Math.cos(rad);\n\n return this;\n },\n\n /**\n * Multiply this Quaternion by the given Quaternion or Vector.\n *\n * @method Phaser.Math.Quaternion#multiply\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to multiply this Quaternion by.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n multiply: function (b)\n {\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n var aw = this.w;\n\n var bx = b.x;\n var by = b.y;\n var bz = b.z;\n var bw = b.w;\n\n this.x = ax * bw + aw * bx + ay * bz - az * by;\n this.y = ay * bw + aw * by + az * bx - ax * bz;\n this.z = az * bw + aw * bz + ax * by - ay * bx;\n this.w = aw * bw - ax * bx - ay * by - az * bz;\n\n return this;\n },\n\n /**\n * Smoothly linearly interpolate this Quaternion towards the given Quaternion or Vector.\n *\n * @method Phaser.Math.Quaternion#slerp\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to interpolate towards.\n * @param {number} t - The percentage of interpolation.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n slerp: function (b, t)\n {\n // benchmarks: http://jsperf.com/quaternion-slerp-implementations\n\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n var aw = this.w;\n\n var bx = b.x;\n var by = b.y;\n var bz = b.z;\n var bw = b.w;\n\n // calc cosine\n var cosom = ax * bx + ay * by + az * bz + aw * bw;\n\n // adjust signs (if necessary)\n if (cosom < 0)\n {\n cosom = -cosom;\n bx = - bx;\n by = - by;\n bz = - bz;\n bw = - bw;\n }\n\n // \"from\" and \"to\" quaternions are very close\n // ... so we can do a linear interpolation\n var scale0 = 1 - t;\n var scale1 = t;\n\n // calculate coefficients\n if ((1 - cosom) > EPSILON)\n {\n // standard case (slerp)\n var omega = Math.acos(cosom);\n var sinom = Math.sin(omega);\n\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\n scale1 = Math.sin(t * omega) / sinom;\n }\n\n // calculate final values\n this.x = scale0 * ax + scale1 * bx;\n this.y = scale0 * ay + scale1 * by;\n this.z = scale0 * az + scale1 * bz;\n this.w = scale0 * aw + scale1 * bw;\n\n return this;\n },\n\n /**\n * Invert this Quaternion.\n *\n * @method Phaser.Math.Quaternion#invert\n * @since 3.0.0\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n invert: function ()\n {\n var a0 = this.x;\n var a1 = this.y;\n var a2 = this.z;\n var a3 = this.w;\n\n var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;\n var invDot = (dot) ? 1 / dot : 0;\n\n // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0\n\n this.x = -a0 * invDot;\n this.y = -a1 * invDot;\n this.z = -a2 * invDot;\n this.w = a3 * invDot;\n\n return this;\n },\n\n /**\n * Convert this Quaternion into its conjugate.\n *\n * Sets the x, y and z components.\n *\n * @method Phaser.Math.Quaternion#conjugate\n * @since 3.0.0\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n conjugate: function ()\n {\n this.x = -this.x;\n this.y = -this.y;\n this.z = -this.z;\n\n return this;\n },\n\n /**\n * Rotate this Quaternion on the X axis.\n *\n * @method Phaser.Math.Quaternion#rotateX\n * @since 3.0.0\n *\n * @param {number} rad - The rotation angle in radians.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n rotateX: function (rad)\n {\n rad *= 0.5;\n\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n var aw = this.w;\n\n var bx = Math.sin(rad);\n var bw = Math.cos(rad);\n\n this.x = ax * bw + aw * bx;\n this.y = ay * bw + az * bx;\n this.z = az * bw - ay * bx;\n this.w = aw * bw - ax * bx;\n\n return this;\n },\n\n /**\n * Rotate this Quaternion on the Y axis.\n *\n * @method Phaser.Math.Quaternion#rotateY\n * @since 3.0.0\n *\n * @param {number} rad - The rotation angle in radians.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n rotateY: function (rad)\n {\n rad *= 0.5;\n\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n var aw = this.w;\n\n var by = Math.sin(rad);\n var bw = Math.cos(rad);\n\n this.x = ax * bw - az * by;\n this.y = ay * bw + aw * by;\n this.z = az * bw + ax * by;\n this.w = aw * bw - ay * by;\n\n return this;\n },\n\n /**\n * Rotate this Quaternion on the Z axis.\n *\n * @method Phaser.Math.Quaternion#rotateZ\n * @since 3.0.0\n *\n * @param {number} rad - The rotation angle in radians.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n rotateZ: function (rad)\n {\n rad *= 0.5;\n\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n var aw = this.w;\n\n var bz = Math.sin(rad);\n var bw = Math.cos(rad);\n\n this.x = ax * bw + ay * bz;\n this.y = ay * bw - ax * bz;\n this.z = az * bw + aw * bz;\n this.w = aw * bw - az * bz;\n\n return this;\n },\n\n /**\n * Create a unit (or rotation) Quaternion from its x, y, and z components.\n *\n * Sets the w component.\n *\n * @method Phaser.Math.Quaternion#calculateW\n * @since 3.0.0\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n calculateW: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n\n this.w = -Math.sqrt(1.0 - x * x - y * y - z * z);\n\n return this;\n },\n\n /**\n * Convert the given Matrix into this Quaternion.\n *\n * @method Phaser.Math.Quaternion#fromMat3\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix3} mat - The Matrix to convert from.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n fromMat3: function (mat)\n {\n // benchmarks:\n // http://jsperf.com/typed-array-access-speed\n // http://jsperf.com/conversion-of-3x3-matrix-to-quaternion\n\n // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\n // article \"Quaternion Calculus and Fast Animation\".\n var m = mat.val;\n var fTrace = m[0] + m[4] + m[8];\n var fRoot;\n\n if (fTrace > 0)\n {\n // |w| > 1/2, may as well choose w > 1/2\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\n\n this.w = 0.5 * fRoot;\n\n fRoot = 0.5 / fRoot; // 1/(4w)\n\n this.x = (m[7] - m[5]) * fRoot;\n this.y = (m[2] - m[6]) * fRoot;\n this.z = (m[3] - m[1]) * fRoot;\n }\n else\n {\n // |w| <= 1/2\n var i = 0;\n\n if (m[4] > m[0])\n {\n i = 1;\n }\n\n if (m[8] > m[i * 3 + i])\n {\n i = 2;\n }\n\n var j = siNext[i];\n var k = siNext[j];\n\n // This isn't quite as clean without array access\n fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1);\n tmp[i] = 0.5 * fRoot;\n\n fRoot = 0.5 / fRoot;\n\n tmp[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;\n tmp[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;\n\n this.x = tmp[0];\n this.y = tmp[1];\n this.z = tmp[2];\n this.w = (m[k * 3 + j] - m[j * 3 + k]) * fRoot;\n }\n\n return this;\n }\n\n});\n\nmodule.exports = Quaternion;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CONST = require('./const');\n\n/**\n * Convert the given angle in radians, to the equivalent angle in degrees.\n *\n * @function Phaser.Math.RadToDeg\n * @since 3.0.0\n *\n * @param {number} radians - The angle in radians to convert ot degrees.\n *\n * @return {integer} The given angle converted to degrees.\n */\nvar RadToDeg = function (radians)\n{\n return radians * CONST.RAD_TO_DEG;\n};\n\nmodule.exports = RadToDeg;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Compute a random unit vector.\n *\n * Computes random values for the given vector between -1 and 1 that can be used to represent a direction.\n *\n * Optionally accepts a scale value to scale the resulting vector by.\n *\n * @function Phaser.Math.RandomXY\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} vector - The Vector to compute random values for.\n * @param {number} [scale=1] - The scale of the random values.\n *\n * @return {Phaser.Math.Vector2} The given Vector.\n */\nvar RandomXY = function (vector, scale)\n{\n if (scale === undefined) { scale = 1; }\n\n var r = Math.random() * 2 * Math.PI;\n\n vector.x = Math.cos(r) * scale;\n vector.y = Math.sin(r) * scale;\n\n return vector;\n};\n\nmodule.exports = RandomXY;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Compute a random position vector in a spherical area, optionally defined by the given radius.\n *\n * @function Phaser.Math.RandomXYZ\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} vec3 - The Vector to compute random values for.\n * @param {number} [radius=1] - The radius.\n *\n * @return {Phaser.Math.Vector3} The given Vector.\n */\nvar RandomXYZ = function (vec3, radius)\n{\n if (radius === undefined) { radius = 1; }\n\n var r = Math.random() * 2 * Math.PI;\n var z = (Math.random() * 2) - 1;\n var zScale = Math.sqrt(1 - z * z) * radius;\n\n vec3.x = Math.cos(r) * zScale;\n vec3.y = Math.sin(r) * zScale;\n vec3.z = z * radius;\n\n return vec3;\n};\n\nmodule.exports = RandomXYZ;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Compute a random four-dimensional vector.\n *\n * @function Phaser.Math.RandomXYZW\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector4} vec4 - The Vector to compute random values for.\n * @param {number} [scale=1] - The scale of the random values.\n *\n * @return {Phaser.Math.Vector4} The given Vector.\n */\nvar RandomXYZW = function (vec4, scale)\n{\n if (scale === undefined) { scale = 1; }\n\n // TODO: Not spherical; should fix this for more uniform distribution\n vec4.x = (Math.random() * 2 - 1) * scale;\n vec4.y = (Math.random() * 2 - 1) * scale;\n vec4.z = (Math.random() * 2 - 1) * scale;\n vec4.w = (Math.random() * 2 - 1) * scale;\n\n return vec4;\n};\n\nmodule.exports = RandomXYZW;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Rotate a given point by a given angle around the origin (0, 0), in an anti-clockwise direction.\n *\n * @function Phaser.Math.Rotate\n * @since 3.0.0\n *\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\n * @param {number} angle - The angle to be rotated by in an anticlockwise direction.\n *\n * @return {Phaser.Geom.Point} The given point, rotated by the given angle in an anticlockwise direction.\n */\nvar Rotate = function (point, angle)\n{\n var x = point.x;\n var y = point.y;\n\n point.x = (x * Math.cos(angle)) - (y * Math.sin(angle));\n point.y = (x * Math.sin(angle)) + (y * Math.cos(angle));\n\n return point;\n};\n\nmodule.exports = Rotate;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Rotate a `point` around `x` and `y` to the given `angle`, at the same distance.\n *\n * In polar notation, this maps a point from (r, t) to (r, angle), vs. the origin (x, y).\n *\n * @function Phaser.Math.RotateAround\n * @since 3.0.0\n *\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\n *\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\n * @param {number} x - The horizontal coordinate to rotate around.\n * @param {number} y - The vertical coordinate to rotate around.\n * @param {number} angle - The angle of rotation in radians.\n *\n * @return {Phaser.Types.Math.Vector2Like} The given point.\n */\nvar RotateAround = function (point, x, y, angle)\n{\n var c = Math.cos(angle);\n var s = Math.sin(angle);\n\n var tx = point.x - x;\n var ty = point.y - y;\n\n point.x = tx * c - ty * s + x;\n point.y = tx * s + ty * c + y;\n\n return point;\n};\n\nmodule.exports = RotateAround;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Rotate a `point` around `x` and `y` by the given `angle` and `distance`.\n *\n * In polar notation, this maps a point from (r, t) to (distance, t + angle), vs. the origin (x, y).\n *\n * @function Phaser.Math.RotateAroundDistance\n * @since 3.0.0\n *\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\n *\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\n * @param {number} x - The horizontal coordinate to rotate around.\n * @param {number} y - The vertical coordinate to rotate around.\n * @param {number} angle - The angle of rotation in radians.\n * @param {number} distance - The distance from (x, y) to place the point at.\n *\n * @return {Phaser.Types.Math.Vector2Like} The given point.\n */\nvar RotateAroundDistance = function (point, x, y, angle, distance)\n{\n var t = angle + Math.atan2(point.y - y, point.x - x);\n\n point.x = x + (distance * Math.cos(t));\n point.y = y + (distance * Math.sin(t));\n\n return point;\n};\n\nmodule.exports = RotateAroundDistance;\n","/**\n * @author samme\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Position a `point` at the given `angle` and `distance` to (`x`, `y`).\n *\n * @function Phaser.Math.RotateTo\n * @since 3.24.0\n *\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\n *\n * @param {Phaser.Types.Math.Vector2Like} point - The point to be positioned.\n * @param {number} x - The horizontal coordinate to position from.\n * @param {number} y - The vertical coordinate to position from.\n * @param {number} angle - The angle of rotation in radians.\n * @param {number} distance - The distance from (x, y) to place the point at.\n *\n * @return {Phaser.Types.Math.Vector2Like} The given point.\n */\nvar RotateTo = function (point, x, y, angle, distance)\n{\n point.x = x + (distance * Math.cos(angle));\n point.y = y + (distance * Math.sin(angle));\n\n return point;\n};\n\nmodule.exports = RotateTo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Vector3 = require('../math/Vector3');\nvar Matrix4 = require('../math/Matrix4');\nvar Quaternion = require('../math/Quaternion');\n\nvar tmpMat4 = new Matrix4();\nvar tmpQuat = new Quaternion();\nvar tmpVec3 = new Vector3();\n\n/**\n * Rotates a vector in place by axis angle.\n *\n * This is the same as transforming a point by an\n * axis-angle quaternion, but it has higher precision.\n *\n * @function Phaser.Math.RotateVec3\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} vec - The vector to be rotated.\n * @param {Phaser.Math.Vector3} axis - The axis to rotate around.\n * @param {number} radians - The angle of rotation in radians.\n *\n * @return {Phaser.Math.Vector3} The given vector.\n */\nvar RotateVec3 = function (vec, axis, radians)\n{\n // Set the quaternion to our axis angle\n tmpQuat.setAxisAngle(axis, radians);\n\n // Create a rotation matrix from the axis angle\n tmpMat4.fromRotationTranslation(tmpQuat, tmpVec3.set(0, 0, 0));\n\n // Multiply our vector by the rotation matrix\n return vec.transformMat4(tmpMat4);\n};\n\nmodule.exports = RotateVec3;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Round a given number so it is further away from zero. That is, positive numbers are rounded up, and negative numbers are rounded down.\n *\n * @function Phaser.Math.RoundAwayFromZero\n * @since 3.0.0\n *\n * @param {number} value - The number to round.\n *\n * @return {number} The rounded number, rounded away from zero.\n */\nvar RoundAwayFromZero = function (value)\n{\n // \"Opposite\" of truncate.\n return (value > 0) ? Math.ceil(value) : Math.floor(value);\n};\n\nmodule.exports = RoundAwayFromZero;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Round a value to the given precision.\n * \n * For example:\n * \n * ```javascript\n * RoundTo(123.456, 0) = 123\n * RoundTo(123.456, 1) = 120\n * RoundTo(123.456, 2) = 100\n * ```\n * \n * To round the decimal, i.e. to round to precision, pass in a negative `place`:\n * \n * ```javascript\n * RoundTo(123.456789, 0) = 123\n * RoundTo(123.456789, -1) = 123.5\n * RoundTo(123.456789, -2) = 123.46\n * RoundTo(123.456789, -3) = 123.457\n * ```\n *\n * @function Phaser.Math.RoundTo\n * @since 3.0.0\n *\n * @param {number} value - The value to round.\n * @param {integer} [place=0] - The place to round to. Positive to round the units, negative to round the decimal.\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\n *\n * @return {number} The rounded value.\n */\nvar RoundTo = function (value, place, base)\n{\n if (place === undefined) { place = 0; }\n if (base === undefined) { base = 10; }\n\n var p = Math.pow(base, -place);\n\n return Math.round(value * p) / p;\n};\n\nmodule.exports = RoundTo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Generate a series of sine and cosine values.\n *\n * @function Phaser.Math.SinCosTableGenerator\n * @since 3.0.0\n *\n * @param {number} length - The number of values to generate.\n * @param {number} [sinAmp=1] - The sine value amplitude.\n * @param {number} [cosAmp=1] - The cosine value amplitude.\n * @param {number} [frequency=1] - The frequency of the values.\n *\n * @return {Phaser.Types.Math.SinCosTable} The generated values.\n */\nvar SinCosTableGenerator = function (length, sinAmp, cosAmp, frequency)\n{\n if (sinAmp === undefined) { sinAmp = 1; }\n if (cosAmp === undefined) { cosAmp = 1; }\n if (frequency === undefined) { frequency = 1; }\n\n frequency *= Math.PI / length;\n\n var cos = [];\n var sin = [];\n\n for (var c = 0; c < length; c++)\n {\n cosAmp -= sinAmp * frequency;\n sinAmp += cosAmp * frequency;\n\n cos[c] = cosAmp;\n sin[c] = sinAmp;\n }\n\n return {\n sin: sin,\n cos: cos,\n length: length\n };\n};\n\nmodule.exports = SinCosTableGenerator;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate a smooth interpolation percentage of `x` between `min` and `max`.\n *\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\n * between 0 and 1 otherwise.\n *\n * @function Phaser.Math.SmoothStep\n * @since 3.0.0\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\n *\n * @param {number} x - The input value.\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\n *\n * @return {number} The percentage of interpolation, between 0 and 1.\n */\nvar SmoothStep = function (x, min, max)\n{\n if (x <= min)\n {\n return 0;\n }\n\n if (x >= max)\n {\n return 1;\n }\n\n x = (x - min) / (max - min);\n\n return x * x * (3 - 2 * x);\n};\n\nmodule.exports = SmoothStep;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate a smoother interpolation percentage of `x` between `min` and `max`.\n *\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\n * between 0 and 1 otherwise.\n *\n * Produces an even smoother interpolation than {@link Phaser.Math.SmoothStep}.\n *\n * @function Phaser.Math.SmootherStep\n * @since 3.0.0\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\n *\n * @param {number} x - The input value.\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\n *\n * @return {number} The percentage of interpolation, between 0 and 1.\n */\nvar SmootherStep = function (x, min, max)\n{\n x = Math.max(0, Math.min(1, (x - min) / (max - min)));\n\n return x * x * x * (x * (x * 6 - 15) + 10);\n};\n\nmodule.exports = SmootherStep;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Vector2 = require('./Vector2');\n\n/**\n * Returns a Vector2 containing the x and y position of the given index in a `width` x `height` sized grid.\n * \n * For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2.\n * \n * If the given index is out of range an empty Vector2 is returned.\n *\n * @function Phaser.Math.ToXY\n * @since 3.19.0\n *\n * @param {integer} index - The position within the grid to get the x/y value for.\n * @param {integer} width - The width of the grid.\n * @param {integer} height - The height of the grid.\n * @param {Phaser.Math.Vector2} [out] - An optional Vector2 to store the result in. If not given, a new Vector2 instance will be created.\n *\n * @return {Phaser.Math.Vector2} A Vector2 where the x and y properties contain the given grid index.\n */\nvar ToXY = function (index, width, height, out)\n{\n if (out === undefined) { out = new Vector2(); }\n\n var x = 0;\n var y = 0;\n var total = width * height;\n\n if (index > 0 && index <= total)\n {\n if (index > width - 1)\n {\n y = Math.floor(index / width);\n x = index - (y * width);\n }\n else\n {\n x = index;\n }\n\n out.set(x, y);\n }\n\n return out;\n};\n\nmodule.exports = ToXY;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Vector2 = require('./Vector2');\n\n/**\n * Takes the `x` and `y` coordinates and transforms them into the same space as\n * defined by the position, rotation and scale values.\n *\n * @function Phaser.Math.TransformXY\n * @since 3.0.0\n *\n * @param {number} x - The x coordinate to be transformed.\n * @param {number} y - The y coordinate to be transformed.\n * @param {number} positionX - Horizontal position of the transform point.\n * @param {number} positionY - Vertical position of the transform point.\n * @param {number} rotation - Rotation of the transform point, in radians.\n * @param {number} scaleX - Horizontal scale of the transform point.\n * @param {number} scaleY - Vertical scale of the transform point.\n * @param {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} [output] - The output vector, point or object for the translated coordinates.\n *\n * @return {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} The translated point.\n */\nvar TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output)\n{\n if (output === undefined) { output = new Vector2(); }\n\n var radianSin = Math.sin(rotation);\n var radianCos = Math.cos(rotation);\n\n // Rotate and Scale\n var a = radianCos * scaleX;\n var b = radianSin * scaleX;\n var c = -radianSin * scaleY;\n var d = radianCos * scaleY;\n\n // Invert\n var id = 1 / ((a * d) + (c * -b));\n\n output.x = (d * id * x) + (-c * id * y) + (((positionY * c) - (positionX * d)) * id);\n output.y = (a * id * y) + (-b * id * x) + (((-positionY * a) + (positionX * b)) * id);\n\n return output;\n};\n\nmodule.exports = TransformXY;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\n\nvar Class = require('../utils/Class');\nvar FuzzyEqual = require('../math/fuzzy/Equal');\n\n/**\n * @classdesc\n * A representation of a vector in 2D space.\n *\n * A two-component vector.\n *\n * @class Vector2\n * @memberof Phaser.Math\n * @constructor\n * @since 3.0.0\n *\n * @param {number|Phaser.Types.Math.Vector2Like} [x] - The x component, or an object with `x` and `y` properties.\n * @param {number} [y] - The y component.\n */\nvar Vector2 = new Class({\n\n initialize:\n\n function Vector2 (x, y)\n {\n /**\n * The x component of this Vector.\n *\n * @name Phaser.Math.Vector2#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.x = 0;\n\n /**\n * The y component of this Vector.\n *\n * @name Phaser.Math.Vector2#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.y = 0;\n\n if (typeof x === 'object')\n {\n this.x = x.x || 0;\n this.y = x.y || 0;\n }\n else\n {\n if (y === undefined) { y = x; }\n\n this.x = x || 0;\n this.y = y || 0;\n }\n },\n\n /**\n * Make a clone of this Vector2.\n *\n * @method Phaser.Math.Vector2#clone\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector2} A clone of this Vector2.\n */\n clone: function ()\n {\n return new Vector2(this.x, this.y);\n },\n\n /**\n * Copy the components of a given Vector into this Vector.\n *\n * @method Phaser.Math.Vector2#copy\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector to copy the components from.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n copy: function (src)\n {\n this.x = src.x || 0;\n this.y = src.y || 0;\n\n return this;\n },\n\n /**\n * Set the component values of this Vector from a given Vector2Like object.\n *\n * @method Phaser.Math.Vector2#setFromObject\n * @since 3.0.0\n *\n * @param {Phaser.Types.Math.Vector2Like} obj - The object containing the component values to set for this Vector.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n setFromObject: function (obj)\n {\n this.x = obj.x || 0;\n this.y = obj.y || 0;\n\n return this;\n },\n\n /**\n * Set the `x` and `y` components of the this Vector to the given `x` and `y` values.\n *\n * @method Phaser.Math.Vector2#set\n * @since 3.0.0\n *\n * @param {number} x - The x value to set for this Vector.\n * @param {number} [y=x] - The y value to set for this Vector.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n set: function (x, y)\n {\n if (y === undefined) { y = x; }\n\n this.x = x;\n this.y = y;\n\n return this;\n },\n\n /**\n * This method is an alias for `Vector2.set`.\n *\n * @method Phaser.Math.Vector2#setTo\n * @since 3.4.0\n *\n * @param {number} x - The x value to set for this Vector.\n * @param {number} [y=x] - The y value to set for this Vector.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n setTo: function (x, y)\n {\n return this.set(x, y);\n },\n\n /**\n * Sets the `x` and `y` values of this object from a given polar coordinate.\n *\n * @method Phaser.Math.Vector2#setToPolar\n * @since 3.0.0\n *\n * @param {number} azimuth - The angular coordinate, in radians.\n * @param {number} [radius=1] - The radial coordinate (length).\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n setToPolar: function (azimuth, radius)\n {\n if (radius == null) { radius = 1; }\n\n this.x = Math.cos(azimuth) * radius;\n this.y = Math.sin(azimuth) * radius;\n\n return this;\n },\n\n /**\n * Check whether this Vector is equal to a given Vector.\n *\n * Performs a strict equality check against each Vector's components.\n *\n * @method Phaser.Math.Vector2#equals\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector.\n *\n * @return {boolean} Whether the given Vector is equal to this Vector.\n */\n equals: function (v)\n {\n return ((this.x === v.x) && (this.y === v.y));\n },\n\n /**\n * Check whether this Vector is approximately equal to a given Vector.\n *\n * @method Phaser.Math.Vector2#fuzzyEquals\n * @since 3.23.0\n *\n * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector.\n * @param {number} [epsilon=0.0001] - The tolerance value.\n *\n * @return {boolean} Whether both absolute differences of the x and y components are smaller than `epsilon`.\n */\n fuzzyEquals: function (v, epsilon)\n {\n return (FuzzyEqual(this.x, v.x, epsilon) && FuzzyEqual(this.y, v.y, epsilon));\n },\n\n /**\n * Calculate the angle between this Vector and the positive x-axis, in radians.\n *\n * @method Phaser.Math.Vector2#angle\n * @since 3.0.0\n *\n * @return {number} The angle between this Vector, and the positive x-axis, given in radians.\n */\n angle: function ()\n {\n // computes the angle in radians with respect to the positive x-axis\n\n var angle = Math.atan2(this.y, this.x);\n\n if (angle < 0)\n {\n angle += 2 * Math.PI;\n }\n\n return angle;\n },\n\n /**\n * Set the angle of this Vector.\n *\n * @method Phaser.Math.Vector2#setAngle\n * @since 3.23.0\n *\n * @param {number} angle - The angle, in radians.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n setAngle: function (angle)\n {\n return this.setToPolar(angle, this.length());\n },\n\n /**\n * Add a given Vector to this Vector. Addition is component-wise.\n *\n * @method Phaser.Math.Vector2#add\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector to add to this Vector.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n add: function (src)\n {\n this.x += src.x;\n this.y += src.y;\n\n return this;\n },\n\n /**\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\n *\n * @method Phaser.Math.Vector2#subtract\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector to subtract from this Vector.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n subtract: function (src)\n {\n this.x -= src.x;\n this.y -= src.y;\n\n return this;\n },\n\n /**\n * Perform a component-wise multiplication between this Vector and the given Vector.\n *\n * Multiplies this Vector by the given Vector.\n *\n * @method Phaser.Math.Vector2#multiply\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector to multiply this Vector by.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n multiply: function (src)\n {\n this.x *= src.x;\n this.y *= src.y;\n\n return this;\n },\n\n /**\n * Scale this Vector by the given value.\n *\n * @method Phaser.Math.Vector2#scale\n * @since 3.0.0\n *\n * @param {number} value - The value to scale this Vector by.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n scale: function (value)\n {\n if (isFinite(value))\n {\n this.x *= value;\n this.y *= value;\n }\n else\n {\n this.x = 0;\n this.y = 0;\n }\n\n return this;\n },\n\n /**\n * Perform a component-wise division between this Vector and the given Vector.\n *\n * Divides this Vector by the given Vector.\n *\n * @method Phaser.Math.Vector2#divide\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector to divide this Vector by.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n divide: function (src)\n {\n this.x /= src.x;\n this.y /= src.y;\n\n return this;\n },\n\n /**\n * Negate the `x` and `y` components of this Vector.\n *\n * @method Phaser.Math.Vector2#negate\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n negate: function ()\n {\n this.x = -this.x;\n this.y = -this.y;\n\n return this;\n },\n\n /**\n * Calculate the distance between this Vector and the given Vector.\n *\n * @method Phaser.Math.Vector2#distance\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector to calculate the distance to.\n *\n * @return {number} The distance from this Vector to the given Vector.\n */\n distance: function (src)\n {\n var dx = src.x - this.x;\n var dy = src.y - this.y;\n\n return Math.sqrt(dx * dx + dy * dy);\n },\n\n /**\n * Calculate the distance between this Vector and the given Vector, squared.\n *\n * @method Phaser.Math.Vector2#distanceSq\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector to calculate the distance to.\n *\n * @return {number} The distance from this Vector to the given Vector, squared.\n */\n distanceSq: function (src)\n {\n var dx = src.x - this.x;\n var dy = src.y - this.y;\n\n return dx * dx + dy * dy;\n },\n\n /**\n * Calculate the length (or magnitude) of this Vector.\n *\n * @method Phaser.Math.Vector2#length\n * @since 3.0.0\n *\n * @return {number} The length of this Vector.\n */\n length: function ()\n {\n var x = this.x;\n var y = this.y;\n\n return Math.sqrt(x * x + y * y);\n },\n\n /**\n * Set the length (or magnitude) of this Vector.\n *\n * @method Phaser.Math.Vector2#setLength\n * @since 3.23.0\n *\n * @param {number} length\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n setLength: function (length)\n {\n return this.normalize().scale(length);\n },\n\n /**\n * Calculate the length of this Vector squared.\n *\n * @method Phaser.Math.Vector2#lengthSq\n * @since 3.0.0\n *\n * @return {number} The length of this Vector, squared.\n */\n lengthSq: function ()\n {\n var x = this.x;\n var y = this.y;\n\n return x * x + y * y;\n },\n\n /**\n * Normalize this Vector.\n *\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\n *\n * @method Phaser.Math.Vector2#normalize\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n normalize: function ()\n {\n var x = this.x;\n var y = this.y;\n var len = x * x + y * y;\n\n if (len > 0)\n {\n len = 1 / Math.sqrt(len);\n\n this.x = x * len;\n this.y = y * len;\n }\n\n return this;\n },\n\n /**\n * Rotate this Vector to its perpendicular, in the positive direction.\n *\n * @method Phaser.Math.Vector2#normalizeRightHand\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n normalizeRightHand: function ()\n {\n var x = this.x;\n\n this.x = this.y * -1;\n this.y = x;\n\n return this;\n },\n\n /**\n * Rotate this Vector to its perpendicular, in the negative direction.\n *\n * @method Phaser.Math.Vector2#normalizeLeftHand\n * @since 3.23.0\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n normalizeLeftHand: function ()\n {\n var x = this.x;\n\n this.x = this.y;\n this.y = x * -1;\n\n return this;\n },\n\n /**\n * Calculate the dot product of this Vector and the given Vector.\n *\n * @method Phaser.Math.Vector2#dot\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector2 to dot product with this Vector2.\n *\n * @return {number} The dot product of this Vector and the given Vector.\n */\n dot: function (src)\n {\n return this.x * src.x + this.y * src.y;\n },\n\n /**\n * Calculate the cross product of this Vector and the given Vector.\n *\n * @method Phaser.Math.Vector2#cross\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector2 to cross with this Vector2.\n *\n * @return {number} The cross product of this Vector and the given Vector.\n */\n cross: function (src)\n {\n return this.x * src.y - this.y * src.x;\n },\n\n /**\n * Linearly interpolate between this Vector and the given Vector.\n *\n * Interpolates this Vector towards the given Vector.\n *\n * @method Phaser.Math.Vector2#lerp\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector2 to interpolate towards.\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n lerp: function (src, t)\n {\n if (t === undefined) { t = 0; }\n\n var ax = this.x;\n var ay = this.y;\n\n this.x = ax + t * (src.x - ax);\n this.y = ay + t * (src.y - ay);\n\n return this;\n },\n\n /**\n * Transform this Vector with the given Matrix.\n *\n * @method Phaser.Math.Vector2#transformMat3\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector2 with.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n transformMat3: function (mat)\n {\n var x = this.x;\n var y = this.y;\n var m = mat.val;\n\n this.x = m[0] * x + m[3] * y + m[6];\n this.y = m[1] * x + m[4] * y + m[7];\n\n return this;\n },\n\n /**\n * Transform this Vector with the given Matrix.\n *\n * @method Phaser.Math.Vector2#transformMat4\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector2 with.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n transformMat4: function (mat)\n {\n var x = this.x;\n var y = this.y;\n var m = mat.val;\n\n this.x = m[0] * x + m[4] * y + m[12];\n this.y = m[1] * x + m[5] * y + m[13];\n\n return this;\n },\n\n /**\n * Make this Vector the zero vector (0, 0).\n *\n * @method Phaser.Math.Vector2#reset\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n reset: function ()\n {\n this.x = 0;\n this.y = 0;\n\n return this;\n },\n\n /**\n * Limit the length (or magnitude) of this Vector.\n *\n * @method Phaser.Math.Vector2#limit\n * @since 3.23.0\n *\n * @param {number} max - The maximum length.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n limit: function (max)\n {\n var len = this.length();\n\n if (len && len > max)\n {\n this.scale(max / len);\n }\n\n return this;\n },\n\n /**\n * Reflect this Vector off a line defined by a normal.\n *\n * @method Phaser.Math.Vector2#reflect\n * @since 3.23.0\n *\n * @param {Phaser.Math.Vector2} normal - A vector perpendicular to the line.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n reflect: function (normal)\n {\n normal = normal.clone().normalize();\n\n return this.subtract(normal.scale(2 * this.dot(normal)));\n },\n\n /**\n * Reflect this Vector across another.\n *\n * @method Phaser.Math.Vector2#mirror\n * @since 3.23.0\n *\n * @param {Phaser.Math.Vector2} axis - A vector to reflect across.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n mirror: function (axis)\n {\n return this.reflect(axis).negate();\n },\n\n /**\n * Rotate this Vector by an angle amount.\n *\n * @method Phaser.Math.Vector2#rotate\n * @since 3.23.0\n *\n * @param {number} delta - The angle to rotate by, in radians.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n rotate: function (delta)\n {\n var cos = Math.cos(delta);\n var sin = Math.sin(delta);\n\n return this.set(cos * this.x - sin * this.y, sin * this.x + cos * this.y);\n }\n\n});\n\n/**\n * A static zero Vector2 for use by reference.\n *\n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector2.ZERO\n * @type {Phaser.Math.Vector2}\n * @since 3.1.0\n */\nVector2.ZERO = new Vector2();\n\n/**\n * A static right Vector2 for use by reference.\n *\n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector2.RIGHT\n * @type {Phaser.Math.Vector2}\n * @since 3.16.0\n */\nVector2.RIGHT = new Vector2(1, 0);\n\n/**\n * A static left Vector2 for use by reference.\n *\n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector2.LEFT\n * @type {Phaser.Math.Vector2}\n * @since 3.16.0\n */\nVector2.LEFT = new Vector2(-1, 0);\n\n/**\n * A static up Vector2 for use by reference.\n *\n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector2.UP\n * @type {Phaser.Math.Vector2}\n * @since 3.16.0\n */\nVector2.UP = new Vector2(0, -1);\n\n/**\n * A static down Vector2 for use by reference.\n *\n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector2.DOWN\n * @type {Phaser.Math.Vector2}\n * @since 3.16.0\n */\nVector2.DOWN = new Vector2(0, 1);\n\n/**\n * A static one Vector2 for use by reference.\n *\n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector2.ONE\n * @type {Phaser.Math.Vector2}\n * @since 3.16.0\n */\nVector2.ONE = new Vector2(1, 1);\n\nmodule.exports = Vector2;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\n\nvar Class = require('../utils/Class');\n\n/**\n * @classdesc\n * A representation of a vector in 3D space.\n *\n * A three-component vector.\n *\n * @class Vector3\n * @memberof Phaser.Math\n * @constructor\n * @since 3.0.0\n *\n * @param {number} [x] - The x component.\n * @param {number} [y] - The y component.\n * @param {number} [z] - The z component.\n */\nvar Vector3 = new Class({\n\n initialize:\n\n function Vector3 (x, y, z)\n {\n /**\n * The x component of this Vector.\n *\n * @name Phaser.Math.Vector3#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.x = 0;\n\n /**\n * The y component of this Vector.\n *\n * @name Phaser.Math.Vector3#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.y = 0;\n\n /**\n * The z component of this Vector.\n *\n * @name Phaser.Math.Vector3#z\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.z = 0;\n\n if (typeof x === 'object')\n {\n this.x = x.x || 0;\n this.y = x.y || 0;\n this.z = x.z || 0;\n }\n else\n {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n }\n },\n\n /**\n * Set this Vector to point up.\n *\n * Sets the y component of the vector to 1, and the others to 0.\n *\n * @method Phaser.Math.Vector3#up\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n up: function ()\n {\n this.x = 0;\n this.y = 1;\n this.z = 0;\n\n return this;\n },\n\n /**\n * Make a clone of this Vector3.\n *\n * @method Phaser.Math.Vector3#clone\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector3} A new Vector3 object containing this Vectors values.\n */\n clone: function ()\n {\n return new Vector3(this.x, this.y, this.z);\n },\n\n /**\n * Calculate the cross (vector) product of two given Vectors.\n *\n * @method Phaser.Math.Vector3#crossVectors\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} a - The first Vector to multiply.\n * @param {Phaser.Math.Vector3} b - The second Vector to multiply.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n crossVectors: function (a, b)\n {\n var ax = a.x;\n var ay = a.y;\n var az = a.z;\n var bx = b.x;\n var by = b.y;\n var bz = b.z;\n\n this.x = ay * bz - az * by;\n this.y = az * bx - ax * bz;\n this.z = ax * by - ay * bx;\n\n return this;\n },\n\n /**\n * Check whether this Vector is equal to a given Vector.\n *\n * Performs a strict equality check against each Vector's components.\n *\n * @method Phaser.Math.Vector3#equals\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} v - The Vector3 to compare against.\n *\n * @return {boolean} True if the two vectors strictly match, otherwise false.\n */\n equals: function (v)\n {\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z));\n },\n\n /**\n * Copy the components of a given Vector into this Vector.\n *\n * @method Phaser.Math.Vector3#copy\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} src - The Vector to copy the components from.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n copy: function (src)\n {\n this.x = src.x;\n this.y = src.y;\n this.z = src.z || 0;\n\n return this;\n },\n\n /**\n * Set the `x`, `y`, and `z` components of this Vector to the given `x`, `y`, and `z` values.\n *\n * @method Phaser.Math.Vector3#set\n * @since 3.0.0\n *\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y and z components.\n * @param {number} [y] - The y value to set for this Vector.\n * @param {number} [z] - The z value to set for this Vector.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n set: function (x, y, z)\n {\n if (typeof x === 'object')\n {\n this.x = x.x || 0;\n this.y = x.y || 0;\n this.z = x.z || 0;\n }\n else\n {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n }\n\n return this;\n },\n\n /**\n * Add a given Vector to this Vector. Addition is component-wise.\n *\n * @method Phaser.Math.Vector3#add\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n add: function (v)\n {\n this.x += v.x;\n this.y += v.y;\n this.z += v.z || 0;\n\n return this;\n },\n\n /**\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\n *\n * @method Phaser.Math.Vector3#subtract\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to subtract from this Vector.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n subtract: function (v)\n {\n this.x -= v.x;\n this.y -= v.y;\n this.z -= v.z || 0;\n\n return this;\n },\n\n /**\n * Perform a component-wise multiplication between this Vector and the given Vector.\n *\n * Multiplies this Vector by the given Vector.\n *\n * @method Phaser.Math.Vector3#multiply\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to multiply this Vector by.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n multiply: function (v)\n {\n this.x *= v.x;\n this.y *= v.y;\n this.z *= v.z || 1;\n\n return this;\n },\n\n /**\n * Scale this Vector by the given value.\n *\n * @method Phaser.Math.Vector3#scale\n * @since 3.0.0\n *\n * @param {number} scale - The value to scale this Vector by.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n scale: function (scale)\n {\n if (isFinite(scale))\n {\n this.x *= scale;\n this.y *= scale;\n this.z *= scale;\n }\n else\n {\n this.x = 0;\n this.y = 0;\n this.z = 0;\n }\n\n return this;\n },\n\n /**\n * Perform a component-wise division between this Vector and the given Vector.\n *\n * Divides this Vector by the given Vector.\n *\n * @method Phaser.Math.Vector3#divide\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to divide this Vector by.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n divide: function (v)\n {\n this.x /= v.x;\n this.y /= v.y;\n this.z /= v.z || 1;\n\n return this;\n },\n\n /**\n * Negate the `x`, `y` and `z` components of this Vector.\n *\n * @method Phaser.Math.Vector3#negate\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n negate: function ()\n {\n this.x = -this.x;\n this.y = -this.y;\n this.z = -this.z;\n\n return this;\n },\n\n /**\n * Calculate the distance between this Vector and the given Vector.\n *\n * @method Phaser.Math.Vector3#distance\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\n *\n * @return {number} The distance from this Vector to the given Vector.\n */\n distance: function (v)\n {\n var dx = v.x - this.x;\n var dy = v.y - this.y;\n var dz = v.z - this.z || 0;\n\n return Math.sqrt(dx * dx + dy * dy + dz * dz);\n },\n\n /**\n * Calculate the distance between this Vector and the given Vector, squared.\n *\n * @method Phaser.Math.Vector3#distanceSq\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\n *\n * @return {number} The distance from this Vector to the given Vector, squared.\n */\n distanceSq: function (v)\n {\n var dx = v.x - this.x;\n var dy = v.y - this.y;\n var dz = v.z - this.z || 0;\n\n return dx * dx + dy * dy + dz * dz;\n },\n\n /**\n * Calculate the length (or magnitude) of this Vector.\n *\n * @method Phaser.Math.Vector3#length\n * @since 3.0.0\n *\n * @return {number} The length of this Vector.\n */\n length: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n\n return Math.sqrt(x * x + y * y + z * z);\n },\n\n /**\n * Calculate the length of this Vector squared.\n *\n * @method Phaser.Math.Vector3#lengthSq\n * @since 3.0.0\n *\n * @return {number} The length of this Vector, squared.\n */\n lengthSq: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n\n return x * x + y * y + z * z;\n },\n\n /**\n * Normalize this Vector.\n *\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\n *\n * @method Phaser.Math.Vector3#normalize\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n normalize: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var len = x * x + y * y + z * z;\n\n if (len > 0)\n {\n len = 1 / Math.sqrt(len);\n\n this.x = x * len;\n this.y = y * len;\n this.z = z * len;\n }\n\n return this;\n },\n\n /**\n * Calculate the dot product of this Vector and the given Vector.\n *\n * @method Phaser.Math.Vector3#dot\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} v - The Vector3 to dot product with this Vector3.\n *\n * @return {number} The dot product of this Vector and `v`.\n */\n dot: function (v)\n {\n return this.x * v.x + this.y * v.y + this.z * v.z;\n },\n\n /**\n * Calculate the cross (vector) product of this Vector (which will be modified) and the given Vector.\n *\n * @method Phaser.Math.Vector3#cross\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} v - The Vector to cross product with.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n cross: function (v)\n {\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n var bx = v.x;\n var by = v.y;\n var bz = v.z;\n\n this.x = ay * bz - az * by;\n this.y = az * bx - ax * bz;\n this.z = ax * by - ay * bx;\n\n return this;\n },\n\n /**\n * Linearly interpolate between this Vector and the given Vector.\n *\n * Interpolates this Vector towards the given Vector.\n *\n * @method Phaser.Math.Vector3#lerp\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} v - The Vector3 to interpolate towards.\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n lerp: function (v, t)\n {\n if (t === undefined) { t = 0; }\n\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n\n this.x = ax + t * (v.x - ax);\n this.y = ay + t * (v.y - ay);\n this.z = az + t * (v.z - az);\n\n return this;\n },\n\n /**\n * Transform this Vector with the given Matrix.\n *\n * @method Phaser.Math.Vector3#transformMat3\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector3 with.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n transformMat3: function (mat)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var m = mat.val;\n\n this.x = x * m[0] + y * m[3] + z * m[6];\n this.y = x * m[1] + y * m[4] + z * m[7];\n this.z = x * m[2] + y * m[5] + z * m[8];\n\n return this;\n },\n\n /**\n * Transform this Vector with the given Matrix.\n *\n * @method Phaser.Math.Vector3#transformMat4\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n transformMat4: function (mat)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var m = mat.val;\n\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12];\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13];\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14];\n\n return this;\n },\n\n /**\n * Transforms the coordinates of this Vector3 with the given Matrix4.\n *\n * @method Phaser.Math.Vector3#transformCoordinates\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n transformCoordinates: function (mat)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var m = mat.val;\n\n var tx = (x * m[0]) + (y * m[4]) + (z * m[8]) + m[12];\n var ty = (x * m[1]) + (y * m[5]) + (z * m[9]) + m[13];\n var tz = (x * m[2]) + (y * m[6]) + (z * m[10]) + m[14];\n var tw = (x * m[3]) + (y * m[7]) + (z * m[11]) + m[15];\n\n this.x = tx / tw;\n this.y = ty / tw;\n this.z = tz / tw;\n\n return this;\n },\n\n /**\n * Transform this Vector with the given Quaternion.\n *\n * @method Phaser.Math.Vector3#transformQuat\n * @since 3.0.0\n *\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n transformQuat: function (q)\n {\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var qx = q.x;\n var qy = q.y;\n var qz = q.z;\n var qw = q.w;\n\n // calculate quat * vec\n var ix = qw * x + qy * z - qz * y;\n var iy = qw * y + qz * x - qx * z;\n var iz = qw * z + qx * y - qy * x;\n var iw = -qx * x - qy * y - qz * z;\n\n // calculate result * inverse quat\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n\n return this;\n },\n\n /**\n * Multiplies this Vector3 by the specified matrix, applying a W divide. This is useful for projection,\n * e.g. unprojecting a 2D point into 3D space.\n *\n * @method Phaser.Math.Vector3#project\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to multiply this Vector3 with.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n project: function (mat)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var m = mat.val;\n\n var a00 = m[0];\n var a01 = m[1];\n var a02 = m[2];\n var a03 = m[3];\n var a10 = m[4];\n var a11 = m[5];\n var a12 = m[6];\n var a13 = m[7];\n var a20 = m[8];\n var a21 = m[9];\n var a22 = m[10];\n var a23 = m[11];\n var a30 = m[12];\n var a31 = m[13];\n var a32 = m[14];\n var a33 = m[15];\n\n var lw = 1 / (x * a03 + y * a13 + z * a23 + a33);\n\n this.x = (x * a00 + y * a10 + z * a20 + a30) * lw;\n this.y = (x * a01 + y * a11 + z * a21 + a31) * lw;\n this.z = (x * a02 + y * a12 + z * a22 + a32) * lw;\n\n return this;\n },\n\n /**\n * Unproject this point from 2D space to 3D space.\n * The point should have its x and y properties set to\n * 2D screen space, and the z either at 0 (near plane)\n * or 1 (far plane). The provided matrix is assumed to already\n * be combined, i.e. projection * view * model.\n *\n * After this operation, this vector's (x, y, z) components will\n * represent the unprojected 3D coordinate.\n *\n * @method Phaser.Math.Vector3#unproject\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector4} viewport - Screen x, y, width and height in pixels.\n * @param {Phaser.Math.Matrix4} invProjectionView - Combined projection and view matrix.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n unproject: function (viewport, invProjectionView)\n {\n var viewX = viewport.x;\n var viewY = viewport.y;\n var viewWidth = viewport.z;\n var viewHeight = viewport.w;\n\n var x = this.x - viewX;\n var y = (viewHeight - this.y - 1) - viewY;\n var z = this.z;\n\n this.x = (2 * x) / viewWidth - 1;\n this.y = (2 * y) / viewHeight - 1;\n this.z = 2 * z - 1;\n\n return this.project(invProjectionView);\n },\n\n /**\n * Make this Vector the zero vector (0, 0, 0).\n *\n * @method Phaser.Math.Vector3#reset\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n reset: function ()\n {\n this.x = 0;\n this.y = 0;\n this.z = 0;\n\n return this;\n }\n\n});\n\n/**\n * A static zero Vector3 for use by reference.\n * \n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector3.ZERO\n * @type {Phaser.Math.Vector3}\n * @since 3.16.0\n */\nVector3.ZERO = new Vector3();\n\n/**\n * A static right Vector3 for use by reference.\n * \n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector3.RIGHT\n * @type {Phaser.Math.Vector3}\n * @since 3.16.0\n */\nVector3.RIGHT = new Vector3(1, 0, 0);\n\n/**\n * A static left Vector3 for use by reference.\n * \n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector3.LEFT\n * @type {Phaser.Math.Vector3}\n * @since 3.16.0\n */\nVector3.LEFT = new Vector3(-1, 0, 0);\n\n/**\n * A static up Vector3 for use by reference.\n * \n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector3.UP\n * @type {Phaser.Math.Vector3}\n * @since 3.16.0\n */\nVector3.UP = new Vector3(0, -1, 0);\n\n/**\n * A static down Vector3 for use by reference.\n * \n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector3.DOWN\n * @type {Phaser.Math.Vector3}\n * @since 3.16.0\n */\nVector3.DOWN = new Vector3(0, 1, 0);\n\n/**\n * A static forward Vector3 for use by reference.\n * \n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector3.FORWARD\n * @type {Phaser.Math.Vector3}\n * @since 3.16.0\n */\nVector3.FORWARD = new Vector3(0, 0, 1);\n\n/**\n * A static back Vector3 for use by reference.\n * \n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector3.BACK\n * @type {Phaser.Math.Vector3}\n * @since 3.16.0\n */\nVector3.BACK = new Vector3(0, 0, -1);\n\n/**\n * A static one Vector3 for use by reference.\n * \n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector3.ONE\n * @type {Phaser.Math.Vector3}\n * @since 3.16.0\n */\nVector3.ONE = new Vector3(1, 1, 1);\n\nmodule.exports = Vector3;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\n\nvar Class = require('../utils/Class');\n\n/**\n * @classdesc\n * A representation of a vector in 4D space.\n *\n * A four-component vector.\n *\n * @class Vector4\n * @memberof Phaser.Math\n * @constructor\n * @since 3.0.0\n *\n * @param {number} [x] - The x component.\n * @param {number} [y] - The y component.\n * @param {number} [z] - The z component.\n * @param {number} [w] - The w component.\n */\nvar Vector4 = new Class({\n\n initialize:\n\n function Vector4 (x, y, z, w)\n {\n /**\n * The x component of this Vector.\n *\n * @name Phaser.Math.Vector4#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.x = 0;\n\n /**\n * The y component of this Vector.\n *\n * @name Phaser.Math.Vector4#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.y = 0;\n\n /**\n * The z component of this Vector.\n *\n * @name Phaser.Math.Vector4#z\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.z = 0;\n\n /**\n * The w component of this Vector.\n *\n * @name Phaser.Math.Vector4#w\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.w = 0;\n\n if (typeof x === 'object')\n {\n this.x = x.x || 0;\n this.y = x.y || 0;\n this.z = x.z || 0;\n this.w = x.w || 0;\n }\n else\n {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n this.w = w || 0;\n }\n },\n\n /**\n * Make a clone of this Vector4.\n *\n * @method Phaser.Math.Vector4#clone\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector4} A clone of this Vector4.\n */\n clone: function ()\n {\n return new Vector4(this.x, this.y, this.z, this.w);\n },\n\n /**\n * Copy the components of a given Vector into this Vector.\n *\n * @method Phaser.Math.Vector4#copy\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector4} src - The Vector to copy the components from.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n copy: function (src)\n {\n this.x = src.x;\n this.y = src.y;\n this.z = src.z || 0;\n this.w = src.w || 0;\n\n return this;\n },\n\n /**\n * Check whether this Vector is equal to a given Vector.\n *\n * Performs a strict quality check against each Vector's components.\n *\n * @method Phaser.Math.Vector4#equals\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector4} v - The vector to check equality with.\n *\n * @return {boolean} A boolean indicating whether the two Vectors are equal or not.\n */\n equals: function (v)\n {\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z) && (this.w === v.w));\n },\n\n /**\n * Set the `x`, `y`, `z` and `w` components of the this Vector to the given `x`, `y`, `z` and `w` values.\n *\n * @method Phaser.Math.Vector4#set\n * @since 3.0.0\n *\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y, z and w components.\n * @param {number} y - The y value to set for this Vector.\n * @param {number} z - The z value to set for this Vector.\n * @param {number} w - The z value to set for this Vector.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n set: function (x, y, z, w)\n {\n if (typeof x === 'object')\n {\n this.x = x.x || 0;\n this.y = x.y || 0;\n this.z = x.z || 0;\n this.w = x.w || 0;\n }\n else\n {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n this.w = w || 0;\n }\n\n return this;\n },\n\n /**\n * Add a given Vector to this Vector. Addition is component-wise.\n *\n * @method Phaser.Math.Vector4#add\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to add to this Vector.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n add: function (v)\n {\n this.x += v.x;\n this.y += v.y;\n this.z += v.z || 0;\n this.w += v.w || 0;\n\n return this;\n },\n\n /**\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\n *\n * @method Phaser.Math.Vector4#subtract\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to subtract from this Vector.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n subtract: function (v)\n {\n this.x -= v.x;\n this.y -= v.y;\n this.z -= v.z || 0;\n this.w -= v.w || 0;\n\n return this;\n },\n\n /**\n * Scale this Vector by the given value.\n *\n * @method Phaser.Math.Vector4#scale\n * @since 3.0.0\n *\n * @param {number} scale - The value to scale this Vector by.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n scale: function (scale)\n {\n this.x *= scale;\n this.y *= scale;\n this.z *= scale;\n this.w *= scale;\n\n return this;\n },\n\n /**\n * Calculate the length (or magnitude) of this Vector.\n *\n * @method Phaser.Math.Vector4#length\n * @since 3.0.0\n *\n * @return {number} The length of this Vector.\n */\n length: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var w = this.w;\n\n return Math.sqrt(x * x + y * y + z * z + w * w);\n },\n\n /**\n * Calculate the length of this Vector squared.\n *\n * @method Phaser.Math.Vector4#lengthSq\n * @since 3.0.0\n *\n * @return {number} The length of this Vector, squared.\n */\n lengthSq: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var w = this.w;\n\n return x * x + y * y + z * z + w * w;\n },\n\n /**\n * Normalize this Vector.\n *\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\n *\n * @method Phaser.Math.Vector4#normalize\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n normalize: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var w = this.w;\n var len = x * x + y * y + z * z + w * w;\n\n if (len > 0)\n {\n len = 1 / Math.sqrt(len);\n\n this.x = x * len;\n this.y = y * len;\n this.z = z * len;\n this.w = w * len;\n }\n\n return this;\n },\n\n /**\n * Calculate the dot product of this Vector and the given Vector.\n *\n * @method Phaser.Math.Vector4#dot\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector4} v - The Vector4 to dot product with this Vector4.\n *\n * @return {number} The dot product of this Vector and the given Vector.\n */\n dot: function (v)\n {\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\n },\n\n /**\n * Linearly interpolate between this Vector and the given Vector.\n *\n * Interpolates this Vector towards the given Vector.\n *\n * @method Phaser.Math.Vector4#lerp\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector4} v - The Vector4 to interpolate towards.\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n lerp: function (v, t)\n {\n if (t === undefined) { t = 0; }\n\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n var aw = this.w;\n\n this.x = ax + t * (v.x - ax);\n this.y = ay + t * (v.y - ay);\n this.z = az + t * (v.z - az);\n this.w = aw + t * (v.w - aw);\n\n return this;\n },\n\n /**\n * Perform a component-wise multiplication between this Vector and the given Vector.\n *\n * Multiplies this Vector by the given Vector.\n *\n * @method Phaser.Math.Vector4#multiply\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to multiply this Vector by.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n multiply: function (v)\n {\n this.x *= v.x;\n this.y *= v.y;\n this.z *= v.z || 1;\n this.w *= v.w || 1;\n\n return this;\n },\n\n /**\n * Perform a component-wise division between this Vector and the given Vector.\n *\n * Divides this Vector by the given Vector.\n *\n * @method Phaser.Math.Vector4#divide\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to divide this Vector by.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n divide: function (v)\n {\n this.x /= v.x;\n this.y /= v.y;\n this.z /= v.z || 1;\n this.w /= v.w || 1;\n\n return this;\n },\n\n /**\n * Calculate the distance between this Vector and the given Vector.\n *\n * @method Phaser.Math.Vector4#distance\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\n *\n * @return {number} The distance from this Vector to the given Vector.\n */\n distance: function (v)\n {\n var dx = v.x - this.x;\n var dy = v.y - this.y;\n var dz = v.z - this.z || 0;\n var dw = v.w - this.w || 0;\n\n return Math.sqrt(dx * dx + dy * dy + dz * dz + dw * dw);\n },\n\n /**\n * Calculate the distance between this Vector and the given Vector, squared.\n *\n * @method Phaser.Math.Vector4#distanceSq\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\n *\n * @return {number} The distance from this Vector to the given Vector, squared.\n */\n distanceSq: function (v)\n {\n var dx = v.x - this.x;\n var dy = v.y - this.y;\n var dz = v.z - this.z || 0;\n var dw = v.w - this.w || 0;\n\n return dx * dx + dy * dy + dz * dz + dw * dw;\n },\n\n /**\n * Negate the `x`, `y`, `z` and `w` components of this Vector.\n *\n * @method Phaser.Math.Vector4#negate\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n negate: function ()\n {\n this.x = -this.x;\n this.y = -this.y;\n this.z = -this.z;\n this.w = -this.w;\n\n return this;\n },\n\n /**\n * Transform this Vector with the given Matrix.\n *\n * @method Phaser.Math.Vector4#transformMat4\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector4 with.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n transformMat4: function (mat)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var w = this.w;\n var m = mat.val;\n\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\n this.w = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\n\n return this;\n },\n\n /**\n * Transform this Vector with the given Quaternion.\n *\n * @method Phaser.Math.Vector4#transformQuat\n * @since 3.0.0\n *\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n transformQuat: function (q)\n {\n // TODO: is this really the same as Vector3?\n // Also, what about this: http://molecularmusings.wordpress.com/2013/05/24/a-faster-quaternion-vector-multiplication/\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var qx = q.x;\n var qy = q.y;\n var qz = q.z;\n var qw = q.w;\n\n // calculate quat * vec\n var ix = qw * x + qy * z - qz * y;\n var iy = qw * y + qz * x - qx * z;\n var iz = qw * z + qx * y - qy * x;\n var iw = -qx * x - qy * y - qz * z;\n\n // calculate result * inverse quat\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n\n return this;\n },\n\n /**\n * Make this Vector the zero vector (0, 0, 0, 0).\n *\n * @method Phaser.Math.Vector4#reset\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n reset: function ()\n {\n this.x = 0;\n this.y = 0;\n this.z = 0;\n this.w = 0;\n\n return this;\n }\n\n});\n\n// TODO: Check if these are required internally, if not, remove.\nVector4.prototype.sub = Vector4.prototype.subtract;\nVector4.prototype.mul = Vector4.prototype.multiply;\nVector4.prototype.div = Vector4.prototype.divide;\nVector4.prototype.dist = Vector4.prototype.distance;\nVector4.prototype.distSq = Vector4.prototype.distanceSq;\nVector4.prototype.len = Vector4.prototype.length;\nVector4.prototype.lenSq = Vector4.prototype.lengthSq;\n\nmodule.exports = Vector4;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Checks if the two values are within the given `tolerance` of each other.\n *\n * @function Phaser.Math.Within\n * @since 3.0.0\n *\n * @param {number} a - The first value to use in the calculation.\n * @param {number} b - The second value to use in the calculation.\n * @param {number} tolerance - The tolerance. Anything equal to or less than this value is considered as being within range.\n *\n * @return {boolean} Returns `true` if `a` is less than or equal to the tolerance of `b`.\n */\nvar Within = function (a, b, tolerance)\n{\n return (Math.abs(a - b) <= tolerance);\n};\n\nmodule.exports = Within;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Wrap the given `value` between `min` and `max.\n *\n * @function Phaser.Math.Wrap\n * @since 3.0.0\n *\n * @param {number} value - The value to wrap.\n * @param {number} min - The minimum value.\n * @param {number} max - The maximum value.\n *\n * @return {number} The wrapped value.\n */\nvar Wrap = function (value, min, max)\n{\n var range = max - min;\n\n return (min + ((((value - min) % range) + range) % range));\n};\n\nmodule.exports = Wrap;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\n *\n * @function Phaser.Math.Angle.Between\n * @since 3.0.0\n *\n * @param {number} x1 - The x coordinate of the first point.\n * @param {number} y1 - The y coordinate of the first point.\n * @param {number} x2 - The x coordinate of the second point.\n * @param {number} y2 - The y coordinate of the second point.\n *\n * @return {number} The angle in radians.\n */\nvar Between = function (x1, y1, x2, y2)\n{\n return Math.atan2(y2 - y1, x2 - x1);\n};\n\nmodule.exports = Between;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\n *\n * Calculates the angle of the vector from the first point to the second point.\n *\n * @function Phaser.Math.Angle.BetweenPoints\n * @since 3.0.0\n *\n * @param {Phaser.Types.Math.Vector2Like} point1 - The first point.\n * @param {Phaser.Types.Math.Vector2Like} point2 - The second point.\n *\n * @return {number} The angle in radians.\n */\nvar BetweenPoints = function (point1, point2)\n{\n return Math.atan2(point2.y - point1.y, point2.x - point1.x);\n};\n\nmodule.exports = BetweenPoints;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\n *\n * The difference between this method and {@link Phaser.Math.Angle.BetweenPoints} is that this assumes the y coordinate\n * travels down the screen.\n *\n * @function Phaser.Math.Angle.BetweenPointsY\n * @since 3.0.0\n *\n * @param {Phaser.Types.Math.Vector2Like} point1 - The first point.\n * @param {Phaser.Types.Math.Vector2Like} point2 - The second point.\n *\n * @return {number} The angle in radians.\n */\nvar BetweenPointsY = function (point1, point2)\n{\n return Math.atan2(point2.x - point1.x, point2.y - point1.y);\n};\n\nmodule.exports = BetweenPointsY;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\n *\n * The difference between this method and {@link Phaser.Math.Angle.Between} is that this assumes the y coordinate\n * travels down the screen.\n *\n * @function Phaser.Math.Angle.BetweenY\n * @since 3.0.0\n *\n * @param {number} x1 - The x coordinate of the first point.\n * @param {number} y1 - The y coordinate of the first point.\n * @param {number} x2 - The x coordinate of the second point.\n * @param {number} y2 - The y coordinate of the second point.\n *\n * @return {number} The angle in radians.\n */\nvar BetweenY = function (x1, y1, x2, y2)\n{\n return Math.atan2(x2 - x1, y2 - y1);\n};\n\nmodule.exports = BetweenY;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CONST = require('../const');\n\n/**\n * Takes an angle in Phasers default clockwise format and converts it so that\n * 0 is North, 90 is West, 180 is South and 270 is East,\n * therefore running counter-clockwise instead of clockwise.\n * \n * You can pass in the angle from a Game Object using:\n * \n * ```javascript\n * var converted = CounterClockwise(gameobject.rotation);\n * ```\n * \n * All values for this function are in radians.\n *\n * @function Phaser.Math.Angle.CounterClockwise\n * @since 3.16.0\n *\n * @param {number} angle - The angle to convert, in radians.\n *\n * @return {number} The converted angle, in radians.\n */\nvar CounterClockwise = function (angle)\n{\n if (angle > Math.PI)\n {\n angle -= CONST.PI2;\n }\n\n return Math.abs((((angle + CONST.TAU) % CONST.PI2) - CONST.PI2) % CONST.PI2);\n};\n\nmodule.exports = CounterClockwise;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Normalize an angle to the [0, 2pi] range.\n *\n * @function Phaser.Math.Angle.Normalize\n * @since 3.0.0\n *\n * @param {number} angle - The angle to normalize, in radians.\n *\n * @return {number} The normalized angle, in radians.\n */\nvar Normalize = function (angle)\n{\n angle = angle % (2 * Math.PI);\n\n if (angle >= 0)\n {\n return angle;\n }\n else\n {\n return angle + 2 * Math.PI;\n }\n};\n\nmodule.exports = Normalize;\n","/**\n * @author Richard Davey \n * @author @samme\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar FloatBetween = require('../FloatBetween');\n\n/**\n * Returns a random angle in the range [-pi, pi].\n *\n * @function Phaser.Math.Angle.Random\n * @since 3.23.0\n *\n * @return {number} The angle, in radians.\n */\nvar Random = function ()\n{\n return FloatBetween(-Math.PI, Math.PI);\n};\n\nmodule.exports = Random;\n","/**\n * @author Richard Davey \n * @author @samme\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar FloatBetween = require('../FloatBetween');\n\n/**\n * Returns a random angle in the range [-180, 180].\n *\n * @function Phaser.Math.Angle.RandomDegrees\n * @since 3.23.0\n *\n * @return {number} The angle, in degrees.\n */\nvar RandomDegrees = function ()\n{\n return FloatBetween(-180, 180);\n};\n\nmodule.exports = RandomDegrees;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Normalize = require('./Normalize');\n\n/**\n * Reverse the given angle.\n *\n * @function Phaser.Math.Angle.Reverse\n * @since 3.0.0\n *\n * @param {number} angle - The angle to reverse, in radians.\n *\n * @return {number} The reversed angle, in radians.\n */\nvar Reverse = function (angle)\n{\n return Normalize(angle + Math.PI);\n};\n\nmodule.exports = Reverse;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar MATH_CONST = require('../const');\n\n/**\n * Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call.\n *\n * @function Phaser.Math.Angle.RotateTo\n * @since 3.0.0\n *\n * @param {number} currentAngle - The current angle, in radians.\n * @param {number} targetAngle - The target angle to rotate to, in radians.\n * @param {number} [lerp=0.05] - The lerp value to add to the current angle.\n *\n * @return {number} The adjusted angle.\n */\nvar RotateTo = function (currentAngle, targetAngle, lerp)\n{\n if (lerp === undefined) { lerp = 0.05; }\n\n if (currentAngle === targetAngle)\n {\n return currentAngle;\n }\n\n if (Math.abs(targetAngle - currentAngle) <= lerp || Math.abs(targetAngle - currentAngle) >= (MATH_CONST.PI2 - lerp))\n {\n currentAngle = targetAngle;\n }\n else\n {\n if (Math.abs(targetAngle - currentAngle) > Math.PI)\n {\n if (targetAngle < currentAngle)\n {\n targetAngle += MATH_CONST.PI2;\n }\n else\n {\n targetAngle -= MATH_CONST.PI2;\n }\n }\n\n if (targetAngle > currentAngle)\n {\n currentAngle += lerp;\n }\n else if (targetAngle < currentAngle)\n {\n currentAngle -= lerp;\n }\n }\n\n return currentAngle;\n};\n\nmodule.exports = RotateTo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Gets the shortest angle between `angle1` and `angle2`.\n *\n * Both angles must be in the range -180 to 180, which is the same clamped\n * range that `sprite.angle` uses, so you can pass in two sprite angles to\n * this method and get the shortest angle back between the two of them.\n *\n * The angle returned will be in the same range. If the returned angle is\n * greater than 0 then it's a counter-clockwise rotation, if < 0 then it's\n * a clockwise rotation.\n *\n * TODO: Wrap the angles in this function?\n *\n * @function Phaser.Math.Angle.ShortestBetween\n * @since 3.0.0\n *\n * @param {number} angle1 - The first angle in the range -180 to 180.\n * @param {number} angle2 - The second angle in the range -180 to 180.\n *\n * @return {number} The shortest angle, in degrees. If greater than zero it's a counter-clockwise rotation.\n */\nvar ShortestBetween = function (angle1, angle2)\n{\n var difference = angle2 - angle1;\n\n if (difference === 0)\n {\n return 0;\n }\n\n var times = Math.floor((difference - (-180)) / 360);\n\n return difference - (times * 360);\n\n};\n\nmodule.exports = ShortestBetween;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar MathWrap = require('../Wrap');\n\n/**\n * Wrap an angle.\n *\n * Wraps the angle to a value in the range of -PI to PI.\n *\n * @function Phaser.Math.Angle.Wrap\n * @since 3.0.0\n *\n * @param {number} angle - The angle to wrap, in radians.\n *\n * @return {number} The wrapped angle, in radians.\n */\nvar Wrap = function (angle)\n{\n return MathWrap(angle, -Math.PI, Math.PI);\n};\n\nmodule.exports = Wrap;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Wrap = require('../Wrap');\n\n/**\n * Wrap an angle in degrees.\n *\n * Wraps the angle to a value in the range of -180 to 180.\n *\n * @function Phaser.Math.Angle.WrapDegrees\n * @since 3.0.0\n *\n * @param {number} angle - The angle to wrap, in degrees.\n *\n * @return {number} The wrapped angle, in degrees.\n */\nvar WrapDegrees = function (angle)\n{\n return Wrap(angle, -180, 180);\n};\n\nmodule.exports = WrapDegrees;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Angle\n */\n\nmodule.exports = {\n\n Between: require('./Between'),\n BetweenPoints: require('./BetweenPoints'),\n BetweenPointsY: require('./BetweenPointsY'),\n BetweenY: require('./BetweenY'),\n CounterClockwise: require('./CounterClockwise'),\n Normalize: require('./Normalize'),\n Random: require('./Random'),\n RandomDegrees: require('./RandomDegrees'),\n Reverse: require('./Reverse'),\n RotateTo: require('./RotateTo'),\n ShortestBetween: require('./ShortestBetween'),\n Wrap: require('./Wrap'),\n WrapDegrees: require('./WrapDegrees')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar MATH_CONST = {\n\n /**\n * The value of PI * 2.\n * \n * @name Phaser.Math.PI2\n * @type {number}\n * @since 3.0.0\n */\n PI2: Math.PI * 2,\n\n /**\n * The value of PI * 0.5.\n * \n * @name Phaser.Math.TAU\n * @type {number}\n * @since 3.0.0\n */\n TAU: Math.PI * 0.5,\n\n /**\n * An epsilon value (1.0e-6)\n * \n * @name Phaser.Math.EPSILON\n * @type {number}\n * @since 3.0.0\n */\n EPSILON: 1.0e-6,\n\n /**\n * For converting degrees to radians (PI / 180)\n * \n * @name Phaser.Math.DEG_TO_RAD\n * @type {number}\n * @since 3.0.0\n */\n DEG_TO_RAD: Math.PI / 180,\n\n /**\n * For converting radians to degrees (180 / PI)\n * \n * @name Phaser.Math.RAD_TO_DEG\n * @type {number}\n * @since 3.0.0\n */\n RAD_TO_DEG: 180 / Math.PI,\n\n /**\n * An instance of the Random Number Generator.\n * This is not set until the Game boots.\n * \n * @name Phaser.Math.RND\n * @type {Phaser.Math.RandomDataGenerator}\n * @since 3.0.0\n */\n RND: null,\n\n /**\n * The minimum safe integer this browser supports.\n * We use a const for backward compatibility with Internet Explorer.\n * \n * @name Phaser.Math.MIN_SAFE_INTEGER\n * @type {number}\n * @since 3.21.0\n */\n MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991,\n\n /**\n * The maximum safe integer this browser supports.\n * We use a const for backward compatibility with Internet Explorer.\n * \n * @name Phaser.Math.MAX_SAFE_INTEGER\n * @type {number}\n * @since 3.21.0\n */\n MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991\n\n};\n\nmodule.exports = MATH_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the distance between two sets of coordinates (points).\n *\n * @function Phaser.Math.Distance.Between\n * @since 3.0.0\n *\n * @param {number} x1 - The x coordinate of the first point.\n * @param {number} y1 - The y coordinate of the first point.\n * @param {number} x2 - The x coordinate of the second point.\n * @param {number} y2 - The y coordinate of the second point.\n *\n * @return {number} The distance between each point.\n */\nvar DistanceBetween = function (x1, y1, x2, y2)\n{\n var dx = x1 - x2;\n var dy = y1 - y2;\n\n return Math.sqrt(dx * dx + dy * dy);\n};\n\nmodule.exports = DistanceBetween;\n","/**\n * @author samme\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the distance between two points.\n *\n * @function Phaser.Math.Distance.BetweenPoints\n * @since 3.22.0\n *\n * @param {Phaser.Types.Math.Vector2Like} a - The first point.\n * @param {Phaser.Types.Math.Vector2Like} b - The second point.\n *\n * @return {number} The distance between the points.\n */\nvar DistanceBetweenPoints = function (a, b)\n{\n var dx = a.x - b.x;\n var dy = a.y - b.y;\n\n return Math.sqrt(dx * dx + dy * dy);\n};\n\nmodule.exports = DistanceBetweenPoints;\n","/**\n * @author samme\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the squared distance between two points.\n *\n * @function Phaser.Math.Distance.BetweenPointsSquared\n * @since 3.22.0\n *\n * @param {Phaser.Types.Math.Vector2Like} a - The first point.\n * @param {Phaser.Types.Math.Vector2Like} b - The second point.\n *\n * @return {number} The squared distance between the points.\n */\nvar DistanceBetweenPointsSquared = function (a, b)\n{\n var dx = a.x - b.x;\n var dy = a.y - b.y;\n\n return dx * dx + dy * dy;\n};\n\nmodule.exports = DistanceBetweenPointsSquared;\n","/**\n * @author samme\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the Chebyshev distance between two sets of coordinates (points).\n *\n * Chebyshev distance (or chessboard distance) is the maximum of the horizontal and vertical distances.\n * It's the effective distance when movement can be horizontal, vertical, or diagonal.\n *\n * @function Phaser.Math.Distance.Chebyshev\n * @since 3.22.0\n *\n * @param {number} x1 - The x coordinate of the first point.\n * @param {number} y1 - The y coordinate of the first point.\n * @param {number} x2 - The x coordinate of the second point.\n * @param {number} y2 - The y coordinate of the second point.\n *\n * @return {number} The distance between each point.\n */\nvar ChebyshevDistance = function (x1, y1, x2, y2)\n{\n return Math.max(Math.abs(x1 - x2), Math.abs(y1 - y2));\n};\n\nmodule.exports = ChebyshevDistance;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the distance between two sets of coordinates (points) to the power of `pow`.\n *\n * @function Phaser.Math.Distance.Power\n * @since 3.0.0\n *\n * @param {number} x1 - The x coordinate of the first point.\n * @param {number} y1 - The y coordinate of the first point.\n * @param {number} x2 - The x coordinate of the second point.\n * @param {number} y2 - The y coordinate of the second point.\n * @param {number} pow - The exponent.\n *\n * @return {number} The distance between each point.\n */\nvar DistancePower = function (x1, y1, x2, y2, pow)\n{\n if (pow === undefined) { pow = 2; }\n\n return Math.sqrt(Math.pow(x2 - x1, pow) + Math.pow(y2 - y1, pow));\n};\n\nmodule.exports = DistancePower;\n","/**\n * @author samme\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the snake distance between two sets of coordinates (points).\n *\n * Snake distance (rectilinear distance, Manhattan distance) is the sum of the horizontal and vertical distances.\n * It's the effective distance when movement is allowed only horizontally or vertically (but not both).\n *\n * @function Phaser.Math.Distance.Snake\n * @since 3.22.0\n *\n * @param {number} x1 - The x coordinate of the first point.\n * @param {number} y1 - The y coordinate of the first point.\n * @param {number} x2 - The x coordinate of the second point.\n * @param {number} y2 - The y coordinate of the second point.\n *\n * @return {number} The distance between each point.\n */\nvar SnakeDistance = function (x1, y1, x2, y2)\n{\n return Math.abs(x1 - x2) + Math.abs(y1 - y2);\n};\n\nmodule.exports = SnakeDistance;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the distance between two sets of coordinates (points), squared.\n *\n * @function Phaser.Math.Distance.Squared\n * @since 3.0.0\n *\n * @param {number} x1 - The x coordinate of the first point.\n * @param {number} y1 - The y coordinate of the first point.\n * @param {number} x2 - The x coordinate of the second point.\n * @param {number} y2 - The y coordinate of the second point.\n *\n * @return {number} The distance between each point, squared.\n */\nvar DistanceSquared = function (x1, y1, x2, y2)\n{\n var dx = x1 - x2;\n var dy = y1 - y2;\n\n return dx * dx + dy * dy;\n};\n\nmodule.exports = DistanceSquared;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Distance\n */\n\nmodule.exports = {\n\n Between: require('./DistanceBetween'),\n BetweenPoints: require('./DistanceBetweenPoints'),\n BetweenPointsSquared: require('./DistanceBetweenPointsSquared'),\n Chebyshev: require('./DistanceChebyshev'),\n Power: require('./DistancePower'),\n Snake: require('./DistanceSnake'),\n Squared: require('./DistanceSquared')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Back ease-in.\n *\n * @function Phaser.Math.Easing.Back.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n * @param {number} [overshoot=1.70158] - The overshoot amount.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v, overshoot)\n{\n if (overshoot === undefined) { overshoot = 1.70158; }\n\n return v * v * ((overshoot + 1) * v - overshoot);\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Back ease-in/out.\n *\n * @function Phaser.Math.Easing.Back.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n * @param {number} [overshoot=1.70158] - The overshoot amount.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v, overshoot)\n{\n if (overshoot === undefined) { overshoot = 1.70158; }\n\n var s = overshoot * 1.525;\n\n if ((v *= 2) < 1)\n {\n return 0.5 * (v * v * ((s + 1) * v - s));\n }\n else\n {\n return 0.5 * ((v -= 2) * v * ((s + 1) * v + s) + 2);\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Back ease-out.\n *\n * @function Phaser.Math.Easing.Back.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n * @param {number} [overshoot=1.70158] - The overshoot amount.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v, overshoot)\n{\n if (overshoot === undefined) { overshoot = 1.70158; }\n\n return --v * v * ((overshoot + 1) * v + overshoot) + 1;\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Back\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Bounce ease-in.\n *\n * @function Phaser.Math.Easing.Bounce.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v)\n{\n v = 1 - v;\n\n if (v < 1 / 2.75)\n {\n return 1 - (7.5625 * v * v);\n }\n else if (v < 2 / 2.75)\n {\n return 1 - (7.5625 * (v -= 1.5 / 2.75) * v + 0.75);\n }\n else if (v < 2.5 / 2.75)\n {\n return 1 - (7.5625 * (v -= 2.25 / 2.75) * v + 0.9375);\n }\n else\n {\n return 1 - (7.5625 * (v -= 2.625 / 2.75) * v + 0.984375);\n }\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Bounce ease-in/out.\n *\n * @function Phaser.Math.Easing.Bounce.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v)\n{\n var reverse = false;\n\n if (v < 0.5)\n {\n v = 1 - (v * 2);\n reverse = true;\n }\n else\n {\n v = (v * 2) - 1;\n }\n\n if (v < 1 / 2.75)\n {\n v = 7.5625 * v * v;\n }\n else if (v < 2 / 2.75)\n {\n v = 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\n }\n else if (v < 2.5 / 2.75)\n {\n v = 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\n }\n else\n {\n v = 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\n }\n\n if (reverse)\n {\n return (1 - v) * 0.5;\n }\n else\n {\n return v * 0.5 + 0.5;\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Bounce ease-out.\n *\n * @function Phaser.Math.Easing.Bounce.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v)\n{\n if (v < 1 / 2.75)\n {\n return 7.5625 * v * v;\n }\n else if (v < 2 / 2.75)\n {\n return 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\n }\n else if (v < 2.5 / 2.75)\n {\n return 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\n }\n else\n {\n return 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\n }\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Bounce\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Circular ease-in.\n *\n * @function Phaser.Math.Easing.Circular.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v)\n{\n return 1 - Math.sqrt(1 - v * v);\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Circular ease-in/out.\n *\n * @function Phaser.Math.Easing.Circular.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v)\n{\n if ((v *= 2) < 1)\n {\n return -0.5 * (Math.sqrt(1 - v * v) - 1);\n }\n else\n {\n return 0.5 * (Math.sqrt(1 - (v -= 2) * v) + 1);\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Circular ease-out.\n *\n * @function Phaser.Math.Easing.Circular.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v)\n{\n return Math.sqrt(1 - (--v * v));\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Circular\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Cubic ease-in.\n *\n * @function Phaser.Math.Easing.Cubic.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v)\n{\n return v * v * v;\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Cubic ease-in/out.\n *\n * @function Phaser.Math.Easing.Cubic.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v)\n{\n if ((v *= 2) < 1)\n {\n return 0.5 * v * v * v;\n }\n else\n {\n return 0.5 * ((v -= 2) * v * v + 2);\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Cubic ease-out.\n *\n * @function Phaser.Math.Easing.Cubic.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v)\n{\n return --v * v * v + 1;\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Cubic\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Elastic ease-in.\n *\n * @function Phaser.Math.Easing.Elastic.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v, amplitude, period)\n{\n if (amplitude === undefined) { amplitude = 0.1; }\n if (period === undefined) { period = 0.1; }\n\n if (v === 0)\n {\n return 0;\n }\n else if (v === 1)\n {\n return 1;\n }\n else\n {\n var s = period / 4;\n\n if (amplitude < 1)\n {\n amplitude = 1;\n }\n else\n {\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\n }\n\n return -(amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\n }\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Elastic ease-in/out.\n *\n * @function Phaser.Math.Easing.Elastic.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v, amplitude, period)\n{\n if (amplitude === undefined) { amplitude = 0.1; }\n if (period === undefined) { period = 0.1; }\n\n if (v === 0)\n {\n return 0;\n }\n else if (v === 1)\n {\n return 1;\n }\n else\n {\n var s = period / 4;\n\n if (amplitude < 1)\n {\n amplitude = 1;\n }\n else\n {\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\n }\n\n if ((v *= 2) < 1)\n {\n return -0.5 * (amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\n }\n else\n {\n return amplitude * Math.pow(2, -10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period) * 0.5 + 1;\n }\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Elastic ease-out.\n *\n * @function Phaser.Math.Easing.Elastic.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v, amplitude, period)\n{\n if (amplitude === undefined) { amplitude = 0.1; }\n if (period === undefined) { period = 0.1; }\n\n if (v === 0)\n {\n return 0;\n }\n else if (v === 1)\n {\n return 1;\n }\n else\n {\n var s = period / 4;\n\n if (amplitude < 1)\n {\n amplitude = 1;\n }\n else\n {\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\n }\n\n return (amplitude * Math.pow(2, -10 * v) * Math.sin((v - s) * (2 * Math.PI) / period) + 1);\n }\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Elastic\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Exponential ease-in.\n *\n * @function Phaser.Math.Easing.Expo.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v)\n{\n return Math.pow(2, 10 * (v - 1)) - 0.001;\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Exponential ease-in/out.\n *\n * @function Phaser.Math.Easing.Expo.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v)\n{\n if ((v *= 2) < 1)\n {\n return 0.5 * Math.pow(2, 10 * (v - 1));\n }\n else\n {\n return 0.5 * (2 - Math.pow(2, -10 * (v - 1)));\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Exponential ease-out.\n *\n * @function Phaser.Math.Easing.Expo.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v)\n{\n return 1 - Math.pow(2, -10 * v);\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Expo\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing\n */\n\nmodule.exports = {\n\n Back: require('./back'),\n Bounce: require('./bounce'),\n Circular: require('./circular'),\n Cubic: require('./cubic'),\n Elastic: require('./elastic'),\n Expo: require('./expo'),\n Linear: require('./linear'),\n Quadratic: require('./quadratic'),\n Quartic: require('./quartic'),\n Quintic: require('./quintic'),\n Sine: require('./sine'),\n Stepped: require('./stepped')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Linear easing (no variation).\n *\n * @function Phaser.Math.Easing.Linear\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Linear = function (v)\n{\n return v;\n};\n\nmodule.exports = Linear;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nmodule.exports = require('./Linear');\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quadratic ease-in.\n *\n * @function Phaser.Math.Easing.Quadratic.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v)\n{\n return v * v;\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quadratic ease-in/out.\n *\n * @function Phaser.Math.Easing.Quadratic.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v)\n{\n if ((v *= 2) < 1)\n {\n return 0.5 * v * v;\n }\n else\n {\n return -0.5 * (--v * (v - 2) - 1);\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quadratic ease-out.\n *\n * @function Phaser.Math.Easing.Quadratic.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v)\n{\n return v * (2 - v);\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Quadratic\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quartic ease-in.\n *\n * @function Phaser.Math.Easing.Quartic.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v)\n{\n return v * v * v * v;\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quartic ease-in/out.\n *\n * @function Phaser.Math.Easing.Quartic.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v)\n{\n if ((v *= 2) < 1)\n {\n return 0.5 * v * v * v * v;\n }\n else\n {\n return -0.5 * ((v -= 2) * v * v * v - 2);\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quartic ease-out.\n *\n * @function Phaser.Math.Easing.Quartic.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v)\n{\n return 1 - (--v * v * v * v);\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Quartic\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quintic ease-in.\n *\n * @function Phaser.Math.Easing.Quintic.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v)\n{\n return v * v * v * v * v;\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quintic ease-in/out.\n *\n * @function Phaser.Math.Easing.Quintic.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v)\n{\n if ((v *= 2) < 1)\n {\n return 0.5 * v * v * v * v * v;\n }\n else\n {\n return 0.5 * ((v -= 2) * v * v * v * v + 2);\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quintic ease-out.\n *\n * @function Phaser.Math.Easing.Quintic.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v)\n{\n return --v * v * v * v * v + 1;\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Quintic\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Sinusoidal ease-in.\n *\n * @function Phaser.Math.Easing.Sine.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v)\n{\n if (v === 0)\n {\n return 0;\n }\n else if (v === 1)\n {\n return 1;\n }\n else\n {\n return 1 - Math.cos(v * Math.PI / 2);\n }\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Sinusoidal ease-in/out.\n *\n * @function Phaser.Math.Easing.Sine.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v)\n{\n if (v === 0)\n {\n return 0;\n }\n else if (v === 1)\n {\n return 1;\n }\n else\n {\n return 0.5 * (1 - Math.cos(Math.PI * v));\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Sinusoidal ease-out.\n *\n * @function Phaser.Math.Easing.Sine.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v)\n{\n if (v === 0)\n {\n return 0;\n }\n else if (v === 1)\n {\n return 1;\n }\n else\n {\n return Math.sin(v * Math.PI / 2);\n }\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Sine\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Stepped easing.\n *\n * @function Phaser.Math.Easing.Stepped\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n * @param {number} [steps=1] - The number of steps in the ease.\n *\n * @return {number} The tweened value.\n */\nvar Stepped = function (v, steps)\n{\n if (steps === undefined) { steps = 1; }\n\n if (v <= 0)\n {\n return 0;\n }\n else if (v >= 1)\n {\n return 1;\n }\n else\n {\n return (((steps * v) | 0) + 1) * (1 / steps);\n }\n};\n\nmodule.exports = Stepped;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Stepped\n */\n\nmodule.exports = require('./Stepped');\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the fuzzy ceiling of the given value.\n *\n * @function Phaser.Math.Fuzzy.Ceil\n * @since 3.0.0\n *\n * @param {number} value - The value.\n * @param {number} [epsilon=0.0001] - The epsilon.\n *\n * @return {number} The fuzzy ceiling of the value.\n */\nvar Ceil = function (value, epsilon)\n{\n if (epsilon === undefined) { epsilon = 0.0001; }\n\n return Math.ceil(value - epsilon);\n};\n\nmodule.exports = Ceil;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Check whether the given values are fuzzily equal.\n *\n * Two numbers are fuzzily equal if their difference is less than `epsilon`.\n *\n * @function Phaser.Math.Fuzzy.Equal\n * @since 3.0.0\n *\n * @param {number} a - The first value.\n * @param {number} b - The second value.\n * @param {number} [epsilon=0.0001] - The epsilon.\n *\n * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`.\n */\nvar Equal = function (a, b, epsilon)\n{\n if (epsilon === undefined) { epsilon = 0.0001; }\n\n return Math.abs(a - b) < epsilon;\n};\n\nmodule.exports = Equal;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the fuzzy floor of the given value.\n *\n * @function Phaser.Math.Fuzzy.Floor\n * @since 3.0.0\n *\n * @param {number} value - The value.\n * @param {number} [epsilon=0.0001] - The epsilon.\n *\n * @return {number} The floor of the value.\n */\nvar Floor = function (value, epsilon)\n{\n if (epsilon === undefined) { epsilon = 0.0001; }\n\n return Math.floor(value + epsilon);\n};\n\nmodule.exports = Floor;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Check whether `a` is fuzzily greater than `b`.\n *\n * `a` is fuzzily greater than `b` if it is more than `b - epsilon`.\n *\n * @function Phaser.Math.Fuzzy.GreaterThan\n * @since 3.0.0\n *\n * @param {number} a - The first value.\n * @param {number} b - The second value.\n * @param {number} [epsilon=0.0001] - The epsilon.\n *\n * @return {boolean} `true` if `a` is fuzzily greater than than `b`, otherwise `false`.\n */\nvar GreaterThan = function (a, b, epsilon)\n{\n if (epsilon === undefined) { epsilon = 0.0001; }\n\n return a > b - epsilon;\n};\n\nmodule.exports = GreaterThan;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Check whether `a` is fuzzily less than `b`.\n *\n * `a` is fuzzily less than `b` if it is less than `b + epsilon`.\n *\n * @function Phaser.Math.Fuzzy.LessThan\n * @since 3.0.0\n *\n * @param {number} a - The first value.\n * @param {number} b - The second value.\n * @param {number} [epsilon=0.0001] - The epsilon.\n *\n * @return {boolean} `true` if `a` is fuzzily less than `b`, otherwise `false`.\n */\nvar LessThan = function (a, b, epsilon)\n{\n if (epsilon === undefined) { epsilon = 0.0001; }\n\n return a < b + epsilon;\n};\n\nmodule.exports = LessThan;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Fuzzy\n */\n\nmodule.exports = {\n\n Ceil: require('./Ceil'),\n Equal: require('./Equal'),\n Floor: require('./Floor'),\n GreaterThan: require('./GreaterThan'),\n LessThan: require('./LessThan')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CONST = require('./const');\nvar Extend = require('../utils/object/Extend');\n\n/**\n * @namespace Phaser.Math\n */\n\nvar PhaserMath = {\n\n // Collections of functions\n Angle: require('./angle/'),\n Distance: require('./distance/'),\n Easing: require('./easing/'),\n Fuzzy: require('./fuzzy/'),\n Interpolation: require('./interpolation/'),\n Pow2: require('./pow2/'),\n Snap: require('./snap/'),\n\n // Expose the RNG Class\n RandomDataGenerator: require('./random-data-generator/RandomDataGenerator'),\n\n // Single functions\n Average: require('./Average'),\n Bernstein: require('./Bernstein'),\n Between: require('./Between'),\n CatmullRom: require('./CatmullRom'),\n CeilTo: require('./CeilTo'),\n Clamp: require('./Clamp'),\n DegToRad: require('./DegToRad'),\n Difference: require('./Difference'),\n Factorial: require('./Factorial'),\n FloatBetween: require('./FloatBetween'),\n FloorTo: require('./FloorTo'),\n FromPercent: require('./FromPercent'),\n GetSpeed: require('./GetSpeed'),\n IsEven: require('./IsEven'),\n IsEvenStrict: require('./IsEvenStrict'),\n Linear: require('./Linear'),\n MaxAdd: require('./MaxAdd'),\n MinSub: require('./MinSub'),\n Percent: require('./Percent'),\n RadToDeg: require('./RadToDeg'),\n RandomXY: require('./RandomXY'),\n RandomXYZ: require('./RandomXYZ'),\n RandomXYZW: require('./RandomXYZW'),\n Rotate: require('./Rotate'),\n RotateAround: require('./RotateAround'),\n RotateAroundDistance: require('./RotateAroundDistance'),\n RotateTo: require('./RotateTo'),\n RoundAwayFromZero: require('./RoundAwayFromZero'),\n RoundTo: require('./RoundTo'),\n SinCosTableGenerator: require('./SinCosTableGenerator'),\n SmootherStep: require('./SmootherStep'),\n SmoothStep: require('./SmoothStep'),\n ToXY: require('./ToXY'),\n TransformXY: require('./TransformXY'),\n Within: require('./Within'),\n Wrap: require('./Wrap'),\n\n // Vector classes\n Vector2: require('./Vector2'),\n Vector3: require('./Vector3'),\n Vector4: require('./Vector4'),\n Matrix3: require('./Matrix3'),\n Matrix4: require('./Matrix4'),\n Quaternion: require('./Quaternion'),\n RotateVec3: require('./RotateVec3')\n\n};\n\n// Merge in the consts\n\nPhaserMath = Extend(false, PhaserMath, CONST);\n\n// Export it\n\nmodule.exports = PhaserMath;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Bernstein = require('../Bernstein');\n\n/**\n * A bezier interpolation method.\n *\n * @function Phaser.Math.Interpolation.Bezier\n * @since 3.0.0\n *\n * @param {number[]} v - The input array of values to interpolate between.\n * @param {number} k - The percentage of interpolation, between 0 and 1.\n *\n * @return {number} The interpolated value.\n */\nvar BezierInterpolation = function (v, k)\n{\n var b = 0;\n var n = v.length - 1;\n\n for (var i = 0; i <= n; i++)\n {\n b += Math.pow(1 - k, n - i) * Math.pow(k, i) * v[i] * Bernstein(n, i);\n }\n\n return b;\n};\n\nmodule.exports = BezierInterpolation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CatmullRom = require('../CatmullRom');\n\n/**\n * A Catmull-Rom interpolation method.\n *\n * @function Phaser.Math.Interpolation.CatmullRom\n * @since 3.0.0\n *\n * @param {number[]} v - The input array of values to interpolate between.\n * @param {number} k - The percentage of interpolation, between 0 and 1.\n *\n * @return {number} The interpolated value.\n */\nvar CatmullRomInterpolation = function (v, k)\n{\n var m = v.length - 1;\n var f = m * k;\n var i = Math.floor(f);\n\n if (v[0] === v[m])\n {\n if (k < 0)\n {\n i = Math.floor(f = m * (1 + k));\n }\n\n return CatmullRom(f - i, v[(i - 1 + m) % m], v[i], v[(i + 1) % m], v[(i + 2) % m]);\n }\n else\n {\n if (k < 0)\n {\n return v[0] - (CatmullRom(-f, v[0], v[0], v[1], v[1]) - v[0]);\n }\n\n if (k > 1)\n {\n return v[m] - (CatmullRom(f - m, v[m], v[m], v[m - 1], v[m - 1]) - v[m]);\n }\n\n return CatmullRom(f - i, v[i ? i - 1 : 0], v[i], v[m < i + 1 ? m : i + 1], v[m < i + 2 ? m : i + 2]);\n }\n};\n\nmodule.exports = CatmullRomInterpolation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @ignore\n */\nfunction P0 (t, p)\n{\n var k = 1 - t;\n\n return k * k * k * p;\n}\n\n/**\n * @ignore\n */\nfunction P1 (t, p)\n{\n var k = 1 - t;\n\n return 3 * k * k * t * p;\n}\n\n/**\n * @ignore\n */\nfunction P2 (t, p)\n{\n return 3 * (1 - t) * t * t * p;\n}\n\n/**\n * @ignore\n */\nfunction P3 (t, p)\n{\n return t * t * t * p;\n}\n\n/**\n * A cubic bezier interpolation method.\n *\n * https://medium.com/@adrian_cooney/bezier-interpolation-13b68563313a\n *\n * @function Phaser.Math.Interpolation.CubicBezier\n * @since 3.0.0\n *\n * @param {number} t - The percentage of interpolation, between 0 and 1.\n * @param {number} p0 - The start point.\n * @param {number} p1 - The first control point.\n * @param {number} p2 - The second control point.\n * @param {number} p3 - The end point.\n *\n * @return {number} The interpolated value.\n */\nvar CubicBezierInterpolation = function (t, p0, p1, p2, p3)\n{\n return P0(t, p0) + P1(t, p1) + P2(t, p2) + P3(t, p3);\n};\n\nmodule.exports = CubicBezierInterpolation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Linear = require('../Linear');\n\n/**\n * A linear interpolation method.\n *\n * @function Phaser.Math.Interpolation.Linear\n * @since 3.0.0\n * @see {@link https://en.wikipedia.org/wiki/Linear_interpolation}\n *\n * @param {number[]} v - The input array of values to interpolate between.\n * @param {!number} k - The percentage of interpolation, between 0 and 1.\n *\n * @return {!number} The interpolated value.\n */\nvar LinearInterpolation = function (v, k)\n{\n var m = v.length - 1;\n var f = m * k;\n var i = Math.floor(f);\n\n if (k < 0)\n {\n return Linear(v[0], v[1], f);\n }\n else if (k > 1)\n {\n return Linear(v[m], v[m - 1], m - f);\n }\n else\n {\n return Linear(v[i], v[(i + 1 > m) ? m : i + 1], f - i);\n }\n};\n\nmodule.exports = LinearInterpolation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @ignore\n */\nfunction P0 (t, p)\n{\n var k = 1 - t;\n\n return k * k * p;\n}\n\n/**\n * @ignore\n */\nfunction P1 (t, p)\n{\n return 2 * (1 - t) * t * p;\n}\n\n/**\n * @ignore\n */\nfunction P2 (t, p)\n{\n return t * t * p;\n}\n\n// https://github.com/mrdoob/three.js/blob/master/src/extras/core/Interpolations.js\n\n/**\n * A quadratic bezier interpolation method.\n *\n * @function Phaser.Math.Interpolation.QuadraticBezier\n * @since 3.2.0\n *\n * @param {number} t - The percentage of interpolation, between 0 and 1.\n * @param {number} p0 - The start point.\n * @param {number} p1 - The control point.\n * @param {number} p2 - The end point.\n *\n * @return {number} The interpolated value.\n */\nvar QuadraticBezierInterpolation = function (t, p0, p1, p2)\n{\n return P0(t, p0) + P1(t, p1) + P2(t, p2);\n};\n\nmodule.exports = QuadraticBezierInterpolation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SmoothStep = require('../SmoothStep');\n\n/**\n * A Smooth Step interpolation method.\n *\n * @function Phaser.Math.Interpolation.SmoothStep\n * @since 3.9.0\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\n *\n * @param {number} t - The percentage of interpolation, between 0 and 1.\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\n *\n * @return {number} The interpolated value.\n */\nvar SmoothStepInterpolation = function (t, min, max)\n{\n return min + (max - min) * SmoothStep(t, 0, 1);\n};\n\nmodule.exports = SmoothStepInterpolation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SmootherStep = require('../SmootherStep');\n\n/**\n * A Smoother Step interpolation method.\n *\n * @function Phaser.Math.Interpolation.SmootherStep\n * @since 3.9.0\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\n *\n * @param {number} t - The percentage of interpolation, between 0 and 1.\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\n *\n * @return {number} The interpolated value.\n */\nvar SmootherStepInterpolation = function (t, min, max)\n{\n return min + (max - min) * SmootherStep(t, 0, 1);\n};\n\nmodule.exports = SmootherStepInterpolation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Interpolation\n */\n\nmodule.exports = {\n\n Bezier: require('./BezierInterpolation'),\n CatmullRom: require('./CatmullRomInterpolation'),\n CubicBezier: require('./CubicBezierInterpolation'),\n Linear: require('./LinearInterpolation'),\n QuadraticBezier: require('./QuadraticBezierInterpolation'),\n SmoothStep: require('./SmoothStepInterpolation'),\n SmootherStep: require('./SmootherStepInterpolation')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Returns the nearest power of 2 to the given `value`.\n *\n * @function Phaser.Math.Pow2.GetNext\n * @since 3.0.0\n *\n * @param {number} value - The value.\n *\n * @return {integer} The nearest power of 2 to `value`.\n */\nvar GetPowerOfTwo = function (value)\n{\n var index = Math.log(value) / 0.6931471805599453;\n\n return (1 << Math.ceil(index));\n};\n\nmodule.exports = GetPowerOfTwo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Checks if the given `width` and `height` are a power of two.\n * Useful for checking texture dimensions.\n *\n * @function Phaser.Math.Pow2.IsSize\n * @since 3.0.0\n *\n * @param {number} width - The width.\n * @param {number} height - The height.\n *\n * @return {boolean} `true` if `width` and `height` are a power of two, otherwise `false`.\n */\nvar IsSizePowerOfTwo = function (width, height)\n{\n return (width > 0 && (width & (width - 1)) === 0 && height > 0 && (height & (height - 1)) === 0);\n};\n\nmodule.exports = IsSizePowerOfTwo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Tests the value and returns `true` if it is a power of two.\n *\n * @function Phaser.Math.Pow2.IsValue\n * @since 3.0.0\n *\n * @param {number} value - The value to check if it's a power of two.\n *\n * @return {boolean} Returns `true` if `value` is a power of two, otherwise `false`.\n */\nvar IsValuePowerOfTwo = function (value)\n{\n return (value > 0 && (value & (value - 1)) === 0);\n};\n\nmodule.exports = IsValuePowerOfTwo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Pow2\n */\n\nmodule.exports = {\n\n GetNext: require('./GetPowerOfTwo'),\n IsSize: require('./IsSizePowerOfTwo'),\n IsValue: require('./IsValuePowerOfTwo')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\n\n/**\n * @classdesc\n * A seeded Random Data Generator.\n * \n * Access via `Phaser.Math.RND` which is an instance of this class pre-defined\n * by Phaser. Or, create your own instance to use as you require.\n * \n * The `Math.RND` generator is seeded by the Game Config property value `seed`.\n * If no such config property exists, a random number is used.\n * \n * If you create your own instance of this class you should provide a seed for it.\n * If no seed is given it will use a 'random' one based on Date.now.\n *\n * @class RandomDataGenerator\n * @memberof Phaser.Math\n * @constructor\n * @since 3.0.0\n *\n * @param {(string|string[])} [seeds] - The seeds to use for the random number generator.\n */\nvar RandomDataGenerator = new Class({\n\n initialize:\n\n function RandomDataGenerator (seeds)\n {\n if (seeds === undefined) { seeds = [ (Date.now() * Math.random()).toString() ]; }\n\n /**\n * Internal var.\n *\n * @name Phaser.Math.RandomDataGenerator#c\n * @type {number}\n * @default 1\n * @private\n * @since 3.0.0\n */\n this.c = 1;\n\n /**\n * Internal var.\n *\n * @name Phaser.Math.RandomDataGenerator#s0\n * @type {number}\n * @default 0\n * @private\n * @since 3.0.0\n */\n this.s0 = 0;\n\n /**\n * Internal var.\n *\n * @name Phaser.Math.RandomDataGenerator#s1\n * @type {number}\n * @default 0\n * @private\n * @since 3.0.0\n */\n this.s1 = 0;\n\n /**\n * Internal var.\n *\n * @name Phaser.Math.RandomDataGenerator#s2\n * @type {number}\n * @default 0\n * @private\n * @since 3.0.0\n */\n this.s2 = 0;\n\n /**\n * Internal var.\n *\n * @name Phaser.Math.RandomDataGenerator#n\n * @type {number}\n * @default 0\n * @private\n * @since 3.2.0\n */\n this.n = 0;\n\n /**\n * Signs to choose from.\n *\n * @name Phaser.Math.RandomDataGenerator#signs\n * @type {number[]}\n * @since 3.0.0\n */\n this.signs = [ -1, 1 ];\n\n if (seeds)\n {\n this.init(seeds);\n }\n },\n\n /**\n * Private random helper.\n *\n * @method Phaser.Math.RandomDataGenerator#rnd\n * @since 3.0.0\n * @private\n *\n * @return {number} A random number.\n */\n rnd: function ()\n {\n var t = 2091639 * this.s0 + this.c * 2.3283064365386963e-10; // 2^-32\n\n this.c = t | 0;\n this.s0 = this.s1;\n this.s1 = this.s2;\n this.s2 = t - this.c;\n\n return this.s2;\n },\n\n /**\n * Internal method that creates a seed hash.\n *\n * @method Phaser.Math.RandomDataGenerator#hash\n * @since 3.0.0\n * @private\n *\n * @param {string} data - The value to hash.\n *\n * @return {number} The hashed value.\n */\n hash: function (data)\n {\n var h;\n var n = this.n;\n\n data = data.toString();\n\n for (var i = 0; i < data.length; i++)\n {\n n += data.charCodeAt(i);\n h = 0.02519603282416938 * n;\n n = h >>> 0;\n h -= n;\n h *= n;\n n = h >>> 0;\n h -= n;\n n += h * 0x100000000;// 2^32\n }\n\n this.n = n;\n\n return (n >>> 0) * 2.3283064365386963e-10;// 2^-32\n },\n\n /**\n * Initialize the state of the random data generator.\n *\n * @method Phaser.Math.RandomDataGenerator#init\n * @since 3.0.0\n *\n * @param {(string|string[])} seeds - The seeds to initialize the random data generator with.\n */\n init: function (seeds)\n {\n if (typeof seeds === 'string')\n {\n this.state(seeds);\n }\n else\n {\n this.sow(seeds);\n }\n },\n\n /**\n * Reset the seed of the random data generator.\n *\n * _Note_: the seed array is only processed up to the first `undefined` (or `null`) value, should such be present.\n *\n * @method Phaser.Math.RandomDataGenerator#sow\n * @since 3.0.0\n *\n * @param {string[]} seeds - The array of seeds: the `toString()` of each value is used.\n */\n sow: function (seeds)\n {\n // Always reset to default seed\n this.n = 0xefc8249d;\n this.s0 = this.hash(' ');\n this.s1 = this.hash(' ');\n this.s2 = this.hash(' ');\n this.c = 1;\n\n if (!seeds)\n {\n return;\n }\n\n // Apply any seeds\n for (var i = 0; i < seeds.length && (seeds[i] != null); i++)\n {\n var seed = seeds[i];\n\n this.s0 -= this.hash(seed);\n this.s0 += ~~(this.s0 < 0);\n this.s1 -= this.hash(seed);\n this.s1 += ~~(this.s1 < 0);\n this.s2 -= this.hash(seed);\n this.s2 += ~~(this.s2 < 0);\n }\n },\n\n /**\n * Returns a random integer between 0 and 2^32.\n *\n * @method Phaser.Math.RandomDataGenerator#integer\n * @since 3.0.0\n *\n * @return {number} A random integer between 0 and 2^32.\n */\n integer: function ()\n {\n // 2^32\n return this.rnd() * 0x100000000;\n },\n\n /**\n * Returns a random real number between 0 and 1.\n *\n * @method Phaser.Math.RandomDataGenerator#frac\n * @since 3.0.0\n *\n * @return {number} A random real number between 0 and 1.\n */\n frac: function ()\n {\n // 2^-53\n return this.rnd() + (this.rnd() * 0x200000 | 0) * 1.1102230246251565e-16;\n },\n\n /**\n * Returns a random real number between 0 and 2^32.\n *\n * @method Phaser.Math.RandomDataGenerator#real\n * @since 3.0.0\n *\n * @return {number} A random real number between 0 and 2^32.\n */\n real: function ()\n {\n return this.integer() + this.frac();\n },\n\n /**\n * Returns a random integer between and including min and max.\n *\n * @method Phaser.Math.RandomDataGenerator#integerInRange\n * @since 3.0.0\n *\n * @param {number} min - The minimum value in the range.\n * @param {number} max - The maximum value in the range.\n *\n * @return {number} A random number between min and max.\n */\n integerInRange: function (min, max)\n {\n return Math.floor(this.realInRange(0, max - min + 1) + min);\n },\n\n /**\n * Returns a random integer between and including min and max.\n * This method is an alias for RandomDataGenerator.integerInRange.\n *\n * @method Phaser.Math.RandomDataGenerator#between\n * @since 3.0.0\n *\n * @param {number} min - The minimum value in the range.\n * @param {number} max - The maximum value in the range.\n *\n * @return {number} A random number between min and max.\n */\n between: function (min, max)\n {\n return Math.floor(this.realInRange(0, max - min + 1) + min);\n },\n\n /**\n * Returns a random real number between min and max.\n *\n * @method Phaser.Math.RandomDataGenerator#realInRange\n * @since 3.0.0\n *\n * @param {number} min - The minimum value in the range.\n * @param {number} max - The maximum value in the range.\n *\n * @return {number} A random number between min and max.\n */\n realInRange: function (min, max)\n {\n return this.frac() * (max - min) + min;\n },\n\n /**\n * Returns a random real number between -1 and 1.\n *\n * @method Phaser.Math.RandomDataGenerator#normal\n * @since 3.0.0\n *\n * @return {number} A random real number between -1 and 1.\n */\n normal: function ()\n {\n return 1 - (2 * this.frac());\n },\n\n /**\n * Returns a valid RFC4122 version4 ID hex string from https://gist.github.com/1308368\n *\n * @method Phaser.Math.RandomDataGenerator#uuid\n * @since 3.0.0\n *\n * @return {string} A valid RFC4122 version4 ID hex string\n */\n uuid: function ()\n {\n var a = '';\n var b = '';\n\n for (b = a = ''; a++ < 36; b += ~a % 5 | a * 3 & 4 ? (a ^ 15 ? 8 ^ this.frac() * (a ^ 20 ? 16 : 4) : 4).toString(16) : '-')\n {\n // eslint-disable-next-line no-empty\n }\n\n return b;\n },\n\n /**\n * Returns a random element from within the given array.\n *\n * @method Phaser.Math.RandomDataGenerator#pick\n * @since 3.0.0\n * \n * @generic T\n * @genericUse {T[]} - [array]\n * @genericUse {T} - [$return]\n *\n * @param {T[]} array - The array to pick a random element from.\n *\n * @return {T} A random member of the array.\n */\n pick: function (array)\n {\n return array[this.integerInRange(0, array.length - 1)];\n },\n\n /**\n * Returns a sign to be used with multiplication operator.\n *\n * @method Phaser.Math.RandomDataGenerator#sign\n * @since 3.0.0\n *\n * @return {number} -1 or +1.\n */\n sign: function ()\n {\n return this.pick(this.signs);\n },\n\n /**\n * Returns a random element from within the given array, favoring the earlier entries.\n *\n * @method Phaser.Math.RandomDataGenerator#weightedPick\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[]} - [array]\n * @genericUse {T} - [$return]\n *\n * @param {T[]} array - The array to pick a random element from.\n *\n * @return {T} A random member of the array.\n */\n weightedPick: function (array)\n {\n return array[~~(Math.pow(this.frac(), 2) * (array.length - 1) + 0.5)];\n },\n\n /**\n * Returns a random timestamp between min and max, or between the beginning of 2000 and the end of 2020 if min and max aren't specified.\n *\n * @method Phaser.Math.RandomDataGenerator#timestamp\n * @since 3.0.0\n *\n * @param {number} min - The minimum value in the range.\n * @param {number} max - The maximum value in the range.\n *\n * @return {number} A random timestamp between min and max.\n */\n timestamp: function (min, max)\n {\n return this.realInRange(min || 946684800000, max || 1577862000000);\n },\n\n /**\n * Returns a random angle between -180 and 180.\n *\n * @method Phaser.Math.RandomDataGenerator#angle\n * @since 3.0.0\n *\n * @return {number} A random number between -180 and 180.\n */\n angle: function ()\n {\n return this.integerInRange(-180, 180);\n },\n\n /**\n * Returns a random rotation in radians, between -3.141 and 3.141\n *\n * @method Phaser.Math.RandomDataGenerator#rotation\n * @since 3.0.0\n *\n * @return {number} A random number between -3.141 and 3.141\n */\n rotation: function ()\n {\n return this.realInRange(-3.1415926, 3.1415926);\n },\n\n /**\n * Gets or Sets the state of the generator. This allows you to retain the values\n * that the generator is using between games, i.e. in a game save file.\n *\n * To seed this generator with a previously saved state you can pass it as the\n * `seed` value in your game config, or call this method directly after Phaser has booted.\n *\n * Call this method with no parameters to return the current state.\n *\n * If providing a state it should match the same format that this method\n * returns, which is a string with a header `!rnd` followed by the `c`,\n * `s0`, `s1` and `s2` values respectively, each comma-delimited.\n *\n * @method Phaser.Math.RandomDataGenerator#state\n * @since 3.0.0\n *\n * @param {string} [state] - Generator state to be set.\n *\n * @return {string} The current state of the generator.\n */\n state: function (state)\n {\n if (typeof state === 'string' && state.match(/^!rnd/))\n {\n state = state.split(',');\n\n this.c = parseFloat(state[1]);\n this.s0 = parseFloat(state[2]);\n this.s1 = parseFloat(state[3]);\n this.s2 = parseFloat(state[4]);\n }\n\n return [ '!rnd', this.c, this.s0, this.s1, this.s2 ].join(',');\n },\n\n /**\n * Shuffles the given array, using the current seed.\n *\n * @method Phaser.Math.RandomDataGenerator#shuffle\n * @since 3.7.0\n *\n * @generic T\n * @genericUse {T[]} - [array,$return]\n *\n * @param {T[]} [array] - The array to be shuffled.\n *\n * @return {T[]} The shuffled array.\n */\n shuffle: function (array)\n {\n var len = array.length - 1;\n\n for (var i = len; i > 0; i--)\n {\n var randomIndex = Math.floor(this.frac() * (i + 1));\n var itemAtIndex = array[randomIndex];\n\n array[randomIndex] = array[i];\n array[i] = itemAtIndex;\n }\n\n return array;\n }\n\n});\n\nmodule.exports = RandomDataGenerator;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Snap a value to nearest grid slice, using ceil.\n *\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `15`.\n * As will `14` snap to `15`... but `16` will snap to `20`.\n *\n * @function Phaser.Math.Snap.Ceil\n * @since 3.0.0\n *\n * @param {number} value - The value to snap.\n * @param {number} gap - The interval gap of the grid.\n * @param {number} [start=0] - Optional starting offset for gap.\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\n *\n * @return {number} The snapped value.\n */\nvar SnapCeil = function (value, gap, start, divide)\n{\n if (start === undefined) { start = 0; }\n\n if (gap === 0)\n {\n return value;\n }\n\n value -= start;\n value = gap * Math.ceil(value / gap);\n\n return (divide) ? (start + value) / gap : start + value;\n};\n\nmodule.exports = SnapCeil;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Snap a value to nearest grid slice, using floor.\n *\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10`.\n * As will `14` snap to `10`... but `16` will snap to `15`.\n *\n * @function Phaser.Math.Snap.Floor\n * @since 3.0.0\n *\n * @param {number} value - The value to snap.\n * @param {number} gap - The interval gap of the grid.\n * @param {number} [start=0] - Optional starting offset for gap.\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\n *\n * @return {number} The snapped value.\n */\nvar SnapFloor = function (value, gap, start, divide)\n{\n if (start === undefined) { start = 0; }\n\n if (gap === 0)\n {\n return value;\n }\n\n value -= start;\n value = gap * Math.floor(value / gap);\n\n return (divide) ? (start + value) / gap : start + value;\n};\n\nmodule.exports = SnapFloor;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Snap a value to nearest grid slice, using rounding.\n *\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10` whereas `14` will snap to `15`.\n *\n * @function Phaser.Math.Snap.To\n * @since 3.0.0\n *\n * @param {number} value - The value to snap.\n * @param {number} gap - The interval gap of the grid.\n * @param {number} [start=0] - Optional starting offset for gap.\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\n *\n * @return {number} The snapped value.\n */\nvar SnapTo = function (value, gap, start, divide)\n{\n if (start === undefined) { start = 0; }\n\n if (gap === 0)\n {\n return value;\n }\n\n value -= start;\n value = gap * Math.round(value / gap);\n\n return (divide) ? (start + value) / gap : start + value;\n};\n\nmodule.exports = SnapTo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Snap\n */\n\nmodule.exports = {\n\n Ceil: require('./SnapCeil'),\n Floor: require('./SnapFloor'),\n To: require('./SnapTo')\n\n};\n","/**\n* @author Richard Davey \n* @copyright 2020 Photon Storm Ltd.\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\n*/\n\nvar Class = require('../utils/Class');\n\n/**\n * @classdesc\n * A Global Plugin is installed just once into the Game owned Plugin Manager.\n * It can listen for Game events and respond to them.\n *\n * @class BasePlugin\n * @memberof Phaser.Plugins\n * @constructor\n * @since 3.8.0\n *\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\n */\nvar BasePlugin = new Class({\n\n initialize:\n\n function BasePlugin (pluginManager)\n {\n /**\n * A handy reference to the Plugin Manager that is responsible for this plugin.\n * Can be used as a route to gain access to game systems and events.\n *\n * @name Phaser.Plugins.BasePlugin#pluginManager\n * @type {Phaser.Plugins.PluginManager}\n * @protected\n * @since 3.8.0\n */\n this.pluginManager = pluginManager;\n\n /**\n * A reference to the Game instance this plugin is running under.\n *\n * @name Phaser.Plugins.BasePlugin#game\n * @type {Phaser.Game}\n * @protected\n * @since 3.8.0\n */\n this.game = pluginManager.game;\n },\n\n /**\n * The PluginManager calls this method on a Global Plugin when the plugin is first instantiated.\n * It will never be called again on this instance.\n * In here you can set-up whatever you need for this plugin to run.\n * If a plugin is set to automatically start then `BasePlugin.start` will be called immediately after this.\n * On a Scene Plugin, this method is never called. Use {@link Phaser.Plugins.ScenePlugin#boot} instead.\n *\n * @method Phaser.Plugins.BasePlugin#init\n * @since 3.8.0\n *\n * @param {?any} [data] - A value specified by the user, if any, from the `data` property of the plugin's configuration object (if started at game boot) or passed in the PluginManager's `install` method (if started manually).\n */\n init: function ()\n {\n },\n\n /**\n * The PluginManager calls this method on a Global Plugin when the plugin is started.\n * If a plugin is stopped, and then started again, this will get called again.\n * Typically called immediately after `BasePlugin.init`.\n * On a Scene Plugin, this method is never called.\n *\n * @method Phaser.Plugins.BasePlugin#start\n * @since 3.8.0\n */\n start: function ()\n {\n // Here are the game-level events you can listen to.\n // At the very least you should offer a destroy handler for when the game closes down.\n\n // var eventEmitter = this.game.events;\n\n // eventEmitter.once('destroy', this.gameDestroy, this);\n // eventEmitter.on('pause', this.gamePause, this);\n // eventEmitter.on('resume', this.gameResume, this);\n // eventEmitter.on('resize', this.gameResize, this);\n // eventEmitter.on('prestep', this.gamePreStep, this);\n // eventEmitter.on('step', this.gameStep, this);\n // eventEmitter.on('poststep', this.gamePostStep, this);\n // eventEmitter.on('prerender', this.gamePreRender, this);\n // eventEmitter.on('postrender', this.gamePostRender, this);\n },\n\n /**\n * The PluginManager calls this method on a Global Plugin when the plugin is stopped.\n * The game code has requested that your plugin stop doing whatever it does.\n * It is now considered as 'inactive' by the PluginManager.\n * Handle that process here (i.e. stop listening for events, etc)\n * If the plugin is started again then `BasePlugin.start` will be called again.\n * On a Scene Plugin, this method is never called.\n *\n * @method Phaser.Plugins.BasePlugin#stop\n * @since 3.8.0\n */\n stop: function ()\n {\n },\n\n /**\n * Game instance has been destroyed.\n * You must release everything in here, all references, all objects, free it all up.\n *\n * @method Phaser.Plugins.BasePlugin#destroy\n * @since 3.8.0\n */\n destroy: function ()\n {\n this.pluginManager = null;\n this.game = null;\n this.scene = null;\n this.systems = null;\n }\n\n});\n\nmodule.exports = BasePlugin;\n","/**\n* @author Richard Davey \n* @copyright 2020 Photon Storm Ltd.\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\n*/\n\nvar BasePlugin = require('./BasePlugin');\nvar Class = require('../utils/Class');\nvar SceneEvents = require('../scene/events');\n\n/**\n * @classdesc\n * A Scene Level Plugin is installed into every Scene and belongs to that Scene.\n * It can listen for Scene events and respond to them.\n * It can map itself to a Scene property, or into the Scene Systems, or both.\n *\n * @class ScenePlugin\n * @memberof Phaser.Plugins\n * @extends Phaser.Plugins.BasePlugin\n * @constructor\n * @since 3.8.0\n *\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\n */\nvar ScenePlugin = new Class({\n\n Extends: BasePlugin,\n\n initialize:\n\n function ScenePlugin (scene, pluginManager)\n {\n BasePlugin.call(this, pluginManager);\n\n /**\n * A reference to the Scene that has installed this plugin.\n * Only set if it's a Scene Plugin, otherwise `null`.\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\n * You can use it during the `boot` method.\n *\n * @name Phaser.Plugins.ScenePlugin#scene\n * @type {?Phaser.Scene}\n * @protected\n * @since 3.8.0\n */\n this.scene = scene;\n\n /**\n * A reference to the Scene Systems of the Scene that has installed this plugin.\n * Only set if it's a Scene Plugin, otherwise `null`.\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\n * You can use it during the `boot` method.\n *\n * @name Phaser.Plugins.ScenePlugin#systems\n * @type {?Phaser.Scenes.Systems}\n * @protected\n * @since 3.8.0\n */\n this.systems = scene.sys;\n\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\n },\n\n /**\n * This method is called when the Scene boots. It is only ever called once.\n *\n * By this point the plugin properties `scene` and `systems` will have already been set.\n *\n * In here you can listen for {@link Phaser.Scenes.Events Scene events} and set-up whatever you need for this plugin to run.\n * Here are the Scene events you can listen to:\n *\n * - start\n * - ready\n * - preupdate\n * - update\n * - postupdate\n * - resize\n * - pause\n * - resume\n * - sleep\n * - wake\n * - transitioninit\n * - transitionstart\n * - transitioncomplete\n * - transitionout\n * - shutdown\n * - destroy\n *\n * At the very least you should offer a destroy handler for when the Scene closes down, i.e:\n *\n * ```javascript\n * var eventEmitter = this.systems.events;\n * eventEmitter.once('destroy', this.sceneDestroy, this);\n * ```\n *\n * @method Phaser.Plugins.ScenePlugin#boot\n * @since 3.8.0\n */\n boot: function ()\n {\n },\n\n /**\n * Game instance has been destroyed.\n * \n * You must release everything in here, all references, all objects, free it all up.\n *\n * @method Phaser.Plugins.ScenePlugin#destroy\n * @since 3.8.0\n */\n destroy: function ()\n {\n this.pluginManager = null;\n this.game = null;\n this.scene = null;\n this.systems = null;\n }\n\n});\n\nmodule.exports = ScenePlugin;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Phaser Blend Modes.\n * \n * @namespace Phaser.BlendModes\n * @since 3.0.0\n */\n\nmodule.exports = {\n\n /**\n * Skips the Blend Mode check in the renderer.\n * \n * @name Phaser.BlendModes.SKIP_CHECK\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n SKIP_CHECK: -1,\n\n /**\n * Normal blend mode. For Canvas and WebGL.\n * This is the default setting and draws new shapes on top of the existing canvas content.\n * \n * @name Phaser.BlendModes.NORMAL\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n NORMAL: 0,\n\n /**\n * Add blend mode. For Canvas and WebGL.\n * Where both shapes overlap the color is determined by adding color values.\n * \n * @name Phaser.BlendModes.ADD\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n ADD: 1,\n\n /**\n * Multiply blend mode. For Canvas and WebGL.\n * The pixels are of the top layer are multiplied with the corresponding pixel of the bottom layer. A darker picture is the result.\n * \n * @name Phaser.BlendModes.MULTIPLY\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n MULTIPLY: 2,\n\n /**\n * Screen blend mode. For Canvas and WebGL.\n * The pixels are inverted, multiplied, and inverted again. A lighter picture is the result (opposite of multiply)\n * \n * @name Phaser.BlendModes.SCREEN\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n SCREEN: 3,\n\n /**\n * Overlay blend mode. For Canvas only.\n * A combination of multiply and screen. Dark parts on the base layer become darker, and light parts become lighter.\n * \n * @name Phaser.BlendModes.OVERLAY\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n OVERLAY: 4,\n\n /**\n * Darken blend mode. For Canvas only.\n * Retains the darkest pixels of both layers.\n * \n * @name Phaser.BlendModes.DARKEN\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n DARKEN: 5,\n\n /**\n * Lighten blend mode. For Canvas only.\n * Retains the lightest pixels of both layers.\n * \n * @name Phaser.BlendModes.LIGHTEN\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n LIGHTEN: 6,\n\n /**\n * Color Dodge blend mode. For Canvas only.\n * Divides the bottom layer by the inverted top layer.\n * \n * @name Phaser.BlendModes.COLOR_DODGE\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n COLOR_DODGE: 7,\n\n /**\n * Color Burn blend mode. For Canvas only.\n * Divides the inverted bottom layer by the top layer, and then inverts the result.\n * \n * @name Phaser.BlendModes.COLOR_BURN\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n COLOR_BURN: 8,\n\n /**\n * Hard Light blend mode. For Canvas only.\n * A combination of multiply and screen like overlay, but with top and bottom layer swapped.\n * \n * @name Phaser.BlendModes.HARD_LIGHT\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n HARD_LIGHT: 9,\n\n /**\n * Soft Light blend mode. For Canvas only.\n * A softer version of hard-light. Pure black or white does not result in pure black or white.\n * \n * @name Phaser.BlendModes.SOFT_LIGHT\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n SOFT_LIGHT: 10,\n\n /**\n * Difference blend mode. For Canvas only.\n * Subtracts the bottom layer from the top layer or the other way round to always get a positive value.\n * \n * @name Phaser.BlendModes.DIFFERENCE\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n DIFFERENCE: 11,\n\n /**\n * Exclusion blend mode. For Canvas only.\n * Like difference, but with lower contrast.\n * \n * @name Phaser.BlendModes.EXCLUSION\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n EXCLUSION: 12,\n\n /**\n * Hue blend mode. For Canvas only.\n * Preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer.\n * \n * @name Phaser.BlendModes.HUE\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n HUE: 13,\n\n /**\n * Saturation blend mode. For Canvas only.\n * Preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer.\n * \n * @name Phaser.BlendModes.SATURATION\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n SATURATION: 14,\n\n /**\n * Color blend mode. For Canvas only.\n * Preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer.\n * \n * @name Phaser.BlendModes.COLOR\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n COLOR: 15,\n\n /**\n * Luminosity blend mode. For Canvas only.\n * Preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer.\n * \n * @name Phaser.BlendModes.LUMINOSITY\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n LUMINOSITY: 16,\n\n /**\n * Alpha erase blend mode. For Canvas and WebGL.\n * \n * @name Phaser.BlendModes.ERASE\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n ERASE: 17,\n\n /**\n * Source-in blend mode. For Canvas only.\n * The new shape is drawn only where both the new shape and the destination canvas overlap. Everything else is made transparent.\n * \n * @name Phaser.BlendModes.SOURCE_IN\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n SOURCE_IN: 18,\n\n /**\n * Source-out blend mode. For Canvas only.\n * The new shape is drawn where it doesn't overlap the existing canvas content.\n * \n * @name Phaser.BlendModes.SOURCE_OUT\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n SOURCE_OUT: 19,\n\n /**\n * Source-out blend mode. For Canvas only.\n * The new shape is only drawn where it overlaps the existing canvas content.\n * \n * @name Phaser.BlendModes.SOURCE_ATOP\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n SOURCE_ATOP: 20,\n\n /**\n * Destination-over blend mode. For Canvas only.\n * New shapes are drawn behind the existing canvas content.\n * \n * @name Phaser.BlendModes.DESTINATION_OVER\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n DESTINATION_OVER: 21,\n\n /**\n * Destination-in blend mode. For Canvas only.\n * The existing canvas content is kept where both the new shape and existing canvas content overlap. Everything else is made transparent.\n * \n * @name Phaser.BlendModes.DESTINATION_IN\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n DESTINATION_IN: 22,\n\n /**\n * Destination-out blend mode. For Canvas only.\n * The existing content is kept where it doesn't overlap the new shape.\n * \n * @name Phaser.BlendModes.DESTINATION_OUT\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n DESTINATION_OUT: 23,\n\n /**\n * Destination-out blend mode. For Canvas only.\n * The existing canvas is only kept where it overlaps the new shape. The new shape is drawn behind the canvas content.\n * \n * @name Phaser.BlendModes.DESTINATION_ATOP\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n DESTINATION_ATOP: 24,\n\n /**\n * Lighten blend mode. For Canvas only.\n * Where both shapes overlap the color is determined by adding color values.\n * \n * @name Phaser.BlendModes.LIGHTER\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n LIGHTER: 25,\n\n /**\n * Copy blend mode. For Canvas only.\n * Only the new shape is shown.\n * \n * @name Phaser.BlendModes.COPY\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n COPY: 26,\n\n /**\n * Xor blend mode. For Canvas only.\n * Shapes are made transparent where both overlap and drawn normal everywhere else.\n * \n * @name Phaser.BlendModes.XOR\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n XOR: 27\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scale Manager Resize Event.\n * \n * This event is dispatched whenever the Scale Manager detects a resize event from the browser.\n * It sends three parameters to the callback, each of them being Size components. You can read\n * the `width`, `height`, `aspectRatio` and other properties of these components to help with\n * scaling your own game content.\n *\n * @event Phaser.Scale.Events#RESIZE\n * @since 3.16.1\n * \n * @param {Phaser.Structs.Size} gameSize - A reference to the Game Size component. This is the un-scaled size of your game canvas.\n * @param {Phaser.Structs.Size} baseSize - A reference to the Base Size component. This is the game size multiplied by resolution.\n * @param {Phaser.Structs.Size} displaySize - A reference to the Display Size component. This is the scaled canvas size, after applying zoom and scale mode.\n * @param {number} resolution - The current resolution. Defaults to 1 at the moment.\n * @param {number} previousWidth - If the `gameSize` has changed, this value contains its previous width, otherwise it contains the current width.\n * @param {number} previousHeight - If the `gameSize` has changed, this value contains its previous height, otherwise it contains the current height.\n */\nmodule.exports = 'resize';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Added to Scene Event.\n *\n * This event is dispatched when a Game Object is added to a Scene.\n *\n * Listen for it from a Scene using `this.scene.events.on('addedtoscene', listener)`.\n *\n * @event Phaser.Scenes.Events#ADDED_TO_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\n */\nmodule.exports = 'addedtoscene';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Boot Event.\n * \n * This event is dispatched by a Scene during the Scene Systems boot process. Primarily used by Scene Plugins.\n * \n * Listen to it from a Scene using `this.scene.events.on('boot', listener)`.\n * \n * @event Phaser.Scenes.Events#BOOT\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n */\nmodule.exports = 'boot';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Create Event.\n * \n * This event is dispatched by a Scene after it has been created by the Scene Manager.\n * \n * If a Scene has a `create` method then this event is emitted _after_ that has run.\n * \n * If there is a transition, this event will be fired after the `TRANSITION_START` event.\n * \n * Listen to it from a Scene using `this.scene.events.on('create', listener)`.\n * \n * @event Phaser.Scenes.Events#CREATE\n * @since 3.17.0\n * \n * @param {Phaser.Scene} scene - A reference to the Scene that emitted this event.\n */\nmodule.exports = 'create';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Destroy Event.\n * \n * This event is dispatched by a Scene during the Scene Systems destroy process.\n * \n * Listen to it from a Scene using `this.scene.events.on('destroy', listener)`.\n * \n * You should destroy any resources that may be in use by your Scene in this event handler.\n * \n * @event Phaser.Scenes.Events#DESTROY\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n */\nmodule.exports = 'destroy';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Pause Event.\n * \n * This event is dispatched by a Scene when it is paused, either directly via the `pause` method, or as an\n * action from another Scene.\n * \n * Listen to it from a Scene using `this.scene.events.on('pause', listener)`.\n * \n * @event Phaser.Scenes.Events#PAUSE\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {any} [data] - An optional data object that was passed to this Scene when it was paused.\n */\nmodule.exports = 'pause';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Post Update Event.\n * \n * This event is dispatched by a Scene during the main game loop step.\n * \n * The event flow for a single step of a Scene is as follows:\n * \n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\n * 3. The `Scene.update` method is called, if it exists\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n * \n * Listen to it from a Scene using `this.scene.events.on('postupdate', listener)`.\n * \n * A Scene will only run its step if it is active.\n * \n * @event Phaser.Scenes.Events#POST_UPDATE\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\n */\nmodule.exports = 'postupdate';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Pre Update Event.\n * \n * This event is dispatched by a Scene during the main game loop step.\n * \n * The event flow for a single step of a Scene is as follows:\n * \n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\n * 3. The `Scene.update` method is called, if it exists\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n * \n * Listen to it from a Scene using `this.scene.events.on('preupdate', listener)`.\n * \n * A Scene will only run its step if it is active.\n * \n * @event Phaser.Scenes.Events#PRE_UPDATE\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\n */\nmodule.exports = 'preupdate';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Ready Event.\n * \n * This event is dispatched by a Scene during the Scene Systems start process.\n * By this point in the process the Scene is now fully active and rendering.\n * This event is meant for your game code to use, as all plugins have responded to the earlier 'start' event.\n * \n * Listen to it from a Scene using `this.scene.events.on('ready', listener)`.\n * \n * @event Phaser.Scenes.Events#READY\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {any} [data] - An optional data object that was passed to this Scene when it was started.\n */\nmodule.exports = 'ready';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Removed from Scene Event.\n *\n * This event is dispatched when a Game Object is removed from a Scene.\n *\n * Listen for it from a Scene using `this.scene.events.on('removedfromscene', listener)`.\n *\n * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\n */\nmodule.exports = 'removedfromscene';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Render Event.\n * \n * This event is dispatched by a Scene during the main game loop step.\n * \n * The event flow for a single step of a Scene is as follows:\n * \n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\n * 3. The `Scene.update` method is called, if it exists\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n * \n * Listen to it from a Scene using `this.scene.events.on('render', listener)`.\n * \n * A Scene will only render if it is visible and active.\n * By the time this event is dispatched, the Scene will have already been rendered.\n * \n * @event Phaser.Scenes.Events#RENDER\n * @since 3.0.0\n * \n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\n */\nmodule.exports = 'render';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Resume Event.\n * \n * This event is dispatched by a Scene when it is resumed from a paused state, either directly via the `resume` method,\n * or as an action from another Scene.\n * \n * Listen to it from a Scene using `this.scene.events.on('resume', listener)`.\n * \n * @event Phaser.Scenes.Events#RESUME\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {any} [data] - An optional data object that was passed to this Scene when it was resumed.\n */\nmodule.exports = 'resume';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Shutdown Event.\n * \n * This event is dispatched by a Scene during the Scene Systems shutdown process.\n * \n * Listen to it from a Scene using `this.scene.events.on('shutdown', listener)`.\n * \n * You should free-up any resources that may be in use by your Scene in this event handler, on the understanding\n * that the Scene may, at any time, become active again. A shutdown Scene is not 'destroyed', it's simply not\n * currently active. Use the [DESTROY]{@linkcode Phaser.Scenes.Events#event:DESTROY} event to completely clear resources.\n * \n * @event Phaser.Scenes.Events#SHUTDOWN\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {any} [data] - An optional data object that was passed to this Scene when it was shutdown.\n */\nmodule.exports = 'shutdown';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Sleep Event.\n * \n * This event is dispatched by a Scene when it is sent to sleep, either directly via the `sleep` method,\n * or as an action from another Scene.\n * \n * Listen to it from a Scene using `this.scene.events.on('sleep', listener)`.\n * \n * @event Phaser.Scenes.Events#SLEEP\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {any} [data] - An optional data object that was passed to this Scene when it was sent to sleep.\n */\nmodule.exports = 'sleep';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Start Event.\n * \n * This event is dispatched by a Scene during the Scene Systems start process. Primarily used by Scene Plugins.\n * \n * Listen to it from a Scene using `this.scene.events.on('start', listener)`.\n * \n * @event Phaser.Scenes.Events#START\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n */\nmodule.exports = 'start';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Transition Complete Event.\n * \n * This event is dispatched by the Target Scene of a transition.\n * \n * It happens when the transition process has completed. This occurs when the duration timer equals or exceeds the duration\n * of the transition.\n * \n * Listen to it from a Scene using `this.scene.events.on('transitioncomplete', listener)`.\n * \n * The Scene Transition event flow is as follows:\n * \n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\n * \n * @event Phaser.Scenes.Events#TRANSITION_COMPLETE\n * @since 3.5.0\n * \n * @param {Phaser.Scene} scene -The Scene on which the transitioned completed.\n */\nmodule.exports = 'transitioncomplete';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Transition Init Event.\n * \n * This event is dispatched by the Target Scene of a transition.\n * \n * It happens immediately after the `Scene.init` method is called. If the Scene does not have an `init` method,\n * this event is not dispatched.\n * \n * Listen to it from a Scene using `this.scene.events.on('transitioninit', listener)`.\n * \n * The Scene Transition event flow is as follows:\n * \n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\n * \n * @event Phaser.Scenes.Events#TRANSITION_INIT\n * @since 3.5.0\n * \n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\n * @param {number} duration - The duration of the transition in ms.\n */\nmodule.exports = 'transitioninit';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Transition Out Event.\n * \n * This event is dispatched by a Scene when it initiates a transition to another Scene.\n * \n * Listen to it from a Scene using `this.scene.events.on('transitionout', listener)`.\n * \n * The Scene Transition event flow is as follows:\n * \n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\n * \n * @event Phaser.Scenes.Events#TRANSITION_OUT\n * @since 3.5.0\n * \n * @param {Phaser.Scene} target - A reference to the Scene that is being transitioned to.\n * @param {number} duration - The duration of the transition in ms.\n */\nmodule.exports = 'transitionout';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Transition Start Event.\n * \n * This event is dispatched by the Target Scene of a transition, only if that Scene was not asleep.\n * \n * It happens immediately after the `Scene.create` method is called. If the Scene does not have a `create` method,\n * this event is dispatched anyway.\n * \n * If the Target Scene was sleeping then the [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} event is\n * dispatched instead of this event.\n * \n * Listen to it from a Scene using `this.scene.events.on('transitionstart', listener)`.\n * \n * The Scene Transition event flow is as follows:\n * \n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\n * \n * @event Phaser.Scenes.Events#TRANSITION_START\n * @since 3.5.0\n * \n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\n * @param {number} duration - The duration of the transition in ms.\n */\nmodule.exports = 'transitionstart';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Transition Wake Event.\n * \n * This event is dispatched by the Target Scene of a transition, only if that Scene was asleep before\n * the transition began. If the Scene was not asleep the [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} event is dispatched instead.\n * \n * Listen to it from a Scene using `this.scene.events.on('transitionwake', listener)`.\n * \n * The Scene Transition event flow is as follows:\n * \n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\n * \n * @event Phaser.Scenes.Events#TRANSITION_WAKE\n * @since 3.5.0\n * \n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\n * @param {number} duration - The duration of the transition in ms.\n */\nmodule.exports = 'transitionwake';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Update Event.\n * \n * This event is dispatched by a Scene during the main game loop step.\n * \n * The event flow for a single step of a Scene is as follows:\n * \n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\n * 3. The `Scene.update` method is called, if it exists\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n * \n * Listen to it from a Scene using `this.scene.events.on('update', listener)`.\n * \n * A Scene will only run its step if it is active.\n * \n * @event Phaser.Scenes.Events#UPDATE\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\n */\nmodule.exports = 'update';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Wake Event.\n * \n * This event is dispatched by a Scene when it is woken from sleep, either directly via the `wake` method,\n * or as an action from another Scene.\n * \n * Listen to it from a Scene using `this.scene.events.on('wake', listener)`.\n * \n * @event Phaser.Scenes.Events#WAKE\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {any} [data] - An optional data object that was passed to this Scene when it was woken up.\n */\nmodule.exports = 'wake';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Scenes.Events\n */\n\nmodule.exports = {\n\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\n BOOT: require('./BOOT_EVENT'),\n CREATE: require('./CREATE_EVENT'),\n DESTROY: require('./DESTROY_EVENT'),\n PAUSE: require('./PAUSE_EVENT'),\n POST_UPDATE: require('./POST_UPDATE_EVENT'),\n PRE_UPDATE: require('./PRE_UPDATE_EVENT'),\n READY: require('./READY_EVENT'),\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'),\n RENDER: require('./RENDER_EVENT'),\n RESUME: require('./RESUME_EVENT'),\n SHUTDOWN: require('./SHUTDOWN_EVENT'),\n SLEEP: require('./SLEEP_EVENT'),\n START: require('./START_EVENT'),\n TRANSITION_COMPLETE: require('./TRANSITION_COMPLETE_EVENT'),\n TRANSITION_INIT: require('./TRANSITION_INIT_EVENT'),\n TRANSITION_OUT: require('./TRANSITION_OUT_EVENT'),\n TRANSITION_START: require('./TRANSITION_START_EVENT'),\n TRANSITION_WAKE: require('./TRANSITION_WAKE_EVENT'),\n UPDATE: require('./UPDATE_EVENT'),\n WAKE: require('./WAKE_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Retrieves the value of the given key from an object.\n *\n * @function Phaser.Tweens.Builders.GetBoolean\n * @since 3.0.0\n *\n * @param {object} source - The object to retrieve the value from.\n * @param {string} key - The key to look for in the `source` object.\n * @param {*} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided.\n *\n * @return {*} The retrieved value.\n */\nvar GetBoolean = function (source, key, defaultValue)\n{\n if (!source)\n {\n return defaultValue;\n }\n else if (source.hasOwnProperty(key))\n {\n return source[key];\n }\n else\n {\n return defaultValue;\n }\n};\n\nmodule.exports = GetBoolean;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar TWEEN_CONST = {\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.CREATED\n * @type {integer}\n * @since 3.0.0\n */\n CREATED: 0,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.INIT\n * @type {integer}\n * @since 3.0.0\n */\n INIT: 1,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.DELAY\n * @type {integer}\n * @since 3.0.0\n */\n DELAY: 2,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.OFFSET_DELAY\n * @type {integer}\n * @since 3.0.0\n */\n OFFSET_DELAY: 3,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.PENDING_RENDER\n * @type {integer}\n * @since 3.0.0\n */\n PENDING_RENDER: 4,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.PLAYING_FORWARD\n * @type {integer}\n * @since 3.0.0\n */\n PLAYING_FORWARD: 5,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.PLAYING_BACKWARD\n * @type {integer}\n * @since 3.0.0\n */\n PLAYING_BACKWARD: 6,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.HOLD_DELAY\n * @type {integer}\n * @since 3.0.0\n */\n HOLD_DELAY: 7,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.REPEAT_DELAY\n * @type {integer}\n * @since 3.0.0\n */\n REPEAT_DELAY: 8,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.COMPLETE\n * @type {integer}\n * @since 3.0.0\n */\n COMPLETE: 9,\n\n // Tween specific (starts from 20 to cleanly allow extra TweenData consts in the future)\n\n /**\n * Tween state.\n * \n * @name Phaser.Tweens.PENDING_ADD\n * @type {integer}\n * @since 3.0.0\n */\n PENDING_ADD: 20,\n\n /**\n * Tween state.\n * \n * @name Phaser.Tweens.PAUSED\n * @type {integer}\n * @since 3.0.0\n */\n PAUSED: 21,\n\n /**\n * Tween state.\n * \n * @name Phaser.Tweens.LOOP_DELAY\n * @type {integer}\n * @since 3.0.0\n */\n LOOP_DELAY: 22,\n\n /**\n * Tween state.\n * \n * @name Phaser.Tweens.ACTIVE\n * @type {integer}\n * @since 3.0.0\n */\n ACTIVE: 23,\n\n /**\n * Tween state.\n * \n * @name Phaser.Tweens.COMPLETE_DELAY\n * @type {integer}\n * @since 3.0.0\n */\n COMPLETE_DELAY: 24,\n\n /**\n * Tween state.\n * \n * @name Phaser.Tweens.PENDING_REMOVE\n * @type {integer}\n * @since 3.0.0\n */\n PENDING_REMOVE: 25,\n\n /**\n * Tween state.\n * \n * @name Phaser.Tweens.REMOVED\n * @type {integer}\n * @since 3.0.0\n */\n REMOVED: 26\n\n};\n\nmodule.exports = TWEEN_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Taken from klasse by mattdesl https://github.com/mattdesl/klasse\n\nfunction hasGetterOrSetter (def)\n{\n return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function');\n}\n\nfunction getProperty (definition, k, isClassDescriptor)\n{\n // This may be a lightweight object, OR it might be a property that was defined previously.\n\n // For simple class descriptors we can just assume its NOT previously defined.\n var def = (isClassDescriptor) ? definition[k] : Object.getOwnPropertyDescriptor(definition, k);\n\n if (!isClassDescriptor && def.value && typeof def.value === 'object')\n {\n def = def.value;\n }\n\n // This might be a regular property, or it may be a getter/setter the user defined in a class.\n if (def && hasGetterOrSetter(def))\n {\n if (typeof def.enumerable === 'undefined')\n {\n def.enumerable = true;\n }\n\n if (typeof def.configurable === 'undefined')\n {\n def.configurable = true;\n }\n\n return def;\n }\n else\n {\n return false;\n }\n}\n\nfunction hasNonConfigurable (obj, k)\n{\n var prop = Object.getOwnPropertyDescriptor(obj, k);\n\n if (!prop)\n {\n return false;\n }\n\n if (prop.value && typeof prop.value === 'object')\n {\n prop = prop.value;\n }\n\n if (prop.configurable === false)\n {\n return true;\n }\n\n return false;\n}\n\n/**\n * Extends the given `myClass` object's prototype with the properties of `definition`.\n *\n * @function extend\n * @param {Object} ctor The constructor object to mix into.\n * @param {Object} definition A dictionary of functions for the class.\n * @param {boolean} isClassDescriptor Is the definition a class descriptor?\n * @param {Object} [extend] The parent constructor object.\n */\nfunction extend (ctor, definition, isClassDescriptor, extend)\n{\n for (var k in definition)\n {\n if (!definition.hasOwnProperty(k))\n {\n continue;\n }\n\n var def = getProperty(definition, k, isClassDescriptor);\n\n if (def !== false)\n {\n // If Extends is used, we will check its prototype to see if the final variable exists.\n\n var parent = extend || ctor;\n\n if (hasNonConfigurable(parent.prototype, k))\n {\n // Just skip the final property\n if (Class.ignoreFinals)\n {\n continue;\n }\n\n // We cannot re-define a property that is configurable=false.\n // So we will consider them final and throw an error. This is by\n // default so it is clear to the developer what is happening.\n // You can set ignoreFinals to true if you need to extend a class\n // which has configurable=false; it will simply not re-define final properties.\n throw new Error('cannot override final property \\'' + k + '\\', set Class.ignoreFinals = true to skip');\n }\n\n Object.defineProperty(ctor.prototype, k, def);\n }\n else\n {\n ctor.prototype[k] = definition[k];\n }\n }\n}\n\n/**\n * Applies the given `mixins` to the prototype of `myClass`.\n *\n * @function mixin\n * @param {Object} myClass The constructor object to mix into.\n * @param {Object|Array} mixins The mixins to apply to the constructor.\n */\nfunction mixin (myClass, mixins)\n{\n if (!mixins)\n {\n return;\n }\n\n if (!Array.isArray(mixins))\n {\n mixins = [ mixins ];\n }\n\n for (var i = 0; i < mixins.length; i++)\n {\n extend(myClass, mixins[i].prototype || mixins[i]);\n }\n}\n\n/**\n * Creates a new class with the given descriptor.\n * The constructor, defined by the name `initialize`,\n * is an optional function. If unspecified, an anonymous\n * function will be used which calls the parent class (if\n * one exists).\n *\n * You can also use `Extends` and `Mixins` to provide subclassing\n * and inheritance.\n *\n * @class Phaser.Class\n * @constructor\n * @param {Object} definition a dictionary of functions for the class\n * @example\n *\n * var MyClass = new Phaser.Class({\n *\n * initialize: function() {\n * this.foo = 2.0;\n * },\n *\n * bar: function() {\n * return this.foo + 5;\n * }\n * });\n */\nfunction Class (definition)\n{\n if (!definition)\n {\n definition = {};\n }\n\n // The variable name here dictates what we see in Chrome debugger\n var initialize;\n var Extends;\n\n if (definition.initialize)\n {\n if (typeof definition.initialize !== 'function')\n {\n throw new Error('initialize must be a function');\n }\n\n initialize = definition.initialize;\n\n // Usually we should avoid 'delete' in V8 at all costs.\n // However, its unlikely to make any performance difference\n // here since we only call this on class creation (i.e. not object creation).\n delete definition.initialize;\n }\n else if (definition.Extends)\n {\n var base = definition.Extends;\n\n initialize = function ()\n {\n base.apply(this, arguments);\n };\n }\n else\n {\n initialize = function () {};\n }\n\n if (definition.Extends)\n {\n initialize.prototype = Object.create(definition.Extends.prototype);\n initialize.prototype.constructor = initialize;\n\n // For getOwnPropertyDescriptor to work, we need to act directly on the Extends (or Mixin)\n\n Extends = definition.Extends;\n\n delete definition.Extends;\n }\n else\n {\n initialize.prototype.constructor = initialize;\n }\n\n // Grab the mixins, if they are specified...\n var mixins = null;\n\n if (definition.Mixins)\n {\n mixins = definition.Mixins;\n delete definition.Mixins;\n }\n\n // First, mixin if we can.\n mixin(initialize, mixins);\n\n // Now we grab the actual definition which defines the overrides.\n extend(initialize, definition, true, Extends);\n\n return initialize;\n}\n\nClass.extend = extend;\nClass.mixin = mixin;\nClass.ignoreFinals = false;\n\nmodule.exports = Class;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * A NOOP (No Operation) callback function.\n *\n * Used internally by Phaser when it's more expensive to determine if a callback exists\n * than it is to just invoke an empty function.\n *\n * @function Phaser.Utils.NOOP\n * @since 3.0.0\n */\nvar NOOP = function ()\n{\n // NOOP\n};\n\nmodule.exports = NOOP;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Adds the given item, or array of items, to the array.\n *\n * Each item must be unique within the array.\n *\n * The array is modified in-place and returned.\n *\n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\n * added will take the array length over this limit, it will stop adding once the limit is reached.\n *\n * You can optionally specify a callback to be invoked for each item successfully added to the array.\n *\n * @function Phaser.Utils.Array.Add\n * @since 3.4.0\n *\n * @param {array} array - The array to be added to.\n * @param {any|any[]} item - The item, or array of items, to add to the array. Each item must be unique within the array.\n * @param {integer} [limit] - Optional limit which caps the size of the array.\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\n * @param {object} [context] - The context in which the callback is invoked.\n *\n * @return {array} The input array.\n */\nvar Add = function (array, item, limit, callback, context)\n{\n if (context === undefined) { context = array; }\n\n if (limit > 0)\n {\n var remaining = limit - array.length;\n\n // There's nothing more we can do here, the array is full\n if (remaining <= 0)\n {\n return null;\n }\n }\n\n // Fast path to avoid array mutation and iteration\n if (!Array.isArray(item))\n {\n if (array.indexOf(item) === -1)\n {\n array.push(item);\n\n if (callback)\n {\n callback.call(context, item);\n }\n\n return item;\n }\n else\n {\n return null;\n }\n }\n\n // If we got this far, we have an array of items to insert\n\n // Ensure all the items are unique\n var itemLength = item.length - 1;\n\n while (itemLength >= 0)\n {\n if (array.indexOf(item[itemLength]) !== -1)\n {\n // Already exists in array, so remove it\n item.splice(itemLength, 1);\n }\n\n itemLength--;\n }\n\n // Anything left?\n itemLength = item.length;\n\n if (itemLength === 0)\n {\n return null;\n }\n\n if (limit > 0 && itemLength > remaining)\n {\n item.splice(remaining);\n\n itemLength = remaining;\n }\n\n for (var i = 0; i < itemLength; i++)\n {\n var entry = item[i];\n\n array.push(entry);\n\n if (callback)\n {\n callback.call(context, entry);\n }\n }\n\n return item;\n};\n\nmodule.exports = Add;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Adds the given item, or array of items, to the array starting at the index specified.\n * \n * Each item must be unique within the array.\n * \n * Existing elements in the array are shifted up.\n * \n * The array is modified in-place and returned.\n * \n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\n * added will take the array length over this limit, it will stop adding once the limit is reached.\n * \n * You can optionally specify a callback to be invoked for each item successfully added to the array.\n *\n * @function Phaser.Utils.Array.AddAt\n * @since 3.4.0\n *\n * @param {array} array - The array to be added to.\n * @param {any|any[]} item - The item, or array of items, to add to the array.\n * @param {integer} [index=0] - The index in the array where the item will be inserted.\n * @param {integer} [limit] - Optional limit which caps the size of the array.\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\n * @param {object} [context] - The context in which the callback is invoked.\n *\n * @return {array} The input array.\n */\nvar AddAt = function (array, item, index, limit, callback, context)\n{\n if (index === undefined) { index = 0; }\n if (context === undefined) { context = array; }\n\n if (limit > 0)\n {\n var remaining = limit - array.length;\n\n // There's nothing more we can do here, the array is full\n if (remaining <= 0)\n {\n return null;\n }\n }\n\n // Fast path to avoid array mutation and iteration\n if (!Array.isArray(item))\n {\n if (array.indexOf(item) === -1)\n {\n array.splice(index, 0, item);\n\n if (callback)\n {\n callback.call(context, item);\n }\n\n return item;\n }\n else\n {\n return null;\n }\n }\n\n // If we got this far, we have an array of items to insert\n\n // Ensure all the items are unique\n var itemLength = item.length - 1;\n\n while (itemLength >= 0)\n {\n if (array.indexOf(item[itemLength]) !== -1)\n {\n // Already exists in array, so remove it\n item.pop();\n }\n\n itemLength--;\n }\n\n // Anything left?\n itemLength = item.length;\n\n if (itemLength === 0)\n {\n return null;\n }\n\n // Truncate to the limit\n if (limit > 0 && itemLength > remaining)\n {\n item.splice(remaining);\n\n itemLength = remaining;\n }\n\n for (var i = itemLength - 1; i >= 0; i--)\n {\n var entry = item[i];\n\n array.splice(index, 0, entry);\n\n if (callback)\n {\n callback.call(context, entry);\n }\n }\n\n return item;\n};\n\nmodule.exports = AddAt;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the given element to the top of the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.BringToTop\n * @since 3.4.0\n *\n * @param {array} array - The array.\n * @param {*} item - The element to move.\n *\n * @return {*} The element that was moved.\n */\nvar BringToTop = function (array, item)\n{\n var currentIndex = array.indexOf(item);\n\n if (currentIndex !== -1 && currentIndex < array.length)\n {\n array.splice(currentIndex, 1);\n array.push(item);\n }\n\n return item;\n};\n\nmodule.exports = BringToTop;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SafeRange = require('./SafeRange');\n\n/**\n * Returns the total number of elements in the array which have a property matching the given value.\n *\n * @function Phaser.Utils.Array.CountAllMatching\n * @since 3.4.0\n *\n * @param {array} array - The array to search.\n * @param {string} property - The property to test on each array element.\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\n * @param {integer} [startIndex] - An optional start index to search from.\n * @param {integer} [endIndex] - An optional end index to search to.\n *\n * @return {integer} The total number of elements with properties matching the given value.\n */\nvar CountAllMatching = function (array, property, value, startIndex, endIndex)\n{\n if (startIndex === undefined) { startIndex = 0; }\n if (endIndex === undefined) { endIndex = array.length; }\n\n var total = 0;\n\n if (SafeRange(array, startIndex, endIndex))\n {\n for (var i = startIndex; i < endIndex; i++)\n {\n var child = array[i];\n\n if (child[property] === value)\n {\n total++;\n }\n }\n }\n\n return total;\n};\n\nmodule.exports = CountAllMatching;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Passes each element in the array to the given callback.\n *\n * @function Phaser.Utils.Array.Each\n * @since 3.4.0\n *\n * @param {array} array - The array to search.\n * @param {function} callback - A callback to be invoked for each item in the array.\n * @param {object} context - The context in which the callback is invoked.\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the current array item.\n *\n * @return {array} The input array.\n */\nvar Each = function (array, callback, context)\n{\n var i;\n var args = [ null ];\n\n for (i = 3; i < arguments.length; i++)\n {\n args.push(arguments[i]);\n }\n\n for (i = 0; i < array.length; i++)\n {\n args[0] = array[i];\n\n callback.apply(context, args);\n }\n\n return array;\n};\n\nmodule.exports = Each;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SafeRange = require('./SafeRange');\n\n/**\n * Passes each element in the array, between the start and end indexes, to the given callback.\n *\n * @function Phaser.Utils.Array.EachInRange\n * @since 3.4.0\n *\n * @param {array} array - The array to search.\n * @param {function} callback - A callback to be invoked for each item in the array.\n * @param {object} context - The context in which the callback is invoked.\n * @param {integer} startIndex - The start index to search from.\n * @param {integer} endIndex - The end index to search to.\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\n *\n * @return {array} The input array.\n */\nvar EachInRange = function (array, callback, context, startIndex, endIndex)\n{\n if (startIndex === undefined) { startIndex = 0; }\n if (endIndex === undefined) { endIndex = array.length; }\n\n if (SafeRange(array, startIndex, endIndex))\n {\n var i;\n var args = [ null ];\n\n for (i = 5; i < arguments.length; i++)\n {\n args.push(arguments[i]);\n }\n\n for (i = startIndex; i < endIndex; i++)\n {\n args[0] = array[i];\n\n callback.apply(context, args);\n }\n }\n\n return array;\n};\n\nmodule.exports = EachInRange;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Searches a pre-sorted array for the closet value to the given number.\n *\n * If the `key` argument is given it will assume the array contains objects that all have the required `key` property name,\n * and will check for the closest value of those to the given number.\n *\n * @function Phaser.Utils.Array.FindClosestInSorted\n * @since 3.0.0\n *\n * @param {number} value - The value to search for in the array.\n * @param {array} array - The array to search, which must be sorted.\n * @param {string} [key] - An optional property key. If specified the array elements property will be checked against value.\n *\n * @return {(number|any)} The nearest value found in the array, or if a `key` was given, the nearest object with the matching property value.\n */\nvar FindClosestInSorted = function (value, array, key)\n{\n if (!array.length)\n {\n return NaN;\n }\n else if (array.length === 1)\n {\n return array[0];\n }\n\n var i = 1;\n var low;\n var high;\n\n if (key)\n {\n if (value < array[0][key])\n {\n return array[0];\n }\n\n while (array[i][key] < value)\n {\n i++;\n }\n }\n else\n {\n while (array[i] < value)\n {\n i++;\n }\n }\n\n if (i > array.length)\n {\n i = array.length;\n }\n\n if (key)\n {\n low = array[i - 1][key];\n high = array[i][key];\n\n return ((high - value) <= (value - low)) ? array[i] : array[i - 1];\n }\n else\n {\n low = array[i - 1];\n high = array[i];\n\n return ((high - value) <= (value - low)) ? high : low;\n }\n};\n\nmodule.exports = FindClosestInSorted;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SafeRange = require('./SafeRange');\n\n/**\n * Returns all elements in the array.\n *\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\n *\n * For example: `getAll('visible', true)` would return only elements that have their visible property set.\n *\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\n * the first 50 elements.\n *\n * @function Phaser.Utils.Array.GetAll\n * @since 3.4.0\n *\n * @param {array} array - The array to search.\n * @param {string} [property] - The property to test on each array element.\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\n * @param {integer} [startIndex] - An optional start index to search from.\n * @param {integer} [endIndex] - An optional end index to search to.\n *\n * @return {array} All matching elements from the array.\n */\nvar GetAll = function (array, property, value, startIndex, endIndex)\n{\n if (startIndex === undefined) { startIndex = 0; }\n if (endIndex === undefined) { endIndex = array.length; }\n\n var output = [];\n\n if (SafeRange(array, startIndex, endIndex))\n {\n for (var i = startIndex; i < endIndex; i++)\n {\n var child = array[i];\n\n if (!property ||\n (property && value === undefined && child.hasOwnProperty(property)) ||\n (property && value !== undefined && child[property] === value))\n {\n output.push(child);\n }\n }\n }\n\n return output;\n};\n\nmodule.exports = GetAll;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SafeRange = require('./SafeRange');\n\n/**\n * Returns the first element in the array.\n *\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\n *\n * For example: `getAll('visible', true)` would return the first element that had its `visible` property set.\n *\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\n * and you set `startIndex` to 0 and `endIndex` to 50, it would search only the first 50 elements.\n *\n * @function Phaser.Utils.Array.GetFirst\n * @since 3.4.0\n *\n * @param {array} array - The array to search.\n * @param {string} [property] - The property to test on each array element.\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\n * @param {integer} [startIndex=0] - An optional start index to search from.\n * @param {integer} [endIndex=array.length] - An optional end index to search up to (but not included)\n *\n * @return {object} The first matching element from the array, or `null` if no element could be found in the range given.\n */\nvar GetFirst = function (array, property, value, startIndex, endIndex)\n{\n if (startIndex === undefined) { startIndex = 0; }\n if (endIndex === undefined) { endIndex = array.length; }\n\n if (SafeRange(array, startIndex, endIndex))\n {\n for (var i = startIndex; i < endIndex; i++)\n {\n var child = array[i];\n\n if (!property ||\n (property && value === undefined && child.hasOwnProperty(property)) ||\n (property && value !== undefined && child[property] === value))\n {\n return child;\n }\n }\n }\n\n return null;\n};\n\nmodule.exports = GetFirst;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Returns a Random element from the array.\n *\n * @function Phaser.Utils.Array.GetRandom\n * @since 3.0.0\n *\n * @param {array} array - The array to select the random entry from.\n * @param {integer} [startIndex=0] - An optional start index.\n * @param {integer} [length=array.length] - An optional length, the total number of elements (from the startIndex) to choose from.\n *\n * @return {*} A random element from the array, or `null` if no element could be found in the range given.\n */\nvar GetRandom = function (array, startIndex, length)\n{\n if (startIndex === undefined) { startIndex = 0; }\n if (length === undefined) { length = array.length; }\n\n var randomIndex = startIndex + Math.floor(Math.random() * length);\n\n return (array[randomIndex] === undefined) ? null : array[randomIndex];\n};\n\nmodule.exports = GetRandom;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the given array element down one place in the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.MoveDown\n * @since 3.4.0\n *\n * @param {array} array - The input array.\n * @param {*} item - The element to move down the array.\n *\n * @return {array} The input array.\n */\nvar MoveDown = function (array, item)\n{\n var currentIndex = array.indexOf(item);\n\n if (currentIndex > 0)\n {\n var item2 = array[currentIndex - 1];\n\n var index2 = array.indexOf(item2);\n\n array[currentIndex] = item2;\n array[index2] = item;\n }\n\n return array;\n};\n\nmodule.exports = MoveDown;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves an element in an array to a new position within the same array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.MoveTo\n * @since 3.4.0\n *\n * @param {array} array - The array.\n * @param {*} item - The element to move.\n * @param {integer} index - The new index that the element will be moved to.\n *\n * @return {*} The element that was moved.\n */\nvar MoveTo = function (array, item, index)\n{\n var currentIndex = array.indexOf(item);\n\n if (currentIndex === -1 || index < 0 || index >= array.length)\n {\n throw new Error('Supplied index out of bounds');\n }\n\n if (currentIndex !== index)\n {\n // Remove\n array.splice(currentIndex, 1);\n\n // Add in new location\n array.splice(index, 0, item);\n }\n\n return item;\n};\n\nmodule.exports = MoveTo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the given array element up one place in the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.MoveUp\n * @since 3.4.0\n *\n * @param {array} array - The input array.\n * @param {*} item - The element to move up the array.\n *\n * @return {array} The input array.\n */\nvar MoveUp = function (array, item)\n{\n var currentIndex = array.indexOf(item);\n\n if (currentIndex !== -1 && currentIndex < array.length - 1)\n {\n // The element one above `item` in the array\n var item2 = array[currentIndex + 1];\n var index2 = array.indexOf(item2);\n\n array[currentIndex] = item2;\n array[index2] = item;\n }\n\n return array;\n};\n\nmodule.exports = MoveUp;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Create an array representing the range of numbers (usually integers), between, and inclusive of,\n * the given `start` and `end` arguments. For example:\n *\n * `var array = numberArray(2, 4); // array = [2, 3, 4]`\n * `var array = numberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]`\n *\n * This is equivalent to `numberArrayStep(start, end, 1)`.\n *\n * You can optionally provide a prefix and / or suffix string. If given the array will contain\n * strings, not integers. For example:\n *\n * `var array = numberArray(1, 4, 'Level '); // array = [\"Level 1\", \"Level 2\", \"Level 3\", \"Level 4\"]`\n * `var array = numberArray(5, 7, 'HD-', '.png'); // array = [\"HD-5.png\", \"HD-6.png\", \"HD-7.png\"]`\n *\n * @function Phaser.Utils.Array.NumberArray\n * @since 3.0.0\n *\n * @param {number} start - The minimum value the array starts with.\n * @param {number} end - The maximum value the array contains.\n * @param {string} [prefix] - Optional prefix to place before the number. If provided the array will contain strings, not integers.\n * @param {string} [suffix] - Optional suffix to place after the number. If provided the array will contain strings, not integers.\n *\n * @return {(number[]|string[])} The array of number values, or strings if a prefix or suffix was provided.\n */\nvar NumberArray = function (start, end, prefix, suffix)\n{\n var result = [];\n\n for (var i = start; i <= end; i++)\n {\n if (prefix || suffix)\n {\n var key = (prefix) ? prefix + i.toString() : i.toString();\n\n if (suffix)\n {\n key = key.concat(suffix);\n }\n\n result.push(key);\n }\n else\n {\n result.push(i);\n }\n }\n\n return result;\n};\n\nmodule.exports = NumberArray;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar RoundAwayFromZero = require('../../math/RoundAwayFromZero');\n\n/**\n * Create an array of numbers (positive and/or negative) progressing from `start`\n * up to but not including `end` by advancing by `step`.\n *\n * If `start` is less than `end` a zero-length range is created unless a negative `step` is specified.\n *\n * Certain values for `start` and `end` (eg. NaN/undefined/null) are currently coerced to 0;\n * for forward compatibility make sure to pass in actual numbers.\n * \n * @example\n * NumberArrayStep(4);\n * // => [0, 1, 2, 3]\n *\n * NumberArrayStep(1, 5);\n * // => [1, 2, 3, 4]\n *\n * NumberArrayStep(0, 20, 5);\n * // => [0, 5, 10, 15]\n *\n * NumberArrayStep(0, -4, -1);\n * // => [0, -1, -2, -3]\n *\n * NumberArrayStep(1, 4, 0);\n * // => [1, 1, 1]\n *\n * NumberArrayStep(0);\n * // => []\n *\n * @function Phaser.Utils.Array.NumberArrayStep\n * @since 3.0.0\n *\n * @param {number} [start=0] - The start of the range.\n * @param {number} [end=null] - The end of the range.\n * @param {number} [step=1] - The value to increment or decrement by.\n *\n * @return {number[]} The array of number values.\n */\nvar NumberArrayStep = function (start, end, step)\n{\n if (start === undefined) { start = 0; }\n if (end === undefined) { end = null; }\n if (step === undefined) { step = 1; }\n\n if (end === null)\n {\n end = start;\n start = 0;\n }\n\n var result = [];\n\n var total = Math.max(RoundAwayFromZero((end - start) / (step || 1)), 0);\n\n for (var i = 0; i < total; i++)\n {\n result.push(start);\n start += step;\n }\n\n return result;\n};\n\nmodule.exports = NumberArrayStep;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @ignore\n */\nfunction swap (arr, i, j)\n{\n var tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n\n/**\n * @ignore\n */\nfunction defaultCompare (a, b)\n{\n return a < b ? -1 : a > b ? 1 : 0;\n}\n\n/**\n * A [Floyd-Rivest](https://en.wikipedia.org/wiki/Floyd%E2%80%93Rivest_algorithm) quick selection algorithm.\n *\n * Rearranges the array items so that all items in the [left, k] range are smaller than all items in [k, right];\n * The k-th element will have the (k - left + 1)th smallest value in [left, right].\n *\n * The array is modified in-place.\n *\n * Based on code by [Vladimir Agafonkin](https://www.npmjs.com/~mourner)\n *\n * @function Phaser.Utils.Array.QuickSelect\n * @since 3.0.0\n *\n * @param {array} arr - The array to sort.\n * @param {integer} k - The k-th element index.\n * @param {integer} [left=0] - The index of the left part of the range.\n * @param {integer} [right] - The index of the right part of the range.\n * @param {function} [compare] - An optional comparison function. Is passed two elements and should return 0, 1 or -1.\n */\nvar QuickSelect = function (arr, k, left, right, compare)\n{\n if (left === undefined) { left = 0; }\n if (right === undefined) { right = arr.length - 1; }\n if (compare === undefined) { compare = defaultCompare; }\n\n while (right > left)\n {\n if (right - left > 600)\n {\n var n = right - left + 1;\n var m = k - left + 1;\n var z = Math.log(n);\n var s = 0.5 * Math.exp(2 * z / 3);\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n\n QuickSelect(arr, k, newLeft, newRight, compare);\n }\n\n var t = arr[k];\n var i = left;\n var j = right;\n\n swap(arr, left, k);\n\n if (compare(arr[right], t) > 0)\n {\n swap(arr, left, right);\n }\n\n while (i < j)\n {\n swap(arr, i, j);\n\n i++;\n j--;\n\n while (compare(arr[i], t) < 0)\n {\n i++;\n }\n\n while (compare(arr[j], t) > 0)\n {\n j--;\n }\n }\n\n if (compare(arr[left], t) === 0)\n {\n swap(arr, left, j);\n }\n else\n {\n j++;\n swap(arr, j, right);\n }\n\n if (j <= k)\n {\n left = j + 1;\n }\n\n if (k <= j)\n {\n right = j - 1;\n }\n }\n};\n\nmodule.exports = QuickSelect;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar GetValue = require('../object/GetValue');\nvar Shuffle = require('./Shuffle');\n\nvar BuildChunk = function (a, b, qty)\n{\n var out = [];\n\n for (var aIndex = 0; aIndex < a.length; aIndex++)\n {\n for (var bIndex = 0; bIndex < b.length; bIndex++)\n {\n for (var i = 0; i < qty; i++)\n {\n out.push({ a: a[aIndex], b: b[bIndex] });\n }\n }\n }\n\n return out;\n};\n\n/**\n * Creates an array populated with a range of values, based on the given arguments and configuration object.\n *\n * Range ([a,b,c], [1,2,3]) =\n * a1, a2, a3, b1, b2, b3, c1, c2, c3\n * \n * Range ([a,b], [1,2,3], qty = 3) =\n * a1, a1, a1, a2, a2, a2, a3, a3, a3, b1, b1, b1, b2, b2, b2, b3, b3, b3\n * \n * Range ([a,b,c], [1,2,3], repeat x1) =\n * a1, a2, a3, b1, b2, b3, c1, c2, c3, a1, a2, a3, b1, b2, b3, c1, c2, c3\n * \n * Range ([a,b], [1,2], repeat -1 = endless, max = 14) =\n * Maybe if max is set then repeat goes to -1 automatically?\n * a1, a2, b1, b2, a1, a2, b1, b2, a1, a2, b1, b2, a1, a2 (capped at 14 elements)\n * \n * Range ([a], [1,2,3,4,5], random = true) =\n * a4, a1, a5, a2, a3\n * \n * Range ([a, b], [1,2,3], random = true) =\n * b3, a2, a1, b1, a3, b2\n * \n * Range ([a, b, c], [1,2,3], randomB = true) =\n * a3, a1, a2, b2, b3, b1, c1, c3, c2\n * \n * Range ([a], [1,2,3,4,5], yoyo = true) =\n * a1, a2, a3, a4, a5, a5, a4, a3, a2, a1\n * \n * Range ([a, b], [1,2,3], yoyo = true) =\n * a1, a2, a3, b1, b2, b3, b3, b2, b1, a3, a2, a1\n *\n * @function Phaser.Utils.Array.Range\n * @since 3.0.0\n *\n * @param {array} a - The first array of range elements.\n * @param {array} b - The second array of range elements.\n * @param {object} [options] - A range configuration object. Can contain: repeat, random, randomB, yoyo, max, qty.\n *\n * @return {array} An array of arranged elements.\n */\nvar Range = function (a, b, options)\n{\n var max = GetValue(options, 'max', 0);\n var qty = GetValue(options, 'qty', 1);\n var random = GetValue(options, 'random', false);\n var randomB = GetValue(options, 'randomB', false);\n var repeat = GetValue(options, 'repeat', 0);\n var yoyo = GetValue(options, 'yoyo', false);\n\n var out = [];\n\n if (randomB)\n {\n Shuffle(b);\n }\n\n // Endless repeat, so limit by max\n if (repeat === -1)\n {\n if (max === 0)\n {\n repeat = 0;\n }\n else\n {\n // Work out how many repeats we need\n var total = (a.length * b.length) * qty;\n\n if (yoyo)\n {\n total *= 2;\n }\n\n repeat = Math.ceil(max / total);\n }\n }\n\n for (var i = 0; i <= repeat; i++)\n {\n var chunk = BuildChunk(a, b, qty);\n\n if (random)\n {\n Shuffle(chunk);\n }\n\n out = out.concat(chunk);\n\n if (yoyo)\n {\n chunk.reverse();\n\n out = out.concat(chunk);\n }\n }\n\n if (max)\n {\n out.splice(max);\n }\n\n return out;\n};\n\nmodule.exports = Range;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SpliceOne = require('./SpliceOne');\n\n/**\n * Removes the given item, or array of items, from the array.\n * \n * The array is modified in-place.\n * \n * You can optionally specify a callback to be invoked for each item successfully removed from the array.\n *\n * @function Phaser.Utils.Array.Remove\n * @since 3.4.0\n *\n * @param {array} array - The array to be modified.\n * @param {*|Array.<*>} item - The item, or array of items, to be removed from the array.\n * @param {function} [callback] - A callback to be invoked for each item successfully removed from the array.\n * @param {object} [context] - The context in which the callback is invoked.\n *\n * @return {*|Array.<*>} The item, or array of items, that were successfully removed from the array.\n */\nvar Remove = function (array, item, callback, context)\n{\n if (context === undefined) { context = array; }\n\n var index;\n\n // Fast path to avoid array mutation and iteration\n if (!Array.isArray(item))\n {\n index = array.indexOf(item);\n\n if (index !== -1)\n {\n SpliceOne(array, index);\n\n if (callback)\n {\n callback.call(context, item);\n }\n\n return item;\n }\n else\n {\n return null;\n }\n }\n\n // If we got this far, we have an array of items to remove\n\n var itemLength = item.length - 1;\n\n while (itemLength >= 0)\n {\n var entry = item[itemLength];\n\n index = array.indexOf(entry);\n\n if (index !== -1)\n {\n SpliceOne(array, index);\n\n if (callback)\n {\n callback.call(context, entry);\n }\n }\n else\n {\n // Item wasn't found in the array, so remove it from our return results\n item.pop();\n }\n\n itemLength--;\n }\n\n return item;\n};\n\nmodule.exports = Remove;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SpliceOne = require('./SpliceOne');\n\n/**\n * Removes the item from the given position in the array.\n * \n * The array is modified in-place.\n * \n * You can optionally specify a callback to be invoked for the item if it is successfully removed from the array.\n *\n * @function Phaser.Utils.Array.RemoveAt\n * @since 3.4.0\n *\n * @param {array} array - The array to be modified.\n * @param {integer} index - The array index to remove the item from. The index must be in bounds or it will throw an error.\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\n * @param {object} [context] - The context in which the callback is invoked.\n *\n * @return {*} The item that was removed.\n */\nvar RemoveAt = function (array, index, callback, context)\n{\n if (context === undefined) { context = array; }\n\n if (index < 0 || index > array.length - 1)\n {\n throw new Error('Index out of bounds');\n }\n\n var item = SpliceOne(array, index);\n\n if (callback)\n {\n callback.call(context, item);\n }\n\n return item;\n};\n\nmodule.exports = RemoveAt;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SafeRange = require('./SafeRange');\n\n/**\n * Removes the item within the given range in the array.\n * \n * The array is modified in-place.\n * \n * You can optionally specify a callback to be invoked for the item/s successfully removed from the array.\n *\n * @function Phaser.Utils.Array.RemoveBetween\n * @since 3.4.0\n *\n * @param {array} array - The array to be modified.\n * @param {integer} startIndex - The start index to remove from.\n * @param {integer} endIndex - The end index to remove to.\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\n * @param {object} [context] - The context in which the callback is invoked.\n *\n * @return {Array.<*>} An array of items that were removed.\n */\nvar RemoveBetween = function (array, startIndex, endIndex, callback, context)\n{\n if (startIndex === undefined) { startIndex = 0; }\n if (endIndex === undefined) { endIndex = array.length; }\n if (context === undefined) { context = array; }\n\n if (SafeRange(array, startIndex, endIndex))\n {\n var size = endIndex - startIndex;\n\n var removed = array.splice(startIndex, size);\n\n if (callback)\n {\n for (var i = 0; i < removed.length; i++)\n {\n var entry = removed[i];\n\n callback.call(context, entry);\n }\n }\n\n return removed;\n }\n else\n {\n return [];\n }\n};\n\nmodule.exports = RemoveBetween;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SpliceOne = require('./SpliceOne');\n\n/**\n * Removes a random object from the given array and returns it.\n * Will return null if there are no array items that fall within the specified range or if there is no item for the randomly chosen index.\n *\n * @function Phaser.Utils.Array.RemoveRandomElement\n * @since 3.0.0\n *\n * @param {array} array - The array to removed a random element from.\n * @param {integer} [start=0] - The array index to start the search from.\n * @param {integer} [length=array.length] - Optional restriction on the number of elements to randomly select from.\n *\n * @return {object} The random element that was removed, or `null` if there were no array elements that fell within the given range.\n */\nvar RemoveRandomElement = function (array, start, length)\n{\n if (start === undefined) { start = 0; }\n if (length === undefined) { length = array.length; }\n\n var randomIndex = start + Math.floor(Math.random() * length);\n\n return SpliceOne(array, randomIndex);\n};\n\nmodule.exports = RemoveRandomElement;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Replaces an element of the array with the new element.\n * The new element cannot already be a member of the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.Replace\n * @since 3.4.0\n *\n * @param {array} array - The array to search within.\n * @param {*} oldChild - The element in the array that will be replaced.\n * @param {*} newChild - The element to be inserted into the array at the position of `oldChild`.\n *\n * @return {boolean} Returns true if the oldChild was successfully replaced, otherwise returns false.\n */\nvar Replace = function (array, oldChild, newChild)\n{\n var index1 = array.indexOf(oldChild);\n var index2 = array.indexOf(newChild);\n\n if (index1 !== -1 && index2 === -1)\n {\n array[index1] = newChild;\n\n return true;\n }\n else\n {\n return false;\n }\n};\n\nmodule.exports = Replace;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the element at the start of the array to the end, shifting all items in the process.\n * The \"rotation\" happens to the left.\n *\n * @function Phaser.Utils.Array.RotateLeft\n * @since 3.0.0\n *\n * @param {array} array - The array to shift to the left. This array is modified in place.\n * @param {integer} [total=1] - The number of times to shift the array.\n *\n * @return {*} The most recently shifted element.\n */\nvar RotateLeft = function (array, total)\n{\n if (total === undefined) { total = 1; }\n\n var element = null;\n\n for (var i = 0; i < total; i++)\n {\n element = array.shift();\n array.push(element);\n }\n\n return element;\n};\n\nmodule.exports = RotateLeft;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the element at the end of the array to the start, shifting all items in the process.\n * The \"rotation\" happens to the right.\n *\n * @function Phaser.Utils.Array.RotateRight\n * @since 3.0.0\n *\n * @param {array} array - The array to shift to the right. This array is modified in place.\n * @param {integer} [total=1] - The number of times to shift the array.\n *\n * @return {*} The most recently shifted element.\n */\nvar RotateRight = function (array, total)\n{\n if (total === undefined) { total = 1; }\n\n var element = null;\n\n for (var i = 0; i < total; i++)\n {\n element = array.pop();\n array.unshift(element);\n }\n\n return element;\n};\n\nmodule.exports = RotateRight;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Tests if the start and end indexes are a safe range for the given array.\n * \n * @function Phaser.Utils.Array.SafeRange\n * @since 3.4.0\n *\n * @param {array} array - The array to check.\n * @param {integer} startIndex - The start index.\n * @param {integer} endIndex - The end index.\n * @param {boolean} [throwError=true] - Throw an error if the range is out of bounds.\n *\n * @return {boolean} True if the range is safe, otherwise false.\n */\nvar SafeRange = function (array, startIndex, endIndex, throwError)\n{\n var len = array.length;\n\n if (startIndex < 0 ||\n startIndex > len ||\n startIndex >= endIndex ||\n endIndex > len ||\n startIndex + endIndex > len)\n {\n if (throwError)\n {\n throw new Error('Range Error: Values outside acceptable range');\n }\n\n return false;\n }\n else\n {\n return true;\n }\n};\n\nmodule.exports = SafeRange;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the given element to the bottom of the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.SendToBack\n * @since 3.4.0\n *\n * @param {array} array - The array.\n * @param {*} item - The element to move.\n *\n * @return {*} The element that was moved.\n */\nvar SendToBack = function (array, item)\n{\n var currentIndex = array.indexOf(item);\n\n if (currentIndex !== -1 && currentIndex > 0)\n {\n array.splice(currentIndex, 1);\n array.unshift(item);\n }\n\n return item;\n};\n\nmodule.exports = SendToBack;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SafeRange = require('./SafeRange');\n\n/**\n * Scans the array for elements with the given property. If found, the property is set to the `value`.\n *\n * For example: `SetAll('visible', true)` would set all elements that have a `visible` property to `false`.\n *\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\n * and you set `startIndex` to 0 and `endIndex` to 50, it would update only the first 50 elements.\n *\n * @function Phaser.Utils.Array.SetAll\n * @since 3.4.0\n *\n * @param {array} array - The array to search.\n * @param {string} property - The property to test for on each array element.\n * @param {*} value - The value to set the property to.\n * @param {integer} [startIndex] - An optional start index to search from.\n * @param {integer} [endIndex] - An optional end index to search to.\n *\n * @return {array} The input array.\n */\nvar SetAll = function (array, property, value, startIndex, endIndex)\n{\n if (startIndex === undefined) { startIndex = 0; }\n if (endIndex === undefined) { endIndex = array.length; }\n\n if (SafeRange(array, startIndex, endIndex))\n {\n for (var i = startIndex; i < endIndex; i++)\n {\n var entry = array[i];\n\n if (entry.hasOwnProperty(property))\n {\n entry[property] = value;\n }\n }\n }\n\n return array;\n};\n\nmodule.exports = SetAll;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Shuffles the contents of the given array using the Fisher-Yates implementation.\n *\n * The original array is modified directly and returned.\n *\n * @function Phaser.Utils.Array.Shuffle\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[]} - [array,$return]\n *\n * @param {T[]} array - The array to shuffle. This array is modified in place.\n *\n * @return {T[]} The shuffled array.\n */\nvar Shuffle = function (array)\n{\n for (var i = array.length - 1; i > 0; i--)\n {\n var j = Math.floor(Math.random() * (i + 1));\n var temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n }\n\n return array;\n};\n\nmodule.exports = Shuffle;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Removes a single item from an array and returns it without creating gc, like the native splice does.\n * Based on code by Mike Reinstein.\n *\n * @function Phaser.Utils.Array.SpliceOne\n * @since 3.0.0\n *\n * @param {array} array - The array to splice from.\n * @param {integer} index - The index of the item which should be spliced.\n *\n * @return {*} The item which was spliced (removed).\n */\nvar SpliceOne = function (array, index)\n{\n if (index >= array.length)\n {\n return;\n }\n\n var len = array.length - 1;\n\n var item = array[index];\n\n for (var i = index; i < len; i++)\n {\n array[i] = array[i + 1];\n }\n\n array.length = len;\n\n return item;\n};\n\nmodule.exports = SpliceOne;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n//! stable.js 0.1.6, https://github.com/Two-Screen/stable\n//! © 2017 Angry Bytes and contributors. MIT licensed.\n\n/**\n * @namespace Phaser.Utils.Array.StableSortFunctions\n */\n\n(function() {\n\n /**\n * A stable array sort, because `Array#sort()` is not guaranteed stable.\n * This is an implementation of merge sort, without recursion.\n *\n * @function Phaser.Utils.Array.StableSort\n * @since 3.0.0\n *\n * @param {array} arr - The input array to be sorted.\n * @param {function} comp - The comparison handler.\n *\n * @return {array} The sorted result.\n */\nvar stable = function(arr, comp) {\n return exec(arr.slice(), comp);\n};\n\n /**\n * Sort the input array and simply copy it back if the result isn't in the original array, which happens on an odd number of passes.\n *\n * @function Phaser.Utils.Array.StableSortFunctions.inplace\n * @memberof Phaser.Utils.Array.StableSortFunctions\n * @since 3.0.0\n *\n * @param {array} arr - The input array.\n * @param {function} comp - The comparison handler.\n *\n * @return {array} The sorted array.\n */\nstable.inplace = function(arr, comp) {\n var result = exec(arr, comp);\n\n // This simply copies back if the result isn't in the original array,\n // which happens on an odd number of passes.\n if (result !== arr) {\n pass(result, null, arr.length, arr);\n }\n\n return arr;\n};\n\n// Execute the sort using the input array and a second buffer as work space.\n// Returns one of those two, containing the final result.\nfunction exec(arr, comp) {\n if (typeof(comp) !== 'function') {\n comp = function(a, b) {\n return String(a).localeCompare(b);\n };\n }\n\n // Short-circuit when there's nothing to sort.\n var len = arr.length;\n if (len <= 1) {\n return arr;\n }\n\n // Rather than dividing input, simply iterate chunks of 1, 2, 4, 8, etc.\n // Chunks are the size of the left or right hand in merge sort.\n // Stop when the left-hand covers all of the array.\n var buffer = new Array(len);\n for (var chk = 1; chk < len; chk *= 2) {\n pass(arr, comp, chk, buffer);\n\n var tmp = arr;\n arr = buffer;\n buffer = tmp;\n }\n\n return arr;\n}\n\n// Run a single pass with the given chunk size.\nvar pass = function(arr, comp, chk, result) {\n var len = arr.length;\n var i = 0;\n // Step size / double chunk size.\n var dbl = chk * 2;\n // Bounds of the left and right chunks.\n var l, r, e;\n // Iterators over the left and right chunk.\n var li, ri;\n\n // Iterate over pairs of chunks.\n for (l = 0; l < len; l += dbl) {\n r = l + chk;\n e = r + chk;\n if (r > len) r = len;\n if (e > len) e = len;\n\n // Iterate both chunks in parallel.\n li = l;\n ri = r;\n while (true) {\n // Compare the chunks.\n if (li < r && ri < e) {\n // This works for a regular `sort()` compatible comparator,\n // but also for a simple comparator like: `a > b`\n if (comp(arr[li], arr[ri]) <= 0) {\n result[i++] = arr[li++];\n }\n else {\n result[i++] = arr[ri++];\n }\n }\n // Nothing to compare, just flush what's left.\n else if (li < r) {\n result[i++] = arr[li++];\n }\n else if (ri < e) {\n result[i++] = arr[ri++];\n }\n // Both iterators are at the chunk ends.\n else {\n break;\n }\n }\n }\n};\n\n// Export using CommonJS or to the window.\nif (typeof(module) !== 'undefined') {\n module.exports = stable;\n}\nelse {\n window.stable = stable;\n}\n\n})();","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Swaps the position of two elements in the given array.\n * The elements must exist in the same array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.Swap\n * @since 3.4.0\n *\n * @param {array} array - The input array.\n * @param {*} item1 - The first element to swap.\n * @param {*} item2 - The second element to swap.\n *\n * @return {array} The input array.\n */\nvar Swap = function (array, item1, item2)\n{\n if (item1 === item2)\n {\n return;\n }\n\n var index1 = array.indexOf(item1);\n var index2 = array.indexOf(item2);\n\n if (index1 < 0 || index2 < 0)\n {\n throw new Error('Supplied items must be elements of the same array');\n }\n\n array[index1] = item2;\n array[index2] = item1;\n\n return array;\n};\n\nmodule.exports = Swap;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Utils.Array\n */\n\nmodule.exports = {\n\n Matrix: require('./matrix'),\n\n Add: require('./Add'),\n AddAt: require('./AddAt'),\n BringToTop: require('./BringToTop'),\n CountAllMatching: require('./CountAllMatching'),\n Each: require('./Each'),\n EachInRange: require('./EachInRange'),\n FindClosestInSorted: require('./FindClosestInSorted'),\n GetAll: require('./GetAll'),\n GetFirst: require('./GetFirst'),\n GetRandom: require('./GetRandom'),\n MoveDown: require('./MoveDown'),\n MoveTo: require('./MoveTo'),\n MoveUp: require('./MoveUp'),\n NumberArray: require('./NumberArray'),\n NumberArrayStep: require('./NumberArrayStep'),\n QuickSelect: require('./QuickSelect'),\n Range: require('./Range'),\n Remove: require('./Remove'),\n RemoveAt: require('./RemoveAt'),\n RemoveBetween: require('./RemoveBetween'),\n RemoveRandomElement: require('./RemoveRandomElement'),\n Replace: require('./Replace'),\n RotateLeft: require('./RotateLeft'),\n RotateRight: require('./RotateRight'),\n SafeRange: require('./SafeRange'),\n SendToBack: require('./SendToBack'),\n SetAll: require('./SetAll'),\n Shuffle: require('./Shuffle'),\n SpliceOne: require('./SpliceOne'),\n StableSort: require('./StableSort'),\n Swap: require('./Swap')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Checks if an array can be used as a matrix.\n *\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows) have the same length. There must be at least two rows:\n *\n * ```\n * [\n * [ 1, 1, 1, 1, 1, 1 ],\n * [ 2, 0, 0, 0, 0, 4 ],\n * [ 2, 0, 1, 2, 0, 4 ],\n * [ 2, 0, 3, 4, 0, 4 ],\n * [ 2, 0, 0, 0, 0, 4 ],\n * [ 3, 3, 3, 3, 3, 3 ]\n * ]\n * ```\n *\n * @function Phaser.Utils.Array.Matrix.CheckMatrix\n * @since 3.0.0\n * \n * @generic T\n * @genericUse {T[][]} - [matrix]\n *\n * @param {T[][]} [matrix] - The array to check.\n *\n * @return {boolean} `true` if the given `matrix` array is a valid matrix.\n */\nvar CheckMatrix = function (matrix)\n{\n if (!Array.isArray(matrix) || matrix.length < 2 || !Array.isArray(matrix[0]))\n {\n return false;\n }\n\n // How long is the first row?\n var size = matrix[0].length;\n\n // Validate the rest of the rows are the same length\n for (var i = 1; i < matrix.length; i++)\n {\n if (matrix[i].length !== size)\n {\n return false;\n }\n }\n\n return true;\n};\n\nmodule.exports = CheckMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Pad = require('../../string/Pad');\nvar CheckMatrix = require('./CheckMatrix');\n\n/**\n * Generates a string (which you can pass to console.log) from the given Array Matrix.\n *\n * @function Phaser.Utils.Array.Matrix.MatrixToString\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix]\n *\n * @param {T[][]} [matrix] - A 2-dimensional array.\n *\n * @return {string} A string representing the matrix.\n */\nvar MatrixToString = function (matrix)\n{\n var str = '';\n\n if (!CheckMatrix(matrix))\n {\n return str;\n }\n\n for (var r = 0; r < matrix.length; r++)\n {\n for (var c = 0; c < matrix[r].length; c++)\n {\n var cell = matrix[r][c].toString();\n\n if (cell !== 'undefined')\n {\n str += Pad(cell, 2);\n }\n else\n {\n str += '?';\n }\n\n if (c < matrix[r].length - 1)\n {\n str += ' |';\n }\n }\n\n if (r < matrix.length - 1)\n {\n str += '\\n';\n\n for (var i = 0; i < matrix[r].length; i++)\n {\n str += '---';\n\n if (i < matrix[r].length - 1)\n {\n str += '+';\n }\n }\n\n str += '\\n';\n }\n\n }\n\n return str;\n};\n\nmodule.exports = MatrixToString;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Reverses the columns in the given Array Matrix.\n *\n * @function Phaser.Utils.Array.Matrix.ReverseColumns\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix,$return]\n *\n * @param {T[][]} [matrix] - The array matrix to reverse the columns for.\n *\n * @return {T[][]} The column reversed matrix.\n */\nvar ReverseColumns = function (matrix)\n{\n return matrix.reverse();\n};\n\nmodule.exports = ReverseColumns;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Reverses the rows in the given Array Matrix.\n *\n * @function Phaser.Utils.Array.Matrix.ReverseRows\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix,$return]\n *\n * @param {T[][]} [matrix] - The array matrix to reverse the rows for.\n *\n * @return {T[][]} The column reversed matrix.\n */\nvar ReverseRows = function (matrix)\n{\n for (var i = 0; i < matrix.length; i++)\n {\n matrix[i].reverse();\n }\n\n return matrix;\n};\n\nmodule.exports = ReverseRows;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar RotateMatrix = require('./RotateMatrix');\n\n/**\n * Rotates the array matrix 180 degrees.\n *\n * @function Phaser.Utils.Array.Matrix.Rotate180\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix,$return]\n *\n * @param {T[][]} [matrix] - The array to rotate.\n *\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\n */\nvar Rotate180 = function (matrix)\n{\n return RotateMatrix(matrix, 180);\n};\n\nmodule.exports = Rotate180;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar RotateMatrix = require('./RotateMatrix');\n\n/**\n * Rotates the array matrix to the left (or 90 degrees)\n *\n * @function Phaser.Utils.Array.Matrix.RotateLeft\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix,$return]\n *\n * @param {T[][]} [matrix] - The array to rotate.\n *\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\n */\nvar RotateLeft = function (matrix)\n{\n return RotateMatrix(matrix, 90);\n};\n\nmodule.exports = RotateLeft;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CheckMatrix = require('./CheckMatrix');\nvar TransposeMatrix = require('./TransposeMatrix');\n\n/**\n * Rotates the array matrix based on the given rotation value.\n *\n * The value can be given in degrees: 90, -90, 270, -270 or 180,\n * or a string command: `rotateLeft`, `rotateRight` or `rotate180`.\n *\n * Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}.\n *\n * @function Phaser.Utils.Array.Matrix.RotateMatrix\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix,$return]\n *\n * @param {T[][]} [matrix] - The array to rotate.\n * @param {(number|string)} [direction=90] - The amount to rotate the matrix by.\n *\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\n */\nvar RotateMatrix = function (matrix, direction)\n{\n if (direction === undefined) { direction = 90; }\n\n if (!CheckMatrix(matrix))\n {\n return null;\n }\n\n if (typeof direction !== 'string')\n {\n direction = ((direction % 360) + 360) % 360;\n }\n\n if (direction === 90 || direction === -270 || direction === 'rotateLeft')\n {\n matrix = TransposeMatrix(matrix);\n matrix.reverse();\n }\n else if (direction === -90 || direction === 270 || direction === 'rotateRight')\n {\n matrix.reverse();\n matrix = TransposeMatrix(matrix);\n }\n else if (Math.abs(direction) === 180 || direction === 'rotate180')\n {\n for (var i = 0; i < matrix.length; i++)\n {\n matrix[i].reverse();\n }\n\n matrix.reverse();\n }\n\n return matrix;\n};\n\nmodule.exports = RotateMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar RotateMatrix = require('./RotateMatrix');\n\n/**\n * Rotates the array matrix to the left (or -90 degrees)\n *\n * @function Phaser.Utils.Array.Matrix.RotateRight\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix,$return]\n *\n * @param {T[][]} [matrix] - The array to rotate.\n *\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\n */\nvar RotateRight = function (matrix)\n{\n return RotateMatrix(matrix, -90);\n};\n\nmodule.exports = RotateRight;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Transposes the elements of the given matrix (array of arrays).\n *\n * The transpose of a matrix is a new matrix whose rows are the columns of the original.\n *\n * @function Phaser.Utils.Array.Matrix.TransposeMatrix\n * @since 3.0.0\n * \n * @generic T\n * @genericUse {T[][]} - [array,$return]\n * \n * @param {T[][]} [array] - The array matrix to transpose.\n *\n * @return {T[][]} A new array matrix which is a transposed version of the given array.\n */\nvar TransposeMatrix = function (array)\n{\n var sourceRowCount = array.length;\n var sourceColCount = array[0].length;\n\n var result = new Array(sourceColCount);\n\n for (var i = 0; i < sourceColCount; i++)\n {\n result[i] = new Array(sourceRowCount);\n\n for (var j = sourceRowCount - 1; j > -1; j--)\n {\n result[i][j] = array[j][i];\n }\n }\n\n return result;\n};\n\nmodule.exports = TransposeMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Utils.Array.Matrix\n */\n\nmodule.exports = {\n\n CheckMatrix: require('./CheckMatrix'),\n MatrixToString: require('./MatrixToString'),\n ReverseColumns: require('./ReverseColumns'),\n ReverseRows: require('./ReverseRows'),\n Rotate180: require('./Rotate180'),\n RotateLeft: require('./RotateLeft'),\n RotateMatrix: require('./RotateMatrix'),\n RotateRight: require('./RotateRight'),\n TransposeMatrix: require('./TransposeMatrix')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar IsPlainObject = require('./IsPlainObject');\n\n// @param {boolean} deep - Perform a deep copy?\n// @param {object} target - The target object to copy to.\n// @return {object} The extended object.\n\n/**\n * This is a slightly modified version of http://api.jquery.com/jQuery.extend/\n *\n * @function Phaser.Utils.Objects.Extend\n * @since 3.0.0\n *\n * @param {...*} [args] - The objects that will be mixed.\n *\n * @return {object} The extended object.\n */\nvar Extend = function ()\n{\n var options, name, src, copy, copyIsArray, clone,\n target = arguments[0] || {},\n i = 1,\n length = arguments.length,\n deep = false;\n\n // Handle a deep copy situation\n if (typeof target === 'boolean')\n {\n deep = target;\n target = arguments[1] || {};\n\n // skip the boolean and the target\n i = 2;\n }\n\n // extend Phaser if only one argument is passed\n if (length === i)\n {\n target = this;\n --i;\n }\n\n for (; i < length; i++)\n {\n // Only deal with non-null/undefined values\n if ((options = arguments[i]) != null)\n {\n // Extend the base object\n for (name in options)\n {\n src = target[name];\n copy = options[name];\n\n // Prevent never-ending loop\n if (target === copy)\n {\n continue;\n }\n\n // Recurse if we're merging plain objects or arrays\n if (deep && copy && (IsPlainObject(copy) || (copyIsArray = Array.isArray(copy))))\n {\n if (copyIsArray)\n {\n copyIsArray = false;\n clone = src && Array.isArray(src) ? src : [];\n }\n else\n {\n clone = src && IsPlainObject(src) ? src : {};\n }\n\n // Never move original objects, clone them\n target[name] = Extend(deep, clone, copy);\n\n // Don't bring in undefined values\n }\n else if (copy !== undefined)\n {\n target[name] = copy;\n }\n }\n }\n }\n\n // Return the modified object\n return target;\n};\n\nmodule.exports = Extend;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar MATH = require('../../math');\nvar GetValue = require('./GetValue');\n\n/**\n * Retrieves a value from an object. Allows for more advanced selection options, including:\n *\n * Allowed types:\n * \n * Implicit\n * {\n * x: 4\n * }\n *\n * From function\n * {\n * x: function ()\n * }\n *\n * Randomly pick one element from the array\n * {\n * x: [a, b, c, d, e, f]\n * }\n *\n * Random integer between min and max:\n * {\n * x: { randInt: [min, max] }\n * }\n *\n * Random float between min and max:\n * {\n * x: { randFloat: [min, max] }\n * }\n * \n *\n * @function Phaser.Utils.Objects.GetAdvancedValue\n * @since 3.0.0\n *\n * @param {object} source - The object to retrieve the value from.\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\n *\n * @return {*} The value of the requested key.\n */\nvar GetAdvancedValue = function (source, key, defaultValue)\n{\n var value = GetValue(source, key, null);\n\n if (value === null)\n {\n return defaultValue;\n }\n else if (Array.isArray(value))\n {\n return MATH.RND.pick(value);\n }\n else if (typeof value === 'object')\n {\n if (value.hasOwnProperty('randInt'))\n {\n return MATH.RND.integerInRange(value.randInt[0], value.randInt[1]);\n }\n else if (value.hasOwnProperty('randFloat'))\n {\n return MATH.RND.realInRange(value.randFloat[0], value.randFloat[1]);\n }\n }\n else if (typeof value === 'function')\n {\n return value(key);\n }\n\n return value;\n};\n\nmodule.exports = GetAdvancedValue;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Finds the key within the top level of the {@link source} object, or returns {@link defaultValue}\n *\n * @function Phaser.Utils.Objects.GetFastValue\n * @since 3.0.0\n *\n * @param {object} source - The object to search\n * @param {string} key - The key for the property on source. Must exist at the top level of the source object (no periods)\n * @param {*} [defaultValue] - The default value to use if the key does not exist.\n *\n * @return {*} The value if found; otherwise, defaultValue (null if none provided)\n */\nvar GetFastValue = function (source, key, defaultValue)\n{\n var t = typeof(source);\n\n if (!source || t === 'number' || t === 'string')\n {\n return defaultValue;\n }\n else if (source.hasOwnProperty(key) && source[key] !== undefined)\n {\n return source[key];\n }\n else\n {\n return defaultValue;\n }\n};\n\nmodule.exports = GetFastValue;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Source object\n// The key as a string, or an array of keys, i.e. 'banner', or 'banner.hideBanner'\n// The default value to use if the key doesn't exist\n\n/**\n * Retrieves a value from an object.\n *\n * @function Phaser.Utils.Objects.GetValue\n * @since 3.0.0\n *\n * @param {object} source - The object to retrieve the value from.\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\n *\n * @return {*} The value of the requested key.\n */\nvar GetValue = function (source, key, defaultValue)\n{\n if (!source || typeof source === 'number')\n {\n return defaultValue;\n }\n else if (source.hasOwnProperty(key))\n {\n return source[key];\n }\n else if (key.indexOf('.') !== -1)\n {\n var keys = key.split('.');\n var parent = source;\n var value = defaultValue;\n\n // Use for loop here so we can break early\n for (var i = 0; i < keys.length; i++)\n {\n if (parent.hasOwnProperty(keys[i]))\n {\n // Yes it has a key property, let's carry on down\n value = parent[keys[i]];\n\n parent = parent[keys[i]];\n }\n else\n {\n // Can't go any further, so reset to default\n value = defaultValue;\n break;\n }\n }\n\n return value;\n }\n else\n {\n return defaultValue;\n }\n};\n\nmodule.exports = GetValue;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * This is a slightly modified version of jQuery.isPlainObject.\n * A plain object is an object whose internal class property is [object Object].\n *\n * @function Phaser.Utils.Objects.IsPlainObject\n * @since 3.0.0\n *\n * @param {object} obj - The object to inspect.\n *\n * @return {boolean} `true` if the object is plain, otherwise `false`.\n */\nvar IsPlainObject = function (obj)\n{\n // Not plain objects:\n // - Any object or value whose internal [[Class]] property is not \"[object Object]\"\n // - DOM nodes\n // - window\n if (typeof(obj) !== 'object' || obj.nodeType || obj === obj.window)\n {\n return false;\n }\n\n // Support: Firefox <20\n // The try/catch suppresses exceptions thrown when attempting to access\n // the \"constructor\" property of certain host objects, ie. |window.location|\n // https://bugzilla.mozilla.org/show_bug.cgi?id=814622\n try\n {\n if (obj.constructor && !({}).hasOwnProperty.call(obj.constructor.prototype, 'isPrototypeOf'))\n {\n return false;\n }\n }\n catch (e)\n {\n return false;\n }\n\n // If the function hasn't returned already, we're confident that\n // |obj| is a plain object, created by {} or constructed with new Object\n return true;\n};\n\nmodule.exports = IsPlainObject;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Takes the given string and pads it out, to the length required, using the character\n * specified. For example if you need a string to be 6 characters long, you can call:\n *\n * `pad('bob', 6, '-', 2)`\n *\n * This would return: `bob---` as it has padded it out to 6 characters, using the `-` on the right.\n *\n * You can also use it to pad numbers (they are always returned as strings):\n * \n * `pad(512, 6, '0', 1)`\n *\n * Would return: `000512` with the string padded to the left.\n *\n * If you don't specify a direction it'll pad to both sides:\n * \n * `pad('c64', 7, '*')`\n *\n * Would return: `**c64**`\n *\n * @function Phaser.Utils.String.Pad\n * @since 3.0.0\n *\n * @param {string|number|object} str - The target string. `toString()` will be called on the string, which means you can also pass in common data types like numbers.\n * @param {integer} [len=0] - The number of characters to be added.\n * @param {string} [pad=\" \"] - The string to pad it out with (defaults to a space).\n * @param {integer} [dir=3] - The direction dir = 1 (left), 2 (right), 3 (both).\n * \n * @return {string} The padded string.\n */\nvar Pad = function (str, len, pad, dir)\n{\n if (len === undefined) { len = 0; }\n if (pad === undefined) { pad = ' '; }\n if (dir === undefined) { dir = 3; }\n\n str = str.toString();\n\n var padlen = 0;\n\n if (len + 1 >= str.length)\n {\n switch (dir)\n {\n case 1:\n str = new Array(len + 1 - str.length).join(pad) + str;\n break;\n\n case 3:\n var right = Math.ceil((padlen = len - str.length) / 2);\n var left = padlen - right;\n str = new Array(left + 1).join(pad) + str + new Array(right + 1).join(pad);\n break;\n\n default:\n str = str + new Array(len + 1 - str.length).join(pad);\n break;\n }\n }\n\n return str;\n};\n\nmodule.exports = Pad;\n","/**\n * @author Richard Davey \n * @copyright 2018 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar Class = require('../../../src/utils/Class');\nvar GetFastValue = require('../../../src/utils/object/GetFastValue');\nvar ImageFile = require('../../../src/loader/filetypes/ImageFile.js');\nvar IsPlainObject = require('../../../src/utils/object/IsPlainObject');\nvar JSONFile = require('../../../src/loader/filetypes/JSONFile.js');\nvar MultiFile = require('../../../src/loader/MultiFile.js');\nvar TextFile = require('../../../src/loader/filetypes/TextFile.js');\n\n/**\n * @typedef {object} Phaser.Loader.FileTypes.SpineFileConfig\n *\n * @property {string} key - The key of the file. Must be unique within both the Loader and the Texture Manager.\n * @property {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\n * @property {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\n * @property {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\n * @property {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\n * @property {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\n */\n\n/**\n * @classdesc\n * A Spine File suitable for loading by the Loader.\n *\n * These are created when you use the Phaser.Loader.LoaderPlugin#spine method and are not typically created directly.\n *\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#spine.\n *\n * @class SpineFile\n * @extends Phaser.Loader.MultiFile\n * @memberof Phaser.Loader.FileTypes\n * @constructor\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\n * @param {(string|Phaser.Loader.FileTypes.SpineFileConfig)} key - The key to use for this file, or a file configuration object.\n * @param {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\n * @param {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\n * @param {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\n * @param {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\n */\nvar SpineFile = new Class({\n\n Extends: MultiFile,\n\n initialize:\n\n function SpineFile (loader, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings)\n {\n var i;\n var json;\n var atlas;\n var files = [];\n var cache = loader.cacheManager.custom.spine;\n\n // atlas can be an array of atlas files, not just a single one\n\n if (IsPlainObject(key))\n {\n var config = key;\n\n key = GetFastValue(config, 'key');\n\n json = new JSONFile(loader, {\n key: key,\n url: GetFastValue(config, 'jsonURL'),\n extension: GetFastValue(config, 'jsonExtension', 'json'),\n xhrSettings: GetFastValue(config, 'jsonXhrSettings')\n });\n\n atlasURL = GetFastValue(config, 'atlasURL');\n preMultipliedAlpha = GetFastValue(config, 'preMultipliedAlpha');\n\n if (!Array.isArray(atlasURL))\n {\n atlasURL = [ atlasURL ];\n }\n\n for (i = 0; i < atlasURL.length; i++)\n {\n atlas = new TextFile(loader, {\n key: key + '_' + i,\n url: atlasURL[i],\n extension: GetFastValue(config, 'atlasExtension', 'atlas'),\n xhrSettings: GetFastValue(config, 'atlasXhrSettings')\n });\n\n atlas.cache = cache;\n\n files.push(atlas);\n }\n }\n else\n {\n json = new JSONFile(loader, key, jsonURL, jsonXhrSettings);\n\n if (!Array.isArray(atlasURL))\n {\n atlasURL = [ atlasURL ];\n }\n\n for (i = 0; i < atlasURL.length; i++)\n {\n atlas = new TextFile(loader, key + '_' + i, atlasURL[i], atlasXhrSettings);\n atlas.cache = cache;\n\n files.push(atlas);\n }\n }\n\n files.unshift(json);\n\n MultiFile.call(this, loader, 'spine', key, files);\n\n this.config.preMultipliedAlpha = preMultipliedAlpha;\n },\n\n /**\n * Called by each File when it finishes loading.\n *\n * @method Phaser.Loader.FileTypes.SpineFile#onFileComplete\n * @since 3.19.0\n *\n * @param {Phaser.Loader.File} file - The File that has completed processing.\n */\n onFileComplete: function (file)\n {\n var index = this.files.indexOf(file);\n\n if (index !== -1)\n {\n this.pending--;\n\n if (file.type === 'text')\n {\n // Inspect the data for the files to now load\n var content = file.data.split('\\n');\n\n // Extract the textures\n var textures = [];\n\n for (var t = 0; t < content.length; t++)\n {\n var line = content[t];\n\n if (line.trim() === '' && t < content.length - 1)\n {\n line = content[t + 1];\n\n textures.push(line);\n }\n }\n\n var config = this.config;\n var loader = this.loader;\n\n var currentBaseURL = loader.baseURL;\n var currentPath = loader.path;\n var currentPrefix = loader.prefix;\n\n var baseURL = GetFastValue(config, 'baseURL', this.baseURL);\n var path = GetFastValue(config, 'path', file.src.match(/^.*\\//))[0];\n var prefix = GetFastValue(config, 'prefix', this.prefix);\n var textureXhrSettings = GetFastValue(config, 'textureXhrSettings');\n\n loader.setBaseURL(baseURL);\n loader.setPath(path);\n loader.setPrefix(prefix);\n\n for (var i = 0; i < textures.length; i++)\n {\n var textureURL = textures[i];\n\n var key = this.prefix + textureURL;\n\n var image = new ImageFile(loader, key, textureURL, textureXhrSettings);\n\n this.addToMultiFile(image);\n\n loader.addFile(image);\n }\n\n // Reset the loader settings\n loader.setBaseURL(currentBaseURL);\n loader.setPath(currentPath);\n loader.setPrefix(currentPrefix);\n }\n }\n },\n\n /**\n * Adds this file to its target cache upon successful loading and processing.\n *\n * @method Phaser.Loader.FileTypes.SpineFile#addToCache\n * @since 3.19.0\n */\n addToCache: function ()\n {\n if (this.isReadyToProcess())\n {\n var fileJSON = this.files[0];\n\n fileJSON.addToCache();\n\n var atlasCache;\n var atlasKey = '';\n var combinedAtlasData = '';\n var preMultipliedAlpha = (this.config.preMultipliedAlpha) ? true : false;\n var textureManager = this.loader.textureManager;\n\n for (var i = 1; i < this.files.length; i++)\n {\n var file = this.files[i];\n\n if (file.type === 'text')\n {\n atlasKey = file.key.replace(/_[\\d]$/, '');\n\n atlasCache = file.cache;\n\n combinedAtlasData = combinedAtlasData.concat(file.data);\n }\n else\n {\n var src = file.key.trim();\n var pos = src.indexOf('_');\n var key = src.substr(pos + 1);\n\n if (!textureManager.exists(key))\n {\n textureManager.addImage(key, file.data);\n }\n }\n\n file.pendingDestroy();\n }\n\n atlasCache.add(atlasKey, { preMultipliedAlpha: preMultipliedAlpha, data: combinedAtlasData, prefix: this.prefix });\n\n this.complete = true;\n }\n }\n\n});\n\nmodule.exports = SpineFile;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar BuildGameObject = require('../../../src/gameobjects/BuildGameObject');\nvar Class = require('../../../src/utils/Class');\nvar GetValue = require('../../../src/utils/object/GetValue');\nvar ResizeEvent = require('../../../src/scale/events/RESIZE_EVENT');\nvar ScenePlugin = require('../../../src/plugins/ScenePlugin');\nvar Spine = require('Spine');\nvar SpineFile = require('./SpineFile');\nvar SpineGameObject = require('./gameobject/SpineGameObject');\nvar SpineContainer = require('./container/SpineContainer');\nvar NOOP = require('../../../src/utils/NOOP');\n\n/**\n * @classdesc\n * The Spine Plugin is a Scene based plugin that handles the creation and rendering of Spine Game Objects.\n *\n * Find more details about Spine itself at http://esotericsoftware.com/.\n *\n * All rendering and object creation is handled via the official Spine Runtimes. This version of the plugin\n * uses the Spine 3.8.95 runtimes. Please note that due to the way the Spine runtimes use semver, you will\n * get breaking changes in point-releases. Therefore, files created in a different version of Spine may not\n * work as a result, without you first updating the runtimes and rebuilding the plugin.\n *\n * Esoteric themselves recommend that you freeze your Spine editor version against the runtime versions.\n * You can find more information about this here: http://esotericsoftware.com/spine-settings#Version\n *\n * Please note that you require a Spine license in order to use Spine Runtimes in your games.\n *\n * You can install this plugin into your Phaser game by either importing it, if you're using ES6:\n *\n * ```javascript\n * import * as SpinePlugin from './SpinePlugin.js';\n * ```\n *\n * and then adding it to your Phaser Game configuration:\n *\n * ```javascript\n * plugins: {\n * scene: [\n * { key: 'SpinePlugin', plugin: window.SpinePlugin, mapping: 'spine' }\n * ]\n * }\n * ```\n *\n * If you're using ES5 then you can load the Spine Plugin in a Scene files payload, _within_ your\n * Game Configuration object, like this:\n *\n * ```javascript\n * scene: {\n * preload: preload,\n * create: create,\n * pack: {\n * files: [\n * { type: 'scenePlugin', key: 'SpinePlugin', url: 'plugins/SpinePlugin.js', sceneKey: 'spine' }\n * ]\n * }\n * }\n * ```\n *\n * Loading it like this allows you to then use commands such as `this.load.spine` from within the\n * same Scene. Alternatively, you can use the method `this.load.plugin` to load the plugin via the normal\n * Phaser Loader. However, doing so will not add it to the current Scene. It will be available from any\n * subsequent Scenes.\n *\n * Assuming a default environment you access it from within a Scene by using the `this.spine` reference.\n *\n * When this plugin is installed into a Scene it will add a Loader File Type, allowing you to load\n * Spine files directly, i.e.:\n *\n * ```javascript\n * this.load.spine('stretchyman', 'stretchyman-pro.json', [ 'stretchyman-pma.atlas' ], true);\n * ```\n *\n * It also installs two Game Object Factory methods, allowing you to create Spine Game Objects\n * and Spine Containers:\n *\n * ```javascript\n * const man = this.add.spine(512, 650, 'stretchyman');\n *\n * const container = this.add.spineContainer();\n *\n * container.add(man);\n * ```\n *\n * The first argument is the key which you used when importing the Spine data. There are lots of\n * things you can specify, such as the animation name, skeleton, slot attachments and more. Please\n * see the respective documentation and examples for further details.\n *\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary.\n * The associated atlas files are scanned for any texture files present in them, which are then loaded.\n * If you have exported your Spine data with preMultipliedAlpha set, then you should enable this in the\n * load arguments, or you may see black outlines around skeleton textures.\n *\n * The Spine plugin is local to the Scene in which it is installed. This means a change to something,\n * such as the Skeleton Debug Renderer, in this Scene, will not impact the renderer in any other Scene.\n * The only exception to this is with the caches this plugin creates. Spine atlas and texture data are\n * stored in their own caches, which are global, meaning they're accessible from any Scene in your\n * game, regardless if the Scene loaded the Spine data or not.\n *\n * When destroying a Phaser Game instance, if you need to re-create it again on the same page without\n * reloading, you must remember to remove the Spine Plugin as part of your tear-down process:\n *\n * ```javascript\n * this.plugins.removeScenePlugin('SpinePlugin');\n * ```\n *\n * For details about the Spine Runtime API see http://esotericsoftware.com/spine-api-reference\n *\n * @class SpinePlugin\n * @extends Phaser.Plugins.ScenePlugin\n * @constructor\n * @since 3.19.0\n *\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Phaser Plugin Manager.\n */\nvar SpinePlugin = new Class({\n\n Extends: ScenePlugin,\n\n initialize:\n\n function SpinePlugin (scene, pluginManager)\n {\n ScenePlugin.call(this, scene, pluginManager);\n\n var game = pluginManager.game;\n\n /**\n * A read-only flag that indicates if the game is running under WebGL or Canvas.\n *\n * @name SpinePlugin#isWebGL\n * @type {boolean}\n * @readonly\n * @since 3.19.0\n */\n this.isWebGL = (game.config.renderType === 2);\n\n /**\n * A custom cache that stores the Spine atlas data.\n *\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\n * no matter which Scene you are in.\n *\n * @name SpinePlugin#cache\n * @type {Phaser.Cache.BaseCache}\n * @since 3.19.0\n */\n this.cache = game.cache.addCustom('spine');\n\n /**\n * A custom cache that stores the Spine Textures.\n *\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\n * no matter which Scene you are in.\n *\n * @name SpinePlugin#spineTextures\n * @type {Phaser.Cache.BaseCache}\n * @since 3.19.0\n */\n this.spineTextures = game.cache.addCustom('spineTextures');\n\n /**\n * A reference to the global JSON Cache.\n *\n * @name SpinePlugin#json\n * @type {Phaser.Cache.BaseCache}\n * @since 3.19.0\n */\n this.json = game.cache.json;\n\n /**\n * A reference to the global Texture Manager.\n *\n * @name SpinePlugin#textures\n * @type {Phaser.Textures.TextureManager}\n * @since 3.19.0\n */\n this.textures = game.textures;\n\n /**\n * A flag that sets if the Skeleton Renderers will render debug information over the top\n * of the skeleton or not.\n *\n * @name SpinePlugin#drawDebug\n * @type {boolean}\n * @since 3.19.0\n */\n this.drawDebug = false;\n\n /**\n * The underlying WebGL context of the Phaser renderer.\n *\n * Only set if running in WebGL mode.\n *\n * @name SpinePlugin#gl\n * @type {WebGLRenderingContext}\n * @since 3.19.0\n */\n this.gl;\n\n /**\n * A reference to either the Canvas or WebGL Renderer that this Game is using.\n *\n * @name SpinePlugin#renderer\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\n * @since 3.19.0\n */\n this.renderer;\n\n /**\n * An instance of the Spine WebGL Scene Renderer.\n *\n * Only set if running in WebGL mode.\n *\n * @name SpinePlugin#sceneRenderer\n * @type {spine.webgl.SceneRenderer}\n * @since 3.19.0\n */\n this.sceneRenderer;\n\n /**\n * An instance of the Spine Skeleton Renderer.\n *\n * @name SpinePlugin#skeletonRenderer\n * @type {(spine.canvas.SkeletonRenderer|spine.webgl.SkeletonRenderer)}\n * @since 3.19.0\n */\n this.skeletonRenderer;\n\n /**\n * An instance of the Spine Skeleton Debug Renderer.\n *\n * Only set if running in WebGL mode.\n *\n * @name SpinePlugin#skeletonDebugRenderer\n * @type {spine.webgl.skeletonDebugRenderer}\n * @since 3.19.0\n */\n this.skeletonDebugRenderer;\n\n /**\n * A reference to the Spine runtime.\n * This is the runtime created by Esoteric Software\n *\n * @name SpinePlugin#plugin\n * @type {spine}\n * @since 3.19.0\n */\n this.plugin = Spine;\n\n /**\n * An internal vector3 used by the screen to world method.\n *\n * @name SpinePlugin#temp1\n * @private\n * @type {spine.webgl.Vector3}\n * @since 3.19.0\n */\n this.temp1;\n\n /**\n * An internal vector3 used by the screen to world method.\n *\n * @name SpinePlugin#temp2\n * @private\n * @type {spine.webgl.Vector3}\n * @since 3.19.0\n */\n this.temp2;\n\n if (this.isWebGL)\n {\n this.runtime = Spine.webgl;\n\n this.renderer = game.renderer;\n this.gl = game.renderer.gl;\n\n this.getAtlas = this.getAtlasWebGL;\n }\n else\n {\n this.runtime = Spine.canvas;\n\n this.renderer = game.renderer;\n\n this.getAtlas = this.getAtlasCanvas;\n }\n\n // Headless mode?\n if (!this.renderer)\n {\n this.renderer = {\n width: game.scale.width,\n height: game.scale.height,\n preRender: NOOP,\n postRender: NOOP,\n render: NOOP,\n destroy: NOOP\n };\n }\n\n var _this = this;\n\n var add = function (x, y, key, animationName, loop)\n {\n var spineGO = new SpineGameObject(this.scene, _this, x, y, key, animationName, loop);\n\n this.displayList.add(spineGO);\n this.updateList.add(spineGO);\n\n return spineGO;\n };\n\n var make = function (config, addToScene)\n {\n if (config === undefined) { config = {}; }\n\n var key = GetValue(config, 'key', null);\n var animationName = GetValue(config, 'animationName', null);\n var loop = GetValue(config, 'loop', false);\n\n var spineGO = new SpineGameObject(this.scene, _this, 0, 0, key, animationName, loop);\n\n if (addToScene !== undefined)\n {\n config.add = addToScene;\n }\n\n BuildGameObject(this.scene, spineGO, config);\n\n // Spine specific\n var skinName = GetValue(config, 'skinName', false);\n\n if (skinName)\n {\n spineGO.setSkinByName(skinName);\n }\n\n var slotName = GetValue(config, 'slotName', false);\n var attachmentName = GetValue(config, 'attachmentName', null);\n\n if (slotName)\n {\n spineGO.setAttachment(slotName, attachmentName);\n }\n\n return spineGO.refresh();\n };\n\n var addContainer = function (x, y, children)\n {\n var spineGO = new SpineContainer(this.scene, _this, x, y, children);\n\n this.displayList.add(spineGO);\n\n return spineGO;\n };\n\n var makeContainer = function (config, addToScene)\n {\n if (config === undefined) { config = {}; }\n\n var x = GetValue(config, 'x', 0);\n var y = GetValue(config, 'y', 0);\n var children = GetValue(config, 'children', null);\n\n var container = new SpineContainer(this.scene, _this, x, y, children);\n\n if (addToScene !== undefined)\n {\n config.add = addToScene;\n }\n\n BuildGameObject(this.scene, container, config);\n\n return container;\n };\n\n pluginManager.registerFileType('spine', this.spineFileCallback, scene);\n pluginManager.registerGameObject('spine', add, make);\n pluginManager.registerGameObject('spineContainer', addContainer, makeContainer);\n },\n\n /**\n * Internal boot handler.\n *\n * @method SpinePlugin#boot\n * @private\n * @since 3.19.0\n */\n boot: function ()\n {\n if (this.isWebGL)\n {\n this.bootWebGL();\n this.onResize();\n this.game.scale.on(ResizeEvent, this.onResize, this);\n }\n else\n {\n this.bootCanvas();\n }\n\n var eventEmitter = this.systems.events;\n\n eventEmitter.once('shutdown', this.shutdown, this);\n eventEmitter.once('destroy', this.destroy, this);\n\n this.game.events.once('destroy', this.gameDestroy, this);\n },\n\n /**\n * Internal boot handler for the Canvas Renderer.\n *\n * @method SpinePlugin#bootCanvas\n * @private\n * @since 3.19.0\n */\n bootCanvas: function ()\n {\n this.skeletonRenderer = new Spine.canvas.SkeletonRenderer(this.scene.sys.context);\n },\n\n /**\n * Internal boot handler for the WebGL Renderer.\n *\n * @method SpinePlugin#bootWebGL\n * @private\n * @since 3.19.0\n */\n bootWebGL: function ()\n {\n this.sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true);\n\n // Monkeypatch the Spine setBlendMode functions, or batching is destroyed!\n\n var setBlendMode = function (srcBlend, dstBlend)\n {\n if (srcBlend !== this.srcBlend || dstBlend !== this.dstBlend)\n {\n var gl = this.context.gl;\n\n this.srcBlend = srcBlend;\n this.dstBlend = dstBlend;\n\n if (this.isDrawing)\n {\n this.flush();\n gl.blendFunc(this.srcBlend, this.dstBlend);\n }\n }\n };\n\n this.sceneRenderer.batcher.setBlendMode = setBlendMode;\n this.sceneRenderer.shapes.setBlendMode = setBlendMode;\n\n this.skeletonRenderer = this.sceneRenderer.skeletonRenderer;\n this.skeletonDebugRenderer = this.sceneRenderer.skeletonDebugRenderer;\n\n this.temp1 = new Spine.webgl.Vector3(0, 0, 0);\n this.temp2 = new Spine.webgl.Vector3(0, 0, 0);\n },\n\n /**\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\n * then returns it. You do not normally need to invoke this method directly.\n *\n * @method SpinePlugin#getAtlasCanvas\n * @since 3.19.0\n *\n * @param {string} key - The key of the Spine Atlas to create.\n *\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\n */\n getAtlasCanvas: function (key)\n {\n var atlasEntry = this.cache.get(key);\n\n if (!atlasEntry)\n {\n console.warn('No atlas data for: ' + key);\n return;\n }\n\n var atlas;\n var spineTextures = this.spineTextures;\n\n if (spineTextures.has(key))\n {\n atlas = spineTextures.get(key);\n }\n else\n {\n var textures = this.textures;\n\n atlas = new Spine.TextureAtlas(atlasEntry.data, function (path)\n {\n return new Spine.canvas.CanvasTexture(textures.get(atlasEntry.prefix + path).getSourceImage());\n });\n }\n\n return atlas;\n },\n\n /**\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\n * then returns it. You do not normally need to invoke this method directly.\n *\n * @method SpinePlugin#getAtlasWebGL\n * @since 3.19.0\n *\n * @param {string} key - The key of the Spine Atlas to create.\n *\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\n */\n getAtlasWebGL: function (key)\n {\n var atlasEntry = this.cache.get(key);\n\n if (!atlasEntry)\n {\n console.warn('No atlas data for: ' + key);\n return;\n }\n\n var atlas;\n var spineTextures = this.spineTextures;\n\n if (spineTextures.has(key))\n {\n atlas = spineTextures.get(key);\n }\n else\n {\n var textures = this.textures;\n\n var gl = this.sceneRenderer.context.gl;\n\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\n\n atlas = new Spine.TextureAtlas(atlasEntry.data, function (path)\n {\n return new Spine.webgl.GLTexture(gl, textures.get(atlasEntry.prefix + path).getSourceImage(), false);\n });\n }\n\n return atlas;\n },\n\n /**\n * Adds a Spine Skeleton and Atlas file, or array of files, to the current load queue.\n *\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\n *\n * ```javascript\n * function preload ()\n * {\n * this.load.spine('spineBoy', 'boy.json', 'boy.atlas', true);\n * }\n * ```\n *\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\n * loaded.\n *\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\n *\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary. The associated\n * atlas files are scanned for any texture files present in them, which are then loaded. If you have exported\n * your Spine data with preMultipliedAlpha set, then you should enable this in the arguments, or you may see black\n * outlines around skeleton textures.\n *\n * The key must be a unique String. It is used to add the file to the global Spine cache upon a successful load.\n * The key should be unique both in terms of files being loaded and files already present in the Spine cache.\n * Loading a file using a key that is already taken will result in a warning.\n *\n * Instead of passing arguments you can pass a configuration object, such as:\n *\n * ```javascript\n * this.load.spine({\n * key: 'mainmenu',\n * jsonURL: 'boy.json',\n * atlasURL: 'boy.atlas',\n * preMultipliedAlpha: true\n * });\n * ```\n *\n * If you need to load multiple Spine atlas files, provide them as an array:\n *\n * ```javascript\n * function preload ()\n * {\n * this.load.spine('demos', 'demos.json', [ 'atlas1.atlas', 'atlas2.atlas' ], true);\n * }\n * ```\n *\n * See the documentation for `Phaser.Types.Loader.FileTypes.SpineFileConfig` for more details.\n *\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\n * this is what you would use to retrieve the data from the Spine plugin.\n *\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\n *\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\n * and no URL is given then the Loader will set the URL to be \"alien.json\". It will always add `.json` as the extension, although\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\n *\n * Note: The ability to load this type of file will only be available if the Spine Plugin has been built or loaded into Phaser.\n *\n * @method Phaser.Loader.LoaderPlugin#spine\n * @fires Phaser.Loader.LoaderPlugin#ADD\n * @since 3.19.0\n *\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\n * @param {string} jsonURL - The absolute or relative URL to load the Spine json file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\n * @param {string|string[]} atlasURL - The absolute or relative URL to load the Spine atlas file from. If undefined or `null` it will be set to `.atlas`, i.e. if `key` was \"alien\" then the URL will be \"alien.atlas\".\n * @param {boolean} [preMultipliedAlpha=false] - Do the texture files include pre-multiplied alpha or not?\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the Spine json file. Used in replacement of the Loaders default XHR Settings.\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the Spine atlas file. Used in replacement of the Loaders default XHR Settings.\n *\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\n */\n spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings)\n {\n var multifile;\n\n if (Array.isArray(key))\n {\n for (var i = 0; i < key.length; i++)\n {\n multifile = new SpineFile(this, key[i]);\n\n this.addFile(multifile.files);\n }\n }\n else\n {\n multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings);\n\n this.addFile(multifile.files);\n }\n\n return this;\n },\n\n /**\n * Converts the given x and y screen coordinates into the world space of the given Skeleton.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#worldToLocal\n * @since 3.19.0\n *\n * @param {number} x - The screen space x coordinate to convert.\n * @param {number} y - The screen space y coordinate to convert.\n * @param {spine.Skeleton} skeleton - The Spine Skeleton to convert into.\n * @param {spine.Bone} [bone] - Optional bone of the Skeleton to convert into.\n *\n * @return {spine.Vector2} A Vector2 containing the translated point.\n */\n worldToLocal: function (x, y, skeleton, bone)\n {\n var temp1 = this.temp1;\n var temp2 = this.temp2;\n var camera = this.sceneRenderer.camera;\n\n temp1.set(x + skeleton.x, y - skeleton.y, 0);\n\n var width = camera.viewportWidth;\n var height = camera.viewportHeight;\n\n camera.screenToWorld(temp1, width, height);\n\n if (bone && bone.parent !== null)\n {\n bone.parent.worldToLocal(temp2.set(temp1.x - skeleton.x, temp1.y - skeleton.y, 0));\n\n return new Spine.Vector2(temp2.x, temp2.y);\n }\n else if (bone)\n {\n return new Spine.Vector2(temp1.x - skeleton.x, temp1.y - skeleton.y);\n }\n else\n {\n return new Spine.Vector2(temp1.x, temp1.y);\n }\n },\n\n /**\n * Returns a Spine Vector2 based on the given x and y values.\n *\n * @method SpinePlugin#getVector2\n * @since 3.19.0\n *\n * @param {number} x - The Vector x value.\n * @param {number} y - The Vector y value.\n *\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\n */\n getVector2: function (x, y)\n {\n return new Spine.Vector2(x, y);\n },\n\n /**\n * Returns a Spine Vector2 based on the given x, y and z values.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#getVector3\n * @since 3.19.0\n *\n * @param {number} x - The Vector x value.\n * @param {number} y - The Vector y value.\n * @param {number} z - The Vector z value.\n *\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\n */\n getVector3: function (x, y, z)\n {\n return new Spine.webgl.Vector3(x, y, z);\n },\n\n /**\n * Sets `drawBones` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugBones\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugBones: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawBones = value;\n\n return this;\n },\n\n /**\n * Sets `drawRegionAttachments` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugRegionAttachments\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugRegionAttachments: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawRegionAttachments = value;\n\n return this;\n },\n\n /**\n * Sets `drawBoundingBoxes` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugBoundingBoxes\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugBoundingBoxes: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawBoundingBoxes = value;\n\n return this;\n },\n\n /**\n * Sets `drawMeshHull` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugMeshHull\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugMeshHull: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawMeshHull = value;\n\n return this;\n },\n\n /**\n * Sets `drawMeshTriangles` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugMeshTriangles\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugMeshTriangles: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawMeshTriangles = value;\n\n return this;\n },\n\n /**\n * Sets `drawPaths` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugPaths\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugPaths: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawPaths = value;\n\n return this;\n },\n\n /**\n * Sets `drawSkeletonXY` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugSkeletonXY\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugSkeletonXY: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawSkeletonXY = value;\n\n return this;\n },\n\n /**\n * Sets `drawClipping` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugClipping\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugClipping: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawClipping = value;\n\n return this;\n },\n\n /**\n * Sets the given vertex effect on the Spine Skeleton Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setEffect\n * @since 3.19.0\n *\n * @param {spine.VertexEffect} [effect] - The vertex effect to set on the Skeleton Renderer.\n *\n * @return {this} This Spine Plugin.\n */\n setEffect: function (effect)\n {\n this.sceneRenderer.skeletonRenderer.vertexEffect = effect;\n\n return this;\n },\n\n /**\n * Creates a Spine Skeleton based on the given key and optional Skeleton JSON data.\n *\n * The Skeleton data should have already been loaded before calling this method.\n *\n * @method SpinePlugin#createSkeleton\n * @since 3.19.0\n *\n * @param {string} key - The key of the Spine skeleton data, as loaded by the plugin. If the Spine JSON contains multiple skeletons, reference them with a period, i.e. `set.spineBoy`.\n * @param {object} [skeletonJSON] - Optional Skeleton JSON data to use, instead of getting it from the cache.\n *\n * @return {(any|null)} This Spine Skeleton data object, or `null` if the key was invalid.\n */\n createSkeleton: function (key, skeletonJSON)\n {\n var atlasKey = key;\n var jsonKey = key;\n var split = (key.indexOf('.') !== -1);\n\n if (split)\n {\n var parts = key.split('.');\n\n atlasKey = parts.shift();\n jsonKey = parts.join('.');\n }\n\n var atlasData = this.cache.get(atlasKey);\n var atlas = this.getAtlas(atlasKey);\n\n if (!atlas)\n {\n return null;\n }\n\n if (!this.spineTextures.has(atlasKey))\n {\n this.spineTextures.add(atlasKey, atlas);\n }\n\n var preMultipliedAlpha = atlasData.preMultipliedAlpha;\n\n var atlasLoader = new Spine.AtlasAttachmentLoader(atlas);\n\n var skeletonJson = new Spine.SkeletonJson(atlasLoader);\n\n var data;\n\n if (skeletonJSON)\n {\n data = skeletonJSON;\n }\n else\n {\n var json = this.json.get(atlasKey);\n\n data = (split) ? GetValue(json, jsonKey) : json;\n }\n\n if (data)\n {\n var skeletonData = skeletonJson.readSkeletonData(data);\n\n var skeleton = new Spine.Skeleton(skeletonData);\n\n return { skeletonData: skeletonData, skeleton: skeleton, preMultipliedAlpha: preMultipliedAlpha };\n }\n else\n {\n return null;\n }\n },\n\n /**\n * Creates a new Animation State and Animation State Data for the given skeleton.\n *\n * The returned object contains two properties: `state` and `stateData` respectively.\n *\n * @method SpinePlugin#createAnimationState\n * @since 3.19.0\n *\n * @param {spine.Skeleton} skeleton - The Skeleton to create the Animation State for.\n *\n * @return {any} An object containing the Animation State and Animation State Data instances.\n */\n createAnimationState: function (skeleton)\n {\n var stateData = new Spine.AnimationStateData(skeleton.data);\n\n var state = new Spine.AnimationState(stateData);\n\n return { stateData: stateData, state: state };\n },\n\n /**\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\n *\n * The returned object contains two properties: `offset` and `size`:\n *\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\n * `size` - The width and height of the AABB.\n *\n * @method SpinePlugin#getBounds\n * @since 3.19.0\n *\n * @param {spine.Skeleton} skeleton - The Skeleton to get the bounds from.\n *\n * @return {any} The bounds object.\n */\n getBounds: function (skeleton)\n {\n var offset = new Spine.Vector2();\n var size = new Spine.Vector2();\n\n skeleton.getBounds(offset, size, []);\n\n return { offset: offset, size: size };\n },\n\n /**\n * Internal handler for when the renderer resizes.\n *\n * Only called if running in WebGL.\n *\n * @method SpinePlugin#onResize\n * @since 3.19.0\n */\n onResize: function ()\n {\n var renderer = this.renderer;\n var sceneRenderer = this.sceneRenderer;\n\n var viewportWidth = renderer.width;\n var viewportHeight = renderer.height;\n\n sceneRenderer.camera.position.x = viewportWidth / 2;\n sceneRenderer.camera.position.y = viewportHeight / 2;\n\n sceneRenderer.camera.viewportWidth = viewportWidth;\n sceneRenderer.camera.viewportHeight = viewportHeight;\n },\n\n /**\n * The Scene that owns this plugin is shutting down.\n *\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\n *\n * @method SpinePlugin#shutdown\n * @private\n * @since 3.19.0\n */\n shutdown: function ()\n {\n var eventEmitter = this.systems.events;\n\n eventEmitter.off('shutdown', this.shutdown, this);\n\n if (this.isWebGL)\n {\n this.game.scale.off(ResizeEvent, this.onResize, this);\n }\n },\n\n /**\n * The Scene that owns this plugin is being destroyed.\n *\n * We need to shutdown and then kill off all external references.\n *\n * @method SpinePlugin#destroy\n * @private\n * @since 3.19.0\n */\n destroy: function ()\n {\n this.shutdown();\n\n this.game = null;\n this.scene = null;\n this.systems = null;\n\n this.cache = null;\n this.spineTextures = null;\n this.json = null;\n this.textures = null;\n this.skeletonRenderer = null;\n this.gl = null;\n },\n\n /**\n * The Game that owns this plugin is being destroyed.\n *\n * Dispose of the Scene Renderer and remove the Game Objects.\n *\n * @method SpinePlugin#gameDestroy\n * @private\n * @since 3.50.0\n */\n gameDestroy: function ()\n {\n this.destroy();\n\n if (this.sceneRenderer)\n {\n this.sceneRenderer.dispose();\n }\n\n this.sceneRenderer = null;\n this.pluginManager = null;\n\n this.pluginManager.removeGameObject('spine', true, true);\n this.pluginManager.removeGameObject('spineContainer', true, true);\n }\n\n});\n\nSpinePlugin.SpineGameObject = SpineGameObject;\nSpinePlugin.SpineContainer = SpineContainer;\n\n/**\n * Creates a new Spine Game Object and adds it to the Scene.\n *\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\n * do not have a Phaser origin.\n *\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\n * that.\n *\n * ```javascript\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\n * ```\n *\n * The key is optional. If not passed here, you need to call `SpineGameObject.setSkeleton()` to use it.\n *\n * The animation name is also optional and can be set later via `SpineGameObject.setAnimation`.\n *\n * Should you wish for more control over the object creation, such as setting a slot attachment or skin\n * name, then use `SpinePlugin.make` instead.\n *\n * @method SpinePlugin#add\n * @since 3.19.0\n *\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\n *\n * @return {SpineGameObject} The Game Object that was created.\n */\n\n/**\n * Creates a new Spine Game Object from the given configuration file and optionally adds it to the Scene.\n *\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\n * do not have a Phaser origin.\n *\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\n * that.\n *\n * ```javascript\n * let jelly = this.make.spine({\n * x: 500, y: 500, key: 'jelly',\n * scale: 1.5,\n * skinName: 'square_Green',\n * animationName: 'jelly-idle', loop: true,\n * slotName: 'hat', attachmentName: 'images/La_14'\n * });\n * ```\n *\n * @method SpinePlugin#make\n * @since 3.19.0\n *\n * @param {any} config - The configuration object this Game Object will use to create itself.\n * @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.\n *\n * @return {SpineGameObject} The Game Object that was created.\n */\n\nmodule.exports = SpinePlugin;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar Class = require('../../../../src/utils/Class');\nvar Container = require('../../../../src/gameobjects/container/Container');\nvar SpineContainerRender = require('./SpineContainerRender');\n\n/**\n * @classdesc\n * A Spine Container is a special kind of Container created specifically for Spine Game Objects.\n *\n * You have all of the same features of a standard Container, but the rendering functions are optimized specifically\n * for Spine Game Objects. You must only add ever Spine Game Objects to this type of Container. Although Phaser will\n * not prevent you from adding other types, they will not render and are likely to throw runtime errors.\n *\n * To create one in a Scene, use the factory methods:\n *\n * ```javascript\n * this.add.spinecontainer();\n * ```\n *\n * or\n *\n * ```javascript\n * this.make.spinecontainer();\n * ```\n *\n * See the Container documentation for further details about what Containers can do.\n *\n * @class SpineContainer\n * @extends Phaser.GameObjects.Container\n * @constructor\n * @since 3.50.0\n *\n * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to.\n * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin.\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {SpineGameObject[]} [children] - An optional array of Spine Game Objects to add to this Container.\n */\nvar SpineContainer = new Class({\n\n Extends: Container,\n\n Mixins: [\n SpineContainerRender\n ],\n\n initialize:\n\n function SpineContainer (scene, plugin, x, y, children)\n {\n Container.call(this, scene, x, y, children);\n\n // Same as SpineGameObject, to prevent the renderer from mis-typing it when batching\n this.type = 'Spine';\n\n /**\n * A reference to the Spine Plugin.\n *\n * @name SpineContainer#plugin\n * @type {SpinePlugin}\n * @since 3.50.0\n */\n this.plugin = plugin;\n },\n\n /**\n * Internal destroy handler, called as part of the destroy process.\n *\n * @method SpineContainer#preDestroy\n * @protected\n * @since 3.50.0\n */\n preDestroy: function ()\n {\n this.removeAll(!!this.exclusive);\n\n this.localTransform.destroy();\n this.tempTransformMatrix.destroy();\n\n this.list = [];\n this._displayList = null;\n this.plugin = null;\n }\n\n});\n\nmodule.exports = SpineContainer;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Renders this Game Object with the Canvas Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method Phaser.GameObjects.Container#renderCanvas\n * @since 3.4.0\n * @private\n *\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar SpineContainerCanvasRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix)\n{\n var children = container.list;\n\n if (children.length === 0)\n {\n return;\n }\n\n var transformMatrix = container.localTransform;\n\n if (parentMatrix)\n {\n transformMatrix.loadIdentity();\n transformMatrix.multiply(parentMatrix);\n transformMatrix.translate(container.x, container.y);\n transformMatrix.rotate(container.rotation);\n transformMatrix.scale(container.scaleX, container.scaleY);\n }\n else\n {\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\n }\n\n var containerHasBlendMode = (container.blendMode !== -1);\n\n if (!containerHasBlendMode)\n {\n // If Container is SKIP_TEST then set blend mode to be Normal\n renderer.setBlendMode(0);\n }\n\n var alpha = container._alpha;\n var scrollFactorX = container.scrollFactorX;\n var scrollFactorY = container.scrollFactorY;\n\n if (container.mask)\n {\n container.mask.preRenderCanvas(renderer, null, camera);\n }\n\n for (var i = 0; i < children.length; i++)\n {\n var child = children[i];\n\n if (!child.willRender(camera))\n {\n continue;\n }\n\n var childAlpha = child.alpha;\n var childScrollFactorX = child.scrollFactorX;\n var childScrollFactorY = child.scrollFactorY;\n\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\n {\n // If Container doesn't have its own blend mode, then a child can have one\n renderer.setBlendMode(child.blendMode);\n }\n\n // Set parent values\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\n child.setAlpha(childAlpha * alpha);\n\n // Render\n child.renderCanvas(renderer, child, interpolationPercentage, camera, transformMatrix);\n\n // Restore original values\n child.setAlpha(childAlpha);\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\n }\n\n if (container.mask)\n {\n container.mask.postRenderCanvas(renderer);\n }\n};\n\nmodule.exports = SpineContainerCanvasRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar renderWebGL = require('../../../../src/utils/NOOP');\nvar renderCanvas = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineContainerWebGLRenderer');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineContainerCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar Clamp = require('../../../../src/math/Clamp');\nvar RadToDeg = require('../../../../src/math/RadToDeg');\nvar Wrap = require('../../../../src/math/Wrap');\n\n/**\n * Renders this Game Object with the WebGL Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method SpineContainerWebGLRenderer#renderWebGL\n * @since 3.50.0\n * @private\n *\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar SpineContainerWebGLRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix)\n{\n var plugin = container.plugin;\n var sceneRenderer = plugin.sceneRenderer;\n var children = container.list;\n\n if (children.length === 0)\n {\n if (sceneRenderer.batcher.isDrawing && renderer.finalType)\n {\n sceneRenderer.end();\n }\n\n return;\n }\n\n var transformMatrix = container.localTransform;\n\n if (parentMatrix)\n {\n transformMatrix.loadIdentity();\n transformMatrix.multiply(parentMatrix);\n transformMatrix.translate(container.x, container.y);\n transformMatrix.rotate(container.rotation);\n transformMatrix.scale(container.scaleX, container.scaleY);\n }\n else\n {\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\n }\n\n var alpha = container.alpha;\n var scrollFactorX = container.scrollFactorX;\n var scrollFactorY = container.scrollFactorY;\n\n var GameObjectRenderMask = 15;\n\n if (renderer.newType)\n {\n sceneRenderer.begin();\n }\n\n for (var i = 0; i < children.length; i++)\n {\n var src = children[i];\n\n var skeleton = src.skeleton;\n var childAlpha = skeleton.color.a;\n\n var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || childAlpha === 0);\n\n if (!skeleton || !willRender)\n {\n continue;\n }\n\n var camMatrix = renderer._tempMatrix1;\n var spriteMatrix = renderer._tempMatrix2;\n var calcMatrix = renderer._tempMatrix3;\n\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));\n\n camMatrix.copyFrom(camera.matrix);\n\n // Multiply the camera by the parent matrix\n camMatrix.multiplyWithOffset(transformMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY);\n\n // Undo the camera scroll\n spriteMatrix.e = src.x;\n spriteMatrix.f = src.y;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n\n var viewportHeight = renderer.height;\n\n skeleton.x = calcMatrix.tx;\n skeleton.y = viewportHeight - calcMatrix.ty;\n\n skeleton.scaleX = calcMatrix.scaleX;\n skeleton.scaleY = calcMatrix.scaleY;\n\n if (src.scaleX < 0)\n {\n skeleton.scaleX *= -1;\n\n src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);\n }\n else\n {\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\n }\n\n if (src.scaleY < 0)\n {\n skeleton.scaleY *= -1;\n\n if (src.scaleX < 0)\n {\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n else\n {\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n }\n\n if (camera.renderToTexture || renderer.currentFramebuffer !== null)\n {\n skeleton.y = calcMatrix.ty;\n skeleton.scaleY *= -1;\n }\n\n // Add autoUpdate option\n skeleton.updateWorldTransform();\n\n skeleton.color.a = Clamp(childAlpha * alpha, 0, 1);\n\n // Draw the current skeleton\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\n\n // Restore alpha\n skeleton.color.a = childAlpha;\n }\n\n if (!renderer.nextTypeMatch)\n {\n // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch.\n sceneRenderer.end();\n\n if (!renderer.finalType)\n {\n renderer.rebindPipeline(renderer.pipelines.MultiPipeline);\n }\n }\n};\n\nmodule.exports = SpineContainerWebGLRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Complete Event.\n *\n * @event SpinePluginEvents#COMPLETE\n * @since 3.19.0\n */\nmodule.exports = 'complete';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Dispose Event.\n *\n * @event SpinePluginEvents#DISPOSE\n * @since 3.19.0\n */\nmodule.exports = 'dispose';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The End Event.\n *\n * @event SpinePluginEvents#END\n * @since 3.19.0\n */\nmodule.exports = 'end';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Custom Event Event.\n *\n * @event SpinePluginEvents#EVENT\n * @since 3.19.0\n */\nmodule.exports = 'event';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Interrupted Event.\n *\n * @event SpinePluginEvents#INTERRUPTED\n * @since 3.19.0\n */\nmodule.exports = 'interrupted';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Start Event.\n *\n * @event SpinePluginEvents#START\n * @since 3.19.0\n */\nmodule.exports = 'start';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace SpinePluginEvents\n */\n\nmodule.exports = {\n\n COMPLETE: require('./COMPLETE_EVENT'),\n DISPOSE: require('./DISPOSE_EVENT'),\n END: require('./END_EVENT'),\n EVENT: require('./EVENT_EVENT'),\n INTERRUPTED: require('./INTERRUPTED_EVENT'),\n START: require('./START_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar AngleBetween = require('../../../../src/math/angle/Between');\nvar Clamp = require('../../../../src/math/Clamp');\nvar Class = require('../../../../src/utils/Class');\nvar ComponentsComputedSize = require('../../../../src/gameobjects/components/ComputedSize');\nvar ComponentsDepth = require('../../../../src/gameobjects/components/Depth');\nvar ComponentsFlip = require('../../../../src/gameobjects/components/Flip');\nvar ComponentsScrollFactor = require('../../../../src/gameobjects/components/ScrollFactor');\nvar ComponentsTransform = require('../../../../src/gameobjects/components/Transform');\nvar ComponentsVisible = require('../../../../src/gameobjects/components/Visible');\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar DegToRad = require('../../../../src/math/DegToRad');\nvar GameObject = require('../../../../src/gameobjects/GameObject');\nvar RadToDeg = require('../../../../src/math/RadToDeg');\nvar SpineEvents = require('../events/');\nvar SpineGameObjectRender = require('./SpineGameObjectRender');\n\n/**\n * @classdesc\n * A Spine Game Object is a Phaser level object that can be added to your Phaser Scenes. It encapsulates\n * a Spine Skeleton with Spine Animation Data and Animation State, with helper methods to allow you to\n * easily change the skin, slot attachment, bone positions and more.\n *\n * Spine Game Objects can be created via the Game Object Factory, Game Object Creator, or directly.\n * You can only create them if the Spine plugin has been loaded into Phaser.\n *\n * The quickest way is the Game Object Factory:\n *\n * ```javascript\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\n * ```\n *\n * Here we are creating a new Spine Game Object positioned at 512 x 550. It's using the `jelly`\n * Spine data, which has previously been loaded into your Scene. The `jelly-think` argument is\n * an optional animation to start playing on the skeleton. The final argument `true` sets the\n * animation to loop. Look at the documentation for further details on each of these options.\n *\n * For more control, you can use the Game Object Creator, passing in a Spine Game Object\n * Configuration object:\n *\n * ```javascript\n * let jelly = this.make.spine({\n * x: 512, y: 550, key: 'jelly',\n * scale: 1.5,\n * skinName: 'square_Green',\n * animationName: 'jelly-think', loop: true,\n * slotName: 'hat', attachmentName: 'images/La_14'\n * });\n * ```\n *\n * Here, you've got the ability to specify extra details, such as the slot name, attachments or\n * overall scale.\n *\n * If you wish to instantiate a Spine Game Object directly you can do so, but in order for it to\n * update and render, it must be added to the display and update lists of your Scene:\n *\n * ```javascript\n * let jelly = new SpineGameObject(this, this.spine, 512, 550, 'jelly', 'jelly-think', true);\n * this.sys.displayList.add(jelly);\n * this.sys.updateList.add(jelly);\n * ```\n *\n * It's possible to enable Spine Game Objects for input, but you should be aware that it will use\n * the bounds of the skeletons current pose to create the hit area from. Sometimes this is ok, but\n * often not. Make use of the `InputPlugin.enableDebug` method to view the input shape being created.\n * If it's not suitable, provide your own shape to the `setInteractive` method.\n *\n * Due to the way Spine handles scaling, it's not recommended to enable a Spine Game Object for\n * physics directly. Instead, you should look at creating a proxy body and syncing the Spine Game\n * Object position with it. See the examples for further details.\n *\n * If your Spine Game Object has black outlines around the different parts of the texture when it\n * renders then you have exported the files from Spine with pre-multiplied alpha enabled, but have\n * forgotten to set that flag when loading the Spine data. Please see the loader docs for more details.\n *\n * @class SpineGameObject\n * @constructor\n * @since 3.19.0\n *\n * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to.\n * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin.\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\n */\nvar SpineGameObject = new Class({\n\n Extends: GameObject,\n\n Mixins: [\n ComponentsComputedSize,\n ComponentsDepth,\n ComponentsFlip,\n ComponentsScrollFactor,\n ComponentsTransform,\n ComponentsVisible,\n SpineGameObjectRender\n ],\n\n initialize:\n\n function SpineGameObject (scene, plugin, x, y, key, animationName, loop)\n {\n GameObject.call(this, scene, 'Spine');\n\n /**\n * A reference to the Spine Plugin.\n *\n * @name SpineGameObject#plugin\n * @type {SpinePlugin}\n * @since 3.19.0\n */\n this.plugin = plugin;\n\n /**\n * The Spine Skeleton this Game Object is using.\n *\n * @name SpineGameObject#skeleton\n * @type {spine.Skeleton}\n * @since 3.19.0\n */\n this.skeleton = null;\n\n /**\n * The Spine Skeleton Data associated with the Skeleton this Game Object is using.\n *\n * @name SpineGameObject#skeletonData\n * @type {spine.SkeletonData}\n * @since 3.19.0\n */\n this.skeletonData = null;\n\n /**\n * The Spine Animation State this Game Object is using.\n *\n * @name SpineGameObject#state\n * @type {spine.AnimationState}\n * @since 3.19.0\n */\n this.state = null;\n\n /**\n * The Spine Animation State Data associated with the Animation State this Game Object is using.\n *\n * @name SpineGameObject#stateData\n * @type {spine.AnimationStateData}\n * @since 3.19.0\n */\n this.stateData = null;\n\n /**\n * A reference to the root bone of the Skeleton.\n *\n * @name SpineGameObject#root\n * @type {spine.Bone}\n * @since 3.19.0\n */\n this.root = null;\n\n /**\n * This object holds the calculated bounds of the current\n * pose, as set when a new Skeleton is applied.\n *\n * @name SpineGameObject#bounds\n * @type {any}\n * @since 3.19.0\n */\n this.bounds = null;\n\n /**\n * A Game Object level flag that allows you to enable debug drawing\n * to the Skeleton Debug Renderer by toggling it.\n *\n * @name SpineGameObject#drawDebug\n * @type {boolean}\n * @since 3.19.0\n */\n this.drawDebug = false;\n\n /**\n * The factor to scale the Animation update time by.\n *\n * @name SpineGameObject#timeScale\n * @type {number}\n * @since 3.19.0\n */\n this.timeScale = 1;\n\n /**\n * The calculated Display Origin of this Game Object.\n *\n * @name SpineGameObject#displayOriginX\n * @type {number}\n * @since 3.19.0\n */\n this.displayOriginX = 0;\n\n /**\n * The calculated Display Origin of this Game Object.\n *\n * @name SpineGameObject#displayOriginY\n * @type {number}\n * @since 3.19.0\n */\n this.displayOriginY = 0;\n\n /**\n * A flag that stores if the texture associated with the current\n * Skin being used by this Game Object, has its alpha pre-multiplied\n * into it, or not.\n *\n * @name SpineGameObject#preMultipliedAlpha\n * @type {boolean}\n * @since 3.19.0\n */\n this.preMultipliedAlpha = false;\n\n /**\n * A default Blend Mode. You cannot change the blend mode of a\n * Spine Game Object.\n *\n * @name SpineGameObject#blendMode\n * @type {number}\n * @readonly\n * @since 3.19.0\n */\n this.blendMode = -1;\n\n this.setPosition(x, y);\n\n if (key)\n {\n this.setSkeleton(key, animationName, loop);\n }\n },\n\n /**\n * Overrides the default Game Object method and always returns true.\n * Rendering is decided in the renderer functions.\n *\n * @method SpineGameObject#willRender\n * @since 3.19.0\n *\n * @return {boolean} Always returns `true`.\n */\n willRender: function ()\n {\n return true;\n },\n\n /**\n * Set the Alpha level for the whole Skeleton of this Game Object.\n *\n * The alpha controls the opacity of the Game Object as it renders.\n *\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\n *\n * @method SpineGameObject#setAlpha\n * @since 3.19.0\n *\n * @param {number} [value=1] - The alpha value used for the whole Skeleton.\n *\n * @return {this} This Game Object instance.\n */\n setAlpha: function (value, slotName)\n {\n if (value === undefined) { value = 1; }\n\n if (slotName)\n {\n var slot = this.findSlot(slotName);\n\n if (slot)\n {\n slot.color.a = Clamp(value, 0, 1);\n }\n }\n else\n {\n this.alpha = value;\n }\n\n return this;\n },\n\n /**\n * The alpha value of the Skeleton.\n *\n * A value between 0 and 1.\n *\n * This is a global value, impacting the entire Skeleton, not just a region of it.\n *\n * @name SpineGameObject#alpha\n * @type {number}\n * @since 3.19.0\n */\n alpha: {\n\n get: function ()\n {\n return this.skeleton.color.a;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n if (this.skeleton)\n {\n this.skeleton.color.a = v;\n }\n\n if (v === 0)\n {\n this.renderFlags &= ~2;\n }\n else\n {\n this.renderFlags |= 2;\n }\n }\n\n },\n\n /**\n * The amount of red used when rendering the Skeleton.\n *\n * A value between 0 and 1.\n *\n * This is a global value, impacting the entire Skeleton, not just a region of it.\n *\n * @name SpineGameObject#red\n * @type {number}\n * @since 3.19.0\n */\n red: {\n\n get: function ()\n {\n return this.skeleton.color.r;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n if (this.skeleton)\n {\n this.skeleton.color.r = v;\n }\n }\n\n },\n\n /**\n * The amount of green used when rendering the Skeleton.\n *\n * A value between 0 and 1.\n *\n * This is a global value, impacting the entire Skeleton, not just a region of it.\n *\n * @name SpineGameObject#green\n * @type {number}\n * @since 3.19.0\n */\n green: {\n\n get: function ()\n {\n return this.skeleton.color.g;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n if (this.skeleton)\n {\n this.skeleton.color.g = v;\n }\n }\n\n },\n\n /**\n * The amount of blue used when rendering the Skeleton.\n *\n * A value between 0 and 1.\n *\n * This is a global value, impacting the entire Skeleton, not just a region of it.\n *\n * @name SpineGameObject#blue\n * @type {number}\n * @since 3.19.0\n */\n blue: {\n\n get: function ()\n {\n return this.skeleton.color.b;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n if (this.skeleton)\n {\n this.skeleton.color.b = v;\n }\n }\n\n },\n\n /**\n * Sets the color on the given attachment slot. Or, if no slot is given, on the whole skeleton.\n *\n * @method SpineGameObject#setColor\n * @since 3.19.0\n *\n * @param {integer} [color=0xffffff] - The color being applied to the Skeleton or named Slot. Set to white to disable any previously set color.\n * @param {string} [slotName] - The name of the slot to set the color on. If not give, will be set on the whole skeleton.\n *\n * @return {this} This Game Object instance.\n */\n setColor: function (color, slotName)\n {\n if (color === undefined) { color = 0xffffff; }\n\n var red = (color >> 16 & 0xFF) / 255;\n var green = (color >> 8 & 0xFF) / 255;\n var blue = (color & 0xFF) / 255;\n var alpha = (color > 16777215) ? (color >>> 24) / 255 : null;\n\n var target = this.skeleton;\n\n if (slotName)\n {\n var slot = this.findSlot(slotName);\n\n if (slot)\n {\n target = slot;\n }\n }\n\n target.color.r = red;\n target.color.g = green;\n target.color.b = blue;\n\n if (alpha !== null)\n {\n target.color.a = alpha;\n }\n\n return this;\n },\n\n /**\n * Sets this Game Object to use the given Skeleton based on the Atlas Data Key and a provided JSON object\n * that contains the Skeleton data.\n *\n * @method SpineGameObject#setSkeletonFromJSON\n * @since 3.19.0\n *\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\n * @param {object} skeletonJSON - The JSON data for the Skeleton.\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\n *\n * @return {this} This Game Object.\n */\n setSkeletonFromJSON: function (atlasDataKey, skeletonJSON, animationName, loop)\n {\n return this.setSkeleton(atlasDataKey, skeletonJSON, animationName, loop);\n },\n\n /**\n * Sets this Game Object to use the given Skeleton based on its cache key.\n *\n * Typically, once set, the Skeleton doesn't change. Instead, you change the skin,\n * or slot attachment, or any other property to adjust it.\n *\n * @method SpineGameObject#setSkeleton\n * @since 3.19.0\n *\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\n * @param {object} skeletonJSON - The JSON data for the Skeleton.\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\n *\n * @return {this} This Game Object.\n */\n setSkeleton: function (atlasDataKey, animationName, loop, skeletonJSON)\n {\n if (this.state)\n {\n this.state.clearListeners();\n this.state.clearListenerNotifications();\n }\n\n var data = this.plugin.createSkeleton(atlasDataKey, skeletonJSON);\n\n this.skeletonData = data.skeletonData;\n\n this.preMultipliedAlpha = data.preMultipliedAlpha;\n\n var skeleton = data.skeleton;\n\n skeleton.setSkin();\n skeleton.setToSetupPose();\n\n this.skeleton = skeleton;\n\n // AnimationState\n data = this.plugin.createAnimationState(skeleton);\n\n if (this.state)\n {\n this.state.clearListeners();\n this.state.clearListenerNotifications();\n }\n\n this.state = data.state;\n this.stateData = data.stateData;\n\n this.state.addListener({\n event: this.onEvent.bind(this),\n complete: this.onComplete.bind(this),\n start: this.onStart.bind(this),\n end: this.onEnd.bind(this),\n dispose: this.onDispose.bind(this),\n interrupted: this.onInterrupted.bind(this)\n });\n\n if (animationName)\n {\n this.setAnimation(0, animationName, loop);\n }\n\n this.root = this.getRootBone();\n\n if (this.root)\n {\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\n }\n\n this.state.apply(skeleton);\n\n skeleton.updateCache();\n\n return this.updateSize();\n },\n\n /**\n * Internal event handler that emits the Spine onComplete event via this Game Object.\n *\n * @method SpineGameObject#onComplete\n * @fires SpinePluginEvents#COMPLETE\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n */\n onComplete: function (entry)\n {\n this.emit(SpineEvents.COMPLETE, entry);\n },\n\n /**\n * Internal event handler that emits the Spine onDispose event via this Game Object.\n *\n * @method SpineGameObject#onDispose\n * @fires SpinePluginEvents#DISPOSE\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n */\n onDispose: function (entry)\n {\n this.emit(SpineEvents.DISPOSE, entry);\n },\n\n /**\n * Internal event handler that emits the Spine onEnd event via this Game Object.\n *\n * @method SpineGameObject#onEnd\n * @fires SpinePluginEvents#END\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n */\n onEnd: function (entry)\n {\n this.emit(SpineEvents.END, entry);\n },\n\n /**\n * Internal event handler that emits the Spine Event event via this Game Object.\n *\n * @method SpineGameObject#onEvent\n * @fires SpinePluginEvents#EVENT\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n * @param {spine.Event} event - The Spine event.\n */\n onEvent: function (entry, event)\n {\n this.emit(SpineEvents.EVENT, entry, event);\n },\n\n /**\n * Internal event handler that emits the Spine onInterrupted event via this Game Object.\n *\n * @method SpineGameObject#onInterrupted\n * @fires SpinePluginEvents#INTERRUPTED\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n */\n onInterrupted: function (entry)\n {\n this.emit(SpineEvents.INTERRUPTED, entry);\n },\n\n /**\n * Internal event handler that emits the Spine onStart event via this Game Object.\n *\n * @method SpineGameObject#onStart\n * @fires SpinePluginEvents#START\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n */\n onStart: function (entry)\n {\n this.emit(SpineEvents.START, entry);\n },\n\n /**\n * Refreshes the data about the current Skeleton.\n *\n * This will reset the rotation, position and size of the Skeleton to match this Game Object.\n *\n * Call this method if you need to access the Skeleton data directly, and it may have changed\n * recently.\n *\n * @method SpineGameObject#refresh\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n refresh: function ()\n {\n if (this.root)\n {\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\n }\n\n this.updateSize();\n\n this.skeleton.updateCache();\n\n return this;\n },\n\n /**\n * Sets the size of this Game Object.\n *\n * If no arguments are given it uses the current skeleton data dimensions.\n *\n * You can use this method to set a fixed size of this Game Object, such as for input detection,\n * when the skeleton data doesn't match what is required in-game.\n *\n * @method SpineGameObject#setSize\n * @since 3.19.0\n *\n * @param {number} [width] - The width of the Skeleton. If not given it defaults to the Skeleton Data width.\n * @param {number} [height] - The height of the Skeleton. If not given it defaults to the Skeleton Data height.\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\n *\n * @return {this} This Game Object.\n */\n setSize: function (width, height, offsetX, offsetY)\n {\n var skeleton = this.skeleton;\n\n if (width === undefined) { width = skeleton.data.width; }\n if (height === undefined) { height = skeleton.data.height; }\n if (offsetX === undefined) { offsetX = 0; }\n if (offsetY === undefined) { offsetY = 0; }\n\n this.width = width;\n this.height = height;\n\n this.displayOriginX = skeleton.x - offsetX;\n this.displayOriginY = skeleton.y - offsetY;\n\n return this;\n },\n\n /**\n * Sets the offset of this Game Object from the Skeleton position.\n *\n * You can use this method to adjust how the position of this Game Object relates to the Skeleton it is using.\n *\n * @method SpineGameObject#setOffset\n * @since 3.19.0\n *\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\n *\n * @return {this} This Game Object.\n */\n setOffset: function (offsetX, offsetY)\n {\n var skeleton = this.skeleton;\n\n if (offsetX === undefined) { offsetX = 0; }\n if (offsetY === undefined) { offsetY = 0; }\n\n this.displayOriginX = skeleton.x - offsetX;\n this.displayOriginY = skeleton.y - offsetY;\n\n return this;\n },\n\n /**\n * Internal method that syncs all of the Game Object position and scale data to the Skeleton.\n * It then syncs the skeleton bounds back to this Game Object.\n *\n * This method is called automatically as needed internally, however, it's also exposed should\n * you require overriding the size settings.\n *\n * @method SpineGameObject#updateSize\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n updateSize: function ()\n {\n var skeleton = this.skeleton;\n var renderer = this.plugin.renderer;\n\n var height = renderer.height;\n\n var oldScaleX = this.scaleX;\n var oldScaleY = this.scaleY;\n\n skeleton.x = this.x;\n skeleton.y = height - this.y;\n skeleton.scaleX = 1;\n skeleton.scaleY = 1;\n\n skeleton.updateWorldTransform();\n\n var bounds = this.getBounds();\n\n this.width = bounds.size.x;\n this.height = bounds.size.y;\n\n this.displayOriginX = this.x - bounds.offset.x;\n this.displayOriginY = this.y - (height - (this.height + bounds.offset.y));\n\n skeleton.scaleX = oldScaleX;\n skeleton.scaleY = oldScaleY;\n\n skeleton.updateWorldTransform();\n\n return this;\n },\n\n /**\n * The horizontal scale of this Game Object, as applied to the Skeleton it is using.\n *\n * @name SpineGameObject#scaleX\n * @type {number}\n * @default 1\n * @since 3.19.0\n */\n scaleX: {\n\n get: function ()\n {\n return this._scaleX;\n },\n\n set: function (value)\n {\n this._scaleX = value;\n\n this.refresh();\n }\n\n },\n\n /**\n * The vertical scale of this Game Object, as applied to the Skeleton it is using.\n *\n * @name SpineGameObject#scaleY\n * @type {number}\n * @default 1\n * @since 3.19.0\n */\n scaleY: {\n\n get: function ()\n {\n return this._scaleY;\n },\n\n set: function (value)\n {\n this._scaleY = value;\n\n this.refresh();\n }\n\n },\n\n /**\n * Returns an array containing the names of all the bones in the Skeleton Data.\n *\n * @method SpineGameObject#getBoneList\n * @since 3.19.0\n *\n * @return {string[]} An array containing the names of all the bones in the Skeleton Data.\n */\n getBoneList: function ()\n {\n var output = [];\n\n var skeletonData = this.skeletonData;\n\n if (skeletonData)\n {\n for (var i = 0; i < skeletonData.bones.length; i++)\n {\n output.push(skeletonData.bones[i].name);\n }\n }\n\n return output;\n },\n\n /**\n * Returns an array containing the names of all the skins in the Skeleton Data.\n *\n * @method SpineGameObject#getSkinList\n * @since 3.19.0\n *\n * @return {string[]} An array containing the names of all the skins in the Skeleton Data.\n */\n getSkinList: function ()\n {\n var output = [];\n\n var skeletonData = this.skeletonData;\n\n if (skeletonData)\n {\n for (var i = 0; i < skeletonData.skins.length; i++)\n {\n output.push(skeletonData.skins[i].name);\n }\n }\n\n return output;\n },\n\n /**\n * Returns an array containing the names of all the slots in the Skeleton.\n *\n * @method SpineGameObject#getSlotList\n * @since 3.19.0\n *\n * @return {string[]} An array containing the names of all the slots in the Skeleton.\n */\n getSlotList: function ()\n {\n var output = [];\n\n var skeleton = this.skeleton;\n\n for (var i = 0; i < skeleton.slots.length; i++)\n {\n output.push(skeleton.slots[i].data.name);\n }\n\n return output;\n },\n\n /**\n * Returns an array containing the names of all the animations in the Skeleton Data.\n *\n * @method SpineGameObject#getAnimationList\n * @since 3.19.0\n *\n * @return {string[]} An array containing the names of all the animations in the Skeleton Data.\n */\n getAnimationList: function ()\n {\n var output = [];\n\n var skeletonData = this.skeletonData;\n\n if (skeletonData)\n {\n for (var i = 0; i < skeletonData.animations.length; i++)\n {\n output.push(skeletonData.animations[i].name);\n }\n }\n\n return output;\n },\n\n /**\n * Returns the current animation being played on the given track, if any.\n *\n * @method SpineGameObject#getCurrentAnimation\n * @since 3.19.0\n *\n * @param {integer} [trackIndex=0] - The track to return the current animation on.\n *\n * @return {?spine.Animation} The current Animation on the given track, or `undefined` if there is no current animation.\n */\n getCurrentAnimation: function (trackIndex)\n {\n if (trackIndex === undefined) { trackIndex = 0; }\n\n var current = this.state.getCurrent(trackIndex);\n\n if (current)\n {\n return current.animation;\n }\n },\n\n /**\n * Sets the current animation for a track, discarding any queued animations.\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\n *\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\n *\n * @method SpineGameObject#play\n * @fires SpinePluginEvents#START\n * @since 3.19.0\n *\n * @param {string} animationName - The string-based key of the animation to play.\n * @param {boolean} [loop=false] - Should the animation be looped when played?\n * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call.\n *\n * @return {this} This Game Object. If you need the TrackEntry, see `setAnimation` instead.\n */\n play: function (animationName, loop, ignoreIfPlaying)\n {\n this.setAnimation(0, animationName, loop, ignoreIfPlaying);\n\n return this;\n },\n\n /**\n * Sets the current animation for a track, discarding any queued animations.\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\n *\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\n *\n * @method SpineGameObject#setAnimation\n * @fires SpinePluginEvents#START\n * @since 3.19.0\n *\n * @param {integer} trackIndex - The track index to play the animation on.\n * @param {string} animationName - The string-based key of the animation to play.\n * @param {boolean} [loop=false] - Should the animation be looped when played?\n * @param {boolean} [ignoreIfPlaying=false] - If the animation specified by the track index is already playing then ignore this call.\n *\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\n */\n setAnimation: function (trackIndex, animationName, loop, ignoreIfPlaying)\n {\n if (loop === undefined) { loop = false; }\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\n\n if (ignoreIfPlaying && this.state)\n {\n var currentTrack = this.state.getCurrent(trackIndex);\n\n if (currentTrack && currentTrack.animation.name === animationName && !currentTrack.isComplete())\n {\n return;\n }\n }\n\n if (this.findAnimation(animationName))\n {\n return this.state.setAnimation(trackIndex, animationName, loop);\n }\n },\n\n /**\n * Adds an animation to be played after the current or last queued animation for a track.\n * If the track is empty, it is equivalent to calling setAnimation.\n *\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\n *\n * The delay is a float. If > 0, sets delay. If <= 0, the delay set is the duration of the previous\n * track entry minus any mix duration (from the AnimationStateData) plus the specified delay\n * (ie the mix ends at (delay = 0) or before (delay < 0) the previous track entry duration).\n * If the previous entry is looping, its next loop completion is used instead of its duration.\n *\n * @method SpineGameObject#addAnimation\n * @since 3.19.0\n *\n * @param {integer} trackIndex - The track index to add the animation to.\n * @param {string} animationName - The string-based key of the animation to add.\n * @param {boolean} [loop=false] - Should the animation be looped when played?\n * @param {integer} [delay=0] - A delay, in ms, before which this animation will start when played.\n *\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\n */\n addAnimation: function (trackIndex, animationName, loop, delay)\n {\n return this.state.addAnimation(trackIndex, animationName, loop, delay);\n },\n\n /**\n * Sets an empty animation for a track, discarding any queued animations, and sets the track\n * entry's mixDuration. An empty animation has no timelines and serves as a placeholder for mixing in or out.\n *\n * Mixing out is done by setting an empty animation with a mix duration using either setEmptyAnimation,\n * setEmptyAnimations, or addEmptyAnimation. Mixing to an empty animation causes the previous animation to be\n * applied less and less over the mix duration. Properties keyed in the previous animation transition to\n * the value from lower tracks or to the setup pose value if no lower tracks key the property.\n * A mix duration of 0 still mixes out over one frame.\n *\n * Mixing in is done by first setting an empty animation, then adding an animation using addAnimation\n * and on the returned track entry, set the mixDuration. Mixing from an empty animation causes the new\n * animation to be applied more and more over the mix duration. Properties keyed in the new animation\n * transition from the value from lower tracks or from the setup pose value if no lower tracks key the\n * property to the value keyed in the new animation.\n *\n * @method SpineGameObject#setEmptyAnimation\n * @since 3.19.0\n *\n * @param {integer} trackIndex - The track index to add the animation to.\n * @param {integer} [mixDuration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\n *\n * @return {spine.TrackEntry} The returned Track Entry.\n */\n setEmptyAnimation: function (trackIndex, mixDuration)\n {\n return this.state.setEmptyAnimation(trackIndex, mixDuration);\n },\n\n /**\n * Removes all animations from the track, leaving skeletons in their current pose.\n *\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\n * rather than leaving them in their current pose.\n *\n * @method SpineGameObject#clearTrack\n * @since 3.19.0\n *\n * @param {integer} trackIndex - The track index to add the animation to.\n *\n * @return {this} This Game Object.\n */\n clearTrack: function (trackIndex)\n {\n this.state.clearTrack(trackIndex);\n\n return this;\n },\n\n /**\n * Removes all animations from all tracks, leaving skeletons in their current pose.\n *\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\n * rather than leaving them in their current pose.\n *\n * @method SpineGameObject#clearTracks\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n clearTracks: function ()\n {\n this.state.clearTracks();\n\n return this;\n },\n\n /**\n * Sets the skin used to look up attachments before looking in the defaultSkin.\n *\n * Attachments from the new skin are attached if the corresponding attachment from the\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\n * attached from the new skin.\n *\n * After changing the skin, the visible attachments can be reset to those attached in the\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\n * or show attachments from the new skin.\n *\n * @method SpineGameObject#setSkinByName\n * @since 3.19.0\n *\n * @param {string} skinName - The name of the skin to set.\n *\n * @return {this} This Game Object.\n */\n setSkinByName: function (skinName)\n {\n var skeleton = this.skeleton;\n\n skeleton.setSkinByName(skinName);\n\n skeleton.setSlotsToSetupPose();\n\n this.state.apply(skeleton);\n\n return this;\n },\n\n /**\n * Sets the skin used to look up attachments before looking in the defaultSkin.\n *\n * Attachments from the new skin are attached if the corresponding attachment from the\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\n * attached from the new skin.\n *\n * After changing the skin, the visible attachments can be reset to those attached in the\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\n * or show attachments from the new skin.\n *\n * @method SpineGameObject#setSkin\n * @since 3.19.0\n *\n * @param {?spine.Skin} newSkin - The Skin to set. May be `null`.\n *\n * @return {this} This Game Object.\n */\n setSkin: function (newSkin)\n {\n var skeleton = this.skeleton;\n\n skeleton.setSkin(newSkin);\n\n skeleton.setSlotsToSetupPose();\n\n this.state.apply(skeleton);\n\n return this;\n },\n\n /**\n * Sets the mix duration when changing from the specified animation to the other.\n *\n * @method SpineGameObject#setMix\n * @since 3.19.0\n *\n * @param {string} fromName - The animation to mix from.\n * @param {string} toName - The animation to mix to.\n * @param {number} [duration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\n *\n * @return {this} This Game Object.\n */\n setMix: function (fromName, toName, duration)\n {\n this.stateData.setMix(fromName, toName, duration);\n\n return this;\n },\n\n /**\n * Finds an attachment by looking in the skin and defaultSkin using the slot\n * index and attachment name. First the skin is checked and if the attachment was not found,\n * the default skin is checked.\n *\n * @method SpineGameObject#getAttachment\n * @since 3.19.0\n *\n * @param {integer} slotIndex - The slot index to search.\n * @param {string} attachmentName - The attachment name to look for.\n *\n * @return {?spine.Attachment} The Attachment, if found. May be null.\n */\n getAttachment: function (slotIndex, attachmentName)\n {\n return this.skeleton.getAttachment(slotIndex, attachmentName);\n },\n\n /**\n * Finds an attachment by looking in the skin and defaultSkin using the slot name and attachment name.\n *\n * @method SpineGameObject#getAttachmentByName\n * @since 3.19.0\n *\n * @param {string} slotName - The slot name to search.\n * @param {string} attachmentName - The attachment name to look for.\n *\n * @return {?spine.Attachment} The Attachment, if found. May be null.\n */\n getAttachmentByName: function (slotName, attachmentName)\n {\n return this.skeleton.getAttachmentByName(slotName, attachmentName);\n },\n\n /**\n * A convenience method to set an attachment by finding the slot with findSlot,\n * finding the attachment with getAttachment, then setting the slot's attachment.\n *\n * @method SpineGameObject#setAttachment\n * @since 3.19.0\n *\n * @param {string} slotName - The slot name to add the attachment to.\n * @param {string} attachmentName - The attachment name to add.\n *\n * @return {this} This Game Object.\n */\n setAttachment: function (slotName, attachmentName)\n {\n if (Array.isArray(slotName) && Array.isArray(attachmentName) && slotName.length === attachmentName.length)\n {\n for (var i = 0; i < slotName.length; i++)\n {\n this.skeleton.setAttachment(slotName[i], attachmentName[i]);\n }\n }\n else\n {\n this.skeleton.setAttachment(slotName, attachmentName);\n }\n\n return this;\n },\n\n /**\n * Sets the bones, constraints, slots, and draw order to their setup pose values.\n *\n * @method SpineGameObject#setToSetupPose\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n setToSetupPose: function ()\n {\n this.skeleton.setToSetupPose();\n\n return this;\n },\n\n /**\n * Sets the slots and draw order to their setup pose values.\n *\n * @method SpineGameObject#setSlotsToSetupPose\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n setSlotsToSetupPose: function ()\n {\n this.skeleton.setSlotsToSetupPose();\n\n return this;\n },\n\n /**\n * Sets the bones and constraints to their setup pose values.\n *\n * @method SpineGameObject#setBonesToSetupPose\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n setBonesToSetupPose: function ()\n {\n this.skeleton.setBonesToSetupPose();\n\n return this;\n },\n\n /**\n * Gets the root bone, or null.\n *\n * @method SpineGameObject#getRootBone\n * @since 3.19.0\n *\n * @return {spine.Bone} The root bone, or null.\n */\n getRootBone: function ()\n {\n return this.skeleton.getRootBone();\n },\n\n /**\n * Takes a Bone object and a position in world space and rotates the Bone so it is angled\n * towards the given position. You can set an optional angle offset, should the bone be\n * designed at a specific angle already. You can also set a minimum and maximum range for the angle.\n *\n * @method SpineGameObject#angleBoneToXY\n * @since 3.19.0\n *\n * @param {spine.Bone} bone - The bone to rotate towards the world position.\n * @param {number} worldX - The world x coordinate to rotate the bone towards.\n * @param {number} worldY - The world y coordinate to rotate the bone towards.\n * @param {number} [offset=0] - An offset to add to the rotation angle.\n * @param {number} [minAngle=0] - The minimum range of the rotation angle.\n * @param {number} [maxAngle=360] - The maximum range of the rotation angle.\n *\n * @return {this} This Game Object.\n */\n angleBoneToXY: function (bone, worldX, worldY, offset, minAngle, maxAngle)\n {\n if (offset === undefined) { offset = 0; }\n if (minAngle === undefined) { minAngle = 0; }\n if (maxAngle === undefined) { maxAngle = 360; }\n\n var renderer = this.plugin.renderer;\n var height = renderer.height;\n\n var angle = CounterClockwise(AngleBetween(bone.worldX, height - bone.worldY, worldX, worldY) + DegToRad(offset));\n\n bone.rotation = Clamp(RadToDeg(angle), minAngle, maxAngle);\n\n return this;\n },\n\n /**\n * Finds a bone by comparing each bone's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findBone\n * @since 3.19.0\n *\n * @param {string} boneName - The name of the bone to find.\n *\n * @return {spine.Bone} The bone, or null.\n */\n findBone: function (boneName)\n {\n return this.skeleton.findBone(boneName);\n },\n\n /**\n * Finds the index of a bone by comparing each bone's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findBoneIndex\n * @since 3.19.0\n *\n * @param {string} boneName - The name of the bone to find.\n *\n * @return {integer} The bone index. Or -1 if the bone was not found.\n */\n findBoneIndex: function (boneName)\n {\n return this.skeleton.findBoneIndex(boneName);\n },\n\n /**\n * Finds a slot by comparing each slot's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findSlot\n * @since 3.19.0\n *\n * @param {string} slotName - The name of the slot to find.\n *\n * @return {spine.Slot} The Slot. May be null.\n */\n findSlot: function (slotName)\n {\n return this.skeleton.findSlot(slotName);\n },\n\n /**\n * Finds the index of a slot by comparing each slot's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findSlotIndex\n * @since 3.19.0\n *\n * @param {string} slotName - The name of the slot to find.\n *\n * @return {integer} The slot index. Or -1 if the Slot was not found.\n */\n findSlotIndex: function (slotName)\n {\n return this.skeleton.findSlotIndex(slotName);\n },\n\n /**\n * Finds a skin by comparing each skin's name. It is more efficient to cache the results of\n * this method than to call it multiple times.\n *\n * @method SpineGameObject#findSkin\n * @since 3.19.0\n *\n * @param {string} skinName - The name of the skin to find.\n *\n * @return {spine.Skin} The Skin. May be null.\n */\n findSkin: function (skinName)\n {\n return this.skeletonData.findSkin(skinName);\n },\n\n /**\n * Finds an event by comparing each events's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findEvent\n * @since 3.19.0\n *\n * @param {string} eventDataName - The name of the event to find.\n *\n * @return {spine.EventData} The Event Data. May be null.\n */\n findEvent: function (eventDataName)\n {\n return this.skeletonData.findEvent(eventDataName);\n },\n\n /**\n * Finds an animation by comparing each animation's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findAnimation\n * @since 3.19.0\n *\n * @param {string} animationName - The name of the animation to find.\n *\n * @return {spine.Animation} The Animation. May be null.\n */\n findAnimation: function (animationName)\n {\n return this.skeletonData.findAnimation(animationName);\n },\n\n /**\n * Finds an IK constraint by comparing each IK constraint's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findIkConstraint\n * @since 3.19.0\n *\n * @param {string} constraintName - The name of the constraint to find.\n *\n * @return {spine.IkConstraintData} The IK constraint. May be null.\n */\n findIkConstraint: function (constraintName)\n {\n return this.skeletonData.findIkConstraint(constraintName);\n },\n\n /**\n * Finds an transform constraint by comparing each transform constraint's name.\n * It is more efficient to cache the results of this method than to call it multiple times.\n *\n * @method SpineGameObject#findTransformConstraint\n * @since 3.19.0\n *\n * @param {string} constraintName - The name of the constraint to find.\n *\n * @return {spine.TransformConstraintData} The transform constraint. May be null.\n */\n findTransformConstraint: function (constraintName)\n {\n return this.skeletonData.findTransformConstraint(constraintName);\n },\n\n /**\n * Finds a path constraint by comparing each path constraint's name.\n * It is more efficient to cache the results of this method than to call it multiple times.\n *\n * @method SpineGameObject#findPathConstraint\n * @since 3.19.0\n *\n * @param {string} constraintName - The name of the constraint to find.\n *\n * @return {spine.PathConstraintData} The path constraint. May be null.\n */\n findPathConstraint: function (constraintName)\n {\n return this.skeletonData.findPathConstraint(constraintName);\n },\n\n /**\n * Finds the index of a path constraint by comparing each path constraint's name.\n * It is more efficient to cache the results of this method than to call it multiple times.\n *\n * @method SpineGameObject#findPathConstraintIndex\n * @since 3.19.0\n *\n * @param {string} constraintName - The name of the constraint to find.\n *\n * @return {integer} The constraint index. Or -1 if the constraint was not found.\n */\n findPathConstraintIndex: function (constraintName)\n {\n return this.skeletonData.findPathConstraintIndex(constraintName);\n },\n\n /**\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\n *\n * The returned object contains two properties: `offset` and `size`:\n *\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\n * `size` - The width and height of the AABB.\n *\n * @method SpineGameObject#getBounds\n * @since 3.19.0\n *\n * @return {any} The bounds object.\n */\n getBounds: function ()\n {\n return this.plugin.getBounds(this.skeleton);\n },\n\n /**\n * Internal update handler.\n *\n * @method SpineGameObject#preUpdate\n * @protected\n * @since 3.19.0\n *\n * @param {number} time - The current timestamp.\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\n */\n preUpdate: function (time, delta)\n {\n var skeleton = this.skeleton;\n\n this.state.update((delta / 1000) * this.timeScale);\n\n this.state.apply(skeleton);\n },\n\n /**\n * Internal destroy handler, called as part of the destroy process.\n *\n * @method SpineGameObject#preDestroy\n * @protected\n * @since 3.19.0\n */\n preDestroy: function ()\n {\n if (this.state)\n {\n this.state.clearListeners();\n this.state.clearListenerNotifications();\n }\n\n this.plugin = null;\n\n this.skeleton = null;\n this.skeletonData = null;\n\n this.state = null;\n this.stateData = null;\n }\n\n});\n\nmodule.exports = SpineGameObject;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar RadToDeg = require('../../../../src/math/RadToDeg');\nvar Wrap = require('../../../../src/math/Wrap');\n\n/**\n * Renders this Game Object with the Canvas Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method SpineGameObject#renderCanvas\n * @since 3.19.0\n * @private\n *\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar SpineGameObjectCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\n{\n var context = renderer.currentContext;\n\n var plugin = src.plugin;\n var skeleton = src.skeleton;\n var skeletonRenderer = plugin.skeletonRenderer;\n\n var GameObjectRenderMask = 15;\n\n var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)));\n\n if (!skeleton || !willRender)\n {\n return;\n }\n\n var camMatrix = renderer._tempMatrix1;\n var spriteMatrix = renderer._tempMatrix2;\n var calcMatrix = renderer._tempMatrix3;\n\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));\n\n camMatrix.copyFrom(camera.matrix);\n\n if (parentMatrix)\n {\n // Multiply the camera by the parent matrix\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\n\n // Undo the camera scroll\n spriteMatrix.e = src.x;\n spriteMatrix.f = src.y;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n }\n else\n {\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n }\n\n skeleton.x = calcMatrix.tx;\n skeleton.y = calcMatrix.ty;\n\n skeleton.scaleX = calcMatrix.scaleX;\n\n // Inverse or we get upside-down skeletons\n skeleton.scaleY = calcMatrix.scaleY * -1;\n\n if (src.scaleX < 0)\n {\n skeleton.scaleX *= -1;\n\n src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);\n }\n else\n {\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\n }\n\n if (src.scaleY < 0)\n {\n skeleton.scaleY *= -1;\n\n if (src.scaleX < 0)\n {\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n else\n {\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n }\n\n if (camera.renderToTexture)\n {\n skeleton.y = calcMatrix.ty;\n skeleton.scaleY *= -1;\n }\n\n // Add autoUpdate option\n skeleton.updateWorldTransform();\n\n skeletonRenderer.ctx = context;\n skeletonRenderer.debugRendering = (plugin.drawDebug || src.drawDebug);\n\n context.save();\n\n skeletonRenderer.draw(skeleton);\n\n context.restore();\n};\n\nmodule.exports = SpineGameObjectCanvasRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar renderWebGL = require('../../../../src/utils/NOOP');\nvar renderCanvas = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineGameObjectWebGLRenderer');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineGameObjectCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar RadToDeg = require('../../../../src/math/RadToDeg');\nvar Wrap = require('../../../../src/math/Wrap');\n\n/**\n * Renders this Game Object with the WebGL Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method SpineGameObject#renderWebGL\n * @since 3.19.0\n * @private\n *\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\n{\n var plugin = src.plugin;\n var skeleton = src.skeleton;\n var childAlpha = skeleton.color.a;\n var sceneRenderer = plugin.sceneRenderer;\n\n if (renderer.newType)\n {\n // flush + clear if this is a new type, even if it doesn't render\n renderer.clearPipeline();\n }\n\n var GameObjectRenderMask = 15;\n\n var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || childAlpha === 0);\n\n if (!skeleton || !willRender)\n {\n // If there is already a batch running, we need to close it\n if (!renderer.nextTypeMatch)\n {\n // The next object in the display list is not a Spine object, so we end the batch\n sceneRenderer.end();\n\n if (!renderer.finalType)\n {\n // Reset the current type\n renderer.currentType = '';\n\n renderer.rebindPipeline();\n }\n }\n\n return;\n }\n\n var camMatrix = renderer._tempMatrix1;\n var spriteMatrix = renderer._tempMatrix2;\n var calcMatrix = renderer._tempMatrix3;\n\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));\n\n camMatrix.copyFrom(camera.matrix);\n\n if (parentMatrix)\n {\n // Multiply the camera by the parent matrix\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\n\n // Undo the camera scroll\n spriteMatrix.e = src.x;\n spriteMatrix.f = src.y;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n }\n else\n {\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n }\n\n var viewportHeight = renderer.height;\n\n skeleton.x = calcMatrix.tx;\n skeleton.y = viewportHeight - calcMatrix.ty;\n\n skeleton.scaleX = calcMatrix.scaleX;\n skeleton.scaleY = calcMatrix.scaleY;\n\n if (src.scaleX < 0)\n {\n skeleton.scaleX *= -1;\n\n src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);\n }\n else\n {\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\n }\n\n if (src.scaleY < 0)\n {\n skeleton.scaleY *= -1;\n\n if (src.scaleX < 0)\n {\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n else\n {\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n }\n\n if (camera.renderToTexture || renderer.currentFramebuffer !== null)\n {\n skeleton.y = calcMatrix.ty;\n skeleton.scaleY *= -1;\n }\n\n // Add autoUpdate option\n skeleton.updateWorldTransform();\n\n if (renderer.newType)\n {\n sceneRenderer.begin();\n }\n\n // Draw the current skeleton\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\n\n if (plugin.drawDebug || src.drawDebug)\n {\n // Because if we don't, the bones render positions are completely wrong (*sigh*)\n var oldX = skeleton.x;\n var oldY = skeleton.y;\n\n skeleton.x = 0;\n skeleton.y = 0;\n\n sceneRenderer.drawSkeletonDebug(skeleton, src.preMultipliedAlpha);\n\n skeleton.x = oldX;\n skeleton.y = oldY;\n }\n\n if (!renderer.nextTypeMatch)\n {\n // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch\n sceneRenderer.end();\n\n // And rebind the previous pipeline\n renderer.rebindPipeline();\n }\n};\n\nmodule.exports = SpineGameObjectWebGLRenderer;\n","/*** IMPORTS FROM imports-loader ***/\n\n(function() {\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar spine;\n(function (spine) {\n var Animation = (function () {\n function Animation(name, timelines, duration) {\n if (name == null)\n throw new Error(\"name cannot be null.\");\n if (timelines == null)\n throw new Error(\"timelines cannot be null.\");\n this.name = name;\n this.timelines = timelines;\n this.timelineIds = [];\n for (var i = 0; i < timelines.length; i++)\n this.timelineIds[timelines[i].getPropertyId()] = true;\n this.duration = duration;\n }\n Animation.prototype.hasTimeline = function (id) {\n return this.timelineIds[id] == true;\n };\n Animation.prototype.apply = function (skeleton, lastTime, time, loop, events, alpha, blend, direction) {\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n if (loop && this.duration != 0) {\n time %= this.duration;\n if (lastTime > 0)\n lastTime %= this.duration;\n }\n var timelines = this.timelines;\n for (var i = 0, n = timelines.length; i < n; i++)\n timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\n };\n Animation.binarySearch = function (values, target, step) {\n if (step === void 0) { step = 1; }\n var low = 0;\n var high = values.length / step - 2;\n if (high == 0)\n return step;\n var current = high >>> 1;\n while (true) {\n if (values[(current + 1) * step] <= target)\n low = current + 1;\n else\n high = current;\n if (low == high)\n return (low + 1) * step;\n current = (low + high) >>> 1;\n }\n };\n Animation.linearSearch = function (values, target, step) {\n for (var i = 0, last = values.length - step; i <= last; i += step)\n if (values[i] > target)\n return i;\n return -1;\n };\n return Animation;\n }());\n spine.Animation = Animation;\n var MixBlend;\n (function (MixBlend) {\n MixBlend[MixBlend[\"setup\"] = 0] = \"setup\";\n MixBlend[MixBlend[\"first\"] = 1] = \"first\";\n MixBlend[MixBlend[\"replace\"] = 2] = \"replace\";\n MixBlend[MixBlend[\"add\"] = 3] = \"add\";\n })(MixBlend = spine.MixBlend || (spine.MixBlend = {}));\n var MixDirection;\n (function (MixDirection) {\n MixDirection[MixDirection[\"mixIn\"] = 0] = \"mixIn\";\n MixDirection[MixDirection[\"mixOut\"] = 1] = \"mixOut\";\n })(MixDirection = spine.MixDirection || (spine.MixDirection = {}));\n var TimelineType;\n (function (TimelineType) {\n TimelineType[TimelineType[\"rotate\"] = 0] = \"rotate\";\n TimelineType[TimelineType[\"translate\"] = 1] = \"translate\";\n TimelineType[TimelineType[\"scale\"] = 2] = \"scale\";\n TimelineType[TimelineType[\"shear\"] = 3] = \"shear\";\n TimelineType[TimelineType[\"attachment\"] = 4] = \"attachment\";\n TimelineType[TimelineType[\"color\"] = 5] = \"color\";\n TimelineType[TimelineType[\"deform\"] = 6] = \"deform\";\n TimelineType[TimelineType[\"event\"] = 7] = \"event\";\n TimelineType[TimelineType[\"drawOrder\"] = 8] = \"drawOrder\";\n TimelineType[TimelineType[\"ikConstraint\"] = 9] = \"ikConstraint\";\n TimelineType[TimelineType[\"transformConstraint\"] = 10] = \"transformConstraint\";\n TimelineType[TimelineType[\"pathConstraintPosition\"] = 11] = \"pathConstraintPosition\";\n TimelineType[TimelineType[\"pathConstraintSpacing\"] = 12] = \"pathConstraintSpacing\";\n TimelineType[TimelineType[\"pathConstraintMix\"] = 13] = \"pathConstraintMix\";\n TimelineType[TimelineType[\"twoColor\"] = 14] = \"twoColor\";\n })(TimelineType = spine.TimelineType || (spine.TimelineType = {}));\n var CurveTimeline = (function () {\n function CurveTimeline(frameCount) {\n if (frameCount <= 0)\n throw new Error(\"frameCount must be > 0: \" + frameCount);\n this.curves = spine.Utils.newFloatArray((frameCount - 1) * CurveTimeline.BEZIER_SIZE);\n }\n CurveTimeline.prototype.getFrameCount = function () {\n return this.curves.length / CurveTimeline.BEZIER_SIZE + 1;\n };\n CurveTimeline.prototype.setLinear = function (frameIndex) {\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.LINEAR;\n };\n CurveTimeline.prototype.setStepped = function (frameIndex) {\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.STEPPED;\n };\n CurveTimeline.prototype.getCurveType = function (frameIndex) {\n var index = frameIndex * CurveTimeline.BEZIER_SIZE;\n if (index == this.curves.length)\n return CurveTimeline.LINEAR;\n var type = this.curves[index];\n if (type == CurveTimeline.LINEAR)\n return CurveTimeline.LINEAR;\n if (type == CurveTimeline.STEPPED)\n return CurveTimeline.STEPPED;\n return CurveTimeline.BEZIER;\n };\n CurveTimeline.prototype.setCurve = function (frameIndex, cx1, cy1, cx2, cy2) {\n var tmpx = (-cx1 * 2 + cx2) * 0.03, tmpy = (-cy1 * 2 + cy2) * 0.03;\n var dddfx = ((cx1 - cx2) * 3 + 1) * 0.006, dddfy = ((cy1 - cy2) * 3 + 1) * 0.006;\n var ddfx = tmpx * 2 + dddfx, ddfy = tmpy * 2 + dddfy;\n var dfx = cx1 * 0.3 + tmpx + dddfx * 0.16666667, dfy = cy1 * 0.3 + tmpy + dddfy * 0.16666667;\n var i = frameIndex * CurveTimeline.BEZIER_SIZE;\n var curves = this.curves;\n curves[i++] = CurveTimeline.BEZIER;\n var x = dfx, y = dfy;\n for (var n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\n curves[i] = x;\n curves[i + 1] = y;\n dfx += ddfx;\n dfy += ddfy;\n ddfx += dddfx;\n ddfy += dddfy;\n x += dfx;\n y += dfy;\n }\n };\n CurveTimeline.prototype.getCurvePercent = function (frameIndex, percent) {\n percent = spine.MathUtils.clamp(percent, 0, 1);\n var curves = this.curves;\n var i = frameIndex * CurveTimeline.BEZIER_SIZE;\n var type = curves[i];\n if (type == CurveTimeline.LINEAR)\n return percent;\n if (type == CurveTimeline.STEPPED)\n return 0;\n i++;\n var x = 0;\n for (var start = i, n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\n x = curves[i];\n if (x >= percent) {\n var prevX = void 0, prevY = void 0;\n if (i == start) {\n prevX = 0;\n prevY = 0;\n }\n else {\n prevX = curves[i - 2];\n prevY = curves[i - 1];\n }\n return prevY + (curves[i + 1] - prevY) * (percent - prevX) / (x - prevX);\n }\n }\n var y = curves[i - 1];\n return y + (1 - y) * (percent - x) / (1 - x);\n };\n CurveTimeline.LINEAR = 0;\n CurveTimeline.STEPPED = 1;\n CurveTimeline.BEZIER = 2;\n CurveTimeline.BEZIER_SIZE = 10 * 2 - 1;\n return CurveTimeline;\n }());\n spine.CurveTimeline = CurveTimeline;\n var RotateTimeline = (function (_super) {\n __extends(RotateTimeline, _super);\n function RotateTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount << 1);\n return _this;\n }\n RotateTimeline.prototype.getPropertyId = function () {\n return (TimelineType.rotate << 24) + this.boneIndex;\n };\n RotateTimeline.prototype.setFrame = function (frameIndex, time, degrees) {\n frameIndex <<= 1;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + RotateTimeline.ROTATION] = degrees;\n };\n RotateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var frames = this.frames;\n var bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n bone.rotation = bone.data.rotation;\n return;\n case MixBlend.first:\n var r_1 = bone.data.rotation - bone.rotation;\n bone.rotation += (r_1 - (16384 - ((16384.499999999996 - r_1 / 360) | 0)) * 360) * alpha;\n }\n return;\n }\n if (time >= frames[frames.length - RotateTimeline.ENTRIES]) {\n var r_2 = frames[frames.length + RotateTimeline.PREV_ROTATION];\n switch (blend) {\n case MixBlend.setup:\n bone.rotation = bone.data.rotation + r_2 * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n r_2 += bone.data.rotation - bone.rotation;\n r_2 -= (16384 - ((16384.499999999996 - r_2 / 360) | 0)) * 360;\n case MixBlend.add:\n bone.rotation += r_2 * alpha;\n }\n return;\n }\n var frame = Animation.binarySearch(frames, time, RotateTimeline.ENTRIES);\n var prevRotation = frames[frame + RotateTimeline.PREV_ROTATION];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime));\n var r = frames[frame + RotateTimeline.ROTATION] - prevRotation;\n r = prevRotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * percent;\n switch (blend) {\n case MixBlend.setup:\n bone.rotation = bone.data.rotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n r += bone.data.rotation - bone.rotation;\n case MixBlend.add:\n bone.rotation += (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\n }\n };\n RotateTimeline.ENTRIES = 2;\n RotateTimeline.PREV_TIME = -2;\n RotateTimeline.PREV_ROTATION = -1;\n RotateTimeline.ROTATION = 1;\n return RotateTimeline;\n }(CurveTimeline));\n spine.RotateTimeline = RotateTimeline;\n var TranslateTimeline = (function (_super) {\n __extends(TranslateTimeline, _super);\n function TranslateTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES);\n return _this;\n }\n TranslateTimeline.prototype.getPropertyId = function () {\n return (TimelineType.translate << 24) + this.boneIndex;\n };\n TranslateTimeline.prototype.setFrame = function (frameIndex, time, x, y) {\n frameIndex *= TranslateTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + TranslateTimeline.X] = x;\n this.frames[frameIndex + TranslateTimeline.Y] = y;\n };\n TranslateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var frames = this.frames;\n var bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n bone.x = bone.data.x;\n bone.y = bone.data.y;\n return;\n case MixBlend.first:\n bone.x += (bone.data.x - bone.x) * alpha;\n bone.y += (bone.data.y - bone.y) * alpha;\n }\n return;\n }\n var x = 0, y = 0;\n if (time >= frames[frames.length - TranslateTimeline.ENTRIES]) {\n x = frames[frames.length + TranslateTimeline.PREV_X];\n y = frames[frames.length + TranslateTimeline.PREV_Y];\n }\n else {\n var frame = Animation.binarySearch(frames, time, TranslateTimeline.ENTRIES);\n x = frames[frame + TranslateTimeline.PREV_X];\n y = frames[frame + TranslateTimeline.PREV_Y];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / TranslateTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TranslateTimeline.PREV_TIME] - frameTime));\n x += (frames[frame + TranslateTimeline.X] - x) * percent;\n y += (frames[frame + TranslateTimeline.Y] - y) * percent;\n }\n switch (blend) {\n case MixBlend.setup:\n bone.x = bone.data.x + x * alpha;\n bone.y = bone.data.y + y * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n bone.x += (bone.data.x + x - bone.x) * alpha;\n bone.y += (bone.data.y + y - bone.y) * alpha;\n break;\n case MixBlend.add:\n bone.x += x * alpha;\n bone.y += y * alpha;\n }\n };\n TranslateTimeline.ENTRIES = 3;\n TranslateTimeline.PREV_TIME = -3;\n TranslateTimeline.PREV_X = -2;\n TranslateTimeline.PREV_Y = -1;\n TranslateTimeline.X = 1;\n TranslateTimeline.Y = 2;\n return TranslateTimeline;\n }(CurveTimeline));\n spine.TranslateTimeline = TranslateTimeline;\n var ScaleTimeline = (function (_super) {\n __extends(ScaleTimeline, _super);\n function ScaleTimeline(frameCount) {\n return _super.call(this, frameCount) || this;\n }\n ScaleTimeline.prototype.getPropertyId = function () {\n return (TimelineType.scale << 24) + this.boneIndex;\n };\n ScaleTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var frames = this.frames;\n var bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n bone.scaleX = bone.data.scaleX;\n bone.scaleY = bone.data.scaleY;\n return;\n case MixBlend.first:\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\n }\n return;\n }\n var x = 0, y = 0;\n if (time >= frames[frames.length - ScaleTimeline.ENTRIES]) {\n x = frames[frames.length + ScaleTimeline.PREV_X] * bone.data.scaleX;\n y = frames[frames.length + ScaleTimeline.PREV_Y] * bone.data.scaleY;\n }\n else {\n var frame = Animation.binarySearch(frames, time, ScaleTimeline.ENTRIES);\n x = frames[frame + ScaleTimeline.PREV_X];\n y = frames[frame + ScaleTimeline.PREV_Y];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / ScaleTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ScaleTimeline.PREV_TIME] - frameTime));\n x = (x + (frames[frame + ScaleTimeline.X] - x) * percent) * bone.data.scaleX;\n y = (y + (frames[frame + ScaleTimeline.Y] - y) * percent) * bone.data.scaleY;\n }\n if (alpha == 1) {\n if (blend == MixBlend.add) {\n bone.scaleX += x - bone.data.scaleX;\n bone.scaleY += y - bone.data.scaleY;\n }\n else {\n bone.scaleX = x;\n bone.scaleY = y;\n }\n }\n else {\n var bx = 0, by = 0;\n if (direction == MixDirection.mixOut) {\n switch (blend) {\n case MixBlend.setup:\n bx = bone.data.scaleX;\n by = bone.data.scaleY;\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bx) * alpha;\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - by) * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n bx = bone.scaleX;\n by = bone.scaleY;\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bx) * alpha;\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - by) * alpha;\n break;\n case MixBlend.add:\n bx = bone.scaleX;\n by = bone.scaleY;\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bone.data.scaleX) * alpha;\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - bone.data.scaleY) * alpha;\n }\n }\n else {\n switch (blend) {\n case MixBlend.setup:\n bx = Math.abs(bone.data.scaleX) * spine.MathUtils.signum(x);\n by = Math.abs(bone.data.scaleY) * spine.MathUtils.signum(y);\n bone.scaleX = bx + (x - bx) * alpha;\n bone.scaleY = by + (y - by) * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n bx = Math.abs(bone.scaleX) * spine.MathUtils.signum(x);\n by = Math.abs(bone.scaleY) * spine.MathUtils.signum(y);\n bone.scaleX = bx + (x - bx) * alpha;\n bone.scaleY = by + (y - by) * alpha;\n break;\n case MixBlend.add:\n bx = spine.MathUtils.signum(x);\n by = spine.MathUtils.signum(y);\n bone.scaleX = Math.abs(bone.scaleX) * bx + (x - Math.abs(bone.data.scaleX) * bx) * alpha;\n bone.scaleY = Math.abs(bone.scaleY) * by + (y - Math.abs(bone.data.scaleY) * by) * alpha;\n }\n }\n }\n };\n return ScaleTimeline;\n }(TranslateTimeline));\n spine.ScaleTimeline = ScaleTimeline;\n var ShearTimeline = (function (_super) {\n __extends(ShearTimeline, _super);\n function ShearTimeline(frameCount) {\n return _super.call(this, frameCount) || this;\n }\n ShearTimeline.prototype.getPropertyId = function () {\n return (TimelineType.shear << 24) + this.boneIndex;\n };\n ShearTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var frames = this.frames;\n var bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n bone.shearX = bone.data.shearX;\n bone.shearY = bone.data.shearY;\n return;\n case MixBlend.first:\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\n }\n return;\n }\n var x = 0, y = 0;\n if (time >= frames[frames.length - ShearTimeline.ENTRIES]) {\n x = frames[frames.length + ShearTimeline.PREV_X];\n y = frames[frames.length + ShearTimeline.PREV_Y];\n }\n else {\n var frame = Animation.binarySearch(frames, time, ShearTimeline.ENTRIES);\n x = frames[frame + ShearTimeline.PREV_X];\n y = frames[frame + ShearTimeline.PREV_Y];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / ShearTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ShearTimeline.PREV_TIME] - frameTime));\n x = x + (frames[frame + ShearTimeline.X] - x) * percent;\n y = y + (frames[frame + ShearTimeline.Y] - y) * percent;\n }\n switch (blend) {\n case MixBlend.setup:\n bone.shearX = bone.data.shearX + x * alpha;\n bone.shearY = bone.data.shearY + y * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\n break;\n case MixBlend.add:\n bone.shearX += x * alpha;\n bone.shearY += y * alpha;\n }\n };\n return ShearTimeline;\n }(TranslateTimeline));\n spine.ShearTimeline = ShearTimeline;\n var ColorTimeline = (function (_super) {\n __extends(ColorTimeline, _super);\n function ColorTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES);\n return _this;\n }\n ColorTimeline.prototype.getPropertyId = function () {\n return (TimelineType.color << 24) + this.slotIndex;\n };\n ColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a) {\n frameIndex *= ColorTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + ColorTimeline.R] = r;\n this.frames[frameIndex + ColorTimeline.G] = g;\n this.frames[frameIndex + ColorTimeline.B] = b;\n this.frames[frameIndex + ColorTimeline.A] = a;\n };\n ColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n var frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n slot.color.setFromColor(slot.data.color);\n return;\n case MixBlend.first:\n var color = slot.color, setup = slot.data.color;\n color.add((setup.r - color.r) * alpha, (setup.g - color.g) * alpha, (setup.b - color.b) * alpha, (setup.a - color.a) * alpha);\n }\n return;\n }\n var r = 0, g = 0, b = 0, a = 0;\n if (time >= frames[frames.length - ColorTimeline.ENTRIES]) {\n var i = frames.length;\n r = frames[i + ColorTimeline.PREV_R];\n g = frames[i + ColorTimeline.PREV_G];\n b = frames[i + ColorTimeline.PREV_B];\n a = frames[i + ColorTimeline.PREV_A];\n }\n else {\n var frame = Animation.binarySearch(frames, time, ColorTimeline.ENTRIES);\n r = frames[frame + ColorTimeline.PREV_R];\n g = frames[frame + ColorTimeline.PREV_G];\n b = frames[frame + ColorTimeline.PREV_B];\n a = frames[frame + ColorTimeline.PREV_A];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / ColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ColorTimeline.PREV_TIME] - frameTime));\n r += (frames[frame + ColorTimeline.R] - r) * percent;\n g += (frames[frame + ColorTimeline.G] - g) * percent;\n b += (frames[frame + ColorTimeline.B] - b) * percent;\n a += (frames[frame + ColorTimeline.A] - a) * percent;\n }\n if (alpha == 1)\n slot.color.set(r, g, b, a);\n else {\n var color = slot.color;\n if (blend == MixBlend.setup)\n color.setFromColor(slot.data.color);\n color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);\n }\n };\n ColorTimeline.ENTRIES = 5;\n ColorTimeline.PREV_TIME = -5;\n ColorTimeline.PREV_R = -4;\n ColorTimeline.PREV_G = -3;\n ColorTimeline.PREV_B = -2;\n ColorTimeline.PREV_A = -1;\n ColorTimeline.R = 1;\n ColorTimeline.G = 2;\n ColorTimeline.B = 3;\n ColorTimeline.A = 4;\n return ColorTimeline;\n }(CurveTimeline));\n spine.ColorTimeline = ColorTimeline;\n var TwoColorTimeline = (function (_super) {\n __extends(TwoColorTimeline, _super);\n function TwoColorTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * TwoColorTimeline.ENTRIES);\n return _this;\n }\n TwoColorTimeline.prototype.getPropertyId = function () {\n return (TimelineType.twoColor << 24) + this.slotIndex;\n };\n TwoColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a, r2, g2, b2) {\n frameIndex *= TwoColorTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + TwoColorTimeline.R] = r;\n this.frames[frameIndex + TwoColorTimeline.G] = g;\n this.frames[frameIndex + TwoColorTimeline.B] = b;\n this.frames[frameIndex + TwoColorTimeline.A] = a;\n this.frames[frameIndex + TwoColorTimeline.R2] = r2;\n this.frames[frameIndex + TwoColorTimeline.G2] = g2;\n this.frames[frameIndex + TwoColorTimeline.B2] = b2;\n };\n TwoColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n var frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n slot.color.setFromColor(slot.data.color);\n slot.darkColor.setFromColor(slot.data.darkColor);\n return;\n case MixBlend.first:\n var light = slot.color, dark = slot.darkColor, setupLight = slot.data.color, setupDark = slot.data.darkColor;\n light.add((setupLight.r - light.r) * alpha, (setupLight.g - light.g) * alpha, (setupLight.b - light.b) * alpha, (setupLight.a - light.a) * alpha);\n dark.add((setupDark.r - dark.r) * alpha, (setupDark.g - dark.g) * alpha, (setupDark.b - dark.b) * alpha, 0);\n }\n return;\n }\n var r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\n if (time >= frames[frames.length - TwoColorTimeline.ENTRIES]) {\n var i = frames.length;\n r = frames[i + TwoColorTimeline.PREV_R];\n g = frames[i + TwoColorTimeline.PREV_G];\n b = frames[i + TwoColorTimeline.PREV_B];\n a = frames[i + TwoColorTimeline.PREV_A];\n r2 = frames[i + TwoColorTimeline.PREV_R2];\n g2 = frames[i + TwoColorTimeline.PREV_G2];\n b2 = frames[i + TwoColorTimeline.PREV_B2];\n }\n else {\n var frame = Animation.binarySearch(frames, time, TwoColorTimeline.ENTRIES);\n r = frames[frame + TwoColorTimeline.PREV_R];\n g = frames[frame + TwoColorTimeline.PREV_G];\n b = frames[frame + TwoColorTimeline.PREV_B];\n a = frames[frame + TwoColorTimeline.PREV_A];\n r2 = frames[frame + TwoColorTimeline.PREV_R2];\n g2 = frames[frame + TwoColorTimeline.PREV_G2];\n b2 = frames[frame + TwoColorTimeline.PREV_B2];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / TwoColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TwoColorTimeline.PREV_TIME] - frameTime));\n r += (frames[frame + TwoColorTimeline.R] - r) * percent;\n g += (frames[frame + TwoColorTimeline.G] - g) * percent;\n b += (frames[frame + TwoColorTimeline.B] - b) * percent;\n a += (frames[frame + TwoColorTimeline.A] - a) * percent;\n r2 += (frames[frame + TwoColorTimeline.R2] - r2) * percent;\n g2 += (frames[frame + TwoColorTimeline.G2] - g2) * percent;\n b2 += (frames[frame + TwoColorTimeline.B2] - b2) * percent;\n }\n if (alpha == 1) {\n slot.color.set(r, g, b, a);\n slot.darkColor.set(r2, g2, b2, 1);\n }\n else {\n var light = slot.color, dark = slot.darkColor;\n if (blend == MixBlend.setup) {\n light.setFromColor(slot.data.color);\n dark.setFromColor(slot.data.darkColor);\n }\n light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\n dark.add((r2 - dark.r) * alpha, (g2 - dark.g) * alpha, (b2 - dark.b) * alpha, 0);\n }\n };\n TwoColorTimeline.ENTRIES = 8;\n TwoColorTimeline.PREV_TIME = -8;\n TwoColorTimeline.PREV_R = -7;\n TwoColorTimeline.PREV_G = -6;\n TwoColorTimeline.PREV_B = -5;\n TwoColorTimeline.PREV_A = -4;\n TwoColorTimeline.PREV_R2 = -3;\n TwoColorTimeline.PREV_G2 = -2;\n TwoColorTimeline.PREV_B2 = -1;\n TwoColorTimeline.R = 1;\n TwoColorTimeline.G = 2;\n TwoColorTimeline.B = 3;\n TwoColorTimeline.A = 4;\n TwoColorTimeline.R2 = 5;\n TwoColorTimeline.G2 = 6;\n TwoColorTimeline.B2 = 7;\n return TwoColorTimeline;\n }(CurveTimeline));\n spine.TwoColorTimeline = TwoColorTimeline;\n var AttachmentTimeline = (function () {\n function AttachmentTimeline(frameCount) {\n this.frames = spine.Utils.newFloatArray(frameCount);\n this.attachmentNames = new Array(frameCount);\n }\n AttachmentTimeline.prototype.getPropertyId = function () {\n return (TimelineType.attachment << 24) + this.slotIndex;\n };\n AttachmentTimeline.prototype.getFrameCount = function () {\n return this.frames.length;\n };\n AttachmentTimeline.prototype.setFrame = function (frameIndex, time, attachmentName) {\n this.frames[frameIndex] = time;\n this.attachmentNames[frameIndex] = attachmentName;\n };\n AttachmentTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n if (direction == MixDirection.mixOut) {\n if (blend == MixBlend.setup)\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\n return;\n }\n var frames = this.frames;\n if (time < frames[0]) {\n if (blend == MixBlend.setup || blend == MixBlend.first)\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\n return;\n }\n var frameIndex = 0;\n if (time >= frames[frames.length - 1])\n frameIndex = frames.length - 1;\n else\n frameIndex = Animation.binarySearch(frames, time, 1) - 1;\n var attachmentName = this.attachmentNames[frameIndex];\n skeleton.slots[this.slotIndex]\n .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\n };\n AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) {\n slot.attachment = attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName);\n };\n return AttachmentTimeline;\n }());\n spine.AttachmentTimeline = AttachmentTimeline;\n var zeros = null;\n var DeformTimeline = (function (_super) {\n __extends(DeformTimeline, _super);\n function DeformTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount);\n _this.frameVertices = new Array(frameCount);\n if (zeros == null)\n zeros = spine.Utils.newFloatArray(64);\n return _this;\n }\n DeformTimeline.prototype.getPropertyId = function () {\n return (TimelineType.deform << 27) + +this.attachment.id + this.slotIndex;\n };\n DeformTimeline.prototype.setFrame = function (frameIndex, time, vertices) {\n this.frames[frameIndex] = time;\n this.frameVertices[frameIndex] = vertices;\n };\n DeformTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n var slotAttachment = slot.getAttachment();\n if (!(slotAttachment instanceof spine.VertexAttachment) || !(slotAttachment.deformAttachment == this.attachment))\n return;\n var deformArray = slot.deform;\n if (deformArray.length == 0)\n blend = MixBlend.setup;\n var frameVertices = this.frameVertices;\n var vertexCount = frameVertices[0].length;\n var frames = this.frames;\n if (time < frames[0]) {\n var vertexAttachment = slotAttachment;\n switch (blend) {\n case MixBlend.setup:\n deformArray.length = 0;\n return;\n case MixBlend.first:\n if (alpha == 1) {\n deformArray.length = 0;\n break;\n }\n var deform_1 = spine.Utils.setArraySize(deformArray, vertexCount);\n if (vertexAttachment.bones == null) {\n var setupVertices = vertexAttachment.vertices;\n for (var i = 0; i < vertexCount; i++)\n deform_1[i] += (setupVertices[i] - deform_1[i]) * alpha;\n }\n else {\n alpha = 1 - alpha;\n for (var i = 0; i < vertexCount; i++)\n deform_1[i] *= alpha;\n }\n }\n return;\n }\n var deform = spine.Utils.setArraySize(deformArray, vertexCount);\n if (time >= frames[frames.length - 1]) {\n var lastVertices = frameVertices[frames.length - 1];\n if (alpha == 1) {\n if (blend == MixBlend.add) {\n var vertexAttachment = slotAttachment;\n if (vertexAttachment.bones == null) {\n var setupVertices = vertexAttachment.vertices;\n for (var i_1 = 0; i_1 < vertexCount; i_1++) {\n deform[i_1] += lastVertices[i_1] - setupVertices[i_1];\n }\n }\n else {\n for (var i_2 = 0; i_2 < vertexCount; i_2++)\n deform[i_2] += lastVertices[i_2];\n }\n }\n else {\n spine.Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\n }\n }\n else {\n switch (blend) {\n case MixBlend.setup: {\n var vertexAttachment_1 = slotAttachment;\n if (vertexAttachment_1.bones == null) {\n var setupVertices = vertexAttachment_1.vertices;\n for (var i_3 = 0; i_3 < vertexCount; i_3++) {\n var setup = setupVertices[i_3];\n deform[i_3] = setup + (lastVertices[i_3] - setup) * alpha;\n }\n }\n else {\n for (var i_4 = 0; i_4 < vertexCount; i_4++)\n deform[i_4] = lastVertices[i_4] * alpha;\n }\n break;\n }\n case MixBlend.first:\n case MixBlend.replace:\n for (var i_5 = 0; i_5 < vertexCount; i_5++)\n deform[i_5] += (lastVertices[i_5] - deform[i_5]) * alpha;\n break;\n case MixBlend.add:\n var vertexAttachment = slotAttachment;\n if (vertexAttachment.bones == null) {\n var setupVertices = vertexAttachment.vertices;\n for (var i_6 = 0; i_6 < vertexCount; i_6++) {\n deform[i_6] += (lastVertices[i_6] - setupVertices[i_6]) * alpha;\n }\n }\n else {\n for (var i_7 = 0; i_7 < vertexCount; i_7++)\n deform[i_7] += lastVertices[i_7] * alpha;\n }\n }\n }\n return;\n }\n var frame = Animation.binarySearch(frames, time);\n var prevVertices = frameVertices[frame - 1];\n var nextVertices = frameVertices[frame];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame - 1, 1 - (time - frameTime) / (frames[frame - 1] - frameTime));\n if (alpha == 1) {\n if (blend == MixBlend.add) {\n var vertexAttachment = slotAttachment;\n if (vertexAttachment.bones == null) {\n var setupVertices = vertexAttachment.vertices;\n for (var i_8 = 0; i_8 < vertexCount; i_8++) {\n var prev = prevVertices[i_8];\n deform[i_8] += prev + (nextVertices[i_8] - prev) * percent - setupVertices[i_8];\n }\n }\n else {\n for (var i_9 = 0; i_9 < vertexCount; i_9++) {\n var prev = prevVertices[i_9];\n deform[i_9] += prev + (nextVertices[i_9] - prev) * percent;\n }\n }\n }\n else {\n for (var i_10 = 0; i_10 < vertexCount; i_10++) {\n var prev = prevVertices[i_10];\n deform[i_10] = prev + (nextVertices[i_10] - prev) * percent;\n }\n }\n }\n else {\n switch (blend) {\n case MixBlend.setup: {\n var vertexAttachment_2 = slotAttachment;\n if (vertexAttachment_2.bones == null) {\n var setupVertices = vertexAttachment_2.vertices;\n for (var i_11 = 0; i_11 < vertexCount; i_11++) {\n var prev = prevVertices[i_11], setup = setupVertices[i_11];\n deform[i_11] = setup + (prev + (nextVertices[i_11] - prev) * percent - setup) * alpha;\n }\n }\n else {\n for (var i_12 = 0; i_12 < vertexCount; i_12++) {\n var prev = prevVertices[i_12];\n deform[i_12] = (prev + (nextVertices[i_12] - prev) * percent) * alpha;\n }\n }\n break;\n }\n case MixBlend.first:\n case MixBlend.replace:\n for (var i_13 = 0; i_13 < vertexCount; i_13++) {\n var prev = prevVertices[i_13];\n deform[i_13] += (prev + (nextVertices[i_13] - prev) * percent - deform[i_13]) * alpha;\n }\n break;\n case MixBlend.add:\n var vertexAttachment = slotAttachment;\n if (vertexAttachment.bones == null) {\n var setupVertices = vertexAttachment.vertices;\n for (var i_14 = 0; i_14 < vertexCount; i_14++) {\n var prev = prevVertices[i_14];\n deform[i_14] += (prev + (nextVertices[i_14] - prev) * percent - setupVertices[i_14]) * alpha;\n }\n }\n else {\n for (var i_15 = 0; i_15 < vertexCount; i_15++) {\n var prev = prevVertices[i_15];\n deform[i_15] += (prev + (nextVertices[i_15] - prev) * percent) * alpha;\n }\n }\n }\n }\n };\n return DeformTimeline;\n }(CurveTimeline));\n spine.DeformTimeline = DeformTimeline;\n var EventTimeline = (function () {\n function EventTimeline(frameCount) {\n this.frames = spine.Utils.newFloatArray(frameCount);\n this.events = new Array(frameCount);\n }\n EventTimeline.prototype.getPropertyId = function () {\n return TimelineType.event << 24;\n };\n EventTimeline.prototype.getFrameCount = function () {\n return this.frames.length;\n };\n EventTimeline.prototype.setFrame = function (frameIndex, event) {\n this.frames[frameIndex] = event.time;\n this.events[frameIndex] = event;\n };\n EventTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n if (firedEvents == null)\n return;\n var frames = this.frames;\n var frameCount = this.frames.length;\n if (lastTime > time) {\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\n lastTime = -1;\n }\n else if (lastTime >= frames[frameCount - 1])\n return;\n if (time < frames[0])\n return;\n var frame = 0;\n if (lastTime < frames[0])\n frame = 0;\n else {\n frame = Animation.binarySearch(frames, lastTime);\n var frameTime = frames[frame];\n while (frame > 0) {\n if (frames[frame - 1] != frameTime)\n break;\n frame--;\n }\n }\n for (; frame < frameCount && time >= frames[frame]; frame++)\n firedEvents.push(this.events[frame]);\n };\n return EventTimeline;\n }());\n spine.EventTimeline = EventTimeline;\n var DrawOrderTimeline = (function () {\n function DrawOrderTimeline(frameCount) {\n this.frames = spine.Utils.newFloatArray(frameCount);\n this.drawOrders = new Array(frameCount);\n }\n DrawOrderTimeline.prototype.getPropertyId = function () {\n return TimelineType.drawOrder << 24;\n };\n DrawOrderTimeline.prototype.getFrameCount = function () {\n return this.frames.length;\n };\n DrawOrderTimeline.prototype.setFrame = function (frameIndex, time, drawOrder) {\n this.frames[frameIndex] = time;\n this.drawOrders[frameIndex] = drawOrder;\n };\n DrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var drawOrder = skeleton.drawOrder;\n var slots = skeleton.slots;\n if (direction == MixDirection.mixOut) {\n if (blend == MixBlend.setup)\n spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n return;\n }\n var frames = this.frames;\n if (time < frames[0]) {\n if (blend == MixBlend.setup || blend == MixBlend.first)\n spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n return;\n }\n var frame = 0;\n if (time >= frames[frames.length - 1])\n frame = frames.length - 1;\n else\n frame = Animation.binarySearch(frames, time) - 1;\n var drawOrderToSetupIndex = this.drawOrders[frame];\n if (drawOrderToSetupIndex == null)\n spine.Utils.arrayCopy(slots, 0, drawOrder, 0, slots.length);\n else {\n for (var i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\n }\n };\n return DrawOrderTimeline;\n }());\n spine.DrawOrderTimeline = DrawOrderTimeline;\n var IkConstraintTimeline = (function (_super) {\n __extends(IkConstraintTimeline, _super);\n function IkConstraintTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES);\n return _this;\n }\n IkConstraintTimeline.prototype.getPropertyId = function () {\n return (TimelineType.ikConstraint << 24) + this.ikConstraintIndex;\n };\n IkConstraintTimeline.prototype.setFrame = function (frameIndex, time, mix, softness, bendDirection, compress, stretch) {\n frameIndex *= IkConstraintTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + IkConstraintTimeline.MIX] = mix;\n this.frames[frameIndex + IkConstraintTimeline.SOFTNESS] = softness;\n this.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection;\n this.frames[frameIndex + IkConstraintTimeline.COMPRESS] = compress ? 1 : 0;\n this.frames[frameIndex + IkConstraintTimeline.STRETCH] = stretch ? 1 : 0;\n };\n IkConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var frames = this.frames;\n var constraint = skeleton.ikConstraints[this.ikConstraintIndex];\n if (!constraint.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n constraint.mix = constraint.data.mix;\n constraint.softness = constraint.data.softness;\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n return;\n case MixBlend.first:\n constraint.mix += (constraint.data.mix - constraint.mix) * alpha;\n constraint.softness += (constraint.data.softness - constraint.softness) * alpha;\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n }\n return;\n }\n if (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) {\n if (blend == MixBlend.setup) {\n constraint.mix = constraint.data.mix + (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.data.mix) * alpha;\n constraint.softness = constraint.data.softness\n + (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.data.softness) * alpha;\n if (direction == MixDirection.mixOut) {\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n }\n else {\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\n }\n }\n else {\n constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha;\n constraint.softness += (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.softness) * alpha;\n if (direction == MixDirection.mixIn) {\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\n }\n }\n return;\n }\n var frame = Animation.binarySearch(frames, time, IkConstraintTimeline.ENTRIES);\n var mix = frames[frame + IkConstraintTimeline.PREV_MIX];\n var softness = frames[frame + IkConstraintTimeline.PREV_SOFTNESS];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime));\n if (blend == MixBlend.setup) {\n constraint.mix = constraint.data.mix + (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.data.mix) * alpha;\n constraint.softness = constraint.data.softness\n + (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.data.softness) * alpha;\n if (direction == MixDirection.mixOut) {\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n }\n else {\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\n }\n }\n else {\n constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha;\n constraint.softness += (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.softness) * alpha;\n if (direction == MixDirection.mixIn) {\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\n }\n }\n };\n IkConstraintTimeline.ENTRIES = 6;\n IkConstraintTimeline.PREV_TIME = -6;\n IkConstraintTimeline.PREV_MIX = -5;\n IkConstraintTimeline.PREV_SOFTNESS = -4;\n IkConstraintTimeline.PREV_BEND_DIRECTION = -3;\n IkConstraintTimeline.PREV_COMPRESS = -2;\n IkConstraintTimeline.PREV_STRETCH = -1;\n IkConstraintTimeline.MIX = 1;\n IkConstraintTimeline.SOFTNESS = 2;\n IkConstraintTimeline.BEND_DIRECTION = 3;\n IkConstraintTimeline.COMPRESS = 4;\n IkConstraintTimeline.STRETCH = 5;\n return IkConstraintTimeline;\n }(CurveTimeline));\n spine.IkConstraintTimeline = IkConstraintTimeline;\n var TransformConstraintTimeline = (function (_super) {\n __extends(TransformConstraintTimeline, _super);\n function TransformConstraintTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES);\n return _this;\n }\n TransformConstraintTimeline.prototype.getPropertyId = function () {\n return (TimelineType.transformConstraint << 24) + this.transformConstraintIndex;\n };\n TransformConstraintTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix, scaleMix, shearMix) {\n frameIndex *= TransformConstraintTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + TransformConstraintTimeline.ROTATE] = rotateMix;\n this.frames[frameIndex + TransformConstraintTimeline.TRANSLATE] = translateMix;\n this.frames[frameIndex + TransformConstraintTimeline.SCALE] = scaleMix;\n this.frames[frameIndex + TransformConstraintTimeline.SHEAR] = shearMix;\n };\n TransformConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var frames = this.frames;\n var constraint = skeleton.transformConstraints[this.transformConstraintIndex];\n if (!constraint.active)\n return;\n if (time < frames[0]) {\n var data = constraint.data;\n switch (blend) {\n case MixBlend.setup:\n constraint.rotateMix = data.rotateMix;\n constraint.translateMix = data.translateMix;\n constraint.scaleMix = data.scaleMix;\n constraint.shearMix = data.shearMix;\n return;\n case MixBlend.first:\n constraint.rotateMix += (data.rotateMix - constraint.rotateMix) * alpha;\n constraint.translateMix += (data.translateMix - constraint.translateMix) * alpha;\n constraint.scaleMix += (data.scaleMix - constraint.scaleMix) * alpha;\n constraint.shearMix += (data.shearMix - constraint.shearMix) * alpha;\n }\n return;\n }\n var rotate = 0, translate = 0, scale = 0, shear = 0;\n if (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) {\n var i = frames.length;\n rotate = frames[i + TransformConstraintTimeline.PREV_ROTATE];\n translate = frames[i + TransformConstraintTimeline.PREV_TRANSLATE];\n scale = frames[i + TransformConstraintTimeline.PREV_SCALE];\n shear = frames[i + TransformConstraintTimeline.PREV_SHEAR];\n }\n else {\n var frame = Animation.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES);\n rotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE];\n translate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE];\n scale = frames[frame + TransformConstraintTimeline.PREV_SCALE];\n shear = frames[frame + TransformConstraintTimeline.PREV_SHEAR];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime));\n rotate += (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent;\n translate += (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent;\n scale += (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent;\n shear += (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent;\n }\n if (blend == MixBlend.setup) {\n var data = constraint.data;\n constraint.rotateMix = data.rotateMix + (rotate - data.rotateMix) * alpha;\n constraint.translateMix = data.translateMix + (translate - data.translateMix) * alpha;\n constraint.scaleMix = data.scaleMix + (scale - data.scaleMix) * alpha;\n constraint.shearMix = data.shearMix + (shear - data.shearMix) * alpha;\n }\n else {\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\n constraint.scaleMix += (scale - constraint.scaleMix) * alpha;\n constraint.shearMix += (shear - constraint.shearMix) * alpha;\n }\n };\n TransformConstraintTimeline.ENTRIES = 5;\n TransformConstraintTimeline.PREV_TIME = -5;\n TransformConstraintTimeline.PREV_ROTATE = -4;\n TransformConstraintTimeline.PREV_TRANSLATE = -3;\n TransformConstraintTimeline.PREV_SCALE = -2;\n TransformConstraintTimeline.PREV_SHEAR = -1;\n TransformConstraintTimeline.ROTATE = 1;\n TransformConstraintTimeline.TRANSLATE = 2;\n TransformConstraintTimeline.SCALE = 3;\n TransformConstraintTimeline.SHEAR = 4;\n return TransformConstraintTimeline;\n }(CurveTimeline));\n spine.TransformConstraintTimeline = TransformConstraintTimeline;\n var PathConstraintPositionTimeline = (function (_super) {\n __extends(PathConstraintPositionTimeline, _super);\n function PathConstraintPositionTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES);\n return _this;\n }\n PathConstraintPositionTimeline.prototype.getPropertyId = function () {\n return (TimelineType.pathConstraintPosition << 24) + this.pathConstraintIndex;\n };\n PathConstraintPositionTimeline.prototype.setFrame = function (frameIndex, time, value) {\n frameIndex *= PathConstraintPositionTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + PathConstraintPositionTimeline.VALUE] = value;\n };\n PathConstraintPositionTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var frames = this.frames;\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n constraint.position = constraint.data.position;\n return;\n case MixBlend.first:\n constraint.position += (constraint.data.position - constraint.position) * alpha;\n }\n return;\n }\n var position = 0;\n if (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES])\n position = frames[frames.length + PathConstraintPositionTimeline.PREV_VALUE];\n else {\n var frame = Animation.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES);\n position = frames[frame + PathConstraintPositionTimeline.PREV_VALUE];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / PathConstraintPositionTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintPositionTimeline.PREV_TIME] - frameTime));\n position += (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent;\n }\n if (blend == MixBlend.setup)\n constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\n else\n constraint.position += (position - constraint.position) * alpha;\n };\n PathConstraintPositionTimeline.ENTRIES = 2;\n PathConstraintPositionTimeline.PREV_TIME = -2;\n PathConstraintPositionTimeline.PREV_VALUE = -1;\n PathConstraintPositionTimeline.VALUE = 1;\n return PathConstraintPositionTimeline;\n }(CurveTimeline));\n spine.PathConstraintPositionTimeline = PathConstraintPositionTimeline;\n var PathConstraintSpacingTimeline = (function (_super) {\n __extends(PathConstraintSpacingTimeline, _super);\n function PathConstraintSpacingTimeline(frameCount) {\n return _super.call(this, frameCount) || this;\n }\n PathConstraintSpacingTimeline.prototype.getPropertyId = function () {\n return (TimelineType.pathConstraintSpacing << 24) + this.pathConstraintIndex;\n };\n PathConstraintSpacingTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var frames = this.frames;\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n constraint.spacing = constraint.data.spacing;\n return;\n case MixBlend.first:\n constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\n }\n return;\n }\n var spacing = 0;\n if (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES])\n spacing = frames[frames.length + PathConstraintSpacingTimeline.PREV_VALUE];\n else {\n var frame = Animation.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES);\n spacing = frames[frame + PathConstraintSpacingTimeline.PREV_VALUE];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / PathConstraintSpacingTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintSpacingTimeline.PREV_TIME] - frameTime));\n spacing += (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent;\n }\n if (blend == MixBlend.setup)\n constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\n else\n constraint.spacing += (spacing - constraint.spacing) * alpha;\n };\n return PathConstraintSpacingTimeline;\n }(PathConstraintPositionTimeline));\n spine.PathConstraintSpacingTimeline = PathConstraintSpacingTimeline;\n var PathConstraintMixTimeline = (function (_super) {\n __extends(PathConstraintMixTimeline, _super);\n function PathConstraintMixTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES);\n return _this;\n }\n PathConstraintMixTimeline.prototype.getPropertyId = function () {\n return (TimelineType.pathConstraintMix << 24) + this.pathConstraintIndex;\n };\n PathConstraintMixTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix) {\n frameIndex *= PathConstraintMixTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + PathConstraintMixTimeline.ROTATE] = rotateMix;\n this.frames[frameIndex + PathConstraintMixTimeline.TRANSLATE] = translateMix;\n };\n PathConstraintMixTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var frames = this.frames;\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n constraint.rotateMix = constraint.data.rotateMix;\n constraint.translateMix = constraint.data.translateMix;\n return;\n case MixBlend.first:\n constraint.rotateMix += (constraint.data.rotateMix - constraint.rotateMix) * alpha;\n constraint.translateMix += (constraint.data.translateMix - constraint.translateMix) * alpha;\n }\n return;\n }\n var rotate = 0, translate = 0;\n if (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) {\n rotate = frames[frames.length + PathConstraintMixTimeline.PREV_ROTATE];\n translate = frames[frames.length + PathConstraintMixTimeline.PREV_TRANSLATE];\n }\n else {\n var frame = Animation.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES);\n rotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE];\n translate = frames[frame + PathConstraintMixTimeline.PREV_TRANSLATE];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / PathConstraintMixTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintMixTimeline.PREV_TIME] - frameTime));\n rotate += (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent;\n translate += (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent;\n }\n if (blend == MixBlend.setup) {\n constraint.rotateMix = constraint.data.rotateMix + (rotate - constraint.data.rotateMix) * alpha;\n constraint.translateMix = constraint.data.translateMix + (translate - constraint.data.translateMix) * alpha;\n }\n else {\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\n }\n };\n PathConstraintMixTimeline.ENTRIES = 3;\n PathConstraintMixTimeline.PREV_TIME = -3;\n PathConstraintMixTimeline.PREV_ROTATE = -2;\n PathConstraintMixTimeline.PREV_TRANSLATE = -1;\n PathConstraintMixTimeline.ROTATE = 1;\n PathConstraintMixTimeline.TRANSLATE = 2;\n return PathConstraintMixTimeline;\n }(CurveTimeline));\n spine.PathConstraintMixTimeline = PathConstraintMixTimeline;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var AnimationState = (function () {\n function AnimationState(data) {\n this.tracks = new Array();\n this.timeScale = 1;\n this.unkeyedState = 0;\n this.events = new Array();\n this.listeners = new Array();\n this.queue = new EventQueue(this);\n this.propertyIDs = new spine.IntSet();\n this.animationsChanged = false;\n this.trackEntryPool = new spine.Pool(function () { return new TrackEntry(); });\n this.data = data;\n }\n AnimationState.prototype.update = function (delta) {\n delta *= this.timeScale;\n var tracks = this.tracks;\n for (var i = 0, n = tracks.length; i < n; i++) {\n var current = tracks[i];\n if (current == null)\n continue;\n current.animationLast = current.nextAnimationLast;\n current.trackLast = current.nextTrackLast;\n var currentDelta = delta * current.timeScale;\n if (current.delay > 0) {\n current.delay -= currentDelta;\n if (current.delay > 0)\n continue;\n currentDelta = -current.delay;\n current.delay = 0;\n }\n var next = current.next;\n if (next != null) {\n var nextTime = current.trackLast - next.delay;\n if (nextTime >= 0) {\n next.delay = 0;\n next.trackTime += current.timeScale == 0 ? 0 : (nextTime / current.timeScale + delta) * next.timeScale;\n current.trackTime += currentDelta;\n this.setCurrent(i, next, true);\n while (next.mixingFrom != null) {\n next.mixTime += delta;\n next = next.mixingFrom;\n }\n continue;\n }\n }\n else if (current.trackLast >= current.trackEnd && current.mixingFrom == null) {\n tracks[i] = null;\n this.queue.end(current);\n this.disposeNext(current);\n continue;\n }\n if (current.mixingFrom != null && this.updateMixingFrom(current, delta)) {\n var from = current.mixingFrom;\n current.mixingFrom = null;\n if (from != null)\n from.mixingTo = null;\n while (from != null) {\n this.queue.end(from);\n from = from.mixingFrom;\n }\n }\n current.trackTime += currentDelta;\n }\n this.queue.drain();\n };\n AnimationState.prototype.updateMixingFrom = function (to, delta) {\n var from = to.mixingFrom;\n if (from == null)\n return true;\n var finished = this.updateMixingFrom(from, delta);\n from.animationLast = from.nextAnimationLast;\n from.trackLast = from.nextTrackLast;\n if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {\n if (from.totalAlpha == 0 || to.mixDuration == 0) {\n to.mixingFrom = from.mixingFrom;\n if (from.mixingFrom != null)\n from.mixingFrom.mixingTo = to;\n to.interruptAlpha = from.interruptAlpha;\n this.queue.end(from);\n }\n return finished;\n }\n from.trackTime += delta * from.timeScale;\n to.mixTime += delta;\n return false;\n };\n AnimationState.prototype.apply = function (skeleton) {\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n if (this.animationsChanged)\n this._animationsChanged();\n var events = this.events;\n var tracks = this.tracks;\n var applied = false;\n for (var i_16 = 0, n_1 = tracks.length; i_16 < n_1; i_16++) {\n var current = tracks[i_16];\n if (current == null || current.delay > 0)\n continue;\n applied = true;\n var blend = i_16 == 0 ? spine.MixBlend.first : current.mixBlend;\n var mix = current.alpha;\n if (current.mixingFrom != null)\n mix *= this.applyMixingFrom(current, skeleton, blend);\n else if (current.trackTime >= current.trackEnd && current.next == null)\n mix = 0;\n var animationLast = current.animationLast, animationTime = current.getAnimationTime();\n var timelineCount = current.animation.timelines.length;\n var timelines = current.animation.timelines;\n if ((i_16 == 0 && mix == 1) || blend == spine.MixBlend.add) {\n for (var ii = 0; ii < timelineCount; ii++) {\n spine.Utils.webkit602BugfixHelper(mix, blend);\n var timeline = timelines[ii];\n if (timeline instanceof spine.AttachmentTimeline)\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, blend, true);\n else\n timeline.apply(skeleton, animationLast, animationTime, events, mix, blend, spine.MixDirection.mixIn);\n }\n }\n else {\n var timelineMode = current.timelineMode;\n var firstFrame = current.timelinesRotation.length == 0;\n if (firstFrame)\n spine.Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null);\n var timelinesRotation = current.timelinesRotation;\n for (var ii = 0; ii < timelineCount; ii++) {\n var timeline_1 = timelines[ii];\n var timelineBlend = timelineMode[ii] == AnimationState.SUBSEQUENT ? blend : spine.MixBlend.setup;\n if (timeline_1 instanceof spine.RotateTimeline) {\n this.applyRotateTimeline(timeline_1, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame);\n }\n else if (timeline_1 instanceof spine.AttachmentTimeline) {\n this.applyAttachmentTimeline(timeline_1, skeleton, animationTime, blend, true);\n }\n else {\n spine.Utils.webkit602BugfixHelper(mix, blend);\n timeline_1.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, spine.MixDirection.mixIn);\n }\n }\n }\n this.queueEvents(current, animationTime);\n events.length = 0;\n current.nextAnimationLast = animationTime;\n current.nextTrackLast = current.trackTime;\n }\n var setupState = this.unkeyedState + AnimationState.SETUP;\n var slots = skeleton.slots;\n for (var i = 0, n = skeleton.slots.length; i < n; i++) {\n var slot = slots[i];\n if (slot.attachmentState == setupState) {\n var attachmentName = slot.data.attachmentName;\n slot.attachment = (attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));\n }\n }\n this.unkeyedState += 2;\n this.queue.drain();\n return applied;\n };\n AnimationState.prototype.applyMixingFrom = function (to, skeleton, blend) {\n var from = to.mixingFrom;\n if (from.mixingFrom != null)\n this.applyMixingFrom(from, skeleton, blend);\n var mix = 0;\n if (to.mixDuration == 0) {\n mix = 1;\n if (blend == spine.MixBlend.first)\n blend = spine.MixBlend.setup;\n }\n else {\n mix = to.mixTime / to.mixDuration;\n if (mix > 1)\n mix = 1;\n if (blend != spine.MixBlend.first)\n blend = from.mixBlend;\n }\n var events = mix < from.eventThreshold ? this.events : null;\n var attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\n var animationLast = from.animationLast, animationTime = from.getAnimationTime();\n var timelineCount = from.animation.timelines.length;\n var timelines = from.animation.timelines;\n var alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\n if (blend == spine.MixBlend.add) {\n for (var i = 0; i < timelineCount; i++)\n timelines[i].apply(skeleton, animationLast, animationTime, events, alphaMix, blend, spine.MixDirection.mixOut);\n }\n else {\n var timelineMode = from.timelineMode;\n var timelineHoldMix = from.timelineHoldMix;\n var firstFrame = from.timelinesRotation.length == 0;\n if (firstFrame)\n spine.Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null);\n var timelinesRotation = from.timelinesRotation;\n from.totalAlpha = 0;\n for (var i = 0; i < timelineCount; i++) {\n var timeline = timelines[i];\n var direction = spine.MixDirection.mixOut;\n var timelineBlend = void 0;\n var alpha = 0;\n switch (timelineMode[i]) {\n case AnimationState.SUBSEQUENT:\n if (!drawOrder && timeline instanceof spine.DrawOrderTimeline)\n continue;\n timelineBlend = blend;\n alpha = alphaMix;\n break;\n case AnimationState.FIRST:\n timelineBlend = spine.MixBlend.setup;\n alpha = alphaMix;\n break;\n case AnimationState.HOLD_SUBSEQUENT:\n timelineBlend = blend;\n alpha = alphaHold;\n break;\n case AnimationState.HOLD_FIRST:\n timelineBlend = spine.MixBlend.setup;\n alpha = alphaHold;\n break;\n default:\n timelineBlend = spine.MixBlend.setup;\n var holdMix = timelineHoldMix[i];\n alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\n break;\n }\n from.totalAlpha += alpha;\n if (timeline instanceof spine.RotateTimeline)\n this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame);\n else if (timeline instanceof spine.AttachmentTimeline)\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, timelineBlend, attachments);\n else {\n spine.Utils.webkit602BugfixHelper(alpha, blend);\n if (drawOrder && timeline instanceof spine.DrawOrderTimeline && timelineBlend == spine.MixBlend.setup)\n direction = spine.MixDirection.mixIn;\n timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, direction);\n }\n }\n }\n if (to.mixDuration > 0)\n this.queueEvents(from, animationTime);\n this.events.length = 0;\n from.nextAnimationLast = animationTime;\n from.nextTrackLast = from.trackTime;\n return mix;\n };\n AnimationState.prototype.applyAttachmentTimeline = function (timeline, skeleton, time, blend, attachments) {\n var slot = skeleton.slots[timeline.slotIndex];\n if (!slot.bone.active)\n return;\n var frames = timeline.frames;\n if (time < frames[0]) {\n if (blend == spine.MixBlend.setup || blend == spine.MixBlend.first)\n this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments);\n }\n else {\n var frameIndex;\n if (time >= frames[frames.length - 1])\n frameIndex = frames.length - 1;\n else\n frameIndex = spine.Animation.binarySearch(frames, time) - 1;\n this.setAttachment(skeleton, slot, timeline.attachmentNames[frameIndex], attachments);\n }\n if (slot.attachmentState <= this.unkeyedState)\n slot.attachmentState = this.unkeyedState + AnimationState.SETUP;\n };\n AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) {\n slot.attachment = attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName);\n if (attachments)\n slot.attachmentState = this.unkeyedState + AnimationState.CURRENT;\n };\n AnimationState.prototype.applyRotateTimeline = function (timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) {\n if (firstFrame)\n timelinesRotation[i] = 0;\n if (alpha == 1) {\n timeline.apply(skeleton, 0, time, null, 1, blend, spine.MixDirection.mixIn);\n return;\n }\n var rotateTimeline = timeline;\n var frames = rotateTimeline.frames;\n var bone = skeleton.bones[rotateTimeline.boneIndex];\n if (!bone.active)\n return;\n var r1 = 0, r2 = 0;\n if (time < frames[0]) {\n switch (blend) {\n case spine.MixBlend.setup:\n bone.rotation = bone.data.rotation;\n default:\n return;\n case spine.MixBlend.first:\n r1 = bone.rotation;\n r2 = bone.data.rotation;\n }\n }\n else {\n r1 = blend == spine.MixBlend.setup ? bone.data.rotation : bone.rotation;\n if (time >= frames[frames.length - spine.RotateTimeline.ENTRIES])\n r2 = bone.data.rotation + frames[frames.length + spine.RotateTimeline.PREV_ROTATION];\n else {\n var frame = spine.Animation.binarySearch(frames, time, spine.RotateTimeline.ENTRIES);\n var prevRotation = frames[frame + spine.RotateTimeline.PREV_ROTATION];\n var frameTime = frames[frame];\n var percent = rotateTimeline.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + spine.RotateTimeline.PREV_TIME] - frameTime));\n r2 = frames[frame + spine.RotateTimeline.ROTATION] - prevRotation;\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\n r2 = prevRotation + r2 * percent + bone.data.rotation;\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\n }\n }\n var total = 0, diff = r2 - r1;\n diff -= (16384 - ((16384.499999999996 - diff / 360) | 0)) * 360;\n if (diff == 0) {\n total = timelinesRotation[i];\n }\n else {\n var lastTotal = 0, lastDiff = 0;\n if (firstFrame) {\n lastTotal = 0;\n lastDiff = diff;\n }\n else {\n lastTotal = timelinesRotation[i];\n lastDiff = timelinesRotation[i + 1];\n }\n var current = diff > 0, dir = lastTotal >= 0;\n if (spine.MathUtils.signum(lastDiff) != spine.MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\n if (Math.abs(lastTotal) > 180)\n lastTotal += 360 * spine.MathUtils.signum(lastTotal);\n dir = current;\n }\n total = diff + lastTotal - lastTotal % 360;\n if (dir != current)\n total += 360 * spine.MathUtils.signum(lastTotal);\n timelinesRotation[i] = total;\n }\n timelinesRotation[i + 1] = diff;\n r1 += total * alpha;\n bone.rotation = r1 - (16384 - ((16384.499999999996 - r1 / 360) | 0)) * 360;\n };\n AnimationState.prototype.queueEvents = function (entry, animationTime) {\n var animationStart = entry.animationStart, animationEnd = entry.animationEnd;\n var duration = animationEnd - animationStart;\n var trackLastWrapped = entry.trackLast % duration;\n var events = this.events;\n var i = 0, n = events.length;\n for (; i < n; i++) {\n var event_1 = events[i];\n if (event_1.time < trackLastWrapped)\n break;\n if (event_1.time > animationEnd)\n continue;\n this.queue.event(entry, event_1);\n }\n var complete = false;\n if (entry.loop)\n complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;\n else\n complete = animationTime >= animationEnd && entry.animationLast < animationEnd;\n if (complete)\n this.queue.complete(entry);\n for (; i < n; i++) {\n var event_2 = events[i];\n if (event_2.time < animationStart)\n continue;\n this.queue.event(entry, events[i]);\n }\n };\n AnimationState.prototype.clearTracks = function () {\n var oldDrainDisabled = this.queue.drainDisabled;\n this.queue.drainDisabled = true;\n for (var i = 0, n = this.tracks.length; i < n; i++)\n this.clearTrack(i);\n this.tracks.length = 0;\n this.queue.drainDisabled = oldDrainDisabled;\n this.queue.drain();\n };\n AnimationState.prototype.clearTrack = function (trackIndex) {\n if (trackIndex >= this.tracks.length)\n return;\n var current = this.tracks[trackIndex];\n if (current == null)\n return;\n this.queue.end(current);\n this.disposeNext(current);\n var entry = current;\n while (true) {\n var from = entry.mixingFrom;\n if (from == null)\n break;\n this.queue.end(from);\n entry.mixingFrom = null;\n entry.mixingTo = null;\n entry = from;\n }\n this.tracks[current.trackIndex] = null;\n this.queue.drain();\n };\n AnimationState.prototype.setCurrent = function (index, current, interrupt) {\n var from = this.expandToIndex(index);\n this.tracks[index] = current;\n if (from != null) {\n if (interrupt)\n this.queue.interrupt(from);\n current.mixingFrom = from;\n from.mixingTo = current;\n current.mixTime = 0;\n if (from.mixingFrom != null && from.mixDuration > 0)\n current.interruptAlpha *= Math.min(1, from.mixTime / from.mixDuration);\n from.timelinesRotation.length = 0;\n }\n this.queue.start(current);\n };\n AnimationState.prototype.setAnimation = function (trackIndex, animationName, loop) {\n var animation = this.data.skeletonData.findAnimation(animationName);\n if (animation == null)\n throw new Error(\"Animation not found: \" + animationName);\n return this.setAnimationWith(trackIndex, animation, loop);\n };\n AnimationState.prototype.setAnimationWith = function (trackIndex, animation, loop) {\n if (animation == null)\n throw new Error(\"animation cannot be null.\");\n var interrupt = true;\n var current = this.expandToIndex(trackIndex);\n if (current != null) {\n if (current.nextTrackLast == -1) {\n this.tracks[trackIndex] = current.mixingFrom;\n this.queue.interrupt(current);\n this.queue.end(current);\n this.disposeNext(current);\n current = current.mixingFrom;\n interrupt = false;\n }\n else\n this.disposeNext(current);\n }\n var entry = this.trackEntry(trackIndex, animation, loop, current);\n this.setCurrent(trackIndex, entry, interrupt);\n this.queue.drain();\n return entry;\n };\n AnimationState.prototype.addAnimation = function (trackIndex, animationName, loop, delay) {\n var animation = this.data.skeletonData.findAnimation(animationName);\n if (animation == null)\n throw new Error(\"Animation not found: \" + animationName);\n return this.addAnimationWith(trackIndex, animation, loop, delay);\n };\n AnimationState.prototype.addAnimationWith = function (trackIndex, animation, loop, delay) {\n if (animation == null)\n throw new Error(\"animation cannot be null.\");\n var last = this.expandToIndex(trackIndex);\n if (last != null) {\n while (last.next != null)\n last = last.next;\n }\n var entry = this.trackEntry(trackIndex, animation, loop, last);\n if (last == null) {\n this.setCurrent(trackIndex, entry, true);\n this.queue.drain();\n }\n else {\n last.next = entry;\n if (delay <= 0) {\n var duration = last.animationEnd - last.animationStart;\n if (duration != 0) {\n if (last.loop)\n delay += duration * (1 + ((last.trackTime / duration) | 0));\n else\n delay += Math.max(duration, last.trackTime);\n delay -= this.data.getMix(last.animation, animation);\n }\n else\n delay = last.trackTime;\n }\n }\n entry.delay = delay;\n return entry;\n };\n AnimationState.prototype.setEmptyAnimation = function (trackIndex, mixDuration) {\n var entry = this.setAnimationWith(trackIndex, AnimationState.emptyAnimation, false);\n entry.mixDuration = mixDuration;\n entry.trackEnd = mixDuration;\n return entry;\n };\n AnimationState.prototype.addEmptyAnimation = function (trackIndex, mixDuration, delay) {\n if (delay <= 0)\n delay -= mixDuration;\n var entry = this.addAnimationWith(trackIndex, AnimationState.emptyAnimation, false, delay);\n entry.mixDuration = mixDuration;\n entry.trackEnd = mixDuration;\n return entry;\n };\n AnimationState.prototype.setEmptyAnimations = function (mixDuration) {\n var oldDrainDisabled = this.queue.drainDisabled;\n this.queue.drainDisabled = true;\n for (var i = 0, n = this.tracks.length; i < n; i++) {\n var current = this.tracks[i];\n if (current != null)\n this.setEmptyAnimation(current.trackIndex, mixDuration);\n }\n this.queue.drainDisabled = oldDrainDisabled;\n this.queue.drain();\n };\n AnimationState.prototype.expandToIndex = function (index) {\n if (index < this.tracks.length)\n return this.tracks[index];\n spine.Utils.ensureArrayCapacity(this.tracks, index + 1, null);\n this.tracks.length = index + 1;\n return null;\n };\n AnimationState.prototype.trackEntry = function (trackIndex, animation, loop, last) {\n var entry = this.trackEntryPool.obtain();\n entry.trackIndex = trackIndex;\n entry.animation = animation;\n entry.loop = loop;\n entry.holdPrevious = false;\n entry.eventThreshold = 0;\n entry.attachmentThreshold = 0;\n entry.drawOrderThreshold = 0;\n entry.animationStart = 0;\n entry.animationEnd = animation.duration;\n entry.animationLast = -1;\n entry.nextAnimationLast = -1;\n entry.delay = 0;\n entry.trackTime = 0;\n entry.trackLast = -1;\n entry.nextTrackLast = -1;\n entry.trackEnd = Number.MAX_VALUE;\n entry.timeScale = 1;\n entry.alpha = 1;\n entry.interruptAlpha = 1;\n entry.mixTime = 0;\n entry.mixDuration = last == null ? 0 : this.data.getMix(last.animation, animation);\n entry.mixBlend = spine.MixBlend.replace;\n return entry;\n };\n AnimationState.prototype.disposeNext = function (entry) {\n var next = entry.next;\n while (next != null) {\n this.queue.dispose(next);\n next = next.next;\n }\n entry.next = null;\n };\n AnimationState.prototype._animationsChanged = function () {\n this.animationsChanged = false;\n this.propertyIDs.clear();\n for (var i = 0, n = this.tracks.length; i < n; i++) {\n var entry = this.tracks[i];\n if (entry == null)\n continue;\n while (entry.mixingFrom != null)\n entry = entry.mixingFrom;\n do {\n if (entry.mixingFrom == null || entry.mixBlend != spine.MixBlend.add)\n this.computeHold(entry);\n entry = entry.mixingTo;\n } while (entry != null);\n }\n };\n AnimationState.prototype.computeHold = function (entry) {\n var to = entry.mixingTo;\n var timelines = entry.animation.timelines;\n var timelinesCount = entry.animation.timelines.length;\n var timelineMode = spine.Utils.setArraySize(entry.timelineMode, timelinesCount);\n entry.timelineHoldMix.length = 0;\n var timelineDipMix = spine.Utils.setArraySize(entry.timelineHoldMix, timelinesCount);\n var propertyIDs = this.propertyIDs;\n if (to != null && to.holdPrevious) {\n for (var i = 0; i < timelinesCount; i++) {\n timelineMode[i] = propertyIDs.add(timelines[i].getPropertyId()) ? AnimationState.HOLD_FIRST : AnimationState.HOLD_SUBSEQUENT;\n }\n return;\n }\n outer: for (var i = 0; i < timelinesCount; i++) {\n var timeline = timelines[i];\n var id = timeline.getPropertyId();\n if (!propertyIDs.add(id))\n timelineMode[i] = AnimationState.SUBSEQUENT;\n else if (to == null || timeline instanceof spine.AttachmentTimeline || timeline instanceof spine.DrawOrderTimeline\n || timeline instanceof spine.EventTimeline || !to.animation.hasTimeline(id)) {\n timelineMode[i] = AnimationState.FIRST;\n }\n else {\n for (var next = to.mixingTo; next != null; next = next.mixingTo) {\n if (next.animation.hasTimeline(id))\n continue;\n if (entry.mixDuration > 0) {\n timelineMode[i] = AnimationState.HOLD_MIX;\n timelineDipMix[i] = next;\n continue outer;\n }\n break;\n }\n timelineMode[i] = AnimationState.HOLD_FIRST;\n }\n }\n };\n AnimationState.prototype.getCurrent = function (trackIndex) {\n if (trackIndex >= this.tracks.length)\n return null;\n return this.tracks[trackIndex];\n };\n AnimationState.prototype.addListener = function (listener) {\n if (listener == null)\n throw new Error(\"listener cannot be null.\");\n this.listeners.push(listener);\n };\n AnimationState.prototype.removeListener = function (listener) {\n var index = this.listeners.indexOf(listener);\n if (index >= 0)\n this.listeners.splice(index, 1);\n };\n AnimationState.prototype.clearListeners = function () {\n this.listeners.length = 0;\n };\n AnimationState.prototype.clearListenerNotifications = function () {\n this.queue.clear();\n };\n AnimationState.emptyAnimation = new spine.Animation(\"\", [], 0);\n AnimationState.SUBSEQUENT = 0;\n AnimationState.FIRST = 1;\n AnimationState.HOLD_SUBSEQUENT = 2;\n AnimationState.HOLD_FIRST = 3;\n AnimationState.HOLD_MIX = 4;\n AnimationState.SETUP = 1;\n AnimationState.CURRENT = 2;\n return AnimationState;\n }());\n spine.AnimationState = AnimationState;\n var TrackEntry = (function () {\n function TrackEntry() {\n this.mixBlend = spine.MixBlend.replace;\n this.timelineMode = new Array();\n this.timelineHoldMix = new Array();\n this.timelinesRotation = new Array();\n }\n TrackEntry.prototype.reset = function () {\n this.next = null;\n this.mixingFrom = null;\n this.mixingTo = null;\n this.animation = null;\n this.listener = null;\n this.timelineMode.length = 0;\n this.timelineHoldMix.length = 0;\n this.timelinesRotation.length = 0;\n };\n TrackEntry.prototype.getAnimationTime = function () {\n if (this.loop) {\n var duration = this.animationEnd - this.animationStart;\n if (duration == 0)\n return this.animationStart;\n return (this.trackTime % duration) + this.animationStart;\n }\n return Math.min(this.trackTime + this.animationStart, this.animationEnd);\n };\n TrackEntry.prototype.setAnimationLast = function (animationLast) {\n this.animationLast = animationLast;\n this.nextAnimationLast = animationLast;\n };\n TrackEntry.prototype.isComplete = function () {\n return this.trackTime >= this.animationEnd - this.animationStart;\n };\n TrackEntry.prototype.resetRotationDirections = function () {\n this.timelinesRotation.length = 0;\n };\n return TrackEntry;\n }());\n spine.TrackEntry = TrackEntry;\n var EventQueue = (function () {\n function EventQueue(animState) {\n this.objects = [];\n this.drainDisabled = false;\n this.animState = animState;\n }\n EventQueue.prototype.start = function (entry) {\n this.objects.push(EventType.start);\n this.objects.push(entry);\n this.animState.animationsChanged = true;\n };\n EventQueue.prototype.interrupt = function (entry) {\n this.objects.push(EventType.interrupt);\n this.objects.push(entry);\n };\n EventQueue.prototype.end = function (entry) {\n this.objects.push(EventType.end);\n this.objects.push(entry);\n this.animState.animationsChanged = true;\n };\n EventQueue.prototype.dispose = function (entry) {\n this.objects.push(EventType.dispose);\n this.objects.push(entry);\n };\n EventQueue.prototype.complete = function (entry) {\n this.objects.push(EventType.complete);\n this.objects.push(entry);\n };\n EventQueue.prototype.event = function (entry, event) {\n this.objects.push(EventType.event);\n this.objects.push(entry);\n this.objects.push(event);\n };\n EventQueue.prototype.drain = function () {\n if (this.drainDisabled)\n return;\n this.drainDisabled = true;\n var objects = this.objects;\n var listeners = this.animState.listeners;\n for (var i = 0; i < objects.length; i += 2) {\n var type = objects[i];\n var entry = objects[i + 1];\n switch (type) {\n case EventType.start:\n if (entry.listener != null && entry.listener.start)\n entry.listener.start(entry);\n for (var ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].start)\n listeners[ii].start(entry);\n break;\n case EventType.interrupt:\n if (entry.listener != null && entry.listener.interrupt)\n entry.listener.interrupt(entry);\n for (var ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].interrupt)\n listeners[ii].interrupt(entry);\n break;\n case EventType.end:\n if (entry.listener != null && entry.listener.end)\n entry.listener.end(entry);\n for (var ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].end)\n listeners[ii].end(entry);\n case EventType.dispose:\n if (entry.listener != null && entry.listener.dispose)\n entry.listener.dispose(entry);\n for (var ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].dispose)\n listeners[ii].dispose(entry);\n this.animState.trackEntryPool.free(entry);\n break;\n case EventType.complete:\n if (entry.listener != null && entry.listener.complete)\n entry.listener.complete(entry);\n for (var ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].complete)\n listeners[ii].complete(entry);\n break;\n case EventType.event:\n var event_3 = objects[i++ + 2];\n if (entry.listener != null && entry.listener.event)\n entry.listener.event(entry, event_3);\n for (var ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].event)\n listeners[ii].event(entry, event_3);\n break;\n }\n }\n this.clear();\n this.drainDisabled = false;\n };\n EventQueue.prototype.clear = function () {\n this.objects.length = 0;\n };\n return EventQueue;\n }());\n spine.EventQueue = EventQueue;\n var EventType;\n (function (EventType) {\n EventType[EventType[\"start\"] = 0] = \"start\";\n EventType[EventType[\"interrupt\"] = 1] = \"interrupt\";\n EventType[EventType[\"end\"] = 2] = \"end\";\n EventType[EventType[\"dispose\"] = 3] = \"dispose\";\n EventType[EventType[\"complete\"] = 4] = \"complete\";\n EventType[EventType[\"event\"] = 5] = \"event\";\n })(EventType = spine.EventType || (spine.EventType = {}));\n var AnimationStateAdapter = (function () {\n function AnimationStateAdapter() {\n }\n AnimationStateAdapter.prototype.start = function (entry) {\n };\n AnimationStateAdapter.prototype.interrupt = function (entry) {\n };\n AnimationStateAdapter.prototype.end = function (entry) {\n };\n AnimationStateAdapter.prototype.dispose = function (entry) {\n };\n AnimationStateAdapter.prototype.complete = function (entry) {\n };\n AnimationStateAdapter.prototype.event = function (entry, event) {\n };\n return AnimationStateAdapter;\n }());\n spine.AnimationStateAdapter = AnimationStateAdapter;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var AnimationStateData = (function () {\n function AnimationStateData(skeletonData) {\n this.animationToMixTime = {};\n this.defaultMix = 0;\n if (skeletonData == null)\n throw new Error(\"skeletonData cannot be null.\");\n this.skeletonData = skeletonData;\n }\n AnimationStateData.prototype.setMix = function (fromName, toName, duration) {\n var from = this.skeletonData.findAnimation(fromName);\n if (from == null)\n throw new Error(\"Animation not found: \" + fromName);\n var to = this.skeletonData.findAnimation(toName);\n if (to == null)\n throw new Error(\"Animation not found: \" + toName);\n this.setMixWith(from, to, duration);\n };\n AnimationStateData.prototype.setMixWith = function (from, to, duration) {\n if (from == null)\n throw new Error(\"from cannot be null.\");\n if (to == null)\n throw new Error(\"to cannot be null.\");\n var key = from.name + \".\" + to.name;\n this.animationToMixTime[key] = duration;\n };\n AnimationStateData.prototype.getMix = function (from, to) {\n var key = from.name + \".\" + to.name;\n var value = this.animationToMixTime[key];\n return value === undefined ? this.defaultMix : value;\n };\n return AnimationStateData;\n }());\n spine.AnimationStateData = AnimationStateData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var AssetManager = (function () {\n function AssetManager(textureLoader, pathPrefix) {\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\n this.assets = {};\n this.errors = {};\n this.toLoad = 0;\n this.loaded = 0;\n this.rawDataUris = {};\n this.textureLoader = textureLoader;\n this.pathPrefix = pathPrefix;\n }\n AssetManager.prototype.downloadText = function (url, success, error) {\n var request = new XMLHttpRequest();\n request.overrideMimeType(\"text/html\");\n if (this.rawDataUris[url])\n url = this.rawDataUris[url];\n request.open(\"GET\", url, true);\n request.onload = function () {\n if (request.status == 200) {\n success(request.responseText);\n }\n else {\n error(request.status, request.responseText);\n }\n };\n request.onerror = function () {\n error(request.status, request.responseText);\n };\n request.send();\n };\n AssetManager.prototype.downloadBinary = function (url, success, error) {\n var request = new XMLHttpRequest();\n if (this.rawDataUris[url])\n url = this.rawDataUris[url];\n request.open(\"GET\", url, true);\n request.responseType = \"arraybuffer\";\n request.onload = function () {\n if (request.status == 200) {\n success(new Uint8Array(request.response));\n }\n else {\n error(request.status, request.responseText);\n }\n };\n request.onerror = function () {\n error(request.status, request.responseText);\n };\n request.send();\n };\n AssetManager.prototype.setRawDataURI = function (path, data) {\n this.rawDataUris[this.pathPrefix + path] = data;\n };\n AssetManager.prototype.loadBinary = function (path, success, error) {\n var _this = this;\n if (success === void 0) { success = null; }\n if (error === void 0) { error = null; }\n path = this.pathPrefix + path;\n this.toLoad++;\n this.downloadBinary(path, function (data) {\n _this.assets[path] = data;\n if (success)\n success(path, data);\n _this.toLoad--;\n _this.loaded++;\n }, function (state, responseText) {\n _this.errors[path] = \"Couldn't load binary \" + path + \": status \" + status + \", \" + responseText;\n if (error)\n error(path, \"Couldn't load binary \" + path + \": status \" + status + \", \" + responseText);\n _this.toLoad--;\n _this.loaded++;\n });\n };\n AssetManager.prototype.loadText = function (path, success, error) {\n var _this = this;\n if (success === void 0) { success = null; }\n if (error === void 0) { error = null; }\n path = this.pathPrefix + path;\n this.toLoad++;\n this.downloadText(path, function (data) {\n _this.assets[path] = data;\n if (success)\n success(path, data);\n _this.toLoad--;\n _this.loaded++;\n }, function (state, responseText) {\n _this.errors[path] = \"Couldn't load text \" + path + \": status \" + status + \", \" + responseText;\n if (error)\n error(path, \"Couldn't load text \" + path + \": status \" + status + \", \" + responseText);\n _this.toLoad--;\n _this.loaded++;\n });\n };\n AssetManager.prototype.loadTexture = function (path, success, error) {\n var _this = this;\n if (success === void 0) { success = null; }\n if (error === void 0) { error = null; }\n path = this.pathPrefix + path;\n var storagePath = path;\n this.toLoad++;\n var img = new Image();\n img.crossOrigin = \"anonymous\";\n img.onload = function (ev) {\n var texture = _this.textureLoader(img);\n _this.assets[storagePath] = texture;\n _this.toLoad--;\n _this.loaded++;\n if (success)\n success(path, img);\n };\n img.onerror = function (ev) {\n _this.errors[path] = \"Couldn't load image \" + path;\n _this.toLoad--;\n _this.loaded++;\n if (error)\n error(path, \"Couldn't load image \" + path);\n };\n if (this.rawDataUris[path])\n path = this.rawDataUris[path];\n img.src = path;\n };\n AssetManager.prototype.loadTextureAtlas = function (path, success, error) {\n var _this = this;\n if (success === void 0) { success = null; }\n if (error === void 0) { error = null; }\n var parent = path.lastIndexOf(\"/\") >= 0 ? path.substring(0, path.lastIndexOf(\"/\")) : \"\";\n path = this.pathPrefix + path;\n this.toLoad++;\n this.downloadText(path, function (atlasData) {\n var pagesLoaded = { count: 0 };\n var atlasPages = new Array();\n try {\n var atlas = new spine.TextureAtlas(atlasData, function (path) {\n atlasPages.push(parent == \"\" ? path : parent + \"/\" + path);\n var image = document.createElement(\"img\");\n image.width = 16;\n image.height = 16;\n return new spine.FakeTexture(image);\n });\n }\n catch (e) {\n var ex = e;\n _this.errors[path] = \"Couldn't load texture atlas \" + path + \": \" + ex.message;\n if (error)\n error(path, \"Couldn't load texture atlas \" + path + \": \" + ex.message);\n _this.toLoad--;\n _this.loaded++;\n return;\n }\n var _loop_1 = function (atlasPage) {\n var pageLoadError = false;\n _this.loadTexture(atlasPage, function (imagePath, image) {\n pagesLoaded.count++;\n if (pagesLoaded.count == atlasPages.length) {\n if (!pageLoadError) {\n try {\n var atlas = new spine.TextureAtlas(atlasData, function (path) {\n return _this.get(parent == \"\" ? path : parent + \"/\" + path);\n });\n _this.assets[path] = atlas;\n if (success)\n success(path, atlas);\n _this.toLoad--;\n _this.loaded++;\n }\n catch (e) {\n var ex = e;\n _this.errors[path] = \"Couldn't load texture atlas \" + path + \": \" + ex.message;\n if (error)\n error(path, \"Couldn't load texture atlas \" + path + \": \" + ex.message);\n _this.toLoad--;\n _this.loaded++;\n }\n }\n else {\n _this.errors[path] = \"Couldn't load texture atlas page \" + imagePath + \"} of atlas \" + path;\n if (error)\n error(path, \"Couldn't load texture atlas page \" + imagePath + \" of atlas \" + path);\n _this.toLoad--;\n _this.loaded++;\n }\n }\n }, function (imagePath, errorMessage) {\n pageLoadError = true;\n pagesLoaded.count++;\n if (pagesLoaded.count == atlasPages.length) {\n _this.errors[path] = \"Couldn't load texture atlas page \" + imagePath + \"} of atlas \" + path;\n if (error)\n error(path, \"Couldn't load texture atlas page \" + imagePath + \" of atlas \" + path);\n _this.toLoad--;\n _this.loaded++;\n }\n });\n };\n for (var _i = 0, atlasPages_1 = atlasPages; _i < atlasPages_1.length; _i++) {\n var atlasPage = atlasPages_1[_i];\n _loop_1(atlasPage);\n }\n }, function (state, responseText) {\n _this.errors[path] = \"Couldn't load texture atlas \" + path + \": status \" + status + \", \" + responseText;\n if (error)\n error(path, \"Couldn't load texture atlas \" + path + \": status \" + status + \", \" + responseText);\n _this.toLoad--;\n _this.loaded++;\n });\n };\n AssetManager.prototype.get = function (path) {\n path = this.pathPrefix + path;\n return this.assets[path];\n };\n AssetManager.prototype.remove = function (path) {\n path = this.pathPrefix + path;\n var asset = this.assets[path];\n if (asset.dispose)\n asset.dispose();\n this.assets[path] = null;\n };\n AssetManager.prototype.removeAll = function () {\n for (var key in this.assets) {\n var asset = this.assets[key];\n if (asset.dispose)\n asset.dispose();\n }\n this.assets = {};\n };\n AssetManager.prototype.isLoadingComplete = function () {\n return this.toLoad == 0;\n };\n AssetManager.prototype.getToLoad = function () {\n return this.toLoad;\n };\n AssetManager.prototype.getLoaded = function () {\n return this.loaded;\n };\n AssetManager.prototype.dispose = function () {\n this.removeAll();\n };\n AssetManager.prototype.hasErrors = function () {\n return Object.keys(this.errors).length > 0;\n };\n AssetManager.prototype.getErrors = function () {\n return this.errors;\n };\n return AssetManager;\n }());\n spine.AssetManager = AssetManager;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var AtlasAttachmentLoader = (function () {\n function AtlasAttachmentLoader(atlas) {\n this.atlas = atlas;\n }\n AtlasAttachmentLoader.prototype.newRegionAttachment = function (skin, name, path) {\n var region = this.atlas.findRegion(path);\n if (region == null)\n throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\n region.renderObject = region;\n var attachment = new spine.RegionAttachment(name);\n attachment.setRegion(region);\n return attachment;\n };\n AtlasAttachmentLoader.prototype.newMeshAttachment = function (skin, name, path) {\n var region = this.atlas.findRegion(path);\n if (region == null)\n throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\n region.renderObject = region;\n var attachment = new spine.MeshAttachment(name);\n attachment.region = region;\n return attachment;\n };\n AtlasAttachmentLoader.prototype.newBoundingBoxAttachment = function (skin, name) {\n return new spine.BoundingBoxAttachment(name);\n };\n AtlasAttachmentLoader.prototype.newPathAttachment = function (skin, name) {\n return new spine.PathAttachment(name);\n };\n AtlasAttachmentLoader.prototype.newPointAttachment = function (skin, name) {\n return new spine.PointAttachment(name);\n };\n AtlasAttachmentLoader.prototype.newClippingAttachment = function (skin, name) {\n return new spine.ClippingAttachment(name);\n };\n return AtlasAttachmentLoader;\n }());\n spine.AtlasAttachmentLoader = AtlasAttachmentLoader;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var BlendMode;\n (function (BlendMode) {\n BlendMode[BlendMode[\"Normal\"] = 0] = \"Normal\";\n BlendMode[BlendMode[\"Additive\"] = 1] = \"Additive\";\n BlendMode[BlendMode[\"Multiply\"] = 2] = \"Multiply\";\n BlendMode[BlendMode[\"Screen\"] = 3] = \"Screen\";\n })(BlendMode = spine.BlendMode || (spine.BlendMode = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Bone = (function () {\n function Bone(data, skeleton, parent) {\n this.children = new Array();\n this.x = 0;\n this.y = 0;\n this.rotation = 0;\n this.scaleX = 0;\n this.scaleY = 0;\n this.shearX = 0;\n this.shearY = 0;\n this.ax = 0;\n this.ay = 0;\n this.arotation = 0;\n this.ascaleX = 0;\n this.ascaleY = 0;\n this.ashearX = 0;\n this.ashearY = 0;\n this.appliedValid = false;\n this.a = 0;\n this.b = 0;\n this.c = 0;\n this.d = 0;\n this.worldY = 0;\n this.worldX = 0;\n this.sorted = false;\n this.active = false;\n if (data == null)\n throw new Error(\"data cannot be null.\");\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.skeleton = skeleton;\n this.parent = parent;\n this.setToSetupPose();\n }\n Bone.prototype.isActive = function () {\n return this.active;\n };\n Bone.prototype.update = function () {\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\n };\n Bone.prototype.updateWorldTransform = function () {\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\n };\n Bone.prototype.updateWorldTransformWith = function (x, y, rotation, scaleX, scaleY, shearX, shearY) {\n this.ax = x;\n this.ay = y;\n this.arotation = rotation;\n this.ascaleX = scaleX;\n this.ascaleY = scaleY;\n this.ashearX = shearX;\n this.ashearY = shearY;\n this.appliedValid = true;\n var parent = this.parent;\n if (parent == null) {\n var skeleton = this.skeleton;\n var rotationY = rotation + 90 + shearY;\n var sx = skeleton.scaleX;\n var sy = skeleton.scaleY;\n this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\n this.b = spine.MathUtils.cosDeg(rotationY) * scaleY * sx;\n this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\n this.d = spine.MathUtils.sinDeg(rotationY) * scaleY * sy;\n this.worldX = x * sx + skeleton.x;\n this.worldY = y * sy + skeleton.y;\n return;\n }\n var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\n this.worldX = pa * x + pb * y + parent.worldX;\n this.worldY = pc * x + pd * y + parent.worldY;\n switch (this.data.transformMode) {\n case spine.TransformMode.Normal: {\n var rotationY = rotation + 90 + shearY;\n var la = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\n var lb = spine.MathUtils.cosDeg(rotationY) * scaleY;\n var lc = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\n var ld = spine.MathUtils.sinDeg(rotationY) * scaleY;\n this.a = pa * la + pb * lc;\n this.b = pa * lb + pb * ld;\n this.c = pc * la + pd * lc;\n this.d = pc * lb + pd * ld;\n return;\n }\n case spine.TransformMode.OnlyTranslation: {\n var rotationY = rotation + 90 + shearY;\n this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\n this.b = spine.MathUtils.cosDeg(rotationY) * scaleY;\n this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\n this.d = spine.MathUtils.sinDeg(rotationY) * scaleY;\n break;\n }\n case spine.TransformMode.NoRotationOrReflection: {\n var s = pa * pa + pc * pc;\n var prx = 0;\n if (s > 0.0001) {\n s = Math.abs(pa * pd - pb * pc) / s;\n pa /= this.skeleton.scaleX;\n pc /= this.skeleton.scaleY;\n pb = pc * s;\n pd = pa * s;\n prx = Math.atan2(pc, pa) * spine.MathUtils.radDeg;\n }\n else {\n pa = 0;\n pc = 0;\n prx = 90 - Math.atan2(pd, pb) * spine.MathUtils.radDeg;\n }\n var rx = rotation + shearX - prx;\n var ry = rotation + shearY - prx + 90;\n var la = spine.MathUtils.cosDeg(rx) * scaleX;\n var lb = spine.MathUtils.cosDeg(ry) * scaleY;\n var lc = spine.MathUtils.sinDeg(rx) * scaleX;\n var ld = spine.MathUtils.sinDeg(ry) * scaleY;\n this.a = pa * la - pb * lc;\n this.b = pa * lb - pb * ld;\n this.c = pc * la + pd * lc;\n this.d = pc * lb + pd * ld;\n break;\n }\n case spine.TransformMode.NoScale:\n case spine.TransformMode.NoScaleOrReflection: {\n var cos = spine.MathUtils.cosDeg(rotation);\n var sin = spine.MathUtils.sinDeg(rotation);\n var za = (pa * cos + pb * sin) / this.skeleton.scaleX;\n var zc = (pc * cos + pd * sin) / this.skeleton.scaleY;\n var s = Math.sqrt(za * za + zc * zc);\n if (s > 0.00001)\n s = 1 / s;\n za *= s;\n zc *= s;\n s = Math.sqrt(za * za + zc * zc);\n if (this.data.transformMode == spine.TransformMode.NoScale\n && (pa * pd - pb * pc < 0) != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))\n s = -s;\n var r = Math.PI / 2 + Math.atan2(zc, za);\n var zb = Math.cos(r) * s;\n var zd = Math.sin(r) * s;\n var la = spine.MathUtils.cosDeg(shearX) * scaleX;\n var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;\n var lc = spine.MathUtils.sinDeg(shearX) * scaleX;\n var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;\n this.a = za * la + zb * lc;\n this.b = za * lb + zb * ld;\n this.c = zc * la + zd * lc;\n this.d = zc * lb + zd * ld;\n break;\n }\n }\n this.a *= this.skeleton.scaleX;\n this.b *= this.skeleton.scaleX;\n this.c *= this.skeleton.scaleY;\n this.d *= this.skeleton.scaleY;\n };\n Bone.prototype.setToSetupPose = function () {\n var data = this.data;\n this.x = data.x;\n this.y = data.y;\n this.rotation = data.rotation;\n this.scaleX = data.scaleX;\n this.scaleY = data.scaleY;\n this.shearX = data.shearX;\n this.shearY = data.shearY;\n };\n Bone.prototype.getWorldRotationX = function () {\n return Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\n };\n Bone.prototype.getWorldRotationY = function () {\n return Math.atan2(this.d, this.b) * spine.MathUtils.radDeg;\n };\n Bone.prototype.getWorldScaleX = function () {\n return Math.sqrt(this.a * this.a + this.c * this.c);\n };\n Bone.prototype.getWorldScaleY = function () {\n return Math.sqrt(this.b * this.b + this.d * this.d);\n };\n Bone.prototype.updateAppliedTransform = function () {\n this.appliedValid = true;\n var parent = this.parent;\n if (parent == null) {\n this.ax = this.worldX;\n this.ay = this.worldY;\n this.arotation = Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\n this.ascaleX = Math.sqrt(this.a * this.a + this.c * this.c);\n this.ascaleY = Math.sqrt(this.b * this.b + this.d * this.d);\n this.ashearX = 0;\n this.ashearY = Math.atan2(this.a * this.b + this.c * this.d, this.a * this.d - this.b * this.c) * spine.MathUtils.radDeg;\n return;\n }\n var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\n var pid = 1 / (pa * pd - pb * pc);\n var dx = this.worldX - parent.worldX, dy = this.worldY - parent.worldY;\n this.ax = (dx * pd * pid - dy * pb * pid);\n this.ay = (dy * pa * pid - dx * pc * pid);\n var ia = pid * pd;\n var id = pid * pa;\n var ib = pid * pb;\n var ic = pid * pc;\n var ra = ia * this.a - ib * this.c;\n var rb = ia * this.b - ib * this.d;\n var rc = id * this.c - ic * this.a;\n var rd = id * this.d - ic * this.b;\n this.ashearX = 0;\n this.ascaleX = Math.sqrt(ra * ra + rc * rc);\n if (this.ascaleX > 0.0001) {\n var det = ra * rd - rb * rc;\n this.ascaleY = det / this.ascaleX;\n this.ashearY = Math.atan2(ra * rb + rc * rd, det) * spine.MathUtils.radDeg;\n this.arotation = Math.atan2(rc, ra) * spine.MathUtils.radDeg;\n }\n else {\n this.ascaleX = 0;\n this.ascaleY = Math.sqrt(rb * rb + rd * rd);\n this.ashearY = 0;\n this.arotation = 90 - Math.atan2(rd, rb) * spine.MathUtils.radDeg;\n }\n };\n Bone.prototype.worldToLocal = function (world) {\n var a = this.a, b = this.b, c = this.c, d = this.d;\n var invDet = 1 / (a * d - b * c);\n var x = world.x - this.worldX, y = world.y - this.worldY;\n world.x = (x * d * invDet - y * b * invDet);\n world.y = (y * a * invDet - x * c * invDet);\n return world;\n };\n Bone.prototype.localToWorld = function (local) {\n var x = local.x, y = local.y;\n local.x = x * this.a + y * this.b + this.worldX;\n local.y = x * this.c + y * this.d + this.worldY;\n return local;\n };\n Bone.prototype.worldToLocalRotation = function (worldRotation) {\n var sin = spine.MathUtils.sinDeg(worldRotation), cos = spine.MathUtils.cosDeg(worldRotation);\n return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * spine.MathUtils.radDeg + this.rotation - this.shearX;\n };\n Bone.prototype.localToWorldRotation = function (localRotation) {\n localRotation -= this.rotation - this.shearX;\n var sin = spine.MathUtils.sinDeg(localRotation), cos = spine.MathUtils.cosDeg(localRotation);\n return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * spine.MathUtils.radDeg;\n };\n Bone.prototype.rotateWorld = function (degrees) {\n var a = this.a, b = this.b, c = this.c, d = this.d;\n var cos = spine.MathUtils.cosDeg(degrees), sin = spine.MathUtils.sinDeg(degrees);\n this.a = cos * a - sin * c;\n this.b = cos * b - sin * d;\n this.c = sin * a + cos * c;\n this.d = sin * b + cos * d;\n this.appliedValid = false;\n };\n return Bone;\n }());\n spine.Bone = Bone;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var BoneData = (function () {\n function BoneData(index, name, parent) {\n this.x = 0;\n this.y = 0;\n this.rotation = 0;\n this.scaleX = 1;\n this.scaleY = 1;\n this.shearX = 0;\n this.shearY = 0;\n this.transformMode = TransformMode.Normal;\n this.skinRequired = false;\n this.color = new spine.Color();\n if (index < 0)\n throw new Error(\"index must be >= 0.\");\n if (name == null)\n throw new Error(\"name cannot be null.\");\n this.index = index;\n this.name = name;\n this.parent = parent;\n }\n return BoneData;\n }());\n spine.BoneData = BoneData;\n var TransformMode;\n (function (TransformMode) {\n TransformMode[TransformMode[\"Normal\"] = 0] = \"Normal\";\n TransformMode[TransformMode[\"OnlyTranslation\"] = 1] = \"OnlyTranslation\";\n TransformMode[TransformMode[\"NoRotationOrReflection\"] = 2] = \"NoRotationOrReflection\";\n TransformMode[TransformMode[\"NoScale\"] = 3] = \"NoScale\";\n TransformMode[TransformMode[\"NoScaleOrReflection\"] = 4] = \"NoScaleOrReflection\";\n })(TransformMode = spine.TransformMode || (spine.TransformMode = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var ConstraintData = (function () {\n function ConstraintData(name, order, skinRequired) {\n this.name = name;\n this.order = order;\n this.skinRequired = skinRequired;\n }\n return ConstraintData;\n }());\n spine.ConstraintData = ConstraintData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Event = (function () {\n function Event(time, data) {\n if (data == null)\n throw new Error(\"data cannot be null.\");\n this.time = time;\n this.data = data;\n }\n return Event;\n }());\n spine.Event = Event;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var EventData = (function () {\n function EventData(name) {\n this.name = name;\n }\n return EventData;\n }());\n spine.EventData = EventData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var IkConstraint = (function () {\n function IkConstraint(data, skeleton) {\n this.bendDirection = 0;\n this.compress = false;\n this.stretch = false;\n this.mix = 1;\n this.softness = 0;\n this.active = false;\n if (data == null)\n throw new Error(\"data cannot be null.\");\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.mix = data.mix;\n this.softness = data.softness;\n this.bendDirection = data.bendDirection;\n this.compress = data.compress;\n this.stretch = data.stretch;\n this.bones = new Array();\n for (var i = 0; i < data.bones.length; i++)\n this.bones.push(skeleton.findBone(data.bones[i].name));\n this.target = skeleton.findBone(data.target.name);\n }\n IkConstraint.prototype.isActive = function () {\n return this.active;\n };\n IkConstraint.prototype.apply = function () {\n this.update();\n };\n IkConstraint.prototype.update = function () {\n var target = this.target;\n var bones = this.bones;\n switch (bones.length) {\n case 1:\n this.apply1(bones[0], target.worldX, target.worldY, this.compress, this.stretch, this.data.uniform, this.mix);\n break;\n case 2:\n this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.stretch, this.softness, this.mix);\n break;\n }\n };\n IkConstraint.prototype.apply1 = function (bone, targetX, targetY, compress, stretch, uniform, alpha) {\n if (!bone.appliedValid)\n bone.updateAppliedTransform();\n var p = bone.parent;\n var pa = p.a, pb = p.b, pc = p.c, pd = p.d;\n var rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;\n switch (bone.data.transformMode) {\n case spine.TransformMode.OnlyTranslation:\n tx = targetX - bone.worldX;\n ty = targetY - bone.worldY;\n break;\n case spine.TransformMode.NoRotationOrReflection:\n var s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);\n var sa = pa / bone.skeleton.scaleX;\n var sc = pc / bone.skeleton.scaleY;\n pb = -sc * s * bone.skeleton.scaleX;\n pd = sa * s * bone.skeleton.scaleY;\n rotationIK += Math.atan2(sc, sa) * spine.MathUtils.radDeg;\n default:\n var x = targetX - p.worldX, y = targetY - p.worldY;\n var d = pa * pd - pb * pc;\n tx = (x * pd - y * pb) / d - bone.ax;\n ty = (y * pa - x * pc) / d - bone.ay;\n }\n rotationIK += Math.atan2(ty, tx) * spine.MathUtils.radDeg;\n if (bone.ascaleX < 0)\n rotationIK += 180;\n if (rotationIK > 180)\n rotationIK -= 360;\n else if (rotationIK < -180)\n rotationIK += 360;\n var sx = bone.ascaleX, sy = bone.ascaleY;\n if (compress || stretch) {\n switch (bone.data.transformMode) {\n case spine.TransformMode.NoScale:\n case spine.TransformMode.NoScaleOrReflection:\n tx = targetX - bone.worldX;\n ty = targetY - bone.worldY;\n }\n var b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\n if ((compress && dd < b) || (stretch && dd > b) && b > 0.0001) {\n var s = (dd / b - 1) * alpha + 1;\n sx *= s;\n if (uniform)\n sy *= s;\n }\n }\n bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, sx, sy, bone.ashearX, bone.ashearY);\n };\n IkConstraint.prototype.apply2 = function (parent, child, targetX, targetY, bendDir, stretch, softness, alpha) {\n if (alpha == 0) {\n child.updateWorldTransform();\n return;\n }\n if (!parent.appliedValid)\n parent.updateAppliedTransform();\n if (!child.appliedValid)\n child.updateAppliedTransform();\n var px = parent.ax, py = parent.ay, psx = parent.ascaleX, sx = psx, psy = parent.ascaleY, csx = child.ascaleX;\n var os1 = 0, os2 = 0, s2 = 0;\n if (psx < 0) {\n psx = -psx;\n os1 = 180;\n s2 = -1;\n }\n else {\n os1 = 0;\n s2 = 1;\n }\n if (psy < 0) {\n psy = -psy;\n s2 = -s2;\n }\n if (csx < 0) {\n csx = -csx;\n os2 = 180;\n }\n else\n os2 = 0;\n var cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d;\n var u = Math.abs(psx - psy) <= 0.0001;\n if (!u) {\n cy = 0;\n cwx = a * cx + parent.worldX;\n cwy = c * cx + parent.worldY;\n }\n else {\n cy = child.ay;\n cwx = a * cx + b * cy + parent.worldX;\n cwy = c * cx + d * cy + parent.worldY;\n }\n var pp = parent.parent;\n a = pp.a;\n b = pp.b;\n c = pp.c;\n d = pp.d;\n var id = 1 / (a * d - b * c), x = cwx - pp.worldX, y = cwy - pp.worldY;\n var dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\n var l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\n if (l1 < 0.0001) {\n this.apply1(parent, targetX, targetY, false, stretch, false, alpha);\n child.updateWorldTransformWith(cx, cy, 0, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\n return;\n }\n x = targetX - pp.worldX;\n y = targetY - pp.worldY;\n var tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\n var dd = tx * tx + ty * ty;\n if (softness != 0) {\n softness *= psx * (csx + 1) / 2;\n var td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\n if (sd > 0) {\n var p = Math.min(1, sd / (softness * 2)) - 1;\n p = (sd - softness * (1 - p * p)) / td;\n tx -= p * tx;\n ty -= p * ty;\n dd = tx * tx + ty * ty;\n }\n }\n outer: if (u) {\n l2 *= psx;\n var cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\n if (cos < -1)\n cos = -1;\n else if (cos > 1) {\n cos = 1;\n if (stretch)\n sx *= (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\n }\n a2 = Math.acos(cos) * bendDir;\n a = l1 + l2 * cos;\n b = l2 * Math.sin(a2);\n a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b);\n }\n else {\n a = psx * l2;\n b = psy * l2;\n var aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\n c = bb * l1 * l1 + aa * dd - aa * bb;\n var c1 = -2 * bb * l1, c2 = bb - aa;\n d = c1 * c1 - 4 * c2 * c;\n if (d >= 0) {\n var q = Math.sqrt(d);\n if (c1 < 0)\n q = -q;\n q = -(c1 + q) / 2;\n var r0 = q / c2, r1 = c / q;\n var r = Math.abs(r0) < Math.abs(r1) ? r0 : r1;\n if (r * r <= dd) {\n y = Math.sqrt(dd - r * r) * bendDir;\n a1 = ta - Math.atan2(y, r);\n a2 = Math.atan2(y / psy, (r - l1) / psx);\n break outer;\n }\n }\n var minAngle = spine.MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\n var maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;\n c = -a * l1 / (aa - bb);\n if (c >= -1 && c <= 1) {\n c = Math.acos(c);\n x = a * Math.cos(c) + l1;\n y = b * Math.sin(c);\n d = x * x + y * y;\n if (d < minDist) {\n minAngle = c;\n minDist = d;\n minX = x;\n minY = y;\n }\n if (d > maxDist) {\n maxAngle = c;\n maxDist = d;\n maxX = x;\n maxY = y;\n }\n }\n if (dd <= (minDist + maxDist) / 2) {\n a1 = ta - Math.atan2(minY * bendDir, minX);\n a2 = minAngle * bendDir;\n }\n else {\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\n a2 = maxAngle * bendDir;\n }\n }\n var os = Math.atan2(cy, cx) * s2;\n var rotation = parent.arotation;\n a1 = (a1 - os) * spine.MathUtils.radDeg + os1 - rotation;\n if (a1 > 180)\n a1 -= 360;\n else if (a1 < -180)\n a1 += 360;\n parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, sx, parent.ascaleY, 0, 0);\n rotation = child.arotation;\n a2 = ((a2 + os) * spine.MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation;\n if (a2 > 180)\n a2 -= 360;\n else if (a2 < -180)\n a2 += 360;\n child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\n };\n return IkConstraint;\n }());\n spine.IkConstraint = IkConstraint;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var IkConstraintData = (function (_super) {\n __extends(IkConstraintData, _super);\n function IkConstraintData(name) {\n var _this = _super.call(this, name, 0, false) || this;\n _this.bones = new Array();\n _this.bendDirection = 1;\n _this.compress = false;\n _this.stretch = false;\n _this.uniform = false;\n _this.mix = 1;\n _this.softness = 0;\n return _this;\n }\n return IkConstraintData;\n }(spine.ConstraintData));\n spine.IkConstraintData = IkConstraintData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var PathConstraint = (function () {\n function PathConstraint(data, skeleton) {\n this.position = 0;\n this.spacing = 0;\n this.rotateMix = 0;\n this.translateMix = 0;\n this.spaces = new Array();\n this.positions = new Array();\n this.world = new Array();\n this.curves = new Array();\n this.lengths = new Array();\n this.segments = new Array();\n this.active = false;\n if (data == null)\n throw new Error(\"data cannot be null.\");\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.bones = new Array();\n for (var i = 0, n = data.bones.length; i < n; i++)\n this.bones.push(skeleton.findBone(data.bones[i].name));\n this.target = skeleton.findSlot(data.target.name);\n this.position = data.position;\n this.spacing = data.spacing;\n this.rotateMix = data.rotateMix;\n this.translateMix = data.translateMix;\n }\n PathConstraint.prototype.isActive = function () {\n return this.active;\n };\n PathConstraint.prototype.apply = function () {\n this.update();\n };\n PathConstraint.prototype.update = function () {\n var attachment = this.target.getAttachment();\n if (!(attachment instanceof spine.PathAttachment))\n return;\n var rotateMix = this.rotateMix, translateMix = this.translateMix;\n var translate = translateMix > 0, rotate = rotateMix > 0;\n if (!translate && !rotate)\n return;\n var data = this.data;\n var percentSpacing = data.spacingMode == spine.SpacingMode.Percent;\n var rotateMode = data.rotateMode;\n var tangents = rotateMode == spine.RotateMode.Tangent, scale = rotateMode == spine.RotateMode.ChainScale;\n var boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\n var bones = this.bones;\n var spaces = spine.Utils.setArraySize(this.spaces, spacesCount), lengths = null;\n var spacing = this.spacing;\n if (scale || !percentSpacing) {\n if (scale)\n lengths = spine.Utils.setArraySize(this.lengths, boneCount);\n var lengthSpacing = data.spacingMode == spine.SpacingMode.Length;\n for (var i = 0, n = spacesCount - 1; i < n;) {\n var bone = bones[i];\n var setupLength = bone.data.length;\n if (setupLength < PathConstraint.epsilon) {\n if (scale)\n lengths[i] = 0;\n spaces[++i] = 0;\n }\n else if (percentSpacing) {\n if (scale) {\n var x = setupLength * bone.a, y = setupLength * bone.c;\n var length_1 = Math.sqrt(x * x + y * y);\n lengths[i] = length_1;\n }\n spaces[++i] = spacing;\n }\n else {\n var x = setupLength * bone.a, y = setupLength * bone.c;\n var length_2 = Math.sqrt(x * x + y * y);\n if (scale)\n lengths[i] = length_2;\n spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length_2 / setupLength;\n }\n }\n }\n else {\n for (var i = 1; i < spacesCount; i++)\n spaces[i] = spacing;\n }\n var positions = this.computeWorldPositions(attachment, spacesCount, tangents, data.positionMode == spine.PositionMode.Percent, percentSpacing);\n var boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\n var tip = false;\n if (offsetRotation == 0)\n tip = rotateMode == spine.RotateMode.Chain;\n else {\n tip = false;\n var p = this.target.bone;\n offsetRotation *= p.a * p.d - p.b * p.c > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\n }\n for (var i = 0, p = 3; i < boneCount; i++, p += 3) {\n var bone = bones[i];\n bone.worldX += (boneX - bone.worldX) * translateMix;\n bone.worldY += (boneY - bone.worldY) * translateMix;\n var x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\n if (scale) {\n var length_3 = lengths[i];\n if (length_3 != 0) {\n var s = (Math.sqrt(dx * dx + dy * dy) / length_3 - 1) * rotateMix + 1;\n bone.a *= s;\n bone.c *= s;\n }\n }\n boneX = x;\n boneY = y;\n if (rotate) {\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d, r = 0, cos = 0, sin = 0;\n if (tangents)\n r = positions[p - 1];\n else if (spaces[i + 1] == 0)\n r = positions[p + 2];\n else\n r = Math.atan2(dy, dx);\n r -= Math.atan2(c, a);\n if (tip) {\n cos = Math.cos(r);\n sin = Math.sin(r);\n var length_4 = bone.data.length;\n boneX += (length_4 * (cos * a - sin * c) - dx) * rotateMix;\n boneY += (length_4 * (sin * a + cos * c) - dy) * rotateMix;\n }\n else {\n r += offsetRotation;\n }\n if (r > spine.MathUtils.PI)\n r -= spine.MathUtils.PI2;\n else if (r < -spine.MathUtils.PI)\n r += spine.MathUtils.PI2;\n r *= rotateMix;\n cos = Math.cos(r);\n sin = Math.sin(r);\n bone.a = cos * a - sin * c;\n bone.b = cos * b - sin * d;\n bone.c = sin * a + cos * c;\n bone.d = sin * b + cos * d;\n }\n bone.appliedValid = false;\n }\n };\n PathConstraint.prototype.computeWorldPositions = function (path, spacesCount, tangents, percentPosition, percentSpacing) {\n var target = this.target;\n var position = this.position;\n var spaces = this.spaces, out = spine.Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = null;\n var closed = path.closed;\n var verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = PathConstraint.NONE;\n if (!path.constantSpeed) {\n var lengths = path.lengths;\n curveCount -= closed ? 1 : 2;\n var pathLength_1 = lengths[curveCount];\n if (percentPosition)\n position *= pathLength_1;\n if (percentSpacing) {\n for (var i = 1; i < spacesCount; i++)\n spaces[i] *= pathLength_1;\n }\n world = spine.Utils.setArraySize(this.world, 8);\n for (var i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\n var space = spaces[i];\n position += space;\n var p = position;\n if (closed) {\n p %= pathLength_1;\n if (p < 0)\n p += pathLength_1;\n curve = 0;\n }\n else if (p < 0) {\n if (prevCurve != PathConstraint.BEFORE) {\n prevCurve = PathConstraint.BEFORE;\n path.computeWorldVertices(target, 2, 4, world, 0, 2);\n }\n this.addBeforePosition(p, world, 0, out, o);\n continue;\n }\n else if (p > pathLength_1) {\n if (prevCurve != PathConstraint.AFTER) {\n prevCurve = PathConstraint.AFTER;\n path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\n }\n this.addAfterPosition(p - pathLength_1, world, 0, out, o);\n continue;\n }\n for (;; curve++) {\n var length_5 = lengths[curve];\n if (p > length_5)\n continue;\n if (curve == 0)\n p /= length_5;\n else {\n var prev = lengths[curve - 1];\n p = (p - prev) / (length_5 - prev);\n }\n break;\n }\n if (curve != prevCurve) {\n prevCurve = curve;\n if (closed && curve == curveCount) {\n path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\n path.computeWorldVertices(target, 0, 4, world, 4, 2);\n }\n else\n path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\n }\n this.addCurvePosition(p, world[0], world[1], world[2], world[3], world[4], world[5], world[6], world[7], out, o, tangents || (i > 0 && space == 0));\n }\n return out;\n }\n if (closed) {\n verticesLength += 2;\n world = spine.Utils.setArraySize(this.world, verticesLength);\n path.computeWorldVertices(target, 2, verticesLength - 4, world, 0, 2);\n path.computeWorldVertices(target, 0, 2, world, verticesLength - 4, 2);\n world[verticesLength - 2] = world[0];\n world[verticesLength - 1] = world[1];\n }\n else {\n curveCount--;\n verticesLength -= 4;\n world = spine.Utils.setArraySize(this.world, verticesLength);\n path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\n }\n var curves = spine.Utils.setArraySize(this.curves, curveCount);\n var pathLength = 0;\n var x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\n var tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\n for (var i = 0, w = 2; i < curveCount; i++, w += 6) {\n cx1 = world[w];\n cy1 = world[w + 1];\n cx2 = world[w + 2];\n cy2 = world[w + 3];\n x2 = world[w + 4];\n y2 = world[w + 5];\n tmpx = (x1 - cx1 * 2 + cx2) * 0.1875;\n tmpy = (y1 - cy1 * 2 + cy2) * 0.1875;\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375;\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375;\n ddfx = tmpx * 2 + dddfx;\n ddfy = tmpy * 2 + dddfy;\n dfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667;\n dfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n dfx += ddfx;\n dfy += ddfy;\n ddfx += dddfx;\n ddfy += dddfy;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n dfx += ddfx;\n dfy += ddfy;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n dfx += ddfx + dddfx;\n dfy += ddfy + dddfy;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n curves[i] = pathLength;\n x1 = x2;\n y1 = y2;\n }\n if (percentPosition)\n position *= pathLength;\n else\n position *= pathLength / path.lengths[curveCount - 1];\n if (percentSpacing) {\n for (var i = 1; i < spacesCount; i++)\n spaces[i] *= pathLength;\n }\n var segments = this.segments;\n var curveLength = 0;\n for (var i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\n var space = spaces[i];\n position += space;\n var p = position;\n if (closed) {\n p %= pathLength;\n if (p < 0)\n p += pathLength;\n curve = 0;\n }\n else if (p < 0) {\n this.addBeforePosition(p, world, 0, out, o);\n continue;\n }\n else if (p > pathLength) {\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\n continue;\n }\n for (;; curve++) {\n var length_6 = curves[curve];\n if (p > length_6)\n continue;\n if (curve == 0)\n p /= length_6;\n else {\n var prev = curves[curve - 1];\n p = (p - prev) / (length_6 - prev);\n }\n break;\n }\n if (curve != prevCurve) {\n prevCurve = curve;\n var ii = curve * 6;\n x1 = world[ii];\n y1 = world[ii + 1];\n cx1 = world[ii + 2];\n cy1 = world[ii + 3];\n cx2 = world[ii + 4];\n cy2 = world[ii + 5];\n x2 = world[ii + 6];\n y2 = world[ii + 7];\n tmpx = (x1 - cx1 * 2 + cx2) * 0.03;\n tmpy = (y1 - cy1 * 2 + cy2) * 0.03;\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.006;\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.006;\n ddfx = tmpx * 2 + dddfx;\n ddfy = tmpy * 2 + dddfy;\n dfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667;\n dfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667;\n curveLength = Math.sqrt(dfx * dfx + dfy * dfy);\n segments[0] = curveLength;\n for (ii = 1; ii < 8; ii++) {\n dfx += ddfx;\n dfy += ddfy;\n ddfx += dddfx;\n ddfy += dddfy;\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\n segments[ii] = curveLength;\n }\n dfx += ddfx;\n dfy += ddfy;\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\n segments[8] = curveLength;\n dfx += ddfx + dddfx;\n dfy += ddfy + dddfy;\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\n segments[9] = curveLength;\n segment = 0;\n }\n p *= curveLength;\n for (;; segment++) {\n var length_7 = segments[segment];\n if (p > length_7)\n continue;\n if (segment == 0)\n p /= length_7;\n else {\n var prev = segments[segment - 1];\n p = segment + (p - prev) / (length_7 - prev);\n }\n break;\n }\n this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || (i > 0 && space == 0));\n }\n return out;\n };\n PathConstraint.prototype.addBeforePosition = function (p, temp, i, out, o) {\n var x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx);\n out[o] = x1 + p * Math.cos(r);\n out[o + 1] = y1 + p * Math.sin(r);\n out[o + 2] = r;\n };\n PathConstraint.prototype.addAfterPosition = function (p, temp, i, out, o) {\n var x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx);\n out[o] = x1 + p * Math.cos(r);\n out[o + 1] = y1 + p * Math.sin(r);\n out[o + 2] = r;\n };\n PathConstraint.prototype.addCurvePosition = function (p, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents) {\n if (p == 0 || isNaN(p)) {\n out[o] = x1;\n out[o + 1] = y1;\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\n return;\n }\n var tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\n var ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\n var x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt;\n out[o] = x;\n out[o + 1] = y;\n if (tangents) {\n if (p < 0.001)\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\n else\n out[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt));\n }\n };\n PathConstraint.NONE = -1;\n PathConstraint.BEFORE = -2;\n PathConstraint.AFTER = -3;\n PathConstraint.epsilon = 0.00001;\n return PathConstraint;\n }());\n spine.PathConstraint = PathConstraint;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var PathConstraintData = (function (_super) {\n __extends(PathConstraintData, _super);\n function PathConstraintData(name) {\n var _this = _super.call(this, name, 0, false) || this;\n _this.bones = new Array();\n return _this;\n }\n return PathConstraintData;\n }(spine.ConstraintData));\n spine.PathConstraintData = PathConstraintData;\n var PositionMode;\n (function (PositionMode) {\n PositionMode[PositionMode[\"Fixed\"] = 0] = \"Fixed\";\n PositionMode[PositionMode[\"Percent\"] = 1] = \"Percent\";\n })(PositionMode = spine.PositionMode || (spine.PositionMode = {}));\n var SpacingMode;\n (function (SpacingMode) {\n SpacingMode[SpacingMode[\"Length\"] = 0] = \"Length\";\n SpacingMode[SpacingMode[\"Fixed\"] = 1] = \"Fixed\";\n SpacingMode[SpacingMode[\"Percent\"] = 2] = \"Percent\";\n })(SpacingMode = spine.SpacingMode || (spine.SpacingMode = {}));\n var RotateMode;\n (function (RotateMode) {\n RotateMode[RotateMode[\"Tangent\"] = 0] = \"Tangent\";\n RotateMode[RotateMode[\"Chain\"] = 1] = \"Chain\";\n RotateMode[RotateMode[\"ChainScale\"] = 2] = \"ChainScale\";\n })(RotateMode = spine.RotateMode || (spine.RotateMode = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Assets = (function () {\n function Assets(clientId) {\n this.toLoad = new Array();\n this.assets = {};\n this.clientId = clientId;\n }\n Assets.prototype.loaded = function () {\n var i = 0;\n for (var v in this.assets)\n i++;\n return i;\n };\n return Assets;\n }());\n var SharedAssetManager = (function () {\n function SharedAssetManager(pathPrefix) {\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\n this.clientAssets = {};\n this.queuedAssets = {};\n this.rawAssets = {};\n this.errors = {};\n this.pathPrefix = pathPrefix;\n }\n SharedAssetManager.prototype.queueAsset = function (clientId, textureLoader, path) {\n var clientAssets = this.clientAssets[clientId];\n if (clientAssets === null || clientAssets === undefined) {\n clientAssets = new Assets(clientId);\n this.clientAssets[clientId] = clientAssets;\n }\n if (textureLoader !== null)\n clientAssets.textureLoader = textureLoader;\n clientAssets.toLoad.push(path);\n if (this.queuedAssets[path] === path) {\n return false;\n }\n else {\n this.queuedAssets[path] = path;\n return true;\n }\n };\n SharedAssetManager.prototype.loadText = function (clientId, path) {\n var _this = this;\n path = this.pathPrefix + path;\n if (!this.queueAsset(clientId, null, path))\n return;\n var request = new XMLHttpRequest();\n request.overrideMimeType(\"text/html\");\n request.onreadystatechange = function () {\n if (request.readyState == XMLHttpRequest.DONE) {\n if (request.status >= 200 && request.status < 300) {\n _this.rawAssets[path] = request.responseText;\n }\n else {\n _this.errors[path] = \"Couldn't load text \" + path + \": status \" + request.status + \", \" + request.responseText;\n }\n }\n };\n request.open(\"GET\", path, true);\n request.send();\n };\n SharedAssetManager.prototype.loadJson = function (clientId, path) {\n var _this = this;\n path = this.pathPrefix + path;\n if (!this.queueAsset(clientId, null, path))\n return;\n var request = new XMLHttpRequest();\n request.overrideMimeType(\"text/html\");\n request.onreadystatechange = function () {\n if (request.readyState == XMLHttpRequest.DONE) {\n if (request.status >= 200 && request.status < 300) {\n _this.rawAssets[path] = JSON.parse(request.responseText);\n }\n else {\n _this.errors[path] = \"Couldn't load text \" + path + \": status \" + request.status + \", \" + request.responseText;\n }\n }\n };\n request.open(\"GET\", path, true);\n request.send();\n };\n SharedAssetManager.prototype.loadTexture = function (clientId, textureLoader, path) {\n var _this = this;\n path = this.pathPrefix + path;\n if (!this.queueAsset(clientId, textureLoader, path))\n return;\n var img = new Image();\n img.crossOrigin = \"anonymous\";\n img.onload = function (ev) {\n _this.rawAssets[path] = img;\n };\n img.onerror = function (ev) {\n _this.errors[path] = \"Couldn't load image \" + path;\n };\n img.src = path;\n };\n SharedAssetManager.prototype.get = function (clientId, path) {\n path = this.pathPrefix + path;\n var clientAssets = this.clientAssets[clientId];\n if (clientAssets === null || clientAssets === undefined)\n return true;\n return clientAssets.assets[path];\n };\n SharedAssetManager.prototype.updateClientAssets = function (clientAssets) {\n for (var i = 0; i < clientAssets.toLoad.length; i++) {\n var path = clientAssets.toLoad[i];\n var asset = clientAssets.assets[path];\n if (asset === null || asset === undefined) {\n var rawAsset = this.rawAssets[path];\n if (rawAsset === null || rawAsset === undefined)\n continue;\n if (rawAsset instanceof HTMLImageElement) {\n clientAssets.assets[path] = clientAssets.textureLoader(rawAsset);\n }\n else {\n clientAssets.assets[path] = rawAsset;\n }\n }\n }\n };\n SharedAssetManager.prototype.isLoadingComplete = function (clientId) {\n var clientAssets = this.clientAssets[clientId];\n if (clientAssets === null || clientAssets === undefined)\n return true;\n this.updateClientAssets(clientAssets);\n return clientAssets.toLoad.length == clientAssets.loaded();\n };\n SharedAssetManager.prototype.dispose = function () {\n };\n SharedAssetManager.prototype.hasErrors = function () {\n return Object.keys(this.errors).length > 0;\n };\n SharedAssetManager.prototype.getErrors = function () {\n return this.errors;\n };\n return SharedAssetManager;\n }());\n spine.SharedAssetManager = SharedAssetManager;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Skeleton = (function () {\n function Skeleton(data) {\n this._updateCache = new Array();\n this.updateCacheReset = new Array();\n this.time = 0;\n this.scaleX = 1;\n this.scaleY = 1;\n this.x = 0;\n this.y = 0;\n if (data == null)\n throw new Error(\"data cannot be null.\");\n this.data = data;\n this.bones = new Array();\n for (var i = 0; i < data.bones.length; i++) {\n var boneData = data.bones[i];\n var bone = void 0;\n if (boneData.parent == null)\n bone = new spine.Bone(boneData, this, null);\n else {\n var parent_1 = this.bones[boneData.parent.index];\n bone = new spine.Bone(boneData, this, parent_1);\n parent_1.children.push(bone);\n }\n this.bones.push(bone);\n }\n this.slots = new Array();\n this.drawOrder = new Array();\n for (var i = 0; i < data.slots.length; i++) {\n var slotData = data.slots[i];\n var bone = this.bones[slotData.boneData.index];\n var slot = new spine.Slot(slotData, bone);\n this.slots.push(slot);\n this.drawOrder.push(slot);\n }\n this.ikConstraints = new Array();\n for (var i = 0; i < data.ikConstraints.length; i++) {\n var ikConstraintData = data.ikConstraints[i];\n this.ikConstraints.push(new spine.IkConstraint(ikConstraintData, this));\n }\n this.transformConstraints = new Array();\n for (var i = 0; i < data.transformConstraints.length; i++) {\n var transformConstraintData = data.transformConstraints[i];\n this.transformConstraints.push(new spine.TransformConstraint(transformConstraintData, this));\n }\n this.pathConstraints = new Array();\n for (var i = 0; i < data.pathConstraints.length; i++) {\n var pathConstraintData = data.pathConstraints[i];\n this.pathConstraints.push(new spine.PathConstraint(pathConstraintData, this));\n }\n this.color = new spine.Color(1, 1, 1, 1);\n this.updateCache();\n }\n Skeleton.prototype.updateCache = function () {\n var updateCache = this._updateCache;\n updateCache.length = 0;\n this.updateCacheReset.length = 0;\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n bone.sorted = bone.data.skinRequired;\n bone.active = !bone.sorted;\n }\n if (this.skin != null) {\n var skinBones = this.skin.bones;\n for (var i = 0, n = this.skin.bones.length; i < n; i++) {\n var bone = this.bones[skinBones[i].index];\n do {\n bone.sorted = false;\n bone.active = true;\n bone = bone.parent;\n } while (bone != null);\n }\n }\n var ikConstraints = this.ikConstraints;\n var transformConstraints = this.transformConstraints;\n var pathConstraints = this.pathConstraints;\n var ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\n var constraintCount = ikCount + transformCount + pathCount;\n outer: for (var i = 0; i < constraintCount; i++) {\n for (var ii = 0; ii < ikCount; ii++) {\n var constraint = ikConstraints[ii];\n if (constraint.data.order == i) {\n this.sortIkConstraint(constraint);\n continue outer;\n }\n }\n for (var ii = 0; ii < transformCount; ii++) {\n var constraint = transformConstraints[ii];\n if (constraint.data.order == i) {\n this.sortTransformConstraint(constraint);\n continue outer;\n }\n }\n for (var ii = 0; ii < pathCount; ii++) {\n var constraint = pathConstraints[ii];\n if (constraint.data.order == i) {\n this.sortPathConstraint(constraint);\n continue outer;\n }\n }\n }\n for (var i = 0, n = bones.length; i < n; i++)\n this.sortBone(bones[i]);\n };\n Skeleton.prototype.sortIkConstraint = function (constraint) {\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\n if (!constraint.active)\n return;\n var target = constraint.target;\n this.sortBone(target);\n var constrained = constraint.bones;\n var parent = constrained[0];\n this.sortBone(parent);\n if (constrained.length > 1) {\n var child = constrained[constrained.length - 1];\n if (!(this._updateCache.indexOf(child) > -1))\n this.updateCacheReset.push(child);\n }\n this._updateCache.push(constraint);\n this.sortReset(parent.children);\n constrained[constrained.length - 1].sorted = true;\n };\n Skeleton.prototype.sortPathConstraint = function (constraint) {\n constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\n if (!constraint.active)\n return;\n var slot = constraint.target;\n var slotIndex = slot.data.index;\n var slotBone = slot.bone;\n if (this.skin != null)\n this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\n if (this.data.defaultSkin != null && this.data.defaultSkin != this.skin)\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\n for (var i = 0, n = this.data.skins.length; i < n; i++)\n this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\n var attachment = slot.getAttachment();\n if (attachment instanceof spine.PathAttachment)\n this.sortPathConstraintAttachmentWith(attachment, slotBone);\n var constrained = constraint.bones;\n var boneCount = constrained.length;\n for (var i = 0; i < boneCount; i++)\n this.sortBone(constrained[i]);\n this._updateCache.push(constraint);\n for (var i = 0; i < boneCount; i++)\n this.sortReset(constrained[i].children);\n for (var i = 0; i < boneCount; i++)\n constrained[i].sorted = true;\n };\n Skeleton.prototype.sortTransformConstraint = function (constraint) {\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\n if (!constraint.active)\n return;\n this.sortBone(constraint.target);\n var constrained = constraint.bones;\n var boneCount = constrained.length;\n if (constraint.data.local) {\n for (var i = 0; i < boneCount; i++) {\n var child = constrained[i];\n this.sortBone(child.parent);\n if (!(this._updateCache.indexOf(child) > -1))\n this.updateCacheReset.push(child);\n }\n }\n else {\n for (var i = 0; i < boneCount; i++) {\n this.sortBone(constrained[i]);\n }\n }\n this._updateCache.push(constraint);\n for (var ii = 0; ii < boneCount; ii++)\n this.sortReset(constrained[ii].children);\n for (var ii = 0; ii < boneCount; ii++)\n constrained[ii].sorted = true;\n };\n Skeleton.prototype.sortPathConstraintAttachment = function (skin, slotIndex, slotBone) {\n var attachments = skin.attachments[slotIndex];\n if (!attachments)\n return;\n for (var key in attachments) {\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\n }\n };\n Skeleton.prototype.sortPathConstraintAttachmentWith = function (attachment, slotBone) {\n if (!(attachment instanceof spine.PathAttachment))\n return;\n var pathBones = attachment.bones;\n if (pathBones == null)\n this.sortBone(slotBone);\n else {\n var bones = this.bones;\n var i = 0;\n while (i < pathBones.length) {\n var boneCount = pathBones[i++];\n for (var n = i + boneCount; i < n; i++) {\n var boneIndex = pathBones[i];\n this.sortBone(bones[boneIndex]);\n }\n }\n }\n };\n Skeleton.prototype.sortBone = function (bone) {\n if (bone.sorted)\n return;\n var parent = bone.parent;\n if (parent != null)\n this.sortBone(parent);\n bone.sorted = true;\n this._updateCache.push(bone);\n };\n Skeleton.prototype.sortReset = function (bones) {\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n if (!bone.active)\n continue;\n if (bone.sorted)\n this.sortReset(bone.children);\n bone.sorted = false;\n }\n };\n Skeleton.prototype.updateWorldTransform = function () {\n var updateCacheReset = this.updateCacheReset;\n for (var i = 0, n = updateCacheReset.length; i < n; i++) {\n var bone = updateCacheReset[i];\n bone.ax = bone.x;\n bone.ay = bone.y;\n bone.arotation = bone.rotation;\n bone.ascaleX = bone.scaleX;\n bone.ascaleY = bone.scaleY;\n bone.ashearX = bone.shearX;\n bone.ashearY = bone.shearY;\n bone.appliedValid = true;\n }\n var updateCache = this._updateCache;\n for (var i = 0, n = updateCache.length; i < n; i++)\n updateCache[i].update();\n };\n Skeleton.prototype.setToSetupPose = function () {\n this.setBonesToSetupPose();\n this.setSlotsToSetupPose();\n };\n Skeleton.prototype.setBonesToSetupPose = function () {\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++)\n bones[i].setToSetupPose();\n var ikConstraints = this.ikConstraints;\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\n var constraint = ikConstraints[i];\n constraint.mix = constraint.data.mix;\n constraint.softness = constraint.data.softness;\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n }\n var transformConstraints = this.transformConstraints;\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\n var constraint = transformConstraints[i];\n var data = constraint.data;\n constraint.rotateMix = data.rotateMix;\n constraint.translateMix = data.translateMix;\n constraint.scaleMix = data.scaleMix;\n constraint.shearMix = data.shearMix;\n }\n var pathConstraints = this.pathConstraints;\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\n var constraint = pathConstraints[i];\n var data = constraint.data;\n constraint.position = data.position;\n constraint.spacing = data.spacing;\n constraint.rotateMix = data.rotateMix;\n constraint.translateMix = data.translateMix;\n }\n };\n Skeleton.prototype.setSlotsToSetupPose = function () {\n var slots = this.slots;\n spine.Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\n for (var i = 0, n = slots.length; i < n; i++)\n slots[i].setToSetupPose();\n };\n Skeleton.prototype.getRootBone = function () {\n if (this.bones.length == 0)\n return null;\n return this.bones[0];\n };\n Skeleton.prototype.findBone = function (boneName) {\n if (boneName == null)\n throw new Error(\"boneName cannot be null.\");\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n if (bone.data.name == boneName)\n return bone;\n }\n return null;\n };\n Skeleton.prototype.findBoneIndex = function (boneName) {\n if (boneName == null)\n throw new Error(\"boneName cannot be null.\");\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++)\n if (bones[i].data.name == boneName)\n return i;\n return -1;\n };\n Skeleton.prototype.findSlot = function (slotName) {\n if (slotName == null)\n throw new Error(\"slotName cannot be null.\");\n var slots = this.slots;\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n if (slot.data.name == slotName)\n return slot;\n }\n return null;\n };\n Skeleton.prototype.findSlotIndex = function (slotName) {\n if (slotName == null)\n throw new Error(\"slotName cannot be null.\");\n var slots = this.slots;\n for (var i = 0, n = slots.length; i < n; i++)\n if (slots[i].data.name == slotName)\n return i;\n return -1;\n };\n Skeleton.prototype.setSkinByName = function (skinName) {\n var skin = this.data.findSkin(skinName);\n if (skin == null)\n throw new Error(\"Skin not found: \" + skinName);\n this.setSkin(skin);\n };\n Skeleton.prototype.setSkin = function (newSkin) {\n if (newSkin == this.skin)\n return;\n if (newSkin != null) {\n if (this.skin != null)\n newSkin.attachAll(this, this.skin);\n else {\n var slots = this.slots;\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n var name_1 = slot.data.attachmentName;\n if (name_1 != null) {\n var attachment = newSkin.getAttachment(i, name_1);\n if (attachment != null)\n slot.setAttachment(attachment);\n }\n }\n }\n }\n this.skin = newSkin;\n this.updateCache();\n };\n Skeleton.prototype.getAttachmentByName = function (slotName, attachmentName) {\n return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName);\n };\n Skeleton.prototype.getAttachment = function (slotIndex, attachmentName) {\n if (attachmentName == null)\n throw new Error(\"attachmentName cannot be null.\");\n if (this.skin != null) {\n var attachment = this.skin.getAttachment(slotIndex, attachmentName);\n if (attachment != null)\n return attachment;\n }\n if (this.data.defaultSkin != null)\n return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\n return null;\n };\n Skeleton.prototype.setAttachment = function (slotName, attachmentName) {\n if (slotName == null)\n throw new Error(\"slotName cannot be null.\");\n var slots = this.slots;\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n if (slot.data.name == slotName) {\n var attachment = null;\n if (attachmentName != null) {\n attachment = this.getAttachment(i, attachmentName);\n if (attachment == null)\n throw new Error(\"Attachment not found: \" + attachmentName + \", for slot: \" + slotName);\n }\n slot.setAttachment(attachment);\n return;\n }\n }\n throw new Error(\"Slot not found: \" + slotName);\n };\n Skeleton.prototype.findIkConstraint = function (constraintName) {\n if (constraintName == null)\n throw new Error(\"constraintName cannot be null.\");\n var ikConstraints = this.ikConstraints;\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\n var ikConstraint = ikConstraints[i];\n if (ikConstraint.data.name == constraintName)\n return ikConstraint;\n }\n return null;\n };\n Skeleton.prototype.findTransformConstraint = function (constraintName) {\n if (constraintName == null)\n throw new Error(\"constraintName cannot be null.\");\n var transformConstraints = this.transformConstraints;\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\n var constraint = transformConstraints[i];\n if (constraint.data.name == constraintName)\n return constraint;\n }\n return null;\n };\n Skeleton.prototype.findPathConstraint = function (constraintName) {\n if (constraintName == null)\n throw new Error(\"constraintName cannot be null.\");\n var pathConstraints = this.pathConstraints;\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\n var constraint = pathConstraints[i];\n if (constraint.data.name == constraintName)\n return constraint;\n }\n return null;\n };\n Skeleton.prototype.getBounds = function (offset, size, temp) {\n if (temp === void 0) { temp = new Array(2); }\n if (offset == null)\n throw new Error(\"offset cannot be null.\");\n if (size == null)\n throw new Error(\"size cannot be null.\");\n var drawOrder = this.drawOrder;\n var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\n for (var i = 0, n = drawOrder.length; i < n; i++) {\n var slot = drawOrder[i];\n if (!slot.bone.active)\n continue;\n var verticesLength = 0;\n var vertices = null;\n var attachment = slot.getAttachment();\n if (attachment instanceof spine.RegionAttachment) {\n verticesLength = 8;\n vertices = spine.Utils.setArraySize(temp, verticesLength, 0);\n attachment.computeWorldVertices(slot.bone, vertices, 0, 2);\n }\n else if (attachment instanceof spine.MeshAttachment) {\n var mesh = attachment;\n verticesLength = mesh.worldVerticesLength;\n vertices = spine.Utils.setArraySize(temp, verticesLength, 0);\n mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\n }\n if (vertices != null) {\n for (var ii = 0, nn = vertices.length; ii < nn; ii += 2) {\n var x = vertices[ii], y = vertices[ii + 1];\n minX = Math.min(minX, x);\n minY = Math.min(minY, y);\n maxX = Math.max(maxX, x);\n maxY = Math.max(maxY, y);\n }\n }\n }\n offset.set(minX, minY);\n size.set(maxX - minX, maxY - minY);\n };\n Skeleton.prototype.update = function (delta) {\n this.time += delta;\n };\n return Skeleton;\n }());\n spine.Skeleton = Skeleton;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SkeletonBinary = (function () {\n function SkeletonBinary(attachmentLoader) {\n this.scale = 1;\n this.linkedMeshes = new Array();\n this.attachmentLoader = attachmentLoader;\n }\n SkeletonBinary.prototype.readSkeletonData = function (binary) {\n var scale = this.scale;\n var skeletonData = new spine.SkeletonData();\n skeletonData.name = \"\";\n var input = new BinaryInput(binary);\n skeletonData.hash = input.readString();\n skeletonData.version = input.readString();\n if (\"3.8.75\" == skeletonData.version)\n throw new Error(\"Unsupported skeleton data, please export with a newer version of Spine.\");\n skeletonData.x = input.readFloat();\n skeletonData.y = input.readFloat();\n skeletonData.width = input.readFloat();\n skeletonData.height = input.readFloat();\n var nonessential = input.readBoolean();\n if (nonessential) {\n skeletonData.fps = input.readFloat();\n skeletonData.imagesPath = input.readString();\n skeletonData.audioPath = input.readString();\n }\n var n = 0;\n n = input.readInt(true);\n for (var i = 0; i < n; i++)\n input.strings.push(input.readString());\n n = input.readInt(true);\n for (var i = 0; i < n; i++) {\n var name_2 = input.readString();\n var parent_2 = i == 0 ? null : skeletonData.bones[input.readInt(true)];\n var data = new spine.BoneData(i, name_2, parent_2);\n data.rotation = input.readFloat();\n data.x = input.readFloat() * scale;\n data.y = input.readFloat() * scale;\n data.scaleX = input.readFloat();\n data.scaleY = input.readFloat();\n data.shearX = input.readFloat();\n data.shearY = input.readFloat();\n data.length = input.readFloat() * scale;\n data.transformMode = SkeletonBinary.TransformModeValues[input.readInt(true)];\n data.skinRequired = input.readBoolean();\n if (nonessential)\n spine.Color.rgba8888ToColor(data.color, input.readInt32());\n skeletonData.bones.push(data);\n }\n n = input.readInt(true);\n for (var i = 0; i < n; i++) {\n var slotName = input.readString();\n var boneData = skeletonData.bones[input.readInt(true)];\n var data = new spine.SlotData(i, slotName, boneData);\n spine.Color.rgba8888ToColor(data.color, input.readInt32());\n var darkColor = input.readInt32();\n if (darkColor != -1)\n spine.Color.rgb888ToColor(data.darkColor = new spine.Color(), darkColor);\n data.attachmentName = input.readStringRef();\n data.blendMode = SkeletonBinary.BlendModeValues[input.readInt(true)];\n skeletonData.slots.push(data);\n }\n n = input.readInt(true);\n for (var i = 0, nn = void 0; i < n; i++) {\n var data = new spine.IkConstraintData(input.readString());\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (var ii = 0; ii < nn; ii++)\n data.bones.push(skeletonData.bones[input.readInt(true)]);\n data.target = skeletonData.bones[input.readInt(true)];\n data.mix = input.readFloat();\n data.softness = input.readFloat() * scale;\n data.bendDirection = input.readByte();\n data.compress = input.readBoolean();\n data.stretch = input.readBoolean();\n data.uniform = input.readBoolean();\n skeletonData.ikConstraints.push(data);\n }\n n = input.readInt(true);\n for (var i = 0, nn = void 0; i < n; i++) {\n var data = new spine.TransformConstraintData(input.readString());\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (var ii = 0; ii < nn; ii++)\n data.bones.push(skeletonData.bones[input.readInt(true)]);\n data.target = skeletonData.bones[input.readInt(true)];\n data.local = input.readBoolean();\n data.relative = input.readBoolean();\n data.offsetRotation = input.readFloat();\n data.offsetX = input.readFloat() * scale;\n data.offsetY = input.readFloat() * scale;\n data.offsetScaleX = input.readFloat();\n data.offsetScaleY = input.readFloat();\n data.offsetShearY = input.readFloat();\n data.rotateMix = input.readFloat();\n data.translateMix = input.readFloat();\n data.scaleMix = input.readFloat();\n data.shearMix = input.readFloat();\n skeletonData.transformConstraints.push(data);\n }\n n = input.readInt(true);\n for (var i = 0, nn = void 0; i < n; i++) {\n var data = new spine.PathConstraintData(input.readString());\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (var ii = 0; ii < nn; ii++)\n data.bones.push(skeletonData.bones[input.readInt(true)]);\n data.target = skeletonData.slots[input.readInt(true)];\n data.positionMode = SkeletonBinary.PositionModeValues[input.readInt(true)];\n data.spacingMode = SkeletonBinary.SpacingModeValues[input.readInt(true)];\n data.rotateMode = SkeletonBinary.RotateModeValues[input.readInt(true)];\n data.offsetRotation = input.readFloat();\n data.position = input.readFloat();\n if (data.positionMode == spine.PositionMode.Fixed)\n data.position *= scale;\n data.spacing = input.readFloat();\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\n data.spacing *= scale;\n data.rotateMix = input.readFloat();\n data.translateMix = input.readFloat();\n skeletonData.pathConstraints.push(data);\n }\n var defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\n if (defaultSkin != null) {\n skeletonData.defaultSkin = defaultSkin;\n skeletonData.skins.push(defaultSkin);\n }\n {\n var i = skeletonData.skins.length;\n spine.Utils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\n for (; i < n; i++)\n skeletonData.skins[i] = this.readSkin(input, skeletonData, false, nonessential);\n }\n n = this.linkedMeshes.length;\n for (var i = 0; i < n; i++) {\n var linkedMesh = this.linkedMeshes[i];\n var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\n if (skin == null)\n throw new Error(\"Skin not found: \" + linkedMesh.skin);\n var parent_3 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\n if (parent_3 == null)\n throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_3 : linkedMesh.mesh;\n linkedMesh.mesh.setParentMesh(parent_3);\n linkedMesh.mesh.updateUVs();\n }\n this.linkedMeshes.length = 0;\n n = input.readInt(true);\n for (var i = 0; i < n; i++) {\n var data = new spine.EventData(input.readStringRef());\n data.intValue = input.readInt(false);\n data.floatValue = input.readFloat();\n data.stringValue = input.readString();\n data.audioPath = input.readString();\n if (data.audioPath != null) {\n data.volume = input.readFloat();\n data.balance = input.readFloat();\n }\n skeletonData.events.push(data);\n }\n n = input.readInt(true);\n for (var i = 0; i < n; i++)\n skeletonData.animations.push(this.readAnimation(input, input.readString(), skeletonData));\n return skeletonData;\n };\n SkeletonBinary.prototype.readSkin = function (input, skeletonData, defaultSkin, nonessential) {\n var skin = null;\n var slotCount = 0;\n if (defaultSkin) {\n slotCount = input.readInt(true);\n if (slotCount == 0)\n return null;\n skin = new spine.Skin(\"default\");\n }\n else {\n skin = new spine.Skin(input.readStringRef());\n skin.bones.length = input.readInt(true);\n for (var i = 0, n = skin.bones.length; i < n; i++)\n skin.bones[i] = skeletonData.bones[input.readInt(true)];\n for (var i = 0, n = input.readInt(true); i < n; i++)\n skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\n for (var i = 0, n = input.readInt(true); i < n; i++)\n skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\n for (var i = 0, n = input.readInt(true); i < n; i++)\n skin.constraints.push(skeletonData.pathConstraints[input.readInt(true)]);\n slotCount = input.readInt(true);\n }\n for (var i = 0; i < slotCount; i++) {\n var slotIndex = input.readInt(true);\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n var name_3 = input.readStringRef();\n var attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name_3, nonessential);\n if (attachment != null)\n skin.setAttachment(slotIndex, name_3, attachment);\n }\n }\n return skin;\n };\n SkeletonBinary.prototype.readAttachment = function (input, skeletonData, skin, slotIndex, attachmentName, nonessential) {\n var scale = this.scale;\n var name = input.readStringRef();\n if (name == null)\n name = attachmentName;\n var typeIndex = input.readByte();\n var type = SkeletonBinary.AttachmentTypeValues[typeIndex];\n switch (type) {\n case spine.AttachmentType.Region: {\n var path = input.readStringRef();\n var rotation = input.readFloat();\n var x = input.readFloat();\n var y = input.readFloat();\n var scaleX = input.readFloat();\n var scaleY = input.readFloat();\n var width = input.readFloat();\n var height = input.readFloat();\n var color = input.readInt32();\n if (path == null)\n path = name;\n var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\n if (region == null)\n return null;\n region.path = path;\n region.x = x * scale;\n region.y = y * scale;\n region.scaleX = scaleX;\n region.scaleY = scaleY;\n region.rotation = rotation;\n region.width = width * scale;\n region.height = height * scale;\n spine.Color.rgba8888ToColor(region.color, color);\n region.updateOffset();\n return region;\n }\n case spine.AttachmentType.BoundingBox: {\n var vertexCount = input.readInt(true);\n var vertices = this.readVertices(input, vertexCount);\n var color = nonessential ? input.readInt32() : 0;\n var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\n if (box == null)\n return null;\n box.worldVerticesLength = vertexCount << 1;\n box.vertices = vertices.vertices;\n box.bones = vertices.bones;\n if (nonessential)\n spine.Color.rgba8888ToColor(box.color, color);\n return box;\n }\n case spine.AttachmentType.Mesh: {\n var path = input.readStringRef();\n var color = input.readInt32();\n var vertexCount = input.readInt(true);\n var uvs = this.readFloatArray(input, vertexCount << 1, 1);\n var triangles = this.readShortArray(input);\n var vertices = this.readVertices(input, vertexCount);\n var hullLength = input.readInt(true);\n var edges = null;\n var width = 0, height = 0;\n if (nonessential) {\n edges = this.readShortArray(input);\n width = input.readFloat();\n height = input.readFloat();\n }\n if (path == null)\n path = name;\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\n if (mesh == null)\n return null;\n mesh.path = path;\n spine.Color.rgba8888ToColor(mesh.color, color);\n mesh.bones = vertices.bones;\n mesh.vertices = vertices.vertices;\n mesh.worldVerticesLength = vertexCount << 1;\n mesh.triangles = triangles;\n mesh.regionUVs = uvs;\n mesh.updateUVs();\n mesh.hullLength = hullLength << 1;\n if (nonessential) {\n mesh.edges = edges;\n mesh.width = width * scale;\n mesh.height = height * scale;\n }\n return mesh;\n }\n case spine.AttachmentType.LinkedMesh: {\n var path = input.readStringRef();\n var color = input.readInt32();\n var skinName = input.readStringRef();\n var parent_4 = input.readStringRef();\n var inheritDeform = input.readBoolean();\n var width = 0, height = 0;\n if (nonessential) {\n width = input.readFloat();\n height = input.readFloat();\n }\n if (path == null)\n path = name;\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\n if (mesh == null)\n return null;\n mesh.path = path;\n spine.Color.rgba8888ToColor(mesh.color, color);\n if (nonessential) {\n mesh.width = width * scale;\n mesh.height = height * scale;\n }\n this.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent_4, inheritDeform));\n return mesh;\n }\n case spine.AttachmentType.Path: {\n var closed_1 = input.readBoolean();\n var constantSpeed = input.readBoolean();\n var vertexCount = input.readInt(true);\n var vertices = this.readVertices(input, vertexCount);\n var lengths = spine.Utils.newArray(vertexCount / 3, 0);\n for (var i = 0, n = lengths.length; i < n; i++)\n lengths[i] = input.readFloat() * scale;\n var color = nonessential ? input.readInt32() : 0;\n var path = this.attachmentLoader.newPathAttachment(skin, name);\n if (path == null)\n return null;\n path.closed = closed_1;\n path.constantSpeed = constantSpeed;\n path.worldVerticesLength = vertexCount << 1;\n path.vertices = vertices.vertices;\n path.bones = vertices.bones;\n path.lengths = lengths;\n if (nonessential)\n spine.Color.rgba8888ToColor(path.color, color);\n return path;\n }\n case spine.AttachmentType.Point: {\n var rotation = input.readFloat();\n var x = input.readFloat();\n var y = input.readFloat();\n var color = nonessential ? input.readInt32() : 0;\n var point = this.attachmentLoader.newPointAttachment(skin, name);\n if (point == null)\n return null;\n point.x = x * scale;\n point.y = y * scale;\n point.rotation = rotation;\n if (nonessential)\n spine.Color.rgba8888ToColor(point.color, color);\n return point;\n }\n case spine.AttachmentType.Clipping: {\n var endSlotIndex = input.readInt(true);\n var vertexCount = input.readInt(true);\n var vertices = this.readVertices(input, vertexCount);\n var color = nonessential ? input.readInt32() : 0;\n var clip = this.attachmentLoader.newClippingAttachment(skin, name);\n if (clip == null)\n return null;\n clip.endSlot = skeletonData.slots[endSlotIndex];\n clip.worldVerticesLength = vertexCount << 1;\n clip.vertices = vertices.vertices;\n clip.bones = vertices.bones;\n if (nonessential)\n spine.Color.rgba8888ToColor(clip.color, color);\n return clip;\n }\n }\n return null;\n };\n SkeletonBinary.prototype.readVertices = function (input, vertexCount) {\n var verticesLength = vertexCount << 1;\n var vertices = new Vertices();\n var scale = this.scale;\n if (!input.readBoolean()) {\n vertices.vertices = this.readFloatArray(input, verticesLength, scale);\n return vertices;\n }\n var weights = new Array();\n var bonesArray = new Array();\n for (var i = 0; i < vertexCount; i++) {\n var boneCount = input.readInt(true);\n bonesArray.push(boneCount);\n for (var ii = 0; ii < boneCount; ii++) {\n bonesArray.push(input.readInt(true));\n weights.push(input.readFloat() * scale);\n weights.push(input.readFloat() * scale);\n weights.push(input.readFloat());\n }\n }\n vertices.vertices = spine.Utils.toFloatArray(weights);\n vertices.bones = bonesArray;\n return vertices;\n };\n SkeletonBinary.prototype.readFloatArray = function (input, n, scale) {\n var array = new Array(n);\n if (scale == 1) {\n for (var i = 0; i < n; i++)\n array[i] = input.readFloat();\n }\n else {\n for (var i = 0; i < n; i++)\n array[i] = input.readFloat() * scale;\n }\n return array;\n };\n SkeletonBinary.prototype.readShortArray = function (input) {\n var n = input.readInt(true);\n var array = new Array(n);\n for (var i = 0; i < n; i++)\n array[i] = input.readShort();\n return array;\n };\n SkeletonBinary.prototype.readAnimation = function (input, name, skeletonData) {\n var timelines = new Array();\n var scale = this.scale;\n var duration = 0;\n var tempColor1 = new spine.Color();\n var tempColor2 = new spine.Color();\n for (var i = 0, n = input.readInt(true); i < n; i++) {\n var slotIndex = input.readInt(true);\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n var timelineType = input.readByte();\n var frameCount = input.readInt(true);\n switch (timelineType) {\n case SkeletonBinary.SLOT_ATTACHMENT: {\n var timeline = new spine.AttachmentTimeline(frameCount);\n timeline.slotIndex = slotIndex;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++)\n timeline.setFrame(frameIndex, input.readFloat(), input.readStringRef());\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[frameCount - 1]);\n break;\n }\n case SkeletonBinary.SLOT_COLOR: {\n var timeline = new spine.ColorTimeline(frameCount);\n timeline.slotIndex = slotIndex;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n var time = input.readFloat();\n spine.Color.rgba8888ToColor(tempColor1, input.readInt32());\n timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a);\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.ColorTimeline.ENTRIES]);\n break;\n }\n case SkeletonBinary.SLOT_TWO_COLOR: {\n var timeline = new spine.TwoColorTimeline(frameCount);\n timeline.slotIndex = slotIndex;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n var time = input.readFloat();\n spine.Color.rgba8888ToColor(tempColor1, input.readInt32());\n spine.Color.rgb888ToColor(tempColor2, input.readInt32());\n timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a, tempColor2.r, tempColor2.g, tempColor2.b);\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TwoColorTimeline.ENTRIES]);\n break;\n }\n }\n }\n }\n for (var i = 0, n = input.readInt(true); i < n; i++) {\n var boneIndex = input.readInt(true);\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n var timelineType = input.readByte();\n var frameCount = input.readInt(true);\n switch (timelineType) {\n case SkeletonBinary.BONE_ROTATE: {\n var timeline = new spine.RotateTimeline(frameCount);\n timeline.boneIndex = boneIndex;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat());\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.RotateTimeline.ENTRIES]);\n break;\n }\n case SkeletonBinary.BONE_TRANSLATE:\n case SkeletonBinary.BONE_SCALE:\n case SkeletonBinary.BONE_SHEAR: {\n var timeline = void 0;\n var timelineScale = 1;\n if (timelineType == SkeletonBinary.BONE_SCALE)\n timeline = new spine.ScaleTimeline(frameCount);\n else if (timelineType == SkeletonBinary.BONE_SHEAR)\n timeline = new spine.ShearTimeline(frameCount);\n else {\n timeline = new spine.TranslateTimeline(frameCount);\n timelineScale = scale;\n }\n timeline.boneIndex = boneIndex;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale, input.readFloat() * timelineScale);\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TranslateTimeline.ENTRIES]);\n break;\n }\n }\n }\n }\n for (var i = 0, n = input.readInt(true); i < n; i++) {\n var index = input.readInt(true);\n var frameCount = input.readInt(true);\n var timeline = new spine.IkConstraintTimeline(frameCount);\n timeline.ikConstraintIndex = index;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat() * scale, input.readByte(), input.readBoolean(), input.readBoolean());\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.IkConstraintTimeline.ENTRIES]);\n }\n for (var i = 0, n = input.readInt(true); i < n; i++) {\n var index = input.readInt(true);\n var frameCount = input.readInt(true);\n var timeline = new spine.TransformConstraintTimeline(frameCount);\n timeline.transformConstraintIndex = index;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TransformConstraintTimeline.ENTRIES]);\n }\n for (var i = 0, n = input.readInt(true); i < n; i++) {\n var index = input.readInt(true);\n var data = skeletonData.pathConstraints[index];\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n var timelineType = input.readByte();\n var frameCount = input.readInt(true);\n switch (timelineType) {\n case SkeletonBinary.PATH_POSITION:\n case SkeletonBinary.PATH_SPACING: {\n var timeline = void 0;\n var timelineScale = 1;\n if (timelineType == SkeletonBinary.PATH_SPACING) {\n timeline = new spine.PathConstraintSpacingTimeline(frameCount);\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\n timelineScale = scale;\n }\n else {\n timeline = new spine.PathConstraintPositionTimeline(frameCount);\n if (data.positionMode == spine.PositionMode.Fixed)\n timelineScale = scale;\n }\n timeline.pathConstraintIndex = index;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale);\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\n break;\n }\n case SkeletonBinary.PATH_MIX: {\n var timeline = new spine.PathConstraintMixTimeline(frameCount);\n timeline.pathConstraintIndex = index;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat());\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\n break;\n }\n }\n }\n }\n for (var i = 0, n = input.readInt(true); i < n; i++) {\n var skin = skeletonData.skins[input.readInt(true)];\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n var slotIndex = input.readInt(true);\n for (var iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\n var attachment = skin.getAttachment(slotIndex, input.readStringRef());\n var weighted = attachment.bones != null;\n var vertices = attachment.vertices;\n var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\n var frameCount = input.readInt(true);\n var timeline = new spine.DeformTimeline(frameCount);\n timeline.slotIndex = slotIndex;\n timeline.attachment = attachment;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n var time = input.readFloat();\n var deform = void 0;\n var end = input.readInt(true);\n if (end == 0)\n deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\n else {\n deform = spine.Utils.newFloatArray(deformLength);\n var start = input.readInt(true);\n end += start;\n if (scale == 1) {\n for (var v = start; v < end; v++)\n deform[v] = input.readFloat();\n }\n else {\n for (var v = start; v < end; v++)\n deform[v] = input.readFloat() * scale;\n }\n if (!weighted) {\n for (var v = 0, vn = deform.length; v < vn; v++)\n deform[v] += vertices[v];\n }\n }\n timeline.setFrame(frameIndex, time, deform);\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[frameCount - 1]);\n }\n }\n }\n var drawOrderCount = input.readInt(true);\n if (drawOrderCount > 0) {\n var timeline = new spine.DrawOrderTimeline(drawOrderCount);\n var slotCount = skeletonData.slots.length;\n for (var i = 0; i < drawOrderCount; i++) {\n var time = input.readFloat();\n var offsetCount = input.readInt(true);\n var drawOrder = spine.Utils.newArray(slotCount, 0);\n for (var ii = slotCount - 1; ii >= 0; ii--)\n drawOrder[ii] = -1;\n var unchanged = spine.Utils.newArray(slotCount - offsetCount, 0);\n var originalIndex = 0, unchangedIndex = 0;\n for (var ii = 0; ii < offsetCount; ii++) {\n var slotIndex = input.readInt(true);\n while (originalIndex != slotIndex)\n unchanged[unchangedIndex++] = originalIndex++;\n drawOrder[originalIndex + input.readInt(true)] = originalIndex++;\n }\n while (originalIndex < slotCount)\n unchanged[unchangedIndex++] = originalIndex++;\n for (var ii = slotCount - 1; ii >= 0; ii--)\n if (drawOrder[ii] == -1)\n drawOrder[ii] = unchanged[--unchangedIndex];\n timeline.setFrame(i, time, drawOrder);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[drawOrderCount - 1]);\n }\n var eventCount = input.readInt(true);\n if (eventCount > 0) {\n var timeline = new spine.EventTimeline(eventCount);\n for (var i = 0; i < eventCount; i++) {\n var time = input.readFloat();\n var eventData = skeletonData.events[input.readInt(true)];\n var event_4 = new spine.Event(time, eventData);\n event_4.intValue = input.readInt(false);\n event_4.floatValue = input.readFloat();\n event_4.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\n if (event_4.data.audioPath != null) {\n event_4.volume = input.readFloat();\n event_4.balance = input.readFloat();\n }\n timeline.setFrame(i, event_4);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[eventCount - 1]);\n }\n return new spine.Animation(name, timelines, duration);\n };\n SkeletonBinary.prototype.readCurve = function (input, frameIndex, timeline) {\n switch (input.readByte()) {\n case SkeletonBinary.CURVE_STEPPED:\n timeline.setStepped(frameIndex);\n break;\n case SkeletonBinary.CURVE_BEZIER:\n this.setCurve(timeline, frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\n break;\n }\n };\n SkeletonBinary.prototype.setCurve = function (timeline, frameIndex, cx1, cy1, cx2, cy2) {\n timeline.setCurve(frameIndex, cx1, cy1, cx2, cy2);\n };\n SkeletonBinary.AttachmentTypeValues = [0, 1, 2, 3, 4, 5, 6];\n SkeletonBinary.TransformModeValues = [spine.TransformMode.Normal, spine.TransformMode.OnlyTranslation, spine.TransformMode.NoRotationOrReflection, spine.TransformMode.NoScale, spine.TransformMode.NoScaleOrReflection];\n SkeletonBinary.PositionModeValues = [spine.PositionMode.Fixed, spine.PositionMode.Percent];\n SkeletonBinary.SpacingModeValues = [spine.SpacingMode.Length, spine.SpacingMode.Fixed, spine.SpacingMode.Percent];\n SkeletonBinary.RotateModeValues = [spine.RotateMode.Tangent, spine.RotateMode.Chain, spine.RotateMode.ChainScale];\n SkeletonBinary.BlendModeValues = [spine.BlendMode.Normal, spine.BlendMode.Additive, spine.BlendMode.Multiply, spine.BlendMode.Screen];\n SkeletonBinary.BONE_ROTATE = 0;\n SkeletonBinary.BONE_TRANSLATE = 1;\n SkeletonBinary.BONE_SCALE = 2;\n SkeletonBinary.BONE_SHEAR = 3;\n SkeletonBinary.SLOT_ATTACHMENT = 0;\n SkeletonBinary.SLOT_COLOR = 1;\n SkeletonBinary.SLOT_TWO_COLOR = 2;\n SkeletonBinary.PATH_POSITION = 0;\n SkeletonBinary.PATH_SPACING = 1;\n SkeletonBinary.PATH_MIX = 2;\n SkeletonBinary.CURVE_LINEAR = 0;\n SkeletonBinary.CURVE_STEPPED = 1;\n SkeletonBinary.CURVE_BEZIER = 2;\n return SkeletonBinary;\n }());\n spine.SkeletonBinary = SkeletonBinary;\n var BinaryInput = (function () {\n function BinaryInput(data, strings, index, buffer) {\n if (strings === void 0) { strings = new Array(); }\n if (index === void 0) { index = 0; }\n if (buffer === void 0) { buffer = new DataView(data.buffer); }\n this.strings = strings;\n this.index = index;\n this.buffer = buffer;\n }\n BinaryInput.prototype.readByte = function () {\n return this.buffer.getInt8(this.index++);\n };\n BinaryInput.prototype.readShort = function () {\n var value = this.buffer.getInt16(this.index);\n this.index += 2;\n return value;\n };\n BinaryInput.prototype.readInt32 = function () {\n var value = this.buffer.getInt32(this.index);\n this.index += 4;\n return value;\n };\n BinaryInput.prototype.readInt = function (optimizePositive) {\n var b = this.readByte();\n var result = b & 0x7F;\n if ((b & 0x80) != 0) {\n b = this.readByte();\n result |= (b & 0x7F) << 7;\n if ((b & 0x80) != 0) {\n b = this.readByte();\n result |= (b & 0x7F) << 14;\n if ((b & 0x80) != 0) {\n b = this.readByte();\n result |= (b & 0x7F) << 21;\n if ((b & 0x80) != 0) {\n b = this.readByte();\n result |= (b & 0x7F) << 28;\n }\n }\n }\n }\n return optimizePositive ? result : ((result >>> 1) ^ -(result & 1));\n };\n BinaryInput.prototype.readStringRef = function () {\n var index = this.readInt(true);\n return index == 0 ? null : this.strings[index - 1];\n };\n BinaryInput.prototype.readString = function () {\n var byteCount = this.readInt(true);\n switch (byteCount) {\n case 0:\n return null;\n case 1:\n return \"\";\n }\n byteCount--;\n var chars = \"\";\n var charCount = 0;\n for (var i = 0; i < byteCount;) {\n var b = this.readByte();\n switch (b >> 4) {\n case 12:\n case 13:\n chars += String.fromCharCode(((b & 0x1F) << 6 | this.readByte() & 0x3F));\n i += 2;\n break;\n case 14:\n chars += String.fromCharCode(((b & 0x0F) << 12 | (this.readByte() & 0x3F) << 6 | this.readByte() & 0x3F));\n i += 3;\n break;\n default:\n chars += String.fromCharCode(b);\n i++;\n }\n }\n return chars;\n };\n BinaryInput.prototype.readFloat = function () {\n var value = this.buffer.getFloat32(this.index);\n this.index += 4;\n return value;\n };\n BinaryInput.prototype.readBoolean = function () {\n return this.readByte() != 0;\n };\n return BinaryInput;\n }());\n var LinkedMesh = (function () {\n function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\n this.mesh = mesh;\n this.skin = skin;\n this.slotIndex = slotIndex;\n this.parent = parent;\n this.inheritDeform = inheritDeform;\n }\n return LinkedMesh;\n }());\n var Vertices = (function () {\n function Vertices(bones, vertices) {\n if (bones === void 0) { bones = null; }\n if (vertices === void 0) { vertices = null; }\n this.bones = bones;\n this.vertices = vertices;\n }\n return Vertices;\n }());\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SkeletonBounds = (function () {\n function SkeletonBounds() {\n this.minX = 0;\n this.minY = 0;\n this.maxX = 0;\n this.maxY = 0;\n this.boundingBoxes = new Array();\n this.polygons = new Array();\n this.polygonPool = new spine.Pool(function () {\n return spine.Utils.newFloatArray(16);\n });\n }\n SkeletonBounds.prototype.update = function (skeleton, updateAabb) {\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n var boundingBoxes = this.boundingBoxes;\n var polygons = this.polygons;\n var polygonPool = this.polygonPool;\n var slots = skeleton.slots;\n var slotCount = slots.length;\n boundingBoxes.length = 0;\n polygonPool.freeAll(polygons);\n polygons.length = 0;\n for (var i = 0; i < slotCount; i++) {\n var slot = slots[i];\n if (!slot.bone.active)\n continue;\n var attachment = slot.getAttachment();\n if (attachment instanceof spine.BoundingBoxAttachment) {\n var boundingBox = attachment;\n boundingBoxes.push(boundingBox);\n var polygon = polygonPool.obtain();\n if (polygon.length != boundingBox.worldVerticesLength) {\n polygon = spine.Utils.newFloatArray(boundingBox.worldVerticesLength);\n }\n polygons.push(polygon);\n boundingBox.computeWorldVertices(slot, 0, boundingBox.worldVerticesLength, polygon, 0, 2);\n }\n }\n if (updateAabb) {\n this.aabbCompute();\n }\n else {\n this.minX = Number.POSITIVE_INFINITY;\n this.minY = Number.POSITIVE_INFINITY;\n this.maxX = Number.NEGATIVE_INFINITY;\n this.maxY = Number.NEGATIVE_INFINITY;\n }\n };\n SkeletonBounds.prototype.aabbCompute = function () {\n var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\n var polygons = this.polygons;\n for (var i = 0, n = polygons.length; i < n; i++) {\n var polygon = polygons[i];\n var vertices = polygon;\n for (var ii = 0, nn = polygon.length; ii < nn; ii += 2) {\n var x = vertices[ii];\n var y = vertices[ii + 1];\n minX = Math.min(minX, x);\n minY = Math.min(minY, y);\n maxX = Math.max(maxX, x);\n maxY = Math.max(maxY, y);\n }\n }\n this.minX = minX;\n this.minY = minY;\n this.maxX = maxX;\n this.maxY = maxY;\n };\n SkeletonBounds.prototype.aabbContainsPoint = function (x, y) {\n return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\n };\n SkeletonBounds.prototype.aabbIntersectsSegment = function (x1, y1, x2, y2) {\n var minX = this.minX;\n var minY = this.minY;\n var maxX = this.maxX;\n var maxY = this.maxY;\n if ((x1 <= minX && x2 <= minX) || (y1 <= minY && y2 <= minY) || (x1 >= maxX && x2 >= maxX) || (y1 >= maxY && y2 >= maxY))\n return false;\n var m = (y2 - y1) / (x2 - x1);\n var y = m * (minX - x1) + y1;\n if (y > minY && y < maxY)\n return true;\n y = m * (maxX - x1) + y1;\n if (y > minY && y < maxY)\n return true;\n var x = (minY - y1) / m + x1;\n if (x > minX && x < maxX)\n return true;\n x = (maxY - y1) / m + x1;\n if (x > minX && x < maxX)\n return true;\n return false;\n };\n SkeletonBounds.prototype.aabbIntersectsSkeleton = function (bounds) {\n return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\n };\n SkeletonBounds.prototype.containsPoint = function (x, y) {\n var polygons = this.polygons;\n for (var i = 0, n = polygons.length; i < n; i++)\n if (this.containsPointPolygon(polygons[i], x, y))\n return this.boundingBoxes[i];\n return null;\n };\n SkeletonBounds.prototype.containsPointPolygon = function (polygon, x, y) {\n var vertices = polygon;\n var nn = polygon.length;\n var prevIndex = nn - 2;\n var inside = false;\n for (var ii = 0; ii < nn; ii += 2) {\n var vertexY = vertices[ii + 1];\n var prevY = vertices[prevIndex + 1];\n if ((vertexY < y && prevY >= y) || (prevY < y && vertexY >= y)) {\n var vertexX = vertices[ii];\n if (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x)\n inside = !inside;\n }\n prevIndex = ii;\n }\n return inside;\n };\n SkeletonBounds.prototype.intersectsSegment = function (x1, y1, x2, y2) {\n var polygons = this.polygons;\n for (var i = 0, n = polygons.length; i < n; i++)\n if (this.intersectsSegmentPolygon(polygons[i], x1, y1, x2, y2))\n return this.boundingBoxes[i];\n return null;\n };\n SkeletonBounds.prototype.intersectsSegmentPolygon = function (polygon, x1, y1, x2, y2) {\n var vertices = polygon;\n var nn = polygon.length;\n var width12 = x1 - x2, height12 = y1 - y2;\n var det1 = x1 * y2 - y1 * x2;\n var x3 = vertices[nn - 2], y3 = vertices[nn - 1];\n for (var ii = 0; ii < nn; ii += 2) {\n var x4 = vertices[ii], y4 = vertices[ii + 1];\n var det2 = x3 * y4 - y3 * x4;\n var width34 = x3 - x4, height34 = y3 - y4;\n var det3 = width12 * height34 - height12 * width34;\n var x = (det1 * width34 - width12 * det2) / det3;\n if (((x >= x3 && x <= x4) || (x >= x4 && x <= x3)) && ((x >= x1 && x <= x2) || (x >= x2 && x <= x1))) {\n var y = (det1 * height34 - height12 * det2) / det3;\n if (((y >= y3 && y <= y4) || (y >= y4 && y <= y3)) && ((y >= y1 && y <= y2) || (y >= y2 && y <= y1)))\n return true;\n }\n x3 = x4;\n y3 = y4;\n }\n return false;\n };\n SkeletonBounds.prototype.getPolygon = function (boundingBox) {\n if (boundingBox == null)\n throw new Error(\"boundingBox cannot be null.\");\n var index = this.boundingBoxes.indexOf(boundingBox);\n return index == -1 ? null : this.polygons[index];\n };\n SkeletonBounds.prototype.getWidth = function () {\n return this.maxX - this.minX;\n };\n SkeletonBounds.prototype.getHeight = function () {\n return this.maxY - this.minY;\n };\n return SkeletonBounds;\n }());\n spine.SkeletonBounds = SkeletonBounds;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SkeletonClipping = (function () {\n function SkeletonClipping() {\n this.triangulator = new spine.Triangulator();\n this.clippingPolygon = new Array();\n this.clipOutput = new Array();\n this.clippedVertices = new Array();\n this.clippedTriangles = new Array();\n this.scratch = new Array();\n }\n SkeletonClipping.prototype.clipStart = function (slot, clip) {\n if (this.clipAttachment != null)\n return 0;\n this.clipAttachment = clip;\n var n = clip.worldVerticesLength;\n var vertices = spine.Utils.setArraySize(this.clippingPolygon, n);\n clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\n var clippingPolygon = this.clippingPolygon;\n SkeletonClipping.makeClockwise(clippingPolygon);\n var clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon));\n for (var i = 0, n_2 = clippingPolygons.length; i < n_2; i++) {\n var polygon = clippingPolygons[i];\n SkeletonClipping.makeClockwise(polygon);\n polygon.push(polygon[0]);\n polygon.push(polygon[1]);\n }\n return clippingPolygons.length;\n };\n SkeletonClipping.prototype.clipEndWithSlot = function (slot) {\n if (this.clipAttachment != null && this.clipAttachment.endSlot == slot.data)\n this.clipEnd();\n };\n SkeletonClipping.prototype.clipEnd = function () {\n if (this.clipAttachment == null)\n return;\n this.clipAttachment = null;\n this.clippingPolygons = null;\n this.clippedVertices.length = 0;\n this.clippedTriangles.length = 0;\n this.clippingPolygon.length = 0;\n };\n SkeletonClipping.prototype.isClipping = function () {\n return this.clipAttachment != null;\n };\n SkeletonClipping.prototype.clipTriangles = function (vertices, verticesLength, triangles, trianglesLength, uvs, light, dark, twoColor) {\n var clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;\n var clippedTriangles = this.clippedTriangles;\n var polygons = this.clippingPolygons;\n var polygonsCount = this.clippingPolygons.length;\n var vertexSize = twoColor ? 12 : 8;\n var index = 0;\n clippedVertices.length = 0;\n clippedTriangles.length = 0;\n outer: for (var i = 0; i < trianglesLength; i += 3) {\n var vertexOffset = triangles[i] << 1;\n var x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\n var u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];\n vertexOffset = triangles[i + 1] << 1;\n var x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\n var u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];\n vertexOffset = triangles[i + 2] << 1;\n var x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\n var u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];\n for (var p = 0; p < polygonsCount; p++) {\n var s = clippedVertices.length;\n if (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) {\n var clipOutputLength = clipOutput.length;\n if (clipOutputLength == 0)\n continue;\n var d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\n var d = 1 / (d0 * d2 + d1 * (y1 - y3));\n var clipOutputCount = clipOutputLength >> 1;\n var clipOutputItems = this.clipOutput;\n var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);\n for (var ii = 0; ii < clipOutputLength; ii += 2) {\n var x = clipOutputItems[ii], y = clipOutputItems[ii + 1];\n clippedVerticesItems[s] = x;\n clippedVerticesItems[s + 1] = y;\n clippedVerticesItems[s + 2] = light.r;\n clippedVerticesItems[s + 3] = light.g;\n clippedVerticesItems[s + 4] = light.b;\n clippedVerticesItems[s + 5] = light.a;\n var c0 = x - x3, c1 = y - y3;\n var a = (d0 * c0 + d1 * c1) * d;\n var b = (d4 * c0 + d2 * c1) * d;\n var c = 1 - a - b;\n clippedVerticesItems[s + 6] = u1 * a + u2 * b + u3 * c;\n clippedVerticesItems[s + 7] = v1 * a + v2 * b + v3 * c;\n if (twoColor) {\n clippedVerticesItems[s + 8] = dark.r;\n clippedVerticesItems[s + 9] = dark.g;\n clippedVerticesItems[s + 10] = dark.b;\n clippedVerticesItems[s + 11] = dark.a;\n }\n s += vertexSize;\n }\n s = clippedTriangles.length;\n var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));\n clipOutputCount--;\n for (var ii = 1; ii < clipOutputCount; ii++) {\n clippedTrianglesItems[s] = index;\n clippedTrianglesItems[s + 1] = (index + ii);\n clippedTrianglesItems[s + 2] = (index + ii + 1);\n s += 3;\n }\n index += clipOutputCount + 1;\n }\n else {\n var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + 3 * vertexSize);\n clippedVerticesItems[s] = x1;\n clippedVerticesItems[s + 1] = y1;\n clippedVerticesItems[s + 2] = light.r;\n clippedVerticesItems[s + 3] = light.g;\n clippedVerticesItems[s + 4] = light.b;\n clippedVerticesItems[s + 5] = light.a;\n if (!twoColor) {\n clippedVerticesItems[s + 6] = u1;\n clippedVerticesItems[s + 7] = v1;\n clippedVerticesItems[s + 8] = x2;\n clippedVerticesItems[s + 9] = y2;\n clippedVerticesItems[s + 10] = light.r;\n clippedVerticesItems[s + 11] = light.g;\n clippedVerticesItems[s + 12] = light.b;\n clippedVerticesItems[s + 13] = light.a;\n clippedVerticesItems[s + 14] = u2;\n clippedVerticesItems[s + 15] = v2;\n clippedVerticesItems[s + 16] = x3;\n clippedVerticesItems[s + 17] = y3;\n clippedVerticesItems[s + 18] = light.r;\n clippedVerticesItems[s + 19] = light.g;\n clippedVerticesItems[s + 20] = light.b;\n clippedVerticesItems[s + 21] = light.a;\n clippedVerticesItems[s + 22] = u3;\n clippedVerticesItems[s + 23] = v3;\n }\n else {\n clippedVerticesItems[s + 6] = u1;\n clippedVerticesItems[s + 7] = v1;\n clippedVerticesItems[s + 8] = dark.r;\n clippedVerticesItems[s + 9] = dark.g;\n clippedVerticesItems[s + 10] = dark.b;\n clippedVerticesItems[s + 11] = dark.a;\n clippedVerticesItems[s + 12] = x2;\n clippedVerticesItems[s + 13] = y2;\n clippedVerticesItems[s + 14] = light.r;\n clippedVerticesItems[s + 15] = light.g;\n clippedVerticesItems[s + 16] = light.b;\n clippedVerticesItems[s + 17] = light.a;\n clippedVerticesItems[s + 18] = u2;\n clippedVerticesItems[s + 19] = v2;\n clippedVerticesItems[s + 20] = dark.r;\n clippedVerticesItems[s + 21] = dark.g;\n clippedVerticesItems[s + 22] = dark.b;\n clippedVerticesItems[s + 23] = dark.a;\n clippedVerticesItems[s + 24] = x3;\n clippedVerticesItems[s + 25] = y3;\n clippedVerticesItems[s + 26] = light.r;\n clippedVerticesItems[s + 27] = light.g;\n clippedVerticesItems[s + 28] = light.b;\n clippedVerticesItems[s + 29] = light.a;\n clippedVerticesItems[s + 30] = u3;\n clippedVerticesItems[s + 31] = v3;\n clippedVerticesItems[s + 32] = dark.r;\n clippedVerticesItems[s + 33] = dark.g;\n clippedVerticesItems[s + 34] = dark.b;\n clippedVerticesItems[s + 35] = dark.a;\n }\n s = clippedTriangles.length;\n var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3);\n clippedTrianglesItems[s] = index;\n clippedTrianglesItems[s + 1] = (index + 1);\n clippedTrianglesItems[s + 2] = (index + 2);\n index += 3;\n continue outer;\n }\n }\n }\n };\n SkeletonClipping.prototype.clip = function (x1, y1, x2, y2, x3, y3, clippingArea, output) {\n var originalOutput = output;\n var clipped = false;\n var input = null;\n if (clippingArea.length % 4 >= 2) {\n input = output;\n output = this.scratch;\n }\n else\n input = this.scratch;\n input.length = 0;\n input.push(x1);\n input.push(y1);\n input.push(x2);\n input.push(y2);\n input.push(x3);\n input.push(y3);\n input.push(x1);\n input.push(y1);\n output.length = 0;\n var clippingVertices = clippingArea;\n var clippingVerticesLast = clippingArea.length - 4;\n for (var i = 0;; i += 2) {\n var edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\n var edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];\n var deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;\n var inputVertices = input;\n var inputVerticesLength = input.length - 2, outputStart = output.length;\n for (var ii = 0; ii < inputVerticesLength; ii += 2) {\n var inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\n var inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];\n var side2 = deltaX * (inputY2 - edgeY2) - deltaY * (inputX2 - edgeX2) > 0;\n if (deltaX * (inputY - edgeY2) - deltaY * (inputX - edgeX2) > 0) {\n if (side2) {\n output.push(inputX2);\n output.push(inputY2);\n continue;\n }\n var c0 = inputY2 - inputY, c2 = inputX2 - inputX;\n var s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\n if (Math.abs(s) > 0.000001) {\n var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\n output.push(edgeX + (edgeX2 - edgeX) * ua);\n output.push(edgeY + (edgeY2 - edgeY) * ua);\n }\n else {\n output.push(edgeX);\n output.push(edgeY);\n }\n }\n else if (side2) {\n var c0 = inputY2 - inputY, c2 = inputX2 - inputX;\n var s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\n if (Math.abs(s) > 0.000001) {\n var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\n output.push(edgeX + (edgeX2 - edgeX) * ua);\n output.push(edgeY + (edgeY2 - edgeY) * ua);\n }\n else {\n output.push(edgeX);\n output.push(edgeY);\n }\n output.push(inputX2);\n output.push(inputY2);\n }\n clipped = true;\n }\n if (outputStart == output.length) {\n originalOutput.length = 0;\n return true;\n }\n output.push(output[0]);\n output.push(output[1]);\n if (i == clippingVerticesLast)\n break;\n var temp = output;\n output = input;\n output.length = 0;\n input = temp;\n }\n if (originalOutput != output) {\n originalOutput.length = 0;\n for (var i = 0, n = output.length - 2; i < n; i++)\n originalOutput[i] = output[i];\n }\n else\n originalOutput.length = originalOutput.length - 2;\n return clipped;\n };\n SkeletonClipping.makeClockwise = function (polygon) {\n var vertices = polygon;\n var verticeslength = polygon.length;\n var area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0;\n for (var i = 0, n = verticeslength - 3; i < n; i += 2) {\n p1x = vertices[i];\n p1y = vertices[i + 1];\n p2x = vertices[i + 2];\n p2y = vertices[i + 3];\n area += p1x * p2y - p2x * p1y;\n }\n if (area < 0)\n return;\n for (var i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\n var x = vertices[i], y = vertices[i + 1];\n var other = lastX - i;\n vertices[i] = vertices[other];\n vertices[i + 1] = vertices[other + 1];\n vertices[other] = x;\n vertices[other + 1] = y;\n }\n };\n return SkeletonClipping;\n }());\n spine.SkeletonClipping = SkeletonClipping;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SkeletonData = (function () {\n function SkeletonData() {\n this.bones = new Array();\n this.slots = new Array();\n this.skins = new Array();\n this.events = new Array();\n this.animations = new Array();\n this.ikConstraints = new Array();\n this.transformConstraints = new Array();\n this.pathConstraints = new Array();\n this.fps = 0;\n }\n SkeletonData.prototype.findBone = function (boneName) {\n if (boneName == null)\n throw new Error(\"boneName cannot be null.\");\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n if (bone.name == boneName)\n return bone;\n }\n return null;\n };\n SkeletonData.prototype.findBoneIndex = function (boneName) {\n if (boneName == null)\n throw new Error(\"boneName cannot be null.\");\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++)\n if (bones[i].name == boneName)\n return i;\n return -1;\n };\n SkeletonData.prototype.findSlot = function (slotName) {\n if (slotName == null)\n throw new Error(\"slotName cannot be null.\");\n var slots = this.slots;\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n if (slot.name == slotName)\n return slot;\n }\n return null;\n };\n SkeletonData.prototype.findSlotIndex = function (slotName) {\n if (slotName == null)\n throw new Error(\"slotName cannot be null.\");\n var slots = this.slots;\n for (var i = 0, n = slots.length; i < n; i++)\n if (slots[i].name == slotName)\n return i;\n return -1;\n };\n SkeletonData.prototype.findSkin = function (skinName) {\n if (skinName == null)\n throw new Error(\"skinName cannot be null.\");\n var skins = this.skins;\n for (var i = 0, n = skins.length; i < n; i++) {\n var skin = skins[i];\n if (skin.name == skinName)\n return skin;\n }\n return null;\n };\n SkeletonData.prototype.findEvent = function (eventDataName) {\n if (eventDataName == null)\n throw new Error(\"eventDataName cannot be null.\");\n var events = this.events;\n for (var i = 0, n = events.length; i < n; i++) {\n var event_5 = events[i];\n if (event_5.name == eventDataName)\n return event_5;\n }\n return null;\n };\n SkeletonData.prototype.findAnimation = function (animationName) {\n if (animationName == null)\n throw new Error(\"animationName cannot be null.\");\n var animations = this.animations;\n for (var i = 0, n = animations.length; i < n; i++) {\n var animation = animations[i];\n if (animation.name == animationName)\n return animation;\n }\n return null;\n };\n SkeletonData.prototype.findIkConstraint = function (constraintName) {\n if (constraintName == null)\n throw new Error(\"constraintName cannot be null.\");\n var ikConstraints = this.ikConstraints;\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\n var constraint = ikConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n };\n SkeletonData.prototype.findTransformConstraint = function (constraintName) {\n if (constraintName == null)\n throw new Error(\"constraintName cannot be null.\");\n var transformConstraints = this.transformConstraints;\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\n var constraint = transformConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n };\n SkeletonData.prototype.findPathConstraint = function (constraintName) {\n if (constraintName == null)\n throw new Error(\"constraintName cannot be null.\");\n var pathConstraints = this.pathConstraints;\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\n var constraint = pathConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n };\n SkeletonData.prototype.findPathConstraintIndex = function (pathConstraintName) {\n if (pathConstraintName == null)\n throw new Error(\"pathConstraintName cannot be null.\");\n var pathConstraints = this.pathConstraints;\n for (var i = 0, n = pathConstraints.length; i < n; i++)\n if (pathConstraints[i].name == pathConstraintName)\n return i;\n return -1;\n };\n return SkeletonData;\n }());\n spine.SkeletonData = SkeletonData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SkeletonJson = (function () {\n function SkeletonJson(attachmentLoader) {\n this.scale = 1;\n this.linkedMeshes = new Array();\n this.attachmentLoader = attachmentLoader;\n }\n SkeletonJson.prototype.readSkeletonData = function (json) {\n var scale = this.scale;\n var skeletonData = new spine.SkeletonData();\n var root = typeof (json) === \"string\" ? JSON.parse(json) : json;\n var skeletonMap = root.skeleton;\n if (skeletonMap != null) {\n skeletonData.hash = skeletonMap.hash;\n skeletonData.version = skeletonMap.spine;\n if (\"3.8.75\" == skeletonData.version)\n throw new Error(\"Unsupported skeleton data, please export with a newer version of Spine.\");\n skeletonData.x = skeletonMap.x;\n skeletonData.y = skeletonMap.y;\n skeletonData.width = skeletonMap.width;\n skeletonData.height = skeletonMap.height;\n skeletonData.fps = skeletonMap.fps;\n skeletonData.imagesPath = skeletonMap.images;\n }\n if (root.bones) {\n for (var i = 0; i < root.bones.length; i++) {\n var boneMap = root.bones[i];\n var parent_5 = null;\n var parentName = this.getValue(boneMap, \"parent\", null);\n if (parentName != null) {\n parent_5 = skeletonData.findBone(parentName);\n if (parent_5 == null)\n throw new Error(\"Parent bone not found: \" + parentName);\n }\n var data = new spine.BoneData(skeletonData.bones.length, boneMap.name, parent_5);\n data.length = this.getValue(boneMap, \"length\", 0) * scale;\n data.x = this.getValue(boneMap, \"x\", 0) * scale;\n data.y = this.getValue(boneMap, \"y\", 0) * scale;\n data.rotation = this.getValue(boneMap, \"rotation\", 0);\n data.scaleX = this.getValue(boneMap, \"scaleX\", 1);\n data.scaleY = this.getValue(boneMap, \"scaleY\", 1);\n data.shearX = this.getValue(boneMap, \"shearX\", 0);\n data.shearY = this.getValue(boneMap, \"shearY\", 0);\n data.transformMode = SkeletonJson.transformModeFromString(this.getValue(boneMap, \"transform\", \"normal\"));\n data.skinRequired = this.getValue(boneMap, \"skin\", false);\n skeletonData.bones.push(data);\n }\n }\n if (root.slots) {\n for (var i = 0; i < root.slots.length; i++) {\n var slotMap = root.slots[i];\n var slotName = slotMap.name;\n var boneName = slotMap.bone;\n var boneData = skeletonData.findBone(boneName);\n if (boneData == null)\n throw new Error(\"Slot bone not found: \" + boneName);\n var data = new spine.SlotData(skeletonData.slots.length, slotName, boneData);\n var color = this.getValue(slotMap, \"color\", null);\n if (color != null)\n data.color.setFromString(color);\n var dark = this.getValue(slotMap, \"dark\", null);\n if (dark != null) {\n data.darkColor = new spine.Color(1, 1, 1, 1);\n data.darkColor.setFromString(dark);\n }\n data.attachmentName = this.getValue(slotMap, \"attachment\", null);\n data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, \"blend\", \"normal\"));\n skeletonData.slots.push(data);\n }\n }\n if (root.ik) {\n for (var i = 0; i < root.ik.length; i++) {\n var constraintMap = root.ik[i];\n var data = new spine.IkConstraintData(constraintMap.name);\n data.order = this.getValue(constraintMap, \"order\", 0);\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\n for (var j = 0; j < constraintMap.bones.length; j++) {\n var boneName = constraintMap.bones[j];\n var bone = skeletonData.findBone(boneName);\n if (bone == null)\n throw new Error(\"IK bone not found: \" + boneName);\n data.bones.push(bone);\n }\n var targetName = constraintMap.target;\n data.target = skeletonData.findBone(targetName);\n if (data.target == null)\n throw new Error(\"IK target bone not found: \" + targetName);\n data.mix = this.getValue(constraintMap, \"mix\", 1);\n data.softness = this.getValue(constraintMap, \"softness\", 0) * scale;\n data.bendDirection = this.getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\n data.compress = this.getValue(constraintMap, \"compress\", false);\n data.stretch = this.getValue(constraintMap, \"stretch\", false);\n data.uniform = this.getValue(constraintMap, \"uniform\", false);\n skeletonData.ikConstraints.push(data);\n }\n }\n if (root.transform) {\n for (var i = 0; i < root.transform.length; i++) {\n var constraintMap = root.transform[i];\n var data = new spine.TransformConstraintData(constraintMap.name);\n data.order = this.getValue(constraintMap, \"order\", 0);\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\n for (var j = 0; j < constraintMap.bones.length; j++) {\n var boneName = constraintMap.bones[j];\n var bone = skeletonData.findBone(boneName);\n if (bone == null)\n throw new Error(\"Transform constraint bone not found: \" + boneName);\n data.bones.push(bone);\n }\n var targetName = constraintMap.target;\n data.target = skeletonData.findBone(targetName);\n if (data.target == null)\n throw new Error(\"Transform constraint target bone not found: \" + targetName);\n data.local = this.getValue(constraintMap, \"local\", false);\n data.relative = this.getValue(constraintMap, \"relative\", false);\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\n data.offsetX = this.getValue(constraintMap, \"x\", 0) * scale;\n data.offsetY = this.getValue(constraintMap, \"y\", 0) * scale;\n data.offsetScaleX = this.getValue(constraintMap, \"scaleX\", 0);\n data.offsetScaleY = this.getValue(constraintMap, \"scaleY\", 0);\n data.offsetShearY = this.getValue(constraintMap, \"shearY\", 0);\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\n data.scaleMix = this.getValue(constraintMap, \"scaleMix\", 1);\n data.shearMix = this.getValue(constraintMap, \"shearMix\", 1);\n skeletonData.transformConstraints.push(data);\n }\n }\n if (root.path) {\n for (var i = 0; i < root.path.length; i++) {\n var constraintMap = root.path[i];\n var data = new spine.PathConstraintData(constraintMap.name);\n data.order = this.getValue(constraintMap, \"order\", 0);\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\n for (var j = 0; j < constraintMap.bones.length; j++) {\n var boneName = constraintMap.bones[j];\n var bone = skeletonData.findBone(boneName);\n if (bone == null)\n throw new Error(\"Transform constraint bone not found: \" + boneName);\n data.bones.push(bone);\n }\n var targetName = constraintMap.target;\n data.target = skeletonData.findSlot(targetName);\n if (data.target == null)\n throw new Error(\"Path target slot not found: \" + targetName);\n data.positionMode = SkeletonJson.positionModeFromString(this.getValue(constraintMap, \"positionMode\", \"percent\"));\n data.spacingMode = SkeletonJson.spacingModeFromString(this.getValue(constraintMap, \"spacingMode\", \"length\"));\n data.rotateMode = SkeletonJson.rotateModeFromString(this.getValue(constraintMap, \"rotateMode\", \"tangent\"));\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\n data.position = this.getValue(constraintMap, \"position\", 0);\n if (data.positionMode == spine.PositionMode.Fixed)\n data.position *= scale;\n data.spacing = this.getValue(constraintMap, \"spacing\", 0);\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\n data.spacing *= scale;\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\n skeletonData.pathConstraints.push(data);\n }\n }\n if (root.skins) {\n for (var i = 0; i < root.skins.length; i++) {\n var skinMap = root.skins[i];\n var skin = new spine.Skin(skinMap.name);\n if (skinMap.bones) {\n for (var ii = 0; ii < skinMap.bones.length; ii++) {\n var bone = skeletonData.findBone(skinMap.bones[ii]);\n if (bone == null)\n throw new Error(\"Skin bone not found: \" + skinMap.bones[i]);\n skin.bones.push(bone);\n }\n }\n if (skinMap.ik) {\n for (var ii = 0; ii < skinMap.ik.length; ii++) {\n var constraint = skeletonData.findIkConstraint(skinMap.ik[ii]);\n if (constraint == null)\n throw new Error(\"Skin IK constraint not found: \" + skinMap.ik[i]);\n skin.constraints.push(constraint);\n }\n }\n if (skinMap.transform) {\n for (var ii = 0; ii < skinMap.transform.length; ii++) {\n var constraint = skeletonData.findTransformConstraint(skinMap.transform[ii]);\n if (constraint == null)\n throw new Error(\"Skin transform constraint not found: \" + skinMap.transform[i]);\n skin.constraints.push(constraint);\n }\n }\n if (skinMap.path) {\n for (var ii = 0; ii < skinMap.path.length; ii++) {\n var constraint = skeletonData.findPathConstraint(skinMap.path[ii]);\n if (constraint == null)\n throw new Error(\"Skin path constraint not found: \" + skinMap.path[i]);\n skin.constraints.push(constraint);\n }\n }\n for (var slotName in skinMap.attachments) {\n var slot = skeletonData.findSlot(slotName);\n if (slot == null)\n throw new Error(\"Slot not found: \" + slotName);\n var slotMap = skinMap.attachments[slotName];\n for (var entryName in slotMap) {\n var attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\n if (attachment != null)\n skin.setAttachment(slot.index, entryName, attachment);\n }\n }\n skeletonData.skins.push(skin);\n if (skin.name == \"default\")\n skeletonData.defaultSkin = skin;\n }\n }\n for (var i = 0, n = this.linkedMeshes.length; i < n; i++) {\n var linkedMesh = this.linkedMeshes[i];\n var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\n if (skin == null)\n throw new Error(\"Skin not found: \" + linkedMesh.skin);\n var parent_6 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\n if (parent_6 == null)\n throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_6 : linkedMesh.mesh;\n linkedMesh.mesh.setParentMesh(parent_6);\n linkedMesh.mesh.updateUVs();\n }\n this.linkedMeshes.length = 0;\n if (root.events) {\n for (var eventName in root.events) {\n var eventMap = root.events[eventName];\n var data = new spine.EventData(eventName);\n data.intValue = this.getValue(eventMap, \"int\", 0);\n data.floatValue = this.getValue(eventMap, \"float\", 0);\n data.stringValue = this.getValue(eventMap, \"string\", \"\");\n data.audioPath = this.getValue(eventMap, \"audio\", null);\n if (data.audioPath != null) {\n data.volume = this.getValue(eventMap, \"volume\", 1);\n data.balance = this.getValue(eventMap, \"balance\", 0);\n }\n skeletonData.events.push(data);\n }\n }\n if (root.animations) {\n for (var animationName in root.animations) {\n var animationMap = root.animations[animationName];\n this.readAnimation(animationMap, animationName, skeletonData);\n }\n }\n return skeletonData;\n };\n SkeletonJson.prototype.readAttachment = function (map, skin, slotIndex, name, skeletonData) {\n var scale = this.scale;\n name = this.getValue(map, \"name\", name);\n var type = this.getValue(map, \"type\", \"region\");\n switch (type) {\n case \"region\": {\n var path = this.getValue(map, \"path\", name);\n var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\n if (region == null)\n return null;\n region.path = path;\n region.x = this.getValue(map, \"x\", 0) * scale;\n region.y = this.getValue(map, \"y\", 0) * scale;\n region.scaleX = this.getValue(map, \"scaleX\", 1);\n region.scaleY = this.getValue(map, \"scaleY\", 1);\n region.rotation = this.getValue(map, \"rotation\", 0);\n region.width = map.width * scale;\n region.height = map.height * scale;\n var color = this.getValue(map, \"color\", null);\n if (color != null)\n region.color.setFromString(color);\n region.updateOffset();\n return region;\n }\n case \"boundingbox\": {\n var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\n if (box == null)\n return null;\n this.readVertices(map, box, map.vertexCount << 1);\n var color = this.getValue(map, \"color\", null);\n if (color != null)\n box.color.setFromString(color);\n return box;\n }\n case \"mesh\":\n case \"linkedmesh\": {\n var path = this.getValue(map, \"path\", name);\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\n if (mesh == null)\n return null;\n mesh.path = path;\n var color = this.getValue(map, \"color\", null);\n if (color != null)\n mesh.color.setFromString(color);\n mesh.width = this.getValue(map, \"width\", 0) * scale;\n mesh.height = this.getValue(map, \"height\", 0) * scale;\n var parent_7 = this.getValue(map, \"parent\", null);\n if (parent_7 != null) {\n this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, \"skin\", null), slotIndex, parent_7, this.getValue(map, \"deform\", true)));\n return mesh;\n }\n var uvs = map.uvs;\n this.readVertices(map, mesh, uvs.length);\n mesh.triangles = map.triangles;\n mesh.regionUVs = uvs;\n mesh.updateUVs();\n mesh.edges = this.getValue(map, \"edges\", null);\n mesh.hullLength = this.getValue(map, \"hull\", 0) * 2;\n return mesh;\n }\n case \"path\": {\n var path = this.attachmentLoader.newPathAttachment(skin, name);\n if (path == null)\n return null;\n path.closed = this.getValue(map, \"closed\", false);\n path.constantSpeed = this.getValue(map, \"constantSpeed\", true);\n var vertexCount = map.vertexCount;\n this.readVertices(map, path, vertexCount << 1);\n var lengths = spine.Utils.newArray(vertexCount / 3, 0);\n for (var i = 0; i < map.lengths.length; i++)\n lengths[i] = map.lengths[i] * scale;\n path.lengths = lengths;\n var color = this.getValue(map, \"color\", null);\n if (color != null)\n path.color.setFromString(color);\n return path;\n }\n case \"point\": {\n var point = this.attachmentLoader.newPointAttachment(skin, name);\n if (point == null)\n return null;\n point.x = this.getValue(map, \"x\", 0) * scale;\n point.y = this.getValue(map, \"y\", 0) * scale;\n point.rotation = this.getValue(map, \"rotation\", 0);\n var color = this.getValue(map, \"color\", null);\n if (color != null)\n point.color.setFromString(color);\n return point;\n }\n case \"clipping\": {\n var clip = this.attachmentLoader.newClippingAttachment(skin, name);\n if (clip == null)\n return null;\n var end = this.getValue(map, \"end\", null);\n if (end != null) {\n var slot = skeletonData.findSlot(end);\n if (slot == null)\n throw new Error(\"Clipping end slot not found: \" + end);\n clip.endSlot = slot;\n }\n var vertexCount = map.vertexCount;\n this.readVertices(map, clip, vertexCount << 1);\n var color = this.getValue(map, \"color\", null);\n if (color != null)\n clip.color.setFromString(color);\n return clip;\n }\n }\n return null;\n };\n SkeletonJson.prototype.readVertices = function (map, attachment, verticesLength) {\n var scale = this.scale;\n attachment.worldVerticesLength = verticesLength;\n var vertices = map.vertices;\n if (verticesLength == vertices.length) {\n var scaledVertices = spine.Utils.toFloatArray(vertices);\n if (scale != 1) {\n for (var i = 0, n = vertices.length; i < n; i++)\n scaledVertices[i] *= scale;\n }\n attachment.vertices = scaledVertices;\n return;\n }\n var weights = new Array();\n var bones = new Array();\n for (var i = 0, n = vertices.length; i < n;) {\n var boneCount = vertices[i++];\n bones.push(boneCount);\n for (var nn = i + boneCount * 4; i < nn; i += 4) {\n bones.push(vertices[i]);\n weights.push(vertices[i + 1] * scale);\n weights.push(vertices[i + 2] * scale);\n weights.push(vertices[i + 3]);\n }\n }\n attachment.bones = bones;\n attachment.vertices = spine.Utils.toFloatArray(weights);\n };\n SkeletonJson.prototype.readAnimation = function (map, name, skeletonData) {\n var scale = this.scale;\n var timelines = new Array();\n var duration = 0;\n if (map.slots) {\n for (var slotName in map.slots) {\n var slotMap = map.slots[slotName];\n var slotIndex = skeletonData.findSlotIndex(slotName);\n if (slotIndex == -1)\n throw new Error(\"Slot not found: \" + slotName);\n for (var timelineName in slotMap) {\n var timelineMap = slotMap[timelineName];\n if (timelineName == \"attachment\") {\n var timeline = new spine.AttachmentTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n timeline.setFrame(frameIndex++, this.getValue(valueMap, \"time\", 0), valueMap.name);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n else if (timelineName == \"color\") {\n var timeline = new spine.ColorTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n var color = new spine.Color();\n color.setFromString(valueMap.color);\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), color.r, color.g, color.b, color.a);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.ColorTimeline.ENTRIES]);\n }\n else if (timelineName == \"twoColor\") {\n var timeline = new spine.TwoColorTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n var light = new spine.Color();\n var dark = new spine.Color();\n light.setFromString(valueMap.light);\n dark.setFromString(valueMap.dark);\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), light.r, light.g, light.b, light.a, dark.r, dark.g, dark.b);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TwoColorTimeline.ENTRIES]);\n }\n else\n throw new Error(\"Invalid timeline type for a slot: \" + timelineName + \" (\" + slotName + \")\");\n }\n }\n }\n if (map.bones) {\n for (var boneName in map.bones) {\n var boneMap = map.bones[boneName];\n var boneIndex = skeletonData.findBoneIndex(boneName);\n if (boneIndex == -1)\n throw new Error(\"Bone not found: \" + boneName);\n for (var timelineName in boneMap) {\n var timelineMap = boneMap[timelineName];\n if (timelineName === \"rotate\") {\n var timeline = new spine.RotateTimeline(timelineMap.length);\n timeline.boneIndex = boneIndex;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"angle\", 0));\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.RotateTimeline.ENTRIES]);\n }\n else if (timelineName === \"translate\" || timelineName === \"scale\" || timelineName === \"shear\") {\n var timeline = null;\n var timelineScale = 1, defaultValue = 0;\n if (timelineName === \"scale\") {\n timeline = new spine.ScaleTimeline(timelineMap.length);\n defaultValue = 1;\n }\n else if (timelineName === \"shear\")\n timeline = new spine.ShearTimeline(timelineMap.length);\n else {\n timeline = new spine.TranslateTimeline(timelineMap.length);\n timelineScale = scale;\n }\n timeline.boneIndex = boneIndex;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n var x = this.getValue(valueMap, \"x\", defaultValue), y = this.getValue(valueMap, \"y\", defaultValue);\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), x * timelineScale, y * timelineScale);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TranslateTimeline.ENTRIES]);\n }\n else\n throw new Error(\"Invalid timeline type for a bone: \" + timelineName + \" (\" + boneName + \")\");\n }\n }\n }\n if (map.ik) {\n for (var constraintName in map.ik) {\n var constraintMap = map.ik[constraintName];\n var constraint = skeletonData.findIkConstraint(constraintName);\n var timeline = new spine.IkConstraintTimeline(constraintMap.length);\n timeline.ikConstraintIndex = skeletonData.ikConstraints.indexOf(constraint);\n var frameIndex = 0;\n for (var i = 0; i < constraintMap.length; i++) {\n var valueMap = constraintMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"mix\", 1), this.getValue(valueMap, \"softness\", 0) * scale, this.getValue(valueMap, \"bendPositive\", true) ? 1 : -1, this.getValue(valueMap, \"compress\", false), this.getValue(valueMap, \"stretch\", false));\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.IkConstraintTimeline.ENTRIES]);\n }\n }\n if (map.transform) {\n for (var constraintName in map.transform) {\n var constraintMap = map.transform[constraintName];\n var constraint = skeletonData.findTransformConstraint(constraintName);\n var timeline = new spine.TransformConstraintTimeline(constraintMap.length);\n timeline.transformConstraintIndex = skeletonData.transformConstraints.indexOf(constraint);\n var frameIndex = 0;\n for (var i = 0; i < constraintMap.length; i++) {\n var valueMap = constraintMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1), this.getValue(valueMap, \"scaleMix\", 1), this.getValue(valueMap, \"shearMix\", 1));\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TransformConstraintTimeline.ENTRIES]);\n }\n }\n if (map.path) {\n for (var constraintName in map.path) {\n var constraintMap = map.path[constraintName];\n var index = skeletonData.findPathConstraintIndex(constraintName);\n if (index == -1)\n throw new Error(\"Path constraint not found: \" + constraintName);\n var data = skeletonData.pathConstraints[index];\n for (var timelineName in constraintMap) {\n var timelineMap = constraintMap[timelineName];\n if (timelineName === \"position\" || timelineName === \"spacing\") {\n var timeline = null;\n var timelineScale = 1;\n if (timelineName === \"spacing\") {\n timeline = new spine.PathConstraintSpacingTimeline(timelineMap.length);\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\n timelineScale = scale;\n }\n else {\n timeline = new spine.PathConstraintPositionTimeline(timelineMap.length);\n if (data.positionMode == spine.PositionMode.Fixed)\n timelineScale = scale;\n }\n timeline.pathConstraintIndex = index;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, timelineName, 0) * timelineScale);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\n }\n else if (timelineName === \"mix\") {\n var timeline = new spine.PathConstraintMixTimeline(timelineMap.length);\n timeline.pathConstraintIndex = index;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1));\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\n }\n }\n }\n }\n if (map.deform) {\n for (var deformName in map.deform) {\n var deformMap = map.deform[deformName];\n var skin = skeletonData.findSkin(deformName);\n if (skin == null)\n throw new Error(\"Skin not found: \" + deformName);\n for (var slotName in deformMap) {\n var slotMap = deformMap[slotName];\n var slotIndex = skeletonData.findSlotIndex(slotName);\n if (slotIndex == -1)\n throw new Error(\"Slot not found: \" + slotMap.name);\n for (var timelineName in slotMap) {\n var timelineMap = slotMap[timelineName];\n var attachment = skin.getAttachment(slotIndex, timelineName);\n if (attachment == null)\n throw new Error(\"Deform attachment not found: \" + timelineMap.name);\n var weighted = attachment.bones != null;\n var vertices = attachment.vertices;\n var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\n var timeline = new spine.DeformTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n timeline.attachment = attachment;\n var frameIndex = 0;\n for (var j = 0; j < timelineMap.length; j++) {\n var valueMap = timelineMap[j];\n var deform = void 0;\n var verticesValue = this.getValue(valueMap, \"vertices\", null);\n if (verticesValue == null)\n deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\n else {\n deform = spine.Utils.newFloatArray(deformLength);\n var start = this.getValue(valueMap, \"offset\", 0);\n spine.Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\n if (scale != 1) {\n for (var i = start, n = i + verticesValue.length; i < n; i++)\n deform[i] *= scale;\n }\n if (!weighted) {\n for (var i = 0; i < deformLength; i++)\n deform[i] += vertices[i];\n }\n }\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), deform);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n }\n }\n }\n var drawOrderNode = map.drawOrder;\n if (drawOrderNode == null)\n drawOrderNode = map.draworder;\n if (drawOrderNode != null) {\n var timeline = new spine.DrawOrderTimeline(drawOrderNode.length);\n var slotCount = skeletonData.slots.length;\n var frameIndex = 0;\n for (var j = 0; j < drawOrderNode.length; j++) {\n var drawOrderMap = drawOrderNode[j];\n var drawOrder = null;\n var offsets = this.getValue(drawOrderMap, \"offsets\", null);\n if (offsets != null) {\n drawOrder = spine.Utils.newArray(slotCount, -1);\n var unchanged = spine.Utils.newArray(slotCount - offsets.length, 0);\n var originalIndex = 0, unchangedIndex = 0;\n for (var i = 0; i < offsets.length; i++) {\n var offsetMap = offsets[i];\n var slotIndex = skeletonData.findSlotIndex(offsetMap.slot);\n if (slotIndex == -1)\n throw new Error(\"Slot not found: \" + offsetMap.slot);\n while (originalIndex != slotIndex)\n unchanged[unchangedIndex++] = originalIndex++;\n drawOrder[originalIndex + offsetMap.offset] = originalIndex++;\n }\n while (originalIndex < slotCount)\n unchanged[unchangedIndex++] = originalIndex++;\n for (var i = slotCount - 1; i >= 0; i--)\n if (drawOrder[i] == -1)\n drawOrder[i] = unchanged[--unchangedIndex];\n }\n timeline.setFrame(frameIndex++, this.getValue(drawOrderMap, \"time\", 0), drawOrder);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n if (map.events) {\n var timeline = new spine.EventTimeline(map.events.length);\n var frameIndex = 0;\n for (var i = 0; i < map.events.length; i++) {\n var eventMap = map.events[i];\n var eventData = skeletonData.findEvent(eventMap.name);\n if (eventData == null)\n throw new Error(\"Event not found: \" + eventMap.name);\n var event_6 = new spine.Event(spine.Utils.toSinglePrecision(this.getValue(eventMap, \"time\", 0)), eventData);\n event_6.intValue = this.getValue(eventMap, \"int\", eventData.intValue);\n event_6.floatValue = this.getValue(eventMap, \"float\", eventData.floatValue);\n event_6.stringValue = this.getValue(eventMap, \"string\", eventData.stringValue);\n if (event_6.data.audioPath != null) {\n event_6.volume = this.getValue(eventMap, \"volume\", 1);\n event_6.balance = this.getValue(eventMap, \"balance\", 0);\n }\n timeline.setFrame(frameIndex++, event_6);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n if (isNaN(duration)) {\n throw new Error(\"Error while parsing animation, duration is NaN\");\n }\n skeletonData.animations.push(new spine.Animation(name, timelines, duration));\n };\n SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) {\n if (!map.hasOwnProperty(\"curve\"))\n return;\n if (map.curve == \"stepped\")\n timeline.setStepped(frameIndex);\n else {\n var curve = map.curve;\n timeline.setCurve(frameIndex, curve, this.getValue(map, \"c2\", 0), this.getValue(map, \"c3\", 1), this.getValue(map, \"c4\", 1));\n }\n };\n SkeletonJson.prototype.getValue = function (map, prop, defaultValue) {\n return map[prop] !== undefined ? map[prop] : defaultValue;\n };\n SkeletonJson.blendModeFromString = function (str) {\n str = str.toLowerCase();\n if (str == \"normal\")\n return spine.BlendMode.Normal;\n if (str == \"additive\")\n return spine.BlendMode.Additive;\n if (str == \"multiply\")\n return spine.BlendMode.Multiply;\n if (str == \"screen\")\n return spine.BlendMode.Screen;\n throw new Error(\"Unknown blend mode: \" + str);\n };\n SkeletonJson.positionModeFromString = function (str) {\n str = str.toLowerCase();\n if (str == \"fixed\")\n return spine.PositionMode.Fixed;\n if (str == \"percent\")\n return spine.PositionMode.Percent;\n throw new Error(\"Unknown position mode: \" + str);\n };\n SkeletonJson.spacingModeFromString = function (str) {\n str = str.toLowerCase();\n if (str == \"length\")\n return spine.SpacingMode.Length;\n if (str == \"fixed\")\n return spine.SpacingMode.Fixed;\n if (str == \"percent\")\n return spine.SpacingMode.Percent;\n throw new Error(\"Unknown position mode: \" + str);\n };\n SkeletonJson.rotateModeFromString = function (str) {\n str = str.toLowerCase();\n if (str == \"tangent\")\n return spine.RotateMode.Tangent;\n if (str == \"chain\")\n return spine.RotateMode.Chain;\n if (str == \"chainscale\")\n return spine.RotateMode.ChainScale;\n throw new Error(\"Unknown rotate mode: \" + str);\n };\n SkeletonJson.transformModeFromString = function (str) {\n str = str.toLowerCase();\n if (str == \"normal\")\n return spine.TransformMode.Normal;\n if (str == \"onlytranslation\")\n return spine.TransformMode.OnlyTranslation;\n if (str == \"norotationorreflection\")\n return spine.TransformMode.NoRotationOrReflection;\n if (str == \"noscale\")\n return spine.TransformMode.NoScale;\n if (str == \"noscaleorreflection\")\n return spine.TransformMode.NoScaleOrReflection;\n throw new Error(\"Unknown transform mode: \" + str);\n };\n return SkeletonJson;\n }());\n spine.SkeletonJson = SkeletonJson;\n var LinkedMesh = (function () {\n function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\n this.mesh = mesh;\n this.skin = skin;\n this.slotIndex = slotIndex;\n this.parent = parent;\n this.inheritDeform = inheritDeform;\n }\n return LinkedMesh;\n }());\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SkinEntry = (function () {\n function SkinEntry(slotIndex, name, attachment) {\n this.slotIndex = slotIndex;\n this.name = name;\n this.attachment = attachment;\n }\n return SkinEntry;\n }());\n spine.SkinEntry = SkinEntry;\n var Skin = (function () {\n function Skin(name) {\n this.attachments = new Array();\n this.bones = Array();\n this.constraints = new Array();\n if (name == null)\n throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n Skin.prototype.setAttachment = function (slotIndex, name, attachment) {\n if (attachment == null)\n throw new Error(\"attachment cannot be null.\");\n var attachments = this.attachments;\n if (slotIndex >= attachments.length)\n attachments.length = slotIndex + 1;\n if (!attachments[slotIndex])\n attachments[slotIndex] = {};\n attachments[slotIndex][name] = attachment;\n };\n Skin.prototype.addSkin = function (skin) {\n for (var i = 0; i < skin.bones.length; i++) {\n var bone = skin.bones[i];\n var contained = false;\n for (var j = 0; j < this.bones.length; j++) {\n if (this.bones[j] == bone) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.bones.push(bone);\n }\n for (var i = 0; i < skin.constraints.length; i++) {\n var constraint = skin.constraints[i];\n var contained = false;\n for (var j = 0; j < this.constraints.length; j++) {\n if (this.constraints[j] == constraint) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.constraints.push(constraint);\n }\n var attachments = skin.getAttachments();\n for (var i = 0; i < attachments.length; i++) {\n var attachment = attachments[i];\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n }\n };\n Skin.prototype.copySkin = function (skin) {\n for (var i = 0; i < skin.bones.length; i++) {\n var bone = skin.bones[i];\n var contained = false;\n for (var j = 0; j < this.bones.length; j++) {\n if (this.bones[j] == bone) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.bones.push(bone);\n }\n for (var i = 0; i < skin.constraints.length; i++) {\n var constraint = skin.constraints[i];\n var contained = false;\n for (var j = 0; j < this.constraints.length; j++) {\n if (this.constraints[j] == constraint) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.constraints.push(constraint);\n }\n var attachments = skin.getAttachments();\n for (var i = 0; i < attachments.length; i++) {\n var attachment = attachments[i];\n if (attachment.attachment == null)\n continue;\n if (attachment.attachment instanceof spine.MeshAttachment) {\n attachment.attachment = attachment.attachment.newLinkedMesh();\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n }\n else {\n attachment.attachment = attachment.attachment.copy();\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n }\n }\n };\n Skin.prototype.getAttachment = function (slotIndex, name) {\n var dictionary = this.attachments[slotIndex];\n return dictionary ? dictionary[name] : null;\n };\n Skin.prototype.removeAttachment = function (slotIndex, name) {\n var dictionary = this.attachments[slotIndex];\n if (dictionary)\n dictionary[name] = null;\n };\n Skin.prototype.getAttachments = function () {\n var entries = new Array();\n for (var i = 0; i < this.attachments.length; i++) {\n var slotAttachments = this.attachments[i];\n if (slotAttachments) {\n for (var name_4 in slotAttachments) {\n var attachment = slotAttachments[name_4];\n if (attachment)\n entries.push(new SkinEntry(i, name_4, attachment));\n }\n }\n }\n return entries;\n };\n Skin.prototype.getAttachmentsForSlot = function (slotIndex, attachments) {\n var slotAttachments = this.attachments[slotIndex];\n if (slotAttachments) {\n for (var name_5 in slotAttachments) {\n var attachment = slotAttachments[name_5];\n if (attachment)\n attachments.push(new SkinEntry(slotIndex, name_5, attachment));\n }\n }\n };\n Skin.prototype.clear = function () {\n this.attachments.length = 0;\n this.bones.length = 0;\n this.constraints.length = 0;\n };\n Skin.prototype.attachAll = function (skeleton, oldSkin) {\n var slotIndex = 0;\n for (var i = 0; i < skeleton.slots.length; i++) {\n var slot = skeleton.slots[i];\n var slotAttachment = slot.getAttachment();\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\n var dictionary = oldSkin.attachments[slotIndex];\n for (var key in dictionary) {\n var skinAttachment = dictionary[key];\n if (slotAttachment == skinAttachment) {\n var attachment = this.getAttachment(slotIndex, key);\n if (attachment != null)\n slot.setAttachment(attachment);\n break;\n }\n }\n }\n slotIndex++;\n }\n };\n return Skin;\n }());\n spine.Skin = Skin;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Slot = (function () {\n function Slot(data, bone) {\n this.deform = new Array();\n if (data == null)\n throw new Error(\"data cannot be null.\");\n if (bone == null)\n throw new Error(\"bone cannot be null.\");\n this.data = data;\n this.bone = bone;\n this.color = new spine.Color();\n this.darkColor = data.darkColor == null ? null : new spine.Color();\n this.setToSetupPose();\n }\n Slot.prototype.getSkeleton = function () {\n return this.bone.skeleton;\n };\n Slot.prototype.getAttachment = function () {\n return this.attachment;\n };\n Slot.prototype.setAttachment = function (attachment) {\n if (this.attachment == attachment)\n return;\n this.attachment = attachment;\n this.attachmentTime = this.bone.skeleton.time;\n this.deform.length = 0;\n };\n Slot.prototype.setAttachmentTime = function (time) {\n this.attachmentTime = this.bone.skeleton.time - time;\n };\n Slot.prototype.getAttachmentTime = function () {\n return this.bone.skeleton.time - this.attachmentTime;\n };\n Slot.prototype.setToSetupPose = function () {\n this.color.setFromColor(this.data.color);\n if (this.darkColor != null)\n this.darkColor.setFromColor(this.data.darkColor);\n if (this.data.attachmentName == null)\n this.attachment = null;\n else {\n this.attachment = null;\n this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName));\n }\n };\n return Slot;\n }());\n spine.Slot = Slot;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SlotData = (function () {\n function SlotData(index, name, boneData) {\n this.color = new spine.Color(1, 1, 1, 1);\n if (index < 0)\n throw new Error(\"index must be >= 0.\");\n if (name == null)\n throw new Error(\"name cannot be null.\");\n if (boneData == null)\n throw new Error(\"boneData cannot be null.\");\n this.index = index;\n this.name = name;\n this.boneData = boneData;\n }\n return SlotData;\n }());\n spine.SlotData = SlotData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Texture = (function () {\n function Texture(image) {\n this._image = image;\n }\n Texture.prototype.getImage = function () {\n return this._image;\n };\n Texture.filterFromString = function (text) {\n switch (text.toLowerCase()) {\n case \"nearest\": return TextureFilter.Nearest;\n case \"linear\": return TextureFilter.Linear;\n case \"mipmap\": return TextureFilter.MipMap;\n case \"mipmapnearestnearest\": return TextureFilter.MipMapNearestNearest;\n case \"mipmaplinearnearest\": return TextureFilter.MipMapLinearNearest;\n case \"mipmapnearestlinear\": return TextureFilter.MipMapNearestLinear;\n case \"mipmaplinearlinear\": return TextureFilter.MipMapLinearLinear;\n default: throw new Error(\"Unknown texture filter \" + text);\n }\n };\n Texture.wrapFromString = function (text) {\n switch (text.toLowerCase()) {\n case \"mirroredtepeat\": return TextureWrap.MirroredRepeat;\n case \"clamptoedge\": return TextureWrap.ClampToEdge;\n case \"repeat\": return TextureWrap.Repeat;\n default: throw new Error(\"Unknown texture wrap \" + text);\n }\n };\n return Texture;\n }());\n spine.Texture = Texture;\n var TextureFilter;\n (function (TextureFilter) {\n TextureFilter[TextureFilter[\"Nearest\"] = 9728] = \"Nearest\";\n TextureFilter[TextureFilter[\"Linear\"] = 9729] = \"Linear\";\n TextureFilter[TextureFilter[\"MipMap\"] = 9987] = \"MipMap\";\n TextureFilter[TextureFilter[\"MipMapNearestNearest\"] = 9984] = \"MipMapNearestNearest\";\n TextureFilter[TextureFilter[\"MipMapLinearNearest\"] = 9985] = \"MipMapLinearNearest\";\n TextureFilter[TextureFilter[\"MipMapNearestLinear\"] = 9986] = \"MipMapNearestLinear\";\n TextureFilter[TextureFilter[\"MipMapLinearLinear\"] = 9987] = \"MipMapLinearLinear\";\n })(TextureFilter = spine.TextureFilter || (spine.TextureFilter = {}));\n var TextureWrap;\n (function (TextureWrap) {\n TextureWrap[TextureWrap[\"MirroredRepeat\"] = 33648] = \"MirroredRepeat\";\n TextureWrap[TextureWrap[\"ClampToEdge\"] = 33071] = \"ClampToEdge\";\n TextureWrap[TextureWrap[\"Repeat\"] = 10497] = \"Repeat\";\n })(TextureWrap = spine.TextureWrap || (spine.TextureWrap = {}));\n var TextureRegion = (function () {\n function TextureRegion() {\n this.u = 0;\n this.v = 0;\n this.u2 = 0;\n this.v2 = 0;\n this.width = 0;\n this.height = 0;\n this.rotate = false;\n this.offsetX = 0;\n this.offsetY = 0;\n this.originalWidth = 0;\n this.originalHeight = 0;\n }\n return TextureRegion;\n }());\n spine.TextureRegion = TextureRegion;\n var FakeTexture = (function (_super) {\n __extends(FakeTexture, _super);\n function FakeTexture() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n FakeTexture.prototype.setFilters = function (minFilter, magFilter) { };\n FakeTexture.prototype.setWraps = function (uWrap, vWrap) { };\n FakeTexture.prototype.dispose = function () { };\n return FakeTexture;\n }(Texture));\n spine.FakeTexture = FakeTexture;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var TextureAtlas = (function () {\n function TextureAtlas(atlasText, textureLoader) {\n this.pages = new Array();\n this.regions = new Array();\n this.load(atlasText, textureLoader);\n }\n TextureAtlas.prototype.load = function (atlasText, textureLoader) {\n if (textureLoader == null)\n throw new Error(\"textureLoader cannot be null.\");\n var reader = new TextureAtlasReader(atlasText);\n var tuple = new Array(4);\n var page = null;\n while (true) {\n var line = reader.readLine();\n if (line == null)\n break;\n line = line.trim();\n if (line.length == 0)\n page = null;\n else if (!page) {\n page = new TextureAtlasPage();\n page.name = line;\n if (reader.readTuple(tuple) == 2) {\n page.width = parseInt(tuple[0]);\n page.height = parseInt(tuple[1]);\n reader.readTuple(tuple);\n }\n reader.readTuple(tuple);\n page.minFilter = spine.Texture.filterFromString(tuple[0]);\n page.magFilter = spine.Texture.filterFromString(tuple[1]);\n var direction = reader.readValue();\n page.uWrap = spine.TextureWrap.ClampToEdge;\n page.vWrap = spine.TextureWrap.ClampToEdge;\n if (direction == \"x\")\n page.uWrap = spine.TextureWrap.Repeat;\n else if (direction == \"y\")\n page.vWrap = spine.TextureWrap.Repeat;\n else if (direction == \"xy\")\n page.uWrap = page.vWrap = spine.TextureWrap.Repeat;\n page.texture = textureLoader(line);\n page.texture.setFilters(page.minFilter, page.magFilter);\n page.texture.setWraps(page.uWrap, page.vWrap);\n page.width = page.texture.getImage().width;\n page.height = page.texture.getImage().height;\n this.pages.push(page);\n }\n else {\n var region = new TextureAtlasRegion();\n region.name = line;\n region.page = page;\n var rotateValue = reader.readValue();\n if (rotateValue.toLocaleLowerCase() == \"true\") {\n region.degrees = 90;\n }\n else if (rotateValue.toLocaleLowerCase() == \"false\") {\n region.degrees = 0;\n }\n else {\n region.degrees = parseFloat(rotateValue);\n }\n region.rotate = region.degrees == 90;\n reader.readTuple(tuple);\n var x = parseInt(tuple[0]);\n var y = parseInt(tuple[1]);\n reader.readTuple(tuple);\n var width = parseInt(tuple[0]);\n var height = parseInt(tuple[1]);\n region.u = x / page.width;\n region.v = y / page.height;\n if (region.rotate) {\n region.u2 = (x + height) / page.width;\n region.v2 = (y + width) / page.height;\n }\n else {\n region.u2 = (x + width) / page.width;\n region.v2 = (y + height) / page.height;\n }\n region.x = x;\n region.y = y;\n region.width = Math.abs(width);\n region.height = Math.abs(height);\n if (reader.readTuple(tuple) == 4) {\n if (reader.readTuple(tuple) == 4) {\n reader.readTuple(tuple);\n }\n }\n region.originalWidth = parseInt(tuple[0]);\n region.originalHeight = parseInt(tuple[1]);\n reader.readTuple(tuple);\n region.offsetX = parseInt(tuple[0]);\n region.offsetY = parseInt(tuple[1]);\n region.index = parseInt(reader.readValue());\n region.texture = page.texture;\n this.regions.push(region);\n }\n }\n };\n TextureAtlas.prototype.findRegion = function (name) {\n for (var i = 0; i < this.regions.length; i++) {\n if (this.regions[i].name == name) {\n return this.regions[i];\n }\n }\n return null;\n };\n TextureAtlas.prototype.dispose = function () {\n for (var i = 0; i < this.pages.length; i++) {\n this.pages[i].texture.dispose();\n }\n };\n return TextureAtlas;\n }());\n spine.TextureAtlas = TextureAtlas;\n var TextureAtlasReader = (function () {\n function TextureAtlasReader(text) {\n this.index = 0;\n this.lines = text.split(/\\r\\n|\\r|\\n/);\n }\n TextureAtlasReader.prototype.readLine = function () {\n if (this.index >= this.lines.length)\n return null;\n return this.lines[this.index++];\n };\n TextureAtlasReader.prototype.readValue = function () {\n var line = this.readLine();\n var colon = line.indexOf(\":\");\n if (colon == -1)\n throw new Error(\"Invalid line: \" + line);\n return line.substring(colon + 1).trim();\n };\n TextureAtlasReader.prototype.readTuple = function (tuple) {\n var line = this.readLine();\n var colon = line.indexOf(\":\");\n if (colon == -1)\n throw new Error(\"Invalid line: \" + line);\n var i = 0, lastMatch = colon + 1;\n for (; i < 3; i++) {\n var comma = line.indexOf(\",\", lastMatch);\n if (comma == -1)\n break;\n tuple[i] = line.substr(lastMatch, comma - lastMatch).trim();\n lastMatch = comma + 1;\n }\n tuple[i] = line.substring(lastMatch).trim();\n return i + 1;\n };\n return TextureAtlasReader;\n }());\n var TextureAtlasPage = (function () {\n function TextureAtlasPage() {\n }\n return TextureAtlasPage;\n }());\n spine.TextureAtlasPage = TextureAtlasPage;\n var TextureAtlasRegion = (function (_super) {\n __extends(TextureAtlasRegion, _super);\n function TextureAtlasRegion() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return TextureAtlasRegion;\n }(spine.TextureRegion));\n spine.TextureAtlasRegion = TextureAtlasRegion;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var TransformConstraint = (function () {\n function TransformConstraint(data, skeleton) {\n this.rotateMix = 0;\n this.translateMix = 0;\n this.scaleMix = 0;\n this.shearMix = 0;\n this.temp = new spine.Vector2();\n this.active = false;\n if (data == null)\n throw new Error(\"data cannot be null.\");\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.rotateMix = data.rotateMix;\n this.translateMix = data.translateMix;\n this.scaleMix = data.scaleMix;\n this.shearMix = data.shearMix;\n this.bones = new Array();\n for (var i = 0; i < data.bones.length; i++)\n this.bones.push(skeleton.findBone(data.bones[i].name));\n this.target = skeleton.findBone(data.target.name);\n }\n TransformConstraint.prototype.isActive = function () {\n return this.active;\n };\n TransformConstraint.prototype.apply = function () {\n this.update();\n };\n TransformConstraint.prototype.update = function () {\n if (this.data.local) {\n if (this.data.relative)\n this.applyRelativeLocal();\n else\n this.applyAbsoluteLocal();\n }\n else {\n if (this.data.relative)\n this.applyRelativeWorld();\n else\n this.applyAbsoluteWorld();\n }\n };\n TransformConstraint.prototype.applyAbsoluteWorld = function () {\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\n var target = this.target;\n var ta = target.a, tb = target.b, tc = target.c, td = target.d;\n var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\n var offsetRotation = this.data.offsetRotation * degRadReflect;\n var offsetShearY = this.data.offsetShearY * degRadReflect;\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n var modified = false;\n if (rotateMix != 0) {\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n var r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\n if (r > spine.MathUtils.PI)\n r -= spine.MathUtils.PI2;\n else if (r < -spine.MathUtils.PI)\n r += spine.MathUtils.PI2;\n r *= rotateMix;\n var cos = Math.cos(r), sin = Math.sin(r);\n bone.a = cos * a - sin * c;\n bone.b = cos * b - sin * d;\n bone.c = sin * a + cos * c;\n bone.d = sin * b + cos * d;\n modified = true;\n }\n if (translateMix != 0) {\n var temp = this.temp;\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\n bone.worldX += (temp.x - bone.worldX) * translateMix;\n bone.worldY += (temp.y - bone.worldY) * translateMix;\n modified = true;\n }\n if (scaleMix > 0) {\n var s = Math.sqrt(bone.a * bone.a + bone.c * bone.c);\n var ts = Math.sqrt(ta * ta + tc * tc);\n if (s > 0.00001)\n s = (s + (ts - s + this.data.offsetScaleX) * scaleMix) / s;\n bone.a *= s;\n bone.c *= s;\n s = Math.sqrt(bone.b * bone.b + bone.d * bone.d);\n ts = Math.sqrt(tb * tb + td * td);\n if (s > 0.00001)\n s = (s + (ts - s + this.data.offsetScaleY) * scaleMix) / s;\n bone.b *= s;\n bone.d *= s;\n modified = true;\n }\n if (shearMix > 0) {\n var b = bone.b, d = bone.d;\n var by = Math.atan2(d, b);\n var r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a));\n if (r > spine.MathUtils.PI)\n r -= spine.MathUtils.PI2;\n else if (r < -spine.MathUtils.PI)\n r += spine.MathUtils.PI2;\n r = by + (r + offsetShearY) * shearMix;\n var s = Math.sqrt(b * b + d * d);\n bone.b = Math.cos(r) * s;\n bone.d = Math.sin(r) * s;\n modified = true;\n }\n if (modified)\n bone.appliedValid = false;\n }\n };\n TransformConstraint.prototype.applyRelativeWorld = function () {\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\n var target = this.target;\n var ta = target.a, tb = target.b, tc = target.c, td = target.d;\n var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\n var offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect;\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n var modified = false;\n if (rotateMix != 0) {\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n var r = Math.atan2(tc, ta) + offsetRotation;\n if (r > spine.MathUtils.PI)\n r -= spine.MathUtils.PI2;\n else if (r < -spine.MathUtils.PI)\n r += spine.MathUtils.PI2;\n r *= rotateMix;\n var cos = Math.cos(r), sin = Math.sin(r);\n bone.a = cos * a - sin * c;\n bone.b = cos * b - sin * d;\n bone.c = sin * a + cos * c;\n bone.d = sin * b + cos * d;\n modified = true;\n }\n if (translateMix != 0) {\n var temp = this.temp;\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\n bone.worldX += temp.x * translateMix;\n bone.worldY += temp.y * translateMix;\n modified = true;\n }\n if (scaleMix > 0) {\n var s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * scaleMix + 1;\n bone.a *= s;\n bone.c *= s;\n s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * scaleMix + 1;\n bone.b *= s;\n bone.d *= s;\n modified = true;\n }\n if (shearMix > 0) {\n var r = Math.atan2(td, tb) - Math.atan2(tc, ta);\n if (r > spine.MathUtils.PI)\n r -= spine.MathUtils.PI2;\n else if (r < -spine.MathUtils.PI)\n r += spine.MathUtils.PI2;\n var b = bone.b, d = bone.d;\n r = Math.atan2(d, b) + (r - spine.MathUtils.PI / 2 + offsetShearY) * shearMix;\n var s = Math.sqrt(b * b + d * d);\n bone.b = Math.cos(r) * s;\n bone.d = Math.sin(r) * s;\n modified = true;\n }\n if (modified)\n bone.appliedValid = false;\n }\n };\n TransformConstraint.prototype.applyAbsoluteLocal = function () {\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\n var target = this.target;\n if (!target.appliedValid)\n target.updateAppliedTransform();\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n if (!bone.appliedValid)\n bone.updateAppliedTransform();\n var rotation = bone.arotation;\n if (rotateMix != 0) {\n var r = target.arotation - rotation + this.data.offsetRotation;\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\n rotation += r * rotateMix;\n }\n var x = bone.ax, y = bone.ay;\n if (translateMix != 0) {\n x += (target.ax - x + this.data.offsetX) * translateMix;\n y += (target.ay - y + this.data.offsetY) * translateMix;\n }\n var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\n if (scaleMix != 0) {\n if (scaleX > 0.00001)\n scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * scaleMix) / scaleX;\n if (scaleY > 0.00001)\n scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * scaleMix) / scaleY;\n }\n var shearY = bone.ashearY;\n if (shearMix != 0) {\n var r = target.ashearY - shearY + this.data.offsetShearY;\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\n bone.shearY += r * shearMix;\n }\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\n }\n };\n TransformConstraint.prototype.applyRelativeLocal = function () {\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\n var target = this.target;\n if (!target.appliedValid)\n target.updateAppliedTransform();\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n if (!bone.appliedValid)\n bone.updateAppliedTransform();\n var rotation = bone.arotation;\n if (rotateMix != 0)\n rotation += (target.arotation + this.data.offsetRotation) * rotateMix;\n var x = bone.ax, y = bone.ay;\n if (translateMix != 0) {\n x += (target.ax + this.data.offsetX) * translateMix;\n y += (target.ay + this.data.offsetY) * translateMix;\n }\n var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\n if (scaleMix != 0) {\n if (scaleX > 0.00001)\n scaleX *= ((target.ascaleX - 1 + this.data.offsetScaleX) * scaleMix) + 1;\n if (scaleY > 0.00001)\n scaleY *= ((target.ascaleY - 1 + this.data.offsetScaleY) * scaleMix) + 1;\n }\n var shearY = bone.ashearY;\n if (shearMix != 0)\n shearY += (target.ashearY + this.data.offsetShearY) * shearMix;\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\n }\n };\n return TransformConstraint;\n }());\n spine.TransformConstraint = TransformConstraint;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var TransformConstraintData = (function (_super) {\n __extends(TransformConstraintData, _super);\n function TransformConstraintData(name) {\n var _this = _super.call(this, name, 0, false) || this;\n _this.bones = new Array();\n _this.rotateMix = 0;\n _this.translateMix = 0;\n _this.scaleMix = 0;\n _this.shearMix = 0;\n _this.offsetRotation = 0;\n _this.offsetX = 0;\n _this.offsetY = 0;\n _this.offsetScaleX = 0;\n _this.offsetScaleY = 0;\n _this.offsetShearY = 0;\n _this.relative = false;\n _this.local = false;\n return _this;\n }\n return TransformConstraintData;\n }(spine.ConstraintData));\n spine.TransformConstraintData = TransformConstraintData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Triangulator = (function () {\n function Triangulator() {\n this.convexPolygons = new Array();\n this.convexPolygonsIndices = new Array();\n this.indicesArray = new Array();\n this.isConcaveArray = new Array();\n this.triangles = new Array();\n this.polygonPool = new spine.Pool(function () {\n return new Array();\n });\n this.polygonIndicesPool = new spine.Pool(function () {\n return new Array();\n });\n }\n Triangulator.prototype.triangulate = function (verticesArray) {\n var vertices = verticesArray;\n var vertexCount = verticesArray.length >> 1;\n var indices = this.indicesArray;\n indices.length = 0;\n for (var i = 0; i < vertexCount; i++)\n indices[i] = i;\n var isConcave = this.isConcaveArray;\n isConcave.length = 0;\n for (var i = 0, n = vertexCount; i < n; ++i)\n isConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices);\n var triangles = this.triangles;\n triangles.length = 0;\n while (vertexCount > 3) {\n var previous = vertexCount - 1, i = 0, next = 1;\n while (true) {\n outer: if (!isConcave[i]) {\n var p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\n var p1x = vertices[p1], p1y = vertices[p1 + 1];\n var p2x = vertices[p2], p2y = vertices[p2 + 1];\n var p3x = vertices[p3], p3y = vertices[p3 + 1];\n for (var ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\n if (!isConcave[ii])\n continue;\n var v = indices[ii] << 1;\n var vx = vertices[v], vy = vertices[v + 1];\n if (Triangulator.positiveArea(p3x, p3y, p1x, p1y, vx, vy)) {\n if (Triangulator.positiveArea(p1x, p1y, p2x, p2y, vx, vy)) {\n if (Triangulator.positiveArea(p2x, p2y, p3x, p3y, vx, vy))\n break outer;\n }\n }\n }\n break;\n }\n if (next == 0) {\n do {\n if (!isConcave[i])\n break;\n i--;\n } while (i > 0);\n break;\n }\n previous = i;\n i = next;\n next = (next + 1) % vertexCount;\n }\n triangles.push(indices[(vertexCount + i - 1) % vertexCount]);\n triangles.push(indices[i]);\n triangles.push(indices[(i + 1) % vertexCount]);\n indices.splice(i, 1);\n isConcave.splice(i, 1);\n vertexCount--;\n var previousIndex = (vertexCount + i - 1) % vertexCount;\n var nextIndex = i == vertexCount ? 0 : i;\n isConcave[previousIndex] = Triangulator.isConcave(previousIndex, vertexCount, vertices, indices);\n isConcave[nextIndex] = Triangulator.isConcave(nextIndex, vertexCount, vertices, indices);\n }\n if (vertexCount == 3) {\n triangles.push(indices[2]);\n triangles.push(indices[0]);\n triangles.push(indices[1]);\n }\n return triangles;\n };\n Triangulator.prototype.decompose = function (verticesArray, triangles) {\n var vertices = verticesArray;\n var convexPolygons = this.convexPolygons;\n this.polygonPool.freeAll(convexPolygons);\n convexPolygons.length = 0;\n var convexPolygonsIndices = this.convexPolygonsIndices;\n this.polygonIndicesPool.freeAll(convexPolygonsIndices);\n convexPolygonsIndices.length = 0;\n var polygonIndices = this.polygonIndicesPool.obtain();\n polygonIndices.length = 0;\n var polygon = this.polygonPool.obtain();\n polygon.length = 0;\n var fanBaseIndex = -1, lastWinding = 0;\n for (var i = 0, n = triangles.length; i < n; i += 3) {\n var t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\n var x1 = vertices[t1], y1 = vertices[t1 + 1];\n var x2 = vertices[t2], y2 = vertices[t2 + 1];\n var x3 = vertices[t3], y3 = vertices[t3 + 1];\n var merged = false;\n if (fanBaseIndex == t1) {\n var o = polygon.length - 4;\n var winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3);\n var winding2 = Triangulator.winding(x3, y3, polygon[0], polygon[1], polygon[2], polygon[3]);\n if (winding1 == lastWinding && winding2 == lastWinding) {\n polygon.push(x3);\n polygon.push(y3);\n polygonIndices.push(t3);\n merged = true;\n }\n }\n if (!merged) {\n if (polygon.length > 0) {\n convexPolygons.push(polygon);\n convexPolygonsIndices.push(polygonIndices);\n }\n else {\n this.polygonPool.free(polygon);\n this.polygonIndicesPool.free(polygonIndices);\n }\n polygon = this.polygonPool.obtain();\n polygon.length = 0;\n polygon.push(x1);\n polygon.push(y1);\n polygon.push(x2);\n polygon.push(y2);\n polygon.push(x3);\n polygon.push(y3);\n polygonIndices = this.polygonIndicesPool.obtain();\n polygonIndices.length = 0;\n polygonIndices.push(t1);\n polygonIndices.push(t2);\n polygonIndices.push(t3);\n lastWinding = Triangulator.winding(x1, y1, x2, y2, x3, y3);\n fanBaseIndex = t1;\n }\n }\n if (polygon.length > 0) {\n convexPolygons.push(polygon);\n convexPolygonsIndices.push(polygonIndices);\n }\n for (var i = 0, n = convexPolygons.length; i < n; i++) {\n polygonIndices = convexPolygonsIndices[i];\n if (polygonIndices.length == 0)\n continue;\n var firstIndex = polygonIndices[0];\n var lastIndex = polygonIndices[polygonIndices.length - 1];\n polygon = convexPolygons[i];\n var o = polygon.length - 4;\n var prevPrevX = polygon[o], prevPrevY = polygon[o + 1];\n var prevX = polygon[o + 2], prevY = polygon[o + 3];\n var firstX = polygon[0], firstY = polygon[1];\n var secondX = polygon[2], secondY = polygon[3];\n var winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\n for (var ii = 0; ii < n; ii++) {\n if (ii == i)\n continue;\n var otherIndices = convexPolygonsIndices[ii];\n if (otherIndices.length != 3)\n continue;\n var otherFirstIndex = otherIndices[0];\n var otherSecondIndex = otherIndices[1];\n var otherLastIndex = otherIndices[2];\n var otherPoly = convexPolygons[ii];\n var x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1];\n if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex)\n continue;\n var winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\n var winding2 = Triangulator.winding(x3, y3, firstX, firstY, secondX, secondY);\n if (winding1 == winding && winding2 == winding) {\n otherPoly.length = 0;\n otherIndices.length = 0;\n polygon.push(x3);\n polygon.push(y3);\n polygonIndices.push(otherLastIndex);\n prevPrevX = prevX;\n prevPrevY = prevY;\n prevX = x3;\n prevY = y3;\n ii = 0;\n }\n }\n }\n for (var i = convexPolygons.length - 1; i >= 0; i--) {\n polygon = convexPolygons[i];\n if (polygon.length == 0) {\n convexPolygons.splice(i, 1);\n this.polygonPool.free(polygon);\n polygonIndices = convexPolygonsIndices[i];\n convexPolygonsIndices.splice(i, 1);\n this.polygonIndicesPool.free(polygonIndices);\n }\n }\n return convexPolygons;\n };\n Triangulator.isConcave = function (index, vertexCount, vertices, indices) {\n var previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\n var current = indices[index] << 1;\n var next = indices[(index + 1) % vertexCount] << 1;\n return !this.positiveArea(vertices[previous], vertices[previous + 1], vertices[current], vertices[current + 1], vertices[next], vertices[next + 1]);\n };\n Triangulator.positiveArea = function (p1x, p1y, p2x, p2y, p3x, p3y) {\n return p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\n };\n Triangulator.winding = function (p1x, p1y, p2x, p2y, p3x, p3y) {\n var px = p2x - p1x, py = p2y - p1y;\n return p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\n };\n return Triangulator;\n }());\n spine.Triangulator = Triangulator;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var IntSet = (function () {\n function IntSet() {\n this.array = new Array();\n }\n IntSet.prototype.add = function (value) {\n var contains = this.contains(value);\n this.array[value | 0] = value | 0;\n return !contains;\n };\n IntSet.prototype.contains = function (value) {\n return this.array[value | 0] != undefined;\n };\n IntSet.prototype.remove = function (value) {\n this.array[value | 0] = undefined;\n };\n IntSet.prototype.clear = function () {\n this.array.length = 0;\n };\n return IntSet;\n }());\n spine.IntSet = IntSet;\n var Color = (function () {\n function Color(r, g, b, a) {\n if (r === void 0) { r = 0; }\n if (g === void 0) { g = 0; }\n if (b === void 0) { b = 0; }\n if (a === void 0) { a = 0; }\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n }\n Color.prototype.set = function (r, g, b, a) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n this.clamp();\n return this;\n };\n Color.prototype.setFromColor = function (c) {\n this.r = c.r;\n this.g = c.g;\n this.b = c.b;\n this.a = c.a;\n return this;\n };\n Color.prototype.setFromString = function (hex) {\n hex = hex.charAt(0) == '#' ? hex.substr(1) : hex;\n this.r = parseInt(hex.substr(0, 2), 16) / 255.0;\n this.g = parseInt(hex.substr(2, 2), 16) / 255.0;\n this.b = parseInt(hex.substr(4, 2), 16) / 255.0;\n this.a = (hex.length != 8 ? 255 : parseInt(hex.substr(6, 2), 16)) / 255.0;\n return this;\n };\n Color.prototype.add = function (r, g, b, a) {\n this.r += r;\n this.g += g;\n this.b += b;\n this.a += a;\n this.clamp();\n return this;\n };\n Color.prototype.clamp = function () {\n if (this.r < 0)\n this.r = 0;\n else if (this.r > 1)\n this.r = 1;\n if (this.g < 0)\n this.g = 0;\n else if (this.g > 1)\n this.g = 1;\n if (this.b < 0)\n this.b = 0;\n else if (this.b > 1)\n this.b = 1;\n if (this.a < 0)\n this.a = 0;\n else if (this.a > 1)\n this.a = 1;\n return this;\n };\n Color.rgba8888ToColor = function (color, value) {\n color.r = ((value & 0xff000000) >>> 24) / 255;\n color.g = ((value & 0x00ff0000) >>> 16) / 255;\n color.b = ((value & 0x0000ff00) >>> 8) / 255;\n color.a = ((value & 0x000000ff)) / 255;\n };\n Color.rgb888ToColor = function (color, value) {\n color.r = ((value & 0x00ff0000) >>> 16) / 255;\n color.g = ((value & 0x0000ff00) >>> 8) / 255;\n color.b = ((value & 0x000000ff)) / 255;\n };\n Color.WHITE = new Color(1, 1, 1, 1);\n Color.RED = new Color(1, 0, 0, 1);\n Color.GREEN = new Color(0, 1, 0, 1);\n Color.BLUE = new Color(0, 0, 1, 1);\n Color.MAGENTA = new Color(1, 0, 1, 1);\n return Color;\n }());\n spine.Color = Color;\n var MathUtils = (function () {\n function MathUtils() {\n }\n MathUtils.clamp = function (value, min, max) {\n if (value < min)\n return min;\n if (value > max)\n return max;\n return value;\n };\n MathUtils.cosDeg = function (degrees) {\n return Math.cos(degrees * MathUtils.degRad);\n };\n MathUtils.sinDeg = function (degrees) {\n return Math.sin(degrees * MathUtils.degRad);\n };\n MathUtils.signum = function (value) {\n return value > 0 ? 1 : value < 0 ? -1 : 0;\n };\n MathUtils.toInt = function (x) {\n return x > 0 ? Math.floor(x) : Math.ceil(x);\n };\n MathUtils.cbrt = function (x) {\n var y = Math.pow(Math.abs(x), 1 / 3);\n return x < 0 ? -y : y;\n };\n MathUtils.randomTriangular = function (min, max) {\n return MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\n };\n MathUtils.randomTriangularWith = function (min, max, mode) {\n var u = Math.random();\n var d = max - min;\n if (u <= (mode - min) / d)\n return min + Math.sqrt(u * d * (mode - min));\n return max - Math.sqrt((1 - u) * d * (max - mode));\n };\n MathUtils.PI = 3.1415927;\n MathUtils.PI2 = MathUtils.PI * 2;\n MathUtils.radiansToDegrees = 180 / MathUtils.PI;\n MathUtils.radDeg = MathUtils.radiansToDegrees;\n MathUtils.degreesToRadians = MathUtils.PI / 180;\n MathUtils.degRad = MathUtils.degreesToRadians;\n return MathUtils;\n }());\n spine.MathUtils = MathUtils;\n var Interpolation = (function () {\n function Interpolation() {\n }\n Interpolation.prototype.apply = function (start, end, a) {\n return start + (end - start) * this.applyInternal(a);\n };\n return Interpolation;\n }());\n spine.Interpolation = Interpolation;\n var Pow = (function (_super) {\n __extends(Pow, _super);\n function Pow(power) {\n var _this = _super.call(this) || this;\n _this.power = 2;\n _this.power = power;\n return _this;\n }\n Pow.prototype.applyInternal = function (a) {\n if (a <= 0.5)\n return Math.pow(a * 2, this.power) / 2;\n return Math.pow((a - 1) * 2, this.power) / (this.power % 2 == 0 ? -2 : 2) + 1;\n };\n return Pow;\n }(Interpolation));\n spine.Pow = Pow;\n var PowOut = (function (_super) {\n __extends(PowOut, _super);\n function PowOut(power) {\n return _super.call(this, power) || this;\n }\n PowOut.prototype.applyInternal = function (a) {\n return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\n };\n return PowOut;\n }(Pow));\n spine.PowOut = PowOut;\n var Utils = (function () {\n function Utils() {\n }\n Utils.arrayCopy = function (source, sourceStart, dest, destStart, numElements) {\n for (var i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\n dest[j] = source[i];\n }\n };\n Utils.setArraySize = function (array, size, value) {\n if (value === void 0) { value = 0; }\n var oldSize = array.length;\n if (oldSize == size)\n return array;\n array.length = size;\n if (oldSize < size) {\n for (var i = oldSize; i < size; i++)\n array[i] = value;\n }\n return array;\n };\n Utils.ensureArrayCapacity = function (array, size, value) {\n if (value === void 0) { value = 0; }\n if (array.length >= size)\n return array;\n return Utils.setArraySize(array, size, value);\n };\n Utils.newArray = function (size, defaultValue) {\n var array = new Array(size);\n for (var i = 0; i < size; i++)\n array[i] = defaultValue;\n return array;\n };\n Utils.newFloatArray = function (size) {\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\n return new Float32Array(size);\n }\n else {\n var array = new Array(size);\n for (var i = 0; i < array.length; i++)\n array[i] = 0;\n return array;\n }\n };\n Utils.newShortArray = function (size) {\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\n return new Int16Array(size);\n }\n else {\n var array = new Array(size);\n for (var i = 0; i < array.length; i++)\n array[i] = 0;\n return array;\n }\n };\n Utils.toFloatArray = function (array) {\n return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\n };\n Utils.toSinglePrecision = function (value) {\n return Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;\n };\n Utils.webkit602BugfixHelper = function (alpha, blend) {\n };\n Utils.contains = function (array, element, identity) {\n if (identity === void 0) { identity = true; }\n for (var i = 0; i < array.length; i++) {\n if (array[i] == element)\n return true;\n }\n return false;\n };\n Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== \"undefined\";\n return Utils;\n }());\n spine.Utils = Utils;\n var DebugUtils = (function () {\n function DebugUtils() {\n }\n DebugUtils.logBones = function (skeleton) {\n for (var i = 0; i < skeleton.bones.length; i++) {\n var bone = skeleton.bones[i];\n console.log(bone.data.name + \", \" + bone.a + \", \" + bone.b + \", \" + bone.c + \", \" + bone.d + \", \" + bone.worldX + \", \" + bone.worldY);\n }\n };\n return DebugUtils;\n }());\n spine.DebugUtils = DebugUtils;\n var Pool = (function () {\n function Pool(instantiator) {\n this.items = new Array();\n this.instantiator = instantiator;\n }\n Pool.prototype.obtain = function () {\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\n };\n Pool.prototype.free = function (item) {\n if (item.reset)\n item.reset();\n this.items.push(item);\n };\n Pool.prototype.freeAll = function (items) {\n for (var i = 0; i < items.length; i++) {\n this.free(items[i]);\n }\n };\n Pool.prototype.clear = function () {\n this.items.length = 0;\n };\n return Pool;\n }());\n spine.Pool = Pool;\n var Vector2 = (function () {\n function Vector2(x, y) {\n if (x === void 0) { x = 0; }\n if (y === void 0) { y = 0; }\n this.x = x;\n this.y = y;\n }\n Vector2.prototype.set = function (x, y) {\n this.x = x;\n this.y = y;\n return this;\n };\n Vector2.prototype.length = function () {\n var x = this.x;\n var y = this.y;\n return Math.sqrt(x * x + y * y);\n };\n Vector2.prototype.normalize = function () {\n var len = this.length();\n if (len != 0) {\n this.x /= len;\n this.y /= len;\n }\n return this;\n };\n return Vector2;\n }());\n spine.Vector2 = Vector2;\n var TimeKeeper = (function () {\n function TimeKeeper() {\n this.maxDelta = 0.064;\n this.framesPerSecond = 0;\n this.delta = 0;\n this.totalTime = 0;\n this.lastTime = Date.now() / 1000;\n this.frameCount = 0;\n this.frameTime = 0;\n }\n TimeKeeper.prototype.update = function () {\n var now = Date.now() / 1000;\n this.delta = now - this.lastTime;\n this.frameTime += this.delta;\n this.totalTime += this.delta;\n if (this.delta > this.maxDelta)\n this.delta = this.maxDelta;\n this.lastTime = now;\n this.frameCount++;\n if (this.frameTime > 1) {\n this.framesPerSecond = this.frameCount / this.frameTime;\n this.frameTime = 0;\n this.frameCount = 0;\n }\n };\n return TimeKeeper;\n }());\n spine.TimeKeeper = TimeKeeper;\n var WindowedMean = (function () {\n function WindowedMean(windowSize) {\n if (windowSize === void 0) { windowSize = 32; }\n this.addedValues = 0;\n this.lastValue = 0;\n this.mean = 0;\n this.dirty = true;\n this.values = new Array(windowSize);\n }\n WindowedMean.prototype.hasEnoughData = function () {\n return this.addedValues >= this.values.length;\n };\n WindowedMean.prototype.addValue = function (value) {\n if (this.addedValues < this.values.length)\n this.addedValues++;\n this.values[this.lastValue++] = value;\n if (this.lastValue > this.values.length - 1)\n this.lastValue = 0;\n this.dirty = true;\n };\n WindowedMean.prototype.getMean = function () {\n if (this.hasEnoughData()) {\n if (this.dirty) {\n var mean = 0;\n for (var i = 0; i < this.values.length; i++) {\n mean += this.values[i];\n }\n this.mean = mean / this.values.length;\n this.dirty = false;\n }\n return this.mean;\n }\n else {\n return 0;\n }\n };\n return WindowedMean;\n }());\n spine.WindowedMean = WindowedMean;\n})(spine || (spine = {}));\n(function () {\n if (!Math.fround) {\n Math.fround = (function (array) {\n return function (x) {\n return array[0] = x, array[0];\n };\n })(new Float32Array(1));\n }\n})();\nvar spine;\n(function (spine) {\n var Attachment = (function () {\n function Attachment(name) {\n if (name == null)\n throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n return Attachment;\n }());\n spine.Attachment = Attachment;\n var VertexAttachment = (function (_super) {\n __extends(VertexAttachment, _super);\n function VertexAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.id = (VertexAttachment.nextID++ & 65535) << 11;\n _this.worldVerticesLength = 0;\n _this.deformAttachment = _this;\n return _this;\n }\n VertexAttachment.prototype.computeWorldVertices = function (slot, start, count, worldVertices, offset, stride) {\n count = offset + (count >> 1) * stride;\n var skeleton = slot.bone.skeleton;\n var deformArray = slot.deform;\n var vertices = this.vertices;\n var bones = this.bones;\n if (bones == null) {\n if (deformArray.length > 0)\n vertices = deformArray;\n var bone = slot.bone;\n var x = bone.worldX;\n var y = bone.worldY;\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n for (var v_1 = start, w = offset; w < count; v_1 += 2, w += stride) {\n var vx = vertices[v_1], vy = vertices[v_1 + 1];\n worldVertices[w] = vx * a + vy * b + x;\n worldVertices[w + 1] = vx * c + vy * d + y;\n }\n return;\n }\n var v = 0, skip = 0;\n for (var i = 0; i < start; i += 2) {\n var n = bones[v];\n v += n + 1;\n skip += n;\n }\n var skeletonBones = skeleton.bones;\n if (deformArray.length == 0) {\n for (var w = offset, b = skip * 3; w < count; w += stride) {\n var wx = 0, wy = 0;\n var n = bones[v++];\n n += v;\n for (; v < n; v++, b += 3) {\n var bone = skeletonBones[bones[v]];\n var vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\n }\n worldVertices[w] = wx;\n worldVertices[w + 1] = wy;\n }\n }\n else {\n var deform = deformArray;\n for (var w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\n var wx = 0, wy = 0;\n var n = bones[v++];\n n += v;\n for (; v < n; v++, b += 3, f += 2) {\n var bone = skeletonBones[bones[v]];\n var vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\n }\n worldVertices[w] = wx;\n worldVertices[w + 1] = wy;\n }\n }\n };\n VertexAttachment.prototype.copyTo = function (attachment) {\n if (this.bones != null) {\n attachment.bones = new Array(this.bones.length);\n spine.Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\n }\n else\n attachment.bones = null;\n if (this.vertices != null) {\n attachment.vertices = spine.Utils.newFloatArray(this.vertices.length);\n spine.Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\n }\n else\n attachment.vertices = null;\n attachment.worldVerticesLength = this.worldVerticesLength;\n attachment.deformAttachment = this.deformAttachment;\n };\n VertexAttachment.nextID = 0;\n return VertexAttachment;\n }(Attachment));\n spine.VertexAttachment = VertexAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var AttachmentType;\n (function (AttachmentType) {\n AttachmentType[AttachmentType[\"Region\"] = 0] = \"Region\";\n AttachmentType[AttachmentType[\"BoundingBox\"] = 1] = \"BoundingBox\";\n AttachmentType[AttachmentType[\"Mesh\"] = 2] = \"Mesh\";\n AttachmentType[AttachmentType[\"LinkedMesh\"] = 3] = \"LinkedMesh\";\n AttachmentType[AttachmentType[\"Path\"] = 4] = \"Path\";\n AttachmentType[AttachmentType[\"Point\"] = 5] = \"Point\";\n AttachmentType[AttachmentType[\"Clipping\"] = 6] = \"Clipping\";\n })(AttachmentType = spine.AttachmentType || (spine.AttachmentType = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var BoundingBoxAttachment = (function (_super) {\n __extends(BoundingBoxAttachment, _super);\n function BoundingBoxAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.color = new spine.Color(1, 1, 1, 1);\n return _this;\n }\n BoundingBoxAttachment.prototype.copy = function () {\n var copy = new BoundingBoxAttachment(name);\n this.copyTo(copy);\n copy.color.setFromColor(this.color);\n return copy;\n };\n return BoundingBoxAttachment;\n }(spine.VertexAttachment));\n spine.BoundingBoxAttachment = BoundingBoxAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var ClippingAttachment = (function (_super) {\n __extends(ClippingAttachment, _super);\n function ClippingAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.color = new spine.Color(0.2275, 0.2275, 0.8078, 1);\n return _this;\n }\n ClippingAttachment.prototype.copy = function () {\n var copy = new ClippingAttachment(name);\n this.copyTo(copy);\n copy.endSlot = this.endSlot;\n copy.color.setFromColor(this.color);\n return copy;\n };\n return ClippingAttachment;\n }(spine.VertexAttachment));\n spine.ClippingAttachment = ClippingAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var MeshAttachment = (function (_super) {\n __extends(MeshAttachment, _super);\n function MeshAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.color = new spine.Color(1, 1, 1, 1);\n _this.tempColor = new spine.Color(0, 0, 0, 0);\n return _this;\n }\n MeshAttachment.prototype.updateUVs = function () {\n var regionUVs = this.regionUVs;\n if (this.uvs == null || this.uvs.length != regionUVs.length)\n this.uvs = spine.Utils.newFloatArray(regionUVs.length);\n var uvs = this.uvs;\n var n = this.uvs.length;\n var u = this.region.u, v = this.region.v, width = 0, height = 0;\n if (this.region instanceof spine.TextureAtlasRegion) {\n var region = this.region;\n var textureWidth = region.texture.getImage().width, textureHeight = region.texture.getImage().height;\n switch (region.degrees) {\n case 90:\n u -= (region.originalHeight - region.offsetY - region.height) / textureWidth;\n v -= (region.originalWidth - region.offsetX - region.width) / textureHeight;\n width = region.originalHeight / textureWidth;\n height = region.originalWidth / textureHeight;\n for (var i = 0; i < n; i += 2) {\n uvs[i] = u + regionUVs[i + 1] * width;\n uvs[i + 1] = v + (1 - regionUVs[i]) * height;\n }\n return;\n case 180:\n u -= (region.originalWidth - region.offsetX - region.width) / textureWidth;\n v -= region.offsetY / textureHeight;\n width = region.originalWidth / textureWidth;\n height = region.originalHeight / textureHeight;\n for (var i = 0; i < n; i += 2) {\n uvs[i] = u + (1 - regionUVs[i]) * width;\n uvs[i + 1] = v + (1 - regionUVs[i + 1]) * height;\n }\n return;\n case 270:\n u -= region.offsetY / textureWidth;\n v -= region.offsetX / textureHeight;\n width = region.originalHeight / textureWidth;\n height = region.originalWidth / textureHeight;\n for (var i = 0; i < n; i += 2) {\n uvs[i] = u + (1 - regionUVs[i + 1]) * width;\n uvs[i + 1] = v + regionUVs[i] * height;\n }\n return;\n }\n u -= region.offsetX / textureWidth;\n v -= (region.originalHeight - region.offsetY - region.height) / textureHeight;\n width = region.originalWidth / textureWidth;\n height = region.originalHeight / textureHeight;\n }\n else if (this.region == null) {\n u = v = 0;\n width = height = 1;\n }\n else {\n width = this.region.u2 - u;\n height = this.region.v2 - v;\n }\n for (var i = 0; i < n; i += 2) {\n uvs[i] = u + regionUVs[i] * width;\n uvs[i + 1] = v + regionUVs[i + 1] * height;\n }\n };\n MeshAttachment.prototype.getParentMesh = function () {\n return this.parentMesh;\n };\n MeshAttachment.prototype.setParentMesh = function (parentMesh) {\n this.parentMesh = parentMesh;\n if (parentMesh != null) {\n this.bones = parentMesh.bones;\n this.vertices = parentMesh.vertices;\n this.worldVerticesLength = parentMesh.worldVerticesLength;\n this.regionUVs = parentMesh.regionUVs;\n this.triangles = parentMesh.triangles;\n this.hullLength = parentMesh.hullLength;\n this.worldVerticesLength = parentMesh.worldVerticesLength;\n }\n };\n MeshAttachment.prototype.copy = function () {\n if (this.parentMesh != null)\n return this.newLinkedMesh();\n var copy = new MeshAttachment(this.name);\n copy.region = this.region;\n copy.path = this.path;\n copy.color.setFromColor(this.color);\n this.copyTo(copy);\n copy.regionUVs = new Array(this.regionUVs.length);\n spine.Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\n copy.uvs = new Array(this.uvs.length);\n spine.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);\n copy.triangles = new Array(this.triangles.length);\n spine.Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\n copy.hullLength = this.hullLength;\n if (this.edges != null) {\n copy.edges = new Array(this.edges.length);\n spine.Utils.arrayCopy(this.edges, 0, copy.edges, 0, this.edges.length);\n }\n copy.width = this.width;\n copy.height = this.height;\n return copy;\n };\n MeshAttachment.prototype.newLinkedMesh = function () {\n var copy = new MeshAttachment(this.name);\n copy.region = this.region;\n copy.path = this.path;\n copy.color.setFromColor(this.color);\n copy.deformAttachment = this.deformAttachment;\n copy.setParentMesh(this.parentMesh != null ? this.parentMesh : this);\n copy.updateUVs();\n return copy;\n };\n return MeshAttachment;\n }(spine.VertexAttachment));\n spine.MeshAttachment = MeshAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var PathAttachment = (function (_super) {\n __extends(PathAttachment, _super);\n function PathAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.closed = false;\n _this.constantSpeed = false;\n _this.color = new spine.Color(1, 1, 1, 1);\n return _this;\n }\n PathAttachment.prototype.copy = function () {\n var copy = new PathAttachment(name);\n this.copyTo(copy);\n copy.lengths = new Array(this.lengths.length);\n spine.Utils.arrayCopy(this.lengths, 0, copy.lengths, 0, this.lengths.length);\n copy.closed = closed;\n copy.constantSpeed = this.constantSpeed;\n copy.color.setFromColor(this.color);\n return copy;\n };\n return PathAttachment;\n }(spine.VertexAttachment));\n spine.PathAttachment = PathAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var PointAttachment = (function (_super) {\n __extends(PointAttachment, _super);\n function PointAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.color = new spine.Color(0.38, 0.94, 0, 1);\n return _this;\n }\n PointAttachment.prototype.computeWorldPosition = function (bone, point) {\n point.x = this.x * bone.a + this.y * bone.b + bone.worldX;\n point.y = this.x * bone.c + this.y * bone.d + bone.worldY;\n return point;\n };\n PointAttachment.prototype.computeWorldRotation = function (bone) {\n var cos = spine.MathUtils.cosDeg(this.rotation), sin = spine.MathUtils.sinDeg(this.rotation);\n var x = cos * bone.a + sin * bone.b;\n var y = cos * bone.c + sin * bone.d;\n return Math.atan2(y, x) * spine.MathUtils.radDeg;\n };\n PointAttachment.prototype.copy = function () {\n var copy = new PointAttachment(name);\n copy.x = this.x;\n copy.y = this.y;\n copy.rotation = this.rotation;\n copy.color.setFromColor(this.color);\n return copy;\n };\n return PointAttachment;\n }(spine.VertexAttachment));\n spine.PointAttachment = PointAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var RegionAttachment = (function (_super) {\n __extends(RegionAttachment, _super);\n function RegionAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.x = 0;\n _this.y = 0;\n _this.scaleX = 1;\n _this.scaleY = 1;\n _this.rotation = 0;\n _this.width = 0;\n _this.height = 0;\n _this.color = new spine.Color(1, 1, 1, 1);\n _this.offset = spine.Utils.newFloatArray(8);\n _this.uvs = spine.Utils.newFloatArray(8);\n _this.tempColor = new spine.Color(1, 1, 1, 1);\n return _this;\n }\n RegionAttachment.prototype.updateOffset = function () {\n var regionScaleX = this.width / this.region.originalWidth * this.scaleX;\n var regionScaleY = this.height / this.region.originalHeight * this.scaleY;\n var localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\n var localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\n var localX2 = localX + this.region.width * regionScaleX;\n var localY2 = localY + this.region.height * regionScaleY;\n var radians = this.rotation * Math.PI / 180;\n var cos = Math.cos(radians);\n var sin = Math.sin(radians);\n var localXCos = localX * cos + this.x;\n var localXSin = localX * sin;\n var localYCos = localY * cos + this.y;\n var localYSin = localY * sin;\n var localX2Cos = localX2 * cos + this.x;\n var localX2Sin = localX2 * sin;\n var localY2Cos = localY2 * cos + this.y;\n var localY2Sin = localY2 * sin;\n var offset = this.offset;\n offset[RegionAttachment.OX1] = localXCos - localYSin;\n offset[RegionAttachment.OY1] = localYCos + localXSin;\n offset[RegionAttachment.OX2] = localXCos - localY2Sin;\n offset[RegionAttachment.OY2] = localY2Cos + localXSin;\n offset[RegionAttachment.OX3] = localX2Cos - localY2Sin;\n offset[RegionAttachment.OY3] = localY2Cos + localX2Sin;\n offset[RegionAttachment.OX4] = localX2Cos - localYSin;\n offset[RegionAttachment.OY4] = localYCos + localX2Sin;\n };\n RegionAttachment.prototype.setRegion = function (region) {\n this.region = region;\n var uvs = this.uvs;\n if (region.rotate) {\n uvs[2] = region.u;\n uvs[3] = region.v2;\n uvs[4] = region.u;\n uvs[5] = region.v;\n uvs[6] = region.u2;\n uvs[7] = region.v;\n uvs[0] = region.u2;\n uvs[1] = region.v2;\n }\n else {\n uvs[0] = region.u;\n uvs[1] = region.v2;\n uvs[2] = region.u;\n uvs[3] = region.v;\n uvs[4] = region.u2;\n uvs[5] = region.v;\n uvs[6] = region.u2;\n uvs[7] = region.v2;\n }\n };\n RegionAttachment.prototype.computeWorldVertices = function (bone, worldVertices, offset, stride) {\n var vertexOffset = this.offset;\n var x = bone.worldX, y = bone.worldY;\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n var offsetX = 0, offsetY = 0;\n offsetX = vertexOffset[RegionAttachment.OX1];\n offsetY = vertexOffset[RegionAttachment.OY1];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[RegionAttachment.OX2];\n offsetY = vertexOffset[RegionAttachment.OY2];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[RegionAttachment.OX3];\n offsetY = vertexOffset[RegionAttachment.OY3];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[RegionAttachment.OX4];\n offsetY = vertexOffset[RegionAttachment.OY4];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n };\n RegionAttachment.prototype.copy = function () {\n var copy = new RegionAttachment(this.name);\n copy.region = this.region;\n copy.rendererObject = this.rendererObject;\n copy.path = this.path;\n copy.x = this.x;\n copy.y = this.y;\n copy.scaleX = this.scaleX;\n copy.scaleY = this.scaleY;\n copy.rotation = this.rotation;\n copy.width = this.width;\n copy.height = this.height;\n spine.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\n spine.Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\n copy.color.setFromColor(this.color);\n return copy;\n };\n RegionAttachment.OX1 = 0;\n RegionAttachment.OY1 = 1;\n RegionAttachment.OX2 = 2;\n RegionAttachment.OY2 = 3;\n RegionAttachment.OX3 = 4;\n RegionAttachment.OY3 = 5;\n RegionAttachment.OX4 = 6;\n RegionAttachment.OY4 = 7;\n RegionAttachment.X1 = 0;\n RegionAttachment.Y1 = 1;\n RegionAttachment.C1R = 2;\n RegionAttachment.C1G = 3;\n RegionAttachment.C1B = 4;\n RegionAttachment.C1A = 5;\n RegionAttachment.U1 = 6;\n RegionAttachment.V1 = 7;\n RegionAttachment.X2 = 8;\n RegionAttachment.Y2 = 9;\n RegionAttachment.C2R = 10;\n RegionAttachment.C2G = 11;\n RegionAttachment.C2B = 12;\n RegionAttachment.C2A = 13;\n RegionAttachment.U2 = 14;\n RegionAttachment.V2 = 15;\n RegionAttachment.X3 = 16;\n RegionAttachment.Y3 = 17;\n RegionAttachment.C3R = 18;\n RegionAttachment.C3G = 19;\n RegionAttachment.C3B = 20;\n RegionAttachment.C3A = 21;\n RegionAttachment.U3 = 22;\n RegionAttachment.V3 = 23;\n RegionAttachment.X4 = 24;\n RegionAttachment.Y4 = 25;\n RegionAttachment.C4R = 26;\n RegionAttachment.C4G = 27;\n RegionAttachment.C4B = 28;\n RegionAttachment.C4A = 29;\n RegionAttachment.U4 = 30;\n RegionAttachment.V4 = 31;\n return RegionAttachment;\n }(spine.Attachment));\n spine.RegionAttachment = RegionAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var JitterEffect = (function () {\n function JitterEffect(jitterX, jitterY) {\n this.jitterX = 0;\n this.jitterY = 0;\n this.jitterX = jitterX;\n this.jitterY = jitterY;\n }\n JitterEffect.prototype.begin = function (skeleton) {\n };\n JitterEffect.prototype.transform = function (position, uv, light, dark) {\n position.x += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\n position.y += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\n };\n JitterEffect.prototype.end = function () {\n };\n return JitterEffect;\n }());\n spine.JitterEffect = JitterEffect;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SwirlEffect = (function () {\n function SwirlEffect(radius) {\n this.centerX = 0;\n this.centerY = 0;\n this.radius = 0;\n this.angle = 0;\n this.worldX = 0;\n this.worldY = 0;\n this.radius = radius;\n }\n SwirlEffect.prototype.begin = function (skeleton) {\n this.worldX = skeleton.x + this.centerX;\n this.worldY = skeleton.y + this.centerY;\n };\n SwirlEffect.prototype.transform = function (position, uv, light, dark) {\n var radAngle = this.angle * spine.MathUtils.degreesToRadians;\n var x = position.x - this.worldX;\n var y = position.y - this.worldY;\n var dist = Math.sqrt(x * x + y * y);\n if (dist < this.radius) {\n var theta = SwirlEffect.interpolation.apply(0, radAngle, (this.radius - dist) / this.radius);\n var cos = Math.cos(theta);\n var sin = Math.sin(theta);\n position.x = cos * x - sin * y + this.worldX;\n position.y = sin * x + cos * y + this.worldY;\n }\n };\n SwirlEffect.prototype.end = function () {\n };\n SwirlEffect.interpolation = new spine.PowOut(2);\n return SwirlEffect;\n }());\n spine.SwirlEffect = SwirlEffect;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var canvas;\n (function (canvas) {\n var AssetManager = (function (_super) {\n __extends(AssetManager, _super);\n function AssetManager(pathPrefix) {\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\n return _super.call(this, function (image) { return new spine.canvas.CanvasTexture(image); }, pathPrefix) || this;\n }\n return AssetManager;\n }(spine.AssetManager));\n canvas.AssetManager = AssetManager;\n })(canvas = spine.canvas || (spine.canvas = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var canvas;\n (function (canvas) {\n var CanvasTexture = (function (_super) {\n __extends(CanvasTexture, _super);\n function CanvasTexture(image) {\n return _super.call(this, image) || this;\n }\n CanvasTexture.prototype.setFilters = function (minFilter, magFilter) { };\n CanvasTexture.prototype.setWraps = function (uWrap, vWrap) { };\n CanvasTexture.prototype.dispose = function () { };\n return CanvasTexture;\n }(spine.Texture));\n canvas.CanvasTexture = CanvasTexture;\n })(canvas = spine.canvas || (spine.canvas = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var canvas;\n (function (canvas) {\n var SkeletonRenderer = (function () {\n function SkeletonRenderer(context) {\n this.triangleRendering = false;\n this.debugRendering = false;\n this.vertices = spine.Utils.newFloatArray(8 * 1024);\n this.tempColor = new spine.Color();\n this.ctx = context;\n }\n SkeletonRenderer.prototype.draw = function (skeleton) {\n if (this.triangleRendering)\n this.drawTriangles(skeleton);\n else\n this.drawImages(skeleton);\n };\n SkeletonRenderer.prototype.drawImages = function (skeleton) {\n var ctx = this.ctx;\n var drawOrder = skeleton.drawOrder;\n if (this.debugRendering)\n ctx.strokeStyle = \"green\";\n ctx.save();\n for (var i = 0, n = drawOrder.length; i < n; i++) {\n var slot = drawOrder[i];\n if (!slot.bone.active)\n continue;\n var attachment = slot.getAttachment();\n var regionAttachment = null;\n var region = null;\n var image = null;\n if (attachment instanceof spine.RegionAttachment) {\n regionAttachment = attachment;\n region = regionAttachment.region;\n image = region.texture.getImage();\n }\n else\n continue;\n var skeleton_1 = slot.bone.skeleton;\n var skeletonColor = skeleton_1.color;\n var slotColor = slot.color;\n var regionColor = regionAttachment.color;\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\n var color = this.tempColor;\n color.set(skeletonColor.r * slotColor.r * regionColor.r, skeletonColor.g * slotColor.g * regionColor.g, skeletonColor.b * slotColor.b * regionColor.b, alpha);\n var att = attachment;\n var bone = slot.bone;\n var w = region.width;\n var h = region.height;\n ctx.save();\n ctx.transform(bone.a, bone.c, bone.b, bone.d, bone.worldX, bone.worldY);\n ctx.translate(attachment.offset[0], attachment.offset[1]);\n ctx.rotate(attachment.rotation * Math.PI / 180);\n var atlasScale = att.width / w;\n ctx.scale(atlasScale * attachment.scaleX, atlasScale * attachment.scaleY);\n ctx.translate(w / 2, h / 2);\n if (attachment.region.rotate) {\n var t = w;\n w = h;\n h = t;\n ctx.rotate(-Math.PI / 2);\n }\n ctx.scale(1, -1);\n ctx.translate(-w / 2, -h / 2);\n if (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) {\n ctx.globalAlpha = color.a;\n }\n ctx.drawImage(image, region.x, region.y, w, h, 0, 0, w, h);\n if (this.debugRendering)\n ctx.strokeRect(0, 0, w, h);\n ctx.restore();\n }\n ctx.restore();\n };\n SkeletonRenderer.prototype.drawTriangles = function (skeleton) {\n var blendMode = null;\n var vertices = this.vertices;\n var triangles = null;\n var drawOrder = skeleton.drawOrder;\n for (var i = 0, n = drawOrder.length; i < n; i++) {\n var slot = drawOrder[i];\n var attachment = slot.getAttachment();\n var texture = null;\n var region = null;\n if (attachment instanceof spine.RegionAttachment) {\n var regionAttachment = attachment;\n vertices = this.computeRegionVertices(slot, regionAttachment, false);\n triangles = SkeletonRenderer.QUAD_TRIANGLES;\n region = regionAttachment.region;\n texture = region.texture.getImage();\n }\n else if (attachment instanceof spine.MeshAttachment) {\n var mesh = attachment;\n vertices = this.computeMeshVertices(slot, mesh, false);\n triangles = mesh.triangles;\n texture = mesh.region.renderObject.texture.getImage();\n }\n else\n continue;\n if (texture != null) {\n var slotBlendMode = slot.data.blendMode;\n if (slotBlendMode != blendMode) {\n blendMode = slotBlendMode;\n }\n var skeleton_2 = slot.bone.skeleton;\n var skeletonColor = skeleton_2.color;\n var slotColor = slot.color;\n var attachmentColor = attachment.color;\n var alpha = skeletonColor.a * slotColor.a * attachmentColor.a;\n var color = this.tempColor;\n color.set(skeletonColor.r * slotColor.r * attachmentColor.r, skeletonColor.g * slotColor.g * attachmentColor.g, skeletonColor.b * slotColor.b * attachmentColor.b, alpha);\n var ctx = this.ctx;\n if (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) {\n ctx.globalAlpha = color.a;\n }\n for (var j = 0; j < triangles.length; j += 3) {\n var t1 = triangles[j] * 8, t2 = triangles[j + 1] * 8, t3 = triangles[j + 2] * 8;\n var x0 = vertices[t1], y0 = vertices[t1 + 1], u0 = vertices[t1 + 6], v0 = vertices[t1 + 7];\n var x1 = vertices[t2], y1 = vertices[t2 + 1], u1 = vertices[t2 + 6], v1 = vertices[t2 + 7];\n var x2 = vertices[t3], y2 = vertices[t3 + 1], u2 = vertices[t3 + 6], v2 = vertices[t3 + 7];\n this.drawTriangle(texture, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2);\n if (this.debugRendering) {\n ctx.strokeStyle = \"green\";\n ctx.beginPath();\n ctx.moveTo(x0, y0);\n ctx.lineTo(x1, y1);\n ctx.lineTo(x2, y2);\n ctx.lineTo(x0, y0);\n ctx.stroke();\n }\n }\n }\n }\n this.ctx.globalAlpha = 1;\n };\n SkeletonRenderer.prototype.drawTriangle = function (img, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2) {\n var ctx = this.ctx;\n u0 *= img.width;\n v0 *= img.height;\n u1 *= img.width;\n v1 *= img.height;\n u2 *= img.width;\n v2 *= img.height;\n ctx.beginPath();\n ctx.moveTo(x0, y0);\n ctx.lineTo(x1, y1);\n ctx.lineTo(x2, y2);\n ctx.closePath();\n x1 -= x0;\n y1 -= y0;\n x2 -= x0;\n y2 -= y0;\n u1 -= u0;\n v1 -= v0;\n u2 -= u0;\n v2 -= v0;\n var det = 1 / (u1 * v2 - u2 * v1), a = (v2 * x1 - v1 * x2) * det, b = (v2 * y1 - v1 * y2) * det, c = (u1 * x2 - u2 * x1) * det, d = (u1 * y2 - u2 * y1) * det, e = x0 - a * u0 - c * v0, f = y0 - b * u0 - d * v0;\n ctx.save();\n ctx.transform(a, b, c, d, e, f);\n ctx.clip();\n ctx.drawImage(img, 0, 0);\n ctx.restore();\n };\n SkeletonRenderer.prototype.computeRegionVertices = function (slot, region, pma) {\n var skeleton = slot.bone.skeleton;\n var skeletonColor = skeleton.color;\n var slotColor = slot.color;\n var regionColor = region.color;\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\n var multiplier = pma ? alpha : 1;\n var color = this.tempColor;\n color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha);\n region.computeWorldVertices(slot.bone, this.vertices, 0, SkeletonRenderer.VERTEX_SIZE);\n var vertices = this.vertices;\n var uvs = region.uvs;\n vertices[spine.RegionAttachment.C1R] = color.r;\n vertices[spine.RegionAttachment.C1G] = color.g;\n vertices[spine.RegionAttachment.C1B] = color.b;\n vertices[spine.RegionAttachment.C1A] = color.a;\n vertices[spine.RegionAttachment.U1] = uvs[0];\n vertices[spine.RegionAttachment.V1] = uvs[1];\n vertices[spine.RegionAttachment.C2R] = color.r;\n vertices[spine.RegionAttachment.C2G] = color.g;\n vertices[spine.RegionAttachment.C2B] = color.b;\n vertices[spine.RegionAttachment.C2A] = color.a;\n vertices[spine.RegionAttachment.U2] = uvs[2];\n vertices[spine.RegionAttachment.V2] = uvs[3];\n vertices[spine.RegionAttachment.C3R] = color.r;\n vertices[spine.RegionAttachment.C3G] = color.g;\n vertices[spine.RegionAttachment.C3B] = color.b;\n vertices[spine.RegionAttachment.C3A] = color.a;\n vertices[spine.RegionAttachment.U3] = uvs[4];\n vertices[spine.RegionAttachment.V3] = uvs[5];\n vertices[spine.RegionAttachment.C4R] = color.r;\n vertices[spine.RegionAttachment.C4G] = color.g;\n vertices[spine.RegionAttachment.C4B] = color.b;\n vertices[spine.RegionAttachment.C4A] = color.a;\n vertices[spine.RegionAttachment.U4] = uvs[6];\n vertices[spine.RegionAttachment.V4] = uvs[7];\n return vertices;\n };\n SkeletonRenderer.prototype.computeMeshVertices = function (slot, mesh, pma) {\n var skeleton = slot.bone.skeleton;\n var skeletonColor = skeleton.color;\n var slotColor = slot.color;\n var regionColor = mesh.color;\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\n var multiplier = pma ? alpha : 1;\n var color = this.tempColor;\n color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha);\n var numVertices = mesh.worldVerticesLength / 2;\n if (this.vertices.length < mesh.worldVerticesLength) {\n this.vertices = spine.Utils.newFloatArray(mesh.worldVerticesLength);\n }\n var vertices = this.vertices;\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, SkeletonRenderer.VERTEX_SIZE);\n var uvs = mesh.uvs;\n for (var i = 0, n = numVertices, u = 0, v = 2; i < n; i++) {\n vertices[v++] = color.r;\n vertices[v++] = color.g;\n vertices[v++] = color.b;\n vertices[v++] = color.a;\n vertices[v++] = uvs[u++];\n vertices[v++] = uvs[u++];\n v += 2;\n }\n return vertices;\n };\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\n SkeletonRenderer.VERTEX_SIZE = 2 + 2 + 4;\n return SkeletonRenderer;\n }());\n canvas.SkeletonRenderer = SkeletonRenderer;\n })(canvas = spine.canvas || (spine.canvas = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var AssetManager = (function (_super) {\n __extends(AssetManager, _super);\n function AssetManager(context, pathPrefix) {\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\n return _super.call(this, function (image) {\n return new spine.webgl.GLTexture(context, image);\n }, pathPrefix) || this;\n }\n return AssetManager;\n }(spine.AssetManager));\n webgl.AssetManager = AssetManager;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var OrthoCamera = (function () {\n function OrthoCamera(viewportWidth, viewportHeight) {\n this.position = new webgl.Vector3(0, 0, 0);\n this.direction = new webgl.Vector3(0, 0, -1);\n this.up = new webgl.Vector3(0, 1, 0);\n this.near = 0;\n this.far = 100;\n this.zoom = 1;\n this.viewportWidth = 0;\n this.viewportHeight = 0;\n this.projectionView = new webgl.Matrix4();\n this.inverseProjectionView = new webgl.Matrix4();\n this.projection = new webgl.Matrix4();\n this.view = new webgl.Matrix4();\n this.tmp = new webgl.Vector3();\n this.viewportWidth = viewportWidth;\n this.viewportHeight = viewportHeight;\n this.update();\n }\n OrthoCamera.prototype.update = function () {\n var projection = this.projection;\n var view = this.view;\n var projectionView = this.projectionView;\n var inverseProjectionView = this.inverseProjectionView;\n var zoom = this.zoom, viewportWidth = this.viewportWidth, viewportHeight = this.viewportHeight;\n projection.ortho(zoom * (-viewportWidth / 2), zoom * (viewportWidth / 2), zoom * (-viewportHeight / 2), zoom * (viewportHeight / 2), this.near, this.far);\n view.lookAt(this.position, this.direction, this.up);\n projectionView.set(projection.values);\n projectionView.multiply(view);\n inverseProjectionView.set(projectionView.values).invert();\n };\n OrthoCamera.prototype.screenToWorld = function (screenCoords, screenWidth, screenHeight) {\n var x = screenCoords.x, y = screenHeight - screenCoords.y - 1;\n var tmp = this.tmp;\n tmp.x = (2 * x) / screenWidth - 1;\n tmp.y = (2 * y) / screenHeight - 1;\n tmp.z = (2 * screenCoords.z) - 1;\n tmp.project(this.inverseProjectionView);\n screenCoords.set(tmp.x, tmp.y, tmp.z);\n return screenCoords;\n };\n OrthoCamera.prototype.setViewport = function (viewportWidth, viewportHeight) {\n this.viewportWidth = viewportWidth;\n this.viewportHeight = viewportHeight;\n };\n return OrthoCamera;\n }());\n webgl.OrthoCamera = OrthoCamera;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var GLTexture = (function (_super) {\n __extends(GLTexture, _super);\n function GLTexture(context, image, useMipMaps) {\n if (useMipMaps === void 0) { useMipMaps = false; }\n var _this = _super.call(this, image) || this;\n _this.texture = null;\n _this.boundUnit = 0;\n _this.useMipMaps = false;\n _this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\n _this.useMipMaps = useMipMaps;\n _this.restore();\n _this.context.addRestorable(_this);\n return _this;\n }\n GLTexture.prototype.setFilters = function (minFilter, magFilter) {\n var gl = this.context.gl;\n this.bind();\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, minFilter);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, GLTexture.validateMagFilter(magFilter));\n };\n GLTexture.validateMagFilter = function (magFilter) {\n switch (magFilter) {\n case spine.TextureFilter.MipMap:\n case spine.TextureFilter.MipMapLinearLinear:\n case spine.TextureFilter.MipMapLinearNearest:\n case spine.TextureFilter.MipMapNearestLinear:\n case spine.TextureFilter.MipMapNearestNearest:\n return spine.TextureFilter.Linear;\n default:\n return magFilter;\n }\n };\n GLTexture.prototype.setWraps = function (uWrap, vWrap) {\n var gl = this.context.gl;\n this.bind();\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, uWrap);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, vWrap);\n };\n GLTexture.prototype.update = function (useMipMaps) {\n var gl = this.context.gl;\n if (!this.texture) {\n this.texture = this.context.gl.createTexture();\n }\n this.bind();\n if (GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL)\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this._image);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, useMipMaps ? gl.LINEAR_MIPMAP_LINEAR : gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n if (useMipMaps)\n gl.generateMipmap(gl.TEXTURE_2D);\n };\n GLTexture.prototype.restore = function () {\n this.texture = null;\n this.update(this.useMipMaps);\n };\n GLTexture.prototype.bind = function (unit) {\n if (unit === void 0) { unit = 0; }\n var gl = this.context.gl;\n this.boundUnit = unit;\n gl.activeTexture(gl.TEXTURE0 + unit);\n gl.bindTexture(gl.TEXTURE_2D, this.texture);\n };\n GLTexture.prototype.unbind = function () {\n var gl = this.context.gl;\n gl.activeTexture(gl.TEXTURE0 + this.boundUnit);\n gl.bindTexture(gl.TEXTURE_2D, null);\n };\n GLTexture.prototype.dispose = function () {\n this.context.removeRestorable(this);\n var gl = this.context.gl;\n gl.deleteTexture(this.texture);\n };\n GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL = false;\n return GLTexture;\n }(spine.Texture));\n webgl.GLTexture = GLTexture;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n webgl.M00 = 0;\n webgl.M01 = 4;\n webgl.M02 = 8;\n webgl.M03 = 12;\n webgl.M10 = 1;\n webgl.M11 = 5;\n webgl.M12 = 9;\n webgl.M13 = 13;\n webgl.M20 = 2;\n webgl.M21 = 6;\n webgl.M22 = 10;\n webgl.M23 = 14;\n webgl.M30 = 3;\n webgl.M31 = 7;\n webgl.M32 = 11;\n webgl.M33 = 15;\n var Matrix4 = (function () {\n function Matrix4() {\n this.temp = new Float32Array(16);\n this.values = new Float32Array(16);\n var v = this.values;\n v[webgl.M00] = 1;\n v[webgl.M11] = 1;\n v[webgl.M22] = 1;\n v[webgl.M33] = 1;\n }\n Matrix4.prototype.set = function (values) {\n this.values.set(values);\n return this;\n };\n Matrix4.prototype.transpose = function () {\n var t = this.temp;\n var v = this.values;\n t[webgl.M00] = v[webgl.M00];\n t[webgl.M01] = v[webgl.M10];\n t[webgl.M02] = v[webgl.M20];\n t[webgl.M03] = v[webgl.M30];\n t[webgl.M10] = v[webgl.M01];\n t[webgl.M11] = v[webgl.M11];\n t[webgl.M12] = v[webgl.M21];\n t[webgl.M13] = v[webgl.M31];\n t[webgl.M20] = v[webgl.M02];\n t[webgl.M21] = v[webgl.M12];\n t[webgl.M22] = v[webgl.M22];\n t[webgl.M23] = v[webgl.M32];\n t[webgl.M30] = v[webgl.M03];\n t[webgl.M31] = v[webgl.M13];\n t[webgl.M32] = v[webgl.M23];\n t[webgl.M33] = v[webgl.M33];\n return this.set(t);\n };\n Matrix4.prototype.identity = function () {\n var v = this.values;\n v[webgl.M00] = 1;\n v[webgl.M01] = 0;\n v[webgl.M02] = 0;\n v[webgl.M03] = 0;\n v[webgl.M10] = 0;\n v[webgl.M11] = 1;\n v[webgl.M12] = 0;\n v[webgl.M13] = 0;\n v[webgl.M20] = 0;\n v[webgl.M21] = 0;\n v[webgl.M22] = 1;\n v[webgl.M23] = 0;\n v[webgl.M30] = 0;\n v[webgl.M31] = 0;\n v[webgl.M32] = 0;\n v[webgl.M33] = 1;\n return this;\n };\n Matrix4.prototype.invert = function () {\n var v = this.values;\n var t = this.temp;\n var l_det = v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03]\n + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03]\n - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13]\n - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13]\n + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23]\n + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23]\n - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33]\n - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\n if (l_det == 0)\n throw new Error(\"non-invertible matrix\");\n var inv_det = 1.0 / l_det;\n t[webgl.M00] = v[webgl.M12] * v[webgl.M23] * v[webgl.M31] - v[webgl.M13] * v[webgl.M22] * v[webgl.M31] + v[webgl.M13] * v[webgl.M21] * v[webgl.M32]\n - v[webgl.M11] * v[webgl.M23] * v[webgl.M32] - v[webgl.M12] * v[webgl.M21] * v[webgl.M33] + v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\n t[webgl.M01] = v[webgl.M03] * v[webgl.M22] * v[webgl.M31] - v[webgl.M02] * v[webgl.M23] * v[webgl.M31] - v[webgl.M03] * v[webgl.M21] * v[webgl.M32]\n + v[webgl.M01] * v[webgl.M23] * v[webgl.M32] + v[webgl.M02] * v[webgl.M21] * v[webgl.M33] - v[webgl.M01] * v[webgl.M22] * v[webgl.M33];\n t[webgl.M02] = v[webgl.M02] * v[webgl.M13] * v[webgl.M31] - v[webgl.M03] * v[webgl.M12] * v[webgl.M31] + v[webgl.M03] * v[webgl.M11] * v[webgl.M32]\n - v[webgl.M01] * v[webgl.M13] * v[webgl.M32] - v[webgl.M02] * v[webgl.M11] * v[webgl.M33] + v[webgl.M01] * v[webgl.M12] * v[webgl.M33];\n t[webgl.M03] = v[webgl.M03] * v[webgl.M12] * v[webgl.M21] - v[webgl.M02] * v[webgl.M13] * v[webgl.M21] - v[webgl.M03] * v[webgl.M11] * v[webgl.M22]\n + v[webgl.M01] * v[webgl.M13] * v[webgl.M22] + v[webgl.M02] * v[webgl.M11] * v[webgl.M23] - v[webgl.M01] * v[webgl.M12] * v[webgl.M23];\n t[webgl.M10] = v[webgl.M13] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M20] * v[webgl.M32]\n + v[webgl.M10] * v[webgl.M23] * v[webgl.M32] + v[webgl.M12] * v[webgl.M20] * v[webgl.M33] - v[webgl.M10] * v[webgl.M22] * v[webgl.M33];\n t[webgl.M11] = v[webgl.M02] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M22] * v[webgl.M30] + v[webgl.M03] * v[webgl.M20] * v[webgl.M32]\n - v[webgl.M00] * v[webgl.M23] * v[webgl.M32] - v[webgl.M02] * v[webgl.M20] * v[webgl.M33] + v[webgl.M00] * v[webgl.M22] * v[webgl.M33];\n t[webgl.M12] = v[webgl.M03] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M10] * v[webgl.M32]\n + v[webgl.M00] * v[webgl.M13] * v[webgl.M32] + v[webgl.M02] * v[webgl.M10] * v[webgl.M33] - v[webgl.M00] * v[webgl.M12] * v[webgl.M33];\n t[webgl.M13] = v[webgl.M02] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M12] * v[webgl.M20] + v[webgl.M03] * v[webgl.M10] * v[webgl.M22]\n - v[webgl.M00] * v[webgl.M13] * v[webgl.M22] - v[webgl.M02] * v[webgl.M10] * v[webgl.M23] + v[webgl.M00] * v[webgl.M12] * v[webgl.M23];\n t[webgl.M20] = v[webgl.M11] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M21] * v[webgl.M30] + v[webgl.M13] * v[webgl.M20] * v[webgl.M31]\n - v[webgl.M10] * v[webgl.M23] * v[webgl.M31] - v[webgl.M11] * v[webgl.M20] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M33];\n t[webgl.M21] = v[webgl.M03] * v[webgl.M21] * v[webgl.M30] - v[webgl.M01] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M20] * v[webgl.M31]\n + v[webgl.M00] * v[webgl.M23] * v[webgl.M31] + v[webgl.M01] * v[webgl.M20] * v[webgl.M33] - v[webgl.M00] * v[webgl.M21] * v[webgl.M33];\n t[webgl.M22] = v[webgl.M01] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M11] * v[webgl.M30] + v[webgl.M03] * v[webgl.M10] * v[webgl.M31]\n - v[webgl.M00] * v[webgl.M13] * v[webgl.M31] - v[webgl.M01] * v[webgl.M10] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M33];\n t[webgl.M23] = v[webgl.M03] * v[webgl.M11] * v[webgl.M20] - v[webgl.M01] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M10] * v[webgl.M21]\n + v[webgl.M00] * v[webgl.M13] * v[webgl.M21] + v[webgl.M01] * v[webgl.M10] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M23];\n t[webgl.M30] = v[webgl.M12] * v[webgl.M21] * v[webgl.M30] - v[webgl.M11] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M20] * v[webgl.M31]\n + v[webgl.M10] * v[webgl.M22] * v[webgl.M31] + v[webgl.M11] * v[webgl.M20] * v[webgl.M32] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32];\n t[webgl.M31] = v[webgl.M01] * v[webgl.M22] * v[webgl.M30] - v[webgl.M02] * v[webgl.M21] * v[webgl.M30] + v[webgl.M02] * v[webgl.M20] * v[webgl.M31]\n - v[webgl.M00] * v[webgl.M22] * v[webgl.M31] - v[webgl.M01] * v[webgl.M20] * v[webgl.M32] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32];\n t[webgl.M32] = v[webgl.M02] * v[webgl.M11] * v[webgl.M30] - v[webgl.M01] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M10] * v[webgl.M31]\n + v[webgl.M00] * v[webgl.M12] * v[webgl.M31] + v[webgl.M01] * v[webgl.M10] * v[webgl.M32] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32];\n t[webgl.M33] = v[webgl.M01] * v[webgl.M12] * v[webgl.M20] - v[webgl.M02] * v[webgl.M11] * v[webgl.M20] + v[webgl.M02] * v[webgl.M10] * v[webgl.M21]\n - v[webgl.M00] * v[webgl.M12] * v[webgl.M21] - v[webgl.M01] * v[webgl.M10] * v[webgl.M22] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22];\n v[webgl.M00] = t[webgl.M00] * inv_det;\n v[webgl.M01] = t[webgl.M01] * inv_det;\n v[webgl.M02] = t[webgl.M02] * inv_det;\n v[webgl.M03] = t[webgl.M03] * inv_det;\n v[webgl.M10] = t[webgl.M10] * inv_det;\n v[webgl.M11] = t[webgl.M11] * inv_det;\n v[webgl.M12] = t[webgl.M12] * inv_det;\n v[webgl.M13] = t[webgl.M13] * inv_det;\n v[webgl.M20] = t[webgl.M20] * inv_det;\n v[webgl.M21] = t[webgl.M21] * inv_det;\n v[webgl.M22] = t[webgl.M22] * inv_det;\n v[webgl.M23] = t[webgl.M23] * inv_det;\n v[webgl.M30] = t[webgl.M30] * inv_det;\n v[webgl.M31] = t[webgl.M31] * inv_det;\n v[webgl.M32] = t[webgl.M32] * inv_det;\n v[webgl.M33] = t[webgl.M33] * inv_det;\n return this;\n };\n Matrix4.prototype.determinant = function () {\n var v = this.values;\n return v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03]\n + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03]\n - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13]\n - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13]\n + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23]\n + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23]\n - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33]\n - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\n };\n Matrix4.prototype.translate = function (x, y, z) {\n var v = this.values;\n v[webgl.M03] += x;\n v[webgl.M13] += y;\n v[webgl.M23] += z;\n return this;\n };\n Matrix4.prototype.copy = function () {\n return new Matrix4().set(this.values);\n };\n Matrix4.prototype.projection = function (near, far, fovy, aspectRatio) {\n this.identity();\n var l_fd = (1.0 / Math.tan((fovy * (Math.PI / 180)) / 2.0));\n var l_a1 = (far + near) / (near - far);\n var l_a2 = (2 * far * near) / (near - far);\n var v = this.values;\n v[webgl.M00] = l_fd / aspectRatio;\n v[webgl.M10] = 0;\n v[webgl.M20] = 0;\n v[webgl.M30] = 0;\n v[webgl.M01] = 0;\n v[webgl.M11] = l_fd;\n v[webgl.M21] = 0;\n v[webgl.M31] = 0;\n v[webgl.M02] = 0;\n v[webgl.M12] = 0;\n v[webgl.M22] = l_a1;\n v[webgl.M32] = -1;\n v[webgl.M03] = 0;\n v[webgl.M13] = 0;\n v[webgl.M23] = l_a2;\n v[webgl.M33] = 0;\n return this;\n };\n Matrix4.prototype.ortho2d = function (x, y, width, height) {\n return this.ortho(x, x + width, y, y + height, 0, 1);\n };\n Matrix4.prototype.ortho = function (left, right, bottom, top, near, far) {\n this.identity();\n var x_orth = 2 / (right - left);\n var y_orth = 2 / (top - bottom);\n var z_orth = -2 / (far - near);\n var tx = -(right + left) / (right - left);\n var ty = -(top + bottom) / (top - bottom);\n var tz = -(far + near) / (far - near);\n var v = this.values;\n v[webgl.M00] = x_orth;\n v[webgl.M10] = 0;\n v[webgl.M20] = 0;\n v[webgl.M30] = 0;\n v[webgl.M01] = 0;\n v[webgl.M11] = y_orth;\n v[webgl.M21] = 0;\n v[webgl.M31] = 0;\n v[webgl.M02] = 0;\n v[webgl.M12] = 0;\n v[webgl.M22] = z_orth;\n v[webgl.M32] = 0;\n v[webgl.M03] = tx;\n v[webgl.M13] = ty;\n v[webgl.M23] = tz;\n v[webgl.M33] = 1;\n return this;\n };\n Matrix4.prototype.multiply = function (matrix) {\n var t = this.temp;\n var v = this.values;\n var m = matrix.values;\n t[webgl.M00] = v[webgl.M00] * m[webgl.M00] + v[webgl.M01] * m[webgl.M10] + v[webgl.M02] * m[webgl.M20] + v[webgl.M03] * m[webgl.M30];\n t[webgl.M01] = v[webgl.M00] * m[webgl.M01] + v[webgl.M01] * m[webgl.M11] + v[webgl.M02] * m[webgl.M21] + v[webgl.M03] * m[webgl.M31];\n t[webgl.M02] = v[webgl.M00] * m[webgl.M02] + v[webgl.M01] * m[webgl.M12] + v[webgl.M02] * m[webgl.M22] + v[webgl.M03] * m[webgl.M32];\n t[webgl.M03] = v[webgl.M00] * m[webgl.M03] + v[webgl.M01] * m[webgl.M13] + v[webgl.M02] * m[webgl.M23] + v[webgl.M03] * m[webgl.M33];\n t[webgl.M10] = v[webgl.M10] * m[webgl.M00] + v[webgl.M11] * m[webgl.M10] + v[webgl.M12] * m[webgl.M20] + v[webgl.M13] * m[webgl.M30];\n t[webgl.M11] = v[webgl.M10] * m[webgl.M01] + v[webgl.M11] * m[webgl.M11] + v[webgl.M12] * m[webgl.M21] + v[webgl.M13] * m[webgl.M31];\n t[webgl.M12] = v[webgl.M10] * m[webgl.M02] + v[webgl.M11] * m[webgl.M12] + v[webgl.M12] * m[webgl.M22] + v[webgl.M13] * m[webgl.M32];\n t[webgl.M13] = v[webgl.M10] * m[webgl.M03] + v[webgl.M11] * m[webgl.M13] + v[webgl.M12] * m[webgl.M23] + v[webgl.M13] * m[webgl.M33];\n t[webgl.M20] = v[webgl.M20] * m[webgl.M00] + v[webgl.M21] * m[webgl.M10] + v[webgl.M22] * m[webgl.M20] + v[webgl.M23] * m[webgl.M30];\n t[webgl.M21] = v[webgl.M20] * m[webgl.M01] + v[webgl.M21] * m[webgl.M11] + v[webgl.M22] * m[webgl.M21] + v[webgl.M23] * m[webgl.M31];\n t[webgl.M22] = v[webgl.M20] * m[webgl.M02] + v[webgl.M21] * m[webgl.M12] + v[webgl.M22] * m[webgl.M22] + v[webgl.M23] * m[webgl.M32];\n t[webgl.M23] = v[webgl.M20] * m[webgl.M03] + v[webgl.M21] * m[webgl.M13] + v[webgl.M22] * m[webgl.M23] + v[webgl.M23] * m[webgl.M33];\n t[webgl.M30] = v[webgl.M30] * m[webgl.M00] + v[webgl.M31] * m[webgl.M10] + v[webgl.M32] * m[webgl.M20] + v[webgl.M33] * m[webgl.M30];\n t[webgl.M31] = v[webgl.M30] * m[webgl.M01] + v[webgl.M31] * m[webgl.M11] + v[webgl.M32] * m[webgl.M21] + v[webgl.M33] * m[webgl.M31];\n t[webgl.M32] = v[webgl.M30] * m[webgl.M02] + v[webgl.M31] * m[webgl.M12] + v[webgl.M32] * m[webgl.M22] + v[webgl.M33] * m[webgl.M32];\n t[webgl.M33] = v[webgl.M30] * m[webgl.M03] + v[webgl.M31] * m[webgl.M13] + v[webgl.M32] * m[webgl.M23] + v[webgl.M33] * m[webgl.M33];\n return this.set(this.temp);\n };\n Matrix4.prototype.multiplyLeft = function (matrix) {\n var t = this.temp;\n var v = this.values;\n var m = matrix.values;\n t[webgl.M00] = m[webgl.M00] * v[webgl.M00] + m[webgl.M01] * v[webgl.M10] + m[webgl.M02] * v[webgl.M20] + m[webgl.M03] * v[webgl.M30];\n t[webgl.M01] = m[webgl.M00] * v[webgl.M01] + m[webgl.M01] * v[webgl.M11] + m[webgl.M02] * v[webgl.M21] + m[webgl.M03] * v[webgl.M31];\n t[webgl.M02] = m[webgl.M00] * v[webgl.M02] + m[webgl.M01] * v[webgl.M12] + m[webgl.M02] * v[webgl.M22] + m[webgl.M03] * v[webgl.M32];\n t[webgl.M03] = m[webgl.M00] * v[webgl.M03] + m[webgl.M01] * v[webgl.M13] + m[webgl.M02] * v[webgl.M23] + m[webgl.M03] * v[webgl.M33];\n t[webgl.M10] = m[webgl.M10] * v[webgl.M00] + m[webgl.M11] * v[webgl.M10] + m[webgl.M12] * v[webgl.M20] + m[webgl.M13] * v[webgl.M30];\n t[webgl.M11] = m[webgl.M10] * v[webgl.M01] + m[webgl.M11] * v[webgl.M11] + m[webgl.M12] * v[webgl.M21] + m[webgl.M13] * v[webgl.M31];\n t[webgl.M12] = m[webgl.M10] * v[webgl.M02] + m[webgl.M11] * v[webgl.M12] + m[webgl.M12] * v[webgl.M22] + m[webgl.M13] * v[webgl.M32];\n t[webgl.M13] = m[webgl.M10] * v[webgl.M03] + m[webgl.M11] * v[webgl.M13] + m[webgl.M12] * v[webgl.M23] + m[webgl.M13] * v[webgl.M33];\n t[webgl.M20] = m[webgl.M20] * v[webgl.M00] + m[webgl.M21] * v[webgl.M10] + m[webgl.M22] * v[webgl.M20] + m[webgl.M23] * v[webgl.M30];\n t[webgl.M21] = m[webgl.M20] * v[webgl.M01] + m[webgl.M21] * v[webgl.M11] + m[webgl.M22] * v[webgl.M21] + m[webgl.M23] * v[webgl.M31];\n t[webgl.M22] = m[webgl.M20] * v[webgl.M02] + m[webgl.M21] * v[webgl.M12] + m[webgl.M22] * v[webgl.M22] + m[webgl.M23] * v[webgl.M32];\n t[webgl.M23] = m[webgl.M20] * v[webgl.M03] + m[webgl.M21] * v[webgl.M13] + m[webgl.M22] * v[webgl.M23] + m[webgl.M23] * v[webgl.M33];\n t[webgl.M30] = m[webgl.M30] * v[webgl.M00] + m[webgl.M31] * v[webgl.M10] + m[webgl.M32] * v[webgl.M20] + m[webgl.M33] * v[webgl.M30];\n t[webgl.M31] = m[webgl.M30] * v[webgl.M01] + m[webgl.M31] * v[webgl.M11] + m[webgl.M32] * v[webgl.M21] + m[webgl.M33] * v[webgl.M31];\n t[webgl.M32] = m[webgl.M30] * v[webgl.M02] + m[webgl.M31] * v[webgl.M12] + m[webgl.M32] * v[webgl.M22] + m[webgl.M33] * v[webgl.M32];\n t[webgl.M33] = m[webgl.M30] * v[webgl.M03] + m[webgl.M31] * v[webgl.M13] + m[webgl.M32] * v[webgl.M23] + m[webgl.M33] * v[webgl.M33];\n return this.set(this.temp);\n };\n Matrix4.prototype.lookAt = function (position, direction, up) {\n Matrix4.initTemps();\n var xAxis = Matrix4.xAxis, yAxis = Matrix4.yAxis, zAxis = Matrix4.zAxis;\n zAxis.setFrom(direction).normalize();\n xAxis.setFrom(direction).normalize();\n xAxis.cross(up).normalize();\n yAxis.setFrom(xAxis).cross(zAxis).normalize();\n this.identity();\n var val = this.values;\n val[webgl.M00] = xAxis.x;\n val[webgl.M01] = xAxis.y;\n val[webgl.M02] = xAxis.z;\n val[webgl.M10] = yAxis.x;\n val[webgl.M11] = yAxis.y;\n val[webgl.M12] = yAxis.z;\n val[webgl.M20] = -zAxis.x;\n val[webgl.M21] = -zAxis.y;\n val[webgl.M22] = -zAxis.z;\n Matrix4.tmpMatrix.identity();\n Matrix4.tmpMatrix.values[webgl.M03] = -position.x;\n Matrix4.tmpMatrix.values[webgl.M13] = -position.y;\n Matrix4.tmpMatrix.values[webgl.M23] = -position.z;\n this.multiply(Matrix4.tmpMatrix);\n return this;\n };\n Matrix4.initTemps = function () {\n if (Matrix4.xAxis === null)\n Matrix4.xAxis = new webgl.Vector3();\n if (Matrix4.yAxis === null)\n Matrix4.yAxis = new webgl.Vector3();\n if (Matrix4.zAxis === null)\n Matrix4.zAxis = new webgl.Vector3();\n };\n Matrix4.xAxis = null;\n Matrix4.yAxis = null;\n Matrix4.zAxis = null;\n Matrix4.tmpMatrix = new Matrix4();\n return Matrix4;\n }());\n webgl.Matrix4 = Matrix4;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var Mesh = (function () {\n function Mesh(context, attributes, maxVertices, maxIndices) {\n this.attributes = attributes;\n this.verticesLength = 0;\n this.dirtyVertices = false;\n this.indicesLength = 0;\n this.dirtyIndices = false;\n this.elementsPerVertex = 0;\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\n this.elementsPerVertex = 0;\n for (var i = 0; i < attributes.length; i++) {\n this.elementsPerVertex += attributes[i].numElements;\n }\n this.vertices = new Float32Array(maxVertices * this.elementsPerVertex);\n this.indices = new Uint16Array(maxIndices);\n this.context.addRestorable(this);\n }\n Mesh.prototype.getAttributes = function () { return this.attributes; };\n Mesh.prototype.maxVertices = function () { return this.vertices.length / this.elementsPerVertex; };\n Mesh.prototype.numVertices = function () { return this.verticesLength / this.elementsPerVertex; };\n Mesh.prototype.setVerticesLength = function (length) {\n this.dirtyVertices = true;\n this.verticesLength = length;\n };\n Mesh.prototype.getVertices = function () { return this.vertices; };\n Mesh.prototype.maxIndices = function () { return this.indices.length; };\n Mesh.prototype.numIndices = function () { return this.indicesLength; };\n Mesh.prototype.setIndicesLength = function (length) {\n this.dirtyIndices = true;\n this.indicesLength = length;\n };\n Mesh.prototype.getIndices = function () { return this.indices; };\n ;\n Mesh.prototype.getVertexSizeInFloats = function () {\n var size = 0;\n for (var i = 0; i < this.attributes.length; i++) {\n var attribute = this.attributes[i];\n size += attribute.numElements;\n }\n return size;\n };\n Mesh.prototype.setVertices = function (vertices) {\n this.dirtyVertices = true;\n if (vertices.length > this.vertices.length)\n throw Error(\"Mesh can't store more than \" + this.maxVertices() + \" vertices\");\n this.vertices.set(vertices, 0);\n this.verticesLength = vertices.length;\n };\n Mesh.prototype.setIndices = function (indices) {\n this.dirtyIndices = true;\n if (indices.length > this.indices.length)\n throw Error(\"Mesh can't store more than \" + this.maxIndices() + \" indices\");\n this.indices.set(indices, 0);\n this.indicesLength = indices.length;\n };\n Mesh.prototype.draw = function (shader, primitiveType) {\n this.drawWithOffset(shader, primitiveType, 0, this.indicesLength > 0 ? this.indicesLength : this.verticesLength / this.elementsPerVertex);\n };\n Mesh.prototype.drawWithOffset = function (shader, primitiveType, offset, count) {\n var gl = this.context.gl;\n if (this.dirtyVertices || this.dirtyIndices)\n this.update();\n this.bind(shader);\n if (this.indicesLength > 0) {\n gl.drawElements(primitiveType, count, gl.UNSIGNED_SHORT, offset * 2);\n }\n else {\n gl.drawArrays(primitiveType, offset, count);\n }\n this.unbind(shader);\n };\n Mesh.prototype.bind = function (shader) {\n var gl = this.context.gl;\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\n var offset = 0;\n for (var i = 0; i < this.attributes.length; i++) {\n var attrib = this.attributes[i];\n var location_1 = shader.getAttributeLocation(attrib.name);\n gl.enableVertexAttribArray(location_1);\n gl.vertexAttribPointer(location_1, attrib.numElements, gl.FLOAT, false, this.elementsPerVertex * 4, offset * 4);\n offset += attrib.numElements;\n }\n if (this.indicesLength > 0)\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\n };\n Mesh.prototype.unbind = function (shader) {\n var gl = this.context.gl;\n for (var i = 0; i < this.attributes.length; i++) {\n var attrib = this.attributes[i];\n var location_2 = shader.getAttributeLocation(attrib.name);\n gl.disableVertexAttribArray(location_2);\n }\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\n if (this.indicesLength > 0)\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);\n };\n Mesh.prototype.update = function () {\n var gl = this.context.gl;\n if (this.dirtyVertices) {\n if (!this.verticesBuffer) {\n this.verticesBuffer = gl.createBuffer();\n }\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, this.vertices.subarray(0, this.verticesLength), gl.DYNAMIC_DRAW);\n this.dirtyVertices = false;\n }\n if (this.dirtyIndices) {\n if (!this.indicesBuffer) {\n this.indicesBuffer = gl.createBuffer();\n }\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, this.indices.subarray(0, this.indicesLength), gl.DYNAMIC_DRAW);\n this.dirtyIndices = false;\n }\n };\n Mesh.prototype.restore = function () {\n this.verticesBuffer = null;\n this.indicesBuffer = null;\n this.update();\n };\n Mesh.prototype.dispose = function () {\n this.context.removeRestorable(this);\n var gl = this.context.gl;\n gl.deleteBuffer(this.verticesBuffer);\n gl.deleteBuffer(this.indicesBuffer);\n };\n return Mesh;\n }());\n webgl.Mesh = Mesh;\n var VertexAttribute = (function () {\n function VertexAttribute(name, type, numElements) {\n this.name = name;\n this.type = type;\n this.numElements = numElements;\n }\n return VertexAttribute;\n }());\n webgl.VertexAttribute = VertexAttribute;\n var Position2Attribute = (function (_super) {\n __extends(Position2Attribute, _super);\n function Position2Attribute() {\n return _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 2) || this;\n }\n return Position2Attribute;\n }(VertexAttribute));\n webgl.Position2Attribute = Position2Attribute;\n var Position3Attribute = (function (_super) {\n __extends(Position3Attribute, _super);\n function Position3Attribute() {\n return _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 3) || this;\n }\n return Position3Attribute;\n }(VertexAttribute));\n webgl.Position3Attribute = Position3Attribute;\n var TexCoordAttribute = (function (_super) {\n __extends(TexCoordAttribute, _super);\n function TexCoordAttribute(unit) {\n if (unit === void 0) { unit = 0; }\n return _super.call(this, webgl.Shader.TEXCOORDS + (unit == 0 ? \"\" : unit), VertexAttributeType.Float, 2) || this;\n }\n return TexCoordAttribute;\n }(VertexAttribute));\n webgl.TexCoordAttribute = TexCoordAttribute;\n var ColorAttribute = (function (_super) {\n __extends(ColorAttribute, _super);\n function ColorAttribute() {\n return _super.call(this, webgl.Shader.COLOR, VertexAttributeType.Float, 4) || this;\n }\n return ColorAttribute;\n }(VertexAttribute));\n webgl.ColorAttribute = ColorAttribute;\n var Color2Attribute = (function (_super) {\n __extends(Color2Attribute, _super);\n function Color2Attribute() {\n return _super.call(this, webgl.Shader.COLOR2, VertexAttributeType.Float, 4) || this;\n }\n return Color2Attribute;\n }(VertexAttribute));\n webgl.Color2Attribute = Color2Attribute;\n var VertexAttributeType;\n (function (VertexAttributeType) {\n VertexAttributeType[VertexAttributeType[\"Float\"] = 0] = \"Float\";\n })(VertexAttributeType = webgl.VertexAttributeType || (webgl.VertexAttributeType = {}));\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var PolygonBatcher = (function () {\n function PolygonBatcher(context, twoColorTint, maxVertices) {\n if (twoColorTint === void 0) { twoColorTint = true; }\n if (maxVertices === void 0) { maxVertices = 10920; }\n this.isDrawing = false;\n this.shader = null;\n this.lastTexture = null;\n this.verticesLength = 0;\n this.indicesLength = 0;\n if (maxVertices > 10920)\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\n var attributes = twoColorTint ?\n [new webgl.Position2Attribute(), new webgl.ColorAttribute(), new webgl.TexCoordAttribute(), new webgl.Color2Attribute()] :\n [new webgl.Position2Attribute(), new webgl.ColorAttribute(), new webgl.TexCoordAttribute()];\n this.mesh = new webgl.Mesh(context, attributes, maxVertices, maxVertices * 3);\n this.srcBlend = this.context.gl.SRC_ALPHA;\n this.dstBlend = this.context.gl.ONE_MINUS_SRC_ALPHA;\n }\n PolygonBatcher.prototype.begin = function (shader) {\n var gl = this.context.gl;\n if (this.isDrawing)\n throw new Error(\"PolygonBatch is already drawing. Call PolygonBatch.end() before calling PolygonBatch.begin()\");\n this.drawCalls = 0;\n this.shader = shader;\n this.lastTexture = null;\n this.isDrawing = true;\n gl.enable(gl.BLEND);\n gl.blendFunc(this.srcBlend, this.dstBlend);\n };\n PolygonBatcher.prototype.setBlendMode = function (srcBlend, dstBlend) {\n var gl = this.context.gl;\n this.srcBlend = srcBlend;\n this.dstBlend = dstBlend;\n if (this.isDrawing) {\n this.flush();\n gl.blendFunc(this.srcBlend, this.dstBlend);\n }\n };\n PolygonBatcher.prototype.draw = function (texture, vertices, indices) {\n if (texture != this.lastTexture) {\n this.flush();\n this.lastTexture = texture;\n }\n else if (this.verticesLength + vertices.length > this.mesh.getVertices().length ||\n this.indicesLength + indices.length > this.mesh.getIndices().length) {\n this.flush();\n }\n var indexStart = this.mesh.numVertices();\n this.mesh.getVertices().set(vertices, this.verticesLength);\n this.verticesLength += vertices.length;\n this.mesh.setVerticesLength(this.verticesLength);\n var indicesArray = this.mesh.getIndices();\n for (var i = this.indicesLength, j = 0; j < indices.length; i++, j++)\n indicesArray[i] = indices[j] + indexStart;\n this.indicesLength += indices.length;\n this.mesh.setIndicesLength(this.indicesLength);\n };\n PolygonBatcher.prototype.flush = function () {\n var gl = this.context.gl;\n if (this.verticesLength == 0)\n return;\n this.lastTexture.bind();\n this.mesh.draw(this.shader, gl.TRIANGLES);\n this.verticesLength = 0;\n this.indicesLength = 0;\n this.mesh.setVerticesLength(0);\n this.mesh.setIndicesLength(0);\n this.drawCalls++;\n };\n PolygonBatcher.prototype.end = function () {\n var gl = this.context.gl;\n if (!this.isDrawing)\n throw new Error(\"PolygonBatch is not drawing. Call PolygonBatch.begin() before calling PolygonBatch.end()\");\n if (this.verticesLength > 0 || this.indicesLength > 0)\n this.flush();\n this.shader = null;\n this.lastTexture = null;\n this.isDrawing = false;\n gl.disable(gl.BLEND);\n };\n PolygonBatcher.prototype.getDrawCalls = function () { return this.drawCalls; };\n PolygonBatcher.prototype.dispose = function () {\n this.mesh.dispose();\n };\n return PolygonBatcher;\n }());\n webgl.PolygonBatcher = PolygonBatcher;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var SceneRenderer = (function () {\n function SceneRenderer(canvas, context, twoColorTint) {\n if (twoColorTint === void 0) { twoColorTint = true; }\n this.twoColorTint = false;\n this.activeRenderer = null;\n this.QUAD = [\n 0, 0, 1, 1, 1, 1, 0, 0,\n 0, 0, 1, 1, 1, 1, 0, 0,\n 0, 0, 1, 1, 1, 1, 0, 0,\n 0, 0, 1, 1, 1, 1, 0, 0,\n ];\n this.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\n this.WHITE = new spine.Color(1, 1, 1, 1);\n this.canvas = canvas;\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\n this.twoColorTint = twoColorTint;\n this.camera = new webgl.OrthoCamera(canvas.width, canvas.height);\n this.batcherShader = twoColorTint ? webgl.Shader.newTwoColoredTextured(this.context) : webgl.Shader.newColoredTextured(this.context);\n this.batcher = new webgl.PolygonBatcher(this.context, twoColorTint);\n this.shapesShader = webgl.Shader.newColored(this.context);\n this.shapes = new webgl.ShapeRenderer(this.context);\n this.skeletonRenderer = new webgl.SkeletonRenderer(this.context, twoColorTint);\n this.skeletonDebugRenderer = new webgl.SkeletonDebugRenderer(this.context);\n }\n SceneRenderer.prototype.begin = function () {\n this.camera.update();\n this.enableRenderer(this.batcher);\n };\n SceneRenderer.prototype.drawSkeleton = function (skeleton, premultipliedAlpha, slotRangeStart, slotRangeEnd) {\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\n if (slotRangeStart === void 0) { slotRangeStart = -1; }\n if (slotRangeEnd === void 0) { slotRangeEnd = -1; }\n this.enableRenderer(this.batcher);\n this.skeletonRenderer.premultipliedAlpha = premultipliedAlpha;\n this.skeletonRenderer.draw(this.batcher, skeleton, slotRangeStart, slotRangeEnd);\n };\n SceneRenderer.prototype.drawSkeletonDebug = function (skeleton, premultipliedAlpha, ignoredBones) {\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\n if (ignoredBones === void 0) { ignoredBones = null; }\n this.enableRenderer(this.shapes);\n this.skeletonDebugRenderer.premultipliedAlpha = premultipliedAlpha;\n this.skeletonDebugRenderer.draw(this.shapes, skeleton, ignoredBones);\n };\n SceneRenderer.prototype.drawTexture = function (texture, x, y, width, height, color) {\n if (color === void 0) { color = null; }\n this.enableRenderer(this.batcher);\n if (color === null)\n color = this.WHITE;\n var quad = this.QUAD;\n var i = 0;\n quad[i++] = x;\n quad[i++] = y;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = 0;\n quad[i++] = 1;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x + width;\n quad[i++] = y;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = 1;\n quad[i++] = 1;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x + width;\n quad[i++] = y + height;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = 1;\n quad[i++] = 0;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x;\n quad[i++] = y + height;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = 0;\n quad[i++] = 0;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\n };\n SceneRenderer.prototype.drawTextureUV = function (texture, x, y, width, height, u, v, u2, v2, color) {\n if (color === void 0) { color = null; }\n this.enableRenderer(this.batcher);\n if (color === null)\n color = this.WHITE;\n var quad = this.QUAD;\n var i = 0;\n quad[i++] = x;\n quad[i++] = y;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = u;\n quad[i++] = v;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x + width;\n quad[i++] = y;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = u2;\n quad[i++] = v;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x + width;\n quad[i++] = y + height;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = u2;\n quad[i++] = v2;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x;\n quad[i++] = y + height;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = u;\n quad[i++] = v2;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\n };\n SceneRenderer.prototype.drawTextureRotated = function (texture, x, y, width, height, pivotX, pivotY, angle, color, premultipliedAlpha) {\n if (color === void 0) { color = null; }\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\n this.enableRenderer(this.batcher);\n if (color === null)\n color = this.WHITE;\n var quad = this.QUAD;\n var worldOriginX = x + pivotX;\n var worldOriginY = y + pivotY;\n var fx = -pivotX;\n var fy = -pivotY;\n var fx2 = width - pivotX;\n var fy2 = height - pivotY;\n var p1x = fx;\n var p1y = fy;\n var p2x = fx;\n var p2y = fy2;\n var p3x = fx2;\n var p3y = fy2;\n var p4x = fx2;\n var p4y = fy;\n var x1 = 0;\n var y1 = 0;\n var x2 = 0;\n var y2 = 0;\n var x3 = 0;\n var y3 = 0;\n var x4 = 0;\n var y4 = 0;\n if (angle != 0) {\n var cos = spine.MathUtils.cosDeg(angle);\n var sin = spine.MathUtils.sinDeg(angle);\n x1 = cos * p1x - sin * p1y;\n y1 = sin * p1x + cos * p1y;\n x4 = cos * p2x - sin * p2y;\n y4 = sin * p2x + cos * p2y;\n x3 = cos * p3x - sin * p3y;\n y3 = sin * p3x + cos * p3y;\n x2 = x3 + (x1 - x4);\n y2 = y3 + (y1 - y4);\n }\n else {\n x1 = p1x;\n y1 = p1y;\n x4 = p2x;\n y4 = p2y;\n x3 = p3x;\n y3 = p3y;\n x2 = p4x;\n y2 = p4y;\n }\n x1 += worldOriginX;\n y1 += worldOriginY;\n x2 += worldOriginX;\n y2 += worldOriginY;\n x3 += worldOriginX;\n y3 += worldOriginY;\n x4 += worldOriginX;\n y4 += worldOriginY;\n var i = 0;\n quad[i++] = x1;\n quad[i++] = y1;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = 0;\n quad[i++] = 1;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x2;\n quad[i++] = y2;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = 1;\n quad[i++] = 1;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x3;\n quad[i++] = y3;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = 1;\n quad[i++] = 0;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x4;\n quad[i++] = y4;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = 0;\n quad[i++] = 0;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\n };\n SceneRenderer.prototype.drawRegion = function (region, x, y, width, height, color, premultipliedAlpha) {\n if (color === void 0) { color = null; }\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\n this.enableRenderer(this.batcher);\n if (color === null)\n color = this.WHITE;\n var quad = this.QUAD;\n var i = 0;\n quad[i++] = x;\n quad[i++] = y;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = region.u;\n quad[i++] = region.v2;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x + width;\n quad[i++] = y;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = region.u2;\n quad[i++] = region.v2;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x + width;\n quad[i++] = y + height;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = region.u2;\n quad[i++] = region.v;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x;\n quad[i++] = y + height;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = region.u;\n quad[i++] = region.v;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n this.batcher.draw(region.texture, quad, this.QUAD_TRIANGLES);\n };\n SceneRenderer.prototype.line = function (x, y, x2, y2, color, color2) {\n if (color === void 0) { color = null; }\n if (color2 === void 0) { color2 = null; }\n this.enableRenderer(this.shapes);\n this.shapes.line(x, y, x2, y2, color);\n };\n SceneRenderer.prototype.triangle = function (filled, x, y, x2, y2, x3, y3, color, color2, color3) {\n if (color === void 0) { color = null; }\n if (color2 === void 0) { color2 = null; }\n if (color3 === void 0) { color3 = null; }\n this.enableRenderer(this.shapes);\n this.shapes.triangle(filled, x, y, x2, y2, x3, y3, color, color2, color3);\n };\n SceneRenderer.prototype.quad = function (filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\n if (color === void 0) { color = null; }\n if (color2 === void 0) { color2 = null; }\n if (color3 === void 0) { color3 = null; }\n if (color4 === void 0) { color4 = null; }\n this.enableRenderer(this.shapes);\n this.shapes.quad(filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4);\n };\n SceneRenderer.prototype.rect = function (filled, x, y, width, height, color) {\n if (color === void 0) { color = null; }\n this.enableRenderer(this.shapes);\n this.shapes.rect(filled, x, y, width, height, color);\n };\n SceneRenderer.prototype.rectLine = function (filled, x1, y1, x2, y2, width, color) {\n if (color === void 0) { color = null; }\n this.enableRenderer(this.shapes);\n this.shapes.rectLine(filled, x1, y1, x2, y2, width, color);\n };\n SceneRenderer.prototype.polygon = function (polygonVertices, offset, count, color) {\n if (color === void 0) { color = null; }\n this.enableRenderer(this.shapes);\n this.shapes.polygon(polygonVertices, offset, count, color);\n };\n SceneRenderer.prototype.circle = function (filled, x, y, radius, color, segments) {\n if (color === void 0) { color = null; }\n if (segments === void 0) { segments = 0; }\n this.enableRenderer(this.shapes);\n this.shapes.circle(filled, x, y, radius, color, segments);\n };\n SceneRenderer.prototype.curve = function (x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\n if (color === void 0) { color = null; }\n this.enableRenderer(this.shapes);\n this.shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color);\n };\n SceneRenderer.prototype.end = function () {\n if (this.activeRenderer === this.batcher)\n this.batcher.end();\n else if (this.activeRenderer === this.shapes)\n this.shapes.end();\n this.activeRenderer = null;\n };\n SceneRenderer.prototype.resize = function (resizeMode) {\n var canvas = this.canvas;\n var w = canvas.clientWidth;\n var h = canvas.clientHeight;\n if (canvas.width != w || canvas.height != h) {\n canvas.width = w;\n canvas.height = h;\n }\n this.context.gl.viewport(0, 0, canvas.width, canvas.height);\n if (resizeMode === ResizeMode.Stretch) {\n }\n else if (resizeMode === ResizeMode.Expand) {\n this.camera.setViewport(w, h);\n }\n else if (resizeMode === ResizeMode.Fit) {\n var sourceWidth = canvas.width, sourceHeight = canvas.height;\n var targetWidth = this.camera.viewportWidth, targetHeight = this.camera.viewportHeight;\n var targetRatio = targetHeight / targetWidth;\n var sourceRatio = sourceHeight / sourceWidth;\n var scale = targetRatio < sourceRatio ? targetWidth / sourceWidth : targetHeight / sourceHeight;\n this.camera.viewportWidth = sourceWidth * scale;\n this.camera.viewportHeight = sourceHeight * scale;\n }\n this.camera.update();\n };\n SceneRenderer.prototype.enableRenderer = function (renderer) {\n if (this.activeRenderer === renderer)\n return;\n this.end();\n if (renderer instanceof webgl.PolygonBatcher) {\n this.batcherShader.bind();\n this.batcherShader.setUniform4x4f(webgl.Shader.MVP_MATRIX, this.camera.projectionView.values);\n this.batcherShader.setUniformi(\"u_texture\", 0);\n this.batcher.begin(this.batcherShader);\n this.activeRenderer = this.batcher;\n }\n else if (renderer instanceof webgl.ShapeRenderer) {\n this.shapesShader.bind();\n this.shapesShader.setUniform4x4f(webgl.Shader.MVP_MATRIX, this.camera.projectionView.values);\n this.shapes.begin(this.shapesShader);\n this.activeRenderer = this.shapes;\n }\n else {\n this.activeRenderer = this.skeletonDebugRenderer;\n }\n };\n SceneRenderer.prototype.dispose = function () {\n this.batcher.dispose();\n this.batcherShader.dispose();\n this.shapes.dispose();\n this.shapesShader.dispose();\n this.skeletonDebugRenderer.dispose();\n };\n return SceneRenderer;\n }());\n webgl.SceneRenderer = SceneRenderer;\n var ResizeMode;\n (function (ResizeMode) {\n ResizeMode[ResizeMode[\"Stretch\"] = 0] = \"Stretch\";\n ResizeMode[ResizeMode[\"Expand\"] = 1] = \"Expand\";\n ResizeMode[ResizeMode[\"Fit\"] = 2] = \"Fit\";\n })(ResizeMode = webgl.ResizeMode || (webgl.ResizeMode = {}));\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var Shader = (function () {\n function Shader(context, vertexShader, fragmentShader) {\n this.vertexShader = vertexShader;\n this.fragmentShader = fragmentShader;\n this.vs = null;\n this.fs = null;\n this.program = null;\n this.tmp2x2 = new Float32Array(2 * 2);\n this.tmp3x3 = new Float32Array(3 * 3);\n this.tmp4x4 = new Float32Array(4 * 4);\n this.vsSource = vertexShader;\n this.fsSource = fragmentShader;\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\n this.context.addRestorable(this);\n this.compile();\n }\n Shader.prototype.getProgram = function () { return this.program; };\n Shader.prototype.getVertexShader = function () { return this.vertexShader; };\n Shader.prototype.getFragmentShader = function () { return this.fragmentShader; };\n Shader.prototype.getVertexShaderSource = function () { return this.vsSource; };\n Shader.prototype.getFragmentSource = function () { return this.fsSource; };\n Shader.prototype.compile = function () {\n var gl = this.context.gl;\n try {\n this.vs = this.compileShader(gl.VERTEX_SHADER, this.vertexShader);\n this.fs = this.compileShader(gl.FRAGMENT_SHADER, this.fragmentShader);\n this.program = this.compileProgram(this.vs, this.fs);\n }\n catch (e) {\n this.dispose();\n throw e;\n }\n };\n Shader.prototype.compileShader = function (type, source) {\n var gl = this.context.gl;\n var shader = gl.createShader(type);\n gl.shaderSource(shader, source);\n gl.compileShader(shader);\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n var error = \"Couldn't compile shader: \" + gl.getShaderInfoLog(shader);\n gl.deleteShader(shader);\n if (!gl.isContextLost())\n throw new Error(error);\n }\n return shader;\n };\n Shader.prototype.compileProgram = function (vs, fs) {\n var gl = this.context.gl;\n var program = gl.createProgram();\n gl.attachShader(program, vs);\n gl.attachShader(program, fs);\n gl.linkProgram(program);\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n var error = \"Couldn't compile shader program: \" + gl.getProgramInfoLog(program);\n gl.deleteProgram(program);\n if (!gl.isContextLost())\n throw new Error(error);\n }\n return program;\n };\n Shader.prototype.restore = function () {\n this.compile();\n };\n Shader.prototype.bind = function () {\n this.context.gl.useProgram(this.program);\n };\n Shader.prototype.unbind = function () {\n this.context.gl.useProgram(null);\n };\n Shader.prototype.setUniformi = function (uniform, value) {\n this.context.gl.uniform1i(this.getUniformLocation(uniform), value);\n };\n Shader.prototype.setUniformf = function (uniform, value) {\n this.context.gl.uniform1f(this.getUniformLocation(uniform), value);\n };\n Shader.prototype.setUniform2f = function (uniform, value, value2) {\n this.context.gl.uniform2f(this.getUniformLocation(uniform), value, value2);\n };\n Shader.prototype.setUniform3f = function (uniform, value, value2, value3) {\n this.context.gl.uniform3f(this.getUniformLocation(uniform), value, value2, value3);\n };\n Shader.prototype.setUniform4f = function (uniform, value, value2, value3, value4) {\n this.context.gl.uniform4f(this.getUniformLocation(uniform), value, value2, value3, value4);\n };\n Shader.prototype.setUniform2x2f = function (uniform, value) {\n var gl = this.context.gl;\n this.tmp2x2.set(value);\n gl.uniformMatrix2fv(this.getUniformLocation(uniform), false, this.tmp2x2);\n };\n Shader.prototype.setUniform3x3f = function (uniform, value) {\n var gl = this.context.gl;\n this.tmp3x3.set(value);\n gl.uniformMatrix3fv(this.getUniformLocation(uniform), false, this.tmp3x3);\n };\n Shader.prototype.setUniform4x4f = function (uniform, value) {\n var gl = this.context.gl;\n this.tmp4x4.set(value);\n gl.uniformMatrix4fv(this.getUniformLocation(uniform), false, this.tmp4x4);\n };\n Shader.prototype.getUniformLocation = function (uniform) {\n var gl = this.context.gl;\n var location = gl.getUniformLocation(this.program, uniform);\n if (!location && !gl.isContextLost())\n throw new Error(\"Couldn't find location for uniform \" + uniform);\n return location;\n };\n Shader.prototype.getAttributeLocation = function (attribute) {\n var gl = this.context.gl;\n var location = gl.getAttribLocation(this.program, attribute);\n if (location == -1 && !gl.isContextLost())\n throw new Error(\"Couldn't find location for attribute \" + attribute);\n return location;\n };\n Shader.prototype.dispose = function () {\n this.context.removeRestorable(this);\n var gl = this.context.gl;\n if (this.vs) {\n gl.deleteShader(this.vs);\n this.vs = null;\n }\n if (this.fs) {\n gl.deleteShader(this.fs);\n this.fs = null;\n }\n if (this.program) {\n gl.deleteProgram(this.program);\n this.program = null;\n }\n };\n Shader.newColoredTextured = function (context) {\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \" + Shader.POSITION + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR + \";\\n\\t\\t\\t\\tattribute vec2 \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\tuniform mat4 \" + Shader.MVP_MATRIX + \";\\n\\t\\t\\t\\tvarying vec4 v_color;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_color = \" + Shader.COLOR + \";\\n\\t\\t\\t\\t\\tv_texCoords = \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\t\\tgl_Position = \" + Shader.MVP_MATRIX + \" * \" + Shader.POSITION + \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_color;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\t\\t\\t\\tuniform sampler2D u_texture;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tgl_FragColor = v_color * texture2D(u_texture, v_texCoords);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\n return new Shader(context, vs, fs);\n };\n Shader.newTwoColoredTextured = function (context) {\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \" + Shader.POSITION + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR2 + \";\\n\\t\\t\\t\\tattribute vec2 \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\tuniform mat4 \" + Shader.MVP_MATRIX + \";\\n\\t\\t\\t\\tvarying vec4 v_light;\\n\\t\\t\\t\\tvarying vec4 v_dark;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_light = \" + Shader.COLOR + \";\\n\\t\\t\\t\\t\\tv_dark = \" + Shader.COLOR2 + \";\\n\\t\\t\\t\\t\\tv_texCoords = \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\t\\tgl_Position = \" + Shader.MVP_MATRIX + \" * \" + Shader.POSITION + \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_light;\\n\\t\\t\\t\\tvarying LOWP vec4 v_dark;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\t\\t\\t\\tuniform sampler2D u_texture;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tvec4 texColor = texture2D(u_texture, v_texCoords);\\n\\t\\t\\t\\t\\tgl_FragColor.a = texColor.a * v_light.a;\\n\\t\\t\\t\\t\\tgl_FragColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\n return new Shader(context, vs, fs);\n };\n Shader.newColored = function (context) {\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \" + Shader.POSITION + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR + \";\\n\\t\\t\\t\\tuniform mat4 \" + Shader.MVP_MATRIX + \";\\n\\t\\t\\t\\tvarying vec4 v_color;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_color = \" + Shader.COLOR + \";\\n\\t\\t\\t\\t\\tgl_Position = \" + Shader.MVP_MATRIX + \" * \" + Shader.POSITION + \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_color;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tgl_FragColor = v_color;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\n return new Shader(context, vs, fs);\n };\n Shader.MVP_MATRIX = \"u_projTrans\";\n Shader.POSITION = \"a_position\";\n Shader.COLOR = \"a_color\";\n Shader.COLOR2 = \"a_color2\";\n Shader.TEXCOORDS = \"a_texCoords\";\n Shader.SAMPLER = \"u_texture\";\n return Shader;\n }());\n webgl.Shader = Shader;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var ShapeRenderer = (function () {\n function ShapeRenderer(context, maxVertices) {\n if (maxVertices === void 0) { maxVertices = 10920; }\n this.isDrawing = false;\n this.shapeType = ShapeType.Filled;\n this.color = new spine.Color(1, 1, 1, 1);\n this.vertexIndex = 0;\n this.tmp = new spine.Vector2();\n if (maxVertices > 10920)\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\n this.mesh = new webgl.Mesh(context, [new webgl.Position2Attribute(), new webgl.ColorAttribute()], maxVertices, 0);\n this.srcBlend = this.context.gl.SRC_ALPHA;\n this.dstBlend = this.context.gl.ONE_MINUS_SRC_ALPHA;\n }\n ShapeRenderer.prototype.begin = function (shader) {\n if (this.isDrawing)\n throw new Error(\"ShapeRenderer.begin() has already been called\");\n this.shader = shader;\n this.vertexIndex = 0;\n this.isDrawing = true;\n var gl = this.context.gl;\n gl.enable(gl.BLEND);\n gl.blendFunc(this.srcBlend, this.dstBlend);\n };\n ShapeRenderer.prototype.setBlendMode = function (srcBlend, dstBlend) {\n var gl = this.context.gl;\n this.srcBlend = srcBlend;\n this.dstBlend = dstBlend;\n if (this.isDrawing) {\n this.flush();\n gl.blendFunc(this.srcBlend, this.dstBlend);\n }\n };\n ShapeRenderer.prototype.setColor = function (color) {\n this.color.setFromColor(color);\n };\n ShapeRenderer.prototype.setColorWith = function (r, g, b, a) {\n this.color.set(r, g, b, a);\n };\n ShapeRenderer.prototype.point = function (x, y, color) {\n if (color === void 0) { color = null; }\n this.check(ShapeType.Point, 1);\n if (color === null)\n color = this.color;\n this.vertex(x, y, color);\n };\n ShapeRenderer.prototype.line = function (x, y, x2, y2, color) {\n if (color === void 0) { color = null; }\n this.check(ShapeType.Line, 2);\n var vertices = this.mesh.getVertices();\n var idx = this.vertexIndex;\n if (color === null)\n color = this.color;\n this.vertex(x, y, color);\n this.vertex(x2, y2, color);\n };\n ShapeRenderer.prototype.triangle = function (filled, x, y, x2, y2, x3, y3, color, color2, color3) {\n if (color === void 0) { color = null; }\n if (color2 === void 0) { color2 = null; }\n if (color3 === void 0) { color3 = null; }\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\n var vertices = this.mesh.getVertices();\n var idx = this.vertexIndex;\n if (color === null)\n color = this.color;\n if (color2 === null)\n color2 = this.color;\n if (color3 === null)\n color3 = this.color;\n if (filled) {\n this.vertex(x, y, color);\n this.vertex(x2, y2, color2);\n this.vertex(x3, y3, color3);\n }\n else {\n this.vertex(x, y, color);\n this.vertex(x2, y2, color2);\n this.vertex(x2, y2, color);\n this.vertex(x3, y3, color2);\n this.vertex(x3, y3, color);\n this.vertex(x, y, color2);\n }\n };\n ShapeRenderer.prototype.quad = function (filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\n if (color === void 0) { color = null; }\n if (color2 === void 0) { color2 = null; }\n if (color3 === void 0) { color3 = null; }\n if (color4 === void 0) { color4 = null; }\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\n var vertices = this.mesh.getVertices();\n var idx = this.vertexIndex;\n if (color === null)\n color = this.color;\n if (color2 === null)\n color2 = this.color;\n if (color3 === null)\n color3 = this.color;\n if (color4 === null)\n color4 = this.color;\n if (filled) {\n this.vertex(x, y, color);\n this.vertex(x2, y2, color2);\n this.vertex(x3, y3, color3);\n this.vertex(x3, y3, color3);\n this.vertex(x4, y4, color4);\n this.vertex(x, y, color);\n }\n else {\n this.vertex(x, y, color);\n this.vertex(x2, y2, color2);\n this.vertex(x2, y2, color2);\n this.vertex(x3, y3, color3);\n this.vertex(x3, y3, color3);\n this.vertex(x4, y4, color4);\n this.vertex(x4, y4, color4);\n this.vertex(x, y, color);\n }\n };\n ShapeRenderer.prototype.rect = function (filled, x, y, width, height, color) {\n if (color === void 0) { color = null; }\n this.quad(filled, x, y, x + width, y, x + width, y + height, x, y + height, color, color, color, color);\n };\n ShapeRenderer.prototype.rectLine = function (filled, x1, y1, x2, y2, width, color) {\n if (color === void 0) { color = null; }\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 8);\n if (color === null)\n color = this.color;\n var t = this.tmp.set(y2 - y1, x1 - x2);\n t.normalize();\n width *= 0.5;\n var tx = t.x * width;\n var ty = t.y * width;\n if (!filled) {\n this.vertex(x1 + tx, y1 + ty, color);\n this.vertex(x1 - tx, y1 - ty, color);\n this.vertex(x2 + tx, y2 + ty, color);\n this.vertex(x2 - tx, y2 - ty, color);\n this.vertex(x2 + tx, y2 + ty, color);\n this.vertex(x1 + tx, y1 + ty, color);\n this.vertex(x2 - tx, y2 - ty, color);\n this.vertex(x1 - tx, y1 - ty, color);\n }\n else {\n this.vertex(x1 + tx, y1 + ty, color);\n this.vertex(x1 - tx, y1 - ty, color);\n this.vertex(x2 + tx, y2 + ty, color);\n this.vertex(x2 - tx, y2 - ty, color);\n this.vertex(x2 + tx, y2 + ty, color);\n this.vertex(x1 - tx, y1 - ty, color);\n }\n };\n ShapeRenderer.prototype.x = function (x, y, size) {\n this.line(x - size, y - size, x + size, y + size);\n this.line(x - size, y + size, x + size, y - size);\n };\n ShapeRenderer.prototype.polygon = function (polygonVertices, offset, count, color) {\n if (color === void 0) { color = null; }\n if (count < 3)\n throw new Error(\"Polygon must contain at least 3 vertices\");\n this.check(ShapeType.Line, count * 2);\n if (color === null)\n color = this.color;\n var vertices = this.mesh.getVertices();\n var idx = this.vertexIndex;\n offset <<= 1;\n count <<= 1;\n var firstX = polygonVertices[offset];\n var firstY = polygonVertices[offset + 1];\n var last = offset + count;\n for (var i = offset, n = offset + count - 2; i < n; i += 2) {\n var x1 = polygonVertices[i];\n var y1 = polygonVertices[i + 1];\n var x2 = 0;\n var y2 = 0;\n if (i + 2 >= last) {\n x2 = firstX;\n y2 = firstY;\n }\n else {\n x2 = polygonVertices[i + 2];\n y2 = polygonVertices[i + 3];\n }\n this.vertex(x1, y1, color);\n this.vertex(x2, y2, color);\n }\n };\n ShapeRenderer.prototype.circle = function (filled, x, y, radius, color, segments) {\n if (color === void 0) { color = null; }\n if (segments === void 0) { segments = 0; }\n if (segments === 0)\n segments = Math.max(1, (6 * spine.MathUtils.cbrt(radius)) | 0);\n if (segments <= 0)\n throw new Error(\"segments must be > 0.\");\n if (color === null)\n color = this.color;\n var angle = 2 * spine.MathUtils.PI / segments;\n var cos = Math.cos(angle);\n var sin = Math.sin(angle);\n var cx = radius, cy = 0;\n if (!filled) {\n this.check(ShapeType.Line, segments * 2 + 2);\n for (var i = 0; i < segments; i++) {\n this.vertex(x + cx, y + cy, color);\n var temp_1 = cx;\n cx = cos * cx - sin * cy;\n cy = sin * temp_1 + cos * cy;\n this.vertex(x + cx, y + cy, color);\n }\n this.vertex(x + cx, y + cy, color);\n }\n else {\n this.check(ShapeType.Filled, segments * 3 + 3);\n segments--;\n for (var i = 0; i < segments; i++) {\n this.vertex(x, y, color);\n this.vertex(x + cx, y + cy, color);\n var temp_2 = cx;\n cx = cos * cx - sin * cy;\n cy = sin * temp_2 + cos * cy;\n this.vertex(x + cx, y + cy, color);\n }\n this.vertex(x, y, color);\n this.vertex(x + cx, y + cy, color);\n }\n var temp = cx;\n cx = radius;\n cy = 0;\n this.vertex(x + cx, y + cy, color);\n };\n ShapeRenderer.prototype.curve = function (x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\n if (color === void 0) { color = null; }\n this.check(ShapeType.Line, segments * 2 + 2);\n if (color === null)\n color = this.color;\n var subdiv_step = 1 / segments;\n var subdiv_step2 = subdiv_step * subdiv_step;\n var subdiv_step3 = subdiv_step * subdiv_step * subdiv_step;\n var pre1 = 3 * subdiv_step;\n var pre2 = 3 * subdiv_step2;\n var pre4 = 6 * subdiv_step2;\n var pre5 = 6 * subdiv_step3;\n var tmp1x = x1 - cx1 * 2 + cx2;\n var tmp1y = y1 - cy1 * 2 + cy2;\n var tmp2x = (cx1 - cx2) * 3 - x1 + x2;\n var tmp2y = (cy1 - cy2) * 3 - y1 + y2;\n var fx = x1;\n var fy = y1;\n var dfx = (cx1 - x1) * pre1 + tmp1x * pre2 + tmp2x * subdiv_step3;\n var dfy = (cy1 - y1) * pre1 + tmp1y * pre2 + tmp2y * subdiv_step3;\n var ddfx = tmp1x * pre4 + tmp2x * pre5;\n var ddfy = tmp1y * pre4 + tmp2y * pre5;\n var dddfx = tmp2x * pre5;\n var dddfy = tmp2y * pre5;\n while (segments-- > 0) {\n this.vertex(fx, fy, color);\n fx += dfx;\n fy += dfy;\n dfx += ddfx;\n dfy += ddfy;\n ddfx += dddfx;\n ddfy += dddfy;\n this.vertex(fx, fy, color);\n }\n this.vertex(fx, fy, color);\n this.vertex(x2, y2, color);\n };\n ShapeRenderer.prototype.vertex = function (x, y, color) {\n var idx = this.vertexIndex;\n var vertices = this.mesh.getVertices();\n vertices[idx++] = x;\n vertices[idx++] = y;\n vertices[idx++] = color.r;\n vertices[idx++] = color.g;\n vertices[idx++] = color.b;\n vertices[idx++] = color.a;\n this.vertexIndex = idx;\n };\n ShapeRenderer.prototype.end = function () {\n if (!this.isDrawing)\n throw new Error(\"ShapeRenderer.begin() has not been called\");\n this.flush();\n this.context.gl.disable(this.context.gl.BLEND);\n this.isDrawing = false;\n };\n ShapeRenderer.prototype.flush = function () {\n if (this.vertexIndex == 0)\n return;\n this.mesh.setVerticesLength(this.vertexIndex);\n this.mesh.draw(this.shader, this.shapeType);\n this.vertexIndex = 0;\n };\n ShapeRenderer.prototype.check = function (shapeType, numVertices) {\n if (!this.isDrawing)\n throw new Error(\"ShapeRenderer.begin() has not been called\");\n if (this.shapeType == shapeType) {\n if (this.mesh.maxVertices() - this.mesh.numVertices() < numVertices)\n this.flush();\n else\n return;\n }\n else {\n this.flush();\n this.shapeType = shapeType;\n }\n };\n ShapeRenderer.prototype.dispose = function () {\n this.mesh.dispose();\n };\n return ShapeRenderer;\n }());\n webgl.ShapeRenderer = ShapeRenderer;\n var ShapeType;\n (function (ShapeType) {\n ShapeType[ShapeType[\"Point\"] = 0] = \"Point\";\n ShapeType[ShapeType[\"Line\"] = 1] = \"Line\";\n ShapeType[ShapeType[\"Filled\"] = 4] = \"Filled\";\n })(ShapeType = webgl.ShapeType || (webgl.ShapeType = {}));\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var SkeletonDebugRenderer = (function () {\n function SkeletonDebugRenderer(context) {\n this.boneLineColor = new spine.Color(1, 0, 0, 1);\n this.boneOriginColor = new spine.Color(0, 1, 0, 1);\n this.attachmentLineColor = new spine.Color(0, 0, 1, 0.5);\n this.triangleLineColor = new spine.Color(1, 0.64, 0, 0.5);\n this.pathColor = new spine.Color().setFromString(\"FF7F00\");\n this.clipColor = new spine.Color(0.8, 0, 0, 2);\n this.aabbColor = new spine.Color(0, 1, 0, 0.5);\n this.drawBones = true;\n this.drawRegionAttachments = true;\n this.drawBoundingBoxes = true;\n this.drawMeshHull = true;\n this.drawMeshTriangles = true;\n this.drawPaths = true;\n this.drawSkeletonXY = false;\n this.drawClipping = true;\n this.premultipliedAlpha = false;\n this.scale = 1;\n this.boneWidth = 2;\n this.bounds = new spine.SkeletonBounds();\n this.temp = new Array();\n this.vertices = spine.Utils.newFloatArray(2 * 1024);\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\n }\n SkeletonDebugRenderer.prototype.draw = function (shapes, skeleton, ignoredBones) {\n if (ignoredBones === void 0) { ignoredBones = null; }\n var skeletonX = skeleton.x;\n var skeletonY = skeleton.y;\n var gl = this.context.gl;\n var srcFunc = this.premultipliedAlpha ? gl.ONE : gl.SRC_ALPHA;\n shapes.setBlendMode(srcFunc, gl.ONE_MINUS_SRC_ALPHA);\n var bones = skeleton.bones;\n if (this.drawBones) {\n shapes.setColor(this.boneLineColor);\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\n continue;\n if (bone.parent == null)\n continue;\n var x = skeletonX + bone.data.length * bone.a + bone.worldX;\n var y = skeletonY + bone.data.length * bone.c + bone.worldY;\n shapes.rectLine(true, skeletonX + bone.worldX, skeletonY + bone.worldY, x, y, this.boneWidth * this.scale);\n }\n if (this.drawSkeletonXY)\n shapes.x(skeletonX, skeletonY, 4 * this.scale);\n }\n if (this.drawRegionAttachments) {\n shapes.setColor(this.attachmentLineColor);\n var slots = skeleton.slots;\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n var attachment = slot.getAttachment();\n if (attachment instanceof spine.RegionAttachment) {\n var regionAttachment = attachment;\n var vertices = this.vertices;\n regionAttachment.computeWorldVertices(slot.bone, vertices, 0, 2);\n shapes.line(vertices[0], vertices[1], vertices[2], vertices[3]);\n shapes.line(vertices[2], vertices[3], vertices[4], vertices[5]);\n shapes.line(vertices[4], vertices[5], vertices[6], vertices[7]);\n shapes.line(vertices[6], vertices[7], vertices[0], vertices[1]);\n }\n }\n }\n if (this.drawMeshHull || this.drawMeshTriangles) {\n var slots = skeleton.slots;\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n if (!slot.bone.active)\n continue;\n var attachment = slot.getAttachment();\n if (!(attachment instanceof spine.MeshAttachment))\n continue;\n var mesh = attachment;\n var vertices = this.vertices;\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, 2);\n var triangles = mesh.triangles;\n var hullLength = mesh.hullLength;\n if (this.drawMeshTriangles) {\n shapes.setColor(this.triangleLineColor);\n for (var ii = 0, nn = triangles.length; ii < nn; ii += 3) {\n var v1 = triangles[ii] * 2, v2 = triangles[ii + 1] * 2, v3 = triangles[ii + 2] * 2;\n shapes.triangle(false, vertices[v1], vertices[v1 + 1], vertices[v2], vertices[v2 + 1], vertices[v3], vertices[v3 + 1]);\n }\n }\n if (this.drawMeshHull && hullLength > 0) {\n shapes.setColor(this.attachmentLineColor);\n hullLength = (hullLength >> 1) * 2;\n var lastX = vertices[hullLength - 2], lastY = vertices[hullLength - 1];\n for (var ii = 0, nn = hullLength; ii < nn; ii += 2) {\n var x = vertices[ii], y = vertices[ii + 1];\n shapes.line(x, y, lastX, lastY);\n lastX = x;\n lastY = y;\n }\n }\n }\n }\n if (this.drawBoundingBoxes) {\n var bounds = this.bounds;\n bounds.update(skeleton, true);\n shapes.setColor(this.aabbColor);\n shapes.rect(false, bounds.minX, bounds.minY, bounds.getWidth(), bounds.getHeight());\n var polygons = bounds.polygons;\n var boxes = bounds.boundingBoxes;\n for (var i = 0, n = polygons.length; i < n; i++) {\n var polygon = polygons[i];\n shapes.setColor(boxes[i].color);\n shapes.polygon(polygon, 0, polygon.length);\n }\n }\n if (this.drawPaths) {\n var slots = skeleton.slots;\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n if (!slot.bone.active)\n continue;\n var attachment = slot.getAttachment();\n if (!(attachment instanceof spine.PathAttachment))\n continue;\n var path = attachment;\n var nn = path.worldVerticesLength;\n var world = this.temp = spine.Utils.setArraySize(this.temp, nn, 0);\n path.computeWorldVertices(slot, 0, nn, world, 0, 2);\n var color = this.pathColor;\n var x1 = world[2], y1 = world[3], x2 = 0, y2 = 0;\n if (path.closed) {\n shapes.setColor(color);\n var cx1 = world[0], cy1 = world[1], cx2 = world[nn - 2], cy2 = world[nn - 1];\n x2 = world[nn - 4];\n y2 = world[nn - 3];\n shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, 32);\n shapes.setColor(SkeletonDebugRenderer.LIGHT_GRAY);\n shapes.line(x1, y1, cx1, cy1);\n shapes.line(x2, y2, cx2, cy2);\n }\n nn -= 4;\n for (var ii = 4; ii < nn; ii += 6) {\n var cx1 = world[ii], cy1 = world[ii + 1], cx2 = world[ii + 2], cy2 = world[ii + 3];\n x2 = world[ii + 4];\n y2 = world[ii + 5];\n shapes.setColor(color);\n shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, 32);\n shapes.setColor(SkeletonDebugRenderer.LIGHT_GRAY);\n shapes.line(x1, y1, cx1, cy1);\n shapes.line(x2, y2, cx2, cy2);\n x1 = x2;\n y1 = y2;\n }\n }\n }\n if (this.drawBones) {\n shapes.setColor(this.boneOriginColor);\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\n continue;\n shapes.circle(true, skeletonX + bone.worldX, skeletonY + bone.worldY, 3 * this.scale, SkeletonDebugRenderer.GREEN, 8);\n }\n }\n if (this.drawClipping) {\n var slots = skeleton.slots;\n shapes.setColor(this.clipColor);\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n if (!slot.bone.active)\n continue;\n var attachment = slot.getAttachment();\n if (!(attachment instanceof spine.ClippingAttachment))\n continue;\n var clip = attachment;\n var nn = clip.worldVerticesLength;\n var world = this.temp = spine.Utils.setArraySize(this.temp, nn, 0);\n clip.computeWorldVertices(slot, 0, nn, world, 0, 2);\n for (var i_17 = 0, n_3 = world.length; i_17 < n_3; i_17 += 2) {\n var x = world[i_17];\n var y = world[i_17 + 1];\n var x2 = world[(i_17 + 2) % world.length];\n var y2 = world[(i_17 + 3) % world.length];\n shapes.line(x, y, x2, y2);\n }\n }\n }\n };\n SkeletonDebugRenderer.prototype.dispose = function () {\n };\n SkeletonDebugRenderer.LIGHT_GRAY = new spine.Color(192 / 255, 192 / 255, 192 / 255, 1);\n SkeletonDebugRenderer.GREEN = new spine.Color(0, 1, 0, 1);\n return SkeletonDebugRenderer;\n }());\n webgl.SkeletonDebugRenderer = SkeletonDebugRenderer;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var Renderable = (function () {\n function Renderable(vertices, numVertices, numFloats) {\n this.vertices = vertices;\n this.numVertices = numVertices;\n this.numFloats = numFloats;\n }\n return Renderable;\n }());\n ;\n var SkeletonRenderer = (function () {\n function SkeletonRenderer(context, twoColorTint) {\n if (twoColorTint === void 0) { twoColorTint = true; }\n this.premultipliedAlpha = false;\n this.vertexEffect = null;\n this.tempColor = new spine.Color();\n this.tempColor2 = new spine.Color();\n this.vertexSize = 2 + 2 + 4;\n this.twoColorTint = false;\n this.renderable = new Renderable(null, 0, 0);\n this.clipper = new spine.SkeletonClipping();\n this.temp = new spine.Vector2();\n this.temp2 = new spine.Vector2();\n this.temp3 = new spine.Color();\n this.temp4 = new spine.Color();\n this.twoColorTint = twoColorTint;\n if (twoColorTint)\n this.vertexSize += 4;\n this.vertices = spine.Utils.newFloatArray(this.vertexSize * 1024);\n }\n SkeletonRenderer.prototype.draw = function (batcher, skeleton, slotRangeStart, slotRangeEnd) {\n if (slotRangeStart === void 0) { slotRangeStart = -1; }\n if (slotRangeEnd === void 0) { slotRangeEnd = -1; }\n var clipper = this.clipper;\n var premultipliedAlpha = this.premultipliedAlpha;\n var twoColorTint = this.twoColorTint;\n var blendMode = null;\n var tempPos = this.temp;\n var tempUv = this.temp2;\n var tempLight = this.temp3;\n var tempDark = this.temp4;\n var renderable = this.renderable;\n var uvs = null;\n var triangles = null;\n var drawOrder = skeleton.drawOrder;\n var attachmentColor = null;\n var skeletonColor = skeleton.color;\n var vertexSize = twoColorTint ? 12 : 8;\n var inRange = false;\n if (slotRangeStart == -1)\n inRange = true;\n for (var i = 0, n = drawOrder.length; i < n; i++) {\n var clippedVertexSize = clipper.isClipping() ? 2 : vertexSize;\n var slot = drawOrder[i];\n if (!slot.bone.active) {\n clipper.clipEndWithSlot(slot);\n continue;\n }\n if (slotRangeStart >= 0 && slotRangeStart == slot.data.index) {\n inRange = true;\n }\n if (!inRange) {\n clipper.clipEndWithSlot(slot);\n continue;\n }\n if (slotRangeEnd >= 0 && slotRangeEnd == slot.data.index) {\n inRange = false;\n }\n var attachment = slot.getAttachment();\n var texture = null;\n if (attachment instanceof spine.RegionAttachment) {\n var region = attachment;\n renderable.vertices = this.vertices;\n renderable.numVertices = 4;\n renderable.numFloats = clippedVertexSize << 2;\n region.computeWorldVertices(slot.bone, renderable.vertices, 0, clippedVertexSize);\n triangles = SkeletonRenderer.QUAD_TRIANGLES;\n uvs = region.uvs;\n texture = region.region.renderObject.texture;\n attachmentColor = region.color;\n }\n else if (attachment instanceof spine.MeshAttachment) {\n var mesh = attachment;\n renderable.vertices = this.vertices;\n renderable.numVertices = (mesh.worldVerticesLength >> 1);\n renderable.numFloats = renderable.numVertices * clippedVertexSize;\n if (renderable.numFloats > renderable.vertices.length) {\n renderable.vertices = this.vertices = spine.Utils.newFloatArray(renderable.numFloats);\n }\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, renderable.vertices, 0, clippedVertexSize);\n triangles = mesh.triangles;\n texture = mesh.region.renderObject.texture;\n uvs = mesh.uvs;\n attachmentColor = mesh.color;\n }\n else if (attachment instanceof spine.ClippingAttachment) {\n var clip = (attachment);\n clipper.clipStart(slot, clip);\n continue;\n }\n else {\n clipper.clipEndWithSlot(slot);\n continue;\n }\n if (texture != null) {\n var slotColor = slot.color;\n var finalColor = this.tempColor;\n finalColor.r = skeletonColor.r * slotColor.r * attachmentColor.r;\n finalColor.g = skeletonColor.g * slotColor.g * attachmentColor.g;\n finalColor.b = skeletonColor.b * slotColor.b * attachmentColor.b;\n finalColor.a = skeletonColor.a * slotColor.a * attachmentColor.a;\n if (premultipliedAlpha) {\n finalColor.r *= finalColor.a;\n finalColor.g *= finalColor.a;\n finalColor.b *= finalColor.a;\n }\n var darkColor = this.tempColor2;\n if (slot.darkColor == null)\n darkColor.set(0, 0, 0, 1.0);\n else {\n if (premultipliedAlpha) {\n darkColor.r = slot.darkColor.r * finalColor.a;\n darkColor.g = slot.darkColor.g * finalColor.a;\n darkColor.b = slot.darkColor.b * finalColor.a;\n }\n else {\n darkColor.setFromColor(slot.darkColor);\n }\n darkColor.a = premultipliedAlpha ? 1.0 : 0.0;\n }\n var slotBlendMode = slot.data.blendMode;\n if (slotBlendMode != blendMode) {\n blendMode = slotBlendMode;\n batcher.setBlendMode(webgl.WebGLBlendModeConverter.getSourceGLBlendMode(blendMode, premultipliedAlpha), webgl.WebGLBlendModeConverter.getDestGLBlendMode(blendMode));\n }\n if (clipper.isClipping()) {\n clipper.clipTriangles(renderable.vertices, renderable.numFloats, triangles, triangles.length, uvs, finalColor, darkColor, twoColorTint);\n var clippedVertices = new Float32Array(clipper.clippedVertices);\n var clippedTriangles = clipper.clippedTriangles;\n if (this.vertexEffect != null) {\n var vertexEffect = this.vertexEffect;\n var verts = clippedVertices;\n if (!twoColorTint) {\n for (var v = 0, n_4 = clippedVertices.length; v < n_4; v += vertexSize) {\n tempPos.x = verts[v];\n tempPos.y = verts[v + 1];\n tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]);\n tempUv.x = verts[v + 6];\n tempUv.y = verts[v + 7];\n tempDark.set(0, 0, 0, 0);\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\n verts[v] = tempPos.x;\n verts[v + 1] = tempPos.y;\n verts[v + 2] = tempLight.r;\n verts[v + 3] = tempLight.g;\n verts[v + 4] = tempLight.b;\n verts[v + 5] = tempLight.a;\n verts[v + 6] = tempUv.x;\n verts[v + 7] = tempUv.y;\n }\n }\n else {\n for (var v = 0, n_5 = clippedVertices.length; v < n_5; v += vertexSize) {\n tempPos.x = verts[v];\n tempPos.y = verts[v + 1];\n tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]);\n tempUv.x = verts[v + 6];\n tempUv.y = verts[v + 7];\n tempDark.set(verts[v + 8], verts[v + 9], verts[v + 10], verts[v + 11]);\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\n verts[v] = tempPos.x;\n verts[v + 1] = tempPos.y;\n verts[v + 2] = tempLight.r;\n verts[v + 3] = tempLight.g;\n verts[v + 4] = tempLight.b;\n verts[v + 5] = tempLight.a;\n verts[v + 6] = tempUv.x;\n verts[v + 7] = tempUv.y;\n verts[v + 8] = tempDark.r;\n verts[v + 9] = tempDark.g;\n verts[v + 10] = tempDark.b;\n verts[v + 11] = tempDark.a;\n }\n }\n }\n batcher.draw(texture, clippedVertices, clippedTriangles);\n }\n else {\n var verts = renderable.vertices;\n if (this.vertexEffect != null) {\n var vertexEffect = this.vertexEffect;\n if (!twoColorTint) {\n for (var v = 0, u = 0, n_6 = renderable.numFloats; v < n_6; v += vertexSize, u += 2) {\n tempPos.x = verts[v];\n tempPos.y = verts[v + 1];\n tempUv.x = uvs[u];\n tempUv.y = uvs[u + 1];\n tempLight.setFromColor(finalColor);\n tempDark.set(0, 0, 0, 0);\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\n verts[v] = tempPos.x;\n verts[v + 1] = tempPos.y;\n verts[v + 2] = tempLight.r;\n verts[v + 3] = tempLight.g;\n verts[v + 4] = tempLight.b;\n verts[v + 5] = tempLight.a;\n verts[v + 6] = tempUv.x;\n verts[v + 7] = tempUv.y;\n }\n }\n else {\n for (var v = 0, u = 0, n_7 = renderable.numFloats; v < n_7; v += vertexSize, u += 2) {\n tempPos.x = verts[v];\n tempPos.y = verts[v + 1];\n tempUv.x = uvs[u];\n tempUv.y = uvs[u + 1];\n tempLight.setFromColor(finalColor);\n tempDark.setFromColor(darkColor);\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\n verts[v] = tempPos.x;\n verts[v + 1] = tempPos.y;\n verts[v + 2] = tempLight.r;\n verts[v + 3] = tempLight.g;\n verts[v + 4] = tempLight.b;\n verts[v + 5] = tempLight.a;\n verts[v + 6] = tempUv.x;\n verts[v + 7] = tempUv.y;\n verts[v + 8] = tempDark.r;\n verts[v + 9] = tempDark.g;\n verts[v + 10] = tempDark.b;\n verts[v + 11] = tempDark.a;\n }\n }\n }\n else {\n if (!twoColorTint) {\n for (var v = 2, u = 0, n_8 = renderable.numFloats; v < n_8; v += vertexSize, u += 2) {\n verts[v] = finalColor.r;\n verts[v + 1] = finalColor.g;\n verts[v + 2] = finalColor.b;\n verts[v + 3] = finalColor.a;\n verts[v + 4] = uvs[u];\n verts[v + 5] = uvs[u + 1];\n }\n }\n else {\n for (var v = 2, u = 0, n_9 = renderable.numFloats; v < n_9; v += vertexSize, u += 2) {\n verts[v] = finalColor.r;\n verts[v + 1] = finalColor.g;\n verts[v + 2] = finalColor.b;\n verts[v + 3] = finalColor.a;\n verts[v + 4] = uvs[u];\n verts[v + 5] = uvs[u + 1];\n verts[v + 6] = darkColor.r;\n verts[v + 7] = darkColor.g;\n verts[v + 8] = darkColor.b;\n verts[v + 9] = darkColor.a;\n }\n }\n }\n var view = renderable.vertices.subarray(0, renderable.numFloats);\n batcher.draw(texture, view, triangles);\n }\n }\n clipper.clipEndWithSlot(slot);\n }\n clipper.clipEnd();\n };\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\n return SkeletonRenderer;\n }());\n webgl.SkeletonRenderer = SkeletonRenderer;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var Vector3 = (function () {\n function Vector3(x, y, z) {\n if (x === void 0) { x = 0; }\n if (y === void 0) { y = 0; }\n if (z === void 0) { z = 0; }\n this.x = 0;\n this.y = 0;\n this.z = 0;\n this.x = x;\n this.y = y;\n this.z = z;\n }\n Vector3.prototype.setFrom = function (v) {\n this.x = v.x;\n this.y = v.y;\n this.z = v.z;\n return this;\n };\n Vector3.prototype.set = function (x, y, z) {\n this.x = x;\n this.y = y;\n this.z = z;\n return this;\n };\n Vector3.prototype.add = function (v) {\n this.x += v.x;\n this.y += v.y;\n this.z += v.z;\n return this;\n };\n Vector3.prototype.sub = function (v) {\n this.x -= v.x;\n this.y -= v.y;\n this.z -= v.z;\n return this;\n };\n Vector3.prototype.scale = function (s) {\n this.x *= s;\n this.y *= s;\n this.z *= s;\n return this;\n };\n Vector3.prototype.normalize = function () {\n var len = this.length();\n if (len == 0)\n return this;\n len = 1 / len;\n this.x *= len;\n this.y *= len;\n this.z *= len;\n return this;\n };\n Vector3.prototype.cross = function (v) {\n return this.set(this.y * v.z - this.z * v.y, this.z * v.x - this.x * v.z, this.x * v.y - this.y * v.x);\n };\n Vector3.prototype.multiply = function (matrix) {\n var l_mat = matrix.values;\n return this.set(this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03], this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13], this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]);\n };\n Vector3.prototype.project = function (matrix) {\n var l_mat = matrix.values;\n var l_w = 1 / (this.x * l_mat[webgl.M30] + this.y * l_mat[webgl.M31] + this.z * l_mat[webgl.M32] + l_mat[webgl.M33]);\n return this.set((this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03]) * l_w, (this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13]) * l_w, (this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]) * l_w);\n };\n Vector3.prototype.dot = function (v) {\n return this.x * v.x + this.y * v.y + this.z * v.z;\n };\n Vector3.prototype.length = function () {\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\n };\n Vector3.prototype.distance = function (v) {\n var a = v.x - this.x;\n var b = v.y - this.y;\n var c = v.z - this.z;\n return Math.sqrt(a * a + b * b + c * c);\n };\n return Vector3;\n }());\n webgl.Vector3 = Vector3;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var ManagedWebGLRenderingContext = (function () {\n function ManagedWebGLRenderingContext(canvasOrContext, contextConfig) {\n var _this = this;\n if (contextConfig === void 0) { contextConfig = { alpha: \"true\" }; }\n this.restorables = new Array();\n if (canvasOrContext instanceof HTMLCanvasElement) {\n var canvas_1 = canvasOrContext;\n this.gl = (canvas_1.getContext(\"webgl2\", contextConfig) || canvas_1.getContext(\"webgl\", contextConfig));\n this.canvas = canvas_1;\n canvas_1.addEventListener(\"webglcontextlost\", function (e) {\n var event = e;\n if (e) {\n e.preventDefault();\n }\n });\n canvas_1.addEventListener(\"webglcontextrestored\", function (e) {\n for (var i = 0, n = _this.restorables.length; i < n; i++) {\n _this.restorables[i].restore();\n }\n });\n }\n else {\n this.gl = canvasOrContext;\n this.canvas = this.gl.canvas;\n }\n }\n ManagedWebGLRenderingContext.prototype.addRestorable = function (restorable) {\n this.restorables.push(restorable);\n };\n ManagedWebGLRenderingContext.prototype.removeRestorable = function (restorable) {\n var index = this.restorables.indexOf(restorable);\n if (index > -1)\n this.restorables.splice(index, 1);\n };\n return ManagedWebGLRenderingContext;\n }());\n webgl.ManagedWebGLRenderingContext = ManagedWebGLRenderingContext;\n var WebGLBlendModeConverter = (function () {\n function WebGLBlendModeConverter() {\n }\n WebGLBlendModeConverter.getDestGLBlendMode = function (blendMode) {\n switch (blendMode) {\n case spine.BlendMode.Normal: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\n case spine.BlendMode.Additive: return WebGLBlendModeConverter.ONE;\n case spine.BlendMode.Multiply: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\n case spine.BlendMode.Screen: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\n default: throw new Error(\"Unknown blend mode: \" + blendMode);\n }\n };\n WebGLBlendModeConverter.getSourceGLBlendMode = function (blendMode, premultipliedAlpha) {\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\n switch (blendMode) {\n case spine.BlendMode.Normal: return premultipliedAlpha ? WebGLBlendModeConverter.ONE : WebGLBlendModeConverter.SRC_ALPHA;\n case spine.BlendMode.Additive: return premultipliedAlpha ? WebGLBlendModeConverter.ONE : WebGLBlendModeConverter.SRC_ALPHA;\n case spine.BlendMode.Multiply: return WebGLBlendModeConverter.DST_COLOR;\n case spine.BlendMode.Screen: return WebGLBlendModeConverter.ONE;\n default: throw new Error(\"Unknown blend mode: \" + blendMode);\n }\n };\n WebGLBlendModeConverter.ZERO = 0;\n WebGLBlendModeConverter.ONE = 1;\n WebGLBlendModeConverter.SRC_COLOR = 0x0300;\n WebGLBlendModeConverter.ONE_MINUS_SRC_COLOR = 0x0301;\n WebGLBlendModeConverter.SRC_ALPHA = 0x0302;\n WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA = 0x0303;\n WebGLBlendModeConverter.DST_ALPHA = 0x0304;\n WebGLBlendModeConverter.ONE_MINUS_DST_ALPHA = 0x0305;\n WebGLBlendModeConverter.DST_COLOR = 0x0306;\n return WebGLBlendModeConverter;\n }());\n webgl.WebGLBlendModeConverter = WebGLBlendModeConverter;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\n//# sourceMappingURL=spine-both.js.map\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = spine;\n\n}.call(window));\n"],"sourceRoot":""} \ No newline at end of file From 8d02da00f288992e9ec805d9df0797a8c653b3d7 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 1 Sep 2020 13:30:22 +0100 Subject: [PATCH 135/241] Better conditional flow --- plugins/spine/dist/SpinePluginDebug.js | 42 ++++++++++--------- plugins/spine/dist/SpinePluginDebug.js.map | 2 +- .../container/SpineContainerWebGLRenderer.js | 13 +++--- .../SpineGameObjectWebGLRenderer.js | 29 ++++++------- 4 files changed, 47 insertions(+), 39 deletions(-) diff --git a/plugins/spine/dist/SpinePluginDebug.js b/plugins/spine/dist/SpinePluginDebug.js index e4150385a..a948a7dbc 100644 --- a/plugins/spine/dist/SpinePluginDebug.js +++ b/plugins/spine/dist/SpinePluginDebug.js @@ -35220,6 +35220,8 @@ var SpineContainerWebGLRenderer = function (renderer, container, interpolationPe if (sceneRenderer.batcher.isDrawing && renderer.finalType) { sceneRenderer.end(); + + renderer.rebindPipeline(); } return; @@ -35248,6 +35250,9 @@ var SpineContainerWebGLRenderer = function (renderer, container, interpolationPe if (renderer.newType) { + // flush + clear if this is a new type + renderer.clearPipeline(); + sceneRenderer.begin(); } @@ -35337,13 +35342,11 @@ var SpineContainerWebGLRenderer = function (renderer, container, interpolationPe if (!renderer.nextTypeMatch) { - // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch. + // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch sceneRenderer.end(); - if (!renderer.finalType) - { - renderer.rebindPipeline(renderer.pipelines.MultiPipeline); - } + // And rebind the previous pipeline + renderer.rebindPipeline(); } }; @@ -37335,36 +37338,37 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent var childAlpha = skeleton.color.a; var sceneRenderer = plugin.sceneRenderer; - if (renderer.newType) - { - // flush + clear if this is a new type, even if it doesn't render - renderer.clearPipeline(); - } - var GameObjectRenderMask = 15; var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || childAlpha === 0); if (!skeleton || !willRender) { - // If there is already a batch running, we need to close it - if (!renderer.nextTypeMatch) + // If there is already a batch running, and the next type isn't a Spine object, or this is the end, we need to close it + + if (sceneRenderer.batcher.isDrawing && (!renderer.nextTypeMatch || renderer.finalType)) { // The next object in the display list is not a Spine object, so we end the batch sceneRenderer.end(); - if (!renderer.finalType) - { - // Reset the current type - renderer.currentType = ''; + renderer.rebindPipeline(); + } - renderer.rebindPipeline(); - } + if (!renderer.finalType) + { + // Reset the current type + renderer.currentType = ''; } return; } + if (renderer.newType) + { + // flush + clear previous pipeline if this is a new type + renderer.clearPipeline(); + } + var camMatrix = renderer._tempMatrix1; var spriteMatrix = renderer._tempMatrix2; var calcMatrix = renderer._tempMatrix3; diff --git a/plugins/spine/dist/SpinePluginDebug.js.map b/plugins/spine/dist/SpinePluginDebug.js.map index 88a0bb071..7133a2884 100644 --- a/plugins/spine/dist/SpinePluginDebug.js.map +++ b/plugins/spine/dist/SpinePluginDebug.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:////Users/rich/Documents/GitHub/phaser/node_modules/eventemitter3/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/Animation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/AnimationFrame.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/ADD_ANIMATION_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/ANIMATION_COMPLETE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/ANIMATION_REPEAT_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/ANIMATION_RESTART_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/ANIMATION_START_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/PAUSE_ALL_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/REMOVE_ANIMATION_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/RESUME_ALL_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_START_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/BLUR_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/BOOT_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/CONTEXT_LOST_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/CONTEXT_RESTORED_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/DESTROY_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/FOCUS_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/HIDDEN_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/PAUSE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/POST_RENDER_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/POST_STEP_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/PRE_RENDER_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/PRE_STEP_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/READY_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/RESUME_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/STEP_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/VISIBLE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/data/DataManager.js","webpack:////Users/rich/Documents/GitHub/phaser/src/data/events/CHANGE_DATA_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/data/events/REMOVE_DATA_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/data/events/SET_DATA_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/data/events/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/display/color/GetColorFromValue.js","webpack:////Users/rich/Documents/GitHub/phaser/src/display/mask/BitmapMask.js","webpack:////Users/rich/Documents/GitHub/phaser/src/display/mask/GeometryMask.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/BuildGameObject.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/GameObject.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Alpha.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/AlphaSingle.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Animation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/BlendMode.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/ComputedSize.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Crop.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Depth.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Flip.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/GetBounds.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Mask.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Origin.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/PathFollower.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Pipeline.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/ScrollFactor.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Size.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Texture.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/TextureCrop.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Tint.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/ToJSON.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Transform.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/TransformMatrix.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Visible.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/container/Container.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/container/ContainerCanvasRenderer.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/container/ContainerRender.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/container/ContainerWebGLRenderer.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/ADDED_TO_SCENE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/DESTROY_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_COMPLETE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_CREATED_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_ERROR_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_LOOP_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_PLAY_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_SEEKED_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_SEEKING_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_STOP_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/const.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/line/GetPoint.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/line/GetPoints.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/line/Length.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/line/Line.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/line/Random.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/point/Point.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/rectangle/Contains.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/rectangle/GetPoint.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/rectangle/GetPoints.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/rectangle/Perimeter.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/rectangle/Random.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/rectangle/Rectangle.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/rectangle/Union.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/File.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/FileTypesManager.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/GetURL.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/MergeXHRSettings.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/MultiFile.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/XHRLoader.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/XHRSettings.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/const.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/ADD_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/COMPLETE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/FILE_COMPLETE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/FILE_LOAD_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/FILE_PROGRESS_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/POST_PROCESS_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/PROGRESS_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/START_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/filetypes/ImageFile.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/filetypes/JSONFile.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/filetypes/TextFile.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Average.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Bernstein.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Between.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/CatmullRom.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/CeilTo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Clamp.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/DegToRad.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Difference.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Factorial.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/FloatBetween.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/FloorTo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/FromPercent.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/GetSpeed.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/IsEven.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/IsEvenStrict.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Linear.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Matrix3.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Matrix4.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/MaxAdd.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/MinSub.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Percent.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Quaternion.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RadToDeg.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RandomXY.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RandomXYZ.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RandomXYZW.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Rotate.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RotateAround.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RotateAroundDistance.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RotateTo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RotateVec3.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RoundAwayFromZero.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RoundTo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/SinCosTableGenerator.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/SmoothStep.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/SmootherStep.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/ToXY.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/TransformXY.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Vector2.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Vector3.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Vector4.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Within.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Wrap.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/Between.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/BetweenPoints.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/BetweenPointsY.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/BetweenY.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/CounterClockwise.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/Normalize.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/Random.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/RandomDegrees.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/Reverse.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/RotateTo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/ShortestBetween.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/Wrap.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/WrapDegrees.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/const.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceBetween.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceBetweenPoints.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceBetweenPointsSquared.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceChebyshev.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/distance/DistancePower.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceSnake.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceSquared.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/distance/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/back/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/back/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/back/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/back/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/bounce/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/bounce/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/bounce/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/bounce/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/circular/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/circular/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/circular/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/circular/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/cubic/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/cubic/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/cubic/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/cubic/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/elastic/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/elastic/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/elastic/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/elastic/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/expo/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/expo/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/expo/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/expo/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/linear/Linear.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/linear/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quadratic/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quadratic/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quadratic/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quadratic/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quartic/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quartic/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quartic/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quartic/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quintic/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quintic/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quintic/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quintic/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/sine/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/sine/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/sine/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/sine/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/stepped/Stepped.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/stepped/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/fuzzy/Ceil.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/fuzzy/Equal.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/fuzzy/Floor.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/fuzzy/GreaterThan.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/fuzzy/LessThan.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/fuzzy/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/interpolation/BezierInterpolation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/interpolation/CatmullRomInterpolation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/interpolation/CubicBezierInterpolation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/interpolation/LinearInterpolation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/interpolation/QuadraticBezierInterpolation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/interpolation/SmoothStepInterpolation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/interpolation/SmootherStepInterpolation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/interpolation/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/pow2/GetPowerOfTwo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/pow2/IsSizePowerOfTwo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/pow2/IsValuePowerOfTwo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/pow2/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/random-data-generator/RandomDataGenerator.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/snap/SnapCeil.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/snap/SnapFloor.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/snap/SnapTo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/snap/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/plugins/BasePlugin.js","webpack:////Users/rich/Documents/GitHub/phaser/src/plugins/ScenePlugin.js","webpack:////Users/rich/Documents/GitHub/phaser/src/renderer/BlendModes.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scale/events/RESIZE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/ADDED_TO_SCENE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/BOOT_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/CREATE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/DESTROY_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/PAUSE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/POST_UPDATE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/PRE_UPDATE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/READY_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/REMOVED_FROM_SCENE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/RENDER_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/RESUME_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/SHUTDOWN_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/SLEEP_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/START_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/TRANSITION_INIT_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/TRANSITION_OUT_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/TRANSITION_START_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/UPDATE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/WAKE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/tweens/builders/GetBoolean.js","webpack:////Users/rich/Documents/GitHub/phaser/src/tweens/tween/const.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/Class.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/NOOP.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/Add.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/AddAt.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/BringToTop.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/CountAllMatching.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/Each.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/EachInRange.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/FindClosestInSorted.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/GetAll.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/GetFirst.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/GetRandom.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/MoveDown.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/MoveTo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/MoveUp.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/NumberArray.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/NumberArrayStep.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/QuickSelect.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/Range.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/Remove.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/RemoveAt.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/RemoveBetween.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/RemoveRandomElement.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/Replace.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/RotateLeft.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/RotateRight.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/SafeRange.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/SendToBack.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/SetAll.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/Shuffle.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/SpliceOne.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/StableSort.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/Swap.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/CheckMatrix.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/MatrixToString.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/ReverseColumns.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/ReverseRows.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/Rotate180.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/RotateLeft.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/RotateMatrix.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/RotateRight.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/TransposeMatrix.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/object/Extend.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/object/GetAdvancedValue.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/object/GetFastValue.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/object/GetValue.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/object/IsPlainObject.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/string/Pad.js","webpack:///./SpineFile.js","webpack:///./SpinePlugin.js","webpack:///./container/SpineContainer.js","webpack:///./container/SpineContainerCanvasRenderer.js","webpack:///./container/SpineContainerRender.js","webpack:///./container/SpineContainerWebGLRenderer.js","webpack:///./events/COMPLETE_EVENT.js","webpack:///./events/DISPOSE_EVENT.js","webpack:///./events/END_EVENT.js","webpack:///./events/EVENT_EVENT.js","webpack:///./events/INTERRUPTED_EVENT.js","webpack:///./events/START_EVENT.js","webpack:///./events/index.js","webpack:///./gameobject/SpineGameObject.js","webpack:///./gameobject/SpineGameObjectCanvasRenderer.js","webpack:///./gameobject/SpineGameObjectRender.js","webpack:///./gameobject/SpineGameObjectWebGLRenderer.js","webpack:///./runtimes/spine-both.js"],"names":[],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFa;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,yDAAyD,OAAO;AAChE;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yCAAyC,SAAS;AAClD;AACA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA,eAAe,YAAY;AAC3B;;AAEA;AACA,2DAA2D;AAC3D,+DAA+D;AAC/D,mEAAmE;AACnE,uEAAuE;AACvE;AACA,0DAA0D,SAAS;AACnE;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,aAAa,aAAa;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,2DAA2D,YAAY;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,aAAa;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI,IAA6B;AACjC;AACA;;;;;;;;;;;;AC/UA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,iDAAe;AACnC,YAAY,mBAAO,CAAC,mDAAgB;AACpC,mBAAmB,mBAAO,CAAC,mEAAe;AAC1C,aAAa,mBAAO,CAAC,yDAAU;AAC/B,0BAA0B,mBAAO,CAAC,2FAAoC;AACtE,YAAY,mBAAO,CAAC,mEAAkB;AACtC,eAAe,mBAAO,CAAC,uEAA0B;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mCAAmC;AAC9C,WAAW,OAAO;AAClB,WAAW,kCAAkC;AAC7C;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,kDAAkD;AACjE;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD,eAAe,QAAQ;AACvB;AACA;AACA;AACA,yCAAyC,qBAAqB;;AAE9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,kDAAkD;AACjE,eAAe,OAAO;AACtB;AACA,gBAAgB,mCAAmC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,6BAA6B,gCAAgC;AAC7D,aAAa;AACb;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD,eAAe,QAAQ;AACvB;AACA;AACA;AACA,yBAAyB,mBAAmB;;AAE5C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sCAAsC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA,uBAAuB,SAAS;AAChC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,uBAAuB,wBAAwB;AAC/C;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC77BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,sBAAsB;AACjC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,2CAA2C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACvKA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,4BAA4B;AACvC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,4BAA4B;AACvC;AACA;;;;;;;;;;;;ACjBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,QAAQ;AACnB,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,QAAQ;AACnB,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AA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iC;;AAEtE;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACdA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4EAA4E;AAC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7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,aAAa,mBAAO,CAAC,mDAAU;;AAE/B;AACA;AACA;AACA,WAAW,EAAE;AACb,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,KAAK;AAChB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,2BAA2B;AACtC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2BAA2B,gBAAgB;AAC3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,2DAA2D;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,aAAa;;AAEb;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,EAAE;AACjB,eAAe,KAAK;AACpB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,sCAAsC,kBAAkB;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC5rBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,qBAAqB,mBAAO,CAAC,kFAAyB;AACtD,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,cAAc,mBAAO,CAAC,oEAAkB;;AAExC;;;;;;;;;;;;ACjBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,4DAAmB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,8BAA8B;AACzC;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4EAA4E;AAC3F,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4EAA4E;AAC3F;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4EAA4E;AAC3F,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4EAA4E;AAC3F;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC9RA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,4BAA4B;AACvC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iCAAiC,6BAA6B;;AAE9D;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD,eAAe,8BAA8B;AAC7C,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sCAAsC;AACrD,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA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;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,2DAA2D;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4CAA4C;AAC3D,eAAe,mCAAmC;AAClD,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wCAAwC;AACxD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA,sCAAsC,mBAAmB;;AAEzD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3tBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,oDAAkB;;AAEtC;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;AChSA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,oDAAkB;;AAEtC;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACvGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,oBAAoB,mBAAO,CAAC,wEAA4B;AACxD,YAAY,mBAAO,CAAC,sDAAmB;AACvC,aAAa,mBAAO,CAAC,wEAAyB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uCAAuC,gBAAgB;;AAEvD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,4CAA4C,yBAAyB;AACrE,uCAAuC,gBAAgB;;AAEvD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,4CAA4C,yBAAyB;AACrE,uCAAuC,gBAAgB;;AAEvD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA,sCAAsC,8BAA8B;;AAEpE;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,yCAAyC,sBAAsB;;AAE/D;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,kCAAkC,eAAe;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACpqCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,sEAA2B;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2BAA2B;AAC1C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC9IA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,gBAAgB;AAChB;;AAEA;;AAEA;;;;;;;;;;;;ACtHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC7JA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,gFAAgC;AACxD,mBAAmB,mBAAO,CAAC,kEAAyB;AACpD,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,6BAA6B;AAC5C,eAAe,QAAQ;AACvB;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA,0CAA0C,uBAAuB;;AAEjE;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAA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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kEAAkE;AACjF;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,wCAAwC,qBAAqB;;AAE7D;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,kCAAkC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC5IA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,SAAS;AACvC,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpMA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,0DAAqB;AAC5C,iBAAiB,mBAAO,CAAC,oFAAkC;AAC3D,eAAe,mBAAO,CAAC,0EAA6B;AACpD,kBAAkB,mBAAO,CAAC,oEAA0B;AACpD,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,2BAA2B,uDAAuD;AAClF;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC,eAAe,uGAAuG;AACtH;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,0BAA0B;;AAE7D;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,YAAY;;AAE/C;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uGAAuG,WAAW;AACjI,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,aAAa;AAChD,oCAAoC,aAAa;;AAEjD;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,sBAAsB;AACtB;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpaA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,yCAAyC,gCAAgC;;AAEzE;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC3HA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,oBAAoB;;AAEtD;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpLA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD,eAAe,iBAAiB;AAChC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,yCAAyC,qBAAqB;;AAE9D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC3HA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,iBAAiB;AAChC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,yCAAyC,qBAAqB;;AAE9D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,gBAAgB;AAChB;;AAEA;;AAEA;;;;;;;;;;;;ACzMA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,wBAAwB,mBAAO,CAAC,8FAAuC;;AAEvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,oBAAoB;;AAExD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACrUA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA,YAAY,wCAAwC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,sBAAsB,mBAAO,CAAC,iFAAmB;AACjD,kBAAkB,mBAAO,CAAC,gEAAwB;AAClD,gBAAgB,mBAAO,CAAC,8DAAuB;AAC/C,uBAAuB,mBAAO,CAAC,4EAA8B;AAC7D,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ,gDAAgD;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,kCAAkC,oCAAoC;AACtE,mCAAmC,sCAAsC;;AAEzE;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,QAAQ,mDAAmD;AAC3D;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,8CAA8C;AAC9D;AACA;AACA;AACA,uCAAuC,oCAAoC;;AAE3E;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,8CAA8C;AAC9D;AACA;AACA;AACA,uCAAuC,oCAAoC;AAC3E,yCAAyC,sCAAsC;;AAE/E;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C,sBAAsB,sCAAsC;;AAE5D;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACxkBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;;AAEvC;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,qDAAqD;AACrE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,kCAAkC,UAAU,cAAc;;AAE1D;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,mCAAmC,wBAAwB;;AAE3D;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACr/BA;AACA;AACA;AACA,kBAAkB;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C,iEAAW;;AAEhC;;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,4DAAmB;AAC5C,iBAAiB,mBAAO,CAAC,sEAA2B;AACpD,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,mEAAe;AACxC,aAAa,mBAAO,CAAC,2DAAW;AAChC,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,uBAAuB,mBAAO,CAAC,2DAAW;AAC1C,gBAAgB,mBAAO,CAAC,gFAAgC;AACxD,aAAa,mBAAO,CAAC,gFAAmB;AACxC,YAAY,mBAAO,CAAC,wEAA4B;AAChD,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,gCAAgC;AAC3C;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA,mCAAmC,0BAA0B;;AAE7D;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,2BAA2B,qBAAqB;AAChD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,mCAAmC,wBAAwB;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8CAA8C;AAC9D;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,SAAS;AACxB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,EAAE;AACjB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,KAAK;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,OAAO;AACtB,eAAe,KAAK;AACpB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;AACA;;AAEA,mBAAmB,SAAS;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,OAAO;AACtB,eAAe,KAAK;AACpB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;AACA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,2CAA2C,wBAAwB;;AAEnE;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC90CA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,qBAAqB;AACxC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpGA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,oDAAkB;AAC5C,mBAAmB,mBAAO,CAAC,oDAAkB;;AAE7C,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,8FAA0B;AACpD;;AAEA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,gGAA2B;AACtD;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9IA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,MAAM;AACjB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,oBAAoB,mBAAO,CAAC,uFAAwB;A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AEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,OAAO;AACtB,eAAe,2BAA2B;AAC1C;AACA,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,2BAA2B;AAC1C;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;;AAEvC;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,iCAAiC,sBAAsB;;AAEvD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,iCAAiC,sBAAsB;;AAEvD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC1UA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,wDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA,WAAW,iBAAiB;AAC5B,WAAW,2BAA2B;AACtC;AACA,YAAY,2BAA2B;AACvC;AACA;AACA;AACA,4BAA4B,mBAAmB;;AAE/C;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,4CAAU;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,6DAAa;AACrC,YAAY,mBAAO,CAAC,wDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,2BAA2B;AACtC;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA,4BAA4B,mBAAmB;;AAE/C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,2DAAY;AACnC,gBAAgB,mBAAO,CAAC,6DAAa;;AAErC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC;AACA,YAAY,4BA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AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,OAAO;AACtB,eAAe,2BAA2B;AAC1C;AACA,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,gBAAgB;;AAEnD;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,mBAAmB;;AAEpD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,mBAAmB;;AAEpD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,mBAAmB;;AAEpD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,mBAAmB;;AAEpD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACxfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,6DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,sBAAsB;AACnC;AACA,WAAW,sBAAsB;AACjC,WAAW,sBAAsB;AACjC,WAAW,sBAAsB;AACjC;AACA,YAAY,sBAAsB;AAClC;AACA;AACA;AACA,4BAA4B,uBAAuB;;AAEnD;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;AAC/B,mBAAmB,mBAAO,CAAC,+EAA8B;AACzD,aAAa,mBAAO,CAAC,+CAAU;AAC/B,uBAAuB,mBAAO,CAAC,mEAAoB;AACnD,gBAAgB,mBAAO,CAAC,qDAAa;AACrC,kBAAkB,mBAAO,CAAC,yDAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,+BAA+B;AAC1C;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA,4GAA4G;AAC5G;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,2DAA2D;;AAE3D;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B,eAAe,cAAc;AAC7B;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B,eAAe,cAAc;AAC7B;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,kBAAkB;;AAEnD;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iEAAiE;AACjE;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,eAAe,2BAA2B;AAC1C;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC7hBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2BAA2B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC9DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,mEAAwB;AAC7C,kBAAkB,mBAAO,CAAC,yDAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,sCAAsC;AACjD;AACA,YAAY,sCAAsC;AAClD;AACA;AACA;AACA,mEAAmE;;AAEnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACnOA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,uBAAuB,mBAAO,CAAC,mEAAoB;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,sCAAsC;AACjD;AACA,YAAY,eAAe;AAC3B;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,sCAAsC;AAClD;AACA;AACA;AACA,qCAAqC,mBAAmB;AACxD,8BAA8B,cAAc;AAC5C,6BAA6B,WAAW;AACxC,iCAAiC,eAAe;AAChD,gCAAgC,aAAa;AAC7C,wCAAwC,yBAAyB;;AAEjE;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACjJA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,2BAA2B;AACtC,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,uDAAuD;AACjJ;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,oFAAoF,mDAAmD;AACvI;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;AC/CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;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;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uGAAuG;AAClH,WAAW,gBAAgB;AAC3B,WAAW,sCAAsC;AACjD;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;;;;;;;;;;;AC3QA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,eAAe,mBAAO,CAAC,0EAA6B;AACpD,oBAAoB,mBAAO,CAAC,oFAAkC;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,sDAAsD;AACjE,WAAW,gBAAgB;AAC3B,WAAW,sCAAsC;AACjD,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA,QAAQ;AACR,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qGAAqG;AAChH,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,WAAW,sCAAsC;AACjD;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;;;;;;;;;;;AC/NA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,oBAAoB,mBAAO,CAAC,oFAAkC;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,sDAAsD;AACjE,WAAW,OAAO;AAClB,WAAW,sCAAsC;AACjD;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qGAAqG;AAChH,WAAW,OAAO;AAClB,WAAW,sCAAsC;AACjD;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;;;;;;;;;;;ACxKA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,mDAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,6BAA6B,WAAW;;AAExC;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,6BAA6B,WAAW;;AAExC;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC1kBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;;AAEA;;;;;;;;;;;;AC/6CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,4BAA4B,eAAe;;AAE3C;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,4CAA4C;;AAE5C;;AAEA,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC7vBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,+BAA+B,YAAY;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA,WAAW,8BAA8B;AACzC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,qDAAiB;AACvC,cAAc,mBAAO,CAAC,qDAAiB;AACvC,iBAAiB,mBAAO,CAAC,2DAAoB;;AAE7C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,6BAA6B,WAAW;;AAExC;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA;AACA,+BAA+B,YAAY;AAC3C,+BAA+B,YAAY;AAC3C,kCAAkC,eAAe;;AAEjD;;AAEA;AACA;;AAEA,mBAAmB,YAAY;AAC/B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,6BAA6B;AAC9E;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,oBAAoB;AAC/B;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,4BAA4B,qBAAqB;;AAEjD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,+CAA+C;AAC1D;AACA,YAAY,+CAA+C;AAC3D;AACA;AACA;AACA,+BAA+B,wBAAwB;;AAEvD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,6DAAqB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,OAAO;;AAEzC;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,6BAA6B,YAAY;;AAEzC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;;;;;;;;;;;;ACjwBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;;;;;;;;;;;;ACnyBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1hBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA,2CAA2C,sCAAsC;AACjF;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA,2CAA2C,gCAAgC;AAC3E;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,4CAAU;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,0DAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,0DAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,yDAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,4CAAU;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,6BAA6B,aAAa;;AAE1C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;AC1CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,0CAAS;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,WAAW,mBAAO,CAAC,0CAAS;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,aAAa,mBAAO,CAAC,qDAAW;AAChC,mBAAmB,mBAAO,CAAC,iEAAiB;AAC5C,oBAAoB,mBAAO,CAAC,mEAAkB;AAC9C,cAAc,mBAAO,CAAC,uDAAY;AAClC,sBAAsB,mBAAO,CAAC,uEAAoB;AAClD,eAAe,mBAAO,CAAC,yDAAa;AACpC,YAAY,mBAAO,CAAC,mDAAU;AAC9B,mBAAmB,mBAAO,CAAC,iEAAiB;AAC5C,aAAa,mBAAO,CAAC,qDAAW;AAChC,cAAc,mBAAO,CAAC,uDAAY;AAClC,qBAAqB,mBAAO,CAAC,qEAAmB;AAChD,UAAU,mBAAO,CAAC,+CAAQ;AAC1B,iBAAiB,mBAAO,CAAC,6DAAe;;AAExC;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACrFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,4BAA4B,SAAS;;AAErC;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,mDAAM;AACtB,SAAS,mBAAO,CAAC,qDAAO;AACxB,WAAW,mBAAO,CAAC,yDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,qDAAM;AACtB,SAAS,mBAAO,CAAC,uDAAO;AACxB,WAAW,mBAAO,CAAC,2DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,kDAAM;AACtB,SAAS,mBAAO,CAAC,oDAAO;AACxB,WAAW,mBAAO,CAAC,wDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD,+BAA+B,cAAc;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD,+BAA+B,cAAc;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD,+BAA+B,cAAc;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;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,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,sDAAM;AACtB,SAAS,mBAAO,CAAC,wDAAO;AACxB,WAAW,mBAAO,CAAC,4DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA,iBAAiB,mBAAO,CAAC,8DAAW;;;;;;;;;;;;ACVpC;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,gCAAgC,kBAAkB;;AAElD;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,gCAAgC,kBAAkB;;AAElD;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,gCAAgC,kBAAkB;;AAElD;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;A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C,gBAAgB,mBAAO,CAAC,qDAAc;;AAEtC;;AAEA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,oDAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,QAAQ;AAC3B;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,sDAAe;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,8CAAW;;AAEhC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,sDAAe;;AAExC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,0DAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,YAAY,mBAAO,CAAC,qFAAuB;AAC3C,gBAAgB,mBAAO,CAAC,6FAA2B;AACnD,iBAAiB,mBAAO,CAAC,+FAA4B;AACrD,YAAY,mBAAO,CAAC,qFAAuB;AAC3C,qBAAqB,mBAAO,CAAC,uGAAgC;AAC7D,gBAAgB,mBAAO,CAAC,6FAA2B;AACnD,kBAAkB,mBAAO,CAAC,iGAA6B;;AAEvD;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,aAAa,mBAAO,CAAC,gEAAiB;AACtC,YAAY,mBAAO,CAAC,sEAAoB;AACxC,aAAa,mBAAO,CAAC,wEAAqB;;AAE1C;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;;AAEA;;AAEA;AACA;AACA,kCAAkC,qDAAqD;;AAEvF;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,oEAAoE;;AAEpE;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;;AAEA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;;AAEA;;AAEA,kDAAkD;AAClD,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,wCAAwC;AAC/D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA,wBAAwB,UAAU;AAClC;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,IAAI;AACxB,oBAAoB,EAAE;AACtB;AACA,eAAe,IAAI;AACnB;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,IAAI;AACxB,oBAAoB,EAAE;AACtB;AACA,eAAe,IAAI;AACnB;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,IAAI;AACxB;AACA,eAAe,IAAI;AACnB;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;;AAEA,yBAAyB,OAAO;AAChC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACvfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,UAAU,mBAAO,CAAC,sDAAY;AAC9B,WAAW,mBAAO,CAAC,wDAAa;AAChC,QAAQ,mBAAO,CAAC,kDAAU;;AAE1B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,6BAA6B;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,4DAA4D,sCAAsC;AAClG;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC3HA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA,iBAAiB,mBAAO,CAAC,wDAAc;AACvC,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,2DAAiB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,6BAA6B;AACxC;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,mCAAmC,wCAAwC;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACzHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5UA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,6CAA6C;AACpF;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACrKA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvPA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,gCAAgC,iBAAiB;;AAEjD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9GA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,gCAAgC,iBAAiB;;AAEjD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,gCAAgC,QAAQ;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;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cAAc;AAC1C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC7EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,iCAAiC,yBAAyB;;AAE1D;;AAEA;AACA;AACA,gCAAgC,cAAc;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,iCAAiC,yBAAyB;;AAE1D;AACA;AACA,gCAAgC,cAAc;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,+BAA+B,uBAAuB;;AAEtD;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C,iDAAiD;AACjD;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;;AAEA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,wBAAwB,mBAAO,CAAC,4EAA8B;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,4BAA4B,YAAY;AACxC,6BAA6B,UAAU;;AAEvC;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA,6BAA6B,UAAU;AACvC,8BAA8B,wBAAwB;AACtD,gCAAgC,0BAA0B;;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,iEAAoB;AAC3C,cAAc,mBAAO,CAAC,sDAAW;;AAEjC;AACA;AACA;;AAEA,wBAAwB,mBAAmB;AAC3C;AACA,4BAA4B,mBAAmB;AAC/C;AACA,2BAA2B,SAAS;AACpC;AACA,0BAA0B,6BAA6B;AACvD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mBAAmB,aAAa;AAChC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnIA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,YAAY;AACvB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,YAAY;AACxB;AACA;AACA;AACA,gCAAgC,iBAAiB;;AAEjD;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA,gCAAgC,iBAAiB;;AAEjD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,iCAAiC,yBAAyB;AAC1D,gCAAgC,iBAAiB;;AAEjD;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,+BAA+B,uBAAuB;;AAEtD;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;;AAEA,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;;AAEA,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,iCAAiC,yBAAyB;;AAE1D;AACA;AACA,gCAAgC,cAAc;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,IAAI;AACpB;AACA,WAAW,IAAI;AACf;AACA,YAAY,IAAI;AAChB;AACA;AACA;AACA,kCAAkC,OAAO;AACzC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,uBAAuB,SAAS;AAChC;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACvCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB,WAAW;AAChC;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI,IAA8B;AAClC;AACA;AACA,KAAK,EAEJ;;AAED,CAAC,I;;;;;;;;;;;AC7ID;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,YAAY,mBAAO,CAAC,0DAAU;;AAE9B,SAAS,mBAAO,CAAC,8CAAO;AACxB,WAAW,mBAAO,CAAC,kDAAS;AAC5B,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,sBAAsB,mBAAO,CAAC,wEAAoB;AAClD,UAAU,mBAAO,CAAC,gDAAQ;AAC1B,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,yBAAyB,mBAAO,CA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AAU,mBAAO,CAAC,0DAAkB;AACpC,kBAAkB,mBAAO,CAAC,qEAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA,uBAAuB,sBAAsB;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2BAA2B,sBAAsB;AACjD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,qEAAe;AACzC,sBAAsB,mBAAO,CAAC,6EAAmB;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,6CAA6C;AAC3E;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB,WAAW,gBAAgB;AAC3B;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,kCAAkC,gBAAgB;;AAElD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;AAEA,mBAAmB,oBAAoB;AACvC;AACA;;AAEA,wCAAwC,QAAQ;AAChD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,oBAAoB,mBAAO,CAAC,2EAAkB;AAC9C,oBAAoB,mBAAO,CAAC,2EAAkB;AAC9C,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,eAAe,mBAAO,CAAC,iEAAa;AACpC,gBAAgB,mBAAO,CAAC,mEAAc;AACtC,kBAAkB,mBAAO,CAAC,uEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,qBAAqB,mBAAO,CAAC,6EAAmB;;AAEhD;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,oBAAoB,mBAAO,CAAC,mEAAiB;;AAE7C,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,YAAY,OAAO;;AAEnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,UAAU,YAAY;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,WAAW,mBAAO,CAAC,8CAAY;AAC/B,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA,8CAA8C,aAAa,qBAAqB;AAChF;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb;AACA,YAAY,EAAE,oBAAoB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;;AAEA;;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,6BAA6B;AACxC;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qGAAqG;AACpH,eAAe,OAAO;AACtB,eAAe,gBAAgB;AAC/B,eAAe,QAAQ;AACvB,eAAe,sCAAsC;AACrD,eAAe,sCAAsC;AACrD;AACA,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,eAAe;AAC9B,eAAe,WAAW;AAC1B;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;;AAEA;;AAEA,gBAAgB;AAChB,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;AACA;;AAEA;;AAEA,gBAAgB;AAChB,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,gBAAgB;AAC5B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,QAAQ;AACnB;AACA,YAAY,gBAAgB;AAC5B;;AAEA;;;;;;;;;;;;ACvrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,gEAA6B;AACjD,gBAAgB,mBAAO,CAAC,wGAAiD;AACzE,2BAA2B,mBAAO,CAAC,mEAAwB;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,YAAY;AACvB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,kBAAkB;AAC7B;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC3FA;AACA;AACA;AACA,kBAA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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,qBAAqB;AACxC;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpKA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,cAAc,mBAAO,CAAC,oDAAkB;AACxC,aAAa,mBAAO,CAAC,kDAAiB;AACtC,SAAS,mBAAO,CAAC,0CAAa;AAC9B,WAAW,mBAAO,CAAC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AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,kBAAkB;;AAEpD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB,eAAe,YAAY;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,kCAAkC,6BAA6B;AAC/D,mCAAmC,+BAA+B;AAClE,oCAAoC,aAAa;AACjD,oCAAoC,aAAa;;AAEjD;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,oCAAoC,aAAa;AACjD,oCAAoC,aAAa;;AAEjD;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA,uBAAuB,2BAA2B;AAClD;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,oCAAoC;AAC/D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,uCAAuC,gBAAgB;;AAEvD;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C,4CAA4C,yBAAyB;;AAErE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA,2BAA2B,qBAAqB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,YAAY;AAC/C,qCAAqC,cAAc;AACnD,qCAAqC,gBAAgB;;AAErD;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACjjDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5HA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,oFAAgC;AAC1D;;AAEA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,sFAAiC;AAC5D;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvKA;;AAEA;AACA;AACA;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA,kCAAkC,UAAU;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,mDAAmD;AACxD;AACA;AACA;AACA;AACA,KAAK,+DAA+D;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,+DAA+D;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,OAAO;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,OAAO;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,iBAAiB;AAC5D;AACA;AACA;AACA;AACA,2CAA2C,iBAAiB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,mBAAmB;AAC5D;AACA;AACA;AACA;AACA;AACA,yCAAyC,mBAAmB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,oBAAoB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,oBAAoB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,6CAA6C;AAC/D;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,OAAO;AACxE;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,yBAAyB,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,YAAY;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,oBAAoB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,oBAAoB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA;AACA,kCAAkC,oBAAoB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,cAAc;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,sDAAsD;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA,wCAAwC,iBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yGAAyG;AACzG;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,qGAAqG;AACrG;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,2DAA2D,0BAA0B;AACrF;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,sDAAsD;AAC3D,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,kEAAkE;AACvE,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,OAAO;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,iBAAiB;AACpD;AACA;AACA;AACA,iDAAiD,iBAAiB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,gBAAgB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA,0DAA0D,iBAAiB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK,+DAA+D;AACpE;AACA;AACA;AACA;AACA;AACA,KAAK,4DAA4D;AACjE;AACA;AACA;AACA;AACA;AACA,KAAK,yDAAyD;AAC9D,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,wCAAwC,iBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,gCAAgC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;AACA,2BAA2B,sCAAsC;AACjE;AACA;AACA;AACA;AACA,2BAA2B,iCAAiC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,OAAO;AAClE;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qBAAqB;AACvD,gCAAgC,cAAc;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,qBAAqB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,eAAe;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,eAAe;AAC9C;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qBAAqB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,OAAO;AAC7B;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA,wDAAwD,OAAO;AAC/D;AACA,wDAAwD,OAAO;AAC/D;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,OAAO;AACtC;AACA;AACA;AACA,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA;AACA;AACA,wCAAwC,yBAAyB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA;AACA;AACA,wCAAwC,yBAAyB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA,0DAA0D,SAAS;AACnE;AACA,gEAAgE,WAAW;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,yBAAyB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,SAAS;AAChE;AACA;AACA;AACA,uDAAuD,SAAS;AAChE;AACA;AACA;AACA,uEAAuE,QAAQ;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;AACA;AACA;AACA,oCAAoC,kBAAkB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,qCAAqC,uBAAuB;AAC5D,mCAAmC,WAAW;AAC9C,oCAAoC,oCAAoC;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,mCAAmC,cAAc;AACjD,sCAAsC,iBAAiB;AACvD;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA,qDAAqD,SAAS;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qBAAqB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,sBAAsB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA,gCAAgC,0BAA0B;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,OAAO;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,OAAO;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,2BAA2B;AAC1D;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA,wCAAwC,2BAA2B;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,wBAAwB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,+BAA+B;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,0BAA0B;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,OAAO;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,wBAAwB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA,gDAAgD,QAAQ;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0BAA0B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0BAA0B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yFAAyF,OAAO;AAChG;AACA;AACA;AACA,uDAAuD,kBAAkB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,0BAA0B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,oBAAoB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6BAA6B;AACxD;AACA;AACA,+BAA+B,6BAA6B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,wBAAwB;AACnD;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6BAA6B;AACxD;AACA;AACA,+BAA+B,6BAA6B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,wBAAwB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6BAA6B;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,kEAAkE;AACvE;AACA;AACA;AACA;AACA;AACA,KAAK,4DAA4D;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E;AAC5E,kEAAkE;AAClE,qDAAqD;AACrD;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,yBAAyB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,gBAAgB;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,oDAAoD,+BAA+B;AACnF;AACA;AACA;AACA;AACA,mCAAmC,WAAW;AAC9C;AACA;AACA;AACA;AACA;AACA,qCAAqC,UAAU;AAC/C;AACA;AACA;AACA;AACA;AACA,mCAAmC,WAAW;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,UAAU;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,iBAAiB;AACvD,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,wCAAwC,iBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,wBAAwB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,WAAW;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,WAAW;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,WAAW;AAC7D;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,WAAW;AAC5E;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,qEAAqE;AAC1E,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,iBAAiB;AAC7D,2DAA2D,8CAA8C,EAAE;AAC3G;AACA;AACA,SAAS;AACT;AACA,KAAK,6CAA6C;AAClD,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kFAAkF;AAClF,wEAAwE;AACxE,2DAA2D;AAC3D;AACA,SAAS;AACT;AACA,KAAK,6CAA6C;AAClD,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,sBAAsB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,OAAO;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,6CAA6C;AAClD,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,iBAAiB;AAC7D;AACA;AACA,iBAAiB;AACjB;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,oBAAoB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,UAAU;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,wBAAwB;AAChF,sDAAsD,sDAAsD;AAC5G,sDAAsD,qDAAqD;AAC3G;AACA;AACA;AACA;AACA,sDAAsD,sBAAsB;AAC5E,qDAAqD,4BAA4B;AACjF,qDAAqD,2BAA2B;AAChF;AACA;AACA;AACA;AACA,qDAAqD,qBAAqB;AAC1E;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,sCAAsC,UAAU;AAChD;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS,oFAAoF;AAC7F,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE,6CAA6C,qBAAqB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,oBAAoB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,uBAAuB;AACxF;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF,gDAAgD,qBAAqB;AACrE,8CAA8C,mBAAmB;AACjE;AACA;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,0CAA0C,cAAc;AACxD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,yDAAyD;AAClE,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,qBAAqB;AAC5E,4DAA4D,0BAA0B;AACtF,8DAA8D,4BAA4B;AAC1F,kEAAkE,sBAAsB;AACxF,8DAA8D,sBAAsB;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,8CAA8C,kDAAkD,iDAAiD,+BAA+B,mCAAmC,0BAA0B,2CAA2C,mDAAmD,8EAA8E,WAAW;AAC/e,iHAAiH,2FAA2F,mCAAmC,sCAAsC,0BAA0B,uEAAuE,WAAW;AACjY;AACA;AACA;AACA,2EAA2E,8CAA8C,+CAA+C,kDAAkD,iDAAiD,+BAA+B,8BAA8B,mCAAmC,0BAA0B,2CAA2C,2CAA2C,mDAAmD,8EAA8E,WAAW;AACvmB,iHAAiH,2FAA2F,mCAAmC,mCAAmC,sCAAsC,0BAA0B,8DAA8D,oDAAoD,8HAA8H,WAAW;AAC7kB;AACA;AACA;AACA,2EAA2E,8CAA8C,iDAAiD,+BAA+B,0BAA0B,2CAA2C,8EAA8E,WAAW;AACvW,iHAAiH,2FAA2F,0BAA0B,mCAAmC,WAAW;AACpR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,qBAAqB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,0CAA0C,cAAc;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,sDAAsD;AAC/D,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,SAAS;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,SAAS;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,YAAY;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,qBAAqB;AACrE,8CAA8C,mBAAmB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,SAAS;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,SAAS;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,OAAO;AAC1C,mCAAmC,OAAO;AAC1C,mCAAmC,OAAO;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,kBAAkB,iBAAiB;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,qEAAqE,OAAO;AAC5E;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;;AAEA,CAAC","file":"SpinePluginDebug.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./SpinePlugin.js\");\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Clamp = require('../math/Clamp');\nvar Class = require('../utils/Class');\nvar EventEmitter = require('eventemitter3');\nvar Events = require('./events');\nvar FindClosestInSorted = require('../utils/array/FindClosestInSorted');\nvar Frame = require('./AnimationFrame');\nvar GetValue = require('../utils/object/GetValue');\n\n/**\n * @classdesc\n * A Frame based Animation.\n *\n * This consists of a key, some default values (like the frame rate) and a bunch of Frame objects.\n *\n * The Animation Manager creates these. Game Objects don't own an instance of these directly.\n * Game Objects have the Animation Component, which are like playheads to global Animations (these objects)\n * So multiple Game Objects can have playheads all pointing to this one Animation instance.\n *\n * @class Animation\n * @memberof Phaser.Animations\n * @extends Phaser.Events.EventEmitter\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Animations.AnimationManager} manager - A reference to the global Animation Manager\n * @param {string} key - The unique identifying string for this animation.\n * @param {Phaser.Types.Animations.Animation} config - The Animation configuration.\n */\nvar Animation = new Class({\n\n Extends: EventEmitter,\n\n initialize:\n\n function Animation (manager, key, config)\n {\n EventEmitter.call(this);\n\n /**\n * A reference to the global Animation Manager.\n *\n * @name Phaser.Animations.Animation#manager\n * @type {Phaser.Animations.AnimationManager}\n * @since 3.0.0\n */\n this.manager = manager;\n\n /**\n * The unique identifying string for this animation.\n *\n * @name Phaser.Animations.Animation#key\n * @type {string}\n * @since 3.0.0\n */\n this.key = key;\n\n /**\n * A frame based animation (as opposed to a bone based animation)\n *\n * @name Phaser.Animations.Animation#type\n * @type {string}\n * @default frame\n * @since 3.0.0\n */\n this.type = 'frame';\n\n /**\n * Extract all the frame data into the frames array.\n *\n * @name Phaser.Animations.Animation#frames\n * @type {Phaser.Animations.AnimationFrame[]}\n * @since 3.0.0\n */\n this.frames = this.getFrames(\n manager.textureManager,\n GetValue(config, 'frames', []),\n GetValue(config, 'defaultTextureKey', null)\n );\n\n /**\n * The frame rate of playback in frames per second (default 24 if duration is null)\n *\n * @name Phaser.Animations.Animation#frameRate\n * @type {integer}\n * @default 24\n * @since 3.0.0\n */\n this.frameRate = GetValue(config, 'frameRate', null);\n\n /**\n * How long the animation should play for, in milliseconds.\n * If the `frameRate` property has been set then it overrides this value,\n * otherwise the `frameRate` is derived from `duration`.\n *\n * @name Phaser.Animations.Animation#duration\n * @type {integer}\n * @since 3.0.0\n */\n this.duration = GetValue(config, 'duration', null);\n\n if (this.duration === null && this.frameRate === null)\n {\n // No duration or frameRate given, use default frameRate of 24fps\n this.frameRate = 24;\n this.duration = (this.frameRate / this.frames.length) * 1000;\n }\n else if (this.duration && this.frameRate === null)\n {\n // Duration given but no frameRate, so set the frameRate based on duration\n // I.e. 12 frames in the animation, duration = 4000 ms\n // So frameRate is 12 / (4000 / 1000) = 3 fps\n this.frameRate = this.frames.length / (this.duration / 1000);\n }\n else\n {\n // frameRate given, derive duration from it (even if duration also specified)\n // I.e. 15 frames in the animation, frameRate = 30 fps\n // So duration is 15 / 30 = 0.5 * 1000 (half a second, or 500ms)\n this.duration = (this.frames.length / this.frameRate) * 1000;\n }\n\n /**\n * How many ms per frame, not including frame specific modifiers.\n *\n * @name Phaser.Animations.Animation#msPerFrame\n * @type {integer}\n * @since 3.0.0\n */\n this.msPerFrame = 1000 / this.frameRate;\n\n /**\n * Skip frames if the time lags, or always advanced anyway?\n *\n * @name Phaser.Animations.Animation#skipMissedFrames\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.skipMissedFrames = GetValue(config, 'skipMissedFrames', true);\n\n /**\n * The delay in ms before the playback will begin.\n *\n * @name Phaser.Animations.Animation#delay\n * @type {integer}\n * @default 0\n * @since 3.0.0\n */\n this.delay = GetValue(config, 'delay', 0);\n\n /**\n * Number of times to repeat the animation. Set to -1 to repeat forever.\n *\n * @name Phaser.Animations.Animation#repeat\n * @type {integer}\n * @default 0\n * @since 3.0.0\n */\n this.repeat = GetValue(config, 'repeat', 0);\n\n /**\n * The delay in ms before the a repeat play starts.\n *\n * @name Phaser.Animations.Animation#repeatDelay\n * @type {integer}\n * @default 0\n * @since 3.0.0\n */\n this.repeatDelay = GetValue(config, 'repeatDelay', 0);\n\n /**\n * Should the animation yoyo (reverse back down to the start) before repeating?\n *\n * @name Phaser.Animations.Animation#yoyo\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.yoyo = GetValue(config, 'yoyo', false);\n\n /**\n * Should the GameObject's `visible` property be set to `true` when the animation starts to play?\n *\n * @name Phaser.Animations.Animation#showOnStart\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.showOnStart = GetValue(config, 'showOnStart', false);\n\n /**\n * Should the GameObject's `visible` property be set to `false` when the animation finishes?\n *\n * @name Phaser.Animations.Animation#hideOnComplete\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.hideOnComplete = GetValue(config, 'hideOnComplete', false);\n\n /**\n * Global pause. All Game Objects using this Animation instance are impacted by this property.\n *\n * @name Phaser.Animations.Animation#paused\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.paused = false;\n\n this.manager.on(Events.PAUSE_ALL, this.pause, this);\n this.manager.on(Events.RESUME_ALL, this.resume, this);\n },\n\n /**\n * Add frames to the end of the animation.\n *\n * @method Phaser.Animations.Animation#addFrame\n * @since 3.0.0\n *\n * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects.\n *\n * @return {this} This Animation object.\n */\n addFrame: function (config)\n {\n return this.addFrameAt(this.frames.length, config);\n },\n\n /**\n * Add frame/s into the animation.\n *\n * @method Phaser.Animations.Animation#addFrameAt\n * @since 3.0.0\n *\n * @param {integer} index - The index to insert the frame at within the animation.\n * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects.\n *\n * @return {this} This Animation object.\n */\n addFrameAt: function (index, config)\n {\n var newFrames = this.getFrames(this.manager.textureManager, config);\n\n if (newFrames.length > 0)\n {\n if (index === 0)\n {\n this.frames = newFrames.concat(this.frames);\n }\n else if (index === this.frames.length)\n {\n this.frames = this.frames.concat(newFrames);\n }\n else\n {\n var pre = this.frames.slice(0, index);\n var post = this.frames.slice(index);\n\n this.frames = pre.concat(newFrames, post);\n }\n\n this.updateFrameSequence();\n }\n\n return this;\n },\n\n /**\n * Check if the given frame index is valid.\n *\n * @method Phaser.Animations.Animation#checkFrame\n * @since 3.0.0\n *\n * @param {integer} index - The index to be checked.\n *\n * @return {boolean} `true` if the index is valid, otherwise `false`.\n */\n checkFrame: function (index)\n {\n return (index >= 0 && index < this.frames.length);\n },\n\n /**\n * Called internally when this Animation completes playback.\n * Optionally, hides the parent Game Object, then stops playback.\n *\n * @method Phaser.Animations.Animation#completeAnimation\n * @protected\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\n */\n completeAnimation: function (component)\n {\n if (this.hideOnComplete)\n {\n component.parent.visible = false;\n }\n\n component.stop();\n },\n\n /**\n * Called internally when this Animation first starts to play.\n * Sets the accumulator and nextTick properties.\n *\n * @method Phaser.Animations.Animation#getFirstTick\n * @protected\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\n * @param {boolean} [includeDelay=true] - If `true` the Animation Components delay value will be added to the `nextTick` total.\n */\n getFirstTick: function (component, includeDelay)\n {\n if (includeDelay === undefined) { includeDelay = true; }\n\n // When is the first update due?\n component.accumulator = 0;\n component.nextTick = component.msPerFrame + component.currentFrame.duration;\n\n if (includeDelay)\n {\n component.nextTick += component._delay;\n }\n },\n\n /**\n * Returns the AnimationFrame at the provided index\n *\n * @method Phaser.Animations.Animation#getFrameAt\n * @protected\n * @since 3.0.0\n *\n * @param {integer} index - The index in the AnimationFrame array\n *\n * @return {Phaser.Animations.AnimationFrame} The frame at the index provided from the animation sequence\n */\n getFrameAt: function (index)\n {\n return this.frames[index];\n },\n\n /**\n * Creates AnimationFrame instances based on the given frame data.\n *\n * @method Phaser.Animations.Animation#getFrames\n * @since 3.0.0\n *\n * @param {Phaser.Textures.TextureManager} textureManager - A reference to the global Texture Manager.\n * @param {(string|Phaser.Types.Animations.AnimationFrame[])} frames - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects.\n * @param {string} [defaultTextureKey] - The key to use if no key is set in the frame configuration object.\n *\n * @return {Phaser.Animations.AnimationFrame[]} An array of newly created AnimationFrame instances.\n */\n getFrames: function (textureManager, frames, defaultTextureKey)\n {\n var out = [];\n var prev;\n var animationFrame;\n var index = 1;\n var i;\n var textureKey;\n\n // if frames is a string, we'll get all the frames from the texture manager as if it's a sprite sheet\n if (typeof frames === 'string')\n {\n textureKey = frames;\n\n var texture = textureManager.get(textureKey);\n var frameKeys = texture.getFrameNames();\n\n frames = [];\n\n frameKeys.forEach(function (idx, value)\n {\n frames.push({ key: textureKey, frame: value });\n });\n }\n\n if (!Array.isArray(frames) || frames.length === 0)\n {\n return out;\n }\n\n for (i = 0; i < frames.length; i++)\n {\n var item = frames[i];\n\n var key = GetValue(item, 'key', defaultTextureKey);\n\n if (!key)\n {\n continue;\n }\n\n // Could be an integer or a string\n var frame = GetValue(item, 'frame', 0);\n\n // The actual texture frame\n var textureFrame = textureManager.getFrame(key, frame);\n\n animationFrame = new Frame(key, frame, index, textureFrame);\n\n animationFrame.duration = GetValue(item, 'duration', 0);\n\n animationFrame.isFirst = (!prev);\n\n // The previously created animationFrame\n if (prev)\n {\n prev.nextFrame = animationFrame;\n\n animationFrame.prevFrame = prev;\n }\n\n out.push(animationFrame);\n\n prev = animationFrame;\n\n index++;\n }\n\n if (out.length > 0)\n {\n animationFrame.isLast = true;\n\n // Link them end-to-end, so they loop\n animationFrame.nextFrame = out[0];\n\n out[0].prevFrame = animationFrame;\n\n // Generate the progress data\n\n var slice = 1 / (out.length - 1);\n\n for (i = 0; i < out.length; i++)\n {\n out[i].progress = i * slice;\n }\n }\n\n return out;\n },\n\n /**\n * Called internally. Sets the accumulator and nextTick values of the current Animation.\n *\n * @method Phaser.Animations.Animation#getNextTick\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\n */\n getNextTick: function (component)\n {\n // accumulator += delta * _timeScale\n // after a large delta surge (perf issue for example) we need to adjust for it here\n\n // When is the next update due?\n component.accumulator -= component.nextTick;\n\n component.nextTick = component.msPerFrame + component.currentFrame.duration;\n },\n\n /**\n * Loads the Animation values into the Animation Component.\n *\n * @method Phaser.Animations.Animation#load\n * @private\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to load values into.\n * @param {integer} startFrame - The start frame of the animation to load.\n */\n load: function (component, startFrame)\n {\n if (startFrame >= this.frames.length)\n {\n startFrame = 0;\n }\n\n if (component.currentAnim !== this)\n {\n component.currentAnim = this;\n\n component.frameRate = this.frameRate;\n component.duration = this.duration;\n component.msPerFrame = this.msPerFrame;\n component.skipMissedFrames = this.skipMissedFrames;\n\n component._delay = this.delay;\n component._repeat = this.repeat;\n component._repeatDelay = this.repeatDelay;\n component._yoyo = this.yoyo;\n }\n\n var frame = this.frames[startFrame];\n\n if (startFrame === 0 && !component.forward)\n {\n frame = this.getLastFrame();\n }\n\n component.updateFrame(frame);\n },\n\n /**\n * Returns the frame closest to the given progress value between 0 and 1.\n *\n * @method Phaser.Animations.Animation#getFrameByProgress\n * @since 3.4.0\n *\n * @param {number} value - A value between 0 and 1.\n *\n * @return {Phaser.Animations.AnimationFrame} The frame closest to the given progress value.\n */\n getFrameByProgress: function (value)\n {\n value = Clamp(value, 0, 1);\n\n return FindClosestInSorted(value, this.frames, 'progress');\n },\n\n /**\n * Advance the animation frame.\n *\n * @method Phaser.Animations.Animation#nextFrame\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to advance.\n */\n nextFrame: function (component)\n {\n var frame = component.currentFrame;\n\n // TODO: Add frame skip support\n\n if (frame.isLast)\n {\n // We're at the end of the animation\n\n // Yoyo? (happens before repeat)\n if (component._yoyo)\n {\n this.handleYoyoFrame(component, false);\n }\n else if (component.repeatCounter > 0)\n {\n // Repeat (happens before complete)\n\n if (component._reverse && component.forward)\n {\n component.forward = false;\n }\n else\n {\n this.repeatAnimation(component);\n }\n }\n else\n {\n this.completeAnimation(component);\n }\n }\n else\n {\n this.updateAndGetNextTick(component, frame.nextFrame);\n }\n },\n\n /**\n * Handle the yoyo functionality in nextFrame and previousFrame methods.\n *\n * @method Phaser.Animations.Animation#handleYoyoFrame\n * @private\n * @since 3.12.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to advance.\n * @param {boolean} isReverse - Is animation in reverse mode? (Default: false)\n */\n handleYoyoFrame: function (component, isReverse)\n {\n if (!isReverse) { isReverse = false; }\n\n if (component._reverse === !isReverse && component.repeatCounter > 0)\n {\n if (!component._repeatDelay || component.pendingRepeat)\n\n {\n component.forward = isReverse;\n }\n\n this.repeatAnimation(component);\n\n return;\n }\n\n if (component._reverse !== isReverse && component.repeatCounter === 0)\n {\n this.completeAnimation(component);\n\n return;\n }\n \n component.forward = isReverse;\n\n var frame = (isReverse) ? component.currentFrame.nextFrame : component.currentFrame.prevFrame;\n\n this.updateAndGetNextTick(component, frame);\n },\n\n /**\n * Returns the animation last frame.\n *\n * @method Phaser.Animations.Animation#getLastFrame\n * @since 3.12.0\n *\n * @return {Phaser.Animations.AnimationFrame} component - The Animation Last Frame.\n */\n getLastFrame: function ()\n {\n return this.frames[this.frames.length - 1];\n },\n\n /**\n * Called internally when the Animation is playing backwards.\n * Sets the previous frame, causing a yoyo, repeat, complete or update, accordingly.\n *\n * @method Phaser.Animations.Animation#previousFrame\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\n */\n previousFrame: function (component)\n {\n var frame = component.currentFrame;\n\n // TODO: Add frame skip support\n\n if (frame.isFirst)\n {\n // We're at the start of the animation\n\n if (component._yoyo)\n {\n this.handleYoyoFrame(component, true);\n }\n else if (component.repeatCounter > 0)\n {\n if (component._reverse && !component.forward)\n {\n component.currentFrame = this.getLastFrame();\n this.repeatAnimation(component);\n }\n else\n {\n // Repeat (happens before complete)\n component.forward = true;\n this.repeatAnimation(component);\n }\n }\n else\n {\n this.completeAnimation(component);\n }\n }\n else\n {\n this.updateAndGetNextTick(component, frame.prevFrame);\n }\n },\n\n /**\n * Update Frame and Wait next tick.\n *\n * @method Phaser.Animations.Animation#updateAndGetNextTick\n * @private\n * @since 3.12.0\n *\n * @param {Phaser.Animations.AnimationFrame} frame - An Animation frame.\n */\n updateAndGetNextTick: function (component, frame)\n {\n component.updateFrame(frame);\n\n this.getNextTick(component);\n },\n\n /**\n * Removes the given AnimationFrame from this Animation instance.\n * This is a global action. Any Game Object using this Animation will be impacted by this change.\n *\n * @method Phaser.Animations.Animation#removeFrame\n * @since 3.0.0\n *\n * @param {Phaser.Animations.AnimationFrame} frame - The AnimationFrame to be removed.\n *\n * @return {this} This Animation object.\n */\n removeFrame: function (frame)\n {\n var index = this.frames.indexOf(frame);\n\n if (index !== -1)\n {\n this.removeFrameAt(index);\n }\n\n return this;\n },\n\n /**\n * Removes a frame from the AnimationFrame array at the provided index\n * and updates the animation accordingly.\n *\n * @method Phaser.Animations.Animation#removeFrameAt\n * @since 3.0.0\n *\n * @param {integer} index - The index in the AnimationFrame array\n *\n * @return {this} This Animation object.\n */\n removeFrameAt: function (index)\n {\n this.frames.splice(index, 1);\n\n this.updateFrameSequence();\n\n return this;\n },\n\n /**\n * Called internally during playback. Forces the animation to repeat, providing there are enough counts left\n * in the repeat counter.\n *\n * @method Phaser.Animations.Animation#repeatAnimation\n * @fires Phaser.Animations.Events#ANIMATION_REPEAT\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_REPEAT\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\n */\n repeatAnimation: function (component)\n {\n if (component._pendingStop === 2)\n {\n return this.completeAnimation(component);\n }\n\n if (component._repeatDelay > 0 && component.pendingRepeat === false)\n {\n component.pendingRepeat = true;\n component.accumulator -= component.nextTick;\n component.nextTick += component._repeatDelay;\n }\n else\n {\n component.repeatCounter--;\n\n component.updateFrame(component.currentFrame[(component.forward) ? 'nextFrame' : 'prevFrame']);\n\n if (component.isPlaying)\n {\n this.getNextTick(component);\n\n component.pendingRepeat = false;\n\n var frame = component.currentFrame;\n var parent = component.parent;\n\n this.emit(Events.ANIMATION_REPEAT, this, frame);\n\n parent.emit(Events.SPRITE_ANIMATION_KEY_REPEAT + this.key, this, frame, component.repeatCounter, parent);\n\n parent.emit(Events.SPRITE_ANIMATION_REPEAT, this, frame, component.repeatCounter, parent);\n }\n }\n },\n\n /**\n * Sets the texture frame the animation uses for rendering.\n *\n * @method Phaser.Animations.Animation#setFrame\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\n */\n setFrame: function (component)\n {\n // Work out which frame should be set next on the child, and set it\n if (component.forward)\n {\n this.nextFrame(component);\n }\n else\n {\n this.previousFrame(component);\n }\n },\n\n /**\n * Converts the animation data to JSON.\n *\n * @method Phaser.Animations.Animation#toJSON\n * @since 3.0.0\n *\n * @return {Phaser.Types.Animations.JSONAnimation} The resulting JSONAnimation formatted object.\n */\n toJSON: function ()\n {\n var output = {\n key: this.key,\n type: this.type,\n frames: [],\n frameRate: this.frameRate,\n duration: this.duration,\n skipMissedFrames: this.skipMissedFrames,\n delay: this.delay,\n repeat: this.repeat,\n repeatDelay: this.repeatDelay,\n yoyo: this.yoyo,\n showOnStart: this.showOnStart,\n hideOnComplete: this.hideOnComplete\n };\n\n this.frames.forEach(function (frame)\n {\n output.frames.push(frame.toJSON());\n });\n\n return output;\n },\n\n /**\n * Called internally whenever frames are added to, or removed from, this Animation.\n *\n * @method Phaser.Animations.Animation#updateFrameSequence\n * @since 3.0.0\n *\n * @return {this} This Animation object.\n */\n updateFrameSequence: function ()\n {\n var len = this.frames.length;\n var slice = 1 / (len - 1);\n\n var frame;\n\n for (var i = 0; i < len; i++)\n {\n frame = this.frames[i];\n\n frame.index = i + 1;\n frame.isFirst = false;\n frame.isLast = false;\n frame.progress = i * slice;\n\n if (i === 0)\n {\n frame.isFirst = true;\n\n if (len === 1)\n {\n frame.isLast = true;\n frame.nextFrame = frame;\n frame.prevFrame = frame;\n }\n else\n {\n frame.isLast = false;\n frame.prevFrame = this.frames[len - 1];\n frame.nextFrame = this.frames[i + 1];\n }\n }\n else if (i === len - 1 && len > 1)\n {\n frame.isLast = true;\n frame.prevFrame = this.frames[len - 2];\n frame.nextFrame = this.frames[0];\n }\n else if (len > 1)\n {\n frame.prevFrame = this.frames[i - 1];\n frame.nextFrame = this.frames[i + 1];\n }\n }\n\n return this;\n },\n\n /**\n * Pauses playback of this Animation. The paused state is set immediately.\n *\n * @method Phaser.Animations.Animation#pause\n * @since 3.0.0\n *\n * @return {this} This Animation object.\n */\n pause: function ()\n {\n this.paused = true;\n\n return this;\n },\n\n /**\n * Resumes playback of this Animation. The paused state is reset immediately.\n *\n * @method Phaser.Animations.Animation#resume\n * @since 3.0.0\n *\n * @return {this} This Animation object.\n */\n resume: function ()\n {\n this.paused = false;\n\n return this;\n },\n\n /**\n * Destroys this Animation instance. It will remove all event listeners,\n * remove this animation and its key from the global Animation Manager,\n * and then destroy all Animation Frames in turn.\n *\n * @method Phaser.Animations.Animation#destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.removeAllListeners();\n\n this.manager.off(Events.PAUSE_ALL, this.pause, this);\n this.manager.off(Events.RESUME_ALL, this.resume, this);\n\n this.manager.remove(this.key);\n\n for (var i = 0; i < this.frames.length; i++)\n {\n this.frames[i].destroy();\n }\n\n this.frames = [];\n\n this.manager = null;\n }\n\n});\n\nmodule.exports = Animation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\n\n/**\n * @classdesc\n * A single frame in an Animation sequence.\n *\n * An AnimationFrame consists of a reference to the Texture it uses for rendering, references to other\n * frames in the animation, and index data. It also has the ability to modify the animation timing.\n *\n * AnimationFrames are generated automatically by the Animation class.\n *\n * @class AnimationFrame\n * @memberof Phaser.Animations\n * @constructor\n * @since 3.0.0\n *\n * @param {string} textureKey - The key of the Texture this AnimationFrame uses.\n * @param {(string|integer)} textureFrame - The key of the Frame within the Texture that this AnimationFrame uses.\n * @param {integer} index - The index of this AnimationFrame within the Animation sequence.\n * @param {Phaser.Textures.Frame} frame - A reference to the Texture Frame this AnimationFrame uses for rendering.\n */\nvar AnimationFrame = new Class({\n\n initialize:\n\n function AnimationFrame (textureKey, textureFrame, index, frame)\n {\n /**\n * The key of the Texture this AnimationFrame uses.\n *\n * @name Phaser.Animations.AnimationFrame#textureKey\n * @type {string}\n * @since 3.0.0\n */\n this.textureKey = textureKey;\n\n /**\n * The key of the Frame within the Texture that this AnimationFrame uses.\n *\n * @name Phaser.Animations.AnimationFrame#textureFrame\n * @type {(string|integer)}\n * @since 3.0.0\n */\n this.textureFrame = textureFrame;\n\n /**\n * The index of this AnimationFrame within the Animation sequence.\n *\n * @name Phaser.Animations.AnimationFrame#index\n * @type {integer}\n * @since 3.0.0\n */\n this.index = index;\n\n /**\n * A reference to the Texture Frame this AnimationFrame uses for rendering.\n *\n * @name Phaser.Animations.AnimationFrame#frame\n * @type {Phaser.Textures.Frame}\n * @since 3.0.0\n */\n this.frame = frame;\n\n /**\n * Is this the first frame in an animation sequence?\n *\n * @name Phaser.Animations.AnimationFrame#isFirst\n * @type {boolean}\n * @default false\n * @readonly\n * @since 3.0.0\n */\n this.isFirst = false;\n\n /**\n * Is this the last frame in an animation sequence?\n *\n * @name Phaser.Animations.AnimationFrame#isLast\n * @type {boolean}\n * @default false\n * @readonly\n * @since 3.0.0\n */\n this.isLast = false;\n\n /**\n * A reference to the AnimationFrame that comes before this one in the animation, if any.\n *\n * @name Phaser.Animations.AnimationFrame#prevFrame\n * @type {?Phaser.Animations.AnimationFrame}\n * @default null\n * @readonly\n * @since 3.0.0\n */\n this.prevFrame = null;\n\n /**\n * A reference to the AnimationFrame that comes after this one in the animation, if any.\n *\n * @name Phaser.Animations.AnimationFrame#nextFrame\n * @type {?Phaser.Animations.AnimationFrame}\n * @default null\n * @readonly\n * @since 3.0.0\n */\n this.nextFrame = null;\n\n /**\n * Additional time (in ms) that this frame should appear for during playback.\n * The value is added onto the msPerFrame set by the animation.\n *\n * @name Phaser.Animations.AnimationFrame#duration\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.duration = 0;\n\n /**\n * What % through the animation does this frame come?\n * This value is generated when the animation is created and cached here.\n *\n * @name Phaser.Animations.AnimationFrame#progress\n * @type {number}\n * @default 0\n * @readonly\n * @since 3.0.0\n */\n this.progress = 0;\n },\n\n /**\n * Generates a JavaScript object suitable for converting to JSON.\n *\n * @method Phaser.Animations.AnimationFrame#toJSON\n * @since 3.0.0\n *\n * @return {Phaser.Types.Animations.JSONAnimationFrame} The AnimationFrame data.\n */\n toJSON: function ()\n {\n return {\n key: this.textureKey,\n frame: this.textureFrame,\n duration: this.duration\n };\n },\n\n /**\n * Destroys this object by removing references to external resources and callbacks.\n *\n * @method Phaser.Animations.AnimationFrame#destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.frame = undefined;\n }\n\n});\n\nmodule.exports = AnimationFrame;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Add Animation Event.\n * \n * This event is dispatched when a new animation is added to the global Animation Manager.\n * \n * This can happen either as a result of an animation instance being added to the Animation Manager,\n * or the Animation Manager creating a new animation directly.\n *\n * @event Phaser.Animations.Events#ADD_ANIMATION\n * @since 3.0.0\n * \n * @param {string} key - The key of the Animation that was added to the global Animation Manager.\n * @param {Phaser.Animations.Animation} animation - An instance of the newly created Animation.\n */\nmodule.exports = 'add';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Animation Complete Event.\n * \n * This event is dispatched by an Animation instance when it completes, i.e. finishes playing or is manually stopped.\n * \n * Be careful with the volume of events this could generate. If a group of Sprites all complete the same\n * animation at the same time, this event will invoke its handler for each one of them.\n *\n * @event Phaser.Animations.Events#ANIMATION_COMPLETE\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed.\n */\nmodule.exports = 'complete';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Animation Repeat Event.\n * \n * This event is dispatched when a currently playing animation repeats.\n * \n * The event is dispatched directly from the Animation object itself. Which means that listeners\n * bound to this event will be invoked every time the Animation repeats, for every Game Object that may have it.\n *\n * @event Phaser.Animations.Events#ANIMATION_REPEAT\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that repeated.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation was on when it repeated.\n */\nmodule.exports = 'repeat';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Animation Restart Event.\n * \n * This event is dispatched by an Animation instance when it restarts.\n * \n * Be careful with the volume of events this could generate. If a group of Sprites all restart the same\n * animation at the same time, this event will invoke its handler for each one of them.\n *\n * @event Phaser.Animations.Events#ANIMATION_RESTART\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that restarted playing.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing.\n */\nmodule.exports = 'restart';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Animation Start Event.\n * \n * This event is dispatched by an Animation instance when it starts playing.\n * \n * Be careful with the volume of events this could generate. If a group of Sprites all play the same\n * animation at the same time, this event will invoke its handler for each one of them.\n *\n * @event Phaser.Animations.Events#ANIMATION_START\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that started playing.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing.\n */\nmodule.exports = 'start';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Pause All Animations Event.\n * \n * This event is dispatched when the global Animation Manager is told to pause.\n * \n * When this happens all current animations will stop updating, although it doesn't necessarily mean\n * that the game has paused as well.\n *\n * @event Phaser.Animations.Events#PAUSE_ALL\n * @since 3.0.0\n */\nmodule.exports = 'pauseall';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Remove Animation Event.\n * \n * This event is dispatched when an animation is removed from the global Animation Manager.\n *\n * @event Phaser.Animations.Events#REMOVE_ANIMATION\n * @since 3.0.0\n * \n * @param {string} key - The key of the Animation that was removed from the global Animation Manager.\n * @param {Phaser.Animations.Animation} animation - An instance of the removed Animation.\n */\nmodule.exports = 'remove';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Resume All Animations Event.\n * \n * This event is dispatched when the global Animation Manager resumes, having been previously paused.\n * \n * When this happens all current animations will continue updating again.\n *\n * @event Phaser.Animations.Events#RESUME_ALL\n * @since 3.0.0\n */\nmodule.exports = 'resumeall';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Complete Event.\n * \n * This event is dispatched by a Sprite when an animation finishes playing on it.\n * \n * Listen for it on the Sprite using `sprite.on('animationcomplete', listener)`\n * \n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_COMPLETE` event.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_COMPLETE\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed.\n */\nmodule.exports = 'animationcomplete';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Key Complete Event.\n * \n * This event is dispatched by a Sprite when a specific animation finishes playing on it.\n * \n * Listen for it on the Sprite using `sprite.on('animationcomplete-key', listener)` where `key` is the key of\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationcomplete-explode`.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_COMPLETE\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed.\n */\nmodule.exports = 'animationcomplete-';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Key Repeat Event.\n * \n * This event is dispatched by a Sprite when a specific animation repeats playing on it.\n * \n * Listen for it on the Sprite using `sprite.on('animationrepeat-key', listener)` where `key` is the key of\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrepeat-explode`.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\n * @param {integer} repeatCount - The number of times the Animation has repeated so far.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing.\n */\nmodule.exports = 'animationrepeat-';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Key Restart Event.\n * \n * This event is dispatched by a Sprite when a specific animation restarts playing on it.\n * \n * Listen for it on the Sprite using `sprite.on('animationrestart-key', listener)` where `key` is the key of\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrestart-explode`.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing.\n */\nmodule.exports = 'animationrestart-';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Key Start Event.\n * \n * This event is dispatched by a Sprite when a specific animation starts playing on it.\n * \n * Listen for it on the Sprite using `sprite.on('animationstart-key', listener)` where `key` is the key of\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationstart-explode`.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing.\n */\nmodule.exports = 'animationstart-';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Key Update Event.\n * \n * This event is dispatched by a Sprite when a specific animation playing on it updates. This happens when the animation changes frame,\n * based on the animation frame rate and other factors like `timeScale` and `delay`.\n * \n * Listen for it on the Sprite using `sprite.on('animationupdate-key', listener)` where `key` is the key of\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationupdate-explode`.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated.\n */\nmodule.exports = 'animationupdate-';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Repeat Event.\n * \n * This event is dispatched by a Sprite when an animation repeats playing on it.\n * \n * Listen for it on the Sprite using `sprite.on('animationrepeat', listener)`\n * \n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_REPEAT` event.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_REPEAT\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\n * @param {integer} repeatCount - The number of times the Animation has repeated so far.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing.\n */\nmodule.exports = 'animationrepeat';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Restart Event.\n * \n * This event is dispatched by a Sprite when an animation restarts playing on it.\n * \n * Listen for it on the Sprite using `sprite.on('animationrestart', listener)`\n * \n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_RESTART` event.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_RESTART\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing.\n */\nmodule.exports = 'animationrestart';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Start Event.\n * \n * This event is dispatched by a Sprite when an animation starts playing on it.\n * \n * Listen for it on the Sprite using `sprite.on('animationstart', listener)`\n * \n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_START` event.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_START\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing.\n */\nmodule.exports = 'animationstart';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Update Event.\n * \n * This event is dispatched by a Sprite when an animation playing on it updates. This happens when the animation changes frame,\n * based on the animation frame rate and other factors like `timeScale` and `delay`.\n * \n * Listen for it on the Sprite using `sprite.on('animationupdate', listener)`\n * \n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_UPDATE` event.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated.\n */\nmodule.exports = 'animationupdate';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Animations.Events\n */\n\nmodule.exports = {\n\n ADD_ANIMATION: require('./ADD_ANIMATION_EVENT'),\n ANIMATION_COMPLETE: require('./ANIMATION_COMPLETE_EVENT'),\n ANIMATION_REPEAT: require('./ANIMATION_REPEAT_EVENT'),\n ANIMATION_RESTART: require('./ANIMATION_RESTART_EVENT'),\n ANIMATION_START: require('./ANIMATION_START_EVENT'),\n PAUSE_ALL: require('./PAUSE_ALL_EVENT'),\n REMOVE_ANIMATION: require('./REMOVE_ANIMATION_EVENT'),\n RESUME_ALL: require('./RESUME_ALL_EVENT'),\n SPRITE_ANIMATION_COMPLETE: require('./SPRITE_ANIMATION_COMPLETE_EVENT'),\n SPRITE_ANIMATION_KEY_COMPLETE: require('./SPRITE_ANIMATION_KEY_COMPLETE_EVENT'),\n SPRITE_ANIMATION_KEY_REPEAT: require('./SPRITE_ANIMATION_KEY_REPEAT_EVENT'),\n SPRITE_ANIMATION_KEY_RESTART: require('./SPRITE_ANIMATION_KEY_RESTART_EVENT'),\n SPRITE_ANIMATION_KEY_START: require('./SPRITE_ANIMATION_KEY_START_EVENT'),\n SPRITE_ANIMATION_KEY_UPDATE: require('./SPRITE_ANIMATION_KEY_UPDATE_EVENT'),\n SPRITE_ANIMATION_REPEAT: require('./SPRITE_ANIMATION_REPEAT_EVENT'),\n SPRITE_ANIMATION_RESTART: require('./SPRITE_ANIMATION_RESTART_EVENT'),\n SPRITE_ANIMATION_START: require('./SPRITE_ANIMATION_START_EVENT'),\n SPRITE_ANIMATION_UPDATE: require('./SPRITE_ANIMATION_UPDATE_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Blur Event.\n * \n * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded\n * enters a blurred state. The blur event is raised when the window loses focus. This can happen if a user swaps\n * tab, or if they simply remove focus from the browser to another app.\n *\n * @event Phaser.Core.Events#BLUR\n * @since 3.0.0\n */\nmodule.exports = 'blur';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Boot Event.\n * \n * This event is dispatched when the Phaser Game instance has finished booting, but before it is ready to start running.\n * The global systems use this event to know when to set themselves up, dispatching their own `ready` events as required.\n *\n * @event Phaser.Core.Events#BOOT\n * @since 3.0.0\n */\nmodule.exports = 'boot';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Context Lost Event.\n * \n * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Lost event from the browser.\n * \n * The partner event is `CONTEXT_RESTORED`.\n *\n * @event Phaser.Core.Events#CONTEXT_LOST\n * @since 3.19.0\n */\nmodule.exports = 'contextlost';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Context Restored Event.\n * \n * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Restored event from the browser.\n * \n * The partner event is `CONTEXT_LOST`.\n *\n * @event Phaser.Core.Events#CONTEXT_RESTORED\n * @since 3.19.0\n */\nmodule.exports = 'contextrestored';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Destroy Event.\n * \n * This event is dispatched when the game instance has been told to destroy itself.\n * Lots of internal systems listen to this event in order to clear themselves out.\n * Custom plugins and game code should also do the same.\n *\n * @event Phaser.Core.Events#DESTROY\n * @since 3.0.0\n */\nmodule.exports = 'destroy';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Focus Event.\n * \n * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded\n * enters a focused state. The focus event is raised when the window re-gains focus, having previously lost it.\n *\n * @event Phaser.Core.Events#FOCUS\n * @since 3.0.0\n */\nmodule.exports = 'focus';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Hidden Event.\n * \n * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded\n * enters a hidden state. Only browsers that support the Visibility API will cause this event to be emitted.\n * \n * In most modern browsers, when the document enters a hidden state, the Request Animation Frame and setTimeout, which\n * control the main game loop, will automatically pause. There is no way to stop this from happening. It is something\n * your game should account for in its own code, should the pause be an issue (i.e. for multiplayer games)\n *\n * @event Phaser.Core.Events#HIDDEN\n * @since 3.0.0\n */\nmodule.exports = 'hidden';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Pause Event.\n * \n * This event is dispatched when the Game loop enters a paused state, usually as a result of the Visibility Handler.\n *\n * @event Phaser.Core.Events#PAUSE\n * @since 3.0.0\n */\nmodule.exports = 'pause';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Post-Render Event.\n * \n * This event is dispatched right at the end of the render process.\n * \n * Every Scene will have rendered and been drawn to the canvas by the time this event is fired.\n * Use it for any last minute post-processing before the next game step begins.\n *\n * @event Phaser.Core.Events#POST_RENDER\n * @since 3.0.0\n * \n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - A reference to the current renderer being used by the Game instance.\n */\nmodule.exports = 'postrender';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Post-Step Event.\n * \n * This event is dispatched after the Scene Manager has updated.\n * Hook into it from plugins or systems that need to do things before the render starts.\n *\n * @event Phaser.Core.Events#POST_STEP\n * @since 3.0.0\n * \n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\n */\nmodule.exports = 'poststep';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Pre-Render Event.\n * \n * This event is dispatched immediately before any of the Scenes have started to render.\n * \n * The renderer will already have been initialized this frame, clearing itself and preparing to receive the Scenes for rendering, but it won't have actually drawn anything yet.\n *\n * @event Phaser.Core.Events#PRE_RENDER\n * @since 3.0.0\n * \n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - A reference to the current renderer being used by the Game instance.\n */\nmodule.exports = 'prerender';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Pre-Step Event.\n * \n * This event is dispatched before the main Game Step starts. By this point in the game cycle none of the Scene updates have yet happened.\n * Hook into it from plugins or systems that need to update before the Scene Manager does.\n *\n * @event Phaser.Core.Events#PRE_STEP\n * @since 3.0.0\n * \n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\n */\nmodule.exports = 'prestep';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Ready Event.\n * \n * This event is dispatched when the Phaser Game instance has finished booting, the Texture Manager is fully ready,\n * and all local systems are now able to start.\n *\n * @event Phaser.Core.Events#READY\n * @since 3.0.0\n */\nmodule.exports = 'ready';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Resume Event.\n * \n * This event is dispatched when the game loop leaves a paused state and resumes running.\n *\n * @event Phaser.Core.Events#RESUME\n * @since 3.0.0\n */\nmodule.exports = 'resume';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Step Event.\n * \n * This event is dispatched after the Game Pre-Step and before the Scene Manager steps.\n * Hook into it from plugins or systems that need to update before the Scene Manager does, but after the core Systems have.\n *\n * @event Phaser.Core.Events#STEP\n * @since 3.0.0\n * \n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\n */\nmodule.exports = 'step';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Visible Event.\n * \n * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded\n * enters a visible state, previously having been hidden.\n * \n * Only browsers that support the Visibility API will cause this event to be emitted.\n *\n * @event Phaser.Core.Events#VISIBLE\n * @since 3.0.0\n */\nmodule.exports = 'visible';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Core.Events\n */\n\nmodule.exports = {\n\n BLUR: require('./BLUR_EVENT'),\n BOOT: require('./BOOT_EVENT'),\n CONTEXT_LOST: require('./CONTEXT_LOST_EVENT'),\n CONTEXT_RESTORED: require('./CONTEXT_RESTORED_EVENT'),\n DESTROY: require('./DESTROY_EVENT'),\n FOCUS: require('./FOCUS_EVENT'),\n HIDDEN: require('./HIDDEN_EVENT'),\n PAUSE: require('./PAUSE_EVENT'),\n POST_RENDER: require('./POST_RENDER_EVENT'),\n POST_STEP: require('./POST_STEP_EVENT'),\n PRE_RENDER: require('./PRE_RENDER_EVENT'),\n PRE_STEP: require('./PRE_STEP_EVENT'),\n READY: require('./READY_EVENT'),\n RESUME: require('./RESUME_EVENT'),\n STEP: require('./STEP_EVENT'),\n VISIBLE: require('./VISIBLE_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar Events = require('./events');\n\n/**\n * @callback DataEachCallback\n *\n * @param {*} parent - The parent object of the DataManager.\n * @param {string} key - The key of the value.\n * @param {*} value - The value.\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\n */\n\n/**\n * @classdesc\n * The Data Manager Component features a means to store pieces of data specific to a Game Object, System or Plugin.\n * You can then search, query it, and retrieve the data. The parent must either extend EventEmitter,\n * or have a property called `events` that is an instance of it.\n *\n * @class DataManager\n * @memberof Phaser.Data\n * @constructor\n * @since 3.0.0\n *\n * @param {object} parent - The object that this DataManager belongs to.\n * @param {Phaser.Events.EventEmitter} [eventEmitter] - The DataManager's event emitter.\n */\nvar DataManager = new Class({\n\n initialize:\n\n function DataManager (parent, eventEmitter)\n {\n /**\n * The object that this DataManager belongs to.\n *\n * @name Phaser.Data.DataManager#parent\n * @type {*}\n * @since 3.0.0\n */\n this.parent = parent;\n\n /**\n * The DataManager's event emitter.\n *\n * @name Phaser.Data.DataManager#events\n * @type {Phaser.Events.EventEmitter}\n * @since 3.0.0\n */\n this.events = eventEmitter;\n\n if (!eventEmitter)\n {\n this.events = (parent.events) ? parent.events : parent;\n }\n\n /**\n * The data list.\n *\n * @name Phaser.Data.DataManager#list\n * @type {Object.}\n * @default {}\n * @since 3.0.0\n */\n this.list = {};\n\n /**\n * The public values list. You can use this to access anything you have stored\n * in this Data Manager. For example, if you set a value called `gold` you can\n * access it via:\n *\n * ```javascript\n * this.data.values.gold;\n * ```\n *\n * You can also modify it directly:\n * \n * ```javascript\n * this.data.values.gold += 1000;\n * ```\n *\n * Doing so will emit a `setdata` event from the parent of this Data Manager.\n * \n * Do not modify this object directly. Adding properties directly to this object will not\n * emit any events. Always use `DataManager.set` to create new items the first time around.\n *\n * @name Phaser.Data.DataManager#values\n * @type {Object.}\n * @default {}\n * @since 3.10.0\n */\n this.values = {};\n\n /**\n * Whether setting data is frozen for this DataManager.\n *\n * @name Phaser.Data.DataManager#_frozen\n * @type {boolean}\n * @private\n * @default false\n * @since 3.0.0\n */\n this._frozen = false;\n\n if (!parent.hasOwnProperty('sys') && this.events)\n {\n this.events.once('destroy', this.destroy, this);\n }\n },\n\n /**\n * Retrieves the value for the given key, or undefined if it doesn't exist.\n *\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\n * \n * ```javascript\n * this.data.get('gold');\n * ```\n *\n * Or access the value directly:\n * \n * ```javascript\n * this.data.values.gold;\n * ```\n *\n * You can also pass in an array of keys, in which case an array of values will be returned:\n * \n * ```javascript\n * this.data.get([ 'gold', 'armor', 'health' ]);\n * ```\n *\n * This approach is useful for destructuring arrays in ES6.\n *\n * @method Phaser.Data.DataManager#get\n * @since 3.0.0\n *\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\n *\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\n */\n get: function (key)\n {\n var list = this.list;\n\n if (Array.isArray(key))\n {\n var output = [];\n\n for (var i = 0; i < key.length; i++)\n {\n output.push(list[key[i]]);\n }\n\n return output;\n }\n else\n {\n return list[key];\n }\n },\n\n /**\n * Retrieves all data values in a new object.\n *\n * @method Phaser.Data.DataManager#getAll\n * @since 3.0.0\n *\n * @return {Object.} All data values.\n */\n getAll: function ()\n {\n var results = {};\n\n for (var key in this.list)\n {\n if (this.list.hasOwnProperty(key))\n {\n results[key] = this.list[key];\n }\n }\n\n return results;\n },\n\n /**\n * Queries the DataManager for the values of keys matching the given regular expression.\n *\n * @method Phaser.Data.DataManager#query\n * @since 3.0.0\n *\n * @param {RegExp} search - A regular expression object. If a non-RegExp object obj is passed, it is implicitly converted to a RegExp by using new RegExp(obj).\n *\n * @return {Object.} The values of the keys matching the search string.\n */\n query: function (search)\n {\n var results = {};\n\n for (var key in this.list)\n {\n if (this.list.hasOwnProperty(key) && key.match(search))\n {\n results[key] = this.list[key];\n }\n }\n\n return results;\n },\n\n /**\n * Sets a value for the given key. If the key doesn't already exist in the Data Manager then it is created.\n * \n * ```javascript\n * data.set('name', 'Red Gem Stone');\n * ```\n *\n * You can also pass in an object of key value pairs as the first argument:\n *\n * ```javascript\n * data.set({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\n * ```\n *\n * To get a value back again you can call `get`:\n * \n * ```javascript\n * data.get('gold');\n * ```\n * \n * Or you can access the value directly via the `values` property, where it works like any other variable:\n * \n * ```javascript\n * data.values.gold += 50;\n * ```\n *\n * When the value is first set, a `setdata` event is emitted.\n *\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\n *\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\n *\n * @method Phaser.Data.DataManager#set\n * @fires Phaser.Data.Events#SET_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\n * @since 3.0.0\n *\n * @param {(string|object)} key - The key to set the value for. Or an object or key value pairs. If an object the `data` argument is ignored.\n * @param {*} data - The value to set for the given key. If an object is provided as the key this argument is ignored.\n *\n * @return {this} This DataManager object.\n */\n set: function (key, data)\n {\n if (this._frozen)\n {\n return this;\n }\n\n if (typeof key === 'string')\n {\n return this.setValue(key, data);\n }\n else\n {\n for (var entry in key)\n {\n this.setValue(entry, key[entry]);\n }\n }\n\n return this;\n },\n\n /**\n * Increase a value for the given key. If the key doesn't already exist in the Data Manager then it is increased from 0.\n * \n * When the value is first set, a `setdata` event is emitted.\n * \n * @method Phaser.Data.DataManager#inc\n * @fires Phaser.Data.Events#SET_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\n * @since 3.23.0\n *\n * @param {(string|object)} key - The key to increase the value for.\n * @param {*} [data] - The value to increase for the given key.\n *\n * @return {Phaser.Data.DataManager} This DataManager object.\n */\n inc: function (key, data)\n {\n if (this._frozen)\n {\n return this;\n }\n\n if (data === undefined)\n {\n data = 1;\n }\n\n var value = this.get(key);\n if (value === undefined)\n {\n value = 0;\n }\n\n this.set(key, (value + data));\n\n return this;\n },\n\n /**\n * Toggle a boolean value for the given key. If the key doesn't already exist in the Data Manager then it is toggled from false.\n * \n * When the value is first set, a `setdata` event is emitted.\n * \n * @method Phaser.Data.DataManager#toggle\n * @fires Phaser.Data.Events#SET_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\n * @since 3.23.0\n *\n * @param {(string|object)} key - The key to toggle the value for.\n *\n * @return {Phaser.Data.DataManager} This DataManager object.\n */\n toggle: function (key)\n {\n if (this._frozen)\n {\n return this;\n }\n\n this.set(key, !this.get(key));\n\n return this;\n },\n\n /**\n * Internal value setter, called automatically by the `set` method.\n *\n * @method Phaser.Data.DataManager#setValue\n * @fires Phaser.Data.Events#SET_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\n * @private\n * @since 3.10.0\n *\n * @param {string} key - The key to set the value for.\n * @param {*} data - The value to set.\n *\n * @return {this} This DataManager object.\n */\n setValue: function (key, data)\n {\n if (this._frozen)\n {\n return this;\n }\n\n if (this.has(key))\n {\n // Hit the key getter, which will in turn emit the events.\n this.values[key] = data;\n }\n else\n {\n var _this = this;\n var list = this.list;\n var events = this.events;\n var parent = this.parent;\n\n Object.defineProperty(this.values, key, {\n\n enumerable: true,\n \n configurable: true,\n\n get: function ()\n {\n return list[key];\n },\n\n set: function (value)\n {\n if (!_this._frozen)\n {\n var previousValue = list[key];\n list[key] = value;\n\n events.emit(Events.CHANGE_DATA, parent, key, value, previousValue);\n events.emit(Events.CHANGE_DATA_KEY + key, parent, value, previousValue);\n }\n }\n\n });\n\n list[key] = data;\n\n events.emit(Events.SET_DATA, parent, key, data);\n }\n\n return this;\n },\n\n /**\n * Passes all data entries to the given callback.\n *\n * @method Phaser.Data.DataManager#each\n * @since 3.0.0\n *\n * @param {DataEachCallback} callback - The function to call.\n * @param {*} [context] - Value to use as `this` when executing callback.\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\n *\n * @return {this} This DataManager object.\n */\n each: function (callback, context)\n {\n var args = [ this.parent, null, undefined ];\n\n for (var i = 1; i < arguments.length; i++)\n {\n args.push(arguments[i]);\n }\n\n for (var key in this.list)\n {\n args[1] = key;\n args[2] = this.list[key];\n\n callback.apply(context, args);\n }\n\n return this;\n },\n\n /**\n * Merge the given object of key value pairs into this DataManager.\n *\n * Any newly created values will emit a `setdata` event. Any updated values (see the `overwrite` argument)\n * will emit a `changedata` event.\n *\n * @method Phaser.Data.DataManager#merge\n * @fires Phaser.Data.Events#SET_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\n * @since 3.0.0\n *\n * @param {Object.} data - The data to merge.\n * @param {boolean} [overwrite=true] - Whether to overwrite existing data. Defaults to true.\n *\n * @return {this} This DataManager object.\n */\n merge: function (data, overwrite)\n {\n if (overwrite === undefined) { overwrite = true; }\n\n // Merge data from another component into this one\n for (var key in data)\n {\n if (data.hasOwnProperty(key) && (overwrite || (!overwrite && !this.has(key))))\n {\n this.setValue(key, data[key]);\n }\n }\n\n return this;\n },\n\n /**\n * Remove the value for the given key.\n *\n * If the key is found in this Data Manager it is removed from the internal lists and a\n * `removedata` event is emitted.\n * \n * You can also pass in an array of keys, in which case all keys in the array will be removed:\n * \n * ```javascript\n * this.data.remove([ 'gold', 'armor', 'health' ]);\n * ```\n *\n * @method Phaser.Data.DataManager#remove\n * @fires Phaser.Data.Events#REMOVE_DATA\n * @since 3.0.0\n *\n * @param {(string|string[])} key - The key to remove, or an array of keys to remove.\n *\n * @return {this} This DataManager object.\n */\n remove: function (key)\n {\n if (this._frozen)\n {\n return this;\n }\n\n if (Array.isArray(key))\n {\n for (var i = 0; i < key.length; i++)\n {\n this.removeValue(key[i]);\n }\n }\n else\n {\n return this.removeValue(key);\n }\n\n return this;\n },\n\n /**\n * Internal value remover, called automatically by the `remove` method.\n *\n * @method Phaser.Data.DataManager#removeValue\n * @private\n * @fires Phaser.Data.Events#REMOVE_DATA\n * @since 3.10.0\n *\n * @param {string} key - The key to set the value for.\n *\n * @return {this} This DataManager object.\n */\n removeValue: function (key)\n {\n if (this.has(key))\n {\n var data = this.list[key];\n\n delete this.list[key];\n delete this.values[key];\n\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\n }\n\n return this;\n },\n\n /**\n * Retrieves the data associated with the given 'key', deletes it from this Data Manager, then returns it.\n *\n * @method Phaser.Data.DataManager#pop\n * @fires Phaser.Data.Events#REMOVE_DATA\n * @since 3.0.0\n *\n * @param {string} key - The key of the value to retrieve and delete.\n *\n * @return {*} The value of the given key.\n */\n pop: function (key)\n {\n var data = undefined;\n\n if (!this._frozen && this.has(key))\n {\n data = this.list[key];\n\n delete this.list[key];\n delete this.values[key];\n\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\n }\n\n return data;\n },\n\n /**\n * Determines whether the given key is set in this Data Manager.\n * \n * Please note that the keys are case-sensitive and must be valid JavaScript Object property strings.\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\n *\n * @method Phaser.Data.DataManager#has\n * @since 3.0.0\n *\n * @param {string} key - The key to check.\n *\n * @return {boolean} Returns `true` if the key exists, otherwise `false`.\n */\n has: function (key)\n {\n return this.list.hasOwnProperty(key);\n },\n\n /**\n * Freeze or unfreeze this Data Manager. A frozen Data Manager will block all attempts\n * to create new values or update existing ones.\n *\n * @method Phaser.Data.DataManager#setFreeze\n * @since 3.0.0\n *\n * @param {boolean} value - Whether to freeze or unfreeze the Data Manager.\n *\n * @return {this} This DataManager object.\n */\n setFreeze: function (value)\n {\n this._frozen = value;\n\n return this;\n },\n\n /**\n * Delete all data in this Data Manager and unfreeze it.\n *\n * @method Phaser.Data.DataManager#reset\n * @since 3.0.0\n *\n * @return {this} This DataManager object.\n */\n reset: function ()\n {\n for (var key in this.list)\n {\n delete this.list[key];\n delete this.values[key];\n }\n\n this._frozen = false;\n\n return this;\n },\n\n /**\n * Destroy this data manager.\n *\n * @method Phaser.Data.DataManager#destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.reset();\n\n this.events.off(Events.CHANGE_DATA);\n this.events.off(Events.SET_DATA);\n this.events.off(Events.REMOVE_DATA);\n\n this.parent = null;\n },\n\n /**\n * Gets or sets the frozen state of this Data Manager.\n * A frozen Data Manager will block all attempts to create new values or update existing ones.\n *\n * @name Phaser.Data.DataManager#freeze\n * @type {boolean}\n * @since 3.0.0\n */\n freeze: {\n\n get: function ()\n {\n return this._frozen;\n },\n\n set: function (value)\n {\n this._frozen = (value) ? true : false;\n }\n\n },\n\n /**\n * Return the total number of entries in this Data Manager.\n *\n * @name Phaser.Data.DataManager#count\n * @type {integer}\n * @since 3.0.0\n */\n count: {\n\n get: function ()\n {\n var i = 0;\n\n for (var key in this.list)\n {\n if (this.list[key] !== undefined)\n {\n i++;\n }\n }\n\n return i;\n }\n\n }\n\n});\n\nmodule.exports = DataManager;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Change Data Event.\n * \n * This event is dispatched by a Data Manager when an item in the data store is changed.\n * \n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\n * a change data event from a Game Object you would use: `sprite.data.on('changedata', listener)`.\n * \n * This event is dispatched for all items that change in the Data Manager.\n * To listen for the change of a specific item, use the `CHANGE_DATA_KEY_EVENT` event.\n *\n * @event Phaser.Data.Events#CHANGE_DATA\n * @since 3.0.0\n * \n * @param {any} parent - A reference to the object that the Data Manager responsible for this event belongs to.\n * @param {string} key - The unique key of the data item within the Data Manager.\n * @param {any} value - The new value of the item in the Data Manager.\n * @param {any} previousValue - The previous value of the item in the Data Manager.\n */\nmodule.exports = 'changedata';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Change Data Key Event.\n * \n * This event is dispatched by a Data Manager when an item in the data store is changed.\n * \n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\n * the change of a specific data item from a Game Object you would use: `sprite.data.on('changedata-key', listener)`,\n * where `key` is the unique string key of the data item. For example, if you have a data item stored called `gold`\n * then you can listen for `sprite.data.on('changedata-gold')`.\n *\n * @event Phaser.Data.Events#CHANGE_DATA_KEY\n * @since 3.16.1\n * \n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\n * @param {any} value - The item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\n * @param {any} previousValue - The previous item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\n */\nmodule.exports = 'changedata-';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Remove Data Event.\n * \n * This event is dispatched by a Data Manager when an item is removed from it.\n * \n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\n * the removal of a data item on a Game Object you would use: `sprite.data.on('removedata', listener)`.\n *\n * @event Phaser.Data.Events#REMOVE_DATA\n * @since 3.0.0\n * \n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\n * @param {string} key - The unique key of the data item within the Data Manager.\n * @param {any} data - The item that was removed from the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\n */\nmodule.exports = 'removedata';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Set Data Event.\n * \n * This event is dispatched by a Data Manager when a new item is added to the data store.\n * \n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\n * the addition of a new data item on a Game Object you would use: `sprite.data.on('setdata', listener)`.\n *\n * @event Phaser.Data.Events#SET_DATA\n * @since 3.0.0\n * \n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\n * @param {string} key - The unique key of the data item within the Data Manager.\n * @param {any} data - The item that was added to the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\n */\nmodule.exports = 'setdata';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Data.Events\n */\n\nmodule.exports = {\n\n CHANGE_DATA: require('./CHANGE_DATA_EVENT'),\n CHANGE_DATA_KEY: require('./CHANGE_DATA_KEY_EVENT'),\n REMOVE_DATA: require('./REMOVE_DATA_EVENT'),\n SET_DATA: require('./SET_DATA_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Given a hex color value, such as 0xff00ff (for purple), it will return a\n * numeric representation of it (i.e. 16711935) for use in WebGL tinting.\n *\n * @function Phaser.Display.Color.GetColorFromValue\n * @since 3.50.0\n *\n * @param {number} red - The hex color value, such as 0xff0000.\n *\n * @return {number} The combined color value.\n */\nvar GetColorFromValue = function (value)\n{\n return (value >> 16) + (value & 0xff00) + ((value & 0xff) << 16);\n};\n\nmodule.exports = GetColorFromValue;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar GameEvents = require('../../core/events');\n\n/**\n * @classdesc\n * A Bitmap Mask combines the alpha (opacity) of a masked pixel with the alpha of another pixel.\n * Unlike the Geometry Mask, which is a clipping path, a Bitmap Mask behaves like an alpha mask,\n * not a clipping path. It is only available when using the WebGL Renderer.\n *\n * A Bitmap Mask can use any Game Object to determine the alpha of each pixel of the masked Game Object(s).\n * For any given point of a masked Game Object's texture, the pixel's alpha will be multiplied by the alpha\n * of the pixel at the same position in the Bitmap Mask's Game Object. The color of the pixel from the\n * Bitmap Mask doesn't matter.\n *\n * For example, if a pure blue pixel with an alpha of 0.95 is masked with a pure red pixel with an\n * alpha of 0.5, the resulting pixel will be pure blue with an alpha of 0.475. Naturally, this means\n * that a pixel in the mask with an alpha of 0 will hide the corresponding pixel in all masked Game Objects\n * A pixel with an alpha of 1 in the masked Game Object will receive the same alpha as the\n * corresponding pixel in the mask.\n *\n * The Bitmap Mask's location matches the location of its Game Object, not the location of the\n * masked objects. Moving or transforming the underlying Game Object will change the mask\n * (and affect the visibility of any masked objects), whereas moving or transforming a masked object\n * will not affect the mask.\n *\n * The Bitmap Mask will not render its Game Object by itself. If the Game Object is not in a\n * Scene's display list, it will only be used for the mask and its full texture will not be directly\n * visible. Adding the underlying Game Object to a Scene will not cause any problems - it will\n * render as a normal Game Object and will also serve as a mask.\n *\n * @class BitmapMask\n * @memberof Phaser.Display.Masks\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Scene} scene - The Scene which this Bitmap Mask will be used in.\n * @param {Phaser.GameObjects.GameObject} renderable - A renderable Game Object that uses a texture, such as a Sprite.\n */\nvar BitmapMask = new Class({\n\n initialize:\n\n function BitmapMask (scene, renderable)\n {\n var renderer = scene.sys.game.renderer;\n\n /**\n * A reference to either the Canvas or WebGL Renderer that this Mask is using.\n *\n * @name Phaser.Display.Masks.BitmapMask#renderer\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\n * @since 3.11.0\n */\n this.renderer = renderer;\n\n /**\n * A renderable Game Object that uses a texture, such as a Sprite.\n *\n * @name Phaser.Display.Masks.BitmapMask#bitmapMask\n * @type {Phaser.GameObjects.GameObject}\n * @since 3.0.0\n */\n this.bitmapMask = renderable;\n\n /**\n * The texture used for the mask's framebuffer.\n *\n * @name Phaser.Display.Masks.BitmapMask#maskTexture\n * @type {WebGLTexture}\n * @default null\n * @since 3.0.0\n */\n this.maskTexture = null;\n\n /**\n * The texture used for the main framebuffer.\n *\n * @name Phaser.Display.Masks.BitmapMask#mainTexture\n * @type {WebGLTexture}\n * @default null\n * @since 3.0.0\n */\n this.mainTexture = null;\n\n /**\n * Whether the Bitmap Mask is dirty and needs to be updated.\n *\n * @name Phaser.Display.Masks.BitmapMask#dirty\n * @type {boolean}\n * @default true\n * @since 3.0.0\n */\n this.dirty = true;\n\n /**\n * The framebuffer to which a masked Game Object is rendered.\n *\n * @name Phaser.Display.Masks.BitmapMask#mainFramebuffer\n * @type {WebGLFramebuffer}\n * @since 3.0.0\n */\n this.mainFramebuffer = null;\n\n /**\n * The framebuffer to which the Bitmap Mask's masking Game Object is rendered.\n *\n * @name Phaser.Display.Masks.BitmapMask#maskFramebuffer\n * @type {WebGLFramebuffer}\n * @since 3.0.0\n */\n this.maskFramebuffer = null;\n\n /**\n * The previous framebuffer set in the renderer before this one was enabled.\n *\n * @name Phaser.Display.Masks.BitmapMask#prevFramebuffer\n * @type {WebGLFramebuffer}\n * @since 3.17.0\n */\n this.prevFramebuffer = null;\n\n /**\n * Whether to invert the masks alpha.\n *\n * If `true`, the alpha of the masking pixel will be inverted before it's multiplied with the masked pixel. Essentially, this means that a masked area will be visible only if the corresponding area in the mask is invisible.\n *\n * @name Phaser.Display.Masks.BitmapMask#invertAlpha\n * @type {boolean}\n * @since 3.1.2\n */\n this.invertAlpha = false;\n\n /**\n * Is this mask a stencil mask?\n *\n * @name Phaser.Display.Masks.BitmapMask#isStencil\n * @type {boolean}\n * @readonly\n * @since 3.17.0\n */\n this.isStencil = false;\n\n if (renderer && renderer.gl)\n {\n var width = renderer.width;\n var height = renderer.height;\n var pot = ((width & (width - 1)) === 0 && (height & (height - 1)) === 0);\n var gl = renderer.gl;\n var wrap = pot ? gl.REPEAT : gl.CLAMP_TO_EDGE;\n var filter = gl.LINEAR;\n\n this.mainTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\n this.maskTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\n this.mainFramebuffer = renderer.createFramebuffer(width, height, this.mainTexture, true);\n this.maskFramebuffer = renderer.createFramebuffer(width, height, this.maskTexture, true);\n\n scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, function (renderer)\n {\n var width = renderer.width;\n var height = renderer.height;\n var pot = ((width & (width - 1)) === 0 && (height & (height - 1)) === 0);\n var gl = renderer.gl;\n var wrap = pot ? gl.REPEAT : gl.CLAMP_TO_EDGE;\n var filter = gl.LINEAR;\n\n this.mainTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\n this.maskTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\n this.mainFramebuffer = renderer.createFramebuffer(width, height, this.mainTexture, true);\n this.maskFramebuffer = renderer.createFramebuffer(width, height, this.maskTexture, true);\n\n }, this);\n }\n },\n\n /**\n * Sets a new masking Game Object for the Bitmap Mask.\n *\n * @method Phaser.Display.Masks.BitmapMask#setBitmap\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} renderable - A renderable Game Object that uses a texture, such as a Sprite.\n */\n setBitmap: function (renderable)\n {\n this.bitmapMask = renderable;\n },\n\n /**\n * Prepares the WebGL Renderer to render a Game Object with this mask applied.\n *\n * This renders the masking Game Object to the mask framebuffer and switches to the main framebuffer so that the masked Game Object will be rendered to it instead of being rendered directly to the frame.\n *\n * @method Phaser.Display.Masks.BitmapMask#preRenderWebGL\n * @since 3.0.0\n *\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to prepare.\n * @param {Phaser.GameObjects.GameObject} maskedObject - The masked Game Object which will be drawn.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\n */\n preRenderWebGL: function (renderer, maskedObject, camera)\n {\n renderer.pipelines.BitmapMaskPipeline.beginMask(this, maskedObject, camera);\n },\n\n /**\n * Finalizes rendering of a masked Game Object.\n *\n * This resets the previously bound framebuffer and switches the WebGL Renderer to the Bitmap Mask Pipeline, which uses a special fragment shader to apply the masking effect.\n *\n * @method Phaser.Display.Masks.BitmapMask#postRenderWebGL\n * @since 3.0.0\n *\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to clean up.\n */\n postRenderWebGL: function (renderer, camera)\n {\n renderer.pipelines.BitmapMaskPipeline.endMask(this, camera);\n },\n\n /**\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\n *\n * @method Phaser.Display.Masks.BitmapMask#preRenderCanvas\n * @since 3.0.0\n *\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\n * @param {Phaser.GameObjects.GameObject} mask - The masked Game Object which would be rendered.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\n */\n preRenderCanvas: function ()\n {\n // NOOP\n },\n\n /**\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\n *\n * @method Phaser.Display.Masks.BitmapMask#postRenderCanvas\n * @since 3.0.0\n *\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\n */\n postRenderCanvas: function ()\n {\n // NOOP\n },\n\n /**\n * Destroys this BitmapMask and nulls any references it holds.\n * \n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\n *\n * @method Phaser.Display.Masks.BitmapMask#destroy\n * @since 3.7.0\n */\n destroy: function ()\n {\n this.bitmapMask = null;\n\n var renderer = this.renderer;\n\n if (renderer && renderer.gl)\n {\n renderer.deleteTexture(this.mainTexture);\n renderer.deleteTexture(this.maskTexture);\n renderer.deleteFramebuffer(this.mainFramebuffer);\n renderer.deleteFramebuffer(this.maskFramebuffer);\n }\n\n this.mainTexture = null;\n this.maskTexture = null;\n this.mainFramebuffer = null;\n this.maskFramebuffer = null;\n this.prevFramebuffer = null;\n this.renderer = null;\n }\n\n});\n\nmodule.exports = BitmapMask;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\n\n/**\n * @classdesc\n * A Geometry Mask can be applied to a Game Object to hide any pixels of it which don't intersect\n * a visible pixel from the geometry mask. The mask is essentially a clipping path which can only\n * make a masked pixel fully visible or fully invisible without changing its alpha (opacity).\n *\n * A Geometry Mask uses a Graphics Game Object to determine which pixels of the masked Game Object(s)\n * should be clipped. For any given point of a masked Game Object's texture, the pixel will only be displayed\n * if the Graphics Game Object of the Geometry Mask has a visible pixel at the same position. The color and\n * alpha of the pixel from the Geometry Mask do not matter.\n *\n * The Geometry Mask's location matches the location of its Graphics object, not the location of the masked objects.\n * Moving or transforming the underlying Graphics object will change the mask (and affect the visibility\n * of any masked objects), whereas moving or transforming a masked object will not affect the mask.\n * You can think of the Geometry Mask (or rather, of its Graphics object) as an invisible curtain placed\n * in front of all masked objects which has its own visual properties and, naturally, respects the camera's\n * visual properties, but isn't affected by and doesn't follow the masked objects by itself.\n *\n * @class GeometryMask\n * @memberof Phaser.Display.Masks\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Scene} scene - This parameter is not used.\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics Game Object to use for the Geometry Mask. Doesn't have to be in the Display List.\n */\nvar GeometryMask = new Class({\n\n initialize:\n\n function GeometryMask (scene, graphicsGeometry)\n {\n /**\n * The Graphics object which describes the Geometry Mask.\n *\n * @name Phaser.Display.Masks.GeometryMask#geometryMask\n * @type {Phaser.GameObjects.Graphics}\n * @since 3.0.0\n */\n this.geometryMask = graphicsGeometry;\n\n /**\n * Similar to the BitmapMasks invertAlpha setting this to true will then hide all pixels\n * drawn to the Geometry Mask.\n *\n * @name Phaser.Display.Masks.GeometryMask#invertAlpha\n * @type {boolean}\n * @since 3.16.0\n */\n this.invertAlpha = false;\n\n /**\n * Is this mask a stencil mask?\n *\n * @name Phaser.Display.Masks.GeometryMask#isStencil\n * @type {boolean}\n * @readonly\n * @since 3.17.0\n */\n this.isStencil = true;\n\n /**\n * The current stencil level.\n *\n * @name Phaser.Display.Masks.GeometryMask#level\n * @type {boolean}\n * @private\n * @since 3.17.0\n */\n this.level = 0;\n },\n\n /**\n * Sets a new Graphics object for the Geometry Mask.\n *\n * @method Phaser.Display.Masks.GeometryMask#setShape\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics object which will be used for the Geometry Mask.\n * \n * @return {this} This Geometry Mask\n */\n setShape: function (graphicsGeometry)\n {\n this.geometryMask = graphicsGeometry;\n\n return this;\n },\n\n /**\n * Sets the `invertAlpha` property of this Geometry Mask.\n * Inverting the alpha essentially flips the way the mask works.\n *\n * @method Phaser.Display.Masks.GeometryMask#setInvertAlpha\n * @since 3.17.0\n *\n * @param {boolean} [value=true] - Invert the alpha of this mask?\n * \n * @return {this} This Geometry Mask\n */\n setInvertAlpha: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.invertAlpha = value;\n\n return this;\n },\n\n /**\n * Renders the Geometry Mask's underlying Graphics object to the OpenGL stencil buffer and enables the stencil test, which clips rendered pixels according to the mask.\n *\n * @method Phaser.Display.Masks.GeometryMask#preRenderWebGL\n * @since 3.0.0\n *\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\n * @param {Phaser.GameObjects.GameObject} child - The Game Object being rendered.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\n */\n preRenderWebGL: function (renderer, child, camera)\n {\n var gl = renderer.gl;\n\n // Force flushing before drawing to stencil buffer\n renderer.flush();\n\n if (renderer.maskStack.length === 0)\n {\n gl.enable(gl.STENCIL_TEST);\n gl.clear(gl.STENCIL_BUFFER_BIT);\n\n renderer.maskCount = 0;\n }\n\n if (renderer.currentCameraMask.mask !== this)\n {\n renderer.currentMask.mask = this;\n }\n\n renderer.maskStack.push({ mask: this, camera: camera });\n\n this.applyStencil(renderer, camera, true);\n\n renderer.maskCount++;\n },\n\n /**\n * Applies the current stencil mask to the renderer.\n *\n * @method Phaser.Display.Masks.GeometryMask#applyStencil\n * @since 3.17.0\n *\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\n * @param {boolean} inc - Is this an INCR stencil or a DECR stencil?\n */\n applyStencil: function (renderer, camera, inc)\n {\n var gl = renderer.gl;\n var geometryMask = this.geometryMask;\n var level = renderer.maskCount;\n\n gl.colorMask(false, false, false, false);\n\n if (inc)\n {\n gl.stencilFunc(gl.EQUAL, level, 0xFF);\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.INCR);\n }\n else\n {\n gl.stencilFunc(gl.EQUAL, level + 1, 0xFF);\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.DECR);\n }\n\n // Write stencil buffer\n geometryMask.renderWebGL(renderer, geometryMask, 0, camera);\n\n renderer.flush();\n\n gl.colorMask(true, true, true, true);\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP);\n\n if (inc)\n {\n if (this.invertAlpha)\n {\n gl.stencilFunc(gl.NOTEQUAL, level + 1, 0xFF);\n }\n else\n {\n gl.stencilFunc(gl.EQUAL, level + 1, 0xFF);\n }\n }\n else if (this.invertAlpha)\n {\n gl.stencilFunc(gl.NOTEQUAL, level, 0xFF);\n }\n else\n {\n gl.stencilFunc(gl.EQUAL, level, 0xFF);\n }\n },\n\n /**\n * Flushes all rendered pixels and disables the stencil test of a WebGL context, thus disabling the mask for it.\n *\n * @method Phaser.Display.Masks.GeometryMask#postRenderWebGL\n * @since 3.0.0\n *\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw flush.\n */\n postRenderWebGL: function (renderer)\n {\n var gl = renderer.gl;\n\n renderer.maskStack.pop();\n\n renderer.maskCount--;\n\n if (renderer.maskStack.length === 0)\n {\n // If this is the only mask in the stack, flush and disable\n renderer.flush();\n\n renderer.currentMask.mask = null;\n\n gl.disable(gl.STENCIL_TEST);\n }\n else\n {\n // Force flush before disabling stencil test\n renderer.flush();\n\n var prev = renderer.maskStack[renderer.maskStack.length - 1];\n\n prev.mask.applyStencil(renderer, prev.camera, false);\n\n if (renderer.currentCameraMask.mask !== prev.mask)\n {\n renderer.currentMask.mask = prev.mask;\n renderer.currentMask.camera = prev.camera;\n }\n else\n {\n renderer.currentMask.mask = null;\n }\n }\n },\n\n /**\n * Sets the clipping path of a 2D canvas context to the Geometry Mask's underlying Graphics object.\n *\n * @method Phaser.Display.Masks.GeometryMask#preRenderCanvas\n * @since 3.0.0\n *\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance to set the clipping path on.\n * @param {Phaser.GameObjects.GameObject} mask - The Game Object being rendered.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\n */\n preRenderCanvas: function (renderer, mask, camera)\n {\n var geometryMask = this.geometryMask;\n\n renderer.currentContext.save();\n\n geometryMask.renderCanvas(renderer, geometryMask, 0, camera, null, null, true);\n\n renderer.currentContext.clip();\n },\n\n /**\n * Restore the canvas context's previous clipping path, thus turning off the mask for it.\n *\n * @method Phaser.Display.Masks.GeometryMask#postRenderCanvas\n * @since 3.0.0\n *\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance being restored.\n */\n postRenderCanvas: function (renderer)\n {\n renderer.currentContext.restore();\n },\n\n /**\n * Destroys this GeometryMask and nulls any references it holds.\n *\n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\n *\n * @method Phaser.Display.Masks.GeometryMask#destroy\n * @since 3.7.0\n */\n destroy: function ()\n {\n this.geometryMask = null;\n }\n\n});\n\nmodule.exports = GeometryMask;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar BlendModes = require('../renderer/BlendModes');\nvar GetAdvancedValue = require('../utils/object/GetAdvancedValue');\n\n/**\n * Builds a Game Object using the provided configuration object.\n *\n * @function Phaser.GameObjects.BuildGameObject\n * @since 3.0.0\n *\n * @param {Phaser.Scene} scene - A reference to the Scene.\n * @param {Phaser.GameObjects.GameObject} gameObject - The initial GameObject.\n * @param {Phaser.Types.GameObjects.GameObjectConfig} config - The config to build the GameObject with.\n *\n * @return {Phaser.GameObjects.GameObject} The built Game Object.\n */\nvar BuildGameObject = function (scene, gameObject, config)\n{\n // Position\n\n gameObject.x = GetAdvancedValue(config, 'x', 0);\n gameObject.y = GetAdvancedValue(config, 'y', 0);\n gameObject.depth = GetAdvancedValue(config, 'depth', 0);\n\n // Flip\n\n gameObject.flipX = GetAdvancedValue(config, 'flipX', false);\n gameObject.flipY = GetAdvancedValue(config, 'flipY', false);\n\n // Scale\n // Either: { scale: 2 } or { scale: { x: 2, y: 2 }}\n\n var scale = GetAdvancedValue(config, 'scale', null);\n\n if (typeof scale === 'number')\n {\n gameObject.setScale(scale);\n }\n else if (scale !== null)\n {\n gameObject.scaleX = GetAdvancedValue(scale, 'x', 1);\n gameObject.scaleY = GetAdvancedValue(scale, 'y', 1);\n }\n\n // ScrollFactor\n // Either: { scrollFactor: 2 } or { scrollFactor: { x: 2, y: 2 }}\n\n var scrollFactor = GetAdvancedValue(config, 'scrollFactor', null);\n\n if (typeof scrollFactor === 'number')\n {\n gameObject.setScrollFactor(scrollFactor);\n }\n else if (scrollFactor !== null)\n {\n gameObject.scrollFactorX = GetAdvancedValue(scrollFactor, 'x', 1);\n gameObject.scrollFactorY = GetAdvancedValue(scrollFactor, 'y', 1);\n }\n\n // Rotation\n\n gameObject.rotation = GetAdvancedValue(config, 'rotation', 0);\n\n var angle = GetAdvancedValue(config, 'angle', null);\n\n if (angle !== null)\n {\n gameObject.angle = angle;\n }\n\n // Alpha\n\n gameObject.alpha = GetAdvancedValue(config, 'alpha', 1);\n\n // Origin\n // Either: { origin: 0.5 } or { origin: { x: 0.5, y: 0.5 }}\n\n var origin = GetAdvancedValue(config, 'origin', null);\n\n if (typeof origin === 'number')\n {\n gameObject.setOrigin(origin);\n }\n else if (origin !== null)\n {\n var ox = GetAdvancedValue(origin, 'x', 0.5);\n var oy = GetAdvancedValue(origin, 'y', 0.5);\n\n gameObject.setOrigin(ox, oy);\n }\n\n // BlendMode\n\n gameObject.blendMode = GetAdvancedValue(config, 'blendMode', BlendModes.NORMAL);\n\n // Visible\n\n gameObject.visible = GetAdvancedValue(config, 'visible', true);\n\n // Add to Scene\n\n var add = GetAdvancedValue(config, 'add', true);\n\n if (add)\n {\n scene.sys.displayList.add(gameObject);\n }\n\n if (gameObject.preUpdate)\n {\n scene.sys.updateList.add(gameObject);\n }\n\n return gameObject;\n};\n\nmodule.exports = BuildGameObject;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar ComponentsToJSON = require('./components/ToJSON');\nvar DataManager = require('../data/DataManager');\nvar EventEmitter = require('eventemitter3');\nvar Events = require('./events');\n\n/**\n * @classdesc\n * The base class that all Game Objects extend.\n * You don't create GameObjects directly and they cannot be added to the display list.\n * Instead, use them as the base for your own custom classes.\n *\n * @class GameObject\n * @memberof Phaser.GameObjects\n * @extends Phaser.Events.EventEmitter\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs.\n * @param {string} type - A textual representation of the type of Game Object, i.e. `sprite`.\n */\nvar GameObject = new Class({\n\n Extends: EventEmitter,\n\n initialize:\n\n function GameObject (scene, type)\n {\n EventEmitter.call(this);\n\n /**\n * The Scene to which this Game Object belongs.\n * Game Objects can only belong to one Scene.\n *\n * @name Phaser.GameObjects.GameObject#scene\n * @type {Phaser.Scene}\n * @protected\n * @since 3.0.0\n */\n this.scene = scene;\n\n /**\n * A textual representation of this Game Object, i.e. `sprite`.\n * Used internally by Phaser but is available for your own custom classes to populate.\n *\n * @name Phaser.GameObjects.GameObject#type\n * @type {string}\n * @since 3.0.0\n */\n this.type = type;\n\n /**\n * The current state of this Game Object.\n *\n * Phaser itself will never modify this value, although plugins may do so.\n *\n * Use this property to track the state of a Game Object during its lifetime. For example, it could change from\n * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant\n * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons.\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\n *\n * @name Phaser.GameObjects.GameObject#state\n * @type {(integer|string)}\n * @since 3.16.0\n */\n this.state = 0;\n\n /**\n * The parent Container of this Game Object, if it has one.\n *\n * @name Phaser.GameObjects.GameObject#parentContainer\n * @type {Phaser.GameObjects.Container}\n * @since 3.4.0\n */\n this.parentContainer = null;\n\n /**\n * The name of this Game Object.\n * Empty by default and never populated by Phaser, this is left for developers to use.\n *\n * @name Phaser.GameObjects.GameObject#name\n * @type {string}\n * @default ''\n * @since 3.0.0\n */\n this.name = '';\n\n /**\n * The active state of this Game Object.\n * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it.\n * An active object is one which is having its logic and internal systems updated.\n *\n * @name Phaser.GameObjects.GameObject#active\n * @type {boolean}\n * @default true\n * @since 3.0.0\n */\n this.active = true;\n\n /**\n * The Tab Index of the Game Object.\n * Reserved for future use by plugins and the Input Manager.\n *\n * @name Phaser.GameObjects.GameObject#tabIndex\n * @type {integer}\n * @default -1\n * @since 3.0.0\n */\n this.tabIndex = -1;\n\n /**\n * A Data Manager.\n * It allows you to store, query and get key/value paired information specific to this Game Object.\n * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`.\n *\n * @name Phaser.GameObjects.GameObject#data\n * @type {Phaser.Data.DataManager}\n * @default null\n * @since 3.0.0\n */\n this.data = null;\n\n /**\n * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not.\n * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively.\n * If those components are not used by your custom class then you can use this bitmask as you wish.\n *\n * @name Phaser.GameObjects.GameObject#renderFlags\n * @type {integer}\n * @default 15\n * @since 3.0.0\n */\n this.renderFlags = 15;\n\n /**\n * A bitmask that controls if this Game Object is drawn by a Camera or not.\n * Not usually set directly, instead call `Camera.ignore`, however you can\n * set this property directly using the Camera.id property:\n *\n * @example\n * this.cameraFilter |= camera.id\n *\n * @name Phaser.GameObjects.GameObject#cameraFilter\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.cameraFilter = 0;\n\n /**\n * If this Game Object is enabled for input then this property will contain an InteractiveObject instance.\n * Not usually set directly. Instead call `GameObject.setInteractive()`.\n *\n * @name Phaser.GameObjects.GameObject#input\n * @type {?Phaser.Types.Input.InteractiveObject}\n * @default null\n * @since 3.0.0\n */\n this.input = null;\n\n /**\n * If this Game Object is enabled for Arcade or Matter Physics then this property will contain a reference to a Physics Body.\n *\n * @name Phaser.GameObjects.GameObject#body\n * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|MatterJS.BodyType)}\n * @default null\n * @since 3.0.0\n */\n this.body = null;\n\n /**\n * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`.\n * This includes calls that may come from a Group, Container or the Scene itself.\n * While it allows you to persist a Game Object across Scenes, please understand you are entirely\n * responsible for managing references to and from this Game Object.\n *\n * @name Phaser.GameObjects.GameObject#ignoreDestroy\n * @type {boolean}\n * @default false\n * @since 3.5.0\n */\n this.ignoreDestroy = false;\n\n // Tell the Scene to re-sort the children\n scene.sys.queueDepthSort();\n },\n\n /**\n * Sets the `active` property of this Game Object and returns this Game Object for further chaining.\n * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList.\n *\n * @method Phaser.GameObjects.GameObject#setActive\n * @since 3.0.0\n *\n * @param {boolean} value - True if this Game Object should be set as active, false if not.\n *\n * @return {this} This GameObject.\n */\n setActive: function (value)\n {\n this.active = value;\n\n return this;\n },\n\n /**\n * Sets the `name` property of this Game Object and returns this Game Object for further chaining.\n * The `name` property is not populated by Phaser and is presented for your own use.\n *\n * @method Phaser.GameObjects.GameObject#setName\n * @since 3.0.0\n *\n * @param {string} value - The name to be given to this Game Object.\n *\n * @return {this} This GameObject.\n */\n setName: function (value)\n {\n this.name = value;\n\n return this;\n },\n\n /**\n * Sets the current state of this Game Object.\n *\n * Phaser itself will never modify the State of a Game Object, although plugins may do so.\n *\n * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'.\n * The state value should typically be an integer (ideally mapped to a constant\n * in your game code), but could also be a string. It is recommended to keep it light and simple.\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\n *\n * @method Phaser.GameObjects.GameObject#setState\n * @since 3.16.0\n *\n * @param {(integer|string)} value - The state of the Game Object.\n *\n * @return {this} This GameObject.\n */\n setState: function (value)\n {\n this.state = value;\n\n return this;\n },\n\n /**\n * Adds a Data Manager component to this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#setDataEnabled\n * @since 3.0.0\n * @see Phaser.Data.DataManager\n *\n * @return {this} This GameObject.\n */\n setDataEnabled: function ()\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n return this;\n },\n\n /**\n * Allows you to store a key value pair within this Game Objects Data Manager.\n *\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\n * before setting the value.\n *\n * If the key doesn't already exist in the Data Manager then it is created.\n *\n * ```javascript\n * sprite.setData('name', 'Red Gem Stone');\n * ```\n *\n * You can also pass in an object of key value pairs as the first argument:\n *\n * ```javascript\n * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\n * ```\n *\n * To get a value back again you can call `getData`:\n *\n * ```javascript\n * sprite.getData('gold');\n * ```\n *\n * Or you can access the value directly via the `values` property, where it works like any other variable:\n *\n * ```javascript\n * sprite.data.values.gold += 50;\n * ```\n *\n * When the value is first set, a `setdata` event is emitted from this Game Object.\n *\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\n *\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\n *\n * @method Phaser.GameObjects.GameObject#setData\n * @since 3.0.0\n *\n * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored.\n * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored.\n *\n * @return {this} This GameObject.\n */\n setData: function (key, value)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n this.data.set(key, value);\n\n return this;\n },\n\n /**\n * Increase a value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is increased from 0.\n *\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\n * before setting the value.\n *\n * If the key doesn't already exist in the Data Manager then it is created.\n *\n * When the value is first set, a `setdata` event is emitted from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#incData\n * @since 3.23.0\n *\n * @param {(string|object)} key - The key to increase the value for.\n * @param {*} [data] - The value to increase for the given key.\n *\n * @return {this} This GameObject.\n */\n incData: function (key, value)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n this.data.inc(key, value);\n\n return this;\n },\n\n /**\n * Toggle a boolean value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is toggled from false.\n *\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\n * before setting the value.\n *\n * If the key doesn't already exist in the Data Manager then it is created.\n *\n * When the value is first set, a `setdata` event is emitted from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#toggleData\n * @since 3.23.0\n *\n * @param {(string|object)} key - The key to toggle the value for.\n *\n * @return {this} This GameObject.\n */\n toggleData: function (key)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n this.data.toggle(key);\n\n return this;\n },\n\n /**\n * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist.\n *\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\n *\n * ```javascript\n * sprite.getData('gold');\n * ```\n *\n * Or access the value directly:\n *\n * ```javascript\n * sprite.data.values.gold;\n * ```\n *\n * You can also pass in an array of keys, in which case an array of values will be returned:\n *\n * ```javascript\n * sprite.getData([ 'gold', 'armor', 'health' ]);\n * ```\n *\n * This approach is useful for destructuring arrays in ES6.\n *\n * @method Phaser.GameObjects.GameObject#getData\n * @since 3.0.0\n *\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\n *\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\n */\n getData: function (key)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n return this.data.get(key);\n },\n\n /**\n * Pass this Game Object to the Input Manager to enable it for Input.\n *\n * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area\n * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced\n * input detection.\n *\n * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If\n * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific\n * shape for it to use.\n *\n * You can also provide an Input Configuration Object as the only argument to this method.\n *\n * @example\n * sprite.setInteractive();\n *\n * @example\n * sprite.setInteractive(new Phaser.Geom.Circle(45, 46, 45), Phaser.Geom.Circle.Contains);\n *\n * @example\n * graphics.setInteractive(new Phaser.Geom.Rectangle(0, 0, 128, 128), Phaser.Geom.Rectangle.Contains);\n *\n * @method Phaser.GameObjects.GameObject#setInteractive\n * @since 3.0.0\n *\n * @param {(Phaser.Types.Input.InputConfiguration|any)} [hitArea] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not given it will try to create a Rectangle based on the texture frame.\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The callback that determines if the pointer is within the Hit Area shape or not. If you provide a shape you must also provide a callback.\n * @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target?\n *\n * @return {this} This GameObject.\n */\n setInteractive: function (hitArea, hitAreaCallback, dropZone)\n {\n this.scene.sys.input.enable(this, hitArea, hitAreaCallback, dropZone);\n\n return this;\n },\n\n /**\n * If this Game Object has previously been enabled for input, this will disable it.\n *\n * An object that is disabled for input stops processing or being considered for\n * input events, but can be turned back on again at any time by simply calling\n * `setInteractive()` with no arguments provided.\n *\n * If want to completely remove interaction from this Game Object then use `removeInteractive` instead.\n *\n * @method Phaser.GameObjects.GameObject#disableInteractive\n * @since 3.7.0\n *\n * @return {this} This GameObject.\n */\n disableInteractive: function ()\n {\n if (this.input)\n {\n this.input.enabled = false;\n }\n\n return this;\n },\n\n /**\n * If this Game Object has previously been enabled for input, this will queue it\n * for removal, causing it to no longer be interactive. The removal happens on\n * the next game step, it is not immediate.\n *\n * The Interactive Object that was assigned to this Game Object will be destroyed,\n * removed from the Input Manager and cleared from this Game Object.\n *\n * If you wish to re-enable this Game Object at a later date you will need to\n * re-create its InteractiveObject by calling `setInteractive` again.\n *\n * If you wish to only temporarily stop an object from receiving input then use\n * `disableInteractive` instead, as that toggles the interactive state, where-as\n * this erases it completely.\n *\n * If you wish to resize a hit area, don't remove and then set it as being\n * interactive. Instead, access the hitarea object directly and resize the shape\n * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the\n * shape is a Rectangle, which it is by default.)\n *\n * @method Phaser.GameObjects.GameObject#removeInteractive\n * @since 3.7.0\n *\n * @return {this} This GameObject.\n */\n removeInteractive: function ()\n {\n this.scene.sys.input.clear(this);\n\n this.input = undefined;\n\n return this;\n },\n\n /**\n * This callback is invoked when this Game Object is added to a Scene.\n *\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\n * will use this, such as Sprites, to add themselves into the Update List.\n *\n * You can also listen for the `ADDED_TO_SCENE` event from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#addedToScene\n * @since 3.50.0\n */\n addedToScene: function ()\n {\n },\n\n /**\n * This callback is invoked when this Game Object is removed from a Scene.\n *\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\n * will use this, such as Sprites, to removed themselves from the Update List.\n *\n * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#removedFromScene\n * @since 3.50.0\n */\n removedFromScene: function ()\n {\n },\n\n /**\n * To be overridden by custom GameObjects. Allows base objects to be used in a Pool.\n *\n * @method Phaser.GameObjects.GameObject#update\n * @since 3.0.0\n *\n * @param {...*} [args] - args\n */\n update: function ()\n {\n },\n\n /**\n * Returns a JSON representation of the Game Object.\n *\n * @method Phaser.GameObjects.GameObject#toJSON\n * @since 3.0.0\n *\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\n */\n toJSON: function ()\n {\n return ComponentsToJSON(this);\n },\n\n /**\n * Compares the renderMask with the renderFlags to see if this Game Object will render or not.\n * Also checks the Game Object against the given Cameras exclusion list.\n *\n * @method Phaser.GameObjects.GameObject#willRender\n * @since 3.0.0\n *\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to check against this Game Object.\n *\n * @return {boolean} True if the Game Object should be rendered, otherwise false.\n */\n willRender: function (camera)\n {\n return !(GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id)));\n },\n\n /**\n * Returns an array containing the display list index of either this Game Object, or if it has one,\n * its parent Container. It then iterates up through all of the parent containers until it hits the\n * root of the display list (which is index 0 in the returned array).\n *\n * Used internally by the InputPlugin but also useful if you wish to find out the display depth of\n * this Game Object and all of its ancestors.\n *\n * @method Phaser.GameObjects.GameObject#getIndexList\n * @since 3.4.0\n *\n * @return {integer[]} An array of display list position indexes.\n */\n getIndexList: function ()\n {\n // eslint-disable-next-line consistent-this\n var child = this;\n var parent = this.parentContainer;\n\n var indexes = [];\n\n while (parent)\n {\n // indexes.unshift([parent.getIndex(child), parent.name]);\n indexes.unshift(parent.getIndex(child));\n\n child = parent;\n\n if (!parent.parentContainer)\n {\n break;\n }\n else\n {\n parent = parent.parentContainer;\n }\n }\n\n // indexes.unshift([this.scene.sys.displayList.getIndex(child), 'root']);\n indexes.unshift(this.scene.sys.displayList.getIndex(child));\n\n return indexes;\n },\n\n /**\n * Destroys this Game Object removing it from the Display List and Update List and\n * severing all ties to parent resources.\n *\n * Also removes itself from the Input Manager and Physics Manager if previously enabled.\n *\n * Use this to remove a Game Object from your game if you don't ever plan to use it again.\n * As long as no reference to it exists within your own code it should become free for\n * garbage collection by the browser.\n *\n * If you just want to temporarily disable an object then look at using the\n * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected.\n *\n * @method Phaser.GameObjects.GameObject#destroy\n * @fires Phaser.GameObjects.Events#DESTROY\n * @since 3.0.0\n *\n * @param {boolean} [fromScene=false] - Is this Game Object being destroyed as the result of a Scene shutdown?\n */\n destroy: function (fromScene)\n {\n if (fromScene === undefined) { fromScene = false; }\n\n // This Game Object has already been destroyed\n if (!this.scene || this.ignoreDestroy)\n {\n return;\n }\n\n if (this.preDestroy)\n {\n this.preDestroy.call(this);\n }\n\n this.emit(Events.DESTROY, this);\n\n var sys = this.scene.sys;\n\n if (!fromScene)\n {\n sys.displayList.remove(this);\n }\n\n if (this.input)\n {\n sys.input.clear(this);\n this.input = undefined;\n }\n\n if (this.data)\n {\n this.data.destroy();\n\n this.data = undefined;\n }\n\n if (this.body)\n {\n this.body.destroy();\n this.body = undefined;\n }\n\n // Tell the Scene to re-sort the children\n if (!fromScene)\n {\n sys.queueDepthSort();\n }\n\n this.active = false;\n this.visible = false;\n\n this.scene = undefined;\n\n this.parentContainer = undefined;\n\n this.removeAllListeners();\n }\n\n});\n\n/**\n * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not.\n *\n * @constant {integer} RENDER_MASK\n * @memberof Phaser.GameObjects.GameObject\n * @default\n */\nGameObject.RENDER_MASK = 15;\n\nmodule.exports = GameObject;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Clamp = require('../../math/Clamp');\n\n// bitmask flag for GameObject.renderMask\nvar _FLAG = 2; // 0010\n\n/**\n * Provides methods used for setting the alpha properties of a Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.Alpha\n * @since 3.0.0\n */\n\nvar Alpha = {\n\n /**\n * Private internal value. Holds the global alpha value.\n *\n * @name Phaser.GameObjects.Components.Alpha#_alpha\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _alpha: 1,\n\n /**\n * Private internal value. Holds the top-left alpha value.\n *\n * @name Phaser.GameObjects.Components.Alpha#_alphaTL\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _alphaTL: 1,\n\n /**\n * Private internal value. Holds the top-right alpha value.\n *\n * @name Phaser.GameObjects.Components.Alpha#_alphaTR\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _alphaTR: 1,\n\n /**\n * Private internal value. Holds the bottom-left alpha value.\n *\n * @name Phaser.GameObjects.Components.Alpha#_alphaBL\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _alphaBL: 1,\n\n /**\n * Private internal value. Holds the bottom-right alpha value.\n *\n * @name Phaser.GameObjects.Components.Alpha#_alphaBR\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _alphaBR: 1,\n\n /**\n * Clears all alpha values associated with this Game Object.\n *\n * Immediately sets the alpha levels back to 1 (fully opaque).\n *\n * @method Phaser.GameObjects.Components.Alpha#clearAlpha\n * @since 3.0.0\n *\n * @return {this} This Game Object instance.\n */\n clearAlpha: function ()\n {\n return this.setAlpha(1);\n },\n\n /**\n * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\n *\n * If your game is running under WebGL you can optionally specify four different alpha values, each of which\n * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.\n *\n * @method Phaser.GameObjects.Components.Alpha#setAlpha\n * @since 3.0.0\n *\n * @param {number} [topLeft=1] - The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object.\n * @param {number} [topRight] - The alpha value used for the top-right of the Game Object. WebGL only.\n * @param {number} [bottomLeft] - The alpha value used for the bottom-left of the Game Object. WebGL only.\n * @param {number} [bottomRight] - The alpha value used for the bottom-right of the Game Object. WebGL only.\n *\n * @return {this} This Game Object instance.\n */\n setAlpha: function (topLeft, topRight, bottomLeft, bottomRight)\n {\n if (topLeft === undefined) { topLeft = 1; }\n\n // Treat as if there is only one alpha value for the whole Game Object\n if (topRight === undefined)\n {\n this.alpha = topLeft;\n }\n else\n {\n this._alphaTL = Clamp(topLeft, 0, 1);\n this._alphaTR = Clamp(topRight, 0, 1);\n this._alphaBL = Clamp(bottomLeft, 0, 1);\n this._alphaBR = Clamp(bottomRight, 0, 1);\n }\n\n return this;\n },\n\n /**\n * The alpha value of the Game Object.\n *\n * This is a global value, impacting the entire Game Object, not just a region of it.\n *\n * @name Phaser.GameObjects.Components.Alpha#alpha\n * @type {number}\n * @since 3.0.0\n */\n alpha: {\n\n get: function ()\n {\n return this._alpha;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n this._alpha = v;\n this._alphaTL = v;\n this._alphaTR = v;\n this._alphaBL = v;\n this._alphaBR = v;\n\n if (v === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The alpha value starting from the top-left of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Alpha#alphaTopLeft\n * @type {number}\n * @webglOnly\n * @since 3.0.0\n */\n alphaTopLeft: {\n\n get: function ()\n {\n return this._alphaTL;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n this._alphaTL = v;\n\n if (v !== 0)\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The alpha value starting from the top-right of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Alpha#alphaTopRight\n * @type {number}\n * @webglOnly\n * @since 3.0.0\n */\n alphaTopRight: {\n\n get: function ()\n {\n return this._alphaTR;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n this._alphaTR = v;\n\n if (v !== 0)\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The alpha value starting from the bottom-left of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomLeft\n * @type {number}\n * @webglOnly\n * @since 3.0.0\n */\n alphaBottomLeft: {\n\n get: function ()\n {\n return this._alphaBL;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n this._alphaBL = v;\n\n if (v !== 0)\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The alpha value starting from the bottom-right of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomRight\n * @type {number}\n * @webglOnly\n * @since 3.0.0\n */\n alphaBottomRight: {\n\n get: function ()\n {\n return this._alphaBR;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n this._alphaBR = v;\n\n if (v !== 0)\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n }\n\n};\n\nmodule.exports = Alpha;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Clamp = require('../../math/Clamp');\n\n// bitmask flag for GameObject.renderMask\nvar _FLAG = 2; // 0010\n\n/**\n * Provides methods used for setting the alpha property of a Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.AlphaSingle\n * @since 3.22.0\n */\n\nvar AlphaSingle = {\n\n /**\n * Private internal value. Holds the global alpha value.\n *\n * @name Phaser.GameObjects.Components.AlphaSingle#_alpha\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _alpha: 1,\n\n /**\n * Clears all alpha values associated with this Game Object.\n *\n * Immediately sets the alpha levels back to 1 (fully opaque).\n *\n * @method Phaser.GameObjects.Components.AlphaSingle#clearAlpha\n * @since 3.0.0\n *\n * @return {this} This Game Object instance.\n */\n clearAlpha: function ()\n {\n return this.setAlpha(1);\n },\n\n /**\n * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\n *\n * @method Phaser.GameObjects.Components.AlphaSingle#setAlpha\n * @since 3.0.0\n *\n * @param {number} [value=1] - The alpha value applied across the whole Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setAlpha: function (value)\n {\n if (value === undefined) { value = 1; }\n\n this.alpha = value;\n\n return this;\n },\n\n /**\n * The alpha value of the Game Object.\n *\n * This is a global value, impacting the entire Game Object, not just a region of it.\n *\n * @name Phaser.GameObjects.Components.AlphaSingle#alpha\n * @type {number}\n * @since 3.0.0\n */\n alpha: {\n\n get: function ()\n {\n return this._alpha;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n this._alpha = v;\n\n if (v === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n }\n\n};\n\nmodule.exports = AlphaSingle;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar BaseAnimation = require('../../animations/Animation');\nvar Class = require('../../utils/Class');\nvar Events = require('../../animations/events');\n\n/**\n * @classdesc\n * A Game Object Animation Controller.\n *\n * This controller lives as an instance within a Game Object, accessible as `sprite.anims`.\n *\n * @class Animation\n * @memberof Phaser.GameObjects.Components\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} parent - The Game Object to which this animation controller belongs.\n */\nvar Animation = new Class({\n\n initialize:\n\n function Animation (parent)\n {\n /**\n * The Game Object to which this animation controller belongs.\n *\n * @name Phaser.GameObjects.Components.Animation#parent\n * @type {Phaser.GameObjects.GameObject}\n * @since 3.0.0\n */\n this.parent = parent;\n\n /**\n * A reference to the global Animation Manager.\n *\n * @name Phaser.GameObjects.Components.Animation#animationManager\n * @type {Phaser.Animations.AnimationManager}\n * @since 3.0.0\n */\n this.animationManager = parent.scene.sys.anims;\n\n this.animationManager.once(Events.REMOVE_ANIMATION, this.remove, this);\n\n /**\n * Is an animation currently playing or not?\n *\n * @name Phaser.GameObjects.Components.Animation#isPlaying\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.isPlaying = false;\n\n /**\n * The current Animation loaded into this Animation Controller.\n *\n * @name Phaser.GameObjects.Components.Animation#currentAnim\n * @type {?Phaser.Animations.Animation}\n * @default null\n * @since 3.0.0\n */\n this.currentAnim = null;\n\n /**\n * The current AnimationFrame being displayed by this Animation Controller.\n *\n * @name Phaser.GameObjects.Components.Animation#currentFrame\n * @type {?Phaser.Animations.AnimationFrame}\n * @default null\n * @since 3.0.0\n */\n this.currentFrame = null;\n\n /**\n * The key of the next Animation to be loaded into this Animation Controller when the current animation completes.\n *\n * @name Phaser.GameObjects.Components.Animation#nextAnim\n * @type {?string}\n * @default null\n * @since 3.16.0\n */\n this.nextAnim = null;\n\n /**\n * A queue of keys of the next Animations to be loaded into this Animation Controller when the current animation completes.\n *\n * @name Phaser.GameObjects.Components.Animation#nextAnimsQueue\n * @type {string[]}\n * @since 3.24.0\n */\n this.nextAnimsQueue = [];\n\n /**\n * Time scale factor.\n *\n * @name Phaser.GameObjects.Components.Animation#_timeScale\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n this._timeScale = 1;\n\n /**\n * The frame rate of playback in frames per second.\n * The default is 24 if the `duration` property is `null`.\n *\n * @name Phaser.GameObjects.Components.Animation#frameRate\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.frameRate = 0;\n\n /**\n * How long the animation should play for, in milliseconds.\n * If the `frameRate` property has been set then it overrides this value,\n * otherwise the `frameRate` is derived from `duration`.\n *\n * @name Phaser.GameObjects.Components.Animation#duration\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.duration = 0;\n\n /**\n * ms per frame, not including frame specific modifiers that may be present in the Animation data.\n *\n * @name Phaser.GameObjects.Components.Animation#msPerFrame\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.msPerFrame = 0;\n\n /**\n * Skip frames if the time lags, or always advanced anyway?\n *\n * @name Phaser.GameObjects.Components.Animation#skipMissedFrames\n * @type {boolean}\n * @default true\n * @since 3.0.0\n */\n this.skipMissedFrames = true;\n\n /**\n * A delay before starting playback, in milliseconds.\n *\n * @name Phaser.GameObjects.Components.Animation#_delay\n * @type {number}\n * @private\n * @default 0\n * @since 3.0.0\n */\n this._delay = 0;\n\n /**\n * Number of times to repeat the animation (-1 for infinity)\n *\n * @name Phaser.GameObjects.Components.Animation#_repeat\n * @type {number}\n * @private\n * @default 0\n * @since 3.0.0\n */\n this._repeat = 0;\n\n /**\n * Delay before the repeat starts, in milliseconds.\n *\n * @name Phaser.GameObjects.Components.Animation#_repeatDelay\n * @type {number}\n * @private\n * @default 0\n * @since 3.0.0\n */\n this._repeatDelay = 0;\n\n /**\n * Should the animation yoyo? (reverse back down to the start) before repeating?\n *\n * @name Phaser.GameObjects.Components.Animation#_yoyo\n * @type {boolean}\n * @private\n * @default false\n * @since 3.0.0\n */\n this._yoyo = false;\n\n /**\n * Will the playhead move forwards (`true`) or in reverse (`false`).\n *\n * @name Phaser.GameObjects.Components.Animation#forward\n * @type {boolean}\n * @default true\n * @since 3.0.0\n */\n this.forward = true;\n\n /**\n * An Internal trigger that's play the animation in reverse mode ('true') or not ('false'),\n * needed because forward can be changed by yoyo feature.\n *\n * @name Phaser.GameObjects.Components.Animation#_reverse\n * @type {boolean}\n * @default false\n * @private\n * @since 3.12.0\n */\n this._reverse = false;\n\n /**\n * Internal time overflow accumulator.\n *\n * @name Phaser.GameObjects.Components.Animation#accumulator\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.accumulator = 0;\n\n /**\n * The time point at which the next animation frame will change.\n *\n * @name Phaser.GameObjects.Components.Animation#nextTick\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.nextTick = 0;\n\n /**\n * An internal counter keeping track of how many repeats are left to play.\n *\n * @name Phaser.GameObjects.Components.Animation#repeatCounter\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.repeatCounter = 0;\n\n /**\n * An internal flag keeping track of pending repeats.\n *\n * @name Phaser.GameObjects.Components.Animation#pendingRepeat\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.pendingRepeat = false;\n\n /**\n * Is the Animation paused?\n *\n * @name Phaser.GameObjects.Components.Animation#_paused\n * @type {boolean}\n * @private\n * @default false\n * @since 3.0.0\n */\n this._paused = false;\n\n /**\n * Was the animation previously playing before being paused?\n *\n * @name Phaser.GameObjects.Components.Animation#_wasPlaying\n * @type {boolean}\n * @private\n * @default false\n * @since 3.0.0\n */\n this._wasPlaying = false;\n\n /**\n * Internal property tracking if this Animation is waiting to stop.\n *\n * 0 = No\n * 1 = Waiting for ms to pass\n * 2 = Waiting for repeat\n * 3 = Waiting for specific frame\n *\n * @name Phaser.GameObjects.Components.Animation#_pendingStop\n * @type {integer}\n * @private\n * @since 3.4.0\n */\n this._pendingStop = 0;\n\n /**\n * Internal property used by _pendingStop.\n *\n * @name Phaser.GameObjects.Components.Animation#_pendingStopValue\n * @type {any}\n * @private\n * @since 3.4.0\n */\n this._pendingStopValue;\n },\n\n /**\n * Sets an animation to be played immediately after the current one completes.\n *\n * The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc, or have the `stop` method called directly on it.\n *\n * An animation set to repeat forever will never enter a completed state.\n *\n * You can chain a new animation at any point, including before the current one starts playing, during it, or when it ends (via its `animationcomplete` callback).\n * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained animations without impacting the global animation they're playing.\n *\n * Call this method with no arguments to reset the chained animation.\n *\n * @method Phaser.GameObjects.Components.Animation#chain\n * @since 3.16.0\n *\n * @param {(string|Phaser.Animations.Animation)} [key] - The string-based key of the animation to play next, as defined previously in the Animation Manager. Or an Animation instance.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n chain: function (key)\n {\n if (key instanceof BaseAnimation)\n {\n key = key.key;\n }\n\n if (this.nextAnim === null)\n {\n this.nextAnim = key;\n }\n else\n {\n this.nextAnimsQueue.push(key);\n }\n\n return this.parent;\n },\n\n /**\n * Sets the amount of time, in milliseconds, that the animation will be delayed before starting playback.\n *\n * @method Phaser.GameObjects.Components.Animation#setDelay\n * @since 3.4.0\n *\n * @param {integer} [value=0] - The amount of time, in milliseconds, to wait before starting playback.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n setDelay: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this._delay = value;\n\n return this.parent;\n },\n\n /**\n * Gets the amount of time, in milliseconds that the animation will be delayed before starting playback.\n *\n * @method Phaser.GameObjects.Components.Animation#getDelay\n * @since 3.4.0\n *\n * @return {integer} The amount of time, in milliseconds, the Animation will wait before starting playback.\n */\n getDelay: function ()\n {\n return this._delay;\n },\n\n /**\n * Waits for the specified delay, in milliseconds, then starts playback of the requested animation.\n *\n * @method Phaser.GameObjects.Components.Animation#delayedPlay\n * @since 3.0.0\n *\n * @param {integer} delay - The delay, in milliseconds, to wait before starting the animation playing.\n * @param {string} key - The key of the animation to play.\n * @param {integer} [startFrame=0] - The frame of the animation to start from.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n delayedPlay: function (delay, key, startFrame)\n {\n this.play(key, true, startFrame);\n\n this.nextTick += delay;\n\n return this.parent;\n },\n\n /**\n * Returns the key of the animation currently loaded into this component.\n *\n * @method Phaser.GameObjects.Components.Animation#getCurrentKey\n * @since 3.0.0\n *\n * @return {string} The key of the Animation loaded into this component.\n */\n getCurrentKey: function ()\n {\n if (this.currentAnim)\n {\n return this.currentAnim.key;\n }\n },\n\n /**\n * Internal method used to load an animation into this component.\n *\n * @method Phaser.GameObjects.Components.Animation#load\n * @protected\n * @since 3.0.0\n *\n * @param {string} key - The key of the animation to load.\n * @param {integer} [startFrame=0] - The start frame of the animation to load.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n load: function (key, startFrame)\n {\n if (startFrame === undefined) { startFrame = 0; }\n\n if (this.isPlaying)\n {\n this.stop();\n }\n\n // Load the new animation in\n this.animationManager.load(this, key, startFrame);\n\n return this.parent;\n },\n\n /**\n * Pause the current animation and set the `isPlaying` property to `false`.\n * You can optionally pause it at a specific frame.\n *\n * @method Phaser.GameObjects.Components.Animation#pause\n * @since 3.0.0\n *\n * @param {Phaser.Animations.AnimationFrame} [atFrame] - An optional frame to set after pausing the animation.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n pause: function (atFrame)\n {\n if (!this._paused)\n {\n this._paused = true;\n this._wasPlaying = this.isPlaying;\n this.isPlaying = false;\n }\n\n if (atFrame !== undefined)\n {\n this.updateFrame(atFrame);\n }\n\n return this.parent;\n },\n\n /**\n * Resumes playback of a paused animation and sets the `isPlaying` property to `true`.\n * You can optionally tell it to start playback from a specific frame.\n *\n * @method Phaser.GameObjects.Components.Animation#resume\n * @since 3.0.0\n *\n * @param {Phaser.Animations.AnimationFrame} [fromFrame] - An optional frame to set before restarting playback.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n resume: function (fromFrame)\n {\n if (this._paused)\n {\n this._paused = false;\n this.isPlaying = this._wasPlaying;\n }\n\n if (fromFrame !== undefined)\n {\n this.updateFrame(fromFrame);\n }\n\n return this.parent;\n },\n\n /**\n * `true` if the current animation is paused, otherwise `false`.\n *\n * @name Phaser.GameObjects.Components.Animation#isPaused\n * @readonly\n * @type {boolean}\n * @since 3.4.0\n */\n isPaused: {\n\n get: function ()\n {\n return this._paused;\n }\n\n },\n\n /**\n * Plays an Animation on a Game Object that has the Animation component, such as a Sprite.\n *\n * Animations are stored in the global Animation Manager and are referenced by a unique string-based key.\n *\n * @method Phaser.GameObjects.Components.Animation#play\n * @fires Phaser.GameObjects.Components.Animation#onStartEvent\n * @since 3.0.0\n *\n * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance.\n * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call.\n * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n play: function (key, ignoreIfPlaying, startFrame)\n {\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\n if (startFrame === undefined) { startFrame = 0; }\n\n if (key instanceof BaseAnimation)\n {\n key = key.key;\n }\n\n if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key)\n {\n return this.parent;\n }\n\n this.forward = true;\n this._reverse = false;\n this._paused = false;\n this._wasPlaying = true;\n\n return this._startAnimation(key, startFrame);\n },\n\n /**\n * Plays an Animation (in reverse mode) on the Game Object that owns this Animation Component.\n *\n * @method Phaser.GameObjects.Components.Animation#playReverse\n * @fires Phaser.GameObjects.Components.Animation#onStartEvent\n * @since 3.12.0\n *\n * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance.\n * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call.\n * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n playReverse: function (key, ignoreIfPlaying, startFrame)\n {\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\n if (startFrame === undefined) { startFrame = 0; }\n\n if (key instanceof BaseAnimation)\n {\n key = key.key;\n }\n\n if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key)\n {\n return this.parent;\n }\n\n this.forward = false;\n this._reverse = true;\n\n return this._startAnimation(key, startFrame);\n },\n\n /**\n * Load an Animation and fires 'onStartEvent' event, extracted from 'play' method.\n *\n * @method Phaser.GameObjects.Components.Animation#_startAnimation\n * @fires Phaser.Animations.Events#ANIMATION_START\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START\n * @since 3.12.0\n *\n * @param {string} key - The string-based key of the animation to play, as defined previously in the Animation Manager.\n * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n _startAnimation: function (key, startFrame)\n {\n this.load(key, startFrame);\n\n var anim = this.currentAnim;\n var gameObject = this.parent;\n\n if (!anim)\n {\n return gameObject;\n }\n\n // Should give us 9,007,199,254,740,991 safe repeats\n this.repeatCounter = (this._repeat === -1) ? Number.MAX_VALUE : this._repeat;\n\n anim.getFirstTick(this);\n\n this.isPlaying = true;\n this.pendingRepeat = false;\n\n if (anim.showOnStart)\n {\n gameObject.visible = true;\n }\n\n var frame = this.currentFrame;\n\n anim.emit(Events.ANIMATION_START, anim, frame, gameObject);\n\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_START + key, anim, frame, gameObject);\n\n gameObject.emit(Events.SPRITE_ANIMATION_START, anim, frame, gameObject);\n\n return gameObject;\n },\n\n /**\n * Reverse the Animation that is already playing on the Game Object.\n *\n * @method Phaser.GameObjects.Components.Animation#reverse\n * @since 3.12.0\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n reverse: function ()\n {\n if (this.isPlaying)\n {\n this._reverse = !this._reverse;\n\n this.forward = !this.forward;\n }\n\n return this.parent;\n },\n\n /**\n * Returns a value between 0 and 1 indicating how far this animation is through, ignoring repeats and yoyos.\n * If the animation has a non-zero repeat defined, `getProgress` and `getTotalProgress` will be different\n * because `getProgress` doesn't include any repeats or repeat delays, whereas `getTotalProgress` does.\n *\n * @method Phaser.GameObjects.Components.Animation#getProgress\n * @since 3.4.0\n *\n * @return {number} The progress of the current animation, between 0 and 1.\n */\n getProgress: function ()\n {\n var p = this.currentFrame.progress;\n\n if (!this.forward)\n {\n p = 1 - p;\n }\n\n return p;\n },\n\n /**\n * Takes a value between 0 and 1 and uses it to set how far this animation is through playback.\n * Does not factor in repeats or yoyos, but does handle playing forwards or backwards.\n *\n * @method Phaser.GameObjects.Components.Animation#setProgress\n * @since 3.4.0\n *\n * @param {number} [value=0] - The progress value, between 0 and 1.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n setProgress: function (value)\n {\n if (!this.forward)\n {\n value = 1 - value;\n }\n\n this.setCurrentFrame(this.currentAnim.getFrameByProgress(value));\n\n return this.parent;\n },\n\n /**\n * Handle the removal of an animation from the Animation Manager.\n *\n * @method Phaser.GameObjects.Components.Animation#remove\n * @since 3.0.0\n *\n * @param {string} [key] - The key of the removed Animation.\n * @param {Phaser.Animations.Animation} [animation] - The removed Animation.\n */\n remove: function (key, animation)\n {\n if (animation === undefined) { animation = this.currentAnim; }\n\n if (this.isPlaying && animation.key === this.currentAnim.key)\n {\n this.stop();\n\n this.setCurrentFrame(this.currentAnim.frames[0]);\n }\n },\n\n /**\n * Gets the number of times that the animation will repeat\n * after its first iteration. For example, if returns 1, the animation will\n * play a total of twice (the initial play plus 1 repeat).\n * A value of -1 means the animation will repeat indefinitely.\n *\n * @method Phaser.GameObjects.Components.Animation#getRepeat\n * @since 3.4.0\n *\n * @return {integer} The number of times that the animation will repeat.\n */\n getRepeat: function ()\n {\n return this._repeat;\n },\n\n /**\n * Sets the number of times that the animation should repeat\n * after its first iteration. For example, if repeat is 1, the animation will\n * play a total of twice (the initial play plus 1 repeat).\n * To repeat indefinitely, use -1. repeat should always be an integer.\n *\n * @method Phaser.GameObjects.Components.Animation#setRepeat\n * @since 3.4.0\n *\n * @param {integer} value - The number of times that the animation should repeat.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n setRepeat: function (value)\n {\n this._repeat = value;\n\n this.repeatCounter = (value === -1) ? Number.MAX_VALUE : value;\n\n return this.parent;\n },\n\n /**\n * Gets the amount of delay between repeats, if any.\n *\n * @method Phaser.GameObjects.Components.Animation#getRepeatDelay\n * @since 3.4.0\n *\n * @return {number} The delay between repeats.\n */\n getRepeatDelay: function ()\n {\n return this._repeatDelay;\n },\n\n /**\n * Sets the amount of time in seconds between repeats.\n * For example, if `repeat` is 2 and `repeatDelay` is 10, the animation will play initially,\n * then wait for 10 seconds before repeating, then play again, then wait another 10 seconds\n * before doing its final repeat.\n *\n * @method Phaser.GameObjects.Components.Animation#setRepeatDelay\n * @since 3.4.0\n *\n * @param {number} value - The delay to wait between repeats, in seconds.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n setRepeatDelay: function (value)\n {\n this._repeatDelay = value;\n\n return this.parent;\n },\n\n /**\n * Restarts the current animation from its beginning, optionally including its delay value.\n *\n * @method Phaser.GameObjects.Components.Animation#restart\n * @fires Phaser.Animations.Events#ANIMATION_RESTART\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_RESTART\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART\n * @since 3.0.0\n *\n * @param {boolean} [includeDelay=false] - Whether to include the delay value of the animation when restarting.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n restart: function (includeDelay)\n {\n if (includeDelay === undefined) { includeDelay = false; }\n\n var anim = this.currentAnim;\n\n anim.getFirstTick(this, includeDelay);\n\n this.forward = true;\n this.isPlaying = true;\n this.pendingRepeat = false;\n this._paused = false;\n\n // Set frame\n this.updateFrame(anim.frames[0]);\n\n var gameObject = this.parent;\n var frame = this.currentFrame;\n\n anim.emit(Events.ANIMATION_RESTART, anim, frame, gameObject);\n\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_RESTART + anim.key, anim, frame, gameObject);\n\n gameObject.emit(Events.SPRITE_ANIMATION_RESTART, anim, frame, gameObject);\n\n return this.parent;\n },\n\n /**\n * Immediately stops the current animation from playing and dispatches the `animationcomplete` event.\n *\n * If no animation is set, no event will be dispatched.\n *\n * If there is another animation queued (via the `chain` method) then it will start playing immediately.\n *\n * @method Phaser.GameObjects.Components.Animation#stop\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\n * @since 3.0.0\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n stop: function ()\n {\n this._pendingStop = 0;\n\n this.isPlaying = false;\n\n var gameObject = this.parent;\n var anim = this.currentAnim;\n var frame = this.currentFrame;\n\n if (anim)\n {\n anim.emit(Events.ANIMATION_COMPLETE, anim, frame, gameObject);\n\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_COMPLETE + anim.key, anim, frame, gameObject);\n\n gameObject.emit(Events.SPRITE_ANIMATION_COMPLETE, anim, frame, gameObject);\n }\n\n if (this.nextAnim)\n {\n var key = this.nextAnim;\n\n this.nextAnim = (this.nextAnimsQueue.length > 0) ? this.nextAnimsQueue.shift() : null;\n\n this.play(key);\n }\n\n return gameObject;\n },\n\n /**\n * Stops the current animation from playing after the specified time delay, given in milliseconds.\n *\n * @method Phaser.GameObjects.Components.Animation#stopAfterDelay\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\n * @since 3.4.0\n *\n * @param {integer} delay - The number of milliseconds to wait before stopping this animation.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n stopAfterDelay: function (delay)\n {\n this._pendingStop = 1;\n this._pendingStopValue = delay;\n\n return this.parent;\n },\n\n /**\n * Stops the current animation from playing when it next repeats.\n *\n * @method Phaser.GameObjects.Components.Animation#stopOnRepeat\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\n * @since 3.4.0\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n stopOnRepeat: function ()\n {\n this._pendingStop = 2;\n\n return this.parent;\n },\n\n /**\n * Stops the current animation from playing when it next sets the given frame.\n * If this frame doesn't exist within the animation it will not stop it from playing.\n *\n * @method Phaser.GameObjects.Components.Animation#stopOnFrame\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\n * @since 3.4.0\n *\n * @param {Phaser.Animations.AnimationFrame} frame - The frame to check before stopping this animation.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n stopOnFrame: function (frame)\n {\n this._pendingStop = 3;\n this._pendingStopValue = frame;\n\n return this.parent;\n },\n\n /**\n * Sets the Time Scale factor, allowing you to make the animation go go faster or slower than default.\n * Where 1 = normal speed (the default), 0.5 = half speed, 2 = double speed, etc.\n *\n * @method Phaser.GameObjects.Components.Animation#setTimeScale\n * @since 3.4.0\n *\n * @param {number} [value=1] - The time scale factor, where 1 is no change, 0.5 is half speed, etc.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n setTimeScale: function (value)\n {\n if (value === undefined) { value = 1; }\n\n this._timeScale = value;\n\n return this.parent;\n },\n\n /**\n * Gets the Time Scale factor.\n *\n * @method Phaser.GameObjects.Components.Animation#getTimeScale\n * @since 3.4.0\n *\n * @return {number} The Time Scale value.\n */\n getTimeScale: function ()\n {\n return this._timeScale;\n },\n\n /**\n * Returns the total number of frames in this animation.\n *\n * @method Phaser.GameObjects.Components.Animation#getTotalFrames\n * @since 3.4.0\n *\n * @return {integer} The total number of frames in this animation.\n */\n getTotalFrames: function ()\n {\n return this.currentAnim.frames.length;\n },\n\n /**\n * The internal update loop for the Animation Component.\n *\n * @method Phaser.GameObjects.Components.Animation#update\n * @since 3.0.0\n *\n * @param {number} time - The current timestamp.\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\n */\n update: function (time, delta)\n {\n if (!this.currentAnim || !this.isPlaying || this.currentAnim.paused)\n {\n return;\n }\n\n this.accumulator += delta * this._timeScale;\n\n if (this._pendingStop === 1)\n {\n this._pendingStopValue -= delta;\n\n if (this._pendingStopValue <= 0)\n {\n return this.currentAnim.completeAnimation(this);\n }\n }\n\n if (this.accumulator >= this.nextTick)\n {\n this.currentAnim.setFrame(this);\n }\n },\n\n /**\n * Sets the given Animation Frame as being the current frame\n * and applies it to the parent Game Object, adjusting its size and origin as needed.\n *\n * @method Phaser.GameObjects.Components.Animation#setCurrentFrame\n * @since 3.4.0\n *\n * @param {Phaser.Animations.AnimationFrame} animationFrame - The Animation Frame to set as being current.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\n */\n setCurrentFrame: function (animationFrame)\n {\n var gameObject = this.parent;\n\n this.currentFrame = animationFrame;\n\n gameObject.texture = animationFrame.frame.texture;\n gameObject.frame = animationFrame.frame;\n\n if (gameObject.isCropped)\n {\n gameObject.frame.updateCropUVs(gameObject._crop, gameObject.flipX, gameObject.flipY);\n }\n\n gameObject.setSizeToFrame();\n\n if (gameObject._originComponent)\n {\n if (animationFrame.frame.customPivot)\n {\n gameObject.setOrigin(animationFrame.frame.pivotX, animationFrame.frame.pivotY);\n }\n else\n {\n gameObject.updateDisplayOrigin();\n }\n }\n\n return gameObject;\n },\n\n /**\n * Internal frame change handler.\n *\n * @method Phaser.GameObjects.Components.Animation#updateFrame\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE\n * @private\n * @since 3.0.0\n *\n * @param {Phaser.Animations.AnimationFrame} animationFrame - The animation frame to change to.\n */\n updateFrame: function (animationFrame)\n {\n var gameObject = this.setCurrentFrame(animationFrame);\n\n if (this.isPlaying)\n {\n if (animationFrame.setAlpha)\n {\n gameObject.alpha = animationFrame.alpha;\n }\n\n var anim = this.currentAnim;\n\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_UPDATE + anim.key, anim, animationFrame, gameObject);\n\n gameObject.emit(Events.SPRITE_ANIMATION_UPDATE, anim, animationFrame, gameObject);\n\n if (this._pendingStop === 3 && this._pendingStopValue === animationFrame)\n {\n this.currentAnim.completeAnimation(this);\n }\n }\n },\n\n /**\n * Advances the animation to the next frame, regardless of the time or animation state.\n * If the animation is set to repeat, or yoyo, this will still take effect.\n *\n * Calling this does not change the direction of the animation. I.e. if it was currently\n * playing in reverse, calling this method doesn't then change the direction to forwards.\n *\n * @method Phaser.GameObjects.Components.Animation#nextFrame\n * @since 3.16.0\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\n */\n nextFrame: function ()\n {\n if (this.currentAnim)\n {\n this.currentAnim.nextFrame(this);\n }\n\n return this.parent;\n },\n\n /**\n * Advances the animation to the previous frame, regardless of the time or animation state.\n * If the animation is set to repeat, or yoyo, this will still take effect.\n *\n * Calling this does not change the direction of the animation. I.e. if it was currently\n * playing in forwards, calling this method doesn't then change the direction to backwards.\n *\n * @method Phaser.GameObjects.Components.Animation#previousFrame\n * @since 3.16.0\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\n */\n previousFrame: function ()\n {\n if (this.currentAnim)\n {\n this.currentAnim.previousFrame(this);\n }\n\n return this.parent;\n },\n\n /**\n * Sets if the current Animation will yoyo when it reaches the end.\n * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again.\n *\n * @method Phaser.GameObjects.Components.Animation#setYoyo\n * @since 3.4.0\n *\n * @param {boolean} [value=false] - `true` if the animation should yoyo, `false` to not.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\n */\n setYoyo: function (value)\n {\n if (value === undefined) { value = false; }\n\n this._yoyo = value;\n\n return this.parent;\n },\n\n /**\n * Gets if the current Animation will yoyo when it reaches the end.\n * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again.\n *\n * @method Phaser.GameObjects.Components.Animation#getYoyo\n * @since 3.4.0\n *\n * @return {boolean} `true` if the animation is set to yoyo, `false` if not.\n */\n getYoyo: function ()\n {\n return this._yoyo;\n },\n\n /**\n * Destroy this Animation component.\n *\n * Unregisters event listeners and cleans up its references.\n *\n * @method Phaser.GameObjects.Components.Animation#destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.animationManager.off(Events.REMOVE_ANIMATION, this.remove, this);\n\n this.animationManager = null;\n this.parent = null;\n this.nextAnimsQueue.length = 0;\n\n this.currentAnim = null;\n this.currentFrame = null;\n }\n\n});\n\nmodule.exports = Animation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar BlendModes = require('../../renderer/BlendModes');\n\n/**\n * Provides methods used for setting the blend mode of a Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.BlendMode\n * @since 3.0.0\n */\n\nvar BlendMode = {\n\n /**\n * Private internal value. Holds the current blend mode.\n * \n * @name Phaser.GameObjects.Components.BlendMode#_blendMode\n * @type {integer}\n * @private\n * @default 0\n * @since 3.0.0\n */\n _blendMode: BlendModes.NORMAL,\n\n /**\n * Sets the Blend Mode being used by this Game Object.\n *\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\n *\n * Under WebGL only the following Blend Modes are available:\n *\n * * ADD\n * * MULTIPLY\n * * SCREEN\n * * ERASE\n *\n * Canvas has more available depending on browser support.\n *\n * You can also create your own custom Blend Modes in WebGL.\n *\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\n * reasons try to be careful about the construction of your Scene and the frequency of which blend modes\n * are used.\n *\n * @name Phaser.GameObjects.Components.BlendMode#blendMode\n * @type {(Phaser.BlendModes|string)}\n * @since 3.0.0\n */\n blendMode: {\n\n get: function ()\n {\n return this._blendMode;\n },\n\n set: function (value)\n {\n if (typeof value === 'string')\n {\n value = BlendModes[value];\n }\n\n value |= 0;\n\n if (value >= -1)\n {\n this._blendMode = value;\n }\n }\n\n },\n\n /**\n * Sets the Blend Mode being used by this Game Object.\n *\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\n *\n * Under WebGL only the following Blend Modes are available:\n *\n * * ADD\n * * MULTIPLY\n * * SCREEN\n * * ERASE (only works when rendering to a framebuffer, like a Render Texture)\n *\n * Canvas has more available depending on browser support.\n *\n * You can also create your own custom Blend Modes in WebGL.\n *\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\n * reasons try to be careful about the construction of your Scene and the frequency in which blend modes\n * are used.\n *\n * @method Phaser.GameObjects.Components.BlendMode#setBlendMode\n * @since 3.0.0\n *\n * @param {(string|Phaser.BlendModes)} value - The BlendMode value. Either a string or a CONST.\n *\n * @return {this} This Game Object instance.\n */\n setBlendMode: function (value)\n {\n this.blendMode = value;\n\n return this;\n }\n\n};\n\nmodule.exports = BlendMode;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for calculating and setting the size of a non-Frame based Game Object.\n * Should be applied as a mixin and not used directly.\n * \n * @namespace Phaser.GameObjects.Components.ComputedSize\n * @since 3.0.0\n */\n\nvar ComputedSize = {\n\n /**\n * The native (un-scaled) width of this Game Object.\n * \n * Changing this value will not change the size that the Game Object is rendered in-game.\n * For that you need to either set the scale of the Game Object (`setScale`) or use\n * the `displayWidth` property.\n * \n * @name Phaser.GameObjects.Components.ComputedSize#width\n * @type {number}\n * @since 3.0.0\n */\n width: 0,\n\n /**\n * The native (un-scaled) height of this Game Object.\n * \n * Changing this value will not change the size that the Game Object is rendered in-game.\n * For that you need to either set the scale of the Game Object (`setScale`) or use\n * the `displayHeight` property.\n * \n * @name Phaser.GameObjects.Components.ComputedSize#height\n * @type {number}\n * @since 3.0.0\n */\n height: 0,\n\n /**\n * The displayed width of this Game Object.\n * \n * This value takes into account the scale factor.\n * \n * Setting this value will adjust the Game Object's scale property.\n * \n * @name Phaser.GameObjects.Components.ComputedSize#displayWidth\n * @type {number}\n * @since 3.0.0\n */\n displayWidth: {\n\n get: function ()\n {\n return this.scaleX * this.width;\n },\n\n set: function (value)\n {\n this.scaleX = value / this.width;\n }\n\n },\n\n /**\n * The displayed height of this Game Object.\n * \n * This value takes into account the scale factor.\n * \n * Setting this value will adjust the Game Object's scale property.\n * \n * @name Phaser.GameObjects.Components.ComputedSize#displayHeight\n * @type {number}\n * @since 3.0.0\n */\n displayHeight: {\n\n get: function ()\n {\n return this.scaleY * this.height;\n },\n\n set: function (value)\n {\n this.scaleY = value / this.height;\n }\n\n },\n\n /**\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\n * \n * This will not change the size that the Game Object is rendered in-game.\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\n * to do so by giving pixel values.\n * \n * If you have enabled this Game Object for input, changing the size will _not_ change the\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\n * \n * @method Phaser.GameObjects.Components.ComputedSize#setSize\n * @since 3.4.0\n *\n * @param {number} width - The width of this Game Object.\n * @param {number} height - The height of this Game Object.\n * \n * @return {this} This Game Object instance.\n */\n setSize: function (width, height)\n {\n this.width = width;\n this.height = height;\n\n return this;\n },\n\n /**\n * Sets the display size of this Game Object.\n * \n * Calling this will adjust the scale.\n * \n * @method Phaser.GameObjects.Components.ComputedSize#setDisplaySize\n * @since 3.4.0\n *\n * @param {number} width - The width of this Game Object.\n * @param {number} height - The height of this Game Object.\n * \n * @return {this} This Game Object instance.\n */\n setDisplaySize: function (width, height)\n {\n this.displayWidth = width;\n this.displayHeight = height;\n\n return this;\n }\n\n};\n\nmodule.exports = ComputedSize;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for getting and setting the texture of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.Crop\n * @since 3.12.0\n */\n\nvar Crop = {\n\n /**\n * The Texture this Game Object is using to render with.\n *\n * @name Phaser.GameObjects.Components.Crop#texture\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\n * @since 3.0.0\n */\n texture: null,\n\n /**\n * The Texture Frame this Game Object is using to render with.\n *\n * @name Phaser.GameObjects.Components.Crop#frame\n * @type {Phaser.Textures.Frame}\n * @since 3.0.0\n */\n frame: null,\n\n /**\n * A boolean flag indicating if this Game Object is being cropped or not.\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\n *\n * @name Phaser.GameObjects.Components.Crop#isCropped\n * @type {boolean}\n * @since 3.11.0\n */\n isCropped: false,\n\n /**\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\n * \n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\n * \n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\n * changes what is shown when rendered.\n * \n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\n * \n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\n * \n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\n * \n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\n * \n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\n * \n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\n * the renderer to skip several internal calculations.\n *\n * @method Phaser.GameObjects.Components.Crop#setCrop\n * @since 3.11.0\n *\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\n * @param {number} [y] - The y coordinate to start the crop from.\n * @param {number} [width] - The width of the crop rectangle in pixels.\n * @param {number} [height] - The height of the crop rectangle in pixels.\n *\n * @return {this} This Game Object instance.\n */\n setCrop: function (x, y, width, height)\n {\n if (x === undefined)\n {\n this.isCropped = false;\n }\n else if (this.frame)\n {\n if (typeof x === 'number')\n {\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\n }\n else\n {\n var rect = x;\n\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\n }\n\n this.isCropped = true;\n }\n\n return this;\n },\n\n /**\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\n *\n * @method Phaser.GameObjects.Components.Crop#resetCropObject\n * @private\n * @since 3.12.0\n * \n * @return {object} The crop object.\n */\n resetCropObject: function ()\n {\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\n }\n\n};\n\nmodule.exports = Crop;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the depth of a Game Object.\n * Should be applied as a mixin and not used directly.\n * \n * @namespace Phaser.GameObjects.Components.Depth\n * @since 3.0.0\n */\n\nvar Depth = {\n\n /**\n * Private internal value. Holds the depth of the Game Object.\n * \n * @name Phaser.GameObjects.Components.Depth#_depth\n * @type {integer}\n * @private\n * @default 0\n * @since 3.0.0\n */\n _depth: 0,\n\n /**\n * The depth of this Game Object within the Scene.\n * \n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\n * of Game Objects, without actually moving their position in the display list.\n *\n * The default depth is zero. A Game Object with a higher depth\n * value will always render in front of one with a lower value.\n *\n * Setting the depth will queue a depth sort event within the Scene.\n * \n * @name Phaser.GameObjects.Components.Depth#depth\n * @type {number}\n * @since 3.0.0\n */\n depth: {\n\n get: function ()\n {\n return this._depth;\n },\n\n set: function (value)\n {\n this.scene.sys.queueDepthSort();\n this._depth = value;\n }\n\n },\n\n /**\n * The depth of this Game Object within the Scene.\n * \n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\n * of Game Objects, without actually moving their position in the display list.\n *\n * The default depth is zero. A Game Object with a higher depth\n * value will always render in front of one with a lower value.\n *\n * Setting the depth will queue a depth sort event within the Scene.\n * \n * @method Phaser.GameObjects.Components.Depth#setDepth\n * @since 3.0.0\n *\n * @param {integer} value - The depth of this Game Object.\n * \n * @return {this} This Game Object instance.\n */\n setDepth: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.depth = value;\n\n return this;\n }\n\n};\n\nmodule.exports = Depth;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for visually flipping a Game Object.\n * Should be applied as a mixin and not used directly.\n * \n * @namespace Phaser.GameObjects.Components.Flip\n * @since 3.0.0\n */\n\nvar Flip = {\n\n /**\n * The horizontally flipped state of the Game Object.\n * \n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\n * \n * @name Phaser.GameObjects.Components.Flip#flipX\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n flipX: false,\n\n /**\n * The vertically flipped state of the Game Object.\n * \n * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down)\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\n * \n * @name Phaser.GameObjects.Components.Flip#flipY\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n flipY: false,\n\n /**\n * Toggles the horizontal flipped state of this Game Object.\n * \n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\n * \n * @method Phaser.GameObjects.Components.Flip#toggleFlipX\n * @since 3.0.0\n * \n * @return {this} This Game Object instance.\n */\n toggleFlipX: function ()\n {\n this.flipX = !this.flipX;\n\n return this;\n },\n\n /**\n * Toggles the vertical flipped state of this Game Object.\n * \n * @method Phaser.GameObjects.Components.Flip#toggleFlipY\n * @since 3.0.0\n * \n * @return {this} This Game Object instance.\n */\n toggleFlipY: function ()\n {\n this.flipY = !this.flipY;\n\n return this;\n },\n\n /**\n * Sets the horizontal flipped state of this Game Object.\n * \n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\n * \n * @method Phaser.GameObjects.Components.Flip#setFlipX\n * @since 3.0.0\n *\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\n * \n * @return {this} This Game Object instance.\n */\n setFlipX: function (value)\n {\n this.flipX = value;\n\n return this;\n },\n\n /**\n * Sets the vertical flipped state of this Game Object.\n * \n * @method Phaser.GameObjects.Components.Flip#setFlipY\n * @since 3.0.0\n *\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\n * \n * @return {this} This Game Object instance.\n */\n setFlipY: function (value)\n {\n this.flipY = value;\n\n return this;\n },\n\n /**\n * Sets the horizontal and vertical flipped state of this Game Object.\n * \n * A Game Object that is flipped will render inversed on the flipped axis.\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\n * \n * @method Phaser.GameObjects.Components.Flip#setFlip\n * @since 3.0.0\n *\n * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\n * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\n * \n * @return {this} This Game Object instance.\n */\n setFlip: function (x, y)\n {\n this.flipX = x;\n this.flipY = y;\n\n return this;\n },\n\n /**\n * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.\n * \n * @method Phaser.GameObjects.Components.Flip#resetFlip\n * @since 3.0.0\n *\n * @return {this} This Game Object instance.\n */\n resetFlip: function ()\n {\n this.flipX = false;\n this.flipY = false;\n\n return this;\n }\n\n};\n\nmodule.exports = Flip;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Rectangle = require('../../geom/rectangle/Rectangle');\nvar RotateAround = require('../../math/RotateAround');\nvar Vector2 = require('../../math/Vector2');\n\n/**\n * Provides methods used for obtaining the bounds of a Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.GetBounds\n * @since 3.0.0\n */\n\nvar GetBounds = {\n\n /**\n * Processes the bounds output vector before returning it.\n *\n * @method Phaser.GameObjects.Components.GetBounds#prepareBoundsOutput\n * @private\n * @since 3.18.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} output - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n prepareBoundsOutput: function (output, includeParent)\n {\n if (includeParent === undefined) { includeParent = false; }\n\n if (this.rotation !== 0)\n {\n RotateAround(output, this.x, this.y, this.rotation);\n }\n\n if (includeParent && this.parentContainer)\n {\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\n\n parentMatrix.transformPoint(output.x, output.y, output);\n }\n\n return output;\n },\n\n /**\n * Gets the center coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getCenter\n * @since 3.0.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getCenter: function (output)\n {\n if (output === undefined) { output = new Vector2(); }\n\n output.x = this.x - (this.displayWidth * this.originX) + (this.displayWidth / 2);\n output.y = this.y - (this.displayHeight * this.originY) + (this.displayHeight / 2);\n\n return output;\n },\n\n /**\n * Gets the top-left corner coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getTopLeft\n * @since 3.0.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getTopLeft: function (output, includeParent)\n {\n if (!output) { output = new Vector2(); }\n\n output.x = this.x - (this.displayWidth * this.originX);\n output.y = this.y - (this.displayHeight * this.originY);\n\n return this.prepareBoundsOutput(output, includeParent);\n },\n\n /**\n * Gets the top-center coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getTopCenter\n * @since 3.18.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getTopCenter: function (output, includeParent)\n {\n if (!output) { output = new Vector2(); }\n\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\n output.y = this.y - (this.displayHeight * this.originY);\n\n return this.prepareBoundsOutput(output, includeParent);\n },\n\n /**\n * Gets the top-right corner coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getTopRight\n * @since 3.0.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getTopRight: function (output, includeParent)\n {\n if (!output) { output = new Vector2(); }\n\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\n output.y = this.y - (this.displayHeight * this.originY);\n\n return this.prepareBoundsOutput(output, includeParent);\n },\n\n /**\n * Gets the left-center coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getLeftCenter\n * @since 3.18.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getLeftCenter: function (output, includeParent)\n {\n if (!output) { output = new Vector2(); }\n\n output.x = this.x - (this.displayWidth * this.originX);\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\n\n return this.prepareBoundsOutput(output, includeParent);\n },\n\n /**\n * Gets the right-center coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getRightCenter\n * @since 3.18.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getRightCenter: function (output, includeParent)\n {\n if (!output) { output = new Vector2(); }\n\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\n\n return this.prepareBoundsOutput(output, includeParent);\n },\n\n /**\n * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getBottomLeft\n * @since 3.0.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getBottomLeft: function (output, includeParent)\n {\n if (!output) { output = new Vector2(); }\n\n output.x = this.x - (this.displayWidth * this.originX);\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\n\n return this.prepareBoundsOutput(output, includeParent);\n },\n\n /**\n * Gets the bottom-center coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getBottomCenter\n * @since 3.18.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getBottomCenter: function (output, includeParent)\n {\n if (!output) { output = new Vector2(); }\n\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\n\n return this.prepareBoundsOutput(output, includeParent);\n },\n\n /**\n * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getBottomRight\n * @since 3.0.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getBottomRight: function (output, includeParent)\n {\n if (!output) { output = new Vector2(); }\n\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\n\n return this.prepareBoundsOutput(output, includeParent);\n },\n\n /**\n * Gets the bounds of this Game Object, regardless of origin.\n * The values are stored and returned in a Rectangle, or Rectangle-like, object.\n *\n * @method Phaser.GameObjects.Components.GetBounds#getBounds\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Rectangle} O - [output,$return]\n *\n * @param {(Phaser.Geom.Rectangle|object)} [output] - An object to store the values in. If not provided a new Rectangle will be created.\n *\n * @return {(Phaser.Geom.Rectangle|object)} The values stored in the output object.\n */\n getBounds: function (output)\n {\n if (output === undefined) { output = new Rectangle(); }\n\n // We can use the output object to temporarily store the x/y coords in:\n\n var TLx, TLy, TRx, TRy, BLx, BLy, BRx, BRy;\n\n // Instead of doing a check if parent container is \n // defined per corner we only do it once.\n if (this.parentContainer)\n {\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\n\n this.getTopLeft(output);\n parentMatrix.transformPoint(output.x, output.y, output);\n\n TLx = output.x;\n TLy = output.y;\n\n this.getTopRight(output);\n parentMatrix.transformPoint(output.x, output.y, output);\n\n TRx = output.x;\n TRy = output.y;\n\n this.getBottomLeft(output);\n parentMatrix.transformPoint(output.x, output.y, output);\n\n BLx = output.x;\n BLy = output.y;\n\n this.getBottomRight(output);\n parentMatrix.transformPoint(output.x, output.y, output);\n\n BRx = output.x;\n BRy = output.y;\n }\n else\n {\n this.getTopLeft(output);\n\n TLx = output.x;\n TLy = output.y;\n\n this.getTopRight(output);\n\n TRx = output.x;\n TRy = output.y;\n\n this.getBottomLeft(output);\n\n BLx = output.x;\n BLy = output.y;\n\n this.getBottomRight(output);\n\n BRx = output.x;\n BRy = output.y;\n }\n\n output.x = Math.min(TLx, TRx, BLx, BRx);\n output.y = Math.min(TLy, TRy, BLy, BRy);\n output.width = Math.max(TLx, TRx, BLx, BRx) - output.x;\n output.height = Math.max(TLy, TRy, BLy, BRy) - output.y;\n\n return output;\n }\n\n};\n\nmodule.exports = GetBounds;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar BitmapMask = require('../../display/mask/BitmapMask');\nvar GeometryMask = require('../../display/mask/GeometryMask');\n\n/**\n * Provides methods used for getting and setting the mask of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.Mask\n * @since 3.0.0\n */\n\nvar Mask = {\n\n /**\n * The Mask this Game Object is using during render.\n *\n * @name Phaser.GameObjects.Components.Mask#mask\n * @type {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask}\n * @since 3.0.0\n */\n mask: null,\n\n /**\n * Sets the mask that this Game Object will use to render with.\n *\n * The mask must have been previously created and can be either a GeometryMask or a BitmapMask.\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\n *\n * If a mask is already set on this Game Object it will be immediately replaced.\n * \n * Masks are positioned in global space and are not relative to the Game Object to which they\n * are applied. The reason for this is that multiple Game Objects can all share the same mask.\n * \n * Masks have no impact on physics or input detection. They are purely a rendering component\n * that allows you to limit what is visible during the render pass.\n *\n * @method Phaser.GameObjects.Components.Mask#setMask\n * @since 3.6.2\n *\n * @param {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask} mask - The mask this Game Object will use when rendering.\n *\n * @return {this} This Game Object instance.\n */\n setMask: function (mask)\n {\n this.mask = mask;\n\n return this;\n },\n\n /**\n * Clears the mask that this Game Object was using.\n *\n * @method Phaser.GameObjects.Components.Mask#clearMask\n * @since 3.6.2\n *\n * @param {boolean} [destroyMask=false] - Destroy the mask before clearing it?\n *\n * @return {this} This Game Object instance.\n */\n clearMask: function (destroyMask)\n {\n if (destroyMask === undefined) { destroyMask = false; }\n\n if (destroyMask && this.mask)\n {\n this.mask.destroy();\n }\n\n this.mask = null;\n\n return this;\n },\n\n /**\n * Creates and returns a Bitmap Mask. This mask can be used by any Game Object,\n * including this one.\n *\n * To create the mask you need to pass in a reference to a renderable Game Object.\n * A renderable Game Object is one that uses a texture to render with, such as an\n * Image, Sprite, Render Texture or BitmapText.\n *\n * If you do not provide a renderable object, and this Game Object has a texture,\n * it will use itself as the object. This means you can call this method to create\n * a Bitmap Mask from any renderable Game Object.\n *\n * @method Phaser.GameObjects.Components.Mask#createBitmapMask\n * @since 3.6.2\n * \n * @param {Phaser.GameObjects.GameObject} [renderable] - A renderable Game Object that uses a texture, such as a Sprite.\n *\n * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created.\n */\n createBitmapMask: function (renderable)\n {\n if (renderable === undefined && (this.texture || this.shader))\n {\n // eslint-disable-next-line consistent-this\n renderable = this;\n }\n\n return new BitmapMask(this.scene, renderable);\n },\n\n /**\n * Creates and returns a Geometry Mask. This mask can be used by any Game Object,\n * including this one.\n *\n * To create the mask you need to pass in a reference to a Graphics Game Object.\n *\n * If you do not provide a graphics object, and this Game Object is an instance\n * of a Graphics object, then it will use itself to create the mask.\n * \n * This means you can call this method to create a Geometry Mask from any Graphics Game Object.\n *\n * @method Phaser.GameObjects.Components.Mask#createGeometryMask\n * @since 3.6.2\n * \n * @param {Phaser.GameObjects.Graphics} [graphics] - A Graphics Game Object. The geometry within it will be used as the mask.\n *\n * @return {Phaser.Display.Masks.GeometryMask} This Geometry Mask that was created.\n */\n createGeometryMask: function (graphics)\n {\n if (graphics === undefined && this.type === 'Graphics')\n {\n // eslint-disable-next-line consistent-this\n graphics = this;\n }\n\n return new GeometryMask(this.scene, graphics);\n }\n\n};\n\nmodule.exports = Mask;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for getting and setting the origin of a Game Object.\n * Values are normalized, given in the range 0 to 1.\n * Display values contain the calculated pixel values.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.Origin\n * @since 3.0.0\n */\n\nvar Origin = {\n\n /**\n * A property indicating that a Game Object has this component.\n *\n * @name Phaser.GameObjects.Components.Origin#_originComponent\n * @type {boolean}\n * @private\n * @default true\n * @since 3.2.0\n */\n _originComponent: true,\n\n /**\n * The horizontal origin of this Game Object.\n * The origin maps the relationship between the size and position of the Game Object.\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\n * Setting the value to 0 means the position now relates to the left of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Origin#originX\n * @type {number}\n * @default 0.5\n * @since 3.0.0\n */\n originX: 0.5,\n\n /**\n * The vertical origin of this Game Object.\n * The origin maps the relationship between the size and position of the Game Object.\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\n * Setting the value to 0 means the position now relates to the top of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Origin#originY\n * @type {number}\n * @default 0.5\n * @since 3.0.0\n */\n originY: 0.5,\n\n // private + read only\n _displayOriginX: 0,\n _displayOriginY: 0,\n\n /**\n * The horizontal display origin of this Game Object.\n * The origin is a normalized value between 0 and 1.\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\n *\n * @name Phaser.GameObjects.Components.Origin#displayOriginX\n * @type {number}\n * @since 3.0.0\n */\n displayOriginX: {\n\n get: function ()\n {\n return this._displayOriginX;\n },\n\n set: function (value)\n {\n this._displayOriginX = value;\n this.originX = value / this.width;\n }\n\n },\n\n /**\n * The vertical display origin of this Game Object.\n * The origin is a normalized value between 0 and 1.\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\n *\n * @name Phaser.GameObjects.Components.Origin#displayOriginY\n * @type {number}\n * @since 3.0.0\n */\n displayOriginY: {\n\n get: function ()\n {\n return this._displayOriginY;\n },\n\n set: function (value)\n {\n this._displayOriginY = value;\n this.originY = value / this.height;\n }\n\n },\n\n /**\n * Sets the origin of this Game Object.\n *\n * The values are given in the range 0 to 1.\n *\n * @method Phaser.GameObjects.Components.Origin#setOrigin\n * @since 3.0.0\n *\n * @param {number} [x=0.5] - The horizontal origin value.\n * @param {number} [y=x] - The vertical origin value. If not defined it will be set to the value of `x`.\n *\n * @return {this} This Game Object instance.\n */\n setOrigin: function (x, y)\n {\n if (x === undefined) { x = 0.5; }\n if (y === undefined) { y = x; }\n\n this.originX = x;\n this.originY = y;\n\n return this.updateDisplayOrigin();\n },\n\n /**\n * Sets the origin of this Game Object based on the Pivot values in its Frame.\n *\n * @method Phaser.GameObjects.Components.Origin#setOriginFromFrame\n * @since 3.0.0\n *\n * @return {this} This Game Object instance.\n */\n setOriginFromFrame: function ()\n {\n if (!this.frame || !this.frame.customPivot)\n {\n return this.setOrigin();\n }\n else\n {\n this.originX = this.frame.pivotX;\n this.originY = this.frame.pivotY;\n }\n\n return this.updateDisplayOrigin();\n },\n\n /**\n * Sets the display origin of this Game Object.\n * The difference between this and setting the origin is that you can use pixel values for setting the display origin.\n *\n * @method Phaser.GameObjects.Components.Origin#setDisplayOrigin\n * @since 3.0.0\n *\n * @param {number} [x=0] - The horizontal display origin value.\n * @param {number} [y=x] - The vertical display origin value. If not defined it will be set to the value of `x`.\n *\n * @return {this} This Game Object instance.\n */\n setDisplayOrigin: function (x, y)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = x; }\n\n this.displayOriginX = x;\n this.displayOriginY = y;\n\n return this;\n },\n\n /**\n * Updates the Display Origin cached values internally stored on this Game Object.\n * You don't usually call this directly, but it is exposed for edge-cases where you may.\n *\n * @method Phaser.GameObjects.Components.Origin#updateDisplayOrigin\n * @since 3.0.0\n *\n * @return {this} This Game Object instance.\n */\n updateDisplayOrigin: function ()\n {\n this._displayOriginX = this.originX * this.width;\n this._displayOriginY = this.originY * this.height;\n\n return this;\n }\n\n};\n\nmodule.exports = Origin;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar DegToRad = require('../../math/DegToRad');\nvar GetBoolean = require('../../tweens/builders/GetBoolean');\nvar GetValue = require('../../utils/object/GetValue');\nvar TWEEN_CONST = require('../../tweens/tween/const');\nvar Vector2 = require('../../math/Vector2');\n\n/**\n * Provides methods used for managing a Game Object following a Path.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.PathFollower\n * @since 3.17.0\n */\n\nvar PathFollower = {\n\n /**\n * The Path this PathFollower is following. It can only follow one Path at a time.\n *\n * @name Phaser.GameObjects.Components.PathFollower#path\n * @type {Phaser.Curves.Path}\n * @since 3.0.0\n */\n path: null,\n\n /**\n * Should the PathFollower automatically rotate to point in the direction of the Path?\n *\n * @name Phaser.GameObjects.Components.PathFollower#rotateToPath\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n rotateToPath: false,\n\n /**\n * If the PathFollower is rotating to match the Path (@see Phaser.GameObjects.PathFollower#rotateToPath)\n * this value is added to the rotation value. This allows you to rotate objects to a path but control\n * the angle of the rotation as well.\n *\n * @name Phaser.GameObjects.PathFollower#pathRotationOffset\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n pathRotationOffset: 0,\n\n /**\n * An additional vector to add to the PathFollowers position, allowing you to offset it from the\n * Path coordinates.\n *\n * @name Phaser.GameObjects.PathFollower#pathOffset\n * @type {Phaser.Math.Vector2}\n * @since 3.0.0\n */\n pathOffset: null,\n\n /**\n * A Vector2 that stores the current point of the path the follower is on.\n *\n * @name Phaser.GameObjects.PathFollower#pathVector\n * @type {Phaser.Math.Vector2}\n * @since 3.0.0\n */\n pathVector: null,\n\n /**\n * The distance the follower has traveled from the previous point to the current one, at the last update.\n *\n * @name Phaser.GameObjects.PathFollower#pathDelta\n * @type {Phaser.Math.Vector2}\n * @since 3.23.0\n */\n pathDelta: null,\n\n /**\n * The Tween used for following the Path.\n *\n * @name Phaser.GameObjects.PathFollower#pathTween\n * @type {Phaser.Tweens.Tween}\n * @since 3.0.0\n */\n pathTween: null,\n\n /**\n * Settings for the PathFollower.\n *\n * @name Phaser.GameObjects.PathFollower#pathConfig\n * @type {?Phaser.Types.GameObjects.PathFollower.PathConfig}\n * @default null\n * @since 3.0.0\n */\n pathConfig: null,\n\n /**\n * Records the direction of the follower so it can change direction.\n *\n * @name Phaser.GameObjects.PathFollower#_prevDirection\n * @type {integer}\n * @private\n * @since 3.0.0\n */\n _prevDirection: TWEEN_CONST.PLAYING_FORWARD,\n\n /**\n * Set the Path that this PathFollower should follow.\n *\n * Optionally accepts {@link Phaser.Types.GameObjects.PathFollower.PathConfig} settings.\n *\n * @method Phaser.GameObjects.Components.PathFollower#setPath\n * @since 3.0.0\n *\n * @param {Phaser.Curves.Path} path - The Path this PathFollower is following. It can only follow one Path at a time.\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config] - Settings for the PathFollower.\n *\n * @return {this} This Game Object.\n */\n setPath: function (path, config)\n {\n if (config === undefined) { config = this.pathConfig; }\n\n var tween = this.pathTween;\n\n if (tween && tween.isPlaying())\n {\n tween.stop();\n }\n\n this.path = path;\n\n if (config)\n {\n this.startFollow(config);\n }\n\n return this;\n },\n\n /**\n * Set whether the PathFollower should automatically rotate to point in the direction of the Path.\n *\n * @method Phaser.GameObjects.Components.PathFollower#setRotateToPath\n * @since 3.0.0\n *\n * @param {boolean} value - Whether the PathFollower should automatically rotate to point in the direction of the Path.\n * @param {number} [offset=0] - Rotation offset in degrees.\n *\n * @return {this} This Game Object.\n */\n setRotateToPath: function (value, offset)\n {\n if (offset === undefined) { offset = 0; }\n\n this.rotateToPath = value;\n\n this.pathRotationOffset = offset;\n\n return this;\n },\n\n /**\n * Is this PathFollower actively following a Path or not?\n *\n * To be considered as `isFollowing` it must be currently moving on a Path, and not paused.\n *\n * @method Phaser.GameObjects.Components.PathFollower#isFollowing\n * @since 3.0.0\n *\n * @return {boolean} `true` is this PathFollower is actively following a Path, otherwise `false`.\n */\n isFollowing: function ()\n {\n var tween = this.pathTween;\n\n return (tween && tween.isPlaying());\n },\n\n /**\n * Starts this PathFollower following its given Path.\n *\n * @method Phaser.GameObjects.Components.PathFollower#startFollow\n * @since 3.3.0\n *\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config={}] - The duration of the follow, or a PathFollower config object.\n * @param {number} [startAt=0] - Optional start position of the follow, between 0 and 1.\n *\n * @return {this} This Game Object.\n */\n startFollow: function (config, startAt)\n {\n if (config === undefined) { config = {}; }\n if (startAt === undefined) { startAt = 0; }\n\n var tween = this.pathTween;\n\n if (tween && tween.isPlaying())\n {\n tween.stop();\n }\n\n if (typeof config === 'number')\n {\n config = { duration: config };\n }\n\n // Override in case they've been specified in the config\n config.from = GetValue(config, 'from', 0);\n config.to = GetValue(config, 'to', 1);\n\n var positionOnPath = GetBoolean(config, 'positionOnPath', false);\n\n this.rotateToPath = GetBoolean(config, 'rotateToPath', false);\n this.pathRotationOffset = GetValue(config, 'rotationOffset', 0);\n\n // This works, but it's not an ideal way of doing it as the follower jumps position\n var seek = GetValue(config, 'startAt', startAt);\n\n if (seek)\n {\n config.onStart = function (tween)\n {\n var tweenData = tween.data[0];\n tweenData.progress = seek;\n tweenData.elapsed = tweenData.duration * seek;\n var v = tweenData.ease(tweenData.progress);\n tweenData.current = tweenData.start + ((tweenData.end - tweenData.start) * v);\n tweenData.target[tweenData.key] = tweenData.current;\n };\n }\n\n if (!this.pathOffset)\n {\n this.pathOffset = new Vector2(this.x, this.y);\n }\n\n if (!this.pathVector)\n {\n this.pathVector = new Vector2();\n }\n\n if (!this.pathDelta)\n {\n this.pathDelta = new Vector2();\n }\n\n this.pathDelta.reset();\n\n this.pathTween = this.scene.sys.tweens.addCounter(config);\n\n // The starting point of the path, relative to this follower\n this.path.getStartPoint(this.pathOffset);\n\n if (positionOnPath)\n {\n this.x = this.pathOffset.x;\n this.y = this.pathOffset.y;\n }\n\n this.pathOffset.x = this.x - this.pathOffset.x;\n this.pathOffset.y = this.y - this.pathOffset.y;\n\n this._prevDirection = TWEEN_CONST.PLAYING_FORWARD;\n\n if (this.rotateToPath)\n {\n // Set the rotation now (in case the tween has a delay on it, etc)\n var nextPoint = this.path.getPoint(0.1);\n\n this.rotation = Math.atan2(nextPoint.y - this.y, nextPoint.x - this.x) + DegToRad(this.pathRotationOffset);\n }\n\n this.pathConfig = config;\n\n return this;\n },\n\n /**\n * Pauses this PathFollower. It will still continue to render, but it will remain motionless at the\n * point on the Path at which you paused it.\n *\n * @method Phaser.GameObjects.Components.PathFollower#pauseFollow\n * @since 3.3.0\n *\n * @return {this} This Game Object.\n */\n pauseFollow: function ()\n {\n var tween = this.pathTween;\n\n if (tween && tween.isPlaying())\n {\n tween.pause();\n }\n\n return this;\n },\n\n /**\n * Resumes a previously paused PathFollower.\n *\n * If the PathFollower was not paused this has no effect.\n *\n * @method Phaser.GameObjects.Components.PathFollower#resumeFollow\n * @since 3.3.0\n *\n * @return {this} This Game Object.\n */\n resumeFollow: function ()\n {\n var tween = this.pathTween;\n\n if (tween && tween.isPaused())\n {\n tween.resume();\n }\n\n return this;\n },\n\n /**\n * Stops this PathFollower from following the path any longer.\n *\n * This will invoke any 'stop' conditions that may exist on the Path, or for the follower.\n *\n * @method Phaser.GameObjects.Components.PathFollower#stopFollow\n * @since 3.3.0\n *\n * @return {this} This Game Object.\n */\n stopFollow: function ()\n {\n var tween = this.pathTween;\n\n if (tween && tween.isPlaying())\n {\n tween.stop();\n }\n\n return this;\n },\n\n /**\n * Internal update handler that advances this PathFollower along the path.\n *\n * Called automatically by the Scene step, should not typically be called directly.\n *\n * @method Phaser.GameObjects.Components.PathFollower#pathUpdate\n * @since 3.17.0\n */\n pathUpdate: function ()\n {\n var tween = this.pathTween;\n\n if (tween)\n {\n var tweenData = tween.data[0];\n var pathDelta = this.pathDelta;\n var pathVector = this.pathVector;\n\n pathDelta.copy(pathVector).negate();\n\n if (tweenData.state === TWEEN_CONST.COMPLETE)\n {\n this.path.getPoint(1, pathVector);\n\n pathDelta.add(pathVector);\n pathVector.add(this.pathOffset);\n\n this.setPosition(pathVector.x, pathVector.y);\n\n return;\n }\n else if (tweenData.state !== TWEEN_CONST.PLAYING_FORWARD && tweenData.state !== TWEEN_CONST.PLAYING_BACKWARD)\n {\n // If delayed, etc then bail out\n return;\n }\n\n this.path.getPoint(tween.getValue(), pathVector);\n\n pathDelta.add(pathVector);\n pathVector.add(this.pathOffset);\n\n var oldX = this.x;\n var oldY = this.y;\n\n this.setPosition(pathVector.x, pathVector.y);\n\n var speedX = this.x - oldX;\n var speedY = this.y - oldY;\n\n if (speedX === 0 && speedY === 0)\n {\n // Bail out early\n return;\n }\n\n if (tweenData.state !== this._prevDirection)\n {\n // We've changed direction, so don't do a rotate this frame\n this._prevDirection = tweenData.state;\n\n return;\n }\n\n if (this.rotateToPath)\n {\n this.rotation = Math.atan2(speedY, speedX) + DegToRad(this.pathRotationOffset);\n }\n }\n }\n\n};\n\nmodule.exports = PathFollower;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the WebGL rendering pipeline of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.Pipeline\n * @webglOnly\n * @since 3.0.0\n */\n\nvar Pipeline = {\n\n /**\n * The initial WebGL pipeline of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Pipeline#defaultPipeline\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\n * @default null\n * @webglOnly\n * @since 3.0.0\n */\n defaultPipeline: null,\n\n /**\n * The current WebGL pipeline of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Pipeline#pipeline\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\n * @default null\n * @webglOnly\n * @since 3.0.0\n */\n pipeline: null,\n\n /**\n * Sets the initial WebGL Pipeline of this Game Object.\n *\n * This should only be called during the instantiation of the Game Object.\n *\n * @method Phaser.GameObjects.Components.Pipeline#initPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @param {string} [pipelineName=MultiPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Multi Pipeline.\n *\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\n */\n initPipeline: function (pipelineName)\n {\n if (pipelineName === undefined) { pipelineName = 'MultiPipeline'; }\n\n var renderer = this.scene.sys.game.renderer;\n\n if (renderer && renderer.gl && renderer.hasPipeline(pipelineName))\n {\n this.defaultPipeline = renderer.getPipeline(pipelineName);\n this.pipeline = this.defaultPipeline;\n\n return true;\n }\n\n return false;\n },\n\n /**\n * Sets the active WebGL Pipeline of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Pipeline#setPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @param {string} pipelineName - The name of the pipeline to set on this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setPipeline: function (pipelineName)\n {\n var renderer = this.scene.sys.game.renderer;\n\n if (renderer && renderer.gl && renderer.hasPipeline(pipelineName))\n {\n this.pipeline = renderer.getPipeline(pipelineName);\n }\n\n return this;\n },\n\n /**\n * Resets the WebGL Pipeline of this Game Object back to the default it was created with.\n *\n * @method Phaser.GameObjects.Components.Pipeline#resetPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\n */\n resetPipeline: function ()\n {\n this.pipeline = this.defaultPipeline;\n\n return (this.pipeline !== null);\n },\n\n /**\n * Gets the name of the WebGL Pipeline this Game Object is currently using.\n *\n * @method Phaser.GameObjects.Components.Pipeline#getPipelineName\n * @webglOnly\n * @since 3.0.0\n *\n * @return {string} The string-based name of the pipeline being used by this Game Object.\n */\n getPipelineName: function ()\n {\n return this.pipeline.name;\n }\n\n};\n\nmodule.exports = Pipeline;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for getting and setting the Scroll Factor of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.ScrollFactor\n * @since 3.0.0\n */\n\nvar ScrollFactor = {\n\n /**\n * The horizontal scroll factor of this Game Object.\n *\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\n *\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\n * It does not change the Game Objects actual position values.\n *\n * A value of 1 means it will move exactly in sync with a camera.\n * A value of 0 means it will not move at all, even if the camera moves.\n * Other values control the degree to which the camera movement is mapped to this Game Object.\n * \n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\n * calculating physics collisions. Bodies always collide based on their world position, but changing\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\n * them from physics bodies if not accounted for in your code.\n *\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorX\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n scrollFactorX: 1,\n\n /**\n * The vertical scroll factor of this Game Object.\n *\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\n *\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\n * It does not change the Game Objects actual position values.\n *\n * A value of 1 means it will move exactly in sync with a camera.\n * A value of 0 means it will not move at all, even if the camera moves.\n * Other values control the degree to which the camera movement is mapped to this Game Object.\n * \n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\n * calculating physics collisions. Bodies always collide based on their world position, but changing\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\n * them from physics bodies if not accounted for in your code.\n *\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorY\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n scrollFactorY: 1,\n\n /**\n * Sets the scroll factor of this Game Object.\n *\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\n *\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\n * It does not change the Game Objects actual position values.\n *\n * A value of 1 means it will move exactly in sync with a camera.\n * A value of 0 means it will not move at all, even if the camera moves.\n * Other values control the degree to which the camera movement is mapped to this Game Object.\n * \n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\n * calculating physics collisions. Bodies always collide based on their world position, but changing\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\n * them from physics bodies if not accounted for in your code.\n *\n * @method Phaser.GameObjects.Components.ScrollFactor#setScrollFactor\n * @since 3.0.0\n *\n * @param {number} x - The horizontal scroll factor of this Game Object.\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\n *\n * @return {this} This Game Object instance.\n */\n setScrollFactor: function (x, y)\n {\n if (y === undefined) { y = x; }\n\n this.scrollFactorX = x;\n this.scrollFactorY = y;\n\n return this;\n }\n\n};\n\nmodule.exports = ScrollFactor;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for getting and setting the size of a Game Object.\n * \n * @namespace Phaser.GameObjects.Components.Size\n * @since 3.0.0\n */\n\nvar Size = {\n\n /**\n * A property indicating that a Game Object has this component.\n * \n * @name Phaser.GameObjects.Components.Size#_sizeComponent\n * @type {boolean}\n * @private\n * @default true\n * @since 3.2.0\n */\n _sizeComponent: true,\n\n /**\n * The native (un-scaled) width of this Game Object.\n * \n * Changing this value will not change the size that the Game Object is rendered in-game.\n * For that you need to either set the scale of the Game Object (`setScale`) or use\n * the `displayWidth` property.\n * \n * @name Phaser.GameObjects.Components.Size#width\n * @type {number}\n * @since 3.0.0\n */\n width: 0,\n\n /**\n * The native (un-scaled) height of this Game Object.\n * \n * Changing this value will not change the size that the Game Object is rendered in-game.\n * For that you need to either set the scale of the Game Object (`setScale`) or use\n * the `displayHeight` property.\n * \n * @name Phaser.GameObjects.Components.Size#height\n * @type {number}\n * @since 3.0.0\n */\n height: 0,\n\n /**\n * The displayed width of this Game Object.\n * \n * This value takes into account the scale factor.\n * \n * Setting this value will adjust the Game Object's scale property.\n * \n * @name Phaser.GameObjects.Components.Size#displayWidth\n * @type {number}\n * @since 3.0.0\n */\n displayWidth: {\n\n get: function ()\n {\n return Math.abs(this.scaleX * this.frame.realWidth);\n },\n\n set: function (value)\n {\n this.scaleX = value / this.frame.realWidth;\n }\n\n },\n\n /**\n * The displayed height of this Game Object.\n * \n * This value takes into account the scale factor.\n * \n * Setting this value will adjust the Game Object's scale property.\n * \n * @name Phaser.GameObjects.Components.Size#displayHeight\n * @type {number}\n * @since 3.0.0\n */\n displayHeight: {\n\n get: function ()\n {\n return Math.abs(this.scaleY * this.frame.realHeight);\n },\n\n set: function (value)\n {\n this.scaleY = value / this.frame.realHeight;\n }\n\n },\n\n /**\n * Sets the size of this Game Object to be that of the given Frame.\n * \n * This will not change the size that the Game Object is rendered in-game.\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\n * to do so by giving pixel values.\n * \n * If you have enabled this Game Object for input, changing the size will _not_ change the\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\n * \n * @method Phaser.GameObjects.Components.Size#setSizeToFrame\n * @since 3.0.0\n *\n * @param {Phaser.Textures.Frame} frame - The frame to base the size of this Game Object on.\n * \n * @return {this} This Game Object instance.\n */\n setSizeToFrame: function (frame)\n {\n if (frame === undefined) { frame = this.frame; }\n\n this.width = frame.realWidth;\n this.height = frame.realHeight;\n\n return this;\n },\n\n /**\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\n * \n * This will not change the size that the Game Object is rendered in-game.\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\n * to do so by giving pixel values.\n * \n * If you have enabled this Game Object for input, changing the size will _not_ change the\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\n * \n * @method Phaser.GameObjects.Components.Size#setSize\n * @since 3.0.0\n *\n * @param {number} width - The width of this Game Object.\n * @param {number} height - The height of this Game Object.\n * \n * @return {this} This Game Object instance.\n */\n setSize: function (width, height)\n {\n this.width = width;\n this.height = height;\n\n return this;\n },\n\n /**\n * Sets the display size of this Game Object.\n * \n * Calling this will adjust the scale.\n * \n * @method Phaser.GameObjects.Components.Size#setDisplaySize\n * @since 3.0.0\n *\n * @param {number} width - The width of this Game Object.\n * @param {number} height - The height of this Game Object.\n * \n * @return {this} This Game Object instance.\n */\n setDisplaySize: function (width, height)\n {\n this.displayWidth = width;\n this.displayHeight = height;\n\n return this;\n }\n\n};\n\nmodule.exports = Size;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// bitmask flag for GameObject.renderMask\nvar _FLAG = 8; // 1000\n\n/**\n * Provides methods used for getting and setting the texture of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.Texture\n * @since 3.0.0\n */\n\nvar Texture = {\n\n /**\n * The Texture this Game Object is using to render with.\n *\n * @name Phaser.GameObjects.Components.Texture#texture\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\n * @since 3.0.0\n */\n texture: null,\n\n /**\n * The Texture Frame this Game Object is using to render with.\n *\n * @name Phaser.GameObjects.Components.Texture#frame\n * @type {Phaser.Textures.Frame}\n * @since 3.0.0\n */\n frame: null,\n\n /**\n * Internal flag. Not to be set by this Game Object.\n *\n * @name Phaser.GameObjects.Components.Texture#isCropped\n * @type {boolean}\n * @private\n * @since 3.11.0\n */\n isCropped: false,\n\n /**\n * Sets the texture and frame this Game Object will use to render with.\n *\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\n *\n * @method Phaser.GameObjects.Components.Texture#setTexture\n * @since 3.0.0\n *\n * @param {(string|Phaser.Textures.Texture)} key - The key of the texture to be used, as stored in the Texture Manager, or a Texture instance.\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\n *\n * @return {this} This Game Object instance.\n */\n setTexture: function (key, frame)\n {\n this.texture = this.scene.sys.textures.get(key);\n\n return this.setFrame(frame);\n },\n\n /**\n * Sets the frame this Game Object will use to render with.\n *\n * The Frame has to belong to the current Texture being used.\n *\n * It can be either a string or an index.\n *\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\n *\n * @method Phaser.GameObjects.Components.Texture#setFrame\n * @since 3.0.0\n *\n * @param {(string|integer)} frame - The name or index of the frame within the Texture.\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\n *\n * @return {this} This Game Object instance.\n */\n setFrame: function (frame, updateSize, updateOrigin)\n {\n if (updateSize === undefined) { updateSize = true; }\n if (updateOrigin === undefined) { updateOrigin = true; }\n\n this.frame = this.texture.get(frame);\n\n if (!this.frame.cutWidth || !this.frame.cutHeight)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n\n if (this._sizeComponent && updateSize)\n {\n this.setSizeToFrame();\n }\n\n if (this._originComponent && updateOrigin)\n {\n if (this.frame.customPivot)\n {\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\n }\n else\n {\n this.updateDisplayOrigin();\n }\n }\n\n return this;\n }\n\n};\n\nmodule.exports = Texture;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// bitmask flag for GameObject.renderMask\nvar _FLAG = 8; // 1000\n\n/**\n * Provides methods used for getting and setting the texture of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.TextureCrop\n * @since 3.0.0\n */\n\nvar TextureCrop = {\n\n /**\n * The Texture this Game Object is using to render with.\n *\n * @name Phaser.GameObjects.Components.TextureCrop#texture\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\n * @since 3.0.0\n */\n texture: null,\n\n /**\n * The Texture Frame this Game Object is using to render with.\n *\n * @name Phaser.GameObjects.Components.TextureCrop#frame\n * @type {Phaser.Textures.Frame}\n * @since 3.0.0\n */\n frame: null,\n\n /**\n * A boolean flag indicating if this Game Object is being cropped or not.\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\n *\n * @name Phaser.GameObjects.Components.TextureCrop#isCropped\n * @type {boolean}\n * @since 3.11.0\n */\n isCropped: false,\n\n /**\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\n * \n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\n * \n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\n * changes what is shown when rendered.\n * \n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\n * \n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\n * \n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\n * \n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\n * \n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\n * \n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\n * the renderer to skip several internal calculations.\n *\n * @method Phaser.GameObjects.Components.TextureCrop#setCrop\n * @since 3.11.0\n *\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\n * @param {number} [y] - The y coordinate to start the crop from.\n * @param {number} [width] - The width of the crop rectangle in pixels.\n * @param {number} [height] - The height of the crop rectangle in pixels.\n *\n * @return {this} This Game Object instance.\n */\n setCrop: function (x, y, width, height)\n {\n if (x === undefined)\n {\n this.isCropped = false;\n }\n else if (this.frame)\n {\n if (typeof x === 'number')\n {\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\n }\n else\n {\n var rect = x;\n\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\n }\n\n this.isCropped = true;\n }\n\n return this;\n },\n\n /**\n * Sets the texture and frame this Game Object will use to render with.\n *\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\n *\n * @method Phaser.GameObjects.Components.TextureCrop#setTexture\n * @since 3.0.0\n *\n * @param {string} key - The key of the texture to be used, as stored in the Texture Manager.\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\n *\n * @return {this} This Game Object instance.\n */\n setTexture: function (key, frame)\n {\n this.texture = this.scene.sys.textures.get(key);\n\n return this.setFrame(frame);\n },\n\n /**\n * Sets the frame this Game Object will use to render with.\n *\n * The Frame has to belong to the current Texture being used.\n *\n * It can be either a string or an index.\n *\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\n *\n * @method Phaser.GameObjects.Components.TextureCrop#setFrame\n * @since 3.0.0\n *\n * @param {(string|integer)} frame - The name or index of the frame within the Texture.\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\n *\n * @return {this} This Game Object instance.\n */\n setFrame: function (frame, updateSize, updateOrigin)\n {\n if (updateSize === undefined) { updateSize = true; }\n if (updateOrigin === undefined) { updateOrigin = true; }\n\n this.frame = this.texture.get(frame);\n\n if (!this.frame.cutWidth || !this.frame.cutHeight)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n\n if (this._sizeComponent && updateSize)\n {\n this.setSizeToFrame();\n }\n\n if (this._originComponent && updateOrigin)\n {\n if (this.frame.customPivot)\n {\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\n }\n else\n {\n this.updateDisplayOrigin();\n }\n }\n\n if (this.isCropped)\n {\n this.frame.updateCropUVs(this._crop, this.flipX, this.flipY);\n }\n\n return this;\n },\n\n /**\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\n *\n * @method Phaser.GameObjects.Components.TextureCrop#resetCropObject\n * @private\n * @since 3.12.0\n * \n * @return {object} The crop object.\n */\n resetCropObject: function ()\n {\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\n }\n\n};\n\nmodule.exports = TextureCrop;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar GetColorFromValue = require('../../display/color/GetColorFromValue');\n\n/**\n * Provides methods used for setting the tint of a Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.Tint\n * @webglOnly\n * @since 3.0.0\n */\n\nvar Tint = {\n\n /**\n * Private internal value. Holds the top-left tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#_tintTL\n * @type {number}\n * @private\n * @default 16777215\n * @since 3.0.0\n */\n _tintTL: 16777215,\n\n /**\n * Private internal value. Holds the top-right tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#_tintTR\n * @type {number}\n * @private\n * @default 16777215\n * @since 3.0.0\n */\n _tintTR: 16777215,\n\n /**\n * Private internal value. Holds the bottom-left tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#_tintBL\n * @type {number}\n * @private\n * @default 16777215\n * @since 3.0.0\n */\n _tintBL: 16777215,\n\n /**\n * Private internal value. Holds the bottom-right tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#_tintBR\n * @type {number}\n * @private\n * @default 16777215\n * @since 3.0.0\n */\n _tintBR: 16777215,\n\n /**\n * Private internal value. Holds if the Game Object is tinted or not.\n *\n * @name Phaser.GameObjects.Components.Tint#_isTinted\n * @type {boolean}\n * @private\n * @default false\n * @since 3.11.0\n */\n _isTinted: false,\n\n /**\n * Fill or additive?\n *\n * @name Phaser.GameObjects.Components.Tint#tintFill\n * @type {boolean}\n * @default false\n * @since 3.11.0\n */\n tintFill: false,\n\n /**\n * Clears all tint values associated with this Game Object.\n *\n * Immediately sets the color values back to 0xffffff and the tint type to 'additive',\n * which results in no visible change to the texture.\n *\n * @method Phaser.GameObjects.Components.Tint#clearTint\n * @webglOnly\n * @since 3.0.0\n *\n * @return {this} This Game Object instance.\n */\n clearTint: function ()\n {\n this.setTint(0xffffff);\n\n this._isTinted = false;\n\n return this;\n },\n\n /**\n * Sets an additive tint on this Game Object.\n *\n * The tint works by taking the pixel color values from the Game Objects texture, and then\n * multiplying it by the color value of the tint. You can provide either one color value,\n * in which case the whole Game Object will be tinted in that color. Or you can provide a color\n * per corner. The colors are blended together across the extent of the Game Object.\n *\n * To modify the tint color once set, either call this method again with new values or use the\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\n *\n * To remove a tint call `clearTint`.\n *\n * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`.\n *\n * @method Phaser.GameObjects.Components.Tint#setTint\n * @webglOnly\n * @since 3.0.0\n *\n * @param {integer} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object.\n * @param {integer} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {integer} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {integer} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setTint: function (topLeft, topRight, bottomLeft, bottomRight)\n {\n if (topLeft === undefined) { topLeft = 0xffffff; }\n\n if (topRight === undefined)\n {\n topRight = topLeft;\n bottomLeft = topLeft;\n bottomRight = topLeft;\n }\n\n this._tintTL = GetColorFromValue(topLeft);\n this._tintTR = GetColorFromValue(topRight);\n this._tintBL = GetColorFromValue(bottomLeft);\n this._tintBR = GetColorFromValue(bottomRight);\n\n this._isTinted = true;\n\n this.tintFill = false;\n\n return this;\n },\n\n /**\n * Sets a fill-based tint on this Game Object.\n *\n * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture\n * with those in the tint. You can use this for effects such as making a player flash 'white'\n * if hit by something. You can provide either one color value, in which case the whole\n * Game Object will be rendered in that color. Or you can provide a color per corner. The colors\n * are blended together across the extent of the Game Object.\n *\n * To modify the tint color once set, either call this method again with new values or use the\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\n *\n * To remove a tint call `clearTint`.\n *\n * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`.\n *\n * @method Phaser.GameObjects.Components.Tint#setTintFill\n * @webglOnly\n * @since 3.11.0\n *\n * @param {integer} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object.\n * @param {integer} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {integer} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {integer} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setTintFill: function (topLeft, topRight, bottomLeft, bottomRight)\n {\n this.setTint(topLeft, topRight, bottomLeft, bottomRight);\n\n this.tintFill = true;\n\n return this;\n },\n\n /**\n * The tint value being applied to the top-left of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopLeft\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tintTopLeft: {\n\n get: function ()\n {\n return this._tintTL;\n },\n\n set: function (value)\n {\n this._tintTL = GetColorFromValue(value);\n this._isTinted = true;\n }\n\n },\n\n /**\n * The tint value being applied to the top-right of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopRight\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tintTopRight: {\n\n get: function ()\n {\n return this._tintTR;\n },\n\n set: function (value)\n {\n this._tintTR = GetColorFromValue(value);\n this._isTinted = true;\n }\n\n },\n\n /**\n * The tint value being applied to the bottom-left of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomLeft\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tintBottomLeft: {\n\n get: function ()\n {\n return this._tintBL;\n },\n\n set: function (value)\n {\n this._tintBL = GetColorFromValue(value);\n this._isTinted = true;\n }\n\n },\n\n /**\n * The tint value being applied to the bottom-right of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomRight\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tintBottomRight: {\n\n get: function ()\n {\n return this._tintBR;\n },\n\n set: function (value)\n {\n this._tintBR = GetColorFromValue(value);\n this._isTinted = true;\n }\n\n },\n\n /**\n * The tint value being applied to the whole of the Game Object.\n * This property is a setter-only. Use the properties `tintTopLeft` etc to read the current tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#tint\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tint: {\n\n set: function (value)\n {\n this.setTint(value, value, value, value);\n }\n },\n\n /**\n * Does this Game Object have a tint applied to it or not?\n *\n * @name Phaser.GameObjects.Components.Tint#isTinted\n * @type {boolean}\n * @webglOnly\n * @readonly\n * @since 3.11.0\n */\n isTinted: {\n\n get: function ()\n {\n return this._isTinted;\n }\n\n }\n\n};\n\nmodule.exports = Tint;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Build a JSON representation of the given Game Object.\n *\n * This is typically extended further by Game Object specific implementations.\n *\n * @method Phaser.GameObjects.Components.ToJSON\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to export as JSON.\n *\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\n */\nvar ToJSON = function (gameObject)\n{\n var out = {\n name: gameObject.name,\n type: gameObject.type,\n x: gameObject.x,\n y: gameObject.y,\n depth: gameObject.depth,\n scale: {\n x: gameObject.scaleX,\n y: gameObject.scaleY\n },\n origin: {\n x: gameObject.originX,\n y: gameObject.originY\n },\n flipX: gameObject.flipX,\n flipY: gameObject.flipY,\n rotation: gameObject.rotation,\n alpha: gameObject.alpha,\n visible: gameObject.visible,\n blendMode: gameObject.blendMode,\n textureKey: '',\n frameKey: '',\n data: {}\n };\n\n if (gameObject.texture)\n {\n out.textureKey = gameObject.texture.key;\n out.frameKey = gameObject.frame.name;\n }\n\n return out;\n};\n\nmodule.exports = ToJSON;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar MATH_CONST = require('../../math/const');\nvar TransformMatrix = require('./TransformMatrix');\nvar TransformXY = require('../../math/TransformXY');\nvar WrapAngle = require('../../math/angle/Wrap');\nvar WrapAngleDegrees = require('../../math/angle/WrapDegrees');\nvar Vector2 = require('../../math/Vector2');\n\n// global bitmask flag for GameObject.renderMask (used by Scale)\nvar _FLAG = 4; // 0100\n\n/**\n * Provides methods used for getting and setting the position, scale and rotation of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.Transform\n * @since 3.0.0\n */\n\nvar Transform = {\n\n /**\n * Private internal value. Holds the horizontal scale value.\n *\n * @name Phaser.GameObjects.Components.Transform#_scaleX\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _scaleX: 1,\n\n /**\n * Private internal value. Holds the vertical scale value.\n *\n * @name Phaser.GameObjects.Components.Transform#_scaleY\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _scaleY: 1,\n\n /**\n * Private internal value. Holds the rotation value in radians.\n *\n * @name Phaser.GameObjects.Components.Transform#_rotation\n * @type {number}\n * @private\n * @default 0\n * @since 3.0.0\n */\n _rotation: 0,\n\n /**\n * The x position of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n x: 0,\n\n /**\n * The y position of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n y: 0,\n\n /**\n * The z position of this Game Object.\n *\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\n * {@link Phaser.GameObjects.Components.Depth#depth} instead.\n *\n * @name Phaser.GameObjects.Components.Transform#z\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n z: 0,\n\n /**\n * The w position of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#w\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n w: 0,\n\n /**\n * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object\n * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.\n *\n * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this\n * isn't the case, use the `scaleX` or `scaleY` properties instead.\n *\n * @name Phaser.GameObjects.Components.Transform#scale\n * @type {number}\n * @default 1\n * @since 3.18.0\n */\n scale: {\n\n get: function ()\n {\n return (this._scaleX + this._scaleY) / 2;\n },\n\n set: function (value)\n {\n this._scaleX = value;\n this._scaleY = value;\n\n if (value === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The horizontal scale of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#scaleX\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n scaleX: {\n\n get: function ()\n {\n return this._scaleX;\n },\n\n set: function (value)\n {\n this._scaleX = value;\n\n if (value === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The vertical scale of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#scaleY\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n scaleY: {\n\n get: function ()\n {\n return this._scaleY;\n },\n\n set: function (value)\n {\n this._scaleY = value;\n\n if (value === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The angle of this Game Object as expressed in degrees.\n *\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left\n * and -90 is up.\n *\n * If you prefer to work in radians, see the `rotation` property instead.\n *\n * @name Phaser.GameObjects.Components.Transform#angle\n * @type {integer}\n * @default 0\n * @since 3.0.0\n */\n angle: {\n\n get: function ()\n {\n return WrapAngleDegrees(this._rotation * MATH_CONST.RAD_TO_DEG);\n },\n\n set: function (value)\n {\n // value is in degrees\n this.rotation = WrapAngleDegrees(value) * MATH_CONST.DEG_TO_RAD;\n }\n },\n\n /**\n * The angle of this Game Object in radians.\n *\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left\n * and -PI/2 is up.\n *\n * If you prefer to work in degrees, see the `angle` property instead.\n *\n * @name Phaser.GameObjects.Components.Transform#rotation\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n rotation: {\n\n get: function ()\n {\n return this._rotation;\n },\n\n set: function (value)\n {\n // value is in radians\n this._rotation = WrapAngle(value);\n }\n },\n\n /**\n * Sets the position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setPosition\n * @since 3.0.0\n *\n * @param {number} [x=0] - The x position of this Game Object.\n * @param {number} [y=x] - The y position of this Game Object. If not set it will use the `x` value.\n * @param {number} [z=0] - The z position of this Game Object.\n * @param {number} [w=0] - The w position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setPosition: function (x, y, z, w)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = x; }\n if (z === undefined) { z = 0; }\n if (w === undefined) { w = 0; }\n\n this.x = x;\n this.y = y;\n this.z = z;\n this.w = w;\n\n return this;\n },\n\n /**\n * Sets the position of this Game Object to be a random position within the confines of\n * the given area.\n *\n * If no area is specified a random position between 0 x 0 and the game width x height is used instead.\n *\n * The position does not factor in the size of this Game Object, meaning that only the origin is\n * guaranteed to be within the area.\n *\n * @method Phaser.GameObjects.Components.Transform#setRandomPosition\n * @since 3.8.0\n *\n * @param {number} [x=0] - The x position of the top-left of the random area.\n * @param {number} [y=0] - The y position of the top-left of the random area.\n * @param {number} [width] - The width of the random area.\n * @param {number} [height] - The height of the random area.\n *\n * @return {this} This Game Object instance.\n */\n setRandomPosition: function (x, y, width, height)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n if (width === undefined) { width = this.scene.sys.scale.width; }\n if (height === undefined) { height = this.scene.sys.scale.height; }\n\n this.x = x + (Math.random() * width);\n this.y = y + (Math.random() * height);\n\n return this;\n },\n\n /**\n * Sets the rotation of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setRotation\n * @since 3.0.0\n *\n * @param {number} [radians=0] - The rotation of this Game Object, in radians.\n *\n * @return {this} This Game Object instance.\n */\n setRotation: function (radians)\n {\n if (radians === undefined) { radians = 0; }\n\n this.rotation = radians;\n\n return this;\n },\n\n /**\n * Sets the angle of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setAngle\n * @since 3.0.0\n *\n * @param {number} [degrees=0] - The rotation of this Game Object, in degrees.\n *\n * @return {this} This Game Object instance.\n */\n setAngle: function (degrees)\n {\n if (degrees === undefined) { degrees = 0; }\n\n this.angle = degrees;\n\n return this;\n },\n\n /**\n * Sets the scale of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setScale\n * @since 3.0.0\n *\n * @param {number} x - The horizontal scale of this Game Object.\n * @param {number} [y=x] - The vertical scale of this Game Object. If not set it will use the `x` value.\n *\n * @return {this} This Game Object instance.\n */\n setScale: function (x, y)\n {\n if (x === undefined) { x = 1; }\n if (y === undefined) { y = x; }\n\n this.scaleX = x;\n this.scaleY = y;\n\n return this;\n },\n\n /**\n * Sets the x position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setX\n * @since 3.0.0\n *\n * @param {number} [value=0] - The x position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setX: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.x = value;\n\n return this;\n },\n\n /**\n * Sets the y position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setY\n * @since 3.0.0\n *\n * @param {number} [value=0] - The y position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setY: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.y = value;\n\n return this;\n },\n\n /**\n * Sets the z position of this Game Object.\n *\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\n * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.\n *\n * @method Phaser.GameObjects.Components.Transform#setZ\n * @since 3.0.0\n *\n * @param {number} [value=0] - The z position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setZ: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.z = value;\n\n return this;\n },\n\n /**\n * Sets the w position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setW\n * @since 3.0.0\n *\n * @param {number} [value=0] - The w position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setW: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.w = value;\n\n return this;\n },\n\n /**\n * Gets the local transform matrix for this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#getLocalTransformMatrix\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\n *\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\n */\n getLocalTransformMatrix: function (tempMatrix)\n {\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\n\n return tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\n },\n\n /**\n * Gets the world transform matrix for this Game Object, factoring in any parent Containers.\n *\n * @method Phaser.GameObjects.Components.Transform#getWorldTransformMatrix\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A temporary matrix to hold parent values during the calculations.\n *\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\n */\n getWorldTransformMatrix: function (tempMatrix, parentMatrix)\n {\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\n if (parentMatrix === undefined) { parentMatrix = new TransformMatrix(); }\n\n var parent = this.parentContainer;\n\n if (!parent)\n {\n return this.getLocalTransformMatrix(tempMatrix);\n }\n\n tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\n\n while (parent)\n {\n parentMatrix.applyITRS(parent.x, parent.y, parent._rotation, parent._scaleX, parent._scaleY);\n\n parentMatrix.multiply(tempMatrix, tempMatrix);\n\n parent = parent.parentContainer;\n }\n\n return tempMatrix;\n },\n\n /**\n * Takes the given `x` and `y` coordinates and converts them into local space for this\n * Game Object, taking into account parent and local transforms, and the Display Origin.\n *\n * The returned Vector2 contains the translated point in its properties.\n *\n * A Camera needs to be provided in order to handle modified scroll factors. If no\n * camera is specified, it will use the `main` camera from the Scene to which this\n * Game Object belongs.\n *\n * @method Phaser.GameObjects.Components.Transform#getLocalPoint\n * @since 3.50.0\n *\n * @param {number} x - The x position to translate.\n * @param {number} y - The y position to translate.\n * @param {Phaser.Math.Vector2} [point] - A Vector2, or point-like object, to store the results in.\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera which is being tested against. If not given will use the Scene default camera.\n *\n * @return {Phaser.Math.Vector2} The translated point.\n */\n getLocalPoint: function (x, y, point, camera)\n {\n if (!point) { point = new Vector2(); }\n if (!camera) { camera = this.scene.sys.cameras.main; }\n\n var csx = camera.scrollX;\n var csy = camera.scrollY;\n\n var px = x + (csx * this.scrollFactorX) - csx;\n var py = y + (csy * this.scrollFactorY) - csy;\n\n if (this.parentContainer)\n {\n this.getWorldTransformMatrix().applyInverse(px, py, point);\n }\n else\n {\n TransformXY(px, py, this.x, this.y, this.rotation, this.scaleX, this.scaleY, point);\n }\n\n // Normalize origin\n if (this._originComponent)\n {\n point.x += this._displayOriginX;\n point.y += this._displayOriginY;\n }\n\n return point;\n },\n\n /**\n * Gets the sum total rotation of all of this Game Objects parent Containers.\n *\n * The returned value is in radians and will be zero if this Game Object has no parent container.\n *\n * @method Phaser.GameObjects.Components.Transform#getParentRotation\n * @since 3.18.0\n *\n * @return {number} The sum total rotation, in radians, of all parent containers of this Game Object.\n */\n getParentRotation: function ()\n {\n var rotation = 0;\n\n var parent = this.parentContainer;\n\n while (parent)\n {\n rotation += parent.rotation;\n\n parent = parent.parentContainer;\n }\n\n return rotation;\n }\n\n};\n\nmodule.exports = Transform;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar MATH_CONST = require('../../math/const');\nvar Vector2 = require('../../math/Vector2');\n\n/**\n * @classdesc\n * A Matrix used for display transformations for rendering.\n *\n * It is represented like so:\n *\n * ```\n * | a | c | tx |\n * | b | d | ty |\n * | 0 | 0 | 1 |\n * ```\n *\n * @class TransformMatrix\n * @memberof Phaser.GameObjects.Components\n * @constructor\n * @since 3.0.0\n *\n * @param {number} [a=1] - The Scale X value.\n * @param {number} [b=0] - The Skew Y value.\n * @param {number} [c=0] - The Skew X value.\n * @param {number} [d=1] - The Scale Y value.\n * @param {number} [tx=0] - The Translate X value.\n * @param {number} [ty=0] - The Translate Y value.\n */\nvar TransformMatrix = new Class({\n\n initialize:\n\n function TransformMatrix (a, b, c, d, tx, ty)\n {\n if (a === undefined) { a = 1; }\n if (b === undefined) { b = 0; }\n if (c === undefined) { c = 0; }\n if (d === undefined) { d = 1; }\n if (tx === undefined) { tx = 0; }\n if (ty === undefined) { ty = 0; }\n\n /**\n * The matrix values.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#matrix\n * @type {Float32Array}\n * @since 3.0.0\n */\n this.matrix = new Float32Array([ a, b, c, d, tx, ty, 0, 0, 1 ]);\n\n /**\n * The decomposed matrix.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#decomposedMatrix\n * @type {object}\n * @since 3.0.0\n */\n this.decomposedMatrix = {\n translateX: 0,\n translateY: 0,\n scaleX: 1,\n scaleY: 1,\n rotation: 0\n };\n },\n\n /**\n * The Scale X value.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#a\n * @type {number}\n * @since 3.4.0\n */\n a: {\n\n get: function ()\n {\n return this.matrix[0];\n },\n\n set: function (value)\n {\n this.matrix[0] = value;\n }\n\n },\n\n /**\n * The Skew Y value.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#b\n * @type {number}\n * @since 3.4.0\n */\n b: {\n\n get: function ()\n {\n return this.matrix[1];\n },\n\n set: function (value)\n {\n this.matrix[1] = value;\n }\n\n },\n\n /**\n * The Skew X value.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#c\n * @type {number}\n * @since 3.4.0\n */\n c: {\n\n get: function ()\n {\n return this.matrix[2];\n },\n\n set: function (value)\n {\n this.matrix[2] = value;\n }\n\n },\n\n /**\n * The Scale Y value.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#d\n * @type {number}\n * @since 3.4.0\n */\n d: {\n\n get: function ()\n {\n return this.matrix[3];\n },\n\n set: function (value)\n {\n this.matrix[3] = value;\n }\n\n },\n\n /**\n * The Translate X value.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#e\n * @type {number}\n * @since 3.11.0\n */\n e: {\n\n get: function ()\n {\n return this.matrix[4];\n },\n\n set: function (value)\n {\n this.matrix[4] = value;\n }\n\n },\n\n /**\n * The Translate Y value.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#f\n * @type {number}\n * @since 3.11.0\n */\n f: {\n\n get: function ()\n {\n return this.matrix[5];\n },\n\n set: function (value)\n {\n this.matrix[5] = value;\n }\n\n },\n\n /**\n * The Translate X value.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#tx\n * @type {number}\n * @since 3.4.0\n */\n tx: {\n\n get: function ()\n {\n return this.matrix[4];\n },\n\n set: function (value)\n {\n this.matrix[4] = value;\n }\n\n },\n\n /**\n * The Translate Y value.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#ty\n * @type {number}\n * @since 3.4.0\n */\n ty: {\n\n get: function ()\n {\n return this.matrix[5];\n },\n\n set: function (value)\n {\n this.matrix[5] = value;\n }\n\n },\n\n /**\n * The rotation of the Matrix. Value is in radians.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#rotation\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n rotation: {\n\n get: function ()\n {\n return Math.acos(this.a / this.scaleX) * ((Math.atan(-this.c / this.a) < 0) ? -1 : 1);\n }\n\n },\n\n /**\n * The rotation of the Matrix, normalized to be within the Phaser right-handed\n * clockwise rotation space. Value is in radians.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#rotationNormalized\n * @type {number}\n * @readonly\n * @since 3.19.0\n */\n rotationNormalized: {\n\n get: function ()\n {\n var matrix = this.matrix;\n\n var a = matrix[0];\n var b = matrix[1];\n var c = matrix[2];\n var d = matrix[3];\n\n if (a || b)\n {\n // var r = Math.sqrt(a * a + b * b);\n \n return (b > 0) ? Math.acos(a / this.scaleX) : -Math.acos(a / this.scaleX);\n }\n else if (c || d)\n {\n // var s = Math.sqrt(c * c + d * d);\n \n return MATH_CONST.TAU - ((d > 0) ? Math.acos(-c / this.scaleY) : -Math.acos(c / this.scaleY));\n }\n else\n {\n return 0;\n }\n }\n\n },\n\n /**\n * The decomposed horizontal scale of the Matrix. This value is always positive.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleX\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n scaleX: {\n\n get: function ()\n {\n return Math.sqrt((this.a * this.a) + (this.b * this.b));\n }\n\n },\n\n /**\n * The decomposed vertical scale of the Matrix. This value is always positive.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleY\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n scaleY: {\n\n get: function ()\n {\n return Math.sqrt((this.c * this.c) + (this.d * this.d));\n }\n\n },\n\n /**\n * Reset the Matrix to an identity matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#loadIdentity\n * @since 3.0.0\n *\n * @return {this} This TransformMatrix.\n */\n loadIdentity: function ()\n {\n var matrix = this.matrix;\n\n matrix[0] = 1;\n matrix[1] = 0;\n matrix[2] = 0;\n matrix[3] = 1;\n matrix[4] = 0;\n matrix[5] = 0;\n\n return this;\n },\n\n /**\n * Translate the Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#translate\n * @since 3.0.0\n *\n * @param {number} x - The horizontal translation value.\n * @param {number} y - The vertical translation value.\n *\n * @return {this} This TransformMatrix.\n */\n translate: function (x, y)\n {\n var matrix = this.matrix;\n\n matrix[4] = matrix[0] * x + matrix[2] * y + matrix[4];\n matrix[5] = matrix[1] * x + matrix[3] * y + matrix[5];\n\n return this;\n },\n\n /**\n * Scale the Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#scale\n * @since 3.0.0\n *\n * @param {number} x - The horizontal scale value.\n * @param {number} y - The vertical scale value.\n *\n * @return {this} This TransformMatrix.\n */\n scale: function (x, y)\n {\n var matrix = this.matrix;\n\n matrix[0] *= x;\n matrix[1] *= x;\n matrix[2] *= y;\n matrix[3] *= y;\n\n return this;\n },\n\n /**\n * Rotate the Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#rotate\n * @since 3.0.0\n *\n * @param {number} angle - The angle of rotation in radians.\n *\n * @return {this} This TransformMatrix.\n */\n rotate: function (angle)\n {\n var sin = Math.sin(angle);\n var cos = Math.cos(angle);\n\n var matrix = this.matrix;\n\n var a = matrix[0];\n var b = matrix[1];\n var c = matrix[2];\n var d = matrix[3];\n\n matrix[0] = a * cos + c * sin;\n matrix[1] = b * cos + d * sin;\n matrix[2] = a * -sin + c * cos;\n matrix[3] = b * -sin + d * cos;\n\n return this;\n },\n\n /**\n * Multiply this Matrix by the given Matrix.\n * \n * If an `out` Matrix is given then the results will be stored in it.\n * If it is not given, this matrix will be updated in place instead.\n * Use an `out` Matrix if you do not wish to mutate this matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#multiply\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by.\n * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in.\n *\n * @return {(this|Phaser.GameObjects.Components.TransformMatrix)} Either this TransformMatrix, or the `out` Matrix, if given in the arguments.\n */\n multiply: function (rhs, out)\n {\n var matrix = this.matrix;\n var source = rhs.matrix;\n\n var localA = matrix[0];\n var localB = matrix[1];\n var localC = matrix[2];\n var localD = matrix[3];\n var localE = matrix[4];\n var localF = matrix[5];\n\n var sourceA = source[0];\n var sourceB = source[1];\n var sourceC = source[2];\n var sourceD = source[3];\n var sourceE = source[4];\n var sourceF = source[5];\n\n var destinationMatrix = (out === undefined) ? this : out;\n\n destinationMatrix.a = (sourceA * localA) + (sourceB * localC);\n destinationMatrix.b = (sourceA * localB) + (sourceB * localD);\n destinationMatrix.c = (sourceC * localA) + (sourceD * localC);\n destinationMatrix.d = (sourceC * localB) + (sourceD * localD);\n destinationMatrix.e = (sourceE * localA) + (sourceF * localC) + localE;\n destinationMatrix.f = (sourceE * localB) + (sourceF * localD) + localF;\n\n return destinationMatrix;\n },\n\n /**\n * Multiply this Matrix by the matrix given, including the offset.\n * \n * The offsetX is added to the tx value: `offsetX * a + offsetY * c + tx`.\n * The offsetY is added to the ty value: `offsetY * b + offsetY * d + ty`.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#multiplyWithOffset\n * @since 3.11.0\n *\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\n * @param {number} offsetX - Horizontal offset to factor in to the multiplication.\n * @param {number} offsetY - Vertical offset to factor in to the multiplication.\n *\n * @return {this} This TransformMatrix.\n */\n multiplyWithOffset: function (src, offsetX, offsetY)\n {\n var matrix = this.matrix;\n var otherMatrix = src.matrix;\n\n var a0 = matrix[0];\n var b0 = matrix[1];\n var c0 = matrix[2];\n var d0 = matrix[3];\n var tx0 = matrix[4];\n var ty0 = matrix[5];\n\n var pse = offsetX * a0 + offsetY * c0 + tx0;\n var psf = offsetX * b0 + offsetY * d0 + ty0;\n\n var a1 = otherMatrix[0];\n var b1 = otherMatrix[1];\n var c1 = otherMatrix[2];\n var d1 = otherMatrix[3];\n var tx1 = otherMatrix[4];\n var ty1 = otherMatrix[5];\n\n matrix[0] = a1 * a0 + b1 * c0;\n matrix[1] = a1 * b0 + b1 * d0;\n matrix[2] = c1 * a0 + d1 * c0;\n matrix[3] = c1 * b0 + d1 * d0;\n matrix[4] = tx1 * a0 + ty1 * c0 + pse;\n matrix[5] = tx1 * b0 + ty1 * d0 + psf;\n\n return this;\n },\n\n /**\n * Transform the Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#transform\n * @since 3.0.0\n *\n * @param {number} a - The Scale X value.\n * @param {number} b - The Shear Y value.\n * @param {number} c - The Shear X value.\n * @param {number} d - The Scale Y value.\n * @param {number} tx - The Translate X value.\n * @param {number} ty - The Translate Y value.\n *\n * @return {this} This TransformMatrix.\n */\n transform: function (a, b, c, d, tx, ty)\n {\n var matrix = this.matrix;\n\n var a0 = matrix[0];\n var b0 = matrix[1];\n var c0 = matrix[2];\n var d0 = matrix[3];\n var tx0 = matrix[4];\n var ty0 = matrix[5];\n\n matrix[0] = a * a0 + b * c0;\n matrix[1] = a * b0 + b * d0;\n matrix[2] = c * a0 + d * c0;\n matrix[3] = c * b0 + d * d0;\n matrix[4] = tx * a0 + ty * c0 + tx0;\n matrix[5] = tx * b0 + ty * d0 + ty0;\n\n return this;\n },\n\n /**\n * Transform a point using this Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#transformPoint\n * @since 3.0.0\n *\n * @param {number} x - The x coordinate of the point to transform.\n * @param {number} y - The y coordinate of the point to transform.\n * @param {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} point - The Point object to store the transformed coordinates.\n *\n * @return {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} The Point containing the transformed coordinates.\n */\n transformPoint: function (x, y, point)\n {\n if (point === undefined) { point = { x: 0, y: 0 }; }\n\n var matrix = this.matrix;\n\n var a = matrix[0];\n var b = matrix[1];\n var c = matrix[2];\n var d = matrix[3];\n var tx = matrix[4];\n var ty = matrix[5];\n\n point.x = x * a + y * c + tx;\n point.y = x * b + y * d + ty;\n\n return point;\n },\n\n /**\n * Invert the Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#invert\n * @since 3.0.0\n *\n * @return {this} This TransformMatrix.\n */\n invert: function ()\n {\n var matrix = this.matrix;\n\n var a = matrix[0];\n var b = matrix[1];\n var c = matrix[2];\n var d = matrix[3];\n var tx = matrix[4];\n var ty = matrix[5];\n\n var n = a * d - b * c;\n\n matrix[0] = d / n;\n matrix[1] = -b / n;\n matrix[2] = -c / n;\n matrix[3] = a / n;\n matrix[4] = (c * ty - d * tx) / n;\n matrix[5] = -(a * ty - b * tx) / n;\n\n return this;\n },\n\n /**\n * Set the values of this Matrix to copy those of the matrix given.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFrom\n * @since 3.11.0\n *\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\n *\n * @return {this} This TransformMatrix.\n */\n copyFrom: function (src)\n {\n var matrix = this.matrix;\n\n matrix[0] = src.a;\n matrix[1] = src.b;\n matrix[2] = src.c;\n matrix[3] = src.d;\n matrix[4] = src.e;\n matrix[5] = src.f;\n\n return this;\n },\n\n /**\n * Set the values of this Matrix to copy those of the array given.\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFromArray\n * @since 3.11.0\n *\n * @param {array} src - The array of values to set into this matrix.\n *\n * @return {this} This TransformMatrix.\n */\n copyFromArray: function (src)\n {\n var matrix = this.matrix;\n\n matrix[0] = src[0];\n matrix[1] = src[1];\n matrix[2] = src[2];\n matrix[3] = src[3];\n matrix[4] = src[4];\n matrix[5] = src[5];\n\n return this;\n },\n\n /**\n * Copy the values from this Matrix to the given Canvas Rendering Context.\n * This will use the Context.transform method.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToContext\n * @since 3.12.0\n *\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\n *\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\n */\n copyToContext: function (ctx)\n {\n var matrix = this.matrix;\n\n ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\n\n return ctx;\n },\n\n /**\n * Copy the values from this Matrix to the given Canvas Rendering Context.\n * This will use the Context.setTransform method.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#setToContext\n * @since 3.12.0\n *\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\n *\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\n */\n setToContext: function (ctx)\n {\n var matrix = this.matrix;\n\n ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\n\n return ctx;\n },\n\n /**\n * Copy the values in this Matrix to the array given.\n * \n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToArray\n * @since 3.12.0\n *\n * @param {array} [out] - The array to copy the matrix values in to.\n *\n * @return {array} An array where elements 0 to 5 contain the values from this matrix.\n */\n copyToArray: function (out)\n {\n var matrix = this.matrix;\n\n if (out === undefined)\n {\n out = [ matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5] ];\n }\n else\n {\n out[0] = matrix[0];\n out[1] = matrix[1];\n out[2] = matrix[2];\n out[3] = matrix[3];\n out[4] = matrix[4];\n out[5] = matrix[5];\n }\n\n return out;\n },\n\n /**\n * Set the values of this Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#setTransform\n * @since 3.0.0\n *\n * @param {number} a - The Scale X value.\n * @param {number} b - The Shear Y value.\n * @param {number} c - The Shear X value.\n * @param {number} d - The Scale Y value.\n * @param {number} tx - The Translate X value.\n * @param {number} ty - The Translate Y value.\n *\n * @return {this} This TransformMatrix.\n */\n setTransform: function (a, b, c, d, tx, ty)\n {\n var matrix = this.matrix;\n\n matrix[0] = a;\n matrix[1] = b;\n matrix[2] = c;\n matrix[3] = d;\n matrix[4] = tx;\n matrix[5] = ty;\n\n return this;\n },\n\n /**\n * Decompose this Matrix into its translation, scale and rotation values using QR decomposition.\n * \n * The result must be applied in the following order to reproduce the current matrix:\n * \n * translate -> rotate -> scale\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#decomposeMatrix\n * @since 3.0.0\n *\n * @return {object} The decomposed Matrix.\n */\n decomposeMatrix: function ()\n {\n var decomposedMatrix = this.decomposedMatrix;\n\n var matrix = this.matrix;\n\n // a = scale X (1)\n // b = shear Y (0)\n // c = shear X (0)\n // d = scale Y (1)\n\n var a = matrix[0];\n var b = matrix[1];\n var c = matrix[2];\n var d = matrix[3];\n\n var determ = a * d - b * c;\n\n decomposedMatrix.translateX = matrix[4];\n decomposedMatrix.translateY = matrix[5];\n\n if (a || b)\n {\n var r = Math.sqrt(a * a + b * b);\n\n decomposedMatrix.rotation = (b > 0) ? Math.acos(a / r) : -Math.acos(a / r);\n decomposedMatrix.scaleX = r;\n decomposedMatrix.scaleY = determ / r;\n }\n else if (c || d)\n {\n var s = Math.sqrt(c * c + d * d);\n\n decomposedMatrix.rotation = Math.PI * 0.5 - (d > 0 ? Math.acos(-c / s) : -Math.acos(c / s));\n decomposedMatrix.scaleX = determ / s;\n decomposedMatrix.scaleY = s;\n }\n else\n {\n decomposedMatrix.rotation = 0;\n decomposedMatrix.scaleX = 0;\n decomposedMatrix.scaleY = 0;\n }\n\n return decomposedMatrix;\n },\n\n /**\n * Apply the identity, translate, rotate and scale operations on the Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#applyITRS\n * @since 3.0.0\n *\n * @param {number} x - The horizontal translation.\n * @param {number} y - The vertical translation.\n * @param {number} rotation - The angle of rotation in radians.\n * @param {number} scaleX - The horizontal scale.\n * @param {number} scaleY - The vertical scale.\n *\n * @return {this} This TransformMatrix.\n */\n applyITRS: function (x, y, rotation, scaleX, scaleY)\n {\n var matrix = this.matrix;\n\n var radianSin = Math.sin(rotation);\n var radianCos = Math.cos(rotation);\n\n // Translate\n matrix[4] = x;\n matrix[5] = y;\n\n // Rotate and Scale\n matrix[0] = radianCos * scaleX;\n matrix[1] = radianSin * scaleX;\n matrix[2] = -radianSin * scaleY;\n matrix[3] = radianCos * scaleY;\n\n return this;\n },\n\n /**\n * Takes the `x` and `y` values and returns a new position in the `output` vector that is the inverse of\n * the current matrix with its transformation applied.\n * \n * Can be used to translate points from world to local space.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#applyInverse\n * @since 3.12.0\n *\n * @param {number} x - The x position to translate.\n * @param {number} y - The y position to translate.\n * @param {Phaser.Math.Vector2} [output] - A Vector2, or point-like object, to store the results in.\n *\n * @return {Phaser.Math.Vector2} The coordinates, inverse-transformed through this matrix.\n */\n applyInverse: function (x, y, output)\n {\n if (output === undefined) { output = new Vector2(); }\n\n var matrix = this.matrix;\n\n var a = matrix[0];\n var b = matrix[1];\n var c = matrix[2];\n var d = matrix[3];\n var tx = matrix[4];\n var ty = matrix[5];\n\n var id = 1 / ((a * d) + (c * -b));\n\n output.x = (d * id * x) + (-c * id * y) + (((ty * c) - (tx * d)) * id);\n output.y = (a * id * y) + (-b * id * x) + (((-ty * a) + (tx * b)) * id);\n\n return output;\n },\n\n /**\n * Returns the X component of this matrix multiplied by the given values.\n * This is the same as `x * a + y * c + e`.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#getX\n * @since 3.12.0\n * \n * @param {number} x - The x value.\n * @param {number} y - The y value.\n *\n * @return {number} The calculated x value.\n */\n getX: function (x, y)\n {\n return x * this.a + y * this.c + this.e;\n },\n\n /**\n * Returns the Y component of this matrix multiplied by the given values.\n * This is the same as `x * b + y * d + f`.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#getY\n * @since 3.12.0\n * \n * @param {number} x - The x value.\n * @param {number} y - The y value.\n *\n * @return {number} The calculated y value.\n */\n getY: function (x, y)\n {\n return x * this.b + y * this.d + this.f;\n },\n\n /**\n * Returns the X component of this matrix multiplied by the given values.\n * \n * This is the same as `x * a + y * c + e`, optionally passing via `Math.round`.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#getXRound\n * @since 3.50.0\n * \n * @param {number} x - The x value.\n * @param {number} y - The y value.\n * @param {boolean} [round=false] - Math.round the resulting value?\n *\n * @return {number} The calculated x value.\n */\n getXRound: function (x, y, round)\n {\n var v = this.getX(x, y);\n\n if (round)\n {\n v = Math.round(v);\n }\n\n return v;\n },\n\n /**\n * Returns the Y component of this matrix multiplied by the given values.\n * \n * This is the same as `x * b + y * d + f`, optionally passing via `Math.round`.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#getYRound\n * @since 3.50.0\n * \n * @param {number} x - The x value.\n * @param {number} y - The y value.\n * @param {boolean} [round=false] - Math.round the resulting value?\n *\n * @return {number} The calculated y value.\n */\n getYRound: function (x, y, round)\n {\n var v = this.getY(x, y);\n\n if (round)\n {\n v = Math.round(v);\n }\n\n return v;\n },\n\n /**\n * Returns a string that can be used in a CSS Transform call as a `matrix` property.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#getCSSMatrix\n * @since 3.12.0\n *\n * @return {string} A string containing the CSS Transform matrix values.\n */\n getCSSMatrix: function ()\n {\n var m = this.matrix;\n\n return 'matrix(' + m[0] + ',' + m[1] + ',' + m[2] + ',' + m[3] + ',' + m[4] + ',' + m[5] + ')';\n },\n\n /**\n * Destroys this Transform Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#destroy\n * @since 3.4.0\n */\n destroy: function ()\n {\n this.matrix = null;\n this.decomposedMatrix = null;\n }\n\n});\n\nmodule.exports = TransformMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// bitmask flag for GameObject.renderMask\nvar _FLAG = 1; // 0001\n\n/**\n * Provides methods used for setting the visibility of a Game Object.\n * Should be applied as a mixin and not used directly.\n * \n * @namespace Phaser.GameObjects.Components.Visible\n * @since 3.0.0\n */\n\nvar Visible = {\n\n /**\n * Private internal value. Holds the visible value.\n * \n * @name Phaser.GameObjects.Components.Visible#_visible\n * @type {boolean}\n * @private\n * @default true\n * @since 3.0.0\n */\n _visible: true,\n\n /**\n * The visible state of the Game Object.\n * \n * An invisible Game Object will skip rendering, but will still process update logic.\n * \n * @name Phaser.GameObjects.Components.Visible#visible\n * @type {boolean}\n * @since 3.0.0\n */\n visible: {\n\n get: function ()\n {\n return this._visible;\n },\n\n set: function (value)\n {\n if (value)\n {\n this._visible = true;\n this.renderFlags |= _FLAG;\n }\n else\n {\n this._visible = false;\n this.renderFlags &= ~_FLAG;\n }\n }\n\n },\n\n /**\n * Sets the visibility of this Game Object.\n * \n * An invisible Game Object will skip rendering, but will still process update logic.\n *\n * @method Phaser.GameObjects.Components.Visible#setVisible\n * @since 3.0.0\n *\n * @param {boolean} value - The visible state of the Game Object.\n * \n * @return {this} This Game Object instance.\n */\n setVisible: function (value)\n {\n this.visible = value;\n\n return this;\n }\n};\n\nmodule.exports = Visible;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.GameObjects.Components\n */\n\nmodule.exports = {\n\n Alpha: require('./Alpha'),\n AlphaSingle: require('./AlphaSingle'),\n Animation: require('./Animation'),\n BlendMode: require('./BlendMode'),\n ComputedSize: require('./ComputedSize'),\n Crop: require('./Crop'),\n Depth: require('./Depth'),\n Flip: require('./Flip'),\n GetBounds: require('./GetBounds'),\n Mask: require('./Mask'),\n Origin: require('./Origin'),\n PathFollower: require('./PathFollower'),\n Pipeline: require('./Pipeline'),\n ScrollFactor: require('./ScrollFactor'),\n Size: require('./Size'),\n Texture: require('./Texture'),\n TextureCrop: require('./TextureCrop'),\n Tint: require('./Tint'),\n ToJSON: require('./ToJSON'),\n Transform: require('./Transform'),\n TransformMatrix: require('./TransformMatrix'),\n Visible: require('./Visible')\n\n};\n","/**\n * @author Richard Davey \n * @author Felipe Alfonso <@bitnenfer>\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar ArrayUtils = require('../../utils/array');\nvar BlendModes = require('../../renderer/BlendModes');\nvar Class = require('../../utils/Class');\nvar Components = require('../components');\nvar Events = require('../events');\nvar GameObject = require('../GameObject');\nvar GameObjectEvents = require('../events');\nvar Rectangle = require('../../geom/rectangle/Rectangle');\nvar Render = require('./ContainerRender');\nvar Union = require('../../geom/rectangle/Union');\nvar Vector2 = require('../../math/Vector2');\n\n/**\n * @classdesc\n * A Container Game Object.\n *\n * A Container, as the name implies, can 'contain' other types of Game Object.\n * When a Game Object is added to a Container, the Container becomes responsible for the rendering of it.\n * By default it will be removed from the Display List and instead added to the Containers own internal list.\n *\n * The position of the Game Object automatically becomes relative to the position of the Container.\n *\n * The origin of a Container is 0x0 (in local space) and that cannot be changed. The children you add to the\n * Container should be positioned with this value in mind. I.e. you should treat 0x0 as being the center of\n * the Container, and position children positively and negative around it as required.\n *\n * When the Container is rendered, all of its children are rendered as well, in the order in which they exist\n * within the Container. Container children can be repositioned using methods such as `MoveUp`, `MoveDown` and `SendToBack`.\n *\n * If you modify a transform property of the Container, such as `Container.x` or `Container.rotation` then it will\n * automatically influence all children as well.\n *\n * Containers can include other Containers for deeply nested transforms.\n *\n * Containers can have masks set on them and can be used as a mask too. However, Container children cannot be masked.\n * The masks do not 'stack up'. Only a Container on the root of the display list will use its mask.\n *\n * Containers can be enabled for input. Because they do not have a texture you need to provide a shape for them\n * to use as their hit area. Container children can also be enabled for input, independent of the Container.\n *\n * Containers can be given a physics body for either Arcade Physics, Impact Physics or Matter Physics. However,\n * if Container _children_ are enabled for physics you may get unexpected results, such as offset bodies,\n * if the Container itself, or any of its ancestors, is positioned anywhere other than at 0 x 0. Container children\n * with physics do not factor in the Container due to the excessive extra calculations needed. Please structure\n * your game to work around this.\n *\n * It's important to understand the impact of using Containers. They add additional processing overhead into\n * every one of their children. The deeper you nest them, the more the cost escalates. This is especially true\n * for input events. You also loose the ability to set the display depth of Container children in the same\n * flexible manner as those not within them. In short, don't use them for the sake of it. You pay a small cost\n * every time you create one, try to structure your game around avoiding that where possible.\n *\n * @class Container\n * @extends Phaser.GameObjects.GameObject\n * @memberof Phaser.GameObjects\n * @constructor\n * @since 3.4.0\n *\n * @extends Phaser.GameObjects.Components.AlphaSingle\n * @extends Phaser.GameObjects.Components.BlendMode\n * @extends Phaser.GameObjects.Components.ComputedSize\n * @extends Phaser.GameObjects.Components.Depth\n * @extends Phaser.GameObjects.Components.Mask\n * @extends Phaser.GameObjects.Components.Transform\n * @extends Phaser.GameObjects.Components.Visible\n *\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\n * @param {Phaser.GameObjects.GameObject[]} [children] - An optional array of Game Objects to add to this Container.\n */\nvar Container = new Class({\n\n Extends: GameObject,\n\n Mixins: [\n Components.AlphaSingle,\n Components.BlendMode,\n Components.ComputedSize,\n Components.Depth,\n Components.Mask,\n Components.Transform,\n Components.Visible,\n Render\n ],\n\n initialize:\n\n function Container (scene, x, y, children)\n {\n GameObject.call(this, scene, 'Container');\n\n /**\n * An array holding the children of this Container.\n *\n * @name Phaser.GameObjects.Container#list\n * @type {Phaser.GameObjects.GameObject[]}\n * @since 3.4.0\n */\n this.list = [];\n\n /**\n * Does this Container exclusively manage its children?\n *\n * The default is `true` which means a child added to this Container cannot\n * belong in another Container, which includes the Scene display list.\n *\n * If you disable this then this Container will no longer exclusively manage its children.\n * This allows you to create all kinds of interesting graphical effects, such as replicating\n * Game Objects without reparenting them all over the Scene.\n * However, doing so will prevent children from receiving any kind of input event or have\n * their physics bodies work by default, as they're no longer a single entity on the\n * display list, but are being replicated where-ever this Container is.\n *\n * @name Phaser.GameObjects.Container#exclusive\n * @type {boolean}\n * @default true\n * @since 3.4.0\n */\n this.exclusive = true;\n\n /**\n * Containers can have an optional maximum size. If set to anything above 0 it\n * will constrict the addition of new Game Objects into the Container, capping off\n * the maximum limit the Container can grow in size to.\n *\n * @name Phaser.GameObjects.Container#maxSize\n * @type {integer}\n * @default -1\n * @since 3.4.0\n */\n this.maxSize = -1;\n\n /**\n * The cursor position.\n *\n * @name Phaser.GameObjects.Container#position\n * @type {integer}\n * @since 3.4.0\n */\n this.position = 0;\n\n /**\n * Internal Transform Matrix used for local space conversion.\n *\n * @name Phaser.GameObjects.Container#localTransform\n * @type {Phaser.GameObjects.Components.TransformMatrix}\n * @since 3.4.0\n */\n this.localTransform = new Components.TransformMatrix();\n\n /**\n * Internal temporary Transform Matrix used to avoid object creation.\n *\n * @name Phaser.GameObjects.Container#tempTransformMatrix\n * @type {Phaser.GameObjects.Components.TransformMatrix}\n * @private\n * @since 3.4.0\n */\n this.tempTransformMatrix = new Components.TransformMatrix();\n\n /**\n * A reference to the Scene Display List.\n *\n * @name Phaser.GameObjects.Container#_displayList\n * @type {Phaser.GameObjects.DisplayList}\n * @private\n * @since 3.4.0\n */\n this._displayList = scene.sys.displayList;\n\n /**\n * The property key to sort by.\n *\n * @name Phaser.GameObjects.Container#_sortKey\n * @type {string}\n * @private\n * @since 3.4.0\n */\n this._sortKey = '';\n\n /**\n * A reference to the Scene Systems Event Emitter.\n *\n * @name Phaser.GameObjects.Container#_sysEvents\n * @type {Phaser.Events.EventEmitter}\n * @private\n * @since 3.9.0\n */\n this._sysEvents = scene.sys.events;\n\n /**\n * The horizontal scroll factor of this Container.\n *\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\n *\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\n * It does not change the Containers actual position values.\n *\n * For a Container, setting this value will only update the Container itself, not its children.\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\n *\n * A value of 1 means it will move exactly in sync with a camera.\n * A value of 0 means it will not move at all, even if the camera moves.\n * Other values control the degree to which the camera movement is mapped to this Container.\n *\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\n * calculating physics collisions. Bodies always collide based on their world position, but changing\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\n * them from physics bodies if not accounted for in your code.\n *\n * @name Phaser.GameObjects.Container#scrollFactorX\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n this.scrollFactorX = 1;\n\n /**\n * The vertical scroll factor of this Container.\n *\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\n *\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\n * It does not change the Containers actual position values.\n *\n * For a Container, setting this value will only update the Container itself, not its children.\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\n *\n * A value of 1 means it will move exactly in sync with a camera.\n * A value of 0 means it will not move at all, even if the camera moves.\n * Other values control the degree to which the camera movement is mapped to this Container.\n *\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\n * calculating physics collisions. Bodies always collide based on their world position, but changing\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\n * them from physics bodies if not accounted for in your code.\n *\n * @name Phaser.GameObjects.Container#scrollFactorY\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n this.scrollFactorY = 1;\n\n this.setPosition(x, y);\n\n this.clearAlpha();\n\n this.setBlendMode(BlendModes.SKIP_CHECK);\n\n if (children)\n {\n this.add(children);\n }\n },\n\n /**\n * Internal value to allow Containers to be used for input and physics.\n * Do not change this value. It has no effect other than to break things.\n *\n * @name Phaser.GameObjects.Container#originX\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n originX: {\n\n get: function ()\n {\n return 0.5;\n }\n\n },\n\n /**\n * Internal value to allow Containers to be used for input and physics.\n * Do not change this value. It has no effect other than to break things.\n *\n * @name Phaser.GameObjects.Container#originY\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n originY: {\n\n get: function ()\n {\n return 0.5;\n }\n\n },\n\n /**\n * Internal value to allow Containers to be used for input and physics.\n * Do not change this value. It has no effect other than to break things.\n *\n * @name Phaser.GameObjects.Container#displayOriginX\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n displayOriginX: {\n\n get: function ()\n {\n return this.width * 0.5;\n }\n\n },\n\n /**\n * Internal value to allow Containers to be used for input and physics.\n * Do not change this value. It has no effect other than to break things.\n *\n * @name Phaser.GameObjects.Container#displayOriginY\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n displayOriginY: {\n\n get: function ()\n {\n return this.height * 0.5;\n }\n\n },\n\n /**\n * Does this Container exclusively manage its children?\n *\n * The default is `true` which means a child added to this Container cannot\n * belong in another Container, which includes the Scene display list.\n *\n * If you disable this then this Container will no longer exclusively manage its children.\n * This allows you to create all kinds of interesting graphical effects, such as replicating\n * Game Objects without reparenting them all over the Scene.\n * However, doing so will prevent children from receiving any kind of input event or have\n * their physics bodies work by default, as they're no longer a single entity on the\n * display list, but are being replicated where-ever this Container is.\n *\n * @method Phaser.GameObjects.Container#setExclusive\n * @since 3.4.0\n *\n * @param {boolean} [value=true] - The exclusive state of this Container.\n *\n * @return {this} This Container.\n */\n setExclusive: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.exclusive = value;\n\n return this;\n },\n\n /**\n * Gets the bounds of this Container. It works by iterating all children of the Container,\n * getting their respective bounds, and then working out a min-max rectangle from that.\n * It does not factor in if the children render or not, all are included.\n *\n * Some children are unable to return their bounds, such as Graphics objects, in which case\n * they are skipped.\n *\n * Depending on the quantity of children in this Container it could be a really expensive call,\n * so cache it and only poll it as needed.\n *\n * The values are stored and returned in a Rectangle object.\n *\n * @method Phaser.GameObjects.Container#getBounds\n * @since 3.4.0\n *\n * @param {Phaser.Geom.Rectangle} [output] - A Geom.Rectangle object to store the values in. If not provided a new Rectangle will be created.\n *\n * @return {Phaser.Geom.Rectangle} The values stored in the output object.\n */\n getBounds: function (output)\n {\n if (output === undefined) { output = new Rectangle(); }\n\n output.setTo(this.x, this.y, 0, 0);\n\n if (this.parentContainer)\n {\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\n var transformedPosition = parentMatrix.transformPoint(this.x, this.y);\n\n output.setTo(transformedPosition.x, transformedPosition.y, 0, 0);\n }\n\n if (this.list.length > 0)\n {\n var children = this.list;\n var tempRect = new Rectangle();\n var hasSetFirst = false;\n\n output.setEmpty();\n\n for (var i = 0; i < children.length; i++)\n {\n var entry = children[i];\n\n if (entry.getBounds)\n {\n entry.getBounds(tempRect);\n\n if (!hasSetFirst)\n {\n output.setTo(tempRect.x, tempRect.y, tempRect.width, tempRect.height);\n hasSetFirst = true;\n }\n else\n {\n Union(tempRect, output, output);\n }\n }\n }\n }\n\n return output;\n },\n\n /**\n * Internal add handler.\n *\n * @method Phaser.GameObjects.Container#addHandler\n * @private\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just added to this Container.\n */\n addHandler: function (gameObject)\n {\n gameObject.once(Events.DESTROY, this.remove, this);\n\n if (this.exclusive)\n {\n this._displayList.remove(gameObject);\n\n if (gameObject.parentContainer)\n {\n gameObject.parentContainer.remove(gameObject);\n }\n\n gameObject.parentContainer = this;\n }\n\n // Is only on the Display List via this Container\n if (!this.scene.sys.displayList.exists(gameObject))\n {\n gameObject.emit(GameObjectEvents.ADDED_TO_SCENE, gameObject, this.scene);\n }\n },\n\n /**\n * Internal remove handler.\n *\n * @method Phaser.GameObjects.Container#removeHandler\n * @private\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just removed from this Container.\n */\n removeHandler: function (gameObject)\n {\n gameObject.off(Events.DESTROY, this.remove);\n\n if (this.exclusive)\n {\n gameObject.parentContainer = null;\n }\n\n // Is only on the Display List via this Container\n if (!this.scene.sys.displayList.exists(gameObject))\n {\n gameObject.emit(GameObjectEvents.REMOVED_FROM_SCENE, gameObject, this.scene);\n }\n },\n\n /**\n * Takes a Point-like object, such as a Vector2, Geom.Point or object with public x and y properties,\n * and transforms it into the space of this Container, then returns it in the output object.\n *\n * @method Phaser.GameObjects.Container#pointToContainer\n * @since 3.4.0\n *\n * @param {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} source - The Source Point to be transformed.\n * @param {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} [output] - A destination object to store the transformed point in. If none given a Vector2 will be created and returned.\n *\n * @return {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} The transformed point.\n */\n pointToContainer: function (source, output)\n {\n if (output === undefined) { output = new Vector2(); }\n\n if (this.parentContainer)\n {\n this.parentContainer.pointToContainer(source, output);\n }\n else\n {\n output = new Vector2(source.x, source.y);\n }\n\n var tempMatrix = this.tempTransformMatrix;\n\n // No need to loadIdentity because applyITRS overwrites every value anyway\n tempMatrix.applyITRS(this.x, this.y, this.rotation, this.scaleX, this.scaleY);\n\n tempMatrix.invert();\n\n tempMatrix.transformPoint(source.x, source.y, output);\n\n return output;\n },\n\n /**\n * Returns the world transform matrix as used for Bounds checks.\n *\n * The returned matrix is temporal and shouldn't be stored.\n *\n * @method Phaser.GameObjects.Container#getBoundsTransformMatrix\n * @since 3.4.0\n *\n * @return {Phaser.GameObjects.Components.TransformMatrix} The world transform matrix.\n */\n getBoundsTransformMatrix: function ()\n {\n return this.getWorldTransformMatrix(this.tempTransformMatrix, this.localTransform);\n },\n\n /**\n * Adds the given Game Object, or array of Game Objects, to this Container.\n *\n * Each Game Object must be unique within the Container.\n *\n * @method Phaser.GameObjects.Container#add\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\n *\n * @return {this} This Container instance.\n */\n add: function (child)\n {\n ArrayUtils.Add(this.list, child, this.maxSize, this.addHandler, this);\n\n return this;\n },\n\n /**\n * Adds the given Game Object, or array of Game Objects, to this Container at the specified position.\n *\n * Existing Game Objects in the Container are shifted up.\n *\n * Each Game Object must be unique within the Container.\n *\n * @method Phaser.GameObjects.Container#addAt\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\n * @param {integer} [index=0] - The position to insert the Game Object/s at.\n *\n * @return {this} This Container instance.\n */\n addAt: function (child, index)\n {\n ArrayUtils.AddAt(this.list, child, index, this.maxSize, this.addHandler, this);\n\n return this;\n },\n\n /**\n * Returns the Game Object at the given position in this Container.\n *\n * @method Phaser.GameObjects.Container#getAt\n * @since 3.4.0\n *\n * @param {integer} index - The position to get the Game Object from.\n *\n * @return {?Phaser.GameObjects.GameObject} The Game Object at the specified index, or `null` if none found.\n */\n getAt: function (index)\n {\n return this.list[index];\n },\n\n /**\n * Returns the index of the given Game Object in this Container.\n *\n * @method Phaser.GameObjects.Container#getIndex\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container.\n *\n * @return {integer} The index of the Game Object in this Container, or -1 if not found.\n */\n getIndex: function (child)\n {\n return this.list.indexOf(child);\n },\n\n /**\n * Sort the contents of this Container so the items are in order based on the given property.\n * For example: `sort('alpha')` would sort the elements based on the value of their `alpha` property.\n *\n * @method Phaser.GameObjects.Container#sort\n * @since 3.4.0\n *\n * @param {string} property - The property to lexically sort by.\n * @param {function} [handler] - Provide your own custom handler function. Will receive 2 children which it should compare and return a boolean.\n *\n * @return {this} This Container instance.\n */\n sort: function (property, handler)\n {\n if (!property)\n {\n return this;\n }\n\n if (handler === undefined)\n {\n handler = function (childA, childB)\n {\n return childA[property] - childB[property];\n };\n }\n\n ArrayUtils.StableSort.inplace(this.list, handler);\n\n return this;\n },\n\n /**\n * Searches for the first instance of a child with its `name` property matching the given argument.\n * Should more than one child have the same name only the first is returned.\n *\n * @method Phaser.GameObjects.Container#getByName\n * @since 3.4.0\n *\n * @param {string} name - The name to search for.\n *\n * @return {?Phaser.GameObjects.GameObject} The first child with a matching name, or `null` if none were found.\n */\n getByName: function (name)\n {\n return ArrayUtils.GetFirst(this.list, 'name', name);\n },\n\n /**\n * Returns a random Game Object from this Container.\n *\n * @method Phaser.GameObjects.Container#getRandom\n * @since 3.4.0\n *\n * @param {integer} [startIndex=0] - An optional start index.\n * @param {integer} [length] - An optional length, the total number of elements (from the startIndex) to choose from.\n *\n * @return {?Phaser.GameObjects.GameObject} A random child from the Container, or `null` if the Container is empty.\n */\n getRandom: function (startIndex, length)\n {\n return ArrayUtils.GetRandom(this.list, startIndex, length);\n },\n\n /**\n * Gets the first Game Object in this Container.\n *\n * You can also specify a property and value to search for, in which case it will return the first\n * Game Object in this Container with a matching property and / or value.\n *\n * For example: `getFirst('visible', true)` would return the first Game Object that had its `visible` property set.\n *\n * You can limit the search to the `startIndex` - `endIndex` range.\n *\n * @method Phaser.GameObjects.Container#getFirst\n * @since 3.4.0\n *\n * @param {string} property - The property to test on each Game Object in the Container.\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\n * @param {integer} [startIndex=0] - An optional start index to search from.\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\n *\n * @return {?Phaser.GameObjects.GameObject} The first matching Game Object, or `null` if none was found.\n */\n getFirst: function (property, value, startIndex, endIndex)\n {\n return ArrayUtils.GetFirst(this.list, property, value, startIndex, endIndex);\n },\n\n /**\n * Returns all Game Objects in this Container.\n *\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\n *\n * For example: `getAll('body')` would return only Game Objects that have a body property.\n *\n * You can also specify a value to compare the property to:\n *\n * `getAll('visible', true)` would return only Game Objects that have their visible property set to `true`.\n *\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\n * the first 50 Game Objects.\n *\n * @method Phaser.GameObjects.Container#getAll\n * @since 3.4.0\n *\n * @param {string} [property] - The property to test on each Game Object in the Container.\n * @param {any} [value] - If property is set then the `property` must strictly equal this value to be included in the results.\n * @param {integer} [startIndex=0] - An optional start index to search from.\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\n *\n * @return {Phaser.GameObjects.GameObject[]} An array of matching Game Objects from this Container.\n */\n getAll: function (property, value, startIndex, endIndex)\n {\n return ArrayUtils.GetAll(this.list, property, value, startIndex, endIndex);\n },\n\n /**\n * Returns the total number of Game Objects in this Container that have a property\n * matching the given value.\n *\n * For example: `count('visible', true)` would count all the elements that have their visible property set.\n *\n * You can optionally limit the operation to the `startIndex` - `endIndex` range.\n *\n * @method Phaser.GameObjects.Container#count\n * @since 3.4.0\n *\n * @param {string} property - The property to check.\n * @param {any} value - The value to check.\n * @param {integer} [startIndex=0] - An optional start index to search from.\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\n *\n * @return {integer} The total number of Game Objects in this Container with a property matching the given value.\n */\n count: function (property, value, startIndex, endIndex)\n {\n return ArrayUtils.CountAllMatching(this.list, property, value, startIndex, endIndex);\n },\n\n /**\n * Swaps the position of two Game Objects in this Container.\n * Both Game Objects must belong to this Container.\n *\n * @method Phaser.GameObjects.Container#swap\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child1 - The first Game Object to swap.\n * @param {Phaser.GameObjects.GameObject} child2 - The second Game Object to swap.\n *\n * @return {this} This Container instance.\n */\n swap: function (child1, child2)\n {\n ArrayUtils.Swap(this.list, child1, child2);\n\n return this;\n },\n\n /**\n * Moves a Game Object to a new position within this Container.\n *\n * The Game Object must already be a child of this Container.\n *\n * The Game Object is removed from its old position and inserted into the new one.\n * Therefore the Container size does not change. Other children will change position accordingly.\n *\n * @method Phaser.GameObjects.Container#moveTo\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to move.\n * @param {integer} index - The new position of the Game Object in this Container.\n *\n * @return {this} This Container instance.\n */\n moveTo: function (child, index)\n {\n ArrayUtils.MoveTo(this.list, child, index);\n\n return this;\n },\n\n /**\n * Removes the given Game Object, or array of Game Objects, from this Container.\n *\n * The Game Objects must already be children of this Container.\n *\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\n *\n * @method Phaser.GameObjects.Container#remove\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to be removed from the Container.\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each child successfully removed from this Container.\n *\n * @return {this} This Container instance.\n */\n remove: function (child, destroyChild)\n {\n var removed = ArrayUtils.Remove(this.list, child, this.removeHandler, this);\n\n if (destroyChild && removed)\n {\n if (!Array.isArray(removed))\n {\n removed = [ removed ];\n }\n\n for (var i = 0; i < removed.length; i++)\n {\n removed[i].destroy();\n }\n }\n\n return this;\n },\n\n /**\n * Removes the Game Object at the given position in this Container.\n *\n * You can also optionally call `destroy` on the Game Object, if one is found.\n *\n * @method Phaser.GameObjects.Container#removeAt\n * @since 3.4.0\n *\n * @param {integer} index - The index of the Game Object to be removed.\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\n *\n * @return {this} This Container instance.\n */\n removeAt: function (index, destroyChild)\n {\n var removed = ArrayUtils.RemoveAt(this.list, index, this.removeHandler, this);\n\n if (destroyChild && removed)\n {\n removed.destroy();\n }\n\n return this;\n },\n\n /**\n * Removes the Game Objects between the given positions in this Container.\n *\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\n *\n * @method Phaser.GameObjects.Container#removeBetween\n * @since 3.4.0\n *\n * @param {integer} [startIndex=0] - An optional start index to search from.\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\n *\n * @return {this} This Container instance.\n */\n removeBetween: function (startIndex, endIndex, destroyChild)\n {\n var removed = ArrayUtils.RemoveBetween(this.list, startIndex, endIndex, this.removeHandler, this);\n\n if (destroyChild)\n {\n for (var i = 0; i < removed.length; i++)\n {\n removed[i].destroy();\n }\n }\n\n return this;\n },\n\n /**\n * Removes all Game Objects from this Container.\n *\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\n *\n * @method Phaser.GameObjects.Container#removeAll\n * @since 3.4.0\n *\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\n *\n * @return {this} This Container instance.\n */\n removeAll: function (destroyChild)\n {\n var removed = ArrayUtils.RemoveBetween(this.list, 0, this.list.length, this.removeHandler, this);\n\n if (destroyChild)\n {\n for (var i = 0; i < removed.length; i++)\n {\n removed[i].destroy();\n }\n }\n\n return this;\n },\n\n /**\n * Brings the given Game Object to the top of this Container.\n * This will cause it to render on-top of any other objects in the Container.\n *\n * @method Phaser.GameObjects.Container#bringToTop\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to bring to the top of the Container.\n *\n * @return {this} This Container instance.\n */\n bringToTop: function (child)\n {\n ArrayUtils.BringToTop(this.list, child);\n\n return this;\n },\n\n /**\n * Sends the given Game Object to the bottom of this Container.\n * This will cause it to render below any other objects in the Container.\n *\n * @method Phaser.GameObjects.Container#sendToBack\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to send to the bottom of the Container.\n *\n * @return {this} This Container instance.\n */\n sendToBack: function (child)\n {\n ArrayUtils.SendToBack(this.list, child);\n\n return this;\n },\n\n /**\n * Moves the given Game Object up one place in this Container, unless it's already at the top.\n *\n * @method Phaser.GameObjects.Container#moveUp\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\n *\n * @return {this} This Container instance.\n */\n moveUp: function (child)\n {\n ArrayUtils.MoveUp(this.list, child);\n\n return this;\n },\n\n /**\n * Moves the given Game Object down one place in this Container, unless it's already at the bottom.\n *\n * @method Phaser.GameObjects.Container#moveDown\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\n *\n * @return {this} This Container instance.\n */\n moveDown: function (child)\n {\n ArrayUtils.MoveDown(this.list, child);\n\n return this;\n },\n\n /**\n * Reverses the order of all Game Objects in this Container.\n *\n * @method Phaser.GameObjects.Container#reverse\n * @since 3.4.0\n *\n * @return {this} This Container instance.\n */\n reverse: function ()\n {\n this.list.reverse();\n\n return this;\n },\n\n /**\n * Shuffles the all Game Objects in this Container using the Fisher-Yates implementation.\n *\n * @method Phaser.GameObjects.Container#shuffle\n * @since 3.4.0\n *\n * @return {this} This Container instance.\n */\n shuffle: function ()\n {\n ArrayUtils.Shuffle(this.list);\n\n return this;\n },\n\n /**\n * Replaces a Game Object in this Container with the new Game Object.\n * The new Game Object cannot already be a child of this Container.\n *\n * @method Phaser.GameObjects.Container#replace\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} oldChild - The Game Object in this Container that will be replaced.\n * @param {Phaser.GameObjects.GameObject} newChild - The Game Object to be added to this Container.\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\n *\n * @return {this} This Container instance.\n */\n replace: function (oldChild, newChild, destroyChild)\n {\n var moved = ArrayUtils.Replace(this.list, oldChild, newChild);\n\n if (moved)\n {\n this.addHandler(newChild);\n this.removeHandler(oldChild);\n\n if (destroyChild)\n {\n oldChild.destroy();\n }\n }\n\n return this;\n },\n\n /**\n * Returns `true` if the given Game Object is a direct child of this Container.\n *\n * This check does not scan nested Containers.\n *\n * @method Phaser.GameObjects.Container#exists\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to check for within this Container.\n *\n * @return {boolean} True if the Game Object is an immediate child of this Container, otherwise false.\n */\n exists: function (child)\n {\n return (this.list.indexOf(child) > -1);\n },\n\n /**\n * Sets the property to the given value on all Game Objects in this Container.\n *\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\n * the first 50 Game Objects.\n *\n * @method Phaser.GameObjects.Container#setAll\n * @since 3.4.0\n *\n * @param {string} property - The property that must exist on the Game Object.\n * @param {any} value - The value to get the property to.\n * @param {integer} [startIndex=0] - An optional start index to search from.\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\n *\n * @return {this} This Container instance.\n */\n setAll: function (property, value, startIndex, endIndex)\n {\n ArrayUtils.SetAll(this.list, property, value, startIndex, endIndex);\n\n return this;\n },\n\n /**\n * @callback EachContainerCallback\n * @generic I - [item]\n *\n * @param {*} item - The child Game Object of the Container.\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\n */\n\n /**\n * Passes all Game Objects in this Container to the given callback.\n *\n * A copy of the Container is made before passing each entry to your callback.\n * This protects against the callback itself modifying the Container.\n *\n * If you know for sure that the callback will not change the size of this Container\n * then you can use the more performant `Container.iterate` method instead.\n *\n * @method Phaser.GameObjects.Container#each\n * @since 3.4.0\n *\n * @param {function} callback - The function to call.\n * @param {object} [context] - Value to use as `this` when executing callback.\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\n *\n * @return {this} This Container instance.\n */\n each: function (callback, context)\n {\n var args = [ null ];\n var i;\n var temp = this.list.slice();\n var len = temp.length;\n\n for (i = 2; i < arguments.length; i++)\n {\n args.push(arguments[i]);\n }\n\n for (i = 0; i < len; i++)\n {\n args[0] = temp[i];\n\n callback.apply(context, args);\n }\n\n return this;\n },\n\n /**\n * Passes all Game Objects in this Container to the given callback.\n *\n * Only use this method when you absolutely know that the Container will not be modified during\n * the iteration, i.e. by removing or adding to its contents.\n *\n * @method Phaser.GameObjects.Container#iterate\n * @since 3.4.0\n *\n * @param {function} callback - The function to call.\n * @param {object} [context] - Value to use as `this` when executing callback.\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\n *\n * @return {this} This Container instance.\n */\n iterate: function (callback, context)\n {\n var args = [ null ];\n var i;\n\n for (i = 2; i < arguments.length; i++)\n {\n args.push(arguments[i]);\n }\n\n for (i = 0; i < this.list.length; i++)\n {\n args[0] = this.list[i];\n\n callback.apply(context, args);\n }\n\n return this;\n },\n\n /**\n * Sets the scroll factor of this Container and optionally all of its children.\n *\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\n *\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\n * It does not change the Game Objects actual position values.\n *\n * A value of 1 means it will move exactly in sync with a camera.\n * A value of 0 means it will not move at all, even if the camera moves.\n * Other values control the degree to which the camera movement is mapped to this Game Object.\n *\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\n * calculating physics collisions. Bodies always collide based on their world position, but changing\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\n * them from physics bodies if not accounted for in your code.\n *\n * @method Phaser.GameObjects.Container#setScrollFactor\n * @since 3.0.0\n *\n * @param {number} x - The horizontal scroll factor of this Game Object.\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\n * @param {boolean} [updateChildren=false] - Apply this scrollFactor to all Container children as well?\n *\n * @return {this} This Game Object instance.\n */\n setScrollFactor: function (x, y, updateChildren)\n {\n if (y === undefined) { y = x; }\n if (updateChildren === undefined) { updateChildren = false; }\n\n this.scrollFactorX = x;\n this.scrollFactorY = y;\n\n if (updateChildren)\n {\n ArrayUtils.SetAll(this.list, 'scrollFactorX', x);\n ArrayUtils.SetAll(this.list, 'scrollFactorY', y);\n }\n\n return this;\n },\n\n /**\n * The number of Game Objects inside this Container.\n *\n * @name Phaser.GameObjects.Container#length\n * @type {integer}\n * @readonly\n * @since 3.4.0\n */\n length: {\n\n get: function ()\n {\n return this.list.length;\n }\n\n },\n\n /**\n * Returns the first Game Object within the Container, or `null` if it is empty.\n *\n * You can move the cursor by calling `Container.next` and `Container.previous`.\n *\n * @name Phaser.GameObjects.Container#first\n * @type {?Phaser.GameObjects.GameObject}\n * @readonly\n * @since 3.4.0\n */\n first: {\n\n get: function ()\n {\n this.position = 0;\n\n if (this.list.length > 0)\n {\n return this.list[0];\n }\n else\n {\n return null;\n }\n }\n\n },\n\n /**\n * Returns the last Game Object within the Container, or `null` if it is empty.\n *\n * You can move the cursor by calling `Container.next` and `Container.previous`.\n *\n * @name Phaser.GameObjects.Container#last\n * @type {?Phaser.GameObjects.GameObject}\n * @readonly\n * @since 3.4.0\n */\n last: {\n\n get: function ()\n {\n if (this.list.length > 0)\n {\n this.position = this.list.length - 1;\n\n return this.list[this.position];\n }\n else\n {\n return null;\n }\n }\n\n },\n\n /**\n * Returns the next Game Object within the Container, or `null` if it is empty.\n *\n * You can move the cursor by calling `Container.next` and `Container.previous`.\n *\n * @name Phaser.GameObjects.Container#next\n * @type {?Phaser.GameObjects.GameObject}\n * @readonly\n * @since 3.4.0\n */\n next: {\n\n get: function ()\n {\n if (this.position < this.list.length)\n {\n this.position++;\n\n return this.list[this.position];\n }\n else\n {\n return null;\n }\n }\n\n },\n\n /**\n * Returns the previous Game Object within the Container, or `null` if it is empty.\n *\n * You can move the cursor by calling `Container.next` and `Container.previous`.\n *\n * @name Phaser.GameObjects.Container#previous\n * @type {?Phaser.GameObjects.GameObject}\n * @readonly\n * @since 3.4.0\n */\n previous: {\n\n get: function ()\n {\n if (this.position > 0)\n {\n this.position--;\n\n return this.list[this.position];\n }\n else\n {\n return null;\n }\n }\n\n },\n\n /**\n * Internal destroy handler, called as part of the destroy process.\n *\n * @method Phaser.GameObjects.Container#preDestroy\n * @protected\n * @since 3.9.0\n */\n preDestroy: function ()\n {\n this.removeAll(!!this.exclusive);\n\n this.localTransform.destroy();\n this.tempTransformMatrix.destroy();\n\n this.list = [];\n this._displayList = null;\n }\n\n});\n\nmodule.exports = Container;\n","/**\n * @author Richard Davey \n * @author Felipe Alfonso <@bitnenfer>\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Renders this Game Object with the Canvas Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method Phaser.GameObjects.Container#renderCanvas\n * @since 3.4.0\n * @private\n *\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar ContainerCanvasRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix)\n{\n var children = container.list;\n\n if (children.length === 0)\n {\n return;\n }\n\n var transformMatrix = container.localTransform;\n\n if (parentMatrix)\n {\n transformMatrix.loadIdentity();\n transformMatrix.multiply(parentMatrix);\n transformMatrix.translate(container.x, container.y);\n transformMatrix.rotate(container.rotation);\n transformMatrix.scale(container.scaleX, container.scaleY);\n }\n else\n {\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\n }\n\n var containerHasBlendMode = (container.blendMode !== -1);\n\n if (!containerHasBlendMode)\n {\n // If Container is SKIP_TEST then set blend mode to be Normal\n renderer.setBlendMode(0);\n }\n\n var alpha = container._alpha;\n var scrollFactorX = container.scrollFactorX;\n var scrollFactorY = container.scrollFactorY;\n\n if (container.mask)\n {\n container.mask.preRenderCanvas(renderer, null, camera);\n }\n\n for (var i = 0; i < children.length; i++)\n {\n var child = children[i];\n\n if (!child.willRender(camera))\n {\n continue;\n }\n\n var childAlpha = child.alpha;\n var childScrollFactorX = child.scrollFactorX;\n var childScrollFactorY = child.scrollFactorY;\n\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\n {\n // If Container doesn't have its own blend mode, then a child can have one\n renderer.setBlendMode(child.blendMode);\n }\n\n // Set parent values\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\n child.setAlpha(childAlpha * alpha);\n\n // Render\n child.renderCanvas(renderer, child, interpolationPercentage, camera, transformMatrix);\n\n // Restore original values\n child.setAlpha(childAlpha);\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\n }\n\n if (container.mask)\n {\n container.mask.postRenderCanvas(renderer);\n }\n};\n\nmodule.exports = ContainerCanvasRenderer;\n","/**\n * @author Richard Davey \n * @author Felipe Alfonso <@bitnenfer>\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar renderWebGL = require('../../utils/NOOP');\nvar renderCanvas = require('../../utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./ContainerWebGLRenderer');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./ContainerCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas\n\n};\n","/**\n * @author Richard Davey \n * @author Felipe Alfonso <@bitnenfer>\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Renders this Game Object with the WebGL Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method Phaser.GameObjects.Container#renderWebGL\n * @since 3.4.0\n * @private\n *\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar ContainerWebGLRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix)\n{\n var children = container.list;\n\n if (children.length === 0)\n {\n return;\n }\n\n var transformMatrix = container.localTransform;\n \n if (parentMatrix)\n {\n transformMatrix.loadIdentity();\n transformMatrix.multiply(parentMatrix);\n transformMatrix.translate(container.x, container.y);\n transformMatrix.rotate(container.rotation);\n transformMatrix.scale(container.scaleX, container.scaleY);\n }\n else\n {\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\n }\n\n var containerHasBlendMode = (container.blendMode !== -1);\n\n if (!containerHasBlendMode)\n {\n // If Container is SKIP_TEST then set blend mode to be Normal\n renderer.setBlendMode(0);\n }\n\n var alpha = container.alpha;\n\n var scrollFactorX = container.scrollFactorX;\n var scrollFactorY = container.scrollFactorY;\n\n var list = children;\n var childCount = children.length;\n\n for (var i = 0; i < childCount; i++)\n {\n var child = children[i];\n\n if (!child.willRender(camera))\n {\n continue;\n }\n\n var childAlphaTopLeft;\n var childAlphaTopRight;\n var childAlphaBottomLeft;\n var childAlphaBottomRight;\n\n if (child.alphaTopLeft !== undefined)\n {\n childAlphaTopLeft = child.alphaTopLeft;\n childAlphaTopRight = child.alphaTopRight;\n childAlphaBottomLeft = child.alphaBottomLeft;\n childAlphaBottomRight = child.alphaBottomRight;\n }\n else\n {\n var childAlpha = child.alpha;\n\n childAlphaTopLeft = childAlpha;\n childAlphaTopRight = childAlpha;\n childAlphaBottomLeft = childAlpha;\n childAlphaBottomRight = childAlpha;\n }\n\n var childScrollFactorX = child.scrollFactorX;\n var childScrollFactorY = child.scrollFactorY;\n\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\n {\n // If Container doesn't have its own blend mode, then a child can have one\n renderer.setBlendMode(child.blendMode);\n }\n\n var mask = child.mask;\n\n if (mask)\n {\n mask.preRenderWebGL(renderer, child, camera);\n }\n\n var type = child.type;\n\n if (type !== renderer.currentType)\n {\n renderer.newType = true;\n renderer.currentType = type;\n }\n\n renderer.nextTypeMatch = (i < childCount - 1) ? (list[i + 1].type === renderer.currentType) : false;\n\n // Set parent values\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\n\n child.setAlpha(childAlphaTopLeft * alpha, childAlphaTopRight * alpha, childAlphaBottomLeft * alpha, childAlphaBottomRight * alpha);\n\n // Render\n child.renderWebGL(renderer, child, interpolationPercentage, camera, transformMatrix);\n\n // Restore original values\n\n child.setAlpha(childAlphaTopLeft, childAlphaTopRight, childAlphaBottomLeft, childAlphaBottomRight);\n\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\n\n if (mask)\n {\n mask.postRenderWebGL(renderer, camera);\n }\n\n renderer.newType = false;\n }\n};\n\nmodule.exports = ContainerWebGLRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Added to Scene Event.\n *\n * This event is dispatched when a Game Object is added to a Scene.\n *\n * Listen for it on a Game Object instance using `GameObject.on('addedtoscene', listener)`.\n *\n * @event Phaser.GameObjects.Events#ADDED_TO_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\n */\nmodule.exports = 'addedtoscene';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Destroy Event.\n * \n * This event is dispatched when a Game Object instance is being destroyed.\n * \n * Listen for it on a Game Object instance using `GameObject.on('destroy', listener)`.\n *\n * @event Phaser.GameObjects.Events#DESTROY\n * @since 3.0.0\n * \n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed.\n */\nmodule.exports = 'destroy';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Removed from Scene Event.\n *\n * This event is dispatched when a Game Object is removed from a Scene.\n *\n * Listen for it on a Game Object instance using `GameObject.on('removedfromscene', listener)`.\n *\n * @event Phaser.GameObjects.Events#REMOVED_FROM_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\n */\nmodule.exports = 'removedfromscene';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Complete Event.\n * \n * This event is dispatched when a Video finishes playback by reaching the end of its duration. It\n * is also dispatched if a video marker sequence is being played and reaches the end.\n * \n * Note that not all videos can fire this event. Live streams, for example, have no fixed duration,\n * so never technically 'complete'.\n * \n * If a video is stopped from playback, via the `Video.stop` method, it will emit the\n * `VIDEO_STOP` event instead of this one.\n * \n * Listen for it from a Video Game Object instance using `Video.on('complete', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_COMPLETE\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed playback.\n */\nmodule.exports = 'complete';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Created Event.\n * \n * This event is dispatched when the texture for a Video has been created. This happens\n * when enough of the video source has been loaded that the browser is able to render a\n * frame from it.\n * \n * Listen for it from a Video Game Object instance using `Video.on('created', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_CREATED\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\n * @param {integer} width - The width of the video.\n * @param {integer} height - The height of the video.\n */\nmodule.exports = 'created';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Error Event.\n * \n * This event is dispatched when a Video tries to play a source that does not exist, or is the wrong file type.\n * \n * Listen for it from a Video Game Object instance using `Video.on('error', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_ERROR\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which threw the error.\n * @param {Event} event - The native DOM event the browser raised during playback.\n */\nmodule.exports = 'error';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Loop Event.\n * \n * This event is dispatched when a Video that is currently playing has looped. This only\n * happens if the `loop` parameter was specified, or the `setLoop` method was called,\n * and if the video has a fixed duration. Video streams, for example, cannot loop, as\n * they have no duration.\n * \n * Looping is based on the result of the Video `timeupdate` event. This event is not\n * frame-accurate, due to the way browsers work, so please do not rely on this loop\n * event to be time or frame precise.\n * \n * Listen for it from a Video Game Object instance using `Video.on('loop', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_LOOP\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which has looped.\n */\nmodule.exports = 'loop';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Play Event.\n * \n * This event is dispatched when a Video begins playback. For videos that do not require\n * interaction unlocking, this is usually as soon as the `Video.play` method is called.\n * However, for videos that require unlocking, it is fired once playback begins after\n * they've been unlocked.\n * \n * Listen for it from a Video Game Object instance using `Video.on('play', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_PLAY\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started playback.\n */\nmodule.exports = 'play';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Seeked Event.\n * \n * This event is dispatched when a Video completes seeking to a new point in its timeline.\n * \n * Listen for it from a Video Game Object instance using `Video.on('seeked', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_SEEKED\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed seeking.\n */\nmodule.exports = 'seeked';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Seeking Event.\n * \n * This event is dispatched when a Video _begins_ seeking to a new point in its timeline.\n * When the seek is complete, it will dispatch the `VIDEO_SEEKED` event to conclude.\n * \n * Listen for it from a Video Game Object instance using `Video.on('seeking', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_SEEKING\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started seeking.\n */\nmodule.exports = 'seeking';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Stopped Event.\n * \n * This event is dispatched when a Video is stopped from playback via a call to the `Video.stop` method,\n * either directly via game code, or indirectly as the result of changing a video source or destroying it.\n * \n * Listen for it from a Video Game Object instance using `Video.on('stop', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_STOP\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which stopped playback.\n */\nmodule.exports = 'stop';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Timeout Event.\n * \n * This event is dispatched when a Video has exhausted its allocated time while trying to connect to a video\n * source to start playback.\n * \n * Listen for it from a Video Game Object instance using `Video.on('timeout', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_TIMEOUT\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which timed out.\n */\nmodule.exports = 'timeout';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Unlocked Event.\n * \n * This event is dispatched when a Video that was prevented from playback due to the browsers\n * Media Engagement Interaction policy, is unlocked by a user gesture.\n * \n * Listen for it from a Video Game Object instance using `Video.on('unlocked', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_UNLOCKED\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\n */\nmodule.exports = 'unlocked';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.GameObjects.Events\n */\n\nmodule.exports = {\n\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\n DESTROY: require('./DESTROY_EVENT'),\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'),\n VIDEO_COMPLETE: require('./VIDEO_COMPLETE_EVENT'),\n VIDEO_CREATED: require('./VIDEO_CREATED_EVENT'),\n VIDEO_ERROR: require('./VIDEO_ERROR_EVENT'),\n VIDEO_LOOP: require('./VIDEO_LOOP_EVENT'),\n VIDEO_PLAY: require('./VIDEO_PLAY_EVENT'),\n VIDEO_SEEKED: require('./VIDEO_SEEKED_EVENT'),\n VIDEO_SEEKING: require('./VIDEO_SEEKING_EVENT'),\n VIDEO_STOP: require('./VIDEO_STOP_EVENT'),\n VIDEO_TIMEOUT: require('./VIDEO_TIMEOUT_EVENT'),\n VIDEO_UNLOCKED: require('./VIDEO_UNLOCKED_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar GEOM_CONST = {\n\n /**\n * A Circle Geometry object type.\n * \n * @name Phaser.Geom.CIRCLE\n * @type {integer}\n * @since 3.19.0\n */\n CIRCLE: 0,\n\n /**\n * An Ellipse Geometry object type.\n * \n * @name Phaser.Geom.ELLIPSE\n * @type {integer}\n * @since 3.19.0\n */\n ELLIPSE: 1,\n\n /**\n * A Line Geometry object type.\n * \n * @name Phaser.Geom.LINE\n * @type {integer}\n * @since 3.19.0\n */\n LINE: 2,\n\n /**\n * A Point Geometry object type.\n * \n * @name Phaser.Geom.POINT\n * @type {integer}\n * @since 3.19.0\n */\n POINT: 3,\n\n /**\n * A Polygon Geometry object type.\n * \n * @name Phaser.Geom.POLYGON\n * @type {integer}\n * @since 3.19.0\n */\n POLYGON: 4,\n\n /**\n * A Rectangle Geometry object type.\n * \n * @name Phaser.Geom.RECTANGLE\n * @type {integer}\n * @since 3.19.0\n */\n RECTANGLE: 5,\n\n /**\n * A Triangle Geometry object type.\n * \n * @name Phaser.Geom.TRIANGLE\n * @type {integer}\n * @since 3.19.0\n */\n TRIANGLE: 6\n\n};\n\nmodule.exports = GEOM_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Point = require('../point/Point');\n\n/**\n * Get a point on a line that's a given percentage along its length.\n *\n * @function Phaser.Geom.Line.GetPoint\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point} O - [out,$return]\n *\n * @param {Phaser.Geom.Line} line - The line.\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\n * @param {(Phaser.Geom.Point|object)} [out] - An optional point, or point-like object, to store the coordinates of the point on the line.\n *\n * @return {(Phaser.Geom.Point|object)} The point on the line.\n */\nvar GetPoint = function (line, position, out)\n{\n if (out === undefined) { out = new Point(); }\n\n out.x = line.x1 + (line.x2 - line.x1) * position;\n out.y = line.y1 + (line.y2 - line.y1) * position;\n\n return out;\n};\n\nmodule.exports = GetPoint;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Length = require('./Length');\nvar Point = require('../point/Point');\n\n/**\n * Get a number of points along a line's length.\n *\n * Provide a `quantity` to get an exact number of points along the line.\n *\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\n * providing a `stepRate`.\n *\n * @function Phaser.Geom.Line.GetPoints\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\n *\n * @param {Phaser.Geom.Line} line - The line.\n * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\n * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\n *\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\n */\nvar GetPoints = function (line, quantity, stepRate, out)\n{\n if (out === undefined) { out = []; }\n\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\n if (!quantity && stepRate > 0)\n {\n quantity = Length(line) / stepRate;\n }\n\n var x1 = line.x1;\n var y1 = line.y1;\n\n var x2 = line.x2;\n var y2 = line.y2;\n\n for (var i = 0; i < quantity; i++)\n {\n var position = i / quantity;\n\n var x = x1 + (x2 - x1) * position;\n var y = y1 + (y2 - y1) * position;\n\n out.push(new Point(x, y));\n }\n\n return out;\n};\n\nmodule.exports = GetPoints;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the length of the given line.\n *\n * @function Phaser.Geom.Line.Length\n * @since 3.0.0\n *\n * @param {Phaser.Geom.Line} line - The line to calculate the length of.\n *\n * @return {number} The length of the line.\n */\nvar Length = function (line)\n{\n return Math.sqrt((line.x2 - line.x1) * (line.x2 - line.x1) + (line.y2 - line.y1) * (line.y2 - line.y1));\n};\n\nmodule.exports = Length;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar GetPoint = require('./GetPoint');\nvar GetPoints = require('./GetPoints');\nvar GEOM_CONST = require('../const');\nvar Random = require('./Random');\nvar Vector2 = require('../../math/Vector2');\n\n/**\n * @classdesc\n * Defines a Line segment, a part of a line between two endpoints.\n *\n * @class Line\n * @memberof Phaser.Geom\n * @constructor\n * @since 3.0.0\n *\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\n */\nvar Line = new Class({\n\n initialize:\n\n function Line (x1, y1, x2, y2)\n {\n if (x1 === undefined) { x1 = 0; }\n if (y1 === undefined) { y1 = 0; }\n if (x2 === undefined) { x2 = 0; }\n if (y2 === undefined) { y2 = 0; }\n\n /**\n * The geometry constant type of this object: `GEOM_CONST.LINE`.\n * Used for fast type comparisons.\n *\n * @name Phaser.Geom.Line#type\n * @type {integer}\n * @readonly\n * @since 3.19.0\n */\n this.type = GEOM_CONST.LINE;\n\n /**\n * The x coordinate of the lines starting point.\n *\n * @name Phaser.Geom.Line#x1\n * @type {number}\n * @since 3.0.0\n */\n this.x1 = x1;\n\n /**\n * The y coordinate of the lines starting point.\n *\n * @name Phaser.Geom.Line#y1\n * @type {number}\n * @since 3.0.0\n */\n this.y1 = y1;\n\n /**\n * The x coordinate of the lines ending point.\n *\n * @name Phaser.Geom.Line#x2\n * @type {number}\n * @since 3.0.0\n */\n this.x2 = x2;\n\n /**\n * The y coordinate of the lines ending point.\n *\n * @name Phaser.Geom.Line#y2\n * @type {number}\n * @since 3.0.0\n */\n this.y2 = y2;\n },\n\n /**\n * Get a point on a line that's a given percentage along its length.\n *\n * @method Phaser.Geom.Line#getPoint\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point} O - [output,$return]\n *\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\n * @param {(Phaser.Geom.Point|object)} [output] - An optional point, or point-like object, to store the coordinates of the point on the line.\n *\n * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point on the line.\n */\n getPoint: function (position, output)\n {\n return GetPoint(this, position, output);\n },\n\n /**\n * Get a number of points along a line's length.\n *\n * Provide a `quantity` to get an exact number of points along the line.\n *\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\n * providing a `stepRate`.\n *\n * @method Phaser.Geom.Line#getPoints\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\n *\n * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\n * @param {integer} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\n * @param {(array|Phaser.Geom.Point[])} [output] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\n *\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\n */\n getPoints: function (quantity, stepRate, output)\n {\n return GetPoints(this, quantity, stepRate, output);\n },\n\n /**\n * Get a random Point on the Line.\n *\n * @method Phaser.Geom.Line#getRandomPoint\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point} O - [point,$return]\n *\n * @param {(Phaser.Geom.Point|object)} [point] - An instance of a Point to be modified.\n *\n * @return {Phaser.Geom.Point} A random Point on the Line.\n */\n getRandomPoint: function (point)\n {\n return Random(this, point);\n },\n\n /**\n * Set new coordinates for the line endpoints.\n *\n * @method Phaser.Geom.Line#setTo\n * @since 3.0.0\n *\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\n *\n * @return {this} This Line object.\n */\n setTo: function (x1, y1, x2, y2)\n {\n if (x1 === undefined) { x1 = 0; }\n if (y1 === undefined) { y1 = 0; }\n if (x2 === undefined) { x2 = 0; }\n if (y2 === undefined) { y2 = 0; }\n\n this.x1 = x1;\n this.y1 = y1;\n\n this.x2 = x2;\n this.y2 = y2;\n\n return this;\n },\n\n /**\n * Returns a Vector2 object that corresponds to the start of this Line.\n *\n * @method Phaser.Geom.Line#getPointA\n * @since 3.0.0\n *\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\n *\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\n *\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the start of this Line.\n */\n getPointA: function (vec2)\n {\n if (vec2 === undefined) { vec2 = new Vector2(); }\n\n vec2.set(this.x1, this.y1);\n\n return vec2;\n },\n\n /**\n * Returns a Vector2 object that corresponds to the end of this Line.\n *\n * @method Phaser.Geom.Line#getPointB\n * @since 3.0.0\n *\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\n *\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\n *\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the end of this Line.\n */\n getPointB: function (vec2)\n {\n if (vec2 === undefined) { vec2 = new Vector2(); }\n\n vec2.set(this.x2, this.y2);\n\n return vec2;\n },\n\n /**\n * The left position of the Line.\n *\n * @name Phaser.Geom.Line#left\n * @type {number}\n * @since 3.0.0\n */\n left: {\n\n get: function ()\n {\n return Math.min(this.x1, this.x2);\n },\n\n set: function (value)\n {\n if (this.x1 <= this.x2)\n {\n this.x1 = value;\n }\n else\n {\n this.x2 = value;\n }\n }\n\n },\n\n /**\n * The right position of the Line.\n *\n * @name Phaser.Geom.Line#right\n * @type {number}\n * @since 3.0.0\n */\n right: {\n\n get: function ()\n {\n return Math.max(this.x1, this.x2);\n },\n\n set: function (value)\n {\n if (this.x1 > this.x2)\n {\n this.x1 = value;\n }\n else\n {\n this.x2 = value;\n }\n }\n\n },\n\n /**\n * The top position of the Line.\n *\n * @name Phaser.Geom.Line#top\n * @type {number}\n * @since 3.0.0\n */\n top: {\n\n get: function ()\n {\n return Math.min(this.y1, this.y2);\n },\n\n set: function (value)\n {\n if (this.y1 <= this.y2)\n {\n this.y1 = value;\n }\n else\n {\n this.y2 = value;\n }\n }\n\n },\n\n /**\n * The bottom position of the Line.\n *\n * @name Phaser.Geom.Line#bottom\n * @type {number}\n * @since 3.0.0\n */\n bottom: {\n\n get: function ()\n {\n return Math.max(this.y1, this.y2);\n },\n\n set: function (value)\n {\n if (this.y1 > this.y2)\n {\n this.y1 = value;\n }\n else\n {\n this.y2 = value;\n }\n }\n\n }\n\n});\n\nmodule.exports = Line;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Point = require('../point/Point');\n\n/**\n * Returns a random point on a given Line.\n *\n * @function Phaser.Geom.Line.Random\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point} O - [out,$return]\n *\n * @param {Phaser.Geom.Line} line - The Line to calculate the random Point on.\n * @param {(Phaser.Geom.Point|object)} [out] - An instance of a Point to be modified.\n *\n * @return {(Phaser.Geom.Point|object)} A random Point on the Line.\n */\nvar Random = function (line, out)\n{\n if (out === undefined) { out = new Point(); }\n\n var t = Math.random();\n\n out.x = line.x1 + t * (line.x2 - line.x1);\n out.y = line.y1 + t * (line.y2 - line.y1);\n\n return out;\n};\n\nmodule.exports = Random;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar GEOM_CONST = require('../const');\n\n/**\n * @classdesc\n * Defines a Point in 2D space, with an x and y component.\n *\n * @class Point\n * @memberof Phaser.Geom\n * @constructor\n * @since 3.0.0\n *\n * @param {number} [x=0] - The x coordinate of this Point.\n * @param {number} [y=x] - The y coordinate of this Point.\n */\nvar Point = new Class({\n\n initialize:\n\n function Point (x, y)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = x; }\n\n /**\n * The geometry constant type of this object: `GEOM_CONST.POINT`.\n * Used for fast type comparisons.\n *\n * @name Phaser.Geom.Point#type\n * @type {integer}\n * @readonly\n * @since 3.19.0\n */\n this.type = GEOM_CONST.POINT;\n\n /**\n * The x coordinate of this Point.\n *\n * @name Phaser.Geom.Point#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.x = x;\n\n /**\n * The y coordinate of this Point.\n *\n * @name Phaser.Geom.Point#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.y = y;\n },\n\n /**\n * Set the x and y coordinates of the point to the given values.\n *\n * @method Phaser.Geom.Point#setTo\n * @since 3.0.0\n *\n * @param {number} [x=0] - The x coordinate of this Point.\n * @param {number} [y=x] - The y coordinate of this Point.\n *\n * @return {this} This Point object.\n */\n setTo: function (x, y)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = x; }\n\n this.x = x;\n this.y = y;\n\n return this;\n }\n\n});\n\nmodule.exports = Point;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Checks if a given point is inside a Rectangle's bounds.\n *\n * @function Phaser.Geom.Rectangle.Contains\n * @since 3.0.0\n *\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to check.\n * @param {number} x - The X coordinate of the point to check.\n * @param {number} y - The Y coordinate of the point to check.\n *\n * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`.\n */\nvar Contains = function (rect, x, y)\n{\n if (rect.width <= 0 || rect.height <= 0)\n {\n return false;\n }\n\n return (rect.x <= x && rect.x + rect.width >= x && rect.y <= y && rect.y + rect.height >= y);\n};\n\nmodule.exports = Contains;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Perimeter = require('./Perimeter');\nvar Point = require('../point/Point');\n\n/**\n * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter.\n * \n * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.\n * \n * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.\n *\n * @function Phaser.Geom.Rectangle.GetPoint\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point} O - [out,$return]\n *\n * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle to get the perimeter point from.\n * @param {number} position - The normalized distance into the Rectangle's perimeter to return.\n * @param {(Phaser.Geom.Point|object)} [out] - An object to update with the `x` and `y` coordinates of the point.\n *\n * @return {Phaser.Geom.Point} The updated `output` object, or a new Point if no `output` object was given.\n */\nvar GetPoint = function (rectangle, position, out)\n{\n if (out === undefined) { out = new Point(); }\n\n if (position <= 0 || position >= 1)\n {\n out.x = rectangle.x;\n out.y = rectangle.y;\n\n return out;\n }\n\n var p = Perimeter(rectangle) * position;\n\n if (position > 0.5)\n {\n p -= (rectangle.width + rectangle.height);\n\n if (p <= rectangle.width)\n {\n // Face 3\n out.x = rectangle.right - p;\n out.y = rectangle.bottom;\n }\n else\n {\n // Face 4\n out.x = rectangle.x;\n out.y = rectangle.bottom - (p - rectangle.width);\n }\n }\n else if (p <= rectangle.width)\n {\n // Face 1\n out.x = rectangle.x + p;\n out.y = rectangle.y;\n }\n else\n {\n // Face 2\n out.x = rectangle.right;\n out.y = rectangle.y + (p - rectangle.width);\n }\n\n return out;\n};\n\nmodule.exports = GetPoint;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar GetPoint = require('./GetPoint');\nvar Perimeter = require('./Perimeter');\n\n// Return an array of points from the perimeter of the rectangle\n// each spaced out based on the quantity or step required\n\n/**\n * Return an array of points from the perimeter of the rectangle, each spaced out based on the quantity or step required.\n *\n * @function Phaser.Geom.Rectangle.GetPoints\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\n *\n * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle object to get the points from.\n * @param {number} step - Step between points. Used to calculate the number of points to return when quantity is falsey. Ignored if quantity is positive.\n * @param {integer} quantity - The number of evenly spaced points from the rectangles perimeter to return. If falsey, step param will be used to calculate the number of points.\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array to store the points in.\n *\n * @return {(array|Phaser.Geom.Point[])} An array of Points from the perimeter of the rectangle.\n */\nvar GetPoints = function (rectangle, quantity, stepRate, out)\n{\n if (out === undefined) { out = []; }\n\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\n if (!quantity && stepRate > 0)\n {\n quantity = Perimeter(rectangle) / stepRate;\n }\n\n for (var i = 0; i < quantity; i++)\n {\n var position = i / quantity;\n\n out.push(GetPoint(rectangle, position));\n }\n\n return out;\n};\n\nmodule.exports = GetPoints;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculates the perimeter of a Rectangle.\n *\n * @function Phaser.Geom.Rectangle.Perimeter\n * @since 3.0.0\n *\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to use.\n *\n * @return {number} The perimeter of the Rectangle, equal to `(width * 2) + (height * 2)`.\n */\nvar Perimeter = function (rect)\n{\n return 2 * (rect.width + rect.height);\n};\n\nmodule.exports = Perimeter;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Point = require('../point/Point');\n\n/**\n * Returns a random point within a Rectangle.\n *\n * @function Phaser.Geom.Rectangle.Random\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point} O - [out,$return]\n *\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to return a point from.\n * @param {Phaser.Geom.Point} out - The object to update with the point's coordinates.\n *\n * @return {Phaser.Geom.Point} The modified `out` object, or a new Point if none was provided.\n */\nvar Random = function (rect, out)\n{\n if (out === undefined) { out = new Point(); }\n\n out.x = rect.x + (Math.random() * rect.width);\n out.y = rect.y + (Math.random() * rect.height);\n\n return out;\n};\n\nmodule.exports = Random;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar Contains = require('./Contains');\nvar GetPoint = require('./GetPoint');\nvar GetPoints = require('./GetPoints');\nvar GEOM_CONST = require('../const');\nvar Line = require('../line/Line');\nvar Random = require('./Random');\n\n/**\n * @classdesc\n * Encapsulates a 2D rectangle defined by its corner point in the top-left and its extends in x (width) and y (height)\n *\n * @class Rectangle\n * @memberof Phaser.Geom\n * @constructor\n * @since 3.0.0\n *\n * @param {number} [x=0] - The X coordinate of the top left corner of the Rectangle.\n * @param {number} [y=0] - The Y coordinate of the top left corner of the Rectangle.\n * @param {number} [width=0] - The width of the Rectangle.\n * @param {number} [height=0] - The height of the Rectangle.\n */\nvar Rectangle = new Class({\n\n initialize:\n\n function Rectangle (x, y, width, height)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n if (width === undefined) { width = 0; }\n if (height === undefined) { height = 0; }\n\n /**\n * The geometry constant type of this object: `GEOM_CONST.RECTANGLE`.\n * Used for fast type comparisons.\n *\n * @name Phaser.Geom.Rectangle#type\n * @type {integer}\n * @readonly\n * @since 3.19.0\n */\n this.type = GEOM_CONST.RECTANGLE;\n\n /**\n * The X coordinate of the top left corner of the Rectangle.\n *\n * @name Phaser.Geom.Rectangle#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.x = x;\n\n /**\n * The Y coordinate of the top left corner of the Rectangle.\n *\n * @name Phaser.Geom.Rectangle#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.y = y;\n\n /**\n * The width of the Rectangle, i.e. the distance between its left side (defined by `x`) and its right side.\n *\n * @name Phaser.Geom.Rectangle#width\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.width = width;\n\n /**\n * The height of the Rectangle, i.e. the distance between its top side (defined by `y`) and its bottom side.\n *\n * @name Phaser.Geom.Rectangle#height\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.height = height;\n },\n\n /**\n * Checks if the given point is inside the Rectangle's bounds.\n *\n * @method Phaser.Geom.Rectangle#contains\n * @since 3.0.0\n *\n * @param {number} x - The X coordinate of the point to check.\n * @param {number} y - The Y coordinate of the point to check.\n *\n * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`.\n */\n contains: function (x, y)\n {\n return Contains(this, x, y);\n },\n\n /**\n * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter.\n * \n * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.\n * \n * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.\n *\n * @method Phaser.Geom.Rectangle#getPoint\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point} O - [output,$return]\n *\n * @param {number} position - The normalized distance into the Rectangle's perimeter to return.\n * @param {(Phaser.Geom.Point|object)} [output] - An object to update with the `x` and `y` coordinates of the point.\n *\n * @return {(Phaser.Geom.Point|object)} The updated `output` object, or a new Point if no `output` object was given.\n */\n getPoint: function (position, output)\n {\n return GetPoint(this, position, output);\n },\n\n /**\n * Returns an array of points from the perimeter of the Rectangle, each spaced out based on the quantity or step required.\n *\n * @method Phaser.Geom.Rectangle#getPoints\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\n *\n * @param {integer} quantity - The number of points to return. Set to `false` or 0 to return an arbitrary number of points (`perimeter / stepRate`) evenly spaced around the Rectangle based on the `stepRate`.\n * @param {number} [stepRate] - If `quantity` is 0, determines the normalized distance between each returned point.\n * @param {(array|Phaser.Geom.Point[])} [output] - An array to which to append the points.\n *\n * @return {(array|Phaser.Geom.Point[])} The modified `output` array, or a new array if none was provided.\n */\n getPoints: function (quantity, stepRate, output)\n {\n return GetPoints(this, quantity, stepRate, output);\n },\n\n /**\n * Returns a random point within the Rectangle's bounds.\n *\n * @method Phaser.Geom.Rectangle#getRandomPoint\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point} O - [point,$return]\n *\n * @param {Phaser.Geom.Point} [point] - The object in which to store the `x` and `y` coordinates of the point.\n *\n * @return {Phaser.Geom.Point} The updated `point`, or a new Point if none was provided.\n */\n getRandomPoint: function (point)\n {\n return Random(this, point);\n },\n\n /**\n * Sets the position, width, and height of the Rectangle.\n *\n * @method Phaser.Geom.Rectangle#setTo\n * @since 3.0.0\n *\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\n * @param {number} y - The Y coordinate of the top left corner of the Rectangle.\n * @param {number} width - The width of the Rectangle.\n * @param {number} height - The height of the Rectangle.\n *\n * @return {this} This Rectangle object.\n */\n setTo: function (x, y, width, height)\n {\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n\n return this;\n },\n\n /**\n * Resets the position, width, and height of the Rectangle to 0.\n *\n * @method Phaser.Geom.Rectangle#setEmpty\n * @since 3.0.0\n *\n * @return {this} This Rectangle object.\n */\n setEmpty: function ()\n {\n return this.setTo(0, 0, 0, 0);\n },\n\n /**\n * Sets the position of the Rectangle.\n *\n * @method Phaser.Geom.Rectangle#setPosition\n * @since 3.0.0\n *\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\n * @param {number} [y=x] - The Y coordinate of the top left corner of the Rectangle.\n *\n * @return {this} This Rectangle object.\n */\n setPosition: function (x, y)\n {\n if (y === undefined) { y = x; }\n\n this.x = x;\n this.y = y;\n\n return this;\n },\n\n /**\n * Sets the width and height of the Rectangle.\n *\n * @method Phaser.Geom.Rectangle#setSize\n * @since 3.0.0\n *\n * @param {number} width - The width to set the Rectangle to.\n * @param {number} [height=width] - The height to set the Rectangle to.\n *\n * @return {this} This Rectangle object.\n */\n setSize: function (width, height)\n {\n if (height === undefined) { height = width; }\n\n this.width = width;\n this.height = height;\n\n return this;\n },\n\n /**\n * Determines if the Rectangle is empty. A Rectangle is empty if its width or height is less than or equal to 0.\n *\n * @method Phaser.Geom.Rectangle#isEmpty\n * @since 3.0.0\n *\n * @return {boolean} `true` if the Rectangle is empty. A Rectangle object is empty if its width or height is less than or equal to 0.\n */\n isEmpty: function ()\n {\n return (this.width <= 0 || this.height <= 0);\n },\n\n /**\n * Returns a Line object that corresponds to the top of this Rectangle.\n *\n * @method Phaser.Geom.Rectangle#getLineA\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Line} O - [line,$return]\n *\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\n *\n * @return {Phaser.Geom.Line} A Line object that corresponds to the top of this Rectangle.\n */\n getLineA: function (line)\n {\n if (line === undefined) { line = new Line(); }\n\n line.setTo(this.x, this.y, this.right, this.y);\n\n return line;\n },\n\n /**\n * Returns a Line object that corresponds to the right of this Rectangle.\n *\n * @method Phaser.Geom.Rectangle#getLineB\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Line} O - [line,$return]\n *\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\n *\n * @return {Phaser.Geom.Line} A Line object that corresponds to the right of this Rectangle.\n */\n getLineB: function (line)\n {\n if (line === undefined) { line = new Line(); }\n\n line.setTo(this.right, this.y, this.right, this.bottom);\n\n return line;\n },\n\n /**\n * Returns a Line object that corresponds to the bottom of this Rectangle.\n *\n * @method Phaser.Geom.Rectangle#getLineC\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Line} O - [line,$return]\n *\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\n *\n * @return {Phaser.Geom.Line} A Line object that corresponds to the bottom of this Rectangle.\n */\n getLineC: function (line)\n {\n if (line === undefined) { line = new Line(); }\n\n line.setTo(this.right, this.bottom, this.x, this.bottom);\n\n return line;\n },\n\n /**\n * Returns a Line object that corresponds to the left of this Rectangle.\n *\n * @method Phaser.Geom.Rectangle#getLineD\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Line} O - [line,$return]\n *\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\n *\n * @return {Phaser.Geom.Line} A Line object that corresponds to the left of this Rectangle.\n */\n getLineD: function (line)\n {\n if (line === undefined) { line = new Line(); }\n\n line.setTo(this.x, this.bottom, this.x, this.y);\n\n return line;\n },\n\n /**\n * The x coordinate of the left of the Rectangle.\n * Changing the left property of a Rectangle object has no effect on the y and height properties. However it does affect the width property, whereas changing the x value does not affect the width property.\n *\n * @name Phaser.Geom.Rectangle#left\n * @type {number}\n * @since 3.0.0\n */\n left: {\n\n get: function ()\n {\n return this.x;\n },\n\n set: function (value)\n {\n if (value >= this.right)\n {\n this.width = 0;\n }\n else\n {\n this.width = this.right - value;\n }\n\n this.x = value;\n }\n\n },\n\n /**\n * The sum of the x and width properties.\n * Changing the right property of a Rectangle object has no effect on the x, y and height properties, however it does affect the width property.\n *\n * @name Phaser.Geom.Rectangle#right\n * @type {number}\n * @since 3.0.0\n */\n right: {\n\n get: function ()\n {\n return this.x + this.width;\n },\n\n set: function (value)\n {\n if (value <= this.x)\n {\n this.width = 0;\n }\n else\n {\n this.width = value - this.x;\n }\n }\n\n },\n\n /**\n * The y coordinate of the top of the Rectangle. Changing the top property of a Rectangle object has no effect on the x and width properties.\n * However it does affect the height property, whereas changing the y value does not affect the height property.\n *\n * @name Phaser.Geom.Rectangle#top\n * @type {number}\n * @since 3.0.0\n */\n top: {\n\n get: function ()\n {\n return this.y;\n },\n\n set: function (value)\n {\n if (value >= this.bottom)\n {\n this.height = 0;\n }\n else\n {\n this.height = (this.bottom - value);\n }\n\n this.y = value;\n }\n\n },\n\n /**\n * The sum of the y and height properties.\n * Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property.\n *\n * @name Phaser.Geom.Rectangle#bottom\n * @type {number}\n * @since 3.0.0\n */\n bottom: {\n\n get: function ()\n {\n return this.y + this.height;\n },\n\n set: function (value)\n {\n if (value <= this.y)\n {\n this.height = 0;\n }\n else\n {\n this.height = value - this.y;\n }\n }\n\n },\n\n /**\n * The x coordinate of the center of the Rectangle.\n *\n * @name Phaser.Geom.Rectangle#centerX\n * @type {number}\n * @since 3.0.0\n */\n centerX: {\n\n get: function ()\n {\n return this.x + (this.width / 2);\n },\n\n set: function (value)\n {\n this.x = value - (this.width / 2);\n }\n\n },\n\n /**\n * The y coordinate of the center of the Rectangle.\n *\n * @name Phaser.Geom.Rectangle#centerY\n * @type {number}\n * @since 3.0.0\n */\n centerY: {\n\n get: function ()\n {\n return this.y + (this.height / 2);\n },\n\n set: function (value)\n {\n this.y = value - (this.height / 2);\n }\n\n }\n\n});\n\nmodule.exports = Rectangle;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Rectangle = require('./Rectangle');\n\n/**\n * Creates a new Rectangle or repositions and/or resizes an existing Rectangle so that it encompasses the two given Rectangles, i.e. calculates their union.\n *\n * @function Phaser.Geom.Rectangle.Union\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\n *\n * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle to use.\n * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle to use.\n * @param {Phaser.Geom.Rectangle} [out] - The Rectangle to store the union in.\n *\n * @return {Phaser.Geom.Rectangle} The modified `out` Rectangle, or a new Rectangle if none was provided.\n */\nvar Union = function (rectA, rectB, out)\n{\n if (out === undefined) { out = new Rectangle(); }\n\n // Cache vars so we can use one of the input rects as the output rect\n var x = Math.min(rectA.x, rectB.x);\n var y = Math.min(rectA.y, rectB.y);\n var w = Math.max(rectA.right, rectB.right) - x;\n var h = Math.max(rectA.bottom, rectB.bottom) - y;\n\n return out.setTo(x, y, w, h);\n};\n\nmodule.exports = Union;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar CONST = require('./const');\nvar Events = require('./events');\nvar GetFastValue = require('../utils/object/GetFastValue');\nvar GetURL = require('./GetURL');\nvar MergeXHRSettings = require('./MergeXHRSettings');\nvar XHRLoader = require('./XHRLoader');\nvar XHRSettings = require('./XHRSettings');\n\n/**\n * @classdesc\n * The base File class used by all File Types that the Loader can support.\n * You shouldn't create an instance of a File directly, but should extend it with your own class, setting a custom type and processing methods.\n *\n * @class File\n * @memberof Phaser.Loader\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\n * @param {Phaser.Types.Loader.FileConfig} fileConfig - The file configuration object, as created by the file type.\n */\nvar File = new Class({\n\n initialize:\n\n function File (loader, fileConfig)\n {\n /**\n * A reference to the Loader that is going to load this file.\n *\n * @name Phaser.Loader.File#loader\n * @type {Phaser.Loader.LoaderPlugin}\n * @since 3.0.0\n */\n this.loader = loader;\n\n /**\n * A reference to the Cache, or Texture Manager, that is going to store this file if it loads.\n *\n * @name Phaser.Loader.File#cache\n * @type {(Phaser.Cache.BaseCache|Phaser.Textures.TextureManager)}\n * @since 3.7.0\n */\n this.cache = GetFastValue(fileConfig, 'cache', false);\n\n /**\n * The file type string (image, json, etc) for sorting within the Loader.\n *\n * @name Phaser.Loader.File#type\n * @type {string}\n * @since 3.0.0\n */\n this.type = GetFastValue(fileConfig, 'type', false);\n\n /**\n * Unique cache key (unique within its file type)\n *\n * @name Phaser.Loader.File#key\n * @type {string}\n * @since 3.0.0\n */\n this.key = GetFastValue(fileConfig, 'key', false);\n\n var loadKey = this.key;\n\n if (loader.prefix && loader.prefix !== '')\n {\n this.key = loader.prefix + loadKey;\n }\n\n if (!this.type || !this.key)\n {\n throw new Error('Error calling \\'Loader.' + this.type + '\\' invalid key provided.');\n }\n\n /**\n * The URL of the file, not including baseURL.\n *\n * Automatically has Loader.path prepended to it if a string.\n *\n * Can also be a JavaScript Object, such as the results of parsing JSON data.\n *\n * @name Phaser.Loader.File#url\n * @type {object|string}\n * @since 3.0.0\n */\n this.url = GetFastValue(fileConfig, 'url');\n\n if (this.url === undefined)\n {\n this.url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', '');\n }\n else if (typeof this.url === 'string' && this.url.indexOf('blob:') !== 0 && this.url.indexOf('data:') !== 0)\n {\n this.url = loader.path + this.url;\n }\n\n /**\n * The final URL this file will load from, including baseURL and path.\n * Set automatically when the Loader calls 'load' on this file.\n *\n * @name Phaser.Loader.File#src\n * @type {string}\n * @since 3.0.0\n */\n this.src = '';\n\n /**\n * The merged XHRSettings for this file.\n *\n * @name Phaser.Loader.File#xhrSettings\n * @type {Phaser.Types.Loader.XHRSettingsObject}\n * @since 3.0.0\n */\n this.xhrSettings = XHRSettings(GetFastValue(fileConfig, 'responseType', undefined));\n\n if (GetFastValue(fileConfig, 'xhrSettings', false))\n {\n this.xhrSettings = MergeXHRSettings(this.xhrSettings, GetFastValue(fileConfig, 'xhrSettings', {}));\n }\n\n /**\n * The XMLHttpRequest instance (as created by XHR Loader) that is loading this File.\n *\n * @name Phaser.Loader.File#xhrLoader\n * @type {?XMLHttpRequest}\n * @since 3.0.0\n */\n this.xhrLoader = null;\n\n /**\n * The current state of the file. One of the FILE_CONST values.\n *\n * @name Phaser.Loader.File#state\n * @type {integer}\n * @since 3.0.0\n */\n this.state = (typeof(this.url) === 'function') ? CONST.FILE_POPULATED : CONST.FILE_PENDING;\n\n /**\n * The total size of this file.\n * Set by onProgress and only if loading via XHR.\n *\n * @name Phaser.Loader.File#bytesTotal\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.bytesTotal = 0;\n\n /**\n * Updated as the file loads.\n * Only set if loading via XHR.\n *\n * @name Phaser.Loader.File#bytesLoaded\n * @type {number}\n * @default -1\n * @since 3.0.0\n */\n this.bytesLoaded = -1;\n\n /**\n * A percentage value between 0 and 1 indicating how much of this file has loaded.\n * Only set if loading via XHR.\n *\n * @name Phaser.Loader.File#percentComplete\n * @type {number}\n * @default -1\n * @since 3.0.0\n */\n this.percentComplete = -1;\n\n /**\n * For CORs based loading.\n * If this is undefined then the File will check BaseLoader.crossOrigin and use that (if set)\n *\n * @name Phaser.Loader.File#crossOrigin\n * @type {(string|undefined)}\n * @since 3.0.0\n */\n this.crossOrigin = undefined;\n\n /**\n * The processed file data, stored here after the file has loaded.\n *\n * @name Phaser.Loader.File#data\n * @type {*}\n * @since 3.0.0\n */\n this.data = undefined;\n\n /**\n * A config object that can be used by file types to store transitional data.\n *\n * @name Phaser.Loader.File#config\n * @type {*}\n * @since 3.0.0\n */\n this.config = GetFastValue(fileConfig, 'config', {});\n\n /**\n * If this is a multipart file, i.e. an atlas and its json together, then this is a reference\n * to the parent MultiFile. Set and used internally by the Loader or specific file types.\n *\n * @name Phaser.Loader.File#multiFile\n * @type {?Phaser.Loader.MultiFile}\n * @since 3.7.0\n */\n this.multiFile;\n\n /**\n * Does this file have an associated linked file? Such as an image and a normal map.\n * Atlases and Bitmap Fonts use the multiFile, because those files need loading together but aren't\n * actually bound by data, where-as a linkFile is.\n *\n * @name Phaser.Loader.File#linkFile\n * @type {?Phaser.Loader.File}\n * @since 3.7.0\n */\n this.linkFile;\n },\n\n /**\n * Links this File with another, so they depend upon each other for loading and processing.\n *\n * @method Phaser.Loader.File#setLink\n * @since 3.7.0\n *\n * @param {Phaser.Loader.File} fileB - The file to link to this one.\n */\n setLink: function (fileB)\n {\n this.linkFile = fileB;\n\n fileB.linkFile = this;\n },\n\n /**\n * Resets the XHRLoader instance this file is using.\n *\n * @method Phaser.Loader.File#resetXHR\n * @since 3.0.0\n */\n resetXHR: function ()\n {\n if (this.xhrLoader)\n {\n this.xhrLoader.onload = undefined;\n this.xhrLoader.onerror = undefined;\n this.xhrLoader.onprogress = undefined;\n }\n },\n\n /**\n * Called by the Loader, starts the actual file downloading.\n * During the load the methods onLoad, onError and onProgress are called, based on the XHR events.\n * You shouldn't normally call this method directly, it's meant to be invoked by the Loader.\n *\n * @method Phaser.Loader.File#load\n * @since 3.0.0\n */\n load: function ()\n {\n if (this.state === CONST.FILE_POPULATED)\n {\n // Can happen for example in a JSONFile if they've provided a JSON object instead of a URL\n this.loader.nextFile(this, true);\n }\n else\n {\n this.state = CONST.FILE_LOADING;\n\n this.src = GetURL(this, this.loader.baseURL);\n\n if (this.src.indexOf('data:') === 0)\n {\n console.warn('Local data URIs are not supported: ' + this.key);\n }\n else\n {\n // The creation of this XHRLoader starts the load process going.\n // It will automatically call the following, based on the load outcome:\n //\n // xhr.onload = this.onLoad\n // xhr.onerror = this.onError\n // xhr.onprogress = this.onProgress\n\n this.xhrLoader = XHRLoader(this, this.loader.xhr);\n }\n }\n },\n\n /**\n * Called when the file finishes loading, is sent a DOM ProgressEvent.\n *\n * @method Phaser.Loader.File#onLoad\n * @since 3.0.0\n *\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this load.\n */\n onLoad: function (xhr, event)\n {\n var localFileOk = ((xhr.responseURL && xhr.responseURL.indexOf('file://') === 0 && event.target.status === 0));\n\n var success = !(event.target && event.target.status !== 200) || localFileOk;\n\n // Handle HTTP status codes of 4xx and 5xx as errors, even if xhr.onerror was not called.\n if (xhr.readyState === 4 && xhr.status >= 400 && xhr.status <= 599)\n {\n success = false;\n }\n\n this.state = CONST.FILE_LOADED;\n\n this.resetXHR();\n\n this.loader.nextFile(this, success);\n },\n\n /**\n * Called if the file errors while loading, is sent a DOM ProgressEvent.\n *\n * @method Phaser.Loader.File#onError\n * @since 3.0.0\n *\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this error.\n */\n onError: function ()\n {\n this.resetXHR();\n\n this.loader.nextFile(this, false);\n },\n\n /**\n * Called during the file load progress. Is sent a DOM ProgressEvent.\n *\n * @method Phaser.Loader.File#onProgress\n * @fires Phaser.Loader.Events#FILE_PROGRESS\n * @since 3.0.0\n *\n * @param {ProgressEvent} event - The DOM ProgressEvent.\n */\n onProgress: function (event)\n {\n if (event.lengthComputable)\n {\n this.bytesLoaded = event.loaded;\n this.bytesTotal = event.total;\n\n this.percentComplete = Math.min((this.bytesLoaded / this.bytesTotal), 1);\n\n this.loader.emit(Events.FILE_PROGRESS, this, this.percentComplete);\n }\n },\n\n /**\n * Usually overridden by the FileTypes and is called by Loader.nextFile.\n * This method controls what extra work this File does with its loaded data, for example a JSON file will parse itself during this stage.\n *\n * @method Phaser.Loader.File#onProcess\n * @since 3.0.0\n */\n onProcess: function ()\n {\n this.state = CONST.FILE_PROCESSING;\n\n this.onProcessComplete();\n },\n\n /**\n * Called when the File has completed processing.\n * Checks on the state of its multifile, if set.\n *\n * @method Phaser.Loader.File#onProcessComplete\n * @since 3.7.0\n */\n onProcessComplete: function ()\n {\n this.state = CONST.FILE_COMPLETE;\n\n if (this.multiFile)\n {\n this.multiFile.onFileComplete(this);\n }\n\n this.loader.fileProcessComplete(this);\n },\n\n /**\n * Called when the File has completed processing but it generated an error.\n * Checks on the state of its multifile, if set.\n *\n * @method Phaser.Loader.File#onProcessError\n * @since 3.7.0\n */\n onProcessError: function ()\n {\n this.state = CONST.FILE_ERRORED;\n\n if (this.multiFile)\n {\n this.multiFile.onFileFailed(this);\n }\n\n this.loader.fileProcessComplete(this);\n },\n\n /**\n * Checks if a key matching the one used by this file exists in the target Cache or not.\n * This is called automatically by the LoaderPlugin to decide if the file can be safely\n * loaded or will conflict.\n *\n * @method Phaser.Loader.File#hasCacheConflict\n * @since 3.7.0\n *\n * @return {boolean} `true` if adding this file will cause a conflict, otherwise `false`.\n */\n hasCacheConflict: function ()\n {\n return (this.cache && this.cache.exists(this.key));\n },\n\n /**\n * Adds this file to its target cache upon successful loading and processing.\n * This method is often overridden by specific file types.\n *\n * @method Phaser.Loader.File#addToCache\n * @since 3.7.0\n */\n addToCache: function ()\n {\n if (this.cache)\n {\n this.cache.add(this.key, this.data);\n }\n\n this.pendingDestroy();\n },\n\n /**\n * Called once the file has been added to its cache and is now ready for deletion from the Loader.\n * It will emit a `filecomplete` event from the LoaderPlugin.\n *\n * @method Phaser.Loader.File#pendingDestroy\n * @fires Phaser.Loader.Events#FILE_COMPLETE\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\n * @since 3.7.0\n */\n pendingDestroy: function (data)\n {\n if (data === undefined) { data = this.data; }\n\n var key = this.key;\n var type = this.type;\n\n this.loader.emit(Events.FILE_COMPLETE, key, type, data);\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type, data);\n\n this.loader.flagForRemoval(this);\n },\n\n /**\n * Destroy this File and any references it holds.\n *\n * @method Phaser.Loader.File#destroy\n * @since 3.7.0\n */\n destroy: function ()\n {\n this.loader = null;\n this.cache = null;\n this.xhrSettings = null;\n this.multiFile = null;\n this.linkFile = null;\n this.data = null;\n }\n\n});\n\n/**\n * Static method for creating object URL using URL API and setting it as image 'src' attribute.\n * If URL API is not supported (usually on old browsers) it falls back to creating Base64 encoded url using FileReader.\n *\n * @method Phaser.Loader.File.createObjectURL\n * @static\n * @since 3.7.0\n *\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be set to object URL.\n * @param {Blob} blob - A Blob object to create an object URL for.\n * @param {string} defaultType - Default mime type used if blob type is not available.\n */\nFile.createObjectURL = function (image, blob, defaultType)\n{\n if (typeof URL === 'function')\n {\n image.src = URL.createObjectURL(blob);\n }\n else\n {\n var reader = new FileReader();\n\n reader.onload = function ()\n {\n image.removeAttribute('crossOrigin');\n image.src = 'data:' + (blob.type || defaultType) + ';base64,' + reader.result.split(',')[1];\n };\n\n reader.onerror = image.onerror;\n\n reader.readAsDataURL(blob);\n }\n};\n\n/**\n * Static method for releasing an existing object URL which was previously created\n * by calling {@link File#createObjectURL} method.\n *\n * @method Phaser.Loader.File.revokeObjectURL\n * @static\n * @since 3.7.0\n *\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be revoked.\n */\nFile.revokeObjectURL = function (image)\n{\n if (typeof URL === 'function')\n {\n URL.revokeObjectURL(image.src);\n }\n};\n\nmodule.exports = File;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar types = {};\n\n/**\n * @namespace Phaser.Loader.FileTypesManager\n */\n\nvar FileTypesManager = {\n\n /**\n * Static method called when a LoaderPlugin is created.\n * \n * Loops through the local types object and injects all of them as\n * properties into the LoaderPlugin instance.\n *\n * @method Phaser.Loader.FileTypesManager.install\n * @since 3.0.0\n * \n * @param {Phaser.Loader.LoaderPlugin} loader - The LoaderPlugin to install the types into.\n */\n install: function (loader)\n {\n for (var key in types)\n {\n loader[key] = types[key];\n }\n },\n\n /**\n * Static method called directly by the File Types.\n * \n * The key is a reference to the function used to load the files via the Loader, i.e. `image`.\n *\n * @method Phaser.Loader.FileTypesManager.register\n * @since 3.0.0\n * \n * @param {string} key - The key that will be used as the method name in the LoaderPlugin.\n * @param {function} factoryFunction - The function that will be called when LoaderPlugin.key is invoked.\n */\n register: function (key, factoryFunction)\n {\n types[key] = factoryFunction;\n },\n\n /**\n * Removed all associated file types.\n *\n * @method Phaser.Loader.FileTypesManager.destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n types = {};\n }\n\n};\n\nmodule.exports = FileTypesManager;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Given a File and a baseURL value this returns the URL the File will use to download from.\n *\n * @function Phaser.Loader.GetURL\n * @since 3.0.0\n *\n * @param {Phaser.Loader.File} file - The File object.\n * @param {string} baseURL - A default base URL.\n *\n * @return {string} The URL the File will use.\n */\nvar GetURL = function (file, baseURL)\n{\n if (!file.url)\n {\n return false;\n }\n\n if (file.url.match(/^(?:blob:|data:|http:\\/\\/|https:\\/\\/|\\/\\/)/))\n {\n return file.url;\n }\n else\n {\n return baseURL + file.url;\n }\n};\n\nmodule.exports = GetURL;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Extend = require('../utils/object/Extend');\nvar XHRSettings = require('./XHRSettings');\n\n/**\n * Takes two XHRSettings Objects and creates a new XHRSettings object from them.\n *\n * The new object is seeded by the values given in the global settings, but any setting in\n * the local object overrides the global ones.\n *\n * @function Phaser.Loader.MergeXHRSettings\n * @since 3.0.0\n *\n * @param {Phaser.Types.Loader.XHRSettingsObject} global - The global XHRSettings object.\n * @param {Phaser.Types.Loader.XHRSettingsObject} local - The local XHRSettings object.\n *\n * @return {Phaser.Types.Loader.XHRSettingsObject} A newly formed XHRSettings object.\n */\nvar MergeXHRSettings = function (global, local)\n{\n var output = (global === undefined) ? XHRSettings() : Extend({}, global);\n\n if (local)\n {\n for (var setting in local)\n {\n if (local[setting] !== undefined)\n {\n output[setting] = local[setting];\n }\n }\n }\n\n return output;\n};\n\nmodule.exports = MergeXHRSettings;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\n\n/**\n * @classdesc\n * A MultiFile is a special kind of parent that contains two, or more, Files as children and looks after\n * the loading and processing of them all. It is commonly extended and used as a base class for file types such as AtlasJSON or BitmapFont.\n * \n * You shouldn't create an instance of a MultiFile directly, but should extend it with your own class, setting a custom type and processing methods.\n *\n * @class MultiFile\n * @memberof Phaser.Loader\n * @constructor\n * @since 3.7.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\n * @param {string} type - The file type string for sorting within the Loader.\n * @param {string} key - The key of the file within the loader.\n * @param {Phaser.Loader.File[]} files - An array of Files that make-up this MultiFile.\n */\nvar MultiFile = new Class({\n\n initialize:\n\n function MultiFile (loader, type, key, files)\n {\n /**\n * A reference to the Loader that is going to load this file.\n *\n * @name Phaser.Loader.MultiFile#loader\n * @type {Phaser.Loader.LoaderPlugin}\n * @since 3.7.0\n */\n this.loader = loader;\n\n /**\n * The file type string for sorting within the Loader.\n *\n * @name Phaser.Loader.MultiFile#type\n * @type {string}\n * @since 3.7.0\n */\n this.type = type;\n\n /**\n * Unique cache key (unique within its file type)\n *\n * @name Phaser.Loader.MultiFile#key\n * @type {string}\n * @since 3.7.0\n */\n this.key = key;\n\n /**\n * The current index being used by multi-file loaders to avoid key clashes.\n *\n * @name Phaser.Loader.MultiFile#multiKeyIndex\n * @type {integer}\n * @private\n * @since 3.20.0\n */\n this.multiKeyIndex = loader.multiKeyIndex++;\n\n /**\n * Array of files that make up this MultiFile.\n *\n * @name Phaser.Loader.MultiFile#files\n * @type {Phaser.Loader.File[]}\n * @since 3.7.0\n */\n this.files = files;\n\n /**\n * The completion status of this MultiFile.\n *\n * @name Phaser.Loader.MultiFile#complete\n * @type {boolean}\n * @default false\n * @since 3.7.0\n */\n this.complete = false;\n\n /**\n * The number of files to load.\n *\n * @name Phaser.Loader.MultiFile#pending\n * @type {integer}\n * @since 3.7.0\n */\n\n this.pending = files.length;\n\n /**\n * The number of files that failed to load.\n *\n * @name Phaser.Loader.MultiFile#failed\n * @type {integer}\n * @default 0\n * @since 3.7.0\n */\n this.failed = 0;\n\n /**\n * A storage container for transient data that the loading files need.\n *\n * @name Phaser.Loader.MultiFile#config\n * @type {any}\n * @since 3.7.0\n */\n this.config = {};\n\n /**\n * A reference to the Loaders baseURL at the time this MultiFile was created.\n * Used to populate child-files.\n *\n * @name Phaser.Loader.MultiFile#baseURL\n * @type {string}\n * @since 3.20.0\n */\n this.baseURL = loader.baseURL;\n\n /**\n * A reference to the Loaders path at the time this MultiFile was created.\n * Used to populate child-files.\n *\n * @name Phaser.Loader.MultiFile#path\n * @type {string}\n * @since 3.20.0\n */\n this.path = loader.path;\n\n /**\n * A reference to the Loaders prefix at the time this MultiFile was created.\n * Used to populate child-files.\n *\n * @name Phaser.Loader.MultiFile#prefix\n * @type {string}\n * @since 3.20.0\n */\n this.prefix = loader.prefix;\n\n // Link the files\n for (var i = 0; i < files.length; i++)\n {\n files[i].multiFile = this;\n }\n },\n\n /**\n * Checks if this MultiFile is ready to process its children or not.\n *\n * @method Phaser.Loader.MultiFile#isReadyToProcess\n * @since 3.7.0\n *\n * @return {boolean} `true` if all children of this MultiFile have loaded, otherwise `false`.\n */\n isReadyToProcess: function ()\n {\n return (this.pending === 0 && this.failed === 0 && !this.complete);\n },\n\n /**\n * Adds another child to this MultiFile, increases the pending count and resets the completion status.\n *\n * @method Phaser.Loader.MultiFile#addToMultiFile\n * @since 3.7.0\n *\n * @param {Phaser.Loader.File} files - The File to add to this MultiFile.\n *\n * @return {Phaser.Loader.MultiFile} This MultiFile instance.\n */\n addToMultiFile: function (file)\n {\n this.files.push(file);\n\n file.multiFile = this;\n\n this.pending++;\n\n this.complete = false;\n\n return this;\n },\n\n /**\n * Called by each File when it finishes loading.\n *\n * @method Phaser.Loader.MultiFile#onFileComplete\n * @since 3.7.0\n *\n * @param {Phaser.Loader.File} file - The File that has completed processing.\n */\n onFileComplete: function (file)\n {\n var index = this.files.indexOf(file);\n\n if (index !== -1)\n {\n this.pending--;\n }\n },\n\n /**\n * Called by each File that fails to load.\n *\n * @method Phaser.Loader.MultiFile#onFileFailed\n * @since 3.7.0\n *\n * @param {Phaser.Loader.File} file - The File that has failed to load.\n */\n onFileFailed: function (file)\n {\n var index = this.files.indexOf(file);\n\n if (index !== -1)\n {\n this.failed++;\n }\n }\n\n});\n\nmodule.exports = MultiFile;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar MergeXHRSettings = require('./MergeXHRSettings');\n\n/**\n * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings\n * and starts the download of it. It uses the Files own XHRSettings and merges them\n * with the global XHRSettings object to set the xhr values before download.\n *\n * @function Phaser.Loader.XHRLoader\n * @since 3.0.0\n *\n * @param {Phaser.Loader.File} file - The File to download.\n * @param {Phaser.Types.Loader.XHRSettingsObject} globalXHRSettings - The global XHRSettings object.\n *\n * @return {XMLHttpRequest} The XHR object.\n */\nvar XHRLoader = function (file, globalXHRSettings)\n{\n var config = MergeXHRSettings(globalXHRSettings, file.xhrSettings);\n\n var xhr = new XMLHttpRequest();\n\n xhr.open('GET', file.src, config.async, config.user, config.password);\n\n xhr.responseType = file.xhrSettings.responseType;\n xhr.timeout = config.timeout;\n\n if (config.headers)\n {\n for (var key in config.headers)\n {\n xhr.setRequestHeader(key, config.headers[key]);\n }\n }\n\n if (config.header && config.headerValue)\n {\n xhr.setRequestHeader(config.header, config.headerValue);\n }\n\n if (config.requestedWith)\n {\n xhr.setRequestHeader('X-Requested-With', config.requestedWith);\n }\n\n if (config.overrideMimeType)\n {\n xhr.overrideMimeType(config.overrideMimeType);\n }\n\n if (config.withCredentials)\n {\n xhr.withCredentials = true;\n }\n\n // After a successful request, the xhr.response property will contain the requested data as a DOMString, ArrayBuffer, Blob, or Document (depending on what was set for responseType.)\n\n xhr.onload = file.onLoad.bind(file, xhr);\n xhr.onerror = file.onError.bind(file, xhr);\n xhr.onprogress = file.onProgress.bind(file);\n\n // This is the only standard method, the ones above are browser additions (maybe not universal?)\n // xhr.onreadystatechange\n\n xhr.send();\n\n return xhr;\n};\n\nmodule.exports = XHRLoader;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Creates an XHRSettings Object with default values.\n *\n * @function Phaser.Loader.XHRSettings\n * @since 3.0.0\n *\n * @param {XMLHttpRequestResponseType} [responseType=''] - The responseType, such as 'text'.\n * @param {boolean} [async=true] - Should the XHR request use async or not?\n * @param {string} [user=''] - Optional username for the XHR request.\n * @param {string} [password=''] - Optional password for the XHR request.\n * @param {integer} [timeout=0] - Optional XHR timeout value.\n * @param {boolean} [withCredentials=false] - Optional XHR withCredentials value.\n *\n * @return {Phaser.Types.Loader.XHRSettingsObject} The XHRSettings object as used by the Loader.\n */\nvar XHRSettings = function (responseType, async, user, password, timeout, withCredentials)\n{\n if (responseType === undefined) { responseType = ''; }\n if (async === undefined) { async = true; }\n if (user === undefined) { user = ''; }\n if (password === undefined) { password = ''; }\n if (timeout === undefined) { timeout = 0; }\n if (withCredentials === undefined) { withCredentials = false; }\n\n // Before sending a request, set the xhr.responseType to \"text\",\n // \"arraybuffer\", \"blob\", or \"document\", depending on your data needs.\n // Note, setting xhr.responseType = '' (or omitting) will default the response to \"text\".\n\n return {\n\n // Ignored by the Loader, only used by File.\n responseType: responseType,\n\n async: async,\n\n // credentials\n user: user,\n password: password,\n\n // timeout in ms (0 = no timeout)\n timeout: timeout,\n\n // setRequestHeader\n headers: undefined,\n header: undefined,\n headerValue: undefined,\n requestedWith: false,\n\n // overrideMimeType\n overrideMimeType: undefined,\n\n // withCredentials\n withCredentials: withCredentials\n\n };\n};\n\nmodule.exports = XHRSettings;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar FILE_CONST = {\n\n /**\n * The Loader is idle.\n * \n * @name Phaser.Loader.LOADER_IDLE\n * @type {integer}\n * @since 3.0.0\n */\n LOADER_IDLE: 0,\n\n /**\n * The Loader is actively loading.\n * \n * @name Phaser.Loader.LOADER_LOADING\n * @type {integer}\n * @since 3.0.0\n */\n LOADER_LOADING: 1,\n\n /**\n * The Loader is processing files is has loaded.\n * \n * @name Phaser.Loader.LOADER_PROCESSING\n * @type {integer}\n * @since 3.0.0\n */\n LOADER_PROCESSING: 2,\n\n /**\n * The Loader has completed loading and processing.\n * \n * @name Phaser.Loader.LOADER_COMPLETE\n * @type {integer}\n * @since 3.0.0\n */\n LOADER_COMPLETE: 3,\n\n /**\n * The Loader is shutting down.\n * \n * @name Phaser.Loader.LOADER_SHUTDOWN\n * @type {integer}\n * @since 3.0.0\n */\n LOADER_SHUTDOWN: 4,\n\n /**\n * The Loader has been destroyed.\n * \n * @name Phaser.Loader.LOADER_DESTROYED\n * @type {integer}\n * @since 3.0.0\n */\n LOADER_DESTROYED: 5,\n\n /**\n * File is in the load queue but not yet started\n * \n * @name Phaser.Loader.FILE_PENDING\n * @type {integer}\n * @since 3.0.0\n */\n FILE_PENDING: 10,\n\n /**\n * File has been started to load by the loader (onLoad called)\n * \n * @name Phaser.Loader.FILE_LOADING\n * @type {integer}\n * @since 3.0.0\n */\n FILE_LOADING: 11,\n\n /**\n * File has loaded successfully, awaiting processing \n * \n * @name Phaser.Loader.FILE_LOADED\n * @type {integer}\n * @since 3.0.0\n */\n FILE_LOADED: 12,\n\n /**\n * File failed to load\n * \n * @name Phaser.Loader.FILE_FAILED\n * @type {integer}\n * @since 3.0.0\n */\n FILE_FAILED: 13,\n\n /**\n * File is being processed (onProcess callback)\n * \n * @name Phaser.Loader.FILE_PROCESSING\n * @type {integer}\n * @since 3.0.0\n */\n FILE_PROCESSING: 14,\n\n /**\n * The File has errored somehow during processing.\n * \n * @name Phaser.Loader.FILE_ERRORED\n * @type {integer}\n * @since 3.0.0\n */\n FILE_ERRORED: 16,\n\n /**\n * File has finished processing.\n * \n * @name Phaser.Loader.FILE_COMPLETE\n * @type {integer}\n * @since 3.0.0\n */\n FILE_COMPLETE: 17,\n\n /**\n * File has been destroyed\n * \n * @name Phaser.Loader.FILE_DESTROYED\n * @type {integer}\n * @since 3.0.0\n */\n FILE_DESTROYED: 18,\n\n /**\n * File was populated from local data and doesn't need an HTTP request\n * \n * @name Phaser.Loader.FILE_POPULATED\n * @type {integer}\n * @since 3.0.0\n */\n FILE_POPULATED: 19\n\n};\n\nmodule.exports = FILE_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Loader Plugin Add File Event.\n * \n * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue.\n * \n * Listen to it from a Scene using: `this.load.on('addfile', listener)`.\n * \n * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them.\n *\n * @event Phaser.Loader.Events#ADD\n * @since 3.0.0\n * \n * @param {string} key - The unique key of the file that was added to the Loader.\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} string of the file that was added to the Loader, i.e. `image`.\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\n * @param {Phaser.Loader.File} file - A reference to the File which was added to the Loader.\n */\nmodule.exports = 'addfile';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Loader Plugin Complete Event.\n * \n * This event is dispatched when the Loader has fully processed everything in the load queue.\n * By this point every loaded file will now be in its associated cache and ready for use.\n * \n * Listen to it from a Scene using: `this.load.on('complete', listener)`.\n *\n * @event Phaser.Loader.Events#COMPLETE\n * @since 3.0.0\n * \n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\n * @param {integer} totalComplete - The total number of files that successfully loaded.\n * @param {integer} totalFailed - The total number of files that failed to load.\n */\nmodule.exports = 'complete';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The File Load Complete Event.\n * \n * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.\n * \n * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`.\n * \n * You can also listen for the completion of a specific file. See the [FILE_KEY_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_KEY_COMPLETE} event.\n *\n * @event Phaser.Loader.Events#FILE_COMPLETE\n * @since 3.0.0\n * \n * @param {string} key - The key of the file that just loaded and finished processing.\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\n * @param {any} data - The raw data the file contained.\n */\nmodule.exports = 'filecomplete';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The File Load Complete Event.\n * \n * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.\n * \n * It uses a special dynamic event name constructed from the key and type of the file.\n * \n * For example, if you have loaded an `image` with a key of `monster`, you can listen for it\n * using the following:\n *\n * ```javascript\n * this.load.on('filecomplete-image-monster', function (key, type, data) {\n * // Your handler code\n * });\n * ```\n *\n * Or, if you have loaded a texture `atlas` with a key of `Level1`:\n * \n * ```javascript\n * this.load.on('filecomplete-atlas-Level1', function (key, type, data) {\n * // Your handler code\n * });\n * ```\n * \n * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`:\n * \n * ```javascript\n * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) {\n * // Your handler code\n * });\n * ```\n * \n * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event.\n *\n * @event Phaser.Loader.Events#FILE_KEY_COMPLETE\n * @since 3.0.0\n * \n * @param {string} key - The key of the file that just loaded and finished processing.\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\n * @param {any} data - The raw data the file contained.\n */\nmodule.exports = 'filecomplete-';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The File Load Error Event.\n * \n * This event is dispatched by the Loader Plugin when a file fails to load.\n * \n * Listen to it from a Scene using: `this.load.on('loaderror', listener)`.\n *\n * @event Phaser.Loader.Events#FILE_LOAD_ERROR\n * @since 3.0.0\n * \n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\n */\nmodule.exports = 'loaderror';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The File Load Event.\n * \n * This event is dispatched by the Loader Plugin when a file finishes loading,\n * but _before_ it is processed and added to the internal Phaser caches.\n * \n * Listen to it from a Scene using: `this.load.on('load', listener)`.\n *\n * @event Phaser.Loader.Events#FILE_LOAD\n * @since 3.0.0\n * \n * @param {Phaser.Loader.File} file - A reference to the File which just finished loading.\n */\nmodule.exports = 'load';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The File Load Progress Event.\n * \n * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and\n * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen.\n * \n * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`.\n *\n * @event Phaser.Loader.Events#FILE_PROGRESS\n * @since 3.0.0\n * \n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\n * @param {number} percentComplete - A value between 0 and 1 indicating how 'complete' this file is.\n */\nmodule.exports = 'fileprogress';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Loader Plugin Post Process Event.\n * \n * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue.\n * It is dispatched before the internal lists are cleared and each File is destroyed.\n * \n * Use this hook to perform any last minute processing of files that can only happen once the\n * Loader has completed, but prior to it emitting the `complete` event.\n * \n * Listen to it from a Scene using: `this.load.on('postprocess', listener)`.\n *\n * @event Phaser.Loader.Events#POST_PROCESS\n * @since 3.0.0\n * \n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\n */\nmodule.exports = 'postprocess';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Loader Plugin Progress Event.\n * \n * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading.\n * \n * Listen to it from a Scene using: `this.load.on('progress', listener)`.\n *\n * @event Phaser.Loader.Events#PROGRESS\n * @since 3.0.0\n * \n * @param {number} progress - The current progress of the load. A value between 0 and 1.\n */\nmodule.exports = 'progress';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Loader Plugin Start Event.\n * \n * This event is dispatched when the Loader starts running. At this point load progress is zero.\n * \n * This event is dispatched even if there aren't any files in the load queue.\n * \n * Listen to it from a Scene using: `this.load.on('start', listener)`.\n *\n * @event Phaser.Loader.Events#START\n * @since 3.0.0\n * \n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\n */\nmodule.exports = 'start';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Loader.Events\n */\n\nmodule.exports = {\n\n ADD: require('./ADD_EVENT'),\n COMPLETE: require('./COMPLETE_EVENT'),\n FILE_COMPLETE: require('./FILE_COMPLETE_EVENT'),\n FILE_KEY_COMPLETE: require('./FILE_KEY_COMPLETE_EVENT'),\n FILE_LOAD_ERROR: require('./FILE_LOAD_ERROR_EVENT'),\n FILE_LOAD: require('./FILE_LOAD_EVENT'),\n FILE_PROGRESS: require('./FILE_PROGRESS_EVENT'),\n POST_PROCESS: require('./POST_PROCESS_EVENT'),\n PROGRESS: require('./PROGRESS_EVENT'),\n START: require('./START_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar CONST = require('../const');\nvar File = require('../File');\nvar FileTypesManager = require('../FileTypesManager');\nvar GetFastValue = require('../../utils/object/GetFastValue');\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\n\n/**\n * @classdesc\n * A single Image File suitable for loading by the Loader.\n *\n * These are created when you use the Phaser.Loader.LoaderPlugin#image method and are not typically created directly.\n *\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#image.\n *\n * @class ImageFile\n * @extends Phaser.Loader.File\n * @memberof Phaser.Loader.FileTypes\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig)} key - The key to use for this file, or a file configuration object.\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\n * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. Only provided for, and used by, Sprite Sheets.\n */\nvar ImageFile = new Class({\n\n Extends: File,\n\n initialize:\n\n function ImageFile (loader, key, url, xhrSettings, frameConfig)\n {\n var extension = 'png';\n var normalMapURL;\n\n if (IsPlainObject(key))\n {\n var config = key;\n\n key = GetFastValue(config, 'key');\n url = GetFastValue(config, 'url');\n normalMapURL = GetFastValue(config, 'normalMap');\n xhrSettings = GetFastValue(config, 'xhrSettings');\n extension = GetFastValue(config, 'extension', extension);\n frameConfig = GetFastValue(config, 'frameConfig');\n }\n\n if (Array.isArray(url))\n {\n normalMapURL = url[1];\n url = url[0];\n }\n\n var fileConfig = {\n type: 'image',\n cache: loader.textureManager,\n extension: extension,\n responseType: 'blob',\n key: key,\n url: url,\n xhrSettings: xhrSettings,\n config: frameConfig\n };\n\n File.call(this, loader, fileConfig);\n\n // Do we have a normal map to load as well?\n if (normalMapURL)\n {\n var normalMap = new ImageFile(loader, this.key, normalMapURL, xhrSettings, frameConfig);\n\n normalMap.type = 'normalMap';\n\n this.setLink(normalMap);\n\n loader.addFile(normalMap);\n }\n },\n\n /**\n * Called automatically by Loader.nextFile.\n * This method controls what extra work this File does with its loaded data.\n *\n * @method Phaser.Loader.FileTypes.ImageFile#onProcess\n * @since 3.7.0\n */\n onProcess: function ()\n {\n this.state = CONST.FILE_PROCESSING;\n\n this.data = new Image();\n\n this.data.crossOrigin = this.crossOrigin;\n\n var _this = this;\n\n this.data.onload = function ()\n {\n File.revokeObjectURL(_this.data);\n\n _this.onProcessComplete();\n };\n\n this.data.onerror = function ()\n {\n File.revokeObjectURL(_this.data);\n\n _this.onProcessError();\n };\n\n File.createObjectURL(this.data, this.xhrLoader.response, 'image/png');\n },\n\n /**\n * Adds this file to its target cache upon successful loading and processing.\n *\n * @method Phaser.Loader.FileTypes.ImageFile#addToCache\n * @since 3.7.0\n */\n addToCache: function ()\n {\n var texture;\n var linkFile = this.linkFile;\n\n if (linkFile && linkFile.state === CONST.FILE_COMPLETE)\n {\n if (this.type === 'image')\n {\n texture = this.cache.addImage(this.key, this.data, linkFile.data);\n }\n else\n {\n texture = this.cache.addImage(linkFile.key, linkFile.data, this.data);\n }\n\n this.pendingDestroy(texture);\n\n linkFile.pendingDestroy(texture);\n }\n else if (!linkFile)\n {\n texture = this.cache.addImage(this.key, this.data);\n\n this.pendingDestroy(texture);\n }\n }\n\n});\n\n/**\n * Adds an Image, or array of Images, to the current load queue.\n *\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\n *\n * ```javascript\n * function preload ()\n * {\n * this.load.image('logo', 'images/phaserLogo.png');\n * }\n * ```\n *\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\n * loaded.\n *\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\n * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback\n * of animated gifs to Canvas elements.\n *\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\n * then remove it from the Texture Manager first, before loading a new one.\n *\n * Instead of passing arguments you can pass a configuration object, such as:\n *\n * ```javascript\n * this.load.image({\n * key: 'logo',\n * url: 'images/AtariLogo.png'\n * });\n * ```\n *\n * See the documentation for `Phaser.Types.Loader.FileTypes.ImageFileConfig` for more details.\n *\n * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:\n *\n * ```javascript\n * this.load.image('logo', 'images/AtariLogo.png');\n * // and later in your game ...\n * this.add.image(x, y, 'logo');\n * ```\n *\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\n * this is what you would use to retrieve the image from the Texture Manager.\n *\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\n *\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\n *\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\n *\n * ```javascript\n * this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]);\n * ```\n *\n * Or, if you are using a config object use the `normalMap` property:\n *\n * ```javascript\n * this.load.image({\n * key: 'logo',\n * url: 'images/AtariLogo.png',\n * normalMap: 'images/AtariLogo-n.png'\n * });\n * ```\n *\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\n * Normal maps are a WebGL only feature.\n *\n * Note: The ability to load this type of file will only be available if the Image File type has been built into Phaser.\n * It is available in the default build but can be excluded from custom builds.\n *\n * @method Phaser.Loader.LoaderPlugin#image\n * @fires Phaser.Loader.LoaderPlugin#ADD\n * @since 3.0.0\n *\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig|Phaser.Types.Loader.FileTypes.ImageFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\n *\n * @return {this} The Loader instance.\n */\nFileTypesManager.register('image', function (key, url, xhrSettings)\n{\n if (Array.isArray(key))\n {\n for (var i = 0; i < key.length; i++)\n {\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\n this.addFile(new ImageFile(this, key[i]));\n }\n }\n else\n {\n this.addFile(new ImageFile(this, key, url, xhrSettings));\n }\n\n return this;\n});\n\nmodule.exports = ImageFile;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar CONST = require('../const');\nvar File = require('../File');\nvar FileTypesManager = require('../FileTypesManager');\nvar GetFastValue = require('../../utils/object/GetFastValue');\nvar GetValue = require('../../utils/object/GetValue');\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\n\n/**\n * @classdesc\n * A single JSON File suitable for loading by the Loader.\n *\n * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly.\n *\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json.\n *\n * @class JSONFile\n * @extends Phaser.Loader.File\n * @memberof Phaser.Loader.FileTypes\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object.\n * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\n */\nvar JSONFile = new Class({\n\n Extends: File,\n\n initialize:\n\n // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object\n // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing\n\n function JSONFile (loader, key, url, xhrSettings, dataKey)\n {\n var extension = 'json';\n\n if (IsPlainObject(key))\n {\n var config = key;\n\n key = GetFastValue(config, 'key');\n url = GetFastValue(config, 'url');\n xhrSettings = GetFastValue(config, 'xhrSettings');\n extension = GetFastValue(config, 'extension', extension);\n dataKey = GetFastValue(config, 'dataKey', dataKey);\n }\n\n var fileConfig = {\n type: 'json',\n cache: loader.cacheManager.json,\n extension: extension,\n responseType: 'text',\n key: key,\n url: url,\n xhrSettings: xhrSettings,\n config: dataKey\n };\n\n File.call(this, loader, fileConfig);\n\n if (IsPlainObject(url))\n {\n // Object provided instead of a URL, so no need to actually load it (populate data with value)\n if (dataKey)\n {\n this.data = GetValue(url, dataKey);\n }\n else\n {\n this.data = url;\n }\n\n this.state = CONST.FILE_POPULATED;\n }\n },\n\n /**\n * Called automatically by Loader.nextFile.\n * This method controls what extra work this File does with its loaded data.\n *\n * @method Phaser.Loader.FileTypes.JSONFile#onProcess\n * @since 3.7.0\n */\n onProcess: function ()\n {\n if (this.state !== CONST.FILE_POPULATED)\n {\n this.state = CONST.FILE_PROCESSING;\n\n var json = JSON.parse(this.xhrLoader.responseText);\n\n var key = this.config;\n\n if (typeof key === 'string')\n {\n this.data = GetValue(json, key, json);\n }\n else\n {\n this.data = json;\n }\n }\n\n this.onProcessComplete();\n }\n\n});\n\n/**\n * Adds a JSON file, or array of JSON files, to the current load queue.\n *\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\n *\n * ```javascript\n * function preload ()\n * {\n * this.load.json('wavedata', 'files/AlienWaveData.json');\n * }\n * ```\n *\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\n * loaded.\n *\n * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.\n * The key should be unique both in terms of files being loaded and files already present in the JSON Cache.\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\n * then remove it from the JSON Cache first, before loading a new one.\n *\n * Instead of passing arguments you can pass a configuration object, such as:\n *\n * ```javascript\n * this.load.json({\n * key: 'wavedata',\n * url: 'files/AlienWaveData.json'\n * });\n * ```\n *\n * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details.\n *\n * Once the file has finished loading you can access it from its Cache using its key:\n *\n * ```javascript\n * this.load.json('wavedata', 'files/AlienWaveData.json');\n * // and later in your game ...\n * var data = this.cache.json.get('wavedata');\n * ```\n *\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\n * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and\n * this is what you would use to retrieve the text from the JSON Cache.\n *\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\n *\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"data\"\n * and no URL is given then the Loader will set the URL to be \"data.json\". It will always add `.json` as the extension, although\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\n *\n * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache,\n * rather than the whole file. For example, if your JSON data had a structure like this:\n *\n * ```json\n * {\n * \"level1\": {\n * \"baddies\": {\n * \"aliens\": {},\n * \"boss\": {}\n * }\n * },\n * \"level2\": {},\n * \"level3\": {}\n * }\n * ```\n *\n * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`.\n *\n * Note: The ability to load this type of file will only be available if the JSON File type has been built into Phaser.\n * It is available in the default build but can be excluded from custom builds.\n *\n * @method Phaser.Loader.LoaderPlugin#json\n * @fires Phaser.Loader.LoaderPlugin#ADD\n * @since 3.0.0\n *\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\n * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\n *\n * @return {this} The Loader instance.\n */\nFileTypesManager.register('json', function (key, url, dataKey, xhrSettings)\n{\n if (Array.isArray(key))\n {\n for (var i = 0; i < key.length; i++)\n {\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\n this.addFile(new JSONFile(this, key[i]));\n }\n }\n else\n {\n this.addFile(new JSONFile(this, key, url, xhrSettings, dataKey));\n }\n\n return this;\n});\n\nmodule.exports = JSONFile;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar CONST = require('../const');\nvar File = require('../File');\nvar FileTypesManager = require('../FileTypesManager');\nvar GetFastValue = require('../../utils/object/GetFastValue');\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\n\n/**\n * @classdesc\n * A single Text File suitable for loading by the Loader.\n *\n * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly.\n *\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text.\n *\n * @class TextFile\n * @extends Phaser.Loader.File\n * @memberof Phaser.Loader.FileTypes\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig)} key - The key to use for this file, or a file configuration object.\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\n */\nvar TextFile = new Class({\n\n Extends: File,\n\n initialize:\n\n function TextFile (loader, key, url, xhrSettings)\n {\n var extension = 'txt';\n\n if (IsPlainObject(key))\n {\n var config = key;\n\n key = GetFastValue(config, 'key');\n url = GetFastValue(config, 'url');\n xhrSettings = GetFastValue(config, 'xhrSettings');\n extension = GetFastValue(config, 'extension', extension);\n }\n\n var fileConfig = {\n type: 'text',\n cache: loader.cacheManager.text,\n extension: extension,\n responseType: 'text',\n key: key,\n url: url,\n xhrSettings: xhrSettings\n };\n\n File.call(this, loader, fileConfig);\n },\n\n /**\n * Called automatically by Loader.nextFile.\n * This method controls what extra work this File does with its loaded data.\n *\n * @method Phaser.Loader.FileTypes.TextFile#onProcess\n * @since 3.7.0\n */\n onProcess: function ()\n {\n this.state = CONST.FILE_PROCESSING;\n\n this.data = this.xhrLoader.responseText;\n\n this.onProcessComplete();\n }\n\n});\n\n/**\n * Adds a Text file, or array of Text files, to the current load queue.\n *\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\n *\n * ```javascript\n * function preload ()\n * {\n * this.load.text('story', 'files/IntroStory.txt');\n * }\n * ```\n *\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\n * loaded.\n *\n * The key must be a unique String. It is used to add the file to the global Text Cache upon a successful load.\n * The key should be unique both in terms of files being loaded and files already present in the Text Cache.\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\n * then remove it from the Text Cache first, before loading a new one.\n *\n * Instead of passing arguments you can pass a configuration object, such as:\n *\n * ```javascript\n * this.load.text({\n * key: 'story',\n * url: 'files/IntroStory.txt'\n * });\n * ```\n *\n * See the documentation for `Phaser.Types.Loader.FileTypes.TextFileConfig` for more details.\n *\n * Once the file has finished loading you can access it from its Cache using its key:\n *\n * ```javascript\n * this.load.text('story', 'files/IntroStory.txt');\n * // and later in your game ...\n * var data = this.cache.text.get('story');\n * ```\n *\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\n * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and\n * this is what you would use to retrieve the text from the Text Cache.\n *\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\n *\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"story\"\n * and no URL is given then the Loader will set the URL to be \"story.txt\". It will always add `.txt` as the extension, although\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\n *\n * Note: The ability to load this type of file will only be available if the Text File type has been built into Phaser.\n * It is available in the default build but can be excluded from custom builds.\n *\n * @method Phaser.Loader.LoaderPlugin#text\n * @fires Phaser.Loader.LoaderPlugin#ADD\n * @since 3.0.0\n *\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig|Phaser.Types.Loader.FileTypes.TextFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\n *\n * @return {this} The Loader instance.\n */\nFileTypesManager.register('text', function (key, url, xhrSettings)\n{\n if (Array.isArray(key))\n {\n for (var i = 0; i < key.length; i++)\n {\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\n this.addFile(new TextFile(this, key[i]));\n }\n }\n else\n {\n this.addFile(new TextFile(this, key, url, xhrSettings));\n }\n\n return this;\n});\n\nmodule.exports = TextFile;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the mean average of the given values.\n *\n * @function Phaser.Math.Average\n * @since 3.0.0\n *\n * @param {number[]} values - The values to average.\n *\n * @return {number} The average value.\n */\nvar Average = function (values)\n{\n var sum = 0;\n\n for (var i = 0; i < values.length; i++)\n {\n sum += (+values[i]);\n }\n\n return sum / values.length;\n};\n\nmodule.exports = Average;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Factorial = require('./Factorial');\n\n/**\n * Calculates the Bernstein basis from the three factorial coefficients.\n *\n * @function Phaser.Math.Bernstein\n * @since 3.0.0\n *\n * @param {number} n - The first value.\n * @param {number} i - The second value.\n *\n * @return {number} The Bernstein basis of Factorial(n) / Factorial(i) / Factorial(n - i)\n */\nvar Bernstein = function (n, i)\n{\n return Factorial(n) / Factorial(i) / Factorial(n - i);\n};\n\nmodule.exports = Bernstein;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Compute a random integer between the `min` and `max` values, inclusive.\n *\n * @function Phaser.Math.Between\n * @since 3.0.0\n *\n * @param {integer} min - The minimum value.\n * @param {integer} max - The maximum value.\n *\n * @return {integer} The random integer.\n */\nvar Between = function (min, max)\n{\n return Math.floor(Math.random() * (max - min + 1) + min);\n};\n\nmodule.exports = Between;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculates a Catmull-Rom value from the given points, based on an alpha of 0.5.\n *\n * @function Phaser.Math.CatmullRom\n * @since 3.0.0\n *\n * @param {number} t - The amount to interpolate by.\n * @param {number} p0 - The first control point.\n * @param {number} p1 - The second control point.\n * @param {number} p2 - The third control point.\n * @param {number} p3 - The fourth control point.\n *\n * @return {number} The Catmull-Rom value.\n */\nvar CatmullRom = function (t, p0, p1, p2, p3)\n{\n var v0 = (p2 - p0) * 0.5;\n var v1 = (p3 - p1) * 0.5;\n var t2 = t * t;\n var t3 = t * t2;\n\n return (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1;\n};\n\nmodule.exports = CatmullRom;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Ceils to some place comparative to a `base`, default is 10 for decimal place.\n *\n * The `place` is represented by the power applied to `base` to get that place.\n *\n * @function Phaser.Math.CeilTo\n * @since 3.0.0\n *\n * @param {number} value - The value to round.\n * @param {number} [place=0] - The place to round to.\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\n *\n * @return {number} The rounded value.\n */\nvar CeilTo = function (value, place, base)\n{\n if (place === undefined) { place = 0; }\n if (base === undefined) { base = 10; }\n\n var p = Math.pow(base, -place);\n\n return Math.ceil(value * p) / p;\n};\n\nmodule.exports = CeilTo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Force a value within the boundaries by clamping it to the range `min`, `max`.\n *\n * @function Phaser.Math.Clamp\n * @since 3.0.0\n *\n * @param {number} value - The value to be clamped.\n * @param {number} min - The minimum bounds.\n * @param {number} max - The maximum bounds.\n *\n * @return {number} The clamped value.\n */\nvar Clamp = function (value, min, max)\n{\n return Math.max(min, Math.min(max, value));\n};\n\nmodule.exports = Clamp;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CONST = require('./const');\n\n/**\n * Convert the given angle from degrees, to the equivalent angle in radians.\n *\n * @function Phaser.Math.DegToRad\n * @since 3.0.0\n *\n * @param {integer} degrees - The angle (in degrees) to convert to radians.\n *\n * @return {number} The given angle converted to radians.\n */\nvar DegToRad = function (degrees)\n{\n return degrees * CONST.DEG_TO_RAD;\n};\n\nmodule.exports = DegToRad;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculates the positive difference of two given numbers.\n *\n * @function Phaser.Math.Difference\n * @since 3.0.0\n *\n * @param {number} a - The first number in the calculation.\n * @param {number} b - The second number in the calculation.\n *\n * @return {number} The positive difference of the two given numbers.\n */\nvar Difference = function (a, b)\n{\n return Math.abs(a - b);\n};\n\nmodule.exports = Difference;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculates the factorial of a given number for integer values greater than 0.\n *\n * @function Phaser.Math.Factorial\n * @since 3.0.0\n *\n * @param {number} value - A positive integer to calculate the factorial of.\n *\n * @return {number} The factorial of the given number.\n */\nvar Factorial = function (value)\n{\n if (value === 0)\n {\n return 1;\n }\n\n var res = value;\n\n while (--value)\n {\n res *= value;\n }\n\n return res;\n};\n\nmodule.exports = Factorial;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive.\n *\n * @function Phaser.Math.FloatBetween\n * @since 3.0.0\n *\n * @param {number} min - The lower bound for the float, inclusive.\n * @param {number} max - The upper bound for the float exclusive.\n *\n * @return {number} A random float within the given range.\n */\nvar FloatBetween = function (min, max)\n{\n return Math.random() * (max - min) + min;\n};\n\nmodule.exports = FloatBetween;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Floors to some place comparative to a `base`, default is 10 for decimal place.\n *\n * The `place` is represented by the power applied to `base` to get that place.\n *\n * @function Phaser.Math.FloorTo\n * @since 3.0.0\n *\n * @param {number} value - The value to round.\n * @param {integer} [place=0] - The place to round to.\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\n *\n * @return {number} The rounded value.\n */\nvar FloorTo = function (value, place, base)\n{\n if (place === undefined) { place = 0; }\n if (base === undefined) { base = 10; }\n\n var p = Math.pow(base, -place);\n\n return Math.floor(value * p) / p;\n};\n\nmodule.exports = FloorTo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Clamp = require('./Clamp');\n\n/**\n * Return a value based on the range between `min` and `max` and the percentage given.\n *\n * @function Phaser.Math.FromPercent\n * @since 3.0.0\n *\n * @param {number} percent - A value between 0 and 1 representing the percentage.\n * @param {number} min - The minimum value.\n * @param {number} [max] - The maximum value.\n *\n * @return {number} The value that is `percent` percent between `min` and `max`.\n */\nvar FromPercent = function (percent, min, max)\n{\n percent = Clamp(percent, 0, 1);\n\n return (max - min) * percent;\n};\n\nmodule.exports = FromPercent;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate a per-ms speed from a distance and time (given in seconds).\n *\n * @function Phaser.Math.GetSpeed\n * @since 3.0.0\n *\n * @param {number} distance - The distance.\n * @param {integer} time - The time, in seconds.\n *\n * @return {number} The speed, in distance per ms.\n *\n * @example\n * // 400px over 1 second is 0.4 px/ms\n * Phaser.Math.GetSpeed(400, 1) // -> 0.4\n */\nvar GetSpeed = function (distance, time)\n{\n return (distance / time) / 1000;\n};\n\nmodule.exports = GetSpeed;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Check if a given value is an even number.\n *\n * @function Phaser.Math.IsEven\n * @since 3.0.0\n *\n * @param {number} value - The number to perform the check with.\n *\n * @return {boolean} Whether the number is even or not.\n */\nvar IsEven = function (value)\n{\n // Use abstract equality == for \"is number\" test\n\n // eslint-disable-next-line eqeqeq\n return (value == parseFloat(value)) ? !(value % 2) : void 0;\n};\n\nmodule.exports = IsEven;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Check if a given value is an even number using a strict type check.\n *\n * @function Phaser.Math.IsEvenStrict\n * @since 3.0.0\n *\n * @param {number} value - The number to perform the check with.\n *\n * @return {boolean} Whether the number is even or not.\n */\nvar IsEvenStrict = function (value)\n{\n // Use strict equality === for \"is number\" test\n return (value === parseFloat(value)) ? !(value % 2) : void 0;\n};\n\nmodule.exports = IsEvenStrict;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculates a linear (interpolation) value over t.\n *\n * @function Phaser.Math.Linear\n * @since 3.0.0\n *\n * @param {number} p0 - The first point.\n * @param {number} p1 - The second point.\n * @param {number} t - The percentage between p0 and p1 to return, represented as a number between 0 and 1.\n *\n * @return {number} The step t% of the way between p0 and p1.\n */\nvar Linear = function (p0, p1, t)\n{\n return (p1 - p0) * t + p0;\n};\n\nmodule.exports = Linear;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\n\nvar Class = require('../utils/Class');\n\n/**\n * @classdesc\n * A three-dimensional matrix.\n *\n * Defaults to the identity matrix when instantiated.\n *\n * @class Matrix3\n * @memberof Phaser.Math\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix3} [m] - Optional Matrix3 to copy values from.\n */\nvar Matrix3 = new Class({\n\n initialize:\n\n function Matrix3 (m)\n {\n /**\n * The matrix values.\n *\n * @name Phaser.Math.Matrix3#val\n * @type {Float32Array}\n * @since 3.0.0\n */\n this.val = new Float32Array(9);\n\n if (m)\n {\n // Assume Matrix3 with val:\n this.copy(m);\n }\n else\n {\n // Default to identity\n this.identity();\n }\n },\n\n /**\n * Make a clone of this Matrix3.\n *\n * @method Phaser.Math.Matrix3#clone\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix3} A clone of this Matrix3.\n */\n clone: function ()\n {\n return new Matrix3(this);\n },\n\n /**\n * This method is an alias for `Matrix3.copy`.\n *\n * @method Phaser.Math.Matrix3#set\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix3} src - The Matrix to set the values of this Matrix's from.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n set: function (src)\n {\n return this.copy(src);\n },\n\n /**\n * Copy the values of a given Matrix into this Matrix.\n *\n * @method Phaser.Math.Matrix3#copy\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix3} src - The Matrix to copy the values from.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n copy: function (src)\n {\n var out = this.val;\n var a = src.val;\n\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n\n return this;\n },\n\n /**\n * Copy the values of a given Matrix4 into this Matrix3.\n *\n * @method Phaser.Math.Matrix3#fromMat4\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to copy the values from.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n fromMat4: function (m)\n {\n var a = m.val;\n var out = this.val;\n\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[4];\n out[4] = a[5];\n out[5] = a[6];\n out[6] = a[8];\n out[7] = a[9];\n out[8] = a[10];\n\n return this;\n },\n\n /**\n * Set the values of this Matrix from the given array.\n *\n * @method Phaser.Math.Matrix3#fromArray\n * @since 3.0.0\n *\n * @param {array} a - The array to copy the values from.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n fromArray: function (a)\n {\n var out = this.val;\n\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n\n return this;\n },\n\n /**\n * Reset this Matrix to an identity (default) matrix.\n *\n * @method Phaser.Math.Matrix3#identity\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n identity: function ()\n {\n var out = this.val;\n\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 1;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n\n return this;\n },\n\n /**\n * Transpose this Matrix.\n *\n * @method Phaser.Math.Matrix3#transpose\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n transpose: function ()\n {\n var a = this.val;\n var a01 = a[1];\n var a02 = a[2];\n var a12 = a[5];\n\n a[1] = a[3];\n a[2] = a[6];\n a[3] = a01;\n a[5] = a[7];\n a[6] = a02;\n a[7] = a12;\n\n return this;\n },\n\n /**\n * Invert this Matrix.\n *\n * @method Phaser.Math.Matrix3#invert\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n invert: function ()\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a10 = a[3];\n var a11 = a[4];\n var a12 = a[5];\n var a20 = a[6];\n var a21 = a[7];\n var a22 = a[8];\n\n var b01 = a22 * a11 - a12 * a21;\n var b11 = -a22 * a10 + a12 * a20;\n var b21 = a21 * a10 - a11 * a20;\n\n // Calculate the determinant\n var det = a00 * b01 + a01 * b11 + a02 * b21;\n\n if (!det)\n {\n return null;\n }\n\n det = 1 / det;\n\n a[0] = b01 * det;\n a[1] = (-a22 * a01 + a02 * a21) * det;\n a[2] = (a12 * a01 - a02 * a11) * det;\n a[3] = b11 * det;\n a[4] = (a22 * a00 - a02 * a20) * det;\n a[5] = (-a12 * a00 + a02 * a10) * det;\n a[6] = b21 * det;\n a[7] = (-a21 * a00 + a01 * a20) * det;\n a[8] = (a11 * a00 - a01 * a10) * det;\n\n return this;\n },\n\n /**\n * Calculate the adjoint, or adjugate, of this Matrix.\n *\n * @method Phaser.Math.Matrix3#adjoint\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n adjoint: function ()\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a10 = a[3];\n var a11 = a[4];\n var a12 = a[5];\n var a20 = a[6];\n var a21 = a[7];\n var a22 = a[8];\n\n a[0] = (a11 * a22 - a12 * a21);\n a[1] = (a02 * a21 - a01 * a22);\n a[2] = (a01 * a12 - a02 * a11);\n a[3] = (a12 * a20 - a10 * a22);\n a[4] = (a00 * a22 - a02 * a20);\n a[5] = (a02 * a10 - a00 * a12);\n a[6] = (a10 * a21 - a11 * a20);\n a[7] = (a01 * a20 - a00 * a21);\n a[8] = (a00 * a11 - a01 * a10);\n\n return this;\n },\n\n /**\n * Calculate the determinant of this Matrix.\n *\n * @method Phaser.Math.Matrix3#determinant\n * @since 3.0.0\n *\n * @return {number} The determinant of this Matrix.\n */\n determinant: function ()\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a10 = a[3];\n var a11 = a[4];\n var a12 = a[5];\n var a20 = a[6];\n var a21 = a[7];\n var a22 = a[8];\n\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\n },\n\n /**\n * Multiply this Matrix by the given Matrix.\n *\n * @method Phaser.Math.Matrix3#multiply\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix3} src - The Matrix to multiply this Matrix by.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n multiply: function (src)\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a10 = a[3];\n var a11 = a[4];\n var a12 = a[5];\n var a20 = a[6];\n var a21 = a[7];\n var a22 = a[8];\n\n var b = src.val;\n\n var b00 = b[0];\n var b01 = b[1];\n var b02 = b[2];\n var b10 = b[3];\n var b11 = b[4];\n var b12 = b[5];\n var b20 = b[6];\n var b21 = b[7];\n var b22 = b[8];\n\n a[0] = b00 * a00 + b01 * a10 + b02 * a20;\n a[1] = b00 * a01 + b01 * a11 + b02 * a21;\n a[2] = b00 * a02 + b01 * a12 + b02 * a22;\n\n a[3] = b10 * a00 + b11 * a10 + b12 * a20;\n a[4] = b10 * a01 + b11 * a11 + b12 * a21;\n a[5] = b10 * a02 + b11 * a12 + b12 * a22;\n\n a[6] = b20 * a00 + b21 * a10 + b22 * a20;\n a[7] = b20 * a01 + b21 * a11 + b22 * a21;\n a[8] = b20 * a02 + b21 * a12 + b22 * a22;\n\n return this;\n },\n\n /**\n * Translate this Matrix using the given Vector.\n *\n * @method Phaser.Math.Matrix3#translate\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n translate: function (v)\n {\n var a = this.val;\n var x = v.x;\n var y = v.y;\n\n a[6] = x * a[0] + y * a[3] + a[6];\n a[7] = x * a[1] + y * a[4] + a[7];\n a[8] = x * a[2] + y * a[5] + a[8];\n\n return this;\n },\n\n /**\n * Apply a rotation transformation to this Matrix.\n *\n * @method Phaser.Math.Matrix3#rotate\n * @since 3.0.0\n *\n * @param {number} rad - The angle in radians to rotate by.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n rotate: function (rad)\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a10 = a[3];\n var a11 = a[4];\n var a12 = a[5];\n\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n\n a[0] = c * a00 + s * a10;\n a[1] = c * a01 + s * a11;\n a[2] = c * a02 + s * a12;\n\n a[3] = c * a10 - s * a00;\n a[4] = c * a11 - s * a01;\n a[5] = c * a12 - s * a02;\n\n return this;\n },\n\n /**\n * Apply a scale transformation to this Matrix.\n *\n * Uses the `x` and `y` components of the given Vector to scale the Matrix.\n *\n * @method Phaser.Math.Matrix3#scale\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n scale: function (v)\n {\n var a = this.val;\n var x = v.x;\n var y = v.y;\n\n a[0] = x * a[0];\n a[1] = x * a[1];\n a[2] = x * a[2];\n\n a[3] = y * a[3];\n a[4] = y * a[4];\n a[5] = y * a[5];\n\n return this;\n },\n\n /**\n * Set the values of this Matrix from the given Quaternion.\n *\n * @method Phaser.Math.Matrix3#fromQuat\n * @since 3.0.0\n *\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n fromQuat: function (q)\n {\n var x = q.x;\n var y = q.y;\n var z = q.z;\n var w = q.w;\n\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n\n var out = this.val;\n\n out[0] = 1 - (yy + zz);\n out[3] = xy + wz;\n out[6] = xz - wy;\n\n out[1] = xy - wz;\n out[4] = 1 - (xx + zz);\n out[7] = yz + wx;\n\n out[2] = xz + wy;\n out[5] = yz - wx;\n out[8] = 1 - (xx + yy);\n\n return this;\n },\n\n /**\n * Set the values of this Matrix3 to be normalized from the given Matrix4.\n *\n * @method Phaser.Math.Matrix3#normalFromMat4\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to normalize the values from.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n normalFromMat4: function (m)\n {\n var a = m.val;\n var out = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\n\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32;\n\n // Calculate the determinant\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det)\n {\n return null;\n }\n\n det = 1 / det;\n\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n\n return this;\n }\n\n});\n\nmodule.exports = Matrix3;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\n\nvar Class = require('../utils/Class');\n\nvar EPSILON = 0.000001;\n\n/**\n * @classdesc\n * A four-dimensional matrix.\n *\n * @class Matrix4\n * @memberof Phaser.Math\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} [m] - Optional Matrix4 to copy values from.\n */\nvar Matrix4 = new Class({\n\n initialize:\n\n function Matrix4 (m)\n {\n /**\n * The matrix values.\n *\n * @name Phaser.Math.Matrix4#val\n * @type {Float32Array}\n * @since 3.0.0\n */\n this.val = new Float32Array(16);\n\n if (m)\n {\n // Assume Matrix4 with val:\n this.copy(m);\n }\n else\n {\n // Default to identity\n this.identity();\n }\n },\n\n /**\n * Make a clone of this Matrix4.\n *\n * @method Phaser.Math.Matrix4#clone\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix4} A clone of this Matrix4.\n */\n clone: function ()\n {\n return new Matrix4(this);\n },\n\n // TODO - Should work with basic values\n\n /**\n * This method is an alias for `Matrix4.copy`.\n *\n * @method Phaser.Math.Matrix4#set\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} src - The Matrix to set the values of this Matrix's from.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n set: function (src)\n {\n return this.copy(src);\n },\n\n /**\n * Copy the values of a given Matrix into this Matrix.\n *\n * @method Phaser.Math.Matrix4#copy\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} src - The Matrix to copy the values from.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n copy: function (src)\n {\n var out = this.val;\n var a = src.val;\n\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n\n return this;\n },\n\n /**\n * Set the values of this Matrix from the given array.\n *\n * @method Phaser.Math.Matrix4#fromArray\n * @since 3.0.0\n *\n * @param {array} a - The array to copy the values from.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n fromArray: function (a)\n {\n var out = this.val;\n\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n\n return this;\n },\n\n /**\n * Reset this Matrix.\n *\n * Sets all values to `0`.\n *\n * @method Phaser.Math.Matrix4#zero\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n zero: function ()\n {\n var out = this.val;\n\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 0;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 0;\n\n return this;\n },\n\n /**\n * Set the `x`, `y` and `z` values of this Matrix.\n *\n * @method Phaser.Math.Matrix4#xyz\n * @since 3.0.0\n *\n * @param {number} x - The x value.\n * @param {number} y - The y value.\n * @param {number} z - The z value.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n xyz: function (x, y, z)\n {\n this.identity();\n\n var out = this.val;\n\n out[12] = x;\n out[13] = y;\n out[14] = z;\n\n return this;\n },\n\n /**\n * Set the scaling values of this Matrix.\n *\n * @method Phaser.Math.Matrix4#scaling\n * @since 3.0.0\n *\n * @param {number} x - The x scaling value.\n * @param {number} y - The y scaling value.\n * @param {number} z - The z scaling value.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n scaling: function (x, y, z)\n {\n this.zero();\n\n var out = this.val;\n\n out[0] = x;\n out[5] = y;\n out[10] = z;\n out[15] = 1;\n\n return this;\n },\n\n /**\n * Reset this Matrix to an identity (default) matrix.\n *\n * @method Phaser.Math.Matrix4#identity\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n identity: function ()\n {\n var out = this.val;\n\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n\n return this;\n },\n\n /**\n * Transpose this Matrix.\n *\n * @method Phaser.Math.Matrix4#transpose\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n transpose: function ()\n {\n var a = this.val;\n\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a12 = a[6];\n var a13 = a[7];\n var a23 = a[11];\n\n a[1] = a[4];\n a[2] = a[8];\n a[3] = a[12];\n a[4] = a01;\n a[6] = a[9];\n a[7] = a[13];\n a[8] = a02;\n a[9] = a12;\n a[11] = a[14];\n a[12] = a03;\n a[13] = a13;\n a[14] = a23;\n\n return this;\n },\n\n /**\n * Invert this Matrix.\n *\n * @method Phaser.Math.Matrix4#invert\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n invert: function ()\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\n\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32;\n\n // Calculate the determinant\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det)\n {\n return null;\n }\n\n det = 1 / det;\n\n a[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n a[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n a[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n a[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\n a[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n a[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n a[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n a[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\n a[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n a[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n a[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n a[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\n a[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\n a[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\n a[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\n a[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\n\n return this;\n },\n\n /**\n * Calculate the adjoint, or adjugate, of this Matrix.\n *\n * @method Phaser.Math.Matrix4#adjoint\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n adjoint: function ()\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\n\n a[0] = (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22));\n a[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));\n a[2] = (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12));\n a[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));\n a[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));\n a[5] = (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22));\n a[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));\n a[7] = (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12));\n a[8] = (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21));\n a[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));\n a[10] = (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11));\n a[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));\n a[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));\n a[13] = (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21));\n a[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));\n a[15] = (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11));\n\n return this;\n },\n\n /**\n * Calculate the determinant of this Matrix.\n *\n * @method Phaser.Math.Matrix4#determinant\n * @since 3.0.0\n *\n * @return {number} The determinant of this Matrix.\n */\n determinant: function ()\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\n\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32;\n\n // Calculate the determinant\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n },\n\n /**\n * Multiply this Matrix by the given Matrix.\n *\n * @method Phaser.Math.Matrix4#multiply\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} src - The Matrix to multiply this Matrix by.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n multiply: function (src)\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\n\n var b = src.val;\n\n // Cache only the current line of the second matrix\n var b0 = b[0];\n var b1 = b[1];\n var b2 = b[2];\n var b3 = b[3];\n\n a[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n a[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n a[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n a[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n\n b0 = b[4];\n b1 = b[5];\n b2 = b[6];\n b3 = b[7];\n\n a[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n a[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n a[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n a[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n\n b0 = b[8];\n b1 = b[9];\n b2 = b[10];\n b3 = b[11];\n\n a[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n a[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n a[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n a[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n\n b0 = b[12];\n b1 = b[13];\n b2 = b[14];\n b3 = b[15];\n\n a[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n a[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n a[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n a[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n\n return this;\n },\n\n /**\n * Multiply the values of this Matrix4 by those given in the `src` argument.\n *\n * @method Phaser.Math.Matrix4#multiplyLocal\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} src - The source Matrix4 that this Matrix4 is multiplied by.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n multiplyLocal: function (src)\n {\n var a = [];\n var m1 = this.val;\n var m2 = src.val;\n\n a[0] = m1[0] * m2[0] + m1[1] * m2[4] + m1[2] * m2[8] + m1[3] * m2[12];\n a[1] = m1[0] * m2[1] + m1[1] * m2[5] + m1[2] * m2[9] + m1[3] * m2[13];\n a[2] = m1[0] * m2[2] + m1[1] * m2[6] + m1[2] * m2[10] + m1[3] * m2[14];\n a[3] = m1[0] * m2[3] + m1[1] * m2[7] + m1[2] * m2[11] + m1[3] * m2[15];\n\n a[4] = m1[4] * m2[0] + m1[5] * m2[4] + m1[6] * m2[8] + m1[7] * m2[12];\n a[5] = m1[4] * m2[1] + m1[5] * m2[5] + m1[6] * m2[9] + m1[7] * m2[13];\n a[6] = m1[4] * m2[2] + m1[5] * m2[6] + m1[6] * m2[10] + m1[7] * m2[14];\n a[7] = m1[4] * m2[3] + m1[5] * m2[7] + m1[6] * m2[11] + m1[7] * m2[15];\n\n a[8] = m1[8] * m2[0] + m1[9] * m2[4] + m1[10] * m2[8] + m1[11] * m2[12];\n a[9] = m1[8] * m2[1] + m1[9] * m2[5] + m1[10] * m2[9] + m1[11] * m2[13];\n a[10] = m1[8] * m2[2] + m1[9] * m2[6] + m1[10] * m2[10] + m1[11] * m2[14];\n a[11] = m1[8] * m2[3] + m1[9] * m2[7] + m1[10] * m2[11] + m1[11] * m2[15];\n\n a[12] = m1[12] * m2[0] + m1[13] * m2[4] + m1[14] * m2[8] + m1[15] * m2[12];\n a[13] = m1[12] * m2[1] + m1[13] * m2[5] + m1[14] * m2[9] + m1[15] * m2[13];\n a[14] = m1[12] * m2[2] + m1[13] * m2[6] + m1[14] * m2[10] + m1[15] * m2[14];\n a[15] = m1[12] * m2[3] + m1[13] * m2[7] + m1[14] * m2[11] + m1[15] * m2[15];\n\n return this.fromArray(a);\n },\n\n /**\n * Translate this Matrix using the given Vector.\n *\n * @method Phaser.Math.Matrix4#translate\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n translate: function (v)\n {\n var x = v.x;\n var y = v.y;\n var z = v.z;\n var a = this.val;\n\n a[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\n a[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\n a[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\n a[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\n\n return this;\n },\n\n /**\n * Translate this Matrix using the given values.\n *\n * @method Phaser.Math.Matrix4#translateXYZ\n * @since 3.16.0\n *\n * @param {number} x - The x component.\n * @param {number} y - The y component.\n * @param {number} z - The z component.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n translateXYZ: function (x, y, z)\n {\n var a = this.val;\n\n a[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\n a[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\n a[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\n a[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\n\n return this;\n },\n\n /**\n * Apply a scale transformation to this Matrix.\n *\n * Uses the `x`, `y` and `z` components of the given Vector to scale the Matrix.\n *\n * @method Phaser.Math.Matrix4#scale\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n scale: function (v)\n {\n var x = v.x;\n var y = v.y;\n var z = v.z;\n var a = this.val;\n\n a[0] = a[0] * x;\n a[1] = a[1] * x;\n a[2] = a[2] * x;\n a[3] = a[3] * x;\n\n a[4] = a[4] * y;\n a[5] = a[5] * y;\n a[6] = a[6] * y;\n a[7] = a[7] * y;\n\n a[8] = a[8] * z;\n a[9] = a[9] * z;\n a[10] = a[10] * z;\n a[11] = a[11] * z;\n\n return this;\n },\n\n /**\n * Apply a scale transformation to this Matrix.\n *\n * @method Phaser.Math.Matrix4#scaleXYZ\n * @since 3.16.0\n *\n * @param {number} x - The x component.\n * @param {number} y - The y component.\n * @param {number} z - The z component.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n scaleXYZ: function (x, y, z)\n {\n var a = this.val;\n\n a[0] = a[0] * x;\n a[1] = a[1] * x;\n a[2] = a[2] * x;\n a[3] = a[3] * x;\n\n a[4] = a[4] * y;\n a[5] = a[5] * y;\n a[6] = a[6] * y;\n a[7] = a[7] * y;\n\n a[8] = a[8] * z;\n a[9] = a[9] * z;\n a[10] = a[10] * z;\n a[11] = a[11] * z;\n\n return this;\n },\n\n /**\n * Derive a rotation matrix around the given axis.\n *\n * @method Phaser.Math.Matrix4#makeRotationAxis\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} axis - The rotation axis.\n * @param {number} angle - The rotation angle in radians.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n makeRotationAxis: function (axis, angle)\n {\n // Based on http://www.gamedev.net/reference/articles/article1199.asp\n\n var c = Math.cos(angle);\n var s = Math.sin(angle);\n var t = 1 - c;\n var x = axis.x;\n var y = axis.y;\n var z = axis.z;\n var tx = t * x;\n var ty = t * y;\n\n this.fromArray([\n tx * x + c, tx * y - s * z, tx * z + s * y, 0,\n tx * y + s * z, ty * y + c, ty * z - s * x, 0,\n tx * z - s * y, ty * z + s * x, t * z * z + c, 0,\n 0, 0, 0, 1\n ]);\n\n return this;\n },\n\n /**\n * Apply a rotation transformation to this Matrix.\n *\n * @method Phaser.Math.Matrix4#rotate\n * @since 3.0.0\n *\n * @param {number} rad - The angle in radians to rotate by.\n * @param {Phaser.Math.Vector3} axis - The axis to rotate upon.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n rotate: function (rad, axis)\n {\n var a = this.val;\n var x = axis.x;\n var y = axis.y;\n var z = axis.z;\n var len = Math.sqrt(x * x + y * y + z * z);\n\n if (Math.abs(len) < EPSILON)\n {\n return null;\n }\n\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var t = 1 - c;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n // Construct the elements of the rotation matrix\n var b00 = x * x * t + c;\n var b01 = y * x * t + z * s;\n var b02 = z * x * t - y * s;\n\n var b10 = x * y * t - z * s;\n var b11 = y * y * t + c;\n var b12 = z * y * t + x * s;\n\n var b20 = x * z * t + y * s;\n var b21 = y * z * t - x * s;\n var b22 = z * z * t + c;\n\n // Perform rotation-specific matrix multiplication\n a[0] = a00 * b00 + a10 * b01 + a20 * b02;\n a[1] = a01 * b00 + a11 * b01 + a21 * b02;\n a[2] = a02 * b00 + a12 * b01 + a22 * b02;\n a[3] = a03 * b00 + a13 * b01 + a23 * b02;\n a[4] = a00 * b10 + a10 * b11 + a20 * b12;\n a[5] = a01 * b10 + a11 * b11 + a21 * b12;\n a[6] = a02 * b10 + a12 * b11 + a22 * b12;\n a[7] = a03 * b10 + a13 * b11 + a23 * b12;\n a[8] = a00 * b20 + a10 * b21 + a20 * b22;\n a[9] = a01 * b20 + a11 * b21 + a21 * b22;\n a[10] = a02 * b20 + a12 * b21 + a22 * b22;\n a[11] = a03 * b20 + a13 * b21 + a23 * b22;\n\n return this;\n },\n\n /**\n * Rotate this matrix on its X axis.\n *\n * @method Phaser.Math.Matrix4#rotateX\n * @since 3.0.0\n *\n * @param {number} rad - The angle in radians to rotate by.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n rotateX: function (rad)\n {\n var a = this.val;\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n // Perform axis-specific matrix multiplication\n a[4] = a10 * c + a20 * s;\n a[5] = a11 * c + a21 * s;\n a[6] = a12 * c + a22 * s;\n a[7] = a13 * c + a23 * s;\n a[8] = a20 * c - a10 * s;\n a[9] = a21 * c - a11 * s;\n a[10] = a22 * c - a12 * s;\n a[11] = a23 * c - a13 * s;\n\n return this;\n },\n\n /**\n * Rotate this matrix on its Y axis.\n *\n * @method Phaser.Math.Matrix4#rotateY\n * @since 3.0.0\n *\n * @param {number} rad - The angle to rotate by, in radians.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n rotateY: function (rad)\n {\n var a = this.val;\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n // Perform axis-specific matrix multiplication\n a[0] = a00 * c - a20 * s;\n a[1] = a01 * c - a21 * s;\n a[2] = a02 * c - a22 * s;\n a[3] = a03 * c - a23 * s;\n a[8] = a00 * s + a20 * c;\n a[9] = a01 * s + a21 * c;\n a[10] = a02 * s + a22 * c;\n a[11] = a03 * s + a23 * c;\n\n return this;\n },\n\n /**\n * Rotate this matrix on its Z axis.\n *\n * @method Phaser.Math.Matrix4#rotateZ\n * @since 3.0.0\n *\n * @param {number} rad - The angle to rotate by, in radians.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n rotateZ: function (rad)\n {\n var a = this.val;\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n // Perform axis-specific matrix multiplication\n a[0] = a00 * c + a10 * s;\n a[1] = a01 * c + a11 * s;\n a[2] = a02 * c + a12 * s;\n a[3] = a03 * c + a13 * s;\n a[4] = a10 * c - a00 * s;\n a[5] = a11 * c - a01 * s;\n a[6] = a12 * c - a02 * s;\n a[7] = a13 * c - a03 * s;\n\n return this;\n },\n\n /**\n * Set the values of this Matrix from the given rotation Quaternion and translation Vector.\n *\n * @method Phaser.Math.Matrix4#fromRotationTranslation\n * @since 3.0.0\n *\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set rotation from.\n * @param {Phaser.Math.Vector3} v - The Vector to set translation from.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n fromRotationTranslation: function (q, v)\n {\n // Quaternion math\n var out = this.val;\n\n var x = q.x;\n var y = q.y;\n var z = q.z;\n var w = q.w;\n\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n\n out[0] = 1 - (yy + zz);\n out[1] = xy + wz;\n out[2] = xz - wy;\n out[3] = 0;\n\n out[4] = xy - wz;\n out[5] = 1 - (xx + zz);\n out[6] = yz + wx;\n out[7] = 0;\n\n out[8] = xz + wy;\n out[9] = yz - wx;\n out[10] = 1 - (xx + yy);\n out[11] = 0;\n\n out[12] = v.x;\n out[13] = v.y;\n out[14] = v.z;\n out[15] = 1;\n\n return this;\n },\n\n /**\n * Set the values of this Matrix from the given Quaternion.\n *\n * @method Phaser.Math.Matrix4#fromQuat\n * @since 3.0.0\n *\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n fromQuat: function (q)\n {\n var out = this.val;\n\n var x = q.x;\n var y = q.y;\n var z = q.z;\n var w = q.w;\n\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n\n out[0] = 1 - (yy + zz);\n out[1] = xy + wz;\n out[2] = xz - wy;\n out[3] = 0;\n\n out[4] = xy - wz;\n out[5] = 1 - (xx + zz);\n out[6] = yz + wx;\n out[7] = 0;\n\n out[8] = xz + wy;\n out[9] = yz - wx;\n out[10] = 1 - (xx + yy);\n out[11] = 0;\n\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n\n return this;\n },\n\n /**\n * Generate a frustum matrix with the given bounds.\n *\n * @method Phaser.Math.Matrix4#frustum\n * @since 3.0.0\n *\n * @param {number} left - The left bound of the frustum.\n * @param {number} right - The right bound of the frustum.\n * @param {number} bottom - The bottom bound of the frustum.\n * @param {number} top - The top bound of the frustum.\n * @param {number} near - The near bound of the frustum.\n * @param {number} far - The far bound of the frustum.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n frustum: function (left, right, bottom, top, near, far)\n {\n var out = this.val;\n\n var rl = 1 / (right - left);\n var tb = 1 / (top - bottom);\n var nf = 1 / (near - far);\n\n out[0] = (near * 2) * rl;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n\n out[4] = 0;\n out[5] = (near * 2) * tb;\n out[6] = 0;\n out[7] = 0;\n\n out[8] = (right + left) * rl;\n out[9] = (top + bottom) * tb;\n out[10] = (far + near) * nf;\n out[11] = -1;\n\n out[12] = 0;\n out[13] = 0;\n out[14] = (far * near * 2) * nf;\n out[15] = 0;\n\n return this;\n },\n\n /**\n * Generate a perspective projection matrix with the given bounds.\n *\n * @method Phaser.Math.Matrix4#perspective\n * @since 3.0.0\n *\n * @param {number} fovy - Vertical field of view in radians\n * @param {number} aspect - Aspect ratio. Typically viewport width /height.\n * @param {number} near - Near bound of the frustum.\n * @param {number} far - Far bound of the frustum.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n perspective: function (fovy, aspect, near, far)\n {\n var out = this.val;\n var f = 1.0 / Math.tan(fovy / 2);\n var nf = 1 / (near - far);\n\n out[0] = f / aspect;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n\n out[4] = 0;\n out[5] = f;\n out[6] = 0;\n out[7] = 0;\n\n out[8] = 0;\n out[9] = 0;\n out[10] = (far + near) * nf;\n out[11] = -1;\n\n out[12] = 0;\n out[13] = 0;\n out[14] = (2 * far * near) * nf;\n out[15] = 0;\n\n return this;\n },\n\n /**\n * Generate a perspective projection matrix with the given bounds.\n *\n * @method Phaser.Math.Matrix4#perspectiveLH\n * @since 3.0.0\n *\n * @param {number} width - The width of the frustum.\n * @param {number} height - The height of the frustum.\n * @param {number} near - Near bound of the frustum.\n * @param {number} far - Far bound of the frustum.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n perspectiveLH: function (width, height, near, far)\n {\n var out = this.val;\n\n out[0] = (2 * near) / width;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n\n out[4] = 0;\n out[5] = (2 * near) / height;\n out[6] = 0;\n out[7] = 0;\n\n out[8] = 0;\n out[9] = 0;\n out[10] = -far / (near - far);\n out[11] = 1;\n\n out[12] = 0;\n out[13] = 0;\n out[14] = (near * far) / (near - far);\n out[15] = 0;\n\n return this;\n },\n\n /**\n * Generate an orthogonal projection matrix with the given bounds.\n *\n * @method Phaser.Math.Matrix4#ortho\n * @since 3.0.0\n *\n * @param {number} left - The left bound of the frustum.\n * @param {number} right - The right bound of the frustum.\n * @param {number} bottom - The bottom bound of the frustum.\n * @param {number} top - The top bound of the frustum.\n * @param {number} near - The near bound of the frustum.\n * @param {number} far - The far bound of the frustum.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n ortho: function (left, right, bottom, top, near, far)\n {\n var out = this.val;\n var lr = left - right;\n var bt = bottom - top;\n var nf = near - far;\n\n // Avoid division by zero\n lr = (lr === 0) ? lr : 1 / lr;\n bt = (bt === 0) ? bt : 1 / bt;\n nf = (nf === 0) ? nf : 1 / nf;\n\n out[0] = -2 * lr;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n\n out[4] = 0;\n out[5] = -2 * bt;\n out[6] = 0;\n out[7] = 0;\n\n out[8] = 0;\n out[9] = 0;\n out[10] = 2 * nf;\n out[11] = 0;\n\n out[12] = (left + right) * lr;\n out[13] = (top + bottom) * bt;\n out[14] = (far + near) * nf;\n out[15] = 1;\n\n return this;\n },\n\n /**\n * Generate a look-at matrix with the given eye position, focal point, and up axis.\n *\n * @method Phaser.Math.Matrix4#lookAt\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} eye - Position of the viewer\n * @param {Phaser.Math.Vector3} center - Point the viewer is looking at\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n lookAt: function (eye, center, up)\n {\n var out = this.val;\n\n var eyex = eye.x;\n var eyey = eye.y;\n var eyez = eye.z;\n\n var upx = up.x;\n var upy = up.y;\n var upz = up.z;\n\n var centerx = center.x;\n var centery = center.y;\n var centerz = center.z;\n\n if (Math.abs(eyex - centerx) < EPSILON &&\n Math.abs(eyey - centery) < EPSILON &&\n Math.abs(eyez - centerz) < EPSILON)\n {\n return this.identity();\n }\n\n var z0 = eyex - centerx;\n var z1 = eyey - centery;\n var z2 = eyez - centerz;\n\n var len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);\n\n z0 *= len;\n z1 *= len;\n z2 *= len;\n\n var x0 = upy * z2 - upz * z1;\n var x1 = upz * z0 - upx * z2;\n var x2 = upx * z1 - upy * z0;\n\n len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);\n\n if (!len)\n {\n x0 = 0;\n x1 = 0;\n x2 = 0;\n }\n else\n {\n len = 1 / len;\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n\n var y0 = z1 * x2 - z2 * x1;\n var y1 = z2 * x0 - z0 * x2;\n var y2 = z0 * x1 - z1 * x0;\n\n len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);\n\n if (!len)\n {\n y0 = 0;\n y1 = 0;\n y2 = 0;\n }\n else\n {\n len = 1 / len;\n y0 *= len;\n y1 *= len;\n y2 *= len;\n }\n\n out[0] = x0;\n out[1] = y0;\n out[2] = z0;\n out[3] = 0;\n\n out[4] = x1;\n out[5] = y1;\n out[6] = z1;\n out[7] = 0;\n\n out[8] = x2;\n out[9] = y2;\n out[10] = z2;\n out[11] = 0;\n\n out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\n out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\n out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\n out[15] = 1;\n\n return this;\n },\n\n /**\n * Set the values of this matrix from the given `yaw`, `pitch` and `roll` values.\n *\n * @method Phaser.Math.Matrix4#yawPitchRoll\n * @since 3.0.0\n *\n * @param {number} yaw - The yaw value.\n * @param {number} pitch - The pitch value.\n * @param {number} roll - The roll value.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n yawPitchRoll: function (yaw, pitch, roll)\n {\n this.zero();\n _tempMat1.zero();\n _tempMat2.zero();\n\n var m0 = this.val;\n var m1 = _tempMat1.val;\n var m2 = _tempMat2.val;\n\n // Rotate Z\n var s = Math.sin(roll);\n var c = Math.cos(roll);\n\n m0[10] = 1;\n m0[15] = 1;\n m0[0] = c;\n m0[1] = s;\n m0[4] = -s;\n m0[5] = c;\n\n // Rotate X\n s = Math.sin(pitch);\n c = Math.cos(pitch);\n\n m1[0] = 1;\n m1[15] = 1;\n m1[5] = c;\n m1[10] = c;\n m1[9] = -s;\n m1[6] = s;\n\n // Rotate Y\n s = Math.sin(yaw);\n c = Math.cos(yaw);\n\n m2[5] = 1;\n m2[15] = 1;\n m2[0] = c;\n m2[2] = -s;\n m2[8] = s;\n m2[10] = c;\n\n this.multiplyLocal(_tempMat1);\n this.multiplyLocal(_tempMat2);\n\n return this;\n },\n\n /**\n * Generate a world matrix from the given rotation, position, scale, view matrix and projection matrix.\n *\n * @method Phaser.Math.Matrix4#setWorldMatrix\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} rotation - The rotation of the world matrix.\n * @param {Phaser.Math.Vector3} position - The position of the world matrix.\n * @param {Phaser.Math.Vector3} scale - The scale of the world matrix.\n * @param {Phaser.Math.Matrix4} [viewMatrix] - The view matrix.\n * @param {Phaser.Math.Matrix4} [projectionMatrix] - The projection matrix.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n setWorldMatrix: function (rotation, position, scale, viewMatrix, projectionMatrix)\n {\n this.yawPitchRoll(rotation.y, rotation.x, rotation.z);\n\n _tempMat1.scaling(scale.x, scale.y, scale.z);\n _tempMat2.xyz(position.x, position.y, position.z);\n\n this.multiplyLocal(_tempMat1);\n this.multiplyLocal(_tempMat2);\n\n if (viewMatrix !== undefined)\n {\n this.multiplyLocal(viewMatrix);\n }\n\n if (projectionMatrix !== undefined)\n {\n this.multiplyLocal(projectionMatrix);\n }\n\n return this;\n }\n\n});\n\nvar _tempMat1 = new Matrix4();\nvar _tempMat2 = new Matrix4();\n\nmodule.exports = Matrix4;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Add an `amount` to a `value`, limiting the maximum result to `max`.\n *\n * @function Phaser.Math.MaxAdd\n * @since 3.0.0\n *\n * @param {number} value - The value to add to.\n * @param {number} amount - The amount to add.\n * @param {number} max - The maximum value to return.\n *\n * @return {number} The resulting value.\n */\nvar MaxAdd = function (value, amount, max)\n{\n return Math.min(value + amount, max);\n};\n\nmodule.exports = MaxAdd;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Subtract an `amount` from `value`, limiting the minimum result to `min`.\n *\n * @function Phaser.Math.MinSub\n * @since 3.0.0\n *\n * @param {number} value - The value to subtract from.\n * @param {number} amount - The amount to subtract.\n * @param {number} min - The minimum value to return.\n *\n * @return {number} The resulting value.\n */\nvar MinSub = function (value, amount, min)\n{\n return Math.max(value - amount, min);\n};\n\nmodule.exports = MinSub;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Work out what percentage `value` is of the range between `min` and `max`.\n * If `max` isn't given then it will return the percentage of `value` to `min`.\n *\n * You can optionally specify an `upperMax` value, which is a mid-way point in the range that represents 100%, after which the % starts to go down to zero again.\n *\n * @function Phaser.Math.Percent\n * @since 3.0.0\n *\n * @param {number} value - The value to determine the percentage of.\n * @param {number} min - The minimum value.\n * @param {number} [max] - The maximum value.\n * @param {number} [upperMax] - The mid-way point in the range that represents 100%.\n *\n * @return {number} A value between 0 and 1 representing the percentage.\n */\nvar Percent = function (value, min, max, upperMax)\n{\n if (max === undefined) { max = min + 1; }\n\n var percentage = (value - min) / (max - min);\n\n if (percentage > 1)\n {\n if (upperMax !== undefined)\n {\n percentage = ((upperMax - value)) / (upperMax - max);\n\n if (percentage < 0)\n {\n percentage = 0;\n }\n }\n else\n {\n percentage = 1;\n }\n }\n else if (percentage < 0)\n {\n percentage = 0;\n }\n\n return percentage;\n};\n\nmodule.exports = Percent;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\n\nvar Class = require('../utils/Class');\nvar Vector3 = require('./Vector3');\nvar Matrix3 = require('./Matrix3');\n\nvar EPSILON = 0.000001;\n\n// Some shared 'private' arrays\nvar siNext = new Int8Array([ 1, 2, 0 ]);\nvar tmp = new Float32Array([ 0, 0, 0 ]);\n\nvar xUnitVec3 = new Vector3(1, 0, 0);\nvar yUnitVec3 = new Vector3(0, 1, 0);\n\nvar tmpvec = new Vector3();\nvar tmpMat3 = new Matrix3();\n\n/**\n * @classdesc\n * A quaternion.\n *\n * @class Quaternion\n * @memberof Phaser.Math\n * @constructor\n * @since 3.0.0\n *\n * @param {number} [x] - The x component.\n * @param {number} [y] - The y component.\n * @param {number} [z] - The z component.\n * @param {number} [w] - The w component.\n */\nvar Quaternion = new Class({\n\n initialize:\n\n function Quaternion (x, y, z, w)\n {\n /**\n * The x component of this Quaternion.\n *\n * @name Phaser.Math.Quaternion#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n\n /**\n * The y component of this Quaternion.\n *\n * @name Phaser.Math.Quaternion#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n\n /**\n * The z component of this Quaternion.\n *\n * @name Phaser.Math.Quaternion#z\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n\n /**\n * The w component of this Quaternion.\n *\n * @name Phaser.Math.Quaternion#w\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n\n if (typeof x === 'object')\n {\n this.x = x.x || 0;\n this.y = x.y || 0;\n this.z = x.z || 0;\n this.w = x.w || 0;\n }\n else\n {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n this.w = w || 0;\n }\n },\n\n /**\n * Copy the components of a given Quaternion or Vector into this Quaternion.\n *\n * @method Phaser.Math.Quaternion#copy\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} src - The Quaternion or Vector to copy the components from.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n copy: function (src)\n {\n this.x = src.x;\n this.y = src.y;\n this.z = src.z;\n this.w = src.w;\n\n return this;\n },\n\n /**\n * Set the components of this Quaternion.\n *\n * @method Phaser.Math.Quaternion#set\n * @since 3.0.0\n *\n * @param {(number|object)} [x=0] - The x component, or an object containing x, y, z, and w components.\n * @param {number} [y=0] - The y component.\n * @param {number} [z=0] - The z component.\n * @param {number} [w=0] - The w component.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n set: function (x, y, z, w)\n {\n if (typeof x === 'object')\n {\n this.x = x.x || 0;\n this.y = x.y || 0;\n this.z = x.z || 0;\n this.w = x.w || 0;\n }\n else\n {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n this.w = w || 0;\n }\n\n return this;\n },\n\n /**\n * Add a given Quaternion or Vector to this Quaternion. Addition is component-wise.\n *\n * @method Phaser.Math.Quaternion#add\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to add to this Quaternion.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n add: function (v)\n {\n this.x += v.x;\n this.y += v.y;\n this.z += v.z;\n this.w += v.w;\n\n return this;\n },\n\n /**\n * Subtract a given Quaternion or Vector from this Quaternion. Subtraction is component-wise.\n *\n * @method Phaser.Math.Quaternion#subtract\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to subtract from this Quaternion.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n subtract: function (v)\n {\n this.x -= v.x;\n this.y -= v.y;\n this.z -= v.z;\n this.w -= v.w;\n\n return this;\n },\n\n /**\n * Scale this Quaternion by the given value.\n *\n * @method Phaser.Math.Quaternion#scale\n * @since 3.0.0\n *\n * @param {number} scale - The value to scale this Quaternion by.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n scale: function (scale)\n {\n this.x *= scale;\n this.y *= scale;\n this.z *= scale;\n this.w *= scale;\n\n return this;\n },\n\n /**\n * Calculate the length of this Quaternion.\n *\n * @method Phaser.Math.Quaternion#length\n * @since 3.0.0\n *\n * @return {number} The length of this Quaternion.\n */\n length: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var w = this.w;\n\n return Math.sqrt(x * x + y * y + z * z + w * w);\n },\n\n /**\n * Calculate the length of this Quaternion squared.\n *\n * @method Phaser.Math.Quaternion#lengthSq\n * @since 3.0.0\n *\n * @return {number} The length of this Quaternion, squared.\n */\n lengthSq: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var w = this.w;\n\n return x * x + y * y + z * z + w * w;\n },\n\n /**\n * Normalize this Quaternion.\n *\n * @method Phaser.Math.Quaternion#normalize\n * @since 3.0.0\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n normalize: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var w = this.w;\n var len = x * x + y * y + z * z + w * w;\n\n if (len > 0)\n {\n len = 1 / Math.sqrt(len);\n\n this.x = x * len;\n this.y = y * len;\n this.z = z * len;\n this.w = w * len;\n }\n\n return this;\n },\n\n /**\n * Calculate the dot product of this Quaternion and the given Quaternion or Vector.\n *\n * @method Phaser.Math.Quaternion#dot\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to dot product with this Quaternion.\n *\n * @return {number} The dot product of this Quaternion and the given Quaternion or Vector.\n */\n dot: function (v)\n {\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\n },\n\n /**\n * Linearly interpolate this Quaternion towards the given Quaternion or Vector.\n *\n * @method Phaser.Math.Quaternion#lerp\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to interpolate towards.\n * @param {number} [t=0] - The percentage of interpolation.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n lerp: function (v, t)\n {\n if (t === undefined) { t = 0; }\n\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n var aw = this.w;\n\n this.x = ax + t * (v.x - ax);\n this.y = ay + t * (v.y - ay);\n this.z = az + t * (v.z - az);\n this.w = aw + t * (v.w - aw);\n\n return this;\n },\n\n /**\n * Rotates this Quaternion based on the two given vectors.\n *\n * @method Phaser.Math.Quaternion#rotationTo\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} a - The transform rotation vector.\n * @param {Phaser.Math.Vector3} b - The target rotation vector.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n rotationTo: function (a, b)\n {\n var dot = a.x * b.x + a.y * b.y + a.z * b.z;\n\n if (dot < -0.999999)\n {\n if (tmpvec.copy(xUnitVec3).cross(a).length() < EPSILON)\n {\n tmpvec.copy(yUnitVec3).cross(a);\n }\n\n tmpvec.normalize();\n\n return this.setAxisAngle(tmpvec, Math.PI);\n\n }\n else if (dot > 0.999999)\n {\n this.x = 0;\n this.y = 0;\n this.z = 0;\n this.w = 1;\n\n return this;\n }\n else\n {\n tmpvec.copy(a).cross(b);\n\n this.x = tmpvec.x;\n this.y = tmpvec.y;\n this.z = tmpvec.z;\n this.w = 1 + dot;\n\n return this.normalize();\n }\n },\n\n /**\n * Set the axes of this Quaternion.\n *\n * @method Phaser.Math.Quaternion#setAxes\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} view - The view axis.\n * @param {Phaser.Math.Vector3} right - The right axis.\n * @param {Phaser.Math.Vector3} up - The upwards axis.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n setAxes: function (view, right, up)\n {\n var m = tmpMat3.val;\n\n m[0] = right.x;\n m[3] = right.y;\n m[6] = right.z;\n\n m[1] = up.x;\n m[4] = up.y;\n m[7] = up.z;\n\n m[2] = -view.x;\n m[5] = -view.y;\n m[8] = -view.z;\n\n return this.fromMat3(tmpMat3).normalize();\n },\n\n /**\n * Reset this Matrix to an identity (default) Quaternion.\n *\n * @method Phaser.Math.Quaternion#identity\n * @since 3.0.0\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n identity: function ()\n {\n this.x = 0;\n this.y = 0;\n this.z = 0;\n this.w = 1;\n\n return this;\n },\n\n /**\n * Set the axis angle of this Quaternion.\n *\n * @method Phaser.Math.Quaternion#setAxisAngle\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} axis - The axis.\n * @param {number} rad - The angle in radians.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n setAxisAngle: function (axis, rad)\n {\n rad = rad * 0.5;\n\n var s = Math.sin(rad);\n\n this.x = s * axis.x;\n this.y = s * axis.y;\n this.z = s * axis.z;\n this.w = Math.cos(rad);\n\n return this;\n },\n\n /**\n * Multiply this Quaternion by the given Quaternion or Vector.\n *\n * @method Phaser.Math.Quaternion#multiply\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to multiply this Quaternion by.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n multiply: function (b)\n {\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n var aw = this.w;\n\n var bx = b.x;\n var by = b.y;\n var bz = b.z;\n var bw = b.w;\n\n this.x = ax * bw + aw * bx + ay * bz - az * by;\n this.y = ay * bw + aw * by + az * bx - ax * bz;\n this.z = az * bw + aw * bz + ax * by - ay * bx;\n this.w = aw * bw - ax * bx - ay * by - az * bz;\n\n return this;\n },\n\n /**\n * Smoothly linearly interpolate this Quaternion towards the given Quaternion or Vector.\n *\n * @method Phaser.Math.Quaternion#slerp\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to interpolate towards.\n * @param {number} t - The percentage of interpolation.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n slerp: function (b, t)\n {\n // benchmarks: http://jsperf.com/quaternion-slerp-implementations\n\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n var aw = this.w;\n\n var bx = b.x;\n var by = b.y;\n var bz = b.z;\n var bw = b.w;\n\n // calc cosine\n var cosom = ax * bx + ay * by + az * bz + aw * bw;\n\n // adjust signs (if necessary)\n if (cosom < 0)\n {\n cosom = -cosom;\n bx = - bx;\n by = - by;\n bz = - bz;\n bw = - bw;\n }\n\n // \"from\" and \"to\" quaternions are very close\n // ... so we can do a linear interpolation\n var scale0 = 1 - t;\n var scale1 = t;\n\n // calculate coefficients\n if ((1 - cosom) > EPSILON)\n {\n // standard case (slerp)\n var omega = Math.acos(cosom);\n var sinom = Math.sin(omega);\n\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\n scale1 = Math.sin(t * omega) / sinom;\n }\n\n // calculate final values\n this.x = scale0 * ax + scale1 * bx;\n this.y = scale0 * ay + scale1 * by;\n this.z = scale0 * az + scale1 * bz;\n this.w = scale0 * aw + scale1 * bw;\n\n return this;\n },\n\n /**\n * Invert this Quaternion.\n *\n * @method Phaser.Math.Quaternion#invert\n * @since 3.0.0\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n invert: function ()\n {\n var a0 = this.x;\n var a1 = this.y;\n var a2 = this.z;\n var a3 = this.w;\n\n var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;\n var invDot = (dot) ? 1 / dot : 0;\n\n // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0\n\n this.x = -a0 * invDot;\n this.y = -a1 * invDot;\n this.z = -a2 * invDot;\n this.w = a3 * invDot;\n\n return this;\n },\n\n /**\n * Convert this Quaternion into its conjugate.\n *\n * Sets the x, y and z components.\n *\n * @method Phaser.Math.Quaternion#conjugate\n * @since 3.0.0\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n conjugate: function ()\n {\n this.x = -this.x;\n this.y = -this.y;\n this.z = -this.z;\n\n return this;\n },\n\n /**\n * Rotate this Quaternion on the X axis.\n *\n * @method Phaser.Math.Quaternion#rotateX\n * @since 3.0.0\n *\n * @param {number} rad - The rotation angle in radians.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n rotateX: function (rad)\n {\n rad *= 0.5;\n\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n var aw = this.w;\n\n var bx = Math.sin(rad);\n var bw = Math.cos(rad);\n\n this.x = ax * bw + aw * bx;\n this.y = ay * bw + az * bx;\n this.z = az * bw - ay * bx;\n this.w = aw * bw - ax * bx;\n\n return this;\n },\n\n /**\n * Rotate this Quaternion on the Y axis.\n *\n * @method Phaser.Math.Quaternion#rotateY\n * @since 3.0.0\n *\n * @param {number} rad - The rotation angle in radians.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n rotateY: function (rad)\n {\n rad *= 0.5;\n\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n var aw = this.w;\n\n var by = Math.sin(rad);\n var bw = Math.cos(rad);\n\n this.x = ax * bw - az * by;\n this.y = ay * bw + aw * by;\n this.z = az * bw + ax * by;\n this.w = aw * bw - ay * by;\n\n return this;\n },\n\n /**\n * Rotate this Quaternion on the Z axis.\n *\n * @method Phaser.Math.Quaternion#rotateZ\n * @since 3.0.0\n *\n * @param {number} rad - The rotation angle in radians.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n rotateZ: function (rad)\n {\n rad *= 0.5;\n\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n var aw = this.w;\n\n var bz = Math.sin(rad);\n var bw = Math.cos(rad);\n\n this.x = ax * bw + ay * bz;\n this.y = ay * bw - ax * bz;\n this.z = az * bw + aw * bz;\n this.w = aw * bw - az * bz;\n\n return this;\n },\n\n /**\n * Create a unit (or rotation) Quaternion from its x, y, and z components.\n *\n * Sets the w component.\n *\n * @method Phaser.Math.Quaternion#calculateW\n * @since 3.0.0\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n calculateW: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n\n this.w = -Math.sqrt(1.0 - x * x - y * y - z * z);\n\n return this;\n },\n\n /**\n * Convert the given Matrix into this Quaternion.\n *\n * @method Phaser.Math.Quaternion#fromMat3\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix3} mat - The Matrix to convert from.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n fromMat3: function (mat)\n {\n // benchmarks:\n // http://jsperf.com/typed-array-access-speed\n // http://jsperf.com/conversion-of-3x3-matrix-to-quaternion\n\n // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\n // article \"Quaternion Calculus and Fast Animation\".\n var m = mat.val;\n var fTrace = m[0] + m[4] + m[8];\n var fRoot;\n\n if (fTrace > 0)\n {\n // |w| > 1/2, may as well choose w > 1/2\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\n\n this.w = 0.5 * fRoot;\n\n fRoot = 0.5 / fRoot; // 1/(4w)\n\n this.x = (m[7] - m[5]) * fRoot;\n this.y = (m[2] - m[6]) * fRoot;\n this.z = (m[3] - m[1]) * fRoot;\n }\n else\n {\n // |w| <= 1/2\n var i = 0;\n\n if (m[4] > m[0])\n {\n i = 1;\n }\n\n if (m[8] > m[i * 3 + i])\n {\n i = 2;\n }\n\n var j = siNext[i];\n var k = siNext[j];\n\n // This isn't quite as clean without array access\n fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1);\n tmp[i] = 0.5 * fRoot;\n\n fRoot = 0.5 / fRoot;\n\n tmp[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;\n tmp[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;\n\n this.x = tmp[0];\n this.y = tmp[1];\n this.z = tmp[2];\n this.w = (m[k * 3 + j] - m[j * 3 + k]) * fRoot;\n }\n\n return this;\n }\n\n});\n\nmodule.exports = Quaternion;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CONST = require('./const');\n\n/**\n * Convert the given angle in radians, to the equivalent angle in degrees.\n *\n * @function Phaser.Math.RadToDeg\n * @since 3.0.0\n *\n * @param {number} radians - The angle in radians to convert ot degrees.\n *\n * @return {integer} The given angle converted to degrees.\n */\nvar RadToDeg = function (radians)\n{\n return radians * CONST.RAD_TO_DEG;\n};\n\nmodule.exports = RadToDeg;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Compute a random unit vector.\n *\n * Computes random values for the given vector between -1 and 1 that can be used to represent a direction.\n *\n * Optionally accepts a scale value to scale the resulting vector by.\n *\n * @function Phaser.Math.RandomXY\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} vector - The Vector to compute random values for.\n * @param {number} [scale=1] - The scale of the random values.\n *\n * @return {Phaser.Math.Vector2} The given Vector.\n */\nvar RandomXY = function (vector, scale)\n{\n if (scale === undefined) { scale = 1; }\n\n var r = Math.random() * 2 * Math.PI;\n\n vector.x = Math.cos(r) * scale;\n vector.y = Math.sin(r) * scale;\n\n return vector;\n};\n\nmodule.exports = RandomXY;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Compute a random position vector in a spherical area, optionally defined by the given radius.\n *\n * @function Phaser.Math.RandomXYZ\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} vec3 - The Vector to compute random values for.\n * @param {number} [radius=1] - The radius.\n *\n * @return {Phaser.Math.Vector3} The given Vector.\n */\nvar RandomXYZ = function (vec3, radius)\n{\n if (radius === undefined) { radius = 1; }\n\n var r = Math.random() * 2 * Math.PI;\n var z = (Math.random() * 2) - 1;\n var zScale = Math.sqrt(1 - z * z) * radius;\n\n vec3.x = Math.cos(r) * zScale;\n vec3.y = Math.sin(r) * zScale;\n vec3.z = z * radius;\n\n return vec3;\n};\n\nmodule.exports = RandomXYZ;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Compute a random four-dimensional vector.\n *\n * @function Phaser.Math.RandomXYZW\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector4} vec4 - The Vector to compute random values for.\n * @param {number} [scale=1] - The scale of the random values.\n *\n * @return {Phaser.Math.Vector4} The given Vector.\n */\nvar RandomXYZW = function (vec4, scale)\n{\n if (scale === undefined) { scale = 1; }\n\n // TODO: Not spherical; should fix this for more uniform distribution\n vec4.x = (Math.random() * 2 - 1) * scale;\n vec4.y = (Math.random() * 2 - 1) * scale;\n vec4.z = (Math.random() * 2 - 1) * scale;\n vec4.w = (Math.random() * 2 - 1) * scale;\n\n return vec4;\n};\n\nmodule.exports = RandomXYZW;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Rotate a given point by a given angle around the origin (0, 0), in an anti-clockwise direction.\n *\n * @function Phaser.Math.Rotate\n * @since 3.0.0\n *\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\n * @param {number} angle - The angle to be rotated by in an anticlockwise direction.\n *\n * @return {Phaser.Geom.Point} The given point, rotated by the given angle in an anticlockwise direction.\n */\nvar Rotate = function (point, angle)\n{\n var x = point.x;\n var y = point.y;\n\n point.x = (x * Math.cos(angle)) - (y * Math.sin(angle));\n point.y = (x * Math.sin(angle)) + (y * Math.cos(angle));\n\n return point;\n};\n\nmodule.exports = Rotate;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Rotate a `point` around `x` and `y` to the given `angle`, at the same distance.\n *\n * In polar notation, this maps a point from (r, t) to (r, angle), vs. the origin (x, y).\n *\n * @function Phaser.Math.RotateAround\n * @since 3.0.0\n *\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\n *\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\n * @param {number} x - The horizontal coordinate to rotate around.\n * @param {number} y - The vertical coordinate to rotate around.\n * @param {number} angle - The angle of rotation in radians.\n *\n * @return {Phaser.Types.Math.Vector2Like} The given point.\n */\nvar RotateAround = function (point, x, y, angle)\n{\n var c = Math.cos(angle);\n var s = Math.sin(angle);\n\n var tx = point.x - x;\n var ty = point.y - y;\n\n point.x = tx * c - ty * s + x;\n point.y = tx * s + ty * c + y;\n\n return point;\n};\n\nmodule.exports = RotateAround;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Rotate a `point` around `x` and `y` by the given `angle` and `distance`.\n *\n * In polar notation, this maps a point from (r, t) to (distance, t + angle), vs. the origin (x, y).\n *\n * @function Phaser.Math.RotateAroundDistance\n * @since 3.0.0\n *\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\n *\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\n * @param {number} x - The horizontal coordinate to rotate around.\n * @param {number} y - The vertical coordinate to rotate around.\n * @param {number} angle - The angle of rotation in radians.\n * @param {number} distance - The distance from (x, y) to place the point at.\n *\n * @return {Phaser.Types.Math.Vector2Like} The given point.\n */\nvar RotateAroundDistance = function (point, x, y, angle, distance)\n{\n var t = angle + Math.atan2(point.y - y, point.x - x);\n\n point.x = x + (distance * Math.cos(t));\n point.y = y + (distance * Math.sin(t));\n\n return point;\n};\n\nmodule.exports = RotateAroundDistance;\n","/**\n * @author samme\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Position a `point` at the given `angle` and `distance` to (`x`, `y`).\n *\n * @function Phaser.Math.RotateTo\n * @since 3.24.0\n *\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\n *\n * @param {Phaser.Types.Math.Vector2Like} point - The point to be positioned.\n * @param {number} x - The horizontal coordinate to position from.\n * @param {number} y - The vertical coordinate to position from.\n * @param {number} angle - The angle of rotation in radians.\n * @param {number} distance - The distance from (x, y) to place the point at.\n *\n * @return {Phaser.Types.Math.Vector2Like} The given point.\n */\nvar RotateTo = function (point, x, y, angle, distance)\n{\n point.x = x + (distance * Math.cos(angle));\n point.y = y + (distance * Math.sin(angle));\n\n return point;\n};\n\nmodule.exports = RotateTo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Vector3 = require('../math/Vector3');\nvar Matrix4 = require('../math/Matrix4');\nvar Quaternion = require('../math/Quaternion');\n\nvar tmpMat4 = new Matrix4();\nvar tmpQuat = new Quaternion();\nvar tmpVec3 = new Vector3();\n\n/**\n * Rotates a vector in place by axis angle.\n *\n * This is the same as transforming a point by an\n * axis-angle quaternion, but it has higher precision.\n *\n * @function Phaser.Math.RotateVec3\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} vec - The vector to be rotated.\n * @param {Phaser.Math.Vector3} axis - The axis to rotate around.\n * @param {number} radians - The angle of rotation in radians.\n *\n * @return {Phaser.Math.Vector3} The given vector.\n */\nvar RotateVec3 = function (vec, axis, radians)\n{\n // Set the quaternion to our axis angle\n tmpQuat.setAxisAngle(axis, radians);\n\n // Create a rotation matrix from the axis angle\n tmpMat4.fromRotationTranslation(tmpQuat, tmpVec3.set(0, 0, 0));\n\n // Multiply our vector by the rotation matrix\n return vec.transformMat4(tmpMat4);\n};\n\nmodule.exports = RotateVec3;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Round a given number so it is further away from zero. That is, positive numbers are rounded up, and negative numbers are rounded down.\n *\n * @function Phaser.Math.RoundAwayFromZero\n * @since 3.0.0\n *\n * @param {number} value - The number to round.\n *\n * @return {number} The rounded number, rounded away from zero.\n */\nvar RoundAwayFromZero = function (value)\n{\n // \"Opposite\" of truncate.\n return (value > 0) ? Math.ceil(value) : Math.floor(value);\n};\n\nmodule.exports = RoundAwayFromZero;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Round a value to the given precision.\n * \n * For example:\n * \n * ```javascript\n * RoundTo(123.456, 0) = 123\n * RoundTo(123.456, 1) = 120\n * RoundTo(123.456, 2) = 100\n * ```\n * \n * To round the decimal, i.e. to round to precision, pass in a negative `place`:\n * \n * ```javascript\n * RoundTo(123.456789, 0) = 123\n * RoundTo(123.456789, -1) = 123.5\n * RoundTo(123.456789, -2) = 123.46\n * RoundTo(123.456789, -3) = 123.457\n * ```\n *\n * @function Phaser.Math.RoundTo\n * @since 3.0.0\n *\n * @param {number} value - The value to round.\n * @param {integer} [place=0] - The place to round to. Positive to round the units, negative to round the decimal.\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\n *\n * @return {number} The rounded value.\n */\nvar RoundTo = function (value, place, base)\n{\n if (place === undefined) { place = 0; }\n if (base === undefined) { base = 10; }\n\n var p = Math.pow(base, -place);\n\n return Math.round(value * p) / p;\n};\n\nmodule.exports = RoundTo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Generate a series of sine and cosine values.\n *\n * @function Phaser.Math.SinCosTableGenerator\n * @since 3.0.0\n *\n * @param {number} length - The number of values to generate.\n * @param {number} [sinAmp=1] - The sine value amplitude.\n * @param {number} [cosAmp=1] - The cosine value amplitude.\n * @param {number} [frequency=1] - The frequency of the values.\n *\n * @return {Phaser.Types.Math.SinCosTable} The generated values.\n */\nvar SinCosTableGenerator = function (length, sinAmp, cosAmp, frequency)\n{\n if (sinAmp === undefined) { sinAmp = 1; }\n if (cosAmp === undefined) { cosAmp = 1; }\n if (frequency === undefined) { frequency = 1; }\n\n frequency *= Math.PI / length;\n\n var cos = [];\n var sin = [];\n\n for (var c = 0; c < length; c++)\n {\n cosAmp -= sinAmp * frequency;\n sinAmp += cosAmp * frequency;\n\n cos[c] = cosAmp;\n sin[c] = sinAmp;\n }\n\n return {\n sin: sin,\n cos: cos,\n length: length\n };\n};\n\nmodule.exports = SinCosTableGenerator;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate a smooth interpolation percentage of `x` between `min` and `max`.\n *\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\n * between 0 and 1 otherwise.\n *\n * @function Phaser.Math.SmoothStep\n * @since 3.0.0\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\n *\n * @param {number} x - The input value.\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\n *\n * @return {number} The percentage of interpolation, between 0 and 1.\n */\nvar SmoothStep = function (x, min, max)\n{\n if (x <= min)\n {\n return 0;\n }\n\n if (x >= max)\n {\n return 1;\n }\n\n x = (x - min) / (max - min);\n\n return x * x * (3 - 2 * x);\n};\n\nmodule.exports = SmoothStep;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate a smoother interpolation percentage of `x` between `min` and `max`.\n *\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\n * between 0 and 1 otherwise.\n *\n * Produces an even smoother interpolation than {@link Phaser.Math.SmoothStep}.\n *\n * @function Phaser.Math.SmootherStep\n * @since 3.0.0\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\n *\n * @param {number} x - The input value.\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\n *\n * @return {number} The percentage of interpolation, between 0 and 1.\n */\nvar SmootherStep = function (x, min, max)\n{\n x = Math.max(0, Math.min(1, (x - min) / (max - min)));\n\n return x * x * x * (x * (x * 6 - 15) + 10);\n};\n\nmodule.exports = SmootherStep;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Vector2 = require('./Vector2');\n\n/**\n * Returns a Vector2 containing the x and y position of the given index in a `width` x `height` sized grid.\n * \n * For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2.\n * \n * If the given index is out of range an empty Vector2 is returned.\n *\n * @function Phaser.Math.ToXY\n * @since 3.19.0\n *\n * @param {integer} index - The position within the grid to get the x/y value for.\n * @param {integer} width - The width of the grid.\n * @param {integer} height - The height of the grid.\n * @param {Phaser.Math.Vector2} [out] - An optional Vector2 to store the result in. If not given, a new Vector2 instance will be created.\n *\n * @return {Phaser.Math.Vector2} A Vector2 where the x and y properties contain the given grid index.\n */\nvar ToXY = function (index, width, height, out)\n{\n if (out === undefined) { out = new Vector2(); }\n\n var x = 0;\n var y = 0;\n var total = width * height;\n\n if (index > 0 && index <= total)\n {\n if (index > width - 1)\n {\n y = Math.floor(index / width);\n x = index - (y * width);\n }\n else\n {\n x = index;\n }\n\n out.set(x, y);\n }\n\n return out;\n};\n\nmodule.exports = ToXY;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Vector2 = require('./Vector2');\n\n/**\n * Takes the `x` and `y` coordinates and transforms them into the same space as\n * defined by the position, rotation and scale values.\n *\n * @function Phaser.Math.TransformXY\n * @since 3.0.0\n *\n * @param {number} x - The x coordinate to be transformed.\n * @param {number} y - The y coordinate to be transformed.\n * @param {number} positionX - Horizontal position of the transform point.\n * @param {number} positionY - Vertical position of the transform point.\n * @param {number} rotation - Rotation of the transform point, in radians.\n * @param {number} scaleX - Horizontal scale of the transform point.\n * @param {number} scaleY - Vertical scale of the transform point.\n * @param {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} [output] - The output vector, point or object for the translated coordinates.\n *\n * @return {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} The translated point.\n */\nvar TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output)\n{\n if (output === undefined) { output = new Vector2(); }\n\n var radianSin = Math.sin(rotation);\n var radianCos = Math.cos(rotation);\n\n // Rotate and Scale\n var a = radianCos * scaleX;\n var b = radianSin * scaleX;\n var c = -radianSin * scaleY;\n var d = radianCos * scaleY;\n\n // Invert\n var id = 1 / ((a * d) + (c * -b));\n\n output.x = (d * id * x) + (-c * id * y) + (((positionY * c) - (positionX * d)) * id);\n output.y = (a * id * y) + (-b * id * x) + (((-positionY * a) + (positionX * b)) * id);\n\n return output;\n};\n\nmodule.exports = TransformXY;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\n\nvar Class = require('../utils/Class');\nvar FuzzyEqual = require('../math/fuzzy/Equal');\n\n/**\n * @classdesc\n * A representation of a vector in 2D space.\n *\n * A two-component vector.\n *\n * @class Vector2\n * @memberof Phaser.Math\n * @constructor\n * @since 3.0.0\n *\n * @param {number|Phaser.Types.Math.Vector2Like} [x] - The x component, or an object with `x` and `y` properties.\n * @param {number} [y] - The y component.\n */\nvar Vector2 = new Class({\n\n initialize:\n\n function Vector2 (x, y)\n {\n /**\n * The x component of this Vector.\n *\n * @name Phaser.Math.Vector2#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.x = 0;\n\n /**\n * The y component of this Vector.\n *\n * @name Phaser.Math.Vector2#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.y = 0;\n\n if (typeof x === 'object')\n {\n this.x = x.x || 0;\n this.y = x.y || 0;\n }\n else\n {\n if (y === undefined) { y = x; }\n\n this.x = x || 0;\n this.y = y || 0;\n }\n },\n\n /**\n * Make a clone of this Vector2.\n *\n * @method Phaser.Math.Vector2#clone\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector2} A clone of this Vector2.\n */\n clone: function ()\n {\n return new Vector2(this.x, this.y);\n },\n\n /**\n * Copy the components of a given Vector into this Vector.\n *\n * @method Phaser.Math.Vector2#copy\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector to copy the components from.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n copy: function (src)\n {\n this.x = src.x || 0;\n this.y = src.y || 0;\n\n return this;\n },\n\n /**\n * Set the component values of this Vector from a given Vector2Like object.\n *\n * @method Phaser.Math.Vector2#setFromObject\n * @since 3.0.0\n *\n * @param {Phaser.Types.Math.Vector2Like} obj - The object containing the component values to set for this Vector.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n setFromObject: function (obj)\n {\n this.x = obj.x || 0;\n this.y = obj.y || 0;\n\n return this;\n },\n\n /**\n * Set the `x` and `y` components of the this Vector to the given `x` and `y` values.\n *\n * @method Phaser.Math.Vector2#set\n * @since 3.0.0\n *\n * @param {number} x - The x value to set for this Vector.\n * @param {number} [y=x] - The y value to set for this Vector.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n set: function (x, y)\n {\n if (y === undefined) { y = x; }\n\n this.x = x;\n this.y = y;\n\n return this;\n },\n\n /**\n * This method is an alias for `Vector2.set`.\n *\n * @method Phaser.Math.Vector2#setTo\n * @since 3.4.0\n *\n * @param {number} x - The x value to set for this Vector.\n * @param {number} [y=x] - The y value to set for this Vector.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n setTo: function (x, y)\n {\n return this.set(x, y);\n },\n\n /**\n * Sets the `x` and `y` values of this object from a given polar coordinate.\n *\n * @method Phaser.Math.Vector2#setToPolar\n * @since 3.0.0\n *\n * @param {number} azimuth - The angular coordinate, in radians.\n * @param {number} [radius=1] - The radial coordinate (length).\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n setToPolar: function (azimuth, radius)\n {\n if (radius == null) { radius = 1; }\n\n this.x = Math.cos(azimuth) * radius;\n this.y = Math.sin(azimuth) * radius;\n\n return this;\n },\n\n /**\n * Check whether this Vector is equal to a given Vector.\n *\n * Performs a strict equality check against each Vector's components.\n *\n * @method Phaser.Math.Vector2#equals\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector.\n *\n * @return {boolean} Whether the given Vector is equal to this Vector.\n */\n equals: function (v)\n {\n return ((this.x === v.x) && (this.y === v.y));\n },\n\n /**\n * Check whether this Vector is approximately equal to a given Vector.\n *\n * @method Phaser.Math.Vector2#fuzzyEquals\n * @since 3.23.0\n *\n * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector.\n * @param {number} [epsilon=0.0001] - The tolerance value.\n *\n * @return {boolean} Whether both absolute differences of the x and y components are smaller than `epsilon`.\n */\n fuzzyEquals: function (v, epsilon)\n {\n return (FuzzyEqual(this.x, v.x, epsilon) && FuzzyEqual(this.y, v.y, epsilon));\n },\n\n /**\n * Calculate the angle between this Vector and the positive x-axis, in radians.\n *\n * @method Phaser.Math.Vector2#angle\n * @since 3.0.0\n *\n * @return {number} The angle between this Vector, and the positive x-axis, given in radians.\n */\n angle: function ()\n {\n // computes the angle in radians with respect to the positive x-axis\n\n var angle = Math.atan2(this.y, this.x);\n\n if (angle < 0)\n {\n angle += 2 * Math.PI;\n }\n\n return angle;\n },\n\n /**\n * Set the angle of this Vector.\n *\n * @method Phaser.Math.Vector2#setAngle\n * @since 3.23.0\n *\n * @param {number} angle - The angle, in radians.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n setAngle: function (angle)\n {\n return this.setToPolar(angle, this.length());\n },\n\n /**\n * Add a given Vector to this Vector. Addition is component-wise.\n *\n * @method Phaser.Math.Vector2#add\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector to add to this Vector.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n add: function (src)\n {\n this.x += src.x;\n this.y += src.y;\n\n return this;\n },\n\n /**\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\n *\n * @method Phaser.Math.Vector2#subtract\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector to subtract from this Vector.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n subtract: function (src)\n {\n this.x -= src.x;\n this.y -= src.y;\n\n return this;\n },\n\n /**\n * Perform a component-wise multiplication between this Vector and the given Vector.\n *\n * Multiplies this Vector by the given Vector.\n *\n * @method Phaser.Math.Vector2#multiply\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector to multiply this Vector by.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n multiply: function (src)\n {\n this.x *= src.x;\n this.y *= src.y;\n\n return this;\n },\n\n /**\n * Scale this Vector by the given value.\n *\n * @method Phaser.Math.Vector2#scale\n * @since 3.0.0\n *\n * @param {number} value - The value to scale this Vector by.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n scale: function (value)\n {\n if (isFinite(value))\n {\n this.x *= value;\n this.y *= value;\n }\n else\n {\n this.x = 0;\n this.y = 0;\n }\n\n return this;\n },\n\n /**\n * Perform a component-wise division between this Vector and the given Vector.\n *\n * Divides this Vector by the given Vector.\n *\n * @method Phaser.Math.Vector2#divide\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector to divide this Vector by.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n divide: function (src)\n {\n this.x /= src.x;\n this.y /= src.y;\n\n return this;\n },\n\n /**\n * Negate the `x` and `y` components of this Vector.\n *\n * @method Phaser.Math.Vector2#negate\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n negate: function ()\n {\n this.x = -this.x;\n this.y = -this.y;\n\n return this;\n },\n\n /**\n * Calculate the distance between this Vector and the given Vector.\n *\n * @method Phaser.Math.Vector2#distance\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector to calculate the distance to.\n *\n * @return {number} The distance from this Vector to the given Vector.\n */\n distance: function (src)\n {\n var dx = src.x - this.x;\n var dy = src.y - this.y;\n\n return Math.sqrt(dx * dx + dy * dy);\n },\n\n /**\n * Calculate the distance between this Vector and the given Vector, squared.\n *\n * @method Phaser.Math.Vector2#distanceSq\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector to calculate the distance to.\n *\n * @return {number} The distance from this Vector to the given Vector, squared.\n */\n distanceSq: function (src)\n {\n var dx = src.x - this.x;\n var dy = src.y - this.y;\n\n return dx * dx + dy * dy;\n },\n\n /**\n * Calculate the length (or magnitude) of this Vector.\n *\n * @method Phaser.Math.Vector2#length\n * @since 3.0.0\n *\n * @return {number} The length of this Vector.\n */\n length: function ()\n {\n var x = this.x;\n var y = this.y;\n\n return Math.sqrt(x * x + y * y);\n },\n\n /**\n * Set the length (or magnitude) of this Vector.\n *\n * @method Phaser.Math.Vector2#setLength\n * @since 3.23.0\n *\n * @param {number} length\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n setLength: function (length)\n {\n return this.normalize().scale(length);\n },\n\n /**\n * Calculate the length of this Vector squared.\n *\n * @method Phaser.Math.Vector2#lengthSq\n * @since 3.0.0\n *\n * @return {number} The length of this Vector, squared.\n */\n lengthSq: function ()\n {\n var x = this.x;\n var y = this.y;\n\n return x * x + y * y;\n },\n\n /**\n * Normalize this Vector.\n *\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\n *\n * @method Phaser.Math.Vector2#normalize\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n normalize: function ()\n {\n var x = this.x;\n var y = this.y;\n var len = x * x + y * y;\n\n if (len > 0)\n {\n len = 1 / Math.sqrt(len);\n\n this.x = x * len;\n this.y = y * len;\n }\n\n return this;\n },\n\n /**\n * Rotate this Vector to its perpendicular, in the positive direction.\n *\n * @method Phaser.Math.Vector2#normalizeRightHand\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n normalizeRightHand: function ()\n {\n var x = this.x;\n\n this.x = this.y * -1;\n this.y = x;\n\n return this;\n },\n\n /**\n * Rotate this Vector to its perpendicular, in the negative direction.\n *\n * @method Phaser.Math.Vector2#normalizeLeftHand\n * @since 3.23.0\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n normalizeLeftHand: function ()\n {\n var x = this.x;\n\n this.x = this.y;\n this.y = x * -1;\n\n return this;\n },\n\n /**\n * Calculate the dot product of this Vector and the given Vector.\n *\n * @method Phaser.Math.Vector2#dot\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector2 to dot product with this Vector2.\n *\n * @return {number} The dot product of this Vector and the given Vector.\n */\n dot: function (src)\n {\n return this.x * src.x + this.y * src.y;\n },\n\n /**\n * Calculate the cross product of this Vector and the given Vector.\n *\n * @method Phaser.Math.Vector2#cross\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector2 to cross with this Vector2.\n *\n * @return {number} The cross product of this Vector and the given Vector.\n */\n cross: function (src)\n {\n return this.x * src.y - this.y * src.x;\n },\n\n /**\n * Linearly interpolate between this Vector and the given Vector.\n *\n * Interpolates this Vector towards the given Vector.\n *\n * @method Phaser.Math.Vector2#lerp\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector2 to interpolate towards.\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n lerp: function (src, t)\n {\n if (t === undefined) { t = 0; }\n\n var ax = this.x;\n var ay = this.y;\n\n this.x = ax + t * (src.x - ax);\n this.y = ay + t * (src.y - ay);\n\n return this;\n },\n\n /**\n * Transform this Vector with the given Matrix.\n *\n * @method Phaser.Math.Vector2#transformMat3\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector2 with.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n transformMat3: function (mat)\n {\n var x = this.x;\n var y = this.y;\n var m = mat.val;\n\n this.x = m[0] * x + m[3] * y + m[6];\n this.y = m[1] * x + m[4] * y + m[7];\n\n return this;\n },\n\n /**\n * Transform this Vector with the given Matrix.\n *\n * @method Phaser.Math.Vector2#transformMat4\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector2 with.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n transformMat4: function (mat)\n {\n var x = this.x;\n var y = this.y;\n var m = mat.val;\n\n this.x = m[0] * x + m[4] * y + m[12];\n this.y = m[1] * x + m[5] * y + m[13];\n\n return this;\n },\n\n /**\n * Make this Vector the zero vector (0, 0).\n *\n * @method Phaser.Math.Vector2#reset\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n reset: function ()\n {\n this.x = 0;\n this.y = 0;\n\n return this;\n },\n\n /**\n * Limit the length (or magnitude) of this Vector.\n *\n * @method Phaser.Math.Vector2#limit\n * @since 3.23.0\n *\n * @param {number} max - The maximum length.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n limit: function (max)\n {\n var len = this.length();\n\n if (len && len > max)\n {\n this.scale(max / len);\n }\n\n return this;\n },\n\n /**\n * Reflect this Vector off a line defined by a normal.\n *\n * @method Phaser.Math.Vector2#reflect\n * @since 3.23.0\n *\n * @param {Phaser.Math.Vector2} normal - A vector perpendicular to the line.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n reflect: function (normal)\n {\n normal = normal.clone().normalize();\n\n return this.subtract(normal.scale(2 * this.dot(normal)));\n },\n\n /**\n * Reflect this Vector across another.\n *\n * @method Phaser.Math.Vector2#mirror\n * @since 3.23.0\n *\n * @param {Phaser.Math.Vector2} axis - A vector to reflect across.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n mirror: function (axis)\n {\n return this.reflect(axis).negate();\n },\n\n /**\n * Rotate this Vector by an angle amount.\n *\n * @method Phaser.Math.Vector2#rotate\n * @since 3.23.0\n *\n * @param {number} delta - The angle to rotate by, in radians.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n rotate: function (delta)\n {\n var cos = Math.cos(delta);\n var sin = Math.sin(delta);\n\n return this.set(cos * this.x - sin * this.y, sin * this.x + cos * this.y);\n }\n\n});\n\n/**\n * A static zero Vector2 for use by reference.\n *\n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector2.ZERO\n * @type {Phaser.Math.Vector2}\n * @since 3.1.0\n */\nVector2.ZERO = new Vector2();\n\n/**\n * A static right Vector2 for use by reference.\n *\n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector2.RIGHT\n * @type {Phaser.Math.Vector2}\n * @since 3.16.0\n */\nVector2.RIGHT = new Vector2(1, 0);\n\n/**\n * A static left Vector2 for use by reference.\n *\n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector2.LEFT\n * @type {Phaser.Math.Vector2}\n * @since 3.16.0\n */\nVector2.LEFT = new Vector2(-1, 0);\n\n/**\n * A static up Vector2 for use by reference.\n *\n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector2.UP\n * @type {Phaser.Math.Vector2}\n * @since 3.16.0\n */\nVector2.UP = new Vector2(0, -1);\n\n/**\n * A static down Vector2 for use by reference.\n *\n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector2.DOWN\n * @type {Phaser.Math.Vector2}\n * @since 3.16.0\n */\nVector2.DOWN = new Vector2(0, 1);\n\n/**\n * A static one Vector2 for use by reference.\n *\n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector2.ONE\n * @type {Phaser.Math.Vector2}\n * @since 3.16.0\n */\nVector2.ONE = new Vector2(1, 1);\n\nmodule.exports = Vector2;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\n\nvar Class = require('../utils/Class');\n\n/**\n * @classdesc\n * A representation of a vector in 3D space.\n *\n * A three-component vector.\n *\n * @class Vector3\n * @memberof Phaser.Math\n * @constructor\n * @since 3.0.0\n *\n * @param {number} [x] - The x component.\n * @param {number} [y] - The y component.\n * @param {number} [z] - The z component.\n */\nvar Vector3 = new Class({\n\n initialize:\n\n function Vector3 (x, y, z)\n {\n /**\n * The x component of this Vector.\n *\n * @name Phaser.Math.Vector3#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.x = 0;\n\n /**\n * The y component of this Vector.\n *\n * @name Phaser.Math.Vector3#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.y = 0;\n\n /**\n * The z component of this Vector.\n *\n * @name Phaser.Math.Vector3#z\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.z = 0;\n\n if (typeof x === 'object')\n {\n this.x = x.x || 0;\n this.y = x.y || 0;\n this.z = x.z || 0;\n }\n else\n {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n }\n },\n\n /**\n * Set this Vector to point up.\n *\n * Sets the y component of the vector to 1, and the others to 0.\n *\n * @method Phaser.Math.Vector3#up\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n up: function ()\n {\n this.x = 0;\n this.y = 1;\n this.z = 0;\n\n return this;\n },\n\n /**\n * Make a clone of this Vector3.\n *\n * @method Phaser.Math.Vector3#clone\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector3} A new Vector3 object containing this Vectors values.\n */\n clone: function ()\n {\n return new Vector3(this.x, this.y, this.z);\n },\n\n /**\n * Calculate the cross (vector) product of two given Vectors.\n *\n * @method Phaser.Math.Vector3#crossVectors\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} a - The first Vector to multiply.\n * @param {Phaser.Math.Vector3} b - The second Vector to multiply.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n crossVectors: function (a, b)\n {\n var ax = a.x;\n var ay = a.y;\n var az = a.z;\n var bx = b.x;\n var by = b.y;\n var bz = b.z;\n\n this.x = ay * bz - az * by;\n this.y = az * bx - ax * bz;\n this.z = ax * by - ay * bx;\n\n return this;\n },\n\n /**\n * Check whether this Vector is equal to a given Vector.\n *\n * Performs a strict equality check against each Vector's components.\n *\n * @method Phaser.Math.Vector3#equals\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} v - The Vector3 to compare against.\n *\n * @return {boolean} True if the two vectors strictly match, otherwise false.\n */\n equals: function (v)\n {\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z));\n },\n\n /**\n * Copy the components of a given Vector into this Vector.\n *\n * @method Phaser.Math.Vector3#copy\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} src - The Vector to copy the components from.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n copy: function (src)\n {\n this.x = src.x;\n this.y = src.y;\n this.z = src.z || 0;\n\n return this;\n },\n\n /**\n * Set the `x`, `y`, and `z` components of this Vector to the given `x`, `y`, and `z` values.\n *\n * @method Phaser.Math.Vector3#set\n * @since 3.0.0\n *\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y and z components.\n * @param {number} [y] - The y value to set for this Vector.\n * @param {number} [z] - The z value to set for this Vector.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n set: function (x, y, z)\n {\n if (typeof x === 'object')\n {\n this.x = x.x || 0;\n this.y = x.y || 0;\n this.z = x.z || 0;\n }\n else\n {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n }\n\n return this;\n },\n\n /**\n * Add a given Vector to this Vector. Addition is component-wise.\n *\n * @method Phaser.Math.Vector3#add\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n add: function (v)\n {\n this.x += v.x;\n this.y += v.y;\n this.z += v.z || 0;\n\n return this;\n },\n\n /**\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\n *\n * @method Phaser.Math.Vector3#subtract\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to subtract from this Vector.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n subtract: function (v)\n {\n this.x -= v.x;\n this.y -= v.y;\n this.z -= v.z || 0;\n\n return this;\n },\n\n /**\n * Perform a component-wise multiplication between this Vector and the given Vector.\n *\n * Multiplies this Vector by the given Vector.\n *\n * @method Phaser.Math.Vector3#multiply\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to multiply this Vector by.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n multiply: function (v)\n {\n this.x *= v.x;\n this.y *= v.y;\n this.z *= v.z || 1;\n\n return this;\n },\n\n /**\n * Scale this Vector by the given value.\n *\n * @method Phaser.Math.Vector3#scale\n * @since 3.0.0\n *\n * @param {number} scale - The value to scale this Vector by.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n scale: function (scale)\n {\n if (isFinite(scale))\n {\n this.x *= scale;\n this.y *= scale;\n this.z *= scale;\n }\n else\n {\n this.x = 0;\n this.y = 0;\n this.z = 0;\n }\n\n return this;\n },\n\n /**\n * Perform a component-wise division between this Vector and the given Vector.\n *\n * Divides this Vector by the given Vector.\n *\n * @method Phaser.Math.Vector3#divide\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to divide this Vector by.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n divide: function (v)\n {\n this.x /= v.x;\n this.y /= v.y;\n this.z /= v.z || 1;\n\n return this;\n },\n\n /**\n * Negate the `x`, `y` and `z` components of this Vector.\n *\n * @method Phaser.Math.Vector3#negate\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n negate: function ()\n {\n this.x = -this.x;\n this.y = -this.y;\n this.z = -this.z;\n\n return this;\n },\n\n /**\n * Calculate the distance between this Vector and the given Vector.\n *\n * @method Phaser.Math.Vector3#distance\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\n *\n * @return {number} The distance from this Vector to the given Vector.\n */\n distance: function (v)\n {\n var dx = v.x - this.x;\n var dy = v.y - this.y;\n var dz = v.z - this.z || 0;\n\n return Math.sqrt(dx * dx + dy * dy + dz * dz);\n },\n\n /**\n * Calculate the distance between this Vector and the given Vector, squared.\n *\n * @method Phaser.Math.Vector3#distanceSq\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\n *\n * @return {number} The distance from this Vector to the given Vector, squared.\n */\n distanceSq: function (v)\n {\n var dx = v.x - this.x;\n var dy = v.y - this.y;\n var dz = v.z - this.z || 0;\n\n return dx * dx + dy * dy + dz * dz;\n },\n\n /**\n * Calculate the length (or magnitude) of this Vector.\n *\n * @method Phaser.Math.Vector3#length\n * @since 3.0.0\n *\n * @return {number} The length of this Vector.\n */\n length: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n\n return Math.sqrt(x * x + y * y + z * z);\n },\n\n /**\n * Calculate the length of this Vector squared.\n *\n * @method Phaser.Math.Vector3#lengthSq\n * @since 3.0.0\n *\n * @return {number} The length of this Vector, squared.\n */\n lengthSq: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n\n return x * x + y * y + z * z;\n },\n\n /**\n * Normalize this Vector.\n *\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\n *\n * @method Phaser.Math.Vector3#normalize\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n normalize: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var len = x * x + y * y + z * z;\n\n if (len > 0)\n {\n len = 1 / Math.sqrt(len);\n\n this.x = x * len;\n this.y = y * len;\n this.z = z * len;\n }\n\n return this;\n },\n\n /**\n * Calculate the dot product of this Vector and the given Vector.\n *\n * @method Phaser.Math.Vector3#dot\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} v - The Vector3 to dot product with this Vector3.\n *\n * @return {number} The dot product of this Vector and `v`.\n */\n dot: function (v)\n {\n return this.x * v.x + this.y * v.y + this.z * v.z;\n },\n\n /**\n * Calculate the cross (vector) product of this Vector (which will be modified) and the given Vector.\n *\n * @method Phaser.Math.Vector3#cross\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} v - The Vector to cross product with.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n cross: function (v)\n {\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n var bx = v.x;\n var by = v.y;\n var bz = v.z;\n\n this.x = ay * bz - az * by;\n this.y = az * bx - ax * bz;\n this.z = ax * by - ay * bx;\n\n return this;\n },\n\n /**\n * Linearly interpolate between this Vector and the given Vector.\n *\n * Interpolates this Vector towards the given Vector.\n *\n * @method Phaser.Math.Vector3#lerp\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} v - The Vector3 to interpolate towards.\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n lerp: function (v, t)\n {\n if (t === undefined) { t = 0; }\n\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n\n this.x = ax + t * (v.x - ax);\n this.y = ay + t * (v.y - ay);\n this.z = az + t * (v.z - az);\n\n return this;\n },\n\n /**\n * Transform this Vector with the given Matrix.\n *\n * @method Phaser.Math.Vector3#transformMat3\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector3 with.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n transformMat3: function (mat)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var m = mat.val;\n\n this.x = x * m[0] + y * m[3] + z * m[6];\n this.y = x * m[1] + y * m[4] + z * m[7];\n this.z = x * m[2] + y * m[5] + z * m[8];\n\n return this;\n },\n\n /**\n * Transform this Vector with the given Matrix.\n *\n * @method Phaser.Math.Vector3#transformMat4\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n transformMat4: function (mat)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var m = mat.val;\n\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12];\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13];\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14];\n\n return this;\n },\n\n /**\n * Transforms the coordinates of this Vector3 with the given Matrix4.\n *\n * @method Phaser.Math.Vector3#transformCoordinates\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n transformCoordinates: function (mat)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var m = mat.val;\n\n var tx = (x * m[0]) + (y * m[4]) + (z * m[8]) + m[12];\n var ty = (x * m[1]) + (y * m[5]) + (z * m[9]) + m[13];\n var tz = (x * m[2]) + (y * m[6]) + (z * m[10]) + m[14];\n var tw = (x * m[3]) + (y * m[7]) + (z * m[11]) + m[15];\n\n this.x = tx / tw;\n this.y = ty / tw;\n this.z = tz / tw;\n\n return this;\n },\n\n /**\n * Transform this Vector with the given Quaternion.\n *\n * @method Phaser.Math.Vector3#transformQuat\n * @since 3.0.0\n *\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n transformQuat: function (q)\n {\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var qx = q.x;\n var qy = q.y;\n var qz = q.z;\n var qw = q.w;\n\n // calculate quat * vec\n var ix = qw * x + qy * z - qz * y;\n var iy = qw * y + qz * x - qx * z;\n var iz = qw * z + qx * y - qy * x;\n var iw = -qx * x - qy * y - qz * z;\n\n // calculate result * inverse quat\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n\n return this;\n },\n\n /**\n * Multiplies this Vector3 by the specified matrix, applying a W divide. This is useful for projection,\n * e.g. unprojecting a 2D point into 3D space.\n *\n * @method Phaser.Math.Vector3#project\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to multiply this Vector3 with.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n project: function (mat)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var m = mat.val;\n\n var a00 = m[0];\n var a01 = m[1];\n var a02 = m[2];\n var a03 = m[3];\n var a10 = m[4];\n var a11 = m[5];\n var a12 = m[6];\n var a13 = m[7];\n var a20 = m[8];\n var a21 = m[9];\n var a22 = m[10];\n var a23 = m[11];\n var a30 = m[12];\n var a31 = m[13];\n var a32 = m[14];\n var a33 = m[15];\n\n var lw = 1 / (x * a03 + y * a13 + z * a23 + a33);\n\n this.x = (x * a00 + y * a10 + z * a20 + a30) * lw;\n this.y = (x * a01 + y * a11 + z * a21 + a31) * lw;\n this.z = (x * a02 + y * a12 + z * a22 + a32) * lw;\n\n return this;\n },\n\n /**\n * Unproject this point from 2D space to 3D space.\n * The point should have its x and y properties set to\n * 2D screen space, and the z either at 0 (near plane)\n * or 1 (far plane). The provided matrix is assumed to already\n * be combined, i.e. projection * view * model.\n *\n * After this operation, this vector's (x, y, z) components will\n * represent the unprojected 3D coordinate.\n *\n * @method Phaser.Math.Vector3#unproject\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector4} viewport - Screen x, y, width and height in pixels.\n * @param {Phaser.Math.Matrix4} invProjectionView - Combined projection and view matrix.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n unproject: function (viewport, invProjectionView)\n {\n var viewX = viewport.x;\n var viewY = viewport.y;\n var viewWidth = viewport.z;\n var viewHeight = viewport.w;\n\n var x = this.x - viewX;\n var y = (viewHeight - this.y - 1) - viewY;\n var z = this.z;\n\n this.x = (2 * x) / viewWidth - 1;\n this.y = (2 * y) / viewHeight - 1;\n this.z = 2 * z - 1;\n\n return this.project(invProjectionView);\n },\n\n /**\n * Make this Vector the zero vector (0, 0, 0).\n *\n * @method Phaser.Math.Vector3#reset\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n reset: function ()\n {\n this.x = 0;\n this.y = 0;\n this.z = 0;\n\n return this;\n }\n\n});\n\n/**\n * A static zero Vector3 for use by reference.\n * \n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector3.ZERO\n * @type {Phaser.Math.Vector3}\n * @since 3.16.0\n */\nVector3.ZERO = new Vector3();\n\n/**\n * A static right Vector3 for use by reference.\n * \n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector3.RIGHT\n * @type {Phaser.Math.Vector3}\n * @since 3.16.0\n */\nVector3.RIGHT = new Vector3(1, 0, 0);\n\n/**\n * A static left Vector3 for use by reference.\n * \n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector3.LEFT\n * @type {Phaser.Math.Vector3}\n * @since 3.16.0\n */\nVector3.LEFT = new Vector3(-1, 0, 0);\n\n/**\n * A static up Vector3 for use by reference.\n * \n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector3.UP\n * @type {Phaser.Math.Vector3}\n * @since 3.16.0\n */\nVector3.UP = new Vector3(0, -1, 0);\n\n/**\n * A static down Vector3 for use by reference.\n * \n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector3.DOWN\n * @type {Phaser.Math.Vector3}\n * @since 3.16.0\n */\nVector3.DOWN = new Vector3(0, 1, 0);\n\n/**\n * A static forward Vector3 for use by reference.\n * \n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector3.FORWARD\n * @type {Phaser.Math.Vector3}\n * @since 3.16.0\n */\nVector3.FORWARD = new Vector3(0, 0, 1);\n\n/**\n * A static back Vector3 for use by reference.\n * \n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector3.BACK\n * @type {Phaser.Math.Vector3}\n * @since 3.16.0\n */\nVector3.BACK = new Vector3(0, 0, -1);\n\n/**\n * A static one Vector3 for use by reference.\n * \n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector3.ONE\n * @type {Phaser.Math.Vector3}\n * @since 3.16.0\n */\nVector3.ONE = new Vector3(1, 1, 1);\n\nmodule.exports = Vector3;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\n\nvar Class = require('../utils/Class');\n\n/**\n * @classdesc\n * A representation of a vector in 4D space.\n *\n * A four-component vector.\n *\n * @class Vector4\n * @memberof Phaser.Math\n * @constructor\n * @since 3.0.0\n *\n * @param {number} [x] - The x component.\n * @param {number} [y] - The y component.\n * @param {number} [z] - The z component.\n * @param {number} [w] - The w component.\n */\nvar Vector4 = new Class({\n\n initialize:\n\n function Vector4 (x, y, z, w)\n {\n /**\n * The x component of this Vector.\n *\n * @name Phaser.Math.Vector4#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.x = 0;\n\n /**\n * The y component of this Vector.\n *\n * @name Phaser.Math.Vector4#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.y = 0;\n\n /**\n * The z component of this Vector.\n *\n * @name Phaser.Math.Vector4#z\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.z = 0;\n\n /**\n * The w component of this Vector.\n *\n * @name Phaser.Math.Vector4#w\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.w = 0;\n\n if (typeof x === 'object')\n {\n this.x = x.x || 0;\n this.y = x.y || 0;\n this.z = x.z || 0;\n this.w = x.w || 0;\n }\n else\n {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n this.w = w || 0;\n }\n },\n\n /**\n * Make a clone of this Vector4.\n *\n * @method Phaser.Math.Vector4#clone\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector4} A clone of this Vector4.\n */\n clone: function ()\n {\n return new Vector4(this.x, this.y, this.z, this.w);\n },\n\n /**\n * Copy the components of a given Vector into this Vector.\n *\n * @method Phaser.Math.Vector4#copy\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector4} src - The Vector to copy the components from.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n copy: function (src)\n {\n this.x = src.x;\n this.y = src.y;\n this.z = src.z || 0;\n this.w = src.w || 0;\n\n return this;\n },\n\n /**\n * Check whether this Vector is equal to a given Vector.\n *\n * Performs a strict quality check against each Vector's components.\n *\n * @method Phaser.Math.Vector4#equals\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector4} v - The vector to check equality with.\n *\n * @return {boolean} A boolean indicating whether the two Vectors are equal or not.\n */\n equals: function (v)\n {\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z) && (this.w === v.w));\n },\n\n /**\n * Set the `x`, `y`, `z` and `w` components of the this Vector to the given `x`, `y`, `z` and `w` values.\n *\n * @method Phaser.Math.Vector4#set\n * @since 3.0.0\n *\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y, z and w components.\n * @param {number} y - The y value to set for this Vector.\n * @param {number} z - The z value to set for this Vector.\n * @param {number} w - The z value to set for this Vector.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n set: function (x, y, z, w)\n {\n if (typeof x === 'object')\n {\n this.x = x.x || 0;\n this.y = x.y || 0;\n this.z = x.z || 0;\n this.w = x.w || 0;\n }\n else\n {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n this.w = w || 0;\n }\n\n return this;\n },\n\n /**\n * Add a given Vector to this Vector. Addition is component-wise.\n *\n * @method Phaser.Math.Vector4#add\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to add to this Vector.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n add: function (v)\n {\n this.x += v.x;\n this.y += v.y;\n this.z += v.z || 0;\n this.w += v.w || 0;\n\n return this;\n },\n\n /**\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\n *\n * @method Phaser.Math.Vector4#subtract\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to subtract from this Vector.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n subtract: function (v)\n {\n this.x -= v.x;\n this.y -= v.y;\n this.z -= v.z || 0;\n this.w -= v.w || 0;\n\n return this;\n },\n\n /**\n * Scale this Vector by the given value.\n *\n * @method Phaser.Math.Vector4#scale\n * @since 3.0.0\n *\n * @param {number} scale - The value to scale this Vector by.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n scale: function (scale)\n {\n this.x *= scale;\n this.y *= scale;\n this.z *= scale;\n this.w *= scale;\n\n return this;\n },\n\n /**\n * Calculate the length (or magnitude) of this Vector.\n *\n * @method Phaser.Math.Vector4#length\n * @since 3.0.0\n *\n * @return {number} The length of this Vector.\n */\n length: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var w = this.w;\n\n return Math.sqrt(x * x + y * y + z * z + w * w);\n },\n\n /**\n * Calculate the length of this Vector squared.\n *\n * @method Phaser.Math.Vector4#lengthSq\n * @since 3.0.0\n *\n * @return {number} The length of this Vector, squared.\n */\n lengthSq: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var w = this.w;\n\n return x * x + y * y + z * z + w * w;\n },\n\n /**\n * Normalize this Vector.\n *\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\n *\n * @method Phaser.Math.Vector4#normalize\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n normalize: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var w = this.w;\n var len = x * x + y * y + z * z + w * w;\n\n if (len > 0)\n {\n len = 1 / Math.sqrt(len);\n\n this.x = x * len;\n this.y = y * len;\n this.z = z * len;\n this.w = w * len;\n }\n\n return this;\n },\n\n /**\n * Calculate the dot product of this Vector and the given Vector.\n *\n * @method Phaser.Math.Vector4#dot\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector4} v - The Vector4 to dot product with this Vector4.\n *\n * @return {number} The dot product of this Vector and the given Vector.\n */\n dot: function (v)\n {\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\n },\n\n /**\n * Linearly interpolate between this Vector and the given Vector.\n *\n * Interpolates this Vector towards the given Vector.\n *\n * @method Phaser.Math.Vector4#lerp\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector4} v - The Vector4 to interpolate towards.\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n lerp: function (v, t)\n {\n if (t === undefined) { t = 0; }\n\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n var aw = this.w;\n\n this.x = ax + t * (v.x - ax);\n this.y = ay + t * (v.y - ay);\n this.z = az + t * (v.z - az);\n this.w = aw + t * (v.w - aw);\n\n return this;\n },\n\n /**\n * Perform a component-wise multiplication between this Vector and the given Vector.\n *\n * Multiplies this Vector by the given Vector.\n *\n * @method Phaser.Math.Vector4#multiply\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to multiply this Vector by.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n multiply: function (v)\n {\n this.x *= v.x;\n this.y *= v.y;\n this.z *= v.z || 1;\n this.w *= v.w || 1;\n\n return this;\n },\n\n /**\n * Perform a component-wise division between this Vector and the given Vector.\n *\n * Divides this Vector by the given Vector.\n *\n * @method Phaser.Math.Vector4#divide\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to divide this Vector by.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n divide: function (v)\n {\n this.x /= v.x;\n this.y /= v.y;\n this.z /= v.z || 1;\n this.w /= v.w || 1;\n\n return this;\n },\n\n /**\n * Calculate the distance between this Vector and the given Vector.\n *\n * @method Phaser.Math.Vector4#distance\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\n *\n * @return {number} The distance from this Vector to the given Vector.\n */\n distance: function (v)\n {\n var dx = v.x - this.x;\n var dy = v.y - this.y;\n var dz = v.z - this.z || 0;\n var dw = v.w - this.w || 0;\n\n return Math.sqrt(dx * dx + dy * dy + dz * dz + dw * dw);\n },\n\n /**\n * Calculate the distance between this Vector and the given Vector, squared.\n *\n * @method Phaser.Math.Vector4#distanceSq\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\n *\n * @return {number} The distance from this Vector to the given Vector, squared.\n */\n distanceSq: function (v)\n {\n var dx = v.x - this.x;\n var dy = v.y - this.y;\n var dz = v.z - this.z || 0;\n var dw = v.w - this.w || 0;\n\n return dx * dx + dy * dy + dz * dz + dw * dw;\n },\n\n /**\n * Negate the `x`, `y`, `z` and `w` components of this Vector.\n *\n * @method Phaser.Math.Vector4#negate\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n negate: function ()\n {\n this.x = -this.x;\n this.y = -this.y;\n this.z = -this.z;\n this.w = -this.w;\n\n return this;\n },\n\n /**\n * Transform this Vector with the given Matrix.\n *\n * @method Phaser.Math.Vector4#transformMat4\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector4 with.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n transformMat4: function (mat)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var w = this.w;\n var m = mat.val;\n\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\n this.w = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\n\n return this;\n },\n\n /**\n * Transform this Vector with the given Quaternion.\n *\n * @method Phaser.Math.Vector4#transformQuat\n * @since 3.0.0\n *\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n transformQuat: function (q)\n {\n // TODO: is this really the same as Vector3?\n // Also, what about this: http://molecularmusings.wordpress.com/2013/05/24/a-faster-quaternion-vector-multiplication/\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var qx = q.x;\n var qy = q.y;\n var qz = q.z;\n var qw = q.w;\n\n // calculate quat * vec\n var ix = qw * x + qy * z - qz * y;\n var iy = qw * y + qz * x - qx * z;\n var iz = qw * z + qx * y - qy * x;\n var iw = -qx * x - qy * y - qz * z;\n\n // calculate result * inverse quat\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n\n return this;\n },\n\n /**\n * Make this Vector the zero vector (0, 0, 0, 0).\n *\n * @method Phaser.Math.Vector4#reset\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n reset: function ()\n {\n this.x = 0;\n this.y = 0;\n this.z = 0;\n this.w = 0;\n\n return this;\n }\n\n});\n\n// TODO: Check if these are required internally, if not, remove.\nVector4.prototype.sub = Vector4.prototype.subtract;\nVector4.prototype.mul = Vector4.prototype.multiply;\nVector4.prototype.div = Vector4.prototype.divide;\nVector4.prototype.dist = Vector4.prototype.distance;\nVector4.prototype.distSq = Vector4.prototype.distanceSq;\nVector4.prototype.len = Vector4.prototype.length;\nVector4.prototype.lenSq = Vector4.prototype.lengthSq;\n\nmodule.exports = Vector4;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Checks if the two values are within the given `tolerance` of each other.\n *\n * @function Phaser.Math.Within\n * @since 3.0.0\n *\n * @param {number} a - The first value to use in the calculation.\n * @param {number} b - The second value to use in the calculation.\n * @param {number} tolerance - The tolerance. Anything equal to or less than this value is considered as being within range.\n *\n * @return {boolean} Returns `true` if `a` is less than or equal to the tolerance of `b`.\n */\nvar Within = function (a, b, tolerance)\n{\n return (Math.abs(a - b) <= tolerance);\n};\n\nmodule.exports = Within;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Wrap the given `value` between `min` and `max.\n *\n * @function Phaser.Math.Wrap\n * @since 3.0.0\n *\n * @param {number} value - The value to wrap.\n * @param {number} min - The minimum value.\n * @param {number} max - The maximum value.\n *\n * @return {number} The wrapped value.\n */\nvar Wrap = function (value, min, max)\n{\n var range = max - min;\n\n return (min + ((((value - min) % range) + range) % range));\n};\n\nmodule.exports = Wrap;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\n *\n * @function Phaser.Math.Angle.Between\n * @since 3.0.0\n *\n * @param {number} x1 - The x coordinate of the first point.\n * @param {number} y1 - The y coordinate of the first point.\n * @param {number} x2 - The x coordinate of the second point.\n * @param {number} y2 - The y coordinate of the second point.\n *\n * @return {number} The angle in radians.\n */\nvar Between = function (x1, y1, x2, y2)\n{\n return Math.atan2(y2 - y1, x2 - x1);\n};\n\nmodule.exports = Between;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\n *\n * Calculates the angle of the vector from the first point to the second point.\n *\n * @function Phaser.Math.Angle.BetweenPoints\n * @since 3.0.0\n *\n * @param {Phaser.Types.Math.Vector2Like} point1 - The first point.\n * @param {Phaser.Types.Math.Vector2Like} point2 - The second point.\n *\n * @return {number} The angle in radians.\n */\nvar BetweenPoints = function (point1, point2)\n{\n return Math.atan2(point2.y - point1.y, point2.x - point1.x);\n};\n\nmodule.exports = BetweenPoints;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\n *\n * The difference between this method and {@link Phaser.Math.Angle.BetweenPoints} is that this assumes the y coordinate\n * travels down the screen.\n *\n * @function Phaser.Math.Angle.BetweenPointsY\n * @since 3.0.0\n *\n * @param {Phaser.Types.Math.Vector2Like} point1 - The first point.\n * @param {Phaser.Types.Math.Vector2Like} point2 - The second point.\n *\n * @return {number} The angle in radians.\n */\nvar BetweenPointsY = function (point1, point2)\n{\n return Math.atan2(point2.x - point1.x, point2.y - point1.y);\n};\n\nmodule.exports = BetweenPointsY;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\n *\n * The difference between this method and {@link Phaser.Math.Angle.Between} is that this assumes the y coordinate\n * travels down the screen.\n *\n * @function Phaser.Math.Angle.BetweenY\n * @since 3.0.0\n *\n * @param {number} x1 - The x coordinate of the first point.\n * @param {number} y1 - The y coordinate of the first point.\n * @param {number} x2 - The x coordinate of the second point.\n * @param {number} y2 - The y coordinate of the second point.\n *\n * @return {number} The angle in radians.\n */\nvar BetweenY = function (x1, y1, x2, y2)\n{\n return Math.atan2(x2 - x1, y2 - y1);\n};\n\nmodule.exports = BetweenY;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CONST = require('../const');\n\n/**\n * Takes an angle in Phasers default clockwise format and converts it so that\n * 0 is North, 90 is West, 180 is South and 270 is East,\n * therefore running counter-clockwise instead of clockwise.\n * \n * You can pass in the angle from a Game Object using:\n * \n * ```javascript\n * var converted = CounterClockwise(gameobject.rotation);\n * ```\n * \n * All values for this function are in radians.\n *\n * @function Phaser.Math.Angle.CounterClockwise\n * @since 3.16.0\n *\n * @param {number} angle - The angle to convert, in radians.\n *\n * @return {number} The converted angle, in radians.\n */\nvar CounterClockwise = function (angle)\n{\n if (angle > Math.PI)\n {\n angle -= CONST.PI2;\n }\n\n return Math.abs((((angle + CONST.TAU) % CONST.PI2) - CONST.PI2) % CONST.PI2);\n};\n\nmodule.exports = CounterClockwise;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Normalize an angle to the [0, 2pi] range.\n *\n * @function Phaser.Math.Angle.Normalize\n * @since 3.0.0\n *\n * @param {number} angle - The angle to normalize, in radians.\n *\n * @return {number} The normalized angle, in radians.\n */\nvar Normalize = function (angle)\n{\n angle = angle % (2 * Math.PI);\n\n if (angle >= 0)\n {\n return angle;\n }\n else\n {\n return angle + 2 * Math.PI;\n }\n};\n\nmodule.exports = Normalize;\n","/**\n * @author Richard Davey \n * @author @samme\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar FloatBetween = require('../FloatBetween');\n\n/**\n * Returns a random angle in the range [-pi, pi].\n *\n * @function Phaser.Math.Angle.Random\n * @since 3.23.0\n *\n * @return {number} The angle, in radians.\n */\nvar Random = function ()\n{\n return FloatBetween(-Math.PI, Math.PI);\n};\n\nmodule.exports = Random;\n","/**\n * @author Richard Davey \n * @author @samme\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar FloatBetween = require('../FloatBetween');\n\n/**\n * Returns a random angle in the range [-180, 180].\n *\n * @function Phaser.Math.Angle.RandomDegrees\n * @since 3.23.0\n *\n * @return {number} The angle, in degrees.\n */\nvar RandomDegrees = function ()\n{\n return FloatBetween(-180, 180);\n};\n\nmodule.exports = RandomDegrees;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Normalize = require('./Normalize');\n\n/**\n * Reverse the given angle.\n *\n * @function Phaser.Math.Angle.Reverse\n * @since 3.0.0\n *\n * @param {number} angle - The angle to reverse, in radians.\n *\n * @return {number} The reversed angle, in radians.\n */\nvar Reverse = function (angle)\n{\n return Normalize(angle + Math.PI);\n};\n\nmodule.exports = Reverse;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar MATH_CONST = require('../const');\n\n/**\n * Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call.\n *\n * @function Phaser.Math.Angle.RotateTo\n * @since 3.0.0\n *\n * @param {number} currentAngle - The current angle, in radians.\n * @param {number} targetAngle - The target angle to rotate to, in radians.\n * @param {number} [lerp=0.05] - The lerp value to add to the current angle.\n *\n * @return {number} The adjusted angle.\n */\nvar RotateTo = function (currentAngle, targetAngle, lerp)\n{\n if (lerp === undefined) { lerp = 0.05; }\n\n if (currentAngle === targetAngle)\n {\n return currentAngle;\n }\n\n if (Math.abs(targetAngle - currentAngle) <= lerp || Math.abs(targetAngle - currentAngle) >= (MATH_CONST.PI2 - lerp))\n {\n currentAngle = targetAngle;\n }\n else\n {\n if (Math.abs(targetAngle - currentAngle) > Math.PI)\n {\n if (targetAngle < currentAngle)\n {\n targetAngle += MATH_CONST.PI2;\n }\n else\n {\n targetAngle -= MATH_CONST.PI2;\n }\n }\n\n if (targetAngle > currentAngle)\n {\n currentAngle += lerp;\n }\n else if (targetAngle < currentAngle)\n {\n currentAngle -= lerp;\n }\n }\n\n return currentAngle;\n};\n\nmodule.exports = RotateTo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Gets the shortest angle between `angle1` and `angle2`.\n *\n * Both angles must be in the range -180 to 180, which is the same clamped\n * range that `sprite.angle` uses, so you can pass in two sprite angles to\n * this method and get the shortest angle back between the two of them.\n *\n * The angle returned will be in the same range. If the returned angle is\n * greater than 0 then it's a counter-clockwise rotation, if < 0 then it's\n * a clockwise rotation.\n *\n * TODO: Wrap the angles in this function?\n *\n * @function Phaser.Math.Angle.ShortestBetween\n * @since 3.0.0\n *\n * @param {number} angle1 - The first angle in the range -180 to 180.\n * @param {number} angle2 - The second angle in the range -180 to 180.\n *\n * @return {number} The shortest angle, in degrees. If greater than zero it's a counter-clockwise rotation.\n */\nvar ShortestBetween = function (angle1, angle2)\n{\n var difference = angle2 - angle1;\n\n if (difference === 0)\n {\n return 0;\n }\n\n var times = Math.floor((difference - (-180)) / 360);\n\n return difference - (times * 360);\n\n};\n\nmodule.exports = ShortestBetween;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar MathWrap = require('../Wrap');\n\n/**\n * Wrap an angle.\n *\n * Wraps the angle to a value in the range of -PI to PI.\n *\n * @function Phaser.Math.Angle.Wrap\n * @since 3.0.0\n *\n * @param {number} angle - The angle to wrap, in radians.\n *\n * @return {number} The wrapped angle, in radians.\n */\nvar Wrap = function (angle)\n{\n return MathWrap(angle, -Math.PI, Math.PI);\n};\n\nmodule.exports = Wrap;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Wrap = require('../Wrap');\n\n/**\n * Wrap an angle in degrees.\n *\n * Wraps the angle to a value in the range of -180 to 180.\n *\n * @function Phaser.Math.Angle.WrapDegrees\n * @since 3.0.0\n *\n * @param {number} angle - The angle to wrap, in degrees.\n *\n * @return {number} The wrapped angle, in degrees.\n */\nvar WrapDegrees = function (angle)\n{\n return Wrap(angle, -180, 180);\n};\n\nmodule.exports = WrapDegrees;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Angle\n */\n\nmodule.exports = {\n\n Between: require('./Between'),\n BetweenPoints: require('./BetweenPoints'),\n BetweenPointsY: require('./BetweenPointsY'),\n BetweenY: require('./BetweenY'),\n CounterClockwise: require('./CounterClockwise'),\n Normalize: require('./Normalize'),\n Random: require('./Random'),\n RandomDegrees: require('./RandomDegrees'),\n Reverse: require('./Reverse'),\n RotateTo: require('./RotateTo'),\n ShortestBetween: require('./ShortestBetween'),\n Wrap: require('./Wrap'),\n WrapDegrees: require('./WrapDegrees')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar MATH_CONST = {\n\n /**\n * The value of PI * 2.\n * \n * @name Phaser.Math.PI2\n * @type {number}\n * @since 3.0.0\n */\n PI2: Math.PI * 2,\n\n /**\n * The value of PI * 0.5.\n * \n * @name Phaser.Math.TAU\n * @type {number}\n * @since 3.0.0\n */\n TAU: Math.PI * 0.5,\n\n /**\n * An epsilon value (1.0e-6)\n * \n * @name Phaser.Math.EPSILON\n * @type {number}\n * @since 3.0.0\n */\n EPSILON: 1.0e-6,\n\n /**\n * For converting degrees to radians (PI / 180)\n * \n * @name Phaser.Math.DEG_TO_RAD\n * @type {number}\n * @since 3.0.0\n */\n DEG_TO_RAD: Math.PI / 180,\n\n /**\n * For converting radians to degrees (180 / PI)\n * \n * @name Phaser.Math.RAD_TO_DEG\n * @type {number}\n * @since 3.0.0\n */\n RAD_TO_DEG: 180 / Math.PI,\n\n /**\n * An instance of the Random Number Generator.\n * This is not set until the Game boots.\n * \n * @name Phaser.Math.RND\n * @type {Phaser.Math.RandomDataGenerator}\n * @since 3.0.0\n */\n RND: null,\n\n /**\n * The minimum safe integer this browser supports.\n * We use a const for backward compatibility with Internet Explorer.\n * \n * @name Phaser.Math.MIN_SAFE_INTEGER\n * @type {number}\n * @since 3.21.0\n */\n MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991,\n\n /**\n * The maximum safe integer this browser supports.\n * We use a const for backward compatibility with Internet Explorer.\n * \n * @name Phaser.Math.MAX_SAFE_INTEGER\n * @type {number}\n * @since 3.21.0\n */\n MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991\n\n};\n\nmodule.exports = MATH_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the distance between two sets of coordinates (points).\n *\n * @function Phaser.Math.Distance.Between\n * @since 3.0.0\n *\n * @param {number} x1 - The x coordinate of the first point.\n * @param {number} y1 - The y coordinate of the first point.\n * @param {number} x2 - The x coordinate of the second point.\n * @param {number} y2 - The y coordinate of the second point.\n *\n * @return {number} The distance between each point.\n */\nvar DistanceBetween = function (x1, y1, x2, y2)\n{\n var dx = x1 - x2;\n var dy = y1 - y2;\n\n return Math.sqrt(dx * dx + dy * dy);\n};\n\nmodule.exports = DistanceBetween;\n","/**\n * @author samme\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the distance between two points.\n *\n * @function Phaser.Math.Distance.BetweenPoints\n * @since 3.22.0\n *\n * @param {Phaser.Types.Math.Vector2Like} a - The first point.\n * @param {Phaser.Types.Math.Vector2Like} b - The second point.\n *\n * @return {number} The distance between the points.\n */\nvar DistanceBetweenPoints = function (a, b)\n{\n var dx = a.x - b.x;\n var dy = a.y - b.y;\n\n return Math.sqrt(dx * dx + dy * dy);\n};\n\nmodule.exports = DistanceBetweenPoints;\n","/**\n * @author samme\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the squared distance between two points.\n *\n * @function Phaser.Math.Distance.BetweenPointsSquared\n * @since 3.22.0\n *\n * @param {Phaser.Types.Math.Vector2Like} a - The first point.\n * @param {Phaser.Types.Math.Vector2Like} b - The second point.\n *\n * @return {number} The squared distance between the points.\n */\nvar DistanceBetweenPointsSquared = function (a, b)\n{\n var dx = a.x - b.x;\n var dy = a.y - b.y;\n\n return dx * dx + dy * dy;\n};\n\nmodule.exports = DistanceBetweenPointsSquared;\n","/**\n * @author samme\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the Chebyshev distance between two sets of coordinates (points).\n *\n * Chebyshev distance (or chessboard distance) is the maximum of the horizontal and vertical distances.\n * It's the effective distance when movement can be horizontal, vertical, or diagonal.\n *\n * @function Phaser.Math.Distance.Chebyshev\n * @since 3.22.0\n *\n * @param {number} x1 - The x coordinate of the first point.\n * @param {number} y1 - The y coordinate of the first point.\n * @param {number} x2 - The x coordinate of the second point.\n * @param {number} y2 - The y coordinate of the second point.\n *\n * @return {number} The distance between each point.\n */\nvar ChebyshevDistance = function (x1, y1, x2, y2)\n{\n return Math.max(Math.abs(x1 - x2), Math.abs(y1 - y2));\n};\n\nmodule.exports = ChebyshevDistance;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the distance between two sets of coordinates (points) to the power of `pow`.\n *\n * @function Phaser.Math.Distance.Power\n * @since 3.0.0\n *\n * @param {number} x1 - The x coordinate of the first point.\n * @param {number} y1 - The y coordinate of the first point.\n * @param {number} x2 - The x coordinate of the second point.\n * @param {number} y2 - The y coordinate of the second point.\n * @param {number} pow - The exponent.\n *\n * @return {number} The distance between each point.\n */\nvar DistancePower = function (x1, y1, x2, y2, pow)\n{\n if (pow === undefined) { pow = 2; }\n\n return Math.sqrt(Math.pow(x2 - x1, pow) + Math.pow(y2 - y1, pow));\n};\n\nmodule.exports = DistancePower;\n","/**\n * @author samme\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the snake distance between two sets of coordinates (points).\n *\n * Snake distance (rectilinear distance, Manhattan distance) is the sum of the horizontal and vertical distances.\n * It's the effective distance when movement is allowed only horizontally or vertically (but not both).\n *\n * @function Phaser.Math.Distance.Snake\n * @since 3.22.0\n *\n * @param {number} x1 - The x coordinate of the first point.\n * @param {number} y1 - The y coordinate of the first point.\n * @param {number} x2 - The x coordinate of the second point.\n * @param {number} y2 - The y coordinate of the second point.\n *\n * @return {number} The distance between each point.\n */\nvar SnakeDistance = function (x1, y1, x2, y2)\n{\n return Math.abs(x1 - x2) + Math.abs(y1 - y2);\n};\n\nmodule.exports = SnakeDistance;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the distance between two sets of coordinates (points), squared.\n *\n * @function Phaser.Math.Distance.Squared\n * @since 3.0.0\n *\n * @param {number} x1 - The x coordinate of the first point.\n * @param {number} y1 - The y coordinate of the first point.\n * @param {number} x2 - The x coordinate of the second point.\n * @param {number} y2 - The y coordinate of the second point.\n *\n * @return {number} The distance between each point, squared.\n */\nvar DistanceSquared = function (x1, y1, x2, y2)\n{\n var dx = x1 - x2;\n var dy = y1 - y2;\n\n return dx * dx + dy * dy;\n};\n\nmodule.exports = DistanceSquared;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Distance\n */\n\nmodule.exports = {\n\n Between: require('./DistanceBetween'),\n BetweenPoints: require('./DistanceBetweenPoints'),\n BetweenPointsSquared: require('./DistanceBetweenPointsSquared'),\n Chebyshev: require('./DistanceChebyshev'),\n Power: require('./DistancePower'),\n Snake: require('./DistanceSnake'),\n Squared: require('./DistanceSquared')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Back ease-in.\n *\n * @function Phaser.Math.Easing.Back.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n * @param {number} [overshoot=1.70158] - The overshoot amount.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v, overshoot)\n{\n if (overshoot === undefined) { overshoot = 1.70158; }\n\n return v * v * ((overshoot + 1) * v - overshoot);\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Back ease-in/out.\n *\n * @function Phaser.Math.Easing.Back.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n * @param {number} [overshoot=1.70158] - The overshoot amount.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v, overshoot)\n{\n if (overshoot === undefined) { overshoot = 1.70158; }\n\n var s = overshoot * 1.525;\n\n if ((v *= 2) < 1)\n {\n return 0.5 * (v * v * ((s + 1) * v - s));\n }\n else\n {\n return 0.5 * ((v -= 2) * v * ((s + 1) * v + s) + 2);\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Back ease-out.\n *\n * @function Phaser.Math.Easing.Back.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n * @param {number} [overshoot=1.70158] - The overshoot amount.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v, overshoot)\n{\n if (overshoot === undefined) { overshoot = 1.70158; }\n\n return --v * v * ((overshoot + 1) * v + overshoot) + 1;\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Back\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Bounce ease-in.\n *\n * @function Phaser.Math.Easing.Bounce.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v)\n{\n v = 1 - v;\n\n if (v < 1 / 2.75)\n {\n return 1 - (7.5625 * v * v);\n }\n else if (v < 2 / 2.75)\n {\n return 1 - (7.5625 * (v -= 1.5 / 2.75) * v + 0.75);\n }\n else if (v < 2.5 / 2.75)\n {\n return 1 - (7.5625 * (v -= 2.25 / 2.75) * v + 0.9375);\n }\n else\n {\n return 1 - (7.5625 * (v -= 2.625 / 2.75) * v + 0.984375);\n }\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Bounce ease-in/out.\n *\n * @function Phaser.Math.Easing.Bounce.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v)\n{\n var reverse = false;\n\n if (v < 0.5)\n {\n v = 1 - (v * 2);\n reverse = true;\n }\n else\n {\n v = (v * 2) - 1;\n }\n\n if (v < 1 / 2.75)\n {\n v = 7.5625 * v * v;\n }\n else if (v < 2 / 2.75)\n {\n v = 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\n }\n else if (v < 2.5 / 2.75)\n {\n v = 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\n }\n else\n {\n v = 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\n }\n\n if (reverse)\n {\n return (1 - v) * 0.5;\n }\n else\n {\n return v * 0.5 + 0.5;\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Bounce ease-out.\n *\n * @function Phaser.Math.Easing.Bounce.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v)\n{\n if (v < 1 / 2.75)\n {\n return 7.5625 * v * v;\n }\n else if (v < 2 / 2.75)\n {\n return 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\n }\n else if (v < 2.5 / 2.75)\n {\n return 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\n }\n else\n {\n return 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\n }\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Bounce\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Circular ease-in.\n *\n * @function Phaser.Math.Easing.Circular.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v)\n{\n return 1 - Math.sqrt(1 - v * v);\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Circular ease-in/out.\n *\n * @function Phaser.Math.Easing.Circular.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v)\n{\n if ((v *= 2) < 1)\n {\n return -0.5 * (Math.sqrt(1 - v * v) - 1);\n }\n else\n {\n return 0.5 * (Math.sqrt(1 - (v -= 2) * v) + 1);\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Circular ease-out.\n *\n * @function Phaser.Math.Easing.Circular.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v)\n{\n return Math.sqrt(1 - (--v * v));\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Circular\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Cubic ease-in.\n *\n * @function Phaser.Math.Easing.Cubic.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v)\n{\n return v * v * v;\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Cubic ease-in/out.\n *\n * @function Phaser.Math.Easing.Cubic.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v)\n{\n if ((v *= 2) < 1)\n {\n return 0.5 * v * v * v;\n }\n else\n {\n return 0.5 * ((v -= 2) * v * v + 2);\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Cubic ease-out.\n *\n * @function Phaser.Math.Easing.Cubic.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v)\n{\n return --v * v * v + 1;\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Cubic\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Elastic ease-in.\n *\n * @function Phaser.Math.Easing.Elastic.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v, amplitude, period)\n{\n if (amplitude === undefined) { amplitude = 0.1; }\n if (period === undefined) { period = 0.1; }\n\n if (v === 0)\n {\n return 0;\n }\n else if (v === 1)\n {\n return 1;\n }\n else\n {\n var s = period / 4;\n\n if (amplitude < 1)\n {\n amplitude = 1;\n }\n else\n {\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\n }\n\n return -(amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\n }\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Elastic ease-in/out.\n *\n * @function Phaser.Math.Easing.Elastic.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v, amplitude, period)\n{\n if (amplitude === undefined) { amplitude = 0.1; }\n if (period === undefined) { period = 0.1; }\n\n if (v === 0)\n {\n return 0;\n }\n else if (v === 1)\n {\n return 1;\n }\n else\n {\n var s = period / 4;\n\n if (amplitude < 1)\n {\n amplitude = 1;\n }\n else\n {\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\n }\n\n if ((v *= 2) < 1)\n {\n return -0.5 * (amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\n }\n else\n {\n return amplitude * Math.pow(2, -10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period) * 0.5 + 1;\n }\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Elastic ease-out.\n *\n * @function Phaser.Math.Easing.Elastic.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v, amplitude, period)\n{\n if (amplitude === undefined) { amplitude = 0.1; }\n if (period === undefined) { period = 0.1; }\n\n if (v === 0)\n {\n return 0;\n }\n else if (v === 1)\n {\n return 1;\n }\n else\n {\n var s = period / 4;\n\n if (amplitude < 1)\n {\n amplitude = 1;\n }\n else\n {\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\n }\n\n return (amplitude * Math.pow(2, -10 * v) * Math.sin((v - s) * (2 * Math.PI) / period) + 1);\n }\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Elastic\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Exponential ease-in.\n *\n * @function Phaser.Math.Easing.Expo.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v)\n{\n return Math.pow(2, 10 * (v - 1)) - 0.001;\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Exponential ease-in/out.\n *\n * @function Phaser.Math.Easing.Expo.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v)\n{\n if ((v *= 2) < 1)\n {\n return 0.5 * Math.pow(2, 10 * (v - 1));\n }\n else\n {\n return 0.5 * (2 - Math.pow(2, -10 * (v - 1)));\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Exponential ease-out.\n *\n * @function Phaser.Math.Easing.Expo.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v)\n{\n return 1 - Math.pow(2, -10 * v);\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Expo\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing\n */\n\nmodule.exports = {\n\n Back: require('./back'),\n Bounce: require('./bounce'),\n Circular: require('./circular'),\n Cubic: require('./cubic'),\n Elastic: require('./elastic'),\n Expo: require('./expo'),\n Linear: require('./linear'),\n Quadratic: require('./quadratic'),\n Quartic: require('./quartic'),\n Quintic: require('./quintic'),\n Sine: require('./sine'),\n Stepped: require('./stepped')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Linear easing (no variation).\n *\n * @function Phaser.Math.Easing.Linear\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Linear = function (v)\n{\n return v;\n};\n\nmodule.exports = Linear;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nmodule.exports = require('./Linear');\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quadratic ease-in.\n *\n * @function Phaser.Math.Easing.Quadratic.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v)\n{\n return v * v;\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quadratic ease-in/out.\n *\n * @function Phaser.Math.Easing.Quadratic.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v)\n{\n if ((v *= 2) < 1)\n {\n return 0.5 * v * v;\n }\n else\n {\n return -0.5 * (--v * (v - 2) - 1);\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quadratic ease-out.\n *\n * @function Phaser.Math.Easing.Quadratic.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v)\n{\n return v * (2 - v);\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Quadratic\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quartic ease-in.\n *\n * @function Phaser.Math.Easing.Quartic.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v)\n{\n return v * v * v * v;\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quartic ease-in/out.\n *\n * @function Phaser.Math.Easing.Quartic.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v)\n{\n if ((v *= 2) < 1)\n {\n return 0.5 * v * v * v * v;\n }\n else\n {\n return -0.5 * ((v -= 2) * v * v * v - 2);\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quartic ease-out.\n *\n * @function Phaser.Math.Easing.Quartic.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v)\n{\n return 1 - (--v * v * v * v);\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Quartic\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quintic ease-in.\n *\n * @function Phaser.Math.Easing.Quintic.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v)\n{\n return v * v * v * v * v;\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quintic ease-in/out.\n *\n * @function Phaser.Math.Easing.Quintic.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v)\n{\n if ((v *= 2) < 1)\n {\n return 0.5 * v * v * v * v * v;\n }\n else\n {\n return 0.5 * ((v -= 2) * v * v * v * v + 2);\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quintic ease-out.\n *\n * @function Phaser.Math.Easing.Quintic.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v)\n{\n return --v * v * v * v * v + 1;\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Quintic\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Sinusoidal ease-in.\n *\n * @function Phaser.Math.Easing.Sine.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v)\n{\n if (v === 0)\n {\n return 0;\n }\n else if (v === 1)\n {\n return 1;\n }\n else\n {\n return 1 - Math.cos(v * Math.PI / 2);\n }\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Sinusoidal ease-in/out.\n *\n * @function Phaser.Math.Easing.Sine.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v)\n{\n if (v === 0)\n {\n return 0;\n }\n else if (v === 1)\n {\n return 1;\n }\n else\n {\n return 0.5 * (1 - Math.cos(Math.PI * v));\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Sinusoidal ease-out.\n *\n * @function Phaser.Math.Easing.Sine.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v)\n{\n if (v === 0)\n {\n return 0;\n }\n else if (v === 1)\n {\n return 1;\n }\n else\n {\n return Math.sin(v * Math.PI / 2);\n }\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Sine\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Stepped easing.\n *\n * @function Phaser.Math.Easing.Stepped\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n * @param {number} [steps=1] - The number of steps in the ease.\n *\n * @return {number} The tweened value.\n */\nvar Stepped = function (v, steps)\n{\n if (steps === undefined) { steps = 1; }\n\n if (v <= 0)\n {\n return 0;\n }\n else if (v >= 1)\n {\n return 1;\n }\n else\n {\n return (((steps * v) | 0) + 1) * (1 / steps);\n }\n};\n\nmodule.exports = Stepped;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Stepped\n */\n\nmodule.exports = require('./Stepped');\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the fuzzy ceiling of the given value.\n *\n * @function Phaser.Math.Fuzzy.Ceil\n * @since 3.0.0\n *\n * @param {number} value - The value.\n * @param {number} [epsilon=0.0001] - The epsilon.\n *\n * @return {number} The fuzzy ceiling of the value.\n */\nvar Ceil = function (value, epsilon)\n{\n if (epsilon === undefined) { epsilon = 0.0001; }\n\n return Math.ceil(value - epsilon);\n};\n\nmodule.exports = Ceil;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Check whether the given values are fuzzily equal.\n *\n * Two numbers are fuzzily equal if their difference is less than `epsilon`.\n *\n * @function Phaser.Math.Fuzzy.Equal\n * @since 3.0.0\n *\n * @param {number} a - The first value.\n * @param {number} b - The second value.\n * @param {number} [epsilon=0.0001] - The epsilon.\n *\n * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`.\n */\nvar Equal = function (a, b, epsilon)\n{\n if (epsilon === undefined) { epsilon = 0.0001; }\n\n return Math.abs(a - b) < epsilon;\n};\n\nmodule.exports = Equal;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the fuzzy floor of the given value.\n *\n * @function Phaser.Math.Fuzzy.Floor\n * @since 3.0.0\n *\n * @param {number} value - The value.\n * @param {number} [epsilon=0.0001] - The epsilon.\n *\n * @return {number} The floor of the value.\n */\nvar Floor = function (value, epsilon)\n{\n if (epsilon === undefined) { epsilon = 0.0001; }\n\n return Math.floor(value + epsilon);\n};\n\nmodule.exports = Floor;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Check whether `a` is fuzzily greater than `b`.\n *\n * `a` is fuzzily greater than `b` if it is more than `b - epsilon`.\n *\n * @function Phaser.Math.Fuzzy.GreaterThan\n * @since 3.0.0\n *\n * @param {number} a - The first value.\n * @param {number} b - The second value.\n * @param {number} [epsilon=0.0001] - The epsilon.\n *\n * @return {boolean} `true` if `a` is fuzzily greater than than `b`, otherwise `false`.\n */\nvar GreaterThan = function (a, b, epsilon)\n{\n if (epsilon === undefined) { epsilon = 0.0001; }\n\n return a > b - epsilon;\n};\n\nmodule.exports = GreaterThan;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Check whether `a` is fuzzily less than `b`.\n *\n * `a` is fuzzily less than `b` if it is less than `b + epsilon`.\n *\n * @function Phaser.Math.Fuzzy.LessThan\n * @since 3.0.0\n *\n * @param {number} a - The first value.\n * @param {number} b - The second value.\n * @param {number} [epsilon=0.0001] - The epsilon.\n *\n * @return {boolean} `true` if `a` is fuzzily less than `b`, otherwise `false`.\n */\nvar LessThan = function (a, b, epsilon)\n{\n if (epsilon === undefined) { epsilon = 0.0001; }\n\n return a < b + epsilon;\n};\n\nmodule.exports = LessThan;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Fuzzy\n */\n\nmodule.exports = {\n\n Ceil: require('./Ceil'),\n Equal: require('./Equal'),\n Floor: require('./Floor'),\n GreaterThan: require('./GreaterThan'),\n LessThan: require('./LessThan')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CONST = require('./const');\nvar Extend = require('../utils/object/Extend');\n\n/**\n * @namespace Phaser.Math\n */\n\nvar PhaserMath = {\n\n // Collections of functions\n Angle: require('./angle/'),\n Distance: require('./distance/'),\n Easing: require('./easing/'),\n Fuzzy: require('./fuzzy/'),\n Interpolation: require('./interpolation/'),\n Pow2: require('./pow2/'),\n Snap: require('./snap/'),\n\n // Expose the RNG Class\n RandomDataGenerator: require('./random-data-generator/RandomDataGenerator'),\n\n // Single functions\n Average: require('./Average'),\n Bernstein: require('./Bernstein'),\n Between: require('./Between'),\n CatmullRom: require('./CatmullRom'),\n CeilTo: require('./CeilTo'),\n Clamp: require('./Clamp'),\n DegToRad: require('./DegToRad'),\n Difference: require('./Difference'),\n Factorial: require('./Factorial'),\n FloatBetween: require('./FloatBetween'),\n FloorTo: require('./FloorTo'),\n FromPercent: require('./FromPercent'),\n GetSpeed: require('./GetSpeed'),\n IsEven: require('./IsEven'),\n IsEvenStrict: require('./IsEvenStrict'),\n Linear: require('./Linear'),\n MaxAdd: require('./MaxAdd'),\n MinSub: require('./MinSub'),\n Percent: require('./Percent'),\n RadToDeg: require('./RadToDeg'),\n RandomXY: require('./RandomXY'),\n RandomXYZ: require('./RandomXYZ'),\n RandomXYZW: require('./RandomXYZW'),\n Rotate: require('./Rotate'),\n RotateAround: require('./RotateAround'),\n RotateAroundDistance: require('./RotateAroundDistance'),\n RotateTo: require('./RotateTo'),\n RoundAwayFromZero: require('./RoundAwayFromZero'),\n RoundTo: require('./RoundTo'),\n SinCosTableGenerator: require('./SinCosTableGenerator'),\n SmootherStep: require('./SmootherStep'),\n SmoothStep: require('./SmoothStep'),\n ToXY: require('./ToXY'),\n TransformXY: require('./TransformXY'),\n Within: require('./Within'),\n Wrap: require('./Wrap'),\n\n // Vector classes\n Vector2: require('./Vector2'),\n Vector3: require('./Vector3'),\n Vector4: require('./Vector4'),\n Matrix3: require('./Matrix3'),\n Matrix4: require('./Matrix4'),\n Quaternion: require('./Quaternion'),\n RotateVec3: require('./RotateVec3')\n\n};\n\n// Merge in the consts\n\nPhaserMath = Extend(false, PhaserMath, CONST);\n\n// Export it\n\nmodule.exports = PhaserMath;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Bernstein = require('../Bernstein');\n\n/**\n * A bezier interpolation method.\n *\n * @function Phaser.Math.Interpolation.Bezier\n * @since 3.0.0\n *\n * @param {number[]} v - The input array of values to interpolate between.\n * @param {number} k - The percentage of interpolation, between 0 and 1.\n *\n * @return {number} The interpolated value.\n */\nvar BezierInterpolation = function (v, k)\n{\n var b = 0;\n var n = v.length - 1;\n\n for (var i = 0; i <= n; i++)\n {\n b += Math.pow(1 - k, n - i) * Math.pow(k, i) * v[i] * Bernstein(n, i);\n }\n\n return b;\n};\n\nmodule.exports = BezierInterpolation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CatmullRom = require('../CatmullRom');\n\n/**\n * A Catmull-Rom interpolation method.\n *\n * @function Phaser.Math.Interpolation.CatmullRom\n * @since 3.0.0\n *\n * @param {number[]} v - The input array of values to interpolate between.\n * @param {number} k - The percentage of interpolation, between 0 and 1.\n *\n * @return {number} The interpolated value.\n */\nvar CatmullRomInterpolation = function (v, k)\n{\n var m = v.length - 1;\n var f = m * k;\n var i = Math.floor(f);\n\n if (v[0] === v[m])\n {\n if (k < 0)\n {\n i = Math.floor(f = m * (1 + k));\n }\n\n return CatmullRom(f - i, v[(i - 1 + m) % m], v[i], v[(i + 1) % m], v[(i + 2) % m]);\n }\n else\n {\n if (k < 0)\n {\n return v[0] - (CatmullRom(-f, v[0], v[0], v[1], v[1]) - v[0]);\n }\n\n if (k > 1)\n {\n return v[m] - (CatmullRom(f - m, v[m], v[m], v[m - 1], v[m - 1]) - v[m]);\n }\n\n return CatmullRom(f - i, v[i ? i - 1 : 0], v[i], v[m < i + 1 ? m : i + 1], v[m < i + 2 ? m : i + 2]);\n }\n};\n\nmodule.exports = CatmullRomInterpolation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @ignore\n */\nfunction P0 (t, p)\n{\n var k = 1 - t;\n\n return k * k * k * p;\n}\n\n/**\n * @ignore\n */\nfunction P1 (t, p)\n{\n var k = 1 - t;\n\n return 3 * k * k * t * p;\n}\n\n/**\n * @ignore\n */\nfunction P2 (t, p)\n{\n return 3 * (1 - t) * t * t * p;\n}\n\n/**\n * @ignore\n */\nfunction P3 (t, p)\n{\n return t * t * t * p;\n}\n\n/**\n * A cubic bezier interpolation method.\n *\n * https://medium.com/@adrian_cooney/bezier-interpolation-13b68563313a\n *\n * @function Phaser.Math.Interpolation.CubicBezier\n * @since 3.0.0\n *\n * @param {number} t - The percentage of interpolation, between 0 and 1.\n * @param {number} p0 - The start point.\n * @param {number} p1 - The first control point.\n * @param {number} p2 - The second control point.\n * @param {number} p3 - The end point.\n *\n * @return {number} The interpolated value.\n */\nvar CubicBezierInterpolation = function (t, p0, p1, p2, p3)\n{\n return P0(t, p0) + P1(t, p1) + P2(t, p2) + P3(t, p3);\n};\n\nmodule.exports = CubicBezierInterpolation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Linear = require('../Linear');\n\n/**\n * A linear interpolation method.\n *\n * @function Phaser.Math.Interpolation.Linear\n * @since 3.0.0\n * @see {@link https://en.wikipedia.org/wiki/Linear_interpolation}\n *\n * @param {number[]} v - The input array of values to interpolate between.\n * @param {!number} k - The percentage of interpolation, between 0 and 1.\n *\n * @return {!number} The interpolated value.\n */\nvar LinearInterpolation = function (v, k)\n{\n var m = v.length - 1;\n var f = m * k;\n var i = Math.floor(f);\n\n if (k < 0)\n {\n return Linear(v[0], v[1], f);\n }\n else if (k > 1)\n {\n return Linear(v[m], v[m - 1], m - f);\n }\n else\n {\n return Linear(v[i], v[(i + 1 > m) ? m : i + 1], f - i);\n }\n};\n\nmodule.exports = LinearInterpolation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @ignore\n */\nfunction P0 (t, p)\n{\n var k = 1 - t;\n\n return k * k * p;\n}\n\n/**\n * @ignore\n */\nfunction P1 (t, p)\n{\n return 2 * (1 - t) * t * p;\n}\n\n/**\n * @ignore\n */\nfunction P2 (t, p)\n{\n return t * t * p;\n}\n\n// https://github.com/mrdoob/three.js/blob/master/src/extras/core/Interpolations.js\n\n/**\n * A quadratic bezier interpolation method.\n *\n * @function Phaser.Math.Interpolation.QuadraticBezier\n * @since 3.2.0\n *\n * @param {number} t - The percentage of interpolation, between 0 and 1.\n * @param {number} p0 - The start point.\n * @param {number} p1 - The control point.\n * @param {number} p2 - The end point.\n *\n * @return {number} The interpolated value.\n */\nvar QuadraticBezierInterpolation = function (t, p0, p1, p2)\n{\n return P0(t, p0) + P1(t, p1) + P2(t, p2);\n};\n\nmodule.exports = QuadraticBezierInterpolation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SmoothStep = require('../SmoothStep');\n\n/**\n * A Smooth Step interpolation method.\n *\n * @function Phaser.Math.Interpolation.SmoothStep\n * @since 3.9.0\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\n *\n * @param {number} t - The percentage of interpolation, between 0 and 1.\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\n *\n * @return {number} The interpolated value.\n */\nvar SmoothStepInterpolation = function (t, min, max)\n{\n return min + (max - min) * SmoothStep(t, 0, 1);\n};\n\nmodule.exports = SmoothStepInterpolation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SmootherStep = require('../SmootherStep');\n\n/**\n * A Smoother Step interpolation method.\n *\n * @function Phaser.Math.Interpolation.SmootherStep\n * @since 3.9.0\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\n *\n * @param {number} t - The percentage of interpolation, between 0 and 1.\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\n *\n * @return {number} The interpolated value.\n */\nvar SmootherStepInterpolation = function (t, min, max)\n{\n return min + (max - min) * SmootherStep(t, 0, 1);\n};\n\nmodule.exports = SmootherStepInterpolation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Interpolation\n */\n\nmodule.exports = {\n\n Bezier: require('./BezierInterpolation'),\n CatmullRom: require('./CatmullRomInterpolation'),\n CubicBezier: require('./CubicBezierInterpolation'),\n Linear: require('./LinearInterpolation'),\n QuadraticBezier: require('./QuadraticBezierInterpolation'),\n SmoothStep: require('./SmoothStepInterpolation'),\n SmootherStep: require('./SmootherStepInterpolation')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Returns the nearest power of 2 to the given `value`.\n *\n * @function Phaser.Math.Pow2.GetNext\n * @since 3.0.0\n *\n * @param {number} value - The value.\n *\n * @return {integer} The nearest power of 2 to `value`.\n */\nvar GetPowerOfTwo = function (value)\n{\n var index = Math.log(value) / 0.6931471805599453;\n\n return (1 << Math.ceil(index));\n};\n\nmodule.exports = GetPowerOfTwo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Checks if the given `width` and `height` are a power of two.\n * Useful for checking texture dimensions.\n *\n * @function Phaser.Math.Pow2.IsSize\n * @since 3.0.0\n *\n * @param {number} width - The width.\n * @param {number} height - The height.\n *\n * @return {boolean} `true` if `width` and `height` are a power of two, otherwise `false`.\n */\nvar IsSizePowerOfTwo = function (width, height)\n{\n return (width > 0 && (width & (width - 1)) === 0 && height > 0 && (height & (height - 1)) === 0);\n};\n\nmodule.exports = IsSizePowerOfTwo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Tests the value and returns `true` if it is a power of two.\n *\n * @function Phaser.Math.Pow2.IsValue\n * @since 3.0.0\n *\n * @param {number} value - The value to check if it's a power of two.\n *\n * @return {boolean} Returns `true` if `value` is a power of two, otherwise `false`.\n */\nvar IsValuePowerOfTwo = function (value)\n{\n return (value > 0 && (value & (value - 1)) === 0);\n};\n\nmodule.exports = IsValuePowerOfTwo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Pow2\n */\n\nmodule.exports = {\n\n GetNext: require('./GetPowerOfTwo'),\n IsSize: require('./IsSizePowerOfTwo'),\n IsValue: require('./IsValuePowerOfTwo')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\n\n/**\n * @classdesc\n * A seeded Random Data Generator.\n * \n * Access via `Phaser.Math.RND` which is an instance of this class pre-defined\n * by Phaser. Or, create your own instance to use as you require.\n * \n * The `Math.RND` generator is seeded by the Game Config property value `seed`.\n * If no such config property exists, a random number is used.\n * \n * If you create your own instance of this class you should provide a seed for it.\n * If no seed is given it will use a 'random' one based on Date.now.\n *\n * @class RandomDataGenerator\n * @memberof Phaser.Math\n * @constructor\n * @since 3.0.0\n *\n * @param {(string|string[])} [seeds] - The seeds to use for the random number generator.\n */\nvar RandomDataGenerator = new Class({\n\n initialize:\n\n function RandomDataGenerator (seeds)\n {\n if (seeds === undefined) { seeds = [ (Date.now() * Math.random()).toString() ]; }\n\n /**\n * Internal var.\n *\n * @name Phaser.Math.RandomDataGenerator#c\n * @type {number}\n * @default 1\n * @private\n * @since 3.0.0\n */\n this.c = 1;\n\n /**\n * Internal var.\n *\n * @name Phaser.Math.RandomDataGenerator#s0\n * @type {number}\n * @default 0\n * @private\n * @since 3.0.0\n */\n this.s0 = 0;\n\n /**\n * Internal var.\n *\n * @name Phaser.Math.RandomDataGenerator#s1\n * @type {number}\n * @default 0\n * @private\n * @since 3.0.0\n */\n this.s1 = 0;\n\n /**\n * Internal var.\n *\n * @name Phaser.Math.RandomDataGenerator#s2\n * @type {number}\n * @default 0\n * @private\n * @since 3.0.0\n */\n this.s2 = 0;\n\n /**\n * Internal var.\n *\n * @name Phaser.Math.RandomDataGenerator#n\n * @type {number}\n * @default 0\n * @private\n * @since 3.2.0\n */\n this.n = 0;\n\n /**\n * Signs to choose from.\n *\n * @name Phaser.Math.RandomDataGenerator#signs\n * @type {number[]}\n * @since 3.0.0\n */\n this.signs = [ -1, 1 ];\n\n if (seeds)\n {\n this.init(seeds);\n }\n },\n\n /**\n * Private random helper.\n *\n * @method Phaser.Math.RandomDataGenerator#rnd\n * @since 3.0.0\n * @private\n *\n * @return {number} A random number.\n */\n rnd: function ()\n {\n var t = 2091639 * this.s0 + this.c * 2.3283064365386963e-10; // 2^-32\n\n this.c = t | 0;\n this.s0 = this.s1;\n this.s1 = this.s2;\n this.s2 = t - this.c;\n\n return this.s2;\n },\n\n /**\n * Internal method that creates a seed hash.\n *\n * @method Phaser.Math.RandomDataGenerator#hash\n * @since 3.0.0\n * @private\n *\n * @param {string} data - The value to hash.\n *\n * @return {number} The hashed value.\n */\n hash: function (data)\n {\n var h;\n var n = this.n;\n\n data = data.toString();\n\n for (var i = 0; i < data.length; i++)\n {\n n += data.charCodeAt(i);\n h = 0.02519603282416938 * n;\n n = h >>> 0;\n h -= n;\n h *= n;\n n = h >>> 0;\n h -= n;\n n += h * 0x100000000;// 2^32\n }\n\n this.n = n;\n\n return (n >>> 0) * 2.3283064365386963e-10;// 2^-32\n },\n\n /**\n * Initialize the state of the random data generator.\n *\n * @method Phaser.Math.RandomDataGenerator#init\n * @since 3.0.0\n *\n * @param {(string|string[])} seeds - The seeds to initialize the random data generator with.\n */\n init: function (seeds)\n {\n if (typeof seeds === 'string')\n {\n this.state(seeds);\n }\n else\n {\n this.sow(seeds);\n }\n },\n\n /**\n * Reset the seed of the random data generator.\n *\n * _Note_: the seed array is only processed up to the first `undefined` (or `null`) value, should such be present.\n *\n * @method Phaser.Math.RandomDataGenerator#sow\n * @since 3.0.0\n *\n * @param {string[]} seeds - The array of seeds: the `toString()` of each value is used.\n */\n sow: function (seeds)\n {\n // Always reset to default seed\n this.n = 0xefc8249d;\n this.s0 = this.hash(' ');\n this.s1 = this.hash(' ');\n this.s2 = this.hash(' ');\n this.c = 1;\n\n if (!seeds)\n {\n return;\n }\n\n // Apply any seeds\n for (var i = 0; i < seeds.length && (seeds[i] != null); i++)\n {\n var seed = seeds[i];\n\n this.s0 -= this.hash(seed);\n this.s0 += ~~(this.s0 < 0);\n this.s1 -= this.hash(seed);\n this.s1 += ~~(this.s1 < 0);\n this.s2 -= this.hash(seed);\n this.s2 += ~~(this.s2 < 0);\n }\n },\n\n /**\n * Returns a random integer between 0 and 2^32.\n *\n * @method Phaser.Math.RandomDataGenerator#integer\n * @since 3.0.0\n *\n * @return {number} A random integer between 0 and 2^32.\n */\n integer: function ()\n {\n // 2^32\n return this.rnd() * 0x100000000;\n },\n\n /**\n * Returns a random real number between 0 and 1.\n *\n * @method Phaser.Math.RandomDataGenerator#frac\n * @since 3.0.0\n *\n * @return {number} A random real number between 0 and 1.\n */\n frac: function ()\n {\n // 2^-53\n return this.rnd() + (this.rnd() * 0x200000 | 0) * 1.1102230246251565e-16;\n },\n\n /**\n * Returns a random real number between 0 and 2^32.\n *\n * @method Phaser.Math.RandomDataGenerator#real\n * @since 3.0.0\n *\n * @return {number} A random real number between 0 and 2^32.\n */\n real: function ()\n {\n return this.integer() + this.frac();\n },\n\n /**\n * Returns a random integer between and including min and max.\n *\n * @method Phaser.Math.RandomDataGenerator#integerInRange\n * @since 3.0.0\n *\n * @param {number} min - The minimum value in the range.\n * @param {number} max - The maximum value in the range.\n *\n * @return {number} A random number between min and max.\n */\n integerInRange: function (min, max)\n {\n return Math.floor(this.realInRange(0, max - min + 1) + min);\n },\n\n /**\n * Returns a random integer between and including min and max.\n * This method is an alias for RandomDataGenerator.integerInRange.\n *\n * @method Phaser.Math.RandomDataGenerator#between\n * @since 3.0.0\n *\n * @param {number} min - The minimum value in the range.\n * @param {number} max - The maximum value in the range.\n *\n * @return {number} A random number between min and max.\n */\n between: function (min, max)\n {\n return Math.floor(this.realInRange(0, max - min + 1) + min);\n },\n\n /**\n * Returns a random real number between min and max.\n *\n * @method Phaser.Math.RandomDataGenerator#realInRange\n * @since 3.0.0\n *\n * @param {number} min - The minimum value in the range.\n * @param {number} max - The maximum value in the range.\n *\n * @return {number} A random number between min and max.\n */\n realInRange: function (min, max)\n {\n return this.frac() * (max - min) + min;\n },\n\n /**\n * Returns a random real number between -1 and 1.\n *\n * @method Phaser.Math.RandomDataGenerator#normal\n * @since 3.0.0\n *\n * @return {number} A random real number between -1 and 1.\n */\n normal: function ()\n {\n return 1 - (2 * this.frac());\n },\n\n /**\n * Returns a valid RFC4122 version4 ID hex string from https://gist.github.com/1308368\n *\n * @method Phaser.Math.RandomDataGenerator#uuid\n * @since 3.0.0\n *\n * @return {string} A valid RFC4122 version4 ID hex string\n */\n uuid: function ()\n {\n var a = '';\n var b = '';\n\n for (b = a = ''; a++ < 36; b += ~a % 5 | a * 3 & 4 ? (a ^ 15 ? 8 ^ this.frac() * (a ^ 20 ? 16 : 4) : 4).toString(16) : '-')\n {\n // eslint-disable-next-line no-empty\n }\n\n return b;\n },\n\n /**\n * Returns a random element from within the given array.\n *\n * @method Phaser.Math.RandomDataGenerator#pick\n * @since 3.0.0\n * \n * @generic T\n * @genericUse {T[]} - [array]\n * @genericUse {T} - [$return]\n *\n * @param {T[]} array - The array to pick a random element from.\n *\n * @return {T} A random member of the array.\n */\n pick: function (array)\n {\n return array[this.integerInRange(0, array.length - 1)];\n },\n\n /**\n * Returns a sign to be used with multiplication operator.\n *\n * @method Phaser.Math.RandomDataGenerator#sign\n * @since 3.0.0\n *\n * @return {number} -1 or +1.\n */\n sign: function ()\n {\n return this.pick(this.signs);\n },\n\n /**\n * Returns a random element from within the given array, favoring the earlier entries.\n *\n * @method Phaser.Math.RandomDataGenerator#weightedPick\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[]} - [array]\n * @genericUse {T} - [$return]\n *\n * @param {T[]} array - The array to pick a random element from.\n *\n * @return {T} A random member of the array.\n */\n weightedPick: function (array)\n {\n return array[~~(Math.pow(this.frac(), 2) * (array.length - 1) + 0.5)];\n },\n\n /**\n * Returns a random timestamp between min and max, or between the beginning of 2000 and the end of 2020 if min and max aren't specified.\n *\n * @method Phaser.Math.RandomDataGenerator#timestamp\n * @since 3.0.0\n *\n * @param {number} min - The minimum value in the range.\n * @param {number} max - The maximum value in the range.\n *\n * @return {number} A random timestamp between min and max.\n */\n timestamp: function (min, max)\n {\n return this.realInRange(min || 946684800000, max || 1577862000000);\n },\n\n /**\n * Returns a random angle between -180 and 180.\n *\n * @method Phaser.Math.RandomDataGenerator#angle\n * @since 3.0.0\n *\n * @return {number} A random number between -180 and 180.\n */\n angle: function ()\n {\n return this.integerInRange(-180, 180);\n },\n\n /**\n * Returns a random rotation in radians, between -3.141 and 3.141\n *\n * @method Phaser.Math.RandomDataGenerator#rotation\n * @since 3.0.0\n *\n * @return {number} A random number between -3.141 and 3.141\n */\n rotation: function ()\n {\n return this.realInRange(-3.1415926, 3.1415926);\n },\n\n /**\n * Gets or Sets the state of the generator. This allows you to retain the values\n * that the generator is using between games, i.e. in a game save file.\n *\n * To seed this generator with a previously saved state you can pass it as the\n * `seed` value in your game config, or call this method directly after Phaser has booted.\n *\n * Call this method with no parameters to return the current state.\n *\n * If providing a state it should match the same format that this method\n * returns, which is a string with a header `!rnd` followed by the `c`,\n * `s0`, `s1` and `s2` values respectively, each comma-delimited.\n *\n * @method Phaser.Math.RandomDataGenerator#state\n * @since 3.0.0\n *\n * @param {string} [state] - Generator state to be set.\n *\n * @return {string} The current state of the generator.\n */\n state: function (state)\n {\n if (typeof state === 'string' && state.match(/^!rnd/))\n {\n state = state.split(',');\n\n this.c = parseFloat(state[1]);\n this.s0 = parseFloat(state[2]);\n this.s1 = parseFloat(state[3]);\n this.s2 = parseFloat(state[4]);\n }\n\n return [ '!rnd', this.c, this.s0, this.s1, this.s2 ].join(',');\n },\n\n /**\n * Shuffles the given array, using the current seed.\n *\n * @method Phaser.Math.RandomDataGenerator#shuffle\n * @since 3.7.0\n *\n * @generic T\n * @genericUse {T[]} - [array,$return]\n *\n * @param {T[]} [array] - The array to be shuffled.\n *\n * @return {T[]} The shuffled array.\n */\n shuffle: function (array)\n {\n var len = array.length - 1;\n\n for (var i = len; i > 0; i--)\n {\n var randomIndex = Math.floor(this.frac() * (i + 1));\n var itemAtIndex = array[randomIndex];\n\n array[randomIndex] = array[i];\n array[i] = itemAtIndex;\n }\n\n return array;\n }\n\n});\n\nmodule.exports = RandomDataGenerator;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Snap a value to nearest grid slice, using ceil.\n *\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `15`.\n * As will `14` snap to `15`... but `16` will snap to `20`.\n *\n * @function Phaser.Math.Snap.Ceil\n * @since 3.0.0\n *\n * @param {number} value - The value to snap.\n * @param {number} gap - The interval gap of the grid.\n * @param {number} [start=0] - Optional starting offset for gap.\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\n *\n * @return {number} The snapped value.\n */\nvar SnapCeil = function (value, gap, start, divide)\n{\n if (start === undefined) { start = 0; }\n\n if (gap === 0)\n {\n return value;\n }\n\n value -= start;\n value = gap * Math.ceil(value / gap);\n\n return (divide) ? (start + value) / gap : start + value;\n};\n\nmodule.exports = SnapCeil;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Snap a value to nearest grid slice, using floor.\n *\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10`.\n * As will `14` snap to `10`... but `16` will snap to `15`.\n *\n * @function Phaser.Math.Snap.Floor\n * @since 3.0.0\n *\n * @param {number} value - The value to snap.\n * @param {number} gap - The interval gap of the grid.\n * @param {number} [start=0] - Optional starting offset for gap.\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\n *\n * @return {number} The snapped value.\n */\nvar SnapFloor = function (value, gap, start, divide)\n{\n if (start === undefined) { start = 0; }\n\n if (gap === 0)\n {\n return value;\n }\n\n value -= start;\n value = gap * Math.floor(value / gap);\n\n return (divide) ? (start + value) / gap : start + value;\n};\n\nmodule.exports = SnapFloor;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Snap a value to nearest grid slice, using rounding.\n *\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10` whereas `14` will snap to `15`.\n *\n * @function Phaser.Math.Snap.To\n * @since 3.0.0\n *\n * @param {number} value - The value to snap.\n * @param {number} gap - The interval gap of the grid.\n * @param {number} [start=0] - Optional starting offset for gap.\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\n *\n * @return {number} The snapped value.\n */\nvar SnapTo = function (value, gap, start, divide)\n{\n if (start === undefined) { start = 0; }\n\n if (gap === 0)\n {\n return value;\n }\n\n value -= start;\n value = gap * Math.round(value / gap);\n\n return (divide) ? (start + value) / gap : start + value;\n};\n\nmodule.exports = SnapTo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Snap\n */\n\nmodule.exports = {\n\n Ceil: require('./SnapCeil'),\n Floor: require('./SnapFloor'),\n To: require('./SnapTo')\n\n};\n","/**\n* @author Richard Davey \n* @copyright 2020 Photon Storm Ltd.\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\n*/\n\nvar Class = require('../utils/Class');\n\n/**\n * @classdesc\n * A Global Plugin is installed just once into the Game owned Plugin Manager.\n * It can listen for Game events and respond to them.\n *\n * @class BasePlugin\n * @memberof Phaser.Plugins\n * @constructor\n * @since 3.8.0\n *\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\n */\nvar BasePlugin = new Class({\n\n initialize:\n\n function BasePlugin (pluginManager)\n {\n /**\n * A handy reference to the Plugin Manager that is responsible for this plugin.\n * Can be used as a route to gain access to game systems and events.\n *\n * @name Phaser.Plugins.BasePlugin#pluginManager\n * @type {Phaser.Plugins.PluginManager}\n * @protected\n * @since 3.8.0\n */\n this.pluginManager = pluginManager;\n\n /**\n * A reference to the Game instance this plugin is running under.\n *\n * @name Phaser.Plugins.BasePlugin#game\n * @type {Phaser.Game}\n * @protected\n * @since 3.8.0\n */\n this.game = pluginManager.game;\n },\n\n /**\n * The PluginManager calls this method on a Global Plugin when the plugin is first instantiated.\n * It will never be called again on this instance.\n * In here you can set-up whatever you need for this plugin to run.\n * If a plugin is set to automatically start then `BasePlugin.start` will be called immediately after this.\n * On a Scene Plugin, this method is never called. Use {@link Phaser.Plugins.ScenePlugin#boot} instead.\n *\n * @method Phaser.Plugins.BasePlugin#init\n * @since 3.8.0\n *\n * @param {?any} [data] - A value specified by the user, if any, from the `data` property of the plugin's configuration object (if started at game boot) or passed in the PluginManager's `install` method (if started manually).\n */\n init: function ()\n {\n },\n\n /**\n * The PluginManager calls this method on a Global Plugin when the plugin is started.\n * If a plugin is stopped, and then started again, this will get called again.\n * Typically called immediately after `BasePlugin.init`.\n * On a Scene Plugin, this method is never called.\n *\n * @method Phaser.Plugins.BasePlugin#start\n * @since 3.8.0\n */\n start: function ()\n {\n // Here are the game-level events you can listen to.\n // At the very least you should offer a destroy handler for when the game closes down.\n\n // var eventEmitter = this.game.events;\n\n // eventEmitter.once('destroy', this.gameDestroy, this);\n // eventEmitter.on('pause', this.gamePause, this);\n // eventEmitter.on('resume', this.gameResume, this);\n // eventEmitter.on('resize', this.gameResize, this);\n // eventEmitter.on('prestep', this.gamePreStep, this);\n // eventEmitter.on('step', this.gameStep, this);\n // eventEmitter.on('poststep', this.gamePostStep, this);\n // eventEmitter.on('prerender', this.gamePreRender, this);\n // eventEmitter.on('postrender', this.gamePostRender, this);\n },\n\n /**\n * The PluginManager calls this method on a Global Plugin when the plugin is stopped.\n * The game code has requested that your plugin stop doing whatever it does.\n * It is now considered as 'inactive' by the PluginManager.\n * Handle that process here (i.e. stop listening for events, etc)\n * If the plugin is started again then `BasePlugin.start` will be called again.\n * On a Scene Plugin, this method is never called.\n *\n * @method Phaser.Plugins.BasePlugin#stop\n * @since 3.8.0\n */\n stop: function ()\n {\n },\n\n /**\n * Game instance has been destroyed.\n * You must release everything in here, all references, all objects, free it all up.\n *\n * @method Phaser.Plugins.BasePlugin#destroy\n * @since 3.8.0\n */\n destroy: function ()\n {\n this.pluginManager = null;\n this.game = null;\n this.scene = null;\n this.systems = null;\n }\n\n});\n\nmodule.exports = BasePlugin;\n","/**\n* @author Richard Davey \n* @copyright 2020 Photon Storm Ltd.\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\n*/\n\nvar BasePlugin = require('./BasePlugin');\nvar Class = require('../utils/Class');\nvar SceneEvents = require('../scene/events');\n\n/**\n * @classdesc\n * A Scene Level Plugin is installed into every Scene and belongs to that Scene.\n * It can listen for Scene events and respond to them.\n * It can map itself to a Scene property, or into the Scene Systems, or both.\n *\n * @class ScenePlugin\n * @memberof Phaser.Plugins\n * @extends Phaser.Plugins.BasePlugin\n * @constructor\n * @since 3.8.0\n *\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\n */\nvar ScenePlugin = new Class({\n\n Extends: BasePlugin,\n\n initialize:\n\n function ScenePlugin (scene, pluginManager)\n {\n BasePlugin.call(this, pluginManager);\n\n /**\n * A reference to the Scene that has installed this plugin.\n * Only set if it's a Scene Plugin, otherwise `null`.\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\n * You can use it during the `boot` method.\n *\n * @name Phaser.Plugins.ScenePlugin#scene\n * @type {?Phaser.Scene}\n * @protected\n * @since 3.8.0\n */\n this.scene = scene;\n\n /**\n * A reference to the Scene Systems of the Scene that has installed this plugin.\n * Only set if it's a Scene Plugin, otherwise `null`.\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\n * You can use it during the `boot` method.\n *\n * @name Phaser.Plugins.ScenePlugin#systems\n * @type {?Phaser.Scenes.Systems}\n * @protected\n * @since 3.8.0\n */\n this.systems = scene.sys;\n\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\n },\n\n /**\n * This method is called when the Scene boots. It is only ever called once.\n *\n * By this point the plugin properties `scene` and `systems` will have already been set.\n *\n * In here you can listen for {@link Phaser.Scenes.Events Scene events} and set-up whatever you need for this plugin to run.\n * Here are the Scene events you can listen to:\n *\n * - start\n * - ready\n * - preupdate\n * - update\n * - postupdate\n * - resize\n * - pause\n * - resume\n * - sleep\n * - wake\n * - transitioninit\n * - transitionstart\n * - transitioncomplete\n * - transitionout\n * - shutdown\n * - destroy\n *\n * At the very least you should offer a destroy handler for when the Scene closes down, i.e:\n *\n * ```javascript\n * var eventEmitter = this.systems.events;\n * eventEmitter.once('destroy', this.sceneDestroy, this);\n * ```\n *\n * @method Phaser.Plugins.ScenePlugin#boot\n * @since 3.8.0\n */\n boot: function ()\n {\n },\n\n /**\n * Game instance has been destroyed.\n * \n * You must release everything in here, all references, all objects, free it all up.\n *\n * @method Phaser.Plugins.ScenePlugin#destroy\n * @since 3.8.0\n */\n destroy: function ()\n {\n this.pluginManager = null;\n this.game = null;\n this.scene = null;\n this.systems = null;\n }\n\n});\n\nmodule.exports = ScenePlugin;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Phaser Blend Modes.\n * \n * @namespace Phaser.BlendModes\n * @since 3.0.0\n */\n\nmodule.exports = {\n\n /**\n * Skips the Blend Mode check in the renderer.\n * \n * @name Phaser.BlendModes.SKIP_CHECK\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n SKIP_CHECK: -1,\n\n /**\n * Normal blend mode. For Canvas and WebGL.\n * This is the default setting and draws new shapes on top of the existing canvas content.\n * \n * @name Phaser.BlendModes.NORMAL\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n NORMAL: 0,\n\n /**\n * Add blend mode. For Canvas and WebGL.\n * Where both shapes overlap the color is determined by adding color values.\n * \n * @name Phaser.BlendModes.ADD\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n ADD: 1,\n\n /**\n * Multiply blend mode. For Canvas and WebGL.\n * The pixels are of the top layer are multiplied with the corresponding pixel of the bottom layer. A darker picture is the result.\n * \n * @name Phaser.BlendModes.MULTIPLY\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n MULTIPLY: 2,\n\n /**\n * Screen blend mode. For Canvas and WebGL.\n * The pixels are inverted, multiplied, and inverted again. A lighter picture is the result (opposite of multiply)\n * \n * @name Phaser.BlendModes.SCREEN\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n SCREEN: 3,\n\n /**\n * Overlay blend mode. For Canvas only.\n * A combination of multiply and screen. Dark parts on the base layer become darker, and light parts become lighter.\n * \n * @name Phaser.BlendModes.OVERLAY\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n OVERLAY: 4,\n\n /**\n * Darken blend mode. For Canvas only.\n * Retains the darkest pixels of both layers.\n * \n * @name Phaser.BlendModes.DARKEN\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n DARKEN: 5,\n\n /**\n * Lighten blend mode. For Canvas only.\n * Retains the lightest pixels of both layers.\n * \n * @name Phaser.BlendModes.LIGHTEN\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n LIGHTEN: 6,\n\n /**\n * Color Dodge blend mode. For Canvas only.\n * Divides the bottom layer by the inverted top layer.\n * \n * @name Phaser.BlendModes.COLOR_DODGE\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n COLOR_DODGE: 7,\n\n /**\n * Color Burn blend mode. For Canvas only.\n * Divides the inverted bottom layer by the top layer, and then inverts the result.\n * \n * @name Phaser.BlendModes.COLOR_BURN\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n COLOR_BURN: 8,\n\n /**\n * Hard Light blend mode. For Canvas only.\n * A combination of multiply and screen like overlay, but with top and bottom layer swapped.\n * \n * @name Phaser.BlendModes.HARD_LIGHT\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n HARD_LIGHT: 9,\n\n /**\n * Soft Light blend mode. For Canvas only.\n * A softer version of hard-light. Pure black or white does not result in pure black or white.\n * \n * @name Phaser.BlendModes.SOFT_LIGHT\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n SOFT_LIGHT: 10,\n\n /**\n * Difference blend mode. For Canvas only.\n * Subtracts the bottom layer from the top layer or the other way round to always get a positive value.\n * \n * @name Phaser.BlendModes.DIFFERENCE\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n DIFFERENCE: 11,\n\n /**\n * Exclusion blend mode. For Canvas only.\n * Like difference, but with lower contrast.\n * \n * @name Phaser.BlendModes.EXCLUSION\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n EXCLUSION: 12,\n\n /**\n * Hue blend mode. For Canvas only.\n * Preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer.\n * \n * @name Phaser.BlendModes.HUE\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n HUE: 13,\n\n /**\n * Saturation blend mode. For Canvas only.\n * Preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer.\n * \n * @name Phaser.BlendModes.SATURATION\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n SATURATION: 14,\n\n /**\n * Color blend mode. For Canvas only.\n * Preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer.\n * \n * @name Phaser.BlendModes.COLOR\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n COLOR: 15,\n\n /**\n * Luminosity blend mode. For Canvas only.\n * Preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer.\n * \n * @name Phaser.BlendModes.LUMINOSITY\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n LUMINOSITY: 16,\n\n /**\n * Alpha erase blend mode. For Canvas and WebGL.\n * \n * @name Phaser.BlendModes.ERASE\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n ERASE: 17,\n\n /**\n * Source-in blend mode. For Canvas only.\n * The new shape is drawn only where both the new shape and the destination canvas overlap. Everything else is made transparent.\n * \n * @name Phaser.BlendModes.SOURCE_IN\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n SOURCE_IN: 18,\n\n /**\n * Source-out blend mode. For Canvas only.\n * The new shape is drawn where it doesn't overlap the existing canvas content.\n * \n * @name Phaser.BlendModes.SOURCE_OUT\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n SOURCE_OUT: 19,\n\n /**\n * Source-out blend mode. For Canvas only.\n * The new shape is only drawn where it overlaps the existing canvas content.\n * \n * @name Phaser.BlendModes.SOURCE_ATOP\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n SOURCE_ATOP: 20,\n\n /**\n * Destination-over blend mode. For Canvas only.\n * New shapes are drawn behind the existing canvas content.\n * \n * @name Phaser.BlendModes.DESTINATION_OVER\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n DESTINATION_OVER: 21,\n\n /**\n * Destination-in blend mode. For Canvas only.\n * The existing canvas content is kept where both the new shape and existing canvas content overlap. Everything else is made transparent.\n * \n * @name Phaser.BlendModes.DESTINATION_IN\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n DESTINATION_IN: 22,\n\n /**\n * Destination-out blend mode. For Canvas only.\n * The existing content is kept where it doesn't overlap the new shape.\n * \n * @name Phaser.BlendModes.DESTINATION_OUT\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n DESTINATION_OUT: 23,\n\n /**\n * Destination-out blend mode. For Canvas only.\n * The existing canvas is only kept where it overlaps the new shape. The new shape is drawn behind the canvas content.\n * \n * @name Phaser.BlendModes.DESTINATION_ATOP\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n DESTINATION_ATOP: 24,\n\n /**\n * Lighten blend mode. For Canvas only.\n * Where both shapes overlap the color is determined by adding color values.\n * \n * @name Phaser.BlendModes.LIGHTER\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n LIGHTER: 25,\n\n /**\n * Copy blend mode. For Canvas only.\n * Only the new shape is shown.\n * \n * @name Phaser.BlendModes.COPY\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n COPY: 26,\n\n /**\n * Xor blend mode. For Canvas only.\n * Shapes are made transparent where both overlap and drawn normal everywhere else.\n * \n * @name Phaser.BlendModes.XOR\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n XOR: 27\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scale Manager Resize Event.\n * \n * This event is dispatched whenever the Scale Manager detects a resize event from the browser.\n * It sends three parameters to the callback, each of them being Size components. You can read\n * the `width`, `height`, `aspectRatio` and other properties of these components to help with\n * scaling your own game content.\n *\n * @event Phaser.Scale.Events#RESIZE\n * @since 3.16.1\n * \n * @param {Phaser.Structs.Size} gameSize - A reference to the Game Size component. This is the un-scaled size of your game canvas.\n * @param {Phaser.Structs.Size} baseSize - A reference to the Base Size component. This is the game size multiplied by resolution.\n * @param {Phaser.Structs.Size} displaySize - A reference to the Display Size component. This is the scaled canvas size, after applying zoom and scale mode.\n * @param {number} resolution - The current resolution. Defaults to 1 at the moment.\n * @param {number} previousWidth - If the `gameSize` has changed, this value contains its previous width, otherwise it contains the current width.\n * @param {number} previousHeight - If the `gameSize` has changed, this value contains its previous height, otherwise it contains the current height.\n */\nmodule.exports = 'resize';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Added to Scene Event.\n *\n * This event is dispatched when a Game Object is added to a Scene.\n *\n * Listen for it from a Scene using `this.scene.events.on('addedtoscene', listener)`.\n *\n * @event Phaser.Scenes.Events#ADDED_TO_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\n */\nmodule.exports = 'addedtoscene';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Boot Event.\n * \n * This event is dispatched by a Scene during the Scene Systems boot process. Primarily used by Scene Plugins.\n * \n * Listen to it from a Scene using `this.scene.events.on('boot', listener)`.\n * \n * @event Phaser.Scenes.Events#BOOT\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n */\nmodule.exports = 'boot';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Create Event.\n * \n * This event is dispatched by a Scene after it has been created by the Scene Manager.\n * \n * If a Scene has a `create` method then this event is emitted _after_ that has run.\n * \n * If there is a transition, this event will be fired after the `TRANSITION_START` event.\n * \n * Listen to it from a Scene using `this.scene.events.on('create', listener)`.\n * \n * @event Phaser.Scenes.Events#CREATE\n * @since 3.17.0\n * \n * @param {Phaser.Scene} scene - A reference to the Scene that emitted this event.\n */\nmodule.exports = 'create';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Destroy Event.\n * \n * This event is dispatched by a Scene during the Scene Systems destroy process.\n * \n * Listen to it from a Scene using `this.scene.events.on('destroy', listener)`.\n * \n * You should destroy any resources that may be in use by your Scene in this event handler.\n * \n * @event Phaser.Scenes.Events#DESTROY\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n */\nmodule.exports = 'destroy';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Pause Event.\n * \n * This event is dispatched by a Scene when it is paused, either directly via the `pause` method, or as an\n * action from another Scene.\n * \n * Listen to it from a Scene using `this.scene.events.on('pause', listener)`.\n * \n * @event Phaser.Scenes.Events#PAUSE\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {any} [data] - An optional data object that was passed to this Scene when it was paused.\n */\nmodule.exports = 'pause';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Post Update Event.\n * \n * This event is dispatched by a Scene during the main game loop step.\n * \n * The event flow for a single step of a Scene is as follows:\n * \n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\n * 3. The `Scene.update` method is called, if it exists\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n * \n * Listen to it from a Scene using `this.scene.events.on('postupdate', listener)`.\n * \n * A Scene will only run its step if it is active.\n * \n * @event Phaser.Scenes.Events#POST_UPDATE\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\n */\nmodule.exports = 'postupdate';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Pre Update Event.\n * \n * This event is dispatched by a Scene during the main game loop step.\n * \n * The event flow for a single step of a Scene is as follows:\n * \n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\n * 3. The `Scene.update` method is called, if it exists\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n * \n * Listen to it from a Scene using `this.scene.events.on('preupdate', listener)`.\n * \n * A Scene will only run its step if it is active.\n * \n * @event Phaser.Scenes.Events#PRE_UPDATE\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\n */\nmodule.exports = 'preupdate';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Ready Event.\n * \n * This event is dispatched by a Scene during the Scene Systems start process.\n * By this point in the process the Scene is now fully active and rendering.\n * This event is meant for your game code to use, as all plugins have responded to the earlier 'start' event.\n * \n * Listen to it from a Scene using `this.scene.events.on('ready', listener)`.\n * \n * @event Phaser.Scenes.Events#READY\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {any} [data] - An optional data object that was passed to this Scene when it was started.\n */\nmodule.exports = 'ready';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Removed from Scene Event.\n *\n * This event is dispatched when a Game Object is removed from a Scene.\n *\n * Listen for it from a Scene using `this.scene.events.on('removedfromscene', listener)`.\n *\n * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\n */\nmodule.exports = 'removedfromscene';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Render Event.\n * \n * This event is dispatched by a Scene during the main game loop step.\n * \n * The event flow for a single step of a Scene is as follows:\n * \n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\n * 3. The `Scene.update` method is called, if it exists\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n * \n * Listen to it from a Scene using `this.scene.events.on('render', listener)`.\n * \n * A Scene will only render if it is visible and active.\n * By the time this event is dispatched, the Scene will have already been rendered.\n * \n * @event Phaser.Scenes.Events#RENDER\n * @since 3.0.0\n * \n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\n */\nmodule.exports = 'render';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Resume Event.\n * \n * This event is dispatched by a Scene when it is resumed from a paused state, either directly via the `resume` method,\n * or as an action from another Scene.\n * \n * Listen to it from a Scene using `this.scene.events.on('resume', listener)`.\n * \n * @event Phaser.Scenes.Events#RESUME\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {any} [data] - An optional data object that was passed to this Scene when it was resumed.\n */\nmodule.exports = 'resume';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Shutdown Event.\n * \n * This event is dispatched by a Scene during the Scene Systems shutdown process.\n * \n * Listen to it from a Scene using `this.scene.events.on('shutdown', listener)`.\n * \n * You should free-up any resources that may be in use by your Scene in this event handler, on the understanding\n * that the Scene may, at any time, become active again. A shutdown Scene is not 'destroyed', it's simply not\n * currently active. Use the [DESTROY]{@linkcode Phaser.Scenes.Events#event:DESTROY} event to completely clear resources.\n * \n * @event Phaser.Scenes.Events#SHUTDOWN\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {any} [data] - An optional data object that was passed to this Scene when it was shutdown.\n */\nmodule.exports = 'shutdown';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Sleep Event.\n * \n * This event is dispatched by a Scene when it is sent to sleep, either directly via the `sleep` method,\n * or as an action from another Scene.\n * \n * Listen to it from a Scene using `this.scene.events.on('sleep', listener)`.\n * \n * @event Phaser.Scenes.Events#SLEEP\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {any} [data] - An optional data object that was passed to this Scene when it was sent to sleep.\n */\nmodule.exports = 'sleep';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Start Event.\n * \n * This event is dispatched by a Scene during the Scene Systems start process. Primarily used by Scene Plugins.\n * \n * Listen to it from a Scene using `this.scene.events.on('start', listener)`.\n * \n * @event Phaser.Scenes.Events#START\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n */\nmodule.exports = 'start';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Transition Complete Event.\n * \n * This event is dispatched by the Target Scene of a transition.\n * \n * It happens when the transition process has completed. This occurs when the duration timer equals or exceeds the duration\n * of the transition.\n * \n * Listen to it from a Scene using `this.scene.events.on('transitioncomplete', listener)`.\n * \n * The Scene Transition event flow is as follows:\n * \n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\n * \n * @event Phaser.Scenes.Events#TRANSITION_COMPLETE\n * @since 3.5.0\n * \n * @param {Phaser.Scene} scene -The Scene on which the transitioned completed.\n */\nmodule.exports = 'transitioncomplete';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Transition Init Event.\n * \n * This event is dispatched by the Target Scene of a transition.\n * \n * It happens immediately after the `Scene.init` method is called. If the Scene does not have an `init` method,\n * this event is not dispatched.\n * \n * Listen to it from a Scene using `this.scene.events.on('transitioninit', listener)`.\n * \n * The Scene Transition event flow is as follows:\n * \n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\n * \n * @event Phaser.Scenes.Events#TRANSITION_INIT\n * @since 3.5.0\n * \n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\n * @param {number} duration - The duration of the transition in ms.\n */\nmodule.exports = 'transitioninit';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Transition Out Event.\n * \n * This event is dispatched by a Scene when it initiates a transition to another Scene.\n * \n * Listen to it from a Scene using `this.scene.events.on('transitionout', listener)`.\n * \n * The Scene Transition event flow is as follows:\n * \n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\n * \n * @event Phaser.Scenes.Events#TRANSITION_OUT\n * @since 3.5.0\n * \n * @param {Phaser.Scene} target - A reference to the Scene that is being transitioned to.\n * @param {number} duration - The duration of the transition in ms.\n */\nmodule.exports = 'transitionout';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Transition Start Event.\n * \n * This event is dispatched by the Target Scene of a transition, only if that Scene was not asleep.\n * \n * It happens immediately after the `Scene.create` method is called. If the Scene does not have a `create` method,\n * this event is dispatched anyway.\n * \n * If the Target Scene was sleeping then the [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} event is\n * dispatched instead of this event.\n * \n * Listen to it from a Scene using `this.scene.events.on('transitionstart', listener)`.\n * \n * The Scene Transition event flow is as follows:\n * \n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\n * \n * @event Phaser.Scenes.Events#TRANSITION_START\n * @since 3.5.0\n * \n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\n * @param {number} duration - The duration of the transition in ms.\n */\nmodule.exports = 'transitionstart';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Transition Wake Event.\n * \n * This event is dispatched by the Target Scene of a transition, only if that Scene was asleep before\n * the transition began. If the Scene was not asleep the [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} event is dispatched instead.\n * \n * Listen to it from a Scene using `this.scene.events.on('transitionwake', listener)`.\n * \n * The Scene Transition event flow is as follows:\n * \n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\n * \n * @event Phaser.Scenes.Events#TRANSITION_WAKE\n * @since 3.5.0\n * \n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\n * @param {number} duration - The duration of the transition in ms.\n */\nmodule.exports = 'transitionwake';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Update Event.\n * \n * This event is dispatched by a Scene during the main game loop step.\n * \n * The event flow for a single step of a Scene is as follows:\n * \n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\n * 3. The `Scene.update` method is called, if it exists\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n * \n * Listen to it from a Scene using `this.scene.events.on('update', listener)`.\n * \n * A Scene will only run its step if it is active.\n * \n * @event Phaser.Scenes.Events#UPDATE\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\n */\nmodule.exports = 'update';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Wake Event.\n * \n * This event is dispatched by a Scene when it is woken from sleep, either directly via the `wake` method,\n * or as an action from another Scene.\n * \n * Listen to it from a Scene using `this.scene.events.on('wake', listener)`.\n * \n * @event Phaser.Scenes.Events#WAKE\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {any} [data] - An optional data object that was passed to this Scene when it was woken up.\n */\nmodule.exports = 'wake';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Scenes.Events\n */\n\nmodule.exports = {\n\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\n BOOT: require('./BOOT_EVENT'),\n CREATE: require('./CREATE_EVENT'),\n DESTROY: require('./DESTROY_EVENT'),\n PAUSE: require('./PAUSE_EVENT'),\n POST_UPDATE: require('./POST_UPDATE_EVENT'),\n PRE_UPDATE: require('./PRE_UPDATE_EVENT'),\n READY: require('./READY_EVENT'),\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'),\n RENDER: require('./RENDER_EVENT'),\n RESUME: require('./RESUME_EVENT'),\n SHUTDOWN: require('./SHUTDOWN_EVENT'),\n SLEEP: require('./SLEEP_EVENT'),\n START: require('./START_EVENT'),\n TRANSITION_COMPLETE: require('./TRANSITION_COMPLETE_EVENT'),\n TRANSITION_INIT: require('./TRANSITION_INIT_EVENT'),\n TRANSITION_OUT: require('./TRANSITION_OUT_EVENT'),\n TRANSITION_START: require('./TRANSITION_START_EVENT'),\n TRANSITION_WAKE: require('./TRANSITION_WAKE_EVENT'),\n UPDATE: require('./UPDATE_EVENT'),\n WAKE: require('./WAKE_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Retrieves the value of the given key from an object.\n *\n * @function Phaser.Tweens.Builders.GetBoolean\n * @since 3.0.0\n *\n * @param {object} source - The object to retrieve the value from.\n * @param {string} key - The key to look for in the `source` object.\n * @param {*} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided.\n *\n * @return {*} The retrieved value.\n */\nvar GetBoolean = function (source, key, defaultValue)\n{\n if (!source)\n {\n return defaultValue;\n }\n else if (source.hasOwnProperty(key))\n {\n return source[key];\n }\n else\n {\n return defaultValue;\n }\n};\n\nmodule.exports = GetBoolean;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar TWEEN_CONST = {\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.CREATED\n * @type {integer}\n * @since 3.0.0\n */\n CREATED: 0,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.INIT\n * @type {integer}\n * @since 3.0.0\n */\n INIT: 1,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.DELAY\n * @type {integer}\n * @since 3.0.0\n */\n DELAY: 2,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.OFFSET_DELAY\n * @type {integer}\n * @since 3.0.0\n */\n OFFSET_DELAY: 3,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.PENDING_RENDER\n * @type {integer}\n * @since 3.0.0\n */\n PENDING_RENDER: 4,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.PLAYING_FORWARD\n * @type {integer}\n * @since 3.0.0\n */\n PLAYING_FORWARD: 5,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.PLAYING_BACKWARD\n * @type {integer}\n * @since 3.0.0\n */\n PLAYING_BACKWARD: 6,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.HOLD_DELAY\n * @type {integer}\n * @since 3.0.0\n */\n HOLD_DELAY: 7,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.REPEAT_DELAY\n * @type {integer}\n * @since 3.0.0\n */\n REPEAT_DELAY: 8,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.COMPLETE\n * @type {integer}\n * @since 3.0.0\n */\n COMPLETE: 9,\n\n // Tween specific (starts from 20 to cleanly allow extra TweenData consts in the future)\n\n /**\n * Tween state.\n * \n * @name Phaser.Tweens.PENDING_ADD\n * @type {integer}\n * @since 3.0.0\n */\n PENDING_ADD: 20,\n\n /**\n * Tween state.\n * \n * @name Phaser.Tweens.PAUSED\n * @type {integer}\n * @since 3.0.0\n */\n PAUSED: 21,\n\n /**\n * Tween state.\n * \n * @name Phaser.Tweens.LOOP_DELAY\n * @type {integer}\n * @since 3.0.0\n */\n LOOP_DELAY: 22,\n\n /**\n * Tween state.\n * \n * @name Phaser.Tweens.ACTIVE\n * @type {integer}\n * @since 3.0.0\n */\n ACTIVE: 23,\n\n /**\n * Tween state.\n * \n * @name Phaser.Tweens.COMPLETE_DELAY\n * @type {integer}\n * @since 3.0.0\n */\n COMPLETE_DELAY: 24,\n\n /**\n * Tween state.\n * \n * @name Phaser.Tweens.PENDING_REMOVE\n * @type {integer}\n * @since 3.0.0\n */\n PENDING_REMOVE: 25,\n\n /**\n * Tween state.\n * \n * @name Phaser.Tweens.REMOVED\n * @type {integer}\n * @since 3.0.0\n */\n REMOVED: 26\n\n};\n\nmodule.exports = TWEEN_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Taken from klasse by mattdesl https://github.com/mattdesl/klasse\n\nfunction hasGetterOrSetter (def)\n{\n return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function');\n}\n\nfunction getProperty (definition, k, isClassDescriptor)\n{\n // This may be a lightweight object, OR it might be a property that was defined previously.\n\n // For simple class descriptors we can just assume its NOT previously defined.\n var def = (isClassDescriptor) ? definition[k] : Object.getOwnPropertyDescriptor(definition, k);\n\n if (!isClassDescriptor && def.value && typeof def.value === 'object')\n {\n def = def.value;\n }\n\n // This might be a regular property, or it may be a getter/setter the user defined in a class.\n if (def && hasGetterOrSetter(def))\n {\n if (typeof def.enumerable === 'undefined')\n {\n def.enumerable = true;\n }\n\n if (typeof def.configurable === 'undefined')\n {\n def.configurable = true;\n }\n\n return def;\n }\n else\n {\n return false;\n }\n}\n\nfunction hasNonConfigurable (obj, k)\n{\n var prop = Object.getOwnPropertyDescriptor(obj, k);\n\n if (!prop)\n {\n return false;\n }\n\n if (prop.value && typeof prop.value === 'object')\n {\n prop = prop.value;\n }\n\n if (prop.configurable === false)\n {\n return true;\n }\n\n return false;\n}\n\n/**\n * Extends the given `myClass` object's prototype with the properties of `definition`.\n *\n * @function extend\n * @param {Object} ctor The constructor object to mix into.\n * @param {Object} definition A dictionary of functions for the class.\n * @param {boolean} isClassDescriptor Is the definition a class descriptor?\n * @param {Object} [extend] The parent constructor object.\n */\nfunction extend (ctor, definition, isClassDescriptor, extend)\n{\n for (var k in definition)\n {\n if (!definition.hasOwnProperty(k))\n {\n continue;\n }\n\n var def = getProperty(definition, k, isClassDescriptor);\n\n if (def !== false)\n {\n // If Extends is used, we will check its prototype to see if the final variable exists.\n\n var parent = extend || ctor;\n\n if (hasNonConfigurable(parent.prototype, k))\n {\n // Just skip the final property\n if (Class.ignoreFinals)\n {\n continue;\n }\n\n // We cannot re-define a property that is configurable=false.\n // So we will consider them final and throw an error. This is by\n // default so it is clear to the developer what is happening.\n // You can set ignoreFinals to true if you need to extend a class\n // which has configurable=false; it will simply not re-define final properties.\n throw new Error('cannot override final property \\'' + k + '\\', set Class.ignoreFinals = true to skip');\n }\n\n Object.defineProperty(ctor.prototype, k, def);\n }\n else\n {\n ctor.prototype[k] = definition[k];\n }\n }\n}\n\n/**\n * Applies the given `mixins` to the prototype of `myClass`.\n *\n * @function mixin\n * @param {Object} myClass The constructor object to mix into.\n * @param {Object|Array} mixins The mixins to apply to the constructor.\n */\nfunction mixin (myClass, mixins)\n{\n if (!mixins)\n {\n return;\n }\n\n if (!Array.isArray(mixins))\n {\n mixins = [ mixins ];\n }\n\n for (var i = 0; i < mixins.length; i++)\n {\n extend(myClass, mixins[i].prototype || mixins[i]);\n }\n}\n\n/**\n * Creates a new class with the given descriptor.\n * The constructor, defined by the name `initialize`,\n * is an optional function. If unspecified, an anonymous\n * function will be used which calls the parent class (if\n * one exists).\n *\n * You can also use `Extends` and `Mixins` to provide subclassing\n * and inheritance.\n *\n * @class Phaser.Class\n * @constructor\n * @param {Object} definition a dictionary of functions for the class\n * @example\n *\n * var MyClass = new Phaser.Class({\n *\n * initialize: function() {\n * this.foo = 2.0;\n * },\n *\n * bar: function() {\n * return this.foo + 5;\n * }\n * });\n */\nfunction Class (definition)\n{\n if (!definition)\n {\n definition = {};\n }\n\n // The variable name here dictates what we see in Chrome debugger\n var initialize;\n var Extends;\n\n if (definition.initialize)\n {\n if (typeof definition.initialize !== 'function')\n {\n throw new Error('initialize must be a function');\n }\n\n initialize = definition.initialize;\n\n // Usually we should avoid 'delete' in V8 at all costs.\n // However, its unlikely to make any performance difference\n // here since we only call this on class creation (i.e. not object creation).\n delete definition.initialize;\n }\n else if (definition.Extends)\n {\n var base = definition.Extends;\n\n initialize = function ()\n {\n base.apply(this, arguments);\n };\n }\n else\n {\n initialize = function () {};\n }\n\n if (definition.Extends)\n {\n initialize.prototype = Object.create(definition.Extends.prototype);\n initialize.prototype.constructor = initialize;\n\n // For getOwnPropertyDescriptor to work, we need to act directly on the Extends (or Mixin)\n\n Extends = definition.Extends;\n\n delete definition.Extends;\n }\n else\n {\n initialize.prototype.constructor = initialize;\n }\n\n // Grab the mixins, if they are specified...\n var mixins = null;\n\n if (definition.Mixins)\n {\n mixins = definition.Mixins;\n delete definition.Mixins;\n }\n\n // First, mixin if we can.\n mixin(initialize, mixins);\n\n // Now we grab the actual definition which defines the overrides.\n extend(initialize, definition, true, Extends);\n\n return initialize;\n}\n\nClass.extend = extend;\nClass.mixin = mixin;\nClass.ignoreFinals = false;\n\nmodule.exports = Class;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * A NOOP (No Operation) callback function.\n *\n * Used internally by Phaser when it's more expensive to determine if a callback exists\n * than it is to just invoke an empty function.\n *\n * @function Phaser.Utils.NOOP\n * @since 3.0.0\n */\nvar NOOP = function ()\n{\n // NOOP\n};\n\nmodule.exports = NOOP;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Adds the given item, or array of items, to the array.\n *\n * Each item must be unique within the array.\n *\n * The array is modified in-place and returned.\n *\n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\n * added will take the array length over this limit, it will stop adding once the limit is reached.\n *\n * You can optionally specify a callback to be invoked for each item successfully added to the array.\n *\n * @function Phaser.Utils.Array.Add\n * @since 3.4.0\n *\n * @param {array} array - The array to be added to.\n * @param {any|any[]} item - The item, or array of items, to add to the array. Each item must be unique within the array.\n * @param {integer} [limit] - Optional limit which caps the size of the array.\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\n * @param {object} [context] - The context in which the callback is invoked.\n *\n * @return {array} The input array.\n */\nvar Add = function (array, item, limit, callback, context)\n{\n if (context === undefined) { context = array; }\n\n if (limit > 0)\n {\n var remaining = limit - array.length;\n\n // There's nothing more we can do here, the array is full\n if (remaining <= 0)\n {\n return null;\n }\n }\n\n // Fast path to avoid array mutation and iteration\n if (!Array.isArray(item))\n {\n if (array.indexOf(item) === -1)\n {\n array.push(item);\n\n if (callback)\n {\n callback.call(context, item);\n }\n\n return item;\n }\n else\n {\n return null;\n }\n }\n\n // If we got this far, we have an array of items to insert\n\n // Ensure all the items are unique\n var itemLength = item.length - 1;\n\n while (itemLength >= 0)\n {\n if (array.indexOf(item[itemLength]) !== -1)\n {\n // Already exists in array, so remove it\n item.splice(itemLength, 1);\n }\n\n itemLength--;\n }\n\n // Anything left?\n itemLength = item.length;\n\n if (itemLength === 0)\n {\n return null;\n }\n\n if (limit > 0 && itemLength > remaining)\n {\n item.splice(remaining);\n\n itemLength = remaining;\n }\n\n for (var i = 0; i < itemLength; i++)\n {\n var entry = item[i];\n\n array.push(entry);\n\n if (callback)\n {\n callback.call(context, entry);\n }\n }\n\n return item;\n};\n\nmodule.exports = Add;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Adds the given item, or array of items, to the array starting at the index specified.\n * \n * Each item must be unique within the array.\n * \n * Existing elements in the array are shifted up.\n * \n * The array is modified in-place and returned.\n * \n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\n * added will take the array length over this limit, it will stop adding once the limit is reached.\n * \n * You can optionally specify a callback to be invoked for each item successfully added to the array.\n *\n * @function Phaser.Utils.Array.AddAt\n * @since 3.4.0\n *\n * @param {array} array - The array to be added to.\n * @param {any|any[]} item - The item, or array of items, to add to the array.\n * @param {integer} [index=0] - The index in the array where the item will be inserted.\n * @param {integer} [limit] - Optional limit which caps the size of the array.\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\n * @param {object} [context] - The context in which the callback is invoked.\n *\n * @return {array} The input array.\n */\nvar AddAt = function (array, item, index, limit, callback, context)\n{\n if (index === undefined) { index = 0; }\n if (context === undefined) { context = array; }\n\n if (limit > 0)\n {\n var remaining = limit - array.length;\n\n // There's nothing more we can do here, the array is full\n if (remaining <= 0)\n {\n return null;\n }\n }\n\n // Fast path to avoid array mutation and iteration\n if (!Array.isArray(item))\n {\n if (array.indexOf(item) === -1)\n {\n array.splice(index, 0, item);\n\n if (callback)\n {\n callback.call(context, item);\n }\n\n return item;\n }\n else\n {\n return null;\n }\n }\n\n // If we got this far, we have an array of items to insert\n\n // Ensure all the items are unique\n var itemLength = item.length - 1;\n\n while (itemLength >= 0)\n {\n if (array.indexOf(item[itemLength]) !== -1)\n {\n // Already exists in array, so remove it\n item.pop();\n }\n\n itemLength--;\n }\n\n // Anything left?\n itemLength = item.length;\n\n if (itemLength === 0)\n {\n return null;\n }\n\n // Truncate to the limit\n if (limit > 0 && itemLength > remaining)\n {\n item.splice(remaining);\n\n itemLength = remaining;\n }\n\n for (var i = itemLength - 1; i >= 0; i--)\n {\n var entry = item[i];\n\n array.splice(index, 0, entry);\n\n if (callback)\n {\n callback.call(context, entry);\n }\n }\n\n return item;\n};\n\nmodule.exports = AddAt;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the given element to the top of the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.BringToTop\n * @since 3.4.0\n *\n * @param {array} array - The array.\n * @param {*} item - The element to move.\n *\n * @return {*} The element that was moved.\n */\nvar BringToTop = function (array, item)\n{\n var currentIndex = array.indexOf(item);\n\n if (currentIndex !== -1 && currentIndex < array.length)\n {\n array.splice(currentIndex, 1);\n array.push(item);\n }\n\n return item;\n};\n\nmodule.exports = BringToTop;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SafeRange = require('./SafeRange');\n\n/**\n * Returns the total number of elements in the array which have a property matching the given value.\n *\n * @function Phaser.Utils.Array.CountAllMatching\n * @since 3.4.0\n *\n * @param {array} array - The array to search.\n * @param {string} property - The property to test on each array element.\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\n * @param {integer} [startIndex] - An optional start index to search from.\n * @param {integer} [endIndex] - An optional end index to search to.\n *\n * @return {integer} The total number of elements with properties matching the given value.\n */\nvar CountAllMatching = function (array, property, value, startIndex, endIndex)\n{\n if (startIndex === undefined) { startIndex = 0; }\n if (endIndex === undefined) { endIndex = array.length; }\n\n var total = 0;\n\n if (SafeRange(array, startIndex, endIndex))\n {\n for (var i = startIndex; i < endIndex; i++)\n {\n var child = array[i];\n\n if (child[property] === value)\n {\n total++;\n }\n }\n }\n\n return total;\n};\n\nmodule.exports = CountAllMatching;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Passes each element in the array to the given callback.\n *\n * @function Phaser.Utils.Array.Each\n * @since 3.4.0\n *\n * @param {array} array - The array to search.\n * @param {function} callback - A callback to be invoked for each item in the array.\n * @param {object} context - The context in which the callback is invoked.\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the current array item.\n *\n * @return {array} The input array.\n */\nvar Each = function (array, callback, context)\n{\n var i;\n var args = [ null ];\n\n for (i = 3; i < arguments.length; i++)\n {\n args.push(arguments[i]);\n }\n\n for (i = 0; i < array.length; i++)\n {\n args[0] = array[i];\n\n callback.apply(context, args);\n }\n\n return array;\n};\n\nmodule.exports = Each;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SafeRange = require('./SafeRange');\n\n/**\n * Passes each element in the array, between the start and end indexes, to the given callback.\n *\n * @function Phaser.Utils.Array.EachInRange\n * @since 3.4.0\n *\n * @param {array} array - The array to search.\n * @param {function} callback - A callback to be invoked for each item in the array.\n * @param {object} context - The context in which the callback is invoked.\n * @param {integer} startIndex - The start index to search from.\n * @param {integer} endIndex - The end index to search to.\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\n *\n * @return {array} The input array.\n */\nvar EachInRange = function (array, callback, context, startIndex, endIndex)\n{\n if (startIndex === undefined) { startIndex = 0; }\n if (endIndex === undefined) { endIndex = array.length; }\n\n if (SafeRange(array, startIndex, endIndex))\n {\n var i;\n var args = [ null ];\n\n for (i = 5; i < arguments.length; i++)\n {\n args.push(arguments[i]);\n }\n\n for (i = startIndex; i < endIndex; i++)\n {\n args[0] = array[i];\n\n callback.apply(context, args);\n }\n }\n\n return array;\n};\n\nmodule.exports = EachInRange;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Searches a pre-sorted array for the closet value to the given number.\n *\n * If the `key` argument is given it will assume the array contains objects that all have the required `key` property name,\n * and will check for the closest value of those to the given number.\n *\n * @function Phaser.Utils.Array.FindClosestInSorted\n * @since 3.0.0\n *\n * @param {number} value - The value to search for in the array.\n * @param {array} array - The array to search, which must be sorted.\n * @param {string} [key] - An optional property key. If specified the array elements property will be checked against value.\n *\n * @return {(number|any)} The nearest value found in the array, or if a `key` was given, the nearest object with the matching property value.\n */\nvar FindClosestInSorted = function (value, array, key)\n{\n if (!array.length)\n {\n return NaN;\n }\n else if (array.length === 1)\n {\n return array[0];\n }\n\n var i = 1;\n var low;\n var high;\n\n if (key)\n {\n if (value < array[0][key])\n {\n return array[0];\n }\n\n while (array[i][key] < value)\n {\n i++;\n }\n }\n else\n {\n while (array[i] < value)\n {\n i++;\n }\n }\n\n if (i > array.length)\n {\n i = array.length;\n }\n\n if (key)\n {\n low = array[i - 1][key];\n high = array[i][key];\n\n return ((high - value) <= (value - low)) ? array[i] : array[i - 1];\n }\n else\n {\n low = array[i - 1];\n high = array[i];\n\n return ((high - value) <= (value - low)) ? high : low;\n }\n};\n\nmodule.exports = FindClosestInSorted;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SafeRange = require('./SafeRange');\n\n/**\n * Returns all elements in the array.\n *\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\n *\n * For example: `getAll('visible', true)` would return only elements that have their visible property set.\n *\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\n * the first 50 elements.\n *\n * @function Phaser.Utils.Array.GetAll\n * @since 3.4.0\n *\n * @param {array} array - The array to search.\n * @param {string} [property] - The property to test on each array element.\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\n * @param {integer} [startIndex] - An optional start index to search from.\n * @param {integer} [endIndex] - An optional end index to search to.\n *\n * @return {array} All matching elements from the array.\n */\nvar GetAll = function (array, property, value, startIndex, endIndex)\n{\n if (startIndex === undefined) { startIndex = 0; }\n if (endIndex === undefined) { endIndex = array.length; }\n\n var output = [];\n\n if (SafeRange(array, startIndex, endIndex))\n {\n for (var i = startIndex; i < endIndex; i++)\n {\n var child = array[i];\n\n if (!property ||\n (property && value === undefined && child.hasOwnProperty(property)) ||\n (property && value !== undefined && child[property] === value))\n {\n output.push(child);\n }\n }\n }\n\n return output;\n};\n\nmodule.exports = GetAll;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SafeRange = require('./SafeRange');\n\n/**\n * Returns the first element in the array.\n *\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\n *\n * For example: `getAll('visible', true)` would return the first element that had its `visible` property set.\n *\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\n * and you set `startIndex` to 0 and `endIndex` to 50, it would search only the first 50 elements.\n *\n * @function Phaser.Utils.Array.GetFirst\n * @since 3.4.0\n *\n * @param {array} array - The array to search.\n * @param {string} [property] - The property to test on each array element.\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\n * @param {integer} [startIndex=0] - An optional start index to search from.\n * @param {integer} [endIndex=array.length] - An optional end index to search up to (but not included)\n *\n * @return {object} The first matching element from the array, or `null` if no element could be found in the range given.\n */\nvar GetFirst = function (array, property, value, startIndex, endIndex)\n{\n if (startIndex === undefined) { startIndex = 0; }\n if (endIndex === undefined) { endIndex = array.length; }\n\n if (SafeRange(array, startIndex, endIndex))\n {\n for (var i = startIndex; i < endIndex; i++)\n {\n var child = array[i];\n\n if (!property ||\n (property && value === undefined && child.hasOwnProperty(property)) ||\n (property && value !== undefined && child[property] === value))\n {\n return child;\n }\n }\n }\n\n return null;\n};\n\nmodule.exports = GetFirst;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Returns a Random element from the array.\n *\n * @function Phaser.Utils.Array.GetRandom\n * @since 3.0.0\n *\n * @param {array} array - The array to select the random entry from.\n * @param {integer} [startIndex=0] - An optional start index.\n * @param {integer} [length=array.length] - An optional length, the total number of elements (from the startIndex) to choose from.\n *\n * @return {*} A random element from the array, or `null` if no element could be found in the range given.\n */\nvar GetRandom = function (array, startIndex, length)\n{\n if (startIndex === undefined) { startIndex = 0; }\n if (length === undefined) { length = array.length; }\n\n var randomIndex = startIndex + Math.floor(Math.random() * length);\n\n return (array[randomIndex] === undefined) ? null : array[randomIndex];\n};\n\nmodule.exports = GetRandom;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the given array element down one place in the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.MoveDown\n * @since 3.4.0\n *\n * @param {array} array - The input array.\n * @param {*} item - The element to move down the array.\n *\n * @return {array} The input array.\n */\nvar MoveDown = function (array, item)\n{\n var currentIndex = array.indexOf(item);\n\n if (currentIndex > 0)\n {\n var item2 = array[currentIndex - 1];\n\n var index2 = array.indexOf(item2);\n\n array[currentIndex] = item2;\n array[index2] = item;\n }\n\n return array;\n};\n\nmodule.exports = MoveDown;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves an element in an array to a new position within the same array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.MoveTo\n * @since 3.4.0\n *\n * @param {array} array - The array.\n * @param {*} item - The element to move.\n * @param {integer} index - The new index that the element will be moved to.\n *\n * @return {*} The element that was moved.\n */\nvar MoveTo = function (array, item, index)\n{\n var currentIndex = array.indexOf(item);\n\n if (currentIndex === -1 || index < 0 || index >= array.length)\n {\n throw new Error('Supplied index out of bounds');\n }\n\n if (currentIndex !== index)\n {\n // Remove\n array.splice(currentIndex, 1);\n\n // Add in new location\n array.splice(index, 0, item);\n }\n\n return item;\n};\n\nmodule.exports = MoveTo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the given array element up one place in the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.MoveUp\n * @since 3.4.0\n *\n * @param {array} array - The input array.\n * @param {*} item - The element to move up the array.\n *\n * @return {array} The input array.\n */\nvar MoveUp = function (array, item)\n{\n var currentIndex = array.indexOf(item);\n\n if (currentIndex !== -1 && currentIndex < array.length - 1)\n {\n // The element one above `item` in the array\n var item2 = array[currentIndex + 1];\n var index2 = array.indexOf(item2);\n\n array[currentIndex] = item2;\n array[index2] = item;\n }\n\n return array;\n};\n\nmodule.exports = MoveUp;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Create an array representing the range of numbers (usually integers), between, and inclusive of,\n * the given `start` and `end` arguments. For example:\n *\n * `var array = numberArray(2, 4); // array = [2, 3, 4]`\n * `var array = numberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]`\n *\n * This is equivalent to `numberArrayStep(start, end, 1)`.\n *\n * You can optionally provide a prefix and / or suffix string. If given the array will contain\n * strings, not integers. For example:\n *\n * `var array = numberArray(1, 4, 'Level '); // array = [\"Level 1\", \"Level 2\", \"Level 3\", \"Level 4\"]`\n * `var array = numberArray(5, 7, 'HD-', '.png'); // array = [\"HD-5.png\", \"HD-6.png\", \"HD-7.png\"]`\n *\n * @function Phaser.Utils.Array.NumberArray\n * @since 3.0.0\n *\n * @param {number} start - The minimum value the array starts with.\n * @param {number} end - The maximum value the array contains.\n * @param {string} [prefix] - Optional prefix to place before the number. If provided the array will contain strings, not integers.\n * @param {string} [suffix] - Optional suffix to place after the number. If provided the array will contain strings, not integers.\n *\n * @return {(number[]|string[])} The array of number values, or strings if a prefix or suffix was provided.\n */\nvar NumberArray = function (start, end, prefix, suffix)\n{\n var result = [];\n\n for (var i = start; i <= end; i++)\n {\n if (prefix || suffix)\n {\n var key = (prefix) ? prefix + i.toString() : i.toString();\n\n if (suffix)\n {\n key = key.concat(suffix);\n }\n\n result.push(key);\n }\n else\n {\n result.push(i);\n }\n }\n\n return result;\n};\n\nmodule.exports = NumberArray;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar RoundAwayFromZero = require('../../math/RoundAwayFromZero');\n\n/**\n * Create an array of numbers (positive and/or negative) progressing from `start`\n * up to but not including `end` by advancing by `step`.\n *\n * If `start` is less than `end` a zero-length range is created unless a negative `step` is specified.\n *\n * Certain values for `start` and `end` (eg. NaN/undefined/null) are currently coerced to 0;\n * for forward compatibility make sure to pass in actual numbers.\n * \n * @example\n * NumberArrayStep(4);\n * // => [0, 1, 2, 3]\n *\n * NumberArrayStep(1, 5);\n * // => [1, 2, 3, 4]\n *\n * NumberArrayStep(0, 20, 5);\n * // => [0, 5, 10, 15]\n *\n * NumberArrayStep(0, -4, -1);\n * // => [0, -1, -2, -3]\n *\n * NumberArrayStep(1, 4, 0);\n * // => [1, 1, 1]\n *\n * NumberArrayStep(0);\n * // => []\n *\n * @function Phaser.Utils.Array.NumberArrayStep\n * @since 3.0.0\n *\n * @param {number} [start=0] - The start of the range.\n * @param {number} [end=null] - The end of the range.\n * @param {number} [step=1] - The value to increment or decrement by.\n *\n * @return {number[]} The array of number values.\n */\nvar NumberArrayStep = function (start, end, step)\n{\n if (start === undefined) { start = 0; }\n if (end === undefined) { end = null; }\n if (step === undefined) { step = 1; }\n\n if (end === null)\n {\n end = start;\n start = 0;\n }\n\n var result = [];\n\n var total = Math.max(RoundAwayFromZero((end - start) / (step || 1)), 0);\n\n for (var i = 0; i < total; i++)\n {\n result.push(start);\n start += step;\n }\n\n return result;\n};\n\nmodule.exports = NumberArrayStep;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @ignore\n */\nfunction swap (arr, i, j)\n{\n var tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n\n/**\n * @ignore\n */\nfunction defaultCompare (a, b)\n{\n return a < b ? -1 : a > b ? 1 : 0;\n}\n\n/**\n * A [Floyd-Rivest](https://en.wikipedia.org/wiki/Floyd%E2%80%93Rivest_algorithm) quick selection algorithm.\n *\n * Rearranges the array items so that all items in the [left, k] range are smaller than all items in [k, right];\n * The k-th element will have the (k - left + 1)th smallest value in [left, right].\n *\n * The array is modified in-place.\n *\n * Based on code by [Vladimir Agafonkin](https://www.npmjs.com/~mourner)\n *\n * @function Phaser.Utils.Array.QuickSelect\n * @since 3.0.0\n *\n * @param {array} arr - The array to sort.\n * @param {integer} k - The k-th element index.\n * @param {integer} [left=0] - The index of the left part of the range.\n * @param {integer} [right] - The index of the right part of the range.\n * @param {function} [compare] - An optional comparison function. Is passed two elements and should return 0, 1 or -1.\n */\nvar QuickSelect = function (arr, k, left, right, compare)\n{\n if (left === undefined) { left = 0; }\n if (right === undefined) { right = arr.length - 1; }\n if (compare === undefined) { compare = defaultCompare; }\n\n while (right > left)\n {\n if (right - left > 600)\n {\n var n = right - left + 1;\n var m = k - left + 1;\n var z = Math.log(n);\n var s = 0.5 * Math.exp(2 * z / 3);\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n\n QuickSelect(arr, k, newLeft, newRight, compare);\n }\n\n var t = arr[k];\n var i = left;\n var j = right;\n\n swap(arr, left, k);\n\n if (compare(arr[right], t) > 0)\n {\n swap(arr, left, right);\n }\n\n while (i < j)\n {\n swap(arr, i, j);\n\n i++;\n j--;\n\n while (compare(arr[i], t) < 0)\n {\n i++;\n }\n\n while (compare(arr[j], t) > 0)\n {\n j--;\n }\n }\n\n if (compare(arr[left], t) === 0)\n {\n swap(arr, left, j);\n }\n else\n {\n j++;\n swap(arr, j, right);\n }\n\n if (j <= k)\n {\n left = j + 1;\n }\n\n if (k <= j)\n {\n right = j - 1;\n }\n }\n};\n\nmodule.exports = QuickSelect;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar GetValue = require('../object/GetValue');\nvar Shuffle = require('./Shuffle');\n\nvar BuildChunk = function (a, b, qty)\n{\n var out = [];\n\n for (var aIndex = 0; aIndex < a.length; aIndex++)\n {\n for (var bIndex = 0; bIndex < b.length; bIndex++)\n {\n for (var i = 0; i < qty; i++)\n {\n out.push({ a: a[aIndex], b: b[bIndex] });\n }\n }\n }\n\n return out;\n};\n\n/**\n * Creates an array populated with a range of values, based on the given arguments and configuration object.\n *\n * Range ([a,b,c], [1,2,3]) =\n * a1, a2, a3, b1, b2, b3, c1, c2, c3\n * \n * Range ([a,b], [1,2,3], qty = 3) =\n * a1, a1, a1, a2, a2, a2, a3, a3, a3, b1, b1, b1, b2, b2, b2, b3, b3, b3\n * \n * Range ([a,b,c], [1,2,3], repeat x1) =\n * a1, a2, a3, b1, b2, b3, c1, c2, c3, a1, a2, a3, b1, b2, b3, c1, c2, c3\n * \n * Range ([a,b], [1,2], repeat -1 = endless, max = 14) =\n * Maybe if max is set then repeat goes to -1 automatically?\n * a1, a2, b1, b2, a1, a2, b1, b2, a1, a2, b1, b2, a1, a2 (capped at 14 elements)\n * \n * Range ([a], [1,2,3,4,5], random = true) =\n * a4, a1, a5, a2, a3\n * \n * Range ([a, b], [1,2,3], random = true) =\n * b3, a2, a1, b1, a3, b2\n * \n * Range ([a, b, c], [1,2,3], randomB = true) =\n * a3, a1, a2, b2, b3, b1, c1, c3, c2\n * \n * Range ([a], [1,2,3,4,5], yoyo = true) =\n * a1, a2, a3, a4, a5, a5, a4, a3, a2, a1\n * \n * Range ([a, b], [1,2,3], yoyo = true) =\n * a1, a2, a3, b1, b2, b3, b3, b2, b1, a3, a2, a1\n *\n * @function Phaser.Utils.Array.Range\n * @since 3.0.0\n *\n * @param {array} a - The first array of range elements.\n * @param {array} b - The second array of range elements.\n * @param {object} [options] - A range configuration object. Can contain: repeat, random, randomB, yoyo, max, qty.\n *\n * @return {array} An array of arranged elements.\n */\nvar Range = function (a, b, options)\n{\n var max = GetValue(options, 'max', 0);\n var qty = GetValue(options, 'qty', 1);\n var random = GetValue(options, 'random', false);\n var randomB = GetValue(options, 'randomB', false);\n var repeat = GetValue(options, 'repeat', 0);\n var yoyo = GetValue(options, 'yoyo', false);\n\n var out = [];\n\n if (randomB)\n {\n Shuffle(b);\n }\n\n // Endless repeat, so limit by max\n if (repeat === -1)\n {\n if (max === 0)\n {\n repeat = 0;\n }\n else\n {\n // Work out how many repeats we need\n var total = (a.length * b.length) * qty;\n\n if (yoyo)\n {\n total *= 2;\n }\n\n repeat = Math.ceil(max / total);\n }\n }\n\n for (var i = 0; i <= repeat; i++)\n {\n var chunk = BuildChunk(a, b, qty);\n\n if (random)\n {\n Shuffle(chunk);\n }\n\n out = out.concat(chunk);\n\n if (yoyo)\n {\n chunk.reverse();\n\n out = out.concat(chunk);\n }\n }\n\n if (max)\n {\n out.splice(max);\n }\n\n return out;\n};\n\nmodule.exports = Range;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SpliceOne = require('./SpliceOne');\n\n/**\n * Removes the given item, or array of items, from the array.\n * \n * The array is modified in-place.\n * \n * You can optionally specify a callback to be invoked for each item successfully removed from the array.\n *\n * @function Phaser.Utils.Array.Remove\n * @since 3.4.0\n *\n * @param {array} array - The array to be modified.\n * @param {*|Array.<*>} item - The item, or array of items, to be removed from the array.\n * @param {function} [callback] - A callback to be invoked for each item successfully removed from the array.\n * @param {object} [context] - The context in which the callback is invoked.\n *\n * @return {*|Array.<*>} The item, or array of items, that were successfully removed from the array.\n */\nvar Remove = function (array, item, callback, context)\n{\n if (context === undefined) { context = array; }\n\n var index;\n\n // Fast path to avoid array mutation and iteration\n if (!Array.isArray(item))\n {\n index = array.indexOf(item);\n\n if (index !== -1)\n {\n SpliceOne(array, index);\n\n if (callback)\n {\n callback.call(context, item);\n }\n\n return item;\n }\n else\n {\n return null;\n }\n }\n\n // If we got this far, we have an array of items to remove\n\n var itemLength = item.length - 1;\n\n while (itemLength >= 0)\n {\n var entry = item[itemLength];\n\n index = array.indexOf(entry);\n\n if (index !== -1)\n {\n SpliceOne(array, index);\n\n if (callback)\n {\n callback.call(context, entry);\n }\n }\n else\n {\n // Item wasn't found in the array, so remove it from our return results\n item.pop();\n }\n\n itemLength--;\n }\n\n return item;\n};\n\nmodule.exports = Remove;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SpliceOne = require('./SpliceOne');\n\n/**\n * Removes the item from the given position in the array.\n * \n * The array is modified in-place.\n * \n * You can optionally specify a callback to be invoked for the item if it is successfully removed from the array.\n *\n * @function Phaser.Utils.Array.RemoveAt\n * @since 3.4.0\n *\n * @param {array} array - The array to be modified.\n * @param {integer} index - The array index to remove the item from. The index must be in bounds or it will throw an error.\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\n * @param {object} [context] - The context in which the callback is invoked.\n *\n * @return {*} The item that was removed.\n */\nvar RemoveAt = function (array, index, callback, context)\n{\n if (context === undefined) { context = array; }\n\n if (index < 0 || index > array.length - 1)\n {\n throw new Error('Index out of bounds');\n }\n\n var item = SpliceOne(array, index);\n\n if (callback)\n {\n callback.call(context, item);\n }\n\n return item;\n};\n\nmodule.exports = RemoveAt;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SafeRange = require('./SafeRange');\n\n/**\n * Removes the item within the given range in the array.\n * \n * The array is modified in-place.\n * \n * You can optionally specify a callback to be invoked for the item/s successfully removed from the array.\n *\n * @function Phaser.Utils.Array.RemoveBetween\n * @since 3.4.0\n *\n * @param {array} array - The array to be modified.\n * @param {integer} startIndex - The start index to remove from.\n * @param {integer} endIndex - The end index to remove to.\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\n * @param {object} [context] - The context in which the callback is invoked.\n *\n * @return {Array.<*>} An array of items that were removed.\n */\nvar RemoveBetween = function (array, startIndex, endIndex, callback, context)\n{\n if (startIndex === undefined) { startIndex = 0; }\n if (endIndex === undefined) { endIndex = array.length; }\n if (context === undefined) { context = array; }\n\n if (SafeRange(array, startIndex, endIndex))\n {\n var size = endIndex - startIndex;\n\n var removed = array.splice(startIndex, size);\n\n if (callback)\n {\n for (var i = 0; i < removed.length; i++)\n {\n var entry = removed[i];\n\n callback.call(context, entry);\n }\n }\n\n return removed;\n }\n else\n {\n return [];\n }\n};\n\nmodule.exports = RemoveBetween;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SpliceOne = require('./SpliceOne');\n\n/**\n * Removes a random object from the given array and returns it.\n * Will return null if there are no array items that fall within the specified range or if there is no item for the randomly chosen index.\n *\n * @function Phaser.Utils.Array.RemoveRandomElement\n * @since 3.0.0\n *\n * @param {array} array - The array to removed a random element from.\n * @param {integer} [start=0] - The array index to start the search from.\n * @param {integer} [length=array.length] - Optional restriction on the number of elements to randomly select from.\n *\n * @return {object} The random element that was removed, or `null` if there were no array elements that fell within the given range.\n */\nvar RemoveRandomElement = function (array, start, length)\n{\n if (start === undefined) { start = 0; }\n if (length === undefined) { length = array.length; }\n\n var randomIndex = start + Math.floor(Math.random() * length);\n\n return SpliceOne(array, randomIndex);\n};\n\nmodule.exports = RemoveRandomElement;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Replaces an element of the array with the new element.\n * The new element cannot already be a member of the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.Replace\n * @since 3.4.0\n *\n * @param {array} array - The array to search within.\n * @param {*} oldChild - The element in the array that will be replaced.\n * @param {*} newChild - The element to be inserted into the array at the position of `oldChild`.\n *\n * @return {boolean} Returns true if the oldChild was successfully replaced, otherwise returns false.\n */\nvar Replace = function (array, oldChild, newChild)\n{\n var index1 = array.indexOf(oldChild);\n var index2 = array.indexOf(newChild);\n\n if (index1 !== -1 && index2 === -1)\n {\n array[index1] = newChild;\n\n return true;\n }\n else\n {\n return false;\n }\n};\n\nmodule.exports = Replace;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the element at the start of the array to the end, shifting all items in the process.\n * The \"rotation\" happens to the left.\n *\n * @function Phaser.Utils.Array.RotateLeft\n * @since 3.0.0\n *\n * @param {array} array - The array to shift to the left. This array is modified in place.\n * @param {integer} [total=1] - The number of times to shift the array.\n *\n * @return {*} The most recently shifted element.\n */\nvar RotateLeft = function (array, total)\n{\n if (total === undefined) { total = 1; }\n\n var element = null;\n\n for (var i = 0; i < total; i++)\n {\n element = array.shift();\n array.push(element);\n }\n\n return element;\n};\n\nmodule.exports = RotateLeft;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the element at the end of the array to the start, shifting all items in the process.\n * The \"rotation\" happens to the right.\n *\n * @function Phaser.Utils.Array.RotateRight\n * @since 3.0.0\n *\n * @param {array} array - The array to shift to the right. This array is modified in place.\n * @param {integer} [total=1] - The number of times to shift the array.\n *\n * @return {*} The most recently shifted element.\n */\nvar RotateRight = function (array, total)\n{\n if (total === undefined) { total = 1; }\n\n var element = null;\n\n for (var i = 0; i < total; i++)\n {\n element = array.pop();\n array.unshift(element);\n }\n\n return element;\n};\n\nmodule.exports = RotateRight;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Tests if the start and end indexes are a safe range for the given array.\n * \n * @function Phaser.Utils.Array.SafeRange\n * @since 3.4.0\n *\n * @param {array} array - The array to check.\n * @param {integer} startIndex - The start index.\n * @param {integer} endIndex - The end index.\n * @param {boolean} [throwError=true] - Throw an error if the range is out of bounds.\n *\n * @return {boolean} True if the range is safe, otherwise false.\n */\nvar SafeRange = function (array, startIndex, endIndex, throwError)\n{\n var len = array.length;\n\n if (startIndex < 0 ||\n startIndex > len ||\n startIndex >= endIndex ||\n endIndex > len ||\n startIndex + endIndex > len)\n {\n if (throwError)\n {\n throw new Error('Range Error: Values outside acceptable range');\n }\n\n return false;\n }\n else\n {\n return true;\n }\n};\n\nmodule.exports = SafeRange;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the given element to the bottom of the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.SendToBack\n * @since 3.4.0\n *\n * @param {array} array - The array.\n * @param {*} item - The element to move.\n *\n * @return {*} The element that was moved.\n */\nvar SendToBack = function (array, item)\n{\n var currentIndex = array.indexOf(item);\n\n if (currentIndex !== -1 && currentIndex > 0)\n {\n array.splice(currentIndex, 1);\n array.unshift(item);\n }\n\n return item;\n};\n\nmodule.exports = SendToBack;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SafeRange = require('./SafeRange');\n\n/**\n * Scans the array for elements with the given property. If found, the property is set to the `value`.\n *\n * For example: `SetAll('visible', true)` would set all elements that have a `visible` property to `false`.\n *\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\n * and you set `startIndex` to 0 and `endIndex` to 50, it would update only the first 50 elements.\n *\n * @function Phaser.Utils.Array.SetAll\n * @since 3.4.0\n *\n * @param {array} array - The array to search.\n * @param {string} property - The property to test for on each array element.\n * @param {*} value - The value to set the property to.\n * @param {integer} [startIndex] - An optional start index to search from.\n * @param {integer} [endIndex] - An optional end index to search to.\n *\n * @return {array} The input array.\n */\nvar SetAll = function (array, property, value, startIndex, endIndex)\n{\n if (startIndex === undefined) { startIndex = 0; }\n if (endIndex === undefined) { endIndex = array.length; }\n\n if (SafeRange(array, startIndex, endIndex))\n {\n for (var i = startIndex; i < endIndex; i++)\n {\n var entry = array[i];\n\n if (entry.hasOwnProperty(property))\n {\n entry[property] = value;\n }\n }\n }\n\n return array;\n};\n\nmodule.exports = SetAll;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Shuffles the contents of the given array using the Fisher-Yates implementation.\n *\n * The original array is modified directly and returned.\n *\n * @function Phaser.Utils.Array.Shuffle\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[]} - [array,$return]\n *\n * @param {T[]} array - The array to shuffle. This array is modified in place.\n *\n * @return {T[]} The shuffled array.\n */\nvar Shuffle = function (array)\n{\n for (var i = array.length - 1; i > 0; i--)\n {\n var j = Math.floor(Math.random() * (i + 1));\n var temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n }\n\n return array;\n};\n\nmodule.exports = Shuffle;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Removes a single item from an array and returns it without creating gc, like the native splice does.\n * Based on code by Mike Reinstein.\n *\n * @function Phaser.Utils.Array.SpliceOne\n * @since 3.0.0\n *\n * @param {array} array - The array to splice from.\n * @param {integer} index - The index of the item which should be spliced.\n *\n * @return {*} The item which was spliced (removed).\n */\nvar SpliceOne = function (array, index)\n{\n if (index >= array.length)\n {\n return;\n }\n\n var len = array.length - 1;\n\n var item = array[index];\n\n for (var i = index; i < len; i++)\n {\n array[i] = array[i + 1];\n }\n\n array.length = len;\n\n return item;\n};\n\nmodule.exports = SpliceOne;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n//! stable.js 0.1.6, https://github.com/Two-Screen/stable\n//! © 2017 Angry Bytes and contributors. MIT licensed.\n\n/**\n * @namespace Phaser.Utils.Array.StableSortFunctions\n */\n\n(function() {\n\n /**\n * A stable array sort, because `Array#sort()` is not guaranteed stable.\n * This is an implementation of merge sort, without recursion.\n *\n * @function Phaser.Utils.Array.StableSort\n * @since 3.0.0\n *\n * @param {array} arr - The input array to be sorted.\n * @param {function} comp - The comparison handler.\n *\n * @return {array} The sorted result.\n */\nvar stable = function(arr, comp) {\n return exec(arr.slice(), comp);\n};\n\n /**\n * Sort the input array and simply copy it back if the result isn't in the original array, which happens on an odd number of passes.\n *\n * @function Phaser.Utils.Array.StableSortFunctions.inplace\n * @memberof Phaser.Utils.Array.StableSortFunctions\n * @since 3.0.0\n *\n * @param {array} arr - The input array.\n * @param {function} comp - The comparison handler.\n *\n * @return {array} The sorted array.\n */\nstable.inplace = function(arr, comp) {\n var result = exec(arr, comp);\n\n // This simply copies back if the result isn't in the original array,\n // which happens on an odd number of passes.\n if (result !== arr) {\n pass(result, null, arr.length, arr);\n }\n\n return arr;\n};\n\n// Execute the sort using the input array and a second buffer as work space.\n// Returns one of those two, containing the final result.\nfunction exec(arr, comp) {\n if (typeof(comp) !== 'function') {\n comp = function(a, b) {\n return String(a).localeCompare(b);\n };\n }\n\n // Short-circuit when there's nothing to sort.\n var len = arr.length;\n if (len <= 1) {\n return arr;\n }\n\n // Rather than dividing input, simply iterate chunks of 1, 2, 4, 8, etc.\n // Chunks are the size of the left or right hand in merge sort.\n // Stop when the left-hand covers all of the array.\n var buffer = new Array(len);\n for (var chk = 1; chk < len; chk *= 2) {\n pass(arr, comp, chk, buffer);\n\n var tmp = arr;\n arr = buffer;\n buffer = tmp;\n }\n\n return arr;\n}\n\n// Run a single pass with the given chunk size.\nvar pass = function(arr, comp, chk, result) {\n var len = arr.length;\n var i = 0;\n // Step size / double chunk size.\n var dbl = chk * 2;\n // Bounds of the left and right chunks.\n var l, r, e;\n // Iterators over the left and right chunk.\n var li, ri;\n\n // Iterate over pairs of chunks.\n for (l = 0; l < len; l += dbl) {\n r = l + chk;\n e = r + chk;\n if (r > len) r = len;\n if (e > len) e = len;\n\n // Iterate both chunks in parallel.\n li = l;\n ri = r;\n while (true) {\n // Compare the chunks.\n if (li < r && ri < e) {\n // This works for a regular `sort()` compatible comparator,\n // but also for a simple comparator like: `a > b`\n if (comp(arr[li], arr[ri]) <= 0) {\n result[i++] = arr[li++];\n }\n else {\n result[i++] = arr[ri++];\n }\n }\n // Nothing to compare, just flush what's left.\n else if (li < r) {\n result[i++] = arr[li++];\n }\n else if (ri < e) {\n result[i++] = arr[ri++];\n }\n // Both iterators are at the chunk ends.\n else {\n break;\n }\n }\n }\n};\n\n// Export using CommonJS or to the window.\nif (typeof(module) !== 'undefined') {\n module.exports = stable;\n}\nelse {\n window.stable = stable;\n}\n\n})();","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Swaps the position of two elements in the given array.\n * The elements must exist in the same array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.Swap\n * @since 3.4.0\n *\n * @param {array} array - The input array.\n * @param {*} item1 - The first element to swap.\n * @param {*} item2 - The second element to swap.\n *\n * @return {array} The input array.\n */\nvar Swap = function (array, item1, item2)\n{\n if (item1 === item2)\n {\n return;\n }\n\n var index1 = array.indexOf(item1);\n var index2 = array.indexOf(item2);\n\n if (index1 < 0 || index2 < 0)\n {\n throw new Error('Supplied items must be elements of the same array');\n }\n\n array[index1] = item2;\n array[index2] = item1;\n\n return array;\n};\n\nmodule.exports = Swap;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Utils.Array\n */\n\nmodule.exports = {\n\n Matrix: require('./matrix'),\n\n Add: require('./Add'),\n AddAt: require('./AddAt'),\n BringToTop: require('./BringToTop'),\n CountAllMatching: require('./CountAllMatching'),\n Each: require('./Each'),\n EachInRange: require('./EachInRange'),\n FindClosestInSorted: require('./FindClosestInSorted'),\n GetAll: require('./GetAll'),\n GetFirst: require('./GetFirst'),\n GetRandom: require('./GetRandom'),\n MoveDown: require('./MoveDown'),\n MoveTo: require('./MoveTo'),\n MoveUp: require('./MoveUp'),\n NumberArray: require('./NumberArray'),\n NumberArrayStep: require('./NumberArrayStep'),\n QuickSelect: require('./QuickSelect'),\n Range: require('./Range'),\n Remove: require('./Remove'),\n RemoveAt: require('./RemoveAt'),\n RemoveBetween: require('./RemoveBetween'),\n RemoveRandomElement: require('./RemoveRandomElement'),\n Replace: require('./Replace'),\n RotateLeft: require('./RotateLeft'),\n RotateRight: require('./RotateRight'),\n SafeRange: require('./SafeRange'),\n SendToBack: require('./SendToBack'),\n SetAll: require('./SetAll'),\n Shuffle: require('./Shuffle'),\n SpliceOne: require('./SpliceOne'),\n StableSort: require('./StableSort'),\n Swap: require('./Swap')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Checks if an array can be used as a matrix.\n *\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows) have the same length. There must be at least two rows:\n *\n * ```\n * [\n * [ 1, 1, 1, 1, 1, 1 ],\n * [ 2, 0, 0, 0, 0, 4 ],\n * [ 2, 0, 1, 2, 0, 4 ],\n * [ 2, 0, 3, 4, 0, 4 ],\n * [ 2, 0, 0, 0, 0, 4 ],\n * [ 3, 3, 3, 3, 3, 3 ]\n * ]\n * ```\n *\n * @function Phaser.Utils.Array.Matrix.CheckMatrix\n * @since 3.0.0\n * \n * @generic T\n * @genericUse {T[][]} - [matrix]\n *\n * @param {T[][]} [matrix] - The array to check.\n *\n * @return {boolean} `true` if the given `matrix` array is a valid matrix.\n */\nvar CheckMatrix = function (matrix)\n{\n if (!Array.isArray(matrix) || matrix.length < 2 || !Array.isArray(matrix[0]))\n {\n return false;\n }\n\n // How long is the first row?\n var size = matrix[0].length;\n\n // Validate the rest of the rows are the same length\n for (var i = 1; i < matrix.length; i++)\n {\n if (matrix[i].length !== size)\n {\n return false;\n }\n }\n\n return true;\n};\n\nmodule.exports = CheckMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Pad = require('../../string/Pad');\nvar CheckMatrix = require('./CheckMatrix');\n\n/**\n * Generates a string (which you can pass to console.log) from the given Array Matrix.\n *\n * @function Phaser.Utils.Array.Matrix.MatrixToString\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix]\n *\n * @param {T[][]} [matrix] - A 2-dimensional array.\n *\n * @return {string} A string representing the matrix.\n */\nvar MatrixToString = function (matrix)\n{\n var str = '';\n\n if (!CheckMatrix(matrix))\n {\n return str;\n }\n\n for (var r = 0; r < matrix.length; r++)\n {\n for (var c = 0; c < matrix[r].length; c++)\n {\n var cell = matrix[r][c].toString();\n\n if (cell !== 'undefined')\n {\n str += Pad(cell, 2);\n }\n else\n {\n str += '?';\n }\n\n if (c < matrix[r].length - 1)\n {\n str += ' |';\n }\n }\n\n if (r < matrix.length - 1)\n {\n str += '\\n';\n\n for (var i = 0; i < matrix[r].length; i++)\n {\n str += '---';\n\n if (i < matrix[r].length - 1)\n {\n str += '+';\n }\n }\n\n str += '\\n';\n }\n\n }\n\n return str;\n};\n\nmodule.exports = MatrixToString;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Reverses the columns in the given Array Matrix.\n *\n * @function Phaser.Utils.Array.Matrix.ReverseColumns\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix,$return]\n *\n * @param {T[][]} [matrix] - The array matrix to reverse the columns for.\n *\n * @return {T[][]} The column reversed matrix.\n */\nvar ReverseColumns = function (matrix)\n{\n return matrix.reverse();\n};\n\nmodule.exports = ReverseColumns;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Reverses the rows in the given Array Matrix.\n *\n * @function Phaser.Utils.Array.Matrix.ReverseRows\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix,$return]\n *\n * @param {T[][]} [matrix] - The array matrix to reverse the rows for.\n *\n * @return {T[][]} The column reversed matrix.\n */\nvar ReverseRows = function (matrix)\n{\n for (var i = 0; i < matrix.length; i++)\n {\n matrix[i].reverse();\n }\n\n return matrix;\n};\n\nmodule.exports = ReverseRows;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar RotateMatrix = require('./RotateMatrix');\n\n/**\n * Rotates the array matrix 180 degrees.\n *\n * @function Phaser.Utils.Array.Matrix.Rotate180\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix,$return]\n *\n * @param {T[][]} [matrix] - The array to rotate.\n *\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\n */\nvar Rotate180 = function (matrix)\n{\n return RotateMatrix(matrix, 180);\n};\n\nmodule.exports = Rotate180;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar RotateMatrix = require('./RotateMatrix');\n\n/**\n * Rotates the array matrix to the left (or 90 degrees)\n *\n * @function Phaser.Utils.Array.Matrix.RotateLeft\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix,$return]\n *\n * @param {T[][]} [matrix] - The array to rotate.\n *\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\n */\nvar RotateLeft = function (matrix)\n{\n return RotateMatrix(matrix, 90);\n};\n\nmodule.exports = RotateLeft;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CheckMatrix = require('./CheckMatrix');\nvar TransposeMatrix = require('./TransposeMatrix');\n\n/**\n * Rotates the array matrix based on the given rotation value.\n *\n * The value can be given in degrees: 90, -90, 270, -270 or 180,\n * or a string command: `rotateLeft`, `rotateRight` or `rotate180`.\n *\n * Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}.\n *\n * @function Phaser.Utils.Array.Matrix.RotateMatrix\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix,$return]\n *\n * @param {T[][]} [matrix] - The array to rotate.\n * @param {(number|string)} [direction=90] - The amount to rotate the matrix by.\n *\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\n */\nvar RotateMatrix = function (matrix, direction)\n{\n if (direction === undefined) { direction = 90; }\n\n if (!CheckMatrix(matrix))\n {\n return null;\n }\n\n if (typeof direction !== 'string')\n {\n direction = ((direction % 360) + 360) % 360;\n }\n\n if (direction === 90 || direction === -270 || direction === 'rotateLeft')\n {\n matrix = TransposeMatrix(matrix);\n matrix.reverse();\n }\n else if (direction === -90 || direction === 270 || direction === 'rotateRight')\n {\n matrix.reverse();\n matrix = TransposeMatrix(matrix);\n }\n else if (Math.abs(direction) === 180 || direction === 'rotate180')\n {\n for (var i = 0; i < matrix.length; i++)\n {\n matrix[i].reverse();\n }\n\n matrix.reverse();\n }\n\n return matrix;\n};\n\nmodule.exports = RotateMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar RotateMatrix = require('./RotateMatrix');\n\n/**\n * Rotates the array matrix to the left (or -90 degrees)\n *\n * @function Phaser.Utils.Array.Matrix.RotateRight\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix,$return]\n *\n * @param {T[][]} [matrix] - The array to rotate.\n *\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\n */\nvar RotateRight = function (matrix)\n{\n return RotateMatrix(matrix, -90);\n};\n\nmodule.exports = RotateRight;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Transposes the elements of the given matrix (array of arrays).\n *\n * The transpose of a matrix is a new matrix whose rows are the columns of the original.\n *\n * @function Phaser.Utils.Array.Matrix.TransposeMatrix\n * @since 3.0.0\n * \n * @generic T\n * @genericUse {T[][]} - [array,$return]\n * \n * @param {T[][]} [array] - The array matrix to transpose.\n *\n * @return {T[][]} A new array matrix which is a transposed version of the given array.\n */\nvar TransposeMatrix = function (array)\n{\n var sourceRowCount = array.length;\n var sourceColCount = array[0].length;\n\n var result = new Array(sourceColCount);\n\n for (var i = 0; i < sourceColCount; i++)\n {\n result[i] = new Array(sourceRowCount);\n\n for (var j = sourceRowCount - 1; j > -1; j--)\n {\n result[i][j] = array[j][i];\n }\n }\n\n return result;\n};\n\nmodule.exports = TransposeMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Utils.Array.Matrix\n */\n\nmodule.exports = {\n\n CheckMatrix: require('./CheckMatrix'),\n MatrixToString: require('./MatrixToString'),\n ReverseColumns: require('./ReverseColumns'),\n ReverseRows: require('./ReverseRows'),\n Rotate180: require('./Rotate180'),\n RotateLeft: require('./RotateLeft'),\n RotateMatrix: require('./RotateMatrix'),\n RotateRight: require('./RotateRight'),\n TransposeMatrix: require('./TransposeMatrix')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar IsPlainObject = require('./IsPlainObject');\n\n// @param {boolean} deep - Perform a deep copy?\n// @param {object} target - The target object to copy to.\n// @return {object} The extended object.\n\n/**\n * This is a slightly modified version of http://api.jquery.com/jQuery.extend/\n *\n * @function Phaser.Utils.Objects.Extend\n * @since 3.0.0\n *\n * @param {...*} [args] - The objects that will be mixed.\n *\n * @return {object} The extended object.\n */\nvar Extend = function ()\n{\n var options, name, src, copy, copyIsArray, clone,\n target = arguments[0] || {},\n i = 1,\n length = arguments.length,\n deep = false;\n\n // Handle a deep copy situation\n if (typeof target === 'boolean')\n {\n deep = target;\n target = arguments[1] || {};\n\n // skip the boolean and the target\n i = 2;\n }\n\n // extend Phaser if only one argument is passed\n if (length === i)\n {\n target = this;\n --i;\n }\n\n for (; i < length; i++)\n {\n // Only deal with non-null/undefined values\n if ((options = arguments[i]) != null)\n {\n // Extend the base object\n for (name in options)\n {\n src = target[name];\n copy = options[name];\n\n // Prevent never-ending loop\n if (target === copy)\n {\n continue;\n }\n\n // Recurse if we're merging plain objects or arrays\n if (deep && copy && (IsPlainObject(copy) || (copyIsArray = Array.isArray(copy))))\n {\n if (copyIsArray)\n {\n copyIsArray = false;\n clone = src && Array.isArray(src) ? src : [];\n }\n else\n {\n clone = src && IsPlainObject(src) ? src : {};\n }\n\n // Never move original objects, clone them\n target[name] = Extend(deep, clone, copy);\n\n // Don't bring in undefined values\n }\n else if (copy !== undefined)\n {\n target[name] = copy;\n }\n }\n }\n }\n\n // Return the modified object\n return target;\n};\n\nmodule.exports = Extend;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar MATH = require('../../math');\nvar GetValue = require('./GetValue');\n\n/**\n * Retrieves a value from an object. Allows for more advanced selection options, including:\n *\n * Allowed types:\n * \n * Implicit\n * {\n * x: 4\n * }\n *\n * From function\n * {\n * x: function ()\n * }\n *\n * Randomly pick one element from the array\n * {\n * x: [a, b, c, d, e, f]\n * }\n *\n * Random integer between min and max:\n * {\n * x: { randInt: [min, max] }\n * }\n *\n * Random float between min and max:\n * {\n * x: { randFloat: [min, max] }\n * }\n * \n *\n * @function Phaser.Utils.Objects.GetAdvancedValue\n * @since 3.0.0\n *\n * @param {object} source - The object to retrieve the value from.\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\n *\n * @return {*} The value of the requested key.\n */\nvar GetAdvancedValue = function (source, key, defaultValue)\n{\n var value = GetValue(source, key, null);\n\n if (value === null)\n {\n return defaultValue;\n }\n else if (Array.isArray(value))\n {\n return MATH.RND.pick(value);\n }\n else if (typeof value === 'object')\n {\n if (value.hasOwnProperty('randInt'))\n {\n return MATH.RND.integerInRange(value.randInt[0], value.randInt[1]);\n }\n else if (value.hasOwnProperty('randFloat'))\n {\n return MATH.RND.realInRange(value.randFloat[0], value.randFloat[1]);\n }\n }\n else if (typeof value === 'function')\n {\n return value(key);\n }\n\n return value;\n};\n\nmodule.exports = GetAdvancedValue;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Finds the key within the top level of the {@link source} object, or returns {@link defaultValue}\n *\n * @function Phaser.Utils.Objects.GetFastValue\n * @since 3.0.0\n *\n * @param {object} source - The object to search\n * @param {string} key - The key for the property on source. Must exist at the top level of the source object (no periods)\n * @param {*} [defaultValue] - The default value to use if the key does not exist.\n *\n * @return {*} The value if found; otherwise, defaultValue (null if none provided)\n */\nvar GetFastValue = function (source, key, defaultValue)\n{\n var t = typeof(source);\n\n if (!source || t === 'number' || t === 'string')\n {\n return defaultValue;\n }\n else if (source.hasOwnProperty(key) && source[key] !== undefined)\n {\n return source[key];\n }\n else\n {\n return defaultValue;\n }\n};\n\nmodule.exports = GetFastValue;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Source object\n// The key as a string, or an array of keys, i.e. 'banner', or 'banner.hideBanner'\n// The default value to use if the key doesn't exist\n\n/**\n * Retrieves a value from an object.\n *\n * @function Phaser.Utils.Objects.GetValue\n * @since 3.0.0\n *\n * @param {object} source - The object to retrieve the value from.\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\n *\n * @return {*} The value of the requested key.\n */\nvar GetValue = function (source, key, defaultValue)\n{\n if (!source || typeof source === 'number')\n {\n return defaultValue;\n }\n else if (source.hasOwnProperty(key))\n {\n return source[key];\n }\n else if (key.indexOf('.') !== -1)\n {\n var keys = key.split('.');\n var parent = source;\n var value = defaultValue;\n\n // Use for loop here so we can break early\n for (var i = 0; i < keys.length; i++)\n {\n if (parent.hasOwnProperty(keys[i]))\n {\n // Yes it has a key property, let's carry on down\n value = parent[keys[i]];\n\n parent = parent[keys[i]];\n }\n else\n {\n // Can't go any further, so reset to default\n value = defaultValue;\n break;\n }\n }\n\n return value;\n }\n else\n {\n return defaultValue;\n }\n};\n\nmodule.exports = GetValue;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * This is a slightly modified version of jQuery.isPlainObject.\n * A plain object is an object whose internal class property is [object Object].\n *\n * @function Phaser.Utils.Objects.IsPlainObject\n * @since 3.0.0\n *\n * @param {object} obj - The object to inspect.\n *\n * @return {boolean} `true` if the object is plain, otherwise `false`.\n */\nvar IsPlainObject = function (obj)\n{\n // Not plain objects:\n // - Any object or value whose internal [[Class]] property is not \"[object Object]\"\n // - DOM nodes\n // - window\n if (typeof(obj) !== 'object' || obj.nodeType || obj === obj.window)\n {\n return false;\n }\n\n // Support: Firefox <20\n // The try/catch suppresses exceptions thrown when attempting to access\n // the \"constructor\" property of certain host objects, ie. |window.location|\n // https://bugzilla.mozilla.org/show_bug.cgi?id=814622\n try\n {\n if (obj.constructor && !({}).hasOwnProperty.call(obj.constructor.prototype, 'isPrototypeOf'))\n {\n return false;\n }\n }\n catch (e)\n {\n return false;\n }\n\n // If the function hasn't returned already, we're confident that\n // |obj| is a plain object, created by {} or constructed with new Object\n return true;\n};\n\nmodule.exports = IsPlainObject;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Takes the given string and pads it out, to the length required, using the character\n * specified. For example if you need a string to be 6 characters long, you can call:\n *\n * `pad('bob', 6, '-', 2)`\n *\n * This would return: `bob---` as it has padded it out to 6 characters, using the `-` on the right.\n *\n * You can also use it to pad numbers (they are always returned as strings):\n * \n * `pad(512, 6, '0', 1)`\n *\n * Would return: `000512` with the string padded to the left.\n *\n * If you don't specify a direction it'll pad to both sides:\n * \n * `pad('c64', 7, '*')`\n *\n * Would return: `**c64**`\n *\n * @function Phaser.Utils.String.Pad\n * @since 3.0.0\n *\n * @param {string|number|object} str - The target string. `toString()` will be called on the string, which means you can also pass in common data types like numbers.\n * @param {integer} [len=0] - The number of characters to be added.\n * @param {string} [pad=\" \"] - The string to pad it out with (defaults to a space).\n * @param {integer} [dir=3] - The direction dir = 1 (left), 2 (right), 3 (both).\n * \n * @return {string} The padded string.\n */\nvar Pad = function (str, len, pad, dir)\n{\n if (len === undefined) { len = 0; }\n if (pad === undefined) { pad = ' '; }\n if (dir === undefined) { dir = 3; }\n\n str = str.toString();\n\n var padlen = 0;\n\n if (len + 1 >= str.length)\n {\n switch (dir)\n {\n case 1:\n str = new Array(len + 1 - str.length).join(pad) + str;\n break;\n\n case 3:\n var right = Math.ceil((padlen = len - str.length) / 2);\n var left = padlen - right;\n str = new Array(left + 1).join(pad) + str + new Array(right + 1).join(pad);\n break;\n\n default:\n str = str + new Array(len + 1 - str.length).join(pad);\n break;\n }\n }\n\n return str;\n};\n\nmodule.exports = Pad;\n","/**\n * @author Richard Davey \n * @copyright 2018 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar Class = require('../../../src/utils/Class');\nvar GetFastValue = require('../../../src/utils/object/GetFastValue');\nvar ImageFile = require('../../../src/loader/filetypes/ImageFile.js');\nvar IsPlainObject = require('../../../src/utils/object/IsPlainObject');\nvar JSONFile = require('../../../src/loader/filetypes/JSONFile.js');\nvar MultiFile = require('../../../src/loader/MultiFile.js');\nvar TextFile = require('../../../src/loader/filetypes/TextFile.js');\n\n/**\n * @typedef {object} Phaser.Loader.FileTypes.SpineFileConfig\n *\n * @property {string} key - The key of the file. Must be unique within both the Loader and the Texture Manager.\n * @property {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\n * @property {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\n * @property {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\n * @property {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\n * @property {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\n */\n\n/**\n * @classdesc\n * A Spine File suitable for loading by the Loader.\n *\n * These are created when you use the Phaser.Loader.LoaderPlugin#spine method and are not typically created directly.\n *\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#spine.\n *\n * @class SpineFile\n * @extends Phaser.Loader.MultiFile\n * @memberof Phaser.Loader.FileTypes\n * @constructor\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\n * @param {(string|Phaser.Loader.FileTypes.SpineFileConfig)} key - The key to use for this file, or a file configuration object.\n * @param {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\n * @param {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\n * @param {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\n * @param {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\n */\nvar SpineFile = new Class({\n\n Extends: MultiFile,\n\n initialize:\n\n function SpineFile (loader, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings)\n {\n var i;\n var json;\n var atlas;\n var files = [];\n var cache = loader.cacheManager.custom.spine;\n\n // atlas can be an array of atlas files, not just a single one\n\n if (IsPlainObject(key))\n {\n var config = key;\n\n key = GetFastValue(config, 'key');\n\n json = new JSONFile(loader, {\n key: key,\n url: GetFastValue(config, 'jsonURL'),\n extension: GetFastValue(config, 'jsonExtension', 'json'),\n xhrSettings: GetFastValue(config, 'jsonXhrSettings')\n });\n\n atlasURL = GetFastValue(config, 'atlasURL');\n preMultipliedAlpha = GetFastValue(config, 'preMultipliedAlpha');\n\n if (!Array.isArray(atlasURL))\n {\n atlasURL = [ atlasURL ];\n }\n\n for (i = 0; i < atlasURL.length; i++)\n {\n atlas = new TextFile(loader, {\n key: key + '_' + i,\n url: atlasURL[i],\n extension: GetFastValue(config, 'atlasExtension', 'atlas'),\n xhrSettings: GetFastValue(config, 'atlasXhrSettings')\n });\n\n atlas.cache = cache;\n\n files.push(atlas);\n }\n }\n else\n {\n json = new JSONFile(loader, key, jsonURL, jsonXhrSettings);\n\n if (!Array.isArray(atlasURL))\n {\n atlasURL = [ atlasURL ];\n }\n\n for (i = 0; i < atlasURL.length; i++)\n {\n atlas = new TextFile(loader, key + '_' + i, atlasURL[i], atlasXhrSettings);\n atlas.cache = cache;\n\n files.push(atlas);\n }\n }\n\n files.unshift(json);\n\n MultiFile.call(this, loader, 'spine', key, files);\n\n this.config.preMultipliedAlpha = preMultipliedAlpha;\n },\n\n /**\n * Called by each File when it finishes loading.\n *\n * @method Phaser.Loader.FileTypes.SpineFile#onFileComplete\n * @since 3.19.0\n *\n * @param {Phaser.Loader.File} file - The File that has completed processing.\n */\n onFileComplete: function (file)\n {\n var index = this.files.indexOf(file);\n\n if (index !== -1)\n {\n this.pending--;\n\n if (file.type === 'text')\n {\n // Inspect the data for the files to now load\n var content = file.data.split('\\n');\n\n // Extract the textures\n var textures = [];\n\n for (var t = 0; t < content.length; t++)\n {\n var line = content[t];\n\n if (line.trim() === '' && t < content.length - 1)\n {\n line = content[t + 1];\n\n textures.push(line);\n }\n }\n\n var config = this.config;\n var loader = this.loader;\n\n var currentBaseURL = loader.baseURL;\n var currentPath = loader.path;\n var currentPrefix = loader.prefix;\n\n var baseURL = GetFastValue(config, 'baseURL', this.baseURL);\n var path = GetFastValue(config, 'path', file.src.match(/^.*\\//))[0];\n var prefix = GetFastValue(config, 'prefix', this.prefix);\n var textureXhrSettings = GetFastValue(config, 'textureXhrSettings');\n\n loader.setBaseURL(baseURL);\n loader.setPath(path);\n loader.setPrefix(prefix);\n\n for (var i = 0; i < textures.length; i++)\n {\n var textureURL = textures[i];\n\n var key = this.prefix + textureURL;\n\n var image = new ImageFile(loader, key, textureURL, textureXhrSettings);\n\n this.addToMultiFile(image);\n\n loader.addFile(image);\n }\n\n // Reset the loader settings\n loader.setBaseURL(currentBaseURL);\n loader.setPath(currentPath);\n loader.setPrefix(currentPrefix);\n }\n }\n },\n\n /**\n * Adds this file to its target cache upon successful loading and processing.\n *\n * @method Phaser.Loader.FileTypes.SpineFile#addToCache\n * @since 3.19.0\n */\n addToCache: function ()\n {\n if (this.isReadyToProcess())\n {\n var fileJSON = this.files[0];\n\n fileJSON.addToCache();\n\n var atlasCache;\n var atlasKey = '';\n var combinedAtlasData = '';\n var preMultipliedAlpha = (this.config.preMultipliedAlpha) ? true : false;\n var textureManager = this.loader.textureManager;\n\n for (var i = 1; i < this.files.length; i++)\n {\n var file = this.files[i];\n\n if (file.type === 'text')\n {\n atlasKey = file.key.replace(/_[\\d]$/, '');\n\n atlasCache = file.cache;\n\n combinedAtlasData = combinedAtlasData.concat(file.data);\n }\n else\n {\n var src = file.key.trim();\n var pos = src.indexOf('_');\n var key = src.substr(pos + 1);\n\n if (!textureManager.exists(key))\n {\n textureManager.addImage(key, file.data);\n }\n }\n\n file.pendingDestroy();\n }\n\n atlasCache.add(atlasKey, { preMultipliedAlpha: preMultipliedAlpha, data: combinedAtlasData, prefix: this.prefix });\n\n this.complete = true;\n }\n }\n\n});\n\nmodule.exports = SpineFile;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar BuildGameObject = require('../../../src/gameobjects/BuildGameObject');\nvar Class = require('../../../src/utils/Class');\nvar GetValue = require('../../../src/utils/object/GetValue');\nvar ResizeEvent = require('../../../src/scale/events/RESIZE_EVENT');\nvar ScenePlugin = require('../../../src/plugins/ScenePlugin');\nvar Spine = require('Spine');\nvar SpineFile = require('./SpineFile');\nvar SpineGameObject = require('./gameobject/SpineGameObject');\nvar SpineContainer = require('./container/SpineContainer');\nvar NOOP = require('../../../src/utils/NOOP');\n\n/**\n * @classdesc\n * The Spine Plugin is a Scene based plugin that handles the creation and rendering of Spine Game Objects.\n *\n * Find more details about Spine itself at http://esotericsoftware.com/.\n *\n * All rendering and object creation is handled via the official Spine Runtimes. This version of the plugin\n * uses the Spine 3.8.95 runtimes. Please note that due to the way the Spine runtimes use semver, you will\n * get breaking changes in point-releases. Therefore, files created in a different version of Spine may not\n * work as a result, without you first updating the runtimes and rebuilding the plugin.\n *\n * Esoteric themselves recommend that you freeze your Spine editor version against the runtime versions.\n * You can find more information about this here: http://esotericsoftware.com/spine-settings#Version\n *\n * Please note that you require a Spine license in order to use Spine Runtimes in your games.\n *\n * You can install this plugin into your Phaser game by either importing it, if you're using ES6:\n *\n * ```javascript\n * import * as SpinePlugin from './SpinePlugin.js';\n * ```\n *\n * and then adding it to your Phaser Game configuration:\n *\n * ```javascript\n * plugins: {\n * scene: [\n * { key: 'SpinePlugin', plugin: window.SpinePlugin, mapping: 'spine' }\n * ]\n * }\n * ```\n *\n * If you're using ES5 then you can load the Spine Plugin in a Scene files payload, _within_ your\n * Game Configuration object, like this:\n *\n * ```javascript\n * scene: {\n * preload: preload,\n * create: create,\n * pack: {\n * files: [\n * { type: 'scenePlugin', key: 'SpinePlugin', url: 'plugins/SpinePlugin.js', sceneKey: 'spine' }\n * ]\n * }\n * }\n * ```\n *\n * Loading it like this allows you to then use commands such as `this.load.spine` from within the\n * same Scene. Alternatively, you can use the method `this.load.plugin` to load the plugin via the normal\n * Phaser Loader. However, doing so will not add it to the current Scene. It will be available from any\n * subsequent Scenes.\n *\n * Assuming a default environment you access it from within a Scene by using the `this.spine` reference.\n *\n * When this plugin is installed into a Scene it will add a Loader File Type, allowing you to load\n * Spine files directly, i.e.:\n *\n * ```javascript\n * this.load.spine('stretchyman', 'stretchyman-pro.json', [ 'stretchyman-pma.atlas' ], true);\n * ```\n *\n * It also installs two Game Object Factory methods, allowing you to create Spine Game Objects\n * and Spine Containers:\n *\n * ```javascript\n * const man = this.add.spine(512, 650, 'stretchyman');\n *\n * const container = this.add.spineContainer();\n *\n * container.add(man);\n * ```\n *\n * The first argument is the key which you used when importing the Spine data. There are lots of\n * things you can specify, such as the animation name, skeleton, slot attachments and more. Please\n * see the respective documentation and examples for further details.\n *\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary.\n * The associated atlas files are scanned for any texture files present in them, which are then loaded.\n * If you have exported your Spine data with preMultipliedAlpha set, then you should enable this in the\n * load arguments, or you may see black outlines around skeleton textures.\n *\n * The Spine plugin is local to the Scene in which it is installed. This means a change to something,\n * such as the Skeleton Debug Renderer, in this Scene, will not impact the renderer in any other Scene.\n * The only exception to this is with the caches this plugin creates. Spine atlas and texture data are\n * stored in their own caches, which are global, meaning they're accessible from any Scene in your\n * game, regardless if the Scene loaded the Spine data or not.\n *\n * When destroying a Phaser Game instance, if you need to re-create it again on the same page without\n * reloading, you must remember to remove the Spine Plugin as part of your tear-down process:\n *\n * ```javascript\n * this.plugins.removeScenePlugin('SpinePlugin');\n * ```\n *\n * For details about the Spine Runtime API see http://esotericsoftware.com/spine-api-reference\n *\n * @class SpinePlugin\n * @extends Phaser.Plugins.ScenePlugin\n * @constructor\n * @since 3.19.0\n *\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Phaser Plugin Manager.\n */\nvar SpinePlugin = new Class({\n\n Extends: ScenePlugin,\n\n initialize:\n\n function SpinePlugin (scene, pluginManager)\n {\n ScenePlugin.call(this, scene, pluginManager);\n\n var game = pluginManager.game;\n\n /**\n * A read-only flag that indicates if the game is running under WebGL or Canvas.\n *\n * @name SpinePlugin#isWebGL\n * @type {boolean}\n * @readonly\n * @since 3.19.0\n */\n this.isWebGL = (game.config.renderType === 2);\n\n /**\n * A custom cache that stores the Spine atlas data.\n *\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\n * no matter which Scene you are in.\n *\n * @name SpinePlugin#cache\n * @type {Phaser.Cache.BaseCache}\n * @since 3.19.0\n */\n this.cache = game.cache.addCustom('spine');\n\n /**\n * A custom cache that stores the Spine Textures.\n *\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\n * no matter which Scene you are in.\n *\n * @name SpinePlugin#spineTextures\n * @type {Phaser.Cache.BaseCache}\n * @since 3.19.0\n */\n this.spineTextures = game.cache.addCustom('spineTextures');\n\n /**\n * A reference to the global JSON Cache.\n *\n * @name SpinePlugin#json\n * @type {Phaser.Cache.BaseCache}\n * @since 3.19.0\n */\n this.json = game.cache.json;\n\n /**\n * A reference to the global Texture Manager.\n *\n * @name SpinePlugin#textures\n * @type {Phaser.Textures.TextureManager}\n * @since 3.19.0\n */\n this.textures = game.textures;\n\n /**\n * A flag that sets if the Skeleton Renderers will render debug information over the top\n * of the skeleton or not.\n *\n * @name SpinePlugin#drawDebug\n * @type {boolean}\n * @since 3.19.0\n */\n this.drawDebug = false;\n\n /**\n * The underlying WebGL context of the Phaser renderer.\n *\n * Only set if running in WebGL mode.\n *\n * @name SpinePlugin#gl\n * @type {WebGLRenderingContext}\n * @since 3.19.0\n */\n this.gl;\n\n /**\n * A reference to either the Canvas or WebGL Renderer that this Game is using.\n *\n * @name SpinePlugin#renderer\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\n * @since 3.19.0\n */\n this.renderer;\n\n /**\n * An instance of the Spine WebGL Scene Renderer.\n *\n * Only set if running in WebGL mode.\n *\n * @name SpinePlugin#sceneRenderer\n * @type {spine.webgl.SceneRenderer}\n * @since 3.19.0\n */\n this.sceneRenderer;\n\n /**\n * An instance of the Spine Skeleton Renderer.\n *\n * @name SpinePlugin#skeletonRenderer\n * @type {(spine.canvas.SkeletonRenderer|spine.webgl.SkeletonRenderer)}\n * @since 3.19.0\n */\n this.skeletonRenderer;\n\n /**\n * An instance of the Spine Skeleton Debug Renderer.\n *\n * Only set if running in WebGL mode.\n *\n * @name SpinePlugin#skeletonDebugRenderer\n * @type {spine.webgl.skeletonDebugRenderer}\n * @since 3.19.0\n */\n this.skeletonDebugRenderer;\n\n /**\n * A reference to the Spine runtime.\n * This is the runtime created by Esoteric Software\n *\n * @name SpinePlugin#plugin\n * @type {spine}\n * @since 3.19.0\n */\n this.plugin = Spine;\n\n /**\n * An internal vector3 used by the screen to world method.\n *\n * @name SpinePlugin#temp1\n * @private\n * @type {spine.webgl.Vector3}\n * @since 3.19.0\n */\n this.temp1;\n\n /**\n * An internal vector3 used by the screen to world method.\n *\n * @name SpinePlugin#temp2\n * @private\n * @type {spine.webgl.Vector3}\n * @since 3.19.0\n */\n this.temp2;\n\n if (this.isWebGL)\n {\n this.runtime = Spine.webgl;\n\n this.renderer = game.renderer;\n this.gl = game.renderer.gl;\n\n this.getAtlas = this.getAtlasWebGL;\n }\n else\n {\n this.runtime = Spine.canvas;\n\n this.renderer = game.renderer;\n\n this.getAtlas = this.getAtlasCanvas;\n }\n\n // Headless mode?\n if (!this.renderer)\n {\n this.renderer = {\n width: game.scale.width,\n height: game.scale.height,\n preRender: NOOP,\n postRender: NOOP,\n render: NOOP,\n destroy: NOOP\n };\n }\n\n var _this = this;\n\n var add = function (x, y, key, animationName, loop)\n {\n var spineGO = new SpineGameObject(this.scene, _this, x, y, key, animationName, loop);\n\n this.displayList.add(spineGO);\n this.updateList.add(spineGO);\n\n return spineGO;\n };\n\n var make = function (config, addToScene)\n {\n if (config === undefined) { config = {}; }\n\n var key = GetValue(config, 'key', null);\n var animationName = GetValue(config, 'animationName', null);\n var loop = GetValue(config, 'loop', false);\n\n var spineGO = new SpineGameObject(this.scene, _this, 0, 0, key, animationName, loop);\n\n if (addToScene !== undefined)\n {\n config.add = addToScene;\n }\n\n BuildGameObject(this.scene, spineGO, config);\n\n // Spine specific\n var skinName = GetValue(config, 'skinName', false);\n\n if (skinName)\n {\n spineGO.setSkinByName(skinName);\n }\n\n var slotName = GetValue(config, 'slotName', false);\n var attachmentName = GetValue(config, 'attachmentName', null);\n\n if (slotName)\n {\n spineGO.setAttachment(slotName, attachmentName);\n }\n\n return spineGO.refresh();\n };\n\n var addContainer = function (x, y, children)\n {\n var spineGO = new SpineContainer(this.scene, _this, x, y, children);\n\n this.displayList.add(spineGO);\n\n return spineGO;\n };\n\n var makeContainer = function (config, addToScene)\n {\n if (config === undefined) { config = {}; }\n\n var x = GetValue(config, 'x', 0);\n var y = GetValue(config, 'y', 0);\n var children = GetValue(config, 'children', null);\n\n var container = new SpineContainer(this.scene, _this, x, y, children);\n\n if (addToScene !== undefined)\n {\n config.add = addToScene;\n }\n\n BuildGameObject(this.scene, container, config);\n\n return container;\n };\n\n pluginManager.registerFileType('spine', this.spineFileCallback, scene);\n pluginManager.registerGameObject('spine', add, make);\n pluginManager.registerGameObject('spineContainer', addContainer, makeContainer);\n },\n\n /**\n * Internal boot handler.\n *\n * @method SpinePlugin#boot\n * @private\n * @since 3.19.0\n */\n boot: function ()\n {\n if (this.isWebGL)\n {\n this.bootWebGL();\n this.onResize();\n this.game.scale.on(ResizeEvent, this.onResize, this);\n }\n else\n {\n this.bootCanvas();\n }\n\n var eventEmitter = this.systems.events;\n\n eventEmitter.once('shutdown', this.shutdown, this);\n eventEmitter.once('destroy', this.destroy, this);\n\n this.game.events.once('destroy', this.gameDestroy, this);\n },\n\n /**\n * Internal boot handler for the Canvas Renderer.\n *\n * @method SpinePlugin#bootCanvas\n * @private\n * @since 3.19.0\n */\n bootCanvas: function ()\n {\n this.skeletonRenderer = new Spine.canvas.SkeletonRenderer(this.scene.sys.context);\n },\n\n /**\n * Internal boot handler for the WebGL Renderer.\n *\n * @method SpinePlugin#bootWebGL\n * @private\n * @since 3.19.0\n */\n bootWebGL: function ()\n {\n this.sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true);\n\n // Monkeypatch the Spine setBlendMode functions, or batching is destroyed!\n\n var setBlendMode = function (srcBlend, dstBlend)\n {\n if (srcBlend !== this.srcBlend || dstBlend !== this.dstBlend)\n {\n var gl = this.context.gl;\n\n this.srcBlend = srcBlend;\n this.dstBlend = dstBlend;\n\n if (this.isDrawing)\n {\n this.flush();\n gl.blendFunc(this.srcBlend, this.dstBlend);\n }\n }\n };\n\n this.sceneRenderer.batcher.setBlendMode = setBlendMode;\n this.sceneRenderer.shapes.setBlendMode = setBlendMode;\n\n this.skeletonRenderer = this.sceneRenderer.skeletonRenderer;\n this.skeletonDebugRenderer = this.sceneRenderer.skeletonDebugRenderer;\n\n this.temp1 = new Spine.webgl.Vector3(0, 0, 0);\n this.temp2 = new Spine.webgl.Vector3(0, 0, 0);\n },\n\n /**\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\n * then returns it. You do not normally need to invoke this method directly.\n *\n * @method SpinePlugin#getAtlasCanvas\n * @since 3.19.0\n *\n * @param {string} key - The key of the Spine Atlas to create.\n *\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\n */\n getAtlasCanvas: function (key)\n {\n var atlasEntry = this.cache.get(key);\n\n if (!atlasEntry)\n {\n console.warn('No atlas data for: ' + key);\n return;\n }\n\n var atlas;\n var spineTextures = this.spineTextures;\n\n if (spineTextures.has(key))\n {\n atlas = spineTextures.get(key);\n }\n else\n {\n var textures = this.textures;\n\n atlas = new Spine.TextureAtlas(atlasEntry.data, function (path)\n {\n return new Spine.canvas.CanvasTexture(textures.get(atlasEntry.prefix + path).getSourceImage());\n });\n }\n\n return atlas;\n },\n\n /**\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\n * then returns it. You do not normally need to invoke this method directly.\n *\n * @method SpinePlugin#getAtlasWebGL\n * @since 3.19.0\n *\n * @param {string} key - The key of the Spine Atlas to create.\n *\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\n */\n getAtlasWebGL: function (key)\n {\n var atlasEntry = this.cache.get(key);\n\n if (!atlasEntry)\n {\n console.warn('No atlas data for: ' + key);\n return;\n }\n\n var atlas;\n var spineTextures = this.spineTextures;\n\n if (spineTextures.has(key))\n {\n atlas = spineTextures.get(key);\n }\n else\n {\n var textures = this.textures;\n\n var gl = this.sceneRenderer.context.gl;\n\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\n\n atlas = new Spine.TextureAtlas(atlasEntry.data, function (path)\n {\n return new Spine.webgl.GLTexture(gl, textures.get(atlasEntry.prefix + path).getSourceImage(), false);\n });\n }\n\n return atlas;\n },\n\n /**\n * Adds a Spine Skeleton and Atlas file, or array of files, to the current load queue.\n *\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\n *\n * ```javascript\n * function preload ()\n * {\n * this.load.spine('spineBoy', 'boy.json', 'boy.atlas', true);\n * }\n * ```\n *\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\n * loaded.\n *\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\n *\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary. The associated\n * atlas files are scanned for any texture files present in them, which are then loaded. If you have exported\n * your Spine data with preMultipliedAlpha set, then you should enable this in the arguments, or you may see black\n * outlines around skeleton textures.\n *\n * The key must be a unique String. It is used to add the file to the global Spine cache upon a successful load.\n * The key should be unique both in terms of files being loaded and files already present in the Spine cache.\n * Loading a file using a key that is already taken will result in a warning.\n *\n * Instead of passing arguments you can pass a configuration object, such as:\n *\n * ```javascript\n * this.load.spine({\n * key: 'mainmenu',\n * jsonURL: 'boy.json',\n * atlasURL: 'boy.atlas',\n * preMultipliedAlpha: true\n * });\n * ```\n *\n * If you need to load multiple Spine atlas files, provide them as an array:\n *\n * ```javascript\n * function preload ()\n * {\n * this.load.spine('demos', 'demos.json', [ 'atlas1.atlas', 'atlas2.atlas' ], true);\n * }\n * ```\n *\n * See the documentation for `Phaser.Types.Loader.FileTypes.SpineFileConfig` for more details.\n *\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\n * this is what you would use to retrieve the data from the Spine plugin.\n *\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\n *\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\n * and no URL is given then the Loader will set the URL to be \"alien.json\". It will always add `.json` as the extension, although\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\n *\n * Note: The ability to load this type of file will only be available if the Spine Plugin has been built or loaded into Phaser.\n *\n * @method Phaser.Loader.LoaderPlugin#spine\n * @fires Phaser.Loader.LoaderPlugin#ADD\n * @since 3.19.0\n *\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\n * @param {string} jsonURL - The absolute or relative URL to load the Spine json file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\n * @param {string|string[]} atlasURL - The absolute or relative URL to load the Spine atlas file from. If undefined or `null` it will be set to `.atlas`, i.e. if `key` was \"alien\" then the URL will be \"alien.atlas\".\n * @param {boolean} [preMultipliedAlpha=false] - Do the texture files include pre-multiplied alpha or not?\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the Spine json file. Used in replacement of the Loaders default XHR Settings.\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the Spine atlas file. Used in replacement of the Loaders default XHR Settings.\n *\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\n */\n spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings)\n {\n var multifile;\n\n if (Array.isArray(key))\n {\n for (var i = 0; i < key.length; i++)\n {\n multifile = new SpineFile(this, key[i]);\n\n this.addFile(multifile.files);\n }\n }\n else\n {\n multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings);\n\n this.addFile(multifile.files);\n }\n\n return this;\n },\n\n /**\n * Converts the given x and y screen coordinates into the world space of the given Skeleton.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#worldToLocal\n * @since 3.19.0\n *\n * @param {number} x - The screen space x coordinate to convert.\n * @param {number} y - The screen space y coordinate to convert.\n * @param {spine.Skeleton} skeleton - The Spine Skeleton to convert into.\n * @param {spine.Bone} [bone] - Optional bone of the Skeleton to convert into.\n *\n * @return {spine.Vector2} A Vector2 containing the translated point.\n */\n worldToLocal: function (x, y, skeleton, bone)\n {\n var temp1 = this.temp1;\n var temp2 = this.temp2;\n var camera = this.sceneRenderer.camera;\n\n temp1.set(x + skeleton.x, y - skeleton.y, 0);\n\n var width = camera.viewportWidth;\n var height = camera.viewportHeight;\n\n camera.screenToWorld(temp1, width, height);\n\n if (bone && bone.parent !== null)\n {\n bone.parent.worldToLocal(temp2.set(temp1.x - skeleton.x, temp1.y - skeleton.y, 0));\n\n return new Spine.Vector2(temp2.x, temp2.y);\n }\n else if (bone)\n {\n return new Spine.Vector2(temp1.x - skeleton.x, temp1.y - skeleton.y);\n }\n else\n {\n return new Spine.Vector2(temp1.x, temp1.y);\n }\n },\n\n /**\n * Returns a Spine Vector2 based on the given x and y values.\n *\n * @method SpinePlugin#getVector2\n * @since 3.19.0\n *\n * @param {number} x - The Vector x value.\n * @param {number} y - The Vector y value.\n *\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\n */\n getVector2: function (x, y)\n {\n return new Spine.Vector2(x, y);\n },\n\n /**\n * Returns a Spine Vector2 based on the given x, y and z values.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#getVector3\n * @since 3.19.0\n *\n * @param {number} x - The Vector x value.\n * @param {number} y - The Vector y value.\n * @param {number} z - The Vector z value.\n *\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\n */\n getVector3: function (x, y, z)\n {\n return new Spine.webgl.Vector3(x, y, z);\n },\n\n /**\n * Sets `drawBones` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugBones\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugBones: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawBones = value;\n\n return this;\n },\n\n /**\n * Sets `drawRegionAttachments` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugRegionAttachments\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugRegionAttachments: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawRegionAttachments = value;\n\n return this;\n },\n\n /**\n * Sets `drawBoundingBoxes` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugBoundingBoxes\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugBoundingBoxes: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawBoundingBoxes = value;\n\n return this;\n },\n\n /**\n * Sets `drawMeshHull` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugMeshHull\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugMeshHull: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawMeshHull = value;\n\n return this;\n },\n\n /**\n * Sets `drawMeshTriangles` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugMeshTriangles\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugMeshTriangles: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawMeshTriangles = value;\n\n return this;\n },\n\n /**\n * Sets `drawPaths` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugPaths\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugPaths: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawPaths = value;\n\n return this;\n },\n\n /**\n * Sets `drawSkeletonXY` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugSkeletonXY\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugSkeletonXY: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawSkeletonXY = value;\n\n return this;\n },\n\n /**\n * Sets `drawClipping` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugClipping\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugClipping: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawClipping = value;\n\n return this;\n },\n\n /**\n * Sets the given vertex effect on the Spine Skeleton Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setEffect\n * @since 3.19.0\n *\n * @param {spine.VertexEffect} [effect] - The vertex effect to set on the Skeleton Renderer.\n *\n * @return {this} This Spine Plugin.\n */\n setEffect: function (effect)\n {\n this.sceneRenderer.skeletonRenderer.vertexEffect = effect;\n\n return this;\n },\n\n /**\n * Creates a Spine Skeleton based on the given key and optional Skeleton JSON data.\n *\n * The Skeleton data should have already been loaded before calling this method.\n *\n * @method SpinePlugin#createSkeleton\n * @since 3.19.0\n *\n * @param {string} key - The key of the Spine skeleton data, as loaded by the plugin. If the Spine JSON contains multiple skeletons, reference them with a period, i.e. `set.spineBoy`.\n * @param {object} [skeletonJSON] - Optional Skeleton JSON data to use, instead of getting it from the cache.\n *\n * @return {(any|null)} This Spine Skeleton data object, or `null` if the key was invalid.\n */\n createSkeleton: function (key, skeletonJSON)\n {\n var atlasKey = key;\n var jsonKey = key;\n var split = (key.indexOf('.') !== -1);\n\n if (split)\n {\n var parts = key.split('.');\n\n atlasKey = parts.shift();\n jsonKey = parts.join('.');\n }\n\n var atlasData = this.cache.get(atlasKey);\n var atlas = this.getAtlas(atlasKey);\n\n if (!atlas)\n {\n return null;\n }\n\n if (!this.spineTextures.has(atlasKey))\n {\n this.spineTextures.add(atlasKey, atlas);\n }\n\n var preMultipliedAlpha = atlasData.preMultipliedAlpha;\n\n var atlasLoader = new Spine.AtlasAttachmentLoader(atlas);\n\n var skeletonJson = new Spine.SkeletonJson(atlasLoader);\n\n var data;\n\n if (skeletonJSON)\n {\n data = skeletonJSON;\n }\n else\n {\n var json = this.json.get(atlasKey);\n\n data = (split) ? GetValue(json, jsonKey) : json;\n }\n\n if (data)\n {\n var skeletonData = skeletonJson.readSkeletonData(data);\n\n var skeleton = new Spine.Skeleton(skeletonData);\n\n return { skeletonData: skeletonData, skeleton: skeleton, preMultipliedAlpha: preMultipliedAlpha };\n }\n else\n {\n return null;\n }\n },\n\n /**\n * Creates a new Animation State and Animation State Data for the given skeleton.\n *\n * The returned object contains two properties: `state` and `stateData` respectively.\n *\n * @method SpinePlugin#createAnimationState\n * @since 3.19.0\n *\n * @param {spine.Skeleton} skeleton - The Skeleton to create the Animation State for.\n *\n * @return {any} An object containing the Animation State and Animation State Data instances.\n */\n createAnimationState: function (skeleton)\n {\n var stateData = new Spine.AnimationStateData(skeleton.data);\n\n var state = new Spine.AnimationState(stateData);\n\n return { stateData: stateData, state: state };\n },\n\n /**\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\n *\n * The returned object contains two properties: `offset` and `size`:\n *\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\n * `size` - The width and height of the AABB.\n *\n * @method SpinePlugin#getBounds\n * @since 3.19.0\n *\n * @param {spine.Skeleton} skeleton - The Skeleton to get the bounds from.\n *\n * @return {any} The bounds object.\n */\n getBounds: function (skeleton)\n {\n var offset = new Spine.Vector2();\n var size = new Spine.Vector2();\n\n skeleton.getBounds(offset, size, []);\n\n return { offset: offset, size: size };\n },\n\n /**\n * Internal handler for when the renderer resizes.\n *\n * Only called if running in WebGL.\n *\n * @method SpinePlugin#onResize\n * @since 3.19.0\n */\n onResize: function ()\n {\n var renderer = this.renderer;\n var sceneRenderer = this.sceneRenderer;\n\n var viewportWidth = renderer.width;\n var viewportHeight = renderer.height;\n\n sceneRenderer.camera.position.x = viewportWidth / 2;\n sceneRenderer.camera.position.y = viewportHeight / 2;\n\n sceneRenderer.camera.viewportWidth = viewportWidth;\n sceneRenderer.camera.viewportHeight = viewportHeight;\n },\n\n /**\n * The Scene that owns this plugin is shutting down.\n *\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\n *\n * @method SpinePlugin#shutdown\n * @private\n * @since 3.19.0\n */\n shutdown: function ()\n {\n var eventEmitter = this.systems.events;\n\n eventEmitter.off('shutdown', this.shutdown, this);\n\n if (this.isWebGL)\n {\n this.game.scale.off(ResizeEvent, this.onResize, this);\n }\n },\n\n /**\n * The Scene that owns this plugin is being destroyed.\n *\n * We need to shutdown and then kill off all external references.\n *\n * @method SpinePlugin#destroy\n * @private\n * @since 3.19.0\n */\n destroy: function ()\n {\n this.shutdown();\n\n this.game = null;\n this.scene = null;\n this.systems = null;\n\n this.cache = null;\n this.spineTextures = null;\n this.json = null;\n this.textures = null;\n this.skeletonRenderer = null;\n this.gl = null;\n },\n\n /**\n * The Game that owns this plugin is being destroyed.\n *\n * Dispose of the Scene Renderer and remove the Game Objects.\n *\n * @method SpinePlugin#gameDestroy\n * @private\n * @since 3.50.0\n */\n gameDestroy: function ()\n {\n this.destroy();\n\n if (this.sceneRenderer)\n {\n this.sceneRenderer.dispose();\n }\n\n this.sceneRenderer = null;\n this.pluginManager = null;\n\n this.pluginManager.removeGameObject('spine', true, true);\n this.pluginManager.removeGameObject('spineContainer', true, true);\n }\n\n});\n\nSpinePlugin.SpineGameObject = SpineGameObject;\nSpinePlugin.SpineContainer = SpineContainer;\n\n/**\n * Creates a new Spine Game Object and adds it to the Scene.\n *\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\n * do not have a Phaser origin.\n *\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\n * that.\n *\n * ```javascript\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\n * ```\n *\n * The key is optional. If not passed here, you need to call `SpineGameObject.setSkeleton()` to use it.\n *\n * The animation name is also optional and can be set later via `SpineGameObject.setAnimation`.\n *\n * Should you wish for more control over the object creation, such as setting a slot attachment or skin\n * name, then use `SpinePlugin.make` instead.\n *\n * @method SpinePlugin#add\n * @since 3.19.0\n *\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\n *\n * @return {SpineGameObject} The Game Object that was created.\n */\n\n/**\n * Creates a new Spine Game Object from the given configuration file and optionally adds it to the Scene.\n *\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\n * do not have a Phaser origin.\n *\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\n * that.\n *\n * ```javascript\n * let jelly = this.make.spine({\n * x: 500, y: 500, key: 'jelly',\n * scale: 1.5,\n * skinName: 'square_Green',\n * animationName: 'jelly-idle', loop: true,\n * slotName: 'hat', attachmentName: 'images/La_14'\n * });\n * ```\n *\n * @method SpinePlugin#make\n * @since 3.19.0\n *\n * @param {any} config - The configuration object this Game Object will use to create itself.\n * @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.\n *\n * @return {SpineGameObject} The Game Object that was created.\n */\n\nmodule.exports = SpinePlugin;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar Class = require('../../../../src/utils/Class');\nvar Container = require('../../../../src/gameobjects/container/Container');\nvar SpineContainerRender = require('./SpineContainerRender');\n\n/**\n * @classdesc\n * A Spine Container is a special kind of Container created specifically for Spine Game Objects.\n *\n * You have all of the same features of a standard Container, but the rendering functions are optimized specifically\n * for Spine Game Objects. You must only add ever Spine Game Objects to this type of Container. Although Phaser will\n * not prevent you from adding other types, they will not render and are likely to throw runtime errors.\n *\n * To create one in a Scene, use the factory methods:\n *\n * ```javascript\n * this.add.spinecontainer();\n * ```\n *\n * or\n *\n * ```javascript\n * this.make.spinecontainer();\n * ```\n *\n * See the Container documentation for further details about what Containers can do.\n *\n * @class SpineContainer\n * @extends Phaser.GameObjects.Container\n * @constructor\n * @since 3.50.0\n *\n * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to.\n * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin.\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {SpineGameObject[]} [children] - An optional array of Spine Game Objects to add to this Container.\n */\nvar SpineContainer = new Class({\n\n Extends: Container,\n\n Mixins: [\n SpineContainerRender\n ],\n\n initialize:\n\n function SpineContainer (scene, plugin, x, y, children)\n {\n Container.call(this, scene, x, y, children);\n\n // Same as SpineGameObject, to prevent the renderer from mis-typing it when batching\n this.type = 'Spine';\n\n /**\n * A reference to the Spine Plugin.\n *\n * @name SpineContainer#plugin\n * @type {SpinePlugin}\n * @since 3.50.0\n */\n this.plugin = plugin;\n },\n\n /**\n * Internal destroy handler, called as part of the destroy process.\n *\n * @method SpineContainer#preDestroy\n * @protected\n * @since 3.50.0\n */\n preDestroy: function ()\n {\n this.removeAll(!!this.exclusive);\n\n this.localTransform.destroy();\n this.tempTransformMatrix.destroy();\n\n this.list = [];\n this._displayList = null;\n this.plugin = null;\n }\n\n});\n\nmodule.exports = SpineContainer;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Renders this Game Object with the Canvas Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method Phaser.GameObjects.Container#renderCanvas\n * @since 3.4.0\n * @private\n *\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar SpineContainerCanvasRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix)\n{\n var children = container.list;\n\n if (children.length === 0)\n {\n return;\n }\n\n var transformMatrix = container.localTransform;\n\n if (parentMatrix)\n {\n transformMatrix.loadIdentity();\n transformMatrix.multiply(parentMatrix);\n transformMatrix.translate(container.x, container.y);\n transformMatrix.rotate(container.rotation);\n transformMatrix.scale(container.scaleX, container.scaleY);\n }\n else\n {\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\n }\n\n var containerHasBlendMode = (container.blendMode !== -1);\n\n if (!containerHasBlendMode)\n {\n // If Container is SKIP_TEST then set blend mode to be Normal\n renderer.setBlendMode(0);\n }\n\n var alpha = container._alpha;\n var scrollFactorX = container.scrollFactorX;\n var scrollFactorY = container.scrollFactorY;\n\n if (container.mask)\n {\n container.mask.preRenderCanvas(renderer, null, camera);\n }\n\n for (var i = 0; i < children.length; i++)\n {\n var child = children[i];\n\n if (!child.willRender(camera))\n {\n continue;\n }\n\n var childAlpha = child.alpha;\n var childScrollFactorX = child.scrollFactorX;\n var childScrollFactorY = child.scrollFactorY;\n\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\n {\n // If Container doesn't have its own blend mode, then a child can have one\n renderer.setBlendMode(child.blendMode);\n }\n\n // Set parent values\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\n child.setAlpha(childAlpha * alpha);\n\n // Render\n child.renderCanvas(renderer, child, interpolationPercentage, camera, transformMatrix);\n\n // Restore original values\n child.setAlpha(childAlpha);\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\n }\n\n if (container.mask)\n {\n container.mask.postRenderCanvas(renderer);\n }\n};\n\nmodule.exports = SpineContainerCanvasRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar renderWebGL = require('../../../../src/utils/NOOP');\nvar renderCanvas = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineContainerWebGLRenderer');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineContainerCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar Clamp = require('../../../../src/math/Clamp');\nvar RadToDeg = require('../../../../src/math/RadToDeg');\nvar Wrap = require('../../../../src/math/Wrap');\n\n/**\n * Renders this Game Object with the WebGL Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method SpineContainerWebGLRenderer#renderWebGL\n * @since 3.50.0\n * @private\n *\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar SpineContainerWebGLRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix)\n{\n var plugin = container.plugin;\n var sceneRenderer = plugin.sceneRenderer;\n var children = container.list;\n\n if (children.length === 0)\n {\n if (sceneRenderer.batcher.isDrawing && renderer.finalType)\n {\n sceneRenderer.end();\n }\n\n return;\n }\n\n var transformMatrix = container.localTransform;\n\n if (parentMatrix)\n {\n transformMatrix.loadIdentity();\n transformMatrix.multiply(parentMatrix);\n transformMatrix.translate(container.x, container.y);\n transformMatrix.rotate(container.rotation);\n transformMatrix.scale(container.scaleX, container.scaleY);\n }\n else\n {\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\n }\n\n var alpha = container.alpha;\n var scrollFactorX = container.scrollFactorX;\n var scrollFactorY = container.scrollFactorY;\n\n var GameObjectRenderMask = 15;\n\n if (renderer.newType)\n {\n sceneRenderer.begin();\n }\n\n for (var i = 0; i < children.length; i++)\n {\n var src = children[i];\n\n var skeleton = src.skeleton;\n var childAlpha = skeleton.color.a;\n\n var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || childAlpha === 0);\n\n if (!skeleton || !willRender)\n {\n continue;\n }\n\n var camMatrix = renderer._tempMatrix1;\n var spriteMatrix = renderer._tempMatrix2;\n var calcMatrix = renderer._tempMatrix3;\n\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));\n\n camMatrix.copyFrom(camera.matrix);\n\n // Multiply the camera by the parent matrix\n camMatrix.multiplyWithOffset(transformMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY);\n\n // Undo the camera scroll\n spriteMatrix.e = src.x;\n spriteMatrix.f = src.y;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n\n var viewportHeight = renderer.height;\n\n skeleton.x = calcMatrix.tx;\n skeleton.y = viewportHeight - calcMatrix.ty;\n\n skeleton.scaleX = calcMatrix.scaleX;\n skeleton.scaleY = calcMatrix.scaleY;\n\n if (src.scaleX < 0)\n {\n skeleton.scaleX *= -1;\n\n src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);\n }\n else\n {\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\n }\n\n if (src.scaleY < 0)\n {\n skeleton.scaleY *= -1;\n\n if (src.scaleX < 0)\n {\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n else\n {\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n }\n\n if (camera.renderToTexture || renderer.currentFramebuffer !== null)\n {\n skeleton.y = calcMatrix.ty;\n skeleton.scaleY *= -1;\n }\n\n // Add autoUpdate option\n skeleton.updateWorldTransform();\n\n skeleton.color.a = Clamp(childAlpha * alpha, 0, 1);\n\n // Draw the current skeleton\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\n\n // Restore alpha\n skeleton.color.a = childAlpha;\n }\n\n if (!renderer.nextTypeMatch)\n {\n // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch.\n sceneRenderer.end();\n\n if (!renderer.finalType)\n {\n renderer.rebindPipeline(renderer.pipelines.MultiPipeline);\n }\n }\n};\n\nmodule.exports = SpineContainerWebGLRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Complete Event.\n *\n * @event SpinePluginEvents#COMPLETE\n * @since 3.19.0\n */\nmodule.exports = 'complete';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Dispose Event.\n *\n * @event SpinePluginEvents#DISPOSE\n * @since 3.19.0\n */\nmodule.exports = 'dispose';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The End Event.\n *\n * @event SpinePluginEvents#END\n * @since 3.19.0\n */\nmodule.exports = 'end';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Custom Event Event.\n *\n * @event SpinePluginEvents#EVENT\n * @since 3.19.0\n */\nmodule.exports = 'event';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Interrupted Event.\n *\n * @event SpinePluginEvents#INTERRUPTED\n * @since 3.19.0\n */\nmodule.exports = 'interrupted';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Start Event.\n *\n * @event SpinePluginEvents#START\n * @since 3.19.0\n */\nmodule.exports = 'start';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace SpinePluginEvents\n */\n\nmodule.exports = {\n\n COMPLETE: require('./COMPLETE_EVENT'),\n DISPOSE: require('./DISPOSE_EVENT'),\n END: require('./END_EVENT'),\n EVENT: require('./EVENT_EVENT'),\n INTERRUPTED: require('./INTERRUPTED_EVENT'),\n START: require('./START_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar AngleBetween = require('../../../../src/math/angle/Between');\nvar Clamp = require('../../../../src/math/Clamp');\nvar Class = require('../../../../src/utils/Class');\nvar ComponentsComputedSize = require('../../../../src/gameobjects/components/ComputedSize');\nvar ComponentsDepth = require('../../../../src/gameobjects/components/Depth');\nvar ComponentsFlip = require('../../../../src/gameobjects/components/Flip');\nvar ComponentsScrollFactor = require('../../../../src/gameobjects/components/ScrollFactor');\nvar ComponentsTransform = require('../../../../src/gameobjects/components/Transform');\nvar ComponentsVisible = require('../../../../src/gameobjects/components/Visible');\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar DegToRad = require('../../../../src/math/DegToRad');\nvar GameObject = require('../../../../src/gameobjects/GameObject');\nvar RadToDeg = require('../../../../src/math/RadToDeg');\nvar SpineEvents = require('../events/');\nvar SpineGameObjectRender = require('./SpineGameObjectRender');\n\n/**\n * @classdesc\n * A Spine Game Object is a Phaser level object that can be added to your Phaser Scenes. It encapsulates\n * a Spine Skeleton with Spine Animation Data and Animation State, with helper methods to allow you to\n * easily change the skin, slot attachment, bone positions and more.\n *\n * Spine Game Objects can be created via the Game Object Factory, Game Object Creator, or directly.\n * You can only create them if the Spine plugin has been loaded into Phaser.\n *\n * The quickest way is the Game Object Factory:\n *\n * ```javascript\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\n * ```\n *\n * Here we are creating a new Spine Game Object positioned at 512 x 550. It's using the `jelly`\n * Spine data, which has previously been loaded into your Scene. The `jelly-think` argument is\n * an optional animation to start playing on the skeleton. The final argument `true` sets the\n * animation to loop. Look at the documentation for further details on each of these options.\n *\n * For more control, you can use the Game Object Creator, passing in a Spine Game Object\n * Configuration object:\n *\n * ```javascript\n * let jelly = this.make.spine({\n * x: 512, y: 550, key: 'jelly',\n * scale: 1.5,\n * skinName: 'square_Green',\n * animationName: 'jelly-think', loop: true,\n * slotName: 'hat', attachmentName: 'images/La_14'\n * });\n * ```\n *\n * Here, you've got the ability to specify extra details, such as the slot name, attachments or\n * overall scale.\n *\n * If you wish to instantiate a Spine Game Object directly you can do so, but in order for it to\n * update and render, it must be added to the display and update lists of your Scene:\n *\n * ```javascript\n * let jelly = new SpineGameObject(this, this.spine, 512, 550, 'jelly', 'jelly-think', true);\n * this.sys.displayList.add(jelly);\n * this.sys.updateList.add(jelly);\n * ```\n *\n * It's possible to enable Spine Game Objects for input, but you should be aware that it will use\n * the bounds of the skeletons current pose to create the hit area from. Sometimes this is ok, but\n * often not. Make use of the `InputPlugin.enableDebug` method to view the input shape being created.\n * If it's not suitable, provide your own shape to the `setInteractive` method.\n *\n * Due to the way Spine handles scaling, it's not recommended to enable a Spine Game Object for\n * physics directly. Instead, you should look at creating a proxy body and syncing the Spine Game\n * Object position with it. See the examples for further details.\n *\n * If your Spine Game Object has black outlines around the different parts of the texture when it\n * renders then you have exported the files from Spine with pre-multiplied alpha enabled, but have\n * forgotten to set that flag when loading the Spine data. Please see the loader docs for more details.\n *\n * @class SpineGameObject\n * @constructor\n * @since 3.19.0\n *\n * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to.\n * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin.\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\n */\nvar SpineGameObject = new Class({\n\n Extends: GameObject,\n\n Mixins: [\n ComponentsComputedSize,\n ComponentsDepth,\n ComponentsFlip,\n ComponentsScrollFactor,\n ComponentsTransform,\n ComponentsVisible,\n SpineGameObjectRender\n ],\n\n initialize:\n\n function SpineGameObject (scene, plugin, x, y, key, animationName, loop)\n {\n GameObject.call(this, scene, 'Spine');\n\n /**\n * A reference to the Spine Plugin.\n *\n * @name SpineGameObject#plugin\n * @type {SpinePlugin}\n * @since 3.19.0\n */\n this.plugin = plugin;\n\n /**\n * The Spine Skeleton this Game Object is using.\n *\n * @name SpineGameObject#skeleton\n * @type {spine.Skeleton}\n * @since 3.19.0\n */\n this.skeleton = null;\n\n /**\n * The Spine Skeleton Data associated with the Skeleton this Game Object is using.\n *\n * @name SpineGameObject#skeletonData\n * @type {spine.SkeletonData}\n * @since 3.19.0\n */\n this.skeletonData = null;\n\n /**\n * The Spine Animation State this Game Object is using.\n *\n * @name SpineGameObject#state\n * @type {spine.AnimationState}\n * @since 3.19.0\n */\n this.state = null;\n\n /**\n * The Spine Animation State Data associated with the Animation State this Game Object is using.\n *\n * @name SpineGameObject#stateData\n * @type {spine.AnimationStateData}\n * @since 3.19.0\n */\n this.stateData = null;\n\n /**\n * A reference to the root bone of the Skeleton.\n *\n * @name SpineGameObject#root\n * @type {spine.Bone}\n * @since 3.19.0\n */\n this.root = null;\n\n /**\n * This object holds the calculated bounds of the current\n * pose, as set when a new Skeleton is applied.\n *\n * @name SpineGameObject#bounds\n * @type {any}\n * @since 3.19.0\n */\n this.bounds = null;\n\n /**\n * A Game Object level flag that allows you to enable debug drawing\n * to the Skeleton Debug Renderer by toggling it.\n *\n * @name SpineGameObject#drawDebug\n * @type {boolean}\n * @since 3.19.0\n */\n this.drawDebug = false;\n\n /**\n * The factor to scale the Animation update time by.\n *\n * @name SpineGameObject#timeScale\n * @type {number}\n * @since 3.19.0\n */\n this.timeScale = 1;\n\n /**\n * The calculated Display Origin of this Game Object.\n *\n * @name SpineGameObject#displayOriginX\n * @type {number}\n * @since 3.19.0\n */\n this.displayOriginX = 0;\n\n /**\n * The calculated Display Origin of this Game Object.\n *\n * @name SpineGameObject#displayOriginY\n * @type {number}\n * @since 3.19.0\n */\n this.displayOriginY = 0;\n\n /**\n * A flag that stores if the texture associated with the current\n * Skin being used by this Game Object, has its alpha pre-multiplied\n * into it, or not.\n *\n * @name SpineGameObject#preMultipliedAlpha\n * @type {boolean}\n * @since 3.19.0\n */\n this.preMultipliedAlpha = false;\n\n /**\n * A default Blend Mode. You cannot change the blend mode of a\n * Spine Game Object.\n *\n * @name SpineGameObject#blendMode\n * @type {number}\n * @readonly\n * @since 3.19.0\n */\n this.blendMode = -1;\n\n this.setPosition(x, y);\n\n if (key)\n {\n this.setSkeleton(key, animationName, loop);\n }\n },\n\n /**\n * Overrides the default Game Object method and always returns true.\n * Rendering is decided in the renderer functions.\n *\n * @method SpineGameObject#willRender\n * @since 3.19.0\n *\n * @return {boolean} Always returns `true`.\n */\n willRender: function ()\n {\n return true;\n },\n\n /**\n * Set the Alpha level for the whole Skeleton of this Game Object.\n *\n * The alpha controls the opacity of the Game Object as it renders.\n *\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\n *\n * @method SpineGameObject#setAlpha\n * @since 3.19.0\n *\n * @param {number} [value=1] - The alpha value used for the whole Skeleton.\n *\n * @return {this} This Game Object instance.\n */\n setAlpha: function (value, slotName)\n {\n if (value === undefined) { value = 1; }\n\n if (slotName)\n {\n var slot = this.findSlot(slotName);\n\n if (slot)\n {\n slot.color.a = Clamp(value, 0, 1);\n }\n }\n else\n {\n this.alpha = value;\n }\n\n return this;\n },\n\n /**\n * The alpha value of the Skeleton.\n *\n * A value between 0 and 1.\n *\n * This is a global value, impacting the entire Skeleton, not just a region of it.\n *\n * @name SpineGameObject#alpha\n * @type {number}\n * @since 3.19.0\n */\n alpha: {\n\n get: function ()\n {\n return this.skeleton.color.a;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n if (this.skeleton)\n {\n this.skeleton.color.a = v;\n }\n\n if (v === 0)\n {\n this.renderFlags &= ~2;\n }\n else\n {\n this.renderFlags |= 2;\n }\n }\n\n },\n\n /**\n * The amount of red used when rendering the Skeleton.\n *\n * A value between 0 and 1.\n *\n * This is a global value, impacting the entire Skeleton, not just a region of it.\n *\n * @name SpineGameObject#red\n * @type {number}\n * @since 3.19.0\n */\n red: {\n\n get: function ()\n {\n return this.skeleton.color.r;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n if (this.skeleton)\n {\n this.skeleton.color.r = v;\n }\n }\n\n },\n\n /**\n * The amount of green used when rendering the Skeleton.\n *\n * A value between 0 and 1.\n *\n * This is a global value, impacting the entire Skeleton, not just a region of it.\n *\n * @name SpineGameObject#green\n * @type {number}\n * @since 3.19.0\n */\n green: {\n\n get: function ()\n {\n return this.skeleton.color.g;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n if (this.skeleton)\n {\n this.skeleton.color.g = v;\n }\n }\n\n },\n\n /**\n * The amount of blue used when rendering the Skeleton.\n *\n * A value between 0 and 1.\n *\n * This is a global value, impacting the entire Skeleton, not just a region of it.\n *\n * @name SpineGameObject#blue\n * @type {number}\n * @since 3.19.0\n */\n blue: {\n\n get: function ()\n {\n return this.skeleton.color.b;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n if (this.skeleton)\n {\n this.skeleton.color.b = v;\n }\n }\n\n },\n\n /**\n * Sets the color on the given attachment slot. Or, if no slot is given, on the whole skeleton.\n *\n * @method SpineGameObject#setColor\n * @since 3.19.0\n *\n * @param {integer} [color=0xffffff] - The color being applied to the Skeleton or named Slot. Set to white to disable any previously set color.\n * @param {string} [slotName] - The name of the slot to set the color on. If not give, will be set on the whole skeleton.\n *\n * @return {this} This Game Object instance.\n */\n setColor: function (color, slotName)\n {\n if (color === undefined) { color = 0xffffff; }\n\n var red = (color >> 16 & 0xFF) / 255;\n var green = (color >> 8 & 0xFF) / 255;\n var blue = (color & 0xFF) / 255;\n var alpha = (color > 16777215) ? (color >>> 24) / 255 : null;\n\n var target = this.skeleton;\n\n if (slotName)\n {\n var slot = this.findSlot(slotName);\n\n if (slot)\n {\n target = slot;\n }\n }\n\n target.color.r = red;\n target.color.g = green;\n target.color.b = blue;\n\n if (alpha !== null)\n {\n target.color.a = alpha;\n }\n\n return this;\n },\n\n /**\n * Sets this Game Object to use the given Skeleton based on the Atlas Data Key and a provided JSON object\n * that contains the Skeleton data.\n *\n * @method SpineGameObject#setSkeletonFromJSON\n * @since 3.19.0\n *\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\n * @param {object} skeletonJSON - The JSON data for the Skeleton.\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\n *\n * @return {this} This Game Object.\n */\n setSkeletonFromJSON: function (atlasDataKey, skeletonJSON, animationName, loop)\n {\n return this.setSkeleton(atlasDataKey, skeletonJSON, animationName, loop);\n },\n\n /**\n * Sets this Game Object to use the given Skeleton based on its cache key.\n *\n * Typically, once set, the Skeleton doesn't change. Instead, you change the skin,\n * or slot attachment, or any other property to adjust it.\n *\n * @method SpineGameObject#setSkeleton\n * @since 3.19.0\n *\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\n * @param {object} skeletonJSON - The JSON data for the Skeleton.\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\n *\n * @return {this} This Game Object.\n */\n setSkeleton: function (atlasDataKey, animationName, loop, skeletonJSON)\n {\n if (this.state)\n {\n this.state.clearListeners();\n this.state.clearListenerNotifications();\n }\n\n var data = this.plugin.createSkeleton(atlasDataKey, skeletonJSON);\n\n this.skeletonData = data.skeletonData;\n\n this.preMultipliedAlpha = data.preMultipliedAlpha;\n\n var skeleton = data.skeleton;\n\n skeleton.setSkin();\n skeleton.setToSetupPose();\n\n this.skeleton = skeleton;\n\n // AnimationState\n data = this.plugin.createAnimationState(skeleton);\n\n if (this.state)\n {\n this.state.clearListeners();\n this.state.clearListenerNotifications();\n }\n\n this.state = data.state;\n this.stateData = data.stateData;\n\n this.state.addListener({\n event: this.onEvent.bind(this),\n complete: this.onComplete.bind(this),\n start: this.onStart.bind(this),\n end: this.onEnd.bind(this),\n dispose: this.onDispose.bind(this),\n interrupted: this.onInterrupted.bind(this)\n });\n\n if (animationName)\n {\n this.setAnimation(0, animationName, loop);\n }\n\n this.root = this.getRootBone();\n\n if (this.root)\n {\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\n }\n\n this.state.apply(skeleton);\n\n skeleton.updateCache();\n\n return this.updateSize();\n },\n\n /**\n * Internal event handler that emits the Spine onComplete event via this Game Object.\n *\n * @method SpineGameObject#onComplete\n * @fires SpinePluginEvents#COMPLETE\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n */\n onComplete: function (entry)\n {\n this.emit(SpineEvents.COMPLETE, entry);\n },\n\n /**\n * Internal event handler that emits the Spine onDispose event via this Game Object.\n *\n * @method SpineGameObject#onDispose\n * @fires SpinePluginEvents#DISPOSE\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n */\n onDispose: function (entry)\n {\n this.emit(SpineEvents.DISPOSE, entry);\n },\n\n /**\n * Internal event handler that emits the Spine onEnd event via this Game Object.\n *\n * @method SpineGameObject#onEnd\n * @fires SpinePluginEvents#END\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n */\n onEnd: function (entry)\n {\n this.emit(SpineEvents.END, entry);\n },\n\n /**\n * Internal event handler that emits the Spine Event event via this Game Object.\n *\n * @method SpineGameObject#onEvent\n * @fires SpinePluginEvents#EVENT\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n * @param {spine.Event} event - The Spine event.\n */\n onEvent: function (entry, event)\n {\n this.emit(SpineEvents.EVENT, entry, event);\n },\n\n /**\n * Internal event handler that emits the Spine onInterrupted event via this Game Object.\n *\n * @method SpineGameObject#onInterrupted\n * @fires SpinePluginEvents#INTERRUPTED\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n */\n onInterrupted: function (entry)\n {\n this.emit(SpineEvents.INTERRUPTED, entry);\n },\n\n /**\n * Internal event handler that emits the Spine onStart event via this Game Object.\n *\n * @method SpineGameObject#onStart\n * @fires SpinePluginEvents#START\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n */\n onStart: function (entry)\n {\n this.emit(SpineEvents.START, entry);\n },\n\n /**\n * Refreshes the data about the current Skeleton.\n *\n * This will reset the rotation, position and size of the Skeleton to match this Game Object.\n *\n * Call this method if you need to access the Skeleton data directly, and it may have changed\n * recently.\n *\n * @method SpineGameObject#refresh\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n refresh: function ()\n {\n if (this.root)\n {\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\n }\n\n this.updateSize();\n\n this.skeleton.updateCache();\n\n return this;\n },\n\n /**\n * Sets the size of this Game Object.\n *\n * If no arguments are given it uses the current skeleton data dimensions.\n *\n * You can use this method to set a fixed size of this Game Object, such as for input detection,\n * when the skeleton data doesn't match what is required in-game.\n *\n * @method SpineGameObject#setSize\n * @since 3.19.0\n *\n * @param {number} [width] - The width of the Skeleton. If not given it defaults to the Skeleton Data width.\n * @param {number} [height] - The height of the Skeleton. If not given it defaults to the Skeleton Data height.\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\n *\n * @return {this} This Game Object.\n */\n setSize: function (width, height, offsetX, offsetY)\n {\n var skeleton = this.skeleton;\n\n if (width === undefined) { width = skeleton.data.width; }\n if (height === undefined) { height = skeleton.data.height; }\n if (offsetX === undefined) { offsetX = 0; }\n if (offsetY === undefined) { offsetY = 0; }\n\n this.width = width;\n this.height = height;\n\n this.displayOriginX = skeleton.x - offsetX;\n this.displayOriginY = skeleton.y - offsetY;\n\n return this;\n },\n\n /**\n * Sets the offset of this Game Object from the Skeleton position.\n *\n * You can use this method to adjust how the position of this Game Object relates to the Skeleton it is using.\n *\n * @method SpineGameObject#setOffset\n * @since 3.19.0\n *\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\n *\n * @return {this} This Game Object.\n */\n setOffset: function (offsetX, offsetY)\n {\n var skeleton = this.skeleton;\n\n if (offsetX === undefined) { offsetX = 0; }\n if (offsetY === undefined) { offsetY = 0; }\n\n this.displayOriginX = skeleton.x - offsetX;\n this.displayOriginY = skeleton.y - offsetY;\n\n return this;\n },\n\n /**\n * Internal method that syncs all of the Game Object position and scale data to the Skeleton.\n * It then syncs the skeleton bounds back to this Game Object.\n *\n * This method is called automatically as needed internally, however, it's also exposed should\n * you require overriding the size settings.\n *\n * @method SpineGameObject#updateSize\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n updateSize: function ()\n {\n var skeleton = this.skeleton;\n var renderer = this.plugin.renderer;\n\n var height = renderer.height;\n\n var oldScaleX = this.scaleX;\n var oldScaleY = this.scaleY;\n\n skeleton.x = this.x;\n skeleton.y = height - this.y;\n skeleton.scaleX = 1;\n skeleton.scaleY = 1;\n\n skeleton.updateWorldTransform();\n\n var bounds = this.getBounds();\n\n this.width = bounds.size.x;\n this.height = bounds.size.y;\n\n this.displayOriginX = this.x - bounds.offset.x;\n this.displayOriginY = this.y - (height - (this.height + bounds.offset.y));\n\n skeleton.scaleX = oldScaleX;\n skeleton.scaleY = oldScaleY;\n\n skeleton.updateWorldTransform();\n\n return this;\n },\n\n /**\n * The horizontal scale of this Game Object, as applied to the Skeleton it is using.\n *\n * @name SpineGameObject#scaleX\n * @type {number}\n * @default 1\n * @since 3.19.0\n */\n scaleX: {\n\n get: function ()\n {\n return this._scaleX;\n },\n\n set: function (value)\n {\n this._scaleX = value;\n\n this.refresh();\n }\n\n },\n\n /**\n * The vertical scale of this Game Object, as applied to the Skeleton it is using.\n *\n * @name SpineGameObject#scaleY\n * @type {number}\n * @default 1\n * @since 3.19.0\n */\n scaleY: {\n\n get: function ()\n {\n return this._scaleY;\n },\n\n set: function (value)\n {\n this._scaleY = value;\n\n this.refresh();\n }\n\n },\n\n /**\n * Returns an array containing the names of all the bones in the Skeleton Data.\n *\n * @method SpineGameObject#getBoneList\n * @since 3.19.0\n *\n * @return {string[]} An array containing the names of all the bones in the Skeleton Data.\n */\n getBoneList: function ()\n {\n var output = [];\n\n var skeletonData = this.skeletonData;\n\n if (skeletonData)\n {\n for (var i = 0; i < skeletonData.bones.length; i++)\n {\n output.push(skeletonData.bones[i].name);\n }\n }\n\n return output;\n },\n\n /**\n * Returns an array containing the names of all the skins in the Skeleton Data.\n *\n * @method SpineGameObject#getSkinList\n * @since 3.19.0\n *\n * @return {string[]} An array containing the names of all the skins in the Skeleton Data.\n */\n getSkinList: function ()\n {\n var output = [];\n\n var skeletonData = this.skeletonData;\n\n if (skeletonData)\n {\n for (var i = 0; i < skeletonData.skins.length; i++)\n {\n output.push(skeletonData.skins[i].name);\n }\n }\n\n return output;\n },\n\n /**\n * Returns an array containing the names of all the slots in the Skeleton.\n *\n * @method SpineGameObject#getSlotList\n * @since 3.19.0\n *\n * @return {string[]} An array containing the names of all the slots in the Skeleton.\n */\n getSlotList: function ()\n {\n var output = [];\n\n var skeleton = this.skeleton;\n\n for (var i = 0; i < skeleton.slots.length; i++)\n {\n output.push(skeleton.slots[i].data.name);\n }\n\n return output;\n },\n\n /**\n * Returns an array containing the names of all the animations in the Skeleton Data.\n *\n * @method SpineGameObject#getAnimationList\n * @since 3.19.0\n *\n * @return {string[]} An array containing the names of all the animations in the Skeleton Data.\n */\n getAnimationList: function ()\n {\n var output = [];\n\n var skeletonData = this.skeletonData;\n\n if (skeletonData)\n {\n for (var i = 0; i < skeletonData.animations.length; i++)\n {\n output.push(skeletonData.animations[i].name);\n }\n }\n\n return output;\n },\n\n /**\n * Returns the current animation being played on the given track, if any.\n *\n * @method SpineGameObject#getCurrentAnimation\n * @since 3.19.0\n *\n * @param {integer} [trackIndex=0] - The track to return the current animation on.\n *\n * @return {?spine.Animation} The current Animation on the given track, or `undefined` if there is no current animation.\n */\n getCurrentAnimation: function (trackIndex)\n {\n if (trackIndex === undefined) { trackIndex = 0; }\n\n var current = this.state.getCurrent(trackIndex);\n\n if (current)\n {\n return current.animation;\n }\n },\n\n /**\n * Sets the current animation for a track, discarding any queued animations.\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\n *\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\n *\n * @method SpineGameObject#play\n * @fires SpinePluginEvents#START\n * @since 3.19.0\n *\n * @param {string} animationName - The string-based key of the animation to play.\n * @param {boolean} [loop=false] - Should the animation be looped when played?\n * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call.\n *\n * @return {this} This Game Object. If you need the TrackEntry, see `setAnimation` instead.\n */\n play: function (animationName, loop, ignoreIfPlaying)\n {\n this.setAnimation(0, animationName, loop, ignoreIfPlaying);\n\n return this;\n },\n\n /**\n * Sets the current animation for a track, discarding any queued animations.\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\n *\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\n *\n * @method SpineGameObject#setAnimation\n * @fires SpinePluginEvents#START\n * @since 3.19.0\n *\n * @param {integer} trackIndex - The track index to play the animation on.\n * @param {string} animationName - The string-based key of the animation to play.\n * @param {boolean} [loop=false] - Should the animation be looped when played?\n * @param {boolean} [ignoreIfPlaying=false] - If the animation specified by the track index is already playing then ignore this call.\n *\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\n */\n setAnimation: function (trackIndex, animationName, loop, ignoreIfPlaying)\n {\n if (loop === undefined) { loop = false; }\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\n\n if (ignoreIfPlaying && this.state)\n {\n var currentTrack = this.state.getCurrent(trackIndex);\n\n if (currentTrack && currentTrack.animation.name === animationName && !currentTrack.isComplete())\n {\n return;\n }\n }\n\n if (this.findAnimation(animationName))\n {\n return this.state.setAnimation(trackIndex, animationName, loop);\n }\n },\n\n /**\n * Adds an animation to be played after the current or last queued animation for a track.\n * If the track is empty, it is equivalent to calling setAnimation.\n *\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\n *\n * The delay is a float. If > 0, sets delay. If <= 0, the delay set is the duration of the previous\n * track entry minus any mix duration (from the AnimationStateData) plus the specified delay\n * (ie the mix ends at (delay = 0) or before (delay < 0) the previous track entry duration).\n * If the previous entry is looping, its next loop completion is used instead of its duration.\n *\n * @method SpineGameObject#addAnimation\n * @since 3.19.0\n *\n * @param {integer} trackIndex - The track index to add the animation to.\n * @param {string} animationName - The string-based key of the animation to add.\n * @param {boolean} [loop=false] - Should the animation be looped when played?\n * @param {integer} [delay=0] - A delay, in ms, before which this animation will start when played.\n *\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\n */\n addAnimation: function (trackIndex, animationName, loop, delay)\n {\n return this.state.addAnimation(trackIndex, animationName, loop, delay);\n },\n\n /**\n * Sets an empty animation for a track, discarding any queued animations, and sets the track\n * entry's mixDuration. An empty animation has no timelines and serves as a placeholder for mixing in or out.\n *\n * Mixing out is done by setting an empty animation with a mix duration using either setEmptyAnimation,\n * setEmptyAnimations, or addEmptyAnimation. Mixing to an empty animation causes the previous animation to be\n * applied less and less over the mix duration. Properties keyed in the previous animation transition to\n * the value from lower tracks or to the setup pose value if no lower tracks key the property.\n * A mix duration of 0 still mixes out over one frame.\n *\n * Mixing in is done by first setting an empty animation, then adding an animation using addAnimation\n * and on the returned track entry, set the mixDuration. Mixing from an empty animation causes the new\n * animation to be applied more and more over the mix duration. Properties keyed in the new animation\n * transition from the value from lower tracks or from the setup pose value if no lower tracks key the\n * property to the value keyed in the new animation.\n *\n * @method SpineGameObject#setEmptyAnimation\n * @since 3.19.0\n *\n * @param {integer} trackIndex - The track index to add the animation to.\n * @param {integer} [mixDuration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\n *\n * @return {spine.TrackEntry} The returned Track Entry.\n */\n setEmptyAnimation: function (trackIndex, mixDuration)\n {\n return this.state.setEmptyAnimation(trackIndex, mixDuration);\n },\n\n /**\n * Removes all animations from the track, leaving skeletons in their current pose.\n *\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\n * rather than leaving them in their current pose.\n *\n * @method SpineGameObject#clearTrack\n * @since 3.19.0\n *\n * @param {integer} trackIndex - The track index to add the animation to.\n *\n * @return {this} This Game Object.\n */\n clearTrack: function (trackIndex)\n {\n this.state.clearTrack(trackIndex);\n\n return this;\n },\n\n /**\n * Removes all animations from all tracks, leaving skeletons in their current pose.\n *\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\n * rather than leaving them in their current pose.\n *\n * @method SpineGameObject#clearTracks\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n clearTracks: function ()\n {\n this.state.clearTracks();\n\n return this;\n },\n\n /**\n * Sets the skin used to look up attachments before looking in the defaultSkin.\n *\n * Attachments from the new skin are attached if the corresponding attachment from the\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\n * attached from the new skin.\n *\n * After changing the skin, the visible attachments can be reset to those attached in the\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\n * or show attachments from the new skin.\n *\n * @method SpineGameObject#setSkinByName\n * @since 3.19.0\n *\n * @param {string} skinName - The name of the skin to set.\n *\n * @return {this} This Game Object.\n */\n setSkinByName: function (skinName)\n {\n var skeleton = this.skeleton;\n\n skeleton.setSkinByName(skinName);\n\n skeleton.setSlotsToSetupPose();\n\n this.state.apply(skeleton);\n\n return this;\n },\n\n /**\n * Sets the skin used to look up attachments before looking in the defaultSkin.\n *\n * Attachments from the new skin are attached if the corresponding attachment from the\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\n * attached from the new skin.\n *\n * After changing the skin, the visible attachments can be reset to those attached in the\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\n * or show attachments from the new skin.\n *\n * @method SpineGameObject#setSkin\n * @since 3.19.0\n *\n * @param {?spine.Skin} newSkin - The Skin to set. May be `null`.\n *\n * @return {this} This Game Object.\n */\n setSkin: function (newSkin)\n {\n var skeleton = this.skeleton;\n\n skeleton.setSkin(newSkin);\n\n skeleton.setSlotsToSetupPose();\n\n this.state.apply(skeleton);\n\n return this;\n },\n\n /**\n * Sets the mix duration when changing from the specified animation to the other.\n *\n * @method SpineGameObject#setMix\n * @since 3.19.0\n *\n * @param {string} fromName - The animation to mix from.\n * @param {string} toName - The animation to mix to.\n * @param {number} [duration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\n *\n * @return {this} This Game Object.\n */\n setMix: function (fromName, toName, duration)\n {\n this.stateData.setMix(fromName, toName, duration);\n\n return this;\n },\n\n /**\n * Finds an attachment by looking in the skin and defaultSkin using the slot\n * index and attachment name. First the skin is checked and if the attachment was not found,\n * the default skin is checked.\n *\n * @method SpineGameObject#getAttachment\n * @since 3.19.0\n *\n * @param {integer} slotIndex - The slot index to search.\n * @param {string} attachmentName - The attachment name to look for.\n *\n * @return {?spine.Attachment} The Attachment, if found. May be null.\n */\n getAttachment: function (slotIndex, attachmentName)\n {\n return this.skeleton.getAttachment(slotIndex, attachmentName);\n },\n\n /**\n * Finds an attachment by looking in the skin and defaultSkin using the slot name and attachment name.\n *\n * @method SpineGameObject#getAttachmentByName\n * @since 3.19.0\n *\n * @param {string} slotName - The slot name to search.\n * @param {string} attachmentName - The attachment name to look for.\n *\n * @return {?spine.Attachment} The Attachment, if found. May be null.\n */\n getAttachmentByName: function (slotName, attachmentName)\n {\n return this.skeleton.getAttachmentByName(slotName, attachmentName);\n },\n\n /**\n * A convenience method to set an attachment by finding the slot with findSlot,\n * finding the attachment with getAttachment, then setting the slot's attachment.\n *\n * @method SpineGameObject#setAttachment\n * @since 3.19.0\n *\n * @param {string} slotName - The slot name to add the attachment to.\n * @param {string} attachmentName - The attachment name to add.\n *\n * @return {this} This Game Object.\n */\n setAttachment: function (slotName, attachmentName)\n {\n if (Array.isArray(slotName) && Array.isArray(attachmentName) && slotName.length === attachmentName.length)\n {\n for (var i = 0; i < slotName.length; i++)\n {\n this.skeleton.setAttachment(slotName[i], attachmentName[i]);\n }\n }\n else\n {\n this.skeleton.setAttachment(slotName, attachmentName);\n }\n\n return this;\n },\n\n /**\n * Sets the bones, constraints, slots, and draw order to their setup pose values.\n *\n * @method SpineGameObject#setToSetupPose\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n setToSetupPose: function ()\n {\n this.skeleton.setToSetupPose();\n\n return this;\n },\n\n /**\n * Sets the slots and draw order to their setup pose values.\n *\n * @method SpineGameObject#setSlotsToSetupPose\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n setSlotsToSetupPose: function ()\n {\n this.skeleton.setSlotsToSetupPose();\n\n return this;\n },\n\n /**\n * Sets the bones and constraints to their setup pose values.\n *\n * @method SpineGameObject#setBonesToSetupPose\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n setBonesToSetupPose: function ()\n {\n this.skeleton.setBonesToSetupPose();\n\n return this;\n },\n\n /**\n * Gets the root bone, or null.\n *\n * @method SpineGameObject#getRootBone\n * @since 3.19.0\n *\n * @return {spine.Bone} The root bone, or null.\n */\n getRootBone: function ()\n {\n return this.skeleton.getRootBone();\n },\n\n /**\n * Takes a Bone object and a position in world space and rotates the Bone so it is angled\n * towards the given position. You can set an optional angle offset, should the bone be\n * designed at a specific angle already. You can also set a minimum and maximum range for the angle.\n *\n * @method SpineGameObject#angleBoneToXY\n * @since 3.19.0\n *\n * @param {spine.Bone} bone - The bone to rotate towards the world position.\n * @param {number} worldX - The world x coordinate to rotate the bone towards.\n * @param {number} worldY - The world y coordinate to rotate the bone towards.\n * @param {number} [offset=0] - An offset to add to the rotation angle.\n * @param {number} [minAngle=0] - The minimum range of the rotation angle.\n * @param {number} [maxAngle=360] - The maximum range of the rotation angle.\n *\n * @return {this} This Game Object.\n */\n angleBoneToXY: function (bone, worldX, worldY, offset, minAngle, maxAngle)\n {\n if (offset === undefined) { offset = 0; }\n if (minAngle === undefined) { minAngle = 0; }\n if (maxAngle === undefined) { maxAngle = 360; }\n\n var renderer = this.plugin.renderer;\n var height = renderer.height;\n\n var angle = CounterClockwise(AngleBetween(bone.worldX, height - bone.worldY, worldX, worldY) + DegToRad(offset));\n\n bone.rotation = Clamp(RadToDeg(angle), minAngle, maxAngle);\n\n return this;\n },\n\n /**\n * Finds a bone by comparing each bone's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findBone\n * @since 3.19.0\n *\n * @param {string} boneName - The name of the bone to find.\n *\n * @return {spine.Bone} The bone, or null.\n */\n findBone: function (boneName)\n {\n return this.skeleton.findBone(boneName);\n },\n\n /**\n * Finds the index of a bone by comparing each bone's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findBoneIndex\n * @since 3.19.0\n *\n * @param {string} boneName - The name of the bone to find.\n *\n * @return {integer} The bone index. Or -1 if the bone was not found.\n */\n findBoneIndex: function (boneName)\n {\n return this.skeleton.findBoneIndex(boneName);\n },\n\n /**\n * Finds a slot by comparing each slot's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findSlot\n * @since 3.19.0\n *\n * @param {string} slotName - The name of the slot to find.\n *\n * @return {spine.Slot} The Slot. May be null.\n */\n findSlot: function (slotName)\n {\n return this.skeleton.findSlot(slotName);\n },\n\n /**\n * Finds the index of a slot by comparing each slot's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findSlotIndex\n * @since 3.19.0\n *\n * @param {string} slotName - The name of the slot to find.\n *\n * @return {integer} The slot index. Or -1 if the Slot was not found.\n */\n findSlotIndex: function (slotName)\n {\n return this.skeleton.findSlotIndex(slotName);\n },\n\n /**\n * Finds a skin by comparing each skin's name. It is more efficient to cache the results of\n * this method than to call it multiple times.\n *\n * @method SpineGameObject#findSkin\n * @since 3.19.0\n *\n * @param {string} skinName - The name of the skin to find.\n *\n * @return {spine.Skin} The Skin. May be null.\n */\n findSkin: function (skinName)\n {\n return this.skeletonData.findSkin(skinName);\n },\n\n /**\n * Finds an event by comparing each events's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findEvent\n * @since 3.19.0\n *\n * @param {string} eventDataName - The name of the event to find.\n *\n * @return {spine.EventData} The Event Data. May be null.\n */\n findEvent: function (eventDataName)\n {\n return this.skeletonData.findEvent(eventDataName);\n },\n\n /**\n * Finds an animation by comparing each animation's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findAnimation\n * @since 3.19.0\n *\n * @param {string} animationName - The name of the animation to find.\n *\n * @return {spine.Animation} The Animation. May be null.\n */\n findAnimation: function (animationName)\n {\n return this.skeletonData.findAnimation(animationName);\n },\n\n /**\n * Finds an IK constraint by comparing each IK constraint's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findIkConstraint\n * @since 3.19.0\n *\n * @param {string} constraintName - The name of the constraint to find.\n *\n * @return {spine.IkConstraintData} The IK constraint. May be null.\n */\n findIkConstraint: function (constraintName)\n {\n return this.skeletonData.findIkConstraint(constraintName);\n },\n\n /**\n * Finds an transform constraint by comparing each transform constraint's name.\n * It is more efficient to cache the results of this method than to call it multiple times.\n *\n * @method SpineGameObject#findTransformConstraint\n * @since 3.19.0\n *\n * @param {string} constraintName - The name of the constraint to find.\n *\n * @return {spine.TransformConstraintData} The transform constraint. May be null.\n */\n findTransformConstraint: function (constraintName)\n {\n return this.skeletonData.findTransformConstraint(constraintName);\n },\n\n /**\n * Finds a path constraint by comparing each path constraint's name.\n * It is more efficient to cache the results of this method than to call it multiple times.\n *\n * @method SpineGameObject#findPathConstraint\n * @since 3.19.0\n *\n * @param {string} constraintName - The name of the constraint to find.\n *\n * @return {spine.PathConstraintData} The path constraint. May be null.\n */\n findPathConstraint: function (constraintName)\n {\n return this.skeletonData.findPathConstraint(constraintName);\n },\n\n /**\n * Finds the index of a path constraint by comparing each path constraint's name.\n * It is more efficient to cache the results of this method than to call it multiple times.\n *\n * @method SpineGameObject#findPathConstraintIndex\n * @since 3.19.0\n *\n * @param {string} constraintName - The name of the constraint to find.\n *\n * @return {integer} The constraint index. Or -1 if the constraint was not found.\n */\n findPathConstraintIndex: function (constraintName)\n {\n return this.skeletonData.findPathConstraintIndex(constraintName);\n },\n\n /**\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\n *\n * The returned object contains two properties: `offset` and `size`:\n *\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\n * `size` - The width and height of the AABB.\n *\n * @method SpineGameObject#getBounds\n * @since 3.19.0\n *\n * @return {any} The bounds object.\n */\n getBounds: function ()\n {\n return this.plugin.getBounds(this.skeleton);\n },\n\n /**\n * Internal update handler.\n *\n * @method SpineGameObject#preUpdate\n * @protected\n * @since 3.19.0\n *\n * @param {number} time - The current timestamp.\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\n */\n preUpdate: function (time, delta)\n {\n var skeleton = this.skeleton;\n\n this.state.update((delta / 1000) * this.timeScale);\n\n this.state.apply(skeleton);\n },\n\n /**\n * Internal destroy handler, called as part of the destroy process.\n *\n * @method SpineGameObject#preDestroy\n * @protected\n * @since 3.19.0\n */\n preDestroy: function ()\n {\n if (this.state)\n {\n this.state.clearListeners();\n this.state.clearListenerNotifications();\n }\n\n this.plugin = null;\n\n this.skeleton = null;\n this.skeletonData = null;\n\n this.state = null;\n this.stateData = null;\n }\n\n});\n\nmodule.exports = SpineGameObject;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar RadToDeg = require('../../../../src/math/RadToDeg');\nvar Wrap = require('../../../../src/math/Wrap');\n\n/**\n * Renders this Game Object with the Canvas Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method SpineGameObject#renderCanvas\n * @since 3.19.0\n * @private\n *\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar SpineGameObjectCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\n{\n var context = renderer.currentContext;\n\n var plugin = src.plugin;\n var skeleton = src.skeleton;\n var skeletonRenderer = plugin.skeletonRenderer;\n\n var GameObjectRenderMask = 15;\n\n var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)));\n\n if (!skeleton || !willRender)\n {\n return;\n }\n\n var camMatrix = renderer._tempMatrix1;\n var spriteMatrix = renderer._tempMatrix2;\n var calcMatrix = renderer._tempMatrix3;\n\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));\n\n camMatrix.copyFrom(camera.matrix);\n\n if (parentMatrix)\n {\n // Multiply the camera by the parent matrix\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\n\n // Undo the camera scroll\n spriteMatrix.e = src.x;\n spriteMatrix.f = src.y;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n }\n else\n {\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n }\n\n skeleton.x = calcMatrix.tx;\n skeleton.y = calcMatrix.ty;\n\n skeleton.scaleX = calcMatrix.scaleX;\n\n // Inverse or we get upside-down skeletons\n skeleton.scaleY = calcMatrix.scaleY * -1;\n\n if (src.scaleX < 0)\n {\n skeleton.scaleX *= -1;\n\n src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);\n }\n else\n {\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\n }\n\n if (src.scaleY < 0)\n {\n skeleton.scaleY *= -1;\n\n if (src.scaleX < 0)\n {\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n else\n {\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n }\n\n if (camera.renderToTexture)\n {\n skeleton.y = calcMatrix.ty;\n skeleton.scaleY *= -1;\n }\n\n // Add autoUpdate option\n skeleton.updateWorldTransform();\n\n skeletonRenderer.ctx = context;\n skeletonRenderer.debugRendering = (plugin.drawDebug || src.drawDebug);\n\n context.save();\n\n skeletonRenderer.draw(skeleton);\n\n context.restore();\n};\n\nmodule.exports = SpineGameObjectCanvasRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar renderWebGL = require('../../../../src/utils/NOOP');\nvar renderCanvas = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineGameObjectWebGLRenderer');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineGameObjectCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar RadToDeg = require('../../../../src/math/RadToDeg');\nvar Wrap = require('../../../../src/math/Wrap');\n\n/**\n * Renders this Game Object with the WebGL Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method SpineGameObject#renderWebGL\n * @since 3.19.0\n * @private\n *\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\n{\n var plugin = src.plugin;\n var skeleton = src.skeleton;\n var childAlpha = skeleton.color.a;\n var sceneRenderer = plugin.sceneRenderer;\n\n if (renderer.newType)\n {\n // flush + clear if this is a new type, even if it doesn't render\n renderer.clearPipeline();\n }\n\n var GameObjectRenderMask = 15;\n\n var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || childAlpha === 0);\n\n if (!skeleton || !willRender)\n {\n // If there is already a batch running, we need to close it\n if (!renderer.nextTypeMatch)\n {\n // The next object in the display list is not a Spine object, so we end the batch\n sceneRenderer.end();\n\n if (!renderer.finalType)\n {\n // Reset the current type\n renderer.currentType = '';\n\n renderer.rebindPipeline();\n }\n }\n\n return;\n }\n\n var camMatrix = renderer._tempMatrix1;\n var spriteMatrix = renderer._tempMatrix2;\n var calcMatrix = renderer._tempMatrix3;\n\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));\n\n camMatrix.copyFrom(camera.matrix);\n\n if (parentMatrix)\n {\n // Multiply the camera by the parent matrix\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\n\n // Undo the camera scroll\n spriteMatrix.e = src.x;\n spriteMatrix.f = src.y;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n }\n else\n {\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n }\n\n var viewportHeight = renderer.height;\n\n skeleton.x = calcMatrix.tx;\n skeleton.y = viewportHeight - calcMatrix.ty;\n\n skeleton.scaleX = calcMatrix.scaleX;\n skeleton.scaleY = calcMatrix.scaleY;\n\n if (src.scaleX < 0)\n {\n skeleton.scaleX *= -1;\n\n src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);\n }\n else\n {\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\n }\n\n if (src.scaleY < 0)\n {\n skeleton.scaleY *= -1;\n\n if (src.scaleX < 0)\n {\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n else\n {\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n }\n\n if (camera.renderToTexture || renderer.currentFramebuffer !== null)\n {\n skeleton.y = calcMatrix.ty;\n skeleton.scaleY *= -1;\n }\n\n // Add autoUpdate option\n skeleton.updateWorldTransform();\n\n if (renderer.newType)\n {\n sceneRenderer.begin();\n }\n\n // Draw the current skeleton\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\n\n if (plugin.drawDebug || src.drawDebug)\n {\n // Because if we don't, the bones render positions are completely wrong (*sigh*)\n var oldX = skeleton.x;\n var oldY = skeleton.y;\n\n skeleton.x = 0;\n skeleton.y = 0;\n\n sceneRenderer.drawSkeletonDebug(skeleton, src.preMultipliedAlpha);\n\n skeleton.x = oldX;\n skeleton.y = oldY;\n }\n\n if (!renderer.nextTypeMatch)\n {\n // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch\n sceneRenderer.end();\n\n // And rebind the previous pipeline\n renderer.rebindPipeline();\n }\n};\n\nmodule.exports = SpineGameObjectWebGLRenderer;\n","/*** IMPORTS FROM imports-loader ***/\n\n(function() {\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar spine;\n(function (spine) {\n var Animation = (function () {\n function Animation(name, timelines, duration) {\n if (name == null)\n throw new Error(\"name cannot be null.\");\n if (timelines == null)\n throw new Error(\"timelines cannot be null.\");\n this.name = name;\n this.timelines = timelines;\n this.timelineIds = [];\n for (var i = 0; i < timelines.length; i++)\n this.timelineIds[timelines[i].getPropertyId()] = true;\n this.duration = duration;\n }\n Animation.prototype.hasTimeline = function (id) {\n return this.timelineIds[id] == true;\n };\n Animation.prototype.apply = function (skeleton, lastTime, time, loop, events, alpha, blend, direction) {\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n if (loop && this.duration != 0) {\n time %= this.duration;\n if (lastTime > 0)\n lastTime %= this.duration;\n }\n var timelines = this.timelines;\n for (var i = 0, n = timelines.length; i < n; i++)\n timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\n };\n Animation.binarySearch = function (values, target, step) {\n if (step === void 0) { step = 1; }\n var low = 0;\n var high = values.length / step - 2;\n if (high == 0)\n return step;\n var current = high >>> 1;\n while (true) {\n if (values[(current + 1) * step] <= target)\n low = current + 1;\n else\n high = current;\n if (low == high)\n return (low + 1) * step;\n current = (low + high) >>> 1;\n }\n };\n Animation.linearSearch = function (values, target, step) {\n for (var i = 0, last = values.length - step; i <= last; i += step)\n if (values[i] > target)\n return i;\n return -1;\n };\n return Animation;\n }());\n spine.Animation = Animation;\n var MixBlend;\n (function (MixBlend) {\n MixBlend[MixBlend[\"setup\"] = 0] = \"setup\";\n MixBlend[MixBlend[\"first\"] = 1] = \"first\";\n MixBlend[MixBlend[\"replace\"] = 2] = \"replace\";\n MixBlend[MixBlend[\"add\"] = 3] = \"add\";\n })(MixBlend = spine.MixBlend || (spine.MixBlend = {}));\n var MixDirection;\n (function (MixDirection) {\n MixDirection[MixDirection[\"mixIn\"] = 0] = \"mixIn\";\n MixDirection[MixDirection[\"mixOut\"] = 1] = \"mixOut\";\n })(MixDirection = spine.MixDirection || (spine.MixDirection = {}));\n var TimelineType;\n (function (TimelineType) {\n TimelineType[TimelineType[\"rotate\"] = 0] = \"rotate\";\n TimelineType[TimelineType[\"translate\"] = 1] = \"translate\";\n TimelineType[TimelineType[\"scale\"] = 2] = \"scale\";\n TimelineType[TimelineType[\"shear\"] = 3] = \"shear\";\n TimelineType[TimelineType[\"attachment\"] = 4] = \"attachment\";\n TimelineType[TimelineType[\"color\"] = 5] = \"color\";\n TimelineType[TimelineType[\"deform\"] = 6] = \"deform\";\n TimelineType[TimelineType[\"event\"] = 7] = \"event\";\n TimelineType[TimelineType[\"drawOrder\"] = 8] = \"drawOrder\";\n TimelineType[TimelineType[\"ikConstraint\"] = 9] = \"ikConstraint\";\n TimelineType[TimelineType[\"transformConstraint\"] = 10] = \"transformConstraint\";\n TimelineType[TimelineType[\"pathConstraintPosition\"] = 11] = \"pathConstraintPosition\";\n TimelineType[TimelineType[\"pathConstraintSpacing\"] = 12] = \"pathConstraintSpacing\";\n TimelineType[TimelineType[\"pathConstraintMix\"] = 13] = \"pathConstraintMix\";\n TimelineType[TimelineType[\"twoColor\"] = 14] = \"twoColor\";\n })(TimelineType = spine.TimelineType || (spine.TimelineType = {}));\n var CurveTimeline = (function () {\n function CurveTimeline(frameCount) {\n if (frameCount <= 0)\n throw new Error(\"frameCount must be > 0: \" + frameCount);\n this.curves = spine.Utils.newFloatArray((frameCount - 1) * CurveTimeline.BEZIER_SIZE);\n }\n CurveTimeline.prototype.getFrameCount = function () {\n return this.curves.length / CurveTimeline.BEZIER_SIZE + 1;\n };\n CurveTimeline.prototype.setLinear = function (frameIndex) {\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.LINEAR;\n };\n CurveTimeline.prototype.setStepped = function (frameIndex) {\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.STEPPED;\n };\n CurveTimeline.prototype.getCurveType = function (frameIndex) {\n var index = frameIndex * CurveTimeline.BEZIER_SIZE;\n if (index == this.curves.length)\n return CurveTimeline.LINEAR;\n var type = this.curves[index];\n if (type == CurveTimeline.LINEAR)\n return CurveTimeline.LINEAR;\n if (type == CurveTimeline.STEPPED)\n return CurveTimeline.STEPPED;\n return CurveTimeline.BEZIER;\n };\n CurveTimeline.prototype.setCurve = function (frameIndex, cx1, cy1, cx2, cy2) {\n var tmpx = (-cx1 * 2 + cx2) * 0.03, tmpy = (-cy1 * 2 + cy2) * 0.03;\n var dddfx = ((cx1 - cx2) * 3 + 1) * 0.006, dddfy = ((cy1 - cy2) * 3 + 1) * 0.006;\n var ddfx = tmpx * 2 + dddfx, ddfy = tmpy * 2 + dddfy;\n var dfx = cx1 * 0.3 + tmpx + dddfx * 0.16666667, dfy = cy1 * 0.3 + tmpy + dddfy * 0.16666667;\n var i = frameIndex * CurveTimeline.BEZIER_SIZE;\n var curves = this.curves;\n curves[i++] = CurveTimeline.BEZIER;\n var x = dfx, y = dfy;\n for (var n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\n curves[i] = x;\n curves[i + 1] = y;\n dfx += ddfx;\n dfy += ddfy;\n ddfx += dddfx;\n ddfy += dddfy;\n x += dfx;\n y += dfy;\n }\n };\n CurveTimeline.prototype.getCurvePercent = function (frameIndex, percent) {\n percent = spine.MathUtils.clamp(percent, 0, 1);\n var curves = this.curves;\n var i = frameIndex * CurveTimeline.BEZIER_SIZE;\n var type = curves[i];\n if (type == CurveTimeline.LINEAR)\n return percent;\n if (type == CurveTimeline.STEPPED)\n return 0;\n i++;\n var x = 0;\n for (var start = i, n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\n x = curves[i];\n if (x >= percent) {\n var prevX = void 0, prevY = void 0;\n if (i == start) {\n prevX = 0;\n prevY = 0;\n }\n else {\n prevX = curves[i - 2];\n prevY = curves[i - 1];\n }\n return prevY + (curves[i + 1] - prevY) * (percent - prevX) / (x - prevX);\n }\n }\n var y = curves[i - 1];\n return y + (1 - y) * (percent - x) / (1 - x);\n };\n CurveTimeline.LINEAR = 0;\n CurveTimeline.STEPPED = 1;\n CurveTimeline.BEZIER = 2;\n CurveTimeline.BEZIER_SIZE = 10 * 2 - 1;\n return CurveTimeline;\n }());\n spine.CurveTimeline = CurveTimeline;\n var RotateTimeline = (function (_super) {\n __extends(RotateTimeline, _super);\n function RotateTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount << 1);\n return _this;\n }\n RotateTimeline.prototype.getPropertyId = function () {\n return (TimelineType.rotate << 24) + this.boneIndex;\n };\n RotateTimeline.prototype.setFrame = function (frameIndex, time, degrees) {\n frameIndex <<= 1;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + RotateTimeline.ROTATION] = degrees;\n };\n RotateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var frames = this.frames;\n var bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n bone.rotation = bone.data.rotation;\n return;\n case MixBlend.first:\n var r_1 = bone.data.rotation - bone.rotation;\n bone.rotation += (r_1 - (16384 - ((16384.499999999996 - r_1 / 360) | 0)) * 360) * alpha;\n }\n return;\n }\n if (time >= frames[frames.length - RotateTimeline.ENTRIES]) {\n var r_2 = frames[frames.length + RotateTimeline.PREV_ROTATION];\n switch (blend) {\n case MixBlend.setup:\n bone.rotation = bone.data.rotation + r_2 * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n r_2 += bone.data.rotation - bone.rotation;\n r_2 -= (16384 - ((16384.499999999996 - r_2 / 360) | 0)) * 360;\n case MixBlend.add:\n bone.rotation += r_2 * alpha;\n }\n return;\n }\n var frame = Animation.binarySearch(frames, time, RotateTimeline.ENTRIES);\n var prevRotation = frames[frame + RotateTimeline.PREV_ROTATION];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime));\n var r = frames[frame + RotateTimeline.ROTATION] - prevRotation;\n r = prevRotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * percent;\n switch (blend) {\n case MixBlend.setup:\n bone.rotation = bone.data.rotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n r += bone.data.rotation - bone.rotation;\n case MixBlend.add:\n bone.rotation += (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\n }\n };\n RotateTimeline.ENTRIES = 2;\n RotateTimeline.PREV_TIME = -2;\n RotateTimeline.PREV_ROTATION = -1;\n RotateTimeline.ROTATION = 1;\n return RotateTimeline;\n }(CurveTimeline));\n spine.RotateTimeline = RotateTimeline;\n var TranslateTimeline = (function (_super) {\n __extends(TranslateTimeline, _super);\n function TranslateTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES);\n return _this;\n }\n TranslateTimeline.prototype.getPropertyId = function () {\n return (TimelineType.translate << 24) + this.boneIndex;\n };\n TranslateTimeline.prototype.setFrame = function (frameIndex, time, x, y) {\n frameIndex *= TranslateTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + TranslateTimeline.X] = x;\n this.frames[frameIndex + TranslateTimeline.Y] = y;\n };\n TranslateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var frames = this.frames;\n var bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n bone.x = bone.data.x;\n bone.y = bone.data.y;\n return;\n case MixBlend.first:\n bone.x += (bone.data.x - bone.x) * alpha;\n bone.y += (bone.data.y - bone.y) * alpha;\n }\n return;\n }\n var x = 0, y = 0;\n if (time >= frames[frames.length - TranslateTimeline.ENTRIES]) {\n x = frames[frames.length + TranslateTimeline.PREV_X];\n y = frames[frames.length + TranslateTimeline.PREV_Y];\n }\n else {\n var frame = Animation.binarySearch(frames, time, TranslateTimeline.ENTRIES);\n x = frames[frame + TranslateTimeline.PREV_X];\n y = frames[frame + TranslateTimeline.PREV_Y];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / TranslateTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TranslateTimeline.PREV_TIME] - frameTime));\n x += (frames[frame + TranslateTimeline.X] - x) * percent;\n y += (frames[frame + TranslateTimeline.Y] - y) * percent;\n }\n switch (blend) {\n case MixBlend.setup:\n bone.x = bone.data.x + x * alpha;\n bone.y = bone.data.y + y * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n bone.x += (bone.data.x + x - bone.x) * alpha;\n bone.y += (bone.data.y + y - bone.y) * alpha;\n break;\n case MixBlend.add:\n bone.x += x * alpha;\n bone.y += y * alpha;\n }\n };\n TranslateTimeline.ENTRIES = 3;\n TranslateTimeline.PREV_TIME = -3;\n TranslateTimeline.PREV_X = -2;\n TranslateTimeline.PREV_Y = -1;\n TranslateTimeline.X = 1;\n TranslateTimeline.Y = 2;\n return TranslateTimeline;\n }(CurveTimeline));\n spine.TranslateTimeline = TranslateTimeline;\n var ScaleTimeline = (function (_super) {\n __extends(ScaleTimeline, _super);\n function ScaleTimeline(frameCount) {\n return _super.call(this, frameCount) || this;\n }\n ScaleTimeline.prototype.getPropertyId = function () {\n return (TimelineType.scale << 24) + this.boneIndex;\n };\n ScaleTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var frames = this.frames;\n var bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n bone.scaleX = bone.data.scaleX;\n bone.scaleY = bone.data.scaleY;\n return;\n case MixBlend.first:\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\n }\n return;\n }\n var x = 0, y = 0;\n if (time >= frames[frames.length - ScaleTimeline.ENTRIES]) {\n x = frames[frames.length + ScaleTimeline.PREV_X] * bone.data.scaleX;\n y = frames[frames.length + ScaleTimeline.PREV_Y] * bone.data.scaleY;\n }\n else {\n var frame = Animation.binarySearch(frames, time, ScaleTimeline.ENTRIES);\n x = frames[frame + ScaleTimeline.PREV_X];\n y = frames[frame + ScaleTimeline.PREV_Y];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / ScaleTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ScaleTimeline.PREV_TIME] - frameTime));\n x = (x + (frames[frame + ScaleTimeline.X] - x) * percent) * bone.data.scaleX;\n y = (y + (frames[frame + ScaleTimeline.Y] - y) * percent) * bone.data.scaleY;\n }\n if (alpha == 1) {\n if (blend == MixBlend.add) {\n bone.scaleX += x - bone.data.scaleX;\n bone.scaleY += y - bone.data.scaleY;\n }\n else {\n bone.scaleX = x;\n bone.scaleY = y;\n }\n }\n else {\n var bx = 0, by = 0;\n if (direction == MixDirection.mixOut) {\n switch (blend) {\n case MixBlend.setup:\n bx = bone.data.scaleX;\n by = bone.data.scaleY;\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bx) * alpha;\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - by) * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n bx = bone.scaleX;\n by = bone.scaleY;\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bx) * alpha;\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - by) * alpha;\n break;\n case MixBlend.add:\n bx = bone.scaleX;\n by = bone.scaleY;\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bone.data.scaleX) * alpha;\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - bone.data.scaleY) * alpha;\n }\n }\n else {\n switch (blend) {\n case MixBlend.setup:\n bx = Math.abs(bone.data.scaleX) * spine.MathUtils.signum(x);\n by = Math.abs(bone.data.scaleY) * spine.MathUtils.signum(y);\n bone.scaleX = bx + (x - bx) * alpha;\n bone.scaleY = by + (y - by) * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n bx = Math.abs(bone.scaleX) * spine.MathUtils.signum(x);\n by = Math.abs(bone.scaleY) * spine.MathUtils.signum(y);\n bone.scaleX = bx + (x - bx) * alpha;\n bone.scaleY = by + (y - by) * alpha;\n break;\n case MixBlend.add:\n bx = spine.MathUtils.signum(x);\n by = spine.MathUtils.signum(y);\n bone.scaleX = Math.abs(bone.scaleX) * bx + (x - Math.abs(bone.data.scaleX) * bx) * alpha;\n bone.scaleY = Math.abs(bone.scaleY) * by + (y - Math.abs(bone.data.scaleY) * by) * alpha;\n }\n }\n }\n };\n return ScaleTimeline;\n }(TranslateTimeline));\n spine.ScaleTimeline = ScaleTimeline;\n var ShearTimeline = (function (_super) {\n __extends(ShearTimeline, _super);\n function ShearTimeline(frameCount) {\n return _super.call(this, frameCount) || this;\n }\n ShearTimeline.prototype.getPropertyId = function () {\n return (TimelineType.shear << 24) + this.boneIndex;\n };\n ShearTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var frames = this.frames;\n var bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n bone.shearX = bone.data.shearX;\n bone.shearY = bone.data.shearY;\n return;\n case MixBlend.first:\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\n }\n return;\n }\n var x = 0, y = 0;\n if (time >= frames[frames.length - ShearTimeline.ENTRIES]) {\n x = frames[frames.length + ShearTimeline.PREV_X];\n y = frames[frames.length + ShearTimeline.PREV_Y];\n }\n else {\n var frame = Animation.binarySearch(frames, time, ShearTimeline.ENTRIES);\n x = frames[frame + ShearTimeline.PREV_X];\n y = frames[frame + ShearTimeline.PREV_Y];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / ShearTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ShearTimeline.PREV_TIME] - frameTime));\n x = x + (frames[frame + ShearTimeline.X] - x) * percent;\n y = y + (frames[frame + ShearTimeline.Y] - y) * percent;\n }\n switch (blend) {\n case MixBlend.setup:\n bone.shearX = bone.data.shearX + x * alpha;\n bone.shearY = bone.data.shearY + y * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\n break;\n case MixBlend.add:\n bone.shearX += x * alpha;\n bone.shearY += y * alpha;\n }\n };\n return ShearTimeline;\n }(TranslateTimeline));\n spine.ShearTimeline = ShearTimeline;\n var ColorTimeline = (function (_super) {\n __extends(ColorTimeline, _super);\n function ColorTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES);\n return _this;\n }\n ColorTimeline.prototype.getPropertyId = function () {\n return (TimelineType.color << 24) + this.slotIndex;\n };\n ColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a) {\n frameIndex *= ColorTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + ColorTimeline.R] = r;\n this.frames[frameIndex + ColorTimeline.G] = g;\n this.frames[frameIndex + ColorTimeline.B] = b;\n this.frames[frameIndex + ColorTimeline.A] = a;\n };\n ColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n var frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n slot.color.setFromColor(slot.data.color);\n return;\n case MixBlend.first:\n var color = slot.color, setup = slot.data.color;\n color.add((setup.r - color.r) * alpha, (setup.g - color.g) * alpha, (setup.b - color.b) * alpha, (setup.a - color.a) * alpha);\n }\n return;\n }\n var r = 0, g = 0, b = 0, a = 0;\n if (time >= frames[frames.length - ColorTimeline.ENTRIES]) {\n var i = frames.length;\n r = frames[i + ColorTimeline.PREV_R];\n g = frames[i + ColorTimeline.PREV_G];\n b = frames[i + ColorTimeline.PREV_B];\n a = frames[i + ColorTimeline.PREV_A];\n }\n else {\n var frame = Animation.binarySearch(frames, time, ColorTimeline.ENTRIES);\n r = frames[frame + ColorTimeline.PREV_R];\n g = frames[frame + ColorTimeline.PREV_G];\n b = frames[frame + ColorTimeline.PREV_B];\n a = frames[frame + ColorTimeline.PREV_A];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / ColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ColorTimeline.PREV_TIME] - frameTime));\n r += (frames[frame + ColorTimeline.R] - r) * percent;\n g += (frames[frame + ColorTimeline.G] - g) * percent;\n b += (frames[frame + ColorTimeline.B] - b) * percent;\n a += (frames[frame + ColorTimeline.A] - a) * percent;\n }\n if (alpha == 1)\n slot.color.set(r, g, b, a);\n else {\n var color = slot.color;\n if (blend == MixBlend.setup)\n color.setFromColor(slot.data.color);\n color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);\n }\n };\n ColorTimeline.ENTRIES = 5;\n ColorTimeline.PREV_TIME = -5;\n ColorTimeline.PREV_R = -4;\n ColorTimeline.PREV_G = -3;\n ColorTimeline.PREV_B = -2;\n ColorTimeline.PREV_A = -1;\n ColorTimeline.R = 1;\n ColorTimeline.G = 2;\n ColorTimeline.B = 3;\n ColorTimeline.A = 4;\n return ColorTimeline;\n }(CurveTimeline));\n spine.ColorTimeline = ColorTimeline;\n var TwoColorTimeline = (function (_super) {\n __extends(TwoColorTimeline, _super);\n function TwoColorTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * TwoColorTimeline.ENTRIES);\n return _this;\n }\n TwoColorTimeline.prototype.getPropertyId = function () {\n return (TimelineType.twoColor << 24) + this.slotIndex;\n };\n TwoColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a, r2, g2, b2) {\n frameIndex *= TwoColorTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + TwoColorTimeline.R] = r;\n this.frames[frameIndex + TwoColorTimeline.G] = g;\n this.frames[frameIndex + TwoColorTimeline.B] = b;\n this.frames[frameIndex + TwoColorTimeline.A] = a;\n this.frames[frameIndex + TwoColorTimeline.R2] = r2;\n this.frames[frameIndex + TwoColorTimeline.G2] = g2;\n this.frames[frameIndex + TwoColorTimeline.B2] = b2;\n };\n TwoColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n var frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n slot.color.setFromColor(slot.data.color);\n slot.darkColor.setFromColor(slot.data.darkColor);\n return;\n case MixBlend.first:\n var light = slot.color, dark = slot.darkColor, setupLight = slot.data.color, setupDark = slot.data.darkColor;\n light.add((setupLight.r - light.r) * alpha, (setupLight.g - light.g) * alpha, (setupLight.b - light.b) * alpha, (setupLight.a - light.a) * alpha);\n dark.add((setupDark.r - dark.r) * alpha, (setupDark.g - dark.g) * alpha, (setupDark.b - dark.b) * alpha, 0);\n }\n return;\n }\n var r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\n if (time >= frames[frames.length - TwoColorTimeline.ENTRIES]) {\n var i = frames.length;\n r = frames[i + TwoColorTimeline.PREV_R];\n g = frames[i + TwoColorTimeline.PREV_G];\n b = frames[i + TwoColorTimeline.PREV_B];\n a = frames[i + TwoColorTimeline.PREV_A];\n r2 = frames[i + TwoColorTimeline.PREV_R2];\n g2 = frames[i + TwoColorTimeline.PREV_G2];\n b2 = frames[i + TwoColorTimeline.PREV_B2];\n }\n else {\n var frame = Animation.binarySearch(frames, time, TwoColorTimeline.ENTRIES);\n r = frames[frame + TwoColorTimeline.PREV_R];\n g = frames[frame + TwoColorTimeline.PREV_G];\n b = frames[frame + TwoColorTimeline.PREV_B];\n a = frames[frame + TwoColorTimeline.PREV_A];\n r2 = frames[frame + TwoColorTimeline.PREV_R2];\n g2 = frames[frame + TwoColorTimeline.PREV_G2];\n b2 = frames[frame + TwoColorTimeline.PREV_B2];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / TwoColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TwoColorTimeline.PREV_TIME] - frameTime));\n r += (frames[frame + TwoColorTimeline.R] - r) * percent;\n g += (frames[frame + TwoColorTimeline.G] - g) * percent;\n b += (frames[frame + TwoColorTimeline.B] - b) * percent;\n a += (frames[frame + TwoColorTimeline.A] - a) * percent;\n r2 += (frames[frame + TwoColorTimeline.R2] - r2) * percent;\n g2 += (frames[frame + TwoColorTimeline.G2] - g2) * percent;\n b2 += (frames[frame + TwoColorTimeline.B2] - b2) * percent;\n }\n if (alpha == 1) {\n slot.color.set(r, g, b, a);\n slot.darkColor.set(r2, g2, b2, 1);\n }\n else {\n var light = slot.color, dark = slot.darkColor;\n if (blend == MixBlend.setup) {\n light.setFromColor(slot.data.color);\n dark.setFromColor(slot.data.darkColor);\n }\n light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\n dark.add((r2 - dark.r) * alpha, (g2 - dark.g) * alpha, (b2 - dark.b) * alpha, 0);\n }\n };\n TwoColorTimeline.ENTRIES = 8;\n TwoColorTimeline.PREV_TIME = -8;\n TwoColorTimeline.PREV_R = -7;\n TwoColorTimeline.PREV_G = -6;\n TwoColorTimeline.PREV_B = -5;\n TwoColorTimeline.PREV_A = -4;\n TwoColorTimeline.PREV_R2 = -3;\n TwoColorTimeline.PREV_G2 = -2;\n TwoColorTimeline.PREV_B2 = -1;\n TwoColorTimeline.R = 1;\n TwoColorTimeline.G = 2;\n TwoColorTimeline.B = 3;\n TwoColorTimeline.A = 4;\n TwoColorTimeline.R2 = 5;\n TwoColorTimeline.G2 = 6;\n TwoColorTimeline.B2 = 7;\n return TwoColorTimeline;\n }(CurveTimeline));\n spine.TwoColorTimeline = TwoColorTimeline;\n var AttachmentTimeline = (function () {\n function AttachmentTimeline(frameCount) {\n this.frames = spine.Utils.newFloatArray(frameCount);\n this.attachmentNames = new Array(frameCount);\n }\n AttachmentTimeline.prototype.getPropertyId = function () {\n return (TimelineType.attachment << 24) + this.slotIndex;\n };\n AttachmentTimeline.prototype.getFrameCount = function () {\n return this.frames.length;\n };\n AttachmentTimeline.prototype.setFrame = function (frameIndex, time, attachmentName) {\n this.frames[frameIndex] = time;\n this.attachmentNames[frameIndex] = attachmentName;\n };\n AttachmentTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n if (direction == MixDirection.mixOut) {\n if (blend == MixBlend.setup)\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\n return;\n }\n var frames = this.frames;\n if (time < frames[0]) {\n if (blend == MixBlend.setup || blend == MixBlend.first)\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\n return;\n }\n var frameIndex = 0;\n if (time >= frames[frames.length - 1])\n frameIndex = frames.length - 1;\n else\n frameIndex = Animation.binarySearch(frames, time, 1) - 1;\n var attachmentName = this.attachmentNames[frameIndex];\n skeleton.slots[this.slotIndex]\n .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\n };\n AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) {\n slot.attachment = attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName);\n };\n return AttachmentTimeline;\n }());\n spine.AttachmentTimeline = AttachmentTimeline;\n var zeros = null;\n var DeformTimeline = (function (_super) {\n __extends(DeformTimeline, _super);\n function DeformTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount);\n _this.frameVertices = new Array(frameCount);\n if (zeros == null)\n zeros = spine.Utils.newFloatArray(64);\n return _this;\n }\n DeformTimeline.prototype.getPropertyId = function () {\n return (TimelineType.deform << 27) + +this.attachment.id + this.slotIndex;\n };\n DeformTimeline.prototype.setFrame = function (frameIndex, time, vertices) {\n this.frames[frameIndex] = time;\n this.frameVertices[frameIndex] = vertices;\n };\n DeformTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n var slotAttachment = slot.getAttachment();\n if (!(slotAttachment instanceof spine.VertexAttachment) || !(slotAttachment.deformAttachment == this.attachment))\n return;\n var deformArray = slot.deform;\n if (deformArray.length == 0)\n blend = MixBlend.setup;\n var frameVertices = this.frameVertices;\n var vertexCount = frameVertices[0].length;\n var frames = this.frames;\n if (time < frames[0]) {\n var vertexAttachment = slotAttachment;\n switch (blend) {\n case MixBlend.setup:\n deformArray.length = 0;\n return;\n case MixBlend.first:\n if (alpha == 1) {\n deformArray.length = 0;\n break;\n }\n var deform_1 = spine.Utils.setArraySize(deformArray, vertexCount);\n if (vertexAttachment.bones == null) {\n var setupVertices = vertexAttachment.vertices;\n for (var i = 0; i < vertexCount; i++)\n deform_1[i] += (setupVertices[i] - deform_1[i]) * alpha;\n }\n else {\n alpha = 1 - alpha;\n for (var i = 0; i < vertexCount; i++)\n deform_1[i] *= alpha;\n }\n }\n return;\n }\n var deform = spine.Utils.setArraySize(deformArray, vertexCount);\n if (time >= frames[frames.length - 1]) {\n var lastVertices = frameVertices[frames.length - 1];\n if (alpha == 1) {\n if (blend == MixBlend.add) {\n var vertexAttachment = slotAttachment;\n if (vertexAttachment.bones == null) {\n var setupVertices = vertexAttachment.vertices;\n for (var i_1 = 0; i_1 < vertexCount; i_1++) {\n deform[i_1] += lastVertices[i_1] - setupVertices[i_1];\n }\n }\n else {\n for (var i_2 = 0; i_2 < vertexCount; i_2++)\n deform[i_2] += lastVertices[i_2];\n }\n }\n else {\n spine.Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\n }\n }\n else {\n switch (blend) {\n case MixBlend.setup: {\n var vertexAttachment_1 = slotAttachment;\n if (vertexAttachment_1.bones == null) {\n var setupVertices = vertexAttachment_1.vertices;\n for (var i_3 = 0; i_3 < vertexCount; i_3++) {\n var setup = setupVertices[i_3];\n deform[i_3] = setup + (lastVertices[i_3] - setup) * alpha;\n }\n }\n else {\n for (var i_4 = 0; i_4 < vertexCount; i_4++)\n deform[i_4] = lastVertices[i_4] * alpha;\n }\n break;\n }\n case MixBlend.first:\n case MixBlend.replace:\n for (var i_5 = 0; i_5 < vertexCount; i_5++)\n deform[i_5] += (lastVertices[i_5] - deform[i_5]) * alpha;\n break;\n case MixBlend.add:\n var vertexAttachment = slotAttachment;\n if (vertexAttachment.bones == null) {\n var setupVertices = vertexAttachment.vertices;\n for (var i_6 = 0; i_6 < vertexCount; i_6++) {\n deform[i_6] += (lastVertices[i_6] - setupVertices[i_6]) * alpha;\n }\n }\n else {\n for (var i_7 = 0; i_7 < vertexCount; i_7++)\n deform[i_7] += lastVertices[i_7] * alpha;\n }\n }\n }\n return;\n }\n var frame = Animation.binarySearch(frames, time);\n var prevVertices = frameVertices[frame - 1];\n var nextVertices = frameVertices[frame];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame - 1, 1 - (time - frameTime) / (frames[frame - 1] - frameTime));\n if (alpha == 1) {\n if (blend == MixBlend.add) {\n var vertexAttachment = slotAttachment;\n if (vertexAttachment.bones == null) {\n var setupVertices = vertexAttachment.vertices;\n for (var i_8 = 0; i_8 < vertexCount; i_8++) {\n var prev = prevVertices[i_8];\n deform[i_8] += prev + (nextVertices[i_8] - prev) * percent - setupVertices[i_8];\n }\n }\n else {\n for (var i_9 = 0; i_9 < vertexCount; i_9++) {\n var prev = prevVertices[i_9];\n deform[i_9] += prev + (nextVertices[i_9] - prev) * percent;\n }\n }\n }\n else {\n for (var i_10 = 0; i_10 < vertexCount; i_10++) {\n var prev = prevVertices[i_10];\n deform[i_10] = prev + (nextVertices[i_10] - prev) * percent;\n }\n }\n }\n else {\n switch (blend) {\n case MixBlend.setup: {\n var vertexAttachment_2 = slotAttachment;\n if (vertexAttachment_2.bones == null) {\n var setupVertices = vertexAttachment_2.vertices;\n for (var i_11 = 0; i_11 < vertexCount; i_11++) {\n var prev = prevVertices[i_11], setup = setupVertices[i_11];\n deform[i_11] = setup + (prev + (nextVertices[i_11] - prev) * percent - setup) * alpha;\n }\n }\n else {\n for (var i_12 = 0; i_12 < vertexCount; i_12++) {\n var prev = prevVertices[i_12];\n deform[i_12] = (prev + (nextVertices[i_12] - prev) * percent) * alpha;\n }\n }\n break;\n }\n case MixBlend.first:\n case MixBlend.replace:\n for (var i_13 = 0; i_13 < vertexCount; i_13++) {\n var prev = prevVertices[i_13];\n deform[i_13] += (prev + (nextVertices[i_13] - prev) * percent - deform[i_13]) * alpha;\n }\n break;\n case MixBlend.add:\n var vertexAttachment = slotAttachment;\n if (vertexAttachment.bones == null) {\n var setupVertices = vertexAttachment.vertices;\n for (var i_14 = 0; i_14 < vertexCount; i_14++) {\n var prev = prevVertices[i_14];\n deform[i_14] += (prev + (nextVertices[i_14] - prev) * percent - setupVertices[i_14]) * alpha;\n }\n }\n else {\n for (var i_15 = 0; i_15 < vertexCount; i_15++) {\n var prev = prevVertices[i_15];\n deform[i_15] += (prev + (nextVertices[i_15] - prev) * percent) * alpha;\n }\n }\n }\n }\n };\n return DeformTimeline;\n }(CurveTimeline));\n spine.DeformTimeline = DeformTimeline;\n var EventTimeline = (function () {\n function EventTimeline(frameCount) {\n this.frames = spine.Utils.newFloatArray(frameCount);\n this.events = new Array(frameCount);\n }\n EventTimeline.prototype.getPropertyId = function () {\n return TimelineType.event << 24;\n };\n EventTimeline.prototype.getFrameCount = function () {\n return this.frames.length;\n };\n EventTimeline.prototype.setFrame = function (frameIndex, event) {\n this.frames[frameIndex] = event.time;\n this.events[frameIndex] = event;\n };\n EventTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n if (firedEvents == null)\n return;\n var frames = this.frames;\n var frameCount = this.frames.length;\n if (lastTime > time) {\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\n lastTime = -1;\n }\n else if (lastTime >= frames[frameCount - 1])\n return;\n if (time < frames[0])\n return;\n var frame = 0;\n if (lastTime < frames[0])\n frame = 0;\n else {\n frame = Animation.binarySearch(frames, lastTime);\n var frameTime = frames[frame];\n while (frame > 0) {\n if (frames[frame - 1] != frameTime)\n break;\n frame--;\n }\n }\n for (; frame < frameCount && time >= frames[frame]; frame++)\n firedEvents.push(this.events[frame]);\n };\n return EventTimeline;\n }());\n spine.EventTimeline = EventTimeline;\n var DrawOrderTimeline = (function () {\n function DrawOrderTimeline(frameCount) {\n this.frames = spine.Utils.newFloatArray(frameCount);\n this.drawOrders = new Array(frameCount);\n }\n DrawOrderTimeline.prototype.getPropertyId = function () {\n return TimelineType.drawOrder << 24;\n };\n DrawOrderTimeline.prototype.getFrameCount = function () {\n return this.frames.length;\n };\n DrawOrderTimeline.prototype.setFrame = function (frameIndex, time, drawOrder) {\n this.frames[frameIndex] = time;\n this.drawOrders[frameIndex] = drawOrder;\n };\n DrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var drawOrder = skeleton.drawOrder;\n var slots = skeleton.slots;\n if (direction == MixDirection.mixOut) {\n if (blend == MixBlend.setup)\n spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n return;\n }\n var frames = this.frames;\n if (time < frames[0]) {\n if (blend == MixBlend.setup || blend == MixBlend.first)\n spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n return;\n }\n var frame = 0;\n if (time >= frames[frames.length - 1])\n frame = frames.length - 1;\n else\n frame = Animation.binarySearch(frames, time) - 1;\n var drawOrderToSetupIndex = this.drawOrders[frame];\n if (drawOrderToSetupIndex == null)\n spine.Utils.arrayCopy(slots, 0, drawOrder, 0, slots.length);\n else {\n for (var i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\n }\n };\n return DrawOrderTimeline;\n }());\n spine.DrawOrderTimeline = DrawOrderTimeline;\n var IkConstraintTimeline = (function (_super) {\n __extends(IkConstraintTimeline, _super);\n function IkConstraintTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES);\n return _this;\n }\n IkConstraintTimeline.prototype.getPropertyId = function () {\n return (TimelineType.ikConstraint << 24) + this.ikConstraintIndex;\n };\n IkConstraintTimeline.prototype.setFrame = function (frameIndex, time, mix, softness, bendDirection, compress, stretch) {\n frameIndex *= IkConstraintTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + IkConstraintTimeline.MIX] = mix;\n this.frames[frameIndex + IkConstraintTimeline.SOFTNESS] = softness;\n this.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection;\n this.frames[frameIndex + IkConstraintTimeline.COMPRESS] = compress ? 1 : 0;\n this.frames[frameIndex + IkConstraintTimeline.STRETCH] = stretch ? 1 : 0;\n };\n IkConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var frames = this.frames;\n var constraint = skeleton.ikConstraints[this.ikConstraintIndex];\n if (!constraint.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n constraint.mix = constraint.data.mix;\n constraint.softness = constraint.data.softness;\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n return;\n case MixBlend.first:\n constraint.mix += (constraint.data.mix - constraint.mix) * alpha;\n constraint.softness += (constraint.data.softness - constraint.softness) * alpha;\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n }\n return;\n }\n if (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) {\n if (blend == MixBlend.setup) {\n constraint.mix = constraint.data.mix + (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.data.mix) * alpha;\n constraint.softness = constraint.data.softness\n + (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.data.softness) * alpha;\n if (direction == MixDirection.mixOut) {\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n }\n else {\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\n }\n }\n else {\n constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha;\n constraint.softness += (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.softness) * alpha;\n if (direction == MixDirection.mixIn) {\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\n }\n }\n return;\n }\n var frame = Animation.binarySearch(frames, time, IkConstraintTimeline.ENTRIES);\n var mix = frames[frame + IkConstraintTimeline.PREV_MIX];\n var softness = frames[frame + IkConstraintTimeline.PREV_SOFTNESS];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime));\n if (blend == MixBlend.setup) {\n constraint.mix = constraint.data.mix + (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.data.mix) * alpha;\n constraint.softness = constraint.data.softness\n + (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.data.softness) * alpha;\n if (direction == MixDirection.mixOut) {\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n }\n else {\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\n }\n }\n else {\n constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha;\n constraint.softness += (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.softness) * alpha;\n if (direction == MixDirection.mixIn) {\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\n }\n }\n };\n IkConstraintTimeline.ENTRIES = 6;\n IkConstraintTimeline.PREV_TIME = -6;\n IkConstraintTimeline.PREV_MIX = -5;\n IkConstraintTimeline.PREV_SOFTNESS = -4;\n IkConstraintTimeline.PREV_BEND_DIRECTION = -3;\n IkConstraintTimeline.PREV_COMPRESS = -2;\n IkConstraintTimeline.PREV_STRETCH = -1;\n IkConstraintTimeline.MIX = 1;\n IkConstraintTimeline.SOFTNESS = 2;\n IkConstraintTimeline.BEND_DIRECTION = 3;\n IkConstraintTimeline.COMPRESS = 4;\n IkConstraintTimeline.STRETCH = 5;\n return IkConstraintTimeline;\n }(CurveTimeline));\n spine.IkConstraintTimeline = IkConstraintTimeline;\n var TransformConstraintTimeline = (function (_super) {\n __extends(TransformConstraintTimeline, _super);\n function TransformConstraintTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES);\n return _this;\n }\n TransformConstraintTimeline.prototype.getPropertyId = function () {\n return (TimelineType.transformConstraint << 24) + this.transformConstraintIndex;\n };\n TransformConstraintTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix, scaleMix, shearMix) {\n frameIndex *= TransformConstraintTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + TransformConstraintTimeline.ROTATE] = rotateMix;\n this.frames[frameIndex + TransformConstraintTimeline.TRANSLATE] = translateMix;\n this.frames[frameIndex + TransformConstraintTimeline.SCALE] = scaleMix;\n this.frames[frameIndex + TransformConstraintTimeline.SHEAR] = shearMix;\n };\n TransformConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var frames = this.frames;\n var constraint = skeleton.transformConstraints[this.transformConstraintIndex];\n if (!constraint.active)\n return;\n if (time < frames[0]) {\n var data = constraint.data;\n switch (blend) {\n case MixBlend.setup:\n constraint.rotateMix = data.rotateMix;\n constraint.translateMix = data.translateMix;\n constraint.scaleMix = data.scaleMix;\n constraint.shearMix = data.shearMix;\n return;\n case MixBlend.first:\n constraint.rotateMix += (data.rotateMix - constraint.rotateMix) * alpha;\n constraint.translateMix += (data.translateMix - constraint.translateMix) * alpha;\n constraint.scaleMix += (data.scaleMix - constraint.scaleMix) * alpha;\n constraint.shearMix += (data.shearMix - constraint.shearMix) * alpha;\n }\n return;\n }\n var rotate = 0, translate = 0, scale = 0, shear = 0;\n if (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) {\n var i = frames.length;\n rotate = frames[i + TransformConstraintTimeline.PREV_ROTATE];\n translate = frames[i + TransformConstraintTimeline.PREV_TRANSLATE];\n scale = frames[i + TransformConstraintTimeline.PREV_SCALE];\n shear = frames[i + TransformConstraintTimeline.PREV_SHEAR];\n }\n else {\n var frame = Animation.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES);\n rotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE];\n translate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE];\n scale = frames[frame + TransformConstraintTimeline.PREV_SCALE];\n shear = frames[frame + TransformConstraintTimeline.PREV_SHEAR];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime));\n rotate += (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent;\n translate += (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent;\n scale += (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent;\n shear += (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent;\n }\n if (blend == MixBlend.setup) {\n var data = constraint.data;\n constraint.rotateMix = data.rotateMix + (rotate - data.rotateMix) * alpha;\n constraint.translateMix = data.translateMix + (translate - data.translateMix) * alpha;\n constraint.scaleMix = data.scaleMix + (scale - data.scaleMix) * alpha;\n constraint.shearMix = data.shearMix + (shear - data.shearMix) * alpha;\n }\n else {\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\n constraint.scaleMix += (scale - constraint.scaleMix) * alpha;\n constraint.shearMix += (shear - constraint.shearMix) * alpha;\n }\n };\n TransformConstraintTimeline.ENTRIES = 5;\n TransformConstraintTimeline.PREV_TIME = -5;\n TransformConstraintTimeline.PREV_ROTATE = -4;\n TransformConstraintTimeline.PREV_TRANSLATE = -3;\n TransformConstraintTimeline.PREV_SCALE = -2;\n TransformConstraintTimeline.PREV_SHEAR = -1;\n TransformConstraintTimeline.ROTATE = 1;\n TransformConstraintTimeline.TRANSLATE = 2;\n TransformConstraintTimeline.SCALE = 3;\n TransformConstraintTimeline.SHEAR = 4;\n return TransformConstraintTimeline;\n }(CurveTimeline));\n spine.TransformConstraintTimeline = TransformConstraintTimeline;\n var PathConstraintPositionTimeline = (function (_super) {\n __extends(PathConstraintPositionTimeline, _super);\n function PathConstraintPositionTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES);\n return _this;\n }\n PathConstraintPositionTimeline.prototype.getPropertyId = function () {\n return (TimelineType.pathConstraintPosition << 24) + this.pathConstraintIndex;\n };\n PathConstraintPositionTimeline.prototype.setFrame = function (frameIndex, time, value) {\n frameIndex *= PathConstraintPositionTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + PathConstraintPositionTimeline.VALUE] = value;\n };\n PathConstraintPositionTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var frames = this.frames;\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n constraint.position = constraint.data.position;\n return;\n case MixBlend.first:\n constraint.position += (constraint.data.position - constraint.position) * alpha;\n }\n return;\n }\n var position = 0;\n if (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES])\n position = frames[frames.length + PathConstraintPositionTimeline.PREV_VALUE];\n else {\n var frame = Animation.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES);\n position = frames[frame + PathConstraintPositionTimeline.PREV_VALUE];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / PathConstraintPositionTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintPositionTimeline.PREV_TIME] - frameTime));\n position += (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent;\n }\n if (blend == MixBlend.setup)\n constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\n else\n constraint.position += (position - constraint.position) * alpha;\n };\n PathConstraintPositionTimeline.ENTRIES = 2;\n PathConstraintPositionTimeline.PREV_TIME = -2;\n PathConstraintPositionTimeline.PREV_VALUE = -1;\n PathConstraintPositionTimeline.VALUE = 1;\n return PathConstraintPositionTimeline;\n }(CurveTimeline));\n spine.PathConstraintPositionTimeline = PathConstraintPositionTimeline;\n var PathConstraintSpacingTimeline = (function (_super) {\n __extends(PathConstraintSpacingTimeline, _super);\n function PathConstraintSpacingTimeline(frameCount) {\n return _super.call(this, frameCount) || this;\n }\n PathConstraintSpacingTimeline.prototype.getPropertyId = function () {\n return (TimelineType.pathConstraintSpacing << 24) + this.pathConstraintIndex;\n };\n PathConstraintSpacingTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var frames = this.frames;\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n constraint.spacing = constraint.data.spacing;\n return;\n case MixBlend.first:\n constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\n }\n return;\n }\n var spacing = 0;\n if (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES])\n spacing = frames[frames.length + PathConstraintSpacingTimeline.PREV_VALUE];\n else {\n var frame = Animation.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES);\n spacing = frames[frame + PathConstraintSpacingTimeline.PREV_VALUE];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / PathConstraintSpacingTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintSpacingTimeline.PREV_TIME] - frameTime));\n spacing += (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent;\n }\n if (blend == MixBlend.setup)\n constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\n else\n constraint.spacing += (spacing - constraint.spacing) * alpha;\n };\n return PathConstraintSpacingTimeline;\n }(PathConstraintPositionTimeline));\n spine.PathConstraintSpacingTimeline = PathConstraintSpacingTimeline;\n var PathConstraintMixTimeline = (function (_super) {\n __extends(PathConstraintMixTimeline, _super);\n function PathConstraintMixTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES);\n return _this;\n }\n PathConstraintMixTimeline.prototype.getPropertyId = function () {\n return (TimelineType.pathConstraintMix << 24) + this.pathConstraintIndex;\n };\n PathConstraintMixTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix) {\n frameIndex *= PathConstraintMixTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + PathConstraintMixTimeline.ROTATE] = rotateMix;\n this.frames[frameIndex + PathConstraintMixTimeline.TRANSLATE] = translateMix;\n };\n PathConstraintMixTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var frames = this.frames;\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n constraint.rotateMix = constraint.data.rotateMix;\n constraint.translateMix = constraint.data.translateMix;\n return;\n case MixBlend.first:\n constraint.rotateMix += (constraint.data.rotateMix - constraint.rotateMix) * alpha;\n constraint.translateMix += (constraint.data.translateMix - constraint.translateMix) * alpha;\n }\n return;\n }\n var rotate = 0, translate = 0;\n if (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) {\n rotate = frames[frames.length + PathConstraintMixTimeline.PREV_ROTATE];\n translate = frames[frames.length + PathConstraintMixTimeline.PREV_TRANSLATE];\n }\n else {\n var frame = Animation.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES);\n rotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE];\n translate = frames[frame + PathConstraintMixTimeline.PREV_TRANSLATE];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / PathConstraintMixTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintMixTimeline.PREV_TIME] - frameTime));\n rotate += (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent;\n translate += (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent;\n }\n if (blend == MixBlend.setup) {\n constraint.rotateMix = constraint.data.rotateMix + (rotate - constraint.data.rotateMix) * alpha;\n constraint.translateMix = constraint.data.translateMix + (translate - constraint.data.translateMix) * alpha;\n }\n else {\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\n }\n };\n PathConstraintMixTimeline.ENTRIES = 3;\n PathConstraintMixTimeline.PREV_TIME = -3;\n PathConstraintMixTimeline.PREV_ROTATE = -2;\n PathConstraintMixTimeline.PREV_TRANSLATE = -1;\n PathConstraintMixTimeline.ROTATE = 1;\n PathConstraintMixTimeline.TRANSLATE = 2;\n return PathConstraintMixTimeline;\n }(CurveTimeline));\n spine.PathConstraintMixTimeline = PathConstraintMixTimeline;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var AnimationState = (function () {\n function AnimationState(data) {\n this.tracks = new Array();\n this.timeScale = 1;\n this.unkeyedState = 0;\n this.events = new Array();\n this.listeners = new Array();\n this.queue = new EventQueue(this);\n this.propertyIDs = new spine.IntSet();\n this.animationsChanged = false;\n this.trackEntryPool = new spine.Pool(function () { return new TrackEntry(); });\n this.data = data;\n }\n AnimationState.prototype.update = function (delta) {\n delta *= this.timeScale;\n var tracks = this.tracks;\n for (var i = 0, n = tracks.length; i < n; i++) {\n var current = tracks[i];\n if (current == null)\n continue;\n current.animationLast = current.nextAnimationLast;\n current.trackLast = current.nextTrackLast;\n var currentDelta = delta * current.timeScale;\n if (current.delay > 0) {\n current.delay -= currentDelta;\n if (current.delay > 0)\n continue;\n currentDelta = -current.delay;\n current.delay = 0;\n }\n var next = current.next;\n if (next != null) {\n var nextTime = current.trackLast - next.delay;\n if (nextTime >= 0) {\n next.delay = 0;\n next.trackTime += current.timeScale == 0 ? 0 : (nextTime / current.timeScale + delta) * next.timeScale;\n current.trackTime += currentDelta;\n this.setCurrent(i, next, true);\n while (next.mixingFrom != null) {\n next.mixTime += delta;\n next = next.mixingFrom;\n }\n continue;\n }\n }\n else if (current.trackLast >= current.trackEnd && current.mixingFrom == null) {\n tracks[i] = null;\n this.queue.end(current);\n this.disposeNext(current);\n continue;\n }\n if (current.mixingFrom != null && this.updateMixingFrom(current, delta)) {\n var from = current.mixingFrom;\n current.mixingFrom = null;\n if (from != null)\n from.mixingTo = null;\n while (from != null) {\n this.queue.end(from);\n from = from.mixingFrom;\n }\n }\n current.trackTime += currentDelta;\n }\n this.queue.drain();\n };\n AnimationState.prototype.updateMixingFrom = function (to, delta) {\n var from = to.mixingFrom;\n if (from == null)\n return true;\n var finished = this.updateMixingFrom(from, delta);\n from.animationLast = from.nextAnimationLast;\n from.trackLast = from.nextTrackLast;\n if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {\n if (from.totalAlpha == 0 || to.mixDuration == 0) {\n to.mixingFrom = from.mixingFrom;\n if (from.mixingFrom != null)\n from.mixingFrom.mixingTo = to;\n to.interruptAlpha = from.interruptAlpha;\n this.queue.end(from);\n }\n return finished;\n }\n from.trackTime += delta * from.timeScale;\n to.mixTime += delta;\n return false;\n };\n AnimationState.prototype.apply = function (skeleton) {\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n if (this.animationsChanged)\n this._animationsChanged();\n var events = this.events;\n var tracks = this.tracks;\n var applied = false;\n for (var i_16 = 0, n_1 = tracks.length; i_16 < n_1; i_16++) {\n var current = tracks[i_16];\n if (current == null || current.delay > 0)\n continue;\n applied = true;\n var blend = i_16 == 0 ? spine.MixBlend.first : current.mixBlend;\n var mix = current.alpha;\n if (current.mixingFrom != null)\n mix *= this.applyMixingFrom(current, skeleton, blend);\n else if (current.trackTime >= current.trackEnd && current.next == null)\n mix = 0;\n var animationLast = current.animationLast, animationTime = current.getAnimationTime();\n var timelineCount = current.animation.timelines.length;\n var timelines = current.animation.timelines;\n if ((i_16 == 0 && mix == 1) || blend == spine.MixBlend.add) {\n for (var ii = 0; ii < timelineCount; ii++) {\n spine.Utils.webkit602BugfixHelper(mix, blend);\n var timeline = timelines[ii];\n if (timeline instanceof spine.AttachmentTimeline)\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, blend, true);\n else\n timeline.apply(skeleton, animationLast, animationTime, events, mix, blend, spine.MixDirection.mixIn);\n }\n }\n else {\n var timelineMode = current.timelineMode;\n var firstFrame = current.timelinesRotation.length == 0;\n if (firstFrame)\n spine.Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null);\n var timelinesRotation = current.timelinesRotation;\n for (var ii = 0; ii < timelineCount; ii++) {\n var timeline_1 = timelines[ii];\n var timelineBlend = timelineMode[ii] == AnimationState.SUBSEQUENT ? blend : spine.MixBlend.setup;\n if (timeline_1 instanceof spine.RotateTimeline) {\n this.applyRotateTimeline(timeline_1, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame);\n }\n else if (timeline_1 instanceof spine.AttachmentTimeline) {\n this.applyAttachmentTimeline(timeline_1, skeleton, animationTime, blend, true);\n }\n else {\n spine.Utils.webkit602BugfixHelper(mix, blend);\n timeline_1.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, spine.MixDirection.mixIn);\n }\n }\n }\n this.queueEvents(current, animationTime);\n events.length = 0;\n current.nextAnimationLast = animationTime;\n current.nextTrackLast = current.trackTime;\n }\n var setupState = this.unkeyedState + AnimationState.SETUP;\n var slots = skeleton.slots;\n for (var i = 0, n = skeleton.slots.length; i < n; i++) {\n var slot = slots[i];\n if (slot.attachmentState == setupState) {\n var attachmentName = slot.data.attachmentName;\n slot.attachment = (attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));\n }\n }\n this.unkeyedState += 2;\n this.queue.drain();\n return applied;\n };\n AnimationState.prototype.applyMixingFrom = function (to, skeleton, blend) {\n var from = to.mixingFrom;\n if (from.mixingFrom != null)\n this.applyMixingFrom(from, skeleton, blend);\n var mix = 0;\n if (to.mixDuration == 0) {\n mix = 1;\n if (blend == spine.MixBlend.first)\n blend = spine.MixBlend.setup;\n }\n else {\n mix = to.mixTime / to.mixDuration;\n if (mix > 1)\n mix = 1;\n if (blend != spine.MixBlend.first)\n blend = from.mixBlend;\n }\n var events = mix < from.eventThreshold ? this.events : null;\n var attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\n var animationLast = from.animationLast, animationTime = from.getAnimationTime();\n var timelineCount = from.animation.timelines.length;\n var timelines = from.animation.timelines;\n var alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\n if (blend == spine.MixBlend.add) {\n for (var i = 0; i < timelineCount; i++)\n timelines[i].apply(skeleton, animationLast, animationTime, events, alphaMix, blend, spine.MixDirection.mixOut);\n }\n else {\n var timelineMode = from.timelineMode;\n var timelineHoldMix = from.timelineHoldMix;\n var firstFrame = from.timelinesRotation.length == 0;\n if (firstFrame)\n spine.Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null);\n var timelinesRotation = from.timelinesRotation;\n from.totalAlpha = 0;\n for (var i = 0; i < timelineCount; i++) {\n var timeline = timelines[i];\n var direction = spine.MixDirection.mixOut;\n var timelineBlend = void 0;\n var alpha = 0;\n switch (timelineMode[i]) {\n case AnimationState.SUBSEQUENT:\n if (!drawOrder && timeline instanceof spine.DrawOrderTimeline)\n continue;\n timelineBlend = blend;\n alpha = alphaMix;\n break;\n case AnimationState.FIRST:\n timelineBlend = spine.MixBlend.setup;\n alpha = alphaMix;\n break;\n case AnimationState.HOLD_SUBSEQUENT:\n timelineBlend = blend;\n alpha = alphaHold;\n break;\n case AnimationState.HOLD_FIRST:\n timelineBlend = spine.MixBlend.setup;\n alpha = alphaHold;\n break;\n default:\n timelineBlend = spine.MixBlend.setup;\n var holdMix = timelineHoldMix[i];\n alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\n break;\n }\n from.totalAlpha += alpha;\n if (timeline instanceof spine.RotateTimeline)\n this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame);\n else if (timeline instanceof spine.AttachmentTimeline)\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, timelineBlend, attachments);\n else {\n spine.Utils.webkit602BugfixHelper(alpha, blend);\n if (drawOrder && timeline instanceof spine.DrawOrderTimeline && timelineBlend == spine.MixBlend.setup)\n direction = spine.MixDirection.mixIn;\n timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, direction);\n }\n }\n }\n if (to.mixDuration > 0)\n this.queueEvents(from, animationTime);\n this.events.length = 0;\n from.nextAnimationLast = animationTime;\n from.nextTrackLast = from.trackTime;\n return mix;\n };\n AnimationState.prototype.applyAttachmentTimeline = function (timeline, skeleton, time, blend, attachments) {\n var slot = skeleton.slots[timeline.slotIndex];\n if (!slot.bone.active)\n return;\n var frames = timeline.frames;\n if (time < frames[0]) {\n if (blend == spine.MixBlend.setup || blend == spine.MixBlend.first)\n this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments);\n }\n else {\n var frameIndex;\n if (time >= frames[frames.length - 1])\n frameIndex = frames.length - 1;\n else\n frameIndex = spine.Animation.binarySearch(frames, time) - 1;\n this.setAttachment(skeleton, slot, timeline.attachmentNames[frameIndex], attachments);\n }\n if (slot.attachmentState <= this.unkeyedState)\n slot.attachmentState = this.unkeyedState + AnimationState.SETUP;\n };\n AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) {\n slot.attachment = attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName);\n if (attachments)\n slot.attachmentState = this.unkeyedState + AnimationState.CURRENT;\n };\n AnimationState.prototype.applyRotateTimeline = function (timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) {\n if (firstFrame)\n timelinesRotation[i] = 0;\n if (alpha == 1) {\n timeline.apply(skeleton, 0, time, null, 1, blend, spine.MixDirection.mixIn);\n return;\n }\n var rotateTimeline = timeline;\n var frames = rotateTimeline.frames;\n var bone = skeleton.bones[rotateTimeline.boneIndex];\n if (!bone.active)\n return;\n var r1 = 0, r2 = 0;\n if (time < frames[0]) {\n switch (blend) {\n case spine.MixBlend.setup:\n bone.rotation = bone.data.rotation;\n default:\n return;\n case spine.MixBlend.first:\n r1 = bone.rotation;\n r2 = bone.data.rotation;\n }\n }\n else {\n r1 = blend == spine.MixBlend.setup ? bone.data.rotation : bone.rotation;\n if (time >= frames[frames.length - spine.RotateTimeline.ENTRIES])\n r2 = bone.data.rotation + frames[frames.length + spine.RotateTimeline.PREV_ROTATION];\n else {\n var frame = spine.Animation.binarySearch(frames, time, spine.RotateTimeline.ENTRIES);\n var prevRotation = frames[frame + spine.RotateTimeline.PREV_ROTATION];\n var frameTime = frames[frame];\n var percent = rotateTimeline.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + spine.RotateTimeline.PREV_TIME] - frameTime));\n r2 = frames[frame + spine.RotateTimeline.ROTATION] - prevRotation;\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\n r2 = prevRotation + r2 * percent + bone.data.rotation;\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\n }\n }\n var total = 0, diff = r2 - r1;\n diff -= (16384 - ((16384.499999999996 - diff / 360) | 0)) * 360;\n if (diff == 0) {\n total = timelinesRotation[i];\n }\n else {\n var lastTotal = 0, lastDiff = 0;\n if (firstFrame) {\n lastTotal = 0;\n lastDiff = diff;\n }\n else {\n lastTotal = timelinesRotation[i];\n lastDiff = timelinesRotation[i + 1];\n }\n var current = diff > 0, dir = lastTotal >= 0;\n if (spine.MathUtils.signum(lastDiff) != spine.MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\n if (Math.abs(lastTotal) > 180)\n lastTotal += 360 * spine.MathUtils.signum(lastTotal);\n dir = current;\n }\n total = diff + lastTotal - lastTotal % 360;\n if (dir != current)\n total += 360 * spine.MathUtils.signum(lastTotal);\n timelinesRotation[i] = total;\n }\n timelinesRotation[i + 1] = diff;\n r1 += total * alpha;\n bone.rotation = r1 - (16384 - ((16384.499999999996 - r1 / 360) | 0)) * 360;\n };\n AnimationState.prototype.queueEvents = function (entry, animationTime) {\n var animationStart = entry.animationStart, animationEnd = entry.animationEnd;\n var duration = animationEnd - animationStart;\n var trackLastWrapped = entry.trackLast % duration;\n var events = this.events;\n var i = 0, n = events.length;\n for (; i < n; i++) {\n var event_1 = events[i];\n if (event_1.time < trackLastWrapped)\n break;\n if (event_1.time > animationEnd)\n continue;\n this.queue.event(entry, event_1);\n }\n var complete = false;\n if (entry.loop)\n complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;\n else\n complete = animationTime >= animationEnd && entry.animationLast < animationEnd;\n if (complete)\n this.queue.complete(entry);\n for (; i < n; i++) {\n var event_2 = events[i];\n if (event_2.time < animationStart)\n continue;\n this.queue.event(entry, events[i]);\n }\n };\n AnimationState.prototype.clearTracks = function () {\n var oldDrainDisabled = this.queue.drainDisabled;\n this.queue.drainDisabled = true;\n for (var i = 0, n = this.tracks.length; i < n; i++)\n this.clearTrack(i);\n this.tracks.length = 0;\n this.queue.drainDisabled = oldDrainDisabled;\n this.queue.drain();\n };\n AnimationState.prototype.clearTrack = function (trackIndex) {\n if (trackIndex >= this.tracks.length)\n return;\n var current = this.tracks[trackIndex];\n if (current == null)\n return;\n this.queue.end(current);\n this.disposeNext(current);\n var entry = current;\n while (true) {\n var from = entry.mixingFrom;\n if (from == null)\n break;\n this.queue.end(from);\n entry.mixingFrom = null;\n entry.mixingTo = null;\n entry = from;\n }\n this.tracks[current.trackIndex] = null;\n this.queue.drain();\n };\n AnimationState.prototype.setCurrent = function (index, current, interrupt) {\n var from = this.expandToIndex(index);\n this.tracks[index] = current;\n if (from != null) {\n if (interrupt)\n this.queue.interrupt(from);\n current.mixingFrom = from;\n from.mixingTo = current;\n current.mixTime = 0;\n if (from.mixingFrom != null && from.mixDuration > 0)\n current.interruptAlpha *= Math.min(1, from.mixTime / from.mixDuration);\n from.timelinesRotation.length = 0;\n }\n this.queue.start(current);\n };\n AnimationState.prototype.setAnimation = function (trackIndex, animationName, loop) {\n var animation = this.data.skeletonData.findAnimation(animationName);\n if (animation == null)\n throw new Error(\"Animation not found: \" + animationName);\n return this.setAnimationWith(trackIndex, animation, loop);\n };\n AnimationState.prototype.setAnimationWith = function (trackIndex, animation, loop) {\n if (animation == null)\n throw new Error(\"animation cannot be null.\");\n var interrupt = true;\n var current = this.expandToIndex(trackIndex);\n if (current != null) {\n if (current.nextTrackLast == -1) {\n this.tracks[trackIndex] = current.mixingFrom;\n this.queue.interrupt(current);\n this.queue.end(current);\n this.disposeNext(current);\n current = current.mixingFrom;\n interrupt = false;\n }\n else\n this.disposeNext(current);\n }\n var entry = this.trackEntry(trackIndex, animation, loop, current);\n this.setCurrent(trackIndex, entry, interrupt);\n this.queue.drain();\n return entry;\n };\n AnimationState.prototype.addAnimation = function (trackIndex, animationName, loop, delay) {\n var animation = this.data.skeletonData.findAnimation(animationName);\n if (animation == null)\n throw new Error(\"Animation not found: \" + animationName);\n return this.addAnimationWith(trackIndex, animation, loop, delay);\n };\n AnimationState.prototype.addAnimationWith = function (trackIndex, animation, loop, delay) {\n if (animation == null)\n throw new Error(\"animation cannot be null.\");\n var last = this.expandToIndex(trackIndex);\n if (last != null) {\n while (last.next != null)\n last = last.next;\n }\n var entry = this.trackEntry(trackIndex, animation, loop, last);\n if (last == null) {\n this.setCurrent(trackIndex, entry, true);\n this.queue.drain();\n }\n else {\n last.next = entry;\n if (delay <= 0) {\n var duration = last.animationEnd - last.animationStart;\n if (duration != 0) {\n if (last.loop)\n delay += duration * (1 + ((last.trackTime / duration) | 0));\n else\n delay += Math.max(duration, last.trackTime);\n delay -= this.data.getMix(last.animation, animation);\n }\n else\n delay = last.trackTime;\n }\n }\n entry.delay = delay;\n return entry;\n };\n AnimationState.prototype.setEmptyAnimation = function (trackIndex, mixDuration) {\n var entry = this.setAnimationWith(trackIndex, AnimationState.emptyAnimation, false);\n entry.mixDuration = mixDuration;\n entry.trackEnd = mixDuration;\n return entry;\n };\n AnimationState.prototype.addEmptyAnimation = function (trackIndex, mixDuration, delay) {\n if (delay <= 0)\n delay -= mixDuration;\n var entry = this.addAnimationWith(trackIndex, AnimationState.emptyAnimation, false, delay);\n entry.mixDuration = mixDuration;\n entry.trackEnd = mixDuration;\n return entry;\n };\n AnimationState.prototype.setEmptyAnimations = function (mixDuration) {\n var oldDrainDisabled = this.queue.drainDisabled;\n this.queue.drainDisabled = true;\n for (var i = 0, n = this.tracks.length; i < n; i++) {\n var current = this.tracks[i];\n if (current != null)\n this.setEmptyAnimation(current.trackIndex, mixDuration);\n }\n this.queue.drainDisabled = oldDrainDisabled;\n this.queue.drain();\n };\n AnimationState.prototype.expandToIndex = function (index) {\n if (index < this.tracks.length)\n return this.tracks[index];\n spine.Utils.ensureArrayCapacity(this.tracks, index + 1, null);\n this.tracks.length = index + 1;\n return null;\n };\n AnimationState.prototype.trackEntry = function (trackIndex, animation, loop, last) {\n var entry = this.trackEntryPool.obtain();\n entry.trackIndex = trackIndex;\n entry.animation = animation;\n entry.loop = loop;\n entry.holdPrevious = false;\n entry.eventThreshold = 0;\n entry.attachmentThreshold = 0;\n entry.drawOrderThreshold = 0;\n entry.animationStart = 0;\n entry.animationEnd = animation.duration;\n entry.animationLast = -1;\n entry.nextAnimationLast = -1;\n entry.delay = 0;\n entry.trackTime = 0;\n entry.trackLast = -1;\n entry.nextTrackLast = -1;\n entry.trackEnd = Number.MAX_VALUE;\n entry.timeScale = 1;\n entry.alpha = 1;\n entry.interruptAlpha = 1;\n entry.mixTime = 0;\n entry.mixDuration = last == null ? 0 : this.data.getMix(last.animation, animation);\n entry.mixBlend = spine.MixBlend.replace;\n return entry;\n };\n AnimationState.prototype.disposeNext = function (entry) {\n var next = entry.next;\n while (next != null) {\n this.queue.dispose(next);\n next = next.next;\n }\n entry.next = null;\n };\n AnimationState.prototype._animationsChanged = function () {\n this.animationsChanged = false;\n this.propertyIDs.clear();\n for (var i = 0, n = this.tracks.length; i < n; i++) {\n var entry = this.tracks[i];\n if (entry == null)\n continue;\n while (entry.mixingFrom != null)\n entry = entry.mixingFrom;\n do {\n if (entry.mixingFrom == null || entry.mixBlend != spine.MixBlend.add)\n this.computeHold(entry);\n entry = entry.mixingTo;\n } while (entry != null);\n }\n };\n AnimationState.prototype.computeHold = function (entry) {\n var to = entry.mixingTo;\n var timelines = entry.animation.timelines;\n var timelinesCount = entry.animation.timelines.length;\n var timelineMode = spine.Utils.setArraySize(entry.timelineMode, timelinesCount);\n entry.timelineHoldMix.length = 0;\n var timelineDipMix = spine.Utils.setArraySize(entry.timelineHoldMix, timelinesCount);\n var propertyIDs = this.propertyIDs;\n if (to != null && to.holdPrevious) {\n for (var i = 0; i < timelinesCount; i++) {\n timelineMode[i] = propertyIDs.add(timelines[i].getPropertyId()) ? AnimationState.HOLD_FIRST : AnimationState.HOLD_SUBSEQUENT;\n }\n return;\n }\n outer: for (var i = 0; i < timelinesCount; i++) {\n var timeline = timelines[i];\n var id = timeline.getPropertyId();\n if (!propertyIDs.add(id))\n timelineMode[i] = AnimationState.SUBSEQUENT;\n else if (to == null || timeline instanceof spine.AttachmentTimeline || timeline instanceof spine.DrawOrderTimeline\n || timeline instanceof spine.EventTimeline || !to.animation.hasTimeline(id)) {\n timelineMode[i] = AnimationState.FIRST;\n }\n else {\n for (var next = to.mixingTo; next != null; next = next.mixingTo) {\n if (next.animation.hasTimeline(id))\n continue;\n if (entry.mixDuration > 0) {\n timelineMode[i] = AnimationState.HOLD_MIX;\n timelineDipMix[i] = next;\n continue outer;\n }\n break;\n }\n timelineMode[i] = AnimationState.HOLD_FIRST;\n }\n }\n };\n AnimationState.prototype.getCurrent = function (trackIndex) {\n if (trackIndex >= this.tracks.length)\n return null;\n return this.tracks[trackIndex];\n };\n AnimationState.prototype.addListener = function (listener) {\n if (listener == null)\n throw new Error(\"listener cannot be null.\");\n this.listeners.push(listener);\n };\n AnimationState.prototype.removeListener = function (listener) {\n var index = this.listeners.indexOf(listener);\n if (index >= 0)\n this.listeners.splice(index, 1);\n };\n AnimationState.prototype.clearListeners = function () {\n this.listeners.length = 0;\n };\n AnimationState.prototype.clearListenerNotifications = function () {\n this.queue.clear();\n };\n AnimationState.emptyAnimation = new spine.Animation(\"\", [], 0);\n AnimationState.SUBSEQUENT = 0;\n AnimationState.FIRST = 1;\n AnimationState.HOLD_SUBSEQUENT = 2;\n AnimationState.HOLD_FIRST = 3;\n AnimationState.HOLD_MIX = 4;\n AnimationState.SETUP = 1;\n AnimationState.CURRENT = 2;\n return AnimationState;\n }());\n spine.AnimationState = AnimationState;\n var TrackEntry = (function () {\n function TrackEntry() {\n this.mixBlend = spine.MixBlend.replace;\n this.timelineMode = new Array();\n this.timelineHoldMix = new Array();\n this.timelinesRotation = new Array();\n }\n TrackEntry.prototype.reset = function () {\n this.next = null;\n this.mixingFrom = null;\n this.mixingTo = null;\n this.animation = null;\n this.listener = null;\n this.timelineMode.length = 0;\n this.timelineHoldMix.length = 0;\n this.timelinesRotation.length = 0;\n };\n TrackEntry.prototype.getAnimationTime = function () {\n if (this.loop) {\n var duration = this.animationEnd - this.animationStart;\n if (duration == 0)\n return this.animationStart;\n return (this.trackTime % duration) + this.animationStart;\n }\n return Math.min(this.trackTime + this.animationStart, this.animationEnd);\n };\n TrackEntry.prototype.setAnimationLast = function (animationLast) {\n this.animationLast = animationLast;\n this.nextAnimationLast = animationLast;\n };\n TrackEntry.prototype.isComplete = function () {\n return this.trackTime >= this.animationEnd - this.animationStart;\n };\n TrackEntry.prototype.resetRotationDirections = function () {\n this.timelinesRotation.length = 0;\n };\n return TrackEntry;\n }());\n spine.TrackEntry = TrackEntry;\n var EventQueue = (function () {\n function EventQueue(animState) {\n this.objects = [];\n this.drainDisabled = false;\n this.animState = animState;\n }\n EventQueue.prototype.start = function (entry) {\n this.objects.push(EventType.start);\n this.objects.push(entry);\n this.animState.animationsChanged = true;\n };\n EventQueue.prototype.interrupt = function (entry) {\n this.objects.push(EventType.interrupt);\n this.objects.push(entry);\n };\n EventQueue.prototype.end = function (entry) {\n this.objects.push(EventType.end);\n this.objects.push(entry);\n this.animState.animationsChanged = true;\n };\n EventQueue.prototype.dispose = function (entry) {\n this.objects.push(EventType.dispose);\n this.objects.push(entry);\n };\n EventQueue.prototype.complete = function (entry) {\n this.objects.push(EventType.complete);\n this.objects.push(entry);\n };\n EventQueue.prototype.event = function (entry, event) {\n this.objects.push(EventType.event);\n this.objects.push(entry);\n this.objects.push(event);\n };\n EventQueue.prototype.drain = function () {\n if (this.drainDisabled)\n return;\n this.drainDisabled = true;\n var objects = this.objects;\n var listeners = this.animState.listeners;\n for (var i = 0; i < objects.length; i += 2) {\n var type = objects[i];\n var entry = objects[i + 1];\n switch (type) {\n case EventType.start:\n if (entry.listener != null && entry.listener.start)\n entry.listener.start(entry);\n for (var ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].start)\n listeners[ii].start(entry);\n break;\n case EventType.interrupt:\n if (entry.listener != null && entry.listener.interrupt)\n entry.listener.interrupt(entry);\n for (var ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].interrupt)\n listeners[ii].interrupt(entry);\n break;\n case EventType.end:\n if (entry.listener != null && entry.listener.end)\n entry.listener.end(entry);\n for (var ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].end)\n listeners[ii].end(entry);\n case EventType.dispose:\n if (entry.listener != null && entry.listener.dispose)\n entry.listener.dispose(entry);\n for (var ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].dispose)\n listeners[ii].dispose(entry);\n this.animState.trackEntryPool.free(entry);\n break;\n case EventType.complete:\n if (entry.listener != null && entry.listener.complete)\n entry.listener.complete(entry);\n for (var ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].complete)\n listeners[ii].complete(entry);\n break;\n case EventType.event:\n var event_3 = objects[i++ + 2];\n if (entry.listener != null && entry.listener.event)\n entry.listener.event(entry, event_3);\n for (var ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].event)\n listeners[ii].event(entry, event_3);\n break;\n }\n }\n this.clear();\n this.drainDisabled = false;\n };\n EventQueue.prototype.clear = function () {\n this.objects.length = 0;\n };\n return EventQueue;\n }());\n spine.EventQueue = EventQueue;\n var EventType;\n (function (EventType) {\n EventType[EventType[\"start\"] = 0] = \"start\";\n EventType[EventType[\"interrupt\"] = 1] = \"interrupt\";\n EventType[EventType[\"end\"] = 2] = \"end\";\n EventType[EventType[\"dispose\"] = 3] = \"dispose\";\n EventType[EventType[\"complete\"] = 4] = \"complete\";\n EventType[EventType[\"event\"] = 5] = \"event\";\n })(EventType = spine.EventType || (spine.EventType = {}));\n var AnimationStateAdapter = (function () {\n function AnimationStateAdapter() {\n }\n AnimationStateAdapter.prototype.start = function (entry) {\n };\n AnimationStateAdapter.prototype.interrupt = function (entry) {\n };\n AnimationStateAdapter.prototype.end = function (entry) {\n };\n AnimationStateAdapter.prototype.dispose = function (entry) {\n };\n AnimationStateAdapter.prototype.complete = function (entry) {\n };\n AnimationStateAdapter.prototype.event = function (entry, event) {\n };\n return AnimationStateAdapter;\n }());\n spine.AnimationStateAdapter = AnimationStateAdapter;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var AnimationStateData = (function () {\n function AnimationStateData(skeletonData) {\n this.animationToMixTime = {};\n this.defaultMix = 0;\n if (skeletonData == null)\n throw new Error(\"skeletonData cannot be null.\");\n this.skeletonData = skeletonData;\n }\n AnimationStateData.prototype.setMix = function (fromName, toName, duration) {\n var from = this.skeletonData.findAnimation(fromName);\n if (from == null)\n throw new Error(\"Animation not found: \" + fromName);\n var to = this.skeletonData.findAnimation(toName);\n if (to == null)\n throw new Error(\"Animation not found: \" + toName);\n this.setMixWith(from, to, duration);\n };\n AnimationStateData.prototype.setMixWith = function (from, to, duration) {\n if (from == null)\n throw new Error(\"from cannot be null.\");\n if (to == null)\n throw new Error(\"to cannot be null.\");\n var key = from.name + \".\" + to.name;\n this.animationToMixTime[key] = duration;\n };\n AnimationStateData.prototype.getMix = function (from, to) {\n var key = from.name + \".\" + to.name;\n var value = this.animationToMixTime[key];\n return value === undefined ? this.defaultMix : value;\n };\n return AnimationStateData;\n }());\n spine.AnimationStateData = AnimationStateData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var AssetManager = (function () {\n function AssetManager(textureLoader, pathPrefix) {\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\n this.assets = {};\n this.errors = {};\n this.toLoad = 0;\n this.loaded = 0;\n this.rawDataUris = {};\n this.textureLoader = textureLoader;\n this.pathPrefix = pathPrefix;\n }\n AssetManager.prototype.downloadText = function (url, success, error) {\n var request = new XMLHttpRequest();\n request.overrideMimeType(\"text/html\");\n if (this.rawDataUris[url])\n url = this.rawDataUris[url];\n request.open(\"GET\", url, true);\n request.onload = function () {\n if (request.status == 200) {\n success(request.responseText);\n }\n else {\n error(request.status, request.responseText);\n }\n };\n request.onerror = function () {\n error(request.status, request.responseText);\n };\n request.send();\n };\n AssetManager.prototype.downloadBinary = function (url, success, error) {\n var request = new XMLHttpRequest();\n if (this.rawDataUris[url])\n url = this.rawDataUris[url];\n request.open(\"GET\", url, true);\n request.responseType = \"arraybuffer\";\n request.onload = function () {\n if (request.status == 200) {\n success(new Uint8Array(request.response));\n }\n else {\n error(request.status, request.responseText);\n }\n };\n request.onerror = function () {\n error(request.status, request.responseText);\n };\n request.send();\n };\n AssetManager.prototype.setRawDataURI = function (path, data) {\n this.rawDataUris[this.pathPrefix + path] = data;\n };\n AssetManager.prototype.loadBinary = function (path, success, error) {\n var _this = this;\n if (success === void 0) { success = null; }\n if (error === void 0) { error = null; }\n path = this.pathPrefix + path;\n this.toLoad++;\n this.downloadBinary(path, function (data) {\n _this.assets[path] = data;\n if (success)\n success(path, data);\n _this.toLoad--;\n _this.loaded++;\n }, function (state, responseText) {\n _this.errors[path] = \"Couldn't load binary \" + path + \": status \" + status + \", \" + responseText;\n if (error)\n error(path, \"Couldn't load binary \" + path + \": status \" + status + \", \" + responseText);\n _this.toLoad--;\n _this.loaded++;\n });\n };\n AssetManager.prototype.loadText = function (path, success, error) {\n var _this = this;\n if (success === void 0) { success = null; }\n if (error === void 0) { error = null; }\n path = this.pathPrefix + path;\n this.toLoad++;\n this.downloadText(path, function (data) {\n _this.assets[path] = data;\n if (success)\n success(path, data);\n _this.toLoad--;\n _this.loaded++;\n }, function (state, responseText) {\n _this.errors[path] = \"Couldn't load text \" + path + \": status \" + status + \", \" + responseText;\n if (error)\n error(path, \"Couldn't load text \" + path + \": status \" + status + \", \" + responseText);\n _this.toLoad--;\n _this.loaded++;\n });\n };\n AssetManager.prototype.loadTexture = function (path, success, error) {\n var _this = this;\n if (success === void 0) { success = null; }\n if (error === void 0) { error = null; }\n path = this.pathPrefix + path;\n var storagePath = path;\n this.toLoad++;\n var img = new Image();\n img.crossOrigin = \"anonymous\";\n img.onload = function (ev) {\n var texture = _this.textureLoader(img);\n _this.assets[storagePath] = texture;\n _this.toLoad--;\n _this.loaded++;\n if (success)\n success(path, img);\n };\n img.onerror = function (ev) {\n _this.errors[path] = \"Couldn't load image \" + path;\n _this.toLoad--;\n _this.loaded++;\n if (error)\n error(path, \"Couldn't load image \" + path);\n };\n if (this.rawDataUris[path])\n path = this.rawDataUris[path];\n img.src = path;\n };\n AssetManager.prototype.loadTextureAtlas = function (path, success, error) {\n var _this = this;\n if (success === void 0) { success = null; }\n if (error === void 0) { error = null; }\n var parent = path.lastIndexOf(\"/\") >= 0 ? path.substring(0, path.lastIndexOf(\"/\")) : \"\";\n path = this.pathPrefix + path;\n this.toLoad++;\n this.downloadText(path, function (atlasData) {\n var pagesLoaded = { count: 0 };\n var atlasPages = new Array();\n try {\n var atlas = new spine.TextureAtlas(atlasData, function (path) {\n atlasPages.push(parent == \"\" ? path : parent + \"/\" + path);\n var image = document.createElement(\"img\");\n image.width = 16;\n image.height = 16;\n return new spine.FakeTexture(image);\n });\n }\n catch (e) {\n var ex = e;\n _this.errors[path] = \"Couldn't load texture atlas \" + path + \": \" + ex.message;\n if (error)\n error(path, \"Couldn't load texture atlas \" + path + \": \" + ex.message);\n _this.toLoad--;\n _this.loaded++;\n return;\n }\n var _loop_1 = function (atlasPage) {\n var pageLoadError = false;\n _this.loadTexture(atlasPage, function (imagePath, image) {\n pagesLoaded.count++;\n if (pagesLoaded.count == atlasPages.length) {\n if (!pageLoadError) {\n try {\n var atlas = new spine.TextureAtlas(atlasData, function (path) {\n return _this.get(parent == \"\" ? path : parent + \"/\" + path);\n });\n _this.assets[path] = atlas;\n if (success)\n success(path, atlas);\n _this.toLoad--;\n _this.loaded++;\n }\n catch (e) {\n var ex = e;\n _this.errors[path] = \"Couldn't load texture atlas \" + path + \": \" + ex.message;\n if (error)\n error(path, \"Couldn't load texture atlas \" + path + \": \" + ex.message);\n _this.toLoad--;\n _this.loaded++;\n }\n }\n else {\n _this.errors[path] = \"Couldn't load texture atlas page \" + imagePath + \"} of atlas \" + path;\n if (error)\n error(path, \"Couldn't load texture atlas page \" + imagePath + \" of atlas \" + path);\n _this.toLoad--;\n _this.loaded++;\n }\n }\n }, function (imagePath, errorMessage) {\n pageLoadError = true;\n pagesLoaded.count++;\n if (pagesLoaded.count == atlasPages.length) {\n _this.errors[path] = \"Couldn't load texture atlas page \" + imagePath + \"} of atlas \" + path;\n if (error)\n error(path, \"Couldn't load texture atlas page \" + imagePath + \" of atlas \" + path);\n _this.toLoad--;\n _this.loaded++;\n }\n });\n };\n for (var _i = 0, atlasPages_1 = atlasPages; _i < atlasPages_1.length; _i++) {\n var atlasPage = atlasPages_1[_i];\n _loop_1(atlasPage);\n }\n }, function (state, responseText) {\n _this.errors[path] = \"Couldn't load texture atlas \" + path + \": status \" + status + \", \" + responseText;\n if (error)\n error(path, \"Couldn't load texture atlas \" + path + \": status \" + status + \", \" + responseText);\n _this.toLoad--;\n _this.loaded++;\n });\n };\n AssetManager.prototype.get = function (path) {\n path = this.pathPrefix + path;\n return this.assets[path];\n };\n AssetManager.prototype.remove = function (path) {\n path = this.pathPrefix + path;\n var asset = this.assets[path];\n if (asset.dispose)\n asset.dispose();\n this.assets[path] = null;\n };\n AssetManager.prototype.removeAll = function () {\n for (var key in this.assets) {\n var asset = this.assets[key];\n if (asset.dispose)\n asset.dispose();\n }\n this.assets = {};\n };\n AssetManager.prototype.isLoadingComplete = function () {\n return this.toLoad == 0;\n };\n AssetManager.prototype.getToLoad = function () {\n return this.toLoad;\n };\n AssetManager.prototype.getLoaded = function () {\n return this.loaded;\n };\n AssetManager.prototype.dispose = function () {\n this.removeAll();\n };\n AssetManager.prototype.hasErrors = function () {\n return Object.keys(this.errors).length > 0;\n };\n AssetManager.prototype.getErrors = function () {\n return this.errors;\n };\n return AssetManager;\n }());\n spine.AssetManager = AssetManager;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var AtlasAttachmentLoader = (function () {\n function AtlasAttachmentLoader(atlas) {\n this.atlas = atlas;\n }\n AtlasAttachmentLoader.prototype.newRegionAttachment = function (skin, name, path) {\n var region = this.atlas.findRegion(path);\n if (region == null)\n throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\n region.renderObject = region;\n var attachment = new spine.RegionAttachment(name);\n attachment.setRegion(region);\n return attachment;\n };\n AtlasAttachmentLoader.prototype.newMeshAttachment = function (skin, name, path) {\n var region = this.atlas.findRegion(path);\n if (region == null)\n throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\n region.renderObject = region;\n var attachment = new spine.MeshAttachment(name);\n attachment.region = region;\n return attachment;\n };\n AtlasAttachmentLoader.prototype.newBoundingBoxAttachment = function (skin, name) {\n return new spine.BoundingBoxAttachment(name);\n };\n AtlasAttachmentLoader.prototype.newPathAttachment = function (skin, name) {\n return new spine.PathAttachment(name);\n };\n AtlasAttachmentLoader.prototype.newPointAttachment = function (skin, name) {\n return new spine.PointAttachment(name);\n };\n AtlasAttachmentLoader.prototype.newClippingAttachment = function (skin, name) {\n return new spine.ClippingAttachment(name);\n };\n return AtlasAttachmentLoader;\n }());\n spine.AtlasAttachmentLoader = AtlasAttachmentLoader;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var BlendMode;\n (function (BlendMode) {\n BlendMode[BlendMode[\"Normal\"] = 0] = \"Normal\";\n BlendMode[BlendMode[\"Additive\"] = 1] = \"Additive\";\n BlendMode[BlendMode[\"Multiply\"] = 2] = \"Multiply\";\n BlendMode[BlendMode[\"Screen\"] = 3] = \"Screen\";\n })(BlendMode = spine.BlendMode || (spine.BlendMode = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Bone = (function () {\n function Bone(data, skeleton, parent) {\n this.children = new Array();\n this.x = 0;\n this.y = 0;\n this.rotation = 0;\n this.scaleX = 0;\n this.scaleY = 0;\n this.shearX = 0;\n this.shearY = 0;\n this.ax = 0;\n this.ay = 0;\n this.arotation = 0;\n this.ascaleX = 0;\n this.ascaleY = 0;\n this.ashearX = 0;\n this.ashearY = 0;\n this.appliedValid = false;\n this.a = 0;\n this.b = 0;\n this.c = 0;\n this.d = 0;\n this.worldY = 0;\n this.worldX = 0;\n this.sorted = false;\n this.active = false;\n if (data == null)\n throw new Error(\"data cannot be null.\");\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.skeleton = skeleton;\n this.parent = parent;\n this.setToSetupPose();\n }\n Bone.prototype.isActive = function () {\n return this.active;\n };\n Bone.prototype.update = function () {\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\n };\n Bone.prototype.updateWorldTransform = function () {\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\n };\n Bone.prototype.updateWorldTransformWith = function (x, y, rotation, scaleX, scaleY, shearX, shearY) {\n this.ax = x;\n this.ay = y;\n this.arotation = rotation;\n this.ascaleX = scaleX;\n this.ascaleY = scaleY;\n this.ashearX = shearX;\n this.ashearY = shearY;\n this.appliedValid = true;\n var parent = this.parent;\n if (parent == null) {\n var skeleton = this.skeleton;\n var rotationY = rotation + 90 + shearY;\n var sx = skeleton.scaleX;\n var sy = skeleton.scaleY;\n this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\n this.b = spine.MathUtils.cosDeg(rotationY) * scaleY * sx;\n this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\n this.d = spine.MathUtils.sinDeg(rotationY) * scaleY * sy;\n this.worldX = x * sx + skeleton.x;\n this.worldY = y * sy + skeleton.y;\n return;\n }\n var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\n this.worldX = pa * x + pb * y + parent.worldX;\n this.worldY = pc * x + pd * y + parent.worldY;\n switch (this.data.transformMode) {\n case spine.TransformMode.Normal: {\n var rotationY = rotation + 90 + shearY;\n var la = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\n var lb = spine.MathUtils.cosDeg(rotationY) * scaleY;\n var lc = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\n var ld = spine.MathUtils.sinDeg(rotationY) * scaleY;\n this.a = pa * la + pb * lc;\n this.b = pa * lb + pb * ld;\n this.c = pc * la + pd * lc;\n this.d = pc * lb + pd * ld;\n return;\n }\n case spine.TransformMode.OnlyTranslation: {\n var rotationY = rotation + 90 + shearY;\n this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\n this.b = spine.MathUtils.cosDeg(rotationY) * scaleY;\n this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\n this.d = spine.MathUtils.sinDeg(rotationY) * scaleY;\n break;\n }\n case spine.TransformMode.NoRotationOrReflection: {\n var s = pa * pa + pc * pc;\n var prx = 0;\n if (s > 0.0001) {\n s = Math.abs(pa * pd - pb * pc) / s;\n pa /= this.skeleton.scaleX;\n pc /= this.skeleton.scaleY;\n pb = pc * s;\n pd = pa * s;\n prx = Math.atan2(pc, pa) * spine.MathUtils.radDeg;\n }\n else {\n pa = 0;\n pc = 0;\n prx = 90 - Math.atan2(pd, pb) * spine.MathUtils.radDeg;\n }\n var rx = rotation + shearX - prx;\n var ry = rotation + shearY - prx + 90;\n var la = spine.MathUtils.cosDeg(rx) * scaleX;\n var lb = spine.MathUtils.cosDeg(ry) * scaleY;\n var lc = spine.MathUtils.sinDeg(rx) * scaleX;\n var ld = spine.MathUtils.sinDeg(ry) * scaleY;\n this.a = pa * la - pb * lc;\n this.b = pa * lb - pb * ld;\n this.c = pc * la + pd * lc;\n this.d = pc * lb + pd * ld;\n break;\n }\n case spine.TransformMode.NoScale:\n case spine.TransformMode.NoScaleOrReflection: {\n var cos = spine.MathUtils.cosDeg(rotation);\n var sin = spine.MathUtils.sinDeg(rotation);\n var za = (pa * cos + pb * sin) / this.skeleton.scaleX;\n var zc = (pc * cos + pd * sin) / this.skeleton.scaleY;\n var s = Math.sqrt(za * za + zc * zc);\n if (s > 0.00001)\n s = 1 / s;\n za *= s;\n zc *= s;\n s = Math.sqrt(za * za + zc * zc);\n if (this.data.transformMode == spine.TransformMode.NoScale\n && (pa * pd - pb * pc < 0) != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))\n s = -s;\n var r = Math.PI / 2 + Math.atan2(zc, za);\n var zb = Math.cos(r) * s;\n var zd = Math.sin(r) * s;\n var la = spine.MathUtils.cosDeg(shearX) * scaleX;\n var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;\n var lc = spine.MathUtils.sinDeg(shearX) * scaleX;\n var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;\n this.a = za * la + zb * lc;\n this.b = za * lb + zb * ld;\n this.c = zc * la + zd * lc;\n this.d = zc * lb + zd * ld;\n break;\n }\n }\n this.a *= this.skeleton.scaleX;\n this.b *= this.skeleton.scaleX;\n this.c *= this.skeleton.scaleY;\n this.d *= this.skeleton.scaleY;\n };\n Bone.prototype.setToSetupPose = function () {\n var data = this.data;\n this.x = data.x;\n this.y = data.y;\n this.rotation = data.rotation;\n this.scaleX = data.scaleX;\n this.scaleY = data.scaleY;\n this.shearX = data.shearX;\n this.shearY = data.shearY;\n };\n Bone.prototype.getWorldRotationX = function () {\n return Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\n };\n Bone.prototype.getWorldRotationY = function () {\n return Math.atan2(this.d, this.b) * spine.MathUtils.radDeg;\n };\n Bone.prototype.getWorldScaleX = function () {\n return Math.sqrt(this.a * this.a + this.c * this.c);\n };\n Bone.prototype.getWorldScaleY = function () {\n return Math.sqrt(this.b * this.b + this.d * this.d);\n };\n Bone.prototype.updateAppliedTransform = function () {\n this.appliedValid = true;\n var parent = this.parent;\n if (parent == null) {\n this.ax = this.worldX;\n this.ay = this.worldY;\n this.arotation = Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\n this.ascaleX = Math.sqrt(this.a * this.a + this.c * this.c);\n this.ascaleY = Math.sqrt(this.b * this.b + this.d * this.d);\n this.ashearX = 0;\n this.ashearY = Math.atan2(this.a * this.b + this.c * this.d, this.a * this.d - this.b * this.c) * spine.MathUtils.radDeg;\n return;\n }\n var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\n var pid = 1 / (pa * pd - pb * pc);\n var dx = this.worldX - parent.worldX, dy = this.worldY - parent.worldY;\n this.ax = (dx * pd * pid - dy * pb * pid);\n this.ay = (dy * pa * pid - dx * pc * pid);\n var ia = pid * pd;\n var id = pid * pa;\n var ib = pid * pb;\n var ic = pid * pc;\n var ra = ia * this.a - ib * this.c;\n var rb = ia * this.b - ib * this.d;\n var rc = id * this.c - ic * this.a;\n var rd = id * this.d - ic * this.b;\n this.ashearX = 0;\n this.ascaleX = Math.sqrt(ra * ra + rc * rc);\n if (this.ascaleX > 0.0001) {\n var det = ra * rd - rb * rc;\n this.ascaleY = det / this.ascaleX;\n this.ashearY = Math.atan2(ra * rb + rc * rd, det) * spine.MathUtils.radDeg;\n this.arotation = Math.atan2(rc, ra) * spine.MathUtils.radDeg;\n }\n else {\n this.ascaleX = 0;\n this.ascaleY = Math.sqrt(rb * rb + rd * rd);\n this.ashearY = 0;\n this.arotation = 90 - Math.atan2(rd, rb) * spine.MathUtils.radDeg;\n }\n };\n Bone.prototype.worldToLocal = function (world) {\n var a = this.a, b = this.b, c = this.c, d = this.d;\n var invDet = 1 / (a * d - b * c);\n var x = world.x - this.worldX, y = world.y - this.worldY;\n world.x = (x * d * invDet - y * b * invDet);\n world.y = (y * a * invDet - x * c * invDet);\n return world;\n };\n Bone.prototype.localToWorld = function (local) {\n var x = local.x, y = local.y;\n local.x = x * this.a + y * this.b + this.worldX;\n local.y = x * this.c + y * this.d + this.worldY;\n return local;\n };\n Bone.prototype.worldToLocalRotation = function (worldRotation) {\n var sin = spine.MathUtils.sinDeg(worldRotation), cos = spine.MathUtils.cosDeg(worldRotation);\n return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * spine.MathUtils.radDeg + this.rotation - this.shearX;\n };\n Bone.prototype.localToWorldRotation = function (localRotation) {\n localRotation -= this.rotation - this.shearX;\n var sin = spine.MathUtils.sinDeg(localRotation), cos = spine.MathUtils.cosDeg(localRotation);\n return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * spine.MathUtils.radDeg;\n };\n Bone.prototype.rotateWorld = function (degrees) {\n var a = this.a, b = this.b, c = this.c, d = this.d;\n var cos = spine.MathUtils.cosDeg(degrees), sin = spine.MathUtils.sinDeg(degrees);\n this.a = cos * a - sin * c;\n this.b = cos * b - sin * d;\n this.c = sin * a + cos * c;\n this.d = sin * b + cos * d;\n this.appliedValid = false;\n };\n return Bone;\n }());\n spine.Bone = Bone;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var BoneData = (function () {\n function BoneData(index, name, parent) {\n this.x = 0;\n this.y = 0;\n this.rotation = 0;\n this.scaleX = 1;\n this.scaleY = 1;\n this.shearX = 0;\n this.shearY = 0;\n this.transformMode = TransformMode.Normal;\n this.skinRequired = false;\n this.color = new spine.Color();\n if (index < 0)\n throw new Error(\"index must be >= 0.\");\n if (name == null)\n throw new Error(\"name cannot be null.\");\n this.index = index;\n this.name = name;\n this.parent = parent;\n }\n return BoneData;\n }());\n spine.BoneData = BoneData;\n var TransformMode;\n (function (TransformMode) {\n TransformMode[TransformMode[\"Normal\"] = 0] = \"Normal\";\n TransformMode[TransformMode[\"OnlyTranslation\"] = 1] = \"OnlyTranslation\";\n TransformMode[TransformMode[\"NoRotationOrReflection\"] = 2] = \"NoRotationOrReflection\";\n TransformMode[TransformMode[\"NoScale\"] = 3] = \"NoScale\";\n TransformMode[TransformMode[\"NoScaleOrReflection\"] = 4] = \"NoScaleOrReflection\";\n })(TransformMode = spine.TransformMode || (spine.TransformMode = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var ConstraintData = (function () {\n function ConstraintData(name, order, skinRequired) {\n this.name = name;\n this.order = order;\n this.skinRequired = skinRequired;\n }\n return ConstraintData;\n }());\n spine.ConstraintData = ConstraintData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Event = (function () {\n function Event(time, data) {\n if (data == null)\n throw new Error(\"data cannot be null.\");\n this.time = time;\n this.data = data;\n }\n return Event;\n }());\n spine.Event = Event;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var EventData = (function () {\n function EventData(name) {\n this.name = name;\n }\n return EventData;\n }());\n spine.EventData = EventData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var IkConstraint = (function () {\n function IkConstraint(data, skeleton) {\n this.bendDirection = 0;\n this.compress = false;\n this.stretch = false;\n this.mix = 1;\n this.softness = 0;\n this.active = false;\n if (data == null)\n throw new Error(\"data cannot be null.\");\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.mix = data.mix;\n this.softness = data.softness;\n this.bendDirection = data.bendDirection;\n this.compress = data.compress;\n this.stretch = data.stretch;\n this.bones = new Array();\n for (var i = 0; i < data.bones.length; i++)\n this.bones.push(skeleton.findBone(data.bones[i].name));\n this.target = skeleton.findBone(data.target.name);\n }\n IkConstraint.prototype.isActive = function () {\n return this.active;\n };\n IkConstraint.prototype.apply = function () {\n this.update();\n };\n IkConstraint.prototype.update = function () {\n var target = this.target;\n var bones = this.bones;\n switch (bones.length) {\n case 1:\n this.apply1(bones[0], target.worldX, target.worldY, this.compress, this.stretch, this.data.uniform, this.mix);\n break;\n case 2:\n this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.stretch, this.softness, this.mix);\n break;\n }\n };\n IkConstraint.prototype.apply1 = function (bone, targetX, targetY, compress, stretch, uniform, alpha) {\n if (!bone.appliedValid)\n bone.updateAppliedTransform();\n var p = bone.parent;\n var pa = p.a, pb = p.b, pc = p.c, pd = p.d;\n var rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;\n switch (bone.data.transformMode) {\n case spine.TransformMode.OnlyTranslation:\n tx = targetX - bone.worldX;\n ty = targetY - bone.worldY;\n break;\n case spine.TransformMode.NoRotationOrReflection:\n var s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);\n var sa = pa / bone.skeleton.scaleX;\n var sc = pc / bone.skeleton.scaleY;\n pb = -sc * s * bone.skeleton.scaleX;\n pd = sa * s * bone.skeleton.scaleY;\n rotationIK += Math.atan2(sc, sa) * spine.MathUtils.radDeg;\n default:\n var x = targetX - p.worldX, y = targetY - p.worldY;\n var d = pa * pd - pb * pc;\n tx = (x * pd - y * pb) / d - bone.ax;\n ty = (y * pa - x * pc) / d - bone.ay;\n }\n rotationIK += Math.atan2(ty, tx) * spine.MathUtils.radDeg;\n if (bone.ascaleX < 0)\n rotationIK += 180;\n if (rotationIK > 180)\n rotationIK -= 360;\n else if (rotationIK < -180)\n rotationIK += 360;\n var sx = bone.ascaleX, sy = bone.ascaleY;\n if (compress || stretch) {\n switch (bone.data.transformMode) {\n case spine.TransformMode.NoScale:\n case spine.TransformMode.NoScaleOrReflection:\n tx = targetX - bone.worldX;\n ty = targetY - bone.worldY;\n }\n var b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\n if ((compress && dd < b) || (stretch && dd > b) && b > 0.0001) {\n var s = (dd / b - 1) * alpha + 1;\n sx *= s;\n if (uniform)\n sy *= s;\n }\n }\n bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, sx, sy, bone.ashearX, bone.ashearY);\n };\n IkConstraint.prototype.apply2 = function (parent, child, targetX, targetY, bendDir, stretch, softness, alpha) {\n if (alpha == 0) {\n child.updateWorldTransform();\n return;\n }\n if (!parent.appliedValid)\n parent.updateAppliedTransform();\n if (!child.appliedValid)\n child.updateAppliedTransform();\n var px = parent.ax, py = parent.ay, psx = parent.ascaleX, sx = psx, psy = parent.ascaleY, csx = child.ascaleX;\n var os1 = 0, os2 = 0, s2 = 0;\n if (psx < 0) {\n psx = -psx;\n os1 = 180;\n s2 = -1;\n }\n else {\n os1 = 0;\n s2 = 1;\n }\n if (psy < 0) {\n psy = -psy;\n s2 = -s2;\n }\n if (csx < 0) {\n csx = -csx;\n os2 = 180;\n }\n else\n os2 = 0;\n var cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d;\n var u = Math.abs(psx - psy) <= 0.0001;\n if (!u) {\n cy = 0;\n cwx = a * cx + parent.worldX;\n cwy = c * cx + parent.worldY;\n }\n else {\n cy = child.ay;\n cwx = a * cx + b * cy + parent.worldX;\n cwy = c * cx + d * cy + parent.worldY;\n }\n var pp = parent.parent;\n a = pp.a;\n b = pp.b;\n c = pp.c;\n d = pp.d;\n var id = 1 / (a * d - b * c), x = cwx - pp.worldX, y = cwy - pp.worldY;\n var dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\n var l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\n if (l1 < 0.0001) {\n this.apply1(parent, targetX, targetY, false, stretch, false, alpha);\n child.updateWorldTransformWith(cx, cy, 0, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\n return;\n }\n x = targetX - pp.worldX;\n y = targetY - pp.worldY;\n var tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\n var dd = tx * tx + ty * ty;\n if (softness != 0) {\n softness *= psx * (csx + 1) / 2;\n var td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\n if (sd > 0) {\n var p = Math.min(1, sd / (softness * 2)) - 1;\n p = (sd - softness * (1 - p * p)) / td;\n tx -= p * tx;\n ty -= p * ty;\n dd = tx * tx + ty * ty;\n }\n }\n outer: if (u) {\n l2 *= psx;\n var cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\n if (cos < -1)\n cos = -1;\n else if (cos > 1) {\n cos = 1;\n if (stretch)\n sx *= (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\n }\n a2 = Math.acos(cos) * bendDir;\n a = l1 + l2 * cos;\n b = l2 * Math.sin(a2);\n a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b);\n }\n else {\n a = psx * l2;\n b = psy * l2;\n var aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\n c = bb * l1 * l1 + aa * dd - aa * bb;\n var c1 = -2 * bb * l1, c2 = bb - aa;\n d = c1 * c1 - 4 * c2 * c;\n if (d >= 0) {\n var q = Math.sqrt(d);\n if (c1 < 0)\n q = -q;\n q = -(c1 + q) / 2;\n var r0 = q / c2, r1 = c / q;\n var r = Math.abs(r0) < Math.abs(r1) ? r0 : r1;\n if (r * r <= dd) {\n y = Math.sqrt(dd - r * r) * bendDir;\n a1 = ta - Math.atan2(y, r);\n a2 = Math.atan2(y / psy, (r - l1) / psx);\n break outer;\n }\n }\n var minAngle = spine.MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\n var maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;\n c = -a * l1 / (aa - bb);\n if (c >= -1 && c <= 1) {\n c = Math.acos(c);\n x = a * Math.cos(c) + l1;\n y = b * Math.sin(c);\n d = x * x + y * y;\n if (d < minDist) {\n minAngle = c;\n minDist = d;\n minX = x;\n minY = y;\n }\n if (d > maxDist) {\n maxAngle = c;\n maxDist = d;\n maxX = x;\n maxY = y;\n }\n }\n if (dd <= (minDist + maxDist) / 2) {\n a1 = ta - Math.atan2(minY * bendDir, minX);\n a2 = minAngle * bendDir;\n }\n else {\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\n a2 = maxAngle * bendDir;\n }\n }\n var os = Math.atan2(cy, cx) * s2;\n var rotation = parent.arotation;\n a1 = (a1 - os) * spine.MathUtils.radDeg + os1 - rotation;\n if (a1 > 180)\n a1 -= 360;\n else if (a1 < -180)\n a1 += 360;\n parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, sx, parent.ascaleY, 0, 0);\n rotation = child.arotation;\n a2 = ((a2 + os) * spine.MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation;\n if (a2 > 180)\n a2 -= 360;\n else if (a2 < -180)\n a2 += 360;\n child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\n };\n return IkConstraint;\n }());\n spine.IkConstraint = IkConstraint;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var IkConstraintData = (function (_super) {\n __extends(IkConstraintData, _super);\n function IkConstraintData(name) {\n var _this = _super.call(this, name, 0, false) || this;\n _this.bones = new Array();\n _this.bendDirection = 1;\n _this.compress = false;\n _this.stretch = false;\n _this.uniform = false;\n _this.mix = 1;\n _this.softness = 0;\n return _this;\n }\n return IkConstraintData;\n }(spine.ConstraintData));\n spine.IkConstraintData = IkConstraintData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var PathConstraint = (function () {\n function PathConstraint(data, skeleton) {\n this.position = 0;\n this.spacing = 0;\n this.rotateMix = 0;\n this.translateMix = 0;\n this.spaces = new Array();\n this.positions = new Array();\n this.world = new Array();\n this.curves = new Array();\n this.lengths = new Array();\n this.segments = new Array();\n this.active = false;\n if (data == null)\n throw new Error(\"data cannot be null.\");\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.bones = new Array();\n for (var i = 0, n = data.bones.length; i < n; i++)\n this.bones.push(skeleton.findBone(data.bones[i].name));\n this.target = skeleton.findSlot(data.target.name);\n this.position = data.position;\n this.spacing = data.spacing;\n this.rotateMix = data.rotateMix;\n this.translateMix = data.translateMix;\n }\n PathConstraint.prototype.isActive = function () {\n return this.active;\n };\n PathConstraint.prototype.apply = function () {\n this.update();\n };\n PathConstraint.prototype.update = function () {\n var attachment = this.target.getAttachment();\n if (!(attachment instanceof spine.PathAttachment))\n return;\n var rotateMix = this.rotateMix, translateMix = this.translateMix;\n var translate = translateMix > 0, rotate = rotateMix > 0;\n if (!translate && !rotate)\n return;\n var data = this.data;\n var percentSpacing = data.spacingMode == spine.SpacingMode.Percent;\n var rotateMode = data.rotateMode;\n var tangents = rotateMode == spine.RotateMode.Tangent, scale = rotateMode == spine.RotateMode.ChainScale;\n var boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\n var bones = this.bones;\n var spaces = spine.Utils.setArraySize(this.spaces, spacesCount), lengths = null;\n var spacing = this.spacing;\n if (scale || !percentSpacing) {\n if (scale)\n lengths = spine.Utils.setArraySize(this.lengths, boneCount);\n var lengthSpacing = data.spacingMode == spine.SpacingMode.Length;\n for (var i = 0, n = spacesCount - 1; i < n;) {\n var bone = bones[i];\n var setupLength = bone.data.length;\n if (setupLength < PathConstraint.epsilon) {\n if (scale)\n lengths[i] = 0;\n spaces[++i] = 0;\n }\n else if (percentSpacing) {\n if (scale) {\n var x = setupLength * bone.a, y = setupLength * bone.c;\n var length_1 = Math.sqrt(x * x + y * y);\n lengths[i] = length_1;\n }\n spaces[++i] = spacing;\n }\n else {\n var x = setupLength * bone.a, y = setupLength * bone.c;\n var length_2 = Math.sqrt(x * x + y * y);\n if (scale)\n lengths[i] = length_2;\n spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length_2 / setupLength;\n }\n }\n }\n else {\n for (var i = 1; i < spacesCount; i++)\n spaces[i] = spacing;\n }\n var positions = this.computeWorldPositions(attachment, spacesCount, tangents, data.positionMode == spine.PositionMode.Percent, percentSpacing);\n var boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\n var tip = false;\n if (offsetRotation == 0)\n tip = rotateMode == spine.RotateMode.Chain;\n else {\n tip = false;\n var p = this.target.bone;\n offsetRotation *= p.a * p.d - p.b * p.c > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\n }\n for (var i = 0, p = 3; i < boneCount; i++, p += 3) {\n var bone = bones[i];\n bone.worldX += (boneX - bone.worldX) * translateMix;\n bone.worldY += (boneY - bone.worldY) * translateMix;\n var x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\n if (scale) {\n var length_3 = lengths[i];\n if (length_3 != 0) {\n var s = (Math.sqrt(dx * dx + dy * dy) / length_3 - 1) * rotateMix + 1;\n bone.a *= s;\n bone.c *= s;\n }\n }\n boneX = x;\n boneY = y;\n if (rotate) {\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d, r = 0, cos = 0, sin = 0;\n if (tangents)\n r = positions[p - 1];\n else if (spaces[i + 1] == 0)\n r = positions[p + 2];\n else\n r = Math.atan2(dy, dx);\n r -= Math.atan2(c, a);\n if (tip) {\n cos = Math.cos(r);\n sin = Math.sin(r);\n var length_4 = bone.data.length;\n boneX += (length_4 * (cos * a - sin * c) - dx) * rotateMix;\n boneY += (length_4 * (sin * a + cos * c) - dy) * rotateMix;\n }\n else {\n r += offsetRotation;\n }\n if (r > spine.MathUtils.PI)\n r -= spine.MathUtils.PI2;\n else if (r < -spine.MathUtils.PI)\n r += spine.MathUtils.PI2;\n r *= rotateMix;\n cos = Math.cos(r);\n sin = Math.sin(r);\n bone.a = cos * a - sin * c;\n bone.b = cos * b - sin * d;\n bone.c = sin * a + cos * c;\n bone.d = sin * b + cos * d;\n }\n bone.appliedValid = false;\n }\n };\n PathConstraint.prototype.computeWorldPositions = function (path, spacesCount, tangents, percentPosition, percentSpacing) {\n var target = this.target;\n var position = this.position;\n var spaces = this.spaces, out = spine.Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = null;\n var closed = path.closed;\n var verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = PathConstraint.NONE;\n if (!path.constantSpeed) {\n var lengths = path.lengths;\n curveCount -= closed ? 1 : 2;\n var pathLength_1 = lengths[curveCount];\n if (percentPosition)\n position *= pathLength_1;\n if (percentSpacing) {\n for (var i = 1; i < spacesCount; i++)\n spaces[i] *= pathLength_1;\n }\n world = spine.Utils.setArraySize(this.world, 8);\n for (var i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\n var space = spaces[i];\n position += space;\n var p = position;\n if (closed) {\n p %= pathLength_1;\n if (p < 0)\n p += pathLength_1;\n curve = 0;\n }\n else if (p < 0) {\n if (prevCurve != PathConstraint.BEFORE) {\n prevCurve = PathConstraint.BEFORE;\n path.computeWorldVertices(target, 2, 4, world, 0, 2);\n }\n this.addBeforePosition(p, world, 0, out, o);\n continue;\n }\n else if (p > pathLength_1) {\n if (prevCurve != PathConstraint.AFTER) {\n prevCurve = PathConstraint.AFTER;\n path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\n }\n this.addAfterPosition(p - pathLength_1, world, 0, out, o);\n continue;\n }\n for (;; curve++) {\n var length_5 = lengths[curve];\n if (p > length_5)\n continue;\n if (curve == 0)\n p /= length_5;\n else {\n var prev = lengths[curve - 1];\n p = (p - prev) / (length_5 - prev);\n }\n break;\n }\n if (curve != prevCurve) {\n prevCurve = curve;\n if (closed && curve == curveCount) {\n path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\n path.computeWorldVertices(target, 0, 4, world, 4, 2);\n }\n else\n path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\n }\n this.addCurvePosition(p, world[0], world[1], world[2], world[3], world[4], world[5], world[6], world[7], out, o, tangents || (i > 0 && space == 0));\n }\n return out;\n }\n if (closed) {\n verticesLength += 2;\n world = spine.Utils.setArraySize(this.world, verticesLength);\n path.computeWorldVertices(target, 2, verticesLength - 4, world, 0, 2);\n path.computeWorldVertices(target, 0, 2, world, verticesLength - 4, 2);\n world[verticesLength - 2] = world[0];\n world[verticesLength - 1] = world[1];\n }\n else {\n curveCount--;\n verticesLength -= 4;\n world = spine.Utils.setArraySize(this.world, verticesLength);\n path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\n }\n var curves = spine.Utils.setArraySize(this.curves, curveCount);\n var pathLength = 0;\n var x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\n var tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\n for (var i = 0, w = 2; i < curveCount; i++, w += 6) {\n cx1 = world[w];\n cy1 = world[w + 1];\n cx2 = world[w + 2];\n cy2 = world[w + 3];\n x2 = world[w + 4];\n y2 = world[w + 5];\n tmpx = (x1 - cx1 * 2 + cx2) * 0.1875;\n tmpy = (y1 - cy1 * 2 + cy2) * 0.1875;\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375;\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375;\n ddfx = tmpx * 2 + dddfx;\n ddfy = tmpy * 2 + dddfy;\n dfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667;\n dfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n dfx += ddfx;\n dfy += ddfy;\n ddfx += dddfx;\n ddfy += dddfy;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n dfx += ddfx;\n dfy += ddfy;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n dfx += ddfx + dddfx;\n dfy += ddfy + dddfy;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n curves[i] = pathLength;\n x1 = x2;\n y1 = y2;\n }\n if (percentPosition)\n position *= pathLength;\n else\n position *= pathLength / path.lengths[curveCount - 1];\n if (percentSpacing) {\n for (var i = 1; i < spacesCount; i++)\n spaces[i] *= pathLength;\n }\n var segments = this.segments;\n var curveLength = 0;\n for (var i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\n var space = spaces[i];\n position += space;\n var p = position;\n if (closed) {\n p %= pathLength;\n if (p < 0)\n p += pathLength;\n curve = 0;\n }\n else if (p < 0) {\n this.addBeforePosition(p, world, 0, out, o);\n continue;\n }\n else if (p > pathLength) {\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\n continue;\n }\n for (;; curve++) {\n var length_6 = curves[curve];\n if (p > length_6)\n continue;\n if (curve == 0)\n p /= length_6;\n else {\n var prev = curves[curve - 1];\n p = (p - prev) / (length_6 - prev);\n }\n break;\n }\n if (curve != prevCurve) {\n prevCurve = curve;\n var ii = curve * 6;\n x1 = world[ii];\n y1 = world[ii + 1];\n cx1 = world[ii + 2];\n cy1 = world[ii + 3];\n cx2 = world[ii + 4];\n cy2 = world[ii + 5];\n x2 = world[ii + 6];\n y2 = world[ii + 7];\n tmpx = (x1 - cx1 * 2 + cx2) * 0.03;\n tmpy = (y1 - cy1 * 2 + cy2) * 0.03;\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.006;\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.006;\n ddfx = tmpx * 2 + dddfx;\n ddfy = tmpy * 2 + dddfy;\n dfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667;\n dfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667;\n curveLength = Math.sqrt(dfx * dfx + dfy * dfy);\n segments[0] = curveLength;\n for (ii = 1; ii < 8; ii++) {\n dfx += ddfx;\n dfy += ddfy;\n ddfx += dddfx;\n ddfy += dddfy;\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\n segments[ii] = curveLength;\n }\n dfx += ddfx;\n dfy += ddfy;\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\n segments[8] = curveLength;\n dfx += ddfx + dddfx;\n dfy += ddfy + dddfy;\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\n segments[9] = curveLength;\n segment = 0;\n }\n p *= curveLength;\n for (;; segment++) {\n var length_7 = segments[segment];\n if (p > length_7)\n continue;\n if (segment == 0)\n p /= length_7;\n else {\n var prev = segments[segment - 1];\n p = segment + (p - prev) / (length_7 - prev);\n }\n break;\n }\n this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || (i > 0 && space == 0));\n }\n return out;\n };\n PathConstraint.prototype.addBeforePosition = function (p, temp, i, out, o) {\n var x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx);\n out[o] = x1 + p * Math.cos(r);\n out[o + 1] = y1 + p * Math.sin(r);\n out[o + 2] = r;\n };\n PathConstraint.prototype.addAfterPosition = function (p, temp, i, out, o) {\n var x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx);\n out[o] = x1 + p * Math.cos(r);\n out[o + 1] = y1 + p * Math.sin(r);\n out[o + 2] = r;\n };\n PathConstraint.prototype.addCurvePosition = function (p, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents) {\n if (p == 0 || isNaN(p)) {\n out[o] = x1;\n out[o + 1] = y1;\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\n return;\n }\n var tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\n var ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\n var x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt;\n out[o] = x;\n out[o + 1] = y;\n if (tangents) {\n if (p < 0.001)\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\n else\n out[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt));\n }\n };\n PathConstraint.NONE = -1;\n PathConstraint.BEFORE = -2;\n PathConstraint.AFTER = -3;\n PathConstraint.epsilon = 0.00001;\n return PathConstraint;\n }());\n spine.PathConstraint = PathConstraint;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var PathConstraintData = (function (_super) {\n __extends(PathConstraintData, _super);\n function PathConstraintData(name) {\n var _this = _super.call(this, name, 0, false) || this;\n _this.bones = new Array();\n return _this;\n }\n return PathConstraintData;\n }(spine.ConstraintData));\n spine.PathConstraintData = PathConstraintData;\n var PositionMode;\n (function (PositionMode) {\n PositionMode[PositionMode[\"Fixed\"] = 0] = \"Fixed\";\n PositionMode[PositionMode[\"Percent\"] = 1] = \"Percent\";\n })(PositionMode = spine.PositionMode || (spine.PositionMode = {}));\n var SpacingMode;\n (function (SpacingMode) {\n SpacingMode[SpacingMode[\"Length\"] = 0] = \"Length\";\n SpacingMode[SpacingMode[\"Fixed\"] = 1] = \"Fixed\";\n SpacingMode[SpacingMode[\"Percent\"] = 2] = \"Percent\";\n })(SpacingMode = spine.SpacingMode || (spine.SpacingMode = {}));\n var RotateMode;\n (function (RotateMode) {\n RotateMode[RotateMode[\"Tangent\"] = 0] = \"Tangent\";\n RotateMode[RotateMode[\"Chain\"] = 1] = \"Chain\";\n RotateMode[RotateMode[\"ChainScale\"] = 2] = \"ChainScale\";\n })(RotateMode = spine.RotateMode || (spine.RotateMode = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Assets = (function () {\n function Assets(clientId) {\n this.toLoad = new Array();\n this.assets = {};\n this.clientId = clientId;\n }\n Assets.prototype.loaded = function () {\n var i = 0;\n for (var v in this.assets)\n i++;\n return i;\n };\n return Assets;\n }());\n var SharedAssetManager = (function () {\n function SharedAssetManager(pathPrefix) {\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\n this.clientAssets = {};\n this.queuedAssets = {};\n this.rawAssets = {};\n this.errors = {};\n this.pathPrefix = pathPrefix;\n }\n SharedAssetManager.prototype.queueAsset = function (clientId, textureLoader, path) {\n var clientAssets = this.clientAssets[clientId];\n if (clientAssets === null || clientAssets === undefined) {\n clientAssets = new Assets(clientId);\n this.clientAssets[clientId] = clientAssets;\n }\n if (textureLoader !== null)\n clientAssets.textureLoader = textureLoader;\n clientAssets.toLoad.push(path);\n if (this.queuedAssets[path] === path) {\n return false;\n }\n else {\n this.queuedAssets[path] = path;\n return true;\n }\n };\n SharedAssetManager.prototype.loadText = function (clientId, path) {\n var _this = this;\n path = this.pathPrefix + path;\n if (!this.queueAsset(clientId, null, path))\n return;\n var request = new XMLHttpRequest();\n request.overrideMimeType(\"text/html\");\n request.onreadystatechange = function () {\n if (request.readyState == XMLHttpRequest.DONE) {\n if (request.status >= 200 && request.status < 300) {\n _this.rawAssets[path] = request.responseText;\n }\n else {\n _this.errors[path] = \"Couldn't load text \" + path + \": status \" + request.status + \", \" + request.responseText;\n }\n }\n };\n request.open(\"GET\", path, true);\n request.send();\n };\n SharedAssetManager.prototype.loadJson = function (clientId, path) {\n var _this = this;\n path = this.pathPrefix + path;\n if (!this.queueAsset(clientId, null, path))\n return;\n var request = new XMLHttpRequest();\n request.overrideMimeType(\"text/html\");\n request.onreadystatechange = function () {\n if (request.readyState == XMLHttpRequest.DONE) {\n if (request.status >= 200 && request.status < 300) {\n _this.rawAssets[path] = JSON.parse(request.responseText);\n }\n else {\n _this.errors[path] = \"Couldn't load text \" + path + \": status \" + request.status + \", \" + request.responseText;\n }\n }\n };\n request.open(\"GET\", path, true);\n request.send();\n };\n SharedAssetManager.prototype.loadTexture = function (clientId, textureLoader, path) {\n var _this = this;\n path = this.pathPrefix + path;\n if (!this.queueAsset(clientId, textureLoader, path))\n return;\n var img = new Image();\n img.crossOrigin = \"anonymous\";\n img.onload = function (ev) {\n _this.rawAssets[path] = img;\n };\n img.onerror = function (ev) {\n _this.errors[path] = \"Couldn't load image \" + path;\n };\n img.src = path;\n };\n SharedAssetManager.prototype.get = function (clientId, path) {\n path = this.pathPrefix + path;\n var clientAssets = this.clientAssets[clientId];\n if (clientAssets === null || clientAssets === undefined)\n return true;\n return clientAssets.assets[path];\n };\n SharedAssetManager.prototype.updateClientAssets = function (clientAssets) {\n for (var i = 0; i < clientAssets.toLoad.length; i++) {\n var path = clientAssets.toLoad[i];\n var asset = clientAssets.assets[path];\n if (asset === null || asset === undefined) {\n var rawAsset = this.rawAssets[path];\n if (rawAsset === null || rawAsset === undefined)\n continue;\n if (rawAsset instanceof HTMLImageElement) {\n clientAssets.assets[path] = clientAssets.textureLoader(rawAsset);\n }\n else {\n clientAssets.assets[path] = rawAsset;\n }\n }\n }\n };\n SharedAssetManager.prototype.isLoadingComplete = function (clientId) {\n var clientAssets = this.clientAssets[clientId];\n if (clientAssets === null || clientAssets === undefined)\n return true;\n this.updateClientAssets(clientAssets);\n return clientAssets.toLoad.length == clientAssets.loaded();\n };\n SharedAssetManager.prototype.dispose = function () {\n };\n SharedAssetManager.prototype.hasErrors = function () {\n return Object.keys(this.errors).length > 0;\n };\n SharedAssetManager.prototype.getErrors = function () {\n return this.errors;\n };\n return SharedAssetManager;\n }());\n spine.SharedAssetManager = SharedAssetManager;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Skeleton = (function () {\n function Skeleton(data) {\n this._updateCache = new Array();\n this.updateCacheReset = new Array();\n this.time = 0;\n this.scaleX = 1;\n this.scaleY = 1;\n this.x = 0;\n this.y = 0;\n if (data == null)\n throw new Error(\"data cannot be null.\");\n this.data = data;\n this.bones = new Array();\n for (var i = 0; i < data.bones.length; i++) {\n var boneData = data.bones[i];\n var bone = void 0;\n if (boneData.parent == null)\n bone = new spine.Bone(boneData, this, null);\n else {\n var parent_1 = this.bones[boneData.parent.index];\n bone = new spine.Bone(boneData, this, parent_1);\n parent_1.children.push(bone);\n }\n this.bones.push(bone);\n }\n this.slots = new Array();\n this.drawOrder = new Array();\n for (var i = 0; i < data.slots.length; i++) {\n var slotData = data.slots[i];\n var bone = this.bones[slotData.boneData.index];\n var slot = new spine.Slot(slotData, bone);\n this.slots.push(slot);\n this.drawOrder.push(slot);\n }\n this.ikConstraints = new Array();\n for (var i = 0; i < data.ikConstraints.length; i++) {\n var ikConstraintData = data.ikConstraints[i];\n this.ikConstraints.push(new spine.IkConstraint(ikConstraintData, this));\n }\n this.transformConstraints = new Array();\n for (var i = 0; i < data.transformConstraints.length; i++) {\n var transformConstraintData = data.transformConstraints[i];\n this.transformConstraints.push(new spine.TransformConstraint(transformConstraintData, this));\n }\n this.pathConstraints = new Array();\n for (var i = 0; i < data.pathConstraints.length; i++) {\n var pathConstraintData = data.pathConstraints[i];\n this.pathConstraints.push(new spine.PathConstraint(pathConstraintData, this));\n }\n this.color = new spine.Color(1, 1, 1, 1);\n this.updateCache();\n }\n Skeleton.prototype.updateCache = function () {\n var updateCache = this._updateCache;\n updateCache.length = 0;\n this.updateCacheReset.length = 0;\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n bone.sorted = bone.data.skinRequired;\n bone.active = !bone.sorted;\n }\n if (this.skin != null) {\n var skinBones = this.skin.bones;\n for (var i = 0, n = this.skin.bones.length; i < n; i++) {\n var bone = this.bones[skinBones[i].index];\n do {\n bone.sorted = false;\n bone.active = true;\n bone = bone.parent;\n } while (bone != null);\n }\n }\n var ikConstraints = this.ikConstraints;\n var transformConstraints = this.transformConstraints;\n var pathConstraints = this.pathConstraints;\n var ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\n var constraintCount = ikCount + transformCount + pathCount;\n outer: for (var i = 0; i < constraintCount; i++) {\n for (var ii = 0; ii < ikCount; ii++) {\n var constraint = ikConstraints[ii];\n if (constraint.data.order == i) {\n this.sortIkConstraint(constraint);\n continue outer;\n }\n }\n for (var ii = 0; ii < transformCount; ii++) {\n var constraint = transformConstraints[ii];\n if (constraint.data.order == i) {\n this.sortTransformConstraint(constraint);\n continue outer;\n }\n }\n for (var ii = 0; ii < pathCount; ii++) {\n var constraint = pathConstraints[ii];\n if (constraint.data.order == i) {\n this.sortPathConstraint(constraint);\n continue outer;\n }\n }\n }\n for (var i = 0, n = bones.length; i < n; i++)\n this.sortBone(bones[i]);\n };\n Skeleton.prototype.sortIkConstraint = function (constraint) {\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\n if (!constraint.active)\n return;\n var target = constraint.target;\n this.sortBone(target);\n var constrained = constraint.bones;\n var parent = constrained[0];\n this.sortBone(parent);\n if (constrained.length > 1) {\n var child = constrained[constrained.length - 1];\n if (!(this._updateCache.indexOf(child) > -1))\n this.updateCacheReset.push(child);\n }\n this._updateCache.push(constraint);\n this.sortReset(parent.children);\n constrained[constrained.length - 1].sorted = true;\n };\n Skeleton.prototype.sortPathConstraint = function (constraint) {\n constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\n if (!constraint.active)\n return;\n var slot = constraint.target;\n var slotIndex = slot.data.index;\n var slotBone = slot.bone;\n if (this.skin != null)\n this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\n if (this.data.defaultSkin != null && this.data.defaultSkin != this.skin)\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\n for (var i = 0, n = this.data.skins.length; i < n; i++)\n this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\n var attachment = slot.getAttachment();\n if (attachment instanceof spine.PathAttachment)\n this.sortPathConstraintAttachmentWith(attachment, slotBone);\n var constrained = constraint.bones;\n var boneCount = constrained.length;\n for (var i = 0; i < boneCount; i++)\n this.sortBone(constrained[i]);\n this._updateCache.push(constraint);\n for (var i = 0; i < boneCount; i++)\n this.sortReset(constrained[i].children);\n for (var i = 0; i < boneCount; i++)\n constrained[i].sorted = true;\n };\n Skeleton.prototype.sortTransformConstraint = function (constraint) {\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\n if (!constraint.active)\n return;\n this.sortBone(constraint.target);\n var constrained = constraint.bones;\n var boneCount = constrained.length;\n if (constraint.data.local) {\n for (var i = 0; i < boneCount; i++) {\n var child = constrained[i];\n this.sortBone(child.parent);\n if (!(this._updateCache.indexOf(child) > -1))\n this.updateCacheReset.push(child);\n }\n }\n else {\n for (var i = 0; i < boneCount; i++) {\n this.sortBone(constrained[i]);\n }\n }\n this._updateCache.push(constraint);\n for (var ii = 0; ii < boneCount; ii++)\n this.sortReset(constrained[ii].children);\n for (var ii = 0; ii < boneCount; ii++)\n constrained[ii].sorted = true;\n };\n Skeleton.prototype.sortPathConstraintAttachment = function (skin, slotIndex, slotBone) {\n var attachments = skin.attachments[slotIndex];\n if (!attachments)\n return;\n for (var key in attachments) {\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\n }\n };\n Skeleton.prototype.sortPathConstraintAttachmentWith = function (attachment, slotBone) {\n if (!(attachment instanceof spine.PathAttachment))\n return;\n var pathBones = attachment.bones;\n if (pathBones == null)\n this.sortBone(slotBone);\n else {\n var bones = this.bones;\n var i = 0;\n while (i < pathBones.length) {\n var boneCount = pathBones[i++];\n for (var n = i + boneCount; i < n; i++) {\n var boneIndex = pathBones[i];\n this.sortBone(bones[boneIndex]);\n }\n }\n }\n };\n Skeleton.prototype.sortBone = function (bone) {\n if (bone.sorted)\n return;\n var parent = bone.parent;\n if (parent != null)\n this.sortBone(parent);\n bone.sorted = true;\n this._updateCache.push(bone);\n };\n Skeleton.prototype.sortReset = function (bones) {\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n if (!bone.active)\n continue;\n if (bone.sorted)\n this.sortReset(bone.children);\n bone.sorted = false;\n }\n };\n Skeleton.prototype.updateWorldTransform = function () {\n var updateCacheReset = this.updateCacheReset;\n for (var i = 0, n = updateCacheReset.length; i < n; i++) {\n var bone = updateCacheReset[i];\n bone.ax = bone.x;\n bone.ay = bone.y;\n bone.arotation = bone.rotation;\n bone.ascaleX = bone.scaleX;\n bone.ascaleY = bone.scaleY;\n bone.ashearX = bone.shearX;\n bone.ashearY = bone.shearY;\n bone.appliedValid = true;\n }\n var updateCache = this._updateCache;\n for (var i = 0, n = updateCache.length; i < n; i++)\n updateCache[i].update();\n };\n Skeleton.prototype.setToSetupPose = function () {\n this.setBonesToSetupPose();\n this.setSlotsToSetupPose();\n };\n Skeleton.prototype.setBonesToSetupPose = function () {\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++)\n bones[i].setToSetupPose();\n var ikConstraints = this.ikConstraints;\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\n var constraint = ikConstraints[i];\n constraint.mix = constraint.data.mix;\n constraint.softness = constraint.data.softness;\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n }\n var transformConstraints = this.transformConstraints;\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\n var constraint = transformConstraints[i];\n var data = constraint.data;\n constraint.rotateMix = data.rotateMix;\n constraint.translateMix = data.translateMix;\n constraint.scaleMix = data.scaleMix;\n constraint.shearMix = data.shearMix;\n }\n var pathConstraints = this.pathConstraints;\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\n var constraint = pathConstraints[i];\n var data = constraint.data;\n constraint.position = data.position;\n constraint.spacing = data.spacing;\n constraint.rotateMix = data.rotateMix;\n constraint.translateMix = data.translateMix;\n }\n };\n Skeleton.prototype.setSlotsToSetupPose = function () {\n var slots = this.slots;\n spine.Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\n for (var i = 0, n = slots.length; i < n; i++)\n slots[i].setToSetupPose();\n };\n Skeleton.prototype.getRootBone = function () {\n if (this.bones.length == 0)\n return null;\n return this.bones[0];\n };\n Skeleton.prototype.findBone = function (boneName) {\n if (boneName == null)\n throw new Error(\"boneName cannot be null.\");\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n if (bone.data.name == boneName)\n return bone;\n }\n return null;\n };\n Skeleton.prototype.findBoneIndex = function (boneName) {\n if (boneName == null)\n throw new Error(\"boneName cannot be null.\");\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++)\n if (bones[i].data.name == boneName)\n return i;\n return -1;\n };\n Skeleton.prototype.findSlot = function (slotName) {\n if (slotName == null)\n throw new Error(\"slotName cannot be null.\");\n var slots = this.slots;\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n if (slot.data.name == slotName)\n return slot;\n }\n return null;\n };\n Skeleton.prototype.findSlotIndex = function (slotName) {\n if (slotName == null)\n throw new Error(\"slotName cannot be null.\");\n var slots = this.slots;\n for (var i = 0, n = slots.length; i < n; i++)\n if (slots[i].data.name == slotName)\n return i;\n return -1;\n };\n Skeleton.prototype.setSkinByName = function (skinName) {\n var skin = this.data.findSkin(skinName);\n if (skin == null)\n throw new Error(\"Skin not found: \" + skinName);\n this.setSkin(skin);\n };\n Skeleton.prototype.setSkin = function (newSkin) {\n if (newSkin == this.skin)\n return;\n if (newSkin != null) {\n if (this.skin != null)\n newSkin.attachAll(this, this.skin);\n else {\n var slots = this.slots;\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n var name_1 = slot.data.attachmentName;\n if (name_1 != null) {\n var attachment = newSkin.getAttachment(i, name_1);\n if (attachment != null)\n slot.setAttachment(attachment);\n }\n }\n }\n }\n this.skin = newSkin;\n this.updateCache();\n };\n Skeleton.prototype.getAttachmentByName = function (slotName, attachmentName) {\n return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName);\n };\n Skeleton.prototype.getAttachment = function (slotIndex, attachmentName) {\n if (attachmentName == null)\n throw new Error(\"attachmentName cannot be null.\");\n if (this.skin != null) {\n var attachment = this.skin.getAttachment(slotIndex, attachmentName);\n if (attachment != null)\n return attachment;\n }\n if (this.data.defaultSkin != null)\n return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\n return null;\n };\n Skeleton.prototype.setAttachment = function (slotName, attachmentName) {\n if (slotName == null)\n throw new Error(\"slotName cannot be null.\");\n var slots = this.slots;\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n if (slot.data.name == slotName) {\n var attachment = null;\n if (attachmentName != null) {\n attachment = this.getAttachment(i, attachmentName);\n if (attachment == null)\n throw new Error(\"Attachment not found: \" + attachmentName + \", for slot: \" + slotName);\n }\n slot.setAttachment(attachment);\n return;\n }\n }\n throw new Error(\"Slot not found: \" + slotName);\n };\n Skeleton.prototype.findIkConstraint = function (constraintName) {\n if (constraintName == null)\n throw new Error(\"constraintName cannot be null.\");\n var ikConstraints = this.ikConstraints;\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\n var ikConstraint = ikConstraints[i];\n if (ikConstraint.data.name == constraintName)\n return ikConstraint;\n }\n return null;\n };\n Skeleton.prototype.findTransformConstraint = function (constraintName) {\n if (constraintName == null)\n throw new Error(\"constraintName cannot be null.\");\n var transformConstraints = this.transformConstraints;\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\n var constraint = transformConstraints[i];\n if (constraint.data.name == constraintName)\n return constraint;\n }\n return null;\n };\n Skeleton.prototype.findPathConstraint = function (constraintName) {\n if (constraintName == null)\n throw new Error(\"constraintName cannot be null.\");\n var pathConstraints = this.pathConstraints;\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\n var constraint = pathConstraints[i];\n if (constraint.data.name == constraintName)\n return constraint;\n }\n return null;\n };\n Skeleton.prototype.getBounds = function (offset, size, temp) {\n if (temp === void 0) { temp = new Array(2); }\n if (offset == null)\n throw new Error(\"offset cannot be null.\");\n if (size == null)\n throw new Error(\"size cannot be null.\");\n var drawOrder = this.drawOrder;\n var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\n for (var i = 0, n = drawOrder.length; i < n; i++) {\n var slot = drawOrder[i];\n if (!slot.bone.active)\n continue;\n var verticesLength = 0;\n var vertices = null;\n var attachment = slot.getAttachment();\n if (attachment instanceof spine.RegionAttachment) {\n verticesLength = 8;\n vertices = spine.Utils.setArraySize(temp, verticesLength, 0);\n attachment.computeWorldVertices(slot.bone, vertices, 0, 2);\n }\n else if (attachment instanceof spine.MeshAttachment) {\n var mesh = attachment;\n verticesLength = mesh.worldVerticesLength;\n vertices = spine.Utils.setArraySize(temp, verticesLength, 0);\n mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\n }\n if (vertices != null) {\n for (var ii = 0, nn = vertices.length; ii < nn; ii += 2) {\n var x = vertices[ii], y = vertices[ii + 1];\n minX = Math.min(minX, x);\n minY = Math.min(minY, y);\n maxX = Math.max(maxX, x);\n maxY = Math.max(maxY, y);\n }\n }\n }\n offset.set(minX, minY);\n size.set(maxX - minX, maxY - minY);\n };\n Skeleton.prototype.update = function (delta) {\n this.time += delta;\n };\n return Skeleton;\n }());\n spine.Skeleton = Skeleton;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SkeletonBinary = (function () {\n function SkeletonBinary(attachmentLoader) {\n this.scale = 1;\n this.linkedMeshes = new Array();\n this.attachmentLoader = attachmentLoader;\n }\n SkeletonBinary.prototype.readSkeletonData = function (binary) {\n var scale = this.scale;\n var skeletonData = new spine.SkeletonData();\n skeletonData.name = \"\";\n var input = new BinaryInput(binary);\n skeletonData.hash = input.readString();\n skeletonData.version = input.readString();\n if (\"3.8.75\" == skeletonData.version)\n throw new Error(\"Unsupported skeleton data, please export with a newer version of Spine.\");\n skeletonData.x = input.readFloat();\n skeletonData.y = input.readFloat();\n skeletonData.width = input.readFloat();\n skeletonData.height = input.readFloat();\n var nonessential = input.readBoolean();\n if (nonessential) {\n skeletonData.fps = input.readFloat();\n skeletonData.imagesPath = input.readString();\n skeletonData.audioPath = input.readString();\n }\n var n = 0;\n n = input.readInt(true);\n for (var i = 0; i < n; i++)\n input.strings.push(input.readString());\n n = input.readInt(true);\n for (var i = 0; i < n; i++) {\n var name_2 = input.readString();\n var parent_2 = i == 0 ? null : skeletonData.bones[input.readInt(true)];\n var data = new spine.BoneData(i, name_2, parent_2);\n data.rotation = input.readFloat();\n data.x = input.readFloat() * scale;\n data.y = input.readFloat() * scale;\n data.scaleX = input.readFloat();\n data.scaleY = input.readFloat();\n data.shearX = input.readFloat();\n data.shearY = input.readFloat();\n data.length = input.readFloat() * scale;\n data.transformMode = SkeletonBinary.TransformModeValues[input.readInt(true)];\n data.skinRequired = input.readBoolean();\n if (nonessential)\n spine.Color.rgba8888ToColor(data.color, input.readInt32());\n skeletonData.bones.push(data);\n }\n n = input.readInt(true);\n for (var i = 0; i < n; i++) {\n var slotName = input.readString();\n var boneData = skeletonData.bones[input.readInt(true)];\n var data = new spine.SlotData(i, slotName, boneData);\n spine.Color.rgba8888ToColor(data.color, input.readInt32());\n var darkColor = input.readInt32();\n if (darkColor != -1)\n spine.Color.rgb888ToColor(data.darkColor = new spine.Color(), darkColor);\n data.attachmentName = input.readStringRef();\n data.blendMode = SkeletonBinary.BlendModeValues[input.readInt(true)];\n skeletonData.slots.push(data);\n }\n n = input.readInt(true);\n for (var i = 0, nn = void 0; i < n; i++) {\n var data = new spine.IkConstraintData(input.readString());\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (var ii = 0; ii < nn; ii++)\n data.bones.push(skeletonData.bones[input.readInt(true)]);\n data.target = skeletonData.bones[input.readInt(true)];\n data.mix = input.readFloat();\n data.softness = input.readFloat() * scale;\n data.bendDirection = input.readByte();\n data.compress = input.readBoolean();\n data.stretch = input.readBoolean();\n data.uniform = input.readBoolean();\n skeletonData.ikConstraints.push(data);\n }\n n = input.readInt(true);\n for (var i = 0, nn = void 0; i < n; i++) {\n var data = new spine.TransformConstraintData(input.readString());\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (var ii = 0; ii < nn; ii++)\n data.bones.push(skeletonData.bones[input.readInt(true)]);\n data.target = skeletonData.bones[input.readInt(true)];\n data.local = input.readBoolean();\n data.relative = input.readBoolean();\n data.offsetRotation = input.readFloat();\n data.offsetX = input.readFloat() * scale;\n data.offsetY = input.readFloat() * scale;\n data.offsetScaleX = input.readFloat();\n data.offsetScaleY = input.readFloat();\n data.offsetShearY = input.readFloat();\n data.rotateMix = input.readFloat();\n data.translateMix = input.readFloat();\n data.scaleMix = input.readFloat();\n data.shearMix = input.readFloat();\n skeletonData.transformConstraints.push(data);\n }\n n = input.readInt(true);\n for (var i = 0, nn = void 0; i < n; i++) {\n var data = new spine.PathConstraintData(input.readString());\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (var ii = 0; ii < nn; ii++)\n data.bones.push(skeletonData.bones[input.readInt(true)]);\n data.target = skeletonData.slots[input.readInt(true)];\n data.positionMode = SkeletonBinary.PositionModeValues[input.readInt(true)];\n data.spacingMode = SkeletonBinary.SpacingModeValues[input.readInt(true)];\n data.rotateMode = SkeletonBinary.RotateModeValues[input.readInt(true)];\n data.offsetRotation = input.readFloat();\n data.position = input.readFloat();\n if (data.positionMode == spine.PositionMode.Fixed)\n data.position *= scale;\n data.spacing = input.readFloat();\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\n data.spacing *= scale;\n data.rotateMix = input.readFloat();\n data.translateMix = input.readFloat();\n skeletonData.pathConstraints.push(data);\n }\n var defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\n if (defaultSkin != null) {\n skeletonData.defaultSkin = defaultSkin;\n skeletonData.skins.push(defaultSkin);\n }\n {\n var i = skeletonData.skins.length;\n spine.Utils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\n for (; i < n; i++)\n skeletonData.skins[i] = this.readSkin(input, skeletonData, false, nonessential);\n }\n n = this.linkedMeshes.length;\n for (var i = 0; i < n; i++) {\n var linkedMesh = this.linkedMeshes[i];\n var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\n if (skin == null)\n throw new Error(\"Skin not found: \" + linkedMesh.skin);\n var parent_3 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\n if (parent_3 == null)\n throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_3 : linkedMesh.mesh;\n linkedMesh.mesh.setParentMesh(parent_3);\n linkedMesh.mesh.updateUVs();\n }\n this.linkedMeshes.length = 0;\n n = input.readInt(true);\n for (var i = 0; i < n; i++) {\n var data = new spine.EventData(input.readStringRef());\n data.intValue = input.readInt(false);\n data.floatValue = input.readFloat();\n data.stringValue = input.readString();\n data.audioPath = input.readString();\n if (data.audioPath != null) {\n data.volume = input.readFloat();\n data.balance = input.readFloat();\n }\n skeletonData.events.push(data);\n }\n n = input.readInt(true);\n for (var i = 0; i < n; i++)\n skeletonData.animations.push(this.readAnimation(input, input.readString(), skeletonData));\n return skeletonData;\n };\n SkeletonBinary.prototype.readSkin = function (input, skeletonData, defaultSkin, nonessential) {\n var skin = null;\n var slotCount = 0;\n if (defaultSkin) {\n slotCount = input.readInt(true);\n if (slotCount == 0)\n return null;\n skin = new spine.Skin(\"default\");\n }\n else {\n skin = new spine.Skin(input.readStringRef());\n skin.bones.length = input.readInt(true);\n for (var i = 0, n = skin.bones.length; i < n; i++)\n skin.bones[i] = skeletonData.bones[input.readInt(true)];\n for (var i = 0, n = input.readInt(true); i < n; i++)\n skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\n for (var i = 0, n = input.readInt(true); i < n; i++)\n skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\n for (var i = 0, n = input.readInt(true); i < n; i++)\n skin.constraints.push(skeletonData.pathConstraints[input.readInt(true)]);\n slotCount = input.readInt(true);\n }\n for (var i = 0; i < slotCount; i++) {\n var slotIndex = input.readInt(true);\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n var name_3 = input.readStringRef();\n var attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name_3, nonessential);\n if (attachment != null)\n skin.setAttachment(slotIndex, name_3, attachment);\n }\n }\n return skin;\n };\n SkeletonBinary.prototype.readAttachment = function (input, skeletonData, skin, slotIndex, attachmentName, nonessential) {\n var scale = this.scale;\n var name = input.readStringRef();\n if (name == null)\n name = attachmentName;\n var typeIndex = input.readByte();\n var type = SkeletonBinary.AttachmentTypeValues[typeIndex];\n switch (type) {\n case spine.AttachmentType.Region: {\n var path = input.readStringRef();\n var rotation = input.readFloat();\n var x = input.readFloat();\n var y = input.readFloat();\n var scaleX = input.readFloat();\n var scaleY = input.readFloat();\n var width = input.readFloat();\n var height = input.readFloat();\n var color = input.readInt32();\n if (path == null)\n path = name;\n var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\n if (region == null)\n return null;\n region.path = path;\n region.x = x * scale;\n region.y = y * scale;\n region.scaleX = scaleX;\n region.scaleY = scaleY;\n region.rotation = rotation;\n region.width = width * scale;\n region.height = height * scale;\n spine.Color.rgba8888ToColor(region.color, color);\n region.updateOffset();\n return region;\n }\n case spine.AttachmentType.BoundingBox: {\n var vertexCount = input.readInt(true);\n var vertices = this.readVertices(input, vertexCount);\n var color = nonessential ? input.readInt32() : 0;\n var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\n if (box == null)\n return null;\n box.worldVerticesLength = vertexCount << 1;\n box.vertices = vertices.vertices;\n box.bones = vertices.bones;\n if (nonessential)\n spine.Color.rgba8888ToColor(box.color, color);\n return box;\n }\n case spine.AttachmentType.Mesh: {\n var path = input.readStringRef();\n var color = input.readInt32();\n var vertexCount = input.readInt(true);\n var uvs = this.readFloatArray(input, vertexCount << 1, 1);\n var triangles = this.readShortArray(input);\n var vertices = this.readVertices(input, vertexCount);\n var hullLength = input.readInt(true);\n var edges = null;\n var width = 0, height = 0;\n if (nonessential) {\n edges = this.readShortArray(input);\n width = input.readFloat();\n height = input.readFloat();\n }\n if (path == null)\n path = name;\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\n if (mesh == null)\n return null;\n mesh.path = path;\n spine.Color.rgba8888ToColor(mesh.color, color);\n mesh.bones = vertices.bones;\n mesh.vertices = vertices.vertices;\n mesh.worldVerticesLength = vertexCount << 1;\n mesh.triangles = triangles;\n mesh.regionUVs = uvs;\n mesh.updateUVs();\n mesh.hullLength = hullLength << 1;\n if (nonessential) {\n mesh.edges = edges;\n mesh.width = width * scale;\n mesh.height = height * scale;\n }\n return mesh;\n }\n case spine.AttachmentType.LinkedMesh: {\n var path = input.readStringRef();\n var color = input.readInt32();\n var skinName = input.readStringRef();\n var parent_4 = input.readStringRef();\n var inheritDeform = input.readBoolean();\n var width = 0, height = 0;\n if (nonessential) {\n width = input.readFloat();\n height = input.readFloat();\n }\n if (path == null)\n path = name;\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\n if (mesh == null)\n return null;\n mesh.path = path;\n spine.Color.rgba8888ToColor(mesh.color, color);\n if (nonessential) {\n mesh.width = width * scale;\n mesh.height = height * scale;\n }\n this.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent_4, inheritDeform));\n return mesh;\n }\n case spine.AttachmentType.Path: {\n var closed_1 = input.readBoolean();\n var constantSpeed = input.readBoolean();\n var vertexCount = input.readInt(true);\n var vertices = this.readVertices(input, vertexCount);\n var lengths = spine.Utils.newArray(vertexCount / 3, 0);\n for (var i = 0, n = lengths.length; i < n; i++)\n lengths[i] = input.readFloat() * scale;\n var color = nonessential ? input.readInt32() : 0;\n var path = this.attachmentLoader.newPathAttachment(skin, name);\n if (path == null)\n return null;\n path.closed = closed_1;\n path.constantSpeed = constantSpeed;\n path.worldVerticesLength = vertexCount << 1;\n path.vertices = vertices.vertices;\n path.bones = vertices.bones;\n path.lengths = lengths;\n if (nonessential)\n spine.Color.rgba8888ToColor(path.color, color);\n return path;\n }\n case spine.AttachmentType.Point: {\n var rotation = input.readFloat();\n var x = input.readFloat();\n var y = input.readFloat();\n var color = nonessential ? input.readInt32() : 0;\n var point = this.attachmentLoader.newPointAttachment(skin, name);\n if (point == null)\n return null;\n point.x = x * scale;\n point.y = y * scale;\n point.rotation = rotation;\n if (nonessential)\n spine.Color.rgba8888ToColor(point.color, color);\n return point;\n }\n case spine.AttachmentType.Clipping: {\n var endSlotIndex = input.readInt(true);\n var vertexCount = input.readInt(true);\n var vertices = this.readVertices(input, vertexCount);\n var color = nonessential ? input.readInt32() : 0;\n var clip = this.attachmentLoader.newClippingAttachment(skin, name);\n if (clip == null)\n return null;\n clip.endSlot = skeletonData.slots[endSlotIndex];\n clip.worldVerticesLength = vertexCount << 1;\n clip.vertices = vertices.vertices;\n clip.bones = vertices.bones;\n if (nonessential)\n spine.Color.rgba8888ToColor(clip.color, color);\n return clip;\n }\n }\n return null;\n };\n SkeletonBinary.prototype.readVertices = function (input, vertexCount) {\n var verticesLength = vertexCount << 1;\n var vertices = new Vertices();\n var scale = this.scale;\n if (!input.readBoolean()) {\n vertices.vertices = this.readFloatArray(input, verticesLength, scale);\n return vertices;\n }\n var weights = new Array();\n var bonesArray = new Array();\n for (var i = 0; i < vertexCount; i++) {\n var boneCount = input.readInt(true);\n bonesArray.push(boneCount);\n for (var ii = 0; ii < boneCount; ii++) {\n bonesArray.push(input.readInt(true));\n weights.push(input.readFloat() * scale);\n weights.push(input.readFloat() * scale);\n weights.push(input.readFloat());\n }\n }\n vertices.vertices = spine.Utils.toFloatArray(weights);\n vertices.bones = bonesArray;\n return vertices;\n };\n SkeletonBinary.prototype.readFloatArray = function (input, n, scale) {\n var array = new Array(n);\n if (scale == 1) {\n for (var i = 0; i < n; i++)\n array[i] = input.readFloat();\n }\n else {\n for (var i = 0; i < n; i++)\n array[i] = input.readFloat() * scale;\n }\n return array;\n };\n SkeletonBinary.prototype.readShortArray = function (input) {\n var n = input.readInt(true);\n var array = new Array(n);\n for (var i = 0; i < n; i++)\n array[i] = input.readShort();\n return array;\n };\n SkeletonBinary.prototype.readAnimation = function (input, name, skeletonData) {\n var timelines = new Array();\n var scale = this.scale;\n var duration = 0;\n var tempColor1 = new spine.Color();\n var tempColor2 = new spine.Color();\n for (var i = 0, n = input.readInt(true); i < n; i++) {\n var slotIndex = input.readInt(true);\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n var timelineType = input.readByte();\n var frameCount = input.readInt(true);\n switch (timelineType) {\n case SkeletonBinary.SLOT_ATTACHMENT: {\n var timeline = new spine.AttachmentTimeline(frameCount);\n timeline.slotIndex = slotIndex;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++)\n timeline.setFrame(frameIndex, input.readFloat(), input.readStringRef());\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[frameCount - 1]);\n break;\n }\n case SkeletonBinary.SLOT_COLOR: {\n var timeline = new spine.ColorTimeline(frameCount);\n timeline.slotIndex = slotIndex;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n var time = input.readFloat();\n spine.Color.rgba8888ToColor(tempColor1, input.readInt32());\n timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a);\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.ColorTimeline.ENTRIES]);\n break;\n }\n case SkeletonBinary.SLOT_TWO_COLOR: {\n var timeline = new spine.TwoColorTimeline(frameCount);\n timeline.slotIndex = slotIndex;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n var time = input.readFloat();\n spine.Color.rgba8888ToColor(tempColor1, input.readInt32());\n spine.Color.rgb888ToColor(tempColor2, input.readInt32());\n timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a, tempColor2.r, tempColor2.g, tempColor2.b);\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TwoColorTimeline.ENTRIES]);\n break;\n }\n }\n }\n }\n for (var i = 0, n = input.readInt(true); i < n; i++) {\n var boneIndex = input.readInt(true);\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n var timelineType = input.readByte();\n var frameCount = input.readInt(true);\n switch (timelineType) {\n case SkeletonBinary.BONE_ROTATE: {\n var timeline = new spine.RotateTimeline(frameCount);\n timeline.boneIndex = boneIndex;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat());\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.RotateTimeline.ENTRIES]);\n break;\n }\n case SkeletonBinary.BONE_TRANSLATE:\n case SkeletonBinary.BONE_SCALE:\n case SkeletonBinary.BONE_SHEAR: {\n var timeline = void 0;\n var timelineScale = 1;\n if (timelineType == SkeletonBinary.BONE_SCALE)\n timeline = new spine.ScaleTimeline(frameCount);\n else if (timelineType == SkeletonBinary.BONE_SHEAR)\n timeline = new spine.ShearTimeline(frameCount);\n else {\n timeline = new spine.TranslateTimeline(frameCount);\n timelineScale = scale;\n }\n timeline.boneIndex = boneIndex;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale, input.readFloat() * timelineScale);\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TranslateTimeline.ENTRIES]);\n break;\n }\n }\n }\n }\n for (var i = 0, n = input.readInt(true); i < n; i++) {\n var index = input.readInt(true);\n var frameCount = input.readInt(true);\n var timeline = new spine.IkConstraintTimeline(frameCount);\n timeline.ikConstraintIndex = index;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat() * scale, input.readByte(), input.readBoolean(), input.readBoolean());\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.IkConstraintTimeline.ENTRIES]);\n }\n for (var i = 0, n = input.readInt(true); i < n; i++) {\n var index = input.readInt(true);\n var frameCount = input.readInt(true);\n var timeline = new spine.TransformConstraintTimeline(frameCount);\n timeline.transformConstraintIndex = index;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TransformConstraintTimeline.ENTRIES]);\n }\n for (var i = 0, n = input.readInt(true); i < n; i++) {\n var index = input.readInt(true);\n var data = skeletonData.pathConstraints[index];\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n var timelineType = input.readByte();\n var frameCount = input.readInt(true);\n switch (timelineType) {\n case SkeletonBinary.PATH_POSITION:\n case SkeletonBinary.PATH_SPACING: {\n var timeline = void 0;\n var timelineScale = 1;\n if (timelineType == SkeletonBinary.PATH_SPACING) {\n timeline = new spine.PathConstraintSpacingTimeline(frameCount);\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\n timelineScale = scale;\n }\n else {\n timeline = new spine.PathConstraintPositionTimeline(frameCount);\n if (data.positionMode == spine.PositionMode.Fixed)\n timelineScale = scale;\n }\n timeline.pathConstraintIndex = index;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale);\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\n break;\n }\n case SkeletonBinary.PATH_MIX: {\n var timeline = new spine.PathConstraintMixTimeline(frameCount);\n timeline.pathConstraintIndex = index;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat());\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\n break;\n }\n }\n }\n }\n for (var i = 0, n = input.readInt(true); i < n; i++) {\n var skin = skeletonData.skins[input.readInt(true)];\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n var slotIndex = input.readInt(true);\n for (var iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\n var attachment = skin.getAttachment(slotIndex, input.readStringRef());\n var weighted = attachment.bones != null;\n var vertices = attachment.vertices;\n var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\n var frameCount = input.readInt(true);\n var timeline = new spine.DeformTimeline(frameCount);\n timeline.slotIndex = slotIndex;\n timeline.attachment = attachment;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n var time = input.readFloat();\n var deform = void 0;\n var end = input.readInt(true);\n if (end == 0)\n deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\n else {\n deform = spine.Utils.newFloatArray(deformLength);\n var start = input.readInt(true);\n end += start;\n if (scale == 1) {\n for (var v = start; v < end; v++)\n deform[v] = input.readFloat();\n }\n else {\n for (var v = start; v < end; v++)\n deform[v] = input.readFloat() * scale;\n }\n if (!weighted) {\n for (var v = 0, vn = deform.length; v < vn; v++)\n deform[v] += vertices[v];\n }\n }\n timeline.setFrame(frameIndex, time, deform);\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[frameCount - 1]);\n }\n }\n }\n var drawOrderCount = input.readInt(true);\n if (drawOrderCount > 0) {\n var timeline = new spine.DrawOrderTimeline(drawOrderCount);\n var slotCount = skeletonData.slots.length;\n for (var i = 0; i < drawOrderCount; i++) {\n var time = input.readFloat();\n var offsetCount = input.readInt(true);\n var drawOrder = spine.Utils.newArray(slotCount, 0);\n for (var ii = slotCount - 1; ii >= 0; ii--)\n drawOrder[ii] = -1;\n var unchanged = spine.Utils.newArray(slotCount - offsetCount, 0);\n var originalIndex = 0, unchangedIndex = 0;\n for (var ii = 0; ii < offsetCount; ii++) {\n var slotIndex = input.readInt(true);\n while (originalIndex != slotIndex)\n unchanged[unchangedIndex++] = originalIndex++;\n drawOrder[originalIndex + input.readInt(true)] = originalIndex++;\n }\n while (originalIndex < slotCount)\n unchanged[unchangedIndex++] = originalIndex++;\n for (var ii = slotCount - 1; ii >= 0; ii--)\n if (drawOrder[ii] == -1)\n drawOrder[ii] = unchanged[--unchangedIndex];\n timeline.setFrame(i, time, drawOrder);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[drawOrderCount - 1]);\n }\n var eventCount = input.readInt(true);\n if (eventCount > 0) {\n var timeline = new spine.EventTimeline(eventCount);\n for (var i = 0; i < eventCount; i++) {\n var time = input.readFloat();\n var eventData = skeletonData.events[input.readInt(true)];\n var event_4 = new spine.Event(time, eventData);\n event_4.intValue = input.readInt(false);\n event_4.floatValue = input.readFloat();\n event_4.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\n if (event_4.data.audioPath != null) {\n event_4.volume = input.readFloat();\n event_4.balance = input.readFloat();\n }\n timeline.setFrame(i, event_4);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[eventCount - 1]);\n }\n return new spine.Animation(name, timelines, duration);\n };\n SkeletonBinary.prototype.readCurve = function (input, frameIndex, timeline) {\n switch (input.readByte()) {\n case SkeletonBinary.CURVE_STEPPED:\n timeline.setStepped(frameIndex);\n break;\n case SkeletonBinary.CURVE_BEZIER:\n this.setCurve(timeline, frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\n break;\n }\n };\n SkeletonBinary.prototype.setCurve = function (timeline, frameIndex, cx1, cy1, cx2, cy2) {\n timeline.setCurve(frameIndex, cx1, cy1, cx2, cy2);\n };\n SkeletonBinary.AttachmentTypeValues = [0, 1, 2, 3, 4, 5, 6];\n SkeletonBinary.TransformModeValues = [spine.TransformMode.Normal, spine.TransformMode.OnlyTranslation, spine.TransformMode.NoRotationOrReflection, spine.TransformMode.NoScale, spine.TransformMode.NoScaleOrReflection];\n SkeletonBinary.PositionModeValues = [spine.PositionMode.Fixed, spine.PositionMode.Percent];\n SkeletonBinary.SpacingModeValues = [spine.SpacingMode.Length, spine.SpacingMode.Fixed, spine.SpacingMode.Percent];\n SkeletonBinary.RotateModeValues = [spine.RotateMode.Tangent, spine.RotateMode.Chain, spine.RotateMode.ChainScale];\n SkeletonBinary.BlendModeValues = [spine.BlendMode.Normal, spine.BlendMode.Additive, spine.BlendMode.Multiply, spine.BlendMode.Screen];\n SkeletonBinary.BONE_ROTATE = 0;\n SkeletonBinary.BONE_TRANSLATE = 1;\n SkeletonBinary.BONE_SCALE = 2;\n SkeletonBinary.BONE_SHEAR = 3;\n SkeletonBinary.SLOT_ATTACHMENT = 0;\n SkeletonBinary.SLOT_COLOR = 1;\n SkeletonBinary.SLOT_TWO_COLOR = 2;\n SkeletonBinary.PATH_POSITION = 0;\n SkeletonBinary.PATH_SPACING = 1;\n SkeletonBinary.PATH_MIX = 2;\n SkeletonBinary.CURVE_LINEAR = 0;\n SkeletonBinary.CURVE_STEPPED = 1;\n SkeletonBinary.CURVE_BEZIER = 2;\n return SkeletonBinary;\n }());\n spine.SkeletonBinary = SkeletonBinary;\n var BinaryInput = (function () {\n function BinaryInput(data, strings, index, buffer) {\n if (strings === void 0) { strings = new Array(); }\n if (index === void 0) { index = 0; }\n if (buffer === void 0) { buffer = new DataView(data.buffer); }\n this.strings = strings;\n this.index = index;\n this.buffer = buffer;\n }\n BinaryInput.prototype.readByte = function () {\n return this.buffer.getInt8(this.index++);\n };\n BinaryInput.prototype.readShort = function () {\n var value = this.buffer.getInt16(this.index);\n this.index += 2;\n return value;\n };\n BinaryInput.prototype.readInt32 = function () {\n var value = this.buffer.getInt32(this.index);\n this.index += 4;\n return value;\n };\n BinaryInput.prototype.readInt = function (optimizePositive) {\n var b = this.readByte();\n var result = b & 0x7F;\n if ((b & 0x80) != 0) {\n b = this.readByte();\n result |= (b & 0x7F) << 7;\n if ((b & 0x80) != 0) {\n b = this.readByte();\n result |= (b & 0x7F) << 14;\n if ((b & 0x80) != 0) {\n b = this.readByte();\n result |= (b & 0x7F) << 21;\n if ((b & 0x80) != 0) {\n b = this.readByte();\n result |= (b & 0x7F) << 28;\n }\n }\n }\n }\n return optimizePositive ? result : ((result >>> 1) ^ -(result & 1));\n };\n BinaryInput.prototype.readStringRef = function () {\n var index = this.readInt(true);\n return index == 0 ? null : this.strings[index - 1];\n };\n BinaryInput.prototype.readString = function () {\n var byteCount = this.readInt(true);\n switch (byteCount) {\n case 0:\n return null;\n case 1:\n return \"\";\n }\n byteCount--;\n var chars = \"\";\n var charCount = 0;\n for (var i = 0; i < byteCount;) {\n var b = this.readByte();\n switch (b >> 4) {\n case 12:\n case 13:\n chars += String.fromCharCode(((b & 0x1F) << 6 | this.readByte() & 0x3F));\n i += 2;\n break;\n case 14:\n chars += String.fromCharCode(((b & 0x0F) << 12 | (this.readByte() & 0x3F) << 6 | this.readByte() & 0x3F));\n i += 3;\n break;\n default:\n chars += String.fromCharCode(b);\n i++;\n }\n }\n return chars;\n };\n BinaryInput.prototype.readFloat = function () {\n var value = this.buffer.getFloat32(this.index);\n this.index += 4;\n return value;\n };\n BinaryInput.prototype.readBoolean = function () {\n return this.readByte() != 0;\n };\n return BinaryInput;\n }());\n var LinkedMesh = (function () {\n function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\n this.mesh = mesh;\n this.skin = skin;\n this.slotIndex = slotIndex;\n this.parent = parent;\n this.inheritDeform = inheritDeform;\n }\n return LinkedMesh;\n }());\n var Vertices = (function () {\n function Vertices(bones, vertices) {\n if (bones === void 0) { bones = null; }\n if (vertices === void 0) { vertices = null; }\n this.bones = bones;\n this.vertices = vertices;\n }\n return Vertices;\n }());\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SkeletonBounds = (function () {\n function SkeletonBounds() {\n this.minX = 0;\n this.minY = 0;\n this.maxX = 0;\n this.maxY = 0;\n this.boundingBoxes = new Array();\n this.polygons = new Array();\n this.polygonPool = new spine.Pool(function () {\n return spine.Utils.newFloatArray(16);\n });\n }\n SkeletonBounds.prototype.update = function (skeleton, updateAabb) {\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n var boundingBoxes = this.boundingBoxes;\n var polygons = this.polygons;\n var polygonPool = this.polygonPool;\n var slots = skeleton.slots;\n var slotCount = slots.length;\n boundingBoxes.length = 0;\n polygonPool.freeAll(polygons);\n polygons.length = 0;\n for (var i = 0; i < slotCount; i++) {\n var slot = slots[i];\n if (!slot.bone.active)\n continue;\n var attachment = slot.getAttachment();\n if (attachment instanceof spine.BoundingBoxAttachment) {\n var boundingBox = attachment;\n boundingBoxes.push(boundingBox);\n var polygon = polygonPool.obtain();\n if (polygon.length != boundingBox.worldVerticesLength) {\n polygon = spine.Utils.newFloatArray(boundingBox.worldVerticesLength);\n }\n polygons.push(polygon);\n boundingBox.computeWorldVertices(slot, 0, boundingBox.worldVerticesLength, polygon, 0, 2);\n }\n }\n if (updateAabb) {\n this.aabbCompute();\n }\n else {\n this.minX = Number.POSITIVE_INFINITY;\n this.minY = Number.POSITIVE_INFINITY;\n this.maxX = Number.NEGATIVE_INFINITY;\n this.maxY = Number.NEGATIVE_INFINITY;\n }\n };\n SkeletonBounds.prototype.aabbCompute = function () {\n var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\n var polygons = this.polygons;\n for (var i = 0, n = polygons.length; i < n; i++) {\n var polygon = polygons[i];\n var vertices = polygon;\n for (var ii = 0, nn = polygon.length; ii < nn; ii += 2) {\n var x = vertices[ii];\n var y = vertices[ii + 1];\n minX = Math.min(minX, x);\n minY = Math.min(minY, y);\n maxX = Math.max(maxX, x);\n maxY = Math.max(maxY, y);\n }\n }\n this.minX = minX;\n this.minY = minY;\n this.maxX = maxX;\n this.maxY = maxY;\n };\n SkeletonBounds.prototype.aabbContainsPoint = function (x, y) {\n return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\n };\n SkeletonBounds.prototype.aabbIntersectsSegment = function (x1, y1, x2, y2) {\n var minX = this.minX;\n var minY = this.minY;\n var maxX = this.maxX;\n var maxY = this.maxY;\n if ((x1 <= minX && x2 <= minX) || (y1 <= minY && y2 <= minY) || (x1 >= maxX && x2 >= maxX) || (y1 >= maxY && y2 >= maxY))\n return false;\n var m = (y2 - y1) / (x2 - x1);\n var y = m * (minX - x1) + y1;\n if (y > minY && y < maxY)\n return true;\n y = m * (maxX - x1) + y1;\n if (y > minY && y < maxY)\n return true;\n var x = (minY - y1) / m + x1;\n if (x > minX && x < maxX)\n return true;\n x = (maxY - y1) / m + x1;\n if (x > minX && x < maxX)\n return true;\n return false;\n };\n SkeletonBounds.prototype.aabbIntersectsSkeleton = function (bounds) {\n return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\n };\n SkeletonBounds.prototype.containsPoint = function (x, y) {\n var polygons = this.polygons;\n for (var i = 0, n = polygons.length; i < n; i++)\n if (this.containsPointPolygon(polygons[i], x, y))\n return this.boundingBoxes[i];\n return null;\n };\n SkeletonBounds.prototype.containsPointPolygon = function (polygon, x, y) {\n var vertices = polygon;\n var nn = polygon.length;\n var prevIndex = nn - 2;\n var inside = false;\n for (var ii = 0; ii < nn; ii += 2) {\n var vertexY = vertices[ii + 1];\n var prevY = vertices[prevIndex + 1];\n if ((vertexY < y && prevY >= y) || (prevY < y && vertexY >= y)) {\n var vertexX = vertices[ii];\n if (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x)\n inside = !inside;\n }\n prevIndex = ii;\n }\n return inside;\n };\n SkeletonBounds.prototype.intersectsSegment = function (x1, y1, x2, y2) {\n var polygons = this.polygons;\n for (var i = 0, n = polygons.length; i < n; i++)\n if (this.intersectsSegmentPolygon(polygons[i], x1, y1, x2, y2))\n return this.boundingBoxes[i];\n return null;\n };\n SkeletonBounds.prototype.intersectsSegmentPolygon = function (polygon, x1, y1, x2, y2) {\n var vertices = polygon;\n var nn = polygon.length;\n var width12 = x1 - x2, height12 = y1 - y2;\n var det1 = x1 * y2 - y1 * x2;\n var x3 = vertices[nn - 2], y3 = vertices[nn - 1];\n for (var ii = 0; ii < nn; ii += 2) {\n var x4 = vertices[ii], y4 = vertices[ii + 1];\n var det2 = x3 * y4 - y3 * x4;\n var width34 = x3 - x4, height34 = y3 - y4;\n var det3 = width12 * height34 - height12 * width34;\n var x = (det1 * width34 - width12 * det2) / det3;\n if (((x >= x3 && x <= x4) || (x >= x4 && x <= x3)) && ((x >= x1 && x <= x2) || (x >= x2 && x <= x1))) {\n var y = (det1 * height34 - height12 * det2) / det3;\n if (((y >= y3 && y <= y4) || (y >= y4 && y <= y3)) && ((y >= y1 && y <= y2) || (y >= y2 && y <= y1)))\n return true;\n }\n x3 = x4;\n y3 = y4;\n }\n return false;\n };\n SkeletonBounds.prototype.getPolygon = function (boundingBox) {\n if (boundingBox == null)\n throw new Error(\"boundingBox cannot be null.\");\n var index = this.boundingBoxes.indexOf(boundingBox);\n return index == -1 ? null : this.polygons[index];\n };\n SkeletonBounds.prototype.getWidth = function () {\n return this.maxX - this.minX;\n };\n SkeletonBounds.prototype.getHeight = function () {\n return this.maxY - this.minY;\n };\n return SkeletonBounds;\n }());\n spine.SkeletonBounds = SkeletonBounds;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SkeletonClipping = (function () {\n function SkeletonClipping() {\n this.triangulator = new spine.Triangulator();\n this.clippingPolygon = new Array();\n this.clipOutput = new Array();\n this.clippedVertices = new Array();\n this.clippedTriangles = new Array();\n this.scratch = new Array();\n }\n SkeletonClipping.prototype.clipStart = function (slot, clip) {\n if (this.clipAttachment != null)\n return 0;\n this.clipAttachment = clip;\n var n = clip.worldVerticesLength;\n var vertices = spine.Utils.setArraySize(this.clippingPolygon, n);\n clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\n var clippingPolygon = this.clippingPolygon;\n SkeletonClipping.makeClockwise(clippingPolygon);\n var clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon));\n for (var i = 0, n_2 = clippingPolygons.length; i < n_2; i++) {\n var polygon = clippingPolygons[i];\n SkeletonClipping.makeClockwise(polygon);\n polygon.push(polygon[0]);\n polygon.push(polygon[1]);\n }\n return clippingPolygons.length;\n };\n SkeletonClipping.prototype.clipEndWithSlot = function (slot) {\n if (this.clipAttachment != null && this.clipAttachment.endSlot == slot.data)\n this.clipEnd();\n };\n SkeletonClipping.prototype.clipEnd = function () {\n if (this.clipAttachment == null)\n return;\n this.clipAttachment = null;\n this.clippingPolygons = null;\n this.clippedVertices.length = 0;\n this.clippedTriangles.length = 0;\n this.clippingPolygon.length = 0;\n };\n SkeletonClipping.prototype.isClipping = function () {\n return this.clipAttachment != null;\n };\n SkeletonClipping.prototype.clipTriangles = function (vertices, verticesLength, triangles, trianglesLength, uvs, light, dark, twoColor) {\n var clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;\n var clippedTriangles = this.clippedTriangles;\n var polygons = this.clippingPolygons;\n var polygonsCount = this.clippingPolygons.length;\n var vertexSize = twoColor ? 12 : 8;\n var index = 0;\n clippedVertices.length = 0;\n clippedTriangles.length = 0;\n outer: for (var i = 0; i < trianglesLength; i += 3) {\n var vertexOffset = triangles[i] << 1;\n var x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\n var u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];\n vertexOffset = triangles[i + 1] << 1;\n var x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\n var u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];\n vertexOffset = triangles[i + 2] << 1;\n var x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\n var u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];\n for (var p = 0; p < polygonsCount; p++) {\n var s = clippedVertices.length;\n if (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) {\n var clipOutputLength = clipOutput.length;\n if (clipOutputLength == 0)\n continue;\n var d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\n var d = 1 / (d0 * d2 + d1 * (y1 - y3));\n var clipOutputCount = clipOutputLength >> 1;\n var clipOutputItems = this.clipOutput;\n var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);\n for (var ii = 0; ii < clipOutputLength; ii += 2) {\n var x = clipOutputItems[ii], y = clipOutputItems[ii + 1];\n clippedVerticesItems[s] = x;\n clippedVerticesItems[s + 1] = y;\n clippedVerticesItems[s + 2] = light.r;\n clippedVerticesItems[s + 3] = light.g;\n clippedVerticesItems[s + 4] = light.b;\n clippedVerticesItems[s + 5] = light.a;\n var c0 = x - x3, c1 = y - y3;\n var a = (d0 * c0 + d1 * c1) * d;\n var b = (d4 * c0 + d2 * c1) * d;\n var c = 1 - a - b;\n clippedVerticesItems[s + 6] = u1 * a + u2 * b + u3 * c;\n clippedVerticesItems[s + 7] = v1 * a + v2 * b + v3 * c;\n if (twoColor) {\n clippedVerticesItems[s + 8] = dark.r;\n clippedVerticesItems[s + 9] = dark.g;\n clippedVerticesItems[s + 10] = dark.b;\n clippedVerticesItems[s + 11] = dark.a;\n }\n s += vertexSize;\n }\n s = clippedTriangles.length;\n var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));\n clipOutputCount--;\n for (var ii = 1; ii < clipOutputCount; ii++) {\n clippedTrianglesItems[s] = index;\n clippedTrianglesItems[s + 1] = (index + ii);\n clippedTrianglesItems[s + 2] = (index + ii + 1);\n s += 3;\n }\n index += clipOutputCount + 1;\n }\n else {\n var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + 3 * vertexSize);\n clippedVerticesItems[s] = x1;\n clippedVerticesItems[s + 1] = y1;\n clippedVerticesItems[s + 2] = light.r;\n clippedVerticesItems[s + 3] = light.g;\n clippedVerticesItems[s + 4] = light.b;\n clippedVerticesItems[s + 5] = light.a;\n if (!twoColor) {\n clippedVerticesItems[s + 6] = u1;\n clippedVerticesItems[s + 7] = v1;\n clippedVerticesItems[s + 8] = x2;\n clippedVerticesItems[s + 9] = y2;\n clippedVerticesItems[s + 10] = light.r;\n clippedVerticesItems[s + 11] = light.g;\n clippedVerticesItems[s + 12] = light.b;\n clippedVerticesItems[s + 13] = light.a;\n clippedVerticesItems[s + 14] = u2;\n clippedVerticesItems[s + 15] = v2;\n clippedVerticesItems[s + 16] = x3;\n clippedVerticesItems[s + 17] = y3;\n clippedVerticesItems[s + 18] = light.r;\n clippedVerticesItems[s + 19] = light.g;\n clippedVerticesItems[s + 20] = light.b;\n clippedVerticesItems[s + 21] = light.a;\n clippedVerticesItems[s + 22] = u3;\n clippedVerticesItems[s + 23] = v3;\n }\n else {\n clippedVerticesItems[s + 6] = u1;\n clippedVerticesItems[s + 7] = v1;\n clippedVerticesItems[s + 8] = dark.r;\n clippedVerticesItems[s + 9] = dark.g;\n clippedVerticesItems[s + 10] = dark.b;\n clippedVerticesItems[s + 11] = dark.a;\n clippedVerticesItems[s + 12] = x2;\n clippedVerticesItems[s + 13] = y2;\n clippedVerticesItems[s + 14] = light.r;\n clippedVerticesItems[s + 15] = light.g;\n clippedVerticesItems[s + 16] = light.b;\n clippedVerticesItems[s + 17] = light.a;\n clippedVerticesItems[s + 18] = u2;\n clippedVerticesItems[s + 19] = v2;\n clippedVerticesItems[s + 20] = dark.r;\n clippedVerticesItems[s + 21] = dark.g;\n clippedVerticesItems[s + 22] = dark.b;\n clippedVerticesItems[s + 23] = dark.a;\n clippedVerticesItems[s + 24] = x3;\n clippedVerticesItems[s + 25] = y3;\n clippedVerticesItems[s + 26] = light.r;\n clippedVerticesItems[s + 27] = light.g;\n clippedVerticesItems[s + 28] = light.b;\n clippedVerticesItems[s + 29] = light.a;\n clippedVerticesItems[s + 30] = u3;\n clippedVerticesItems[s + 31] = v3;\n clippedVerticesItems[s + 32] = dark.r;\n clippedVerticesItems[s + 33] = dark.g;\n clippedVerticesItems[s + 34] = dark.b;\n clippedVerticesItems[s + 35] = dark.a;\n }\n s = clippedTriangles.length;\n var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3);\n clippedTrianglesItems[s] = index;\n clippedTrianglesItems[s + 1] = (index + 1);\n clippedTrianglesItems[s + 2] = (index + 2);\n index += 3;\n continue outer;\n }\n }\n }\n };\n SkeletonClipping.prototype.clip = function (x1, y1, x2, y2, x3, y3, clippingArea, output) {\n var originalOutput = output;\n var clipped = false;\n var input = null;\n if (clippingArea.length % 4 >= 2) {\n input = output;\n output = this.scratch;\n }\n else\n input = this.scratch;\n input.length = 0;\n input.push(x1);\n input.push(y1);\n input.push(x2);\n input.push(y2);\n input.push(x3);\n input.push(y3);\n input.push(x1);\n input.push(y1);\n output.length = 0;\n var clippingVertices = clippingArea;\n var clippingVerticesLast = clippingArea.length - 4;\n for (var i = 0;; i += 2) {\n var edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\n var edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];\n var deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;\n var inputVertices = input;\n var inputVerticesLength = input.length - 2, outputStart = output.length;\n for (var ii = 0; ii < inputVerticesLength; ii += 2) {\n var inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\n var inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];\n var side2 = deltaX * (inputY2 - edgeY2) - deltaY * (inputX2 - edgeX2) > 0;\n if (deltaX * (inputY - edgeY2) - deltaY * (inputX - edgeX2) > 0) {\n if (side2) {\n output.push(inputX2);\n output.push(inputY2);\n continue;\n }\n var c0 = inputY2 - inputY, c2 = inputX2 - inputX;\n var s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\n if (Math.abs(s) > 0.000001) {\n var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\n output.push(edgeX + (edgeX2 - edgeX) * ua);\n output.push(edgeY + (edgeY2 - edgeY) * ua);\n }\n else {\n output.push(edgeX);\n output.push(edgeY);\n }\n }\n else if (side2) {\n var c0 = inputY2 - inputY, c2 = inputX2 - inputX;\n var s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\n if (Math.abs(s) > 0.000001) {\n var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\n output.push(edgeX + (edgeX2 - edgeX) * ua);\n output.push(edgeY + (edgeY2 - edgeY) * ua);\n }\n else {\n output.push(edgeX);\n output.push(edgeY);\n }\n output.push(inputX2);\n output.push(inputY2);\n }\n clipped = true;\n }\n if (outputStart == output.length) {\n originalOutput.length = 0;\n return true;\n }\n output.push(output[0]);\n output.push(output[1]);\n if (i == clippingVerticesLast)\n break;\n var temp = output;\n output = input;\n output.length = 0;\n input = temp;\n }\n if (originalOutput != output) {\n originalOutput.length = 0;\n for (var i = 0, n = output.length - 2; i < n; i++)\n originalOutput[i] = output[i];\n }\n else\n originalOutput.length = originalOutput.length - 2;\n return clipped;\n };\n SkeletonClipping.makeClockwise = function (polygon) {\n var vertices = polygon;\n var verticeslength = polygon.length;\n var area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0;\n for (var i = 0, n = verticeslength - 3; i < n; i += 2) {\n p1x = vertices[i];\n p1y = vertices[i + 1];\n p2x = vertices[i + 2];\n p2y = vertices[i + 3];\n area += p1x * p2y - p2x * p1y;\n }\n if (area < 0)\n return;\n for (var i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\n var x = vertices[i], y = vertices[i + 1];\n var other = lastX - i;\n vertices[i] = vertices[other];\n vertices[i + 1] = vertices[other + 1];\n vertices[other] = x;\n vertices[other + 1] = y;\n }\n };\n return SkeletonClipping;\n }());\n spine.SkeletonClipping = SkeletonClipping;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SkeletonData = (function () {\n function SkeletonData() {\n this.bones = new Array();\n this.slots = new Array();\n this.skins = new Array();\n this.events = new Array();\n this.animations = new Array();\n this.ikConstraints = new Array();\n this.transformConstraints = new Array();\n this.pathConstraints = new Array();\n this.fps = 0;\n }\n SkeletonData.prototype.findBone = function (boneName) {\n if (boneName == null)\n throw new Error(\"boneName cannot be null.\");\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n if (bone.name == boneName)\n return bone;\n }\n return null;\n };\n SkeletonData.prototype.findBoneIndex = function (boneName) {\n if (boneName == null)\n throw new Error(\"boneName cannot be null.\");\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++)\n if (bones[i].name == boneName)\n return i;\n return -1;\n };\n SkeletonData.prototype.findSlot = function (slotName) {\n if (slotName == null)\n throw new Error(\"slotName cannot be null.\");\n var slots = this.slots;\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n if (slot.name == slotName)\n return slot;\n }\n return null;\n };\n SkeletonData.prototype.findSlotIndex = function (slotName) {\n if (slotName == null)\n throw new Error(\"slotName cannot be null.\");\n var slots = this.slots;\n for (var i = 0, n = slots.length; i < n; i++)\n if (slots[i].name == slotName)\n return i;\n return -1;\n };\n SkeletonData.prototype.findSkin = function (skinName) {\n if (skinName == null)\n throw new Error(\"skinName cannot be null.\");\n var skins = this.skins;\n for (var i = 0, n = skins.length; i < n; i++) {\n var skin = skins[i];\n if (skin.name == skinName)\n return skin;\n }\n return null;\n };\n SkeletonData.prototype.findEvent = function (eventDataName) {\n if (eventDataName == null)\n throw new Error(\"eventDataName cannot be null.\");\n var events = this.events;\n for (var i = 0, n = events.length; i < n; i++) {\n var event_5 = events[i];\n if (event_5.name == eventDataName)\n return event_5;\n }\n return null;\n };\n SkeletonData.prototype.findAnimation = function (animationName) {\n if (animationName == null)\n throw new Error(\"animationName cannot be null.\");\n var animations = this.animations;\n for (var i = 0, n = animations.length; i < n; i++) {\n var animation = animations[i];\n if (animation.name == animationName)\n return animation;\n }\n return null;\n };\n SkeletonData.prototype.findIkConstraint = function (constraintName) {\n if (constraintName == null)\n throw new Error(\"constraintName cannot be null.\");\n var ikConstraints = this.ikConstraints;\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\n var constraint = ikConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n };\n SkeletonData.prototype.findTransformConstraint = function (constraintName) {\n if (constraintName == null)\n throw new Error(\"constraintName cannot be null.\");\n var transformConstraints = this.transformConstraints;\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\n var constraint = transformConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n };\n SkeletonData.prototype.findPathConstraint = function (constraintName) {\n if (constraintName == null)\n throw new Error(\"constraintName cannot be null.\");\n var pathConstraints = this.pathConstraints;\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\n var constraint = pathConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n };\n SkeletonData.prototype.findPathConstraintIndex = function (pathConstraintName) {\n if (pathConstraintName == null)\n throw new Error(\"pathConstraintName cannot be null.\");\n var pathConstraints = this.pathConstraints;\n for (var i = 0, n = pathConstraints.length; i < n; i++)\n if (pathConstraints[i].name == pathConstraintName)\n return i;\n return -1;\n };\n return SkeletonData;\n }());\n spine.SkeletonData = SkeletonData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SkeletonJson = (function () {\n function SkeletonJson(attachmentLoader) {\n this.scale = 1;\n this.linkedMeshes = new Array();\n this.attachmentLoader = attachmentLoader;\n }\n SkeletonJson.prototype.readSkeletonData = function (json) {\n var scale = this.scale;\n var skeletonData = new spine.SkeletonData();\n var root = typeof (json) === \"string\" ? JSON.parse(json) : json;\n var skeletonMap = root.skeleton;\n if (skeletonMap != null) {\n skeletonData.hash = skeletonMap.hash;\n skeletonData.version = skeletonMap.spine;\n if (\"3.8.75\" == skeletonData.version)\n throw new Error(\"Unsupported skeleton data, please export with a newer version of Spine.\");\n skeletonData.x = skeletonMap.x;\n skeletonData.y = skeletonMap.y;\n skeletonData.width = skeletonMap.width;\n skeletonData.height = skeletonMap.height;\n skeletonData.fps = skeletonMap.fps;\n skeletonData.imagesPath = skeletonMap.images;\n }\n if (root.bones) {\n for (var i = 0; i < root.bones.length; i++) {\n var boneMap = root.bones[i];\n var parent_5 = null;\n var parentName = this.getValue(boneMap, \"parent\", null);\n if (parentName != null) {\n parent_5 = skeletonData.findBone(parentName);\n if (parent_5 == null)\n throw new Error(\"Parent bone not found: \" + parentName);\n }\n var data = new spine.BoneData(skeletonData.bones.length, boneMap.name, parent_5);\n data.length = this.getValue(boneMap, \"length\", 0) * scale;\n data.x = this.getValue(boneMap, \"x\", 0) * scale;\n data.y = this.getValue(boneMap, \"y\", 0) * scale;\n data.rotation = this.getValue(boneMap, \"rotation\", 0);\n data.scaleX = this.getValue(boneMap, \"scaleX\", 1);\n data.scaleY = this.getValue(boneMap, \"scaleY\", 1);\n data.shearX = this.getValue(boneMap, \"shearX\", 0);\n data.shearY = this.getValue(boneMap, \"shearY\", 0);\n data.transformMode = SkeletonJson.transformModeFromString(this.getValue(boneMap, \"transform\", \"normal\"));\n data.skinRequired = this.getValue(boneMap, \"skin\", false);\n skeletonData.bones.push(data);\n }\n }\n if (root.slots) {\n for (var i = 0; i < root.slots.length; i++) {\n var slotMap = root.slots[i];\n var slotName = slotMap.name;\n var boneName = slotMap.bone;\n var boneData = skeletonData.findBone(boneName);\n if (boneData == null)\n throw new Error(\"Slot bone not found: \" + boneName);\n var data = new spine.SlotData(skeletonData.slots.length, slotName, boneData);\n var color = this.getValue(slotMap, \"color\", null);\n if (color != null)\n data.color.setFromString(color);\n var dark = this.getValue(slotMap, \"dark\", null);\n if (dark != null) {\n data.darkColor = new spine.Color(1, 1, 1, 1);\n data.darkColor.setFromString(dark);\n }\n data.attachmentName = this.getValue(slotMap, \"attachment\", null);\n data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, \"blend\", \"normal\"));\n skeletonData.slots.push(data);\n }\n }\n if (root.ik) {\n for (var i = 0; i < root.ik.length; i++) {\n var constraintMap = root.ik[i];\n var data = new spine.IkConstraintData(constraintMap.name);\n data.order = this.getValue(constraintMap, \"order\", 0);\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\n for (var j = 0; j < constraintMap.bones.length; j++) {\n var boneName = constraintMap.bones[j];\n var bone = skeletonData.findBone(boneName);\n if (bone == null)\n throw new Error(\"IK bone not found: \" + boneName);\n data.bones.push(bone);\n }\n var targetName = constraintMap.target;\n data.target = skeletonData.findBone(targetName);\n if (data.target == null)\n throw new Error(\"IK target bone not found: \" + targetName);\n data.mix = this.getValue(constraintMap, \"mix\", 1);\n data.softness = this.getValue(constraintMap, \"softness\", 0) * scale;\n data.bendDirection = this.getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\n data.compress = this.getValue(constraintMap, \"compress\", false);\n data.stretch = this.getValue(constraintMap, \"stretch\", false);\n data.uniform = this.getValue(constraintMap, \"uniform\", false);\n skeletonData.ikConstraints.push(data);\n }\n }\n if (root.transform) {\n for (var i = 0; i < root.transform.length; i++) {\n var constraintMap = root.transform[i];\n var data = new spine.TransformConstraintData(constraintMap.name);\n data.order = this.getValue(constraintMap, \"order\", 0);\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\n for (var j = 0; j < constraintMap.bones.length; j++) {\n var boneName = constraintMap.bones[j];\n var bone = skeletonData.findBone(boneName);\n if (bone == null)\n throw new Error(\"Transform constraint bone not found: \" + boneName);\n data.bones.push(bone);\n }\n var targetName = constraintMap.target;\n data.target = skeletonData.findBone(targetName);\n if (data.target == null)\n throw new Error(\"Transform constraint target bone not found: \" + targetName);\n data.local = this.getValue(constraintMap, \"local\", false);\n data.relative = this.getValue(constraintMap, \"relative\", false);\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\n data.offsetX = this.getValue(constraintMap, \"x\", 0) * scale;\n data.offsetY = this.getValue(constraintMap, \"y\", 0) * scale;\n data.offsetScaleX = this.getValue(constraintMap, \"scaleX\", 0);\n data.offsetScaleY = this.getValue(constraintMap, \"scaleY\", 0);\n data.offsetShearY = this.getValue(constraintMap, \"shearY\", 0);\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\n data.scaleMix = this.getValue(constraintMap, \"scaleMix\", 1);\n data.shearMix = this.getValue(constraintMap, \"shearMix\", 1);\n skeletonData.transformConstraints.push(data);\n }\n }\n if (root.path) {\n for (var i = 0; i < root.path.length; i++) {\n var constraintMap = root.path[i];\n var data = new spine.PathConstraintData(constraintMap.name);\n data.order = this.getValue(constraintMap, \"order\", 0);\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\n for (var j = 0; j < constraintMap.bones.length; j++) {\n var boneName = constraintMap.bones[j];\n var bone = skeletonData.findBone(boneName);\n if (bone == null)\n throw new Error(\"Transform constraint bone not found: \" + boneName);\n data.bones.push(bone);\n }\n var targetName = constraintMap.target;\n data.target = skeletonData.findSlot(targetName);\n if (data.target == null)\n throw new Error(\"Path target slot not found: \" + targetName);\n data.positionMode = SkeletonJson.positionModeFromString(this.getValue(constraintMap, \"positionMode\", \"percent\"));\n data.spacingMode = SkeletonJson.spacingModeFromString(this.getValue(constraintMap, \"spacingMode\", \"length\"));\n data.rotateMode = SkeletonJson.rotateModeFromString(this.getValue(constraintMap, \"rotateMode\", \"tangent\"));\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\n data.position = this.getValue(constraintMap, \"position\", 0);\n if (data.positionMode == spine.PositionMode.Fixed)\n data.position *= scale;\n data.spacing = this.getValue(constraintMap, \"spacing\", 0);\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\n data.spacing *= scale;\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\n skeletonData.pathConstraints.push(data);\n }\n }\n if (root.skins) {\n for (var i = 0; i < root.skins.length; i++) {\n var skinMap = root.skins[i];\n var skin = new spine.Skin(skinMap.name);\n if (skinMap.bones) {\n for (var ii = 0; ii < skinMap.bones.length; ii++) {\n var bone = skeletonData.findBone(skinMap.bones[ii]);\n if (bone == null)\n throw new Error(\"Skin bone not found: \" + skinMap.bones[i]);\n skin.bones.push(bone);\n }\n }\n if (skinMap.ik) {\n for (var ii = 0; ii < skinMap.ik.length; ii++) {\n var constraint = skeletonData.findIkConstraint(skinMap.ik[ii]);\n if (constraint == null)\n throw new Error(\"Skin IK constraint not found: \" + skinMap.ik[i]);\n skin.constraints.push(constraint);\n }\n }\n if (skinMap.transform) {\n for (var ii = 0; ii < skinMap.transform.length; ii++) {\n var constraint = skeletonData.findTransformConstraint(skinMap.transform[ii]);\n if (constraint == null)\n throw new Error(\"Skin transform constraint not found: \" + skinMap.transform[i]);\n skin.constraints.push(constraint);\n }\n }\n if (skinMap.path) {\n for (var ii = 0; ii < skinMap.path.length; ii++) {\n var constraint = skeletonData.findPathConstraint(skinMap.path[ii]);\n if (constraint == null)\n throw new Error(\"Skin path constraint not found: \" + skinMap.path[i]);\n skin.constraints.push(constraint);\n }\n }\n for (var slotName in skinMap.attachments) {\n var slot = skeletonData.findSlot(slotName);\n if (slot == null)\n throw new Error(\"Slot not found: \" + slotName);\n var slotMap = skinMap.attachments[slotName];\n for (var entryName in slotMap) {\n var attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\n if (attachment != null)\n skin.setAttachment(slot.index, entryName, attachment);\n }\n }\n skeletonData.skins.push(skin);\n if (skin.name == \"default\")\n skeletonData.defaultSkin = skin;\n }\n }\n for (var i = 0, n = this.linkedMeshes.length; i < n; i++) {\n var linkedMesh = this.linkedMeshes[i];\n var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\n if (skin == null)\n throw new Error(\"Skin not found: \" + linkedMesh.skin);\n var parent_6 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\n if (parent_6 == null)\n throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_6 : linkedMesh.mesh;\n linkedMesh.mesh.setParentMesh(parent_6);\n linkedMesh.mesh.updateUVs();\n }\n this.linkedMeshes.length = 0;\n if (root.events) {\n for (var eventName in root.events) {\n var eventMap = root.events[eventName];\n var data = new spine.EventData(eventName);\n data.intValue = this.getValue(eventMap, \"int\", 0);\n data.floatValue = this.getValue(eventMap, \"float\", 0);\n data.stringValue = this.getValue(eventMap, \"string\", \"\");\n data.audioPath = this.getValue(eventMap, \"audio\", null);\n if (data.audioPath != null) {\n data.volume = this.getValue(eventMap, \"volume\", 1);\n data.balance = this.getValue(eventMap, \"balance\", 0);\n }\n skeletonData.events.push(data);\n }\n }\n if (root.animations) {\n for (var animationName in root.animations) {\n var animationMap = root.animations[animationName];\n this.readAnimation(animationMap, animationName, skeletonData);\n }\n }\n return skeletonData;\n };\n SkeletonJson.prototype.readAttachment = function (map, skin, slotIndex, name, skeletonData) {\n var scale = this.scale;\n name = this.getValue(map, \"name\", name);\n var type = this.getValue(map, \"type\", \"region\");\n switch (type) {\n case \"region\": {\n var path = this.getValue(map, \"path\", name);\n var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\n if (region == null)\n return null;\n region.path = path;\n region.x = this.getValue(map, \"x\", 0) * scale;\n region.y = this.getValue(map, \"y\", 0) * scale;\n region.scaleX = this.getValue(map, \"scaleX\", 1);\n region.scaleY = this.getValue(map, \"scaleY\", 1);\n region.rotation = this.getValue(map, \"rotation\", 0);\n region.width = map.width * scale;\n region.height = map.height * scale;\n var color = this.getValue(map, \"color\", null);\n if (color != null)\n region.color.setFromString(color);\n region.updateOffset();\n return region;\n }\n case \"boundingbox\": {\n var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\n if (box == null)\n return null;\n this.readVertices(map, box, map.vertexCount << 1);\n var color = this.getValue(map, \"color\", null);\n if (color != null)\n box.color.setFromString(color);\n return box;\n }\n case \"mesh\":\n case \"linkedmesh\": {\n var path = this.getValue(map, \"path\", name);\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\n if (mesh == null)\n return null;\n mesh.path = path;\n var color = this.getValue(map, \"color\", null);\n if (color != null)\n mesh.color.setFromString(color);\n mesh.width = this.getValue(map, \"width\", 0) * scale;\n mesh.height = this.getValue(map, \"height\", 0) * scale;\n var parent_7 = this.getValue(map, \"parent\", null);\n if (parent_7 != null) {\n this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, \"skin\", null), slotIndex, parent_7, this.getValue(map, \"deform\", true)));\n return mesh;\n }\n var uvs = map.uvs;\n this.readVertices(map, mesh, uvs.length);\n mesh.triangles = map.triangles;\n mesh.regionUVs = uvs;\n mesh.updateUVs();\n mesh.edges = this.getValue(map, \"edges\", null);\n mesh.hullLength = this.getValue(map, \"hull\", 0) * 2;\n return mesh;\n }\n case \"path\": {\n var path = this.attachmentLoader.newPathAttachment(skin, name);\n if (path == null)\n return null;\n path.closed = this.getValue(map, \"closed\", false);\n path.constantSpeed = this.getValue(map, \"constantSpeed\", true);\n var vertexCount = map.vertexCount;\n this.readVertices(map, path, vertexCount << 1);\n var lengths = spine.Utils.newArray(vertexCount / 3, 0);\n for (var i = 0; i < map.lengths.length; i++)\n lengths[i] = map.lengths[i] * scale;\n path.lengths = lengths;\n var color = this.getValue(map, \"color\", null);\n if (color != null)\n path.color.setFromString(color);\n return path;\n }\n case \"point\": {\n var point = this.attachmentLoader.newPointAttachment(skin, name);\n if (point == null)\n return null;\n point.x = this.getValue(map, \"x\", 0) * scale;\n point.y = this.getValue(map, \"y\", 0) * scale;\n point.rotation = this.getValue(map, \"rotation\", 0);\n var color = this.getValue(map, \"color\", null);\n if (color != null)\n point.color.setFromString(color);\n return point;\n }\n case \"clipping\": {\n var clip = this.attachmentLoader.newClippingAttachment(skin, name);\n if (clip == null)\n return null;\n var end = this.getValue(map, \"end\", null);\n if (end != null) {\n var slot = skeletonData.findSlot(end);\n if (slot == null)\n throw new Error(\"Clipping end slot not found: \" + end);\n clip.endSlot = slot;\n }\n var vertexCount = map.vertexCount;\n this.readVertices(map, clip, vertexCount << 1);\n var color = this.getValue(map, \"color\", null);\n if (color != null)\n clip.color.setFromString(color);\n return clip;\n }\n }\n return null;\n };\n SkeletonJson.prototype.readVertices = function (map, attachment, verticesLength) {\n var scale = this.scale;\n attachment.worldVerticesLength = verticesLength;\n var vertices = map.vertices;\n if (verticesLength == vertices.length) {\n var scaledVertices = spine.Utils.toFloatArray(vertices);\n if (scale != 1) {\n for (var i = 0, n = vertices.length; i < n; i++)\n scaledVertices[i] *= scale;\n }\n attachment.vertices = scaledVertices;\n return;\n }\n var weights = new Array();\n var bones = new Array();\n for (var i = 0, n = vertices.length; i < n;) {\n var boneCount = vertices[i++];\n bones.push(boneCount);\n for (var nn = i + boneCount * 4; i < nn; i += 4) {\n bones.push(vertices[i]);\n weights.push(vertices[i + 1] * scale);\n weights.push(vertices[i + 2] * scale);\n weights.push(vertices[i + 3]);\n }\n }\n attachment.bones = bones;\n attachment.vertices = spine.Utils.toFloatArray(weights);\n };\n SkeletonJson.prototype.readAnimation = function (map, name, skeletonData) {\n var scale = this.scale;\n var timelines = new Array();\n var duration = 0;\n if (map.slots) {\n for (var slotName in map.slots) {\n var slotMap = map.slots[slotName];\n var slotIndex = skeletonData.findSlotIndex(slotName);\n if (slotIndex == -1)\n throw new Error(\"Slot not found: \" + slotName);\n for (var timelineName in slotMap) {\n var timelineMap = slotMap[timelineName];\n if (timelineName == \"attachment\") {\n var timeline = new spine.AttachmentTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n timeline.setFrame(frameIndex++, this.getValue(valueMap, \"time\", 0), valueMap.name);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n else if (timelineName == \"color\") {\n var timeline = new spine.ColorTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n var color = new spine.Color();\n color.setFromString(valueMap.color);\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), color.r, color.g, color.b, color.a);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.ColorTimeline.ENTRIES]);\n }\n else if (timelineName == \"twoColor\") {\n var timeline = new spine.TwoColorTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n var light = new spine.Color();\n var dark = new spine.Color();\n light.setFromString(valueMap.light);\n dark.setFromString(valueMap.dark);\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), light.r, light.g, light.b, light.a, dark.r, dark.g, dark.b);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TwoColorTimeline.ENTRIES]);\n }\n else\n throw new Error(\"Invalid timeline type for a slot: \" + timelineName + \" (\" + slotName + \")\");\n }\n }\n }\n if (map.bones) {\n for (var boneName in map.bones) {\n var boneMap = map.bones[boneName];\n var boneIndex = skeletonData.findBoneIndex(boneName);\n if (boneIndex == -1)\n throw new Error(\"Bone not found: \" + boneName);\n for (var timelineName in boneMap) {\n var timelineMap = boneMap[timelineName];\n if (timelineName === \"rotate\") {\n var timeline = new spine.RotateTimeline(timelineMap.length);\n timeline.boneIndex = boneIndex;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"angle\", 0));\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.RotateTimeline.ENTRIES]);\n }\n else if (timelineName === \"translate\" || timelineName === \"scale\" || timelineName === \"shear\") {\n var timeline = null;\n var timelineScale = 1, defaultValue = 0;\n if (timelineName === \"scale\") {\n timeline = new spine.ScaleTimeline(timelineMap.length);\n defaultValue = 1;\n }\n else if (timelineName === \"shear\")\n timeline = new spine.ShearTimeline(timelineMap.length);\n else {\n timeline = new spine.TranslateTimeline(timelineMap.length);\n timelineScale = scale;\n }\n timeline.boneIndex = boneIndex;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n var x = this.getValue(valueMap, \"x\", defaultValue), y = this.getValue(valueMap, \"y\", defaultValue);\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), x * timelineScale, y * timelineScale);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TranslateTimeline.ENTRIES]);\n }\n else\n throw new Error(\"Invalid timeline type for a bone: \" + timelineName + \" (\" + boneName + \")\");\n }\n }\n }\n if (map.ik) {\n for (var constraintName in map.ik) {\n var constraintMap = map.ik[constraintName];\n var constraint = skeletonData.findIkConstraint(constraintName);\n var timeline = new spine.IkConstraintTimeline(constraintMap.length);\n timeline.ikConstraintIndex = skeletonData.ikConstraints.indexOf(constraint);\n var frameIndex = 0;\n for (var i = 0; i < constraintMap.length; i++) {\n var valueMap = constraintMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"mix\", 1), this.getValue(valueMap, \"softness\", 0) * scale, this.getValue(valueMap, \"bendPositive\", true) ? 1 : -1, this.getValue(valueMap, \"compress\", false), this.getValue(valueMap, \"stretch\", false));\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.IkConstraintTimeline.ENTRIES]);\n }\n }\n if (map.transform) {\n for (var constraintName in map.transform) {\n var constraintMap = map.transform[constraintName];\n var constraint = skeletonData.findTransformConstraint(constraintName);\n var timeline = new spine.TransformConstraintTimeline(constraintMap.length);\n timeline.transformConstraintIndex = skeletonData.transformConstraints.indexOf(constraint);\n var frameIndex = 0;\n for (var i = 0; i < constraintMap.length; i++) {\n var valueMap = constraintMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1), this.getValue(valueMap, \"scaleMix\", 1), this.getValue(valueMap, \"shearMix\", 1));\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TransformConstraintTimeline.ENTRIES]);\n }\n }\n if (map.path) {\n for (var constraintName in map.path) {\n var constraintMap = map.path[constraintName];\n var index = skeletonData.findPathConstraintIndex(constraintName);\n if (index == -1)\n throw new Error(\"Path constraint not found: \" + constraintName);\n var data = skeletonData.pathConstraints[index];\n for (var timelineName in constraintMap) {\n var timelineMap = constraintMap[timelineName];\n if (timelineName === \"position\" || timelineName === \"spacing\") {\n var timeline = null;\n var timelineScale = 1;\n if (timelineName === \"spacing\") {\n timeline = new spine.PathConstraintSpacingTimeline(timelineMap.length);\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\n timelineScale = scale;\n }\n else {\n timeline = new spine.PathConstraintPositionTimeline(timelineMap.length);\n if (data.positionMode == spine.PositionMode.Fixed)\n timelineScale = scale;\n }\n timeline.pathConstraintIndex = index;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, timelineName, 0) * timelineScale);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\n }\n else if (timelineName === \"mix\") {\n var timeline = new spine.PathConstraintMixTimeline(timelineMap.length);\n timeline.pathConstraintIndex = index;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1));\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\n }\n }\n }\n }\n if (map.deform) {\n for (var deformName in map.deform) {\n var deformMap = map.deform[deformName];\n var skin = skeletonData.findSkin(deformName);\n if (skin == null)\n throw new Error(\"Skin not found: \" + deformName);\n for (var slotName in deformMap) {\n var slotMap = deformMap[slotName];\n var slotIndex = skeletonData.findSlotIndex(slotName);\n if (slotIndex == -1)\n throw new Error(\"Slot not found: \" + slotMap.name);\n for (var timelineName in slotMap) {\n var timelineMap = slotMap[timelineName];\n var attachment = skin.getAttachment(slotIndex, timelineName);\n if (attachment == null)\n throw new Error(\"Deform attachment not found: \" + timelineMap.name);\n var weighted = attachment.bones != null;\n var vertices = attachment.vertices;\n var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\n var timeline = new spine.DeformTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n timeline.attachment = attachment;\n var frameIndex = 0;\n for (var j = 0; j < timelineMap.length; j++) {\n var valueMap = timelineMap[j];\n var deform = void 0;\n var verticesValue = this.getValue(valueMap, \"vertices\", null);\n if (verticesValue == null)\n deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\n else {\n deform = spine.Utils.newFloatArray(deformLength);\n var start = this.getValue(valueMap, \"offset\", 0);\n spine.Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\n if (scale != 1) {\n for (var i = start, n = i + verticesValue.length; i < n; i++)\n deform[i] *= scale;\n }\n if (!weighted) {\n for (var i = 0; i < deformLength; i++)\n deform[i] += vertices[i];\n }\n }\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), deform);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n }\n }\n }\n var drawOrderNode = map.drawOrder;\n if (drawOrderNode == null)\n drawOrderNode = map.draworder;\n if (drawOrderNode != null) {\n var timeline = new spine.DrawOrderTimeline(drawOrderNode.length);\n var slotCount = skeletonData.slots.length;\n var frameIndex = 0;\n for (var j = 0; j < drawOrderNode.length; j++) {\n var drawOrderMap = drawOrderNode[j];\n var drawOrder = null;\n var offsets = this.getValue(drawOrderMap, \"offsets\", null);\n if (offsets != null) {\n drawOrder = spine.Utils.newArray(slotCount, -1);\n var unchanged = spine.Utils.newArray(slotCount - offsets.length, 0);\n var originalIndex = 0, unchangedIndex = 0;\n for (var i = 0; i < offsets.length; i++) {\n var offsetMap = offsets[i];\n var slotIndex = skeletonData.findSlotIndex(offsetMap.slot);\n if (slotIndex == -1)\n throw new Error(\"Slot not found: \" + offsetMap.slot);\n while (originalIndex != slotIndex)\n unchanged[unchangedIndex++] = originalIndex++;\n drawOrder[originalIndex + offsetMap.offset] = originalIndex++;\n }\n while (originalIndex < slotCount)\n unchanged[unchangedIndex++] = originalIndex++;\n for (var i = slotCount - 1; i >= 0; i--)\n if (drawOrder[i] == -1)\n drawOrder[i] = unchanged[--unchangedIndex];\n }\n timeline.setFrame(frameIndex++, this.getValue(drawOrderMap, \"time\", 0), drawOrder);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n if (map.events) {\n var timeline = new spine.EventTimeline(map.events.length);\n var frameIndex = 0;\n for (var i = 0; i < map.events.length; i++) {\n var eventMap = map.events[i];\n var eventData = skeletonData.findEvent(eventMap.name);\n if (eventData == null)\n throw new Error(\"Event not found: \" + eventMap.name);\n var event_6 = new spine.Event(spine.Utils.toSinglePrecision(this.getValue(eventMap, \"time\", 0)), eventData);\n event_6.intValue = this.getValue(eventMap, \"int\", eventData.intValue);\n event_6.floatValue = this.getValue(eventMap, \"float\", eventData.floatValue);\n event_6.stringValue = this.getValue(eventMap, \"string\", eventData.stringValue);\n if (event_6.data.audioPath != null) {\n event_6.volume = this.getValue(eventMap, \"volume\", 1);\n event_6.balance = this.getValue(eventMap, \"balance\", 0);\n }\n timeline.setFrame(frameIndex++, event_6);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n if (isNaN(duration)) {\n throw new Error(\"Error while parsing animation, duration is NaN\");\n }\n skeletonData.animations.push(new spine.Animation(name, timelines, duration));\n };\n SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) {\n if (!map.hasOwnProperty(\"curve\"))\n return;\n if (map.curve == \"stepped\")\n timeline.setStepped(frameIndex);\n else {\n var curve = map.curve;\n timeline.setCurve(frameIndex, curve, this.getValue(map, \"c2\", 0), this.getValue(map, \"c3\", 1), this.getValue(map, \"c4\", 1));\n }\n };\n SkeletonJson.prototype.getValue = function (map, prop, defaultValue) {\n return map[prop] !== undefined ? map[prop] : defaultValue;\n };\n SkeletonJson.blendModeFromString = function (str) {\n str = str.toLowerCase();\n if (str == \"normal\")\n return spine.BlendMode.Normal;\n if (str == \"additive\")\n return spine.BlendMode.Additive;\n if (str == \"multiply\")\n return spine.BlendMode.Multiply;\n if (str == \"screen\")\n return spine.BlendMode.Screen;\n throw new Error(\"Unknown blend mode: \" + str);\n };\n SkeletonJson.positionModeFromString = function (str) {\n str = str.toLowerCase();\n if (str == \"fixed\")\n return spine.PositionMode.Fixed;\n if (str == \"percent\")\n return spine.PositionMode.Percent;\n throw new Error(\"Unknown position mode: \" + str);\n };\n SkeletonJson.spacingModeFromString = function (str) {\n str = str.toLowerCase();\n if (str == \"length\")\n return spine.SpacingMode.Length;\n if (str == \"fixed\")\n return spine.SpacingMode.Fixed;\n if (str == \"percent\")\n return spine.SpacingMode.Percent;\n throw new Error(\"Unknown position mode: \" + str);\n };\n SkeletonJson.rotateModeFromString = function (str) {\n str = str.toLowerCase();\n if (str == \"tangent\")\n return spine.RotateMode.Tangent;\n if (str == \"chain\")\n return spine.RotateMode.Chain;\n if (str == \"chainscale\")\n return spine.RotateMode.ChainScale;\n throw new Error(\"Unknown rotate mode: \" + str);\n };\n SkeletonJson.transformModeFromString = function (str) {\n str = str.toLowerCase();\n if (str == \"normal\")\n return spine.TransformMode.Normal;\n if (str == \"onlytranslation\")\n return spine.TransformMode.OnlyTranslation;\n if (str == \"norotationorreflection\")\n return spine.TransformMode.NoRotationOrReflection;\n if (str == \"noscale\")\n return spine.TransformMode.NoScale;\n if (str == \"noscaleorreflection\")\n return spine.TransformMode.NoScaleOrReflection;\n throw new Error(\"Unknown transform mode: \" + str);\n };\n return SkeletonJson;\n }());\n spine.SkeletonJson = SkeletonJson;\n var LinkedMesh = (function () {\n function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\n this.mesh = mesh;\n this.skin = skin;\n this.slotIndex = slotIndex;\n this.parent = parent;\n this.inheritDeform = inheritDeform;\n }\n return LinkedMesh;\n }());\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SkinEntry = (function () {\n function SkinEntry(slotIndex, name, attachment) {\n this.slotIndex = slotIndex;\n this.name = name;\n this.attachment = attachment;\n }\n return SkinEntry;\n }());\n spine.SkinEntry = SkinEntry;\n var Skin = (function () {\n function Skin(name) {\n this.attachments = new Array();\n this.bones = Array();\n this.constraints = new Array();\n if (name == null)\n throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n Skin.prototype.setAttachment = function (slotIndex, name, attachment) {\n if (attachment == null)\n throw new Error(\"attachment cannot be null.\");\n var attachments = this.attachments;\n if (slotIndex >= attachments.length)\n attachments.length = slotIndex + 1;\n if (!attachments[slotIndex])\n attachments[slotIndex] = {};\n attachments[slotIndex][name] = attachment;\n };\n Skin.prototype.addSkin = function (skin) {\n for (var i = 0; i < skin.bones.length; i++) {\n var bone = skin.bones[i];\n var contained = false;\n for (var j = 0; j < this.bones.length; j++) {\n if (this.bones[j] == bone) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.bones.push(bone);\n }\n for (var i = 0; i < skin.constraints.length; i++) {\n var constraint = skin.constraints[i];\n var contained = false;\n for (var j = 0; j < this.constraints.length; j++) {\n if (this.constraints[j] == constraint) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.constraints.push(constraint);\n }\n var attachments = skin.getAttachments();\n for (var i = 0; i < attachments.length; i++) {\n var attachment = attachments[i];\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n }\n };\n Skin.prototype.copySkin = function (skin) {\n for (var i = 0; i < skin.bones.length; i++) {\n var bone = skin.bones[i];\n var contained = false;\n for (var j = 0; j < this.bones.length; j++) {\n if (this.bones[j] == bone) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.bones.push(bone);\n }\n for (var i = 0; i < skin.constraints.length; i++) {\n var constraint = skin.constraints[i];\n var contained = false;\n for (var j = 0; j < this.constraints.length; j++) {\n if (this.constraints[j] == constraint) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.constraints.push(constraint);\n }\n var attachments = skin.getAttachments();\n for (var i = 0; i < attachments.length; i++) {\n var attachment = attachments[i];\n if (attachment.attachment == null)\n continue;\n if (attachment.attachment instanceof spine.MeshAttachment) {\n attachment.attachment = attachment.attachment.newLinkedMesh();\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n }\n else {\n attachment.attachment = attachment.attachment.copy();\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n }\n }\n };\n Skin.prototype.getAttachment = function (slotIndex, name) {\n var dictionary = this.attachments[slotIndex];\n return dictionary ? dictionary[name] : null;\n };\n Skin.prototype.removeAttachment = function (slotIndex, name) {\n var dictionary = this.attachments[slotIndex];\n if (dictionary)\n dictionary[name] = null;\n };\n Skin.prototype.getAttachments = function () {\n var entries = new Array();\n for (var i = 0; i < this.attachments.length; i++) {\n var slotAttachments = this.attachments[i];\n if (slotAttachments) {\n for (var name_4 in slotAttachments) {\n var attachment = slotAttachments[name_4];\n if (attachment)\n entries.push(new SkinEntry(i, name_4, attachment));\n }\n }\n }\n return entries;\n };\n Skin.prototype.getAttachmentsForSlot = function (slotIndex, attachments) {\n var slotAttachments = this.attachments[slotIndex];\n if (slotAttachments) {\n for (var name_5 in slotAttachments) {\n var attachment = slotAttachments[name_5];\n if (attachment)\n attachments.push(new SkinEntry(slotIndex, name_5, attachment));\n }\n }\n };\n Skin.prototype.clear = function () {\n this.attachments.length = 0;\n this.bones.length = 0;\n this.constraints.length = 0;\n };\n Skin.prototype.attachAll = function (skeleton, oldSkin) {\n var slotIndex = 0;\n for (var i = 0; i < skeleton.slots.length; i++) {\n var slot = skeleton.slots[i];\n var slotAttachment = slot.getAttachment();\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\n var dictionary = oldSkin.attachments[slotIndex];\n for (var key in dictionary) {\n var skinAttachment = dictionary[key];\n if (slotAttachment == skinAttachment) {\n var attachment = this.getAttachment(slotIndex, key);\n if (attachment != null)\n slot.setAttachment(attachment);\n break;\n }\n }\n }\n slotIndex++;\n }\n };\n return Skin;\n }());\n spine.Skin = Skin;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Slot = (function () {\n function Slot(data, bone) {\n this.deform = new Array();\n if (data == null)\n throw new Error(\"data cannot be null.\");\n if (bone == null)\n throw new Error(\"bone cannot be null.\");\n this.data = data;\n this.bone = bone;\n this.color = new spine.Color();\n this.darkColor = data.darkColor == null ? null : new spine.Color();\n this.setToSetupPose();\n }\n Slot.prototype.getSkeleton = function () {\n return this.bone.skeleton;\n };\n Slot.prototype.getAttachment = function () {\n return this.attachment;\n };\n Slot.prototype.setAttachment = function (attachment) {\n if (this.attachment == attachment)\n return;\n this.attachment = attachment;\n this.attachmentTime = this.bone.skeleton.time;\n this.deform.length = 0;\n };\n Slot.prototype.setAttachmentTime = function (time) {\n this.attachmentTime = this.bone.skeleton.time - time;\n };\n Slot.prototype.getAttachmentTime = function () {\n return this.bone.skeleton.time - this.attachmentTime;\n };\n Slot.prototype.setToSetupPose = function () {\n this.color.setFromColor(this.data.color);\n if (this.darkColor != null)\n this.darkColor.setFromColor(this.data.darkColor);\n if (this.data.attachmentName == null)\n this.attachment = null;\n else {\n this.attachment = null;\n this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName));\n }\n };\n return Slot;\n }());\n spine.Slot = Slot;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SlotData = (function () {\n function SlotData(index, name, boneData) {\n this.color = new spine.Color(1, 1, 1, 1);\n if (index < 0)\n throw new Error(\"index must be >= 0.\");\n if (name == null)\n throw new Error(\"name cannot be null.\");\n if (boneData == null)\n throw new Error(\"boneData cannot be null.\");\n this.index = index;\n this.name = name;\n this.boneData = boneData;\n }\n return SlotData;\n }());\n spine.SlotData = SlotData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Texture = (function () {\n function Texture(image) {\n this._image = image;\n }\n Texture.prototype.getImage = function () {\n return this._image;\n };\n Texture.filterFromString = function (text) {\n switch (text.toLowerCase()) {\n case \"nearest\": return TextureFilter.Nearest;\n case \"linear\": return TextureFilter.Linear;\n case \"mipmap\": return TextureFilter.MipMap;\n case \"mipmapnearestnearest\": return TextureFilter.MipMapNearestNearest;\n case \"mipmaplinearnearest\": return TextureFilter.MipMapLinearNearest;\n case \"mipmapnearestlinear\": return TextureFilter.MipMapNearestLinear;\n case \"mipmaplinearlinear\": return TextureFilter.MipMapLinearLinear;\n default: throw new Error(\"Unknown texture filter \" + text);\n }\n };\n Texture.wrapFromString = function (text) {\n switch (text.toLowerCase()) {\n case \"mirroredtepeat\": return TextureWrap.MirroredRepeat;\n case \"clamptoedge\": return TextureWrap.ClampToEdge;\n case \"repeat\": return TextureWrap.Repeat;\n default: throw new Error(\"Unknown texture wrap \" + text);\n }\n };\n return Texture;\n }());\n spine.Texture = Texture;\n var TextureFilter;\n (function (TextureFilter) {\n TextureFilter[TextureFilter[\"Nearest\"] = 9728] = \"Nearest\";\n TextureFilter[TextureFilter[\"Linear\"] = 9729] = \"Linear\";\n TextureFilter[TextureFilter[\"MipMap\"] = 9987] = \"MipMap\";\n TextureFilter[TextureFilter[\"MipMapNearestNearest\"] = 9984] = \"MipMapNearestNearest\";\n TextureFilter[TextureFilter[\"MipMapLinearNearest\"] = 9985] = \"MipMapLinearNearest\";\n TextureFilter[TextureFilter[\"MipMapNearestLinear\"] = 9986] = \"MipMapNearestLinear\";\n TextureFilter[TextureFilter[\"MipMapLinearLinear\"] = 9987] = \"MipMapLinearLinear\";\n })(TextureFilter = spine.TextureFilter || (spine.TextureFilter = {}));\n var TextureWrap;\n (function (TextureWrap) {\n TextureWrap[TextureWrap[\"MirroredRepeat\"] = 33648] = \"MirroredRepeat\";\n TextureWrap[TextureWrap[\"ClampToEdge\"] = 33071] = \"ClampToEdge\";\n TextureWrap[TextureWrap[\"Repeat\"] = 10497] = \"Repeat\";\n })(TextureWrap = spine.TextureWrap || (spine.TextureWrap = {}));\n var TextureRegion = (function () {\n function TextureRegion() {\n this.u = 0;\n this.v = 0;\n this.u2 = 0;\n this.v2 = 0;\n this.width = 0;\n this.height = 0;\n this.rotate = false;\n this.offsetX = 0;\n this.offsetY = 0;\n this.originalWidth = 0;\n this.originalHeight = 0;\n }\n return TextureRegion;\n }());\n spine.TextureRegion = TextureRegion;\n var FakeTexture = (function (_super) {\n __extends(FakeTexture, _super);\n function FakeTexture() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n FakeTexture.prototype.setFilters = function (minFilter, magFilter) { };\n FakeTexture.prototype.setWraps = function (uWrap, vWrap) { };\n FakeTexture.prototype.dispose = function () { };\n return FakeTexture;\n }(Texture));\n spine.FakeTexture = FakeTexture;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var TextureAtlas = (function () {\n function TextureAtlas(atlasText, textureLoader) {\n this.pages = new Array();\n this.regions = new Array();\n this.load(atlasText, textureLoader);\n }\n TextureAtlas.prototype.load = function (atlasText, textureLoader) {\n if (textureLoader == null)\n throw new Error(\"textureLoader cannot be null.\");\n var reader = new TextureAtlasReader(atlasText);\n var tuple = new Array(4);\n var page = null;\n while (true) {\n var line = reader.readLine();\n if (line == null)\n break;\n line = line.trim();\n if (line.length == 0)\n page = null;\n else if (!page) {\n page = new TextureAtlasPage();\n page.name = line;\n if (reader.readTuple(tuple) == 2) {\n page.width = parseInt(tuple[0]);\n page.height = parseInt(tuple[1]);\n reader.readTuple(tuple);\n }\n reader.readTuple(tuple);\n page.minFilter = spine.Texture.filterFromString(tuple[0]);\n page.magFilter = spine.Texture.filterFromString(tuple[1]);\n var direction = reader.readValue();\n page.uWrap = spine.TextureWrap.ClampToEdge;\n page.vWrap = spine.TextureWrap.ClampToEdge;\n if (direction == \"x\")\n page.uWrap = spine.TextureWrap.Repeat;\n else if (direction == \"y\")\n page.vWrap = spine.TextureWrap.Repeat;\n else if (direction == \"xy\")\n page.uWrap = page.vWrap = spine.TextureWrap.Repeat;\n page.texture = textureLoader(line);\n page.texture.setFilters(page.minFilter, page.magFilter);\n page.texture.setWraps(page.uWrap, page.vWrap);\n page.width = page.texture.getImage().width;\n page.height = page.texture.getImage().height;\n this.pages.push(page);\n }\n else {\n var region = new TextureAtlasRegion();\n region.name = line;\n region.page = page;\n var rotateValue = reader.readValue();\n if (rotateValue.toLocaleLowerCase() == \"true\") {\n region.degrees = 90;\n }\n else if (rotateValue.toLocaleLowerCase() == \"false\") {\n region.degrees = 0;\n }\n else {\n region.degrees = parseFloat(rotateValue);\n }\n region.rotate = region.degrees == 90;\n reader.readTuple(tuple);\n var x = parseInt(tuple[0]);\n var y = parseInt(tuple[1]);\n reader.readTuple(tuple);\n var width = parseInt(tuple[0]);\n var height = parseInt(tuple[1]);\n region.u = x / page.width;\n region.v = y / page.height;\n if (region.rotate) {\n region.u2 = (x + height) / page.width;\n region.v2 = (y + width) / page.height;\n }\n else {\n region.u2 = (x + width) / page.width;\n region.v2 = (y + height) / page.height;\n }\n region.x = x;\n region.y = y;\n region.width = Math.abs(width);\n region.height = Math.abs(height);\n if (reader.readTuple(tuple) == 4) {\n if (reader.readTuple(tuple) == 4) {\n reader.readTuple(tuple);\n }\n }\n region.originalWidth = parseInt(tuple[0]);\n region.originalHeight = parseInt(tuple[1]);\n reader.readTuple(tuple);\n region.offsetX = parseInt(tuple[0]);\n region.offsetY = parseInt(tuple[1]);\n region.index = parseInt(reader.readValue());\n region.texture = page.texture;\n this.regions.push(region);\n }\n }\n };\n TextureAtlas.prototype.findRegion = function (name) {\n for (var i = 0; i < this.regions.length; i++) {\n if (this.regions[i].name == name) {\n return this.regions[i];\n }\n }\n return null;\n };\n TextureAtlas.prototype.dispose = function () {\n for (var i = 0; i < this.pages.length; i++) {\n this.pages[i].texture.dispose();\n }\n };\n return TextureAtlas;\n }());\n spine.TextureAtlas = TextureAtlas;\n var TextureAtlasReader = (function () {\n function TextureAtlasReader(text) {\n this.index = 0;\n this.lines = text.split(/\\r\\n|\\r|\\n/);\n }\n TextureAtlasReader.prototype.readLine = function () {\n if (this.index >= this.lines.length)\n return null;\n return this.lines[this.index++];\n };\n TextureAtlasReader.prototype.readValue = function () {\n var line = this.readLine();\n var colon = line.indexOf(\":\");\n if (colon == -1)\n throw new Error(\"Invalid line: \" + line);\n return line.substring(colon + 1).trim();\n };\n TextureAtlasReader.prototype.readTuple = function (tuple) {\n var line = this.readLine();\n var colon = line.indexOf(\":\");\n if (colon == -1)\n throw new Error(\"Invalid line: \" + line);\n var i = 0, lastMatch = colon + 1;\n for (; i < 3; i++) {\n var comma = line.indexOf(\",\", lastMatch);\n if (comma == -1)\n break;\n tuple[i] = line.substr(lastMatch, comma - lastMatch).trim();\n lastMatch = comma + 1;\n }\n tuple[i] = line.substring(lastMatch).trim();\n return i + 1;\n };\n return TextureAtlasReader;\n }());\n var TextureAtlasPage = (function () {\n function TextureAtlasPage() {\n }\n return TextureAtlasPage;\n }());\n spine.TextureAtlasPage = TextureAtlasPage;\n var TextureAtlasRegion = (function (_super) {\n __extends(TextureAtlasRegion, _super);\n function TextureAtlasRegion() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return TextureAtlasRegion;\n }(spine.TextureRegion));\n spine.TextureAtlasRegion = TextureAtlasRegion;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var TransformConstraint = (function () {\n function TransformConstraint(data, skeleton) {\n this.rotateMix = 0;\n this.translateMix = 0;\n this.scaleMix = 0;\n this.shearMix = 0;\n this.temp = new spine.Vector2();\n this.active = false;\n if (data == null)\n throw new Error(\"data cannot be null.\");\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.rotateMix = data.rotateMix;\n this.translateMix = data.translateMix;\n this.scaleMix = data.scaleMix;\n this.shearMix = data.shearMix;\n this.bones = new Array();\n for (var i = 0; i < data.bones.length; i++)\n this.bones.push(skeleton.findBone(data.bones[i].name));\n this.target = skeleton.findBone(data.target.name);\n }\n TransformConstraint.prototype.isActive = function () {\n return this.active;\n };\n TransformConstraint.prototype.apply = function () {\n this.update();\n };\n TransformConstraint.prototype.update = function () {\n if (this.data.local) {\n if (this.data.relative)\n this.applyRelativeLocal();\n else\n this.applyAbsoluteLocal();\n }\n else {\n if (this.data.relative)\n this.applyRelativeWorld();\n else\n this.applyAbsoluteWorld();\n }\n };\n TransformConstraint.prototype.applyAbsoluteWorld = function () {\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\n var target = this.target;\n var ta = target.a, tb = target.b, tc = target.c, td = target.d;\n var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\n var offsetRotation = this.data.offsetRotation * degRadReflect;\n var offsetShearY = this.data.offsetShearY * degRadReflect;\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n var modified = false;\n if (rotateMix != 0) {\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n var r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\n if (r > spine.MathUtils.PI)\n r -= spine.MathUtils.PI2;\n else if (r < -spine.MathUtils.PI)\n r += spine.MathUtils.PI2;\n r *= rotateMix;\n var cos = Math.cos(r), sin = Math.sin(r);\n bone.a = cos * a - sin * c;\n bone.b = cos * b - sin * d;\n bone.c = sin * a + cos * c;\n bone.d = sin * b + cos * d;\n modified = true;\n }\n if (translateMix != 0) {\n var temp = this.temp;\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\n bone.worldX += (temp.x - bone.worldX) * translateMix;\n bone.worldY += (temp.y - bone.worldY) * translateMix;\n modified = true;\n }\n if (scaleMix > 0) {\n var s = Math.sqrt(bone.a * bone.a + bone.c * bone.c);\n var ts = Math.sqrt(ta * ta + tc * tc);\n if (s > 0.00001)\n s = (s + (ts - s + this.data.offsetScaleX) * scaleMix) / s;\n bone.a *= s;\n bone.c *= s;\n s = Math.sqrt(bone.b * bone.b + bone.d * bone.d);\n ts = Math.sqrt(tb * tb + td * td);\n if (s > 0.00001)\n s = (s + (ts - s + this.data.offsetScaleY) * scaleMix) / s;\n bone.b *= s;\n bone.d *= s;\n modified = true;\n }\n if (shearMix > 0) {\n var b = bone.b, d = bone.d;\n var by = Math.atan2(d, b);\n var r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a));\n if (r > spine.MathUtils.PI)\n r -= spine.MathUtils.PI2;\n else if (r < -spine.MathUtils.PI)\n r += spine.MathUtils.PI2;\n r = by + (r + offsetShearY) * shearMix;\n var s = Math.sqrt(b * b + d * d);\n bone.b = Math.cos(r) * s;\n bone.d = Math.sin(r) * s;\n modified = true;\n }\n if (modified)\n bone.appliedValid = false;\n }\n };\n TransformConstraint.prototype.applyRelativeWorld = function () {\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\n var target = this.target;\n var ta = target.a, tb = target.b, tc = target.c, td = target.d;\n var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\n var offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect;\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n var modified = false;\n if (rotateMix != 0) {\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n var r = Math.atan2(tc, ta) + offsetRotation;\n if (r > spine.MathUtils.PI)\n r -= spine.MathUtils.PI2;\n else if (r < -spine.MathUtils.PI)\n r += spine.MathUtils.PI2;\n r *= rotateMix;\n var cos = Math.cos(r), sin = Math.sin(r);\n bone.a = cos * a - sin * c;\n bone.b = cos * b - sin * d;\n bone.c = sin * a + cos * c;\n bone.d = sin * b + cos * d;\n modified = true;\n }\n if (translateMix != 0) {\n var temp = this.temp;\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\n bone.worldX += temp.x * translateMix;\n bone.worldY += temp.y * translateMix;\n modified = true;\n }\n if (scaleMix > 0) {\n var s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * scaleMix + 1;\n bone.a *= s;\n bone.c *= s;\n s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * scaleMix + 1;\n bone.b *= s;\n bone.d *= s;\n modified = true;\n }\n if (shearMix > 0) {\n var r = Math.atan2(td, tb) - Math.atan2(tc, ta);\n if (r > spine.MathUtils.PI)\n r -= spine.MathUtils.PI2;\n else if (r < -spine.MathUtils.PI)\n r += spine.MathUtils.PI2;\n var b = bone.b, d = bone.d;\n r = Math.atan2(d, b) + (r - spine.MathUtils.PI / 2 + offsetShearY) * shearMix;\n var s = Math.sqrt(b * b + d * d);\n bone.b = Math.cos(r) * s;\n bone.d = Math.sin(r) * s;\n modified = true;\n }\n if (modified)\n bone.appliedValid = false;\n }\n };\n TransformConstraint.prototype.applyAbsoluteLocal = function () {\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\n var target = this.target;\n if (!target.appliedValid)\n target.updateAppliedTransform();\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n if (!bone.appliedValid)\n bone.updateAppliedTransform();\n var rotation = bone.arotation;\n if (rotateMix != 0) {\n var r = target.arotation - rotation + this.data.offsetRotation;\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\n rotation += r * rotateMix;\n }\n var x = bone.ax, y = bone.ay;\n if (translateMix != 0) {\n x += (target.ax - x + this.data.offsetX) * translateMix;\n y += (target.ay - y + this.data.offsetY) * translateMix;\n }\n var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\n if (scaleMix != 0) {\n if (scaleX > 0.00001)\n scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * scaleMix) / scaleX;\n if (scaleY > 0.00001)\n scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * scaleMix) / scaleY;\n }\n var shearY = bone.ashearY;\n if (shearMix != 0) {\n var r = target.ashearY - shearY + this.data.offsetShearY;\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\n bone.shearY += r * shearMix;\n }\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\n }\n };\n TransformConstraint.prototype.applyRelativeLocal = function () {\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\n var target = this.target;\n if (!target.appliedValid)\n target.updateAppliedTransform();\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n if (!bone.appliedValid)\n bone.updateAppliedTransform();\n var rotation = bone.arotation;\n if (rotateMix != 0)\n rotation += (target.arotation + this.data.offsetRotation) * rotateMix;\n var x = bone.ax, y = bone.ay;\n if (translateMix != 0) {\n x += (target.ax + this.data.offsetX) * translateMix;\n y += (target.ay + this.data.offsetY) * translateMix;\n }\n var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\n if (scaleMix != 0) {\n if (scaleX > 0.00001)\n scaleX *= ((target.ascaleX - 1 + this.data.offsetScaleX) * scaleMix) + 1;\n if (scaleY > 0.00001)\n scaleY *= ((target.ascaleY - 1 + this.data.offsetScaleY) * scaleMix) + 1;\n }\n var shearY = bone.ashearY;\n if (shearMix != 0)\n shearY += (target.ashearY + this.data.offsetShearY) * shearMix;\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\n }\n };\n return TransformConstraint;\n }());\n spine.TransformConstraint = TransformConstraint;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var TransformConstraintData = (function (_super) {\n __extends(TransformConstraintData, _super);\n function TransformConstraintData(name) {\n var _this = _super.call(this, name, 0, false) || this;\n _this.bones = new Array();\n _this.rotateMix = 0;\n _this.translateMix = 0;\n _this.scaleMix = 0;\n _this.shearMix = 0;\n _this.offsetRotation = 0;\n _this.offsetX = 0;\n _this.offsetY = 0;\n _this.offsetScaleX = 0;\n _this.offsetScaleY = 0;\n _this.offsetShearY = 0;\n _this.relative = false;\n _this.local = false;\n return _this;\n }\n return TransformConstraintData;\n }(spine.ConstraintData));\n spine.TransformConstraintData = TransformConstraintData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Triangulator = (function () {\n function Triangulator() {\n this.convexPolygons = new Array();\n this.convexPolygonsIndices = new Array();\n this.indicesArray = new Array();\n this.isConcaveArray = new Array();\n this.triangles = new Array();\n this.polygonPool = new spine.Pool(function () {\n return new Array();\n });\n this.polygonIndicesPool = new spine.Pool(function () {\n return new Array();\n });\n }\n Triangulator.prototype.triangulate = function (verticesArray) {\n var vertices = verticesArray;\n var vertexCount = verticesArray.length >> 1;\n var indices = this.indicesArray;\n indices.length = 0;\n for (var i = 0; i < vertexCount; i++)\n indices[i] = i;\n var isConcave = this.isConcaveArray;\n isConcave.length = 0;\n for (var i = 0, n = vertexCount; i < n; ++i)\n isConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices);\n var triangles = this.triangles;\n triangles.length = 0;\n while (vertexCount > 3) {\n var previous = vertexCount - 1, i = 0, next = 1;\n while (true) {\n outer: if (!isConcave[i]) {\n var p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\n var p1x = vertices[p1], p1y = vertices[p1 + 1];\n var p2x = vertices[p2], p2y = vertices[p2 + 1];\n var p3x = vertices[p3], p3y = vertices[p3 + 1];\n for (var ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\n if (!isConcave[ii])\n continue;\n var v = indices[ii] << 1;\n var vx = vertices[v], vy = vertices[v + 1];\n if (Triangulator.positiveArea(p3x, p3y, p1x, p1y, vx, vy)) {\n if (Triangulator.positiveArea(p1x, p1y, p2x, p2y, vx, vy)) {\n if (Triangulator.positiveArea(p2x, p2y, p3x, p3y, vx, vy))\n break outer;\n }\n }\n }\n break;\n }\n if (next == 0) {\n do {\n if (!isConcave[i])\n break;\n i--;\n } while (i > 0);\n break;\n }\n previous = i;\n i = next;\n next = (next + 1) % vertexCount;\n }\n triangles.push(indices[(vertexCount + i - 1) % vertexCount]);\n triangles.push(indices[i]);\n triangles.push(indices[(i + 1) % vertexCount]);\n indices.splice(i, 1);\n isConcave.splice(i, 1);\n vertexCount--;\n var previousIndex = (vertexCount + i - 1) % vertexCount;\n var nextIndex = i == vertexCount ? 0 : i;\n isConcave[previousIndex] = Triangulator.isConcave(previousIndex, vertexCount, vertices, indices);\n isConcave[nextIndex] = Triangulator.isConcave(nextIndex, vertexCount, vertices, indices);\n }\n if (vertexCount == 3) {\n triangles.push(indices[2]);\n triangles.push(indices[0]);\n triangles.push(indices[1]);\n }\n return triangles;\n };\n Triangulator.prototype.decompose = function (verticesArray, triangles) {\n var vertices = verticesArray;\n var convexPolygons = this.convexPolygons;\n this.polygonPool.freeAll(convexPolygons);\n convexPolygons.length = 0;\n var convexPolygonsIndices = this.convexPolygonsIndices;\n this.polygonIndicesPool.freeAll(convexPolygonsIndices);\n convexPolygonsIndices.length = 0;\n var polygonIndices = this.polygonIndicesPool.obtain();\n polygonIndices.length = 0;\n var polygon = this.polygonPool.obtain();\n polygon.length = 0;\n var fanBaseIndex = -1, lastWinding = 0;\n for (var i = 0, n = triangles.length; i < n; i += 3) {\n var t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\n var x1 = vertices[t1], y1 = vertices[t1 + 1];\n var x2 = vertices[t2], y2 = vertices[t2 + 1];\n var x3 = vertices[t3], y3 = vertices[t3 + 1];\n var merged = false;\n if (fanBaseIndex == t1) {\n var o = polygon.length - 4;\n var winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3);\n var winding2 = Triangulator.winding(x3, y3, polygon[0], polygon[1], polygon[2], polygon[3]);\n if (winding1 == lastWinding && winding2 == lastWinding) {\n polygon.push(x3);\n polygon.push(y3);\n polygonIndices.push(t3);\n merged = true;\n }\n }\n if (!merged) {\n if (polygon.length > 0) {\n convexPolygons.push(polygon);\n convexPolygonsIndices.push(polygonIndices);\n }\n else {\n this.polygonPool.free(polygon);\n this.polygonIndicesPool.free(polygonIndices);\n }\n polygon = this.polygonPool.obtain();\n polygon.length = 0;\n polygon.push(x1);\n polygon.push(y1);\n polygon.push(x2);\n polygon.push(y2);\n polygon.push(x3);\n polygon.push(y3);\n polygonIndices = this.polygonIndicesPool.obtain();\n polygonIndices.length = 0;\n polygonIndices.push(t1);\n polygonIndices.push(t2);\n polygonIndices.push(t3);\n lastWinding = Triangulator.winding(x1, y1, x2, y2, x3, y3);\n fanBaseIndex = t1;\n }\n }\n if (polygon.length > 0) {\n convexPolygons.push(polygon);\n convexPolygonsIndices.push(polygonIndices);\n }\n for (var i = 0, n = convexPolygons.length; i < n; i++) {\n polygonIndices = convexPolygonsIndices[i];\n if (polygonIndices.length == 0)\n continue;\n var firstIndex = polygonIndices[0];\n var lastIndex = polygonIndices[polygonIndices.length - 1];\n polygon = convexPolygons[i];\n var o = polygon.length - 4;\n var prevPrevX = polygon[o], prevPrevY = polygon[o + 1];\n var prevX = polygon[o + 2], prevY = polygon[o + 3];\n var firstX = polygon[0], firstY = polygon[1];\n var secondX = polygon[2], secondY = polygon[3];\n var winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\n for (var ii = 0; ii < n; ii++) {\n if (ii == i)\n continue;\n var otherIndices = convexPolygonsIndices[ii];\n if (otherIndices.length != 3)\n continue;\n var otherFirstIndex = otherIndices[0];\n var otherSecondIndex = otherIndices[1];\n var otherLastIndex = otherIndices[2];\n var otherPoly = convexPolygons[ii];\n var x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1];\n if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex)\n continue;\n var winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\n var winding2 = Triangulator.winding(x3, y3, firstX, firstY, secondX, secondY);\n if (winding1 == winding && winding2 == winding) {\n otherPoly.length = 0;\n otherIndices.length = 0;\n polygon.push(x3);\n polygon.push(y3);\n polygonIndices.push(otherLastIndex);\n prevPrevX = prevX;\n prevPrevY = prevY;\n prevX = x3;\n prevY = y3;\n ii = 0;\n }\n }\n }\n for (var i = convexPolygons.length - 1; i >= 0; i--) {\n polygon = convexPolygons[i];\n if (polygon.length == 0) {\n convexPolygons.splice(i, 1);\n this.polygonPool.free(polygon);\n polygonIndices = convexPolygonsIndices[i];\n convexPolygonsIndices.splice(i, 1);\n this.polygonIndicesPool.free(polygonIndices);\n }\n }\n return convexPolygons;\n };\n Triangulator.isConcave = function (index, vertexCount, vertices, indices) {\n var previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\n var current = indices[index] << 1;\n var next = indices[(index + 1) % vertexCount] << 1;\n return !this.positiveArea(vertices[previous], vertices[previous + 1], vertices[current], vertices[current + 1], vertices[next], vertices[next + 1]);\n };\n Triangulator.positiveArea = function (p1x, p1y, p2x, p2y, p3x, p3y) {\n return p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\n };\n Triangulator.winding = function (p1x, p1y, p2x, p2y, p3x, p3y) {\n var px = p2x - p1x, py = p2y - p1y;\n return p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\n };\n return Triangulator;\n }());\n spine.Triangulator = Triangulator;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var IntSet = (function () {\n function IntSet() {\n this.array = new Array();\n }\n IntSet.prototype.add = function (value) {\n var contains = this.contains(value);\n this.array[value | 0] = value | 0;\n return !contains;\n };\n IntSet.prototype.contains = function (value) {\n return this.array[value | 0] != undefined;\n };\n IntSet.prototype.remove = function (value) {\n this.array[value | 0] = undefined;\n };\n IntSet.prototype.clear = function () {\n this.array.length = 0;\n };\n return IntSet;\n }());\n spine.IntSet = IntSet;\n var Color = (function () {\n function Color(r, g, b, a) {\n if (r === void 0) { r = 0; }\n if (g === void 0) { g = 0; }\n if (b === void 0) { b = 0; }\n if (a === void 0) { a = 0; }\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n }\n Color.prototype.set = function (r, g, b, a) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n this.clamp();\n return this;\n };\n Color.prototype.setFromColor = function (c) {\n this.r = c.r;\n this.g = c.g;\n this.b = c.b;\n this.a = c.a;\n return this;\n };\n Color.prototype.setFromString = function (hex) {\n hex = hex.charAt(0) == '#' ? hex.substr(1) : hex;\n this.r = parseInt(hex.substr(0, 2), 16) / 255.0;\n this.g = parseInt(hex.substr(2, 2), 16) / 255.0;\n this.b = parseInt(hex.substr(4, 2), 16) / 255.0;\n this.a = (hex.length != 8 ? 255 : parseInt(hex.substr(6, 2), 16)) / 255.0;\n return this;\n };\n Color.prototype.add = function (r, g, b, a) {\n this.r += r;\n this.g += g;\n this.b += b;\n this.a += a;\n this.clamp();\n return this;\n };\n Color.prototype.clamp = function () {\n if (this.r < 0)\n this.r = 0;\n else if (this.r > 1)\n this.r = 1;\n if (this.g < 0)\n this.g = 0;\n else if (this.g > 1)\n this.g = 1;\n if (this.b < 0)\n this.b = 0;\n else if (this.b > 1)\n this.b = 1;\n if (this.a < 0)\n this.a = 0;\n else if (this.a > 1)\n this.a = 1;\n return this;\n };\n Color.rgba8888ToColor = function (color, value) {\n color.r = ((value & 0xff000000) >>> 24) / 255;\n color.g = ((value & 0x00ff0000) >>> 16) / 255;\n color.b = ((value & 0x0000ff00) >>> 8) / 255;\n color.a = ((value & 0x000000ff)) / 255;\n };\n Color.rgb888ToColor = function (color, value) {\n color.r = ((value & 0x00ff0000) >>> 16) / 255;\n color.g = ((value & 0x0000ff00) >>> 8) / 255;\n color.b = ((value & 0x000000ff)) / 255;\n };\n Color.WHITE = new Color(1, 1, 1, 1);\n Color.RED = new Color(1, 0, 0, 1);\n Color.GREEN = new Color(0, 1, 0, 1);\n Color.BLUE = new Color(0, 0, 1, 1);\n Color.MAGENTA = new Color(1, 0, 1, 1);\n return Color;\n }());\n spine.Color = Color;\n var MathUtils = (function () {\n function MathUtils() {\n }\n MathUtils.clamp = function (value, min, max) {\n if (value < min)\n return min;\n if (value > max)\n return max;\n return value;\n };\n MathUtils.cosDeg = function (degrees) {\n return Math.cos(degrees * MathUtils.degRad);\n };\n MathUtils.sinDeg = function (degrees) {\n return Math.sin(degrees * MathUtils.degRad);\n };\n MathUtils.signum = function (value) {\n return value > 0 ? 1 : value < 0 ? -1 : 0;\n };\n MathUtils.toInt = function (x) {\n return x > 0 ? Math.floor(x) : Math.ceil(x);\n };\n MathUtils.cbrt = function (x) {\n var y = Math.pow(Math.abs(x), 1 / 3);\n return x < 0 ? -y : y;\n };\n MathUtils.randomTriangular = function (min, max) {\n return MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\n };\n MathUtils.randomTriangularWith = function (min, max, mode) {\n var u = Math.random();\n var d = max - min;\n if (u <= (mode - min) / d)\n return min + Math.sqrt(u * d * (mode - min));\n return max - Math.sqrt((1 - u) * d * (max - mode));\n };\n MathUtils.PI = 3.1415927;\n MathUtils.PI2 = MathUtils.PI * 2;\n MathUtils.radiansToDegrees = 180 / MathUtils.PI;\n MathUtils.radDeg = MathUtils.radiansToDegrees;\n MathUtils.degreesToRadians = MathUtils.PI / 180;\n MathUtils.degRad = MathUtils.degreesToRadians;\n return MathUtils;\n }());\n spine.MathUtils = MathUtils;\n var Interpolation = (function () {\n function Interpolation() {\n }\n Interpolation.prototype.apply = function (start, end, a) {\n return start + (end - start) * this.applyInternal(a);\n };\n return Interpolation;\n }());\n spine.Interpolation = Interpolation;\n var Pow = (function (_super) {\n __extends(Pow, _super);\n function Pow(power) {\n var _this = _super.call(this) || this;\n _this.power = 2;\n _this.power = power;\n return _this;\n }\n Pow.prototype.applyInternal = function (a) {\n if (a <= 0.5)\n return Math.pow(a * 2, this.power) / 2;\n return Math.pow((a - 1) * 2, this.power) / (this.power % 2 == 0 ? -2 : 2) + 1;\n };\n return Pow;\n }(Interpolation));\n spine.Pow = Pow;\n var PowOut = (function (_super) {\n __extends(PowOut, _super);\n function PowOut(power) {\n return _super.call(this, power) || this;\n }\n PowOut.prototype.applyInternal = function (a) {\n return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\n };\n return PowOut;\n }(Pow));\n spine.PowOut = PowOut;\n var Utils = (function () {\n function Utils() {\n }\n Utils.arrayCopy = function (source, sourceStart, dest, destStart, numElements) {\n for (var i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\n dest[j] = source[i];\n }\n };\n Utils.setArraySize = function (array, size, value) {\n if (value === void 0) { value = 0; }\n var oldSize = array.length;\n if (oldSize == size)\n return array;\n array.length = size;\n if (oldSize < size) {\n for (var i = oldSize; i < size; i++)\n array[i] = value;\n }\n return array;\n };\n Utils.ensureArrayCapacity = function (array, size, value) {\n if (value === void 0) { value = 0; }\n if (array.length >= size)\n return array;\n return Utils.setArraySize(array, size, value);\n };\n Utils.newArray = function (size, defaultValue) {\n var array = new Array(size);\n for (var i = 0; i < size; i++)\n array[i] = defaultValue;\n return array;\n };\n Utils.newFloatArray = function (size) {\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\n return new Float32Array(size);\n }\n else {\n var array = new Array(size);\n for (var i = 0; i < array.length; i++)\n array[i] = 0;\n return array;\n }\n };\n Utils.newShortArray = function (size) {\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\n return new Int16Array(size);\n }\n else {\n var array = new Array(size);\n for (var i = 0; i < array.length; i++)\n array[i] = 0;\n return array;\n }\n };\n Utils.toFloatArray = function (array) {\n return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\n };\n Utils.toSinglePrecision = function (value) {\n return Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;\n };\n Utils.webkit602BugfixHelper = function (alpha, blend) {\n };\n Utils.contains = function (array, element, identity) {\n if (identity === void 0) { identity = true; }\n for (var i = 0; i < array.length; i++) {\n if (array[i] == element)\n return true;\n }\n return false;\n };\n Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== \"undefined\";\n return Utils;\n }());\n spine.Utils = Utils;\n var DebugUtils = (function () {\n function DebugUtils() {\n }\n DebugUtils.logBones = function (skeleton) {\n for (var i = 0; i < skeleton.bones.length; i++) {\n var bone = skeleton.bones[i];\n console.log(bone.data.name + \", \" + bone.a + \", \" + bone.b + \", \" + bone.c + \", \" + bone.d + \", \" + bone.worldX + \", \" + bone.worldY);\n }\n };\n return DebugUtils;\n }());\n spine.DebugUtils = DebugUtils;\n var Pool = (function () {\n function Pool(instantiator) {\n this.items = new Array();\n this.instantiator = instantiator;\n }\n Pool.prototype.obtain = function () {\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\n };\n Pool.prototype.free = function (item) {\n if (item.reset)\n item.reset();\n this.items.push(item);\n };\n Pool.prototype.freeAll = function (items) {\n for (var i = 0; i < items.length; i++) {\n this.free(items[i]);\n }\n };\n Pool.prototype.clear = function () {\n this.items.length = 0;\n };\n return Pool;\n }());\n spine.Pool = Pool;\n var Vector2 = (function () {\n function Vector2(x, y) {\n if (x === void 0) { x = 0; }\n if (y === void 0) { y = 0; }\n this.x = x;\n this.y = y;\n }\n Vector2.prototype.set = function (x, y) {\n this.x = x;\n this.y = y;\n return this;\n };\n Vector2.prototype.length = function () {\n var x = this.x;\n var y = this.y;\n return Math.sqrt(x * x + y * y);\n };\n Vector2.prototype.normalize = function () {\n var len = this.length();\n if (len != 0) {\n this.x /= len;\n this.y /= len;\n }\n return this;\n };\n return Vector2;\n }());\n spine.Vector2 = Vector2;\n var TimeKeeper = (function () {\n function TimeKeeper() {\n this.maxDelta = 0.064;\n this.framesPerSecond = 0;\n this.delta = 0;\n this.totalTime = 0;\n this.lastTime = Date.now() / 1000;\n this.frameCount = 0;\n this.frameTime = 0;\n }\n TimeKeeper.prototype.update = function () {\n var now = Date.now() / 1000;\n this.delta = now - this.lastTime;\n this.frameTime += this.delta;\n this.totalTime += this.delta;\n if (this.delta > this.maxDelta)\n this.delta = this.maxDelta;\n this.lastTime = now;\n this.frameCount++;\n if (this.frameTime > 1) {\n this.framesPerSecond = this.frameCount / this.frameTime;\n this.frameTime = 0;\n this.frameCount = 0;\n }\n };\n return TimeKeeper;\n }());\n spine.TimeKeeper = TimeKeeper;\n var WindowedMean = (function () {\n function WindowedMean(windowSize) {\n if (windowSize === void 0) { windowSize = 32; }\n this.addedValues = 0;\n this.lastValue = 0;\n this.mean = 0;\n this.dirty = true;\n this.values = new Array(windowSize);\n }\n WindowedMean.prototype.hasEnoughData = function () {\n return this.addedValues >= this.values.length;\n };\n WindowedMean.prototype.addValue = function (value) {\n if (this.addedValues < this.values.length)\n this.addedValues++;\n this.values[this.lastValue++] = value;\n if (this.lastValue > this.values.length - 1)\n this.lastValue = 0;\n this.dirty = true;\n };\n WindowedMean.prototype.getMean = function () {\n if (this.hasEnoughData()) {\n if (this.dirty) {\n var mean = 0;\n for (var i = 0; i < this.values.length; i++) {\n mean += this.values[i];\n }\n this.mean = mean / this.values.length;\n this.dirty = false;\n }\n return this.mean;\n }\n else {\n return 0;\n }\n };\n return WindowedMean;\n }());\n spine.WindowedMean = WindowedMean;\n})(spine || (spine = {}));\n(function () {\n if (!Math.fround) {\n Math.fround = (function (array) {\n return function (x) {\n return array[0] = x, array[0];\n };\n })(new Float32Array(1));\n }\n})();\nvar spine;\n(function (spine) {\n var Attachment = (function () {\n function Attachment(name) {\n if (name == null)\n throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n return Attachment;\n }());\n spine.Attachment = Attachment;\n var VertexAttachment = (function (_super) {\n __extends(VertexAttachment, _super);\n function VertexAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.id = (VertexAttachment.nextID++ & 65535) << 11;\n _this.worldVerticesLength = 0;\n _this.deformAttachment = _this;\n return _this;\n }\n VertexAttachment.prototype.computeWorldVertices = function (slot, start, count, worldVertices, offset, stride) {\n count = offset + (count >> 1) * stride;\n var skeleton = slot.bone.skeleton;\n var deformArray = slot.deform;\n var vertices = this.vertices;\n var bones = this.bones;\n if (bones == null) {\n if (deformArray.length > 0)\n vertices = deformArray;\n var bone = slot.bone;\n var x = bone.worldX;\n var y = bone.worldY;\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n for (var v_1 = start, w = offset; w < count; v_1 += 2, w += stride) {\n var vx = vertices[v_1], vy = vertices[v_1 + 1];\n worldVertices[w] = vx * a + vy * b + x;\n worldVertices[w + 1] = vx * c + vy * d + y;\n }\n return;\n }\n var v = 0, skip = 0;\n for (var i = 0; i < start; i += 2) {\n var n = bones[v];\n v += n + 1;\n skip += n;\n }\n var skeletonBones = skeleton.bones;\n if (deformArray.length == 0) {\n for (var w = offset, b = skip * 3; w < count; w += stride) {\n var wx = 0, wy = 0;\n var n = bones[v++];\n n += v;\n for (; v < n; v++, b += 3) {\n var bone = skeletonBones[bones[v]];\n var vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\n }\n worldVertices[w] = wx;\n worldVertices[w + 1] = wy;\n }\n }\n else {\n var deform = deformArray;\n for (var w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\n var wx = 0, wy = 0;\n var n = bones[v++];\n n += v;\n for (; v < n; v++, b += 3, f += 2) {\n var bone = skeletonBones[bones[v]];\n var vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\n }\n worldVertices[w] = wx;\n worldVertices[w + 1] = wy;\n }\n }\n };\n VertexAttachment.prototype.copyTo = function (attachment) {\n if (this.bones != null) {\n attachment.bones = new Array(this.bones.length);\n spine.Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\n }\n else\n attachment.bones = null;\n if (this.vertices != null) {\n attachment.vertices = spine.Utils.newFloatArray(this.vertices.length);\n spine.Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\n }\n else\n attachment.vertices = null;\n attachment.worldVerticesLength = this.worldVerticesLength;\n attachment.deformAttachment = this.deformAttachment;\n };\n VertexAttachment.nextID = 0;\n return VertexAttachment;\n }(Attachment));\n spine.VertexAttachment = VertexAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var AttachmentType;\n (function (AttachmentType) {\n AttachmentType[AttachmentType[\"Region\"] = 0] = \"Region\";\n AttachmentType[AttachmentType[\"BoundingBox\"] = 1] = \"BoundingBox\";\n AttachmentType[AttachmentType[\"Mesh\"] = 2] = \"Mesh\";\n AttachmentType[AttachmentType[\"LinkedMesh\"] = 3] = \"LinkedMesh\";\n AttachmentType[AttachmentType[\"Path\"] = 4] = \"Path\";\n AttachmentType[AttachmentType[\"Point\"] = 5] = \"Point\";\n AttachmentType[AttachmentType[\"Clipping\"] = 6] = \"Clipping\";\n })(AttachmentType = spine.AttachmentType || (spine.AttachmentType = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var BoundingBoxAttachment = (function (_super) {\n __extends(BoundingBoxAttachment, _super);\n function BoundingBoxAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.color = new spine.Color(1, 1, 1, 1);\n return _this;\n }\n BoundingBoxAttachment.prototype.copy = function () {\n var copy = new BoundingBoxAttachment(name);\n this.copyTo(copy);\n copy.color.setFromColor(this.color);\n return copy;\n };\n return BoundingBoxAttachment;\n }(spine.VertexAttachment));\n spine.BoundingBoxAttachment = BoundingBoxAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var ClippingAttachment = (function (_super) {\n __extends(ClippingAttachment, _super);\n function ClippingAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.color = new spine.Color(0.2275, 0.2275, 0.8078, 1);\n return _this;\n }\n ClippingAttachment.prototype.copy = function () {\n var copy = new ClippingAttachment(name);\n this.copyTo(copy);\n copy.endSlot = this.endSlot;\n copy.color.setFromColor(this.color);\n return copy;\n };\n return ClippingAttachment;\n }(spine.VertexAttachment));\n spine.ClippingAttachment = ClippingAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var MeshAttachment = (function (_super) {\n __extends(MeshAttachment, _super);\n function MeshAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.color = new spine.Color(1, 1, 1, 1);\n _this.tempColor = new spine.Color(0, 0, 0, 0);\n return _this;\n }\n MeshAttachment.prototype.updateUVs = function () {\n var regionUVs = this.regionUVs;\n if (this.uvs == null || this.uvs.length != regionUVs.length)\n this.uvs = spine.Utils.newFloatArray(regionUVs.length);\n var uvs = this.uvs;\n var n = this.uvs.length;\n var u = this.region.u, v = this.region.v, width = 0, height = 0;\n if (this.region instanceof spine.TextureAtlasRegion) {\n var region = this.region;\n var textureWidth = region.texture.getImage().width, textureHeight = region.texture.getImage().height;\n switch (region.degrees) {\n case 90:\n u -= (region.originalHeight - region.offsetY - region.height) / textureWidth;\n v -= (region.originalWidth - region.offsetX - region.width) / textureHeight;\n width = region.originalHeight / textureWidth;\n height = region.originalWidth / textureHeight;\n for (var i = 0; i < n; i += 2) {\n uvs[i] = u + regionUVs[i + 1] * width;\n uvs[i + 1] = v + (1 - regionUVs[i]) * height;\n }\n return;\n case 180:\n u -= (region.originalWidth - region.offsetX - region.width) / textureWidth;\n v -= region.offsetY / textureHeight;\n width = region.originalWidth / textureWidth;\n height = region.originalHeight / textureHeight;\n for (var i = 0; i < n; i += 2) {\n uvs[i] = u + (1 - regionUVs[i]) * width;\n uvs[i + 1] = v + (1 - regionUVs[i + 1]) * height;\n }\n return;\n case 270:\n u -= region.offsetY / textureWidth;\n v -= region.offsetX / textureHeight;\n width = region.originalHeight / textureWidth;\n height = region.originalWidth / textureHeight;\n for (var i = 0; i < n; i += 2) {\n uvs[i] = u + (1 - regionUVs[i + 1]) * width;\n uvs[i + 1] = v + regionUVs[i] * height;\n }\n return;\n }\n u -= region.offsetX / textureWidth;\n v -= (region.originalHeight - region.offsetY - region.height) / textureHeight;\n width = region.originalWidth / textureWidth;\n height = region.originalHeight / textureHeight;\n }\n else if (this.region == null) {\n u = v = 0;\n width = height = 1;\n }\n else {\n width = this.region.u2 - u;\n height = this.region.v2 - v;\n }\n for (var i = 0; i < n; i += 2) {\n uvs[i] = u + regionUVs[i] * width;\n uvs[i + 1] = v + regionUVs[i + 1] * height;\n }\n };\n MeshAttachment.prototype.getParentMesh = function () {\n return this.parentMesh;\n };\n MeshAttachment.prototype.setParentMesh = function (parentMesh) {\n this.parentMesh = parentMesh;\n if (parentMesh != null) {\n this.bones = parentMesh.bones;\n this.vertices = parentMesh.vertices;\n this.worldVerticesLength = parentMesh.worldVerticesLength;\n this.regionUVs = parentMesh.regionUVs;\n this.triangles = parentMesh.triangles;\n this.hullLength = parentMesh.hullLength;\n this.worldVerticesLength = parentMesh.worldVerticesLength;\n }\n };\n MeshAttachment.prototype.copy = function () {\n if (this.parentMesh != null)\n return this.newLinkedMesh();\n var copy = new MeshAttachment(this.name);\n copy.region = this.region;\n copy.path = this.path;\n copy.color.setFromColor(this.color);\n this.copyTo(copy);\n copy.regionUVs = new Array(this.regionUVs.length);\n spine.Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\n copy.uvs = new Array(this.uvs.length);\n spine.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);\n copy.triangles = new Array(this.triangles.length);\n spine.Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\n copy.hullLength = this.hullLength;\n if (this.edges != null) {\n copy.edges = new Array(this.edges.length);\n spine.Utils.arrayCopy(this.edges, 0, copy.edges, 0, this.edges.length);\n }\n copy.width = this.width;\n copy.height = this.height;\n return copy;\n };\n MeshAttachment.prototype.newLinkedMesh = function () {\n var copy = new MeshAttachment(this.name);\n copy.region = this.region;\n copy.path = this.path;\n copy.color.setFromColor(this.color);\n copy.deformAttachment = this.deformAttachment;\n copy.setParentMesh(this.parentMesh != null ? this.parentMesh : this);\n copy.updateUVs();\n return copy;\n };\n return MeshAttachment;\n }(spine.VertexAttachment));\n spine.MeshAttachment = MeshAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var PathAttachment = (function (_super) {\n __extends(PathAttachment, _super);\n function PathAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.closed = false;\n _this.constantSpeed = false;\n _this.color = new spine.Color(1, 1, 1, 1);\n return _this;\n }\n PathAttachment.prototype.copy = function () {\n var copy = new PathAttachment(name);\n this.copyTo(copy);\n copy.lengths = new Array(this.lengths.length);\n spine.Utils.arrayCopy(this.lengths, 0, copy.lengths, 0, this.lengths.length);\n copy.closed = closed;\n copy.constantSpeed = this.constantSpeed;\n copy.color.setFromColor(this.color);\n return copy;\n };\n return PathAttachment;\n }(spine.VertexAttachment));\n spine.PathAttachment = PathAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var PointAttachment = (function (_super) {\n __extends(PointAttachment, _super);\n function PointAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.color = new spine.Color(0.38, 0.94, 0, 1);\n return _this;\n }\n PointAttachment.prototype.computeWorldPosition = function (bone, point) {\n point.x = this.x * bone.a + this.y * bone.b + bone.worldX;\n point.y = this.x * bone.c + this.y * bone.d + bone.worldY;\n return point;\n };\n PointAttachment.prototype.computeWorldRotation = function (bone) {\n var cos = spine.MathUtils.cosDeg(this.rotation), sin = spine.MathUtils.sinDeg(this.rotation);\n var x = cos * bone.a + sin * bone.b;\n var y = cos * bone.c + sin * bone.d;\n return Math.atan2(y, x) * spine.MathUtils.radDeg;\n };\n PointAttachment.prototype.copy = function () {\n var copy = new PointAttachment(name);\n copy.x = this.x;\n copy.y = this.y;\n copy.rotation = this.rotation;\n copy.color.setFromColor(this.color);\n return copy;\n };\n return PointAttachment;\n }(spine.VertexAttachment));\n spine.PointAttachment = PointAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var RegionAttachment = (function (_super) {\n __extends(RegionAttachment, _super);\n function RegionAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.x = 0;\n _this.y = 0;\n _this.scaleX = 1;\n _this.scaleY = 1;\n _this.rotation = 0;\n _this.width = 0;\n _this.height = 0;\n _this.color = new spine.Color(1, 1, 1, 1);\n _this.offset = spine.Utils.newFloatArray(8);\n _this.uvs = spine.Utils.newFloatArray(8);\n _this.tempColor = new spine.Color(1, 1, 1, 1);\n return _this;\n }\n RegionAttachment.prototype.updateOffset = function () {\n var regionScaleX = this.width / this.region.originalWidth * this.scaleX;\n var regionScaleY = this.height / this.region.originalHeight * this.scaleY;\n var localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\n var localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\n var localX2 = localX + this.region.width * regionScaleX;\n var localY2 = localY + this.region.height * regionScaleY;\n var radians = this.rotation * Math.PI / 180;\n var cos = Math.cos(radians);\n var sin = Math.sin(radians);\n var localXCos = localX * cos + this.x;\n var localXSin = localX * sin;\n var localYCos = localY * cos + this.y;\n var localYSin = localY * sin;\n var localX2Cos = localX2 * cos + this.x;\n var localX2Sin = localX2 * sin;\n var localY2Cos = localY2 * cos + this.y;\n var localY2Sin = localY2 * sin;\n var offset = this.offset;\n offset[RegionAttachment.OX1] = localXCos - localYSin;\n offset[RegionAttachment.OY1] = localYCos + localXSin;\n offset[RegionAttachment.OX2] = localXCos - localY2Sin;\n offset[RegionAttachment.OY2] = localY2Cos + localXSin;\n offset[RegionAttachment.OX3] = localX2Cos - localY2Sin;\n offset[RegionAttachment.OY3] = localY2Cos + localX2Sin;\n offset[RegionAttachment.OX4] = localX2Cos - localYSin;\n offset[RegionAttachment.OY4] = localYCos + localX2Sin;\n };\n RegionAttachment.prototype.setRegion = function (region) {\n this.region = region;\n var uvs = this.uvs;\n if (region.rotate) {\n uvs[2] = region.u;\n uvs[3] = region.v2;\n uvs[4] = region.u;\n uvs[5] = region.v;\n uvs[6] = region.u2;\n uvs[7] = region.v;\n uvs[0] = region.u2;\n uvs[1] = region.v2;\n }\n else {\n uvs[0] = region.u;\n uvs[1] = region.v2;\n uvs[2] = region.u;\n uvs[3] = region.v;\n uvs[4] = region.u2;\n uvs[5] = region.v;\n uvs[6] = region.u2;\n uvs[7] = region.v2;\n }\n };\n RegionAttachment.prototype.computeWorldVertices = function (bone, worldVertices, offset, stride) {\n var vertexOffset = this.offset;\n var x = bone.worldX, y = bone.worldY;\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n var offsetX = 0, offsetY = 0;\n offsetX = vertexOffset[RegionAttachment.OX1];\n offsetY = vertexOffset[RegionAttachment.OY1];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[RegionAttachment.OX2];\n offsetY = vertexOffset[RegionAttachment.OY2];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[RegionAttachment.OX3];\n offsetY = vertexOffset[RegionAttachment.OY3];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[RegionAttachment.OX4];\n offsetY = vertexOffset[RegionAttachment.OY4];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n };\n RegionAttachment.prototype.copy = function () {\n var copy = new RegionAttachment(this.name);\n copy.region = this.region;\n copy.rendererObject = this.rendererObject;\n copy.path = this.path;\n copy.x = this.x;\n copy.y = this.y;\n copy.scaleX = this.scaleX;\n copy.scaleY = this.scaleY;\n copy.rotation = this.rotation;\n copy.width = this.width;\n copy.height = this.height;\n spine.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\n spine.Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\n copy.color.setFromColor(this.color);\n return copy;\n };\n RegionAttachment.OX1 = 0;\n RegionAttachment.OY1 = 1;\n RegionAttachment.OX2 = 2;\n RegionAttachment.OY2 = 3;\n RegionAttachment.OX3 = 4;\n RegionAttachment.OY3 = 5;\n RegionAttachment.OX4 = 6;\n RegionAttachment.OY4 = 7;\n RegionAttachment.X1 = 0;\n RegionAttachment.Y1 = 1;\n RegionAttachment.C1R = 2;\n RegionAttachment.C1G = 3;\n RegionAttachment.C1B = 4;\n RegionAttachment.C1A = 5;\n RegionAttachment.U1 = 6;\n RegionAttachment.V1 = 7;\n RegionAttachment.X2 = 8;\n RegionAttachment.Y2 = 9;\n RegionAttachment.C2R = 10;\n RegionAttachment.C2G = 11;\n RegionAttachment.C2B = 12;\n RegionAttachment.C2A = 13;\n RegionAttachment.U2 = 14;\n RegionAttachment.V2 = 15;\n RegionAttachment.X3 = 16;\n RegionAttachment.Y3 = 17;\n RegionAttachment.C3R = 18;\n RegionAttachment.C3G = 19;\n RegionAttachment.C3B = 20;\n RegionAttachment.C3A = 21;\n RegionAttachment.U3 = 22;\n RegionAttachment.V3 = 23;\n RegionAttachment.X4 = 24;\n RegionAttachment.Y4 = 25;\n RegionAttachment.C4R = 26;\n RegionAttachment.C4G = 27;\n RegionAttachment.C4B = 28;\n RegionAttachment.C4A = 29;\n RegionAttachment.U4 = 30;\n RegionAttachment.V4 = 31;\n return RegionAttachment;\n }(spine.Attachment));\n spine.RegionAttachment = RegionAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var JitterEffect = (function () {\n function JitterEffect(jitterX, jitterY) {\n this.jitterX = 0;\n this.jitterY = 0;\n this.jitterX = jitterX;\n this.jitterY = jitterY;\n }\n JitterEffect.prototype.begin = function (skeleton) {\n };\n JitterEffect.prototype.transform = function (position, uv, light, dark) {\n position.x += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\n position.y += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\n };\n JitterEffect.prototype.end = function () {\n };\n return JitterEffect;\n }());\n spine.JitterEffect = JitterEffect;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SwirlEffect = (function () {\n function SwirlEffect(radius) {\n this.centerX = 0;\n this.centerY = 0;\n this.radius = 0;\n this.angle = 0;\n this.worldX = 0;\n this.worldY = 0;\n this.radius = radius;\n }\n SwirlEffect.prototype.begin = function (skeleton) {\n this.worldX = skeleton.x + this.centerX;\n this.worldY = skeleton.y + this.centerY;\n };\n SwirlEffect.prototype.transform = function (position, uv, light, dark) {\n var radAngle = this.angle * spine.MathUtils.degreesToRadians;\n var x = position.x - this.worldX;\n var y = position.y - this.worldY;\n var dist = Math.sqrt(x * x + y * y);\n if (dist < this.radius) {\n var theta = SwirlEffect.interpolation.apply(0, radAngle, (this.radius - dist) / this.radius);\n var cos = Math.cos(theta);\n var sin = Math.sin(theta);\n position.x = cos * x - sin * y + this.worldX;\n position.y = sin * x + cos * y + this.worldY;\n }\n };\n SwirlEffect.prototype.end = function () {\n };\n SwirlEffect.interpolation = new spine.PowOut(2);\n return SwirlEffect;\n }());\n spine.SwirlEffect = SwirlEffect;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var canvas;\n (function (canvas) {\n var AssetManager = (function (_super) {\n __extends(AssetManager, _super);\n function AssetManager(pathPrefix) {\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\n return _super.call(this, function (image) { return new spine.canvas.CanvasTexture(image); }, pathPrefix) || this;\n }\n return AssetManager;\n }(spine.AssetManager));\n canvas.AssetManager = AssetManager;\n })(canvas = spine.canvas || (spine.canvas = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var canvas;\n (function (canvas) {\n var CanvasTexture = (function (_super) {\n __extends(CanvasTexture, _super);\n function CanvasTexture(image) {\n return _super.call(this, image) || this;\n }\n CanvasTexture.prototype.setFilters = function (minFilter, magFilter) { };\n CanvasTexture.prototype.setWraps = function (uWrap, vWrap) { };\n CanvasTexture.prototype.dispose = function () { };\n return CanvasTexture;\n }(spine.Texture));\n canvas.CanvasTexture = CanvasTexture;\n })(canvas = spine.canvas || (spine.canvas = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var canvas;\n (function (canvas) {\n var SkeletonRenderer = (function () {\n function SkeletonRenderer(context) {\n this.triangleRendering = false;\n this.debugRendering = false;\n this.vertices = spine.Utils.newFloatArray(8 * 1024);\n this.tempColor = new spine.Color();\n this.ctx = context;\n }\n SkeletonRenderer.prototype.draw = function (skeleton) {\n if (this.triangleRendering)\n this.drawTriangles(skeleton);\n else\n this.drawImages(skeleton);\n };\n SkeletonRenderer.prototype.drawImages = function (skeleton) {\n var ctx = this.ctx;\n var drawOrder = skeleton.drawOrder;\n if (this.debugRendering)\n ctx.strokeStyle = \"green\";\n ctx.save();\n for (var i = 0, n = drawOrder.length; i < n; i++) {\n var slot = drawOrder[i];\n if (!slot.bone.active)\n continue;\n var attachment = slot.getAttachment();\n var regionAttachment = null;\n var region = null;\n var image = null;\n if (attachment instanceof spine.RegionAttachment) {\n regionAttachment = attachment;\n region = regionAttachment.region;\n image = region.texture.getImage();\n }\n else\n continue;\n var skeleton_1 = slot.bone.skeleton;\n var skeletonColor = skeleton_1.color;\n var slotColor = slot.color;\n var regionColor = regionAttachment.color;\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\n var color = this.tempColor;\n color.set(skeletonColor.r * slotColor.r * regionColor.r, skeletonColor.g * slotColor.g * regionColor.g, skeletonColor.b * slotColor.b * regionColor.b, alpha);\n var att = attachment;\n var bone = slot.bone;\n var w = region.width;\n var h = region.height;\n ctx.save();\n ctx.transform(bone.a, bone.c, bone.b, bone.d, bone.worldX, bone.worldY);\n ctx.translate(attachment.offset[0], attachment.offset[1]);\n ctx.rotate(attachment.rotation * Math.PI / 180);\n var atlasScale = att.width / w;\n ctx.scale(atlasScale * attachment.scaleX, atlasScale * attachment.scaleY);\n ctx.translate(w / 2, h / 2);\n if (attachment.region.rotate) {\n var t = w;\n w = h;\n h = t;\n ctx.rotate(-Math.PI / 2);\n }\n ctx.scale(1, -1);\n ctx.translate(-w / 2, -h / 2);\n if (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) {\n ctx.globalAlpha = color.a;\n }\n ctx.drawImage(image, region.x, region.y, w, h, 0, 0, w, h);\n if (this.debugRendering)\n ctx.strokeRect(0, 0, w, h);\n ctx.restore();\n }\n ctx.restore();\n };\n SkeletonRenderer.prototype.drawTriangles = function (skeleton) {\n var blendMode = null;\n var vertices = this.vertices;\n var triangles = null;\n var drawOrder = skeleton.drawOrder;\n for (var i = 0, n = drawOrder.length; i < n; i++) {\n var slot = drawOrder[i];\n var attachment = slot.getAttachment();\n var texture = null;\n var region = null;\n if (attachment instanceof spine.RegionAttachment) {\n var regionAttachment = attachment;\n vertices = this.computeRegionVertices(slot, regionAttachment, false);\n triangles = SkeletonRenderer.QUAD_TRIANGLES;\n region = regionAttachment.region;\n texture = region.texture.getImage();\n }\n else if (attachment instanceof spine.MeshAttachment) {\n var mesh = attachment;\n vertices = this.computeMeshVertices(slot, mesh, false);\n triangles = mesh.triangles;\n texture = mesh.region.renderObject.texture.getImage();\n }\n else\n continue;\n if (texture != null) {\n var slotBlendMode = slot.data.blendMode;\n if (slotBlendMode != blendMode) {\n blendMode = slotBlendMode;\n }\n var skeleton_2 = slot.bone.skeleton;\n var skeletonColor = skeleton_2.color;\n var slotColor = slot.color;\n var attachmentColor = attachment.color;\n var alpha = skeletonColor.a * slotColor.a * attachmentColor.a;\n var color = this.tempColor;\n color.set(skeletonColor.r * slotColor.r * attachmentColor.r, skeletonColor.g * slotColor.g * attachmentColor.g, skeletonColor.b * slotColor.b * attachmentColor.b, alpha);\n var ctx = this.ctx;\n if (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) {\n ctx.globalAlpha = color.a;\n }\n for (var j = 0; j < triangles.length; j += 3) {\n var t1 = triangles[j] * 8, t2 = triangles[j + 1] * 8, t3 = triangles[j + 2] * 8;\n var x0 = vertices[t1], y0 = vertices[t1 + 1], u0 = vertices[t1 + 6], v0 = vertices[t1 + 7];\n var x1 = vertices[t2], y1 = vertices[t2 + 1], u1 = vertices[t2 + 6], v1 = vertices[t2 + 7];\n var x2 = vertices[t3], y2 = vertices[t3 + 1], u2 = vertices[t3 + 6], v2 = vertices[t3 + 7];\n this.drawTriangle(texture, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2);\n if (this.debugRendering) {\n ctx.strokeStyle = \"green\";\n ctx.beginPath();\n ctx.moveTo(x0, y0);\n ctx.lineTo(x1, y1);\n ctx.lineTo(x2, y2);\n ctx.lineTo(x0, y0);\n ctx.stroke();\n }\n }\n }\n }\n this.ctx.globalAlpha = 1;\n };\n SkeletonRenderer.prototype.drawTriangle = function (img, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2) {\n var ctx = this.ctx;\n u0 *= img.width;\n v0 *= img.height;\n u1 *= img.width;\n v1 *= img.height;\n u2 *= img.width;\n v2 *= img.height;\n ctx.beginPath();\n ctx.moveTo(x0, y0);\n ctx.lineTo(x1, y1);\n ctx.lineTo(x2, y2);\n ctx.closePath();\n x1 -= x0;\n y1 -= y0;\n x2 -= x0;\n y2 -= y0;\n u1 -= u0;\n v1 -= v0;\n u2 -= u0;\n v2 -= v0;\n var det = 1 / (u1 * v2 - u2 * v1), a = (v2 * x1 - v1 * x2) * det, b = (v2 * y1 - v1 * y2) * det, c = (u1 * x2 - u2 * x1) * det, d = (u1 * y2 - u2 * y1) * det, e = x0 - a * u0 - c * v0, f = y0 - b * u0 - d * v0;\n ctx.save();\n ctx.transform(a, b, c, d, e, f);\n ctx.clip();\n ctx.drawImage(img, 0, 0);\n ctx.restore();\n };\n SkeletonRenderer.prototype.computeRegionVertices = function (slot, region, pma) {\n var skeleton = slot.bone.skeleton;\n var skeletonColor = skeleton.color;\n var slotColor = slot.color;\n var regionColor = region.color;\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\n var multiplier = pma ? alpha : 1;\n var color = this.tempColor;\n color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha);\n region.computeWorldVertices(slot.bone, this.vertices, 0, SkeletonRenderer.VERTEX_SIZE);\n var vertices = this.vertices;\n var uvs = region.uvs;\n vertices[spine.RegionAttachment.C1R] = color.r;\n vertices[spine.RegionAttachment.C1G] = color.g;\n vertices[spine.RegionAttachment.C1B] = color.b;\n vertices[spine.RegionAttachment.C1A] = color.a;\n vertices[spine.RegionAttachment.U1] = uvs[0];\n vertices[spine.RegionAttachment.V1] = uvs[1];\n vertices[spine.RegionAttachment.C2R] = color.r;\n vertices[spine.RegionAttachment.C2G] = color.g;\n vertices[spine.RegionAttachment.C2B] = color.b;\n vertices[spine.RegionAttachment.C2A] = color.a;\n vertices[spine.RegionAttachment.U2] = uvs[2];\n vertices[spine.RegionAttachment.V2] = uvs[3];\n vertices[spine.RegionAttachment.C3R] = color.r;\n vertices[spine.RegionAttachment.C3G] = color.g;\n vertices[spine.RegionAttachment.C3B] = color.b;\n vertices[spine.RegionAttachment.C3A] = color.a;\n vertices[spine.RegionAttachment.U3] = uvs[4];\n vertices[spine.RegionAttachment.V3] = uvs[5];\n vertices[spine.RegionAttachment.C4R] = color.r;\n vertices[spine.RegionAttachment.C4G] = color.g;\n vertices[spine.RegionAttachment.C4B] = color.b;\n vertices[spine.RegionAttachment.C4A] = color.a;\n vertices[spine.RegionAttachment.U4] = uvs[6];\n vertices[spine.RegionAttachment.V4] = uvs[7];\n return vertices;\n };\n SkeletonRenderer.prototype.computeMeshVertices = function (slot, mesh, pma) {\n var skeleton = slot.bone.skeleton;\n var skeletonColor = skeleton.color;\n var slotColor = slot.color;\n var regionColor = mesh.color;\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\n var multiplier = pma ? alpha : 1;\n var color = this.tempColor;\n color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha);\n var numVertices = mesh.worldVerticesLength / 2;\n if (this.vertices.length < mesh.worldVerticesLength) {\n this.vertices = spine.Utils.newFloatArray(mesh.worldVerticesLength);\n }\n var vertices = this.vertices;\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, SkeletonRenderer.VERTEX_SIZE);\n var uvs = mesh.uvs;\n for (var i = 0, n = numVertices, u = 0, v = 2; i < n; i++) {\n vertices[v++] = color.r;\n vertices[v++] = color.g;\n vertices[v++] = color.b;\n vertices[v++] = color.a;\n vertices[v++] = uvs[u++];\n vertices[v++] = uvs[u++];\n v += 2;\n }\n return vertices;\n };\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\n SkeletonRenderer.VERTEX_SIZE = 2 + 2 + 4;\n return SkeletonRenderer;\n }());\n canvas.SkeletonRenderer = SkeletonRenderer;\n })(canvas = spine.canvas || (spine.canvas = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var AssetManager = (function (_super) {\n __extends(AssetManager, _super);\n function AssetManager(context, pathPrefix) {\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\n return _super.call(this, function (image) {\n return new spine.webgl.GLTexture(context, image);\n }, pathPrefix) || this;\n }\n return AssetManager;\n }(spine.AssetManager));\n webgl.AssetManager = AssetManager;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var OrthoCamera = (function () {\n function OrthoCamera(viewportWidth, viewportHeight) {\n this.position = new webgl.Vector3(0, 0, 0);\n this.direction = new webgl.Vector3(0, 0, -1);\n this.up = new webgl.Vector3(0, 1, 0);\n this.near = 0;\n this.far = 100;\n this.zoom = 1;\n this.viewportWidth = 0;\n this.viewportHeight = 0;\n this.projectionView = new webgl.Matrix4();\n this.inverseProjectionView = new webgl.Matrix4();\n this.projection = new webgl.Matrix4();\n this.view = new webgl.Matrix4();\n this.tmp = new webgl.Vector3();\n this.viewportWidth = viewportWidth;\n this.viewportHeight = viewportHeight;\n this.update();\n }\n OrthoCamera.prototype.update = function () {\n var projection = this.projection;\n var view = this.view;\n var projectionView = this.projectionView;\n var inverseProjectionView = this.inverseProjectionView;\n var zoom = this.zoom, viewportWidth = this.viewportWidth, viewportHeight = this.viewportHeight;\n projection.ortho(zoom * (-viewportWidth / 2), zoom * (viewportWidth / 2), zoom * (-viewportHeight / 2), zoom * (viewportHeight / 2), this.near, this.far);\n view.lookAt(this.position, this.direction, this.up);\n projectionView.set(projection.values);\n projectionView.multiply(view);\n inverseProjectionView.set(projectionView.values).invert();\n };\n OrthoCamera.prototype.screenToWorld = function (screenCoords, screenWidth, screenHeight) {\n var x = screenCoords.x, y = screenHeight - screenCoords.y - 1;\n var tmp = this.tmp;\n tmp.x = (2 * x) / screenWidth - 1;\n tmp.y = (2 * y) / screenHeight - 1;\n tmp.z = (2 * screenCoords.z) - 1;\n tmp.project(this.inverseProjectionView);\n screenCoords.set(tmp.x, tmp.y, tmp.z);\n return screenCoords;\n };\n OrthoCamera.prototype.setViewport = function (viewportWidth, viewportHeight) {\n this.viewportWidth = viewportWidth;\n this.viewportHeight = viewportHeight;\n };\n return OrthoCamera;\n }());\n webgl.OrthoCamera = OrthoCamera;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var GLTexture = (function (_super) {\n __extends(GLTexture, _super);\n function GLTexture(context, image, useMipMaps) {\n if (useMipMaps === void 0) { useMipMaps = false; }\n var _this = _super.call(this, image) || this;\n _this.texture = null;\n _this.boundUnit = 0;\n _this.useMipMaps = false;\n _this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\n _this.useMipMaps = useMipMaps;\n _this.restore();\n _this.context.addRestorable(_this);\n return _this;\n }\n GLTexture.prototype.setFilters = function (minFilter, magFilter) {\n var gl = this.context.gl;\n this.bind();\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, minFilter);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, GLTexture.validateMagFilter(magFilter));\n };\n GLTexture.validateMagFilter = function (magFilter) {\n switch (magFilter) {\n case spine.TextureFilter.MipMap:\n case spine.TextureFilter.MipMapLinearLinear:\n case spine.TextureFilter.MipMapLinearNearest:\n case spine.TextureFilter.MipMapNearestLinear:\n case spine.TextureFilter.MipMapNearestNearest:\n return spine.TextureFilter.Linear;\n default:\n return magFilter;\n }\n };\n GLTexture.prototype.setWraps = function (uWrap, vWrap) {\n var gl = this.context.gl;\n this.bind();\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, uWrap);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, vWrap);\n };\n GLTexture.prototype.update = function (useMipMaps) {\n var gl = this.context.gl;\n if (!this.texture) {\n this.texture = this.context.gl.createTexture();\n }\n this.bind();\n if (GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL)\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this._image);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, useMipMaps ? gl.LINEAR_MIPMAP_LINEAR : gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n if (useMipMaps)\n gl.generateMipmap(gl.TEXTURE_2D);\n };\n GLTexture.prototype.restore = function () {\n this.texture = null;\n this.update(this.useMipMaps);\n };\n GLTexture.prototype.bind = function (unit) {\n if (unit === void 0) { unit = 0; }\n var gl = this.context.gl;\n this.boundUnit = unit;\n gl.activeTexture(gl.TEXTURE0 + unit);\n gl.bindTexture(gl.TEXTURE_2D, this.texture);\n };\n GLTexture.prototype.unbind = function () {\n var gl = this.context.gl;\n gl.activeTexture(gl.TEXTURE0 + this.boundUnit);\n gl.bindTexture(gl.TEXTURE_2D, null);\n };\n GLTexture.prototype.dispose = function () {\n this.context.removeRestorable(this);\n var gl = this.context.gl;\n gl.deleteTexture(this.texture);\n };\n GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL = false;\n return GLTexture;\n }(spine.Texture));\n webgl.GLTexture = GLTexture;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n webgl.M00 = 0;\n webgl.M01 = 4;\n webgl.M02 = 8;\n webgl.M03 = 12;\n webgl.M10 = 1;\n webgl.M11 = 5;\n webgl.M12 = 9;\n webgl.M13 = 13;\n webgl.M20 = 2;\n webgl.M21 = 6;\n webgl.M22 = 10;\n webgl.M23 = 14;\n webgl.M30 = 3;\n webgl.M31 = 7;\n webgl.M32 = 11;\n webgl.M33 = 15;\n var Matrix4 = (function () {\n function Matrix4() {\n this.temp = new Float32Array(16);\n this.values = new Float32Array(16);\n var v = this.values;\n v[webgl.M00] = 1;\n v[webgl.M11] = 1;\n v[webgl.M22] = 1;\n v[webgl.M33] = 1;\n }\n Matrix4.prototype.set = function (values) {\n this.values.set(values);\n return this;\n };\n Matrix4.prototype.transpose = function () {\n var t = this.temp;\n var v = this.values;\n t[webgl.M00] = v[webgl.M00];\n t[webgl.M01] = v[webgl.M10];\n t[webgl.M02] = v[webgl.M20];\n t[webgl.M03] = v[webgl.M30];\n t[webgl.M10] = v[webgl.M01];\n t[webgl.M11] = v[webgl.M11];\n t[webgl.M12] = v[webgl.M21];\n t[webgl.M13] = v[webgl.M31];\n t[webgl.M20] = v[webgl.M02];\n t[webgl.M21] = v[webgl.M12];\n t[webgl.M22] = v[webgl.M22];\n t[webgl.M23] = v[webgl.M32];\n t[webgl.M30] = v[webgl.M03];\n t[webgl.M31] = v[webgl.M13];\n t[webgl.M32] = v[webgl.M23];\n t[webgl.M33] = v[webgl.M33];\n return this.set(t);\n };\n Matrix4.prototype.identity = function () {\n var v = this.values;\n v[webgl.M00] = 1;\n v[webgl.M01] = 0;\n v[webgl.M02] = 0;\n v[webgl.M03] = 0;\n v[webgl.M10] = 0;\n v[webgl.M11] = 1;\n v[webgl.M12] = 0;\n v[webgl.M13] = 0;\n v[webgl.M20] = 0;\n v[webgl.M21] = 0;\n v[webgl.M22] = 1;\n v[webgl.M23] = 0;\n v[webgl.M30] = 0;\n v[webgl.M31] = 0;\n v[webgl.M32] = 0;\n v[webgl.M33] = 1;\n return this;\n };\n Matrix4.prototype.invert = function () {\n var v = this.values;\n var t = this.temp;\n var l_det = v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03]\n + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03]\n - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13]\n - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13]\n + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23]\n + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23]\n - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33]\n - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\n if (l_det == 0)\n throw new Error(\"non-invertible matrix\");\n var inv_det = 1.0 / l_det;\n t[webgl.M00] = v[webgl.M12] * v[webgl.M23] * v[webgl.M31] - v[webgl.M13] * v[webgl.M22] * v[webgl.M31] + v[webgl.M13] * v[webgl.M21] * v[webgl.M32]\n - v[webgl.M11] * v[webgl.M23] * v[webgl.M32] - v[webgl.M12] * v[webgl.M21] * v[webgl.M33] + v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\n t[webgl.M01] = v[webgl.M03] * v[webgl.M22] * v[webgl.M31] - v[webgl.M02] * v[webgl.M23] * v[webgl.M31] - v[webgl.M03] * v[webgl.M21] * v[webgl.M32]\n + v[webgl.M01] * v[webgl.M23] * v[webgl.M32] + v[webgl.M02] * v[webgl.M21] * v[webgl.M33] - v[webgl.M01] * v[webgl.M22] * v[webgl.M33];\n t[webgl.M02] = v[webgl.M02] * v[webgl.M13] * v[webgl.M31] - v[webgl.M03] * v[webgl.M12] * v[webgl.M31] + v[webgl.M03] * v[webgl.M11] * v[webgl.M32]\n - v[webgl.M01] * v[webgl.M13] * v[webgl.M32] - v[webgl.M02] * v[webgl.M11] * v[webgl.M33] + v[webgl.M01] * v[webgl.M12] * v[webgl.M33];\n t[webgl.M03] = v[webgl.M03] * v[webgl.M12] * v[webgl.M21] - v[webgl.M02] * v[webgl.M13] * v[webgl.M21] - v[webgl.M03] * v[webgl.M11] * v[webgl.M22]\n + v[webgl.M01] * v[webgl.M13] * v[webgl.M22] + v[webgl.M02] * v[webgl.M11] * v[webgl.M23] - v[webgl.M01] * v[webgl.M12] * v[webgl.M23];\n t[webgl.M10] = v[webgl.M13] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M20] * v[webgl.M32]\n + v[webgl.M10] * v[webgl.M23] * v[webgl.M32] + v[webgl.M12] * v[webgl.M20] * v[webgl.M33] - v[webgl.M10] * v[webgl.M22] * v[webgl.M33];\n t[webgl.M11] = v[webgl.M02] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M22] * v[webgl.M30] + v[webgl.M03] * v[webgl.M20] * v[webgl.M32]\n - v[webgl.M00] * v[webgl.M23] * v[webgl.M32] - v[webgl.M02] * v[webgl.M20] * v[webgl.M33] + v[webgl.M00] * v[webgl.M22] * v[webgl.M33];\n t[webgl.M12] = v[webgl.M03] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M10] * v[webgl.M32]\n + v[webgl.M00] * v[webgl.M13] * v[webgl.M32] + v[webgl.M02] * v[webgl.M10] * v[webgl.M33] - v[webgl.M00] * v[webgl.M12] * v[webgl.M33];\n t[webgl.M13] = v[webgl.M02] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M12] * v[webgl.M20] + v[webgl.M03] * v[webgl.M10] * v[webgl.M22]\n - v[webgl.M00] * v[webgl.M13] * v[webgl.M22] - v[webgl.M02] * v[webgl.M10] * v[webgl.M23] + v[webgl.M00] * v[webgl.M12] * v[webgl.M23];\n t[webgl.M20] = v[webgl.M11] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M21] * v[webgl.M30] + v[webgl.M13] * v[webgl.M20] * v[webgl.M31]\n - v[webgl.M10] * v[webgl.M23] * v[webgl.M31] - v[webgl.M11] * v[webgl.M20] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M33];\n t[webgl.M21] = v[webgl.M03] * v[webgl.M21] * v[webgl.M30] - v[webgl.M01] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M20] * v[webgl.M31]\n + v[webgl.M00] * v[webgl.M23] * v[webgl.M31] + v[webgl.M01] * v[webgl.M20] * v[webgl.M33] - v[webgl.M00] * v[webgl.M21] * v[webgl.M33];\n t[webgl.M22] = v[webgl.M01] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M11] * v[webgl.M30] + v[webgl.M03] * v[webgl.M10] * v[webgl.M31]\n - v[webgl.M00] * v[webgl.M13] * v[webgl.M31] - v[webgl.M01] * v[webgl.M10] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M33];\n t[webgl.M23] = v[webgl.M03] * v[webgl.M11] * v[webgl.M20] - v[webgl.M01] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M10] * v[webgl.M21]\n + v[webgl.M00] * v[webgl.M13] * v[webgl.M21] + v[webgl.M01] * v[webgl.M10] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M23];\n t[webgl.M30] = v[webgl.M12] * v[webgl.M21] * v[webgl.M30] - v[webgl.M11] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M20] * v[webgl.M31]\n + v[webgl.M10] * v[webgl.M22] * v[webgl.M31] + v[webgl.M11] * v[webgl.M20] * v[webgl.M32] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32];\n t[webgl.M31] = v[webgl.M01] * v[webgl.M22] * v[webgl.M30] - v[webgl.M02] * v[webgl.M21] * v[webgl.M30] + v[webgl.M02] * v[webgl.M20] * v[webgl.M31]\n - v[webgl.M00] * v[webgl.M22] * v[webgl.M31] - v[webgl.M01] * v[webgl.M20] * v[webgl.M32] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32];\n t[webgl.M32] = v[webgl.M02] * v[webgl.M11] * v[webgl.M30] - v[webgl.M01] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M10] * v[webgl.M31]\n + v[webgl.M00] * v[webgl.M12] * v[webgl.M31] + v[webgl.M01] * v[webgl.M10] * v[webgl.M32] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32];\n t[webgl.M33] = v[webgl.M01] * v[webgl.M12] * v[webgl.M20] - v[webgl.M02] * v[webgl.M11] * v[webgl.M20] + v[webgl.M02] * v[webgl.M10] * v[webgl.M21]\n - v[webgl.M00] * v[webgl.M12] * v[webgl.M21] - v[webgl.M01] * v[webgl.M10] * v[webgl.M22] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22];\n v[webgl.M00] = t[webgl.M00] * inv_det;\n v[webgl.M01] = t[webgl.M01] * inv_det;\n v[webgl.M02] = t[webgl.M02] * inv_det;\n v[webgl.M03] = t[webgl.M03] * inv_det;\n v[webgl.M10] = t[webgl.M10] * inv_det;\n v[webgl.M11] = t[webgl.M11] * inv_det;\n v[webgl.M12] = t[webgl.M12] * inv_det;\n v[webgl.M13] = t[webgl.M13] * inv_det;\n v[webgl.M20] = t[webgl.M20] * inv_det;\n v[webgl.M21] = t[webgl.M21] * inv_det;\n v[webgl.M22] = t[webgl.M22] * inv_det;\n v[webgl.M23] = t[webgl.M23] * inv_det;\n v[webgl.M30] = t[webgl.M30] * inv_det;\n v[webgl.M31] = t[webgl.M31] * inv_det;\n v[webgl.M32] = t[webgl.M32] * inv_det;\n v[webgl.M33] = t[webgl.M33] * inv_det;\n return this;\n };\n Matrix4.prototype.determinant = function () {\n var v = this.values;\n return v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03]\n + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03]\n - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13]\n - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13]\n + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23]\n + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23]\n - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33]\n - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\n };\n Matrix4.prototype.translate = function (x, y, z) {\n var v = this.values;\n v[webgl.M03] += x;\n v[webgl.M13] += y;\n v[webgl.M23] += z;\n return this;\n };\n Matrix4.prototype.copy = function () {\n return new Matrix4().set(this.values);\n };\n Matrix4.prototype.projection = function (near, far, fovy, aspectRatio) {\n this.identity();\n var l_fd = (1.0 / Math.tan((fovy * (Math.PI / 180)) / 2.0));\n var l_a1 = (far + near) / (near - far);\n var l_a2 = (2 * far * near) / (near - far);\n var v = this.values;\n v[webgl.M00] = l_fd / aspectRatio;\n v[webgl.M10] = 0;\n v[webgl.M20] = 0;\n v[webgl.M30] = 0;\n v[webgl.M01] = 0;\n v[webgl.M11] = l_fd;\n v[webgl.M21] = 0;\n v[webgl.M31] = 0;\n v[webgl.M02] = 0;\n v[webgl.M12] = 0;\n v[webgl.M22] = l_a1;\n v[webgl.M32] = -1;\n v[webgl.M03] = 0;\n v[webgl.M13] = 0;\n v[webgl.M23] = l_a2;\n v[webgl.M33] = 0;\n return this;\n };\n Matrix4.prototype.ortho2d = function (x, y, width, height) {\n return this.ortho(x, x + width, y, y + height, 0, 1);\n };\n Matrix4.prototype.ortho = function (left, right, bottom, top, near, far) {\n this.identity();\n var x_orth = 2 / (right - left);\n var y_orth = 2 / (top - bottom);\n var z_orth = -2 / (far - near);\n var tx = -(right + left) / (right - left);\n var ty = -(top + bottom) / (top - bottom);\n var tz = -(far + near) / (far - near);\n var v = this.values;\n v[webgl.M00] = x_orth;\n v[webgl.M10] = 0;\n v[webgl.M20] = 0;\n v[webgl.M30] = 0;\n v[webgl.M01] = 0;\n v[webgl.M11] = y_orth;\n v[webgl.M21] = 0;\n v[webgl.M31] = 0;\n v[webgl.M02] = 0;\n v[webgl.M12] = 0;\n v[webgl.M22] = z_orth;\n v[webgl.M32] = 0;\n v[webgl.M03] = tx;\n v[webgl.M13] = ty;\n v[webgl.M23] = tz;\n v[webgl.M33] = 1;\n return this;\n };\n Matrix4.prototype.multiply = function (matrix) {\n var t = this.temp;\n var v = this.values;\n var m = matrix.values;\n t[webgl.M00] = v[webgl.M00] * m[webgl.M00] + v[webgl.M01] * m[webgl.M10] + v[webgl.M02] * m[webgl.M20] + v[webgl.M03] * m[webgl.M30];\n t[webgl.M01] = v[webgl.M00] * m[webgl.M01] + v[webgl.M01] * m[webgl.M11] + v[webgl.M02] * m[webgl.M21] + v[webgl.M03] * m[webgl.M31];\n t[webgl.M02] = v[webgl.M00] * m[webgl.M02] + v[webgl.M01] * m[webgl.M12] + v[webgl.M02] * m[webgl.M22] + v[webgl.M03] * m[webgl.M32];\n t[webgl.M03] = v[webgl.M00] * m[webgl.M03] + v[webgl.M01] * m[webgl.M13] + v[webgl.M02] * m[webgl.M23] + v[webgl.M03] * m[webgl.M33];\n t[webgl.M10] = v[webgl.M10] * m[webgl.M00] + v[webgl.M11] * m[webgl.M10] + v[webgl.M12] * m[webgl.M20] + v[webgl.M13] * m[webgl.M30];\n t[webgl.M11] = v[webgl.M10] * m[webgl.M01] + v[webgl.M11] * m[webgl.M11] + v[webgl.M12] * m[webgl.M21] + v[webgl.M13] * m[webgl.M31];\n t[webgl.M12] = v[webgl.M10] * m[webgl.M02] + v[webgl.M11] * m[webgl.M12] + v[webgl.M12] * m[webgl.M22] + v[webgl.M13] * m[webgl.M32];\n t[webgl.M13] = v[webgl.M10] * m[webgl.M03] + v[webgl.M11] * m[webgl.M13] + v[webgl.M12] * m[webgl.M23] + v[webgl.M13] * m[webgl.M33];\n t[webgl.M20] = v[webgl.M20] * m[webgl.M00] + v[webgl.M21] * m[webgl.M10] + v[webgl.M22] * m[webgl.M20] + v[webgl.M23] * m[webgl.M30];\n t[webgl.M21] = v[webgl.M20] * m[webgl.M01] + v[webgl.M21] * m[webgl.M11] + v[webgl.M22] * m[webgl.M21] + v[webgl.M23] * m[webgl.M31];\n t[webgl.M22] = v[webgl.M20] * m[webgl.M02] + v[webgl.M21] * m[webgl.M12] + v[webgl.M22] * m[webgl.M22] + v[webgl.M23] * m[webgl.M32];\n t[webgl.M23] = v[webgl.M20] * m[webgl.M03] + v[webgl.M21] * m[webgl.M13] + v[webgl.M22] * m[webgl.M23] + v[webgl.M23] * m[webgl.M33];\n t[webgl.M30] = v[webgl.M30] * m[webgl.M00] + v[webgl.M31] * m[webgl.M10] + v[webgl.M32] * m[webgl.M20] + v[webgl.M33] * m[webgl.M30];\n t[webgl.M31] = v[webgl.M30] * m[webgl.M01] + v[webgl.M31] * m[webgl.M11] + v[webgl.M32] * m[webgl.M21] + v[webgl.M33] * m[webgl.M31];\n t[webgl.M32] = v[webgl.M30] * m[webgl.M02] + v[webgl.M31] * m[webgl.M12] + v[webgl.M32] * m[webgl.M22] + v[webgl.M33] * m[webgl.M32];\n t[webgl.M33] = v[webgl.M30] * m[webgl.M03] + v[webgl.M31] * m[webgl.M13] + v[webgl.M32] * m[webgl.M23] + v[webgl.M33] * m[webgl.M33];\n return this.set(this.temp);\n };\n Matrix4.prototype.multiplyLeft = function (matrix) {\n var t = this.temp;\n var v = this.values;\n var m = matrix.values;\n t[webgl.M00] = m[webgl.M00] * v[webgl.M00] + m[webgl.M01] * v[webgl.M10] + m[webgl.M02] * v[webgl.M20] + m[webgl.M03] * v[webgl.M30];\n t[webgl.M01] = m[webgl.M00] * v[webgl.M01] + m[webgl.M01] * v[webgl.M11] + m[webgl.M02] * v[webgl.M21] + m[webgl.M03] * v[webgl.M31];\n t[webgl.M02] = m[webgl.M00] * v[webgl.M02] + m[webgl.M01] * v[webgl.M12] + m[webgl.M02] * v[webgl.M22] + m[webgl.M03] * v[webgl.M32];\n t[webgl.M03] = m[webgl.M00] * v[webgl.M03] + m[webgl.M01] * v[webgl.M13] + m[webgl.M02] * v[webgl.M23] + m[webgl.M03] * v[webgl.M33];\n t[webgl.M10] = m[webgl.M10] * v[webgl.M00] + m[webgl.M11] * v[webgl.M10] + m[webgl.M12] * v[webgl.M20] + m[webgl.M13] * v[webgl.M30];\n t[webgl.M11] = m[webgl.M10] * v[webgl.M01] + m[webgl.M11] * v[webgl.M11] + m[webgl.M12] * v[webgl.M21] + m[webgl.M13] * v[webgl.M31];\n t[webgl.M12] = m[webgl.M10] * v[webgl.M02] + m[webgl.M11] * v[webgl.M12] + m[webgl.M12] * v[webgl.M22] + m[webgl.M13] * v[webgl.M32];\n t[webgl.M13] = m[webgl.M10] * v[webgl.M03] + m[webgl.M11] * v[webgl.M13] + m[webgl.M12] * v[webgl.M23] + m[webgl.M13] * v[webgl.M33];\n t[webgl.M20] = m[webgl.M20] * v[webgl.M00] + m[webgl.M21] * v[webgl.M10] + m[webgl.M22] * v[webgl.M20] + m[webgl.M23] * v[webgl.M30];\n t[webgl.M21] = m[webgl.M20] * v[webgl.M01] + m[webgl.M21] * v[webgl.M11] + m[webgl.M22] * v[webgl.M21] + m[webgl.M23] * v[webgl.M31];\n t[webgl.M22] = m[webgl.M20] * v[webgl.M02] + m[webgl.M21] * v[webgl.M12] + m[webgl.M22] * v[webgl.M22] + m[webgl.M23] * v[webgl.M32];\n t[webgl.M23] = m[webgl.M20] * v[webgl.M03] + m[webgl.M21] * v[webgl.M13] + m[webgl.M22] * v[webgl.M23] + m[webgl.M23] * v[webgl.M33];\n t[webgl.M30] = m[webgl.M30] * v[webgl.M00] + m[webgl.M31] * v[webgl.M10] + m[webgl.M32] * v[webgl.M20] + m[webgl.M33] * v[webgl.M30];\n t[webgl.M31] = m[webgl.M30] * v[webgl.M01] + m[webgl.M31] * v[webgl.M11] + m[webgl.M32] * v[webgl.M21] + m[webgl.M33] * v[webgl.M31];\n t[webgl.M32] = m[webgl.M30] * v[webgl.M02] + m[webgl.M31] * v[webgl.M12] + m[webgl.M32] * v[webgl.M22] + m[webgl.M33] * v[webgl.M32];\n t[webgl.M33] = m[webgl.M30] * v[webgl.M03] + m[webgl.M31] * v[webgl.M13] + m[webgl.M32] * v[webgl.M23] + m[webgl.M33] * v[webgl.M33];\n return this.set(this.temp);\n };\n Matrix4.prototype.lookAt = function (position, direction, up) {\n Matrix4.initTemps();\n var xAxis = Matrix4.xAxis, yAxis = Matrix4.yAxis, zAxis = Matrix4.zAxis;\n zAxis.setFrom(direction).normalize();\n xAxis.setFrom(direction).normalize();\n xAxis.cross(up).normalize();\n yAxis.setFrom(xAxis).cross(zAxis).normalize();\n this.identity();\n var val = this.values;\n val[webgl.M00] = xAxis.x;\n val[webgl.M01] = xAxis.y;\n val[webgl.M02] = xAxis.z;\n val[webgl.M10] = yAxis.x;\n val[webgl.M11] = yAxis.y;\n val[webgl.M12] = yAxis.z;\n val[webgl.M20] = -zAxis.x;\n val[webgl.M21] = -zAxis.y;\n val[webgl.M22] = -zAxis.z;\n Matrix4.tmpMatrix.identity();\n Matrix4.tmpMatrix.values[webgl.M03] = -position.x;\n Matrix4.tmpMatrix.values[webgl.M13] = -position.y;\n Matrix4.tmpMatrix.values[webgl.M23] = -position.z;\n this.multiply(Matrix4.tmpMatrix);\n return this;\n };\n Matrix4.initTemps = function () {\n if (Matrix4.xAxis === null)\n Matrix4.xAxis = new webgl.Vector3();\n if (Matrix4.yAxis === null)\n Matrix4.yAxis = new webgl.Vector3();\n if (Matrix4.zAxis === null)\n Matrix4.zAxis = new webgl.Vector3();\n };\n Matrix4.xAxis = null;\n Matrix4.yAxis = null;\n Matrix4.zAxis = null;\n Matrix4.tmpMatrix = new Matrix4();\n return Matrix4;\n }());\n webgl.Matrix4 = Matrix4;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var Mesh = (function () {\n function Mesh(context, attributes, maxVertices, maxIndices) {\n this.attributes = attributes;\n this.verticesLength = 0;\n this.dirtyVertices = false;\n this.indicesLength = 0;\n this.dirtyIndices = false;\n this.elementsPerVertex = 0;\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\n this.elementsPerVertex = 0;\n for (var i = 0; i < attributes.length; i++) {\n this.elementsPerVertex += attributes[i].numElements;\n }\n this.vertices = new Float32Array(maxVertices * this.elementsPerVertex);\n this.indices = new Uint16Array(maxIndices);\n this.context.addRestorable(this);\n }\n Mesh.prototype.getAttributes = function () { return this.attributes; };\n Mesh.prototype.maxVertices = function () { return this.vertices.length / this.elementsPerVertex; };\n Mesh.prototype.numVertices = function () { return this.verticesLength / this.elementsPerVertex; };\n Mesh.prototype.setVerticesLength = function (length) {\n this.dirtyVertices = true;\n this.verticesLength = length;\n };\n Mesh.prototype.getVertices = function () { return this.vertices; };\n Mesh.prototype.maxIndices = function () { return this.indices.length; };\n Mesh.prototype.numIndices = function () { return this.indicesLength; };\n Mesh.prototype.setIndicesLength = function (length) {\n this.dirtyIndices = true;\n this.indicesLength = length;\n };\n Mesh.prototype.getIndices = function () { return this.indices; };\n ;\n Mesh.prototype.getVertexSizeInFloats = function () {\n var size = 0;\n for (var i = 0; i < this.attributes.length; i++) {\n var attribute = this.attributes[i];\n size += attribute.numElements;\n }\n return size;\n };\n Mesh.prototype.setVertices = function (vertices) {\n this.dirtyVertices = true;\n if (vertices.length > this.vertices.length)\n throw Error(\"Mesh can't store more than \" + this.maxVertices() + \" vertices\");\n this.vertices.set(vertices, 0);\n this.verticesLength = vertices.length;\n };\n Mesh.prototype.setIndices = function (indices) {\n this.dirtyIndices = true;\n if (indices.length > this.indices.length)\n throw Error(\"Mesh can't store more than \" + this.maxIndices() + \" indices\");\n this.indices.set(indices, 0);\n this.indicesLength = indices.length;\n };\n Mesh.prototype.draw = function (shader, primitiveType) {\n this.drawWithOffset(shader, primitiveType, 0, this.indicesLength > 0 ? this.indicesLength : this.verticesLength / this.elementsPerVertex);\n };\n Mesh.prototype.drawWithOffset = function (shader, primitiveType, offset, count) {\n var gl = this.context.gl;\n if (this.dirtyVertices || this.dirtyIndices)\n this.update();\n this.bind(shader);\n if (this.indicesLength > 0) {\n gl.drawElements(primitiveType, count, gl.UNSIGNED_SHORT, offset * 2);\n }\n else {\n gl.drawArrays(primitiveType, offset, count);\n }\n this.unbind(shader);\n };\n Mesh.prototype.bind = function (shader) {\n var gl = this.context.gl;\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\n var offset = 0;\n for (var i = 0; i < this.attributes.length; i++) {\n var attrib = this.attributes[i];\n var location_1 = shader.getAttributeLocation(attrib.name);\n gl.enableVertexAttribArray(location_1);\n gl.vertexAttribPointer(location_1, attrib.numElements, gl.FLOAT, false, this.elementsPerVertex * 4, offset * 4);\n offset += attrib.numElements;\n }\n if (this.indicesLength > 0)\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\n };\n Mesh.prototype.unbind = function (shader) {\n var gl = this.context.gl;\n for (var i = 0; i < this.attributes.length; i++) {\n var attrib = this.attributes[i];\n var location_2 = shader.getAttributeLocation(attrib.name);\n gl.disableVertexAttribArray(location_2);\n }\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\n if (this.indicesLength > 0)\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);\n };\n Mesh.prototype.update = function () {\n var gl = this.context.gl;\n if (this.dirtyVertices) {\n if (!this.verticesBuffer) {\n this.verticesBuffer = gl.createBuffer();\n }\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, this.vertices.subarray(0, this.verticesLength), gl.DYNAMIC_DRAW);\n this.dirtyVertices = false;\n }\n if (this.dirtyIndices) {\n if (!this.indicesBuffer) {\n this.indicesBuffer = gl.createBuffer();\n }\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, this.indices.subarray(0, this.indicesLength), gl.DYNAMIC_DRAW);\n this.dirtyIndices = false;\n }\n };\n Mesh.prototype.restore = function () {\n this.verticesBuffer = null;\n this.indicesBuffer = null;\n this.update();\n };\n Mesh.prototype.dispose = function () {\n this.context.removeRestorable(this);\n var gl = this.context.gl;\n gl.deleteBuffer(this.verticesBuffer);\n gl.deleteBuffer(this.indicesBuffer);\n };\n return Mesh;\n }());\n webgl.Mesh = Mesh;\n var VertexAttribute = (function () {\n function VertexAttribute(name, type, numElements) {\n this.name = name;\n this.type = type;\n this.numElements = numElements;\n }\n return VertexAttribute;\n }());\n webgl.VertexAttribute = VertexAttribute;\n var Position2Attribute = (function (_super) {\n __extends(Position2Attribute, _super);\n function Position2Attribute() {\n return _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 2) || this;\n }\n return Position2Attribute;\n }(VertexAttribute));\n webgl.Position2Attribute = Position2Attribute;\n var Position3Attribute = (function (_super) {\n __extends(Position3Attribute, _super);\n function Position3Attribute() {\n return _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 3) || this;\n }\n return Position3Attribute;\n }(VertexAttribute));\n webgl.Position3Attribute = Position3Attribute;\n var TexCoordAttribute = (function (_super) {\n __extends(TexCoordAttribute, _super);\n function TexCoordAttribute(unit) {\n if (unit === void 0) { unit = 0; }\n return _super.call(this, webgl.Shader.TEXCOORDS + (unit == 0 ? \"\" : unit), VertexAttributeType.Float, 2) || this;\n }\n return TexCoordAttribute;\n }(VertexAttribute));\n webgl.TexCoordAttribute = TexCoordAttribute;\n var ColorAttribute = (function (_super) {\n __extends(ColorAttribute, _super);\n function ColorAttribute() {\n return _super.call(this, webgl.Shader.COLOR, VertexAttributeType.Float, 4) || this;\n }\n return ColorAttribute;\n }(VertexAttribute));\n webgl.ColorAttribute = ColorAttribute;\n var Color2Attribute = (function (_super) {\n __extends(Color2Attribute, _super);\n function Color2Attribute() {\n return _super.call(this, webgl.Shader.COLOR2, VertexAttributeType.Float, 4) || this;\n }\n return Color2Attribute;\n }(VertexAttribute));\n webgl.Color2Attribute = Color2Attribute;\n var VertexAttributeType;\n (function (VertexAttributeType) {\n VertexAttributeType[VertexAttributeType[\"Float\"] = 0] = \"Float\";\n })(VertexAttributeType = webgl.VertexAttributeType || (webgl.VertexAttributeType = {}));\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var PolygonBatcher = (function () {\n function PolygonBatcher(context, twoColorTint, maxVertices) {\n if (twoColorTint === void 0) { twoColorTint = true; }\n if (maxVertices === void 0) { maxVertices = 10920; }\n this.isDrawing = false;\n this.shader = null;\n this.lastTexture = null;\n this.verticesLength = 0;\n this.indicesLength = 0;\n if (maxVertices > 10920)\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\n var attributes = twoColorTint ?\n [new webgl.Position2Attribute(), new webgl.ColorAttribute(), new webgl.TexCoordAttribute(), new webgl.Color2Attribute()] :\n [new webgl.Position2Attribute(), new webgl.ColorAttribute(), new webgl.TexCoordAttribute()];\n this.mesh = new webgl.Mesh(context, attributes, maxVertices, maxVertices * 3);\n this.srcBlend = this.context.gl.SRC_ALPHA;\n this.dstBlend = this.context.gl.ONE_MINUS_SRC_ALPHA;\n }\n PolygonBatcher.prototype.begin = function (shader) {\n var gl = this.context.gl;\n if (this.isDrawing)\n throw new Error(\"PolygonBatch is already drawing. Call PolygonBatch.end() before calling PolygonBatch.begin()\");\n this.drawCalls = 0;\n this.shader = shader;\n this.lastTexture = null;\n this.isDrawing = true;\n gl.enable(gl.BLEND);\n gl.blendFunc(this.srcBlend, this.dstBlend);\n };\n PolygonBatcher.prototype.setBlendMode = function (srcBlend, dstBlend) {\n var gl = this.context.gl;\n this.srcBlend = srcBlend;\n this.dstBlend = dstBlend;\n if (this.isDrawing) {\n this.flush();\n gl.blendFunc(this.srcBlend, this.dstBlend);\n }\n };\n PolygonBatcher.prototype.draw = function (texture, vertices, indices) {\n if (texture != this.lastTexture) {\n this.flush();\n this.lastTexture = texture;\n }\n else if (this.verticesLength + vertices.length > this.mesh.getVertices().length ||\n this.indicesLength + indices.length > this.mesh.getIndices().length) {\n this.flush();\n }\n var indexStart = this.mesh.numVertices();\n this.mesh.getVertices().set(vertices, this.verticesLength);\n this.verticesLength += vertices.length;\n this.mesh.setVerticesLength(this.verticesLength);\n var indicesArray = this.mesh.getIndices();\n for (var i = this.indicesLength, j = 0; j < indices.length; i++, j++)\n indicesArray[i] = indices[j] + indexStart;\n this.indicesLength += indices.length;\n this.mesh.setIndicesLength(this.indicesLength);\n };\n PolygonBatcher.prototype.flush = function () {\n var gl = this.context.gl;\n if (this.verticesLength == 0)\n return;\n this.lastTexture.bind();\n this.mesh.draw(this.shader, gl.TRIANGLES);\n this.verticesLength = 0;\n this.indicesLength = 0;\n this.mesh.setVerticesLength(0);\n this.mesh.setIndicesLength(0);\n this.drawCalls++;\n };\n PolygonBatcher.prototype.end = function () {\n var gl = this.context.gl;\n if (!this.isDrawing)\n throw new Error(\"PolygonBatch is not drawing. Call PolygonBatch.begin() before calling PolygonBatch.end()\");\n if (this.verticesLength > 0 || this.indicesLength > 0)\n this.flush();\n this.shader = null;\n this.lastTexture = null;\n this.isDrawing = false;\n gl.disable(gl.BLEND);\n };\n PolygonBatcher.prototype.getDrawCalls = function () { return this.drawCalls; };\n PolygonBatcher.prototype.dispose = function () {\n this.mesh.dispose();\n };\n return PolygonBatcher;\n }());\n webgl.PolygonBatcher = PolygonBatcher;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var SceneRenderer = (function () {\n function SceneRenderer(canvas, context, twoColorTint) {\n if (twoColorTint === void 0) { twoColorTint = true; }\n this.twoColorTint = false;\n this.activeRenderer = null;\n this.QUAD = [\n 0, 0, 1, 1, 1, 1, 0, 0,\n 0, 0, 1, 1, 1, 1, 0, 0,\n 0, 0, 1, 1, 1, 1, 0, 0,\n 0, 0, 1, 1, 1, 1, 0, 0,\n ];\n this.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\n this.WHITE = new spine.Color(1, 1, 1, 1);\n this.canvas = canvas;\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\n this.twoColorTint = twoColorTint;\n this.camera = new webgl.OrthoCamera(canvas.width, canvas.height);\n this.batcherShader = twoColorTint ? webgl.Shader.newTwoColoredTextured(this.context) : webgl.Shader.newColoredTextured(this.context);\n this.batcher = new webgl.PolygonBatcher(this.context, twoColorTint);\n this.shapesShader = webgl.Shader.newColored(this.context);\n this.shapes = new webgl.ShapeRenderer(this.context);\n this.skeletonRenderer = new webgl.SkeletonRenderer(this.context, twoColorTint);\n this.skeletonDebugRenderer = new webgl.SkeletonDebugRenderer(this.context);\n }\n SceneRenderer.prototype.begin = function () {\n this.camera.update();\n this.enableRenderer(this.batcher);\n };\n SceneRenderer.prototype.drawSkeleton = function (skeleton, premultipliedAlpha, slotRangeStart, slotRangeEnd) {\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\n if (slotRangeStart === void 0) { slotRangeStart = -1; }\n if (slotRangeEnd === void 0) { slotRangeEnd = -1; }\n this.enableRenderer(this.batcher);\n this.skeletonRenderer.premultipliedAlpha = premultipliedAlpha;\n this.skeletonRenderer.draw(this.batcher, skeleton, slotRangeStart, slotRangeEnd);\n };\n SceneRenderer.prototype.drawSkeletonDebug = function (skeleton, premultipliedAlpha, ignoredBones) {\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\n if (ignoredBones === void 0) { ignoredBones = null; }\n this.enableRenderer(this.shapes);\n this.skeletonDebugRenderer.premultipliedAlpha = premultipliedAlpha;\n this.skeletonDebugRenderer.draw(this.shapes, skeleton, ignoredBones);\n };\n SceneRenderer.prototype.drawTexture = function (texture, x, y, width, height, color) {\n if (color === void 0) { color = null; }\n this.enableRenderer(this.batcher);\n if (color === null)\n color = this.WHITE;\n var quad = this.QUAD;\n var i = 0;\n quad[i++] = x;\n quad[i++] = y;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = 0;\n quad[i++] = 1;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x + width;\n quad[i++] = y;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = 1;\n quad[i++] = 1;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x + width;\n quad[i++] = y + height;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = 1;\n quad[i++] = 0;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x;\n quad[i++] = y + height;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = 0;\n quad[i++] = 0;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\n };\n SceneRenderer.prototype.drawTextureUV = function (texture, x, y, width, height, u, v, u2, v2, color) {\n if (color === void 0) { color = null; }\n this.enableRenderer(this.batcher);\n if (color === null)\n color = this.WHITE;\n var quad = this.QUAD;\n var i = 0;\n quad[i++] = x;\n quad[i++] = y;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = u;\n quad[i++] = v;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x + width;\n quad[i++] = y;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = u2;\n quad[i++] = v;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x + width;\n quad[i++] = y + height;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = u2;\n quad[i++] = v2;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x;\n quad[i++] = y + height;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = u;\n quad[i++] = v2;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\n };\n SceneRenderer.prototype.drawTextureRotated = function (texture, x, y, width, height, pivotX, pivotY, angle, color, premultipliedAlpha) {\n if (color === void 0) { color = null; }\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\n this.enableRenderer(this.batcher);\n if (color === null)\n color = this.WHITE;\n var quad = this.QUAD;\n var worldOriginX = x + pivotX;\n var worldOriginY = y + pivotY;\n var fx = -pivotX;\n var fy = -pivotY;\n var fx2 = width - pivotX;\n var fy2 = height - pivotY;\n var p1x = fx;\n var p1y = fy;\n var p2x = fx;\n var p2y = fy2;\n var p3x = fx2;\n var p3y = fy2;\n var p4x = fx2;\n var p4y = fy;\n var x1 = 0;\n var y1 = 0;\n var x2 = 0;\n var y2 = 0;\n var x3 = 0;\n var y3 = 0;\n var x4 = 0;\n var y4 = 0;\n if (angle != 0) {\n var cos = spine.MathUtils.cosDeg(angle);\n var sin = spine.MathUtils.sinDeg(angle);\n x1 = cos * p1x - sin * p1y;\n y1 = sin * p1x + cos * p1y;\n x4 = cos * p2x - sin * p2y;\n y4 = sin * p2x + cos * p2y;\n x3 = cos * p3x - sin * p3y;\n y3 = sin * p3x + cos * p3y;\n x2 = x3 + (x1 - x4);\n y2 = y3 + (y1 - y4);\n }\n else {\n x1 = p1x;\n y1 = p1y;\n x4 = p2x;\n y4 = p2y;\n x3 = p3x;\n y3 = p3y;\n x2 = p4x;\n y2 = p4y;\n }\n x1 += worldOriginX;\n y1 += worldOriginY;\n x2 += worldOriginX;\n y2 += worldOriginY;\n x3 += worldOriginX;\n y3 += worldOriginY;\n x4 += worldOriginX;\n y4 += worldOriginY;\n var i = 0;\n quad[i++] = x1;\n quad[i++] = y1;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = 0;\n quad[i++] = 1;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x2;\n quad[i++] = y2;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = 1;\n quad[i++] = 1;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x3;\n quad[i++] = y3;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = 1;\n quad[i++] = 0;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x4;\n quad[i++] = y4;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = 0;\n quad[i++] = 0;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\n };\n SceneRenderer.prototype.drawRegion = function (region, x, y, width, height, color, premultipliedAlpha) {\n if (color === void 0) { color = null; }\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\n this.enableRenderer(this.batcher);\n if (color === null)\n color = this.WHITE;\n var quad = this.QUAD;\n var i = 0;\n quad[i++] = x;\n quad[i++] = y;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = region.u;\n quad[i++] = region.v2;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x + width;\n quad[i++] = y;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = region.u2;\n quad[i++] = region.v2;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x + width;\n quad[i++] = y + height;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = region.u2;\n quad[i++] = region.v;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x;\n quad[i++] = y + height;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = region.u;\n quad[i++] = region.v;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n this.batcher.draw(region.texture, quad, this.QUAD_TRIANGLES);\n };\n SceneRenderer.prototype.line = function (x, y, x2, y2, color, color2) {\n if (color === void 0) { color = null; }\n if (color2 === void 0) { color2 = null; }\n this.enableRenderer(this.shapes);\n this.shapes.line(x, y, x2, y2, color);\n };\n SceneRenderer.prototype.triangle = function (filled, x, y, x2, y2, x3, y3, color, color2, color3) {\n if (color === void 0) { color = null; }\n if (color2 === void 0) { color2 = null; }\n if (color3 === void 0) { color3 = null; }\n this.enableRenderer(this.shapes);\n this.shapes.triangle(filled, x, y, x2, y2, x3, y3, color, color2, color3);\n };\n SceneRenderer.prototype.quad = function (filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\n if (color === void 0) { color = null; }\n if (color2 === void 0) { color2 = null; }\n if (color3 === void 0) { color3 = null; }\n if (color4 === void 0) { color4 = null; }\n this.enableRenderer(this.shapes);\n this.shapes.quad(filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4);\n };\n SceneRenderer.prototype.rect = function (filled, x, y, width, height, color) {\n if (color === void 0) { color = null; }\n this.enableRenderer(this.shapes);\n this.shapes.rect(filled, x, y, width, height, color);\n };\n SceneRenderer.prototype.rectLine = function (filled, x1, y1, x2, y2, width, color) {\n if (color === void 0) { color = null; }\n this.enableRenderer(this.shapes);\n this.shapes.rectLine(filled, x1, y1, x2, y2, width, color);\n };\n SceneRenderer.prototype.polygon = function (polygonVertices, offset, count, color) {\n if (color === void 0) { color = null; }\n this.enableRenderer(this.shapes);\n this.shapes.polygon(polygonVertices, offset, count, color);\n };\n SceneRenderer.prototype.circle = function (filled, x, y, radius, color, segments) {\n if (color === void 0) { color = null; }\n if (segments === void 0) { segments = 0; }\n this.enableRenderer(this.shapes);\n this.shapes.circle(filled, x, y, radius, color, segments);\n };\n SceneRenderer.prototype.curve = function (x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\n if (color === void 0) { color = null; }\n this.enableRenderer(this.shapes);\n this.shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color);\n };\n SceneRenderer.prototype.end = function () {\n if (this.activeRenderer === this.batcher)\n this.batcher.end();\n else if (this.activeRenderer === this.shapes)\n this.shapes.end();\n this.activeRenderer = null;\n };\n SceneRenderer.prototype.resize = function (resizeMode) {\n var canvas = this.canvas;\n var w = canvas.clientWidth;\n var h = canvas.clientHeight;\n if (canvas.width != w || canvas.height != h) {\n canvas.width = w;\n canvas.height = h;\n }\n this.context.gl.viewport(0, 0, canvas.width, canvas.height);\n if (resizeMode === ResizeMode.Stretch) {\n }\n else if (resizeMode === ResizeMode.Expand) {\n this.camera.setViewport(w, h);\n }\n else if (resizeMode === ResizeMode.Fit) {\n var sourceWidth = canvas.width, sourceHeight = canvas.height;\n var targetWidth = this.camera.viewportWidth, targetHeight = this.camera.viewportHeight;\n var targetRatio = targetHeight / targetWidth;\n var sourceRatio = sourceHeight / sourceWidth;\n var scale = targetRatio < sourceRatio ? targetWidth / sourceWidth : targetHeight / sourceHeight;\n this.camera.viewportWidth = sourceWidth * scale;\n this.camera.viewportHeight = sourceHeight * scale;\n }\n this.camera.update();\n };\n SceneRenderer.prototype.enableRenderer = function (renderer) {\n if (this.activeRenderer === renderer)\n return;\n this.end();\n if (renderer instanceof webgl.PolygonBatcher) {\n this.batcherShader.bind();\n this.batcherShader.setUniform4x4f(webgl.Shader.MVP_MATRIX, this.camera.projectionView.values);\n this.batcherShader.setUniformi(\"u_texture\", 0);\n this.batcher.begin(this.batcherShader);\n this.activeRenderer = this.batcher;\n }\n else if (renderer instanceof webgl.ShapeRenderer) {\n this.shapesShader.bind();\n this.shapesShader.setUniform4x4f(webgl.Shader.MVP_MATRIX, this.camera.projectionView.values);\n this.shapes.begin(this.shapesShader);\n this.activeRenderer = this.shapes;\n }\n else {\n this.activeRenderer = this.skeletonDebugRenderer;\n }\n };\n SceneRenderer.prototype.dispose = function () {\n this.batcher.dispose();\n this.batcherShader.dispose();\n this.shapes.dispose();\n this.shapesShader.dispose();\n this.skeletonDebugRenderer.dispose();\n };\n return SceneRenderer;\n }());\n webgl.SceneRenderer = SceneRenderer;\n var ResizeMode;\n (function (ResizeMode) {\n ResizeMode[ResizeMode[\"Stretch\"] = 0] = \"Stretch\";\n ResizeMode[ResizeMode[\"Expand\"] = 1] = \"Expand\";\n ResizeMode[ResizeMode[\"Fit\"] = 2] = \"Fit\";\n })(ResizeMode = webgl.ResizeMode || (webgl.ResizeMode = {}));\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var Shader = (function () {\n function Shader(context, vertexShader, fragmentShader) {\n this.vertexShader = vertexShader;\n this.fragmentShader = fragmentShader;\n this.vs = null;\n this.fs = null;\n this.program = null;\n this.tmp2x2 = new Float32Array(2 * 2);\n this.tmp3x3 = new Float32Array(3 * 3);\n this.tmp4x4 = new Float32Array(4 * 4);\n this.vsSource = vertexShader;\n this.fsSource = fragmentShader;\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\n this.context.addRestorable(this);\n this.compile();\n }\n Shader.prototype.getProgram = function () { return this.program; };\n Shader.prototype.getVertexShader = function () { return this.vertexShader; };\n Shader.prototype.getFragmentShader = function () { return this.fragmentShader; };\n Shader.prototype.getVertexShaderSource = function () { return this.vsSource; };\n Shader.prototype.getFragmentSource = function () { return this.fsSource; };\n Shader.prototype.compile = function () {\n var gl = this.context.gl;\n try {\n this.vs = this.compileShader(gl.VERTEX_SHADER, this.vertexShader);\n this.fs = this.compileShader(gl.FRAGMENT_SHADER, this.fragmentShader);\n this.program = this.compileProgram(this.vs, this.fs);\n }\n catch (e) {\n this.dispose();\n throw e;\n }\n };\n Shader.prototype.compileShader = function (type, source) {\n var gl = this.context.gl;\n var shader = gl.createShader(type);\n gl.shaderSource(shader, source);\n gl.compileShader(shader);\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n var error = \"Couldn't compile shader: \" + gl.getShaderInfoLog(shader);\n gl.deleteShader(shader);\n if (!gl.isContextLost())\n throw new Error(error);\n }\n return shader;\n };\n Shader.prototype.compileProgram = function (vs, fs) {\n var gl = this.context.gl;\n var program = gl.createProgram();\n gl.attachShader(program, vs);\n gl.attachShader(program, fs);\n gl.linkProgram(program);\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n var error = \"Couldn't compile shader program: \" + gl.getProgramInfoLog(program);\n gl.deleteProgram(program);\n if (!gl.isContextLost())\n throw new Error(error);\n }\n return program;\n };\n Shader.prototype.restore = function () {\n this.compile();\n };\n Shader.prototype.bind = function () {\n this.context.gl.useProgram(this.program);\n };\n Shader.prototype.unbind = function () {\n this.context.gl.useProgram(null);\n };\n Shader.prototype.setUniformi = function (uniform, value) {\n this.context.gl.uniform1i(this.getUniformLocation(uniform), value);\n };\n Shader.prototype.setUniformf = function (uniform, value) {\n this.context.gl.uniform1f(this.getUniformLocation(uniform), value);\n };\n Shader.prototype.setUniform2f = function (uniform, value, value2) {\n this.context.gl.uniform2f(this.getUniformLocation(uniform), value, value2);\n };\n Shader.prototype.setUniform3f = function (uniform, value, value2, value3) {\n this.context.gl.uniform3f(this.getUniformLocation(uniform), value, value2, value3);\n };\n Shader.prototype.setUniform4f = function (uniform, value, value2, value3, value4) {\n this.context.gl.uniform4f(this.getUniformLocation(uniform), value, value2, value3, value4);\n };\n Shader.prototype.setUniform2x2f = function (uniform, value) {\n var gl = this.context.gl;\n this.tmp2x2.set(value);\n gl.uniformMatrix2fv(this.getUniformLocation(uniform), false, this.tmp2x2);\n };\n Shader.prototype.setUniform3x3f = function (uniform, value) {\n var gl = this.context.gl;\n this.tmp3x3.set(value);\n gl.uniformMatrix3fv(this.getUniformLocation(uniform), false, this.tmp3x3);\n };\n Shader.prototype.setUniform4x4f = function (uniform, value) {\n var gl = this.context.gl;\n this.tmp4x4.set(value);\n gl.uniformMatrix4fv(this.getUniformLocation(uniform), false, this.tmp4x4);\n };\n Shader.prototype.getUniformLocation = function (uniform) {\n var gl = this.context.gl;\n var location = gl.getUniformLocation(this.program, uniform);\n if (!location && !gl.isContextLost())\n throw new Error(\"Couldn't find location for uniform \" + uniform);\n return location;\n };\n Shader.prototype.getAttributeLocation = function (attribute) {\n var gl = this.context.gl;\n var location = gl.getAttribLocation(this.program, attribute);\n if (location == -1 && !gl.isContextLost())\n throw new Error(\"Couldn't find location for attribute \" + attribute);\n return location;\n };\n Shader.prototype.dispose = function () {\n this.context.removeRestorable(this);\n var gl = this.context.gl;\n if (this.vs) {\n gl.deleteShader(this.vs);\n this.vs = null;\n }\n if (this.fs) {\n gl.deleteShader(this.fs);\n this.fs = null;\n }\n if (this.program) {\n gl.deleteProgram(this.program);\n this.program = null;\n }\n };\n Shader.newColoredTextured = function (context) {\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \" + Shader.POSITION + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR + \";\\n\\t\\t\\t\\tattribute vec2 \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\tuniform mat4 \" + Shader.MVP_MATRIX + \";\\n\\t\\t\\t\\tvarying vec4 v_color;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_color = \" + Shader.COLOR + \";\\n\\t\\t\\t\\t\\tv_texCoords = \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\t\\tgl_Position = \" + Shader.MVP_MATRIX + \" * \" + Shader.POSITION + \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_color;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\t\\t\\t\\tuniform sampler2D u_texture;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tgl_FragColor = v_color * texture2D(u_texture, v_texCoords);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\n return new Shader(context, vs, fs);\n };\n Shader.newTwoColoredTextured = function (context) {\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \" + Shader.POSITION + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR2 + \";\\n\\t\\t\\t\\tattribute vec2 \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\tuniform mat4 \" + Shader.MVP_MATRIX + \";\\n\\t\\t\\t\\tvarying vec4 v_light;\\n\\t\\t\\t\\tvarying vec4 v_dark;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_light = \" + Shader.COLOR + \";\\n\\t\\t\\t\\t\\tv_dark = \" + Shader.COLOR2 + \";\\n\\t\\t\\t\\t\\tv_texCoords = \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\t\\tgl_Position = \" + Shader.MVP_MATRIX + \" * \" + Shader.POSITION + \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_light;\\n\\t\\t\\t\\tvarying LOWP vec4 v_dark;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\t\\t\\t\\tuniform sampler2D u_texture;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tvec4 texColor = texture2D(u_texture, v_texCoords);\\n\\t\\t\\t\\t\\tgl_FragColor.a = texColor.a * v_light.a;\\n\\t\\t\\t\\t\\tgl_FragColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\n return new Shader(context, vs, fs);\n };\n Shader.newColored = function (context) {\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \" + Shader.POSITION + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR + \";\\n\\t\\t\\t\\tuniform mat4 \" + Shader.MVP_MATRIX + \";\\n\\t\\t\\t\\tvarying vec4 v_color;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_color = \" + Shader.COLOR + \";\\n\\t\\t\\t\\t\\tgl_Position = \" + Shader.MVP_MATRIX + \" * \" + Shader.POSITION + \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_color;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tgl_FragColor = v_color;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\n return new Shader(context, vs, fs);\n };\n Shader.MVP_MATRIX = \"u_projTrans\";\n Shader.POSITION = \"a_position\";\n Shader.COLOR = \"a_color\";\n Shader.COLOR2 = \"a_color2\";\n Shader.TEXCOORDS = \"a_texCoords\";\n Shader.SAMPLER = \"u_texture\";\n return Shader;\n }());\n webgl.Shader = Shader;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var ShapeRenderer = (function () {\n function ShapeRenderer(context, maxVertices) {\n if (maxVertices === void 0) { maxVertices = 10920; }\n this.isDrawing = false;\n this.shapeType = ShapeType.Filled;\n this.color = new spine.Color(1, 1, 1, 1);\n this.vertexIndex = 0;\n this.tmp = new spine.Vector2();\n if (maxVertices > 10920)\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\n this.mesh = new webgl.Mesh(context, [new webgl.Position2Attribute(), new webgl.ColorAttribute()], maxVertices, 0);\n this.srcBlend = this.context.gl.SRC_ALPHA;\n this.dstBlend = this.context.gl.ONE_MINUS_SRC_ALPHA;\n }\n ShapeRenderer.prototype.begin = function (shader) {\n if (this.isDrawing)\n throw new Error(\"ShapeRenderer.begin() has already been called\");\n this.shader = shader;\n this.vertexIndex = 0;\n this.isDrawing = true;\n var gl = this.context.gl;\n gl.enable(gl.BLEND);\n gl.blendFunc(this.srcBlend, this.dstBlend);\n };\n ShapeRenderer.prototype.setBlendMode = function (srcBlend, dstBlend) {\n var gl = this.context.gl;\n this.srcBlend = srcBlend;\n this.dstBlend = dstBlend;\n if (this.isDrawing) {\n this.flush();\n gl.blendFunc(this.srcBlend, this.dstBlend);\n }\n };\n ShapeRenderer.prototype.setColor = function (color) {\n this.color.setFromColor(color);\n };\n ShapeRenderer.prototype.setColorWith = function (r, g, b, a) {\n this.color.set(r, g, b, a);\n };\n ShapeRenderer.prototype.point = function (x, y, color) {\n if (color === void 0) { color = null; }\n this.check(ShapeType.Point, 1);\n if (color === null)\n color = this.color;\n this.vertex(x, y, color);\n };\n ShapeRenderer.prototype.line = function (x, y, x2, y2, color) {\n if (color === void 0) { color = null; }\n this.check(ShapeType.Line, 2);\n var vertices = this.mesh.getVertices();\n var idx = this.vertexIndex;\n if (color === null)\n color = this.color;\n this.vertex(x, y, color);\n this.vertex(x2, y2, color);\n };\n ShapeRenderer.prototype.triangle = function (filled, x, y, x2, y2, x3, y3, color, color2, color3) {\n if (color === void 0) { color = null; }\n if (color2 === void 0) { color2 = null; }\n if (color3 === void 0) { color3 = null; }\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\n var vertices = this.mesh.getVertices();\n var idx = this.vertexIndex;\n if (color === null)\n color = this.color;\n if (color2 === null)\n color2 = this.color;\n if (color3 === null)\n color3 = this.color;\n if (filled) {\n this.vertex(x, y, color);\n this.vertex(x2, y2, color2);\n this.vertex(x3, y3, color3);\n }\n else {\n this.vertex(x, y, color);\n this.vertex(x2, y2, color2);\n this.vertex(x2, y2, color);\n this.vertex(x3, y3, color2);\n this.vertex(x3, y3, color);\n this.vertex(x, y, color2);\n }\n };\n ShapeRenderer.prototype.quad = function (filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\n if (color === void 0) { color = null; }\n if (color2 === void 0) { color2 = null; }\n if (color3 === void 0) { color3 = null; }\n if (color4 === void 0) { color4 = null; }\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\n var vertices = this.mesh.getVertices();\n var idx = this.vertexIndex;\n if (color === null)\n color = this.color;\n if (color2 === null)\n color2 = this.color;\n if (color3 === null)\n color3 = this.color;\n if (color4 === null)\n color4 = this.color;\n if (filled) {\n this.vertex(x, y, color);\n this.vertex(x2, y2, color2);\n this.vertex(x3, y3, color3);\n this.vertex(x3, y3, color3);\n this.vertex(x4, y4, color4);\n this.vertex(x, y, color);\n }\n else {\n this.vertex(x, y, color);\n this.vertex(x2, y2, color2);\n this.vertex(x2, y2, color2);\n this.vertex(x3, y3, color3);\n this.vertex(x3, y3, color3);\n this.vertex(x4, y4, color4);\n this.vertex(x4, y4, color4);\n this.vertex(x, y, color);\n }\n };\n ShapeRenderer.prototype.rect = function (filled, x, y, width, height, color) {\n if (color === void 0) { color = null; }\n this.quad(filled, x, y, x + width, y, x + width, y + height, x, y + height, color, color, color, color);\n };\n ShapeRenderer.prototype.rectLine = function (filled, x1, y1, x2, y2, width, color) {\n if (color === void 0) { color = null; }\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 8);\n if (color === null)\n color = this.color;\n var t = this.tmp.set(y2 - y1, x1 - x2);\n t.normalize();\n width *= 0.5;\n var tx = t.x * width;\n var ty = t.y * width;\n if (!filled) {\n this.vertex(x1 + tx, y1 + ty, color);\n this.vertex(x1 - tx, y1 - ty, color);\n this.vertex(x2 + tx, y2 + ty, color);\n this.vertex(x2 - tx, y2 - ty, color);\n this.vertex(x2 + tx, y2 + ty, color);\n this.vertex(x1 + tx, y1 + ty, color);\n this.vertex(x2 - tx, y2 - ty, color);\n this.vertex(x1 - tx, y1 - ty, color);\n }\n else {\n this.vertex(x1 + tx, y1 + ty, color);\n this.vertex(x1 - tx, y1 - ty, color);\n this.vertex(x2 + tx, y2 + ty, color);\n this.vertex(x2 - tx, y2 - ty, color);\n this.vertex(x2 + tx, y2 + ty, color);\n this.vertex(x1 - tx, y1 - ty, color);\n }\n };\n ShapeRenderer.prototype.x = function (x, y, size) {\n this.line(x - size, y - size, x + size, y + size);\n this.line(x - size, y + size, x + size, y - size);\n };\n ShapeRenderer.prototype.polygon = function (polygonVertices, offset, count, color) {\n if (color === void 0) { color = null; }\n if (count < 3)\n throw new Error(\"Polygon must contain at least 3 vertices\");\n this.check(ShapeType.Line, count * 2);\n if (color === null)\n color = this.color;\n var vertices = this.mesh.getVertices();\n var idx = this.vertexIndex;\n offset <<= 1;\n count <<= 1;\n var firstX = polygonVertices[offset];\n var firstY = polygonVertices[offset + 1];\n var last = offset + count;\n for (var i = offset, n = offset + count - 2; i < n; i += 2) {\n var x1 = polygonVertices[i];\n var y1 = polygonVertices[i + 1];\n var x2 = 0;\n var y2 = 0;\n if (i + 2 >= last) {\n x2 = firstX;\n y2 = firstY;\n }\n else {\n x2 = polygonVertices[i + 2];\n y2 = polygonVertices[i + 3];\n }\n this.vertex(x1, y1, color);\n this.vertex(x2, y2, color);\n }\n };\n ShapeRenderer.prototype.circle = function (filled, x, y, radius, color, segments) {\n if (color === void 0) { color = null; }\n if (segments === void 0) { segments = 0; }\n if (segments === 0)\n segments = Math.max(1, (6 * spine.MathUtils.cbrt(radius)) | 0);\n if (segments <= 0)\n throw new Error(\"segments must be > 0.\");\n if (color === null)\n color = this.color;\n var angle = 2 * spine.MathUtils.PI / segments;\n var cos = Math.cos(angle);\n var sin = Math.sin(angle);\n var cx = radius, cy = 0;\n if (!filled) {\n this.check(ShapeType.Line, segments * 2 + 2);\n for (var i = 0; i < segments; i++) {\n this.vertex(x + cx, y + cy, color);\n var temp_1 = cx;\n cx = cos * cx - sin * cy;\n cy = sin * temp_1 + cos * cy;\n this.vertex(x + cx, y + cy, color);\n }\n this.vertex(x + cx, y + cy, color);\n }\n else {\n this.check(ShapeType.Filled, segments * 3 + 3);\n segments--;\n for (var i = 0; i < segments; i++) {\n this.vertex(x, y, color);\n this.vertex(x + cx, y + cy, color);\n var temp_2 = cx;\n cx = cos * cx - sin * cy;\n cy = sin * temp_2 + cos * cy;\n this.vertex(x + cx, y + cy, color);\n }\n this.vertex(x, y, color);\n this.vertex(x + cx, y + cy, color);\n }\n var temp = cx;\n cx = radius;\n cy = 0;\n this.vertex(x + cx, y + cy, color);\n };\n ShapeRenderer.prototype.curve = function (x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\n if (color === void 0) { color = null; }\n this.check(ShapeType.Line, segments * 2 + 2);\n if (color === null)\n color = this.color;\n var subdiv_step = 1 / segments;\n var subdiv_step2 = subdiv_step * subdiv_step;\n var subdiv_step3 = subdiv_step * subdiv_step * subdiv_step;\n var pre1 = 3 * subdiv_step;\n var pre2 = 3 * subdiv_step2;\n var pre4 = 6 * subdiv_step2;\n var pre5 = 6 * subdiv_step3;\n var tmp1x = x1 - cx1 * 2 + cx2;\n var tmp1y = y1 - cy1 * 2 + cy2;\n var tmp2x = (cx1 - cx2) * 3 - x1 + x2;\n var tmp2y = (cy1 - cy2) * 3 - y1 + y2;\n var fx = x1;\n var fy = y1;\n var dfx = (cx1 - x1) * pre1 + tmp1x * pre2 + tmp2x * subdiv_step3;\n var dfy = (cy1 - y1) * pre1 + tmp1y * pre2 + tmp2y * subdiv_step3;\n var ddfx = tmp1x * pre4 + tmp2x * pre5;\n var ddfy = tmp1y * pre4 + tmp2y * pre5;\n var dddfx = tmp2x * pre5;\n var dddfy = tmp2y * pre5;\n while (segments-- > 0) {\n this.vertex(fx, fy, color);\n fx += dfx;\n fy += dfy;\n dfx += ddfx;\n dfy += ddfy;\n ddfx += dddfx;\n ddfy += dddfy;\n this.vertex(fx, fy, color);\n }\n this.vertex(fx, fy, color);\n this.vertex(x2, y2, color);\n };\n ShapeRenderer.prototype.vertex = function (x, y, color) {\n var idx = this.vertexIndex;\n var vertices = this.mesh.getVertices();\n vertices[idx++] = x;\n vertices[idx++] = y;\n vertices[idx++] = color.r;\n vertices[idx++] = color.g;\n vertices[idx++] = color.b;\n vertices[idx++] = color.a;\n this.vertexIndex = idx;\n };\n ShapeRenderer.prototype.end = function () {\n if (!this.isDrawing)\n throw new Error(\"ShapeRenderer.begin() has not been called\");\n this.flush();\n this.context.gl.disable(this.context.gl.BLEND);\n this.isDrawing = false;\n };\n ShapeRenderer.prototype.flush = function () {\n if (this.vertexIndex == 0)\n return;\n this.mesh.setVerticesLength(this.vertexIndex);\n this.mesh.draw(this.shader, this.shapeType);\n this.vertexIndex = 0;\n };\n ShapeRenderer.prototype.check = function (shapeType, numVertices) {\n if (!this.isDrawing)\n throw new Error(\"ShapeRenderer.begin() has not been called\");\n if (this.shapeType == shapeType) {\n if (this.mesh.maxVertices() - this.mesh.numVertices() < numVertices)\n this.flush();\n else\n return;\n }\n else {\n this.flush();\n this.shapeType = shapeType;\n }\n };\n ShapeRenderer.prototype.dispose = function () {\n this.mesh.dispose();\n };\n return ShapeRenderer;\n }());\n webgl.ShapeRenderer = ShapeRenderer;\n var ShapeType;\n (function (ShapeType) {\n ShapeType[ShapeType[\"Point\"] = 0] = \"Point\";\n ShapeType[ShapeType[\"Line\"] = 1] = \"Line\";\n ShapeType[ShapeType[\"Filled\"] = 4] = \"Filled\";\n })(ShapeType = webgl.ShapeType || (webgl.ShapeType = {}));\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var SkeletonDebugRenderer = (function () {\n function SkeletonDebugRenderer(context) {\n this.boneLineColor = new spine.Color(1, 0, 0, 1);\n this.boneOriginColor = new spine.Color(0, 1, 0, 1);\n this.attachmentLineColor = new spine.Color(0, 0, 1, 0.5);\n this.triangleLineColor = new spine.Color(1, 0.64, 0, 0.5);\n this.pathColor = new spine.Color().setFromString(\"FF7F00\");\n this.clipColor = new spine.Color(0.8, 0, 0, 2);\n this.aabbColor = new spine.Color(0, 1, 0, 0.5);\n this.drawBones = true;\n this.drawRegionAttachments = true;\n this.drawBoundingBoxes = true;\n this.drawMeshHull = true;\n this.drawMeshTriangles = true;\n this.drawPaths = true;\n this.drawSkeletonXY = false;\n this.drawClipping = true;\n this.premultipliedAlpha = false;\n this.scale = 1;\n this.boneWidth = 2;\n this.bounds = new spine.SkeletonBounds();\n this.temp = new Array();\n this.vertices = spine.Utils.newFloatArray(2 * 1024);\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\n }\n SkeletonDebugRenderer.prototype.draw = function (shapes, skeleton, ignoredBones) {\n if (ignoredBones === void 0) { ignoredBones = null; }\n var skeletonX = skeleton.x;\n var skeletonY = skeleton.y;\n var gl = this.context.gl;\n var srcFunc = this.premultipliedAlpha ? gl.ONE : gl.SRC_ALPHA;\n shapes.setBlendMode(srcFunc, gl.ONE_MINUS_SRC_ALPHA);\n var bones = skeleton.bones;\n if (this.drawBones) {\n shapes.setColor(this.boneLineColor);\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\n continue;\n if (bone.parent == null)\n continue;\n var x = skeletonX + bone.data.length * bone.a + bone.worldX;\n var y = skeletonY + bone.data.length * bone.c + bone.worldY;\n shapes.rectLine(true, skeletonX + bone.worldX, skeletonY + bone.worldY, x, y, this.boneWidth * this.scale);\n }\n if (this.drawSkeletonXY)\n shapes.x(skeletonX, skeletonY, 4 * this.scale);\n }\n if (this.drawRegionAttachments) {\n shapes.setColor(this.attachmentLineColor);\n var slots = skeleton.slots;\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n var attachment = slot.getAttachment();\n if (attachment instanceof spine.RegionAttachment) {\n var regionAttachment = attachment;\n var vertices = this.vertices;\n regionAttachment.computeWorldVertices(slot.bone, vertices, 0, 2);\n shapes.line(vertices[0], vertices[1], vertices[2], vertices[3]);\n shapes.line(vertices[2], vertices[3], vertices[4], vertices[5]);\n shapes.line(vertices[4], vertices[5], vertices[6], vertices[7]);\n shapes.line(vertices[6], vertices[7], vertices[0], vertices[1]);\n }\n }\n }\n if (this.drawMeshHull || this.drawMeshTriangles) {\n var slots = skeleton.slots;\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n if (!slot.bone.active)\n continue;\n var attachment = slot.getAttachment();\n if (!(attachment instanceof spine.MeshAttachment))\n continue;\n var mesh = attachment;\n var vertices = this.vertices;\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, 2);\n var triangles = mesh.triangles;\n var hullLength = mesh.hullLength;\n if (this.drawMeshTriangles) {\n shapes.setColor(this.triangleLineColor);\n for (var ii = 0, nn = triangles.length; ii < nn; ii += 3) {\n var v1 = triangles[ii] * 2, v2 = triangles[ii + 1] * 2, v3 = triangles[ii + 2] * 2;\n shapes.triangle(false, vertices[v1], vertices[v1 + 1], vertices[v2], vertices[v2 + 1], vertices[v3], vertices[v3 + 1]);\n }\n }\n if (this.drawMeshHull && hullLength > 0) {\n shapes.setColor(this.attachmentLineColor);\n hullLength = (hullLength >> 1) * 2;\n var lastX = vertices[hullLength - 2], lastY = vertices[hullLength - 1];\n for (var ii = 0, nn = hullLength; ii < nn; ii += 2) {\n var x = vertices[ii], y = vertices[ii + 1];\n shapes.line(x, y, lastX, lastY);\n lastX = x;\n lastY = y;\n }\n }\n }\n }\n if (this.drawBoundingBoxes) {\n var bounds = this.bounds;\n bounds.update(skeleton, true);\n shapes.setColor(this.aabbColor);\n shapes.rect(false, bounds.minX, bounds.minY, bounds.getWidth(), bounds.getHeight());\n var polygons = bounds.polygons;\n var boxes = bounds.boundingBoxes;\n for (var i = 0, n = polygons.length; i < n; i++) {\n var polygon = polygons[i];\n shapes.setColor(boxes[i].color);\n shapes.polygon(polygon, 0, polygon.length);\n }\n }\n if (this.drawPaths) {\n var slots = skeleton.slots;\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n if (!slot.bone.active)\n continue;\n var attachment = slot.getAttachment();\n if (!(attachment instanceof spine.PathAttachment))\n continue;\n var path = attachment;\n var nn = path.worldVerticesLength;\n var world = this.temp = spine.Utils.setArraySize(this.temp, nn, 0);\n path.computeWorldVertices(slot, 0, nn, world, 0, 2);\n var color = this.pathColor;\n var x1 = world[2], y1 = world[3], x2 = 0, y2 = 0;\n if (path.closed) {\n shapes.setColor(color);\n var cx1 = world[0], cy1 = world[1], cx2 = world[nn - 2], cy2 = world[nn - 1];\n x2 = world[nn - 4];\n y2 = world[nn - 3];\n shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, 32);\n shapes.setColor(SkeletonDebugRenderer.LIGHT_GRAY);\n shapes.line(x1, y1, cx1, cy1);\n shapes.line(x2, y2, cx2, cy2);\n }\n nn -= 4;\n for (var ii = 4; ii < nn; ii += 6) {\n var cx1 = world[ii], cy1 = world[ii + 1], cx2 = world[ii + 2], cy2 = world[ii + 3];\n x2 = world[ii + 4];\n y2 = world[ii + 5];\n shapes.setColor(color);\n shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, 32);\n shapes.setColor(SkeletonDebugRenderer.LIGHT_GRAY);\n shapes.line(x1, y1, cx1, cy1);\n shapes.line(x2, y2, cx2, cy2);\n x1 = x2;\n y1 = y2;\n }\n }\n }\n if (this.drawBones) {\n shapes.setColor(this.boneOriginColor);\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\n continue;\n shapes.circle(true, skeletonX + bone.worldX, skeletonY + bone.worldY, 3 * this.scale, SkeletonDebugRenderer.GREEN, 8);\n }\n }\n if (this.drawClipping) {\n var slots = skeleton.slots;\n shapes.setColor(this.clipColor);\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n if (!slot.bone.active)\n continue;\n var attachment = slot.getAttachment();\n if (!(attachment instanceof spine.ClippingAttachment))\n continue;\n var clip = attachment;\n var nn = clip.worldVerticesLength;\n var world = this.temp = spine.Utils.setArraySize(this.temp, nn, 0);\n clip.computeWorldVertices(slot, 0, nn, world, 0, 2);\n for (var i_17 = 0, n_3 = world.length; i_17 < n_3; i_17 += 2) {\n var x = world[i_17];\n var y = world[i_17 + 1];\n var x2 = world[(i_17 + 2) % world.length];\n var y2 = world[(i_17 + 3) % world.length];\n shapes.line(x, y, x2, y2);\n }\n }\n }\n };\n SkeletonDebugRenderer.prototype.dispose = function () {\n };\n SkeletonDebugRenderer.LIGHT_GRAY = new spine.Color(192 / 255, 192 / 255, 192 / 255, 1);\n SkeletonDebugRenderer.GREEN = new spine.Color(0, 1, 0, 1);\n return SkeletonDebugRenderer;\n }());\n webgl.SkeletonDebugRenderer = SkeletonDebugRenderer;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var Renderable = (function () {\n function Renderable(vertices, numVertices, numFloats) {\n this.vertices = vertices;\n this.numVertices = numVertices;\n this.numFloats = numFloats;\n }\n return Renderable;\n }());\n ;\n var SkeletonRenderer = (function () {\n function SkeletonRenderer(context, twoColorTint) {\n if (twoColorTint === void 0) { twoColorTint = true; }\n this.premultipliedAlpha = false;\n this.vertexEffect = null;\n this.tempColor = new spine.Color();\n this.tempColor2 = new spine.Color();\n this.vertexSize = 2 + 2 + 4;\n this.twoColorTint = false;\n this.renderable = new Renderable(null, 0, 0);\n this.clipper = new spine.SkeletonClipping();\n this.temp = new spine.Vector2();\n this.temp2 = new spine.Vector2();\n this.temp3 = new spine.Color();\n this.temp4 = new spine.Color();\n this.twoColorTint = twoColorTint;\n if (twoColorTint)\n this.vertexSize += 4;\n this.vertices = spine.Utils.newFloatArray(this.vertexSize * 1024);\n }\n SkeletonRenderer.prototype.draw = function (batcher, skeleton, slotRangeStart, slotRangeEnd) {\n if (slotRangeStart === void 0) { slotRangeStart = -1; }\n if (slotRangeEnd === void 0) { slotRangeEnd = -1; }\n var clipper = this.clipper;\n var premultipliedAlpha = this.premultipliedAlpha;\n var twoColorTint = this.twoColorTint;\n var blendMode = null;\n var tempPos = this.temp;\n var tempUv = this.temp2;\n var tempLight = this.temp3;\n var tempDark = this.temp4;\n var renderable = this.renderable;\n var uvs = null;\n var triangles = null;\n var drawOrder = skeleton.drawOrder;\n var attachmentColor = null;\n var skeletonColor = skeleton.color;\n var vertexSize = twoColorTint ? 12 : 8;\n var inRange = false;\n if (slotRangeStart == -1)\n inRange = true;\n for (var i = 0, n = drawOrder.length; i < n; i++) {\n var clippedVertexSize = clipper.isClipping() ? 2 : vertexSize;\n var slot = drawOrder[i];\n if (!slot.bone.active) {\n clipper.clipEndWithSlot(slot);\n continue;\n }\n if (slotRangeStart >= 0 && slotRangeStart == slot.data.index) {\n inRange = true;\n }\n if (!inRange) {\n clipper.clipEndWithSlot(slot);\n continue;\n }\n if (slotRangeEnd >= 0 && slotRangeEnd == slot.data.index) {\n inRange = false;\n }\n var attachment = slot.getAttachment();\n var texture = null;\n if (attachment instanceof spine.RegionAttachment) {\n var region = attachment;\n renderable.vertices = this.vertices;\n renderable.numVertices = 4;\n renderable.numFloats = clippedVertexSize << 2;\n region.computeWorldVertices(slot.bone, renderable.vertices, 0, clippedVertexSize);\n triangles = SkeletonRenderer.QUAD_TRIANGLES;\n uvs = region.uvs;\n texture = region.region.renderObject.texture;\n attachmentColor = region.color;\n }\n else if (attachment instanceof spine.MeshAttachment) {\n var mesh = attachment;\n renderable.vertices = this.vertices;\n renderable.numVertices = (mesh.worldVerticesLength >> 1);\n renderable.numFloats = renderable.numVertices * clippedVertexSize;\n if (renderable.numFloats > renderable.vertices.length) {\n renderable.vertices = this.vertices = spine.Utils.newFloatArray(renderable.numFloats);\n }\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, renderable.vertices, 0, clippedVertexSize);\n triangles = mesh.triangles;\n texture = mesh.region.renderObject.texture;\n uvs = mesh.uvs;\n attachmentColor = mesh.color;\n }\n else if (attachment instanceof spine.ClippingAttachment) {\n var clip = (attachment);\n clipper.clipStart(slot, clip);\n continue;\n }\n else {\n clipper.clipEndWithSlot(slot);\n continue;\n }\n if (texture != null) {\n var slotColor = slot.color;\n var finalColor = this.tempColor;\n finalColor.r = skeletonColor.r * slotColor.r * attachmentColor.r;\n finalColor.g = skeletonColor.g * slotColor.g * attachmentColor.g;\n finalColor.b = skeletonColor.b * slotColor.b * attachmentColor.b;\n finalColor.a = skeletonColor.a * slotColor.a * attachmentColor.a;\n if (premultipliedAlpha) {\n finalColor.r *= finalColor.a;\n finalColor.g *= finalColor.a;\n finalColor.b *= finalColor.a;\n }\n var darkColor = this.tempColor2;\n if (slot.darkColor == null)\n darkColor.set(0, 0, 0, 1.0);\n else {\n if (premultipliedAlpha) {\n darkColor.r = slot.darkColor.r * finalColor.a;\n darkColor.g = slot.darkColor.g * finalColor.a;\n darkColor.b = slot.darkColor.b * finalColor.a;\n }\n else {\n darkColor.setFromColor(slot.darkColor);\n }\n darkColor.a = premultipliedAlpha ? 1.0 : 0.0;\n }\n var slotBlendMode = slot.data.blendMode;\n if (slotBlendMode != blendMode) {\n blendMode = slotBlendMode;\n batcher.setBlendMode(webgl.WebGLBlendModeConverter.getSourceGLBlendMode(blendMode, premultipliedAlpha), webgl.WebGLBlendModeConverter.getDestGLBlendMode(blendMode));\n }\n if (clipper.isClipping()) {\n clipper.clipTriangles(renderable.vertices, renderable.numFloats, triangles, triangles.length, uvs, finalColor, darkColor, twoColorTint);\n var clippedVertices = new Float32Array(clipper.clippedVertices);\n var clippedTriangles = clipper.clippedTriangles;\n if (this.vertexEffect != null) {\n var vertexEffect = this.vertexEffect;\n var verts = clippedVertices;\n if (!twoColorTint) {\n for (var v = 0, n_4 = clippedVertices.length; v < n_4; v += vertexSize) {\n tempPos.x = verts[v];\n tempPos.y = verts[v + 1];\n tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]);\n tempUv.x = verts[v + 6];\n tempUv.y = verts[v + 7];\n tempDark.set(0, 0, 0, 0);\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\n verts[v] = tempPos.x;\n verts[v + 1] = tempPos.y;\n verts[v + 2] = tempLight.r;\n verts[v + 3] = tempLight.g;\n verts[v + 4] = tempLight.b;\n verts[v + 5] = tempLight.a;\n verts[v + 6] = tempUv.x;\n verts[v + 7] = tempUv.y;\n }\n }\n else {\n for (var v = 0, n_5 = clippedVertices.length; v < n_5; v += vertexSize) {\n tempPos.x = verts[v];\n tempPos.y = verts[v + 1];\n tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]);\n tempUv.x = verts[v + 6];\n tempUv.y = verts[v + 7];\n tempDark.set(verts[v + 8], verts[v + 9], verts[v + 10], verts[v + 11]);\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\n verts[v] = tempPos.x;\n verts[v + 1] = tempPos.y;\n verts[v + 2] = tempLight.r;\n verts[v + 3] = tempLight.g;\n verts[v + 4] = tempLight.b;\n verts[v + 5] = tempLight.a;\n verts[v + 6] = tempUv.x;\n verts[v + 7] = tempUv.y;\n verts[v + 8] = tempDark.r;\n verts[v + 9] = tempDark.g;\n verts[v + 10] = tempDark.b;\n verts[v + 11] = tempDark.a;\n }\n }\n }\n batcher.draw(texture, clippedVertices, clippedTriangles);\n }\n else {\n var verts = renderable.vertices;\n if (this.vertexEffect != null) {\n var vertexEffect = this.vertexEffect;\n if (!twoColorTint) {\n for (var v = 0, u = 0, n_6 = renderable.numFloats; v < n_6; v += vertexSize, u += 2) {\n tempPos.x = verts[v];\n tempPos.y = verts[v + 1];\n tempUv.x = uvs[u];\n tempUv.y = uvs[u + 1];\n tempLight.setFromColor(finalColor);\n tempDark.set(0, 0, 0, 0);\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\n verts[v] = tempPos.x;\n verts[v + 1] = tempPos.y;\n verts[v + 2] = tempLight.r;\n verts[v + 3] = tempLight.g;\n verts[v + 4] = tempLight.b;\n verts[v + 5] = tempLight.a;\n verts[v + 6] = tempUv.x;\n verts[v + 7] = tempUv.y;\n }\n }\n else {\n for (var v = 0, u = 0, n_7 = renderable.numFloats; v < n_7; v += vertexSize, u += 2) {\n tempPos.x = verts[v];\n tempPos.y = verts[v + 1];\n tempUv.x = uvs[u];\n tempUv.y = uvs[u + 1];\n tempLight.setFromColor(finalColor);\n tempDark.setFromColor(darkColor);\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\n verts[v] = tempPos.x;\n verts[v + 1] = tempPos.y;\n verts[v + 2] = tempLight.r;\n verts[v + 3] = tempLight.g;\n verts[v + 4] = tempLight.b;\n verts[v + 5] = tempLight.a;\n verts[v + 6] = tempUv.x;\n verts[v + 7] = tempUv.y;\n verts[v + 8] = tempDark.r;\n verts[v + 9] = tempDark.g;\n verts[v + 10] = tempDark.b;\n verts[v + 11] = tempDark.a;\n }\n }\n }\n else {\n if (!twoColorTint) {\n for (var v = 2, u = 0, n_8 = renderable.numFloats; v < n_8; v += vertexSize, u += 2) {\n verts[v] = finalColor.r;\n verts[v + 1] = finalColor.g;\n verts[v + 2] = finalColor.b;\n verts[v + 3] = finalColor.a;\n verts[v + 4] = uvs[u];\n verts[v + 5] = uvs[u + 1];\n }\n }\n else {\n for (var v = 2, u = 0, n_9 = renderable.numFloats; v < n_9; v += vertexSize, u += 2) {\n verts[v] = finalColor.r;\n verts[v + 1] = finalColor.g;\n verts[v + 2] = finalColor.b;\n verts[v + 3] = finalColor.a;\n verts[v + 4] = uvs[u];\n verts[v + 5] = uvs[u + 1];\n verts[v + 6] = darkColor.r;\n verts[v + 7] = darkColor.g;\n verts[v + 8] = darkColor.b;\n verts[v + 9] = darkColor.a;\n }\n }\n }\n var view = renderable.vertices.subarray(0, renderable.numFloats);\n batcher.draw(texture, view, triangles);\n }\n }\n clipper.clipEndWithSlot(slot);\n }\n clipper.clipEnd();\n };\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\n return SkeletonRenderer;\n }());\n webgl.SkeletonRenderer = SkeletonRenderer;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var Vector3 = (function () {\n function Vector3(x, y, z) {\n if (x === void 0) { x = 0; }\n if (y === void 0) { y = 0; }\n if (z === void 0) { z = 0; }\n this.x = 0;\n this.y = 0;\n this.z = 0;\n this.x = x;\n this.y = y;\n this.z = z;\n }\n Vector3.prototype.setFrom = function (v) {\n this.x = v.x;\n this.y = v.y;\n this.z = v.z;\n return this;\n };\n Vector3.prototype.set = function (x, y, z) {\n this.x = x;\n this.y = y;\n this.z = z;\n return this;\n };\n Vector3.prototype.add = function (v) {\n this.x += v.x;\n this.y += v.y;\n this.z += v.z;\n return this;\n };\n Vector3.prototype.sub = function (v) {\n this.x -= v.x;\n this.y -= v.y;\n this.z -= v.z;\n return this;\n };\n Vector3.prototype.scale = function (s) {\n this.x *= s;\n this.y *= s;\n this.z *= s;\n return this;\n };\n Vector3.prototype.normalize = function () {\n var len = this.length();\n if (len == 0)\n return this;\n len = 1 / len;\n this.x *= len;\n this.y *= len;\n this.z *= len;\n return this;\n };\n Vector3.prototype.cross = function (v) {\n return this.set(this.y * v.z - this.z * v.y, this.z * v.x - this.x * v.z, this.x * v.y - this.y * v.x);\n };\n Vector3.prototype.multiply = function (matrix) {\n var l_mat = matrix.values;\n return this.set(this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03], this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13], this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]);\n };\n Vector3.prototype.project = function (matrix) {\n var l_mat = matrix.values;\n var l_w = 1 / (this.x * l_mat[webgl.M30] + this.y * l_mat[webgl.M31] + this.z * l_mat[webgl.M32] + l_mat[webgl.M33]);\n return this.set((this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03]) * l_w, (this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13]) * l_w, (this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]) * l_w);\n };\n Vector3.prototype.dot = function (v) {\n return this.x * v.x + this.y * v.y + this.z * v.z;\n };\n Vector3.prototype.length = function () {\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\n };\n Vector3.prototype.distance = function (v) {\n var a = v.x - this.x;\n var b = v.y - this.y;\n var c = v.z - this.z;\n return Math.sqrt(a * a + b * b + c * c);\n };\n return Vector3;\n }());\n webgl.Vector3 = Vector3;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var ManagedWebGLRenderingContext = (function () {\n function ManagedWebGLRenderingContext(canvasOrContext, contextConfig) {\n var _this = this;\n if (contextConfig === void 0) { contextConfig = { alpha: \"true\" }; }\n this.restorables = new Array();\n if (canvasOrContext instanceof HTMLCanvasElement) {\n var canvas_1 = canvasOrContext;\n this.gl = (canvas_1.getContext(\"webgl2\", contextConfig) || canvas_1.getContext(\"webgl\", contextConfig));\n this.canvas = canvas_1;\n canvas_1.addEventListener(\"webglcontextlost\", function (e) {\n var event = e;\n if (e) {\n e.preventDefault();\n }\n });\n canvas_1.addEventListener(\"webglcontextrestored\", function (e) {\n for (var i = 0, n = _this.restorables.length; i < n; i++) {\n _this.restorables[i].restore();\n }\n });\n }\n else {\n this.gl = canvasOrContext;\n this.canvas = this.gl.canvas;\n }\n }\n ManagedWebGLRenderingContext.prototype.addRestorable = function (restorable) {\n this.restorables.push(restorable);\n };\n ManagedWebGLRenderingContext.prototype.removeRestorable = function (restorable) {\n var index = this.restorables.indexOf(restorable);\n if (index > -1)\n this.restorables.splice(index, 1);\n };\n return ManagedWebGLRenderingContext;\n }());\n webgl.ManagedWebGLRenderingContext = ManagedWebGLRenderingContext;\n var WebGLBlendModeConverter = (function () {\n function WebGLBlendModeConverter() {\n }\n WebGLBlendModeConverter.getDestGLBlendMode = function (blendMode) {\n switch (blendMode) {\n case spine.BlendMode.Normal: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\n case spine.BlendMode.Additive: return WebGLBlendModeConverter.ONE;\n case spine.BlendMode.Multiply: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\n case spine.BlendMode.Screen: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\n default: throw new Error(\"Unknown blend mode: \" + blendMode);\n }\n };\n WebGLBlendModeConverter.getSourceGLBlendMode = function (blendMode, premultipliedAlpha) {\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\n switch (blendMode) {\n case spine.BlendMode.Normal: return premultipliedAlpha ? WebGLBlendModeConverter.ONE : WebGLBlendModeConverter.SRC_ALPHA;\n case spine.BlendMode.Additive: return premultipliedAlpha ? WebGLBlendModeConverter.ONE : WebGLBlendModeConverter.SRC_ALPHA;\n case spine.BlendMode.Multiply: return WebGLBlendModeConverter.DST_COLOR;\n case spine.BlendMode.Screen: return WebGLBlendModeConverter.ONE;\n default: throw new Error(\"Unknown blend mode: \" + blendMode);\n }\n };\n WebGLBlendModeConverter.ZERO = 0;\n WebGLBlendModeConverter.ONE = 1;\n WebGLBlendModeConverter.SRC_COLOR = 0x0300;\n WebGLBlendModeConverter.ONE_MINUS_SRC_COLOR = 0x0301;\n WebGLBlendModeConverter.SRC_ALPHA = 0x0302;\n WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA = 0x0303;\n WebGLBlendModeConverter.DST_ALPHA = 0x0304;\n WebGLBlendModeConverter.ONE_MINUS_DST_ALPHA = 0x0305;\n WebGLBlendModeConverter.DST_COLOR = 0x0306;\n return WebGLBlendModeConverter;\n }());\n webgl.WebGLBlendModeConverter = WebGLBlendModeConverter;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\n//# sourceMappingURL=spine-both.js.map\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = spine;\n\n}.call(window));\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:////Users/rich/Documents/GitHub/phaser/node_modules/eventemitter3/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/Animation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/AnimationFrame.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/ADD_ANIMATION_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/ANIMATION_COMPLETE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/ANIMATION_REPEAT_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/ANIMATION_RESTART_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/ANIMATION_START_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/PAUSE_ALL_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/REMOVE_ANIMATION_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/RESUME_ALL_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_START_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/animations/events/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/BLUR_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/BOOT_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/CONTEXT_LOST_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/CONTEXT_RESTORED_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/DESTROY_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/FOCUS_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/HIDDEN_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/PAUSE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/POST_RENDER_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/POST_STEP_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/PRE_RENDER_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/PRE_STEP_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/READY_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/RESUME_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/STEP_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/VISIBLE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/core/events/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/data/DataManager.js","webpack:////Users/rich/Documents/GitHub/phaser/src/data/events/CHANGE_DATA_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/data/events/REMOVE_DATA_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/data/events/SET_DATA_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/data/events/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/display/color/GetColorFromValue.js","webpack:////Users/rich/Documents/GitHub/phaser/src/display/mask/BitmapMask.js","webpack:////Users/rich/Documents/GitHub/phaser/src/display/mask/GeometryMask.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/BuildGameObject.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/GameObject.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Alpha.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/AlphaSingle.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Animation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/BlendMode.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/ComputedSize.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Crop.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Depth.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Flip.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/GetBounds.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Mask.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Origin.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/PathFollower.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Pipeline.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/ScrollFactor.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Size.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Texture.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/TextureCrop.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Tint.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/ToJSON.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Transform.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/TransformMatrix.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/Visible.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/components/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/container/Container.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/container/ContainerCanvasRenderer.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/container/ContainerRender.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/container/ContainerWebGLRenderer.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/ADDED_TO_SCENE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/DESTROY_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/REMOVED_FROM_SCENE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_COMPLETE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_CREATED_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_ERROR_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_LOOP_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_PLAY_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_SEEKED_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_SEEKING_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_STOP_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_TIMEOUT_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/VIDEO_UNLOCKED_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/gameobjects/events/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/const.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/line/GetPoint.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/line/GetPoints.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/line/Length.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/line/Line.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/line/Random.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/point/Point.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/rectangle/Contains.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/rectangle/GetPoint.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/rectangle/GetPoints.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/rectangle/Perimeter.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/rectangle/Random.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/rectangle/Rectangle.js","webpack:////Users/rich/Documents/GitHub/phaser/src/geom/rectangle/Union.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/File.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/FileTypesManager.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/GetURL.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/MergeXHRSettings.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/MultiFile.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/XHRLoader.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/XHRSettings.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/const.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/ADD_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/COMPLETE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/FILE_COMPLETE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/FILE_LOAD_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/FILE_PROGRESS_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/POST_PROCESS_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/PROGRESS_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/START_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/events/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/filetypes/ImageFile.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/filetypes/JSONFile.js","webpack:////Users/rich/Documents/GitHub/phaser/src/loader/filetypes/TextFile.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Average.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Bernstein.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Between.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/CatmullRom.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/CeilTo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Clamp.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/DegToRad.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Difference.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Factorial.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/FloatBetween.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/FloorTo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/FromPercent.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/GetSpeed.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/IsEven.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/IsEvenStrict.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Linear.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Matrix3.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Matrix4.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/MaxAdd.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/MinSub.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Percent.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Quaternion.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RadToDeg.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RandomXY.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RandomXYZ.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RandomXYZW.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Rotate.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RotateAround.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RotateAroundDistance.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RotateTo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RotateVec3.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RoundAwayFromZero.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/RoundTo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/SinCosTableGenerator.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/SmoothStep.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/SmootherStep.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/ToXY.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/TransformXY.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Vector2.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Vector3.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Vector4.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Within.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/Wrap.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/Between.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/BetweenPoints.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/BetweenPointsY.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/BetweenY.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/CounterClockwise.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/Normalize.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/Random.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/RandomDegrees.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/Reverse.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/RotateTo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/ShortestBetween.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/Wrap.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/WrapDegrees.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/angle/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/const.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceBetween.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceBetweenPoints.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceBetweenPointsSquared.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceChebyshev.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/distance/DistancePower.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceSnake.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/distance/DistanceSquared.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/distance/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/back/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/back/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/back/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/back/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/bounce/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/bounce/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/bounce/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/bounce/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/circular/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/circular/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/circular/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/circular/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/cubic/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/cubic/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/cubic/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/cubic/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/elastic/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/elastic/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/elastic/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/elastic/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/expo/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/expo/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/expo/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/expo/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/linear/Linear.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/linear/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quadratic/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quadratic/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quadratic/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quadratic/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quartic/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quartic/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quartic/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quartic/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quintic/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quintic/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quintic/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/quintic/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/sine/In.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/sine/InOut.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/sine/Out.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/sine/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/stepped/Stepped.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/easing/stepped/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/fuzzy/Ceil.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/fuzzy/Equal.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/fuzzy/Floor.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/fuzzy/GreaterThan.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/fuzzy/LessThan.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/fuzzy/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/interpolation/BezierInterpolation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/interpolation/CatmullRomInterpolation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/interpolation/CubicBezierInterpolation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/interpolation/LinearInterpolation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/interpolation/QuadraticBezierInterpolation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/interpolation/SmoothStepInterpolation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/interpolation/SmootherStepInterpolation.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/interpolation/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/pow2/GetPowerOfTwo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/pow2/IsSizePowerOfTwo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/pow2/IsValuePowerOfTwo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/pow2/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/random-data-generator/RandomDataGenerator.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/snap/SnapCeil.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/snap/SnapFloor.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/snap/SnapTo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/math/snap/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/plugins/BasePlugin.js","webpack:////Users/rich/Documents/GitHub/phaser/src/plugins/ScenePlugin.js","webpack:////Users/rich/Documents/GitHub/phaser/src/renderer/BlendModes.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scale/events/RESIZE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/ADDED_TO_SCENE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/BOOT_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/CREATE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/DESTROY_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/PAUSE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/POST_UPDATE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/PRE_UPDATE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/READY_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/REMOVED_FROM_SCENE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/RENDER_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/RESUME_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/SHUTDOWN_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/SLEEP_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/START_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/TRANSITION_INIT_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/TRANSITION_OUT_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/TRANSITION_START_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/UPDATE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/WAKE_EVENT.js","webpack:////Users/rich/Documents/GitHub/phaser/src/scene/events/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/tweens/builders/GetBoolean.js","webpack:////Users/rich/Documents/GitHub/phaser/src/tweens/tween/const.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/Class.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/NOOP.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/Add.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/AddAt.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/BringToTop.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/CountAllMatching.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/Each.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/EachInRange.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/FindClosestInSorted.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/GetAll.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/GetFirst.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/GetRandom.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/MoveDown.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/MoveTo.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/MoveUp.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/NumberArray.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/NumberArrayStep.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/QuickSelect.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/Range.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/Remove.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/RemoveAt.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/RemoveBetween.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/RemoveRandomElement.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/Replace.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/RotateLeft.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/RotateRight.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/SafeRange.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/SendToBack.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/SetAll.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/Shuffle.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/SpliceOne.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/StableSort.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/Swap.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/CheckMatrix.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/MatrixToString.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/ReverseColumns.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/ReverseRows.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/Rotate180.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/RotateLeft.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/RotateMatrix.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/RotateRight.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/TransposeMatrix.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/array/matrix/index.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/object/Extend.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/object/GetAdvancedValue.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/object/GetFastValue.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/object/GetValue.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/object/IsPlainObject.js","webpack:////Users/rich/Documents/GitHub/phaser/src/utils/string/Pad.js","webpack:///./SpineFile.js","webpack:///./SpinePlugin.js","webpack:///./container/SpineContainer.js","webpack:///./container/SpineContainerCanvasRenderer.js","webpack:///./container/SpineContainerRender.js","webpack:///./container/SpineContainerWebGLRenderer.js","webpack:///./events/COMPLETE_EVENT.js","webpack:///./events/DISPOSE_EVENT.js","webpack:///./events/END_EVENT.js","webpack:///./events/EVENT_EVENT.js","webpack:///./events/INTERRUPTED_EVENT.js","webpack:///./events/START_EVENT.js","webpack:///./events/index.js","webpack:///./gameobject/SpineGameObject.js","webpack:///./gameobject/SpineGameObjectCanvasRenderer.js","webpack:///./gameobject/SpineGameObjectRender.js","webpack:///./gameobject/SpineGameObjectWebGLRenderer.js","webpack:///./runtimes/spine-both.js"],"names":[],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFa;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,yDAAyD,OAAO;AAChE;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yCAAyC,SAAS;AAClD;AACA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA,eAAe,YAAY;AAC3B;;AAEA;AACA,2DAA2D;AAC3D,+DAA+D;AAC/D,mEAAmE;AACnE,uEAAuE;AACvE;AACA,0DAA0D,SAAS;AACnE;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,aAAa,aAAa;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,2DAA2D,YAAY;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,aAAa,aAAa;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI,IAA6B;AACjC;AACA;;;;;;;;;;;;AC/UA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,iDAAe;AACnC,YAAY,mBAAO,CAAC,mDAAgB;AACpC,mBAAmB,mBAAO,CAAC,mEAAe;AAC1C,aAAa,mBAAO,CAAC,yDAAU;AAC/B,0BAA0B,mBAAO,CAAC,2FAAoC;AACtE,YAAY,mBAAO,CAAC,mEAAkB;AACtC,eAAe,mBAAO,CAAC,uEAA0B;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mCAAmC;AAC9C,WAAW,OAAO;AAClB,WAAW,kCAAkC;AAC7C;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kDAAkD;AACjE;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,kDAAkD;AACjE;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD,eAAe,QAAQ;AACvB;AACA;AACA;AACA,yCAAyC,qBAAqB;;AAE9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,kDAAkD;AACjE,eAAe,OAAO;AACtB;AACA,gBAAgB,mCAAmC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,6BAA6B,gCAAgC;AAC7D,aAAa;AACb;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD,eAAe,QAAQ;AACvB;AACA;AACA;AACA,yBAAyB,mBAAmB;;AAE5C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iCAAiC;AACjD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sCAAsC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA,uBAAuB,SAAS;AAChC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,uBAAuB,wBAAwB;AAC/C;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC77BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,WAAW,sBAAsB;AACjC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,2CAA2C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACvKA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,4BAA4B;AACvC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,4BAA4B;AACvC;AACA;;;;;;;;;;;;ACjBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,QAAQ;AACnB,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,iCAAiC;AAC5C,WAAW,0BAA0B;AACrC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;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AAO,CAAC,gHAAqC;AAC9E,6BAA6B,mBAAO,CAAC,wGAAiC;AACtE,8BAA8B,mBAAO,CAAC,0GAAkC;AACxE,4BAA4B,mBAAO,CAAC,sGAAgC;AACpE,6BAA6B,mBAAO,CAAC,wGAAiC;;AAEtE;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACdA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACdA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,UAAU,mBAAO,CAAC,4DAAc;AAChC,UAAU,mBAAO,CAAC,4DAAc;AAChC,kBAAkB,mBAAO,CAAC,4EAAsB;AAChD,sBAAsB,mBAAO,CAAC,oFAA0B;AACxD,aAAa,mBAAO,CAAC,kEAAiB;AACtC,WAAW,mBAAO,CAAC,8DAAe;AAClC,YAAY,mBAAO,CAAC,gEAAgB;AACpC,WAAW,mBAAO,CAAC,8DAAe;AAClC,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,eAAe,mBAAO,CAAC,sEAAmB;AAC1C,gBAAgB,mBAAO,CAAC,wEAAoB;AAC5C,cAAc,mBAAO,CAAC,oEAAkB;AACxC,WAAW,mBAAO,CAAC,8DAAe;AAClC,YAAY,mBAAO,CAAC,gEAAgB;AACpC,UAAU,mBAAO,CAAC,4DAAc;AAChC,aAAa,mBAAO,CAAC,kEAAiB;;AAEtC;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,aAAa,mBAAO,CAAC,mDAAU;;AAE/B;AACA;AACA;AACA,WAAW,EAAE;AACb,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,KAAK;AAChB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,2BAA2B;AACtC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2BAA2B,gBAAgB;AAC3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,2DAA2D;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,aAAa;;AAEb;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,EAAE;AACjB,eAAe,KAAK;AACpB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,sCAAsC,kBAAkB;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC5rBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,OAAO;AAClB,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,qBAAqB,mBAAO,CAAC,kFAAyB;AACtD,iBAAiB,mBAAO,CAAC,0EAAqB;AAC9C,cAAc,mBAAO,CAAC,oEAAkB;;AAExC;;;;;;;;;;;;ACjBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,4DAAmB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,8BAA8B;AACzC;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4EAA4E;AAC3F,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4EAA4E;AAC3F;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4EAA4E;AAC3F,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4EAA4E;AAC3F;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC9RA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,4BAA4B;AACvC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iCAAiC,6BAA6B;;AAE9D;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD,eAAe,8BAA8B;AAC7C,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA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EAAe;AAC1C,aAAa,mBAAO,CAAC,0DAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,2DAA2D;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,EAAE;AACjB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4CAA4C;AAC3D,eAAe,mCAAmC;AAClD,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,wCAAwC;AACxD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA,sCAAsC,mBAAmB;;AAEzD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3tBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,oDAAkB;;AAEtC;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;AChSA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,oDAAkB;;AAEtC;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACvGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,oBAAoB,mBAAO,CAAC,wEAA4B;AACxD,YAAY,mBAAO,CAAC,sDAAmB;AACvC,aAAa,mBAAO,CAAC,wEAAyB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,uCAAuC,gBAAgB;;AAEvD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,4CAA4C,yBAAyB;AACrE,uCAAuC,gBAAgB;;AAEvD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qCAAqC;AACpD,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,4CAA4C,yBAAyB;AACrE,uCAAuC,gBAAgB;;AAEvD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA,sCAAsC,8BAA8B;;AAEpE;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,yCAAyC,sBAAsB;;AAE/D;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA,kCAAkC,eAAe;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACpqCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,sEAA2B;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2BAA2B;AAC1C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC9IA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,gBAAgB;AAChB;;AAEA;;AAEA;;;;;;;;;;;;ACtHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC7JA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,gFAAgC;AACxD,mBAAmB,mBAAO,CAAC,kEAAyB;AACpD,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,6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A+B;AACxD,mBAAmB,mBAAO,CAAC,kFAAiC;;AAE5D;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kEAAkE;AACjF;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,wCAAwC,qBAAqB;;AAE7D;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,kCAAkC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC5IA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,SAAS;AACvC,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpMA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,0DAAqB;AAC5C,iBAAiB,mBAAO,CAAC,oFAAkC;AAC3D,eAAe,mBAAO,CAAC,0EAA6B;AACpD,kBAAkB,mBAAO,CAAC,oEAA0B;AACpD,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,2BAA2B,uDAAuD;AAClF;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC,eAAe,uGAAuG;AACtH;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,0BAA0B;;AAE7D;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,YAAY;;AAE/C;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uGAAuG,WAAW;AACjI,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,aAAa;AAChD,oCAAoC,aAAa;;AAEjD;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,sBAAsB;AACtB;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpaA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,yCAAyC,gCAAgC;;AAEzE;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC3HA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,oBAAoB;;AAEtD;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACpLA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD,eAAe,iBAAiB;AAChC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,yCAAyC,qBAAqB;;AAE9D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC3HA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+BAA+B;AAC9C,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,iBAAiB;AAChC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,uCAAuC,mBAAmB;AAC1D,yCAAyC,qBAAqB;;AAE9D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,gBAAgB;AAChB;;AAEA;;AAEA;;;;;;;;;;;;ACzMA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,wBAAwB,mBAAO,CAAC,8FAAuC;;AAEvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,oBAAoB;;AAExD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;ACrUA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA,YAAY,wCAAwC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,sBAAsB,mBAAO,CAAC,iFAAmB;AACjD,kBAAkB,mBAAO,CAAC,gEAAwB;AAClD,gBAAgB,mBAAO,CAAC,8DAAuB;AAC/C,uBAAuB,mBAAO,CAAC,4EAA8B;AAC7D,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ,gDAAgD;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,kCAAkC,oCAAoC;AACtE,mCAAmC,sCAAsC;;AAEzE;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,oCAAoC,aAAa;;AAEjD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,QAAQ,mDAAmD;AAC3D;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,8CAA8C;AAC9D;AACA;AACA;AACA,uCAAuC,oCAAoC;;AAE3E;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,8CAA8C;AAC9D;AACA;AACA;AACA,uCAAuC,oCAAoC;AAC3E,yCAAyC,sCAAsC;;AAE/E;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C,sBAAsB,sCAAsC;;AAE5D;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACxkBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,oDAAkB;AAC3C,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;AACrC,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;;AAEvC;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,qDAAqD;AACrE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,kCAAkC,UAAU,cAAc;;AAE1D;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,mCAAmC,wBAAwB;;AAE3D;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OA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;AACxC,UAAU,mBAAO,CAAC,2DAAQ;AAC1B,YAAY,mBAAO,CAAC,+DAAU;AAC9B,eAAe,mBAAO,CAAC,qEAAa;AACpC,qBAAqB,mBAAO,CAAC,iFAAmB;AAChD,aAAa,mBAAO,CAAC,iEAAW;;AAEhC;;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,4DAAmB;AAC5C,iBAAiB,mBAAO,CAAC,sEAA2B;AACpD,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,mEAAe;AACxC,aAAa,mBAAO,CAAC,2DAAW;AAChC,iBAAiB,mBAAO,CAAC,6DAAe;AACxC,uBAAuB,mBAAO,CAAC,2DAAW;AAC1C,gBAAgB,mBAAO,CAAC,gFAAgC;AACxD,aAAa,mBAAO,CAAC,gFAAmB;AACxC,YAAY,mBAAO,CAAC,wEAA4B;AAChD,cAAc,mBAAO,CAAC,wDAAoB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,gCAAgC;AAC3C;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sBAAsB;AACrC;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA,mCAAmC,0BAA0B;;AAE7D;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,2BAA2B,qBAAqB;AAChD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAA+C;AAC9D,eAAe,+CAA+C;AAC9D;AACA,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA,mCAAmC,wBAAwB;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8CAA8C;AAC9D;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,SAAS;AACxB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,EAAE;AACjB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C,eAAe,8BAA8B;AAC7C,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,IAAI;AACnB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,eAAe,KAAK;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,OAAO;AACtB,eAAe,KAAK;AACpB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;AACA;;AAEA,mBAAmB,SAAS;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,OAAO;AACtB,eAAe,KAAK;AACpB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;AACA;;AAEA,mBAAmB,sBAAsB;AACzC;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,2CAA2C,wBAAwB;;AAEnE;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC90CA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,qBAAqB;AACxC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpGA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,oDAAkB;AAC5C,mBAAmB,mBAAO,CAAC,oDAAkB;;AAE7C,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,8FAA0B;AACpD;;AAEA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,gGAA2B;AACtD;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9IA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,MAAM;AACjB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;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A;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,OAAO;AACtB,eAAe,2BAA2B;AAC1C;AACA,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,2BAA2B;AAC1C;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;AACvC,+BAA+B,QAAQ;;AAEvC;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,iCAAiC,sBAAsB;;AAEvD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,iCAAiC,sBAAsB;;AAEvD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC1UA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,wDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA,WAAW,iBAAiB;AAC5B,WAAW,2BAA2B;AACtC;AACA,YAAY,2BAA2B;AACvC;AACA;AACA;AACA,4BAA4B,mBAAmB;;AAE/C;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,iBAAiB,mBAAO,CAAC,4CAAU;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;AACrC,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACtFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,6DAAa;AACrC,YAAY,mBAAO,CAAC,wDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,2BAA2B;AACtC;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA,4BAA4B,mBAAmB;;AAE/C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,2DAAY;AACnC,gBAAgB,mBAAO,CAAC,6DAAa;;AAEr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mC,YAAY;;AAE/C;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,OAAO;AACtB,eAAe,2BAA2B;AAC1C;AACA,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,oBAAoB;AACrC;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,eAAe,4BAA4B;AAC3C;AACA,gBAAgB,4BAA4B;AAC5C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA,eAAe,kBAAkB;AACjC;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,gBAAgB;;AAEnD;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,mBAAmB;;AAEpD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,mBAAmB;;AAEpD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,mBAAmB;;AAEpD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,mBAAmB;;AAEpD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACxfA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,6DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,sBAAsB;AACnC;AACA,WAAW,sBAAsB;AACjC,WAAW,sBAAsB;AACjC,WAAW,sBAAsB;AACjC;AACA,YAAY,sBAAsB;AAClC;AACA;AACA;AACA,4BAA4B,uBAAuB;;AAEnD;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,YAAY,mBAAO,CAAC,6CAAS;AAC7B,aAAa,mBAAO,CAAC,qDAAU;AAC/B,mBAAmB,mBAAO,CAAC,+EAA8B;AACzD,aAAa,mBAAO,CAAC,+CAAU;AAC/B,uBAAuB,mBAAO,CAAC,mEAAoB;AACnD,gBAAgB,mBAAO,CAAC,qDAAa;AACrC,kBAAkB,mBAAO,CAAC,yDAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,+BAA+B;AAC1C;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA,4GAA4G;AAC5G;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,2DAA2D;;AAE3D;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B,eAAe,cAAc;AAC7B;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B,eAAe,cAAc;AAC7B;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,kBAAkB;;AAEnD;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iEAAiE;AACjE;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,eAAe,2BAA2B;AAC1C;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC7hBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2BAA2B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC9DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,mEAAwB;AAC7C,kBAAkB,mBAAO,CAAC,yDAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,sCAAsC;AACjD;AACA,YAAY,sCAAsC;AAClD;AACA;AACA;AACA,mEAAmE;;AAEnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACnOA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,uBAAuB,mBAAO,CAAC,mEAAoB;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,sCAAsC;AACjD;AACA,YAAY,eAAe;AAC3B;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,sCAAsC;AAClD;AACA;AACA;AACA,qCAAqC,mBAAmB;AACxD,8BAA8B,cAAc;AAC5C,6BAA6B,WAAW;AACxC,iCAAiC,eAAe;AAChD,gCAAgC,aAAa;AAC7C,wCAAwC,yBAAyB;;AAEjE;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACjJA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,2BAA2B;AACtC,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,uDAAuD;AACjJ;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,oFAAoF,mDAAmD;AACvI;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO,wBAAwB,8BAA8B;AACxE,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;AC/CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAA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AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uGAAuG;AAClH,WAAW,gBAAgB;AAC3B,WAAW,sCAAsC;AACjD;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;;;;;;;;;;;AC3QA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,eAAe,mBAAO,CAAC,0EAA6B;AACpD,oBAAoB,mBAAO,CAAC,oFAAkC;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,sDAAsD;AACjE,WAAW,gBAAgB;AAC3B,WAAW,sCAAsC;AACjD,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA,QAAQ;AACR,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qGAAqG;AAChH,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,WAAW,sCAAsC;AACjD;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;;;;;;;;;;;AC/NA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;AACvC,YAAY,mBAAO,CAAC,8CAAU;AAC9B,WAAW,mBAAO,CAAC,4CAAS;AAC5B,uBAAuB,mBAAO,CAAC,oEAAqB;AACpD,mBAAmB,mBAAO,CAAC,kFAAiC;AAC5D,oBAAoB,mBAAO,CAAC,oFAAkC;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,sDAAsD;AACjE,WAAW,OAAO;AAClB,WAAW,sCAAsC;AACjD;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qGAAqG;AAChH,WAAW,OAAO;AAClB,WAAW,sCAAsC;AACjD;AACA,YAAY,KAAK;AACjB;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;AAED;;;;;;;;;;;;ACxKA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,mDAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,6BAA6B,WAAW;;AAExC;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,6BAA6B,WAAW;;AAExC;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC1kBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;;AAEA;;;;;;;;;;;;AC/6CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,4BAA4B,eAAe;;AAE3C;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,cAAc,mBAAO,CAAC,+CAAW;AACjC,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAA6C;AAC5D,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,4CAA4C;;AAE5C;;AAEA,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC7vBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,2CAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,+BAA+B,YAAY;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC,2BAA2B;AAC3B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;A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AAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,6BAA6B,WAAW;;AAExC;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA;AACA,+BAA+B,YAAY;AAC3C,+BAA+B,YAAY;AAC3C,kCAAkC,eAAe;;AAEjD;;AAEA;AACA;;AAEA,mBAAmB,YAAY;AAC/B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,6BAA6B;AAC9E;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,oBAAoB;AAC/B;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,4BAA4B,qBAAqB;;AAEjD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,cAAc,mBAAO,CAAC,+CAAW;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,+CAA+C;AAC1D;AACA,YAAY,+CAA+C;AAC3D;AACA;AACA;AACA,+BAA+B,wBAAwB;;AAEvD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;AACpC,iBAAiB,mBAAO,CAAC,6DAAqB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,OAAO;;AAEzC;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8BAA8B;AAC7C;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,6BAA6B,YAAY;;AAEzC;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;;;;;;;;;;;;ACjwBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAA0C;AACzD;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;;;;;;;;;;;;ACnyBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA,YAAY,mBAAO,CAAC,mDAAgB;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC,eAAe,OAAO;AACtB;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,8BAA8B,OAAO;;AAErC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,8DAA8D;AAC7E;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1hBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA,2CAA2C,sCAAsC;AACjF;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA,2CAA2C,gCAAgC;AAC3E;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,4CAAU;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,0DAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,0DAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,yDAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,4CAAU;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,6BAA6B,aAAa;;AAE1C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;AC1CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,0CAAS;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,WAAW,mBAAO,CAAC,0CAAS;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;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;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,8BAA8B;AACzC;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,4BAA4B,SAAS;;AAErC;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO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;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACtCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,mDAAM;AACtB,SAAS,mBAAO,CAAC,qDAAO;AACxB,WAAW,mBAAO,CAAC,yDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,qDAAM;AACtB,SAAS,mBAAO,CAAC,uDAAO;AACxB,WAAW,mBAAO,CAAC,2DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,kDAAM;AACtB,SAAS,mBAAO,CAAC,oDAAO;AACxB,WAAW,mBAAO,CAAC,wDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD,+BAA+B,cAAc;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD,+BAA+B,cAAc;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD,+BAA+B,cAAc;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,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AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,sDAAM;AACtB,SAAS,mBAAO,CAAC,wDAAO;AACxB,WAAW,mBAAO,CAAC,4DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,oDAAM;AACtB,SAAS,mBAAO,CAAC,sDAAO;AACxB,WAAW,mBAAO,CAAC,0DAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,QAAQ,mBAAO,CAAC,iDAAM;AACtB,SAAS,mBAAO,CAAC,mDAAO;AACxB,WAAW,mBAAO,CAAC,uDAAS;;AAE5B;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA,iBAAiB,mBAAO,CAAC,8DAAW;;;;;;;;;;;;ACVpC;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,gCAAgC,kBAAkB;;AAElD;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA,gCAAgC,kBAAkB;;AAElD;AACA;;AAEA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACn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AAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,aAAa,mBAAO,CAAC,+CAAW;AAChC,gBAAgB,mBAAO,CAAC,qDAAc;AACtC,gBAAgB,mBAAO,CAAC,qDAAc;;AAEtC;;AAEA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;;AClFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,oDAAc;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,QAAQ;AAC3B;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,sDAAe;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AClDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC/DA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,aAAa,mBAAO,CAAC,8CAAW;;AAEhC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,mBAAO,CAAC,sDAAe;;AAExC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,0DAAiB;;AAE5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,YAAY,mBAAO,CAAC,qFAAuB;AAC3C,gBAAgB,mBAAO,CAAC,6FAA2B;AACnD,iBAAiB,mBAAO,CAAC,+FAA4B;AACrD,YAAY,mBAAO,CAAC,qFAAuB;AAC3C,qBAAqB,mBAAO,CAAC,uGAAgC;AAC7D,gBAAgB,mBAAO,CAAC,6FAA2B;AACnD,kBAAkB,mBAAO,CAAC,iGAA6B;;AAEvD;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,aAAa,mBAAO,CAAC,gEAAiB;AACtC,YAAY,mBAAO,CAAC,sEAAoB;AACxC,aAAa,mBAAO,CAAC,wEAAqB;;AAE1C;;;;;;;;;;;;AChBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,sDAAmB;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;;AAEA;;AAEA;AACA;AACA,kCAAkC,qDAAqD;;AAEvF;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA,oEAAoE;;AAEpE;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA;;AAEA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;;AAEA;;AAEA,kDAAkD;AAClD,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,wCAAwC;AAC/D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;;AAEA,wBAAwB,UAAU;AAClC;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,IAAI;AACxB,oBAAoB,EAAE;AACtB;AACA,eAAe,IAAI;AACnB;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,IAAI;AACxB,oBAAoB,EAAE;AACtB;AACA,eAAe,IAAI;AACnB;AACA,gBAAgB,EAAE;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,IAAI;AACxB;AACA,eAAe,IAAI;AACnB;AACA,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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,6BAA6B;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,4DAA4D,sCAAsC;AAClG;AACA;AACA;AACA;AACA,eAAe,KAAK;AACpB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC3HA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA,iBAAiB,mBAAO,CAAC,wDAAc;AACvC,YAAY,mBAAO,CAAC,mDAAgB;AACpC,kBAAkB,mBAAO,CAAC,2DAAiB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,6BAA6B;AACxC;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,mCAAmC,wCAAwC;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACzHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC5UA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,oBAAoB;AAC/B,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4EAA4E;AACvF;AACA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,6CAA6C;AACpF;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,IAAI;AACf;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB;AACA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC9BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC3BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,qDAAqD;AACpH;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA,4EAA4E,sDAAsD;AAClI;AACA;AACA;AACA;AACA;AACA,uBAAuB,oDAAoD;AAC3E,wBAAwB,qDAAqD;AAC7E,yBAAyB,sDAAsD;AAC/E,wBAAwB,qDAAqD;AAC7E,4BAA4B,yDAAyD;AACrF;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,OAAO;AAClB;AACA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,eAAe;AACf;AACA,oBAAoB;AACpB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;A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AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;ACrKA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvPA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,gCAAgC,iBAAiB;;AAEjD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9GA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,gCAAgC,iBAAiB;;AAEjD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,gCAAgC,QAAQ;AACxC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;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ClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC7EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,iCAAiC,yBAAyB;;AAE1D;;AAEA;AACA;AACA,gCAAgC,cAAc;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACvDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,iCAAiC,yBAAyB;;AAE1D;AACA;AACA,gCAAgC,cAAc;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,+BAA+B,uBAAuB;;AAEtD;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C,iDAAiD;AACjD;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;;AAEA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,wBAAwB,mBAAO,CAAC,4EAA8B;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,YAAY,SAAS;AACrB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,4BAA4B,YAAY;AACxC,6BAA6B,UAAU;;AAEvC;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA;AACA;AACA,6BAA6B,UAAU;AACvC,8BAA8B,wBAAwB;AACtD,gCAAgC,0BAA0B;;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACnHA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,eAAe,mBAAO,CAAC,iEAAoB;AAC3C,cAAc,mBAAO,CAAC,sDAAW;;AAEjC;AACA;AACA;;AAEA,wBAAwB,mBAAmB;AAC3C;AACA,4BAA4B,mBAAmB;AAC/C;AACA,2BAA2B,SAAS;AACpC;AACA,0BAA0B,6BAA6B;AACvD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mBAAmB,aAAa;AAChC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACnIA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,YAAY;AACvB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,YAAY;AACxB;AACA;AACA;AACA,gCAAgC,iBAAiB;;AAEjD;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACpFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA,gCAAgC,iBAAiB;;AAEjD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA,YAAY,UAAU;AACtB;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,iCAAiC,yBAAyB;AAC1D,gCAAgC,iBAAiB;;AAEjD;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA,8BAA8B,WAAW;AACzC,+BAA+B,uBAAuB;;AAEtD;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;;AAEA,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA,8BAA8B,WAAW;;AAEzC;;AAEA,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1CA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC/BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,gBAAgB,mBAAO,CAAC,0DAAa;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,iCAAiC,yBAAyB;;AAE1D;AACA;AACA,gCAAgC,cAAc;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,IAAI;AACpB;AACA,WAAW,IAAI;AACf;AACA,YAAY,IAAI;AAChB;AACA;AACA;AACA,kCAAkC,OAAO;AACzC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AClCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,uBAAuB,SAAS;AAChC;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACvCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB;AACA,YAAY,MAAM;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB,WAAW;AAChC;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI,IAA8B;AAClC;AACA;AACA,KAAK,EAEJ;;AAED,CAAC,I;;;;;;;;;;;AC7ID;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,EAAE;AACb,WAAW,EAAE;AACb;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACzCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,YAAY,mBAAO,CAAC,0DAAU;;AAE9B,SAAS,mBAAO,CAAC,8CAAO;AACxB,WAAW,mBAAO,CAAC,kDAAS;AAC5B,gBAAgB,mBAAO,CAAC,4DAAc;AACtC,sBAAsB,mBAAO,CAAC,wEAAoB;AAClD,UAAU,mBAAO,CAAC,gDAAQ;AAC1B,iBAAiB,mBAAO,CAAC,8DAAe;AACxC,yBAAyB,mBAAO,CAAC,8EAAuB;AACxD,YAAY,mBAAO,CAAC,oDAAU;AAC9B,cAAc,mBAAO,CAAC,wDAAY;AAClC,eAAe,mBAAO,CA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ACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,mBAAmB;AACtC;AACA,uBAAuB,sBAAsB;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2BAA2B,sBAAsB;AACjD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC1EA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC7BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,uEAAgB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,WAAW,MAAM;AACjB;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1BA;AACA;AACA;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AACpC,gBAAgB,mBAAO,CAAC,mEAAc;AACtC,kBAAkB,mBAAO,CAAC,uEAAgB;AAC1C,iBAAiB,mBAAO,CAAC,qEAAe;AACxC,qBAAqB,mBAAO,CAAC,6EAAmB;;AAEhD;;;;;;;;;;;;ACtBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,oBAAoB,mBAAO,CAAC,mEAAiB;;AAE7C,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,YAAY,OAAO;;AAEnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,UAAU,YAAY;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;AC9FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,WAAW,mBAAO,CAAC,8CAAY;AAC/B,eAAe,mBAAO,CAAC,yDAAY;;AAEnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChFA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA,8CAA8C,aAAa,qBAAqB;AAChF;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb;AACA,YAAY,EAAE,oBAAoB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACpCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,EAAE;AACb;AACA,YAAY,EAAE;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChEA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;;AAEA;;;;;;;;;;;;ACjDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB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A;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,+BAA+B,oBAAoB;AACnD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,+BAA+B,qBAAqB;AACpD;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,uBAAuB;AAClD;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sCAAsC,uFAAuF;;AAE7H;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC1PA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,sBAAsB,mBAAO,CAAC,6FAA0C;AACxE,YAAY,mBAAO,CAAC,6DAA0B;AAC9C,eAAe,mBAAO,CAAC,iFAAoC;AAC3D,kBAAkB,mBAAO,CAAC,yFAAwC;AAClE,kBAAkB,mBAAO,CAAC,6EAAkC;AAC5D,YAAY,mBAAO,CAAC,uCAAO;AAC3B,gBAAgB,mBAAO,CAAC,mCAAa;AACrC,sBAAsB,mBAAO,CAAC,qEAA8B;AAC5D,qBAAqB,mBAAO,CAAC,iEAA4B;AACzD,WAAW,mBAAO,CAAC,2DAAyB;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,6BAA6B;AACxC;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,uCAAuC,aAAa;;AAEpD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qGAAqG;AACpH,eAAe,OAAO;AACtB,eAAe,gBAAgB;AAC/B,eAAe,QAAQ;AACvB,eAAe,sCAAsC;AACrD,eAAe,sCAAsC;AACrD;AACA,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,eAAe;AAC9B,eAAe,WAAW;AAC1B;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,cAAc;;AAEhD;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAmB;AAClC;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;;AAEA;;AAEA,gBAAgB;AAChB,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;AACA;;AAEA;;AAEA,gBAAgB;AAChB,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,gBAAgB;AAC5B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf,WAAW,QAAQ;AACnB;AACA,YAAY,gBAAgB;AAC5B;;AAEA;;;;;;;;;;;;ACvrCA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,YAAY,mBAAO,CAAC,gEAA6B;AACjD,gBAAgB,mBAAO,CAAC,wGAAiD;AACzE,2BAA2B,mBAAO,CAAC,mEAAwB;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,YAAY;AACvB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,kBAAkB;AAC7B;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;AC3FA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mBAAmB,qBAAqB;AACxC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACnGA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,iFAA+B;AACzD;;AAEA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,mFAAgC;AAC3D;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,YAAY,mBAAO,CAAC,8DAA4B;AAChD,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,mBAAmB,qBAAqB;AACxC;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvKA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACZA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;;AAEA,cAAc,mBAAO,CAAC,oDAAkB;AACxC,aAAa,mBAAO,CAAC,kDAAiB;AACtC,SAAS,mBAAO,CAAC,0CAAa;AAC9B,WAAW,mBAAO,CAAC,8CAAe;AAClC,iBAAiB,mBAAO,CAAC,0DAAqB;AAC9C,WAAW,mBAAO,CAAC,8CAAe;;AAElC;;;;;;;;;;;;ACnBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,mBAAmB,mBAAO,CAAC,8EAAoC;AAC/D,YAAY,mBAAO,CAAC,8DAA4B;AAChD,YAAY,mBAAO,CAAC,gEAA6B;AACjD,6BAA6B,mBAAO,CAAC,gHAAqD;AAC1F,sBAAsB,mBAAO,CAAC,kGAA8C;AAC5E,qBAAqB,mBAAO,CAAC,gGAA6C;AAC1E,6BAA6B,mBAAO,CAAC,gHAAqD;AAC1F,0BAA0B,mBAAO,CAAC,0GAAkD;AACpF,wBAAwB,mBAAO,CAAC,sGAAgD;AAChF,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,eAAe,mBAAO,CAAC,oEAA+B;AACtD,iBAAiB,mBAAO,CAAC,sFAAwC;AACjE,eAAe,mBAAO,CAAC,oEAA+B;AACtD,kBAAkB,mBAAO,CAAC,qCAAY;AACtC,4BAA4B,mBAAO,CAAC,sEAAyB;;AAE7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,YAAY;AACvB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,WAAW;;AAE7C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,kCAAkC,kBAAkB;;AAEpD;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB,eAAe,YAAY;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,kCAAkC,6BAA6B;AAC/D,mCAAmC,+BAA+B;AAClE,oCAAoC,aAAa;AACjD,oCAAoC,aAAa;;AAEjD;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA,oCAAoC,aAAa;AACjD,oCAAoC,aAAa;;AAEjD;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;;AAEA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA,uBAAuB,2BAA2B;AAClD;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2BAA2B,oCAAoC;AAC/D;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,uCAAuC,gBAAgB;;AAEvD;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C,4CAA4C,yBAAyB;;AAErE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA,2BAA2B,qBAAqB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA,gBAAgB,KAAK;AACrB;AACA;AACA;AACA,mCAAmC,YAAY;AAC/C,qCAAqC,cAAc;AACnD,qCAAqC,gBAAgB;;AAErD;AACA;;AAEA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;;ACjjDA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5HA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,kBAAkB,mBAAO,CAAC,8DAA4B;AACtD,mBAAmB,mBAAO,CAAC,8DAA4B;;AAEvD,IAAI,IAAqB;AACzB;AACA,kBAAkB,mBAAO,CAAC,oFAAgC;AAC1D;;AAEA,IAAI,IAAsB;AAC1B;AACA,mBAAmB,mBAAO,CAAC,sFAAiC;AAC5D;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACxBA;AACA;AACA;AACA,kBAAkB;AAClB;;AAEA,uBAAuB,mBAAO,CAAC,gGAA6C;AAC5E,eAAe,mBAAO,CAAC,oEAA+B;AACtD,WAAW,mBAAO,CAAC,4DAA2B;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,gBAAgB;AAC3B,WAAW,OAAO;AAClB,WAAW,8BAA8B;AACzC,WAAW,8CAA8C;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACxKA;;AAEA;AACA;AACA;AACA;AACA,cAAc,gBAAgB,sCAAsC,iBAAiB,EAAE;AACvF,6BAA6B,8EAA8E;AAC3G;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA,kCAAkC,UAAU;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,mDAAmD;AACxD;AACA;AACA;AACA;AACA,KAAK,+DAA+D;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,+DAA+D;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,OAAO;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,OAAO;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,iBAAiB;AAC5D;AACA;AACA;AACA;AACA,2CAA2C,iBAAiB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,mBAAmB;AAC5D;AACA;AACA;AACA;AACA;AACA,yCAAyC,mBAAmB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,oBAAoB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,oBAAoB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA,8CAA8C,oBAAoB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,6CAA6C;AAC/D;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,OAAO;AACxE;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,yBAAyB,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,YAAY;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,oBAAoB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,oBAAoB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA;AACA,kCAAkC,oBAAoB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,cAAc;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,sDAAsD;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA,wCAAwC,iBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yGAAyG;AACzG;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,qGAAqG;AACrG;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,2DAA2D,0BAA0B;AACrF;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,sDAAsD;AAC3D,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,kEAAkE;AACvE,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,OAAO;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,iBAAiB;AACpD;AACA;AACA;AACA,iDAAiD,iBAAiB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,gBAAgB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA,0DAA0D,iBAAiB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK,+DAA+D;AACpE;AACA;AACA;AACA;AACA;AACA,KAAK,4DAA4D;AACjE;AACA;AACA;AACA;AACA;AACA,KAAK,yDAAyD;AAC9D,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,wCAAwC,iBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,gCAAgC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;AACA,2BAA2B,sCAAsC;AACjE;AACA;AACA;AACA;AACA,2BAA2B,iCAAiC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,OAAO;AAClE;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qBAAqB;AACvD,gCAAgC,cAAc;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,qBAAqB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,eAAe;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,eAAe;AAC9C;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qBAAqB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,OAAO;AAC7B;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA,wDAAwD,OAAO;AAC/D;AACA,wDAAwD,OAAO;AAC/D;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,OAAO;AACtC;AACA;AACA;AACA,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA;AACA;AACA,wCAAwC,yBAAyB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA;AACA;AACA,wCAAwC,yBAAyB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA,0DAA0D,SAAS;AACnE;AACA,gEAAgE,WAAW;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,yBAAyB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,SAAS;AAChE;AACA;AACA;AACA,uDAAuD,SAAS;AAChE;AACA;AACA;AACA,uEAAuE,QAAQ;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;AACA;AACA;AACA,oCAAoC,kBAAkB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,qCAAqC,uBAAuB;AAC5D,mCAAmC,WAAW;AAC9C,oCAAoC,oCAAoC;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,mCAAmC,cAAc;AACjD,sCAAsC,iBAAiB;AACvD;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA,qDAAqD,SAAS;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,qBAAqB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,sBAAsB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA,gCAAgC,0BAA0B;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,OAAO;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,OAAO;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,OAAO;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,2BAA2B;AAC1D;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;AACA;AACA;AACA;AACA,mCAAmC,gCAAgC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA,wCAAwC,2BAA2B;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,wBAAwB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,+BAA+B;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,0BAA0B;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,OAAO;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,wBAAwB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,OAAO;AACvD;AACA;AACA,gDAAgD,QAAQ;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0BAA0B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0BAA0B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yFAAyF,OAAO;AAChG;AACA;AACA;AACA,uDAAuD,kBAAkB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,0BAA0B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,oBAAoB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6BAA6B;AACxD;AACA;AACA,+BAA+B,6BAA6B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,wBAAwB;AACnD;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6BAA6B;AACxD;AACA;AACA,+BAA+B,6BAA6B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,wBAAwB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6BAA6B;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,kEAAkE;AACvE;AACA;AACA;AACA;AACA;AACA,KAAK,4DAA4D;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E;AAC5E,kEAAkE;AAClE,qDAAqD;AACrD;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,yBAAyB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,gBAAgB;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,oDAAoD,+BAA+B;AACnF;AACA;AACA;AACA;AACA,mCAAmC,WAAW;AAC9C;AACA;AACA;AACA;AACA;AACA,qCAAqC,UAAU;AAC/C;AACA;AACA;AACA;AACA;AACA,mCAAmC,WAAW;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,UAAU;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,iBAAiB;AACvD,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,wCAAwC,iBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,wBAAwB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,WAAW;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,WAAW;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,WAAW;AAC7D;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,WAAW;AAC5E;AACA;AACA;AACA,0BAA0B,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,qEAAqE;AAC1E,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,iBAAiB;AAC7D,2DAA2D,8CAA8C,EAAE;AAC3G;AACA;AACA,SAAS;AACT;AACA,KAAK,6CAA6C;AAClD,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kFAAkF;AAClF,wEAAwE;AACxE,2DAA2D;AAC3D;AACA,SAAS;AACT;AACA,KAAK,6CAA6C;AAClD,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,sBAAsB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,OAAO;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,6CAA6C;AAClD,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,iBAAiB;AAC7D;AACA;AACA,iBAAiB;AACjB;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,oBAAoB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,UAAU;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,wBAAwB;AAChF,sDAAsD,sDAAsD;AAC5G,sDAAsD,qDAAqD;AAC3G;AACA;AACA;AACA;AACA,sDAAsD,sBAAsB;AAC5E,qDAAqD,4BAA4B;AACjF,qDAAqD,2BAA2B;AAChF;AACA;AACA;AACA;AACA,qDAAqD,qBAAqB;AAC1E;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,sCAAsC,UAAU;AAChD;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS,oFAAoF;AAC7F,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE,6CAA6C,qBAAqB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,oBAAoB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,uBAAuB;AACxF;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF,gDAAgD,qBAAqB;AACrE,8CAA8C,mBAAmB;AACjE;AACA;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,0CAA0C,cAAc;AACxD;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,yDAAyD;AAClE,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,qBAAqB;AAC5E,4DAA4D,0BAA0B;AACtF,8DAA8D,4BAA4B;AAC1F,kEAAkE,sBAAsB;AACxF,8DAA8D,sBAAsB;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,8CAA8C,kDAAkD,iDAAiD,+BAA+B,mCAAmC,0BAA0B,2CAA2C,mDAAmD,8EAA8E,WAAW;AAC/e,iHAAiH,2FAA2F,mCAAmC,sCAAsC,0BAA0B,uEAAuE,WAAW;AACjY;AACA;AACA;AACA,2EAA2E,8CAA8C,+CAA+C,kDAAkD,iDAAiD,+BAA+B,8BAA8B,mCAAmC,0BAA0B,2CAA2C,2CAA2C,mDAAmD,8EAA8E,WAAW;AACvmB,iHAAiH,2FAA2F,mCAAmC,mCAAmC,sCAAsC,0BAA0B,8DAA8D,oDAAoD,8HAA8H,WAAW;AAC7kB;AACA;AACA;AACA,2EAA2E,8CAA8C,iDAAiD,+BAA+B,0BAA0B,2CAA2C,8EAA8E,WAAW;AACvW,iHAAiH,2FAA2F,0BAA0B,mCAAmC,WAAW;AACpR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,qBAAqB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD,wCAAwC,eAAe;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,OAAO;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD,0CAA0C,cAAc;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,sDAAsD;AAC/D,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,SAAS;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,SAAS;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,YAAY;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,qBAAqB;AACrE,8CAA8C,mBAAmB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,SAAS;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,SAAS;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,SAAS;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,OAAO;AAC1C,mCAAmC,OAAO;AAC1C,mCAAmC,OAAO;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,kBAAkB,iBAAiB;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,qEAAqE,OAAO;AAC5E;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,4BAA4B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK,0CAA0C;AAC/C,CAAC,sBAAsB;AACvB;AACA;AACA;;AAEA,CAAC","file":"SpinePluginDebug.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./SpinePlugin.js\");\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Clamp = require('../math/Clamp');\nvar Class = require('../utils/Class');\nvar EventEmitter = require('eventemitter3');\nvar Events = require('./events');\nvar FindClosestInSorted = require('../utils/array/FindClosestInSorted');\nvar Frame = require('./AnimationFrame');\nvar GetValue = require('../utils/object/GetValue');\n\n/**\n * @classdesc\n * A Frame based Animation.\n *\n * This consists of a key, some default values (like the frame rate) and a bunch of Frame objects.\n *\n * The Animation Manager creates these. Game Objects don't own an instance of these directly.\n * Game Objects have the Animation Component, which are like playheads to global Animations (these objects)\n * So multiple Game Objects can have playheads all pointing to this one Animation instance.\n *\n * @class Animation\n * @memberof Phaser.Animations\n * @extends Phaser.Events.EventEmitter\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Animations.AnimationManager} manager - A reference to the global Animation Manager\n * @param {string} key - The unique identifying string for this animation.\n * @param {Phaser.Types.Animations.Animation} config - The Animation configuration.\n */\nvar Animation = new Class({\n\n Extends: EventEmitter,\n\n initialize:\n\n function Animation (manager, key, config)\n {\n EventEmitter.call(this);\n\n /**\n * A reference to the global Animation Manager.\n *\n * @name Phaser.Animations.Animation#manager\n * @type {Phaser.Animations.AnimationManager}\n * @since 3.0.0\n */\n this.manager = manager;\n\n /**\n * The unique identifying string for this animation.\n *\n * @name Phaser.Animations.Animation#key\n * @type {string}\n * @since 3.0.0\n */\n this.key = key;\n\n /**\n * A frame based animation (as opposed to a bone based animation)\n *\n * @name Phaser.Animations.Animation#type\n * @type {string}\n * @default frame\n * @since 3.0.0\n */\n this.type = 'frame';\n\n /**\n * Extract all the frame data into the frames array.\n *\n * @name Phaser.Animations.Animation#frames\n * @type {Phaser.Animations.AnimationFrame[]}\n * @since 3.0.0\n */\n this.frames = this.getFrames(\n manager.textureManager,\n GetValue(config, 'frames', []),\n GetValue(config, 'defaultTextureKey', null)\n );\n\n /**\n * The frame rate of playback in frames per second (default 24 if duration is null)\n *\n * @name Phaser.Animations.Animation#frameRate\n * @type {integer}\n * @default 24\n * @since 3.0.0\n */\n this.frameRate = GetValue(config, 'frameRate', null);\n\n /**\n * How long the animation should play for, in milliseconds.\n * If the `frameRate` property has been set then it overrides this value,\n * otherwise the `frameRate` is derived from `duration`.\n *\n * @name Phaser.Animations.Animation#duration\n * @type {integer}\n * @since 3.0.0\n */\n this.duration = GetValue(config, 'duration', null);\n\n if (this.duration === null && this.frameRate === null)\n {\n // No duration or frameRate given, use default frameRate of 24fps\n this.frameRate = 24;\n this.duration = (this.frameRate / this.frames.length) * 1000;\n }\n else if (this.duration && this.frameRate === null)\n {\n // Duration given but no frameRate, so set the frameRate based on duration\n // I.e. 12 frames in the animation, duration = 4000 ms\n // So frameRate is 12 / (4000 / 1000) = 3 fps\n this.frameRate = this.frames.length / (this.duration / 1000);\n }\n else\n {\n // frameRate given, derive duration from it (even if duration also specified)\n // I.e. 15 frames in the animation, frameRate = 30 fps\n // So duration is 15 / 30 = 0.5 * 1000 (half a second, or 500ms)\n this.duration = (this.frames.length / this.frameRate) * 1000;\n }\n\n /**\n * How many ms per frame, not including frame specific modifiers.\n *\n * @name Phaser.Animations.Animation#msPerFrame\n * @type {integer}\n * @since 3.0.0\n */\n this.msPerFrame = 1000 / this.frameRate;\n\n /**\n * Skip frames if the time lags, or always advanced anyway?\n *\n * @name Phaser.Animations.Animation#skipMissedFrames\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.skipMissedFrames = GetValue(config, 'skipMissedFrames', true);\n\n /**\n * The delay in ms before the playback will begin.\n *\n * @name Phaser.Animations.Animation#delay\n * @type {integer}\n * @default 0\n * @since 3.0.0\n */\n this.delay = GetValue(config, 'delay', 0);\n\n /**\n * Number of times to repeat the animation. Set to -1 to repeat forever.\n *\n * @name Phaser.Animations.Animation#repeat\n * @type {integer}\n * @default 0\n * @since 3.0.0\n */\n this.repeat = GetValue(config, 'repeat', 0);\n\n /**\n * The delay in ms before the a repeat play starts.\n *\n * @name Phaser.Animations.Animation#repeatDelay\n * @type {integer}\n * @default 0\n * @since 3.0.0\n */\n this.repeatDelay = GetValue(config, 'repeatDelay', 0);\n\n /**\n * Should the animation yoyo (reverse back down to the start) before repeating?\n *\n * @name Phaser.Animations.Animation#yoyo\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.yoyo = GetValue(config, 'yoyo', false);\n\n /**\n * Should the GameObject's `visible` property be set to `true` when the animation starts to play?\n *\n * @name Phaser.Animations.Animation#showOnStart\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.showOnStart = GetValue(config, 'showOnStart', false);\n\n /**\n * Should the GameObject's `visible` property be set to `false` when the animation finishes?\n *\n * @name Phaser.Animations.Animation#hideOnComplete\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.hideOnComplete = GetValue(config, 'hideOnComplete', false);\n\n /**\n * Global pause. All Game Objects using this Animation instance are impacted by this property.\n *\n * @name Phaser.Animations.Animation#paused\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.paused = false;\n\n this.manager.on(Events.PAUSE_ALL, this.pause, this);\n this.manager.on(Events.RESUME_ALL, this.resume, this);\n },\n\n /**\n * Add frames to the end of the animation.\n *\n * @method Phaser.Animations.Animation#addFrame\n * @since 3.0.0\n *\n * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects.\n *\n * @return {this} This Animation object.\n */\n addFrame: function (config)\n {\n return this.addFrameAt(this.frames.length, config);\n },\n\n /**\n * Add frame/s into the animation.\n *\n * @method Phaser.Animations.Animation#addFrameAt\n * @since 3.0.0\n *\n * @param {integer} index - The index to insert the frame at within the animation.\n * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects.\n *\n * @return {this} This Animation object.\n */\n addFrameAt: function (index, config)\n {\n var newFrames = this.getFrames(this.manager.textureManager, config);\n\n if (newFrames.length > 0)\n {\n if (index === 0)\n {\n this.frames = newFrames.concat(this.frames);\n }\n else if (index === this.frames.length)\n {\n this.frames = this.frames.concat(newFrames);\n }\n else\n {\n var pre = this.frames.slice(0, index);\n var post = this.frames.slice(index);\n\n this.frames = pre.concat(newFrames, post);\n }\n\n this.updateFrameSequence();\n }\n\n return this;\n },\n\n /**\n * Check if the given frame index is valid.\n *\n * @method Phaser.Animations.Animation#checkFrame\n * @since 3.0.0\n *\n * @param {integer} index - The index to be checked.\n *\n * @return {boolean} `true` if the index is valid, otherwise `false`.\n */\n checkFrame: function (index)\n {\n return (index >= 0 && index < this.frames.length);\n },\n\n /**\n * Called internally when this Animation completes playback.\n * Optionally, hides the parent Game Object, then stops playback.\n *\n * @method Phaser.Animations.Animation#completeAnimation\n * @protected\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\n */\n completeAnimation: function (component)\n {\n if (this.hideOnComplete)\n {\n component.parent.visible = false;\n }\n\n component.stop();\n },\n\n /**\n * Called internally when this Animation first starts to play.\n * Sets the accumulator and nextTick properties.\n *\n * @method Phaser.Animations.Animation#getFirstTick\n * @protected\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\n * @param {boolean} [includeDelay=true] - If `true` the Animation Components delay value will be added to the `nextTick` total.\n */\n getFirstTick: function (component, includeDelay)\n {\n if (includeDelay === undefined) { includeDelay = true; }\n\n // When is the first update due?\n component.accumulator = 0;\n component.nextTick = component.msPerFrame + component.currentFrame.duration;\n\n if (includeDelay)\n {\n component.nextTick += component._delay;\n }\n },\n\n /**\n * Returns the AnimationFrame at the provided index\n *\n * @method Phaser.Animations.Animation#getFrameAt\n * @protected\n * @since 3.0.0\n *\n * @param {integer} index - The index in the AnimationFrame array\n *\n * @return {Phaser.Animations.AnimationFrame} The frame at the index provided from the animation sequence\n */\n getFrameAt: function (index)\n {\n return this.frames[index];\n },\n\n /**\n * Creates AnimationFrame instances based on the given frame data.\n *\n * @method Phaser.Animations.Animation#getFrames\n * @since 3.0.0\n *\n * @param {Phaser.Textures.TextureManager} textureManager - A reference to the global Texture Manager.\n * @param {(string|Phaser.Types.Animations.AnimationFrame[])} frames - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects.\n * @param {string} [defaultTextureKey] - The key to use if no key is set in the frame configuration object.\n *\n * @return {Phaser.Animations.AnimationFrame[]} An array of newly created AnimationFrame instances.\n */\n getFrames: function (textureManager, frames, defaultTextureKey)\n {\n var out = [];\n var prev;\n var animationFrame;\n var index = 1;\n var i;\n var textureKey;\n\n // if frames is a string, we'll get all the frames from the texture manager as if it's a sprite sheet\n if (typeof frames === 'string')\n {\n textureKey = frames;\n\n var texture = textureManager.get(textureKey);\n var frameKeys = texture.getFrameNames();\n\n frames = [];\n\n frameKeys.forEach(function (idx, value)\n {\n frames.push({ key: textureKey, frame: value });\n });\n }\n\n if (!Array.isArray(frames) || frames.length === 0)\n {\n return out;\n }\n\n for (i = 0; i < frames.length; i++)\n {\n var item = frames[i];\n\n var key = GetValue(item, 'key', defaultTextureKey);\n\n if (!key)\n {\n continue;\n }\n\n // Could be an integer or a string\n var frame = GetValue(item, 'frame', 0);\n\n // The actual texture frame\n var textureFrame = textureManager.getFrame(key, frame);\n\n animationFrame = new Frame(key, frame, index, textureFrame);\n\n animationFrame.duration = GetValue(item, 'duration', 0);\n\n animationFrame.isFirst = (!prev);\n\n // The previously created animationFrame\n if (prev)\n {\n prev.nextFrame = animationFrame;\n\n animationFrame.prevFrame = prev;\n }\n\n out.push(animationFrame);\n\n prev = animationFrame;\n\n index++;\n }\n\n if (out.length > 0)\n {\n animationFrame.isLast = true;\n\n // Link them end-to-end, so they loop\n animationFrame.nextFrame = out[0];\n\n out[0].prevFrame = animationFrame;\n\n // Generate the progress data\n\n var slice = 1 / (out.length - 1);\n\n for (i = 0; i < out.length; i++)\n {\n out[i].progress = i * slice;\n }\n }\n\n return out;\n },\n\n /**\n * Called internally. Sets the accumulator and nextTick values of the current Animation.\n *\n * @method Phaser.Animations.Animation#getNextTick\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\n */\n getNextTick: function (component)\n {\n // accumulator += delta * _timeScale\n // after a large delta surge (perf issue for example) we need to adjust for it here\n\n // When is the next update due?\n component.accumulator -= component.nextTick;\n\n component.nextTick = component.msPerFrame + component.currentFrame.duration;\n },\n\n /**\n * Loads the Animation values into the Animation Component.\n *\n * @method Phaser.Animations.Animation#load\n * @private\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to load values into.\n * @param {integer} startFrame - The start frame of the animation to load.\n */\n load: function (component, startFrame)\n {\n if (startFrame >= this.frames.length)\n {\n startFrame = 0;\n }\n\n if (component.currentAnim !== this)\n {\n component.currentAnim = this;\n\n component.frameRate = this.frameRate;\n component.duration = this.duration;\n component.msPerFrame = this.msPerFrame;\n component.skipMissedFrames = this.skipMissedFrames;\n\n component._delay = this.delay;\n component._repeat = this.repeat;\n component._repeatDelay = this.repeatDelay;\n component._yoyo = this.yoyo;\n }\n\n var frame = this.frames[startFrame];\n\n if (startFrame === 0 && !component.forward)\n {\n frame = this.getLastFrame();\n }\n\n component.updateFrame(frame);\n },\n\n /**\n * Returns the frame closest to the given progress value between 0 and 1.\n *\n * @method Phaser.Animations.Animation#getFrameByProgress\n * @since 3.4.0\n *\n * @param {number} value - A value between 0 and 1.\n *\n * @return {Phaser.Animations.AnimationFrame} The frame closest to the given progress value.\n */\n getFrameByProgress: function (value)\n {\n value = Clamp(value, 0, 1);\n\n return FindClosestInSorted(value, this.frames, 'progress');\n },\n\n /**\n * Advance the animation frame.\n *\n * @method Phaser.Animations.Animation#nextFrame\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to advance.\n */\n nextFrame: function (component)\n {\n var frame = component.currentFrame;\n\n // TODO: Add frame skip support\n\n if (frame.isLast)\n {\n // We're at the end of the animation\n\n // Yoyo? (happens before repeat)\n if (component._yoyo)\n {\n this.handleYoyoFrame(component, false);\n }\n else if (component.repeatCounter > 0)\n {\n // Repeat (happens before complete)\n\n if (component._reverse && component.forward)\n {\n component.forward = false;\n }\n else\n {\n this.repeatAnimation(component);\n }\n }\n else\n {\n this.completeAnimation(component);\n }\n }\n else\n {\n this.updateAndGetNextTick(component, frame.nextFrame);\n }\n },\n\n /**\n * Handle the yoyo functionality in nextFrame and previousFrame methods.\n *\n * @method Phaser.Animations.Animation#handleYoyoFrame\n * @private\n * @since 3.12.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to advance.\n * @param {boolean} isReverse - Is animation in reverse mode? (Default: false)\n */\n handleYoyoFrame: function (component, isReverse)\n {\n if (!isReverse) { isReverse = false; }\n\n if (component._reverse === !isReverse && component.repeatCounter > 0)\n {\n if (!component._repeatDelay || component.pendingRepeat)\n\n {\n component.forward = isReverse;\n }\n\n this.repeatAnimation(component);\n\n return;\n }\n\n if (component._reverse !== isReverse && component.repeatCounter === 0)\n {\n this.completeAnimation(component);\n\n return;\n }\n \n component.forward = isReverse;\n\n var frame = (isReverse) ? component.currentFrame.nextFrame : component.currentFrame.prevFrame;\n\n this.updateAndGetNextTick(component, frame);\n },\n\n /**\n * Returns the animation last frame.\n *\n * @method Phaser.Animations.Animation#getLastFrame\n * @since 3.12.0\n *\n * @return {Phaser.Animations.AnimationFrame} component - The Animation Last Frame.\n */\n getLastFrame: function ()\n {\n return this.frames[this.frames.length - 1];\n },\n\n /**\n * Called internally when the Animation is playing backwards.\n * Sets the previous frame, causing a yoyo, repeat, complete or update, accordingly.\n *\n * @method Phaser.Animations.Animation#previousFrame\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\n */\n previousFrame: function (component)\n {\n var frame = component.currentFrame;\n\n // TODO: Add frame skip support\n\n if (frame.isFirst)\n {\n // We're at the start of the animation\n\n if (component._yoyo)\n {\n this.handleYoyoFrame(component, true);\n }\n else if (component.repeatCounter > 0)\n {\n if (component._reverse && !component.forward)\n {\n component.currentFrame = this.getLastFrame();\n this.repeatAnimation(component);\n }\n else\n {\n // Repeat (happens before complete)\n component.forward = true;\n this.repeatAnimation(component);\n }\n }\n else\n {\n this.completeAnimation(component);\n }\n }\n else\n {\n this.updateAndGetNextTick(component, frame.prevFrame);\n }\n },\n\n /**\n * Update Frame and Wait next tick.\n *\n * @method Phaser.Animations.Animation#updateAndGetNextTick\n * @private\n * @since 3.12.0\n *\n * @param {Phaser.Animations.AnimationFrame} frame - An Animation frame.\n */\n updateAndGetNextTick: function (component, frame)\n {\n component.updateFrame(frame);\n\n this.getNextTick(component);\n },\n\n /**\n * Removes the given AnimationFrame from this Animation instance.\n * This is a global action. Any Game Object using this Animation will be impacted by this change.\n *\n * @method Phaser.Animations.Animation#removeFrame\n * @since 3.0.0\n *\n * @param {Phaser.Animations.AnimationFrame} frame - The AnimationFrame to be removed.\n *\n * @return {this} This Animation object.\n */\n removeFrame: function (frame)\n {\n var index = this.frames.indexOf(frame);\n\n if (index !== -1)\n {\n this.removeFrameAt(index);\n }\n\n return this;\n },\n\n /**\n * Removes a frame from the AnimationFrame array at the provided index\n * and updates the animation accordingly.\n *\n * @method Phaser.Animations.Animation#removeFrameAt\n * @since 3.0.0\n *\n * @param {integer} index - The index in the AnimationFrame array\n *\n * @return {this} This Animation object.\n */\n removeFrameAt: function (index)\n {\n this.frames.splice(index, 1);\n\n this.updateFrameSequence();\n\n return this;\n },\n\n /**\n * Called internally during playback. Forces the animation to repeat, providing there are enough counts left\n * in the repeat counter.\n *\n * @method Phaser.Animations.Animation#repeatAnimation\n * @fires Phaser.Animations.Events#ANIMATION_REPEAT\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_REPEAT\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\n */\n repeatAnimation: function (component)\n {\n if (component._pendingStop === 2)\n {\n return this.completeAnimation(component);\n }\n\n if (component._repeatDelay > 0 && component.pendingRepeat === false)\n {\n component.pendingRepeat = true;\n component.accumulator -= component.nextTick;\n component.nextTick += component._repeatDelay;\n }\n else\n {\n component.repeatCounter--;\n\n component.updateFrame(component.currentFrame[(component.forward) ? 'nextFrame' : 'prevFrame']);\n\n if (component.isPlaying)\n {\n this.getNextTick(component);\n\n component.pendingRepeat = false;\n\n var frame = component.currentFrame;\n var parent = component.parent;\n\n this.emit(Events.ANIMATION_REPEAT, this, frame);\n\n parent.emit(Events.SPRITE_ANIMATION_KEY_REPEAT + this.key, this, frame, component.repeatCounter, parent);\n\n parent.emit(Events.SPRITE_ANIMATION_REPEAT, this, frame, component.repeatCounter, parent);\n }\n }\n },\n\n /**\n * Sets the texture frame the animation uses for rendering.\n *\n * @method Phaser.Animations.Animation#setFrame\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call.\n */\n setFrame: function (component)\n {\n // Work out which frame should be set next on the child, and set it\n if (component.forward)\n {\n this.nextFrame(component);\n }\n else\n {\n this.previousFrame(component);\n }\n },\n\n /**\n * Converts the animation data to JSON.\n *\n * @method Phaser.Animations.Animation#toJSON\n * @since 3.0.0\n *\n * @return {Phaser.Types.Animations.JSONAnimation} The resulting JSONAnimation formatted object.\n */\n toJSON: function ()\n {\n var output = {\n key: this.key,\n type: this.type,\n frames: [],\n frameRate: this.frameRate,\n duration: this.duration,\n skipMissedFrames: this.skipMissedFrames,\n delay: this.delay,\n repeat: this.repeat,\n repeatDelay: this.repeatDelay,\n yoyo: this.yoyo,\n showOnStart: this.showOnStart,\n hideOnComplete: this.hideOnComplete\n };\n\n this.frames.forEach(function (frame)\n {\n output.frames.push(frame.toJSON());\n });\n\n return output;\n },\n\n /**\n * Called internally whenever frames are added to, or removed from, this Animation.\n *\n * @method Phaser.Animations.Animation#updateFrameSequence\n * @since 3.0.0\n *\n * @return {this} This Animation object.\n */\n updateFrameSequence: function ()\n {\n var len = this.frames.length;\n var slice = 1 / (len - 1);\n\n var frame;\n\n for (var i = 0; i < len; i++)\n {\n frame = this.frames[i];\n\n frame.index = i + 1;\n frame.isFirst = false;\n frame.isLast = false;\n frame.progress = i * slice;\n\n if (i === 0)\n {\n frame.isFirst = true;\n\n if (len === 1)\n {\n frame.isLast = true;\n frame.nextFrame = frame;\n frame.prevFrame = frame;\n }\n else\n {\n frame.isLast = false;\n frame.prevFrame = this.frames[len - 1];\n frame.nextFrame = this.frames[i + 1];\n }\n }\n else if (i === len - 1 && len > 1)\n {\n frame.isLast = true;\n frame.prevFrame = this.frames[len - 2];\n frame.nextFrame = this.frames[0];\n }\n else if (len > 1)\n {\n frame.prevFrame = this.frames[i - 1];\n frame.nextFrame = this.frames[i + 1];\n }\n }\n\n return this;\n },\n\n /**\n * Pauses playback of this Animation. The paused state is set immediately.\n *\n * @method Phaser.Animations.Animation#pause\n * @since 3.0.0\n *\n * @return {this} This Animation object.\n */\n pause: function ()\n {\n this.paused = true;\n\n return this;\n },\n\n /**\n * Resumes playback of this Animation. The paused state is reset immediately.\n *\n * @method Phaser.Animations.Animation#resume\n * @since 3.0.0\n *\n * @return {this} This Animation object.\n */\n resume: function ()\n {\n this.paused = false;\n\n return this;\n },\n\n /**\n * Destroys this Animation instance. It will remove all event listeners,\n * remove this animation and its key from the global Animation Manager,\n * and then destroy all Animation Frames in turn.\n *\n * @method Phaser.Animations.Animation#destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.removeAllListeners();\n\n this.manager.off(Events.PAUSE_ALL, this.pause, this);\n this.manager.off(Events.RESUME_ALL, this.resume, this);\n\n this.manager.remove(this.key);\n\n for (var i = 0; i < this.frames.length; i++)\n {\n this.frames[i].destroy();\n }\n\n this.frames = [];\n\n this.manager = null;\n }\n\n});\n\nmodule.exports = Animation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\n\n/**\n * @classdesc\n * A single frame in an Animation sequence.\n *\n * An AnimationFrame consists of a reference to the Texture it uses for rendering, references to other\n * frames in the animation, and index data. It also has the ability to modify the animation timing.\n *\n * AnimationFrames are generated automatically by the Animation class.\n *\n * @class AnimationFrame\n * @memberof Phaser.Animations\n * @constructor\n * @since 3.0.0\n *\n * @param {string} textureKey - The key of the Texture this AnimationFrame uses.\n * @param {(string|integer)} textureFrame - The key of the Frame within the Texture that this AnimationFrame uses.\n * @param {integer} index - The index of this AnimationFrame within the Animation sequence.\n * @param {Phaser.Textures.Frame} frame - A reference to the Texture Frame this AnimationFrame uses for rendering.\n */\nvar AnimationFrame = new Class({\n\n initialize:\n\n function AnimationFrame (textureKey, textureFrame, index, frame)\n {\n /**\n * The key of the Texture this AnimationFrame uses.\n *\n * @name Phaser.Animations.AnimationFrame#textureKey\n * @type {string}\n * @since 3.0.0\n */\n this.textureKey = textureKey;\n\n /**\n * The key of the Frame within the Texture that this AnimationFrame uses.\n *\n * @name Phaser.Animations.AnimationFrame#textureFrame\n * @type {(string|integer)}\n * @since 3.0.0\n */\n this.textureFrame = textureFrame;\n\n /**\n * The index of this AnimationFrame within the Animation sequence.\n *\n * @name Phaser.Animations.AnimationFrame#index\n * @type {integer}\n * @since 3.0.0\n */\n this.index = index;\n\n /**\n * A reference to the Texture Frame this AnimationFrame uses for rendering.\n *\n * @name Phaser.Animations.AnimationFrame#frame\n * @type {Phaser.Textures.Frame}\n * @since 3.0.0\n */\n this.frame = frame;\n\n /**\n * Is this the first frame in an animation sequence?\n *\n * @name Phaser.Animations.AnimationFrame#isFirst\n * @type {boolean}\n * @default false\n * @readonly\n * @since 3.0.0\n */\n this.isFirst = false;\n\n /**\n * Is this the last frame in an animation sequence?\n *\n * @name Phaser.Animations.AnimationFrame#isLast\n * @type {boolean}\n * @default false\n * @readonly\n * @since 3.0.0\n */\n this.isLast = false;\n\n /**\n * A reference to the AnimationFrame that comes before this one in the animation, if any.\n *\n * @name Phaser.Animations.AnimationFrame#prevFrame\n * @type {?Phaser.Animations.AnimationFrame}\n * @default null\n * @readonly\n * @since 3.0.0\n */\n this.prevFrame = null;\n\n /**\n * A reference to the AnimationFrame that comes after this one in the animation, if any.\n *\n * @name Phaser.Animations.AnimationFrame#nextFrame\n * @type {?Phaser.Animations.AnimationFrame}\n * @default null\n * @readonly\n * @since 3.0.0\n */\n this.nextFrame = null;\n\n /**\n * Additional time (in ms) that this frame should appear for during playback.\n * The value is added onto the msPerFrame set by the animation.\n *\n * @name Phaser.Animations.AnimationFrame#duration\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.duration = 0;\n\n /**\n * What % through the animation does this frame come?\n * This value is generated when the animation is created and cached here.\n *\n * @name Phaser.Animations.AnimationFrame#progress\n * @type {number}\n * @default 0\n * @readonly\n * @since 3.0.0\n */\n this.progress = 0;\n },\n\n /**\n * Generates a JavaScript object suitable for converting to JSON.\n *\n * @method Phaser.Animations.AnimationFrame#toJSON\n * @since 3.0.0\n *\n * @return {Phaser.Types.Animations.JSONAnimationFrame} The AnimationFrame data.\n */\n toJSON: function ()\n {\n return {\n key: this.textureKey,\n frame: this.textureFrame,\n duration: this.duration\n };\n },\n\n /**\n * Destroys this object by removing references to external resources and callbacks.\n *\n * @method Phaser.Animations.AnimationFrame#destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.frame = undefined;\n }\n\n});\n\nmodule.exports = AnimationFrame;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Add Animation Event.\n * \n * This event is dispatched when a new animation is added to the global Animation Manager.\n * \n * This can happen either as a result of an animation instance being added to the Animation Manager,\n * or the Animation Manager creating a new animation directly.\n *\n * @event Phaser.Animations.Events#ADD_ANIMATION\n * @since 3.0.0\n * \n * @param {string} key - The key of the Animation that was added to the global Animation Manager.\n * @param {Phaser.Animations.Animation} animation - An instance of the newly created Animation.\n */\nmodule.exports = 'add';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Animation Complete Event.\n * \n * This event is dispatched by an Animation instance when it completes, i.e. finishes playing or is manually stopped.\n * \n * Be careful with the volume of events this could generate. If a group of Sprites all complete the same\n * animation at the same time, this event will invoke its handler for each one of them.\n *\n * @event Phaser.Animations.Events#ANIMATION_COMPLETE\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed.\n */\nmodule.exports = 'complete';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Animation Repeat Event.\n * \n * This event is dispatched when a currently playing animation repeats.\n * \n * The event is dispatched directly from the Animation object itself. Which means that listeners\n * bound to this event will be invoked every time the Animation repeats, for every Game Object that may have it.\n *\n * @event Phaser.Animations.Events#ANIMATION_REPEAT\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that repeated.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation was on when it repeated.\n */\nmodule.exports = 'repeat';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Animation Restart Event.\n * \n * This event is dispatched by an Animation instance when it restarts.\n * \n * Be careful with the volume of events this could generate. If a group of Sprites all restart the same\n * animation at the same time, this event will invoke its handler for each one of them.\n *\n * @event Phaser.Animations.Events#ANIMATION_RESTART\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that restarted playing.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing.\n */\nmodule.exports = 'restart';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Animation Start Event.\n * \n * This event is dispatched by an Animation instance when it starts playing.\n * \n * Be careful with the volume of events this could generate. If a group of Sprites all play the same\n * animation at the same time, this event will invoke its handler for each one of them.\n *\n * @event Phaser.Animations.Events#ANIMATION_START\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that started playing.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing.\n */\nmodule.exports = 'start';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Pause All Animations Event.\n * \n * This event is dispatched when the global Animation Manager is told to pause.\n * \n * When this happens all current animations will stop updating, although it doesn't necessarily mean\n * that the game has paused as well.\n *\n * @event Phaser.Animations.Events#PAUSE_ALL\n * @since 3.0.0\n */\nmodule.exports = 'pauseall';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Remove Animation Event.\n * \n * This event is dispatched when an animation is removed from the global Animation Manager.\n *\n * @event Phaser.Animations.Events#REMOVE_ANIMATION\n * @since 3.0.0\n * \n * @param {string} key - The key of the Animation that was removed from the global Animation Manager.\n * @param {Phaser.Animations.Animation} animation - An instance of the removed Animation.\n */\nmodule.exports = 'remove';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Resume All Animations Event.\n * \n * This event is dispatched when the global Animation Manager resumes, having been previously paused.\n * \n * When this happens all current animations will continue updating again.\n *\n * @event Phaser.Animations.Events#RESUME_ALL\n * @since 3.0.0\n */\nmodule.exports = 'resumeall';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Complete Event.\n * \n * This event is dispatched by a Sprite when an animation finishes playing on it.\n * \n * Listen for it on the Sprite using `sprite.on('animationcomplete', listener)`\n * \n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_COMPLETE` event.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_COMPLETE\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed.\n */\nmodule.exports = 'animationcomplete';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Key Complete Event.\n * \n * This event is dispatched by a Sprite when a specific animation finishes playing on it.\n * \n * Listen for it on the Sprite using `sprite.on('animationcomplete-key', listener)` where `key` is the key of\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationcomplete-explode`.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_COMPLETE\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed.\n */\nmodule.exports = 'animationcomplete-';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Key Repeat Event.\n * \n * This event is dispatched by a Sprite when a specific animation repeats playing on it.\n * \n * Listen for it on the Sprite using `sprite.on('animationrepeat-key', listener)` where `key` is the key of\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrepeat-explode`.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\n * @param {integer} repeatCount - The number of times the Animation has repeated so far.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing.\n */\nmodule.exports = 'animationrepeat-';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Key Restart Event.\n * \n * This event is dispatched by a Sprite when a specific animation restarts playing on it.\n * \n * Listen for it on the Sprite using `sprite.on('animationrestart-key', listener)` where `key` is the key of\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrestart-explode`.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing.\n */\nmodule.exports = 'animationrestart-';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Key Start Event.\n * \n * This event is dispatched by a Sprite when a specific animation starts playing on it.\n * \n * Listen for it on the Sprite using `sprite.on('animationstart-key', listener)` where `key` is the key of\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationstart-explode`.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing.\n */\nmodule.exports = 'animationstart-';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Key Update Event.\n * \n * This event is dispatched by a Sprite when a specific animation playing on it updates. This happens when the animation changes frame,\n * based on the animation frame rate and other factors like `timeScale` and `delay`.\n * \n * Listen for it on the Sprite using `sprite.on('animationupdate-key', listener)` where `key` is the key of\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationupdate-explode`.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated.\n */\nmodule.exports = 'animationupdate-';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Repeat Event.\n * \n * This event is dispatched by a Sprite when an animation repeats playing on it.\n * \n * Listen for it on the Sprite using `sprite.on('animationrepeat', listener)`\n * \n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_REPEAT` event.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_REPEAT\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\n * @param {integer} repeatCount - The number of times the Animation has repeated so far.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing.\n */\nmodule.exports = 'animationrepeat';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Restart Event.\n * \n * This event is dispatched by a Sprite when an animation restarts playing on it.\n * \n * Listen for it on the Sprite using `sprite.on('animationrestart', listener)`\n * \n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_RESTART` event.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_RESTART\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing.\n */\nmodule.exports = 'animationrestart';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Start Event.\n * \n * This event is dispatched by a Sprite when an animation starts playing on it.\n * \n * Listen for it on the Sprite using `sprite.on('animationstart', listener)`\n * \n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_START` event.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_START\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing.\n */\nmodule.exports = 'animationstart';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Sprite Animation Update Event.\n * \n * This event is dispatched by a Sprite when an animation playing on it updates. This happens when the animation changes frame,\n * based on the animation frame rate and other factors like `timeScale` and `delay`.\n * \n * Listen for it on the Sprite using `sprite.on('animationupdate', listener)`\n * \n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_UPDATE` event.\n *\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE\n * @since 3.16.1\n * \n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite.\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation.\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated.\n */\nmodule.exports = 'animationupdate';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Animations.Events\n */\n\nmodule.exports = {\n\n ADD_ANIMATION: require('./ADD_ANIMATION_EVENT'),\n ANIMATION_COMPLETE: require('./ANIMATION_COMPLETE_EVENT'),\n ANIMATION_REPEAT: require('./ANIMATION_REPEAT_EVENT'),\n ANIMATION_RESTART: require('./ANIMATION_RESTART_EVENT'),\n ANIMATION_START: require('./ANIMATION_START_EVENT'),\n PAUSE_ALL: require('./PAUSE_ALL_EVENT'),\n REMOVE_ANIMATION: require('./REMOVE_ANIMATION_EVENT'),\n RESUME_ALL: require('./RESUME_ALL_EVENT'),\n SPRITE_ANIMATION_COMPLETE: require('./SPRITE_ANIMATION_COMPLETE_EVENT'),\n SPRITE_ANIMATION_KEY_COMPLETE: require('./SPRITE_ANIMATION_KEY_COMPLETE_EVENT'),\n SPRITE_ANIMATION_KEY_REPEAT: require('./SPRITE_ANIMATION_KEY_REPEAT_EVENT'),\n SPRITE_ANIMATION_KEY_RESTART: require('./SPRITE_ANIMATION_KEY_RESTART_EVENT'),\n SPRITE_ANIMATION_KEY_START: require('./SPRITE_ANIMATION_KEY_START_EVENT'),\n SPRITE_ANIMATION_KEY_UPDATE: require('./SPRITE_ANIMATION_KEY_UPDATE_EVENT'),\n SPRITE_ANIMATION_REPEAT: require('./SPRITE_ANIMATION_REPEAT_EVENT'),\n SPRITE_ANIMATION_RESTART: require('./SPRITE_ANIMATION_RESTART_EVENT'),\n SPRITE_ANIMATION_START: require('./SPRITE_ANIMATION_START_EVENT'),\n SPRITE_ANIMATION_UPDATE: require('./SPRITE_ANIMATION_UPDATE_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Blur Event.\n * \n * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded\n * enters a blurred state. The blur event is raised when the window loses focus. This can happen if a user swaps\n * tab, or if they simply remove focus from the browser to another app.\n *\n * @event Phaser.Core.Events#BLUR\n * @since 3.0.0\n */\nmodule.exports = 'blur';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Boot Event.\n * \n * This event is dispatched when the Phaser Game instance has finished booting, but before it is ready to start running.\n * The global systems use this event to know when to set themselves up, dispatching their own `ready` events as required.\n *\n * @event Phaser.Core.Events#BOOT\n * @since 3.0.0\n */\nmodule.exports = 'boot';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Context Lost Event.\n * \n * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Lost event from the browser.\n * \n * The partner event is `CONTEXT_RESTORED`.\n *\n * @event Phaser.Core.Events#CONTEXT_LOST\n * @since 3.19.0\n */\nmodule.exports = 'contextlost';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Context Restored Event.\n * \n * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Restored event from the browser.\n * \n * The partner event is `CONTEXT_LOST`.\n *\n * @event Phaser.Core.Events#CONTEXT_RESTORED\n * @since 3.19.0\n */\nmodule.exports = 'contextrestored';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Destroy Event.\n * \n * This event is dispatched when the game instance has been told to destroy itself.\n * Lots of internal systems listen to this event in order to clear themselves out.\n * Custom plugins and game code should also do the same.\n *\n * @event Phaser.Core.Events#DESTROY\n * @since 3.0.0\n */\nmodule.exports = 'destroy';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Focus Event.\n * \n * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded\n * enters a focused state. The focus event is raised when the window re-gains focus, having previously lost it.\n *\n * @event Phaser.Core.Events#FOCUS\n * @since 3.0.0\n */\nmodule.exports = 'focus';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Hidden Event.\n * \n * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded\n * enters a hidden state. Only browsers that support the Visibility API will cause this event to be emitted.\n * \n * In most modern browsers, when the document enters a hidden state, the Request Animation Frame and setTimeout, which\n * control the main game loop, will automatically pause. There is no way to stop this from happening. It is something\n * your game should account for in its own code, should the pause be an issue (i.e. for multiplayer games)\n *\n * @event Phaser.Core.Events#HIDDEN\n * @since 3.0.0\n */\nmodule.exports = 'hidden';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Pause Event.\n * \n * This event is dispatched when the Game loop enters a paused state, usually as a result of the Visibility Handler.\n *\n * @event Phaser.Core.Events#PAUSE\n * @since 3.0.0\n */\nmodule.exports = 'pause';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Post-Render Event.\n * \n * This event is dispatched right at the end of the render process.\n * \n * Every Scene will have rendered and been drawn to the canvas by the time this event is fired.\n * Use it for any last minute post-processing before the next game step begins.\n *\n * @event Phaser.Core.Events#POST_RENDER\n * @since 3.0.0\n * \n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - A reference to the current renderer being used by the Game instance.\n */\nmodule.exports = 'postrender';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Post-Step Event.\n * \n * This event is dispatched after the Scene Manager has updated.\n * Hook into it from plugins or systems that need to do things before the render starts.\n *\n * @event Phaser.Core.Events#POST_STEP\n * @since 3.0.0\n * \n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\n */\nmodule.exports = 'poststep';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Pre-Render Event.\n * \n * This event is dispatched immediately before any of the Scenes have started to render.\n * \n * The renderer will already have been initialized this frame, clearing itself and preparing to receive the Scenes for rendering, but it won't have actually drawn anything yet.\n *\n * @event Phaser.Core.Events#PRE_RENDER\n * @since 3.0.0\n * \n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - A reference to the current renderer being used by the Game instance.\n */\nmodule.exports = 'prerender';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Pre-Step Event.\n * \n * This event is dispatched before the main Game Step starts. By this point in the game cycle none of the Scene updates have yet happened.\n * Hook into it from plugins or systems that need to update before the Scene Manager does.\n *\n * @event Phaser.Core.Events#PRE_STEP\n * @since 3.0.0\n * \n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\n */\nmodule.exports = 'prestep';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Ready Event.\n * \n * This event is dispatched when the Phaser Game instance has finished booting, the Texture Manager is fully ready,\n * and all local systems are now able to start.\n *\n * @event Phaser.Core.Events#READY\n * @since 3.0.0\n */\nmodule.exports = 'ready';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Resume Event.\n * \n * This event is dispatched when the game loop leaves a paused state and resumes running.\n *\n * @event Phaser.Core.Events#RESUME\n * @since 3.0.0\n */\nmodule.exports = 'resume';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Step Event.\n * \n * This event is dispatched after the Game Pre-Step and before the Scene Manager steps.\n * Hook into it from plugins or systems that need to update before the Scene Manager does, but after the core Systems have.\n *\n * @event Phaser.Core.Events#STEP\n * @since 3.0.0\n * \n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\n */\nmodule.exports = 'step';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Visible Event.\n * \n * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded\n * enters a visible state, previously having been hidden.\n * \n * Only browsers that support the Visibility API will cause this event to be emitted.\n *\n * @event Phaser.Core.Events#VISIBLE\n * @since 3.0.0\n */\nmodule.exports = 'visible';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Core.Events\n */\n\nmodule.exports = {\n\n BLUR: require('./BLUR_EVENT'),\n BOOT: require('./BOOT_EVENT'),\n CONTEXT_LOST: require('./CONTEXT_LOST_EVENT'),\n CONTEXT_RESTORED: require('./CONTEXT_RESTORED_EVENT'),\n DESTROY: require('./DESTROY_EVENT'),\n FOCUS: require('./FOCUS_EVENT'),\n HIDDEN: require('./HIDDEN_EVENT'),\n PAUSE: require('./PAUSE_EVENT'),\n POST_RENDER: require('./POST_RENDER_EVENT'),\n POST_STEP: require('./POST_STEP_EVENT'),\n PRE_RENDER: require('./PRE_RENDER_EVENT'),\n PRE_STEP: require('./PRE_STEP_EVENT'),\n READY: require('./READY_EVENT'),\n RESUME: require('./RESUME_EVENT'),\n STEP: require('./STEP_EVENT'),\n VISIBLE: require('./VISIBLE_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar Events = require('./events');\n\n/**\n * @callback DataEachCallback\n *\n * @param {*} parent - The parent object of the DataManager.\n * @param {string} key - The key of the value.\n * @param {*} value - The value.\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\n */\n\n/**\n * @classdesc\n * The Data Manager Component features a means to store pieces of data specific to a Game Object, System or Plugin.\n * You can then search, query it, and retrieve the data. The parent must either extend EventEmitter,\n * or have a property called `events` that is an instance of it.\n *\n * @class DataManager\n * @memberof Phaser.Data\n * @constructor\n * @since 3.0.0\n *\n * @param {object} parent - The object that this DataManager belongs to.\n * @param {Phaser.Events.EventEmitter} [eventEmitter] - The DataManager's event emitter.\n */\nvar DataManager = new Class({\n\n initialize:\n\n function DataManager (parent, eventEmitter)\n {\n /**\n * The object that this DataManager belongs to.\n *\n * @name Phaser.Data.DataManager#parent\n * @type {*}\n * @since 3.0.0\n */\n this.parent = parent;\n\n /**\n * The DataManager's event emitter.\n *\n * @name Phaser.Data.DataManager#events\n * @type {Phaser.Events.EventEmitter}\n * @since 3.0.0\n */\n this.events = eventEmitter;\n\n if (!eventEmitter)\n {\n this.events = (parent.events) ? parent.events : parent;\n }\n\n /**\n * The data list.\n *\n * @name Phaser.Data.DataManager#list\n * @type {Object.}\n * @default {}\n * @since 3.0.0\n */\n this.list = {};\n\n /**\n * The public values list. You can use this to access anything you have stored\n * in this Data Manager. For example, if you set a value called `gold` you can\n * access it via:\n *\n * ```javascript\n * this.data.values.gold;\n * ```\n *\n * You can also modify it directly:\n * \n * ```javascript\n * this.data.values.gold += 1000;\n * ```\n *\n * Doing so will emit a `setdata` event from the parent of this Data Manager.\n * \n * Do not modify this object directly. Adding properties directly to this object will not\n * emit any events. Always use `DataManager.set` to create new items the first time around.\n *\n * @name Phaser.Data.DataManager#values\n * @type {Object.}\n * @default {}\n * @since 3.10.0\n */\n this.values = {};\n\n /**\n * Whether setting data is frozen for this DataManager.\n *\n * @name Phaser.Data.DataManager#_frozen\n * @type {boolean}\n * @private\n * @default false\n * @since 3.0.0\n */\n this._frozen = false;\n\n if (!parent.hasOwnProperty('sys') && this.events)\n {\n this.events.once('destroy', this.destroy, this);\n }\n },\n\n /**\n * Retrieves the value for the given key, or undefined if it doesn't exist.\n *\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\n * \n * ```javascript\n * this.data.get('gold');\n * ```\n *\n * Or access the value directly:\n * \n * ```javascript\n * this.data.values.gold;\n * ```\n *\n * You can also pass in an array of keys, in which case an array of values will be returned:\n * \n * ```javascript\n * this.data.get([ 'gold', 'armor', 'health' ]);\n * ```\n *\n * This approach is useful for destructuring arrays in ES6.\n *\n * @method Phaser.Data.DataManager#get\n * @since 3.0.0\n *\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\n *\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\n */\n get: function (key)\n {\n var list = this.list;\n\n if (Array.isArray(key))\n {\n var output = [];\n\n for (var i = 0; i < key.length; i++)\n {\n output.push(list[key[i]]);\n }\n\n return output;\n }\n else\n {\n return list[key];\n }\n },\n\n /**\n * Retrieves all data values in a new object.\n *\n * @method Phaser.Data.DataManager#getAll\n * @since 3.0.0\n *\n * @return {Object.} All data values.\n */\n getAll: function ()\n {\n var results = {};\n\n for (var key in this.list)\n {\n if (this.list.hasOwnProperty(key))\n {\n results[key] = this.list[key];\n }\n }\n\n return results;\n },\n\n /**\n * Queries the DataManager for the values of keys matching the given regular expression.\n *\n * @method Phaser.Data.DataManager#query\n * @since 3.0.0\n *\n * @param {RegExp} search - A regular expression object. If a non-RegExp object obj is passed, it is implicitly converted to a RegExp by using new RegExp(obj).\n *\n * @return {Object.} The values of the keys matching the search string.\n */\n query: function (search)\n {\n var results = {};\n\n for (var key in this.list)\n {\n if (this.list.hasOwnProperty(key) && key.match(search))\n {\n results[key] = this.list[key];\n }\n }\n\n return results;\n },\n\n /**\n * Sets a value for the given key. If the key doesn't already exist in the Data Manager then it is created.\n * \n * ```javascript\n * data.set('name', 'Red Gem Stone');\n * ```\n *\n * You can also pass in an object of key value pairs as the first argument:\n *\n * ```javascript\n * data.set({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\n * ```\n *\n * To get a value back again you can call `get`:\n * \n * ```javascript\n * data.get('gold');\n * ```\n * \n * Or you can access the value directly via the `values` property, where it works like any other variable:\n * \n * ```javascript\n * data.values.gold += 50;\n * ```\n *\n * When the value is first set, a `setdata` event is emitted.\n *\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\n *\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\n *\n * @method Phaser.Data.DataManager#set\n * @fires Phaser.Data.Events#SET_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\n * @since 3.0.0\n *\n * @param {(string|object)} key - The key to set the value for. Or an object or key value pairs. If an object the `data` argument is ignored.\n * @param {*} data - The value to set for the given key. If an object is provided as the key this argument is ignored.\n *\n * @return {this} This DataManager object.\n */\n set: function (key, data)\n {\n if (this._frozen)\n {\n return this;\n }\n\n if (typeof key === 'string')\n {\n return this.setValue(key, data);\n }\n else\n {\n for (var entry in key)\n {\n this.setValue(entry, key[entry]);\n }\n }\n\n return this;\n },\n\n /**\n * Increase a value for the given key. If the key doesn't already exist in the Data Manager then it is increased from 0.\n * \n * When the value is first set, a `setdata` event is emitted.\n * \n * @method Phaser.Data.DataManager#inc\n * @fires Phaser.Data.Events#SET_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\n * @since 3.23.0\n *\n * @param {(string|object)} key - The key to increase the value for.\n * @param {*} [data] - The value to increase for the given key.\n *\n * @return {Phaser.Data.DataManager} This DataManager object.\n */\n inc: function (key, data)\n {\n if (this._frozen)\n {\n return this;\n }\n\n if (data === undefined)\n {\n data = 1;\n }\n\n var value = this.get(key);\n if (value === undefined)\n {\n value = 0;\n }\n\n this.set(key, (value + data));\n\n return this;\n },\n\n /**\n * Toggle a boolean value for the given key. If the key doesn't already exist in the Data Manager then it is toggled from false.\n * \n * When the value is first set, a `setdata` event is emitted.\n * \n * @method Phaser.Data.DataManager#toggle\n * @fires Phaser.Data.Events#SET_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\n * @since 3.23.0\n *\n * @param {(string|object)} key - The key to toggle the value for.\n *\n * @return {Phaser.Data.DataManager} This DataManager object.\n */\n toggle: function (key)\n {\n if (this._frozen)\n {\n return this;\n }\n\n this.set(key, !this.get(key));\n\n return this;\n },\n\n /**\n * Internal value setter, called automatically by the `set` method.\n *\n * @method Phaser.Data.DataManager#setValue\n * @fires Phaser.Data.Events#SET_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\n * @private\n * @since 3.10.0\n *\n * @param {string} key - The key to set the value for.\n * @param {*} data - The value to set.\n *\n * @return {this} This DataManager object.\n */\n setValue: function (key, data)\n {\n if (this._frozen)\n {\n return this;\n }\n\n if (this.has(key))\n {\n // Hit the key getter, which will in turn emit the events.\n this.values[key] = data;\n }\n else\n {\n var _this = this;\n var list = this.list;\n var events = this.events;\n var parent = this.parent;\n\n Object.defineProperty(this.values, key, {\n\n enumerable: true,\n \n configurable: true,\n\n get: function ()\n {\n return list[key];\n },\n\n set: function (value)\n {\n if (!_this._frozen)\n {\n var previousValue = list[key];\n list[key] = value;\n\n events.emit(Events.CHANGE_DATA, parent, key, value, previousValue);\n events.emit(Events.CHANGE_DATA_KEY + key, parent, value, previousValue);\n }\n }\n\n });\n\n list[key] = data;\n\n events.emit(Events.SET_DATA, parent, key, data);\n }\n\n return this;\n },\n\n /**\n * Passes all data entries to the given callback.\n *\n * @method Phaser.Data.DataManager#each\n * @since 3.0.0\n *\n * @param {DataEachCallback} callback - The function to call.\n * @param {*} [context] - Value to use as `this` when executing callback.\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\n *\n * @return {this} This DataManager object.\n */\n each: function (callback, context)\n {\n var args = [ this.parent, null, undefined ];\n\n for (var i = 1; i < arguments.length; i++)\n {\n args.push(arguments[i]);\n }\n\n for (var key in this.list)\n {\n args[1] = key;\n args[2] = this.list[key];\n\n callback.apply(context, args);\n }\n\n return this;\n },\n\n /**\n * Merge the given object of key value pairs into this DataManager.\n *\n * Any newly created values will emit a `setdata` event. Any updated values (see the `overwrite` argument)\n * will emit a `changedata` event.\n *\n * @method Phaser.Data.DataManager#merge\n * @fires Phaser.Data.Events#SET_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\n * @since 3.0.0\n *\n * @param {Object.} data - The data to merge.\n * @param {boolean} [overwrite=true] - Whether to overwrite existing data. Defaults to true.\n *\n * @return {this} This DataManager object.\n */\n merge: function (data, overwrite)\n {\n if (overwrite === undefined) { overwrite = true; }\n\n // Merge data from another component into this one\n for (var key in data)\n {\n if (data.hasOwnProperty(key) && (overwrite || (!overwrite && !this.has(key))))\n {\n this.setValue(key, data[key]);\n }\n }\n\n return this;\n },\n\n /**\n * Remove the value for the given key.\n *\n * If the key is found in this Data Manager it is removed from the internal lists and a\n * `removedata` event is emitted.\n * \n * You can also pass in an array of keys, in which case all keys in the array will be removed:\n * \n * ```javascript\n * this.data.remove([ 'gold', 'armor', 'health' ]);\n * ```\n *\n * @method Phaser.Data.DataManager#remove\n * @fires Phaser.Data.Events#REMOVE_DATA\n * @since 3.0.0\n *\n * @param {(string|string[])} key - The key to remove, or an array of keys to remove.\n *\n * @return {this} This DataManager object.\n */\n remove: function (key)\n {\n if (this._frozen)\n {\n return this;\n }\n\n if (Array.isArray(key))\n {\n for (var i = 0; i < key.length; i++)\n {\n this.removeValue(key[i]);\n }\n }\n else\n {\n return this.removeValue(key);\n }\n\n return this;\n },\n\n /**\n * Internal value remover, called automatically by the `remove` method.\n *\n * @method Phaser.Data.DataManager#removeValue\n * @private\n * @fires Phaser.Data.Events#REMOVE_DATA\n * @since 3.10.0\n *\n * @param {string} key - The key to set the value for.\n *\n * @return {this} This DataManager object.\n */\n removeValue: function (key)\n {\n if (this.has(key))\n {\n var data = this.list[key];\n\n delete this.list[key];\n delete this.values[key];\n\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\n }\n\n return this;\n },\n\n /**\n * Retrieves the data associated with the given 'key', deletes it from this Data Manager, then returns it.\n *\n * @method Phaser.Data.DataManager#pop\n * @fires Phaser.Data.Events#REMOVE_DATA\n * @since 3.0.0\n *\n * @param {string} key - The key of the value to retrieve and delete.\n *\n * @return {*} The value of the given key.\n */\n pop: function (key)\n {\n var data = undefined;\n\n if (!this._frozen && this.has(key))\n {\n data = this.list[key];\n\n delete this.list[key];\n delete this.values[key];\n\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\n }\n\n return data;\n },\n\n /**\n * Determines whether the given key is set in this Data Manager.\n * \n * Please note that the keys are case-sensitive and must be valid JavaScript Object property strings.\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\n *\n * @method Phaser.Data.DataManager#has\n * @since 3.0.0\n *\n * @param {string} key - The key to check.\n *\n * @return {boolean} Returns `true` if the key exists, otherwise `false`.\n */\n has: function (key)\n {\n return this.list.hasOwnProperty(key);\n },\n\n /**\n * Freeze or unfreeze this Data Manager. A frozen Data Manager will block all attempts\n * to create new values or update existing ones.\n *\n * @method Phaser.Data.DataManager#setFreeze\n * @since 3.0.0\n *\n * @param {boolean} value - Whether to freeze or unfreeze the Data Manager.\n *\n * @return {this} This DataManager object.\n */\n setFreeze: function (value)\n {\n this._frozen = value;\n\n return this;\n },\n\n /**\n * Delete all data in this Data Manager and unfreeze it.\n *\n * @method Phaser.Data.DataManager#reset\n * @since 3.0.0\n *\n * @return {this} This DataManager object.\n */\n reset: function ()\n {\n for (var key in this.list)\n {\n delete this.list[key];\n delete this.values[key];\n }\n\n this._frozen = false;\n\n return this;\n },\n\n /**\n * Destroy this data manager.\n *\n * @method Phaser.Data.DataManager#destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.reset();\n\n this.events.off(Events.CHANGE_DATA);\n this.events.off(Events.SET_DATA);\n this.events.off(Events.REMOVE_DATA);\n\n this.parent = null;\n },\n\n /**\n * Gets or sets the frozen state of this Data Manager.\n * A frozen Data Manager will block all attempts to create new values or update existing ones.\n *\n * @name Phaser.Data.DataManager#freeze\n * @type {boolean}\n * @since 3.0.0\n */\n freeze: {\n\n get: function ()\n {\n return this._frozen;\n },\n\n set: function (value)\n {\n this._frozen = (value) ? true : false;\n }\n\n },\n\n /**\n * Return the total number of entries in this Data Manager.\n *\n * @name Phaser.Data.DataManager#count\n * @type {integer}\n * @since 3.0.0\n */\n count: {\n\n get: function ()\n {\n var i = 0;\n\n for (var key in this.list)\n {\n if (this.list[key] !== undefined)\n {\n i++;\n }\n }\n\n return i;\n }\n\n }\n\n});\n\nmodule.exports = DataManager;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Change Data Event.\n * \n * This event is dispatched by a Data Manager when an item in the data store is changed.\n * \n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\n * a change data event from a Game Object you would use: `sprite.data.on('changedata', listener)`.\n * \n * This event is dispatched for all items that change in the Data Manager.\n * To listen for the change of a specific item, use the `CHANGE_DATA_KEY_EVENT` event.\n *\n * @event Phaser.Data.Events#CHANGE_DATA\n * @since 3.0.0\n * \n * @param {any} parent - A reference to the object that the Data Manager responsible for this event belongs to.\n * @param {string} key - The unique key of the data item within the Data Manager.\n * @param {any} value - The new value of the item in the Data Manager.\n * @param {any} previousValue - The previous value of the item in the Data Manager.\n */\nmodule.exports = 'changedata';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Change Data Key Event.\n * \n * This event is dispatched by a Data Manager when an item in the data store is changed.\n * \n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\n * the change of a specific data item from a Game Object you would use: `sprite.data.on('changedata-key', listener)`,\n * where `key` is the unique string key of the data item. For example, if you have a data item stored called `gold`\n * then you can listen for `sprite.data.on('changedata-gold')`.\n *\n * @event Phaser.Data.Events#CHANGE_DATA_KEY\n * @since 3.16.1\n * \n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\n * @param {any} value - The item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\n * @param {any} previousValue - The previous item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\n */\nmodule.exports = 'changedata-';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Remove Data Event.\n * \n * This event is dispatched by a Data Manager when an item is removed from it.\n * \n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\n * the removal of a data item on a Game Object you would use: `sprite.data.on('removedata', listener)`.\n *\n * @event Phaser.Data.Events#REMOVE_DATA\n * @since 3.0.0\n * \n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\n * @param {string} key - The unique key of the data item within the Data Manager.\n * @param {any} data - The item that was removed from the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\n */\nmodule.exports = 'removedata';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Set Data Event.\n * \n * This event is dispatched by a Data Manager when a new item is added to the data store.\n * \n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\n * the addition of a new data item on a Game Object you would use: `sprite.data.on('setdata', listener)`.\n *\n * @event Phaser.Data.Events#SET_DATA\n * @since 3.0.0\n * \n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\n * @param {string} key - The unique key of the data item within the Data Manager.\n * @param {any} data - The item that was added to the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\n */\nmodule.exports = 'setdata';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Data.Events\n */\n\nmodule.exports = {\n\n CHANGE_DATA: require('./CHANGE_DATA_EVENT'),\n CHANGE_DATA_KEY: require('./CHANGE_DATA_KEY_EVENT'),\n REMOVE_DATA: require('./REMOVE_DATA_EVENT'),\n SET_DATA: require('./SET_DATA_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Given a hex color value, such as 0xff00ff (for purple), it will return a\n * numeric representation of it (i.e. 16711935) for use in WebGL tinting.\n *\n * @function Phaser.Display.Color.GetColorFromValue\n * @since 3.50.0\n *\n * @param {number} red - The hex color value, such as 0xff0000.\n *\n * @return {number} The combined color value.\n */\nvar GetColorFromValue = function (value)\n{\n return (value >> 16) + (value & 0xff00) + ((value & 0xff) << 16);\n};\n\nmodule.exports = GetColorFromValue;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar GameEvents = require('../../core/events');\n\n/**\n * @classdesc\n * A Bitmap Mask combines the alpha (opacity) of a masked pixel with the alpha of another pixel.\n * Unlike the Geometry Mask, which is a clipping path, a Bitmap Mask behaves like an alpha mask,\n * not a clipping path. It is only available when using the WebGL Renderer.\n *\n * A Bitmap Mask can use any Game Object to determine the alpha of each pixel of the masked Game Object(s).\n * For any given point of a masked Game Object's texture, the pixel's alpha will be multiplied by the alpha\n * of the pixel at the same position in the Bitmap Mask's Game Object. The color of the pixel from the\n * Bitmap Mask doesn't matter.\n *\n * For example, if a pure blue pixel with an alpha of 0.95 is masked with a pure red pixel with an\n * alpha of 0.5, the resulting pixel will be pure blue with an alpha of 0.475. Naturally, this means\n * that a pixel in the mask with an alpha of 0 will hide the corresponding pixel in all masked Game Objects\n * A pixel with an alpha of 1 in the masked Game Object will receive the same alpha as the\n * corresponding pixel in the mask.\n *\n * The Bitmap Mask's location matches the location of its Game Object, not the location of the\n * masked objects. Moving or transforming the underlying Game Object will change the mask\n * (and affect the visibility of any masked objects), whereas moving or transforming a masked object\n * will not affect the mask.\n *\n * The Bitmap Mask will not render its Game Object by itself. If the Game Object is not in a\n * Scene's display list, it will only be used for the mask and its full texture will not be directly\n * visible. Adding the underlying Game Object to a Scene will not cause any problems - it will\n * render as a normal Game Object and will also serve as a mask.\n *\n * @class BitmapMask\n * @memberof Phaser.Display.Masks\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Scene} scene - The Scene which this Bitmap Mask will be used in.\n * @param {Phaser.GameObjects.GameObject} renderable - A renderable Game Object that uses a texture, such as a Sprite.\n */\nvar BitmapMask = new Class({\n\n initialize:\n\n function BitmapMask (scene, renderable)\n {\n var renderer = scene.sys.game.renderer;\n\n /**\n * A reference to either the Canvas or WebGL Renderer that this Mask is using.\n *\n * @name Phaser.Display.Masks.BitmapMask#renderer\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\n * @since 3.11.0\n */\n this.renderer = renderer;\n\n /**\n * A renderable Game Object that uses a texture, such as a Sprite.\n *\n * @name Phaser.Display.Masks.BitmapMask#bitmapMask\n * @type {Phaser.GameObjects.GameObject}\n * @since 3.0.0\n */\n this.bitmapMask = renderable;\n\n /**\n * The texture used for the mask's framebuffer.\n *\n * @name Phaser.Display.Masks.BitmapMask#maskTexture\n * @type {WebGLTexture}\n * @default null\n * @since 3.0.0\n */\n this.maskTexture = null;\n\n /**\n * The texture used for the main framebuffer.\n *\n * @name Phaser.Display.Masks.BitmapMask#mainTexture\n * @type {WebGLTexture}\n * @default null\n * @since 3.0.0\n */\n this.mainTexture = null;\n\n /**\n * Whether the Bitmap Mask is dirty and needs to be updated.\n *\n * @name Phaser.Display.Masks.BitmapMask#dirty\n * @type {boolean}\n * @default true\n * @since 3.0.0\n */\n this.dirty = true;\n\n /**\n * The framebuffer to which a masked Game Object is rendered.\n *\n * @name Phaser.Display.Masks.BitmapMask#mainFramebuffer\n * @type {WebGLFramebuffer}\n * @since 3.0.0\n */\n this.mainFramebuffer = null;\n\n /**\n * The framebuffer to which the Bitmap Mask's masking Game Object is rendered.\n *\n * @name Phaser.Display.Masks.BitmapMask#maskFramebuffer\n * @type {WebGLFramebuffer}\n * @since 3.0.0\n */\n this.maskFramebuffer = null;\n\n /**\n * The previous framebuffer set in the renderer before this one was enabled.\n *\n * @name Phaser.Display.Masks.BitmapMask#prevFramebuffer\n * @type {WebGLFramebuffer}\n * @since 3.17.0\n */\n this.prevFramebuffer = null;\n\n /**\n * Whether to invert the masks alpha.\n *\n * If `true`, the alpha of the masking pixel will be inverted before it's multiplied with the masked pixel. Essentially, this means that a masked area will be visible only if the corresponding area in the mask is invisible.\n *\n * @name Phaser.Display.Masks.BitmapMask#invertAlpha\n * @type {boolean}\n * @since 3.1.2\n */\n this.invertAlpha = false;\n\n /**\n * Is this mask a stencil mask?\n *\n * @name Phaser.Display.Masks.BitmapMask#isStencil\n * @type {boolean}\n * @readonly\n * @since 3.17.0\n */\n this.isStencil = false;\n\n if (renderer && renderer.gl)\n {\n var width = renderer.width;\n var height = renderer.height;\n var pot = ((width & (width - 1)) === 0 && (height & (height - 1)) === 0);\n var gl = renderer.gl;\n var wrap = pot ? gl.REPEAT : gl.CLAMP_TO_EDGE;\n var filter = gl.LINEAR;\n\n this.mainTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\n this.maskTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\n this.mainFramebuffer = renderer.createFramebuffer(width, height, this.mainTexture, true);\n this.maskFramebuffer = renderer.createFramebuffer(width, height, this.maskTexture, true);\n\n scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, function (renderer)\n {\n var width = renderer.width;\n var height = renderer.height;\n var pot = ((width & (width - 1)) === 0 && (height & (height - 1)) === 0);\n var gl = renderer.gl;\n var wrap = pot ? gl.REPEAT : gl.CLAMP_TO_EDGE;\n var filter = gl.LINEAR;\n\n this.mainTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\n this.maskTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\n this.mainFramebuffer = renderer.createFramebuffer(width, height, this.mainTexture, true);\n this.maskFramebuffer = renderer.createFramebuffer(width, height, this.maskTexture, true);\n\n }, this);\n }\n },\n\n /**\n * Sets a new masking Game Object for the Bitmap Mask.\n *\n * @method Phaser.Display.Masks.BitmapMask#setBitmap\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} renderable - A renderable Game Object that uses a texture, such as a Sprite.\n */\n setBitmap: function (renderable)\n {\n this.bitmapMask = renderable;\n },\n\n /**\n * Prepares the WebGL Renderer to render a Game Object with this mask applied.\n *\n * This renders the masking Game Object to the mask framebuffer and switches to the main framebuffer so that the masked Game Object will be rendered to it instead of being rendered directly to the frame.\n *\n * @method Phaser.Display.Masks.BitmapMask#preRenderWebGL\n * @since 3.0.0\n *\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to prepare.\n * @param {Phaser.GameObjects.GameObject} maskedObject - The masked Game Object which will be drawn.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\n */\n preRenderWebGL: function (renderer, maskedObject, camera)\n {\n renderer.pipelines.BitmapMaskPipeline.beginMask(this, maskedObject, camera);\n },\n\n /**\n * Finalizes rendering of a masked Game Object.\n *\n * This resets the previously bound framebuffer and switches the WebGL Renderer to the Bitmap Mask Pipeline, which uses a special fragment shader to apply the masking effect.\n *\n * @method Phaser.Display.Masks.BitmapMask#postRenderWebGL\n * @since 3.0.0\n *\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to clean up.\n */\n postRenderWebGL: function (renderer, camera)\n {\n renderer.pipelines.BitmapMaskPipeline.endMask(this, camera);\n },\n\n /**\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\n *\n * @method Phaser.Display.Masks.BitmapMask#preRenderCanvas\n * @since 3.0.0\n *\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\n * @param {Phaser.GameObjects.GameObject} mask - The masked Game Object which would be rendered.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\n */\n preRenderCanvas: function ()\n {\n // NOOP\n },\n\n /**\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\n *\n * @method Phaser.Display.Masks.BitmapMask#postRenderCanvas\n * @since 3.0.0\n *\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\n */\n postRenderCanvas: function ()\n {\n // NOOP\n },\n\n /**\n * Destroys this BitmapMask and nulls any references it holds.\n * \n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\n *\n * @method Phaser.Display.Masks.BitmapMask#destroy\n * @since 3.7.0\n */\n destroy: function ()\n {\n this.bitmapMask = null;\n\n var renderer = this.renderer;\n\n if (renderer && renderer.gl)\n {\n renderer.deleteTexture(this.mainTexture);\n renderer.deleteTexture(this.maskTexture);\n renderer.deleteFramebuffer(this.mainFramebuffer);\n renderer.deleteFramebuffer(this.maskFramebuffer);\n }\n\n this.mainTexture = null;\n this.maskTexture = null;\n this.mainFramebuffer = null;\n this.maskFramebuffer = null;\n this.prevFramebuffer = null;\n this.renderer = null;\n }\n\n});\n\nmodule.exports = BitmapMask;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\n\n/**\n * @classdesc\n * A Geometry Mask can be applied to a Game Object to hide any pixels of it which don't intersect\n * a visible pixel from the geometry mask. The mask is essentially a clipping path which can only\n * make a masked pixel fully visible or fully invisible without changing its alpha (opacity).\n *\n * A Geometry Mask uses a Graphics Game Object to determine which pixels of the masked Game Object(s)\n * should be clipped. For any given point of a masked Game Object's texture, the pixel will only be displayed\n * if the Graphics Game Object of the Geometry Mask has a visible pixel at the same position. The color and\n * alpha of the pixel from the Geometry Mask do not matter.\n *\n * The Geometry Mask's location matches the location of its Graphics object, not the location of the masked objects.\n * Moving or transforming the underlying Graphics object will change the mask (and affect the visibility\n * of any masked objects), whereas moving or transforming a masked object will not affect the mask.\n * You can think of the Geometry Mask (or rather, of its Graphics object) as an invisible curtain placed\n * in front of all masked objects which has its own visual properties and, naturally, respects the camera's\n * visual properties, but isn't affected by and doesn't follow the masked objects by itself.\n *\n * @class GeometryMask\n * @memberof Phaser.Display.Masks\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Scene} scene - This parameter is not used.\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics Game Object to use for the Geometry Mask. Doesn't have to be in the Display List.\n */\nvar GeometryMask = new Class({\n\n initialize:\n\n function GeometryMask (scene, graphicsGeometry)\n {\n /**\n * The Graphics object which describes the Geometry Mask.\n *\n * @name Phaser.Display.Masks.GeometryMask#geometryMask\n * @type {Phaser.GameObjects.Graphics}\n * @since 3.0.0\n */\n this.geometryMask = graphicsGeometry;\n\n /**\n * Similar to the BitmapMasks invertAlpha setting this to true will then hide all pixels\n * drawn to the Geometry Mask.\n *\n * @name Phaser.Display.Masks.GeometryMask#invertAlpha\n * @type {boolean}\n * @since 3.16.0\n */\n this.invertAlpha = false;\n\n /**\n * Is this mask a stencil mask?\n *\n * @name Phaser.Display.Masks.GeometryMask#isStencil\n * @type {boolean}\n * @readonly\n * @since 3.17.0\n */\n this.isStencil = true;\n\n /**\n * The current stencil level.\n *\n * @name Phaser.Display.Masks.GeometryMask#level\n * @type {boolean}\n * @private\n * @since 3.17.0\n */\n this.level = 0;\n },\n\n /**\n * Sets a new Graphics object for the Geometry Mask.\n *\n * @method Phaser.Display.Masks.GeometryMask#setShape\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics object which will be used for the Geometry Mask.\n * \n * @return {this} This Geometry Mask\n */\n setShape: function (graphicsGeometry)\n {\n this.geometryMask = graphicsGeometry;\n\n return this;\n },\n\n /**\n * Sets the `invertAlpha` property of this Geometry Mask.\n * Inverting the alpha essentially flips the way the mask works.\n *\n * @method Phaser.Display.Masks.GeometryMask#setInvertAlpha\n * @since 3.17.0\n *\n * @param {boolean} [value=true] - Invert the alpha of this mask?\n * \n * @return {this} This Geometry Mask\n */\n setInvertAlpha: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.invertAlpha = value;\n\n return this;\n },\n\n /**\n * Renders the Geometry Mask's underlying Graphics object to the OpenGL stencil buffer and enables the stencil test, which clips rendered pixels according to the mask.\n *\n * @method Phaser.Display.Masks.GeometryMask#preRenderWebGL\n * @since 3.0.0\n *\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\n * @param {Phaser.GameObjects.GameObject} child - The Game Object being rendered.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\n */\n preRenderWebGL: function (renderer, child, camera)\n {\n var gl = renderer.gl;\n\n // Force flushing before drawing to stencil buffer\n renderer.flush();\n\n if (renderer.maskStack.length === 0)\n {\n gl.enable(gl.STENCIL_TEST);\n gl.clear(gl.STENCIL_BUFFER_BIT);\n\n renderer.maskCount = 0;\n }\n\n if (renderer.currentCameraMask.mask !== this)\n {\n renderer.currentMask.mask = this;\n }\n\n renderer.maskStack.push({ mask: this, camera: camera });\n\n this.applyStencil(renderer, camera, true);\n\n renderer.maskCount++;\n },\n\n /**\n * Applies the current stencil mask to the renderer.\n *\n * @method Phaser.Display.Masks.GeometryMask#applyStencil\n * @since 3.17.0\n *\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\n * @param {boolean} inc - Is this an INCR stencil or a DECR stencil?\n */\n applyStencil: function (renderer, camera, inc)\n {\n var gl = renderer.gl;\n var geometryMask = this.geometryMask;\n var level = renderer.maskCount;\n\n gl.colorMask(false, false, false, false);\n\n if (inc)\n {\n gl.stencilFunc(gl.EQUAL, level, 0xFF);\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.INCR);\n }\n else\n {\n gl.stencilFunc(gl.EQUAL, level + 1, 0xFF);\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.DECR);\n }\n\n // Write stencil buffer\n geometryMask.renderWebGL(renderer, geometryMask, 0, camera);\n\n renderer.flush();\n\n gl.colorMask(true, true, true, true);\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP);\n\n if (inc)\n {\n if (this.invertAlpha)\n {\n gl.stencilFunc(gl.NOTEQUAL, level + 1, 0xFF);\n }\n else\n {\n gl.stencilFunc(gl.EQUAL, level + 1, 0xFF);\n }\n }\n else if (this.invertAlpha)\n {\n gl.stencilFunc(gl.NOTEQUAL, level, 0xFF);\n }\n else\n {\n gl.stencilFunc(gl.EQUAL, level, 0xFF);\n }\n },\n\n /**\n * Flushes all rendered pixels and disables the stencil test of a WebGL context, thus disabling the mask for it.\n *\n * @method Phaser.Display.Masks.GeometryMask#postRenderWebGL\n * @since 3.0.0\n *\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw flush.\n */\n postRenderWebGL: function (renderer)\n {\n var gl = renderer.gl;\n\n renderer.maskStack.pop();\n\n renderer.maskCount--;\n\n if (renderer.maskStack.length === 0)\n {\n // If this is the only mask in the stack, flush and disable\n renderer.flush();\n\n renderer.currentMask.mask = null;\n\n gl.disable(gl.STENCIL_TEST);\n }\n else\n {\n // Force flush before disabling stencil test\n renderer.flush();\n\n var prev = renderer.maskStack[renderer.maskStack.length - 1];\n\n prev.mask.applyStencil(renderer, prev.camera, false);\n\n if (renderer.currentCameraMask.mask !== prev.mask)\n {\n renderer.currentMask.mask = prev.mask;\n renderer.currentMask.camera = prev.camera;\n }\n else\n {\n renderer.currentMask.mask = null;\n }\n }\n },\n\n /**\n * Sets the clipping path of a 2D canvas context to the Geometry Mask's underlying Graphics object.\n *\n * @method Phaser.Display.Masks.GeometryMask#preRenderCanvas\n * @since 3.0.0\n *\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance to set the clipping path on.\n * @param {Phaser.GameObjects.GameObject} mask - The Game Object being rendered.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\n */\n preRenderCanvas: function (renderer, mask, camera)\n {\n var geometryMask = this.geometryMask;\n\n renderer.currentContext.save();\n\n geometryMask.renderCanvas(renderer, geometryMask, 0, camera, null, null, true);\n\n renderer.currentContext.clip();\n },\n\n /**\n * Restore the canvas context's previous clipping path, thus turning off the mask for it.\n *\n * @method Phaser.Display.Masks.GeometryMask#postRenderCanvas\n * @since 3.0.0\n *\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance being restored.\n */\n postRenderCanvas: function (renderer)\n {\n renderer.currentContext.restore();\n },\n\n /**\n * Destroys this GeometryMask and nulls any references it holds.\n *\n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\n *\n * @method Phaser.Display.Masks.GeometryMask#destroy\n * @since 3.7.0\n */\n destroy: function ()\n {\n this.geometryMask = null;\n }\n\n});\n\nmodule.exports = GeometryMask;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar BlendModes = require('../renderer/BlendModes');\nvar GetAdvancedValue = require('../utils/object/GetAdvancedValue');\n\n/**\n * Builds a Game Object using the provided configuration object.\n *\n * @function Phaser.GameObjects.BuildGameObject\n * @since 3.0.0\n *\n * @param {Phaser.Scene} scene - A reference to the Scene.\n * @param {Phaser.GameObjects.GameObject} gameObject - The initial GameObject.\n * @param {Phaser.Types.GameObjects.GameObjectConfig} config - The config to build the GameObject with.\n *\n * @return {Phaser.GameObjects.GameObject} The built Game Object.\n */\nvar BuildGameObject = function (scene, gameObject, config)\n{\n // Position\n\n gameObject.x = GetAdvancedValue(config, 'x', 0);\n gameObject.y = GetAdvancedValue(config, 'y', 0);\n gameObject.depth = GetAdvancedValue(config, 'depth', 0);\n\n // Flip\n\n gameObject.flipX = GetAdvancedValue(config, 'flipX', false);\n gameObject.flipY = GetAdvancedValue(config, 'flipY', false);\n\n // Scale\n // Either: { scale: 2 } or { scale: { x: 2, y: 2 }}\n\n var scale = GetAdvancedValue(config, 'scale', null);\n\n if (typeof scale === 'number')\n {\n gameObject.setScale(scale);\n }\n else if (scale !== null)\n {\n gameObject.scaleX = GetAdvancedValue(scale, 'x', 1);\n gameObject.scaleY = GetAdvancedValue(scale, 'y', 1);\n }\n\n // ScrollFactor\n // Either: { scrollFactor: 2 } or { scrollFactor: { x: 2, y: 2 }}\n\n var scrollFactor = GetAdvancedValue(config, 'scrollFactor', null);\n\n if (typeof scrollFactor === 'number')\n {\n gameObject.setScrollFactor(scrollFactor);\n }\n else if (scrollFactor !== null)\n {\n gameObject.scrollFactorX = GetAdvancedValue(scrollFactor, 'x', 1);\n gameObject.scrollFactorY = GetAdvancedValue(scrollFactor, 'y', 1);\n }\n\n // Rotation\n\n gameObject.rotation = GetAdvancedValue(config, 'rotation', 0);\n\n var angle = GetAdvancedValue(config, 'angle', null);\n\n if (angle !== null)\n {\n gameObject.angle = angle;\n }\n\n // Alpha\n\n gameObject.alpha = GetAdvancedValue(config, 'alpha', 1);\n\n // Origin\n // Either: { origin: 0.5 } or { origin: { x: 0.5, y: 0.5 }}\n\n var origin = GetAdvancedValue(config, 'origin', null);\n\n if (typeof origin === 'number')\n {\n gameObject.setOrigin(origin);\n }\n else if (origin !== null)\n {\n var ox = GetAdvancedValue(origin, 'x', 0.5);\n var oy = GetAdvancedValue(origin, 'y', 0.5);\n\n gameObject.setOrigin(ox, oy);\n }\n\n // BlendMode\n\n gameObject.blendMode = GetAdvancedValue(config, 'blendMode', BlendModes.NORMAL);\n\n // Visible\n\n gameObject.visible = GetAdvancedValue(config, 'visible', true);\n\n // Add to Scene\n\n var add = GetAdvancedValue(config, 'add', true);\n\n if (add)\n {\n scene.sys.displayList.add(gameObject);\n }\n\n if (gameObject.preUpdate)\n {\n scene.sys.updateList.add(gameObject);\n }\n\n return gameObject;\n};\n\nmodule.exports = BuildGameObject;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar ComponentsToJSON = require('./components/ToJSON');\nvar DataManager = require('../data/DataManager');\nvar EventEmitter = require('eventemitter3');\nvar Events = require('./events');\n\n/**\n * @classdesc\n * The base class that all Game Objects extend.\n * You don't create GameObjects directly and they cannot be added to the display list.\n * Instead, use them as the base for your own custom classes.\n *\n * @class GameObject\n * @memberof Phaser.GameObjects\n * @extends Phaser.Events.EventEmitter\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs.\n * @param {string} type - A textual representation of the type of Game Object, i.e. `sprite`.\n */\nvar GameObject = new Class({\n\n Extends: EventEmitter,\n\n initialize:\n\n function GameObject (scene, type)\n {\n EventEmitter.call(this);\n\n /**\n * The Scene to which this Game Object belongs.\n * Game Objects can only belong to one Scene.\n *\n * @name Phaser.GameObjects.GameObject#scene\n * @type {Phaser.Scene}\n * @protected\n * @since 3.0.0\n */\n this.scene = scene;\n\n /**\n * A textual representation of this Game Object, i.e. `sprite`.\n * Used internally by Phaser but is available for your own custom classes to populate.\n *\n * @name Phaser.GameObjects.GameObject#type\n * @type {string}\n * @since 3.0.0\n */\n this.type = type;\n\n /**\n * The current state of this Game Object.\n *\n * Phaser itself will never modify this value, although plugins may do so.\n *\n * Use this property to track the state of a Game Object during its lifetime. For example, it could change from\n * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant\n * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons.\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\n *\n * @name Phaser.GameObjects.GameObject#state\n * @type {(integer|string)}\n * @since 3.16.0\n */\n this.state = 0;\n\n /**\n * The parent Container of this Game Object, if it has one.\n *\n * @name Phaser.GameObjects.GameObject#parentContainer\n * @type {Phaser.GameObjects.Container}\n * @since 3.4.0\n */\n this.parentContainer = null;\n\n /**\n * The name of this Game Object.\n * Empty by default and never populated by Phaser, this is left for developers to use.\n *\n * @name Phaser.GameObjects.GameObject#name\n * @type {string}\n * @default ''\n * @since 3.0.0\n */\n this.name = '';\n\n /**\n * The active state of this Game Object.\n * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it.\n * An active object is one which is having its logic and internal systems updated.\n *\n * @name Phaser.GameObjects.GameObject#active\n * @type {boolean}\n * @default true\n * @since 3.0.0\n */\n this.active = true;\n\n /**\n * The Tab Index of the Game Object.\n * Reserved for future use by plugins and the Input Manager.\n *\n * @name Phaser.GameObjects.GameObject#tabIndex\n * @type {integer}\n * @default -1\n * @since 3.0.0\n */\n this.tabIndex = -1;\n\n /**\n * A Data Manager.\n * It allows you to store, query and get key/value paired information specific to this Game Object.\n * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`.\n *\n * @name Phaser.GameObjects.GameObject#data\n * @type {Phaser.Data.DataManager}\n * @default null\n * @since 3.0.0\n */\n this.data = null;\n\n /**\n * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not.\n * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively.\n * If those components are not used by your custom class then you can use this bitmask as you wish.\n *\n * @name Phaser.GameObjects.GameObject#renderFlags\n * @type {integer}\n * @default 15\n * @since 3.0.0\n */\n this.renderFlags = 15;\n\n /**\n * A bitmask that controls if this Game Object is drawn by a Camera or not.\n * Not usually set directly, instead call `Camera.ignore`, however you can\n * set this property directly using the Camera.id property:\n *\n * @example\n * this.cameraFilter |= camera.id\n *\n * @name Phaser.GameObjects.GameObject#cameraFilter\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.cameraFilter = 0;\n\n /**\n * If this Game Object is enabled for input then this property will contain an InteractiveObject instance.\n * Not usually set directly. Instead call `GameObject.setInteractive()`.\n *\n * @name Phaser.GameObjects.GameObject#input\n * @type {?Phaser.Types.Input.InteractiveObject}\n * @default null\n * @since 3.0.0\n */\n this.input = null;\n\n /**\n * If this Game Object is enabled for Arcade or Matter Physics then this property will contain a reference to a Physics Body.\n *\n * @name Phaser.GameObjects.GameObject#body\n * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|MatterJS.BodyType)}\n * @default null\n * @since 3.0.0\n */\n this.body = null;\n\n /**\n * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`.\n * This includes calls that may come from a Group, Container or the Scene itself.\n * While it allows you to persist a Game Object across Scenes, please understand you are entirely\n * responsible for managing references to and from this Game Object.\n *\n * @name Phaser.GameObjects.GameObject#ignoreDestroy\n * @type {boolean}\n * @default false\n * @since 3.5.0\n */\n this.ignoreDestroy = false;\n\n // Tell the Scene to re-sort the children\n scene.sys.queueDepthSort();\n },\n\n /**\n * Sets the `active` property of this Game Object and returns this Game Object for further chaining.\n * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList.\n *\n * @method Phaser.GameObjects.GameObject#setActive\n * @since 3.0.0\n *\n * @param {boolean} value - True if this Game Object should be set as active, false if not.\n *\n * @return {this} This GameObject.\n */\n setActive: function (value)\n {\n this.active = value;\n\n return this;\n },\n\n /**\n * Sets the `name` property of this Game Object and returns this Game Object for further chaining.\n * The `name` property is not populated by Phaser and is presented for your own use.\n *\n * @method Phaser.GameObjects.GameObject#setName\n * @since 3.0.0\n *\n * @param {string} value - The name to be given to this Game Object.\n *\n * @return {this} This GameObject.\n */\n setName: function (value)\n {\n this.name = value;\n\n return this;\n },\n\n /**\n * Sets the current state of this Game Object.\n *\n * Phaser itself will never modify the State of a Game Object, although plugins may do so.\n *\n * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'.\n * The state value should typically be an integer (ideally mapped to a constant\n * in your game code), but could also be a string. It is recommended to keep it light and simple.\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\n *\n * @method Phaser.GameObjects.GameObject#setState\n * @since 3.16.0\n *\n * @param {(integer|string)} value - The state of the Game Object.\n *\n * @return {this} This GameObject.\n */\n setState: function (value)\n {\n this.state = value;\n\n return this;\n },\n\n /**\n * Adds a Data Manager component to this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#setDataEnabled\n * @since 3.0.0\n * @see Phaser.Data.DataManager\n *\n * @return {this} This GameObject.\n */\n setDataEnabled: function ()\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n return this;\n },\n\n /**\n * Allows you to store a key value pair within this Game Objects Data Manager.\n *\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\n * before setting the value.\n *\n * If the key doesn't already exist in the Data Manager then it is created.\n *\n * ```javascript\n * sprite.setData('name', 'Red Gem Stone');\n * ```\n *\n * You can also pass in an object of key value pairs as the first argument:\n *\n * ```javascript\n * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\n * ```\n *\n * To get a value back again you can call `getData`:\n *\n * ```javascript\n * sprite.getData('gold');\n * ```\n *\n * Or you can access the value directly via the `values` property, where it works like any other variable:\n *\n * ```javascript\n * sprite.data.values.gold += 50;\n * ```\n *\n * When the value is first set, a `setdata` event is emitted from this Game Object.\n *\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\n *\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\n *\n * @method Phaser.GameObjects.GameObject#setData\n * @since 3.0.0\n *\n * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored.\n * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored.\n *\n * @return {this} This GameObject.\n */\n setData: function (key, value)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n this.data.set(key, value);\n\n return this;\n },\n\n /**\n * Increase a value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is increased from 0.\n *\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\n * before setting the value.\n *\n * If the key doesn't already exist in the Data Manager then it is created.\n *\n * When the value is first set, a `setdata` event is emitted from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#incData\n * @since 3.23.0\n *\n * @param {(string|object)} key - The key to increase the value for.\n * @param {*} [data] - The value to increase for the given key.\n *\n * @return {this} This GameObject.\n */\n incData: function (key, value)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n this.data.inc(key, value);\n\n return this;\n },\n\n /**\n * Toggle a boolean value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is toggled from false.\n *\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\n * before setting the value.\n *\n * If the key doesn't already exist in the Data Manager then it is created.\n *\n * When the value is first set, a `setdata` event is emitted from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#toggleData\n * @since 3.23.0\n *\n * @param {(string|object)} key - The key to toggle the value for.\n *\n * @return {this} This GameObject.\n */\n toggleData: function (key)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n this.data.toggle(key);\n\n return this;\n },\n\n /**\n * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist.\n *\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\n *\n * ```javascript\n * sprite.getData('gold');\n * ```\n *\n * Or access the value directly:\n *\n * ```javascript\n * sprite.data.values.gold;\n * ```\n *\n * You can also pass in an array of keys, in which case an array of values will be returned:\n *\n * ```javascript\n * sprite.getData([ 'gold', 'armor', 'health' ]);\n * ```\n *\n * This approach is useful for destructuring arrays in ES6.\n *\n * @method Phaser.GameObjects.GameObject#getData\n * @since 3.0.0\n *\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\n *\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\n */\n getData: function (key)\n {\n if (!this.data)\n {\n this.data = new DataManager(this);\n }\n\n return this.data.get(key);\n },\n\n /**\n * Pass this Game Object to the Input Manager to enable it for Input.\n *\n * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area\n * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced\n * input detection.\n *\n * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If\n * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific\n * shape for it to use.\n *\n * You can also provide an Input Configuration Object as the only argument to this method.\n *\n * @example\n * sprite.setInteractive();\n *\n * @example\n * sprite.setInteractive(new Phaser.Geom.Circle(45, 46, 45), Phaser.Geom.Circle.Contains);\n *\n * @example\n * graphics.setInteractive(new Phaser.Geom.Rectangle(0, 0, 128, 128), Phaser.Geom.Rectangle.Contains);\n *\n * @method Phaser.GameObjects.GameObject#setInteractive\n * @since 3.0.0\n *\n * @param {(Phaser.Types.Input.InputConfiguration|any)} [hitArea] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not given it will try to create a Rectangle based on the texture frame.\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The callback that determines if the pointer is within the Hit Area shape or not. If you provide a shape you must also provide a callback.\n * @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target?\n *\n * @return {this} This GameObject.\n */\n setInteractive: function (hitArea, hitAreaCallback, dropZone)\n {\n this.scene.sys.input.enable(this, hitArea, hitAreaCallback, dropZone);\n\n return this;\n },\n\n /**\n * If this Game Object has previously been enabled for input, this will disable it.\n *\n * An object that is disabled for input stops processing or being considered for\n * input events, but can be turned back on again at any time by simply calling\n * `setInteractive()` with no arguments provided.\n *\n * If want to completely remove interaction from this Game Object then use `removeInteractive` instead.\n *\n * @method Phaser.GameObjects.GameObject#disableInteractive\n * @since 3.7.0\n *\n * @return {this} This GameObject.\n */\n disableInteractive: function ()\n {\n if (this.input)\n {\n this.input.enabled = false;\n }\n\n return this;\n },\n\n /**\n * If this Game Object has previously been enabled for input, this will queue it\n * for removal, causing it to no longer be interactive. The removal happens on\n * the next game step, it is not immediate.\n *\n * The Interactive Object that was assigned to this Game Object will be destroyed,\n * removed from the Input Manager and cleared from this Game Object.\n *\n * If you wish to re-enable this Game Object at a later date you will need to\n * re-create its InteractiveObject by calling `setInteractive` again.\n *\n * If you wish to only temporarily stop an object from receiving input then use\n * `disableInteractive` instead, as that toggles the interactive state, where-as\n * this erases it completely.\n *\n * If you wish to resize a hit area, don't remove and then set it as being\n * interactive. Instead, access the hitarea object directly and resize the shape\n * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the\n * shape is a Rectangle, which it is by default.)\n *\n * @method Phaser.GameObjects.GameObject#removeInteractive\n * @since 3.7.0\n *\n * @return {this} This GameObject.\n */\n removeInteractive: function ()\n {\n this.scene.sys.input.clear(this);\n\n this.input = undefined;\n\n return this;\n },\n\n /**\n * This callback is invoked when this Game Object is added to a Scene.\n *\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\n * will use this, such as Sprites, to add themselves into the Update List.\n *\n * You can also listen for the `ADDED_TO_SCENE` event from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#addedToScene\n * @since 3.50.0\n */\n addedToScene: function ()\n {\n },\n\n /**\n * This callback is invoked when this Game Object is removed from a Scene.\n *\n * Can be overriden by custom Game Objects, but be aware of some Game Objects that\n * will use this, such as Sprites, to removed themselves from the Update List.\n *\n * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object.\n *\n * @method Phaser.GameObjects.GameObject#removedFromScene\n * @since 3.50.0\n */\n removedFromScene: function ()\n {\n },\n\n /**\n * To be overridden by custom GameObjects. Allows base objects to be used in a Pool.\n *\n * @method Phaser.GameObjects.GameObject#update\n * @since 3.0.0\n *\n * @param {...*} [args] - args\n */\n update: function ()\n {\n },\n\n /**\n * Returns a JSON representation of the Game Object.\n *\n * @method Phaser.GameObjects.GameObject#toJSON\n * @since 3.0.0\n *\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\n */\n toJSON: function ()\n {\n return ComponentsToJSON(this);\n },\n\n /**\n * Compares the renderMask with the renderFlags to see if this Game Object will render or not.\n * Also checks the Game Object against the given Cameras exclusion list.\n *\n * @method Phaser.GameObjects.GameObject#willRender\n * @since 3.0.0\n *\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to check against this Game Object.\n *\n * @return {boolean} True if the Game Object should be rendered, otherwise false.\n */\n willRender: function (camera)\n {\n return !(GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id)));\n },\n\n /**\n * Returns an array containing the display list index of either this Game Object, or if it has one,\n * its parent Container. It then iterates up through all of the parent containers until it hits the\n * root of the display list (which is index 0 in the returned array).\n *\n * Used internally by the InputPlugin but also useful if you wish to find out the display depth of\n * this Game Object and all of its ancestors.\n *\n * @method Phaser.GameObjects.GameObject#getIndexList\n * @since 3.4.0\n *\n * @return {integer[]} An array of display list position indexes.\n */\n getIndexList: function ()\n {\n // eslint-disable-next-line consistent-this\n var child = this;\n var parent = this.parentContainer;\n\n var indexes = [];\n\n while (parent)\n {\n // indexes.unshift([parent.getIndex(child), parent.name]);\n indexes.unshift(parent.getIndex(child));\n\n child = parent;\n\n if (!parent.parentContainer)\n {\n break;\n }\n else\n {\n parent = parent.parentContainer;\n }\n }\n\n // indexes.unshift([this.scene.sys.displayList.getIndex(child), 'root']);\n indexes.unshift(this.scene.sys.displayList.getIndex(child));\n\n return indexes;\n },\n\n /**\n * Destroys this Game Object removing it from the Display List and Update List and\n * severing all ties to parent resources.\n *\n * Also removes itself from the Input Manager and Physics Manager if previously enabled.\n *\n * Use this to remove a Game Object from your game if you don't ever plan to use it again.\n * As long as no reference to it exists within your own code it should become free for\n * garbage collection by the browser.\n *\n * If you just want to temporarily disable an object then look at using the\n * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected.\n *\n * @method Phaser.GameObjects.GameObject#destroy\n * @fires Phaser.GameObjects.Events#DESTROY\n * @since 3.0.0\n *\n * @param {boolean} [fromScene=false] - Is this Game Object being destroyed as the result of a Scene shutdown?\n */\n destroy: function (fromScene)\n {\n if (fromScene === undefined) { fromScene = false; }\n\n // This Game Object has already been destroyed\n if (!this.scene || this.ignoreDestroy)\n {\n return;\n }\n\n if (this.preDestroy)\n {\n this.preDestroy.call(this);\n }\n\n this.emit(Events.DESTROY, this);\n\n var sys = this.scene.sys;\n\n if (!fromScene)\n {\n sys.displayList.remove(this);\n }\n\n if (this.input)\n {\n sys.input.clear(this);\n this.input = undefined;\n }\n\n if (this.data)\n {\n this.data.destroy();\n\n this.data = undefined;\n }\n\n if (this.body)\n {\n this.body.destroy();\n this.body = undefined;\n }\n\n // Tell the Scene to re-sort the children\n if (!fromScene)\n {\n sys.queueDepthSort();\n }\n\n this.active = false;\n this.visible = false;\n\n this.scene = undefined;\n\n this.parentContainer = undefined;\n\n this.removeAllListeners();\n }\n\n});\n\n/**\n * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not.\n *\n * @constant {integer} RENDER_MASK\n * @memberof Phaser.GameObjects.GameObject\n * @default\n */\nGameObject.RENDER_MASK = 15;\n\nmodule.exports = GameObject;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Clamp = require('../../math/Clamp');\n\n// bitmask flag for GameObject.renderMask\nvar _FLAG = 2; // 0010\n\n/**\n * Provides methods used for setting the alpha properties of a Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.Alpha\n * @since 3.0.0\n */\n\nvar Alpha = {\n\n /**\n * Private internal value. Holds the global alpha value.\n *\n * @name Phaser.GameObjects.Components.Alpha#_alpha\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _alpha: 1,\n\n /**\n * Private internal value. Holds the top-left alpha value.\n *\n * @name Phaser.GameObjects.Components.Alpha#_alphaTL\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _alphaTL: 1,\n\n /**\n * Private internal value. Holds the top-right alpha value.\n *\n * @name Phaser.GameObjects.Components.Alpha#_alphaTR\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _alphaTR: 1,\n\n /**\n * Private internal value. Holds the bottom-left alpha value.\n *\n * @name Phaser.GameObjects.Components.Alpha#_alphaBL\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _alphaBL: 1,\n\n /**\n * Private internal value. Holds the bottom-right alpha value.\n *\n * @name Phaser.GameObjects.Components.Alpha#_alphaBR\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _alphaBR: 1,\n\n /**\n * Clears all alpha values associated with this Game Object.\n *\n * Immediately sets the alpha levels back to 1 (fully opaque).\n *\n * @method Phaser.GameObjects.Components.Alpha#clearAlpha\n * @since 3.0.0\n *\n * @return {this} This Game Object instance.\n */\n clearAlpha: function ()\n {\n return this.setAlpha(1);\n },\n\n /**\n * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\n *\n * If your game is running under WebGL you can optionally specify four different alpha values, each of which\n * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.\n *\n * @method Phaser.GameObjects.Components.Alpha#setAlpha\n * @since 3.0.0\n *\n * @param {number} [topLeft=1] - The alpha value used for the top-left of the Game Object. If this is the only value given it's applied across the whole Game Object.\n * @param {number} [topRight] - The alpha value used for the top-right of the Game Object. WebGL only.\n * @param {number} [bottomLeft] - The alpha value used for the bottom-left of the Game Object. WebGL only.\n * @param {number} [bottomRight] - The alpha value used for the bottom-right of the Game Object. WebGL only.\n *\n * @return {this} This Game Object instance.\n */\n setAlpha: function (topLeft, topRight, bottomLeft, bottomRight)\n {\n if (topLeft === undefined) { topLeft = 1; }\n\n // Treat as if there is only one alpha value for the whole Game Object\n if (topRight === undefined)\n {\n this.alpha = topLeft;\n }\n else\n {\n this._alphaTL = Clamp(topLeft, 0, 1);\n this._alphaTR = Clamp(topRight, 0, 1);\n this._alphaBL = Clamp(bottomLeft, 0, 1);\n this._alphaBR = Clamp(bottomRight, 0, 1);\n }\n\n return this;\n },\n\n /**\n * The alpha value of the Game Object.\n *\n * This is a global value, impacting the entire Game Object, not just a region of it.\n *\n * @name Phaser.GameObjects.Components.Alpha#alpha\n * @type {number}\n * @since 3.0.0\n */\n alpha: {\n\n get: function ()\n {\n return this._alpha;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n this._alpha = v;\n this._alphaTL = v;\n this._alphaTR = v;\n this._alphaBL = v;\n this._alphaBR = v;\n\n if (v === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The alpha value starting from the top-left of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Alpha#alphaTopLeft\n * @type {number}\n * @webglOnly\n * @since 3.0.0\n */\n alphaTopLeft: {\n\n get: function ()\n {\n return this._alphaTL;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n this._alphaTL = v;\n\n if (v !== 0)\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The alpha value starting from the top-right of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Alpha#alphaTopRight\n * @type {number}\n * @webglOnly\n * @since 3.0.0\n */\n alphaTopRight: {\n\n get: function ()\n {\n return this._alphaTR;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n this._alphaTR = v;\n\n if (v !== 0)\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The alpha value starting from the bottom-left of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomLeft\n * @type {number}\n * @webglOnly\n * @since 3.0.0\n */\n alphaBottomLeft: {\n\n get: function ()\n {\n return this._alphaBL;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n this._alphaBL = v;\n\n if (v !== 0)\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The alpha value starting from the bottom-right of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomRight\n * @type {number}\n * @webglOnly\n * @since 3.0.0\n */\n alphaBottomRight: {\n\n get: function ()\n {\n return this._alphaBR;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n this._alphaBR = v;\n\n if (v !== 0)\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n }\n\n};\n\nmodule.exports = Alpha;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Clamp = require('../../math/Clamp');\n\n// bitmask flag for GameObject.renderMask\nvar _FLAG = 2; // 0010\n\n/**\n * Provides methods used for setting the alpha property of a Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.AlphaSingle\n * @since 3.22.0\n */\n\nvar AlphaSingle = {\n\n /**\n * Private internal value. Holds the global alpha value.\n *\n * @name Phaser.GameObjects.Components.AlphaSingle#_alpha\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _alpha: 1,\n\n /**\n * Clears all alpha values associated with this Game Object.\n *\n * Immediately sets the alpha levels back to 1 (fully opaque).\n *\n * @method Phaser.GameObjects.Components.AlphaSingle#clearAlpha\n * @since 3.0.0\n *\n * @return {this} This Game Object instance.\n */\n clearAlpha: function ()\n {\n return this.setAlpha(1);\n },\n\n /**\n * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\n *\n * @method Phaser.GameObjects.Components.AlphaSingle#setAlpha\n * @since 3.0.0\n *\n * @param {number} [value=1] - The alpha value applied across the whole Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setAlpha: function (value)\n {\n if (value === undefined) { value = 1; }\n\n this.alpha = value;\n\n return this;\n },\n\n /**\n * The alpha value of the Game Object.\n *\n * This is a global value, impacting the entire Game Object, not just a region of it.\n *\n * @name Phaser.GameObjects.Components.AlphaSingle#alpha\n * @type {number}\n * @since 3.0.0\n */\n alpha: {\n\n get: function ()\n {\n return this._alpha;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n this._alpha = v;\n\n if (v === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n }\n\n};\n\nmodule.exports = AlphaSingle;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar BaseAnimation = require('../../animations/Animation');\nvar Class = require('../../utils/Class');\nvar Events = require('../../animations/events');\n\n/**\n * @classdesc\n * A Game Object Animation Controller.\n *\n * This controller lives as an instance within a Game Object, accessible as `sprite.anims`.\n *\n * @class Animation\n * @memberof Phaser.GameObjects.Components\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} parent - The Game Object to which this animation controller belongs.\n */\nvar Animation = new Class({\n\n initialize:\n\n function Animation (parent)\n {\n /**\n * The Game Object to which this animation controller belongs.\n *\n * @name Phaser.GameObjects.Components.Animation#parent\n * @type {Phaser.GameObjects.GameObject}\n * @since 3.0.0\n */\n this.parent = parent;\n\n /**\n * A reference to the global Animation Manager.\n *\n * @name Phaser.GameObjects.Components.Animation#animationManager\n * @type {Phaser.Animations.AnimationManager}\n * @since 3.0.0\n */\n this.animationManager = parent.scene.sys.anims;\n\n this.animationManager.once(Events.REMOVE_ANIMATION, this.remove, this);\n\n /**\n * Is an animation currently playing or not?\n *\n * @name Phaser.GameObjects.Components.Animation#isPlaying\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.isPlaying = false;\n\n /**\n * The current Animation loaded into this Animation Controller.\n *\n * @name Phaser.GameObjects.Components.Animation#currentAnim\n * @type {?Phaser.Animations.Animation}\n * @default null\n * @since 3.0.0\n */\n this.currentAnim = null;\n\n /**\n * The current AnimationFrame being displayed by this Animation Controller.\n *\n * @name Phaser.GameObjects.Components.Animation#currentFrame\n * @type {?Phaser.Animations.AnimationFrame}\n * @default null\n * @since 3.0.0\n */\n this.currentFrame = null;\n\n /**\n * The key of the next Animation to be loaded into this Animation Controller when the current animation completes.\n *\n * @name Phaser.GameObjects.Components.Animation#nextAnim\n * @type {?string}\n * @default null\n * @since 3.16.0\n */\n this.nextAnim = null;\n\n /**\n * A queue of keys of the next Animations to be loaded into this Animation Controller when the current animation completes.\n *\n * @name Phaser.GameObjects.Components.Animation#nextAnimsQueue\n * @type {string[]}\n * @since 3.24.0\n */\n this.nextAnimsQueue = [];\n\n /**\n * Time scale factor.\n *\n * @name Phaser.GameObjects.Components.Animation#_timeScale\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n this._timeScale = 1;\n\n /**\n * The frame rate of playback in frames per second.\n * The default is 24 if the `duration` property is `null`.\n *\n * @name Phaser.GameObjects.Components.Animation#frameRate\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.frameRate = 0;\n\n /**\n * How long the animation should play for, in milliseconds.\n * If the `frameRate` property has been set then it overrides this value,\n * otherwise the `frameRate` is derived from `duration`.\n *\n * @name Phaser.GameObjects.Components.Animation#duration\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.duration = 0;\n\n /**\n * ms per frame, not including frame specific modifiers that may be present in the Animation data.\n *\n * @name Phaser.GameObjects.Components.Animation#msPerFrame\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.msPerFrame = 0;\n\n /**\n * Skip frames if the time lags, or always advanced anyway?\n *\n * @name Phaser.GameObjects.Components.Animation#skipMissedFrames\n * @type {boolean}\n * @default true\n * @since 3.0.0\n */\n this.skipMissedFrames = true;\n\n /**\n * A delay before starting playback, in milliseconds.\n *\n * @name Phaser.GameObjects.Components.Animation#_delay\n * @type {number}\n * @private\n * @default 0\n * @since 3.0.0\n */\n this._delay = 0;\n\n /**\n * Number of times to repeat the animation (-1 for infinity)\n *\n * @name Phaser.GameObjects.Components.Animation#_repeat\n * @type {number}\n * @private\n * @default 0\n * @since 3.0.0\n */\n this._repeat = 0;\n\n /**\n * Delay before the repeat starts, in milliseconds.\n *\n * @name Phaser.GameObjects.Components.Animation#_repeatDelay\n * @type {number}\n * @private\n * @default 0\n * @since 3.0.0\n */\n this._repeatDelay = 0;\n\n /**\n * Should the animation yoyo? (reverse back down to the start) before repeating?\n *\n * @name Phaser.GameObjects.Components.Animation#_yoyo\n * @type {boolean}\n * @private\n * @default false\n * @since 3.0.0\n */\n this._yoyo = false;\n\n /**\n * Will the playhead move forwards (`true`) or in reverse (`false`).\n *\n * @name Phaser.GameObjects.Components.Animation#forward\n * @type {boolean}\n * @default true\n * @since 3.0.0\n */\n this.forward = true;\n\n /**\n * An Internal trigger that's play the animation in reverse mode ('true') or not ('false'),\n * needed because forward can be changed by yoyo feature.\n *\n * @name Phaser.GameObjects.Components.Animation#_reverse\n * @type {boolean}\n * @default false\n * @private\n * @since 3.12.0\n */\n this._reverse = false;\n\n /**\n * Internal time overflow accumulator.\n *\n * @name Phaser.GameObjects.Components.Animation#accumulator\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.accumulator = 0;\n\n /**\n * The time point at which the next animation frame will change.\n *\n * @name Phaser.GameObjects.Components.Animation#nextTick\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.nextTick = 0;\n\n /**\n * An internal counter keeping track of how many repeats are left to play.\n *\n * @name Phaser.GameObjects.Components.Animation#repeatCounter\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.repeatCounter = 0;\n\n /**\n * An internal flag keeping track of pending repeats.\n *\n * @name Phaser.GameObjects.Components.Animation#pendingRepeat\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n this.pendingRepeat = false;\n\n /**\n * Is the Animation paused?\n *\n * @name Phaser.GameObjects.Components.Animation#_paused\n * @type {boolean}\n * @private\n * @default false\n * @since 3.0.0\n */\n this._paused = false;\n\n /**\n * Was the animation previously playing before being paused?\n *\n * @name Phaser.GameObjects.Components.Animation#_wasPlaying\n * @type {boolean}\n * @private\n * @default false\n * @since 3.0.0\n */\n this._wasPlaying = false;\n\n /**\n * Internal property tracking if this Animation is waiting to stop.\n *\n * 0 = No\n * 1 = Waiting for ms to pass\n * 2 = Waiting for repeat\n * 3 = Waiting for specific frame\n *\n * @name Phaser.GameObjects.Components.Animation#_pendingStop\n * @type {integer}\n * @private\n * @since 3.4.0\n */\n this._pendingStop = 0;\n\n /**\n * Internal property used by _pendingStop.\n *\n * @name Phaser.GameObjects.Components.Animation#_pendingStopValue\n * @type {any}\n * @private\n * @since 3.4.0\n */\n this._pendingStopValue;\n },\n\n /**\n * Sets an animation to be played immediately after the current one completes.\n *\n * The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc, or have the `stop` method called directly on it.\n *\n * An animation set to repeat forever will never enter a completed state.\n *\n * You can chain a new animation at any point, including before the current one starts playing, during it, or when it ends (via its `animationcomplete` callback).\n * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained animations without impacting the global animation they're playing.\n *\n * Call this method with no arguments to reset the chained animation.\n *\n * @method Phaser.GameObjects.Components.Animation#chain\n * @since 3.16.0\n *\n * @param {(string|Phaser.Animations.Animation)} [key] - The string-based key of the animation to play next, as defined previously in the Animation Manager. Or an Animation instance.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n chain: function (key)\n {\n if (key instanceof BaseAnimation)\n {\n key = key.key;\n }\n\n if (this.nextAnim === null)\n {\n this.nextAnim = key;\n }\n else\n {\n this.nextAnimsQueue.push(key);\n }\n\n return this.parent;\n },\n\n /**\n * Sets the amount of time, in milliseconds, that the animation will be delayed before starting playback.\n *\n * @method Phaser.GameObjects.Components.Animation#setDelay\n * @since 3.4.0\n *\n * @param {integer} [value=0] - The amount of time, in milliseconds, to wait before starting playback.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n setDelay: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this._delay = value;\n\n return this.parent;\n },\n\n /**\n * Gets the amount of time, in milliseconds that the animation will be delayed before starting playback.\n *\n * @method Phaser.GameObjects.Components.Animation#getDelay\n * @since 3.4.0\n *\n * @return {integer} The amount of time, in milliseconds, the Animation will wait before starting playback.\n */\n getDelay: function ()\n {\n return this._delay;\n },\n\n /**\n * Waits for the specified delay, in milliseconds, then starts playback of the requested animation.\n *\n * @method Phaser.GameObjects.Components.Animation#delayedPlay\n * @since 3.0.0\n *\n * @param {integer} delay - The delay, in milliseconds, to wait before starting the animation playing.\n * @param {string} key - The key of the animation to play.\n * @param {integer} [startFrame=0] - The frame of the animation to start from.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n delayedPlay: function (delay, key, startFrame)\n {\n this.play(key, true, startFrame);\n\n this.nextTick += delay;\n\n return this.parent;\n },\n\n /**\n * Returns the key of the animation currently loaded into this component.\n *\n * @method Phaser.GameObjects.Components.Animation#getCurrentKey\n * @since 3.0.0\n *\n * @return {string} The key of the Animation loaded into this component.\n */\n getCurrentKey: function ()\n {\n if (this.currentAnim)\n {\n return this.currentAnim.key;\n }\n },\n\n /**\n * Internal method used to load an animation into this component.\n *\n * @method Phaser.GameObjects.Components.Animation#load\n * @protected\n * @since 3.0.0\n *\n * @param {string} key - The key of the animation to load.\n * @param {integer} [startFrame=0] - The start frame of the animation to load.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n load: function (key, startFrame)\n {\n if (startFrame === undefined) { startFrame = 0; }\n\n if (this.isPlaying)\n {\n this.stop();\n }\n\n // Load the new animation in\n this.animationManager.load(this, key, startFrame);\n\n return this.parent;\n },\n\n /**\n * Pause the current animation and set the `isPlaying` property to `false`.\n * You can optionally pause it at a specific frame.\n *\n * @method Phaser.GameObjects.Components.Animation#pause\n * @since 3.0.0\n *\n * @param {Phaser.Animations.AnimationFrame} [atFrame] - An optional frame to set after pausing the animation.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n pause: function (atFrame)\n {\n if (!this._paused)\n {\n this._paused = true;\n this._wasPlaying = this.isPlaying;\n this.isPlaying = false;\n }\n\n if (atFrame !== undefined)\n {\n this.updateFrame(atFrame);\n }\n\n return this.parent;\n },\n\n /**\n * Resumes playback of a paused animation and sets the `isPlaying` property to `true`.\n * You can optionally tell it to start playback from a specific frame.\n *\n * @method Phaser.GameObjects.Components.Animation#resume\n * @since 3.0.0\n *\n * @param {Phaser.Animations.AnimationFrame} [fromFrame] - An optional frame to set before restarting playback.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n resume: function (fromFrame)\n {\n if (this._paused)\n {\n this._paused = false;\n this.isPlaying = this._wasPlaying;\n }\n\n if (fromFrame !== undefined)\n {\n this.updateFrame(fromFrame);\n }\n\n return this.parent;\n },\n\n /**\n * `true` if the current animation is paused, otherwise `false`.\n *\n * @name Phaser.GameObjects.Components.Animation#isPaused\n * @readonly\n * @type {boolean}\n * @since 3.4.0\n */\n isPaused: {\n\n get: function ()\n {\n return this._paused;\n }\n\n },\n\n /**\n * Plays an Animation on a Game Object that has the Animation component, such as a Sprite.\n *\n * Animations are stored in the global Animation Manager and are referenced by a unique string-based key.\n *\n * @method Phaser.GameObjects.Components.Animation#play\n * @fires Phaser.GameObjects.Components.Animation#onStartEvent\n * @since 3.0.0\n *\n * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance.\n * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call.\n * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n play: function (key, ignoreIfPlaying, startFrame)\n {\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\n if (startFrame === undefined) { startFrame = 0; }\n\n if (key instanceof BaseAnimation)\n {\n key = key.key;\n }\n\n if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key)\n {\n return this.parent;\n }\n\n this.forward = true;\n this._reverse = false;\n this._paused = false;\n this._wasPlaying = true;\n\n return this._startAnimation(key, startFrame);\n },\n\n /**\n * Plays an Animation (in reverse mode) on the Game Object that owns this Animation Component.\n *\n * @method Phaser.GameObjects.Components.Animation#playReverse\n * @fires Phaser.GameObjects.Components.Animation#onStartEvent\n * @since 3.12.0\n *\n * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance.\n * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call.\n * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n playReverse: function (key, ignoreIfPlaying, startFrame)\n {\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\n if (startFrame === undefined) { startFrame = 0; }\n\n if (key instanceof BaseAnimation)\n {\n key = key.key;\n }\n\n if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key)\n {\n return this.parent;\n }\n\n this.forward = false;\n this._reverse = true;\n\n return this._startAnimation(key, startFrame);\n },\n\n /**\n * Load an Animation and fires 'onStartEvent' event, extracted from 'play' method.\n *\n * @method Phaser.GameObjects.Components.Animation#_startAnimation\n * @fires Phaser.Animations.Events#ANIMATION_START\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START\n * @since 3.12.0\n *\n * @param {string} key - The string-based key of the animation to play, as defined previously in the Animation Manager.\n * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n _startAnimation: function (key, startFrame)\n {\n this.load(key, startFrame);\n\n var anim = this.currentAnim;\n var gameObject = this.parent;\n\n if (!anim)\n {\n return gameObject;\n }\n\n // Should give us 9,007,199,254,740,991 safe repeats\n this.repeatCounter = (this._repeat === -1) ? Number.MAX_VALUE : this._repeat;\n\n anim.getFirstTick(this);\n\n this.isPlaying = true;\n this.pendingRepeat = false;\n\n if (anim.showOnStart)\n {\n gameObject.visible = true;\n }\n\n var frame = this.currentFrame;\n\n anim.emit(Events.ANIMATION_START, anim, frame, gameObject);\n\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_START + key, anim, frame, gameObject);\n\n gameObject.emit(Events.SPRITE_ANIMATION_START, anim, frame, gameObject);\n\n return gameObject;\n },\n\n /**\n * Reverse the Animation that is already playing on the Game Object.\n *\n * @method Phaser.GameObjects.Components.Animation#reverse\n * @since 3.12.0\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n reverse: function ()\n {\n if (this.isPlaying)\n {\n this._reverse = !this._reverse;\n\n this.forward = !this.forward;\n }\n\n return this.parent;\n },\n\n /**\n * Returns a value between 0 and 1 indicating how far this animation is through, ignoring repeats and yoyos.\n * If the animation has a non-zero repeat defined, `getProgress` and `getTotalProgress` will be different\n * because `getProgress` doesn't include any repeats or repeat delays, whereas `getTotalProgress` does.\n *\n * @method Phaser.GameObjects.Components.Animation#getProgress\n * @since 3.4.0\n *\n * @return {number} The progress of the current animation, between 0 and 1.\n */\n getProgress: function ()\n {\n var p = this.currentFrame.progress;\n\n if (!this.forward)\n {\n p = 1 - p;\n }\n\n return p;\n },\n\n /**\n * Takes a value between 0 and 1 and uses it to set how far this animation is through playback.\n * Does not factor in repeats or yoyos, but does handle playing forwards or backwards.\n *\n * @method Phaser.GameObjects.Components.Animation#setProgress\n * @since 3.4.0\n *\n * @param {number} [value=0] - The progress value, between 0 and 1.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n setProgress: function (value)\n {\n if (!this.forward)\n {\n value = 1 - value;\n }\n\n this.setCurrentFrame(this.currentAnim.getFrameByProgress(value));\n\n return this.parent;\n },\n\n /**\n * Handle the removal of an animation from the Animation Manager.\n *\n * @method Phaser.GameObjects.Components.Animation#remove\n * @since 3.0.0\n *\n * @param {string} [key] - The key of the removed Animation.\n * @param {Phaser.Animations.Animation} [animation] - The removed Animation.\n */\n remove: function (key, animation)\n {\n if (animation === undefined) { animation = this.currentAnim; }\n\n if (this.isPlaying && animation.key === this.currentAnim.key)\n {\n this.stop();\n\n this.setCurrentFrame(this.currentAnim.frames[0]);\n }\n },\n\n /**\n * Gets the number of times that the animation will repeat\n * after its first iteration. For example, if returns 1, the animation will\n * play a total of twice (the initial play plus 1 repeat).\n * A value of -1 means the animation will repeat indefinitely.\n *\n * @method Phaser.GameObjects.Components.Animation#getRepeat\n * @since 3.4.0\n *\n * @return {integer} The number of times that the animation will repeat.\n */\n getRepeat: function ()\n {\n return this._repeat;\n },\n\n /**\n * Sets the number of times that the animation should repeat\n * after its first iteration. For example, if repeat is 1, the animation will\n * play a total of twice (the initial play plus 1 repeat).\n * To repeat indefinitely, use -1. repeat should always be an integer.\n *\n * @method Phaser.GameObjects.Components.Animation#setRepeat\n * @since 3.4.0\n *\n * @param {integer} value - The number of times that the animation should repeat.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n setRepeat: function (value)\n {\n this._repeat = value;\n\n this.repeatCounter = (value === -1) ? Number.MAX_VALUE : value;\n\n return this.parent;\n },\n\n /**\n * Gets the amount of delay between repeats, if any.\n *\n * @method Phaser.GameObjects.Components.Animation#getRepeatDelay\n * @since 3.4.0\n *\n * @return {number} The delay between repeats.\n */\n getRepeatDelay: function ()\n {\n return this._repeatDelay;\n },\n\n /**\n * Sets the amount of time in seconds between repeats.\n * For example, if `repeat` is 2 and `repeatDelay` is 10, the animation will play initially,\n * then wait for 10 seconds before repeating, then play again, then wait another 10 seconds\n * before doing its final repeat.\n *\n * @method Phaser.GameObjects.Components.Animation#setRepeatDelay\n * @since 3.4.0\n *\n * @param {number} value - The delay to wait between repeats, in seconds.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n setRepeatDelay: function (value)\n {\n this._repeatDelay = value;\n\n return this.parent;\n },\n\n /**\n * Restarts the current animation from its beginning, optionally including its delay value.\n *\n * @method Phaser.GameObjects.Components.Animation#restart\n * @fires Phaser.Animations.Events#ANIMATION_RESTART\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_RESTART\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART\n * @since 3.0.0\n *\n * @param {boolean} [includeDelay=false] - Whether to include the delay value of the animation when restarting.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n restart: function (includeDelay)\n {\n if (includeDelay === undefined) { includeDelay = false; }\n\n var anim = this.currentAnim;\n\n anim.getFirstTick(this, includeDelay);\n\n this.forward = true;\n this.isPlaying = true;\n this.pendingRepeat = false;\n this._paused = false;\n\n // Set frame\n this.updateFrame(anim.frames[0]);\n\n var gameObject = this.parent;\n var frame = this.currentFrame;\n\n anim.emit(Events.ANIMATION_RESTART, anim, frame, gameObject);\n\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_RESTART + anim.key, anim, frame, gameObject);\n\n gameObject.emit(Events.SPRITE_ANIMATION_RESTART, anim, frame, gameObject);\n\n return this.parent;\n },\n\n /**\n * Immediately stops the current animation from playing and dispatches the `animationcomplete` event.\n *\n * If no animation is set, no event will be dispatched.\n *\n * If there is another animation queued (via the `chain` method) then it will start playing immediately.\n *\n * @method Phaser.GameObjects.Components.Animation#stop\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\n * @since 3.0.0\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n stop: function ()\n {\n this._pendingStop = 0;\n\n this.isPlaying = false;\n\n var gameObject = this.parent;\n var anim = this.currentAnim;\n var frame = this.currentFrame;\n\n if (anim)\n {\n anim.emit(Events.ANIMATION_COMPLETE, anim, frame, gameObject);\n\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_COMPLETE + anim.key, anim, frame, gameObject);\n\n gameObject.emit(Events.SPRITE_ANIMATION_COMPLETE, anim, frame, gameObject);\n }\n\n if (this.nextAnim)\n {\n var key = this.nextAnim;\n\n this.nextAnim = (this.nextAnimsQueue.length > 0) ? this.nextAnimsQueue.shift() : null;\n\n this.play(key);\n }\n\n return gameObject;\n },\n\n /**\n * Stops the current animation from playing after the specified time delay, given in milliseconds.\n *\n * @method Phaser.GameObjects.Components.Animation#stopAfterDelay\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\n * @since 3.4.0\n *\n * @param {integer} delay - The number of milliseconds to wait before stopping this animation.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n stopAfterDelay: function (delay)\n {\n this._pendingStop = 1;\n this._pendingStopValue = delay;\n\n return this.parent;\n },\n\n /**\n * Stops the current animation from playing when it next repeats.\n *\n * @method Phaser.GameObjects.Components.Animation#stopOnRepeat\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\n * @since 3.4.0\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n stopOnRepeat: function ()\n {\n this._pendingStop = 2;\n\n return this.parent;\n },\n\n /**\n * Stops the current animation from playing when it next sets the given frame.\n * If this frame doesn't exist within the animation it will not stop it from playing.\n *\n * @method Phaser.GameObjects.Components.Animation#stopOnFrame\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\n * @since 3.4.0\n *\n * @param {Phaser.Animations.AnimationFrame} frame - The frame to check before stopping this animation.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n stopOnFrame: function (frame)\n {\n this._pendingStop = 3;\n this._pendingStopValue = frame;\n\n return this.parent;\n },\n\n /**\n * Sets the Time Scale factor, allowing you to make the animation go go faster or slower than default.\n * Where 1 = normal speed (the default), 0.5 = half speed, 2 = double speed, etc.\n *\n * @method Phaser.GameObjects.Components.Animation#setTimeScale\n * @since 3.4.0\n *\n * @param {number} [value=1] - The time scale factor, where 1 is no change, 0.5 is half speed, etc.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\n */\n setTimeScale: function (value)\n {\n if (value === undefined) { value = 1; }\n\n this._timeScale = value;\n\n return this.parent;\n },\n\n /**\n * Gets the Time Scale factor.\n *\n * @method Phaser.GameObjects.Components.Animation#getTimeScale\n * @since 3.4.0\n *\n * @return {number} The Time Scale value.\n */\n getTimeScale: function ()\n {\n return this._timeScale;\n },\n\n /**\n * Returns the total number of frames in this animation.\n *\n * @method Phaser.GameObjects.Components.Animation#getTotalFrames\n * @since 3.4.0\n *\n * @return {integer} The total number of frames in this animation.\n */\n getTotalFrames: function ()\n {\n return this.currentAnim.frames.length;\n },\n\n /**\n * The internal update loop for the Animation Component.\n *\n * @method Phaser.GameObjects.Components.Animation#update\n * @since 3.0.0\n *\n * @param {number} time - The current timestamp.\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\n */\n update: function (time, delta)\n {\n if (!this.currentAnim || !this.isPlaying || this.currentAnim.paused)\n {\n return;\n }\n\n this.accumulator += delta * this._timeScale;\n\n if (this._pendingStop === 1)\n {\n this._pendingStopValue -= delta;\n\n if (this._pendingStopValue <= 0)\n {\n return this.currentAnim.completeAnimation(this);\n }\n }\n\n if (this.accumulator >= this.nextTick)\n {\n this.currentAnim.setFrame(this);\n }\n },\n\n /**\n * Sets the given Animation Frame as being the current frame\n * and applies it to the parent Game Object, adjusting its size and origin as needed.\n *\n * @method Phaser.GameObjects.Components.Animation#setCurrentFrame\n * @since 3.4.0\n *\n * @param {Phaser.Animations.AnimationFrame} animationFrame - The Animation Frame to set as being current.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\n */\n setCurrentFrame: function (animationFrame)\n {\n var gameObject = this.parent;\n\n this.currentFrame = animationFrame;\n\n gameObject.texture = animationFrame.frame.texture;\n gameObject.frame = animationFrame.frame;\n\n if (gameObject.isCropped)\n {\n gameObject.frame.updateCropUVs(gameObject._crop, gameObject.flipX, gameObject.flipY);\n }\n\n gameObject.setSizeToFrame();\n\n if (gameObject._originComponent)\n {\n if (animationFrame.frame.customPivot)\n {\n gameObject.setOrigin(animationFrame.frame.pivotX, animationFrame.frame.pivotY);\n }\n else\n {\n gameObject.updateDisplayOrigin();\n }\n }\n\n return gameObject;\n },\n\n /**\n * Internal frame change handler.\n *\n * @method Phaser.GameObjects.Components.Animation#updateFrame\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE\n * @private\n * @since 3.0.0\n *\n * @param {Phaser.Animations.AnimationFrame} animationFrame - The animation frame to change to.\n */\n updateFrame: function (animationFrame)\n {\n var gameObject = this.setCurrentFrame(animationFrame);\n\n if (this.isPlaying)\n {\n if (animationFrame.setAlpha)\n {\n gameObject.alpha = animationFrame.alpha;\n }\n\n var anim = this.currentAnim;\n\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_UPDATE + anim.key, anim, animationFrame, gameObject);\n\n gameObject.emit(Events.SPRITE_ANIMATION_UPDATE, anim, animationFrame, gameObject);\n\n if (this._pendingStop === 3 && this._pendingStopValue === animationFrame)\n {\n this.currentAnim.completeAnimation(this);\n }\n }\n },\n\n /**\n * Advances the animation to the next frame, regardless of the time or animation state.\n * If the animation is set to repeat, or yoyo, this will still take effect.\n *\n * Calling this does not change the direction of the animation. I.e. if it was currently\n * playing in reverse, calling this method doesn't then change the direction to forwards.\n *\n * @method Phaser.GameObjects.Components.Animation#nextFrame\n * @since 3.16.0\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\n */\n nextFrame: function ()\n {\n if (this.currentAnim)\n {\n this.currentAnim.nextFrame(this);\n }\n\n return this.parent;\n },\n\n /**\n * Advances the animation to the previous frame, regardless of the time or animation state.\n * If the animation is set to repeat, or yoyo, this will still take effect.\n *\n * Calling this does not change the direction of the animation. I.e. if it was currently\n * playing in forwards, calling this method doesn't then change the direction to backwards.\n *\n * @method Phaser.GameObjects.Components.Animation#previousFrame\n * @since 3.16.0\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\n */\n previousFrame: function ()\n {\n if (this.currentAnim)\n {\n this.currentAnim.previousFrame(this);\n }\n\n return this.parent;\n },\n\n /**\n * Sets if the current Animation will yoyo when it reaches the end.\n * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again.\n *\n * @method Phaser.GameObjects.Components.Animation#setYoyo\n * @since 3.4.0\n *\n * @param {boolean} [value=false] - `true` if the animation should yoyo, `false` to not.\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\n */\n setYoyo: function (value)\n {\n if (value === undefined) { value = false; }\n\n this._yoyo = value;\n\n return this.parent;\n },\n\n /**\n * Gets if the current Animation will yoyo when it reaches the end.\n * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again.\n *\n * @method Phaser.GameObjects.Components.Animation#getYoyo\n * @since 3.4.0\n *\n * @return {boolean} `true` if the animation is set to yoyo, `false` if not.\n */\n getYoyo: function ()\n {\n return this._yoyo;\n },\n\n /**\n * Destroy this Animation component.\n *\n * Unregisters event listeners and cleans up its references.\n *\n * @method Phaser.GameObjects.Components.Animation#destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.animationManager.off(Events.REMOVE_ANIMATION, this.remove, this);\n\n this.animationManager = null;\n this.parent = null;\n this.nextAnimsQueue.length = 0;\n\n this.currentAnim = null;\n this.currentFrame = null;\n }\n\n});\n\nmodule.exports = Animation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar BlendModes = require('../../renderer/BlendModes');\n\n/**\n * Provides methods used for setting the blend mode of a Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.BlendMode\n * @since 3.0.0\n */\n\nvar BlendMode = {\n\n /**\n * Private internal value. Holds the current blend mode.\n * \n * @name Phaser.GameObjects.Components.BlendMode#_blendMode\n * @type {integer}\n * @private\n * @default 0\n * @since 3.0.0\n */\n _blendMode: BlendModes.NORMAL,\n\n /**\n * Sets the Blend Mode being used by this Game Object.\n *\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\n *\n * Under WebGL only the following Blend Modes are available:\n *\n * * ADD\n * * MULTIPLY\n * * SCREEN\n * * ERASE\n *\n * Canvas has more available depending on browser support.\n *\n * You can also create your own custom Blend Modes in WebGL.\n *\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\n * reasons try to be careful about the construction of your Scene and the frequency of which blend modes\n * are used.\n *\n * @name Phaser.GameObjects.Components.BlendMode#blendMode\n * @type {(Phaser.BlendModes|string)}\n * @since 3.0.0\n */\n blendMode: {\n\n get: function ()\n {\n return this._blendMode;\n },\n\n set: function (value)\n {\n if (typeof value === 'string')\n {\n value = BlendModes[value];\n }\n\n value |= 0;\n\n if (value >= -1)\n {\n this._blendMode = value;\n }\n }\n\n },\n\n /**\n * Sets the Blend Mode being used by this Game Object.\n *\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\n *\n * Under WebGL only the following Blend Modes are available:\n *\n * * ADD\n * * MULTIPLY\n * * SCREEN\n * * ERASE (only works when rendering to a framebuffer, like a Render Texture)\n *\n * Canvas has more available depending on browser support.\n *\n * You can also create your own custom Blend Modes in WebGL.\n *\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\n * reasons try to be careful about the construction of your Scene and the frequency in which blend modes\n * are used.\n *\n * @method Phaser.GameObjects.Components.BlendMode#setBlendMode\n * @since 3.0.0\n *\n * @param {(string|Phaser.BlendModes)} value - The BlendMode value. Either a string or a CONST.\n *\n * @return {this} This Game Object instance.\n */\n setBlendMode: function (value)\n {\n this.blendMode = value;\n\n return this;\n }\n\n};\n\nmodule.exports = BlendMode;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for calculating and setting the size of a non-Frame based Game Object.\n * Should be applied as a mixin and not used directly.\n * \n * @namespace Phaser.GameObjects.Components.ComputedSize\n * @since 3.0.0\n */\n\nvar ComputedSize = {\n\n /**\n * The native (un-scaled) width of this Game Object.\n * \n * Changing this value will not change the size that the Game Object is rendered in-game.\n * For that you need to either set the scale of the Game Object (`setScale`) or use\n * the `displayWidth` property.\n * \n * @name Phaser.GameObjects.Components.ComputedSize#width\n * @type {number}\n * @since 3.0.0\n */\n width: 0,\n\n /**\n * The native (un-scaled) height of this Game Object.\n * \n * Changing this value will not change the size that the Game Object is rendered in-game.\n * For that you need to either set the scale of the Game Object (`setScale`) or use\n * the `displayHeight` property.\n * \n * @name Phaser.GameObjects.Components.ComputedSize#height\n * @type {number}\n * @since 3.0.0\n */\n height: 0,\n\n /**\n * The displayed width of this Game Object.\n * \n * This value takes into account the scale factor.\n * \n * Setting this value will adjust the Game Object's scale property.\n * \n * @name Phaser.GameObjects.Components.ComputedSize#displayWidth\n * @type {number}\n * @since 3.0.0\n */\n displayWidth: {\n\n get: function ()\n {\n return this.scaleX * this.width;\n },\n\n set: function (value)\n {\n this.scaleX = value / this.width;\n }\n\n },\n\n /**\n * The displayed height of this Game Object.\n * \n * This value takes into account the scale factor.\n * \n * Setting this value will adjust the Game Object's scale property.\n * \n * @name Phaser.GameObjects.Components.ComputedSize#displayHeight\n * @type {number}\n * @since 3.0.0\n */\n displayHeight: {\n\n get: function ()\n {\n return this.scaleY * this.height;\n },\n\n set: function (value)\n {\n this.scaleY = value / this.height;\n }\n\n },\n\n /**\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\n * \n * This will not change the size that the Game Object is rendered in-game.\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\n * to do so by giving pixel values.\n * \n * If you have enabled this Game Object for input, changing the size will _not_ change the\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\n * \n * @method Phaser.GameObjects.Components.ComputedSize#setSize\n * @since 3.4.0\n *\n * @param {number} width - The width of this Game Object.\n * @param {number} height - The height of this Game Object.\n * \n * @return {this} This Game Object instance.\n */\n setSize: function (width, height)\n {\n this.width = width;\n this.height = height;\n\n return this;\n },\n\n /**\n * Sets the display size of this Game Object.\n * \n * Calling this will adjust the scale.\n * \n * @method Phaser.GameObjects.Components.ComputedSize#setDisplaySize\n * @since 3.4.0\n *\n * @param {number} width - The width of this Game Object.\n * @param {number} height - The height of this Game Object.\n * \n * @return {this} This Game Object instance.\n */\n setDisplaySize: function (width, height)\n {\n this.displayWidth = width;\n this.displayHeight = height;\n\n return this;\n }\n\n};\n\nmodule.exports = ComputedSize;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for getting and setting the texture of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.Crop\n * @since 3.12.0\n */\n\nvar Crop = {\n\n /**\n * The Texture this Game Object is using to render with.\n *\n * @name Phaser.GameObjects.Components.Crop#texture\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\n * @since 3.0.0\n */\n texture: null,\n\n /**\n * The Texture Frame this Game Object is using to render with.\n *\n * @name Phaser.GameObjects.Components.Crop#frame\n * @type {Phaser.Textures.Frame}\n * @since 3.0.0\n */\n frame: null,\n\n /**\n * A boolean flag indicating if this Game Object is being cropped or not.\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\n *\n * @name Phaser.GameObjects.Components.Crop#isCropped\n * @type {boolean}\n * @since 3.11.0\n */\n isCropped: false,\n\n /**\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\n * \n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\n * \n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\n * changes what is shown when rendered.\n * \n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\n * \n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\n * \n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\n * \n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\n * \n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\n * \n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\n * the renderer to skip several internal calculations.\n *\n * @method Phaser.GameObjects.Components.Crop#setCrop\n * @since 3.11.0\n *\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\n * @param {number} [y] - The y coordinate to start the crop from.\n * @param {number} [width] - The width of the crop rectangle in pixels.\n * @param {number} [height] - The height of the crop rectangle in pixels.\n *\n * @return {this} This Game Object instance.\n */\n setCrop: function (x, y, width, height)\n {\n if (x === undefined)\n {\n this.isCropped = false;\n }\n else if (this.frame)\n {\n if (typeof x === 'number')\n {\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\n }\n else\n {\n var rect = x;\n\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\n }\n\n this.isCropped = true;\n }\n\n return this;\n },\n\n /**\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\n *\n * @method Phaser.GameObjects.Components.Crop#resetCropObject\n * @private\n * @since 3.12.0\n * \n * @return {object} The crop object.\n */\n resetCropObject: function ()\n {\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\n }\n\n};\n\nmodule.exports = Crop;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the depth of a Game Object.\n * Should be applied as a mixin and not used directly.\n * \n * @namespace Phaser.GameObjects.Components.Depth\n * @since 3.0.0\n */\n\nvar Depth = {\n\n /**\n * Private internal value. Holds the depth of the Game Object.\n * \n * @name Phaser.GameObjects.Components.Depth#_depth\n * @type {integer}\n * @private\n * @default 0\n * @since 3.0.0\n */\n _depth: 0,\n\n /**\n * The depth of this Game Object within the Scene.\n * \n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\n * of Game Objects, without actually moving their position in the display list.\n *\n * The default depth is zero. A Game Object with a higher depth\n * value will always render in front of one with a lower value.\n *\n * Setting the depth will queue a depth sort event within the Scene.\n * \n * @name Phaser.GameObjects.Components.Depth#depth\n * @type {number}\n * @since 3.0.0\n */\n depth: {\n\n get: function ()\n {\n return this._depth;\n },\n\n set: function (value)\n {\n this.scene.sys.queueDepthSort();\n this._depth = value;\n }\n\n },\n\n /**\n * The depth of this Game Object within the Scene.\n * \n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\n * of Game Objects, without actually moving their position in the display list.\n *\n * The default depth is zero. A Game Object with a higher depth\n * value will always render in front of one with a lower value.\n *\n * Setting the depth will queue a depth sort event within the Scene.\n * \n * @method Phaser.GameObjects.Components.Depth#setDepth\n * @since 3.0.0\n *\n * @param {integer} value - The depth of this Game Object.\n * \n * @return {this} This Game Object instance.\n */\n setDepth: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.depth = value;\n\n return this;\n }\n\n};\n\nmodule.exports = Depth;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for visually flipping a Game Object.\n * Should be applied as a mixin and not used directly.\n * \n * @namespace Phaser.GameObjects.Components.Flip\n * @since 3.0.0\n */\n\nvar Flip = {\n\n /**\n * The horizontally flipped state of the Game Object.\n * \n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\n * \n * @name Phaser.GameObjects.Components.Flip#flipX\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n flipX: false,\n\n /**\n * The vertically flipped state of the Game Object.\n * \n * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down)\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\n * \n * @name Phaser.GameObjects.Components.Flip#flipY\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n flipY: false,\n\n /**\n * Toggles the horizontal flipped state of this Game Object.\n * \n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\n * \n * @method Phaser.GameObjects.Components.Flip#toggleFlipX\n * @since 3.0.0\n * \n * @return {this} This Game Object instance.\n */\n toggleFlipX: function ()\n {\n this.flipX = !this.flipX;\n\n return this;\n },\n\n /**\n * Toggles the vertical flipped state of this Game Object.\n * \n * @method Phaser.GameObjects.Components.Flip#toggleFlipY\n * @since 3.0.0\n * \n * @return {this} This Game Object instance.\n */\n toggleFlipY: function ()\n {\n this.flipY = !this.flipY;\n\n return this;\n },\n\n /**\n * Sets the horizontal flipped state of this Game Object.\n * \n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\n * \n * @method Phaser.GameObjects.Components.Flip#setFlipX\n * @since 3.0.0\n *\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\n * \n * @return {this} This Game Object instance.\n */\n setFlipX: function (value)\n {\n this.flipX = value;\n\n return this;\n },\n\n /**\n * Sets the vertical flipped state of this Game Object.\n * \n * @method Phaser.GameObjects.Components.Flip#setFlipY\n * @since 3.0.0\n *\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\n * \n * @return {this} This Game Object instance.\n */\n setFlipY: function (value)\n {\n this.flipY = value;\n\n return this;\n },\n\n /**\n * Sets the horizontal and vertical flipped state of this Game Object.\n * \n * A Game Object that is flipped will render inversed on the flipped axis.\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\n * \n * @method Phaser.GameObjects.Components.Flip#setFlip\n * @since 3.0.0\n *\n * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\n * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\n * \n * @return {this} This Game Object instance.\n */\n setFlip: function (x, y)\n {\n this.flipX = x;\n this.flipY = y;\n\n return this;\n },\n\n /**\n * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.\n * \n * @method Phaser.GameObjects.Components.Flip#resetFlip\n * @since 3.0.0\n *\n * @return {this} This Game Object instance.\n */\n resetFlip: function ()\n {\n this.flipX = false;\n this.flipY = false;\n\n return this;\n }\n\n};\n\nmodule.exports = Flip;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Rectangle = require('../../geom/rectangle/Rectangle');\nvar RotateAround = require('../../math/RotateAround');\nvar Vector2 = require('../../math/Vector2');\n\n/**\n * Provides methods used for obtaining the bounds of a Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.GetBounds\n * @since 3.0.0\n */\n\nvar GetBounds = {\n\n /**\n * Processes the bounds output vector before returning it.\n *\n * @method Phaser.GameObjects.Components.GetBounds#prepareBoundsOutput\n * @private\n * @since 3.18.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} output - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n prepareBoundsOutput: function (output, includeParent)\n {\n if (includeParent === undefined) { includeParent = false; }\n\n if (this.rotation !== 0)\n {\n RotateAround(output, this.x, this.y, this.rotation);\n }\n\n if (includeParent && this.parentContainer)\n {\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\n\n parentMatrix.transformPoint(output.x, output.y, output);\n }\n\n return output;\n },\n\n /**\n * Gets the center coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getCenter\n * @since 3.0.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getCenter: function (output)\n {\n if (output === undefined) { output = new Vector2(); }\n\n output.x = this.x - (this.displayWidth * this.originX) + (this.displayWidth / 2);\n output.y = this.y - (this.displayHeight * this.originY) + (this.displayHeight / 2);\n\n return output;\n },\n\n /**\n * Gets the top-left corner coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getTopLeft\n * @since 3.0.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getTopLeft: function (output, includeParent)\n {\n if (!output) { output = new Vector2(); }\n\n output.x = this.x - (this.displayWidth * this.originX);\n output.y = this.y - (this.displayHeight * this.originY);\n\n return this.prepareBoundsOutput(output, includeParent);\n },\n\n /**\n * Gets the top-center coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getTopCenter\n * @since 3.18.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getTopCenter: function (output, includeParent)\n {\n if (!output) { output = new Vector2(); }\n\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\n output.y = this.y - (this.displayHeight * this.originY);\n\n return this.prepareBoundsOutput(output, includeParent);\n },\n\n /**\n * Gets the top-right corner coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getTopRight\n * @since 3.0.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getTopRight: function (output, includeParent)\n {\n if (!output) { output = new Vector2(); }\n\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\n output.y = this.y - (this.displayHeight * this.originY);\n\n return this.prepareBoundsOutput(output, includeParent);\n },\n\n /**\n * Gets the left-center coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getLeftCenter\n * @since 3.18.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getLeftCenter: function (output, includeParent)\n {\n if (!output) { output = new Vector2(); }\n\n output.x = this.x - (this.displayWidth * this.originX);\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\n\n return this.prepareBoundsOutput(output, includeParent);\n },\n\n /**\n * Gets the right-center coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getRightCenter\n * @since 3.18.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getRightCenter: function (output, includeParent)\n {\n if (!output) { output = new Vector2(); }\n\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\n\n return this.prepareBoundsOutput(output, includeParent);\n },\n\n /**\n * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getBottomLeft\n * @since 3.0.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getBottomLeft: function (output, includeParent)\n {\n if (!output) { output = new Vector2(); }\n\n output.x = this.x - (this.displayWidth * this.originX);\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\n\n return this.prepareBoundsOutput(output, includeParent);\n },\n\n /**\n * Gets the bottom-center coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getBottomCenter\n * @since 3.18.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getBottomCenter: function (output, includeParent)\n {\n if (!output) { output = new Vector2(); }\n\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\n\n return this.prepareBoundsOutput(output, includeParent);\n },\n\n /**\n * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.\n * The returned point is calculated in local space and does not factor in any parent containers\n *\n * @method Phaser.GameObjects.Components.GetBounds#getBottomRight\n * @since 3.0.0\n *\n * @generic {Phaser.Math.Vector2} O - [output,$return]\n *\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\n *\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\n */\n getBottomRight: function (output, includeParent)\n {\n if (!output) { output = new Vector2(); }\n\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\n\n return this.prepareBoundsOutput(output, includeParent);\n },\n\n /**\n * Gets the bounds of this Game Object, regardless of origin.\n * The values are stored and returned in a Rectangle, or Rectangle-like, object.\n *\n * @method Phaser.GameObjects.Components.GetBounds#getBounds\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Rectangle} O - [output,$return]\n *\n * @param {(Phaser.Geom.Rectangle|object)} [output] - An object to store the values in. If not provided a new Rectangle will be created.\n *\n * @return {(Phaser.Geom.Rectangle|object)} The values stored in the output object.\n */\n getBounds: function (output)\n {\n if (output === undefined) { output = new Rectangle(); }\n\n // We can use the output object to temporarily store the x/y coords in:\n\n var TLx, TLy, TRx, TRy, BLx, BLy, BRx, BRy;\n\n // Instead of doing a check if parent container is \n // defined per corner we only do it once.\n if (this.parentContainer)\n {\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\n\n this.getTopLeft(output);\n parentMatrix.transformPoint(output.x, output.y, output);\n\n TLx = output.x;\n TLy = output.y;\n\n this.getTopRight(output);\n parentMatrix.transformPoint(output.x, output.y, output);\n\n TRx = output.x;\n TRy = output.y;\n\n this.getBottomLeft(output);\n parentMatrix.transformPoint(output.x, output.y, output);\n\n BLx = output.x;\n BLy = output.y;\n\n this.getBottomRight(output);\n parentMatrix.transformPoint(output.x, output.y, output);\n\n BRx = output.x;\n BRy = output.y;\n }\n else\n {\n this.getTopLeft(output);\n\n TLx = output.x;\n TLy = output.y;\n\n this.getTopRight(output);\n\n TRx = output.x;\n TRy = output.y;\n\n this.getBottomLeft(output);\n\n BLx = output.x;\n BLy = output.y;\n\n this.getBottomRight(output);\n\n BRx = output.x;\n BRy = output.y;\n }\n\n output.x = Math.min(TLx, TRx, BLx, BRx);\n output.y = Math.min(TLy, TRy, BLy, BRy);\n output.width = Math.max(TLx, TRx, BLx, BRx) - output.x;\n output.height = Math.max(TLy, TRy, BLy, BRy) - output.y;\n\n return output;\n }\n\n};\n\nmodule.exports = GetBounds;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar BitmapMask = require('../../display/mask/BitmapMask');\nvar GeometryMask = require('../../display/mask/GeometryMask');\n\n/**\n * Provides methods used for getting and setting the mask of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.Mask\n * @since 3.0.0\n */\n\nvar Mask = {\n\n /**\n * The Mask this Game Object is using during render.\n *\n * @name Phaser.GameObjects.Components.Mask#mask\n * @type {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask}\n * @since 3.0.0\n */\n mask: null,\n\n /**\n * Sets the mask that this Game Object will use to render with.\n *\n * The mask must have been previously created and can be either a GeometryMask or a BitmapMask.\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\n *\n * If a mask is already set on this Game Object it will be immediately replaced.\n * \n * Masks are positioned in global space and are not relative to the Game Object to which they\n * are applied. The reason for this is that multiple Game Objects can all share the same mask.\n * \n * Masks have no impact on physics or input detection. They are purely a rendering component\n * that allows you to limit what is visible during the render pass.\n *\n * @method Phaser.GameObjects.Components.Mask#setMask\n * @since 3.6.2\n *\n * @param {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask} mask - The mask this Game Object will use when rendering.\n *\n * @return {this} This Game Object instance.\n */\n setMask: function (mask)\n {\n this.mask = mask;\n\n return this;\n },\n\n /**\n * Clears the mask that this Game Object was using.\n *\n * @method Phaser.GameObjects.Components.Mask#clearMask\n * @since 3.6.2\n *\n * @param {boolean} [destroyMask=false] - Destroy the mask before clearing it?\n *\n * @return {this} This Game Object instance.\n */\n clearMask: function (destroyMask)\n {\n if (destroyMask === undefined) { destroyMask = false; }\n\n if (destroyMask && this.mask)\n {\n this.mask.destroy();\n }\n\n this.mask = null;\n\n return this;\n },\n\n /**\n * Creates and returns a Bitmap Mask. This mask can be used by any Game Object,\n * including this one.\n *\n * To create the mask you need to pass in a reference to a renderable Game Object.\n * A renderable Game Object is one that uses a texture to render with, such as an\n * Image, Sprite, Render Texture or BitmapText.\n *\n * If you do not provide a renderable object, and this Game Object has a texture,\n * it will use itself as the object. This means you can call this method to create\n * a Bitmap Mask from any renderable Game Object.\n *\n * @method Phaser.GameObjects.Components.Mask#createBitmapMask\n * @since 3.6.2\n * \n * @param {Phaser.GameObjects.GameObject} [renderable] - A renderable Game Object that uses a texture, such as a Sprite.\n *\n * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created.\n */\n createBitmapMask: function (renderable)\n {\n if (renderable === undefined && (this.texture || this.shader))\n {\n // eslint-disable-next-line consistent-this\n renderable = this;\n }\n\n return new BitmapMask(this.scene, renderable);\n },\n\n /**\n * Creates and returns a Geometry Mask. This mask can be used by any Game Object,\n * including this one.\n *\n * To create the mask you need to pass in a reference to a Graphics Game Object.\n *\n * If you do not provide a graphics object, and this Game Object is an instance\n * of a Graphics object, then it will use itself to create the mask.\n * \n * This means you can call this method to create a Geometry Mask from any Graphics Game Object.\n *\n * @method Phaser.GameObjects.Components.Mask#createGeometryMask\n * @since 3.6.2\n * \n * @param {Phaser.GameObjects.Graphics} [graphics] - A Graphics Game Object. The geometry within it will be used as the mask.\n *\n * @return {Phaser.Display.Masks.GeometryMask} This Geometry Mask that was created.\n */\n createGeometryMask: function (graphics)\n {\n if (graphics === undefined && this.type === 'Graphics')\n {\n // eslint-disable-next-line consistent-this\n graphics = this;\n }\n\n return new GeometryMask(this.scene, graphics);\n }\n\n};\n\nmodule.exports = Mask;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for getting and setting the origin of a Game Object.\n * Values are normalized, given in the range 0 to 1.\n * Display values contain the calculated pixel values.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.Origin\n * @since 3.0.0\n */\n\nvar Origin = {\n\n /**\n * A property indicating that a Game Object has this component.\n *\n * @name Phaser.GameObjects.Components.Origin#_originComponent\n * @type {boolean}\n * @private\n * @default true\n * @since 3.2.0\n */\n _originComponent: true,\n\n /**\n * The horizontal origin of this Game Object.\n * The origin maps the relationship between the size and position of the Game Object.\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\n * Setting the value to 0 means the position now relates to the left of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Origin#originX\n * @type {number}\n * @default 0.5\n * @since 3.0.0\n */\n originX: 0.5,\n\n /**\n * The vertical origin of this Game Object.\n * The origin maps the relationship between the size and position of the Game Object.\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\n * Setting the value to 0 means the position now relates to the top of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Origin#originY\n * @type {number}\n * @default 0.5\n * @since 3.0.0\n */\n originY: 0.5,\n\n // private + read only\n _displayOriginX: 0,\n _displayOriginY: 0,\n\n /**\n * The horizontal display origin of this Game Object.\n * The origin is a normalized value between 0 and 1.\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\n *\n * @name Phaser.GameObjects.Components.Origin#displayOriginX\n * @type {number}\n * @since 3.0.0\n */\n displayOriginX: {\n\n get: function ()\n {\n return this._displayOriginX;\n },\n\n set: function (value)\n {\n this._displayOriginX = value;\n this.originX = value / this.width;\n }\n\n },\n\n /**\n * The vertical display origin of this Game Object.\n * The origin is a normalized value between 0 and 1.\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\n *\n * @name Phaser.GameObjects.Components.Origin#displayOriginY\n * @type {number}\n * @since 3.0.0\n */\n displayOriginY: {\n\n get: function ()\n {\n return this._displayOriginY;\n },\n\n set: function (value)\n {\n this._displayOriginY = value;\n this.originY = value / this.height;\n }\n\n },\n\n /**\n * Sets the origin of this Game Object.\n *\n * The values are given in the range 0 to 1.\n *\n * @method Phaser.GameObjects.Components.Origin#setOrigin\n * @since 3.0.0\n *\n * @param {number} [x=0.5] - The horizontal origin value.\n * @param {number} [y=x] - The vertical origin value. If not defined it will be set to the value of `x`.\n *\n * @return {this} This Game Object instance.\n */\n setOrigin: function (x, y)\n {\n if (x === undefined) { x = 0.5; }\n if (y === undefined) { y = x; }\n\n this.originX = x;\n this.originY = y;\n\n return this.updateDisplayOrigin();\n },\n\n /**\n * Sets the origin of this Game Object based on the Pivot values in its Frame.\n *\n * @method Phaser.GameObjects.Components.Origin#setOriginFromFrame\n * @since 3.0.0\n *\n * @return {this} This Game Object instance.\n */\n setOriginFromFrame: function ()\n {\n if (!this.frame || !this.frame.customPivot)\n {\n return this.setOrigin();\n }\n else\n {\n this.originX = this.frame.pivotX;\n this.originY = this.frame.pivotY;\n }\n\n return this.updateDisplayOrigin();\n },\n\n /**\n * Sets the display origin of this Game Object.\n * The difference between this and setting the origin is that you can use pixel values for setting the display origin.\n *\n * @method Phaser.GameObjects.Components.Origin#setDisplayOrigin\n * @since 3.0.0\n *\n * @param {number} [x=0] - The horizontal display origin value.\n * @param {number} [y=x] - The vertical display origin value. If not defined it will be set to the value of `x`.\n *\n * @return {this} This Game Object instance.\n */\n setDisplayOrigin: function (x, y)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = x; }\n\n this.displayOriginX = x;\n this.displayOriginY = y;\n\n return this;\n },\n\n /**\n * Updates the Display Origin cached values internally stored on this Game Object.\n * You don't usually call this directly, but it is exposed for edge-cases where you may.\n *\n * @method Phaser.GameObjects.Components.Origin#updateDisplayOrigin\n * @since 3.0.0\n *\n * @return {this} This Game Object instance.\n */\n updateDisplayOrigin: function ()\n {\n this._displayOriginX = this.originX * this.width;\n this._displayOriginY = this.originY * this.height;\n\n return this;\n }\n\n};\n\nmodule.exports = Origin;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar DegToRad = require('../../math/DegToRad');\nvar GetBoolean = require('../../tweens/builders/GetBoolean');\nvar GetValue = require('../../utils/object/GetValue');\nvar TWEEN_CONST = require('../../tweens/tween/const');\nvar Vector2 = require('../../math/Vector2');\n\n/**\n * Provides methods used for managing a Game Object following a Path.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.PathFollower\n * @since 3.17.0\n */\n\nvar PathFollower = {\n\n /**\n * The Path this PathFollower is following. It can only follow one Path at a time.\n *\n * @name Phaser.GameObjects.Components.PathFollower#path\n * @type {Phaser.Curves.Path}\n * @since 3.0.0\n */\n path: null,\n\n /**\n * Should the PathFollower automatically rotate to point in the direction of the Path?\n *\n * @name Phaser.GameObjects.Components.PathFollower#rotateToPath\n * @type {boolean}\n * @default false\n * @since 3.0.0\n */\n rotateToPath: false,\n\n /**\n * If the PathFollower is rotating to match the Path (@see Phaser.GameObjects.PathFollower#rotateToPath)\n * this value is added to the rotation value. This allows you to rotate objects to a path but control\n * the angle of the rotation as well.\n *\n * @name Phaser.GameObjects.PathFollower#pathRotationOffset\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n pathRotationOffset: 0,\n\n /**\n * An additional vector to add to the PathFollowers position, allowing you to offset it from the\n * Path coordinates.\n *\n * @name Phaser.GameObjects.PathFollower#pathOffset\n * @type {Phaser.Math.Vector2}\n * @since 3.0.0\n */\n pathOffset: null,\n\n /**\n * A Vector2 that stores the current point of the path the follower is on.\n *\n * @name Phaser.GameObjects.PathFollower#pathVector\n * @type {Phaser.Math.Vector2}\n * @since 3.0.0\n */\n pathVector: null,\n\n /**\n * The distance the follower has traveled from the previous point to the current one, at the last update.\n *\n * @name Phaser.GameObjects.PathFollower#pathDelta\n * @type {Phaser.Math.Vector2}\n * @since 3.23.0\n */\n pathDelta: null,\n\n /**\n * The Tween used for following the Path.\n *\n * @name Phaser.GameObjects.PathFollower#pathTween\n * @type {Phaser.Tweens.Tween}\n * @since 3.0.0\n */\n pathTween: null,\n\n /**\n * Settings for the PathFollower.\n *\n * @name Phaser.GameObjects.PathFollower#pathConfig\n * @type {?Phaser.Types.GameObjects.PathFollower.PathConfig}\n * @default null\n * @since 3.0.0\n */\n pathConfig: null,\n\n /**\n * Records the direction of the follower so it can change direction.\n *\n * @name Phaser.GameObjects.PathFollower#_prevDirection\n * @type {integer}\n * @private\n * @since 3.0.0\n */\n _prevDirection: TWEEN_CONST.PLAYING_FORWARD,\n\n /**\n * Set the Path that this PathFollower should follow.\n *\n * Optionally accepts {@link Phaser.Types.GameObjects.PathFollower.PathConfig} settings.\n *\n * @method Phaser.GameObjects.Components.PathFollower#setPath\n * @since 3.0.0\n *\n * @param {Phaser.Curves.Path} path - The Path this PathFollower is following. It can only follow one Path at a time.\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config] - Settings for the PathFollower.\n *\n * @return {this} This Game Object.\n */\n setPath: function (path, config)\n {\n if (config === undefined) { config = this.pathConfig; }\n\n var tween = this.pathTween;\n\n if (tween && tween.isPlaying())\n {\n tween.stop();\n }\n\n this.path = path;\n\n if (config)\n {\n this.startFollow(config);\n }\n\n return this;\n },\n\n /**\n * Set whether the PathFollower should automatically rotate to point in the direction of the Path.\n *\n * @method Phaser.GameObjects.Components.PathFollower#setRotateToPath\n * @since 3.0.0\n *\n * @param {boolean} value - Whether the PathFollower should automatically rotate to point in the direction of the Path.\n * @param {number} [offset=0] - Rotation offset in degrees.\n *\n * @return {this} This Game Object.\n */\n setRotateToPath: function (value, offset)\n {\n if (offset === undefined) { offset = 0; }\n\n this.rotateToPath = value;\n\n this.pathRotationOffset = offset;\n\n return this;\n },\n\n /**\n * Is this PathFollower actively following a Path or not?\n *\n * To be considered as `isFollowing` it must be currently moving on a Path, and not paused.\n *\n * @method Phaser.GameObjects.Components.PathFollower#isFollowing\n * @since 3.0.0\n *\n * @return {boolean} `true` is this PathFollower is actively following a Path, otherwise `false`.\n */\n isFollowing: function ()\n {\n var tween = this.pathTween;\n\n return (tween && tween.isPlaying());\n },\n\n /**\n * Starts this PathFollower following its given Path.\n *\n * @method Phaser.GameObjects.Components.PathFollower#startFollow\n * @since 3.3.0\n *\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config={}] - The duration of the follow, or a PathFollower config object.\n * @param {number} [startAt=0] - Optional start position of the follow, between 0 and 1.\n *\n * @return {this} This Game Object.\n */\n startFollow: function (config, startAt)\n {\n if (config === undefined) { config = {}; }\n if (startAt === undefined) { startAt = 0; }\n\n var tween = this.pathTween;\n\n if (tween && tween.isPlaying())\n {\n tween.stop();\n }\n\n if (typeof config === 'number')\n {\n config = { duration: config };\n }\n\n // Override in case they've been specified in the config\n config.from = GetValue(config, 'from', 0);\n config.to = GetValue(config, 'to', 1);\n\n var positionOnPath = GetBoolean(config, 'positionOnPath', false);\n\n this.rotateToPath = GetBoolean(config, 'rotateToPath', false);\n this.pathRotationOffset = GetValue(config, 'rotationOffset', 0);\n\n // This works, but it's not an ideal way of doing it as the follower jumps position\n var seek = GetValue(config, 'startAt', startAt);\n\n if (seek)\n {\n config.onStart = function (tween)\n {\n var tweenData = tween.data[0];\n tweenData.progress = seek;\n tweenData.elapsed = tweenData.duration * seek;\n var v = tweenData.ease(tweenData.progress);\n tweenData.current = tweenData.start + ((tweenData.end - tweenData.start) * v);\n tweenData.target[tweenData.key] = tweenData.current;\n };\n }\n\n if (!this.pathOffset)\n {\n this.pathOffset = new Vector2(this.x, this.y);\n }\n\n if (!this.pathVector)\n {\n this.pathVector = new Vector2();\n }\n\n if (!this.pathDelta)\n {\n this.pathDelta = new Vector2();\n }\n\n this.pathDelta.reset();\n\n this.pathTween = this.scene.sys.tweens.addCounter(config);\n\n // The starting point of the path, relative to this follower\n this.path.getStartPoint(this.pathOffset);\n\n if (positionOnPath)\n {\n this.x = this.pathOffset.x;\n this.y = this.pathOffset.y;\n }\n\n this.pathOffset.x = this.x - this.pathOffset.x;\n this.pathOffset.y = this.y - this.pathOffset.y;\n\n this._prevDirection = TWEEN_CONST.PLAYING_FORWARD;\n\n if (this.rotateToPath)\n {\n // Set the rotation now (in case the tween has a delay on it, etc)\n var nextPoint = this.path.getPoint(0.1);\n\n this.rotation = Math.atan2(nextPoint.y - this.y, nextPoint.x - this.x) + DegToRad(this.pathRotationOffset);\n }\n\n this.pathConfig = config;\n\n return this;\n },\n\n /**\n * Pauses this PathFollower. It will still continue to render, but it will remain motionless at the\n * point on the Path at which you paused it.\n *\n * @method Phaser.GameObjects.Components.PathFollower#pauseFollow\n * @since 3.3.0\n *\n * @return {this} This Game Object.\n */\n pauseFollow: function ()\n {\n var tween = this.pathTween;\n\n if (tween && tween.isPlaying())\n {\n tween.pause();\n }\n\n return this;\n },\n\n /**\n * Resumes a previously paused PathFollower.\n *\n * If the PathFollower was not paused this has no effect.\n *\n * @method Phaser.GameObjects.Components.PathFollower#resumeFollow\n * @since 3.3.0\n *\n * @return {this} This Game Object.\n */\n resumeFollow: function ()\n {\n var tween = this.pathTween;\n\n if (tween && tween.isPaused())\n {\n tween.resume();\n }\n\n return this;\n },\n\n /**\n * Stops this PathFollower from following the path any longer.\n *\n * This will invoke any 'stop' conditions that may exist on the Path, or for the follower.\n *\n * @method Phaser.GameObjects.Components.PathFollower#stopFollow\n * @since 3.3.0\n *\n * @return {this} This Game Object.\n */\n stopFollow: function ()\n {\n var tween = this.pathTween;\n\n if (tween && tween.isPlaying())\n {\n tween.stop();\n }\n\n return this;\n },\n\n /**\n * Internal update handler that advances this PathFollower along the path.\n *\n * Called automatically by the Scene step, should not typically be called directly.\n *\n * @method Phaser.GameObjects.Components.PathFollower#pathUpdate\n * @since 3.17.0\n */\n pathUpdate: function ()\n {\n var tween = this.pathTween;\n\n if (tween)\n {\n var tweenData = tween.data[0];\n var pathDelta = this.pathDelta;\n var pathVector = this.pathVector;\n\n pathDelta.copy(pathVector).negate();\n\n if (tweenData.state === TWEEN_CONST.COMPLETE)\n {\n this.path.getPoint(1, pathVector);\n\n pathDelta.add(pathVector);\n pathVector.add(this.pathOffset);\n\n this.setPosition(pathVector.x, pathVector.y);\n\n return;\n }\n else if (tweenData.state !== TWEEN_CONST.PLAYING_FORWARD && tweenData.state !== TWEEN_CONST.PLAYING_BACKWARD)\n {\n // If delayed, etc then bail out\n return;\n }\n\n this.path.getPoint(tween.getValue(), pathVector);\n\n pathDelta.add(pathVector);\n pathVector.add(this.pathOffset);\n\n var oldX = this.x;\n var oldY = this.y;\n\n this.setPosition(pathVector.x, pathVector.y);\n\n var speedX = this.x - oldX;\n var speedY = this.y - oldY;\n\n if (speedX === 0 && speedY === 0)\n {\n // Bail out early\n return;\n }\n\n if (tweenData.state !== this._prevDirection)\n {\n // We've changed direction, so don't do a rotate this frame\n this._prevDirection = tweenData.state;\n\n return;\n }\n\n if (this.rotateToPath)\n {\n this.rotation = Math.atan2(speedY, speedX) + DegToRad(this.pathRotationOffset);\n }\n }\n }\n\n};\n\nmodule.exports = PathFollower;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the WebGL rendering pipeline of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.Pipeline\n * @webglOnly\n * @since 3.0.0\n */\n\nvar Pipeline = {\n\n /**\n * The initial WebGL pipeline of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Pipeline#defaultPipeline\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\n * @default null\n * @webglOnly\n * @since 3.0.0\n */\n defaultPipeline: null,\n\n /**\n * The current WebGL pipeline of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Pipeline#pipeline\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\n * @default null\n * @webglOnly\n * @since 3.0.0\n */\n pipeline: null,\n\n /**\n * Sets the initial WebGL Pipeline of this Game Object.\n *\n * This should only be called during the instantiation of the Game Object.\n *\n * @method Phaser.GameObjects.Components.Pipeline#initPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @param {string} [pipelineName=MultiPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Multi Pipeline.\n *\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\n */\n initPipeline: function (pipelineName)\n {\n if (pipelineName === undefined) { pipelineName = 'MultiPipeline'; }\n\n var renderer = this.scene.sys.game.renderer;\n\n if (renderer && renderer.gl && renderer.hasPipeline(pipelineName))\n {\n this.defaultPipeline = renderer.getPipeline(pipelineName);\n this.pipeline = this.defaultPipeline;\n\n return true;\n }\n\n return false;\n },\n\n /**\n * Sets the active WebGL Pipeline of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Pipeline#setPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @param {string} pipelineName - The name of the pipeline to set on this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setPipeline: function (pipelineName)\n {\n var renderer = this.scene.sys.game.renderer;\n\n if (renderer && renderer.gl && renderer.hasPipeline(pipelineName))\n {\n this.pipeline = renderer.getPipeline(pipelineName);\n }\n\n return this;\n },\n\n /**\n * Resets the WebGL Pipeline of this Game Object back to the default it was created with.\n *\n * @method Phaser.GameObjects.Components.Pipeline#resetPipeline\n * @webglOnly\n * @since 3.0.0\n *\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\n */\n resetPipeline: function ()\n {\n this.pipeline = this.defaultPipeline;\n\n return (this.pipeline !== null);\n },\n\n /**\n * Gets the name of the WebGL Pipeline this Game Object is currently using.\n *\n * @method Phaser.GameObjects.Components.Pipeline#getPipelineName\n * @webglOnly\n * @since 3.0.0\n *\n * @return {string} The string-based name of the pipeline being used by this Game Object.\n */\n getPipelineName: function ()\n {\n return this.pipeline.name;\n }\n\n};\n\nmodule.exports = Pipeline;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for getting and setting the Scroll Factor of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.ScrollFactor\n * @since 3.0.0\n */\n\nvar ScrollFactor = {\n\n /**\n * The horizontal scroll factor of this Game Object.\n *\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\n *\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\n * It does not change the Game Objects actual position values.\n *\n * A value of 1 means it will move exactly in sync with a camera.\n * A value of 0 means it will not move at all, even if the camera moves.\n * Other values control the degree to which the camera movement is mapped to this Game Object.\n * \n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\n * calculating physics collisions. Bodies always collide based on their world position, but changing\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\n * them from physics bodies if not accounted for in your code.\n *\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorX\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n scrollFactorX: 1,\n\n /**\n * The vertical scroll factor of this Game Object.\n *\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\n *\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\n * It does not change the Game Objects actual position values.\n *\n * A value of 1 means it will move exactly in sync with a camera.\n * A value of 0 means it will not move at all, even if the camera moves.\n * Other values control the degree to which the camera movement is mapped to this Game Object.\n * \n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\n * calculating physics collisions. Bodies always collide based on their world position, but changing\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\n * them from physics bodies if not accounted for in your code.\n *\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorY\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n scrollFactorY: 1,\n\n /**\n * Sets the scroll factor of this Game Object.\n *\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\n *\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\n * It does not change the Game Objects actual position values.\n *\n * A value of 1 means it will move exactly in sync with a camera.\n * A value of 0 means it will not move at all, even if the camera moves.\n * Other values control the degree to which the camera movement is mapped to this Game Object.\n * \n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\n * calculating physics collisions. Bodies always collide based on their world position, but changing\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\n * them from physics bodies if not accounted for in your code.\n *\n * @method Phaser.GameObjects.Components.ScrollFactor#setScrollFactor\n * @since 3.0.0\n *\n * @param {number} x - The horizontal scroll factor of this Game Object.\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\n *\n * @return {this} This Game Object instance.\n */\n setScrollFactor: function (x, y)\n {\n if (y === undefined) { y = x; }\n\n this.scrollFactorX = x;\n this.scrollFactorY = y;\n\n return this;\n }\n\n};\n\nmodule.exports = ScrollFactor;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for getting and setting the size of a Game Object.\n * \n * @namespace Phaser.GameObjects.Components.Size\n * @since 3.0.0\n */\n\nvar Size = {\n\n /**\n * A property indicating that a Game Object has this component.\n * \n * @name Phaser.GameObjects.Components.Size#_sizeComponent\n * @type {boolean}\n * @private\n * @default true\n * @since 3.2.0\n */\n _sizeComponent: true,\n\n /**\n * The native (un-scaled) width of this Game Object.\n * \n * Changing this value will not change the size that the Game Object is rendered in-game.\n * For that you need to either set the scale of the Game Object (`setScale`) or use\n * the `displayWidth` property.\n * \n * @name Phaser.GameObjects.Components.Size#width\n * @type {number}\n * @since 3.0.0\n */\n width: 0,\n\n /**\n * The native (un-scaled) height of this Game Object.\n * \n * Changing this value will not change the size that the Game Object is rendered in-game.\n * For that you need to either set the scale of the Game Object (`setScale`) or use\n * the `displayHeight` property.\n * \n * @name Phaser.GameObjects.Components.Size#height\n * @type {number}\n * @since 3.0.0\n */\n height: 0,\n\n /**\n * The displayed width of this Game Object.\n * \n * This value takes into account the scale factor.\n * \n * Setting this value will adjust the Game Object's scale property.\n * \n * @name Phaser.GameObjects.Components.Size#displayWidth\n * @type {number}\n * @since 3.0.0\n */\n displayWidth: {\n\n get: function ()\n {\n return Math.abs(this.scaleX * this.frame.realWidth);\n },\n\n set: function (value)\n {\n this.scaleX = value / this.frame.realWidth;\n }\n\n },\n\n /**\n * The displayed height of this Game Object.\n * \n * This value takes into account the scale factor.\n * \n * Setting this value will adjust the Game Object's scale property.\n * \n * @name Phaser.GameObjects.Components.Size#displayHeight\n * @type {number}\n * @since 3.0.0\n */\n displayHeight: {\n\n get: function ()\n {\n return Math.abs(this.scaleY * this.frame.realHeight);\n },\n\n set: function (value)\n {\n this.scaleY = value / this.frame.realHeight;\n }\n\n },\n\n /**\n * Sets the size of this Game Object to be that of the given Frame.\n * \n * This will not change the size that the Game Object is rendered in-game.\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\n * to do so by giving pixel values.\n * \n * If you have enabled this Game Object for input, changing the size will _not_ change the\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\n * \n * @method Phaser.GameObjects.Components.Size#setSizeToFrame\n * @since 3.0.0\n *\n * @param {Phaser.Textures.Frame} frame - The frame to base the size of this Game Object on.\n * \n * @return {this} This Game Object instance.\n */\n setSizeToFrame: function (frame)\n {\n if (frame === undefined) { frame = this.frame; }\n\n this.width = frame.realWidth;\n this.height = frame.realHeight;\n\n return this;\n },\n\n /**\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\n * \n * This will not change the size that the Game Object is rendered in-game.\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\n * to do so by giving pixel values.\n * \n * If you have enabled this Game Object for input, changing the size will _not_ change the\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\n * \n * @method Phaser.GameObjects.Components.Size#setSize\n * @since 3.0.0\n *\n * @param {number} width - The width of this Game Object.\n * @param {number} height - The height of this Game Object.\n * \n * @return {this} This Game Object instance.\n */\n setSize: function (width, height)\n {\n this.width = width;\n this.height = height;\n\n return this;\n },\n\n /**\n * Sets the display size of this Game Object.\n * \n * Calling this will adjust the scale.\n * \n * @method Phaser.GameObjects.Components.Size#setDisplaySize\n * @since 3.0.0\n *\n * @param {number} width - The width of this Game Object.\n * @param {number} height - The height of this Game Object.\n * \n * @return {this} This Game Object instance.\n */\n setDisplaySize: function (width, height)\n {\n this.displayWidth = width;\n this.displayHeight = height;\n\n return this;\n }\n\n};\n\nmodule.exports = Size;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// bitmask flag for GameObject.renderMask\nvar _FLAG = 8; // 1000\n\n/**\n * Provides methods used for getting and setting the texture of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.Texture\n * @since 3.0.0\n */\n\nvar Texture = {\n\n /**\n * The Texture this Game Object is using to render with.\n *\n * @name Phaser.GameObjects.Components.Texture#texture\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\n * @since 3.0.0\n */\n texture: null,\n\n /**\n * The Texture Frame this Game Object is using to render with.\n *\n * @name Phaser.GameObjects.Components.Texture#frame\n * @type {Phaser.Textures.Frame}\n * @since 3.0.0\n */\n frame: null,\n\n /**\n * Internal flag. Not to be set by this Game Object.\n *\n * @name Phaser.GameObjects.Components.Texture#isCropped\n * @type {boolean}\n * @private\n * @since 3.11.0\n */\n isCropped: false,\n\n /**\n * Sets the texture and frame this Game Object will use to render with.\n *\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\n *\n * @method Phaser.GameObjects.Components.Texture#setTexture\n * @since 3.0.0\n *\n * @param {(string|Phaser.Textures.Texture)} key - The key of the texture to be used, as stored in the Texture Manager, or a Texture instance.\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\n *\n * @return {this} This Game Object instance.\n */\n setTexture: function (key, frame)\n {\n this.texture = this.scene.sys.textures.get(key);\n\n return this.setFrame(frame);\n },\n\n /**\n * Sets the frame this Game Object will use to render with.\n *\n * The Frame has to belong to the current Texture being used.\n *\n * It can be either a string or an index.\n *\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\n *\n * @method Phaser.GameObjects.Components.Texture#setFrame\n * @since 3.0.0\n *\n * @param {(string|integer)} frame - The name or index of the frame within the Texture.\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\n *\n * @return {this} This Game Object instance.\n */\n setFrame: function (frame, updateSize, updateOrigin)\n {\n if (updateSize === undefined) { updateSize = true; }\n if (updateOrigin === undefined) { updateOrigin = true; }\n\n this.frame = this.texture.get(frame);\n\n if (!this.frame.cutWidth || !this.frame.cutHeight)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n\n if (this._sizeComponent && updateSize)\n {\n this.setSizeToFrame();\n }\n\n if (this._originComponent && updateOrigin)\n {\n if (this.frame.customPivot)\n {\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\n }\n else\n {\n this.updateDisplayOrigin();\n }\n }\n\n return this;\n }\n\n};\n\nmodule.exports = Texture;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// bitmask flag for GameObject.renderMask\nvar _FLAG = 8; // 1000\n\n/**\n * Provides methods used for getting and setting the texture of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.TextureCrop\n * @since 3.0.0\n */\n\nvar TextureCrop = {\n\n /**\n * The Texture this Game Object is using to render with.\n *\n * @name Phaser.GameObjects.Components.TextureCrop#texture\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\n * @since 3.0.0\n */\n texture: null,\n\n /**\n * The Texture Frame this Game Object is using to render with.\n *\n * @name Phaser.GameObjects.Components.TextureCrop#frame\n * @type {Phaser.Textures.Frame}\n * @since 3.0.0\n */\n frame: null,\n\n /**\n * A boolean flag indicating if this Game Object is being cropped or not.\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\n *\n * @name Phaser.GameObjects.Components.TextureCrop#isCropped\n * @type {boolean}\n * @since 3.11.0\n */\n isCropped: false,\n\n /**\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\n * \n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\n * \n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\n * changes what is shown when rendered.\n * \n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\n * \n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\n * \n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\n * \n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\n * \n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\n * \n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\n * the renderer to skip several internal calculations.\n *\n * @method Phaser.GameObjects.Components.TextureCrop#setCrop\n * @since 3.11.0\n *\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\n * @param {number} [y] - The y coordinate to start the crop from.\n * @param {number} [width] - The width of the crop rectangle in pixels.\n * @param {number} [height] - The height of the crop rectangle in pixels.\n *\n * @return {this} This Game Object instance.\n */\n setCrop: function (x, y, width, height)\n {\n if (x === undefined)\n {\n this.isCropped = false;\n }\n else if (this.frame)\n {\n if (typeof x === 'number')\n {\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\n }\n else\n {\n var rect = x;\n\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\n }\n\n this.isCropped = true;\n }\n\n return this;\n },\n\n /**\n * Sets the texture and frame this Game Object will use to render with.\n *\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\n *\n * @method Phaser.GameObjects.Components.TextureCrop#setTexture\n * @since 3.0.0\n *\n * @param {string} key - The key of the texture to be used, as stored in the Texture Manager.\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\n *\n * @return {this} This Game Object instance.\n */\n setTexture: function (key, frame)\n {\n this.texture = this.scene.sys.textures.get(key);\n\n return this.setFrame(frame);\n },\n\n /**\n * Sets the frame this Game Object will use to render with.\n *\n * The Frame has to belong to the current Texture being used.\n *\n * It can be either a string or an index.\n *\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\n *\n * @method Phaser.GameObjects.Components.TextureCrop#setFrame\n * @since 3.0.0\n *\n * @param {(string|integer)} frame - The name or index of the frame within the Texture.\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\n *\n * @return {this} This Game Object instance.\n */\n setFrame: function (frame, updateSize, updateOrigin)\n {\n if (updateSize === undefined) { updateSize = true; }\n if (updateOrigin === undefined) { updateOrigin = true; }\n\n this.frame = this.texture.get(frame);\n\n if (!this.frame.cutWidth || !this.frame.cutHeight)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n\n if (this._sizeComponent && updateSize)\n {\n this.setSizeToFrame();\n }\n\n if (this._originComponent && updateOrigin)\n {\n if (this.frame.customPivot)\n {\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\n }\n else\n {\n this.updateDisplayOrigin();\n }\n }\n\n if (this.isCropped)\n {\n this.frame.updateCropUVs(this._crop, this.flipX, this.flipY);\n }\n\n return this;\n },\n\n /**\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\n *\n * @method Phaser.GameObjects.Components.TextureCrop#resetCropObject\n * @private\n * @since 3.12.0\n * \n * @return {object} The crop object.\n */\n resetCropObject: function ()\n {\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\n }\n\n};\n\nmodule.exports = TextureCrop;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar GetColorFromValue = require('../../display/color/GetColorFromValue');\n\n/**\n * Provides methods used for setting the tint of a Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.GameObjects.Components.Tint\n * @webglOnly\n * @since 3.0.0\n */\n\nvar Tint = {\n\n /**\n * Private internal value. Holds the top-left tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#_tintTL\n * @type {number}\n * @private\n * @default 16777215\n * @since 3.0.0\n */\n _tintTL: 16777215,\n\n /**\n * Private internal value. Holds the top-right tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#_tintTR\n * @type {number}\n * @private\n * @default 16777215\n * @since 3.0.0\n */\n _tintTR: 16777215,\n\n /**\n * Private internal value. Holds the bottom-left tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#_tintBL\n * @type {number}\n * @private\n * @default 16777215\n * @since 3.0.0\n */\n _tintBL: 16777215,\n\n /**\n * Private internal value. Holds the bottom-right tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#_tintBR\n * @type {number}\n * @private\n * @default 16777215\n * @since 3.0.0\n */\n _tintBR: 16777215,\n\n /**\n * Private internal value. Holds if the Game Object is tinted or not.\n *\n * @name Phaser.GameObjects.Components.Tint#_isTinted\n * @type {boolean}\n * @private\n * @default false\n * @since 3.11.0\n */\n _isTinted: false,\n\n /**\n * Fill or additive?\n *\n * @name Phaser.GameObjects.Components.Tint#tintFill\n * @type {boolean}\n * @default false\n * @since 3.11.0\n */\n tintFill: false,\n\n /**\n * Clears all tint values associated with this Game Object.\n *\n * Immediately sets the color values back to 0xffffff and the tint type to 'additive',\n * which results in no visible change to the texture.\n *\n * @method Phaser.GameObjects.Components.Tint#clearTint\n * @webglOnly\n * @since 3.0.0\n *\n * @return {this} This Game Object instance.\n */\n clearTint: function ()\n {\n this.setTint(0xffffff);\n\n this._isTinted = false;\n\n return this;\n },\n\n /**\n * Sets an additive tint on this Game Object.\n *\n * The tint works by taking the pixel color values from the Game Objects texture, and then\n * multiplying it by the color value of the tint. You can provide either one color value,\n * in which case the whole Game Object will be tinted in that color. Or you can provide a color\n * per corner. The colors are blended together across the extent of the Game Object.\n *\n * To modify the tint color once set, either call this method again with new values or use the\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\n *\n * To remove a tint call `clearTint`.\n *\n * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`.\n *\n * @method Phaser.GameObjects.Components.Tint#setTint\n * @webglOnly\n * @since 3.0.0\n *\n * @param {integer} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object.\n * @param {integer} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {integer} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {integer} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setTint: function (topLeft, topRight, bottomLeft, bottomRight)\n {\n if (topLeft === undefined) { topLeft = 0xffffff; }\n\n if (topRight === undefined)\n {\n topRight = topLeft;\n bottomLeft = topLeft;\n bottomRight = topLeft;\n }\n\n this._tintTL = GetColorFromValue(topLeft);\n this._tintTR = GetColorFromValue(topRight);\n this._tintBL = GetColorFromValue(bottomLeft);\n this._tintBR = GetColorFromValue(bottomRight);\n\n this._isTinted = true;\n\n this.tintFill = false;\n\n return this;\n },\n\n /**\n * Sets a fill-based tint on this Game Object.\n *\n * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture\n * with those in the tint. You can use this for effects such as making a player flash 'white'\n * if hit by something. You can provide either one color value, in which case the whole\n * Game Object will be rendered in that color. Or you can provide a color per corner. The colors\n * are blended together across the extent of the Game Object.\n *\n * To modify the tint color once set, either call this method again with new values or use the\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\n *\n * To remove a tint call `clearTint`.\n *\n * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`.\n *\n * @method Phaser.GameObjects.Components.Tint#setTintFill\n * @webglOnly\n * @since 3.11.0\n *\n * @param {integer} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object.\n * @param {integer} [topRight] - The tint being applied to the top-right of the Game Object.\n * @param {integer} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\n * @param {integer} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setTintFill: function (topLeft, topRight, bottomLeft, bottomRight)\n {\n this.setTint(topLeft, topRight, bottomLeft, bottomRight);\n\n this.tintFill = true;\n\n return this;\n },\n\n /**\n * The tint value being applied to the top-left of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopLeft\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tintTopLeft: {\n\n get: function ()\n {\n return this._tintTL;\n },\n\n set: function (value)\n {\n this._tintTL = GetColorFromValue(value);\n this._isTinted = true;\n }\n\n },\n\n /**\n * The tint value being applied to the top-right of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Tint#tintTopRight\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tintTopRight: {\n\n get: function ()\n {\n return this._tintTR;\n },\n\n set: function (value)\n {\n this._tintTR = GetColorFromValue(value);\n this._isTinted = true;\n }\n\n },\n\n /**\n * The tint value being applied to the bottom-left of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomLeft\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tintBottomLeft: {\n\n get: function ()\n {\n return this._tintBL;\n },\n\n set: function (value)\n {\n this._tintBL = GetColorFromValue(value);\n this._isTinted = true;\n }\n\n },\n\n /**\n * The tint value being applied to the bottom-right of the Game Object.\n * This value is interpolated from the corner to the center of the Game Object.\n *\n * @name Phaser.GameObjects.Components.Tint#tintBottomRight\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tintBottomRight: {\n\n get: function ()\n {\n return this._tintBR;\n },\n\n set: function (value)\n {\n this._tintBR = GetColorFromValue(value);\n this._isTinted = true;\n }\n\n },\n\n /**\n * The tint value being applied to the whole of the Game Object.\n * This property is a setter-only. Use the properties `tintTopLeft` etc to read the current tint value.\n *\n * @name Phaser.GameObjects.Components.Tint#tint\n * @type {integer}\n * @webglOnly\n * @since 3.0.0\n */\n tint: {\n\n set: function (value)\n {\n this.setTint(value, value, value, value);\n }\n },\n\n /**\n * Does this Game Object have a tint applied to it or not?\n *\n * @name Phaser.GameObjects.Components.Tint#isTinted\n * @type {boolean}\n * @webglOnly\n * @readonly\n * @since 3.11.0\n */\n isTinted: {\n\n get: function ()\n {\n return this._isTinted;\n }\n\n }\n\n};\n\nmodule.exports = Tint;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Build a JSON representation of the given Game Object.\n *\n * This is typically extended further by Game Object specific implementations.\n *\n * @method Phaser.GameObjects.Components.ToJSON\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to export as JSON.\n *\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\n */\nvar ToJSON = function (gameObject)\n{\n var out = {\n name: gameObject.name,\n type: gameObject.type,\n x: gameObject.x,\n y: gameObject.y,\n depth: gameObject.depth,\n scale: {\n x: gameObject.scaleX,\n y: gameObject.scaleY\n },\n origin: {\n x: gameObject.originX,\n y: gameObject.originY\n },\n flipX: gameObject.flipX,\n flipY: gameObject.flipY,\n rotation: gameObject.rotation,\n alpha: gameObject.alpha,\n visible: gameObject.visible,\n blendMode: gameObject.blendMode,\n textureKey: '',\n frameKey: '',\n data: {}\n };\n\n if (gameObject.texture)\n {\n out.textureKey = gameObject.texture.key;\n out.frameKey = gameObject.frame.name;\n }\n\n return out;\n};\n\nmodule.exports = ToJSON;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar MATH_CONST = require('../../math/const');\nvar TransformMatrix = require('./TransformMatrix');\nvar TransformXY = require('../../math/TransformXY');\nvar WrapAngle = require('../../math/angle/Wrap');\nvar WrapAngleDegrees = require('../../math/angle/WrapDegrees');\nvar Vector2 = require('../../math/Vector2');\n\n// global bitmask flag for GameObject.renderMask (used by Scale)\nvar _FLAG = 4; // 0100\n\n/**\n * Provides methods used for getting and setting the position, scale and rotation of a Game Object.\n *\n * @namespace Phaser.GameObjects.Components.Transform\n * @since 3.0.0\n */\n\nvar Transform = {\n\n /**\n * Private internal value. Holds the horizontal scale value.\n *\n * @name Phaser.GameObjects.Components.Transform#_scaleX\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _scaleX: 1,\n\n /**\n * Private internal value. Holds the vertical scale value.\n *\n * @name Phaser.GameObjects.Components.Transform#_scaleY\n * @type {number}\n * @private\n * @default 1\n * @since 3.0.0\n */\n _scaleY: 1,\n\n /**\n * Private internal value. Holds the rotation value in radians.\n *\n * @name Phaser.GameObjects.Components.Transform#_rotation\n * @type {number}\n * @private\n * @default 0\n * @since 3.0.0\n */\n _rotation: 0,\n\n /**\n * The x position of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n x: 0,\n\n /**\n * The y position of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n y: 0,\n\n /**\n * The z position of this Game Object.\n *\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\n * {@link Phaser.GameObjects.Components.Depth#depth} instead.\n *\n * @name Phaser.GameObjects.Components.Transform#z\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n z: 0,\n\n /**\n * The w position of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#w\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n w: 0,\n\n /**\n * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object\n * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.\n *\n * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this\n * isn't the case, use the `scaleX` or `scaleY` properties instead.\n *\n * @name Phaser.GameObjects.Components.Transform#scale\n * @type {number}\n * @default 1\n * @since 3.18.0\n */\n scale: {\n\n get: function ()\n {\n return (this._scaleX + this._scaleY) / 2;\n },\n\n set: function (value)\n {\n this._scaleX = value;\n this._scaleY = value;\n\n if (value === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The horizontal scale of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#scaleX\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n scaleX: {\n\n get: function ()\n {\n return this._scaleX;\n },\n\n set: function (value)\n {\n this._scaleX = value;\n\n if (value === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The vertical scale of this Game Object.\n *\n * @name Phaser.GameObjects.Components.Transform#scaleY\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n scaleY: {\n\n get: function ()\n {\n return this._scaleY;\n },\n\n set: function (value)\n {\n this._scaleY = value;\n\n if (value === 0)\n {\n this.renderFlags &= ~_FLAG;\n }\n else\n {\n this.renderFlags |= _FLAG;\n }\n }\n\n },\n\n /**\n * The angle of this Game Object as expressed in degrees.\n *\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left\n * and -90 is up.\n *\n * If you prefer to work in radians, see the `rotation` property instead.\n *\n * @name Phaser.GameObjects.Components.Transform#angle\n * @type {integer}\n * @default 0\n * @since 3.0.0\n */\n angle: {\n\n get: function ()\n {\n return WrapAngleDegrees(this._rotation * MATH_CONST.RAD_TO_DEG);\n },\n\n set: function (value)\n {\n // value is in degrees\n this.rotation = WrapAngleDegrees(value) * MATH_CONST.DEG_TO_RAD;\n }\n },\n\n /**\n * The angle of this Game Object in radians.\n *\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left\n * and -PI/2 is up.\n *\n * If you prefer to work in degrees, see the `angle` property instead.\n *\n * @name Phaser.GameObjects.Components.Transform#rotation\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n rotation: {\n\n get: function ()\n {\n return this._rotation;\n },\n\n set: function (value)\n {\n // value is in radians\n this._rotation = WrapAngle(value);\n }\n },\n\n /**\n * Sets the position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setPosition\n * @since 3.0.0\n *\n * @param {number} [x=0] - The x position of this Game Object.\n * @param {number} [y=x] - The y position of this Game Object. If not set it will use the `x` value.\n * @param {number} [z=0] - The z position of this Game Object.\n * @param {number} [w=0] - The w position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setPosition: function (x, y, z, w)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = x; }\n if (z === undefined) { z = 0; }\n if (w === undefined) { w = 0; }\n\n this.x = x;\n this.y = y;\n this.z = z;\n this.w = w;\n\n return this;\n },\n\n /**\n * Sets the position of this Game Object to be a random position within the confines of\n * the given area.\n *\n * If no area is specified a random position between 0 x 0 and the game width x height is used instead.\n *\n * The position does not factor in the size of this Game Object, meaning that only the origin is\n * guaranteed to be within the area.\n *\n * @method Phaser.GameObjects.Components.Transform#setRandomPosition\n * @since 3.8.0\n *\n * @param {number} [x=0] - The x position of the top-left of the random area.\n * @param {number} [y=0] - The y position of the top-left of the random area.\n * @param {number} [width] - The width of the random area.\n * @param {number} [height] - The height of the random area.\n *\n * @return {this} This Game Object instance.\n */\n setRandomPosition: function (x, y, width, height)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n if (width === undefined) { width = this.scene.sys.scale.width; }\n if (height === undefined) { height = this.scene.sys.scale.height; }\n\n this.x = x + (Math.random() * width);\n this.y = y + (Math.random() * height);\n\n return this;\n },\n\n /**\n * Sets the rotation of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setRotation\n * @since 3.0.0\n *\n * @param {number} [radians=0] - The rotation of this Game Object, in radians.\n *\n * @return {this} This Game Object instance.\n */\n setRotation: function (radians)\n {\n if (radians === undefined) { radians = 0; }\n\n this.rotation = radians;\n\n return this;\n },\n\n /**\n * Sets the angle of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setAngle\n * @since 3.0.0\n *\n * @param {number} [degrees=0] - The rotation of this Game Object, in degrees.\n *\n * @return {this} This Game Object instance.\n */\n setAngle: function (degrees)\n {\n if (degrees === undefined) { degrees = 0; }\n\n this.angle = degrees;\n\n return this;\n },\n\n /**\n * Sets the scale of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setScale\n * @since 3.0.0\n *\n * @param {number} x - The horizontal scale of this Game Object.\n * @param {number} [y=x] - The vertical scale of this Game Object. If not set it will use the `x` value.\n *\n * @return {this} This Game Object instance.\n */\n setScale: function (x, y)\n {\n if (x === undefined) { x = 1; }\n if (y === undefined) { y = x; }\n\n this.scaleX = x;\n this.scaleY = y;\n\n return this;\n },\n\n /**\n * Sets the x position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setX\n * @since 3.0.0\n *\n * @param {number} [value=0] - The x position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setX: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.x = value;\n\n return this;\n },\n\n /**\n * Sets the y position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setY\n * @since 3.0.0\n *\n * @param {number} [value=0] - The y position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setY: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.y = value;\n\n return this;\n },\n\n /**\n * Sets the z position of this Game Object.\n *\n * Note: The z position does not control the rendering order of 2D Game Objects. Use\n * {@link Phaser.GameObjects.Components.Depth#setDepth} instead.\n *\n * @method Phaser.GameObjects.Components.Transform#setZ\n * @since 3.0.0\n *\n * @param {number} [value=0] - The z position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setZ: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.z = value;\n\n return this;\n },\n\n /**\n * Sets the w position of this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#setW\n * @since 3.0.0\n *\n * @param {number} [value=0] - The w position of this Game Object.\n *\n * @return {this} This Game Object instance.\n */\n setW: function (value)\n {\n if (value === undefined) { value = 0; }\n\n this.w = value;\n\n return this;\n },\n\n /**\n * Gets the local transform matrix for this Game Object.\n *\n * @method Phaser.GameObjects.Components.Transform#getLocalTransformMatrix\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\n *\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\n */\n getLocalTransformMatrix: function (tempMatrix)\n {\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\n\n return tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\n },\n\n /**\n * Gets the world transform matrix for this Game Object, factoring in any parent Containers.\n *\n * @method Phaser.GameObjects.Components.Transform#getWorldTransformMatrix\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A temporary matrix to hold parent values during the calculations.\n *\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\n */\n getWorldTransformMatrix: function (tempMatrix, parentMatrix)\n {\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\n if (parentMatrix === undefined) { parentMatrix = new TransformMatrix(); }\n\n var parent = this.parentContainer;\n\n if (!parent)\n {\n return this.getLocalTransformMatrix(tempMatrix);\n }\n\n tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\n\n while (parent)\n {\n parentMatrix.applyITRS(parent.x, parent.y, parent._rotation, parent._scaleX, parent._scaleY);\n\n parentMatrix.multiply(tempMatrix, tempMatrix);\n\n parent = parent.parentContainer;\n }\n\n return tempMatrix;\n },\n\n /**\n * Takes the given `x` and `y` coordinates and converts them into local space for this\n * Game Object, taking into account parent and local transforms, and the Display Origin.\n *\n * The returned Vector2 contains the translated point in its properties.\n *\n * A Camera needs to be provided in order to handle modified scroll factors. If no\n * camera is specified, it will use the `main` camera from the Scene to which this\n * Game Object belongs.\n *\n * @method Phaser.GameObjects.Components.Transform#getLocalPoint\n * @since 3.50.0\n *\n * @param {number} x - The x position to translate.\n * @param {number} y - The y position to translate.\n * @param {Phaser.Math.Vector2} [point] - A Vector2, or point-like object, to store the results in.\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera which is being tested against. If not given will use the Scene default camera.\n *\n * @return {Phaser.Math.Vector2} The translated point.\n */\n getLocalPoint: function (x, y, point, camera)\n {\n if (!point) { point = new Vector2(); }\n if (!camera) { camera = this.scene.sys.cameras.main; }\n\n var csx = camera.scrollX;\n var csy = camera.scrollY;\n\n var px = x + (csx * this.scrollFactorX) - csx;\n var py = y + (csy * this.scrollFactorY) - csy;\n\n if (this.parentContainer)\n {\n this.getWorldTransformMatrix().applyInverse(px, py, point);\n }\n else\n {\n TransformXY(px, py, this.x, this.y, this.rotation, this.scaleX, this.scaleY, point);\n }\n\n // Normalize origin\n if (this._originComponent)\n {\n point.x += this._displayOriginX;\n point.y += this._displayOriginY;\n }\n\n return point;\n },\n\n /**\n * Gets the sum total rotation of all of this Game Objects parent Containers.\n *\n * The returned value is in radians and will be zero if this Game Object has no parent container.\n *\n * @method Phaser.GameObjects.Components.Transform#getParentRotation\n * @since 3.18.0\n *\n * @return {number} The sum total rotation, in radians, of all parent containers of this Game Object.\n */\n getParentRotation: function ()\n {\n var rotation = 0;\n\n var parent = this.parentContainer;\n\n while (parent)\n {\n rotation += parent.rotation;\n\n parent = parent.parentContainer;\n }\n\n return rotation;\n }\n\n};\n\nmodule.exports = Transform;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar MATH_CONST = require('../../math/const');\nvar Vector2 = require('../../math/Vector2');\n\n/**\n * @classdesc\n * A Matrix used for display transformations for rendering.\n *\n * It is represented like so:\n *\n * ```\n * | a | c | tx |\n * | b | d | ty |\n * | 0 | 0 | 1 |\n * ```\n *\n * @class TransformMatrix\n * @memberof Phaser.GameObjects.Components\n * @constructor\n * @since 3.0.0\n *\n * @param {number} [a=1] - The Scale X value.\n * @param {number} [b=0] - The Skew Y value.\n * @param {number} [c=0] - The Skew X value.\n * @param {number} [d=1] - The Scale Y value.\n * @param {number} [tx=0] - The Translate X value.\n * @param {number} [ty=0] - The Translate Y value.\n */\nvar TransformMatrix = new Class({\n\n initialize:\n\n function TransformMatrix (a, b, c, d, tx, ty)\n {\n if (a === undefined) { a = 1; }\n if (b === undefined) { b = 0; }\n if (c === undefined) { c = 0; }\n if (d === undefined) { d = 1; }\n if (tx === undefined) { tx = 0; }\n if (ty === undefined) { ty = 0; }\n\n /**\n * The matrix values.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#matrix\n * @type {Float32Array}\n * @since 3.0.0\n */\n this.matrix = new Float32Array([ a, b, c, d, tx, ty, 0, 0, 1 ]);\n\n /**\n * The decomposed matrix.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#decomposedMatrix\n * @type {object}\n * @since 3.0.0\n */\n this.decomposedMatrix = {\n translateX: 0,\n translateY: 0,\n scaleX: 1,\n scaleY: 1,\n rotation: 0\n };\n },\n\n /**\n * The Scale X value.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#a\n * @type {number}\n * @since 3.4.0\n */\n a: {\n\n get: function ()\n {\n return this.matrix[0];\n },\n\n set: function (value)\n {\n this.matrix[0] = value;\n }\n\n },\n\n /**\n * The Skew Y value.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#b\n * @type {number}\n * @since 3.4.0\n */\n b: {\n\n get: function ()\n {\n return this.matrix[1];\n },\n\n set: function (value)\n {\n this.matrix[1] = value;\n }\n\n },\n\n /**\n * The Skew X value.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#c\n * @type {number}\n * @since 3.4.0\n */\n c: {\n\n get: function ()\n {\n return this.matrix[2];\n },\n\n set: function (value)\n {\n this.matrix[2] = value;\n }\n\n },\n\n /**\n * The Scale Y value.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#d\n * @type {number}\n * @since 3.4.0\n */\n d: {\n\n get: function ()\n {\n return this.matrix[3];\n },\n\n set: function (value)\n {\n this.matrix[3] = value;\n }\n\n },\n\n /**\n * The Translate X value.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#e\n * @type {number}\n * @since 3.11.0\n */\n e: {\n\n get: function ()\n {\n return this.matrix[4];\n },\n\n set: function (value)\n {\n this.matrix[4] = value;\n }\n\n },\n\n /**\n * The Translate Y value.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#f\n * @type {number}\n * @since 3.11.0\n */\n f: {\n\n get: function ()\n {\n return this.matrix[5];\n },\n\n set: function (value)\n {\n this.matrix[5] = value;\n }\n\n },\n\n /**\n * The Translate X value.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#tx\n * @type {number}\n * @since 3.4.0\n */\n tx: {\n\n get: function ()\n {\n return this.matrix[4];\n },\n\n set: function (value)\n {\n this.matrix[4] = value;\n }\n\n },\n\n /**\n * The Translate Y value.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#ty\n * @type {number}\n * @since 3.4.0\n */\n ty: {\n\n get: function ()\n {\n return this.matrix[5];\n },\n\n set: function (value)\n {\n this.matrix[5] = value;\n }\n\n },\n\n /**\n * The rotation of the Matrix. Value is in radians.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#rotation\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n rotation: {\n\n get: function ()\n {\n return Math.acos(this.a / this.scaleX) * ((Math.atan(-this.c / this.a) < 0) ? -1 : 1);\n }\n\n },\n\n /**\n * The rotation of the Matrix, normalized to be within the Phaser right-handed\n * clockwise rotation space. Value is in radians.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#rotationNormalized\n * @type {number}\n * @readonly\n * @since 3.19.0\n */\n rotationNormalized: {\n\n get: function ()\n {\n var matrix = this.matrix;\n\n var a = matrix[0];\n var b = matrix[1];\n var c = matrix[2];\n var d = matrix[3];\n\n if (a || b)\n {\n // var r = Math.sqrt(a * a + b * b);\n \n return (b > 0) ? Math.acos(a / this.scaleX) : -Math.acos(a / this.scaleX);\n }\n else if (c || d)\n {\n // var s = Math.sqrt(c * c + d * d);\n \n return MATH_CONST.TAU - ((d > 0) ? Math.acos(-c / this.scaleY) : -Math.acos(c / this.scaleY));\n }\n else\n {\n return 0;\n }\n }\n\n },\n\n /**\n * The decomposed horizontal scale of the Matrix. This value is always positive.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleX\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n scaleX: {\n\n get: function ()\n {\n return Math.sqrt((this.a * this.a) + (this.b * this.b));\n }\n\n },\n\n /**\n * The decomposed vertical scale of the Matrix. This value is always positive.\n *\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleY\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n scaleY: {\n\n get: function ()\n {\n return Math.sqrt((this.c * this.c) + (this.d * this.d));\n }\n\n },\n\n /**\n * Reset the Matrix to an identity matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#loadIdentity\n * @since 3.0.0\n *\n * @return {this} This TransformMatrix.\n */\n loadIdentity: function ()\n {\n var matrix = this.matrix;\n\n matrix[0] = 1;\n matrix[1] = 0;\n matrix[2] = 0;\n matrix[3] = 1;\n matrix[4] = 0;\n matrix[5] = 0;\n\n return this;\n },\n\n /**\n * Translate the Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#translate\n * @since 3.0.0\n *\n * @param {number} x - The horizontal translation value.\n * @param {number} y - The vertical translation value.\n *\n * @return {this} This TransformMatrix.\n */\n translate: function (x, y)\n {\n var matrix = this.matrix;\n\n matrix[4] = matrix[0] * x + matrix[2] * y + matrix[4];\n matrix[5] = matrix[1] * x + matrix[3] * y + matrix[5];\n\n return this;\n },\n\n /**\n * Scale the Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#scale\n * @since 3.0.0\n *\n * @param {number} x - The horizontal scale value.\n * @param {number} y - The vertical scale value.\n *\n * @return {this} This TransformMatrix.\n */\n scale: function (x, y)\n {\n var matrix = this.matrix;\n\n matrix[0] *= x;\n matrix[1] *= x;\n matrix[2] *= y;\n matrix[3] *= y;\n\n return this;\n },\n\n /**\n * Rotate the Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#rotate\n * @since 3.0.0\n *\n * @param {number} angle - The angle of rotation in radians.\n *\n * @return {this} This TransformMatrix.\n */\n rotate: function (angle)\n {\n var sin = Math.sin(angle);\n var cos = Math.cos(angle);\n\n var matrix = this.matrix;\n\n var a = matrix[0];\n var b = matrix[1];\n var c = matrix[2];\n var d = matrix[3];\n\n matrix[0] = a * cos + c * sin;\n matrix[1] = b * cos + d * sin;\n matrix[2] = a * -sin + c * cos;\n matrix[3] = b * -sin + d * cos;\n\n return this;\n },\n\n /**\n * Multiply this Matrix by the given Matrix.\n * \n * If an `out` Matrix is given then the results will be stored in it.\n * If it is not given, this matrix will be updated in place instead.\n * Use an `out` Matrix if you do not wish to mutate this matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#multiply\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by.\n * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in.\n *\n * @return {(this|Phaser.GameObjects.Components.TransformMatrix)} Either this TransformMatrix, or the `out` Matrix, if given in the arguments.\n */\n multiply: function (rhs, out)\n {\n var matrix = this.matrix;\n var source = rhs.matrix;\n\n var localA = matrix[0];\n var localB = matrix[1];\n var localC = matrix[2];\n var localD = matrix[3];\n var localE = matrix[4];\n var localF = matrix[5];\n\n var sourceA = source[0];\n var sourceB = source[1];\n var sourceC = source[2];\n var sourceD = source[3];\n var sourceE = source[4];\n var sourceF = source[5];\n\n var destinationMatrix = (out === undefined) ? this : out;\n\n destinationMatrix.a = (sourceA * localA) + (sourceB * localC);\n destinationMatrix.b = (sourceA * localB) + (sourceB * localD);\n destinationMatrix.c = (sourceC * localA) + (sourceD * localC);\n destinationMatrix.d = (sourceC * localB) + (sourceD * localD);\n destinationMatrix.e = (sourceE * localA) + (sourceF * localC) + localE;\n destinationMatrix.f = (sourceE * localB) + (sourceF * localD) + localF;\n\n return destinationMatrix;\n },\n\n /**\n * Multiply this Matrix by the matrix given, including the offset.\n * \n * The offsetX is added to the tx value: `offsetX * a + offsetY * c + tx`.\n * The offsetY is added to the ty value: `offsetY * b + offsetY * d + ty`.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#multiplyWithOffset\n * @since 3.11.0\n *\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\n * @param {number} offsetX - Horizontal offset to factor in to the multiplication.\n * @param {number} offsetY - Vertical offset to factor in to the multiplication.\n *\n * @return {this} This TransformMatrix.\n */\n multiplyWithOffset: function (src, offsetX, offsetY)\n {\n var matrix = this.matrix;\n var otherMatrix = src.matrix;\n\n var a0 = matrix[0];\n var b0 = matrix[1];\n var c0 = matrix[2];\n var d0 = matrix[3];\n var tx0 = matrix[4];\n var ty0 = matrix[5];\n\n var pse = offsetX * a0 + offsetY * c0 + tx0;\n var psf = offsetX * b0 + offsetY * d0 + ty0;\n\n var a1 = otherMatrix[0];\n var b1 = otherMatrix[1];\n var c1 = otherMatrix[2];\n var d1 = otherMatrix[3];\n var tx1 = otherMatrix[4];\n var ty1 = otherMatrix[5];\n\n matrix[0] = a1 * a0 + b1 * c0;\n matrix[1] = a1 * b0 + b1 * d0;\n matrix[2] = c1 * a0 + d1 * c0;\n matrix[3] = c1 * b0 + d1 * d0;\n matrix[4] = tx1 * a0 + ty1 * c0 + pse;\n matrix[5] = tx1 * b0 + ty1 * d0 + psf;\n\n return this;\n },\n\n /**\n * Transform the Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#transform\n * @since 3.0.0\n *\n * @param {number} a - The Scale X value.\n * @param {number} b - The Shear Y value.\n * @param {number} c - The Shear X value.\n * @param {number} d - The Scale Y value.\n * @param {number} tx - The Translate X value.\n * @param {number} ty - The Translate Y value.\n *\n * @return {this} This TransformMatrix.\n */\n transform: function (a, b, c, d, tx, ty)\n {\n var matrix = this.matrix;\n\n var a0 = matrix[0];\n var b0 = matrix[1];\n var c0 = matrix[2];\n var d0 = matrix[3];\n var tx0 = matrix[4];\n var ty0 = matrix[5];\n\n matrix[0] = a * a0 + b * c0;\n matrix[1] = a * b0 + b * d0;\n matrix[2] = c * a0 + d * c0;\n matrix[3] = c * b0 + d * d0;\n matrix[4] = tx * a0 + ty * c0 + tx0;\n matrix[5] = tx * b0 + ty * d0 + ty0;\n\n return this;\n },\n\n /**\n * Transform a point using this Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#transformPoint\n * @since 3.0.0\n *\n * @param {number} x - The x coordinate of the point to transform.\n * @param {number} y - The y coordinate of the point to transform.\n * @param {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} point - The Point object to store the transformed coordinates.\n *\n * @return {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} The Point containing the transformed coordinates.\n */\n transformPoint: function (x, y, point)\n {\n if (point === undefined) { point = { x: 0, y: 0 }; }\n\n var matrix = this.matrix;\n\n var a = matrix[0];\n var b = matrix[1];\n var c = matrix[2];\n var d = matrix[3];\n var tx = matrix[4];\n var ty = matrix[5];\n\n point.x = x * a + y * c + tx;\n point.y = x * b + y * d + ty;\n\n return point;\n },\n\n /**\n * Invert the Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#invert\n * @since 3.0.0\n *\n * @return {this} This TransformMatrix.\n */\n invert: function ()\n {\n var matrix = this.matrix;\n\n var a = matrix[0];\n var b = matrix[1];\n var c = matrix[2];\n var d = matrix[3];\n var tx = matrix[4];\n var ty = matrix[5];\n\n var n = a * d - b * c;\n\n matrix[0] = d / n;\n matrix[1] = -b / n;\n matrix[2] = -c / n;\n matrix[3] = a / n;\n matrix[4] = (c * ty - d * tx) / n;\n matrix[5] = -(a * ty - b * tx) / n;\n\n return this;\n },\n\n /**\n * Set the values of this Matrix to copy those of the matrix given.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFrom\n * @since 3.11.0\n *\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\n *\n * @return {this} This TransformMatrix.\n */\n copyFrom: function (src)\n {\n var matrix = this.matrix;\n\n matrix[0] = src.a;\n matrix[1] = src.b;\n matrix[2] = src.c;\n matrix[3] = src.d;\n matrix[4] = src.e;\n matrix[5] = src.f;\n\n return this;\n },\n\n /**\n * Set the values of this Matrix to copy those of the array given.\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFromArray\n * @since 3.11.0\n *\n * @param {array} src - The array of values to set into this matrix.\n *\n * @return {this} This TransformMatrix.\n */\n copyFromArray: function (src)\n {\n var matrix = this.matrix;\n\n matrix[0] = src[0];\n matrix[1] = src[1];\n matrix[2] = src[2];\n matrix[3] = src[3];\n matrix[4] = src[4];\n matrix[5] = src[5];\n\n return this;\n },\n\n /**\n * Copy the values from this Matrix to the given Canvas Rendering Context.\n * This will use the Context.transform method.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToContext\n * @since 3.12.0\n *\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\n *\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\n */\n copyToContext: function (ctx)\n {\n var matrix = this.matrix;\n\n ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\n\n return ctx;\n },\n\n /**\n * Copy the values from this Matrix to the given Canvas Rendering Context.\n * This will use the Context.setTransform method.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#setToContext\n * @since 3.12.0\n *\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\n *\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\n */\n setToContext: function (ctx)\n {\n var matrix = this.matrix;\n\n ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\n\n return ctx;\n },\n\n /**\n * Copy the values in this Matrix to the array given.\n * \n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToArray\n * @since 3.12.0\n *\n * @param {array} [out] - The array to copy the matrix values in to.\n *\n * @return {array} An array where elements 0 to 5 contain the values from this matrix.\n */\n copyToArray: function (out)\n {\n var matrix = this.matrix;\n\n if (out === undefined)\n {\n out = [ matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5] ];\n }\n else\n {\n out[0] = matrix[0];\n out[1] = matrix[1];\n out[2] = matrix[2];\n out[3] = matrix[3];\n out[4] = matrix[4];\n out[5] = matrix[5];\n }\n\n return out;\n },\n\n /**\n * Set the values of this Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#setTransform\n * @since 3.0.0\n *\n * @param {number} a - The Scale X value.\n * @param {number} b - The Shear Y value.\n * @param {number} c - The Shear X value.\n * @param {number} d - The Scale Y value.\n * @param {number} tx - The Translate X value.\n * @param {number} ty - The Translate Y value.\n *\n * @return {this} This TransformMatrix.\n */\n setTransform: function (a, b, c, d, tx, ty)\n {\n var matrix = this.matrix;\n\n matrix[0] = a;\n matrix[1] = b;\n matrix[2] = c;\n matrix[3] = d;\n matrix[4] = tx;\n matrix[5] = ty;\n\n return this;\n },\n\n /**\n * Decompose this Matrix into its translation, scale and rotation values using QR decomposition.\n * \n * The result must be applied in the following order to reproduce the current matrix:\n * \n * translate -> rotate -> scale\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#decomposeMatrix\n * @since 3.0.0\n *\n * @return {object} The decomposed Matrix.\n */\n decomposeMatrix: function ()\n {\n var decomposedMatrix = this.decomposedMatrix;\n\n var matrix = this.matrix;\n\n // a = scale X (1)\n // b = shear Y (0)\n // c = shear X (0)\n // d = scale Y (1)\n\n var a = matrix[0];\n var b = matrix[1];\n var c = matrix[2];\n var d = matrix[3];\n\n var determ = a * d - b * c;\n\n decomposedMatrix.translateX = matrix[4];\n decomposedMatrix.translateY = matrix[5];\n\n if (a || b)\n {\n var r = Math.sqrt(a * a + b * b);\n\n decomposedMatrix.rotation = (b > 0) ? Math.acos(a / r) : -Math.acos(a / r);\n decomposedMatrix.scaleX = r;\n decomposedMatrix.scaleY = determ / r;\n }\n else if (c || d)\n {\n var s = Math.sqrt(c * c + d * d);\n\n decomposedMatrix.rotation = Math.PI * 0.5 - (d > 0 ? Math.acos(-c / s) : -Math.acos(c / s));\n decomposedMatrix.scaleX = determ / s;\n decomposedMatrix.scaleY = s;\n }\n else\n {\n decomposedMatrix.rotation = 0;\n decomposedMatrix.scaleX = 0;\n decomposedMatrix.scaleY = 0;\n }\n\n return decomposedMatrix;\n },\n\n /**\n * Apply the identity, translate, rotate and scale operations on the Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#applyITRS\n * @since 3.0.0\n *\n * @param {number} x - The horizontal translation.\n * @param {number} y - The vertical translation.\n * @param {number} rotation - The angle of rotation in radians.\n * @param {number} scaleX - The horizontal scale.\n * @param {number} scaleY - The vertical scale.\n *\n * @return {this} This TransformMatrix.\n */\n applyITRS: function (x, y, rotation, scaleX, scaleY)\n {\n var matrix = this.matrix;\n\n var radianSin = Math.sin(rotation);\n var radianCos = Math.cos(rotation);\n\n // Translate\n matrix[4] = x;\n matrix[5] = y;\n\n // Rotate and Scale\n matrix[0] = radianCos * scaleX;\n matrix[1] = radianSin * scaleX;\n matrix[2] = -radianSin * scaleY;\n matrix[3] = radianCos * scaleY;\n\n return this;\n },\n\n /**\n * Takes the `x` and `y` values and returns a new position in the `output` vector that is the inverse of\n * the current matrix with its transformation applied.\n * \n * Can be used to translate points from world to local space.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#applyInverse\n * @since 3.12.0\n *\n * @param {number} x - The x position to translate.\n * @param {number} y - The y position to translate.\n * @param {Phaser.Math.Vector2} [output] - A Vector2, or point-like object, to store the results in.\n *\n * @return {Phaser.Math.Vector2} The coordinates, inverse-transformed through this matrix.\n */\n applyInverse: function (x, y, output)\n {\n if (output === undefined) { output = new Vector2(); }\n\n var matrix = this.matrix;\n\n var a = matrix[0];\n var b = matrix[1];\n var c = matrix[2];\n var d = matrix[3];\n var tx = matrix[4];\n var ty = matrix[5];\n\n var id = 1 / ((a * d) + (c * -b));\n\n output.x = (d * id * x) + (-c * id * y) + (((ty * c) - (tx * d)) * id);\n output.y = (a * id * y) + (-b * id * x) + (((-ty * a) + (tx * b)) * id);\n\n return output;\n },\n\n /**\n * Returns the X component of this matrix multiplied by the given values.\n * This is the same as `x * a + y * c + e`.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#getX\n * @since 3.12.0\n * \n * @param {number} x - The x value.\n * @param {number} y - The y value.\n *\n * @return {number} The calculated x value.\n */\n getX: function (x, y)\n {\n return x * this.a + y * this.c + this.e;\n },\n\n /**\n * Returns the Y component of this matrix multiplied by the given values.\n * This is the same as `x * b + y * d + f`.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#getY\n * @since 3.12.0\n * \n * @param {number} x - The x value.\n * @param {number} y - The y value.\n *\n * @return {number} The calculated y value.\n */\n getY: function (x, y)\n {\n return x * this.b + y * this.d + this.f;\n },\n\n /**\n * Returns the X component of this matrix multiplied by the given values.\n * \n * This is the same as `x * a + y * c + e`, optionally passing via `Math.round`.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#getXRound\n * @since 3.50.0\n * \n * @param {number} x - The x value.\n * @param {number} y - The y value.\n * @param {boolean} [round=false] - Math.round the resulting value?\n *\n * @return {number} The calculated x value.\n */\n getXRound: function (x, y, round)\n {\n var v = this.getX(x, y);\n\n if (round)\n {\n v = Math.round(v);\n }\n\n return v;\n },\n\n /**\n * Returns the Y component of this matrix multiplied by the given values.\n * \n * This is the same as `x * b + y * d + f`, optionally passing via `Math.round`.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#getYRound\n * @since 3.50.0\n * \n * @param {number} x - The x value.\n * @param {number} y - The y value.\n * @param {boolean} [round=false] - Math.round the resulting value?\n *\n * @return {number} The calculated y value.\n */\n getYRound: function (x, y, round)\n {\n var v = this.getY(x, y);\n\n if (round)\n {\n v = Math.round(v);\n }\n\n return v;\n },\n\n /**\n * Returns a string that can be used in a CSS Transform call as a `matrix` property.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#getCSSMatrix\n * @since 3.12.0\n *\n * @return {string} A string containing the CSS Transform matrix values.\n */\n getCSSMatrix: function ()\n {\n var m = this.matrix;\n\n return 'matrix(' + m[0] + ',' + m[1] + ',' + m[2] + ',' + m[3] + ',' + m[4] + ',' + m[5] + ')';\n },\n\n /**\n * Destroys this Transform Matrix.\n *\n * @method Phaser.GameObjects.Components.TransformMatrix#destroy\n * @since 3.4.0\n */\n destroy: function ()\n {\n this.matrix = null;\n this.decomposedMatrix = null;\n }\n\n});\n\nmodule.exports = TransformMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// bitmask flag for GameObject.renderMask\nvar _FLAG = 1; // 0001\n\n/**\n * Provides methods used for setting the visibility of a Game Object.\n * Should be applied as a mixin and not used directly.\n * \n * @namespace Phaser.GameObjects.Components.Visible\n * @since 3.0.0\n */\n\nvar Visible = {\n\n /**\n * Private internal value. Holds the visible value.\n * \n * @name Phaser.GameObjects.Components.Visible#_visible\n * @type {boolean}\n * @private\n * @default true\n * @since 3.0.0\n */\n _visible: true,\n\n /**\n * The visible state of the Game Object.\n * \n * An invisible Game Object will skip rendering, but will still process update logic.\n * \n * @name Phaser.GameObjects.Components.Visible#visible\n * @type {boolean}\n * @since 3.0.0\n */\n visible: {\n\n get: function ()\n {\n return this._visible;\n },\n\n set: function (value)\n {\n if (value)\n {\n this._visible = true;\n this.renderFlags |= _FLAG;\n }\n else\n {\n this._visible = false;\n this.renderFlags &= ~_FLAG;\n }\n }\n\n },\n\n /**\n * Sets the visibility of this Game Object.\n * \n * An invisible Game Object will skip rendering, but will still process update logic.\n *\n * @method Phaser.GameObjects.Components.Visible#setVisible\n * @since 3.0.0\n *\n * @param {boolean} value - The visible state of the Game Object.\n * \n * @return {this} This Game Object instance.\n */\n setVisible: function (value)\n {\n this.visible = value;\n\n return this;\n }\n};\n\nmodule.exports = Visible;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.GameObjects.Components\n */\n\nmodule.exports = {\n\n Alpha: require('./Alpha'),\n AlphaSingle: require('./AlphaSingle'),\n Animation: require('./Animation'),\n BlendMode: require('./BlendMode'),\n ComputedSize: require('./ComputedSize'),\n Crop: require('./Crop'),\n Depth: require('./Depth'),\n Flip: require('./Flip'),\n GetBounds: require('./GetBounds'),\n Mask: require('./Mask'),\n Origin: require('./Origin'),\n PathFollower: require('./PathFollower'),\n Pipeline: require('./Pipeline'),\n ScrollFactor: require('./ScrollFactor'),\n Size: require('./Size'),\n Texture: require('./Texture'),\n TextureCrop: require('./TextureCrop'),\n Tint: require('./Tint'),\n ToJSON: require('./ToJSON'),\n Transform: require('./Transform'),\n TransformMatrix: require('./TransformMatrix'),\n Visible: require('./Visible')\n\n};\n","/**\n * @author Richard Davey \n * @author Felipe Alfonso <@bitnenfer>\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar ArrayUtils = require('../../utils/array');\nvar BlendModes = require('../../renderer/BlendModes');\nvar Class = require('../../utils/Class');\nvar Components = require('../components');\nvar Events = require('../events');\nvar GameObject = require('../GameObject');\nvar GameObjectEvents = require('../events');\nvar Rectangle = require('../../geom/rectangle/Rectangle');\nvar Render = require('./ContainerRender');\nvar Union = require('../../geom/rectangle/Union');\nvar Vector2 = require('../../math/Vector2');\n\n/**\n * @classdesc\n * A Container Game Object.\n *\n * A Container, as the name implies, can 'contain' other types of Game Object.\n * When a Game Object is added to a Container, the Container becomes responsible for the rendering of it.\n * By default it will be removed from the Display List and instead added to the Containers own internal list.\n *\n * The position of the Game Object automatically becomes relative to the position of the Container.\n *\n * The origin of a Container is 0x0 (in local space) and that cannot be changed. The children you add to the\n * Container should be positioned with this value in mind. I.e. you should treat 0x0 as being the center of\n * the Container, and position children positively and negative around it as required.\n *\n * When the Container is rendered, all of its children are rendered as well, in the order in which they exist\n * within the Container. Container children can be repositioned using methods such as `MoveUp`, `MoveDown` and `SendToBack`.\n *\n * If you modify a transform property of the Container, such as `Container.x` or `Container.rotation` then it will\n * automatically influence all children as well.\n *\n * Containers can include other Containers for deeply nested transforms.\n *\n * Containers can have masks set on them and can be used as a mask too. However, Container children cannot be masked.\n * The masks do not 'stack up'. Only a Container on the root of the display list will use its mask.\n *\n * Containers can be enabled for input. Because they do not have a texture you need to provide a shape for them\n * to use as their hit area. Container children can also be enabled for input, independent of the Container.\n *\n * Containers can be given a physics body for either Arcade Physics, Impact Physics or Matter Physics. However,\n * if Container _children_ are enabled for physics you may get unexpected results, such as offset bodies,\n * if the Container itself, or any of its ancestors, is positioned anywhere other than at 0 x 0. Container children\n * with physics do not factor in the Container due to the excessive extra calculations needed. Please structure\n * your game to work around this.\n *\n * It's important to understand the impact of using Containers. They add additional processing overhead into\n * every one of their children. The deeper you nest them, the more the cost escalates. This is especially true\n * for input events. You also loose the ability to set the display depth of Container children in the same\n * flexible manner as those not within them. In short, don't use them for the sake of it. You pay a small cost\n * every time you create one, try to structure your game around avoiding that where possible.\n *\n * @class Container\n * @extends Phaser.GameObjects.GameObject\n * @memberof Phaser.GameObjects\n * @constructor\n * @since 3.4.0\n *\n * @extends Phaser.GameObjects.Components.AlphaSingle\n * @extends Phaser.GameObjects.Components.BlendMode\n * @extends Phaser.GameObjects.Components.ComputedSize\n * @extends Phaser.GameObjects.Components.Depth\n * @extends Phaser.GameObjects.Components.Mask\n * @extends Phaser.GameObjects.Components.Transform\n * @extends Phaser.GameObjects.Components.Visible\n *\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\n * @param {Phaser.GameObjects.GameObject[]} [children] - An optional array of Game Objects to add to this Container.\n */\nvar Container = new Class({\n\n Extends: GameObject,\n\n Mixins: [\n Components.AlphaSingle,\n Components.BlendMode,\n Components.ComputedSize,\n Components.Depth,\n Components.Mask,\n Components.Transform,\n Components.Visible,\n Render\n ],\n\n initialize:\n\n function Container (scene, x, y, children)\n {\n GameObject.call(this, scene, 'Container');\n\n /**\n * An array holding the children of this Container.\n *\n * @name Phaser.GameObjects.Container#list\n * @type {Phaser.GameObjects.GameObject[]}\n * @since 3.4.0\n */\n this.list = [];\n\n /**\n * Does this Container exclusively manage its children?\n *\n * The default is `true` which means a child added to this Container cannot\n * belong in another Container, which includes the Scene display list.\n *\n * If you disable this then this Container will no longer exclusively manage its children.\n * This allows you to create all kinds of interesting graphical effects, such as replicating\n * Game Objects without reparenting them all over the Scene.\n * However, doing so will prevent children from receiving any kind of input event or have\n * their physics bodies work by default, as they're no longer a single entity on the\n * display list, but are being replicated where-ever this Container is.\n *\n * @name Phaser.GameObjects.Container#exclusive\n * @type {boolean}\n * @default true\n * @since 3.4.0\n */\n this.exclusive = true;\n\n /**\n * Containers can have an optional maximum size. If set to anything above 0 it\n * will constrict the addition of new Game Objects into the Container, capping off\n * the maximum limit the Container can grow in size to.\n *\n * @name Phaser.GameObjects.Container#maxSize\n * @type {integer}\n * @default -1\n * @since 3.4.0\n */\n this.maxSize = -1;\n\n /**\n * The cursor position.\n *\n * @name Phaser.GameObjects.Container#position\n * @type {integer}\n * @since 3.4.0\n */\n this.position = 0;\n\n /**\n * Internal Transform Matrix used for local space conversion.\n *\n * @name Phaser.GameObjects.Container#localTransform\n * @type {Phaser.GameObjects.Components.TransformMatrix}\n * @since 3.4.0\n */\n this.localTransform = new Components.TransformMatrix();\n\n /**\n * Internal temporary Transform Matrix used to avoid object creation.\n *\n * @name Phaser.GameObjects.Container#tempTransformMatrix\n * @type {Phaser.GameObjects.Components.TransformMatrix}\n * @private\n * @since 3.4.0\n */\n this.tempTransformMatrix = new Components.TransformMatrix();\n\n /**\n * A reference to the Scene Display List.\n *\n * @name Phaser.GameObjects.Container#_displayList\n * @type {Phaser.GameObjects.DisplayList}\n * @private\n * @since 3.4.0\n */\n this._displayList = scene.sys.displayList;\n\n /**\n * The property key to sort by.\n *\n * @name Phaser.GameObjects.Container#_sortKey\n * @type {string}\n * @private\n * @since 3.4.0\n */\n this._sortKey = '';\n\n /**\n * A reference to the Scene Systems Event Emitter.\n *\n * @name Phaser.GameObjects.Container#_sysEvents\n * @type {Phaser.Events.EventEmitter}\n * @private\n * @since 3.9.0\n */\n this._sysEvents = scene.sys.events;\n\n /**\n * The horizontal scroll factor of this Container.\n *\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\n *\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\n * It does not change the Containers actual position values.\n *\n * For a Container, setting this value will only update the Container itself, not its children.\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\n *\n * A value of 1 means it will move exactly in sync with a camera.\n * A value of 0 means it will not move at all, even if the camera moves.\n * Other values control the degree to which the camera movement is mapped to this Container.\n *\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\n * calculating physics collisions. Bodies always collide based on their world position, but changing\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\n * them from physics bodies if not accounted for in your code.\n *\n * @name Phaser.GameObjects.Container#scrollFactorX\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n this.scrollFactorX = 1;\n\n /**\n * The vertical scroll factor of this Container.\n *\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\n *\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\n * It does not change the Containers actual position values.\n *\n * For a Container, setting this value will only update the Container itself, not its children.\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\n *\n * A value of 1 means it will move exactly in sync with a camera.\n * A value of 0 means it will not move at all, even if the camera moves.\n * Other values control the degree to which the camera movement is mapped to this Container.\n *\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\n * calculating physics collisions. Bodies always collide based on their world position, but changing\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\n * them from physics bodies if not accounted for in your code.\n *\n * @name Phaser.GameObjects.Container#scrollFactorY\n * @type {number}\n * @default 1\n * @since 3.0.0\n */\n this.scrollFactorY = 1;\n\n this.setPosition(x, y);\n\n this.clearAlpha();\n\n this.setBlendMode(BlendModes.SKIP_CHECK);\n\n if (children)\n {\n this.add(children);\n }\n },\n\n /**\n * Internal value to allow Containers to be used for input and physics.\n * Do not change this value. It has no effect other than to break things.\n *\n * @name Phaser.GameObjects.Container#originX\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n originX: {\n\n get: function ()\n {\n return 0.5;\n }\n\n },\n\n /**\n * Internal value to allow Containers to be used for input and physics.\n * Do not change this value. It has no effect other than to break things.\n *\n * @name Phaser.GameObjects.Container#originY\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n originY: {\n\n get: function ()\n {\n return 0.5;\n }\n\n },\n\n /**\n * Internal value to allow Containers to be used for input and physics.\n * Do not change this value. It has no effect other than to break things.\n *\n * @name Phaser.GameObjects.Container#displayOriginX\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n displayOriginX: {\n\n get: function ()\n {\n return this.width * 0.5;\n }\n\n },\n\n /**\n * Internal value to allow Containers to be used for input and physics.\n * Do not change this value. It has no effect other than to break things.\n *\n * @name Phaser.GameObjects.Container#displayOriginY\n * @type {number}\n * @readonly\n * @since 3.4.0\n */\n displayOriginY: {\n\n get: function ()\n {\n return this.height * 0.5;\n }\n\n },\n\n /**\n * Does this Container exclusively manage its children?\n *\n * The default is `true` which means a child added to this Container cannot\n * belong in another Container, which includes the Scene display list.\n *\n * If you disable this then this Container will no longer exclusively manage its children.\n * This allows you to create all kinds of interesting graphical effects, such as replicating\n * Game Objects without reparenting them all over the Scene.\n * However, doing so will prevent children from receiving any kind of input event or have\n * their physics bodies work by default, as they're no longer a single entity on the\n * display list, but are being replicated where-ever this Container is.\n *\n * @method Phaser.GameObjects.Container#setExclusive\n * @since 3.4.0\n *\n * @param {boolean} [value=true] - The exclusive state of this Container.\n *\n * @return {this} This Container.\n */\n setExclusive: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.exclusive = value;\n\n return this;\n },\n\n /**\n * Gets the bounds of this Container. It works by iterating all children of the Container,\n * getting their respective bounds, and then working out a min-max rectangle from that.\n * It does not factor in if the children render or not, all are included.\n *\n * Some children are unable to return their bounds, such as Graphics objects, in which case\n * they are skipped.\n *\n * Depending on the quantity of children in this Container it could be a really expensive call,\n * so cache it and only poll it as needed.\n *\n * The values are stored and returned in a Rectangle object.\n *\n * @method Phaser.GameObjects.Container#getBounds\n * @since 3.4.0\n *\n * @param {Phaser.Geom.Rectangle} [output] - A Geom.Rectangle object to store the values in. If not provided a new Rectangle will be created.\n *\n * @return {Phaser.Geom.Rectangle} The values stored in the output object.\n */\n getBounds: function (output)\n {\n if (output === undefined) { output = new Rectangle(); }\n\n output.setTo(this.x, this.y, 0, 0);\n\n if (this.parentContainer)\n {\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\n var transformedPosition = parentMatrix.transformPoint(this.x, this.y);\n\n output.setTo(transformedPosition.x, transformedPosition.y, 0, 0);\n }\n\n if (this.list.length > 0)\n {\n var children = this.list;\n var tempRect = new Rectangle();\n var hasSetFirst = false;\n\n output.setEmpty();\n\n for (var i = 0; i < children.length; i++)\n {\n var entry = children[i];\n\n if (entry.getBounds)\n {\n entry.getBounds(tempRect);\n\n if (!hasSetFirst)\n {\n output.setTo(tempRect.x, tempRect.y, tempRect.width, tempRect.height);\n hasSetFirst = true;\n }\n else\n {\n Union(tempRect, output, output);\n }\n }\n }\n }\n\n return output;\n },\n\n /**\n * Internal add handler.\n *\n * @method Phaser.GameObjects.Container#addHandler\n * @private\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just added to this Container.\n */\n addHandler: function (gameObject)\n {\n gameObject.once(Events.DESTROY, this.remove, this);\n\n if (this.exclusive)\n {\n this._displayList.remove(gameObject);\n\n if (gameObject.parentContainer)\n {\n gameObject.parentContainer.remove(gameObject);\n }\n\n gameObject.parentContainer = this;\n }\n\n // Is only on the Display List via this Container\n if (!this.scene.sys.displayList.exists(gameObject))\n {\n gameObject.emit(GameObjectEvents.ADDED_TO_SCENE, gameObject, this.scene);\n }\n },\n\n /**\n * Internal remove handler.\n *\n * @method Phaser.GameObjects.Container#removeHandler\n * @private\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just removed from this Container.\n */\n removeHandler: function (gameObject)\n {\n gameObject.off(Events.DESTROY, this.remove);\n\n if (this.exclusive)\n {\n gameObject.parentContainer = null;\n }\n\n // Is only on the Display List via this Container\n if (!this.scene.sys.displayList.exists(gameObject))\n {\n gameObject.emit(GameObjectEvents.REMOVED_FROM_SCENE, gameObject, this.scene);\n }\n },\n\n /**\n * Takes a Point-like object, such as a Vector2, Geom.Point or object with public x and y properties,\n * and transforms it into the space of this Container, then returns it in the output object.\n *\n * @method Phaser.GameObjects.Container#pointToContainer\n * @since 3.4.0\n *\n * @param {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} source - The Source Point to be transformed.\n * @param {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} [output] - A destination object to store the transformed point in. If none given a Vector2 will be created and returned.\n *\n * @return {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} The transformed point.\n */\n pointToContainer: function (source, output)\n {\n if (output === undefined) { output = new Vector2(); }\n\n if (this.parentContainer)\n {\n this.parentContainer.pointToContainer(source, output);\n }\n else\n {\n output = new Vector2(source.x, source.y);\n }\n\n var tempMatrix = this.tempTransformMatrix;\n\n // No need to loadIdentity because applyITRS overwrites every value anyway\n tempMatrix.applyITRS(this.x, this.y, this.rotation, this.scaleX, this.scaleY);\n\n tempMatrix.invert();\n\n tempMatrix.transformPoint(source.x, source.y, output);\n\n return output;\n },\n\n /**\n * Returns the world transform matrix as used for Bounds checks.\n *\n * The returned matrix is temporal and shouldn't be stored.\n *\n * @method Phaser.GameObjects.Container#getBoundsTransformMatrix\n * @since 3.4.0\n *\n * @return {Phaser.GameObjects.Components.TransformMatrix} The world transform matrix.\n */\n getBoundsTransformMatrix: function ()\n {\n return this.getWorldTransformMatrix(this.tempTransformMatrix, this.localTransform);\n },\n\n /**\n * Adds the given Game Object, or array of Game Objects, to this Container.\n *\n * Each Game Object must be unique within the Container.\n *\n * @method Phaser.GameObjects.Container#add\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\n *\n * @return {this} This Container instance.\n */\n add: function (child)\n {\n ArrayUtils.Add(this.list, child, this.maxSize, this.addHandler, this);\n\n return this;\n },\n\n /**\n * Adds the given Game Object, or array of Game Objects, to this Container at the specified position.\n *\n * Existing Game Objects in the Container are shifted up.\n *\n * Each Game Object must be unique within the Container.\n *\n * @method Phaser.GameObjects.Container#addAt\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\n * @param {integer} [index=0] - The position to insert the Game Object/s at.\n *\n * @return {this} This Container instance.\n */\n addAt: function (child, index)\n {\n ArrayUtils.AddAt(this.list, child, index, this.maxSize, this.addHandler, this);\n\n return this;\n },\n\n /**\n * Returns the Game Object at the given position in this Container.\n *\n * @method Phaser.GameObjects.Container#getAt\n * @since 3.4.0\n *\n * @param {integer} index - The position to get the Game Object from.\n *\n * @return {?Phaser.GameObjects.GameObject} The Game Object at the specified index, or `null` if none found.\n */\n getAt: function (index)\n {\n return this.list[index];\n },\n\n /**\n * Returns the index of the given Game Object in this Container.\n *\n * @method Phaser.GameObjects.Container#getIndex\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container.\n *\n * @return {integer} The index of the Game Object in this Container, or -1 if not found.\n */\n getIndex: function (child)\n {\n return this.list.indexOf(child);\n },\n\n /**\n * Sort the contents of this Container so the items are in order based on the given property.\n * For example: `sort('alpha')` would sort the elements based on the value of their `alpha` property.\n *\n * @method Phaser.GameObjects.Container#sort\n * @since 3.4.0\n *\n * @param {string} property - The property to lexically sort by.\n * @param {function} [handler] - Provide your own custom handler function. Will receive 2 children which it should compare and return a boolean.\n *\n * @return {this} This Container instance.\n */\n sort: function (property, handler)\n {\n if (!property)\n {\n return this;\n }\n\n if (handler === undefined)\n {\n handler = function (childA, childB)\n {\n return childA[property] - childB[property];\n };\n }\n\n ArrayUtils.StableSort.inplace(this.list, handler);\n\n return this;\n },\n\n /**\n * Searches for the first instance of a child with its `name` property matching the given argument.\n * Should more than one child have the same name only the first is returned.\n *\n * @method Phaser.GameObjects.Container#getByName\n * @since 3.4.0\n *\n * @param {string} name - The name to search for.\n *\n * @return {?Phaser.GameObjects.GameObject} The first child with a matching name, or `null` if none were found.\n */\n getByName: function (name)\n {\n return ArrayUtils.GetFirst(this.list, 'name', name);\n },\n\n /**\n * Returns a random Game Object from this Container.\n *\n * @method Phaser.GameObjects.Container#getRandom\n * @since 3.4.0\n *\n * @param {integer} [startIndex=0] - An optional start index.\n * @param {integer} [length] - An optional length, the total number of elements (from the startIndex) to choose from.\n *\n * @return {?Phaser.GameObjects.GameObject} A random child from the Container, or `null` if the Container is empty.\n */\n getRandom: function (startIndex, length)\n {\n return ArrayUtils.GetRandom(this.list, startIndex, length);\n },\n\n /**\n * Gets the first Game Object in this Container.\n *\n * You can also specify a property and value to search for, in which case it will return the first\n * Game Object in this Container with a matching property and / or value.\n *\n * For example: `getFirst('visible', true)` would return the first Game Object that had its `visible` property set.\n *\n * You can limit the search to the `startIndex` - `endIndex` range.\n *\n * @method Phaser.GameObjects.Container#getFirst\n * @since 3.4.0\n *\n * @param {string} property - The property to test on each Game Object in the Container.\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\n * @param {integer} [startIndex=0] - An optional start index to search from.\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\n *\n * @return {?Phaser.GameObjects.GameObject} The first matching Game Object, or `null` if none was found.\n */\n getFirst: function (property, value, startIndex, endIndex)\n {\n return ArrayUtils.GetFirst(this.list, property, value, startIndex, endIndex);\n },\n\n /**\n * Returns all Game Objects in this Container.\n *\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\n *\n * For example: `getAll('body')` would return only Game Objects that have a body property.\n *\n * You can also specify a value to compare the property to:\n *\n * `getAll('visible', true)` would return only Game Objects that have their visible property set to `true`.\n *\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\n * the first 50 Game Objects.\n *\n * @method Phaser.GameObjects.Container#getAll\n * @since 3.4.0\n *\n * @param {string} [property] - The property to test on each Game Object in the Container.\n * @param {any} [value] - If property is set then the `property` must strictly equal this value to be included in the results.\n * @param {integer} [startIndex=0] - An optional start index to search from.\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\n *\n * @return {Phaser.GameObjects.GameObject[]} An array of matching Game Objects from this Container.\n */\n getAll: function (property, value, startIndex, endIndex)\n {\n return ArrayUtils.GetAll(this.list, property, value, startIndex, endIndex);\n },\n\n /**\n * Returns the total number of Game Objects in this Container that have a property\n * matching the given value.\n *\n * For example: `count('visible', true)` would count all the elements that have their visible property set.\n *\n * You can optionally limit the operation to the `startIndex` - `endIndex` range.\n *\n * @method Phaser.GameObjects.Container#count\n * @since 3.4.0\n *\n * @param {string} property - The property to check.\n * @param {any} value - The value to check.\n * @param {integer} [startIndex=0] - An optional start index to search from.\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\n *\n * @return {integer} The total number of Game Objects in this Container with a property matching the given value.\n */\n count: function (property, value, startIndex, endIndex)\n {\n return ArrayUtils.CountAllMatching(this.list, property, value, startIndex, endIndex);\n },\n\n /**\n * Swaps the position of two Game Objects in this Container.\n * Both Game Objects must belong to this Container.\n *\n * @method Phaser.GameObjects.Container#swap\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child1 - The first Game Object to swap.\n * @param {Phaser.GameObjects.GameObject} child2 - The second Game Object to swap.\n *\n * @return {this} This Container instance.\n */\n swap: function (child1, child2)\n {\n ArrayUtils.Swap(this.list, child1, child2);\n\n return this;\n },\n\n /**\n * Moves a Game Object to a new position within this Container.\n *\n * The Game Object must already be a child of this Container.\n *\n * The Game Object is removed from its old position and inserted into the new one.\n * Therefore the Container size does not change. Other children will change position accordingly.\n *\n * @method Phaser.GameObjects.Container#moveTo\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to move.\n * @param {integer} index - The new position of the Game Object in this Container.\n *\n * @return {this} This Container instance.\n */\n moveTo: function (child, index)\n {\n ArrayUtils.MoveTo(this.list, child, index);\n\n return this;\n },\n\n /**\n * Removes the given Game Object, or array of Game Objects, from this Container.\n *\n * The Game Objects must already be children of this Container.\n *\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\n *\n * @method Phaser.GameObjects.Container#remove\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to be removed from the Container.\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each child successfully removed from this Container.\n *\n * @return {this} This Container instance.\n */\n remove: function (child, destroyChild)\n {\n var removed = ArrayUtils.Remove(this.list, child, this.removeHandler, this);\n\n if (destroyChild && removed)\n {\n if (!Array.isArray(removed))\n {\n removed = [ removed ];\n }\n\n for (var i = 0; i < removed.length; i++)\n {\n removed[i].destroy();\n }\n }\n\n return this;\n },\n\n /**\n * Removes the Game Object at the given position in this Container.\n *\n * You can also optionally call `destroy` on the Game Object, if one is found.\n *\n * @method Phaser.GameObjects.Container#removeAt\n * @since 3.4.0\n *\n * @param {integer} index - The index of the Game Object to be removed.\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\n *\n * @return {this} This Container instance.\n */\n removeAt: function (index, destroyChild)\n {\n var removed = ArrayUtils.RemoveAt(this.list, index, this.removeHandler, this);\n\n if (destroyChild && removed)\n {\n removed.destroy();\n }\n\n return this;\n },\n\n /**\n * Removes the Game Objects between the given positions in this Container.\n *\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\n *\n * @method Phaser.GameObjects.Container#removeBetween\n * @since 3.4.0\n *\n * @param {integer} [startIndex=0] - An optional start index to search from.\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\n *\n * @return {this} This Container instance.\n */\n removeBetween: function (startIndex, endIndex, destroyChild)\n {\n var removed = ArrayUtils.RemoveBetween(this.list, startIndex, endIndex, this.removeHandler, this);\n\n if (destroyChild)\n {\n for (var i = 0; i < removed.length; i++)\n {\n removed[i].destroy();\n }\n }\n\n return this;\n },\n\n /**\n * Removes all Game Objects from this Container.\n *\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\n *\n * @method Phaser.GameObjects.Container#removeAll\n * @since 3.4.0\n *\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\n *\n * @return {this} This Container instance.\n */\n removeAll: function (destroyChild)\n {\n var removed = ArrayUtils.RemoveBetween(this.list, 0, this.list.length, this.removeHandler, this);\n\n if (destroyChild)\n {\n for (var i = 0; i < removed.length; i++)\n {\n removed[i].destroy();\n }\n }\n\n return this;\n },\n\n /**\n * Brings the given Game Object to the top of this Container.\n * This will cause it to render on-top of any other objects in the Container.\n *\n * @method Phaser.GameObjects.Container#bringToTop\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to bring to the top of the Container.\n *\n * @return {this} This Container instance.\n */\n bringToTop: function (child)\n {\n ArrayUtils.BringToTop(this.list, child);\n\n return this;\n },\n\n /**\n * Sends the given Game Object to the bottom of this Container.\n * This will cause it to render below any other objects in the Container.\n *\n * @method Phaser.GameObjects.Container#sendToBack\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to send to the bottom of the Container.\n *\n * @return {this} This Container instance.\n */\n sendToBack: function (child)\n {\n ArrayUtils.SendToBack(this.list, child);\n\n return this;\n },\n\n /**\n * Moves the given Game Object up one place in this Container, unless it's already at the top.\n *\n * @method Phaser.GameObjects.Container#moveUp\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\n *\n * @return {this} This Container instance.\n */\n moveUp: function (child)\n {\n ArrayUtils.MoveUp(this.list, child);\n\n return this;\n },\n\n /**\n * Moves the given Game Object down one place in this Container, unless it's already at the bottom.\n *\n * @method Phaser.GameObjects.Container#moveDown\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\n *\n * @return {this} This Container instance.\n */\n moveDown: function (child)\n {\n ArrayUtils.MoveDown(this.list, child);\n\n return this;\n },\n\n /**\n * Reverses the order of all Game Objects in this Container.\n *\n * @method Phaser.GameObjects.Container#reverse\n * @since 3.4.0\n *\n * @return {this} This Container instance.\n */\n reverse: function ()\n {\n this.list.reverse();\n\n return this;\n },\n\n /**\n * Shuffles the all Game Objects in this Container using the Fisher-Yates implementation.\n *\n * @method Phaser.GameObjects.Container#shuffle\n * @since 3.4.0\n *\n * @return {this} This Container instance.\n */\n shuffle: function ()\n {\n ArrayUtils.Shuffle(this.list);\n\n return this;\n },\n\n /**\n * Replaces a Game Object in this Container with the new Game Object.\n * The new Game Object cannot already be a child of this Container.\n *\n * @method Phaser.GameObjects.Container#replace\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} oldChild - The Game Object in this Container that will be replaced.\n * @param {Phaser.GameObjects.GameObject} newChild - The Game Object to be added to this Container.\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\n *\n * @return {this} This Container instance.\n */\n replace: function (oldChild, newChild, destroyChild)\n {\n var moved = ArrayUtils.Replace(this.list, oldChild, newChild);\n\n if (moved)\n {\n this.addHandler(newChild);\n this.removeHandler(oldChild);\n\n if (destroyChild)\n {\n oldChild.destroy();\n }\n }\n\n return this;\n },\n\n /**\n * Returns `true` if the given Game Object is a direct child of this Container.\n *\n * This check does not scan nested Containers.\n *\n * @method Phaser.GameObjects.Container#exists\n * @since 3.4.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to check for within this Container.\n *\n * @return {boolean} True if the Game Object is an immediate child of this Container, otherwise false.\n */\n exists: function (child)\n {\n return (this.list.indexOf(child) > -1);\n },\n\n /**\n * Sets the property to the given value on all Game Objects in this Container.\n *\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\n * the first 50 Game Objects.\n *\n * @method Phaser.GameObjects.Container#setAll\n * @since 3.4.0\n *\n * @param {string} property - The property that must exist on the Game Object.\n * @param {any} value - The value to get the property to.\n * @param {integer} [startIndex=0] - An optional start index to search from.\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\n *\n * @return {this} This Container instance.\n */\n setAll: function (property, value, startIndex, endIndex)\n {\n ArrayUtils.SetAll(this.list, property, value, startIndex, endIndex);\n\n return this;\n },\n\n /**\n * @callback EachContainerCallback\n * @generic I - [item]\n *\n * @param {*} item - The child Game Object of the Container.\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\n */\n\n /**\n * Passes all Game Objects in this Container to the given callback.\n *\n * A copy of the Container is made before passing each entry to your callback.\n * This protects against the callback itself modifying the Container.\n *\n * If you know for sure that the callback will not change the size of this Container\n * then you can use the more performant `Container.iterate` method instead.\n *\n * @method Phaser.GameObjects.Container#each\n * @since 3.4.0\n *\n * @param {function} callback - The function to call.\n * @param {object} [context] - Value to use as `this` when executing callback.\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\n *\n * @return {this} This Container instance.\n */\n each: function (callback, context)\n {\n var args = [ null ];\n var i;\n var temp = this.list.slice();\n var len = temp.length;\n\n for (i = 2; i < arguments.length; i++)\n {\n args.push(arguments[i]);\n }\n\n for (i = 0; i < len; i++)\n {\n args[0] = temp[i];\n\n callback.apply(context, args);\n }\n\n return this;\n },\n\n /**\n * Passes all Game Objects in this Container to the given callback.\n *\n * Only use this method when you absolutely know that the Container will not be modified during\n * the iteration, i.e. by removing or adding to its contents.\n *\n * @method Phaser.GameObjects.Container#iterate\n * @since 3.4.0\n *\n * @param {function} callback - The function to call.\n * @param {object} [context] - Value to use as `this` when executing callback.\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\n *\n * @return {this} This Container instance.\n */\n iterate: function (callback, context)\n {\n var args = [ null ];\n var i;\n\n for (i = 2; i < arguments.length; i++)\n {\n args.push(arguments[i]);\n }\n\n for (i = 0; i < this.list.length; i++)\n {\n args[0] = this.list[i];\n\n callback.apply(context, args);\n }\n\n return this;\n },\n\n /**\n * Sets the scroll factor of this Container and optionally all of its children.\n *\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\n *\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\n * It does not change the Game Objects actual position values.\n *\n * A value of 1 means it will move exactly in sync with a camera.\n * A value of 0 means it will not move at all, even if the camera moves.\n * Other values control the degree to which the camera movement is mapped to this Game Object.\n *\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\n * calculating physics collisions. Bodies always collide based on their world position, but changing\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\n * them from physics bodies if not accounted for in your code.\n *\n * @method Phaser.GameObjects.Container#setScrollFactor\n * @since 3.0.0\n *\n * @param {number} x - The horizontal scroll factor of this Game Object.\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\n * @param {boolean} [updateChildren=false] - Apply this scrollFactor to all Container children as well?\n *\n * @return {this} This Game Object instance.\n */\n setScrollFactor: function (x, y, updateChildren)\n {\n if (y === undefined) { y = x; }\n if (updateChildren === undefined) { updateChildren = false; }\n\n this.scrollFactorX = x;\n this.scrollFactorY = y;\n\n if (updateChildren)\n {\n ArrayUtils.SetAll(this.list, 'scrollFactorX', x);\n ArrayUtils.SetAll(this.list, 'scrollFactorY', y);\n }\n\n return this;\n },\n\n /**\n * The number of Game Objects inside this Container.\n *\n * @name Phaser.GameObjects.Container#length\n * @type {integer}\n * @readonly\n * @since 3.4.0\n */\n length: {\n\n get: function ()\n {\n return this.list.length;\n }\n\n },\n\n /**\n * Returns the first Game Object within the Container, or `null` if it is empty.\n *\n * You can move the cursor by calling `Container.next` and `Container.previous`.\n *\n * @name Phaser.GameObjects.Container#first\n * @type {?Phaser.GameObjects.GameObject}\n * @readonly\n * @since 3.4.0\n */\n first: {\n\n get: function ()\n {\n this.position = 0;\n\n if (this.list.length > 0)\n {\n return this.list[0];\n }\n else\n {\n return null;\n }\n }\n\n },\n\n /**\n * Returns the last Game Object within the Container, or `null` if it is empty.\n *\n * You can move the cursor by calling `Container.next` and `Container.previous`.\n *\n * @name Phaser.GameObjects.Container#last\n * @type {?Phaser.GameObjects.GameObject}\n * @readonly\n * @since 3.4.0\n */\n last: {\n\n get: function ()\n {\n if (this.list.length > 0)\n {\n this.position = this.list.length - 1;\n\n return this.list[this.position];\n }\n else\n {\n return null;\n }\n }\n\n },\n\n /**\n * Returns the next Game Object within the Container, or `null` if it is empty.\n *\n * You can move the cursor by calling `Container.next` and `Container.previous`.\n *\n * @name Phaser.GameObjects.Container#next\n * @type {?Phaser.GameObjects.GameObject}\n * @readonly\n * @since 3.4.0\n */\n next: {\n\n get: function ()\n {\n if (this.position < this.list.length)\n {\n this.position++;\n\n return this.list[this.position];\n }\n else\n {\n return null;\n }\n }\n\n },\n\n /**\n * Returns the previous Game Object within the Container, or `null` if it is empty.\n *\n * You can move the cursor by calling `Container.next` and `Container.previous`.\n *\n * @name Phaser.GameObjects.Container#previous\n * @type {?Phaser.GameObjects.GameObject}\n * @readonly\n * @since 3.4.0\n */\n previous: {\n\n get: function ()\n {\n if (this.position > 0)\n {\n this.position--;\n\n return this.list[this.position];\n }\n else\n {\n return null;\n }\n }\n\n },\n\n /**\n * Internal destroy handler, called as part of the destroy process.\n *\n * @method Phaser.GameObjects.Container#preDestroy\n * @protected\n * @since 3.9.0\n */\n preDestroy: function ()\n {\n this.removeAll(!!this.exclusive);\n\n this.localTransform.destroy();\n this.tempTransformMatrix.destroy();\n\n this.list = [];\n this._displayList = null;\n }\n\n});\n\nmodule.exports = Container;\n","/**\n * @author Richard Davey \n * @author Felipe Alfonso <@bitnenfer>\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Renders this Game Object with the Canvas Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method Phaser.GameObjects.Container#renderCanvas\n * @since 3.4.0\n * @private\n *\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar ContainerCanvasRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix)\n{\n var children = container.list;\n\n if (children.length === 0)\n {\n return;\n }\n\n var transformMatrix = container.localTransform;\n\n if (parentMatrix)\n {\n transformMatrix.loadIdentity();\n transformMatrix.multiply(parentMatrix);\n transformMatrix.translate(container.x, container.y);\n transformMatrix.rotate(container.rotation);\n transformMatrix.scale(container.scaleX, container.scaleY);\n }\n else\n {\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\n }\n\n var containerHasBlendMode = (container.blendMode !== -1);\n\n if (!containerHasBlendMode)\n {\n // If Container is SKIP_TEST then set blend mode to be Normal\n renderer.setBlendMode(0);\n }\n\n var alpha = container._alpha;\n var scrollFactorX = container.scrollFactorX;\n var scrollFactorY = container.scrollFactorY;\n\n if (container.mask)\n {\n container.mask.preRenderCanvas(renderer, null, camera);\n }\n\n for (var i = 0; i < children.length; i++)\n {\n var child = children[i];\n\n if (!child.willRender(camera))\n {\n continue;\n }\n\n var childAlpha = child.alpha;\n var childScrollFactorX = child.scrollFactorX;\n var childScrollFactorY = child.scrollFactorY;\n\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\n {\n // If Container doesn't have its own blend mode, then a child can have one\n renderer.setBlendMode(child.blendMode);\n }\n\n // Set parent values\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\n child.setAlpha(childAlpha * alpha);\n\n // Render\n child.renderCanvas(renderer, child, interpolationPercentage, camera, transformMatrix);\n\n // Restore original values\n child.setAlpha(childAlpha);\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\n }\n\n if (container.mask)\n {\n container.mask.postRenderCanvas(renderer);\n }\n};\n\nmodule.exports = ContainerCanvasRenderer;\n","/**\n * @author Richard Davey \n * @author Felipe Alfonso <@bitnenfer>\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar renderWebGL = require('../../utils/NOOP');\nvar renderCanvas = require('../../utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./ContainerWebGLRenderer');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./ContainerCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas\n\n};\n","/**\n * @author Richard Davey \n * @author Felipe Alfonso <@bitnenfer>\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Renders this Game Object with the WebGL Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method Phaser.GameObjects.Container#renderWebGL\n * @since 3.4.0\n * @private\n *\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar ContainerWebGLRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix)\n{\n var children = container.list;\n\n if (children.length === 0)\n {\n return;\n }\n\n var transformMatrix = container.localTransform;\n \n if (parentMatrix)\n {\n transformMatrix.loadIdentity();\n transformMatrix.multiply(parentMatrix);\n transformMatrix.translate(container.x, container.y);\n transformMatrix.rotate(container.rotation);\n transformMatrix.scale(container.scaleX, container.scaleY);\n }\n else\n {\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\n }\n\n var containerHasBlendMode = (container.blendMode !== -1);\n\n if (!containerHasBlendMode)\n {\n // If Container is SKIP_TEST then set blend mode to be Normal\n renderer.setBlendMode(0);\n }\n\n var alpha = container.alpha;\n\n var scrollFactorX = container.scrollFactorX;\n var scrollFactorY = container.scrollFactorY;\n\n var list = children;\n var childCount = children.length;\n\n for (var i = 0; i < childCount; i++)\n {\n var child = children[i];\n\n if (!child.willRender(camera))\n {\n continue;\n }\n\n var childAlphaTopLeft;\n var childAlphaTopRight;\n var childAlphaBottomLeft;\n var childAlphaBottomRight;\n\n if (child.alphaTopLeft !== undefined)\n {\n childAlphaTopLeft = child.alphaTopLeft;\n childAlphaTopRight = child.alphaTopRight;\n childAlphaBottomLeft = child.alphaBottomLeft;\n childAlphaBottomRight = child.alphaBottomRight;\n }\n else\n {\n var childAlpha = child.alpha;\n\n childAlphaTopLeft = childAlpha;\n childAlphaTopRight = childAlpha;\n childAlphaBottomLeft = childAlpha;\n childAlphaBottomRight = childAlpha;\n }\n\n var childScrollFactorX = child.scrollFactorX;\n var childScrollFactorY = child.scrollFactorY;\n\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\n {\n // If Container doesn't have its own blend mode, then a child can have one\n renderer.setBlendMode(child.blendMode);\n }\n\n var mask = child.mask;\n\n if (mask)\n {\n mask.preRenderWebGL(renderer, child, camera);\n }\n\n var type = child.type;\n\n if (type !== renderer.currentType)\n {\n renderer.newType = true;\n renderer.currentType = type;\n }\n\n renderer.nextTypeMatch = (i < childCount - 1) ? (list[i + 1].type === renderer.currentType) : false;\n\n // Set parent values\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\n\n child.setAlpha(childAlphaTopLeft * alpha, childAlphaTopRight * alpha, childAlphaBottomLeft * alpha, childAlphaBottomRight * alpha);\n\n // Render\n child.renderWebGL(renderer, child, interpolationPercentage, camera, transformMatrix);\n\n // Restore original values\n\n child.setAlpha(childAlphaTopLeft, childAlphaTopRight, childAlphaBottomLeft, childAlphaBottomRight);\n\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\n\n if (mask)\n {\n mask.postRenderWebGL(renderer, camera);\n }\n\n renderer.newType = false;\n }\n};\n\nmodule.exports = ContainerWebGLRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Added to Scene Event.\n *\n * This event is dispatched when a Game Object is added to a Scene.\n *\n * Listen for it on a Game Object instance using `GameObject.on('addedtoscene', listener)`.\n *\n * @event Phaser.GameObjects.Events#ADDED_TO_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\n */\nmodule.exports = 'addedtoscene';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Destroy Event.\n * \n * This event is dispatched when a Game Object instance is being destroyed.\n * \n * Listen for it on a Game Object instance using `GameObject.on('destroy', listener)`.\n *\n * @event Phaser.GameObjects.Events#DESTROY\n * @since 3.0.0\n * \n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed.\n */\nmodule.exports = 'destroy';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Removed from Scene Event.\n *\n * This event is dispatched when a Game Object is removed from a Scene.\n *\n * Listen for it on a Game Object instance using `GameObject.on('removedfromscene', listener)`.\n *\n * @event Phaser.GameObjects.Events#REMOVED_FROM_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\n */\nmodule.exports = 'removedfromscene';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Complete Event.\n * \n * This event is dispatched when a Video finishes playback by reaching the end of its duration. It\n * is also dispatched if a video marker sequence is being played and reaches the end.\n * \n * Note that not all videos can fire this event. Live streams, for example, have no fixed duration,\n * so never technically 'complete'.\n * \n * If a video is stopped from playback, via the `Video.stop` method, it will emit the\n * `VIDEO_STOP` event instead of this one.\n * \n * Listen for it from a Video Game Object instance using `Video.on('complete', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_COMPLETE\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed playback.\n */\nmodule.exports = 'complete';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Created Event.\n * \n * This event is dispatched when the texture for a Video has been created. This happens\n * when enough of the video source has been loaded that the browser is able to render a\n * frame from it.\n * \n * Listen for it from a Video Game Object instance using `Video.on('created', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_CREATED\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\n * @param {integer} width - The width of the video.\n * @param {integer} height - The height of the video.\n */\nmodule.exports = 'created';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Error Event.\n * \n * This event is dispatched when a Video tries to play a source that does not exist, or is the wrong file type.\n * \n * Listen for it from a Video Game Object instance using `Video.on('error', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_ERROR\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which threw the error.\n * @param {Event} event - The native DOM event the browser raised during playback.\n */\nmodule.exports = 'error';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Loop Event.\n * \n * This event is dispatched when a Video that is currently playing has looped. This only\n * happens if the `loop` parameter was specified, or the `setLoop` method was called,\n * and if the video has a fixed duration. Video streams, for example, cannot loop, as\n * they have no duration.\n * \n * Looping is based on the result of the Video `timeupdate` event. This event is not\n * frame-accurate, due to the way browsers work, so please do not rely on this loop\n * event to be time or frame precise.\n * \n * Listen for it from a Video Game Object instance using `Video.on('loop', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_LOOP\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which has looped.\n */\nmodule.exports = 'loop';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Play Event.\n * \n * This event is dispatched when a Video begins playback. For videos that do not require\n * interaction unlocking, this is usually as soon as the `Video.play` method is called.\n * However, for videos that require unlocking, it is fired once playback begins after\n * they've been unlocked.\n * \n * Listen for it from a Video Game Object instance using `Video.on('play', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_PLAY\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started playback.\n */\nmodule.exports = 'play';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Seeked Event.\n * \n * This event is dispatched when a Video completes seeking to a new point in its timeline.\n * \n * Listen for it from a Video Game Object instance using `Video.on('seeked', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_SEEKED\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which completed seeking.\n */\nmodule.exports = 'seeked';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Seeking Event.\n * \n * This event is dispatched when a Video _begins_ seeking to a new point in its timeline.\n * When the seek is complete, it will dispatch the `VIDEO_SEEKED` event to conclude.\n * \n * Listen for it from a Video Game Object instance using `Video.on('seeking', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_SEEKING\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which started seeking.\n */\nmodule.exports = 'seeking';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Stopped Event.\n * \n * This event is dispatched when a Video is stopped from playback via a call to the `Video.stop` method,\n * either directly via game code, or indirectly as the result of changing a video source or destroying it.\n * \n * Listen for it from a Video Game Object instance using `Video.on('stop', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_STOP\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which stopped playback.\n */\nmodule.exports = 'stop';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Timeout Event.\n * \n * This event is dispatched when a Video has exhausted its allocated time while trying to connect to a video\n * source to start playback.\n * \n * Listen for it from a Video Game Object instance using `Video.on('timeout', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_TIMEOUT\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which timed out.\n */\nmodule.exports = 'timeout';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Video Game Object Unlocked Event.\n * \n * This event is dispatched when a Video that was prevented from playback due to the browsers\n * Media Engagement Interaction policy, is unlocked by a user gesture.\n * \n * Listen for it from a Video Game Object instance using `Video.on('unlocked', listener)`.\n *\n * @event Phaser.GameObjects.Events#VIDEO_UNLOCKED\n * @since 3.20.0\n * \n * @param {Phaser.GameObjects.Video} video - The Video Game Object which raised the event.\n */\nmodule.exports = 'unlocked';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.GameObjects.Events\n */\n\nmodule.exports = {\n\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\n DESTROY: require('./DESTROY_EVENT'),\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'),\n VIDEO_COMPLETE: require('./VIDEO_COMPLETE_EVENT'),\n VIDEO_CREATED: require('./VIDEO_CREATED_EVENT'),\n VIDEO_ERROR: require('./VIDEO_ERROR_EVENT'),\n VIDEO_LOOP: require('./VIDEO_LOOP_EVENT'),\n VIDEO_PLAY: require('./VIDEO_PLAY_EVENT'),\n VIDEO_SEEKED: require('./VIDEO_SEEKED_EVENT'),\n VIDEO_SEEKING: require('./VIDEO_SEEKING_EVENT'),\n VIDEO_STOP: require('./VIDEO_STOP_EVENT'),\n VIDEO_TIMEOUT: require('./VIDEO_TIMEOUT_EVENT'),\n VIDEO_UNLOCKED: require('./VIDEO_UNLOCKED_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar GEOM_CONST = {\n\n /**\n * A Circle Geometry object type.\n * \n * @name Phaser.Geom.CIRCLE\n * @type {integer}\n * @since 3.19.0\n */\n CIRCLE: 0,\n\n /**\n * An Ellipse Geometry object type.\n * \n * @name Phaser.Geom.ELLIPSE\n * @type {integer}\n * @since 3.19.0\n */\n ELLIPSE: 1,\n\n /**\n * A Line Geometry object type.\n * \n * @name Phaser.Geom.LINE\n * @type {integer}\n * @since 3.19.0\n */\n LINE: 2,\n\n /**\n * A Point Geometry object type.\n * \n * @name Phaser.Geom.POINT\n * @type {integer}\n * @since 3.19.0\n */\n POINT: 3,\n\n /**\n * A Polygon Geometry object type.\n * \n * @name Phaser.Geom.POLYGON\n * @type {integer}\n * @since 3.19.0\n */\n POLYGON: 4,\n\n /**\n * A Rectangle Geometry object type.\n * \n * @name Phaser.Geom.RECTANGLE\n * @type {integer}\n * @since 3.19.0\n */\n RECTANGLE: 5,\n\n /**\n * A Triangle Geometry object type.\n * \n * @name Phaser.Geom.TRIANGLE\n * @type {integer}\n * @since 3.19.0\n */\n TRIANGLE: 6\n\n};\n\nmodule.exports = GEOM_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Point = require('../point/Point');\n\n/**\n * Get a point on a line that's a given percentage along its length.\n *\n * @function Phaser.Geom.Line.GetPoint\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point} O - [out,$return]\n *\n * @param {Phaser.Geom.Line} line - The line.\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\n * @param {(Phaser.Geom.Point|object)} [out] - An optional point, or point-like object, to store the coordinates of the point on the line.\n *\n * @return {(Phaser.Geom.Point|object)} The point on the line.\n */\nvar GetPoint = function (line, position, out)\n{\n if (out === undefined) { out = new Point(); }\n\n out.x = line.x1 + (line.x2 - line.x1) * position;\n out.y = line.y1 + (line.y2 - line.y1) * position;\n\n return out;\n};\n\nmodule.exports = GetPoint;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Length = require('./Length');\nvar Point = require('../point/Point');\n\n/**\n * Get a number of points along a line's length.\n *\n * Provide a `quantity` to get an exact number of points along the line.\n *\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\n * providing a `stepRate`.\n *\n * @function Phaser.Geom.Line.GetPoints\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\n *\n * @param {Phaser.Geom.Line} line - The line.\n * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\n * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\n *\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\n */\nvar GetPoints = function (line, quantity, stepRate, out)\n{\n if (out === undefined) { out = []; }\n\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\n if (!quantity && stepRate > 0)\n {\n quantity = Length(line) / stepRate;\n }\n\n var x1 = line.x1;\n var y1 = line.y1;\n\n var x2 = line.x2;\n var y2 = line.y2;\n\n for (var i = 0; i < quantity; i++)\n {\n var position = i / quantity;\n\n var x = x1 + (x2 - x1) * position;\n var y = y1 + (y2 - y1) * position;\n\n out.push(new Point(x, y));\n }\n\n return out;\n};\n\nmodule.exports = GetPoints;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the length of the given line.\n *\n * @function Phaser.Geom.Line.Length\n * @since 3.0.0\n *\n * @param {Phaser.Geom.Line} line - The line to calculate the length of.\n *\n * @return {number} The length of the line.\n */\nvar Length = function (line)\n{\n return Math.sqrt((line.x2 - line.x1) * (line.x2 - line.x1) + (line.y2 - line.y1) * (line.y2 - line.y1));\n};\n\nmodule.exports = Length;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar GetPoint = require('./GetPoint');\nvar GetPoints = require('./GetPoints');\nvar GEOM_CONST = require('../const');\nvar Random = require('./Random');\nvar Vector2 = require('../../math/Vector2');\n\n/**\n * @classdesc\n * Defines a Line segment, a part of a line between two endpoints.\n *\n * @class Line\n * @memberof Phaser.Geom\n * @constructor\n * @since 3.0.0\n *\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\n */\nvar Line = new Class({\n\n initialize:\n\n function Line (x1, y1, x2, y2)\n {\n if (x1 === undefined) { x1 = 0; }\n if (y1 === undefined) { y1 = 0; }\n if (x2 === undefined) { x2 = 0; }\n if (y2 === undefined) { y2 = 0; }\n\n /**\n * The geometry constant type of this object: `GEOM_CONST.LINE`.\n * Used for fast type comparisons.\n *\n * @name Phaser.Geom.Line#type\n * @type {integer}\n * @readonly\n * @since 3.19.0\n */\n this.type = GEOM_CONST.LINE;\n\n /**\n * The x coordinate of the lines starting point.\n *\n * @name Phaser.Geom.Line#x1\n * @type {number}\n * @since 3.0.0\n */\n this.x1 = x1;\n\n /**\n * The y coordinate of the lines starting point.\n *\n * @name Phaser.Geom.Line#y1\n * @type {number}\n * @since 3.0.0\n */\n this.y1 = y1;\n\n /**\n * The x coordinate of the lines ending point.\n *\n * @name Phaser.Geom.Line#x2\n * @type {number}\n * @since 3.0.0\n */\n this.x2 = x2;\n\n /**\n * The y coordinate of the lines ending point.\n *\n * @name Phaser.Geom.Line#y2\n * @type {number}\n * @since 3.0.0\n */\n this.y2 = y2;\n },\n\n /**\n * Get a point on a line that's a given percentage along its length.\n *\n * @method Phaser.Geom.Line#getPoint\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point} O - [output,$return]\n *\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\n * @param {(Phaser.Geom.Point|object)} [output] - An optional point, or point-like object, to store the coordinates of the point on the line.\n *\n * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point on the line.\n */\n getPoint: function (position, output)\n {\n return GetPoint(this, position, output);\n },\n\n /**\n * Get a number of points along a line's length.\n *\n * Provide a `quantity` to get an exact number of points along the line.\n *\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\n * providing a `stepRate`.\n *\n * @method Phaser.Geom.Line#getPoints\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\n *\n * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\n * @param {integer} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\n * @param {(array|Phaser.Geom.Point[])} [output] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\n *\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\n */\n getPoints: function (quantity, stepRate, output)\n {\n return GetPoints(this, quantity, stepRate, output);\n },\n\n /**\n * Get a random Point on the Line.\n *\n * @method Phaser.Geom.Line#getRandomPoint\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point} O - [point,$return]\n *\n * @param {(Phaser.Geom.Point|object)} [point] - An instance of a Point to be modified.\n *\n * @return {Phaser.Geom.Point} A random Point on the Line.\n */\n getRandomPoint: function (point)\n {\n return Random(this, point);\n },\n\n /**\n * Set new coordinates for the line endpoints.\n *\n * @method Phaser.Geom.Line#setTo\n * @since 3.0.0\n *\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\n *\n * @return {this} This Line object.\n */\n setTo: function (x1, y1, x2, y2)\n {\n if (x1 === undefined) { x1 = 0; }\n if (y1 === undefined) { y1 = 0; }\n if (x2 === undefined) { x2 = 0; }\n if (y2 === undefined) { y2 = 0; }\n\n this.x1 = x1;\n this.y1 = y1;\n\n this.x2 = x2;\n this.y2 = y2;\n\n return this;\n },\n\n /**\n * Returns a Vector2 object that corresponds to the start of this Line.\n *\n * @method Phaser.Geom.Line#getPointA\n * @since 3.0.0\n *\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\n *\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\n *\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the start of this Line.\n */\n getPointA: function (vec2)\n {\n if (vec2 === undefined) { vec2 = new Vector2(); }\n\n vec2.set(this.x1, this.y1);\n\n return vec2;\n },\n\n /**\n * Returns a Vector2 object that corresponds to the end of this Line.\n *\n * @method Phaser.Geom.Line#getPointB\n * @since 3.0.0\n *\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\n *\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\n *\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the end of this Line.\n */\n getPointB: function (vec2)\n {\n if (vec2 === undefined) { vec2 = new Vector2(); }\n\n vec2.set(this.x2, this.y2);\n\n return vec2;\n },\n\n /**\n * The left position of the Line.\n *\n * @name Phaser.Geom.Line#left\n * @type {number}\n * @since 3.0.0\n */\n left: {\n\n get: function ()\n {\n return Math.min(this.x1, this.x2);\n },\n\n set: function (value)\n {\n if (this.x1 <= this.x2)\n {\n this.x1 = value;\n }\n else\n {\n this.x2 = value;\n }\n }\n\n },\n\n /**\n * The right position of the Line.\n *\n * @name Phaser.Geom.Line#right\n * @type {number}\n * @since 3.0.0\n */\n right: {\n\n get: function ()\n {\n return Math.max(this.x1, this.x2);\n },\n\n set: function (value)\n {\n if (this.x1 > this.x2)\n {\n this.x1 = value;\n }\n else\n {\n this.x2 = value;\n }\n }\n\n },\n\n /**\n * The top position of the Line.\n *\n * @name Phaser.Geom.Line#top\n * @type {number}\n * @since 3.0.0\n */\n top: {\n\n get: function ()\n {\n return Math.min(this.y1, this.y2);\n },\n\n set: function (value)\n {\n if (this.y1 <= this.y2)\n {\n this.y1 = value;\n }\n else\n {\n this.y2 = value;\n }\n }\n\n },\n\n /**\n * The bottom position of the Line.\n *\n * @name Phaser.Geom.Line#bottom\n * @type {number}\n * @since 3.0.0\n */\n bottom: {\n\n get: function ()\n {\n return Math.max(this.y1, this.y2);\n },\n\n set: function (value)\n {\n if (this.y1 > this.y2)\n {\n this.y1 = value;\n }\n else\n {\n this.y2 = value;\n }\n }\n\n }\n\n});\n\nmodule.exports = Line;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Point = require('../point/Point');\n\n/**\n * Returns a random point on a given Line.\n *\n * @function Phaser.Geom.Line.Random\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point} O - [out,$return]\n *\n * @param {Phaser.Geom.Line} line - The Line to calculate the random Point on.\n * @param {(Phaser.Geom.Point|object)} [out] - An instance of a Point to be modified.\n *\n * @return {(Phaser.Geom.Point|object)} A random Point on the Line.\n */\nvar Random = function (line, out)\n{\n if (out === undefined) { out = new Point(); }\n\n var t = Math.random();\n\n out.x = line.x1 + t * (line.x2 - line.x1);\n out.y = line.y1 + t * (line.y2 - line.y1);\n\n return out;\n};\n\nmodule.exports = Random;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar GEOM_CONST = require('../const');\n\n/**\n * @classdesc\n * Defines a Point in 2D space, with an x and y component.\n *\n * @class Point\n * @memberof Phaser.Geom\n * @constructor\n * @since 3.0.0\n *\n * @param {number} [x=0] - The x coordinate of this Point.\n * @param {number} [y=x] - The y coordinate of this Point.\n */\nvar Point = new Class({\n\n initialize:\n\n function Point (x, y)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = x; }\n\n /**\n * The geometry constant type of this object: `GEOM_CONST.POINT`.\n * Used for fast type comparisons.\n *\n * @name Phaser.Geom.Point#type\n * @type {integer}\n * @readonly\n * @since 3.19.0\n */\n this.type = GEOM_CONST.POINT;\n\n /**\n * The x coordinate of this Point.\n *\n * @name Phaser.Geom.Point#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.x = x;\n\n /**\n * The y coordinate of this Point.\n *\n * @name Phaser.Geom.Point#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.y = y;\n },\n\n /**\n * Set the x and y coordinates of the point to the given values.\n *\n * @method Phaser.Geom.Point#setTo\n * @since 3.0.0\n *\n * @param {number} [x=0] - The x coordinate of this Point.\n * @param {number} [y=x] - The y coordinate of this Point.\n *\n * @return {this} This Point object.\n */\n setTo: function (x, y)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = x; }\n\n this.x = x;\n this.y = y;\n\n return this;\n }\n\n});\n\nmodule.exports = Point;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Checks if a given point is inside a Rectangle's bounds.\n *\n * @function Phaser.Geom.Rectangle.Contains\n * @since 3.0.0\n *\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to check.\n * @param {number} x - The X coordinate of the point to check.\n * @param {number} y - The Y coordinate of the point to check.\n *\n * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`.\n */\nvar Contains = function (rect, x, y)\n{\n if (rect.width <= 0 || rect.height <= 0)\n {\n return false;\n }\n\n return (rect.x <= x && rect.x + rect.width >= x && rect.y <= y && rect.y + rect.height >= y);\n};\n\nmodule.exports = Contains;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Perimeter = require('./Perimeter');\nvar Point = require('../point/Point');\n\n/**\n * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter.\n * \n * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.\n * \n * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.\n *\n * @function Phaser.Geom.Rectangle.GetPoint\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point} O - [out,$return]\n *\n * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle to get the perimeter point from.\n * @param {number} position - The normalized distance into the Rectangle's perimeter to return.\n * @param {(Phaser.Geom.Point|object)} [out] - An object to update with the `x` and `y` coordinates of the point.\n *\n * @return {Phaser.Geom.Point} The updated `output` object, or a new Point if no `output` object was given.\n */\nvar GetPoint = function (rectangle, position, out)\n{\n if (out === undefined) { out = new Point(); }\n\n if (position <= 0 || position >= 1)\n {\n out.x = rectangle.x;\n out.y = rectangle.y;\n\n return out;\n }\n\n var p = Perimeter(rectangle) * position;\n\n if (position > 0.5)\n {\n p -= (rectangle.width + rectangle.height);\n\n if (p <= rectangle.width)\n {\n // Face 3\n out.x = rectangle.right - p;\n out.y = rectangle.bottom;\n }\n else\n {\n // Face 4\n out.x = rectangle.x;\n out.y = rectangle.bottom - (p - rectangle.width);\n }\n }\n else if (p <= rectangle.width)\n {\n // Face 1\n out.x = rectangle.x + p;\n out.y = rectangle.y;\n }\n else\n {\n // Face 2\n out.x = rectangle.right;\n out.y = rectangle.y + (p - rectangle.width);\n }\n\n return out;\n};\n\nmodule.exports = GetPoint;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar GetPoint = require('./GetPoint');\nvar Perimeter = require('./Perimeter');\n\n// Return an array of points from the perimeter of the rectangle\n// each spaced out based on the quantity or step required\n\n/**\n * Return an array of points from the perimeter of the rectangle, each spaced out based on the quantity or step required.\n *\n * @function Phaser.Geom.Rectangle.GetPoints\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\n *\n * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle object to get the points from.\n * @param {number} step - Step between points. Used to calculate the number of points to return when quantity is falsey. Ignored if quantity is positive.\n * @param {integer} quantity - The number of evenly spaced points from the rectangles perimeter to return. If falsey, step param will be used to calculate the number of points.\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array to store the points in.\n *\n * @return {(array|Phaser.Geom.Point[])} An array of Points from the perimeter of the rectangle.\n */\nvar GetPoints = function (rectangle, quantity, stepRate, out)\n{\n if (out === undefined) { out = []; }\n\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\n if (!quantity && stepRate > 0)\n {\n quantity = Perimeter(rectangle) / stepRate;\n }\n\n for (var i = 0; i < quantity; i++)\n {\n var position = i / quantity;\n\n out.push(GetPoint(rectangle, position));\n }\n\n return out;\n};\n\nmodule.exports = GetPoints;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculates the perimeter of a Rectangle.\n *\n * @function Phaser.Geom.Rectangle.Perimeter\n * @since 3.0.0\n *\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to use.\n *\n * @return {number} The perimeter of the Rectangle, equal to `(width * 2) + (height * 2)`.\n */\nvar Perimeter = function (rect)\n{\n return 2 * (rect.width + rect.height);\n};\n\nmodule.exports = Perimeter;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Point = require('../point/Point');\n\n/**\n * Returns a random point within a Rectangle.\n *\n * @function Phaser.Geom.Rectangle.Random\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point} O - [out,$return]\n *\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to return a point from.\n * @param {Phaser.Geom.Point} out - The object to update with the point's coordinates.\n *\n * @return {Phaser.Geom.Point} The modified `out` object, or a new Point if none was provided.\n */\nvar Random = function (rect, out)\n{\n if (out === undefined) { out = new Point(); }\n\n out.x = rect.x + (Math.random() * rect.width);\n out.y = rect.y + (Math.random() * rect.height);\n\n return out;\n};\n\nmodule.exports = Random;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar Contains = require('./Contains');\nvar GetPoint = require('./GetPoint');\nvar GetPoints = require('./GetPoints');\nvar GEOM_CONST = require('../const');\nvar Line = require('../line/Line');\nvar Random = require('./Random');\n\n/**\n * @classdesc\n * Encapsulates a 2D rectangle defined by its corner point in the top-left and its extends in x (width) and y (height)\n *\n * @class Rectangle\n * @memberof Phaser.Geom\n * @constructor\n * @since 3.0.0\n *\n * @param {number} [x=0] - The X coordinate of the top left corner of the Rectangle.\n * @param {number} [y=0] - The Y coordinate of the top left corner of the Rectangle.\n * @param {number} [width=0] - The width of the Rectangle.\n * @param {number} [height=0] - The height of the Rectangle.\n */\nvar Rectangle = new Class({\n\n initialize:\n\n function Rectangle (x, y, width, height)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n if (width === undefined) { width = 0; }\n if (height === undefined) { height = 0; }\n\n /**\n * The geometry constant type of this object: `GEOM_CONST.RECTANGLE`.\n * Used for fast type comparisons.\n *\n * @name Phaser.Geom.Rectangle#type\n * @type {integer}\n * @readonly\n * @since 3.19.0\n */\n this.type = GEOM_CONST.RECTANGLE;\n\n /**\n * The X coordinate of the top left corner of the Rectangle.\n *\n * @name Phaser.Geom.Rectangle#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.x = x;\n\n /**\n * The Y coordinate of the top left corner of the Rectangle.\n *\n * @name Phaser.Geom.Rectangle#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.y = y;\n\n /**\n * The width of the Rectangle, i.e. the distance between its left side (defined by `x`) and its right side.\n *\n * @name Phaser.Geom.Rectangle#width\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.width = width;\n\n /**\n * The height of the Rectangle, i.e. the distance between its top side (defined by `y`) and its bottom side.\n *\n * @name Phaser.Geom.Rectangle#height\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.height = height;\n },\n\n /**\n * Checks if the given point is inside the Rectangle's bounds.\n *\n * @method Phaser.Geom.Rectangle#contains\n * @since 3.0.0\n *\n * @param {number} x - The X coordinate of the point to check.\n * @param {number} y - The Y coordinate of the point to check.\n *\n * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`.\n */\n contains: function (x, y)\n {\n return Contains(this, x, y);\n },\n\n /**\n * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter.\n * \n * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.\n * \n * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.\n *\n * @method Phaser.Geom.Rectangle#getPoint\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point} O - [output,$return]\n *\n * @param {number} position - The normalized distance into the Rectangle's perimeter to return.\n * @param {(Phaser.Geom.Point|object)} [output] - An object to update with the `x` and `y` coordinates of the point.\n *\n * @return {(Phaser.Geom.Point|object)} The updated `output` object, or a new Point if no `output` object was given.\n */\n getPoint: function (position, output)\n {\n return GetPoint(this, position, output);\n },\n\n /**\n * Returns an array of points from the perimeter of the Rectangle, each spaced out based on the quantity or step required.\n *\n * @method Phaser.Geom.Rectangle#getPoints\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\n *\n * @param {integer} quantity - The number of points to return. Set to `false` or 0 to return an arbitrary number of points (`perimeter / stepRate`) evenly spaced around the Rectangle based on the `stepRate`.\n * @param {number} [stepRate] - If `quantity` is 0, determines the normalized distance between each returned point.\n * @param {(array|Phaser.Geom.Point[])} [output] - An array to which to append the points.\n *\n * @return {(array|Phaser.Geom.Point[])} The modified `output` array, or a new array if none was provided.\n */\n getPoints: function (quantity, stepRate, output)\n {\n return GetPoints(this, quantity, stepRate, output);\n },\n\n /**\n * Returns a random point within the Rectangle's bounds.\n *\n * @method Phaser.Geom.Rectangle#getRandomPoint\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Point} O - [point,$return]\n *\n * @param {Phaser.Geom.Point} [point] - The object in which to store the `x` and `y` coordinates of the point.\n *\n * @return {Phaser.Geom.Point} The updated `point`, or a new Point if none was provided.\n */\n getRandomPoint: function (point)\n {\n return Random(this, point);\n },\n\n /**\n * Sets the position, width, and height of the Rectangle.\n *\n * @method Phaser.Geom.Rectangle#setTo\n * @since 3.0.0\n *\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\n * @param {number} y - The Y coordinate of the top left corner of the Rectangle.\n * @param {number} width - The width of the Rectangle.\n * @param {number} height - The height of the Rectangle.\n *\n * @return {this} This Rectangle object.\n */\n setTo: function (x, y, width, height)\n {\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n\n return this;\n },\n\n /**\n * Resets the position, width, and height of the Rectangle to 0.\n *\n * @method Phaser.Geom.Rectangle#setEmpty\n * @since 3.0.0\n *\n * @return {this} This Rectangle object.\n */\n setEmpty: function ()\n {\n return this.setTo(0, 0, 0, 0);\n },\n\n /**\n * Sets the position of the Rectangle.\n *\n * @method Phaser.Geom.Rectangle#setPosition\n * @since 3.0.0\n *\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\n * @param {number} [y=x] - The Y coordinate of the top left corner of the Rectangle.\n *\n * @return {this} This Rectangle object.\n */\n setPosition: function (x, y)\n {\n if (y === undefined) { y = x; }\n\n this.x = x;\n this.y = y;\n\n return this;\n },\n\n /**\n * Sets the width and height of the Rectangle.\n *\n * @method Phaser.Geom.Rectangle#setSize\n * @since 3.0.0\n *\n * @param {number} width - The width to set the Rectangle to.\n * @param {number} [height=width] - The height to set the Rectangle to.\n *\n * @return {this} This Rectangle object.\n */\n setSize: function (width, height)\n {\n if (height === undefined) { height = width; }\n\n this.width = width;\n this.height = height;\n\n return this;\n },\n\n /**\n * Determines if the Rectangle is empty. A Rectangle is empty if its width or height is less than or equal to 0.\n *\n * @method Phaser.Geom.Rectangle#isEmpty\n * @since 3.0.0\n *\n * @return {boolean} `true` if the Rectangle is empty. A Rectangle object is empty if its width or height is less than or equal to 0.\n */\n isEmpty: function ()\n {\n return (this.width <= 0 || this.height <= 0);\n },\n\n /**\n * Returns a Line object that corresponds to the top of this Rectangle.\n *\n * @method Phaser.Geom.Rectangle#getLineA\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Line} O - [line,$return]\n *\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\n *\n * @return {Phaser.Geom.Line} A Line object that corresponds to the top of this Rectangle.\n */\n getLineA: function (line)\n {\n if (line === undefined) { line = new Line(); }\n\n line.setTo(this.x, this.y, this.right, this.y);\n\n return line;\n },\n\n /**\n * Returns a Line object that corresponds to the right of this Rectangle.\n *\n * @method Phaser.Geom.Rectangle#getLineB\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Line} O - [line,$return]\n *\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\n *\n * @return {Phaser.Geom.Line} A Line object that corresponds to the right of this Rectangle.\n */\n getLineB: function (line)\n {\n if (line === undefined) { line = new Line(); }\n\n line.setTo(this.right, this.y, this.right, this.bottom);\n\n return line;\n },\n\n /**\n * Returns a Line object that corresponds to the bottom of this Rectangle.\n *\n * @method Phaser.Geom.Rectangle#getLineC\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Line} O - [line,$return]\n *\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\n *\n * @return {Phaser.Geom.Line} A Line object that corresponds to the bottom of this Rectangle.\n */\n getLineC: function (line)\n {\n if (line === undefined) { line = new Line(); }\n\n line.setTo(this.right, this.bottom, this.x, this.bottom);\n\n return line;\n },\n\n /**\n * Returns a Line object that corresponds to the left of this Rectangle.\n *\n * @method Phaser.Geom.Rectangle#getLineD\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Line} O - [line,$return]\n *\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\n *\n * @return {Phaser.Geom.Line} A Line object that corresponds to the left of this Rectangle.\n */\n getLineD: function (line)\n {\n if (line === undefined) { line = new Line(); }\n\n line.setTo(this.x, this.bottom, this.x, this.y);\n\n return line;\n },\n\n /**\n * The x coordinate of the left of the Rectangle.\n * Changing the left property of a Rectangle object has no effect on the y and height properties. However it does affect the width property, whereas changing the x value does not affect the width property.\n *\n * @name Phaser.Geom.Rectangle#left\n * @type {number}\n * @since 3.0.0\n */\n left: {\n\n get: function ()\n {\n return this.x;\n },\n\n set: function (value)\n {\n if (value >= this.right)\n {\n this.width = 0;\n }\n else\n {\n this.width = this.right - value;\n }\n\n this.x = value;\n }\n\n },\n\n /**\n * The sum of the x and width properties.\n * Changing the right property of a Rectangle object has no effect on the x, y and height properties, however it does affect the width property.\n *\n * @name Phaser.Geom.Rectangle#right\n * @type {number}\n * @since 3.0.0\n */\n right: {\n\n get: function ()\n {\n return this.x + this.width;\n },\n\n set: function (value)\n {\n if (value <= this.x)\n {\n this.width = 0;\n }\n else\n {\n this.width = value - this.x;\n }\n }\n\n },\n\n /**\n * The y coordinate of the top of the Rectangle. Changing the top property of a Rectangle object has no effect on the x and width properties.\n * However it does affect the height property, whereas changing the y value does not affect the height property.\n *\n * @name Phaser.Geom.Rectangle#top\n * @type {number}\n * @since 3.0.0\n */\n top: {\n\n get: function ()\n {\n return this.y;\n },\n\n set: function (value)\n {\n if (value >= this.bottom)\n {\n this.height = 0;\n }\n else\n {\n this.height = (this.bottom - value);\n }\n\n this.y = value;\n }\n\n },\n\n /**\n * The sum of the y and height properties.\n * Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property.\n *\n * @name Phaser.Geom.Rectangle#bottom\n * @type {number}\n * @since 3.0.0\n */\n bottom: {\n\n get: function ()\n {\n return this.y + this.height;\n },\n\n set: function (value)\n {\n if (value <= this.y)\n {\n this.height = 0;\n }\n else\n {\n this.height = value - this.y;\n }\n }\n\n },\n\n /**\n * The x coordinate of the center of the Rectangle.\n *\n * @name Phaser.Geom.Rectangle#centerX\n * @type {number}\n * @since 3.0.0\n */\n centerX: {\n\n get: function ()\n {\n return this.x + (this.width / 2);\n },\n\n set: function (value)\n {\n this.x = value - (this.width / 2);\n }\n\n },\n\n /**\n * The y coordinate of the center of the Rectangle.\n *\n * @name Phaser.Geom.Rectangle#centerY\n * @type {number}\n * @since 3.0.0\n */\n centerY: {\n\n get: function ()\n {\n return this.y + (this.height / 2);\n },\n\n set: function (value)\n {\n this.y = value - (this.height / 2);\n }\n\n }\n\n});\n\nmodule.exports = Rectangle;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Rectangle = require('./Rectangle');\n\n/**\n * Creates a new Rectangle or repositions and/or resizes an existing Rectangle so that it encompasses the two given Rectangles, i.e. calculates their union.\n *\n * @function Phaser.Geom.Rectangle.Union\n * @since 3.0.0\n *\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\n *\n * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle to use.\n * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle to use.\n * @param {Phaser.Geom.Rectangle} [out] - The Rectangle to store the union in.\n *\n * @return {Phaser.Geom.Rectangle} The modified `out` Rectangle, or a new Rectangle if none was provided.\n */\nvar Union = function (rectA, rectB, out)\n{\n if (out === undefined) { out = new Rectangle(); }\n\n // Cache vars so we can use one of the input rects as the output rect\n var x = Math.min(rectA.x, rectB.x);\n var y = Math.min(rectA.y, rectB.y);\n var w = Math.max(rectA.right, rectB.right) - x;\n var h = Math.max(rectA.bottom, rectB.bottom) - y;\n\n return out.setTo(x, y, w, h);\n};\n\nmodule.exports = Union;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\nvar CONST = require('./const');\nvar Events = require('./events');\nvar GetFastValue = require('../utils/object/GetFastValue');\nvar GetURL = require('./GetURL');\nvar MergeXHRSettings = require('./MergeXHRSettings');\nvar XHRLoader = require('./XHRLoader');\nvar XHRSettings = require('./XHRSettings');\n\n/**\n * @classdesc\n * The base File class used by all File Types that the Loader can support.\n * You shouldn't create an instance of a File directly, but should extend it with your own class, setting a custom type and processing methods.\n *\n * @class File\n * @memberof Phaser.Loader\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\n * @param {Phaser.Types.Loader.FileConfig} fileConfig - The file configuration object, as created by the file type.\n */\nvar File = new Class({\n\n initialize:\n\n function File (loader, fileConfig)\n {\n /**\n * A reference to the Loader that is going to load this file.\n *\n * @name Phaser.Loader.File#loader\n * @type {Phaser.Loader.LoaderPlugin}\n * @since 3.0.0\n */\n this.loader = loader;\n\n /**\n * A reference to the Cache, or Texture Manager, that is going to store this file if it loads.\n *\n * @name Phaser.Loader.File#cache\n * @type {(Phaser.Cache.BaseCache|Phaser.Textures.TextureManager)}\n * @since 3.7.0\n */\n this.cache = GetFastValue(fileConfig, 'cache', false);\n\n /**\n * The file type string (image, json, etc) for sorting within the Loader.\n *\n * @name Phaser.Loader.File#type\n * @type {string}\n * @since 3.0.0\n */\n this.type = GetFastValue(fileConfig, 'type', false);\n\n /**\n * Unique cache key (unique within its file type)\n *\n * @name Phaser.Loader.File#key\n * @type {string}\n * @since 3.0.0\n */\n this.key = GetFastValue(fileConfig, 'key', false);\n\n var loadKey = this.key;\n\n if (loader.prefix && loader.prefix !== '')\n {\n this.key = loader.prefix + loadKey;\n }\n\n if (!this.type || !this.key)\n {\n throw new Error('Error calling \\'Loader.' + this.type + '\\' invalid key provided.');\n }\n\n /**\n * The URL of the file, not including baseURL.\n *\n * Automatically has Loader.path prepended to it if a string.\n *\n * Can also be a JavaScript Object, such as the results of parsing JSON data.\n *\n * @name Phaser.Loader.File#url\n * @type {object|string}\n * @since 3.0.0\n */\n this.url = GetFastValue(fileConfig, 'url');\n\n if (this.url === undefined)\n {\n this.url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', '');\n }\n else if (typeof this.url === 'string' && this.url.indexOf('blob:') !== 0 && this.url.indexOf('data:') !== 0)\n {\n this.url = loader.path + this.url;\n }\n\n /**\n * The final URL this file will load from, including baseURL and path.\n * Set automatically when the Loader calls 'load' on this file.\n *\n * @name Phaser.Loader.File#src\n * @type {string}\n * @since 3.0.0\n */\n this.src = '';\n\n /**\n * The merged XHRSettings for this file.\n *\n * @name Phaser.Loader.File#xhrSettings\n * @type {Phaser.Types.Loader.XHRSettingsObject}\n * @since 3.0.0\n */\n this.xhrSettings = XHRSettings(GetFastValue(fileConfig, 'responseType', undefined));\n\n if (GetFastValue(fileConfig, 'xhrSettings', false))\n {\n this.xhrSettings = MergeXHRSettings(this.xhrSettings, GetFastValue(fileConfig, 'xhrSettings', {}));\n }\n\n /**\n * The XMLHttpRequest instance (as created by XHR Loader) that is loading this File.\n *\n * @name Phaser.Loader.File#xhrLoader\n * @type {?XMLHttpRequest}\n * @since 3.0.0\n */\n this.xhrLoader = null;\n\n /**\n * The current state of the file. One of the FILE_CONST values.\n *\n * @name Phaser.Loader.File#state\n * @type {integer}\n * @since 3.0.0\n */\n this.state = (typeof(this.url) === 'function') ? CONST.FILE_POPULATED : CONST.FILE_PENDING;\n\n /**\n * The total size of this file.\n * Set by onProgress and only if loading via XHR.\n *\n * @name Phaser.Loader.File#bytesTotal\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.bytesTotal = 0;\n\n /**\n * Updated as the file loads.\n * Only set if loading via XHR.\n *\n * @name Phaser.Loader.File#bytesLoaded\n * @type {number}\n * @default -1\n * @since 3.0.0\n */\n this.bytesLoaded = -1;\n\n /**\n * A percentage value between 0 and 1 indicating how much of this file has loaded.\n * Only set if loading via XHR.\n *\n * @name Phaser.Loader.File#percentComplete\n * @type {number}\n * @default -1\n * @since 3.0.0\n */\n this.percentComplete = -1;\n\n /**\n * For CORs based loading.\n * If this is undefined then the File will check BaseLoader.crossOrigin and use that (if set)\n *\n * @name Phaser.Loader.File#crossOrigin\n * @type {(string|undefined)}\n * @since 3.0.0\n */\n this.crossOrigin = undefined;\n\n /**\n * The processed file data, stored here after the file has loaded.\n *\n * @name Phaser.Loader.File#data\n * @type {*}\n * @since 3.0.0\n */\n this.data = undefined;\n\n /**\n * A config object that can be used by file types to store transitional data.\n *\n * @name Phaser.Loader.File#config\n * @type {*}\n * @since 3.0.0\n */\n this.config = GetFastValue(fileConfig, 'config', {});\n\n /**\n * If this is a multipart file, i.e. an atlas and its json together, then this is a reference\n * to the parent MultiFile. Set and used internally by the Loader or specific file types.\n *\n * @name Phaser.Loader.File#multiFile\n * @type {?Phaser.Loader.MultiFile}\n * @since 3.7.0\n */\n this.multiFile;\n\n /**\n * Does this file have an associated linked file? Such as an image and a normal map.\n * Atlases and Bitmap Fonts use the multiFile, because those files need loading together but aren't\n * actually bound by data, where-as a linkFile is.\n *\n * @name Phaser.Loader.File#linkFile\n * @type {?Phaser.Loader.File}\n * @since 3.7.0\n */\n this.linkFile;\n },\n\n /**\n * Links this File with another, so they depend upon each other for loading and processing.\n *\n * @method Phaser.Loader.File#setLink\n * @since 3.7.0\n *\n * @param {Phaser.Loader.File} fileB - The file to link to this one.\n */\n setLink: function (fileB)\n {\n this.linkFile = fileB;\n\n fileB.linkFile = this;\n },\n\n /**\n * Resets the XHRLoader instance this file is using.\n *\n * @method Phaser.Loader.File#resetXHR\n * @since 3.0.0\n */\n resetXHR: function ()\n {\n if (this.xhrLoader)\n {\n this.xhrLoader.onload = undefined;\n this.xhrLoader.onerror = undefined;\n this.xhrLoader.onprogress = undefined;\n }\n },\n\n /**\n * Called by the Loader, starts the actual file downloading.\n * During the load the methods onLoad, onError and onProgress are called, based on the XHR events.\n * You shouldn't normally call this method directly, it's meant to be invoked by the Loader.\n *\n * @method Phaser.Loader.File#load\n * @since 3.0.0\n */\n load: function ()\n {\n if (this.state === CONST.FILE_POPULATED)\n {\n // Can happen for example in a JSONFile if they've provided a JSON object instead of a URL\n this.loader.nextFile(this, true);\n }\n else\n {\n this.state = CONST.FILE_LOADING;\n\n this.src = GetURL(this, this.loader.baseURL);\n\n if (this.src.indexOf('data:') === 0)\n {\n console.warn('Local data URIs are not supported: ' + this.key);\n }\n else\n {\n // The creation of this XHRLoader starts the load process going.\n // It will automatically call the following, based on the load outcome:\n //\n // xhr.onload = this.onLoad\n // xhr.onerror = this.onError\n // xhr.onprogress = this.onProgress\n\n this.xhrLoader = XHRLoader(this, this.loader.xhr);\n }\n }\n },\n\n /**\n * Called when the file finishes loading, is sent a DOM ProgressEvent.\n *\n * @method Phaser.Loader.File#onLoad\n * @since 3.0.0\n *\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this load.\n */\n onLoad: function (xhr, event)\n {\n var localFileOk = ((xhr.responseURL && xhr.responseURL.indexOf('file://') === 0 && event.target.status === 0));\n\n var success = !(event.target && event.target.status !== 200) || localFileOk;\n\n // Handle HTTP status codes of 4xx and 5xx as errors, even if xhr.onerror was not called.\n if (xhr.readyState === 4 && xhr.status >= 400 && xhr.status <= 599)\n {\n success = false;\n }\n\n this.state = CONST.FILE_LOADED;\n\n this.resetXHR();\n\n this.loader.nextFile(this, success);\n },\n\n /**\n * Called if the file errors while loading, is sent a DOM ProgressEvent.\n *\n * @method Phaser.Loader.File#onError\n * @since 3.0.0\n *\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this error.\n */\n onError: function ()\n {\n this.resetXHR();\n\n this.loader.nextFile(this, false);\n },\n\n /**\n * Called during the file load progress. Is sent a DOM ProgressEvent.\n *\n * @method Phaser.Loader.File#onProgress\n * @fires Phaser.Loader.Events#FILE_PROGRESS\n * @since 3.0.0\n *\n * @param {ProgressEvent} event - The DOM ProgressEvent.\n */\n onProgress: function (event)\n {\n if (event.lengthComputable)\n {\n this.bytesLoaded = event.loaded;\n this.bytesTotal = event.total;\n\n this.percentComplete = Math.min((this.bytesLoaded / this.bytesTotal), 1);\n\n this.loader.emit(Events.FILE_PROGRESS, this, this.percentComplete);\n }\n },\n\n /**\n * Usually overridden by the FileTypes and is called by Loader.nextFile.\n * This method controls what extra work this File does with its loaded data, for example a JSON file will parse itself during this stage.\n *\n * @method Phaser.Loader.File#onProcess\n * @since 3.0.0\n */\n onProcess: function ()\n {\n this.state = CONST.FILE_PROCESSING;\n\n this.onProcessComplete();\n },\n\n /**\n * Called when the File has completed processing.\n * Checks on the state of its multifile, if set.\n *\n * @method Phaser.Loader.File#onProcessComplete\n * @since 3.7.0\n */\n onProcessComplete: function ()\n {\n this.state = CONST.FILE_COMPLETE;\n\n if (this.multiFile)\n {\n this.multiFile.onFileComplete(this);\n }\n\n this.loader.fileProcessComplete(this);\n },\n\n /**\n * Called when the File has completed processing but it generated an error.\n * Checks on the state of its multifile, if set.\n *\n * @method Phaser.Loader.File#onProcessError\n * @since 3.7.0\n */\n onProcessError: function ()\n {\n this.state = CONST.FILE_ERRORED;\n\n if (this.multiFile)\n {\n this.multiFile.onFileFailed(this);\n }\n\n this.loader.fileProcessComplete(this);\n },\n\n /**\n * Checks if a key matching the one used by this file exists in the target Cache or not.\n * This is called automatically by the LoaderPlugin to decide if the file can be safely\n * loaded or will conflict.\n *\n * @method Phaser.Loader.File#hasCacheConflict\n * @since 3.7.0\n *\n * @return {boolean} `true` if adding this file will cause a conflict, otherwise `false`.\n */\n hasCacheConflict: function ()\n {\n return (this.cache && this.cache.exists(this.key));\n },\n\n /**\n * Adds this file to its target cache upon successful loading and processing.\n * This method is often overridden by specific file types.\n *\n * @method Phaser.Loader.File#addToCache\n * @since 3.7.0\n */\n addToCache: function ()\n {\n if (this.cache)\n {\n this.cache.add(this.key, this.data);\n }\n\n this.pendingDestroy();\n },\n\n /**\n * Called once the file has been added to its cache and is now ready for deletion from the Loader.\n * It will emit a `filecomplete` event from the LoaderPlugin.\n *\n * @method Phaser.Loader.File#pendingDestroy\n * @fires Phaser.Loader.Events#FILE_COMPLETE\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\n * @since 3.7.0\n */\n pendingDestroy: function (data)\n {\n if (data === undefined) { data = this.data; }\n\n var key = this.key;\n var type = this.type;\n\n this.loader.emit(Events.FILE_COMPLETE, key, type, data);\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type, data);\n\n this.loader.flagForRemoval(this);\n },\n\n /**\n * Destroy this File and any references it holds.\n *\n * @method Phaser.Loader.File#destroy\n * @since 3.7.0\n */\n destroy: function ()\n {\n this.loader = null;\n this.cache = null;\n this.xhrSettings = null;\n this.multiFile = null;\n this.linkFile = null;\n this.data = null;\n }\n\n});\n\n/**\n * Static method for creating object URL using URL API and setting it as image 'src' attribute.\n * If URL API is not supported (usually on old browsers) it falls back to creating Base64 encoded url using FileReader.\n *\n * @method Phaser.Loader.File.createObjectURL\n * @static\n * @since 3.7.0\n *\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be set to object URL.\n * @param {Blob} blob - A Blob object to create an object URL for.\n * @param {string} defaultType - Default mime type used if blob type is not available.\n */\nFile.createObjectURL = function (image, blob, defaultType)\n{\n if (typeof URL === 'function')\n {\n image.src = URL.createObjectURL(blob);\n }\n else\n {\n var reader = new FileReader();\n\n reader.onload = function ()\n {\n image.removeAttribute('crossOrigin');\n image.src = 'data:' + (blob.type || defaultType) + ';base64,' + reader.result.split(',')[1];\n };\n\n reader.onerror = image.onerror;\n\n reader.readAsDataURL(blob);\n }\n};\n\n/**\n * Static method for releasing an existing object URL which was previously created\n * by calling {@link File#createObjectURL} method.\n *\n * @method Phaser.Loader.File.revokeObjectURL\n * @static\n * @since 3.7.0\n *\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be revoked.\n */\nFile.revokeObjectURL = function (image)\n{\n if (typeof URL === 'function')\n {\n URL.revokeObjectURL(image.src);\n }\n};\n\nmodule.exports = File;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar types = {};\n\n/**\n * @namespace Phaser.Loader.FileTypesManager\n */\n\nvar FileTypesManager = {\n\n /**\n * Static method called when a LoaderPlugin is created.\n * \n * Loops through the local types object and injects all of them as\n * properties into the LoaderPlugin instance.\n *\n * @method Phaser.Loader.FileTypesManager.install\n * @since 3.0.0\n * \n * @param {Phaser.Loader.LoaderPlugin} loader - The LoaderPlugin to install the types into.\n */\n install: function (loader)\n {\n for (var key in types)\n {\n loader[key] = types[key];\n }\n },\n\n /**\n * Static method called directly by the File Types.\n * \n * The key is a reference to the function used to load the files via the Loader, i.e. `image`.\n *\n * @method Phaser.Loader.FileTypesManager.register\n * @since 3.0.0\n * \n * @param {string} key - The key that will be used as the method name in the LoaderPlugin.\n * @param {function} factoryFunction - The function that will be called when LoaderPlugin.key is invoked.\n */\n register: function (key, factoryFunction)\n {\n types[key] = factoryFunction;\n },\n\n /**\n * Removed all associated file types.\n *\n * @method Phaser.Loader.FileTypesManager.destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n types = {};\n }\n\n};\n\nmodule.exports = FileTypesManager;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Given a File and a baseURL value this returns the URL the File will use to download from.\n *\n * @function Phaser.Loader.GetURL\n * @since 3.0.0\n *\n * @param {Phaser.Loader.File} file - The File object.\n * @param {string} baseURL - A default base URL.\n *\n * @return {string} The URL the File will use.\n */\nvar GetURL = function (file, baseURL)\n{\n if (!file.url)\n {\n return false;\n }\n\n if (file.url.match(/^(?:blob:|data:|http:\\/\\/|https:\\/\\/|\\/\\/)/))\n {\n return file.url;\n }\n else\n {\n return baseURL + file.url;\n }\n};\n\nmodule.exports = GetURL;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Extend = require('../utils/object/Extend');\nvar XHRSettings = require('./XHRSettings');\n\n/**\n * Takes two XHRSettings Objects and creates a new XHRSettings object from them.\n *\n * The new object is seeded by the values given in the global settings, but any setting in\n * the local object overrides the global ones.\n *\n * @function Phaser.Loader.MergeXHRSettings\n * @since 3.0.0\n *\n * @param {Phaser.Types.Loader.XHRSettingsObject} global - The global XHRSettings object.\n * @param {Phaser.Types.Loader.XHRSettingsObject} local - The local XHRSettings object.\n *\n * @return {Phaser.Types.Loader.XHRSettingsObject} A newly formed XHRSettings object.\n */\nvar MergeXHRSettings = function (global, local)\n{\n var output = (global === undefined) ? XHRSettings() : Extend({}, global);\n\n if (local)\n {\n for (var setting in local)\n {\n if (local[setting] !== undefined)\n {\n output[setting] = local[setting];\n }\n }\n }\n\n return output;\n};\n\nmodule.exports = MergeXHRSettings;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../utils/Class');\n\n/**\n * @classdesc\n * A MultiFile is a special kind of parent that contains two, or more, Files as children and looks after\n * the loading and processing of them all. It is commonly extended and used as a base class for file types such as AtlasJSON or BitmapFont.\n * \n * You shouldn't create an instance of a MultiFile directly, but should extend it with your own class, setting a custom type and processing methods.\n *\n * @class MultiFile\n * @memberof Phaser.Loader\n * @constructor\n * @since 3.7.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\n * @param {string} type - The file type string for sorting within the Loader.\n * @param {string} key - The key of the file within the loader.\n * @param {Phaser.Loader.File[]} files - An array of Files that make-up this MultiFile.\n */\nvar MultiFile = new Class({\n\n initialize:\n\n function MultiFile (loader, type, key, files)\n {\n /**\n * A reference to the Loader that is going to load this file.\n *\n * @name Phaser.Loader.MultiFile#loader\n * @type {Phaser.Loader.LoaderPlugin}\n * @since 3.7.0\n */\n this.loader = loader;\n\n /**\n * The file type string for sorting within the Loader.\n *\n * @name Phaser.Loader.MultiFile#type\n * @type {string}\n * @since 3.7.0\n */\n this.type = type;\n\n /**\n * Unique cache key (unique within its file type)\n *\n * @name Phaser.Loader.MultiFile#key\n * @type {string}\n * @since 3.7.0\n */\n this.key = key;\n\n /**\n * The current index being used by multi-file loaders to avoid key clashes.\n *\n * @name Phaser.Loader.MultiFile#multiKeyIndex\n * @type {integer}\n * @private\n * @since 3.20.0\n */\n this.multiKeyIndex = loader.multiKeyIndex++;\n\n /**\n * Array of files that make up this MultiFile.\n *\n * @name Phaser.Loader.MultiFile#files\n * @type {Phaser.Loader.File[]}\n * @since 3.7.0\n */\n this.files = files;\n\n /**\n * The completion status of this MultiFile.\n *\n * @name Phaser.Loader.MultiFile#complete\n * @type {boolean}\n * @default false\n * @since 3.7.0\n */\n this.complete = false;\n\n /**\n * The number of files to load.\n *\n * @name Phaser.Loader.MultiFile#pending\n * @type {integer}\n * @since 3.7.0\n */\n\n this.pending = files.length;\n\n /**\n * The number of files that failed to load.\n *\n * @name Phaser.Loader.MultiFile#failed\n * @type {integer}\n * @default 0\n * @since 3.7.0\n */\n this.failed = 0;\n\n /**\n * A storage container for transient data that the loading files need.\n *\n * @name Phaser.Loader.MultiFile#config\n * @type {any}\n * @since 3.7.0\n */\n this.config = {};\n\n /**\n * A reference to the Loaders baseURL at the time this MultiFile was created.\n * Used to populate child-files.\n *\n * @name Phaser.Loader.MultiFile#baseURL\n * @type {string}\n * @since 3.20.0\n */\n this.baseURL = loader.baseURL;\n\n /**\n * A reference to the Loaders path at the time this MultiFile was created.\n * Used to populate child-files.\n *\n * @name Phaser.Loader.MultiFile#path\n * @type {string}\n * @since 3.20.0\n */\n this.path = loader.path;\n\n /**\n * A reference to the Loaders prefix at the time this MultiFile was created.\n * Used to populate child-files.\n *\n * @name Phaser.Loader.MultiFile#prefix\n * @type {string}\n * @since 3.20.0\n */\n this.prefix = loader.prefix;\n\n // Link the files\n for (var i = 0; i < files.length; i++)\n {\n files[i].multiFile = this;\n }\n },\n\n /**\n * Checks if this MultiFile is ready to process its children or not.\n *\n * @method Phaser.Loader.MultiFile#isReadyToProcess\n * @since 3.7.0\n *\n * @return {boolean} `true` if all children of this MultiFile have loaded, otherwise `false`.\n */\n isReadyToProcess: function ()\n {\n return (this.pending === 0 && this.failed === 0 && !this.complete);\n },\n\n /**\n * Adds another child to this MultiFile, increases the pending count and resets the completion status.\n *\n * @method Phaser.Loader.MultiFile#addToMultiFile\n * @since 3.7.0\n *\n * @param {Phaser.Loader.File} files - The File to add to this MultiFile.\n *\n * @return {Phaser.Loader.MultiFile} This MultiFile instance.\n */\n addToMultiFile: function (file)\n {\n this.files.push(file);\n\n file.multiFile = this;\n\n this.pending++;\n\n this.complete = false;\n\n return this;\n },\n\n /**\n * Called by each File when it finishes loading.\n *\n * @method Phaser.Loader.MultiFile#onFileComplete\n * @since 3.7.0\n *\n * @param {Phaser.Loader.File} file - The File that has completed processing.\n */\n onFileComplete: function (file)\n {\n var index = this.files.indexOf(file);\n\n if (index !== -1)\n {\n this.pending--;\n }\n },\n\n /**\n * Called by each File that fails to load.\n *\n * @method Phaser.Loader.MultiFile#onFileFailed\n * @since 3.7.0\n *\n * @param {Phaser.Loader.File} file - The File that has failed to load.\n */\n onFileFailed: function (file)\n {\n var index = this.files.indexOf(file);\n\n if (index !== -1)\n {\n this.failed++;\n }\n }\n\n});\n\nmodule.exports = MultiFile;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar MergeXHRSettings = require('./MergeXHRSettings');\n\n/**\n * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings\n * and starts the download of it. It uses the Files own XHRSettings and merges them\n * with the global XHRSettings object to set the xhr values before download.\n *\n * @function Phaser.Loader.XHRLoader\n * @since 3.0.0\n *\n * @param {Phaser.Loader.File} file - The File to download.\n * @param {Phaser.Types.Loader.XHRSettingsObject} globalXHRSettings - The global XHRSettings object.\n *\n * @return {XMLHttpRequest} The XHR object.\n */\nvar XHRLoader = function (file, globalXHRSettings)\n{\n var config = MergeXHRSettings(globalXHRSettings, file.xhrSettings);\n\n var xhr = new XMLHttpRequest();\n\n xhr.open('GET', file.src, config.async, config.user, config.password);\n\n xhr.responseType = file.xhrSettings.responseType;\n xhr.timeout = config.timeout;\n\n if (config.headers)\n {\n for (var key in config.headers)\n {\n xhr.setRequestHeader(key, config.headers[key]);\n }\n }\n\n if (config.header && config.headerValue)\n {\n xhr.setRequestHeader(config.header, config.headerValue);\n }\n\n if (config.requestedWith)\n {\n xhr.setRequestHeader('X-Requested-With', config.requestedWith);\n }\n\n if (config.overrideMimeType)\n {\n xhr.overrideMimeType(config.overrideMimeType);\n }\n\n if (config.withCredentials)\n {\n xhr.withCredentials = true;\n }\n\n // After a successful request, the xhr.response property will contain the requested data as a DOMString, ArrayBuffer, Blob, or Document (depending on what was set for responseType.)\n\n xhr.onload = file.onLoad.bind(file, xhr);\n xhr.onerror = file.onError.bind(file, xhr);\n xhr.onprogress = file.onProgress.bind(file);\n\n // This is the only standard method, the ones above are browser additions (maybe not universal?)\n // xhr.onreadystatechange\n\n xhr.send();\n\n return xhr;\n};\n\nmodule.exports = XHRLoader;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Creates an XHRSettings Object with default values.\n *\n * @function Phaser.Loader.XHRSettings\n * @since 3.0.0\n *\n * @param {XMLHttpRequestResponseType} [responseType=''] - The responseType, such as 'text'.\n * @param {boolean} [async=true] - Should the XHR request use async or not?\n * @param {string} [user=''] - Optional username for the XHR request.\n * @param {string} [password=''] - Optional password for the XHR request.\n * @param {integer} [timeout=0] - Optional XHR timeout value.\n * @param {boolean} [withCredentials=false] - Optional XHR withCredentials value.\n *\n * @return {Phaser.Types.Loader.XHRSettingsObject} The XHRSettings object as used by the Loader.\n */\nvar XHRSettings = function (responseType, async, user, password, timeout, withCredentials)\n{\n if (responseType === undefined) { responseType = ''; }\n if (async === undefined) { async = true; }\n if (user === undefined) { user = ''; }\n if (password === undefined) { password = ''; }\n if (timeout === undefined) { timeout = 0; }\n if (withCredentials === undefined) { withCredentials = false; }\n\n // Before sending a request, set the xhr.responseType to \"text\",\n // \"arraybuffer\", \"blob\", or \"document\", depending on your data needs.\n // Note, setting xhr.responseType = '' (or omitting) will default the response to \"text\".\n\n return {\n\n // Ignored by the Loader, only used by File.\n responseType: responseType,\n\n async: async,\n\n // credentials\n user: user,\n password: password,\n\n // timeout in ms (0 = no timeout)\n timeout: timeout,\n\n // setRequestHeader\n headers: undefined,\n header: undefined,\n headerValue: undefined,\n requestedWith: false,\n\n // overrideMimeType\n overrideMimeType: undefined,\n\n // withCredentials\n withCredentials: withCredentials\n\n };\n};\n\nmodule.exports = XHRSettings;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar FILE_CONST = {\n\n /**\n * The Loader is idle.\n * \n * @name Phaser.Loader.LOADER_IDLE\n * @type {integer}\n * @since 3.0.0\n */\n LOADER_IDLE: 0,\n\n /**\n * The Loader is actively loading.\n * \n * @name Phaser.Loader.LOADER_LOADING\n * @type {integer}\n * @since 3.0.0\n */\n LOADER_LOADING: 1,\n\n /**\n * The Loader is processing files is has loaded.\n * \n * @name Phaser.Loader.LOADER_PROCESSING\n * @type {integer}\n * @since 3.0.0\n */\n LOADER_PROCESSING: 2,\n\n /**\n * The Loader has completed loading and processing.\n * \n * @name Phaser.Loader.LOADER_COMPLETE\n * @type {integer}\n * @since 3.0.0\n */\n LOADER_COMPLETE: 3,\n\n /**\n * The Loader is shutting down.\n * \n * @name Phaser.Loader.LOADER_SHUTDOWN\n * @type {integer}\n * @since 3.0.0\n */\n LOADER_SHUTDOWN: 4,\n\n /**\n * The Loader has been destroyed.\n * \n * @name Phaser.Loader.LOADER_DESTROYED\n * @type {integer}\n * @since 3.0.0\n */\n LOADER_DESTROYED: 5,\n\n /**\n * File is in the load queue but not yet started\n * \n * @name Phaser.Loader.FILE_PENDING\n * @type {integer}\n * @since 3.0.0\n */\n FILE_PENDING: 10,\n\n /**\n * File has been started to load by the loader (onLoad called)\n * \n * @name Phaser.Loader.FILE_LOADING\n * @type {integer}\n * @since 3.0.0\n */\n FILE_LOADING: 11,\n\n /**\n * File has loaded successfully, awaiting processing \n * \n * @name Phaser.Loader.FILE_LOADED\n * @type {integer}\n * @since 3.0.0\n */\n FILE_LOADED: 12,\n\n /**\n * File failed to load\n * \n * @name Phaser.Loader.FILE_FAILED\n * @type {integer}\n * @since 3.0.0\n */\n FILE_FAILED: 13,\n\n /**\n * File is being processed (onProcess callback)\n * \n * @name Phaser.Loader.FILE_PROCESSING\n * @type {integer}\n * @since 3.0.0\n */\n FILE_PROCESSING: 14,\n\n /**\n * The File has errored somehow during processing.\n * \n * @name Phaser.Loader.FILE_ERRORED\n * @type {integer}\n * @since 3.0.0\n */\n FILE_ERRORED: 16,\n\n /**\n * File has finished processing.\n * \n * @name Phaser.Loader.FILE_COMPLETE\n * @type {integer}\n * @since 3.0.0\n */\n FILE_COMPLETE: 17,\n\n /**\n * File has been destroyed\n * \n * @name Phaser.Loader.FILE_DESTROYED\n * @type {integer}\n * @since 3.0.0\n */\n FILE_DESTROYED: 18,\n\n /**\n * File was populated from local data and doesn't need an HTTP request\n * \n * @name Phaser.Loader.FILE_POPULATED\n * @type {integer}\n * @since 3.0.0\n */\n FILE_POPULATED: 19\n\n};\n\nmodule.exports = FILE_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Loader Plugin Add File Event.\n * \n * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue.\n * \n * Listen to it from a Scene using: `this.load.on('addfile', listener)`.\n * \n * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them.\n *\n * @event Phaser.Loader.Events#ADD\n * @since 3.0.0\n * \n * @param {string} key - The unique key of the file that was added to the Loader.\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} string of the file that was added to the Loader, i.e. `image`.\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\n * @param {Phaser.Loader.File} file - A reference to the File which was added to the Loader.\n */\nmodule.exports = 'addfile';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Loader Plugin Complete Event.\n * \n * This event is dispatched when the Loader has fully processed everything in the load queue.\n * By this point every loaded file will now be in its associated cache and ready for use.\n * \n * Listen to it from a Scene using: `this.load.on('complete', listener)`.\n *\n * @event Phaser.Loader.Events#COMPLETE\n * @since 3.0.0\n * \n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\n * @param {integer} totalComplete - The total number of files that successfully loaded.\n * @param {integer} totalFailed - The total number of files that failed to load.\n */\nmodule.exports = 'complete';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The File Load Complete Event.\n * \n * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.\n * \n * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`.\n * \n * You can also listen for the completion of a specific file. See the [FILE_KEY_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_KEY_COMPLETE} event.\n *\n * @event Phaser.Loader.Events#FILE_COMPLETE\n * @since 3.0.0\n * \n * @param {string} key - The key of the file that just loaded and finished processing.\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\n * @param {any} data - The raw data the file contained.\n */\nmodule.exports = 'filecomplete';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The File Load Complete Event.\n * \n * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.\n * \n * It uses a special dynamic event name constructed from the key and type of the file.\n * \n * For example, if you have loaded an `image` with a key of `monster`, you can listen for it\n * using the following:\n *\n * ```javascript\n * this.load.on('filecomplete-image-monster', function (key, type, data) {\n * // Your handler code\n * });\n * ```\n *\n * Or, if you have loaded a texture `atlas` with a key of `Level1`:\n * \n * ```javascript\n * this.load.on('filecomplete-atlas-Level1', function (key, type, data) {\n * // Your handler code\n * });\n * ```\n * \n * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`:\n * \n * ```javascript\n * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) {\n * // Your handler code\n * });\n * ```\n * \n * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event.\n *\n * @event Phaser.Loader.Events#FILE_KEY_COMPLETE\n * @since 3.0.0\n * \n * @param {string} key - The key of the file that just loaded and finished processing.\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\n * @param {any} data - The raw data the file contained.\n */\nmodule.exports = 'filecomplete-';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The File Load Error Event.\n * \n * This event is dispatched by the Loader Plugin when a file fails to load.\n * \n * Listen to it from a Scene using: `this.load.on('loaderror', listener)`.\n *\n * @event Phaser.Loader.Events#FILE_LOAD_ERROR\n * @since 3.0.0\n * \n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\n */\nmodule.exports = 'loaderror';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The File Load Event.\n * \n * This event is dispatched by the Loader Plugin when a file finishes loading,\n * but _before_ it is processed and added to the internal Phaser caches.\n * \n * Listen to it from a Scene using: `this.load.on('load', listener)`.\n *\n * @event Phaser.Loader.Events#FILE_LOAD\n * @since 3.0.0\n * \n * @param {Phaser.Loader.File} file - A reference to the File which just finished loading.\n */\nmodule.exports = 'load';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The File Load Progress Event.\n * \n * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and\n * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen.\n * \n * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`.\n *\n * @event Phaser.Loader.Events#FILE_PROGRESS\n * @since 3.0.0\n * \n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\n * @param {number} percentComplete - A value between 0 and 1 indicating how 'complete' this file is.\n */\nmodule.exports = 'fileprogress';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Loader Plugin Post Process Event.\n * \n * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue.\n * It is dispatched before the internal lists are cleared and each File is destroyed.\n * \n * Use this hook to perform any last minute processing of files that can only happen once the\n * Loader has completed, but prior to it emitting the `complete` event.\n * \n * Listen to it from a Scene using: `this.load.on('postprocess', listener)`.\n *\n * @event Phaser.Loader.Events#POST_PROCESS\n * @since 3.0.0\n * \n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\n */\nmodule.exports = 'postprocess';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Loader Plugin Progress Event.\n * \n * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading.\n * \n * Listen to it from a Scene using: `this.load.on('progress', listener)`.\n *\n * @event Phaser.Loader.Events#PROGRESS\n * @since 3.0.0\n * \n * @param {number} progress - The current progress of the load. A value between 0 and 1.\n */\nmodule.exports = 'progress';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Loader Plugin Start Event.\n * \n * This event is dispatched when the Loader starts running. At this point load progress is zero.\n * \n * This event is dispatched even if there aren't any files in the load queue.\n * \n * Listen to it from a Scene using: `this.load.on('start', listener)`.\n *\n * @event Phaser.Loader.Events#START\n * @since 3.0.0\n * \n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\n */\nmodule.exports = 'start';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Loader.Events\n */\n\nmodule.exports = {\n\n ADD: require('./ADD_EVENT'),\n COMPLETE: require('./COMPLETE_EVENT'),\n FILE_COMPLETE: require('./FILE_COMPLETE_EVENT'),\n FILE_KEY_COMPLETE: require('./FILE_KEY_COMPLETE_EVENT'),\n FILE_LOAD_ERROR: require('./FILE_LOAD_ERROR_EVENT'),\n FILE_LOAD: require('./FILE_LOAD_EVENT'),\n FILE_PROGRESS: require('./FILE_PROGRESS_EVENT'),\n POST_PROCESS: require('./POST_PROCESS_EVENT'),\n PROGRESS: require('./PROGRESS_EVENT'),\n START: require('./START_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar CONST = require('../const');\nvar File = require('../File');\nvar FileTypesManager = require('../FileTypesManager');\nvar GetFastValue = require('../../utils/object/GetFastValue');\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\n\n/**\n * @classdesc\n * A single Image File suitable for loading by the Loader.\n *\n * These are created when you use the Phaser.Loader.LoaderPlugin#image method and are not typically created directly.\n *\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#image.\n *\n * @class ImageFile\n * @extends Phaser.Loader.File\n * @memberof Phaser.Loader.FileTypes\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig)} key - The key to use for this file, or a file configuration object.\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\n * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. Only provided for, and used by, Sprite Sheets.\n */\nvar ImageFile = new Class({\n\n Extends: File,\n\n initialize:\n\n function ImageFile (loader, key, url, xhrSettings, frameConfig)\n {\n var extension = 'png';\n var normalMapURL;\n\n if (IsPlainObject(key))\n {\n var config = key;\n\n key = GetFastValue(config, 'key');\n url = GetFastValue(config, 'url');\n normalMapURL = GetFastValue(config, 'normalMap');\n xhrSettings = GetFastValue(config, 'xhrSettings');\n extension = GetFastValue(config, 'extension', extension);\n frameConfig = GetFastValue(config, 'frameConfig');\n }\n\n if (Array.isArray(url))\n {\n normalMapURL = url[1];\n url = url[0];\n }\n\n var fileConfig = {\n type: 'image',\n cache: loader.textureManager,\n extension: extension,\n responseType: 'blob',\n key: key,\n url: url,\n xhrSettings: xhrSettings,\n config: frameConfig\n };\n\n File.call(this, loader, fileConfig);\n\n // Do we have a normal map to load as well?\n if (normalMapURL)\n {\n var normalMap = new ImageFile(loader, this.key, normalMapURL, xhrSettings, frameConfig);\n\n normalMap.type = 'normalMap';\n\n this.setLink(normalMap);\n\n loader.addFile(normalMap);\n }\n },\n\n /**\n * Called automatically by Loader.nextFile.\n * This method controls what extra work this File does with its loaded data.\n *\n * @method Phaser.Loader.FileTypes.ImageFile#onProcess\n * @since 3.7.0\n */\n onProcess: function ()\n {\n this.state = CONST.FILE_PROCESSING;\n\n this.data = new Image();\n\n this.data.crossOrigin = this.crossOrigin;\n\n var _this = this;\n\n this.data.onload = function ()\n {\n File.revokeObjectURL(_this.data);\n\n _this.onProcessComplete();\n };\n\n this.data.onerror = function ()\n {\n File.revokeObjectURL(_this.data);\n\n _this.onProcessError();\n };\n\n File.createObjectURL(this.data, this.xhrLoader.response, 'image/png');\n },\n\n /**\n * Adds this file to its target cache upon successful loading and processing.\n *\n * @method Phaser.Loader.FileTypes.ImageFile#addToCache\n * @since 3.7.0\n */\n addToCache: function ()\n {\n var texture;\n var linkFile = this.linkFile;\n\n if (linkFile && linkFile.state === CONST.FILE_COMPLETE)\n {\n if (this.type === 'image')\n {\n texture = this.cache.addImage(this.key, this.data, linkFile.data);\n }\n else\n {\n texture = this.cache.addImage(linkFile.key, linkFile.data, this.data);\n }\n\n this.pendingDestroy(texture);\n\n linkFile.pendingDestroy(texture);\n }\n else if (!linkFile)\n {\n texture = this.cache.addImage(this.key, this.data);\n\n this.pendingDestroy(texture);\n }\n }\n\n});\n\n/**\n * Adds an Image, or array of Images, to the current load queue.\n *\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\n *\n * ```javascript\n * function preload ()\n * {\n * this.load.image('logo', 'images/phaserLogo.png');\n * }\n * ```\n *\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\n * loaded.\n *\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\n * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback\n * of animated gifs to Canvas elements.\n *\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\n * then remove it from the Texture Manager first, before loading a new one.\n *\n * Instead of passing arguments you can pass a configuration object, such as:\n *\n * ```javascript\n * this.load.image({\n * key: 'logo',\n * url: 'images/AtariLogo.png'\n * });\n * ```\n *\n * See the documentation for `Phaser.Types.Loader.FileTypes.ImageFileConfig` for more details.\n *\n * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:\n *\n * ```javascript\n * this.load.image('logo', 'images/AtariLogo.png');\n * // and later in your game ...\n * this.add.image(x, y, 'logo');\n * ```\n *\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\n * this is what you would use to retrieve the image from the Texture Manager.\n *\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\n *\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\n *\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\n *\n * ```javascript\n * this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]);\n * ```\n *\n * Or, if you are using a config object use the `normalMap` property:\n *\n * ```javascript\n * this.load.image({\n * key: 'logo',\n * url: 'images/AtariLogo.png',\n * normalMap: 'images/AtariLogo-n.png'\n * });\n * ```\n *\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\n * Normal maps are a WebGL only feature.\n *\n * Note: The ability to load this type of file will only be available if the Image File type has been built into Phaser.\n * It is available in the default build but can be excluded from custom builds.\n *\n * @method Phaser.Loader.LoaderPlugin#image\n * @fires Phaser.Loader.LoaderPlugin#ADD\n * @since 3.0.0\n *\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig|Phaser.Types.Loader.FileTypes.ImageFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\n *\n * @return {this} The Loader instance.\n */\nFileTypesManager.register('image', function (key, url, xhrSettings)\n{\n if (Array.isArray(key))\n {\n for (var i = 0; i < key.length; i++)\n {\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\n this.addFile(new ImageFile(this, key[i]));\n }\n }\n else\n {\n this.addFile(new ImageFile(this, key, url, xhrSettings));\n }\n\n return this;\n});\n\nmodule.exports = ImageFile;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar CONST = require('../const');\nvar File = require('../File');\nvar FileTypesManager = require('../FileTypesManager');\nvar GetFastValue = require('../../utils/object/GetFastValue');\nvar GetValue = require('../../utils/object/GetValue');\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\n\n/**\n * @classdesc\n * A single JSON File suitable for loading by the Loader.\n *\n * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly.\n *\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json.\n *\n * @class JSONFile\n * @extends Phaser.Loader.File\n * @memberof Phaser.Loader.FileTypes\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object.\n * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\n */\nvar JSONFile = new Class({\n\n Extends: File,\n\n initialize:\n\n // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object\n // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing\n\n function JSONFile (loader, key, url, xhrSettings, dataKey)\n {\n var extension = 'json';\n\n if (IsPlainObject(key))\n {\n var config = key;\n\n key = GetFastValue(config, 'key');\n url = GetFastValue(config, 'url');\n xhrSettings = GetFastValue(config, 'xhrSettings');\n extension = GetFastValue(config, 'extension', extension);\n dataKey = GetFastValue(config, 'dataKey', dataKey);\n }\n\n var fileConfig = {\n type: 'json',\n cache: loader.cacheManager.json,\n extension: extension,\n responseType: 'text',\n key: key,\n url: url,\n xhrSettings: xhrSettings,\n config: dataKey\n };\n\n File.call(this, loader, fileConfig);\n\n if (IsPlainObject(url))\n {\n // Object provided instead of a URL, so no need to actually load it (populate data with value)\n if (dataKey)\n {\n this.data = GetValue(url, dataKey);\n }\n else\n {\n this.data = url;\n }\n\n this.state = CONST.FILE_POPULATED;\n }\n },\n\n /**\n * Called automatically by Loader.nextFile.\n * This method controls what extra work this File does with its loaded data.\n *\n * @method Phaser.Loader.FileTypes.JSONFile#onProcess\n * @since 3.7.0\n */\n onProcess: function ()\n {\n if (this.state !== CONST.FILE_POPULATED)\n {\n this.state = CONST.FILE_PROCESSING;\n\n var json = JSON.parse(this.xhrLoader.responseText);\n\n var key = this.config;\n\n if (typeof key === 'string')\n {\n this.data = GetValue(json, key, json);\n }\n else\n {\n this.data = json;\n }\n }\n\n this.onProcessComplete();\n }\n\n});\n\n/**\n * Adds a JSON file, or array of JSON files, to the current load queue.\n *\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\n *\n * ```javascript\n * function preload ()\n * {\n * this.load.json('wavedata', 'files/AlienWaveData.json');\n * }\n * ```\n *\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\n * loaded.\n *\n * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.\n * The key should be unique both in terms of files being loaded and files already present in the JSON Cache.\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\n * then remove it from the JSON Cache first, before loading a new one.\n *\n * Instead of passing arguments you can pass a configuration object, such as:\n *\n * ```javascript\n * this.load.json({\n * key: 'wavedata',\n * url: 'files/AlienWaveData.json'\n * });\n * ```\n *\n * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details.\n *\n * Once the file has finished loading you can access it from its Cache using its key:\n *\n * ```javascript\n * this.load.json('wavedata', 'files/AlienWaveData.json');\n * // and later in your game ...\n * var data = this.cache.json.get('wavedata');\n * ```\n *\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\n * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and\n * this is what you would use to retrieve the text from the JSON Cache.\n *\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\n *\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"data\"\n * and no URL is given then the Loader will set the URL to be \"data.json\". It will always add `.json` as the extension, although\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\n *\n * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache,\n * rather than the whole file. For example, if your JSON data had a structure like this:\n *\n * ```json\n * {\n * \"level1\": {\n * \"baddies\": {\n * \"aliens\": {},\n * \"boss\": {}\n * }\n * },\n * \"level2\": {},\n * \"level3\": {}\n * }\n * ```\n *\n * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`.\n *\n * Note: The ability to load this type of file will only be available if the JSON File type has been built into Phaser.\n * It is available in the default build but can be excluded from custom builds.\n *\n * @method Phaser.Loader.LoaderPlugin#json\n * @fires Phaser.Loader.LoaderPlugin#ADD\n * @since 3.0.0\n *\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\n * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\". Or, can be a fully formed JSON Object.\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\n *\n * @return {this} The Loader instance.\n */\nFileTypesManager.register('json', function (key, url, dataKey, xhrSettings)\n{\n if (Array.isArray(key))\n {\n for (var i = 0; i < key.length; i++)\n {\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\n this.addFile(new JSONFile(this, key[i]));\n }\n }\n else\n {\n this.addFile(new JSONFile(this, key, url, xhrSettings, dataKey));\n }\n\n return this;\n});\n\nmodule.exports = JSONFile;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\nvar CONST = require('../const');\nvar File = require('../File');\nvar FileTypesManager = require('../FileTypesManager');\nvar GetFastValue = require('../../utils/object/GetFastValue');\nvar IsPlainObject = require('../../utils/object/IsPlainObject');\n\n/**\n * @classdesc\n * A single Text File suitable for loading by the Loader.\n *\n * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly.\n *\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text.\n *\n * @class TextFile\n * @extends Phaser.Loader.File\n * @memberof Phaser.Loader.FileTypes\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig)} key - The key to use for this file, or a file configuration object.\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\n */\nvar TextFile = new Class({\n\n Extends: File,\n\n initialize:\n\n function TextFile (loader, key, url, xhrSettings)\n {\n var extension = 'txt';\n\n if (IsPlainObject(key))\n {\n var config = key;\n\n key = GetFastValue(config, 'key');\n url = GetFastValue(config, 'url');\n xhrSettings = GetFastValue(config, 'xhrSettings');\n extension = GetFastValue(config, 'extension', extension);\n }\n\n var fileConfig = {\n type: 'text',\n cache: loader.cacheManager.text,\n extension: extension,\n responseType: 'text',\n key: key,\n url: url,\n xhrSettings: xhrSettings\n };\n\n File.call(this, loader, fileConfig);\n },\n\n /**\n * Called automatically by Loader.nextFile.\n * This method controls what extra work this File does with its loaded data.\n *\n * @method Phaser.Loader.FileTypes.TextFile#onProcess\n * @since 3.7.0\n */\n onProcess: function ()\n {\n this.state = CONST.FILE_PROCESSING;\n\n this.data = this.xhrLoader.responseText;\n\n this.onProcessComplete();\n }\n\n});\n\n/**\n * Adds a Text file, or array of Text files, to the current load queue.\n *\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\n *\n * ```javascript\n * function preload ()\n * {\n * this.load.text('story', 'files/IntroStory.txt');\n * }\n * ```\n *\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\n * loaded.\n *\n * The key must be a unique String. It is used to add the file to the global Text Cache upon a successful load.\n * The key should be unique both in terms of files being loaded and files already present in the Text Cache.\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\n * then remove it from the Text Cache first, before loading a new one.\n *\n * Instead of passing arguments you can pass a configuration object, such as:\n *\n * ```javascript\n * this.load.text({\n * key: 'story',\n * url: 'files/IntroStory.txt'\n * });\n * ```\n *\n * See the documentation for `Phaser.Types.Loader.FileTypes.TextFileConfig` for more details.\n *\n * Once the file has finished loading you can access it from its Cache using its key:\n *\n * ```javascript\n * this.load.text('story', 'files/IntroStory.txt');\n * // and later in your game ...\n * var data = this.cache.text.get('story');\n * ```\n *\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\n * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and\n * this is what you would use to retrieve the text from the Text Cache.\n *\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\n *\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"story\"\n * and no URL is given then the Loader will set the URL to be \"story.txt\". It will always add `.txt` as the extension, although\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\n *\n * Note: The ability to load this type of file will only be available if the Text File type has been built into Phaser.\n * It is available in the default build but can be excluded from custom builds.\n *\n * @method Phaser.Loader.LoaderPlugin#text\n * @fires Phaser.Loader.LoaderPlugin#ADD\n * @since 3.0.0\n *\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig|Phaser.Types.Loader.FileTypes.TextFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\n *\n * @return {this} The Loader instance.\n */\nFileTypesManager.register('text', function (key, url, xhrSettings)\n{\n if (Array.isArray(key))\n {\n for (var i = 0; i < key.length; i++)\n {\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\n this.addFile(new TextFile(this, key[i]));\n }\n }\n else\n {\n this.addFile(new TextFile(this, key, url, xhrSettings));\n }\n\n return this;\n});\n\nmodule.exports = TextFile;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the mean average of the given values.\n *\n * @function Phaser.Math.Average\n * @since 3.0.0\n *\n * @param {number[]} values - The values to average.\n *\n * @return {number} The average value.\n */\nvar Average = function (values)\n{\n var sum = 0;\n\n for (var i = 0; i < values.length; i++)\n {\n sum += (+values[i]);\n }\n\n return sum / values.length;\n};\n\nmodule.exports = Average;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Factorial = require('./Factorial');\n\n/**\n * Calculates the Bernstein basis from the three factorial coefficients.\n *\n * @function Phaser.Math.Bernstein\n * @since 3.0.0\n *\n * @param {number} n - The first value.\n * @param {number} i - The second value.\n *\n * @return {number} The Bernstein basis of Factorial(n) / Factorial(i) / Factorial(n - i)\n */\nvar Bernstein = function (n, i)\n{\n return Factorial(n) / Factorial(i) / Factorial(n - i);\n};\n\nmodule.exports = Bernstein;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Compute a random integer between the `min` and `max` values, inclusive.\n *\n * @function Phaser.Math.Between\n * @since 3.0.0\n *\n * @param {integer} min - The minimum value.\n * @param {integer} max - The maximum value.\n *\n * @return {integer} The random integer.\n */\nvar Between = function (min, max)\n{\n return Math.floor(Math.random() * (max - min + 1) + min);\n};\n\nmodule.exports = Between;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculates a Catmull-Rom value from the given points, based on an alpha of 0.5.\n *\n * @function Phaser.Math.CatmullRom\n * @since 3.0.0\n *\n * @param {number} t - The amount to interpolate by.\n * @param {number} p0 - The first control point.\n * @param {number} p1 - The second control point.\n * @param {number} p2 - The third control point.\n * @param {number} p3 - The fourth control point.\n *\n * @return {number} The Catmull-Rom value.\n */\nvar CatmullRom = function (t, p0, p1, p2, p3)\n{\n var v0 = (p2 - p0) * 0.5;\n var v1 = (p3 - p1) * 0.5;\n var t2 = t * t;\n var t3 = t * t2;\n\n return (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1;\n};\n\nmodule.exports = CatmullRom;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Ceils to some place comparative to a `base`, default is 10 for decimal place.\n *\n * The `place` is represented by the power applied to `base` to get that place.\n *\n * @function Phaser.Math.CeilTo\n * @since 3.0.0\n *\n * @param {number} value - The value to round.\n * @param {number} [place=0] - The place to round to.\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\n *\n * @return {number} The rounded value.\n */\nvar CeilTo = function (value, place, base)\n{\n if (place === undefined) { place = 0; }\n if (base === undefined) { base = 10; }\n\n var p = Math.pow(base, -place);\n\n return Math.ceil(value * p) / p;\n};\n\nmodule.exports = CeilTo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Force a value within the boundaries by clamping it to the range `min`, `max`.\n *\n * @function Phaser.Math.Clamp\n * @since 3.0.0\n *\n * @param {number} value - The value to be clamped.\n * @param {number} min - The minimum bounds.\n * @param {number} max - The maximum bounds.\n *\n * @return {number} The clamped value.\n */\nvar Clamp = function (value, min, max)\n{\n return Math.max(min, Math.min(max, value));\n};\n\nmodule.exports = Clamp;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CONST = require('./const');\n\n/**\n * Convert the given angle from degrees, to the equivalent angle in radians.\n *\n * @function Phaser.Math.DegToRad\n * @since 3.0.0\n *\n * @param {integer} degrees - The angle (in degrees) to convert to radians.\n *\n * @return {number} The given angle converted to radians.\n */\nvar DegToRad = function (degrees)\n{\n return degrees * CONST.DEG_TO_RAD;\n};\n\nmodule.exports = DegToRad;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculates the positive difference of two given numbers.\n *\n * @function Phaser.Math.Difference\n * @since 3.0.0\n *\n * @param {number} a - The first number in the calculation.\n * @param {number} b - The second number in the calculation.\n *\n * @return {number} The positive difference of the two given numbers.\n */\nvar Difference = function (a, b)\n{\n return Math.abs(a - b);\n};\n\nmodule.exports = Difference;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculates the factorial of a given number for integer values greater than 0.\n *\n * @function Phaser.Math.Factorial\n * @since 3.0.0\n *\n * @param {number} value - A positive integer to calculate the factorial of.\n *\n * @return {number} The factorial of the given number.\n */\nvar Factorial = function (value)\n{\n if (value === 0)\n {\n return 1;\n }\n\n var res = value;\n\n while (--value)\n {\n res *= value;\n }\n\n return res;\n};\n\nmodule.exports = Factorial;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive.\n *\n * @function Phaser.Math.FloatBetween\n * @since 3.0.0\n *\n * @param {number} min - The lower bound for the float, inclusive.\n * @param {number} max - The upper bound for the float exclusive.\n *\n * @return {number} A random float within the given range.\n */\nvar FloatBetween = function (min, max)\n{\n return Math.random() * (max - min) + min;\n};\n\nmodule.exports = FloatBetween;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Floors to some place comparative to a `base`, default is 10 for decimal place.\n *\n * The `place` is represented by the power applied to `base` to get that place.\n *\n * @function Phaser.Math.FloorTo\n * @since 3.0.0\n *\n * @param {number} value - The value to round.\n * @param {integer} [place=0] - The place to round to.\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\n *\n * @return {number} The rounded value.\n */\nvar FloorTo = function (value, place, base)\n{\n if (place === undefined) { place = 0; }\n if (base === undefined) { base = 10; }\n\n var p = Math.pow(base, -place);\n\n return Math.floor(value * p) / p;\n};\n\nmodule.exports = FloorTo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Clamp = require('./Clamp');\n\n/**\n * Return a value based on the range between `min` and `max` and the percentage given.\n *\n * @function Phaser.Math.FromPercent\n * @since 3.0.0\n *\n * @param {number} percent - A value between 0 and 1 representing the percentage.\n * @param {number} min - The minimum value.\n * @param {number} [max] - The maximum value.\n *\n * @return {number} The value that is `percent` percent between `min` and `max`.\n */\nvar FromPercent = function (percent, min, max)\n{\n percent = Clamp(percent, 0, 1);\n\n return (max - min) * percent;\n};\n\nmodule.exports = FromPercent;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate a per-ms speed from a distance and time (given in seconds).\n *\n * @function Phaser.Math.GetSpeed\n * @since 3.0.0\n *\n * @param {number} distance - The distance.\n * @param {integer} time - The time, in seconds.\n *\n * @return {number} The speed, in distance per ms.\n *\n * @example\n * // 400px over 1 second is 0.4 px/ms\n * Phaser.Math.GetSpeed(400, 1) // -> 0.4\n */\nvar GetSpeed = function (distance, time)\n{\n return (distance / time) / 1000;\n};\n\nmodule.exports = GetSpeed;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Check if a given value is an even number.\n *\n * @function Phaser.Math.IsEven\n * @since 3.0.0\n *\n * @param {number} value - The number to perform the check with.\n *\n * @return {boolean} Whether the number is even or not.\n */\nvar IsEven = function (value)\n{\n // Use abstract equality == for \"is number\" test\n\n // eslint-disable-next-line eqeqeq\n return (value == parseFloat(value)) ? !(value % 2) : void 0;\n};\n\nmodule.exports = IsEven;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Check if a given value is an even number using a strict type check.\n *\n * @function Phaser.Math.IsEvenStrict\n * @since 3.0.0\n *\n * @param {number} value - The number to perform the check with.\n *\n * @return {boolean} Whether the number is even or not.\n */\nvar IsEvenStrict = function (value)\n{\n // Use strict equality === for \"is number\" test\n return (value === parseFloat(value)) ? !(value % 2) : void 0;\n};\n\nmodule.exports = IsEvenStrict;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculates a linear (interpolation) value over t.\n *\n * @function Phaser.Math.Linear\n * @since 3.0.0\n *\n * @param {number} p0 - The first point.\n * @param {number} p1 - The second point.\n * @param {number} t - The percentage between p0 and p1 to return, represented as a number between 0 and 1.\n *\n * @return {number} The step t% of the way between p0 and p1.\n */\nvar Linear = function (p0, p1, t)\n{\n return (p1 - p0) * t + p0;\n};\n\nmodule.exports = Linear;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\n\nvar Class = require('../utils/Class');\n\n/**\n * @classdesc\n * A three-dimensional matrix.\n *\n * Defaults to the identity matrix when instantiated.\n *\n * @class Matrix3\n * @memberof Phaser.Math\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix3} [m] - Optional Matrix3 to copy values from.\n */\nvar Matrix3 = new Class({\n\n initialize:\n\n function Matrix3 (m)\n {\n /**\n * The matrix values.\n *\n * @name Phaser.Math.Matrix3#val\n * @type {Float32Array}\n * @since 3.0.0\n */\n this.val = new Float32Array(9);\n\n if (m)\n {\n // Assume Matrix3 with val:\n this.copy(m);\n }\n else\n {\n // Default to identity\n this.identity();\n }\n },\n\n /**\n * Make a clone of this Matrix3.\n *\n * @method Phaser.Math.Matrix3#clone\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix3} A clone of this Matrix3.\n */\n clone: function ()\n {\n return new Matrix3(this);\n },\n\n /**\n * This method is an alias for `Matrix3.copy`.\n *\n * @method Phaser.Math.Matrix3#set\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix3} src - The Matrix to set the values of this Matrix's from.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n set: function (src)\n {\n return this.copy(src);\n },\n\n /**\n * Copy the values of a given Matrix into this Matrix.\n *\n * @method Phaser.Math.Matrix3#copy\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix3} src - The Matrix to copy the values from.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n copy: function (src)\n {\n var out = this.val;\n var a = src.val;\n\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n\n return this;\n },\n\n /**\n * Copy the values of a given Matrix4 into this Matrix3.\n *\n * @method Phaser.Math.Matrix3#fromMat4\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to copy the values from.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n fromMat4: function (m)\n {\n var a = m.val;\n var out = this.val;\n\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[4];\n out[4] = a[5];\n out[5] = a[6];\n out[6] = a[8];\n out[7] = a[9];\n out[8] = a[10];\n\n return this;\n },\n\n /**\n * Set the values of this Matrix from the given array.\n *\n * @method Phaser.Math.Matrix3#fromArray\n * @since 3.0.0\n *\n * @param {array} a - The array to copy the values from.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n fromArray: function (a)\n {\n var out = this.val;\n\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n\n return this;\n },\n\n /**\n * Reset this Matrix to an identity (default) matrix.\n *\n * @method Phaser.Math.Matrix3#identity\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n identity: function ()\n {\n var out = this.val;\n\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 1;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n\n return this;\n },\n\n /**\n * Transpose this Matrix.\n *\n * @method Phaser.Math.Matrix3#transpose\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n transpose: function ()\n {\n var a = this.val;\n var a01 = a[1];\n var a02 = a[2];\n var a12 = a[5];\n\n a[1] = a[3];\n a[2] = a[6];\n a[3] = a01;\n a[5] = a[7];\n a[6] = a02;\n a[7] = a12;\n\n return this;\n },\n\n /**\n * Invert this Matrix.\n *\n * @method Phaser.Math.Matrix3#invert\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n invert: function ()\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a10 = a[3];\n var a11 = a[4];\n var a12 = a[5];\n var a20 = a[6];\n var a21 = a[7];\n var a22 = a[8];\n\n var b01 = a22 * a11 - a12 * a21;\n var b11 = -a22 * a10 + a12 * a20;\n var b21 = a21 * a10 - a11 * a20;\n\n // Calculate the determinant\n var det = a00 * b01 + a01 * b11 + a02 * b21;\n\n if (!det)\n {\n return null;\n }\n\n det = 1 / det;\n\n a[0] = b01 * det;\n a[1] = (-a22 * a01 + a02 * a21) * det;\n a[2] = (a12 * a01 - a02 * a11) * det;\n a[3] = b11 * det;\n a[4] = (a22 * a00 - a02 * a20) * det;\n a[5] = (-a12 * a00 + a02 * a10) * det;\n a[6] = b21 * det;\n a[7] = (-a21 * a00 + a01 * a20) * det;\n a[8] = (a11 * a00 - a01 * a10) * det;\n\n return this;\n },\n\n /**\n * Calculate the adjoint, or adjugate, of this Matrix.\n *\n * @method Phaser.Math.Matrix3#adjoint\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n adjoint: function ()\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a10 = a[3];\n var a11 = a[4];\n var a12 = a[5];\n var a20 = a[6];\n var a21 = a[7];\n var a22 = a[8];\n\n a[0] = (a11 * a22 - a12 * a21);\n a[1] = (a02 * a21 - a01 * a22);\n a[2] = (a01 * a12 - a02 * a11);\n a[3] = (a12 * a20 - a10 * a22);\n a[4] = (a00 * a22 - a02 * a20);\n a[5] = (a02 * a10 - a00 * a12);\n a[6] = (a10 * a21 - a11 * a20);\n a[7] = (a01 * a20 - a00 * a21);\n a[8] = (a00 * a11 - a01 * a10);\n\n return this;\n },\n\n /**\n * Calculate the determinant of this Matrix.\n *\n * @method Phaser.Math.Matrix3#determinant\n * @since 3.0.0\n *\n * @return {number} The determinant of this Matrix.\n */\n determinant: function ()\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a10 = a[3];\n var a11 = a[4];\n var a12 = a[5];\n var a20 = a[6];\n var a21 = a[7];\n var a22 = a[8];\n\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\n },\n\n /**\n * Multiply this Matrix by the given Matrix.\n *\n * @method Phaser.Math.Matrix3#multiply\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix3} src - The Matrix to multiply this Matrix by.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n multiply: function (src)\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a10 = a[3];\n var a11 = a[4];\n var a12 = a[5];\n var a20 = a[6];\n var a21 = a[7];\n var a22 = a[8];\n\n var b = src.val;\n\n var b00 = b[0];\n var b01 = b[1];\n var b02 = b[2];\n var b10 = b[3];\n var b11 = b[4];\n var b12 = b[5];\n var b20 = b[6];\n var b21 = b[7];\n var b22 = b[8];\n\n a[0] = b00 * a00 + b01 * a10 + b02 * a20;\n a[1] = b00 * a01 + b01 * a11 + b02 * a21;\n a[2] = b00 * a02 + b01 * a12 + b02 * a22;\n\n a[3] = b10 * a00 + b11 * a10 + b12 * a20;\n a[4] = b10 * a01 + b11 * a11 + b12 * a21;\n a[5] = b10 * a02 + b11 * a12 + b12 * a22;\n\n a[6] = b20 * a00 + b21 * a10 + b22 * a20;\n a[7] = b20 * a01 + b21 * a11 + b22 * a21;\n a[8] = b20 * a02 + b21 * a12 + b22 * a22;\n\n return this;\n },\n\n /**\n * Translate this Matrix using the given Vector.\n *\n * @method Phaser.Math.Matrix3#translate\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n translate: function (v)\n {\n var a = this.val;\n var x = v.x;\n var y = v.y;\n\n a[6] = x * a[0] + y * a[3] + a[6];\n a[7] = x * a[1] + y * a[4] + a[7];\n a[8] = x * a[2] + y * a[5] + a[8];\n\n return this;\n },\n\n /**\n * Apply a rotation transformation to this Matrix.\n *\n * @method Phaser.Math.Matrix3#rotate\n * @since 3.0.0\n *\n * @param {number} rad - The angle in radians to rotate by.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n rotate: function (rad)\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a10 = a[3];\n var a11 = a[4];\n var a12 = a[5];\n\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n\n a[0] = c * a00 + s * a10;\n a[1] = c * a01 + s * a11;\n a[2] = c * a02 + s * a12;\n\n a[3] = c * a10 - s * a00;\n a[4] = c * a11 - s * a01;\n a[5] = c * a12 - s * a02;\n\n return this;\n },\n\n /**\n * Apply a scale transformation to this Matrix.\n *\n * Uses the `x` and `y` components of the given Vector to scale the Matrix.\n *\n * @method Phaser.Math.Matrix3#scale\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n scale: function (v)\n {\n var a = this.val;\n var x = v.x;\n var y = v.y;\n\n a[0] = x * a[0];\n a[1] = x * a[1];\n a[2] = x * a[2];\n\n a[3] = y * a[3];\n a[4] = y * a[4];\n a[5] = y * a[5];\n\n return this;\n },\n\n /**\n * Set the values of this Matrix from the given Quaternion.\n *\n * @method Phaser.Math.Matrix3#fromQuat\n * @since 3.0.0\n *\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n fromQuat: function (q)\n {\n var x = q.x;\n var y = q.y;\n var z = q.z;\n var w = q.w;\n\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n\n var out = this.val;\n\n out[0] = 1 - (yy + zz);\n out[3] = xy + wz;\n out[6] = xz - wy;\n\n out[1] = xy - wz;\n out[4] = 1 - (xx + zz);\n out[7] = yz + wx;\n\n out[2] = xz + wy;\n out[5] = yz - wx;\n out[8] = 1 - (xx + yy);\n\n return this;\n },\n\n /**\n * Set the values of this Matrix3 to be normalized from the given Matrix4.\n *\n * @method Phaser.Math.Matrix3#normalFromMat4\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to normalize the values from.\n *\n * @return {Phaser.Math.Matrix3} This Matrix3.\n */\n normalFromMat4: function (m)\n {\n var a = m.val;\n var out = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\n\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32;\n\n // Calculate the determinant\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det)\n {\n return null;\n }\n\n det = 1 / det;\n\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n\n return this;\n }\n\n});\n\nmodule.exports = Matrix3;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\n\nvar Class = require('../utils/Class');\n\nvar EPSILON = 0.000001;\n\n/**\n * @classdesc\n * A four-dimensional matrix.\n *\n * @class Matrix4\n * @memberof Phaser.Math\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} [m] - Optional Matrix4 to copy values from.\n */\nvar Matrix4 = new Class({\n\n initialize:\n\n function Matrix4 (m)\n {\n /**\n * The matrix values.\n *\n * @name Phaser.Math.Matrix4#val\n * @type {Float32Array}\n * @since 3.0.0\n */\n this.val = new Float32Array(16);\n\n if (m)\n {\n // Assume Matrix4 with val:\n this.copy(m);\n }\n else\n {\n // Default to identity\n this.identity();\n }\n },\n\n /**\n * Make a clone of this Matrix4.\n *\n * @method Phaser.Math.Matrix4#clone\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix4} A clone of this Matrix4.\n */\n clone: function ()\n {\n return new Matrix4(this);\n },\n\n // TODO - Should work with basic values\n\n /**\n * This method is an alias for `Matrix4.copy`.\n *\n * @method Phaser.Math.Matrix4#set\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} src - The Matrix to set the values of this Matrix's from.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n set: function (src)\n {\n return this.copy(src);\n },\n\n /**\n * Copy the values of a given Matrix into this Matrix.\n *\n * @method Phaser.Math.Matrix4#copy\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} src - The Matrix to copy the values from.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n copy: function (src)\n {\n var out = this.val;\n var a = src.val;\n\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n\n return this;\n },\n\n /**\n * Set the values of this Matrix from the given array.\n *\n * @method Phaser.Math.Matrix4#fromArray\n * @since 3.0.0\n *\n * @param {array} a - The array to copy the values from.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n fromArray: function (a)\n {\n var out = this.val;\n\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n\n return this;\n },\n\n /**\n * Reset this Matrix.\n *\n * Sets all values to `0`.\n *\n * @method Phaser.Math.Matrix4#zero\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n zero: function ()\n {\n var out = this.val;\n\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 0;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 0;\n\n return this;\n },\n\n /**\n * Set the `x`, `y` and `z` values of this Matrix.\n *\n * @method Phaser.Math.Matrix4#xyz\n * @since 3.0.0\n *\n * @param {number} x - The x value.\n * @param {number} y - The y value.\n * @param {number} z - The z value.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n xyz: function (x, y, z)\n {\n this.identity();\n\n var out = this.val;\n\n out[12] = x;\n out[13] = y;\n out[14] = z;\n\n return this;\n },\n\n /**\n * Set the scaling values of this Matrix.\n *\n * @method Phaser.Math.Matrix4#scaling\n * @since 3.0.0\n *\n * @param {number} x - The x scaling value.\n * @param {number} y - The y scaling value.\n * @param {number} z - The z scaling value.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n scaling: function (x, y, z)\n {\n this.zero();\n\n var out = this.val;\n\n out[0] = x;\n out[5] = y;\n out[10] = z;\n out[15] = 1;\n\n return this;\n },\n\n /**\n * Reset this Matrix to an identity (default) matrix.\n *\n * @method Phaser.Math.Matrix4#identity\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n identity: function ()\n {\n var out = this.val;\n\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n\n return this;\n },\n\n /**\n * Transpose this Matrix.\n *\n * @method Phaser.Math.Matrix4#transpose\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n transpose: function ()\n {\n var a = this.val;\n\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a12 = a[6];\n var a13 = a[7];\n var a23 = a[11];\n\n a[1] = a[4];\n a[2] = a[8];\n a[3] = a[12];\n a[4] = a01;\n a[6] = a[9];\n a[7] = a[13];\n a[8] = a02;\n a[9] = a12;\n a[11] = a[14];\n a[12] = a03;\n a[13] = a13;\n a[14] = a23;\n\n return this;\n },\n\n /**\n * Invert this Matrix.\n *\n * @method Phaser.Math.Matrix4#invert\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n invert: function ()\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\n\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32;\n\n // Calculate the determinant\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det)\n {\n return null;\n }\n\n det = 1 / det;\n\n a[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n a[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n a[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n a[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\n a[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n a[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n a[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n a[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\n a[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n a[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n a[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n a[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\n a[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\n a[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\n a[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\n a[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\n\n return this;\n },\n\n /**\n * Calculate the adjoint, or adjugate, of this Matrix.\n *\n * @method Phaser.Math.Matrix4#adjoint\n * @since 3.0.0\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n adjoint: function ()\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\n\n a[0] = (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22));\n a[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));\n a[2] = (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12));\n a[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));\n a[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));\n a[5] = (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22));\n a[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));\n a[7] = (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12));\n a[8] = (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21));\n a[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));\n a[10] = (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11));\n a[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));\n a[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));\n a[13] = (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21));\n a[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));\n a[15] = (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11));\n\n return this;\n },\n\n /**\n * Calculate the determinant of this Matrix.\n *\n * @method Phaser.Math.Matrix4#determinant\n * @since 3.0.0\n *\n * @return {number} The determinant of this Matrix.\n */\n determinant: function ()\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\n\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32;\n\n // Calculate the determinant\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n },\n\n /**\n * Multiply this Matrix by the given Matrix.\n *\n * @method Phaser.Math.Matrix4#multiply\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} src - The Matrix to multiply this Matrix by.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n multiply: function (src)\n {\n var a = this.val;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n var a30 = a[12];\n var a31 = a[13];\n var a32 = a[14];\n var a33 = a[15];\n\n var b = src.val;\n\n // Cache only the current line of the second matrix\n var b0 = b[0];\n var b1 = b[1];\n var b2 = b[2];\n var b3 = b[3];\n\n a[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n a[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n a[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n a[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n\n b0 = b[4];\n b1 = b[5];\n b2 = b[6];\n b3 = b[7];\n\n a[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n a[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n a[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n a[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n\n b0 = b[8];\n b1 = b[9];\n b2 = b[10];\n b3 = b[11];\n\n a[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n a[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n a[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n a[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n\n b0 = b[12];\n b1 = b[13];\n b2 = b[14];\n b3 = b[15];\n\n a[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n a[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n a[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n a[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n\n return this;\n },\n\n /**\n * Multiply the values of this Matrix4 by those given in the `src` argument.\n *\n * @method Phaser.Math.Matrix4#multiplyLocal\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} src - The source Matrix4 that this Matrix4 is multiplied by.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n multiplyLocal: function (src)\n {\n var a = [];\n var m1 = this.val;\n var m2 = src.val;\n\n a[0] = m1[0] * m2[0] + m1[1] * m2[4] + m1[2] * m2[8] + m1[3] * m2[12];\n a[1] = m1[0] * m2[1] + m1[1] * m2[5] + m1[2] * m2[9] + m1[3] * m2[13];\n a[2] = m1[0] * m2[2] + m1[1] * m2[6] + m1[2] * m2[10] + m1[3] * m2[14];\n a[3] = m1[0] * m2[3] + m1[1] * m2[7] + m1[2] * m2[11] + m1[3] * m2[15];\n\n a[4] = m1[4] * m2[0] + m1[5] * m2[4] + m1[6] * m2[8] + m1[7] * m2[12];\n a[5] = m1[4] * m2[1] + m1[5] * m2[5] + m1[6] * m2[9] + m1[7] * m2[13];\n a[6] = m1[4] * m2[2] + m1[5] * m2[6] + m1[6] * m2[10] + m1[7] * m2[14];\n a[7] = m1[4] * m2[3] + m1[5] * m2[7] + m1[6] * m2[11] + m1[7] * m2[15];\n\n a[8] = m1[8] * m2[0] + m1[9] * m2[4] + m1[10] * m2[8] + m1[11] * m2[12];\n a[9] = m1[8] * m2[1] + m1[9] * m2[5] + m1[10] * m2[9] + m1[11] * m2[13];\n a[10] = m1[8] * m2[2] + m1[9] * m2[6] + m1[10] * m2[10] + m1[11] * m2[14];\n a[11] = m1[8] * m2[3] + m1[9] * m2[7] + m1[10] * m2[11] + m1[11] * m2[15];\n\n a[12] = m1[12] * m2[0] + m1[13] * m2[4] + m1[14] * m2[8] + m1[15] * m2[12];\n a[13] = m1[12] * m2[1] + m1[13] * m2[5] + m1[14] * m2[9] + m1[15] * m2[13];\n a[14] = m1[12] * m2[2] + m1[13] * m2[6] + m1[14] * m2[10] + m1[15] * m2[14];\n a[15] = m1[12] * m2[3] + m1[13] * m2[7] + m1[14] * m2[11] + m1[15] * m2[15];\n\n return this.fromArray(a);\n },\n\n /**\n * Translate this Matrix using the given Vector.\n *\n * @method Phaser.Math.Matrix4#translate\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n translate: function (v)\n {\n var x = v.x;\n var y = v.y;\n var z = v.z;\n var a = this.val;\n\n a[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\n a[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\n a[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\n a[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\n\n return this;\n },\n\n /**\n * Translate this Matrix using the given values.\n *\n * @method Phaser.Math.Matrix4#translateXYZ\n * @since 3.16.0\n *\n * @param {number} x - The x component.\n * @param {number} y - The y component.\n * @param {number} z - The z component.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n translateXYZ: function (x, y, z)\n {\n var a = this.val;\n\n a[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\n a[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\n a[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\n a[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\n\n return this;\n },\n\n /**\n * Apply a scale transformation to this Matrix.\n *\n * Uses the `x`, `y` and `z` components of the given Vector to scale the Matrix.\n *\n * @method Phaser.Math.Matrix4#scale\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n scale: function (v)\n {\n var x = v.x;\n var y = v.y;\n var z = v.z;\n var a = this.val;\n\n a[0] = a[0] * x;\n a[1] = a[1] * x;\n a[2] = a[2] * x;\n a[3] = a[3] * x;\n\n a[4] = a[4] * y;\n a[5] = a[5] * y;\n a[6] = a[6] * y;\n a[7] = a[7] * y;\n\n a[8] = a[8] * z;\n a[9] = a[9] * z;\n a[10] = a[10] * z;\n a[11] = a[11] * z;\n\n return this;\n },\n\n /**\n * Apply a scale transformation to this Matrix.\n *\n * @method Phaser.Math.Matrix4#scaleXYZ\n * @since 3.16.0\n *\n * @param {number} x - The x component.\n * @param {number} y - The y component.\n * @param {number} z - The z component.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n scaleXYZ: function (x, y, z)\n {\n var a = this.val;\n\n a[0] = a[0] * x;\n a[1] = a[1] * x;\n a[2] = a[2] * x;\n a[3] = a[3] * x;\n\n a[4] = a[4] * y;\n a[5] = a[5] * y;\n a[6] = a[6] * y;\n a[7] = a[7] * y;\n\n a[8] = a[8] * z;\n a[9] = a[9] * z;\n a[10] = a[10] * z;\n a[11] = a[11] * z;\n\n return this;\n },\n\n /**\n * Derive a rotation matrix around the given axis.\n *\n * @method Phaser.Math.Matrix4#makeRotationAxis\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} axis - The rotation axis.\n * @param {number} angle - The rotation angle in radians.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n makeRotationAxis: function (axis, angle)\n {\n // Based on http://www.gamedev.net/reference/articles/article1199.asp\n\n var c = Math.cos(angle);\n var s = Math.sin(angle);\n var t = 1 - c;\n var x = axis.x;\n var y = axis.y;\n var z = axis.z;\n var tx = t * x;\n var ty = t * y;\n\n this.fromArray([\n tx * x + c, tx * y - s * z, tx * z + s * y, 0,\n tx * y + s * z, ty * y + c, ty * z - s * x, 0,\n tx * z - s * y, ty * z + s * x, t * z * z + c, 0,\n 0, 0, 0, 1\n ]);\n\n return this;\n },\n\n /**\n * Apply a rotation transformation to this Matrix.\n *\n * @method Phaser.Math.Matrix4#rotate\n * @since 3.0.0\n *\n * @param {number} rad - The angle in radians to rotate by.\n * @param {Phaser.Math.Vector3} axis - The axis to rotate upon.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n rotate: function (rad, axis)\n {\n var a = this.val;\n var x = axis.x;\n var y = axis.y;\n var z = axis.z;\n var len = Math.sqrt(x * x + y * y + z * z);\n\n if (Math.abs(len) < EPSILON)\n {\n return null;\n }\n\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var t = 1 - c;\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n // Construct the elements of the rotation matrix\n var b00 = x * x * t + c;\n var b01 = y * x * t + z * s;\n var b02 = z * x * t - y * s;\n\n var b10 = x * y * t - z * s;\n var b11 = y * y * t + c;\n var b12 = z * y * t + x * s;\n\n var b20 = x * z * t + y * s;\n var b21 = y * z * t - x * s;\n var b22 = z * z * t + c;\n\n // Perform rotation-specific matrix multiplication\n a[0] = a00 * b00 + a10 * b01 + a20 * b02;\n a[1] = a01 * b00 + a11 * b01 + a21 * b02;\n a[2] = a02 * b00 + a12 * b01 + a22 * b02;\n a[3] = a03 * b00 + a13 * b01 + a23 * b02;\n a[4] = a00 * b10 + a10 * b11 + a20 * b12;\n a[5] = a01 * b10 + a11 * b11 + a21 * b12;\n a[6] = a02 * b10 + a12 * b11 + a22 * b12;\n a[7] = a03 * b10 + a13 * b11 + a23 * b12;\n a[8] = a00 * b20 + a10 * b21 + a20 * b22;\n a[9] = a01 * b20 + a11 * b21 + a21 * b22;\n a[10] = a02 * b20 + a12 * b21 + a22 * b22;\n a[11] = a03 * b20 + a13 * b21 + a23 * b22;\n\n return this;\n },\n\n /**\n * Rotate this matrix on its X axis.\n *\n * @method Phaser.Math.Matrix4#rotateX\n * @since 3.0.0\n *\n * @param {number} rad - The angle in radians to rotate by.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n rotateX: function (rad)\n {\n var a = this.val;\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n // Perform axis-specific matrix multiplication\n a[4] = a10 * c + a20 * s;\n a[5] = a11 * c + a21 * s;\n a[6] = a12 * c + a22 * s;\n a[7] = a13 * c + a23 * s;\n a[8] = a20 * c - a10 * s;\n a[9] = a21 * c - a11 * s;\n a[10] = a22 * c - a12 * s;\n a[11] = a23 * c - a13 * s;\n\n return this;\n },\n\n /**\n * Rotate this matrix on its Y axis.\n *\n * @method Phaser.Math.Matrix4#rotateY\n * @since 3.0.0\n *\n * @param {number} rad - The angle to rotate by, in radians.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n rotateY: function (rad)\n {\n var a = this.val;\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n // Perform axis-specific matrix multiplication\n a[0] = a00 * c - a20 * s;\n a[1] = a01 * c - a21 * s;\n a[2] = a02 * c - a22 * s;\n a[3] = a03 * c - a23 * s;\n a[8] = a00 * s + a20 * c;\n a[9] = a01 * s + a21 * c;\n a[10] = a02 * s + a22 * c;\n a[11] = a03 * s + a23 * c;\n\n return this;\n },\n\n /**\n * Rotate this matrix on its Z axis.\n *\n * @method Phaser.Math.Matrix4#rotateZ\n * @since 3.0.0\n *\n * @param {number} rad - The angle to rotate by, in radians.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n rotateZ: function (rad)\n {\n var a = this.val;\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n // Perform axis-specific matrix multiplication\n a[0] = a00 * c + a10 * s;\n a[1] = a01 * c + a11 * s;\n a[2] = a02 * c + a12 * s;\n a[3] = a03 * c + a13 * s;\n a[4] = a10 * c - a00 * s;\n a[5] = a11 * c - a01 * s;\n a[6] = a12 * c - a02 * s;\n a[7] = a13 * c - a03 * s;\n\n return this;\n },\n\n /**\n * Set the values of this Matrix from the given rotation Quaternion and translation Vector.\n *\n * @method Phaser.Math.Matrix4#fromRotationTranslation\n * @since 3.0.0\n *\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set rotation from.\n * @param {Phaser.Math.Vector3} v - The Vector to set translation from.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n fromRotationTranslation: function (q, v)\n {\n // Quaternion math\n var out = this.val;\n\n var x = q.x;\n var y = q.y;\n var z = q.z;\n var w = q.w;\n\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n\n out[0] = 1 - (yy + zz);\n out[1] = xy + wz;\n out[2] = xz - wy;\n out[3] = 0;\n\n out[4] = xy - wz;\n out[5] = 1 - (xx + zz);\n out[6] = yz + wx;\n out[7] = 0;\n\n out[8] = xz + wy;\n out[9] = yz - wx;\n out[10] = 1 - (xx + yy);\n out[11] = 0;\n\n out[12] = v.x;\n out[13] = v.y;\n out[14] = v.z;\n out[15] = 1;\n\n return this;\n },\n\n /**\n * Set the values of this Matrix from the given Quaternion.\n *\n * @method Phaser.Math.Matrix4#fromQuat\n * @since 3.0.0\n *\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n fromQuat: function (q)\n {\n var out = this.val;\n\n var x = q.x;\n var y = q.y;\n var z = q.z;\n var w = q.w;\n\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n\n out[0] = 1 - (yy + zz);\n out[1] = xy + wz;\n out[2] = xz - wy;\n out[3] = 0;\n\n out[4] = xy - wz;\n out[5] = 1 - (xx + zz);\n out[6] = yz + wx;\n out[7] = 0;\n\n out[8] = xz + wy;\n out[9] = yz - wx;\n out[10] = 1 - (xx + yy);\n out[11] = 0;\n\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n\n return this;\n },\n\n /**\n * Generate a frustum matrix with the given bounds.\n *\n * @method Phaser.Math.Matrix4#frustum\n * @since 3.0.0\n *\n * @param {number} left - The left bound of the frustum.\n * @param {number} right - The right bound of the frustum.\n * @param {number} bottom - The bottom bound of the frustum.\n * @param {number} top - The top bound of the frustum.\n * @param {number} near - The near bound of the frustum.\n * @param {number} far - The far bound of the frustum.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n frustum: function (left, right, bottom, top, near, far)\n {\n var out = this.val;\n\n var rl = 1 / (right - left);\n var tb = 1 / (top - bottom);\n var nf = 1 / (near - far);\n\n out[0] = (near * 2) * rl;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n\n out[4] = 0;\n out[5] = (near * 2) * tb;\n out[6] = 0;\n out[7] = 0;\n\n out[8] = (right + left) * rl;\n out[9] = (top + bottom) * tb;\n out[10] = (far + near) * nf;\n out[11] = -1;\n\n out[12] = 0;\n out[13] = 0;\n out[14] = (far * near * 2) * nf;\n out[15] = 0;\n\n return this;\n },\n\n /**\n * Generate a perspective projection matrix with the given bounds.\n *\n * @method Phaser.Math.Matrix4#perspective\n * @since 3.0.0\n *\n * @param {number} fovy - Vertical field of view in radians\n * @param {number} aspect - Aspect ratio. Typically viewport width /height.\n * @param {number} near - Near bound of the frustum.\n * @param {number} far - Far bound of the frustum.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n perspective: function (fovy, aspect, near, far)\n {\n var out = this.val;\n var f = 1.0 / Math.tan(fovy / 2);\n var nf = 1 / (near - far);\n\n out[0] = f / aspect;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n\n out[4] = 0;\n out[5] = f;\n out[6] = 0;\n out[7] = 0;\n\n out[8] = 0;\n out[9] = 0;\n out[10] = (far + near) * nf;\n out[11] = -1;\n\n out[12] = 0;\n out[13] = 0;\n out[14] = (2 * far * near) * nf;\n out[15] = 0;\n\n return this;\n },\n\n /**\n * Generate a perspective projection matrix with the given bounds.\n *\n * @method Phaser.Math.Matrix4#perspectiveLH\n * @since 3.0.0\n *\n * @param {number} width - The width of the frustum.\n * @param {number} height - The height of the frustum.\n * @param {number} near - Near bound of the frustum.\n * @param {number} far - Far bound of the frustum.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n perspectiveLH: function (width, height, near, far)\n {\n var out = this.val;\n\n out[0] = (2 * near) / width;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n\n out[4] = 0;\n out[5] = (2 * near) / height;\n out[6] = 0;\n out[7] = 0;\n\n out[8] = 0;\n out[9] = 0;\n out[10] = -far / (near - far);\n out[11] = 1;\n\n out[12] = 0;\n out[13] = 0;\n out[14] = (near * far) / (near - far);\n out[15] = 0;\n\n return this;\n },\n\n /**\n * Generate an orthogonal projection matrix with the given bounds.\n *\n * @method Phaser.Math.Matrix4#ortho\n * @since 3.0.0\n *\n * @param {number} left - The left bound of the frustum.\n * @param {number} right - The right bound of the frustum.\n * @param {number} bottom - The bottom bound of the frustum.\n * @param {number} top - The top bound of the frustum.\n * @param {number} near - The near bound of the frustum.\n * @param {number} far - The far bound of the frustum.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n ortho: function (left, right, bottom, top, near, far)\n {\n var out = this.val;\n var lr = left - right;\n var bt = bottom - top;\n var nf = near - far;\n\n // Avoid division by zero\n lr = (lr === 0) ? lr : 1 / lr;\n bt = (bt === 0) ? bt : 1 / bt;\n nf = (nf === 0) ? nf : 1 / nf;\n\n out[0] = -2 * lr;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n\n out[4] = 0;\n out[5] = -2 * bt;\n out[6] = 0;\n out[7] = 0;\n\n out[8] = 0;\n out[9] = 0;\n out[10] = 2 * nf;\n out[11] = 0;\n\n out[12] = (left + right) * lr;\n out[13] = (top + bottom) * bt;\n out[14] = (far + near) * nf;\n out[15] = 1;\n\n return this;\n },\n\n /**\n * Generate a look-at matrix with the given eye position, focal point, and up axis.\n *\n * @method Phaser.Math.Matrix4#lookAt\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} eye - Position of the viewer\n * @param {Phaser.Math.Vector3} center - Point the viewer is looking at\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n lookAt: function (eye, center, up)\n {\n var out = this.val;\n\n var eyex = eye.x;\n var eyey = eye.y;\n var eyez = eye.z;\n\n var upx = up.x;\n var upy = up.y;\n var upz = up.z;\n\n var centerx = center.x;\n var centery = center.y;\n var centerz = center.z;\n\n if (Math.abs(eyex - centerx) < EPSILON &&\n Math.abs(eyey - centery) < EPSILON &&\n Math.abs(eyez - centerz) < EPSILON)\n {\n return this.identity();\n }\n\n var z0 = eyex - centerx;\n var z1 = eyey - centery;\n var z2 = eyez - centerz;\n\n var len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);\n\n z0 *= len;\n z1 *= len;\n z2 *= len;\n\n var x0 = upy * z2 - upz * z1;\n var x1 = upz * z0 - upx * z2;\n var x2 = upx * z1 - upy * z0;\n\n len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);\n\n if (!len)\n {\n x0 = 0;\n x1 = 0;\n x2 = 0;\n }\n else\n {\n len = 1 / len;\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n\n var y0 = z1 * x2 - z2 * x1;\n var y1 = z2 * x0 - z0 * x2;\n var y2 = z0 * x1 - z1 * x0;\n\n len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);\n\n if (!len)\n {\n y0 = 0;\n y1 = 0;\n y2 = 0;\n }\n else\n {\n len = 1 / len;\n y0 *= len;\n y1 *= len;\n y2 *= len;\n }\n\n out[0] = x0;\n out[1] = y0;\n out[2] = z0;\n out[3] = 0;\n\n out[4] = x1;\n out[5] = y1;\n out[6] = z1;\n out[7] = 0;\n\n out[8] = x2;\n out[9] = y2;\n out[10] = z2;\n out[11] = 0;\n\n out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\n out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\n out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\n out[15] = 1;\n\n return this;\n },\n\n /**\n * Set the values of this matrix from the given `yaw`, `pitch` and `roll` values.\n *\n * @method Phaser.Math.Matrix4#yawPitchRoll\n * @since 3.0.0\n *\n * @param {number} yaw - The yaw value.\n * @param {number} pitch - The pitch value.\n * @param {number} roll - The roll value.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n yawPitchRoll: function (yaw, pitch, roll)\n {\n this.zero();\n _tempMat1.zero();\n _tempMat2.zero();\n\n var m0 = this.val;\n var m1 = _tempMat1.val;\n var m2 = _tempMat2.val;\n\n // Rotate Z\n var s = Math.sin(roll);\n var c = Math.cos(roll);\n\n m0[10] = 1;\n m0[15] = 1;\n m0[0] = c;\n m0[1] = s;\n m0[4] = -s;\n m0[5] = c;\n\n // Rotate X\n s = Math.sin(pitch);\n c = Math.cos(pitch);\n\n m1[0] = 1;\n m1[15] = 1;\n m1[5] = c;\n m1[10] = c;\n m1[9] = -s;\n m1[6] = s;\n\n // Rotate Y\n s = Math.sin(yaw);\n c = Math.cos(yaw);\n\n m2[5] = 1;\n m2[15] = 1;\n m2[0] = c;\n m2[2] = -s;\n m2[8] = s;\n m2[10] = c;\n\n this.multiplyLocal(_tempMat1);\n this.multiplyLocal(_tempMat2);\n\n return this;\n },\n\n /**\n * Generate a world matrix from the given rotation, position, scale, view matrix and projection matrix.\n *\n * @method Phaser.Math.Matrix4#setWorldMatrix\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} rotation - The rotation of the world matrix.\n * @param {Phaser.Math.Vector3} position - The position of the world matrix.\n * @param {Phaser.Math.Vector3} scale - The scale of the world matrix.\n * @param {Phaser.Math.Matrix4} [viewMatrix] - The view matrix.\n * @param {Phaser.Math.Matrix4} [projectionMatrix] - The projection matrix.\n *\n * @return {Phaser.Math.Matrix4} This Matrix4.\n */\n setWorldMatrix: function (rotation, position, scale, viewMatrix, projectionMatrix)\n {\n this.yawPitchRoll(rotation.y, rotation.x, rotation.z);\n\n _tempMat1.scaling(scale.x, scale.y, scale.z);\n _tempMat2.xyz(position.x, position.y, position.z);\n\n this.multiplyLocal(_tempMat1);\n this.multiplyLocal(_tempMat2);\n\n if (viewMatrix !== undefined)\n {\n this.multiplyLocal(viewMatrix);\n }\n\n if (projectionMatrix !== undefined)\n {\n this.multiplyLocal(projectionMatrix);\n }\n\n return this;\n }\n\n});\n\nvar _tempMat1 = new Matrix4();\nvar _tempMat2 = new Matrix4();\n\nmodule.exports = Matrix4;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Add an `amount` to a `value`, limiting the maximum result to `max`.\n *\n * @function Phaser.Math.MaxAdd\n * @since 3.0.0\n *\n * @param {number} value - The value to add to.\n * @param {number} amount - The amount to add.\n * @param {number} max - The maximum value to return.\n *\n * @return {number} The resulting value.\n */\nvar MaxAdd = function (value, amount, max)\n{\n return Math.min(value + amount, max);\n};\n\nmodule.exports = MaxAdd;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Subtract an `amount` from `value`, limiting the minimum result to `min`.\n *\n * @function Phaser.Math.MinSub\n * @since 3.0.0\n *\n * @param {number} value - The value to subtract from.\n * @param {number} amount - The amount to subtract.\n * @param {number} min - The minimum value to return.\n *\n * @return {number} The resulting value.\n */\nvar MinSub = function (value, amount, min)\n{\n return Math.max(value - amount, min);\n};\n\nmodule.exports = MinSub;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Work out what percentage `value` is of the range between `min` and `max`.\n * If `max` isn't given then it will return the percentage of `value` to `min`.\n *\n * You can optionally specify an `upperMax` value, which is a mid-way point in the range that represents 100%, after which the % starts to go down to zero again.\n *\n * @function Phaser.Math.Percent\n * @since 3.0.0\n *\n * @param {number} value - The value to determine the percentage of.\n * @param {number} min - The minimum value.\n * @param {number} [max] - The maximum value.\n * @param {number} [upperMax] - The mid-way point in the range that represents 100%.\n *\n * @return {number} A value between 0 and 1 representing the percentage.\n */\nvar Percent = function (value, min, max, upperMax)\n{\n if (max === undefined) { max = min + 1; }\n\n var percentage = (value - min) / (max - min);\n\n if (percentage > 1)\n {\n if (upperMax !== undefined)\n {\n percentage = ((upperMax - value)) / (upperMax - max);\n\n if (percentage < 0)\n {\n percentage = 0;\n }\n }\n else\n {\n percentage = 1;\n }\n }\n else if (percentage < 0)\n {\n percentage = 0;\n }\n\n return percentage;\n};\n\nmodule.exports = Percent;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\n\nvar Class = require('../utils/Class');\nvar Vector3 = require('./Vector3');\nvar Matrix3 = require('./Matrix3');\n\nvar EPSILON = 0.000001;\n\n// Some shared 'private' arrays\nvar siNext = new Int8Array([ 1, 2, 0 ]);\nvar tmp = new Float32Array([ 0, 0, 0 ]);\n\nvar xUnitVec3 = new Vector3(1, 0, 0);\nvar yUnitVec3 = new Vector3(0, 1, 0);\n\nvar tmpvec = new Vector3();\nvar tmpMat3 = new Matrix3();\n\n/**\n * @classdesc\n * A quaternion.\n *\n * @class Quaternion\n * @memberof Phaser.Math\n * @constructor\n * @since 3.0.0\n *\n * @param {number} [x] - The x component.\n * @param {number} [y] - The y component.\n * @param {number} [z] - The z component.\n * @param {number} [w] - The w component.\n */\nvar Quaternion = new Class({\n\n initialize:\n\n function Quaternion (x, y, z, w)\n {\n /**\n * The x component of this Quaternion.\n *\n * @name Phaser.Math.Quaternion#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n\n /**\n * The y component of this Quaternion.\n *\n * @name Phaser.Math.Quaternion#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n\n /**\n * The z component of this Quaternion.\n *\n * @name Phaser.Math.Quaternion#z\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n\n /**\n * The w component of this Quaternion.\n *\n * @name Phaser.Math.Quaternion#w\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n\n if (typeof x === 'object')\n {\n this.x = x.x || 0;\n this.y = x.y || 0;\n this.z = x.z || 0;\n this.w = x.w || 0;\n }\n else\n {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n this.w = w || 0;\n }\n },\n\n /**\n * Copy the components of a given Quaternion or Vector into this Quaternion.\n *\n * @method Phaser.Math.Quaternion#copy\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} src - The Quaternion or Vector to copy the components from.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n copy: function (src)\n {\n this.x = src.x;\n this.y = src.y;\n this.z = src.z;\n this.w = src.w;\n\n return this;\n },\n\n /**\n * Set the components of this Quaternion.\n *\n * @method Phaser.Math.Quaternion#set\n * @since 3.0.0\n *\n * @param {(number|object)} [x=0] - The x component, or an object containing x, y, z, and w components.\n * @param {number} [y=0] - The y component.\n * @param {number} [z=0] - The z component.\n * @param {number} [w=0] - The w component.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n set: function (x, y, z, w)\n {\n if (typeof x === 'object')\n {\n this.x = x.x || 0;\n this.y = x.y || 0;\n this.z = x.z || 0;\n this.w = x.w || 0;\n }\n else\n {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n this.w = w || 0;\n }\n\n return this;\n },\n\n /**\n * Add a given Quaternion or Vector to this Quaternion. Addition is component-wise.\n *\n * @method Phaser.Math.Quaternion#add\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to add to this Quaternion.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n add: function (v)\n {\n this.x += v.x;\n this.y += v.y;\n this.z += v.z;\n this.w += v.w;\n\n return this;\n },\n\n /**\n * Subtract a given Quaternion or Vector from this Quaternion. Subtraction is component-wise.\n *\n * @method Phaser.Math.Quaternion#subtract\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to subtract from this Quaternion.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n subtract: function (v)\n {\n this.x -= v.x;\n this.y -= v.y;\n this.z -= v.z;\n this.w -= v.w;\n\n return this;\n },\n\n /**\n * Scale this Quaternion by the given value.\n *\n * @method Phaser.Math.Quaternion#scale\n * @since 3.0.0\n *\n * @param {number} scale - The value to scale this Quaternion by.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n scale: function (scale)\n {\n this.x *= scale;\n this.y *= scale;\n this.z *= scale;\n this.w *= scale;\n\n return this;\n },\n\n /**\n * Calculate the length of this Quaternion.\n *\n * @method Phaser.Math.Quaternion#length\n * @since 3.0.0\n *\n * @return {number} The length of this Quaternion.\n */\n length: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var w = this.w;\n\n return Math.sqrt(x * x + y * y + z * z + w * w);\n },\n\n /**\n * Calculate the length of this Quaternion squared.\n *\n * @method Phaser.Math.Quaternion#lengthSq\n * @since 3.0.0\n *\n * @return {number} The length of this Quaternion, squared.\n */\n lengthSq: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var w = this.w;\n\n return x * x + y * y + z * z + w * w;\n },\n\n /**\n * Normalize this Quaternion.\n *\n * @method Phaser.Math.Quaternion#normalize\n * @since 3.0.0\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n normalize: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var w = this.w;\n var len = x * x + y * y + z * z + w * w;\n\n if (len > 0)\n {\n len = 1 / Math.sqrt(len);\n\n this.x = x * len;\n this.y = y * len;\n this.z = z * len;\n this.w = w * len;\n }\n\n return this;\n },\n\n /**\n * Calculate the dot product of this Quaternion and the given Quaternion or Vector.\n *\n * @method Phaser.Math.Quaternion#dot\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to dot product with this Quaternion.\n *\n * @return {number} The dot product of this Quaternion and the given Quaternion or Vector.\n */\n dot: function (v)\n {\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\n },\n\n /**\n * Linearly interpolate this Quaternion towards the given Quaternion or Vector.\n *\n * @method Phaser.Math.Quaternion#lerp\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to interpolate towards.\n * @param {number} [t=0] - The percentage of interpolation.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n lerp: function (v, t)\n {\n if (t === undefined) { t = 0; }\n\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n var aw = this.w;\n\n this.x = ax + t * (v.x - ax);\n this.y = ay + t * (v.y - ay);\n this.z = az + t * (v.z - az);\n this.w = aw + t * (v.w - aw);\n\n return this;\n },\n\n /**\n * Rotates this Quaternion based on the two given vectors.\n *\n * @method Phaser.Math.Quaternion#rotationTo\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} a - The transform rotation vector.\n * @param {Phaser.Math.Vector3} b - The target rotation vector.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n rotationTo: function (a, b)\n {\n var dot = a.x * b.x + a.y * b.y + a.z * b.z;\n\n if (dot < -0.999999)\n {\n if (tmpvec.copy(xUnitVec3).cross(a).length() < EPSILON)\n {\n tmpvec.copy(yUnitVec3).cross(a);\n }\n\n tmpvec.normalize();\n\n return this.setAxisAngle(tmpvec, Math.PI);\n\n }\n else if (dot > 0.999999)\n {\n this.x = 0;\n this.y = 0;\n this.z = 0;\n this.w = 1;\n\n return this;\n }\n else\n {\n tmpvec.copy(a).cross(b);\n\n this.x = tmpvec.x;\n this.y = tmpvec.y;\n this.z = tmpvec.z;\n this.w = 1 + dot;\n\n return this.normalize();\n }\n },\n\n /**\n * Set the axes of this Quaternion.\n *\n * @method Phaser.Math.Quaternion#setAxes\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} view - The view axis.\n * @param {Phaser.Math.Vector3} right - The right axis.\n * @param {Phaser.Math.Vector3} up - The upwards axis.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n setAxes: function (view, right, up)\n {\n var m = tmpMat3.val;\n\n m[0] = right.x;\n m[3] = right.y;\n m[6] = right.z;\n\n m[1] = up.x;\n m[4] = up.y;\n m[7] = up.z;\n\n m[2] = -view.x;\n m[5] = -view.y;\n m[8] = -view.z;\n\n return this.fromMat3(tmpMat3).normalize();\n },\n\n /**\n * Reset this Matrix to an identity (default) Quaternion.\n *\n * @method Phaser.Math.Quaternion#identity\n * @since 3.0.0\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n identity: function ()\n {\n this.x = 0;\n this.y = 0;\n this.z = 0;\n this.w = 1;\n\n return this;\n },\n\n /**\n * Set the axis angle of this Quaternion.\n *\n * @method Phaser.Math.Quaternion#setAxisAngle\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} axis - The axis.\n * @param {number} rad - The angle in radians.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n setAxisAngle: function (axis, rad)\n {\n rad = rad * 0.5;\n\n var s = Math.sin(rad);\n\n this.x = s * axis.x;\n this.y = s * axis.y;\n this.z = s * axis.z;\n this.w = Math.cos(rad);\n\n return this;\n },\n\n /**\n * Multiply this Quaternion by the given Quaternion or Vector.\n *\n * @method Phaser.Math.Quaternion#multiply\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to multiply this Quaternion by.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n multiply: function (b)\n {\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n var aw = this.w;\n\n var bx = b.x;\n var by = b.y;\n var bz = b.z;\n var bw = b.w;\n\n this.x = ax * bw + aw * bx + ay * bz - az * by;\n this.y = ay * bw + aw * by + az * bx - ax * bz;\n this.z = az * bw + aw * bz + ax * by - ay * bx;\n this.w = aw * bw - ax * bx - ay * by - az * bz;\n\n return this;\n },\n\n /**\n * Smoothly linearly interpolate this Quaternion towards the given Quaternion or Vector.\n *\n * @method Phaser.Math.Quaternion#slerp\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to interpolate towards.\n * @param {number} t - The percentage of interpolation.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n slerp: function (b, t)\n {\n // benchmarks: http://jsperf.com/quaternion-slerp-implementations\n\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n var aw = this.w;\n\n var bx = b.x;\n var by = b.y;\n var bz = b.z;\n var bw = b.w;\n\n // calc cosine\n var cosom = ax * bx + ay * by + az * bz + aw * bw;\n\n // adjust signs (if necessary)\n if (cosom < 0)\n {\n cosom = -cosom;\n bx = - bx;\n by = - by;\n bz = - bz;\n bw = - bw;\n }\n\n // \"from\" and \"to\" quaternions are very close\n // ... so we can do a linear interpolation\n var scale0 = 1 - t;\n var scale1 = t;\n\n // calculate coefficients\n if ((1 - cosom) > EPSILON)\n {\n // standard case (slerp)\n var omega = Math.acos(cosom);\n var sinom = Math.sin(omega);\n\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\n scale1 = Math.sin(t * omega) / sinom;\n }\n\n // calculate final values\n this.x = scale0 * ax + scale1 * bx;\n this.y = scale0 * ay + scale1 * by;\n this.z = scale0 * az + scale1 * bz;\n this.w = scale0 * aw + scale1 * bw;\n\n return this;\n },\n\n /**\n * Invert this Quaternion.\n *\n * @method Phaser.Math.Quaternion#invert\n * @since 3.0.0\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n invert: function ()\n {\n var a0 = this.x;\n var a1 = this.y;\n var a2 = this.z;\n var a3 = this.w;\n\n var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;\n var invDot = (dot) ? 1 / dot : 0;\n\n // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0\n\n this.x = -a0 * invDot;\n this.y = -a1 * invDot;\n this.z = -a2 * invDot;\n this.w = a3 * invDot;\n\n return this;\n },\n\n /**\n * Convert this Quaternion into its conjugate.\n *\n * Sets the x, y and z components.\n *\n * @method Phaser.Math.Quaternion#conjugate\n * @since 3.0.0\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n conjugate: function ()\n {\n this.x = -this.x;\n this.y = -this.y;\n this.z = -this.z;\n\n return this;\n },\n\n /**\n * Rotate this Quaternion on the X axis.\n *\n * @method Phaser.Math.Quaternion#rotateX\n * @since 3.0.0\n *\n * @param {number} rad - The rotation angle in radians.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n rotateX: function (rad)\n {\n rad *= 0.5;\n\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n var aw = this.w;\n\n var bx = Math.sin(rad);\n var bw = Math.cos(rad);\n\n this.x = ax * bw + aw * bx;\n this.y = ay * bw + az * bx;\n this.z = az * bw - ay * bx;\n this.w = aw * bw - ax * bx;\n\n return this;\n },\n\n /**\n * Rotate this Quaternion on the Y axis.\n *\n * @method Phaser.Math.Quaternion#rotateY\n * @since 3.0.0\n *\n * @param {number} rad - The rotation angle in radians.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n rotateY: function (rad)\n {\n rad *= 0.5;\n\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n var aw = this.w;\n\n var by = Math.sin(rad);\n var bw = Math.cos(rad);\n\n this.x = ax * bw - az * by;\n this.y = ay * bw + aw * by;\n this.z = az * bw + ax * by;\n this.w = aw * bw - ay * by;\n\n return this;\n },\n\n /**\n * Rotate this Quaternion on the Z axis.\n *\n * @method Phaser.Math.Quaternion#rotateZ\n * @since 3.0.0\n *\n * @param {number} rad - The rotation angle in radians.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n rotateZ: function (rad)\n {\n rad *= 0.5;\n\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n var aw = this.w;\n\n var bz = Math.sin(rad);\n var bw = Math.cos(rad);\n\n this.x = ax * bw + ay * bz;\n this.y = ay * bw - ax * bz;\n this.z = az * bw + aw * bz;\n this.w = aw * bw - az * bz;\n\n return this;\n },\n\n /**\n * Create a unit (or rotation) Quaternion from its x, y, and z components.\n *\n * Sets the w component.\n *\n * @method Phaser.Math.Quaternion#calculateW\n * @since 3.0.0\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n calculateW: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n\n this.w = -Math.sqrt(1.0 - x * x - y * y - z * z);\n\n return this;\n },\n\n /**\n * Convert the given Matrix into this Quaternion.\n *\n * @method Phaser.Math.Quaternion#fromMat3\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix3} mat - The Matrix to convert from.\n *\n * @return {Phaser.Math.Quaternion} This Quaternion.\n */\n fromMat3: function (mat)\n {\n // benchmarks:\n // http://jsperf.com/typed-array-access-speed\n // http://jsperf.com/conversion-of-3x3-matrix-to-quaternion\n\n // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\n // article \"Quaternion Calculus and Fast Animation\".\n var m = mat.val;\n var fTrace = m[0] + m[4] + m[8];\n var fRoot;\n\n if (fTrace > 0)\n {\n // |w| > 1/2, may as well choose w > 1/2\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\n\n this.w = 0.5 * fRoot;\n\n fRoot = 0.5 / fRoot; // 1/(4w)\n\n this.x = (m[7] - m[5]) * fRoot;\n this.y = (m[2] - m[6]) * fRoot;\n this.z = (m[3] - m[1]) * fRoot;\n }\n else\n {\n // |w| <= 1/2\n var i = 0;\n\n if (m[4] > m[0])\n {\n i = 1;\n }\n\n if (m[8] > m[i * 3 + i])\n {\n i = 2;\n }\n\n var j = siNext[i];\n var k = siNext[j];\n\n // This isn't quite as clean without array access\n fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1);\n tmp[i] = 0.5 * fRoot;\n\n fRoot = 0.5 / fRoot;\n\n tmp[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;\n tmp[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;\n\n this.x = tmp[0];\n this.y = tmp[1];\n this.z = tmp[2];\n this.w = (m[k * 3 + j] - m[j * 3 + k]) * fRoot;\n }\n\n return this;\n }\n\n});\n\nmodule.exports = Quaternion;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CONST = require('./const');\n\n/**\n * Convert the given angle in radians, to the equivalent angle in degrees.\n *\n * @function Phaser.Math.RadToDeg\n * @since 3.0.0\n *\n * @param {number} radians - The angle in radians to convert ot degrees.\n *\n * @return {integer} The given angle converted to degrees.\n */\nvar RadToDeg = function (radians)\n{\n return radians * CONST.RAD_TO_DEG;\n};\n\nmodule.exports = RadToDeg;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Compute a random unit vector.\n *\n * Computes random values for the given vector between -1 and 1 that can be used to represent a direction.\n *\n * Optionally accepts a scale value to scale the resulting vector by.\n *\n * @function Phaser.Math.RandomXY\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} vector - The Vector to compute random values for.\n * @param {number} [scale=1] - The scale of the random values.\n *\n * @return {Phaser.Math.Vector2} The given Vector.\n */\nvar RandomXY = function (vector, scale)\n{\n if (scale === undefined) { scale = 1; }\n\n var r = Math.random() * 2 * Math.PI;\n\n vector.x = Math.cos(r) * scale;\n vector.y = Math.sin(r) * scale;\n\n return vector;\n};\n\nmodule.exports = RandomXY;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Compute a random position vector in a spherical area, optionally defined by the given radius.\n *\n * @function Phaser.Math.RandomXYZ\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} vec3 - The Vector to compute random values for.\n * @param {number} [radius=1] - The radius.\n *\n * @return {Phaser.Math.Vector3} The given Vector.\n */\nvar RandomXYZ = function (vec3, radius)\n{\n if (radius === undefined) { radius = 1; }\n\n var r = Math.random() * 2 * Math.PI;\n var z = (Math.random() * 2) - 1;\n var zScale = Math.sqrt(1 - z * z) * radius;\n\n vec3.x = Math.cos(r) * zScale;\n vec3.y = Math.sin(r) * zScale;\n vec3.z = z * radius;\n\n return vec3;\n};\n\nmodule.exports = RandomXYZ;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Compute a random four-dimensional vector.\n *\n * @function Phaser.Math.RandomXYZW\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector4} vec4 - The Vector to compute random values for.\n * @param {number} [scale=1] - The scale of the random values.\n *\n * @return {Phaser.Math.Vector4} The given Vector.\n */\nvar RandomXYZW = function (vec4, scale)\n{\n if (scale === undefined) { scale = 1; }\n\n // TODO: Not spherical; should fix this for more uniform distribution\n vec4.x = (Math.random() * 2 - 1) * scale;\n vec4.y = (Math.random() * 2 - 1) * scale;\n vec4.z = (Math.random() * 2 - 1) * scale;\n vec4.w = (Math.random() * 2 - 1) * scale;\n\n return vec4;\n};\n\nmodule.exports = RandomXYZW;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Rotate a given point by a given angle around the origin (0, 0), in an anti-clockwise direction.\n *\n * @function Phaser.Math.Rotate\n * @since 3.0.0\n *\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\n * @param {number} angle - The angle to be rotated by in an anticlockwise direction.\n *\n * @return {Phaser.Geom.Point} The given point, rotated by the given angle in an anticlockwise direction.\n */\nvar Rotate = function (point, angle)\n{\n var x = point.x;\n var y = point.y;\n\n point.x = (x * Math.cos(angle)) - (y * Math.sin(angle));\n point.y = (x * Math.sin(angle)) + (y * Math.cos(angle));\n\n return point;\n};\n\nmodule.exports = Rotate;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Rotate a `point` around `x` and `y` to the given `angle`, at the same distance.\n *\n * In polar notation, this maps a point from (r, t) to (r, angle), vs. the origin (x, y).\n *\n * @function Phaser.Math.RotateAround\n * @since 3.0.0\n *\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\n *\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\n * @param {number} x - The horizontal coordinate to rotate around.\n * @param {number} y - The vertical coordinate to rotate around.\n * @param {number} angle - The angle of rotation in radians.\n *\n * @return {Phaser.Types.Math.Vector2Like} The given point.\n */\nvar RotateAround = function (point, x, y, angle)\n{\n var c = Math.cos(angle);\n var s = Math.sin(angle);\n\n var tx = point.x - x;\n var ty = point.y - y;\n\n point.x = tx * c - ty * s + x;\n point.y = tx * s + ty * c + y;\n\n return point;\n};\n\nmodule.exports = RotateAround;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Rotate a `point` around `x` and `y` by the given `angle` and `distance`.\n *\n * In polar notation, this maps a point from (r, t) to (distance, t + angle), vs. the origin (x, y).\n *\n * @function Phaser.Math.RotateAroundDistance\n * @since 3.0.0\n *\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\n *\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\n * @param {number} x - The horizontal coordinate to rotate around.\n * @param {number} y - The vertical coordinate to rotate around.\n * @param {number} angle - The angle of rotation in radians.\n * @param {number} distance - The distance from (x, y) to place the point at.\n *\n * @return {Phaser.Types.Math.Vector2Like} The given point.\n */\nvar RotateAroundDistance = function (point, x, y, angle, distance)\n{\n var t = angle + Math.atan2(point.y - y, point.x - x);\n\n point.x = x + (distance * Math.cos(t));\n point.y = y + (distance * Math.sin(t));\n\n return point;\n};\n\nmodule.exports = RotateAroundDistance;\n","/**\n * @author samme\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Position a `point` at the given `angle` and `distance` to (`x`, `y`).\n *\n * @function Phaser.Math.RotateTo\n * @since 3.24.0\n *\n * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return]\n *\n * @param {Phaser.Types.Math.Vector2Like} point - The point to be positioned.\n * @param {number} x - The horizontal coordinate to position from.\n * @param {number} y - The vertical coordinate to position from.\n * @param {number} angle - The angle of rotation in radians.\n * @param {number} distance - The distance from (x, y) to place the point at.\n *\n * @return {Phaser.Types.Math.Vector2Like} The given point.\n */\nvar RotateTo = function (point, x, y, angle, distance)\n{\n point.x = x + (distance * Math.cos(angle));\n point.y = y + (distance * Math.sin(angle));\n\n return point;\n};\n\nmodule.exports = RotateTo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Vector3 = require('../math/Vector3');\nvar Matrix4 = require('../math/Matrix4');\nvar Quaternion = require('../math/Quaternion');\n\nvar tmpMat4 = new Matrix4();\nvar tmpQuat = new Quaternion();\nvar tmpVec3 = new Vector3();\n\n/**\n * Rotates a vector in place by axis angle.\n *\n * This is the same as transforming a point by an\n * axis-angle quaternion, but it has higher precision.\n *\n * @function Phaser.Math.RotateVec3\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} vec - The vector to be rotated.\n * @param {Phaser.Math.Vector3} axis - The axis to rotate around.\n * @param {number} radians - The angle of rotation in radians.\n *\n * @return {Phaser.Math.Vector3} The given vector.\n */\nvar RotateVec3 = function (vec, axis, radians)\n{\n // Set the quaternion to our axis angle\n tmpQuat.setAxisAngle(axis, radians);\n\n // Create a rotation matrix from the axis angle\n tmpMat4.fromRotationTranslation(tmpQuat, tmpVec3.set(0, 0, 0));\n\n // Multiply our vector by the rotation matrix\n return vec.transformMat4(tmpMat4);\n};\n\nmodule.exports = RotateVec3;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Round a given number so it is further away from zero. That is, positive numbers are rounded up, and negative numbers are rounded down.\n *\n * @function Phaser.Math.RoundAwayFromZero\n * @since 3.0.0\n *\n * @param {number} value - The number to round.\n *\n * @return {number} The rounded number, rounded away from zero.\n */\nvar RoundAwayFromZero = function (value)\n{\n // \"Opposite\" of truncate.\n return (value > 0) ? Math.ceil(value) : Math.floor(value);\n};\n\nmodule.exports = RoundAwayFromZero;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Round a value to the given precision.\n * \n * For example:\n * \n * ```javascript\n * RoundTo(123.456, 0) = 123\n * RoundTo(123.456, 1) = 120\n * RoundTo(123.456, 2) = 100\n * ```\n * \n * To round the decimal, i.e. to round to precision, pass in a negative `place`:\n * \n * ```javascript\n * RoundTo(123.456789, 0) = 123\n * RoundTo(123.456789, -1) = 123.5\n * RoundTo(123.456789, -2) = 123.46\n * RoundTo(123.456789, -3) = 123.457\n * ```\n *\n * @function Phaser.Math.RoundTo\n * @since 3.0.0\n *\n * @param {number} value - The value to round.\n * @param {integer} [place=0] - The place to round to. Positive to round the units, negative to round the decimal.\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\n *\n * @return {number} The rounded value.\n */\nvar RoundTo = function (value, place, base)\n{\n if (place === undefined) { place = 0; }\n if (base === undefined) { base = 10; }\n\n var p = Math.pow(base, -place);\n\n return Math.round(value * p) / p;\n};\n\nmodule.exports = RoundTo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Generate a series of sine and cosine values.\n *\n * @function Phaser.Math.SinCosTableGenerator\n * @since 3.0.0\n *\n * @param {number} length - The number of values to generate.\n * @param {number} [sinAmp=1] - The sine value amplitude.\n * @param {number} [cosAmp=1] - The cosine value amplitude.\n * @param {number} [frequency=1] - The frequency of the values.\n *\n * @return {Phaser.Types.Math.SinCosTable} The generated values.\n */\nvar SinCosTableGenerator = function (length, sinAmp, cosAmp, frequency)\n{\n if (sinAmp === undefined) { sinAmp = 1; }\n if (cosAmp === undefined) { cosAmp = 1; }\n if (frequency === undefined) { frequency = 1; }\n\n frequency *= Math.PI / length;\n\n var cos = [];\n var sin = [];\n\n for (var c = 0; c < length; c++)\n {\n cosAmp -= sinAmp * frequency;\n sinAmp += cosAmp * frequency;\n\n cos[c] = cosAmp;\n sin[c] = sinAmp;\n }\n\n return {\n sin: sin,\n cos: cos,\n length: length\n };\n};\n\nmodule.exports = SinCosTableGenerator;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate a smooth interpolation percentage of `x` between `min` and `max`.\n *\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\n * between 0 and 1 otherwise.\n *\n * @function Phaser.Math.SmoothStep\n * @since 3.0.0\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\n *\n * @param {number} x - The input value.\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\n *\n * @return {number} The percentage of interpolation, between 0 and 1.\n */\nvar SmoothStep = function (x, min, max)\n{\n if (x <= min)\n {\n return 0;\n }\n\n if (x >= max)\n {\n return 1;\n }\n\n x = (x - min) / (max - min);\n\n return x * x * (3 - 2 * x);\n};\n\nmodule.exports = SmoothStep;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate a smoother interpolation percentage of `x` between `min` and `max`.\n *\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\n * between 0 and 1 otherwise.\n *\n * Produces an even smoother interpolation than {@link Phaser.Math.SmoothStep}.\n *\n * @function Phaser.Math.SmootherStep\n * @since 3.0.0\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\n *\n * @param {number} x - The input value.\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\n *\n * @return {number} The percentage of interpolation, between 0 and 1.\n */\nvar SmootherStep = function (x, min, max)\n{\n x = Math.max(0, Math.min(1, (x - min) / (max - min)));\n\n return x * x * x * (x * (x * 6 - 15) + 10);\n};\n\nmodule.exports = SmootherStep;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Vector2 = require('./Vector2');\n\n/**\n * Returns a Vector2 containing the x and y position of the given index in a `width` x `height` sized grid.\n * \n * For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2.\n * \n * If the given index is out of range an empty Vector2 is returned.\n *\n * @function Phaser.Math.ToXY\n * @since 3.19.0\n *\n * @param {integer} index - The position within the grid to get the x/y value for.\n * @param {integer} width - The width of the grid.\n * @param {integer} height - The height of the grid.\n * @param {Phaser.Math.Vector2} [out] - An optional Vector2 to store the result in. If not given, a new Vector2 instance will be created.\n *\n * @return {Phaser.Math.Vector2} A Vector2 where the x and y properties contain the given grid index.\n */\nvar ToXY = function (index, width, height, out)\n{\n if (out === undefined) { out = new Vector2(); }\n\n var x = 0;\n var y = 0;\n var total = width * height;\n\n if (index > 0 && index <= total)\n {\n if (index > width - 1)\n {\n y = Math.floor(index / width);\n x = index - (y * width);\n }\n else\n {\n x = index;\n }\n\n out.set(x, y);\n }\n\n return out;\n};\n\nmodule.exports = ToXY;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Vector2 = require('./Vector2');\n\n/**\n * Takes the `x` and `y` coordinates and transforms them into the same space as\n * defined by the position, rotation and scale values.\n *\n * @function Phaser.Math.TransformXY\n * @since 3.0.0\n *\n * @param {number} x - The x coordinate to be transformed.\n * @param {number} y - The y coordinate to be transformed.\n * @param {number} positionX - Horizontal position of the transform point.\n * @param {number} positionY - Vertical position of the transform point.\n * @param {number} rotation - Rotation of the transform point, in radians.\n * @param {number} scaleX - Horizontal scale of the transform point.\n * @param {number} scaleY - Vertical scale of the transform point.\n * @param {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} [output] - The output vector, point or object for the translated coordinates.\n *\n * @return {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} The translated point.\n */\nvar TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output)\n{\n if (output === undefined) { output = new Vector2(); }\n\n var radianSin = Math.sin(rotation);\n var radianCos = Math.cos(rotation);\n\n // Rotate and Scale\n var a = radianCos * scaleX;\n var b = radianSin * scaleX;\n var c = -radianSin * scaleY;\n var d = radianCos * scaleY;\n\n // Invert\n var id = 1 / ((a * d) + (c * -b));\n\n output.x = (d * id * x) + (-c * id * y) + (((positionY * c) - (positionX * d)) * id);\n output.y = (a * id * y) + (-b * id * x) + (((-positionY * a) + (positionX * b)) * id);\n\n return output;\n};\n\nmodule.exports = TransformXY;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\n\nvar Class = require('../utils/Class');\nvar FuzzyEqual = require('../math/fuzzy/Equal');\n\n/**\n * @classdesc\n * A representation of a vector in 2D space.\n *\n * A two-component vector.\n *\n * @class Vector2\n * @memberof Phaser.Math\n * @constructor\n * @since 3.0.0\n *\n * @param {number|Phaser.Types.Math.Vector2Like} [x] - The x component, or an object with `x` and `y` properties.\n * @param {number} [y] - The y component.\n */\nvar Vector2 = new Class({\n\n initialize:\n\n function Vector2 (x, y)\n {\n /**\n * The x component of this Vector.\n *\n * @name Phaser.Math.Vector2#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.x = 0;\n\n /**\n * The y component of this Vector.\n *\n * @name Phaser.Math.Vector2#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.y = 0;\n\n if (typeof x === 'object')\n {\n this.x = x.x || 0;\n this.y = x.y || 0;\n }\n else\n {\n if (y === undefined) { y = x; }\n\n this.x = x || 0;\n this.y = y || 0;\n }\n },\n\n /**\n * Make a clone of this Vector2.\n *\n * @method Phaser.Math.Vector2#clone\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector2} A clone of this Vector2.\n */\n clone: function ()\n {\n return new Vector2(this.x, this.y);\n },\n\n /**\n * Copy the components of a given Vector into this Vector.\n *\n * @method Phaser.Math.Vector2#copy\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector to copy the components from.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n copy: function (src)\n {\n this.x = src.x || 0;\n this.y = src.y || 0;\n\n return this;\n },\n\n /**\n * Set the component values of this Vector from a given Vector2Like object.\n *\n * @method Phaser.Math.Vector2#setFromObject\n * @since 3.0.0\n *\n * @param {Phaser.Types.Math.Vector2Like} obj - The object containing the component values to set for this Vector.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n setFromObject: function (obj)\n {\n this.x = obj.x || 0;\n this.y = obj.y || 0;\n\n return this;\n },\n\n /**\n * Set the `x` and `y` components of the this Vector to the given `x` and `y` values.\n *\n * @method Phaser.Math.Vector2#set\n * @since 3.0.0\n *\n * @param {number} x - The x value to set for this Vector.\n * @param {number} [y=x] - The y value to set for this Vector.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n set: function (x, y)\n {\n if (y === undefined) { y = x; }\n\n this.x = x;\n this.y = y;\n\n return this;\n },\n\n /**\n * This method is an alias for `Vector2.set`.\n *\n * @method Phaser.Math.Vector2#setTo\n * @since 3.4.0\n *\n * @param {number} x - The x value to set for this Vector.\n * @param {number} [y=x] - The y value to set for this Vector.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n setTo: function (x, y)\n {\n return this.set(x, y);\n },\n\n /**\n * Sets the `x` and `y` values of this object from a given polar coordinate.\n *\n * @method Phaser.Math.Vector2#setToPolar\n * @since 3.0.0\n *\n * @param {number} azimuth - The angular coordinate, in radians.\n * @param {number} [radius=1] - The radial coordinate (length).\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n setToPolar: function (azimuth, radius)\n {\n if (radius == null) { radius = 1; }\n\n this.x = Math.cos(azimuth) * radius;\n this.y = Math.sin(azimuth) * radius;\n\n return this;\n },\n\n /**\n * Check whether this Vector is equal to a given Vector.\n *\n * Performs a strict equality check against each Vector's components.\n *\n * @method Phaser.Math.Vector2#equals\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector.\n *\n * @return {boolean} Whether the given Vector is equal to this Vector.\n */\n equals: function (v)\n {\n return ((this.x === v.x) && (this.y === v.y));\n },\n\n /**\n * Check whether this Vector is approximately equal to a given Vector.\n *\n * @method Phaser.Math.Vector2#fuzzyEquals\n * @since 3.23.0\n *\n * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector.\n * @param {number} [epsilon=0.0001] - The tolerance value.\n *\n * @return {boolean} Whether both absolute differences of the x and y components are smaller than `epsilon`.\n */\n fuzzyEquals: function (v, epsilon)\n {\n return (FuzzyEqual(this.x, v.x, epsilon) && FuzzyEqual(this.y, v.y, epsilon));\n },\n\n /**\n * Calculate the angle between this Vector and the positive x-axis, in radians.\n *\n * @method Phaser.Math.Vector2#angle\n * @since 3.0.0\n *\n * @return {number} The angle between this Vector, and the positive x-axis, given in radians.\n */\n angle: function ()\n {\n // computes the angle in radians with respect to the positive x-axis\n\n var angle = Math.atan2(this.y, this.x);\n\n if (angle < 0)\n {\n angle += 2 * Math.PI;\n }\n\n return angle;\n },\n\n /**\n * Set the angle of this Vector.\n *\n * @method Phaser.Math.Vector2#setAngle\n * @since 3.23.0\n *\n * @param {number} angle - The angle, in radians.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n setAngle: function (angle)\n {\n return this.setToPolar(angle, this.length());\n },\n\n /**\n * Add a given Vector to this Vector. Addition is component-wise.\n *\n * @method Phaser.Math.Vector2#add\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector to add to this Vector.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n add: function (src)\n {\n this.x += src.x;\n this.y += src.y;\n\n return this;\n },\n\n /**\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\n *\n * @method Phaser.Math.Vector2#subtract\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector to subtract from this Vector.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n subtract: function (src)\n {\n this.x -= src.x;\n this.y -= src.y;\n\n return this;\n },\n\n /**\n * Perform a component-wise multiplication between this Vector and the given Vector.\n *\n * Multiplies this Vector by the given Vector.\n *\n * @method Phaser.Math.Vector2#multiply\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector to multiply this Vector by.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n multiply: function (src)\n {\n this.x *= src.x;\n this.y *= src.y;\n\n return this;\n },\n\n /**\n * Scale this Vector by the given value.\n *\n * @method Phaser.Math.Vector2#scale\n * @since 3.0.0\n *\n * @param {number} value - The value to scale this Vector by.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n scale: function (value)\n {\n if (isFinite(value))\n {\n this.x *= value;\n this.y *= value;\n }\n else\n {\n this.x = 0;\n this.y = 0;\n }\n\n return this;\n },\n\n /**\n * Perform a component-wise division between this Vector and the given Vector.\n *\n * Divides this Vector by the given Vector.\n *\n * @method Phaser.Math.Vector2#divide\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector to divide this Vector by.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n divide: function (src)\n {\n this.x /= src.x;\n this.y /= src.y;\n\n return this;\n },\n\n /**\n * Negate the `x` and `y` components of this Vector.\n *\n * @method Phaser.Math.Vector2#negate\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n negate: function ()\n {\n this.x = -this.x;\n this.y = -this.y;\n\n return this;\n },\n\n /**\n * Calculate the distance between this Vector and the given Vector.\n *\n * @method Phaser.Math.Vector2#distance\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector to calculate the distance to.\n *\n * @return {number} The distance from this Vector to the given Vector.\n */\n distance: function (src)\n {\n var dx = src.x - this.x;\n var dy = src.y - this.y;\n\n return Math.sqrt(dx * dx + dy * dy);\n },\n\n /**\n * Calculate the distance between this Vector and the given Vector, squared.\n *\n * @method Phaser.Math.Vector2#distanceSq\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector to calculate the distance to.\n *\n * @return {number} The distance from this Vector to the given Vector, squared.\n */\n distanceSq: function (src)\n {\n var dx = src.x - this.x;\n var dy = src.y - this.y;\n\n return dx * dx + dy * dy;\n },\n\n /**\n * Calculate the length (or magnitude) of this Vector.\n *\n * @method Phaser.Math.Vector2#length\n * @since 3.0.0\n *\n * @return {number} The length of this Vector.\n */\n length: function ()\n {\n var x = this.x;\n var y = this.y;\n\n return Math.sqrt(x * x + y * y);\n },\n\n /**\n * Set the length (or magnitude) of this Vector.\n *\n * @method Phaser.Math.Vector2#setLength\n * @since 3.23.0\n *\n * @param {number} length\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n setLength: function (length)\n {\n return this.normalize().scale(length);\n },\n\n /**\n * Calculate the length of this Vector squared.\n *\n * @method Phaser.Math.Vector2#lengthSq\n * @since 3.0.0\n *\n * @return {number} The length of this Vector, squared.\n */\n lengthSq: function ()\n {\n var x = this.x;\n var y = this.y;\n\n return x * x + y * y;\n },\n\n /**\n * Normalize this Vector.\n *\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\n *\n * @method Phaser.Math.Vector2#normalize\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n normalize: function ()\n {\n var x = this.x;\n var y = this.y;\n var len = x * x + y * y;\n\n if (len > 0)\n {\n len = 1 / Math.sqrt(len);\n\n this.x = x * len;\n this.y = y * len;\n }\n\n return this;\n },\n\n /**\n * Rotate this Vector to its perpendicular, in the positive direction.\n *\n * @method Phaser.Math.Vector2#normalizeRightHand\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n normalizeRightHand: function ()\n {\n var x = this.x;\n\n this.x = this.y * -1;\n this.y = x;\n\n return this;\n },\n\n /**\n * Rotate this Vector to its perpendicular, in the negative direction.\n *\n * @method Phaser.Math.Vector2#normalizeLeftHand\n * @since 3.23.0\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n normalizeLeftHand: function ()\n {\n var x = this.x;\n\n this.x = this.y;\n this.y = x * -1;\n\n return this;\n },\n\n /**\n * Calculate the dot product of this Vector and the given Vector.\n *\n * @method Phaser.Math.Vector2#dot\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector2 to dot product with this Vector2.\n *\n * @return {number} The dot product of this Vector and the given Vector.\n */\n dot: function (src)\n {\n return this.x * src.x + this.y * src.y;\n },\n\n /**\n * Calculate the cross product of this Vector and the given Vector.\n *\n * @method Phaser.Math.Vector2#cross\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector2 to cross with this Vector2.\n *\n * @return {number} The cross product of this Vector and the given Vector.\n */\n cross: function (src)\n {\n return this.x * src.y - this.y * src.x;\n },\n\n /**\n * Linearly interpolate between this Vector and the given Vector.\n *\n * Interpolates this Vector towards the given Vector.\n *\n * @method Phaser.Math.Vector2#lerp\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector2} src - The Vector2 to interpolate towards.\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n lerp: function (src, t)\n {\n if (t === undefined) { t = 0; }\n\n var ax = this.x;\n var ay = this.y;\n\n this.x = ax + t * (src.x - ax);\n this.y = ay + t * (src.y - ay);\n\n return this;\n },\n\n /**\n * Transform this Vector with the given Matrix.\n *\n * @method Phaser.Math.Vector2#transformMat3\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector2 with.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n transformMat3: function (mat)\n {\n var x = this.x;\n var y = this.y;\n var m = mat.val;\n\n this.x = m[0] * x + m[3] * y + m[6];\n this.y = m[1] * x + m[4] * y + m[7];\n\n return this;\n },\n\n /**\n * Transform this Vector with the given Matrix.\n *\n * @method Phaser.Math.Vector2#transformMat4\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector2 with.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n transformMat4: function (mat)\n {\n var x = this.x;\n var y = this.y;\n var m = mat.val;\n\n this.x = m[0] * x + m[4] * y + m[12];\n this.y = m[1] * x + m[5] * y + m[13];\n\n return this;\n },\n\n /**\n * Make this Vector the zero vector (0, 0).\n *\n * @method Phaser.Math.Vector2#reset\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n reset: function ()\n {\n this.x = 0;\n this.y = 0;\n\n return this;\n },\n\n /**\n * Limit the length (or magnitude) of this Vector.\n *\n * @method Phaser.Math.Vector2#limit\n * @since 3.23.0\n *\n * @param {number} max - The maximum length.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n limit: function (max)\n {\n var len = this.length();\n\n if (len && len > max)\n {\n this.scale(max / len);\n }\n\n return this;\n },\n\n /**\n * Reflect this Vector off a line defined by a normal.\n *\n * @method Phaser.Math.Vector2#reflect\n * @since 3.23.0\n *\n * @param {Phaser.Math.Vector2} normal - A vector perpendicular to the line.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n reflect: function (normal)\n {\n normal = normal.clone().normalize();\n\n return this.subtract(normal.scale(2 * this.dot(normal)));\n },\n\n /**\n * Reflect this Vector across another.\n *\n * @method Phaser.Math.Vector2#mirror\n * @since 3.23.0\n *\n * @param {Phaser.Math.Vector2} axis - A vector to reflect across.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n mirror: function (axis)\n {\n return this.reflect(axis).negate();\n },\n\n /**\n * Rotate this Vector by an angle amount.\n *\n * @method Phaser.Math.Vector2#rotate\n * @since 3.23.0\n *\n * @param {number} delta - The angle to rotate by, in radians.\n *\n * @return {Phaser.Math.Vector2} This Vector2.\n */\n rotate: function (delta)\n {\n var cos = Math.cos(delta);\n var sin = Math.sin(delta);\n\n return this.set(cos * this.x - sin * this.y, sin * this.x + cos * this.y);\n }\n\n});\n\n/**\n * A static zero Vector2 for use by reference.\n *\n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector2.ZERO\n * @type {Phaser.Math.Vector2}\n * @since 3.1.0\n */\nVector2.ZERO = new Vector2();\n\n/**\n * A static right Vector2 for use by reference.\n *\n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector2.RIGHT\n * @type {Phaser.Math.Vector2}\n * @since 3.16.0\n */\nVector2.RIGHT = new Vector2(1, 0);\n\n/**\n * A static left Vector2 for use by reference.\n *\n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector2.LEFT\n * @type {Phaser.Math.Vector2}\n * @since 3.16.0\n */\nVector2.LEFT = new Vector2(-1, 0);\n\n/**\n * A static up Vector2 for use by reference.\n *\n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector2.UP\n * @type {Phaser.Math.Vector2}\n * @since 3.16.0\n */\nVector2.UP = new Vector2(0, -1);\n\n/**\n * A static down Vector2 for use by reference.\n *\n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector2.DOWN\n * @type {Phaser.Math.Vector2}\n * @since 3.16.0\n */\nVector2.DOWN = new Vector2(0, 1);\n\n/**\n * A static one Vector2 for use by reference.\n *\n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector2.ONE\n * @type {Phaser.Math.Vector2}\n * @since 3.16.0\n */\nVector2.ONE = new Vector2(1, 1);\n\nmodule.exports = Vector2;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\n\nvar Class = require('../utils/Class');\n\n/**\n * @classdesc\n * A representation of a vector in 3D space.\n *\n * A three-component vector.\n *\n * @class Vector3\n * @memberof Phaser.Math\n * @constructor\n * @since 3.0.0\n *\n * @param {number} [x] - The x component.\n * @param {number} [y] - The y component.\n * @param {number} [z] - The z component.\n */\nvar Vector3 = new Class({\n\n initialize:\n\n function Vector3 (x, y, z)\n {\n /**\n * The x component of this Vector.\n *\n * @name Phaser.Math.Vector3#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.x = 0;\n\n /**\n * The y component of this Vector.\n *\n * @name Phaser.Math.Vector3#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.y = 0;\n\n /**\n * The z component of this Vector.\n *\n * @name Phaser.Math.Vector3#z\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.z = 0;\n\n if (typeof x === 'object')\n {\n this.x = x.x || 0;\n this.y = x.y || 0;\n this.z = x.z || 0;\n }\n else\n {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n }\n },\n\n /**\n * Set this Vector to point up.\n *\n * Sets the y component of the vector to 1, and the others to 0.\n *\n * @method Phaser.Math.Vector3#up\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n up: function ()\n {\n this.x = 0;\n this.y = 1;\n this.z = 0;\n\n return this;\n },\n\n /**\n * Make a clone of this Vector3.\n *\n * @method Phaser.Math.Vector3#clone\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector3} A new Vector3 object containing this Vectors values.\n */\n clone: function ()\n {\n return new Vector3(this.x, this.y, this.z);\n },\n\n /**\n * Calculate the cross (vector) product of two given Vectors.\n *\n * @method Phaser.Math.Vector3#crossVectors\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} a - The first Vector to multiply.\n * @param {Phaser.Math.Vector3} b - The second Vector to multiply.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n crossVectors: function (a, b)\n {\n var ax = a.x;\n var ay = a.y;\n var az = a.z;\n var bx = b.x;\n var by = b.y;\n var bz = b.z;\n\n this.x = ay * bz - az * by;\n this.y = az * bx - ax * bz;\n this.z = ax * by - ay * bx;\n\n return this;\n },\n\n /**\n * Check whether this Vector is equal to a given Vector.\n *\n * Performs a strict equality check against each Vector's components.\n *\n * @method Phaser.Math.Vector3#equals\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} v - The Vector3 to compare against.\n *\n * @return {boolean} True if the two vectors strictly match, otherwise false.\n */\n equals: function (v)\n {\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z));\n },\n\n /**\n * Copy the components of a given Vector into this Vector.\n *\n * @method Phaser.Math.Vector3#copy\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} src - The Vector to copy the components from.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n copy: function (src)\n {\n this.x = src.x;\n this.y = src.y;\n this.z = src.z || 0;\n\n return this;\n },\n\n /**\n * Set the `x`, `y`, and `z` components of this Vector to the given `x`, `y`, and `z` values.\n *\n * @method Phaser.Math.Vector3#set\n * @since 3.0.0\n *\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y and z components.\n * @param {number} [y] - The y value to set for this Vector.\n * @param {number} [z] - The z value to set for this Vector.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n set: function (x, y, z)\n {\n if (typeof x === 'object')\n {\n this.x = x.x || 0;\n this.y = x.y || 0;\n this.z = x.z || 0;\n }\n else\n {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n }\n\n return this;\n },\n\n /**\n * Add a given Vector to this Vector. Addition is component-wise.\n *\n * @method Phaser.Math.Vector3#add\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n add: function (v)\n {\n this.x += v.x;\n this.y += v.y;\n this.z += v.z || 0;\n\n return this;\n },\n\n /**\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\n *\n * @method Phaser.Math.Vector3#subtract\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to subtract from this Vector.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n subtract: function (v)\n {\n this.x -= v.x;\n this.y -= v.y;\n this.z -= v.z || 0;\n\n return this;\n },\n\n /**\n * Perform a component-wise multiplication between this Vector and the given Vector.\n *\n * Multiplies this Vector by the given Vector.\n *\n * @method Phaser.Math.Vector3#multiply\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to multiply this Vector by.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n multiply: function (v)\n {\n this.x *= v.x;\n this.y *= v.y;\n this.z *= v.z || 1;\n\n return this;\n },\n\n /**\n * Scale this Vector by the given value.\n *\n * @method Phaser.Math.Vector3#scale\n * @since 3.0.0\n *\n * @param {number} scale - The value to scale this Vector by.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n scale: function (scale)\n {\n if (isFinite(scale))\n {\n this.x *= scale;\n this.y *= scale;\n this.z *= scale;\n }\n else\n {\n this.x = 0;\n this.y = 0;\n this.z = 0;\n }\n\n return this;\n },\n\n /**\n * Perform a component-wise division between this Vector and the given Vector.\n *\n * Divides this Vector by the given Vector.\n *\n * @method Phaser.Math.Vector3#divide\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to divide this Vector by.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n divide: function (v)\n {\n this.x /= v.x;\n this.y /= v.y;\n this.z /= v.z || 1;\n\n return this;\n },\n\n /**\n * Negate the `x`, `y` and `z` components of this Vector.\n *\n * @method Phaser.Math.Vector3#negate\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n negate: function ()\n {\n this.x = -this.x;\n this.y = -this.y;\n this.z = -this.z;\n\n return this;\n },\n\n /**\n * Calculate the distance between this Vector and the given Vector.\n *\n * @method Phaser.Math.Vector3#distance\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\n *\n * @return {number} The distance from this Vector to the given Vector.\n */\n distance: function (v)\n {\n var dx = v.x - this.x;\n var dy = v.y - this.y;\n var dz = v.z - this.z || 0;\n\n return Math.sqrt(dx * dx + dy * dy + dz * dz);\n },\n\n /**\n * Calculate the distance between this Vector and the given Vector, squared.\n *\n * @method Phaser.Math.Vector3#distanceSq\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\n *\n * @return {number} The distance from this Vector to the given Vector, squared.\n */\n distanceSq: function (v)\n {\n var dx = v.x - this.x;\n var dy = v.y - this.y;\n var dz = v.z - this.z || 0;\n\n return dx * dx + dy * dy + dz * dz;\n },\n\n /**\n * Calculate the length (or magnitude) of this Vector.\n *\n * @method Phaser.Math.Vector3#length\n * @since 3.0.0\n *\n * @return {number} The length of this Vector.\n */\n length: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n\n return Math.sqrt(x * x + y * y + z * z);\n },\n\n /**\n * Calculate the length of this Vector squared.\n *\n * @method Phaser.Math.Vector3#lengthSq\n * @since 3.0.0\n *\n * @return {number} The length of this Vector, squared.\n */\n lengthSq: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n\n return x * x + y * y + z * z;\n },\n\n /**\n * Normalize this Vector.\n *\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\n *\n * @method Phaser.Math.Vector3#normalize\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n normalize: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var len = x * x + y * y + z * z;\n\n if (len > 0)\n {\n len = 1 / Math.sqrt(len);\n\n this.x = x * len;\n this.y = y * len;\n this.z = z * len;\n }\n\n return this;\n },\n\n /**\n * Calculate the dot product of this Vector and the given Vector.\n *\n * @method Phaser.Math.Vector3#dot\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} v - The Vector3 to dot product with this Vector3.\n *\n * @return {number} The dot product of this Vector and `v`.\n */\n dot: function (v)\n {\n return this.x * v.x + this.y * v.y + this.z * v.z;\n },\n\n /**\n * Calculate the cross (vector) product of this Vector (which will be modified) and the given Vector.\n *\n * @method Phaser.Math.Vector3#cross\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} v - The Vector to cross product with.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n cross: function (v)\n {\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n var bx = v.x;\n var by = v.y;\n var bz = v.z;\n\n this.x = ay * bz - az * by;\n this.y = az * bx - ax * bz;\n this.z = ax * by - ay * bx;\n\n return this;\n },\n\n /**\n * Linearly interpolate between this Vector and the given Vector.\n *\n * Interpolates this Vector towards the given Vector.\n *\n * @method Phaser.Math.Vector3#lerp\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector3} v - The Vector3 to interpolate towards.\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n lerp: function (v, t)\n {\n if (t === undefined) { t = 0; }\n\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n\n this.x = ax + t * (v.x - ax);\n this.y = ay + t * (v.y - ay);\n this.z = az + t * (v.z - az);\n\n return this;\n },\n\n /**\n * Transform this Vector with the given Matrix.\n *\n * @method Phaser.Math.Vector3#transformMat3\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector3 with.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n transformMat3: function (mat)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var m = mat.val;\n\n this.x = x * m[0] + y * m[3] + z * m[6];\n this.y = x * m[1] + y * m[4] + z * m[7];\n this.z = x * m[2] + y * m[5] + z * m[8];\n\n return this;\n },\n\n /**\n * Transform this Vector with the given Matrix.\n *\n * @method Phaser.Math.Vector3#transformMat4\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n transformMat4: function (mat)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var m = mat.val;\n\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12];\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13];\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14];\n\n return this;\n },\n\n /**\n * Transforms the coordinates of this Vector3 with the given Matrix4.\n *\n * @method Phaser.Math.Vector3#transformCoordinates\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n transformCoordinates: function (mat)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var m = mat.val;\n\n var tx = (x * m[0]) + (y * m[4]) + (z * m[8]) + m[12];\n var ty = (x * m[1]) + (y * m[5]) + (z * m[9]) + m[13];\n var tz = (x * m[2]) + (y * m[6]) + (z * m[10]) + m[14];\n var tw = (x * m[3]) + (y * m[7]) + (z * m[11]) + m[15];\n\n this.x = tx / tw;\n this.y = ty / tw;\n this.z = tz / tw;\n\n return this;\n },\n\n /**\n * Transform this Vector with the given Quaternion.\n *\n * @method Phaser.Math.Vector3#transformQuat\n * @since 3.0.0\n *\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n transformQuat: function (q)\n {\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var qx = q.x;\n var qy = q.y;\n var qz = q.z;\n var qw = q.w;\n\n // calculate quat * vec\n var ix = qw * x + qy * z - qz * y;\n var iy = qw * y + qz * x - qx * z;\n var iz = qw * z + qx * y - qy * x;\n var iw = -qx * x - qy * y - qz * z;\n\n // calculate result * inverse quat\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n\n return this;\n },\n\n /**\n * Multiplies this Vector3 by the specified matrix, applying a W divide. This is useful for projection,\n * e.g. unprojecting a 2D point into 3D space.\n *\n * @method Phaser.Math.Vector3#project\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to multiply this Vector3 with.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n project: function (mat)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var m = mat.val;\n\n var a00 = m[0];\n var a01 = m[1];\n var a02 = m[2];\n var a03 = m[3];\n var a10 = m[4];\n var a11 = m[5];\n var a12 = m[6];\n var a13 = m[7];\n var a20 = m[8];\n var a21 = m[9];\n var a22 = m[10];\n var a23 = m[11];\n var a30 = m[12];\n var a31 = m[13];\n var a32 = m[14];\n var a33 = m[15];\n\n var lw = 1 / (x * a03 + y * a13 + z * a23 + a33);\n\n this.x = (x * a00 + y * a10 + z * a20 + a30) * lw;\n this.y = (x * a01 + y * a11 + z * a21 + a31) * lw;\n this.z = (x * a02 + y * a12 + z * a22 + a32) * lw;\n\n return this;\n },\n\n /**\n * Unproject this point from 2D space to 3D space.\n * The point should have its x and y properties set to\n * 2D screen space, and the z either at 0 (near plane)\n * or 1 (far plane). The provided matrix is assumed to already\n * be combined, i.e. projection * view * model.\n *\n * After this operation, this vector's (x, y, z) components will\n * represent the unprojected 3D coordinate.\n *\n * @method Phaser.Math.Vector3#unproject\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector4} viewport - Screen x, y, width and height in pixels.\n * @param {Phaser.Math.Matrix4} invProjectionView - Combined projection and view matrix.\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n unproject: function (viewport, invProjectionView)\n {\n var viewX = viewport.x;\n var viewY = viewport.y;\n var viewWidth = viewport.z;\n var viewHeight = viewport.w;\n\n var x = this.x - viewX;\n var y = (viewHeight - this.y - 1) - viewY;\n var z = this.z;\n\n this.x = (2 * x) / viewWidth - 1;\n this.y = (2 * y) / viewHeight - 1;\n this.z = 2 * z - 1;\n\n return this.project(invProjectionView);\n },\n\n /**\n * Make this Vector the zero vector (0, 0, 0).\n *\n * @method Phaser.Math.Vector3#reset\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector3} This Vector3.\n */\n reset: function ()\n {\n this.x = 0;\n this.y = 0;\n this.z = 0;\n\n return this;\n }\n\n});\n\n/**\n * A static zero Vector3 for use by reference.\n * \n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector3.ZERO\n * @type {Phaser.Math.Vector3}\n * @since 3.16.0\n */\nVector3.ZERO = new Vector3();\n\n/**\n * A static right Vector3 for use by reference.\n * \n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector3.RIGHT\n * @type {Phaser.Math.Vector3}\n * @since 3.16.0\n */\nVector3.RIGHT = new Vector3(1, 0, 0);\n\n/**\n * A static left Vector3 for use by reference.\n * \n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector3.LEFT\n * @type {Phaser.Math.Vector3}\n * @since 3.16.0\n */\nVector3.LEFT = new Vector3(-1, 0, 0);\n\n/**\n * A static up Vector3 for use by reference.\n * \n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector3.UP\n * @type {Phaser.Math.Vector3}\n * @since 3.16.0\n */\nVector3.UP = new Vector3(0, -1, 0);\n\n/**\n * A static down Vector3 for use by reference.\n * \n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector3.DOWN\n * @type {Phaser.Math.Vector3}\n * @since 3.16.0\n */\nVector3.DOWN = new Vector3(0, 1, 0);\n\n/**\n * A static forward Vector3 for use by reference.\n * \n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector3.FORWARD\n * @type {Phaser.Math.Vector3}\n * @since 3.16.0\n */\nVector3.FORWARD = new Vector3(0, 0, 1);\n\n/**\n * A static back Vector3 for use by reference.\n * \n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector3.BACK\n * @type {Phaser.Math.Vector3}\n * @since 3.16.0\n */\nVector3.BACK = new Vector3(0, 0, -1);\n\n/**\n * A static one Vector3 for use by reference.\n * \n * This constant is meant for comparison operations and should not be modified directly.\n *\n * @constant\n * @name Phaser.Math.Vector3.ONE\n * @type {Phaser.Math.Vector3}\n * @since 3.16.0\n */\nVector3.ONE = new Vector3(1, 1, 1);\n\nmodule.exports = Vector3;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\n\nvar Class = require('../utils/Class');\n\n/**\n * @classdesc\n * A representation of a vector in 4D space.\n *\n * A four-component vector.\n *\n * @class Vector4\n * @memberof Phaser.Math\n * @constructor\n * @since 3.0.0\n *\n * @param {number} [x] - The x component.\n * @param {number} [y] - The y component.\n * @param {number} [z] - The z component.\n * @param {number} [w] - The w component.\n */\nvar Vector4 = new Class({\n\n initialize:\n\n function Vector4 (x, y, z, w)\n {\n /**\n * The x component of this Vector.\n *\n * @name Phaser.Math.Vector4#x\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.x = 0;\n\n /**\n * The y component of this Vector.\n *\n * @name Phaser.Math.Vector4#y\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.y = 0;\n\n /**\n * The z component of this Vector.\n *\n * @name Phaser.Math.Vector4#z\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.z = 0;\n\n /**\n * The w component of this Vector.\n *\n * @name Phaser.Math.Vector4#w\n * @type {number}\n * @default 0\n * @since 3.0.0\n */\n this.w = 0;\n\n if (typeof x === 'object')\n {\n this.x = x.x || 0;\n this.y = x.y || 0;\n this.z = x.z || 0;\n this.w = x.w || 0;\n }\n else\n {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n this.w = w || 0;\n }\n },\n\n /**\n * Make a clone of this Vector4.\n *\n * @method Phaser.Math.Vector4#clone\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector4} A clone of this Vector4.\n */\n clone: function ()\n {\n return new Vector4(this.x, this.y, this.z, this.w);\n },\n\n /**\n * Copy the components of a given Vector into this Vector.\n *\n * @method Phaser.Math.Vector4#copy\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector4} src - The Vector to copy the components from.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n copy: function (src)\n {\n this.x = src.x;\n this.y = src.y;\n this.z = src.z || 0;\n this.w = src.w || 0;\n\n return this;\n },\n\n /**\n * Check whether this Vector is equal to a given Vector.\n *\n * Performs a strict quality check against each Vector's components.\n *\n * @method Phaser.Math.Vector4#equals\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector4} v - The vector to check equality with.\n *\n * @return {boolean} A boolean indicating whether the two Vectors are equal or not.\n */\n equals: function (v)\n {\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z) && (this.w === v.w));\n },\n\n /**\n * Set the `x`, `y`, `z` and `w` components of the this Vector to the given `x`, `y`, `z` and `w` values.\n *\n * @method Phaser.Math.Vector4#set\n * @since 3.0.0\n *\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y, z and w components.\n * @param {number} y - The y value to set for this Vector.\n * @param {number} z - The z value to set for this Vector.\n * @param {number} w - The z value to set for this Vector.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n set: function (x, y, z, w)\n {\n if (typeof x === 'object')\n {\n this.x = x.x || 0;\n this.y = x.y || 0;\n this.z = x.z || 0;\n this.w = x.w || 0;\n }\n else\n {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n this.w = w || 0;\n }\n\n return this;\n },\n\n /**\n * Add a given Vector to this Vector. Addition is component-wise.\n *\n * @method Phaser.Math.Vector4#add\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to add to this Vector.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n add: function (v)\n {\n this.x += v.x;\n this.y += v.y;\n this.z += v.z || 0;\n this.w += v.w || 0;\n\n return this;\n },\n\n /**\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\n *\n * @method Phaser.Math.Vector4#subtract\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to subtract from this Vector.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n subtract: function (v)\n {\n this.x -= v.x;\n this.y -= v.y;\n this.z -= v.z || 0;\n this.w -= v.w || 0;\n\n return this;\n },\n\n /**\n * Scale this Vector by the given value.\n *\n * @method Phaser.Math.Vector4#scale\n * @since 3.0.0\n *\n * @param {number} scale - The value to scale this Vector by.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n scale: function (scale)\n {\n this.x *= scale;\n this.y *= scale;\n this.z *= scale;\n this.w *= scale;\n\n return this;\n },\n\n /**\n * Calculate the length (or magnitude) of this Vector.\n *\n * @method Phaser.Math.Vector4#length\n * @since 3.0.0\n *\n * @return {number} The length of this Vector.\n */\n length: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var w = this.w;\n\n return Math.sqrt(x * x + y * y + z * z + w * w);\n },\n\n /**\n * Calculate the length of this Vector squared.\n *\n * @method Phaser.Math.Vector4#lengthSq\n * @since 3.0.0\n *\n * @return {number} The length of this Vector, squared.\n */\n lengthSq: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var w = this.w;\n\n return x * x + y * y + z * z + w * w;\n },\n\n /**\n * Normalize this Vector.\n *\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\n *\n * @method Phaser.Math.Vector4#normalize\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n normalize: function ()\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var w = this.w;\n var len = x * x + y * y + z * z + w * w;\n\n if (len > 0)\n {\n len = 1 / Math.sqrt(len);\n\n this.x = x * len;\n this.y = y * len;\n this.z = z * len;\n this.w = w * len;\n }\n\n return this;\n },\n\n /**\n * Calculate the dot product of this Vector and the given Vector.\n *\n * @method Phaser.Math.Vector4#dot\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector4} v - The Vector4 to dot product with this Vector4.\n *\n * @return {number} The dot product of this Vector and the given Vector.\n */\n dot: function (v)\n {\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\n },\n\n /**\n * Linearly interpolate between this Vector and the given Vector.\n *\n * Interpolates this Vector towards the given Vector.\n *\n * @method Phaser.Math.Vector4#lerp\n * @since 3.0.0\n *\n * @param {Phaser.Math.Vector4} v - The Vector4 to interpolate towards.\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n lerp: function (v, t)\n {\n if (t === undefined) { t = 0; }\n\n var ax = this.x;\n var ay = this.y;\n var az = this.z;\n var aw = this.w;\n\n this.x = ax + t * (v.x - ax);\n this.y = ay + t * (v.y - ay);\n this.z = az + t * (v.z - az);\n this.w = aw + t * (v.w - aw);\n\n return this;\n },\n\n /**\n * Perform a component-wise multiplication between this Vector and the given Vector.\n *\n * Multiplies this Vector by the given Vector.\n *\n * @method Phaser.Math.Vector4#multiply\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to multiply this Vector by.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n multiply: function (v)\n {\n this.x *= v.x;\n this.y *= v.y;\n this.z *= v.z || 1;\n this.w *= v.w || 1;\n\n return this;\n },\n\n /**\n * Perform a component-wise division between this Vector and the given Vector.\n *\n * Divides this Vector by the given Vector.\n *\n * @method Phaser.Math.Vector4#divide\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to divide this Vector by.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n divide: function (v)\n {\n this.x /= v.x;\n this.y /= v.y;\n this.z /= v.z || 1;\n this.w /= v.w || 1;\n\n return this;\n },\n\n /**\n * Calculate the distance between this Vector and the given Vector.\n *\n * @method Phaser.Math.Vector4#distance\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\n *\n * @return {number} The distance from this Vector to the given Vector.\n */\n distance: function (v)\n {\n var dx = v.x - this.x;\n var dy = v.y - this.y;\n var dz = v.z - this.z || 0;\n var dw = v.w - this.w || 0;\n\n return Math.sqrt(dx * dx + dy * dy + dz * dz + dw * dw);\n },\n\n /**\n * Calculate the distance between this Vector and the given Vector, squared.\n *\n * @method Phaser.Math.Vector4#distanceSq\n * @since 3.0.0\n *\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\n *\n * @return {number} The distance from this Vector to the given Vector, squared.\n */\n distanceSq: function (v)\n {\n var dx = v.x - this.x;\n var dy = v.y - this.y;\n var dz = v.z - this.z || 0;\n var dw = v.w - this.w || 0;\n\n return dx * dx + dy * dy + dz * dz + dw * dw;\n },\n\n /**\n * Negate the `x`, `y`, `z` and `w` components of this Vector.\n *\n * @method Phaser.Math.Vector4#negate\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n negate: function ()\n {\n this.x = -this.x;\n this.y = -this.y;\n this.z = -this.z;\n this.w = -this.w;\n\n return this;\n },\n\n /**\n * Transform this Vector with the given Matrix.\n *\n * @method Phaser.Math.Vector4#transformMat4\n * @since 3.0.0\n *\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector4 with.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n transformMat4: function (mat)\n {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var w = this.w;\n var m = mat.val;\n\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\n this.w = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\n\n return this;\n },\n\n /**\n * Transform this Vector with the given Quaternion.\n *\n * @method Phaser.Math.Vector4#transformQuat\n * @since 3.0.0\n *\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n transformQuat: function (q)\n {\n // TODO: is this really the same as Vector3?\n // Also, what about this: http://molecularmusings.wordpress.com/2013/05/24/a-faster-quaternion-vector-multiplication/\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var qx = q.x;\n var qy = q.y;\n var qz = q.z;\n var qw = q.w;\n\n // calculate quat * vec\n var ix = qw * x + qy * z - qz * y;\n var iy = qw * y + qz * x - qx * z;\n var iz = qw * z + qx * y - qy * x;\n var iw = -qx * x - qy * y - qz * z;\n\n // calculate result * inverse quat\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n\n return this;\n },\n\n /**\n * Make this Vector the zero vector (0, 0, 0, 0).\n *\n * @method Phaser.Math.Vector4#reset\n * @since 3.0.0\n *\n * @return {Phaser.Math.Vector4} This Vector4.\n */\n reset: function ()\n {\n this.x = 0;\n this.y = 0;\n this.z = 0;\n this.w = 0;\n\n return this;\n }\n\n});\n\n// TODO: Check if these are required internally, if not, remove.\nVector4.prototype.sub = Vector4.prototype.subtract;\nVector4.prototype.mul = Vector4.prototype.multiply;\nVector4.prototype.div = Vector4.prototype.divide;\nVector4.prototype.dist = Vector4.prototype.distance;\nVector4.prototype.distSq = Vector4.prototype.distanceSq;\nVector4.prototype.len = Vector4.prototype.length;\nVector4.prototype.lenSq = Vector4.prototype.lengthSq;\n\nmodule.exports = Vector4;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Checks if the two values are within the given `tolerance` of each other.\n *\n * @function Phaser.Math.Within\n * @since 3.0.0\n *\n * @param {number} a - The first value to use in the calculation.\n * @param {number} b - The second value to use in the calculation.\n * @param {number} tolerance - The tolerance. Anything equal to or less than this value is considered as being within range.\n *\n * @return {boolean} Returns `true` if `a` is less than or equal to the tolerance of `b`.\n */\nvar Within = function (a, b, tolerance)\n{\n return (Math.abs(a - b) <= tolerance);\n};\n\nmodule.exports = Within;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Wrap the given `value` between `min` and `max.\n *\n * @function Phaser.Math.Wrap\n * @since 3.0.0\n *\n * @param {number} value - The value to wrap.\n * @param {number} min - The minimum value.\n * @param {number} max - The maximum value.\n *\n * @return {number} The wrapped value.\n */\nvar Wrap = function (value, min, max)\n{\n var range = max - min;\n\n return (min + ((((value - min) % range) + range) % range));\n};\n\nmodule.exports = Wrap;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\n *\n * @function Phaser.Math.Angle.Between\n * @since 3.0.0\n *\n * @param {number} x1 - The x coordinate of the first point.\n * @param {number} y1 - The y coordinate of the first point.\n * @param {number} x2 - The x coordinate of the second point.\n * @param {number} y2 - The y coordinate of the second point.\n *\n * @return {number} The angle in radians.\n */\nvar Between = function (x1, y1, x2, y2)\n{\n return Math.atan2(y2 - y1, x2 - x1);\n};\n\nmodule.exports = Between;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\n *\n * Calculates the angle of the vector from the first point to the second point.\n *\n * @function Phaser.Math.Angle.BetweenPoints\n * @since 3.0.0\n *\n * @param {Phaser.Types.Math.Vector2Like} point1 - The first point.\n * @param {Phaser.Types.Math.Vector2Like} point2 - The second point.\n *\n * @return {number} The angle in radians.\n */\nvar BetweenPoints = function (point1, point2)\n{\n return Math.atan2(point2.y - point1.y, point2.x - point1.x);\n};\n\nmodule.exports = BetweenPoints;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\n *\n * The difference between this method and {@link Phaser.Math.Angle.BetweenPoints} is that this assumes the y coordinate\n * travels down the screen.\n *\n * @function Phaser.Math.Angle.BetweenPointsY\n * @since 3.0.0\n *\n * @param {Phaser.Types.Math.Vector2Like} point1 - The first point.\n * @param {Phaser.Types.Math.Vector2Like} point2 - The second point.\n *\n * @return {number} The angle in radians.\n */\nvar BetweenPointsY = function (point1, point2)\n{\n return Math.atan2(point2.x - point1.x, point2.y - point1.y);\n};\n\nmodule.exports = BetweenPointsY;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\n *\n * The difference between this method and {@link Phaser.Math.Angle.Between} is that this assumes the y coordinate\n * travels down the screen.\n *\n * @function Phaser.Math.Angle.BetweenY\n * @since 3.0.0\n *\n * @param {number} x1 - The x coordinate of the first point.\n * @param {number} y1 - The y coordinate of the first point.\n * @param {number} x2 - The x coordinate of the second point.\n * @param {number} y2 - The y coordinate of the second point.\n *\n * @return {number} The angle in radians.\n */\nvar BetweenY = function (x1, y1, x2, y2)\n{\n return Math.atan2(x2 - x1, y2 - y1);\n};\n\nmodule.exports = BetweenY;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CONST = require('../const');\n\n/**\n * Takes an angle in Phasers default clockwise format and converts it so that\n * 0 is North, 90 is West, 180 is South and 270 is East,\n * therefore running counter-clockwise instead of clockwise.\n * \n * You can pass in the angle from a Game Object using:\n * \n * ```javascript\n * var converted = CounterClockwise(gameobject.rotation);\n * ```\n * \n * All values for this function are in radians.\n *\n * @function Phaser.Math.Angle.CounterClockwise\n * @since 3.16.0\n *\n * @param {number} angle - The angle to convert, in radians.\n *\n * @return {number} The converted angle, in radians.\n */\nvar CounterClockwise = function (angle)\n{\n if (angle > Math.PI)\n {\n angle -= CONST.PI2;\n }\n\n return Math.abs((((angle + CONST.TAU) % CONST.PI2) - CONST.PI2) % CONST.PI2);\n};\n\nmodule.exports = CounterClockwise;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Normalize an angle to the [0, 2pi] range.\n *\n * @function Phaser.Math.Angle.Normalize\n * @since 3.0.0\n *\n * @param {number} angle - The angle to normalize, in radians.\n *\n * @return {number} The normalized angle, in radians.\n */\nvar Normalize = function (angle)\n{\n angle = angle % (2 * Math.PI);\n\n if (angle >= 0)\n {\n return angle;\n }\n else\n {\n return angle + 2 * Math.PI;\n }\n};\n\nmodule.exports = Normalize;\n","/**\n * @author Richard Davey \n * @author @samme\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar FloatBetween = require('../FloatBetween');\n\n/**\n * Returns a random angle in the range [-pi, pi].\n *\n * @function Phaser.Math.Angle.Random\n * @since 3.23.0\n *\n * @return {number} The angle, in radians.\n */\nvar Random = function ()\n{\n return FloatBetween(-Math.PI, Math.PI);\n};\n\nmodule.exports = Random;\n","/**\n * @author Richard Davey \n * @author @samme\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar FloatBetween = require('../FloatBetween');\n\n/**\n * Returns a random angle in the range [-180, 180].\n *\n * @function Phaser.Math.Angle.RandomDegrees\n * @since 3.23.0\n *\n * @return {number} The angle, in degrees.\n */\nvar RandomDegrees = function ()\n{\n return FloatBetween(-180, 180);\n};\n\nmodule.exports = RandomDegrees;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Normalize = require('./Normalize');\n\n/**\n * Reverse the given angle.\n *\n * @function Phaser.Math.Angle.Reverse\n * @since 3.0.0\n *\n * @param {number} angle - The angle to reverse, in radians.\n *\n * @return {number} The reversed angle, in radians.\n */\nvar Reverse = function (angle)\n{\n return Normalize(angle + Math.PI);\n};\n\nmodule.exports = Reverse;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar MATH_CONST = require('../const');\n\n/**\n * Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call.\n *\n * @function Phaser.Math.Angle.RotateTo\n * @since 3.0.0\n *\n * @param {number} currentAngle - The current angle, in radians.\n * @param {number} targetAngle - The target angle to rotate to, in radians.\n * @param {number} [lerp=0.05] - The lerp value to add to the current angle.\n *\n * @return {number} The adjusted angle.\n */\nvar RotateTo = function (currentAngle, targetAngle, lerp)\n{\n if (lerp === undefined) { lerp = 0.05; }\n\n if (currentAngle === targetAngle)\n {\n return currentAngle;\n }\n\n if (Math.abs(targetAngle - currentAngle) <= lerp || Math.abs(targetAngle - currentAngle) >= (MATH_CONST.PI2 - lerp))\n {\n currentAngle = targetAngle;\n }\n else\n {\n if (Math.abs(targetAngle - currentAngle) > Math.PI)\n {\n if (targetAngle < currentAngle)\n {\n targetAngle += MATH_CONST.PI2;\n }\n else\n {\n targetAngle -= MATH_CONST.PI2;\n }\n }\n\n if (targetAngle > currentAngle)\n {\n currentAngle += lerp;\n }\n else if (targetAngle < currentAngle)\n {\n currentAngle -= lerp;\n }\n }\n\n return currentAngle;\n};\n\nmodule.exports = RotateTo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Gets the shortest angle between `angle1` and `angle2`.\n *\n * Both angles must be in the range -180 to 180, which is the same clamped\n * range that `sprite.angle` uses, so you can pass in two sprite angles to\n * this method and get the shortest angle back between the two of them.\n *\n * The angle returned will be in the same range. If the returned angle is\n * greater than 0 then it's a counter-clockwise rotation, if < 0 then it's\n * a clockwise rotation.\n *\n * TODO: Wrap the angles in this function?\n *\n * @function Phaser.Math.Angle.ShortestBetween\n * @since 3.0.0\n *\n * @param {number} angle1 - The first angle in the range -180 to 180.\n * @param {number} angle2 - The second angle in the range -180 to 180.\n *\n * @return {number} The shortest angle, in degrees. If greater than zero it's a counter-clockwise rotation.\n */\nvar ShortestBetween = function (angle1, angle2)\n{\n var difference = angle2 - angle1;\n\n if (difference === 0)\n {\n return 0;\n }\n\n var times = Math.floor((difference - (-180)) / 360);\n\n return difference - (times * 360);\n\n};\n\nmodule.exports = ShortestBetween;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar MathWrap = require('../Wrap');\n\n/**\n * Wrap an angle.\n *\n * Wraps the angle to a value in the range of -PI to PI.\n *\n * @function Phaser.Math.Angle.Wrap\n * @since 3.0.0\n *\n * @param {number} angle - The angle to wrap, in radians.\n *\n * @return {number} The wrapped angle, in radians.\n */\nvar Wrap = function (angle)\n{\n return MathWrap(angle, -Math.PI, Math.PI);\n};\n\nmodule.exports = Wrap;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Wrap = require('../Wrap');\n\n/**\n * Wrap an angle in degrees.\n *\n * Wraps the angle to a value in the range of -180 to 180.\n *\n * @function Phaser.Math.Angle.WrapDegrees\n * @since 3.0.0\n *\n * @param {number} angle - The angle to wrap, in degrees.\n *\n * @return {number} The wrapped angle, in degrees.\n */\nvar WrapDegrees = function (angle)\n{\n return Wrap(angle, -180, 180);\n};\n\nmodule.exports = WrapDegrees;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Angle\n */\n\nmodule.exports = {\n\n Between: require('./Between'),\n BetweenPoints: require('./BetweenPoints'),\n BetweenPointsY: require('./BetweenPointsY'),\n BetweenY: require('./BetweenY'),\n CounterClockwise: require('./CounterClockwise'),\n Normalize: require('./Normalize'),\n Random: require('./Random'),\n RandomDegrees: require('./RandomDegrees'),\n Reverse: require('./Reverse'),\n RotateTo: require('./RotateTo'),\n ShortestBetween: require('./ShortestBetween'),\n Wrap: require('./Wrap'),\n WrapDegrees: require('./WrapDegrees')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar MATH_CONST = {\n\n /**\n * The value of PI * 2.\n * \n * @name Phaser.Math.PI2\n * @type {number}\n * @since 3.0.0\n */\n PI2: Math.PI * 2,\n\n /**\n * The value of PI * 0.5.\n * \n * @name Phaser.Math.TAU\n * @type {number}\n * @since 3.0.0\n */\n TAU: Math.PI * 0.5,\n\n /**\n * An epsilon value (1.0e-6)\n * \n * @name Phaser.Math.EPSILON\n * @type {number}\n * @since 3.0.0\n */\n EPSILON: 1.0e-6,\n\n /**\n * For converting degrees to radians (PI / 180)\n * \n * @name Phaser.Math.DEG_TO_RAD\n * @type {number}\n * @since 3.0.0\n */\n DEG_TO_RAD: Math.PI / 180,\n\n /**\n * For converting radians to degrees (180 / PI)\n * \n * @name Phaser.Math.RAD_TO_DEG\n * @type {number}\n * @since 3.0.0\n */\n RAD_TO_DEG: 180 / Math.PI,\n\n /**\n * An instance of the Random Number Generator.\n * This is not set until the Game boots.\n * \n * @name Phaser.Math.RND\n * @type {Phaser.Math.RandomDataGenerator}\n * @since 3.0.0\n */\n RND: null,\n\n /**\n * The minimum safe integer this browser supports.\n * We use a const for backward compatibility with Internet Explorer.\n * \n * @name Phaser.Math.MIN_SAFE_INTEGER\n * @type {number}\n * @since 3.21.0\n */\n MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991,\n\n /**\n * The maximum safe integer this browser supports.\n * We use a const for backward compatibility with Internet Explorer.\n * \n * @name Phaser.Math.MAX_SAFE_INTEGER\n * @type {number}\n * @since 3.21.0\n */\n MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991\n\n};\n\nmodule.exports = MATH_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the distance between two sets of coordinates (points).\n *\n * @function Phaser.Math.Distance.Between\n * @since 3.0.0\n *\n * @param {number} x1 - The x coordinate of the first point.\n * @param {number} y1 - The y coordinate of the first point.\n * @param {number} x2 - The x coordinate of the second point.\n * @param {number} y2 - The y coordinate of the second point.\n *\n * @return {number} The distance between each point.\n */\nvar DistanceBetween = function (x1, y1, x2, y2)\n{\n var dx = x1 - x2;\n var dy = y1 - y2;\n\n return Math.sqrt(dx * dx + dy * dy);\n};\n\nmodule.exports = DistanceBetween;\n","/**\n * @author samme\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the distance between two points.\n *\n * @function Phaser.Math.Distance.BetweenPoints\n * @since 3.22.0\n *\n * @param {Phaser.Types.Math.Vector2Like} a - The first point.\n * @param {Phaser.Types.Math.Vector2Like} b - The second point.\n *\n * @return {number} The distance between the points.\n */\nvar DistanceBetweenPoints = function (a, b)\n{\n var dx = a.x - b.x;\n var dy = a.y - b.y;\n\n return Math.sqrt(dx * dx + dy * dy);\n};\n\nmodule.exports = DistanceBetweenPoints;\n","/**\n * @author samme\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the squared distance between two points.\n *\n * @function Phaser.Math.Distance.BetweenPointsSquared\n * @since 3.22.0\n *\n * @param {Phaser.Types.Math.Vector2Like} a - The first point.\n * @param {Phaser.Types.Math.Vector2Like} b - The second point.\n *\n * @return {number} The squared distance between the points.\n */\nvar DistanceBetweenPointsSquared = function (a, b)\n{\n var dx = a.x - b.x;\n var dy = a.y - b.y;\n\n return dx * dx + dy * dy;\n};\n\nmodule.exports = DistanceBetweenPointsSquared;\n","/**\n * @author samme\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the Chebyshev distance between two sets of coordinates (points).\n *\n * Chebyshev distance (or chessboard distance) is the maximum of the horizontal and vertical distances.\n * It's the effective distance when movement can be horizontal, vertical, or diagonal.\n *\n * @function Phaser.Math.Distance.Chebyshev\n * @since 3.22.0\n *\n * @param {number} x1 - The x coordinate of the first point.\n * @param {number} y1 - The y coordinate of the first point.\n * @param {number} x2 - The x coordinate of the second point.\n * @param {number} y2 - The y coordinate of the second point.\n *\n * @return {number} The distance between each point.\n */\nvar ChebyshevDistance = function (x1, y1, x2, y2)\n{\n return Math.max(Math.abs(x1 - x2), Math.abs(y1 - y2));\n};\n\nmodule.exports = ChebyshevDistance;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the distance between two sets of coordinates (points) to the power of `pow`.\n *\n * @function Phaser.Math.Distance.Power\n * @since 3.0.0\n *\n * @param {number} x1 - The x coordinate of the first point.\n * @param {number} y1 - The y coordinate of the first point.\n * @param {number} x2 - The x coordinate of the second point.\n * @param {number} y2 - The y coordinate of the second point.\n * @param {number} pow - The exponent.\n *\n * @return {number} The distance between each point.\n */\nvar DistancePower = function (x1, y1, x2, y2, pow)\n{\n if (pow === undefined) { pow = 2; }\n\n return Math.sqrt(Math.pow(x2 - x1, pow) + Math.pow(y2 - y1, pow));\n};\n\nmodule.exports = DistancePower;\n","/**\n * @author samme\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the snake distance between two sets of coordinates (points).\n *\n * Snake distance (rectilinear distance, Manhattan distance) is the sum of the horizontal and vertical distances.\n * It's the effective distance when movement is allowed only horizontally or vertically (but not both).\n *\n * @function Phaser.Math.Distance.Snake\n * @since 3.22.0\n *\n * @param {number} x1 - The x coordinate of the first point.\n * @param {number} y1 - The y coordinate of the first point.\n * @param {number} x2 - The x coordinate of the second point.\n * @param {number} y2 - The y coordinate of the second point.\n *\n * @return {number} The distance between each point.\n */\nvar SnakeDistance = function (x1, y1, x2, y2)\n{\n return Math.abs(x1 - x2) + Math.abs(y1 - y2);\n};\n\nmodule.exports = SnakeDistance;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the distance between two sets of coordinates (points), squared.\n *\n * @function Phaser.Math.Distance.Squared\n * @since 3.0.0\n *\n * @param {number} x1 - The x coordinate of the first point.\n * @param {number} y1 - The y coordinate of the first point.\n * @param {number} x2 - The x coordinate of the second point.\n * @param {number} y2 - The y coordinate of the second point.\n *\n * @return {number} The distance between each point, squared.\n */\nvar DistanceSquared = function (x1, y1, x2, y2)\n{\n var dx = x1 - x2;\n var dy = y1 - y2;\n\n return dx * dx + dy * dy;\n};\n\nmodule.exports = DistanceSquared;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Distance\n */\n\nmodule.exports = {\n\n Between: require('./DistanceBetween'),\n BetweenPoints: require('./DistanceBetweenPoints'),\n BetweenPointsSquared: require('./DistanceBetweenPointsSquared'),\n Chebyshev: require('./DistanceChebyshev'),\n Power: require('./DistancePower'),\n Snake: require('./DistanceSnake'),\n Squared: require('./DistanceSquared')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Back ease-in.\n *\n * @function Phaser.Math.Easing.Back.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n * @param {number} [overshoot=1.70158] - The overshoot amount.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v, overshoot)\n{\n if (overshoot === undefined) { overshoot = 1.70158; }\n\n return v * v * ((overshoot + 1) * v - overshoot);\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Back ease-in/out.\n *\n * @function Phaser.Math.Easing.Back.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n * @param {number} [overshoot=1.70158] - The overshoot amount.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v, overshoot)\n{\n if (overshoot === undefined) { overshoot = 1.70158; }\n\n var s = overshoot * 1.525;\n\n if ((v *= 2) < 1)\n {\n return 0.5 * (v * v * ((s + 1) * v - s));\n }\n else\n {\n return 0.5 * ((v -= 2) * v * ((s + 1) * v + s) + 2);\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Back ease-out.\n *\n * @function Phaser.Math.Easing.Back.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n * @param {number} [overshoot=1.70158] - The overshoot amount.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v, overshoot)\n{\n if (overshoot === undefined) { overshoot = 1.70158; }\n\n return --v * v * ((overshoot + 1) * v + overshoot) + 1;\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Back\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Bounce ease-in.\n *\n * @function Phaser.Math.Easing.Bounce.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v)\n{\n v = 1 - v;\n\n if (v < 1 / 2.75)\n {\n return 1 - (7.5625 * v * v);\n }\n else if (v < 2 / 2.75)\n {\n return 1 - (7.5625 * (v -= 1.5 / 2.75) * v + 0.75);\n }\n else if (v < 2.5 / 2.75)\n {\n return 1 - (7.5625 * (v -= 2.25 / 2.75) * v + 0.9375);\n }\n else\n {\n return 1 - (7.5625 * (v -= 2.625 / 2.75) * v + 0.984375);\n }\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Bounce ease-in/out.\n *\n * @function Phaser.Math.Easing.Bounce.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v)\n{\n var reverse = false;\n\n if (v < 0.5)\n {\n v = 1 - (v * 2);\n reverse = true;\n }\n else\n {\n v = (v * 2) - 1;\n }\n\n if (v < 1 / 2.75)\n {\n v = 7.5625 * v * v;\n }\n else if (v < 2 / 2.75)\n {\n v = 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\n }\n else if (v < 2.5 / 2.75)\n {\n v = 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\n }\n else\n {\n v = 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\n }\n\n if (reverse)\n {\n return (1 - v) * 0.5;\n }\n else\n {\n return v * 0.5 + 0.5;\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Bounce ease-out.\n *\n * @function Phaser.Math.Easing.Bounce.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v)\n{\n if (v < 1 / 2.75)\n {\n return 7.5625 * v * v;\n }\n else if (v < 2 / 2.75)\n {\n return 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\n }\n else if (v < 2.5 / 2.75)\n {\n return 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\n }\n else\n {\n return 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\n }\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Bounce\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Circular ease-in.\n *\n * @function Phaser.Math.Easing.Circular.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v)\n{\n return 1 - Math.sqrt(1 - v * v);\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Circular ease-in/out.\n *\n * @function Phaser.Math.Easing.Circular.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v)\n{\n if ((v *= 2) < 1)\n {\n return -0.5 * (Math.sqrt(1 - v * v) - 1);\n }\n else\n {\n return 0.5 * (Math.sqrt(1 - (v -= 2) * v) + 1);\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Circular ease-out.\n *\n * @function Phaser.Math.Easing.Circular.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v)\n{\n return Math.sqrt(1 - (--v * v));\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Circular\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Cubic ease-in.\n *\n * @function Phaser.Math.Easing.Cubic.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v)\n{\n return v * v * v;\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Cubic ease-in/out.\n *\n * @function Phaser.Math.Easing.Cubic.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v)\n{\n if ((v *= 2) < 1)\n {\n return 0.5 * v * v * v;\n }\n else\n {\n return 0.5 * ((v -= 2) * v * v + 2);\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Cubic ease-out.\n *\n * @function Phaser.Math.Easing.Cubic.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v)\n{\n return --v * v * v + 1;\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Cubic\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Elastic ease-in.\n *\n * @function Phaser.Math.Easing.Elastic.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v, amplitude, period)\n{\n if (amplitude === undefined) { amplitude = 0.1; }\n if (period === undefined) { period = 0.1; }\n\n if (v === 0)\n {\n return 0;\n }\n else if (v === 1)\n {\n return 1;\n }\n else\n {\n var s = period / 4;\n\n if (amplitude < 1)\n {\n amplitude = 1;\n }\n else\n {\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\n }\n\n return -(amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\n }\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Elastic ease-in/out.\n *\n * @function Phaser.Math.Easing.Elastic.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v, amplitude, period)\n{\n if (amplitude === undefined) { amplitude = 0.1; }\n if (period === undefined) { period = 0.1; }\n\n if (v === 0)\n {\n return 0;\n }\n else if (v === 1)\n {\n return 1;\n }\n else\n {\n var s = period / 4;\n\n if (amplitude < 1)\n {\n amplitude = 1;\n }\n else\n {\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\n }\n\n if ((v *= 2) < 1)\n {\n return -0.5 * (amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\n }\n else\n {\n return amplitude * Math.pow(2, -10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period) * 0.5 + 1;\n }\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Elastic ease-out.\n *\n * @function Phaser.Math.Easing.Elastic.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v, amplitude, period)\n{\n if (amplitude === undefined) { amplitude = 0.1; }\n if (period === undefined) { period = 0.1; }\n\n if (v === 0)\n {\n return 0;\n }\n else if (v === 1)\n {\n return 1;\n }\n else\n {\n var s = period / 4;\n\n if (amplitude < 1)\n {\n amplitude = 1;\n }\n else\n {\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\n }\n\n return (amplitude * Math.pow(2, -10 * v) * Math.sin((v - s) * (2 * Math.PI) / period) + 1);\n }\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Elastic\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Exponential ease-in.\n *\n * @function Phaser.Math.Easing.Expo.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v)\n{\n return Math.pow(2, 10 * (v - 1)) - 0.001;\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Exponential ease-in/out.\n *\n * @function Phaser.Math.Easing.Expo.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v)\n{\n if ((v *= 2) < 1)\n {\n return 0.5 * Math.pow(2, 10 * (v - 1));\n }\n else\n {\n return 0.5 * (2 - Math.pow(2, -10 * (v - 1)));\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Exponential ease-out.\n *\n * @function Phaser.Math.Easing.Expo.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v)\n{\n return 1 - Math.pow(2, -10 * v);\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Expo\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing\n */\n\nmodule.exports = {\n\n Back: require('./back'),\n Bounce: require('./bounce'),\n Circular: require('./circular'),\n Cubic: require('./cubic'),\n Elastic: require('./elastic'),\n Expo: require('./expo'),\n Linear: require('./linear'),\n Quadratic: require('./quadratic'),\n Quartic: require('./quartic'),\n Quintic: require('./quintic'),\n Sine: require('./sine'),\n Stepped: require('./stepped')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Linear easing (no variation).\n *\n * @function Phaser.Math.Easing.Linear\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Linear = function (v)\n{\n return v;\n};\n\nmodule.exports = Linear;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nmodule.exports = require('./Linear');\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quadratic ease-in.\n *\n * @function Phaser.Math.Easing.Quadratic.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v)\n{\n return v * v;\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quadratic ease-in/out.\n *\n * @function Phaser.Math.Easing.Quadratic.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v)\n{\n if ((v *= 2) < 1)\n {\n return 0.5 * v * v;\n }\n else\n {\n return -0.5 * (--v * (v - 2) - 1);\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quadratic ease-out.\n *\n * @function Phaser.Math.Easing.Quadratic.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v)\n{\n return v * (2 - v);\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Quadratic\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quartic ease-in.\n *\n * @function Phaser.Math.Easing.Quartic.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v)\n{\n return v * v * v * v;\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quartic ease-in/out.\n *\n * @function Phaser.Math.Easing.Quartic.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v)\n{\n if ((v *= 2) < 1)\n {\n return 0.5 * v * v * v * v;\n }\n else\n {\n return -0.5 * ((v -= 2) * v * v * v - 2);\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quartic ease-out.\n *\n * @function Phaser.Math.Easing.Quartic.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v)\n{\n return 1 - (--v * v * v * v);\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Quartic\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quintic ease-in.\n *\n * @function Phaser.Math.Easing.Quintic.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v)\n{\n return v * v * v * v * v;\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quintic ease-in/out.\n *\n * @function Phaser.Math.Easing.Quintic.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v)\n{\n if ((v *= 2) < 1)\n {\n return 0.5 * v * v * v * v * v;\n }\n else\n {\n return 0.5 * ((v -= 2) * v * v * v * v + 2);\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Quintic ease-out.\n *\n * @function Phaser.Math.Easing.Quintic.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v)\n{\n return --v * v * v * v * v + 1;\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Quintic\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Sinusoidal ease-in.\n *\n * @function Phaser.Math.Easing.Sine.In\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar In = function (v)\n{\n if (v === 0)\n {\n return 0;\n }\n else if (v === 1)\n {\n return 1;\n }\n else\n {\n return 1 - Math.cos(v * Math.PI / 2);\n }\n};\n\nmodule.exports = In;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Sinusoidal ease-in/out.\n *\n * @function Phaser.Math.Easing.Sine.InOut\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar InOut = function (v)\n{\n if (v === 0)\n {\n return 0;\n }\n else if (v === 1)\n {\n return 1;\n }\n else\n {\n return 0.5 * (1 - Math.cos(Math.PI * v));\n }\n};\n\nmodule.exports = InOut;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Sinusoidal ease-out.\n *\n * @function Phaser.Math.Easing.Sine.Out\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n *\n * @return {number} The tweened value.\n */\nvar Out = function (v)\n{\n if (v === 0)\n {\n return 0;\n }\n else if (v === 1)\n {\n return 1;\n }\n else\n {\n return Math.sin(v * Math.PI / 2);\n }\n};\n\nmodule.exports = Out;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Sine\n */\n\nmodule.exports = {\n\n In: require('./In'),\n Out: require('./Out'),\n InOut: require('./InOut')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Stepped easing.\n *\n * @function Phaser.Math.Easing.Stepped\n * @since 3.0.0\n *\n * @param {number} v - The value to be tweened.\n * @param {number} [steps=1] - The number of steps in the ease.\n *\n * @return {number} The tweened value.\n */\nvar Stepped = function (v, steps)\n{\n if (steps === undefined) { steps = 1; }\n\n if (v <= 0)\n {\n return 0;\n }\n else if (v >= 1)\n {\n return 1;\n }\n else\n {\n return (((steps * v) | 0) + 1) * (1 / steps);\n }\n};\n\nmodule.exports = Stepped;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Easing.Stepped\n */\n\nmodule.exports = require('./Stepped');\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the fuzzy ceiling of the given value.\n *\n * @function Phaser.Math.Fuzzy.Ceil\n * @since 3.0.0\n *\n * @param {number} value - The value.\n * @param {number} [epsilon=0.0001] - The epsilon.\n *\n * @return {number} The fuzzy ceiling of the value.\n */\nvar Ceil = function (value, epsilon)\n{\n if (epsilon === undefined) { epsilon = 0.0001; }\n\n return Math.ceil(value - epsilon);\n};\n\nmodule.exports = Ceil;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Check whether the given values are fuzzily equal.\n *\n * Two numbers are fuzzily equal if their difference is less than `epsilon`.\n *\n * @function Phaser.Math.Fuzzy.Equal\n * @since 3.0.0\n *\n * @param {number} a - The first value.\n * @param {number} b - The second value.\n * @param {number} [epsilon=0.0001] - The epsilon.\n *\n * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`.\n */\nvar Equal = function (a, b, epsilon)\n{\n if (epsilon === undefined) { epsilon = 0.0001; }\n\n return Math.abs(a - b) < epsilon;\n};\n\nmodule.exports = Equal;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Calculate the fuzzy floor of the given value.\n *\n * @function Phaser.Math.Fuzzy.Floor\n * @since 3.0.0\n *\n * @param {number} value - The value.\n * @param {number} [epsilon=0.0001] - The epsilon.\n *\n * @return {number} The floor of the value.\n */\nvar Floor = function (value, epsilon)\n{\n if (epsilon === undefined) { epsilon = 0.0001; }\n\n return Math.floor(value + epsilon);\n};\n\nmodule.exports = Floor;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Check whether `a` is fuzzily greater than `b`.\n *\n * `a` is fuzzily greater than `b` if it is more than `b - epsilon`.\n *\n * @function Phaser.Math.Fuzzy.GreaterThan\n * @since 3.0.0\n *\n * @param {number} a - The first value.\n * @param {number} b - The second value.\n * @param {number} [epsilon=0.0001] - The epsilon.\n *\n * @return {boolean} `true` if `a` is fuzzily greater than than `b`, otherwise `false`.\n */\nvar GreaterThan = function (a, b, epsilon)\n{\n if (epsilon === undefined) { epsilon = 0.0001; }\n\n return a > b - epsilon;\n};\n\nmodule.exports = GreaterThan;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Check whether `a` is fuzzily less than `b`.\n *\n * `a` is fuzzily less than `b` if it is less than `b + epsilon`.\n *\n * @function Phaser.Math.Fuzzy.LessThan\n * @since 3.0.0\n *\n * @param {number} a - The first value.\n * @param {number} b - The second value.\n * @param {number} [epsilon=0.0001] - The epsilon.\n *\n * @return {boolean} `true` if `a` is fuzzily less than `b`, otherwise `false`.\n */\nvar LessThan = function (a, b, epsilon)\n{\n if (epsilon === undefined) { epsilon = 0.0001; }\n\n return a < b + epsilon;\n};\n\nmodule.exports = LessThan;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Fuzzy\n */\n\nmodule.exports = {\n\n Ceil: require('./Ceil'),\n Equal: require('./Equal'),\n Floor: require('./Floor'),\n GreaterThan: require('./GreaterThan'),\n LessThan: require('./LessThan')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CONST = require('./const');\nvar Extend = require('../utils/object/Extend');\n\n/**\n * @namespace Phaser.Math\n */\n\nvar PhaserMath = {\n\n // Collections of functions\n Angle: require('./angle/'),\n Distance: require('./distance/'),\n Easing: require('./easing/'),\n Fuzzy: require('./fuzzy/'),\n Interpolation: require('./interpolation/'),\n Pow2: require('./pow2/'),\n Snap: require('./snap/'),\n\n // Expose the RNG Class\n RandomDataGenerator: require('./random-data-generator/RandomDataGenerator'),\n\n // Single functions\n Average: require('./Average'),\n Bernstein: require('./Bernstein'),\n Between: require('./Between'),\n CatmullRom: require('./CatmullRom'),\n CeilTo: require('./CeilTo'),\n Clamp: require('./Clamp'),\n DegToRad: require('./DegToRad'),\n Difference: require('./Difference'),\n Factorial: require('./Factorial'),\n FloatBetween: require('./FloatBetween'),\n FloorTo: require('./FloorTo'),\n FromPercent: require('./FromPercent'),\n GetSpeed: require('./GetSpeed'),\n IsEven: require('./IsEven'),\n IsEvenStrict: require('./IsEvenStrict'),\n Linear: require('./Linear'),\n MaxAdd: require('./MaxAdd'),\n MinSub: require('./MinSub'),\n Percent: require('./Percent'),\n RadToDeg: require('./RadToDeg'),\n RandomXY: require('./RandomXY'),\n RandomXYZ: require('./RandomXYZ'),\n RandomXYZW: require('./RandomXYZW'),\n Rotate: require('./Rotate'),\n RotateAround: require('./RotateAround'),\n RotateAroundDistance: require('./RotateAroundDistance'),\n RotateTo: require('./RotateTo'),\n RoundAwayFromZero: require('./RoundAwayFromZero'),\n RoundTo: require('./RoundTo'),\n SinCosTableGenerator: require('./SinCosTableGenerator'),\n SmootherStep: require('./SmootherStep'),\n SmoothStep: require('./SmoothStep'),\n ToXY: require('./ToXY'),\n TransformXY: require('./TransformXY'),\n Within: require('./Within'),\n Wrap: require('./Wrap'),\n\n // Vector classes\n Vector2: require('./Vector2'),\n Vector3: require('./Vector3'),\n Vector4: require('./Vector4'),\n Matrix3: require('./Matrix3'),\n Matrix4: require('./Matrix4'),\n Quaternion: require('./Quaternion'),\n RotateVec3: require('./RotateVec3')\n\n};\n\n// Merge in the consts\n\nPhaserMath = Extend(false, PhaserMath, CONST);\n\n// Export it\n\nmodule.exports = PhaserMath;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Bernstein = require('../Bernstein');\n\n/**\n * A bezier interpolation method.\n *\n * @function Phaser.Math.Interpolation.Bezier\n * @since 3.0.0\n *\n * @param {number[]} v - The input array of values to interpolate between.\n * @param {number} k - The percentage of interpolation, between 0 and 1.\n *\n * @return {number} The interpolated value.\n */\nvar BezierInterpolation = function (v, k)\n{\n var b = 0;\n var n = v.length - 1;\n\n for (var i = 0; i <= n; i++)\n {\n b += Math.pow(1 - k, n - i) * Math.pow(k, i) * v[i] * Bernstein(n, i);\n }\n\n return b;\n};\n\nmodule.exports = BezierInterpolation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CatmullRom = require('../CatmullRom');\n\n/**\n * A Catmull-Rom interpolation method.\n *\n * @function Phaser.Math.Interpolation.CatmullRom\n * @since 3.0.0\n *\n * @param {number[]} v - The input array of values to interpolate between.\n * @param {number} k - The percentage of interpolation, between 0 and 1.\n *\n * @return {number} The interpolated value.\n */\nvar CatmullRomInterpolation = function (v, k)\n{\n var m = v.length - 1;\n var f = m * k;\n var i = Math.floor(f);\n\n if (v[0] === v[m])\n {\n if (k < 0)\n {\n i = Math.floor(f = m * (1 + k));\n }\n\n return CatmullRom(f - i, v[(i - 1 + m) % m], v[i], v[(i + 1) % m], v[(i + 2) % m]);\n }\n else\n {\n if (k < 0)\n {\n return v[0] - (CatmullRom(-f, v[0], v[0], v[1], v[1]) - v[0]);\n }\n\n if (k > 1)\n {\n return v[m] - (CatmullRom(f - m, v[m], v[m], v[m - 1], v[m - 1]) - v[m]);\n }\n\n return CatmullRom(f - i, v[i ? i - 1 : 0], v[i], v[m < i + 1 ? m : i + 1], v[m < i + 2 ? m : i + 2]);\n }\n};\n\nmodule.exports = CatmullRomInterpolation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @ignore\n */\nfunction P0 (t, p)\n{\n var k = 1 - t;\n\n return k * k * k * p;\n}\n\n/**\n * @ignore\n */\nfunction P1 (t, p)\n{\n var k = 1 - t;\n\n return 3 * k * k * t * p;\n}\n\n/**\n * @ignore\n */\nfunction P2 (t, p)\n{\n return 3 * (1 - t) * t * t * p;\n}\n\n/**\n * @ignore\n */\nfunction P3 (t, p)\n{\n return t * t * t * p;\n}\n\n/**\n * A cubic bezier interpolation method.\n *\n * https://medium.com/@adrian_cooney/bezier-interpolation-13b68563313a\n *\n * @function Phaser.Math.Interpolation.CubicBezier\n * @since 3.0.0\n *\n * @param {number} t - The percentage of interpolation, between 0 and 1.\n * @param {number} p0 - The start point.\n * @param {number} p1 - The first control point.\n * @param {number} p2 - The second control point.\n * @param {number} p3 - The end point.\n *\n * @return {number} The interpolated value.\n */\nvar CubicBezierInterpolation = function (t, p0, p1, p2, p3)\n{\n return P0(t, p0) + P1(t, p1) + P2(t, p2) + P3(t, p3);\n};\n\nmodule.exports = CubicBezierInterpolation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Linear = require('../Linear');\n\n/**\n * A linear interpolation method.\n *\n * @function Phaser.Math.Interpolation.Linear\n * @since 3.0.0\n * @see {@link https://en.wikipedia.org/wiki/Linear_interpolation}\n *\n * @param {number[]} v - The input array of values to interpolate between.\n * @param {!number} k - The percentage of interpolation, between 0 and 1.\n *\n * @return {!number} The interpolated value.\n */\nvar LinearInterpolation = function (v, k)\n{\n var m = v.length - 1;\n var f = m * k;\n var i = Math.floor(f);\n\n if (k < 0)\n {\n return Linear(v[0], v[1], f);\n }\n else if (k > 1)\n {\n return Linear(v[m], v[m - 1], m - f);\n }\n else\n {\n return Linear(v[i], v[(i + 1 > m) ? m : i + 1], f - i);\n }\n};\n\nmodule.exports = LinearInterpolation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @ignore\n */\nfunction P0 (t, p)\n{\n var k = 1 - t;\n\n return k * k * p;\n}\n\n/**\n * @ignore\n */\nfunction P1 (t, p)\n{\n return 2 * (1 - t) * t * p;\n}\n\n/**\n * @ignore\n */\nfunction P2 (t, p)\n{\n return t * t * p;\n}\n\n// https://github.com/mrdoob/three.js/blob/master/src/extras/core/Interpolations.js\n\n/**\n * A quadratic bezier interpolation method.\n *\n * @function Phaser.Math.Interpolation.QuadraticBezier\n * @since 3.2.0\n *\n * @param {number} t - The percentage of interpolation, between 0 and 1.\n * @param {number} p0 - The start point.\n * @param {number} p1 - The control point.\n * @param {number} p2 - The end point.\n *\n * @return {number} The interpolated value.\n */\nvar QuadraticBezierInterpolation = function (t, p0, p1, p2)\n{\n return P0(t, p0) + P1(t, p1) + P2(t, p2);\n};\n\nmodule.exports = QuadraticBezierInterpolation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SmoothStep = require('../SmoothStep');\n\n/**\n * A Smooth Step interpolation method.\n *\n * @function Phaser.Math.Interpolation.SmoothStep\n * @since 3.9.0\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\n *\n * @param {number} t - The percentage of interpolation, between 0 and 1.\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\n *\n * @return {number} The interpolated value.\n */\nvar SmoothStepInterpolation = function (t, min, max)\n{\n return min + (max - min) * SmoothStep(t, 0, 1);\n};\n\nmodule.exports = SmoothStepInterpolation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SmootherStep = require('../SmootherStep');\n\n/**\n * A Smoother Step interpolation method.\n *\n * @function Phaser.Math.Interpolation.SmootherStep\n * @since 3.9.0\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\n *\n * @param {number} t - The percentage of interpolation, between 0 and 1.\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\n *\n * @return {number} The interpolated value.\n */\nvar SmootherStepInterpolation = function (t, min, max)\n{\n return min + (max - min) * SmootherStep(t, 0, 1);\n};\n\nmodule.exports = SmootherStepInterpolation;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Interpolation\n */\n\nmodule.exports = {\n\n Bezier: require('./BezierInterpolation'),\n CatmullRom: require('./CatmullRomInterpolation'),\n CubicBezier: require('./CubicBezierInterpolation'),\n Linear: require('./LinearInterpolation'),\n QuadraticBezier: require('./QuadraticBezierInterpolation'),\n SmoothStep: require('./SmoothStepInterpolation'),\n SmootherStep: require('./SmootherStepInterpolation')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Returns the nearest power of 2 to the given `value`.\n *\n * @function Phaser.Math.Pow2.GetNext\n * @since 3.0.0\n *\n * @param {number} value - The value.\n *\n * @return {integer} The nearest power of 2 to `value`.\n */\nvar GetPowerOfTwo = function (value)\n{\n var index = Math.log(value) / 0.6931471805599453;\n\n return (1 << Math.ceil(index));\n};\n\nmodule.exports = GetPowerOfTwo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Checks if the given `width` and `height` are a power of two.\n * Useful for checking texture dimensions.\n *\n * @function Phaser.Math.Pow2.IsSize\n * @since 3.0.0\n *\n * @param {number} width - The width.\n * @param {number} height - The height.\n *\n * @return {boolean} `true` if `width` and `height` are a power of two, otherwise `false`.\n */\nvar IsSizePowerOfTwo = function (width, height)\n{\n return (width > 0 && (width & (width - 1)) === 0 && height > 0 && (height & (height - 1)) === 0);\n};\n\nmodule.exports = IsSizePowerOfTwo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Tests the value and returns `true` if it is a power of two.\n *\n * @function Phaser.Math.Pow2.IsValue\n * @since 3.0.0\n *\n * @param {number} value - The value to check if it's a power of two.\n *\n * @return {boolean} Returns `true` if `value` is a power of two, otherwise `false`.\n */\nvar IsValuePowerOfTwo = function (value)\n{\n return (value > 0 && (value & (value - 1)) === 0);\n};\n\nmodule.exports = IsValuePowerOfTwo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Pow2\n */\n\nmodule.exports = {\n\n GetNext: require('./GetPowerOfTwo'),\n IsSize: require('./IsSizePowerOfTwo'),\n IsValue: require('./IsValuePowerOfTwo')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../utils/Class');\n\n/**\n * @classdesc\n * A seeded Random Data Generator.\n * \n * Access via `Phaser.Math.RND` which is an instance of this class pre-defined\n * by Phaser. Or, create your own instance to use as you require.\n * \n * The `Math.RND` generator is seeded by the Game Config property value `seed`.\n * If no such config property exists, a random number is used.\n * \n * If you create your own instance of this class you should provide a seed for it.\n * If no seed is given it will use a 'random' one based on Date.now.\n *\n * @class RandomDataGenerator\n * @memberof Phaser.Math\n * @constructor\n * @since 3.0.0\n *\n * @param {(string|string[])} [seeds] - The seeds to use for the random number generator.\n */\nvar RandomDataGenerator = new Class({\n\n initialize:\n\n function RandomDataGenerator (seeds)\n {\n if (seeds === undefined) { seeds = [ (Date.now() * Math.random()).toString() ]; }\n\n /**\n * Internal var.\n *\n * @name Phaser.Math.RandomDataGenerator#c\n * @type {number}\n * @default 1\n * @private\n * @since 3.0.0\n */\n this.c = 1;\n\n /**\n * Internal var.\n *\n * @name Phaser.Math.RandomDataGenerator#s0\n * @type {number}\n * @default 0\n * @private\n * @since 3.0.0\n */\n this.s0 = 0;\n\n /**\n * Internal var.\n *\n * @name Phaser.Math.RandomDataGenerator#s1\n * @type {number}\n * @default 0\n * @private\n * @since 3.0.0\n */\n this.s1 = 0;\n\n /**\n * Internal var.\n *\n * @name Phaser.Math.RandomDataGenerator#s2\n * @type {number}\n * @default 0\n * @private\n * @since 3.0.0\n */\n this.s2 = 0;\n\n /**\n * Internal var.\n *\n * @name Phaser.Math.RandomDataGenerator#n\n * @type {number}\n * @default 0\n * @private\n * @since 3.2.0\n */\n this.n = 0;\n\n /**\n * Signs to choose from.\n *\n * @name Phaser.Math.RandomDataGenerator#signs\n * @type {number[]}\n * @since 3.0.0\n */\n this.signs = [ -1, 1 ];\n\n if (seeds)\n {\n this.init(seeds);\n }\n },\n\n /**\n * Private random helper.\n *\n * @method Phaser.Math.RandomDataGenerator#rnd\n * @since 3.0.0\n * @private\n *\n * @return {number} A random number.\n */\n rnd: function ()\n {\n var t = 2091639 * this.s0 + this.c * 2.3283064365386963e-10; // 2^-32\n\n this.c = t | 0;\n this.s0 = this.s1;\n this.s1 = this.s2;\n this.s2 = t - this.c;\n\n return this.s2;\n },\n\n /**\n * Internal method that creates a seed hash.\n *\n * @method Phaser.Math.RandomDataGenerator#hash\n * @since 3.0.0\n * @private\n *\n * @param {string} data - The value to hash.\n *\n * @return {number} The hashed value.\n */\n hash: function (data)\n {\n var h;\n var n = this.n;\n\n data = data.toString();\n\n for (var i = 0; i < data.length; i++)\n {\n n += data.charCodeAt(i);\n h = 0.02519603282416938 * n;\n n = h >>> 0;\n h -= n;\n h *= n;\n n = h >>> 0;\n h -= n;\n n += h * 0x100000000;// 2^32\n }\n\n this.n = n;\n\n return (n >>> 0) * 2.3283064365386963e-10;// 2^-32\n },\n\n /**\n * Initialize the state of the random data generator.\n *\n * @method Phaser.Math.RandomDataGenerator#init\n * @since 3.0.0\n *\n * @param {(string|string[])} seeds - The seeds to initialize the random data generator with.\n */\n init: function (seeds)\n {\n if (typeof seeds === 'string')\n {\n this.state(seeds);\n }\n else\n {\n this.sow(seeds);\n }\n },\n\n /**\n * Reset the seed of the random data generator.\n *\n * _Note_: the seed array is only processed up to the first `undefined` (or `null`) value, should such be present.\n *\n * @method Phaser.Math.RandomDataGenerator#sow\n * @since 3.0.0\n *\n * @param {string[]} seeds - The array of seeds: the `toString()` of each value is used.\n */\n sow: function (seeds)\n {\n // Always reset to default seed\n this.n = 0xefc8249d;\n this.s0 = this.hash(' ');\n this.s1 = this.hash(' ');\n this.s2 = this.hash(' ');\n this.c = 1;\n\n if (!seeds)\n {\n return;\n }\n\n // Apply any seeds\n for (var i = 0; i < seeds.length && (seeds[i] != null); i++)\n {\n var seed = seeds[i];\n\n this.s0 -= this.hash(seed);\n this.s0 += ~~(this.s0 < 0);\n this.s1 -= this.hash(seed);\n this.s1 += ~~(this.s1 < 0);\n this.s2 -= this.hash(seed);\n this.s2 += ~~(this.s2 < 0);\n }\n },\n\n /**\n * Returns a random integer between 0 and 2^32.\n *\n * @method Phaser.Math.RandomDataGenerator#integer\n * @since 3.0.0\n *\n * @return {number} A random integer between 0 and 2^32.\n */\n integer: function ()\n {\n // 2^32\n return this.rnd() * 0x100000000;\n },\n\n /**\n * Returns a random real number between 0 and 1.\n *\n * @method Phaser.Math.RandomDataGenerator#frac\n * @since 3.0.0\n *\n * @return {number} A random real number between 0 and 1.\n */\n frac: function ()\n {\n // 2^-53\n return this.rnd() + (this.rnd() * 0x200000 | 0) * 1.1102230246251565e-16;\n },\n\n /**\n * Returns a random real number between 0 and 2^32.\n *\n * @method Phaser.Math.RandomDataGenerator#real\n * @since 3.0.0\n *\n * @return {number} A random real number between 0 and 2^32.\n */\n real: function ()\n {\n return this.integer() + this.frac();\n },\n\n /**\n * Returns a random integer between and including min and max.\n *\n * @method Phaser.Math.RandomDataGenerator#integerInRange\n * @since 3.0.0\n *\n * @param {number} min - The minimum value in the range.\n * @param {number} max - The maximum value in the range.\n *\n * @return {number} A random number between min and max.\n */\n integerInRange: function (min, max)\n {\n return Math.floor(this.realInRange(0, max - min + 1) + min);\n },\n\n /**\n * Returns a random integer between and including min and max.\n * This method is an alias for RandomDataGenerator.integerInRange.\n *\n * @method Phaser.Math.RandomDataGenerator#between\n * @since 3.0.0\n *\n * @param {number} min - The minimum value in the range.\n * @param {number} max - The maximum value in the range.\n *\n * @return {number} A random number between min and max.\n */\n between: function (min, max)\n {\n return Math.floor(this.realInRange(0, max - min + 1) + min);\n },\n\n /**\n * Returns a random real number between min and max.\n *\n * @method Phaser.Math.RandomDataGenerator#realInRange\n * @since 3.0.0\n *\n * @param {number} min - The minimum value in the range.\n * @param {number} max - The maximum value in the range.\n *\n * @return {number} A random number between min and max.\n */\n realInRange: function (min, max)\n {\n return this.frac() * (max - min) + min;\n },\n\n /**\n * Returns a random real number between -1 and 1.\n *\n * @method Phaser.Math.RandomDataGenerator#normal\n * @since 3.0.0\n *\n * @return {number} A random real number between -1 and 1.\n */\n normal: function ()\n {\n return 1 - (2 * this.frac());\n },\n\n /**\n * Returns a valid RFC4122 version4 ID hex string from https://gist.github.com/1308368\n *\n * @method Phaser.Math.RandomDataGenerator#uuid\n * @since 3.0.0\n *\n * @return {string} A valid RFC4122 version4 ID hex string\n */\n uuid: function ()\n {\n var a = '';\n var b = '';\n\n for (b = a = ''; a++ < 36; b += ~a % 5 | a * 3 & 4 ? (a ^ 15 ? 8 ^ this.frac() * (a ^ 20 ? 16 : 4) : 4).toString(16) : '-')\n {\n // eslint-disable-next-line no-empty\n }\n\n return b;\n },\n\n /**\n * Returns a random element from within the given array.\n *\n * @method Phaser.Math.RandomDataGenerator#pick\n * @since 3.0.0\n * \n * @generic T\n * @genericUse {T[]} - [array]\n * @genericUse {T} - [$return]\n *\n * @param {T[]} array - The array to pick a random element from.\n *\n * @return {T} A random member of the array.\n */\n pick: function (array)\n {\n return array[this.integerInRange(0, array.length - 1)];\n },\n\n /**\n * Returns a sign to be used with multiplication operator.\n *\n * @method Phaser.Math.RandomDataGenerator#sign\n * @since 3.0.0\n *\n * @return {number} -1 or +1.\n */\n sign: function ()\n {\n return this.pick(this.signs);\n },\n\n /**\n * Returns a random element from within the given array, favoring the earlier entries.\n *\n * @method Phaser.Math.RandomDataGenerator#weightedPick\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[]} - [array]\n * @genericUse {T} - [$return]\n *\n * @param {T[]} array - The array to pick a random element from.\n *\n * @return {T} A random member of the array.\n */\n weightedPick: function (array)\n {\n return array[~~(Math.pow(this.frac(), 2) * (array.length - 1) + 0.5)];\n },\n\n /**\n * Returns a random timestamp between min and max, or between the beginning of 2000 and the end of 2020 if min and max aren't specified.\n *\n * @method Phaser.Math.RandomDataGenerator#timestamp\n * @since 3.0.0\n *\n * @param {number} min - The minimum value in the range.\n * @param {number} max - The maximum value in the range.\n *\n * @return {number} A random timestamp between min and max.\n */\n timestamp: function (min, max)\n {\n return this.realInRange(min || 946684800000, max || 1577862000000);\n },\n\n /**\n * Returns a random angle between -180 and 180.\n *\n * @method Phaser.Math.RandomDataGenerator#angle\n * @since 3.0.0\n *\n * @return {number} A random number between -180 and 180.\n */\n angle: function ()\n {\n return this.integerInRange(-180, 180);\n },\n\n /**\n * Returns a random rotation in radians, between -3.141 and 3.141\n *\n * @method Phaser.Math.RandomDataGenerator#rotation\n * @since 3.0.0\n *\n * @return {number} A random number between -3.141 and 3.141\n */\n rotation: function ()\n {\n return this.realInRange(-3.1415926, 3.1415926);\n },\n\n /**\n * Gets or Sets the state of the generator. This allows you to retain the values\n * that the generator is using between games, i.e. in a game save file.\n *\n * To seed this generator with a previously saved state you can pass it as the\n * `seed` value in your game config, or call this method directly after Phaser has booted.\n *\n * Call this method with no parameters to return the current state.\n *\n * If providing a state it should match the same format that this method\n * returns, which is a string with a header `!rnd` followed by the `c`,\n * `s0`, `s1` and `s2` values respectively, each comma-delimited.\n *\n * @method Phaser.Math.RandomDataGenerator#state\n * @since 3.0.0\n *\n * @param {string} [state] - Generator state to be set.\n *\n * @return {string} The current state of the generator.\n */\n state: function (state)\n {\n if (typeof state === 'string' && state.match(/^!rnd/))\n {\n state = state.split(',');\n\n this.c = parseFloat(state[1]);\n this.s0 = parseFloat(state[2]);\n this.s1 = parseFloat(state[3]);\n this.s2 = parseFloat(state[4]);\n }\n\n return [ '!rnd', this.c, this.s0, this.s1, this.s2 ].join(',');\n },\n\n /**\n * Shuffles the given array, using the current seed.\n *\n * @method Phaser.Math.RandomDataGenerator#shuffle\n * @since 3.7.0\n *\n * @generic T\n * @genericUse {T[]} - [array,$return]\n *\n * @param {T[]} [array] - The array to be shuffled.\n *\n * @return {T[]} The shuffled array.\n */\n shuffle: function (array)\n {\n var len = array.length - 1;\n\n for (var i = len; i > 0; i--)\n {\n var randomIndex = Math.floor(this.frac() * (i + 1));\n var itemAtIndex = array[randomIndex];\n\n array[randomIndex] = array[i];\n array[i] = itemAtIndex;\n }\n\n return array;\n }\n\n});\n\nmodule.exports = RandomDataGenerator;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Snap a value to nearest grid slice, using ceil.\n *\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `15`.\n * As will `14` snap to `15`... but `16` will snap to `20`.\n *\n * @function Phaser.Math.Snap.Ceil\n * @since 3.0.0\n *\n * @param {number} value - The value to snap.\n * @param {number} gap - The interval gap of the grid.\n * @param {number} [start=0] - Optional starting offset for gap.\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\n *\n * @return {number} The snapped value.\n */\nvar SnapCeil = function (value, gap, start, divide)\n{\n if (start === undefined) { start = 0; }\n\n if (gap === 0)\n {\n return value;\n }\n\n value -= start;\n value = gap * Math.ceil(value / gap);\n\n return (divide) ? (start + value) / gap : start + value;\n};\n\nmodule.exports = SnapCeil;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Snap a value to nearest grid slice, using floor.\n *\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10`.\n * As will `14` snap to `10`... but `16` will snap to `15`.\n *\n * @function Phaser.Math.Snap.Floor\n * @since 3.0.0\n *\n * @param {number} value - The value to snap.\n * @param {number} gap - The interval gap of the grid.\n * @param {number} [start=0] - Optional starting offset for gap.\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\n *\n * @return {number} The snapped value.\n */\nvar SnapFloor = function (value, gap, start, divide)\n{\n if (start === undefined) { start = 0; }\n\n if (gap === 0)\n {\n return value;\n }\n\n value -= start;\n value = gap * Math.floor(value / gap);\n\n return (divide) ? (start + value) / gap : start + value;\n};\n\nmodule.exports = SnapFloor;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Snap a value to nearest grid slice, using rounding.\n *\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10` whereas `14` will snap to `15`.\n *\n * @function Phaser.Math.Snap.To\n * @since 3.0.0\n *\n * @param {number} value - The value to snap.\n * @param {number} gap - The interval gap of the grid.\n * @param {number} [start=0] - Optional starting offset for gap.\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\n *\n * @return {number} The snapped value.\n */\nvar SnapTo = function (value, gap, start, divide)\n{\n if (start === undefined) { start = 0; }\n\n if (gap === 0)\n {\n return value;\n }\n\n value -= start;\n value = gap * Math.round(value / gap);\n\n return (divide) ? (start + value) / gap : start + value;\n};\n\nmodule.exports = SnapTo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Math.Snap\n */\n\nmodule.exports = {\n\n Ceil: require('./SnapCeil'),\n Floor: require('./SnapFloor'),\n To: require('./SnapTo')\n\n};\n","/**\n* @author Richard Davey \n* @copyright 2020 Photon Storm Ltd.\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\n*/\n\nvar Class = require('../utils/Class');\n\n/**\n * @classdesc\n * A Global Plugin is installed just once into the Game owned Plugin Manager.\n * It can listen for Game events and respond to them.\n *\n * @class BasePlugin\n * @memberof Phaser.Plugins\n * @constructor\n * @since 3.8.0\n *\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\n */\nvar BasePlugin = new Class({\n\n initialize:\n\n function BasePlugin (pluginManager)\n {\n /**\n * A handy reference to the Plugin Manager that is responsible for this plugin.\n * Can be used as a route to gain access to game systems and events.\n *\n * @name Phaser.Plugins.BasePlugin#pluginManager\n * @type {Phaser.Plugins.PluginManager}\n * @protected\n * @since 3.8.0\n */\n this.pluginManager = pluginManager;\n\n /**\n * A reference to the Game instance this plugin is running under.\n *\n * @name Phaser.Plugins.BasePlugin#game\n * @type {Phaser.Game}\n * @protected\n * @since 3.8.0\n */\n this.game = pluginManager.game;\n },\n\n /**\n * The PluginManager calls this method on a Global Plugin when the plugin is first instantiated.\n * It will never be called again on this instance.\n * In here you can set-up whatever you need for this plugin to run.\n * If a plugin is set to automatically start then `BasePlugin.start` will be called immediately after this.\n * On a Scene Plugin, this method is never called. Use {@link Phaser.Plugins.ScenePlugin#boot} instead.\n *\n * @method Phaser.Plugins.BasePlugin#init\n * @since 3.8.0\n *\n * @param {?any} [data] - A value specified by the user, if any, from the `data` property of the plugin's configuration object (if started at game boot) or passed in the PluginManager's `install` method (if started manually).\n */\n init: function ()\n {\n },\n\n /**\n * The PluginManager calls this method on a Global Plugin when the plugin is started.\n * If a plugin is stopped, and then started again, this will get called again.\n * Typically called immediately after `BasePlugin.init`.\n * On a Scene Plugin, this method is never called.\n *\n * @method Phaser.Plugins.BasePlugin#start\n * @since 3.8.0\n */\n start: function ()\n {\n // Here are the game-level events you can listen to.\n // At the very least you should offer a destroy handler for when the game closes down.\n\n // var eventEmitter = this.game.events;\n\n // eventEmitter.once('destroy', this.gameDestroy, this);\n // eventEmitter.on('pause', this.gamePause, this);\n // eventEmitter.on('resume', this.gameResume, this);\n // eventEmitter.on('resize', this.gameResize, this);\n // eventEmitter.on('prestep', this.gamePreStep, this);\n // eventEmitter.on('step', this.gameStep, this);\n // eventEmitter.on('poststep', this.gamePostStep, this);\n // eventEmitter.on('prerender', this.gamePreRender, this);\n // eventEmitter.on('postrender', this.gamePostRender, this);\n },\n\n /**\n * The PluginManager calls this method on a Global Plugin when the plugin is stopped.\n * The game code has requested that your plugin stop doing whatever it does.\n * It is now considered as 'inactive' by the PluginManager.\n * Handle that process here (i.e. stop listening for events, etc)\n * If the plugin is started again then `BasePlugin.start` will be called again.\n * On a Scene Plugin, this method is never called.\n *\n * @method Phaser.Plugins.BasePlugin#stop\n * @since 3.8.0\n */\n stop: function ()\n {\n },\n\n /**\n * Game instance has been destroyed.\n * You must release everything in here, all references, all objects, free it all up.\n *\n * @method Phaser.Plugins.BasePlugin#destroy\n * @since 3.8.0\n */\n destroy: function ()\n {\n this.pluginManager = null;\n this.game = null;\n this.scene = null;\n this.systems = null;\n }\n\n});\n\nmodule.exports = BasePlugin;\n","/**\n* @author Richard Davey \n* @copyright 2020 Photon Storm Ltd.\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\n*/\n\nvar BasePlugin = require('./BasePlugin');\nvar Class = require('../utils/Class');\nvar SceneEvents = require('../scene/events');\n\n/**\n * @classdesc\n * A Scene Level Plugin is installed into every Scene and belongs to that Scene.\n * It can listen for Scene events and respond to them.\n * It can map itself to a Scene property, or into the Scene Systems, or both.\n *\n * @class ScenePlugin\n * @memberof Phaser.Plugins\n * @extends Phaser.Plugins.BasePlugin\n * @constructor\n * @since 3.8.0\n *\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\n */\nvar ScenePlugin = new Class({\n\n Extends: BasePlugin,\n\n initialize:\n\n function ScenePlugin (scene, pluginManager)\n {\n BasePlugin.call(this, pluginManager);\n\n /**\n * A reference to the Scene that has installed this plugin.\n * Only set if it's a Scene Plugin, otherwise `null`.\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\n * You can use it during the `boot` method.\n *\n * @name Phaser.Plugins.ScenePlugin#scene\n * @type {?Phaser.Scene}\n * @protected\n * @since 3.8.0\n */\n this.scene = scene;\n\n /**\n * A reference to the Scene Systems of the Scene that has installed this plugin.\n * Only set if it's a Scene Plugin, otherwise `null`.\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\n * You can use it during the `boot` method.\n *\n * @name Phaser.Plugins.ScenePlugin#systems\n * @type {?Phaser.Scenes.Systems}\n * @protected\n * @since 3.8.0\n */\n this.systems = scene.sys;\n\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\n },\n\n /**\n * This method is called when the Scene boots. It is only ever called once.\n *\n * By this point the plugin properties `scene` and `systems` will have already been set.\n *\n * In here you can listen for {@link Phaser.Scenes.Events Scene events} and set-up whatever you need for this plugin to run.\n * Here are the Scene events you can listen to:\n *\n * - start\n * - ready\n * - preupdate\n * - update\n * - postupdate\n * - resize\n * - pause\n * - resume\n * - sleep\n * - wake\n * - transitioninit\n * - transitionstart\n * - transitioncomplete\n * - transitionout\n * - shutdown\n * - destroy\n *\n * At the very least you should offer a destroy handler for when the Scene closes down, i.e:\n *\n * ```javascript\n * var eventEmitter = this.systems.events;\n * eventEmitter.once('destroy', this.sceneDestroy, this);\n * ```\n *\n * @method Phaser.Plugins.ScenePlugin#boot\n * @since 3.8.0\n */\n boot: function ()\n {\n },\n\n /**\n * Game instance has been destroyed.\n * \n * You must release everything in here, all references, all objects, free it all up.\n *\n * @method Phaser.Plugins.ScenePlugin#destroy\n * @since 3.8.0\n */\n destroy: function ()\n {\n this.pluginManager = null;\n this.game = null;\n this.scene = null;\n this.systems = null;\n }\n\n});\n\nmodule.exports = ScenePlugin;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Phaser Blend Modes.\n * \n * @namespace Phaser.BlendModes\n * @since 3.0.0\n */\n\nmodule.exports = {\n\n /**\n * Skips the Blend Mode check in the renderer.\n * \n * @name Phaser.BlendModes.SKIP_CHECK\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n SKIP_CHECK: -1,\n\n /**\n * Normal blend mode. For Canvas and WebGL.\n * This is the default setting and draws new shapes on top of the existing canvas content.\n * \n * @name Phaser.BlendModes.NORMAL\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n NORMAL: 0,\n\n /**\n * Add blend mode. For Canvas and WebGL.\n * Where both shapes overlap the color is determined by adding color values.\n * \n * @name Phaser.BlendModes.ADD\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n ADD: 1,\n\n /**\n * Multiply blend mode. For Canvas and WebGL.\n * The pixels are of the top layer are multiplied with the corresponding pixel of the bottom layer. A darker picture is the result.\n * \n * @name Phaser.BlendModes.MULTIPLY\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n MULTIPLY: 2,\n\n /**\n * Screen blend mode. For Canvas and WebGL.\n * The pixels are inverted, multiplied, and inverted again. A lighter picture is the result (opposite of multiply)\n * \n * @name Phaser.BlendModes.SCREEN\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n SCREEN: 3,\n\n /**\n * Overlay blend mode. For Canvas only.\n * A combination of multiply and screen. Dark parts on the base layer become darker, and light parts become lighter.\n * \n * @name Phaser.BlendModes.OVERLAY\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n OVERLAY: 4,\n\n /**\n * Darken blend mode. For Canvas only.\n * Retains the darkest pixels of both layers.\n * \n * @name Phaser.BlendModes.DARKEN\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n DARKEN: 5,\n\n /**\n * Lighten blend mode. For Canvas only.\n * Retains the lightest pixels of both layers.\n * \n * @name Phaser.BlendModes.LIGHTEN\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n LIGHTEN: 6,\n\n /**\n * Color Dodge blend mode. For Canvas only.\n * Divides the bottom layer by the inverted top layer.\n * \n * @name Phaser.BlendModes.COLOR_DODGE\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n COLOR_DODGE: 7,\n\n /**\n * Color Burn blend mode. For Canvas only.\n * Divides the inverted bottom layer by the top layer, and then inverts the result.\n * \n * @name Phaser.BlendModes.COLOR_BURN\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n COLOR_BURN: 8,\n\n /**\n * Hard Light blend mode. For Canvas only.\n * A combination of multiply and screen like overlay, but with top and bottom layer swapped.\n * \n * @name Phaser.BlendModes.HARD_LIGHT\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n HARD_LIGHT: 9,\n\n /**\n * Soft Light blend mode. For Canvas only.\n * A softer version of hard-light. Pure black or white does not result in pure black or white.\n * \n * @name Phaser.BlendModes.SOFT_LIGHT\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n SOFT_LIGHT: 10,\n\n /**\n * Difference blend mode. For Canvas only.\n * Subtracts the bottom layer from the top layer or the other way round to always get a positive value.\n * \n * @name Phaser.BlendModes.DIFFERENCE\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n DIFFERENCE: 11,\n\n /**\n * Exclusion blend mode. For Canvas only.\n * Like difference, but with lower contrast.\n * \n * @name Phaser.BlendModes.EXCLUSION\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n EXCLUSION: 12,\n\n /**\n * Hue blend mode. For Canvas only.\n * Preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer.\n * \n * @name Phaser.BlendModes.HUE\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n HUE: 13,\n\n /**\n * Saturation blend mode. For Canvas only.\n * Preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer.\n * \n * @name Phaser.BlendModes.SATURATION\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n SATURATION: 14,\n\n /**\n * Color blend mode. For Canvas only.\n * Preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer.\n * \n * @name Phaser.BlendModes.COLOR\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n COLOR: 15,\n\n /**\n * Luminosity blend mode. For Canvas only.\n * Preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer.\n * \n * @name Phaser.BlendModes.LUMINOSITY\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n LUMINOSITY: 16,\n\n /**\n * Alpha erase blend mode. For Canvas and WebGL.\n * \n * @name Phaser.BlendModes.ERASE\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n ERASE: 17,\n\n /**\n * Source-in blend mode. For Canvas only.\n * The new shape is drawn only where both the new shape and the destination canvas overlap. Everything else is made transparent.\n * \n * @name Phaser.BlendModes.SOURCE_IN\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n SOURCE_IN: 18,\n\n /**\n * Source-out blend mode. For Canvas only.\n * The new shape is drawn where it doesn't overlap the existing canvas content.\n * \n * @name Phaser.BlendModes.SOURCE_OUT\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n SOURCE_OUT: 19,\n\n /**\n * Source-out blend mode. For Canvas only.\n * The new shape is only drawn where it overlaps the existing canvas content.\n * \n * @name Phaser.BlendModes.SOURCE_ATOP\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n SOURCE_ATOP: 20,\n\n /**\n * Destination-over blend mode. For Canvas only.\n * New shapes are drawn behind the existing canvas content.\n * \n * @name Phaser.BlendModes.DESTINATION_OVER\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n DESTINATION_OVER: 21,\n\n /**\n * Destination-in blend mode. For Canvas only.\n * The existing canvas content is kept where both the new shape and existing canvas content overlap. Everything else is made transparent.\n * \n * @name Phaser.BlendModes.DESTINATION_IN\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n DESTINATION_IN: 22,\n\n /**\n * Destination-out blend mode. For Canvas only.\n * The existing content is kept where it doesn't overlap the new shape.\n * \n * @name Phaser.BlendModes.DESTINATION_OUT\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n DESTINATION_OUT: 23,\n\n /**\n * Destination-out blend mode. For Canvas only.\n * The existing canvas is only kept where it overlaps the new shape. The new shape is drawn behind the canvas content.\n * \n * @name Phaser.BlendModes.DESTINATION_ATOP\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n DESTINATION_ATOP: 24,\n\n /**\n * Lighten blend mode. For Canvas only.\n * Where both shapes overlap the color is determined by adding color values.\n * \n * @name Phaser.BlendModes.LIGHTER\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n LIGHTER: 25,\n\n /**\n * Copy blend mode. For Canvas only.\n * Only the new shape is shown.\n * \n * @name Phaser.BlendModes.COPY\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n COPY: 26,\n\n /**\n * Xor blend mode. For Canvas only.\n * Shapes are made transparent where both overlap and drawn normal everywhere else.\n * \n * @name Phaser.BlendModes.XOR\n * @type {integer}\n * @const\n * @since 3.0.0\n */\n XOR: 27\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scale Manager Resize Event.\n * \n * This event is dispatched whenever the Scale Manager detects a resize event from the browser.\n * It sends three parameters to the callback, each of them being Size components. You can read\n * the `width`, `height`, `aspectRatio` and other properties of these components to help with\n * scaling your own game content.\n *\n * @event Phaser.Scale.Events#RESIZE\n * @since 3.16.1\n * \n * @param {Phaser.Structs.Size} gameSize - A reference to the Game Size component. This is the un-scaled size of your game canvas.\n * @param {Phaser.Structs.Size} baseSize - A reference to the Base Size component. This is the game size multiplied by resolution.\n * @param {Phaser.Structs.Size} displaySize - A reference to the Display Size component. This is the scaled canvas size, after applying zoom and scale mode.\n * @param {number} resolution - The current resolution. Defaults to 1 at the moment.\n * @param {number} previousWidth - If the `gameSize` has changed, this value contains its previous width, otherwise it contains the current width.\n * @param {number} previousHeight - If the `gameSize` has changed, this value contains its previous height, otherwise it contains the current height.\n */\nmodule.exports = 'resize';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Added to Scene Event.\n *\n * This event is dispatched when a Game Object is added to a Scene.\n *\n * Listen for it from a Scene using `this.scene.events.on('addedtoscene', listener)`.\n *\n * @event Phaser.Scenes.Events#ADDED_TO_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene.\n * @param {Phaser.Scene} scene - The Scene to which the Game Object was added.\n */\nmodule.exports = 'addedtoscene';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Boot Event.\n * \n * This event is dispatched by a Scene during the Scene Systems boot process. Primarily used by Scene Plugins.\n * \n * Listen to it from a Scene using `this.scene.events.on('boot', listener)`.\n * \n * @event Phaser.Scenes.Events#BOOT\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n */\nmodule.exports = 'boot';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Create Event.\n * \n * This event is dispatched by a Scene after it has been created by the Scene Manager.\n * \n * If a Scene has a `create` method then this event is emitted _after_ that has run.\n * \n * If there is a transition, this event will be fired after the `TRANSITION_START` event.\n * \n * Listen to it from a Scene using `this.scene.events.on('create', listener)`.\n * \n * @event Phaser.Scenes.Events#CREATE\n * @since 3.17.0\n * \n * @param {Phaser.Scene} scene - A reference to the Scene that emitted this event.\n */\nmodule.exports = 'create';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Destroy Event.\n * \n * This event is dispatched by a Scene during the Scene Systems destroy process.\n * \n * Listen to it from a Scene using `this.scene.events.on('destroy', listener)`.\n * \n * You should destroy any resources that may be in use by your Scene in this event handler.\n * \n * @event Phaser.Scenes.Events#DESTROY\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n */\nmodule.exports = 'destroy';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Pause Event.\n * \n * This event is dispatched by a Scene when it is paused, either directly via the `pause` method, or as an\n * action from another Scene.\n * \n * Listen to it from a Scene using `this.scene.events.on('pause', listener)`.\n * \n * @event Phaser.Scenes.Events#PAUSE\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {any} [data] - An optional data object that was passed to this Scene when it was paused.\n */\nmodule.exports = 'pause';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Post Update Event.\n * \n * This event is dispatched by a Scene during the main game loop step.\n * \n * The event flow for a single step of a Scene is as follows:\n * \n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\n * 3. The `Scene.update` method is called, if it exists\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n * \n * Listen to it from a Scene using `this.scene.events.on('postupdate', listener)`.\n * \n * A Scene will only run its step if it is active.\n * \n * @event Phaser.Scenes.Events#POST_UPDATE\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\n */\nmodule.exports = 'postupdate';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Pre Update Event.\n * \n * This event is dispatched by a Scene during the main game loop step.\n * \n * The event flow for a single step of a Scene is as follows:\n * \n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\n * 3. The `Scene.update` method is called, if it exists\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n * \n * Listen to it from a Scene using `this.scene.events.on('preupdate', listener)`.\n * \n * A Scene will only run its step if it is active.\n * \n * @event Phaser.Scenes.Events#PRE_UPDATE\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\n */\nmodule.exports = 'preupdate';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Ready Event.\n * \n * This event is dispatched by a Scene during the Scene Systems start process.\n * By this point in the process the Scene is now fully active and rendering.\n * This event is meant for your game code to use, as all plugins have responded to the earlier 'start' event.\n * \n * Listen to it from a Scene using `this.scene.events.on('ready', listener)`.\n * \n * @event Phaser.Scenes.Events#READY\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {any} [data] - An optional data object that was passed to this Scene when it was started.\n */\nmodule.exports = 'ready';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Game Object Removed from Scene Event.\n *\n * This event is dispatched when a Game Object is removed from a Scene.\n *\n * Listen for it from a Scene using `this.scene.events.on('removedfromscene', listener)`.\n *\n * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE\n * @since 3.50.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene.\n * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed.\n */\nmodule.exports = 'removedfromscene';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Render Event.\n * \n * This event is dispatched by a Scene during the main game loop step.\n * \n * The event flow for a single step of a Scene is as follows:\n * \n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\n * 3. The `Scene.update` method is called, if it exists\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n * \n * Listen to it from a Scene using `this.scene.events.on('render', listener)`.\n * \n * A Scene will only render if it is visible and active.\n * By the time this event is dispatched, the Scene will have already been rendered.\n * \n * @event Phaser.Scenes.Events#RENDER\n * @since 3.0.0\n * \n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\n */\nmodule.exports = 'render';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Resume Event.\n * \n * This event is dispatched by a Scene when it is resumed from a paused state, either directly via the `resume` method,\n * or as an action from another Scene.\n * \n * Listen to it from a Scene using `this.scene.events.on('resume', listener)`.\n * \n * @event Phaser.Scenes.Events#RESUME\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {any} [data] - An optional data object that was passed to this Scene when it was resumed.\n */\nmodule.exports = 'resume';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Shutdown Event.\n * \n * This event is dispatched by a Scene during the Scene Systems shutdown process.\n * \n * Listen to it from a Scene using `this.scene.events.on('shutdown', listener)`.\n * \n * You should free-up any resources that may be in use by your Scene in this event handler, on the understanding\n * that the Scene may, at any time, become active again. A shutdown Scene is not 'destroyed', it's simply not\n * currently active. Use the [DESTROY]{@linkcode Phaser.Scenes.Events#event:DESTROY} event to completely clear resources.\n * \n * @event Phaser.Scenes.Events#SHUTDOWN\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {any} [data] - An optional data object that was passed to this Scene when it was shutdown.\n */\nmodule.exports = 'shutdown';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Sleep Event.\n * \n * This event is dispatched by a Scene when it is sent to sleep, either directly via the `sleep` method,\n * or as an action from another Scene.\n * \n * Listen to it from a Scene using `this.scene.events.on('sleep', listener)`.\n * \n * @event Phaser.Scenes.Events#SLEEP\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {any} [data] - An optional data object that was passed to this Scene when it was sent to sleep.\n */\nmodule.exports = 'sleep';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Start Event.\n * \n * This event is dispatched by a Scene during the Scene Systems start process. Primarily used by Scene Plugins.\n * \n * Listen to it from a Scene using `this.scene.events.on('start', listener)`.\n * \n * @event Phaser.Scenes.Events#START\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n */\nmodule.exports = 'start';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Transition Complete Event.\n * \n * This event is dispatched by the Target Scene of a transition.\n * \n * It happens when the transition process has completed. This occurs when the duration timer equals or exceeds the duration\n * of the transition.\n * \n * Listen to it from a Scene using `this.scene.events.on('transitioncomplete', listener)`.\n * \n * The Scene Transition event flow is as follows:\n * \n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\n * \n * @event Phaser.Scenes.Events#TRANSITION_COMPLETE\n * @since 3.5.0\n * \n * @param {Phaser.Scene} scene -The Scene on which the transitioned completed.\n */\nmodule.exports = 'transitioncomplete';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Transition Init Event.\n * \n * This event is dispatched by the Target Scene of a transition.\n * \n * It happens immediately after the `Scene.init` method is called. If the Scene does not have an `init` method,\n * this event is not dispatched.\n * \n * Listen to it from a Scene using `this.scene.events.on('transitioninit', listener)`.\n * \n * The Scene Transition event flow is as follows:\n * \n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\n * \n * @event Phaser.Scenes.Events#TRANSITION_INIT\n * @since 3.5.0\n * \n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\n * @param {number} duration - The duration of the transition in ms.\n */\nmodule.exports = 'transitioninit';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Transition Out Event.\n * \n * This event is dispatched by a Scene when it initiates a transition to another Scene.\n * \n * Listen to it from a Scene using `this.scene.events.on('transitionout', listener)`.\n * \n * The Scene Transition event flow is as follows:\n * \n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\n * \n * @event Phaser.Scenes.Events#TRANSITION_OUT\n * @since 3.5.0\n * \n * @param {Phaser.Scene} target - A reference to the Scene that is being transitioned to.\n * @param {number} duration - The duration of the transition in ms.\n */\nmodule.exports = 'transitionout';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Transition Start Event.\n * \n * This event is dispatched by the Target Scene of a transition, only if that Scene was not asleep.\n * \n * It happens immediately after the `Scene.create` method is called. If the Scene does not have a `create` method,\n * this event is dispatched anyway.\n * \n * If the Target Scene was sleeping then the [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} event is\n * dispatched instead of this event.\n * \n * Listen to it from a Scene using `this.scene.events.on('transitionstart', listener)`.\n * \n * The Scene Transition event flow is as follows:\n * \n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\n * \n * @event Phaser.Scenes.Events#TRANSITION_START\n * @since 3.5.0\n * \n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\n * @param {number} duration - The duration of the transition in ms.\n */\nmodule.exports = 'transitionstart';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Transition Wake Event.\n * \n * This event is dispatched by the Target Scene of a transition, only if that Scene was asleep before\n * the transition began. If the Scene was not asleep the [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} event is dispatched instead.\n * \n * Listen to it from a Scene using `this.scene.events.on('transitionwake', listener)`.\n * \n * The Scene Transition event flow is as follows:\n * \n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\n * \n * @event Phaser.Scenes.Events#TRANSITION_WAKE\n * @since 3.5.0\n * \n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\n * @param {number} duration - The duration of the transition in ms.\n */\nmodule.exports = 'transitionwake';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Update Event.\n * \n * This event is dispatched by a Scene during the main game loop step.\n * \n * The event flow for a single step of a Scene is as follows:\n * \n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\n * 3. The `Scene.update` method is called, if it exists\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\n * \n * Listen to it from a Scene using `this.scene.events.on('update', listener)`.\n * \n * A Scene will only run its step if it is active.\n * \n * @event Phaser.Scenes.Events#UPDATE\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\n */\nmodule.exports = 'update';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Scene Systems Wake Event.\n * \n * This event is dispatched by a Scene when it is woken from sleep, either directly via the `wake` method,\n * or as an action from another Scene.\n * \n * Listen to it from a Scene using `this.scene.events.on('wake', listener)`.\n * \n * @event Phaser.Scenes.Events#WAKE\n * @since 3.0.0\n * \n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\n * @param {any} [data] - An optional data object that was passed to this Scene when it was woken up.\n */\nmodule.exports = 'wake';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Scenes.Events\n */\n\nmodule.exports = {\n\n ADDED_TO_SCENE: require('./ADDED_TO_SCENE_EVENT'),\n BOOT: require('./BOOT_EVENT'),\n CREATE: require('./CREATE_EVENT'),\n DESTROY: require('./DESTROY_EVENT'),\n PAUSE: require('./PAUSE_EVENT'),\n POST_UPDATE: require('./POST_UPDATE_EVENT'),\n PRE_UPDATE: require('./PRE_UPDATE_EVENT'),\n READY: require('./READY_EVENT'),\n REMOVED_FROM_SCENE: require('./REMOVED_FROM_SCENE_EVENT'),\n RENDER: require('./RENDER_EVENT'),\n RESUME: require('./RESUME_EVENT'),\n SHUTDOWN: require('./SHUTDOWN_EVENT'),\n SLEEP: require('./SLEEP_EVENT'),\n START: require('./START_EVENT'),\n TRANSITION_COMPLETE: require('./TRANSITION_COMPLETE_EVENT'),\n TRANSITION_INIT: require('./TRANSITION_INIT_EVENT'),\n TRANSITION_OUT: require('./TRANSITION_OUT_EVENT'),\n TRANSITION_START: require('./TRANSITION_START_EVENT'),\n TRANSITION_WAKE: require('./TRANSITION_WAKE_EVENT'),\n UPDATE: require('./UPDATE_EVENT'),\n WAKE: require('./WAKE_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Retrieves the value of the given key from an object.\n *\n * @function Phaser.Tweens.Builders.GetBoolean\n * @since 3.0.0\n *\n * @param {object} source - The object to retrieve the value from.\n * @param {string} key - The key to look for in the `source` object.\n * @param {*} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided.\n *\n * @return {*} The retrieved value.\n */\nvar GetBoolean = function (source, key, defaultValue)\n{\n if (!source)\n {\n return defaultValue;\n }\n else if (source.hasOwnProperty(key))\n {\n return source[key];\n }\n else\n {\n return defaultValue;\n }\n};\n\nmodule.exports = GetBoolean;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar TWEEN_CONST = {\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.CREATED\n * @type {integer}\n * @since 3.0.0\n */\n CREATED: 0,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.INIT\n * @type {integer}\n * @since 3.0.0\n */\n INIT: 1,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.DELAY\n * @type {integer}\n * @since 3.0.0\n */\n DELAY: 2,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.OFFSET_DELAY\n * @type {integer}\n * @since 3.0.0\n */\n OFFSET_DELAY: 3,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.PENDING_RENDER\n * @type {integer}\n * @since 3.0.0\n */\n PENDING_RENDER: 4,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.PLAYING_FORWARD\n * @type {integer}\n * @since 3.0.0\n */\n PLAYING_FORWARD: 5,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.PLAYING_BACKWARD\n * @type {integer}\n * @since 3.0.0\n */\n PLAYING_BACKWARD: 6,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.HOLD_DELAY\n * @type {integer}\n * @since 3.0.0\n */\n HOLD_DELAY: 7,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.REPEAT_DELAY\n * @type {integer}\n * @since 3.0.0\n */\n REPEAT_DELAY: 8,\n\n /**\n * TweenData state.\n * \n * @name Phaser.Tweens.COMPLETE\n * @type {integer}\n * @since 3.0.0\n */\n COMPLETE: 9,\n\n // Tween specific (starts from 20 to cleanly allow extra TweenData consts in the future)\n\n /**\n * Tween state.\n * \n * @name Phaser.Tweens.PENDING_ADD\n * @type {integer}\n * @since 3.0.0\n */\n PENDING_ADD: 20,\n\n /**\n * Tween state.\n * \n * @name Phaser.Tweens.PAUSED\n * @type {integer}\n * @since 3.0.0\n */\n PAUSED: 21,\n\n /**\n * Tween state.\n * \n * @name Phaser.Tweens.LOOP_DELAY\n * @type {integer}\n * @since 3.0.0\n */\n LOOP_DELAY: 22,\n\n /**\n * Tween state.\n * \n * @name Phaser.Tweens.ACTIVE\n * @type {integer}\n * @since 3.0.0\n */\n ACTIVE: 23,\n\n /**\n * Tween state.\n * \n * @name Phaser.Tweens.COMPLETE_DELAY\n * @type {integer}\n * @since 3.0.0\n */\n COMPLETE_DELAY: 24,\n\n /**\n * Tween state.\n * \n * @name Phaser.Tweens.PENDING_REMOVE\n * @type {integer}\n * @since 3.0.0\n */\n PENDING_REMOVE: 25,\n\n /**\n * Tween state.\n * \n * @name Phaser.Tweens.REMOVED\n * @type {integer}\n * @since 3.0.0\n */\n REMOVED: 26\n\n};\n\nmodule.exports = TWEEN_CONST;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Taken from klasse by mattdesl https://github.com/mattdesl/klasse\n\nfunction hasGetterOrSetter (def)\n{\n return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function');\n}\n\nfunction getProperty (definition, k, isClassDescriptor)\n{\n // This may be a lightweight object, OR it might be a property that was defined previously.\n\n // For simple class descriptors we can just assume its NOT previously defined.\n var def = (isClassDescriptor) ? definition[k] : Object.getOwnPropertyDescriptor(definition, k);\n\n if (!isClassDescriptor && def.value && typeof def.value === 'object')\n {\n def = def.value;\n }\n\n // This might be a regular property, or it may be a getter/setter the user defined in a class.\n if (def && hasGetterOrSetter(def))\n {\n if (typeof def.enumerable === 'undefined')\n {\n def.enumerable = true;\n }\n\n if (typeof def.configurable === 'undefined')\n {\n def.configurable = true;\n }\n\n return def;\n }\n else\n {\n return false;\n }\n}\n\nfunction hasNonConfigurable (obj, k)\n{\n var prop = Object.getOwnPropertyDescriptor(obj, k);\n\n if (!prop)\n {\n return false;\n }\n\n if (prop.value && typeof prop.value === 'object')\n {\n prop = prop.value;\n }\n\n if (prop.configurable === false)\n {\n return true;\n }\n\n return false;\n}\n\n/**\n * Extends the given `myClass` object's prototype with the properties of `definition`.\n *\n * @function extend\n * @param {Object} ctor The constructor object to mix into.\n * @param {Object} definition A dictionary of functions for the class.\n * @param {boolean} isClassDescriptor Is the definition a class descriptor?\n * @param {Object} [extend] The parent constructor object.\n */\nfunction extend (ctor, definition, isClassDescriptor, extend)\n{\n for (var k in definition)\n {\n if (!definition.hasOwnProperty(k))\n {\n continue;\n }\n\n var def = getProperty(definition, k, isClassDescriptor);\n\n if (def !== false)\n {\n // If Extends is used, we will check its prototype to see if the final variable exists.\n\n var parent = extend || ctor;\n\n if (hasNonConfigurable(parent.prototype, k))\n {\n // Just skip the final property\n if (Class.ignoreFinals)\n {\n continue;\n }\n\n // We cannot re-define a property that is configurable=false.\n // So we will consider them final and throw an error. This is by\n // default so it is clear to the developer what is happening.\n // You can set ignoreFinals to true if you need to extend a class\n // which has configurable=false; it will simply not re-define final properties.\n throw new Error('cannot override final property \\'' + k + '\\', set Class.ignoreFinals = true to skip');\n }\n\n Object.defineProperty(ctor.prototype, k, def);\n }\n else\n {\n ctor.prototype[k] = definition[k];\n }\n }\n}\n\n/**\n * Applies the given `mixins` to the prototype of `myClass`.\n *\n * @function mixin\n * @param {Object} myClass The constructor object to mix into.\n * @param {Object|Array} mixins The mixins to apply to the constructor.\n */\nfunction mixin (myClass, mixins)\n{\n if (!mixins)\n {\n return;\n }\n\n if (!Array.isArray(mixins))\n {\n mixins = [ mixins ];\n }\n\n for (var i = 0; i < mixins.length; i++)\n {\n extend(myClass, mixins[i].prototype || mixins[i]);\n }\n}\n\n/**\n * Creates a new class with the given descriptor.\n * The constructor, defined by the name `initialize`,\n * is an optional function. If unspecified, an anonymous\n * function will be used which calls the parent class (if\n * one exists).\n *\n * You can also use `Extends` and `Mixins` to provide subclassing\n * and inheritance.\n *\n * @class Phaser.Class\n * @constructor\n * @param {Object} definition a dictionary of functions for the class\n * @example\n *\n * var MyClass = new Phaser.Class({\n *\n * initialize: function() {\n * this.foo = 2.0;\n * },\n *\n * bar: function() {\n * return this.foo + 5;\n * }\n * });\n */\nfunction Class (definition)\n{\n if (!definition)\n {\n definition = {};\n }\n\n // The variable name here dictates what we see in Chrome debugger\n var initialize;\n var Extends;\n\n if (definition.initialize)\n {\n if (typeof definition.initialize !== 'function')\n {\n throw new Error('initialize must be a function');\n }\n\n initialize = definition.initialize;\n\n // Usually we should avoid 'delete' in V8 at all costs.\n // However, its unlikely to make any performance difference\n // here since we only call this on class creation (i.e. not object creation).\n delete definition.initialize;\n }\n else if (definition.Extends)\n {\n var base = definition.Extends;\n\n initialize = function ()\n {\n base.apply(this, arguments);\n };\n }\n else\n {\n initialize = function () {};\n }\n\n if (definition.Extends)\n {\n initialize.prototype = Object.create(definition.Extends.prototype);\n initialize.prototype.constructor = initialize;\n\n // For getOwnPropertyDescriptor to work, we need to act directly on the Extends (or Mixin)\n\n Extends = definition.Extends;\n\n delete definition.Extends;\n }\n else\n {\n initialize.prototype.constructor = initialize;\n }\n\n // Grab the mixins, if they are specified...\n var mixins = null;\n\n if (definition.Mixins)\n {\n mixins = definition.Mixins;\n delete definition.Mixins;\n }\n\n // First, mixin if we can.\n mixin(initialize, mixins);\n\n // Now we grab the actual definition which defines the overrides.\n extend(initialize, definition, true, Extends);\n\n return initialize;\n}\n\nClass.extend = extend;\nClass.mixin = mixin;\nClass.ignoreFinals = false;\n\nmodule.exports = Class;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * A NOOP (No Operation) callback function.\n *\n * Used internally by Phaser when it's more expensive to determine if a callback exists\n * than it is to just invoke an empty function.\n *\n * @function Phaser.Utils.NOOP\n * @since 3.0.0\n */\nvar NOOP = function ()\n{\n // NOOP\n};\n\nmodule.exports = NOOP;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Adds the given item, or array of items, to the array.\n *\n * Each item must be unique within the array.\n *\n * The array is modified in-place and returned.\n *\n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\n * added will take the array length over this limit, it will stop adding once the limit is reached.\n *\n * You can optionally specify a callback to be invoked for each item successfully added to the array.\n *\n * @function Phaser.Utils.Array.Add\n * @since 3.4.0\n *\n * @param {array} array - The array to be added to.\n * @param {any|any[]} item - The item, or array of items, to add to the array. Each item must be unique within the array.\n * @param {integer} [limit] - Optional limit which caps the size of the array.\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\n * @param {object} [context] - The context in which the callback is invoked.\n *\n * @return {array} The input array.\n */\nvar Add = function (array, item, limit, callback, context)\n{\n if (context === undefined) { context = array; }\n\n if (limit > 0)\n {\n var remaining = limit - array.length;\n\n // There's nothing more we can do here, the array is full\n if (remaining <= 0)\n {\n return null;\n }\n }\n\n // Fast path to avoid array mutation and iteration\n if (!Array.isArray(item))\n {\n if (array.indexOf(item) === -1)\n {\n array.push(item);\n\n if (callback)\n {\n callback.call(context, item);\n }\n\n return item;\n }\n else\n {\n return null;\n }\n }\n\n // If we got this far, we have an array of items to insert\n\n // Ensure all the items are unique\n var itemLength = item.length - 1;\n\n while (itemLength >= 0)\n {\n if (array.indexOf(item[itemLength]) !== -1)\n {\n // Already exists in array, so remove it\n item.splice(itemLength, 1);\n }\n\n itemLength--;\n }\n\n // Anything left?\n itemLength = item.length;\n\n if (itemLength === 0)\n {\n return null;\n }\n\n if (limit > 0 && itemLength > remaining)\n {\n item.splice(remaining);\n\n itemLength = remaining;\n }\n\n for (var i = 0; i < itemLength; i++)\n {\n var entry = item[i];\n\n array.push(entry);\n\n if (callback)\n {\n callback.call(context, entry);\n }\n }\n\n return item;\n};\n\nmodule.exports = Add;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Adds the given item, or array of items, to the array starting at the index specified.\n * \n * Each item must be unique within the array.\n * \n * Existing elements in the array are shifted up.\n * \n * The array is modified in-place and returned.\n * \n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\n * added will take the array length over this limit, it will stop adding once the limit is reached.\n * \n * You can optionally specify a callback to be invoked for each item successfully added to the array.\n *\n * @function Phaser.Utils.Array.AddAt\n * @since 3.4.0\n *\n * @param {array} array - The array to be added to.\n * @param {any|any[]} item - The item, or array of items, to add to the array.\n * @param {integer} [index=0] - The index in the array where the item will be inserted.\n * @param {integer} [limit] - Optional limit which caps the size of the array.\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\n * @param {object} [context] - The context in which the callback is invoked.\n *\n * @return {array} The input array.\n */\nvar AddAt = function (array, item, index, limit, callback, context)\n{\n if (index === undefined) { index = 0; }\n if (context === undefined) { context = array; }\n\n if (limit > 0)\n {\n var remaining = limit - array.length;\n\n // There's nothing more we can do here, the array is full\n if (remaining <= 0)\n {\n return null;\n }\n }\n\n // Fast path to avoid array mutation and iteration\n if (!Array.isArray(item))\n {\n if (array.indexOf(item) === -1)\n {\n array.splice(index, 0, item);\n\n if (callback)\n {\n callback.call(context, item);\n }\n\n return item;\n }\n else\n {\n return null;\n }\n }\n\n // If we got this far, we have an array of items to insert\n\n // Ensure all the items are unique\n var itemLength = item.length - 1;\n\n while (itemLength >= 0)\n {\n if (array.indexOf(item[itemLength]) !== -1)\n {\n // Already exists in array, so remove it\n item.pop();\n }\n\n itemLength--;\n }\n\n // Anything left?\n itemLength = item.length;\n\n if (itemLength === 0)\n {\n return null;\n }\n\n // Truncate to the limit\n if (limit > 0 && itemLength > remaining)\n {\n item.splice(remaining);\n\n itemLength = remaining;\n }\n\n for (var i = itemLength - 1; i >= 0; i--)\n {\n var entry = item[i];\n\n array.splice(index, 0, entry);\n\n if (callback)\n {\n callback.call(context, entry);\n }\n }\n\n return item;\n};\n\nmodule.exports = AddAt;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the given element to the top of the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.BringToTop\n * @since 3.4.0\n *\n * @param {array} array - The array.\n * @param {*} item - The element to move.\n *\n * @return {*} The element that was moved.\n */\nvar BringToTop = function (array, item)\n{\n var currentIndex = array.indexOf(item);\n\n if (currentIndex !== -1 && currentIndex < array.length)\n {\n array.splice(currentIndex, 1);\n array.push(item);\n }\n\n return item;\n};\n\nmodule.exports = BringToTop;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SafeRange = require('./SafeRange');\n\n/**\n * Returns the total number of elements in the array which have a property matching the given value.\n *\n * @function Phaser.Utils.Array.CountAllMatching\n * @since 3.4.0\n *\n * @param {array} array - The array to search.\n * @param {string} property - The property to test on each array element.\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\n * @param {integer} [startIndex] - An optional start index to search from.\n * @param {integer} [endIndex] - An optional end index to search to.\n *\n * @return {integer} The total number of elements with properties matching the given value.\n */\nvar CountAllMatching = function (array, property, value, startIndex, endIndex)\n{\n if (startIndex === undefined) { startIndex = 0; }\n if (endIndex === undefined) { endIndex = array.length; }\n\n var total = 0;\n\n if (SafeRange(array, startIndex, endIndex))\n {\n for (var i = startIndex; i < endIndex; i++)\n {\n var child = array[i];\n\n if (child[property] === value)\n {\n total++;\n }\n }\n }\n\n return total;\n};\n\nmodule.exports = CountAllMatching;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Passes each element in the array to the given callback.\n *\n * @function Phaser.Utils.Array.Each\n * @since 3.4.0\n *\n * @param {array} array - The array to search.\n * @param {function} callback - A callback to be invoked for each item in the array.\n * @param {object} context - The context in which the callback is invoked.\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the current array item.\n *\n * @return {array} The input array.\n */\nvar Each = function (array, callback, context)\n{\n var i;\n var args = [ null ];\n\n for (i = 3; i < arguments.length; i++)\n {\n args.push(arguments[i]);\n }\n\n for (i = 0; i < array.length; i++)\n {\n args[0] = array[i];\n\n callback.apply(context, args);\n }\n\n return array;\n};\n\nmodule.exports = Each;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SafeRange = require('./SafeRange');\n\n/**\n * Passes each element in the array, between the start and end indexes, to the given callback.\n *\n * @function Phaser.Utils.Array.EachInRange\n * @since 3.4.0\n *\n * @param {array} array - The array to search.\n * @param {function} callback - A callback to be invoked for each item in the array.\n * @param {object} context - The context in which the callback is invoked.\n * @param {integer} startIndex - The start index to search from.\n * @param {integer} endIndex - The end index to search to.\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\n *\n * @return {array} The input array.\n */\nvar EachInRange = function (array, callback, context, startIndex, endIndex)\n{\n if (startIndex === undefined) { startIndex = 0; }\n if (endIndex === undefined) { endIndex = array.length; }\n\n if (SafeRange(array, startIndex, endIndex))\n {\n var i;\n var args = [ null ];\n\n for (i = 5; i < arguments.length; i++)\n {\n args.push(arguments[i]);\n }\n\n for (i = startIndex; i < endIndex; i++)\n {\n args[0] = array[i];\n\n callback.apply(context, args);\n }\n }\n\n return array;\n};\n\nmodule.exports = EachInRange;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Searches a pre-sorted array for the closet value to the given number.\n *\n * If the `key` argument is given it will assume the array contains objects that all have the required `key` property name,\n * and will check for the closest value of those to the given number.\n *\n * @function Phaser.Utils.Array.FindClosestInSorted\n * @since 3.0.0\n *\n * @param {number} value - The value to search for in the array.\n * @param {array} array - The array to search, which must be sorted.\n * @param {string} [key] - An optional property key. If specified the array elements property will be checked against value.\n *\n * @return {(number|any)} The nearest value found in the array, or if a `key` was given, the nearest object with the matching property value.\n */\nvar FindClosestInSorted = function (value, array, key)\n{\n if (!array.length)\n {\n return NaN;\n }\n else if (array.length === 1)\n {\n return array[0];\n }\n\n var i = 1;\n var low;\n var high;\n\n if (key)\n {\n if (value < array[0][key])\n {\n return array[0];\n }\n\n while (array[i][key] < value)\n {\n i++;\n }\n }\n else\n {\n while (array[i] < value)\n {\n i++;\n }\n }\n\n if (i > array.length)\n {\n i = array.length;\n }\n\n if (key)\n {\n low = array[i - 1][key];\n high = array[i][key];\n\n return ((high - value) <= (value - low)) ? array[i] : array[i - 1];\n }\n else\n {\n low = array[i - 1];\n high = array[i];\n\n return ((high - value) <= (value - low)) ? high : low;\n }\n};\n\nmodule.exports = FindClosestInSorted;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SafeRange = require('./SafeRange');\n\n/**\n * Returns all elements in the array.\n *\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\n *\n * For example: `getAll('visible', true)` would return only elements that have their visible property set.\n *\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\n * the first 50 elements.\n *\n * @function Phaser.Utils.Array.GetAll\n * @since 3.4.0\n *\n * @param {array} array - The array to search.\n * @param {string} [property] - The property to test on each array element.\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\n * @param {integer} [startIndex] - An optional start index to search from.\n * @param {integer} [endIndex] - An optional end index to search to.\n *\n * @return {array} All matching elements from the array.\n */\nvar GetAll = function (array, property, value, startIndex, endIndex)\n{\n if (startIndex === undefined) { startIndex = 0; }\n if (endIndex === undefined) { endIndex = array.length; }\n\n var output = [];\n\n if (SafeRange(array, startIndex, endIndex))\n {\n for (var i = startIndex; i < endIndex; i++)\n {\n var child = array[i];\n\n if (!property ||\n (property && value === undefined && child.hasOwnProperty(property)) ||\n (property && value !== undefined && child[property] === value))\n {\n output.push(child);\n }\n }\n }\n\n return output;\n};\n\nmodule.exports = GetAll;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SafeRange = require('./SafeRange');\n\n/**\n * Returns the first element in the array.\n *\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\n *\n * For example: `getAll('visible', true)` would return the first element that had its `visible` property set.\n *\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\n * and you set `startIndex` to 0 and `endIndex` to 50, it would search only the first 50 elements.\n *\n * @function Phaser.Utils.Array.GetFirst\n * @since 3.4.0\n *\n * @param {array} array - The array to search.\n * @param {string} [property] - The property to test on each array element.\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\n * @param {integer} [startIndex=0] - An optional start index to search from.\n * @param {integer} [endIndex=array.length] - An optional end index to search up to (but not included)\n *\n * @return {object} The first matching element from the array, or `null` if no element could be found in the range given.\n */\nvar GetFirst = function (array, property, value, startIndex, endIndex)\n{\n if (startIndex === undefined) { startIndex = 0; }\n if (endIndex === undefined) { endIndex = array.length; }\n\n if (SafeRange(array, startIndex, endIndex))\n {\n for (var i = startIndex; i < endIndex; i++)\n {\n var child = array[i];\n\n if (!property ||\n (property && value === undefined && child.hasOwnProperty(property)) ||\n (property && value !== undefined && child[property] === value))\n {\n return child;\n }\n }\n }\n\n return null;\n};\n\nmodule.exports = GetFirst;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Returns a Random element from the array.\n *\n * @function Phaser.Utils.Array.GetRandom\n * @since 3.0.0\n *\n * @param {array} array - The array to select the random entry from.\n * @param {integer} [startIndex=0] - An optional start index.\n * @param {integer} [length=array.length] - An optional length, the total number of elements (from the startIndex) to choose from.\n *\n * @return {*} A random element from the array, or `null` if no element could be found in the range given.\n */\nvar GetRandom = function (array, startIndex, length)\n{\n if (startIndex === undefined) { startIndex = 0; }\n if (length === undefined) { length = array.length; }\n\n var randomIndex = startIndex + Math.floor(Math.random() * length);\n\n return (array[randomIndex] === undefined) ? null : array[randomIndex];\n};\n\nmodule.exports = GetRandom;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the given array element down one place in the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.MoveDown\n * @since 3.4.0\n *\n * @param {array} array - The input array.\n * @param {*} item - The element to move down the array.\n *\n * @return {array} The input array.\n */\nvar MoveDown = function (array, item)\n{\n var currentIndex = array.indexOf(item);\n\n if (currentIndex > 0)\n {\n var item2 = array[currentIndex - 1];\n\n var index2 = array.indexOf(item2);\n\n array[currentIndex] = item2;\n array[index2] = item;\n }\n\n return array;\n};\n\nmodule.exports = MoveDown;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves an element in an array to a new position within the same array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.MoveTo\n * @since 3.4.0\n *\n * @param {array} array - The array.\n * @param {*} item - The element to move.\n * @param {integer} index - The new index that the element will be moved to.\n *\n * @return {*} The element that was moved.\n */\nvar MoveTo = function (array, item, index)\n{\n var currentIndex = array.indexOf(item);\n\n if (currentIndex === -1 || index < 0 || index >= array.length)\n {\n throw new Error('Supplied index out of bounds');\n }\n\n if (currentIndex !== index)\n {\n // Remove\n array.splice(currentIndex, 1);\n\n // Add in new location\n array.splice(index, 0, item);\n }\n\n return item;\n};\n\nmodule.exports = MoveTo;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the given array element up one place in the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.MoveUp\n * @since 3.4.0\n *\n * @param {array} array - The input array.\n * @param {*} item - The element to move up the array.\n *\n * @return {array} The input array.\n */\nvar MoveUp = function (array, item)\n{\n var currentIndex = array.indexOf(item);\n\n if (currentIndex !== -1 && currentIndex < array.length - 1)\n {\n // The element one above `item` in the array\n var item2 = array[currentIndex + 1];\n var index2 = array.indexOf(item2);\n\n array[currentIndex] = item2;\n array[index2] = item;\n }\n\n return array;\n};\n\nmodule.exports = MoveUp;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Create an array representing the range of numbers (usually integers), between, and inclusive of,\n * the given `start` and `end` arguments. For example:\n *\n * `var array = numberArray(2, 4); // array = [2, 3, 4]`\n * `var array = numberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]`\n *\n * This is equivalent to `numberArrayStep(start, end, 1)`.\n *\n * You can optionally provide a prefix and / or suffix string. If given the array will contain\n * strings, not integers. For example:\n *\n * `var array = numberArray(1, 4, 'Level '); // array = [\"Level 1\", \"Level 2\", \"Level 3\", \"Level 4\"]`\n * `var array = numberArray(5, 7, 'HD-', '.png'); // array = [\"HD-5.png\", \"HD-6.png\", \"HD-7.png\"]`\n *\n * @function Phaser.Utils.Array.NumberArray\n * @since 3.0.0\n *\n * @param {number} start - The minimum value the array starts with.\n * @param {number} end - The maximum value the array contains.\n * @param {string} [prefix] - Optional prefix to place before the number. If provided the array will contain strings, not integers.\n * @param {string} [suffix] - Optional suffix to place after the number. If provided the array will contain strings, not integers.\n *\n * @return {(number[]|string[])} The array of number values, or strings if a prefix or suffix was provided.\n */\nvar NumberArray = function (start, end, prefix, suffix)\n{\n var result = [];\n\n for (var i = start; i <= end; i++)\n {\n if (prefix || suffix)\n {\n var key = (prefix) ? prefix + i.toString() : i.toString();\n\n if (suffix)\n {\n key = key.concat(suffix);\n }\n\n result.push(key);\n }\n else\n {\n result.push(i);\n }\n }\n\n return result;\n};\n\nmodule.exports = NumberArray;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar RoundAwayFromZero = require('../../math/RoundAwayFromZero');\n\n/**\n * Create an array of numbers (positive and/or negative) progressing from `start`\n * up to but not including `end` by advancing by `step`.\n *\n * If `start` is less than `end` a zero-length range is created unless a negative `step` is specified.\n *\n * Certain values for `start` and `end` (eg. NaN/undefined/null) are currently coerced to 0;\n * for forward compatibility make sure to pass in actual numbers.\n * \n * @example\n * NumberArrayStep(4);\n * // => [0, 1, 2, 3]\n *\n * NumberArrayStep(1, 5);\n * // => [1, 2, 3, 4]\n *\n * NumberArrayStep(0, 20, 5);\n * // => [0, 5, 10, 15]\n *\n * NumberArrayStep(0, -4, -1);\n * // => [0, -1, -2, -3]\n *\n * NumberArrayStep(1, 4, 0);\n * // => [1, 1, 1]\n *\n * NumberArrayStep(0);\n * // => []\n *\n * @function Phaser.Utils.Array.NumberArrayStep\n * @since 3.0.0\n *\n * @param {number} [start=0] - The start of the range.\n * @param {number} [end=null] - The end of the range.\n * @param {number} [step=1] - The value to increment or decrement by.\n *\n * @return {number[]} The array of number values.\n */\nvar NumberArrayStep = function (start, end, step)\n{\n if (start === undefined) { start = 0; }\n if (end === undefined) { end = null; }\n if (step === undefined) { step = 1; }\n\n if (end === null)\n {\n end = start;\n start = 0;\n }\n\n var result = [];\n\n var total = Math.max(RoundAwayFromZero((end - start) / (step || 1)), 0);\n\n for (var i = 0; i < total; i++)\n {\n result.push(start);\n start += step;\n }\n\n return result;\n};\n\nmodule.exports = NumberArrayStep;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @ignore\n */\nfunction swap (arr, i, j)\n{\n var tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n\n/**\n * @ignore\n */\nfunction defaultCompare (a, b)\n{\n return a < b ? -1 : a > b ? 1 : 0;\n}\n\n/**\n * A [Floyd-Rivest](https://en.wikipedia.org/wiki/Floyd%E2%80%93Rivest_algorithm) quick selection algorithm.\n *\n * Rearranges the array items so that all items in the [left, k] range are smaller than all items in [k, right];\n * The k-th element will have the (k - left + 1)th smallest value in [left, right].\n *\n * The array is modified in-place.\n *\n * Based on code by [Vladimir Agafonkin](https://www.npmjs.com/~mourner)\n *\n * @function Phaser.Utils.Array.QuickSelect\n * @since 3.0.0\n *\n * @param {array} arr - The array to sort.\n * @param {integer} k - The k-th element index.\n * @param {integer} [left=0] - The index of the left part of the range.\n * @param {integer} [right] - The index of the right part of the range.\n * @param {function} [compare] - An optional comparison function. Is passed two elements and should return 0, 1 or -1.\n */\nvar QuickSelect = function (arr, k, left, right, compare)\n{\n if (left === undefined) { left = 0; }\n if (right === undefined) { right = arr.length - 1; }\n if (compare === undefined) { compare = defaultCompare; }\n\n while (right > left)\n {\n if (right - left > 600)\n {\n var n = right - left + 1;\n var m = k - left + 1;\n var z = Math.log(n);\n var s = 0.5 * Math.exp(2 * z / 3);\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n\n QuickSelect(arr, k, newLeft, newRight, compare);\n }\n\n var t = arr[k];\n var i = left;\n var j = right;\n\n swap(arr, left, k);\n\n if (compare(arr[right], t) > 0)\n {\n swap(arr, left, right);\n }\n\n while (i < j)\n {\n swap(arr, i, j);\n\n i++;\n j--;\n\n while (compare(arr[i], t) < 0)\n {\n i++;\n }\n\n while (compare(arr[j], t) > 0)\n {\n j--;\n }\n }\n\n if (compare(arr[left], t) === 0)\n {\n swap(arr, left, j);\n }\n else\n {\n j++;\n swap(arr, j, right);\n }\n\n if (j <= k)\n {\n left = j + 1;\n }\n\n if (k <= j)\n {\n right = j - 1;\n }\n }\n};\n\nmodule.exports = QuickSelect;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar GetValue = require('../object/GetValue');\nvar Shuffle = require('./Shuffle');\n\nvar BuildChunk = function (a, b, qty)\n{\n var out = [];\n\n for (var aIndex = 0; aIndex < a.length; aIndex++)\n {\n for (var bIndex = 0; bIndex < b.length; bIndex++)\n {\n for (var i = 0; i < qty; i++)\n {\n out.push({ a: a[aIndex], b: b[bIndex] });\n }\n }\n }\n\n return out;\n};\n\n/**\n * Creates an array populated with a range of values, based on the given arguments and configuration object.\n *\n * Range ([a,b,c], [1,2,3]) =\n * a1, a2, a3, b1, b2, b3, c1, c2, c3\n * \n * Range ([a,b], [1,2,3], qty = 3) =\n * a1, a1, a1, a2, a2, a2, a3, a3, a3, b1, b1, b1, b2, b2, b2, b3, b3, b3\n * \n * Range ([a,b,c], [1,2,3], repeat x1) =\n * a1, a2, a3, b1, b2, b3, c1, c2, c3, a1, a2, a3, b1, b2, b3, c1, c2, c3\n * \n * Range ([a,b], [1,2], repeat -1 = endless, max = 14) =\n * Maybe if max is set then repeat goes to -1 automatically?\n * a1, a2, b1, b2, a1, a2, b1, b2, a1, a2, b1, b2, a1, a2 (capped at 14 elements)\n * \n * Range ([a], [1,2,3,4,5], random = true) =\n * a4, a1, a5, a2, a3\n * \n * Range ([a, b], [1,2,3], random = true) =\n * b3, a2, a1, b1, a3, b2\n * \n * Range ([a, b, c], [1,2,3], randomB = true) =\n * a3, a1, a2, b2, b3, b1, c1, c3, c2\n * \n * Range ([a], [1,2,3,4,5], yoyo = true) =\n * a1, a2, a3, a4, a5, a5, a4, a3, a2, a1\n * \n * Range ([a, b], [1,2,3], yoyo = true) =\n * a1, a2, a3, b1, b2, b3, b3, b2, b1, a3, a2, a1\n *\n * @function Phaser.Utils.Array.Range\n * @since 3.0.0\n *\n * @param {array} a - The first array of range elements.\n * @param {array} b - The second array of range elements.\n * @param {object} [options] - A range configuration object. Can contain: repeat, random, randomB, yoyo, max, qty.\n *\n * @return {array} An array of arranged elements.\n */\nvar Range = function (a, b, options)\n{\n var max = GetValue(options, 'max', 0);\n var qty = GetValue(options, 'qty', 1);\n var random = GetValue(options, 'random', false);\n var randomB = GetValue(options, 'randomB', false);\n var repeat = GetValue(options, 'repeat', 0);\n var yoyo = GetValue(options, 'yoyo', false);\n\n var out = [];\n\n if (randomB)\n {\n Shuffle(b);\n }\n\n // Endless repeat, so limit by max\n if (repeat === -1)\n {\n if (max === 0)\n {\n repeat = 0;\n }\n else\n {\n // Work out how many repeats we need\n var total = (a.length * b.length) * qty;\n\n if (yoyo)\n {\n total *= 2;\n }\n\n repeat = Math.ceil(max / total);\n }\n }\n\n for (var i = 0; i <= repeat; i++)\n {\n var chunk = BuildChunk(a, b, qty);\n\n if (random)\n {\n Shuffle(chunk);\n }\n\n out = out.concat(chunk);\n\n if (yoyo)\n {\n chunk.reverse();\n\n out = out.concat(chunk);\n }\n }\n\n if (max)\n {\n out.splice(max);\n }\n\n return out;\n};\n\nmodule.exports = Range;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SpliceOne = require('./SpliceOne');\n\n/**\n * Removes the given item, or array of items, from the array.\n * \n * The array is modified in-place.\n * \n * You can optionally specify a callback to be invoked for each item successfully removed from the array.\n *\n * @function Phaser.Utils.Array.Remove\n * @since 3.4.0\n *\n * @param {array} array - The array to be modified.\n * @param {*|Array.<*>} item - The item, or array of items, to be removed from the array.\n * @param {function} [callback] - A callback to be invoked for each item successfully removed from the array.\n * @param {object} [context] - The context in which the callback is invoked.\n *\n * @return {*|Array.<*>} The item, or array of items, that were successfully removed from the array.\n */\nvar Remove = function (array, item, callback, context)\n{\n if (context === undefined) { context = array; }\n\n var index;\n\n // Fast path to avoid array mutation and iteration\n if (!Array.isArray(item))\n {\n index = array.indexOf(item);\n\n if (index !== -1)\n {\n SpliceOne(array, index);\n\n if (callback)\n {\n callback.call(context, item);\n }\n\n return item;\n }\n else\n {\n return null;\n }\n }\n\n // If we got this far, we have an array of items to remove\n\n var itemLength = item.length - 1;\n\n while (itemLength >= 0)\n {\n var entry = item[itemLength];\n\n index = array.indexOf(entry);\n\n if (index !== -1)\n {\n SpliceOne(array, index);\n\n if (callback)\n {\n callback.call(context, entry);\n }\n }\n else\n {\n // Item wasn't found in the array, so remove it from our return results\n item.pop();\n }\n\n itemLength--;\n }\n\n return item;\n};\n\nmodule.exports = Remove;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SpliceOne = require('./SpliceOne');\n\n/**\n * Removes the item from the given position in the array.\n * \n * The array is modified in-place.\n * \n * You can optionally specify a callback to be invoked for the item if it is successfully removed from the array.\n *\n * @function Phaser.Utils.Array.RemoveAt\n * @since 3.4.0\n *\n * @param {array} array - The array to be modified.\n * @param {integer} index - The array index to remove the item from. The index must be in bounds or it will throw an error.\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\n * @param {object} [context] - The context in which the callback is invoked.\n *\n * @return {*} The item that was removed.\n */\nvar RemoveAt = function (array, index, callback, context)\n{\n if (context === undefined) { context = array; }\n\n if (index < 0 || index > array.length - 1)\n {\n throw new Error('Index out of bounds');\n }\n\n var item = SpliceOne(array, index);\n\n if (callback)\n {\n callback.call(context, item);\n }\n\n return item;\n};\n\nmodule.exports = RemoveAt;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SafeRange = require('./SafeRange');\n\n/**\n * Removes the item within the given range in the array.\n * \n * The array is modified in-place.\n * \n * You can optionally specify a callback to be invoked for the item/s successfully removed from the array.\n *\n * @function Phaser.Utils.Array.RemoveBetween\n * @since 3.4.0\n *\n * @param {array} array - The array to be modified.\n * @param {integer} startIndex - The start index to remove from.\n * @param {integer} endIndex - The end index to remove to.\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\n * @param {object} [context] - The context in which the callback is invoked.\n *\n * @return {Array.<*>} An array of items that were removed.\n */\nvar RemoveBetween = function (array, startIndex, endIndex, callback, context)\n{\n if (startIndex === undefined) { startIndex = 0; }\n if (endIndex === undefined) { endIndex = array.length; }\n if (context === undefined) { context = array; }\n\n if (SafeRange(array, startIndex, endIndex))\n {\n var size = endIndex - startIndex;\n\n var removed = array.splice(startIndex, size);\n\n if (callback)\n {\n for (var i = 0; i < removed.length; i++)\n {\n var entry = removed[i];\n\n callback.call(context, entry);\n }\n }\n\n return removed;\n }\n else\n {\n return [];\n }\n};\n\nmodule.exports = RemoveBetween;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SpliceOne = require('./SpliceOne');\n\n/**\n * Removes a random object from the given array and returns it.\n * Will return null if there are no array items that fall within the specified range or if there is no item for the randomly chosen index.\n *\n * @function Phaser.Utils.Array.RemoveRandomElement\n * @since 3.0.0\n *\n * @param {array} array - The array to removed a random element from.\n * @param {integer} [start=0] - The array index to start the search from.\n * @param {integer} [length=array.length] - Optional restriction on the number of elements to randomly select from.\n *\n * @return {object} The random element that was removed, or `null` if there were no array elements that fell within the given range.\n */\nvar RemoveRandomElement = function (array, start, length)\n{\n if (start === undefined) { start = 0; }\n if (length === undefined) { length = array.length; }\n\n var randomIndex = start + Math.floor(Math.random() * length);\n\n return SpliceOne(array, randomIndex);\n};\n\nmodule.exports = RemoveRandomElement;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Replaces an element of the array with the new element.\n * The new element cannot already be a member of the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.Replace\n * @since 3.4.0\n *\n * @param {array} array - The array to search within.\n * @param {*} oldChild - The element in the array that will be replaced.\n * @param {*} newChild - The element to be inserted into the array at the position of `oldChild`.\n *\n * @return {boolean} Returns true if the oldChild was successfully replaced, otherwise returns false.\n */\nvar Replace = function (array, oldChild, newChild)\n{\n var index1 = array.indexOf(oldChild);\n var index2 = array.indexOf(newChild);\n\n if (index1 !== -1 && index2 === -1)\n {\n array[index1] = newChild;\n\n return true;\n }\n else\n {\n return false;\n }\n};\n\nmodule.exports = Replace;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the element at the start of the array to the end, shifting all items in the process.\n * The \"rotation\" happens to the left.\n *\n * @function Phaser.Utils.Array.RotateLeft\n * @since 3.0.0\n *\n * @param {array} array - The array to shift to the left. This array is modified in place.\n * @param {integer} [total=1] - The number of times to shift the array.\n *\n * @return {*} The most recently shifted element.\n */\nvar RotateLeft = function (array, total)\n{\n if (total === undefined) { total = 1; }\n\n var element = null;\n\n for (var i = 0; i < total; i++)\n {\n element = array.shift();\n array.push(element);\n }\n\n return element;\n};\n\nmodule.exports = RotateLeft;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the element at the end of the array to the start, shifting all items in the process.\n * The \"rotation\" happens to the right.\n *\n * @function Phaser.Utils.Array.RotateRight\n * @since 3.0.0\n *\n * @param {array} array - The array to shift to the right. This array is modified in place.\n * @param {integer} [total=1] - The number of times to shift the array.\n *\n * @return {*} The most recently shifted element.\n */\nvar RotateRight = function (array, total)\n{\n if (total === undefined) { total = 1; }\n\n var element = null;\n\n for (var i = 0; i < total; i++)\n {\n element = array.pop();\n array.unshift(element);\n }\n\n return element;\n};\n\nmodule.exports = RotateRight;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Tests if the start and end indexes are a safe range for the given array.\n * \n * @function Phaser.Utils.Array.SafeRange\n * @since 3.4.0\n *\n * @param {array} array - The array to check.\n * @param {integer} startIndex - The start index.\n * @param {integer} endIndex - The end index.\n * @param {boolean} [throwError=true] - Throw an error if the range is out of bounds.\n *\n * @return {boolean} True if the range is safe, otherwise false.\n */\nvar SafeRange = function (array, startIndex, endIndex, throwError)\n{\n var len = array.length;\n\n if (startIndex < 0 ||\n startIndex > len ||\n startIndex >= endIndex ||\n endIndex > len ||\n startIndex + endIndex > len)\n {\n if (throwError)\n {\n throw new Error('Range Error: Values outside acceptable range');\n }\n\n return false;\n }\n else\n {\n return true;\n }\n};\n\nmodule.exports = SafeRange;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Moves the given element to the bottom of the array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.SendToBack\n * @since 3.4.0\n *\n * @param {array} array - The array.\n * @param {*} item - The element to move.\n *\n * @return {*} The element that was moved.\n */\nvar SendToBack = function (array, item)\n{\n var currentIndex = array.indexOf(item);\n\n if (currentIndex !== -1 && currentIndex > 0)\n {\n array.splice(currentIndex, 1);\n array.unshift(item);\n }\n\n return item;\n};\n\nmodule.exports = SendToBack;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar SafeRange = require('./SafeRange');\n\n/**\n * Scans the array for elements with the given property. If found, the property is set to the `value`.\n *\n * For example: `SetAll('visible', true)` would set all elements that have a `visible` property to `false`.\n *\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\n * and you set `startIndex` to 0 and `endIndex` to 50, it would update only the first 50 elements.\n *\n * @function Phaser.Utils.Array.SetAll\n * @since 3.4.0\n *\n * @param {array} array - The array to search.\n * @param {string} property - The property to test for on each array element.\n * @param {*} value - The value to set the property to.\n * @param {integer} [startIndex] - An optional start index to search from.\n * @param {integer} [endIndex] - An optional end index to search to.\n *\n * @return {array} The input array.\n */\nvar SetAll = function (array, property, value, startIndex, endIndex)\n{\n if (startIndex === undefined) { startIndex = 0; }\n if (endIndex === undefined) { endIndex = array.length; }\n\n if (SafeRange(array, startIndex, endIndex))\n {\n for (var i = startIndex; i < endIndex; i++)\n {\n var entry = array[i];\n\n if (entry.hasOwnProperty(property))\n {\n entry[property] = value;\n }\n }\n }\n\n return array;\n};\n\nmodule.exports = SetAll;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Shuffles the contents of the given array using the Fisher-Yates implementation.\n *\n * The original array is modified directly and returned.\n *\n * @function Phaser.Utils.Array.Shuffle\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[]} - [array,$return]\n *\n * @param {T[]} array - The array to shuffle. This array is modified in place.\n *\n * @return {T[]} The shuffled array.\n */\nvar Shuffle = function (array)\n{\n for (var i = array.length - 1; i > 0; i--)\n {\n var j = Math.floor(Math.random() * (i + 1));\n var temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n }\n\n return array;\n};\n\nmodule.exports = Shuffle;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Removes a single item from an array and returns it without creating gc, like the native splice does.\n * Based on code by Mike Reinstein.\n *\n * @function Phaser.Utils.Array.SpliceOne\n * @since 3.0.0\n *\n * @param {array} array - The array to splice from.\n * @param {integer} index - The index of the item which should be spliced.\n *\n * @return {*} The item which was spliced (removed).\n */\nvar SpliceOne = function (array, index)\n{\n if (index >= array.length)\n {\n return;\n }\n\n var len = array.length - 1;\n\n var item = array[index];\n\n for (var i = index; i < len; i++)\n {\n array[i] = array[i + 1];\n }\n\n array.length = len;\n\n return item;\n};\n\nmodule.exports = SpliceOne;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n//! stable.js 0.1.6, https://github.com/Two-Screen/stable\n//! © 2017 Angry Bytes and contributors. MIT licensed.\n\n/**\n * @namespace Phaser.Utils.Array.StableSortFunctions\n */\n\n(function() {\n\n /**\n * A stable array sort, because `Array#sort()` is not guaranteed stable.\n * This is an implementation of merge sort, without recursion.\n *\n * @function Phaser.Utils.Array.StableSort\n * @since 3.0.0\n *\n * @param {array} arr - The input array to be sorted.\n * @param {function} comp - The comparison handler.\n *\n * @return {array} The sorted result.\n */\nvar stable = function(arr, comp) {\n return exec(arr.slice(), comp);\n};\n\n /**\n * Sort the input array and simply copy it back if the result isn't in the original array, which happens on an odd number of passes.\n *\n * @function Phaser.Utils.Array.StableSortFunctions.inplace\n * @memberof Phaser.Utils.Array.StableSortFunctions\n * @since 3.0.0\n *\n * @param {array} arr - The input array.\n * @param {function} comp - The comparison handler.\n *\n * @return {array} The sorted array.\n */\nstable.inplace = function(arr, comp) {\n var result = exec(arr, comp);\n\n // This simply copies back if the result isn't in the original array,\n // which happens on an odd number of passes.\n if (result !== arr) {\n pass(result, null, arr.length, arr);\n }\n\n return arr;\n};\n\n// Execute the sort using the input array and a second buffer as work space.\n// Returns one of those two, containing the final result.\nfunction exec(arr, comp) {\n if (typeof(comp) !== 'function') {\n comp = function(a, b) {\n return String(a).localeCompare(b);\n };\n }\n\n // Short-circuit when there's nothing to sort.\n var len = arr.length;\n if (len <= 1) {\n return arr;\n }\n\n // Rather than dividing input, simply iterate chunks of 1, 2, 4, 8, etc.\n // Chunks are the size of the left or right hand in merge sort.\n // Stop when the left-hand covers all of the array.\n var buffer = new Array(len);\n for (var chk = 1; chk < len; chk *= 2) {\n pass(arr, comp, chk, buffer);\n\n var tmp = arr;\n arr = buffer;\n buffer = tmp;\n }\n\n return arr;\n}\n\n// Run a single pass with the given chunk size.\nvar pass = function(arr, comp, chk, result) {\n var len = arr.length;\n var i = 0;\n // Step size / double chunk size.\n var dbl = chk * 2;\n // Bounds of the left and right chunks.\n var l, r, e;\n // Iterators over the left and right chunk.\n var li, ri;\n\n // Iterate over pairs of chunks.\n for (l = 0; l < len; l += dbl) {\n r = l + chk;\n e = r + chk;\n if (r > len) r = len;\n if (e > len) e = len;\n\n // Iterate both chunks in parallel.\n li = l;\n ri = r;\n while (true) {\n // Compare the chunks.\n if (li < r && ri < e) {\n // This works for a regular `sort()` compatible comparator,\n // but also for a simple comparator like: `a > b`\n if (comp(arr[li], arr[ri]) <= 0) {\n result[i++] = arr[li++];\n }\n else {\n result[i++] = arr[ri++];\n }\n }\n // Nothing to compare, just flush what's left.\n else if (li < r) {\n result[i++] = arr[li++];\n }\n else if (ri < e) {\n result[i++] = arr[ri++];\n }\n // Both iterators are at the chunk ends.\n else {\n break;\n }\n }\n }\n};\n\n// Export using CommonJS or to the window.\nif (typeof(module) !== 'undefined') {\n module.exports = stable;\n}\nelse {\n window.stable = stable;\n}\n\n})();","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Swaps the position of two elements in the given array.\n * The elements must exist in the same array.\n * The array is modified in-place.\n *\n * @function Phaser.Utils.Array.Swap\n * @since 3.4.0\n *\n * @param {array} array - The input array.\n * @param {*} item1 - The first element to swap.\n * @param {*} item2 - The second element to swap.\n *\n * @return {array} The input array.\n */\nvar Swap = function (array, item1, item2)\n{\n if (item1 === item2)\n {\n return;\n }\n\n var index1 = array.indexOf(item1);\n var index2 = array.indexOf(item2);\n\n if (index1 < 0 || index2 < 0)\n {\n throw new Error('Supplied items must be elements of the same array');\n }\n\n array[index1] = item2;\n array[index2] = item1;\n\n return array;\n};\n\nmodule.exports = Swap;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Utils.Array\n */\n\nmodule.exports = {\n\n Matrix: require('./matrix'),\n\n Add: require('./Add'),\n AddAt: require('./AddAt'),\n BringToTop: require('./BringToTop'),\n CountAllMatching: require('./CountAllMatching'),\n Each: require('./Each'),\n EachInRange: require('./EachInRange'),\n FindClosestInSorted: require('./FindClosestInSorted'),\n GetAll: require('./GetAll'),\n GetFirst: require('./GetFirst'),\n GetRandom: require('./GetRandom'),\n MoveDown: require('./MoveDown'),\n MoveTo: require('./MoveTo'),\n MoveUp: require('./MoveUp'),\n NumberArray: require('./NumberArray'),\n NumberArrayStep: require('./NumberArrayStep'),\n QuickSelect: require('./QuickSelect'),\n Range: require('./Range'),\n Remove: require('./Remove'),\n RemoveAt: require('./RemoveAt'),\n RemoveBetween: require('./RemoveBetween'),\n RemoveRandomElement: require('./RemoveRandomElement'),\n Replace: require('./Replace'),\n RotateLeft: require('./RotateLeft'),\n RotateRight: require('./RotateRight'),\n SafeRange: require('./SafeRange'),\n SendToBack: require('./SendToBack'),\n SetAll: require('./SetAll'),\n Shuffle: require('./Shuffle'),\n SpliceOne: require('./SpliceOne'),\n StableSort: require('./StableSort'),\n Swap: require('./Swap')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Checks if an array can be used as a matrix.\n *\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows) have the same length. There must be at least two rows:\n *\n * ```\n * [\n * [ 1, 1, 1, 1, 1, 1 ],\n * [ 2, 0, 0, 0, 0, 4 ],\n * [ 2, 0, 1, 2, 0, 4 ],\n * [ 2, 0, 3, 4, 0, 4 ],\n * [ 2, 0, 0, 0, 0, 4 ],\n * [ 3, 3, 3, 3, 3, 3 ]\n * ]\n * ```\n *\n * @function Phaser.Utils.Array.Matrix.CheckMatrix\n * @since 3.0.0\n * \n * @generic T\n * @genericUse {T[][]} - [matrix]\n *\n * @param {T[][]} [matrix] - The array to check.\n *\n * @return {boolean} `true` if the given `matrix` array is a valid matrix.\n */\nvar CheckMatrix = function (matrix)\n{\n if (!Array.isArray(matrix) || matrix.length < 2 || !Array.isArray(matrix[0]))\n {\n return false;\n }\n\n // How long is the first row?\n var size = matrix[0].length;\n\n // Validate the rest of the rows are the same length\n for (var i = 1; i < matrix.length; i++)\n {\n if (matrix[i].length !== size)\n {\n return false;\n }\n }\n\n return true;\n};\n\nmodule.exports = CheckMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Pad = require('../../string/Pad');\nvar CheckMatrix = require('./CheckMatrix');\n\n/**\n * Generates a string (which you can pass to console.log) from the given Array Matrix.\n *\n * @function Phaser.Utils.Array.Matrix.MatrixToString\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix]\n *\n * @param {T[][]} [matrix] - A 2-dimensional array.\n *\n * @return {string} A string representing the matrix.\n */\nvar MatrixToString = function (matrix)\n{\n var str = '';\n\n if (!CheckMatrix(matrix))\n {\n return str;\n }\n\n for (var r = 0; r < matrix.length; r++)\n {\n for (var c = 0; c < matrix[r].length; c++)\n {\n var cell = matrix[r][c].toString();\n\n if (cell !== 'undefined')\n {\n str += Pad(cell, 2);\n }\n else\n {\n str += '?';\n }\n\n if (c < matrix[r].length - 1)\n {\n str += ' |';\n }\n }\n\n if (r < matrix.length - 1)\n {\n str += '\\n';\n\n for (var i = 0; i < matrix[r].length; i++)\n {\n str += '---';\n\n if (i < matrix[r].length - 1)\n {\n str += '+';\n }\n }\n\n str += '\\n';\n }\n\n }\n\n return str;\n};\n\nmodule.exports = MatrixToString;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Reverses the columns in the given Array Matrix.\n *\n * @function Phaser.Utils.Array.Matrix.ReverseColumns\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix,$return]\n *\n * @param {T[][]} [matrix] - The array matrix to reverse the columns for.\n *\n * @return {T[][]} The column reversed matrix.\n */\nvar ReverseColumns = function (matrix)\n{\n return matrix.reverse();\n};\n\nmodule.exports = ReverseColumns;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Reverses the rows in the given Array Matrix.\n *\n * @function Phaser.Utils.Array.Matrix.ReverseRows\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix,$return]\n *\n * @param {T[][]} [matrix] - The array matrix to reverse the rows for.\n *\n * @return {T[][]} The column reversed matrix.\n */\nvar ReverseRows = function (matrix)\n{\n for (var i = 0; i < matrix.length; i++)\n {\n matrix[i].reverse();\n }\n\n return matrix;\n};\n\nmodule.exports = ReverseRows;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar RotateMatrix = require('./RotateMatrix');\n\n/**\n * Rotates the array matrix 180 degrees.\n *\n * @function Phaser.Utils.Array.Matrix.Rotate180\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix,$return]\n *\n * @param {T[][]} [matrix] - The array to rotate.\n *\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\n */\nvar Rotate180 = function (matrix)\n{\n return RotateMatrix(matrix, 180);\n};\n\nmodule.exports = Rotate180;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar RotateMatrix = require('./RotateMatrix');\n\n/**\n * Rotates the array matrix to the left (or 90 degrees)\n *\n * @function Phaser.Utils.Array.Matrix.RotateLeft\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix,$return]\n *\n * @param {T[][]} [matrix] - The array to rotate.\n *\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\n */\nvar RotateLeft = function (matrix)\n{\n return RotateMatrix(matrix, 90);\n};\n\nmodule.exports = RotateLeft;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CheckMatrix = require('./CheckMatrix');\nvar TransposeMatrix = require('./TransposeMatrix');\n\n/**\n * Rotates the array matrix based on the given rotation value.\n *\n * The value can be given in degrees: 90, -90, 270, -270 or 180,\n * or a string command: `rotateLeft`, `rotateRight` or `rotate180`.\n *\n * Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}.\n *\n * @function Phaser.Utils.Array.Matrix.RotateMatrix\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix,$return]\n *\n * @param {T[][]} [matrix] - The array to rotate.\n * @param {(number|string)} [direction=90] - The amount to rotate the matrix by.\n *\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\n */\nvar RotateMatrix = function (matrix, direction)\n{\n if (direction === undefined) { direction = 90; }\n\n if (!CheckMatrix(matrix))\n {\n return null;\n }\n\n if (typeof direction !== 'string')\n {\n direction = ((direction % 360) + 360) % 360;\n }\n\n if (direction === 90 || direction === -270 || direction === 'rotateLeft')\n {\n matrix = TransposeMatrix(matrix);\n matrix.reverse();\n }\n else if (direction === -90 || direction === 270 || direction === 'rotateRight')\n {\n matrix.reverse();\n matrix = TransposeMatrix(matrix);\n }\n else if (Math.abs(direction) === 180 || direction === 'rotate180')\n {\n for (var i = 0; i < matrix.length; i++)\n {\n matrix[i].reverse();\n }\n\n matrix.reverse();\n }\n\n return matrix;\n};\n\nmodule.exports = RotateMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar RotateMatrix = require('./RotateMatrix');\n\n/**\n * Rotates the array matrix to the left (or -90 degrees)\n *\n * @function Phaser.Utils.Array.Matrix.RotateRight\n * @since 3.0.0\n *\n * @generic T\n * @genericUse {T[][]} - [matrix,$return]\n *\n * @param {T[][]} [matrix] - The array to rotate.\n *\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\n */\nvar RotateRight = function (matrix)\n{\n return RotateMatrix(matrix, -90);\n};\n\nmodule.exports = RotateRight;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Transposes the elements of the given matrix (array of arrays).\n *\n * The transpose of a matrix is a new matrix whose rows are the columns of the original.\n *\n * @function Phaser.Utils.Array.Matrix.TransposeMatrix\n * @since 3.0.0\n * \n * @generic T\n * @genericUse {T[][]} - [array,$return]\n * \n * @param {T[][]} [array] - The array matrix to transpose.\n *\n * @return {T[][]} A new array matrix which is a transposed version of the given array.\n */\nvar TransposeMatrix = function (array)\n{\n var sourceRowCount = array.length;\n var sourceColCount = array[0].length;\n\n var result = new Array(sourceColCount);\n\n for (var i = 0; i < sourceColCount; i++)\n {\n result[i] = new Array(sourceRowCount);\n\n for (var j = sourceRowCount - 1; j > -1; j--)\n {\n result[i][j] = array[j][i];\n }\n }\n\n return result;\n};\n\nmodule.exports = TransposeMatrix;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Utils.Array.Matrix\n */\n\nmodule.exports = {\n\n CheckMatrix: require('./CheckMatrix'),\n MatrixToString: require('./MatrixToString'),\n ReverseColumns: require('./ReverseColumns'),\n ReverseRows: require('./ReverseRows'),\n Rotate180: require('./Rotate180'),\n RotateLeft: require('./RotateLeft'),\n RotateMatrix: require('./RotateMatrix'),\n RotateRight: require('./RotateRight'),\n TransposeMatrix: require('./TransposeMatrix')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar IsPlainObject = require('./IsPlainObject');\n\n// @param {boolean} deep - Perform a deep copy?\n// @param {object} target - The target object to copy to.\n// @return {object} The extended object.\n\n/**\n * This is a slightly modified version of http://api.jquery.com/jQuery.extend/\n *\n * @function Phaser.Utils.Objects.Extend\n * @since 3.0.0\n *\n * @param {...*} [args] - The objects that will be mixed.\n *\n * @return {object} The extended object.\n */\nvar Extend = function ()\n{\n var options, name, src, copy, copyIsArray, clone,\n target = arguments[0] || {},\n i = 1,\n length = arguments.length,\n deep = false;\n\n // Handle a deep copy situation\n if (typeof target === 'boolean')\n {\n deep = target;\n target = arguments[1] || {};\n\n // skip the boolean and the target\n i = 2;\n }\n\n // extend Phaser if only one argument is passed\n if (length === i)\n {\n target = this;\n --i;\n }\n\n for (; i < length; i++)\n {\n // Only deal with non-null/undefined values\n if ((options = arguments[i]) != null)\n {\n // Extend the base object\n for (name in options)\n {\n src = target[name];\n copy = options[name];\n\n // Prevent never-ending loop\n if (target === copy)\n {\n continue;\n }\n\n // Recurse if we're merging plain objects or arrays\n if (deep && copy && (IsPlainObject(copy) || (copyIsArray = Array.isArray(copy))))\n {\n if (copyIsArray)\n {\n copyIsArray = false;\n clone = src && Array.isArray(src) ? src : [];\n }\n else\n {\n clone = src && IsPlainObject(src) ? src : {};\n }\n\n // Never move original objects, clone them\n target[name] = Extend(deep, clone, copy);\n\n // Don't bring in undefined values\n }\n else if (copy !== undefined)\n {\n target[name] = copy;\n }\n }\n }\n }\n\n // Return the modified object\n return target;\n};\n\nmodule.exports = Extend;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar MATH = require('../../math');\nvar GetValue = require('./GetValue');\n\n/**\n * Retrieves a value from an object. Allows for more advanced selection options, including:\n *\n * Allowed types:\n * \n * Implicit\n * {\n * x: 4\n * }\n *\n * From function\n * {\n * x: function ()\n * }\n *\n * Randomly pick one element from the array\n * {\n * x: [a, b, c, d, e, f]\n * }\n *\n * Random integer between min and max:\n * {\n * x: { randInt: [min, max] }\n * }\n *\n * Random float between min and max:\n * {\n * x: { randFloat: [min, max] }\n * }\n * \n *\n * @function Phaser.Utils.Objects.GetAdvancedValue\n * @since 3.0.0\n *\n * @param {object} source - The object to retrieve the value from.\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\n *\n * @return {*} The value of the requested key.\n */\nvar GetAdvancedValue = function (source, key, defaultValue)\n{\n var value = GetValue(source, key, null);\n\n if (value === null)\n {\n return defaultValue;\n }\n else if (Array.isArray(value))\n {\n return MATH.RND.pick(value);\n }\n else if (typeof value === 'object')\n {\n if (value.hasOwnProperty('randInt'))\n {\n return MATH.RND.integerInRange(value.randInt[0], value.randInt[1]);\n }\n else if (value.hasOwnProperty('randFloat'))\n {\n return MATH.RND.realInRange(value.randFloat[0], value.randFloat[1]);\n }\n }\n else if (typeof value === 'function')\n {\n return value(key);\n }\n\n return value;\n};\n\nmodule.exports = GetAdvancedValue;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Finds the key within the top level of the {@link source} object, or returns {@link defaultValue}\n *\n * @function Phaser.Utils.Objects.GetFastValue\n * @since 3.0.0\n *\n * @param {object} source - The object to search\n * @param {string} key - The key for the property on source. Must exist at the top level of the source object (no periods)\n * @param {*} [defaultValue] - The default value to use if the key does not exist.\n *\n * @return {*} The value if found; otherwise, defaultValue (null if none provided)\n */\nvar GetFastValue = function (source, key, defaultValue)\n{\n var t = typeof(source);\n\n if (!source || t === 'number' || t === 'string')\n {\n return defaultValue;\n }\n else if (source.hasOwnProperty(key) && source[key] !== undefined)\n {\n return source[key];\n }\n else\n {\n return defaultValue;\n }\n};\n\nmodule.exports = GetFastValue;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n// Source object\n// The key as a string, or an array of keys, i.e. 'banner', or 'banner.hideBanner'\n// The default value to use if the key doesn't exist\n\n/**\n * Retrieves a value from an object.\n *\n * @function Phaser.Utils.Objects.GetValue\n * @since 3.0.0\n *\n * @param {object} source - The object to retrieve the value from.\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\n *\n * @return {*} The value of the requested key.\n */\nvar GetValue = function (source, key, defaultValue)\n{\n if (!source || typeof source === 'number')\n {\n return defaultValue;\n }\n else if (source.hasOwnProperty(key))\n {\n return source[key];\n }\n else if (key.indexOf('.') !== -1)\n {\n var keys = key.split('.');\n var parent = source;\n var value = defaultValue;\n\n // Use for loop here so we can break early\n for (var i = 0; i < keys.length; i++)\n {\n if (parent.hasOwnProperty(keys[i]))\n {\n // Yes it has a key property, let's carry on down\n value = parent[keys[i]];\n\n parent = parent[keys[i]];\n }\n else\n {\n // Can't go any further, so reset to default\n value = defaultValue;\n break;\n }\n }\n\n return value;\n }\n else\n {\n return defaultValue;\n }\n};\n\nmodule.exports = GetValue;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * This is a slightly modified version of jQuery.isPlainObject.\n * A plain object is an object whose internal class property is [object Object].\n *\n * @function Phaser.Utils.Objects.IsPlainObject\n * @since 3.0.0\n *\n * @param {object} obj - The object to inspect.\n *\n * @return {boolean} `true` if the object is plain, otherwise `false`.\n */\nvar IsPlainObject = function (obj)\n{\n // Not plain objects:\n // - Any object or value whose internal [[Class]] property is not \"[object Object]\"\n // - DOM nodes\n // - window\n if (typeof(obj) !== 'object' || obj.nodeType || obj === obj.window)\n {\n return false;\n }\n\n // Support: Firefox <20\n // The try/catch suppresses exceptions thrown when attempting to access\n // the \"constructor\" property of certain host objects, ie. |window.location|\n // https://bugzilla.mozilla.org/show_bug.cgi?id=814622\n try\n {\n if (obj.constructor && !({}).hasOwnProperty.call(obj.constructor.prototype, 'isPrototypeOf'))\n {\n return false;\n }\n }\n catch (e)\n {\n return false;\n }\n\n // If the function hasn't returned already, we're confident that\n // |obj| is a plain object, created by {} or constructed with new Object\n return true;\n};\n\nmodule.exports = IsPlainObject;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Takes the given string and pads it out, to the length required, using the character\n * specified. For example if you need a string to be 6 characters long, you can call:\n *\n * `pad('bob', 6, '-', 2)`\n *\n * This would return: `bob---` as it has padded it out to 6 characters, using the `-` on the right.\n *\n * You can also use it to pad numbers (they are always returned as strings):\n * \n * `pad(512, 6, '0', 1)`\n *\n * Would return: `000512` with the string padded to the left.\n *\n * If you don't specify a direction it'll pad to both sides:\n * \n * `pad('c64', 7, '*')`\n *\n * Would return: `**c64**`\n *\n * @function Phaser.Utils.String.Pad\n * @since 3.0.0\n *\n * @param {string|number|object} str - The target string. `toString()` will be called on the string, which means you can also pass in common data types like numbers.\n * @param {integer} [len=0] - The number of characters to be added.\n * @param {string} [pad=\" \"] - The string to pad it out with (defaults to a space).\n * @param {integer} [dir=3] - The direction dir = 1 (left), 2 (right), 3 (both).\n * \n * @return {string} The padded string.\n */\nvar Pad = function (str, len, pad, dir)\n{\n if (len === undefined) { len = 0; }\n if (pad === undefined) { pad = ' '; }\n if (dir === undefined) { dir = 3; }\n\n str = str.toString();\n\n var padlen = 0;\n\n if (len + 1 >= str.length)\n {\n switch (dir)\n {\n case 1:\n str = new Array(len + 1 - str.length).join(pad) + str;\n break;\n\n case 3:\n var right = Math.ceil((padlen = len - str.length) / 2);\n var left = padlen - right;\n str = new Array(left + 1).join(pad) + str + new Array(right + 1).join(pad);\n break;\n\n default:\n str = str + new Array(len + 1 - str.length).join(pad);\n break;\n }\n }\n\n return str;\n};\n\nmodule.exports = Pad;\n","/**\n * @author Richard Davey \n * @copyright 2018 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar Class = require('../../../src/utils/Class');\nvar GetFastValue = require('../../../src/utils/object/GetFastValue');\nvar ImageFile = require('../../../src/loader/filetypes/ImageFile.js');\nvar IsPlainObject = require('../../../src/utils/object/IsPlainObject');\nvar JSONFile = require('../../../src/loader/filetypes/JSONFile.js');\nvar MultiFile = require('../../../src/loader/MultiFile.js');\nvar TextFile = require('../../../src/loader/filetypes/TextFile.js');\n\n/**\n * @typedef {object} Phaser.Loader.FileTypes.SpineFileConfig\n *\n * @property {string} key - The key of the file. Must be unique within both the Loader and the Texture Manager.\n * @property {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\n * @property {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\n * @property {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\n * @property {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\n * @property {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\n */\n\n/**\n * @classdesc\n * A Spine File suitable for loading by the Loader.\n *\n * These are created when you use the Phaser.Loader.LoaderPlugin#spine method and are not typically created directly.\n *\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#spine.\n *\n * @class SpineFile\n * @extends Phaser.Loader.MultiFile\n * @memberof Phaser.Loader.FileTypes\n * @constructor\n *\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\n * @param {(string|Phaser.Loader.FileTypes.SpineFileConfig)} key - The key to use for this file, or a file configuration object.\n * @param {string|string[]} [jsonURL] - The absolute or relative URL to load the JSON file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\n * @param {boolean} [preMultipliedAlpha=false] - Do the textures contain pre-multiplied alpha or not?\n * @param {XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\n * @param {XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\n */\nvar SpineFile = new Class({\n\n Extends: MultiFile,\n\n initialize:\n\n function SpineFile (loader, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings)\n {\n var i;\n var json;\n var atlas;\n var files = [];\n var cache = loader.cacheManager.custom.spine;\n\n // atlas can be an array of atlas files, not just a single one\n\n if (IsPlainObject(key))\n {\n var config = key;\n\n key = GetFastValue(config, 'key');\n\n json = new JSONFile(loader, {\n key: key,\n url: GetFastValue(config, 'jsonURL'),\n extension: GetFastValue(config, 'jsonExtension', 'json'),\n xhrSettings: GetFastValue(config, 'jsonXhrSettings')\n });\n\n atlasURL = GetFastValue(config, 'atlasURL');\n preMultipliedAlpha = GetFastValue(config, 'preMultipliedAlpha');\n\n if (!Array.isArray(atlasURL))\n {\n atlasURL = [ atlasURL ];\n }\n\n for (i = 0; i < atlasURL.length; i++)\n {\n atlas = new TextFile(loader, {\n key: key + '_' + i,\n url: atlasURL[i],\n extension: GetFastValue(config, 'atlasExtension', 'atlas'),\n xhrSettings: GetFastValue(config, 'atlasXhrSettings')\n });\n\n atlas.cache = cache;\n\n files.push(atlas);\n }\n }\n else\n {\n json = new JSONFile(loader, key, jsonURL, jsonXhrSettings);\n\n if (!Array.isArray(atlasURL))\n {\n atlasURL = [ atlasURL ];\n }\n\n for (i = 0; i < atlasURL.length; i++)\n {\n atlas = new TextFile(loader, key + '_' + i, atlasURL[i], atlasXhrSettings);\n atlas.cache = cache;\n\n files.push(atlas);\n }\n }\n\n files.unshift(json);\n\n MultiFile.call(this, loader, 'spine', key, files);\n\n this.config.preMultipliedAlpha = preMultipliedAlpha;\n },\n\n /**\n * Called by each File when it finishes loading.\n *\n * @method Phaser.Loader.FileTypes.SpineFile#onFileComplete\n * @since 3.19.0\n *\n * @param {Phaser.Loader.File} file - The File that has completed processing.\n */\n onFileComplete: function (file)\n {\n var index = this.files.indexOf(file);\n\n if (index !== -1)\n {\n this.pending--;\n\n if (file.type === 'text')\n {\n // Inspect the data for the files to now load\n var content = file.data.split('\\n');\n\n // Extract the textures\n var textures = [];\n\n for (var t = 0; t < content.length; t++)\n {\n var line = content[t];\n\n if (line.trim() === '' && t < content.length - 1)\n {\n line = content[t + 1];\n\n textures.push(line);\n }\n }\n\n var config = this.config;\n var loader = this.loader;\n\n var currentBaseURL = loader.baseURL;\n var currentPath = loader.path;\n var currentPrefix = loader.prefix;\n\n var baseURL = GetFastValue(config, 'baseURL', this.baseURL);\n var path = GetFastValue(config, 'path', file.src.match(/^.*\\//))[0];\n var prefix = GetFastValue(config, 'prefix', this.prefix);\n var textureXhrSettings = GetFastValue(config, 'textureXhrSettings');\n\n loader.setBaseURL(baseURL);\n loader.setPath(path);\n loader.setPrefix(prefix);\n\n for (var i = 0; i < textures.length; i++)\n {\n var textureURL = textures[i];\n\n var key = this.prefix + textureURL;\n\n var image = new ImageFile(loader, key, textureURL, textureXhrSettings);\n\n this.addToMultiFile(image);\n\n loader.addFile(image);\n }\n\n // Reset the loader settings\n loader.setBaseURL(currentBaseURL);\n loader.setPath(currentPath);\n loader.setPrefix(currentPrefix);\n }\n }\n },\n\n /**\n * Adds this file to its target cache upon successful loading and processing.\n *\n * @method Phaser.Loader.FileTypes.SpineFile#addToCache\n * @since 3.19.0\n */\n addToCache: function ()\n {\n if (this.isReadyToProcess())\n {\n var fileJSON = this.files[0];\n\n fileJSON.addToCache();\n\n var atlasCache;\n var atlasKey = '';\n var combinedAtlasData = '';\n var preMultipliedAlpha = (this.config.preMultipliedAlpha) ? true : false;\n var textureManager = this.loader.textureManager;\n\n for (var i = 1; i < this.files.length; i++)\n {\n var file = this.files[i];\n\n if (file.type === 'text')\n {\n atlasKey = file.key.replace(/_[\\d]$/, '');\n\n atlasCache = file.cache;\n\n combinedAtlasData = combinedAtlasData.concat(file.data);\n }\n else\n {\n var src = file.key.trim();\n var pos = src.indexOf('_');\n var key = src.substr(pos + 1);\n\n if (!textureManager.exists(key))\n {\n textureManager.addImage(key, file.data);\n }\n }\n\n file.pendingDestroy();\n }\n\n atlasCache.add(atlasKey, { preMultipliedAlpha: preMultipliedAlpha, data: combinedAtlasData, prefix: this.prefix });\n\n this.complete = true;\n }\n }\n\n});\n\nmodule.exports = SpineFile;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar BuildGameObject = require('../../../src/gameobjects/BuildGameObject');\nvar Class = require('../../../src/utils/Class');\nvar GetValue = require('../../../src/utils/object/GetValue');\nvar ResizeEvent = require('../../../src/scale/events/RESIZE_EVENT');\nvar ScenePlugin = require('../../../src/plugins/ScenePlugin');\nvar Spine = require('Spine');\nvar SpineFile = require('./SpineFile');\nvar SpineGameObject = require('./gameobject/SpineGameObject');\nvar SpineContainer = require('./container/SpineContainer');\nvar NOOP = require('../../../src/utils/NOOP');\n\n/**\n * @classdesc\n * The Spine Plugin is a Scene based plugin that handles the creation and rendering of Spine Game Objects.\n *\n * Find more details about Spine itself at http://esotericsoftware.com/.\n *\n * All rendering and object creation is handled via the official Spine Runtimes. This version of the plugin\n * uses the Spine 3.8.95 runtimes. Please note that due to the way the Spine runtimes use semver, you will\n * get breaking changes in point-releases. Therefore, files created in a different version of Spine may not\n * work as a result, without you first updating the runtimes and rebuilding the plugin.\n *\n * Esoteric themselves recommend that you freeze your Spine editor version against the runtime versions.\n * You can find more information about this here: http://esotericsoftware.com/spine-settings#Version\n *\n * Please note that you require a Spine license in order to use Spine Runtimes in your games.\n *\n * You can install this plugin into your Phaser game by either importing it, if you're using ES6:\n *\n * ```javascript\n * import * as SpinePlugin from './SpinePlugin.js';\n * ```\n *\n * and then adding it to your Phaser Game configuration:\n *\n * ```javascript\n * plugins: {\n * scene: [\n * { key: 'SpinePlugin', plugin: window.SpinePlugin, mapping: 'spine' }\n * ]\n * }\n * ```\n *\n * If you're using ES5 then you can load the Spine Plugin in a Scene files payload, _within_ your\n * Game Configuration object, like this:\n *\n * ```javascript\n * scene: {\n * preload: preload,\n * create: create,\n * pack: {\n * files: [\n * { type: 'scenePlugin', key: 'SpinePlugin', url: 'plugins/SpinePlugin.js', sceneKey: 'spine' }\n * ]\n * }\n * }\n * ```\n *\n * Loading it like this allows you to then use commands such as `this.load.spine` from within the\n * same Scene. Alternatively, you can use the method `this.load.plugin` to load the plugin via the normal\n * Phaser Loader. However, doing so will not add it to the current Scene. It will be available from any\n * subsequent Scenes.\n *\n * Assuming a default environment you access it from within a Scene by using the `this.spine` reference.\n *\n * When this plugin is installed into a Scene it will add a Loader File Type, allowing you to load\n * Spine files directly, i.e.:\n *\n * ```javascript\n * this.load.spine('stretchyman', 'stretchyman-pro.json', [ 'stretchyman-pma.atlas' ], true);\n * ```\n *\n * It also installs two Game Object Factory methods, allowing you to create Spine Game Objects\n * and Spine Containers:\n *\n * ```javascript\n * const man = this.add.spine(512, 650, 'stretchyman');\n *\n * const container = this.add.spineContainer();\n *\n * container.add(man);\n * ```\n *\n * The first argument is the key which you used when importing the Spine data. There are lots of\n * things you can specify, such as the animation name, skeleton, slot attachments and more. Please\n * see the respective documentation and examples for further details.\n *\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary.\n * The associated atlas files are scanned for any texture files present in them, which are then loaded.\n * If you have exported your Spine data with preMultipliedAlpha set, then you should enable this in the\n * load arguments, or you may see black outlines around skeleton textures.\n *\n * The Spine plugin is local to the Scene in which it is installed. This means a change to something,\n * such as the Skeleton Debug Renderer, in this Scene, will not impact the renderer in any other Scene.\n * The only exception to this is with the caches this plugin creates. Spine atlas and texture data are\n * stored in their own caches, which are global, meaning they're accessible from any Scene in your\n * game, regardless if the Scene loaded the Spine data or not.\n *\n * When destroying a Phaser Game instance, if you need to re-create it again on the same page without\n * reloading, you must remember to remove the Spine Plugin as part of your tear-down process:\n *\n * ```javascript\n * this.plugins.removeScenePlugin('SpinePlugin');\n * ```\n *\n * For details about the Spine Runtime API see http://esotericsoftware.com/spine-api-reference\n *\n * @class SpinePlugin\n * @extends Phaser.Plugins.ScenePlugin\n * @constructor\n * @since 3.19.0\n *\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Phaser Plugin Manager.\n */\nvar SpinePlugin = new Class({\n\n Extends: ScenePlugin,\n\n initialize:\n\n function SpinePlugin (scene, pluginManager)\n {\n ScenePlugin.call(this, scene, pluginManager);\n\n var game = pluginManager.game;\n\n /**\n * A read-only flag that indicates if the game is running under WebGL or Canvas.\n *\n * @name SpinePlugin#isWebGL\n * @type {boolean}\n * @readonly\n * @since 3.19.0\n */\n this.isWebGL = (game.config.renderType === 2);\n\n /**\n * A custom cache that stores the Spine atlas data.\n *\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\n * no matter which Scene you are in.\n *\n * @name SpinePlugin#cache\n * @type {Phaser.Cache.BaseCache}\n * @since 3.19.0\n */\n this.cache = game.cache.addCustom('spine');\n\n /**\n * A custom cache that stores the Spine Textures.\n *\n * This cache is global across your game, allowing you to access Spine data loaded from other Scenes,\n * no matter which Scene you are in.\n *\n * @name SpinePlugin#spineTextures\n * @type {Phaser.Cache.BaseCache}\n * @since 3.19.0\n */\n this.spineTextures = game.cache.addCustom('spineTextures');\n\n /**\n * A reference to the global JSON Cache.\n *\n * @name SpinePlugin#json\n * @type {Phaser.Cache.BaseCache}\n * @since 3.19.0\n */\n this.json = game.cache.json;\n\n /**\n * A reference to the global Texture Manager.\n *\n * @name SpinePlugin#textures\n * @type {Phaser.Textures.TextureManager}\n * @since 3.19.0\n */\n this.textures = game.textures;\n\n /**\n * A flag that sets if the Skeleton Renderers will render debug information over the top\n * of the skeleton or not.\n *\n * @name SpinePlugin#drawDebug\n * @type {boolean}\n * @since 3.19.0\n */\n this.drawDebug = false;\n\n /**\n * The underlying WebGL context of the Phaser renderer.\n *\n * Only set if running in WebGL mode.\n *\n * @name SpinePlugin#gl\n * @type {WebGLRenderingContext}\n * @since 3.19.0\n */\n this.gl;\n\n /**\n * A reference to either the Canvas or WebGL Renderer that this Game is using.\n *\n * @name SpinePlugin#renderer\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\n * @since 3.19.0\n */\n this.renderer;\n\n /**\n * An instance of the Spine WebGL Scene Renderer.\n *\n * Only set if running in WebGL mode.\n *\n * @name SpinePlugin#sceneRenderer\n * @type {spine.webgl.SceneRenderer}\n * @since 3.19.0\n */\n this.sceneRenderer;\n\n /**\n * An instance of the Spine Skeleton Renderer.\n *\n * @name SpinePlugin#skeletonRenderer\n * @type {(spine.canvas.SkeletonRenderer|spine.webgl.SkeletonRenderer)}\n * @since 3.19.0\n */\n this.skeletonRenderer;\n\n /**\n * An instance of the Spine Skeleton Debug Renderer.\n *\n * Only set if running in WebGL mode.\n *\n * @name SpinePlugin#skeletonDebugRenderer\n * @type {spine.webgl.skeletonDebugRenderer}\n * @since 3.19.0\n */\n this.skeletonDebugRenderer;\n\n /**\n * A reference to the Spine runtime.\n * This is the runtime created by Esoteric Software\n *\n * @name SpinePlugin#plugin\n * @type {spine}\n * @since 3.19.0\n */\n this.plugin = Spine;\n\n /**\n * An internal vector3 used by the screen to world method.\n *\n * @name SpinePlugin#temp1\n * @private\n * @type {spine.webgl.Vector3}\n * @since 3.19.0\n */\n this.temp1;\n\n /**\n * An internal vector3 used by the screen to world method.\n *\n * @name SpinePlugin#temp2\n * @private\n * @type {spine.webgl.Vector3}\n * @since 3.19.0\n */\n this.temp2;\n\n if (this.isWebGL)\n {\n this.runtime = Spine.webgl;\n\n this.renderer = game.renderer;\n this.gl = game.renderer.gl;\n\n this.getAtlas = this.getAtlasWebGL;\n }\n else\n {\n this.runtime = Spine.canvas;\n\n this.renderer = game.renderer;\n\n this.getAtlas = this.getAtlasCanvas;\n }\n\n // Headless mode?\n if (!this.renderer)\n {\n this.renderer = {\n width: game.scale.width,\n height: game.scale.height,\n preRender: NOOP,\n postRender: NOOP,\n render: NOOP,\n destroy: NOOP\n };\n }\n\n var _this = this;\n\n var add = function (x, y, key, animationName, loop)\n {\n var spineGO = new SpineGameObject(this.scene, _this, x, y, key, animationName, loop);\n\n this.displayList.add(spineGO);\n this.updateList.add(spineGO);\n\n return spineGO;\n };\n\n var make = function (config, addToScene)\n {\n if (config === undefined) { config = {}; }\n\n var key = GetValue(config, 'key', null);\n var animationName = GetValue(config, 'animationName', null);\n var loop = GetValue(config, 'loop', false);\n\n var spineGO = new SpineGameObject(this.scene, _this, 0, 0, key, animationName, loop);\n\n if (addToScene !== undefined)\n {\n config.add = addToScene;\n }\n\n BuildGameObject(this.scene, spineGO, config);\n\n // Spine specific\n var skinName = GetValue(config, 'skinName', false);\n\n if (skinName)\n {\n spineGO.setSkinByName(skinName);\n }\n\n var slotName = GetValue(config, 'slotName', false);\n var attachmentName = GetValue(config, 'attachmentName', null);\n\n if (slotName)\n {\n spineGO.setAttachment(slotName, attachmentName);\n }\n\n return spineGO.refresh();\n };\n\n var addContainer = function (x, y, children)\n {\n var spineGO = new SpineContainer(this.scene, _this, x, y, children);\n\n this.displayList.add(spineGO);\n\n return spineGO;\n };\n\n var makeContainer = function (config, addToScene)\n {\n if (config === undefined) { config = {}; }\n\n var x = GetValue(config, 'x', 0);\n var y = GetValue(config, 'y', 0);\n var children = GetValue(config, 'children', null);\n\n var container = new SpineContainer(this.scene, _this, x, y, children);\n\n if (addToScene !== undefined)\n {\n config.add = addToScene;\n }\n\n BuildGameObject(this.scene, container, config);\n\n return container;\n };\n\n pluginManager.registerFileType('spine', this.spineFileCallback, scene);\n pluginManager.registerGameObject('spine', add, make);\n pluginManager.registerGameObject('spineContainer', addContainer, makeContainer);\n },\n\n /**\n * Internal boot handler.\n *\n * @method SpinePlugin#boot\n * @private\n * @since 3.19.0\n */\n boot: function ()\n {\n if (this.isWebGL)\n {\n this.bootWebGL();\n this.onResize();\n this.game.scale.on(ResizeEvent, this.onResize, this);\n }\n else\n {\n this.bootCanvas();\n }\n\n var eventEmitter = this.systems.events;\n\n eventEmitter.once('shutdown', this.shutdown, this);\n eventEmitter.once('destroy', this.destroy, this);\n\n this.game.events.once('destroy', this.gameDestroy, this);\n },\n\n /**\n * Internal boot handler for the Canvas Renderer.\n *\n * @method SpinePlugin#bootCanvas\n * @private\n * @since 3.19.0\n */\n bootCanvas: function ()\n {\n this.skeletonRenderer = new Spine.canvas.SkeletonRenderer(this.scene.sys.context);\n },\n\n /**\n * Internal boot handler for the WebGL Renderer.\n *\n * @method SpinePlugin#bootWebGL\n * @private\n * @since 3.19.0\n */\n bootWebGL: function ()\n {\n this.sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true);\n\n // Monkeypatch the Spine setBlendMode functions, or batching is destroyed!\n\n var setBlendMode = function (srcBlend, dstBlend)\n {\n if (srcBlend !== this.srcBlend || dstBlend !== this.dstBlend)\n {\n var gl = this.context.gl;\n\n this.srcBlend = srcBlend;\n this.dstBlend = dstBlend;\n\n if (this.isDrawing)\n {\n this.flush();\n gl.blendFunc(this.srcBlend, this.dstBlend);\n }\n }\n };\n\n this.sceneRenderer.batcher.setBlendMode = setBlendMode;\n this.sceneRenderer.shapes.setBlendMode = setBlendMode;\n\n this.skeletonRenderer = this.sceneRenderer.skeletonRenderer;\n this.skeletonDebugRenderer = this.sceneRenderer.skeletonDebugRenderer;\n\n this.temp1 = new Spine.webgl.Vector3(0, 0, 0);\n this.temp2 = new Spine.webgl.Vector3(0, 0, 0);\n },\n\n /**\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\n * then returns it. You do not normally need to invoke this method directly.\n *\n * @method SpinePlugin#getAtlasCanvas\n * @since 3.19.0\n *\n * @param {string} key - The key of the Spine Atlas to create.\n *\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\n */\n getAtlasCanvas: function (key)\n {\n var atlasEntry = this.cache.get(key);\n\n if (!atlasEntry)\n {\n console.warn('No atlas data for: ' + key);\n return;\n }\n\n var atlas;\n var spineTextures = this.spineTextures;\n\n if (spineTextures.has(key))\n {\n atlas = spineTextures.get(key);\n }\n else\n {\n var textures = this.textures;\n\n atlas = new Spine.TextureAtlas(atlasEntry.data, function (path)\n {\n return new Spine.canvas.CanvasTexture(textures.get(atlasEntry.prefix + path).getSourceImage());\n });\n }\n\n return atlas;\n },\n\n /**\n * Gets a loaded Spine Atlas from the cache and creates a new Spine Texture Atlas,\n * then returns it. You do not normally need to invoke this method directly.\n *\n * @method SpinePlugin#getAtlasWebGL\n * @since 3.19.0\n *\n * @param {string} key - The key of the Spine Atlas to create.\n *\n * @return {spine.TextureAtlas} The Spine Texture Atlas, or undefined if the given key wasn't found.\n */\n getAtlasWebGL: function (key)\n {\n var atlasEntry = this.cache.get(key);\n\n if (!atlasEntry)\n {\n console.warn('No atlas data for: ' + key);\n return;\n }\n\n var atlas;\n var spineTextures = this.spineTextures;\n\n if (spineTextures.has(key))\n {\n atlas = spineTextures.get(key);\n }\n else\n {\n var textures = this.textures;\n\n var gl = this.sceneRenderer.context.gl;\n\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\n\n atlas = new Spine.TextureAtlas(atlasEntry.data, function (path)\n {\n return new Spine.webgl.GLTexture(gl, textures.get(atlasEntry.prefix + path).getSourceImage(), false);\n });\n }\n\n return atlas;\n },\n\n /**\n * Adds a Spine Skeleton and Atlas file, or array of files, to the current load queue.\n *\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\n *\n * ```javascript\n * function preload ()\n * {\n * this.load.spine('spineBoy', 'boy.json', 'boy.atlas', true);\n * }\n * ```\n *\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\n * loaded.\n *\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\n *\n * Phaser expects the Spine data to be exported from the Spine application in a JSON format, not binary. The associated\n * atlas files are scanned for any texture files present in them, which are then loaded. If you have exported\n * your Spine data with preMultipliedAlpha set, then you should enable this in the arguments, or you may see black\n * outlines around skeleton textures.\n *\n * The key must be a unique String. It is used to add the file to the global Spine cache upon a successful load.\n * The key should be unique both in terms of files being loaded and files already present in the Spine cache.\n * Loading a file using a key that is already taken will result in a warning.\n *\n * Instead of passing arguments you can pass a configuration object, such as:\n *\n * ```javascript\n * this.load.spine({\n * key: 'mainmenu',\n * jsonURL: 'boy.json',\n * atlasURL: 'boy.atlas',\n * preMultipliedAlpha: true\n * });\n * ```\n *\n * If you need to load multiple Spine atlas files, provide them as an array:\n *\n * ```javascript\n * function preload ()\n * {\n * this.load.spine('demos', 'demos.json', [ 'atlas1.atlas', 'atlas2.atlas' ], true);\n * }\n * ```\n *\n * See the documentation for `Phaser.Types.Loader.FileTypes.SpineFileConfig` for more details.\n *\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\n * this is what you would use to retrieve the data from the Spine plugin.\n *\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\n *\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\n * and no URL is given then the Loader will set the URL to be \"alien.json\". It will always add `.json` as the extension, although\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\n *\n * Note: The ability to load this type of file will only be available if the Spine Plugin has been built or loaded into Phaser.\n *\n * @method Phaser.Loader.LoaderPlugin#spine\n * @fires Phaser.Loader.LoaderPlugin#ADD\n * @since 3.19.0\n *\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\n * @param {string} jsonURL - The absolute or relative URL to load the Spine json file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\n * @param {string|string[]} atlasURL - The absolute or relative URL to load the Spine atlas file from. If undefined or `null` it will be set to `.atlas`, i.e. if `key` was \"alien\" then the URL will be \"alien.atlas\".\n * @param {boolean} [preMultipliedAlpha=false] - Do the texture files include pre-multiplied alpha or not?\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the Spine json file. Used in replacement of the Loaders default XHR Settings.\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the Spine atlas file. Used in replacement of the Loaders default XHR Settings.\n *\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\n */\n spineFileCallback: function (key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings)\n {\n var multifile;\n\n if (Array.isArray(key))\n {\n for (var i = 0; i < key.length; i++)\n {\n multifile = new SpineFile(this, key[i]);\n\n this.addFile(multifile.files);\n }\n }\n else\n {\n multifile = new SpineFile(this, key, jsonURL, atlasURL, preMultipliedAlpha, jsonXhrSettings, atlasXhrSettings);\n\n this.addFile(multifile.files);\n }\n\n return this;\n },\n\n /**\n * Converts the given x and y screen coordinates into the world space of the given Skeleton.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#worldToLocal\n * @since 3.19.0\n *\n * @param {number} x - The screen space x coordinate to convert.\n * @param {number} y - The screen space y coordinate to convert.\n * @param {spine.Skeleton} skeleton - The Spine Skeleton to convert into.\n * @param {spine.Bone} [bone] - Optional bone of the Skeleton to convert into.\n *\n * @return {spine.Vector2} A Vector2 containing the translated point.\n */\n worldToLocal: function (x, y, skeleton, bone)\n {\n var temp1 = this.temp1;\n var temp2 = this.temp2;\n var camera = this.sceneRenderer.camera;\n\n temp1.set(x + skeleton.x, y - skeleton.y, 0);\n\n var width = camera.viewportWidth;\n var height = camera.viewportHeight;\n\n camera.screenToWorld(temp1, width, height);\n\n if (bone && bone.parent !== null)\n {\n bone.parent.worldToLocal(temp2.set(temp1.x - skeleton.x, temp1.y - skeleton.y, 0));\n\n return new Spine.Vector2(temp2.x, temp2.y);\n }\n else if (bone)\n {\n return new Spine.Vector2(temp1.x - skeleton.x, temp1.y - skeleton.y);\n }\n else\n {\n return new Spine.Vector2(temp1.x, temp1.y);\n }\n },\n\n /**\n * Returns a Spine Vector2 based on the given x and y values.\n *\n * @method SpinePlugin#getVector2\n * @since 3.19.0\n *\n * @param {number} x - The Vector x value.\n * @param {number} y - The Vector y value.\n *\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\n */\n getVector2: function (x, y)\n {\n return new Spine.Vector2(x, y);\n },\n\n /**\n * Returns a Spine Vector2 based on the given x, y and z values.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#getVector3\n * @since 3.19.0\n *\n * @param {number} x - The Vector x value.\n * @param {number} y - The Vector y value.\n * @param {number} z - The Vector z value.\n *\n * @return {spine.Vector2} A Spine Vector2 based on the given values.\n */\n getVector3: function (x, y, z)\n {\n return new Spine.webgl.Vector3(x, y, z);\n },\n\n /**\n * Sets `drawBones` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugBones\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugBones: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawBones = value;\n\n return this;\n },\n\n /**\n * Sets `drawRegionAttachments` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugRegionAttachments\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugRegionAttachments: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawRegionAttachments = value;\n\n return this;\n },\n\n /**\n * Sets `drawBoundingBoxes` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugBoundingBoxes\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugBoundingBoxes: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawBoundingBoxes = value;\n\n return this;\n },\n\n /**\n * Sets `drawMeshHull` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugMeshHull\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugMeshHull: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawMeshHull = value;\n\n return this;\n },\n\n /**\n * Sets `drawMeshTriangles` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugMeshTriangles\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugMeshTriangles: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawMeshTriangles = value;\n\n return this;\n },\n\n /**\n * Sets `drawPaths` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugPaths\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugPaths: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawPaths = value;\n\n return this;\n },\n\n /**\n * Sets `drawSkeletonXY` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugSkeletonXY\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugSkeletonXY: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawSkeletonXY = value;\n\n return this;\n },\n\n /**\n * Sets `drawClipping` in the Spine Skeleton Debug Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setDebugClipping\n * @since 3.19.0\n *\n * @param {boolean} [value=true] - The value to set in the debug property.\n *\n * @return {this} This Spine Plugin.\n */\n setDebugClipping: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.skeletonDebugRenderer.drawClipping = value;\n\n return this;\n },\n\n /**\n * Sets the given vertex effect on the Spine Skeleton Renderer.\n *\n * Only works in WebGL.\n *\n * @method SpinePlugin#setEffect\n * @since 3.19.0\n *\n * @param {spine.VertexEffect} [effect] - The vertex effect to set on the Skeleton Renderer.\n *\n * @return {this} This Spine Plugin.\n */\n setEffect: function (effect)\n {\n this.sceneRenderer.skeletonRenderer.vertexEffect = effect;\n\n return this;\n },\n\n /**\n * Creates a Spine Skeleton based on the given key and optional Skeleton JSON data.\n *\n * The Skeleton data should have already been loaded before calling this method.\n *\n * @method SpinePlugin#createSkeleton\n * @since 3.19.0\n *\n * @param {string} key - The key of the Spine skeleton data, as loaded by the plugin. If the Spine JSON contains multiple skeletons, reference them with a period, i.e. `set.spineBoy`.\n * @param {object} [skeletonJSON] - Optional Skeleton JSON data to use, instead of getting it from the cache.\n *\n * @return {(any|null)} This Spine Skeleton data object, or `null` if the key was invalid.\n */\n createSkeleton: function (key, skeletonJSON)\n {\n var atlasKey = key;\n var jsonKey = key;\n var split = (key.indexOf('.') !== -1);\n\n if (split)\n {\n var parts = key.split('.');\n\n atlasKey = parts.shift();\n jsonKey = parts.join('.');\n }\n\n var atlasData = this.cache.get(atlasKey);\n var atlas = this.getAtlas(atlasKey);\n\n if (!atlas)\n {\n return null;\n }\n\n if (!this.spineTextures.has(atlasKey))\n {\n this.spineTextures.add(atlasKey, atlas);\n }\n\n var preMultipliedAlpha = atlasData.preMultipliedAlpha;\n\n var atlasLoader = new Spine.AtlasAttachmentLoader(atlas);\n\n var skeletonJson = new Spine.SkeletonJson(atlasLoader);\n\n var data;\n\n if (skeletonJSON)\n {\n data = skeletonJSON;\n }\n else\n {\n var json = this.json.get(atlasKey);\n\n data = (split) ? GetValue(json, jsonKey) : json;\n }\n\n if (data)\n {\n var skeletonData = skeletonJson.readSkeletonData(data);\n\n var skeleton = new Spine.Skeleton(skeletonData);\n\n return { skeletonData: skeletonData, skeleton: skeleton, preMultipliedAlpha: preMultipliedAlpha };\n }\n else\n {\n return null;\n }\n },\n\n /**\n * Creates a new Animation State and Animation State Data for the given skeleton.\n *\n * The returned object contains two properties: `state` and `stateData` respectively.\n *\n * @method SpinePlugin#createAnimationState\n * @since 3.19.0\n *\n * @param {spine.Skeleton} skeleton - The Skeleton to create the Animation State for.\n *\n * @return {any} An object containing the Animation State and Animation State Data instances.\n */\n createAnimationState: function (skeleton)\n {\n var stateData = new Spine.AnimationStateData(skeleton.data);\n\n var state = new Spine.AnimationState(stateData);\n\n return { stateData: stateData, state: state };\n },\n\n /**\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\n *\n * The returned object contains two properties: `offset` and `size`:\n *\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\n * `size` - The width and height of the AABB.\n *\n * @method SpinePlugin#getBounds\n * @since 3.19.0\n *\n * @param {spine.Skeleton} skeleton - The Skeleton to get the bounds from.\n *\n * @return {any} The bounds object.\n */\n getBounds: function (skeleton)\n {\n var offset = new Spine.Vector2();\n var size = new Spine.Vector2();\n\n skeleton.getBounds(offset, size, []);\n\n return { offset: offset, size: size };\n },\n\n /**\n * Internal handler for when the renderer resizes.\n *\n * Only called if running in WebGL.\n *\n * @method SpinePlugin#onResize\n * @since 3.19.0\n */\n onResize: function ()\n {\n var renderer = this.renderer;\n var sceneRenderer = this.sceneRenderer;\n\n var viewportWidth = renderer.width;\n var viewportHeight = renderer.height;\n\n sceneRenderer.camera.position.x = viewportWidth / 2;\n sceneRenderer.camera.position.y = viewportHeight / 2;\n\n sceneRenderer.camera.viewportWidth = viewportWidth;\n sceneRenderer.camera.viewportHeight = viewportHeight;\n },\n\n /**\n * The Scene that owns this plugin is shutting down.\n *\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\n *\n * @method SpinePlugin#shutdown\n * @private\n * @since 3.19.0\n */\n shutdown: function ()\n {\n var eventEmitter = this.systems.events;\n\n eventEmitter.off('shutdown', this.shutdown, this);\n\n if (this.isWebGL)\n {\n this.game.scale.off(ResizeEvent, this.onResize, this);\n }\n },\n\n /**\n * The Scene that owns this plugin is being destroyed.\n *\n * We need to shutdown and then kill off all external references.\n *\n * @method SpinePlugin#destroy\n * @private\n * @since 3.19.0\n */\n destroy: function ()\n {\n this.shutdown();\n\n this.game = null;\n this.scene = null;\n this.systems = null;\n\n this.cache = null;\n this.spineTextures = null;\n this.json = null;\n this.textures = null;\n this.skeletonRenderer = null;\n this.gl = null;\n },\n\n /**\n * The Game that owns this plugin is being destroyed.\n *\n * Dispose of the Scene Renderer and remove the Game Objects.\n *\n * @method SpinePlugin#gameDestroy\n * @private\n * @since 3.50.0\n */\n gameDestroy: function ()\n {\n this.destroy();\n\n if (this.sceneRenderer)\n {\n this.sceneRenderer.dispose();\n }\n\n this.sceneRenderer = null;\n this.pluginManager = null;\n\n this.pluginManager.removeGameObject('spine', true, true);\n this.pluginManager.removeGameObject('spineContainer', true, true);\n }\n\n});\n\nSpinePlugin.SpineGameObject = SpineGameObject;\nSpinePlugin.SpineContainer = SpineContainer;\n\n/**\n * Creates a new Spine Game Object and adds it to the Scene.\n *\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\n * do not have a Phaser origin.\n *\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\n * that.\n *\n * ```javascript\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\n * ```\n *\n * The key is optional. If not passed here, you need to call `SpineGameObject.setSkeleton()` to use it.\n *\n * The animation name is also optional and can be set later via `SpineGameObject.setAnimation`.\n *\n * Should you wish for more control over the object creation, such as setting a slot attachment or skin\n * name, then use `SpinePlugin.make` instead.\n *\n * @method SpinePlugin#add\n * @since 3.19.0\n *\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\n *\n * @return {SpineGameObject} The Game Object that was created.\n */\n\n/**\n * Creates a new Spine Game Object from the given configuration file and optionally adds it to the Scene.\n *\n * The x and y coordinate given is used to set the placement of the root Spine bone, which can vary from\n * skeleton to skeleton. All rotation and scaling happens from the root bone placement. Spine Game Objects\n * do not have a Phaser origin.\n *\n * If the Spine JSON file exported multiple Skeletons within it, then you can specify them by using a period\n * character in the key. For example, if you loaded a Spine JSON using the key `monsters` and it contains\n * multiple Skeletons, including one called `goblin` then you would use the key `monsters.goblin` to reference\n * that.\n *\n * ```javascript\n * let jelly = this.make.spine({\n * x: 500, y: 500, key: 'jelly',\n * scale: 1.5,\n * skinName: 'square_Green',\n * animationName: 'jelly-idle', loop: true,\n * slotName: 'hat', attachmentName: 'images/La_14'\n * });\n * ```\n *\n * @method SpinePlugin#make\n * @since 3.19.0\n *\n * @param {any} config - The configuration object this Game Object will use to create itself.\n * @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.\n *\n * @return {SpineGameObject} The Game Object that was created.\n */\n\nmodule.exports = SpinePlugin;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar Class = require('../../../../src/utils/Class');\nvar Container = require('../../../../src/gameobjects/container/Container');\nvar SpineContainerRender = require('./SpineContainerRender');\n\n/**\n * @classdesc\n * A Spine Container is a special kind of Container created specifically for Spine Game Objects.\n *\n * You have all of the same features of a standard Container, but the rendering functions are optimized specifically\n * for Spine Game Objects. You must only add ever Spine Game Objects to this type of Container. Although Phaser will\n * not prevent you from adding other types, they will not render and are likely to throw runtime errors.\n *\n * To create one in a Scene, use the factory methods:\n *\n * ```javascript\n * this.add.spinecontainer();\n * ```\n *\n * or\n *\n * ```javascript\n * this.make.spinecontainer();\n * ```\n *\n * See the Container documentation for further details about what Containers can do.\n *\n * @class SpineContainer\n * @extends Phaser.GameObjects.Container\n * @constructor\n * @since 3.50.0\n *\n * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to.\n * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin.\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {SpineGameObject[]} [children] - An optional array of Spine Game Objects to add to this Container.\n */\nvar SpineContainer = new Class({\n\n Extends: Container,\n\n Mixins: [\n SpineContainerRender\n ],\n\n initialize:\n\n function SpineContainer (scene, plugin, x, y, children)\n {\n Container.call(this, scene, x, y, children);\n\n // Same as SpineGameObject, to prevent the renderer from mis-typing it when batching\n this.type = 'Spine';\n\n /**\n * A reference to the Spine Plugin.\n *\n * @name SpineContainer#plugin\n * @type {SpinePlugin}\n * @since 3.50.0\n */\n this.plugin = plugin;\n },\n\n /**\n * Internal destroy handler, called as part of the destroy process.\n *\n * @method SpineContainer#preDestroy\n * @protected\n * @since 3.50.0\n */\n preDestroy: function ()\n {\n this.removeAll(!!this.exclusive);\n\n this.localTransform.destroy();\n this.tempTransformMatrix.destroy();\n\n this.list = [];\n this._displayList = null;\n this.plugin = null;\n }\n\n});\n\nmodule.exports = SpineContainer;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Renders this Game Object with the Canvas Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method Phaser.GameObjects.Container#renderCanvas\n * @since 3.4.0\n * @private\n *\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar SpineContainerCanvasRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix)\n{\n var children = container.list;\n\n if (children.length === 0)\n {\n return;\n }\n\n var transformMatrix = container.localTransform;\n\n if (parentMatrix)\n {\n transformMatrix.loadIdentity();\n transformMatrix.multiply(parentMatrix);\n transformMatrix.translate(container.x, container.y);\n transformMatrix.rotate(container.rotation);\n transformMatrix.scale(container.scaleX, container.scaleY);\n }\n else\n {\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\n }\n\n var containerHasBlendMode = (container.blendMode !== -1);\n\n if (!containerHasBlendMode)\n {\n // If Container is SKIP_TEST then set blend mode to be Normal\n renderer.setBlendMode(0);\n }\n\n var alpha = container._alpha;\n var scrollFactorX = container.scrollFactorX;\n var scrollFactorY = container.scrollFactorY;\n\n if (container.mask)\n {\n container.mask.preRenderCanvas(renderer, null, camera);\n }\n\n for (var i = 0; i < children.length; i++)\n {\n var child = children[i];\n\n if (!child.willRender(camera))\n {\n continue;\n }\n\n var childAlpha = child.alpha;\n var childScrollFactorX = child.scrollFactorX;\n var childScrollFactorY = child.scrollFactorY;\n\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\n {\n // If Container doesn't have its own blend mode, then a child can have one\n renderer.setBlendMode(child.blendMode);\n }\n\n // Set parent values\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\n child.setAlpha(childAlpha * alpha);\n\n // Render\n child.renderCanvas(renderer, child, interpolationPercentage, camera, transformMatrix);\n\n // Restore original values\n child.setAlpha(childAlpha);\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\n }\n\n if (container.mask)\n {\n container.mask.postRenderCanvas(renderer);\n }\n};\n\nmodule.exports = SpineContainerCanvasRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar renderWebGL = require('../../../../src/utils/NOOP');\nvar renderCanvas = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineContainerWebGLRenderer');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineContainerCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar Clamp = require('../../../../src/math/Clamp');\nvar RadToDeg = require('../../../../src/math/RadToDeg');\nvar Wrap = require('../../../../src/math/Wrap');\n\n/**\n * Renders this Game Object with the WebGL Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method SpineContainerWebGLRenderer#renderWebGL\n * @since 3.50.0\n * @private\n *\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar SpineContainerWebGLRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix)\n{\n var plugin = container.plugin;\n var sceneRenderer = plugin.sceneRenderer;\n var children = container.list;\n\n if (children.length === 0)\n {\n if (sceneRenderer.batcher.isDrawing && renderer.finalType)\n {\n sceneRenderer.end();\n\n renderer.rebindPipeline();\n }\n\n return;\n }\n\n var transformMatrix = container.localTransform;\n\n if (parentMatrix)\n {\n transformMatrix.loadIdentity();\n transformMatrix.multiply(parentMatrix);\n transformMatrix.translate(container.x, container.y);\n transformMatrix.rotate(container.rotation);\n transformMatrix.scale(container.scaleX, container.scaleY);\n }\n else\n {\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\n }\n\n var alpha = container.alpha;\n var scrollFactorX = container.scrollFactorX;\n var scrollFactorY = container.scrollFactorY;\n\n var GameObjectRenderMask = 15;\n\n if (renderer.newType)\n {\n // flush + clear if this is a new type\n renderer.clearPipeline();\n\n sceneRenderer.begin();\n }\n\n for (var i = 0; i < children.length; i++)\n {\n var src = children[i];\n\n var skeleton = src.skeleton;\n var childAlpha = skeleton.color.a;\n\n var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || childAlpha === 0);\n\n if (!skeleton || !willRender)\n {\n continue;\n }\n\n var camMatrix = renderer._tempMatrix1;\n var spriteMatrix = renderer._tempMatrix2;\n var calcMatrix = renderer._tempMatrix3;\n\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));\n\n camMatrix.copyFrom(camera.matrix);\n\n // Multiply the camera by the parent matrix\n camMatrix.multiplyWithOffset(transformMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY);\n\n // Undo the camera scroll\n spriteMatrix.e = src.x;\n spriteMatrix.f = src.y;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n\n var viewportHeight = renderer.height;\n\n skeleton.x = calcMatrix.tx;\n skeleton.y = viewportHeight - calcMatrix.ty;\n\n skeleton.scaleX = calcMatrix.scaleX;\n skeleton.scaleY = calcMatrix.scaleY;\n\n if (src.scaleX < 0)\n {\n skeleton.scaleX *= -1;\n\n src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);\n }\n else\n {\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\n }\n\n if (src.scaleY < 0)\n {\n skeleton.scaleY *= -1;\n\n if (src.scaleX < 0)\n {\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n else\n {\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n }\n\n if (camera.renderToTexture || renderer.currentFramebuffer !== null)\n {\n skeleton.y = calcMatrix.ty;\n skeleton.scaleY *= -1;\n }\n\n // Add autoUpdate option\n skeleton.updateWorldTransform();\n\n skeleton.color.a = Clamp(childAlpha * alpha, 0, 1);\n\n // Draw the current skeleton\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\n\n // Restore alpha\n skeleton.color.a = childAlpha;\n }\n\n if (!renderer.nextTypeMatch)\n {\n // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch\n sceneRenderer.end();\n\n // And rebind the previous pipeline\n renderer.rebindPipeline();\n }\n};\n\nmodule.exports = SpineContainerWebGLRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Complete Event.\n *\n * @event SpinePluginEvents#COMPLETE\n * @since 3.19.0\n */\nmodule.exports = 'complete';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Dispose Event.\n *\n * @event SpinePluginEvents#DISPOSE\n * @since 3.19.0\n */\nmodule.exports = 'dispose';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The End Event.\n *\n * @event SpinePluginEvents#END\n * @since 3.19.0\n */\nmodule.exports = 'end';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Custom Event Event.\n *\n * @event SpinePluginEvents#EVENT\n * @since 3.19.0\n */\nmodule.exports = 'event';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Interrupted Event.\n *\n * @event SpinePluginEvents#INTERRUPTED\n * @since 3.19.0\n */\nmodule.exports = 'interrupted';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Start Event.\n *\n * @event SpinePluginEvents#START\n * @since 3.19.0\n */\nmodule.exports = 'start';\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace SpinePluginEvents\n */\n\nmodule.exports = {\n\n COMPLETE: require('./COMPLETE_EVENT'),\n DISPOSE: require('./DISPOSE_EVENT'),\n END: require('./END_EVENT'),\n EVENT: require('./EVENT_EVENT'),\n INTERRUPTED: require('./INTERRUPTED_EVENT'),\n START: require('./START_EVENT')\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar AngleBetween = require('../../../../src/math/angle/Between');\nvar Clamp = require('../../../../src/math/Clamp');\nvar Class = require('../../../../src/utils/Class');\nvar ComponentsComputedSize = require('../../../../src/gameobjects/components/ComputedSize');\nvar ComponentsDepth = require('../../../../src/gameobjects/components/Depth');\nvar ComponentsFlip = require('../../../../src/gameobjects/components/Flip');\nvar ComponentsScrollFactor = require('../../../../src/gameobjects/components/ScrollFactor');\nvar ComponentsTransform = require('../../../../src/gameobjects/components/Transform');\nvar ComponentsVisible = require('../../../../src/gameobjects/components/Visible');\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar DegToRad = require('../../../../src/math/DegToRad');\nvar GameObject = require('../../../../src/gameobjects/GameObject');\nvar RadToDeg = require('../../../../src/math/RadToDeg');\nvar SpineEvents = require('../events/');\nvar SpineGameObjectRender = require('./SpineGameObjectRender');\n\n/**\n * @classdesc\n * A Spine Game Object is a Phaser level object that can be added to your Phaser Scenes. It encapsulates\n * a Spine Skeleton with Spine Animation Data and Animation State, with helper methods to allow you to\n * easily change the skin, slot attachment, bone positions and more.\n *\n * Spine Game Objects can be created via the Game Object Factory, Game Object Creator, or directly.\n * You can only create them if the Spine plugin has been loaded into Phaser.\n *\n * The quickest way is the Game Object Factory:\n *\n * ```javascript\n * let jelly = this.add.spine(512, 550, 'jelly', 'jelly-think', true);\n * ```\n *\n * Here we are creating a new Spine Game Object positioned at 512 x 550. It's using the `jelly`\n * Spine data, which has previously been loaded into your Scene. The `jelly-think` argument is\n * an optional animation to start playing on the skeleton. The final argument `true` sets the\n * animation to loop. Look at the documentation for further details on each of these options.\n *\n * For more control, you can use the Game Object Creator, passing in a Spine Game Object\n * Configuration object:\n *\n * ```javascript\n * let jelly = this.make.spine({\n * x: 512, y: 550, key: 'jelly',\n * scale: 1.5,\n * skinName: 'square_Green',\n * animationName: 'jelly-think', loop: true,\n * slotName: 'hat', attachmentName: 'images/La_14'\n * });\n * ```\n *\n * Here, you've got the ability to specify extra details, such as the slot name, attachments or\n * overall scale.\n *\n * If you wish to instantiate a Spine Game Object directly you can do so, but in order for it to\n * update and render, it must be added to the display and update lists of your Scene:\n *\n * ```javascript\n * let jelly = new SpineGameObject(this, this.spine, 512, 550, 'jelly', 'jelly-think', true);\n * this.sys.displayList.add(jelly);\n * this.sys.updateList.add(jelly);\n * ```\n *\n * It's possible to enable Spine Game Objects for input, but you should be aware that it will use\n * the bounds of the skeletons current pose to create the hit area from. Sometimes this is ok, but\n * often not. Make use of the `InputPlugin.enableDebug` method to view the input shape being created.\n * If it's not suitable, provide your own shape to the `setInteractive` method.\n *\n * Due to the way Spine handles scaling, it's not recommended to enable a Spine Game Object for\n * physics directly. Instead, you should look at creating a proxy body and syncing the Spine Game\n * Object position with it. See the examples for further details.\n *\n * If your Spine Game Object has black outlines around the different parts of the texture when it\n * renders then you have exported the files from Spine with pre-multiplied alpha enabled, but have\n * forgotten to set that flag when loading the Spine data. Please see the loader docs for more details.\n *\n * @class SpineGameObject\n * @constructor\n * @since 3.19.0\n *\n * @param {Phaser.Scene} scene - A reference to the Scene that this Game Object belongs to.\n * @param {SpinePlugin} pluginManager - A reference to the Phaser Spine Plugin.\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {string} [key] - The key of the Spine Skeleton this Game Object will use, as stored in the Spine Plugin.\n * @param {string} [animationName] - The name of the animation to set on this Skeleton.\n * @param {boolean} [loop=false] - Should the animation playback be looped or not?\n */\nvar SpineGameObject = new Class({\n\n Extends: GameObject,\n\n Mixins: [\n ComponentsComputedSize,\n ComponentsDepth,\n ComponentsFlip,\n ComponentsScrollFactor,\n ComponentsTransform,\n ComponentsVisible,\n SpineGameObjectRender\n ],\n\n initialize:\n\n function SpineGameObject (scene, plugin, x, y, key, animationName, loop)\n {\n GameObject.call(this, scene, 'Spine');\n\n /**\n * A reference to the Spine Plugin.\n *\n * @name SpineGameObject#plugin\n * @type {SpinePlugin}\n * @since 3.19.0\n */\n this.plugin = plugin;\n\n /**\n * The Spine Skeleton this Game Object is using.\n *\n * @name SpineGameObject#skeleton\n * @type {spine.Skeleton}\n * @since 3.19.0\n */\n this.skeleton = null;\n\n /**\n * The Spine Skeleton Data associated with the Skeleton this Game Object is using.\n *\n * @name SpineGameObject#skeletonData\n * @type {spine.SkeletonData}\n * @since 3.19.0\n */\n this.skeletonData = null;\n\n /**\n * The Spine Animation State this Game Object is using.\n *\n * @name SpineGameObject#state\n * @type {spine.AnimationState}\n * @since 3.19.0\n */\n this.state = null;\n\n /**\n * The Spine Animation State Data associated with the Animation State this Game Object is using.\n *\n * @name SpineGameObject#stateData\n * @type {spine.AnimationStateData}\n * @since 3.19.0\n */\n this.stateData = null;\n\n /**\n * A reference to the root bone of the Skeleton.\n *\n * @name SpineGameObject#root\n * @type {spine.Bone}\n * @since 3.19.0\n */\n this.root = null;\n\n /**\n * This object holds the calculated bounds of the current\n * pose, as set when a new Skeleton is applied.\n *\n * @name SpineGameObject#bounds\n * @type {any}\n * @since 3.19.0\n */\n this.bounds = null;\n\n /**\n * A Game Object level flag that allows you to enable debug drawing\n * to the Skeleton Debug Renderer by toggling it.\n *\n * @name SpineGameObject#drawDebug\n * @type {boolean}\n * @since 3.19.0\n */\n this.drawDebug = false;\n\n /**\n * The factor to scale the Animation update time by.\n *\n * @name SpineGameObject#timeScale\n * @type {number}\n * @since 3.19.0\n */\n this.timeScale = 1;\n\n /**\n * The calculated Display Origin of this Game Object.\n *\n * @name SpineGameObject#displayOriginX\n * @type {number}\n * @since 3.19.0\n */\n this.displayOriginX = 0;\n\n /**\n * The calculated Display Origin of this Game Object.\n *\n * @name SpineGameObject#displayOriginY\n * @type {number}\n * @since 3.19.0\n */\n this.displayOriginY = 0;\n\n /**\n * A flag that stores if the texture associated with the current\n * Skin being used by this Game Object, has its alpha pre-multiplied\n * into it, or not.\n *\n * @name SpineGameObject#preMultipliedAlpha\n * @type {boolean}\n * @since 3.19.0\n */\n this.preMultipliedAlpha = false;\n\n /**\n * A default Blend Mode. You cannot change the blend mode of a\n * Spine Game Object.\n *\n * @name SpineGameObject#blendMode\n * @type {number}\n * @readonly\n * @since 3.19.0\n */\n this.blendMode = -1;\n\n this.setPosition(x, y);\n\n if (key)\n {\n this.setSkeleton(key, animationName, loop);\n }\n },\n\n /**\n * Overrides the default Game Object method and always returns true.\n * Rendering is decided in the renderer functions.\n *\n * @method SpineGameObject#willRender\n * @since 3.19.0\n *\n * @return {boolean} Always returns `true`.\n */\n willRender: function ()\n {\n return true;\n },\n\n /**\n * Set the Alpha level for the whole Skeleton of this Game Object.\n *\n * The alpha controls the opacity of the Game Object as it renders.\n *\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\n *\n * @method SpineGameObject#setAlpha\n * @since 3.19.0\n *\n * @param {number} [value=1] - The alpha value used for the whole Skeleton.\n *\n * @return {this} This Game Object instance.\n */\n setAlpha: function (value, slotName)\n {\n if (value === undefined) { value = 1; }\n\n if (slotName)\n {\n var slot = this.findSlot(slotName);\n\n if (slot)\n {\n slot.color.a = Clamp(value, 0, 1);\n }\n }\n else\n {\n this.alpha = value;\n }\n\n return this;\n },\n\n /**\n * The alpha value of the Skeleton.\n *\n * A value between 0 and 1.\n *\n * This is a global value, impacting the entire Skeleton, not just a region of it.\n *\n * @name SpineGameObject#alpha\n * @type {number}\n * @since 3.19.0\n */\n alpha: {\n\n get: function ()\n {\n return this.skeleton.color.a;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n if (this.skeleton)\n {\n this.skeleton.color.a = v;\n }\n\n if (v === 0)\n {\n this.renderFlags &= ~2;\n }\n else\n {\n this.renderFlags |= 2;\n }\n }\n\n },\n\n /**\n * The amount of red used when rendering the Skeleton.\n *\n * A value between 0 and 1.\n *\n * This is a global value, impacting the entire Skeleton, not just a region of it.\n *\n * @name SpineGameObject#red\n * @type {number}\n * @since 3.19.0\n */\n red: {\n\n get: function ()\n {\n return this.skeleton.color.r;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n if (this.skeleton)\n {\n this.skeleton.color.r = v;\n }\n }\n\n },\n\n /**\n * The amount of green used when rendering the Skeleton.\n *\n * A value between 0 and 1.\n *\n * This is a global value, impacting the entire Skeleton, not just a region of it.\n *\n * @name SpineGameObject#green\n * @type {number}\n * @since 3.19.0\n */\n green: {\n\n get: function ()\n {\n return this.skeleton.color.g;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n if (this.skeleton)\n {\n this.skeleton.color.g = v;\n }\n }\n\n },\n\n /**\n * The amount of blue used when rendering the Skeleton.\n *\n * A value between 0 and 1.\n *\n * This is a global value, impacting the entire Skeleton, not just a region of it.\n *\n * @name SpineGameObject#blue\n * @type {number}\n * @since 3.19.0\n */\n blue: {\n\n get: function ()\n {\n return this.skeleton.color.b;\n },\n\n set: function (value)\n {\n var v = Clamp(value, 0, 1);\n\n if (this.skeleton)\n {\n this.skeleton.color.b = v;\n }\n }\n\n },\n\n /**\n * Sets the color on the given attachment slot. Or, if no slot is given, on the whole skeleton.\n *\n * @method SpineGameObject#setColor\n * @since 3.19.0\n *\n * @param {integer} [color=0xffffff] - The color being applied to the Skeleton or named Slot. Set to white to disable any previously set color.\n * @param {string} [slotName] - The name of the slot to set the color on. If not give, will be set on the whole skeleton.\n *\n * @return {this} This Game Object instance.\n */\n setColor: function (color, slotName)\n {\n if (color === undefined) { color = 0xffffff; }\n\n var red = (color >> 16 & 0xFF) / 255;\n var green = (color >> 8 & 0xFF) / 255;\n var blue = (color & 0xFF) / 255;\n var alpha = (color > 16777215) ? (color >>> 24) / 255 : null;\n\n var target = this.skeleton;\n\n if (slotName)\n {\n var slot = this.findSlot(slotName);\n\n if (slot)\n {\n target = slot;\n }\n }\n\n target.color.r = red;\n target.color.g = green;\n target.color.b = blue;\n\n if (alpha !== null)\n {\n target.color.a = alpha;\n }\n\n return this;\n },\n\n /**\n * Sets this Game Object to use the given Skeleton based on the Atlas Data Key and a provided JSON object\n * that contains the Skeleton data.\n *\n * @method SpineGameObject#setSkeletonFromJSON\n * @since 3.19.0\n *\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\n * @param {object} skeletonJSON - The JSON data for the Skeleton.\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\n *\n * @return {this} This Game Object.\n */\n setSkeletonFromJSON: function (atlasDataKey, skeletonJSON, animationName, loop)\n {\n return this.setSkeleton(atlasDataKey, skeletonJSON, animationName, loop);\n },\n\n /**\n * Sets this Game Object to use the given Skeleton based on its cache key.\n *\n * Typically, once set, the Skeleton doesn't change. Instead, you change the skin,\n * or slot attachment, or any other property to adjust it.\n *\n * @method SpineGameObject#setSkeleton\n * @since 3.19.0\n *\n * @param {string} atlasDataKey - The key of the Spine data to use for this Skeleton.\n * @param {object} skeletonJSON - The JSON data for the Skeleton.\n * @param {string} [animationName] - Optional name of the animation to set on the Skeleton.\n * @param {boolean} [loop=false] - Should the animation, if set, loop or not?\n *\n * @return {this} This Game Object.\n */\n setSkeleton: function (atlasDataKey, animationName, loop, skeletonJSON)\n {\n if (this.state)\n {\n this.state.clearListeners();\n this.state.clearListenerNotifications();\n }\n\n var data = this.plugin.createSkeleton(atlasDataKey, skeletonJSON);\n\n this.skeletonData = data.skeletonData;\n\n this.preMultipliedAlpha = data.preMultipliedAlpha;\n\n var skeleton = data.skeleton;\n\n skeleton.setSkin();\n skeleton.setToSetupPose();\n\n this.skeleton = skeleton;\n\n // AnimationState\n data = this.plugin.createAnimationState(skeleton);\n\n if (this.state)\n {\n this.state.clearListeners();\n this.state.clearListenerNotifications();\n }\n\n this.state = data.state;\n this.stateData = data.stateData;\n\n this.state.addListener({\n event: this.onEvent.bind(this),\n complete: this.onComplete.bind(this),\n start: this.onStart.bind(this),\n end: this.onEnd.bind(this),\n dispose: this.onDispose.bind(this),\n interrupted: this.onInterrupted.bind(this)\n });\n\n if (animationName)\n {\n this.setAnimation(0, animationName, loop);\n }\n\n this.root = this.getRootBone();\n\n if (this.root)\n {\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\n }\n\n this.state.apply(skeleton);\n\n skeleton.updateCache();\n\n return this.updateSize();\n },\n\n /**\n * Internal event handler that emits the Spine onComplete event via this Game Object.\n *\n * @method SpineGameObject#onComplete\n * @fires SpinePluginEvents#COMPLETE\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n */\n onComplete: function (entry)\n {\n this.emit(SpineEvents.COMPLETE, entry);\n },\n\n /**\n * Internal event handler that emits the Spine onDispose event via this Game Object.\n *\n * @method SpineGameObject#onDispose\n * @fires SpinePluginEvents#DISPOSE\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n */\n onDispose: function (entry)\n {\n this.emit(SpineEvents.DISPOSE, entry);\n },\n\n /**\n * Internal event handler that emits the Spine onEnd event via this Game Object.\n *\n * @method SpineGameObject#onEnd\n * @fires SpinePluginEvents#END\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n */\n onEnd: function (entry)\n {\n this.emit(SpineEvents.END, entry);\n },\n\n /**\n * Internal event handler that emits the Spine Event event via this Game Object.\n *\n * @method SpineGameObject#onEvent\n * @fires SpinePluginEvents#EVENT\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n * @param {spine.Event} event - The Spine event.\n */\n onEvent: function (entry, event)\n {\n this.emit(SpineEvents.EVENT, entry, event);\n },\n\n /**\n * Internal event handler that emits the Spine onInterrupted event via this Game Object.\n *\n * @method SpineGameObject#onInterrupted\n * @fires SpinePluginEvents#INTERRUPTED\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n */\n onInterrupted: function (entry)\n {\n this.emit(SpineEvents.INTERRUPTED, entry);\n },\n\n /**\n * Internal event handler that emits the Spine onStart event via this Game Object.\n *\n * @method SpineGameObject#onStart\n * @fires SpinePluginEvents#START\n * @private\n * @since 3.19.0\n *\n * @param {any} entry - The event data from Spine.\n */\n onStart: function (entry)\n {\n this.emit(SpineEvents.START, entry);\n },\n\n /**\n * Refreshes the data about the current Skeleton.\n *\n * This will reset the rotation, position and size of the Skeleton to match this Game Object.\n *\n * Call this method if you need to access the Skeleton data directly, and it may have changed\n * recently.\n *\n * @method SpineGameObject#refresh\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n refresh: function ()\n {\n if (this.root)\n {\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\n this.root.rotation = RadToDeg(CounterClockwise(this.rotation)) + 90;\n }\n\n this.updateSize();\n\n this.skeleton.updateCache();\n\n return this;\n },\n\n /**\n * Sets the size of this Game Object.\n *\n * If no arguments are given it uses the current skeleton data dimensions.\n *\n * You can use this method to set a fixed size of this Game Object, such as for input detection,\n * when the skeleton data doesn't match what is required in-game.\n *\n * @method SpineGameObject#setSize\n * @since 3.19.0\n *\n * @param {number} [width] - The width of the Skeleton. If not given it defaults to the Skeleton Data width.\n * @param {number} [height] - The height of the Skeleton. If not given it defaults to the Skeleton Data height.\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\n *\n * @return {this} This Game Object.\n */\n setSize: function (width, height, offsetX, offsetY)\n {\n var skeleton = this.skeleton;\n\n if (width === undefined) { width = skeleton.data.width; }\n if (height === undefined) { height = skeleton.data.height; }\n if (offsetX === undefined) { offsetX = 0; }\n if (offsetY === undefined) { offsetY = 0; }\n\n this.width = width;\n this.height = height;\n\n this.displayOriginX = skeleton.x - offsetX;\n this.displayOriginY = skeleton.y - offsetY;\n\n return this;\n },\n\n /**\n * Sets the offset of this Game Object from the Skeleton position.\n *\n * You can use this method to adjust how the position of this Game Object relates to the Skeleton it is using.\n *\n * @method SpineGameObject#setOffset\n * @since 3.19.0\n *\n * @param {number} [offsetX=0] - The horizontal offset of the Skeleton from its x and y coordinate.\n * @param {number} [offsetY=0] - The vertical offset of the Skeleton from its x and y coordinate.\n *\n * @return {this} This Game Object.\n */\n setOffset: function (offsetX, offsetY)\n {\n var skeleton = this.skeleton;\n\n if (offsetX === undefined) { offsetX = 0; }\n if (offsetY === undefined) { offsetY = 0; }\n\n this.displayOriginX = skeleton.x - offsetX;\n this.displayOriginY = skeleton.y - offsetY;\n\n return this;\n },\n\n /**\n * Internal method that syncs all of the Game Object position and scale data to the Skeleton.\n * It then syncs the skeleton bounds back to this Game Object.\n *\n * This method is called automatically as needed internally, however, it's also exposed should\n * you require overriding the size settings.\n *\n * @method SpineGameObject#updateSize\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n updateSize: function ()\n {\n var skeleton = this.skeleton;\n var renderer = this.plugin.renderer;\n\n var height = renderer.height;\n\n var oldScaleX = this.scaleX;\n var oldScaleY = this.scaleY;\n\n skeleton.x = this.x;\n skeleton.y = height - this.y;\n skeleton.scaleX = 1;\n skeleton.scaleY = 1;\n\n skeleton.updateWorldTransform();\n\n var bounds = this.getBounds();\n\n this.width = bounds.size.x;\n this.height = bounds.size.y;\n\n this.displayOriginX = this.x - bounds.offset.x;\n this.displayOriginY = this.y - (height - (this.height + bounds.offset.y));\n\n skeleton.scaleX = oldScaleX;\n skeleton.scaleY = oldScaleY;\n\n skeleton.updateWorldTransform();\n\n return this;\n },\n\n /**\n * The horizontal scale of this Game Object, as applied to the Skeleton it is using.\n *\n * @name SpineGameObject#scaleX\n * @type {number}\n * @default 1\n * @since 3.19.0\n */\n scaleX: {\n\n get: function ()\n {\n return this._scaleX;\n },\n\n set: function (value)\n {\n this._scaleX = value;\n\n this.refresh();\n }\n\n },\n\n /**\n * The vertical scale of this Game Object, as applied to the Skeleton it is using.\n *\n * @name SpineGameObject#scaleY\n * @type {number}\n * @default 1\n * @since 3.19.0\n */\n scaleY: {\n\n get: function ()\n {\n return this._scaleY;\n },\n\n set: function (value)\n {\n this._scaleY = value;\n\n this.refresh();\n }\n\n },\n\n /**\n * Returns an array containing the names of all the bones in the Skeleton Data.\n *\n * @method SpineGameObject#getBoneList\n * @since 3.19.0\n *\n * @return {string[]} An array containing the names of all the bones in the Skeleton Data.\n */\n getBoneList: function ()\n {\n var output = [];\n\n var skeletonData = this.skeletonData;\n\n if (skeletonData)\n {\n for (var i = 0; i < skeletonData.bones.length; i++)\n {\n output.push(skeletonData.bones[i].name);\n }\n }\n\n return output;\n },\n\n /**\n * Returns an array containing the names of all the skins in the Skeleton Data.\n *\n * @method SpineGameObject#getSkinList\n * @since 3.19.0\n *\n * @return {string[]} An array containing the names of all the skins in the Skeleton Data.\n */\n getSkinList: function ()\n {\n var output = [];\n\n var skeletonData = this.skeletonData;\n\n if (skeletonData)\n {\n for (var i = 0; i < skeletonData.skins.length; i++)\n {\n output.push(skeletonData.skins[i].name);\n }\n }\n\n return output;\n },\n\n /**\n * Returns an array containing the names of all the slots in the Skeleton.\n *\n * @method SpineGameObject#getSlotList\n * @since 3.19.0\n *\n * @return {string[]} An array containing the names of all the slots in the Skeleton.\n */\n getSlotList: function ()\n {\n var output = [];\n\n var skeleton = this.skeleton;\n\n for (var i = 0; i < skeleton.slots.length; i++)\n {\n output.push(skeleton.slots[i].data.name);\n }\n\n return output;\n },\n\n /**\n * Returns an array containing the names of all the animations in the Skeleton Data.\n *\n * @method SpineGameObject#getAnimationList\n * @since 3.19.0\n *\n * @return {string[]} An array containing the names of all the animations in the Skeleton Data.\n */\n getAnimationList: function ()\n {\n var output = [];\n\n var skeletonData = this.skeletonData;\n\n if (skeletonData)\n {\n for (var i = 0; i < skeletonData.animations.length; i++)\n {\n output.push(skeletonData.animations[i].name);\n }\n }\n\n return output;\n },\n\n /**\n * Returns the current animation being played on the given track, if any.\n *\n * @method SpineGameObject#getCurrentAnimation\n * @since 3.19.0\n *\n * @param {integer} [trackIndex=0] - The track to return the current animation on.\n *\n * @return {?spine.Animation} The current Animation on the given track, or `undefined` if there is no current animation.\n */\n getCurrentAnimation: function (trackIndex)\n {\n if (trackIndex === undefined) { trackIndex = 0; }\n\n var current = this.state.getCurrent(trackIndex);\n\n if (current)\n {\n return current.animation;\n }\n },\n\n /**\n * Sets the current animation for a track, discarding any queued animations.\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\n *\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\n *\n * @method SpineGameObject#play\n * @fires SpinePluginEvents#START\n * @since 3.19.0\n *\n * @param {string} animationName - The string-based key of the animation to play.\n * @param {boolean} [loop=false] - Should the animation be looped when played?\n * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call.\n *\n * @return {this} This Game Object. If you need the TrackEntry, see `setAnimation` instead.\n */\n play: function (animationName, loop, ignoreIfPlaying)\n {\n this.setAnimation(0, animationName, loop, ignoreIfPlaying);\n\n return this;\n },\n\n /**\n * Sets the current animation for a track, discarding any queued animations.\n * If the formerly current track entry was never applied to a skeleton, it is replaced (not mixed from).\n *\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\n *\n * @method SpineGameObject#setAnimation\n * @fires SpinePluginEvents#START\n * @since 3.19.0\n *\n * @param {integer} trackIndex - The track index to play the animation on.\n * @param {string} animationName - The string-based key of the animation to play.\n * @param {boolean} [loop=false] - Should the animation be looped when played?\n * @param {boolean} [ignoreIfPlaying=false] - If the animation specified by the track index is already playing then ignore this call.\n *\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\n */\n setAnimation: function (trackIndex, animationName, loop, ignoreIfPlaying)\n {\n if (loop === undefined) { loop = false; }\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\n\n if (ignoreIfPlaying && this.state)\n {\n var currentTrack = this.state.getCurrent(trackIndex);\n\n if (currentTrack && currentTrack.animation.name === animationName && !currentTrack.isComplete())\n {\n return;\n }\n }\n\n if (this.findAnimation(animationName))\n {\n return this.state.setAnimation(trackIndex, animationName, loop);\n }\n },\n\n /**\n * Adds an animation to be played after the current or last queued animation for a track.\n * If the track is empty, it is equivalent to calling setAnimation.\n *\n * Animations are referenced by a unique string-based key, as defined in the Spine software.\n *\n * The delay is a float. If > 0, sets delay. If <= 0, the delay set is the duration of the previous\n * track entry minus any mix duration (from the AnimationStateData) plus the specified delay\n * (ie the mix ends at (delay = 0) or before (delay < 0) the previous track entry duration).\n * If the previous entry is looping, its next loop completion is used instead of its duration.\n *\n * @method SpineGameObject#addAnimation\n * @since 3.19.0\n *\n * @param {integer} trackIndex - The track index to add the animation to.\n * @param {string} animationName - The string-based key of the animation to add.\n * @param {boolean} [loop=false] - Should the animation be looped when played?\n * @param {integer} [delay=0] - A delay, in ms, before which this animation will start when played.\n *\n * @return {spine.TrackEntry} A track entry to allow further customization of animation playback.\n */\n addAnimation: function (trackIndex, animationName, loop, delay)\n {\n return this.state.addAnimation(trackIndex, animationName, loop, delay);\n },\n\n /**\n * Sets an empty animation for a track, discarding any queued animations, and sets the track\n * entry's mixDuration. An empty animation has no timelines and serves as a placeholder for mixing in or out.\n *\n * Mixing out is done by setting an empty animation with a mix duration using either setEmptyAnimation,\n * setEmptyAnimations, or addEmptyAnimation. Mixing to an empty animation causes the previous animation to be\n * applied less and less over the mix duration. Properties keyed in the previous animation transition to\n * the value from lower tracks or to the setup pose value if no lower tracks key the property.\n * A mix duration of 0 still mixes out over one frame.\n *\n * Mixing in is done by first setting an empty animation, then adding an animation using addAnimation\n * and on the returned track entry, set the mixDuration. Mixing from an empty animation causes the new\n * animation to be applied more and more over the mix duration. Properties keyed in the new animation\n * transition from the value from lower tracks or from the setup pose value if no lower tracks key the\n * property to the value keyed in the new animation.\n *\n * @method SpineGameObject#setEmptyAnimation\n * @since 3.19.0\n *\n * @param {integer} trackIndex - The track index to add the animation to.\n * @param {integer} [mixDuration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\n *\n * @return {spine.TrackEntry} The returned Track Entry.\n */\n setEmptyAnimation: function (trackIndex, mixDuration)\n {\n return this.state.setEmptyAnimation(trackIndex, mixDuration);\n },\n\n /**\n * Removes all animations from the track, leaving skeletons in their current pose.\n *\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\n * rather than leaving them in their current pose.\n *\n * @method SpineGameObject#clearTrack\n * @since 3.19.0\n *\n * @param {integer} trackIndex - The track index to add the animation to.\n *\n * @return {this} This Game Object.\n */\n clearTrack: function (trackIndex)\n {\n this.state.clearTrack(trackIndex);\n\n return this;\n },\n\n /**\n * Removes all animations from all tracks, leaving skeletons in their current pose.\n *\n * It may be desired to use setEmptyAnimation to mix the skeletons back to the setup pose,\n * rather than leaving them in their current pose.\n *\n * @method SpineGameObject#clearTracks\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n clearTracks: function ()\n {\n this.state.clearTracks();\n\n return this;\n },\n\n /**\n * Sets the skin used to look up attachments before looking in the defaultSkin.\n *\n * Attachments from the new skin are attached if the corresponding attachment from the\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\n * attached from the new skin.\n *\n * After changing the skin, the visible attachments can be reset to those attached in the\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\n * or show attachments from the new skin.\n *\n * @method SpineGameObject#setSkinByName\n * @since 3.19.0\n *\n * @param {string} skinName - The name of the skin to set.\n *\n * @return {this} This Game Object.\n */\n setSkinByName: function (skinName)\n {\n var skeleton = this.skeleton;\n\n skeleton.setSkinByName(skinName);\n\n skeleton.setSlotsToSetupPose();\n\n this.state.apply(skeleton);\n\n return this;\n },\n\n /**\n * Sets the skin used to look up attachments before looking in the defaultSkin.\n *\n * Attachments from the new skin are attached if the corresponding attachment from the\n * old skin was attached. If there was no old skin, each slot's setup mode attachment is\n * attached from the new skin.\n *\n * After changing the skin, the visible attachments can be reset to those attached in the\n * setup pose by calling setSlotsToSetupPose. Also, often apply is called before the next time\n * the skeleton is rendered to allow any attachment keys in the current animation(s) to hide\n * or show attachments from the new skin.\n *\n * @method SpineGameObject#setSkin\n * @since 3.19.0\n *\n * @param {?spine.Skin} newSkin - The Skin to set. May be `null`.\n *\n * @return {this} This Game Object.\n */\n setSkin: function (newSkin)\n {\n var skeleton = this.skeleton;\n\n skeleton.setSkin(newSkin);\n\n skeleton.setSlotsToSetupPose();\n\n this.state.apply(skeleton);\n\n return this;\n },\n\n /**\n * Sets the mix duration when changing from the specified animation to the other.\n *\n * @method SpineGameObject#setMix\n * @since 3.19.0\n *\n * @param {string} fromName - The animation to mix from.\n * @param {string} toName - The animation to mix to.\n * @param {number} [duration] - Seconds for mixing from the previous animation to this animation. Defaults to the value provided by AnimationStateData getMix based on the animation before this animation (if any).\n *\n * @return {this} This Game Object.\n */\n setMix: function (fromName, toName, duration)\n {\n this.stateData.setMix(fromName, toName, duration);\n\n return this;\n },\n\n /**\n * Finds an attachment by looking in the skin and defaultSkin using the slot\n * index and attachment name. First the skin is checked and if the attachment was not found,\n * the default skin is checked.\n *\n * @method SpineGameObject#getAttachment\n * @since 3.19.0\n *\n * @param {integer} slotIndex - The slot index to search.\n * @param {string} attachmentName - The attachment name to look for.\n *\n * @return {?spine.Attachment} The Attachment, if found. May be null.\n */\n getAttachment: function (slotIndex, attachmentName)\n {\n return this.skeleton.getAttachment(slotIndex, attachmentName);\n },\n\n /**\n * Finds an attachment by looking in the skin and defaultSkin using the slot name and attachment name.\n *\n * @method SpineGameObject#getAttachmentByName\n * @since 3.19.0\n *\n * @param {string} slotName - The slot name to search.\n * @param {string} attachmentName - The attachment name to look for.\n *\n * @return {?spine.Attachment} The Attachment, if found. May be null.\n */\n getAttachmentByName: function (slotName, attachmentName)\n {\n return this.skeleton.getAttachmentByName(slotName, attachmentName);\n },\n\n /**\n * A convenience method to set an attachment by finding the slot with findSlot,\n * finding the attachment with getAttachment, then setting the slot's attachment.\n *\n * @method SpineGameObject#setAttachment\n * @since 3.19.0\n *\n * @param {string} slotName - The slot name to add the attachment to.\n * @param {string} attachmentName - The attachment name to add.\n *\n * @return {this} This Game Object.\n */\n setAttachment: function (slotName, attachmentName)\n {\n if (Array.isArray(slotName) && Array.isArray(attachmentName) && slotName.length === attachmentName.length)\n {\n for (var i = 0; i < slotName.length; i++)\n {\n this.skeleton.setAttachment(slotName[i], attachmentName[i]);\n }\n }\n else\n {\n this.skeleton.setAttachment(slotName, attachmentName);\n }\n\n return this;\n },\n\n /**\n * Sets the bones, constraints, slots, and draw order to their setup pose values.\n *\n * @method SpineGameObject#setToSetupPose\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n setToSetupPose: function ()\n {\n this.skeleton.setToSetupPose();\n\n return this;\n },\n\n /**\n * Sets the slots and draw order to their setup pose values.\n *\n * @method SpineGameObject#setSlotsToSetupPose\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n setSlotsToSetupPose: function ()\n {\n this.skeleton.setSlotsToSetupPose();\n\n return this;\n },\n\n /**\n * Sets the bones and constraints to their setup pose values.\n *\n * @method SpineGameObject#setBonesToSetupPose\n * @since 3.19.0\n *\n * @return {this} This Game Object.\n */\n setBonesToSetupPose: function ()\n {\n this.skeleton.setBonesToSetupPose();\n\n return this;\n },\n\n /**\n * Gets the root bone, or null.\n *\n * @method SpineGameObject#getRootBone\n * @since 3.19.0\n *\n * @return {spine.Bone} The root bone, or null.\n */\n getRootBone: function ()\n {\n return this.skeleton.getRootBone();\n },\n\n /**\n * Takes a Bone object and a position in world space and rotates the Bone so it is angled\n * towards the given position. You can set an optional angle offset, should the bone be\n * designed at a specific angle already. You can also set a minimum and maximum range for the angle.\n *\n * @method SpineGameObject#angleBoneToXY\n * @since 3.19.0\n *\n * @param {spine.Bone} bone - The bone to rotate towards the world position.\n * @param {number} worldX - The world x coordinate to rotate the bone towards.\n * @param {number} worldY - The world y coordinate to rotate the bone towards.\n * @param {number} [offset=0] - An offset to add to the rotation angle.\n * @param {number} [minAngle=0] - The minimum range of the rotation angle.\n * @param {number} [maxAngle=360] - The maximum range of the rotation angle.\n *\n * @return {this} This Game Object.\n */\n angleBoneToXY: function (bone, worldX, worldY, offset, minAngle, maxAngle)\n {\n if (offset === undefined) { offset = 0; }\n if (minAngle === undefined) { minAngle = 0; }\n if (maxAngle === undefined) { maxAngle = 360; }\n\n var renderer = this.plugin.renderer;\n var height = renderer.height;\n\n var angle = CounterClockwise(AngleBetween(bone.worldX, height - bone.worldY, worldX, worldY) + DegToRad(offset));\n\n bone.rotation = Clamp(RadToDeg(angle), minAngle, maxAngle);\n\n return this;\n },\n\n /**\n * Finds a bone by comparing each bone's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findBone\n * @since 3.19.0\n *\n * @param {string} boneName - The name of the bone to find.\n *\n * @return {spine.Bone} The bone, or null.\n */\n findBone: function (boneName)\n {\n return this.skeleton.findBone(boneName);\n },\n\n /**\n * Finds the index of a bone by comparing each bone's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findBoneIndex\n * @since 3.19.0\n *\n * @param {string} boneName - The name of the bone to find.\n *\n * @return {integer} The bone index. Or -1 if the bone was not found.\n */\n findBoneIndex: function (boneName)\n {\n return this.skeleton.findBoneIndex(boneName);\n },\n\n /**\n * Finds a slot by comparing each slot's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findSlot\n * @since 3.19.0\n *\n * @param {string} slotName - The name of the slot to find.\n *\n * @return {spine.Slot} The Slot. May be null.\n */\n findSlot: function (slotName)\n {\n return this.skeleton.findSlot(slotName);\n },\n\n /**\n * Finds the index of a slot by comparing each slot's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findSlotIndex\n * @since 3.19.0\n *\n * @param {string} slotName - The name of the slot to find.\n *\n * @return {integer} The slot index. Or -1 if the Slot was not found.\n */\n findSlotIndex: function (slotName)\n {\n return this.skeleton.findSlotIndex(slotName);\n },\n\n /**\n * Finds a skin by comparing each skin's name. It is more efficient to cache the results of\n * this method than to call it multiple times.\n *\n * @method SpineGameObject#findSkin\n * @since 3.19.0\n *\n * @param {string} skinName - The name of the skin to find.\n *\n * @return {spine.Skin} The Skin. May be null.\n */\n findSkin: function (skinName)\n {\n return this.skeletonData.findSkin(skinName);\n },\n\n /**\n * Finds an event by comparing each events's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findEvent\n * @since 3.19.0\n *\n * @param {string} eventDataName - The name of the event to find.\n *\n * @return {spine.EventData} The Event Data. May be null.\n */\n findEvent: function (eventDataName)\n {\n return this.skeletonData.findEvent(eventDataName);\n },\n\n /**\n * Finds an animation by comparing each animation's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findAnimation\n * @since 3.19.0\n *\n * @param {string} animationName - The name of the animation to find.\n *\n * @return {spine.Animation} The Animation. May be null.\n */\n findAnimation: function (animationName)\n {\n return this.skeletonData.findAnimation(animationName);\n },\n\n /**\n * Finds an IK constraint by comparing each IK constraint's name. It is more efficient to cache the results\n * of this method than to call it multiple times.\n *\n * @method SpineGameObject#findIkConstraint\n * @since 3.19.0\n *\n * @param {string} constraintName - The name of the constraint to find.\n *\n * @return {spine.IkConstraintData} The IK constraint. May be null.\n */\n findIkConstraint: function (constraintName)\n {\n return this.skeletonData.findIkConstraint(constraintName);\n },\n\n /**\n * Finds an transform constraint by comparing each transform constraint's name.\n * It is more efficient to cache the results of this method than to call it multiple times.\n *\n * @method SpineGameObject#findTransformConstraint\n * @since 3.19.0\n *\n * @param {string} constraintName - The name of the constraint to find.\n *\n * @return {spine.TransformConstraintData} The transform constraint. May be null.\n */\n findTransformConstraint: function (constraintName)\n {\n return this.skeletonData.findTransformConstraint(constraintName);\n },\n\n /**\n * Finds a path constraint by comparing each path constraint's name.\n * It is more efficient to cache the results of this method than to call it multiple times.\n *\n * @method SpineGameObject#findPathConstraint\n * @since 3.19.0\n *\n * @param {string} constraintName - The name of the constraint to find.\n *\n * @return {spine.PathConstraintData} The path constraint. May be null.\n */\n findPathConstraint: function (constraintName)\n {\n return this.skeletonData.findPathConstraint(constraintName);\n },\n\n /**\n * Finds the index of a path constraint by comparing each path constraint's name.\n * It is more efficient to cache the results of this method than to call it multiple times.\n *\n * @method SpineGameObject#findPathConstraintIndex\n * @since 3.19.0\n *\n * @param {string} constraintName - The name of the constraint to find.\n *\n * @return {integer} The constraint index. Or -1 if the constraint was not found.\n */\n findPathConstraintIndex: function (constraintName)\n {\n return this.skeletonData.findPathConstraintIndex(constraintName);\n },\n\n /**\n * Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.\n *\n * The returned object contains two properties: `offset` and `size`:\n *\n * `offset` - The distance from the skeleton origin to the bottom left corner of the AABB.\n * `size` - The width and height of the AABB.\n *\n * @method SpineGameObject#getBounds\n * @since 3.19.0\n *\n * @return {any} The bounds object.\n */\n getBounds: function ()\n {\n return this.plugin.getBounds(this.skeleton);\n },\n\n /**\n * Internal update handler.\n *\n * @method SpineGameObject#preUpdate\n * @protected\n * @since 3.19.0\n *\n * @param {number} time - The current timestamp.\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\n */\n preUpdate: function (time, delta)\n {\n var skeleton = this.skeleton;\n\n this.state.update((delta / 1000) * this.timeScale);\n\n this.state.apply(skeleton);\n },\n\n /**\n * Internal destroy handler, called as part of the destroy process.\n *\n * @method SpineGameObject#preDestroy\n * @protected\n * @since 3.19.0\n */\n preDestroy: function ()\n {\n if (this.state)\n {\n this.state.clearListeners();\n this.state.clearListenerNotifications();\n }\n\n this.plugin = null;\n\n this.skeleton = null;\n this.skeletonData = null;\n\n this.state = null;\n this.stateData = null;\n }\n\n});\n\nmodule.exports = SpineGameObject;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar RadToDeg = require('../../../../src/math/RadToDeg');\nvar Wrap = require('../../../../src/math/Wrap');\n\n/**\n * Renders this Game Object with the Canvas Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method SpineGameObject#renderCanvas\n * @since 3.19.0\n * @private\n *\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar SpineGameObjectCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\n{\n var context = renderer.currentContext;\n\n var plugin = src.plugin;\n var skeleton = src.skeleton;\n var skeletonRenderer = plugin.skeletonRenderer;\n\n var GameObjectRenderMask = 15;\n\n var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)));\n\n if (!skeleton || !willRender)\n {\n return;\n }\n\n var camMatrix = renderer._tempMatrix1;\n var spriteMatrix = renderer._tempMatrix2;\n var calcMatrix = renderer._tempMatrix3;\n\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));\n\n camMatrix.copyFrom(camera.matrix);\n\n if (parentMatrix)\n {\n // Multiply the camera by the parent matrix\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\n\n // Undo the camera scroll\n spriteMatrix.e = src.x;\n spriteMatrix.f = src.y;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n }\n else\n {\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n }\n\n skeleton.x = calcMatrix.tx;\n skeleton.y = calcMatrix.ty;\n\n skeleton.scaleX = calcMatrix.scaleX;\n\n // Inverse or we get upside-down skeletons\n skeleton.scaleY = calcMatrix.scaleY * -1;\n\n if (src.scaleX < 0)\n {\n skeleton.scaleX *= -1;\n\n src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);\n }\n else\n {\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\n }\n\n if (src.scaleY < 0)\n {\n skeleton.scaleY *= -1;\n\n if (src.scaleX < 0)\n {\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n else\n {\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n }\n\n if (camera.renderToTexture)\n {\n skeleton.y = calcMatrix.ty;\n skeleton.scaleY *= -1;\n }\n\n // Add autoUpdate option\n skeleton.updateWorldTransform();\n\n skeletonRenderer.ctx = context;\n skeletonRenderer.debugRendering = (plugin.drawDebug || src.drawDebug);\n\n context.save();\n\n skeletonRenderer.draw(skeleton);\n\n context.restore();\n};\n\nmodule.exports = SpineGameObjectCanvasRenderer;\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar renderWebGL = require('../../../../src/utils/NOOP');\nvar renderCanvas = require('../../../../src/utils/NOOP');\n\nif (typeof WEBGL_RENDERER)\n{\n renderWebGL = require('./SpineGameObjectWebGLRenderer');\n}\n\nif (typeof CANVAS_RENDERER)\n{\n renderCanvas = require('./SpineGameObjectCanvasRenderer');\n}\n\nmodule.exports = {\n\n renderWebGL: renderWebGL,\n renderCanvas: renderCanvas\n\n};\n","/**\n * @author Richard Davey \n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\n */\n\nvar CounterClockwise = require('../../../../src/math/angle/CounterClockwise');\nvar RadToDeg = require('../../../../src/math/RadToDeg');\nvar Wrap = require('../../../../src/math/Wrap');\n\n/**\n * Renders this Game Object with the WebGL Renderer to the given Camera.\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\n * This method should not be called directly. It is a utility function of the Render module.\n *\n * @method SpineGameObject#renderWebGL\n * @since 3.19.0\n * @private\n *\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\n * @param {SpineGameObject} src - The Game Object being rendered in this call.\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\n */\nvar SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\n{\n var plugin = src.plugin;\n var skeleton = src.skeleton;\n var childAlpha = skeleton.color.a;\n var sceneRenderer = plugin.sceneRenderer;\n\n var GameObjectRenderMask = 15;\n\n var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || childAlpha === 0);\n\n if (!skeleton || !willRender)\n {\n // If there is already a batch running, and the next type isn't a Spine object, or this is the end, we need to close it\n\n if (sceneRenderer.batcher.isDrawing && (!renderer.nextTypeMatch || renderer.finalType))\n {\n // The next object in the display list is not a Spine object, so we end the batch\n sceneRenderer.end();\n\n renderer.rebindPipeline();\n }\n\n if (!renderer.finalType)\n {\n // Reset the current type\n renderer.currentType = '';\n }\n\n return;\n }\n\n if (renderer.newType)\n {\n // flush + clear previous pipeline if this is a new type\n renderer.clearPipeline();\n }\n\n var camMatrix = renderer._tempMatrix1;\n var spriteMatrix = renderer._tempMatrix2;\n var calcMatrix = renderer._tempMatrix3;\n\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));\n\n camMatrix.copyFrom(camera.matrix);\n\n if (parentMatrix)\n {\n // Multiply the camera by the parent matrix\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\n\n // Undo the camera scroll\n spriteMatrix.e = src.x;\n spriteMatrix.f = src.y;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n }\n else\n {\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\n\n // Multiply by the Sprite matrix, store result in calcMatrix\n camMatrix.multiply(spriteMatrix, calcMatrix);\n }\n\n var viewportHeight = renderer.height;\n\n skeleton.x = calcMatrix.tx;\n skeleton.y = viewportHeight - calcMatrix.ty;\n\n skeleton.scaleX = calcMatrix.scaleX;\n skeleton.scaleY = calcMatrix.scaleY;\n\n if (src.scaleX < 0)\n {\n skeleton.scaleX *= -1;\n\n src.root.rotation = RadToDeg(calcMatrix.rotationNormalized);\n }\n else\n {\n // +90 degrees to account for the difference in Spine vs. Phaser rotation\n src.root.rotation = Wrap(RadToDeg(CounterClockwise(calcMatrix.rotationNormalized)) + 90, 0, 360);\n }\n\n if (src.scaleY < 0)\n {\n skeleton.scaleY *= -1;\n\n if (src.scaleX < 0)\n {\n src.root.rotation -= (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n else\n {\n src.root.rotation += (RadToDeg(calcMatrix.rotationNormalized) * 2);\n }\n }\n\n if (camera.renderToTexture || renderer.currentFramebuffer !== null)\n {\n skeleton.y = calcMatrix.ty;\n skeleton.scaleY *= -1;\n }\n\n // Add autoUpdate option\n skeleton.updateWorldTransform();\n\n if (renderer.newType)\n {\n sceneRenderer.begin();\n }\n\n // Draw the current skeleton\n sceneRenderer.drawSkeleton(skeleton, src.preMultipliedAlpha);\n\n if (plugin.drawDebug || src.drawDebug)\n {\n // Because if we don't, the bones render positions are completely wrong (*sigh*)\n var oldX = skeleton.x;\n var oldY = skeleton.y;\n\n skeleton.x = 0;\n skeleton.y = 0;\n\n sceneRenderer.drawSkeletonDebug(skeleton, src.preMultipliedAlpha);\n\n skeleton.x = oldX;\n skeleton.y = oldY;\n }\n\n if (!renderer.nextTypeMatch)\n {\n // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch\n sceneRenderer.end();\n\n // And rebind the previous pipeline\n renderer.rebindPipeline();\n }\n};\n\nmodule.exports = SpineGameObjectWebGLRenderer;\n","/*** IMPORTS FROM imports-loader ***/\n\n(function() {\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar spine;\n(function (spine) {\n var Animation = (function () {\n function Animation(name, timelines, duration) {\n if (name == null)\n throw new Error(\"name cannot be null.\");\n if (timelines == null)\n throw new Error(\"timelines cannot be null.\");\n this.name = name;\n this.timelines = timelines;\n this.timelineIds = [];\n for (var i = 0; i < timelines.length; i++)\n this.timelineIds[timelines[i].getPropertyId()] = true;\n this.duration = duration;\n }\n Animation.prototype.hasTimeline = function (id) {\n return this.timelineIds[id] == true;\n };\n Animation.prototype.apply = function (skeleton, lastTime, time, loop, events, alpha, blend, direction) {\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n if (loop && this.duration != 0) {\n time %= this.duration;\n if (lastTime > 0)\n lastTime %= this.duration;\n }\n var timelines = this.timelines;\n for (var i = 0, n = timelines.length; i < n; i++)\n timelines[i].apply(skeleton, lastTime, time, events, alpha, blend, direction);\n };\n Animation.binarySearch = function (values, target, step) {\n if (step === void 0) { step = 1; }\n var low = 0;\n var high = values.length / step - 2;\n if (high == 0)\n return step;\n var current = high >>> 1;\n while (true) {\n if (values[(current + 1) * step] <= target)\n low = current + 1;\n else\n high = current;\n if (low == high)\n return (low + 1) * step;\n current = (low + high) >>> 1;\n }\n };\n Animation.linearSearch = function (values, target, step) {\n for (var i = 0, last = values.length - step; i <= last; i += step)\n if (values[i] > target)\n return i;\n return -1;\n };\n return Animation;\n }());\n spine.Animation = Animation;\n var MixBlend;\n (function (MixBlend) {\n MixBlend[MixBlend[\"setup\"] = 0] = \"setup\";\n MixBlend[MixBlend[\"first\"] = 1] = \"first\";\n MixBlend[MixBlend[\"replace\"] = 2] = \"replace\";\n MixBlend[MixBlend[\"add\"] = 3] = \"add\";\n })(MixBlend = spine.MixBlend || (spine.MixBlend = {}));\n var MixDirection;\n (function (MixDirection) {\n MixDirection[MixDirection[\"mixIn\"] = 0] = \"mixIn\";\n MixDirection[MixDirection[\"mixOut\"] = 1] = \"mixOut\";\n })(MixDirection = spine.MixDirection || (spine.MixDirection = {}));\n var TimelineType;\n (function (TimelineType) {\n TimelineType[TimelineType[\"rotate\"] = 0] = \"rotate\";\n TimelineType[TimelineType[\"translate\"] = 1] = \"translate\";\n TimelineType[TimelineType[\"scale\"] = 2] = \"scale\";\n TimelineType[TimelineType[\"shear\"] = 3] = \"shear\";\n TimelineType[TimelineType[\"attachment\"] = 4] = \"attachment\";\n TimelineType[TimelineType[\"color\"] = 5] = \"color\";\n TimelineType[TimelineType[\"deform\"] = 6] = \"deform\";\n TimelineType[TimelineType[\"event\"] = 7] = \"event\";\n TimelineType[TimelineType[\"drawOrder\"] = 8] = \"drawOrder\";\n TimelineType[TimelineType[\"ikConstraint\"] = 9] = \"ikConstraint\";\n TimelineType[TimelineType[\"transformConstraint\"] = 10] = \"transformConstraint\";\n TimelineType[TimelineType[\"pathConstraintPosition\"] = 11] = \"pathConstraintPosition\";\n TimelineType[TimelineType[\"pathConstraintSpacing\"] = 12] = \"pathConstraintSpacing\";\n TimelineType[TimelineType[\"pathConstraintMix\"] = 13] = \"pathConstraintMix\";\n TimelineType[TimelineType[\"twoColor\"] = 14] = \"twoColor\";\n })(TimelineType = spine.TimelineType || (spine.TimelineType = {}));\n var CurveTimeline = (function () {\n function CurveTimeline(frameCount) {\n if (frameCount <= 0)\n throw new Error(\"frameCount must be > 0: \" + frameCount);\n this.curves = spine.Utils.newFloatArray((frameCount - 1) * CurveTimeline.BEZIER_SIZE);\n }\n CurveTimeline.prototype.getFrameCount = function () {\n return this.curves.length / CurveTimeline.BEZIER_SIZE + 1;\n };\n CurveTimeline.prototype.setLinear = function (frameIndex) {\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.LINEAR;\n };\n CurveTimeline.prototype.setStepped = function (frameIndex) {\n this.curves[frameIndex * CurveTimeline.BEZIER_SIZE] = CurveTimeline.STEPPED;\n };\n CurveTimeline.prototype.getCurveType = function (frameIndex) {\n var index = frameIndex * CurveTimeline.BEZIER_SIZE;\n if (index == this.curves.length)\n return CurveTimeline.LINEAR;\n var type = this.curves[index];\n if (type == CurveTimeline.LINEAR)\n return CurveTimeline.LINEAR;\n if (type == CurveTimeline.STEPPED)\n return CurveTimeline.STEPPED;\n return CurveTimeline.BEZIER;\n };\n CurveTimeline.prototype.setCurve = function (frameIndex, cx1, cy1, cx2, cy2) {\n var tmpx = (-cx1 * 2 + cx2) * 0.03, tmpy = (-cy1 * 2 + cy2) * 0.03;\n var dddfx = ((cx1 - cx2) * 3 + 1) * 0.006, dddfy = ((cy1 - cy2) * 3 + 1) * 0.006;\n var ddfx = tmpx * 2 + dddfx, ddfy = tmpy * 2 + dddfy;\n var dfx = cx1 * 0.3 + tmpx + dddfx * 0.16666667, dfy = cy1 * 0.3 + tmpy + dddfy * 0.16666667;\n var i = frameIndex * CurveTimeline.BEZIER_SIZE;\n var curves = this.curves;\n curves[i++] = CurveTimeline.BEZIER;\n var x = dfx, y = dfy;\n for (var n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\n curves[i] = x;\n curves[i + 1] = y;\n dfx += ddfx;\n dfy += ddfy;\n ddfx += dddfx;\n ddfy += dddfy;\n x += dfx;\n y += dfy;\n }\n };\n CurveTimeline.prototype.getCurvePercent = function (frameIndex, percent) {\n percent = spine.MathUtils.clamp(percent, 0, 1);\n var curves = this.curves;\n var i = frameIndex * CurveTimeline.BEZIER_SIZE;\n var type = curves[i];\n if (type == CurveTimeline.LINEAR)\n return percent;\n if (type == CurveTimeline.STEPPED)\n return 0;\n i++;\n var x = 0;\n for (var start = i, n = i + CurveTimeline.BEZIER_SIZE - 1; i < n; i += 2) {\n x = curves[i];\n if (x >= percent) {\n var prevX = void 0, prevY = void 0;\n if (i == start) {\n prevX = 0;\n prevY = 0;\n }\n else {\n prevX = curves[i - 2];\n prevY = curves[i - 1];\n }\n return prevY + (curves[i + 1] - prevY) * (percent - prevX) / (x - prevX);\n }\n }\n var y = curves[i - 1];\n return y + (1 - y) * (percent - x) / (1 - x);\n };\n CurveTimeline.LINEAR = 0;\n CurveTimeline.STEPPED = 1;\n CurveTimeline.BEZIER = 2;\n CurveTimeline.BEZIER_SIZE = 10 * 2 - 1;\n return CurveTimeline;\n }());\n spine.CurveTimeline = CurveTimeline;\n var RotateTimeline = (function (_super) {\n __extends(RotateTimeline, _super);\n function RotateTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount << 1);\n return _this;\n }\n RotateTimeline.prototype.getPropertyId = function () {\n return (TimelineType.rotate << 24) + this.boneIndex;\n };\n RotateTimeline.prototype.setFrame = function (frameIndex, time, degrees) {\n frameIndex <<= 1;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + RotateTimeline.ROTATION] = degrees;\n };\n RotateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var frames = this.frames;\n var bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n bone.rotation = bone.data.rotation;\n return;\n case MixBlend.first:\n var r_1 = bone.data.rotation - bone.rotation;\n bone.rotation += (r_1 - (16384 - ((16384.499999999996 - r_1 / 360) | 0)) * 360) * alpha;\n }\n return;\n }\n if (time >= frames[frames.length - RotateTimeline.ENTRIES]) {\n var r_2 = frames[frames.length + RotateTimeline.PREV_ROTATION];\n switch (blend) {\n case MixBlend.setup:\n bone.rotation = bone.data.rotation + r_2 * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n r_2 += bone.data.rotation - bone.rotation;\n r_2 -= (16384 - ((16384.499999999996 - r_2 / 360) | 0)) * 360;\n case MixBlend.add:\n bone.rotation += r_2 * alpha;\n }\n return;\n }\n var frame = Animation.binarySearch(frames, time, RotateTimeline.ENTRIES);\n var prevRotation = frames[frame + RotateTimeline.PREV_ROTATION];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + RotateTimeline.PREV_TIME] - frameTime));\n var r = frames[frame + RotateTimeline.ROTATION] - prevRotation;\n r = prevRotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * percent;\n switch (blend) {\n case MixBlend.setup:\n bone.rotation = bone.data.rotation + (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n r += bone.data.rotation - bone.rotation;\n case MixBlend.add:\n bone.rotation += (r - (16384 - ((16384.499999999996 - r / 360) | 0)) * 360) * alpha;\n }\n };\n RotateTimeline.ENTRIES = 2;\n RotateTimeline.PREV_TIME = -2;\n RotateTimeline.PREV_ROTATION = -1;\n RotateTimeline.ROTATION = 1;\n return RotateTimeline;\n }(CurveTimeline));\n spine.RotateTimeline = RotateTimeline;\n var TranslateTimeline = (function (_super) {\n __extends(TranslateTimeline, _super);\n function TranslateTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * TranslateTimeline.ENTRIES);\n return _this;\n }\n TranslateTimeline.prototype.getPropertyId = function () {\n return (TimelineType.translate << 24) + this.boneIndex;\n };\n TranslateTimeline.prototype.setFrame = function (frameIndex, time, x, y) {\n frameIndex *= TranslateTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + TranslateTimeline.X] = x;\n this.frames[frameIndex + TranslateTimeline.Y] = y;\n };\n TranslateTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var frames = this.frames;\n var bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n bone.x = bone.data.x;\n bone.y = bone.data.y;\n return;\n case MixBlend.first:\n bone.x += (bone.data.x - bone.x) * alpha;\n bone.y += (bone.data.y - bone.y) * alpha;\n }\n return;\n }\n var x = 0, y = 0;\n if (time >= frames[frames.length - TranslateTimeline.ENTRIES]) {\n x = frames[frames.length + TranslateTimeline.PREV_X];\n y = frames[frames.length + TranslateTimeline.PREV_Y];\n }\n else {\n var frame = Animation.binarySearch(frames, time, TranslateTimeline.ENTRIES);\n x = frames[frame + TranslateTimeline.PREV_X];\n y = frames[frame + TranslateTimeline.PREV_Y];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / TranslateTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TranslateTimeline.PREV_TIME] - frameTime));\n x += (frames[frame + TranslateTimeline.X] - x) * percent;\n y += (frames[frame + TranslateTimeline.Y] - y) * percent;\n }\n switch (blend) {\n case MixBlend.setup:\n bone.x = bone.data.x + x * alpha;\n bone.y = bone.data.y + y * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n bone.x += (bone.data.x + x - bone.x) * alpha;\n bone.y += (bone.data.y + y - bone.y) * alpha;\n break;\n case MixBlend.add:\n bone.x += x * alpha;\n bone.y += y * alpha;\n }\n };\n TranslateTimeline.ENTRIES = 3;\n TranslateTimeline.PREV_TIME = -3;\n TranslateTimeline.PREV_X = -2;\n TranslateTimeline.PREV_Y = -1;\n TranslateTimeline.X = 1;\n TranslateTimeline.Y = 2;\n return TranslateTimeline;\n }(CurveTimeline));\n spine.TranslateTimeline = TranslateTimeline;\n var ScaleTimeline = (function (_super) {\n __extends(ScaleTimeline, _super);\n function ScaleTimeline(frameCount) {\n return _super.call(this, frameCount) || this;\n }\n ScaleTimeline.prototype.getPropertyId = function () {\n return (TimelineType.scale << 24) + this.boneIndex;\n };\n ScaleTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var frames = this.frames;\n var bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n bone.scaleX = bone.data.scaleX;\n bone.scaleY = bone.data.scaleY;\n return;\n case MixBlend.first:\n bone.scaleX += (bone.data.scaleX - bone.scaleX) * alpha;\n bone.scaleY += (bone.data.scaleY - bone.scaleY) * alpha;\n }\n return;\n }\n var x = 0, y = 0;\n if (time >= frames[frames.length - ScaleTimeline.ENTRIES]) {\n x = frames[frames.length + ScaleTimeline.PREV_X] * bone.data.scaleX;\n y = frames[frames.length + ScaleTimeline.PREV_Y] * bone.data.scaleY;\n }\n else {\n var frame = Animation.binarySearch(frames, time, ScaleTimeline.ENTRIES);\n x = frames[frame + ScaleTimeline.PREV_X];\n y = frames[frame + ScaleTimeline.PREV_Y];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / ScaleTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ScaleTimeline.PREV_TIME] - frameTime));\n x = (x + (frames[frame + ScaleTimeline.X] - x) * percent) * bone.data.scaleX;\n y = (y + (frames[frame + ScaleTimeline.Y] - y) * percent) * bone.data.scaleY;\n }\n if (alpha == 1) {\n if (blend == MixBlend.add) {\n bone.scaleX += x - bone.data.scaleX;\n bone.scaleY += y - bone.data.scaleY;\n }\n else {\n bone.scaleX = x;\n bone.scaleY = y;\n }\n }\n else {\n var bx = 0, by = 0;\n if (direction == MixDirection.mixOut) {\n switch (blend) {\n case MixBlend.setup:\n bx = bone.data.scaleX;\n by = bone.data.scaleY;\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bx) * alpha;\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - by) * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n bx = bone.scaleX;\n by = bone.scaleY;\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bx) * alpha;\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - by) * alpha;\n break;\n case MixBlend.add:\n bx = bone.scaleX;\n by = bone.scaleY;\n bone.scaleX = bx + (Math.abs(x) * spine.MathUtils.signum(bx) - bone.data.scaleX) * alpha;\n bone.scaleY = by + (Math.abs(y) * spine.MathUtils.signum(by) - bone.data.scaleY) * alpha;\n }\n }\n else {\n switch (blend) {\n case MixBlend.setup:\n bx = Math.abs(bone.data.scaleX) * spine.MathUtils.signum(x);\n by = Math.abs(bone.data.scaleY) * spine.MathUtils.signum(y);\n bone.scaleX = bx + (x - bx) * alpha;\n bone.scaleY = by + (y - by) * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n bx = Math.abs(bone.scaleX) * spine.MathUtils.signum(x);\n by = Math.abs(bone.scaleY) * spine.MathUtils.signum(y);\n bone.scaleX = bx + (x - bx) * alpha;\n bone.scaleY = by + (y - by) * alpha;\n break;\n case MixBlend.add:\n bx = spine.MathUtils.signum(x);\n by = spine.MathUtils.signum(y);\n bone.scaleX = Math.abs(bone.scaleX) * bx + (x - Math.abs(bone.data.scaleX) * bx) * alpha;\n bone.scaleY = Math.abs(bone.scaleY) * by + (y - Math.abs(bone.data.scaleY) * by) * alpha;\n }\n }\n }\n };\n return ScaleTimeline;\n }(TranslateTimeline));\n spine.ScaleTimeline = ScaleTimeline;\n var ShearTimeline = (function (_super) {\n __extends(ShearTimeline, _super);\n function ShearTimeline(frameCount) {\n return _super.call(this, frameCount) || this;\n }\n ShearTimeline.prototype.getPropertyId = function () {\n return (TimelineType.shear << 24) + this.boneIndex;\n };\n ShearTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var frames = this.frames;\n var bone = skeleton.bones[this.boneIndex];\n if (!bone.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n bone.shearX = bone.data.shearX;\n bone.shearY = bone.data.shearY;\n return;\n case MixBlend.first:\n bone.shearX += (bone.data.shearX - bone.shearX) * alpha;\n bone.shearY += (bone.data.shearY - bone.shearY) * alpha;\n }\n return;\n }\n var x = 0, y = 0;\n if (time >= frames[frames.length - ShearTimeline.ENTRIES]) {\n x = frames[frames.length + ShearTimeline.PREV_X];\n y = frames[frames.length + ShearTimeline.PREV_Y];\n }\n else {\n var frame = Animation.binarySearch(frames, time, ShearTimeline.ENTRIES);\n x = frames[frame + ShearTimeline.PREV_X];\n y = frames[frame + ShearTimeline.PREV_Y];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / ShearTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ShearTimeline.PREV_TIME] - frameTime));\n x = x + (frames[frame + ShearTimeline.X] - x) * percent;\n y = y + (frames[frame + ShearTimeline.Y] - y) * percent;\n }\n switch (blend) {\n case MixBlend.setup:\n bone.shearX = bone.data.shearX + x * alpha;\n bone.shearY = bone.data.shearY + y * alpha;\n break;\n case MixBlend.first:\n case MixBlend.replace:\n bone.shearX += (bone.data.shearX + x - bone.shearX) * alpha;\n bone.shearY += (bone.data.shearY + y - bone.shearY) * alpha;\n break;\n case MixBlend.add:\n bone.shearX += x * alpha;\n bone.shearY += y * alpha;\n }\n };\n return ShearTimeline;\n }(TranslateTimeline));\n spine.ShearTimeline = ShearTimeline;\n var ColorTimeline = (function (_super) {\n __extends(ColorTimeline, _super);\n function ColorTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * ColorTimeline.ENTRIES);\n return _this;\n }\n ColorTimeline.prototype.getPropertyId = function () {\n return (TimelineType.color << 24) + this.slotIndex;\n };\n ColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a) {\n frameIndex *= ColorTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + ColorTimeline.R] = r;\n this.frames[frameIndex + ColorTimeline.G] = g;\n this.frames[frameIndex + ColorTimeline.B] = b;\n this.frames[frameIndex + ColorTimeline.A] = a;\n };\n ColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n var frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n slot.color.setFromColor(slot.data.color);\n return;\n case MixBlend.first:\n var color = slot.color, setup = slot.data.color;\n color.add((setup.r - color.r) * alpha, (setup.g - color.g) * alpha, (setup.b - color.b) * alpha, (setup.a - color.a) * alpha);\n }\n return;\n }\n var r = 0, g = 0, b = 0, a = 0;\n if (time >= frames[frames.length - ColorTimeline.ENTRIES]) {\n var i = frames.length;\n r = frames[i + ColorTimeline.PREV_R];\n g = frames[i + ColorTimeline.PREV_G];\n b = frames[i + ColorTimeline.PREV_B];\n a = frames[i + ColorTimeline.PREV_A];\n }\n else {\n var frame = Animation.binarySearch(frames, time, ColorTimeline.ENTRIES);\n r = frames[frame + ColorTimeline.PREV_R];\n g = frames[frame + ColorTimeline.PREV_G];\n b = frames[frame + ColorTimeline.PREV_B];\n a = frames[frame + ColorTimeline.PREV_A];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / ColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + ColorTimeline.PREV_TIME] - frameTime));\n r += (frames[frame + ColorTimeline.R] - r) * percent;\n g += (frames[frame + ColorTimeline.G] - g) * percent;\n b += (frames[frame + ColorTimeline.B] - b) * percent;\n a += (frames[frame + ColorTimeline.A] - a) * percent;\n }\n if (alpha == 1)\n slot.color.set(r, g, b, a);\n else {\n var color = slot.color;\n if (blend == MixBlend.setup)\n color.setFromColor(slot.data.color);\n color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);\n }\n };\n ColorTimeline.ENTRIES = 5;\n ColorTimeline.PREV_TIME = -5;\n ColorTimeline.PREV_R = -4;\n ColorTimeline.PREV_G = -3;\n ColorTimeline.PREV_B = -2;\n ColorTimeline.PREV_A = -1;\n ColorTimeline.R = 1;\n ColorTimeline.G = 2;\n ColorTimeline.B = 3;\n ColorTimeline.A = 4;\n return ColorTimeline;\n }(CurveTimeline));\n spine.ColorTimeline = ColorTimeline;\n var TwoColorTimeline = (function (_super) {\n __extends(TwoColorTimeline, _super);\n function TwoColorTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * TwoColorTimeline.ENTRIES);\n return _this;\n }\n TwoColorTimeline.prototype.getPropertyId = function () {\n return (TimelineType.twoColor << 24) + this.slotIndex;\n };\n TwoColorTimeline.prototype.setFrame = function (frameIndex, time, r, g, b, a, r2, g2, b2) {\n frameIndex *= TwoColorTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + TwoColorTimeline.R] = r;\n this.frames[frameIndex + TwoColorTimeline.G] = g;\n this.frames[frameIndex + TwoColorTimeline.B] = b;\n this.frames[frameIndex + TwoColorTimeline.A] = a;\n this.frames[frameIndex + TwoColorTimeline.R2] = r2;\n this.frames[frameIndex + TwoColorTimeline.G2] = g2;\n this.frames[frameIndex + TwoColorTimeline.B2] = b2;\n };\n TwoColorTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n var frames = this.frames;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n slot.color.setFromColor(slot.data.color);\n slot.darkColor.setFromColor(slot.data.darkColor);\n return;\n case MixBlend.first:\n var light = slot.color, dark = slot.darkColor, setupLight = slot.data.color, setupDark = slot.data.darkColor;\n light.add((setupLight.r - light.r) * alpha, (setupLight.g - light.g) * alpha, (setupLight.b - light.b) * alpha, (setupLight.a - light.a) * alpha);\n dark.add((setupDark.r - dark.r) * alpha, (setupDark.g - dark.g) * alpha, (setupDark.b - dark.b) * alpha, 0);\n }\n return;\n }\n var r = 0, g = 0, b = 0, a = 0, r2 = 0, g2 = 0, b2 = 0;\n if (time >= frames[frames.length - TwoColorTimeline.ENTRIES]) {\n var i = frames.length;\n r = frames[i + TwoColorTimeline.PREV_R];\n g = frames[i + TwoColorTimeline.PREV_G];\n b = frames[i + TwoColorTimeline.PREV_B];\n a = frames[i + TwoColorTimeline.PREV_A];\n r2 = frames[i + TwoColorTimeline.PREV_R2];\n g2 = frames[i + TwoColorTimeline.PREV_G2];\n b2 = frames[i + TwoColorTimeline.PREV_B2];\n }\n else {\n var frame = Animation.binarySearch(frames, time, TwoColorTimeline.ENTRIES);\n r = frames[frame + TwoColorTimeline.PREV_R];\n g = frames[frame + TwoColorTimeline.PREV_G];\n b = frames[frame + TwoColorTimeline.PREV_B];\n a = frames[frame + TwoColorTimeline.PREV_A];\n r2 = frames[frame + TwoColorTimeline.PREV_R2];\n g2 = frames[frame + TwoColorTimeline.PREV_G2];\n b2 = frames[frame + TwoColorTimeline.PREV_B2];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / TwoColorTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TwoColorTimeline.PREV_TIME] - frameTime));\n r += (frames[frame + TwoColorTimeline.R] - r) * percent;\n g += (frames[frame + TwoColorTimeline.G] - g) * percent;\n b += (frames[frame + TwoColorTimeline.B] - b) * percent;\n a += (frames[frame + TwoColorTimeline.A] - a) * percent;\n r2 += (frames[frame + TwoColorTimeline.R2] - r2) * percent;\n g2 += (frames[frame + TwoColorTimeline.G2] - g2) * percent;\n b2 += (frames[frame + TwoColorTimeline.B2] - b2) * percent;\n }\n if (alpha == 1) {\n slot.color.set(r, g, b, a);\n slot.darkColor.set(r2, g2, b2, 1);\n }\n else {\n var light = slot.color, dark = slot.darkColor;\n if (blend == MixBlend.setup) {\n light.setFromColor(slot.data.color);\n dark.setFromColor(slot.data.darkColor);\n }\n light.add((r - light.r) * alpha, (g - light.g) * alpha, (b - light.b) * alpha, (a - light.a) * alpha);\n dark.add((r2 - dark.r) * alpha, (g2 - dark.g) * alpha, (b2 - dark.b) * alpha, 0);\n }\n };\n TwoColorTimeline.ENTRIES = 8;\n TwoColorTimeline.PREV_TIME = -8;\n TwoColorTimeline.PREV_R = -7;\n TwoColorTimeline.PREV_G = -6;\n TwoColorTimeline.PREV_B = -5;\n TwoColorTimeline.PREV_A = -4;\n TwoColorTimeline.PREV_R2 = -3;\n TwoColorTimeline.PREV_G2 = -2;\n TwoColorTimeline.PREV_B2 = -1;\n TwoColorTimeline.R = 1;\n TwoColorTimeline.G = 2;\n TwoColorTimeline.B = 3;\n TwoColorTimeline.A = 4;\n TwoColorTimeline.R2 = 5;\n TwoColorTimeline.G2 = 6;\n TwoColorTimeline.B2 = 7;\n return TwoColorTimeline;\n }(CurveTimeline));\n spine.TwoColorTimeline = TwoColorTimeline;\n var AttachmentTimeline = (function () {\n function AttachmentTimeline(frameCount) {\n this.frames = spine.Utils.newFloatArray(frameCount);\n this.attachmentNames = new Array(frameCount);\n }\n AttachmentTimeline.prototype.getPropertyId = function () {\n return (TimelineType.attachment << 24) + this.slotIndex;\n };\n AttachmentTimeline.prototype.getFrameCount = function () {\n return this.frames.length;\n };\n AttachmentTimeline.prototype.setFrame = function (frameIndex, time, attachmentName) {\n this.frames[frameIndex] = time;\n this.attachmentNames[frameIndex] = attachmentName;\n };\n AttachmentTimeline.prototype.apply = function (skeleton, lastTime, time, events, alpha, blend, direction) {\n var slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n if (direction == MixDirection.mixOut) {\n if (blend == MixBlend.setup)\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\n return;\n }\n var frames = this.frames;\n if (time < frames[0]) {\n if (blend == MixBlend.setup || blend == MixBlend.first)\n this.setAttachment(skeleton, slot, slot.data.attachmentName);\n return;\n }\n var frameIndex = 0;\n if (time >= frames[frames.length - 1])\n frameIndex = frames.length - 1;\n else\n frameIndex = Animation.binarySearch(frames, time, 1) - 1;\n var attachmentName = this.attachmentNames[frameIndex];\n skeleton.slots[this.slotIndex]\n .setAttachment(attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName));\n };\n AttachmentTimeline.prototype.setAttachment = function (skeleton, slot, attachmentName) {\n slot.attachment = attachmentName == null ? null : skeleton.getAttachment(this.slotIndex, attachmentName);\n };\n return AttachmentTimeline;\n }());\n spine.AttachmentTimeline = AttachmentTimeline;\n var zeros = null;\n var DeformTimeline = (function (_super) {\n __extends(DeformTimeline, _super);\n function DeformTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount);\n _this.frameVertices = new Array(frameCount);\n if (zeros == null)\n zeros = spine.Utils.newFloatArray(64);\n return _this;\n }\n DeformTimeline.prototype.getPropertyId = function () {\n return (TimelineType.deform << 27) + +this.attachment.id + this.slotIndex;\n };\n DeformTimeline.prototype.setFrame = function (frameIndex, time, vertices) {\n this.frames[frameIndex] = time;\n this.frameVertices[frameIndex] = vertices;\n };\n DeformTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var slot = skeleton.slots[this.slotIndex];\n if (!slot.bone.active)\n return;\n var slotAttachment = slot.getAttachment();\n if (!(slotAttachment instanceof spine.VertexAttachment) || !(slotAttachment.deformAttachment == this.attachment))\n return;\n var deformArray = slot.deform;\n if (deformArray.length == 0)\n blend = MixBlend.setup;\n var frameVertices = this.frameVertices;\n var vertexCount = frameVertices[0].length;\n var frames = this.frames;\n if (time < frames[0]) {\n var vertexAttachment = slotAttachment;\n switch (blend) {\n case MixBlend.setup:\n deformArray.length = 0;\n return;\n case MixBlend.first:\n if (alpha == 1) {\n deformArray.length = 0;\n break;\n }\n var deform_1 = spine.Utils.setArraySize(deformArray, vertexCount);\n if (vertexAttachment.bones == null) {\n var setupVertices = vertexAttachment.vertices;\n for (var i = 0; i < vertexCount; i++)\n deform_1[i] += (setupVertices[i] - deform_1[i]) * alpha;\n }\n else {\n alpha = 1 - alpha;\n for (var i = 0; i < vertexCount; i++)\n deform_1[i] *= alpha;\n }\n }\n return;\n }\n var deform = spine.Utils.setArraySize(deformArray, vertexCount);\n if (time >= frames[frames.length - 1]) {\n var lastVertices = frameVertices[frames.length - 1];\n if (alpha == 1) {\n if (blend == MixBlend.add) {\n var vertexAttachment = slotAttachment;\n if (vertexAttachment.bones == null) {\n var setupVertices = vertexAttachment.vertices;\n for (var i_1 = 0; i_1 < vertexCount; i_1++) {\n deform[i_1] += lastVertices[i_1] - setupVertices[i_1];\n }\n }\n else {\n for (var i_2 = 0; i_2 < vertexCount; i_2++)\n deform[i_2] += lastVertices[i_2];\n }\n }\n else {\n spine.Utils.arrayCopy(lastVertices, 0, deform, 0, vertexCount);\n }\n }\n else {\n switch (blend) {\n case MixBlend.setup: {\n var vertexAttachment_1 = slotAttachment;\n if (vertexAttachment_1.bones == null) {\n var setupVertices = vertexAttachment_1.vertices;\n for (var i_3 = 0; i_3 < vertexCount; i_3++) {\n var setup = setupVertices[i_3];\n deform[i_3] = setup + (lastVertices[i_3] - setup) * alpha;\n }\n }\n else {\n for (var i_4 = 0; i_4 < vertexCount; i_4++)\n deform[i_4] = lastVertices[i_4] * alpha;\n }\n break;\n }\n case MixBlend.first:\n case MixBlend.replace:\n for (var i_5 = 0; i_5 < vertexCount; i_5++)\n deform[i_5] += (lastVertices[i_5] - deform[i_5]) * alpha;\n break;\n case MixBlend.add:\n var vertexAttachment = slotAttachment;\n if (vertexAttachment.bones == null) {\n var setupVertices = vertexAttachment.vertices;\n for (var i_6 = 0; i_6 < vertexCount; i_6++) {\n deform[i_6] += (lastVertices[i_6] - setupVertices[i_6]) * alpha;\n }\n }\n else {\n for (var i_7 = 0; i_7 < vertexCount; i_7++)\n deform[i_7] += lastVertices[i_7] * alpha;\n }\n }\n }\n return;\n }\n var frame = Animation.binarySearch(frames, time);\n var prevVertices = frameVertices[frame - 1];\n var nextVertices = frameVertices[frame];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame - 1, 1 - (time - frameTime) / (frames[frame - 1] - frameTime));\n if (alpha == 1) {\n if (blend == MixBlend.add) {\n var vertexAttachment = slotAttachment;\n if (vertexAttachment.bones == null) {\n var setupVertices = vertexAttachment.vertices;\n for (var i_8 = 0; i_8 < vertexCount; i_8++) {\n var prev = prevVertices[i_8];\n deform[i_8] += prev + (nextVertices[i_8] - prev) * percent - setupVertices[i_8];\n }\n }\n else {\n for (var i_9 = 0; i_9 < vertexCount; i_9++) {\n var prev = prevVertices[i_9];\n deform[i_9] += prev + (nextVertices[i_9] - prev) * percent;\n }\n }\n }\n else {\n for (var i_10 = 0; i_10 < vertexCount; i_10++) {\n var prev = prevVertices[i_10];\n deform[i_10] = prev + (nextVertices[i_10] - prev) * percent;\n }\n }\n }\n else {\n switch (blend) {\n case MixBlend.setup: {\n var vertexAttachment_2 = slotAttachment;\n if (vertexAttachment_2.bones == null) {\n var setupVertices = vertexAttachment_2.vertices;\n for (var i_11 = 0; i_11 < vertexCount; i_11++) {\n var prev = prevVertices[i_11], setup = setupVertices[i_11];\n deform[i_11] = setup + (prev + (nextVertices[i_11] - prev) * percent - setup) * alpha;\n }\n }\n else {\n for (var i_12 = 0; i_12 < vertexCount; i_12++) {\n var prev = prevVertices[i_12];\n deform[i_12] = (prev + (nextVertices[i_12] - prev) * percent) * alpha;\n }\n }\n break;\n }\n case MixBlend.first:\n case MixBlend.replace:\n for (var i_13 = 0; i_13 < vertexCount; i_13++) {\n var prev = prevVertices[i_13];\n deform[i_13] += (prev + (nextVertices[i_13] - prev) * percent - deform[i_13]) * alpha;\n }\n break;\n case MixBlend.add:\n var vertexAttachment = slotAttachment;\n if (vertexAttachment.bones == null) {\n var setupVertices = vertexAttachment.vertices;\n for (var i_14 = 0; i_14 < vertexCount; i_14++) {\n var prev = prevVertices[i_14];\n deform[i_14] += (prev + (nextVertices[i_14] - prev) * percent - setupVertices[i_14]) * alpha;\n }\n }\n else {\n for (var i_15 = 0; i_15 < vertexCount; i_15++) {\n var prev = prevVertices[i_15];\n deform[i_15] += (prev + (nextVertices[i_15] - prev) * percent) * alpha;\n }\n }\n }\n }\n };\n return DeformTimeline;\n }(CurveTimeline));\n spine.DeformTimeline = DeformTimeline;\n var EventTimeline = (function () {\n function EventTimeline(frameCount) {\n this.frames = spine.Utils.newFloatArray(frameCount);\n this.events = new Array(frameCount);\n }\n EventTimeline.prototype.getPropertyId = function () {\n return TimelineType.event << 24;\n };\n EventTimeline.prototype.getFrameCount = function () {\n return this.frames.length;\n };\n EventTimeline.prototype.setFrame = function (frameIndex, event) {\n this.frames[frameIndex] = event.time;\n this.events[frameIndex] = event;\n };\n EventTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n if (firedEvents == null)\n return;\n var frames = this.frames;\n var frameCount = this.frames.length;\n if (lastTime > time) {\n this.apply(skeleton, lastTime, Number.MAX_VALUE, firedEvents, alpha, blend, direction);\n lastTime = -1;\n }\n else if (lastTime >= frames[frameCount - 1])\n return;\n if (time < frames[0])\n return;\n var frame = 0;\n if (lastTime < frames[0])\n frame = 0;\n else {\n frame = Animation.binarySearch(frames, lastTime);\n var frameTime = frames[frame];\n while (frame > 0) {\n if (frames[frame - 1] != frameTime)\n break;\n frame--;\n }\n }\n for (; frame < frameCount && time >= frames[frame]; frame++)\n firedEvents.push(this.events[frame]);\n };\n return EventTimeline;\n }());\n spine.EventTimeline = EventTimeline;\n var DrawOrderTimeline = (function () {\n function DrawOrderTimeline(frameCount) {\n this.frames = spine.Utils.newFloatArray(frameCount);\n this.drawOrders = new Array(frameCount);\n }\n DrawOrderTimeline.prototype.getPropertyId = function () {\n return TimelineType.drawOrder << 24;\n };\n DrawOrderTimeline.prototype.getFrameCount = function () {\n return this.frames.length;\n };\n DrawOrderTimeline.prototype.setFrame = function (frameIndex, time, drawOrder) {\n this.frames[frameIndex] = time;\n this.drawOrders[frameIndex] = drawOrder;\n };\n DrawOrderTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var drawOrder = skeleton.drawOrder;\n var slots = skeleton.slots;\n if (direction == MixDirection.mixOut) {\n if (blend == MixBlend.setup)\n spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n return;\n }\n var frames = this.frames;\n if (time < frames[0]) {\n if (blend == MixBlend.setup || blend == MixBlend.first)\n spine.Utils.arrayCopy(skeleton.slots, 0, skeleton.drawOrder, 0, skeleton.slots.length);\n return;\n }\n var frame = 0;\n if (time >= frames[frames.length - 1])\n frame = frames.length - 1;\n else\n frame = Animation.binarySearch(frames, time) - 1;\n var drawOrderToSetupIndex = this.drawOrders[frame];\n if (drawOrderToSetupIndex == null)\n spine.Utils.arrayCopy(slots, 0, drawOrder, 0, slots.length);\n else {\n for (var i = 0, n = drawOrderToSetupIndex.length; i < n; i++)\n drawOrder[i] = slots[drawOrderToSetupIndex[i]];\n }\n };\n return DrawOrderTimeline;\n }());\n spine.DrawOrderTimeline = DrawOrderTimeline;\n var IkConstraintTimeline = (function (_super) {\n __extends(IkConstraintTimeline, _super);\n function IkConstraintTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * IkConstraintTimeline.ENTRIES);\n return _this;\n }\n IkConstraintTimeline.prototype.getPropertyId = function () {\n return (TimelineType.ikConstraint << 24) + this.ikConstraintIndex;\n };\n IkConstraintTimeline.prototype.setFrame = function (frameIndex, time, mix, softness, bendDirection, compress, stretch) {\n frameIndex *= IkConstraintTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + IkConstraintTimeline.MIX] = mix;\n this.frames[frameIndex + IkConstraintTimeline.SOFTNESS] = softness;\n this.frames[frameIndex + IkConstraintTimeline.BEND_DIRECTION] = bendDirection;\n this.frames[frameIndex + IkConstraintTimeline.COMPRESS] = compress ? 1 : 0;\n this.frames[frameIndex + IkConstraintTimeline.STRETCH] = stretch ? 1 : 0;\n };\n IkConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var frames = this.frames;\n var constraint = skeleton.ikConstraints[this.ikConstraintIndex];\n if (!constraint.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n constraint.mix = constraint.data.mix;\n constraint.softness = constraint.data.softness;\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n return;\n case MixBlend.first:\n constraint.mix += (constraint.data.mix - constraint.mix) * alpha;\n constraint.softness += (constraint.data.softness - constraint.softness) * alpha;\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n }\n return;\n }\n if (time >= frames[frames.length - IkConstraintTimeline.ENTRIES]) {\n if (blend == MixBlend.setup) {\n constraint.mix = constraint.data.mix + (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.data.mix) * alpha;\n constraint.softness = constraint.data.softness\n + (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.data.softness) * alpha;\n if (direction == MixDirection.mixOut) {\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n }\n else {\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\n }\n }\n else {\n constraint.mix += (frames[frames.length + IkConstraintTimeline.PREV_MIX] - constraint.mix) * alpha;\n constraint.softness += (frames[frames.length + IkConstraintTimeline.PREV_SOFTNESS] - constraint.softness) * alpha;\n if (direction == MixDirection.mixIn) {\n constraint.bendDirection = frames[frames.length + IkConstraintTimeline.PREV_BEND_DIRECTION];\n constraint.compress = frames[frames.length + IkConstraintTimeline.PREV_COMPRESS] != 0;\n constraint.stretch = frames[frames.length + IkConstraintTimeline.PREV_STRETCH] != 0;\n }\n }\n return;\n }\n var frame = Animation.binarySearch(frames, time, IkConstraintTimeline.ENTRIES);\n var mix = frames[frame + IkConstraintTimeline.PREV_MIX];\n var softness = frames[frame + IkConstraintTimeline.PREV_SOFTNESS];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / IkConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + IkConstraintTimeline.PREV_TIME] - frameTime));\n if (blend == MixBlend.setup) {\n constraint.mix = constraint.data.mix + (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.data.mix) * alpha;\n constraint.softness = constraint.data.softness\n + (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.data.softness) * alpha;\n if (direction == MixDirection.mixOut) {\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n }\n else {\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\n }\n }\n else {\n constraint.mix += (mix + (frames[frame + IkConstraintTimeline.MIX] - mix) * percent - constraint.mix) * alpha;\n constraint.softness += (softness + (frames[frame + IkConstraintTimeline.SOFTNESS] - softness) * percent - constraint.softness) * alpha;\n if (direction == MixDirection.mixIn) {\n constraint.bendDirection = frames[frame + IkConstraintTimeline.PREV_BEND_DIRECTION];\n constraint.compress = frames[frame + IkConstraintTimeline.PREV_COMPRESS] != 0;\n constraint.stretch = frames[frame + IkConstraintTimeline.PREV_STRETCH] != 0;\n }\n }\n };\n IkConstraintTimeline.ENTRIES = 6;\n IkConstraintTimeline.PREV_TIME = -6;\n IkConstraintTimeline.PREV_MIX = -5;\n IkConstraintTimeline.PREV_SOFTNESS = -4;\n IkConstraintTimeline.PREV_BEND_DIRECTION = -3;\n IkConstraintTimeline.PREV_COMPRESS = -2;\n IkConstraintTimeline.PREV_STRETCH = -1;\n IkConstraintTimeline.MIX = 1;\n IkConstraintTimeline.SOFTNESS = 2;\n IkConstraintTimeline.BEND_DIRECTION = 3;\n IkConstraintTimeline.COMPRESS = 4;\n IkConstraintTimeline.STRETCH = 5;\n return IkConstraintTimeline;\n }(CurveTimeline));\n spine.IkConstraintTimeline = IkConstraintTimeline;\n var TransformConstraintTimeline = (function (_super) {\n __extends(TransformConstraintTimeline, _super);\n function TransformConstraintTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * TransformConstraintTimeline.ENTRIES);\n return _this;\n }\n TransformConstraintTimeline.prototype.getPropertyId = function () {\n return (TimelineType.transformConstraint << 24) + this.transformConstraintIndex;\n };\n TransformConstraintTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix, scaleMix, shearMix) {\n frameIndex *= TransformConstraintTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + TransformConstraintTimeline.ROTATE] = rotateMix;\n this.frames[frameIndex + TransformConstraintTimeline.TRANSLATE] = translateMix;\n this.frames[frameIndex + TransformConstraintTimeline.SCALE] = scaleMix;\n this.frames[frameIndex + TransformConstraintTimeline.SHEAR] = shearMix;\n };\n TransformConstraintTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var frames = this.frames;\n var constraint = skeleton.transformConstraints[this.transformConstraintIndex];\n if (!constraint.active)\n return;\n if (time < frames[0]) {\n var data = constraint.data;\n switch (blend) {\n case MixBlend.setup:\n constraint.rotateMix = data.rotateMix;\n constraint.translateMix = data.translateMix;\n constraint.scaleMix = data.scaleMix;\n constraint.shearMix = data.shearMix;\n return;\n case MixBlend.first:\n constraint.rotateMix += (data.rotateMix - constraint.rotateMix) * alpha;\n constraint.translateMix += (data.translateMix - constraint.translateMix) * alpha;\n constraint.scaleMix += (data.scaleMix - constraint.scaleMix) * alpha;\n constraint.shearMix += (data.shearMix - constraint.shearMix) * alpha;\n }\n return;\n }\n var rotate = 0, translate = 0, scale = 0, shear = 0;\n if (time >= frames[frames.length - TransformConstraintTimeline.ENTRIES]) {\n var i = frames.length;\n rotate = frames[i + TransformConstraintTimeline.PREV_ROTATE];\n translate = frames[i + TransformConstraintTimeline.PREV_TRANSLATE];\n scale = frames[i + TransformConstraintTimeline.PREV_SCALE];\n shear = frames[i + TransformConstraintTimeline.PREV_SHEAR];\n }\n else {\n var frame = Animation.binarySearch(frames, time, TransformConstraintTimeline.ENTRIES);\n rotate = frames[frame + TransformConstraintTimeline.PREV_ROTATE];\n translate = frames[frame + TransformConstraintTimeline.PREV_TRANSLATE];\n scale = frames[frame + TransformConstraintTimeline.PREV_SCALE];\n shear = frames[frame + TransformConstraintTimeline.PREV_SHEAR];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / TransformConstraintTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + TransformConstraintTimeline.PREV_TIME] - frameTime));\n rotate += (frames[frame + TransformConstraintTimeline.ROTATE] - rotate) * percent;\n translate += (frames[frame + TransformConstraintTimeline.TRANSLATE] - translate) * percent;\n scale += (frames[frame + TransformConstraintTimeline.SCALE] - scale) * percent;\n shear += (frames[frame + TransformConstraintTimeline.SHEAR] - shear) * percent;\n }\n if (blend == MixBlend.setup) {\n var data = constraint.data;\n constraint.rotateMix = data.rotateMix + (rotate - data.rotateMix) * alpha;\n constraint.translateMix = data.translateMix + (translate - data.translateMix) * alpha;\n constraint.scaleMix = data.scaleMix + (scale - data.scaleMix) * alpha;\n constraint.shearMix = data.shearMix + (shear - data.shearMix) * alpha;\n }\n else {\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\n constraint.scaleMix += (scale - constraint.scaleMix) * alpha;\n constraint.shearMix += (shear - constraint.shearMix) * alpha;\n }\n };\n TransformConstraintTimeline.ENTRIES = 5;\n TransformConstraintTimeline.PREV_TIME = -5;\n TransformConstraintTimeline.PREV_ROTATE = -4;\n TransformConstraintTimeline.PREV_TRANSLATE = -3;\n TransformConstraintTimeline.PREV_SCALE = -2;\n TransformConstraintTimeline.PREV_SHEAR = -1;\n TransformConstraintTimeline.ROTATE = 1;\n TransformConstraintTimeline.TRANSLATE = 2;\n TransformConstraintTimeline.SCALE = 3;\n TransformConstraintTimeline.SHEAR = 4;\n return TransformConstraintTimeline;\n }(CurveTimeline));\n spine.TransformConstraintTimeline = TransformConstraintTimeline;\n var PathConstraintPositionTimeline = (function (_super) {\n __extends(PathConstraintPositionTimeline, _super);\n function PathConstraintPositionTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintPositionTimeline.ENTRIES);\n return _this;\n }\n PathConstraintPositionTimeline.prototype.getPropertyId = function () {\n return (TimelineType.pathConstraintPosition << 24) + this.pathConstraintIndex;\n };\n PathConstraintPositionTimeline.prototype.setFrame = function (frameIndex, time, value) {\n frameIndex *= PathConstraintPositionTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + PathConstraintPositionTimeline.VALUE] = value;\n };\n PathConstraintPositionTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var frames = this.frames;\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n constraint.position = constraint.data.position;\n return;\n case MixBlend.first:\n constraint.position += (constraint.data.position - constraint.position) * alpha;\n }\n return;\n }\n var position = 0;\n if (time >= frames[frames.length - PathConstraintPositionTimeline.ENTRIES])\n position = frames[frames.length + PathConstraintPositionTimeline.PREV_VALUE];\n else {\n var frame = Animation.binarySearch(frames, time, PathConstraintPositionTimeline.ENTRIES);\n position = frames[frame + PathConstraintPositionTimeline.PREV_VALUE];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / PathConstraintPositionTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintPositionTimeline.PREV_TIME] - frameTime));\n position += (frames[frame + PathConstraintPositionTimeline.VALUE] - position) * percent;\n }\n if (blend == MixBlend.setup)\n constraint.position = constraint.data.position + (position - constraint.data.position) * alpha;\n else\n constraint.position += (position - constraint.position) * alpha;\n };\n PathConstraintPositionTimeline.ENTRIES = 2;\n PathConstraintPositionTimeline.PREV_TIME = -2;\n PathConstraintPositionTimeline.PREV_VALUE = -1;\n PathConstraintPositionTimeline.VALUE = 1;\n return PathConstraintPositionTimeline;\n }(CurveTimeline));\n spine.PathConstraintPositionTimeline = PathConstraintPositionTimeline;\n var PathConstraintSpacingTimeline = (function (_super) {\n __extends(PathConstraintSpacingTimeline, _super);\n function PathConstraintSpacingTimeline(frameCount) {\n return _super.call(this, frameCount) || this;\n }\n PathConstraintSpacingTimeline.prototype.getPropertyId = function () {\n return (TimelineType.pathConstraintSpacing << 24) + this.pathConstraintIndex;\n };\n PathConstraintSpacingTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var frames = this.frames;\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n constraint.spacing = constraint.data.spacing;\n return;\n case MixBlend.first:\n constraint.spacing += (constraint.data.spacing - constraint.spacing) * alpha;\n }\n return;\n }\n var spacing = 0;\n if (time >= frames[frames.length - PathConstraintSpacingTimeline.ENTRIES])\n spacing = frames[frames.length + PathConstraintSpacingTimeline.PREV_VALUE];\n else {\n var frame = Animation.binarySearch(frames, time, PathConstraintSpacingTimeline.ENTRIES);\n spacing = frames[frame + PathConstraintSpacingTimeline.PREV_VALUE];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / PathConstraintSpacingTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintSpacingTimeline.PREV_TIME] - frameTime));\n spacing += (frames[frame + PathConstraintSpacingTimeline.VALUE] - spacing) * percent;\n }\n if (blend == MixBlend.setup)\n constraint.spacing = constraint.data.spacing + (spacing - constraint.data.spacing) * alpha;\n else\n constraint.spacing += (spacing - constraint.spacing) * alpha;\n };\n return PathConstraintSpacingTimeline;\n }(PathConstraintPositionTimeline));\n spine.PathConstraintSpacingTimeline = PathConstraintSpacingTimeline;\n var PathConstraintMixTimeline = (function (_super) {\n __extends(PathConstraintMixTimeline, _super);\n function PathConstraintMixTimeline(frameCount) {\n var _this = _super.call(this, frameCount) || this;\n _this.frames = spine.Utils.newFloatArray(frameCount * PathConstraintMixTimeline.ENTRIES);\n return _this;\n }\n PathConstraintMixTimeline.prototype.getPropertyId = function () {\n return (TimelineType.pathConstraintMix << 24) + this.pathConstraintIndex;\n };\n PathConstraintMixTimeline.prototype.setFrame = function (frameIndex, time, rotateMix, translateMix) {\n frameIndex *= PathConstraintMixTimeline.ENTRIES;\n this.frames[frameIndex] = time;\n this.frames[frameIndex + PathConstraintMixTimeline.ROTATE] = rotateMix;\n this.frames[frameIndex + PathConstraintMixTimeline.TRANSLATE] = translateMix;\n };\n PathConstraintMixTimeline.prototype.apply = function (skeleton, lastTime, time, firedEvents, alpha, blend, direction) {\n var frames = this.frames;\n var constraint = skeleton.pathConstraints[this.pathConstraintIndex];\n if (!constraint.active)\n return;\n if (time < frames[0]) {\n switch (blend) {\n case MixBlend.setup:\n constraint.rotateMix = constraint.data.rotateMix;\n constraint.translateMix = constraint.data.translateMix;\n return;\n case MixBlend.first:\n constraint.rotateMix += (constraint.data.rotateMix - constraint.rotateMix) * alpha;\n constraint.translateMix += (constraint.data.translateMix - constraint.translateMix) * alpha;\n }\n return;\n }\n var rotate = 0, translate = 0;\n if (time >= frames[frames.length - PathConstraintMixTimeline.ENTRIES]) {\n rotate = frames[frames.length + PathConstraintMixTimeline.PREV_ROTATE];\n translate = frames[frames.length + PathConstraintMixTimeline.PREV_TRANSLATE];\n }\n else {\n var frame = Animation.binarySearch(frames, time, PathConstraintMixTimeline.ENTRIES);\n rotate = frames[frame + PathConstraintMixTimeline.PREV_ROTATE];\n translate = frames[frame + PathConstraintMixTimeline.PREV_TRANSLATE];\n var frameTime = frames[frame];\n var percent = this.getCurvePercent(frame / PathConstraintMixTimeline.ENTRIES - 1, 1 - (time - frameTime) / (frames[frame + PathConstraintMixTimeline.PREV_TIME] - frameTime));\n rotate += (frames[frame + PathConstraintMixTimeline.ROTATE] - rotate) * percent;\n translate += (frames[frame + PathConstraintMixTimeline.TRANSLATE] - translate) * percent;\n }\n if (blend == MixBlend.setup) {\n constraint.rotateMix = constraint.data.rotateMix + (rotate - constraint.data.rotateMix) * alpha;\n constraint.translateMix = constraint.data.translateMix + (translate - constraint.data.translateMix) * alpha;\n }\n else {\n constraint.rotateMix += (rotate - constraint.rotateMix) * alpha;\n constraint.translateMix += (translate - constraint.translateMix) * alpha;\n }\n };\n PathConstraintMixTimeline.ENTRIES = 3;\n PathConstraintMixTimeline.PREV_TIME = -3;\n PathConstraintMixTimeline.PREV_ROTATE = -2;\n PathConstraintMixTimeline.PREV_TRANSLATE = -1;\n PathConstraintMixTimeline.ROTATE = 1;\n PathConstraintMixTimeline.TRANSLATE = 2;\n return PathConstraintMixTimeline;\n }(CurveTimeline));\n spine.PathConstraintMixTimeline = PathConstraintMixTimeline;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var AnimationState = (function () {\n function AnimationState(data) {\n this.tracks = new Array();\n this.timeScale = 1;\n this.unkeyedState = 0;\n this.events = new Array();\n this.listeners = new Array();\n this.queue = new EventQueue(this);\n this.propertyIDs = new spine.IntSet();\n this.animationsChanged = false;\n this.trackEntryPool = new spine.Pool(function () { return new TrackEntry(); });\n this.data = data;\n }\n AnimationState.prototype.update = function (delta) {\n delta *= this.timeScale;\n var tracks = this.tracks;\n for (var i = 0, n = tracks.length; i < n; i++) {\n var current = tracks[i];\n if (current == null)\n continue;\n current.animationLast = current.nextAnimationLast;\n current.trackLast = current.nextTrackLast;\n var currentDelta = delta * current.timeScale;\n if (current.delay > 0) {\n current.delay -= currentDelta;\n if (current.delay > 0)\n continue;\n currentDelta = -current.delay;\n current.delay = 0;\n }\n var next = current.next;\n if (next != null) {\n var nextTime = current.trackLast - next.delay;\n if (nextTime >= 0) {\n next.delay = 0;\n next.trackTime += current.timeScale == 0 ? 0 : (nextTime / current.timeScale + delta) * next.timeScale;\n current.trackTime += currentDelta;\n this.setCurrent(i, next, true);\n while (next.mixingFrom != null) {\n next.mixTime += delta;\n next = next.mixingFrom;\n }\n continue;\n }\n }\n else if (current.trackLast >= current.trackEnd && current.mixingFrom == null) {\n tracks[i] = null;\n this.queue.end(current);\n this.disposeNext(current);\n continue;\n }\n if (current.mixingFrom != null && this.updateMixingFrom(current, delta)) {\n var from = current.mixingFrom;\n current.mixingFrom = null;\n if (from != null)\n from.mixingTo = null;\n while (from != null) {\n this.queue.end(from);\n from = from.mixingFrom;\n }\n }\n current.trackTime += currentDelta;\n }\n this.queue.drain();\n };\n AnimationState.prototype.updateMixingFrom = function (to, delta) {\n var from = to.mixingFrom;\n if (from == null)\n return true;\n var finished = this.updateMixingFrom(from, delta);\n from.animationLast = from.nextAnimationLast;\n from.trackLast = from.nextTrackLast;\n if (to.mixTime > 0 && to.mixTime >= to.mixDuration) {\n if (from.totalAlpha == 0 || to.mixDuration == 0) {\n to.mixingFrom = from.mixingFrom;\n if (from.mixingFrom != null)\n from.mixingFrom.mixingTo = to;\n to.interruptAlpha = from.interruptAlpha;\n this.queue.end(from);\n }\n return finished;\n }\n from.trackTime += delta * from.timeScale;\n to.mixTime += delta;\n return false;\n };\n AnimationState.prototype.apply = function (skeleton) {\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n if (this.animationsChanged)\n this._animationsChanged();\n var events = this.events;\n var tracks = this.tracks;\n var applied = false;\n for (var i_16 = 0, n_1 = tracks.length; i_16 < n_1; i_16++) {\n var current = tracks[i_16];\n if (current == null || current.delay > 0)\n continue;\n applied = true;\n var blend = i_16 == 0 ? spine.MixBlend.first : current.mixBlend;\n var mix = current.alpha;\n if (current.mixingFrom != null)\n mix *= this.applyMixingFrom(current, skeleton, blend);\n else if (current.trackTime >= current.trackEnd && current.next == null)\n mix = 0;\n var animationLast = current.animationLast, animationTime = current.getAnimationTime();\n var timelineCount = current.animation.timelines.length;\n var timelines = current.animation.timelines;\n if ((i_16 == 0 && mix == 1) || blend == spine.MixBlend.add) {\n for (var ii = 0; ii < timelineCount; ii++) {\n spine.Utils.webkit602BugfixHelper(mix, blend);\n var timeline = timelines[ii];\n if (timeline instanceof spine.AttachmentTimeline)\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, blend, true);\n else\n timeline.apply(skeleton, animationLast, animationTime, events, mix, blend, spine.MixDirection.mixIn);\n }\n }\n else {\n var timelineMode = current.timelineMode;\n var firstFrame = current.timelinesRotation.length == 0;\n if (firstFrame)\n spine.Utils.setArraySize(current.timelinesRotation, timelineCount << 1, null);\n var timelinesRotation = current.timelinesRotation;\n for (var ii = 0; ii < timelineCount; ii++) {\n var timeline_1 = timelines[ii];\n var timelineBlend = timelineMode[ii] == AnimationState.SUBSEQUENT ? blend : spine.MixBlend.setup;\n if (timeline_1 instanceof spine.RotateTimeline) {\n this.applyRotateTimeline(timeline_1, skeleton, animationTime, mix, timelineBlend, timelinesRotation, ii << 1, firstFrame);\n }\n else if (timeline_1 instanceof spine.AttachmentTimeline) {\n this.applyAttachmentTimeline(timeline_1, skeleton, animationTime, blend, true);\n }\n else {\n spine.Utils.webkit602BugfixHelper(mix, blend);\n timeline_1.apply(skeleton, animationLast, animationTime, events, mix, timelineBlend, spine.MixDirection.mixIn);\n }\n }\n }\n this.queueEvents(current, animationTime);\n events.length = 0;\n current.nextAnimationLast = animationTime;\n current.nextTrackLast = current.trackTime;\n }\n var setupState = this.unkeyedState + AnimationState.SETUP;\n var slots = skeleton.slots;\n for (var i = 0, n = skeleton.slots.length; i < n; i++) {\n var slot = slots[i];\n if (slot.attachmentState == setupState) {\n var attachmentName = slot.data.attachmentName;\n slot.attachment = (attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName));\n }\n }\n this.unkeyedState += 2;\n this.queue.drain();\n return applied;\n };\n AnimationState.prototype.applyMixingFrom = function (to, skeleton, blend) {\n var from = to.mixingFrom;\n if (from.mixingFrom != null)\n this.applyMixingFrom(from, skeleton, blend);\n var mix = 0;\n if (to.mixDuration == 0) {\n mix = 1;\n if (blend == spine.MixBlend.first)\n blend = spine.MixBlend.setup;\n }\n else {\n mix = to.mixTime / to.mixDuration;\n if (mix > 1)\n mix = 1;\n if (blend != spine.MixBlend.first)\n blend = from.mixBlend;\n }\n var events = mix < from.eventThreshold ? this.events : null;\n var attachments = mix < from.attachmentThreshold, drawOrder = mix < from.drawOrderThreshold;\n var animationLast = from.animationLast, animationTime = from.getAnimationTime();\n var timelineCount = from.animation.timelines.length;\n var timelines = from.animation.timelines;\n var alphaHold = from.alpha * to.interruptAlpha, alphaMix = alphaHold * (1 - mix);\n if (blend == spine.MixBlend.add) {\n for (var i = 0; i < timelineCount; i++)\n timelines[i].apply(skeleton, animationLast, animationTime, events, alphaMix, blend, spine.MixDirection.mixOut);\n }\n else {\n var timelineMode = from.timelineMode;\n var timelineHoldMix = from.timelineHoldMix;\n var firstFrame = from.timelinesRotation.length == 0;\n if (firstFrame)\n spine.Utils.setArraySize(from.timelinesRotation, timelineCount << 1, null);\n var timelinesRotation = from.timelinesRotation;\n from.totalAlpha = 0;\n for (var i = 0; i < timelineCount; i++) {\n var timeline = timelines[i];\n var direction = spine.MixDirection.mixOut;\n var timelineBlend = void 0;\n var alpha = 0;\n switch (timelineMode[i]) {\n case AnimationState.SUBSEQUENT:\n if (!drawOrder && timeline instanceof spine.DrawOrderTimeline)\n continue;\n timelineBlend = blend;\n alpha = alphaMix;\n break;\n case AnimationState.FIRST:\n timelineBlend = spine.MixBlend.setup;\n alpha = alphaMix;\n break;\n case AnimationState.HOLD_SUBSEQUENT:\n timelineBlend = blend;\n alpha = alphaHold;\n break;\n case AnimationState.HOLD_FIRST:\n timelineBlend = spine.MixBlend.setup;\n alpha = alphaHold;\n break;\n default:\n timelineBlend = spine.MixBlend.setup;\n var holdMix = timelineHoldMix[i];\n alpha = alphaHold * Math.max(0, 1 - holdMix.mixTime / holdMix.mixDuration);\n break;\n }\n from.totalAlpha += alpha;\n if (timeline instanceof spine.RotateTimeline)\n this.applyRotateTimeline(timeline, skeleton, animationTime, alpha, timelineBlend, timelinesRotation, i << 1, firstFrame);\n else if (timeline instanceof spine.AttachmentTimeline)\n this.applyAttachmentTimeline(timeline, skeleton, animationTime, timelineBlend, attachments);\n else {\n spine.Utils.webkit602BugfixHelper(alpha, blend);\n if (drawOrder && timeline instanceof spine.DrawOrderTimeline && timelineBlend == spine.MixBlend.setup)\n direction = spine.MixDirection.mixIn;\n timeline.apply(skeleton, animationLast, animationTime, events, alpha, timelineBlend, direction);\n }\n }\n }\n if (to.mixDuration > 0)\n this.queueEvents(from, animationTime);\n this.events.length = 0;\n from.nextAnimationLast = animationTime;\n from.nextTrackLast = from.trackTime;\n return mix;\n };\n AnimationState.prototype.applyAttachmentTimeline = function (timeline, skeleton, time, blend, attachments) {\n var slot = skeleton.slots[timeline.slotIndex];\n if (!slot.bone.active)\n return;\n var frames = timeline.frames;\n if (time < frames[0]) {\n if (blend == spine.MixBlend.setup || blend == spine.MixBlend.first)\n this.setAttachment(skeleton, slot, slot.data.attachmentName, attachments);\n }\n else {\n var frameIndex;\n if (time >= frames[frames.length - 1])\n frameIndex = frames.length - 1;\n else\n frameIndex = spine.Animation.binarySearch(frames, time) - 1;\n this.setAttachment(skeleton, slot, timeline.attachmentNames[frameIndex], attachments);\n }\n if (slot.attachmentState <= this.unkeyedState)\n slot.attachmentState = this.unkeyedState + AnimationState.SETUP;\n };\n AnimationState.prototype.setAttachment = function (skeleton, slot, attachmentName, attachments) {\n slot.attachment = attachmentName == null ? null : skeleton.getAttachment(slot.data.index, attachmentName);\n if (attachments)\n slot.attachmentState = this.unkeyedState + AnimationState.CURRENT;\n };\n AnimationState.prototype.applyRotateTimeline = function (timeline, skeleton, time, alpha, blend, timelinesRotation, i, firstFrame) {\n if (firstFrame)\n timelinesRotation[i] = 0;\n if (alpha == 1) {\n timeline.apply(skeleton, 0, time, null, 1, blend, spine.MixDirection.mixIn);\n return;\n }\n var rotateTimeline = timeline;\n var frames = rotateTimeline.frames;\n var bone = skeleton.bones[rotateTimeline.boneIndex];\n if (!bone.active)\n return;\n var r1 = 0, r2 = 0;\n if (time < frames[0]) {\n switch (blend) {\n case spine.MixBlend.setup:\n bone.rotation = bone.data.rotation;\n default:\n return;\n case spine.MixBlend.first:\n r1 = bone.rotation;\n r2 = bone.data.rotation;\n }\n }\n else {\n r1 = blend == spine.MixBlend.setup ? bone.data.rotation : bone.rotation;\n if (time >= frames[frames.length - spine.RotateTimeline.ENTRIES])\n r2 = bone.data.rotation + frames[frames.length + spine.RotateTimeline.PREV_ROTATION];\n else {\n var frame = spine.Animation.binarySearch(frames, time, spine.RotateTimeline.ENTRIES);\n var prevRotation = frames[frame + spine.RotateTimeline.PREV_ROTATION];\n var frameTime = frames[frame];\n var percent = rotateTimeline.getCurvePercent((frame >> 1) - 1, 1 - (time - frameTime) / (frames[frame + spine.RotateTimeline.PREV_TIME] - frameTime));\n r2 = frames[frame + spine.RotateTimeline.ROTATION] - prevRotation;\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\n r2 = prevRotation + r2 * percent + bone.data.rotation;\n r2 -= (16384 - ((16384.499999999996 - r2 / 360) | 0)) * 360;\n }\n }\n var total = 0, diff = r2 - r1;\n diff -= (16384 - ((16384.499999999996 - diff / 360) | 0)) * 360;\n if (diff == 0) {\n total = timelinesRotation[i];\n }\n else {\n var lastTotal = 0, lastDiff = 0;\n if (firstFrame) {\n lastTotal = 0;\n lastDiff = diff;\n }\n else {\n lastTotal = timelinesRotation[i];\n lastDiff = timelinesRotation[i + 1];\n }\n var current = diff > 0, dir = lastTotal >= 0;\n if (spine.MathUtils.signum(lastDiff) != spine.MathUtils.signum(diff) && Math.abs(lastDiff) <= 90) {\n if (Math.abs(lastTotal) > 180)\n lastTotal += 360 * spine.MathUtils.signum(lastTotal);\n dir = current;\n }\n total = diff + lastTotal - lastTotal % 360;\n if (dir != current)\n total += 360 * spine.MathUtils.signum(lastTotal);\n timelinesRotation[i] = total;\n }\n timelinesRotation[i + 1] = diff;\n r1 += total * alpha;\n bone.rotation = r1 - (16384 - ((16384.499999999996 - r1 / 360) | 0)) * 360;\n };\n AnimationState.prototype.queueEvents = function (entry, animationTime) {\n var animationStart = entry.animationStart, animationEnd = entry.animationEnd;\n var duration = animationEnd - animationStart;\n var trackLastWrapped = entry.trackLast % duration;\n var events = this.events;\n var i = 0, n = events.length;\n for (; i < n; i++) {\n var event_1 = events[i];\n if (event_1.time < trackLastWrapped)\n break;\n if (event_1.time > animationEnd)\n continue;\n this.queue.event(entry, event_1);\n }\n var complete = false;\n if (entry.loop)\n complete = duration == 0 || trackLastWrapped > entry.trackTime % duration;\n else\n complete = animationTime >= animationEnd && entry.animationLast < animationEnd;\n if (complete)\n this.queue.complete(entry);\n for (; i < n; i++) {\n var event_2 = events[i];\n if (event_2.time < animationStart)\n continue;\n this.queue.event(entry, events[i]);\n }\n };\n AnimationState.prototype.clearTracks = function () {\n var oldDrainDisabled = this.queue.drainDisabled;\n this.queue.drainDisabled = true;\n for (var i = 0, n = this.tracks.length; i < n; i++)\n this.clearTrack(i);\n this.tracks.length = 0;\n this.queue.drainDisabled = oldDrainDisabled;\n this.queue.drain();\n };\n AnimationState.prototype.clearTrack = function (trackIndex) {\n if (trackIndex >= this.tracks.length)\n return;\n var current = this.tracks[trackIndex];\n if (current == null)\n return;\n this.queue.end(current);\n this.disposeNext(current);\n var entry = current;\n while (true) {\n var from = entry.mixingFrom;\n if (from == null)\n break;\n this.queue.end(from);\n entry.mixingFrom = null;\n entry.mixingTo = null;\n entry = from;\n }\n this.tracks[current.trackIndex] = null;\n this.queue.drain();\n };\n AnimationState.prototype.setCurrent = function (index, current, interrupt) {\n var from = this.expandToIndex(index);\n this.tracks[index] = current;\n if (from != null) {\n if (interrupt)\n this.queue.interrupt(from);\n current.mixingFrom = from;\n from.mixingTo = current;\n current.mixTime = 0;\n if (from.mixingFrom != null && from.mixDuration > 0)\n current.interruptAlpha *= Math.min(1, from.mixTime / from.mixDuration);\n from.timelinesRotation.length = 0;\n }\n this.queue.start(current);\n };\n AnimationState.prototype.setAnimation = function (trackIndex, animationName, loop) {\n var animation = this.data.skeletonData.findAnimation(animationName);\n if (animation == null)\n throw new Error(\"Animation not found: \" + animationName);\n return this.setAnimationWith(trackIndex, animation, loop);\n };\n AnimationState.prototype.setAnimationWith = function (trackIndex, animation, loop) {\n if (animation == null)\n throw new Error(\"animation cannot be null.\");\n var interrupt = true;\n var current = this.expandToIndex(trackIndex);\n if (current != null) {\n if (current.nextTrackLast == -1) {\n this.tracks[trackIndex] = current.mixingFrom;\n this.queue.interrupt(current);\n this.queue.end(current);\n this.disposeNext(current);\n current = current.mixingFrom;\n interrupt = false;\n }\n else\n this.disposeNext(current);\n }\n var entry = this.trackEntry(trackIndex, animation, loop, current);\n this.setCurrent(trackIndex, entry, interrupt);\n this.queue.drain();\n return entry;\n };\n AnimationState.prototype.addAnimation = function (trackIndex, animationName, loop, delay) {\n var animation = this.data.skeletonData.findAnimation(animationName);\n if (animation == null)\n throw new Error(\"Animation not found: \" + animationName);\n return this.addAnimationWith(trackIndex, animation, loop, delay);\n };\n AnimationState.prototype.addAnimationWith = function (trackIndex, animation, loop, delay) {\n if (animation == null)\n throw new Error(\"animation cannot be null.\");\n var last = this.expandToIndex(trackIndex);\n if (last != null) {\n while (last.next != null)\n last = last.next;\n }\n var entry = this.trackEntry(trackIndex, animation, loop, last);\n if (last == null) {\n this.setCurrent(trackIndex, entry, true);\n this.queue.drain();\n }\n else {\n last.next = entry;\n if (delay <= 0) {\n var duration = last.animationEnd - last.animationStart;\n if (duration != 0) {\n if (last.loop)\n delay += duration * (1 + ((last.trackTime / duration) | 0));\n else\n delay += Math.max(duration, last.trackTime);\n delay -= this.data.getMix(last.animation, animation);\n }\n else\n delay = last.trackTime;\n }\n }\n entry.delay = delay;\n return entry;\n };\n AnimationState.prototype.setEmptyAnimation = function (trackIndex, mixDuration) {\n var entry = this.setAnimationWith(trackIndex, AnimationState.emptyAnimation, false);\n entry.mixDuration = mixDuration;\n entry.trackEnd = mixDuration;\n return entry;\n };\n AnimationState.prototype.addEmptyAnimation = function (trackIndex, mixDuration, delay) {\n if (delay <= 0)\n delay -= mixDuration;\n var entry = this.addAnimationWith(trackIndex, AnimationState.emptyAnimation, false, delay);\n entry.mixDuration = mixDuration;\n entry.trackEnd = mixDuration;\n return entry;\n };\n AnimationState.prototype.setEmptyAnimations = function (mixDuration) {\n var oldDrainDisabled = this.queue.drainDisabled;\n this.queue.drainDisabled = true;\n for (var i = 0, n = this.tracks.length; i < n; i++) {\n var current = this.tracks[i];\n if (current != null)\n this.setEmptyAnimation(current.trackIndex, mixDuration);\n }\n this.queue.drainDisabled = oldDrainDisabled;\n this.queue.drain();\n };\n AnimationState.prototype.expandToIndex = function (index) {\n if (index < this.tracks.length)\n return this.tracks[index];\n spine.Utils.ensureArrayCapacity(this.tracks, index + 1, null);\n this.tracks.length = index + 1;\n return null;\n };\n AnimationState.prototype.trackEntry = function (trackIndex, animation, loop, last) {\n var entry = this.trackEntryPool.obtain();\n entry.trackIndex = trackIndex;\n entry.animation = animation;\n entry.loop = loop;\n entry.holdPrevious = false;\n entry.eventThreshold = 0;\n entry.attachmentThreshold = 0;\n entry.drawOrderThreshold = 0;\n entry.animationStart = 0;\n entry.animationEnd = animation.duration;\n entry.animationLast = -1;\n entry.nextAnimationLast = -1;\n entry.delay = 0;\n entry.trackTime = 0;\n entry.trackLast = -1;\n entry.nextTrackLast = -1;\n entry.trackEnd = Number.MAX_VALUE;\n entry.timeScale = 1;\n entry.alpha = 1;\n entry.interruptAlpha = 1;\n entry.mixTime = 0;\n entry.mixDuration = last == null ? 0 : this.data.getMix(last.animation, animation);\n entry.mixBlend = spine.MixBlend.replace;\n return entry;\n };\n AnimationState.prototype.disposeNext = function (entry) {\n var next = entry.next;\n while (next != null) {\n this.queue.dispose(next);\n next = next.next;\n }\n entry.next = null;\n };\n AnimationState.prototype._animationsChanged = function () {\n this.animationsChanged = false;\n this.propertyIDs.clear();\n for (var i = 0, n = this.tracks.length; i < n; i++) {\n var entry = this.tracks[i];\n if (entry == null)\n continue;\n while (entry.mixingFrom != null)\n entry = entry.mixingFrom;\n do {\n if (entry.mixingFrom == null || entry.mixBlend != spine.MixBlend.add)\n this.computeHold(entry);\n entry = entry.mixingTo;\n } while (entry != null);\n }\n };\n AnimationState.prototype.computeHold = function (entry) {\n var to = entry.mixingTo;\n var timelines = entry.animation.timelines;\n var timelinesCount = entry.animation.timelines.length;\n var timelineMode = spine.Utils.setArraySize(entry.timelineMode, timelinesCount);\n entry.timelineHoldMix.length = 0;\n var timelineDipMix = spine.Utils.setArraySize(entry.timelineHoldMix, timelinesCount);\n var propertyIDs = this.propertyIDs;\n if (to != null && to.holdPrevious) {\n for (var i = 0; i < timelinesCount; i++) {\n timelineMode[i] = propertyIDs.add(timelines[i].getPropertyId()) ? AnimationState.HOLD_FIRST : AnimationState.HOLD_SUBSEQUENT;\n }\n return;\n }\n outer: for (var i = 0; i < timelinesCount; i++) {\n var timeline = timelines[i];\n var id = timeline.getPropertyId();\n if (!propertyIDs.add(id))\n timelineMode[i] = AnimationState.SUBSEQUENT;\n else if (to == null || timeline instanceof spine.AttachmentTimeline || timeline instanceof spine.DrawOrderTimeline\n || timeline instanceof spine.EventTimeline || !to.animation.hasTimeline(id)) {\n timelineMode[i] = AnimationState.FIRST;\n }\n else {\n for (var next = to.mixingTo; next != null; next = next.mixingTo) {\n if (next.animation.hasTimeline(id))\n continue;\n if (entry.mixDuration > 0) {\n timelineMode[i] = AnimationState.HOLD_MIX;\n timelineDipMix[i] = next;\n continue outer;\n }\n break;\n }\n timelineMode[i] = AnimationState.HOLD_FIRST;\n }\n }\n };\n AnimationState.prototype.getCurrent = function (trackIndex) {\n if (trackIndex >= this.tracks.length)\n return null;\n return this.tracks[trackIndex];\n };\n AnimationState.prototype.addListener = function (listener) {\n if (listener == null)\n throw new Error(\"listener cannot be null.\");\n this.listeners.push(listener);\n };\n AnimationState.prototype.removeListener = function (listener) {\n var index = this.listeners.indexOf(listener);\n if (index >= 0)\n this.listeners.splice(index, 1);\n };\n AnimationState.prototype.clearListeners = function () {\n this.listeners.length = 0;\n };\n AnimationState.prototype.clearListenerNotifications = function () {\n this.queue.clear();\n };\n AnimationState.emptyAnimation = new spine.Animation(\"\", [], 0);\n AnimationState.SUBSEQUENT = 0;\n AnimationState.FIRST = 1;\n AnimationState.HOLD_SUBSEQUENT = 2;\n AnimationState.HOLD_FIRST = 3;\n AnimationState.HOLD_MIX = 4;\n AnimationState.SETUP = 1;\n AnimationState.CURRENT = 2;\n return AnimationState;\n }());\n spine.AnimationState = AnimationState;\n var TrackEntry = (function () {\n function TrackEntry() {\n this.mixBlend = spine.MixBlend.replace;\n this.timelineMode = new Array();\n this.timelineHoldMix = new Array();\n this.timelinesRotation = new Array();\n }\n TrackEntry.prototype.reset = function () {\n this.next = null;\n this.mixingFrom = null;\n this.mixingTo = null;\n this.animation = null;\n this.listener = null;\n this.timelineMode.length = 0;\n this.timelineHoldMix.length = 0;\n this.timelinesRotation.length = 0;\n };\n TrackEntry.prototype.getAnimationTime = function () {\n if (this.loop) {\n var duration = this.animationEnd - this.animationStart;\n if (duration == 0)\n return this.animationStart;\n return (this.trackTime % duration) + this.animationStart;\n }\n return Math.min(this.trackTime + this.animationStart, this.animationEnd);\n };\n TrackEntry.prototype.setAnimationLast = function (animationLast) {\n this.animationLast = animationLast;\n this.nextAnimationLast = animationLast;\n };\n TrackEntry.prototype.isComplete = function () {\n return this.trackTime >= this.animationEnd - this.animationStart;\n };\n TrackEntry.prototype.resetRotationDirections = function () {\n this.timelinesRotation.length = 0;\n };\n return TrackEntry;\n }());\n spine.TrackEntry = TrackEntry;\n var EventQueue = (function () {\n function EventQueue(animState) {\n this.objects = [];\n this.drainDisabled = false;\n this.animState = animState;\n }\n EventQueue.prototype.start = function (entry) {\n this.objects.push(EventType.start);\n this.objects.push(entry);\n this.animState.animationsChanged = true;\n };\n EventQueue.prototype.interrupt = function (entry) {\n this.objects.push(EventType.interrupt);\n this.objects.push(entry);\n };\n EventQueue.prototype.end = function (entry) {\n this.objects.push(EventType.end);\n this.objects.push(entry);\n this.animState.animationsChanged = true;\n };\n EventQueue.prototype.dispose = function (entry) {\n this.objects.push(EventType.dispose);\n this.objects.push(entry);\n };\n EventQueue.prototype.complete = function (entry) {\n this.objects.push(EventType.complete);\n this.objects.push(entry);\n };\n EventQueue.prototype.event = function (entry, event) {\n this.objects.push(EventType.event);\n this.objects.push(entry);\n this.objects.push(event);\n };\n EventQueue.prototype.drain = function () {\n if (this.drainDisabled)\n return;\n this.drainDisabled = true;\n var objects = this.objects;\n var listeners = this.animState.listeners;\n for (var i = 0; i < objects.length; i += 2) {\n var type = objects[i];\n var entry = objects[i + 1];\n switch (type) {\n case EventType.start:\n if (entry.listener != null && entry.listener.start)\n entry.listener.start(entry);\n for (var ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].start)\n listeners[ii].start(entry);\n break;\n case EventType.interrupt:\n if (entry.listener != null && entry.listener.interrupt)\n entry.listener.interrupt(entry);\n for (var ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].interrupt)\n listeners[ii].interrupt(entry);\n break;\n case EventType.end:\n if (entry.listener != null && entry.listener.end)\n entry.listener.end(entry);\n for (var ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].end)\n listeners[ii].end(entry);\n case EventType.dispose:\n if (entry.listener != null && entry.listener.dispose)\n entry.listener.dispose(entry);\n for (var ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].dispose)\n listeners[ii].dispose(entry);\n this.animState.trackEntryPool.free(entry);\n break;\n case EventType.complete:\n if (entry.listener != null && entry.listener.complete)\n entry.listener.complete(entry);\n for (var ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].complete)\n listeners[ii].complete(entry);\n break;\n case EventType.event:\n var event_3 = objects[i++ + 2];\n if (entry.listener != null && entry.listener.event)\n entry.listener.event(entry, event_3);\n for (var ii = 0; ii < listeners.length; ii++)\n if (listeners[ii].event)\n listeners[ii].event(entry, event_3);\n break;\n }\n }\n this.clear();\n this.drainDisabled = false;\n };\n EventQueue.prototype.clear = function () {\n this.objects.length = 0;\n };\n return EventQueue;\n }());\n spine.EventQueue = EventQueue;\n var EventType;\n (function (EventType) {\n EventType[EventType[\"start\"] = 0] = \"start\";\n EventType[EventType[\"interrupt\"] = 1] = \"interrupt\";\n EventType[EventType[\"end\"] = 2] = \"end\";\n EventType[EventType[\"dispose\"] = 3] = \"dispose\";\n EventType[EventType[\"complete\"] = 4] = \"complete\";\n EventType[EventType[\"event\"] = 5] = \"event\";\n })(EventType = spine.EventType || (spine.EventType = {}));\n var AnimationStateAdapter = (function () {\n function AnimationStateAdapter() {\n }\n AnimationStateAdapter.prototype.start = function (entry) {\n };\n AnimationStateAdapter.prototype.interrupt = function (entry) {\n };\n AnimationStateAdapter.prototype.end = function (entry) {\n };\n AnimationStateAdapter.prototype.dispose = function (entry) {\n };\n AnimationStateAdapter.prototype.complete = function (entry) {\n };\n AnimationStateAdapter.prototype.event = function (entry, event) {\n };\n return AnimationStateAdapter;\n }());\n spine.AnimationStateAdapter = AnimationStateAdapter;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var AnimationStateData = (function () {\n function AnimationStateData(skeletonData) {\n this.animationToMixTime = {};\n this.defaultMix = 0;\n if (skeletonData == null)\n throw new Error(\"skeletonData cannot be null.\");\n this.skeletonData = skeletonData;\n }\n AnimationStateData.prototype.setMix = function (fromName, toName, duration) {\n var from = this.skeletonData.findAnimation(fromName);\n if (from == null)\n throw new Error(\"Animation not found: \" + fromName);\n var to = this.skeletonData.findAnimation(toName);\n if (to == null)\n throw new Error(\"Animation not found: \" + toName);\n this.setMixWith(from, to, duration);\n };\n AnimationStateData.prototype.setMixWith = function (from, to, duration) {\n if (from == null)\n throw new Error(\"from cannot be null.\");\n if (to == null)\n throw new Error(\"to cannot be null.\");\n var key = from.name + \".\" + to.name;\n this.animationToMixTime[key] = duration;\n };\n AnimationStateData.prototype.getMix = function (from, to) {\n var key = from.name + \".\" + to.name;\n var value = this.animationToMixTime[key];\n return value === undefined ? this.defaultMix : value;\n };\n return AnimationStateData;\n }());\n spine.AnimationStateData = AnimationStateData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var AssetManager = (function () {\n function AssetManager(textureLoader, pathPrefix) {\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\n this.assets = {};\n this.errors = {};\n this.toLoad = 0;\n this.loaded = 0;\n this.rawDataUris = {};\n this.textureLoader = textureLoader;\n this.pathPrefix = pathPrefix;\n }\n AssetManager.prototype.downloadText = function (url, success, error) {\n var request = new XMLHttpRequest();\n request.overrideMimeType(\"text/html\");\n if (this.rawDataUris[url])\n url = this.rawDataUris[url];\n request.open(\"GET\", url, true);\n request.onload = function () {\n if (request.status == 200) {\n success(request.responseText);\n }\n else {\n error(request.status, request.responseText);\n }\n };\n request.onerror = function () {\n error(request.status, request.responseText);\n };\n request.send();\n };\n AssetManager.prototype.downloadBinary = function (url, success, error) {\n var request = new XMLHttpRequest();\n if (this.rawDataUris[url])\n url = this.rawDataUris[url];\n request.open(\"GET\", url, true);\n request.responseType = \"arraybuffer\";\n request.onload = function () {\n if (request.status == 200) {\n success(new Uint8Array(request.response));\n }\n else {\n error(request.status, request.responseText);\n }\n };\n request.onerror = function () {\n error(request.status, request.responseText);\n };\n request.send();\n };\n AssetManager.prototype.setRawDataURI = function (path, data) {\n this.rawDataUris[this.pathPrefix + path] = data;\n };\n AssetManager.prototype.loadBinary = function (path, success, error) {\n var _this = this;\n if (success === void 0) { success = null; }\n if (error === void 0) { error = null; }\n path = this.pathPrefix + path;\n this.toLoad++;\n this.downloadBinary(path, function (data) {\n _this.assets[path] = data;\n if (success)\n success(path, data);\n _this.toLoad--;\n _this.loaded++;\n }, function (state, responseText) {\n _this.errors[path] = \"Couldn't load binary \" + path + \": status \" + status + \", \" + responseText;\n if (error)\n error(path, \"Couldn't load binary \" + path + \": status \" + status + \", \" + responseText);\n _this.toLoad--;\n _this.loaded++;\n });\n };\n AssetManager.prototype.loadText = function (path, success, error) {\n var _this = this;\n if (success === void 0) { success = null; }\n if (error === void 0) { error = null; }\n path = this.pathPrefix + path;\n this.toLoad++;\n this.downloadText(path, function (data) {\n _this.assets[path] = data;\n if (success)\n success(path, data);\n _this.toLoad--;\n _this.loaded++;\n }, function (state, responseText) {\n _this.errors[path] = \"Couldn't load text \" + path + \": status \" + status + \", \" + responseText;\n if (error)\n error(path, \"Couldn't load text \" + path + \": status \" + status + \", \" + responseText);\n _this.toLoad--;\n _this.loaded++;\n });\n };\n AssetManager.prototype.loadTexture = function (path, success, error) {\n var _this = this;\n if (success === void 0) { success = null; }\n if (error === void 0) { error = null; }\n path = this.pathPrefix + path;\n var storagePath = path;\n this.toLoad++;\n var img = new Image();\n img.crossOrigin = \"anonymous\";\n img.onload = function (ev) {\n var texture = _this.textureLoader(img);\n _this.assets[storagePath] = texture;\n _this.toLoad--;\n _this.loaded++;\n if (success)\n success(path, img);\n };\n img.onerror = function (ev) {\n _this.errors[path] = \"Couldn't load image \" + path;\n _this.toLoad--;\n _this.loaded++;\n if (error)\n error(path, \"Couldn't load image \" + path);\n };\n if (this.rawDataUris[path])\n path = this.rawDataUris[path];\n img.src = path;\n };\n AssetManager.prototype.loadTextureAtlas = function (path, success, error) {\n var _this = this;\n if (success === void 0) { success = null; }\n if (error === void 0) { error = null; }\n var parent = path.lastIndexOf(\"/\") >= 0 ? path.substring(0, path.lastIndexOf(\"/\")) : \"\";\n path = this.pathPrefix + path;\n this.toLoad++;\n this.downloadText(path, function (atlasData) {\n var pagesLoaded = { count: 0 };\n var atlasPages = new Array();\n try {\n var atlas = new spine.TextureAtlas(atlasData, function (path) {\n atlasPages.push(parent == \"\" ? path : parent + \"/\" + path);\n var image = document.createElement(\"img\");\n image.width = 16;\n image.height = 16;\n return new spine.FakeTexture(image);\n });\n }\n catch (e) {\n var ex = e;\n _this.errors[path] = \"Couldn't load texture atlas \" + path + \": \" + ex.message;\n if (error)\n error(path, \"Couldn't load texture atlas \" + path + \": \" + ex.message);\n _this.toLoad--;\n _this.loaded++;\n return;\n }\n var _loop_1 = function (atlasPage) {\n var pageLoadError = false;\n _this.loadTexture(atlasPage, function (imagePath, image) {\n pagesLoaded.count++;\n if (pagesLoaded.count == atlasPages.length) {\n if (!pageLoadError) {\n try {\n var atlas = new spine.TextureAtlas(atlasData, function (path) {\n return _this.get(parent == \"\" ? path : parent + \"/\" + path);\n });\n _this.assets[path] = atlas;\n if (success)\n success(path, atlas);\n _this.toLoad--;\n _this.loaded++;\n }\n catch (e) {\n var ex = e;\n _this.errors[path] = \"Couldn't load texture atlas \" + path + \": \" + ex.message;\n if (error)\n error(path, \"Couldn't load texture atlas \" + path + \": \" + ex.message);\n _this.toLoad--;\n _this.loaded++;\n }\n }\n else {\n _this.errors[path] = \"Couldn't load texture atlas page \" + imagePath + \"} of atlas \" + path;\n if (error)\n error(path, \"Couldn't load texture atlas page \" + imagePath + \" of atlas \" + path);\n _this.toLoad--;\n _this.loaded++;\n }\n }\n }, function (imagePath, errorMessage) {\n pageLoadError = true;\n pagesLoaded.count++;\n if (pagesLoaded.count == atlasPages.length) {\n _this.errors[path] = \"Couldn't load texture atlas page \" + imagePath + \"} of atlas \" + path;\n if (error)\n error(path, \"Couldn't load texture atlas page \" + imagePath + \" of atlas \" + path);\n _this.toLoad--;\n _this.loaded++;\n }\n });\n };\n for (var _i = 0, atlasPages_1 = atlasPages; _i < atlasPages_1.length; _i++) {\n var atlasPage = atlasPages_1[_i];\n _loop_1(atlasPage);\n }\n }, function (state, responseText) {\n _this.errors[path] = \"Couldn't load texture atlas \" + path + \": status \" + status + \", \" + responseText;\n if (error)\n error(path, \"Couldn't load texture atlas \" + path + \": status \" + status + \", \" + responseText);\n _this.toLoad--;\n _this.loaded++;\n });\n };\n AssetManager.prototype.get = function (path) {\n path = this.pathPrefix + path;\n return this.assets[path];\n };\n AssetManager.prototype.remove = function (path) {\n path = this.pathPrefix + path;\n var asset = this.assets[path];\n if (asset.dispose)\n asset.dispose();\n this.assets[path] = null;\n };\n AssetManager.prototype.removeAll = function () {\n for (var key in this.assets) {\n var asset = this.assets[key];\n if (asset.dispose)\n asset.dispose();\n }\n this.assets = {};\n };\n AssetManager.prototype.isLoadingComplete = function () {\n return this.toLoad == 0;\n };\n AssetManager.prototype.getToLoad = function () {\n return this.toLoad;\n };\n AssetManager.prototype.getLoaded = function () {\n return this.loaded;\n };\n AssetManager.prototype.dispose = function () {\n this.removeAll();\n };\n AssetManager.prototype.hasErrors = function () {\n return Object.keys(this.errors).length > 0;\n };\n AssetManager.prototype.getErrors = function () {\n return this.errors;\n };\n return AssetManager;\n }());\n spine.AssetManager = AssetManager;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var AtlasAttachmentLoader = (function () {\n function AtlasAttachmentLoader(atlas) {\n this.atlas = atlas;\n }\n AtlasAttachmentLoader.prototype.newRegionAttachment = function (skin, name, path) {\n var region = this.atlas.findRegion(path);\n if (region == null)\n throw new Error(\"Region not found in atlas: \" + path + \" (region attachment: \" + name + \")\");\n region.renderObject = region;\n var attachment = new spine.RegionAttachment(name);\n attachment.setRegion(region);\n return attachment;\n };\n AtlasAttachmentLoader.prototype.newMeshAttachment = function (skin, name, path) {\n var region = this.atlas.findRegion(path);\n if (region == null)\n throw new Error(\"Region not found in atlas: \" + path + \" (mesh attachment: \" + name + \")\");\n region.renderObject = region;\n var attachment = new spine.MeshAttachment(name);\n attachment.region = region;\n return attachment;\n };\n AtlasAttachmentLoader.prototype.newBoundingBoxAttachment = function (skin, name) {\n return new spine.BoundingBoxAttachment(name);\n };\n AtlasAttachmentLoader.prototype.newPathAttachment = function (skin, name) {\n return new spine.PathAttachment(name);\n };\n AtlasAttachmentLoader.prototype.newPointAttachment = function (skin, name) {\n return new spine.PointAttachment(name);\n };\n AtlasAttachmentLoader.prototype.newClippingAttachment = function (skin, name) {\n return new spine.ClippingAttachment(name);\n };\n return AtlasAttachmentLoader;\n }());\n spine.AtlasAttachmentLoader = AtlasAttachmentLoader;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var BlendMode;\n (function (BlendMode) {\n BlendMode[BlendMode[\"Normal\"] = 0] = \"Normal\";\n BlendMode[BlendMode[\"Additive\"] = 1] = \"Additive\";\n BlendMode[BlendMode[\"Multiply\"] = 2] = \"Multiply\";\n BlendMode[BlendMode[\"Screen\"] = 3] = \"Screen\";\n })(BlendMode = spine.BlendMode || (spine.BlendMode = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Bone = (function () {\n function Bone(data, skeleton, parent) {\n this.children = new Array();\n this.x = 0;\n this.y = 0;\n this.rotation = 0;\n this.scaleX = 0;\n this.scaleY = 0;\n this.shearX = 0;\n this.shearY = 0;\n this.ax = 0;\n this.ay = 0;\n this.arotation = 0;\n this.ascaleX = 0;\n this.ascaleY = 0;\n this.ashearX = 0;\n this.ashearY = 0;\n this.appliedValid = false;\n this.a = 0;\n this.b = 0;\n this.c = 0;\n this.d = 0;\n this.worldY = 0;\n this.worldX = 0;\n this.sorted = false;\n this.active = false;\n if (data == null)\n throw new Error(\"data cannot be null.\");\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.skeleton = skeleton;\n this.parent = parent;\n this.setToSetupPose();\n }\n Bone.prototype.isActive = function () {\n return this.active;\n };\n Bone.prototype.update = function () {\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\n };\n Bone.prototype.updateWorldTransform = function () {\n this.updateWorldTransformWith(this.x, this.y, this.rotation, this.scaleX, this.scaleY, this.shearX, this.shearY);\n };\n Bone.prototype.updateWorldTransformWith = function (x, y, rotation, scaleX, scaleY, shearX, shearY) {\n this.ax = x;\n this.ay = y;\n this.arotation = rotation;\n this.ascaleX = scaleX;\n this.ascaleY = scaleY;\n this.ashearX = shearX;\n this.ashearY = shearY;\n this.appliedValid = true;\n var parent = this.parent;\n if (parent == null) {\n var skeleton = this.skeleton;\n var rotationY = rotation + 90 + shearY;\n var sx = skeleton.scaleX;\n var sy = skeleton.scaleY;\n this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX * sx;\n this.b = spine.MathUtils.cosDeg(rotationY) * scaleY * sx;\n this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX * sy;\n this.d = spine.MathUtils.sinDeg(rotationY) * scaleY * sy;\n this.worldX = x * sx + skeleton.x;\n this.worldY = y * sy + skeleton.y;\n return;\n }\n var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\n this.worldX = pa * x + pb * y + parent.worldX;\n this.worldY = pc * x + pd * y + parent.worldY;\n switch (this.data.transformMode) {\n case spine.TransformMode.Normal: {\n var rotationY = rotation + 90 + shearY;\n var la = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\n var lb = spine.MathUtils.cosDeg(rotationY) * scaleY;\n var lc = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\n var ld = spine.MathUtils.sinDeg(rotationY) * scaleY;\n this.a = pa * la + pb * lc;\n this.b = pa * lb + pb * ld;\n this.c = pc * la + pd * lc;\n this.d = pc * lb + pd * ld;\n return;\n }\n case spine.TransformMode.OnlyTranslation: {\n var rotationY = rotation + 90 + shearY;\n this.a = spine.MathUtils.cosDeg(rotation + shearX) * scaleX;\n this.b = spine.MathUtils.cosDeg(rotationY) * scaleY;\n this.c = spine.MathUtils.sinDeg(rotation + shearX) * scaleX;\n this.d = spine.MathUtils.sinDeg(rotationY) * scaleY;\n break;\n }\n case spine.TransformMode.NoRotationOrReflection: {\n var s = pa * pa + pc * pc;\n var prx = 0;\n if (s > 0.0001) {\n s = Math.abs(pa * pd - pb * pc) / s;\n pa /= this.skeleton.scaleX;\n pc /= this.skeleton.scaleY;\n pb = pc * s;\n pd = pa * s;\n prx = Math.atan2(pc, pa) * spine.MathUtils.radDeg;\n }\n else {\n pa = 0;\n pc = 0;\n prx = 90 - Math.atan2(pd, pb) * spine.MathUtils.radDeg;\n }\n var rx = rotation + shearX - prx;\n var ry = rotation + shearY - prx + 90;\n var la = spine.MathUtils.cosDeg(rx) * scaleX;\n var lb = spine.MathUtils.cosDeg(ry) * scaleY;\n var lc = spine.MathUtils.sinDeg(rx) * scaleX;\n var ld = spine.MathUtils.sinDeg(ry) * scaleY;\n this.a = pa * la - pb * lc;\n this.b = pa * lb - pb * ld;\n this.c = pc * la + pd * lc;\n this.d = pc * lb + pd * ld;\n break;\n }\n case spine.TransformMode.NoScale:\n case spine.TransformMode.NoScaleOrReflection: {\n var cos = spine.MathUtils.cosDeg(rotation);\n var sin = spine.MathUtils.sinDeg(rotation);\n var za = (pa * cos + pb * sin) / this.skeleton.scaleX;\n var zc = (pc * cos + pd * sin) / this.skeleton.scaleY;\n var s = Math.sqrt(za * za + zc * zc);\n if (s > 0.00001)\n s = 1 / s;\n za *= s;\n zc *= s;\n s = Math.sqrt(za * za + zc * zc);\n if (this.data.transformMode == spine.TransformMode.NoScale\n && (pa * pd - pb * pc < 0) != (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0))\n s = -s;\n var r = Math.PI / 2 + Math.atan2(zc, za);\n var zb = Math.cos(r) * s;\n var zd = Math.sin(r) * s;\n var la = spine.MathUtils.cosDeg(shearX) * scaleX;\n var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;\n var lc = spine.MathUtils.sinDeg(shearX) * scaleX;\n var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;\n this.a = za * la + zb * lc;\n this.b = za * lb + zb * ld;\n this.c = zc * la + zd * lc;\n this.d = zc * lb + zd * ld;\n break;\n }\n }\n this.a *= this.skeleton.scaleX;\n this.b *= this.skeleton.scaleX;\n this.c *= this.skeleton.scaleY;\n this.d *= this.skeleton.scaleY;\n };\n Bone.prototype.setToSetupPose = function () {\n var data = this.data;\n this.x = data.x;\n this.y = data.y;\n this.rotation = data.rotation;\n this.scaleX = data.scaleX;\n this.scaleY = data.scaleY;\n this.shearX = data.shearX;\n this.shearY = data.shearY;\n };\n Bone.prototype.getWorldRotationX = function () {\n return Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\n };\n Bone.prototype.getWorldRotationY = function () {\n return Math.atan2(this.d, this.b) * spine.MathUtils.radDeg;\n };\n Bone.prototype.getWorldScaleX = function () {\n return Math.sqrt(this.a * this.a + this.c * this.c);\n };\n Bone.prototype.getWorldScaleY = function () {\n return Math.sqrt(this.b * this.b + this.d * this.d);\n };\n Bone.prototype.updateAppliedTransform = function () {\n this.appliedValid = true;\n var parent = this.parent;\n if (parent == null) {\n this.ax = this.worldX;\n this.ay = this.worldY;\n this.arotation = Math.atan2(this.c, this.a) * spine.MathUtils.radDeg;\n this.ascaleX = Math.sqrt(this.a * this.a + this.c * this.c);\n this.ascaleY = Math.sqrt(this.b * this.b + this.d * this.d);\n this.ashearX = 0;\n this.ashearY = Math.atan2(this.a * this.b + this.c * this.d, this.a * this.d - this.b * this.c) * spine.MathUtils.radDeg;\n return;\n }\n var pa = parent.a, pb = parent.b, pc = parent.c, pd = parent.d;\n var pid = 1 / (pa * pd - pb * pc);\n var dx = this.worldX - parent.worldX, dy = this.worldY - parent.worldY;\n this.ax = (dx * pd * pid - dy * pb * pid);\n this.ay = (dy * pa * pid - dx * pc * pid);\n var ia = pid * pd;\n var id = pid * pa;\n var ib = pid * pb;\n var ic = pid * pc;\n var ra = ia * this.a - ib * this.c;\n var rb = ia * this.b - ib * this.d;\n var rc = id * this.c - ic * this.a;\n var rd = id * this.d - ic * this.b;\n this.ashearX = 0;\n this.ascaleX = Math.sqrt(ra * ra + rc * rc);\n if (this.ascaleX > 0.0001) {\n var det = ra * rd - rb * rc;\n this.ascaleY = det / this.ascaleX;\n this.ashearY = Math.atan2(ra * rb + rc * rd, det) * spine.MathUtils.radDeg;\n this.arotation = Math.atan2(rc, ra) * spine.MathUtils.radDeg;\n }\n else {\n this.ascaleX = 0;\n this.ascaleY = Math.sqrt(rb * rb + rd * rd);\n this.ashearY = 0;\n this.arotation = 90 - Math.atan2(rd, rb) * spine.MathUtils.radDeg;\n }\n };\n Bone.prototype.worldToLocal = function (world) {\n var a = this.a, b = this.b, c = this.c, d = this.d;\n var invDet = 1 / (a * d - b * c);\n var x = world.x - this.worldX, y = world.y - this.worldY;\n world.x = (x * d * invDet - y * b * invDet);\n world.y = (y * a * invDet - x * c * invDet);\n return world;\n };\n Bone.prototype.localToWorld = function (local) {\n var x = local.x, y = local.y;\n local.x = x * this.a + y * this.b + this.worldX;\n local.y = x * this.c + y * this.d + this.worldY;\n return local;\n };\n Bone.prototype.worldToLocalRotation = function (worldRotation) {\n var sin = spine.MathUtils.sinDeg(worldRotation), cos = spine.MathUtils.cosDeg(worldRotation);\n return Math.atan2(this.a * sin - this.c * cos, this.d * cos - this.b * sin) * spine.MathUtils.radDeg + this.rotation - this.shearX;\n };\n Bone.prototype.localToWorldRotation = function (localRotation) {\n localRotation -= this.rotation - this.shearX;\n var sin = spine.MathUtils.sinDeg(localRotation), cos = spine.MathUtils.cosDeg(localRotation);\n return Math.atan2(cos * this.c + sin * this.d, cos * this.a + sin * this.b) * spine.MathUtils.radDeg;\n };\n Bone.prototype.rotateWorld = function (degrees) {\n var a = this.a, b = this.b, c = this.c, d = this.d;\n var cos = spine.MathUtils.cosDeg(degrees), sin = spine.MathUtils.sinDeg(degrees);\n this.a = cos * a - sin * c;\n this.b = cos * b - sin * d;\n this.c = sin * a + cos * c;\n this.d = sin * b + cos * d;\n this.appliedValid = false;\n };\n return Bone;\n }());\n spine.Bone = Bone;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var BoneData = (function () {\n function BoneData(index, name, parent) {\n this.x = 0;\n this.y = 0;\n this.rotation = 0;\n this.scaleX = 1;\n this.scaleY = 1;\n this.shearX = 0;\n this.shearY = 0;\n this.transformMode = TransformMode.Normal;\n this.skinRequired = false;\n this.color = new spine.Color();\n if (index < 0)\n throw new Error(\"index must be >= 0.\");\n if (name == null)\n throw new Error(\"name cannot be null.\");\n this.index = index;\n this.name = name;\n this.parent = parent;\n }\n return BoneData;\n }());\n spine.BoneData = BoneData;\n var TransformMode;\n (function (TransformMode) {\n TransformMode[TransformMode[\"Normal\"] = 0] = \"Normal\";\n TransformMode[TransformMode[\"OnlyTranslation\"] = 1] = \"OnlyTranslation\";\n TransformMode[TransformMode[\"NoRotationOrReflection\"] = 2] = \"NoRotationOrReflection\";\n TransformMode[TransformMode[\"NoScale\"] = 3] = \"NoScale\";\n TransformMode[TransformMode[\"NoScaleOrReflection\"] = 4] = \"NoScaleOrReflection\";\n })(TransformMode = spine.TransformMode || (spine.TransformMode = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var ConstraintData = (function () {\n function ConstraintData(name, order, skinRequired) {\n this.name = name;\n this.order = order;\n this.skinRequired = skinRequired;\n }\n return ConstraintData;\n }());\n spine.ConstraintData = ConstraintData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Event = (function () {\n function Event(time, data) {\n if (data == null)\n throw new Error(\"data cannot be null.\");\n this.time = time;\n this.data = data;\n }\n return Event;\n }());\n spine.Event = Event;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var EventData = (function () {\n function EventData(name) {\n this.name = name;\n }\n return EventData;\n }());\n spine.EventData = EventData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var IkConstraint = (function () {\n function IkConstraint(data, skeleton) {\n this.bendDirection = 0;\n this.compress = false;\n this.stretch = false;\n this.mix = 1;\n this.softness = 0;\n this.active = false;\n if (data == null)\n throw new Error(\"data cannot be null.\");\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.mix = data.mix;\n this.softness = data.softness;\n this.bendDirection = data.bendDirection;\n this.compress = data.compress;\n this.stretch = data.stretch;\n this.bones = new Array();\n for (var i = 0; i < data.bones.length; i++)\n this.bones.push(skeleton.findBone(data.bones[i].name));\n this.target = skeleton.findBone(data.target.name);\n }\n IkConstraint.prototype.isActive = function () {\n return this.active;\n };\n IkConstraint.prototype.apply = function () {\n this.update();\n };\n IkConstraint.prototype.update = function () {\n var target = this.target;\n var bones = this.bones;\n switch (bones.length) {\n case 1:\n this.apply1(bones[0], target.worldX, target.worldY, this.compress, this.stretch, this.data.uniform, this.mix);\n break;\n case 2:\n this.apply2(bones[0], bones[1], target.worldX, target.worldY, this.bendDirection, this.stretch, this.softness, this.mix);\n break;\n }\n };\n IkConstraint.prototype.apply1 = function (bone, targetX, targetY, compress, stretch, uniform, alpha) {\n if (!bone.appliedValid)\n bone.updateAppliedTransform();\n var p = bone.parent;\n var pa = p.a, pb = p.b, pc = p.c, pd = p.d;\n var rotationIK = -bone.ashearX - bone.arotation, tx = 0, ty = 0;\n switch (bone.data.transformMode) {\n case spine.TransformMode.OnlyTranslation:\n tx = targetX - bone.worldX;\n ty = targetY - bone.worldY;\n break;\n case spine.TransformMode.NoRotationOrReflection:\n var s = Math.abs(pa * pd - pb * pc) / (pa * pa + pc * pc);\n var sa = pa / bone.skeleton.scaleX;\n var sc = pc / bone.skeleton.scaleY;\n pb = -sc * s * bone.skeleton.scaleX;\n pd = sa * s * bone.skeleton.scaleY;\n rotationIK += Math.atan2(sc, sa) * spine.MathUtils.radDeg;\n default:\n var x = targetX - p.worldX, y = targetY - p.worldY;\n var d = pa * pd - pb * pc;\n tx = (x * pd - y * pb) / d - bone.ax;\n ty = (y * pa - x * pc) / d - bone.ay;\n }\n rotationIK += Math.atan2(ty, tx) * spine.MathUtils.radDeg;\n if (bone.ascaleX < 0)\n rotationIK += 180;\n if (rotationIK > 180)\n rotationIK -= 360;\n else if (rotationIK < -180)\n rotationIK += 360;\n var sx = bone.ascaleX, sy = bone.ascaleY;\n if (compress || stretch) {\n switch (bone.data.transformMode) {\n case spine.TransformMode.NoScale:\n case spine.TransformMode.NoScaleOrReflection:\n tx = targetX - bone.worldX;\n ty = targetY - bone.worldY;\n }\n var b = bone.data.length * sx, dd = Math.sqrt(tx * tx + ty * ty);\n if ((compress && dd < b) || (stretch && dd > b) && b > 0.0001) {\n var s = (dd / b - 1) * alpha + 1;\n sx *= s;\n if (uniform)\n sy *= s;\n }\n }\n bone.updateWorldTransformWith(bone.ax, bone.ay, bone.arotation + rotationIK * alpha, sx, sy, bone.ashearX, bone.ashearY);\n };\n IkConstraint.prototype.apply2 = function (parent, child, targetX, targetY, bendDir, stretch, softness, alpha) {\n if (alpha == 0) {\n child.updateWorldTransform();\n return;\n }\n if (!parent.appliedValid)\n parent.updateAppliedTransform();\n if (!child.appliedValid)\n child.updateAppliedTransform();\n var px = parent.ax, py = parent.ay, psx = parent.ascaleX, sx = psx, psy = parent.ascaleY, csx = child.ascaleX;\n var os1 = 0, os2 = 0, s2 = 0;\n if (psx < 0) {\n psx = -psx;\n os1 = 180;\n s2 = -1;\n }\n else {\n os1 = 0;\n s2 = 1;\n }\n if (psy < 0) {\n psy = -psy;\n s2 = -s2;\n }\n if (csx < 0) {\n csx = -csx;\n os2 = 180;\n }\n else\n os2 = 0;\n var cx = child.ax, cy = 0, cwx = 0, cwy = 0, a = parent.a, b = parent.b, c = parent.c, d = parent.d;\n var u = Math.abs(psx - psy) <= 0.0001;\n if (!u) {\n cy = 0;\n cwx = a * cx + parent.worldX;\n cwy = c * cx + parent.worldY;\n }\n else {\n cy = child.ay;\n cwx = a * cx + b * cy + parent.worldX;\n cwy = c * cx + d * cy + parent.worldY;\n }\n var pp = parent.parent;\n a = pp.a;\n b = pp.b;\n c = pp.c;\n d = pp.d;\n var id = 1 / (a * d - b * c), x = cwx - pp.worldX, y = cwy - pp.worldY;\n var dx = (x * d - y * b) * id - px, dy = (y * a - x * c) * id - py;\n var l1 = Math.sqrt(dx * dx + dy * dy), l2 = child.data.length * csx, a1, a2;\n if (l1 < 0.0001) {\n this.apply1(parent, targetX, targetY, false, stretch, false, alpha);\n child.updateWorldTransformWith(cx, cy, 0, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\n return;\n }\n x = targetX - pp.worldX;\n y = targetY - pp.worldY;\n var tx = (x * d - y * b) * id - px, ty = (y * a - x * c) * id - py;\n var dd = tx * tx + ty * ty;\n if (softness != 0) {\n softness *= psx * (csx + 1) / 2;\n var td = Math.sqrt(dd), sd = td - l1 - l2 * psx + softness;\n if (sd > 0) {\n var p = Math.min(1, sd / (softness * 2)) - 1;\n p = (sd - softness * (1 - p * p)) / td;\n tx -= p * tx;\n ty -= p * ty;\n dd = tx * tx + ty * ty;\n }\n }\n outer: if (u) {\n l2 *= psx;\n var cos = (dd - l1 * l1 - l2 * l2) / (2 * l1 * l2);\n if (cos < -1)\n cos = -1;\n else if (cos > 1) {\n cos = 1;\n if (stretch)\n sx *= (Math.sqrt(dd) / (l1 + l2) - 1) * alpha + 1;\n }\n a2 = Math.acos(cos) * bendDir;\n a = l1 + l2 * cos;\n b = l2 * Math.sin(a2);\n a1 = Math.atan2(ty * a - tx * b, tx * a + ty * b);\n }\n else {\n a = psx * l2;\n b = psy * l2;\n var aa = a * a, bb = b * b, ta = Math.atan2(ty, tx);\n c = bb * l1 * l1 + aa * dd - aa * bb;\n var c1 = -2 * bb * l1, c2 = bb - aa;\n d = c1 * c1 - 4 * c2 * c;\n if (d >= 0) {\n var q = Math.sqrt(d);\n if (c1 < 0)\n q = -q;\n q = -(c1 + q) / 2;\n var r0 = q / c2, r1 = c / q;\n var r = Math.abs(r0) < Math.abs(r1) ? r0 : r1;\n if (r * r <= dd) {\n y = Math.sqrt(dd - r * r) * bendDir;\n a1 = ta - Math.atan2(y, r);\n a2 = Math.atan2(y / psy, (r - l1) / psx);\n break outer;\n }\n }\n var minAngle = spine.MathUtils.PI, minX = l1 - a, minDist = minX * minX, minY = 0;\n var maxAngle = 0, maxX = l1 + a, maxDist = maxX * maxX, maxY = 0;\n c = -a * l1 / (aa - bb);\n if (c >= -1 && c <= 1) {\n c = Math.acos(c);\n x = a * Math.cos(c) + l1;\n y = b * Math.sin(c);\n d = x * x + y * y;\n if (d < minDist) {\n minAngle = c;\n minDist = d;\n minX = x;\n minY = y;\n }\n if (d > maxDist) {\n maxAngle = c;\n maxDist = d;\n maxX = x;\n maxY = y;\n }\n }\n if (dd <= (minDist + maxDist) / 2) {\n a1 = ta - Math.atan2(minY * bendDir, minX);\n a2 = minAngle * bendDir;\n }\n else {\n a1 = ta - Math.atan2(maxY * bendDir, maxX);\n a2 = maxAngle * bendDir;\n }\n }\n var os = Math.atan2(cy, cx) * s2;\n var rotation = parent.arotation;\n a1 = (a1 - os) * spine.MathUtils.radDeg + os1 - rotation;\n if (a1 > 180)\n a1 -= 360;\n else if (a1 < -180)\n a1 += 360;\n parent.updateWorldTransformWith(px, py, rotation + a1 * alpha, sx, parent.ascaleY, 0, 0);\n rotation = child.arotation;\n a2 = ((a2 + os) * spine.MathUtils.radDeg - child.ashearX) * s2 + os2 - rotation;\n if (a2 > 180)\n a2 -= 360;\n else if (a2 < -180)\n a2 += 360;\n child.updateWorldTransformWith(cx, cy, rotation + a2 * alpha, child.ascaleX, child.ascaleY, child.ashearX, child.ashearY);\n };\n return IkConstraint;\n }());\n spine.IkConstraint = IkConstraint;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var IkConstraintData = (function (_super) {\n __extends(IkConstraintData, _super);\n function IkConstraintData(name) {\n var _this = _super.call(this, name, 0, false) || this;\n _this.bones = new Array();\n _this.bendDirection = 1;\n _this.compress = false;\n _this.stretch = false;\n _this.uniform = false;\n _this.mix = 1;\n _this.softness = 0;\n return _this;\n }\n return IkConstraintData;\n }(spine.ConstraintData));\n spine.IkConstraintData = IkConstraintData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var PathConstraint = (function () {\n function PathConstraint(data, skeleton) {\n this.position = 0;\n this.spacing = 0;\n this.rotateMix = 0;\n this.translateMix = 0;\n this.spaces = new Array();\n this.positions = new Array();\n this.world = new Array();\n this.curves = new Array();\n this.lengths = new Array();\n this.segments = new Array();\n this.active = false;\n if (data == null)\n throw new Error(\"data cannot be null.\");\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.bones = new Array();\n for (var i = 0, n = data.bones.length; i < n; i++)\n this.bones.push(skeleton.findBone(data.bones[i].name));\n this.target = skeleton.findSlot(data.target.name);\n this.position = data.position;\n this.spacing = data.spacing;\n this.rotateMix = data.rotateMix;\n this.translateMix = data.translateMix;\n }\n PathConstraint.prototype.isActive = function () {\n return this.active;\n };\n PathConstraint.prototype.apply = function () {\n this.update();\n };\n PathConstraint.prototype.update = function () {\n var attachment = this.target.getAttachment();\n if (!(attachment instanceof spine.PathAttachment))\n return;\n var rotateMix = this.rotateMix, translateMix = this.translateMix;\n var translate = translateMix > 0, rotate = rotateMix > 0;\n if (!translate && !rotate)\n return;\n var data = this.data;\n var percentSpacing = data.spacingMode == spine.SpacingMode.Percent;\n var rotateMode = data.rotateMode;\n var tangents = rotateMode == spine.RotateMode.Tangent, scale = rotateMode == spine.RotateMode.ChainScale;\n var boneCount = this.bones.length, spacesCount = tangents ? boneCount : boneCount + 1;\n var bones = this.bones;\n var spaces = spine.Utils.setArraySize(this.spaces, spacesCount), lengths = null;\n var spacing = this.spacing;\n if (scale || !percentSpacing) {\n if (scale)\n lengths = spine.Utils.setArraySize(this.lengths, boneCount);\n var lengthSpacing = data.spacingMode == spine.SpacingMode.Length;\n for (var i = 0, n = spacesCount - 1; i < n;) {\n var bone = bones[i];\n var setupLength = bone.data.length;\n if (setupLength < PathConstraint.epsilon) {\n if (scale)\n lengths[i] = 0;\n spaces[++i] = 0;\n }\n else if (percentSpacing) {\n if (scale) {\n var x = setupLength * bone.a, y = setupLength * bone.c;\n var length_1 = Math.sqrt(x * x + y * y);\n lengths[i] = length_1;\n }\n spaces[++i] = spacing;\n }\n else {\n var x = setupLength * bone.a, y = setupLength * bone.c;\n var length_2 = Math.sqrt(x * x + y * y);\n if (scale)\n lengths[i] = length_2;\n spaces[++i] = (lengthSpacing ? setupLength + spacing : spacing) * length_2 / setupLength;\n }\n }\n }\n else {\n for (var i = 1; i < spacesCount; i++)\n spaces[i] = spacing;\n }\n var positions = this.computeWorldPositions(attachment, spacesCount, tangents, data.positionMode == spine.PositionMode.Percent, percentSpacing);\n var boneX = positions[0], boneY = positions[1], offsetRotation = data.offsetRotation;\n var tip = false;\n if (offsetRotation == 0)\n tip = rotateMode == spine.RotateMode.Chain;\n else {\n tip = false;\n var p = this.target.bone;\n offsetRotation *= p.a * p.d - p.b * p.c > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\n }\n for (var i = 0, p = 3; i < boneCount; i++, p += 3) {\n var bone = bones[i];\n bone.worldX += (boneX - bone.worldX) * translateMix;\n bone.worldY += (boneY - bone.worldY) * translateMix;\n var x = positions[p], y = positions[p + 1], dx = x - boneX, dy = y - boneY;\n if (scale) {\n var length_3 = lengths[i];\n if (length_3 != 0) {\n var s = (Math.sqrt(dx * dx + dy * dy) / length_3 - 1) * rotateMix + 1;\n bone.a *= s;\n bone.c *= s;\n }\n }\n boneX = x;\n boneY = y;\n if (rotate) {\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d, r = 0, cos = 0, sin = 0;\n if (tangents)\n r = positions[p - 1];\n else if (spaces[i + 1] == 0)\n r = positions[p + 2];\n else\n r = Math.atan2(dy, dx);\n r -= Math.atan2(c, a);\n if (tip) {\n cos = Math.cos(r);\n sin = Math.sin(r);\n var length_4 = bone.data.length;\n boneX += (length_4 * (cos * a - sin * c) - dx) * rotateMix;\n boneY += (length_4 * (sin * a + cos * c) - dy) * rotateMix;\n }\n else {\n r += offsetRotation;\n }\n if (r > spine.MathUtils.PI)\n r -= spine.MathUtils.PI2;\n else if (r < -spine.MathUtils.PI)\n r += spine.MathUtils.PI2;\n r *= rotateMix;\n cos = Math.cos(r);\n sin = Math.sin(r);\n bone.a = cos * a - sin * c;\n bone.b = cos * b - sin * d;\n bone.c = sin * a + cos * c;\n bone.d = sin * b + cos * d;\n }\n bone.appliedValid = false;\n }\n };\n PathConstraint.prototype.computeWorldPositions = function (path, spacesCount, tangents, percentPosition, percentSpacing) {\n var target = this.target;\n var position = this.position;\n var spaces = this.spaces, out = spine.Utils.setArraySize(this.positions, spacesCount * 3 + 2), world = null;\n var closed = path.closed;\n var verticesLength = path.worldVerticesLength, curveCount = verticesLength / 6, prevCurve = PathConstraint.NONE;\n if (!path.constantSpeed) {\n var lengths = path.lengths;\n curveCount -= closed ? 1 : 2;\n var pathLength_1 = lengths[curveCount];\n if (percentPosition)\n position *= pathLength_1;\n if (percentSpacing) {\n for (var i = 1; i < spacesCount; i++)\n spaces[i] *= pathLength_1;\n }\n world = spine.Utils.setArraySize(this.world, 8);\n for (var i = 0, o = 0, curve = 0; i < spacesCount; i++, o += 3) {\n var space = spaces[i];\n position += space;\n var p = position;\n if (closed) {\n p %= pathLength_1;\n if (p < 0)\n p += pathLength_1;\n curve = 0;\n }\n else if (p < 0) {\n if (prevCurve != PathConstraint.BEFORE) {\n prevCurve = PathConstraint.BEFORE;\n path.computeWorldVertices(target, 2, 4, world, 0, 2);\n }\n this.addBeforePosition(p, world, 0, out, o);\n continue;\n }\n else if (p > pathLength_1) {\n if (prevCurve != PathConstraint.AFTER) {\n prevCurve = PathConstraint.AFTER;\n path.computeWorldVertices(target, verticesLength - 6, 4, world, 0, 2);\n }\n this.addAfterPosition(p - pathLength_1, world, 0, out, o);\n continue;\n }\n for (;; curve++) {\n var length_5 = lengths[curve];\n if (p > length_5)\n continue;\n if (curve == 0)\n p /= length_5;\n else {\n var prev = lengths[curve - 1];\n p = (p - prev) / (length_5 - prev);\n }\n break;\n }\n if (curve != prevCurve) {\n prevCurve = curve;\n if (closed && curve == curveCount) {\n path.computeWorldVertices(target, verticesLength - 4, 4, world, 0, 2);\n path.computeWorldVertices(target, 0, 4, world, 4, 2);\n }\n else\n path.computeWorldVertices(target, curve * 6 + 2, 8, world, 0, 2);\n }\n this.addCurvePosition(p, world[0], world[1], world[2], world[3], world[4], world[5], world[6], world[7], out, o, tangents || (i > 0 && space == 0));\n }\n return out;\n }\n if (closed) {\n verticesLength += 2;\n world = spine.Utils.setArraySize(this.world, verticesLength);\n path.computeWorldVertices(target, 2, verticesLength - 4, world, 0, 2);\n path.computeWorldVertices(target, 0, 2, world, verticesLength - 4, 2);\n world[verticesLength - 2] = world[0];\n world[verticesLength - 1] = world[1];\n }\n else {\n curveCount--;\n verticesLength -= 4;\n world = spine.Utils.setArraySize(this.world, verticesLength);\n path.computeWorldVertices(target, 2, verticesLength, world, 0, 2);\n }\n var curves = spine.Utils.setArraySize(this.curves, curveCount);\n var pathLength = 0;\n var x1 = world[0], y1 = world[1], cx1 = 0, cy1 = 0, cx2 = 0, cy2 = 0, x2 = 0, y2 = 0;\n var tmpx = 0, tmpy = 0, dddfx = 0, dddfy = 0, ddfx = 0, ddfy = 0, dfx = 0, dfy = 0;\n for (var i = 0, w = 2; i < curveCount; i++, w += 6) {\n cx1 = world[w];\n cy1 = world[w + 1];\n cx2 = world[w + 2];\n cy2 = world[w + 3];\n x2 = world[w + 4];\n y2 = world[w + 5];\n tmpx = (x1 - cx1 * 2 + cx2) * 0.1875;\n tmpy = (y1 - cy1 * 2 + cy2) * 0.1875;\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.09375;\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.09375;\n ddfx = tmpx * 2 + dddfx;\n ddfy = tmpy * 2 + dddfy;\n dfx = (cx1 - x1) * 0.75 + tmpx + dddfx * 0.16666667;\n dfy = (cy1 - y1) * 0.75 + tmpy + dddfy * 0.16666667;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n dfx += ddfx;\n dfy += ddfy;\n ddfx += dddfx;\n ddfy += dddfy;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n dfx += ddfx;\n dfy += ddfy;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n dfx += ddfx + dddfx;\n dfy += ddfy + dddfy;\n pathLength += Math.sqrt(dfx * dfx + dfy * dfy);\n curves[i] = pathLength;\n x1 = x2;\n y1 = y2;\n }\n if (percentPosition)\n position *= pathLength;\n else\n position *= pathLength / path.lengths[curveCount - 1];\n if (percentSpacing) {\n for (var i = 1; i < spacesCount; i++)\n spaces[i] *= pathLength;\n }\n var segments = this.segments;\n var curveLength = 0;\n for (var i = 0, o = 0, curve = 0, segment = 0; i < spacesCount; i++, o += 3) {\n var space = spaces[i];\n position += space;\n var p = position;\n if (closed) {\n p %= pathLength;\n if (p < 0)\n p += pathLength;\n curve = 0;\n }\n else if (p < 0) {\n this.addBeforePosition(p, world, 0, out, o);\n continue;\n }\n else if (p > pathLength) {\n this.addAfterPosition(p - pathLength, world, verticesLength - 4, out, o);\n continue;\n }\n for (;; curve++) {\n var length_6 = curves[curve];\n if (p > length_6)\n continue;\n if (curve == 0)\n p /= length_6;\n else {\n var prev = curves[curve - 1];\n p = (p - prev) / (length_6 - prev);\n }\n break;\n }\n if (curve != prevCurve) {\n prevCurve = curve;\n var ii = curve * 6;\n x1 = world[ii];\n y1 = world[ii + 1];\n cx1 = world[ii + 2];\n cy1 = world[ii + 3];\n cx2 = world[ii + 4];\n cy2 = world[ii + 5];\n x2 = world[ii + 6];\n y2 = world[ii + 7];\n tmpx = (x1 - cx1 * 2 + cx2) * 0.03;\n tmpy = (y1 - cy1 * 2 + cy2) * 0.03;\n dddfx = ((cx1 - cx2) * 3 - x1 + x2) * 0.006;\n dddfy = ((cy1 - cy2) * 3 - y1 + y2) * 0.006;\n ddfx = tmpx * 2 + dddfx;\n ddfy = tmpy * 2 + dddfy;\n dfx = (cx1 - x1) * 0.3 + tmpx + dddfx * 0.16666667;\n dfy = (cy1 - y1) * 0.3 + tmpy + dddfy * 0.16666667;\n curveLength = Math.sqrt(dfx * dfx + dfy * dfy);\n segments[0] = curveLength;\n for (ii = 1; ii < 8; ii++) {\n dfx += ddfx;\n dfy += ddfy;\n ddfx += dddfx;\n ddfy += dddfy;\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\n segments[ii] = curveLength;\n }\n dfx += ddfx;\n dfy += ddfy;\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\n segments[8] = curveLength;\n dfx += ddfx + dddfx;\n dfy += ddfy + dddfy;\n curveLength += Math.sqrt(dfx * dfx + dfy * dfy);\n segments[9] = curveLength;\n segment = 0;\n }\n p *= curveLength;\n for (;; segment++) {\n var length_7 = segments[segment];\n if (p > length_7)\n continue;\n if (segment == 0)\n p /= length_7;\n else {\n var prev = segments[segment - 1];\n p = segment + (p - prev) / (length_7 - prev);\n }\n break;\n }\n this.addCurvePosition(p * 0.1, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents || (i > 0 && space == 0));\n }\n return out;\n };\n PathConstraint.prototype.addBeforePosition = function (p, temp, i, out, o) {\n var x1 = temp[i], y1 = temp[i + 1], dx = temp[i + 2] - x1, dy = temp[i + 3] - y1, r = Math.atan2(dy, dx);\n out[o] = x1 + p * Math.cos(r);\n out[o + 1] = y1 + p * Math.sin(r);\n out[o + 2] = r;\n };\n PathConstraint.prototype.addAfterPosition = function (p, temp, i, out, o) {\n var x1 = temp[i + 2], y1 = temp[i + 3], dx = x1 - temp[i], dy = y1 - temp[i + 1], r = Math.atan2(dy, dx);\n out[o] = x1 + p * Math.cos(r);\n out[o + 1] = y1 + p * Math.sin(r);\n out[o + 2] = r;\n };\n PathConstraint.prototype.addCurvePosition = function (p, x1, y1, cx1, cy1, cx2, cy2, x2, y2, out, o, tangents) {\n if (p == 0 || isNaN(p)) {\n out[o] = x1;\n out[o + 1] = y1;\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\n return;\n }\n var tt = p * p, ttt = tt * p, u = 1 - p, uu = u * u, uuu = uu * u;\n var ut = u * p, ut3 = ut * 3, uut3 = u * ut3, utt3 = ut3 * p;\n var x = x1 * uuu + cx1 * uut3 + cx2 * utt3 + x2 * ttt, y = y1 * uuu + cy1 * uut3 + cy2 * utt3 + y2 * ttt;\n out[o] = x;\n out[o + 1] = y;\n if (tangents) {\n if (p < 0.001)\n out[o + 2] = Math.atan2(cy1 - y1, cx1 - x1);\n else\n out[o + 2] = Math.atan2(y - (y1 * uu + cy1 * ut * 2 + cy2 * tt), x - (x1 * uu + cx1 * ut * 2 + cx2 * tt));\n }\n };\n PathConstraint.NONE = -1;\n PathConstraint.BEFORE = -2;\n PathConstraint.AFTER = -3;\n PathConstraint.epsilon = 0.00001;\n return PathConstraint;\n }());\n spine.PathConstraint = PathConstraint;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var PathConstraintData = (function (_super) {\n __extends(PathConstraintData, _super);\n function PathConstraintData(name) {\n var _this = _super.call(this, name, 0, false) || this;\n _this.bones = new Array();\n return _this;\n }\n return PathConstraintData;\n }(spine.ConstraintData));\n spine.PathConstraintData = PathConstraintData;\n var PositionMode;\n (function (PositionMode) {\n PositionMode[PositionMode[\"Fixed\"] = 0] = \"Fixed\";\n PositionMode[PositionMode[\"Percent\"] = 1] = \"Percent\";\n })(PositionMode = spine.PositionMode || (spine.PositionMode = {}));\n var SpacingMode;\n (function (SpacingMode) {\n SpacingMode[SpacingMode[\"Length\"] = 0] = \"Length\";\n SpacingMode[SpacingMode[\"Fixed\"] = 1] = \"Fixed\";\n SpacingMode[SpacingMode[\"Percent\"] = 2] = \"Percent\";\n })(SpacingMode = spine.SpacingMode || (spine.SpacingMode = {}));\n var RotateMode;\n (function (RotateMode) {\n RotateMode[RotateMode[\"Tangent\"] = 0] = \"Tangent\";\n RotateMode[RotateMode[\"Chain\"] = 1] = \"Chain\";\n RotateMode[RotateMode[\"ChainScale\"] = 2] = \"ChainScale\";\n })(RotateMode = spine.RotateMode || (spine.RotateMode = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Assets = (function () {\n function Assets(clientId) {\n this.toLoad = new Array();\n this.assets = {};\n this.clientId = clientId;\n }\n Assets.prototype.loaded = function () {\n var i = 0;\n for (var v in this.assets)\n i++;\n return i;\n };\n return Assets;\n }());\n var SharedAssetManager = (function () {\n function SharedAssetManager(pathPrefix) {\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\n this.clientAssets = {};\n this.queuedAssets = {};\n this.rawAssets = {};\n this.errors = {};\n this.pathPrefix = pathPrefix;\n }\n SharedAssetManager.prototype.queueAsset = function (clientId, textureLoader, path) {\n var clientAssets = this.clientAssets[clientId];\n if (clientAssets === null || clientAssets === undefined) {\n clientAssets = new Assets(clientId);\n this.clientAssets[clientId] = clientAssets;\n }\n if (textureLoader !== null)\n clientAssets.textureLoader = textureLoader;\n clientAssets.toLoad.push(path);\n if (this.queuedAssets[path] === path) {\n return false;\n }\n else {\n this.queuedAssets[path] = path;\n return true;\n }\n };\n SharedAssetManager.prototype.loadText = function (clientId, path) {\n var _this = this;\n path = this.pathPrefix + path;\n if (!this.queueAsset(clientId, null, path))\n return;\n var request = new XMLHttpRequest();\n request.overrideMimeType(\"text/html\");\n request.onreadystatechange = function () {\n if (request.readyState == XMLHttpRequest.DONE) {\n if (request.status >= 200 && request.status < 300) {\n _this.rawAssets[path] = request.responseText;\n }\n else {\n _this.errors[path] = \"Couldn't load text \" + path + \": status \" + request.status + \", \" + request.responseText;\n }\n }\n };\n request.open(\"GET\", path, true);\n request.send();\n };\n SharedAssetManager.prototype.loadJson = function (clientId, path) {\n var _this = this;\n path = this.pathPrefix + path;\n if (!this.queueAsset(clientId, null, path))\n return;\n var request = new XMLHttpRequest();\n request.overrideMimeType(\"text/html\");\n request.onreadystatechange = function () {\n if (request.readyState == XMLHttpRequest.DONE) {\n if (request.status >= 200 && request.status < 300) {\n _this.rawAssets[path] = JSON.parse(request.responseText);\n }\n else {\n _this.errors[path] = \"Couldn't load text \" + path + \": status \" + request.status + \", \" + request.responseText;\n }\n }\n };\n request.open(\"GET\", path, true);\n request.send();\n };\n SharedAssetManager.prototype.loadTexture = function (clientId, textureLoader, path) {\n var _this = this;\n path = this.pathPrefix + path;\n if (!this.queueAsset(clientId, textureLoader, path))\n return;\n var img = new Image();\n img.crossOrigin = \"anonymous\";\n img.onload = function (ev) {\n _this.rawAssets[path] = img;\n };\n img.onerror = function (ev) {\n _this.errors[path] = \"Couldn't load image \" + path;\n };\n img.src = path;\n };\n SharedAssetManager.prototype.get = function (clientId, path) {\n path = this.pathPrefix + path;\n var clientAssets = this.clientAssets[clientId];\n if (clientAssets === null || clientAssets === undefined)\n return true;\n return clientAssets.assets[path];\n };\n SharedAssetManager.prototype.updateClientAssets = function (clientAssets) {\n for (var i = 0; i < clientAssets.toLoad.length; i++) {\n var path = clientAssets.toLoad[i];\n var asset = clientAssets.assets[path];\n if (asset === null || asset === undefined) {\n var rawAsset = this.rawAssets[path];\n if (rawAsset === null || rawAsset === undefined)\n continue;\n if (rawAsset instanceof HTMLImageElement) {\n clientAssets.assets[path] = clientAssets.textureLoader(rawAsset);\n }\n else {\n clientAssets.assets[path] = rawAsset;\n }\n }\n }\n };\n SharedAssetManager.prototype.isLoadingComplete = function (clientId) {\n var clientAssets = this.clientAssets[clientId];\n if (clientAssets === null || clientAssets === undefined)\n return true;\n this.updateClientAssets(clientAssets);\n return clientAssets.toLoad.length == clientAssets.loaded();\n };\n SharedAssetManager.prototype.dispose = function () {\n };\n SharedAssetManager.prototype.hasErrors = function () {\n return Object.keys(this.errors).length > 0;\n };\n SharedAssetManager.prototype.getErrors = function () {\n return this.errors;\n };\n return SharedAssetManager;\n }());\n spine.SharedAssetManager = SharedAssetManager;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Skeleton = (function () {\n function Skeleton(data) {\n this._updateCache = new Array();\n this.updateCacheReset = new Array();\n this.time = 0;\n this.scaleX = 1;\n this.scaleY = 1;\n this.x = 0;\n this.y = 0;\n if (data == null)\n throw new Error(\"data cannot be null.\");\n this.data = data;\n this.bones = new Array();\n for (var i = 0; i < data.bones.length; i++) {\n var boneData = data.bones[i];\n var bone = void 0;\n if (boneData.parent == null)\n bone = new spine.Bone(boneData, this, null);\n else {\n var parent_1 = this.bones[boneData.parent.index];\n bone = new spine.Bone(boneData, this, parent_1);\n parent_1.children.push(bone);\n }\n this.bones.push(bone);\n }\n this.slots = new Array();\n this.drawOrder = new Array();\n for (var i = 0; i < data.slots.length; i++) {\n var slotData = data.slots[i];\n var bone = this.bones[slotData.boneData.index];\n var slot = new spine.Slot(slotData, bone);\n this.slots.push(slot);\n this.drawOrder.push(slot);\n }\n this.ikConstraints = new Array();\n for (var i = 0; i < data.ikConstraints.length; i++) {\n var ikConstraintData = data.ikConstraints[i];\n this.ikConstraints.push(new spine.IkConstraint(ikConstraintData, this));\n }\n this.transformConstraints = new Array();\n for (var i = 0; i < data.transformConstraints.length; i++) {\n var transformConstraintData = data.transformConstraints[i];\n this.transformConstraints.push(new spine.TransformConstraint(transformConstraintData, this));\n }\n this.pathConstraints = new Array();\n for (var i = 0; i < data.pathConstraints.length; i++) {\n var pathConstraintData = data.pathConstraints[i];\n this.pathConstraints.push(new spine.PathConstraint(pathConstraintData, this));\n }\n this.color = new spine.Color(1, 1, 1, 1);\n this.updateCache();\n }\n Skeleton.prototype.updateCache = function () {\n var updateCache = this._updateCache;\n updateCache.length = 0;\n this.updateCacheReset.length = 0;\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n bone.sorted = bone.data.skinRequired;\n bone.active = !bone.sorted;\n }\n if (this.skin != null) {\n var skinBones = this.skin.bones;\n for (var i = 0, n = this.skin.bones.length; i < n; i++) {\n var bone = this.bones[skinBones[i].index];\n do {\n bone.sorted = false;\n bone.active = true;\n bone = bone.parent;\n } while (bone != null);\n }\n }\n var ikConstraints = this.ikConstraints;\n var transformConstraints = this.transformConstraints;\n var pathConstraints = this.pathConstraints;\n var ikCount = ikConstraints.length, transformCount = transformConstraints.length, pathCount = pathConstraints.length;\n var constraintCount = ikCount + transformCount + pathCount;\n outer: for (var i = 0; i < constraintCount; i++) {\n for (var ii = 0; ii < ikCount; ii++) {\n var constraint = ikConstraints[ii];\n if (constraint.data.order == i) {\n this.sortIkConstraint(constraint);\n continue outer;\n }\n }\n for (var ii = 0; ii < transformCount; ii++) {\n var constraint = transformConstraints[ii];\n if (constraint.data.order == i) {\n this.sortTransformConstraint(constraint);\n continue outer;\n }\n }\n for (var ii = 0; ii < pathCount; ii++) {\n var constraint = pathConstraints[ii];\n if (constraint.data.order == i) {\n this.sortPathConstraint(constraint);\n continue outer;\n }\n }\n }\n for (var i = 0, n = bones.length; i < n; i++)\n this.sortBone(bones[i]);\n };\n Skeleton.prototype.sortIkConstraint = function (constraint) {\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\n if (!constraint.active)\n return;\n var target = constraint.target;\n this.sortBone(target);\n var constrained = constraint.bones;\n var parent = constrained[0];\n this.sortBone(parent);\n if (constrained.length > 1) {\n var child = constrained[constrained.length - 1];\n if (!(this._updateCache.indexOf(child) > -1))\n this.updateCacheReset.push(child);\n }\n this._updateCache.push(constraint);\n this.sortReset(parent.children);\n constrained[constrained.length - 1].sorted = true;\n };\n Skeleton.prototype.sortPathConstraint = function (constraint) {\n constraint.active = constraint.target.bone.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\n if (!constraint.active)\n return;\n var slot = constraint.target;\n var slotIndex = slot.data.index;\n var slotBone = slot.bone;\n if (this.skin != null)\n this.sortPathConstraintAttachment(this.skin, slotIndex, slotBone);\n if (this.data.defaultSkin != null && this.data.defaultSkin != this.skin)\n this.sortPathConstraintAttachment(this.data.defaultSkin, slotIndex, slotBone);\n for (var i = 0, n = this.data.skins.length; i < n; i++)\n this.sortPathConstraintAttachment(this.data.skins[i], slotIndex, slotBone);\n var attachment = slot.getAttachment();\n if (attachment instanceof spine.PathAttachment)\n this.sortPathConstraintAttachmentWith(attachment, slotBone);\n var constrained = constraint.bones;\n var boneCount = constrained.length;\n for (var i = 0; i < boneCount; i++)\n this.sortBone(constrained[i]);\n this._updateCache.push(constraint);\n for (var i = 0; i < boneCount; i++)\n this.sortReset(constrained[i].children);\n for (var i = 0; i < boneCount; i++)\n constrained[i].sorted = true;\n };\n Skeleton.prototype.sortTransformConstraint = function (constraint) {\n constraint.active = constraint.target.isActive() && (!constraint.data.skinRequired || (this.skin != null && spine.Utils.contains(this.skin.constraints, constraint.data, true)));\n if (!constraint.active)\n return;\n this.sortBone(constraint.target);\n var constrained = constraint.bones;\n var boneCount = constrained.length;\n if (constraint.data.local) {\n for (var i = 0; i < boneCount; i++) {\n var child = constrained[i];\n this.sortBone(child.parent);\n if (!(this._updateCache.indexOf(child) > -1))\n this.updateCacheReset.push(child);\n }\n }\n else {\n for (var i = 0; i < boneCount; i++) {\n this.sortBone(constrained[i]);\n }\n }\n this._updateCache.push(constraint);\n for (var ii = 0; ii < boneCount; ii++)\n this.sortReset(constrained[ii].children);\n for (var ii = 0; ii < boneCount; ii++)\n constrained[ii].sorted = true;\n };\n Skeleton.prototype.sortPathConstraintAttachment = function (skin, slotIndex, slotBone) {\n var attachments = skin.attachments[slotIndex];\n if (!attachments)\n return;\n for (var key in attachments) {\n this.sortPathConstraintAttachmentWith(attachments[key], slotBone);\n }\n };\n Skeleton.prototype.sortPathConstraintAttachmentWith = function (attachment, slotBone) {\n if (!(attachment instanceof spine.PathAttachment))\n return;\n var pathBones = attachment.bones;\n if (pathBones == null)\n this.sortBone(slotBone);\n else {\n var bones = this.bones;\n var i = 0;\n while (i < pathBones.length) {\n var boneCount = pathBones[i++];\n for (var n = i + boneCount; i < n; i++) {\n var boneIndex = pathBones[i];\n this.sortBone(bones[boneIndex]);\n }\n }\n }\n };\n Skeleton.prototype.sortBone = function (bone) {\n if (bone.sorted)\n return;\n var parent = bone.parent;\n if (parent != null)\n this.sortBone(parent);\n bone.sorted = true;\n this._updateCache.push(bone);\n };\n Skeleton.prototype.sortReset = function (bones) {\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n if (!bone.active)\n continue;\n if (bone.sorted)\n this.sortReset(bone.children);\n bone.sorted = false;\n }\n };\n Skeleton.prototype.updateWorldTransform = function () {\n var updateCacheReset = this.updateCacheReset;\n for (var i = 0, n = updateCacheReset.length; i < n; i++) {\n var bone = updateCacheReset[i];\n bone.ax = bone.x;\n bone.ay = bone.y;\n bone.arotation = bone.rotation;\n bone.ascaleX = bone.scaleX;\n bone.ascaleY = bone.scaleY;\n bone.ashearX = bone.shearX;\n bone.ashearY = bone.shearY;\n bone.appliedValid = true;\n }\n var updateCache = this._updateCache;\n for (var i = 0, n = updateCache.length; i < n; i++)\n updateCache[i].update();\n };\n Skeleton.prototype.setToSetupPose = function () {\n this.setBonesToSetupPose();\n this.setSlotsToSetupPose();\n };\n Skeleton.prototype.setBonesToSetupPose = function () {\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++)\n bones[i].setToSetupPose();\n var ikConstraints = this.ikConstraints;\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\n var constraint = ikConstraints[i];\n constraint.mix = constraint.data.mix;\n constraint.softness = constraint.data.softness;\n constraint.bendDirection = constraint.data.bendDirection;\n constraint.compress = constraint.data.compress;\n constraint.stretch = constraint.data.stretch;\n }\n var transformConstraints = this.transformConstraints;\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\n var constraint = transformConstraints[i];\n var data = constraint.data;\n constraint.rotateMix = data.rotateMix;\n constraint.translateMix = data.translateMix;\n constraint.scaleMix = data.scaleMix;\n constraint.shearMix = data.shearMix;\n }\n var pathConstraints = this.pathConstraints;\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\n var constraint = pathConstraints[i];\n var data = constraint.data;\n constraint.position = data.position;\n constraint.spacing = data.spacing;\n constraint.rotateMix = data.rotateMix;\n constraint.translateMix = data.translateMix;\n }\n };\n Skeleton.prototype.setSlotsToSetupPose = function () {\n var slots = this.slots;\n spine.Utils.arrayCopy(slots, 0, this.drawOrder, 0, slots.length);\n for (var i = 0, n = slots.length; i < n; i++)\n slots[i].setToSetupPose();\n };\n Skeleton.prototype.getRootBone = function () {\n if (this.bones.length == 0)\n return null;\n return this.bones[0];\n };\n Skeleton.prototype.findBone = function (boneName) {\n if (boneName == null)\n throw new Error(\"boneName cannot be null.\");\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n if (bone.data.name == boneName)\n return bone;\n }\n return null;\n };\n Skeleton.prototype.findBoneIndex = function (boneName) {\n if (boneName == null)\n throw new Error(\"boneName cannot be null.\");\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++)\n if (bones[i].data.name == boneName)\n return i;\n return -1;\n };\n Skeleton.prototype.findSlot = function (slotName) {\n if (slotName == null)\n throw new Error(\"slotName cannot be null.\");\n var slots = this.slots;\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n if (slot.data.name == slotName)\n return slot;\n }\n return null;\n };\n Skeleton.prototype.findSlotIndex = function (slotName) {\n if (slotName == null)\n throw new Error(\"slotName cannot be null.\");\n var slots = this.slots;\n for (var i = 0, n = slots.length; i < n; i++)\n if (slots[i].data.name == slotName)\n return i;\n return -1;\n };\n Skeleton.prototype.setSkinByName = function (skinName) {\n var skin = this.data.findSkin(skinName);\n if (skin == null)\n throw new Error(\"Skin not found: \" + skinName);\n this.setSkin(skin);\n };\n Skeleton.prototype.setSkin = function (newSkin) {\n if (newSkin == this.skin)\n return;\n if (newSkin != null) {\n if (this.skin != null)\n newSkin.attachAll(this, this.skin);\n else {\n var slots = this.slots;\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n var name_1 = slot.data.attachmentName;\n if (name_1 != null) {\n var attachment = newSkin.getAttachment(i, name_1);\n if (attachment != null)\n slot.setAttachment(attachment);\n }\n }\n }\n }\n this.skin = newSkin;\n this.updateCache();\n };\n Skeleton.prototype.getAttachmentByName = function (slotName, attachmentName) {\n return this.getAttachment(this.data.findSlotIndex(slotName), attachmentName);\n };\n Skeleton.prototype.getAttachment = function (slotIndex, attachmentName) {\n if (attachmentName == null)\n throw new Error(\"attachmentName cannot be null.\");\n if (this.skin != null) {\n var attachment = this.skin.getAttachment(slotIndex, attachmentName);\n if (attachment != null)\n return attachment;\n }\n if (this.data.defaultSkin != null)\n return this.data.defaultSkin.getAttachment(slotIndex, attachmentName);\n return null;\n };\n Skeleton.prototype.setAttachment = function (slotName, attachmentName) {\n if (slotName == null)\n throw new Error(\"slotName cannot be null.\");\n var slots = this.slots;\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n if (slot.data.name == slotName) {\n var attachment = null;\n if (attachmentName != null) {\n attachment = this.getAttachment(i, attachmentName);\n if (attachment == null)\n throw new Error(\"Attachment not found: \" + attachmentName + \", for slot: \" + slotName);\n }\n slot.setAttachment(attachment);\n return;\n }\n }\n throw new Error(\"Slot not found: \" + slotName);\n };\n Skeleton.prototype.findIkConstraint = function (constraintName) {\n if (constraintName == null)\n throw new Error(\"constraintName cannot be null.\");\n var ikConstraints = this.ikConstraints;\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\n var ikConstraint = ikConstraints[i];\n if (ikConstraint.data.name == constraintName)\n return ikConstraint;\n }\n return null;\n };\n Skeleton.prototype.findTransformConstraint = function (constraintName) {\n if (constraintName == null)\n throw new Error(\"constraintName cannot be null.\");\n var transformConstraints = this.transformConstraints;\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\n var constraint = transformConstraints[i];\n if (constraint.data.name == constraintName)\n return constraint;\n }\n return null;\n };\n Skeleton.prototype.findPathConstraint = function (constraintName) {\n if (constraintName == null)\n throw new Error(\"constraintName cannot be null.\");\n var pathConstraints = this.pathConstraints;\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\n var constraint = pathConstraints[i];\n if (constraint.data.name == constraintName)\n return constraint;\n }\n return null;\n };\n Skeleton.prototype.getBounds = function (offset, size, temp) {\n if (temp === void 0) { temp = new Array(2); }\n if (offset == null)\n throw new Error(\"offset cannot be null.\");\n if (size == null)\n throw new Error(\"size cannot be null.\");\n var drawOrder = this.drawOrder;\n var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\n for (var i = 0, n = drawOrder.length; i < n; i++) {\n var slot = drawOrder[i];\n if (!slot.bone.active)\n continue;\n var verticesLength = 0;\n var vertices = null;\n var attachment = slot.getAttachment();\n if (attachment instanceof spine.RegionAttachment) {\n verticesLength = 8;\n vertices = spine.Utils.setArraySize(temp, verticesLength, 0);\n attachment.computeWorldVertices(slot.bone, vertices, 0, 2);\n }\n else if (attachment instanceof spine.MeshAttachment) {\n var mesh = attachment;\n verticesLength = mesh.worldVerticesLength;\n vertices = spine.Utils.setArraySize(temp, verticesLength, 0);\n mesh.computeWorldVertices(slot, 0, verticesLength, vertices, 0, 2);\n }\n if (vertices != null) {\n for (var ii = 0, nn = vertices.length; ii < nn; ii += 2) {\n var x = vertices[ii], y = vertices[ii + 1];\n minX = Math.min(minX, x);\n minY = Math.min(minY, y);\n maxX = Math.max(maxX, x);\n maxY = Math.max(maxY, y);\n }\n }\n }\n offset.set(minX, minY);\n size.set(maxX - minX, maxY - minY);\n };\n Skeleton.prototype.update = function (delta) {\n this.time += delta;\n };\n return Skeleton;\n }());\n spine.Skeleton = Skeleton;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SkeletonBinary = (function () {\n function SkeletonBinary(attachmentLoader) {\n this.scale = 1;\n this.linkedMeshes = new Array();\n this.attachmentLoader = attachmentLoader;\n }\n SkeletonBinary.prototype.readSkeletonData = function (binary) {\n var scale = this.scale;\n var skeletonData = new spine.SkeletonData();\n skeletonData.name = \"\";\n var input = new BinaryInput(binary);\n skeletonData.hash = input.readString();\n skeletonData.version = input.readString();\n if (\"3.8.75\" == skeletonData.version)\n throw new Error(\"Unsupported skeleton data, please export with a newer version of Spine.\");\n skeletonData.x = input.readFloat();\n skeletonData.y = input.readFloat();\n skeletonData.width = input.readFloat();\n skeletonData.height = input.readFloat();\n var nonessential = input.readBoolean();\n if (nonessential) {\n skeletonData.fps = input.readFloat();\n skeletonData.imagesPath = input.readString();\n skeletonData.audioPath = input.readString();\n }\n var n = 0;\n n = input.readInt(true);\n for (var i = 0; i < n; i++)\n input.strings.push(input.readString());\n n = input.readInt(true);\n for (var i = 0; i < n; i++) {\n var name_2 = input.readString();\n var parent_2 = i == 0 ? null : skeletonData.bones[input.readInt(true)];\n var data = new spine.BoneData(i, name_2, parent_2);\n data.rotation = input.readFloat();\n data.x = input.readFloat() * scale;\n data.y = input.readFloat() * scale;\n data.scaleX = input.readFloat();\n data.scaleY = input.readFloat();\n data.shearX = input.readFloat();\n data.shearY = input.readFloat();\n data.length = input.readFloat() * scale;\n data.transformMode = SkeletonBinary.TransformModeValues[input.readInt(true)];\n data.skinRequired = input.readBoolean();\n if (nonessential)\n spine.Color.rgba8888ToColor(data.color, input.readInt32());\n skeletonData.bones.push(data);\n }\n n = input.readInt(true);\n for (var i = 0; i < n; i++) {\n var slotName = input.readString();\n var boneData = skeletonData.bones[input.readInt(true)];\n var data = new spine.SlotData(i, slotName, boneData);\n spine.Color.rgba8888ToColor(data.color, input.readInt32());\n var darkColor = input.readInt32();\n if (darkColor != -1)\n spine.Color.rgb888ToColor(data.darkColor = new spine.Color(), darkColor);\n data.attachmentName = input.readStringRef();\n data.blendMode = SkeletonBinary.BlendModeValues[input.readInt(true)];\n skeletonData.slots.push(data);\n }\n n = input.readInt(true);\n for (var i = 0, nn = void 0; i < n; i++) {\n var data = new spine.IkConstraintData(input.readString());\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (var ii = 0; ii < nn; ii++)\n data.bones.push(skeletonData.bones[input.readInt(true)]);\n data.target = skeletonData.bones[input.readInt(true)];\n data.mix = input.readFloat();\n data.softness = input.readFloat() * scale;\n data.bendDirection = input.readByte();\n data.compress = input.readBoolean();\n data.stretch = input.readBoolean();\n data.uniform = input.readBoolean();\n skeletonData.ikConstraints.push(data);\n }\n n = input.readInt(true);\n for (var i = 0, nn = void 0; i < n; i++) {\n var data = new spine.TransformConstraintData(input.readString());\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (var ii = 0; ii < nn; ii++)\n data.bones.push(skeletonData.bones[input.readInt(true)]);\n data.target = skeletonData.bones[input.readInt(true)];\n data.local = input.readBoolean();\n data.relative = input.readBoolean();\n data.offsetRotation = input.readFloat();\n data.offsetX = input.readFloat() * scale;\n data.offsetY = input.readFloat() * scale;\n data.offsetScaleX = input.readFloat();\n data.offsetScaleY = input.readFloat();\n data.offsetShearY = input.readFloat();\n data.rotateMix = input.readFloat();\n data.translateMix = input.readFloat();\n data.scaleMix = input.readFloat();\n data.shearMix = input.readFloat();\n skeletonData.transformConstraints.push(data);\n }\n n = input.readInt(true);\n for (var i = 0, nn = void 0; i < n; i++) {\n var data = new spine.PathConstraintData(input.readString());\n data.order = input.readInt(true);\n data.skinRequired = input.readBoolean();\n nn = input.readInt(true);\n for (var ii = 0; ii < nn; ii++)\n data.bones.push(skeletonData.bones[input.readInt(true)]);\n data.target = skeletonData.slots[input.readInt(true)];\n data.positionMode = SkeletonBinary.PositionModeValues[input.readInt(true)];\n data.spacingMode = SkeletonBinary.SpacingModeValues[input.readInt(true)];\n data.rotateMode = SkeletonBinary.RotateModeValues[input.readInt(true)];\n data.offsetRotation = input.readFloat();\n data.position = input.readFloat();\n if (data.positionMode == spine.PositionMode.Fixed)\n data.position *= scale;\n data.spacing = input.readFloat();\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\n data.spacing *= scale;\n data.rotateMix = input.readFloat();\n data.translateMix = input.readFloat();\n skeletonData.pathConstraints.push(data);\n }\n var defaultSkin = this.readSkin(input, skeletonData, true, nonessential);\n if (defaultSkin != null) {\n skeletonData.defaultSkin = defaultSkin;\n skeletonData.skins.push(defaultSkin);\n }\n {\n var i = skeletonData.skins.length;\n spine.Utils.setArraySize(skeletonData.skins, n = i + input.readInt(true));\n for (; i < n; i++)\n skeletonData.skins[i] = this.readSkin(input, skeletonData, false, nonessential);\n }\n n = this.linkedMeshes.length;\n for (var i = 0; i < n; i++) {\n var linkedMesh = this.linkedMeshes[i];\n var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\n if (skin == null)\n throw new Error(\"Skin not found: \" + linkedMesh.skin);\n var parent_3 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\n if (parent_3 == null)\n throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_3 : linkedMesh.mesh;\n linkedMesh.mesh.setParentMesh(parent_3);\n linkedMesh.mesh.updateUVs();\n }\n this.linkedMeshes.length = 0;\n n = input.readInt(true);\n for (var i = 0; i < n; i++) {\n var data = new spine.EventData(input.readStringRef());\n data.intValue = input.readInt(false);\n data.floatValue = input.readFloat();\n data.stringValue = input.readString();\n data.audioPath = input.readString();\n if (data.audioPath != null) {\n data.volume = input.readFloat();\n data.balance = input.readFloat();\n }\n skeletonData.events.push(data);\n }\n n = input.readInt(true);\n for (var i = 0; i < n; i++)\n skeletonData.animations.push(this.readAnimation(input, input.readString(), skeletonData));\n return skeletonData;\n };\n SkeletonBinary.prototype.readSkin = function (input, skeletonData, defaultSkin, nonessential) {\n var skin = null;\n var slotCount = 0;\n if (defaultSkin) {\n slotCount = input.readInt(true);\n if (slotCount == 0)\n return null;\n skin = new spine.Skin(\"default\");\n }\n else {\n skin = new spine.Skin(input.readStringRef());\n skin.bones.length = input.readInt(true);\n for (var i = 0, n = skin.bones.length; i < n; i++)\n skin.bones[i] = skeletonData.bones[input.readInt(true)];\n for (var i = 0, n = input.readInt(true); i < n; i++)\n skin.constraints.push(skeletonData.ikConstraints[input.readInt(true)]);\n for (var i = 0, n = input.readInt(true); i < n; i++)\n skin.constraints.push(skeletonData.transformConstraints[input.readInt(true)]);\n for (var i = 0, n = input.readInt(true); i < n; i++)\n skin.constraints.push(skeletonData.pathConstraints[input.readInt(true)]);\n slotCount = input.readInt(true);\n }\n for (var i = 0; i < slotCount; i++) {\n var slotIndex = input.readInt(true);\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n var name_3 = input.readStringRef();\n var attachment = this.readAttachment(input, skeletonData, skin, slotIndex, name_3, nonessential);\n if (attachment != null)\n skin.setAttachment(slotIndex, name_3, attachment);\n }\n }\n return skin;\n };\n SkeletonBinary.prototype.readAttachment = function (input, skeletonData, skin, slotIndex, attachmentName, nonessential) {\n var scale = this.scale;\n var name = input.readStringRef();\n if (name == null)\n name = attachmentName;\n var typeIndex = input.readByte();\n var type = SkeletonBinary.AttachmentTypeValues[typeIndex];\n switch (type) {\n case spine.AttachmentType.Region: {\n var path = input.readStringRef();\n var rotation = input.readFloat();\n var x = input.readFloat();\n var y = input.readFloat();\n var scaleX = input.readFloat();\n var scaleY = input.readFloat();\n var width = input.readFloat();\n var height = input.readFloat();\n var color = input.readInt32();\n if (path == null)\n path = name;\n var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\n if (region == null)\n return null;\n region.path = path;\n region.x = x * scale;\n region.y = y * scale;\n region.scaleX = scaleX;\n region.scaleY = scaleY;\n region.rotation = rotation;\n region.width = width * scale;\n region.height = height * scale;\n spine.Color.rgba8888ToColor(region.color, color);\n region.updateOffset();\n return region;\n }\n case spine.AttachmentType.BoundingBox: {\n var vertexCount = input.readInt(true);\n var vertices = this.readVertices(input, vertexCount);\n var color = nonessential ? input.readInt32() : 0;\n var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\n if (box == null)\n return null;\n box.worldVerticesLength = vertexCount << 1;\n box.vertices = vertices.vertices;\n box.bones = vertices.bones;\n if (nonessential)\n spine.Color.rgba8888ToColor(box.color, color);\n return box;\n }\n case spine.AttachmentType.Mesh: {\n var path = input.readStringRef();\n var color = input.readInt32();\n var vertexCount = input.readInt(true);\n var uvs = this.readFloatArray(input, vertexCount << 1, 1);\n var triangles = this.readShortArray(input);\n var vertices = this.readVertices(input, vertexCount);\n var hullLength = input.readInt(true);\n var edges = null;\n var width = 0, height = 0;\n if (nonessential) {\n edges = this.readShortArray(input);\n width = input.readFloat();\n height = input.readFloat();\n }\n if (path == null)\n path = name;\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\n if (mesh == null)\n return null;\n mesh.path = path;\n spine.Color.rgba8888ToColor(mesh.color, color);\n mesh.bones = vertices.bones;\n mesh.vertices = vertices.vertices;\n mesh.worldVerticesLength = vertexCount << 1;\n mesh.triangles = triangles;\n mesh.regionUVs = uvs;\n mesh.updateUVs();\n mesh.hullLength = hullLength << 1;\n if (nonessential) {\n mesh.edges = edges;\n mesh.width = width * scale;\n mesh.height = height * scale;\n }\n return mesh;\n }\n case spine.AttachmentType.LinkedMesh: {\n var path = input.readStringRef();\n var color = input.readInt32();\n var skinName = input.readStringRef();\n var parent_4 = input.readStringRef();\n var inheritDeform = input.readBoolean();\n var width = 0, height = 0;\n if (nonessential) {\n width = input.readFloat();\n height = input.readFloat();\n }\n if (path == null)\n path = name;\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\n if (mesh == null)\n return null;\n mesh.path = path;\n spine.Color.rgba8888ToColor(mesh.color, color);\n if (nonessential) {\n mesh.width = width * scale;\n mesh.height = height * scale;\n }\n this.linkedMeshes.push(new LinkedMesh(mesh, skinName, slotIndex, parent_4, inheritDeform));\n return mesh;\n }\n case spine.AttachmentType.Path: {\n var closed_1 = input.readBoolean();\n var constantSpeed = input.readBoolean();\n var vertexCount = input.readInt(true);\n var vertices = this.readVertices(input, vertexCount);\n var lengths = spine.Utils.newArray(vertexCount / 3, 0);\n for (var i = 0, n = lengths.length; i < n; i++)\n lengths[i] = input.readFloat() * scale;\n var color = nonessential ? input.readInt32() : 0;\n var path = this.attachmentLoader.newPathAttachment(skin, name);\n if (path == null)\n return null;\n path.closed = closed_1;\n path.constantSpeed = constantSpeed;\n path.worldVerticesLength = vertexCount << 1;\n path.vertices = vertices.vertices;\n path.bones = vertices.bones;\n path.lengths = lengths;\n if (nonessential)\n spine.Color.rgba8888ToColor(path.color, color);\n return path;\n }\n case spine.AttachmentType.Point: {\n var rotation = input.readFloat();\n var x = input.readFloat();\n var y = input.readFloat();\n var color = nonessential ? input.readInt32() : 0;\n var point = this.attachmentLoader.newPointAttachment(skin, name);\n if (point == null)\n return null;\n point.x = x * scale;\n point.y = y * scale;\n point.rotation = rotation;\n if (nonessential)\n spine.Color.rgba8888ToColor(point.color, color);\n return point;\n }\n case spine.AttachmentType.Clipping: {\n var endSlotIndex = input.readInt(true);\n var vertexCount = input.readInt(true);\n var vertices = this.readVertices(input, vertexCount);\n var color = nonessential ? input.readInt32() : 0;\n var clip = this.attachmentLoader.newClippingAttachment(skin, name);\n if (clip == null)\n return null;\n clip.endSlot = skeletonData.slots[endSlotIndex];\n clip.worldVerticesLength = vertexCount << 1;\n clip.vertices = vertices.vertices;\n clip.bones = vertices.bones;\n if (nonessential)\n spine.Color.rgba8888ToColor(clip.color, color);\n return clip;\n }\n }\n return null;\n };\n SkeletonBinary.prototype.readVertices = function (input, vertexCount) {\n var verticesLength = vertexCount << 1;\n var vertices = new Vertices();\n var scale = this.scale;\n if (!input.readBoolean()) {\n vertices.vertices = this.readFloatArray(input, verticesLength, scale);\n return vertices;\n }\n var weights = new Array();\n var bonesArray = new Array();\n for (var i = 0; i < vertexCount; i++) {\n var boneCount = input.readInt(true);\n bonesArray.push(boneCount);\n for (var ii = 0; ii < boneCount; ii++) {\n bonesArray.push(input.readInt(true));\n weights.push(input.readFloat() * scale);\n weights.push(input.readFloat() * scale);\n weights.push(input.readFloat());\n }\n }\n vertices.vertices = spine.Utils.toFloatArray(weights);\n vertices.bones = bonesArray;\n return vertices;\n };\n SkeletonBinary.prototype.readFloatArray = function (input, n, scale) {\n var array = new Array(n);\n if (scale == 1) {\n for (var i = 0; i < n; i++)\n array[i] = input.readFloat();\n }\n else {\n for (var i = 0; i < n; i++)\n array[i] = input.readFloat() * scale;\n }\n return array;\n };\n SkeletonBinary.prototype.readShortArray = function (input) {\n var n = input.readInt(true);\n var array = new Array(n);\n for (var i = 0; i < n; i++)\n array[i] = input.readShort();\n return array;\n };\n SkeletonBinary.prototype.readAnimation = function (input, name, skeletonData) {\n var timelines = new Array();\n var scale = this.scale;\n var duration = 0;\n var tempColor1 = new spine.Color();\n var tempColor2 = new spine.Color();\n for (var i = 0, n = input.readInt(true); i < n; i++) {\n var slotIndex = input.readInt(true);\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n var timelineType = input.readByte();\n var frameCount = input.readInt(true);\n switch (timelineType) {\n case SkeletonBinary.SLOT_ATTACHMENT: {\n var timeline = new spine.AttachmentTimeline(frameCount);\n timeline.slotIndex = slotIndex;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++)\n timeline.setFrame(frameIndex, input.readFloat(), input.readStringRef());\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[frameCount - 1]);\n break;\n }\n case SkeletonBinary.SLOT_COLOR: {\n var timeline = new spine.ColorTimeline(frameCount);\n timeline.slotIndex = slotIndex;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n var time = input.readFloat();\n spine.Color.rgba8888ToColor(tempColor1, input.readInt32());\n timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a);\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.ColorTimeline.ENTRIES]);\n break;\n }\n case SkeletonBinary.SLOT_TWO_COLOR: {\n var timeline = new spine.TwoColorTimeline(frameCount);\n timeline.slotIndex = slotIndex;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n var time = input.readFloat();\n spine.Color.rgba8888ToColor(tempColor1, input.readInt32());\n spine.Color.rgb888ToColor(tempColor2, input.readInt32());\n timeline.setFrame(frameIndex, time, tempColor1.r, tempColor1.g, tempColor1.b, tempColor1.a, tempColor2.r, tempColor2.g, tempColor2.b);\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TwoColorTimeline.ENTRIES]);\n break;\n }\n }\n }\n }\n for (var i = 0, n = input.readInt(true); i < n; i++) {\n var boneIndex = input.readInt(true);\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n var timelineType = input.readByte();\n var frameCount = input.readInt(true);\n switch (timelineType) {\n case SkeletonBinary.BONE_ROTATE: {\n var timeline = new spine.RotateTimeline(frameCount);\n timeline.boneIndex = boneIndex;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat());\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.RotateTimeline.ENTRIES]);\n break;\n }\n case SkeletonBinary.BONE_TRANSLATE:\n case SkeletonBinary.BONE_SCALE:\n case SkeletonBinary.BONE_SHEAR: {\n var timeline = void 0;\n var timelineScale = 1;\n if (timelineType == SkeletonBinary.BONE_SCALE)\n timeline = new spine.ScaleTimeline(frameCount);\n else if (timelineType == SkeletonBinary.BONE_SHEAR)\n timeline = new spine.ShearTimeline(frameCount);\n else {\n timeline = new spine.TranslateTimeline(frameCount);\n timelineScale = scale;\n }\n timeline.boneIndex = boneIndex;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale, input.readFloat() * timelineScale);\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TranslateTimeline.ENTRIES]);\n break;\n }\n }\n }\n }\n for (var i = 0, n = input.readInt(true); i < n; i++) {\n var index = input.readInt(true);\n var frameCount = input.readInt(true);\n var timeline = new spine.IkConstraintTimeline(frameCount);\n timeline.ikConstraintIndex = index;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat() * scale, input.readByte(), input.readBoolean(), input.readBoolean());\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.IkConstraintTimeline.ENTRIES]);\n }\n for (var i = 0, n = input.readInt(true); i < n; i++) {\n var index = input.readInt(true);\n var frameCount = input.readInt(true);\n var timeline = new spine.TransformConstraintTimeline(frameCount);\n timeline.transformConstraintIndex = index;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.TransformConstraintTimeline.ENTRIES]);\n }\n for (var i = 0, n = input.readInt(true); i < n; i++) {\n var index = input.readInt(true);\n var data = skeletonData.pathConstraints[index];\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n var timelineType = input.readByte();\n var frameCount = input.readInt(true);\n switch (timelineType) {\n case SkeletonBinary.PATH_POSITION:\n case SkeletonBinary.PATH_SPACING: {\n var timeline = void 0;\n var timelineScale = 1;\n if (timelineType == SkeletonBinary.PATH_SPACING) {\n timeline = new spine.PathConstraintSpacingTimeline(frameCount);\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\n timelineScale = scale;\n }\n else {\n timeline = new spine.PathConstraintPositionTimeline(frameCount);\n if (data.positionMode == spine.PositionMode.Fixed)\n timelineScale = scale;\n }\n timeline.pathConstraintIndex = index;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat() * timelineScale);\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\n break;\n }\n case SkeletonBinary.PATH_MIX: {\n var timeline = new spine.PathConstraintMixTimeline(frameCount);\n timeline.pathConstraintIndex = index;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n timeline.setFrame(frameIndex, input.readFloat(), input.readFloat(), input.readFloat());\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(frameCount - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\n break;\n }\n }\n }\n }\n for (var i = 0, n = input.readInt(true); i < n; i++) {\n var skin = skeletonData.skins[input.readInt(true)];\n for (var ii = 0, nn = input.readInt(true); ii < nn; ii++) {\n var slotIndex = input.readInt(true);\n for (var iii = 0, nnn = input.readInt(true); iii < nnn; iii++) {\n var attachment = skin.getAttachment(slotIndex, input.readStringRef());\n var weighted = attachment.bones != null;\n var vertices = attachment.vertices;\n var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\n var frameCount = input.readInt(true);\n var timeline = new spine.DeformTimeline(frameCount);\n timeline.slotIndex = slotIndex;\n timeline.attachment = attachment;\n for (var frameIndex = 0; frameIndex < frameCount; frameIndex++) {\n var time = input.readFloat();\n var deform = void 0;\n var end = input.readInt(true);\n if (end == 0)\n deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\n else {\n deform = spine.Utils.newFloatArray(deformLength);\n var start = input.readInt(true);\n end += start;\n if (scale == 1) {\n for (var v = start; v < end; v++)\n deform[v] = input.readFloat();\n }\n else {\n for (var v = start; v < end; v++)\n deform[v] = input.readFloat() * scale;\n }\n if (!weighted) {\n for (var v = 0, vn = deform.length; v < vn; v++)\n deform[v] += vertices[v];\n }\n }\n timeline.setFrame(frameIndex, time, deform);\n if (frameIndex < frameCount - 1)\n this.readCurve(input, frameIndex, timeline);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[frameCount - 1]);\n }\n }\n }\n var drawOrderCount = input.readInt(true);\n if (drawOrderCount > 0) {\n var timeline = new spine.DrawOrderTimeline(drawOrderCount);\n var slotCount = skeletonData.slots.length;\n for (var i = 0; i < drawOrderCount; i++) {\n var time = input.readFloat();\n var offsetCount = input.readInt(true);\n var drawOrder = spine.Utils.newArray(slotCount, 0);\n for (var ii = slotCount - 1; ii >= 0; ii--)\n drawOrder[ii] = -1;\n var unchanged = spine.Utils.newArray(slotCount - offsetCount, 0);\n var originalIndex = 0, unchangedIndex = 0;\n for (var ii = 0; ii < offsetCount; ii++) {\n var slotIndex = input.readInt(true);\n while (originalIndex != slotIndex)\n unchanged[unchangedIndex++] = originalIndex++;\n drawOrder[originalIndex + input.readInt(true)] = originalIndex++;\n }\n while (originalIndex < slotCount)\n unchanged[unchangedIndex++] = originalIndex++;\n for (var ii = slotCount - 1; ii >= 0; ii--)\n if (drawOrder[ii] == -1)\n drawOrder[ii] = unchanged[--unchangedIndex];\n timeline.setFrame(i, time, drawOrder);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[drawOrderCount - 1]);\n }\n var eventCount = input.readInt(true);\n if (eventCount > 0) {\n var timeline = new spine.EventTimeline(eventCount);\n for (var i = 0; i < eventCount; i++) {\n var time = input.readFloat();\n var eventData = skeletonData.events[input.readInt(true)];\n var event_4 = new spine.Event(time, eventData);\n event_4.intValue = input.readInt(false);\n event_4.floatValue = input.readFloat();\n event_4.stringValue = input.readBoolean() ? input.readString() : eventData.stringValue;\n if (event_4.data.audioPath != null) {\n event_4.volume = input.readFloat();\n event_4.balance = input.readFloat();\n }\n timeline.setFrame(i, event_4);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[eventCount - 1]);\n }\n return new spine.Animation(name, timelines, duration);\n };\n SkeletonBinary.prototype.readCurve = function (input, frameIndex, timeline) {\n switch (input.readByte()) {\n case SkeletonBinary.CURVE_STEPPED:\n timeline.setStepped(frameIndex);\n break;\n case SkeletonBinary.CURVE_BEZIER:\n this.setCurve(timeline, frameIndex, input.readFloat(), input.readFloat(), input.readFloat(), input.readFloat());\n break;\n }\n };\n SkeletonBinary.prototype.setCurve = function (timeline, frameIndex, cx1, cy1, cx2, cy2) {\n timeline.setCurve(frameIndex, cx1, cy1, cx2, cy2);\n };\n SkeletonBinary.AttachmentTypeValues = [0, 1, 2, 3, 4, 5, 6];\n SkeletonBinary.TransformModeValues = [spine.TransformMode.Normal, spine.TransformMode.OnlyTranslation, spine.TransformMode.NoRotationOrReflection, spine.TransformMode.NoScale, spine.TransformMode.NoScaleOrReflection];\n SkeletonBinary.PositionModeValues = [spine.PositionMode.Fixed, spine.PositionMode.Percent];\n SkeletonBinary.SpacingModeValues = [spine.SpacingMode.Length, spine.SpacingMode.Fixed, spine.SpacingMode.Percent];\n SkeletonBinary.RotateModeValues = [spine.RotateMode.Tangent, spine.RotateMode.Chain, spine.RotateMode.ChainScale];\n SkeletonBinary.BlendModeValues = [spine.BlendMode.Normal, spine.BlendMode.Additive, spine.BlendMode.Multiply, spine.BlendMode.Screen];\n SkeletonBinary.BONE_ROTATE = 0;\n SkeletonBinary.BONE_TRANSLATE = 1;\n SkeletonBinary.BONE_SCALE = 2;\n SkeletonBinary.BONE_SHEAR = 3;\n SkeletonBinary.SLOT_ATTACHMENT = 0;\n SkeletonBinary.SLOT_COLOR = 1;\n SkeletonBinary.SLOT_TWO_COLOR = 2;\n SkeletonBinary.PATH_POSITION = 0;\n SkeletonBinary.PATH_SPACING = 1;\n SkeletonBinary.PATH_MIX = 2;\n SkeletonBinary.CURVE_LINEAR = 0;\n SkeletonBinary.CURVE_STEPPED = 1;\n SkeletonBinary.CURVE_BEZIER = 2;\n return SkeletonBinary;\n }());\n spine.SkeletonBinary = SkeletonBinary;\n var BinaryInput = (function () {\n function BinaryInput(data, strings, index, buffer) {\n if (strings === void 0) { strings = new Array(); }\n if (index === void 0) { index = 0; }\n if (buffer === void 0) { buffer = new DataView(data.buffer); }\n this.strings = strings;\n this.index = index;\n this.buffer = buffer;\n }\n BinaryInput.prototype.readByte = function () {\n return this.buffer.getInt8(this.index++);\n };\n BinaryInput.prototype.readShort = function () {\n var value = this.buffer.getInt16(this.index);\n this.index += 2;\n return value;\n };\n BinaryInput.prototype.readInt32 = function () {\n var value = this.buffer.getInt32(this.index);\n this.index += 4;\n return value;\n };\n BinaryInput.prototype.readInt = function (optimizePositive) {\n var b = this.readByte();\n var result = b & 0x7F;\n if ((b & 0x80) != 0) {\n b = this.readByte();\n result |= (b & 0x7F) << 7;\n if ((b & 0x80) != 0) {\n b = this.readByte();\n result |= (b & 0x7F) << 14;\n if ((b & 0x80) != 0) {\n b = this.readByte();\n result |= (b & 0x7F) << 21;\n if ((b & 0x80) != 0) {\n b = this.readByte();\n result |= (b & 0x7F) << 28;\n }\n }\n }\n }\n return optimizePositive ? result : ((result >>> 1) ^ -(result & 1));\n };\n BinaryInput.prototype.readStringRef = function () {\n var index = this.readInt(true);\n return index == 0 ? null : this.strings[index - 1];\n };\n BinaryInput.prototype.readString = function () {\n var byteCount = this.readInt(true);\n switch (byteCount) {\n case 0:\n return null;\n case 1:\n return \"\";\n }\n byteCount--;\n var chars = \"\";\n var charCount = 0;\n for (var i = 0; i < byteCount;) {\n var b = this.readByte();\n switch (b >> 4) {\n case 12:\n case 13:\n chars += String.fromCharCode(((b & 0x1F) << 6 | this.readByte() & 0x3F));\n i += 2;\n break;\n case 14:\n chars += String.fromCharCode(((b & 0x0F) << 12 | (this.readByte() & 0x3F) << 6 | this.readByte() & 0x3F));\n i += 3;\n break;\n default:\n chars += String.fromCharCode(b);\n i++;\n }\n }\n return chars;\n };\n BinaryInput.prototype.readFloat = function () {\n var value = this.buffer.getFloat32(this.index);\n this.index += 4;\n return value;\n };\n BinaryInput.prototype.readBoolean = function () {\n return this.readByte() != 0;\n };\n return BinaryInput;\n }());\n var LinkedMesh = (function () {\n function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\n this.mesh = mesh;\n this.skin = skin;\n this.slotIndex = slotIndex;\n this.parent = parent;\n this.inheritDeform = inheritDeform;\n }\n return LinkedMesh;\n }());\n var Vertices = (function () {\n function Vertices(bones, vertices) {\n if (bones === void 0) { bones = null; }\n if (vertices === void 0) { vertices = null; }\n this.bones = bones;\n this.vertices = vertices;\n }\n return Vertices;\n }());\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SkeletonBounds = (function () {\n function SkeletonBounds() {\n this.minX = 0;\n this.minY = 0;\n this.maxX = 0;\n this.maxY = 0;\n this.boundingBoxes = new Array();\n this.polygons = new Array();\n this.polygonPool = new spine.Pool(function () {\n return spine.Utils.newFloatArray(16);\n });\n }\n SkeletonBounds.prototype.update = function (skeleton, updateAabb) {\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n var boundingBoxes = this.boundingBoxes;\n var polygons = this.polygons;\n var polygonPool = this.polygonPool;\n var slots = skeleton.slots;\n var slotCount = slots.length;\n boundingBoxes.length = 0;\n polygonPool.freeAll(polygons);\n polygons.length = 0;\n for (var i = 0; i < slotCount; i++) {\n var slot = slots[i];\n if (!slot.bone.active)\n continue;\n var attachment = slot.getAttachment();\n if (attachment instanceof spine.BoundingBoxAttachment) {\n var boundingBox = attachment;\n boundingBoxes.push(boundingBox);\n var polygon = polygonPool.obtain();\n if (polygon.length != boundingBox.worldVerticesLength) {\n polygon = spine.Utils.newFloatArray(boundingBox.worldVerticesLength);\n }\n polygons.push(polygon);\n boundingBox.computeWorldVertices(slot, 0, boundingBox.worldVerticesLength, polygon, 0, 2);\n }\n }\n if (updateAabb) {\n this.aabbCompute();\n }\n else {\n this.minX = Number.POSITIVE_INFINITY;\n this.minY = Number.POSITIVE_INFINITY;\n this.maxX = Number.NEGATIVE_INFINITY;\n this.maxY = Number.NEGATIVE_INFINITY;\n }\n };\n SkeletonBounds.prototype.aabbCompute = function () {\n var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY;\n var polygons = this.polygons;\n for (var i = 0, n = polygons.length; i < n; i++) {\n var polygon = polygons[i];\n var vertices = polygon;\n for (var ii = 0, nn = polygon.length; ii < nn; ii += 2) {\n var x = vertices[ii];\n var y = vertices[ii + 1];\n minX = Math.min(minX, x);\n minY = Math.min(minY, y);\n maxX = Math.max(maxX, x);\n maxY = Math.max(maxY, y);\n }\n }\n this.minX = minX;\n this.minY = minY;\n this.maxX = maxX;\n this.maxY = maxY;\n };\n SkeletonBounds.prototype.aabbContainsPoint = function (x, y) {\n return x >= this.minX && x <= this.maxX && y >= this.minY && y <= this.maxY;\n };\n SkeletonBounds.prototype.aabbIntersectsSegment = function (x1, y1, x2, y2) {\n var minX = this.minX;\n var minY = this.minY;\n var maxX = this.maxX;\n var maxY = this.maxY;\n if ((x1 <= minX && x2 <= minX) || (y1 <= minY && y2 <= minY) || (x1 >= maxX && x2 >= maxX) || (y1 >= maxY && y2 >= maxY))\n return false;\n var m = (y2 - y1) / (x2 - x1);\n var y = m * (minX - x1) + y1;\n if (y > minY && y < maxY)\n return true;\n y = m * (maxX - x1) + y1;\n if (y > minY && y < maxY)\n return true;\n var x = (minY - y1) / m + x1;\n if (x > minX && x < maxX)\n return true;\n x = (maxY - y1) / m + x1;\n if (x > minX && x < maxX)\n return true;\n return false;\n };\n SkeletonBounds.prototype.aabbIntersectsSkeleton = function (bounds) {\n return this.minX < bounds.maxX && this.maxX > bounds.minX && this.minY < bounds.maxY && this.maxY > bounds.minY;\n };\n SkeletonBounds.prototype.containsPoint = function (x, y) {\n var polygons = this.polygons;\n for (var i = 0, n = polygons.length; i < n; i++)\n if (this.containsPointPolygon(polygons[i], x, y))\n return this.boundingBoxes[i];\n return null;\n };\n SkeletonBounds.prototype.containsPointPolygon = function (polygon, x, y) {\n var vertices = polygon;\n var nn = polygon.length;\n var prevIndex = nn - 2;\n var inside = false;\n for (var ii = 0; ii < nn; ii += 2) {\n var vertexY = vertices[ii + 1];\n var prevY = vertices[prevIndex + 1];\n if ((vertexY < y && prevY >= y) || (prevY < y && vertexY >= y)) {\n var vertexX = vertices[ii];\n if (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x)\n inside = !inside;\n }\n prevIndex = ii;\n }\n return inside;\n };\n SkeletonBounds.prototype.intersectsSegment = function (x1, y1, x2, y2) {\n var polygons = this.polygons;\n for (var i = 0, n = polygons.length; i < n; i++)\n if (this.intersectsSegmentPolygon(polygons[i], x1, y1, x2, y2))\n return this.boundingBoxes[i];\n return null;\n };\n SkeletonBounds.prototype.intersectsSegmentPolygon = function (polygon, x1, y1, x2, y2) {\n var vertices = polygon;\n var nn = polygon.length;\n var width12 = x1 - x2, height12 = y1 - y2;\n var det1 = x1 * y2 - y1 * x2;\n var x3 = vertices[nn - 2], y3 = vertices[nn - 1];\n for (var ii = 0; ii < nn; ii += 2) {\n var x4 = vertices[ii], y4 = vertices[ii + 1];\n var det2 = x3 * y4 - y3 * x4;\n var width34 = x3 - x4, height34 = y3 - y4;\n var det3 = width12 * height34 - height12 * width34;\n var x = (det1 * width34 - width12 * det2) / det3;\n if (((x >= x3 && x <= x4) || (x >= x4 && x <= x3)) && ((x >= x1 && x <= x2) || (x >= x2 && x <= x1))) {\n var y = (det1 * height34 - height12 * det2) / det3;\n if (((y >= y3 && y <= y4) || (y >= y4 && y <= y3)) && ((y >= y1 && y <= y2) || (y >= y2 && y <= y1)))\n return true;\n }\n x3 = x4;\n y3 = y4;\n }\n return false;\n };\n SkeletonBounds.prototype.getPolygon = function (boundingBox) {\n if (boundingBox == null)\n throw new Error(\"boundingBox cannot be null.\");\n var index = this.boundingBoxes.indexOf(boundingBox);\n return index == -1 ? null : this.polygons[index];\n };\n SkeletonBounds.prototype.getWidth = function () {\n return this.maxX - this.minX;\n };\n SkeletonBounds.prototype.getHeight = function () {\n return this.maxY - this.minY;\n };\n return SkeletonBounds;\n }());\n spine.SkeletonBounds = SkeletonBounds;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SkeletonClipping = (function () {\n function SkeletonClipping() {\n this.triangulator = new spine.Triangulator();\n this.clippingPolygon = new Array();\n this.clipOutput = new Array();\n this.clippedVertices = new Array();\n this.clippedTriangles = new Array();\n this.scratch = new Array();\n }\n SkeletonClipping.prototype.clipStart = function (slot, clip) {\n if (this.clipAttachment != null)\n return 0;\n this.clipAttachment = clip;\n var n = clip.worldVerticesLength;\n var vertices = spine.Utils.setArraySize(this.clippingPolygon, n);\n clip.computeWorldVertices(slot, 0, n, vertices, 0, 2);\n var clippingPolygon = this.clippingPolygon;\n SkeletonClipping.makeClockwise(clippingPolygon);\n var clippingPolygons = this.clippingPolygons = this.triangulator.decompose(clippingPolygon, this.triangulator.triangulate(clippingPolygon));\n for (var i = 0, n_2 = clippingPolygons.length; i < n_2; i++) {\n var polygon = clippingPolygons[i];\n SkeletonClipping.makeClockwise(polygon);\n polygon.push(polygon[0]);\n polygon.push(polygon[1]);\n }\n return clippingPolygons.length;\n };\n SkeletonClipping.prototype.clipEndWithSlot = function (slot) {\n if (this.clipAttachment != null && this.clipAttachment.endSlot == slot.data)\n this.clipEnd();\n };\n SkeletonClipping.prototype.clipEnd = function () {\n if (this.clipAttachment == null)\n return;\n this.clipAttachment = null;\n this.clippingPolygons = null;\n this.clippedVertices.length = 0;\n this.clippedTriangles.length = 0;\n this.clippingPolygon.length = 0;\n };\n SkeletonClipping.prototype.isClipping = function () {\n return this.clipAttachment != null;\n };\n SkeletonClipping.prototype.clipTriangles = function (vertices, verticesLength, triangles, trianglesLength, uvs, light, dark, twoColor) {\n var clipOutput = this.clipOutput, clippedVertices = this.clippedVertices;\n var clippedTriangles = this.clippedTriangles;\n var polygons = this.clippingPolygons;\n var polygonsCount = this.clippingPolygons.length;\n var vertexSize = twoColor ? 12 : 8;\n var index = 0;\n clippedVertices.length = 0;\n clippedTriangles.length = 0;\n outer: for (var i = 0; i < trianglesLength; i += 3) {\n var vertexOffset = triangles[i] << 1;\n var x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];\n var u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];\n vertexOffset = triangles[i + 1] << 1;\n var x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];\n var u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];\n vertexOffset = triangles[i + 2] << 1;\n var x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];\n var u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];\n for (var p = 0; p < polygonsCount; p++) {\n var s = clippedVertices.length;\n if (this.clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) {\n var clipOutputLength = clipOutput.length;\n if (clipOutputLength == 0)\n continue;\n var d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1;\n var d = 1 / (d0 * d2 + d1 * (y1 - y3));\n var clipOutputCount = clipOutputLength >> 1;\n var clipOutputItems = this.clipOutput;\n var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + clipOutputCount * vertexSize);\n for (var ii = 0; ii < clipOutputLength; ii += 2) {\n var x = clipOutputItems[ii], y = clipOutputItems[ii + 1];\n clippedVerticesItems[s] = x;\n clippedVerticesItems[s + 1] = y;\n clippedVerticesItems[s + 2] = light.r;\n clippedVerticesItems[s + 3] = light.g;\n clippedVerticesItems[s + 4] = light.b;\n clippedVerticesItems[s + 5] = light.a;\n var c0 = x - x3, c1 = y - y3;\n var a = (d0 * c0 + d1 * c1) * d;\n var b = (d4 * c0 + d2 * c1) * d;\n var c = 1 - a - b;\n clippedVerticesItems[s + 6] = u1 * a + u2 * b + u3 * c;\n clippedVerticesItems[s + 7] = v1 * a + v2 * b + v3 * c;\n if (twoColor) {\n clippedVerticesItems[s + 8] = dark.r;\n clippedVerticesItems[s + 9] = dark.g;\n clippedVerticesItems[s + 10] = dark.b;\n clippedVerticesItems[s + 11] = dark.a;\n }\n s += vertexSize;\n }\n s = clippedTriangles.length;\n var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3 * (clipOutputCount - 2));\n clipOutputCount--;\n for (var ii = 1; ii < clipOutputCount; ii++) {\n clippedTrianglesItems[s] = index;\n clippedTrianglesItems[s + 1] = (index + ii);\n clippedTrianglesItems[s + 2] = (index + ii + 1);\n s += 3;\n }\n index += clipOutputCount + 1;\n }\n else {\n var clippedVerticesItems = spine.Utils.setArraySize(clippedVertices, s + 3 * vertexSize);\n clippedVerticesItems[s] = x1;\n clippedVerticesItems[s + 1] = y1;\n clippedVerticesItems[s + 2] = light.r;\n clippedVerticesItems[s + 3] = light.g;\n clippedVerticesItems[s + 4] = light.b;\n clippedVerticesItems[s + 5] = light.a;\n if (!twoColor) {\n clippedVerticesItems[s + 6] = u1;\n clippedVerticesItems[s + 7] = v1;\n clippedVerticesItems[s + 8] = x2;\n clippedVerticesItems[s + 9] = y2;\n clippedVerticesItems[s + 10] = light.r;\n clippedVerticesItems[s + 11] = light.g;\n clippedVerticesItems[s + 12] = light.b;\n clippedVerticesItems[s + 13] = light.a;\n clippedVerticesItems[s + 14] = u2;\n clippedVerticesItems[s + 15] = v2;\n clippedVerticesItems[s + 16] = x3;\n clippedVerticesItems[s + 17] = y3;\n clippedVerticesItems[s + 18] = light.r;\n clippedVerticesItems[s + 19] = light.g;\n clippedVerticesItems[s + 20] = light.b;\n clippedVerticesItems[s + 21] = light.a;\n clippedVerticesItems[s + 22] = u3;\n clippedVerticesItems[s + 23] = v3;\n }\n else {\n clippedVerticesItems[s + 6] = u1;\n clippedVerticesItems[s + 7] = v1;\n clippedVerticesItems[s + 8] = dark.r;\n clippedVerticesItems[s + 9] = dark.g;\n clippedVerticesItems[s + 10] = dark.b;\n clippedVerticesItems[s + 11] = dark.a;\n clippedVerticesItems[s + 12] = x2;\n clippedVerticesItems[s + 13] = y2;\n clippedVerticesItems[s + 14] = light.r;\n clippedVerticesItems[s + 15] = light.g;\n clippedVerticesItems[s + 16] = light.b;\n clippedVerticesItems[s + 17] = light.a;\n clippedVerticesItems[s + 18] = u2;\n clippedVerticesItems[s + 19] = v2;\n clippedVerticesItems[s + 20] = dark.r;\n clippedVerticesItems[s + 21] = dark.g;\n clippedVerticesItems[s + 22] = dark.b;\n clippedVerticesItems[s + 23] = dark.a;\n clippedVerticesItems[s + 24] = x3;\n clippedVerticesItems[s + 25] = y3;\n clippedVerticesItems[s + 26] = light.r;\n clippedVerticesItems[s + 27] = light.g;\n clippedVerticesItems[s + 28] = light.b;\n clippedVerticesItems[s + 29] = light.a;\n clippedVerticesItems[s + 30] = u3;\n clippedVerticesItems[s + 31] = v3;\n clippedVerticesItems[s + 32] = dark.r;\n clippedVerticesItems[s + 33] = dark.g;\n clippedVerticesItems[s + 34] = dark.b;\n clippedVerticesItems[s + 35] = dark.a;\n }\n s = clippedTriangles.length;\n var clippedTrianglesItems = spine.Utils.setArraySize(clippedTriangles, s + 3);\n clippedTrianglesItems[s] = index;\n clippedTrianglesItems[s + 1] = (index + 1);\n clippedTrianglesItems[s + 2] = (index + 2);\n index += 3;\n continue outer;\n }\n }\n }\n };\n SkeletonClipping.prototype.clip = function (x1, y1, x2, y2, x3, y3, clippingArea, output) {\n var originalOutput = output;\n var clipped = false;\n var input = null;\n if (clippingArea.length % 4 >= 2) {\n input = output;\n output = this.scratch;\n }\n else\n input = this.scratch;\n input.length = 0;\n input.push(x1);\n input.push(y1);\n input.push(x2);\n input.push(y2);\n input.push(x3);\n input.push(y3);\n input.push(x1);\n input.push(y1);\n output.length = 0;\n var clippingVertices = clippingArea;\n var clippingVerticesLast = clippingArea.length - 4;\n for (var i = 0;; i += 2) {\n var edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1];\n var edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3];\n var deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2;\n var inputVertices = input;\n var inputVerticesLength = input.length - 2, outputStart = output.length;\n for (var ii = 0; ii < inputVerticesLength; ii += 2) {\n var inputX = inputVertices[ii], inputY = inputVertices[ii + 1];\n var inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3];\n var side2 = deltaX * (inputY2 - edgeY2) - deltaY * (inputX2 - edgeX2) > 0;\n if (deltaX * (inputY - edgeY2) - deltaY * (inputX - edgeX2) > 0) {\n if (side2) {\n output.push(inputX2);\n output.push(inputY2);\n continue;\n }\n var c0 = inputY2 - inputY, c2 = inputX2 - inputX;\n var s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\n if (Math.abs(s) > 0.000001) {\n var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\n output.push(edgeX + (edgeX2 - edgeX) * ua);\n output.push(edgeY + (edgeY2 - edgeY) * ua);\n }\n else {\n output.push(edgeX);\n output.push(edgeY);\n }\n }\n else if (side2) {\n var c0 = inputY2 - inputY, c2 = inputX2 - inputX;\n var s = c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY);\n if (Math.abs(s) > 0.000001) {\n var ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / s;\n output.push(edgeX + (edgeX2 - edgeX) * ua);\n output.push(edgeY + (edgeY2 - edgeY) * ua);\n }\n else {\n output.push(edgeX);\n output.push(edgeY);\n }\n output.push(inputX2);\n output.push(inputY2);\n }\n clipped = true;\n }\n if (outputStart == output.length) {\n originalOutput.length = 0;\n return true;\n }\n output.push(output[0]);\n output.push(output[1]);\n if (i == clippingVerticesLast)\n break;\n var temp = output;\n output = input;\n output.length = 0;\n input = temp;\n }\n if (originalOutput != output) {\n originalOutput.length = 0;\n for (var i = 0, n = output.length - 2; i < n; i++)\n originalOutput[i] = output[i];\n }\n else\n originalOutput.length = originalOutput.length - 2;\n return clipped;\n };\n SkeletonClipping.makeClockwise = function (polygon) {\n var vertices = polygon;\n var verticeslength = polygon.length;\n var area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x = 0, p1y = 0, p2x = 0, p2y = 0;\n for (var i = 0, n = verticeslength - 3; i < n; i += 2) {\n p1x = vertices[i];\n p1y = vertices[i + 1];\n p2x = vertices[i + 2];\n p2y = vertices[i + 3];\n area += p1x * p2y - p2x * p1y;\n }\n if (area < 0)\n return;\n for (var i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {\n var x = vertices[i], y = vertices[i + 1];\n var other = lastX - i;\n vertices[i] = vertices[other];\n vertices[i + 1] = vertices[other + 1];\n vertices[other] = x;\n vertices[other + 1] = y;\n }\n };\n return SkeletonClipping;\n }());\n spine.SkeletonClipping = SkeletonClipping;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SkeletonData = (function () {\n function SkeletonData() {\n this.bones = new Array();\n this.slots = new Array();\n this.skins = new Array();\n this.events = new Array();\n this.animations = new Array();\n this.ikConstraints = new Array();\n this.transformConstraints = new Array();\n this.pathConstraints = new Array();\n this.fps = 0;\n }\n SkeletonData.prototype.findBone = function (boneName) {\n if (boneName == null)\n throw new Error(\"boneName cannot be null.\");\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n if (bone.name == boneName)\n return bone;\n }\n return null;\n };\n SkeletonData.prototype.findBoneIndex = function (boneName) {\n if (boneName == null)\n throw new Error(\"boneName cannot be null.\");\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++)\n if (bones[i].name == boneName)\n return i;\n return -1;\n };\n SkeletonData.prototype.findSlot = function (slotName) {\n if (slotName == null)\n throw new Error(\"slotName cannot be null.\");\n var slots = this.slots;\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n if (slot.name == slotName)\n return slot;\n }\n return null;\n };\n SkeletonData.prototype.findSlotIndex = function (slotName) {\n if (slotName == null)\n throw new Error(\"slotName cannot be null.\");\n var slots = this.slots;\n for (var i = 0, n = slots.length; i < n; i++)\n if (slots[i].name == slotName)\n return i;\n return -1;\n };\n SkeletonData.prototype.findSkin = function (skinName) {\n if (skinName == null)\n throw new Error(\"skinName cannot be null.\");\n var skins = this.skins;\n for (var i = 0, n = skins.length; i < n; i++) {\n var skin = skins[i];\n if (skin.name == skinName)\n return skin;\n }\n return null;\n };\n SkeletonData.prototype.findEvent = function (eventDataName) {\n if (eventDataName == null)\n throw new Error(\"eventDataName cannot be null.\");\n var events = this.events;\n for (var i = 0, n = events.length; i < n; i++) {\n var event_5 = events[i];\n if (event_5.name == eventDataName)\n return event_5;\n }\n return null;\n };\n SkeletonData.prototype.findAnimation = function (animationName) {\n if (animationName == null)\n throw new Error(\"animationName cannot be null.\");\n var animations = this.animations;\n for (var i = 0, n = animations.length; i < n; i++) {\n var animation = animations[i];\n if (animation.name == animationName)\n return animation;\n }\n return null;\n };\n SkeletonData.prototype.findIkConstraint = function (constraintName) {\n if (constraintName == null)\n throw new Error(\"constraintName cannot be null.\");\n var ikConstraints = this.ikConstraints;\n for (var i = 0, n = ikConstraints.length; i < n; i++) {\n var constraint = ikConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n };\n SkeletonData.prototype.findTransformConstraint = function (constraintName) {\n if (constraintName == null)\n throw new Error(\"constraintName cannot be null.\");\n var transformConstraints = this.transformConstraints;\n for (var i = 0, n = transformConstraints.length; i < n; i++) {\n var constraint = transformConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n };\n SkeletonData.prototype.findPathConstraint = function (constraintName) {\n if (constraintName == null)\n throw new Error(\"constraintName cannot be null.\");\n var pathConstraints = this.pathConstraints;\n for (var i = 0, n = pathConstraints.length; i < n; i++) {\n var constraint = pathConstraints[i];\n if (constraint.name == constraintName)\n return constraint;\n }\n return null;\n };\n SkeletonData.prototype.findPathConstraintIndex = function (pathConstraintName) {\n if (pathConstraintName == null)\n throw new Error(\"pathConstraintName cannot be null.\");\n var pathConstraints = this.pathConstraints;\n for (var i = 0, n = pathConstraints.length; i < n; i++)\n if (pathConstraints[i].name == pathConstraintName)\n return i;\n return -1;\n };\n return SkeletonData;\n }());\n spine.SkeletonData = SkeletonData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SkeletonJson = (function () {\n function SkeletonJson(attachmentLoader) {\n this.scale = 1;\n this.linkedMeshes = new Array();\n this.attachmentLoader = attachmentLoader;\n }\n SkeletonJson.prototype.readSkeletonData = function (json) {\n var scale = this.scale;\n var skeletonData = new spine.SkeletonData();\n var root = typeof (json) === \"string\" ? JSON.parse(json) : json;\n var skeletonMap = root.skeleton;\n if (skeletonMap != null) {\n skeletonData.hash = skeletonMap.hash;\n skeletonData.version = skeletonMap.spine;\n if (\"3.8.75\" == skeletonData.version)\n throw new Error(\"Unsupported skeleton data, please export with a newer version of Spine.\");\n skeletonData.x = skeletonMap.x;\n skeletonData.y = skeletonMap.y;\n skeletonData.width = skeletonMap.width;\n skeletonData.height = skeletonMap.height;\n skeletonData.fps = skeletonMap.fps;\n skeletonData.imagesPath = skeletonMap.images;\n }\n if (root.bones) {\n for (var i = 0; i < root.bones.length; i++) {\n var boneMap = root.bones[i];\n var parent_5 = null;\n var parentName = this.getValue(boneMap, \"parent\", null);\n if (parentName != null) {\n parent_5 = skeletonData.findBone(parentName);\n if (parent_5 == null)\n throw new Error(\"Parent bone not found: \" + parentName);\n }\n var data = new spine.BoneData(skeletonData.bones.length, boneMap.name, parent_5);\n data.length = this.getValue(boneMap, \"length\", 0) * scale;\n data.x = this.getValue(boneMap, \"x\", 0) * scale;\n data.y = this.getValue(boneMap, \"y\", 0) * scale;\n data.rotation = this.getValue(boneMap, \"rotation\", 0);\n data.scaleX = this.getValue(boneMap, \"scaleX\", 1);\n data.scaleY = this.getValue(boneMap, \"scaleY\", 1);\n data.shearX = this.getValue(boneMap, \"shearX\", 0);\n data.shearY = this.getValue(boneMap, \"shearY\", 0);\n data.transformMode = SkeletonJson.transformModeFromString(this.getValue(boneMap, \"transform\", \"normal\"));\n data.skinRequired = this.getValue(boneMap, \"skin\", false);\n skeletonData.bones.push(data);\n }\n }\n if (root.slots) {\n for (var i = 0; i < root.slots.length; i++) {\n var slotMap = root.slots[i];\n var slotName = slotMap.name;\n var boneName = slotMap.bone;\n var boneData = skeletonData.findBone(boneName);\n if (boneData == null)\n throw new Error(\"Slot bone not found: \" + boneName);\n var data = new spine.SlotData(skeletonData.slots.length, slotName, boneData);\n var color = this.getValue(slotMap, \"color\", null);\n if (color != null)\n data.color.setFromString(color);\n var dark = this.getValue(slotMap, \"dark\", null);\n if (dark != null) {\n data.darkColor = new spine.Color(1, 1, 1, 1);\n data.darkColor.setFromString(dark);\n }\n data.attachmentName = this.getValue(slotMap, \"attachment\", null);\n data.blendMode = SkeletonJson.blendModeFromString(this.getValue(slotMap, \"blend\", \"normal\"));\n skeletonData.slots.push(data);\n }\n }\n if (root.ik) {\n for (var i = 0; i < root.ik.length; i++) {\n var constraintMap = root.ik[i];\n var data = new spine.IkConstraintData(constraintMap.name);\n data.order = this.getValue(constraintMap, \"order\", 0);\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\n for (var j = 0; j < constraintMap.bones.length; j++) {\n var boneName = constraintMap.bones[j];\n var bone = skeletonData.findBone(boneName);\n if (bone == null)\n throw new Error(\"IK bone not found: \" + boneName);\n data.bones.push(bone);\n }\n var targetName = constraintMap.target;\n data.target = skeletonData.findBone(targetName);\n if (data.target == null)\n throw new Error(\"IK target bone not found: \" + targetName);\n data.mix = this.getValue(constraintMap, \"mix\", 1);\n data.softness = this.getValue(constraintMap, \"softness\", 0) * scale;\n data.bendDirection = this.getValue(constraintMap, \"bendPositive\", true) ? 1 : -1;\n data.compress = this.getValue(constraintMap, \"compress\", false);\n data.stretch = this.getValue(constraintMap, \"stretch\", false);\n data.uniform = this.getValue(constraintMap, \"uniform\", false);\n skeletonData.ikConstraints.push(data);\n }\n }\n if (root.transform) {\n for (var i = 0; i < root.transform.length; i++) {\n var constraintMap = root.transform[i];\n var data = new spine.TransformConstraintData(constraintMap.name);\n data.order = this.getValue(constraintMap, \"order\", 0);\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\n for (var j = 0; j < constraintMap.bones.length; j++) {\n var boneName = constraintMap.bones[j];\n var bone = skeletonData.findBone(boneName);\n if (bone == null)\n throw new Error(\"Transform constraint bone not found: \" + boneName);\n data.bones.push(bone);\n }\n var targetName = constraintMap.target;\n data.target = skeletonData.findBone(targetName);\n if (data.target == null)\n throw new Error(\"Transform constraint target bone not found: \" + targetName);\n data.local = this.getValue(constraintMap, \"local\", false);\n data.relative = this.getValue(constraintMap, \"relative\", false);\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\n data.offsetX = this.getValue(constraintMap, \"x\", 0) * scale;\n data.offsetY = this.getValue(constraintMap, \"y\", 0) * scale;\n data.offsetScaleX = this.getValue(constraintMap, \"scaleX\", 0);\n data.offsetScaleY = this.getValue(constraintMap, \"scaleY\", 0);\n data.offsetShearY = this.getValue(constraintMap, \"shearY\", 0);\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\n data.scaleMix = this.getValue(constraintMap, \"scaleMix\", 1);\n data.shearMix = this.getValue(constraintMap, \"shearMix\", 1);\n skeletonData.transformConstraints.push(data);\n }\n }\n if (root.path) {\n for (var i = 0; i < root.path.length; i++) {\n var constraintMap = root.path[i];\n var data = new spine.PathConstraintData(constraintMap.name);\n data.order = this.getValue(constraintMap, \"order\", 0);\n data.skinRequired = this.getValue(constraintMap, \"skin\", false);\n for (var j = 0; j < constraintMap.bones.length; j++) {\n var boneName = constraintMap.bones[j];\n var bone = skeletonData.findBone(boneName);\n if (bone == null)\n throw new Error(\"Transform constraint bone not found: \" + boneName);\n data.bones.push(bone);\n }\n var targetName = constraintMap.target;\n data.target = skeletonData.findSlot(targetName);\n if (data.target == null)\n throw new Error(\"Path target slot not found: \" + targetName);\n data.positionMode = SkeletonJson.positionModeFromString(this.getValue(constraintMap, \"positionMode\", \"percent\"));\n data.spacingMode = SkeletonJson.spacingModeFromString(this.getValue(constraintMap, \"spacingMode\", \"length\"));\n data.rotateMode = SkeletonJson.rotateModeFromString(this.getValue(constraintMap, \"rotateMode\", \"tangent\"));\n data.offsetRotation = this.getValue(constraintMap, \"rotation\", 0);\n data.position = this.getValue(constraintMap, \"position\", 0);\n if (data.positionMode == spine.PositionMode.Fixed)\n data.position *= scale;\n data.spacing = this.getValue(constraintMap, \"spacing\", 0);\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\n data.spacing *= scale;\n data.rotateMix = this.getValue(constraintMap, \"rotateMix\", 1);\n data.translateMix = this.getValue(constraintMap, \"translateMix\", 1);\n skeletonData.pathConstraints.push(data);\n }\n }\n if (root.skins) {\n for (var i = 0; i < root.skins.length; i++) {\n var skinMap = root.skins[i];\n var skin = new spine.Skin(skinMap.name);\n if (skinMap.bones) {\n for (var ii = 0; ii < skinMap.bones.length; ii++) {\n var bone = skeletonData.findBone(skinMap.bones[ii]);\n if (bone == null)\n throw new Error(\"Skin bone not found: \" + skinMap.bones[i]);\n skin.bones.push(bone);\n }\n }\n if (skinMap.ik) {\n for (var ii = 0; ii < skinMap.ik.length; ii++) {\n var constraint = skeletonData.findIkConstraint(skinMap.ik[ii]);\n if (constraint == null)\n throw new Error(\"Skin IK constraint not found: \" + skinMap.ik[i]);\n skin.constraints.push(constraint);\n }\n }\n if (skinMap.transform) {\n for (var ii = 0; ii < skinMap.transform.length; ii++) {\n var constraint = skeletonData.findTransformConstraint(skinMap.transform[ii]);\n if (constraint == null)\n throw new Error(\"Skin transform constraint not found: \" + skinMap.transform[i]);\n skin.constraints.push(constraint);\n }\n }\n if (skinMap.path) {\n for (var ii = 0; ii < skinMap.path.length; ii++) {\n var constraint = skeletonData.findPathConstraint(skinMap.path[ii]);\n if (constraint == null)\n throw new Error(\"Skin path constraint not found: \" + skinMap.path[i]);\n skin.constraints.push(constraint);\n }\n }\n for (var slotName in skinMap.attachments) {\n var slot = skeletonData.findSlot(slotName);\n if (slot == null)\n throw new Error(\"Slot not found: \" + slotName);\n var slotMap = skinMap.attachments[slotName];\n for (var entryName in slotMap) {\n var attachment = this.readAttachment(slotMap[entryName], skin, slot.index, entryName, skeletonData);\n if (attachment != null)\n skin.setAttachment(slot.index, entryName, attachment);\n }\n }\n skeletonData.skins.push(skin);\n if (skin.name == \"default\")\n skeletonData.defaultSkin = skin;\n }\n }\n for (var i = 0, n = this.linkedMeshes.length; i < n; i++) {\n var linkedMesh = this.linkedMeshes[i];\n var skin = linkedMesh.skin == null ? skeletonData.defaultSkin : skeletonData.findSkin(linkedMesh.skin);\n if (skin == null)\n throw new Error(\"Skin not found: \" + linkedMesh.skin);\n var parent_6 = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);\n if (parent_6 == null)\n throw new Error(\"Parent mesh not found: \" + linkedMesh.parent);\n linkedMesh.mesh.deformAttachment = linkedMesh.inheritDeform ? parent_6 : linkedMesh.mesh;\n linkedMesh.mesh.setParentMesh(parent_6);\n linkedMesh.mesh.updateUVs();\n }\n this.linkedMeshes.length = 0;\n if (root.events) {\n for (var eventName in root.events) {\n var eventMap = root.events[eventName];\n var data = new spine.EventData(eventName);\n data.intValue = this.getValue(eventMap, \"int\", 0);\n data.floatValue = this.getValue(eventMap, \"float\", 0);\n data.stringValue = this.getValue(eventMap, \"string\", \"\");\n data.audioPath = this.getValue(eventMap, \"audio\", null);\n if (data.audioPath != null) {\n data.volume = this.getValue(eventMap, \"volume\", 1);\n data.balance = this.getValue(eventMap, \"balance\", 0);\n }\n skeletonData.events.push(data);\n }\n }\n if (root.animations) {\n for (var animationName in root.animations) {\n var animationMap = root.animations[animationName];\n this.readAnimation(animationMap, animationName, skeletonData);\n }\n }\n return skeletonData;\n };\n SkeletonJson.prototype.readAttachment = function (map, skin, slotIndex, name, skeletonData) {\n var scale = this.scale;\n name = this.getValue(map, \"name\", name);\n var type = this.getValue(map, \"type\", \"region\");\n switch (type) {\n case \"region\": {\n var path = this.getValue(map, \"path\", name);\n var region = this.attachmentLoader.newRegionAttachment(skin, name, path);\n if (region == null)\n return null;\n region.path = path;\n region.x = this.getValue(map, \"x\", 0) * scale;\n region.y = this.getValue(map, \"y\", 0) * scale;\n region.scaleX = this.getValue(map, \"scaleX\", 1);\n region.scaleY = this.getValue(map, \"scaleY\", 1);\n region.rotation = this.getValue(map, \"rotation\", 0);\n region.width = map.width * scale;\n region.height = map.height * scale;\n var color = this.getValue(map, \"color\", null);\n if (color != null)\n region.color.setFromString(color);\n region.updateOffset();\n return region;\n }\n case \"boundingbox\": {\n var box = this.attachmentLoader.newBoundingBoxAttachment(skin, name);\n if (box == null)\n return null;\n this.readVertices(map, box, map.vertexCount << 1);\n var color = this.getValue(map, \"color\", null);\n if (color != null)\n box.color.setFromString(color);\n return box;\n }\n case \"mesh\":\n case \"linkedmesh\": {\n var path = this.getValue(map, \"path\", name);\n var mesh = this.attachmentLoader.newMeshAttachment(skin, name, path);\n if (mesh == null)\n return null;\n mesh.path = path;\n var color = this.getValue(map, \"color\", null);\n if (color != null)\n mesh.color.setFromString(color);\n mesh.width = this.getValue(map, \"width\", 0) * scale;\n mesh.height = this.getValue(map, \"height\", 0) * scale;\n var parent_7 = this.getValue(map, \"parent\", null);\n if (parent_7 != null) {\n this.linkedMeshes.push(new LinkedMesh(mesh, this.getValue(map, \"skin\", null), slotIndex, parent_7, this.getValue(map, \"deform\", true)));\n return mesh;\n }\n var uvs = map.uvs;\n this.readVertices(map, mesh, uvs.length);\n mesh.triangles = map.triangles;\n mesh.regionUVs = uvs;\n mesh.updateUVs();\n mesh.edges = this.getValue(map, \"edges\", null);\n mesh.hullLength = this.getValue(map, \"hull\", 0) * 2;\n return mesh;\n }\n case \"path\": {\n var path = this.attachmentLoader.newPathAttachment(skin, name);\n if (path == null)\n return null;\n path.closed = this.getValue(map, \"closed\", false);\n path.constantSpeed = this.getValue(map, \"constantSpeed\", true);\n var vertexCount = map.vertexCount;\n this.readVertices(map, path, vertexCount << 1);\n var lengths = spine.Utils.newArray(vertexCount / 3, 0);\n for (var i = 0; i < map.lengths.length; i++)\n lengths[i] = map.lengths[i] * scale;\n path.lengths = lengths;\n var color = this.getValue(map, \"color\", null);\n if (color != null)\n path.color.setFromString(color);\n return path;\n }\n case \"point\": {\n var point = this.attachmentLoader.newPointAttachment(skin, name);\n if (point == null)\n return null;\n point.x = this.getValue(map, \"x\", 0) * scale;\n point.y = this.getValue(map, \"y\", 0) * scale;\n point.rotation = this.getValue(map, \"rotation\", 0);\n var color = this.getValue(map, \"color\", null);\n if (color != null)\n point.color.setFromString(color);\n return point;\n }\n case \"clipping\": {\n var clip = this.attachmentLoader.newClippingAttachment(skin, name);\n if (clip == null)\n return null;\n var end = this.getValue(map, \"end\", null);\n if (end != null) {\n var slot = skeletonData.findSlot(end);\n if (slot == null)\n throw new Error(\"Clipping end slot not found: \" + end);\n clip.endSlot = slot;\n }\n var vertexCount = map.vertexCount;\n this.readVertices(map, clip, vertexCount << 1);\n var color = this.getValue(map, \"color\", null);\n if (color != null)\n clip.color.setFromString(color);\n return clip;\n }\n }\n return null;\n };\n SkeletonJson.prototype.readVertices = function (map, attachment, verticesLength) {\n var scale = this.scale;\n attachment.worldVerticesLength = verticesLength;\n var vertices = map.vertices;\n if (verticesLength == vertices.length) {\n var scaledVertices = spine.Utils.toFloatArray(vertices);\n if (scale != 1) {\n for (var i = 0, n = vertices.length; i < n; i++)\n scaledVertices[i] *= scale;\n }\n attachment.vertices = scaledVertices;\n return;\n }\n var weights = new Array();\n var bones = new Array();\n for (var i = 0, n = vertices.length; i < n;) {\n var boneCount = vertices[i++];\n bones.push(boneCount);\n for (var nn = i + boneCount * 4; i < nn; i += 4) {\n bones.push(vertices[i]);\n weights.push(vertices[i + 1] * scale);\n weights.push(vertices[i + 2] * scale);\n weights.push(vertices[i + 3]);\n }\n }\n attachment.bones = bones;\n attachment.vertices = spine.Utils.toFloatArray(weights);\n };\n SkeletonJson.prototype.readAnimation = function (map, name, skeletonData) {\n var scale = this.scale;\n var timelines = new Array();\n var duration = 0;\n if (map.slots) {\n for (var slotName in map.slots) {\n var slotMap = map.slots[slotName];\n var slotIndex = skeletonData.findSlotIndex(slotName);\n if (slotIndex == -1)\n throw new Error(\"Slot not found: \" + slotName);\n for (var timelineName in slotMap) {\n var timelineMap = slotMap[timelineName];\n if (timelineName == \"attachment\") {\n var timeline = new spine.AttachmentTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n timeline.setFrame(frameIndex++, this.getValue(valueMap, \"time\", 0), valueMap.name);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n else if (timelineName == \"color\") {\n var timeline = new spine.ColorTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n var color = new spine.Color();\n color.setFromString(valueMap.color);\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), color.r, color.g, color.b, color.a);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.ColorTimeline.ENTRIES]);\n }\n else if (timelineName == \"twoColor\") {\n var timeline = new spine.TwoColorTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n var light = new spine.Color();\n var dark = new spine.Color();\n light.setFromString(valueMap.light);\n dark.setFromString(valueMap.dark);\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), light.r, light.g, light.b, light.a, dark.r, dark.g, dark.b);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TwoColorTimeline.ENTRIES]);\n }\n else\n throw new Error(\"Invalid timeline type for a slot: \" + timelineName + \" (\" + slotName + \")\");\n }\n }\n }\n if (map.bones) {\n for (var boneName in map.bones) {\n var boneMap = map.bones[boneName];\n var boneIndex = skeletonData.findBoneIndex(boneName);\n if (boneIndex == -1)\n throw new Error(\"Bone not found: \" + boneName);\n for (var timelineName in boneMap) {\n var timelineMap = boneMap[timelineName];\n if (timelineName === \"rotate\") {\n var timeline = new spine.RotateTimeline(timelineMap.length);\n timeline.boneIndex = boneIndex;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"angle\", 0));\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.RotateTimeline.ENTRIES]);\n }\n else if (timelineName === \"translate\" || timelineName === \"scale\" || timelineName === \"shear\") {\n var timeline = null;\n var timelineScale = 1, defaultValue = 0;\n if (timelineName === \"scale\") {\n timeline = new spine.ScaleTimeline(timelineMap.length);\n defaultValue = 1;\n }\n else if (timelineName === \"shear\")\n timeline = new spine.ShearTimeline(timelineMap.length);\n else {\n timeline = new spine.TranslateTimeline(timelineMap.length);\n timelineScale = scale;\n }\n timeline.boneIndex = boneIndex;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n var x = this.getValue(valueMap, \"x\", defaultValue), y = this.getValue(valueMap, \"y\", defaultValue);\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), x * timelineScale, y * timelineScale);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TranslateTimeline.ENTRIES]);\n }\n else\n throw new Error(\"Invalid timeline type for a bone: \" + timelineName + \" (\" + boneName + \")\");\n }\n }\n }\n if (map.ik) {\n for (var constraintName in map.ik) {\n var constraintMap = map.ik[constraintName];\n var constraint = skeletonData.findIkConstraint(constraintName);\n var timeline = new spine.IkConstraintTimeline(constraintMap.length);\n timeline.ikConstraintIndex = skeletonData.ikConstraints.indexOf(constraint);\n var frameIndex = 0;\n for (var i = 0; i < constraintMap.length; i++) {\n var valueMap = constraintMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"mix\", 1), this.getValue(valueMap, \"softness\", 0) * scale, this.getValue(valueMap, \"bendPositive\", true) ? 1 : -1, this.getValue(valueMap, \"compress\", false), this.getValue(valueMap, \"stretch\", false));\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.IkConstraintTimeline.ENTRIES]);\n }\n }\n if (map.transform) {\n for (var constraintName in map.transform) {\n var constraintMap = map.transform[constraintName];\n var constraint = skeletonData.findTransformConstraint(constraintName);\n var timeline = new spine.TransformConstraintTimeline(constraintMap.length);\n timeline.transformConstraintIndex = skeletonData.transformConstraints.indexOf(constraint);\n var frameIndex = 0;\n for (var i = 0; i < constraintMap.length; i++) {\n var valueMap = constraintMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1), this.getValue(valueMap, \"scaleMix\", 1), this.getValue(valueMap, \"shearMix\", 1));\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.TransformConstraintTimeline.ENTRIES]);\n }\n }\n if (map.path) {\n for (var constraintName in map.path) {\n var constraintMap = map.path[constraintName];\n var index = skeletonData.findPathConstraintIndex(constraintName);\n if (index == -1)\n throw new Error(\"Path constraint not found: \" + constraintName);\n var data = skeletonData.pathConstraints[index];\n for (var timelineName in constraintMap) {\n var timelineMap = constraintMap[timelineName];\n if (timelineName === \"position\" || timelineName === \"spacing\") {\n var timeline = null;\n var timelineScale = 1;\n if (timelineName === \"spacing\") {\n timeline = new spine.PathConstraintSpacingTimeline(timelineMap.length);\n if (data.spacingMode == spine.SpacingMode.Length || data.spacingMode == spine.SpacingMode.Fixed)\n timelineScale = scale;\n }\n else {\n timeline = new spine.PathConstraintPositionTimeline(timelineMap.length);\n if (data.positionMode == spine.PositionMode.Fixed)\n timelineScale = scale;\n }\n timeline.pathConstraintIndex = index;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, timelineName, 0) * timelineScale);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintPositionTimeline.ENTRIES]);\n }\n else if (timelineName === \"mix\") {\n var timeline = new spine.PathConstraintMixTimeline(timelineMap.length);\n timeline.pathConstraintIndex = index;\n var frameIndex = 0;\n for (var i = 0; i < timelineMap.length; i++) {\n var valueMap = timelineMap[i];\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), this.getValue(valueMap, \"rotateMix\", 1), this.getValue(valueMap, \"translateMix\", 1));\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[(timeline.getFrameCount() - 1) * spine.PathConstraintMixTimeline.ENTRIES]);\n }\n }\n }\n }\n if (map.deform) {\n for (var deformName in map.deform) {\n var deformMap = map.deform[deformName];\n var skin = skeletonData.findSkin(deformName);\n if (skin == null)\n throw new Error(\"Skin not found: \" + deformName);\n for (var slotName in deformMap) {\n var slotMap = deformMap[slotName];\n var slotIndex = skeletonData.findSlotIndex(slotName);\n if (slotIndex == -1)\n throw new Error(\"Slot not found: \" + slotMap.name);\n for (var timelineName in slotMap) {\n var timelineMap = slotMap[timelineName];\n var attachment = skin.getAttachment(slotIndex, timelineName);\n if (attachment == null)\n throw new Error(\"Deform attachment not found: \" + timelineMap.name);\n var weighted = attachment.bones != null;\n var vertices = attachment.vertices;\n var deformLength = weighted ? vertices.length / 3 * 2 : vertices.length;\n var timeline = new spine.DeformTimeline(timelineMap.length);\n timeline.slotIndex = slotIndex;\n timeline.attachment = attachment;\n var frameIndex = 0;\n for (var j = 0; j < timelineMap.length; j++) {\n var valueMap = timelineMap[j];\n var deform = void 0;\n var verticesValue = this.getValue(valueMap, \"vertices\", null);\n if (verticesValue == null)\n deform = weighted ? spine.Utils.newFloatArray(deformLength) : vertices;\n else {\n deform = spine.Utils.newFloatArray(deformLength);\n var start = this.getValue(valueMap, \"offset\", 0);\n spine.Utils.arrayCopy(verticesValue, 0, deform, start, verticesValue.length);\n if (scale != 1) {\n for (var i = start, n = i + verticesValue.length; i < n; i++)\n deform[i] *= scale;\n }\n if (!weighted) {\n for (var i = 0; i < deformLength; i++)\n deform[i] += vertices[i];\n }\n }\n timeline.setFrame(frameIndex, this.getValue(valueMap, \"time\", 0), deform);\n this.readCurve(valueMap, timeline, frameIndex);\n frameIndex++;\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n }\n }\n }\n var drawOrderNode = map.drawOrder;\n if (drawOrderNode == null)\n drawOrderNode = map.draworder;\n if (drawOrderNode != null) {\n var timeline = new spine.DrawOrderTimeline(drawOrderNode.length);\n var slotCount = skeletonData.slots.length;\n var frameIndex = 0;\n for (var j = 0; j < drawOrderNode.length; j++) {\n var drawOrderMap = drawOrderNode[j];\n var drawOrder = null;\n var offsets = this.getValue(drawOrderMap, \"offsets\", null);\n if (offsets != null) {\n drawOrder = spine.Utils.newArray(slotCount, -1);\n var unchanged = spine.Utils.newArray(slotCount - offsets.length, 0);\n var originalIndex = 0, unchangedIndex = 0;\n for (var i = 0; i < offsets.length; i++) {\n var offsetMap = offsets[i];\n var slotIndex = skeletonData.findSlotIndex(offsetMap.slot);\n if (slotIndex == -1)\n throw new Error(\"Slot not found: \" + offsetMap.slot);\n while (originalIndex != slotIndex)\n unchanged[unchangedIndex++] = originalIndex++;\n drawOrder[originalIndex + offsetMap.offset] = originalIndex++;\n }\n while (originalIndex < slotCount)\n unchanged[unchangedIndex++] = originalIndex++;\n for (var i = slotCount - 1; i >= 0; i--)\n if (drawOrder[i] == -1)\n drawOrder[i] = unchanged[--unchangedIndex];\n }\n timeline.setFrame(frameIndex++, this.getValue(drawOrderMap, \"time\", 0), drawOrder);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n if (map.events) {\n var timeline = new spine.EventTimeline(map.events.length);\n var frameIndex = 0;\n for (var i = 0; i < map.events.length; i++) {\n var eventMap = map.events[i];\n var eventData = skeletonData.findEvent(eventMap.name);\n if (eventData == null)\n throw new Error(\"Event not found: \" + eventMap.name);\n var event_6 = new spine.Event(spine.Utils.toSinglePrecision(this.getValue(eventMap, \"time\", 0)), eventData);\n event_6.intValue = this.getValue(eventMap, \"int\", eventData.intValue);\n event_6.floatValue = this.getValue(eventMap, \"float\", eventData.floatValue);\n event_6.stringValue = this.getValue(eventMap, \"string\", eventData.stringValue);\n if (event_6.data.audioPath != null) {\n event_6.volume = this.getValue(eventMap, \"volume\", 1);\n event_6.balance = this.getValue(eventMap, \"balance\", 0);\n }\n timeline.setFrame(frameIndex++, event_6);\n }\n timelines.push(timeline);\n duration = Math.max(duration, timeline.frames[timeline.getFrameCount() - 1]);\n }\n if (isNaN(duration)) {\n throw new Error(\"Error while parsing animation, duration is NaN\");\n }\n skeletonData.animations.push(new spine.Animation(name, timelines, duration));\n };\n SkeletonJson.prototype.readCurve = function (map, timeline, frameIndex) {\n if (!map.hasOwnProperty(\"curve\"))\n return;\n if (map.curve == \"stepped\")\n timeline.setStepped(frameIndex);\n else {\n var curve = map.curve;\n timeline.setCurve(frameIndex, curve, this.getValue(map, \"c2\", 0), this.getValue(map, \"c3\", 1), this.getValue(map, \"c4\", 1));\n }\n };\n SkeletonJson.prototype.getValue = function (map, prop, defaultValue) {\n return map[prop] !== undefined ? map[prop] : defaultValue;\n };\n SkeletonJson.blendModeFromString = function (str) {\n str = str.toLowerCase();\n if (str == \"normal\")\n return spine.BlendMode.Normal;\n if (str == \"additive\")\n return spine.BlendMode.Additive;\n if (str == \"multiply\")\n return spine.BlendMode.Multiply;\n if (str == \"screen\")\n return spine.BlendMode.Screen;\n throw new Error(\"Unknown blend mode: \" + str);\n };\n SkeletonJson.positionModeFromString = function (str) {\n str = str.toLowerCase();\n if (str == \"fixed\")\n return spine.PositionMode.Fixed;\n if (str == \"percent\")\n return spine.PositionMode.Percent;\n throw new Error(\"Unknown position mode: \" + str);\n };\n SkeletonJson.spacingModeFromString = function (str) {\n str = str.toLowerCase();\n if (str == \"length\")\n return spine.SpacingMode.Length;\n if (str == \"fixed\")\n return spine.SpacingMode.Fixed;\n if (str == \"percent\")\n return spine.SpacingMode.Percent;\n throw new Error(\"Unknown position mode: \" + str);\n };\n SkeletonJson.rotateModeFromString = function (str) {\n str = str.toLowerCase();\n if (str == \"tangent\")\n return spine.RotateMode.Tangent;\n if (str == \"chain\")\n return spine.RotateMode.Chain;\n if (str == \"chainscale\")\n return spine.RotateMode.ChainScale;\n throw new Error(\"Unknown rotate mode: \" + str);\n };\n SkeletonJson.transformModeFromString = function (str) {\n str = str.toLowerCase();\n if (str == \"normal\")\n return spine.TransformMode.Normal;\n if (str == \"onlytranslation\")\n return spine.TransformMode.OnlyTranslation;\n if (str == \"norotationorreflection\")\n return spine.TransformMode.NoRotationOrReflection;\n if (str == \"noscale\")\n return spine.TransformMode.NoScale;\n if (str == \"noscaleorreflection\")\n return spine.TransformMode.NoScaleOrReflection;\n throw new Error(\"Unknown transform mode: \" + str);\n };\n return SkeletonJson;\n }());\n spine.SkeletonJson = SkeletonJson;\n var LinkedMesh = (function () {\n function LinkedMesh(mesh, skin, slotIndex, parent, inheritDeform) {\n this.mesh = mesh;\n this.skin = skin;\n this.slotIndex = slotIndex;\n this.parent = parent;\n this.inheritDeform = inheritDeform;\n }\n return LinkedMesh;\n }());\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SkinEntry = (function () {\n function SkinEntry(slotIndex, name, attachment) {\n this.slotIndex = slotIndex;\n this.name = name;\n this.attachment = attachment;\n }\n return SkinEntry;\n }());\n spine.SkinEntry = SkinEntry;\n var Skin = (function () {\n function Skin(name) {\n this.attachments = new Array();\n this.bones = Array();\n this.constraints = new Array();\n if (name == null)\n throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n Skin.prototype.setAttachment = function (slotIndex, name, attachment) {\n if (attachment == null)\n throw new Error(\"attachment cannot be null.\");\n var attachments = this.attachments;\n if (slotIndex >= attachments.length)\n attachments.length = slotIndex + 1;\n if (!attachments[slotIndex])\n attachments[slotIndex] = {};\n attachments[slotIndex][name] = attachment;\n };\n Skin.prototype.addSkin = function (skin) {\n for (var i = 0; i < skin.bones.length; i++) {\n var bone = skin.bones[i];\n var contained = false;\n for (var j = 0; j < this.bones.length; j++) {\n if (this.bones[j] == bone) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.bones.push(bone);\n }\n for (var i = 0; i < skin.constraints.length; i++) {\n var constraint = skin.constraints[i];\n var contained = false;\n for (var j = 0; j < this.constraints.length; j++) {\n if (this.constraints[j] == constraint) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.constraints.push(constraint);\n }\n var attachments = skin.getAttachments();\n for (var i = 0; i < attachments.length; i++) {\n var attachment = attachments[i];\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n }\n };\n Skin.prototype.copySkin = function (skin) {\n for (var i = 0; i < skin.bones.length; i++) {\n var bone = skin.bones[i];\n var contained = false;\n for (var j = 0; j < this.bones.length; j++) {\n if (this.bones[j] == bone) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.bones.push(bone);\n }\n for (var i = 0; i < skin.constraints.length; i++) {\n var constraint = skin.constraints[i];\n var contained = false;\n for (var j = 0; j < this.constraints.length; j++) {\n if (this.constraints[j] == constraint) {\n contained = true;\n break;\n }\n }\n if (!contained)\n this.constraints.push(constraint);\n }\n var attachments = skin.getAttachments();\n for (var i = 0; i < attachments.length; i++) {\n var attachment = attachments[i];\n if (attachment.attachment == null)\n continue;\n if (attachment.attachment instanceof spine.MeshAttachment) {\n attachment.attachment = attachment.attachment.newLinkedMesh();\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n }\n else {\n attachment.attachment = attachment.attachment.copy();\n this.setAttachment(attachment.slotIndex, attachment.name, attachment.attachment);\n }\n }\n };\n Skin.prototype.getAttachment = function (slotIndex, name) {\n var dictionary = this.attachments[slotIndex];\n return dictionary ? dictionary[name] : null;\n };\n Skin.prototype.removeAttachment = function (slotIndex, name) {\n var dictionary = this.attachments[slotIndex];\n if (dictionary)\n dictionary[name] = null;\n };\n Skin.prototype.getAttachments = function () {\n var entries = new Array();\n for (var i = 0; i < this.attachments.length; i++) {\n var slotAttachments = this.attachments[i];\n if (slotAttachments) {\n for (var name_4 in slotAttachments) {\n var attachment = slotAttachments[name_4];\n if (attachment)\n entries.push(new SkinEntry(i, name_4, attachment));\n }\n }\n }\n return entries;\n };\n Skin.prototype.getAttachmentsForSlot = function (slotIndex, attachments) {\n var slotAttachments = this.attachments[slotIndex];\n if (slotAttachments) {\n for (var name_5 in slotAttachments) {\n var attachment = slotAttachments[name_5];\n if (attachment)\n attachments.push(new SkinEntry(slotIndex, name_5, attachment));\n }\n }\n };\n Skin.prototype.clear = function () {\n this.attachments.length = 0;\n this.bones.length = 0;\n this.constraints.length = 0;\n };\n Skin.prototype.attachAll = function (skeleton, oldSkin) {\n var slotIndex = 0;\n for (var i = 0; i < skeleton.slots.length; i++) {\n var slot = skeleton.slots[i];\n var slotAttachment = slot.getAttachment();\n if (slotAttachment && slotIndex < oldSkin.attachments.length) {\n var dictionary = oldSkin.attachments[slotIndex];\n for (var key in dictionary) {\n var skinAttachment = dictionary[key];\n if (slotAttachment == skinAttachment) {\n var attachment = this.getAttachment(slotIndex, key);\n if (attachment != null)\n slot.setAttachment(attachment);\n break;\n }\n }\n }\n slotIndex++;\n }\n };\n return Skin;\n }());\n spine.Skin = Skin;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Slot = (function () {\n function Slot(data, bone) {\n this.deform = new Array();\n if (data == null)\n throw new Error(\"data cannot be null.\");\n if (bone == null)\n throw new Error(\"bone cannot be null.\");\n this.data = data;\n this.bone = bone;\n this.color = new spine.Color();\n this.darkColor = data.darkColor == null ? null : new spine.Color();\n this.setToSetupPose();\n }\n Slot.prototype.getSkeleton = function () {\n return this.bone.skeleton;\n };\n Slot.prototype.getAttachment = function () {\n return this.attachment;\n };\n Slot.prototype.setAttachment = function (attachment) {\n if (this.attachment == attachment)\n return;\n this.attachment = attachment;\n this.attachmentTime = this.bone.skeleton.time;\n this.deform.length = 0;\n };\n Slot.prototype.setAttachmentTime = function (time) {\n this.attachmentTime = this.bone.skeleton.time - time;\n };\n Slot.prototype.getAttachmentTime = function () {\n return this.bone.skeleton.time - this.attachmentTime;\n };\n Slot.prototype.setToSetupPose = function () {\n this.color.setFromColor(this.data.color);\n if (this.darkColor != null)\n this.darkColor.setFromColor(this.data.darkColor);\n if (this.data.attachmentName == null)\n this.attachment = null;\n else {\n this.attachment = null;\n this.setAttachment(this.bone.skeleton.getAttachment(this.data.index, this.data.attachmentName));\n }\n };\n return Slot;\n }());\n spine.Slot = Slot;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SlotData = (function () {\n function SlotData(index, name, boneData) {\n this.color = new spine.Color(1, 1, 1, 1);\n if (index < 0)\n throw new Error(\"index must be >= 0.\");\n if (name == null)\n throw new Error(\"name cannot be null.\");\n if (boneData == null)\n throw new Error(\"boneData cannot be null.\");\n this.index = index;\n this.name = name;\n this.boneData = boneData;\n }\n return SlotData;\n }());\n spine.SlotData = SlotData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Texture = (function () {\n function Texture(image) {\n this._image = image;\n }\n Texture.prototype.getImage = function () {\n return this._image;\n };\n Texture.filterFromString = function (text) {\n switch (text.toLowerCase()) {\n case \"nearest\": return TextureFilter.Nearest;\n case \"linear\": return TextureFilter.Linear;\n case \"mipmap\": return TextureFilter.MipMap;\n case \"mipmapnearestnearest\": return TextureFilter.MipMapNearestNearest;\n case \"mipmaplinearnearest\": return TextureFilter.MipMapLinearNearest;\n case \"mipmapnearestlinear\": return TextureFilter.MipMapNearestLinear;\n case \"mipmaplinearlinear\": return TextureFilter.MipMapLinearLinear;\n default: throw new Error(\"Unknown texture filter \" + text);\n }\n };\n Texture.wrapFromString = function (text) {\n switch (text.toLowerCase()) {\n case \"mirroredtepeat\": return TextureWrap.MirroredRepeat;\n case \"clamptoedge\": return TextureWrap.ClampToEdge;\n case \"repeat\": return TextureWrap.Repeat;\n default: throw new Error(\"Unknown texture wrap \" + text);\n }\n };\n return Texture;\n }());\n spine.Texture = Texture;\n var TextureFilter;\n (function (TextureFilter) {\n TextureFilter[TextureFilter[\"Nearest\"] = 9728] = \"Nearest\";\n TextureFilter[TextureFilter[\"Linear\"] = 9729] = \"Linear\";\n TextureFilter[TextureFilter[\"MipMap\"] = 9987] = \"MipMap\";\n TextureFilter[TextureFilter[\"MipMapNearestNearest\"] = 9984] = \"MipMapNearestNearest\";\n TextureFilter[TextureFilter[\"MipMapLinearNearest\"] = 9985] = \"MipMapLinearNearest\";\n TextureFilter[TextureFilter[\"MipMapNearestLinear\"] = 9986] = \"MipMapNearestLinear\";\n TextureFilter[TextureFilter[\"MipMapLinearLinear\"] = 9987] = \"MipMapLinearLinear\";\n })(TextureFilter = spine.TextureFilter || (spine.TextureFilter = {}));\n var TextureWrap;\n (function (TextureWrap) {\n TextureWrap[TextureWrap[\"MirroredRepeat\"] = 33648] = \"MirroredRepeat\";\n TextureWrap[TextureWrap[\"ClampToEdge\"] = 33071] = \"ClampToEdge\";\n TextureWrap[TextureWrap[\"Repeat\"] = 10497] = \"Repeat\";\n })(TextureWrap = spine.TextureWrap || (spine.TextureWrap = {}));\n var TextureRegion = (function () {\n function TextureRegion() {\n this.u = 0;\n this.v = 0;\n this.u2 = 0;\n this.v2 = 0;\n this.width = 0;\n this.height = 0;\n this.rotate = false;\n this.offsetX = 0;\n this.offsetY = 0;\n this.originalWidth = 0;\n this.originalHeight = 0;\n }\n return TextureRegion;\n }());\n spine.TextureRegion = TextureRegion;\n var FakeTexture = (function (_super) {\n __extends(FakeTexture, _super);\n function FakeTexture() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n FakeTexture.prototype.setFilters = function (minFilter, magFilter) { };\n FakeTexture.prototype.setWraps = function (uWrap, vWrap) { };\n FakeTexture.prototype.dispose = function () { };\n return FakeTexture;\n }(Texture));\n spine.FakeTexture = FakeTexture;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var TextureAtlas = (function () {\n function TextureAtlas(atlasText, textureLoader) {\n this.pages = new Array();\n this.regions = new Array();\n this.load(atlasText, textureLoader);\n }\n TextureAtlas.prototype.load = function (atlasText, textureLoader) {\n if (textureLoader == null)\n throw new Error(\"textureLoader cannot be null.\");\n var reader = new TextureAtlasReader(atlasText);\n var tuple = new Array(4);\n var page = null;\n while (true) {\n var line = reader.readLine();\n if (line == null)\n break;\n line = line.trim();\n if (line.length == 0)\n page = null;\n else if (!page) {\n page = new TextureAtlasPage();\n page.name = line;\n if (reader.readTuple(tuple) == 2) {\n page.width = parseInt(tuple[0]);\n page.height = parseInt(tuple[1]);\n reader.readTuple(tuple);\n }\n reader.readTuple(tuple);\n page.minFilter = spine.Texture.filterFromString(tuple[0]);\n page.magFilter = spine.Texture.filterFromString(tuple[1]);\n var direction = reader.readValue();\n page.uWrap = spine.TextureWrap.ClampToEdge;\n page.vWrap = spine.TextureWrap.ClampToEdge;\n if (direction == \"x\")\n page.uWrap = spine.TextureWrap.Repeat;\n else if (direction == \"y\")\n page.vWrap = spine.TextureWrap.Repeat;\n else if (direction == \"xy\")\n page.uWrap = page.vWrap = spine.TextureWrap.Repeat;\n page.texture = textureLoader(line);\n page.texture.setFilters(page.minFilter, page.magFilter);\n page.texture.setWraps(page.uWrap, page.vWrap);\n page.width = page.texture.getImage().width;\n page.height = page.texture.getImage().height;\n this.pages.push(page);\n }\n else {\n var region = new TextureAtlasRegion();\n region.name = line;\n region.page = page;\n var rotateValue = reader.readValue();\n if (rotateValue.toLocaleLowerCase() == \"true\") {\n region.degrees = 90;\n }\n else if (rotateValue.toLocaleLowerCase() == \"false\") {\n region.degrees = 0;\n }\n else {\n region.degrees = parseFloat(rotateValue);\n }\n region.rotate = region.degrees == 90;\n reader.readTuple(tuple);\n var x = parseInt(tuple[0]);\n var y = parseInt(tuple[1]);\n reader.readTuple(tuple);\n var width = parseInt(tuple[0]);\n var height = parseInt(tuple[1]);\n region.u = x / page.width;\n region.v = y / page.height;\n if (region.rotate) {\n region.u2 = (x + height) / page.width;\n region.v2 = (y + width) / page.height;\n }\n else {\n region.u2 = (x + width) / page.width;\n region.v2 = (y + height) / page.height;\n }\n region.x = x;\n region.y = y;\n region.width = Math.abs(width);\n region.height = Math.abs(height);\n if (reader.readTuple(tuple) == 4) {\n if (reader.readTuple(tuple) == 4) {\n reader.readTuple(tuple);\n }\n }\n region.originalWidth = parseInt(tuple[0]);\n region.originalHeight = parseInt(tuple[1]);\n reader.readTuple(tuple);\n region.offsetX = parseInt(tuple[0]);\n region.offsetY = parseInt(tuple[1]);\n region.index = parseInt(reader.readValue());\n region.texture = page.texture;\n this.regions.push(region);\n }\n }\n };\n TextureAtlas.prototype.findRegion = function (name) {\n for (var i = 0; i < this.regions.length; i++) {\n if (this.regions[i].name == name) {\n return this.regions[i];\n }\n }\n return null;\n };\n TextureAtlas.prototype.dispose = function () {\n for (var i = 0; i < this.pages.length; i++) {\n this.pages[i].texture.dispose();\n }\n };\n return TextureAtlas;\n }());\n spine.TextureAtlas = TextureAtlas;\n var TextureAtlasReader = (function () {\n function TextureAtlasReader(text) {\n this.index = 0;\n this.lines = text.split(/\\r\\n|\\r|\\n/);\n }\n TextureAtlasReader.prototype.readLine = function () {\n if (this.index >= this.lines.length)\n return null;\n return this.lines[this.index++];\n };\n TextureAtlasReader.prototype.readValue = function () {\n var line = this.readLine();\n var colon = line.indexOf(\":\");\n if (colon == -1)\n throw new Error(\"Invalid line: \" + line);\n return line.substring(colon + 1).trim();\n };\n TextureAtlasReader.prototype.readTuple = function (tuple) {\n var line = this.readLine();\n var colon = line.indexOf(\":\");\n if (colon == -1)\n throw new Error(\"Invalid line: \" + line);\n var i = 0, lastMatch = colon + 1;\n for (; i < 3; i++) {\n var comma = line.indexOf(\",\", lastMatch);\n if (comma == -1)\n break;\n tuple[i] = line.substr(lastMatch, comma - lastMatch).trim();\n lastMatch = comma + 1;\n }\n tuple[i] = line.substring(lastMatch).trim();\n return i + 1;\n };\n return TextureAtlasReader;\n }());\n var TextureAtlasPage = (function () {\n function TextureAtlasPage() {\n }\n return TextureAtlasPage;\n }());\n spine.TextureAtlasPage = TextureAtlasPage;\n var TextureAtlasRegion = (function (_super) {\n __extends(TextureAtlasRegion, _super);\n function TextureAtlasRegion() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return TextureAtlasRegion;\n }(spine.TextureRegion));\n spine.TextureAtlasRegion = TextureAtlasRegion;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var TransformConstraint = (function () {\n function TransformConstraint(data, skeleton) {\n this.rotateMix = 0;\n this.translateMix = 0;\n this.scaleMix = 0;\n this.shearMix = 0;\n this.temp = new spine.Vector2();\n this.active = false;\n if (data == null)\n throw new Error(\"data cannot be null.\");\n if (skeleton == null)\n throw new Error(\"skeleton cannot be null.\");\n this.data = data;\n this.rotateMix = data.rotateMix;\n this.translateMix = data.translateMix;\n this.scaleMix = data.scaleMix;\n this.shearMix = data.shearMix;\n this.bones = new Array();\n for (var i = 0; i < data.bones.length; i++)\n this.bones.push(skeleton.findBone(data.bones[i].name));\n this.target = skeleton.findBone(data.target.name);\n }\n TransformConstraint.prototype.isActive = function () {\n return this.active;\n };\n TransformConstraint.prototype.apply = function () {\n this.update();\n };\n TransformConstraint.prototype.update = function () {\n if (this.data.local) {\n if (this.data.relative)\n this.applyRelativeLocal();\n else\n this.applyAbsoluteLocal();\n }\n else {\n if (this.data.relative)\n this.applyRelativeWorld();\n else\n this.applyAbsoluteWorld();\n }\n };\n TransformConstraint.prototype.applyAbsoluteWorld = function () {\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\n var target = this.target;\n var ta = target.a, tb = target.b, tc = target.c, td = target.d;\n var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\n var offsetRotation = this.data.offsetRotation * degRadReflect;\n var offsetShearY = this.data.offsetShearY * degRadReflect;\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n var modified = false;\n if (rotateMix != 0) {\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n var r = Math.atan2(tc, ta) - Math.atan2(c, a) + offsetRotation;\n if (r > spine.MathUtils.PI)\n r -= spine.MathUtils.PI2;\n else if (r < -spine.MathUtils.PI)\n r += spine.MathUtils.PI2;\n r *= rotateMix;\n var cos = Math.cos(r), sin = Math.sin(r);\n bone.a = cos * a - sin * c;\n bone.b = cos * b - sin * d;\n bone.c = sin * a + cos * c;\n bone.d = sin * b + cos * d;\n modified = true;\n }\n if (translateMix != 0) {\n var temp = this.temp;\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\n bone.worldX += (temp.x - bone.worldX) * translateMix;\n bone.worldY += (temp.y - bone.worldY) * translateMix;\n modified = true;\n }\n if (scaleMix > 0) {\n var s = Math.sqrt(bone.a * bone.a + bone.c * bone.c);\n var ts = Math.sqrt(ta * ta + tc * tc);\n if (s > 0.00001)\n s = (s + (ts - s + this.data.offsetScaleX) * scaleMix) / s;\n bone.a *= s;\n bone.c *= s;\n s = Math.sqrt(bone.b * bone.b + bone.d * bone.d);\n ts = Math.sqrt(tb * tb + td * td);\n if (s > 0.00001)\n s = (s + (ts - s + this.data.offsetScaleY) * scaleMix) / s;\n bone.b *= s;\n bone.d *= s;\n modified = true;\n }\n if (shearMix > 0) {\n var b = bone.b, d = bone.d;\n var by = Math.atan2(d, b);\n var r = Math.atan2(td, tb) - Math.atan2(tc, ta) - (by - Math.atan2(bone.c, bone.a));\n if (r > spine.MathUtils.PI)\n r -= spine.MathUtils.PI2;\n else if (r < -spine.MathUtils.PI)\n r += spine.MathUtils.PI2;\n r = by + (r + offsetShearY) * shearMix;\n var s = Math.sqrt(b * b + d * d);\n bone.b = Math.cos(r) * s;\n bone.d = Math.sin(r) * s;\n modified = true;\n }\n if (modified)\n bone.appliedValid = false;\n }\n };\n TransformConstraint.prototype.applyRelativeWorld = function () {\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\n var target = this.target;\n var ta = target.a, tb = target.b, tc = target.c, td = target.d;\n var degRadReflect = ta * td - tb * tc > 0 ? spine.MathUtils.degRad : -spine.MathUtils.degRad;\n var offsetRotation = this.data.offsetRotation * degRadReflect, offsetShearY = this.data.offsetShearY * degRadReflect;\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n var modified = false;\n if (rotateMix != 0) {\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n var r = Math.atan2(tc, ta) + offsetRotation;\n if (r > spine.MathUtils.PI)\n r -= spine.MathUtils.PI2;\n else if (r < -spine.MathUtils.PI)\n r += spine.MathUtils.PI2;\n r *= rotateMix;\n var cos = Math.cos(r), sin = Math.sin(r);\n bone.a = cos * a - sin * c;\n bone.b = cos * b - sin * d;\n bone.c = sin * a + cos * c;\n bone.d = sin * b + cos * d;\n modified = true;\n }\n if (translateMix != 0) {\n var temp = this.temp;\n target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));\n bone.worldX += temp.x * translateMix;\n bone.worldY += temp.y * translateMix;\n modified = true;\n }\n if (scaleMix > 0) {\n var s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * scaleMix + 1;\n bone.a *= s;\n bone.c *= s;\n s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * scaleMix + 1;\n bone.b *= s;\n bone.d *= s;\n modified = true;\n }\n if (shearMix > 0) {\n var r = Math.atan2(td, tb) - Math.atan2(tc, ta);\n if (r > spine.MathUtils.PI)\n r -= spine.MathUtils.PI2;\n else if (r < -spine.MathUtils.PI)\n r += spine.MathUtils.PI2;\n var b = bone.b, d = bone.d;\n r = Math.atan2(d, b) + (r - spine.MathUtils.PI / 2 + offsetShearY) * shearMix;\n var s = Math.sqrt(b * b + d * d);\n bone.b = Math.cos(r) * s;\n bone.d = Math.sin(r) * s;\n modified = true;\n }\n if (modified)\n bone.appliedValid = false;\n }\n };\n TransformConstraint.prototype.applyAbsoluteLocal = function () {\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\n var target = this.target;\n if (!target.appliedValid)\n target.updateAppliedTransform();\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n if (!bone.appliedValid)\n bone.updateAppliedTransform();\n var rotation = bone.arotation;\n if (rotateMix != 0) {\n var r = target.arotation - rotation + this.data.offsetRotation;\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\n rotation += r * rotateMix;\n }\n var x = bone.ax, y = bone.ay;\n if (translateMix != 0) {\n x += (target.ax - x + this.data.offsetX) * translateMix;\n y += (target.ay - y + this.data.offsetY) * translateMix;\n }\n var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\n if (scaleMix != 0) {\n if (scaleX > 0.00001)\n scaleX = (scaleX + (target.ascaleX - scaleX + this.data.offsetScaleX) * scaleMix) / scaleX;\n if (scaleY > 0.00001)\n scaleY = (scaleY + (target.ascaleY - scaleY + this.data.offsetScaleY) * scaleMix) / scaleY;\n }\n var shearY = bone.ashearY;\n if (shearMix != 0) {\n var r = target.ashearY - shearY + this.data.offsetShearY;\n r -= (16384 - ((16384.499999999996 - r / 360) | 0)) * 360;\n bone.shearY += r * shearMix;\n }\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\n }\n };\n TransformConstraint.prototype.applyRelativeLocal = function () {\n var rotateMix = this.rotateMix, translateMix = this.translateMix, scaleMix = this.scaleMix, shearMix = this.shearMix;\n var target = this.target;\n if (!target.appliedValid)\n target.updateAppliedTransform();\n var bones = this.bones;\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n if (!bone.appliedValid)\n bone.updateAppliedTransform();\n var rotation = bone.arotation;\n if (rotateMix != 0)\n rotation += (target.arotation + this.data.offsetRotation) * rotateMix;\n var x = bone.ax, y = bone.ay;\n if (translateMix != 0) {\n x += (target.ax + this.data.offsetX) * translateMix;\n y += (target.ay + this.data.offsetY) * translateMix;\n }\n var scaleX = bone.ascaleX, scaleY = bone.ascaleY;\n if (scaleMix != 0) {\n if (scaleX > 0.00001)\n scaleX *= ((target.ascaleX - 1 + this.data.offsetScaleX) * scaleMix) + 1;\n if (scaleY > 0.00001)\n scaleY *= ((target.ascaleY - 1 + this.data.offsetScaleY) * scaleMix) + 1;\n }\n var shearY = bone.ashearY;\n if (shearMix != 0)\n shearY += (target.ashearY + this.data.offsetShearY) * shearMix;\n bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);\n }\n };\n return TransformConstraint;\n }());\n spine.TransformConstraint = TransformConstraint;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var TransformConstraintData = (function (_super) {\n __extends(TransformConstraintData, _super);\n function TransformConstraintData(name) {\n var _this = _super.call(this, name, 0, false) || this;\n _this.bones = new Array();\n _this.rotateMix = 0;\n _this.translateMix = 0;\n _this.scaleMix = 0;\n _this.shearMix = 0;\n _this.offsetRotation = 0;\n _this.offsetX = 0;\n _this.offsetY = 0;\n _this.offsetScaleX = 0;\n _this.offsetScaleY = 0;\n _this.offsetShearY = 0;\n _this.relative = false;\n _this.local = false;\n return _this;\n }\n return TransformConstraintData;\n }(spine.ConstraintData));\n spine.TransformConstraintData = TransformConstraintData;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var Triangulator = (function () {\n function Triangulator() {\n this.convexPolygons = new Array();\n this.convexPolygonsIndices = new Array();\n this.indicesArray = new Array();\n this.isConcaveArray = new Array();\n this.triangles = new Array();\n this.polygonPool = new spine.Pool(function () {\n return new Array();\n });\n this.polygonIndicesPool = new spine.Pool(function () {\n return new Array();\n });\n }\n Triangulator.prototype.triangulate = function (verticesArray) {\n var vertices = verticesArray;\n var vertexCount = verticesArray.length >> 1;\n var indices = this.indicesArray;\n indices.length = 0;\n for (var i = 0; i < vertexCount; i++)\n indices[i] = i;\n var isConcave = this.isConcaveArray;\n isConcave.length = 0;\n for (var i = 0, n = vertexCount; i < n; ++i)\n isConcave[i] = Triangulator.isConcave(i, vertexCount, vertices, indices);\n var triangles = this.triangles;\n triangles.length = 0;\n while (vertexCount > 3) {\n var previous = vertexCount - 1, i = 0, next = 1;\n while (true) {\n outer: if (!isConcave[i]) {\n var p1 = indices[previous] << 1, p2 = indices[i] << 1, p3 = indices[next] << 1;\n var p1x = vertices[p1], p1y = vertices[p1 + 1];\n var p2x = vertices[p2], p2y = vertices[p2 + 1];\n var p3x = vertices[p3], p3y = vertices[p3 + 1];\n for (var ii = (next + 1) % vertexCount; ii != previous; ii = (ii + 1) % vertexCount) {\n if (!isConcave[ii])\n continue;\n var v = indices[ii] << 1;\n var vx = vertices[v], vy = vertices[v + 1];\n if (Triangulator.positiveArea(p3x, p3y, p1x, p1y, vx, vy)) {\n if (Triangulator.positiveArea(p1x, p1y, p2x, p2y, vx, vy)) {\n if (Triangulator.positiveArea(p2x, p2y, p3x, p3y, vx, vy))\n break outer;\n }\n }\n }\n break;\n }\n if (next == 0) {\n do {\n if (!isConcave[i])\n break;\n i--;\n } while (i > 0);\n break;\n }\n previous = i;\n i = next;\n next = (next + 1) % vertexCount;\n }\n triangles.push(indices[(vertexCount + i - 1) % vertexCount]);\n triangles.push(indices[i]);\n triangles.push(indices[(i + 1) % vertexCount]);\n indices.splice(i, 1);\n isConcave.splice(i, 1);\n vertexCount--;\n var previousIndex = (vertexCount + i - 1) % vertexCount;\n var nextIndex = i == vertexCount ? 0 : i;\n isConcave[previousIndex] = Triangulator.isConcave(previousIndex, vertexCount, vertices, indices);\n isConcave[nextIndex] = Triangulator.isConcave(nextIndex, vertexCount, vertices, indices);\n }\n if (vertexCount == 3) {\n triangles.push(indices[2]);\n triangles.push(indices[0]);\n triangles.push(indices[1]);\n }\n return triangles;\n };\n Triangulator.prototype.decompose = function (verticesArray, triangles) {\n var vertices = verticesArray;\n var convexPolygons = this.convexPolygons;\n this.polygonPool.freeAll(convexPolygons);\n convexPolygons.length = 0;\n var convexPolygonsIndices = this.convexPolygonsIndices;\n this.polygonIndicesPool.freeAll(convexPolygonsIndices);\n convexPolygonsIndices.length = 0;\n var polygonIndices = this.polygonIndicesPool.obtain();\n polygonIndices.length = 0;\n var polygon = this.polygonPool.obtain();\n polygon.length = 0;\n var fanBaseIndex = -1, lastWinding = 0;\n for (var i = 0, n = triangles.length; i < n; i += 3) {\n var t1 = triangles[i] << 1, t2 = triangles[i + 1] << 1, t3 = triangles[i + 2] << 1;\n var x1 = vertices[t1], y1 = vertices[t1 + 1];\n var x2 = vertices[t2], y2 = vertices[t2 + 1];\n var x3 = vertices[t3], y3 = vertices[t3 + 1];\n var merged = false;\n if (fanBaseIndex == t1) {\n var o = polygon.length - 4;\n var winding1 = Triangulator.winding(polygon[o], polygon[o + 1], polygon[o + 2], polygon[o + 3], x3, y3);\n var winding2 = Triangulator.winding(x3, y3, polygon[0], polygon[1], polygon[2], polygon[3]);\n if (winding1 == lastWinding && winding2 == lastWinding) {\n polygon.push(x3);\n polygon.push(y3);\n polygonIndices.push(t3);\n merged = true;\n }\n }\n if (!merged) {\n if (polygon.length > 0) {\n convexPolygons.push(polygon);\n convexPolygonsIndices.push(polygonIndices);\n }\n else {\n this.polygonPool.free(polygon);\n this.polygonIndicesPool.free(polygonIndices);\n }\n polygon = this.polygonPool.obtain();\n polygon.length = 0;\n polygon.push(x1);\n polygon.push(y1);\n polygon.push(x2);\n polygon.push(y2);\n polygon.push(x3);\n polygon.push(y3);\n polygonIndices = this.polygonIndicesPool.obtain();\n polygonIndices.length = 0;\n polygonIndices.push(t1);\n polygonIndices.push(t2);\n polygonIndices.push(t3);\n lastWinding = Triangulator.winding(x1, y1, x2, y2, x3, y3);\n fanBaseIndex = t1;\n }\n }\n if (polygon.length > 0) {\n convexPolygons.push(polygon);\n convexPolygonsIndices.push(polygonIndices);\n }\n for (var i = 0, n = convexPolygons.length; i < n; i++) {\n polygonIndices = convexPolygonsIndices[i];\n if (polygonIndices.length == 0)\n continue;\n var firstIndex = polygonIndices[0];\n var lastIndex = polygonIndices[polygonIndices.length - 1];\n polygon = convexPolygons[i];\n var o = polygon.length - 4;\n var prevPrevX = polygon[o], prevPrevY = polygon[o + 1];\n var prevX = polygon[o + 2], prevY = polygon[o + 3];\n var firstX = polygon[0], firstY = polygon[1];\n var secondX = polygon[2], secondY = polygon[3];\n var winding = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, firstX, firstY);\n for (var ii = 0; ii < n; ii++) {\n if (ii == i)\n continue;\n var otherIndices = convexPolygonsIndices[ii];\n if (otherIndices.length != 3)\n continue;\n var otherFirstIndex = otherIndices[0];\n var otherSecondIndex = otherIndices[1];\n var otherLastIndex = otherIndices[2];\n var otherPoly = convexPolygons[ii];\n var x3 = otherPoly[otherPoly.length - 2], y3 = otherPoly[otherPoly.length - 1];\n if (otherFirstIndex != firstIndex || otherSecondIndex != lastIndex)\n continue;\n var winding1 = Triangulator.winding(prevPrevX, prevPrevY, prevX, prevY, x3, y3);\n var winding2 = Triangulator.winding(x3, y3, firstX, firstY, secondX, secondY);\n if (winding1 == winding && winding2 == winding) {\n otherPoly.length = 0;\n otherIndices.length = 0;\n polygon.push(x3);\n polygon.push(y3);\n polygonIndices.push(otherLastIndex);\n prevPrevX = prevX;\n prevPrevY = prevY;\n prevX = x3;\n prevY = y3;\n ii = 0;\n }\n }\n }\n for (var i = convexPolygons.length - 1; i >= 0; i--) {\n polygon = convexPolygons[i];\n if (polygon.length == 0) {\n convexPolygons.splice(i, 1);\n this.polygonPool.free(polygon);\n polygonIndices = convexPolygonsIndices[i];\n convexPolygonsIndices.splice(i, 1);\n this.polygonIndicesPool.free(polygonIndices);\n }\n }\n return convexPolygons;\n };\n Triangulator.isConcave = function (index, vertexCount, vertices, indices) {\n var previous = indices[(vertexCount + index - 1) % vertexCount] << 1;\n var current = indices[index] << 1;\n var next = indices[(index + 1) % vertexCount] << 1;\n return !this.positiveArea(vertices[previous], vertices[previous + 1], vertices[current], vertices[current + 1], vertices[next], vertices[next + 1]);\n };\n Triangulator.positiveArea = function (p1x, p1y, p2x, p2y, p3x, p3y) {\n return p1x * (p3y - p2y) + p2x * (p1y - p3y) + p3x * (p2y - p1y) >= 0;\n };\n Triangulator.winding = function (p1x, p1y, p2x, p2y, p3x, p3y) {\n var px = p2x - p1x, py = p2y - p1y;\n return p3x * py - p3y * px + px * p1y - p1x * py >= 0 ? 1 : -1;\n };\n return Triangulator;\n }());\n spine.Triangulator = Triangulator;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var IntSet = (function () {\n function IntSet() {\n this.array = new Array();\n }\n IntSet.prototype.add = function (value) {\n var contains = this.contains(value);\n this.array[value | 0] = value | 0;\n return !contains;\n };\n IntSet.prototype.contains = function (value) {\n return this.array[value | 0] != undefined;\n };\n IntSet.prototype.remove = function (value) {\n this.array[value | 0] = undefined;\n };\n IntSet.prototype.clear = function () {\n this.array.length = 0;\n };\n return IntSet;\n }());\n spine.IntSet = IntSet;\n var Color = (function () {\n function Color(r, g, b, a) {\n if (r === void 0) { r = 0; }\n if (g === void 0) { g = 0; }\n if (b === void 0) { b = 0; }\n if (a === void 0) { a = 0; }\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n }\n Color.prototype.set = function (r, g, b, a) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n this.clamp();\n return this;\n };\n Color.prototype.setFromColor = function (c) {\n this.r = c.r;\n this.g = c.g;\n this.b = c.b;\n this.a = c.a;\n return this;\n };\n Color.prototype.setFromString = function (hex) {\n hex = hex.charAt(0) == '#' ? hex.substr(1) : hex;\n this.r = parseInt(hex.substr(0, 2), 16) / 255.0;\n this.g = parseInt(hex.substr(2, 2), 16) / 255.0;\n this.b = parseInt(hex.substr(4, 2), 16) / 255.0;\n this.a = (hex.length != 8 ? 255 : parseInt(hex.substr(6, 2), 16)) / 255.0;\n return this;\n };\n Color.prototype.add = function (r, g, b, a) {\n this.r += r;\n this.g += g;\n this.b += b;\n this.a += a;\n this.clamp();\n return this;\n };\n Color.prototype.clamp = function () {\n if (this.r < 0)\n this.r = 0;\n else if (this.r > 1)\n this.r = 1;\n if (this.g < 0)\n this.g = 0;\n else if (this.g > 1)\n this.g = 1;\n if (this.b < 0)\n this.b = 0;\n else if (this.b > 1)\n this.b = 1;\n if (this.a < 0)\n this.a = 0;\n else if (this.a > 1)\n this.a = 1;\n return this;\n };\n Color.rgba8888ToColor = function (color, value) {\n color.r = ((value & 0xff000000) >>> 24) / 255;\n color.g = ((value & 0x00ff0000) >>> 16) / 255;\n color.b = ((value & 0x0000ff00) >>> 8) / 255;\n color.a = ((value & 0x000000ff)) / 255;\n };\n Color.rgb888ToColor = function (color, value) {\n color.r = ((value & 0x00ff0000) >>> 16) / 255;\n color.g = ((value & 0x0000ff00) >>> 8) / 255;\n color.b = ((value & 0x000000ff)) / 255;\n };\n Color.WHITE = new Color(1, 1, 1, 1);\n Color.RED = new Color(1, 0, 0, 1);\n Color.GREEN = new Color(0, 1, 0, 1);\n Color.BLUE = new Color(0, 0, 1, 1);\n Color.MAGENTA = new Color(1, 0, 1, 1);\n return Color;\n }());\n spine.Color = Color;\n var MathUtils = (function () {\n function MathUtils() {\n }\n MathUtils.clamp = function (value, min, max) {\n if (value < min)\n return min;\n if (value > max)\n return max;\n return value;\n };\n MathUtils.cosDeg = function (degrees) {\n return Math.cos(degrees * MathUtils.degRad);\n };\n MathUtils.sinDeg = function (degrees) {\n return Math.sin(degrees * MathUtils.degRad);\n };\n MathUtils.signum = function (value) {\n return value > 0 ? 1 : value < 0 ? -1 : 0;\n };\n MathUtils.toInt = function (x) {\n return x > 0 ? Math.floor(x) : Math.ceil(x);\n };\n MathUtils.cbrt = function (x) {\n var y = Math.pow(Math.abs(x), 1 / 3);\n return x < 0 ? -y : y;\n };\n MathUtils.randomTriangular = function (min, max) {\n return MathUtils.randomTriangularWith(min, max, (min + max) * 0.5);\n };\n MathUtils.randomTriangularWith = function (min, max, mode) {\n var u = Math.random();\n var d = max - min;\n if (u <= (mode - min) / d)\n return min + Math.sqrt(u * d * (mode - min));\n return max - Math.sqrt((1 - u) * d * (max - mode));\n };\n MathUtils.PI = 3.1415927;\n MathUtils.PI2 = MathUtils.PI * 2;\n MathUtils.radiansToDegrees = 180 / MathUtils.PI;\n MathUtils.radDeg = MathUtils.radiansToDegrees;\n MathUtils.degreesToRadians = MathUtils.PI / 180;\n MathUtils.degRad = MathUtils.degreesToRadians;\n return MathUtils;\n }());\n spine.MathUtils = MathUtils;\n var Interpolation = (function () {\n function Interpolation() {\n }\n Interpolation.prototype.apply = function (start, end, a) {\n return start + (end - start) * this.applyInternal(a);\n };\n return Interpolation;\n }());\n spine.Interpolation = Interpolation;\n var Pow = (function (_super) {\n __extends(Pow, _super);\n function Pow(power) {\n var _this = _super.call(this) || this;\n _this.power = 2;\n _this.power = power;\n return _this;\n }\n Pow.prototype.applyInternal = function (a) {\n if (a <= 0.5)\n return Math.pow(a * 2, this.power) / 2;\n return Math.pow((a - 1) * 2, this.power) / (this.power % 2 == 0 ? -2 : 2) + 1;\n };\n return Pow;\n }(Interpolation));\n spine.Pow = Pow;\n var PowOut = (function (_super) {\n __extends(PowOut, _super);\n function PowOut(power) {\n return _super.call(this, power) || this;\n }\n PowOut.prototype.applyInternal = function (a) {\n return Math.pow(a - 1, this.power) * (this.power % 2 == 0 ? -1 : 1) + 1;\n };\n return PowOut;\n }(Pow));\n spine.PowOut = PowOut;\n var Utils = (function () {\n function Utils() {\n }\n Utils.arrayCopy = function (source, sourceStart, dest, destStart, numElements) {\n for (var i = sourceStart, j = destStart; i < sourceStart + numElements; i++, j++) {\n dest[j] = source[i];\n }\n };\n Utils.setArraySize = function (array, size, value) {\n if (value === void 0) { value = 0; }\n var oldSize = array.length;\n if (oldSize == size)\n return array;\n array.length = size;\n if (oldSize < size) {\n for (var i = oldSize; i < size; i++)\n array[i] = value;\n }\n return array;\n };\n Utils.ensureArrayCapacity = function (array, size, value) {\n if (value === void 0) { value = 0; }\n if (array.length >= size)\n return array;\n return Utils.setArraySize(array, size, value);\n };\n Utils.newArray = function (size, defaultValue) {\n var array = new Array(size);\n for (var i = 0; i < size; i++)\n array[i] = defaultValue;\n return array;\n };\n Utils.newFloatArray = function (size) {\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\n return new Float32Array(size);\n }\n else {\n var array = new Array(size);\n for (var i = 0; i < array.length; i++)\n array[i] = 0;\n return array;\n }\n };\n Utils.newShortArray = function (size) {\n if (Utils.SUPPORTS_TYPED_ARRAYS) {\n return new Int16Array(size);\n }\n else {\n var array = new Array(size);\n for (var i = 0; i < array.length; i++)\n array[i] = 0;\n return array;\n }\n };\n Utils.toFloatArray = function (array) {\n return Utils.SUPPORTS_TYPED_ARRAYS ? new Float32Array(array) : array;\n };\n Utils.toSinglePrecision = function (value) {\n return Utils.SUPPORTS_TYPED_ARRAYS ? Math.fround(value) : value;\n };\n Utils.webkit602BugfixHelper = function (alpha, blend) {\n };\n Utils.contains = function (array, element, identity) {\n if (identity === void 0) { identity = true; }\n for (var i = 0; i < array.length; i++) {\n if (array[i] == element)\n return true;\n }\n return false;\n };\n Utils.SUPPORTS_TYPED_ARRAYS = typeof (Float32Array) !== \"undefined\";\n return Utils;\n }());\n spine.Utils = Utils;\n var DebugUtils = (function () {\n function DebugUtils() {\n }\n DebugUtils.logBones = function (skeleton) {\n for (var i = 0; i < skeleton.bones.length; i++) {\n var bone = skeleton.bones[i];\n console.log(bone.data.name + \", \" + bone.a + \", \" + bone.b + \", \" + bone.c + \", \" + bone.d + \", \" + bone.worldX + \", \" + bone.worldY);\n }\n };\n return DebugUtils;\n }());\n spine.DebugUtils = DebugUtils;\n var Pool = (function () {\n function Pool(instantiator) {\n this.items = new Array();\n this.instantiator = instantiator;\n }\n Pool.prototype.obtain = function () {\n return this.items.length > 0 ? this.items.pop() : this.instantiator();\n };\n Pool.prototype.free = function (item) {\n if (item.reset)\n item.reset();\n this.items.push(item);\n };\n Pool.prototype.freeAll = function (items) {\n for (var i = 0; i < items.length; i++) {\n this.free(items[i]);\n }\n };\n Pool.prototype.clear = function () {\n this.items.length = 0;\n };\n return Pool;\n }());\n spine.Pool = Pool;\n var Vector2 = (function () {\n function Vector2(x, y) {\n if (x === void 0) { x = 0; }\n if (y === void 0) { y = 0; }\n this.x = x;\n this.y = y;\n }\n Vector2.prototype.set = function (x, y) {\n this.x = x;\n this.y = y;\n return this;\n };\n Vector2.prototype.length = function () {\n var x = this.x;\n var y = this.y;\n return Math.sqrt(x * x + y * y);\n };\n Vector2.prototype.normalize = function () {\n var len = this.length();\n if (len != 0) {\n this.x /= len;\n this.y /= len;\n }\n return this;\n };\n return Vector2;\n }());\n spine.Vector2 = Vector2;\n var TimeKeeper = (function () {\n function TimeKeeper() {\n this.maxDelta = 0.064;\n this.framesPerSecond = 0;\n this.delta = 0;\n this.totalTime = 0;\n this.lastTime = Date.now() / 1000;\n this.frameCount = 0;\n this.frameTime = 0;\n }\n TimeKeeper.prototype.update = function () {\n var now = Date.now() / 1000;\n this.delta = now - this.lastTime;\n this.frameTime += this.delta;\n this.totalTime += this.delta;\n if (this.delta > this.maxDelta)\n this.delta = this.maxDelta;\n this.lastTime = now;\n this.frameCount++;\n if (this.frameTime > 1) {\n this.framesPerSecond = this.frameCount / this.frameTime;\n this.frameTime = 0;\n this.frameCount = 0;\n }\n };\n return TimeKeeper;\n }());\n spine.TimeKeeper = TimeKeeper;\n var WindowedMean = (function () {\n function WindowedMean(windowSize) {\n if (windowSize === void 0) { windowSize = 32; }\n this.addedValues = 0;\n this.lastValue = 0;\n this.mean = 0;\n this.dirty = true;\n this.values = new Array(windowSize);\n }\n WindowedMean.prototype.hasEnoughData = function () {\n return this.addedValues >= this.values.length;\n };\n WindowedMean.prototype.addValue = function (value) {\n if (this.addedValues < this.values.length)\n this.addedValues++;\n this.values[this.lastValue++] = value;\n if (this.lastValue > this.values.length - 1)\n this.lastValue = 0;\n this.dirty = true;\n };\n WindowedMean.prototype.getMean = function () {\n if (this.hasEnoughData()) {\n if (this.dirty) {\n var mean = 0;\n for (var i = 0; i < this.values.length; i++) {\n mean += this.values[i];\n }\n this.mean = mean / this.values.length;\n this.dirty = false;\n }\n return this.mean;\n }\n else {\n return 0;\n }\n };\n return WindowedMean;\n }());\n spine.WindowedMean = WindowedMean;\n})(spine || (spine = {}));\n(function () {\n if (!Math.fround) {\n Math.fround = (function (array) {\n return function (x) {\n return array[0] = x, array[0];\n };\n })(new Float32Array(1));\n }\n})();\nvar spine;\n(function (spine) {\n var Attachment = (function () {\n function Attachment(name) {\n if (name == null)\n throw new Error(\"name cannot be null.\");\n this.name = name;\n }\n return Attachment;\n }());\n spine.Attachment = Attachment;\n var VertexAttachment = (function (_super) {\n __extends(VertexAttachment, _super);\n function VertexAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.id = (VertexAttachment.nextID++ & 65535) << 11;\n _this.worldVerticesLength = 0;\n _this.deformAttachment = _this;\n return _this;\n }\n VertexAttachment.prototype.computeWorldVertices = function (slot, start, count, worldVertices, offset, stride) {\n count = offset + (count >> 1) * stride;\n var skeleton = slot.bone.skeleton;\n var deformArray = slot.deform;\n var vertices = this.vertices;\n var bones = this.bones;\n if (bones == null) {\n if (deformArray.length > 0)\n vertices = deformArray;\n var bone = slot.bone;\n var x = bone.worldX;\n var y = bone.worldY;\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n for (var v_1 = start, w = offset; w < count; v_1 += 2, w += stride) {\n var vx = vertices[v_1], vy = vertices[v_1 + 1];\n worldVertices[w] = vx * a + vy * b + x;\n worldVertices[w + 1] = vx * c + vy * d + y;\n }\n return;\n }\n var v = 0, skip = 0;\n for (var i = 0; i < start; i += 2) {\n var n = bones[v];\n v += n + 1;\n skip += n;\n }\n var skeletonBones = skeleton.bones;\n if (deformArray.length == 0) {\n for (var w = offset, b = skip * 3; w < count; w += stride) {\n var wx = 0, wy = 0;\n var n = bones[v++];\n n += v;\n for (; v < n; v++, b += 3) {\n var bone = skeletonBones[bones[v]];\n var vx = vertices[b], vy = vertices[b + 1], weight = vertices[b + 2];\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\n }\n worldVertices[w] = wx;\n worldVertices[w + 1] = wy;\n }\n }\n else {\n var deform = deformArray;\n for (var w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {\n var wx = 0, wy = 0;\n var n = bones[v++];\n n += v;\n for (; v < n; v++, b += 3, f += 2) {\n var bone = skeletonBones[bones[v]];\n var vx = vertices[b] + deform[f], vy = vertices[b + 1] + deform[f + 1], weight = vertices[b + 2];\n wx += (vx * bone.a + vy * bone.b + bone.worldX) * weight;\n wy += (vx * bone.c + vy * bone.d + bone.worldY) * weight;\n }\n worldVertices[w] = wx;\n worldVertices[w + 1] = wy;\n }\n }\n };\n VertexAttachment.prototype.copyTo = function (attachment) {\n if (this.bones != null) {\n attachment.bones = new Array(this.bones.length);\n spine.Utils.arrayCopy(this.bones, 0, attachment.bones, 0, this.bones.length);\n }\n else\n attachment.bones = null;\n if (this.vertices != null) {\n attachment.vertices = spine.Utils.newFloatArray(this.vertices.length);\n spine.Utils.arrayCopy(this.vertices, 0, attachment.vertices, 0, this.vertices.length);\n }\n else\n attachment.vertices = null;\n attachment.worldVerticesLength = this.worldVerticesLength;\n attachment.deformAttachment = this.deformAttachment;\n };\n VertexAttachment.nextID = 0;\n return VertexAttachment;\n }(Attachment));\n spine.VertexAttachment = VertexAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var AttachmentType;\n (function (AttachmentType) {\n AttachmentType[AttachmentType[\"Region\"] = 0] = \"Region\";\n AttachmentType[AttachmentType[\"BoundingBox\"] = 1] = \"BoundingBox\";\n AttachmentType[AttachmentType[\"Mesh\"] = 2] = \"Mesh\";\n AttachmentType[AttachmentType[\"LinkedMesh\"] = 3] = \"LinkedMesh\";\n AttachmentType[AttachmentType[\"Path\"] = 4] = \"Path\";\n AttachmentType[AttachmentType[\"Point\"] = 5] = \"Point\";\n AttachmentType[AttachmentType[\"Clipping\"] = 6] = \"Clipping\";\n })(AttachmentType = spine.AttachmentType || (spine.AttachmentType = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var BoundingBoxAttachment = (function (_super) {\n __extends(BoundingBoxAttachment, _super);\n function BoundingBoxAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.color = new spine.Color(1, 1, 1, 1);\n return _this;\n }\n BoundingBoxAttachment.prototype.copy = function () {\n var copy = new BoundingBoxAttachment(name);\n this.copyTo(copy);\n copy.color.setFromColor(this.color);\n return copy;\n };\n return BoundingBoxAttachment;\n }(spine.VertexAttachment));\n spine.BoundingBoxAttachment = BoundingBoxAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var ClippingAttachment = (function (_super) {\n __extends(ClippingAttachment, _super);\n function ClippingAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.color = new spine.Color(0.2275, 0.2275, 0.8078, 1);\n return _this;\n }\n ClippingAttachment.prototype.copy = function () {\n var copy = new ClippingAttachment(name);\n this.copyTo(copy);\n copy.endSlot = this.endSlot;\n copy.color.setFromColor(this.color);\n return copy;\n };\n return ClippingAttachment;\n }(spine.VertexAttachment));\n spine.ClippingAttachment = ClippingAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var MeshAttachment = (function (_super) {\n __extends(MeshAttachment, _super);\n function MeshAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.color = new spine.Color(1, 1, 1, 1);\n _this.tempColor = new spine.Color(0, 0, 0, 0);\n return _this;\n }\n MeshAttachment.prototype.updateUVs = function () {\n var regionUVs = this.regionUVs;\n if (this.uvs == null || this.uvs.length != regionUVs.length)\n this.uvs = spine.Utils.newFloatArray(regionUVs.length);\n var uvs = this.uvs;\n var n = this.uvs.length;\n var u = this.region.u, v = this.region.v, width = 0, height = 0;\n if (this.region instanceof spine.TextureAtlasRegion) {\n var region = this.region;\n var textureWidth = region.texture.getImage().width, textureHeight = region.texture.getImage().height;\n switch (region.degrees) {\n case 90:\n u -= (region.originalHeight - region.offsetY - region.height) / textureWidth;\n v -= (region.originalWidth - region.offsetX - region.width) / textureHeight;\n width = region.originalHeight / textureWidth;\n height = region.originalWidth / textureHeight;\n for (var i = 0; i < n; i += 2) {\n uvs[i] = u + regionUVs[i + 1] * width;\n uvs[i + 1] = v + (1 - regionUVs[i]) * height;\n }\n return;\n case 180:\n u -= (region.originalWidth - region.offsetX - region.width) / textureWidth;\n v -= region.offsetY / textureHeight;\n width = region.originalWidth / textureWidth;\n height = region.originalHeight / textureHeight;\n for (var i = 0; i < n; i += 2) {\n uvs[i] = u + (1 - regionUVs[i]) * width;\n uvs[i + 1] = v + (1 - regionUVs[i + 1]) * height;\n }\n return;\n case 270:\n u -= region.offsetY / textureWidth;\n v -= region.offsetX / textureHeight;\n width = region.originalHeight / textureWidth;\n height = region.originalWidth / textureHeight;\n for (var i = 0; i < n; i += 2) {\n uvs[i] = u + (1 - regionUVs[i + 1]) * width;\n uvs[i + 1] = v + regionUVs[i] * height;\n }\n return;\n }\n u -= region.offsetX / textureWidth;\n v -= (region.originalHeight - region.offsetY - region.height) / textureHeight;\n width = region.originalWidth / textureWidth;\n height = region.originalHeight / textureHeight;\n }\n else if (this.region == null) {\n u = v = 0;\n width = height = 1;\n }\n else {\n width = this.region.u2 - u;\n height = this.region.v2 - v;\n }\n for (var i = 0; i < n; i += 2) {\n uvs[i] = u + regionUVs[i] * width;\n uvs[i + 1] = v + regionUVs[i + 1] * height;\n }\n };\n MeshAttachment.prototype.getParentMesh = function () {\n return this.parentMesh;\n };\n MeshAttachment.prototype.setParentMesh = function (parentMesh) {\n this.parentMesh = parentMesh;\n if (parentMesh != null) {\n this.bones = parentMesh.bones;\n this.vertices = parentMesh.vertices;\n this.worldVerticesLength = parentMesh.worldVerticesLength;\n this.regionUVs = parentMesh.regionUVs;\n this.triangles = parentMesh.triangles;\n this.hullLength = parentMesh.hullLength;\n this.worldVerticesLength = parentMesh.worldVerticesLength;\n }\n };\n MeshAttachment.prototype.copy = function () {\n if (this.parentMesh != null)\n return this.newLinkedMesh();\n var copy = new MeshAttachment(this.name);\n copy.region = this.region;\n copy.path = this.path;\n copy.color.setFromColor(this.color);\n this.copyTo(copy);\n copy.regionUVs = new Array(this.regionUVs.length);\n spine.Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);\n copy.uvs = new Array(this.uvs.length);\n spine.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);\n copy.triangles = new Array(this.triangles.length);\n spine.Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);\n copy.hullLength = this.hullLength;\n if (this.edges != null) {\n copy.edges = new Array(this.edges.length);\n spine.Utils.arrayCopy(this.edges, 0, copy.edges, 0, this.edges.length);\n }\n copy.width = this.width;\n copy.height = this.height;\n return copy;\n };\n MeshAttachment.prototype.newLinkedMesh = function () {\n var copy = new MeshAttachment(this.name);\n copy.region = this.region;\n copy.path = this.path;\n copy.color.setFromColor(this.color);\n copy.deformAttachment = this.deformAttachment;\n copy.setParentMesh(this.parentMesh != null ? this.parentMesh : this);\n copy.updateUVs();\n return copy;\n };\n return MeshAttachment;\n }(spine.VertexAttachment));\n spine.MeshAttachment = MeshAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var PathAttachment = (function (_super) {\n __extends(PathAttachment, _super);\n function PathAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.closed = false;\n _this.constantSpeed = false;\n _this.color = new spine.Color(1, 1, 1, 1);\n return _this;\n }\n PathAttachment.prototype.copy = function () {\n var copy = new PathAttachment(name);\n this.copyTo(copy);\n copy.lengths = new Array(this.lengths.length);\n spine.Utils.arrayCopy(this.lengths, 0, copy.lengths, 0, this.lengths.length);\n copy.closed = closed;\n copy.constantSpeed = this.constantSpeed;\n copy.color.setFromColor(this.color);\n return copy;\n };\n return PathAttachment;\n }(spine.VertexAttachment));\n spine.PathAttachment = PathAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var PointAttachment = (function (_super) {\n __extends(PointAttachment, _super);\n function PointAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.color = new spine.Color(0.38, 0.94, 0, 1);\n return _this;\n }\n PointAttachment.prototype.computeWorldPosition = function (bone, point) {\n point.x = this.x * bone.a + this.y * bone.b + bone.worldX;\n point.y = this.x * bone.c + this.y * bone.d + bone.worldY;\n return point;\n };\n PointAttachment.prototype.computeWorldRotation = function (bone) {\n var cos = spine.MathUtils.cosDeg(this.rotation), sin = spine.MathUtils.sinDeg(this.rotation);\n var x = cos * bone.a + sin * bone.b;\n var y = cos * bone.c + sin * bone.d;\n return Math.atan2(y, x) * spine.MathUtils.radDeg;\n };\n PointAttachment.prototype.copy = function () {\n var copy = new PointAttachment(name);\n copy.x = this.x;\n copy.y = this.y;\n copy.rotation = this.rotation;\n copy.color.setFromColor(this.color);\n return copy;\n };\n return PointAttachment;\n }(spine.VertexAttachment));\n spine.PointAttachment = PointAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var RegionAttachment = (function (_super) {\n __extends(RegionAttachment, _super);\n function RegionAttachment(name) {\n var _this = _super.call(this, name) || this;\n _this.x = 0;\n _this.y = 0;\n _this.scaleX = 1;\n _this.scaleY = 1;\n _this.rotation = 0;\n _this.width = 0;\n _this.height = 0;\n _this.color = new spine.Color(1, 1, 1, 1);\n _this.offset = spine.Utils.newFloatArray(8);\n _this.uvs = spine.Utils.newFloatArray(8);\n _this.tempColor = new spine.Color(1, 1, 1, 1);\n return _this;\n }\n RegionAttachment.prototype.updateOffset = function () {\n var regionScaleX = this.width / this.region.originalWidth * this.scaleX;\n var regionScaleY = this.height / this.region.originalHeight * this.scaleY;\n var localX = -this.width / 2 * this.scaleX + this.region.offsetX * regionScaleX;\n var localY = -this.height / 2 * this.scaleY + this.region.offsetY * regionScaleY;\n var localX2 = localX + this.region.width * regionScaleX;\n var localY2 = localY + this.region.height * regionScaleY;\n var radians = this.rotation * Math.PI / 180;\n var cos = Math.cos(radians);\n var sin = Math.sin(radians);\n var localXCos = localX * cos + this.x;\n var localXSin = localX * sin;\n var localYCos = localY * cos + this.y;\n var localYSin = localY * sin;\n var localX2Cos = localX2 * cos + this.x;\n var localX2Sin = localX2 * sin;\n var localY2Cos = localY2 * cos + this.y;\n var localY2Sin = localY2 * sin;\n var offset = this.offset;\n offset[RegionAttachment.OX1] = localXCos - localYSin;\n offset[RegionAttachment.OY1] = localYCos + localXSin;\n offset[RegionAttachment.OX2] = localXCos - localY2Sin;\n offset[RegionAttachment.OY2] = localY2Cos + localXSin;\n offset[RegionAttachment.OX3] = localX2Cos - localY2Sin;\n offset[RegionAttachment.OY3] = localY2Cos + localX2Sin;\n offset[RegionAttachment.OX4] = localX2Cos - localYSin;\n offset[RegionAttachment.OY4] = localYCos + localX2Sin;\n };\n RegionAttachment.prototype.setRegion = function (region) {\n this.region = region;\n var uvs = this.uvs;\n if (region.rotate) {\n uvs[2] = region.u;\n uvs[3] = region.v2;\n uvs[4] = region.u;\n uvs[5] = region.v;\n uvs[6] = region.u2;\n uvs[7] = region.v;\n uvs[0] = region.u2;\n uvs[1] = region.v2;\n }\n else {\n uvs[0] = region.u;\n uvs[1] = region.v2;\n uvs[2] = region.u;\n uvs[3] = region.v;\n uvs[4] = region.u2;\n uvs[5] = region.v;\n uvs[6] = region.u2;\n uvs[7] = region.v2;\n }\n };\n RegionAttachment.prototype.computeWorldVertices = function (bone, worldVertices, offset, stride) {\n var vertexOffset = this.offset;\n var x = bone.worldX, y = bone.worldY;\n var a = bone.a, b = bone.b, c = bone.c, d = bone.d;\n var offsetX = 0, offsetY = 0;\n offsetX = vertexOffset[RegionAttachment.OX1];\n offsetY = vertexOffset[RegionAttachment.OY1];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[RegionAttachment.OX2];\n offsetY = vertexOffset[RegionAttachment.OY2];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[RegionAttachment.OX3];\n offsetY = vertexOffset[RegionAttachment.OY3];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n offset += stride;\n offsetX = vertexOffset[RegionAttachment.OX4];\n offsetY = vertexOffset[RegionAttachment.OY4];\n worldVertices[offset] = offsetX * a + offsetY * b + x;\n worldVertices[offset + 1] = offsetX * c + offsetY * d + y;\n };\n RegionAttachment.prototype.copy = function () {\n var copy = new RegionAttachment(this.name);\n copy.region = this.region;\n copy.rendererObject = this.rendererObject;\n copy.path = this.path;\n copy.x = this.x;\n copy.y = this.y;\n copy.scaleX = this.scaleX;\n copy.scaleY = this.scaleY;\n copy.rotation = this.rotation;\n copy.width = this.width;\n copy.height = this.height;\n spine.Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);\n spine.Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);\n copy.color.setFromColor(this.color);\n return copy;\n };\n RegionAttachment.OX1 = 0;\n RegionAttachment.OY1 = 1;\n RegionAttachment.OX2 = 2;\n RegionAttachment.OY2 = 3;\n RegionAttachment.OX3 = 4;\n RegionAttachment.OY3 = 5;\n RegionAttachment.OX4 = 6;\n RegionAttachment.OY4 = 7;\n RegionAttachment.X1 = 0;\n RegionAttachment.Y1 = 1;\n RegionAttachment.C1R = 2;\n RegionAttachment.C1G = 3;\n RegionAttachment.C1B = 4;\n RegionAttachment.C1A = 5;\n RegionAttachment.U1 = 6;\n RegionAttachment.V1 = 7;\n RegionAttachment.X2 = 8;\n RegionAttachment.Y2 = 9;\n RegionAttachment.C2R = 10;\n RegionAttachment.C2G = 11;\n RegionAttachment.C2B = 12;\n RegionAttachment.C2A = 13;\n RegionAttachment.U2 = 14;\n RegionAttachment.V2 = 15;\n RegionAttachment.X3 = 16;\n RegionAttachment.Y3 = 17;\n RegionAttachment.C3R = 18;\n RegionAttachment.C3G = 19;\n RegionAttachment.C3B = 20;\n RegionAttachment.C3A = 21;\n RegionAttachment.U3 = 22;\n RegionAttachment.V3 = 23;\n RegionAttachment.X4 = 24;\n RegionAttachment.Y4 = 25;\n RegionAttachment.C4R = 26;\n RegionAttachment.C4G = 27;\n RegionAttachment.C4B = 28;\n RegionAttachment.C4A = 29;\n RegionAttachment.U4 = 30;\n RegionAttachment.V4 = 31;\n return RegionAttachment;\n }(spine.Attachment));\n spine.RegionAttachment = RegionAttachment;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var JitterEffect = (function () {\n function JitterEffect(jitterX, jitterY) {\n this.jitterX = 0;\n this.jitterY = 0;\n this.jitterX = jitterX;\n this.jitterY = jitterY;\n }\n JitterEffect.prototype.begin = function (skeleton) {\n };\n JitterEffect.prototype.transform = function (position, uv, light, dark) {\n position.x += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\n position.y += spine.MathUtils.randomTriangular(-this.jitterX, this.jitterY);\n };\n JitterEffect.prototype.end = function () {\n };\n return JitterEffect;\n }());\n spine.JitterEffect = JitterEffect;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var SwirlEffect = (function () {\n function SwirlEffect(radius) {\n this.centerX = 0;\n this.centerY = 0;\n this.radius = 0;\n this.angle = 0;\n this.worldX = 0;\n this.worldY = 0;\n this.radius = radius;\n }\n SwirlEffect.prototype.begin = function (skeleton) {\n this.worldX = skeleton.x + this.centerX;\n this.worldY = skeleton.y + this.centerY;\n };\n SwirlEffect.prototype.transform = function (position, uv, light, dark) {\n var radAngle = this.angle * spine.MathUtils.degreesToRadians;\n var x = position.x - this.worldX;\n var y = position.y - this.worldY;\n var dist = Math.sqrt(x * x + y * y);\n if (dist < this.radius) {\n var theta = SwirlEffect.interpolation.apply(0, radAngle, (this.radius - dist) / this.radius);\n var cos = Math.cos(theta);\n var sin = Math.sin(theta);\n position.x = cos * x - sin * y + this.worldX;\n position.y = sin * x + cos * y + this.worldY;\n }\n };\n SwirlEffect.prototype.end = function () {\n };\n SwirlEffect.interpolation = new spine.PowOut(2);\n return SwirlEffect;\n }());\n spine.SwirlEffect = SwirlEffect;\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var canvas;\n (function (canvas) {\n var AssetManager = (function (_super) {\n __extends(AssetManager, _super);\n function AssetManager(pathPrefix) {\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\n return _super.call(this, function (image) { return new spine.canvas.CanvasTexture(image); }, pathPrefix) || this;\n }\n return AssetManager;\n }(spine.AssetManager));\n canvas.AssetManager = AssetManager;\n })(canvas = spine.canvas || (spine.canvas = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var canvas;\n (function (canvas) {\n var CanvasTexture = (function (_super) {\n __extends(CanvasTexture, _super);\n function CanvasTexture(image) {\n return _super.call(this, image) || this;\n }\n CanvasTexture.prototype.setFilters = function (minFilter, magFilter) { };\n CanvasTexture.prototype.setWraps = function (uWrap, vWrap) { };\n CanvasTexture.prototype.dispose = function () { };\n return CanvasTexture;\n }(spine.Texture));\n canvas.CanvasTexture = CanvasTexture;\n })(canvas = spine.canvas || (spine.canvas = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var canvas;\n (function (canvas) {\n var SkeletonRenderer = (function () {\n function SkeletonRenderer(context) {\n this.triangleRendering = false;\n this.debugRendering = false;\n this.vertices = spine.Utils.newFloatArray(8 * 1024);\n this.tempColor = new spine.Color();\n this.ctx = context;\n }\n SkeletonRenderer.prototype.draw = function (skeleton) {\n if (this.triangleRendering)\n this.drawTriangles(skeleton);\n else\n this.drawImages(skeleton);\n };\n SkeletonRenderer.prototype.drawImages = function (skeleton) {\n var ctx = this.ctx;\n var drawOrder = skeleton.drawOrder;\n if (this.debugRendering)\n ctx.strokeStyle = \"green\";\n ctx.save();\n for (var i = 0, n = drawOrder.length; i < n; i++) {\n var slot = drawOrder[i];\n if (!slot.bone.active)\n continue;\n var attachment = slot.getAttachment();\n var regionAttachment = null;\n var region = null;\n var image = null;\n if (attachment instanceof spine.RegionAttachment) {\n regionAttachment = attachment;\n region = regionAttachment.region;\n image = region.texture.getImage();\n }\n else\n continue;\n var skeleton_1 = slot.bone.skeleton;\n var skeletonColor = skeleton_1.color;\n var slotColor = slot.color;\n var regionColor = regionAttachment.color;\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\n var color = this.tempColor;\n color.set(skeletonColor.r * slotColor.r * regionColor.r, skeletonColor.g * slotColor.g * regionColor.g, skeletonColor.b * slotColor.b * regionColor.b, alpha);\n var att = attachment;\n var bone = slot.bone;\n var w = region.width;\n var h = region.height;\n ctx.save();\n ctx.transform(bone.a, bone.c, bone.b, bone.d, bone.worldX, bone.worldY);\n ctx.translate(attachment.offset[0], attachment.offset[1]);\n ctx.rotate(attachment.rotation * Math.PI / 180);\n var atlasScale = att.width / w;\n ctx.scale(atlasScale * attachment.scaleX, atlasScale * attachment.scaleY);\n ctx.translate(w / 2, h / 2);\n if (attachment.region.rotate) {\n var t = w;\n w = h;\n h = t;\n ctx.rotate(-Math.PI / 2);\n }\n ctx.scale(1, -1);\n ctx.translate(-w / 2, -h / 2);\n if (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) {\n ctx.globalAlpha = color.a;\n }\n ctx.drawImage(image, region.x, region.y, w, h, 0, 0, w, h);\n if (this.debugRendering)\n ctx.strokeRect(0, 0, w, h);\n ctx.restore();\n }\n ctx.restore();\n };\n SkeletonRenderer.prototype.drawTriangles = function (skeleton) {\n var blendMode = null;\n var vertices = this.vertices;\n var triangles = null;\n var drawOrder = skeleton.drawOrder;\n for (var i = 0, n = drawOrder.length; i < n; i++) {\n var slot = drawOrder[i];\n var attachment = slot.getAttachment();\n var texture = null;\n var region = null;\n if (attachment instanceof spine.RegionAttachment) {\n var regionAttachment = attachment;\n vertices = this.computeRegionVertices(slot, regionAttachment, false);\n triangles = SkeletonRenderer.QUAD_TRIANGLES;\n region = regionAttachment.region;\n texture = region.texture.getImage();\n }\n else if (attachment instanceof spine.MeshAttachment) {\n var mesh = attachment;\n vertices = this.computeMeshVertices(slot, mesh, false);\n triangles = mesh.triangles;\n texture = mesh.region.renderObject.texture.getImage();\n }\n else\n continue;\n if (texture != null) {\n var slotBlendMode = slot.data.blendMode;\n if (slotBlendMode != blendMode) {\n blendMode = slotBlendMode;\n }\n var skeleton_2 = slot.bone.skeleton;\n var skeletonColor = skeleton_2.color;\n var slotColor = slot.color;\n var attachmentColor = attachment.color;\n var alpha = skeletonColor.a * slotColor.a * attachmentColor.a;\n var color = this.tempColor;\n color.set(skeletonColor.r * slotColor.r * attachmentColor.r, skeletonColor.g * slotColor.g * attachmentColor.g, skeletonColor.b * slotColor.b * attachmentColor.b, alpha);\n var ctx = this.ctx;\n if (color.r != 1 || color.g != 1 || color.b != 1 || color.a != 1) {\n ctx.globalAlpha = color.a;\n }\n for (var j = 0; j < triangles.length; j += 3) {\n var t1 = triangles[j] * 8, t2 = triangles[j + 1] * 8, t3 = triangles[j + 2] * 8;\n var x0 = vertices[t1], y0 = vertices[t1 + 1], u0 = vertices[t1 + 6], v0 = vertices[t1 + 7];\n var x1 = vertices[t2], y1 = vertices[t2 + 1], u1 = vertices[t2 + 6], v1 = vertices[t2 + 7];\n var x2 = vertices[t3], y2 = vertices[t3 + 1], u2 = vertices[t3 + 6], v2 = vertices[t3 + 7];\n this.drawTriangle(texture, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2);\n if (this.debugRendering) {\n ctx.strokeStyle = \"green\";\n ctx.beginPath();\n ctx.moveTo(x0, y0);\n ctx.lineTo(x1, y1);\n ctx.lineTo(x2, y2);\n ctx.lineTo(x0, y0);\n ctx.stroke();\n }\n }\n }\n }\n this.ctx.globalAlpha = 1;\n };\n SkeletonRenderer.prototype.drawTriangle = function (img, x0, y0, u0, v0, x1, y1, u1, v1, x2, y2, u2, v2) {\n var ctx = this.ctx;\n u0 *= img.width;\n v0 *= img.height;\n u1 *= img.width;\n v1 *= img.height;\n u2 *= img.width;\n v2 *= img.height;\n ctx.beginPath();\n ctx.moveTo(x0, y0);\n ctx.lineTo(x1, y1);\n ctx.lineTo(x2, y2);\n ctx.closePath();\n x1 -= x0;\n y1 -= y0;\n x2 -= x0;\n y2 -= y0;\n u1 -= u0;\n v1 -= v0;\n u2 -= u0;\n v2 -= v0;\n var det = 1 / (u1 * v2 - u2 * v1), a = (v2 * x1 - v1 * x2) * det, b = (v2 * y1 - v1 * y2) * det, c = (u1 * x2 - u2 * x1) * det, d = (u1 * y2 - u2 * y1) * det, e = x0 - a * u0 - c * v0, f = y0 - b * u0 - d * v0;\n ctx.save();\n ctx.transform(a, b, c, d, e, f);\n ctx.clip();\n ctx.drawImage(img, 0, 0);\n ctx.restore();\n };\n SkeletonRenderer.prototype.computeRegionVertices = function (slot, region, pma) {\n var skeleton = slot.bone.skeleton;\n var skeletonColor = skeleton.color;\n var slotColor = slot.color;\n var regionColor = region.color;\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\n var multiplier = pma ? alpha : 1;\n var color = this.tempColor;\n color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha);\n region.computeWorldVertices(slot.bone, this.vertices, 0, SkeletonRenderer.VERTEX_SIZE);\n var vertices = this.vertices;\n var uvs = region.uvs;\n vertices[spine.RegionAttachment.C1R] = color.r;\n vertices[spine.RegionAttachment.C1G] = color.g;\n vertices[spine.RegionAttachment.C1B] = color.b;\n vertices[spine.RegionAttachment.C1A] = color.a;\n vertices[spine.RegionAttachment.U1] = uvs[0];\n vertices[spine.RegionAttachment.V1] = uvs[1];\n vertices[spine.RegionAttachment.C2R] = color.r;\n vertices[spine.RegionAttachment.C2G] = color.g;\n vertices[spine.RegionAttachment.C2B] = color.b;\n vertices[spine.RegionAttachment.C2A] = color.a;\n vertices[spine.RegionAttachment.U2] = uvs[2];\n vertices[spine.RegionAttachment.V2] = uvs[3];\n vertices[spine.RegionAttachment.C3R] = color.r;\n vertices[spine.RegionAttachment.C3G] = color.g;\n vertices[spine.RegionAttachment.C3B] = color.b;\n vertices[spine.RegionAttachment.C3A] = color.a;\n vertices[spine.RegionAttachment.U3] = uvs[4];\n vertices[spine.RegionAttachment.V3] = uvs[5];\n vertices[spine.RegionAttachment.C4R] = color.r;\n vertices[spine.RegionAttachment.C4G] = color.g;\n vertices[spine.RegionAttachment.C4B] = color.b;\n vertices[spine.RegionAttachment.C4A] = color.a;\n vertices[spine.RegionAttachment.U4] = uvs[6];\n vertices[spine.RegionAttachment.V4] = uvs[7];\n return vertices;\n };\n SkeletonRenderer.prototype.computeMeshVertices = function (slot, mesh, pma) {\n var skeleton = slot.bone.skeleton;\n var skeletonColor = skeleton.color;\n var slotColor = slot.color;\n var regionColor = mesh.color;\n var alpha = skeletonColor.a * slotColor.a * regionColor.a;\n var multiplier = pma ? alpha : 1;\n var color = this.tempColor;\n color.set(skeletonColor.r * slotColor.r * regionColor.r * multiplier, skeletonColor.g * slotColor.g * regionColor.g * multiplier, skeletonColor.b * slotColor.b * regionColor.b * multiplier, alpha);\n var numVertices = mesh.worldVerticesLength / 2;\n if (this.vertices.length < mesh.worldVerticesLength) {\n this.vertices = spine.Utils.newFloatArray(mesh.worldVerticesLength);\n }\n var vertices = this.vertices;\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, SkeletonRenderer.VERTEX_SIZE);\n var uvs = mesh.uvs;\n for (var i = 0, n = numVertices, u = 0, v = 2; i < n; i++) {\n vertices[v++] = color.r;\n vertices[v++] = color.g;\n vertices[v++] = color.b;\n vertices[v++] = color.a;\n vertices[v++] = uvs[u++];\n vertices[v++] = uvs[u++];\n v += 2;\n }\n return vertices;\n };\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\n SkeletonRenderer.VERTEX_SIZE = 2 + 2 + 4;\n return SkeletonRenderer;\n }());\n canvas.SkeletonRenderer = SkeletonRenderer;\n })(canvas = spine.canvas || (spine.canvas = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var AssetManager = (function (_super) {\n __extends(AssetManager, _super);\n function AssetManager(context, pathPrefix) {\n if (pathPrefix === void 0) { pathPrefix = \"\"; }\n return _super.call(this, function (image) {\n return new spine.webgl.GLTexture(context, image);\n }, pathPrefix) || this;\n }\n return AssetManager;\n }(spine.AssetManager));\n webgl.AssetManager = AssetManager;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var OrthoCamera = (function () {\n function OrthoCamera(viewportWidth, viewportHeight) {\n this.position = new webgl.Vector3(0, 0, 0);\n this.direction = new webgl.Vector3(0, 0, -1);\n this.up = new webgl.Vector3(0, 1, 0);\n this.near = 0;\n this.far = 100;\n this.zoom = 1;\n this.viewportWidth = 0;\n this.viewportHeight = 0;\n this.projectionView = new webgl.Matrix4();\n this.inverseProjectionView = new webgl.Matrix4();\n this.projection = new webgl.Matrix4();\n this.view = new webgl.Matrix4();\n this.tmp = new webgl.Vector3();\n this.viewportWidth = viewportWidth;\n this.viewportHeight = viewportHeight;\n this.update();\n }\n OrthoCamera.prototype.update = function () {\n var projection = this.projection;\n var view = this.view;\n var projectionView = this.projectionView;\n var inverseProjectionView = this.inverseProjectionView;\n var zoom = this.zoom, viewportWidth = this.viewportWidth, viewportHeight = this.viewportHeight;\n projection.ortho(zoom * (-viewportWidth / 2), zoom * (viewportWidth / 2), zoom * (-viewportHeight / 2), zoom * (viewportHeight / 2), this.near, this.far);\n view.lookAt(this.position, this.direction, this.up);\n projectionView.set(projection.values);\n projectionView.multiply(view);\n inverseProjectionView.set(projectionView.values).invert();\n };\n OrthoCamera.prototype.screenToWorld = function (screenCoords, screenWidth, screenHeight) {\n var x = screenCoords.x, y = screenHeight - screenCoords.y - 1;\n var tmp = this.tmp;\n tmp.x = (2 * x) / screenWidth - 1;\n tmp.y = (2 * y) / screenHeight - 1;\n tmp.z = (2 * screenCoords.z) - 1;\n tmp.project(this.inverseProjectionView);\n screenCoords.set(tmp.x, tmp.y, tmp.z);\n return screenCoords;\n };\n OrthoCamera.prototype.setViewport = function (viewportWidth, viewportHeight) {\n this.viewportWidth = viewportWidth;\n this.viewportHeight = viewportHeight;\n };\n return OrthoCamera;\n }());\n webgl.OrthoCamera = OrthoCamera;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var GLTexture = (function (_super) {\n __extends(GLTexture, _super);\n function GLTexture(context, image, useMipMaps) {\n if (useMipMaps === void 0) { useMipMaps = false; }\n var _this = _super.call(this, image) || this;\n _this.texture = null;\n _this.boundUnit = 0;\n _this.useMipMaps = false;\n _this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\n _this.useMipMaps = useMipMaps;\n _this.restore();\n _this.context.addRestorable(_this);\n return _this;\n }\n GLTexture.prototype.setFilters = function (minFilter, magFilter) {\n var gl = this.context.gl;\n this.bind();\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, minFilter);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, GLTexture.validateMagFilter(magFilter));\n };\n GLTexture.validateMagFilter = function (magFilter) {\n switch (magFilter) {\n case spine.TextureFilter.MipMap:\n case spine.TextureFilter.MipMapLinearLinear:\n case spine.TextureFilter.MipMapLinearNearest:\n case spine.TextureFilter.MipMapNearestLinear:\n case spine.TextureFilter.MipMapNearestNearest:\n return spine.TextureFilter.Linear;\n default:\n return magFilter;\n }\n };\n GLTexture.prototype.setWraps = function (uWrap, vWrap) {\n var gl = this.context.gl;\n this.bind();\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, uWrap);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, vWrap);\n };\n GLTexture.prototype.update = function (useMipMaps) {\n var gl = this.context.gl;\n if (!this.texture) {\n this.texture = this.context.gl.createTexture();\n }\n this.bind();\n if (GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL)\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this._image);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, useMipMaps ? gl.LINEAR_MIPMAP_LINEAR : gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n if (useMipMaps)\n gl.generateMipmap(gl.TEXTURE_2D);\n };\n GLTexture.prototype.restore = function () {\n this.texture = null;\n this.update(this.useMipMaps);\n };\n GLTexture.prototype.bind = function (unit) {\n if (unit === void 0) { unit = 0; }\n var gl = this.context.gl;\n this.boundUnit = unit;\n gl.activeTexture(gl.TEXTURE0 + unit);\n gl.bindTexture(gl.TEXTURE_2D, this.texture);\n };\n GLTexture.prototype.unbind = function () {\n var gl = this.context.gl;\n gl.activeTexture(gl.TEXTURE0 + this.boundUnit);\n gl.bindTexture(gl.TEXTURE_2D, null);\n };\n GLTexture.prototype.dispose = function () {\n this.context.removeRestorable(this);\n var gl = this.context.gl;\n gl.deleteTexture(this.texture);\n };\n GLTexture.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL = false;\n return GLTexture;\n }(spine.Texture));\n webgl.GLTexture = GLTexture;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n webgl.M00 = 0;\n webgl.M01 = 4;\n webgl.M02 = 8;\n webgl.M03 = 12;\n webgl.M10 = 1;\n webgl.M11 = 5;\n webgl.M12 = 9;\n webgl.M13 = 13;\n webgl.M20 = 2;\n webgl.M21 = 6;\n webgl.M22 = 10;\n webgl.M23 = 14;\n webgl.M30 = 3;\n webgl.M31 = 7;\n webgl.M32 = 11;\n webgl.M33 = 15;\n var Matrix4 = (function () {\n function Matrix4() {\n this.temp = new Float32Array(16);\n this.values = new Float32Array(16);\n var v = this.values;\n v[webgl.M00] = 1;\n v[webgl.M11] = 1;\n v[webgl.M22] = 1;\n v[webgl.M33] = 1;\n }\n Matrix4.prototype.set = function (values) {\n this.values.set(values);\n return this;\n };\n Matrix4.prototype.transpose = function () {\n var t = this.temp;\n var v = this.values;\n t[webgl.M00] = v[webgl.M00];\n t[webgl.M01] = v[webgl.M10];\n t[webgl.M02] = v[webgl.M20];\n t[webgl.M03] = v[webgl.M30];\n t[webgl.M10] = v[webgl.M01];\n t[webgl.M11] = v[webgl.M11];\n t[webgl.M12] = v[webgl.M21];\n t[webgl.M13] = v[webgl.M31];\n t[webgl.M20] = v[webgl.M02];\n t[webgl.M21] = v[webgl.M12];\n t[webgl.M22] = v[webgl.M22];\n t[webgl.M23] = v[webgl.M32];\n t[webgl.M30] = v[webgl.M03];\n t[webgl.M31] = v[webgl.M13];\n t[webgl.M32] = v[webgl.M23];\n t[webgl.M33] = v[webgl.M33];\n return this.set(t);\n };\n Matrix4.prototype.identity = function () {\n var v = this.values;\n v[webgl.M00] = 1;\n v[webgl.M01] = 0;\n v[webgl.M02] = 0;\n v[webgl.M03] = 0;\n v[webgl.M10] = 0;\n v[webgl.M11] = 1;\n v[webgl.M12] = 0;\n v[webgl.M13] = 0;\n v[webgl.M20] = 0;\n v[webgl.M21] = 0;\n v[webgl.M22] = 1;\n v[webgl.M23] = 0;\n v[webgl.M30] = 0;\n v[webgl.M31] = 0;\n v[webgl.M32] = 0;\n v[webgl.M33] = 1;\n return this;\n };\n Matrix4.prototype.invert = function () {\n var v = this.values;\n var t = this.temp;\n var l_det = v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03]\n + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03]\n - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13]\n - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13]\n + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23]\n + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23]\n - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33]\n - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\n if (l_det == 0)\n throw new Error(\"non-invertible matrix\");\n var inv_det = 1.0 / l_det;\n t[webgl.M00] = v[webgl.M12] * v[webgl.M23] * v[webgl.M31] - v[webgl.M13] * v[webgl.M22] * v[webgl.M31] + v[webgl.M13] * v[webgl.M21] * v[webgl.M32]\n - v[webgl.M11] * v[webgl.M23] * v[webgl.M32] - v[webgl.M12] * v[webgl.M21] * v[webgl.M33] + v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\n t[webgl.M01] = v[webgl.M03] * v[webgl.M22] * v[webgl.M31] - v[webgl.M02] * v[webgl.M23] * v[webgl.M31] - v[webgl.M03] * v[webgl.M21] * v[webgl.M32]\n + v[webgl.M01] * v[webgl.M23] * v[webgl.M32] + v[webgl.M02] * v[webgl.M21] * v[webgl.M33] - v[webgl.M01] * v[webgl.M22] * v[webgl.M33];\n t[webgl.M02] = v[webgl.M02] * v[webgl.M13] * v[webgl.M31] - v[webgl.M03] * v[webgl.M12] * v[webgl.M31] + v[webgl.M03] * v[webgl.M11] * v[webgl.M32]\n - v[webgl.M01] * v[webgl.M13] * v[webgl.M32] - v[webgl.M02] * v[webgl.M11] * v[webgl.M33] + v[webgl.M01] * v[webgl.M12] * v[webgl.M33];\n t[webgl.M03] = v[webgl.M03] * v[webgl.M12] * v[webgl.M21] - v[webgl.M02] * v[webgl.M13] * v[webgl.M21] - v[webgl.M03] * v[webgl.M11] * v[webgl.M22]\n + v[webgl.M01] * v[webgl.M13] * v[webgl.M22] + v[webgl.M02] * v[webgl.M11] * v[webgl.M23] - v[webgl.M01] * v[webgl.M12] * v[webgl.M23];\n t[webgl.M10] = v[webgl.M13] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M20] * v[webgl.M32]\n + v[webgl.M10] * v[webgl.M23] * v[webgl.M32] + v[webgl.M12] * v[webgl.M20] * v[webgl.M33] - v[webgl.M10] * v[webgl.M22] * v[webgl.M33];\n t[webgl.M11] = v[webgl.M02] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M22] * v[webgl.M30] + v[webgl.M03] * v[webgl.M20] * v[webgl.M32]\n - v[webgl.M00] * v[webgl.M23] * v[webgl.M32] - v[webgl.M02] * v[webgl.M20] * v[webgl.M33] + v[webgl.M00] * v[webgl.M22] * v[webgl.M33];\n t[webgl.M12] = v[webgl.M03] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M10] * v[webgl.M32]\n + v[webgl.M00] * v[webgl.M13] * v[webgl.M32] + v[webgl.M02] * v[webgl.M10] * v[webgl.M33] - v[webgl.M00] * v[webgl.M12] * v[webgl.M33];\n t[webgl.M13] = v[webgl.M02] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M12] * v[webgl.M20] + v[webgl.M03] * v[webgl.M10] * v[webgl.M22]\n - v[webgl.M00] * v[webgl.M13] * v[webgl.M22] - v[webgl.M02] * v[webgl.M10] * v[webgl.M23] + v[webgl.M00] * v[webgl.M12] * v[webgl.M23];\n t[webgl.M20] = v[webgl.M11] * v[webgl.M23] * v[webgl.M30] - v[webgl.M13] * v[webgl.M21] * v[webgl.M30] + v[webgl.M13] * v[webgl.M20] * v[webgl.M31]\n - v[webgl.M10] * v[webgl.M23] * v[webgl.M31] - v[webgl.M11] * v[webgl.M20] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M33];\n t[webgl.M21] = v[webgl.M03] * v[webgl.M21] * v[webgl.M30] - v[webgl.M01] * v[webgl.M23] * v[webgl.M30] - v[webgl.M03] * v[webgl.M20] * v[webgl.M31]\n + v[webgl.M00] * v[webgl.M23] * v[webgl.M31] + v[webgl.M01] * v[webgl.M20] * v[webgl.M33] - v[webgl.M00] * v[webgl.M21] * v[webgl.M33];\n t[webgl.M22] = v[webgl.M01] * v[webgl.M13] * v[webgl.M30] - v[webgl.M03] * v[webgl.M11] * v[webgl.M30] + v[webgl.M03] * v[webgl.M10] * v[webgl.M31]\n - v[webgl.M00] * v[webgl.M13] * v[webgl.M31] - v[webgl.M01] * v[webgl.M10] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M33];\n t[webgl.M23] = v[webgl.M03] * v[webgl.M11] * v[webgl.M20] - v[webgl.M01] * v[webgl.M13] * v[webgl.M20] - v[webgl.M03] * v[webgl.M10] * v[webgl.M21]\n + v[webgl.M00] * v[webgl.M13] * v[webgl.M21] + v[webgl.M01] * v[webgl.M10] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M23];\n t[webgl.M30] = v[webgl.M12] * v[webgl.M21] * v[webgl.M30] - v[webgl.M11] * v[webgl.M22] * v[webgl.M30] - v[webgl.M12] * v[webgl.M20] * v[webgl.M31]\n + v[webgl.M10] * v[webgl.M22] * v[webgl.M31] + v[webgl.M11] * v[webgl.M20] * v[webgl.M32] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32];\n t[webgl.M31] = v[webgl.M01] * v[webgl.M22] * v[webgl.M30] - v[webgl.M02] * v[webgl.M21] * v[webgl.M30] + v[webgl.M02] * v[webgl.M20] * v[webgl.M31]\n - v[webgl.M00] * v[webgl.M22] * v[webgl.M31] - v[webgl.M01] * v[webgl.M20] * v[webgl.M32] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32];\n t[webgl.M32] = v[webgl.M02] * v[webgl.M11] * v[webgl.M30] - v[webgl.M01] * v[webgl.M12] * v[webgl.M30] - v[webgl.M02] * v[webgl.M10] * v[webgl.M31]\n + v[webgl.M00] * v[webgl.M12] * v[webgl.M31] + v[webgl.M01] * v[webgl.M10] * v[webgl.M32] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32];\n t[webgl.M33] = v[webgl.M01] * v[webgl.M12] * v[webgl.M20] - v[webgl.M02] * v[webgl.M11] * v[webgl.M20] + v[webgl.M02] * v[webgl.M10] * v[webgl.M21]\n - v[webgl.M00] * v[webgl.M12] * v[webgl.M21] - v[webgl.M01] * v[webgl.M10] * v[webgl.M22] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22];\n v[webgl.M00] = t[webgl.M00] * inv_det;\n v[webgl.M01] = t[webgl.M01] * inv_det;\n v[webgl.M02] = t[webgl.M02] * inv_det;\n v[webgl.M03] = t[webgl.M03] * inv_det;\n v[webgl.M10] = t[webgl.M10] * inv_det;\n v[webgl.M11] = t[webgl.M11] * inv_det;\n v[webgl.M12] = t[webgl.M12] * inv_det;\n v[webgl.M13] = t[webgl.M13] * inv_det;\n v[webgl.M20] = t[webgl.M20] * inv_det;\n v[webgl.M21] = t[webgl.M21] * inv_det;\n v[webgl.M22] = t[webgl.M22] * inv_det;\n v[webgl.M23] = t[webgl.M23] * inv_det;\n v[webgl.M30] = t[webgl.M30] * inv_det;\n v[webgl.M31] = t[webgl.M31] * inv_det;\n v[webgl.M32] = t[webgl.M32] * inv_det;\n v[webgl.M33] = t[webgl.M33] * inv_det;\n return this;\n };\n Matrix4.prototype.determinant = function () {\n var v = this.values;\n return v[webgl.M30] * v[webgl.M21] * v[webgl.M12] * v[webgl.M03] - v[webgl.M20] * v[webgl.M31] * v[webgl.M12] * v[webgl.M03] - v[webgl.M30] * v[webgl.M11] * v[webgl.M22] * v[webgl.M03]\n + v[webgl.M10] * v[webgl.M31] * v[webgl.M22] * v[webgl.M03] + v[webgl.M20] * v[webgl.M11] * v[webgl.M32] * v[webgl.M03] - v[webgl.M10] * v[webgl.M21] * v[webgl.M32] * v[webgl.M03]\n - v[webgl.M30] * v[webgl.M21] * v[webgl.M02] * v[webgl.M13] + v[webgl.M20] * v[webgl.M31] * v[webgl.M02] * v[webgl.M13] + v[webgl.M30] * v[webgl.M01] * v[webgl.M22] * v[webgl.M13]\n - v[webgl.M00] * v[webgl.M31] * v[webgl.M22] * v[webgl.M13] - v[webgl.M20] * v[webgl.M01] * v[webgl.M32] * v[webgl.M13] + v[webgl.M00] * v[webgl.M21] * v[webgl.M32] * v[webgl.M13]\n + v[webgl.M30] * v[webgl.M11] * v[webgl.M02] * v[webgl.M23] - v[webgl.M10] * v[webgl.M31] * v[webgl.M02] * v[webgl.M23] - v[webgl.M30] * v[webgl.M01] * v[webgl.M12] * v[webgl.M23]\n + v[webgl.M00] * v[webgl.M31] * v[webgl.M12] * v[webgl.M23] + v[webgl.M10] * v[webgl.M01] * v[webgl.M32] * v[webgl.M23] - v[webgl.M00] * v[webgl.M11] * v[webgl.M32] * v[webgl.M23]\n - v[webgl.M20] * v[webgl.M11] * v[webgl.M02] * v[webgl.M33] + v[webgl.M10] * v[webgl.M21] * v[webgl.M02] * v[webgl.M33] + v[webgl.M20] * v[webgl.M01] * v[webgl.M12] * v[webgl.M33]\n - v[webgl.M00] * v[webgl.M21] * v[webgl.M12] * v[webgl.M33] - v[webgl.M10] * v[webgl.M01] * v[webgl.M22] * v[webgl.M33] + v[webgl.M00] * v[webgl.M11] * v[webgl.M22] * v[webgl.M33];\n };\n Matrix4.prototype.translate = function (x, y, z) {\n var v = this.values;\n v[webgl.M03] += x;\n v[webgl.M13] += y;\n v[webgl.M23] += z;\n return this;\n };\n Matrix4.prototype.copy = function () {\n return new Matrix4().set(this.values);\n };\n Matrix4.prototype.projection = function (near, far, fovy, aspectRatio) {\n this.identity();\n var l_fd = (1.0 / Math.tan((fovy * (Math.PI / 180)) / 2.0));\n var l_a1 = (far + near) / (near - far);\n var l_a2 = (2 * far * near) / (near - far);\n var v = this.values;\n v[webgl.M00] = l_fd / aspectRatio;\n v[webgl.M10] = 0;\n v[webgl.M20] = 0;\n v[webgl.M30] = 0;\n v[webgl.M01] = 0;\n v[webgl.M11] = l_fd;\n v[webgl.M21] = 0;\n v[webgl.M31] = 0;\n v[webgl.M02] = 0;\n v[webgl.M12] = 0;\n v[webgl.M22] = l_a1;\n v[webgl.M32] = -1;\n v[webgl.M03] = 0;\n v[webgl.M13] = 0;\n v[webgl.M23] = l_a2;\n v[webgl.M33] = 0;\n return this;\n };\n Matrix4.prototype.ortho2d = function (x, y, width, height) {\n return this.ortho(x, x + width, y, y + height, 0, 1);\n };\n Matrix4.prototype.ortho = function (left, right, bottom, top, near, far) {\n this.identity();\n var x_orth = 2 / (right - left);\n var y_orth = 2 / (top - bottom);\n var z_orth = -2 / (far - near);\n var tx = -(right + left) / (right - left);\n var ty = -(top + bottom) / (top - bottom);\n var tz = -(far + near) / (far - near);\n var v = this.values;\n v[webgl.M00] = x_orth;\n v[webgl.M10] = 0;\n v[webgl.M20] = 0;\n v[webgl.M30] = 0;\n v[webgl.M01] = 0;\n v[webgl.M11] = y_orth;\n v[webgl.M21] = 0;\n v[webgl.M31] = 0;\n v[webgl.M02] = 0;\n v[webgl.M12] = 0;\n v[webgl.M22] = z_orth;\n v[webgl.M32] = 0;\n v[webgl.M03] = tx;\n v[webgl.M13] = ty;\n v[webgl.M23] = tz;\n v[webgl.M33] = 1;\n return this;\n };\n Matrix4.prototype.multiply = function (matrix) {\n var t = this.temp;\n var v = this.values;\n var m = matrix.values;\n t[webgl.M00] = v[webgl.M00] * m[webgl.M00] + v[webgl.M01] * m[webgl.M10] + v[webgl.M02] * m[webgl.M20] + v[webgl.M03] * m[webgl.M30];\n t[webgl.M01] = v[webgl.M00] * m[webgl.M01] + v[webgl.M01] * m[webgl.M11] + v[webgl.M02] * m[webgl.M21] + v[webgl.M03] * m[webgl.M31];\n t[webgl.M02] = v[webgl.M00] * m[webgl.M02] + v[webgl.M01] * m[webgl.M12] + v[webgl.M02] * m[webgl.M22] + v[webgl.M03] * m[webgl.M32];\n t[webgl.M03] = v[webgl.M00] * m[webgl.M03] + v[webgl.M01] * m[webgl.M13] + v[webgl.M02] * m[webgl.M23] + v[webgl.M03] * m[webgl.M33];\n t[webgl.M10] = v[webgl.M10] * m[webgl.M00] + v[webgl.M11] * m[webgl.M10] + v[webgl.M12] * m[webgl.M20] + v[webgl.M13] * m[webgl.M30];\n t[webgl.M11] = v[webgl.M10] * m[webgl.M01] + v[webgl.M11] * m[webgl.M11] + v[webgl.M12] * m[webgl.M21] + v[webgl.M13] * m[webgl.M31];\n t[webgl.M12] = v[webgl.M10] * m[webgl.M02] + v[webgl.M11] * m[webgl.M12] + v[webgl.M12] * m[webgl.M22] + v[webgl.M13] * m[webgl.M32];\n t[webgl.M13] = v[webgl.M10] * m[webgl.M03] + v[webgl.M11] * m[webgl.M13] + v[webgl.M12] * m[webgl.M23] + v[webgl.M13] * m[webgl.M33];\n t[webgl.M20] = v[webgl.M20] * m[webgl.M00] + v[webgl.M21] * m[webgl.M10] + v[webgl.M22] * m[webgl.M20] + v[webgl.M23] * m[webgl.M30];\n t[webgl.M21] = v[webgl.M20] * m[webgl.M01] + v[webgl.M21] * m[webgl.M11] + v[webgl.M22] * m[webgl.M21] + v[webgl.M23] * m[webgl.M31];\n t[webgl.M22] = v[webgl.M20] * m[webgl.M02] + v[webgl.M21] * m[webgl.M12] + v[webgl.M22] * m[webgl.M22] + v[webgl.M23] * m[webgl.M32];\n t[webgl.M23] = v[webgl.M20] * m[webgl.M03] + v[webgl.M21] * m[webgl.M13] + v[webgl.M22] * m[webgl.M23] + v[webgl.M23] * m[webgl.M33];\n t[webgl.M30] = v[webgl.M30] * m[webgl.M00] + v[webgl.M31] * m[webgl.M10] + v[webgl.M32] * m[webgl.M20] + v[webgl.M33] * m[webgl.M30];\n t[webgl.M31] = v[webgl.M30] * m[webgl.M01] + v[webgl.M31] * m[webgl.M11] + v[webgl.M32] * m[webgl.M21] + v[webgl.M33] * m[webgl.M31];\n t[webgl.M32] = v[webgl.M30] * m[webgl.M02] + v[webgl.M31] * m[webgl.M12] + v[webgl.M32] * m[webgl.M22] + v[webgl.M33] * m[webgl.M32];\n t[webgl.M33] = v[webgl.M30] * m[webgl.M03] + v[webgl.M31] * m[webgl.M13] + v[webgl.M32] * m[webgl.M23] + v[webgl.M33] * m[webgl.M33];\n return this.set(this.temp);\n };\n Matrix4.prototype.multiplyLeft = function (matrix) {\n var t = this.temp;\n var v = this.values;\n var m = matrix.values;\n t[webgl.M00] = m[webgl.M00] * v[webgl.M00] + m[webgl.M01] * v[webgl.M10] + m[webgl.M02] * v[webgl.M20] + m[webgl.M03] * v[webgl.M30];\n t[webgl.M01] = m[webgl.M00] * v[webgl.M01] + m[webgl.M01] * v[webgl.M11] + m[webgl.M02] * v[webgl.M21] + m[webgl.M03] * v[webgl.M31];\n t[webgl.M02] = m[webgl.M00] * v[webgl.M02] + m[webgl.M01] * v[webgl.M12] + m[webgl.M02] * v[webgl.M22] + m[webgl.M03] * v[webgl.M32];\n t[webgl.M03] = m[webgl.M00] * v[webgl.M03] + m[webgl.M01] * v[webgl.M13] + m[webgl.M02] * v[webgl.M23] + m[webgl.M03] * v[webgl.M33];\n t[webgl.M10] = m[webgl.M10] * v[webgl.M00] + m[webgl.M11] * v[webgl.M10] + m[webgl.M12] * v[webgl.M20] + m[webgl.M13] * v[webgl.M30];\n t[webgl.M11] = m[webgl.M10] * v[webgl.M01] + m[webgl.M11] * v[webgl.M11] + m[webgl.M12] * v[webgl.M21] + m[webgl.M13] * v[webgl.M31];\n t[webgl.M12] = m[webgl.M10] * v[webgl.M02] + m[webgl.M11] * v[webgl.M12] + m[webgl.M12] * v[webgl.M22] + m[webgl.M13] * v[webgl.M32];\n t[webgl.M13] = m[webgl.M10] * v[webgl.M03] + m[webgl.M11] * v[webgl.M13] + m[webgl.M12] * v[webgl.M23] + m[webgl.M13] * v[webgl.M33];\n t[webgl.M20] = m[webgl.M20] * v[webgl.M00] + m[webgl.M21] * v[webgl.M10] + m[webgl.M22] * v[webgl.M20] + m[webgl.M23] * v[webgl.M30];\n t[webgl.M21] = m[webgl.M20] * v[webgl.M01] + m[webgl.M21] * v[webgl.M11] + m[webgl.M22] * v[webgl.M21] + m[webgl.M23] * v[webgl.M31];\n t[webgl.M22] = m[webgl.M20] * v[webgl.M02] + m[webgl.M21] * v[webgl.M12] + m[webgl.M22] * v[webgl.M22] + m[webgl.M23] * v[webgl.M32];\n t[webgl.M23] = m[webgl.M20] * v[webgl.M03] + m[webgl.M21] * v[webgl.M13] + m[webgl.M22] * v[webgl.M23] + m[webgl.M23] * v[webgl.M33];\n t[webgl.M30] = m[webgl.M30] * v[webgl.M00] + m[webgl.M31] * v[webgl.M10] + m[webgl.M32] * v[webgl.M20] + m[webgl.M33] * v[webgl.M30];\n t[webgl.M31] = m[webgl.M30] * v[webgl.M01] + m[webgl.M31] * v[webgl.M11] + m[webgl.M32] * v[webgl.M21] + m[webgl.M33] * v[webgl.M31];\n t[webgl.M32] = m[webgl.M30] * v[webgl.M02] + m[webgl.M31] * v[webgl.M12] + m[webgl.M32] * v[webgl.M22] + m[webgl.M33] * v[webgl.M32];\n t[webgl.M33] = m[webgl.M30] * v[webgl.M03] + m[webgl.M31] * v[webgl.M13] + m[webgl.M32] * v[webgl.M23] + m[webgl.M33] * v[webgl.M33];\n return this.set(this.temp);\n };\n Matrix4.prototype.lookAt = function (position, direction, up) {\n Matrix4.initTemps();\n var xAxis = Matrix4.xAxis, yAxis = Matrix4.yAxis, zAxis = Matrix4.zAxis;\n zAxis.setFrom(direction).normalize();\n xAxis.setFrom(direction).normalize();\n xAxis.cross(up).normalize();\n yAxis.setFrom(xAxis).cross(zAxis).normalize();\n this.identity();\n var val = this.values;\n val[webgl.M00] = xAxis.x;\n val[webgl.M01] = xAxis.y;\n val[webgl.M02] = xAxis.z;\n val[webgl.M10] = yAxis.x;\n val[webgl.M11] = yAxis.y;\n val[webgl.M12] = yAxis.z;\n val[webgl.M20] = -zAxis.x;\n val[webgl.M21] = -zAxis.y;\n val[webgl.M22] = -zAxis.z;\n Matrix4.tmpMatrix.identity();\n Matrix4.tmpMatrix.values[webgl.M03] = -position.x;\n Matrix4.tmpMatrix.values[webgl.M13] = -position.y;\n Matrix4.tmpMatrix.values[webgl.M23] = -position.z;\n this.multiply(Matrix4.tmpMatrix);\n return this;\n };\n Matrix4.initTemps = function () {\n if (Matrix4.xAxis === null)\n Matrix4.xAxis = new webgl.Vector3();\n if (Matrix4.yAxis === null)\n Matrix4.yAxis = new webgl.Vector3();\n if (Matrix4.zAxis === null)\n Matrix4.zAxis = new webgl.Vector3();\n };\n Matrix4.xAxis = null;\n Matrix4.yAxis = null;\n Matrix4.zAxis = null;\n Matrix4.tmpMatrix = new Matrix4();\n return Matrix4;\n }());\n webgl.Matrix4 = Matrix4;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var Mesh = (function () {\n function Mesh(context, attributes, maxVertices, maxIndices) {\n this.attributes = attributes;\n this.verticesLength = 0;\n this.dirtyVertices = false;\n this.indicesLength = 0;\n this.dirtyIndices = false;\n this.elementsPerVertex = 0;\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\n this.elementsPerVertex = 0;\n for (var i = 0; i < attributes.length; i++) {\n this.elementsPerVertex += attributes[i].numElements;\n }\n this.vertices = new Float32Array(maxVertices * this.elementsPerVertex);\n this.indices = new Uint16Array(maxIndices);\n this.context.addRestorable(this);\n }\n Mesh.prototype.getAttributes = function () { return this.attributes; };\n Mesh.prototype.maxVertices = function () { return this.vertices.length / this.elementsPerVertex; };\n Mesh.prototype.numVertices = function () { return this.verticesLength / this.elementsPerVertex; };\n Mesh.prototype.setVerticesLength = function (length) {\n this.dirtyVertices = true;\n this.verticesLength = length;\n };\n Mesh.prototype.getVertices = function () { return this.vertices; };\n Mesh.prototype.maxIndices = function () { return this.indices.length; };\n Mesh.prototype.numIndices = function () { return this.indicesLength; };\n Mesh.prototype.setIndicesLength = function (length) {\n this.dirtyIndices = true;\n this.indicesLength = length;\n };\n Mesh.prototype.getIndices = function () { return this.indices; };\n ;\n Mesh.prototype.getVertexSizeInFloats = function () {\n var size = 0;\n for (var i = 0; i < this.attributes.length; i++) {\n var attribute = this.attributes[i];\n size += attribute.numElements;\n }\n return size;\n };\n Mesh.prototype.setVertices = function (vertices) {\n this.dirtyVertices = true;\n if (vertices.length > this.vertices.length)\n throw Error(\"Mesh can't store more than \" + this.maxVertices() + \" vertices\");\n this.vertices.set(vertices, 0);\n this.verticesLength = vertices.length;\n };\n Mesh.prototype.setIndices = function (indices) {\n this.dirtyIndices = true;\n if (indices.length > this.indices.length)\n throw Error(\"Mesh can't store more than \" + this.maxIndices() + \" indices\");\n this.indices.set(indices, 0);\n this.indicesLength = indices.length;\n };\n Mesh.prototype.draw = function (shader, primitiveType) {\n this.drawWithOffset(shader, primitiveType, 0, this.indicesLength > 0 ? this.indicesLength : this.verticesLength / this.elementsPerVertex);\n };\n Mesh.prototype.drawWithOffset = function (shader, primitiveType, offset, count) {\n var gl = this.context.gl;\n if (this.dirtyVertices || this.dirtyIndices)\n this.update();\n this.bind(shader);\n if (this.indicesLength > 0) {\n gl.drawElements(primitiveType, count, gl.UNSIGNED_SHORT, offset * 2);\n }\n else {\n gl.drawArrays(primitiveType, offset, count);\n }\n this.unbind(shader);\n };\n Mesh.prototype.bind = function (shader) {\n var gl = this.context.gl;\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\n var offset = 0;\n for (var i = 0; i < this.attributes.length; i++) {\n var attrib = this.attributes[i];\n var location_1 = shader.getAttributeLocation(attrib.name);\n gl.enableVertexAttribArray(location_1);\n gl.vertexAttribPointer(location_1, attrib.numElements, gl.FLOAT, false, this.elementsPerVertex * 4, offset * 4);\n offset += attrib.numElements;\n }\n if (this.indicesLength > 0)\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\n };\n Mesh.prototype.unbind = function (shader) {\n var gl = this.context.gl;\n for (var i = 0; i < this.attributes.length; i++) {\n var attrib = this.attributes[i];\n var location_2 = shader.getAttributeLocation(attrib.name);\n gl.disableVertexAttribArray(location_2);\n }\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\n if (this.indicesLength > 0)\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);\n };\n Mesh.prototype.update = function () {\n var gl = this.context.gl;\n if (this.dirtyVertices) {\n if (!this.verticesBuffer) {\n this.verticesBuffer = gl.createBuffer();\n }\n gl.bindBuffer(gl.ARRAY_BUFFER, this.verticesBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, this.vertices.subarray(0, this.verticesLength), gl.DYNAMIC_DRAW);\n this.dirtyVertices = false;\n }\n if (this.dirtyIndices) {\n if (!this.indicesBuffer) {\n this.indicesBuffer = gl.createBuffer();\n }\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, this.indices.subarray(0, this.indicesLength), gl.DYNAMIC_DRAW);\n this.dirtyIndices = false;\n }\n };\n Mesh.prototype.restore = function () {\n this.verticesBuffer = null;\n this.indicesBuffer = null;\n this.update();\n };\n Mesh.prototype.dispose = function () {\n this.context.removeRestorable(this);\n var gl = this.context.gl;\n gl.deleteBuffer(this.verticesBuffer);\n gl.deleteBuffer(this.indicesBuffer);\n };\n return Mesh;\n }());\n webgl.Mesh = Mesh;\n var VertexAttribute = (function () {\n function VertexAttribute(name, type, numElements) {\n this.name = name;\n this.type = type;\n this.numElements = numElements;\n }\n return VertexAttribute;\n }());\n webgl.VertexAttribute = VertexAttribute;\n var Position2Attribute = (function (_super) {\n __extends(Position2Attribute, _super);\n function Position2Attribute() {\n return _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 2) || this;\n }\n return Position2Attribute;\n }(VertexAttribute));\n webgl.Position2Attribute = Position2Attribute;\n var Position3Attribute = (function (_super) {\n __extends(Position3Attribute, _super);\n function Position3Attribute() {\n return _super.call(this, webgl.Shader.POSITION, VertexAttributeType.Float, 3) || this;\n }\n return Position3Attribute;\n }(VertexAttribute));\n webgl.Position3Attribute = Position3Attribute;\n var TexCoordAttribute = (function (_super) {\n __extends(TexCoordAttribute, _super);\n function TexCoordAttribute(unit) {\n if (unit === void 0) { unit = 0; }\n return _super.call(this, webgl.Shader.TEXCOORDS + (unit == 0 ? \"\" : unit), VertexAttributeType.Float, 2) || this;\n }\n return TexCoordAttribute;\n }(VertexAttribute));\n webgl.TexCoordAttribute = TexCoordAttribute;\n var ColorAttribute = (function (_super) {\n __extends(ColorAttribute, _super);\n function ColorAttribute() {\n return _super.call(this, webgl.Shader.COLOR, VertexAttributeType.Float, 4) || this;\n }\n return ColorAttribute;\n }(VertexAttribute));\n webgl.ColorAttribute = ColorAttribute;\n var Color2Attribute = (function (_super) {\n __extends(Color2Attribute, _super);\n function Color2Attribute() {\n return _super.call(this, webgl.Shader.COLOR2, VertexAttributeType.Float, 4) || this;\n }\n return Color2Attribute;\n }(VertexAttribute));\n webgl.Color2Attribute = Color2Attribute;\n var VertexAttributeType;\n (function (VertexAttributeType) {\n VertexAttributeType[VertexAttributeType[\"Float\"] = 0] = \"Float\";\n })(VertexAttributeType = webgl.VertexAttributeType || (webgl.VertexAttributeType = {}));\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var PolygonBatcher = (function () {\n function PolygonBatcher(context, twoColorTint, maxVertices) {\n if (twoColorTint === void 0) { twoColorTint = true; }\n if (maxVertices === void 0) { maxVertices = 10920; }\n this.isDrawing = false;\n this.shader = null;\n this.lastTexture = null;\n this.verticesLength = 0;\n this.indicesLength = 0;\n if (maxVertices > 10920)\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\n var attributes = twoColorTint ?\n [new webgl.Position2Attribute(), new webgl.ColorAttribute(), new webgl.TexCoordAttribute(), new webgl.Color2Attribute()] :\n [new webgl.Position2Attribute(), new webgl.ColorAttribute(), new webgl.TexCoordAttribute()];\n this.mesh = new webgl.Mesh(context, attributes, maxVertices, maxVertices * 3);\n this.srcBlend = this.context.gl.SRC_ALPHA;\n this.dstBlend = this.context.gl.ONE_MINUS_SRC_ALPHA;\n }\n PolygonBatcher.prototype.begin = function (shader) {\n var gl = this.context.gl;\n if (this.isDrawing)\n throw new Error(\"PolygonBatch is already drawing. Call PolygonBatch.end() before calling PolygonBatch.begin()\");\n this.drawCalls = 0;\n this.shader = shader;\n this.lastTexture = null;\n this.isDrawing = true;\n gl.enable(gl.BLEND);\n gl.blendFunc(this.srcBlend, this.dstBlend);\n };\n PolygonBatcher.prototype.setBlendMode = function (srcBlend, dstBlend) {\n var gl = this.context.gl;\n this.srcBlend = srcBlend;\n this.dstBlend = dstBlend;\n if (this.isDrawing) {\n this.flush();\n gl.blendFunc(this.srcBlend, this.dstBlend);\n }\n };\n PolygonBatcher.prototype.draw = function (texture, vertices, indices) {\n if (texture != this.lastTexture) {\n this.flush();\n this.lastTexture = texture;\n }\n else if (this.verticesLength + vertices.length > this.mesh.getVertices().length ||\n this.indicesLength + indices.length > this.mesh.getIndices().length) {\n this.flush();\n }\n var indexStart = this.mesh.numVertices();\n this.mesh.getVertices().set(vertices, this.verticesLength);\n this.verticesLength += vertices.length;\n this.mesh.setVerticesLength(this.verticesLength);\n var indicesArray = this.mesh.getIndices();\n for (var i = this.indicesLength, j = 0; j < indices.length; i++, j++)\n indicesArray[i] = indices[j] + indexStart;\n this.indicesLength += indices.length;\n this.mesh.setIndicesLength(this.indicesLength);\n };\n PolygonBatcher.prototype.flush = function () {\n var gl = this.context.gl;\n if (this.verticesLength == 0)\n return;\n this.lastTexture.bind();\n this.mesh.draw(this.shader, gl.TRIANGLES);\n this.verticesLength = 0;\n this.indicesLength = 0;\n this.mesh.setVerticesLength(0);\n this.mesh.setIndicesLength(0);\n this.drawCalls++;\n };\n PolygonBatcher.prototype.end = function () {\n var gl = this.context.gl;\n if (!this.isDrawing)\n throw new Error(\"PolygonBatch is not drawing. Call PolygonBatch.begin() before calling PolygonBatch.end()\");\n if (this.verticesLength > 0 || this.indicesLength > 0)\n this.flush();\n this.shader = null;\n this.lastTexture = null;\n this.isDrawing = false;\n gl.disable(gl.BLEND);\n };\n PolygonBatcher.prototype.getDrawCalls = function () { return this.drawCalls; };\n PolygonBatcher.prototype.dispose = function () {\n this.mesh.dispose();\n };\n return PolygonBatcher;\n }());\n webgl.PolygonBatcher = PolygonBatcher;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var SceneRenderer = (function () {\n function SceneRenderer(canvas, context, twoColorTint) {\n if (twoColorTint === void 0) { twoColorTint = true; }\n this.twoColorTint = false;\n this.activeRenderer = null;\n this.QUAD = [\n 0, 0, 1, 1, 1, 1, 0, 0,\n 0, 0, 1, 1, 1, 1, 0, 0,\n 0, 0, 1, 1, 1, 1, 0, 0,\n 0, 0, 1, 1, 1, 1, 0, 0,\n ];\n this.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\n this.WHITE = new spine.Color(1, 1, 1, 1);\n this.canvas = canvas;\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\n this.twoColorTint = twoColorTint;\n this.camera = new webgl.OrthoCamera(canvas.width, canvas.height);\n this.batcherShader = twoColorTint ? webgl.Shader.newTwoColoredTextured(this.context) : webgl.Shader.newColoredTextured(this.context);\n this.batcher = new webgl.PolygonBatcher(this.context, twoColorTint);\n this.shapesShader = webgl.Shader.newColored(this.context);\n this.shapes = new webgl.ShapeRenderer(this.context);\n this.skeletonRenderer = new webgl.SkeletonRenderer(this.context, twoColorTint);\n this.skeletonDebugRenderer = new webgl.SkeletonDebugRenderer(this.context);\n }\n SceneRenderer.prototype.begin = function () {\n this.camera.update();\n this.enableRenderer(this.batcher);\n };\n SceneRenderer.prototype.drawSkeleton = function (skeleton, premultipliedAlpha, slotRangeStart, slotRangeEnd) {\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\n if (slotRangeStart === void 0) { slotRangeStart = -1; }\n if (slotRangeEnd === void 0) { slotRangeEnd = -1; }\n this.enableRenderer(this.batcher);\n this.skeletonRenderer.premultipliedAlpha = premultipliedAlpha;\n this.skeletonRenderer.draw(this.batcher, skeleton, slotRangeStart, slotRangeEnd);\n };\n SceneRenderer.prototype.drawSkeletonDebug = function (skeleton, premultipliedAlpha, ignoredBones) {\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\n if (ignoredBones === void 0) { ignoredBones = null; }\n this.enableRenderer(this.shapes);\n this.skeletonDebugRenderer.premultipliedAlpha = premultipliedAlpha;\n this.skeletonDebugRenderer.draw(this.shapes, skeleton, ignoredBones);\n };\n SceneRenderer.prototype.drawTexture = function (texture, x, y, width, height, color) {\n if (color === void 0) { color = null; }\n this.enableRenderer(this.batcher);\n if (color === null)\n color = this.WHITE;\n var quad = this.QUAD;\n var i = 0;\n quad[i++] = x;\n quad[i++] = y;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = 0;\n quad[i++] = 1;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x + width;\n quad[i++] = y;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = 1;\n quad[i++] = 1;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x + width;\n quad[i++] = y + height;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = 1;\n quad[i++] = 0;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x;\n quad[i++] = y + height;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = 0;\n quad[i++] = 0;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\n };\n SceneRenderer.prototype.drawTextureUV = function (texture, x, y, width, height, u, v, u2, v2, color) {\n if (color === void 0) { color = null; }\n this.enableRenderer(this.batcher);\n if (color === null)\n color = this.WHITE;\n var quad = this.QUAD;\n var i = 0;\n quad[i++] = x;\n quad[i++] = y;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = u;\n quad[i++] = v;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x + width;\n quad[i++] = y;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = u2;\n quad[i++] = v;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x + width;\n quad[i++] = y + height;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = u2;\n quad[i++] = v2;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x;\n quad[i++] = y + height;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = u;\n quad[i++] = v2;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\n };\n SceneRenderer.prototype.drawTextureRotated = function (texture, x, y, width, height, pivotX, pivotY, angle, color, premultipliedAlpha) {\n if (color === void 0) { color = null; }\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\n this.enableRenderer(this.batcher);\n if (color === null)\n color = this.WHITE;\n var quad = this.QUAD;\n var worldOriginX = x + pivotX;\n var worldOriginY = y + pivotY;\n var fx = -pivotX;\n var fy = -pivotY;\n var fx2 = width - pivotX;\n var fy2 = height - pivotY;\n var p1x = fx;\n var p1y = fy;\n var p2x = fx;\n var p2y = fy2;\n var p3x = fx2;\n var p3y = fy2;\n var p4x = fx2;\n var p4y = fy;\n var x1 = 0;\n var y1 = 0;\n var x2 = 0;\n var y2 = 0;\n var x3 = 0;\n var y3 = 0;\n var x4 = 0;\n var y4 = 0;\n if (angle != 0) {\n var cos = spine.MathUtils.cosDeg(angle);\n var sin = spine.MathUtils.sinDeg(angle);\n x1 = cos * p1x - sin * p1y;\n y1 = sin * p1x + cos * p1y;\n x4 = cos * p2x - sin * p2y;\n y4 = sin * p2x + cos * p2y;\n x3 = cos * p3x - sin * p3y;\n y3 = sin * p3x + cos * p3y;\n x2 = x3 + (x1 - x4);\n y2 = y3 + (y1 - y4);\n }\n else {\n x1 = p1x;\n y1 = p1y;\n x4 = p2x;\n y4 = p2y;\n x3 = p3x;\n y3 = p3y;\n x2 = p4x;\n y2 = p4y;\n }\n x1 += worldOriginX;\n y1 += worldOriginY;\n x2 += worldOriginX;\n y2 += worldOriginY;\n x3 += worldOriginX;\n y3 += worldOriginY;\n x4 += worldOriginX;\n y4 += worldOriginY;\n var i = 0;\n quad[i++] = x1;\n quad[i++] = y1;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = 0;\n quad[i++] = 1;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x2;\n quad[i++] = y2;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = 1;\n quad[i++] = 1;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x3;\n quad[i++] = y3;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = 1;\n quad[i++] = 0;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x4;\n quad[i++] = y4;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = 0;\n quad[i++] = 0;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n this.batcher.draw(texture, quad, this.QUAD_TRIANGLES);\n };\n SceneRenderer.prototype.drawRegion = function (region, x, y, width, height, color, premultipliedAlpha) {\n if (color === void 0) { color = null; }\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\n this.enableRenderer(this.batcher);\n if (color === null)\n color = this.WHITE;\n var quad = this.QUAD;\n var i = 0;\n quad[i++] = x;\n quad[i++] = y;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = region.u;\n quad[i++] = region.v2;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x + width;\n quad[i++] = y;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = region.u2;\n quad[i++] = region.v2;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x + width;\n quad[i++] = y + height;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = region.u2;\n quad[i++] = region.v;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n quad[i++] = x;\n quad[i++] = y + height;\n quad[i++] = color.r;\n quad[i++] = color.g;\n quad[i++] = color.b;\n quad[i++] = color.a;\n quad[i++] = region.u;\n quad[i++] = region.v;\n if (this.twoColorTint) {\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n quad[i++] = 0;\n }\n this.batcher.draw(region.texture, quad, this.QUAD_TRIANGLES);\n };\n SceneRenderer.prototype.line = function (x, y, x2, y2, color, color2) {\n if (color === void 0) { color = null; }\n if (color2 === void 0) { color2 = null; }\n this.enableRenderer(this.shapes);\n this.shapes.line(x, y, x2, y2, color);\n };\n SceneRenderer.prototype.triangle = function (filled, x, y, x2, y2, x3, y3, color, color2, color3) {\n if (color === void 0) { color = null; }\n if (color2 === void 0) { color2 = null; }\n if (color3 === void 0) { color3 = null; }\n this.enableRenderer(this.shapes);\n this.shapes.triangle(filled, x, y, x2, y2, x3, y3, color, color2, color3);\n };\n SceneRenderer.prototype.quad = function (filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\n if (color === void 0) { color = null; }\n if (color2 === void 0) { color2 = null; }\n if (color3 === void 0) { color3 = null; }\n if (color4 === void 0) { color4 = null; }\n this.enableRenderer(this.shapes);\n this.shapes.quad(filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4);\n };\n SceneRenderer.prototype.rect = function (filled, x, y, width, height, color) {\n if (color === void 0) { color = null; }\n this.enableRenderer(this.shapes);\n this.shapes.rect(filled, x, y, width, height, color);\n };\n SceneRenderer.prototype.rectLine = function (filled, x1, y1, x2, y2, width, color) {\n if (color === void 0) { color = null; }\n this.enableRenderer(this.shapes);\n this.shapes.rectLine(filled, x1, y1, x2, y2, width, color);\n };\n SceneRenderer.prototype.polygon = function (polygonVertices, offset, count, color) {\n if (color === void 0) { color = null; }\n this.enableRenderer(this.shapes);\n this.shapes.polygon(polygonVertices, offset, count, color);\n };\n SceneRenderer.prototype.circle = function (filled, x, y, radius, color, segments) {\n if (color === void 0) { color = null; }\n if (segments === void 0) { segments = 0; }\n this.enableRenderer(this.shapes);\n this.shapes.circle(filled, x, y, radius, color, segments);\n };\n SceneRenderer.prototype.curve = function (x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\n if (color === void 0) { color = null; }\n this.enableRenderer(this.shapes);\n this.shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color);\n };\n SceneRenderer.prototype.end = function () {\n if (this.activeRenderer === this.batcher)\n this.batcher.end();\n else if (this.activeRenderer === this.shapes)\n this.shapes.end();\n this.activeRenderer = null;\n };\n SceneRenderer.prototype.resize = function (resizeMode) {\n var canvas = this.canvas;\n var w = canvas.clientWidth;\n var h = canvas.clientHeight;\n if (canvas.width != w || canvas.height != h) {\n canvas.width = w;\n canvas.height = h;\n }\n this.context.gl.viewport(0, 0, canvas.width, canvas.height);\n if (resizeMode === ResizeMode.Stretch) {\n }\n else if (resizeMode === ResizeMode.Expand) {\n this.camera.setViewport(w, h);\n }\n else if (resizeMode === ResizeMode.Fit) {\n var sourceWidth = canvas.width, sourceHeight = canvas.height;\n var targetWidth = this.camera.viewportWidth, targetHeight = this.camera.viewportHeight;\n var targetRatio = targetHeight / targetWidth;\n var sourceRatio = sourceHeight / sourceWidth;\n var scale = targetRatio < sourceRatio ? targetWidth / sourceWidth : targetHeight / sourceHeight;\n this.camera.viewportWidth = sourceWidth * scale;\n this.camera.viewportHeight = sourceHeight * scale;\n }\n this.camera.update();\n };\n SceneRenderer.prototype.enableRenderer = function (renderer) {\n if (this.activeRenderer === renderer)\n return;\n this.end();\n if (renderer instanceof webgl.PolygonBatcher) {\n this.batcherShader.bind();\n this.batcherShader.setUniform4x4f(webgl.Shader.MVP_MATRIX, this.camera.projectionView.values);\n this.batcherShader.setUniformi(\"u_texture\", 0);\n this.batcher.begin(this.batcherShader);\n this.activeRenderer = this.batcher;\n }\n else if (renderer instanceof webgl.ShapeRenderer) {\n this.shapesShader.bind();\n this.shapesShader.setUniform4x4f(webgl.Shader.MVP_MATRIX, this.camera.projectionView.values);\n this.shapes.begin(this.shapesShader);\n this.activeRenderer = this.shapes;\n }\n else {\n this.activeRenderer = this.skeletonDebugRenderer;\n }\n };\n SceneRenderer.prototype.dispose = function () {\n this.batcher.dispose();\n this.batcherShader.dispose();\n this.shapes.dispose();\n this.shapesShader.dispose();\n this.skeletonDebugRenderer.dispose();\n };\n return SceneRenderer;\n }());\n webgl.SceneRenderer = SceneRenderer;\n var ResizeMode;\n (function (ResizeMode) {\n ResizeMode[ResizeMode[\"Stretch\"] = 0] = \"Stretch\";\n ResizeMode[ResizeMode[\"Expand\"] = 1] = \"Expand\";\n ResizeMode[ResizeMode[\"Fit\"] = 2] = \"Fit\";\n })(ResizeMode = webgl.ResizeMode || (webgl.ResizeMode = {}));\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var Shader = (function () {\n function Shader(context, vertexShader, fragmentShader) {\n this.vertexShader = vertexShader;\n this.fragmentShader = fragmentShader;\n this.vs = null;\n this.fs = null;\n this.program = null;\n this.tmp2x2 = new Float32Array(2 * 2);\n this.tmp3x3 = new Float32Array(3 * 3);\n this.tmp4x4 = new Float32Array(4 * 4);\n this.vsSource = vertexShader;\n this.fsSource = fragmentShader;\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\n this.context.addRestorable(this);\n this.compile();\n }\n Shader.prototype.getProgram = function () { return this.program; };\n Shader.prototype.getVertexShader = function () { return this.vertexShader; };\n Shader.prototype.getFragmentShader = function () { return this.fragmentShader; };\n Shader.prototype.getVertexShaderSource = function () { return this.vsSource; };\n Shader.prototype.getFragmentSource = function () { return this.fsSource; };\n Shader.prototype.compile = function () {\n var gl = this.context.gl;\n try {\n this.vs = this.compileShader(gl.VERTEX_SHADER, this.vertexShader);\n this.fs = this.compileShader(gl.FRAGMENT_SHADER, this.fragmentShader);\n this.program = this.compileProgram(this.vs, this.fs);\n }\n catch (e) {\n this.dispose();\n throw e;\n }\n };\n Shader.prototype.compileShader = function (type, source) {\n var gl = this.context.gl;\n var shader = gl.createShader(type);\n gl.shaderSource(shader, source);\n gl.compileShader(shader);\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n var error = \"Couldn't compile shader: \" + gl.getShaderInfoLog(shader);\n gl.deleteShader(shader);\n if (!gl.isContextLost())\n throw new Error(error);\n }\n return shader;\n };\n Shader.prototype.compileProgram = function (vs, fs) {\n var gl = this.context.gl;\n var program = gl.createProgram();\n gl.attachShader(program, vs);\n gl.attachShader(program, fs);\n gl.linkProgram(program);\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n var error = \"Couldn't compile shader program: \" + gl.getProgramInfoLog(program);\n gl.deleteProgram(program);\n if (!gl.isContextLost())\n throw new Error(error);\n }\n return program;\n };\n Shader.prototype.restore = function () {\n this.compile();\n };\n Shader.prototype.bind = function () {\n this.context.gl.useProgram(this.program);\n };\n Shader.prototype.unbind = function () {\n this.context.gl.useProgram(null);\n };\n Shader.prototype.setUniformi = function (uniform, value) {\n this.context.gl.uniform1i(this.getUniformLocation(uniform), value);\n };\n Shader.prototype.setUniformf = function (uniform, value) {\n this.context.gl.uniform1f(this.getUniformLocation(uniform), value);\n };\n Shader.prototype.setUniform2f = function (uniform, value, value2) {\n this.context.gl.uniform2f(this.getUniformLocation(uniform), value, value2);\n };\n Shader.prototype.setUniform3f = function (uniform, value, value2, value3) {\n this.context.gl.uniform3f(this.getUniformLocation(uniform), value, value2, value3);\n };\n Shader.prototype.setUniform4f = function (uniform, value, value2, value3, value4) {\n this.context.gl.uniform4f(this.getUniformLocation(uniform), value, value2, value3, value4);\n };\n Shader.prototype.setUniform2x2f = function (uniform, value) {\n var gl = this.context.gl;\n this.tmp2x2.set(value);\n gl.uniformMatrix2fv(this.getUniformLocation(uniform), false, this.tmp2x2);\n };\n Shader.prototype.setUniform3x3f = function (uniform, value) {\n var gl = this.context.gl;\n this.tmp3x3.set(value);\n gl.uniformMatrix3fv(this.getUniformLocation(uniform), false, this.tmp3x3);\n };\n Shader.prototype.setUniform4x4f = function (uniform, value) {\n var gl = this.context.gl;\n this.tmp4x4.set(value);\n gl.uniformMatrix4fv(this.getUniformLocation(uniform), false, this.tmp4x4);\n };\n Shader.prototype.getUniformLocation = function (uniform) {\n var gl = this.context.gl;\n var location = gl.getUniformLocation(this.program, uniform);\n if (!location && !gl.isContextLost())\n throw new Error(\"Couldn't find location for uniform \" + uniform);\n return location;\n };\n Shader.prototype.getAttributeLocation = function (attribute) {\n var gl = this.context.gl;\n var location = gl.getAttribLocation(this.program, attribute);\n if (location == -1 && !gl.isContextLost())\n throw new Error(\"Couldn't find location for attribute \" + attribute);\n return location;\n };\n Shader.prototype.dispose = function () {\n this.context.removeRestorable(this);\n var gl = this.context.gl;\n if (this.vs) {\n gl.deleteShader(this.vs);\n this.vs = null;\n }\n if (this.fs) {\n gl.deleteShader(this.fs);\n this.fs = null;\n }\n if (this.program) {\n gl.deleteProgram(this.program);\n this.program = null;\n }\n };\n Shader.newColoredTextured = function (context) {\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \" + Shader.POSITION + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR + \";\\n\\t\\t\\t\\tattribute vec2 \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\tuniform mat4 \" + Shader.MVP_MATRIX + \";\\n\\t\\t\\t\\tvarying vec4 v_color;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_color = \" + Shader.COLOR + \";\\n\\t\\t\\t\\t\\tv_texCoords = \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\t\\tgl_Position = \" + Shader.MVP_MATRIX + \" * \" + Shader.POSITION + \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_color;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\t\\t\\t\\tuniform sampler2D u_texture;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tgl_FragColor = v_color * texture2D(u_texture, v_texCoords);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\n return new Shader(context, vs, fs);\n };\n Shader.newTwoColoredTextured = function (context) {\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \" + Shader.POSITION + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR2 + \";\\n\\t\\t\\t\\tattribute vec2 \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\tuniform mat4 \" + Shader.MVP_MATRIX + \";\\n\\t\\t\\t\\tvarying vec4 v_light;\\n\\t\\t\\t\\tvarying vec4 v_dark;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_light = \" + Shader.COLOR + \";\\n\\t\\t\\t\\t\\tv_dark = \" + Shader.COLOR2 + \";\\n\\t\\t\\t\\t\\tv_texCoords = \" + Shader.TEXCOORDS + \";\\n\\t\\t\\t\\t\\tgl_Position = \" + Shader.MVP_MATRIX + \" * \" + Shader.POSITION + \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_light;\\n\\t\\t\\t\\tvarying LOWP vec4 v_dark;\\n\\t\\t\\t\\tvarying vec2 v_texCoords;\\n\\t\\t\\t\\tuniform sampler2D u_texture;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tvec4 texColor = texture2D(u_texture, v_texCoords);\\n\\t\\t\\t\\t\\tgl_FragColor.a = texColor.a * v_light.a;\\n\\t\\t\\t\\t\\tgl_FragColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\n return new Shader(context, vs, fs);\n };\n Shader.newColored = function (context) {\n var vs = \"\\n\\t\\t\\t\\tattribute vec4 \" + Shader.POSITION + \";\\n\\t\\t\\t\\tattribute vec4 \" + Shader.COLOR + \";\\n\\t\\t\\t\\tuniform mat4 \" + Shader.MVP_MATRIX + \";\\n\\t\\t\\t\\tvarying vec4 v_color;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tv_color = \" + Shader.COLOR + \";\\n\\t\\t\\t\\t\\tgl_Position = \" + Shader.MVP_MATRIX + \" * \" + Shader.POSITION + \";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\n var fs = \"\\n\\t\\t\\t\\t#ifdef GL_ES\\n\\t\\t\\t\\t\\t#define LOWP lowp\\n\\t\\t\\t\\t\\tprecision mediump float;\\n\\t\\t\\t\\t#else\\n\\t\\t\\t\\t\\t#define LOWP\\n\\t\\t\\t\\t#endif\\n\\t\\t\\t\\tvarying LOWP vec4 v_color;\\n\\n\\t\\t\\t\\tvoid main () {\\n\\t\\t\\t\\t\\tgl_FragColor = v_color;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\";\n return new Shader(context, vs, fs);\n };\n Shader.MVP_MATRIX = \"u_projTrans\";\n Shader.POSITION = \"a_position\";\n Shader.COLOR = \"a_color\";\n Shader.COLOR2 = \"a_color2\";\n Shader.TEXCOORDS = \"a_texCoords\";\n Shader.SAMPLER = \"u_texture\";\n return Shader;\n }());\n webgl.Shader = Shader;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var ShapeRenderer = (function () {\n function ShapeRenderer(context, maxVertices) {\n if (maxVertices === void 0) { maxVertices = 10920; }\n this.isDrawing = false;\n this.shapeType = ShapeType.Filled;\n this.color = new spine.Color(1, 1, 1, 1);\n this.vertexIndex = 0;\n this.tmp = new spine.Vector2();\n if (maxVertices > 10920)\n throw new Error(\"Can't have more than 10920 triangles per batch: \" + maxVertices);\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\n this.mesh = new webgl.Mesh(context, [new webgl.Position2Attribute(), new webgl.ColorAttribute()], maxVertices, 0);\n this.srcBlend = this.context.gl.SRC_ALPHA;\n this.dstBlend = this.context.gl.ONE_MINUS_SRC_ALPHA;\n }\n ShapeRenderer.prototype.begin = function (shader) {\n if (this.isDrawing)\n throw new Error(\"ShapeRenderer.begin() has already been called\");\n this.shader = shader;\n this.vertexIndex = 0;\n this.isDrawing = true;\n var gl = this.context.gl;\n gl.enable(gl.BLEND);\n gl.blendFunc(this.srcBlend, this.dstBlend);\n };\n ShapeRenderer.prototype.setBlendMode = function (srcBlend, dstBlend) {\n var gl = this.context.gl;\n this.srcBlend = srcBlend;\n this.dstBlend = dstBlend;\n if (this.isDrawing) {\n this.flush();\n gl.blendFunc(this.srcBlend, this.dstBlend);\n }\n };\n ShapeRenderer.prototype.setColor = function (color) {\n this.color.setFromColor(color);\n };\n ShapeRenderer.prototype.setColorWith = function (r, g, b, a) {\n this.color.set(r, g, b, a);\n };\n ShapeRenderer.prototype.point = function (x, y, color) {\n if (color === void 0) { color = null; }\n this.check(ShapeType.Point, 1);\n if (color === null)\n color = this.color;\n this.vertex(x, y, color);\n };\n ShapeRenderer.prototype.line = function (x, y, x2, y2, color) {\n if (color === void 0) { color = null; }\n this.check(ShapeType.Line, 2);\n var vertices = this.mesh.getVertices();\n var idx = this.vertexIndex;\n if (color === null)\n color = this.color;\n this.vertex(x, y, color);\n this.vertex(x2, y2, color);\n };\n ShapeRenderer.prototype.triangle = function (filled, x, y, x2, y2, x3, y3, color, color2, color3) {\n if (color === void 0) { color = null; }\n if (color2 === void 0) { color2 = null; }\n if (color3 === void 0) { color3 = null; }\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\n var vertices = this.mesh.getVertices();\n var idx = this.vertexIndex;\n if (color === null)\n color = this.color;\n if (color2 === null)\n color2 = this.color;\n if (color3 === null)\n color3 = this.color;\n if (filled) {\n this.vertex(x, y, color);\n this.vertex(x2, y2, color2);\n this.vertex(x3, y3, color3);\n }\n else {\n this.vertex(x, y, color);\n this.vertex(x2, y2, color2);\n this.vertex(x2, y2, color);\n this.vertex(x3, y3, color2);\n this.vertex(x3, y3, color);\n this.vertex(x, y, color2);\n }\n };\n ShapeRenderer.prototype.quad = function (filled, x, y, x2, y2, x3, y3, x4, y4, color, color2, color3, color4) {\n if (color === void 0) { color = null; }\n if (color2 === void 0) { color2 = null; }\n if (color3 === void 0) { color3 = null; }\n if (color4 === void 0) { color4 = null; }\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 3);\n var vertices = this.mesh.getVertices();\n var idx = this.vertexIndex;\n if (color === null)\n color = this.color;\n if (color2 === null)\n color2 = this.color;\n if (color3 === null)\n color3 = this.color;\n if (color4 === null)\n color4 = this.color;\n if (filled) {\n this.vertex(x, y, color);\n this.vertex(x2, y2, color2);\n this.vertex(x3, y3, color3);\n this.vertex(x3, y3, color3);\n this.vertex(x4, y4, color4);\n this.vertex(x, y, color);\n }\n else {\n this.vertex(x, y, color);\n this.vertex(x2, y2, color2);\n this.vertex(x2, y2, color2);\n this.vertex(x3, y3, color3);\n this.vertex(x3, y3, color3);\n this.vertex(x4, y4, color4);\n this.vertex(x4, y4, color4);\n this.vertex(x, y, color);\n }\n };\n ShapeRenderer.prototype.rect = function (filled, x, y, width, height, color) {\n if (color === void 0) { color = null; }\n this.quad(filled, x, y, x + width, y, x + width, y + height, x, y + height, color, color, color, color);\n };\n ShapeRenderer.prototype.rectLine = function (filled, x1, y1, x2, y2, width, color) {\n if (color === void 0) { color = null; }\n this.check(filled ? ShapeType.Filled : ShapeType.Line, 8);\n if (color === null)\n color = this.color;\n var t = this.tmp.set(y2 - y1, x1 - x2);\n t.normalize();\n width *= 0.5;\n var tx = t.x * width;\n var ty = t.y * width;\n if (!filled) {\n this.vertex(x1 + tx, y1 + ty, color);\n this.vertex(x1 - tx, y1 - ty, color);\n this.vertex(x2 + tx, y2 + ty, color);\n this.vertex(x2 - tx, y2 - ty, color);\n this.vertex(x2 + tx, y2 + ty, color);\n this.vertex(x1 + tx, y1 + ty, color);\n this.vertex(x2 - tx, y2 - ty, color);\n this.vertex(x1 - tx, y1 - ty, color);\n }\n else {\n this.vertex(x1 + tx, y1 + ty, color);\n this.vertex(x1 - tx, y1 - ty, color);\n this.vertex(x2 + tx, y2 + ty, color);\n this.vertex(x2 - tx, y2 - ty, color);\n this.vertex(x2 + tx, y2 + ty, color);\n this.vertex(x1 - tx, y1 - ty, color);\n }\n };\n ShapeRenderer.prototype.x = function (x, y, size) {\n this.line(x - size, y - size, x + size, y + size);\n this.line(x - size, y + size, x + size, y - size);\n };\n ShapeRenderer.prototype.polygon = function (polygonVertices, offset, count, color) {\n if (color === void 0) { color = null; }\n if (count < 3)\n throw new Error(\"Polygon must contain at least 3 vertices\");\n this.check(ShapeType.Line, count * 2);\n if (color === null)\n color = this.color;\n var vertices = this.mesh.getVertices();\n var idx = this.vertexIndex;\n offset <<= 1;\n count <<= 1;\n var firstX = polygonVertices[offset];\n var firstY = polygonVertices[offset + 1];\n var last = offset + count;\n for (var i = offset, n = offset + count - 2; i < n; i += 2) {\n var x1 = polygonVertices[i];\n var y1 = polygonVertices[i + 1];\n var x2 = 0;\n var y2 = 0;\n if (i + 2 >= last) {\n x2 = firstX;\n y2 = firstY;\n }\n else {\n x2 = polygonVertices[i + 2];\n y2 = polygonVertices[i + 3];\n }\n this.vertex(x1, y1, color);\n this.vertex(x2, y2, color);\n }\n };\n ShapeRenderer.prototype.circle = function (filled, x, y, radius, color, segments) {\n if (color === void 0) { color = null; }\n if (segments === void 0) { segments = 0; }\n if (segments === 0)\n segments = Math.max(1, (6 * spine.MathUtils.cbrt(radius)) | 0);\n if (segments <= 0)\n throw new Error(\"segments must be > 0.\");\n if (color === null)\n color = this.color;\n var angle = 2 * spine.MathUtils.PI / segments;\n var cos = Math.cos(angle);\n var sin = Math.sin(angle);\n var cx = radius, cy = 0;\n if (!filled) {\n this.check(ShapeType.Line, segments * 2 + 2);\n for (var i = 0; i < segments; i++) {\n this.vertex(x + cx, y + cy, color);\n var temp_1 = cx;\n cx = cos * cx - sin * cy;\n cy = sin * temp_1 + cos * cy;\n this.vertex(x + cx, y + cy, color);\n }\n this.vertex(x + cx, y + cy, color);\n }\n else {\n this.check(ShapeType.Filled, segments * 3 + 3);\n segments--;\n for (var i = 0; i < segments; i++) {\n this.vertex(x, y, color);\n this.vertex(x + cx, y + cy, color);\n var temp_2 = cx;\n cx = cos * cx - sin * cy;\n cy = sin * temp_2 + cos * cy;\n this.vertex(x + cx, y + cy, color);\n }\n this.vertex(x, y, color);\n this.vertex(x + cx, y + cy, color);\n }\n var temp = cx;\n cx = radius;\n cy = 0;\n this.vertex(x + cx, y + cy, color);\n };\n ShapeRenderer.prototype.curve = function (x1, y1, cx1, cy1, cx2, cy2, x2, y2, segments, color) {\n if (color === void 0) { color = null; }\n this.check(ShapeType.Line, segments * 2 + 2);\n if (color === null)\n color = this.color;\n var subdiv_step = 1 / segments;\n var subdiv_step2 = subdiv_step * subdiv_step;\n var subdiv_step3 = subdiv_step * subdiv_step * subdiv_step;\n var pre1 = 3 * subdiv_step;\n var pre2 = 3 * subdiv_step2;\n var pre4 = 6 * subdiv_step2;\n var pre5 = 6 * subdiv_step3;\n var tmp1x = x1 - cx1 * 2 + cx2;\n var tmp1y = y1 - cy1 * 2 + cy2;\n var tmp2x = (cx1 - cx2) * 3 - x1 + x2;\n var tmp2y = (cy1 - cy2) * 3 - y1 + y2;\n var fx = x1;\n var fy = y1;\n var dfx = (cx1 - x1) * pre1 + tmp1x * pre2 + tmp2x * subdiv_step3;\n var dfy = (cy1 - y1) * pre1 + tmp1y * pre2 + tmp2y * subdiv_step3;\n var ddfx = tmp1x * pre4 + tmp2x * pre5;\n var ddfy = tmp1y * pre4 + tmp2y * pre5;\n var dddfx = tmp2x * pre5;\n var dddfy = tmp2y * pre5;\n while (segments-- > 0) {\n this.vertex(fx, fy, color);\n fx += dfx;\n fy += dfy;\n dfx += ddfx;\n dfy += ddfy;\n ddfx += dddfx;\n ddfy += dddfy;\n this.vertex(fx, fy, color);\n }\n this.vertex(fx, fy, color);\n this.vertex(x2, y2, color);\n };\n ShapeRenderer.prototype.vertex = function (x, y, color) {\n var idx = this.vertexIndex;\n var vertices = this.mesh.getVertices();\n vertices[idx++] = x;\n vertices[idx++] = y;\n vertices[idx++] = color.r;\n vertices[idx++] = color.g;\n vertices[idx++] = color.b;\n vertices[idx++] = color.a;\n this.vertexIndex = idx;\n };\n ShapeRenderer.prototype.end = function () {\n if (!this.isDrawing)\n throw new Error(\"ShapeRenderer.begin() has not been called\");\n this.flush();\n this.context.gl.disable(this.context.gl.BLEND);\n this.isDrawing = false;\n };\n ShapeRenderer.prototype.flush = function () {\n if (this.vertexIndex == 0)\n return;\n this.mesh.setVerticesLength(this.vertexIndex);\n this.mesh.draw(this.shader, this.shapeType);\n this.vertexIndex = 0;\n };\n ShapeRenderer.prototype.check = function (shapeType, numVertices) {\n if (!this.isDrawing)\n throw new Error(\"ShapeRenderer.begin() has not been called\");\n if (this.shapeType == shapeType) {\n if (this.mesh.maxVertices() - this.mesh.numVertices() < numVertices)\n this.flush();\n else\n return;\n }\n else {\n this.flush();\n this.shapeType = shapeType;\n }\n };\n ShapeRenderer.prototype.dispose = function () {\n this.mesh.dispose();\n };\n return ShapeRenderer;\n }());\n webgl.ShapeRenderer = ShapeRenderer;\n var ShapeType;\n (function (ShapeType) {\n ShapeType[ShapeType[\"Point\"] = 0] = \"Point\";\n ShapeType[ShapeType[\"Line\"] = 1] = \"Line\";\n ShapeType[ShapeType[\"Filled\"] = 4] = \"Filled\";\n })(ShapeType = webgl.ShapeType || (webgl.ShapeType = {}));\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var SkeletonDebugRenderer = (function () {\n function SkeletonDebugRenderer(context) {\n this.boneLineColor = new spine.Color(1, 0, 0, 1);\n this.boneOriginColor = new spine.Color(0, 1, 0, 1);\n this.attachmentLineColor = new spine.Color(0, 0, 1, 0.5);\n this.triangleLineColor = new spine.Color(1, 0.64, 0, 0.5);\n this.pathColor = new spine.Color().setFromString(\"FF7F00\");\n this.clipColor = new spine.Color(0.8, 0, 0, 2);\n this.aabbColor = new spine.Color(0, 1, 0, 0.5);\n this.drawBones = true;\n this.drawRegionAttachments = true;\n this.drawBoundingBoxes = true;\n this.drawMeshHull = true;\n this.drawMeshTriangles = true;\n this.drawPaths = true;\n this.drawSkeletonXY = false;\n this.drawClipping = true;\n this.premultipliedAlpha = false;\n this.scale = 1;\n this.boneWidth = 2;\n this.bounds = new spine.SkeletonBounds();\n this.temp = new Array();\n this.vertices = spine.Utils.newFloatArray(2 * 1024);\n this.context = context instanceof webgl.ManagedWebGLRenderingContext ? context : new webgl.ManagedWebGLRenderingContext(context);\n }\n SkeletonDebugRenderer.prototype.draw = function (shapes, skeleton, ignoredBones) {\n if (ignoredBones === void 0) { ignoredBones = null; }\n var skeletonX = skeleton.x;\n var skeletonY = skeleton.y;\n var gl = this.context.gl;\n var srcFunc = this.premultipliedAlpha ? gl.ONE : gl.SRC_ALPHA;\n shapes.setBlendMode(srcFunc, gl.ONE_MINUS_SRC_ALPHA);\n var bones = skeleton.bones;\n if (this.drawBones) {\n shapes.setColor(this.boneLineColor);\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\n continue;\n if (bone.parent == null)\n continue;\n var x = skeletonX + bone.data.length * bone.a + bone.worldX;\n var y = skeletonY + bone.data.length * bone.c + bone.worldY;\n shapes.rectLine(true, skeletonX + bone.worldX, skeletonY + bone.worldY, x, y, this.boneWidth * this.scale);\n }\n if (this.drawSkeletonXY)\n shapes.x(skeletonX, skeletonY, 4 * this.scale);\n }\n if (this.drawRegionAttachments) {\n shapes.setColor(this.attachmentLineColor);\n var slots = skeleton.slots;\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n var attachment = slot.getAttachment();\n if (attachment instanceof spine.RegionAttachment) {\n var regionAttachment = attachment;\n var vertices = this.vertices;\n regionAttachment.computeWorldVertices(slot.bone, vertices, 0, 2);\n shapes.line(vertices[0], vertices[1], vertices[2], vertices[3]);\n shapes.line(vertices[2], vertices[3], vertices[4], vertices[5]);\n shapes.line(vertices[4], vertices[5], vertices[6], vertices[7]);\n shapes.line(vertices[6], vertices[7], vertices[0], vertices[1]);\n }\n }\n }\n if (this.drawMeshHull || this.drawMeshTriangles) {\n var slots = skeleton.slots;\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n if (!slot.bone.active)\n continue;\n var attachment = slot.getAttachment();\n if (!(attachment instanceof spine.MeshAttachment))\n continue;\n var mesh = attachment;\n var vertices = this.vertices;\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, vertices, 0, 2);\n var triangles = mesh.triangles;\n var hullLength = mesh.hullLength;\n if (this.drawMeshTriangles) {\n shapes.setColor(this.triangleLineColor);\n for (var ii = 0, nn = triangles.length; ii < nn; ii += 3) {\n var v1 = triangles[ii] * 2, v2 = triangles[ii + 1] * 2, v3 = triangles[ii + 2] * 2;\n shapes.triangle(false, vertices[v1], vertices[v1 + 1], vertices[v2], vertices[v2 + 1], vertices[v3], vertices[v3 + 1]);\n }\n }\n if (this.drawMeshHull && hullLength > 0) {\n shapes.setColor(this.attachmentLineColor);\n hullLength = (hullLength >> 1) * 2;\n var lastX = vertices[hullLength - 2], lastY = vertices[hullLength - 1];\n for (var ii = 0, nn = hullLength; ii < nn; ii += 2) {\n var x = vertices[ii], y = vertices[ii + 1];\n shapes.line(x, y, lastX, lastY);\n lastX = x;\n lastY = y;\n }\n }\n }\n }\n if (this.drawBoundingBoxes) {\n var bounds = this.bounds;\n bounds.update(skeleton, true);\n shapes.setColor(this.aabbColor);\n shapes.rect(false, bounds.minX, bounds.minY, bounds.getWidth(), bounds.getHeight());\n var polygons = bounds.polygons;\n var boxes = bounds.boundingBoxes;\n for (var i = 0, n = polygons.length; i < n; i++) {\n var polygon = polygons[i];\n shapes.setColor(boxes[i].color);\n shapes.polygon(polygon, 0, polygon.length);\n }\n }\n if (this.drawPaths) {\n var slots = skeleton.slots;\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n if (!slot.bone.active)\n continue;\n var attachment = slot.getAttachment();\n if (!(attachment instanceof spine.PathAttachment))\n continue;\n var path = attachment;\n var nn = path.worldVerticesLength;\n var world = this.temp = spine.Utils.setArraySize(this.temp, nn, 0);\n path.computeWorldVertices(slot, 0, nn, world, 0, 2);\n var color = this.pathColor;\n var x1 = world[2], y1 = world[3], x2 = 0, y2 = 0;\n if (path.closed) {\n shapes.setColor(color);\n var cx1 = world[0], cy1 = world[1], cx2 = world[nn - 2], cy2 = world[nn - 1];\n x2 = world[nn - 4];\n y2 = world[nn - 3];\n shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, 32);\n shapes.setColor(SkeletonDebugRenderer.LIGHT_GRAY);\n shapes.line(x1, y1, cx1, cy1);\n shapes.line(x2, y2, cx2, cy2);\n }\n nn -= 4;\n for (var ii = 4; ii < nn; ii += 6) {\n var cx1 = world[ii], cy1 = world[ii + 1], cx2 = world[ii + 2], cy2 = world[ii + 3];\n x2 = world[ii + 4];\n y2 = world[ii + 5];\n shapes.setColor(color);\n shapes.curve(x1, y1, cx1, cy1, cx2, cy2, x2, y2, 32);\n shapes.setColor(SkeletonDebugRenderer.LIGHT_GRAY);\n shapes.line(x1, y1, cx1, cy1);\n shapes.line(x2, y2, cx2, cy2);\n x1 = x2;\n y1 = y2;\n }\n }\n }\n if (this.drawBones) {\n shapes.setColor(this.boneOriginColor);\n for (var i = 0, n = bones.length; i < n; i++) {\n var bone = bones[i];\n if (ignoredBones && ignoredBones.indexOf(bone.data.name) > -1)\n continue;\n shapes.circle(true, skeletonX + bone.worldX, skeletonY + bone.worldY, 3 * this.scale, SkeletonDebugRenderer.GREEN, 8);\n }\n }\n if (this.drawClipping) {\n var slots = skeleton.slots;\n shapes.setColor(this.clipColor);\n for (var i = 0, n = slots.length; i < n; i++) {\n var slot = slots[i];\n if (!slot.bone.active)\n continue;\n var attachment = slot.getAttachment();\n if (!(attachment instanceof spine.ClippingAttachment))\n continue;\n var clip = attachment;\n var nn = clip.worldVerticesLength;\n var world = this.temp = spine.Utils.setArraySize(this.temp, nn, 0);\n clip.computeWorldVertices(slot, 0, nn, world, 0, 2);\n for (var i_17 = 0, n_3 = world.length; i_17 < n_3; i_17 += 2) {\n var x = world[i_17];\n var y = world[i_17 + 1];\n var x2 = world[(i_17 + 2) % world.length];\n var y2 = world[(i_17 + 3) % world.length];\n shapes.line(x, y, x2, y2);\n }\n }\n }\n };\n SkeletonDebugRenderer.prototype.dispose = function () {\n };\n SkeletonDebugRenderer.LIGHT_GRAY = new spine.Color(192 / 255, 192 / 255, 192 / 255, 1);\n SkeletonDebugRenderer.GREEN = new spine.Color(0, 1, 0, 1);\n return SkeletonDebugRenderer;\n }());\n webgl.SkeletonDebugRenderer = SkeletonDebugRenderer;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var Renderable = (function () {\n function Renderable(vertices, numVertices, numFloats) {\n this.vertices = vertices;\n this.numVertices = numVertices;\n this.numFloats = numFloats;\n }\n return Renderable;\n }());\n ;\n var SkeletonRenderer = (function () {\n function SkeletonRenderer(context, twoColorTint) {\n if (twoColorTint === void 0) { twoColorTint = true; }\n this.premultipliedAlpha = false;\n this.vertexEffect = null;\n this.tempColor = new spine.Color();\n this.tempColor2 = new spine.Color();\n this.vertexSize = 2 + 2 + 4;\n this.twoColorTint = false;\n this.renderable = new Renderable(null, 0, 0);\n this.clipper = new spine.SkeletonClipping();\n this.temp = new spine.Vector2();\n this.temp2 = new spine.Vector2();\n this.temp3 = new spine.Color();\n this.temp4 = new spine.Color();\n this.twoColorTint = twoColorTint;\n if (twoColorTint)\n this.vertexSize += 4;\n this.vertices = spine.Utils.newFloatArray(this.vertexSize * 1024);\n }\n SkeletonRenderer.prototype.draw = function (batcher, skeleton, slotRangeStart, slotRangeEnd) {\n if (slotRangeStart === void 0) { slotRangeStart = -1; }\n if (slotRangeEnd === void 0) { slotRangeEnd = -1; }\n var clipper = this.clipper;\n var premultipliedAlpha = this.premultipliedAlpha;\n var twoColorTint = this.twoColorTint;\n var blendMode = null;\n var tempPos = this.temp;\n var tempUv = this.temp2;\n var tempLight = this.temp3;\n var tempDark = this.temp4;\n var renderable = this.renderable;\n var uvs = null;\n var triangles = null;\n var drawOrder = skeleton.drawOrder;\n var attachmentColor = null;\n var skeletonColor = skeleton.color;\n var vertexSize = twoColorTint ? 12 : 8;\n var inRange = false;\n if (slotRangeStart == -1)\n inRange = true;\n for (var i = 0, n = drawOrder.length; i < n; i++) {\n var clippedVertexSize = clipper.isClipping() ? 2 : vertexSize;\n var slot = drawOrder[i];\n if (!slot.bone.active) {\n clipper.clipEndWithSlot(slot);\n continue;\n }\n if (slotRangeStart >= 0 && slotRangeStart == slot.data.index) {\n inRange = true;\n }\n if (!inRange) {\n clipper.clipEndWithSlot(slot);\n continue;\n }\n if (slotRangeEnd >= 0 && slotRangeEnd == slot.data.index) {\n inRange = false;\n }\n var attachment = slot.getAttachment();\n var texture = null;\n if (attachment instanceof spine.RegionAttachment) {\n var region = attachment;\n renderable.vertices = this.vertices;\n renderable.numVertices = 4;\n renderable.numFloats = clippedVertexSize << 2;\n region.computeWorldVertices(slot.bone, renderable.vertices, 0, clippedVertexSize);\n triangles = SkeletonRenderer.QUAD_TRIANGLES;\n uvs = region.uvs;\n texture = region.region.renderObject.texture;\n attachmentColor = region.color;\n }\n else if (attachment instanceof spine.MeshAttachment) {\n var mesh = attachment;\n renderable.vertices = this.vertices;\n renderable.numVertices = (mesh.worldVerticesLength >> 1);\n renderable.numFloats = renderable.numVertices * clippedVertexSize;\n if (renderable.numFloats > renderable.vertices.length) {\n renderable.vertices = this.vertices = spine.Utils.newFloatArray(renderable.numFloats);\n }\n mesh.computeWorldVertices(slot, 0, mesh.worldVerticesLength, renderable.vertices, 0, clippedVertexSize);\n triangles = mesh.triangles;\n texture = mesh.region.renderObject.texture;\n uvs = mesh.uvs;\n attachmentColor = mesh.color;\n }\n else if (attachment instanceof spine.ClippingAttachment) {\n var clip = (attachment);\n clipper.clipStart(slot, clip);\n continue;\n }\n else {\n clipper.clipEndWithSlot(slot);\n continue;\n }\n if (texture != null) {\n var slotColor = slot.color;\n var finalColor = this.tempColor;\n finalColor.r = skeletonColor.r * slotColor.r * attachmentColor.r;\n finalColor.g = skeletonColor.g * slotColor.g * attachmentColor.g;\n finalColor.b = skeletonColor.b * slotColor.b * attachmentColor.b;\n finalColor.a = skeletonColor.a * slotColor.a * attachmentColor.a;\n if (premultipliedAlpha) {\n finalColor.r *= finalColor.a;\n finalColor.g *= finalColor.a;\n finalColor.b *= finalColor.a;\n }\n var darkColor = this.tempColor2;\n if (slot.darkColor == null)\n darkColor.set(0, 0, 0, 1.0);\n else {\n if (premultipliedAlpha) {\n darkColor.r = slot.darkColor.r * finalColor.a;\n darkColor.g = slot.darkColor.g * finalColor.a;\n darkColor.b = slot.darkColor.b * finalColor.a;\n }\n else {\n darkColor.setFromColor(slot.darkColor);\n }\n darkColor.a = premultipliedAlpha ? 1.0 : 0.0;\n }\n var slotBlendMode = slot.data.blendMode;\n if (slotBlendMode != blendMode) {\n blendMode = slotBlendMode;\n batcher.setBlendMode(webgl.WebGLBlendModeConverter.getSourceGLBlendMode(blendMode, premultipliedAlpha), webgl.WebGLBlendModeConverter.getDestGLBlendMode(blendMode));\n }\n if (clipper.isClipping()) {\n clipper.clipTriangles(renderable.vertices, renderable.numFloats, triangles, triangles.length, uvs, finalColor, darkColor, twoColorTint);\n var clippedVertices = new Float32Array(clipper.clippedVertices);\n var clippedTriangles = clipper.clippedTriangles;\n if (this.vertexEffect != null) {\n var vertexEffect = this.vertexEffect;\n var verts = clippedVertices;\n if (!twoColorTint) {\n for (var v = 0, n_4 = clippedVertices.length; v < n_4; v += vertexSize) {\n tempPos.x = verts[v];\n tempPos.y = verts[v + 1];\n tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]);\n tempUv.x = verts[v + 6];\n tempUv.y = verts[v + 7];\n tempDark.set(0, 0, 0, 0);\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\n verts[v] = tempPos.x;\n verts[v + 1] = tempPos.y;\n verts[v + 2] = tempLight.r;\n verts[v + 3] = tempLight.g;\n verts[v + 4] = tempLight.b;\n verts[v + 5] = tempLight.a;\n verts[v + 6] = tempUv.x;\n verts[v + 7] = tempUv.y;\n }\n }\n else {\n for (var v = 0, n_5 = clippedVertices.length; v < n_5; v += vertexSize) {\n tempPos.x = verts[v];\n tempPos.y = verts[v + 1];\n tempLight.set(verts[v + 2], verts[v + 3], verts[v + 4], verts[v + 5]);\n tempUv.x = verts[v + 6];\n tempUv.y = verts[v + 7];\n tempDark.set(verts[v + 8], verts[v + 9], verts[v + 10], verts[v + 11]);\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\n verts[v] = tempPos.x;\n verts[v + 1] = tempPos.y;\n verts[v + 2] = tempLight.r;\n verts[v + 3] = tempLight.g;\n verts[v + 4] = tempLight.b;\n verts[v + 5] = tempLight.a;\n verts[v + 6] = tempUv.x;\n verts[v + 7] = tempUv.y;\n verts[v + 8] = tempDark.r;\n verts[v + 9] = tempDark.g;\n verts[v + 10] = tempDark.b;\n verts[v + 11] = tempDark.a;\n }\n }\n }\n batcher.draw(texture, clippedVertices, clippedTriangles);\n }\n else {\n var verts = renderable.vertices;\n if (this.vertexEffect != null) {\n var vertexEffect = this.vertexEffect;\n if (!twoColorTint) {\n for (var v = 0, u = 0, n_6 = renderable.numFloats; v < n_6; v += vertexSize, u += 2) {\n tempPos.x = verts[v];\n tempPos.y = verts[v + 1];\n tempUv.x = uvs[u];\n tempUv.y = uvs[u + 1];\n tempLight.setFromColor(finalColor);\n tempDark.set(0, 0, 0, 0);\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\n verts[v] = tempPos.x;\n verts[v + 1] = tempPos.y;\n verts[v + 2] = tempLight.r;\n verts[v + 3] = tempLight.g;\n verts[v + 4] = tempLight.b;\n verts[v + 5] = tempLight.a;\n verts[v + 6] = tempUv.x;\n verts[v + 7] = tempUv.y;\n }\n }\n else {\n for (var v = 0, u = 0, n_7 = renderable.numFloats; v < n_7; v += vertexSize, u += 2) {\n tempPos.x = verts[v];\n tempPos.y = verts[v + 1];\n tempUv.x = uvs[u];\n tempUv.y = uvs[u + 1];\n tempLight.setFromColor(finalColor);\n tempDark.setFromColor(darkColor);\n vertexEffect.transform(tempPos, tempUv, tempLight, tempDark);\n verts[v] = tempPos.x;\n verts[v + 1] = tempPos.y;\n verts[v + 2] = tempLight.r;\n verts[v + 3] = tempLight.g;\n verts[v + 4] = tempLight.b;\n verts[v + 5] = tempLight.a;\n verts[v + 6] = tempUv.x;\n verts[v + 7] = tempUv.y;\n verts[v + 8] = tempDark.r;\n verts[v + 9] = tempDark.g;\n verts[v + 10] = tempDark.b;\n verts[v + 11] = tempDark.a;\n }\n }\n }\n else {\n if (!twoColorTint) {\n for (var v = 2, u = 0, n_8 = renderable.numFloats; v < n_8; v += vertexSize, u += 2) {\n verts[v] = finalColor.r;\n verts[v + 1] = finalColor.g;\n verts[v + 2] = finalColor.b;\n verts[v + 3] = finalColor.a;\n verts[v + 4] = uvs[u];\n verts[v + 5] = uvs[u + 1];\n }\n }\n else {\n for (var v = 2, u = 0, n_9 = renderable.numFloats; v < n_9; v += vertexSize, u += 2) {\n verts[v] = finalColor.r;\n verts[v + 1] = finalColor.g;\n verts[v + 2] = finalColor.b;\n verts[v + 3] = finalColor.a;\n verts[v + 4] = uvs[u];\n verts[v + 5] = uvs[u + 1];\n verts[v + 6] = darkColor.r;\n verts[v + 7] = darkColor.g;\n verts[v + 8] = darkColor.b;\n verts[v + 9] = darkColor.a;\n }\n }\n }\n var view = renderable.vertices.subarray(0, renderable.numFloats);\n batcher.draw(texture, view, triangles);\n }\n }\n clipper.clipEndWithSlot(slot);\n }\n clipper.clipEnd();\n };\n SkeletonRenderer.QUAD_TRIANGLES = [0, 1, 2, 2, 3, 0];\n return SkeletonRenderer;\n }());\n webgl.SkeletonRenderer = SkeletonRenderer;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var Vector3 = (function () {\n function Vector3(x, y, z) {\n if (x === void 0) { x = 0; }\n if (y === void 0) { y = 0; }\n if (z === void 0) { z = 0; }\n this.x = 0;\n this.y = 0;\n this.z = 0;\n this.x = x;\n this.y = y;\n this.z = z;\n }\n Vector3.prototype.setFrom = function (v) {\n this.x = v.x;\n this.y = v.y;\n this.z = v.z;\n return this;\n };\n Vector3.prototype.set = function (x, y, z) {\n this.x = x;\n this.y = y;\n this.z = z;\n return this;\n };\n Vector3.prototype.add = function (v) {\n this.x += v.x;\n this.y += v.y;\n this.z += v.z;\n return this;\n };\n Vector3.prototype.sub = function (v) {\n this.x -= v.x;\n this.y -= v.y;\n this.z -= v.z;\n return this;\n };\n Vector3.prototype.scale = function (s) {\n this.x *= s;\n this.y *= s;\n this.z *= s;\n return this;\n };\n Vector3.prototype.normalize = function () {\n var len = this.length();\n if (len == 0)\n return this;\n len = 1 / len;\n this.x *= len;\n this.y *= len;\n this.z *= len;\n return this;\n };\n Vector3.prototype.cross = function (v) {\n return this.set(this.y * v.z - this.z * v.y, this.z * v.x - this.x * v.z, this.x * v.y - this.y * v.x);\n };\n Vector3.prototype.multiply = function (matrix) {\n var l_mat = matrix.values;\n return this.set(this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03], this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13], this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]);\n };\n Vector3.prototype.project = function (matrix) {\n var l_mat = matrix.values;\n var l_w = 1 / (this.x * l_mat[webgl.M30] + this.y * l_mat[webgl.M31] + this.z * l_mat[webgl.M32] + l_mat[webgl.M33]);\n return this.set((this.x * l_mat[webgl.M00] + this.y * l_mat[webgl.M01] + this.z * l_mat[webgl.M02] + l_mat[webgl.M03]) * l_w, (this.x * l_mat[webgl.M10] + this.y * l_mat[webgl.M11] + this.z * l_mat[webgl.M12] + l_mat[webgl.M13]) * l_w, (this.x * l_mat[webgl.M20] + this.y * l_mat[webgl.M21] + this.z * l_mat[webgl.M22] + l_mat[webgl.M23]) * l_w);\n };\n Vector3.prototype.dot = function (v) {\n return this.x * v.x + this.y * v.y + this.z * v.z;\n };\n Vector3.prototype.length = function () {\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\n };\n Vector3.prototype.distance = function (v) {\n var a = v.x - this.x;\n var b = v.y - this.y;\n var c = v.z - this.z;\n return Math.sqrt(a * a + b * b + c * c);\n };\n return Vector3;\n }());\n webgl.Vector3 = Vector3;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\nvar spine;\n(function (spine) {\n var webgl;\n (function (webgl) {\n var ManagedWebGLRenderingContext = (function () {\n function ManagedWebGLRenderingContext(canvasOrContext, contextConfig) {\n var _this = this;\n if (contextConfig === void 0) { contextConfig = { alpha: \"true\" }; }\n this.restorables = new Array();\n if (canvasOrContext instanceof HTMLCanvasElement) {\n var canvas_1 = canvasOrContext;\n this.gl = (canvas_1.getContext(\"webgl2\", contextConfig) || canvas_1.getContext(\"webgl\", contextConfig));\n this.canvas = canvas_1;\n canvas_1.addEventListener(\"webglcontextlost\", function (e) {\n var event = e;\n if (e) {\n e.preventDefault();\n }\n });\n canvas_1.addEventListener(\"webglcontextrestored\", function (e) {\n for (var i = 0, n = _this.restorables.length; i < n; i++) {\n _this.restorables[i].restore();\n }\n });\n }\n else {\n this.gl = canvasOrContext;\n this.canvas = this.gl.canvas;\n }\n }\n ManagedWebGLRenderingContext.prototype.addRestorable = function (restorable) {\n this.restorables.push(restorable);\n };\n ManagedWebGLRenderingContext.prototype.removeRestorable = function (restorable) {\n var index = this.restorables.indexOf(restorable);\n if (index > -1)\n this.restorables.splice(index, 1);\n };\n return ManagedWebGLRenderingContext;\n }());\n webgl.ManagedWebGLRenderingContext = ManagedWebGLRenderingContext;\n var WebGLBlendModeConverter = (function () {\n function WebGLBlendModeConverter() {\n }\n WebGLBlendModeConverter.getDestGLBlendMode = function (blendMode) {\n switch (blendMode) {\n case spine.BlendMode.Normal: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\n case spine.BlendMode.Additive: return WebGLBlendModeConverter.ONE;\n case spine.BlendMode.Multiply: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\n case spine.BlendMode.Screen: return WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA;\n default: throw new Error(\"Unknown blend mode: \" + blendMode);\n }\n };\n WebGLBlendModeConverter.getSourceGLBlendMode = function (blendMode, premultipliedAlpha) {\n if (premultipliedAlpha === void 0) { premultipliedAlpha = false; }\n switch (blendMode) {\n case spine.BlendMode.Normal: return premultipliedAlpha ? WebGLBlendModeConverter.ONE : WebGLBlendModeConverter.SRC_ALPHA;\n case spine.BlendMode.Additive: return premultipliedAlpha ? WebGLBlendModeConverter.ONE : WebGLBlendModeConverter.SRC_ALPHA;\n case spine.BlendMode.Multiply: return WebGLBlendModeConverter.DST_COLOR;\n case spine.BlendMode.Screen: return WebGLBlendModeConverter.ONE;\n default: throw new Error(\"Unknown blend mode: \" + blendMode);\n }\n };\n WebGLBlendModeConverter.ZERO = 0;\n WebGLBlendModeConverter.ONE = 1;\n WebGLBlendModeConverter.SRC_COLOR = 0x0300;\n WebGLBlendModeConverter.ONE_MINUS_SRC_COLOR = 0x0301;\n WebGLBlendModeConverter.SRC_ALPHA = 0x0302;\n WebGLBlendModeConverter.ONE_MINUS_SRC_ALPHA = 0x0303;\n WebGLBlendModeConverter.DST_ALPHA = 0x0304;\n WebGLBlendModeConverter.ONE_MINUS_DST_ALPHA = 0x0305;\n WebGLBlendModeConverter.DST_COLOR = 0x0306;\n return WebGLBlendModeConverter;\n }());\n webgl.WebGLBlendModeConverter = WebGLBlendModeConverter;\n })(webgl = spine.webgl || (spine.webgl = {}));\n})(spine || (spine = {}));\n//# sourceMappingURL=spine-both.js.map\n/*** EXPORTS FROM exports-loader ***/\nmodule.exports = spine;\n\n}.call(window));\n"],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/spine/src/container/SpineContainerWebGLRenderer.js b/plugins/spine/src/container/SpineContainerWebGLRenderer.js index d9d95894f..47408c87c 100644 --- a/plugins/spine/src/container/SpineContainerWebGLRenderer.js +++ b/plugins/spine/src/container/SpineContainerWebGLRenderer.js @@ -35,6 +35,8 @@ var SpineContainerWebGLRenderer = function (renderer, container, interpolationPe if (sceneRenderer.batcher.isDrawing && renderer.finalType) { sceneRenderer.end(); + + renderer.rebindPipeline(); } return; @@ -63,6 +65,9 @@ var SpineContainerWebGLRenderer = function (renderer, container, interpolationPe if (renderer.newType) { + // flush + clear if this is a new type + renderer.clearPipeline(); + sceneRenderer.begin(); } @@ -152,13 +157,11 @@ var SpineContainerWebGLRenderer = function (renderer, container, interpolationPe if (!renderer.nextTypeMatch) { - // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch. + // The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch sceneRenderer.end(); - if (!renderer.finalType) - { - renderer.rebindPipeline(renderer.pipelines.MultiPipeline); - } + // And rebind the previous pipeline + renderer.rebindPipeline(); } }; diff --git a/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js b/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js index 64dd7cc6c..a7a85d22d 100644 --- a/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js +++ b/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js @@ -30,36 +30,37 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, interpolationPercent var childAlpha = skeleton.color.a; var sceneRenderer = plugin.sceneRenderer; - if (renderer.newType) - { - // flush + clear if this is a new type, even if it doesn't render - renderer.clearPipeline(); - } - var GameObjectRenderMask = 15; var willRender = !(GameObjectRenderMask !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || childAlpha === 0); if (!skeleton || !willRender) { - // If there is already a batch running, we need to close it - if (!renderer.nextTypeMatch) + // If there is already a batch running, and the next type isn't a Spine object, or this is the end, we need to close it + + if (sceneRenderer.batcher.isDrawing && (!renderer.nextTypeMatch || renderer.finalType)) { // The next object in the display list is not a Spine object, so we end the batch sceneRenderer.end(); - if (!renderer.finalType) - { - // Reset the current type - renderer.currentType = ''; + renderer.rebindPipeline(); + } - renderer.rebindPipeline(); - } + if (!renderer.finalType) + { + // Reset the current type + renderer.currentType = ''; } return; } + if (renderer.newType) + { + // flush + clear previous pipeline if this is a new type + renderer.clearPipeline(); + } + var camMatrix = renderer._tempMatrix1; var spriteMatrix = renderer._tempMatrix2; var calcMatrix = renderer._tempMatrix3; From 18cdb5e618fdf1c9a11d832ecb375c240969eba1 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 1 Sep 2020 17:00:16 +0100 Subject: [PATCH 136/241] The `Animation.play` and `playReverse` methods have a new optional parameter `timeScale`. This allows you to set the Animations time scale as you're actually playing it, rather than having to chain two calls together. Close #3963 --- src/gameobjects/components/Animation.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/gameobjects/components/Animation.js b/src/gameobjects/components/Animation.js index 26ae336c6..d552852d7 100644 --- a/src/gameobjects/components/Animation.js +++ b/src/gameobjects/components/Animation.js @@ -522,13 +522,15 @@ var Animation = new Class({ * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance. * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call. * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. + * @param {number} [timeScale] - Set the Time Scale when starting this Animation. If not given, the Time Scale will use the current value. * * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. */ - play: function (key, ignoreIfPlaying, startFrame) + play: function (key, ignoreIfPlaying, startFrame, timeScale) { if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } if (startFrame === undefined) { startFrame = 0; } + if (timeScale === undefined) { timeScale = this._timeScale; } if (key instanceof BaseAnimation) { @@ -544,6 +546,7 @@ var Animation = new Class({ this._reverse = false; this._paused = false; this._wasPlaying = true; + this._timeScale = timeScale; return this._startAnimation(key, startFrame); }, @@ -558,13 +561,15 @@ var Animation = new Class({ * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance. * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. + * @param {number} [timeScale] - Set the Time Scale when starting this Animation. If not given, the Time Scale will use the current value. * * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. */ - playReverse: function (key, ignoreIfPlaying, startFrame) + playReverse: function (key, ignoreIfPlaying, startFrame, timeScale) { if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } if (startFrame === undefined) { startFrame = 0; } + if (timeScale === undefined) { timeScale = this._timeScale; } if (key instanceof BaseAnimation) { @@ -578,6 +583,7 @@ var Animation = new Class({ this.forward = false; this._reverse = true; + this._timeScale = timeScale; return this._startAnimation(key, startFrame); }, @@ -930,9 +936,11 @@ var Animation = new Class({ }, /** - * Sets the Time Scale factor, allowing you to make the animation go go faster or slower than default. + * Sets the Time Scale factor, allowing you to make the animation go faster or slower than default. * Where 1 = normal speed (the default), 0.5 = half speed, 2 = double speed, etc. * + * Setting the time scale impacts all animations played on this Sprite from this point on. + * * @method Phaser.GameObjects.Components.Animation#setTimeScale * @since 3.4.0 * From 5c1b5c499ae834bf72735257a0cebaf5ce732503 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 1 Sep 2020 17:00:19 +0100 Subject: [PATCH 137/241] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54af9ab0a..859bea71c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -235,6 +235,7 @@ The way in which Game Objects add themselves to the Scene Update List has change * `Clock.addEvent` can now take an existing `TimerEvent` object, as well as a config object. If a `TimerEvent` is given it will be removed from the Clock, reset and then added. This allows you to pool TimerEvents rather than constantly create and delete them. Fix #4115 (thanks @jcyuan) * `Clock.removeEvent` is a new method that allows you to remove a `TimerEvent`, or an array of them, from all internal lists of the current Clock. * `Group.getMatching` is a new method that will return any members of the Group that match the given criteria, such as `getMatching('visible', true)` (thanks @atursams) +* The `Animation.play` and `playReverse` methods have a new optional parameter `timeScale`. This allows you to set the Animations time scale as you're actually playing it, rather than having to chain two calls together. Close #3963 (thanks @inmylo) ### Updates and API Changes From d3778bb4bb7e86ecc971b966206678711dfc84f3 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 1 Sep 2020 17:42:19 +0100 Subject: [PATCH 138/241] `ArcadeWorldConfig.customUpdate` is a new boolean property you can set in the Arcade Physics config object, either in the Scene or in the Game Config. If `true` the World update will never be called, allowing you to call it yourself from your own component. Close #5190 --- src/physics/arcade/typedefs/ArcadeWorldConfig.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/physics/arcade/typedefs/ArcadeWorldConfig.js b/src/physics/arcade/typedefs/ArcadeWorldConfig.js index 591cc6f54..933aa9c2d 100644 --- a/src/physics/arcade/typedefs/ArcadeWorldConfig.js +++ b/src/physics/arcade/typedefs/ArcadeWorldConfig.js @@ -23,4 +23,5 @@ * @property {number} [debugVelocityColor=0x00ff00] - Sets {@link Phaser.Physics.Arcade.World#defaults velocityDebugColor}. * @property {number} [maxEntries=16] - Sets {@link Phaser.Physics.Arcade.World#maxEntries}. * @property {boolean} [useTree=true] - Sets {@link Phaser.Physics.Arcade.World#useTree}. + * @property {boolean} [customUpdate=false] - If enabled, you need to call `World.update` yourself. */ From 84a867c2ac13a1531ede2fde845f7a05a9200949 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 1 Sep 2020 17:42:38 +0100 Subject: [PATCH 139/241] `ArcadePhysics.disableUpdate` is a new method that will prevent the Arcade Physics World `update` method from being called when the Scene updates. By disabling it, you're free to call the update method yourself, passing in your own delta and time values. `ArcadePhysics.enableUpdate` is a new method that will make the Arcade Physics World update in time with the Scene update. This is the default, so only call this if you have specifically disabled it previously. --- src/physics/arcade/ArcadePhysics.js | 42 ++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/src/physics/arcade/ArcadePhysics.js b/src/physics/arcade/ArcadePhysics.js index 4c9bc8158..db0349a28 100644 --- a/src/physics/arcade/ArcadePhysics.js +++ b/src/physics/arcade/ArcadePhysics.js @@ -65,7 +65,7 @@ var ArcadePhysics = new Class({ * A configuration object. Union of the `physics.arcade.*` properties of the GameConfig and SceneConfig objects. * * @name Phaser.Physics.Arcade.ArcadePhysics#config - * @type {object} + * @type {Phaser.Types.Physics.Arcade.ArcadeWorldConfig} * @since 3.0.0 */ this.config = this.getConfig(); @@ -127,18 +127,54 @@ var ArcadePhysics = new Class({ var eventEmitter = this.systems.events; - eventEmitter.on(SceneEvents.UPDATE, this.world.update, this.world); + if (!GetFastValue(this.config, 'customUpdate', false)) + { + eventEmitter.on(SceneEvents.UPDATE, this.world.update, this.world); + } + eventEmitter.on(SceneEvents.POST_UPDATE, this.world.postUpdate, this.world); eventEmitter.once(SceneEvents.SHUTDOWN, this.shutdown, this); }, + /** + * Causes `World.update` to be automatically called each time the Scene + * emits and `UPDATE` event. This is the default setting, so only needs + * calling if you have specifically disabled it. + * + * @method Phaser.Physics.Arcade.ArcadePhysics#enableUpdate + * @since 3.50.0 + */ + enableUpdate: function () + { + this.systems.events.on(SceneEvents.UPDATE, this.world.update, this.world); + }, + + /** + * Causes `World.update` to **not** be automatically called each time the Scene + * emits and `UPDATE` event. + * + * If you wish to run the World update at your own rate, or from your own + * component, then you should call this method to disable the built-in link, + * and then call `World.update(delta, time)` accordingly. + * + * Note that `World.postUpdate` is always automatically called when the Scene + * emits a `POST_UPDATE` event, regardless of this setting. + * + * @method Phaser.Physics.Arcade.ArcadePhysics#disableUpdate + * @since 3.50.0 + */ + disableUpdate: function () + { + this.systems.events.off(SceneEvents.UPDATE, this.world.update, this.world); + }, + /** * Creates the physics configuration for the current Scene. * * @method Phaser.Physics.Arcade.ArcadePhysics#getConfig * @since 3.0.0 * - * @return {object} The physics configuration. + * @return {Phaser.Types.Physics.Arcade.ArcadeWorldConfig} The physics configuration. */ getConfig: function () { From 7df102ccce68dc86319495231f89cf03676298dd Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 1 Sep 2020 17:42:42 +0100 Subject: [PATCH 140/241] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 859bea71c..2cf13a0cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -236,6 +236,9 @@ The way in which Game Objects add themselves to the Scene Update List has change * `Clock.removeEvent` is a new method that allows you to remove a `TimerEvent`, or an array of them, from all internal lists of the current Clock. * `Group.getMatching` is a new method that will return any members of the Group that match the given criteria, such as `getMatching('visible', true)` (thanks @atursams) * The `Animation.play` and `playReverse` methods have a new optional parameter `timeScale`. This allows you to set the Animations time scale as you're actually playing it, rather than having to chain two calls together. Close #3963 (thanks @inmylo) +* `ArcadePhysics.disableUpdate` is a new method that will prevent the Arcade Physics World `update` method from being called when the Scene updates. By disabling it, you're free to call the update method yourself, passing in your own delta and time values. +* `ArcadePhysics.enableUpdate` is a new method that will make the Arcade Physics World update in time with the Scene update. This is the default, so only call this if you have specifically disabled it previously. +* `ArcadeWorldConfig.customUpdate` is a new boolean property you can set in the Arcade Physics config object, either in the Scene or in the Game Config. If `true` the World update will never be called, allowing you to call it yourself from your own component. Close #5190 (thanks @cfortuner) ### Updates and API Changes From 4c353571ca18514570a8ed0ea5ef5a7557d26104 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 1 Sep 2020 17:44:07 +0100 Subject: [PATCH 141/241] Removed protected status --- src/physics/arcade/World.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/physics/arcade/World.js b/src/physics/arcade/World.js index 7ff8fb47a..54abe6e38 100644 --- a/src/physics/arcade/World.js +++ b/src/physics/arcade/World.js @@ -913,7 +913,6 @@ var World = new Class({ * This is called automatically by your Scene and does not need to be invoked directly. * * @method Phaser.Physics.Arcade.World#update - * @protected * @fires Phaser.Physics.Arcade.Events#WORLD_STEP * @since 3.0.0 * From 02ac6bcb7da71eb26bd9c6ffd003ee733c2eea5c Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 1 Sep 2020 17:51:17 +0100 Subject: [PATCH 142/241] If `inputWindowEvents` is set in the Game Config, then the `MouseManager` will now listen for the events on `window.top` instead of just `window`, which should help in situations where the pointer is released outside of an embedded iframe. Fix #4824 --- src/input/mouse/MouseManager.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/input/mouse/MouseManager.js b/src/input/mouse/MouseManager.js index 5ae19aac8..154d9d393 100644 --- a/src/input/mouse/MouseManager.js +++ b/src/input/mouse/MouseManager.js @@ -15,9 +15,9 @@ var NOOP = require('../../utils/NOOP'); /** * @classdesc * The Mouse Manager is a helper class that belongs to the Input Manager. - * + * * Its role is to listen for native DOM Mouse Events and then pass them onto the Input Manager for further processing. - * + * * You do not need to create this class directly, the Input Manager will create an instance of it automatically. * * @class MouseManager @@ -222,9 +222,9 @@ var MouseManager = new Class({ /** * Attempts to disable the context menu from appearing if you right-click on the browser. - * + * * Works by listening for the `contextmenu` event and prevent defaulting it. - * + * * Use this if you need to enable right-button mouse support in your game, and the browser * menu keeps getting in the way. * @@ -306,7 +306,7 @@ var MouseManager = new Class({ if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled) { _this.manager.onMouseMove(event); - + if (_this.capture) { event.preventDefault(); @@ -324,7 +324,7 @@ var MouseManager = new Class({ if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled) { _this.manager.onMouseDown(event); - + if (_this.capture && event.target === canvas) { event.preventDefault(); @@ -346,7 +346,7 @@ var MouseManager = new Class({ if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled) { _this.manager.onMouseUp(event); - + if (_this.capture && event.target === canvas) { event.preventDefault(); @@ -406,8 +406,8 @@ var MouseManager = new Class({ if (window && this.manager.game.config.inputWindowEvents) { - window.addEventListener('mousedown', this.onMouseDownWindow, nonPassive); - window.addEventListener('mouseup', this.onMouseUpWindow, nonPassive); + window.top.addEventListener('mousedown', this.onMouseDownWindow, nonPassive); + window.top.addEventListener('mouseup', this.onMouseUpWindow, nonPassive); } if (Features.pointerLock) @@ -448,8 +448,8 @@ var MouseManager = new Class({ if (window) { - window.removeEventListener('mousedown', this.onMouseDownWindow); - window.removeEventListener('mouseup', this.onMouseUpWindow); + window.top.removeEventListener('mousedown', this.onMouseDownWindow); + window.top.removeEventListener('mouseup', this.onMouseUpWindow); } if (Features.pointerLock) From 9a2643852e4c5e8db937cb2a04233bb58cdcb20f Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 1 Sep 2020 17:51:20 +0100 Subject: [PATCH 143/241] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2cf13a0cc..d8967b6a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -273,6 +273,7 @@ The way in which Game Objects add themselves to the Scene Update List has change * `Tween.seek` will no longer issue a console warning for `'Tween.seek duration too long'`, it's now up to you to check on the performance of tween seeking. * `WebGLRenderer.previousPipeline` is a new property that is set during a call to `clearPipeline` and used during calls to `rebindPipeline`, allowing the renderer to rebind any previous pipeline, not just the Multi Pipeline. * The `WebGLRenderer.rebindPipeline` method has been changed slightly. Previously, you had to specify the `pipelineInstance`, but this is now optional. If you don't, it will use the new `previousPipeline` property instead. If not set, or none given, it will now return without throwing gl errors as well. +* If `inputWindowEvents` is set in the Game Config, then the `MouseManager` will now listen for the events on `window.top` instead of just `window`, which should help in situations where the pointer is released outside of an embedded iframe. Fix #4824 (thanks @rexrainbow) ### Bug Fixes From 506426f706d281971975960e0997d04dff0232a0 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 1 Sep 2020 18:06:23 +0100 Subject: [PATCH 144/241] The `Color.HSVToRGB` function has been rewritten to use the HSL and HSV formula from Wikipedia, giving much better results. Fix #5089 --- src/display/color/HSVToRGB.js | 76 +++++++++++++---------------------- 1 file changed, 28 insertions(+), 48 deletions(-) diff --git a/src/display/color/HSVToRGB.js b/src/display/color/HSVToRGB.js index 702864ef6..b3a2f0691 100644 --- a/src/display/color/HSVToRGB.js +++ b/src/display/color/HSVToRGB.js @@ -7,10 +7,32 @@ var GetColor = require('./GetColor'); /** - * Converts an HSV (hue, saturation and value) color value to RGB. - * Conversion formula from http://en.wikipedia.org/wiki/HSL_color_space. + * RGB space conversion. + * + * @ignore + * + * @param {number} n - The value to convert. + * @param {number} h - The h value. + * @param {number} s - The s value. + * @param {number} v - The v value. + * + * @return {number} The converted value. + */ +function ConvertValue (n, h, s, v) +{ + var k = (n + h * 6) % 6; + + var min = Math.min(k, 4 - k, 1); + + return Math.round(255 * (v - v * s * Math.max(0, min))); +} + +/** + * Converts a HSV (hue, saturation and value) color set to RGB. + * + * Conversion formula from https://en.wikipedia.org/wiki/HSL_and_HSV + * * Assumes HSV values are contained in the set [0, 1]. - * Based on code by Michael Jackson (https://github.com/mjijackson) * * @function Phaser.Display.Color.HSVToRGB * @since 3.0.0 @@ -27,51 +49,9 @@ var HSVToRGB = function (h, s, v, out) if (s === undefined) { s = 1; } if (v === undefined) { v = 1; } - var i = Math.floor(h * 6); - var f = h * 6 - i; - - var p = Math.floor((v * (1 - s)) * 255); - var q = Math.floor((v * (1 - f * s)) * 255); - var t = Math.floor((v * (1 - (1 - f) * s)) * 255); - - v = Math.floor(v *= 255); - - var r = v; - var g = v; - var b = v; - - var c = i % 6; - - if (c === 0) - { - g = t; - b = p; - } - else if (c === 1) - { - r = q; - b = p; - } - else if (c === 2) - { - r = p; - b = t; - } - else if (c === 3) - { - r = p; - g = q; - } - else if (c === 4) - { - r = t; - g = p; - } - else if (c === 5) - { - g = p; - b = q; - } + var r = ConvertValue(5, h, s, v); + var g = ConvertValue(3, h, s, v); + var b = ConvertValue(1, h, s, v); if (!out) { From 4f825e20a1e0d1e63ac2e30e925b75bd3a5317e3 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 1 Sep 2020 18:06:26 +0100 Subject: [PATCH 145/241] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d8967b6a4..d9ca6c102 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -285,6 +285,7 @@ The way in which Game Objects add themselves to the Scene Update List has change * Calling `Rectangle.setSize()` wouldn't change the underlying geometry of the Shape Game Object, causing any stroke to be incorrectly rendered after a size change. * The `ProcessQueue` was emitting the wrong events internally. It now emits 'add' and 'remove' correctly (thanks @halilcakar) * The `GridAlign` action didn't work if only the `height` parameter was set. Fix #5019 (thanks @halilcakar) +* The `Color.HSVToRGB` function has been rewritten to use the HSL and HSV formula from Wikipedia, giving much better results. Fix #5089 (thanks @DiamondeX) ### Examples, Documentation and TypeScript From 5b96ade1c774c344b27b1495b33f6870f66930be Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 1 Sep 2020 18:38:35 +0100 Subject: [PATCH 146/241] Types.GameObjects.Text.GetTextSizeObject --- src/gameobjects/text/typedefs/GetTextSizeObject.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/gameobjects/text/typedefs/GetTextSizeObject.js diff --git a/src/gameobjects/text/typedefs/GetTextSizeObject.js b/src/gameobjects/text/typedefs/GetTextSizeObject.js new file mode 100644 index 000000000..53028db0f --- /dev/null +++ b/src/gameobjects/text/typedefs/GetTextSizeObject.js @@ -0,0 +1,13 @@ +/** + * Results object from a call to GetTextSize. + * + * @typedef {object} Phaser.Types.GameObjects.Text.GetTextSizeObject + * @since 3.0.0 + * + * @property {number} width - The width of the longest line in the Text object. + * @property {number} height - The height of the Text object. + * @property {number} lines - The number of lines in the Text object. + * @property {number[]} lineWidths - An array of the lines for each line in the Text object. + * @property {number} lineSpacing - The line spacing of the Text object. + * @property {number} lineHeight - The height of a line factoring in font and stroke. + */ From 302a49863b84c901aaf5599f0c611163dcebedb6 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 1 Sep 2020 18:38:44 +0100 Subject: [PATCH 147/241] Improved jsdocs --- src/gameobjects/text/GetTextSize.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gameobjects/text/GetTextSize.js b/src/gameobjects/text/GetTextSize.js index af1626b8c..5374032a5 100644 --- a/src/gameobjects/text/GetTextSize.js +++ b/src/gameobjects/text/GetTextSize.js @@ -12,9 +12,9 @@ * * @param {Phaser.GameObjects.Text} text - The Text object to calculate the size from. * @param {Phaser.Types.GameObjects.Text.TextMetrics} size - The Text metrics to use when calculating the size. - * @param {array} lines - The lines of text to calculate the size from. + * @param {string[]} lines - The lines of text to calculate the size from. * - * @return {object} An object containing dimensions of the Text object. + * @return {Phaser.Types.GameObjects.Text.GetTextSizeObject} An object containing dimensions of the Text object. */ var GetTextSize = function (text, size, lines) { From da3f9b22c32a4e31c2a9d366a447314b5529df13 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 1 Sep 2020 18:38:57 +0100 Subject: [PATCH 148/241] Exposed on the main API namespace --- src/curves/index.js | 1 + src/curves/path/MoveTo.js | 9 ++++----- src/dom/index.js | 1 + src/gameobjects/domelement/CSSBlendModes.js | 3 ++- src/gameobjects/index.js | 6 +++--- src/gameobjects/particles/index.js | 1 + 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/curves/index.js b/src/curves/index.js index 1b0e4ad22..29eac74ac 100644 --- a/src/curves/index.js +++ b/src/curves/index.js @@ -10,6 +10,7 @@ module.exports = { Path: require('./path/Path'), + MoveTo: require('./path/MoveTo'), CubicBezier: require('./CubicBezierCurve'), Curve: require('./Curve'), diff --git a/src/curves/path/MoveTo.js b/src/curves/path/MoveTo.js index d6e237749..28f863885 100644 --- a/src/curves/path/MoveTo.js +++ b/src/curves/path/MoveTo.js @@ -9,15 +9,16 @@ var Vector2 = require('../../math/Vector2'); /** * @classdesc - * A MoveTo Curve is a very simple curve consisting of only a single point. Its intended use is to move the ending point in a Path. + * A MoveTo Curve is a very simple curve consisting of only a single point. + * Its intended use is to move the ending point in a Path. * * @class MoveTo * @memberof Phaser.Curves * @constructor * @since 3.0.0 * - * @param {number} [x] - `x` pixel coordinate. - * @param {number} [y] - `y` pixel coordinate. + * @param {number} [x=0] - `x` pixel coordinate. + * @param {number} [y=0] - `y` pixel coordinate. */ var MoveTo = new Class({ @@ -25,8 +26,6 @@ var MoveTo = new Class({ function MoveTo (x, y) { - // Skip length calcs in paths - /** * Denotes that this Curve does not influence the bounds, points, and drawing of its parent Path. Must be `false` or some methods in the parent Path will throw errors. * diff --git a/src/dom/index.js b/src/dom/index.js index b7f1c7f1f..7284855f2 100644 --- a/src/dom/index.js +++ b/src/dom/index.js @@ -12,6 +12,7 @@ var Dom = { AddToDOM: require('./AddToDOM'), DOMContentLoaded: require('./DOMContentLoaded'), + GetInnerHeight: require('./GetInnerHeight'), GetScreenOrientation: require('./GetScreenOrientation'), GetTarget: require('./GetTarget'), ParseXML: require('./ParseXML'), diff --git a/src/gameobjects/domelement/CSSBlendModes.js b/src/gameobjects/domelement/CSSBlendModes.js index 88610d428..e7612ca81 100644 --- a/src/gameobjects/domelement/CSSBlendModes.js +++ b/src/gameobjects/domelement/CSSBlendModes.js @@ -6,8 +6,9 @@ /** * Phaser Blend Modes to CSS Blend Modes Map. - * + * * @name Phaser.CSSBlendModes + * @ignore * @enum {string} * @memberof Phaser * @readonly diff --git a/src/gameobjects/index.js b/src/gameobjects/index.js index cd6c90019..a79972634 100644 --- a/src/gameobjects/index.js +++ b/src/gameobjects/index.js @@ -24,6 +24,7 @@ var GameObjects = { GameObject: require('./GameObject'), BitmapText: require('./bitmaptext/static/BitmapText'), Blitter: require('./blitter/Blitter'), + Bob: require('./blitter/Bob'), Container: require('./container/Container'), DOMElement: require('./domelement/DOMElement'), DynamicBitmapText: require('./bitmaptext/dynamic/DynamicBitmapText'), @@ -129,9 +130,8 @@ if (typeof WEBGL_RENDERER) GameObjects.Creators.Shader = require('./shader/ShaderCreator'); GameObjects.Light = require('./lights/Light'); - - require('./lights/LightsManager'); - require('./lights/LightsPlugin'); + GameObjects.LightsManager = require('./lights/LightsManager'); + GameObjects.LightsPlugin = require('./lights/LightsPlugin'); } module.exports = GameObjects; diff --git a/src/gameobjects/particles/index.js b/src/gameobjects/particles/index.js index 1e25f1cc9..e1434b87e 100644 --- a/src/gameobjects/particles/index.js +++ b/src/gameobjects/particles/index.js @@ -10,6 +10,7 @@ module.exports = { + EmitterOp: require('./EmitterOp'), GravityWell: require('./GravityWell'), Particle: require('./Particle'), ParticleEmitter: require('./ParticleEmitter'), From d2cc809fdbdcbda060924e8c14c35181ca7de89d Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 1 Sep 2020 18:56:01 +0100 Subject: [PATCH 149/241] Exported functions to namespace --- src/gameobjects/index.js | 5 +++++ src/gameobjects/text/GetTextSize.js | 2 +- src/gameobjects/text/MeasureText.js | 2 +- src/input/InputPluginCache.js | 2 +- src/input/index.js | 1 + src/physics/arcade/components/index.js | 2 ++ src/physics/arcade/index.js | 4 ++++ src/physics/arcade/tilemap/index.js | 8 +++++++- 8 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/gameobjects/index.js b/src/gameobjects/index.js index a79972634..85559637a 100644 --- a/src/gameobjects/index.js +++ b/src/gameobjects/index.js @@ -38,7 +38,12 @@ var GameObjects = { RetroFont: require('./bitmaptext/RetroFont'), Rope: require('./rope/Rope'), Sprite: require('./sprite/Sprite'), + Text: require('./text/static/Text'), + GetTextSize: require('./text/GetTextSize'), + MeasureText: require('./text/MeasureText'), + TextStyle: require('./text/TextStyle'), + TileSprite: require('./tilesprite/TileSprite'), Zone: require('./zone/Zone'), Video: require('./video/Video'), diff --git a/src/gameobjects/text/GetTextSize.js b/src/gameobjects/text/GetTextSize.js index 5374032a5..d7f568a0f 100644 --- a/src/gameobjects/text/GetTextSize.js +++ b/src/gameobjects/text/GetTextSize.js @@ -7,7 +7,7 @@ /** * Returns an object containing dimensions of the Text object. * - * @function Phaser.GameObjects.Text.GetTextSize + * @function Phaser.GameObjects.GetTextSize * @since 3.0.0 * * @param {Phaser.GameObjects.Text} text - The Text object to calculate the size from. diff --git a/src/gameobjects/text/MeasureText.js b/src/gameobjects/text/MeasureText.js index 331542861..ff404a587 100644 --- a/src/gameobjects/text/MeasureText.js +++ b/src/gameobjects/text/MeasureText.js @@ -9,7 +9,7 @@ var CanvasPool = require('../../display/canvas/CanvasPool'); /** * Calculates the ascent, descent and fontSize of a given font style. * - * @function Phaser.GameObjects.Text.MeasureText + * @function Phaser.GameObjects.MeasureText * @since 3.0.0 * * @param {Phaser.GameObjects.TextStyle} textStyle - The TextStyle object to measure. diff --git a/src/input/InputPluginCache.js b/src/input/InputPluginCache.js index 37a2f1c15..aec662cab 100644 --- a/src/input/InputPluginCache.js +++ b/src/input/InputPluginCache.js @@ -40,7 +40,7 @@ InputPluginCache.register = function (key, plugin, mapping, settingsKey, configK /** * Returns the input plugin object from the cache based on the given key. * - * @function Phaser.Input.InputPluginCache.getCore + * @function Phaser.Input.InputPluginCache.getPlugin * @static * @since 3.10.0 * diff --git a/src/input/index.js b/src/input/index.js index 144fa8f86..157170352 100644 --- a/src/input/index.js +++ b/src/input/index.js @@ -13,6 +13,7 @@ var Extend = require('../utils/object/Extend'); var Input = { + CreatePixelPerfectHandler: require('./CreatePixelPerfectHandler'), CreateInteractiveObject: require('./CreateInteractiveObject'), Events: require('./events'), Gamepad: require('./gamepad'), diff --git a/src/physics/arcade/components/index.js b/src/physics/arcade/components/index.js index e6123aa88..f29877cac 100644 --- a/src/physics/arcade/components/index.js +++ b/src/physics/arcade/components/index.js @@ -20,6 +20,8 @@ module.exports = { Gravity: require('./Gravity'), Immovable: require('./Immovable'), Mass: require('./Mass'), + OverlapCirc: require('./OverlapCirc'), + OverlapRect: require('./OverlapRect'), Size: require('./Size'), Velocity: require('./Velocity') diff --git a/src/physics/arcade/index.js b/src/physics/arcade/index.js index 7277085b0..c0b65173b 100644 --- a/src/physics/arcade/index.js +++ b/src/physics/arcade/index.js @@ -19,6 +19,10 @@ var Arcade = { Components: require('./components'), Events: require('./events'), Factory: require('./Factory'), + GetOverlapX: require('./GetOverlapX'), + GetOverlapY: require('./GetOverlapY'), + SeparateX: require('./SeparateX'), + SeparateY: require('./SeparateY'), Group: require('./PhysicsGroup'), Image: require('./ArcadeImage'), Sprite: require('./ArcadeSprite'), diff --git a/src/physics/arcade/tilemap/index.js b/src/physics/arcade/tilemap/index.js index c8b145e82..ebe28ab50 100644 --- a/src/physics/arcade/tilemap/index.js +++ b/src/physics/arcade/tilemap/index.js @@ -1,3 +1,9 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + /** * @namespace Phaser.Physics.Arcade.Tilemap */ @@ -11,5 +17,5 @@ module.exports = { TileCheckX: require('./TileCheckX'), TileCheckY: require('./TileCheckY'), TileIntersectsBody: require('./TileIntersectsBody') - + }; From 9e2a8f4271319dac2d2d88e9c4e1e188e67e9b15 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 1 Sep 2020 18:56:04 +0100 Subject: [PATCH 150/241] Update CHANGELOG.md --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9ca6c102..f1d07801b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -274,6 +274,19 @@ The way in which Game Objects add themselves to the Scene Update List has change * `WebGLRenderer.previousPipeline` is a new property that is set during a call to `clearPipeline` and used during calls to `rebindPipeline`, allowing the renderer to rebind any previous pipeline, not just the Multi Pipeline. * The `WebGLRenderer.rebindPipeline` method has been changed slightly. Previously, you had to specify the `pipelineInstance`, but this is now optional. If you don't, it will use the new `previousPipeline` property instead. If not set, or none given, it will now return without throwing gl errors as well. * If `inputWindowEvents` is set in the Game Config, then the `MouseManager` will now listen for the events on `window.top` instead of just `window`, which should help in situations where the pointer is released outside of an embedded iframe. Fix #4824 (thanks @rexrainbow) +* `Types.GameObjects.Text.GetTextSizeObject` is a new type def for the GetTextSize function results. +* The `Phaser.Curves.MoveTo` function has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.DOM.GetInnerHeight` function has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.GameObjects.Bob` class has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.GameObjects.LightsManager` class has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.GameObjects.LightsPlugin` class has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.GameObjects.Particles.EmitterOp` class has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.GameObjects.GetTextSize` function has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.GameObjects.MeasureText` function has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.GameObjects.TextStyle` function has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.Input.CreatePixelPerfectHandler` function has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.Physics.Arcade.Components.OverlapCirc` function has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.Physics.Arcade.Components.OverlapRect` function has now been exposed on the Phaser namespace (thanks @samme) ### Bug Fixes From 07865a582388ccdac46d6803e8c4056340273b87 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 1 Sep 2020 20:28:42 +0100 Subject: [PATCH 151/241] Final set of namespace changes. Fix #5062 --- src/physics/arcade/index.js | 1 + src/physics/arcade/tilemap/index.js | 4 +++- src/physics/matter-js/components/index.js | 2 +- src/physics/matter-js/index.js | 4 ++++ src/plugins/DefaultPlugins.js | 22 +++++++++++----------- src/scene/index.js | 2 ++ src/structs/index.js | 1 + src/tilemaps/components/index.js | 2 ++ src/tilemaps/parsers/tiled/index.js | 1 + src/utils/array/StableSort.js | 3 ++- src/utils/index.js | 3 ++- 11 files changed, 30 insertions(+), 15 deletions(-) diff --git a/src/physics/arcade/index.js b/src/physics/arcade/index.js index c0b65173b..3d53b29fd 100644 --- a/src/physics/arcade/index.js +++ b/src/physics/arcade/index.js @@ -28,6 +28,7 @@ var Arcade = { Sprite: require('./ArcadeSprite'), StaticBody: require('./StaticBody'), StaticGroup: require('./StaticPhysicsGroup'), + Tilemap: require('./tilemap/'), World: require('./World') }; diff --git a/src/physics/arcade/tilemap/index.js b/src/physics/arcade/tilemap/index.js index ebe28ab50..34e55b8a8 100644 --- a/src/physics/arcade/tilemap/index.js +++ b/src/physics/arcade/tilemap/index.js @@ -8,7 +8,7 @@ * @namespace Phaser.Physics.Arcade.Tilemap */ -module.exports = { +var Tilemap = { ProcessTileCallbacks: require('./ProcessTileCallbacks'), ProcessTileSeparationX: require('./ProcessTileSeparationX'), @@ -19,3 +19,5 @@ module.exports = { TileIntersectsBody: require('./TileIntersectsBody') }; + +module.exports = Tilemap; diff --git a/src/physics/matter-js/components/index.js b/src/physics/matter-js/components/index.js index 56c6e87f9..786cd9ec6 100644 --- a/src/physics/matter-js/components/index.js +++ b/src/physics/matter-js/components/index.js @@ -16,10 +16,10 @@ module.exports = { Friction: require('./Friction'), Gravity: require('./Gravity'), Mass: require('./Mass'), - Static: require('./Static'), Sensor: require('./Sensor'), SetBody: require('./SetBody'), Sleep: require('./Sleep'), + Static: require('./Static'), Transform: require('./Transform'), Velocity: require('./Velocity') diff --git a/src/physics/matter-js/index.js b/src/physics/matter-js/index.js index ec2ff8b4b..d3d137902 100644 --- a/src/physics/matter-js/index.js +++ b/src/physics/matter-js/index.js @@ -11,7 +11,10 @@ module.exports = { BodyBounds: require('./BodyBounds'), + Components: require('./components'), + Events: require('./events'), Factory: require('./Factory'), + MatterGameObject: require('./MatterGameObject'), Image: require('./MatterImage'), Matter: require('./CustomMain'), MatterPhysics: require('./MatterPhysics'), @@ -20,6 +23,7 @@ module.exports = { TileBody: require('./MatterTileBody'), PhysicsEditorParser: require('./PhysicsEditorParser'), PhysicsJSONParser: require('./PhysicsJSONParser'), + PointerConstraint: require('./PointerConstraint'), World: require('./World') }; diff --git a/src/plugins/DefaultPlugins.js b/src/plugins/DefaultPlugins.js index 8558c2932..5a1359478 100644 --- a/src/plugins/DefaultPlugins.js +++ b/src/plugins/DefaultPlugins.js @@ -6,7 +6,7 @@ /** * @typedef {object} Phaser.Plugins.DefaultPlugins - * + * * @property {array} Global - These are the Global Managers that are created by the Phaser.Game instance. * @property {array} CoreScene - These are the core plugins that are installed into every Scene.Systems instance, no matter what. * @property {array} DefaultScene - These plugins are created in Scene.Systems in addition to the CoreScenePlugins. @@ -17,8 +17,8 @@ var DefaultPlugins = { /** * These are the Global Managers that are created by the Phaser.Game instance. * They are referenced from Scene.Systems so that plugins can use them. - * - * @name Phaser.Plugins.Global + * + * @name Phaser.Plugins.DefaultPlugins.Global * @type {array} * @since 3.0.0 */ @@ -38,10 +38,10 @@ var DefaultPlugins = { /** * These are the core plugins that are installed into every Scene.Systems instance, no matter what. * They are optionally exposed in the Scene as well (see the InjectionMap for details) - * + * * They are created in the order in which they appear in this array and EventEmitter is always first. - * - * @name Phaser.Plugins.CoreScene + * + * @name Phaser.Plugins.DefaultPlugins.CoreScene * @type {array} * @since 3.0.0 */ @@ -60,16 +60,16 @@ var DefaultPlugins = { /** * These plugins are created in Scene.Systems in addition to the CoreScenePlugins. - * + * * You can elect not to have these plugins by either creating a DefaultPlugins object as part * of the Game Config, by creating a Plugins object as part of a Scene Config, or by modifying this array * and building your own bundle. - * + * * They are optionally exposed in the Scene as well (see the InjectionMap for details) - * + * * They are always created in the order in which they appear in the array. - * - * @name Phaser.Plugins.DefaultScene + * + * @name Phaser.Plugins.DefaultPlugins.DefaultScene * @type {array} * @since 3.0.0 */ diff --git a/src/scene/index.js b/src/scene/index.js index 3367e2dab..d92ec5951 100644 --- a/src/scene/index.js +++ b/src/scene/index.js @@ -14,6 +14,8 @@ var Extend = require('../utils/object/Extend'); var Scene = { Events: require('./events'), + GetPhysicsPlugins: require('./GetPhysicsPlugins'), + GetScenePlugins: require('./GetScenePlugins'), SceneManager: require('./SceneManager'), ScenePlugin: require('./ScenePlugin'), Settings: require('./Settings'), diff --git a/src/structs/index.js b/src/structs/index.js index 5de1cb78a..efeb4a8aa 100644 --- a/src/structs/index.js +++ b/src/structs/index.js @@ -10,6 +10,7 @@ module.exports = { + Events: require('./events'), List: require('./List'), Map: require('./Map'), ProcessQueue: require('./ProcessQueue'), diff --git a/src/tilemaps/components/index.js b/src/tilemaps/components/index.js index 8f16bcd4b..d77fc7580 100644 --- a/src/tilemaps/components/index.js +++ b/src/tilemaps/components/index.js @@ -41,6 +41,8 @@ module.exports = { SetCollisionByExclusion: require('./SetCollisionByExclusion'), SetCollisionByProperty: require('./SetCollisionByProperty'), SetCollisionFromCollisionGroup: require('./SetCollisionFromCollisionGroup'), + SetLayerCollisionIndex: require('./SetLayerCollisionIndex'), + SetTileCollision: require('./SetTileCollision'), SetTileIndexCallback: require('./SetTileIndexCallback'), SetTileLocationCallback: require('./SetTileLocationCallback'), Shuffle: require('./Shuffle'), diff --git a/src/tilemaps/parsers/tiled/index.js b/src/tilemaps/parsers/tiled/index.js index 9f047d9dd..4d7b4965e 100644 --- a/src/tilemaps/parsers/tiled/index.js +++ b/src/tilemaps/parsers/tiled/index.js @@ -13,6 +13,7 @@ module.exports = { AssignTileProperties: require('./AssignTileProperties'), Base64Decode: require('./Base64Decode'), BuildTilesetIndex: require('./BuildTilesetIndex'), + CreateGroupLayer: require('./CreateGroupLayer'), ParseGID: require('./ParseGID'), ParseImageLayers: require('./ParseImageLayers'), ParseJSONTiled: require('./ParseJSONTiled'), diff --git a/src/utils/array/StableSort.js b/src/utils/array/StableSort.js index 7a7812bcb..0e976478c 100644 --- a/src/utils/array/StableSort.js +++ b/src/utils/array/StableSort.js @@ -35,6 +35,7 @@ var stable = function(arr, comp) { * @function Phaser.Utils.Array.StableSortFunctions.inplace * @memberof Phaser.Utils.Array.StableSortFunctions * @since 3.0.0 + * @ignore * * @param {array} arr - The input array. * @param {function} comp - The comparison handler. @@ -139,4 +140,4 @@ else { window.stable = stable; } -})(); \ No newline at end of file +})(); diff --git a/src/utils/index.js b/src/utils/index.js index 8f34d0e3f..3501be7f3 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -13,6 +13,7 @@ module.exports = { Array: require('./array/'), Base64: require('./base64/'), Objects: require('./object/'), - String: require('./string/') + String: require('./string/'), + NOOP: require('./NOOP') }; From 5d565d163713dbef3e6d800370bc8f158e36f254 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 1 Sep 2020 20:28:45 +0100 Subject: [PATCH 152/241] Update CHANGELOG.md --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f1d07801b..0f20cc419 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -287,6 +287,15 @@ The way in which Game Objects add themselves to the Scene Update List has change * The `Phaser.Input.CreatePixelPerfectHandler` function has now been exposed on the Phaser namespace (thanks @samme) * The `Phaser.Physics.Arcade.Components.OverlapCirc` function has now been exposed on the Phaser namespace (thanks @samme) * The `Phaser.Physics.Arcade.Components.OverlapRect` function has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.Physics.Arcade.Tilemap` namespace has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.Physics.Matter.Components` namespace has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.Physics.Matter.Events` namespace has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.Physics.Matter.MatterGameObject` class has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.Physics.Matter.PointerConstraint` class has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.Scenes.GetPhysicsPlugins` function has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.Scenes.GetScenePlugins` function has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.Structs.Events` namespace has now been exposed on the Phaser namespace (thanks @samme) +* The `Phaser.Tilemaps.Parsers.Tiled` function has now been exposed on the Phaser namespace (thanks @samme) ### Bug Fixes From 288d023babcea99d81e0fa5cddb22aaed7cfb7b7 Mon Sep 17 00:00:00 2001 From: samme Date: Tue, 1 Sep 2020 12:40:15 -0700 Subject: [PATCH 153/241] Reset keys when scene sleeps or pauses #5281 --- src/input/keyboard/KeyboardPlugin.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/input/keyboard/KeyboardPlugin.js b/src/input/keyboard/KeyboardPlugin.js index 33a63d14e..14eaf9623 100644 --- a/src/input/keyboard/KeyboardPlugin.js +++ b/src/input/keyboard/KeyboardPlugin.js @@ -15,6 +15,7 @@ var Key = require('./keys/Key'); var KeyCodes = require('./keys/KeyCodes'); var KeyCombo = require('./combo/KeyCombo'); var KeyMap = require('./keys/KeyMap'); +var SceneEvents = require('../../scene/events'); var SnapFloor = require('../../math/snap/SnapFloor'); /** @@ -210,6 +211,9 @@ var KeyboardPlugin = new Class({ this.sceneInputPlugin.pluginEvents.once(InputEvents.SHUTDOWN, this.shutdown, this); this.game.events.on(GameEvents.BLUR, this.resetKeys, this); + + this.scene.sys.events.on(SceneEvents.PAUSE, this.resetKeys, this); + this.scene.sys.events.on(SceneEvents.SLEEP, this.resetKeys, this); }, /** @@ -853,6 +857,9 @@ var KeyboardPlugin = new Class({ this.game.events.off(GameEvents.BLUR, this.resetKeys); + this.scene.sys.events.off(SceneEvents.PAUSE, this.resetKeys, this); + this.scene.sys.events.off(SceneEvents.SLEEP, this.resetKeys, this); + this.removeAllListeners(); this.queue = []; From a12fb3e93fd8ad87b4951cb52b03b332efde7fac Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 2 Sep 2020 11:14:42 +0100 Subject: [PATCH 154/241] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f20cc419..92aced533 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -275,6 +275,10 @@ The way in which Game Objects add themselves to the Scene Update List has change * The `WebGLRenderer.rebindPipeline` method has been changed slightly. Previously, you had to specify the `pipelineInstance`, but this is now optional. If you don't, it will use the new `previousPipeline` property instead. If not set, or none given, it will now return without throwing gl errors as well. * If `inputWindowEvents` is set in the Game Config, then the `MouseManager` will now listen for the events on `window.top` instead of just `window`, which should help in situations where the pointer is released outside of an embedded iframe. Fix #4824 (thanks @rexrainbow) * `Types.GameObjects.Text.GetTextSizeObject` is a new type def for the GetTextSize function results. +* The `Arcade.Body.resetFlags` method has a new optional boolean parameter `clear`. If set, it clears the `wasTouching` flags on the Body. This happens automatically when `Body.reset` is called. Previous to this, the flags were not reset until the next physics step (thanks @samme) + +### Namespace Updates + * The `Phaser.Curves.MoveTo` function has now been exposed on the Phaser namespace (thanks @samme) * The `Phaser.DOM.GetInnerHeight` function has now been exposed on the Phaser namespace (thanks @samme) * The `Phaser.GameObjects.Bob` class has now been exposed on the Phaser namespace (thanks @samme) From 0d934c730ea8183e74ef16890828a6d848d342cb Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 2 Sep 2020 11:54:24 +0100 Subject: [PATCH 155/241] Every single `Tilemap.Component` function has now been made public. This means you can call the Component functions directly, should you need to, outside of the Tilemap system. --- CHANGELOG.md | 1 + src/tilemaps/components/CalculateFacesAt.js | 32 +++++++++++++---- .../components/CalculateFacesWithin.js | 1 - src/tilemaps/components/Copy.js | 2 +- src/tilemaps/components/CreateFromTiles.js | 14 ++++---- src/tilemaps/components/CullTiles.js | 1 - src/tilemaps/components/Fill.js | 1 - src/tilemaps/components/FilterTiles.js | 4 +-- src/tilemaps/components/FindByIndex.js | 1 - src/tilemaps/components/FindTile.js | 1 - src/tilemaps/components/ForEachTile.js | 1 - src/tilemaps/components/GetTileAt.js | 3 +- src/tilemaps/components/GetTileAtWorldXY.js | 3 +- src/tilemaps/components/GetTilesWithin.js | 24 ++++++++++--- .../components/GetTilesWithinShape.js | 36 ++++++++++++++++--- .../components/GetTilesWithinWorldXY.js | 3 +- src/tilemaps/components/HasTileAt.js | 5 ++- src/tilemaps/components/HasTileAtWorldXY.js | 3 +- src/tilemaps/components/IsInLayerBounds.js | 3 +- src/tilemaps/components/PutTileAt.js | 5 +-- src/tilemaps/components/PutTileAtWorldXY.js | 2 +- src/tilemaps/components/PutTilesAt.js | 3 +- src/tilemaps/components/Randomize.js | 2 +- src/tilemaps/components/RemoveTileAt.js | 1 - .../components/RemoveTileAtWorldXY.js | 2 +- src/tilemaps/components/RenderDebug.js | 1 - src/tilemaps/components/ReplaceByIndex.js | 1 - src/tilemaps/components/SetCollision.js | 3 +- .../components/SetCollisionBetween.js | 3 +- .../components/SetCollisionByExclusion.js | 1 - .../components/SetCollisionByProperty.js | 1 - .../SetCollisionFromCollisionGroup.js | 1 - .../components/SetLayerCollisionIndex.js | 1 - src/tilemaps/components/SetTileCollision.js | 1 - .../components/SetTileIndexCallback.js | 1 - .../components/SetTileLocationCallback.js | 2 -- src/tilemaps/components/Shuffle.js | 2 +- src/tilemaps/components/SwapByIndex.js | 2 +- src/tilemaps/components/TileToWorldX.js | 3 +- src/tilemaps/components/TileToWorldXY.js | 3 +- src/tilemaps/components/TileToWorldY.js | 3 +- src/tilemaps/components/WeightedRandomize.js | 4 ++- src/tilemaps/components/WorldToTileX.js | 3 +- src/tilemaps/components/WorldToTileXY.js | 3 +- src/tilemaps/components/WorldToTileY.js | 3 +- 45 files changed, 113 insertions(+), 83 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 92aced533..7f3d27b00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -300,6 +300,7 @@ The way in which Game Objects add themselves to the Scene Update List has change * The `Phaser.Scenes.GetScenePlugins` function has now been exposed on the Phaser namespace (thanks @samme) * The `Phaser.Structs.Events` namespace has now been exposed on the Phaser namespace (thanks @samme) * The `Phaser.Tilemaps.Parsers.Tiled` function has now been exposed on the Phaser namespace (thanks @samme) +* Every single `Tilemap.Component` function has now been made public. This means you can call the Component functions directly, should you need to, outside of the Tilemap system. ### Bug Fixes diff --git a/src/tilemaps/components/CalculateFacesAt.js b/src/tilemaps/components/CalculateFacesAt.js index 23fb2314d..0df3e5ff8 100644 --- a/src/tilemaps/components/CalculateFacesAt.js +++ b/src/tilemaps/components/CalculateFacesAt.js @@ -12,9 +12,8 @@ var GetTileAt = require('./GetTileAt'); * internally to optimize recalculating faces when only one tile has been changed. * * @function Phaser.Tilemaps.Components.CalculateFacesAt - * @private * @since 3.0.0 - * + * * @param {integer} tileX - The x coordinate. * @param {integer} tileY - The y coordinate. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. @@ -40,29 +39,48 @@ var CalculateFacesAt = function (tileX, tileY, layer) // Reset edges that are shared between tile and its neighbors if (above && above.collides) { - if (tileCollides) { tile.faceTop = false; } + if (tileCollides) + { + tile.faceTop = false; + } + above.faceBottom = !tileCollides; } if (below && below.collides) { - if (tileCollides) { tile.faceBottom = false; } + if (tileCollides) + { + tile.faceBottom = false; + } + below.faceTop = !tileCollides; } if (left && left.collides) { - if (tileCollides) { tile.faceLeft = false; } + if (tileCollides) + { + tile.faceLeft = false; + } + left.faceRight = !tileCollides; } if (right && right.collides) { - if (tileCollides) { tile.faceRight = false; } + if (tileCollides) + { + tile.faceRight = false; + } + right.faceLeft = !tileCollides; } - if (tile && !tile.collides) { tile.resetFaces(); } + if (tile && !tile.collides) + { + tile.resetFaces(); + } return tile; }; diff --git a/src/tilemaps/components/CalculateFacesWithin.js b/src/tilemaps/components/CalculateFacesWithin.js index 3bb10047a..f3a4af456 100644 --- a/src/tilemaps/components/CalculateFacesWithin.js +++ b/src/tilemaps/components/CalculateFacesWithin.js @@ -13,7 +13,6 @@ var GetTilesWithin = require('./GetTilesWithin'); * is mostly used internally. * * @function Phaser.Tilemaps.Components.CalculateFacesWithin - * @private * @since 3.0.0 * * @param {integer} tileX - The left most tile index (in tile coordinates) to use as the origin of the area. diff --git a/src/tilemaps/components/Copy.js b/src/tilemaps/components/Copy.js index e28bff680..5fc3993c3 100644 --- a/src/tilemaps/components/Copy.js +++ b/src/tilemaps/components/Copy.js @@ -13,7 +13,6 @@ var CalculateFacesWithin = require('./CalculateFacesWithin'); * information in the destination region. * * @function Phaser.Tilemaps.Components.Copy - * @private * @since 3.0.0 * * @param {integer} srcTileX - The x coordinate of the area to copy from, in tiles, not pixels. @@ -40,6 +39,7 @@ var Copy = function (srcTileX, srcTileY, width, height, destTileX, destTileY, re { var tileX = srcTiles[i].x + offsetX; var tileY = srcTiles[i].y + offsetY; + if (tileX >= 0 && tileX < layer.width && tileY >= 0 && tileY < layer.height) { if (layer.data[tileY][tileX]) diff --git a/src/tilemaps/components/CreateFromTiles.js b/src/tilemaps/components/CreateFromTiles.js index ca09f147d..0d7fbacb7 100644 --- a/src/tilemaps/components/CreateFromTiles.js +++ b/src/tilemaps/components/CreateFromTiles.js @@ -16,11 +16,10 @@ var ReplaceByIndex = require('./ReplaceByIndex'); * Sprites, but want to replace the tile itself with a floor tile or similar once converted. * * @function Phaser.Tilemaps.Components.CreateFromTiles - * @private * @since 3.0.0 * - * @param {(integer|array)} indexes - The tile index, or array of indexes, to create Sprites from. - * @param {(integer|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 {(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 {Phaser.Types.GameObjects.Sprite.SpriteConfig} spriteConfig - The config object to pass into the Sprite creator (i.e. scene.make.sprite). * @param {Phaser.Scene} [scene=scene the map is within] - The Scene to create the Sprites within. * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when determining the world XY @@ -32,9 +31,13 @@ var CreateFromTiles = function (indexes, replacements, spriteConfig, scene, came { if (spriteConfig === undefined) { spriteConfig = {}; } - if (!Array.isArray(indexes)) { indexes = [ indexes ]; } + if (!Array.isArray(indexes)) + { + indexes = [ indexes ]; + } var tilemapLayer = layer.tilemapLayer; + if (scene === undefined) { scene = tilemapLayer.scene; } if (camera === undefined) { camera = scene.cameras.main; } @@ -51,8 +54,7 @@ var CreateFromTiles = function (indexes, replacements, spriteConfig, scene, came spriteConfig.x = TileToWorldX(tile.x, camera, layer); spriteConfig.y = TileToWorldY(tile.y, camera, layer); - var sprite = scene.make.sprite(spriteConfig); - sprites.push(sprite); + sprites.push(scene.make.sprite(spriteConfig)); } } diff --git a/src/tilemaps/components/CullTiles.js b/src/tilemaps/components/CullTiles.js index 8d400f2e7..15a1645ba 100644 --- a/src/tilemaps/components/CullTiles.js +++ b/src/tilemaps/components/CullTiles.js @@ -11,7 +11,6 @@ var SnapCeil = require('../../math/snap/SnapCeil'); * Returns the tiles in the given layer that are within the camera's viewport. This is used internally. * * @function Phaser.Tilemaps.Components.CullTiles - * @private * @since 3.0.0 * * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. diff --git a/src/tilemaps/components/Fill.js b/src/tilemaps/components/Fill.js index 545d80a22..5598a593e 100644 --- a/src/tilemaps/components/Fill.js +++ b/src/tilemaps/components/Fill.js @@ -14,7 +14,6 @@ var SetTileCollision = require('./SetTileCollision'); * Collision information in the region will be recalculated. * * @function Phaser.Tilemaps.Components.Fill - * @private * @since 3.0.0 * * @param {integer} index - The tile index to fill the area with. diff --git a/src/tilemaps/components/FilterTiles.js b/src/tilemaps/components/FilterTiles.js index a8ed61193..85d141303 100644 --- a/src/tilemaps/components/FilterTiles.js +++ b/src/tilemaps/components/FilterTiles.js @@ -12,7 +12,6 @@ var GetTilesWithin = require('./GetTilesWithin'); * true) will returned as a new array. Similar to Array.prototype.Filter in vanilla JS. * * @function Phaser.Tilemaps.Components.FilterTiles - * @private * @since 3.0.0 * * @param {function} callback - The callback. Each tile in the given area will be passed to this @@ -28,7 +27,7 @@ var GetTilesWithin = require('./GetTilesWithin'); * @param {boolean} [filteringOptions.isColliding=false] - If true, only return tiles that collide on at least one side. * @param {boolean} [filteringOptions.hasInterestingFace=false] - If true, only return tiles that have at least one interesting face. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {Phaser.Tilemaps.Tile[]} The filtered array of Tiles. */ var FilterTiles = function (callback, context, tileX, tileY, width, height, filteringOptions, layer) @@ -39,4 +38,3 @@ var FilterTiles = function (callback, context, tileX, tileY, width, height, filt }; module.exports = FilterTiles; - diff --git a/src/tilemaps/components/FindByIndex.js b/src/tilemaps/components/FindByIndex.js index bb7ef8499..07c5d24f0 100644 --- a/src/tilemaps/components/FindByIndex.js +++ b/src/tilemaps/components/FindByIndex.js @@ -12,7 +12,6 @@ * the top-left. * * @function Phaser.Tilemaps.Components.FindByIndex - * @private * @since 3.0.0 * * @param {integer} index - The tile index value to search for. diff --git a/src/tilemaps/components/FindTile.js b/src/tilemaps/components/FindTile.js index d23229ea2..8899f6954 100644 --- a/src/tilemaps/components/FindTile.js +++ b/src/tilemaps/components/FindTile.js @@ -22,7 +22,6 @@ var GetTilesWithin = require('./GetTilesWithin'); * true. Similar to Array.prototype.find in vanilla JS. * * @function Phaser.Tilemaps.Components.FindTile - * @private * @since 3.0.0 * * @param {FindTileCallback} callback - The callback. Each tile in the given area will be passed to this callback as the first and only parameter. diff --git a/src/tilemaps/components/ForEachTile.js b/src/tilemaps/components/ForEachTile.js index 0ea6c0b10..49d38910d 100644 --- a/src/tilemaps/components/ForEachTile.js +++ b/src/tilemaps/components/ForEachTile.js @@ -19,7 +19,6 @@ var GetTilesWithin = require('./GetTilesWithin'); * callback. Similar to Array.prototype.forEach in vanilla JS. * * @function Phaser.Tilemaps.Components.ForEachTile - * @private * @since 3.0.0 * * @param {EachTileCallback} callback - The callback. Each tile in the given area will be passed to this callback as the first and only parameter. diff --git a/src/tilemaps/components/GetTileAt.js b/src/tilemaps/components/GetTileAt.js index 10bc3c657..4929580a2 100644 --- a/src/tilemaps/components/GetTileAt.js +++ b/src/tilemaps/components/GetTileAt.js @@ -10,14 +10,13 @@ var IsInLayerBounds = require('./IsInLayerBounds'); * Gets a tile at the given tile coordinates from the given layer. * * @function Phaser.Tilemaps.Components.GetTileAt - * @private * @since 3.0.0 * * @param {integer} tileX - X position to get the tile from (given in tile units, not pixels). * @param {integer} tileY - Y position to get the tile from (given in tile units, not pixels). * @param {boolean} [nonNull=false] - If true getTile won't return null for empty tiles, but a Tile object with an index of -1. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {Phaser.Tilemaps.Tile} The tile at the given coordinates or null if no tile was found or the coordinates * were invalid. */ diff --git a/src/tilemaps/components/GetTileAtWorldXY.js b/src/tilemaps/components/GetTileAtWorldXY.js index f5632a44d..a24c1ee43 100644 --- a/src/tilemaps/components/GetTileAtWorldXY.js +++ b/src/tilemaps/components/GetTileAtWorldXY.js @@ -12,7 +12,6 @@ var WorldToTileY = require('./WorldToTileY'); * Gets a tile at the given world coordinates from the given layer. * * @function Phaser.Tilemaps.Components.GetTileAtWorldXY - * @private * @since 3.0.0 * * @param {number} worldX - X position to get the tile from (given in pixels) @@ -20,7 +19,7 @@ var WorldToTileY = require('./WorldToTileY'); * @param {boolean} [nonNull=false] - If true, function won't return null for empty tiles, but a Tile object with an index of -1. * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {Phaser.Tilemaps.Tile} The tile at the given coordinates or null if no tile was found or the coordinates * were invalid. */ diff --git a/src/tilemaps/components/GetTilesWithin.js b/src/tilemaps/components/GetTilesWithin.js index 0a9e43b5e..c8cec51fa 100644 --- a/src/tilemaps/components/GetTilesWithin.js +++ b/src/tilemaps/components/GetTilesWithin.js @@ -10,7 +10,6 @@ var GetFastValue = require('../../utils/object/GetFastValue'); * Gets the tiles in the given rectangular area (in tile coordinates) of the layer. * * @function Phaser.Tilemaps.Components.GetTilesWithin - * @private * @since 3.0.0 * * @param {integer} tileX - The left most tile index (in tile coordinates) to use as the origin of the area. @@ -19,7 +18,7 @@ var GetFastValue = require('../../utils/object/GetFastValue'); * @param {integer} height - How many tiles tall from the `tileY` index the area will be. * @param {Phaser.Types.Tilemaps.GetTilesWithinFilteringOptions} GetTilesWithinFilteringOptions - Optional filters to apply when getting the tiles. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {Phaser.Tilemaps.Tile[]} Array of Tile objects. */ var GetTilesWithin = function (tileX, tileY, width, height, filteringOptions, layer) @@ -39,6 +38,7 @@ var GetTilesWithin = function (tileX, tileY, width, height, filteringOptions, la width += tileX; tileX = 0; } + if (tileY < 0) { height += tileY; @@ -50,6 +50,7 @@ var GetTilesWithin = function (tileX, tileY, width, height, filteringOptions, la { width = Math.max(layer.width - tileX, 0); } + if (tileY + height > layer.height) { height = Math.max(layer.height - tileY, 0); @@ -62,11 +63,24 @@ var GetTilesWithin = function (tileX, tileY, width, height, filteringOptions, la for (var tx = tileX; tx < tileX + width; tx++) { var tile = layer.data[ty][tx]; + if (tile !== null) { - if (isNotEmpty && tile.index === -1) { continue; } - if (isColliding && !tile.collides) { continue; } - if (hasInterestingFace && !tile.hasInterestingFace) { continue; } + if (isNotEmpty && tile.index === -1) + { + continue; + } + + if (isColliding && !tile.collides) + { + continue; + } + + if (hasInterestingFace && !tile.hasInterestingFace) + { + continue; + } + results.push(tile); } } diff --git a/src/tilemaps/components/GetTilesWithinShape.js b/src/tilemaps/components/GetTilesWithinShape.js index 0220b3160..e1beab18d 100644 --- a/src/tilemaps/components/GetTilesWithinShape.js +++ b/src/tilemaps/components/GetTilesWithinShape.js @@ -26,7 +26,6 @@ var TriangleToRectangle = function (triangle, rect) * Line, Rectangle or Triangle. The shape should be in world coordinates. * * @function Phaser.Tilemaps.Components.GetTilesWithinShape - * @private * @since 3.0.0 * * @param {(Phaser.Geom.Circle|Phaser.Geom.Line|Phaser.Geom.Rectangle|Phaser.Geom.Triangle)} shape - A shape in world (pixel) coordinates @@ -45,10 +44,33 @@ var GetTilesWithinShape = function (shape, filteringOptions, camera, layer) // intersectTest is a function with parameters: shape, rect var intersectTest = NOOP; - if (shape instanceof Geom.Circle) { intersectTest = Intersects.CircleToRectangle; } - else if (shape instanceof Geom.Rectangle) { intersectTest = Intersects.RectangleToRectangle; } - else if (shape instanceof Geom.Triangle) { intersectTest = TriangleToRectangle; } - else if (shape instanceof Geom.Line) { intersectTest = Intersects.LineToRectangle; } + + switch (typeof(shape)) + { + case Geom.Circle: + { + intersectTest = Intersects.CircleToRectangle; + break; + } + + case Geom.Rectangle: + { + intersectTest = Intersects.RectangleToRectangle; + break; + } + + case Geom.Triangle: + { + intersectTest = TriangleToRectangle; + break; + } + + case Geom.Line: + { + intersectTest = Intersects.LineToRectangle; + break; + } + } // Top left corner of the shapes's bounding box, rounded down to include partial tiles var xStart = WorldToTileX(shape.left, true, camera, layer); @@ -66,6 +88,7 @@ var GetTilesWithinShape = function (shape, filteringOptions, camera, layer) var tileWidth = layer.tileWidth; var tileHeight = layer.tileHeight; + if (layer.tilemapLayer) { tileWidth *= layer.tilemapLayer.scaleX; @@ -74,11 +97,14 @@ var GetTilesWithinShape = function (shape, filteringOptions, camera, layer) var results = []; var tileRect = new Geom.Rectangle(0, 0, tileWidth, tileHeight); + for (var i = 0; i < tiles.length; i++) { var tile = tiles[i]; + tileRect.x = TileToWorldX(tile.x, camera, layer); tileRect.y = TileToWorldY(tile.y, camera, layer); + if (intersectTest(shape, tileRect)) { results.push(tile); diff --git a/src/tilemaps/components/GetTilesWithinWorldXY.js b/src/tilemaps/components/GetTilesWithinWorldXY.js index ec4be5fa6..50815fda3 100644 --- a/src/tilemaps/components/GetTilesWithinWorldXY.js +++ b/src/tilemaps/components/GetTilesWithinWorldXY.js @@ -12,7 +12,6 @@ var WorldToTileY = require('./WorldToTileY'); * Gets the tiles in the given rectangular area (in world coordinates) of the layer. * * @function Phaser.Tilemaps.Components.GetTilesWithinWorldXY - * @private * @since 3.0.0 * * @param {number} worldX - The world x coordinate for the top-left of the area. @@ -25,7 +24,7 @@ var WorldToTileY = require('./WorldToTileY'); * @param {boolean} [filteringOptions.hasInterestingFace=false] - If true, only return tiles that have at least one interesting face. * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {Phaser.Tilemaps.Tile[]} Array of Tile objects. */ var GetTilesWithinWorldXY = function (worldX, worldY, width, height, filteringOptions, camera, layer) diff --git a/src/tilemaps/components/HasTileAt.js b/src/tilemaps/components/HasTileAt.js index a87e87fe8..567e1e9b2 100644 --- a/src/tilemaps/components/HasTileAt.js +++ b/src/tilemaps/components/HasTileAt.js @@ -11,13 +11,12 @@ var IsInLayerBounds = require('./IsInLayerBounds'); * false if there is no tile or if the tile at that location has an index of -1. * * @function Phaser.Tilemaps.Components.HasTileAt - * @private * @since 3.0.0 * * @param {integer} tileX - X position to get the tile from (given in tile units, not pixels). * @param {integer} tileY - Y position to get the tile from (given in tile units, not pixels). * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {?boolean} Returns a boolean, or null if the layer given was invalid. */ var HasTileAt = function (tileX, tileY, layer) @@ -25,13 +24,13 @@ var HasTileAt = function (tileX, tileY, layer) if (IsInLayerBounds(tileX, tileY, layer)) { var tile = layer.data[tileY][tileX]; + return (tile !== null && tile.index > -1); } else { return false; } - }; module.exports = HasTileAt; diff --git a/src/tilemaps/components/HasTileAtWorldXY.js b/src/tilemaps/components/HasTileAtWorldXY.js index 5face02c9..b52cfe6dc 100644 --- a/src/tilemaps/components/HasTileAtWorldXY.js +++ b/src/tilemaps/components/HasTileAtWorldXY.js @@ -13,14 +13,13 @@ var WorldToTileY = require('./WorldToTileY'); * false if there is no tile or if the tile at that location has an index of -1. * * @function Phaser.Tilemaps.Components.HasTileAtWorldXY - * @private * @since 3.0.0 * * @param {number} worldX - The X coordinate of the world position. * @param {number} worldY - The Y coordinate of the world position. * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {?boolean} Returns a boolean, or null if the layer given was invalid. */ var HasTileAtWorldXY = function (worldX, worldY, camera, layer) diff --git a/src/tilemaps/components/IsInLayerBounds.js b/src/tilemaps/components/IsInLayerBounds.js index fa2dd2428..8b78e9d14 100644 --- a/src/tilemaps/components/IsInLayerBounds.js +++ b/src/tilemaps/components/IsInLayerBounds.js @@ -8,13 +8,12 @@ * Checks if the given tile coordinates are within the bounds of the layer. * * @function Phaser.Tilemaps.Components.IsInLayerBounds - * @private * @since 3.0.0 * * @param {integer} tileX - The x coordinate, in tiles, not pixels. * @param {integer} tileY - The y coordinate, in tiles, not pixels. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {boolean} `true` if the tile coordinates are within the bounds of the layer, otherwise `false`. */ var IsInLayerBounds = function (tileX, tileY, layer) diff --git a/src/tilemaps/components/PutTileAt.js b/src/tilemaps/components/PutTileAt.js index ba7a03e29..d9b632c45 100644 --- a/src/tilemaps/components/PutTileAt.js +++ b/src/tilemaps/components/PutTileAt.js @@ -16,7 +16,6 @@ var SetTileCollision = require('./SetTileCollision'); * Collision information will be recalculated at the specified location. * * @function Phaser.Tilemaps.Components.PutTileAt - * @private * @since 3.0.0 * * @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object. @@ -41,11 +40,13 @@ var PutTileAt = function (tile, tileX, tileY, recalculateFaces, layer) { layer.data[tileY][tileX] = new Tile(layer, tile.index, tileX, tileY, tile.width, tile.height); } + layer.data[tileY][tileX].copy(tile); } else { var index = tile; + if (layer.data[tileY][tileX] === null) { layer.data[tileY][tileX] = new Tile(layer, index, tileX, tileY, layer.tileWidth, layer.tileHeight); @@ -59,6 +60,7 @@ var PutTileAt = function (tile, tileX, tileY, recalculateFaces, layer) // Updating colliding flag on the new tile var newTile = layer.data[tileY][tileX]; var collides = layer.collideIndexes.indexOf(newTile.index) !== -1; + SetTileCollision(newTile, collides); // Recalculate faces only if the colliding flag at (tileX, tileY) has changed @@ -71,4 +73,3 @@ var PutTileAt = function (tile, tileX, tileY, recalculateFaces, layer) }; module.exports = PutTileAt; - diff --git a/src/tilemaps/components/PutTileAtWorldXY.js b/src/tilemaps/components/PutTileAtWorldXY.js index fc6b97dc4..97d627b1d 100644 --- a/src/tilemaps/components/PutTileAtWorldXY.js +++ b/src/tilemaps/components/PutTileAtWorldXY.js @@ -15,7 +15,6 @@ var WorldToTileY = require('./WorldToTileY'); * changed. Collision information will be recalculated at the specified location. * * @function Phaser.Tilemaps.Components.PutTileAtWorldXY - * @private * @since 3.0.0 * * @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object. @@ -31,6 +30,7 @@ var PutTileAtWorldXY = function (tile, worldX, worldY, recalculateFaces, camera, { var tileX = WorldToTileX(worldX, true, camera, layer); var tileY = WorldToTileY(worldY, true, camera, layer); + return PutTileAt(tile, tileX, tileY, recalculateFaces, layer); }; diff --git a/src/tilemaps/components/PutTilesAt.js b/src/tilemaps/components/PutTilesAt.js index 6ab2335f0..779ef736b 100644 --- a/src/tilemaps/components/PutTilesAt.js +++ b/src/tilemaps/components/PutTilesAt.js @@ -15,7 +15,6 @@ var PutTileAt = require('./PutTileAt'); * within the region tiles were changed. * * @function Phaser.Tilemaps.Components.PutTilesAt - * @private * @since 3.0.0 * * @param {(integer[]|integer[][]|Phaser.Tilemaps.Tile[]|Phaser.Tilemaps.Tile[][])} tile - A row (array) or grid (2D array) of Tiles or tile indexes to place. @@ -43,6 +42,7 @@ var PutTilesAt = function (tilesArray, tileX, tileY, recalculateFaces, layer) for (var tx = 0; tx < width; tx++) { var tile = tilesArray[ty][tx]; + PutTileAt(tile, tileX + tx, tileY + ty, false, layer); } } @@ -55,4 +55,3 @@ var PutTilesAt = function (tilesArray, tileX, tileY, recalculateFaces, layer) }; module.exports = PutTilesAt; - diff --git a/src/tilemaps/components/Randomize.js b/src/tilemaps/components/Randomize.js index 84f835823..dca996bfa 100644 --- a/src/tilemaps/components/Randomize.js +++ b/src/tilemaps/components/Randomize.js @@ -15,7 +15,6 @@ var GetRandom = require('../../utils/array/GetRandom'); * indexes. This method only modifies tile indexes and does not change collision information. * * @function Phaser.Tilemaps.Components.Randomize - * @private * @since 3.0.0 * * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area. @@ -34,6 +33,7 @@ var Randomize = function (tileX, tileY, width, height, indexes, layer) if (indexes === undefined) { indexes = []; + for (i = 0; i < tiles.length; i++) { if (indexes.indexOf(tiles[i].index) === -1) diff --git a/src/tilemaps/components/RemoveTileAt.js b/src/tilemaps/components/RemoveTileAt.js index d9af5dca6..93d15bf12 100644 --- a/src/tilemaps/components/RemoveTileAt.js +++ b/src/tilemaps/components/RemoveTileAt.js @@ -13,7 +13,6 @@ var CalculateFacesAt = require('./CalculateFacesAt'); * collision information. * * @function Phaser.Tilemaps.Components.RemoveTileAt - * @private * @since 3.0.0 * * @param {integer} tileX - The x coordinate. diff --git a/src/tilemaps/components/RemoveTileAtWorldXY.js b/src/tilemaps/components/RemoveTileAtWorldXY.js index f491d166e..5e7319ccc 100644 --- a/src/tilemaps/components/RemoveTileAtWorldXY.js +++ b/src/tilemaps/components/RemoveTileAtWorldXY.js @@ -13,7 +13,6 @@ var WorldToTileY = require('./WorldToTileY'); * collision information. * * @function Phaser.Tilemaps.Components.RemoveTileAtWorldXY - * @private * @since 3.0.0 * * @param {number} worldX - The x coordinate, in pixels. @@ -29,6 +28,7 @@ var RemoveTileAtWorldXY = function (worldX, worldY, replaceWithNull, recalculate { var tileX = WorldToTileX(worldX, true, camera, layer); var tileY = WorldToTileY(worldY, true, camera, layer); + return RemoveTileAt(tileX, tileY, replaceWithNull, recalculateFaces, layer); }; diff --git a/src/tilemaps/components/RenderDebug.js b/src/tilemaps/components/RenderDebug.js index 6d429772d..778d44fa8 100644 --- a/src/tilemaps/components/RenderDebug.js +++ b/src/tilemaps/components/RenderDebug.js @@ -18,7 +18,6 @@ var defaultFaceColor = new Color(40, 39, 37, 150); * wherever you want on the screen. * * @function Phaser.Tilemaps.Components.RenderDebug - * @private * @since 3.0.0 * * @param {Phaser.GameObjects.Graphics} graphics - The target Graphics object to draw upon. diff --git a/src/tilemaps/components/ReplaceByIndex.js b/src/tilemaps/components/ReplaceByIndex.js index 6ecba2d35..fc5e4b0b5 100644 --- a/src/tilemaps/components/ReplaceByIndex.js +++ b/src/tilemaps/components/ReplaceByIndex.js @@ -12,7 +12,6 @@ var GetTilesWithin = require('./GetTilesWithin'); * not change collision information. * * @function Phaser.Tilemaps.Components.ReplaceByIndex - * @private * @since 3.0.0 * * @param {integer} findIndex - The index of the tile to search for. diff --git a/src/tilemaps/components/SetCollision.js b/src/tilemaps/components/SetCollision.js index 6d437e89a..a6f5bb97b 100644 --- a/src/tilemaps/components/SetCollision.js +++ b/src/tilemaps/components/SetCollision.js @@ -14,7 +14,6 @@ var SetLayerCollisionIndex = require('./SetLayerCollisionIndex'); * collision will be enabled (true) or disabled (false). * * @function Phaser.Tilemaps.Components.SetCollision - * @private * @since 3.0.0 * * @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes. @@ -36,7 +35,7 @@ var SetCollision = function (indexes, collides, recalculateFaces, layer, updateL { SetLayerCollisionIndex(indexes[i], collides, layer); } - + // Update the tiles if (updateLayer) { diff --git a/src/tilemaps/components/SetCollisionBetween.js b/src/tilemaps/components/SetCollisionBetween.js index 0781728a0..96fc82544 100644 --- a/src/tilemaps/components/SetCollisionBetween.js +++ b/src/tilemaps/components/SetCollisionBetween.js @@ -15,7 +15,6 @@ var SetLayerCollisionIndex = require('./SetLayerCollisionIndex'); * enabled (true) or disabled (false). * * @function Phaser.Tilemaps.Components.SetCollisionBetween - * @private * @since 3.0.0 * * @param {integer} start - The first index of the tile to be set for collision. @@ -48,7 +47,7 @@ var SetCollisionBetween = function (start, stop, collides, recalculateFaces, lay for (var tx = 0; tx < layer.width; tx++) { var tile = layer.data[ty][tx]; - + if (tile) { if (tile.index >= start && tile.index <= stop) diff --git a/src/tilemaps/components/SetCollisionByExclusion.js b/src/tilemaps/components/SetCollisionByExclusion.js index a0f53351a..0d9e60d84 100644 --- a/src/tilemaps/components/SetCollisionByExclusion.js +++ b/src/tilemaps/components/SetCollisionByExclusion.js @@ -14,7 +14,6 @@ var SetLayerCollisionIndex = require('./SetLayerCollisionIndex'); * disabled (false). Tile indexes not currently in the layer are not affected. * * @function Phaser.Tilemaps.Components.SetCollisionByExclusion - * @private * @since 3.0.0 * * @param {integer[]} indexes - An array of the tile indexes to not be counted for collision. diff --git a/src/tilemaps/components/SetCollisionByProperty.js b/src/tilemaps/components/SetCollisionByProperty.js index b3b887d29..123eb6340 100644 --- a/src/tilemaps/components/SetCollisionByProperty.js +++ b/src/tilemaps/components/SetCollisionByProperty.js @@ -18,7 +18,6 @@ var HasValue = require('../../utils/object/HasValue'); * "types" property that matches any of those values, its collision flag will be updated. * * @function Phaser.Tilemaps.Components.SetCollisionByProperty - * @private * @since 3.0.0 * * @param {object} properties - An object with tile properties and corresponding values that should be checked. diff --git a/src/tilemaps/components/SetCollisionFromCollisionGroup.js b/src/tilemaps/components/SetCollisionFromCollisionGroup.js index a2e103365..5dc8708d8 100644 --- a/src/tilemaps/components/SetCollisionFromCollisionGroup.js +++ b/src/tilemaps/components/SetCollisionFromCollisionGroup.js @@ -14,7 +14,6 @@ var CalculateFacesWithin = require('./CalculateFacesWithin'); * controls if collision will be enabled (true) or disabled (false). * * @function Phaser.Tilemaps.Components.SetCollisionFromCollisionGroup - * @private * @since 3.0.0 * * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision. diff --git a/src/tilemaps/components/SetLayerCollisionIndex.js b/src/tilemaps/components/SetLayerCollisionIndex.js index 6b1e4dd17..67b0d3879 100644 --- a/src/tilemaps/components/SetLayerCollisionIndex.js +++ b/src/tilemaps/components/SetLayerCollisionIndex.js @@ -9,7 +9,6 @@ * updates LayerData.collideIndexes to either contain or not contain the given `tileIndex`. * * @function Phaser.Tilemaps.Components.SetLayerCollisionIndex - * @private * @since 3.0.0 * * @param {integer} tileIndex - The tile index to set the collision boolean for. diff --git a/src/tilemaps/components/SetTileCollision.js b/src/tilemaps/components/SetTileCollision.js index 94f13193b..a9aa6a724 100644 --- a/src/tilemaps/components/SetTileCollision.js +++ b/src/tilemaps/components/SetTileCollision.js @@ -9,7 +9,6 @@ * interesting faces. * * @function Phaser.Tilemaps.Components.SetTileCollision - * @private * @since 3.0.0 * * @param {Phaser.Tilemaps.Tile} tile - The Tile to set the collision on. diff --git a/src/tilemaps/components/SetTileIndexCallback.js b/src/tilemaps/components/SetTileIndexCallback.js index 0608641e6..69b5a1073 100644 --- a/src/tilemaps/components/SetTileIndexCallback.js +++ b/src/tilemaps/components/SetTileIndexCallback.js @@ -11,7 +11,6 @@ * at a specific location on the map then see setTileLocationCallback. * * @function Phaser.Tilemaps.Components.SetTileIndexCallback - * @private * @since 3.0.0 * * @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes to have a collision callback set for. diff --git a/src/tilemaps/components/SetTileLocationCallback.js b/src/tilemaps/components/SetTileLocationCallback.js index c97eb9cc8..c005f3e68 100644 --- a/src/tilemaps/components/SetTileLocationCallback.js +++ b/src/tilemaps/components/SetTileLocationCallback.js @@ -12,7 +12,6 @@ var GetTilesWithin = require('./GetTilesWithin'); * remove it. * * @function Phaser.Tilemaps.Components.SetTileLocationCallback - * @private * @since 3.0.0 * * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area. @@ -31,7 +30,6 @@ var SetTileLocationCallback = function (tileX, tileY, width, height, callback, c { tiles[i].setCollisionCallback(callback, callbackContext); } - }; module.exports = SetTileLocationCallback; diff --git a/src/tilemaps/components/Shuffle.js b/src/tilemaps/components/Shuffle.js index ab51df45e..1d0ba2efc 100644 --- a/src/tilemaps/components/Shuffle.js +++ b/src/tilemaps/components/Shuffle.js @@ -14,7 +14,6 @@ var ShuffleArray = require('../../utils/array/Shuffle'); * information. * * @function Phaser.Tilemaps.Components.Shuffle - * @private * @since 3.0.0 * * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area. @@ -28,6 +27,7 @@ var Shuffle = function (tileX, tileY, width, height, layer) var tiles = GetTilesWithin(tileX, tileY, width, height, null, layer); var indexes = tiles.map(function (tile) { return tile.index; }); + ShuffleArray(indexes); for (var i = 0; i < tiles.length; i++) diff --git a/src/tilemaps/components/SwapByIndex.js b/src/tilemaps/components/SwapByIndex.js index bd74cadde..f0d9f5891 100644 --- a/src/tilemaps/components/SwapByIndex.js +++ b/src/tilemaps/components/SwapByIndex.js @@ -12,7 +12,6 @@ var GetTilesWithin = require('./GetTilesWithin'); * information. * * @function Phaser.Tilemaps.Components.SwapByIndex - * @private * @since 3.0.0 * * @param {integer} tileA - First tile index. @@ -26,6 +25,7 @@ var GetTilesWithin = require('./GetTilesWithin'); var SwapByIndex = function (indexA, indexB, tileX, tileY, width, height, layer) { var tiles = GetTilesWithin(tileX, tileY, width, height, null, layer); + for (var i = 0; i < tiles.length; i++) { if (tiles[i]) diff --git a/src/tilemaps/components/TileToWorldX.js b/src/tilemaps/components/TileToWorldX.js index 8381ec586..11e184f8d 100644 --- a/src/tilemaps/components/TileToWorldX.js +++ b/src/tilemaps/components/TileToWorldX.js @@ -9,13 +9,12 @@ * layer's position, scale and scroll. * * @function Phaser.Tilemaps.Components.TileToWorldX - * @private * @since 3.0.0 * * @param {integer} tileX - The x coordinate, in tiles, not pixels. * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {number} */ var TileToWorldX = function (tileX, camera, layer) diff --git a/src/tilemaps/components/TileToWorldXY.js b/src/tilemaps/components/TileToWorldXY.js index b2fd83adf..567914d59 100644 --- a/src/tilemaps/components/TileToWorldXY.js +++ b/src/tilemaps/components/TileToWorldXY.js @@ -14,7 +14,6 @@ var Vector2 = require('../../math/Vector2'); * `point` object. * * @function Phaser.Tilemaps.Components.TileToWorldXY - * @private * @since 3.0.0 * * @param {integer} tileX - The x coordinate, in tiles, not pixels. @@ -22,7 +21,7 @@ var Vector2 = require('../../math/Vector2'); * @param {Phaser.Math.Vector2} [point] - A Vector2 to store the coordinates in. If not given a new Vector2 is created. * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {Phaser.Math.Vector2} The XY location in world coordinates. */ var TileToWorldXY = function (tileX, tileY, point, camera, layer) diff --git a/src/tilemaps/components/TileToWorldY.js b/src/tilemaps/components/TileToWorldY.js index d3bcd6e0b..f749ca0c2 100644 --- a/src/tilemaps/components/TileToWorldY.js +++ b/src/tilemaps/components/TileToWorldY.js @@ -9,13 +9,12 @@ * layer's position, scale and scroll. * * @function Phaser.Tilemaps.Components.TileToWorldY - * @private * @since 3.0.0 * * @param {integer} tileY - The x coordinate, in tiles, not pixels. * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {number} */ var TileToWorldY = function (tileY, camera, layer) diff --git a/src/tilemaps/components/WeightedRandomize.js b/src/tilemaps/components/WeightedRandomize.js index 8dbd3d672..27b2ea71a 100644 --- a/src/tilemaps/components/WeightedRandomize.js +++ b/src/tilemaps/components/WeightedRandomize.js @@ -22,7 +22,6 @@ var GetTilesWithin = require('./GetTilesWithin'); * method only modifies tile indexes and does not change collision information. * * @function Phaser.Tilemaps.Components.WeightedRandomize - * @private * @since 3.0.0 * * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area. @@ -54,12 +53,15 @@ var WeightedRandomize = function (tileX, tileY, width, height, weightedIndexes, var rand = Math.random() * weightTotal; var sum = 0; var randomIndex = -1; + for (var j = 0; j < weightedIndexes.length; j++) { sum += weightedIndexes[j].weight; + if (rand <= sum) { var chosen = weightedIndexes[j].index; + randomIndex = Array.isArray(chosen) ? chosen[Math.floor(Math.random() * chosen.length)] : chosen; diff --git a/src/tilemaps/components/WorldToTileX.js b/src/tilemaps/components/WorldToTileX.js index 09cb73ad3..8b6d8089c 100644 --- a/src/tilemaps/components/WorldToTileX.js +++ b/src/tilemaps/components/WorldToTileX.js @@ -9,14 +9,13 @@ * layer's position, scale and scroll. * * @function Phaser.Tilemaps.Components.WorldToTileX - * @private * @since 3.0.0 * * @param {number} worldX - The x coordinate to be converted, in pixels, not tiles. * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer. * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {number} The X location in tile units. */ var WorldToTileX = function (worldX, snapToFloor, camera, layer) diff --git a/src/tilemaps/components/WorldToTileXY.js b/src/tilemaps/components/WorldToTileXY.js index 7f315e583..b442990a0 100644 --- a/src/tilemaps/components/WorldToTileXY.js +++ b/src/tilemaps/components/WorldToTileXY.js @@ -14,7 +14,6 @@ var Vector2 = require('../../math/Vector2'); * `point` object. * * @function Phaser.Tilemaps.Components.WorldToTileXY - * @private * @since 3.0.0 * * @param {number} worldX - The x coordinate to be converted, in pixels, not tiles. @@ -23,7 +22,7 @@ var Vector2 = require('../../math/Vector2'); * @param {Phaser.Math.Vector2} [point] - A Vector2 to store the coordinates in. If not given a new Vector2 is created. * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {Phaser.Math.Vector2} The XY location in tile units. */ var WorldToTileXY = function (worldX, worldY, snapToFloor, point, camera, layer) diff --git a/src/tilemaps/components/WorldToTileY.js b/src/tilemaps/components/WorldToTileY.js index bf4eeb6d9..873130c28 100644 --- a/src/tilemaps/components/WorldToTileY.js +++ b/src/tilemaps/components/WorldToTileY.js @@ -9,14 +9,13 @@ * layer's position, scale and scroll. * * @function Phaser.Tilemaps.Components.WorldToTileY - * @private * @since 3.0.0 * * @param {number} worldY - The y coordinate to be converted, in pixels, not tiles. * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer. * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {number} The Y location in tile units. */ var WorldToTileY = function (worldY, snapToFloor, camera, layer) From 27fd496e8fbbcabd8a13b1de107498d837f80aad Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 2 Sep 2020 12:21:36 +0100 Subject: [PATCH 156/241] Updated to stablesort 0.1.8 and recoded to fit our style. Removed `inplace` static function. --- src/utils/array/StableSort.js | 193 +++++++++++++++++++--------------- 1 file changed, 110 insertions(+), 83 deletions(-) diff --git a/src/utils/array/StableSort.js b/src/utils/array/StableSort.js index 0e976478c..daaaaa716 100644 --- a/src/utils/array/StableSort.js +++ b/src/utils/array/StableSort.js @@ -1,143 +1,170 @@ /** * @author Richard Davey + * @author Angry Bytes (and contributors) * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -//! stable.js 0.1.6, https://github.com/Two-Screen/stable -//! © 2017 Angry Bytes and contributors. MIT licensed. - /** - * @namespace Phaser.Utils.Array.StableSortFunctions - */ - -(function() { - - /** - * A stable array sort, because `Array#sort()` is not guaranteed stable. - * This is an implementation of merge sort, without recursion. + * The comparator function. * - * @function Phaser.Utils.Array.StableSort - * @since 3.0.0 - * - * @param {array} arr - The input array to be sorted. - * @param {function} comp - The comparison handler. - * - * @return {array} The sorted result. - */ -var stable = function(arr, comp) { - return exec(arr.slice(), comp); -}; - - /** - * Sort the input array and simply copy it back if the result isn't in the original array, which happens on an odd number of passes. - * - * @function Phaser.Utils.Array.StableSortFunctions.inplace - * @memberof Phaser.Utils.Array.StableSortFunctions - * @since 3.0.0 * @ignore * - * @param {array} arr - The input array. - * @param {function} comp - The comparison handler. + * @param {*} a - The first item to test. + * @param {*} b - The second itemt to test. * - * @return {array} The sorted array. + * @return {boolean} True if they localCompare, otherwise false. */ -stable.inplace = function(arr, comp) { - var result = exec(arr, comp); - - // This simply copies back if the result isn't in the original array, - // which happens on an odd number of passes. - if (result !== arr) { - pass(result, null, arr.length, arr); - } - - return arr; -}; - -// Execute the sort using the input array and a second buffer as work space. -// Returns one of those two, containing the final result. -function exec(arr, comp) { - if (typeof(comp) !== 'function') { - comp = function(a, b) { - return String(a).localeCompare(b); - }; - } +function Compare (a, b) +{ + return String(a).localeCompare(b); +} +/** + * Process the array contents. + * + * @ignore + * + * @param {array} array - The array to process. + * @param {function} compare - The comparison function. + * + * @return {array} - The processed array. + */ +function Process (array, compare) +{ // Short-circuit when there's nothing to sort. - var len = arr.length; - if (len <= 1) { - return arr; + var len = array.length; + + if (len <= 1) + { + return array; } // Rather than dividing input, simply iterate chunks of 1, 2, 4, 8, etc. // Chunks are the size of the left or right hand in merge sort. // Stop when the left-hand covers all of the array. var buffer = new Array(len); - for (var chk = 1; chk < len; chk *= 2) { - pass(arr, comp, chk, buffer); - var tmp = arr; - arr = buffer; + for (var chk = 1; chk < len; chk *= 2) + { + RunPass(array, compare, chk, buffer); + + var tmp = array; + + array = buffer; + buffer = tmp; } - return arr; + return array; } -// Run a single pass with the given chunk size. -var pass = function(arr, comp, chk, result) { +/** + * Run a single pass with the given chunk size. + * + * @ignore + * + * @param {array} arr - The array to run the pass on. + * @param {function} comp - The comparison function. + * @param {number} chk - The number of iterations. + * @param {array} result - The array to store the result in. + */ +function RunPass (arr, comp, chk, result) +{ var len = arr.length; var i = 0; + // Step size / double chunk size. var dbl = chk * 2; + // Bounds of the left and right chunks. var l, r, e; + // Iterators over the left and right chunk. var li, ri; // Iterate over pairs of chunks. - for (l = 0; l < len; l += dbl) { + for (l = 0; l < len; l += dbl) + { r = l + chk; e = r + chk; - if (r > len) r = len; - if (e > len) e = len; + + if (r > len) + { + r = len; + } + + if (e > len) + { + e = len; + } // Iterate both chunks in parallel. li = l; ri = r; - while (true) { + + while (true) + { // Compare the chunks. - if (li < r && ri < e) { + if (li < r && ri < e) + { // This works for a regular `sort()` compatible comparator, // but also for a simple comparator like: `a > b` - if (comp(arr[li], arr[ri]) <= 0) { + if (comp(arr[li], arr[ri]) <= 0) + { result[i++] = arr[li++]; } - else { + else + { result[i++] = arr[ri++]; } } - // Nothing to compare, just flush what's left. - else if (li < r) { + else if (li < r) + { + // Nothing to compare, just flush what's left. result[i++] = arr[li++]; } - else if (ri < e) { + else if (ri < e) + { result[i++] = arr[ri++]; } - // Both iterators are at the chunk ends. - else { + else + { + // Both iterators are at the chunk ends. break; } } } +} + +/** + * An in-place stable array sort, because `Array#sort()` is not guaranteed stable. + * + * This is an implementation of merge sort, without recursion. + * + * Function based on the Two-Screen/stable sort 0.1.8 from https://github.com/Two-Screen/stable + * + * @function Phaser.Utils.Array.StableSort + * @since 3.0.0 + * + * @param {array} array - The input array to be sorted. + * @param {function} [compare] - The comparison function. + * + * @return {array} The sorted result. + */ +var StableSort = function (array, compare) +{ + if (compare === undefined) { compare = Compare; } + + var result = Process(array, compare); + + // This simply copies back if the result isn't in the original array, which happens on an odd number of passes. + if (result !== array) + { + RunPass(result, null, array.length, array); + } + + return array; }; -// Export using CommonJS or to the window. -if (typeof(module) !== 'undefined') { - module.exports = stable; -} -else { - window.stable = stable; -} - -})(); +module.exports = StableSort; From 8f8a90beddada49d2732c67f5f78da0eb84ba95f Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 2 Sep 2020 12:24:27 +0100 Subject: [PATCH 157/241] `Utils.Array.StableSort` has been recoded. It's now based on Two-Screens stable sort 0.1.8 and has been updated to fit into Phaser better and no longer create any window bound objects. The `inplace` function has been removed, just call `StableSort(array)` directly now. All classes that used `StableSort.inplace` have been updated to call it directly. --- src/gameobjects/DisplayList.js | 2 +- src/gameobjects/container/Container.js | 2 +- src/gameobjects/particles/ParticleEmitter.js | 2 +- src/structs/List.js | 12 ++++++------ 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/gameobjects/DisplayList.js b/src/gameobjects/DisplayList.js index 7b01b6669..13b833f4c 100644 --- a/src/gameobjects/DisplayList.js +++ b/src/gameobjects/DisplayList.js @@ -166,7 +166,7 @@ var DisplayList = new Class({ { if (this.sortChildrenFlag) { - StableSort.inplace(this.list, this.sortByDepth); + StableSort(this.list, this.sortByDepth); this.sortChildrenFlag = false; } diff --git a/src/gameobjects/container/Container.js b/src/gameobjects/container/Container.js index 8f4de4e29..5586bd936 100644 --- a/src/gameobjects/container/Container.js +++ b/src/gameobjects/container/Container.js @@ -636,7 +636,7 @@ var Container = new Class({ }; } - ArrayUtils.StableSort.inplace(this.list, handler); + ArrayUtils.StableSort(this.list, handler); return this; }, diff --git a/src/gameobjects/particles/ParticleEmitter.js b/src/gameobjects/particles/ParticleEmitter.js index d346474a3..1dcdc0a34 100644 --- a/src/gameobjects/particles/ParticleEmitter.js +++ b/src/gameobjects/particles/ParticleEmitter.js @@ -1824,7 +1824,7 @@ var ParticleEmitter = new Class({ */ depthSort: function () { - StableSort.inplace(this.alive, this.depthSortCallback); + StableSort(this.alive, this.depthSortCallback); return this; }, diff --git a/src/structs/List.js b/src/structs/List.js index 2e54e0cba..b7bc7ddfe 100644 --- a/src/structs/List.js +++ b/src/structs/List.js @@ -58,7 +58,7 @@ var List = new Class({ /** * The index of the current element. - * + * * This is used internally when iterating through the list with the {@link #first}, {@link #last}, {@link #get}, and {@link #previous} properties. * * @name Phaser.Structs.List#position @@ -211,7 +211,7 @@ var List = new Class({ }; } - StableSort.inplace(this.list, handler); + StableSort(this.list, handler); return this; }, @@ -281,7 +281,7 @@ var List = new Class({ * For example: `getAll('parent')` would return only children that have a property called `parent`. * * You can also specify a value to compare the property to: - * + * * `getAll('visible', true)` would return only children that have their visible property set to `true`. * * Optionally you can specify a start and end index. For example if this List had 100 children, @@ -441,7 +441,7 @@ var List = new Class({ * @since 3.0.0 * * @genericUse {Phaser.Structs.List.} - [$return] - * + * * @param {boolean} [skipCallback=false] - Skip calling the List.removeCallback. * * @return {Phaser.Structs.List} This List object. @@ -749,7 +749,7 @@ var List = new Class({ /** * The next item in the List, or `null` if the entire List has been traversed. - * + * * This property can be read successively after reading {@link #first} or manually setting the {@link #position} to iterate the List. * * @name Phaser.Structs.List#next @@ -778,7 +778,7 @@ var List = new Class({ /** * The previous item in the List, or `null` if the entire List has been traversed. - * + * * This property can be read successively after reading {@link #last} or manually setting the {@link #position} to iterate the List backwards. * * @name Phaser.Structs.List#previous From 6e181eda5bc0356e8a3256931e411456b75213f0 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 2 Sep 2020 12:24:29 +0100 Subject: [PATCH 158/241] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f3d27b00..f95417348 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -276,6 +276,7 @@ The way in which Game Objects add themselves to the Scene Update List has change * If `inputWindowEvents` is set in the Game Config, then the `MouseManager` will now listen for the events on `window.top` instead of just `window`, which should help in situations where the pointer is released outside of an embedded iframe. Fix #4824 (thanks @rexrainbow) * `Types.GameObjects.Text.GetTextSizeObject` is a new type def for the GetTextSize function results. * The `Arcade.Body.resetFlags` method has a new optional boolean parameter `clear`. If set, it clears the `wasTouching` flags on the Body. This happens automatically when `Body.reset` is called. Previous to this, the flags were not reset until the next physics step (thanks @samme) +* `Utils.Array.StableSort` has been recoded. It's now based on Two-Screens stable sort 0.1.8 and has been updated to fit into Phaser better and no longer create any window bound objects. The `inplace` function has been removed, just call `StableSort(array)` directly now. All classes that used `StableSort.inplace` have been updated to call it directly. ### Namespace Updates From ace0ee7babb3abaf70dbde0777c0d923baa12988 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 2 Sep 2020 12:34:58 +0100 Subject: [PATCH 159/241] Fixed JSDoc event names --- src/gameobjects/components/Animation.js | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/gameobjects/components/Animation.js b/src/gameobjects/components/Animation.js index d552852d7..6ef1e7604 100644 --- a/src/gameobjects/components/Animation.js +++ b/src/gameobjects/components/Animation.js @@ -516,7 +516,9 @@ var Animation = new Class({ * Animations are stored in the global Animation Manager and are referenced by a unique string-based key. * * @method Phaser.GameObjects.Components.Animation#play - * @fires Phaser.GameObjects.Components.Animation#onStartEvent + * @fires Phaser.Animations.Events#ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START * @since 3.0.0 * * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance. @@ -555,7 +557,9 @@ var Animation = new Class({ * Plays an Animation (in reverse mode) on the Game Object that owns this Animation Component. * * @method Phaser.GameObjects.Components.Animation#playReverse - * @fires Phaser.GameObjects.Components.Animation#onStartEvent + * @fires Phaser.Animations.Events#ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START * @since 3.12.0 * * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance. @@ -844,7 +848,9 @@ var Animation = new Class({ * If there is another animation queued (via the `chain` method) then it will start playing immediately. * * @method Phaser.GameObjects.Components.Animation#stop - * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent + * @fires Phaser.Animations.Events#ANIMATION_COMPLETE + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_COMPLETE + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_COMPLETE * @since 3.0.0 * * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. @@ -884,7 +890,9 @@ var Animation = new Class({ * Stops the current animation from playing after the specified time delay, given in milliseconds. * * @method Phaser.GameObjects.Components.Animation#stopAfterDelay - * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent + * @fires Phaser.Animations.Events#ANIMATION_COMPLETE + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_COMPLETE + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_COMPLETE * @since 3.4.0 * * @param {integer} delay - The number of milliseconds to wait before stopping this animation. @@ -903,7 +911,9 @@ var Animation = new Class({ * Stops the current animation from playing when it next repeats. * * @method Phaser.GameObjects.Components.Animation#stopOnRepeat - * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent + * @fires Phaser.Animations.Events#ANIMATION_COMPLETE + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_COMPLETE + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_COMPLETE * @since 3.4.0 * * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. @@ -920,7 +930,9 @@ var Animation = new Class({ * If this frame doesn't exist within the animation it will not stop it from playing. * * @method Phaser.GameObjects.Components.Animation#stopOnFrame - * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent + * @fires Phaser.Animations.Events#ANIMATION_COMPLETE + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_COMPLETE + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_COMPLETE * @since 3.4.0 * * @param {Phaser.Animations.AnimationFrame} frame - The frame to check before stopping this animation. From f58f94ecf6196a06dbf05bd0ed431d1c39a7ee70 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 2 Sep 2020 14:42:26 +0100 Subject: [PATCH 160/241] Formatting --- src/animations/Animation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/animations/Animation.js b/src/animations/Animation.js index 3b7d17bc4..2f3f07058 100644 --- a/src/animations/Animation.js +++ b/src/animations/Animation.js @@ -608,7 +608,7 @@ var Animation = new Class({ return; } - + component.forward = isReverse; var frame = (isReverse) ? component.currentFrame.nextFrame : component.currentFrame.prevFrame; From fe74eb70f72dace44b49117f70ebab27a1492880 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 2 Sep 2020 17:41:23 +0100 Subject: [PATCH 161/241] Create PlayAnimationConfig.js --- src/animations/typedefs/PlayAnimationConfig.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/animations/typedefs/PlayAnimationConfig.js diff --git a/src/animations/typedefs/PlayAnimationConfig.js b/src/animations/typedefs/PlayAnimationConfig.js new file mode 100644 index 000000000..dad4d8350 --- /dev/null +++ b/src/animations/typedefs/PlayAnimationConfig.js @@ -0,0 +1,16 @@ +/** + * @typedef {object} Phaser.Types.Animations.PlayAnimationConfig + * @since 3.50.0 + * + * @property {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, or an Animation instance. + * @property {integer} [frameRate] - The frame rate of playback in frames per second (default 24 if duration is null) + * @property {integer} [duration] - How long the animation should play for in milliseconds. If not given its derived from frameRate. + * @property {integer} [delay] - Delay before starting playback. Value given in milliseconds. + * @property {integer} [repeat] - Number of times to repeat the animation (-1 for infinity) + * @property {integer} [repeatDelay] - Delay before the animation repeats. Value given in milliseconds. + * @property {boolean} [yoyo] - Should the animation yoyo? (reverse back down to the start) before repeating? + * @property {boolean} [showOnStart] - Should sprite.visible = true when the animation starts to play? + * @property {boolean} [hideOnComplete] - Should sprite.visible = false when the animation finishes? + * @property {integer} [startFrame] - The frame of the animation to start playback from. + * @property {number} [timeScale] - The time scale to be applied to playback of this animation. + */ From 90fbb0f13d7be1a5da3b0fb05c5a2996b5240344 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 2 Sep 2020 17:41:43 +0100 Subject: [PATCH 162/241] Updated jsdocs for `play` to show it can take the new config --- src/gameobjects/sprite/Sprite.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gameobjects/sprite/Sprite.js b/src/gameobjects/sprite/Sprite.js index 663b0821b..a8cc52bbf 100644 --- a/src/gameobjects/sprite/Sprite.js +++ b/src/gameobjects/sprite/Sprite.js @@ -137,9 +137,12 @@ var Sprite = new Class({ * Start playing the given animation. * * @method Phaser.GameObjects.Sprite#play + * @fires Phaser.Animations.Events#ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START * @since 3.0.0 * - * @param {string} key - The string-based key of the animation to play. + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. * @@ -147,9 +150,7 @@ var Sprite = new Class({ */ play: function (key, ignoreIfPlaying, startFrame) { - this.anims.play(key, ignoreIfPlaying, startFrame); - - return this; + return this.anims.play(key, ignoreIfPlaying, startFrame); }, /** From a2f0c2e7e3b969c0cdfba0af1274b6d8dd7e2ce8 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 2 Sep 2020 17:43:44 +0100 Subject: [PATCH 163/241] Added `getTotalFrames` and `calculateDuration` methods. --- src/animations/Animation.js | 81 ++++++++++++++++++++++++++----------- 1 file changed, 58 insertions(+), 23 deletions(-) diff --git a/src/animations/Animation.js b/src/animations/Animation.js index 2f3f07058..818b42f27 100644 --- a/src/animations/Animation.js +++ b/src/animations/Animation.js @@ -104,27 +104,6 @@ var Animation = new Class({ */ this.duration = GetValue(config, 'duration', null); - if (this.duration === null && this.frameRate === null) - { - // No duration or frameRate given, use default frameRate of 24fps - this.frameRate = 24; - this.duration = (this.frameRate / this.frames.length) * 1000; - } - else if (this.duration && this.frameRate === null) - { - // Duration given but no frameRate, so set the frameRate based on duration - // I.e. 12 frames in the animation, duration = 4000 ms - // So frameRate is 12 / (4000 / 1000) = 3 fps - this.frameRate = this.frames.length / (this.duration / 1000); - } - else - { - // frameRate given, derive duration from it (even if duration also specified) - // I.e. 15 frames in the animation, frameRate = 30 fps - // So duration is 15 / 30 = 0.5 * 1000 (half a second, or 500ms) - this.duration = (this.frames.length / this.frameRate) * 1000; - } - /** * How many ms per frame, not including frame specific modifiers. * @@ -132,7 +111,7 @@ var Animation = new Class({ * @type {integer} * @since 3.0.0 */ - this.msPerFrame = 1000 / this.frameRate; + this.msPerFrame; /** * Skip frames if the time lags, or always advanced anyway? @@ -214,10 +193,64 @@ var Animation = new Class({ */ this.paused = false; + this.calculateDuration(this, this.getTotalFrames(), this.duration, this.frameRate); + this.manager.on(Events.PAUSE_ALL, this.pause, this); this.manager.on(Events.RESUME_ALL, this.resume, this); }, + /** + * Gets the total number of frames in this animation. + * + * @method Phaser.Animations.Animation#getTotalFrames + * @since 3.50.0 + * + * @return {number} The total number of frames in this animation. + */ + getTotalFrames: function () + { + return this.frames.length; + }, + + /** + * Calculates the duration, frame rate and msPerFrame values. + * + * @method Phaser.Animations.Animation#calculateDuration + * @since 3.50.0 + * + * @param {(Phaser.Animations.Animation|Phaser.GameObjects.Components.Animation)} target - The target to set the values on. + * @param {number} totalFrames - The total number of frames in the animation. + * @param {number} duration - The duration to calculate the frame rate from. + * @param {number} frameRate - The frame ate to calculate the duration from. + */ + calculateDuration: function (target, totalFrames, duration, frameRate) + { + if (duration === null && frameRate === null) + { + // No duration or frameRate given, use default frameRate of 24fps + target.frameRate = 24; + target.duration = (24 / totalFrames) * 1000; + } + else if (duration && frameRate === null) + { + // Duration given but no frameRate, so set the frameRate based on duration + // I.e. 12 frames in the animation, duration = 4000 ms + // So frameRate is 12 / (4000 / 1000) = 3 fps + target.duration = duration; + target.frameRate = totalFrames / (duration / 1000); + } + else + { + // frameRate given, derive duration from it (even if duration also specified) + // I.e. 15 frames in the animation, frameRate = 30 fps + // So duration is 15 / 30 = 0.5 * 1000 (half a second, or 500ms) + target.frameRate = frameRate; + target.duration = (totalFrames / frameRate) * 1000; + } + + target.msPerFrame = 1000 / target.frameRate; + }, + /** * Add frames to the end of the animation. * @@ -299,7 +332,7 @@ var Animation = new Class({ */ completeAnimation: function (component) { - if (this.hideOnComplete) + if (component.hideOnComplete) { component.parent.visible = false; } @@ -494,6 +527,8 @@ var Animation = new Class({ component.duration = this.duration; component.msPerFrame = this.msPerFrame; component.skipMissedFrames = this.skipMissedFrames; + component.showOnStart = this.showOnStart; + component.hideOnComplete = this.hideOnComplete; component._delay = this.delay; component._repeat = this.repeat; From e01f310d1621d885176c77ff366c9925131d438f Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 2 Sep 2020 17:56:09 +0100 Subject: [PATCH 164/241] Added new properties, support for config playback and better delayed handling --- src/gameobjects/components/Animation.js | 295 ++++++++++++++++-------- 1 file changed, 199 insertions(+), 96 deletions(-) diff --git a/src/gameobjects/components/Animation.js b/src/gameobjects/components/Animation.js index 6ef1e7604..7bb9783cb 100644 --- a/src/gameobjects/components/Animation.js +++ b/src/gameobjects/components/Animation.js @@ -6,6 +6,7 @@ var BaseAnimation = require('../../animations/Animation'); var Class = require('../../utils/Class'); +var GetFastValue = require('../../utils/object/GetFastValue'); var Events = require('../../animations/events'); /** @@ -57,6 +58,16 @@ var Animation = new Class({ */ this.isPlaying = false; + /** + * Has the current animation started playing, or is it waiting for a delay to expire? + * + * @name Phaser.GameObjects.Components.Animation#hasStarted + * @type {boolean} + * @default false + * @since 3.50.0 + */ + this.hasStarted = false; + /** * The current Animation loaded into this Animation Controller. * @@ -78,10 +89,10 @@ var Animation = new Class({ this.currentFrame = null; /** - * The key of the next Animation to be loaded into this Animation Controller when the current animation completes. + * The key, instance of config of the next Animation to be loaded into this Animation Controller when the current animation completes. * * @name Phaser.GameObjects.Components.Animation#nextAnim - * @type {?string} + * @type {?(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} * @default null * @since 3.16.0 */ @@ -91,7 +102,7 @@ var Animation = new Class({ * A queue of keys of the next Animations to be loaded into this Animation Controller when the current animation completes. * * @name Phaser.GameObjects.Components.Animation#nextAnimsQueue - * @type {string[]} + * @type {array} * @since 3.24.0 */ this.nextAnimsQueue = []; @@ -237,7 +248,19 @@ var Animation = new Class({ this.nextTick = 0; /** - * An internal counter keeping track of how many repeats are left to play. + * An internal counter keeping track of how much delay time is left before playback begins. + * + * This is set via the `delayedPlay` method. + * + * @name Phaser.GameObjects.Components.Animation#delayCounter + * @type {number} + * @default 0 + * @since 3.50.0 + */ + this.delayCounter = 0; + + /** + * An internal counter keeping track of how many repeats are left to run. * * @name Phaser.GameObjects.Components.Animation#repeatCounter * @type {number} @@ -302,6 +325,24 @@ var Animation = new Class({ * @since 3.4.0 */ this._pendingStopValue; + + /** + * Should the GameObject's `visible` property be set to `true` when the animation starts to play? + * + * @name Phaser.GameObjects.Components.Animation#showOnStart + * @type {boolean} + * @since 3.50.0 + */ + this.showOnStart = false; + + /** + * Should the GameObject's `visible` property be set to `false` when the animation finishes? + * + * @name Phaser.GameObjects.Components.Animation#hideOnComplete + * @type {boolean} + * @since 3.50.0 + */ + this.hideOnComplete = false; }, /** @@ -314,20 +355,25 @@ var Animation = new Class({ * You can chain a new animation at any point, including before the current one starts playing, during it, or when it ends (via its `animationcomplete` callback). * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained animations without impacting the global animation they're playing. * - * Call this method with no arguments to reset the chained animation. + * Call this method with no arguments to reset all chained animations. * * @method Phaser.GameObjects.Components.Animation#chain * @since 3.16.0 * - * @param {(string|Phaser.Animations.Animation)} [key] - The string-based key of the animation to play next, as defined previously in the Animation Manager. Or an Animation instance. + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. * * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. */ chain: function (key) { - if (key instanceof BaseAnimation) + var parent = this.parent; + + if (key === undefined) { - key = key.key; + this.nextAnimsQueue.length = 0; + this.nextAnim = null; + + return parent; } if (this.nextAnim === null) @@ -339,60 +385,7 @@ var Animation = new Class({ this.nextAnimsQueue.push(key); } - return this.parent; - }, - - /** - * Sets the amount of time, in milliseconds, that the animation will be delayed before starting playback. - * - * @method Phaser.GameObjects.Components.Animation#setDelay - * @since 3.4.0 - * - * @param {integer} [value=0] - The amount of time, in milliseconds, to wait before starting playback. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - setDelay: function (value) - { - if (value === undefined) { value = 0; } - - this._delay = value; - - return this.parent; - }, - - /** - * Gets the amount of time, in milliseconds that the animation will be delayed before starting playback. - * - * @method Phaser.GameObjects.Components.Animation#getDelay - * @since 3.4.0 - * - * @return {integer} The amount of time, in milliseconds, the Animation will wait before starting playback. - */ - getDelay: function () - { - return this._delay; - }, - - /** - * Waits for the specified delay, in milliseconds, then starts playback of the requested animation. - * - * @method Phaser.GameObjects.Components.Animation#delayedPlay - * @since 3.0.0 - * - * @param {integer} delay - The delay, in milliseconds, to wait before starting the animation playing. - * @param {string} key - The key of the animation to play. - * @param {integer} [startFrame=0] - The frame of the animation to start from. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - delayedPlay: function (delay, key, startFrame) - { - this.play(key, true, startFrame); - - this.nextTick += delay; - - return this.parent; + return parent; }, /** @@ -418,7 +411,7 @@ var Animation = new Class({ * @protected * @since 3.0.0 * - * @param {string} key - The key of the animation to load. + * @param {(string|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or a `PlayAnimationConfig` object. * @param {integer} [startFrame=0] - The start frame of the animation to load. * * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. @@ -432,8 +425,44 @@ var Animation = new Class({ this.stop(); } - // Load the new animation in - this.animationManager.load(this, key, startFrame); + var manager = this.animationManager; + + if (typeof key === 'string') + { + // Load the new animation data in + manager.load(this, key, startFrame); + } + else + { + var animKey = GetFastValue(key, 'key', null); + + startFrame = GetFastValue(key, 'startFrame', startFrame); + + if (animKey) + { + // Load the new animation data in + manager.load(this, animKey, startFrame); + + var anim = this.currentAnim; + + // And now override the animation values, if set in the config. + + var totalFrames = anim.getTotalFrames(); + var frameRate = GetFastValue(key, 'frameRate', this.frameRate); + var duration = GetFastValue(key, 'duration', this.duration); + + anim.calculateDuration(this, totalFrames, duration, frameRate); + + this._delay = GetFastValue(key, 'delay', this._delay); + this._repeat = GetFastValue(key, 'repeat', this._repeat); + this._repeatDelay = GetFastValue(key, 'repeatDelay', this._repeatDelay); + this._yoyo = GetFastValue(key, 'yoyo', this._yoyo); + this._timeScale = GetFastValue(key, 'timeScale', this._timeScale); + + this.showOnStart = GetFastValue(key, 'showOnStart', this.showOnStart); + this.hideOnComplete = GetFastValue(key, 'hideOnComplete', this.hideOnComplete); + } + } return this.parent; }, @@ -521,40 +550,36 @@ var Animation = new Class({ * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START * @since 3.0.0 * - * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance. + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call. * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. - * @param {number} [timeScale] - Set the Time Scale when starting this Animation. If not given, the Time Scale will use the current value. * * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. */ - play: function (key, ignoreIfPlaying, startFrame, timeScale) + play: function (key, ignoreIfPlaying, startFrame) { if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } if (startFrame === undefined) { startFrame = 0; } - if (timeScale === undefined) { timeScale = this._timeScale; } - if (key instanceof BaseAnimation) - { - key = key.key; - } + // Must be either an Animation instance, or a PlayAnimationConfig object + var animKey = (typeof key === 'string') ? key : key.key; - if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key) + if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === animKey) { return this.parent; } this.forward = true; + this._reverse = false; this._paused = false; this._wasPlaying = true; - this._timeScale = timeScale; return this._startAnimation(key, startFrame); }, /** - * Plays an Animation (in reverse mode) on the Game Object that owns this Animation Component. + * Plays an Animation in reverse on the Game Object that owns this Animation Component. * * @method Phaser.GameObjects.Components.Animation#playReverse * @fires Phaser.Animations.Events#ANIMATION_START @@ -562,46 +587,72 @@ var Animation = new Class({ * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START * @since 3.12.0 * - * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance. + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. - * @param {number} [timeScale] - Set the Time Scale when starting this Animation. If not given, the Time Scale will use the current value. * * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. */ - playReverse: function (key, ignoreIfPlaying, startFrame, timeScale) + playReverse: function (key, ignoreIfPlaying, startFrame) { if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } if (startFrame === undefined) { startFrame = 0; } - if (timeScale === undefined) { timeScale = this._timeScale; } - if (key instanceof BaseAnimation) - { - key = key.key; - } + // Must be either an Animation instance, or a PlayAnimationConfig object + var animKey = (typeof key === 'string') ? key : key.key; - if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key) + if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === animKey) { return this.parent; } this.forward = false; + this._reverse = true; - this._timeScale = timeScale; + this._paused = false; + this._wasPlaying = true; return this._startAnimation(key, startFrame); }, /** - * Load an Animation and fires 'onStartEvent' event, extracted from 'play' method. + * Waits for the specified delay, in milliseconds, then starts playback of the requested animation. + * + * If the animation _also_ has a delay value set in its config, this value will override that and be used instead. + * + * The delay only takes effect if the animation has not already started playing. + * + * @method Phaser.GameObjects.Components.Animation#delayedPlay + * @fires Phaser.Animations.Events#ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START + * @since 3.0.0 + * + * @param {integer} delay - The delay, in milliseconds, to wait before starting the animation playing. + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {integer} [startFrame=0] - The frame of the animation to start from. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + delayedPlay: function (delay, key, startFrame) + { + this.delayCounter = delay; + + return this.play(key, true, startFrame); + }, + + /** + * Load the animation based on the key and set-up all of the internal values + * needed for playback to start. If there is no delay, it will also fire the start events. * * @method Phaser.GameObjects.Components.Animation#_startAnimation * @fires Phaser.Animations.Events#ANIMATION_START * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START + * @private * @since 3.12.0 * - * @param {string} key - The string-based key of the animation to play, as defined previously in the Animation Manager. + * @param {(string|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or a `PlayAnimationConfig` object. * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. * * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. @@ -625,21 +676,48 @@ var Animation = new Class({ this.isPlaying = true; this.pendingRepeat = false; + this.hasStarted = false; - if (anim.showOnStart) + // Add any delay the animation itself may have had as well + this.delayCounter += this._delay; + + if (this.delayCounter === 0) { - gameObject.visible = true; + this._fireStartEvents(); } + return gameObject; + }, + + /** + * Fires all of the animation start events and toggles internal flags. + * + * @method Phaser.GameObjects.Components.Animation#_fireStartEvents + * @fires Phaser.Animations.Events#ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START + * @private + * @since 3.50.0 + */ + _fireStartEvents: function () + { + var anim = this.currentAnim; + var gameObject = this.parent; + + if (this.showOnStart) + { + gameObject.setVisible(true); + } + + this.hasStarted = true; + var frame = this.currentFrame; anim.emit(Events.ANIMATION_START, anim, frame, gameObject); - gameObject.emit(Events.SPRITE_ANIMATION_KEY_START + key, anim, frame, gameObject); + gameObject.emit(Events.SPRITE_ANIMATION_KEY_START + anim.key, anim, frame, gameObject); gameObject.emit(Events.SPRITE_ANIMATION_START, anim, frame, gameObject); - - return gameObject; }, /** @@ -800,7 +878,11 @@ var Animation = new Class({ }, /** - * Restarts the current animation from its beginning, optionally including its delay value. + * Restarts the current animation from its beginning. + * + * You can optionally reset the delay and repeat counters as well. + * + * Calling this will fire the `ANIMATION_RESTART` series of events immediately. * * @method Phaser.GameObjects.Components.Animation#restart * @fires Phaser.Animations.Events#ANIMATION_RESTART @@ -809,17 +891,24 @@ var Animation = new Class({ * @since 3.0.0 * * @param {boolean} [includeDelay=false] - Whether to include the delay value of the animation when restarting. + * @param {boolean} [resetRepeats=false] - Whether to reset the repeat counter or not? * * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. */ - restart: function (includeDelay) + restart: function (includeDelay, resetRepeats) { if (includeDelay === undefined) { includeDelay = false; } + if (resetRepeats === undefined) { resetRepeats = false; } var anim = this.currentAnim; anim.getFirstTick(this, includeDelay); + if (resetRepeats) + { + this.repeatCounter = (this._repeat === -1) ? Number.MAX_VALUE : this._repeat; + } + this.forward = true; this.isPlaying = true; this.pendingRepeat = false; @@ -867,6 +956,11 @@ var Animation = new Class({ if (anim) { + if (this.hideOnComplete) + { + gameObject.setVisible(false); + } + anim.emit(Events.ANIMATION_COMPLETE, anim, frame, gameObject); gameObject.emit(Events.SPRITE_ANIMATION_KEY_COMPLETE + anim.key, anim, frame, gameObject); @@ -1023,7 +1117,16 @@ var Animation = new Class({ } } - if (this.accumulator >= this.nextTick) + if (!this.hasStarted) + { + if (this.accumulator >= this.delayCounter) + { + this.accumulator -= this.delayCounter; + + this._fireStartEvents(); + } + } + else if (this.accumulator >= this.nextTick) { this.currentAnim.setFrame(this); } From 05c4a3304f393e51e468dc1734037f63347ac9cd Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 2 Sep 2020 18:01:31 +0100 Subject: [PATCH 165/241] Update CHANGELOG.md --- CHANGELOG.md | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f95417348..ddb9148fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -212,6 +212,37 @@ The way in which Game Objects add themselves to the Scene Update List has change * The Spine Plugin `destroy` method will now no longer remove the Game Objects from the Game Object Factory, or dispose of the Scene Renderer. This means when a Scene is destroyed, it will keep the Game Objects in the factory for other Scene's to use. Fix #5279 (thanks @Racoonacoon) * `SpinePlugin.gameDestroy` is a new method that is called if the Game instance emits a `destroy` event. It removes the Spine Game Objects from the factory and disposes of the Spine scene renderer. + + + + +### Animation API New Features and Updates + +The Animation API has had a significant overhaul to improve playback handling. Instead of just playing an animation based on its global key, you can now supply a new `PlayAnimationConfig` object instead, which allows you to override any of the default animation settings, such as `duration`, `delay` and `yoyo` (see below for the full list). This means you no longer have to create lots of duplicate animations, just to change properties such as `duration`, and can now set them dynamically at run-time as well. + +* The `play`, `playReverse`, `delayedPlay` and `chain` Animation Component methods can now all take a `Phaser.Types.Animations.PlayAnimationConfig` configuration object instead of a string as the `key` parameter. This allows you to override any default animation setting with those defined in the config, giving you far greater control over animations on a Game Object level, without needing to globally duplicate them. +* The `PlayAnimationConfig.frameRate` property lets you optionally override the animation frame rate. +* The `PlayAnimationConfig.duration` property lets you optionally override the animation duration. +* The `PlayAnimationConfig.delay` property lets you optionally override the animation delay. +* The `PlayAnimationConfig.repeat` property lets you optionally override the animation repeat counter. +* The `PlayAnimationConfig.repeatDelay` property lets you optionally override the animation repeat delay value. +* The `PlayAnimationConfig.yoyo` property lets you optionally override the animation yoyo boolean. +* The `PlayAnimationConfig.showOnStart` property lets you optionally override the animation show on start value. +* The `PlayAnimationConfig.hideOnComplete` property lets you optionally override the animation hide on complete value. +* The `PlayAnimationConfig.startFrame` property lets you optionally set the animation frame to start on. +* The `PlayAnimationConfig.timeScale` property lets you optionally set the animation time scale factor. +* `Components.Animation.delayCounter` is a new property that allows you to control the delay before an animation will start playing. Only once this delay has expired, will the animation `START` events fire. Fix #4426 (thanks @bdaenen) +* `Components.Animation.hasStarted` is a new boolean property that allows you to tell if the current animation has started playing, or is still waiting for a delay to expire. +* `Components.Animation.showOnStart` is a new boolean property that controls if the Game Object should have `setVisible(true)` called on it when the animation starts. +* `Components.Animation.hideOnComplete` is a new boolean property that controls if the Game Object should have `setVisible(false)` called on it when the animation completes. +* The `Components.Animation.chain` method docs said it would remove all pending animations if called with no parameters. However, it didn't - and now does! +* The `Components.Animation.setDelay` method has been removed. It never actually worked and you can now perform the same thing by calling either `delayedPlay` or setting the `delay` property in the play config. +* The `Components.Animation.getDelay` method has been removed. It never actually worked and you can now perform the same thing by calling either `delayedPlay` or setting the `delay` property in the play config. +* `Components.Animation._fireStartEvents` is a new internal private method that handles dispatching the animation start events, to cut down on duplicate code. +* The `Components.Animation.restart` method has a new optional boolean parameter `resetRepeats` which controls if you want to reset the repeat counter during the restart, or not. +* `Animation.getTotalFrames` is a new method that will return the total number of frames in the animation. You can access it via `this.anims.currentAnim.getTotalFrames` from a Sprite. +* `Animation.calculateDuration` is a new method that calculates the duration, frameRate and msPerFrame for a given animation target. + ### New Features * `Geom.Intersects.GetLineToLine` is a new function that will return a Vector3 containing the point of intersection between 2 line segments, with the `z` property holding the distance value. @@ -235,7 +266,6 @@ The way in which Game Objects add themselves to the Scene Update List has change * `Clock.addEvent` can now take an existing `TimerEvent` object, as well as a config object. If a `TimerEvent` is given it will be removed from the Clock, reset and then added. This allows you to pool TimerEvents rather than constantly create and delete them. Fix #4115 (thanks @jcyuan) * `Clock.removeEvent` is a new method that allows you to remove a `TimerEvent`, or an array of them, from all internal lists of the current Clock. * `Group.getMatching` is a new method that will return any members of the Group that match the given criteria, such as `getMatching('visible', true)` (thanks @atursams) -* The `Animation.play` and `playReverse` methods have a new optional parameter `timeScale`. This allows you to set the Animations time scale as you're actually playing it, rather than having to chain two calls together. Close #3963 (thanks @inmylo) * `ArcadePhysics.disableUpdate` is a new method that will prevent the Arcade Physics World `update` method from being called when the Scene updates. By disabling it, you're free to call the update method yourself, passing in your own delta and time values. * `ArcadePhysics.enableUpdate` is a new method that will make the Arcade Physics World update in time with the Scene update. This is the default, so only call this if you have specifically disabled it previously. * `ArcadeWorldConfig.customUpdate` is a new boolean property you can set in the Arcade Physics config object, either in the Scene or in the Game Config. If `true` the World update will never be called, allowing you to call it yourself from your own component. Close #5190 (thanks @cfortuner) From 070fc70fe7755825fc099f8c643bdd3d42ed2ad7 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 2 Sep 2020 18:07:21 +0100 Subject: [PATCH 166/241] Lint fix --- src/gameobjects/components/Animation.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gameobjects/components/Animation.js b/src/gameobjects/components/Animation.js index 7bb9783cb..45f833aff 100644 --- a/src/gameobjects/components/Animation.js +++ b/src/gameobjects/components/Animation.js @@ -4,7 +4,6 @@ * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseAnimation = require('../../animations/Animation'); var Class = require('../../utils/Class'); var GetFastValue = require('../../utils/object/GetFastValue'); var Events = require('../../animations/events'); From 97c31b71af8f367af55995ebd7215cbb872ccb91 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 2 Sep 2020 21:52:37 +0100 Subject: [PATCH 167/241] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ddb9148fd..357998636 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -307,6 +307,7 @@ The Animation API has had a significant overhaul to improve playback handling. I * `Types.GameObjects.Text.GetTextSizeObject` is a new type def for the GetTextSize function results. * The `Arcade.Body.resetFlags` method has a new optional boolean parameter `clear`. If set, it clears the `wasTouching` flags on the Body. This happens automatically when `Body.reset` is called. Previous to this, the flags were not reset until the next physics step (thanks @samme) * `Utils.Array.StableSort` has been recoded. It's now based on Two-Screens stable sort 0.1.8 and has been updated to fit into Phaser better and no longer create any window bound objects. The `inplace` function has been removed, just call `StableSort(array)` directly now. All classes that used `StableSort.inplace` have been updated to call it directly. +* If a Scene is paused, or sent to sleep, it will automatically call `Keyboard.resetKeys`. This means that if you hold a key down, then sleep or pause a Scene, then release the key and resume or wake the Scene, it will no longer think it is still being held down (thanks @samme) ### Namespace Updates From cf17dbe7e9fdde7365da8933b2b8ba0c8ef6ae7a Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 2 Sep 2020 22:27:40 +0100 Subject: [PATCH 168/241] Previously, the `easeParams` array within a Tweens `props` object, or a multi-object tween, were ignored and it was only used if set on the root Tween object. It will now work correctly set at any depth. Fix #4292 --- src/tweens/builders/TweenBuilder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tweens/builders/TweenBuilder.js b/src/tweens/builders/TweenBuilder.js index 3287eaa02..f013ea3ca 100644 --- a/src/tweens/builders/TweenBuilder.js +++ b/src/tweens/builders/TweenBuilder.js @@ -73,7 +73,7 @@ var TweenBuilder = function (parent, config, defaults) ops.getEnd, ops.getStart, ops.getActive, - GetEaseFunction(GetValue(value, 'ease', ease), easeParams), + GetEaseFunction(GetValue(value, 'ease', ease), GetValue(value, 'easeParams', easeParams)), GetNewValue(value, 'delay', delay), GetNewValue(value, 'duration', duration), GetBoolean(value, 'yoyo', yoyo), From e6cfacb3a44e76464553cd49858137a2599ecc18 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 2 Sep 2020 22:27:43 +0100 Subject: [PATCH 169/241] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 357998636..d63cb53e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -345,6 +345,7 @@ The Animation API has had a significant overhaul to improve playback handling. I * The `ProcessQueue` was emitting the wrong events internally. It now emits 'add' and 'remove' correctly (thanks @halilcakar) * The `GridAlign` action didn't work if only the `height` parameter was set. Fix #5019 (thanks @halilcakar) * The `Color.HSVToRGB` function has been rewritten to use the HSL and HSV formula from Wikipedia, giving much better results. Fix #5089 (thanks @DiamondeX) +* Previously, the `easeParams` array within a Tweens `props` object, or a multi-object tween, were ignored and it was only used if set on the root Tween object. It will now work correctly set at any depth. Fix #4292 (thanks @willblackmore) ### Examples, Documentation and TypeScript From 1562525a51b76dd4b5eea2ea96c47a78eff9cde7 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 2 Sep 2020 22:50:27 +0100 Subject: [PATCH 170/241] When using `Camera.setRenderToTexture` its `zoom` value would be applied twice. Fix #4221 --- src/renderer/webgl/WebGLRenderer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/webgl/WebGLRenderer.js b/src/renderer/webgl/WebGLRenderer.js index 99533fe18..4e5809688 100644 --- a/src/renderer/webgl/WebGLRenderer.js +++ b/src/renderer/webgl/WebGLRenderer.js @@ -2349,7 +2349,7 @@ var WebGLRenderer = new Class({ camera.width, camera.height, camera.x, camera.y, camera.width, camera.height, - camera.zoom, camera.zoom, + 1, 1, camera.rotation, camera.flipX, !camera.flipY, 1, 1, From 2d65ff169ec5f502bf1c1057a4bd0f3a9c736999 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 2 Sep 2020 22:50:30 +0100 Subject: [PATCH 171/241] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d63cb53e8..0bc1c36eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -346,6 +346,7 @@ The Animation API has had a significant overhaul to improve playback handling. I * The `GridAlign` action didn't work if only the `height` parameter was set. Fix #5019 (thanks @halilcakar) * The `Color.HSVToRGB` function has been rewritten to use the HSL and HSV formula from Wikipedia, giving much better results. Fix #5089 (thanks @DiamondeX) * Previously, the `easeParams` array within a Tweens `props` object, or a multi-object tween, were ignored and it was only used if set on the root Tween object. It will now work correctly set at any depth. Fix #4292 (thanks @willblackmore) +* When using `Camera.setRenderToTexture` its `zoom` value would be applied twice. Fix #4221 (thanks @wayfu) ### Examples, Documentation and TypeScript From d92195a8b8eca2e79b61b1a062ea4c46ae6056bf Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 2 Sep 2020 22:55:51 +0100 Subject: [PATCH 172/241] Default rotation as well --- src/renderer/webgl/WebGLRenderer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/webgl/WebGLRenderer.js b/src/renderer/webgl/WebGLRenderer.js index 4e5809688..cd6ab90ab 100644 --- a/src/renderer/webgl/WebGLRenderer.js +++ b/src/renderer/webgl/WebGLRenderer.js @@ -2350,7 +2350,7 @@ var WebGLRenderer = new Class({ camera.x, camera.y, camera.width, camera.height, 1, 1, - camera.rotation, + 0, camera.flipX, !camera.flipY, 1, 1, 0, 0, From 52c7406aa8e101052cc8d45bfd0b3b242a06ba9f Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 2 Sep 2020 22:55:54 +0100 Subject: [PATCH 173/241] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bc1c36eb..a122e9d2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -346,7 +346,7 @@ The Animation API has had a significant overhaul to improve playback handling. I * The `GridAlign` action didn't work if only the `height` parameter was set. Fix #5019 (thanks @halilcakar) * The `Color.HSVToRGB` function has been rewritten to use the HSL and HSV formula from Wikipedia, giving much better results. Fix #5089 (thanks @DiamondeX) * Previously, the `easeParams` array within a Tweens `props` object, or a multi-object tween, were ignored and it was only used if set on the root Tween object. It will now work correctly set at any depth. Fix #4292 (thanks @willblackmore) -* When using `Camera.setRenderToTexture` its `zoom` value would be applied twice. Fix #4221 (thanks @wayfu) +* When using `Camera.setRenderToTexture` its `zoom` value would be applied twice. Fix #4221 #4924 (thanks @wayfu @DanMcgraw) ### Examples, Documentation and TypeScript From 793359cab6e7bfa66a8d15e3e0445f4e6ca77750 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 2 Sep 2020 22:58:40 +0100 Subject: [PATCH 174/241] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a122e9d2c..0d5d230bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -346,7 +346,7 @@ The Animation API has had a significant overhaul to improve playback handling. I * The `GridAlign` action didn't work if only the `height` parameter was set. Fix #5019 (thanks @halilcakar) * The `Color.HSVToRGB` function has been rewritten to use the HSL and HSV formula from Wikipedia, giving much better results. Fix #5089 (thanks @DiamondeX) * Previously, the `easeParams` array within a Tweens `props` object, or a multi-object tween, were ignored and it was only used if set on the root Tween object. It will now work correctly set at any depth. Fix #4292 (thanks @willblackmore) -* When using `Camera.setRenderToTexture` its `zoom` value would be applied twice. Fix #4221 #4924 (thanks @wayfu @DanMcgraw) +* When using `Camera.setRenderToTexture` its `zoom` and `rotation` values would be applied twice. Fix #4221 #4924 #4713 (thanks @wayfu @DanMcgraw @pavel-shirobok) ### Examples, Documentation and TypeScript From 0ba7de7a60858d3505363f47048bb0ffc4511038 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 3 Sep 2020 09:41:23 +0100 Subject: [PATCH 175/241] Deps update --- package-lock.json | 88 ++++++++++++++++++++++++++++++++++------------- package.json | 6 ++-- 2 files changed, 68 insertions(+), 26 deletions(-) diff --git a/package-lock.json b/package-lock.json index 47f2ea350..fa34058a0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -49,6 +49,38 @@ "integrity": "sha512-MggwidiH+E9j5Sh8pbrX5sJvMcsqS5o+7iB42M9/k0CD63MjYbdP4nhSh7uB5wnv2/RVzTZFTxzF/kIa5mrCqA==", "dev": true }, + "@eslint/eslintrc": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.1.3.tgz", + "integrity": "sha512-4YVwPkANLeNtRjMekzux1ci8hIaH5eGKktGqR0d3LWsKNn5B2X/1Z6Trxy7jQXl9EBGE6Yj02O+t09FMeRllaA==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "lodash": "^4.17.19", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "ajv": { + "version": "6.12.4", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz", + "integrity": "sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + } + } + }, "@sindresorhus/df": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/@sindresorhus/df/-/df-2.1.0.tgz", @@ -110,10 +142,13 @@ "dev": true }, "@types/source-map": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/@types/source-map/-/source-map-0.5.2.tgz", - "integrity": "sha512-++w4WmMbk3dS3UeHGzAG+xJOSz5Xqtjys/TBkqG3qp3SeWE7Wwezqe5eB7B51cxUyh4PW7bwVotpsLdBK0D8cw==", - "dev": true + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@types/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LrnsgZIfJaysFkv9rRJp4/uAyqw87oVed3s1hhF83nwbo9c7MG9g5DqR0seHP+lkX4ldmMrVolPjQSe2ZfD0yA==", + "dev": true, + "requires": { + "source-map": "*" + } }, "@types/tapable": { "version": "1.0.6", @@ -453,7 +488,7 @@ "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha1-vNZ5HqWuCXJeF+WtmIE0zUCz2RE=", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "requires": { "sprintf-js": "~1.0.2" @@ -686,7 +721,7 @@ "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { "balanced-match": "^1.0.0", @@ -977,9 +1012,9 @@ "dev": true }, "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { "has-flag": "^4.0.0" @@ -1187,7 +1222,7 @@ "concat-stream": { "version": "1.6.2", "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha1-kEvfGUzTEi/Gdcd/xKw9T/D9GjQ=", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -1624,12 +1659,13 @@ "dev": true }, "eslint": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.7.0.tgz", - "integrity": "sha512-1KUxLzos0ZVsyL81PnRN335nDtQ8/vZUD6uMtWbF+5zDtjKcsklIi78XoE0MVL93QvWTu+E5y44VyyCsOMBrIg==", + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.8.1.tgz", + "integrity": "sha512-/2rX2pfhyUG0y+A123d0ccXtMm7DV7sH1m3lk9nk2DZ2LReq39FXHueR9xZwshE5MdfSf0xunSaMWRqyIA6M1w==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", + "@eslint/eslintrc": "^0.1.3", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -1639,7 +1675,7 @@ "eslint-scope": "^5.1.0", "eslint-utils": "^2.1.0", "eslint-visitor-keys": "^1.3.0", - "espree": "^7.2.0", + "espree": "^7.3.0", "esquery": "^1.2.0", "esutils": "^2.0.2", "file-entry-cache": "^5.0.1", @@ -1699,12 +1735,12 @@ "dev": true }, "espree": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.2.0.tgz", - "integrity": "sha512-H+cQ3+3JYRMEIOl87e7QdHX70ocly5iW4+dttuR8iYSPr/hXKFb+7dBsZ7+u1adC4VrnPlTkv0+OwuPnDop19g==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.0.tgz", + "integrity": "sha512-dksIWsvKCixn1yrEXO8UosNSxaDoSYpq9reEjZSbHLpT5hpaCAKTLBwq0RHtLrIr+c0ByiYzWT8KTMRzoRCNlw==", "dev": true, "requires": { - "acorn": "^7.3.1", + "acorn": "^7.4.0", "acorn-jsx": "^5.2.0", "eslint-visitor-keys": "^1.3.0" } @@ -1735,7 +1771,7 @@ "esrecurse": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha1-AHo7n9vCs7uH5IeeoZyS/b05Qs8=", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", "dev": true, "requires": { "estraverse": "^4.1.0" @@ -1754,9 +1790,9 @@ "dev": true }, "eventemitter3": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", - "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==" + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" }, "events": { "version": "3.2.0", @@ -3081,7 +3117,7 @@ "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -4249,6 +4285,12 @@ "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==", "dev": true }, + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true + }, "source-map-resolve": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", diff --git a/package.json b/package.json index 0af52b669..be6d9d521 100644 --- a/package.json +++ b/package.json @@ -62,10 +62,10 @@ "web audio" ], "devDependencies": { - "@types/source-map": "^0.5.2", + "@types/source-map": "^0.5.7", "clean-webpack-plugin": "^3.0.0", "dts-dom": "^3.6.0", - "eslint": "^7.7.0", + "eslint": "^7.8.1", "eslint-plugin-es5": "^1.5.0", "fs-extra": "^9.0.1", "jsdoc": "^3.6.5", @@ -79,7 +79,7 @@ "webpack-shell-plugin": "^0.5.0" }, "dependencies": { - "eventemitter3": "^4.0.4", + "eventemitter3": "^4.0.7", "exports-loader": "^1.1.0", "imports-loader": "^1.1.0", "path": "^0.12.7" From bba8285665fa0feebeb55ef8655540b9d6086cda Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 3 Sep 2020 11:27:12 +0100 Subject: [PATCH 176/241] Return type fix --- src/physics/matter-js/Factory.js | 96 ++++++++++++++++---------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/src/physics/matter-js/Factory.js b/src/physics/matter-js/Factory.js index 8851832aa..d174dc018 100644 --- a/src/physics/matter-js/Factory.js +++ b/src/physics/matter-js/Factory.js @@ -22,13 +22,13 @@ var Vertices = require('./lib/geometry/Vertices'); * @classdesc * The Matter Factory is responsible for quickly creating a variety of different types of * bodies, constraints and Game Objects and adding them into the physics world. - * + * * You access the factory from within a Scene using `add`: - * + * * ```javascript * this.matter.add.rectangle(x, y, width, height); * ``` - * + * * Use of the Factory is optional. All of the objects it creates can also be created * directly via your own code or constructors. It is provided as a means to keep your * code concise. @@ -200,24 +200,24 @@ var Factory = new Class({ /** * Creates a body using data exported from the application PhysicsEditor (https://www.codeandweb.com/physicseditor) - * + * * The PhysicsEditor file should be loaded as JSON: - * + * * ```javascript * preload () * { * this.load.json('vehicles', 'assets/vehicles.json); * } - * + * * create () * { * const vehicleShapes = this.cache.json.get('vehicles'); * this.matter.add.fromPhysicsEditor(400, 300, vehicleShapes.truck); * } * ``` - * + * * Do not pass the entire JSON file to this method, but instead pass one of the shapes contained within it. - * + * * If you pas in an `options` object, any settings in there will override those in the PhysicsEditor config object. * * @method Phaser.Physics.Matter.Factory#fromPhysicsEditor @@ -247,18 +247,18 @@ var Factory = new Class({ /** * Creates a body using the path data from an SVG file. - * + * * SVG Parsing requires the pathseg polyfill from https://github.com/progers/pathseg - * + * * The SVG file should be loaded as XML, as this method requires the ability to extract * the path data from it. I.e.: - * + * * ```javascript * preload () * { * this.load.xml('face', 'assets/face.svg); * } - * + * * create () * { * this.matter.add.fromSVG(400, 300, this.cache.xml.get('face')); @@ -310,29 +310,29 @@ var Factory = new Class({ /** * Creates a body using the supplied physics data, as provided by a JSON file. - * + * * The data file should be loaded as JSON: - * + * * ```javascript * preload () * { * this.load.json('ninjas', 'assets/ninjas.json); * } - * + * * create () * { * const ninjaShapes = this.cache.json.get('ninjas'); - * + * * this.matter.add.fromJSON(400, 300, ninjaShapes.shinobi); * } * ``` - * + * * Do not pass the entire JSON file to this method, but instead pass one of the shapes contained within it. - * + * * If you pas in an `options` object, any settings in there will override those in the config object. - * + * * The structure of the JSON file is as follows: - * + * * ```text * { * 'generator_info': // The name of the application that created the JSON data @@ -343,7 +343,7 @@ var Factory = new Class({ * } * } * ``` - * + * * At the time of writing, only the Phaser Physics Tracer App exports in this format. * * @method Phaser.Physics.Matter.Factory#fromJSON @@ -418,7 +418,7 @@ var Factory = new Class({ /** * Create a new composite containing bodies created in the callback in a grid arrangement. - * + * * This function uses the body bounds to prevent overlaps. * * @method Phaser.Physics.Matter.Factory#stack @@ -584,18 +584,18 @@ var Factory = new Class({ /** * This method is an alias for `Factory.constraint`. - * + * * Constraints (or joints) are used for specifying that a fixed distance must be maintained * between two bodies, or a body and a fixed world-space position. - * + * * The stiffness of constraints can be modified to create springs or elastic. - * + * * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` * value (e.g. `0.7` or above). - * + * * If the constraint is unstable, try lowering the `stiffness` value and / or increasing * `constraintIterations` within the Matter Config. - * + * * For compound bodies, constraints must be applied to the parent body and not one of its parts. * * @method Phaser.Physics.Matter.Factory#joint @@ -616,18 +616,18 @@ var Factory = new Class({ /** * This method is an alias for `Factory.constraint`. - * + * * Constraints (or joints) are used for specifying that a fixed distance must be maintained * between two bodies, or a body and a fixed world-space position. - * + * * The stiffness of constraints can be modified to create springs or elastic. - * + * * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` * value (e.g. `0.7` or above). - * + * * If the constraint is unstable, try lowering the `stiffness` value and / or increasing * `constraintIterations` within the Matter Config. - * + * * For compound bodies, constraints must be applied to the parent body and not one of its parts. * * @method Phaser.Physics.Matter.Factory#spring @@ -649,15 +649,15 @@ var Factory = new Class({ /** * Constraints (or joints) are used for specifying that a fixed distance must be maintained * between two bodies, or a body and a fixed world-space position. - * + * * The stiffness of constraints can be modified to create springs or elastic. - * + * * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` * value (e.g. `0.7` or above). - * + * * If the constraint is unstable, try lowering the `stiffness` value and / or increasing * `constraintIterations` within the Matter Config. - * + * * For compound bodies, constraints must be applied to the parent body and not one of its parts. * * @method Phaser.Physics.Matter.Factory#constraint @@ -696,18 +696,18 @@ var Factory = new Class({ /** * Constraints (or joints) are used for specifying that a fixed distance must be maintained * between two bodies, or a body and a fixed world-space position. - * + * * A world constraint has only one body, you should specify a `pointA` position in * the constraint options parameter to attach the constraint to the world. - * + * * The stiffness of constraints can be modified to create springs or elastic. - * + * * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` * value (e.g. `0.7` or above). - * + * * If the constraint is unstable, try lowering the `stiffness` value and / or increasing * `constraintIterations` within the Matter Config. - * + * * For compound bodies, constraints must be applied to the parent body and not one of its parts. * * @method Phaser.Physics.Matter.Factory#worldConstraint @@ -743,13 +743,13 @@ var Factory = new Class({ /** * This method is an alias for `Factory.pointerConstraint`. - * + * * A Pointer Constraint is a special type of constraint that allows you to click * and drag bodies in a Matter World. It monitors the active Pointers in a Scene, * and when one is pressed down it checks to see if that hit any part of any active * body in the world. If it did, and the body has input enabled, it will begin to * drag it until either released, or you stop it via the `stopDrag` method. - * + * * You can adjust the stiffness, length and other properties of the constraint via * the `options` object on creation. * @@ -771,7 +771,7 @@ var Factory = new Class({ * and when one is pressed down it checks to see if that hit any part of any active * body in the world. If it did, and the body has input enabled, it will begin to * drag it until either released, or you stop it via the `stopDrag` method. - * + * * You can adjust the stiffness, length and other properties of the constraint via * the `options` object on creation. * @@ -800,7 +800,7 @@ var Factory = new Class({ /** * Creates a Matter Physics Image Game Object. - * + * * An Image is a light-weight Game Object useful for the display of static images in your game, * such as logos, backgrounds, scenery or other non-animated elements. Images can have input * events and physics bodies, or be tweened, tinted or scrolled. The main difference between an @@ -885,10 +885,10 @@ var Factory = new Class({ /** * Takes an existing Game Object and injects all of the Matter Components into it. - * + * * This enables you to use component methods such as `setVelocity` or `isSensor` directly from * this Game Object. - * + * * You can also pass in either a Matter Body Configuration object, or a Matter Body instance * to link with this Game Object. * @@ -899,7 +899,7 @@ var Factory = new Class({ * @param {(Phaser.Types.Physics.Matter.MatterBodyConfig|MatterJS.Body)} [options] - A Matter Body configuration object, or an instance of a Matter Body. * @param {boolean} [addToWorld=true] - Add this Matter Body to the World? * - * @return {Phaser.GameObjects.GameObject} The Game Object that had the Matter Components injected into it. + * @return {Phaser.Physics.Matter.MatterGameObject} The Game Object that had the Matter Components injected into it. */ gameObject: function (gameObject, options, addToWorld) { From 28c6635ea38af5691afcb778be47168a446dc7c4 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 3 Sep 2020 15:01:55 +0100 Subject: [PATCH 177/241] `Utils.Array.SortByDigits` is a new function that takes the given array of strings and runs a numeric sort on it, ignoring any non-digits. --- src/utils/array/SortByDigits.js | 32 ++++++++++++++++++++++++++++++++ src/utils/array/index.js | 1 + 2 files changed, 33 insertions(+) create mode 100644 src/utils/array/SortByDigits.js diff --git a/src/utils/array/SortByDigits.js b/src/utils/array/SortByDigits.js new file mode 100644 index 000000000..e5b621c6c --- /dev/null +++ b/src/utils/array/SortByDigits.js @@ -0,0 +1,32 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Takes the given array and runs a numeric sort on it, ignoring any non-digits that + * may be in the entries. + * + * You should only run this on arrays containing strings. + * + * @function Phaser.Utils.Array.SortByDigits + * @since 3.50.0 + * + * @param {string[]} array - The input array of strings. + * + * @return {string[]} The sorted input array. + */ +var SortByDigits = function (array) +{ + var re = /\D/g; + + array.sort(function (a, b) + { + return (parseInt(a.replace(re, ''), 10) - parseInt(b.replace(re, ''), 10)); + }); + + return array; +}; + +module.exports = SortByDigits; diff --git a/src/utils/array/index.js b/src/utils/array/index.js index 035f62ebd..0ea0a7318 100644 --- a/src/utils/array/index.js +++ b/src/utils/array/index.js @@ -40,6 +40,7 @@ module.exports = { SendToBack: require('./SendToBack'), SetAll: require('./SetAll'), Shuffle: require('./Shuffle'), + SortByDigits: require('./SortByDigits'), SpliceOne: require('./SpliceOne'), StableSort: require('./StableSort'), Swap: require('./Swap') From 15c6e7718cbf60382adf0997dbb46066f36e8025 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 3 Sep 2020 15:04:09 +0100 Subject: [PATCH 178/241] New Animation events --- src/animations/events/ANIMATION_STOP_EVENT.js | 21 +++++++++++++++ .../events/ANIMATION_UPDATE_EVENT.js | 22 ++++++++++++++++ .../events/SPRITE_ANIMATION_KEY_STOP_EVENT.js | 24 +++++++++++++++++ .../events/SPRITE_ANIMATION_STOP_EVENT.js | 26 +++++++++++++++++++ src/animations/events/index.js | 4 +++ 5 files changed, 97 insertions(+) create mode 100644 src/animations/events/ANIMATION_STOP_EVENT.js create mode 100644 src/animations/events/ANIMATION_UPDATE_EVENT.js create mode 100644 src/animations/events/SPRITE_ANIMATION_KEY_STOP_EVENT.js create mode 100644 src/animations/events/SPRITE_ANIMATION_STOP_EVENT.js diff --git a/src/animations/events/ANIMATION_STOP_EVENT.js b/src/animations/events/ANIMATION_STOP_EVENT.js new file mode 100644 index 000000000..687e7a0f2 --- /dev/null +++ b/src/animations/events/ANIMATION_STOP_EVENT.js @@ -0,0 +1,21 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Stop Event. + * + * This event is dispatched by an Animation instance when playback is forcibly stopped on it, + * i.e. `Sprite.stop()`, or similar, is called. Or, a new animation is started before the + * previous one completes. + * + * @event Phaser.Animations.Events#ANIMATION_STOP + * @since 3.50.0 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was stopped. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation stopped on. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation stopped. + */ +module.exports = 'stop'; diff --git a/src/animations/events/ANIMATION_UPDATE_EVENT.js b/src/animations/events/ANIMATION_UPDATE_EVENT.js new file mode 100644 index 000000000..26b28b2b9 --- /dev/null +++ b/src/animations/events/ANIMATION_UPDATE_EVENT.js @@ -0,0 +1,22 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Update Event. + * + * This event is dispatched by an animation when it updates. This happens when the animation changes frame, + * based on the animation frame rate and other factors like `timeScale` and `delay`. + * + * Listen for it on the Animation using `anim.on('update', listener)` + * + * @event Phaser.Animations.Events#ANIMATION_UPDATE + * @since 3.50.0 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated. + */ +module.exports = 'update'; diff --git a/src/animations/events/SPRITE_ANIMATION_KEY_STOP_EVENT.js b/src/animations/events/SPRITE_ANIMATION_KEY_STOP_EVENT.js new file mode 100644 index 000000000..2651caf06 --- /dev/null +++ b/src/animations/events/SPRITE_ANIMATION_KEY_STOP_EVENT.js @@ -0,0 +1,24 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Key Complete Event. + * + * This event is dispatched by a Sprite when animation playback is forcibly stopped on it, + * i.e. `Sprite.stop()`, or similar, is called. Or, a new animation is started before the + * previous one completes. + * + * Listen for it on the Sprite using `sprite.on('animationstop-key', listener)` where `key` is the key of + * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationstop-explode`. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_STOP + * @since 3.50.0 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was stopped. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation stopped on. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation stopped. + */ +module.exports = 'animationstop-'; diff --git a/src/animations/events/SPRITE_ANIMATION_STOP_EVENT.js b/src/animations/events/SPRITE_ANIMATION_STOP_EVENT.js new file mode 100644 index 000000000..68a794704 --- /dev/null +++ b/src/animations/events/SPRITE_ANIMATION_STOP_EVENT.js @@ -0,0 +1,26 @@ +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Sprite Animation Stop Event. + * + * This event is dispatched by a Sprite when animation playback is forcibly stopped on it, + * i.e. `Sprite.stop()`, or similar, is called. Or, a new animation is started before the + * previous one completes. + * + * Listen for it on the Sprite using `sprite.on('animationstop', listener)` + * + * This same event is dispatched for all animations. To listen for a specific animation, + * use the `SPRITE_ANIMATION_KEY_STOP` event. + * + * @event Phaser.Animations.Events#SPRITE_ANIMATION_STOP + * @since 3.50.0 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was stopped. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation stopped on. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation stopped. + */ +module.exports = 'animationstop'; diff --git a/src/animations/events/index.js b/src/animations/events/index.js index 4882d1f66..dbffa31c9 100644 --- a/src/animations/events/index.js +++ b/src/animations/events/index.js @@ -15,6 +15,8 @@ module.exports = { ANIMATION_REPEAT: require('./ANIMATION_REPEAT_EVENT'), ANIMATION_RESTART: require('./ANIMATION_RESTART_EVENT'), ANIMATION_START: require('./ANIMATION_START_EVENT'), + ANIMATION_STOP: require('./ANIMATION_STOP_EVENT'), + ANIMATION_UPDATE: require('./ANIMATION_UPDATE_EVENT'), PAUSE_ALL: require('./PAUSE_ALL_EVENT'), REMOVE_ANIMATION: require('./REMOVE_ANIMATION_EVENT'), RESUME_ALL: require('./RESUME_ALL_EVENT'), @@ -23,10 +25,12 @@ module.exports = { SPRITE_ANIMATION_KEY_REPEAT: require('./SPRITE_ANIMATION_KEY_REPEAT_EVENT'), SPRITE_ANIMATION_KEY_RESTART: require('./SPRITE_ANIMATION_KEY_RESTART_EVENT'), SPRITE_ANIMATION_KEY_START: require('./SPRITE_ANIMATION_KEY_START_EVENT'), + SPRITE_ANIMATION_KEY_STOP: require('./SPRITE_ANIMATION_KEY_STOP_EVENT'), SPRITE_ANIMATION_KEY_UPDATE: require('./SPRITE_ANIMATION_KEY_UPDATE_EVENT'), SPRITE_ANIMATION_REPEAT: require('./SPRITE_ANIMATION_REPEAT_EVENT'), SPRITE_ANIMATION_RESTART: require('./SPRITE_ANIMATION_RESTART_EVENT'), SPRITE_ANIMATION_START: require('./SPRITE_ANIMATION_START_EVENT'), + SPRITE_ANIMATION_STOP: require('./SPRITE_ANIMATION_STOP_EVENT'), SPRITE_ANIMATION_UPDATE: require('./SPRITE_ANIMATION_UPDATE_EVENT') }; From 803c300ae41194036343c2422c40dccab932e9fb Mon Sep 17 00:00:00 2001 From: samme Date: Thu, 3 Sep 2020 07:32:44 -0700 Subject: [PATCH 179/241] Add ArcadeWorldConfig.fixedStep --- src/physics/arcade/World.js | 2 +- src/physics/arcade/typedefs/ArcadeWorldConfig.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/physics/arcade/World.js b/src/physics/arcade/World.js index 54abe6e38..ec81b400e 100644 --- a/src/physics/arcade/World.js +++ b/src/physics/arcade/World.js @@ -165,7 +165,7 @@ var World = new Class({ * @default true * @since 3.23.0 */ - this.fixedStep = true; + this.fixedStep = GetValue(config, 'fixedStep', true); /** * The amount of elapsed ms since the last frame. diff --git a/src/physics/arcade/typedefs/ArcadeWorldConfig.js b/src/physics/arcade/typedefs/ArcadeWorldConfig.js index 933aa9c2d..258b3bc6b 100644 --- a/src/physics/arcade/typedefs/ArcadeWorldConfig.js +++ b/src/physics/arcade/typedefs/ArcadeWorldConfig.js @@ -3,6 +3,7 @@ * @since 3.0.0 * * @property {number} [fps=60] - Sets {@link Phaser.Physics.Arcade.World#fps}. + * @property {boolean} [fixedStep=true] - Sets {@link Phaser.Physics.Arcade.World#fixedStep}. * @property {number} [timeScale=1] - Sets {@link Phaser.Physics.Arcade.World#timeScale}. * @property {Phaser.Types.Math.Vector2Like} [gravity] - Sets {@link Phaser.Physics.Arcade.World#gravity}. * @property {number} [x=0] - Sets {@link Phaser.Physics.Arcade.World#bounds bounds.x}. From f505f6a3e395cdba971512e44254201a31df4002 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 3 Sep 2020 17:34:16 +0100 Subject: [PATCH 180/241] `Actions.setOrigin` will now call `updateDisplayOrigin` on the items array, otherwise the effects can't be seen when rendering. --- src/actions/SetOrigin.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/actions/SetOrigin.js b/src/actions/SetOrigin.js index 6983e4563..d8b4c93bc 100644 --- a/src/actions/SetOrigin.js +++ b/src/actions/SetOrigin.js @@ -34,8 +34,14 @@ var SetOrigin = function (items, originX, originY, stepX, stepY, index, directio if (originY === undefined || originY === null) { originY = originX; } PropertyValueSet(items, 'originX', originX, stepX, index, direction); + PropertyValueSet(items, 'originY', originY, stepY, index, direction); - return PropertyValueSet(items, 'originY', originY, stepY, index, direction); + items.forEach(function (item) + { + item.updateDisplayOrigin(); + }); + + return items; }; module.exports = SetOrigin; From b9e5f3e9bcf0a8d7062fee4371e2097d526a68d6 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 3 Sep 2020 17:36:05 +0100 Subject: [PATCH 181/241] `GroupCreateConfig`, which is used when calling `Group.createMultiple` or `Group.createFromConfig`, can now accept the following new properties: `setOrigin: { x, y, stepX, stepY }` which are applied to the items created by the Group. --- src/gameobjects/group/Group.js | 7 +++++++ src/gameobjects/group/typedefs/GroupCreateConfig.js | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/src/gameobjects/group/Group.js b/src/gameobjects/group/Group.js index 98ca9d3f0..9e051fc6d 100644 --- a/src/gameobjects/group/Group.js +++ b/src/gameobjects/group/Group.js @@ -445,6 +445,13 @@ var Group = new Class({ Actions.SetScale(entries, scaleX, scaleY, stepScaleX, stepScaleY); + var originX = GetValue(options, 'setOrigin.x', 0.5); + var originY = GetValue(options, 'setOrigin.y', originX); + var stepOriginX = GetValue(options, 'setOrigin.stepX', 0); + var stepOriginY = GetValue(options, 'setOrigin.stepY', 0); + + Actions.SetOrigin(entries, originX, originY, stepOriginX, stepOriginY); + var alpha = GetValue(options, 'setAlpha.value', 1); var stepAlpha = GetValue(options, 'setAlpha.step', 0); diff --git a/src/gameobjects/group/typedefs/GroupCreateConfig.js b/src/gameobjects/group/typedefs/GroupCreateConfig.js index fe7d4ab86..a2016bf60 100644 --- a/src/gameobjects/group/typedefs/GroupCreateConfig.js +++ b/src/gameobjects/group/typedefs/GroupCreateConfig.js @@ -35,6 +35,11 @@ * @property {?number} [setScale.y=0] - The vertical scale of each new Game Object. * @property {?number} [setScale.stepX=0] - Increment each Game Object's horizontal scale from the previous by this amount, starting from `setScale.x`. * @property {?number} [setScale.stepY=0] - Increment each Game object's vertical scale from the previous by this amount, starting from `setScale.y`. + * @property {?object} [setOrigin] + * @property {?number} [setOrigin.x=0] - The horizontal origin of each new Game Object. + * @property {?number} [setOrigin.y=0] - The vertical origin of each new Game Object. + * @property {?number} [setOrigin.stepX=0] - Increment each Game Object's horizontal origin from the previous by this amount, starting from `setOrigin.x`. + * @property {?number} [setOrigin.stepY=0] - Increment each Game object's vertical origin from the previous by this amount, starting from `setOrigin.y`. * @property {?object} [setAlpha] * @property {?number} [setAlpha.value=0] - The alpha value of each new Game Object. * @property {?number} [setAlpha.step=0] - Increment each Game Object's alpha from the previous by this amount, starting from `setAlpha.value`. From 050c2a61b603b4b03ef0a1b559de3e1d981a5cda Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 3 Sep 2020 17:36:36 +0100 Subject: [PATCH 182/241] Fixed data-type --- src/animations/typedefs/Animation.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/animations/typedefs/Animation.js b/src/animations/typedefs/Animation.js index 61f57c290..bb38801c2 100644 --- a/src/animations/typedefs/Animation.js +++ b/src/animations/typedefs/Animation.js @@ -3,7 +3,8 @@ * @since 3.0.0 * * @property {string} [key] - The key that the animation will be associated with. i.e. sprite.animations.play(key) - * @property {Phaser.Types.Animations.AnimationFrame[]} [frames] - An object containing data used to generate the frames for the animation. + * @property {string|Phaser.Types.Animations.AnimationFrame[]} [frames] - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects. + * @property {boolean} [sortFrames=true] - If you provide a string for `frames` you can optionally have the frame names numerically sorted. * @property {string} [defaultTextureKey=null] - The key of the texture all frames of the animation will use. Can be overridden on a per frame basis. * @property {integer} [frameRate] - The frame rate of playback in frames per second (default 24 if duration is null) * @property {integer} [duration] - How long the animation should play for in milliseconds. If not given its derived from frameRate. From 33cc87121c25ad2957e9b9f97d47e13ee20687ab Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 3 Sep 2020 17:37:21 +0100 Subject: [PATCH 183/241] The `BuildGameObjectAnimation` function now uses the `PlayAnimationConfig` object to set the values. --- src/gameobjects/BuildGameObjectAnimation.js | 56 ++++++++++++--------- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/src/gameobjects/BuildGameObjectAnimation.js b/src/gameobjects/BuildGameObjectAnimation.js index 9ed0283ae..06039d88f 100644 --- a/src/gameobjects/BuildGameObjectAnimation.js +++ b/src/gameobjects/BuildGameObjectAnimation.js @@ -48,32 +48,40 @@ var BuildGameObjectAnimation = function (sprite, config) var anims = sprite.anims; var key = GetAdvancedValue(animConfig, 'key', undefined); - var startFrame = GetAdvancedValue(animConfig, 'startFrame', undefined); - var delay = GetAdvancedValue(animConfig, 'delay', 0); - var repeat = GetAdvancedValue(animConfig, 'repeat', 0); - var repeatDelay = GetAdvancedValue(animConfig, 'repeatDelay', 0); - var yoyo = GetAdvancedValue(animConfig, 'yoyo', false); - - var play = GetAdvancedValue(animConfig, 'play', false); - var delayedPlay = GetAdvancedValue(animConfig, 'delayedPlay', 0); - - anims.setDelay(delay); - anims.setRepeat(repeat); - anims.setRepeatDelay(repeatDelay); - anims.setYoyo(yoyo); - - if (play) + if (key) { - anims.play(key, startFrame); - } - else if (delayedPlay > 0) - { - anims.delayedPlay(delayedPlay, key, startFrame); - } - else - { - anims.load(key); + var startFrame = GetAdvancedValue(animConfig, 'startFrame', undefined); + + var delay = GetAdvancedValue(animConfig, 'delay', 0); + var repeat = GetAdvancedValue(animConfig, 'repeat', 0); + var repeatDelay = GetAdvancedValue(animConfig, 'repeatDelay', 0); + var yoyo = GetAdvancedValue(animConfig, 'yoyo', false); + + var play = GetAdvancedValue(animConfig, 'play', false); + var delayedPlay = GetAdvancedValue(animConfig, 'delayedPlay', 0); + + var playConfig = { + key: key, + delay: delay, + repeat: repeat, + repeatDelay: repeatDelay, + yoyo: yoyo, + startFrame: startFrame + }; + + if (play) + { + anims.play(playConfig); + } + else if (delayedPlay > 0) + { + anims.delayedPlay(delayedPlay, playConfig); + } + else + { + anims.load(playConfig); + } } } From b4b5338f28bd9b82b7b11684a8843ac64c5a822b Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 3 Sep 2020 17:38:36 +0100 Subject: [PATCH 184/241] Added `playReverse`, `delayedPlay` and `stop` methods and better docs. --- src/gameobjects/sprite/Sprite.js | 136 +++++++++++++++++++++++++++++-- 1 file changed, 130 insertions(+), 6 deletions(-) diff --git a/src/gameobjects/sprite/Sprite.js b/src/gameobjects/sprite/Sprite.js index a8cc52bbf..7d0d16577 100644 --- a/src/gameobjects/sprite/Sprite.js +++ b/src/gameobjects/sprite/Sprite.js @@ -134,7 +134,39 @@ var Sprite = new Class({ }, /** - * Start playing the given animation. + * Start playing the given animation on this Sprite. + * + * Animations in Phaser belong to the global Animation Manager. This means multiple Sprites can all play the same + * animation. The following code shows how to create a global repeating animation. The animation will be created + * from all of the frames within the sprite sheet that was loaded with the key 'muybridge': + * + * ```javascript + * var config = { + * key: 'run', + * frames: 'muybridge', + * frameRate: 15, + * repeat: -1 + * }; + * + * this.anims.create(config); + * ``` + * + * With the animation created, you can now play it on this Sprite: + * + * ```javascript + * this.add.sprite(x, y).play('run'); + * ``` + * + * Alternatively, if you wish to run it at a different frame rate, for example, you can pass a config + * object instead: + * + * ```javascript + * this.add.sprite(x, y).play({ key: 'run', frameRate: 24 }); + * ``` + * + * See the documentation for the `PlayAnimationConfig` config object for more details about this. + * + * Also, see the documentation in the Animation Manager for further details on creating animations. * * @method Phaser.GameObjects.Sprite#play * @fires Phaser.Animations.Events#ANIMATION_START @@ -153,6 +185,102 @@ var Sprite = new Class({ return this.anims.play(key, ignoreIfPlaying, startFrame); }, + /** + * Start playing the given animation on this Sprite in reverse. + * + * Animations in Phaser belong to the global Animation Manager. This means multiple Sprites can all play the same + * animation. The following code shows how to create a global repeating animation. The animation will be created + * from all of the frames within the sprite sheet that was loaded with the key 'muybridge': + * + * ```javascript + * var config = { + * key: 'run', + * frames: 'muybridge', + * frameRate: 15, + * repeat: -1 + * }; + * + * this.anims.create(config); + * ``` + * + * With the animation created, you can now play it on this Sprite: + * + * ```javascript + * this.add.sprite(x, y).playReverse('run'); + * ``` + * + * Alternatively, if you wish to run it at a different frame rate, for example, you can pass a config + * object instead: + * + * ```javascript + * this.add.sprite(x, y).playReverse({ key: 'run', frameRate: 24 }); + * ``` + * + * See the documentation for the `PlayAnimationConfig` config object for more details about this. + * + * Also, see the documentation in the Animation Manager for further details on creating animations. + * + * @method Phaser.GameObjects.Sprite#playReverse + * @fires Phaser.Animations.Events#ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START + * @since 3.50.0 + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. + * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. + * + * @return {this} This Game Object. + */ + playReverse: function (key, ignoreIfPlaying, startFrame) + { + return this.anims.playReverse(key, ignoreIfPlaying, startFrame); + }, + + /** + * Waits for the specified delay, in milliseconds, then starts playback of the requested animation. + * + * If the animation _also_ has a delay value set in its config, this value will override that and be used instead. + * + * The delay only takes effect if the animation has not already started playing. + * + * @method Phaser.GameObjects.Sprite#delayedPlay + * @fires Phaser.Animations.Events#ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START + * @since 3.50.0 + * + * @param {integer} delay - The delay, in milliseconds, to wait before starting the animation playing. + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {integer} [startFrame=0] - The frame of the animation to start from. + * + * @return {this} This Game Object. + */ + delayedPlay: function (delay, key, startFrame) + { + return this.anims.delayedPlay(delay, key, startFrame); + }, + + /** + * Immediately stops the current animation from playing and dispatches the `ANIMATION_STOP` events. + * + * If no animation is playing, no event will be dispatched. + * + * If there is another animation queued (via the `chain` method) then it will start playing immediately. + * + * @method Phaser.GameObjects.Sprite#stop + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_STOP + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_STOP + * @since 3.50.0 + * + * @return {this} This Game Object. + */ + stop: function () + { + return this.anims.stop(); + }, + /** * Build a JSON representation of this Sprite. * @@ -163,11 +291,7 @@ var Sprite = new Class({ */ toJSON: function () { - var data = Components.ToJSON(this); - - // Extra Sprite data is added here - - return data; + return Components.ToJSON(this); }, /** From 96bc2e89d3ea0ad448977c59c70f7a4bbd2f8bd8 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 3 Sep 2020 17:42:10 +0100 Subject: [PATCH 185/241] Removed `load` and fixed `staggerPlay` --- src/animations/AnimationManager.js | 179 ++++++++++++++--------------- 1 file changed, 85 insertions(+), 94 deletions(-) diff --git a/src/animations/AnimationManager.js b/src/animations/AnimationManager.js index f644a0888..574d1b502 100644 --- a/src/animations/AnimationManager.js +++ b/src/animations/AnimationManager.js @@ -153,7 +153,7 @@ var AnimationManager = new Class({ /** * Checks to see if the given key is already in use within the Animation Manager or not. - * + * * Animations are global. Keys created in one scene can be used from any other Scene in your game. They are not Scene specific. * * @method Phaser.Animations.AnimationManager#exists @@ -170,15 +170,15 @@ var AnimationManager = new Class({ /** * Creates a new Animation and adds it to the Animation Manager. - * + * * Animations are global. Once created, you can use them in any Scene in your game. They are not Scene specific. - * + * * If an invalid key is given this method will return `false`. - * + * * If you pass the key of an animation that already exists in the Animation Manager, that animation will be returned. - * + * * A brand new animation is only created if the key is valid and not already in use. - * + * * If you wish to re-use an existing key, call `AnimationManager.remove` first, then this method. * * @method Phaser.Animations.AnimationManager#create @@ -204,7 +204,7 @@ var AnimationManager = new Class({ anim = new Animation(this, key, config); this.anims.set(key, anim); - + this.emit(Events.ADD_ANIMATION, key, anim); } } @@ -265,18 +265,18 @@ var AnimationManager = new Class({ * Generate an array of {@link Phaser.Types.Animations.AnimationFrame} objects from a texture key and configuration object. * * Generates objects with string based frame names, as configured by the given {@link Phaser.Types.Animations.GenerateFrameNames}. - * + * * It's a helper method, designed to make it easier for you to extract all of the frame names from texture atlases. * If you're working with a sprite sheet, see the `generateFrameNumbers` method instead. - * + * * Example: - * + * * If you have a texture atlases loaded called `gems` and it contains 6 frames called `ruby_0001`, `ruby_0002`, and so on, * then you can call this method using: `this.anims.generateFrameNames('gems', { prefix: 'ruby_', end: 6, zeroPad: 4 })`. - * + * * The `end` value tells it to look for 6 frames, incrementally numbered, all starting with the prefix `ruby_`. The `zeroPad` * value tells it how many zeroes pad out the numbers. To create an animation using this method, you can do: - * + * * ```javascript * this.anims.create({ * key: 'ruby', @@ -288,7 +288,7 @@ var AnimationManager = new Class({ * }) * }); * ``` - * + * * Please see the animation examples for further details. * * @method Phaser.Animations.AnimationManager#generateFrameNames @@ -367,7 +367,7 @@ var AnimationManager = new Class({ * Generate an array of {@link Phaser.Types.Animations.AnimationFrame} objects from a texture key and configuration object. * * Generates objects with numbered frame names, as configured by the given {@link Phaser.Types.Animations.GenerateFrameNumbers}. - * + * * If you're working with a texture atlas, see the `generateFrameNames` method instead. * * @method Phaser.Animations.AnimationManager#generateFrameNumbers @@ -451,34 +451,6 @@ var AnimationManager = new Class({ return this.anims.get(key); }, - /** - * Load an Animation into a Game Object's Animation Component. - * - * @method Phaser.Animations.AnimationManager#load - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject} child - The Game Object to load the animation into. - * @param {string} key - The key of the animation to load. - * @param {(string|integer)} [startFrame] - The name of a start frame to set on the loaded animation. - * - * @return {Phaser.GameObjects.GameObject} The Game Object with the animation loaded into it. - */ - load: function (child, key, startFrame) - { - var anim = this.get(key); - - if (anim) - { - anim.load(child, startFrame); - } - else - { - console.warn('Missing animation: ' + key); - } - - return child; - }, - /** * Pause all animations. * @@ -506,28 +478,87 @@ var AnimationManager = new Class({ * @method Phaser.Animations.AnimationManager#play * @since 3.0.0 * - * @param {string} key - The key of the animation to play on the Game Object. - * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Objects to play the animation on. + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} children - An array of Game Objects to play the animation on. They must have an Animation Component. * * @return {this} This Animation Manager. */ - play: function (key, child) + play: function (key, children) { - if (!Array.isArray(child)) + if (!Array.isArray(children)) { - child = [ child ]; + children = [ children ]; } - var anim = this.get(key); - - if (!anim) + for (var i = 0; i < children.length; i++) { - return this; + children[i].anims.play(key); } - for (var i = 0; i < child.length; i++) + return this; + }, + + /** + * Takes an array of Game Objects that have an Animation Component and then + * starts the given animation playing on them. The start time of each Game Object + * is offset, incrementally, by the `stagger` amount. + * + * For example, if you pass an array with 4 children and a stagger time of 1000, + * the delays will be: + * + * child 1: 1000ms delay + * child 2: 2000ms delay + * child 3: 3000ms delay + * child 4: 4000ms delay + * + * If you set the `staggerFirst` parameter to `false` they would be: + * + * child 1: 0ms delay + * child 2: 1000ms delay + * child 3: 2000ms delay + * child 4: 3000ms delay + * + * You can also set `stagger` to be a negative value. If it was -1000, the above would be: + * + * child 1: 3000ms delay + * child 2: 2000ms delay + * child 3: 1000ms delay + * child 4: 0ms delay + * + * @method Phaser.Animations.AnimationManager#staggerPlay + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return] + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} children - An array of Game Objects to play the animation on. They must have an Animation Component. + * @param {number} stagger - The amount of time, in milliseconds, to offset each play time by. If a negative value is given, it's applied to the children in reverse order. + * @param {boolean} [staggerFirst=true] -Should the first child be staggered as well? + * + * @return {this} This Animation Manager. + */ + staggerPlay: function (key, children, stagger, staggerFirst) + { + if (stagger === undefined) { stagger = 0; } + if (staggerFirst === undefined) { staggerFirst = true; } + + if (!Array.isArray(children)) { - child[i].anims.play(key); + children = [ children ]; + } + + var len = children.length; + + if (!staggerFirst) + { + len--; + } + + for (var i = 0; i < children.length; i++) + { + var time = (stagger < 0) ? Math.abs(stagger) * (len - i) : stagger * i; + + children[i].anims.delayedPlay(time, key); } return this; @@ -535,7 +566,7 @@ var AnimationManager = new Class({ /** * Removes an Animation from this Animation Manager, based on the given key. - * + * * This is a global action. Once an Animation has been removed, no Game Objects * can carry on using it. * @@ -582,46 +613,6 @@ var AnimationManager = new Class({ return this; }, - /** - * Takes an array of Game Objects that have an Animation Component and then - * starts the given animation playing on them, each one offset by the - * `stagger` amount given to this method. - * - * @method Phaser.Animations.AnimationManager#staggerPlay - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return] - * - * @param {string} key - The key of the animation to play on the Game Objects. - * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} children - An array of Game Objects to play the animation on. They must have an Animation Component. - * @param {number} [stagger=0] - The amount of time, in milliseconds, to offset each play time by. - * - * @return {this} This Animation Manager. - */ - staggerPlay: function (key, children, stagger) - { - if (stagger === undefined) { stagger = 0; } - - if (!Array.isArray(children)) - { - children = [ children ]; - } - - var anim = this.get(key); - - if (!anim) - { - return this; - } - - for (var i = 0; i < children.length; i++) - { - children[i].anims.delayedPlay(stagger * i, key); - } - - return this; - }, - /** * Returns the Animation data as JavaScript object based on the given key. * Or, if not key is defined, it will return the data of all animations as array of objects. From 13601ad31b00a7a82ccc725b55377787c47dca17 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 3 Sep 2020 17:44:46 +0100 Subject: [PATCH 186/241] Removed `completeAnimation`, `load` and `setFrame` and updated other methods to use new component properties. --- src/animations/Animation.js | 160 +++++++++--------------------------- 1 file changed, 38 insertions(+), 122 deletions(-) diff --git a/src/animations/Animation.js b/src/animations/Animation.js index 818b42f27..1a70a2560 100644 --- a/src/animations/Animation.js +++ b/src/animations/Animation.js @@ -11,6 +11,7 @@ var Events = require('./events'); var FindClosestInSorted = require('../utils/array/FindClosestInSorted'); var Frame = require('./AnimationFrame'); var GetValue = require('../utils/object/GetValue'); +var SortByDigits = require('../utils/array/SortByDigits'); /** * @classdesc @@ -80,7 +81,8 @@ var Animation = new Class({ this.frames = this.getFrames( manager.textureManager, GetValue(config, 'frames', []), - GetValue(config, 'defaultTextureKey', null) + GetValue(config, 'defaultTextureKey', null), + GetValue(config, 'sortFrames', true) ); /** @@ -320,26 +322,6 @@ var Animation = new Class({ return (index >= 0 && index < this.frames.length); }, - /** - * Called internally when this Animation completes playback. - * Optionally, hides the parent Game Object, then stops playback. - * - * @method Phaser.Animations.Animation#completeAnimation - * @protected - * @since 3.0.0 - * - * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. - */ - completeAnimation: function (component) - { - if (component.hideOnComplete) - { - component.parent.visible = false; - } - - component.stop(); - }, - /** * Called internally when this Animation first starts to play. * Sets the accumulator and nextTick properties. @@ -349,20 +331,13 @@ var Animation = new Class({ * @since 3.0.0 * * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. - * @param {boolean} [includeDelay=true] - If `true` the Animation Components delay value will be added to the `nextTick` total. */ - getFirstTick: function (component, includeDelay) + getFirstTick: function (component) { - if (includeDelay === undefined) { includeDelay = true; } - // When is the first update due? component.accumulator = 0; - component.nextTick = component.msPerFrame + component.currentFrame.duration; - if (includeDelay) - { - component.nextTick += component._delay; - } + component.nextTick = component.msPerFrame + component.currentFrame.duration; }, /** @@ -393,8 +368,10 @@ var Animation = new Class({ * * @return {Phaser.Animations.AnimationFrame[]} An array of newly created AnimationFrame instances. */ - getFrames: function (textureManager, frames, defaultTextureKey) + getFrames: function (textureManager, frames, defaultTextureKey, sortFrames) { + if (sortFrames === undefined) { sortFrames = true; } + var out = []; var prev; var animationFrame; @@ -410,9 +387,14 @@ var Animation = new Class({ var texture = textureManager.get(textureKey); var frameKeys = texture.getFrameNames(); + if (sortFrames) + { + SortByDigits(frameKeys); + } + frames = []; - frameKeys.forEach(function (idx, value) + frameKeys.forEach(function (value) { frames.push({ key: textureKey, frame: value }); }); @@ -502,50 +484,6 @@ var Animation = new Class({ component.nextTick = component.msPerFrame + component.currentFrame.duration; }, - /** - * Loads the Animation values into the Animation Component. - * - * @method Phaser.Animations.Animation#load - * @private - * @since 3.0.0 - * - * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to load values into. - * @param {integer} startFrame - The start frame of the animation to load. - */ - load: function (component, startFrame) - { - if (startFrame >= this.frames.length) - { - startFrame = 0; - } - - if (component.currentAnim !== this) - { - component.currentAnim = this; - - component.frameRate = this.frameRate; - component.duration = this.duration; - component.msPerFrame = this.msPerFrame; - component.skipMissedFrames = this.skipMissedFrames; - component.showOnStart = this.showOnStart; - component.hideOnComplete = this.hideOnComplete; - - component._delay = this.delay; - component._repeat = this.repeat; - component._repeatDelay = this.repeatDelay; - component._yoyo = this.yoyo; - } - - var frame = this.frames[startFrame]; - - if (startFrame === 0 && !component.forward) - { - frame = this.getLastFrame(); - } - - component.updateFrame(frame); - }, - /** * Returns the frame closest to the given progress value between 0 and 1. * @@ -582,7 +520,7 @@ var Animation = new Class({ // We're at the end of the animation // Yoyo? (happens before repeat) - if (component._yoyo) + if (component.yoyo) { this.handleYoyoFrame(component, false); } @@ -590,7 +528,7 @@ var Animation = new Class({ { // Repeat (happens before complete) - if (component._reverse && component.forward) + if (component.inReverse && component.forward) { component.forward = false; } @@ -601,7 +539,7 @@ var Animation = new Class({ } else { - this.completeAnimation(component); + component.complete(); } } else @@ -624,10 +562,9 @@ var Animation = new Class({ { if (!isReverse) { isReverse = false; } - if (component._reverse === !isReverse && component.repeatCounter > 0) + if (component.inReverse === !isReverse && component.repeatCounter > 0) { - if (!component._repeatDelay || component.pendingRepeat) - + if (component.repeatDelay === 0 || component.pendingRepeat) { component.forward = isReverse; } @@ -637,9 +574,9 @@ var Animation = new Class({ return; } - if (component._reverse !== isReverse && component.repeatCounter === 0) + if (component.inReverse !== isReverse && component.repeatCounter === 0) { - this.completeAnimation(component); + component.complete(); return; } @@ -683,27 +620,29 @@ var Animation = new Class({ { // We're at the start of the animation - if (component._yoyo) + if (component.yoyo) { this.handleYoyoFrame(component, true); } else if (component.repeatCounter > 0) { - if (component._reverse && !component.forward) + if (component.inReverse && !component.forward) { component.currentFrame = this.getLastFrame(); + this.repeatAnimation(component); } else { // Repeat (happens before complete) component.forward = true; + this.repeatAnimation(component); } } else { - this.completeAnimation(component); + component.complete(); } } else @@ -787,60 +726,37 @@ var Animation = new Class({ { if (component._pendingStop === 2) { - return this.completeAnimation(component); + return component.stop(); } - if (component._repeatDelay > 0 && component.pendingRepeat === false) + if (component.repeatDelay > 0 && !component.pendingRepeat) { component.pendingRepeat = true; component.accumulator -= component.nextTick; - component.nextTick += component._repeatDelay; + component.nextTick += component.repeatDelay; } else { component.repeatCounter--; - component.updateFrame(component.currentFrame[(component.forward) ? 'nextFrame' : 'prevFrame']); + if (component.forward) + { + component.updateFrame(component.currentFrame.nextFrame); + } + else + { + component.updateFrame(component.currentFrame.prevFrame); + } if (component.isPlaying) { this.getNextTick(component); - component.pendingRepeat = false; - - var frame = component.currentFrame; - var parent = component.parent; - - this.emit(Events.ANIMATION_REPEAT, this, frame); - - parent.emit(Events.SPRITE_ANIMATION_KEY_REPEAT + this.key, this, frame, component.repeatCounter, parent); - - parent.emit(Events.SPRITE_ANIMATION_REPEAT, this, frame, component.repeatCounter, parent); + component.handleRepeat(); } } }, - /** - * Sets the texture frame the animation uses for rendering. - * - * @method Phaser.Animations.Animation#setFrame - * @since 3.0.0 - * - * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. - */ - setFrame: function (component) - { - // Work out which frame should be set next on the child, and set it - if (component.forward) - { - this.nextFrame(component); - } - else - { - this.previousFrame(component); - } - }, - /** * Converts the animation data to JSON. * From 151535703936ebcde53a81d77aa9e361ecd16533 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 3 Sep 2020 17:56:22 +0100 Subject: [PATCH 187/241] Lots of updates (see full description) * `Component.Animation.timeScale` is a new public property that replaces the old private `_timeScale` property. * `Component.Animation.delay` is a new public property that replaces the old private `_delay` property. * `Component.Animation.repeat` is a new public property that replaces the old private `_repeat` property. * `Component.Animation.repeatDelay` is a new public property that replaces the old private `_repeatDelay` property. * `Component.Animation.yoyo` is a new public property that replaces the old private `_yoyo` property. * `Component.Animation.inReverse` is a new public property that replaces the old private `_reverse` property. * `Component.Animation.startAnimation` is a new public method that replaces the old private `_startAnimation` method. * The `Component.Animation.getProgress` method has been fixed so it will return correctly if the animation is playing in reverse. * The `Component.Animation.remove` method will now always be called when an animation is removed, not just once. * The `Component.Animation.getRepeat` method has now been removed. You can get the value from the `repeat` property. * The `Component.Animation.setRepeatDelay` method has now been removed. You can set the value using the `repeatDelay` config property, or changing it at run-time. * `Component.Animation.complete` is a new method that handles the completion in animation playback. * The `Component.Animation.setTimeScale` method has now been removed. You can set the value using the `timeScale` config property, or changing it at run-time. * The `Component.Animation.getTimeScale` method has now been removed. You can read the value using the `timeScale` property. * The `Component.Animation.getTotalFrames` method has been fixed and won't error if called when no animation is loaded. * The `Component.Animation.setYoyo` method has now been removed. You can set the value using the `yoyo` config property, or changing it at run-time. * The `Component.Animation.getYoyo` method has now been removed. You can read the value using the `yoyo` property. --- src/gameobjects/components/Animation.js | 786 ++++++++++++++---------- 1 file changed, 452 insertions(+), 334 deletions(-) diff --git a/src/gameobjects/components/Animation.js b/src/gameobjects/components/Animation.js index 45f833aff..583f1c700 100644 --- a/src/gameobjects/components/Animation.js +++ b/src/gameobjects/components/Animation.js @@ -10,16 +10,23 @@ var Events = require('../../animations/events'); /** * @classdesc - * A Game Object Animation Controller. + * The Game Object Animation Component. * - * This controller lives as an instance within a Game Object, accessible as `sprite.anims`. + * This component lives as an instance within any Game Object that has it defined, such as Sprites. + * + * You can access its properties and methods via `anims`, i.e. `Sprite.anims`. + * + * This component handles the loading of animations from the Animation Manager into the Game Object, + * the playback of them and all related events. + * + * To create animations, please see the Animation Manager class instead. * * @class Animation * @memberof Phaser.GameObjects.Components * @constructor * @since 3.0.0 * - * @param {Phaser.GameObjects.GameObject} parent - The Game Object to which this animation controller belongs. + * @param {Phaser.GameObjects.GameObject} parent - The Game Object to which this animation component belongs. */ var Animation = new Class({ @@ -28,7 +35,7 @@ var Animation = new Class({ function Animation (parent) { /** - * The Game Object to which this animation controller belongs. + * The Game Object to which this animation component belongs. * * @name Phaser.GameObjects.Components.Animation#parent * @type {Phaser.GameObjects.GameObject} @@ -45,7 +52,7 @@ var Animation = new Class({ */ this.animationManager = parent.scene.sys.anims; - this.animationManager.once(Events.REMOVE_ANIMATION, this.remove, this); + this.animationManager.on(Events.REMOVE_ANIMATION, this.remove, this); /** * Is an animation currently playing or not? @@ -68,7 +75,9 @@ var Animation = new Class({ this.hasStarted = false; /** - * The current Animation loaded into this Animation Controller. + * The current Animation loaded into this Animation component. + * + * Will by `null` if no animation is yet loaded. * * @name Phaser.GameObjects.Components.Animation#currentAnim * @type {?Phaser.Animations.Animation} @@ -78,7 +87,9 @@ var Animation = new Class({ this.currentAnim = null; /** - * The current AnimationFrame being displayed by this Animation Controller. + * The current AnimationFrame being displayed by this Animation component. + * + * Will by `null` if no animation is yet loaded. * * @name Phaser.GameObjects.Components.Animation#currentFrame * @type {?Phaser.Animations.AnimationFrame} @@ -88,7 +99,10 @@ var Animation = new Class({ this.currentFrame = null; /** - * The key, instance of config of the next Animation to be loaded into this Animation Controller when the current animation completes. + * The key, instance, or config of the next Animation to be loaded into this Animation component + * when the current animation completes. + * + * Will by `null` if no animation has been queued. * * @name Phaser.GameObjects.Components.Animation#nextAnim * @type {?(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} @@ -98,7 +112,9 @@ var Animation = new Class({ this.nextAnim = null; /** - * A queue of keys of the next Animations to be loaded into this Animation Controller when the current animation completes. + * A queue of Animations to be loaded into this Animation component when the current animation completes. + * + * Populate this queue via the `chain` method. * * @name Phaser.GameObjects.Components.Animation#nextAnimsQueue * @type {array} @@ -107,19 +123,29 @@ var Animation = new Class({ this.nextAnimsQueue = []; /** - * Time scale factor. + * The Time Scale factor. * - * @name Phaser.GameObjects.Components.Animation#_timeScale + * You can adjust this value to modify the passage of time for the animation that is currently + * playing. For example, setting it to 2 will make the animation play twice as fast. Or setting + * it to 0.5 will slow the animation down. + * + * You can change this value at run-time, or set it via the `PlayAnimationConfig`. + * + * Prior to Phaser 3.50 this property was private and called `_timeScale`. + * + * @name Phaser.GameObjects.Components.Animation#timeScale * @type {number} - * @private * @default 1 - * @since 3.0.0 + * @since 3.50.0 */ - this._timeScale = 1; + this.timeScale = 1; /** - * The frame rate of playback in frames per second. - * The default is 24 if the `duration` property is `null`. + * The frame rate of playback, of the current animation, in frames per second. + * + * This value is set when a new animation is loaded into this component and should + * be treated as read-only, as changing it once playback has started will not alter + * the animation. To change the frame rate, provide a new value in the `PlayAnimationConfig` object. * * @name Phaser.GameObjects.Components.Animation#frameRate * @type {number} @@ -129,9 +155,11 @@ var Animation = new Class({ this.frameRate = 0; /** - * How long the animation should play for, in milliseconds. - * If the `frameRate` property has been set then it overrides this value, - * otherwise the `frameRate` is derived from `duration`. + * The duration of the current animation, in milliseconds. + * + * This value is set when a new animation is loaded into this component and should + * be treated as read-only, as changing it once playback has started will not alter + * the animation. To change the duration, provide a new value in the `PlayAnimationConfig` object. * * @name Phaser.GameObjects.Components.Animation#duration * @type {number} @@ -141,7 +169,11 @@ var Animation = new Class({ this.duration = 0; /** - * ms per frame, not including frame specific modifiers that may be present in the Animation data. + * The number of milliseconds per frame, not including frame specific modifiers that may be present in the + * Animation data. + * + * This value is calculated when a new animation is loaded into this component and should + * be treated as read-only. Changing it will not alter playback speed. * * @name Phaser.GameObjects.Components.Animation#msPerFrame * @type {number} @@ -161,51 +193,77 @@ var Animation = new Class({ this.skipMissedFrames = true; /** - * A delay before starting playback, in milliseconds. + * The delay before starting playback of the current animation, in milliseconds. * - * @name Phaser.GameObjects.Components.Animation#_delay + * This value is set when a new animation is loaded into this component and should + * be treated as read-only, as changing it once playback has started will not alter + * the animation. To change the delay, provide a new value in the `PlayAnimationConfig` object. + * + * Prior to Phaser 3.50 this property was private and called `_delay`. + * + * @name Phaser.GameObjects.Components.Animation#delay + * @type {number} + * @default 0 + * @since 3.50.0 + */ + this.delay = 0; + + /** + * The number of times to repeat playback of the current animation. + * + * If -1, it means the animation will repeat forever. + * + * This value is set when a new animation is loaded into this component and should + * be treated as read-only, as changing it once playback has started will not alter + * the animation. To change the number of repeats, provide a new value in the `PlayAnimationConfig` object. + * + * Prior to Phaser 3.50 this property was private and called `_repeat`. + * + * @name Phaser.GameObjects.Components.Animation#repeat + * @type {number} + * @default 0 + * @since 3.50.0 + */ + this.repeat = 0; + + /** + * The number of milliseconds to wait before starting the repeat playback of the current animation. + * + * This value is set when a new animation is loaded into this component, but can also be modified + * at run-time. + * + * You can change the repeat delay by providing a new value in the `PlayAnimationConfig` object. + * + * Prior to Phaser 3.50 this property was private and called `_repeatDelay`. + * + * @name Phaser.GameObjects.Components.Animation#repeatDelay * @type {number} - * @private * @default 0 * @since 3.0.0 */ - this._delay = 0; + this.repeatDelay = 0; /** - * Number of times to repeat the animation (-1 for infinity) + * Should the current animation yoyo? An animation that yoyos will play in reverse, from the end + * to the start, before then repeating or completing. An animation that does not yoyo will just + * play from the start to the end. * - * @name Phaser.GameObjects.Components.Animation#_repeat - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._repeat = 0; - - /** - * Delay before the repeat starts, in milliseconds. + * This value is set when a new animation is loaded into this component, but can also be modified + * at run-time. * - * @name Phaser.GameObjects.Components.Animation#_repeatDelay - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._repeatDelay = 0; - - /** - * Should the animation yoyo? (reverse back down to the start) before repeating? + * You can change the yoyo by providing a new value in the `PlayAnimationConfig` object. * - * @name Phaser.GameObjects.Components.Animation#_yoyo + * Prior to Phaser 3.50 this property was private and called `_yoyo`. + * + * @name Phaser.GameObjects.Components.Animation#yoyo * @type {boolean} - * @private * @default false - * @since 3.0.0 + * @since 3.50.0 */ - this._yoyo = false; + this.yoyo = false; /** - * Will the playhead move forwards (`true`) or in reverse (`false`). + * Is the playhead moving forwards (`true`) or in reverse (`false`) ? * * @name Phaser.GameObjects.Components.Animation#forward * @type {boolean} @@ -215,20 +273,24 @@ var Animation = new Class({ this.forward = true; /** - * An Internal trigger that's play the animation in reverse mode ('true') or not ('false'), - * needed because forward can be changed by yoyo feature. + * An internal trigger that tells the component if it should plays the animation + * in reverse mode ('true') or not ('false'). This is used because `forward` can + * be changed by the `yoyo` feature. * - * @name Phaser.GameObjects.Components.Animation#_reverse + * Prior to Phaser 3.50 this property was private and called `_reverse`. + * + * @name Phaser.GameObjects.Components.Animation#inReverse * @type {boolean} * @default false - * @private - * @since 3.12.0 + * @since 3.50.0 */ - this._reverse = false; + this.inReverse = false; /** * Internal time overflow accumulator. * + * This has the `delta` time added to it as part of the `update` step. + * * @name Phaser.GameObjects.Components.Animation#accumulator * @type {number} * @default 0 @@ -239,6 +301,8 @@ var Animation = new Class({ /** * The time point at which the next animation frame will change. * + * This value is compared against the `accumulator` as part of the `update` step. + * * @name Phaser.GameObjects.Components.Animation#nextTick * @type {number} * @default 0 @@ -247,9 +311,10 @@ var Animation = new Class({ this.nextTick = 0; /** - * An internal counter keeping track of how much delay time is left before playback begins. + * A counter keeping track of how much delay time, in milliseconds, is left before playback begins. * - * This is set via the `delayedPlay` method. + * This is set via the `delayedPlay` method, although it can be modified at run-time + * if required, as long as the animation has not already started playing. * * @name Phaser.GameObjects.Components.Animation#delayCounter * @type {number} @@ -259,7 +324,10 @@ var Animation = new Class({ this.delayCounter = 0; /** - * An internal counter keeping track of how many repeats are left to run. + * A counter that keeps track of how many repeats are left to run. + * + * This value is set when a new animation is loaded into this component, but can also be modified + * at run-time. * * @name Phaser.GameObjects.Components.Animation#repeatCounter * @type {number} @@ -328,6 +396,11 @@ var Animation = new Class({ /** * Should the GameObject's `visible` property be set to `true` when the animation starts to play? * + * This will happen _after_ any delay that may have been set. + * + * This value is set when a new animation is loaded into this component, but can also be modified + * at run-time, assuming the animation is currently delayed. + * * @name Phaser.GameObjects.Components.Animation#showOnStart * @type {boolean} * @since 3.50.0 @@ -335,7 +408,10 @@ var Animation = new Class({ this.showOnStart = false; /** - * Should the GameObject's `visible` property be set to `false` when the animation finishes? + * Should the GameObject's `visible` property be set to `false` when the animation completes? + * + * This value is set when a new animation is loaded into this component, but can also be modified + * at run-time, assuming the animation is still actively playing. * * @name Phaser.GameObjects.Components.Animation#hideOnComplete * @type {boolean} @@ -425,42 +501,52 @@ var Animation = new Class({ } var manager = this.animationManager; + var animKey = (typeof key === 'string') ? key : GetFastValue(key, 'key', null); - if (typeof key === 'string') + // Get the animation from the Animation Manager + var anim = manager.get(animKey); + + if (!anim) { - // Load the new animation data in - manager.load(this, key, startFrame); + console.warn('Missing animation: ' + animKey); } else { - var animKey = GetFastValue(key, 'key', null); - startFrame = GetFastValue(key, 'startFrame', startFrame); - if (animKey) + if (startFrame > anim.getTotalFrames()) { - // Load the new animation data in - manager.load(this, animKey, startFrame); - - var anim = this.currentAnim; - - // And now override the animation values, if set in the config. - - var totalFrames = anim.getTotalFrames(); - var frameRate = GetFastValue(key, 'frameRate', this.frameRate); - var duration = GetFastValue(key, 'duration', this.duration); - - anim.calculateDuration(this, totalFrames, duration, frameRate); - - this._delay = GetFastValue(key, 'delay', this._delay); - this._repeat = GetFastValue(key, 'repeat', this._repeat); - this._repeatDelay = GetFastValue(key, 'repeatDelay', this._repeatDelay); - this._yoyo = GetFastValue(key, 'yoyo', this._yoyo); - this._timeScale = GetFastValue(key, 'timeScale', this._timeScale); - - this.showOnStart = GetFastValue(key, 'showOnStart', this.showOnStart); - this.hideOnComplete = GetFastValue(key, 'hideOnComplete', this.hideOnComplete); + startFrame = 0; } + + this.currentAnim = anim; + + // And now override the animation values, if set in the config. + + var totalFrames = anim.getTotalFrames(); + var frameRate = GetFastValue(key, 'frameRate', anim.frameRate); + var duration = GetFastValue(key, 'duration', anim.duration); + + anim.calculateDuration(this, totalFrames, duration, frameRate); + + this.delay = GetFastValue(key, 'delay', anim.delay); + this.repeat = GetFastValue(key, 'repeat', anim.repeat); + this.repeatDelay = GetFastValue(key, 'repeatDelay', anim.repeatDelay); + this.yoyo = GetFastValue(key, 'yoyo', anim.yoyo); + this.showOnStart = GetFastValue(key, 'showOnStart', anim.showOnStart); + this.hideOnComplete = GetFastValue(key, 'hideOnComplete', anim.hideOnComplete); + this.skipMissedFrames = GetFastValue(key, 'skipMissedFrames', anim.skipMissedFrames); + + this.timeScale = GetFastValue(key, 'timeScale', this.timeScale); + + var frame = this.currentAnim.frames[startFrame]; + + if (startFrame === 0 && !this.forward) + { + frame = this.getLastFrame(); + } + + this.currentFrame = frame; } return this.parent; @@ -521,23 +607,6 @@ var Animation = new Class({ return this.parent; }, - /** - * `true` if the current animation is paused, otherwise `false`. - * - * @name Phaser.GameObjects.Components.Animation#isPaused - * @readonly - * @type {boolean} - * @since 3.4.0 - */ - isPaused: { - - get: function () - { - return this._paused; - } - - }, - /** * Plays an Animation on a Game Object that has the Animation component, such as a Sprite. * @@ -569,12 +638,12 @@ var Animation = new Class({ } this.forward = true; + this.inReverse = false; - this._reverse = false; this._paused = false; this._wasPlaying = true; - return this._startAnimation(key, startFrame); + return this.startAnimation(key, startFrame); }, /** @@ -606,12 +675,12 @@ var Animation = new Class({ } this.forward = false; + this.inReverse = true; - this._reverse = true; this._paused = false; this._wasPlaying = true; - return this._startAnimation(key, startFrame); + return this.startAnimation(key, startFrame); }, /** @@ -644,19 +713,18 @@ var Animation = new Class({ * Load the animation based on the key and set-up all of the internal values * needed for playback to start. If there is no delay, it will also fire the start events. * - * @method Phaser.GameObjects.Components.Animation#_startAnimation + * @method Phaser.GameObjects.Components.Animation#startAnimation * @fires Phaser.Animations.Events#ANIMATION_START * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START - * @private - * @since 3.12.0 + * @since 3.50.0 * * @param {(string|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or a `PlayAnimationConfig` object. * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. * * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. */ - _startAnimation: function (key, startFrame) + startAnimation: function (key, startFrame) { this.load(key, startFrame); @@ -669,7 +737,7 @@ var Animation = new Class({ } // Should give us 9,007,199,254,740,991 safe repeats - this.repeatCounter = (this._repeat === -1) ? Number.MAX_VALUE : this._repeat; + this.repeatCounter = (this.repeat === -1) ? Number.MAX_VALUE : this.repeat; anim.getFirstTick(this); @@ -677,46 +745,114 @@ var Animation = new Class({ this.pendingRepeat = false; this.hasStarted = false; + this._pendingStop = 0; + this._pendingStopValue = 0; + this._paused = false; + // Add any delay the animation itself may have had as well - this.delayCounter += this._delay; + this.delayCounter += this.delay; if (this.delayCounter === 0) { - this._fireStartEvents(); + this.handleStart(); } return gameObject; }, /** - * Fires all of the animation start events and toggles internal flags. + * Handles the start of an animation playback. * - * @method Phaser.GameObjects.Components.Animation#_fireStartEvents - * @fires Phaser.Animations.Events#ANIMATION_START - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START + * @method Phaser.GameObjects.Components.Animation#handleStart * @private * @since 3.50.0 */ - _fireStartEvents: function () + handleStart: function () { - var anim = this.currentAnim; - var gameObject = this.parent; - if (this.showOnStart) { - gameObject.setVisible(true); + this.parent.setVisible(true); } + this.updateFrame(this.currentFrame); + this.hasStarted = true; + this.emitEvents(Events.ANIMATION_START, Events.SPRITE_ANIMATION_KEY_START, Events.SPRITE_ANIMATION_START); + }, + + /** + * Handles the repeat of an animation. + * + * @method Phaser.GameObjects.Components.Animation#handleRepeat + * @private + * @since 3.50.0 + */ + handleRepeat: function () + { + this.pendingRepeat = false; + + this.emitEvents(Events.ANIMATION_REPEAT, Events.SPRITE_ANIMATION_KEY_REPEAT, Events.SPRITE_ANIMATION_REPEAT); + }, + + /** + * Handles the stop of an animation playback. + * + * @method Phaser.GameObjects.Components.Animation#handleStop + * @private + * @since 3.50.0 + */ + handleStop: function () + { + this._pendingStop = 0; + + this.isPlaying = false; + + this.emitEvents(Events.ANIMATION_STOP, Events.SPRITE_ANIMATION_KEY_STOP, Events.SPRITE_ANIMATION_STOP); + }, + + /** + * Handles the completion of an animation playback. + * + * @method Phaser.GameObjects.Components.Animation#handleComplete + * @private + * @since 3.50.0 + */ + handleComplete: function () + { + this._pendingStop = 0; + + this.isPlaying = false; + + if (this.hideOnComplete) + { + this.parent.setVisible(false); + } + + this.emitEvents(Events.ANIMATION_COMPLETE, Events.SPRITE_ANIMATION_KEY_COMPLETE, Events.SPRITE_ANIMATION_COMPLETE); + }, + + /** + * Fires the given animation events. + * + * @method Phaser.GameObjects.Components.Animation#emitEvents + * @private + * @since 3.50.0 + * + * @param {string} animEvent - The Animation Event to dispatch. + * @param {string} spriteKeyEvent - The Sprite Key Event to dispatch. + * @param {string} spriteEvent - The Sprite Event to dispatch. + */ + emitEvents: function (animEvent, spriteKeyEvent, spriteEvent) + { + var anim = this.currentAnim; var frame = this.currentFrame; + var gameObject = this.parent; - anim.emit(Events.ANIMATION_START, anim, frame, gameObject); + anim.emit(animEvent, anim, frame, gameObject); - gameObject.emit(Events.SPRITE_ANIMATION_KEY_START + anim.key, anim, frame, gameObject); - - gameObject.emit(Events.SPRITE_ANIMATION_START, anim, frame, gameObject); + gameObject.emit(spriteKeyEvent + anim.key, anim, frame, gameObject); + gameObject.emit(spriteEvent, anim, frame, gameObject); }, /** @@ -731,7 +867,7 @@ var Animation = new Class({ { if (this.isPlaying) { - this._reverse = !this._reverse; + this.inReverse = !this.inReverse; this.forward = !this.forward; } @@ -741,21 +877,29 @@ var Animation = new Class({ /** * Returns a value between 0 and 1 indicating how far this animation is through, ignoring repeats and yoyos. - * If the animation has a non-zero repeat defined, `getProgress` and `getTotalProgress` will be different - * because `getProgress` doesn't include any repeats or repeat delays, whereas `getTotalProgress` does. + * + * The value is based on the current frame and how far that is in the animation, it is not based on + * the duration of the animation. * * @method Phaser.GameObjects.Components.Animation#getProgress * @since 3.4.0 * - * @return {number} The progress of the current animation, between 0 and 1. + * @return {number} The progress of the current animation in frames, between 0 and 1. */ getProgress: function () { - var p = this.currentFrame.progress; + var frame = this.currentFrame; - if (!this.forward) + if (!frame) { - p = 1 - p; + return 0; + } + + var p = frame.progress; + + if (this.inReverse) + { + p *= -1; } return p; @@ -763,8 +907,12 @@ var Animation = new Class({ /** * Takes a value between 0 and 1 and uses it to set how far this animation is through playback. + * * Does not factor in repeats or yoyos, but does handle playing forwards or backwards. * + * The value is based on the current frame and how far that is in the animation, it is not based on + * the duration of the animation. + * * @method Phaser.GameObjects.Components.Animation#setProgress * @since 3.4.0 * @@ -784,6 +932,31 @@ var Animation = new Class({ return this.parent; }, + /** + * Sets the number of times that the animation should repeat after its first play through. + * For example, if repeat is 1, the animation will play a total of twice: the initial play plus 1 repeat. + * + * To repeat indefinitely, use -1. + * The value should always be an integer. + * + * Calling this method only works if the animation is already running. Otherwise, any + * value specified here will be overwritten when the next animation loads in. To avoid this, + * use the `repeat` property of the `PlayAnimationConfig` object instead. + * + * @method Phaser.GameObjects.Components.Animation#setRepeat + * @since 3.4.0 + * + * @param {integer} value - The number of times that the animation should repeat. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + setRepeat: function (value) + { + this.repeatCounter = (value === -1) ? Number.MAX_VALUE : value; + + return this.parent; + }, + /** * Handle the removal of an animation from the Animation Manager. * @@ -805,77 +978,6 @@ var Animation = new Class({ } }, - /** - * Gets the number of times that the animation will repeat - * after its first iteration. For example, if returns 1, the animation will - * play a total of twice (the initial play plus 1 repeat). - * A value of -1 means the animation will repeat indefinitely. - * - * @method Phaser.GameObjects.Components.Animation#getRepeat - * @since 3.4.0 - * - * @return {integer} The number of times that the animation will repeat. - */ - getRepeat: function () - { - return this._repeat; - }, - - /** - * Sets the number of times that the animation should repeat - * after its first iteration. For example, if repeat is 1, the animation will - * play a total of twice (the initial play plus 1 repeat). - * To repeat indefinitely, use -1. repeat should always be an integer. - * - * @method Phaser.GameObjects.Components.Animation#setRepeat - * @since 3.4.0 - * - * @param {integer} value - The number of times that the animation should repeat. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - setRepeat: function (value) - { - this._repeat = value; - - this.repeatCounter = (value === -1) ? Number.MAX_VALUE : value; - - return this.parent; - }, - - /** - * Gets the amount of delay between repeats, if any. - * - * @method Phaser.GameObjects.Components.Animation#getRepeatDelay - * @since 3.4.0 - * - * @return {number} The delay between repeats. - */ - getRepeatDelay: function () - { - return this._repeatDelay; - }, - - /** - * Sets the amount of time in seconds between repeats. - * For example, if `repeat` is 2 and `repeatDelay` is 10, the animation will play initially, - * then wait for 10 seconds before repeating, then play again, then wait another 10 seconds - * before doing its final repeat. - * - * @method Phaser.GameObjects.Components.Animation#setRepeatDelay - * @since 3.4.0 - * - * @param {number} value - The delay to wait between repeats, in seconds. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - setRepeatDelay: function (value) - { - this._repeatDelay = value; - - return this.parent; - }, - /** * Restarts the current animation from its beginning. * @@ -883,6 +985,9 @@ var Animation = new Class({ * * Calling this will fire the `ANIMATION_RESTART` series of events immediately. * + * If you `includeDelay` then it will also fire the `ANIMATION_START` series of events once + * the delay has expired, otherwise, playback will just begin immediately. + * * @method Phaser.GameObjects.Components.Animation#restart * @fires Phaser.Animations.Events#ANIMATION_RESTART * @fires Phaser.Animations.Events#SPRITE_ANIMATION_RESTART @@ -900,71 +1005,64 @@ var Animation = new Class({ if (resetRepeats === undefined) { resetRepeats = false; } var anim = this.currentAnim; + var gameObject = this.parent; - anim.getFirstTick(this, includeDelay); + if (!anim) + { + return gameObject; + } if (resetRepeats) { - this.repeatCounter = (this._repeat === -1) ? Number.MAX_VALUE : this._repeat; + this.repeatCounter = (this.repeat === -1) ? Number.MAX_VALUE : this.repeat; } - this.forward = true; + anim.getFirstTick(this); + + this.emitEvents(Events.ANIMATION_RESTART, Events.SPRITE_ANIMATION_KEY_RESTART, Events.SPRITE_ANIMATION_RESTART); + this.isPlaying = true; this.pendingRepeat = false; + + // Set this to `true` if there is no delay to include, so it skips the `hasStarted` check in `update`. + this.hasStarted = !includeDelay; + + this._pendingStop = 0; + this._pendingStopValue = 0; this._paused = false; // Set frame this.updateFrame(anim.frames[0]); - var gameObject = this.parent; - var frame = this.currentFrame; - - anim.emit(Events.ANIMATION_RESTART, anim, frame, gameObject); - - gameObject.emit(Events.SPRITE_ANIMATION_KEY_RESTART + anim.key, anim, frame, gameObject); - - gameObject.emit(Events.SPRITE_ANIMATION_RESTART, anim, frame, gameObject); - return this.parent; }, /** - * Immediately stops the current animation from playing and dispatches the `animationcomplete` event. + * The current animation has completed. This dispatches the `ANIMATION_COMPLETE` series of events. * - * If no animation is set, no event will be dispatched. + * This method is called by the Animation instance and should not usually be invoked directly. * - * If there is another animation queued (via the `chain` method) then it will start playing immediately. + * If no animation is loaded, no events will be dispatched. * - * @method Phaser.GameObjects.Components.Animation#stop + * If another animation has been queued for playback, it will be started after the events fire. + * + * @method Phaser.GameObjects.Components.Animation#complete * @fires Phaser.Animations.Events#ANIMATION_COMPLETE * @fires Phaser.Animations.Events#SPRITE_ANIMATION_COMPLETE * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_COMPLETE - * @since 3.0.0 + * @since 3.50.0 * * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. */ - stop: function () + complete: function () { this._pendingStop = 0; this.isPlaying = false; - var gameObject = this.parent; - var anim = this.currentAnim; - var frame = this.currentFrame; - - if (anim) + if (this.currentAnim) { - if (this.hideOnComplete) - { - gameObject.setVisible(false); - } - - anim.emit(Events.ANIMATION_COMPLETE, anim, frame, gameObject); - - gameObject.emit(Events.SPRITE_ANIMATION_KEY_COMPLETE + anim.key, anim, frame, gameObject); - - gameObject.emit(Events.SPRITE_ANIMATION_COMPLETE, anim, frame, gameObject); + this.handleComplete(); } if (this.nextAnim) @@ -976,16 +1074,61 @@ var Animation = new Class({ this.play(key); } - return gameObject; + return this.parent; + }, + + /** + * Immediately stops the current animation from playing and dispatches the `ANIMATION_STOP` series of events. + * + * If no animation is running, no events will be dispatched. + * + * If there is another animation in the queue (set via the `chain` method) then it will start playing. + * + * @method Phaser.GameObjects.Components.Animation#stop + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_STOP + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_STOP + * @since 3.0.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stop: function () + { + this._pendingStop = 0; + + this.isPlaying = false; + + if (this.currentAnim) + { + this.handleStop(); + } + + if (this.nextAnim) + { + var key = this.nextAnim; + + this.nextAnim = (this.nextAnimsQueue.length > 0) ? this.nextAnimsQueue.shift() : null; + + this.play(key); + } + + return this.parent; }, /** * Stops the current animation from playing after the specified time delay, given in milliseconds. * + * It then dispatches the `ANIMATION_STOP` series of events. + * + * If no animation is running, no events will be dispatched. + * + * If there is another animation in the queue (set via the `chain` method) then it will start playing, + * when the current one stops. + * * @method Phaser.GameObjects.Components.Animation#stopAfterDelay - * @fires Phaser.Animations.Events#ANIMATION_COMPLETE - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_COMPLETE - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_COMPLETE + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_STOP + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_STOP * @since 3.4.0 * * @param {integer} delay - The number of milliseconds to wait before stopping this animation. @@ -1003,10 +1146,17 @@ var Animation = new Class({ /** * Stops the current animation from playing when it next repeats. * + * It then dispatches the `ANIMATION_STOP` series of events. + * + * If no animation is running, no events will be dispatched. + * + * If there is another animation in the queue (set via the `chain` method) then it will start playing, + * when the current one stops. + * * @method Phaser.GameObjects.Components.Animation#stopOnRepeat - * @fires Phaser.Animations.Events#ANIMATION_COMPLETE - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_COMPLETE - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_COMPLETE + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_STOP + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_STOP * @since 3.4.0 * * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. @@ -1022,10 +1172,17 @@ var Animation = new Class({ * Stops the current animation from playing when it next sets the given frame. * If this frame doesn't exist within the animation it will not stop it from playing. * + * It then dispatches the `ANIMATION_STOP` series of events. + * + * If no animation is running, no events will be dispatched. + * + * If there is another animation in the queue (set via the `chain` method) then it will start playing, + * when the current one stops. + * * @method Phaser.GameObjects.Components.Animation#stopOnFrame - * @fires Phaser.Animations.Events#ANIMATION_COMPLETE - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_COMPLETE - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_COMPLETE + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_STOP + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_STOP * @since 3.4.0 * * @param {Phaser.Animations.AnimationFrame} frame - The frame to check before stopping this animation. @@ -1041,56 +1198,24 @@ var Animation = new Class({ }, /** - * Sets the Time Scale factor, allowing you to make the animation go faster or slower than default. - * Where 1 = normal speed (the default), 0.5 = half speed, 2 = double speed, etc. - * - * Setting the time scale impacts all animations played on this Sprite from this point on. - * - * @method Phaser.GameObjects.Components.Animation#setTimeScale - * @since 3.4.0 - * - * @param {number} [value=1] - The time scale factor, where 1 is no change, 0.5 is half speed, etc. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - setTimeScale: function (value) - { - if (value === undefined) { value = 1; } - - this._timeScale = value; - - return this.parent; - }, - - /** - * Gets the Time Scale factor. - * - * @method Phaser.GameObjects.Components.Animation#getTimeScale - * @since 3.4.0 - * - * @return {number} The Time Scale value. - */ - getTimeScale: function () - { - return this._timeScale; - }, - - /** - * Returns the total number of frames in this animation. + * Returns the total number of frames in this animation, or returns zero if no + * animation has been loaded. * * @method Phaser.GameObjects.Components.Animation#getTotalFrames * @since 3.4.0 * - * @return {integer} The total number of frames in this animation. + * @return {integer} The total number of frames in the current animation, or zero if no animation has been loaded. */ getTotalFrames: function () { - return this.currentAnim.frames.length; + return (this.currentAnim) ? this.currentAnim.getTotalFrames() : 0; }, /** * The internal update loop for the Animation Component. * + * This is called automatically by the `Sprite.preUpdate` method. + * * @method Phaser.GameObjects.Components.Animation#update * @since 3.0.0 * @@ -1099,12 +1224,14 @@ var Animation = new Class({ */ update: function (time, delta) { - if (!this.currentAnim || !this.isPlaying || this.currentAnim.paused) + var anim = this.currentAnim; + + if (!this.isPlaying || !anim || anim.paused) { return; } - this.accumulator += delta * this._timeScale; + this.accumulator += delta * this.timeScale; if (this._pendingStop === 1) { @@ -1112,7 +1239,7 @@ var Animation = new Class({ if (this._pendingStopValue <= 0) { - return this.currentAnim.completeAnimation(this); + return this.stop(); } } @@ -1122,18 +1249,25 @@ var Animation = new Class({ { this.accumulator -= this.delayCounter; - this._fireStartEvents(); + this.handleStart(); } } else if (this.accumulator >= this.nextTick) { - this.currentAnim.setFrame(this); + if (this.forward) + { + anim.nextFrame(this); + } + else + { + anim.previousFrame(this); + } } }, /** * Sets the given Animation Frame as being the current frame - * and applies it to the parent Game Object, adjusting its size and origin as needed. + * and applies it to the parent Game Object, adjusting size and origin as needed. * * @method Phaser.GameObjects.Components.Animation#setCurrentFrame * @since 3.4.0 @@ -1177,8 +1311,12 @@ var Animation = new Class({ * Internal frame change handler. * * @method Phaser.GameObjects.Components.Animation#updateFrame + * @fires Phaser.Animations.Events#ANIMATION_UPDATE * @fires Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_STOP + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_STOP * @private * @since 3.0.0 * @@ -1195,15 +1333,11 @@ var Animation = new Class({ gameObject.alpha = animationFrame.alpha; } - var anim = this.currentAnim; - - gameObject.emit(Events.SPRITE_ANIMATION_KEY_UPDATE + anim.key, anim, animationFrame, gameObject); - - gameObject.emit(Events.SPRITE_ANIMATION_UPDATE, anim, animationFrame, gameObject); + this.emitEvents(Events.ANIMATION_UPDATE, Events.SPRITE_ANIMATION_KEY_UPDATE, Events.SPRITE_ANIMATION_UPDATE); if (this._pendingStop === 3 && this._pendingStopValue === animationFrame) { - this.currentAnim.completeAnimation(this); + this.stop(); } } }, @@ -1252,40 +1386,6 @@ var Animation = new Class({ return this.parent; }, - /** - * Sets if the current Animation will yoyo when it reaches the end. - * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again. - * - * @method Phaser.GameObjects.Components.Animation#setYoyo - * @since 3.4.0 - * - * @param {boolean} [value=false] - `true` if the animation should yoyo, `false` to not. - * - * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. - */ - setYoyo: function (value) - { - if (value === undefined) { value = false; } - - this._yoyo = value; - - return this.parent; - }, - - /** - * Gets if the current Animation will yoyo when it reaches the end. - * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again. - * - * @method Phaser.GameObjects.Components.Animation#getYoyo - * @since 3.4.0 - * - * @return {boolean} `true` if the animation is set to yoyo, `false` if not. - */ - getYoyo: function () - { - return this._yoyo; - }, - /** * Destroy this Animation component. * @@ -1300,10 +1400,28 @@ var Animation = new Class({ this.animationManager = null; this.parent = null; + this.nextAnim = null; this.nextAnimsQueue.length = 0; this.currentAnim = null; this.currentFrame = null; + }, + + /** + * `true` if the current animation is paused, otherwise `false`. + * + * @name Phaser.GameObjects.Components.Animation#isPaused + * @readonly + * @type {boolean} + * @since 3.4.0 + */ + isPaused: { + + get: function () + { + return this._paused; + } + } }); From 5db6cba4ce42a4f503f4326a738471a0a9928476 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 3 Sep 2020 17:56:25 +0100 Subject: [PATCH 188/241] Update CHANGELOG.md --- CHANGELOG.md | 49 ++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 44 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d5d230bd..2d982f0fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -212,15 +212,12 @@ The way in which Game Objects add themselves to the Scene Update List has change * The Spine Plugin `destroy` method will now no longer remove the Game Objects from the Game Object Factory, or dispose of the Scene Renderer. This means when a Scene is destroyed, it will keep the Game Objects in the factory for other Scene's to use. Fix #5279 (thanks @Racoonacoon) * `SpinePlugin.gameDestroy` is a new method that is called if the Game instance emits a `destroy` event. It removes the Spine Game Objects from the factory and disposes of the Spine scene renderer. - - - - ### Animation API New Features and Updates The Animation API has had a significant overhaul to improve playback handling. Instead of just playing an animation based on its global key, you can now supply a new `PlayAnimationConfig` object instead, which allows you to override any of the default animation settings, such as `duration`, `delay` and `yoyo` (see below for the full list). This means you no longer have to create lots of duplicate animations, just to change properties such as `duration`, and can now set them dynamically at run-time as well. * The `play`, `playReverse`, `delayedPlay` and `chain` Animation Component methods can now all take a `Phaser.Types.Animations.PlayAnimationConfig` configuration object instead of a string as the `key` parameter. This allows you to override any default animation setting with those defined in the config, giving you far greater control over animations on a Game Object level, without needing to globally duplicate them. +* The `Component.Animation` now handles all of the loading of the animation. It no longer has to make calls out to the Animation Manager or Animation itself and will load the animation data directly, replacing as required from the optional `PlayAnimationConfig`. This improves performance and reduces CPU calls in animation heavy games. * The `PlayAnimationConfig.frameRate` property lets you optionally override the animation frame rate. * The `PlayAnimationConfig.duration` property lets you optionally override the animation duration. * The `PlayAnimationConfig.delay` property lets you optionally override the animation delay. @@ -238,10 +235,49 @@ The Animation API has had a significant overhaul to improve playback handling. I * The `Components.Animation.chain` method docs said it would remove all pending animations if called with no parameters. However, it didn't - and now does! * The `Components.Animation.setDelay` method has been removed. It never actually worked and you can now perform the same thing by calling either `delayedPlay` or setting the `delay` property in the play config. * The `Components.Animation.getDelay` method has been removed. It never actually worked and you can now perform the same thing by calling either `delayedPlay` or setting the `delay` property in the play config. -* `Components.Animation._fireStartEvents` is a new internal private method that handles dispatching the animation start events, to cut down on duplicate code. +* The `Components.Animation.setRepeat` method has been removed. You can achieve the same thing by setting the `repeat` property in the play config, or adjusting the public `repeatCounter` property if the animation has started. +* `Components.Animation.handleStart` is a new internal private method that handles the animation start process. +* `Components.Animation.handleRepeat` is a new internal private method that handles the animation repeat process. +* `Components.Animation.handleStop` is a new internal private method that handles the animation stop process. +* `Components.Animation.handleComplete` is a new internal private method that handles the animation complete process. +* `Components.Animation.emitEvents` is a new internal private method that emits animation events, cutting down on duplicate code. * The `Components.Animation.restart` method has a new optional boolean parameter `resetRepeats` which controls if you want to reset the repeat counter during the restart, or not. * `Animation.getTotalFrames` is a new method that will return the total number of frames in the animation. You can access it via `this.anims.currentAnim.getTotalFrames` from a Sprite. * `Animation.calculateDuration` is a new method that calculates the duration, frameRate and msPerFrame for a given animation target. +* `ANIMATION_UPDATE_EVENT` is a new event that is emitted from an Animation when it is updated, i.e. its frame changes. +* `ANIMATION_STOP_EVENT` is a new event that is emitted from an Animation when it is stopped before it reaches completion. +* `SPRITE_ANIMATION_STOP_EVENT` is a new event that is emitted from a Sprite when its current animation is stopped before it reaches completion. +* `SPRITE_ANIMATION_KEY_STOP_EVENT` is a new event that is emitted from a Sprite when its current animation is stopped before it reaches completion. This is a dynamic event name and carries the animation key in its title. +* The `BuildGameObjectAnimation` function now uses the `PlayAnimationConfig` object to set the values. +* `Sprite.playReverse` is a new method that allows you to play the given animation in reverse on the Sprite. +* `Sprite.delayedPlay` is a new method that allows you to play the given animation on the Sprite after a delay. +* `Sprite.stop` is a new method that allows you to stop the current animation on the Sprite. +* `AnimationManager.load` has been removed as it's no longer required. +* `AnimationManager.staggerPlay` has been fixed so you can now pass in negative stagger values. +* `AnimationManager.staggerPlay` has a new optional boolean parameter `staggerFirst`, which allows you to either include or exclude the first child in the stagger calculations. +* The `Animation.completeAnimation` method has been removed as it's no longer required internally. +* The `Animation.load` method has been removed as it's no longer required internally. +* The `Animation.setFrame` method has been removed as it's no longer required internally. +* The `Animation.getFirstTick` method has no longer needs the `includeDelay` parameter, as it's handled by the component now. +* The `Animation.getFrames` method has a new optional boolean parameter `sortFrames` which will run a numeric sort on the frame names after constructing them, if a string-based frame is given. +* `Types.Animations.Animation` has a new boolean property `sortFrames`, which lets Phaser numerically sort the generated frames. +* `Component.Animation.timeScale` is a new public property that replaces the old private `_timeScale` property. +* `Component.Animation.delay` is a new public property that replaces the old private `_delay` property. +* `Component.Animation.repeat` is a new public property that replaces the old private `_repeat` property. +* `Component.Animation.repeatDelay` is a new public property that replaces the old private `_repeatDelay` property. +* `Component.Animation.yoyo` is a new public property that replaces the old private `_yoyo` property. +* `Component.Animation.inReverse` is a new public property that replaces the old private `_reverse` property. +* `Component.Animation.startAnimation` is a new public method that replaces the old private `_startAnimation` method. +* The `Component.Animation.getProgress` method has been fixed so it will return correctly if the animation is playing in reverse. +* The `Component.Animation.remove` method will now always be called when an animation is removed, not just once. +* The `Component.Animation.getRepeat` method has now been removed. You can get the value from the `repeat` property. +* The `Component.Animation.setRepeatDelay` method has now been removed. You can set the value using the `repeatDelay` config property, or changing it at run-time. +* `Component.Animation.complete` is a new method that handles the completion in animation playback. +* The `Component.Animation.setTimeScale` method has now been removed. You can set the value using the `timeScale` config property, or changing it at run-time. +* The `Component.Animation.getTimeScale` method has now been removed. You can read the value using the `timeScale` property. +* The `Component.Animation.getTotalFrames` method has been fixed and won't error if called when no animation is loaded. +* The `Component.Animation.setYoyo` method has now been removed. You can set the value using the `yoyo` config property, or changing it at run-time. +* The `Component.Animation.getYoyo` method has now been removed. You can read the value using the `yoyo` property. ### New Features @@ -269,6 +305,8 @@ The Animation API has had a significant overhaul to improve playback handling. I * `ArcadePhysics.disableUpdate` is a new method that will prevent the Arcade Physics World `update` method from being called when the Scene updates. By disabling it, you're free to call the update method yourself, passing in your own delta and time values. * `ArcadePhysics.enableUpdate` is a new method that will make the Arcade Physics World update in time with the Scene update. This is the default, so only call this if you have specifically disabled it previously. * `ArcadeWorldConfig.customUpdate` is a new boolean property you can set in the Arcade Physics config object, either in the Scene or in the Game Config. If `true` the World update will never be called, allowing you to call it yourself from your own component. Close #5190 (thanks @cfortuner) +* `Utils.Array.SortByDigits` is a new function that takes the given array of strings and runs a numeric sort on it, ignoring any non-digits. +* `GroupCreateConfig`, which is used when calling `Group.createMultiple` or `Group.createFromConfig`, can now accept the following new properties: `setOrigin: { x, y, stepX, stepY }` which are applied to the items created by the Group. ### Updates and API Changes @@ -308,6 +346,7 @@ The Animation API has had a significant overhaul to improve playback handling. I * The `Arcade.Body.resetFlags` method has a new optional boolean parameter `clear`. If set, it clears the `wasTouching` flags on the Body. This happens automatically when `Body.reset` is called. Previous to this, the flags were not reset until the next physics step (thanks @samme) * `Utils.Array.StableSort` has been recoded. It's now based on Two-Screens stable sort 0.1.8 and has been updated to fit into Phaser better and no longer create any window bound objects. The `inplace` function has been removed, just call `StableSort(array)` directly now. All classes that used `StableSort.inplace` have been updated to call it directly. * If a Scene is paused, or sent to sleep, it will automatically call `Keyboard.resetKeys`. This means that if you hold a key down, then sleep or pause a Scene, then release the key and resume or wake the Scene, it will no longer think it is still being held down (thanks @samme) +* `Actions.setOrigin` will now call `updateDisplayOrigin` on the items array, otherwise the effects can't be seen when rendering. ### Namespace Updates From 1a4b5b2779cb58e9396fb8e9eec6c0d9792bfa51 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 4 Sep 2020 00:02:51 +0100 Subject: [PATCH 189/241] `AnimationManager.createFromAseprite` is a new method that allows you to use animations created in the Aseprite editor directly in Phaser. --- src/animations/AnimationManager.js | 173 +++++++++++++++++++++++++++++ 1 file changed, 173 insertions(+) diff --git a/src/animations/AnimationManager.js b/src/animations/AnimationManager.js index 574d1b502..395b73fcb 100644 --- a/src/animations/AnimationManager.js +++ b/src/animations/AnimationManager.js @@ -10,6 +10,7 @@ var CustomMap = require('../structs/Map'); var EventEmitter = require('eventemitter3'); var Events = require('./events'); var GameEvents = require('../core/events'); +var GetFastValue = require('../utils/object/GetFastValue'); var GetValue = require('../utils/object/GetValue'); var Pad = require('../utils/string/Pad'); @@ -168,6 +169,178 @@ var AnimationManager = new Class({ return this.anims.has(key); }, + /** + * Create one, or more animations from a loaded Aseprite JSON file. + * + * Aseprite is a powerful animated sprite editor and pixel art tool. + * + * You can find more details at https://www.aseprite.org/ + * + * To export a compatible JSON file in Aseprite, please do the following: + * + * 1. Go to "File - Export Sprite Sheet" + * + * 2. On the **Layout** tab: + * 2a. Set the "Sheet type" to "Packed" + * 2b. Set the "Constraints" to "None" + * 2c. Check the "Merge Duplicates" checkbox + * + * 3. On the **Sprite** tab: + * 3a. Set "Layers" to "Visible layers" + * 3b. Set "Frames" to "All frames", unless you only wish to export a sub-set of tags + * + * 4. On the **Borders** tab: + * 4a. Check the "Trim Sprite" and "Trim Cells" options + * 4b. Ensure "Border Padding", "Spacing" and "Inner Padding" are all > 0 (1 is usually enough) + * + * 5. On the **Output** tab: + * 5a. Check "Output File", give your image a name and make sure you choose "png files" as the file type + * 5b. Check "JSON Data" and give your json file a name + * 5c. The JSON Data type can be either a Hash or Array, Phaser doesn't mind. + * 5d. Make sure "Tags" is checked in the Meta options + * 5e. In the "Item Filename" input box, make sure it says just "{frame}" and nothing more. + * + * 6. Click export + * + * This was tested with Aseprite 1.2.25. + * + * This will export a png and json file which you can load using the Atlas Loader, i.e.: + * + * ```javascript + * function preload () + * { + * this.load.path = 'assets/animations/aseprite/'; + * this.load.atlas('paladin', 'paladin.png', 'paladin.json'); + * } + * ``` + * + * Once exported, you can call this method from within a Scene with the 'atlas' key: + * + * ```javascript + * this.anims.createFromAseprite('paladin'); + * ``` + * + * Any animations defined in the JSON will now be available to use in Phaser and you play them + * via their Tag name. For example, if you have an animation called 'War Cry' on your Aseprite timeline, + * you can play it in Phaser using that Tag name: + * + * ```javascript + * this.add.sprite(400, 300).play('War Cry'); + * ``` + * + * When calling this method you can optionally provide an array of tag names, and only those animations + * will be created. For example: + * + * ```javascript + * this.anims.createFromAseprite('paladin', [ 'step', 'War Cry', 'Magnum Break' ]); + * ``` + * + * This will only create the 3 animations defined. Note that the tag names are case-sensitive. + * + * @method Phaser.Animations.AnimationManager#createFromAseprite + * @since 3.50.0 + * + * @param {string} key - The key of the loaded Aseprite atlas. It must have been loaded prior to calling this method. + * @param {string[]} [tags] - An array of Tag names. If provided, only animations found in this array will be created. + * + * @return {Phaser.Animations.Animation[]} An array of Animation instances that were successfully created. + */ + createFromAseprite: function (key, tags) + { + var output = []; + + var data = this.game.cache.json.get(key); + + if (!data) + { + return output; + } + + var _this = this; + + var meta = GetValue(data, 'meta', null); + var frames = GetValue(data, 'frames', null); + + if (meta && frames) + { + var frameTags = GetValue(meta, 'frameTags', []); + + frameTags.forEach(function (tag) + { + var animFrames = []; + + var name = GetFastValue(tag, 'name', null); + var from = GetFastValue(tag, 'from', 0); + var to = GetFastValue(tag, 'to', 0); + var direction = GetFastValue(tag, 'direction', 'forward'); + + if (!name) + { + // Skip if no name + return; + } + + if (!tags || (tags && tags.indexOf(name) > -1)) + { + // Get all the frames for this tag + var tempFrames = []; + var minDuration = Number.MAX_SAFE_INTEGER; + + for (var i = from; i <= to; i++) + { + var frameKey = i.toString(); + var frame = frames[frameKey]; + + if (frame) + { + var frameDuration = GetFastValue(frame, 'duration', Number.MAX_SAFE_INTEGER); + + if (frameDuration < minDuration) + { + minDuration = frameDuration; + } + + tempFrames.push({ frame: frameKey, duration: frameDuration }); + } + } + + tempFrames.forEach(function (entry) + { + animFrames.push({ + key: key, + frame: entry.frame, + duration: (minDuration - entry.duration) + }); + }); + + var totalDuration = (minDuration * animFrames.length); + + if (direction === 'reverse') + { + animFrames = animFrames.reverse(); + } + + // Create the animation + var createConfig = { + key: name, + frames: animFrames, + duration: totalDuration, + yoyo: (direction === 'pingpong') + }; + + var result = _this.create(createConfig); + + if (result) + { + output.push(result); + } + } + }); + } + + return output; + }, + /** * Creates a new Animation and adds it to the Animation Manager. * From acac51bf39c41d17eafb895a9004aeabfb2486da Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 4 Sep 2020 00:02:54 +0100 Subject: [PATCH 190/241] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d982f0fd..7c6089d9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -216,6 +216,7 @@ The way in which Game Objects add themselves to the Scene Update List has change The Animation API has had a significant overhaul to improve playback handling. Instead of just playing an animation based on its global key, you can now supply a new `PlayAnimationConfig` object instead, which allows you to override any of the default animation settings, such as `duration`, `delay` and `yoyo` (see below for the full list). This means you no longer have to create lots of duplicate animations, just to change properties such as `duration`, and can now set them dynamically at run-time as well. +* `AnimationManager.createFromAseprite` is a new method that allows you to use animations created in the Aseprite editor directly in Phaser. Please see the comprehensive documentation for this method for full details on how to do this. * The `play`, `playReverse`, `delayedPlay` and `chain` Animation Component methods can now all take a `Phaser.Types.Animations.PlayAnimationConfig` configuration object instead of a string as the `key` parameter. This allows you to override any default animation setting with those defined in the config, giving you far greater control over animations on a Game Object level, without needing to globally duplicate them. * The `Component.Animation` now handles all of the loading of the animation. It no longer has to make calls out to the Animation Manager or Animation itself and will load the animation data directly, replacing as required from the optional `PlayAnimationConfig`. This improves performance and reduces CPU calls in animation heavy games. * The `PlayAnimationConfig.frameRate` property lets you optionally override the animation frame rate. From 1d798441f3b5c9d2d941959ab91696940b15b45b Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 4 Sep 2020 11:40:32 +0100 Subject: [PATCH 191/241] Support repeat count for stopping --- src/animations/Animation.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/animations/Animation.js b/src/animations/Animation.js index 1a70a2560..ae86e4094 100644 --- a/src/animations/Animation.js +++ b/src/animations/Animation.js @@ -726,7 +726,14 @@ var Animation = new Class({ { if (component._pendingStop === 2) { - return component.stop(); + if (component._pendingStopValue === 0) + { + return component.stop(); + } + else + { + component._pendingStopValue--; + } } if (component.repeatDelay > 0 && !component.pendingRepeat) From afef6da59cd632b6d793561cb8d4cbeda3a342fd Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 4 Sep 2020 11:48:17 +0100 Subject: [PATCH 192/241] Exposed all of the new animation methods on a Sprite level --- src/gameobjects/sprite/Sprite.js | 156 ++++++++++++++++++++++++++++--- 1 file changed, 142 insertions(+), 14 deletions(-) diff --git a/src/gameobjects/sprite/Sprite.js b/src/gameobjects/sprite/Sprite.js index 7d0d16577..7f516cd91 100644 --- a/src/gameobjects/sprite/Sprite.js +++ b/src/gameobjects/sprite/Sprite.js @@ -176,13 +176,12 @@ var Sprite = new Class({ * * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. - * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. * * @return {this} This Game Object. */ - play: function (key, ignoreIfPlaying, startFrame) + play: function (key, ignoreIfPlaying) { - return this.anims.play(key, ignoreIfPlaying, startFrame); + return this.anims.play(key, ignoreIfPlaying); }, /** @@ -228,37 +227,90 @@ var Sprite = new Class({ * * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. - * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. * * @return {this} This Game Object. */ - playReverse: function (key, ignoreIfPlaying, startFrame) + playReverse: function (key, ignoreIfPlaying) { - return this.anims.playReverse(key, ignoreIfPlaying, startFrame); + return this.anims.playReverse(key, ignoreIfPlaying); }, /** - * Waits for the specified delay, in milliseconds, then starts playback of the requested animation. + * Waits for the specified delay, in milliseconds, then starts playback of the given animation. * - * If the animation _also_ has a delay value set in its config, this value will override that and be used instead. + * If the animation _also_ has a delay value set in its config, it will be **added** to the delay given here. * - * The delay only takes effect if the animation has not already started playing. + * If an animation is already running and a new animation is given to this method, it will wait for + * the given delay before starting the new animation. * - * @method Phaser.GameObjects.Sprite#delayedPlay + * If no animation is currently running, the given one begins after the delay. + * + * Prior to Phaser 3.50 this method was called 'delayedPlay'. + * + * @method Phaser.GameObjects.Components.Animation#playAfterDelay * @fires Phaser.Animations.Events#ANIMATION_START * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START * @since 3.50.0 * - * @param {integer} delay - The delay, in milliseconds, to wait before starting the animation playing. * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. - * @param {integer} [startFrame=0] - The frame of the animation to start from. + * @param {integer} delay - The delay, in milliseconds, to wait before starting the animation playing. * * @return {this} This Game Object. */ - delayedPlay: function (delay, key, startFrame) + playAfterDelay: function (key, delay) { - return this.anims.delayedPlay(delay, key, startFrame); + return this.anims.playAfterDelay(key, delay); + }, + + /** + * Waits for the current animation to complete one 'repeat' cycle, then starts playback of the given animation. + * + * You can use this to ensure there are no harsh 'jumps' between two sets of animations, i.e. going from an + * idle animation to a walking animation. + * + * If no animation is currently running, the given one will start immediately. + * + * @method Phaser.GameObjects.Components.Animation#playAfterRepeat + * @fires Phaser.Animations.Events#ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START + * @since 3.50.0 + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {integer} [repeatCount=1] - How many times should the animation repeat before the next one starts? + * + * @return {this} This Game Object. + */ + playAfterRepeat: function (key, repeatCount) + { + return this.anims.playAfterRepeat(key, repeatCount); + }, + + /** + * Sets an animation, or an array of animations, to be played immediately after the current one completes or stops. + * + * The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc, + * or have the `stop` method called directly on it. + * + * An animation set to repeat forever will never enter a completed state. + * + * You can chain a new animation at any point, including before the current one starts playing, during it, or when it ends (via its `animationcomplete` event). + * + * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained animations without impacting the global animation they're playing. + * + * Call this method with no arguments to reset all currently chained animations. + * + * @method Phaser.GameObjects.Sprite#chain + * @since 3.50.0 + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig|string[]|Phaser.Animations.Animation[]|Phaser.Types.Animations.PlayAnimationConfig[])} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object, or an array of them. + * + * @return {this} This Game Object. + */ + chain: function (key) + { + return this.anims.chain(key); }, /** @@ -281,6 +333,82 @@ var Sprite = new Class({ return this.anims.stop(); }, + /** + * Stops the current animation from playing after the specified time delay, given in milliseconds. + * + * It then dispatches the `ANIMATION_STOP` series of events. + * + * If no animation is running, no events will be dispatched. + * + * If there is another animation in the queue (set via the `chain` method) then it will start playing, + * when the current one stops. + * + * @method Phaser.GameObjects.Sprite#stopAfterDelay + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_STOP + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_STOP + * @since 3.50.0 + * + * @param {integer} delay - The number of milliseconds to wait before stopping this animation. + * + * @return {this} This Game Object. + */ + stopAfterDelay: function (delay) + { + return this.anims.stopAfterDelay(delay); + }, + + /** + * Stops the current animation from playing when it next repeats. + * + * It then dispatches the `ANIMATION_STOP` series of events. + * + * If no animation is running, no events will be dispatched. + * + * If there is another animation in the queue (set via the `chain` method) then it will start playing, + * when the current one stops. + * + * @method Phaser.GameObjects.Sprite#stopAfterRepeat + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_STOP + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_STOP + * @since 3.50.0 + * + * @param {integer} [repeatCount=1] - How many times should the animation repeat before stopping? + * + * @return {this} This Game Object. + */ + stopAfterRepeat: function (repeatCount) + { + return this.anims.stopAfterRepeat(repeatCount); + }, + + /** + * Stops the current animation from playing when it next sets the given frame. + * If this frame doesn't exist within the animation it will not stop it from playing. + * + * It then dispatches the `ANIMATION_STOP` series of events. + * + * If no animation is running, no events will be dispatched. + * + * If there is another animation in the queue (set via the `chain` method) then it will start playing, + * when the current one stops. + * + * @method Phaser.GameObjects.Sprite#stopOnFrame + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_STOP + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_STOP + * @since 3.50.0 + * + * @param {Phaser.Animations.AnimationFrame} frame - The frame to check before stopping this animation. + * + * @return {this} This Game Object. + */ + stopOnFrame: function (frame) + { + return this.anims.stopOnFrame(frame); + }, + /** * Build a JSON representation of this Sprite. * From 858ae68841881bfb787295155f5da103de7807e6 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 4 Sep 2020 11:49:16 +0100 Subject: [PATCH 193/241] Removed `startFrame`, chain can take arrays, `delayedPlay` rename, `playAfterRepeat` method and `playAfterDelay` method. --- src/gameobjects/components/Animation.js | 238 ++++++++++++++++-------- 1 file changed, 165 insertions(+), 73 deletions(-) diff --git a/src/gameobjects/components/Animation.js b/src/gameobjects/components/Animation.js index 583f1c700..03d03e5f0 100644 --- a/src/gameobjects/components/Animation.js +++ b/src/gameobjects/components/Animation.js @@ -421,21 +421,23 @@ var Animation = new Class({ }, /** - * Sets an animation to be played immediately after the current one completes. + * Sets an animation, or an array of animations, to be played immediately after the current one completes or stops. * - * The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc, or have the `stop` method called directly on it. + * The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc, + * or have the `stop` method called directly on it. * * An animation set to repeat forever will never enter a completed state. * - * You can chain a new animation at any point, including before the current one starts playing, during it, or when it ends (via its `animationcomplete` callback). + * You can chain a new animation at any point, including before the current one starts playing, during it, or when it ends (via its `animationcomplete` event). + * * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained animations without impacting the global animation they're playing. * - * Call this method with no arguments to reset all chained animations. + * Call this method with no arguments to reset all currently chained animations. * * @method Phaser.GameObjects.Components.Animation#chain * @since 3.16.0 * - * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig|string[]|Phaser.Animations.Animation[]|Phaser.Types.Animations.PlayAnimationConfig[])} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object, or an array of them. * * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. */ @@ -451,32 +453,41 @@ var Animation = new Class({ return parent; } - if (this.nextAnim === null) + if (!Array.isArray(key)) { - this.nextAnim = key; - } - else - { - this.nextAnimsQueue.push(key); + key = [ key ]; } - return parent; + for (var i = 0; i < key.length; i++) + { + var anim = key[i]; + + if (this.nextAnim === null) + { + this.nextAnim = anim; + } + else + { + this.nextAnimsQueue.push(anim); + } + } + + return this.parent; }, /** * Returns the key of the animation currently loaded into this component. * - * @method Phaser.GameObjects.Components.Animation#getCurrentKey - * @since 3.0.0 + * Prior to Phaser 3.50 this method was called `getCurrentKey`. * - * @return {string} The key of the Animation loaded into this component. + * @method Phaser.GameObjects.Components.Animation#getName + * @since 3.50.0 + * + * @return {string} The key of the Animation currently loaded into this component, or an empty string if none loaded. */ - getCurrentKey: function () + getName: function () { - if (this.currentAnim) - { - return this.currentAnim.key; - } + return (this.currentAnim) ? this.currentAnim.key : ''; }, /** @@ -487,14 +498,11 @@ var Animation = new Class({ * @since 3.0.0 * * @param {(string|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or a `PlayAnimationConfig` object. - * @param {integer} [startFrame=0] - The start frame of the animation to load. * * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. */ - load: function (key, startFrame) + load: function (key) { - if (startFrame === undefined) { startFrame = 0; } - if (this.isPlaying) { this.stop(); @@ -512,13 +520,6 @@ var Animation = new Class({ } else { - startFrame = GetFastValue(key, 'startFrame', startFrame); - - if (startFrame > anim.getTotalFrames()) - { - startFrame = 0; - } - this.currentAnim = anim; // And now override the animation values, if set in the config. @@ -539,7 +540,14 @@ var Animation = new Class({ this.timeScale = GetFastValue(key, 'timeScale', this.timeScale); - var frame = this.currentAnim.frames[startFrame]; + var startFrame = GetFastValue(key, 'startFrame', 0); + + if (startFrame > anim.getTotalFrames()) + { + startFrame = 0; + } + + var frame = anim.frames[startFrame]; if (startFrame === 0 && !this.forward) { @@ -607,6 +615,109 @@ var Animation = new Class({ return this.parent; }, + /** + * Waits for the specified delay, in milliseconds, then starts playback of the given animation. + * + * If the animation _also_ has a delay value set in its config, it will be **added** to the delay given here. + * + * If an animation is already running and a new animation is given to this method, it will wait for + * the given delay before starting the new animation. + * + * If no animation is currently running, the given one begins after the delay. + * + * Prior to Phaser 3.50 this method was called 'delayedPlay'. + * + * @method Phaser.GameObjects.Components.Animation#playAfterDelay + * @fires Phaser.Animations.Events#ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START + * @since 3.50.0 + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {integer} delay - The delay, in milliseconds, to wait before starting the animation playing. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + playAfterDelay: function (key, delay) + { + if (!this.isPlaying) + { + this.delayCounter = delay; + + this.play(key, true); + } + else + { + // If we've got a nextAnim, move it to the queue + var nextAnim = this.nextAnim; + var queue = this.nextAnimsQueue; + + if (nextAnim) + { + queue.unshift(nextAnim); + } + + this.nextAnim = key; + + this._pendingStop = 1; + this._pendingStopValue = delay; + } + + return this.parent; + }, + + /** + * Waits for the current animation to complete one 'repeat' cycle, then starts playback of the given animation. + * + * You can use this to ensure there are no harsh 'jumps' between two sets of animations, i.e. going from an + * idle animation to a walking animation. + * + * If no animation is currently running, the given one will start immediately. + * + * @method Phaser.GameObjects.Components.Animation#playAfterRepeat + * @fires Phaser.Animations.Events#ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START + * @since 3.50.0 + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {integer} [repeatCount=1] - How many times should the animation repeat before the next one starts? + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + playAfterRepeat: function (key, repeatCount) + { + if (repeatCount === undefined) { repeatCount = 1; } + + if (!this.isPlaying) + { + this.play(key); + } + else + { + // If we've got a nextAnim, move it to the queue + var nextAnim = this.nextAnim; + var queue = this.nextAnimsQueue; + + if (nextAnim) + { + queue.unshift(nextAnim); + } + + if (this.repeatCounter !== -1 && repeatCount > this.repeatCounter) + { + repeatCount = this.repeatCounter; + } + + this.nextAnim = key; + + this._pendingStop = 2; + this._pendingStopValue = repeatCount; + } + + return this.parent; + }, + /** * Plays an Animation on a Game Object that has the Animation component, such as a Sprite. * @@ -620,14 +731,12 @@ var Animation = new Class({ * * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call. - * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. * * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. */ - play: function (key, ignoreIfPlaying, startFrame) + play: function (key, ignoreIfPlaying) { if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } - if (startFrame === undefined) { startFrame = 0; } // Must be either an Animation instance, or a PlayAnimationConfig object var animKey = (typeof key === 'string') ? key : key.key; @@ -643,7 +752,7 @@ var Animation = new Class({ this._paused = false; this._wasPlaying = true; - return this.startAnimation(key, startFrame); + return this.startAnimation(key); }, /** @@ -657,14 +766,12 @@ var Animation = new Class({ * * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. - * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. * * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. */ - playReverse: function (key, ignoreIfPlaying, startFrame) + playReverse: function (key, ignoreIfPlaying) { if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } - if (startFrame === undefined) { startFrame = 0; } // Must be either an Animation instance, or a PlayAnimationConfig object var animKey = (typeof key === 'string') ? key : key.key; @@ -680,33 +787,7 @@ var Animation = new Class({ this._paused = false; this._wasPlaying = true; - return this.startAnimation(key, startFrame); - }, - - /** - * Waits for the specified delay, in milliseconds, then starts playback of the requested animation. - * - * If the animation _also_ has a delay value set in its config, this value will override that and be used instead. - * - * The delay only takes effect if the animation has not already started playing. - * - * @method Phaser.GameObjects.Components.Animation#delayedPlay - * @fires Phaser.Animations.Events#ANIMATION_START - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START - * @since 3.0.0 - * - * @param {integer} delay - The delay, in milliseconds, to wait before starting the animation playing. - * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. - * @param {integer} [startFrame=0] - The frame of the animation to start from. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - delayedPlay: function (delay, key, startFrame) - { - this.delayCounter = delay; - - return this.play(key, true, startFrame); + return this.startAnimation(key); }, /** @@ -720,13 +801,12 @@ var Animation = new Class({ * @since 3.50.0 * * @param {(string|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or a `PlayAnimationConfig` object. - * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. * * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. */ - startAnimation: function (key, startFrame) + startAnimation: function (key) { - this.load(key, startFrame); + this.load(key); var anim = this.currentAnim; var gameObject = this.parent; @@ -1107,7 +1187,7 @@ var Animation = new Class({ { var key = this.nextAnim; - this.nextAnim = (this.nextAnimsQueue.length > 0) ? this.nextAnimsQueue.shift() : null; + this.nextAnim = this.nextAnimsQueue.shift(); this.play(key); } @@ -1153,17 +1233,29 @@ var Animation = new Class({ * If there is another animation in the queue (set via the `chain` method) then it will start playing, * when the current one stops. * - * @method Phaser.GameObjects.Components.Animation#stopOnRepeat + * Prior to Phaser 3.50 this method was called `stopOnRepeat` and had no parameters. + * + * @method Phaser.GameObjects.Components.Animation#stopAfterRepeat * @fires Phaser.Animations.Events#ANIMATION_STOP * @fires Phaser.Animations.Events#SPRITE_ANIMATION_STOP * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_STOP - * @since 3.4.0 + * @since 3.50.0 + * + * @param {integer} [repeatCount=1] - How many times should the animation repeat before stopping? * * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. */ - stopOnRepeat: function () + stopAfterRepeat: function (repeatCount) { + if (repeatCount === undefined) { repeatCount = 1; } + + if (this.repeatCounter !== -1 && repeatCount > this.repeatCounter) + { + repeatCount = this.repeatCounter; + } + this._pendingStop = 2; + this._pendingStopValue = repeatCount; return this.parent; }, From c9193d038f04d7cce39bf5706e8f8f878acaa74a Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 4 Sep 2020 11:49:19 +0100 Subject: [PATCH 194/241] Update CHANGELOG.md --- CHANGELOG.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c6089d9e..73698dd67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -214,10 +214,23 @@ The way in which Game Objects add themselves to the Scene Update List has change ### Animation API New Features and Updates +If you use Animations in your game, please read the following important API changes in 3.50: + The Animation API has had a significant overhaul to improve playback handling. Instead of just playing an animation based on its global key, you can now supply a new `PlayAnimationConfig` object instead, which allows you to override any of the default animation settings, such as `duration`, `delay` and `yoyo` (see below for the full list). This means you no longer have to create lots of duplicate animations, just to change properties such as `duration`, and can now set them dynamically at run-time as well. +* `play` no longer accepts a `startFrame` parameter. Please set it via the `PlayAnimationConfig` instead. +* `playReverse` no longer accepts a `startFrame` parameter. Please set it via the `PlayAnimationConfig` instead. +* The `delayedPlay` method has been renamed. Please now use `playAfterDelay` instead. +* The `stopOnRepeat` method has been renamed. Please now use `stopAfterRepeat` instead. +* The `Component.Animation.getCurrentKey` method has been renamed. Please now use `getName` instead. +* `playAfterDelay` is a new method that will play the given animation after the delay expires. It is available on the Sprite and the Animation Component. +* `playAfterRepeat` is a new method that will play the given animation after the current animation finishes repeating. It is available on the Sprite and the Animation Component. +* The `chain` method is now available on the Sprite class. +* The `stopAfterDelay` method is now available on the Sprite class. +* The `stopAfterRepeat` method is now available on the Sprite class. +* The `stopOnFrame` method is now available on the Sprite class. * `AnimationManager.createFromAseprite` is a new method that allows you to use animations created in the Aseprite editor directly in Phaser. Please see the comprehensive documentation for this method for full details on how to do this. -* The `play`, `playReverse`, `delayedPlay` and `chain` Animation Component methods can now all take a `Phaser.Types.Animations.PlayAnimationConfig` configuration object instead of a string as the `key` parameter. This allows you to override any default animation setting with those defined in the config, giving you far greater control over animations on a Game Object level, without needing to globally duplicate them. +* The `play`, `playReverse`, `playAfterDelay`, `playAfterRepeat` and `chain` Sprite and Animation Component methods can now all take a `Phaser.Types.Animations.PlayAnimationConfig` configuration object, instead of a string, as the `key` parameter. This allows you to override any default animation setting with those defined in the config, giving you far greater control over animations on a Game Object level, without needing to globally duplicate them. * The `Component.Animation` now handles all of the loading of the animation. It no longer has to make calls out to the Animation Manager or Animation itself and will load the animation data directly, replacing as required from the optional `PlayAnimationConfig`. This improves performance and reduces CPU calls in animation heavy games. * The `PlayAnimationConfig.frameRate` property lets you optionally override the animation frame rate. * The `PlayAnimationConfig.duration` property lets you optionally override the animation duration. @@ -279,6 +292,7 @@ The Animation API has had a significant overhaul to improve playback handling. I * The `Component.Animation.getTotalFrames` method has been fixed and won't error if called when no animation is loaded. * The `Component.Animation.setYoyo` method has now been removed. You can set the value using the `yoyo` config property, or changing it at run-time. * The `Component.Animation.getYoyo` method has now been removed. You can read the value using the `yoyo` property. +* The `stopAfterRepeat` method now has an optional parameter `repeatCount`, so you can tell the animation to stop after a specified number of repeats, not just 1. ### New Features From 5979864dc4399f933a65fdb7919437a19963a9fa Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 4 Sep 2020 11:50:13 +0100 Subject: [PATCH 195/241] Use new method name and parameter order --- src/animations/AnimationManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/animations/AnimationManager.js b/src/animations/AnimationManager.js index 395b73fcb..3d0c4e41a 100644 --- a/src/animations/AnimationManager.js +++ b/src/animations/AnimationManager.js @@ -731,7 +731,7 @@ var AnimationManager = new Class({ { var time = (stagger < 0) ? Math.abs(stagger) * (len - i) : stagger * i; - children[i].anims.delayedPlay(time, key); + children[i].anims.playAfterDelay(key, time); } return this; From cebd1d01016818ddd4e4a12d1aa0129d1af2c99e Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 4 Sep 2020 11:52:19 +0100 Subject: [PATCH 196/241] Tidy up order --- src/gameobjects/components/Animation.js | 53 +++++++++++++------------ 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/src/gameobjects/components/Animation.js b/src/gameobjects/components/Animation.js index 03d03e5f0..2a2b8d37c 100644 --- a/src/gameobjects/components/Animation.js +++ b/src/gameobjects/components/Animation.js @@ -262,6 +262,33 @@ var Animation = new Class({ */ this.yoyo = false; + + /** + * Should the GameObject's `visible` property be set to `true` when the animation starts to play? + * + * This will happen _after_ any delay that may have been set. + * + * This value is set when a new animation is loaded into this component, but can also be modified + * at run-time, assuming the animation is currently delayed. + * + * @name Phaser.GameObjects.Components.Animation#showOnStart + * @type {boolean} + * @since 3.50.0 + */ + this.showOnStart = false; + + /** + * Should the GameObject's `visible` property be set to `false` when the animation completes? + * + * This value is set when a new animation is loaded into this component, but can also be modified + * at run-time, assuming the animation is still actively playing. + * + * @name Phaser.GameObjects.Components.Animation#hideOnComplete + * @type {boolean} + * @since 3.50.0 + */ + this.hideOnComplete = false; + /** * Is the playhead moving forwards (`true`) or in reverse (`false`) ? * @@ -392,32 +419,6 @@ var Animation = new Class({ * @since 3.4.0 */ this._pendingStopValue; - - /** - * Should the GameObject's `visible` property be set to `true` when the animation starts to play? - * - * This will happen _after_ any delay that may have been set. - * - * This value is set when a new animation is loaded into this component, but can also be modified - * at run-time, assuming the animation is currently delayed. - * - * @name Phaser.GameObjects.Components.Animation#showOnStart - * @type {boolean} - * @since 3.50.0 - */ - this.showOnStart = false; - - /** - * Should the GameObject's `visible` property be set to `false` when the animation completes? - * - * This value is set when a new animation is loaded into this component, but can also be modified - * at run-time, assuming the animation is still actively playing. - * - * @name Phaser.GameObjects.Components.Animation#hideOnComplete - * @type {boolean} - * @since 3.50.0 - */ - this.hideOnComplete = false; }, /** From 66f4ab69e7169d9e79a0af0d8b5423d2b6285bce Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 4 Sep 2020 13:06:00 +0100 Subject: [PATCH 197/241] When playing an animation in reverse, if it reached the first frame and had to repeat, it would then jump to the frame before the final frame and carry on, skipping out the final frame. --- src/animations/Animation.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/animations/Animation.js b/src/animations/Animation.js index ae86e4094..2c8108952 100644 --- a/src/animations/Animation.js +++ b/src/animations/Animation.js @@ -197,8 +197,11 @@ var Animation = new Class({ this.calculateDuration(this, this.getTotalFrames(), this.duration, this.frameRate); - this.manager.on(Events.PAUSE_ALL, this.pause, this); - this.manager.on(Events.RESUME_ALL, this.resume, this); + if (this.manager.on) + { + this.manager.on(Events.PAUSE_ALL, this.pause, this); + this.manager.on(Events.RESUME_ALL, this.resume, this); + } }, /** @@ -619,7 +622,6 @@ var Animation = new Class({ if (frame.isFirst) { // We're at the start of the animation - if (component.yoyo) { this.handleYoyoFrame(component, true); @@ -628,8 +630,6 @@ var Animation = new Class({ { if (component.inReverse && !component.forward) { - component.currentFrame = this.getLastFrame(); - this.repeatAnimation(component); } else @@ -896,8 +896,11 @@ var Animation = new Class({ { this.removeAllListeners(); - this.manager.off(Events.PAUSE_ALL, this.pause, this); - this.manager.off(Events.RESUME_ALL, this.resume, this); + if (this.manager.off) + { + this.manager.off(Events.PAUSE_ALL, this.pause, this); + this.manager.off(Events.RESUME_ALL, this.resume, this); + } this.manager.remove(this.key); From cee9ca00ebb8ffd46edcff1ba674070a6d89bb06 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 4 Sep 2020 13:58:34 +0100 Subject: [PATCH 198/241] Improved docs --- src/gameobjects/sprite/Sprite.js | 73 ++++++++++++++++++++++++++------ 1 file changed, 60 insertions(+), 13 deletions(-) diff --git a/src/gameobjects/sprite/Sprite.js b/src/gameobjects/sprite/Sprite.js index 7f516cd91..0642f1ea2 100644 --- a/src/gameobjects/sprite/Sprite.js +++ b/src/gameobjects/sprite/Sprite.js @@ -136,8 +136,12 @@ var Sprite = new Class({ /** * Start playing the given animation on this Sprite. * - * Animations in Phaser belong to the global Animation Manager. This means multiple Sprites can all play the same - * animation. The following code shows how to create a global repeating animation. The animation will be created + * Animations in Phaser can either belong to the global Animation Manager, or specifically to this Sprite. + * + * The benefit of a global animation is that multiple Sprites can all play the same animation, without + * having to duplicate the data. You can just create it once and then play it on any Sprite. + * + * The following code shows how to create a global repeating animation. The animation will be created * from all of the frames within the sprite sheet that was loaded with the key 'muybridge': * * ```javascript @@ -148,10 +152,15 @@ var Sprite = new Class({ * repeat: -1 * }; * + * // This code should be run from within a Scene: * this.anims.create(config); * ``` * - * With the animation created, you can now play it on this Sprite: + * However, if you wish to create an animation that is unique to this Sprite, and this Sprite alone, + * you can call the `Animation.create` method instead. It accepts the exact same parameters as when + * creating a global animation, however the resulting data is kept locally in this Sprite. + * + * With the animation created, either globally or locally, you can now play it on this Sprite: * * ```javascript * this.add.sprite(x, y).play('run'); @@ -164,6 +173,13 @@ var Sprite = new Class({ * this.add.sprite(x, y).play({ key: 'run', frameRate: 24 }); * ``` * + * When playing an animation on a Sprite it will first check to see if it can find a matching key + * locally within the Sprite. If it can, it will play the local animation. If not, it will then + * search the global Animation Manager and look for it there. + * + * If you need a Sprite to be able to play both local and global animations, make sure they don't + * have conflicting keys. + * * See the documentation for the `PlayAnimationConfig` config object for more details about this. * * Also, see the documentation in the Animation Manager for further details on creating animations. @@ -185,10 +201,14 @@ var Sprite = new Class({ }, /** - * Start playing the given animation on this Sprite in reverse. + * Start playing the given animation on this Sprite, in reverse. * - * Animations in Phaser belong to the global Animation Manager. This means multiple Sprites can all play the same - * animation. The following code shows how to create a global repeating animation. The animation will be created + * Animations in Phaser can either belong to the global Animation Manager, or specifically to this Sprite. + * + * The benefit of a global animation is that multiple Sprites can all play the same animation, without + * having to duplicate the data. You can just create it once and then play it on any Sprite. + * + * The following code shows how to create a global repeating animation. The animation will be created * from all of the frames within the sprite sheet that was loaded with the key 'muybridge': * * ```javascript @@ -199,10 +219,15 @@ var Sprite = new Class({ * repeat: -1 * }; * + * // This code should be run from within a Scene: * this.anims.create(config); * ``` * - * With the animation created, you can now play it on this Sprite: + * However, if you wish to create an animation that is unique to this Sprite, and this Sprite alone, + * you can call the `Animation.create` method instead. It accepts the exact same parameters as when + * creating a global animation, however the resulting data is kept locally in this Sprite. + * + * With the animation created, either globally or locally, you can now play it on this Sprite: * * ```javascript * this.add.sprite(x, y).playReverse('run'); @@ -215,6 +240,13 @@ var Sprite = new Class({ * this.add.sprite(x, y).playReverse({ key: 'run', frameRate: 24 }); * ``` * + * When playing an animation on a Sprite it will first check to see if it can find a matching key + * locally within the Sprite. If it can, it will play the local animation. If not, it will then + * search the global Animation Manager and look for it there. + * + * If you need a Sprite to be able to play both local and global animations, make sure they don't + * have conflicting keys. + * * See the documentation for the `PlayAnimationConfig` config object for more details about this. * * Also, see the documentation in the Animation Manager for further details on creating animations. @@ -245,6 +277,10 @@ var Sprite = new Class({ * * If no animation is currently running, the given one begins after the delay. * + * When playing an animation on a Sprite it will first check to see if it can find a matching key + * locally within the Sprite. If it can, it will play the local animation. If not, it will then + * search the global Animation Manager and look for it there. + * * Prior to Phaser 3.50 this method was called 'delayedPlay'. * * @method Phaser.GameObjects.Components.Animation#playAfterDelay @@ -264,13 +300,18 @@ var Sprite = new Class({ }, /** - * Waits for the current animation to complete one 'repeat' cycle, then starts playback of the given animation. + * Waits for the current animation to complete the `repeatCount` number of repeat cycles, then starts playback + * of the given animation. * - * You can use this to ensure there are no harsh 'jumps' between two sets of animations, i.e. going from an - * idle animation to a walking animation. + * You can use this to ensure there are no harsh jumps between two sets of animations, i.e. going from an + * idle animation to a walking animation, by making them blend smoothly into each other. * * If no animation is currently running, the given one will start immediately. * + * When playing an animation on a Sprite it will first check to see if it can find a matching key + * locally within the Sprite. If it can, it will play the local animation. If not, it will then + * search the global Animation Manager and look for it there. + * * @method Phaser.GameObjects.Components.Animation#playAfterRepeat * @fires Phaser.Animations.Events#ANIMATION_START * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START @@ -295,12 +336,18 @@ var Sprite = new Class({ * * An animation set to repeat forever will never enter a completed state. * - * You can chain a new animation at any point, including before the current one starts playing, during it, or when it ends (via its `animationcomplete` event). + * You can chain a new animation at any point, including before the current one starts playing, during it, + * or when it ends (via its `animationcomplete` event). * - * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained animations without impacting the global animation they're playing. + * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained + * animations without impacting the animation they're playing. * * Call this method with no arguments to reset all currently chained animations. * + * When playing an animation on a Sprite it will first check to see if it can find a matching key + * locally within the Sprite. If it can, it will play the local animation. If not, it will then + * search the global Animation Manager and look for it there. + * * @method Phaser.GameObjects.Sprite#chain * @since 3.50.0 * @@ -359,7 +406,7 @@ var Sprite = new Class({ }, /** - * Stops the current animation from playing when it next repeats. + * Stops the current animation from playing after the given number of repeats. * * It then dispatches the `ANIMATION_STOP` series of events. * From 89332aad5f65ca0e1f0f4de526355872be62d144 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 4 Sep 2020 14:03:57 +0100 Subject: [PATCH 199/241] You can now create Animations directly on Sprite * `Component.Animation.create` is a new method that allows you to create animations directly on a Sprite. These are not global and never enter the Animation Manager, instead risiding within the Sprite itself. This allows you to use the same keys across both local and global animations and set-up Sprite specific local animations. * All playback methods: `play`, `playReverse`, `playAfterDelay` and `playAfterRepeat` will now check to see if the given animation key exists locally on the Sprite first. If it does, it's used, otherwise it then checks the global Animation Manager for the key instead. * `Component.Animation.remove` is a new method that will remove a locally stored Animation instance from a Sprite. * `Component.Animation.get` is a new method that will return a locally stored Animation instance from the Sprite. * `Component.Animation.exists` is a new method that will check if a locally stored Animation exists on the Sprite. * The internal `Component.Animation.remove` method has been renamed to `globalRemove`. * `Component.Animation.textureManager` is a new property that references the global Texture Manager. * `Component.Animation.anims` is a new property that contains locally created Animations in a Custom Map. --- src/gameobjects/components/Animation.js | 265 ++++++++++++++++++++++-- 1 file changed, 250 insertions(+), 15 deletions(-) diff --git a/src/gameobjects/components/Animation.js b/src/gameobjects/components/Animation.js index 2a2b8d37c..f0f11b3fc 100644 --- a/src/gameobjects/components/Animation.js +++ b/src/gameobjects/components/Animation.js @@ -5,8 +5,10 @@ */ var Class = require('../../utils/Class'); +var CustomMap = require('../../structs/Map'); var GetFastValue = require('../../utils/object/GetFastValue'); var Events = require('../../animations/events'); +var AnimationClass = require('../../animations/Animation'); /** * @classdesc @@ -52,7 +54,30 @@ var Animation = new Class({ */ this.animationManager = parent.scene.sys.anims; - this.animationManager.on(Events.REMOVE_ANIMATION, this.remove, this); + this.animationManager.on(Events.REMOVE_ANIMATION, this.globalRemove, this); + + /** + * A reference to the Texture Manager. + * + * @name Phaser.GameObjects.Components.Animation#textureManager + * @type {Phaser.Textures.TextureManager} + * @protected + * @since 3.50.0 + */ + this.textureManager = this.animationManager.textureManager; + + /** + * The Animations stored locally in this Animation component. + * + * Do not modify the contents of this Map directly, instead use the + * `add`, `create` and `remove` methods of this class instead. + * + * @name Phaser.GameObjects.Components.Animation#anims + * @type {Phaser.Structs.Map.} + * @protected + * @since 3.50.0 + */ + this.anims = null; /** * Is an animation currently playing or not? @@ -262,7 +287,6 @@ var Animation = new Class({ */ this.yoyo = false; - /** * Should the GameObject's `visible` property be set to `true` when the animation starts to play? * @@ -512,8 +536,8 @@ var Animation = new Class({ var manager = this.animationManager; var animKey = (typeof key === 'string') ? key : GetFastValue(key, 'key', null); - // Get the animation from the Animation Manager - var anim = manager.get(animKey); + // Get the animation, first from the local map and, if not found, from the Animation Manager + var anim = (this.exists(animKey)) ? this.get(animKey) : manager.get(animKey); if (!anim) { @@ -552,7 +576,7 @@ var Animation = new Class({ if (startFrame === 0 && !this.forward) { - frame = this.getLastFrame(); + frame = anim.getLastFrame(); } this.currentFrame = frame; @@ -668,10 +692,11 @@ var Animation = new Class({ }, /** - * Waits for the current animation to complete one 'repeat' cycle, then starts playback of the given animation. + * Waits for the current animation to complete the `repeatCount` number of repeat cycles, then starts playback + * of the given animation. * - * You can use this to ensure there are no harsh 'jumps' between two sets of animations, i.e. going from an - * idle animation to a walking animation. + * You can use this to ensure there are no harsh jumps between two sets of animations, i.e. going from an + * idle animation to a walking animation, by making them blend smoothly into each other. * * If no animation is currently running, the given one will start immediately. * @@ -720,9 +745,55 @@ var Animation = new Class({ }, /** - * Plays an Animation on a Game Object that has the Animation component, such as a Sprite. + * Start playing the given animation on this Sprite. * - * Animations are stored in the global Animation Manager and are referenced by a unique string-based key. + * Animations in Phaser can either belong to the global Animation Manager, or specifically to this Sprite. + * + * The benefit of a global animation is that multiple Sprites can all play the same animation, without + * having to duplicate the data. You can just create it once and then play it on any Sprite. + * + * The following code shows how to create a global repeating animation. The animation will be created + * from all of the frames within the sprite sheet that was loaded with the key 'muybridge': + * + * ```javascript + * var config = { + * key: 'run', + * frames: 'muybridge', + * frameRate: 15, + * repeat: -1 + * }; + * + * // This code should be run from within a Scene: + * this.anims.create(config); + * ``` + * + * However, if you wish to create an animation that is unique to this Sprite, and this Sprite alone, + * you can call the `Animation.create` method instead. It accepts the exact same parameters as when + * creating a global animation, however the resulting data is kept locally in this Sprite. + * + * With the animation created, either globally or locally, you can now play it on this Sprite: + * + * ```javascript + * this.add.sprite(x, y).play('run'); + * ``` + * + * Alternatively, if you wish to run it at a different frame rate, for example, you can pass a config + * object instead: + * + * ```javascript + * this.add.sprite(x, y).play({ key: 'run', frameRate: 24 }); + * ``` + * + * When playing an animation on a Sprite it will first check to see if it can find a matching key + * locally within the Sprite. If it can, it will play the local animation. If not, it will then + * search the global Animation Manager and look for it there. + * + * If you need a Sprite to be able to play both local and global animations, make sure they don't + * have conflicting keys. + * + * See the documentation for the `PlayAnimationConfig` config object for more details about this. + * + * Also, see the documentation in the Animation Manager for further details on creating animations. * * @method Phaser.GameObjects.Components.Animation#play * @fires Phaser.Animations.Events#ANIMATION_START @@ -757,7 +828,55 @@ var Animation = new Class({ }, /** - * Plays an Animation in reverse on the Game Object that owns this Animation Component. + * Start playing the given animation on this Sprite, in reverse. + * + * Animations in Phaser can either belong to the global Animation Manager, or specifically to this Sprite. + * + * The benefit of a global animation is that multiple Sprites can all play the same animation, without + * having to duplicate the data. You can just create it once and then play it on any Sprite. + * + * The following code shows how to create a global repeating animation. The animation will be created + * from all of the frames within the sprite sheet that was loaded with the key 'muybridge': + * + * ```javascript + * var config = { + * key: 'run', + * frames: 'muybridge', + * frameRate: 15, + * repeat: -1 + * }; + * + * // This code should be run from within a Scene: + * this.anims.create(config); + * ``` + * + * However, if you wish to create an animation that is unique to this Sprite, and this Sprite alone, + * you can call the `Animation.create` method instead. It accepts the exact same parameters as when + * creating a global animation, however the resulting data is kept locally in this Sprite. + * + * With the animation created, either globally or locally, you can now play it on this Sprite: + * + * ```javascript + * this.add.sprite(x, y).playReverse('run'); + * ``` + * + * Alternatively, if you wish to run it at a different frame rate, for example, you can pass a config + * object instead: + * + * ```javascript + * this.add.sprite(x, y).playReverse({ key: 'run', frameRate: 24 }); + * ``` + * + * When playing an animation on a Sprite it will first check to see if it can find a matching key + * locally within the Sprite. If it can, it will play the local animation. If not, it will then + * search the global Animation Manager and look for it there. + * + * If you need a Sprite to be able to play both local and global animations, make sure they don't + * have conflicting keys. + * + * See the documentation for the `PlayAnimationConfig` config object for more details about this. + * + * Also, see the documentation in the Animation Manager for further details on creating animations. * * @method Phaser.GameObjects.Components.Animation#playReverse * @fires Phaser.Animations.Events#ANIMATION_START @@ -1041,13 +1160,13 @@ var Animation = new Class({ /** * Handle the removal of an animation from the Animation Manager. * - * @method Phaser.GameObjects.Components.Animation#remove - * @since 3.0.0 + * @method Phaser.GameObjects.Components.Animation#globalRemove + * @since 3.50.0 * * @param {string} [key] - The key of the removed Animation. * @param {Phaser.Animations.Animation} [animation] - The removed Animation. */ - remove: function (key, animation) + globalRemove: function (key, animation) { if (animation === undefined) { animation = this.currentAnim; } @@ -1479,6 +1598,117 @@ var Animation = new Class({ return this.parent; }, + /** + * Get an Animation instance that has been created locally on this Sprite. + * + * See the `create` method for more details. + * + * @method Phaser.GameObjects.Components.Animation#get + * @since 3.50.0 + * + * @param {string} key - The key of the Animation to retrieve. + * + * @return {Phaser.Animations.Animation} The Animation, or `undefined` if the key is invalid. + */ + get: function (key) + { + return (this.anims && this.anims.get(key)); + }, + + /** + * Checks to see if the given key is already used locally within the animations stored on this Sprite. + * + * @method Phaser.GameObjects.Components.Animation#exists + * @since 3.50.0 + * + * @param {string} key - The key of the Animation to check. + * + * @return {boolean} `true` if the Animation exists locally, or `false` if the key is available. + */ + exists: function (key) + { + return (this.anims && this.anims.has(key)); + }, + + /** + * Creates a new Animation that is local specifically to this Sprite. + * + * When a Sprite owns an animation, it is kept out of the global Animation Manager, which means + * you're free to use keys that may be already defined there. Unless you specifically need a Sprite + * to have a unique animation, you should favor using global animations instead, as they allow for + * the same animation to be used across multiple Sprites, saving on memory. However, if this Sprite + * is the only one to use this animation, it's sensible to create it here. + * + * If an invalid key is given this method will return `false`. + * + * If you pass the key of an animation that already exists locally, that animation will be returned. + * + * A brand new animation is only created if the key is valid and not already in use by this Sprite. + * + * If you wish to re-use an existing key, call the `remove` method first, then this method. + * + * @method Phaser.GameObjects.Components.Animation#create + * @since 3.50.0 + * + * @param {Phaser.Types.Animations.Animation} config - The configuration settings for the Animation. + * + * @return {(Phaser.Animations.Animation|false)} The Animation that was created, or `false` if the key is already in use. + */ + create: function (config) + { + var key = config.key; + + var anim = false; + + if (key) + { + anim = this.get(key); + + if (!anim) + { + anim = new AnimationClass(this, key, config); + + if (!this.anims) + { + this.anims = new CustomMap(); + } + + this.anims.set(key, anim); + } + } + + return anim; + }, + + /** + * Removes a locally created Animation from this Sprite, based on the given key. + * + * Once an Animation has been removed, this Sprite cannot play it again without re-creating it. + * + * @method Phaser.GameObjects.Components.Animation#remove + * @since 3.50.0 + * + * @param {string} key - The key of the animation to remove. + * + * @return {Phaser.Animations.Animation} The Animation instance that was removed from this Sprite, if the key was valid. + */ + remove: function (key) + { + var anim = this.get(key); + + if (anim) + { + if (this.currentAnim === anim) + { + this.stop(); + } + + this.anims.delete(key); + } + + return anim; + }, + /** * Destroy this Animation component. * @@ -1489,7 +1719,12 @@ var Animation = new Class({ */ destroy: function () { - this.animationManager.off(Events.REMOVE_ANIMATION, this.remove, this); + this.animationManager.off(Events.REMOVE_ANIMATION, this.globalRemove, this); + + if (this.anims) + { + this.anims.clear(); + } this.animationManager = null; this.parent = null; From 1b6dfafc45f8a69657160fd732120b1fc0427011 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 4 Sep 2020 14:04:04 +0100 Subject: [PATCH 200/241] Update CHANGELOG.md --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 73698dd67..34d3142eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -218,6 +218,14 @@ If you use Animations in your game, please read the following important API chan The Animation API has had a significant overhaul to improve playback handling. Instead of just playing an animation based on its global key, you can now supply a new `PlayAnimationConfig` object instead, which allows you to override any of the default animation settings, such as `duration`, `delay` and `yoyo` (see below for the full list). This means you no longer have to create lots of duplicate animations, just to change properties such as `duration`, and can now set them dynamically at run-time as well. +* `Component.Animation.create` is a new method that allows you to create animations directly on a Sprite. These are not global and never enter the Animation Manager, instead risiding within the Sprite itself. This allows you to use the same keys across both local and global animations and set-up Sprite specific local animations. +* All playback methods: `play`, `playReverse`, `playAfterDelay` and `playAfterRepeat` will now check to see if the given animation key exists locally on the Sprite first. If it does, it's used, otherwise it then checks the global Animation Manager for the key instead. +* `Component.Animation.remove` is a new method that will remove a locally stored Animation instance from a Sprite. +* `Component.Animation.get` is a new method that will return a locally stored Animation instance from the Sprite. +* `Component.Animation.exists` is a new method that will check if a locally stored Animation exists on the Sprite. +* The internal `Component.Animation.remove` method has been renamed to `globalRemove`. +* `Component.Animation.textureManager` is a new property that references the global Texture Manager. +* `Component.Animation.anims` is a new property that contains locally created Animations in a Custom Map. * `play` no longer accepts a `startFrame` parameter. Please set it via the `PlayAnimationConfig` instead. * `playReverse` no longer accepts a `startFrame` parameter. Please set it via the `PlayAnimationConfig` instead. * The `delayedPlay` method has been renamed. Please now use `playAfterDelay` instead. @@ -293,6 +301,7 @@ The Animation API has had a significant overhaul to improve playback handling. I * The `Component.Animation.setYoyo` method has now been removed. You can set the value using the `yoyo` config property, or changing it at run-time. * The `Component.Animation.getYoyo` method has now been removed. You can read the value using the `yoyo` property. * The `stopAfterRepeat` method now has an optional parameter `repeatCount`, so you can tell the animation to stop after a specified number of repeats, not just 1. +* When playing an animation in reverse, if it reached the first frame and had to repeat, it would then jump to the frame before the final frame and carry on, skipping out the final frame. ### New Features From a2d395661cda5c7dbaa7feadd629f943fa9ab115 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 4 Sep 2020 15:29:22 +0100 Subject: [PATCH 201/241] `GameObjects.Shape.Grid` would render a white fill even if you passed `undefined` as the fill color in the constructor. It now doesn't render cells if no fill color is given. --- src/gameobjects/shape/grid/Grid.js | 41 +++++++++++++----------------- 1 file changed, 17 insertions(+), 24 deletions(-) diff --git a/src/gameobjects/shape/grid/Grid.js b/src/gameobjects/shape/grid/Grid.js index f4f1cfd5d..9571a598f 100644 --- a/src/gameobjects/shape/grid/Grid.js +++ b/src/gameobjects/shape/grid/Grid.js @@ -14,9 +14,9 @@ var GridRender = require('./GridRender'); * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling * it for input or physics. It provides a quick and easy way for you to render this shape in your * game without using a texture, while still taking advantage of being fully batched in WebGL. - * + * * This shape supports only fill colors and cannot be stroked. - * + * * A Grid Shape allows you to display a grid in your game, where you can control the size of the * grid as well as the width and height of the grid cells. You can set a fill color for each grid * cell as well as an alternate fill color. When the alternate fill color is set then the grid @@ -151,32 +151,25 @@ var Grid = new Class({ this.setPosition(x, y); this.setSize(width, height); - if (fillColor !== undefined) - { - this.setFillStyle(fillColor, fillAlpha); - } - - if (outlineFillColor !== undefined) - { - this.setOutlineStyle(outlineFillColor, outlineFillAlpha); - } + this.setFillStyle(fillColor, fillAlpha); + this.setOutlineStyle(outlineFillColor, outlineFillAlpha); this.updateDisplayOrigin(); }, /** * Sets the fill color and alpha level the grid cells will use when rendering. - * - * If this method is called with no values then the grid cells will not be rendered, + * + * If this method is called with no values then the grid cells will not be rendered, * however the grid lines and alternating cells may still be. - * + * * Also see the `setOutlineStyle` and `setAltFillStyle` methods. - * + * * This call can be chained. * * @method Phaser.GameObjects.Grid#setFillStyle * @since 3.13.0 - * + * * @param {number} [fillColor] - The color the grid cells will be filled with, i.e. 0xff0000 for red. * @param {number} [fillAlpha=1] - The alpha the grid cells will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. * @@ -202,16 +195,16 @@ var Grid = new Class({ /** * Sets the fill color and alpha level that the alternating grid cells will use. - * + * * If this method is called with no values then alternating grid cells will not be rendered in a different color. - * + * * Also see the `setOutlineStyle` and `setFillStyle` methods. - * + * * This call can be chained. * * @method Phaser.GameObjects.Grid#setAltFillStyle * @since 3.13.0 - * + * * @param {number} [fillColor] - The color the alternating grid cells will be filled with, i.e. 0xff0000 for red. * @param {number} [fillAlpha=1] - The alpha the alternating grid cells will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. * @@ -237,17 +230,17 @@ var Grid = new Class({ /** * Sets the fill color and alpha level that the lines between each grid cell will use. - * + * * If this method is called with no values then the grid lines will not be rendered at all, however * the cells themselves may still be if they have colors set. - * + * * Also see the `setFillStyle` and `setAltFillStyle` methods. - * + * * This call can be chained. * * @method Phaser.GameObjects.Grid#setOutlineStyle * @since 3.13.0 - * + * * @param {number} [fillColor] - The color the lines between the grid cells will be filled with, i.e. 0xff0000 for red. * @param {number} [fillAlpha=1] - The alpha the lines between the grid cells will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. * From 9f6572c0b908bd794b1af865839d2bc280aaac4d Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 4 Sep 2020 15:29:26 +0100 Subject: [PATCH 202/241] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 34d3142eb..2b3142804 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -410,6 +410,7 @@ The Animation API has had a significant overhaul to improve playback handling. I * The `Color.HSVToRGB` function has been rewritten to use the HSL and HSV formula from Wikipedia, giving much better results. Fix #5089 (thanks @DiamondeX) * Previously, the `easeParams` array within a Tweens `props` object, or a multi-object tween, were ignored and it was only used if set on the root Tween object. It will now work correctly set at any depth. Fix #4292 (thanks @willblackmore) * When using `Camera.setRenderToTexture` its `zoom` and `rotation` values would be applied twice. Fix #4221 #4924 #4713 (thanks @wayfu @DanMcgraw @pavel-shirobok) +* `GameObjects.Shape.Grid` would render a white fill even if you passed `undefined` as the fill color in the constructor. It now doesn't render cells if no fill color is given. ### Examples, Documentation and TypeScript From af0f207cbb3d7cecbf8fc60881ced5e9a2f904c5 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 4 Sep 2020 17:16:51 +0100 Subject: [PATCH 203/241] Update BuildGameObjectAnimation.js --- src/gameobjects/BuildGameObjectAnimation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gameobjects/BuildGameObjectAnimation.js b/src/gameobjects/BuildGameObjectAnimation.js index 06039d88f..c63bbe937 100644 --- a/src/gameobjects/BuildGameObjectAnimation.js +++ b/src/gameobjects/BuildGameObjectAnimation.js @@ -76,7 +76,7 @@ var BuildGameObjectAnimation = function (sprite, config) } else if (delayedPlay > 0) { - anims.delayedPlay(delayedPlay, playConfig); + anims.playAfterDelay(playConfig, delayedPlay); } else { From b0872c188a8f9c2fe9a79984736d5dbfcf8722da Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 5 Sep 2020 11:12:52 +0100 Subject: [PATCH 204/241] The `Component.Animation.updateFrame` method has now been removed. Everything is handled by `setCurrentFrame` instead, which removes one extra step out of the update process. --- src/animations/Animation.js | 6 +-- src/gameobjects/components/Animation.js | 51 +++++++++---------------- 2 files changed, 21 insertions(+), 36 deletions(-) diff --git a/src/animations/Animation.js b/src/animations/Animation.js index 2c8108952..33d1e84be 100644 --- a/src/animations/Animation.js +++ b/src/animations/Animation.js @@ -662,7 +662,7 @@ var Animation = new Class({ */ updateAndGetNextTick: function (component, frame) { - component.updateFrame(frame); + component.setCurrentFrame(frame); this.getNextTick(component); }, @@ -748,11 +748,11 @@ var Animation = new Class({ if (component.forward) { - component.updateFrame(component.currentFrame.nextFrame); + component.setCurrentFrame(component.currentFrame.nextFrame); } else { - component.updateFrame(component.currentFrame.prevFrame); + component.setCurrentFrame(component.currentFrame.prevFrame); } if (component.isPlaying) diff --git a/src/gameobjects/components/Animation.js b/src/gameobjects/components/Animation.js index f0f11b3fc..5a84bab9c 100644 --- a/src/gameobjects/components/Animation.js +++ b/src/gameobjects/components/Animation.js @@ -607,7 +607,7 @@ var Animation = new Class({ if (atFrame !== undefined) { - this.updateFrame(atFrame); + this.setCurrentFrame(atFrame); } return this.parent; @@ -634,7 +634,7 @@ var Animation = new Class({ if (fromFrame !== undefined) { - this.updateFrame(fromFrame); + this.setCurrentFrame(fromFrame); } return this.parent; @@ -974,7 +974,7 @@ var Animation = new Class({ this.parent.setVisible(true); } - this.updateFrame(this.currentFrame); + this.setCurrentFrame(this.currentFrame); this.hasStarted = true; @@ -1231,8 +1231,7 @@ var Animation = new Class({ this._pendingStopValue = 0; this._paused = false; - // Set frame - this.updateFrame(anim.frames[0]); + this.setCurrentFrame(anim.frames[0]); return this.parent; }, @@ -1482,9 +1481,15 @@ var Animation = new Class({ * and applies it to the parent Game Object, adjusting size and origin as needed. * * @method Phaser.GameObjects.Components.Animation#setCurrentFrame + * @fires Phaser.Animations.Events#ANIMATION_UPDATE + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_STOP + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_STOP * @since 3.4.0 * - * @param {Phaser.Animations.AnimationFrame} animationFrame - The Animation Frame to set as being current. + * @param {Phaser.Animations.AnimationFrame} animationFrame - The animation frame to change to. * * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. */ @@ -1502,6 +1507,11 @@ var Animation = new Class({ gameObject.frame.updateCropUVs(gameObject._crop, gameObject.flipX, gameObject.flipY); } + if (animationFrame.setAlpha) + { + gameObject.alpha = animationFrame.alpha; + } + gameObject.setSizeToFrame(); if (gameObject._originComponent) @@ -1516,35 +1526,8 @@ var Animation = new Class({ } } - return gameObject; - }, - - /** - * Internal frame change handler. - * - * @method Phaser.GameObjects.Components.Animation#updateFrame - * @fires Phaser.Animations.Events#ANIMATION_UPDATE - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE - * @fires Phaser.Animations.Events#ANIMATION_STOP - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_STOP - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_STOP - * @private - * @since 3.0.0 - * - * @param {Phaser.Animations.AnimationFrame} animationFrame - The animation frame to change to. - */ - updateFrame: function (animationFrame) - { - var gameObject = this.setCurrentFrame(animationFrame); - if (this.isPlaying) { - if (animationFrame.setAlpha) - { - gameObject.alpha = animationFrame.alpha; - } - this.emitEvents(Events.ANIMATION_UPDATE, Events.SPRITE_ANIMATION_KEY_UPDATE, Events.SPRITE_ANIMATION_UPDATE); if (this._pendingStop === 3 && this._pendingStopValue === animationFrame) @@ -1552,6 +1535,8 @@ var Animation = new Class({ this.stop(); } } + + return gameObject; }, /** From ebfd211d607864bad6d9bfd3732e4357534a0a25 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 5 Sep 2020 11:12:56 +0100 Subject: [PATCH 205/241] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b3142804..24d282432 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -302,6 +302,7 @@ The Animation API has had a significant overhaul to improve playback handling. I * The `Component.Animation.getYoyo` method has now been removed. You can read the value using the `yoyo` property. * The `stopAfterRepeat` method now has an optional parameter `repeatCount`, so you can tell the animation to stop after a specified number of repeats, not just 1. * When playing an animation in reverse, if it reached the first frame and had to repeat, it would then jump to the frame before the final frame and carry on, skipping out the final frame. +* The `Component.Animation.updateFrame` method has now been removed. Everything is handled by `setCurrentFrame` instead, which removes one extra step out of the update process. ### New Features From 2cabbbd5047830918f6910869613b551e13d51d8 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 5 Sep 2020 11:45:00 +0100 Subject: [PATCH 206/241] Renamed to `AnimationState` for clarity. --- .../{Animation.js => AnimationState.js} | 168 +++++++++--------- src/gameobjects/components/index.js | 2 +- src/gameobjects/sprite/Sprite.js | 10 +- 3 files changed, 95 insertions(+), 85 deletions(-) rename src/gameobjects/components/{Animation.js => AnimationState.js} (89%) diff --git a/src/gameobjects/components/Animation.js b/src/gameobjects/components/AnimationState.js similarity index 89% rename from src/gameobjects/components/Animation.js rename to src/gameobjects/components/AnimationState.js index 5a84bab9c..075ee3175 100644 --- a/src/gameobjects/components/Animation.js +++ b/src/gameobjects/components/AnimationState.js @@ -8,38 +8,44 @@ var Class = require('../../utils/Class'); var CustomMap = require('../../structs/Map'); var GetFastValue = require('../../utils/object/GetFastValue'); var Events = require('../../animations/events'); -var AnimationClass = require('../../animations/Animation'); +var Animation = require('../../animations/Animation'); /** * @classdesc - * The Game Object Animation Component. + * The Animation State Component. + * + * This component provides features to apply animations to Game Objects. It is responsible for + * loading, queuing animations for later playback, mixing between animations and setting + * the current animation frame to the Game Object that owns this component. * * This component lives as an instance within any Game Object that has it defined, such as Sprites. * - * You can access its properties and methods via `anims`, i.e. `Sprite.anims`. + * You can access its properties and methods via the `anims` property, i.e. `Sprite.anims`. * - * This component handles the loading of animations from the Animation Manager into the Game Object, - * the playback of them and all related events. + * As well as playing animations stored in the global Animation Manager, this component + * can also create animations that are stored locally within it. See the `create method + * for more details. * - * To create animations, please see the Animation Manager class instead. + * Prior to Phaser 3.50 this component was called just `Animation`. It was renamed to + * `AnimationState` in 3.50 to help better separate it from the `Animation` class. * - * @class Animation + * @class AnimationState * @memberof Phaser.GameObjects.Components * @constructor * @since 3.0.0 * * @param {Phaser.GameObjects.GameObject} parent - The Game Object to which this animation component belongs. */ -var Animation = new Class({ +var AnimationState = new Class({ initialize: - function Animation (parent) + function AnimationState (parent) { /** * The Game Object to which this animation component belongs. * - * @name Phaser.GameObjects.Components.Animation#parent + * @name Phaser.GameObjects.Components.AnimationState#parent * @type {Phaser.GameObjects.GameObject} * @since 3.0.0 */ @@ -48,7 +54,7 @@ var Animation = new Class({ /** * A reference to the global Animation Manager. * - * @name Phaser.GameObjects.Components.Animation#animationManager + * @name Phaser.GameObjects.Components.AnimationState#animationManager * @type {Phaser.Animations.AnimationManager} * @since 3.0.0 */ @@ -59,7 +65,7 @@ var Animation = new Class({ /** * A reference to the Texture Manager. * - * @name Phaser.GameObjects.Components.Animation#textureManager + * @name Phaser.GameObjects.Components.AnimationState#textureManager * @type {Phaser.Textures.TextureManager} * @protected * @since 3.50.0 @@ -72,7 +78,7 @@ var Animation = new Class({ * Do not modify the contents of this Map directly, instead use the * `add`, `create` and `remove` methods of this class instead. * - * @name Phaser.GameObjects.Components.Animation#anims + * @name Phaser.GameObjects.Components.AnimationState#anims * @type {Phaser.Structs.Map.} * @protected * @since 3.50.0 @@ -82,7 +88,7 @@ var Animation = new Class({ /** * Is an animation currently playing or not? * - * @name Phaser.GameObjects.Components.Animation#isPlaying + * @name Phaser.GameObjects.Components.AnimationState#isPlaying * @type {boolean} * @default false * @since 3.0.0 @@ -92,7 +98,7 @@ var Animation = new Class({ /** * Has the current animation started playing, or is it waiting for a delay to expire? * - * @name Phaser.GameObjects.Components.Animation#hasStarted + * @name Phaser.GameObjects.Components.AnimationState#hasStarted * @type {boolean} * @default false * @since 3.50.0 @@ -104,7 +110,7 @@ var Animation = new Class({ * * Will by `null` if no animation is yet loaded. * - * @name Phaser.GameObjects.Components.Animation#currentAnim + * @name Phaser.GameObjects.Components.AnimationState#currentAnim * @type {?Phaser.Animations.Animation} * @default null * @since 3.0.0 @@ -116,7 +122,7 @@ var Animation = new Class({ * * Will by `null` if no animation is yet loaded. * - * @name Phaser.GameObjects.Components.Animation#currentFrame + * @name Phaser.GameObjects.Components.AnimationState#currentFrame * @type {?Phaser.Animations.AnimationFrame} * @default null * @since 3.0.0 @@ -129,7 +135,7 @@ var Animation = new Class({ * * Will by `null` if no animation has been queued. * - * @name Phaser.GameObjects.Components.Animation#nextAnim + * @name Phaser.GameObjects.Components.AnimationState#nextAnim * @type {?(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} * @default null * @since 3.16.0 @@ -141,7 +147,7 @@ var Animation = new Class({ * * Populate this queue via the `chain` method. * - * @name Phaser.GameObjects.Components.Animation#nextAnimsQueue + * @name Phaser.GameObjects.Components.AnimationState#nextAnimsQueue * @type {array} * @since 3.24.0 */ @@ -158,7 +164,7 @@ var Animation = new Class({ * * Prior to Phaser 3.50 this property was private and called `_timeScale`. * - * @name Phaser.GameObjects.Components.Animation#timeScale + * @name Phaser.GameObjects.Components.AnimationState#timeScale * @type {number} * @default 1 * @since 3.50.0 @@ -172,7 +178,7 @@ var Animation = new Class({ * be treated as read-only, as changing it once playback has started will not alter * the animation. To change the frame rate, provide a new value in the `PlayAnimationConfig` object. * - * @name Phaser.GameObjects.Components.Animation#frameRate + * @name Phaser.GameObjects.Components.AnimationState#frameRate * @type {number} * @default 0 * @since 3.0.0 @@ -186,7 +192,7 @@ var Animation = new Class({ * be treated as read-only, as changing it once playback has started will not alter * the animation. To change the duration, provide a new value in the `PlayAnimationConfig` object. * - * @name Phaser.GameObjects.Components.Animation#duration + * @name Phaser.GameObjects.Components.AnimationState#duration * @type {number} * @default 0 * @since 3.0.0 @@ -200,7 +206,7 @@ var Animation = new Class({ * This value is calculated when a new animation is loaded into this component and should * be treated as read-only. Changing it will not alter playback speed. * - * @name Phaser.GameObjects.Components.Animation#msPerFrame + * @name Phaser.GameObjects.Components.AnimationState#msPerFrame * @type {number} * @default 0 * @since 3.0.0 @@ -210,7 +216,7 @@ var Animation = new Class({ /** * Skip frames if the time lags, or always advanced anyway? * - * @name Phaser.GameObjects.Components.Animation#skipMissedFrames + * @name Phaser.GameObjects.Components.AnimationState#skipMissedFrames * @type {boolean} * @default true * @since 3.0.0 @@ -226,7 +232,7 @@ var Animation = new Class({ * * Prior to Phaser 3.50 this property was private and called `_delay`. * - * @name Phaser.GameObjects.Components.Animation#delay + * @name Phaser.GameObjects.Components.AnimationState#delay * @type {number} * @default 0 * @since 3.50.0 @@ -244,7 +250,7 @@ var Animation = new Class({ * * Prior to Phaser 3.50 this property was private and called `_repeat`. * - * @name Phaser.GameObjects.Components.Animation#repeat + * @name Phaser.GameObjects.Components.AnimationState#repeat * @type {number} * @default 0 * @since 3.50.0 @@ -261,7 +267,7 @@ var Animation = new Class({ * * Prior to Phaser 3.50 this property was private and called `_repeatDelay`. * - * @name Phaser.GameObjects.Components.Animation#repeatDelay + * @name Phaser.GameObjects.Components.AnimationState#repeatDelay * @type {number} * @default 0 * @since 3.0.0 @@ -280,7 +286,7 @@ var Animation = new Class({ * * Prior to Phaser 3.50 this property was private and called `_yoyo`. * - * @name Phaser.GameObjects.Components.Animation#yoyo + * @name Phaser.GameObjects.Components.AnimationState#yoyo * @type {boolean} * @default false * @since 3.50.0 @@ -295,7 +301,7 @@ var Animation = new Class({ * This value is set when a new animation is loaded into this component, but can also be modified * at run-time, assuming the animation is currently delayed. * - * @name Phaser.GameObjects.Components.Animation#showOnStart + * @name Phaser.GameObjects.Components.AnimationState#showOnStart * @type {boolean} * @since 3.50.0 */ @@ -307,7 +313,7 @@ var Animation = new Class({ * This value is set when a new animation is loaded into this component, but can also be modified * at run-time, assuming the animation is still actively playing. * - * @name Phaser.GameObjects.Components.Animation#hideOnComplete + * @name Phaser.GameObjects.Components.AnimationState#hideOnComplete * @type {boolean} * @since 3.50.0 */ @@ -316,7 +322,7 @@ var Animation = new Class({ /** * Is the playhead moving forwards (`true`) or in reverse (`false`) ? * - * @name Phaser.GameObjects.Components.Animation#forward + * @name Phaser.GameObjects.Components.AnimationState#forward * @type {boolean} * @default true * @since 3.0.0 @@ -330,7 +336,7 @@ var Animation = new Class({ * * Prior to Phaser 3.50 this property was private and called `_reverse`. * - * @name Phaser.GameObjects.Components.Animation#inReverse + * @name Phaser.GameObjects.Components.AnimationState#inReverse * @type {boolean} * @default false * @since 3.50.0 @@ -342,7 +348,7 @@ var Animation = new Class({ * * This has the `delta` time added to it as part of the `update` step. * - * @name Phaser.GameObjects.Components.Animation#accumulator + * @name Phaser.GameObjects.Components.AnimationState#accumulator * @type {number} * @default 0 * @since 3.0.0 @@ -354,7 +360,7 @@ var Animation = new Class({ * * This value is compared against the `accumulator` as part of the `update` step. * - * @name Phaser.GameObjects.Components.Animation#nextTick + * @name Phaser.GameObjects.Components.AnimationState#nextTick * @type {number} * @default 0 * @since 3.0.0 @@ -364,10 +370,10 @@ var Animation = new Class({ /** * A counter keeping track of how much delay time, in milliseconds, is left before playback begins. * - * This is set via the `delayedPlay` method, although it can be modified at run-time + * This is set via the `playAfterDelay` method, although it can be modified at run-time * if required, as long as the animation has not already started playing. * - * @name Phaser.GameObjects.Components.Animation#delayCounter + * @name Phaser.GameObjects.Components.AnimationState#delayCounter * @type {number} * @default 0 * @since 3.50.0 @@ -380,7 +386,7 @@ var Animation = new Class({ * This value is set when a new animation is loaded into this component, but can also be modified * at run-time. * - * @name Phaser.GameObjects.Components.Animation#repeatCounter + * @name Phaser.GameObjects.Components.AnimationState#repeatCounter * @type {number} * @default 0 * @since 3.0.0 @@ -390,7 +396,7 @@ var Animation = new Class({ /** * An internal flag keeping track of pending repeats. * - * @name Phaser.GameObjects.Components.Animation#pendingRepeat + * @name Phaser.GameObjects.Components.AnimationState#pendingRepeat * @type {boolean} * @default false * @since 3.0.0 @@ -400,7 +406,7 @@ var Animation = new Class({ /** * Is the Animation paused? * - * @name Phaser.GameObjects.Components.Animation#_paused + * @name Phaser.GameObjects.Components.AnimationState#_paused * @type {boolean} * @private * @default false @@ -411,7 +417,7 @@ var Animation = new Class({ /** * Was the animation previously playing before being paused? * - * @name Phaser.GameObjects.Components.Animation#_wasPlaying + * @name Phaser.GameObjects.Components.AnimationState#_wasPlaying * @type {boolean} * @private * @default false @@ -427,7 +433,7 @@ var Animation = new Class({ * 2 = Waiting for repeat * 3 = Waiting for specific frame * - * @name Phaser.GameObjects.Components.Animation#_pendingStop + * @name Phaser.GameObjects.Components.AnimationState#_pendingStop * @type {integer} * @private * @since 3.4.0 @@ -437,7 +443,7 @@ var Animation = new Class({ /** * Internal property used by _pendingStop. * - * @name Phaser.GameObjects.Components.Animation#_pendingStopValue + * @name Phaser.GameObjects.Components.AnimationState#_pendingStopValue * @type {any} * @private * @since 3.4.0 @@ -459,7 +465,7 @@ var Animation = new Class({ * * Call this method with no arguments to reset all currently chained animations. * - * @method Phaser.GameObjects.Components.Animation#chain + * @method Phaser.GameObjects.Components.AnimationState#chain * @since 3.16.0 * * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig|string[]|Phaser.Animations.Animation[]|Phaser.Types.Animations.PlayAnimationConfig[])} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object, or an array of them. @@ -505,7 +511,7 @@ var Animation = new Class({ * * Prior to Phaser 3.50 this method was called `getCurrentKey`. * - * @method Phaser.GameObjects.Components.Animation#getName + * @method Phaser.GameObjects.Components.AnimationState#getName * @since 3.50.0 * * @return {string} The key of the Animation currently loaded into this component, or an empty string if none loaded. @@ -518,7 +524,7 @@ var Animation = new Class({ /** * Internal method used to load an animation into this component. * - * @method Phaser.GameObjects.Components.Animation#load + * @method Phaser.GameObjects.Components.AnimationState#load * @protected * @since 3.0.0 * @@ -589,7 +595,7 @@ var Animation = new Class({ * Pause the current animation and set the `isPlaying` property to `false`. * You can optionally pause it at a specific frame. * - * @method Phaser.GameObjects.Components.Animation#pause + * @method Phaser.GameObjects.Components.AnimationState#pause * @since 3.0.0 * * @param {Phaser.Animations.AnimationFrame} [atFrame] - An optional frame to set after pausing the animation. @@ -617,7 +623,7 @@ var Animation = new Class({ * Resumes playback of a paused animation and sets the `isPlaying` property to `true`. * You can optionally tell it to start playback from a specific frame. * - * @method Phaser.GameObjects.Components.Animation#resume + * @method Phaser.GameObjects.Components.AnimationState#resume * @since 3.0.0 * * @param {Phaser.Animations.AnimationFrame} [fromFrame] - An optional frame to set before restarting playback. @@ -652,7 +658,7 @@ var Animation = new Class({ * * Prior to Phaser 3.50 this method was called 'delayedPlay'. * - * @method Phaser.GameObjects.Components.Animation#playAfterDelay + * @method Phaser.GameObjects.Components.AnimationState#playAfterDelay * @fires Phaser.Animations.Events#ANIMATION_START * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START @@ -700,7 +706,7 @@ var Animation = new Class({ * * If no animation is currently running, the given one will start immediately. * - * @method Phaser.GameObjects.Components.Animation#playAfterRepeat + * @method Phaser.GameObjects.Components.AnimationState#playAfterRepeat * @fires Phaser.Animations.Events#ANIMATION_START * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START @@ -795,7 +801,7 @@ var Animation = new Class({ * * Also, see the documentation in the Animation Manager for further details on creating animations. * - * @method Phaser.GameObjects.Components.Animation#play + * @method Phaser.GameObjects.Components.AnimationState#play * @fires Phaser.Animations.Events#ANIMATION_START * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START @@ -878,7 +884,7 @@ var Animation = new Class({ * * Also, see the documentation in the Animation Manager for further details on creating animations. * - * @method Phaser.GameObjects.Components.Animation#playReverse + * @method Phaser.GameObjects.Components.AnimationState#playReverse * @fires Phaser.Animations.Events#ANIMATION_START * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START @@ -914,7 +920,7 @@ var Animation = new Class({ * Load the animation based on the key and set-up all of the internal values * needed for playback to start. If there is no delay, it will also fire the start events. * - * @method Phaser.GameObjects.Components.Animation#startAnimation + * @method Phaser.GameObjects.Components.AnimationState#startAnimation * @fires Phaser.Animations.Events#ANIMATION_START * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START @@ -963,7 +969,7 @@ var Animation = new Class({ /** * Handles the start of an animation playback. * - * @method Phaser.GameObjects.Components.Animation#handleStart + * @method Phaser.GameObjects.Components.AnimationState#handleStart * @private * @since 3.50.0 */ @@ -984,7 +990,7 @@ var Animation = new Class({ /** * Handles the repeat of an animation. * - * @method Phaser.GameObjects.Components.Animation#handleRepeat + * @method Phaser.GameObjects.Components.AnimationState#handleRepeat * @private * @since 3.50.0 */ @@ -998,7 +1004,7 @@ var Animation = new Class({ /** * Handles the stop of an animation playback. * - * @method Phaser.GameObjects.Components.Animation#handleStop + * @method Phaser.GameObjects.Components.AnimationState#handleStop * @private * @since 3.50.0 */ @@ -1014,7 +1020,7 @@ var Animation = new Class({ /** * Handles the completion of an animation playback. * - * @method Phaser.GameObjects.Components.Animation#handleComplete + * @method Phaser.GameObjects.Components.AnimationState#handleComplete * @private * @since 3.50.0 */ @@ -1035,7 +1041,7 @@ var Animation = new Class({ /** * Fires the given animation events. * - * @method Phaser.GameObjects.Components.Animation#emitEvents + * @method Phaser.GameObjects.Components.AnimationState#emitEvents * @private * @since 3.50.0 * @@ -1058,7 +1064,7 @@ var Animation = new Class({ /** * Reverse the Animation that is already playing on the Game Object. * - * @method Phaser.GameObjects.Components.Animation#reverse + * @method Phaser.GameObjects.Components.AnimationState#reverse * @since 3.12.0 * * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. @@ -1081,7 +1087,7 @@ var Animation = new Class({ * The value is based on the current frame and how far that is in the animation, it is not based on * the duration of the animation. * - * @method Phaser.GameObjects.Components.Animation#getProgress + * @method Phaser.GameObjects.Components.AnimationState#getProgress * @since 3.4.0 * * @return {number} The progress of the current animation in frames, between 0 and 1. @@ -1113,7 +1119,7 @@ var Animation = new Class({ * The value is based on the current frame and how far that is in the animation, it is not based on * the duration of the animation. * - * @method Phaser.GameObjects.Components.Animation#setProgress + * @method Phaser.GameObjects.Components.AnimationState#setProgress * @since 3.4.0 * * @param {number} [value=0] - The progress value, between 0 and 1. @@ -1143,7 +1149,7 @@ var Animation = new Class({ * value specified here will be overwritten when the next animation loads in. To avoid this, * use the `repeat` property of the `PlayAnimationConfig` object instead. * - * @method Phaser.GameObjects.Components.Animation#setRepeat + * @method Phaser.GameObjects.Components.AnimationState#setRepeat * @since 3.4.0 * * @param {integer} value - The number of times that the animation should repeat. @@ -1160,7 +1166,7 @@ var Animation = new Class({ /** * Handle the removal of an animation from the Animation Manager. * - * @method Phaser.GameObjects.Components.Animation#globalRemove + * @method Phaser.GameObjects.Components.AnimationState#globalRemove * @since 3.50.0 * * @param {string} [key] - The key of the removed Animation. @@ -1188,7 +1194,7 @@ var Animation = new Class({ * If you `includeDelay` then it will also fire the `ANIMATION_START` series of events once * the delay has expired, otherwise, playback will just begin immediately. * - * @method Phaser.GameObjects.Components.Animation#restart + * @method Phaser.GameObjects.Components.AnimationState#restart * @fires Phaser.Animations.Events#ANIMATION_RESTART * @fires Phaser.Animations.Events#SPRITE_ANIMATION_RESTART * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART @@ -1245,7 +1251,7 @@ var Animation = new Class({ * * If another animation has been queued for playback, it will be started after the events fire. * - * @method Phaser.GameObjects.Components.Animation#complete + * @method Phaser.GameObjects.Components.AnimationState#complete * @fires Phaser.Animations.Events#ANIMATION_COMPLETE * @fires Phaser.Animations.Events#SPRITE_ANIMATION_COMPLETE * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_COMPLETE @@ -1283,7 +1289,7 @@ var Animation = new Class({ * * If there is another animation in the queue (set via the `chain` method) then it will start playing. * - * @method Phaser.GameObjects.Components.Animation#stop + * @method Phaser.GameObjects.Components.AnimationState#stop * @fires Phaser.Animations.Events#ANIMATION_STOP * @fires Phaser.Animations.Events#SPRITE_ANIMATION_STOP * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_STOP @@ -1324,7 +1330,7 @@ var Animation = new Class({ * If there is another animation in the queue (set via the `chain` method) then it will start playing, * when the current one stops. * - * @method Phaser.GameObjects.Components.Animation#stopAfterDelay + * @method Phaser.GameObjects.Components.AnimationState#stopAfterDelay * @fires Phaser.Animations.Events#ANIMATION_STOP * @fires Phaser.Animations.Events#SPRITE_ANIMATION_STOP * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_STOP @@ -1354,7 +1360,7 @@ var Animation = new Class({ * * Prior to Phaser 3.50 this method was called `stopOnRepeat` and had no parameters. * - * @method Phaser.GameObjects.Components.Animation#stopAfterRepeat + * @method Phaser.GameObjects.Components.AnimationState#stopAfterRepeat * @fires Phaser.Animations.Events#ANIMATION_STOP * @fires Phaser.Animations.Events#SPRITE_ANIMATION_STOP * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_STOP @@ -1390,7 +1396,7 @@ var Animation = new Class({ * If there is another animation in the queue (set via the `chain` method) then it will start playing, * when the current one stops. * - * @method Phaser.GameObjects.Components.Animation#stopOnFrame + * @method Phaser.GameObjects.Components.AnimationState#stopOnFrame * @fires Phaser.Animations.Events#ANIMATION_STOP * @fires Phaser.Animations.Events#SPRITE_ANIMATION_STOP * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_STOP @@ -1412,7 +1418,7 @@ var Animation = new Class({ * Returns the total number of frames in this animation, or returns zero if no * animation has been loaded. * - * @method Phaser.GameObjects.Components.Animation#getTotalFrames + * @method Phaser.GameObjects.Components.AnimationState#getTotalFrames * @since 3.4.0 * * @return {integer} The total number of frames in the current animation, or zero if no animation has been loaded. @@ -1427,7 +1433,7 @@ var Animation = new Class({ * * This is called automatically by the `Sprite.preUpdate` method. * - * @method Phaser.GameObjects.Components.Animation#update + * @method Phaser.GameObjects.Components.AnimationState#update * @since 3.0.0 * * @param {number} time - The current timestamp. @@ -1480,7 +1486,7 @@ var Animation = new Class({ * Sets the given Animation Frame as being the current frame * and applies it to the parent Game Object, adjusting size and origin as needed. * - * @method Phaser.GameObjects.Components.Animation#setCurrentFrame + * @method Phaser.GameObjects.Components.AnimationState#setCurrentFrame * @fires Phaser.Animations.Events#ANIMATION_UPDATE * @fires Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE @@ -1546,7 +1552,7 @@ var Animation = new Class({ * Calling this does not change the direction of the animation. I.e. if it was currently * playing in reverse, calling this method doesn't then change the direction to forwards. * - * @method Phaser.GameObjects.Components.Animation#nextFrame + * @method Phaser.GameObjects.Components.AnimationState#nextFrame * @since 3.16.0 * * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. @@ -1568,7 +1574,7 @@ var Animation = new Class({ * Calling this does not change the direction of the animation. I.e. if it was currently * playing in forwards, calling this method doesn't then change the direction to backwards. * - * @method Phaser.GameObjects.Components.Animation#previousFrame + * @method Phaser.GameObjects.Components.AnimationState#previousFrame * @since 3.16.0 * * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. @@ -1588,7 +1594,7 @@ var Animation = new Class({ * * See the `create` method for more details. * - * @method Phaser.GameObjects.Components.Animation#get + * @method Phaser.GameObjects.Components.AnimationState#get * @since 3.50.0 * * @param {string} key - The key of the Animation to retrieve. @@ -1603,7 +1609,7 @@ var Animation = new Class({ /** * Checks to see if the given key is already used locally within the animations stored on this Sprite. * - * @method Phaser.GameObjects.Components.Animation#exists + * @method Phaser.GameObjects.Components.AnimationState#exists * @since 3.50.0 * * @param {string} key - The key of the Animation to check. @@ -1632,7 +1638,7 @@ var Animation = new Class({ * * If you wish to re-use an existing key, call the `remove` method first, then this method. * - * @method Phaser.GameObjects.Components.Animation#create + * @method Phaser.GameObjects.Components.AnimationState#create * @since 3.50.0 * * @param {Phaser.Types.Animations.Animation} config - The configuration settings for the Animation. @@ -1651,7 +1657,7 @@ var Animation = new Class({ if (!anim) { - anim = new AnimationClass(this, key, config); + anim = new Animation(this, key, config); if (!this.anims) { @@ -1670,7 +1676,7 @@ var Animation = new Class({ * * Once an Animation has been removed, this Sprite cannot play it again without re-creating it. * - * @method Phaser.GameObjects.Components.Animation#remove + * @method Phaser.GameObjects.Components.AnimationState#remove * @since 3.50.0 * * @param {string} key - The key of the animation to remove. @@ -1699,7 +1705,7 @@ var Animation = new Class({ * * Unregisters event listeners and cleans up its references. * - * @method Phaser.GameObjects.Components.Animation#destroy + * @method Phaser.GameObjects.Components.AnimationState#destroy * @since 3.0.0 */ destroy: function () @@ -1723,7 +1729,7 @@ var Animation = new Class({ /** * `true` if the current animation is paused, otherwise `false`. * - * @name Phaser.GameObjects.Components.Animation#isPaused + * @name Phaser.GameObjects.Components.AnimationState#isPaused * @readonly * @type {boolean} * @since 3.4.0 @@ -1739,4 +1745,4 @@ var Animation = new Class({ }); -module.exports = Animation; +module.exports = AnimationState; diff --git a/src/gameobjects/components/index.js b/src/gameobjects/components/index.js index 1a04d2eee..29ec02ec8 100644 --- a/src/gameobjects/components/index.js +++ b/src/gameobjects/components/index.js @@ -12,7 +12,7 @@ module.exports = { Alpha: require('./Alpha'), AlphaSingle: require('./AlphaSingle'), - Animation: require('./Animation'), + AnimationState: require('./AnimationState'), BlendMode: require('./BlendMode'), ComputedSize: require('./ComputedSize'), Crop: require('./Crop'), diff --git a/src/gameobjects/sprite/Sprite.js b/src/gameobjects/sprite/Sprite.js index 0642f1ea2..66e7a95a5 100644 --- a/src/gameobjects/sprite/Sprite.js +++ b/src/gameobjects/sprite/Sprite.js @@ -88,13 +88,17 @@ var Sprite = new Class({ this._crop = this.resetCropObject(); /** - * The Animation Controller of this Sprite. + * The Animation State component of this Sprite. + * + * This component provides features to apply animations to this Sprite. + * It is responsible for playing, loading, queuing animations for later playback, + * mixing between animations and setting the current animation frame to this Sprite. * * @name Phaser.GameObjects.Sprite#anims - * @type {Phaser.GameObjects.Components.Animation} + * @type {Phaser.GameObjects.Components.AnimationState} * @since 3.0.0 */ - this.anims = new Components.Animation(this); + this.anims = new Components.AnimationState(this); this.setTexture(texture, frame); this.setPosition(x, y); From 4d74e74a313eec10cd8e391106debf83a06521ce Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 5 Sep 2020 11:45:04 +0100 Subject: [PATCH 207/241] Update CHANGELOG.md --- CHANGELOG.md | 123 ++++++++++++++++++++++++++------------------------- 1 file changed, 62 insertions(+), 61 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24d282432..4d70d156e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -218,28 +218,29 @@ If you use Animations in your game, please read the following important API chan The Animation API has had a significant overhaul to improve playback handling. Instead of just playing an animation based on its global key, you can now supply a new `PlayAnimationConfig` object instead, which allows you to override any of the default animation settings, such as `duration`, `delay` and `yoyo` (see below for the full list). This means you no longer have to create lots of duplicate animations, just to change properties such as `duration`, and can now set them dynamically at run-time as well. -* `Component.Animation.create` is a new method that allows you to create animations directly on a Sprite. These are not global and never enter the Animation Manager, instead risiding within the Sprite itself. This allows you to use the same keys across both local and global animations and set-up Sprite specific local animations. +* The Game Object `Component.Animation` component has been renamed to `AnimationState` to help separate it from the same-named Animation class that also exists. +* The `play`, `playReverse`, `playAfterDelay`, `playAfterRepeat` and `chain` Sprite and Animation Component methods can now all take a `Phaser.Types.Animations.PlayAnimationConfig` configuration object, as well as a string, as the `key` parameter. This allows you to override any default animation setting with those defined in the config, giving you far greater control over animations on a Game Object level, without needing to globally duplicate them. +* `AnimationState.create` is a new method that allows you to create animations directly on a Sprite. These are not global and never enter the Animation Manager, instead risiding within the Sprite itself. This allows you to use the same keys across both local and global animations and set-up Sprite specific local animations. * All playback methods: `play`, `playReverse`, `playAfterDelay` and `playAfterRepeat` will now check to see if the given animation key exists locally on the Sprite first. If it does, it's used, otherwise it then checks the global Animation Manager for the key instead. -* `Component.Animation.remove` is a new method that will remove a locally stored Animation instance from a Sprite. -* `Component.Animation.get` is a new method that will return a locally stored Animation instance from the Sprite. -* `Component.Animation.exists` is a new method that will check if a locally stored Animation exists on the Sprite. -* The internal `Component.Animation.remove` method has been renamed to `globalRemove`. -* `Component.Animation.textureManager` is a new property that references the global Texture Manager. -* `Component.Animation.anims` is a new property that contains locally created Animations in a Custom Map. -* `play` no longer accepts a `startFrame` parameter. Please set it via the `PlayAnimationConfig` instead. -* `playReverse` no longer accepts a `startFrame` parameter. Please set it via the `PlayAnimationConfig` instead. -* The `delayedPlay` method has been renamed. Please now use `playAfterDelay` instead. -* The `stopOnRepeat` method has been renamed. Please now use `stopAfterRepeat` instead. -* The `Component.Animation.getCurrentKey` method has been renamed. Please now use `getName` instead. -* `playAfterDelay` is a new method that will play the given animation after the delay expires. It is available on the Sprite and the Animation Component. -* `playAfterRepeat` is a new method that will play the given animation after the current animation finishes repeating. It is available on the Sprite and the Animation Component. -* The `chain` method is now available on the Sprite class. -* The `stopAfterDelay` method is now available on the Sprite class. -* The `stopAfterRepeat` method is now available on the Sprite class. -* The `stopOnFrame` method is now available on the Sprite class. +* `AnimationState.remove` is a new method that will remove a locally stored Animation instance from a Sprite. +* `AnimationState.get` is a new method that will return a locally stored Animation instance from the Sprite. +* `AnimationState.exists` is a new method that will check if a locally stored Animation exists on the Sprite. +* The internal `AnimationState.remove` method has been renamed to `globalRemove`. +* `AnimationState.textureManager` is a new property that references the global Texture Manager. +* `AnimationState.anims` is a new property that contains locally created Animations in a Custom Map. +* `AnimationState.play` and `Sprite.play` no longer accept a `startFrame` parameter. Please set it via the `PlayAnimationConfig` instead. +* `AnimationState.playReverse` and `Sprite.playReverse` no longer accept a `startFrame` parameter. Please set it via the `PlayAnimationConfig` instead. +* The `AnimationState.delayedPlay` method has been renamed to `playAfterDelay`. The parameter order has also changed, so the key now comes first instead of the duration. +* The `AnimationState.stopOnRepeat` method has been renamed to `stopAfterRepeat` +* The `AnimationState.getCurrentKey` method has been renamed to `getName`. +* `AnimationState.playAfterDelay` and `Sprite.playAfterDelay` are new methods that will play the given animation after the delay in ms expires. +* `AnimationState.playAfterRepeat` and `Sprite.playAfterRepeat` are new methods that will play the given animation after the current animation finishes repeating. You can also specify the number of repeats allowed left to run. +* The `AnimationState.chain` method is now available on the Sprite class. +* The `AnimationState.stopAfterDelay` method is now available on the Sprite class. +* The `AnimationState.stopAfterRepeat` method is now available on the Sprite class. +* The `AnimationState.stopOnFrame` method is now available on the Sprite class. * `AnimationManager.createFromAseprite` is a new method that allows you to use animations created in the Aseprite editor directly in Phaser. Please see the comprehensive documentation for this method for full details on how to do this. -* The `play`, `playReverse`, `playAfterDelay`, `playAfterRepeat` and `chain` Sprite and Animation Component methods can now all take a `Phaser.Types.Animations.PlayAnimationConfig` configuration object, instead of a string, as the `key` parameter. This allows you to override any default animation setting with those defined in the config, giving you far greater control over animations on a Game Object level, without needing to globally duplicate them. -* The `Component.Animation` now handles all of the loading of the animation. It no longer has to make calls out to the Animation Manager or Animation itself and will load the animation data directly, replacing as required from the optional `PlayAnimationConfig`. This improves performance and reduces CPU calls in animation heavy games. +* `AnimationState` now handles all of the loading of the animation. It no longer has to make calls out to the Animation Manager or Animation instance itself and will load the animation data directly, replacing as required from the optional `PlayAnimationConfig`. This improves performance and massively reduces CPU calls in animation heavy games. * The `PlayAnimationConfig.frameRate` property lets you optionally override the animation frame rate. * The `PlayAnimationConfig.duration` property lets you optionally override the animation duration. * The `PlayAnimationConfig.delay` property lets you optionally override the animation delay. @@ -250,59 +251,59 @@ The Animation API has had a significant overhaul to improve playback handling. I * The `PlayAnimationConfig.hideOnComplete` property lets you optionally override the animation hide on complete value. * The `PlayAnimationConfig.startFrame` property lets you optionally set the animation frame to start on. * The `PlayAnimationConfig.timeScale` property lets you optionally set the animation time scale factor. -* `Components.Animation.delayCounter` is a new property that allows you to control the delay before an animation will start playing. Only once this delay has expired, will the animation `START` events fire. Fix #4426 (thanks @bdaenen) -* `Components.Animation.hasStarted` is a new boolean property that allows you to tell if the current animation has started playing, or is still waiting for a delay to expire. -* `Components.Animation.showOnStart` is a new boolean property that controls if the Game Object should have `setVisible(true)` called on it when the animation starts. -* `Components.Animation.hideOnComplete` is a new boolean property that controls if the Game Object should have `setVisible(false)` called on it when the animation completes. -* The `Components.Animation.chain` method docs said it would remove all pending animations if called with no parameters. However, it didn't - and now does! -* The `Components.Animation.setDelay` method has been removed. It never actually worked and you can now perform the same thing by calling either `delayedPlay` or setting the `delay` property in the play config. -* The `Components.Animation.getDelay` method has been removed. It never actually worked and you can now perform the same thing by calling either `delayedPlay` or setting the `delay` property in the play config. -* The `Components.Animation.setRepeat` method has been removed. You can achieve the same thing by setting the `repeat` property in the play config, or adjusting the public `repeatCounter` property if the animation has started. -* `Components.Animation.handleStart` is a new internal private method that handles the animation start process. -* `Components.Animation.handleRepeat` is a new internal private method that handles the animation repeat process. -* `Components.Animation.handleStop` is a new internal private method that handles the animation stop process. -* `Components.Animation.handleComplete` is a new internal private method that handles the animation complete process. -* `Components.Animation.emitEvents` is a new internal private method that emits animation events, cutting down on duplicate code. -* The `Components.Animation.restart` method has a new optional boolean parameter `resetRepeats` which controls if you want to reset the repeat counter during the restart, or not. +* `AnimationState.delayCounter` is a new property that allows you to control the delay before an animation will start playing. Only once this delay has expired, will the animation `START` events fire. Fix #4426 (thanks @bdaenen) +* `AnimationState.hasStarted` is a new boolean property that allows you to tell if the current animation has started playing, or is still waiting for a delay to expire. +* `AnimationState.showOnStart` is a new boolean property that controls if the Game Object should have `setVisible(true)` called on it when the animation starts. +* `AnimationState.hideOnComplete` is a new boolean property that controls if the Game Object should have `setVisible(false)` called on it when the animation completes. +* The `AnimationState.chain` method docs said it would remove all pending animations if called with no parameters. However, it didn't - and now does! +* The `AnimationState.setDelay` method has been removed. It never actually worked and you can now perform the same thing by calling either `playAfterDelay` or setting the `delay` property in the play config. +* The `AnimationState.getDelay` method has been removed. You can now read the `delay` property directly. +* The `AnimationState.setRepeat` method has been removed. You can achieve the same thing by setting the `repeat` property in the play config, or adjusting the public `repeatCounter` property if the animation has started. +* `AnimationState.handleStart` is a new internal private method that handles the animation start process. +* `AnimationState.handleRepeat` is a new internal private method that handles the animation repeat process. +* `AnimationState.handleStop` is a new internal private method that handles the animation stop process. +* `AnimationState.handleComplete` is a new internal private method that handles the animation complete process. +* `AnimationState.emitEvents` is a new internal private method that emits animation events, cutting down on duplicate code. +* The `AnimationState.restart` method has a new optional boolean parameter `resetRepeats` which controls if you want to reset the repeat counter during the restart, or not. * `Animation.getTotalFrames` is a new method that will return the total number of frames in the animation. You can access it via `this.anims.currentAnim.getTotalFrames` from a Sprite. * `Animation.calculateDuration` is a new method that calculates the duration, frameRate and msPerFrame for a given animation target. * `ANIMATION_UPDATE_EVENT` is a new event that is emitted from an Animation when it is updated, i.e. its frame changes. -* `ANIMATION_STOP_EVENT` is a new event that is emitted from an Animation when it is stopped before it reaches completion. -* `SPRITE_ANIMATION_STOP_EVENT` is a new event that is emitted from a Sprite when its current animation is stopped before it reaches completion. -* `SPRITE_ANIMATION_KEY_STOP_EVENT` is a new event that is emitted from a Sprite when its current animation is stopped before it reaches completion. This is a dynamic event name and carries the animation key in its title. +* `ANIMATION_STOP_EVENT` is a new event that is emitted from an Animation when it is stopped. This can happen if any of the `stop` methods are called, or a new animation is played prior to this one reaching completion. +* `SPRITE_ANIMATION_STOP_EVENT` is a new event that is emitted from a Sprite when its current animation is stopped. This can happen if any of the `stop` methods are called, or a new animation is played prior to this one reaching completion. +* `SPRITE_ANIMATION_KEY_STOP_EVENT` is a new event that is emitted from a Sprite when its current animation is stopped. This can happen if any of the `stop` methods are called, or a new animation is played prior to this one reaching completion. This is a dynamic event name and carries the animation key in its title. * The `BuildGameObjectAnimation` function now uses the `PlayAnimationConfig` object to set the values. * `Sprite.playReverse` is a new method that allows you to play the given animation in reverse on the Sprite. -* `Sprite.delayedPlay` is a new method that allows you to play the given animation on the Sprite after a delay. +* `Sprite.playAfterDelay` is a new method that allows you to play the given animation on the Sprite after a delay. * `Sprite.stop` is a new method that allows you to stop the current animation on the Sprite. * `AnimationManager.load` has been removed as it's no longer required. * `AnimationManager.staggerPlay` has been fixed so you can now pass in negative stagger values. * `AnimationManager.staggerPlay` has a new optional boolean parameter `staggerFirst`, which allows you to either include or exclude the first child in the stagger calculations. -* The `Animation.completeAnimation` method has been removed as it's no longer required internally. -* The `Animation.load` method has been removed as it's no longer required internally. -* The `Animation.setFrame` method has been removed as it's no longer required internally. -* The `Animation.getFirstTick` method has no longer needs the `includeDelay` parameter, as it's handled by the component now. +* The `Animation.completeAnimation` method has been removed as it's no longer required. +* The `Animation.load` method has been removed as it's no longer required. +* The `Animation.setFrame` method has been removed as it's no longer required. +* The `Animation.getFirstTick` method has no longer needs the `includeDelay` parameter, as it's handled by `AnimationState` now. * The `Animation.getFrames` method has a new optional boolean parameter `sortFrames` which will run a numeric sort on the frame names after constructing them, if a string-based frame is given. * `Types.Animations.Animation` has a new boolean property `sortFrames`, which lets Phaser numerically sort the generated frames. -* `Component.Animation.timeScale` is a new public property that replaces the old private `_timeScale` property. -* `Component.Animation.delay` is a new public property that replaces the old private `_delay` property. -* `Component.Animation.repeat` is a new public property that replaces the old private `_repeat` property. -* `Component.Animation.repeatDelay` is a new public property that replaces the old private `_repeatDelay` property. -* `Component.Animation.yoyo` is a new public property that replaces the old private `_yoyo` property. -* `Component.Animation.inReverse` is a new public property that replaces the old private `_reverse` property. -* `Component.Animation.startAnimation` is a new public method that replaces the old private `_startAnimation` method. -* The `Component.Animation.getProgress` method has been fixed so it will return correctly if the animation is playing in reverse. -* The `Component.Animation.remove` method will now always be called when an animation is removed, not just once. -* The `Component.Animation.getRepeat` method has now been removed. You can get the value from the `repeat` property. -* The `Component.Animation.setRepeatDelay` method has now been removed. You can set the value using the `repeatDelay` config property, or changing it at run-time. -* `Component.Animation.complete` is a new method that handles the completion in animation playback. -* The `Component.Animation.setTimeScale` method has now been removed. You can set the value using the `timeScale` config property, or changing it at run-time. -* The `Component.Animation.getTimeScale` method has now been removed. You can read the value using the `timeScale` property. -* The `Component.Animation.getTotalFrames` method has been fixed and won't error if called when no animation is loaded. -* The `Component.Animation.setYoyo` method has now been removed. You can set the value using the `yoyo` config property, or changing it at run-time. -* The `Component.Animation.getYoyo` method has now been removed. You can read the value using the `yoyo` property. -* The `stopAfterRepeat` method now has an optional parameter `repeatCount`, so you can tell the animation to stop after a specified number of repeats, not just 1. +* `AnimationState.timeScale` is a new public property that replaces the old private `_timeScale` property. +* `AnimationState.delay` is a new public property that replaces the old private `_delay` property. +* `AnimationState.repeat` is a new public property that replaces the old private `_repeat` property. +* `AnimationState.repeatDelay` is a new public property that replaces the old private `_repeatDelay` property. +* `AnimationState.yoyo` is a new public property that replaces the old private `_yoyo` property. +* `AnimationState.inReverse` is a new public property that replaces the old private `_reverse` property. +* `AnimationState.startAnimation` is a new public method that replaces the old private `_startAnimation` method. +* The `AnimationState.getProgress` method has been fixed so it will return correctly if the animation is playing in reverse. +* The `AnimationState.globalRemove` method will now always be called when an animation is removed from the global Animation Manager, not just once. +* The `AnimationState.getRepeat` method has now been removed. You can get the value from the `repeat` property. +* The `AnimationState.setRepeatDelay` method has now been removed. You can set the value using the `repeatDelay` config property, or changing it at run-time. +* `AnimationState.complete` is a new method that handles the completion in animation playback. +* The `AnimationState.setTimeScale` method has now been removed. You can set the value using the `timeScale` config property, or changing it at run-time. +* The `AnimationState.getTimeScale` method has now been removed. You can read the value using the `timeScale` property. +* The `AnimationState.getTotalFrames` method has been fixed and won't error if called when no animation is loaded. +* The `AnimationState.setYoyo` method has now been removed. You can set the value using the `yoyo` config property, or changing it at run-time. +* The `AnimationState.getYoyo` method has now been removed. You can read the value using the `yoyo` property. +* The `AnimationState.stopAfterRepeat` method now has an optional parameter `repeatCount`, so you can tell the animation to stop after a specified number of repeats, not just 1. * When playing an animation in reverse, if it reached the first frame and had to repeat, it would then jump to the frame before the final frame and carry on, skipping out the final frame. -* The `Component.Animation.updateFrame` method has now been removed. Everything is handled by `setCurrentFrame` instead, which removes one extra step out of the update process. +* The `AnimationState.updateFrame` method has now been removed. Everything is handled by `setCurrentFrame` instead, which removes one extra step out of the update process. ### New Features From ad4f0ce0c48abc8b22b572f4cc6e782c07c126e7 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 5 Sep 2020 12:01:11 +0100 Subject: [PATCH 208/241] Updated docs --- src/gameobjects/components/AnimationState.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gameobjects/components/AnimationState.js b/src/gameobjects/components/AnimationState.js index 075ee3175..2fa0f6e1e 100644 --- a/src/gameobjects/components/AnimationState.js +++ b/src/gameobjects/components/AnimationState.js @@ -452,12 +452,12 @@ var AnimationState = new Class({ }, /** - * Sets an animation, or an array of animations, to be played immediately after the current one completes or stops. + * Sets an animation, or an array of animations, to be played in the future, after the current one completes or stops. * * The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc, - * or have the `stop` method called directly on it. + * or have one of the `stop` methods called. * - * An animation set to repeat forever will never enter a completed state. + * An animation set to repeat forever will never enter a completed state unless stopped. * * You can chain a new animation at any point, including before the current one starts playing, during it, or when it ends (via its `animationcomplete` event). * From d44fc887057e5e00de97844c79d960953c16c1d9 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Sat, 5 Sep 2020 12:01:14 +0100 Subject: [PATCH 209/241] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d70d156e..e682945f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -268,7 +268,7 @@ The Animation API has had a significant overhaul to improve playback handling. I * `Animation.getTotalFrames` is a new method that will return the total number of frames in the animation. You can access it via `this.anims.currentAnim.getTotalFrames` from a Sprite. * `Animation.calculateDuration` is a new method that calculates the duration, frameRate and msPerFrame for a given animation target. * `ANIMATION_UPDATE_EVENT` is a new event that is emitted from an Animation when it is updated, i.e. its frame changes. -* `ANIMATION_STOP_EVENT` is a new event that is emitted from an Animation when it is stopped. This can happen if any of the `stop` methods are called, or a new animation is played prior to this one reaching completion. +* `ANIMATION_STOP_EVENT` is a new event that is emitted from an Animation when it is stopped. This can happen if any of the `stop` methods are called, or a new animation is played prior to this one reaching completion. Fix #4894 (thanks @scott20145) * `SPRITE_ANIMATION_STOP_EVENT` is a new event that is emitted from a Sprite when its current animation is stopped. This can happen if any of the `stop` methods are called, or a new animation is played prior to this one reaching completion. * `SPRITE_ANIMATION_KEY_STOP_EVENT` is a new event that is emitted from a Sprite when its current animation is stopped. This can happen if any of the `stop` methods are called, or a new animation is played prior to this one reaching completion. This is a dynamic event name and carries the animation key in its title. * The `BuildGameObjectAnimation` function now uses the `PlayAnimationConfig` object to set the values. From 70110825dae52d6517d29e03f665de7d9aaadeb9 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 7 Sep 2020 10:26:04 +0100 Subject: [PATCH 210/241] Console warning if frame doesn't exist * `GenerateFrameNames` will now console.warn if the generated frame isn't present in the texture, which should help with debugging animation creation massively. * `GenerateFrameNumbers` will now console.warn if the generated frame isn't present in the texture, which should help with debugging animation creation massively. --- src/animations/AnimationManager.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/animations/AnimationManager.js b/src/animations/AnimationManager.js index 3d0c4e41a..085f34a66 100644 --- a/src/animations/AnimationManager.js +++ b/src/animations/AnimationManager.js @@ -518,6 +518,10 @@ var AnimationManager = new Class({ { out.push({ key: key, frame: frame }); } + else + { + console.warn('generateFrameNames: Frame missing: ' + frame + ' from texture: ' + key); + } } } else @@ -530,6 +534,10 @@ var AnimationManager = new Class({ { out.push({ key: key, frame: frame }); } + else + { + console.warn('generateFrameNames: Frame missing: ' + frame + ' from texture: ' + key); + } } } @@ -582,6 +590,10 @@ var AnimationManager = new Class({ { out.push({ key: key, frame: frames[i] }); } + else + { + console.warn('generateFrameNumbers: Frame ' + i + ' missing from texture: ' + key); + } } } else @@ -603,6 +615,10 @@ var AnimationManager = new Class({ { out.push({ key: key, frame: i }); } + else + { + console.warn('generateFrameNumbers: Frame ' + i + ' missing from texture: ' + key); + } } } From 6eae9ca598ccb3939170e6066810afd03a33463e Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 7 Sep 2020 10:26:10 +0100 Subject: [PATCH 211/241] Fixed reference --- src/physics/matter-js/MatterSprite.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/physics/matter-js/MatterSprite.js b/src/physics/matter-js/MatterSprite.js index 800322fc1..f1f773add 100644 --- a/src/physics/matter-js/MatterSprite.js +++ b/src/physics/matter-js/MatterSprite.js @@ -4,7 +4,7 @@ * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AnimationComponent = require('../../gameobjects/components/Animation'); +var AnimationState = require('../../gameobjects/components/AnimationState'); var Class = require('../../utils/Class'); var Components = require('./components'); var GameObject = require('../../gameobjects/GameObject'); @@ -100,7 +100,7 @@ var MatterSprite = new Class({ */ this._crop = this.resetCropObject(); - this.anims = new AnimationComponent(this); + this.anims = new AnimationState(this); this.setTexture(texture, frame); this.setSizeToFrame(); From 24beb01963c2fee276379d759edbe483c0bfb00d Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 7 Sep 2020 10:26:16 +0100 Subject: [PATCH 212/241] Update AnimationState.js --- src/gameobjects/components/AnimationState.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gameobjects/components/AnimationState.js b/src/gameobjects/components/AnimationState.js index 2fa0f6e1e..e8abb2836 100644 --- a/src/gameobjects/components/AnimationState.js +++ b/src/gameobjects/components/AnimationState.js @@ -1429,7 +1429,7 @@ var AnimationState = new Class({ }, /** - * The internal update loop for the Animation Component. + * The internal update loop for the AnimationState Component. * * This is called automatically by the `Sprite.preUpdate` method. * From fd5f39f0760f6cfded42b6af71683a8cfb648069 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 7 Sep 2020 10:26:21 +0100 Subject: [PATCH 213/241] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e682945f8..35d370228 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -304,6 +304,8 @@ The Animation API has had a significant overhaul to improve playback handling. I * The `AnimationState.stopAfterRepeat` method now has an optional parameter `repeatCount`, so you can tell the animation to stop after a specified number of repeats, not just 1. * When playing an animation in reverse, if it reached the first frame and had to repeat, it would then jump to the frame before the final frame and carry on, skipping out the final frame. * The `AnimationState.updateFrame` method has now been removed. Everything is handled by `setCurrentFrame` instead, which removes one extra step out of the update process. +* `GenerateFrameNames` will now console.warn if the generated frame isn't present in the texture, which should help with debugging animation creation massively. +* `GenerateFrameNumbers` will now console.warn if the generated frame isn't present in the texture, which should help with debugging animation creation massively. ### New Features From ace5b8cafb06f5cec7798a2ab238e221f53535fe Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 7 Sep 2020 11:32:46 +0100 Subject: [PATCH 214/241] Update Animation.js --- src/animations/Animation.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/animations/Animation.js b/src/animations/Animation.js index 33d1e84be..a62c9cb20 100644 --- a/src/animations/Animation.js +++ b/src/animations/Animation.js @@ -478,10 +478,6 @@ var Animation = new Class({ */ getNextTick: function (component) { - // accumulator += delta * _timeScale - // after a large delta surge (perf issue for example) we need to adjust for it here - - // When is the next update due? component.accumulator -= component.nextTick; component.nextTick = component.msPerFrame + component.currentFrame.duration; @@ -516,8 +512,6 @@ var Animation = new Class({ { var frame = component.currentFrame; - // TODO: Add frame skip support - if (frame.isLast) { // We're at the end of the animation @@ -617,8 +611,6 @@ var Animation = new Class({ { var frame = component.currentFrame; - // TODO: Add frame skip support - if (frame.isFirst) { // We're at the start of the animation From 2b374c7e1443a339ef8241cdc05c570615af02a1 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 7 Sep 2020 11:32:55 +0100 Subject: [PATCH 215/241] `AnimationState.skipMissedFrames` is now used when playing an animation, allowing you to create animations that run at frame rates far exceeding the refresh rate, or that will update to the correct frame should the game lag. Close #4232 --- src/gameobjects/components/AnimationState.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/gameobjects/components/AnimationState.js b/src/gameobjects/components/AnimationState.js index e8abb2836..a1bbcd054 100644 --- a/src/gameobjects/components/AnimationState.js +++ b/src/gameobjects/components/AnimationState.js @@ -1471,6 +1471,8 @@ var AnimationState = new Class({ } else if (this.accumulator >= this.nextTick) { + // Process one frame advance as standard + if (this.forward) { anim.nextFrame(this); @@ -1479,6 +1481,23 @@ var AnimationState = new Class({ { anim.previousFrame(this); } + + // And only do more if we're skipping frames and have time left + if (this.skipMissedFrames && this.accumulator > this.nextTick) + { + do + { + if (this.forward) + { + anim.nextFrame(this); + } + else + { + anim.previousFrame(this); + } + + } while (this.accumulator > this.nextTick); + } } }, From f8867fd16ea3d2ff42831a2a73257babd694fef1 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 7 Sep 2020 11:32:58 +0100 Subject: [PATCH 216/241] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35d370228..d08ae3374 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -222,6 +222,7 @@ The Animation API has had a significant overhaul to improve playback handling. I * The `play`, `playReverse`, `playAfterDelay`, `playAfterRepeat` and `chain` Sprite and Animation Component methods can now all take a `Phaser.Types.Animations.PlayAnimationConfig` configuration object, as well as a string, as the `key` parameter. This allows you to override any default animation setting with those defined in the config, giving you far greater control over animations on a Game Object level, without needing to globally duplicate them. * `AnimationState.create` is a new method that allows you to create animations directly on a Sprite. These are not global and never enter the Animation Manager, instead risiding within the Sprite itself. This allows you to use the same keys across both local and global animations and set-up Sprite specific local animations. * All playback methods: `play`, `playReverse`, `playAfterDelay` and `playAfterRepeat` will now check to see if the given animation key exists locally on the Sprite first. If it does, it's used, otherwise it then checks the global Animation Manager for the key instead. +* `AnimationState.skipMissedFrames` is now used when playing an animation, allowing you to create animations that run at frame rates far exceeding the refresh rate, or that will update to the correct frame should the game lag. Feature #4232 (thanks @colorcube) * `AnimationState.remove` is a new method that will remove a locally stored Animation instance from a Sprite. * `AnimationState.get` is a new method that will return a locally stored Animation instance from the Sprite. * `AnimationState.exists` is a new method that will check if a locally stored Animation exists on the Sprite. From ec06e79b26fdc32e60eaca08f95000fe394bd530 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 7 Sep 2020 11:52:37 +0100 Subject: [PATCH 217/241] Catch stops --- src/gameobjects/components/AnimationState.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gameobjects/components/AnimationState.js b/src/gameobjects/components/AnimationState.js index a1bbcd054..7d7457595 100644 --- a/src/gameobjects/components/AnimationState.js +++ b/src/gameobjects/components/AnimationState.js @@ -1483,7 +1483,7 @@ var AnimationState = new Class({ } // And only do more if we're skipping frames and have time left - if (this.skipMissedFrames && this.accumulator > this.nextTick) + if (this.isPlaying && this._pendingStop === 0 && this.skipMissedFrames && this.accumulator > this.nextTick) { do { From 94298efc4db24920098f0beac6bd04dd2905d90c Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 7 Sep 2020 11:54:08 +0100 Subject: [PATCH 218/241] Because do/while loops are quite dangerous --- src/gameobjects/components/AnimationState.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gameobjects/components/AnimationState.js b/src/gameobjects/components/AnimationState.js index 7d7457595..a246fcd3c 100644 --- a/src/gameobjects/components/AnimationState.js +++ b/src/gameobjects/components/AnimationState.js @@ -1485,6 +1485,8 @@ var AnimationState = new Class({ // And only do more if we're skipping frames and have time left if (this.isPlaying && this._pendingStop === 0 && this.skipMissedFrames && this.accumulator > this.nextTick) { + var safetyNet = 0; + do { if (this.forward) @@ -1496,7 +1498,9 @@ var AnimationState = new Class({ anim.previousFrame(this); } - } while (this.accumulator > this.nextTick); + safetyNet++; + + } while (this.accumulator > this.nextTick && safetyNet < 60); } } }, From 438fe3c0d1629c060f31111ec3060bdb1b987793 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 7 Sep 2020 14:50:33 +0100 Subject: [PATCH 219/241] No Update unless playing --- src/gameobjects/components/AnimationState.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gameobjects/components/AnimationState.js b/src/gameobjects/components/AnimationState.js index a246fcd3c..85e468b58 100644 --- a/src/gameobjects/components/AnimationState.js +++ b/src/gameobjects/components/AnimationState.js @@ -1555,7 +1555,7 @@ var AnimationState = new Class({ } } - if (this.isPlaying) + if (this.isPlaying && this.hasStarted) { this.emitEvents(Events.ANIMATION_UPDATE, Events.SPRITE_ANIMATION_KEY_UPDATE, Events.SPRITE_ANIMATION_UPDATE); From 98dc69ed23d5bdc6b079a312526c8bb9445e9586 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 7 Sep 2020 15:33:57 +0100 Subject: [PATCH 220/241] Added in support for blending animations with `addMix`, `getMix` and `removeMix`. --- src/animations/AnimationManager.js | 152 +++++++++++++++++++ src/gameobjects/components/AnimationState.js | 18 ++- 2 files changed, 168 insertions(+), 2 deletions(-) diff --git a/src/animations/AnimationManager.js b/src/animations/AnimationManager.js index 085f34a66..6bd6b401a 100644 --- a/src/animations/AnimationManager.js +++ b/src/animations/AnimationManager.js @@ -86,6 +86,17 @@ var AnimationManager = new Class({ */ this.anims = new CustomMap(); + /** + * A list of animation mix times. + * + * See the {@link #setMix} method for more details. + * + * @name Phaser.Animations.AnimationManager#mixes + * @type {Phaser.Structs.Map.} + * @since 3.50.0 + */ + this.mixes = new CustomMap(); + /** * Whether the Animation Manager is paused along with all of its Animations. * @@ -122,6 +133,144 @@ var AnimationManager = new Class({ this.game.events.once(GameEvents.DESTROY, this.destroy, this); }, + /** + * Adds a mix between two animations. + * + * Mixing allows you to specify a unique delay between a pairing of animations. + * + * When playing Animation A on a Game Object, if you then play Animation B, and a + * mix exists, it will wait for the specified delay to be over before playing Animation B. + * + * This allows you to customise smoothing between different types of animation, such + * as blending between an idle and a walk state, or a running and a firing state. + * + * Note that mixing is only applied if you use the `Sprite.play` method. If you opt to use + * `playAfterRepeat` or `playAfterDelay` instead, those will take pririty and the mix + * delay will not be used. + * + * To update an existing mix, just call this method with the new delay. + * + * To remove a mix pairing, see the `removeMix` method. + * + * @method Phaser.Animations.AnimationManager#addMix + * @since 3.50.0 + * + * @param {(string|Phaser.Animations.Animation)} animA - The string-based key, or instance of, Animation A. + * @param {(string|Phaser.Animations.Animation)} animB - The string-based key, or instance of, Animation B. + * @param {number} delay - The delay, in milliseconds, to wait when transitioning from Animation A to B. + * + * @return {this} This Animation Manager. + */ + addMix: function (animA, animB, delay) + { + var anims = this.anims; + var mixes = this.mixes; + + var keyA = (typeof(animA) === 'string') ? animA : animA.key; + var keyB = (typeof(animB) === 'string') ? animB : animB.key; + + if (anims.has(keyA) && anims.has(keyB)) + { + var mixObj = mixes.get(keyA); + + if (!mixObj) + { + mixObj = {}; + } + + mixObj[keyB] = delay; + + mixes.set(keyA, mixObj); + } + + return this; + }, + + /** + * Removes a mix between two animations. + * + * Mixing allows you to specify a unique delay between a pairing of animations. + * + * Calling this method lets you remove those pairings. You can either remove + * it between `animA` and `animB`, or if you do not provide the `animB` parameter, + * it will remove all `animA` mixes. + * + * If you wish to update an existing mix instead, call the `addMix` method with the + * new delay. + * + * @method Phaser.Animations.AnimationManager#removeMix + * @since 3.50.0 + * + * @param {(string|Phaser.Animations.Animation)} animA - The string-based key, or instance of, Animation A. + * @param {(string|Phaser.Animations.Animation)} [animB] - The string-based key, or instance of, Animation B. If not given, all mixes for Animation A will be removed. + * + * @return {this} This Animation Manager. + */ + removeMix: function (animA, animB) + { + var mixes = this.mixes; + + var keyA = (typeof(animA) === 'string') ? animA : animA.key; + + var mixObj = mixes.get(keyA); + + if (mixObj) + { + if (animB) + { + var keyB = (typeof(animB) === 'string') ? animB : animB.key; + + if (mixObj.hasOwnProperty(keyB)) + { + // Remove just this pairing + delete mixObj[keyB]; + } + } + else if (!animB) + { + // Remove everything for animA + mixes.delete(keyA); + } + } + + return this; + }, + + /** + * Returns the mix delay between two animations. + * + * If no mix has been set-up, this method will return zero. + * + * If you wish to create, or update, a new mix, call the `addMix` method. + * If you wish to remove a mix, call the `removeMix` method. + * + * @method Phaser.Animations.AnimationManager#getMix + * @since 3.50.0 + * + * @param {(string|Phaser.Animations.Animation)} animA - The string-based key, or instance of, Animation A. + * @param {(string|Phaser.Animations.Animation)} animB - The string-based key, or instance of, Animation B. + * + * @return {number} The mix duration, or zero if no mix exists. + */ + getMix: function (animA, animB) + { + var mixes = this.mixes; + + var keyA = (typeof(animA) === 'string') ? animA : animA.key; + var keyB = (typeof(animB) === 'string') ? animB : animB.key; + + var mixObj = mixes.get(keyA); + + if (mixObj && mixObj.hasOwnProperty(keyB)) + { + return mixObj[keyB]; + } + else + { + return 0; + } + }, + /** * Adds an existing Animation to the Animation Manager. * @@ -776,6 +925,8 @@ var AnimationManager = new Class({ this.emit(Events.REMOVE_ANIMATION, key, anim); this.anims.delete(key); + + this.removeMix(key); } return anim; @@ -845,6 +996,7 @@ var AnimationManager = new Class({ destroy: function () { this.anims.clear(); + this.mixes.clear(); this.textureManager = null; diff --git a/src/gameobjects/components/AnimationState.js b/src/gameobjects/components/AnimationState.js index 85e468b58..893c12fe4 100644 --- a/src/gameobjects/components/AnimationState.js +++ b/src/gameobjects/components/AnimationState.js @@ -816,12 +816,26 @@ var AnimationState = new Class({ { if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } + var currentAnim = this.currentAnim; + var parent = this.parent; + // Must be either an Animation instance, or a PlayAnimationConfig object var animKey = (typeof key === 'string') ? key : key.key; - if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === animKey) + if (ignoreIfPlaying && this.isPlaying && currentAnim.key === animKey) { - return this.parent; + return parent; + } + + // Are we mixing? + if (currentAnim && this.isPlaying) + { + var mix = this.animationManager.getMix(currentAnim.key, key); + + if (mix > 0) + { + return this.playAfterDelay(key, mix); + } } this.forward = true; From bc694ce4acccd72acc047c821181bc1eaaffdab4 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 7 Sep 2020 15:34:04 +0100 Subject: [PATCH 221/241] Beta 4 --- package.json | 2 +- src/const.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index be6d9d521..d77580d3d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "phaser", - "version": "3.50.0-beta.3", + "version": "3.50.0-beta.4", "release": "Subaru", "description": "A fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers.", "author": "Richard Davey (http://www.photonstorm.com)", diff --git a/src/const.js b/src/const.js index d4a3a58cc..094216fed 100644 --- a/src/const.js +++ b/src/const.js @@ -20,7 +20,7 @@ var CONST = { * @type {string} * @since 3.0.0 */ - VERSION: '3.50.0-beta.3', + VERSION: '3.50.0-beta.4', BlendModes: require('./renderer/BlendModes'), From d47e59944d14ec5db567cfef470ad15d584714b4 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 7 Sep 2020 15:34:07 +0100 Subject: [PATCH 222/241] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d08ae3374..34dc7ca32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -223,6 +223,9 @@ The Animation API has had a significant overhaul to improve playback handling. I * `AnimationState.create` is a new method that allows you to create animations directly on a Sprite. These are not global and never enter the Animation Manager, instead risiding within the Sprite itself. This allows you to use the same keys across both local and global animations and set-up Sprite specific local animations. * All playback methods: `play`, `playReverse`, `playAfterDelay` and `playAfterRepeat` will now check to see if the given animation key exists locally on the Sprite first. If it does, it's used, otherwise it then checks the global Animation Manager for the key instead. * `AnimationState.skipMissedFrames` is now used when playing an animation, allowing you to create animations that run at frame rates far exceeding the refresh rate, or that will update to the correct frame should the game lag. Feature #4232 (thanks @colorcube) +* `AnimationManager.addMix` is a new method that allows you to create mixes between two animations. Mixing allows you to specify a unique delay between a pairing of animations. When playing Animation A on a Game Object, if you then play Animation B, and a mix exists, it will wait for the specified delay to be over before playing Animation B. This allows you to customise smoothing between different types of animation, such as blending between an idle and a walk state, or a running and a firing state. +* `AnimationManager.getMix` is a new method that will return the mix duration between the two given animations. +* `AnimationManager.removeMix` is a new method that will remove the mixture between either two animations, or all mixtures for the given animation. * `AnimationState.remove` is a new method that will remove a locally stored Animation instance from a Sprite. * `AnimationState.get` is a new method that will return a locally stored Animation instance from the Sprite. * `AnimationState.exists` is a new method that will check if a locally stored Animation exists on the Sprite. From bd199290064454487a2ca234195c8f52424a465d Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 7 Sep 2020 16:03:06 +0100 Subject: [PATCH 223/241] JSDoc fix --- src/animations/Animation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/animations/Animation.js b/src/animations/Animation.js index a62c9cb20..8d51db36f 100644 --- a/src/animations/Animation.js +++ b/src/animations/Animation.js @@ -120,7 +120,7 @@ var Animation = new Class({ * * @name Phaser.Animations.Animation#skipMissedFrames * @type {boolean} - * @default false + * @default true * @since 3.0.0 */ this.skipMissedFrames = GetValue(config, 'skipMissedFrames', true); From 5224985e7fe97d62636e7ec3e21f15c8f44100ed Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 7 Sep 2020 16:03:18 +0100 Subject: [PATCH 224/241] Update BitmapMaskPipeline.js --- .../webgl/pipelines/BitmapMaskPipeline.js | 85 ++++--------------- 1 file changed, 15 insertions(+), 70 deletions(-) diff --git a/src/renderer/webgl/pipelines/BitmapMaskPipeline.js b/src/renderer/webgl/pipelines/BitmapMaskPipeline.js index 40bdd63f6..ee1871fce 100644 --- a/src/renderer/webgl/pipelines/BitmapMaskPipeline.js +++ b/src/renderer/webgl/pipelines/BitmapMaskPipeline.js @@ -14,10 +14,23 @@ var WebGLPipeline = require('../WebGLPipeline'); /** * @classdesc * + * The Bitmap Mask Pipeline handles all of the bitmap mask rendering in WebGL for applying + * alpha masks to Game Objects. It works by sampling two texture on the fragment shader and + * using the fragments alpha to clip the region. * + * The fragment shader it uses can be found in `shaders/src/BitmapMask.frag`. + * The vertex shader it uses can be found in `shaders/src/BitmapMask.vert`. * - * BitmapMaskPipeline handles all bitmap masking rendering in WebGL. It works by using - * sampling two texture on the fragment shader and using the fragment's alpha to clip the region. + * The default shader attributes for this pipeline are: + * + * `inPosition` (vec2, offset 0) + * + * The default shader uniforms for this pipeline are: + * + * `uResolution` (vec2) + * `uMainSampler` (sampler2D) + * `uMaskSampler` (sampler2D) + * `uInvertMaskAlpha` (bool) * * @class BitmapMaskPipeline * @extends Phaser.Renderer.WebGL.WebGLPipeline @@ -53,55 +66,8 @@ var BitmapMaskPipeline = new Class({ ]); WebGLPipeline.call(this, config); - - /** - * Float32 view of the array buffer containing the pipeline's vertices. - * - * @name Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#vertexViewF32 - * @type {Float32Array} - * @since 3.0.0 - */ - // this.vertexViewF32 = new Float32Array(this.vertexData); - - /** - * Dirty flag to check if resolution properties need to be updated on the - * masking shader. - * - * @name Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#resolutionDirty - * @type {boolean} - * @default true - * @since 3.0.0 - */ - // this.resolutionDirty = true; }, - /** - * Called every time the pipeline needs to be used. - * It binds all necessary resources. - * - * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#onBind - * @since 3.0.0 - * - * @return {this} This WebGLPipeline instance. - onBind: function () - { - WebGLPipeline.prototype.onBind.call(this); - - var renderer = this.renderer; - var program = this.program; - - if (this.resolutionDirty) - { - renderer.setFloat2(program, 'uResolution', this.width, this.height); - renderer.setInt1(program, 'uMainSampler', 0); - renderer.setInt1(program, 'uMaskSampler', 1); - this.resolutionDirty = false; - } - - return this; - }, - */ - /** * Called every time the pipeline is bound by the renderer. * Sets the shader program, vertex buffer and other resources. @@ -130,27 +96,6 @@ var BitmapMaskPipeline = new Class({ return this; }, - /** - * Resizes this pipeline and updates the projection. - * - * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#resize - * @since 3.0.0 - * - * @param {number} width - The new width. - * @param {number} height - The new height. - * @param {number} resolution - The resolution. - * - * @return {this} This WebGLPipeline instance. - */ - resize: function (width, height, resolution) - { - WebGLPipeline.prototype.resize.call(this, width, height, resolution); - - this.resolutionDirty = true; - - return this; - }, - /** * Binds necessary resources and renders the mask to a separated framebuffer. * The framebuffer for the masked object is also bound for further use. From dc99fd03aa81041daccc58df1bccb4b37e253db1 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 7 Sep 2020 16:03:36 +0100 Subject: [PATCH 225/241] Don't create if vertices already provided. Fix #5280 --- src/renderer/webgl/WebGLPipeline.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/renderer/webgl/WebGLPipeline.js b/src/renderer/webgl/WebGLPipeline.js index 3bb95f4fa..3ab5b101d 100644 --- a/src/renderer/webgl/WebGLPipeline.js +++ b/src/renderer/webgl/WebGLPipeline.js @@ -167,7 +167,14 @@ var WebGLPipeline = new Class({ * @type {WebGLBuffer} * @since 3.0.0 */ - this.vertexBuffer = this.renderer.createVertexBuffer(this.vertexData.byteLength, this.gl.STREAM_DRAW); + if (GetFastValue(config, 'vertices', null)) + { + this.vertexBuffer = this.renderer.createVertexBuffer(this.vertexData, this.gl.STREAM_DRAW); + } + else + { + this.vertexBuffer = this.renderer.createVertexBuffer(this.vertexData.byteLength, this.gl.STREAM_DRAW); + } /** * The handle to a WebGL program. From 5344d39498ceb644d3a157c49c5ce998584e7de4 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 7 Sep 2020 16:39:57 +0100 Subject: [PATCH 226/241] Better Group docs. Fix #5011 --- src/physics/arcade/PhysicsGroup.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/physics/arcade/PhysicsGroup.js b/src/physics/arcade/PhysicsGroup.js index a9f260489..374a66e58 100644 --- a/src/physics/arcade/PhysicsGroup.js +++ b/src/physics/arcade/PhysicsGroup.js @@ -15,10 +15,19 @@ var IsPlainObject = require('../../utils/object/IsPlainObject'); * @classdesc * An Arcade Physics Group object. * - * All Game Objects created by or added to this Group will automatically be given dynamic Arcade Physics bodies (if they have no body) - * and the bodies will receive the Group's {@link Phaser.Physics.Arcade.Group#defaults default values}. + * The primary use of a Physics Group is a way to collect together physics enable objects + * that share the same intrinsic structure into a single pool. They can they be easily + * compared against other Groups, or Game Objects. * - * Its static counterpart is {@link Phaser.Physics.Arcade.StaticGroup}. + * All Game Objects created by, or added to this Group will automatically be given **dynamic** + * Arcade Physics bodies (if they have no body already) and the bodies will receive the + * Groups {@link Phaser.Physics.Arcade.Group#defaults default values}. + * + * You should not pass objects into this Group that should not receive a body. For example, + * do not add basic Geometry or Tilemap Layers into a Group, as they will not behave in the + * way you may expect. Groups should all ideally have objects of the same type in them. + * + * If you wish to create a Group filled with Static Bodies, please see {@link Phaser.Physics.Arcade.StaticGroup}. * * @class Group * @extends Phaser.GameObjects.Group From c6b503e9ed8c0d55b83ab6cc3441386aee5c0221 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 7 Sep 2020 16:40:00 +0100 Subject: [PATCH 227/241] Update CHANGELOG.md --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 34dc7ca32..4ccebbd78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -379,6 +379,7 @@ The Animation API has had a significant overhaul to improve playback handling. I * `Utils.Array.StableSort` has been recoded. It's now based on Two-Screens stable sort 0.1.8 and has been updated to fit into Phaser better and no longer create any window bound objects. The `inplace` function has been removed, just call `StableSort(array)` directly now. All classes that used `StableSort.inplace` have been updated to call it directly. * If a Scene is paused, or sent to sleep, it will automatically call `Keyboard.resetKeys`. This means that if you hold a key down, then sleep or pause a Scene, then release the key and resume or wake the Scene, it will no longer think it is still being held down (thanks @samme) * `Actions.setOrigin` will now call `updateDisplayOrigin` on the items array, otherwise the effects can't be seen when rendering. +* You can now set the `ArcadeWorld.fixedStep` property via the `ArcadeWorldConfig` object (thanks @samme) ### Namespace Updates @@ -424,7 +425,7 @@ The Animation API has had a significant overhaul to improve playback handling. I My thanks to the following for helping with the Phaser 3 Examples, Docs, and TypeScript definitions, either by reporting errors, fixing them, or helping author the docs: -@samme @16patsle @scott20145 @khasanovbi @mk360 @volkans80 @jaabberwocky @maikthomas @atursams @LearningCode2023 @DylanC +@samme @16patsle @scott20145 @khasanovbi @mk360 @volkans80 @jaabberwocky @maikthomas @atursams @LearningCode2023 @DylanC @BenjaminDRichards From 6f2bf7755721f634c70cc4de3c186cb69ad413ef Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 7 Sep 2020 18:27:46 +0100 Subject: [PATCH 228/241] Update CHANGELOG.md --- CHANGELOG.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ccebbd78..a28dc8ab7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ### WebGL Pipeline Updates -If you use a custom WebGL Pipeline in your game, you must update in order to use Phaser 3.50. +If you use a custom WebGL Pipeline in your game, you must update your code in order to use Phaser 3.50. Due to the huge amount of work that has taken place in this area, all of the pipelines have been renamed. If you extend any of these pipelines or use them in your game code (referenced by name), then please update accordingly. The name changes are: @@ -37,7 +37,7 @@ There is also a new pipeline called `SinglePipeline`, created to emulate the old ### WebGL Multi-Texture Rendering -The Multi Pipeline (previously the Texture Tint Pipeline) has had its core flow rewritten to eliminate the need for constantly creating `batch` objects. Instead, it now supports the new multi-texture shader, vastly increasing rendering performance, especially on draw call-bound systems. +The Multi Pipeline (previously the Texture Tint Pipeline) has had its core flow rewritten to eliminate the need for constantly creating `batch` objects. Instead, it now supports the new multi-texture shader, vastly increasing rendering performance, especially on draw-call bound systems. All of the internal functions, such as `batchQuad` and `batchSprite` have been updated to use the new method of texture setting. The method signatures all remain the same unless indicated below. @@ -308,8 +308,8 @@ The Animation API has had a significant overhaul to improve playback handling. I * The `AnimationState.stopAfterRepeat` method now has an optional parameter `repeatCount`, so you can tell the animation to stop after a specified number of repeats, not just 1. * When playing an animation in reverse, if it reached the first frame and had to repeat, it would then jump to the frame before the final frame and carry on, skipping out the final frame. * The `AnimationState.updateFrame` method has now been removed. Everything is handled by `setCurrentFrame` instead, which removes one extra step out of the update process. -* `GenerateFrameNames` will now console.warn if the generated frame isn't present in the texture, which should help with debugging animation creation massively. -* `GenerateFrameNumbers` will now console.warn if the generated frame isn't present in the texture, which should help with debugging animation creation massively. +* `GenerateFrameNames` will now `console.warn` if the generated frame isn't present in the texture, which should help with debugging animation creation massively. +* `GenerateFrameNumbers` will now `console.warn` if the generated frame isn't present in the texture, which should help with debugging animation creation massively. ### New Features From cdd612a273ee9a92d53253f7384dd6677bd7a229 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 8 Sep 2020 09:31:59 +0100 Subject: [PATCH 229/241] AnimationState has moved namespace to keep things logically together --- .../AnimationState.js | 158 +++++++++--------- src/animations/index.js | 1 + src/gameobjects/components/index.js | 1 - src/gameobjects/sprite/Sprite.js | 5 +- src/physics/matter-js/MatterSprite.js | 2 +- 5 files changed, 86 insertions(+), 81 deletions(-) rename src/{gameobjects/components => animations}/AnimationState.js (91%) diff --git a/src/gameobjects/components/AnimationState.js b/src/animations/AnimationState.js similarity index 91% rename from src/gameobjects/components/AnimationState.js rename to src/animations/AnimationState.js index 893c12fe4..443ec4b73 100644 --- a/src/gameobjects/components/AnimationState.js +++ b/src/animations/AnimationState.js @@ -4,11 +4,11 @@ * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Class = require('../../utils/Class'); -var CustomMap = require('../../structs/Map'); -var GetFastValue = require('../../utils/object/GetFastValue'); -var Events = require('../../animations/events'); -var Animation = require('../../animations/Animation'); +var Class = require('../utils/Class'); +var CustomMap = require('../structs/Map'); +var GetFastValue = require('../utils/object/GetFastValue'); +var Events = require('./events'); +var Animation = require('./Animation'); /** * @classdesc @@ -26,11 +26,12 @@ var Animation = require('../../animations/Animation'); * can also create animations that are stored locally within it. See the `create method * for more details. * - * Prior to Phaser 3.50 this component was called just `Animation`. It was renamed to - * `AnimationState` in 3.50 to help better separate it from the `Animation` class. + * Prior to Phaser 3.50 this component was called just `Animation` and lived in the + * `Phaser.GameObjects.Components` namespace. It was renamed to `AnimationState` + * in 3.50 to help better identify its true purpose when browsing the documentation. * * @class AnimationState - * @memberof Phaser.GameObjects.Components + * @memberof Phaser.Animations * @constructor * @since 3.0.0 * @@ -45,7 +46,10 @@ var AnimationState = new Class({ /** * The Game Object to which this animation component belongs. * - * @name Phaser.GameObjects.Components.AnimationState#parent + * You can typically access this component from the Game Object + * via the `this.anims` property. + * + * @name Phaser.Animations.AnimationState#parent * @type {Phaser.GameObjects.GameObject} * @since 3.0.0 */ @@ -54,7 +58,7 @@ var AnimationState = new Class({ /** * A reference to the global Animation Manager. * - * @name Phaser.GameObjects.Components.AnimationState#animationManager + * @name Phaser.Animations.AnimationState#animationManager * @type {Phaser.Animations.AnimationManager} * @since 3.0.0 */ @@ -65,7 +69,7 @@ var AnimationState = new Class({ /** * A reference to the Texture Manager. * - * @name Phaser.GameObjects.Components.AnimationState#textureManager + * @name Phaser.Animations.AnimationState#textureManager * @type {Phaser.Textures.TextureManager} * @protected * @since 3.50.0 @@ -78,7 +82,7 @@ var AnimationState = new Class({ * Do not modify the contents of this Map directly, instead use the * `add`, `create` and `remove` methods of this class instead. * - * @name Phaser.GameObjects.Components.AnimationState#anims + * @name Phaser.Animations.AnimationState#anims * @type {Phaser.Structs.Map.} * @protected * @since 3.50.0 @@ -88,7 +92,7 @@ var AnimationState = new Class({ /** * Is an animation currently playing or not? * - * @name Phaser.GameObjects.Components.AnimationState#isPlaying + * @name Phaser.Animations.AnimationState#isPlaying * @type {boolean} * @default false * @since 3.0.0 @@ -98,7 +102,7 @@ var AnimationState = new Class({ /** * Has the current animation started playing, or is it waiting for a delay to expire? * - * @name Phaser.GameObjects.Components.AnimationState#hasStarted + * @name Phaser.Animations.AnimationState#hasStarted * @type {boolean} * @default false * @since 3.50.0 @@ -110,7 +114,7 @@ var AnimationState = new Class({ * * Will by `null` if no animation is yet loaded. * - * @name Phaser.GameObjects.Components.AnimationState#currentAnim + * @name Phaser.Animations.AnimationState#currentAnim * @type {?Phaser.Animations.Animation} * @default null * @since 3.0.0 @@ -122,7 +126,7 @@ var AnimationState = new Class({ * * Will by `null` if no animation is yet loaded. * - * @name Phaser.GameObjects.Components.AnimationState#currentFrame + * @name Phaser.Animations.AnimationState#currentFrame * @type {?Phaser.Animations.AnimationFrame} * @default null * @since 3.0.0 @@ -135,7 +139,7 @@ var AnimationState = new Class({ * * Will by `null` if no animation has been queued. * - * @name Phaser.GameObjects.Components.AnimationState#nextAnim + * @name Phaser.Animations.AnimationState#nextAnim * @type {?(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} * @default null * @since 3.16.0 @@ -147,7 +151,7 @@ var AnimationState = new Class({ * * Populate this queue via the `chain` method. * - * @name Phaser.GameObjects.Components.AnimationState#nextAnimsQueue + * @name Phaser.Animations.AnimationState#nextAnimsQueue * @type {array} * @since 3.24.0 */ @@ -164,7 +168,7 @@ var AnimationState = new Class({ * * Prior to Phaser 3.50 this property was private and called `_timeScale`. * - * @name Phaser.GameObjects.Components.AnimationState#timeScale + * @name Phaser.Animations.AnimationState#timeScale * @type {number} * @default 1 * @since 3.50.0 @@ -178,7 +182,7 @@ var AnimationState = new Class({ * be treated as read-only, as changing it once playback has started will not alter * the animation. To change the frame rate, provide a new value in the `PlayAnimationConfig` object. * - * @name Phaser.GameObjects.Components.AnimationState#frameRate + * @name Phaser.Animations.AnimationState#frameRate * @type {number} * @default 0 * @since 3.0.0 @@ -192,7 +196,7 @@ var AnimationState = new Class({ * be treated as read-only, as changing it once playback has started will not alter * the animation. To change the duration, provide a new value in the `PlayAnimationConfig` object. * - * @name Phaser.GameObjects.Components.AnimationState#duration + * @name Phaser.Animations.AnimationState#duration * @type {number} * @default 0 * @since 3.0.0 @@ -206,7 +210,7 @@ var AnimationState = new Class({ * This value is calculated when a new animation is loaded into this component and should * be treated as read-only. Changing it will not alter playback speed. * - * @name Phaser.GameObjects.Components.AnimationState#msPerFrame + * @name Phaser.Animations.AnimationState#msPerFrame * @type {number} * @default 0 * @since 3.0.0 @@ -216,7 +220,7 @@ var AnimationState = new Class({ /** * Skip frames if the time lags, or always advanced anyway? * - * @name Phaser.GameObjects.Components.AnimationState#skipMissedFrames + * @name Phaser.Animations.AnimationState#skipMissedFrames * @type {boolean} * @default true * @since 3.0.0 @@ -232,7 +236,7 @@ var AnimationState = new Class({ * * Prior to Phaser 3.50 this property was private and called `_delay`. * - * @name Phaser.GameObjects.Components.AnimationState#delay + * @name Phaser.Animations.AnimationState#delay * @type {number} * @default 0 * @since 3.50.0 @@ -250,7 +254,7 @@ var AnimationState = new Class({ * * Prior to Phaser 3.50 this property was private and called `_repeat`. * - * @name Phaser.GameObjects.Components.AnimationState#repeat + * @name Phaser.Animations.AnimationState#repeat * @type {number} * @default 0 * @since 3.50.0 @@ -267,7 +271,7 @@ var AnimationState = new Class({ * * Prior to Phaser 3.50 this property was private and called `_repeatDelay`. * - * @name Phaser.GameObjects.Components.AnimationState#repeatDelay + * @name Phaser.Animations.AnimationState#repeatDelay * @type {number} * @default 0 * @since 3.0.0 @@ -286,7 +290,7 @@ var AnimationState = new Class({ * * Prior to Phaser 3.50 this property was private and called `_yoyo`. * - * @name Phaser.GameObjects.Components.AnimationState#yoyo + * @name Phaser.Animations.AnimationState#yoyo * @type {boolean} * @default false * @since 3.50.0 @@ -301,7 +305,7 @@ var AnimationState = new Class({ * This value is set when a new animation is loaded into this component, but can also be modified * at run-time, assuming the animation is currently delayed. * - * @name Phaser.GameObjects.Components.AnimationState#showOnStart + * @name Phaser.Animations.AnimationState#showOnStart * @type {boolean} * @since 3.50.0 */ @@ -313,7 +317,7 @@ var AnimationState = new Class({ * This value is set when a new animation is loaded into this component, but can also be modified * at run-time, assuming the animation is still actively playing. * - * @name Phaser.GameObjects.Components.AnimationState#hideOnComplete + * @name Phaser.Animations.AnimationState#hideOnComplete * @type {boolean} * @since 3.50.0 */ @@ -322,7 +326,7 @@ var AnimationState = new Class({ /** * Is the playhead moving forwards (`true`) or in reverse (`false`) ? * - * @name Phaser.GameObjects.Components.AnimationState#forward + * @name Phaser.Animations.AnimationState#forward * @type {boolean} * @default true * @since 3.0.0 @@ -336,7 +340,7 @@ var AnimationState = new Class({ * * Prior to Phaser 3.50 this property was private and called `_reverse`. * - * @name Phaser.GameObjects.Components.AnimationState#inReverse + * @name Phaser.Animations.AnimationState#inReverse * @type {boolean} * @default false * @since 3.50.0 @@ -348,7 +352,7 @@ var AnimationState = new Class({ * * This has the `delta` time added to it as part of the `update` step. * - * @name Phaser.GameObjects.Components.AnimationState#accumulator + * @name Phaser.Animations.AnimationState#accumulator * @type {number} * @default 0 * @since 3.0.0 @@ -360,7 +364,7 @@ var AnimationState = new Class({ * * This value is compared against the `accumulator` as part of the `update` step. * - * @name Phaser.GameObjects.Components.AnimationState#nextTick + * @name Phaser.Animations.AnimationState#nextTick * @type {number} * @default 0 * @since 3.0.0 @@ -373,7 +377,7 @@ var AnimationState = new Class({ * This is set via the `playAfterDelay` method, although it can be modified at run-time * if required, as long as the animation has not already started playing. * - * @name Phaser.GameObjects.Components.AnimationState#delayCounter + * @name Phaser.Animations.AnimationState#delayCounter * @type {number} * @default 0 * @since 3.50.0 @@ -386,7 +390,7 @@ var AnimationState = new Class({ * This value is set when a new animation is loaded into this component, but can also be modified * at run-time. * - * @name Phaser.GameObjects.Components.AnimationState#repeatCounter + * @name Phaser.Animations.AnimationState#repeatCounter * @type {number} * @default 0 * @since 3.0.0 @@ -396,7 +400,7 @@ var AnimationState = new Class({ /** * An internal flag keeping track of pending repeats. * - * @name Phaser.GameObjects.Components.AnimationState#pendingRepeat + * @name Phaser.Animations.AnimationState#pendingRepeat * @type {boolean} * @default false * @since 3.0.0 @@ -406,7 +410,7 @@ var AnimationState = new Class({ /** * Is the Animation paused? * - * @name Phaser.GameObjects.Components.AnimationState#_paused + * @name Phaser.Animations.AnimationState#_paused * @type {boolean} * @private * @default false @@ -417,7 +421,7 @@ var AnimationState = new Class({ /** * Was the animation previously playing before being paused? * - * @name Phaser.GameObjects.Components.AnimationState#_wasPlaying + * @name Phaser.Animations.AnimationState#_wasPlaying * @type {boolean} * @private * @default false @@ -433,7 +437,7 @@ var AnimationState = new Class({ * 2 = Waiting for repeat * 3 = Waiting for specific frame * - * @name Phaser.GameObjects.Components.AnimationState#_pendingStop + * @name Phaser.Animations.AnimationState#_pendingStop * @type {integer} * @private * @since 3.4.0 @@ -443,7 +447,7 @@ var AnimationState = new Class({ /** * Internal property used by _pendingStop. * - * @name Phaser.GameObjects.Components.AnimationState#_pendingStopValue + * @name Phaser.Animations.AnimationState#_pendingStopValue * @type {any} * @private * @since 3.4.0 @@ -465,7 +469,7 @@ var AnimationState = new Class({ * * Call this method with no arguments to reset all currently chained animations. * - * @method Phaser.GameObjects.Components.AnimationState#chain + * @method Phaser.Animations.AnimationState#chain * @since 3.16.0 * * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig|string[]|Phaser.Animations.Animation[]|Phaser.Types.Animations.PlayAnimationConfig[])} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object, or an array of them. @@ -511,7 +515,7 @@ var AnimationState = new Class({ * * Prior to Phaser 3.50 this method was called `getCurrentKey`. * - * @method Phaser.GameObjects.Components.AnimationState#getName + * @method Phaser.Animations.AnimationState#getName * @since 3.50.0 * * @return {string} The key of the Animation currently loaded into this component, or an empty string if none loaded. @@ -524,7 +528,7 @@ var AnimationState = new Class({ /** * Internal method used to load an animation into this component. * - * @method Phaser.GameObjects.Components.AnimationState#load + * @method Phaser.Animations.AnimationState#load * @protected * @since 3.0.0 * @@ -595,7 +599,7 @@ var AnimationState = new Class({ * Pause the current animation and set the `isPlaying` property to `false`. * You can optionally pause it at a specific frame. * - * @method Phaser.GameObjects.Components.AnimationState#pause + * @method Phaser.Animations.AnimationState#pause * @since 3.0.0 * * @param {Phaser.Animations.AnimationFrame} [atFrame] - An optional frame to set after pausing the animation. @@ -623,7 +627,7 @@ var AnimationState = new Class({ * Resumes playback of a paused animation and sets the `isPlaying` property to `true`. * You can optionally tell it to start playback from a specific frame. * - * @method Phaser.GameObjects.Components.AnimationState#resume + * @method Phaser.Animations.AnimationState#resume * @since 3.0.0 * * @param {Phaser.Animations.AnimationFrame} [fromFrame] - An optional frame to set before restarting playback. @@ -658,7 +662,7 @@ var AnimationState = new Class({ * * Prior to Phaser 3.50 this method was called 'delayedPlay'. * - * @method Phaser.GameObjects.Components.AnimationState#playAfterDelay + * @method Phaser.Animations.AnimationState#playAfterDelay * @fires Phaser.Animations.Events#ANIMATION_START * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START @@ -706,7 +710,7 @@ var AnimationState = new Class({ * * If no animation is currently running, the given one will start immediately. * - * @method Phaser.GameObjects.Components.AnimationState#playAfterRepeat + * @method Phaser.Animations.AnimationState#playAfterRepeat * @fires Phaser.Animations.Events#ANIMATION_START * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START @@ -801,7 +805,7 @@ var AnimationState = new Class({ * * Also, see the documentation in the Animation Manager for further details on creating animations. * - * @method Phaser.GameObjects.Components.AnimationState#play + * @method Phaser.Animations.AnimationState#play * @fires Phaser.Animations.Events#ANIMATION_START * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START @@ -898,7 +902,7 @@ var AnimationState = new Class({ * * Also, see the documentation in the Animation Manager for further details on creating animations. * - * @method Phaser.GameObjects.Components.AnimationState#playReverse + * @method Phaser.Animations.AnimationState#playReverse * @fires Phaser.Animations.Events#ANIMATION_START * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START @@ -934,7 +938,7 @@ var AnimationState = new Class({ * Load the animation based on the key and set-up all of the internal values * needed for playback to start. If there is no delay, it will also fire the start events. * - * @method Phaser.GameObjects.Components.AnimationState#startAnimation + * @method Phaser.Animations.AnimationState#startAnimation * @fires Phaser.Animations.Events#ANIMATION_START * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START @@ -983,7 +987,7 @@ var AnimationState = new Class({ /** * Handles the start of an animation playback. * - * @method Phaser.GameObjects.Components.AnimationState#handleStart + * @method Phaser.Animations.AnimationState#handleStart * @private * @since 3.50.0 */ @@ -1004,7 +1008,7 @@ var AnimationState = new Class({ /** * Handles the repeat of an animation. * - * @method Phaser.GameObjects.Components.AnimationState#handleRepeat + * @method Phaser.Animations.AnimationState#handleRepeat * @private * @since 3.50.0 */ @@ -1018,7 +1022,7 @@ var AnimationState = new Class({ /** * Handles the stop of an animation playback. * - * @method Phaser.GameObjects.Components.AnimationState#handleStop + * @method Phaser.Animations.AnimationState#handleStop * @private * @since 3.50.0 */ @@ -1034,7 +1038,7 @@ var AnimationState = new Class({ /** * Handles the completion of an animation playback. * - * @method Phaser.GameObjects.Components.AnimationState#handleComplete + * @method Phaser.Animations.AnimationState#handleComplete * @private * @since 3.50.0 */ @@ -1055,7 +1059,7 @@ var AnimationState = new Class({ /** * Fires the given animation events. * - * @method Phaser.GameObjects.Components.AnimationState#emitEvents + * @method Phaser.Animations.AnimationState#emitEvents * @private * @since 3.50.0 * @@ -1078,7 +1082,7 @@ var AnimationState = new Class({ /** * Reverse the Animation that is already playing on the Game Object. * - * @method Phaser.GameObjects.Components.AnimationState#reverse + * @method Phaser.Animations.AnimationState#reverse * @since 3.12.0 * * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. @@ -1101,7 +1105,7 @@ var AnimationState = new Class({ * The value is based on the current frame and how far that is in the animation, it is not based on * the duration of the animation. * - * @method Phaser.GameObjects.Components.AnimationState#getProgress + * @method Phaser.Animations.AnimationState#getProgress * @since 3.4.0 * * @return {number} The progress of the current animation in frames, between 0 and 1. @@ -1133,7 +1137,7 @@ var AnimationState = new Class({ * The value is based on the current frame and how far that is in the animation, it is not based on * the duration of the animation. * - * @method Phaser.GameObjects.Components.AnimationState#setProgress + * @method Phaser.Animations.AnimationState#setProgress * @since 3.4.0 * * @param {number} [value=0] - The progress value, between 0 and 1. @@ -1163,7 +1167,7 @@ var AnimationState = new Class({ * value specified here will be overwritten when the next animation loads in. To avoid this, * use the `repeat` property of the `PlayAnimationConfig` object instead. * - * @method Phaser.GameObjects.Components.AnimationState#setRepeat + * @method Phaser.Animations.AnimationState#setRepeat * @since 3.4.0 * * @param {integer} value - The number of times that the animation should repeat. @@ -1180,7 +1184,7 @@ var AnimationState = new Class({ /** * Handle the removal of an animation from the Animation Manager. * - * @method Phaser.GameObjects.Components.AnimationState#globalRemove + * @method Phaser.Animations.AnimationState#globalRemove * @since 3.50.0 * * @param {string} [key] - The key of the removed Animation. @@ -1208,7 +1212,7 @@ var AnimationState = new Class({ * If you `includeDelay` then it will also fire the `ANIMATION_START` series of events once * the delay has expired, otherwise, playback will just begin immediately. * - * @method Phaser.GameObjects.Components.AnimationState#restart + * @method Phaser.Animations.AnimationState#restart * @fires Phaser.Animations.Events#ANIMATION_RESTART * @fires Phaser.Animations.Events#SPRITE_ANIMATION_RESTART * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART @@ -1265,7 +1269,7 @@ var AnimationState = new Class({ * * If another animation has been queued for playback, it will be started after the events fire. * - * @method Phaser.GameObjects.Components.AnimationState#complete + * @method Phaser.Animations.AnimationState#complete * @fires Phaser.Animations.Events#ANIMATION_COMPLETE * @fires Phaser.Animations.Events#SPRITE_ANIMATION_COMPLETE * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_COMPLETE @@ -1303,7 +1307,7 @@ var AnimationState = new Class({ * * If there is another animation in the queue (set via the `chain` method) then it will start playing. * - * @method Phaser.GameObjects.Components.AnimationState#stop + * @method Phaser.Animations.AnimationState#stop * @fires Phaser.Animations.Events#ANIMATION_STOP * @fires Phaser.Animations.Events#SPRITE_ANIMATION_STOP * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_STOP @@ -1344,7 +1348,7 @@ var AnimationState = new Class({ * If there is another animation in the queue (set via the `chain` method) then it will start playing, * when the current one stops. * - * @method Phaser.GameObjects.Components.AnimationState#stopAfterDelay + * @method Phaser.Animations.AnimationState#stopAfterDelay * @fires Phaser.Animations.Events#ANIMATION_STOP * @fires Phaser.Animations.Events#SPRITE_ANIMATION_STOP * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_STOP @@ -1374,7 +1378,7 @@ var AnimationState = new Class({ * * Prior to Phaser 3.50 this method was called `stopOnRepeat` and had no parameters. * - * @method Phaser.GameObjects.Components.AnimationState#stopAfterRepeat + * @method Phaser.Animations.AnimationState#stopAfterRepeat * @fires Phaser.Animations.Events#ANIMATION_STOP * @fires Phaser.Animations.Events#SPRITE_ANIMATION_STOP * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_STOP @@ -1410,7 +1414,7 @@ var AnimationState = new Class({ * If there is another animation in the queue (set via the `chain` method) then it will start playing, * when the current one stops. * - * @method Phaser.GameObjects.Components.AnimationState#stopOnFrame + * @method Phaser.Animations.AnimationState#stopOnFrame * @fires Phaser.Animations.Events#ANIMATION_STOP * @fires Phaser.Animations.Events#SPRITE_ANIMATION_STOP * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_STOP @@ -1432,7 +1436,7 @@ var AnimationState = new Class({ * Returns the total number of frames in this animation, or returns zero if no * animation has been loaded. * - * @method Phaser.GameObjects.Components.AnimationState#getTotalFrames + * @method Phaser.Animations.AnimationState#getTotalFrames * @since 3.4.0 * * @return {integer} The total number of frames in the current animation, or zero if no animation has been loaded. @@ -1447,7 +1451,7 @@ var AnimationState = new Class({ * * This is called automatically by the `Sprite.preUpdate` method. * - * @method Phaser.GameObjects.Components.AnimationState#update + * @method Phaser.Animations.AnimationState#update * @since 3.0.0 * * @param {number} time - The current timestamp. @@ -1523,7 +1527,7 @@ var AnimationState = new Class({ * Sets the given Animation Frame as being the current frame * and applies it to the parent Game Object, adjusting size and origin as needed. * - * @method Phaser.GameObjects.Components.AnimationState#setCurrentFrame + * @method Phaser.Animations.AnimationState#setCurrentFrame * @fires Phaser.Animations.Events#ANIMATION_UPDATE * @fires Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE @@ -1589,7 +1593,7 @@ var AnimationState = new Class({ * Calling this does not change the direction of the animation. I.e. if it was currently * playing in reverse, calling this method doesn't then change the direction to forwards. * - * @method Phaser.GameObjects.Components.AnimationState#nextFrame + * @method Phaser.Animations.AnimationState#nextFrame * @since 3.16.0 * * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. @@ -1611,7 +1615,7 @@ var AnimationState = new Class({ * Calling this does not change the direction of the animation. I.e. if it was currently * playing in forwards, calling this method doesn't then change the direction to backwards. * - * @method Phaser.GameObjects.Components.AnimationState#previousFrame + * @method Phaser.Animations.AnimationState#previousFrame * @since 3.16.0 * * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. @@ -1631,7 +1635,7 @@ var AnimationState = new Class({ * * See the `create` method for more details. * - * @method Phaser.GameObjects.Components.AnimationState#get + * @method Phaser.Animations.AnimationState#get * @since 3.50.0 * * @param {string} key - The key of the Animation to retrieve. @@ -1646,7 +1650,7 @@ var AnimationState = new Class({ /** * Checks to see if the given key is already used locally within the animations stored on this Sprite. * - * @method Phaser.GameObjects.Components.AnimationState#exists + * @method Phaser.Animations.AnimationState#exists * @since 3.50.0 * * @param {string} key - The key of the Animation to check. @@ -1675,7 +1679,7 @@ var AnimationState = new Class({ * * If you wish to re-use an existing key, call the `remove` method first, then this method. * - * @method Phaser.GameObjects.Components.AnimationState#create + * @method Phaser.Animations.AnimationState#create * @since 3.50.0 * * @param {Phaser.Types.Animations.Animation} config - The configuration settings for the Animation. @@ -1713,7 +1717,7 @@ var AnimationState = new Class({ * * Once an Animation has been removed, this Sprite cannot play it again without re-creating it. * - * @method Phaser.GameObjects.Components.AnimationState#remove + * @method Phaser.Animations.AnimationState#remove * @since 3.50.0 * * @param {string} key - The key of the animation to remove. @@ -1742,7 +1746,7 @@ var AnimationState = new Class({ * * Unregisters event listeners and cleans up its references. * - * @method Phaser.GameObjects.Components.AnimationState#destroy + * @method Phaser.Animations.AnimationState#destroy * @since 3.0.0 */ destroy: function () @@ -1766,7 +1770,7 @@ var AnimationState = new Class({ /** * `true` if the current animation is paused, otherwise `false`. * - * @name Phaser.GameObjects.Components.AnimationState#isPaused + * @name Phaser.Animations.AnimationState#isPaused * @readonly * @type {boolean} * @since 3.4.0 diff --git a/src/animations/index.js b/src/animations/index.js index ec66713ec..f4a35ac72 100644 --- a/src/animations/index.js +++ b/src/animations/index.js @@ -13,6 +13,7 @@ module.exports = { Animation: require('./Animation'), AnimationFrame: require('./AnimationFrame'), AnimationManager: require('./AnimationManager'), + AnimationState: require('./AnimationState'), Events: require('./events') }; diff --git a/src/gameobjects/components/index.js b/src/gameobjects/components/index.js index 29ec02ec8..41e0406a3 100644 --- a/src/gameobjects/components/index.js +++ b/src/gameobjects/components/index.js @@ -12,7 +12,6 @@ module.exports = { Alpha: require('./Alpha'), AlphaSingle: require('./AlphaSingle'), - AnimationState: require('./AnimationState'), BlendMode: require('./BlendMode'), ComputedSize: require('./ComputedSize'), Crop: require('./Crop'), diff --git a/src/gameobjects/sprite/Sprite.js b/src/gameobjects/sprite/Sprite.js index 66e7a95a5..20cbca20f 100644 --- a/src/gameobjects/sprite/Sprite.js +++ b/src/gameobjects/sprite/Sprite.js @@ -4,6 +4,7 @@ * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var AnimationState = require('../../animations/AnimationState'); var Class = require('../../utils/Class'); var Components = require('../components'); var GameObject = require('../GameObject'); @@ -95,10 +96,10 @@ var Sprite = new Class({ * mixing between animations and setting the current animation frame to this Sprite. * * @name Phaser.GameObjects.Sprite#anims - * @type {Phaser.GameObjects.Components.AnimationState} + * @type {Phaser.Animations.AnimationState} * @since 3.0.0 */ - this.anims = new Components.AnimationState(this); + this.anims = new AnimationState(this); this.setTexture(texture, frame); this.setPosition(x, y); diff --git a/src/physics/matter-js/MatterSprite.js b/src/physics/matter-js/MatterSprite.js index f1f773add..6eafb5eaf 100644 --- a/src/physics/matter-js/MatterSprite.js +++ b/src/physics/matter-js/MatterSprite.js @@ -4,7 +4,7 @@ * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AnimationState = require('../../gameobjects/components/AnimationState'); +var AnimationState = require('../../animations/AnimationState'); var Class = require('../../utils/Class'); var Components = require('./components'); var GameObject = require('../../gameobjects/GameObject'); From 47f5cec6af8d9b867280ba879e151878acd29edd Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 8 Sep 2020 09:32:01 +0100 Subject: [PATCH 230/241] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a28dc8ab7..042f03b52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -218,7 +218,7 @@ If you use Animations in your game, please read the following important API chan The Animation API has had a significant overhaul to improve playback handling. Instead of just playing an animation based on its global key, you can now supply a new `PlayAnimationConfig` object instead, which allows you to override any of the default animation settings, such as `duration`, `delay` and `yoyo` (see below for the full list). This means you no longer have to create lots of duplicate animations, just to change properties such as `duration`, and can now set them dynamically at run-time as well. -* The Game Object `Component.Animation` component has been renamed to `AnimationState` to help separate it from the same-named Animation class that also exists. +* The Game Object `Component.Animation` component has been renamed to `AnimationState` and has moved namespace. It's now in `Phaser.Animations` instead of `GameObjects.Components` to help differentiate it from the `Animation` class when browsing the documentation. * The `play`, `playReverse`, `playAfterDelay`, `playAfterRepeat` and `chain` Sprite and Animation Component methods can now all take a `Phaser.Types.Animations.PlayAnimationConfig` configuration object, as well as a string, as the `key` parameter. This allows you to override any default animation setting with those defined in the config, giving you far greater control over animations on a Game Object level, without needing to globally duplicate them. * `AnimationState.create` is a new method that allows you to create animations directly on a Sprite. These are not global and never enter the Animation Manager, instead risiding within the Sprite itself. This allows you to use the same keys across both local and global animations and set-up Sprite specific local animations. * All playback methods: `play`, `playReverse`, `playAfterDelay` and `playAfterRepeat` will now check to see if the given animation key exists locally on the Sprite first. If it does, it's used, otherwise it then checks the global Animation Manager for the key instead. From bbbae648b9fe1d0deec0a8c3ee82d4840a017363 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 8 Sep 2020 12:16:39 +0100 Subject: [PATCH 231/241] Deleted un-used events, renamed Sprite events and added lots more documentation. --- .../events/ANIMATION_COMPLETE_EVENT.js | 37 ++++++++++++++----- .../events/ANIMATION_REPEAT_EVENT.js | 35 +++++++++++++----- .../events/ANIMATION_RESTART_EVENT.js | 34 +++++++++++------ .../events/ANIMATION_START_EVENT.js | 35 ++++++++++++------ src/animations/events/ANIMATION_STOP_EVENT.js | 26 ++++++++++--- .../events/ANIMATION_UPDATE_EVENT.js | 27 +++++++++++--- .../events/SPRITE_ANIMATION_COMPLETE_EVENT.js | 23 ------------ .../SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js | 22 ----------- .../SPRITE_ANIMATION_KEY_REPEAT_EVENT.js | 23 ------------ .../SPRITE_ANIMATION_KEY_RESTART_EVENT.js | 22 ----------- .../SPRITE_ANIMATION_KEY_START_EVENT.js | 22 ----------- .../events/SPRITE_ANIMATION_KEY_STOP_EVENT.js | 24 ------------ .../SPRITE_ANIMATION_KEY_UPDATE_EVENT.js | 23 ------------ .../events/SPRITE_ANIMATION_REPEAT_EVENT.js | 24 ------------ .../events/SPRITE_ANIMATION_RESTART_EVENT.js | 23 ------------ .../events/SPRITE_ANIMATION_START_EVENT.js | 23 ------------ .../events/SPRITE_ANIMATION_STOP_EVENT.js | 26 ------------- .../events/SPRITE_ANIMATION_UPDATE_EVENT.js | 24 ------------ src/animations/events/index.js | 14 +------ 19 files changed, 142 insertions(+), 345 deletions(-) delete mode 100644 src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js delete mode 100644 src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js delete mode 100644 src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js delete mode 100644 src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js delete mode 100644 src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js delete mode 100644 src/animations/events/SPRITE_ANIMATION_KEY_STOP_EVENT.js delete mode 100644 src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js delete mode 100644 src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js delete mode 100644 src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js delete mode 100644 src/animations/events/SPRITE_ANIMATION_START_EVENT.js delete mode 100644 src/animations/events/SPRITE_ANIMATION_STOP_EVENT.js delete mode 100644 src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js diff --git a/src/animations/events/ANIMATION_COMPLETE_EVENT.js b/src/animations/events/ANIMATION_COMPLETE_EVENT.js index 0c36c0d72..fe41a8109 100644 --- a/src/animations/events/ANIMATION_COMPLETE_EVENT.js +++ b/src/animations/events/ANIMATION_COMPLETE_EVENT.js @@ -6,17 +6,34 @@ /** * The Animation Complete Event. - * - * This event is dispatched by an Animation instance when it completes, i.e. finishes playing or is manually stopped. - * - * Be careful with the volume of events this could generate. If a group of Sprites all complete the same - * animation at the same time, this event will invoke its handler for each one of them. + * + * This event is dispatched by a Sprite when an animation playing on it completes playback. + * This happens when the animation gets to the end of its sequence, factoring in any delays + * or repeats it may have to process. + * + * An animation that is set to loop, or repeat forever, will never fire this event, because + * it never actually completes. If you need to handle this, listen for the `ANIMATION_STOP` + * event instead, as this is emitted when the animation is stopped directly. + * + * Listen for it on the Sprite using `sprite.on('animationcomplete', listener)` + * + * The animation event flow is as follows: + * + * 1. `ANIMATION_START` + * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) + * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) + * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * + * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. + * + * If the animation is restarted while it is already playing, `ANIMATION_RESTART` is emitted. * * @event Phaser.Animations.Events#ANIMATION_COMPLETE - * @since 3.16.1 - * + * @since 3.50.0 + * * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated. + * @param {string} frameKey - The unique key of the Animation Frame within the Animation. */ -module.exports = 'complete'; +module.exports = 'animationcomplete'; diff --git a/src/animations/events/ANIMATION_REPEAT_EVENT.js b/src/animations/events/ANIMATION_REPEAT_EVENT.js index d79dcde80..82184b69c 100644 --- a/src/animations/events/ANIMATION_REPEAT_EVENT.js +++ b/src/animations/events/ANIMATION_REPEAT_EVENT.js @@ -6,16 +6,31 @@ /** * The Animation Repeat Event. - * - * This event is dispatched when a currently playing animation repeats. - * - * The event is dispatched directly from the Animation object itself. Which means that listeners - * bound to this event will be invoked every time the Animation repeats, for every Game Object that may have it. + * + * This event is dispatched by a Sprite when an animation repeats playing on it. + * This happens if the animation was created, or played, with a `repeat` value specified. + * + * An animation will repeat when it reaches the end of its sequence. + * + * Listen for it on the Sprite using `sprite.on('animationrepeat', listener)` + * + * The animation event flow is as follows: + * + * 1. `ANIMATION_START` + * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) + * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) + * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * + * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. + * + * If the animation is restarted while it is already playing, `ANIMATION_RESTART` is emitted. * * @event Phaser.Animations.Events#ANIMATION_REPEAT - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that repeated. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation was on when it repeated. + * @since 3.50.0 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has repeated. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated. + * @param {string} frameKey - The unique key of the Animation Frame within the Animation. */ -module.exports = 'repeat'; +module.exports = 'animationrepeat'; diff --git a/src/animations/events/ANIMATION_RESTART_EVENT.js b/src/animations/events/ANIMATION_RESTART_EVENT.js index e959a464b..685414c36 100644 --- a/src/animations/events/ANIMATION_RESTART_EVENT.js +++ b/src/animations/events/ANIMATION_RESTART_EVENT.js @@ -6,17 +6,29 @@ /** * The Animation Restart Event. - * - * This event is dispatched by an Animation instance when it restarts. - * - * Be careful with the volume of events this could generate. If a group of Sprites all restart the same - * animation at the same time, this event will invoke its handler for each one of them. + * + * This event is dispatched by a Sprite when an animation restarts playing on it. + * This only happens when the `Sprite.anims.restart` method is called. + * + * Listen for it on the Sprite using `sprite.on('animationrestart', listener)` + * + * The animation event flow is as follows: + * + * 1. `ANIMATION_START` + * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) + * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) + * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * + * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. + * + * If the animation is restarted while it is already playing, `ANIMATION_RESTART` is emitted. * * @event Phaser.Animations.Events#ANIMATION_RESTART - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that restarted playing. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing. + * @since 3.50.0 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has restarted. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted. + * @param {string} frameKey - The unique key of the Animation Frame within the Animation. */ -module.exports = 'restart'; +module.exports = 'animationrestart'; diff --git a/src/animations/events/ANIMATION_START_EVENT.js b/src/animations/events/ANIMATION_START_EVENT.js index 8d65cb818..1bbd36f42 100644 --- a/src/animations/events/ANIMATION_START_EVENT.js +++ b/src/animations/events/ANIMATION_START_EVENT.js @@ -6,17 +6,30 @@ /** * The Animation Start Event. - * - * This event is dispatched by an Animation instance when it starts playing. - * - * Be careful with the volume of events this could generate. If a group of Sprites all play the same - * animation at the same time, this event will invoke its handler for each one of them. + * + * This event is dispatched by a Sprite when an animation starts playing on it. + * This happens when the animation is played, factoring in any delay that may have been specified. + * This event happens after the delay has expired and prior to the first update event. + * + * Listen for it on the Sprite using `sprite.on('animationstart', listener)` + * + * The animation event flow is as follows: + * + * 1. `ANIMATION_START` + * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) + * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) + * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * + * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. + * + * If the animation is restarted while it is already playing, `ANIMATION_RESTART` is emitted. * * @event Phaser.Animations.Events#ANIMATION_START - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that started playing. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing. + * @since 3.50.0 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has started. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started. + * @param {string} frameKey - The unique key of the Animation Frame within the Animation. */ -module.exports = 'start'; +module.exports = 'animationstart'; diff --git a/src/animations/events/ANIMATION_STOP_EVENT.js b/src/animations/events/ANIMATION_STOP_EVENT.js index 687e7a0f2..013f13860 100644 --- a/src/animations/events/ANIMATION_STOP_EVENT.js +++ b/src/animations/events/ANIMATION_STOP_EVENT.js @@ -7,15 +7,29 @@ /** * The Animation Stop Event. * - * This event is dispatched by an Animation instance when playback is forcibly stopped on it, - * i.e. `Sprite.stop()`, or similar, is called. Or, a new animation is started before the - * previous one completes. + * This event is dispatched by a Sprite when an animation is stopped on it. An animation + * will only be stopeed if a method such as `Sprite.stop` or `Sprite.anims.stopAfterDelay` + * is called. It can also be emitted if a new animation is started before the current one completes. + * + * Listen for it on the Sprite using `sprite.on('animationstop', listener)` + * + * The animation event flow is as follows: + * + * 1. `ANIMATION_START` + * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) + * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) + * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * + * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. + * + * If the animation is restarted while it is already playing, `ANIMATION_RESTART` is emitted. * * @event Phaser.Animations.Events#ANIMATION_STOP * @since 3.50.0 * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was stopped. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation stopped on. + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has stopped. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation stopped. + * @param {string} frameKey - The unique key of the Animation Frame within the Animation. */ -module.exports = 'stop'; +module.exports = 'animationstop'; diff --git a/src/animations/events/ANIMATION_UPDATE_EVENT.js b/src/animations/events/ANIMATION_UPDATE_EVENT.js index 26b28b2b9..9ce2a17b7 100644 --- a/src/animations/events/ANIMATION_UPDATE_EVENT.js +++ b/src/animations/events/ANIMATION_UPDATE_EVENT.js @@ -7,16 +7,33 @@ /** * The Animation Update Event. * - * This event is dispatched by an animation when it updates. This happens when the animation changes frame, - * based on the animation frame rate and other factors like `timeScale` and `delay`. + * This event is dispatched by a Sprite when an animation playing on it updates. This happens when the animation changes frame. + * An animation will change frame based on the frme rate and other factors like `timeScale` and `delay`. It can also change + * frame when stopped or restarted. * - * Listen for it on the Animation using `anim.on('update', listener)` + * Listen for it on the Sprite using `sprite.on('animationupdate', listener)` + * + * If an animation is playing faster than the game frame-rate can handle, it's entirely possible for it to emit several + * update events in a single game frame, so please be aware of this in your code. The **final** event received that frame + * is the one that is rendered to the game. + * + * The animation event flow is as follows: + * + * 1. `ANIMATION_START` + * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) + * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) + * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * + * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. + * + * If the animation is restarted while it is already playing, `ANIMATION_RESTART` is emitted. * * @event Phaser.Animations.Events#ANIMATION_UPDATE * @since 3.50.0 * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite. + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated. * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated. + * @param {string} frameKey - The unique key of the Animation Frame within the Animation. */ -module.exports = 'update'; +module.exports = 'animationupdate'; diff --git a/src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js b/src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js deleted file mode 100644 index 20e8fdb4b..000000000 --- a/src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Complete Event. - * - * This event is dispatched by a Sprite when an animation finishes playing on it. - * - * Listen for it on the Sprite using `sprite.on('animationcomplete', listener)` - * - * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_COMPLETE` event. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_COMPLETE - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed. - */ -module.exports = 'animationcomplete'; diff --git a/src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js b/src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js deleted file mode 100644 index a2ecb569c..000000000 --- a/src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Key Complete Event. - * - * This event is dispatched by a Sprite when a specific animation finishes playing on it. - * - * Listen for it on the Sprite using `sprite.on('animationcomplete-key', listener)` where `key` is the key of - * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationcomplete-explode`. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_COMPLETE - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed. - */ -module.exports = 'animationcomplete-'; diff --git a/src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js b/src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js deleted file mode 100644 index a20169d05..000000000 --- a/src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Key Repeat Event. - * - * This event is dispatched by a Sprite when a specific animation repeats playing on it. - * - * Listen for it on the Sprite using `sprite.on('animationrepeat-key', listener)` where `key` is the key of - * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrepeat-explode`. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. - * @param {integer} repeatCount - The number of times the Animation has repeated so far. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing. - */ -module.exports = 'animationrepeat-'; diff --git a/src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js b/src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js deleted file mode 100644 index da94d76bb..000000000 --- a/src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Key Restart Event. - * - * This event is dispatched by a Sprite when a specific animation restarts playing on it. - * - * Listen for it on the Sprite using `sprite.on('animationrestart-key', listener)` where `key` is the key of - * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrestart-explode`. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing. - */ -module.exports = 'animationrestart-'; diff --git a/src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js b/src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js deleted file mode 100644 index 65454deea..000000000 --- a/src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Key Start Event. - * - * This event is dispatched by a Sprite when a specific animation starts playing on it. - * - * Listen for it on the Sprite using `sprite.on('animationstart-key', listener)` where `key` is the key of - * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationstart-explode`. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing. - */ -module.exports = 'animationstart-'; diff --git a/src/animations/events/SPRITE_ANIMATION_KEY_STOP_EVENT.js b/src/animations/events/SPRITE_ANIMATION_KEY_STOP_EVENT.js deleted file mode 100644 index 2651caf06..000000000 --- a/src/animations/events/SPRITE_ANIMATION_KEY_STOP_EVENT.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Key Complete Event. - * - * This event is dispatched by a Sprite when animation playback is forcibly stopped on it, - * i.e. `Sprite.stop()`, or similar, is called. Or, a new animation is started before the - * previous one completes. - * - * Listen for it on the Sprite using `sprite.on('animationstop-key', listener)` where `key` is the key of - * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationstop-explode`. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_STOP - * @since 3.50.0 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was stopped. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation stopped on. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation stopped. - */ -module.exports = 'animationstop-'; diff --git a/src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js b/src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js deleted file mode 100644 index 2b21e5804..000000000 --- a/src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Key Update Event. - * - * This event is dispatched by a Sprite when a specific animation playing on it updates. This happens when the animation changes frame, - * based on the animation frame rate and other factors like `timeScale` and `delay`. - * - * Listen for it on the Sprite using `sprite.on('animationupdate-key', listener)` where `key` is the key of - * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationupdate-explode`. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated. - */ -module.exports = 'animationupdate-'; diff --git a/src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js b/src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js deleted file mode 100644 index 23ca4f3eb..000000000 --- a/src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Repeat Event. - * - * This event is dispatched by a Sprite when an animation repeats playing on it. - * - * Listen for it on the Sprite using `sprite.on('animationrepeat', listener)` - * - * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_REPEAT` event. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_REPEAT - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. - * @param {integer} repeatCount - The number of times the Animation has repeated so far. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing. - */ -module.exports = 'animationrepeat'; diff --git a/src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js b/src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js deleted file mode 100644 index 7f88df85e..000000000 --- a/src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Restart Event. - * - * This event is dispatched by a Sprite when an animation restarts playing on it. - * - * Listen for it on the Sprite using `sprite.on('animationrestart', listener)` - * - * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_RESTART` event. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_RESTART - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing. - */ -module.exports = 'animationrestart'; diff --git a/src/animations/events/SPRITE_ANIMATION_START_EVENT.js b/src/animations/events/SPRITE_ANIMATION_START_EVENT.js deleted file mode 100644 index f1e3eb390..000000000 --- a/src/animations/events/SPRITE_ANIMATION_START_EVENT.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Start Event. - * - * This event is dispatched by a Sprite when an animation starts playing on it. - * - * Listen for it on the Sprite using `sprite.on('animationstart', listener)` - * - * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_START` event. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_START - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing. - */ -module.exports = 'animationstart'; diff --git a/src/animations/events/SPRITE_ANIMATION_STOP_EVENT.js b/src/animations/events/SPRITE_ANIMATION_STOP_EVENT.js deleted file mode 100644 index 68a794704..000000000 --- a/src/animations/events/SPRITE_ANIMATION_STOP_EVENT.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Stop Event. - * - * This event is dispatched by a Sprite when animation playback is forcibly stopped on it, - * i.e. `Sprite.stop()`, or similar, is called. Or, a new animation is started before the - * previous one completes. - * - * Listen for it on the Sprite using `sprite.on('animationstop', listener)` - * - * This same event is dispatched for all animations. To listen for a specific animation, - * use the `SPRITE_ANIMATION_KEY_STOP` event. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_STOP - * @since 3.50.0 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was stopped. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation stopped on. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation stopped. - */ -module.exports = 'animationstop'; diff --git a/src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js b/src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js deleted file mode 100644 index 0bf94225f..000000000 --- a/src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Update Event. - * - * This event is dispatched by a Sprite when an animation playing on it updates. This happens when the animation changes frame, - * based on the animation frame rate and other factors like `timeScale` and `delay`. - * - * Listen for it on the Sprite using `sprite.on('animationupdate', listener)` - * - * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_UPDATE` event. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated. - */ -module.exports = 'animationupdate'; diff --git a/src/animations/events/index.js b/src/animations/events/index.js index dbffa31c9..9211331ca 100644 --- a/src/animations/events/index.js +++ b/src/animations/events/index.js @@ -19,18 +19,6 @@ module.exports = { ANIMATION_UPDATE: require('./ANIMATION_UPDATE_EVENT'), PAUSE_ALL: require('./PAUSE_ALL_EVENT'), REMOVE_ANIMATION: require('./REMOVE_ANIMATION_EVENT'), - RESUME_ALL: require('./RESUME_ALL_EVENT'), - SPRITE_ANIMATION_COMPLETE: require('./SPRITE_ANIMATION_COMPLETE_EVENT'), - SPRITE_ANIMATION_KEY_COMPLETE: require('./SPRITE_ANIMATION_KEY_COMPLETE_EVENT'), - SPRITE_ANIMATION_KEY_REPEAT: require('./SPRITE_ANIMATION_KEY_REPEAT_EVENT'), - SPRITE_ANIMATION_KEY_RESTART: require('./SPRITE_ANIMATION_KEY_RESTART_EVENT'), - SPRITE_ANIMATION_KEY_START: require('./SPRITE_ANIMATION_KEY_START_EVENT'), - SPRITE_ANIMATION_KEY_STOP: require('./SPRITE_ANIMATION_KEY_STOP_EVENT'), - SPRITE_ANIMATION_KEY_UPDATE: require('./SPRITE_ANIMATION_KEY_UPDATE_EVENT'), - SPRITE_ANIMATION_REPEAT: require('./SPRITE_ANIMATION_REPEAT_EVENT'), - SPRITE_ANIMATION_RESTART: require('./SPRITE_ANIMATION_RESTART_EVENT'), - SPRITE_ANIMATION_START: require('./SPRITE_ANIMATION_START_EVENT'), - SPRITE_ANIMATION_STOP: require('./SPRITE_ANIMATION_STOP_EVENT'), - SPRITE_ANIMATION_UPDATE: require('./SPRITE_ANIMATION_UPDATE_EVENT') + RESUME_ALL: require('./RESUME_ALL_EVENT') }; From d476032e9f5162ede69a0f83c49a58baa09b7c12 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 8 Sep 2020 12:17:18 +0100 Subject: [PATCH 232/241] Animation no longer extends the EventEmitter --- src/animations/Animation.js | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/animations/Animation.js b/src/animations/Animation.js index 8d51db36f..5927d122e 100644 --- a/src/animations/Animation.js +++ b/src/animations/Animation.js @@ -6,7 +6,6 @@ var Clamp = require('../math/Clamp'); var Class = require('../utils/Class'); -var EventEmitter = require('eventemitter3'); var Events = require('./events'); var FindClosestInSorted = require('../utils/array/FindClosestInSorted'); var Frame = require('./AnimationFrame'); @@ -17,15 +16,19 @@ var SortByDigits = require('../utils/array/SortByDigits'); * @classdesc * A Frame based Animation. * - * This consists of a key, some default values (like the frame rate) and a bunch of Frame objects. + * Animations in Phaser consist of a sequence of `AnimationFrame` objects, which are managed by + * this class, along with properties that impact playback, such as the animations frame rate + * or delay. * - * The Animation Manager creates these. Game Objects don't own an instance of these directly. - * Game Objects have the Animation Component, which are like playheads to global Animations (these objects) - * So multiple Game Objects can have playheads all pointing to this one Animation instance. + * This class contains all of the properties and methods needed to handle playback of the animation + * directly to an `AnimationState` instance, which is owned by a Sprite, or similar Game Object. + * + * You don't typically create an instance of this class directly, but instead go via + * either the `AnimationManager` or the `AnimationState` and use their `create` methods, + * depending on if you need a global animation, or local to a specific Sprite. * * @class Animation * @memberof Phaser.Animations - * @extends Phaser.Events.EventEmitter * @constructor * @since 3.0.0 * @@ -35,14 +38,10 @@ var SortByDigits = require('../utils/array/SortByDigits'); */ var Animation = new Class({ - Extends: EventEmitter, - initialize: function Animation (manager, key, config) { - EventEmitter.call(this); - /** * A reference to the global Animation Manager. * @@ -886,8 +885,6 @@ var Animation = new Class({ */ destroy: function () { - this.removeAllListeners(); - if (this.manager.off) { this.manager.off(Events.PAUSE_ALL, this.pause, this); From 09d96d4e5e8b7935dc516d14a61f71893710f105 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 8 Sep 2020 12:17:38 +0100 Subject: [PATCH 233/241] Now only dispatches one single event per action. Also added `getFrameName` method. --- src/animations/AnimationState.js | 82 +++++++++++++------------------- 1 file changed, 32 insertions(+), 50 deletions(-) diff --git a/src/animations/AnimationState.js b/src/animations/AnimationState.js index 443ec4b73..779957533 100644 --- a/src/animations/AnimationState.js +++ b/src/animations/AnimationState.js @@ -23,7 +23,7 @@ var Animation = require('./Animation'); * You can access its properties and methods via the `anims` property, i.e. `Sprite.anims`. * * As well as playing animations stored in the global Animation Manager, this component - * can also create animations that are stored locally within it. See the `create method + * can also create animations that are stored locally within it. See the `create` method * for more details. * * Prior to Phaser 3.50 this component was called just `Animation` and lived in the @@ -525,6 +525,19 @@ var AnimationState = new Class({ return (this.currentAnim) ? this.currentAnim.key : ''; }, + /** + * Returns the key of the animation frame currently displayed by this component. + * + * @method Phaser.Animations.AnimationState#getFrameName + * @since 3.50.0 + * + * @return {string} The key of the Animation Frame currently displayed by this component, or an empty string if no animation has been loaded. + */ + getFrameName: function () + { + return (this.currentFrame) ? this.currentFrame.textureFrame : ''; + }, + /** * Internal method used to load an animation into this component. * @@ -660,12 +673,10 @@ var AnimationState = new Class({ * * If no animation is currently running, the given one begins after the delay. * - * Prior to Phaser 3.50 this method was called 'delayedPlay'. + * Prior to Phaser 3.50 this method was called 'delayedPlay' and the parameters were in the reverse order. * * @method Phaser.Animations.AnimationState#playAfterDelay * @fires Phaser.Animations.Events#ANIMATION_START - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START * @since 3.50.0 * * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. @@ -712,8 +723,6 @@ var AnimationState = new Class({ * * @method Phaser.Animations.AnimationState#playAfterRepeat * @fires Phaser.Animations.Events#ANIMATION_START - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START * @since 3.50.0 * * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. @@ -807,8 +816,6 @@ var AnimationState = new Class({ * * @method Phaser.Animations.AnimationState#play * @fires Phaser.Animations.Events#ANIMATION_START - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START * @since 3.0.0 * * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. @@ -904,8 +911,6 @@ var AnimationState = new Class({ * * @method Phaser.Animations.AnimationState#playReverse * @fires Phaser.Animations.Events#ANIMATION_START - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START * @since 3.12.0 * * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. @@ -940,8 +945,6 @@ var AnimationState = new Class({ * * @method Phaser.Animations.AnimationState#startAnimation * @fires Phaser.Animations.Events#ANIMATION_START - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START * @since 3.50.0 * * @param {(string|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or a `PlayAnimationConfig` object. @@ -1002,7 +1005,7 @@ var AnimationState = new Class({ this.hasStarted = true; - this.emitEvents(Events.ANIMATION_START, Events.SPRITE_ANIMATION_KEY_START, Events.SPRITE_ANIMATION_START); + this.emitEvents(Events.ANIMATION_START); }, /** @@ -1016,7 +1019,7 @@ var AnimationState = new Class({ { this.pendingRepeat = false; - this.emitEvents(Events.ANIMATION_REPEAT, Events.SPRITE_ANIMATION_KEY_REPEAT, Events.SPRITE_ANIMATION_REPEAT); + this.emitEvents(Events.ANIMATION_REPEAT); }, /** @@ -1032,7 +1035,7 @@ var AnimationState = new Class({ this.isPlaying = false; - this.emitEvents(Events.ANIMATION_STOP, Events.SPRITE_ANIMATION_KEY_STOP, Events.SPRITE_ANIMATION_STOP); + this.emitEvents(Events.ANIMATION_STOP); }, /** @@ -1053,30 +1056,25 @@ var AnimationState = new Class({ this.parent.setVisible(false); } - this.emitEvents(Events.ANIMATION_COMPLETE, Events.SPRITE_ANIMATION_KEY_COMPLETE, Events.SPRITE_ANIMATION_COMPLETE); + this.emitEvents(Events.ANIMATION_COMPLETE); }, /** - * Fires the given animation events. + * Fires the given animation event. * * @method Phaser.Animations.AnimationState#emitEvents * @private * @since 3.50.0 * - * @param {string} animEvent - The Animation Event to dispatch. - * @param {string} spriteKeyEvent - The Sprite Key Event to dispatch. - * @param {string} spriteEvent - The Sprite Event to dispatch. + * @param {string} event - The Animation Event to dispatch. */ - emitEvents: function (animEvent, spriteKeyEvent, spriteEvent) + emitEvents: function (event) { var anim = this.currentAnim; var frame = this.currentFrame; var gameObject = this.parent; - anim.emit(animEvent, anim, frame, gameObject); - - gameObject.emit(spriteKeyEvent + anim.key, anim, frame, gameObject); - gameObject.emit(spriteEvent, anim, frame, gameObject); + gameObject.emit(event, anim, frame, gameObject, frame.textureFrame); }, /** @@ -1207,15 +1205,13 @@ var AnimationState = new Class({ * * You can optionally reset the delay and repeat counters as well. * - * Calling this will fire the `ANIMATION_RESTART` series of events immediately. + * Calling this will fire the `ANIMATION_RESTART` event immediately. * - * If you `includeDelay` then it will also fire the `ANIMATION_START` series of events once + * If you `includeDelay` then it will also fire the `ANIMATION_START` event once * the delay has expired, otherwise, playback will just begin immediately. * * @method Phaser.Animations.AnimationState#restart * @fires Phaser.Animations.Events#ANIMATION_RESTART - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_RESTART - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART * @since 3.0.0 * * @param {boolean} [includeDelay=false] - Whether to include the delay value of the animation when restarting. @@ -1243,7 +1239,7 @@ var AnimationState = new Class({ anim.getFirstTick(this); - this.emitEvents(Events.ANIMATION_RESTART, Events.SPRITE_ANIMATION_KEY_RESTART, Events.SPRITE_ANIMATION_RESTART); + this.emitEvents(Events.ANIMATION_RESTART); this.isPlaying = true; this.pendingRepeat = false; @@ -1261,7 +1257,7 @@ var AnimationState = new Class({ }, /** - * The current animation has completed. This dispatches the `ANIMATION_COMPLETE` series of events. + * The current animation has completed. This dispatches the `ANIMATION_COMPLETE` event. * * This method is called by the Animation instance and should not usually be invoked directly. * @@ -1271,8 +1267,6 @@ var AnimationState = new Class({ * * @method Phaser.Animations.AnimationState#complete * @fires Phaser.Animations.Events#ANIMATION_COMPLETE - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_COMPLETE - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_COMPLETE * @since 3.50.0 * * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. @@ -1301,7 +1295,7 @@ var AnimationState = new Class({ }, /** - * Immediately stops the current animation from playing and dispatches the `ANIMATION_STOP` series of events. + * Immediately stops the current animation from playing and dispatches the `ANIMATION_STOP` event. * * If no animation is running, no events will be dispatched. * @@ -1309,8 +1303,6 @@ var AnimationState = new Class({ * * @method Phaser.Animations.AnimationState#stop * @fires Phaser.Animations.Events#ANIMATION_STOP - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_STOP - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_STOP * @since 3.0.0 * * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. @@ -1341,7 +1333,7 @@ var AnimationState = new Class({ /** * Stops the current animation from playing after the specified time delay, given in milliseconds. * - * It then dispatches the `ANIMATION_STOP` series of events. + * It then dispatches the `ANIMATION_STOP` event. * * If no animation is running, no events will be dispatched. * @@ -1350,8 +1342,6 @@ var AnimationState = new Class({ * * @method Phaser.Animations.AnimationState#stopAfterDelay * @fires Phaser.Animations.Events#ANIMATION_STOP - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_STOP - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_STOP * @since 3.4.0 * * @param {integer} delay - The number of milliseconds to wait before stopping this animation. @@ -1369,7 +1359,7 @@ var AnimationState = new Class({ /** * Stops the current animation from playing when it next repeats. * - * It then dispatches the `ANIMATION_STOP` series of events. + * It then dispatches the `ANIMATION_STOP` event. * * If no animation is running, no events will be dispatched. * @@ -1380,8 +1370,6 @@ var AnimationState = new Class({ * * @method Phaser.Animations.AnimationState#stopAfterRepeat * @fires Phaser.Animations.Events#ANIMATION_STOP - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_STOP - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_STOP * @since 3.50.0 * * @param {integer} [repeatCount=1] - How many times should the animation repeat before stopping? @@ -1407,7 +1395,7 @@ var AnimationState = new Class({ * Stops the current animation from playing when it next sets the given frame. * If this frame doesn't exist within the animation it will not stop it from playing. * - * It then dispatches the `ANIMATION_STOP` series of events. + * It then dispatches the `ANIMATION_STOP` event. * * If no animation is running, no events will be dispatched. * @@ -1416,8 +1404,6 @@ var AnimationState = new Class({ * * @method Phaser.Animations.AnimationState#stopOnFrame * @fires Phaser.Animations.Events#ANIMATION_STOP - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_STOP - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_STOP * @since 3.4.0 * * @param {Phaser.Animations.AnimationFrame} frame - The frame to check before stopping this animation. @@ -1529,11 +1515,7 @@ var AnimationState = new Class({ * * @method Phaser.Animations.AnimationState#setCurrentFrame * @fires Phaser.Animations.Events#ANIMATION_UPDATE - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE * @fires Phaser.Animations.Events#ANIMATION_STOP - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_STOP - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_STOP * @since 3.4.0 * * @param {Phaser.Animations.AnimationFrame} animationFrame - The animation frame to change to. @@ -1575,7 +1557,7 @@ var AnimationState = new Class({ if (this.isPlaying && this.hasStarted) { - this.emitEvents(Events.ANIMATION_UPDATE, Events.SPRITE_ANIMATION_KEY_UPDATE, Events.SPRITE_ANIMATION_UPDATE); + this.emitEvents(Events.ANIMATION_UPDATE); if (this._pendingStop === 3 && this._pendingStopValue === animationFrame) { From bd56b0bd599545e9700dd2aaa1a9a32f3522bead Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 8 Sep 2020 12:17:45 +0100 Subject: [PATCH 234/241] Updated JSDocs --- src/gameobjects/sprite/Sprite.js | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/src/gameobjects/sprite/Sprite.js b/src/gameobjects/sprite/Sprite.js index 20cbca20f..35b4d64c8 100644 --- a/src/gameobjects/sprite/Sprite.js +++ b/src/gameobjects/sprite/Sprite.js @@ -191,8 +191,6 @@ var Sprite = new Class({ * * @method Phaser.GameObjects.Sprite#play * @fires Phaser.Animations.Events#ANIMATION_START - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START * @since 3.0.0 * * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. @@ -258,8 +256,6 @@ var Sprite = new Class({ * * @method Phaser.GameObjects.Sprite#playReverse * @fires Phaser.Animations.Events#ANIMATION_START - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START * @since 3.50.0 * * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. @@ -290,8 +286,6 @@ var Sprite = new Class({ * * @method Phaser.GameObjects.Components.Animation#playAfterDelay * @fires Phaser.Animations.Events#ANIMATION_START - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START * @since 3.50.0 * * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. @@ -319,8 +313,6 @@ var Sprite = new Class({ * * @method Phaser.GameObjects.Components.Animation#playAfterRepeat * @fires Phaser.Animations.Events#ANIMATION_START - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START * @since 3.50.0 * * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. @@ -374,8 +366,6 @@ var Sprite = new Class({ * * @method Phaser.GameObjects.Sprite#stop * @fires Phaser.Animations.Events#ANIMATION_STOP - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_STOP - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_STOP * @since 3.50.0 * * @return {this} This Game Object. @@ -388,7 +378,7 @@ var Sprite = new Class({ /** * Stops the current animation from playing after the specified time delay, given in milliseconds. * - * It then dispatches the `ANIMATION_STOP` series of events. + * It then dispatches the `ANIMATION_STOP` event. * * If no animation is running, no events will be dispatched. * @@ -397,8 +387,6 @@ var Sprite = new Class({ * * @method Phaser.GameObjects.Sprite#stopAfterDelay * @fires Phaser.Animations.Events#ANIMATION_STOP - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_STOP - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_STOP * @since 3.50.0 * * @param {integer} delay - The number of milliseconds to wait before stopping this animation. @@ -413,7 +401,7 @@ var Sprite = new Class({ /** * Stops the current animation from playing after the given number of repeats. * - * It then dispatches the `ANIMATION_STOP` series of events. + * It then dispatches the `ANIMATION_STOP` event. * * If no animation is running, no events will be dispatched. * @@ -422,8 +410,6 @@ var Sprite = new Class({ * * @method Phaser.GameObjects.Sprite#stopAfterRepeat * @fires Phaser.Animations.Events#ANIMATION_STOP - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_STOP - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_STOP * @since 3.50.0 * * @param {integer} [repeatCount=1] - How many times should the animation repeat before stopping? @@ -439,7 +425,7 @@ var Sprite = new Class({ * Stops the current animation from playing when it next sets the given frame. * If this frame doesn't exist within the animation it will not stop it from playing. * - * It then dispatches the `ANIMATION_STOP` series of events. + * It then dispatches the `ANIMATION_STOP` event. * * If no animation is running, no events will be dispatched. * @@ -448,8 +434,6 @@ var Sprite = new Class({ * * @method Phaser.GameObjects.Sprite#stopOnFrame * @fires Phaser.Animations.Events#ANIMATION_STOP - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_STOP - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_STOP * @since 3.50.0 * * @param {Phaser.Animations.AnimationFrame} frame - The frame to check before stopping this animation. From f64d2cfa63c6430253c0c4bb3567a8d75ffda6b6 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 8 Sep 2020 12:17:48 +0100 Subject: [PATCH 235/241] Update CHANGELOG.md --- CHANGELOG.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 042f03b52..a573efaa8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -216,8 +216,12 @@ The way in which Game Objects add themselves to the Scene Update List has change If you use Animations in your game, please read the following important API changes in 3.50: -The Animation API has had a significant overhaul to improve playback handling. Instead of just playing an animation based on its global key, you can now supply a new `PlayAnimationConfig` object instead, which allows you to override any of the default animation settings, such as `duration`, `delay` and `yoyo` (see below for the full list). This means you no longer have to create lots of duplicate animations, just to change properties such as `duration`, and can now set them dynamically at run-time as well. +The Animation API has had a significant overhaul to improve playback handling. Instead of just playing an animation based on its global key, you can now supply a new `PlayAnimationConfig` object instead, which allows you to override any of the default animation settings, such as `duration`, `delay` and `yoyo` (see below for the full list). This means you no longer have to create lots of duplicate animations just to change properties such as `duration`, and can now set them dynamically at run-time as well. +* The `Animation` class no longer extends `EventEmitter`, as it no longer emits any events directly. This means you cannot now listen for events directly from an Animation instance. All of the events are now dispatched by the Game Objects instead. +* All of the `SPRITE_ANIMATION_KEY` events have been removed. Instead, please use the new events which all carry the `frameKey` parameter, which can be used to handle frame specific events. +* `ANIMATION_UPDATE_EVENT` is a new event that is emitted from a Sprite when an animation updates, i.e. its frame changes. +* `ANIMATION_STOP_EVENT` is a new event that is emitted from a Sprite when its current animation is stopped. This can happen if any of the `stop` methods are called, or a new animation is played prior to this one reaching completion. Fix #4894 (thanks @scott20145) * The Game Object `Component.Animation` component has been renamed to `AnimationState` and has moved namespace. It's now in `Phaser.Animations` instead of `GameObjects.Components` to help differentiate it from the `Animation` class when browsing the documentation. * The `play`, `playReverse`, `playAfterDelay`, `playAfterRepeat` and `chain` Sprite and Animation Component methods can now all take a `Phaser.Types.Animations.PlayAnimationConfig` configuration object, as well as a string, as the `key` parameter. This allows you to override any default animation setting with those defined in the config, giving you far greater control over animations on a Game Object level, without needing to globally duplicate them. * `AnimationState.create` is a new method that allows you to create animations directly on a Sprite. These are not global and never enter the Animation Manager, instead risiding within the Sprite itself. This allows you to use the same keys across both local and global animations and set-up Sprite specific local animations. @@ -237,6 +241,7 @@ The Animation API has had a significant overhaul to improve playback handling. I * The `AnimationState.delayedPlay` method has been renamed to `playAfterDelay`. The parameter order has also changed, so the key now comes first instead of the duration. * The `AnimationState.stopOnRepeat` method has been renamed to `stopAfterRepeat` * The `AnimationState.getCurrentKey` method has been renamed to `getName`. +* `AnimationState.getFrameName` is a new method that will return the key of the current Animation Frame, if an animation has been loaded. * `AnimationState.playAfterDelay` and `Sprite.playAfterDelay` are new methods that will play the given animation after the delay in ms expires. * `AnimationState.playAfterRepeat` and `Sprite.playAfterRepeat` are new methods that will play the given animation after the current animation finishes repeating. You can also specify the number of repeats allowed left to run. * The `AnimationState.chain` method is now available on the Sprite class. @@ -271,10 +276,6 @@ The Animation API has had a significant overhaul to improve playback handling. I * The `AnimationState.restart` method has a new optional boolean parameter `resetRepeats` which controls if you want to reset the repeat counter during the restart, or not. * `Animation.getTotalFrames` is a new method that will return the total number of frames in the animation. You can access it via `this.anims.currentAnim.getTotalFrames` from a Sprite. * `Animation.calculateDuration` is a new method that calculates the duration, frameRate and msPerFrame for a given animation target. -* `ANIMATION_UPDATE_EVENT` is a new event that is emitted from an Animation when it is updated, i.e. its frame changes. -* `ANIMATION_STOP_EVENT` is a new event that is emitted from an Animation when it is stopped. This can happen if any of the `stop` methods are called, or a new animation is played prior to this one reaching completion. Fix #4894 (thanks @scott20145) -* `SPRITE_ANIMATION_STOP_EVENT` is a new event that is emitted from a Sprite when its current animation is stopped. This can happen if any of the `stop` methods are called, or a new animation is played prior to this one reaching completion. -* `SPRITE_ANIMATION_KEY_STOP_EVENT` is a new event that is emitted from a Sprite when its current animation is stopped. This can happen if any of the `stop` methods are called, or a new animation is played prior to this one reaching completion. This is a dynamic event name and carries the animation key in its title. * The `BuildGameObjectAnimation` function now uses the `PlayAnimationConfig` object to set the values. * `Sprite.playReverse` is a new method that allows you to play the given animation in reverse on the Sprite. * `Sprite.playAfterDelay` is a new method that allows you to play the given animation on the Sprite after a delay. From dfb71fe2a6bd947cd14b459a05a8f046f145c4d0 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 8 Sep 2020 13:01:11 +0100 Subject: [PATCH 236/241] Fixes to GenerateFrameNumbers * `GenerateFrameNumbers` would include the __BASE frame by mistake in its calculations. This didn't end up in the final animation, but did cause a cache miss when building the animation. * `GenerateFrameNumbers` can now accept the `start` and `end` parameters in reverse order, meaning you can now do `{ start: 10, end: 1 }` to create the animation in reverse. --- src/animations/AnimationManager.js | 48 ++++++++++-------------------- 1 file changed, 16 insertions(+), 32 deletions(-) diff --git a/src/animations/AnimationManager.js b/src/animations/AnimationManager.js index 6bd6b401a..b2ea5ec8b 100644 --- a/src/animations/AnimationManager.js +++ b/src/animations/AnimationManager.js @@ -13,6 +13,7 @@ var GameEvents = require('../core/events'); var GetFastValue = require('../utils/object/GetFastValue'); var GetValue = require('../utils/object/GetValue'); var Pad = require('../utils/string/Pad'); +var NumberArray = require('../utils/array/NumberArray'); /** * @classdesc @@ -728,46 +729,29 @@ var AnimationManager = new Class({ out.push({ key: key, frame: firstFrame }); } - var i; + // No 'frames' array? Then calculate one automatically - // Have they provided their own custom frame sequence array? - if (Array.isArray(frames)) + if (!frames) { - for (i = 0; i < frames.length; i++) - { - if (texture.has(frames[i])) - { - out.push({ key: key, frame: frames[i] }); - } - else - { - console.warn('generateFrameNumbers: Frame ' + i + ' missing from texture: ' + key); - } - } - } - else - { - // No endFrame then see if we can get it if (endFrame === -1) { - endFrame = texture.frameTotal; + // -1 because of __BASE, which we don't want in our results + // and -1 because frames are zero based + endFrame = texture.frameTotal - 2; } - var diff = (startFrame < endFrame) ? 1 : -1; + frames = NumberArray(startFrame, endFrame); + } - // Adjust because we use i !== end in the for loop - endFrame += diff; - - for (i = startFrame; i !== endFrame; i += diff) + for (var i = 0; i < frames.length; i++) + { + if (texture.has(frames[i])) { - if (texture.has(i)) - { - out.push({ key: key, frame: i }); - } - else - { - console.warn('generateFrameNumbers: Frame ' + i + ' missing from texture: ' + key); - } + out.push({ key: key, frame: frames[i] }); + } + else + { + console.warn('generateFrameNumbers: Frame ' + i + ' missing from texture: ' + key); } } From b8d35d7cf06b571d05df729fa9f12700f51ba3dd Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 8 Sep 2020 13:02:16 +0100 Subject: [PATCH 237/241] `Utils.Array.NumerArray` can now accept the `start` and `end` parameters in reverse order, i.e. `10, 1` will generate a number array running from 10 to 1. Internally it has also been optimized to skip string based returns. --- src/utils/array/NumberArray.js | 63 +++++++++++++++++++++++++--------- 1 file changed, 46 insertions(+), 17 deletions(-) diff --git a/src/utils/array/NumberArray.js b/src/utils/array/NumberArray.js index 9e46efe8b..1287478fc 100644 --- a/src/utils/array/NumberArray.js +++ b/src/utils/array/NumberArray.js @@ -8,16 +8,17 @@ * Create an array representing the range of numbers (usually integers), between, and inclusive of, * the given `start` and `end` arguments. For example: * - * `var array = numberArray(2, 4); // array = [2, 3, 4]` - * `var array = numberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]` + * `var array = Phaser.Utils.Array.NumberArray(2, 4); // array = [2, 3, 4]` + * `var array = Phaser.Utils.Array.NumberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]` + * `var array = Phaser.Utils.Array.NumberArray(8, 2); // array = [8, 7, 6, 5, 4, 3, 2]` * - * This is equivalent to `numberArrayStep(start, end, 1)`. + * This is equivalent to `Phaser.Utils.Array.NumberArrayStep(start, end, 1)`. * * You can optionally provide a prefix and / or suffix string. If given the array will contain * strings, not integers. For example: * - * `var array = numberArray(1, 4, 'Level '); // array = ["Level 1", "Level 2", "Level 3", "Level 4"]` - * `var array = numberArray(5, 7, 'HD-', '.png'); // array = ["HD-5.png", "HD-6.png", "HD-7.png"]` + * `var array = Phaser.Utils.Array.NumberArray(1, 4, 'Level '); // array = ["Level 1", "Level 2", "Level 3", "Level 4"]` + * `var array = Phaser.Utils.Array.NumberArray(5, 7, 'HD-', '.png'); // array = ["HD-5.png", "HD-6.png", "HD-7.png"]` * * @function Phaser.Utils.Array.NumberArray * @since 3.0.0 @@ -33,22 +34,50 @@ var NumberArray = function (start, end, prefix, suffix) { var result = []; - for (var i = start; i <= end; i++) + var i; + var asString = false; + + if (prefix || suffix) { - if (prefix || suffix) + asString = true; + + if (!prefix) { - var key = (prefix) ? prefix + i.toString() : i.toString(); - - if (suffix) - { - key = key.concat(suffix); - } - - result.push(key); + prefix = ''; } - else + + if (!suffix) { - result.push(i); + suffix = ''; + } + } + + if (end < start) + { + for (i = start; i >= end; i--) + { + if (asString) + { + result.push(prefix + i.toString() + suffix); + } + else + { + result.push(i); + } + } + } + else + { + for (i = start; i <= end; i++) + { + if (asString) + { + result.push(prefix + i.toString() + suffix); + } + else + { + result.push(i); + } } } From b99ee24d23f9094070223e5dcc64412e9b544472 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 8 Sep 2020 13:02:31 +0100 Subject: [PATCH 238/241] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a573efaa8..32f264b16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -311,6 +311,8 @@ The Animation API has had a significant overhaul to improve playback handling. I * The `AnimationState.updateFrame` method has now been removed. Everything is handled by `setCurrentFrame` instead, which removes one extra step out of the update process. * `GenerateFrameNames` will now `console.warn` if the generated frame isn't present in the texture, which should help with debugging animation creation massively. * `GenerateFrameNumbers` will now `console.warn` if the generated frame isn't present in the texture, which should help with debugging animation creation massively. +* `GenerateFrameNumbers` would include the __BASE frame by mistake in its calculations. This didn't end up in the final animation, but did cause a cache miss when building the animation. +* `GenerateFrameNumbers` can now accept the `start` and `end` parameters in reverse order, meaning you can now do `{ start: 10, end: 1 }` to create the animation in reverse. ### New Features @@ -381,6 +383,7 @@ The Animation API has had a significant overhaul to improve playback handling. I * If a Scene is paused, or sent to sleep, it will automatically call `Keyboard.resetKeys`. This means that if you hold a key down, then sleep or pause a Scene, then release the key and resume or wake the Scene, it will no longer think it is still being held down (thanks @samme) * `Actions.setOrigin` will now call `updateDisplayOrigin` on the items array, otherwise the effects can't be seen when rendering. * You can now set the `ArcadeWorld.fixedStep` property via the `ArcadeWorldConfig` object (thanks @samme) +* `Utils.Array.NumerArray` can now accept the `start` and `end` parameters in reverse order, i.e. `10, 1` will generate a number array running from 10 to 1. Internally it has also been optimized to skip string based returns. ### Namespace Updates From 8b2c9edce27ab04b148a4a5eabf941dd92d494f3 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 8 Sep 2020 13:40:20 +0100 Subject: [PATCH 239/241] `GenerateFrameNames` can now accept the `start` and `end` parameters in reverse order, meaning you can now do `{ start: 10, end: 1 }` to create the animation in reverse. --- src/animations/AnimationManager.js | 53 ++++++++++-------------------- 1 file changed, 17 insertions(+), 36 deletions(-) diff --git a/src/animations/AnimationManager.js b/src/animations/AnimationManager.js index b2ea5ec8b..071a0cfdb 100644 --- a/src/animations/AnimationManager.js +++ b/src/animations/AnimationManager.js @@ -639,17 +639,11 @@ var AnimationManager = new Class({ return out; } - var diff = (start < end) ? 1 : -1; - - // Adjust because we use i !== end in the for loop - end += diff; - var i; - var frame; if (!config) { - // Use every frame in the atlas? + // Use every frame in the atlas frames = texture.getFrameNames(); for (i = 0; i < frames.length; i++) @@ -657,28 +651,16 @@ var AnimationManager = new Class({ out.push({ key: key, frame: frames[i] }); } } - else if (Array.isArray(frames)) - { - // Have they provided their own custom frame sequence array? - for (i = 0; i < frames.length; i++) - { - frame = prefix + Pad(frames[i], zeroPad, '0', 1) + suffix; - - if (texture.has(frame)) - { - out.push({ key: key, frame: frame }); - } - else - { - console.warn('generateFrameNames: Frame missing: ' + frame + ' from texture: ' + key); - } - } - } else { - for (i = start; i !== end; i += diff) + if (!frames) { - frame = prefix + Pad(i, zeroPad, '0', 1) + suffix; + frames = NumberArray(start, end); + } + + for (i = 0; i < frames.length; i++) + { + var frame = prefix + Pad(frames[i], zeroPad, '0', 1) + suffix; if (texture.has(frame)) { @@ -711,9 +693,9 @@ var AnimationManager = new Class({ */ generateFrameNumbers: function (key, config) { - var startFrame = GetValue(config, 'start', 0); - var endFrame = GetValue(config, 'end', -1); - var firstFrame = GetValue(config, 'first', false); + var start = GetValue(config, 'start', 0); + var end = GetValue(config, 'end', -1); + var first = GetValue(config, 'first', false); var out = GetValue(config, 'outputArray', []); var frames = GetValue(config, 'frames', false); @@ -724,23 +706,22 @@ var AnimationManager = new Class({ return out; } - if (firstFrame && texture.has(firstFrame)) + if (first && texture.has(first)) { - out.push({ key: key, frame: firstFrame }); + out.push({ key: key, frame: first }); } - // No 'frames' array? Then calculate one automatically - + // No 'frames' array? Then generate one automatically if (!frames) { - if (endFrame === -1) + if (end === -1) { // -1 because of __BASE, which we don't want in our results // and -1 because frames are zero based - endFrame = texture.frameTotal - 2; + end = texture.frameTotal - 2; } - frames = NumberArray(startFrame, endFrame); + frames = NumberArray(start, end); } for (var i = 0; i < frames.length; i++) From ce0b498b1168405b3af6b27bd62ebdc15888608c Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 8 Sep 2020 13:40:23 +0100 Subject: [PATCH 240/241] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32f264b16..ad44e8666 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -313,6 +313,7 @@ The Animation API has had a significant overhaul to improve playback handling. I * `GenerateFrameNumbers` will now `console.warn` if the generated frame isn't present in the texture, which should help with debugging animation creation massively. * `GenerateFrameNumbers` would include the __BASE frame by mistake in its calculations. This didn't end up in the final animation, but did cause a cache miss when building the animation. * `GenerateFrameNumbers` can now accept the `start` and `end` parameters in reverse order, meaning you can now do `{ start: 10, end: 1 }` to create the animation in reverse. +* `GenerateFrameNames` can now accept the `start` and `end` parameters in reverse order, meaning you can now do `{ start: 10, end: 1 }` to create the animation in reverse. ### New Features From 8ddbeb1d18c40eceefed50ee59ed866cb4123296 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 8 Sep 2020 13:55:03 +0100 Subject: [PATCH 241/241] 3.50.0 Beta 4 --- dist/phaser-arcade-physics.js | 27548 ++++++++++++------------ dist/phaser-arcade-physics.min.js | 2 +- dist/phaser.js | 31074 +++++++++++++++------------- dist/phaser.min.js | 2 +- 4 files changed, 30973 insertions(+), 27653 deletions(-) diff --git a/dist/phaser-arcade-physics.js b/dist/phaser-arcade-physics.js index 33c20f5e8..33e6f35e3 100644 --- a/dist/phaser-arcade-physics.js +++ b/dist/phaser-arcade-physics.js @@ -91,7 +91,7 @@ return /******/ (function(modules) { // webpackBootstrap /******/ /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 1454); +/******/ return __webpack_require__(__webpack_require__.s = 1451); /******/ }) /************************************************************************/ /******/ ([ @@ -432,7 +432,7 @@ module.exports = GetFastValue; // and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl var Class = __webpack_require__(0); -var FuzzyEqual = __webpack_require__(107); +var FuzzyEqual = __webpack_require__(108); /** * @classdesc @@ -1205,7 +1205,7 @@ module.exports = Vector2; */ var Class = __webpack_require__(0); -var GEOM_CONST = __webpack_require__(48); +var GEOM_CONST = __webpack_require__(49); /** * @classdesc @@ -1299,7 +1299,7 @@ module.exports = Point; var Class = __webpack_require__(0); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(22); +var SceneEvents = __webpack_require__(20); /** * @classdesc @@ -1342,6 +1342,16 @@ var GameObjectFactory = new Class({ */ this.systems = scene.sys; + /** + * A reference to the Scene Event Emitter. + * + * @name Phaser.GameObjects.GameObjectFactory#events + * @type {Phaser.Events.EventEmitter} + * @protected + * @since 3.50.0 + */ + this.events = scene.sys.events; + /** * A reference to the Scene Display List. * @@ -1362,8 +1372,8 @@ var GameObjectFactory = new Class({ */ this.updateList; - scene.sys.events.once(SceneEvents.BOOT, this.boot, this); - scene.sys.events.on(SceneEvents.START, this.start, this); + this.events.once(SceneEvents.BOOT, this.boot, this); + this.events.on(SceneEvents.START, this.start, this); }, /** @@ -1379,7 +1389,7 @@ var GameObjectFactory = new Class({ this.displayList = this.systems.displayList; this.updateList = this.systems.updateList; - this.systems.events.once(SceneEvents.DESTROY, this.destroy, this); + this.events.once(SceneEvents.DESTROY, this.destroy, this); }, /** @@ -1393,7 +1403,7 @@ var GameObjectFactory = new Class({ */ start: function () { - this.systems.events.once(SceneEvents.SHUTDOWN, this.shutdown, this); + this.events.once(SceneEvents.SHUTDOWN, this.shutdown, this); }, /** @@ -1436,7 +1446,7 @@ var GameObjectFactory = new Class({ */ shutdown: function () { - this.systems.events.off(SceneEvents.SHUTDOWN, this.shutdown, this); + this.events.off(SceneEvents.SHUTDOWN, this.shutdown, this); }, /** @@ -1451,10 +1461,11 @@ var GameObjectFactory = new Class({ { this.shutdown(); - this.scene.sys.events.off(SceneEvents.START, this.start, this); + this.events.off(SceneEvents.START, this.start, this); this.scene = null; this.systems = null; + this.events = null; this.displayList = null; this.updateList = null; @@ -1714,12 +1725,12 @@ module.exports = FileTypesManager; */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(49); -var GetPoint = __webpack_require__(157); -var GetPoints = __webpack_require__(278); -var GEOM_CONST = __webpack_require__(48); -var Line = __webpack_require__(39); -var Random = __webpack_require__(160); +var Contains = __webpack_require__(50); +var GetPoint = __webpack_require__(159); +var GetPoints = __webpack_require__(282); +var GEOM_CONST = __webpack_require__(49); +var Line = __webpack_require__(40); +var Random = __webpack_require__(162); /** * @classdesc @@ -2469,6 +2480,47 @@ module.exports = { /* 11 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.GameObjects.Components + */ + +module.exports = { + + Alpha: __webpack_require__(559), + AlphaSingle: __webpack_require__(279), + BlendMode: __webpack_require__(280), + ComputedSize: __webpack_require__(560), + Crop: __webpack_require__(561), + Depth: __webpack_require__(281), + Flip: __webpack_require__(562), + GetBounds: __webpack_require__(563), + Mask: __webpack_require__(285), + Origin: __webpack_require__(580), + PathFollower: __webpack_require__(581), + Pipeline: __webpack_require__(163), + ScrollFactor: __webpack_require__(288), + Size: __webpack_require__(582), + Texture: __webpack_require__(583), + TextureCrop: __webpack_require__(584), + Tint: __webpack_require__(585), + ToJSON: __webpack_require__(289), + Transform: __webpack_require__(290), + TransformMatrix: __webpack_require__(31), + Visible: __webpack_require__(291) + +}; + + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + "use strict"; @@ -2808,48 +2860,6 @@ if (true) { } -/***/ }), -/* 12 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.GameObjects.Components - */ - -module.exports = { - - Alpha: __webpack_require__(537), - AlphaSingle: __webpack_require__(273), - Animation: __webpack_require__(507), - BlendMode: __webpack_require__(276), - ComputedSize: __webpack_require__(556), - Crop: __webpack_require__(557), - Depth: __webpack_require__(277), - Flip: __webpack_require__(558), - GetBounds: __webpack_require__(559), - Mask: __webpack_require__(281), - Origin: __webpack_require__(576), - PathFollower: __webpack_require__(577), - Pipeline: __webpack_require__(161), - ScrollFactor: __webpack_require__(284), - Size: __webpack_require__(578), - Texture: __webpack_require__(579), - TextureCrop: __webpack_require__(580), - Tint: __webpack_require__(581), - ToJSON: __webpack_require__(285), - Transform: __webpack_require__(286), - TransformMatrix: __webpack_require__(30), - Visible: __webpack_require__(287) - -}; - - /***/ }), /* 13 */ /***/ (function(module, exports) { @@ -2953,10 +2963,10 @@ module.exports = MATH_CONST; */ var Class = __webpack_require__(0); -var ComponentsToJSON = __webpack_require__(285); +var ComponentsToJSON = __webpack_require__(289); var DataManager = __webpack_require__(118); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(91); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(29); /** * @classdesc @@ -3006,9 +3016,9 @@ var GameObject = new Class({ /** * The current state of this Game Object. - * + * * Phaser itself will never modify this value, although plugins may do so. - * + * * Use this property to track the state of a Game Object during its lifetime. For example, it could change from * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons. @@ -3178,9 +3188,9 @@ var GameObject = new Class({ /** * Sets the current state of this Game Object. - * + * * Phaser itself will never modify the State of a Game Object, although plugins may do so. - * + * * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'. * The state value should typically be an integer (ideally mapped to a constant * in your game code), but could also be a string. It is recommended to keep it light and simple. @@ -3285,7 +3295,7 @@ var GameObject = new Class({ * before setting the value. * * If the key doesn't already exist in the Data Manager then it is created. - * + * * When the value is first set, a `setdata` event is emitted from this Game Object. * * @method Phaser.GameObjects.GameObject#incData @@ -3315,7 +3325,7 @@ var GameObject = new Class({ * before setting the value. * * If the key doesn't already exist in the Data Manager then it is created. - * + * * When the value is first set, a `setdata` event is emitted from this Game Object. * * @method Phaser.GameObjects.GameObject#toggleData @@ -3453,7 +3463,7 @@ var GameObject = new Class({ * If you wish to only temporarily stop an object from receiving input then use * `disableInteractive` instead, as that toggles the interactive state, where-as * this erases it completely. - * + * * If you wish to resize a hit area, don't remove and then set it as being * interactive. Instead, access the hitarea object directly and resize the shape * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the @@ -3473,6 +3483,36 @@ var GameObject = new Class({ return this; }, + /** + * This callback is invoked when this Game Object is added to a Scene. + * + * Can be overriden by custom Game Objects, but be aware of some Game Objects that + * will use this, such as Sprites, to add themselves into the Update List. + * + * You can also listen for the `ADDED_TO_SCENE` event from this Game Object. + * + * @method Phaser.GameObjects.GameObject#addedToScene + * @since 3.50.0 + */ + addedToScene: function () + { + }, + + /** + * This callback is invoked when this Game Object is removed from a Scene. + * + * Can be overriden by custom Game Objects, but be aware of some Game Objects that + * will use this, such as Sprites, to removed themselves from the Update List. + * + * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object. + * + * @method Phaser.GameObjects.GameObject#removedFromScene + * @since 3.50.0 + */ + removedFromScene: function () + { + }, + /** * To be overridden by custom GameObjects. Allows base objects to be used in a Pool. * @@ -3599,7 +3639,6 @@ var GameObject = new Class({ if (!fromScene) { sys.displayList.remove(this); - sys.updateList.remove(this); } if (this.input) @@ -3661,7 +3700,7 @@ module.exports = GameObject; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH = __webpack_require__(176); +var MATH = __webpack_require__(178); var GetValue = __webpack_require__(6); /** @@ -3750,7 +3789,7 @@ module.exports = GetAdvancedValue; var Class = __webpack_require__(0); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(22); +var SceneEvents = __webpack_require__(20); /** * @classdesc @@ -3794,6 +3833,16 @@ var GameObjectCreator = new Class({ */ this.systems = scene.sys; + /** + * A reference to the Scene Event Emitter. + * + * @name Phaser.GameObjects.GameObjectCreator#events + * @type {Phaser.Events.EventEmitter} + * @protected + * @since 3.50.0 + */ + this.events = scene.sys.events; + /** * A reference to the Scene Display List. * @@ -3814,8 +3863,8 @@ var GameObjectCreator = new Class({ */ this.updateList; - scene.sys.events.once(SceneEvents.BOOT, this.boot, this); - scene.sys.events.on(SceneEvents.START, this.start, this); + this.events.once(SceneEvents.BOOT, this.boot, this); + this.events.on(SceneEvents.START, this.start, this); }, /** @@ -3831,7 +3880,7 @@ var GameObjectCreator = new Class({ this.displayList = this.systems.displayList; this.updateList = this.systems.updateList; - this.systems.events.once(SceneEvents.DESTROY, this.destroy, this); + this.events.once(SceneEvents.DESTROY, this.destroy, this); }, /** @@ -3845,7 +3894,7 @@ var GameObjectCreator = new Class({ */ start: function () { - this.systems.events.once(SceneEvents.SHUTDOWN, this.shutdown, this); + this.events.once(SceneEvents.SHUTDOWN, this.shutdown, this); }, /** @@ -3858,7 +3907,7 @@ var GameObjectCreator = new Class({ */ shutdown: function () { - this.systems.events.off(SceneEvents.SHUTDOWN, this.shutdown, this); + this.events.off(SceneEvents.SHUTDOWN, this.shutdown, this); }, /** @@ -3873,10 +3922,12 @@ var GameObjectCreator = new Class({ { this.shutdown(); - this.scene.sys.events.off(SceneEvents.START, this.start, this); + this.events.off(SceneEvents.START, this.start, this); this.scene = null; this.systems = null; + this.events = null; + this.displayList = null; this.updateList = null; } @@ -4200,27 +4251,32 @@ module.exports = Extend; */ /** - * @namespace Phaser.Core.Events + * @namespace Phaser.Scenes.Events */ module.exports = { - BLUR: __webpack_require__(560), - BOOT: __webpack_require__(561), - CONTEXT_LOST: __webpack_require__(562), - CONTEXT_RESTORED: __webpack_require__(563), - DESTROY: __webpack_require__(564), - FOCUS: __webpack_require__(565), - HIDDEN: __webpack_require__(566), - PAUSE: __webpack_require__(567), - POST_RENDER: __webpack_require__(568), - POST_STEP: __webpack_require__(569), - PRE_RENDER: __webpack_require__(570), - PRE_STEP: __webpack_require__(571), - READY: __webpack_require__(572), - RESUME: __webpack_require__(573), - STEP: __webpack_require__(574), - VISIBLE: __webpack_require__(575) + ADDED_TO_SCENE: __webpack_require__(729), + BOOT: __webpack_require__(730), + CREATE: __webpack_require__(731), + DESTROY: __webpack_require__(732), + PAUSE: __webpack_require__(733), + POST_UPDATE: __webpack_require__(734), + PRE_UPDATE: __webpack_require__(735), + READY: __webpack_require__(736), + REMOVED_FROM_SCENE: __webpack_require__(737), + RENDER: __webpack_require__(738), + RESUME: __webpack_require__(739), + SHUTDOWN: __webpack_require__(740), + SLEEP: __webpack_require__(741), + START: __webpack_require__(742), + TRANSITION_COMPLETE: __webpack_require__(743), + TRANSITION_INIT: __webpack_require__(744), + TRANSITION_OUT: __webpack_require__(745), + TRANSITION_START: __webpack_require__(746), + TRANSITION_WAKE: __webpack_require__(747), + UPDATE: __webpack_require__(748), + WAKE: __webpack_require__(749) }; @@ -4229,6 +4285,42 @@ module.exports = { /* 21 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Core.Events + */ + +module.exports = { + + BLUR: __webpack_require__(564), + BOOT: __webpack_require__(565), + CONTEXT_LOST: __webpack_require__(566), + CONTEXT_RESTORED: __webpack_require__(567), + DESTROY: __webpack_require__(568), + FOCUS: __webpack_require__(569), + HIDDEN: __webpack_require__(570), + PAUSE: __webpack_require__(571), + POST_RENDER: __webpack_require__(572), + POST_STEP: __webpack_require__(573), + PRE_RENDER: __webpack_require__(574), + PRE_STEP: __webpack_require__(575), + READY: __webpack_require__(576), + RESUME: __webpack_require__(577), + STEP: __webpack_require__(578), + VISIBLE: __webpack_require__(579) + +}; + + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. @@ -4237,12 +4329,12 @@ module.exports = { var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var Events = __webpack_require__(83); +var Events = __webpack_require__(84); var GetFastValue = __webpack_require__(2); -var GetURL = __webpack_require__(144); -var MergeXHRSettings = __webpack_require__(221); -var XHRLoader = __webpack_require__(458); -var XHRSettings = __webpack_require__(145); +var GetURL = __webpack_require__(145); +var MergeXHRSettings = __webpack_require__(224); +var XHRLoader = __webpack_require__(476); +var XHRSettings = __webpack_require__(146); /** * @classdesc @@ -4773,45 +4865,6 @@ File.revokeObjectURL = function (image) module.exports = File; -/***/ }), -/* 22 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Scenes.Events - */ - -module.exports = { - - BOOT: __webpack_require__(713), - CREATE: __webpack_require__(714), - DESTROY: __webpack_require__(715), - PAUSE: __webpack_require__(716), - POST_UPDATE: __webpack_require__(717), - PRE_UPDATE: __webpack_require__(718), - READY: __webpack_require__(719), - RENDER: __webpack_require__(720), - RESUME: __webpack_require__(721), - SHUTDOWN: __webpack_require__(722), - SLEEP: __webpack_require__(723), - START: __webpack_require__(724), - TRANSITION_COMPLETE: __webpack_require__(725), - TRANSITION_INIT: __webpack_require__(726), - TRANSITION_OUT: __webpack_require__(727), - TRANSITION_START: __webpack_require__(728), - TRANSITION_WAKE: __webpack_require__(729), - UPDATE: __webpack_require__(730), - WAKE: __webpack_require__(731) - -}; - - /***/ }), /* 23 */ /***/ (function(module, exports) { @@ -5037,7 +5090,6 @@ var GetFastValue = __webpack_require__(2); * Gets the tiles in the given rectangular area (in tile coordinates) of the layer. * * @function Phaser.Tilemaps.Components.GetTilesWithin - * @private * @since 3.0.0 * * @param {integer} tileX - The left most tile index (in tile coordinates) to use as the origin of the area. @@ -5046,7 +5098,7 @@ var GetFastValue = __webpack_require__(2); * @param {integer} height - How many tiles tall from the `tileY` index the area will be. * @param {Phaser.Types.Tilemaps.GetTilesWithinFilteringOptions} GetTilesWithinFilteringOptions - Optional filters to apply when getting the tiles. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {Phaser.Tilemaps.Tile[]} Array of Tile objects. */ var GetTilesWithin = function (tileX, tileY, width, height, filteringOptions, layer) @@ -5066,6 +5118,7 @@ var GetTilesWithin = function (tileX, tileY, width, height, filteringOptions, la width += tileX; tileX = 0; } + if (tileY < 0) { height += tileY; @@ -5077,6 +5130,7 @@ var GetTilesWithin = function (tileX, tileY, width, height, filteringOptions, la { width = Math.max(layer.width - tileX, 0); } + if (tileY + height > layer.height) { height = Math.max(layer.height - tileY, 0); @@ -5089,11 +5143,24 @@ var GetTilesWithin = function (tileX, tileY, width, height, filteringOptions, la for (var tx = tileX; tx < tileX + width; tx++) { var tile = layer.data[ty][tx]; + if (tile !== null) { - if (isNotEmpty && tile.index === -1) { continue; } - if (isColliding && !tile.collides) { continue; } - if (hasInterestingFace && !tile.hasInterestingFace) { continue; } + if (isNotEmpty && tile.index === -1) + { + continue; + } + + if (isColliding && !tile.collides) + { + continue; + } + + if (hasInterestingFace && !tile.hasInterestingFace) + { + continue; + } + results.push(tile); } } @@ -5182,8 +5249,8 @@ module.exports = PropertyValueSet; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(33); -var Smoothing = __webpack_require__(173); +var CONST = __webpack_require__(34); +var Smoothing = __webpack_require__(175); // The pool into which the canvas elements are placed. var pool = []; @@ -5443,7 +5510,7 @@ module.exports = CanvasPool(); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlendModes = __webpack_require__(53); +var BlendModes = __webpack_require__(54); var GetAdvancedValue = __webpack_require__(15); /** @@ -5653,6 +5720,39 @@ module.exports = SetTransform; /* 29 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.GameObjects.Events + */ + +module.exports = { + + ADDED_TO_SCENE: __webpack_require__(590), + DESTROY: __webpack_require__(591), + REMOVED_FROM_SCENE: __webpack_require__(592), + VIDEO_COMPLETE: __webpack_require__(593), + VIDEO_CREATED: __webpack_require__(594), + VIDEO_ERROR: __webpack_require__(595), + VIDEO_LOOP: __webpack_require__(596), + VIDEO_PLAY: __webpack_require__(597), + VIDEO_SEEKED: __webpack_require__(598), + VIDEO_SEEKING: __webpack_require__(599), + VIDEO_STOP: __webpack_require__(600), + VIDEO_TIMEOUT: __webpack_require__(601), + VIDEO_UNLOCKED: __webpack_require__(602) + +}; + + +/***/ }), +/* 30 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. @@ -5660,9 +5760,9 @@ module.exports = SetTransform; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); +var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); -var Line = __webpack_require__(39); +var Line = __webpack_require__(40); /** * @classdesc @@ -5950,7 +6050,7 @@ module.exports = Shape; /***/ }), -/* 30 */ +/* 31 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -6970,7 +7070,7 @@ module.exports = TransformMatrix; /***/ }), -/* 31 */ +/* 32 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -6980,10 +7080,10 @@ module.exports = TransformMatrix; */ var Class = __webpack_require__(0); -var GetColor = __webpack_require__(171); -var GetColor32 = __webpack_require__(299); -var HSVToRGB = __webpack_require__(172); -var RGBToHSV = __webpack_require__(300); +var GetColor = __webpack_require__(173); +var GetColor32 = __webpack_require__(307); +var HSVToRGB = __webpack_require__(174); +var RGBToHSV = __webpack_require__(308); /** * @namespace Phaser.Display.Color @@ -7833,7 +7933,7 @@ module.exports = Color; /***/ }), -/* 32 */ +/* 33 */ /***/ (function(module, exports) { /** @@ -7888,7 +7988,7 @@ module.exports = { /***/ }), -/* 33 */ +/* 34 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -7913,11 +8013,11 @@ var CONST = { * @type {string} * @since 3.0.0 */ - VERSION: '3.50.0-beta.2', + VERSION: '3.50.0-beta.4', - BlendModes: __webpack_require__(53), + BlendModes: __webpack_require__(54), - ScaleModes: __webpack_require__(240), + ScaleModes: __webpack_require__(245), /** * AUTO Detect Renderer. @@ -8026,7 +8126,7 @@ module.exports = CONST; /***/ }), -/* 34 */ +/* 35 */ /***/ (function(module, exports) { /** @@ -8054,7 +8154,7 @@ module.exports = GetBottom; /***/ }), -/* 35 */ +/* 36 */ /***/ (function(module, exports) { /** @@ -8082,7 +8182,7 @@ module.exports = GetLeft; /***/ }), -/* 36 */ +/* 37 */ /***/ (function(module, exports) { /** @@ -8110,7 +8210,7 @@ module.exports = GetRight; /***/ }), -/* 37 */ +/* 38 */ /***/ (function(module, exports) { /** @@ -8138,7 +8238,7 @@ module.exports = GetTop; /***/ }), -/* 38 */ +/* 39 */ /***/ (function(module, exports) { /** @@ -8205,7 +8305,7 @@ module.exports = PropertyValueInc; /***/ }), -/* 39 */ +/* 40 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8215,10 +8315,10 @@ module.exports = PropertyValueInc; */ var Class = __webpack_require__(0); -var GetPoint = __webpack_require__(279); -var GetPoints = __webpack_require__(158); -var GEOM_CONST = __webpack_require__(48); -var Random = __webpack_require__(159); +var GetPoint = __webpack_require__(283); +var GetPoints = __webpack_require__(160); +var GEOM_CONST = __webpack_require__(49); +var Random = __webpack_require__(161); var Vector2 = __webpack_require__(3); /** @@ -8542,7 +8642,7 @@ module.exports = Line; /***/ }), -/* 40 */ +/* 41 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8572,7 +8672,7 @@ module.exports = DegToRad; /***/ }), -/* 41 */ +/* 42 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8587,29 +8687,29 @@ module.exports = DegToRad; module.exports = { - DESTROY: __webpack_require__(651), - FADE_IN_COMPLETE: __webpack_require__(652), - FADE_IN_START: __webpack_require__(653), - FADE_OUT_COMPLETE: __webpack_require__(654), - FADE_OUT_START: __webpack_require__(655), - FLASH_COMPLETE: __webpack_require__(656), - FLASH_START: __webpack_require__(657), - PAN_COMPLETE: __webpack_require__(658), - PAN_START: __webpack_require__(659), - POST_RENDER: __webpack_require__(660), - PRE_RENDER: __webpack_require__(661), - ROTATE_COMPLETE: __webpack_require__(662), - ROTATE_START: __webpack_require__(663), - SHAKE_COMPLETE: __webpack_require__(664), - SHAKE_START: __webpack_require__(665), - ZOOM_COMPLETE: __webpack_require__(666), - ZOOM_START: __webpack_require__(667) + DESTROY: __webpack_require__(667), + FADE_IN_COMPLETE: __webpack_require__(668), + FADE_IN_START: __webpack_require__(669), + FADE_OUT_COMPLETE: __webpack_require__(670), + FADE_OUT_START: __webpack_require__(671), + FLASH_COMPLETE: __webpack_require__(672), + FLASH_START: __webpack_require__(673), + PAN_COMPLETE: __webpack_require__(674), + PAN_START: __webpack_require__(675), + POST_RENDER: __webpack_require__(676), + PRE_RENDER: __webpack_require__(677), + ROTATE_COMPLETE: __webpack_require__(678), + ROTATE_START: __webpack_require__(679), + SHAKE_COMPLETE: __webpack_require__(680), + SHAKE_START: __webpack_require__(681), + ZOOM_COMPLETE: __webpack_require__(682), + ZOOM_START: __webpack_require__(683) }; /***/ }), -/* 42 */ +/* 43 */ /***/ (function(module, exports) { /** @@ -8646,8 +8746,8 @@ module.exports = FillStyleCanvas; /***/ }), -/* 43 */, -/* 44 */ +/* 44 */, +/* 45 */ /***/ (function(module, exports) { /** @@ -8680,7 +8780,7 @@ module.exports = SetTop; /***/ }), -/* 45 */ +/* 46 */ /***/ (function(module, exports) { /** @@ -8713,7 +8813,7 @@ module.exports = SetLeft; /***/ }), -/* 46 */ +/* 47 */ /***/ (function(module, exports) { /** @@ -8746,7 +8846,7 @@ module.exports = SetRight; /***/ }), -/* 47 */ +/* 48 */ /***/ (function(module, exports) { /** @@ -8779,7 +8879,7 @@ module.exports = SetBottom; /***/ }), -/* 48 */ +/* 49 */ /***/ (function(module, exports) { /** @@ -8859,7 +8959,7 @@ module.exports = GEOM_CONST; /***/ }), -/* 49 */ +/* 50 */ /***/ (function(module, exports) { /** @@ -8894,7 +8994,7 @@ module.exports = Contains; /***/ }), -/* 50 */ +/* 51 */ /***/ (function(module, exports) { /** @@ -8932,7 +9032,7 @@ module.exports = LineStyleCanvas; /***/ }), -/* 51 */ +/* 52 */ /***/ (function(module, exports) { /** @@ -9061,7 +9161,7 @@ module.exports = CONST; /***/ }), -/* 52 */ +/* 53 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -9070,7 +9170,7 @@ module.exports = CONST; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(148); +var GetTileAt = __webpack_require__(149); var GetTilesWithin = __webpack_require__(24); /** @@ -9079,7 +9179,6 @@ var GetTilesWithin = __webpack_require__(24); * is mostly used internally. * * @function Phaser.Tilemaps.Components.CalculateFacesWithin - * @private * @since 3.0.0 * * @param {integer} tileX - The left most tile index (in tile coordinates) to use as the origin of the area. @@ -9127,7 +9226,7 @@ module.exports = CalculateFacesWithin; /***/ }), -/* 53 */ +/* 54 */ /***/ (function(module, exports) { /** @@ -9466,7 +9565,7 @@ module.exports = { /***/ }), -/* 54 */ +/* 55 */ /***/ (function(module, exports) { /** @@ -9500,7 +9599,7 @@ module.exports = DistanceBetween; /***/ }), -/* 55 */ +/* 56 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -9515,58 +9614,58 @@ module.exports = DistanceBetween; module.exports = { - BOOT: __webpack_require__(831), - DESTROY: __webpack_require__(832), - DRAG_END: __webpack_require__(833), - DRAG_ENTER: __webpack_require__(834), - DRAG: __webpack_require__(835), - DRAG_LEAVE: __webpack_require__(836), - DRAG_OVER: __webpack_require__(837), - DRAG_START: __webpack_require__(838), - DROP: __webpack_require__(839), - GAME_OUT: __webpack_require__(840), - GAME_OVER: __webpack_require__(841), - GAMEOBJECT_DOWN: __webpack_require__(842), - GAMEOBJECT_DRAG_END: __webpack_require__(843), - GAMEOBJECT_DRAG_ENTER: __webpack_require__(844), - GAMEOBJECT_DRAG: __webpack_require__(845), - GAMEOBJECT_DRAG_LEAVE: __webpack_require__(846), - GAMEOBJECT_DRAG_OVER: __webpack_require__(847), - GAMEOBJECT_DRAG_START: __webpack_require__(848), - GAMEOBJECT_DROP: __webpack_require__(849), - GAMEOBJECT_MOVE: __webpack_require__(850), - GAMEOBJECT_OUT: __webpack_require__(851), - GAMEOBJECT_OVER: __webpack_require__(852), - GAMEOBJECT_POINTER_DOWN: __webpack_require__(853), - GAMEOBJECT_POINTER_MOVE: __webpack_require__(854), - GAMEOBJECT_POINTER_OUT: __webpack_require__(855), - GAMEOBJECT_POINTER_OVER: __webpack_require__(856), - GAMEOBJECT_POINTER_UP: __webpack_require__(857), - GAMEOBJECT_POINTER_WHEEL: __webpack_require__(858), - GAMEOBJECT_UP: __webpack_require__(859), - GAMEOBJECT_WHEEL: __webpack_require__(860), - MANAGER_BOOT: __webpack_require__(861), - MANAGER_PROCESS: __webpack_require__(862), - MANAGER_UPDATE: __webpack_require__(863), - POINTER_DOWN: __webpack_require__(864), - POINTER_DOWN_OUTSIDE: __webpack_require__(865), - POINTER_MOVE: __webpack_require__(866), - POINTER_OUT: __webpack_require__(867), - POINTER_OVER: __webpack_require__(868), - POINTER_UP: __webpack_require__(869), - POINTER_UP_OUTSIDE: __webpack_require__(870), - POINTER_WHEEL: __webpack_require__(871), - POINTERLOCK_CHANGE: __webpack_require__(872), - PRE_UPDATE: __webpack_require__(873), - SHUTDOWN: __webpack_require__(874), - START: __webpack_require__(875), - UPDATE: __webpack_require__(876) + BOOT: __webpack_require__(848), + DESTROY: __webpack_require__(849), + DRAG_END: __webpack_require__(850), + DRAG_ENTER: __webpack_require__(851), + DRAG: __webpack_require__(852), + DRAG_LEAVE: __webpack_require__(853), + DRAG_OVER: __webpack_require__(854), + DRAG_START: __webpack_require__(855), + DROP: __webpack_require__(856), + GAME_OUT: __webpack_require__(857), + GAME_OVER: __webpack_require__(858), + GAMEOBJECT_DOWN: __webpack_require__(859), + GAMEOBJECT_DRAG_END: __webpack_require__(860), + GAMEOBJECT_DRAG_ENTER: __webpack_require__(861), + GAMEOBJECT_DRAG: __webpack_require__(862), + GAMEOBJECT_DRAG_LEAVE: __webpack_require__(863), + GAMEOBJECT_DRAG_OVER: __webpack_require__(864), + GAMEOBJECT_DRAG_START: __webpack_require__(865), + GAMEOBJECT_DROP: __webpack_require__(866), + GAMEOBJECT_MOVE: __webpack_require__(867), + GAMEOBJECT_OUT: __webpack_require__(868), + GAMEOBJECT_OVER: __webpack_require__(869), + GAMEOBJECT_POINTER_DOWN: __webpack_require__(870), + GAMEOBJECT_POINTER_MOVE: __webpack_require__(871), + GAMEOBJECT_POINTER_OUT: __webpack_require__(872), + GAMEOBJECT_POINTER_OVER: __webpack_require__(873), + GAMEOBJECT_POINTER_UP: __webpack_require__(874), + GAMEOBJECT_POINTER_WHEEL: __webpack_require__(875), + GAMEOBJECT_UP: __webpack_require__(876), + GAMEOBJECT_WHEEL: __webpack_require__(877), + MANAGER_BOOT: __webpack_require__(878), + MANAGER_PROCESS: __webpack_require__(879), + MANAGER_UPDATE: __webpack_require__(880), + POINTER_DOWN: __webpack_require__(881), + POINTER_DOWN_OUTSIDE: __webpack_require__(882), + POINTER_MOVE: __webpack_require__(883), + POINTER_OUT: __webpack_require__(884), + POINTER_OVER: __webpack_require__(885), + POINTER_UP: __webpack_require__(886), + POINTER_UP_OUTSIDE: __webpack_require__(887), + POINTER_WHEEL: __webpack_require__(888), + POINTERLOCK_CHANGE: __webpack_require__(889), + PRE_UPDATE: __webpack_require__(890), + SHUTDOWN: __webpack_require__(891), + START: __webpack_require__(892), + UPDATE: __webpack_require__(893) }; /***/ }), -/* 56 */ +/* 57 */ /***/ (function(module, exports) { /** @@ -9607,7 +9706,7 @@ module.exports = Contains; /***/ }), -/* 57 */ +/* 58 */ /***/ (function(module, exports) { /** @@ -9635,7 +9734,7 @@ module.exports = Length; /***/ }), -/* 58 */ +/* 59 */ /***/ (function(module, exports) { /** @@ -9666,995 +9765,10 @@ var Wrap = function (value, min, max) module.exports = Wrap; -/***/ }), -/* 59 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Sound.Events - */ - -module.exports = { - - COMPLETE: __webpack_require__(899), - DECODED: __webpack_require__(900), - DECODED_ALL: __webpack_require__(901), - DESTROY: __webpack_require__(902), - DETUNE: __webpack_require__(903), - GLOBAL_DETUNE: __webpack_require__(904), - GLOBAL_MUTE: __webpack_require__(905), - GLOBAL_RATE: __webpack_require__(906), - GLOBAL_VOLUME: __webpack_require__(907), - LOOP: __webpack_require__(908), - LOOPED: __webpack_require__(909), - MUTE: __webpack_require__(910), - PAUSE_ALL: __webpack_require__(911), - PAUSE: __webpack_require__(912), - PLAY: __webpack_require__(913), - RATE: __webpack_require__(914), - RESUME_ALL: __webpack_require__(915), - RESUME: __webpack_require__(916), - SEEK: __webpack_require__(917), - STOP_ALL: __webpack_require__(918), - STOP: __webpack_require__(919), - UNLOCKED: __webpack_require__(920), - VOLUME: __webpack_require__(921) - -}; - - /***/ }), /* 60 */ /***/ (function(module, exports, __webpack_require__) { -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var CONST = __webpack_require__(18); -var File = __webpack_require__(21); -var FileTypesManager = __webpack_require__(8); -var GetFastValue = __webpack_require__(2); -var GetValue = __webpack_require__(6); -var IsPlainObject = __webpack_require__(7); - -/** - * @classdesc - * A single JSON File suitable for loading by the Loader. - * - * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly. - * - * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json. - * - * @class JSONFile - * @extends Phaser.Loader.File - * @memberof Phaser.Loader.FileTypes - * @constructor - * @since 3.0.0 - * - * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file. - * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object. - * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, can be a fully formed JSON Object. - * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file. - * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache. - */ -var JSONFile = new Class({ - - Extends: File, - - initialize: - - // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object - // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing - - function JSONFile (loader, key, url, xhrSettings, dataKey) - { - var extension = 'json'; - - if (IsPlainObject(key)) - { - var config = key; - - key = GetFastValue(config, 'key'); - url = GetFastValue(config, 'url'); - xhrSettings = GetFastValue(config, 'xhrSettings'); - extension = GetFastValue(config, 'extension', extension); - dataKey = GetFastValue(config, 'dataKey', dataKey); - } - - var fileConfig = { - type: 'json', - cache: loader.cacheManager.json, - extension: extension, - responseType: 'text', - key: key, - url: url, - xhrSettings: xhrSettings, - config: dataKey - }; - - File.call(this, loader, fileConfig); - - if (IsPlainObject(url)) - { - // Object provided instead of a URL, so no need to actually load it (populate data with value) - if (dataKey) - { - this.data = GetValue(url, dataKey); - } - else - { - this.data = url; - } - - this.state = CONST.FILE_POPULATED; - } - }, - - /** - * Called automatically by Loader.nextFile. - * This method controls what extra work this File does with its loaded data. - * - * @method Phaser.Loader.FileTypes.JSONFile#onProcess - * @since 3.7.0 - */ - onProcess: function () - { - if (this.state !== CONST.FILE_POPULATED) - { - this.state = CONST.FILE_PROCESSING; - - var json = JSON.parse(this.xhrLoader.responseText); - - var key = this.config; - - if (typeof key === 'string') - { - this.data = GetValue(json, key, json); - } - else - { - this.data = json; - } - } - - this.onProcessComplete(); - } - -}); - -/** - * Adds a JSON file, or array of JSON files, to the current load queue. - * - * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * - * ```javascript - * function preload () - * { - * this.load.json('wavedata', 'files/AlienWaveData.json'); - * } - * ``` - * - * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, - * or if it's already running, when the next free load slot becomes available. This happens automatically if you - * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued - * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. - * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the - * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been - * loaded. - * - * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load. - * The key should be unique both in terms of files being loaded and files already present in the JSON Cache. - * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file - * then remove it from the JSON Cache first, before loading a new one. - * - * Instead of passing arguments you can pass a configuration object, such as: - * - * ```javascript - * this.load.json({ - * key: 'wavedata', - * url: 'files/AlienWaveData.json' - * }); - * ``` - * - * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details. - * - * Once the file has finished loading you can access it from its Cache using its key: - * - * ```javascript - * this.load.json('wavedata', 'files/AlienWaveData.json'); - * // and later in your game ... - * var data = this.cache.json.get('wavedata'); - * ``` - * - * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files - * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and - * this is what you would use to retrieve the text from the JSON Cache. - * - * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. - * - * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "data" - * and no URL is given then the Loader will set the URL to be "data.json". It will always add `.json` as the extension, although - * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. - * - * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache, - * rather than the whole file. For example, if your JSON data had a structure like this: - * - * ```json - * { - * "level1": { - * "baddies": { - * "aliens": {}, - * "boss": {} - * } - * }, - * "level2": {}, - * "level3": {} - * } - * ``` - * - * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`. - * - * Note: The ability to load this type of file will only be available if the JSON File type has been built into Phaser. - * It is available in the default build but can be excluded from custom builds. - * - * @method Phaser.Loader.LoaderPlugin#json - * @fires Phaser.Loader.LoaderPlugin#ADD - * @since 3.0.0 - * - * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. - * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, can be a fully formed JSON Object. - * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache. - * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. - * - * @return {this} The Loader instance. - */ -FileTypesManager.register('json', function (key, url, dataKey, xhrSettings) -{ - if (Array.isArray(key)) - { - for (var i = 0; i < key.length; i++) - { - // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object - this.addFile(new JSONFile(this, key[i])); - } - } - else - { - this.addFile(new JSONFile(this, key, url, xhrSettings, dataKey)); - } - - return this; -}); - -module.exports = JSONFile; - - -/***/ }), -/* 61 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); - -/** - * @classdesc - * A MultiFile is a special kind of parent that contains two, or more, Files as children and looks after - * the loading and processing of them all. It is commonly extended and used as a base class for file types such as AtlasJSON or BitmapFont. - * - * You shouldn't create an instance of a MultiFile directly, but should extend it with your own class, setting a custom type and processing methods. - * - * @class MultiFile - * @memberof Phaser.Loader - * @constructor - * @since 3.7.0 - * - * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File. - * @param {string} type - The file type string for sorting within the Loader. - * @param {string} key - The key of the file within the loader. - * @param {Phaser.Loader.File[]} files - An array of Files that make-up this MultiFile. - */ -var MultiFile = new Class({ - - initialize: - - function MultiFile (loader, type, key, files) - { - /** - * A reference to the Loader that is going to load this file. - * - * @name Phaser.Loader.MultiFile#loader - * @type {Phaser.Loader.LoaderPlugin} - * @since 3.7.0 - */ - this.loader = loader; - - /** - * The file type string for sorting within the Loader. - * - * @name Phaser.Loader.MultiFile#type - * @type {string} - * @since 3.7.0 - */ - this.type = type; - - /** - * Unique cache key (unique within its file type) - * - * @name Phaser.Loader.MultiFile#key - * @type {string} - * @since 3.7.0 - */ - this.key = key; - - /** - * The current index being used by multi-file loaders to avoid key clashes. - * - * @name Phaser.Loader.MultiFile#multiKeyIndex - * @type {integer} - * @private - * @since 3.20.0 - */ - this.multiKeyIndex = loader.multiKeyIndex++; - - /** - * Array of files that make up this MultiFile. - * - * @name Phaser.Loader.MultiFile#files - * @type {Phaser.Loader.File[]} - * @since 3.7.0 - */ - this.files = files; - - /** - * The completion status of this MultiFile. - * - * @name Phaser.Loader.MultiFile#complete - * @type {boolean} - * @default false - * @since 3.7.0 - */ - this.complete = false; - - /** - * The number of files to load. - * - * @name Phaser.Loader.MultiFile#pending - * @type {integer} - * @since 3.7.0 - */ - - this.pending = files.length; - - /** - * The number of files that failed to load. - * - * @name Phaser.Loader.MultiFile#failed - * @type {integer} - * @default 0 - * @since 3.7.0 - */ - this.failed = 0; - - /** - * A storage container for transient data that the loading files need. - * - * @name Phaser.Loader.MultiFile#config - * @type {any} - * @since 3.7.0 - */ - this.config = {}; - - /** - * A reference to the Loaders baseURL at the time this MultiFile was created. - * Used to populate child-files. - * - * @name Phaser.Loader.MultiFile#baseURL - * @type {string} - * @since 3.20.0 - */ - this.baseURL = loader.baseURL; - - /** - * A reference to the Loaders path at the time this MultiFile was created. - * Used to populate child-files. - * - * @name Phaser.Loader.MultiFile#path - * @type {string} - * @since 3.20.0 - */ - this.path = loader.path; - - /** - * A reference to the Loaders prefix at the time this MultiFile was created. - * Used to populate child-files. - * - * @name Phaser.Loader.MultiFile#prefix - * @type {string} - * @since 3.20.0 - */ - this.prefix = loader.prefix; - - // Link the files - for (var i = 0; i < files.length; i++) - { - files[i].multiFile = this; - } - }, - - /** - * Checks if this MultiFile is ready to process its children or not. - * - * @method Phaser.Loader.MultiFile#isReadyToProcess - * @since 3.7.0 - * - * @return {boolean} `true` if all children of this MultiFile have loaded, otherwise `false`. - */ - isReadyToProcess: function () - { - return (this.pending === 0 && this.failed === 0 && !this.complete); - }, - - /** - * Adds another child to this MultiFile, increases the pending count and resets the completion status. - * - * @method Phaser.Loader.MultiFile#addToMultiFile - * @since 3.7.0 - * - * @param {Phaser.Loader.File} files - The File to add to this MultiFile. - * - * @return {Phaser.Loader.MultiFile} This MultiFile instance. - */ - addToMultiFile: function (file) - { - this.files.push(file); - - file.multiFile = this; - - this.pending++; - - this.complete = false; - - return this; - }, - - /** - * Called by each File when it finishes loading. - * - * @method Phaser.Loader.MultiFile#onFileComplete - * @since 3.7.0 - * - * @param {Phaser.Loader.File} file - The File that has completed processing. - */ - onFileComplete: function (file) - { - var index = this.files.indexOf(file); - - if (index !== -1) - { - this.pending--; - } - }, - - /** - * Called by each File that fails to load. - * - * @method Phaser.Loader.MultiFile#onFileFailed - * @since 3.7.0 - * - * @param {Phaser.Loader.File} file - The File that has failed to load. - */ - onFileFailed: function (file) - { - var index = this.files.indexOf(file); - - if (index !== -1) - { - this.failed++; - } - } - -}); - -module.exports = MultiFile; - - -/***/ }), -/* 62 */, -/* 63 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Converts from world X coordinates (pixels) to tile X coordinates (tile units), factoring in the - * layer's position, scale and scroll. - * - * @function Phaser.Tilemaps.Components.WorldToTileX - * @private - * @since 3.0.0 - * - * @param {number} worldX - The x coordinate to be converted, in pixels, not tiles. - * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer. - * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values. - * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * - * @return {number} The X location in tile units. - */ -var WorldToTileX = function (worldX, snapToFloor, camera, layer) -{ - if (snapToFloor === undefined) { snapToFloor = true; } - - var tileWidth = layer.baseTileWidth; - var tilemapLayer = layer.tilemapLayer; - - if (tilemapLayer) - { - if (camera === undefined) { camera = tilemapLayer.scene.cameras.main; } - - // Find the world position relative to the static or dynamic layer's top left origin, - // factoring in the camera's horizontal scroll - worldX = worldX - (tilemapLayer.x + camera.scrollX * (1 - tilemapLayer.scrollFactorX)); - - tileWidth *= tilemapLayer.scaleX; - } - - return snapToFloor - ? Math.floor(worldX / tileWidth) - : worldX / tileWidth; -}; - -module.exports = WorldToTileX; - - -/***/ }), -/* 64 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Converts from world Y coordinates (pixels) to tile Y coordinates (tile units), factoring in the - * layer's position, scale and scroll. - * - * @function Phaser.Tilemaps.Components.WorldToTileY - * @private - * @since 3.0.0 - * - * @param {number} worldY - The y coordinate to be converted, in pixels, not tiles. - * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer. - * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values. - * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * - * @return {number} The Y location in tile units. - */ -var WorldToTileY = function (worldY, snapToFloor, camera, layer) -{ - if (snapToFloor === undefined) { snapToFloor = true; } - - var tileHeight = layer.baseTileHeight; - var tilemapLayer = layer.tilemapLayer; - - if (tilemapLayer) - { - if (camera === undefined) { camera = tilemapLayer.scene.cameras.main; } - - // Find the world position relative to the static or dynamic layer's top left origin, - // factoring in the camera's vertical scroll - worldY = worldY - (tilemapLayer.y + camera.scrollY * (1 - tilemapLayer.scrollFactorY)); - - tileHeight *= tilemapLayer.scaleY; - } - - return snapToFloor - ? Math.floor(worldY / tileHeight) - : worldY / tileHeight; -}; - -module.exports = WorldToTileY; - - -/***/ }), -/* 65 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var Contains = __webpack_require__(56); -var GetPoint = __webpack_require__(270); -var GetPoints = __webpack_require__(271); -var GEOM_CONST = __webpack_require__(48); -var Random = __webpack_require__(155); - -/** - * @classdesc - * A Circle object. - * - * This is a geometry object, containing numerical values and related methods to inspect and modify them. - * It is not a Game Object, in that you cannot add it to the display list, and it has no texture. - * To render a Circle you should look at the capabilities of the Graphics class. - * - * @class Circle - * @memberof Phaser.Geom - * @constructor - * @since 3.0.0 - * - * @param {number} [x=0] - The x position of the center of the circle. - * @param {number} [y=0] - The y position of the center of the circle. - * @param {number} [radius=0] - The radius of the circle. - */ -var Circle = new Class({ - - initialize: - - function Circle (x, y, radius) - { - if (x === undefined) { x = 0; } - if (y === undefined) { y = 0; } - if (radius === undefined) { radius = 0; } - - /** - * The geometry constant type of this object: `GEOM_CONST.CIRCLE`. - * Used for fast type comparisons. - * - * @name Phaser.Geom.Circle#type - * @type {integer} - * @readonly - * @since 3.19.0 - */ - this.type = GEOM_CONST.CIRCLE; - - /** - * The x position of the center of the circle. - * - * @name Phaser.Geom.Circle#x - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.x = x; - - /** - * The y position of the center of the circle. - * - * @name Phaser.Geom.Circle#y - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.y = y; - - /** - * The internal radius of the circle. - * - * @name Phaser.Geom.Circle#_radius - * @type {number} - * @private - * @since 3.0.0 - */ - this._radius = radius; - - /** - * The internal diameter of the circle. - * - * @name Phaser.Geom.Circle#_diameter - * @type {number} - * @private - * @since 3.0.0 - */ - this._diameter = radius * 2; - }, - - /** - * Check to see if the Circle contains the given x / y coordinates. - * - * @method Phaser.Geom.Circle#contains - * @since 3.0.0 - * - * @param {number} x - The x coordinate to check within the circle. - * @param {number} y - The y coordinate to check within the circle. - * - * @return {boolean} True if the coordinates are within the circle, otherwise false. - */ - contains: function (x, y) - { - return Contains(this, x, y); - }, - - /** - * Returns a Point object containing the coordinates of a point on the circumference of the Circle - * based on the given angle normalized to the range 0 to 1. I.e. a value of 0.5 will give the point - * at 180 degrees around the circle. - * - * @method Phaser.Geom.Circle#getPoint - * @since 3.0.0 - * - * @generic {Phaser.Geom.Point} O - [out,$return] - * - * @param {number} position - A value between 0 and 1, where 0 equals 0 degrees, 0.5 equals 180 degrees and 1 equals 360 around the circle. - * @param {(Phaser.Geom.Point|object)} [out] - An object to store the return values in. If not given a Point object will be created. - * - * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point around the circle. - */ - getPoint: function (position, point) - { - return GetPoint(this, position, point); - }, - - /** - * Returns an array of Point objects containing the coordinates of the points around the circumference of the Circle, - * based on the given quantity or stepRate values. - * - * @method Phaser.Geom.Circle#getPoints - * @since 3.0.0 - * - * @generic {Phaser.Geom.Point[]} O - [output,$return] - * - * @param {integer} quantity - The amount of points to return. If a falsey value the quantity will be derived from the `stepRate` instead. - * @param {number} [stepRate] - Sets the quantity by getting the circumference of the circle and dividing it by the stepRate. - * @param {(array|Phaser.Geom.Point[])} [output] - An array to insert the points in to. If not provided a new array will be created. - * - * @return {(array|Phaser.Geom.Point[])} An array of Point objects pertaining to the points around the circumference of the circle. - */ - getPoints: function (quantity, stepRate, output) - { - return GetPoints(this, quantity, stepRate, output); - }, - - /** - * Returns a uniformly distributed random point from anywhere within the Circle. - * - * @method Phaser.Geom.Circle#getRandomPoint - * @since 3.0.0 - * - * @generic {Phaser.Geom.Point} O - [point,$return] - * - * @param {(Phaser.Geom.Point|object)} [point] - A Point or point-like object to set the random `x` and `y` values in. - * - * @return {(Phaser.Geom.Point|object)} A Point object with the random values set in the `x` and `y` properties. - */ - getRandomPoint: function (point) - { - return Random(this, point); - }, - - /** - * Sets the x, y and radius of this circle. - * - * @method Phaser.Geom.Circle#setTo - * @since 3.0.0 - * - * @param {number} [x=0] - The x position of the center of the circle. - * @param {number} [y=0] - The y position of the center of the circle. - * @param {number} [radius=0] - The radius of the circle. - * - * @return {this} This Circle object. - */ - setTo: function (x, y, radius) - { - this.x = x; - this.y = y; - this._radius = radius; - this._diameter = radius * 2; - - return this; - }, - - /** - * Sets this Circle to be empty with a radius of zero. - * Does not change its position. - * - * @method Phaser.Geom.Circle#setEmpty - * @since 3.0.0 - * - * @return {this} This Circle object. - */ - setEmpty: function () - { - this._radius = 0; - this._diameter = 0; - - return this; - }, - - /** - * Sets the position of this Circle. - * - * @method Phaser.Geom.Circle#setPosition - * @since 3.0.0 - * - * @param {number} [x=0] - The x position of the center of the circle. - * @param {number} [y=0] - The y position of the center of the circle. - * - * @return {this} This Circle object. - */ - setPosition: function (x, y) - { - if (y === undefined) { y = x; } - - this.x = x; - this.y = y; - - return this; - }, - - /** - * Checks to see if the Circle is empty: has a radius of zero. - * - * @method Phaser.Geom.Circle#isEmpty - * @since 3.0.0 - * - * @return {boolean} True if the Circle is empty, otherwise false. - */ - isEmpty: function () - { - return (this._radius <= 0); - }, - - /** - * The radius of the Circle. - * - * @name Phaser.Geom.Circle#radius - * @type {number} - * @since 3.0.0 - */ - radius: { - - get: function () - { - return this._radius; - }, - - set: function (value) - { - this._radius = value; - this._diameter = value * 2; - } - - }, - - /** - * The diameter of the Circle. - * - * @name Phaser.Geom.Circle#diameter - * @type {number} - * @since 3.0.0 - */ - diameter: { - - get: function () - { - return this._diameter; - }, - - set: function (value) - { - this._diameter = value; - this._radius = value * 0.5; - } - - }, - - /** - * The left position of the Circle. - * - * @name Phaser.Geom.Circle#left - * @type {number} - * @since 3.0.0 - */ - left: { - - get: function () - { - return this.x - this._radius; - }, - - set: function (value) - { - this.x = value + this._radius; - } - - }, - - /** - * The right position of the Circle. - * - * @name Phaser.Geom.Circle#right - * @type {number} - * @since 3.0.0 - */ - right: { - - get: function () - { - return this.x + this._radius; - }, - - set: function (value) - { - this.x = value - this._radius; - } - - }, - - /** - * The top position of the Circle. - * - * @name Phaser.Geom.Circle#top - * @type {number} - * @since 3.0.0 - */ - top: { - - get: function () - { - return this.y - this._radius; - }, - - set: function (value) - { - this.y = value + this._radius; - } - - }, - - /** - * The bottom position of the Circle. - * - * @name Phaser.Geom.Circle#bottom - * @type {number} - * @since 3.0.0 - */ - bottom: { - - get: function () - { - return this.y + this._radius; - }, - - set: function (value) - { - this.y = value - this._radius; - } - - } - -}); - -module.exports = Circle; - - -/***/ }), -/* 66 */ -/***/ (function(module, exports, __webpack_require__) { - "use strict"; /** * @author Richard Davey @@ -10662,7 +9776,60 @@ module.exports = Circle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -// Earcut 2.2.2 (January 21st 2020) +/** + * This module implements a modified ear slicing algorithm, optimized by z-order curve hashing and extended to + * handle holes, twisted polygons, degeneracies and self-intersections in a way that doesn't guarantee correctness + * of triangulation, but attempts to always produce acceptable results for practical data. + * + * Example: + * + * ```javascript + * const triangles = Phaser.Geom.Polygon.Earcut([10,0, 0,50, 60,60, 70,10]); // returns [1,0,3, 3,2,1] + * ``` + * + * Each group of three vertex indices in the resulting array forms a triangle. + * + * ```javascript + * // triangulating a polygon with a hole + * earcut([0,0, 100,0, 100,100, 0,100, 20,20, 80,20, 80,80, 20,80], [4]); + * // [3,0,4, 5,4,0, 3,4,7, 5,0,1, 2,3,7, 6,5,1, 2,7,6, 6,1,2] + * + * // triangulating a polygon with 3d coords + * earcut([10,0,1, 0,50,2, 60,60,3, 70,10,4], null, 3); + * // [1,0,3, 3,2,1] + * ``` + * + * If you pass a single vertex as a hole, Earcut treats it as a Steiner point. + * + * If your input is a multi-dimensional array (e.g. GeoJSON Polygon), you can convert it to the format + * expected by Earcut with `Phaser.Geom.Polygon.Earcut.flatten`: + * + * ```javascript + * var data = earcut.flatten(geojson.geometry.coordinates); + * var triangles = earcut(data.vertices, data.holes, data.dimensions); + * ``` + * + * After getting a triangulation, you can verify its correctness with `Phaser.Geom.Polygon.Earcut.deviation`: + * + * ```javascript + * var deviation = earcut.deviation(vertices, holes, dimensions, triangles); + * ``` + * Returns the relative difference between the total area of triangles and the area of the input polygon. + * 0 means the triangulation is fully correct. + * + * For more information see https://github.com/mapbox/earcut + * + * @function Phaser.Geom.Polygon.Earcut + * @since 3.50.0 + * + * @param {number[]} data - A flat array of vertex coordinate, like [x0,y0, x1,y1, x2,y2, ...] + * @param {number[]} [holeIndices] - An array of hole indices if any (e.g. [5, 8] for a 12-vertex input would mean one hole with vertices 5–7 and another with 8–11). + * @param {number} [dimensions=2] - The number of coordinates per vertex in the input array (2 by default). + * + * @return {number[]} An array of triangulated data. + */ + + // Earcut 2.2.2 (January 21st 2020) /* * ISC License @@ -10684,8 +9851,6 @@ module.exports = Circle; -module.exports = earcut; - function earcut(data, holeIndices, dim) { dim = dim || 2; @@ -11361,11 +10526,1031 @@ earcut.flatten = function (data) { return result; }; +module.exports = earcut; + + +/***/ }), +/* 61 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Sound.Events + */ + +module.exports = { + + COMPLETE: __webpack_require__(913), + DECODED: __webpack_require__(914), + DECODED_ALL: __webpack_require__(915), + DESTROY: __webpack_require__(916), + DETUNE: __webpack_require__(917), + GLOBAL_DETUNE: __webpack_require__(918), + GLOBAL_MUTE: __webpack_require__(919), + GLOBAL_RATE: __webpack_require__(920), + GLOBAL_VOLUME: __webpack_require__(921), + LOOP: __webpack_require__(922), + LOOPED: __webpack_require__(923), + MUTE: __webpack_require__(924), + PAUSE_ALL: __webpack_require__(925), + PAUSE: __webpack_require__(926), + PLAY: __webpack_require__(927), + RATE: __webpack_require__(928), + RESUME_ALL: __webpack_require__(929), + RESUME: __webpack_require__(930), + SEEK: __webpack_require__(931), + STOP_ALL: __webpack_require__(932), + STOP: __webpack_require__(933), + UNLOCKED: __webpack_require__(934), + VOLUME: __webpack_require__(935) + +}; + + +/***/ }), +/* 62 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var CONST = __webpack_require__(18); +var File = __webpack_require__(22); +var FileTypesManager = __webpack_require__(8); +var GetFastValue = __webpack_require__(2); +var GetValue = __webpack_require__(6); +var IsPlainObject = __webpack_require__(7); + +/** + * @classdesc + * A single JSON File suitable for loading by the Loader. + * + * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly. + * + * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json. + * + * @class JSONFile + * @extends Phaser.Loader.File + * @memberof Phaser.Loader.FileTypes + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file. + * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object. + * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, can be a fully formed JSON Object. + * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file. + * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache. + */ +var JSONFile = new Class({ + + Extends: File, + + initialize: + + // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object + // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing + + function JSONFile (loader, key, url, xhrSettings, dataKey) + { + var extension = 'json'; + + if (IsPlainObject(key)) + { + var config = key; + + key = GetFastValue(config, 'key'); + url = GetFastValue(config, 'url'); + xhrSettings = GetFastValue(config, 'xhrSettings'); + extension = GetFastValue(config, 'extension', extension); + dataKey = GetFastValue(config, 'dataKey', dataKey); + } + + var fileConfig = { + type: 'json', + cache: loader.cacheManager.json, + extension: extension, + responseType: 'text', + key: key, + url: url, + xhrSettings: xhrSettings, + config: dataKey + }; + + File.call(this, loader, fileConfig); + + if (IsPlainObject(url)) + { + // Object provided instead of a URL, so no need to actually load it (populate data with value) + if (dataKey) + { + this.data = GetValue(url, dataKey); + } + else + { + this.data = url; + } + + this.state = CONST.FILE_POPULATED; + } + }, + + /** + * Called automatically by Loader.nextFile. + * This method controls what extra work this File does with its loaded data. + * + * @method Phaser.Loader.FileTypes.JSONFile#onProcess + * @since 3.7.0 + */ + onProcess: function () + { + if (this.state !== CONST.FILE_POPULATED) + { + this.state = CONST.FILE_PROCESSING; + + var json = JSON.parse(this.xhrLoader.responseText); + + var key = this.config; + + if (typeof key === 'string') + { + this.data = GetValue(json, key, json); + } + else + { + this.data = json; + } + } + + this.onProcessComplete(); + } + +}); + +/** + * Adds a JSON file, or array of JSON files, to the current load queue. + * + * You can call this method from within your Scene's `preload`, along with any other files you wish to load: + * + * ```javascript + * function preload () + * { + * this.load.json('wavedata', 'files/AlienWaveData.json'); + * } + * ``` + * + * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts, + * or if it's already running, when the next free load slot becomes available. This happens automatically if you + * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued + * it means you cannot use the file immediately after calling this method, but must wait for the file to complete. + * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the + * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been + * loaded. + * + * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load. + * The key should be unique both in terms of files being loaded and files already present in the JSON Cache. + * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file + * then remove it from the JSON Cache first, before loading a new one. + * + * Instead of passing arguments you can pass a configuration object, such as: + * + * ```javascript + * this.load.json({ + * key: 'wavedata', + * url: 'files/AlienWaveData.json' + * }); + * ``` + * + * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details. + * + * Once the file has finished loading you can access it from its Cache using its key: + * + * ```javascript + * this.load.json('wavedata', 'files/AlienWaveData.json'); + * // and later in your game ... + * var data = this.cache.json.get('wavedata'); + * ``` + * + * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files + * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and + * this is what you would use to retrieve the text from the JSON Cache. + * + * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it. + * + * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "data" + * and no URL is given then the Loader will set the URL to be "data.json". It will always add `.json` as the extension, although + * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL. + * + * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache, + * rather than the whole file. For example, if your JSON data had a structure like this: + * + * ```json + * { + * "level1": { + * "baddies": { + * "aliens": {}, + * "boss": {} + * } + * }, + * "level2": {}, + * "level3": {} + * } + * ``` + * + * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`. + * + * Note: The ability to load this type of file will only be available if the JSON File type has been built into Phaser. + * It is available in the default build but can be excluded from custom builds. + * + * @method Phaser.Loader.LoaderPlugin#json + * @fires Phaser.Loader.LoaderPlugin#ADD + * @since 3.0.0 + * + * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. + * @param {(object|string)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json". Or, can be a fully formed JSON Object. + * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache. + * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. + * + * @return {this} The Loader instance. + */ +FileTypesManager.register('json', function (key, url, dataKey, xhrSettings) +{ + if (Array.isArray(key)) + { + for (var i = 0; i < key.length; i++) + { + // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object + this.addFile(new JSONFile(this, key[i])); + } + } + else + { + this.addFile(new JSONFile(this, key, url, xhrSettings, dataKey)); + } + + return this; +}); + +module.exports = JSONFile; + + +/***/ }), +/* 63 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); + +/** + * @classdesc + * A MultiFile is a special kind of parent that contains two, or more, Files as children and looks after + * the loading and processing of them all. It is commonly extended and used as a base class for file types such as AtlasJSON or BitmapFont. + * + * You shouldn't create an instance of a MultiFile directly, but should extend it with your own class, setting a custom type and processing methods. + * + * @class MultiFile + * @memberof Phaser.Loader + * @constructor + * @since 3.7.0 + * + * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File. + * @param {string} type - The file type string for sorting within the Loader. + * @param {string} key - The key of the file within the loader. + * @param {Phaser.Loader.File[]} files - An array of Files that make-up this MultiFile. + */ +var MultiFile = new Class({ + + initialize: + + function MultiFile (loader, type, key, files) + { + /** + * A reference to the Loader that is going to load this file. + * + * @name Phaser.Loader.MultiFile#loader + * @type {Phaser.Loader.LoaderPlugin} + * @since 3.7.0 + */ + this.loader = loader; + + /** + * The file type string for sorting within the Loader. + * + * @name Phaser.Loader.MultiFile#type + * @type {string} + * @since 3.7.0 + */ + this.type = type; + + /** + * Unique cache key (unique within its file type) + * + * @name Phaser.Loader.MultiFile#key + * @type {string} + * @since 3.7.0 + */ + this.key = key; + + /** + * The current index being used by multi-file loaders to avoid key clashes. + * + * @name Phaser.Loader.MultiFile#multiKeyIndex + * @type {integer} + * @private + * @since 3.20.0 + */ + this.multiKeyIndex = loader.multiKeyIndex++; + + /** + * Array of files that make up this MultiFile. + * + * @name Phaser.Loader.MultiFile#files + * @type {Phaser.Loader.File[]} + * @since 3.7.0 + */ + this.files = files; + + /** + * The completion status of this MultiFile. + * + * @name Phaser.Loader.MultiFile#complete + * @type {boolean} + * @default false + * @since 3.7.0 + */ + this.complete = false; + + /** + * The number of files to load. + * + * @name Phaser.Loader.MultiFile#pending + * @type {integer} + * @since 3.7.0 + */ + + this.pending = files.length; + + /** + * The number of files that failed to load. + * + * @name Phaser.Loader.MultiFile#failed + * @type {integer} + * @default 0 + * @since 3.7.0 + */ + this.failed = 0; + + /** + * A storage container for transient data that the loading files need. + * + * @name Phaser.Loader.MultiFile#config + * @type {any} + * @since 3.7.0 + */ + this.config = {}; + + /** + * A reference to the Loaders baseURL at the time this MultiFile was created. + * Used to populate child-files. + * + * @name Phaser.Loader.MultiFile#baseURL + * @type {string} + * @since 3.20.0 + */ + this.baseURL = loader.baseURL; + + /** + * A reference to the Loaders path at the time this MultiFile was created. + * Used to populate child-files. + * + * @name Phaser.Loader.MultiFile#path + * @type {string} + * @since 3.20.0 + */ + this.path = loader.path; + + /** + * A reference to the Loaders prefix at the time this MultiFile was created. + * Used to populate child-files. + * + * @name Phaser.Loader.MultiFile#prefix + * @type {string} + * @since 3.20.0 + */ + this.prefix = loader.prefix; + + // Link the files + for (var i = 0; i < files.length; i++) + { + files[i].multiFile = this; + } + }, + + /** + * Checks if this MultiFile is ready to process its children or not. + * + * @method Phaser.Loader.MultiFile#isReadyToProcess + * @since 3.7.0 + * + * @return {boolean} `true` if all children of this MultiFile have loaded, otherwise `false`. + */ + isReadyToProcess: function () + { + return (this.pending === 0 && this.failed === 0 && !this.complete); + }, + + /** + * Adds another child to this MultiFile, increases the pending count and resets the completion status. + * + * @method Phaser.Loader.MultiFile#addToMultiFile + * @since 3.7.0 + * + * @param {Phaser.Loader.File} files - The File to add to this MultiFile. + * + * @return {Phaser.Loader.MultiFile} This MultiFile instance. + */ + addToMultiFile: function (file) + { + this.files.push(file); + + file.multiFile = this; + + this.pending++; + + this.complete = false; + + return this; + }, + + /** + * Called by each File when it finishes loading. + * + * @method Phaser.Loader.MultiFile#onFileComplete + * @since 3.7.0 + * + * @param {Phaser.Loader.File} file - The File that has completed processing. + */ + onFileComplete: function (file) + { + var index = this.files.indexOf(file); + + if (index !== -1) + { + this.pending--; + } + }, + + /** + * Called by each File that fails to load. + * + * @method Phaser.Loader.MultiFile#onFileFailed + * @since 3.7.0 + * + * @param {Phaser.Loader.File} file - The File that has failed to load. + */ + onFileFailed: function (file) + { + var index = this.files.indexOf(file); + + if (index !== -1) + { + this.failed++; + } + } + +}); + +module.exports = MultiFile; + + +/***/ }), +/* 64 */, +/* 65 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Internally used method to set the colliding state of a tile. This does not recalculate + * interesting faces. + * + * @function Phaser.Tilemaps.Components.SetTileCollision + * @since 3.0.0 + * + * @param {Phaser.Tilemaps.Tile} tile - The Tile to set the collision on. + * @param {boolean} [collides=true] - Should the tile index collide or not? + */ +var SetTileCollision = function (tile, collides) +{ + if (collides) + { + tile.setCollision(true, true, true, true, false); + } + else + { + tile.resetCollision(false); + } +}; + +module.exports = SetTileCollision; + + +/***/ }), +/* 66 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Converts from world X coordinates (pixels) to tile X coordinates (tile units), factoring in the + * layer's position, scale and scroll. + * + * @function Phaser.Tilemaps.Components.WorldToTileX + * @since 3.0.0 + * + * @param {number} worldX - The x coordinate to be converted, in pixels, not tiles. + * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer. + * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values. + * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. + * + * @return {number} The X location in tile units. + */ +var WorldToTileX = function (worldX, snapToFloor, camera, layer) +{ + if (snapToFloor === undefined) { snapToFloor = true; } + + var tileWidth = layer.baseTileWidth; + var tilemapLayer = layer.tilemapLayer; + + if (tilemapLayer) + { + if (camera === undefined) { camera = tilemapLayer.scene.cameras.main; } + + // Find the world position relative to the static or dynamic layer's top left origin, + // factoring in the camera's horizontal scroll + worldX = worldX - (tilemapLayer.x + camera.scrollX * (1 - tilemapLayer.scrollFactorX)); + + tileWidth *= tilemapLayer.scaleX; + } + + return snapToFloor + ? Math.floor(worldX / tileWidth) + : worldX / tileWidth; +}; + +module.exports = WorldToTileX; + /***/ }), /* 67 */ /***/ (function(module, exports) { +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Converts from world Y coordinates (pixels) to tile Y coordinates (tile units), factoring in the + * layer's position, scale and scroll. + * + * @function Phaser.Tilemaps.Components.WorldToTileY + * @since 3.0.0 + * + * @param {number} worldY - The y coordinate to be converted, in pixels, not tiles. + * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer. + * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values. + * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. + * + * @return {number} The Y location in tile units. + */ +var WorldToTileY = function (worldY, snapToFloor, camera, layer) +{ + if (snapToFloor === undefined) { snapToFloor = true; } + + var tileHeight = layer.baseTileHeight; + var tilemapLayer = layer.tilemapLayer; + + if (tilemapLayer) + { + if (camera === undefined) { camera = tilemapLayer.scene.cameras.main; } + + // Find the world position relative to the static or dynamic layer's top left origin, + // factoring in the camera's vertical scroll + worldY = worldY - (tilemapLayer.y + camera.scrollY * (1 - tilemapLayer.scrollFactorY)); + + tileHeight *= tilemapLayer.scaleY; + } + + return snapToFloor + ? Math.floor(worldY / tileHeight) + : worldY / tileHeight; +}; + +module.exports = WorldToTileY; + + +/***/ }), +/* 68 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var Contains = __webpack_require__(57); +var GetPoint = __webpack_require__(276); +var GetPoints = __webpack_require__(277); +var GEOM_CONST = __webpack_require__(49); +var Random = __webpack_require__(158); + +/** + * @classdesc + * A Circle object. + * + * This is a geometry object, containing numerical values and related methods to inspect and modify them. + * It is not a Game Object, in that you cannot add it to the display list, and it has no texture. + * To render a Circle you should look at the capabilities of the Graphics class. + * + * @class Circle + * @memberof Phaser.Geom + * @constructor + * @since 3.0.0 + * + * @param {number} [x=0] - The x position of the center of the circle. + * @param {number} [y=0] - The y position of the center of the circle. + * @param {number} [radius=0] - The radius of the circle. + */ +var Circle = new Class({ + + initialize: + + function Circle (x, y, radius) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + if (radius === undefined) { radius = 0; } + + /** + * The geometry constant type of this object: `GEOM_CONST.CIRCLE`. + * Used for fast type comparisons. + * + * @name Phaser.Geom.Circle#type + * @type {integer} + * @readonly + * @since 3.19.0 + */ + this.type = GEOM_CONST.CIRCLE; + + /** + * The x position of the center of the circle. + * + * @name Phaser.Geom.Circle#x + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.x = x; + + /** + * The y position of the center of the circle. + * + * @name Phaser.Geom.Circle#y + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.y = y; + + /** + * The internal radius of the circle. + * + * @name Phaser.Geom.Circle#_radius + * @type {number} + * @private + * @since 3.0.0 + */ + this._radius = radius; + + /** + * The internal diameter of the circle. + * + * @name Phaser.Geom.Circle#_diameter + * @type {number} + * @private + * @since 3.0.0 + */ + this._diameter = radius * 2; + }, + + /** + * Check to see if the Circle contains the given x / y coordinates. + * + * @method Phaser.Geom.Circle#contains + * @since 3.0.0 + * + * @param {number} x - The x coordinate to check within the circle. + * @param {number} y - The y coordinate to check within the circle. + * + * @return {boolean} True if the coordinates are within the circle, otherwise false. + */ + contains: function (x, y) + { + return Contains(this, x, y); + }, + + /** + * Returns a Point object containing the coordinates of a point on the circumference of the Circle + * based on the given angle normalized to the range 0 to 1. I.e. a value of 0.5 will give the point + * at 180 degrees around the circle. + * + * @method Phaser.Geom.Circle#getPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [out,$return] + * + * @param {number} position - A value between 0 and 1, where 0 equals 0 degrees, 0.5 equals 180 degrees and 1 equals 360 around the circle. + * @param {(Phaser.Geom.Point|object)} [out] - An object to store the return values in. If not given a Point object will be created. + * + * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point around the circle. + */ + getPoint: function (position, point) + { + return GetPoint(this, position, point); + }, + + /** + * Returns an array of Point objects containing the coordinates of the points around the circumference of the Circle, + * based on the given quantity or stepRate values. + * + * @method Phaser.Geom.Circle#getPoints + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point[]} O - [output,$return] + * + * @param {integer} quantity - The amount of points to return. If a falsey value the quantity will be derived from the `stepRate` instead. + * @param {number} [stepRate] - Sets the quantity by getting the circumference of the circle and dividing it by the stepRate. + * @param {(array|Phaser.Geom.Point[])} [output] - An array to insert the points in to. If not provided a new array will be created. + * + * @return {(array|Phaser.Geom.Point[])} An array of Point objects pertaining to the points around the circumference of the circle. + */ + getPoints: function (quantity, stepRate, output) + { + return GetPoints(this, quantity, stepRate, output); + }, + + /** + * Returns a uniformly distributed random point from anywhere within the Circle. + * + * @method Phaser.Geom.Circle#getRandomPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [point,$return] + * + * @param {(Phaser.Geom.Point|object)} [point] - A Point or point-like object to set the random `x` and `y` values in. + * + * @return {(Phaser.Geom.Point|object)} A Point object with the random values set in the `x` and `y` properties. + */ + getRandomPoint: function (point) + { + return Random(this, point); + }, + + /** + * Sets the x, y and radius of this circle. + * + * @method Phaser.Geom.Circle#setTo + * @since 3.0.0 + * + * @param {number} [x=0] - The x position of the center of the circle. + * @param {number} [y=0] - The y position of the center of the circle. + * @param {number} [radius=0] - The radius of the circle. + * + * @return {this} This Circle object. + */ + setTo: function (x, y, radius) + { + this.x = x; + this.y = y; + this._radius = radius; + this._diameter = radius * 2; + + return this; + }, + + /** + * Sets this Circle to be empty with a radius of zero. + * Does not change its position. + * + * @method Phaser.Geom.Circle#setEmpty + * @since 3.0.0 + * + * @return {this} This Circle object. + */ + setEmpty: function () + { + this._radius = 0; + this._diameter = 0; + + return this; + }, + + /** + * Sets the position of this Circle. + * + * @method Phaser.Geom.Circle#setPosition + * @since 3.0.0 + * + * @param {number} [x=0] - The x position of the center of the circle. + * @param {number} [y=0] - The y position of the center of the circle. + * + * @return {this} This Circle object. + */ + setPosition: function (x, y) + { + if (y === undefined) { y = x; } + + this.x = x; + this.y = y; + + return this; + }, + + /** + * Checks to see if the Circle is empty: has a radius of zero. + * + * @method Phaser.Geom.Circle#isEmpty + * @since 3.0.0 + * + * @return {boolean} True if the Circle is empty, otherwise false. + */ + isEmpty: function () + { + return (this._radius <= 0); + }, + + /** + * The radius of the Circle. + * + * @name Phaser.Geom.Circle#radius + * @type {number} + * @since 3.0.0 + */ + radius: { + + get: function () + { + return this._radius; + }, + + set: function (value) + { + this._radius = value; + this._diameter = value * 2; + } + + }, + + /** + * The diameter of the Circle. + * + * @name Phaser.Geom.Circle#diameter + * @type {number} + * @since 3.0.0 + */ + diameter: { + + get: function () + { + return this._diameter; + }, + + set: function (value) + { + this._diameter = value; + this._radius = value * 0.5; + } + + }, + + /** + * The left position of the Circle. + * + * @name Phaser.Geom.Circle#left + * @type {number} + * @since 3.0.0 + */ + left: { + + get: function () + { + return this.x - this._radius; + }, + + set: function (value) + { + this.x = value + this._radius; + } + + }, + + /** + * The right position of the Circle. + * + * @name Phaser.Geom.Circle#right + * @type {number} + * @since 3.0.0 + */ + right: { + + get: function () + { + return this.x + this._radius; + }, + + set: function (value) + { + this.x = value - this._radius; + } + + }, + + /** + * The top position of the Circle. + * + * @name Phaser.Geom.Circle#top + * @type {number} + * @since 3.0.0 + */ + top: { + + get: function () + { + return this.y - this._radius; + }, + + set: function (value) + { + this.y = value + this._radius; + } + + }, + + /** + * The bottom position of the Circle. + * + * @name Phaser.Geom.Circle#bottom + * @type {number} + * @since 3.0.0 + */ + bottom: { + + get: function () + { + return this.y + this._radius; + }, + + set: function (value) + { + this.y = value - this._radius; + } + + } + +}); + +module.exports = Circle; + + +/***/ }), +/* 69 */ +/***/ (function(module, exports) { + /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. @@ -11405,7 +11590,7 @@ module.exports = Clone; /***/ }), -/* 68 */ +/* 70 */ /***/ (function(module, exports) { /** @@ -11454,7 +11639,7 @@ module.exports = SafeRange; /***/ }), -/* 69 */ +/* 71 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -11463,8 +11648,8 @@ module.exports = SafeRange; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var EaseMap = __webpack_require__(120); -var UppercaseFirst = __webpack_require__(187); +var EaseMap = __webpack_require__(122); +var UppercaseFirst = __webpack_require__(189); /** * This internal function is used to return the correct ease function for a Tween. @@ -11563,7 +11748,7 @@ module.exports = GetEaseFunction; /***/ }), -/* 70 */ +/* 72 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -11638,7 +11823,7 @@ module.exports = StrokePathWebGL; /***/ }), -/* 71 */ +/* 73 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -11648,12 +11833,12 @@ module.exports = StrokePathWebGL; */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(84); -var GetPoint = __webpack_require__(425); -var GetPoints = __webpack_require__(426); -var GEOM_CONST = __webpack_require__(48); -var Line = __webpack_require__(39); -var Random = __webpack_require__(164); +var Contains = __webpack_require__(85); +var GetPoint = __webpack_require__(442); +var GetPoints = __webpack_require__(443); +var GEOM_CONST = __webpack_require__(49); +var Line = __webpack_require__(40); +var Random = __webpack_require__(166); /** * @classdesc @@ -12085,7 +12270,7 @@ module.exports = Triangle; /***/ }), -/* 72 */ +/* 74 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -12096,7 +12281,7 @@ module.exports = Triangle; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var File = __webpack_require__(21); +var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -12359,43 +12544,7 @@ module.exports = ImageFile; /***/ }), -/* 73 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Internally used method to set the colliding state of a tile. This does not recalculate - * interesting faces. - * - * @function Phaser.Tilemaps.Components.SetTileCollision - * @private - * @since 3.0.0 - * - * @param {Phaser.Tilemaps.Tile} tile - The Tile to set the collision on. - * @param {boolean} [collides=true] - Should the tile index collide or not? - */ -var SetTileCollision = function (tile, collides) -{ - if (collides) - { - tile.setCollision(true, true, true, true, false); - } - else - { - tile.resetCollision(false); - } -}; - -module.exports = SetTileCollision; - - -/***/ }), -/* 74 */ +/* 75 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -12405,8 +12554,8 @@ module.exports = SetTileCollision; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var Rectangle = __webpack_require__(447); +var Components = __webpack_require__(11); +var Rectangle = __webpack_require__(464); /** * @classdesc @@ -13233,7 +13382,7 @@ module.exports = Tile; /***/ }), -/* 75 */ +/* 76 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -13242,10 +13391,12 @@ module.exports = Tile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var AnimationState = __webpack_require__(248); var Class = __webpack_require__(0); -var Components = __webpack_require__(12); +var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); -var SpriteRender = __webpack_require__(976); +var GameObjectEvents = __webpack_require__(29); +var SpriteRender = __webpack_require__(987); /** * @classdesc @@ -13325,19 +13476,38 @@ var Sprite = new Class({ this._crop = this.resetCropObject(); /** - * The Animation Controller of this Sprite. + * The Animation State component of this Sprite. + * + * This component provides features to apply animations to this Sprite. + * It is responsible for playing, loading, queuing animations for later playback, + * mixing between animations and setting the current animation frame to this Sprite. * * @name Phaser.GameObjects.Sprite#anims - * @type {Phaser.GameObjects.Components.Animation} + * @type {Phaser.Animations.AnimationState} * @since 3.0.0 */ - this.anims = new Components.Animation(this); + this.anims = new AnimationState(this); this.setTexture(texture, frame); this.setPosition(x, y); this.setSizeToFrame(); this.setOriginFromFrame(); this.initPipeline(); + + this.on(GameObjectEvents.ADDED_TO_SCENE, this.addedToScene, this); + this.on(GameObjectEvents.REMOVED_FROM_SCENE, this.removedFromScene, this); + }, + + // Overrides Game Object method + addedToScene: function () + { + this.scene.sys.updateList.add(this); + }, + + // Overrides Game Object method + removedFromScene: function () + { + this.scene.sys.updateList.remove(this); }, /** @@ -13356,22 +13526,310 @@ var Sprite = new Class({ }, /** - * Start playing the given animation. + * Start playing the given animation on this Sprite. + * + * Animations in Phaser can either belong to the global Animation Manager, or specifically to this Sprite. + * + * The benefit of a global animation is that multiple Sprites can all play the same animation, without + * having to duplicate the data. You can just create it once and then play it on any Sprite. + * + * The following code shows how to create a global repeating animation. The animation will be created + * from all of the frames within the sprite sheet that was loaded with the key 'muybridge': + * + * ```javascript + * var config = { + * key: 'run', + * frames: 'muybridge', + * frameRate: 15, + * repeat: -1 + * }; + * + * // This code should be run from within a Scene: + * this.anims.create(config); + * ``` + * + * However, if you wish to create an animation that is unique to this Sprite, and this Sprite alone, + * you can call the `Animation.create` method instead. It accepts the exact same parameters as when + * creating a global animation, however the resulting data is kept locally in this Sprite. + * + * With the animation created, either globally or locally, you can now play it on this Sprite: + * + * ```javascript + * this.add.sprite(x, y).play('run'); + * ``` + * + * Alternatively, if you wish to run it at a different frame rate, for example, you can pass a config + * object instead: + * + * ```javascript + * this.add.sprite(x, y).play({ key: 'run', frameRate: 24 }); + * ``` + * + * When playing an animation on a Sprite it will first check to see if it can find a matching key + * locally within the Sprite. If it can, it will play the local animation. If not, it will then + * search the global Animation Manager and look for it there. + * + * If you need a Sprite to be able to play both local and global animations, make sure they don't + * have conflicting keys. + * + * See the documentation for the `PlayAnimationConfig` config object for more details about this. + * + * Also, see the documentation in the Animation Manager for further details on creating animations. * * @method Phaser.GameObjects.Sprite#play + * @fires Phaser.Animations.Events#ANIMATION_START * @since 3.0.0 * - * @param {string} key - The string-based key of the animation to play. + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. - * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. * * @return {this} This Game Object. */ - play: function (key, ignoreIfPlaying, startFrame) + play: function (key, ignoreIfPlaying) { - this.anims.play(key, ignoreIfPlaying, startFrame); + return this.anims.play(key, ignoreIfPlaying); + }, - return this; + /** + * Start playing the given animation on this Sprite, in reverse. + * + * Animations in Phaser can either belong to the global Animation Manager, or specifically to this Sprite. + * + * The benefit of a global animation is that multiple Sprites can all play the same animation, without + * having to duplicate the data. You can just create it once and then play it on any Sprite. + * + * The following code shows how to create a global repeating animation. The animation will be created + * from all of the frames within the sprite sheet that was loaded with the key 'muybridge': + * + * ```javascript + * var config = { + * key: 'run', + * frames: 'muybridge', + * frameRate: 15, + * repeat: -1 + * }; + * + * // This code should be run from within a Scene: + * this.anims.create(config); + * ``` + * + * However, if you wish to create an animation that is unique to this Sprite, and this Sprite alone, + * you can call the `Animation.create` method instead. It accepts the exact same parameters as when + * creating a global animation, however the resulting data is kept locally in this Sprite. + * + * With the animation created, either globally or locally, you can now play it on this Sprite: + * + * ```javascript + * this.add.sprite(x, y).playReverse('run'); + * ``` + * + * Alternatively, if you wish to run it at a different frame rate, for example, you can pass a config + * object instead: + * + * ```javascript + * this.add.sprite(x, y).playReverse({ key: 'run', frameRate: 24 }); + * ``` + * + * When playing an animation on a Sprite it will first check to see if it can find a matching key + * locally within the Sprite. If it can, it will play the local animation. If not, it will then + * search the global Animation Manager and look for it there. + * + * If you need a Sprite to be able to play both local and global animations, make sure they don't + * have conflicting keys. + * + * See the documentation for the `PlayAnimationConfig` config object for more details about this. + * + * Also, see the documentation in the Animation Manager for further details on creating animations. + * + * @method Phaser.GameObjects.Sprite#playReverse + * @fires Phaser.Animations.Events#ANIMATION_START + * @since 3.50.0 + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. + * + * @return {this} This Game Object. + */ + playReverse: function (key, ignoreIfPlaying) + { + return this.anims.playReverse(key, ignoreIfPlaying); + }, + + /** + * Waits for the specified delay, in milliseconds, then starts playback of the given animation. + * + * If the animation _also_ has a delay value set in its config, it will be **added** to the delay given here. + * + * If an animation is already running and a new animation is given to this method, it will wait for + * the given delay before starting the new animation. + * + * If no animation is currently running, the given one begins after the delay. + * + * When playing an animation on a Sprite it will first check to see if it can find a matching key + * locally within the Sprite. If it can, it will play the local animation. If not, it will then + * search the global Animation Manager and look for it there. + * + * Prior to Phaser 3.50 this method was called 'delayedPlay'. + * + * @method Phaser.GameObjects.Components.Animation#playAfterDelay + * @fires Phaser.Animations.Events#ANIMATION_START + * @since 3.50.0 + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {integer} delay - The delay, in milliseconds, to wait before starting the animation playing. + * + * @return {this} This Game Object. + */ + playAfterDelay: function (key, delay) + { + return this.anims.playAfterDelay(key, delay); + }, + + /** + * Waits for the current animation to complete the `repeatCount` number of repeat cycles, then starts playback + * of the given animation. + * + * You can use this to ensure there are no harsh jumps between two sets of animations, i.e. going from an + * idle animation to a walking animation, by making them blend smoothly into each other. + * + * If no animation is currently running, the given one will start immediately. + * + * When playing an animation on a Sprite it will first check to see if it can find a matching key + * locally within the Sprite. If it can, it will play the local animation. If not, it will then + * search the global Animation Manager and look for it there. + * + * @method Phaser.GameObjects.Components.Animation#playAfterRepeat + * @fires Phaser.Animations.Events#ANIMATION_START + * @since 3.50.0 + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {integer} [repeatCount=1] - How many times should the animation repeat before the next one starts? + * + * @return {this} This Game Object. + */ + playAfterRepeat: function (key, repeatCount) + { + return this.anims.playAfterRepeat(key, repeatCount); + }, + + /** + * Sets an animation, or an array of animations, to be played immediately after the current one completes or stops. + * + * The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc, + * or have the `stop` method called directly on it. + * + * An animation set to repeat forever will never enter a completed state. + * + * You can chain a new animation at any point, including before the current one starts playing, during it, + * or when it ends (via its `animationcomplete` event). + * + * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained + * animations without impacting the animation they're playing. + * + * Call this method with no arguments to reset all currently chained animations. + * + * When playing an animation on a Sprite it will first check to see if it can find a matching key + * locally within the Sprite. If it can, it will play the local animation. If not, it will then + * search the global Animation Manager and look for it there. + * + * @method Phaser.GameObjects.Sprite#chain + * @since 3.50.0 + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig|string[]|Phaser.Animations.Animation[]|Phaser.Types.Animations.PlayAnimationConfig[])} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object, or an array of them. + * + * @return {this} This Game Object. + */ + chain: function (key) + { + return this.anims.chain(key); + }, + + /** + * Immediately stops the current animation from playing and dispatches the `ANIMATION_STOP` events. + * + * If no animation is playing, no event will be dispatched. + * + * If there is another animation queued (via the `chain` method) then it will start playing immediately. + * + * @method Phaser.GameObjects.Sprite#stop + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @since 3.50.0 + * + * @return {this} This Game Object. + */ + stop: function () + { + return this.anims.stop(); + }, + + /** + * Stops the current animation from playing after the specified time delay, given in milliseconds. + * + * It then dispatches the `ANIMATION_STOP` event. + * + * If no animation is running, no events will be dispatched. + * + * If there is another animation in the queue (set via the `chain` method) then it will start playing, + * when the current one stops. + * + * @method Phaser.GameObjects.Sprite#stopAfterDelay + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @since 3.50.0 + * + * @param {integer} delay - The number of milliseconds to wait before stopping this animation. + * + * @return {this} This Game Object. + */ + stopAfterDelay: function (delay) + { + return this.anims.stopAfterDelay(delay); + }, + + /** + * Stops the current animation from playing after the given number of repeats. + * + * It then dispatches the `ANIMATION_STOP` event. + * + * If no animation is running, no events will be dispatched. + * + * If there is another animation in the queue (set via the `chain` method) then it will start playing, + * when the current one stops. + * + * @method Phaser.GameObjects.Sprite#stopAfterRepeat + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @since 3.50.0 + * + * @param {integer} [repeatCount=1] - How many times should the animation repeat before stopping? + * + * @return {this} This Game Object. + */ + stopAfterRepeat: function (repeatCount) + { + return this.anims.stopAfterRepeat(repeatCount); + }, + + /** + * Stops the current animation from playing when it next sets the given frame. + * If this frame doesn't exist within the animation it will not stop it from playing. + * + * It then dispatches the `ANIMATION_STOP` event. + * + * If no animation is running, no events will be dispatched. + * + * If there is another animation in the queue (set via the `chain` method) then it will start playing, + * when the current one stops. + * + * @method Phaser.GameObjects.Sprite#stopOnFrame + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @since 3.50.0 + * + * @param {Phaser.Animations.AnimationFrame} frame - The frame to check before stopping this animation. + * + * @return {this} This Game Object. + */ + stopOnFrame: function (frame) + { + return this.anims.stopOnFrame(frame); }, /** @@ -13384,11 +13842,7 @@ var Sprite = new Class({ */ toJSON: function () { - var data = Components.ToJSON(this); - - // Extra Sprite data is added here - - return data; + return Components.ToJSON(this); }, /** @@ -13411,7 +13865,7 @@ module.exports = Sprite; /***/ }), -/* 76 */ +/* 77 */ /***/ (function(module, exports) { /** @@ -13439,7 +13893,7 @@ module.exports = GetCenterX; /***/ }), -/* 77 */ +/* 78 */ /***/ (function(module, exports) { /** @@ -13474,7 +13928,7 @@ module.exports = SetCenterX; /***/ }), -/* 78 */ +/* 79 */ /***/ (function(module, exports) { /** @@ -13502,7 +13956,7 @@ module.exports = GetCenterY; /***/ }), -/* 79 */ +/* 80 */ /***/ (function(module, exports) { /** @@ -13537,7 +13991,7 @@ module.exports = SetCenterY; /***/ }), -/* 80 */ +/* 81 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -14347,7 +14801,7 @@ module.exports = Vector3; /***/ }), -/* 81 */ +/* 82 */ /***/ (function(module, exports) { /** @@ -14393,7 +14847,7 @@ module.exports = SpliceOne; /***/ }), -/* 82 */ +/* 83 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -14403,7 +14857,7 @@ module.exports = SpliceOne; */ var Class = __webpack_require__(0); -var FromPoints = __webpack_require__(182); +var FromPoints = __webpack_require__(184); var Rectangle = __webpack_require__(9); var Vector2 = __webpack_require__(3); @@ -15010,7 +15464,7 @@ module.exports = Curve; /***/ }), -/* 83 */ +/* 84 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -15025,22 +15479,22 @@ module.exports = Curve; module.exports = { - ADD: __webpack_require__(878), - COMPLETE: __webpack_require__(879), - FILE_COMPLETE: __webpack_require__(880), - FILE_KEY_COMPLETE: __webpack_require__(881), - FILE_LOAD_ERROR: __webpack_require__(882), - FILE_LOAD: __webpack_require__(883), - FILE_PROGRESS: __webpack_require__(884), - POST_PROCESS: __webpack_require__(885), - PROGRESS: __webpack_require__(886), - START: __webpack_require__(887) + ADD: __webpack_require__(894), + COMPLETE: __webpack_require__(895), + FILE_COMPLETE: __webpack_require__(896), + FILE_KEY_COMPLETE: __webpack_require__(897), + FILE_LOAD_ERROR: __webpack_require__(898), + FILE_LOAD: __webpack_require__(899), + FILE_PROGRESS: __webpack_require__(900), + POST_PROCESS: __webpack_require__(901), + PROGRESS: __webpack_require__(902), + START: __webpack_require__(903) }; /***/ }), -/* 84 */ +/* 85 */ /***/ (function(module, exports) { /** @@ -15093,7 +15547,7 @@ module.exports = Contains; /***/ }), -/* 85 */ +/* 86 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -15169,7 +15623,7 @@ module.exports = LineToLine; /***/ }), -/* 86 */ +/* 87 */ /***/ (function(module, exports) { /** @@ -15197,8 +15651,8 @@ module.exports = Angle; /***/ }), -/* 87 */, -/* 88 */ +/* 88 */, +/* 89 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -15232,7 +15686,7 @@ module.exports = FromPercent; /***/ }), -/* 89 */ +/* 90 */ /***/ (function(module, exports) { /** @@ -15273,7 +15727,7 @@ module.exports = GetBoolean; /***/ }), -/* 90 */ +/* 91 */ /***/ (function(module, exports) { /** @@ -15444,37 +15898,6 @@ var TWEEN_CONST = { module.exports = TWEEN_CONST; -/***/ }), -/* 91 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.GameObjects.Events - */ - -module.exports = { - - DESTROY: __webpack_require__(586), - VIDEO_COMPLETE: __webpack_require__(587), - VIDEO_CREATED: __webpack_require__(588), - VIDEO_ERROR: __webpack_require__(589), - VIDEO_LOOP: __webpack_require__(590), - VIDEO_PLAY: __webpack_require__(591), - VIDEO_SEEKED: __webpack_require__(592), - VIDEO_SEEKING: __webpack_require__(593), - VIDEO_STOP: __webpack_require__(594), - VIDEO_TIMEOUT: __webpack_require__(595), - VIDEO_UNLOCKED: __webpack_require__(596) - -}; - - /***/ }), /* 92 */ /***/ (function(module, exports, __webpack_require__) { @@ -15486,13 +15909,13 @@ module.exports = { */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var DegToRad = __webpack_require__(40); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(41); +var Components = __webpack_require__(11); +var DegToRad = __webpack_require__(41); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(42); var Rectangle = __webpack_require__(9); -var TransformMatrix = __webpack_require__(30); -var ValueToColor = __webpack_require__(170); +var TransformMatrix = __webpack_require__(31); +var ValueToColor = __webpack_require__(172); var Vector2 = __webpack_require__(3); /** @@ -17412,12 +17835,12 @@ module.exports = BaseCamera; module.exports = { - ENTER_FULLSCREEN: __webpack_require__(707), - FULLSCREEN_FAILED: __webpack_require__(708), - FULLSCREEN_UNSUPPORTED: __webpack_require__(709), - LEAVE_FULLSCREEN: __webpack_require__(710), - ORIENTATION_CHANGE: __webpack_require__(711), - RESIZE: __webpack_require__(712) + ENTER_FULLSCREEN: __webpack_require__(723), + FULLSCREEN_FAILED: __webpack_require__(724), + FULLSCREEN_UNSUPPORTED: __webpack_require__(725), + LEAVE_FULLSCREEN: __webpack_require__(726), + ORIENTATION_CHANGE: __webpack_require__(727), + RESIZE: __webpack_require__(728) }; @@ -17470,6 +17893,97 @@ module.exports = SnapFloor; /* 95 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SpliceOne = __webpack_require__(82); + +/** + * Removes the given item, or array of items, from the array. + * + * The array is modified in-place. + * + * You can optionally specify a callback to be invoked for each item successfully removed from the array. + * + * @function Phaser.Utils.Array.Remove + * @since 3.4.0 + * + * @param {array} array - The array to be modified. + * @param {*|Array.<*>} item - The item, or array of items, to be removed from the array. + * @param {function} [callback] - A callback to be invoked for each item successfully removed from the array. + * @param {object} [context] - The context in which the callback is invoked. + * + * @return {*|Array.<*>} The item, or array of items, that were successfully removed from the array. + */ +var Remove = function (array, item, callback, context) +{ + if (context === undefined) { context = array; } + + var index; + + // Fast path to avoid array mutation and iteration + if (!Array.isArray(item)) + { + index = array.indexOf(item); + + if (index !== -1) + { + SpliceOne(array, index); + + if (callback) + { + callback.call(context, item); + } + + return item; + } + else + { + return null; + } + } + + // If we got this far, we have an array of items to remove + + var itemLength = item.length - 1; + + while (itemLength >= 0) + { + var entry = item[itemLength]; + + index = array.indexOf(entry); + + if (index !== -1) + { + SpliceOne(array, index); + + if (callback) + { + callback.call(context, entry); + } + } + else + { + // Item wasn't found in the array, so remove it from our return results + item.pop(); + } + + itemLength--; + } + + return item; +}; + +module.exports = Remove; + + +/***/ }), +/* 96 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. @@ -18324,7 +18838,7 @@ module.exports = Frame; /***/ }), -/* 96 */ +/* 97 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -18334,11 +18848,11 @@ module.exports = Frame; */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(97); -var GetPoint = __webpack_require__(398); -var GetPoints = __webpack_require__(399); -var GEOM_CONST = __webpack_require__(48); -var Random = __webpack_require__(163); +var Contains = __webpack_require__(98); +var GetPoint = __webpack_require__(411); +var GetPoints = __webpack_require__(412); +var GEOM_CONST = __webpack_require__(49); +var Random = __webpack_require__(165); /** * @classdesc @@ -18706,7 +19220,7 @@ module.exports = Ellipse; /***/ }), -/* 97 */ +/* 98 */ /***/ (function(module, exports) { /** @@ -18748,7 +19262,7 @@ module.exports = Contains; /***/ }), -/* 98 */ +/* 99 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -18757,15 +19271,16 @@ module.exports = Contains; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Actions = __webpack_require__(245); +var Actions = __webpack_require__(251); var Class = __webpack_require__(0); -var Events = __webpack_require__(91); +var Events = __webpack_require__(29); +var GetAll = __webpack_require__(191); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); var IsPlainObject = __webpack_require__(7); -var Range = __webpack_require__(392); -var Set = __webpack_require__(139); -var Sprite = __webpack_require__(75); +var Range = __webpack_require__(403); +var Set = __webpack_require__(140); +var Sprite = __webpack_require__(76); /** * @classdesc @@ -19197,6 +19712,13 @@ var Group = new Class({ Actions.SetScale(entries, scaleX, scaleY, stepScaleX, stepScaleY); + var originX = GetValue(options, 'setOrigin.x', 0.5); + var originY = GetValue(options, 'setOrigin.y', originX); + var stepOriginX = GetValue(options, 'setOrigin.stepX', 0); + var stepOriginY = GetValue(options, 'setOrigin.stepY', 0); + + Actions.SetOrigin(entries, originX, originY, stepOriginX, stepOriginY); + var alpha = GetValue(options, 'setAlpha.value', 1); var stepAlpha = GetValue(options, 'setAlpha.step', 0); @@ -19486,6 +20008,30 @@ var Group = new Class({ return this.children.size; }, + /** + * Returns all children in this Group that match the given criteria based on the `property` and `value` arguments. + * + * For example: `getAll('visible', true)` would return only children that have their `visible` property set. + * + * Optionally, you can specify a start and end index. For example if the Group has 100 elements, + * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only + * the first 50. + * + * @method Phaser.GameObjects.Group#getMatching + * @since 3.50.0 + * + * @param {string} [property] - The property to test on each array element. + * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check. + * @param {integer} [startIndex] - An optional start index to search from. + * @param {integer} [endIndex] - An optional end index to search to. + * + * @return {any[]} An array of matching Group members. The array will be empty if nothing matched. + */ + getMatching: function (property, value, startIndex, endIndex) + { + return GetAll(this.children, property, value, startIndex, endIndex); + }, + /** * Scans the Group, from top to bottom, for the first member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument, * assigns `x` and `y`, and returns the member. @@ -20426,7 +20972,7 @@ module.exports = Group; /***/ }), -/* 99 */ +/* 100 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -20490,9 +21036,9 @@ module.exports = FillPathWebGL; /***/ }), -/* 100 */, /* 101 */, -/* 102 */ +/* 102 */, +/* 103 */ /***/ (function(module, exports) { /** @@ -20505,13 +21051,12 @@ module.exports = FillPathWebGL; * Checks if the given tile coordinates are within the bounds of the layer. * * @function Phaser.Tilemaps.Components.IsInLayerBounds - * @private * @since 3.0.0 * * @param {integer} tileX - The x coordinate, in tiles, not pixels. * @param {integer} tileY - The y coordinate, in tiles, not pixels. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {boolean} `true` if the tile coordinates are within the bounds of the layer, otherwise `false`. */ var IsInLayerBounds = function (tileX, tileY, layer) @@ -20523,7 +21068,7 @@ module.exports = IsInLayerBounds; /***/ }), -/* 103 */ +/* 104 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -20743,7 +21288,7 @@ module.exports = LayerData; /***/ }), -/* 104 */ +/* 105 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -20968,7 +21513,7 @@ module.exports = MapData; /***/ }), -/* 105 */ +/* 106 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -21372,7 +21917,7 @@ module.exports = Tileset; /***/ }), -/* 106 */ +/* 107 */ /***/ (function(module, exports) { /** @@ -21506,7 +22051,7 @@ module.exports = ALIGN_CONST; /***/ }), -/* 107 */ +/* 108 */ /***/ (function(module, exports) { /** @@ -21540,7 +22085,7 @@ module.exports = Equal; /***/ }), -/* 108 */ +/* 109 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -21712,7 +22257,14 @@ var WebGLPipeline = new Class({ * @type {WebGLBuffer} * @since 3.0.0 */ - this.vertexBuffer = this.renderer.createVertexBuffer(this.vertexData.byteLength, this.gl.STREAM_DRAW); + if (GetFastValue(config, 'vertices', null)) + { + this.vertexBuffer = this.renderer.createVertexBuffer(this.vertexData, this.gl.STREAM_DRAW); + } + else + { + this.vertexBuffer = this.renderer.createVertexBuffer(this.vertexData.byteLength, this.gl.STREAM_DRAW); + } /** * The handle to a WebGL program. @@ -21822,33 +22374,12 @@ var WebGLPipeline = new Class({ */ boot: function () { - var gl = this.gl; - var vertexBuffer = this.vertexBuffer; - var attributes = this.attributes; - var program = this.program; var renderer = this.renderer; - var vertexSize = this.vertexSize; - renderer.setProgram(program); - renderer.setVertexBuffer(vertexBuffer); + renderer.setProgram(this.program); + renderer.setVertexBuffer(this.vertexBuffer); - for (var i = 0; i < attributes.length; i++) - { - var element = attributes[i]; - var location = gl.getAttribLocation(program, element.name); - - if (location >= 0) - { - gl.enableVertexAttribArray(location); - gl.vertexAttribPointer(location, element.size, element.type, element.normalized, vertexSize, element.offset); - element.enabled = true; - element.location = location; - } - else if (location !== -1) - { - gl.disableVertexAttribArray(location); - } - } + this.setAttribPointers(true); this.hasBooted = true; @@ -21949,10 +22480,14 @@ var WebGLPipeline = new Class({ * @method Phaser.Renderer.WebGL.WebGLPipeline#bind * @since 3.0.0 * + * @param {boolean} [reset=false] - Should the pipeline be fully re-bound after a renderer pipeline clear? + * * @return {this} This WebGLPipeline instance. */ - bind: function () + bind: function (reset) { + if (reset === undefined) { reset = false; } + var vertexBuffer = this.vertexBuffer; var program = this.program; var renderer = this.renderer; @@ -21960,7 +22495,7 @@ var WebGLPipeline = new Class({ renderer.setProgram(program); renderer.setVertexBuffer(vertexBuffer); - this.setAttribPointers(); + this.setAttribPointers(reset); return this; }, @@ -21972,19 +22507,40 @@ var WebGLPipeline = new Class({ * @method Phaser.Renderer.WebGL.WebGLPipeline#setAttribPointers * @since 3.50.0 * + * @param {boolean} [reset=false] - Reset the vertex attribute locations? + * * @return {this} This WebGLPipeline instance. */ - setAttribPointers: function () + setAttribPointers: function (reset) { + if (reset === undefined) { reset = false; } + var gl = this.gl; var attributes = this.attributes; var vertexSize = this.vertexSize; + var program = this.program; for (var i = 0; i < attributes.length; i++) { var element = attributes[i]; - if (element.enabled) + if (reset) + { + var location = gl.getAttribLocation(program, element.name); + + if (location >= 0) + { + gl.enableVertexAttribArray(location); + gl.vertexAttribPointer(location, element.size, element.type, element.normalized, vertexSize, element.offset); + element.enabled = true; + element.location = location; + } + else if (location !== -1) + { + gl.disableVertexAttribArray(location); + } + } + else if (element.enabled) { gl.vertexAttribPointer(element.location, element.size, element.type, element.normalized, vertexSize, element.offset); } @@ -22405,7 +22961,7 @@ module.exports = WebGLPipeline; /***/ }), -/* 109 */ +/* 110 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -22416,15 +22972,15 @@ module.exports = WebGLPipeline; */ var Class = __webpack_require__(0); -var Earcut = __webpack_require__(66); +var Earcut = __webpack_require__(60); var GetFastValue = __webpack_require__(2); -var ModelViewProjection = __webpack_require__(110); -var ProjectOrtho = __webpack_require__(181); -var ShaderSourceFS = __webpack_require__(793); -var ShaderSourceVS = __webpack_require__(794); -var TransformMatrix = __webpack_require__(30); +var ModelViewProjection = __webpack_require__(111); +var ProjectOrtho = __webpack_require__(183); +var ShaderSourceFS = __webpack_require__(811); +var ShaderSourceVS = __webpack_require__(812); +var TransformMatrix = __webpack_require__(31); var Utils = __webpack_require__(10); -var WebGLPipeline = __webpack_require__(108); +var WebGLPipeline = __webpack_require__(109); /** * @classdesc @@ -22708,11 +23264,15 @@ var MultiPipeline = new Class({ * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#bind * @since 3.50.0 * + * @param {boolean} [reset=false] - Should the pipeline be fully re-bound after a renderer pipeline clear? + * * @return {this} This WebGLPipeline instance. */ - bind: function () + bind: function (reset) { - WebGLPipeline.prototype.bind.call(this); + if (reset === undefined) { reset = false; } + + WebGLPipeline.prototype.bind.call(this, reset); this.renderer.setInt1iv(this.program, 'uMainSampler', this.renderer.textureIndexes); @@ -23848,7 +24408,7 @@ module.exports = MultiPipeline; /***/ }), -/* 110 */ +/* 111 */ /***/ (function(module, exports) { /** @@ -23992,7 +24552,7 @@ module.exports = ModelViewProjection; /***/ }), -/* 111 */ +/* 112 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -24002,9 +24562,9 @@ module.exports = ModelViewProjection; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); +var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); -var ImageRender = __webpack_require__(979); +var ImageRender = __webpack_require__(990); /** * @classdesc @@ -24093,7 +24653,7 @@ module.exports = Image; /***/ }), -/* 112 */ +/* 113 */ /***/ (function(module, exports) { /** @@ -24122,8 +24682,8 @@ module.exports = HasValue; /***/ }), -/* 113 */, -/* 114 */ +/* 114 */, +/* 115 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -24132,14 +24692,14 @@ module.exports = HasValue; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlendModes = __webpack_require__(53); -var Circle = __webpack_require__(65); -var CircleContains = __webpack_require__(56); +var BlendModes = __webpack_require__(54); +var Circle = __webpack_require__(68); +var CircleContains = __webpack_require__(57); var Class = __webpack_require__(0); -var Components = __webpack_require__(12); +var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); var Rectangle = __webpack_require__(9); -var RectangleContains = __webpack_require__(49); +var RectangleContains = __webpack_require__(50); /** * @classdesc @@ -24435,44 +24995,6 @@ var Zone = new Class({ module.exports = Zone; -/***/ }), -/* 115 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Animations.Events - */ - -module.exports = { - - ADD_ANIMATION: __webpack_require__(538), - ANIMATION_COMPLETE: __webpack_require__(539), - ANIMATION_REPEAT: __webpack_require__(540), - ANIMATION_RESTART: __webpack_require__(541), - ANIMATION_START: __webpack_require__(542), - PAUSE_ALL: __webpack_require__(543), - REMOVE_ANIMATION: __webpack_require__(544), - RESUME_ALL: __webpack_require__(545), - SPRITE_ANIMATION_COMPLETE: __webpack_require__(546), - SPRITE_ANIMATION_KEY_COMPLETE: __webpack_require__(547), - SPRITE_ANIMATION_KEY_REPEAT: __webpack_require__(548), - SPRITE_ANIMATION_KEY_RESTART: __webpack_require__(549), - SPRITE_ANIMATION_KEY_START: __webpack_require__(550), - SPRITE_ANIMATION_KEY_UPDATE: __webpack_require__(551), - SPRITE_ANIMATION_REPEAT: __webpack_require__(552), - SPRITE_ANIMATION_RESTART: __webpack_require__(553), - SPRITE_ANIMATION_START: __webpack_require__(554), - SPRITE_ANIMATION_UPDATE: __webpack_require__(555) - -}; - - /***/ }), /* 116 */ /***/ (function(module, exports) { @@ -24541,7 +25063,7 @@ module.exports = GetColorFromValue; */ var Class = __webpack_require__(0); -var Events = __webpack_require__(288); +var Events = __webpack_require__(292); /** * @callback DataEachCallback @@ -25288,18 +25810,421 @@ module.exports = Shuffle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Back = __webpack_require__(306); -var Bounce = __webpack_require__(307); -var Circular = __webpack_require__(308); -var Cubic = __webpack_require__(309); -var Elastic = __webpack_require__(310); -var Expo = __webpack_require__(311); -var Linear = __webpack_require__(312); -var Quadratic = __webpack_require__(313); -var Quartic = __webpack_require__(314); -var Quintic = __webpack_require__(315); -var Sine = __webpack_require__(316); -var Stepped = __webpack_require__(317); +/** + * @namespace Phaser.Animations.Events + */ + +module.exports = { + + ADD_ANIMATION: __webpack_require__(649), + ANIMATION_COMPLETE: __webpack_require__(650), + ANIMATION_REPEAT: __webpack_require__(651), + ANIMATION_RESTART: __webpack_require__(652), + ANIMATION_START: __webpack_require__(653), + ANIMATION_STOP: __webpack_require__(654), + ANIMATION_UPDATE: __webpack_require__(655), + PAUSE_ALL: __webpack_require__(656), + REMOVE_ANIMATION: __webpack_require__(657), + RESUME_ALL: __webpack_require__(658) + +}; + + +/***/ }), +/* 121 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); + +/** + * @callback EachMapCallback + * + * @param {string} key - The key of the Map entry. + * @param {E} entry - The value of the Map entry. + * + * @return {?boolean} The callback result. + */ + +/** + * @classdesc + * The keys of a Map can be arbitrary values. + * + * ```javascript + * var map = new Map([ + * [ 1, 'one' ], + * [ 2, 'two' ], + * [ 3, 'three' ] + * ]); + * ``` + * + * @class Map + * @memberof Phaser.Structs + * @constructor + * @since 3.0.0 + * + * @generic K + * @generic V + * @genericUse {V[]} - [elements] + * + * @param {Array.<*>} elements - An optional array of key-value pairs to populate this Map with. + */ +var Map = new Class({ + + initialize: + + function Map (elements) + { + /** + * The entries in this Map. + * + * @genericUse {Object.} - [$type] + * + * @name Phaser.Structs.Map#entries + * @type {Object.} + * @default {} + * @since 3.0.0 + */ + this.entries = {}; + + /** + * The number of key / value pairs in this Map. + * + * @name Phaser.Structs.Map#size + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.size = 0; + + if (Array.isArray(elements)) + { + for (var i = 0; i < elements.length; i++) + { + this.set(elements[i][0], elements[i][1]); + } + } + }, + + /** + * Adds an element with a specified `key` and `value` to this Map. + * If the `key` already exists, the value will be replaced. + * + * @method Phaser.Structs.Map#set + * @since 3.0.0 + * + * @genericUse {K} - [key] + * @genericUse {V} - [value] + * @genericUse {Phaser.Structs.Map.} - [$return] + * + * @param {string} key - The key of the element to be added to this Map. + * @param {*} value - The value of the element to be added to this Map. + * + * @return {Phaser.Structs.Map} This Map object. + */ + set: function (key, value) + { + if (!this.has(key)) + { + this.size++; + } + + this.entries[key] = value; + + return this; + }, + + /** + * Returns the value associated to the `key`, or `undefined` if there is none. + * + * @method Phaser.Structs.Map#get + * @since 3.0.0 + * + * @genericUse {K} - [key] + * @genericUse {V} - [$return] + * + * @param {string} key - The key of the element to return from the `Map` object. + * + * @return {*} The element associated with the specified key or `undefined` if the key can't be found in this Map object. + */ + get: function (key) + { + if (this.has(key)) + { + return this.entries[key]; + } + }, + + /** + * Returns an `Array` of all the values stored in this Map. + * + * @method Phaser.Structs.Map#getArray + * @since 3.0.0 + * + * @genericUse {V[]} - [$return] + * + * @return {Array.<*>} An array of the values stored in this Map. + */ + getArray: function () + { + var output = []; + var entries = this.entries; + + for (var key in entries) + { + output.push(entries[key]); + } + + return output; + }, + + /** + * Returns a boolean indicating whether an element with the specified key exists or not. + * + * @method Phaser.Structs.Map#has + * @since 3.0.0 + * + * @genericUse {K} - [key] + * + * @param {string} key - The key of the element to test for presence of in this Map. + * + * @return {boolean} Returns `true` if an element with the specified key exists in this Map, otherwise `false`. + */ + has: function (key) + { + return (this.entries.hasOwnProperty(key)); + }, + + /** + * Delete the specified element from this Map. + * + * @method Phaser.Structs.Map#delete + * @since 3.0.0 + * + * @genericUse {K} - [key] + * @genericUse {Phaser.Structs.Map.} - [$return] + * + * @param {string} key - The key of the element to delete from this Map. + * + * @return {Phaser.Structs.Map} This Map object. + */ + delete: function (key) + { + if (this.has(key)) + { + delete this.entries[key]; + this.size--; + } + + return this; + }, + + /** + * Delete all entries from this Map. + * + * @method Phaser.Structs.Map#clear + * @since 3.0.0 + * + * @genericUse {Phaser.Structs.Map.} - [$return] + * + * @return {Phaser.Structs.Map} This Map object. + */ + clear: function () + { + Object.keys(this.entries).forEach(function (prop) + { + delete this.entries[prop]; + + }, this); + + this.size = 0; + + return this; + }, + + /** + * Returns all entries keys in this Map. + * + * @method Phaser.Structs.Map#keys + * @since 3.0.0 + * + * @genericUse {K[]} - [$return] + * + * @return {string[]} Array containing entries' keys. + */ + keys: function () + { + return Object.keys(this.entries); + }, + + /** + * Returns an `Array` of all entries. + * + * @method Phaser.Structs.Map#values + * @since 3.0.0 + * + * @genericUse {V[]} - [$return] + * + * @return {Array.<*>} An `Array` of entries. + */ + values: function () + { + var output = []; + var entries = this.entries; + + for (var key in entries) + { + output.push(entries[key]); + } + + return output; + }, + + /** + * Dumps the contents of this Map to the console via `console.group`. + * + * @method Phaser.Structs.Map#dump + * @since 3.0.0 + */ + dump: function () + { + var entries = this.entries; + + // eslint-disable-next-line no-console + console.group('Map'); + + for (var key in entries) + { + console.log(key, entries[key]); + } + + // eslint-disable-next-line no-console + console.groupEnd(); + }, + + /** + * Passes all entries in this Map to the given callback. + * + * @method Phaser.Structs.Map#each + * @since 3.0.0 + * + * @genericUse {EachMapCallback.} - [callback] + * @genericUse {Phaser.Structs.Map.} - [$return] + * + * @param {EachMapCallback} callback - The callback which will receive the keys and entries held in this Map. + * + * @return {Phaser.Structs.Map} This Map object. + */ + each: function (callback) + { + var entries = this.entries; + + for (var key in entries) + { + if (callback(key, entries[key]) === false) + { + break; + } + } + + return this; + }, + + /** + * Returns `true` if the value exists within this Map. Otherwise, returns `false`. + * + * @method Phaser.Structs.Map#contains + * @since 3.0.0 + * + * @genericUse {V} - [value] + * + * @param {*} value - The value to search for. + * + * @return {boolean} `true` if the value is found, otherwise `false`. + */ + contains: function (value) + { + var entries = this.entries; + + for (var key in entries) + { + if (entries[key] === value) + { + return true; + } + } + + return false; + }, + + /** + * Merges all new keys from the given Map into this one. + * If it encounters a key that already exists it will be skipped unless override is set to `true`. + * + * @method Phaser.Structs.Map#merge + * @since 3.0.0 + * + * @genericUse {Phaser.Structs.Map.} - [map,$return] + * + * @param {Phaser.Structs.Map} map - The Map to merge in to this Map. + * @param {boolean} [override=false] - Set to `true` to replace values in this Map with those from the source map, or `false` to skip them. + * + * @return {Phaser.Structs.Map} This Map object. + */ + merge: function (map, override) + { + if (override === undefined) { override = false; } + + var local = this.entries; + var source = map.entries; + + for (var key in source) + { + if (local.hasOwnProperty(key) && override) + { + local[key] = source[key]; + } + else + { + this.set(key, source[key]); + } + } + + return this; + } + +}); + +module.exports = Map; + + +/***/ }), +/* 122 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Back = __webpack_require__(314); +var Bounce = __webpack_require__(315); +var Circular = __webpack_require__(316); +var Cubic = __webpack_require__(317); +var Elastic = __webpack_require__(318); +var Expo = __webpack_require__(319); +var Linear = __webpack_require__(320); +var Quadratic = __webpack_require__(321); +var Quartic = __webpack_require__(322); +var Quintic = __webpack_require__(323); +var Sine = __webpack_require__(324); +var Stepped = __webpack_require__(325); // EaseMap module.exports = { @@ -25360,7 +26285,7 @@ module.exports = { /***/ }), -/* 121 */ +/* 123 */ /***/ (function(module, exports) { /** @@ -25390,7 +26315,7 @@ module.exports = Linear; /***/ }), -/* 122 */ +/* 124 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -25559,10 +26484,10 @@ function init () module.exports = init(); -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(733))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(751))) /***/ }), -/* 123 */ +/* 125 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25571,7 +26496,7 @@ module.exports = init(); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var OS = __webpack_require__(122); +var OS = __webpack_require__(124); /** * Determines the browser type and version running this Phaser Game instance. @@ -25672,7 +26597,7 @@ module.exports = init(); /***/ }), -/* 124 */ +/* 126 */ /***/ (function(module, exports) { /** @@ -25701,7 +26626,7 @@ module.exports = FloatBetween; /***/ }), -/* 125 */ +/* 127 */ /***/ (function(module, exports) { /** @@ -25731,7 +26656,7 @@ module.exports = IsSizePowerOfTwo; /***/ }), -/* 126 */ +/* 128 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26276,7 +27201,7 @@ module.exports = Vector4; /***/ }), -/* 127 */ +/* 129 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26291,17 +27216,17 @@ module.exports = Vector4; module.exports = { - ADD: __webpack_require__(785), - ERROR: __webpack_require__(786), - LOAD: __webpack_require__(787), - READY: __webpack_require__(788), - REMOVE: __webpack_require__(789) + ADD: __webpack_require__(803), + ERROR: __webpack_require__(804), + LOAD: __webpack_require__(805), + READY: __webpack_require__(806), + REMOVE: __webpack_require__(807) }; /***/ }), -/* 128 */ +/* 130 */ /***/ (function(module, exports) { /** @@ -26359,98 +27284,7 @@ module.exports = AddToDOM; /***/ }), -/* 129 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SpliceOne = __webpack_require__(81); - -/** - * Removes the given item, or array of items, from the array. - * - * The array is modified in-place. - * - * You can optionally specify a callback to be invoked for each item successfully removed from the array. - * - * @function Phaser.Utils.Array.Remove - * @since 3.4.0 - * - * @param {array} array - The array to be modified. - * @param {*|Array.<*>} item - The item, or array of items, to be removed from the array. - * @param {function} [callback] - A callback to be invoked for each item successfully removed from the array. - * @param {object} [context] - The context in which the callback is invoked. - * - * @return {*|Array.<*>} The item, or array of items, that were successfully removed from the array. - */ -var Remove = function (array, item, callback, context) -{ - if (context === undefined) { context = array; } - - var index; - - // Fast path to avoid array mutation and iteration - if (!Array.isArray(item)) - { - index = array.indexOf(item); - - if (index !== -1) - { - SpliceOne(array, index); - - if (callback) - { - callback.call(context, item); - } - - return item; - } - else - { - return null; - } - } - - // If we got this far, we have an array of items to remove - - var itemLength = item.length - 1; - - while (itemLength >= 0) - { - var entry = item[itemLength]; - - index = array.indexOf(entry); - - if (index !== -1) - { - SpliceOne(array, index); - - if (callback) - { - callback.call(context, entry); - } - } - else - { - // Item wasn't found in the array, so remove it from our return results - item.pop(); - } - - itemLength--; - } - - return item; -}; - -module.exports = Remove; - - -/***/ }), -/* 130 */ +/* 131 */ /***/ (function(module, exports) { /** @@ -27356,7 +28190,7 @@ module.exports = KeyCodes; /***/ }), -/* 131 */ +/* 132 */ /***/ (function(module, exports) { /** @@ -27479,7 +28313,7 @@ module.exports = CONST; /***/ }), -/* 132 */ +/* 133 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -27488,7 +28322,7 @@ module.exports = CONST; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clone = __webpack_require__(67); +var Clone = __webpack_require__(69); /** * Creates a new Object using all values from obj1 and obj2. @@ -27524,7 +28358,7 @@ module.exports = Merge; /***/ }), -/* 133 */ +/* 134 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -27535,13 +28369,13 @@ module.exports = Merge; */ var Class = __webpack_require__(0); -var Clone = __webpack_require__(67); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(59); -var GameEvents = __webpack_require__(20); +var Clone = __webpack_require__(69); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(61); +var GameEvents = __webpack_require__(21); var NOOP = __webpack_require__(1); -var GetAll = __webpack_require__(382); -var GetFirst = __webpack_require__(383); +var GetAll = __webpack_require__(191); +var GetFirst = __webpack_require__(394); /** * @classdesc @@ -28238,7 +29072,7 @@ module.exports = BaseSoundManager; /***/ }), -/* 134 */ +/* 135 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28249,8 +29083,8 @@ module.exports = BaseSoundManager; */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(59); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(61); var Extend = __webpack_require__(19); var NOOP = __webpack_require__(1); @@ -28738,7 +29572,7 @@ module.exports = BaseSound; /***/ }), -/* 135 */ +/* 136 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28747,10 +29581,10 @@ module.exports = BaseSound; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayUtils = __webpack_require__(189); +var ArrayUtils = __webpack_require__(192); var Class = __webpack_require__(0); var NOOP = __webpack_require__(1); -var StableSort = __webpack_require__(137); +var StableSort = __webpack_require__(138); /** * @callback EachListCallback @@ -28801,7 +29635,7 @@ var List = new Class({ /** * The index of the current element. - * + * * This is used internally when iterating through the list with the {@link #first}, {@link #last}, {@link #get}, and {@link #previous} properties. * * @name Phaser.Structs.List#position @@ -28954,7 +29788,7 @@ var List = new Class({ }; } - StableSort.inplace(this.list, handler); + StableSort(this.list, handler); return this; }, @@ -29024,7 +29858,7 @@ var List = new Class({ * For example: `getAll('parent')` would return only children that have a property called `parent`. * * You can also specify a value to compare the property to: - * + * * `getAll('visible', true)` would return only children that have their visible property set to `true`. * * Optionally you can specify a start and end index. For example if this List had 100 children, @@ -29184,7 +30018,7 @@ var List = new Class({ * @since 3.0.0 * * @genericUse {Phaser.Structs.List.} - [$return] - * + * * @param {boolean} [skipCallback=false] - Skip calling the List.removeCallback. * * @return {Phaser.Structs.List} This List object. @@ -29492,7 +30326,7 @@ var List = new Class({ /** * The next item in the List, or `null` if the entire List has been traversed. - * + * * This property can be read successively after reading {@link #first} or manually setting the {@link #position} to iterate the List. * * @name Phaser.Structs.List#next @@ -29521,7 +30355,7 @@ var List = new Class({ /** * The previous item in the List, or `null` if the entire List has been traversed. - * + * * This property can be read successively after reading {@link #last} or manually setting the {@link #position} to iterate the List backwards. * * @name Phaser.Structs.List#previous @@ -29554,7 +30388,7 @@ module.exports = List; /***/ }), -/* 136 */ +/* 137 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29563,8 +30397,8 @@ module.exports = List; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CheckMatrix = __webpack_require__(190); -var TransposeMatrix = __webpack_require__(390); +var CheckMatrix = __webpack_require__(193); +var TransposeMatrix = __webpack_require__(401); /** * Rotates the array matrix based on the given rotation value. @@ -29626,152 +30460,183 @@ module.exports = RotateMatrix; /***/ }), -/* 137 */ -/***/ (function(module, exports, __webpack_require__) { +/* 138 */ +/***/ (function(module, exports) { /** * @author Richard Davey + * @author Angry Bytes (and contributors) * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -//! stable.js 0.1.6, https://github.com/Two-Screen/stable -//! © 2017 Angry Bytes and contributors. MIT licensed. +/** + * The comparator function. + * + * @ignore + * + * @param {*} a - The first item to test. + * @param {*} b - The second itemt to test. + * + * @return {boolean} True if they localCompare, otherwise false. + */ +function Compare (a, b) +{ + return String(a).localeCompare(b); +} /** - * @namespace Phaser.Utils.Array.StableSortFunctions + * Process the array contents. + * + * @ignore + * + * @param {array} array - The array to process. + * @param {function} compare - The comparison function. + * + * @return {array} - The processed array. */ - -(function() { - - /** - * A stable array sort, because `Array#sort()` is not guaranteed stable. - * This is an implementation of merge sort, without recursion. - * - * @function Phaser.Utils.Array.StableSort - * @since 3.0.0 - * - * @param {array} arr - The input array to be sorted. - * @param {function} comp - The comparison handler. - * - * @return {array} The sorted result. - */ -var stable = function(arr, comp) { - return exec(arr.slice(), comp); -}; - - /** - * Sort the input array and simply copy it back if the result isn't in the original array, which happens on an odd number of passes. - * - * @function Phaser.Utils.Array.StableSortFunctions.inplace - * @memberof Phaser.Utils.Array.StableSortFunctions - * @since 3.0.0 - * - * @param {array} arr - The input array. - * @param {function} comp - The comparison handler. - * - * @return {array} The sorted array. - */ -stable.inplace = function(arr, comp) { - var result = exec(arr, comp); - - // This simply copies back if the result isn't in the original array, - // which happens on an odd number of passes. - if (result !== arr) { - pass(result, null, arr.length, arr); - } - - return arr; -}; - -// Execute the sort using the input array and a second buffer as work space. -// Returns one of those two, containing the final result. -function exec(arr, comp) { - if (typeof(comp) !== 'function') { - comp = function(a, b) { - return String(a).localeCompare(b); - }; - } - +function Process (array, compare) +{ // Short-circuit when there's nothing to sort. - var len = arr.length; - if (len <= 1) { - return arr; + var len = array.length; + + if (len <= 1) + { + return array; } // Rather than dividing input, simply iterate chunks of 1, 2, 4, 8, etc. // Chunks are the size of the left or right hand in merge sort. // Stop when the left-hand covers all of the array. var buffer = new Array(len); - for (var chk = 1; chk < len; chk *= 2) { - pass(arr, comp, chk, buffer); - var tmp = arr; - arr = buffer; + for (var chk = 1; chk < len; chk *= 2) + { + RunPass(array, compare, chk, buffer); + + var tmp = array; + + array = buffer; + buffer = tmp; } - return arr; + return array; } -// Run a single pass with the given chunk size. -var pass = function(arr, comp, chk, result) { +/** + * Run a single pass with the given chunk size. + * + * @ignore + * + * @param {array} arr - The array to run the pass on. + * @param {function} comp - The comparison function. + * @param {number} chk - The number of iterations. + * @param {array} result - The array to store the result in. + */ +function RunPass (arr, comp, chk, result) +{ var len = arr.length; var i = 0; + // Step size / double chunk size. var dbl = chk * 2; + // Bounds of the left and right chunks. var l, r, e; + // Iterators over the left and right chunk. var li, ri; // Iterate over pairs of chunks. - for (l = 0; l < len; l += dbl) { + for (l = 0; l < len; l += dbl) + { r = l + chk; e = r + chk; - if (r > len) r = len; - if (e > len) e = len; + + if (r > len) + { + r = len; + } + + if (e > len) + { + e = len; + } // Iterate both chunks in parallel. li = l; ri = r; - while (true) { + + while (true) + { // Compare the chunks. - if (li < r && ri < e) { + if (li < r && ri < e) + { // This works for a regular `sort()` compatible comparator, // but also for a simple comparator like: `a > b` - if (comp(arr[li], arr[ri]) <= 0) { + if (comp(arr[li], arr[ri]) <= 0) + { result[i++] = arr[li++]; } - else { + else + { result[i++] = arr[ri++]; } } - // Nothing to compare, just flush what's left. - else if (li < r) { + else if (li < r) + { + // Nothing to compare, just flush what's left. result[i++] = arr[li++]; } - else if (ri < e) { + else if (ri < e) + { result[i++] = arr[ri++]; } - // Both iterators are at the chunk ends. - else { + else + { + // Both iterators are at the chunk ends. break; } } } +} + +/** + * An in-place stable array sort, because `Array#sort()` is not guaranteed stable. + * + * This is an implementation of merge sort, without recursion. + * + * Function based on the Two-Screen/stable sort 0.1.8 from https://github.com/Two-Screen/stable + * + * @function Phaser.Utils.Array.StableSort + * @since 3.0.0 + * + * @param {array} array - The input array to be sorted. + * @param {function} [compare] - The comparison function. + * + * @return {array} The sorted result. + */ +var StableSort = function (array, compare) +{ + if (compare === undefined) { compare = Compare; } + + var result = Process(array, compare); + + // This simply copies back if the result isn't in the original array, which happens on an odd number of passes. + if (result !== array) + { + RunPass(result, null, array.length, array); + } + + return array; }; -// Export using CommonJS or to the window. -if (true) { - module.exports = stable; -} -else {} +module.exports = StableSort; -})(); /***/ }), -/* 138 */ +/* 139 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29782,14 +30647,14 @@ else {} var Class = __webpack_require__(0); var Clamp = __webpack_require__(17); -var Components = __webpack_require__(12); +var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); var GetColorFromValue = __webpack_require__(117); -var GetBitmapTextSize = __webpack_require__(953); -var ParseFromAtlas = __webpack_require__(954); -var ParseXMLBitmapFont = __webpack_require__(193); +var GetBitmapTextSize = __webpack_require__(965); +var ParseFromAtlas = __webpack_require__(966); +var ParseXMLBitmapFont = __webpack_require__(196); var Rectangle = __webpack_require__(9); -var Render = __webpack_require__(955); +var Render = __webpack_require__(967); /** * @classdesc @@ -30899,7 +31764,7 @@ module.exports = BitmapText; /***/ }), -/* 139 */ +/* 140 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31348,7 +32213,7 @@ module.exports = Set; /***/ }), -/* 140 */ +/* 141 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31358,9 +32223,9 @@ module.exports = Set; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); +var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); -var MeshRender = __webpack_require__(1086); +var MeshRender = __webpack_require__(1093); var NOOP = __webpack_require__(1); /** @@ -31519,7 +32384,7 @@ module.exports = Mesh; /***/ }), -/* 141 */ +/* 142 */ /***/ (function(module, exports) { /** @@ -31557,7 +32422,7 @@ module.exports = RectangleToRectangle; /***/ }), -/* 142 */ +/* 143 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31602,7 +32467,7 @@ InputPluginCache.register = function (key, plugin, mapping, settingsKey, configK /** * Returns the input plugin object from the cache based on the given key. * - * @function Phaser.Input.InputPluginCache.getCore + * @function Phaser.Input.InputPluginCache.getPlugin * @static * @since 3.10.0 * @@ -31665,7 +32530,7 @@ module.exports = InputPluginCache; /***/ }), -/* 143 */ +/* 144 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31680,19 +32545,19 @@ module.exports = InputPluginCache; module.exports = { - ANY_KEY_DOWN: __webpack_require__(1229), - ANY_KEY_UP: __webpack_require__(1230), - COMBO_MATCH: __webpack_require__(1231), - DOWN: __webpack_require__(1232), - KEY_DOWN: __webpack_require__(1233), - KEY_UP: __webpack_require__(1234), - UP: __webpack_require__(1235) + ANY_KEY_DOWN: __webpack_require__(1235), + ANY_KEY_UP: __webpack_require__(1236), + COMBO_MATCH: __webpack_require__(1237), + DOWN: __webpack_require__(1238), + KEY_DOWN: __webpack_require__(1239), + KEY_UP: __webpack_require__(1240), + UP: __webpack_require__(1241) }; /***/ }), -/* 144 */ +/* 145 */ /***/ (function(module, exports) { /** @@ -31733,7 +32598,7 @@ module.exports = GetURL; /***/ }), -/* 145 */ +/* 146 */ /***/ (function(module, exports) { /** @@ -31803,7 +32668,7 @@ module.exports = XHRSettings; /***/ }), -/* 146 */ +/* 147 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31813,8 +32678,8 @@ module.exports = XHRSettings; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(223); -var Sprite = __webpack_require__(75); +var Components = __webpack_require__(226); +var Sprite = __webpack_require__(76); /** * @classdesc @@ -31904,7 +32769,7 @@ module.exports = ArcadeSprite; /***/ }), -/* 147 */ +/* 148 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31919,54 +32784,56 @@ module.exports = ArcadeSprite; module.exports = { - CalculateFacesAt: __webpack_require__(226), - CalculateFacesWithin: __webpack_require__(52), - Copy: __webpack_require__(1325), - CreateFromTiles: __webpack_require__(1326), - CullTiles: __webpack_require__(1327), - Fill: __webpack_require__(1328), - FilterTiles: __webpack_require__(1329), - FindByIndex: __webpack_require__(1330), - FindTile: __webpack_require__(1331), - ForEachTile: __webpack_require__(1332), - GetTileAt: __webpack_require__(148), - GetTileAtWorldXY: __webpack_require__(1333), + CalculateFacesAt: __webpack_require__(233), + CalculateFacesWithin: __webpack_require__(53), + Copy: __webpack_require__(1322), + CreateFromTiles: __webpack_require__(1323), + CullTiles: __webpack_require__(1324), + Fill: __webpack_require__(1325), + FilterTiles: __webpack_require__(1326), + FindByIndex: __webpack_require__(1327), + FindTile: __webpack_require__(1328), + ForEachTile: __webpack_require__(1329), + GetTileAt: __webpack_require__(149), + GetTileAtWorldXY: __webpack_require__(1330), GetTilesWithin: __webpack_require__(24), - GetTilesWithinShape: __webpack_require__(1334), - GetTilesWithinWorldXY: __webpack_require__(1335), - HasTileAt: __webpack_require__(479), - HasTileAtWorldXY: __webpack_require__(1336), - IsInLayerBounds: __webpack_require__(102), - PutTileAt: __webpack_require__(227), - PutTileAtWorldXY: __webpack_require__(1337), - PutTilesAt: __webpack_require__(1338), - Randomize: __webpack_require__(1339), - RemoveTileAt: __webpack_require__(480), - RemoveTileAtWorldXY: __webpack_require__(1340), - RenderDebug: __webpack_require__(1341), - ReplaceByIndex: __webpack_require__(478), - SetCollision: __webpack_require__(1342), - SetCollisionBetween: __webpack_require__(1343), - SetCollisionByExclusion: __webpack_require__(1344), - SetCollisionByProperty: __webpack_require__(1345), - SetCollisionFromCollisionGroup: __webpack_require__(1346), - SetTileIndexCallback: __webpack_require__(1347), - SetTileLocationCallback: __webpack_require__(1348), - Shuffle: __webpack_require__(1349), - SwapByIndex: __webpack_require__(1350), - TileToWorldX: __webpack_require__(149), - TileToWorldXY: __webpack_require__(1351), - TileToWorldY: __webpack_require__(150), - WeightedRandomize: __webpack_require__(1352), - WorldToTileX: __webpack_require__(63), - WorldToTileXY: __webpack_require__(1353), - WorldToTileY: __webpack_require__(64) + GetTilesWithinShape: __webpack_require__(1331), + GetTilesWithinWorldXY: __webpack_require__(1332), + HasTileAt: __webpack_require__(503), + HasTileAtWorldXY: __webpack_require__(1333), + IsInLayerBounds: __webpack_require__(103), + PutTileAt: __webpack_require__(234), + PutTileAtWorldXY: __webpack_require__(1334), + PutTilesAt: __webpack_require__(1335), + Randomize: __webpack_require__(1336), + RemoveTileAt: __webpack_require__(504), + RemoveTileAtWorldXY: __webpack_require__(1337), + RenderDebug: __webpack_require__(1338), + ReplaceByIndex: __webpack_require__(502), + SetCollision: __webpack_require__(1339), + SetCollisionBetween: __webpack_require__(1340), + SetCollisionByExclusion: __webpack_require__(1341), + SetCollisionByProperty: __webpack_require__(1342), + SetCollisionFromCollisionGroup: __webpack_require__(1343), + SetLayerCollisionIndex: __webpack_require__(152), + SetTileCollision: __webpack_require__(65), + SetTileIndexCallback: __webpack_require__(1344), + SetTileLocationCallback: __webpack_require__(1345), + Shuffle: __webpack_require__(1346), + SwapByIndex: __webpack_require__(1347), + TileToWorldX: __webpack_require__(150), + TileToWorldXY: __webpack_require__(1348), + TileToWorldY: __webpack_require__(151), + WeightedRandomize: __webpack_require__(1349), + WorldToTileX: __webpack_require__(66), + WorldToTileXY: __webpack_require__(1350), + WorldToTileY: __webpack_require__(67) }; /***/ }), -/* 148 */ +/* 149 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31975,20 +32842,19 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var IsInLayerBounds = __webpack_require__(102); +var IsInLayerBounds = __webpack_require__(103); /** * Gets a tile at the given tile coordinates from the given layer. * * @function Phaser.Tilemaps.Components.GetTileAt - * @private * @since 3.0.0 * * @param {integer} tileX - X position to get the tile from (given in tile units, not pixels). * @param {integer} tileY - Y position to get the tile from (given in tile units, not pixels). * @param {boolean} [nonNull=false] - If true getTile won't return null for empty tiles, but a Tile object with an index of -1. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {Phaser.Tilemaps.Tile} The tile at the given coordinates or null if no tile was found or the coordinates * were invalid. */ @@ -32022,7 +32888,7 @@ module.exports = GetTileAt; /***/ }), -/* 149 */ +/* 150 */ /***/ (function(module, exports) { /** @@ -32036,13 +32902,12 @@ module.exports = GetTileAt; * layer's position, scale and scroll. * * @function Phaser.Tilemaps.Components.TileToWorldX - * @private * @since 3.0.0 * * @param {integer} tileX - The x coordinate, in tiles, not pixels. * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {number} */ var TileToWorldX = function (tileX, camera, layer) @@ -32067,7 +32932,7 @@ module.exports = TileToWorldX; /***/ }), -/* 150 */ +/* 151 */ /***/ (function(module, exports) { /** @@ -32081,13 +32946,12 @@ module.exports = TileToWorldX; * layer's position, scale and scroll. * * @function Phaser.Tilemaps.Components.TileToWorldY - * @private * @since 3.0.0 * * @param {integer} tileY - The x coordinate, in tiles, not pixels. * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {number} */ var TileToWorldY = function (tileY, camera, layer) @@ -32112,7 +32976,106 @@ module.exports = TileToWorldY; /***/ }), -/* 151 */ +/* 152 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Internally used method to keep track of the tile indexes that collide within a layer. This + * updates LayerData.collideIndexes to either contain or not contain the given `tileIndex`. + * + * @function Phaser.Tilemaps.Components.SetLayerCollisionIndex + * @since 3.0.0 + * + * @param {integer} tileIndex - The tile index to set the collision boolean for. + * @param {boolean} [collides=true] - Should the tile index collide or not? + * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. + */ +var SetLayerCollisionIndex = function (tileIndex, collides, layer) +{ + var loc = layer.collideIndexes.indexOf(tileIndex); + + if (collides && loc === -1) + { + layer.collideIndexes.push(tileIndex); + } + else if (!collides && loc !== -1) + { + layer.collideIndexes.splice(loc, 1); + } +}; + +module.exports = SetLayerCollisionIndex; + + +/***/ }), +/* 153 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Seth Berrier + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetFastValue = __webpack_require__(2); + +/** + * Parse a Tiled group layer and create a state object for inheriting. + * + * @function Phaser.Tilemaps.Parsers.Tiled.CreateGroupLayer + * @since 3.21.0 + * + * @param {object} json - The Tiled JSON object. + * @param {object} [currentl] - The current group layer from the Tiled JSON file. + * @param {object} [parentstate] - The state of the parent group (if any). + * + * @return {object} A group state object with proper values for updating children layers. + */ +var CreateGroupLayer = function (json, groupl, parentstate) +{ + if (!groupl) + { + // Return a default group state object + return { + i: 0, // Current layer array iterator + layers: json.layers, // Current array of layers + + // Values inherited from parent group + name: '', + opacity: 1, + visible: true, + x: 0, + y: 0 + }; + } + + // Compute group layer x, y + var layerX = groupl.x + GetFastValue(groupl, 'startx', 0) * json.tilewidth + GetFastValue(groupl, 'offsetx', 0); + var layerY = groupl.y + GetFastValue(groupl, 'starty', 0) * json.tileheight + GetFastValue(groupl, 'offsety', 0); + + // Compute next state inherited from group + return { + i: 0, + layers: groupl.layers, + name: parentstate.name + groupl.name + '/', + opacity: parentstate.opacity * groupl.opacity, + visible: parentstate.visible && groupl.visible, + x: parentstate.x + layerX, + y: parentstate.y + layerY + }; +}; + +module.exports = CreateGroupLayer; + + +/***/ }), +/* 154 */ /***/ (function(module, exports) { /** @@ -32176,7 +33139,7 @@ module.exports = GetNewValue; /***/ }), -/* 152 */ +/* 155 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32185,17 +33148,17 @@ module.exports = GetNewValue; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Defaults = __webpack_require__(236); +var Defaults = __webpack_require__(241); var GetAdvancedValue = __webpack_require__(15); -var GetBoolean = __webpack_require__(89); -var GetEaseFunction = __webpack_require__(69); -var GetNewValue = __webpack_require__(151); -var GetProps = __webpack_require__(501); -var GetTargets = __webpack_require__(234); +var GetBoolean = __webpack_require__(90); +var GetEaseFunction = __webpack_require__(71); +var GetNewValue = __webpack_require__(154); +var GetProps = __webpack_require__(525); +var GetTargets = __webpack_require__(239); var GetValue = __webpack_require__(6); -var GetValueOp = __webpack_require__(235); -var Tween = __webpack_require__(237); -var TweenData = __webpack_require__(239); +var GetValueOp = __webpack_require__(240); +var Tween = __webpack_require__(242); +var TweenData = __webpack_require__(244); /** * Creates a new Tween. @@ -32254,7 +33217,7 @@ var TweenBuilder = function (parent, config, defaults) ops.getEnd, ops.getStart, ops.getActive, - GetEaseFunction(GetValue(value, 'ease', ease), easeParams), + GetEaseFunction(GetValue(value, 'ease', ease), GetValue(value, 'easeParams', easeParams)), GetNewValue(value, 'delay', delay), GetNewValue(value, 'duration', duration), GetBoolean(value, 'yoyo', yoyo), @@ -32309,8 +33272,8 @@ module.exports = TweenBuilder; /***/ }), -/* 153 */, -/* 154 */ +/* 156 */, +/* 157 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32349,7 +33312,7 @@ module.exports = CircumferencePoint; /***/ }), -/* 155 */ +/* 158 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32393,7 +33356,640 @@ module.exports = Random; /***/ }), -/* 156 */ +/* 159 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Perimeter = __webpack_require__(116); +var Point = __webpack_require__(4); + +/** + * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter. + * + * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is. + * + * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side. + * + * @function Phaser.Geom.Rectangle.GetPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [out,$return] + * + * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle to get the perimeter point from. + * @param {number} position - The normalized distance into the Rectangle's perimeter to return. + * @param {(Phaser.Geom.Point|object)} [out] - An object to update with the `x` and `y` coordinates of the point. + * + * @return {Phaser.Geom.Point} The updated `output` object, or a new Point if no `output` object was given. + */ +var GetPoint = function (rectangle, position, out) +{ + if (out === undefined) { out = new Point(); } + + if (position <= 0 || position >= 1) + { + out.x = rectangle.x; + out.y = rectangle.y; + + return out; + } + + var p = Perimeter(rectangle) * position; + + if (position > 0.5) + { + p -= (rectangle.width + rectangle.height); + + if (p <= rectangle.width) + { + // Face 3 + out.x = rectangle.right - p; + out.y = rectangle.bottom; + } + else + { + // Face 4 + out.x = rectangle.x; + out.y = rectangle.bottom - (p - rectangle.width); + } + } + else if (p <= rectangle.width) + { + // Face 1 + out.x = rectangle.x + p; + out.y = rectangle.y; + } + else + { + // Face 2 + out.x = rectangle.right; + out.y = rectangle.y + (p - rectangle.width); + } + + return out; +}; + +module.exports = GetPoint; + + +/***/ }), +/* 160 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Length = __webpack_require__(58); +var Point = __webpack_require__(4); + +/** + * Get a number of points along a line's length. + * + * Provide a `quantity` to get an exact number of points along the line. + * + * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when + * providing a `stepRate`. + * + * @function Phaser.Geom.Line.GetPoints + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point[]} O - [out,$return] + * + * @param {Phaser.Geom.Line} line - The line. + * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead. + * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`. + * @param {(array|Phaser.Geom.Point[])} [out] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line. + * + * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line. + */ +var GetPoints = function (line, quantity, stepRate, out) +{ + if (out === undefined) { out = []; } + + // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. + if (!quantity && stepRate > 0) + { + quantity = Length(line) / stepRate; + } + + var x1 = line.x1; + var y1 = line.y1; + + var x2 = line.x2; + var y2 = line.y2; + + for (var i = 0; i < quantity; i++) + { + var position = i / quantity; + + var x = x1 + (x2 - x1) * position; + var y = y1 + (y2 - y1) * position; + + out.push(new Point(x, y)); + } + + return out; +}; + +module.exports = GetPoints; + + +/***/ }), +/* 161 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Point = __webpack_require__(4); + +/** + * Returns a random point on a given Line. + * + * @function Phaser.Geom.Line.Random + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [out,$return] + * + * @param {Phaser.Geom.Line} line - The Line to calculate the random Point on. + * @param {(Phaser.Geom.Point|object)} [out] - An instance of a Point to be modified. + * + * @return {(Phaser.Geom.Point|object)} A random Point on the Line. + */ +var Random = function (line, out) +{ + if (out === undefined) { out = new Point(); } + + var t = Math.random(); + + out.x = line.x1 + t * (line.x2 - line.x1); + out.y = line.y1 + t * (line.y2 - line.y1); + + return out; +}; + +module.exports = Random; + + +/***/ }), +/* 162 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Point = __webpack_require__(4); + +/** + * Returns a random point within a Rectangle. + * + * @function Phaser.Geom.Rectangle.Random + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [out,$return] + * + * @param {Phaser.Geom.Rectangle} rect - The Rectangle to return a point from. + * @param {Phaser.Geom.Point} out - The object to update with the point's coordinates. + * + * @return {Phaser.Geom.Point} The modified `out` object, or a new Point if none was provided. + */ +var Random = function (rect, out) +{ + if (out === undefined) { out = new Point(); } + + out.x = rect.x + (Math.random() * rect.width); + out.y = rect.y + (Math.random() * rect.height); + + return out; +}; + +module.exports = Random; + + +/***/ }), +/* 163 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for setting the WebGL rendering pipeline of a Game Object. + * + * @namespace Phaser.GameObjects.Components.Pipeline + * @webglOnly + * @since 3.0.0 + */ + +var Pipeline = { + + /** + * The initial WebGL pipeline of this Game Object. + * + * @name Phaser.GameObjects.Components.Pipeline#defaultPipeline + * @type {Phaser.Renderer.WebGL.WebGLPipeline} + * @default null + * @webglOnly + * @since 3.0.0 + */ + defaultPipeline: null, + + /** + * The current WebGL pipeline of this Game Object. + * + * @name Phaser.GameObjects.Components.Pipeline#pipeline + * @type {Phaser.Renderer.WebGL.WebGLPipeline} + * @default null + * @webglOnly + * @since 3.0.0 + */ + pipeline: null, + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * + * This should only be called during the instantiation of the Game Object. + * + * @method Phaser.GameObjects.Components.Pipeline#initPipeline + * @webglOnly + * @since 3.0.0 + * + * @param {string} [pipelineName=MultiPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Multi Pipeline. + * + * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. + */ + initPipeline: function (pipelineName) + { + if (pipelineName === undefined) { pipelineName = 'MultiPipeline'; } + + var renderer = this.scene.sys.game.renderer; + + if (renderer && renderer.gl && renderer.hasPipeline(pipelineName)) + { + this.defaultPipeline = renderer.getPipeline(pipelineName); + this.pipeline = this.defaultPipeline; + + return true; + } + + return false; + }, + + /** + * Sets the active WebGL Pipeline of this Game Object. + * + * @method Phaser.GameObjects.Components.Pipeline#setPipeline + * @webglOnly + * @since 3.0.0 + * + * @param {string} pipelineName - The name of the pipeline to set on this Game Object. + * + * @return {this} This Game Object instance. + */ + setPipeline: function (pipelineName) + { + var renderer = this.scene.sys.game.renderer; + + if (renderer && renderer.gl && renderer.hasPipeline(pipelineName)) + { + this.pipeline = renderer.getPipeline(pipelineName); + } + + return this; + }, + + /** + * Resets the WebGL Pipeline of this Game Object back to the default it was created with. + * + * @method Phaser.GameObjects.Components.Pipeline#resetPipeline + * @webglOnly + * @since 3.0.0 + * + * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. + */ + resetPipeline: function () + { + this.pipeline = this.defaultPipeline; + + return (this.pipeline !== null); + }, + + /** + * Gets the name of the WebGL Pipeline this Game Object is currently using. + * + * @method Phaser.GameObjects.Components.Pipeline#getPipelineName + * @webglOnly + * @since 3.0.0 + * + * @return {string} The string-based name of the pipeline being used by this Game Object. + */ + getPipelineName: function () + { + return this.pipeline.name; + } + +}; + +module.exports = Pipeline; + + +/***/ }), +/* 164 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Vector2 = __webpack_require__(3); + +/** + * Takes the `x` and `y` coordinates and transforms them into the same space as + * defined by the position, rotation and scale values. + * + * @function Phaser.Math.TransformXY + * @since 3.0.0 + * + * @param {number} x - The x coordinate to be transformed. + * @param {number} y - The y coordinate to be transformed. + * @param {number} positionX - Horizontal position of the transform point. + * @param {number} positionY - Vertical position of the transform point. + * @param {number} rotation - Rotation of the transform point, in radians. + * @param {number} scaleX - Horizontal scale of the transform point. + * @param {number} scaleY - Vertical scale of the transform point. + * @param {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} [output] - The output vector, point or object for the translated coordinates. + * + * @return {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} The translated point. + */ +var TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output) +{ + if (output === undefined) { output = new Vector2(); } + + var radianSin = Math.sin(rotation); + var radianCos = Math.cos(rotation); + + // Rotate and Scale + var a = radianCos * scaleX; + var b = radianSin * scaleX; + var c = -radianSin * scaleY; + var d = radianCos * scaleY; + + // Invert + var id = 1 / ((a * d) + (c * -b)); + + output.x = (d * id * x) + (-c * id * y) + (((positionY * c) - (positionX * d)) * id); + output.y = (a * id * y) + (-b * id * x) + (((-positionY * a) + (positionX * b)) * id); + + return output; +}; + +module.exports = TransformXY; + + +/***/ }), +/* 165 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Point = __webpack_require__(4); + +/** + * Returns a uniformly distributed random point from anywhere within the given Ellipse. + * + * @function Phaser.Geom.Ellipse.Random + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [out,$return] + * + * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to get a random point from. + * @param {(Phaser.Geom.Point|object)} [out] - A Point or point-like object to set the random `x` and `y` values in. + * + * @return {(Phaser.Geom.Point|object)} A Point object with the random values set in the `x` and `y` properties. + */ +var Random = function (ellipse, out) +{ + if (out === undefined) { out = new Point(); } + + var p = Math.random() * Math.PI * 2; + var s = Math.sqrt(Math.random()); + + out.x = ellipse.x + ((s * Math.cos(p)) * ellipse.width / 2); + out.y = ellipse.y + ((s * Math.sin(p)) * ellipse.height / 2); + + return out; +}; + +module.exports = Random; + + +/***/ }), +/* 166 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Point = __webpack_require__(4); + +/** + * Returns a random Point from within the area of the given Triangle. + * + * @function Phaser.Geom.Triangle.Random + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [out,$return] + * + * @param {Phaser.Geom.Triangle} triangle - The Triangle to get a random point from. + * @param {Phaser.Geom.Point} [out] - The Point object to store the position in. If not given, a new Point instance is created. + * + * @return {Phaser.Geom.Point} A Point object holding the coordinates of a random position within the Triangle. + */ +var Random = function (triangle, out) +{ + if (out === undefined) { out = new Point(); } + + // Basis vectors + var ux = triangle.x2 - triangle.x1; + var uy = triangle.y2 - triangle.y1; + + var vx = triangle.x3 - triangle.x1; + var vy = triangle.y3 - triangle.y1; + + // Random point within the unit square + var r = Math.random(); + var s = Math.random(); + + // Point outside the triangle? Remap it. + if (r + s >= 1) + { + r = 1 - r; + s = 1 - s; + } + + out.x = triangle.x1 + ((ux * r) + (vx * s)); + out.y = triangle.y1 + ((uy * r) + (vy * s)); + + return out; +}; + +module.exports = Random; + + +/***/ }), +/* 167 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Rotate a `point` around `x` and `y` by the given `angle` and `distance`. + * + * In polar notation, this maps a point from (r, t) to (distance, t + angle), vs. the origin (x, y). + * + * @function Phaser.Math.RotateAroundDistance + * @since 3.0.0 + * + * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return] + * + * @param {(Phaser.Geom.Point|object)} point - The point to be rotated. + * @param {number} x - The horizontal coordinate to rotate around. + * @param {number} y - The vertical coordinate to rotate around. + * @param {number} angle - The angle of rotation in radians. + * @param {number} distance - The distance from (x, y) to place the point at. + * + * @return {Phaser.Types.Math.Vector2Like} The given point. + */ +var RotateAroundDistance = function (point, x, y, angle, distance) +{ + var t = angle + Math.atan2(point.y - y, point.x - x); + + point.x = x + (distance * Math.cos(t)); + point.y = y + (distance * Math.sin(t)); + + return point; +}; + +module.exports = RotateAroundDistance; + + +/***/ }), +/* 168 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate a smoother interpolation percentage of `x` between `min` and `max`. + * + * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge, + * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial, + * between 0 and 1 otherwise. + * + * Produces an even smoother interpolation than {@link Phaser.Math.SmoothStep}. + * + * @function Phaser.Math.SmootherStep + * @since 3.0.0 + * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations} + * + * @param {number} x - The input value. + * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'. + * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'. + * + * @return {number} The percentage of interpolation, between 0 and 1. + */ +var SmootherStep = function (x, min, max) +{ + x = Math.max(0, Math.min(1, (x - min) / (max - min))); + + return x * x * x * (x * (x * 6 - 15) + 10); +}; + +module.exports = SmootherStep; + + +/***/ }), +/* 169 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate a smooth interpolation percentage of `x` between `min` and `max`. + * + * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge, + * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial, + * between 0 and 1 otherwise. + * + * @function Phaser.Math.SmoothStep + * @since 3.0.0 + * @see {@link https://en.wikipedia.org/wiki/Smoothstep} + * + * @param {number} x - The input value. + * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'. + * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'. + * + * @return {number} The percentage of interpolation, between 0 and 1. + */ +var SmoothStep = function (x, min, max) +{ + if (x <= min) + { + return 0; + } + + if (x >= max) + { + return 1; + } + + x = (x - min) / (max - min); + + return x * x * (3 - 2 * x); +}; + +module.exports = SmoothStep; + + +/***/ }), +/* 170 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32404,25 +34000,29 @@ module.exports = Random; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(115); -var FindClosestInSorted = __webpack_require__(274); -var Frame = __webpack_require__(275); +var Events = __webpack_require__(120); +var FindClosestInSorted = __webpack_require__(297); +var Frame = __webpack_require__(298); var GetValue = __webpack_require__(6); +var SortByDigits = __webpack_require__(299); /** * @classdesc * A Frame based Animation. * - * This consists of a key, some default values (like the frame rate) and a bunch of Frame objects. + * Animations in Phaser consist of a sequence of `AnimationFrame` objects, which are managed by + * this class, along with properties that impact playback, such as the animations frame rate + * or delay. * - * The Animation Manager creates these. Game Objects don't own an instance of these directly. - * Game Objects have the Animation Component, which are like playheads to global Animations (these objects) - * So multiple Game Objects can have playheads all pointing to this one Animation instance. + * This class contains all of the properties and methods needed to handle playback of the animation + * directly to an `AnimationState` instance, which is owned by a Sprite, or similar Game Object. + * + * You don't typically create an instance of this class directly, but instead go via + * either the `AnimationManager` or the `AnimationState` and use their `create` methods, + * depending on if you need a global animation, or local to a specific Sprite. * * @class Animation * @memberof Phaser.Animations - * @extends Phaser.Events.EventEmitter * @constructor * @since 3.0.0 * @@ -32432,14 +34032,10 @@ var GetValue = __webpack_require__(6); */ var Animation = new Class({ - Extends: EventEmitter, - initialize: function Animation (manager, key, config) { - EventEmitter.call(this); - /** * A reference to the global Animation Manager. * @@ -32478,7 +34074,8 @@ var Animation = new Class({ this.frames = this.getFrames( manager.textureManager, GetValue(config, 'frames', []), - GetValue(config, 'defaultTextureKey', null) + GetValue(config, 'defaultTextureKey', null), + GetValue(config, 'sortFrames', true) ); /** @@ -32502,27 +34099,6 @@ var Animation = new Class({ */ this.duration = GetValue(config, 'duration', null); - if (this.duration === null && this.frameRate === null) - { - // No duration or frameRate given, use default frameRate of 24fps - this.frameRate = 24; - this.duration = (this.frameRate / this.frames.length) * 1000; - } - else if (this.duration && this.frameRate === null) - { - // Duration given but no frameRate, so set the frameRate based on duration - // I.e. 12 frames in the animation, duration = 4000 ms - // So frameRate is 12 / (4000 / 1000) = 3 fps - this.frameRate = this.frames.length / (this.duration / 1000); - } - else - { - // frameRate given, derive duration from it (even if duration also specified) - // I.e. 15 frames in the animation, frameRate = 30 fps - // So duration is 15 / 30 = 0.5 * 1000 (half a second, or 500ms) - this.duration = (this.frames.length / this.frameRate) * 1000; - } - /** * How many ms per frame, not including frame specific modifiers. * @@ -32530,14 +34106,14 @@ var Animation = new Class({ * @type {integer} * @since 3.0.0 */ - this.msPerFrame = 1000 / this.frameRate; + this.msPerFrame; /** * Skip frames if the time lags, or always advanced anyway? * * @name Phaser.Animations.Animation#skipMissedFrames * @type {boolean} - * @default false + * @default true * @since 3.0.0 */ this.skipMissedFrames = GetValue(config, 'skipMissedFrames', true); @@ -32612,8 +34188,65 @@ var Animation = new Class({ */ this.paused = false; - this.manager.on(Events.PAUSE_ALL, this.pause, this); - this.manager.on(Events.RESUME_ALL, this.resume, this); + this.calculateDuration(this, this.getTotalFrames(), this.duration, this.frameRate); + + if (this.manager.on) + { + this.manager.on(Events.PAUSE_ALL, this.pause, this); + this.manager.on(Events.RESUME_ALL, this.resume, this); + } + }, + + /** + * Gets the total number of frames in this animation. + * + * @method Phaser.Animations.Animation#getTotalFrames + * @since 3.50.0 + * + * @return {number} The total number of frames in this animation. + */ + getTotalFrames: function () + { + return this.frames.length; + }, + + /** + * Calculates the duration, frame rate and msPerFrame values. + * + * @method Phaser.Animations.Animation#calculateDuration + * @since 3.50.0 + * + * @param {(Phaser.Animations.Animation|Phaser.GameObjects.Components.Animation)} target - The target to set the values on. + * @param {number} totalFrames - The total number of frames in the animation. + * @param {number} duration - The duration to calculate the frame rate from. + * @param {number} frameRate - The frame ate to calculate the duration from. + */ + calculateDuration: function (target, totalFrames, duration, frameRate) + { + if (duration === null && frameRate === null) + { + // No duration or frameRate given, use default frameRate of 24fps + target.frameRate = 24; + target.duration = (24 / totalFrames) * 1000; + } + else if (duration && frameRate === null) + { + // Duration given but no frameRate, so set the frameRate based on duration + // I.e. 12 frames in the animation, duration = 4000 ms + // So frameRate is 12 / (4000 / 1000) = 3 fps + target.duration = duration; + target.frameRate = totalFrames / (duration / 1000); + } + else + { + // frameRate given, derive duration from it (even if duration also specified) + // I.e. 15 frames in the animation, frameRate = 30 fps + // So duration is 15 / 30 = 0.5 * 1000 (half a second, or 500ms) + target.frameRate = frameRate; + target.duration = (totalFrames / frameRate) * 1000; + } + + target.msPerFrame = 1000 / target.frameRate; }, /** @@ -32685,26 +34318,6 @@ var Animation = new Class({ return (index >= 0 && index < this.frames.length); }, - /** - * Called internally when this Animation completes playback. - * Optionally, hides the parent Game Object, then stops playback. - * - * @method Phaser.Animations.Animation#completeAnimation - * @protected - * @since 3.0.0 - * - * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. - */ - completeAnimation: function (component) - { - if (this.hideOnComplete) - { - component.parent.visible = false; - } - - component.stop(); - }, - /** * Called internally when this Animation first starts to play. * Sets the accumulator and nextTick properties. @@ -32714,20 +34327,13 @@ var Animation = new Class({ * @since 3.0.0 * * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. - * @param {boolean} [includeDelay=true] - If `true` the Animation Components delay value will be added to the `nextTick` total. */ - getFirstTick: function (component, includeDelay) + getFirstTick: function (component) { - if (includeDelay === undefined) { includeDelay = true; } - // When is the first update due? component.accumulator = 0; - component.nextTick = component.msPerFrame + component.currentFrame.duration; - if (includeDelay) - { - component.nextTick += component._delay; - } + component.nextTick = component.msPerFrame + component.currentFrame.duration; }, /** @@ -32758,8 +34364,10 @@ var Animation = new Class({ * * @return {Phaser.Animations.AnimationFrame[]} An array of newly created AnimationFrame instances. */ - getFrames: function (textureManager, frames, defaultTextureKey) + getFrames: function (textureManager, frames, defaultTextureKey, sortFrames) { + if (sortFrames === undefined) { sortFrames = true; } + var out = []; var prev; var animationFrame; @@ -32775,9 +34383,14 @@ var Animation = new Class({ var texture = textureManager.get(textureKey); var frameKeys = texture.getFrameNames(); + if (sortFrames) + { + SortByDigits(frameKeys); + } + frames = []; - frameKeys.forEach(function (idx, value) + frameKeys.forEach(function (value) { frames.push({ key: textureKey, frame: value }); }); @@ -32858,57 +34471,11 @@ var Animation = new Class({ */ getNextTick: function (component) { - // accumulator += delta * _timeScale - // after a large delta surge (perf issue for example) we need to adjust for it here - - // When is the next update due? component.accumulator -= component.nextTick; component.nextTick = component.msPerFrame + component.currentFrame.duration; }, - /** - * Loads the Animation values into the Animation Component. - * - * @method Phaser.Animations.Animation#load - * @private - * @since 3.0.0 - * - * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to load values into. - * @param {integer} startFrame - The start frame of the animation to load. - */ - load: function (component, startFrame) - { - if (startFrame >= this.frames.length) - { - startFrame = 0; - } - - if (component.currentAnim !== this) - { - component.currentAnim = this; - - component.frameRate = this.frameRate; - component.duration = this.duration; - component.msPerFrame = this.msPerFrame; - component.skipMissedFrames = this.skipMissedFrames; - - component._delay = this.delay; - component._repeat = this.repeat; - component._repeatDelay = this.repeatDelay; - component._yoyo = this.yoyo; - } - - var frame = this.frames[startFrame]; - - if (startFrame === 0 && !component.forward) - { - frame = this.getLastFrame(); - } - - component.updateFrame(frame); - }, - /** * Returns the frame closest to the given progress value between 0 and 1. * @@ -32938,14 +34505,12 @@ var Animation = new Class({ { var frame = component.currentFrame; - // TODO: Add frame skip support - if (frame.isLast) { // We're at the end of the animation // Yoyo? (happens before repeat) - if (component._yoyo) + if (component.yoyo) { this.handleYoyoFrame(component, false); } @@ -32953,7 +34518,7 @@ var Animation = new Class({ { // Repeat (happens before complete) - if (component._reverse && component.forward) + if (component.inReverse && component.forward) { component.forward = false; } @@ -32964,7 +34529,7 @@ var Animation = new Class({ } else { - this.completeAnimation(component); + component.complete(); } } else @@ -32987,10 +34552,9 @@ var Animation = new Class({ { if (!isReverse) { isReverse = false; } - if (component._reverse === !isReverse && component.repeatCounter > 0) + if (component.inReverse === !isReverse && component.repeatCounter > 0) { - if (!component._repeatDelay || component.pendingRepeat) - + if (component.repeatDelay === 0 || component.pendingRepeat) { component.forward = isReverse; } @@ -33000,13 +34564,13 @@ var Animation = new Class({ return; } - if (component._reverse !== isReverse && component.repeatCounter === 0) + if (component.inReverse !== isReverse && component.repeatCounter === 0) { - this.completeAnimation(component); + component.complete(); return; } - + component.forward = isReverse; var frame = (isReverse) ? component.currentFrame.nextFrame : component.currentFrame.prevFrame; @@ -33040,33 +34604,30 @@ var Animation = new Class({ { var frame = component.currentFrame; - // TODO: Add frame skip support - if (frame.isFirst) { // We're at the start of the animation - - if (component._yoyo) + if (component.yoyo) { this.handleYoyoFrame(component, true); } else if (component.repeatCounter > 0) { - if (component._reverse && !component.forward) + if (component.inReverse && !component.forward) { - component.currentFrame = this.getLastFrame(); this.repeatAnimation(component); } else { // Repeat (happens before complete) component.forward = true; + this.repeatAnimation(component); } } else { - this.completeAnimation(component); + component.complete(); } } else @@ -33086,7 +34647,7 @@ var Animation = new Class({ */ updateAndGetNextTick: function (component, frame) { - component.updateFrame(frame); + component.setCurrentFrame(frame); this.getNextTick(component); }, @@ -33150,60 +34711,44 @@ var Animation = new Class({ { if (component._pendingStop === 2) { - return this.completeAnimation(component); + if (component._pendingStopValue === 0) + { + return component.stop(); + } + else + { + component._pendingStopValue--; + } } - if (component._repeatDelay > 0 && component.pendingRepeat === false) + if (component.repeatDelay > 0 && !component.pendingRepeat) { component.pendingRepeat = true; component.accumulator -= component.nextTick; - component.nextTick += component._repeatDelay; + component.nextTick += component.repeatDelay; } else { component.repeatCounter--; - component.updateFrame(component.currentFrame[(component.forward) ? 'nextFrame' : 'prevFrame']); + if (component.forward) + { + component.setCurrentFrame(component.currentFrame.nextFrame); + } + else + { + component.setCurrentFrame(component.currentFrame.prevFrame); + } if (component.isPlaying) { this.getNextTick(component); - component.pendingRepeat = false; - - var frame = component.currentFrame; - var parent = component.parent; - - this.emit(Events.ANIMATION_REPEAT, this, frame); - - parent.emit(Events.SPRITE_ANIMATION_KEY_REPEAT + this.key, this, frame, component.repeatCounter, parent); - - parent.emit(Events.SPRITE_ANIMATION_REPEAT, this, frame, component.repeatCounter, parent); + component.handleRepeat(); } } }, - /** - * Sets the texture frame the animation uses for rendering. - * - * @method Phaser.Animations.Animation#setFrame - * @since 3.0.0 - * - * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. - */ - setFrame: function (component) - { - // Work out which frame should be set next on the child, and set it - if (component.forward) - { - this.nextFrame(component); - } - else - { - this.previousFrame(component); - } - }, - /** * Converts the animation data to JSON. * @@ -33334,10 +34879,11 @@ var Animation = new Class({ */ destroy: function () { - this.removeAllListeners(); - - this.manager.off(Events.PAUSE_ALL, this.pause, this); - this.manager.off(Events.RESUME_ALL, this.resume, this); + if (this.manager.off) + { + this.manager.off(Events.PAUSE_ALL, this.pause, this); + this.manager.off(Events.RESUME_ALL, this.resume, this); + } this.manager.remove(this.key); @@ -33357,1013 +34903,7 @@ module.exports = Animation; /***/ }), -/* 157 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Perimeter = __webpack_require__(116); -var Point = __webpack_require__(4); - -/** - * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter. - * - * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is. - * - * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side. - * - * @function Phaser.Geom.Rectangle.GetPoint - * @since 3.0.0 - * - * @generic {Phaser.Geom.Point} O - [out,$return] - * - * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle to get the perimeter point from. - * @param {number} position - The normalized distance into the Rectangle's perimeter to return. - * @param {(Phaser.Geom.Point|object)} [out] - An object to update with the `x` and `y` coordinates of the point. - * - * @return {Phaser.Geom.Point} The updated `output` object, or a new Point if no `output` object was given. - */ -var GetPoint = function (rectangle, position, out) -{ - if (out === undefined) { out = new Point(); } - - if (position <= 0 || position >= 1) - { - out.x = rectangle.x; - out.y = rectangle.y; - - return out; - } - - var p = Perimeter(rectangle) * position; - - if (position > 0.5) - { - p -= (rectangle.width + rectangle.height); - - if (p <= rectangle.width) - { - // Face 3 - out.x = rectangle.right - p; - out.y = rectangle.bottom; - } - else - { - // Face 4 - out.x = rectangle.x; - out.y = rectangle.bottom - (p - rectangle.width); - } - } - else if (p <= rectangle.width) - { - // Face 1 - out.x = rectangle.x + p; - out.y = rectangle.y; - } - else - { - // Face 2 - out.x = rectangle.right; - out.y = rectangle.y + (p - rectangle.width); - } - - return out; -}; - -module.exports = GetPoint; - - -/***/ }), -/* 158 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Length = __webpack_require__(57); -var Point = __webpack_require__(4); - -/** - * Get a number of points along a line's length. - * - * Provide a `quantity` to get an exact number of points along the line. - * - * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when - * providing a `stepRate`. - * - * @function Phaser.Geom.Line.GetPoints - * @since 3.0.0 - * - * @generic {Phaser.Geom.Point[]} O - [out,$return] - * - * @param {Phaser.Geom.Line} line - The line. - * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead. - * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`. - * @param {(array|Phaser.Geom.Point[])} [out] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line. - * - * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line. - */ -var GetPoints = function (line, quantity, stepRate, out) -{ - if (out === undefined) { out = []; } - - // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. - if (!quantity && stepRate > 0) - { - quantity = Length(line) / stepRate; - } - - var x1 = line.x1; - var y1 = line.y1; - - var x2 = line.x2; - var y2 = line.y2; - - for (var i = 0; i < quantity; i++) - { - var position = i / quantity; - - var x = x1 + (x2 - x1) * position; - var y = y1 + (y2 - y1) * position; - - out.push(new Point(x, y)); - } - - return out; -}; - -module.exports = GetPoints; - - -/***/ }), -/* 159 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Point = __webpack_require__(4); - -/** - * Returns a random point on a given Line. - * - * @function Phaser.Geom.Line.Random - * @since 3.0.0 - * - * @generic {Phaser.Geom.Point} O - [out,$return] - * - * @param {Phaser.Geom.Line} line - The Line to calculate the random Point on. - * @param {(Phaser.Geom.Point|object)} [out] - An instance of a Point to be modified. - * - * @return {(Phaser.Geom.Point|object)} A random Point on the Line. - */ -var Random = function (line, out) -{ - if (out === undefined) { out = new Point(); } - - var t = Math.random(); - - out.x = line.x1 + t * (line.x2 - line.x1); - out.y = line.y1 + t * (line.y2 - line.y1); - - return out; -}; - -module.exports = Random; - - -/***/ }), -/* 160 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Point = __webpack_require__(4); - -/** - * Returns a random point within a Rectangle. - * - * @function Phaser.Geom.Rectangle.Random - * @since 3.0.0 - * - * @generic {Phaser.Geom.Point} O - [out,$return] - * - * @param {Phaser.Geom.Rectangle} rect - The Rectangle to return a point from. - * @param {Phaser.Geom.Point} out - The object to update with the point's coordinates. - * - * @return {Phaser.Geom.Point} The modified `out` object, or a new Point if none was provided. - */ -var Random = function (rect, out) -{ - if (out === undefined) { out = new Point(); } - - out.x = rect.x + (Math.random() * rect.width); - out.y = rect.y + (Math.random() * rect.height); - - return out; -}; - -module.exports = Random; - - -/***/ }), -/* 161 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Provides methods used for setting the WebGL rendering pipeline of a Game Object. - * - * @namespace Phaser.GameObjects.Components.Pipeline - * @webglOnly - * @since 3.0.0 - */ - -var Pipeline = { - - /** - * The initial WebGL pipeline of this Game Object. - * - * @name Phaser.GameObjects.Components.Pipeline#defaultPipeline - * @type {Phaser.Renderer.WebGL.WebGLPipeline} - * @default null - * @webglOnly - * @since 3.0.0 - */ - defaultPipeline: null, - - /** - * The current WebGL pipeline of this Game Object. - * - * @name Phaser.GameObjects.Components.Pipeline#pipeline - * @type {Phaser.Renderer.WebGL.WebGLPipeline} - * @default null - * @webglOnly - * @since 3.0.0 - */ - pipeline: null, - - /** - * Sets the initial WebGL Pipeline of this Game Object. - * - * This should only be called during the instantiation of the Game Object. - * - * @method Phaser.GameObjects.Components.Pipeline#initPipeline - * @webglOnly - * @since 3.0.0 - * - * @param {string} [pipelineName=MultiPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Multi Pipeline. - * - * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. - */ - initPipeline: function (pipelineName) - { - if (pipelineName === undefined) { pipelineName = 'MultiPipeline'; } - - var renderer = this.scene.sys.game.renderer; - - if (renderer && renderer.gl && renderer.hasPipeline(pipelineName)) - { - this.defaultPipeline = renderer.getPipeline(pipelineName); - this.pipeline = this.defaultPipeline; - - return true; - } - - return false; - }, - - /** - * Sets the active WebGL Pipeline of this Game Object. - * - * @method Phaser.GameObjects.Components.Pipeline#setPipeline - * @webglOnly - * @since 3.0.0 - * - * @param {string} pipelineName - The name of the pipeline to set on this Game Object. - * - * @return {this} This Game Object instance. - */ - setPipeline: function (pipelineName) - { - var renderer = this.scene.sys.game.renderer; - - if (renderer && renderer.gl && renderer.hasPipeline(pipelineName)) - { - this.pipeline = renderer.getPipeline(pipelineName); - } - - return this; - }, - - /** - * Resets the WebGL Pipeline of this Game Object back to the default it was created with. - * - * @method Phaser.GameObjects.Components.Pipeline#resetPipeline - * @webglOnly - * @since 3.0.0 - * - * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. - */ - resetPipeline: function () - { - this.pipeline = this.defaultPipeline; - - return (this.pipeline !== null); - }, - - /** - * Gets the name of the WebGL Pipeline this Game Object is currently using. - * - * @method Phaser.GameObjects.Components.Pipeline#getPipelineName - * @webglOnly - * @since 3.0.0 - * - * @return {string} The string-based name of the pipeline being used by this Game Object. - */ - getPipelineName: function () - { - return this.pipeline.name; - } - -}; - -module.exports = Pipeline; - - -/***/ }), -/* 162 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Vector2 = __webpack_require__(3); - -/** - * Takes the `x` and `y` coordinates and transforms them into the same space as - * defined by the position, rotation and scale values. - * - * @function Phaser.Math.TransformXY - * @since 3.0.0 - * - * @param {number} x - The x coordinate to be transformed. - * @param {number} y - The y coordinate to be transformed. - * @param {number} positionX - Horizontal position of the transform point. - * @param {number} positionY - Vertical position of the transform point. - * @param {number} rotation - Rotation of the transform point, in radians. - * @param {number} scaleX - Horizontal scale of the transform point. - * @param {number} scaleY - Vertical scale of the transform point. - * @param {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} [output] - The output vector, point or object for the translated coordinates. - * - * @return {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} The translated point. - */ -var TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output) -{ - if (output === undefined) { output = new Vector2(); } - - var radianSin = Math.sin(rotation); - var radianCos = Math.cos(rotation); - - // Rotate and Scale - var a = radianCos * scaleX; - var b = radianSin * scaleX; - var c = -radianSin * scaleY; - var d = radianCos * scaleY; - - // Invert - var id = 1 / ((a * d) + (c * -b)); - - output.x = (d * id * x) + (-c * id * y) + (((positionY * c) - (positionX * d)) * id); - output.y = (a * id * y) + (-b * id * x) + (((-positionY * a) + (positionX * b)) * id); - - return output; -}; - -module.exports = TransformXY; - - -/***/ }), -/* 163 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Point = __webpack_require__(4); - -/** - * Returns a uniformly distributed random point from anywhere within the given Ellipse. - * - * @function Phaser.Geom.Ellipse.Random - * @since 3.0.0 - * - * @generic {Phaser.Geom.Point} O - [out,$return] - * - * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to get a random point from. - * @param {(Phaser.Geom.Point|object)} [out] - A Point or point-like object to set the random `x` and `y` values in. - * - * @return {(Phaser.Geom.Point|object)} A Point object with the random values set in the `x` and `y` properties. - */ -var Random = function (ellipse, out) -{ - if (out === undefined) { out = new Point(); } - - var p = Math.random() * Math.PI * 2; - var s = Math.sqrt(Math.random()); - - out.x = ellipse.x + ((s * Math.cos(p)) * ellipse.width / 2); - out.y = ellipse.y + ((s * Math.sin(p)) * ellipse.height / 2); - - return out; -}; - -module.exports = Random; - - -/***/ }), -/* 164 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Point = __webpack_require__(4); - -/** - * Returns a random Point from within the area of the given Triangle. - * - * @function Phaser.Geom.Triangle.Random - * @since 3.0.0 - * - * @generic {Phaser.Geom.Point} O - [out,$return] - * - * @param {Phaser.Geom.Triangle} triangle - The Triangle to get a random point from. - * @param {Phaser.Geom.Point} [out] - The Point object to store the position in. If not given, a new Point instance is created. - * - * @return {Phaser.Geom.Point} A Point object holding the coordinates of a random position within the Triangle. - */ -var Random = function (triangle, out) -{ - if (out === undefined) { out = new Point(); } - - // Basis vectors - var ux = triangle.x2 - triangle.x1; - var uy = triangle.y2 - triangle.y1; - - var vx = triangle.x3 - triangle.x1; - var vy = triangle.y3 - triangle.y1; - - // Random point within the unit square - var r = Math.random(); - var s = Math.random(); - - // Point outside the triangle? Remap it. - if (r + s >= 1) - { - r = 1 - r; - s = 1 - s; - } - - out.x = triangle.x1 + ((ux * r) + (vx * s)); - out.y = triangle.y1 + ((uy * r) + (vy * s)); - - return out; -}; - -module.exports = Random; - - -/***/ }), -/* 165 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Rotate a `point` around `x` and `y` by the given `angle` and `distance`. - * - * In polar notation, this maps a point from (r, t) to (distance, t + angle), vs. the origin (x, y). - * - * @function Phaser.Math.RotateAroundDistance - * @since 3.0.0 - * - * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return] - * - * @param {(Phaser.Geom.Point|object)} point - The point to be rotated. - * @param {number} x - The horizontal coordinate to rotate around. - * @param {number} y - The vertical coordinate to rotate around. - * @param {number} angle - The angle of rotation in radians. - * @param {number} distance - The distance from (x, y) to place the point at. - * - * @return {Phaser.Types.Math.Vector2Like} The given point. - */ -var RotateAroundDistance = function (point, x, y, angle, distance) -{ - var t = angle + Math.atan2(point.y - y, point.x - x); - - point.x = x + (distance * Math.cos(t)); - point.y = y + (distance * Math.sin(t)); - - return point; -}; - -module.exports = RotateAroundDistance; - - -/***/ }), -/* 166 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Calculate a smoother interpolation percentage of `x` between `min` and `max`. - * - * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge, - * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial, - * between 0 and 1 otherwise. - * - * Produces an even smoother interpolation than {@link Phaser.Math.SmoothStep}. - * - * @function Phaser.Math.SmootherStep - * @since 3.0.0 - * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations} - * - * @param {number} x - The input value. - * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'. - * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'. - * - * @return {number} The percentage of interpolation, between 0 and 1. - */ -var SmootherStep = function (x, min, max) -{ - x = Math.max(0, Math.min(1, (x - min) / (max - min))); - - return x * x * x * (x * (x * 6 - 15) + 10); -}; - -module.exports = SmootherStep; - - -/***/ }), -/* 167 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Calculate a smooth interpolation percentage of `x` between `min` and `max`. - * - * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge, - * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial, - * between 0 and 1 otherwise. - * - * @function Phaser.Math.SmoothStep - * @since 3.0.0 - * @see {@link https://en.wikipedia.org/wiki/Smoothstep} - * - * @param {number} x - The input value. - * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'. - * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'. - * - * @return {number} The percentage of interpolation, between 0 and 1. - */ -var SmoothStep = function (x, min, max) -{ - if (x <= min) - { - return 0; - } - - if (x >= max) - { - return 1; - } - - x = (x - min) / (max - min); - - return x * x * (3 - 2 * x); -}; - -module.exports = SmoothStep; - - -/***/ }), -/* 168 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); - -/** - * @callback EachMapCallback - * - * @param {string} key - The key of the Map entry. - * @param {E} entry - The value of the Map entry. - * - * @return {?boolean} The callback result. - */ - -/** - * @classdesc - * The keys of a Map can be arbitrary values. - * - * ```javascript - * var map = new Map([ - * [ 1, 'one' ], - * [ 2, 'two' ], - * [ 3, 'three' ] - * ]); - * ``` - * - * @class Map - * @memberof Phaser.Structs - * @constructor - * @since 3.0.0 - * - * @generic K - * @generic V - * @genericUse {V[]} - [elements] - * - * @param {Array.<*>} elements - An optional array of key-value pairs to populate this Map with. - */ -var Map = new Class({ - - initialize: - - function Map (elements) - { - /** - * The entries in this Map. - * - * @genericUse {Object.} - [$type] - * - * @name Phaser.Structs.Map#entries - * @type {Object.} - * @default {} - * @since 3.0.0 - */ - this.entries = {}; - - /** - * The number of key / value pairs in this Map. - * - * @name Phaser.Structs.Map#size - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.size = 0; - - if (Array.isArray(elements)) - { - for (var i = 0; i < elements.length; i++) - { - this.set(elements[i][0], elements[i][1]); - } - } - }, - - /** - * Adds an element with a specified `key` and `value` to this Map. - * If the `key` already exists, the value will be replaced. - * - * @method Phaser.Structs.Map#set - * @since 3.0.0 - * - * @genericUse {K} - [key] - * @genericUse {V} - [value] - * @genericUse {Phaser.Structs.Map.} - [$return] - * - * @param {string} key - The key of the element to be added to this Map. - * @param {*} value - The value of the element to be added to this Map. - * - * @return {Phaser.Structs.Map} This Map object. - */ - set: function (key, value) - { - if (!this.has(key)) - { - this.size++; - } - - this.entries[key] = value; - - return this; - }, - - /** - * Returns the value associated to the `key`, or `undefined` if there is none. - * - * @method Phaser.Structs.Map#get - * @since 3.0.0 - * - * @genericUse {K} - [key] - * @genericUse {V} - [$return] - * - * @param {string} key - The key of the element to return from the `Map` object. - * - * @return {*} The element associated with the specified key or `undefined` if the key can't be found in this Map object. - */ - get: function (key) - { - if (this.has(key)) - { - return this.entries[key]; - } - }, - - /** - * Returns an `Array` of all the values stored in this Map. - * - * @method Phaser.Structs.Map#getArray - * @since 3.0.0 - * - * @genericUse {V[]} - [$return] - * - * @return {Array.<*>} An array of the values stored in this Map. - */ - getArray: function () - { - var output = []; - var entries = this.entries; - - for (var key in entries) - { - output.push(entries[key]); - } - - return output; - }, - - /** - * Returns a boolean indicating whether an element with the specified key exists or not. - * - * @method Phaser.Structs.Map#has - * @since 3.0.0 - * - * @genericUse {K} - [key] - * - * @param {string} key - The key of the element to test for presence of in this Map. - * - * @return {boolean} Returns `true` if an element with the specified key exists in this Map, otherwise `false`. - */ - has: function (key) - { - return (this.entries.hasOwnProperty(key)); - }, - - /** - * Delete the specified element from this Map. - * - * @method Phaser.Structs.Map#delete - * @since 3.0.0 - * - * @genericUse {K} - [key] - * @genericUse {Phaser.Structs.Map.} - [$return] - * - * @param {string} key - The key of the element to delete from this Map. - * - * @return {Phaser.Structs.Map} This Map object. - */ - delete: function (key) - { - if (this.has(key)) - { - delete this.entries[key]; - this.size--; - } - - return this; - }, - - /** - * Delete all entries from this Map. - * - * @method Phaser.Structs.Map#clear - * @since 3.0.0 - * - * @genericUse {Phaser.Structs.Map.} - [$return] - * - * @return {Phaser.Structs.Map} This Map object. - */ - clear: function () - { - Object.keys(this.entries).forEach(function (prop) - { - delete this.entries[prop]; - - }, this); - - this.size = 0; - - return this; - }, - - /** - * Returns all entries keys in this Map. - * - * @method Phaser.Structs.Map#keys - * @since 3.0.0 - * - * @genericUse {K[]} - [$return] - * - * @return {string[]} Array containing entries' keys. - */ - keys: function () - { - return Object.keys(this.entries); - }, - - /** - * Returns an `Array` of all entries. - * - * @method Phaser.Structs.Map#values - * @since 3.0.0 - * - * @genericUse {V[]} - [$return] - * - * @return {Array.<*>} An `Array` of entries. - */ - values: function () - { - var output = []; - var entries = this.entries; - - for (var key in entries) - { - output.push(entries[key]); - } - - return output; - }, - - /** - * Dumps the contents of this Map to the console via `console.group`. - * - * @method Phaser.Structs.Map#dump - * @since 3.0.0 - */ - dump: function () - { - var entries = this.entries; - - // eslint-disable-next-line no-console - console.group('Map'); - - for (var key in entries) - { - console.log(key, entries[key]); - } - - // eslint-disable-next-line no-console - console.groupEnd(); - }, - - /** - * Passes all entries in this Map to the given callback. - * - * @method Phaser.Structs.Map#each - * @since 3.0.0 - * - * @genericUse {EachMapCallback.} - [callback] - * @genericUse {Phaser.Structs.Map.} - [$return] - * - * @param {EachMapCallback} callback - The callback which will receive the keys and entries held in this Map. - * - * @return {Phaser.Structs.Map} This Map object. - */ - each: function (callback) - { - var entries = this.entries; - - for (var key in entries) - { - if (callback(key, entries[key]) === false) - { - break; - } - } - - return this; - }, - - /** - * Returns `true` if the value exists within this Map. Otherwise, returns `false`. - * - * @method Phaser.Structs.Map#contains - * @since 3.0.0 - * - * @genericUse {V} - [value] - * - * @param {*} value - The value to search for. - * - * @return {boolean} `true` if the value is found, otherwise `false`. - */ - contains: function (value) - { - var entries = this.entries; - - for (var key in entries) - { - if (entries[key] === value) - { - return true; - } - } - - return false; - }, - - /** - * Merges all new keys from the given Map into this one. - * If it encounters a key that already exists it will be skipped unless override is set to `true`. - * - * @method Phaser.Structs.Map#merge - * @since 3.0.0 - * - * @genericUse {Phaser.Structs.Map.} - [map,$return] - * - * @param {Phaser.Structs.Map} map - The Map to merge in to this Map. - * @param {boolean} [override=false] - Set to `true` to replace values in this Map with those from the source map, or `false` to skip them. - * - * @return {Phaser.Structs.Map} This Map object. - */ - merge: function (map, override) - { - if (override === undefined) { override = false; } - - var local = this.entries; - var source = map.entries; - - for (var key in source) - { - if (local.hasOwnProperty(key) && override) - { - local[key] = source[key]; - } - else - { - this.set(key, source[key]); - } - } - - return this; - } - -}); - -module.exports = Map; - - -/***/ }), -/* 169 */ +/* 171 */ /***/ (function(module, exports) { /** @@ -34439,7 +34979,7 @@ module.exports = Pad; /***/ }), -/* 170 */ +/* 172 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34448,10 +34988,10 @@ module.exports = Pad; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HexStringToColor = __webpack_require__(298); -var IntegerToColor = __webpack_require__(301); -var ObjectToColor = __webpack_require__(303); -var RGBStringToColor = __webpack_require__(304); +var HexStringToColor = __webpack_require__(306); +var IntegerToColor = __webpack_require__(309); +var ObjectToColor = __webpack_require__(311); +var RGBStringToColor = __webpack_require__(312); /** * Converts the given source color value into an instance of a Color class. @@ -34495,7 +35035,7 @@ module.exports = ValueToColor; /***/ }), -/* 171 */ +/* 173 */ /***/ (function(module, exports) { /** @@ -34525,7 +35065,7 @@ module.exports = GetColor; /***/ }), -/* 172 */ +/* 174 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34534,13 +35074,35 @@ module.exports = GetColor; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetColor = __webpack_require__(171); +var GetColor = __webpack_require__(173); /** - * Converts an HSV (hue, saturation and value) color value to RGB. - * Conversion formula from http://en.wikipedia.org/wiki/HSL_color_space. + * RGB space conversion. + * + * @ignore + * + * @param {number} n - The value to convert. + * @param {number} h - The h value. + * @param {number} s - The s value. + * @param {number} v - The v value. + * + * @return {number} The converted value. + */ +function ConvertValue (n, h, s, v) +{ + var k = (n + h * 6) % 6; + + var min = Math.min(k, 4 - k, 1); + + return Math.round(255 * (v - v * s * Math.max(0, min))); +} + +/** + * Converts a HSV (hue, saturation and value) color set to RGB. + * + * Conversion formula from https://en.wikipedia.org/wiki/HSL_and_HSV + * * Assumes HSV values are contained in the set [0, 1]. - * Based on code by Michael Jackson (https://github.com/mjijackson) * * @function Phaser.Display.Color.HSVToRGB * @since 3.0.0 @@ -34557,51 +35119,9 @@ var HSVToRGB = function (h, s, v, out) if (s === undefined) { s = 1; } if (v === undefined) { v = 1; } - var i = Math.floor(h * 6); - var f = h * 6 - i; - - var p = Math.floor((v * (1 - s)) * 255); - var q = Math.floor((v * (1 - f * s)) * 255); - var t = Math.floor((v * (1 - (1 - f) * s)) * 255); - - v = Math.floor(v *= 255); - - var r = v; - var g = v; - var b = v; - - var c = i % 6; - - if (c === 0) - { - g = t; - b = p; - } - else if (c === 1) - { - r = q; - b = p; - } - else if (c === 2) - { - r = p; - b = t; - } - else if (c === 3) - { - r = p; - g = q; - } - else if (c === 4) - { - r = t; - g = p; - } - else if (c === 5) - { - g = p; - b = q; - } + var r = ConvertValue(5, h, s, v); + var g = ConvertValue(3, h, s, v); + var b = ConvertValue(1, h, s, v); if (!out) { @@ -34626,7 +35146,7 @@ module.exports = HSVToRGB; /***/ }), -/* 173 */ +/* 175 */ /***/ (function(module, exports) { /** @@ -34758,7 +35278,7 @@ module.exports = Smoothing(); /***/ }), -/* 174 */ +/* 176 */ /***/ (function(module, exports) { /** @@ -34795,7 +35315,7 @@ module.exports = CenterOn; /***/ }), -/* 175 */ +/* 177 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34804,8 +35324,8 @@ module.exports = CenterOn; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var OS = __webpack_require__(122); -var Browser = __webpack_require__(123); +var OS = __webpack_require__(124); +var Browser = __webpack_require__(125); var CanvasPool = __webpack_require__(26); /** @@ -34987,7 +35507,7 @@ module.exports = init(); /***/ }), -/* 176 */ +/* 178 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35006,63 +35526,63 @@ var Extend = __webpack_require__(19); var PhaserMath = { // Collections of functions - Angle: __webpack_require__(738), - Distance: __webpack_require__(747), - Easing: __webpack_require__(752), - Fuzzy: __webpack_require__(753), - Interpolation: __webpack_require__(756), - Pow2: __webpack_require__(761), - Snap: __webpack_require__(763), + Angle: __webpack_require__(756), + Distance: __webpack_require__(765), + Easing: __webpack_require__(770), + Fuzzy: __webpack_require__(771), + Interpolation: __webpack_require__(774), + Pow2: __webpack_require__(779), + Snap: __webpack_require__(781), // Expose the RNG Class - RandomDataGenerator: __webpack_require__(765), + RandomDataGenerator: __webpack_require__(783), // Single functions - Average: __webpack_require__(766), - Bernstein: __webpack_require__(328), - Between: __webpack_require__(178), - CatmullRom: __webpack_require__(177), - CeilTo: __webpack_require__(767), + Average: __webpack_require__(784), + Bernstein: __webpack_require__(336), + Between: __webpack_require__(180), + CatmullRom: __webpack_require__(179), + CeilTo: __webpack_require__(785), Clamp: __webpack_require__(17), - DegToRad: __webpack_require__(40), - Difference: __webpack_require__(768), - Factorial: __webpack_require__(329), - FloatBetween: __webpack_require__(124), - FloorTo: __webpack_require__(769), - FromPercent: __webpack_require__(88), - GetSpeed: __webpack_require__(770), - IsEven: __webpack_require__(771), - IsEvenStrict: __webpack_require__(772), - Linear: __webpack_require__(121), - MaxAdd: __webpack_require__(773), - MinSub: __webpack_require__(774), - Percent: __webpack_require__(775), - RadToDeg: __webpack_require__(179), - RandomXY: __webpack_require__(776), - RandomXYZ: __webpack_require__(777), - RandomXYZW: __webpack_require__(778), - Rotate: __webpack_require__(335), - RotateAround: __webpack_require__(280), - RotateAroundDistance: __webpack_require__(165), - RotateTo: __webpack_require__(779), - RoundAwayFromZero: __webpack_require__(336), - RoundTo: __webpack_require__(780), - SinCosTableGenerator: __webpack_require__(781), - SmootherStep: __webpack_require__(166), - SmoothStep: __webpack_require__(167), - ToXY: __webpack_require__(782), - TransformXY: __webpack_require__(162), - Within: __webpack_require__(783), - Wrap: __webpack_require__(58), + DegToRad: __webpack_require__(41), + Difference: __webpack_require__(786), + Factorial: __webpack_require__(337), + FloatBetween: __webpack_require__(126), + FloorTo: __webpack_require__(787), + FromPercent: __webpack_require__(89), + GetSpeed: __webpack_require__(788), + IsEven: __webpack_require__(789), + IsEvenStrict: __webpack_require__(790), + Linear: __webpack_require__(123), + MaxAdd: __webpack_require__(791), + MinSub: __webpack_require__(792), + Percent: __webpack_require__(793), + RadToDeg: __webpack_require__(181), + RandomXY: __webpack_require__(794), + RandomXYZ: __webpack_require__(795), + RandomXYZW: __webpack_require__(796), + Rotate: __webpack_require__(343), + RotateAround: __webpack_require__(284), + RotateAroundDistance: __webpack_require__(167), + RotateTo: __webpack_require__(797), + RoundAwayFromZero: __webpack_require__(344), + RoundTo: __webpack_require__(798), + SinCosTableGenerator: __webpack_require__(799), + SmootherStep: __webpack_require__(168), + SmoothStep: __webpack_require__(169), + ToXY: __webpack_require__(800), + TransformXY: __webpack_require__(164), + Within: __webpack_require__(801), + Wrap: __webpack_require__(59), // Vector classes Vector2: __webpack_require__(3), - Vector3: __webpack_require__(80), - Vector4: __webpack_require__(126), - Matrix3: __webpack_require__(337), - Matrix4: __webpack_require__(338), - Quaternion: __webpack_require__(339), - RotateVec3: __webpack_require__(784) + Vector3: __webpack_require__(81), + Vector4: __webpack_require__(128), + Matrix3: __webpack_require__(345), + Matrix4: __webpack_require__(346), + Quaternion: __webpack_require__(347), + RotateVec3: __webpack_require__(802) }; @@ -35076,7 +35596,7 @@ module.exports = PhaserMath; /***/ }), -/* 177 */ +/* 179 */ /***/ (function(module, exports) { /** @@ -35113,7 +35633,7 @@ module.exports = CatmullRom; /***/ }), -/* 178 */ +/* 180 */ /***/ (function(module, exports) { /** @@ -35142,7 +35662,7 @@ module.exports = Between; /***/ }), -/* 179 */ +/* 181 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35172,7 +35692,7 @@ module.exports = RadToDeg; /***/ }), -/* 180 */ +/* 182 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35183,7 +35703,7 @@ module.exports = RadToDeg; /** * @typedef {object} Phaser.Plugins.DefaultPlugins - * + * * @property {array} Global - These are the Global Managers that are created by the Phaser.Game instance. * @property {array} CoreScene - These are the core plugins that are installed into every Scene.Systems instance, no matter what. * @property {array} DefaultScene - These plugins are created in Scene.Systems in addition to the CoreScenePlugins. @@ -35194,8 +35714,8 @@ var DefaultPlugins = { /** * These are the Global Managers that are created by the Phaser.Game instance. * They are referenced from Scene.Systems so that plugins can use them. - * - * @name Phaser.Plugins.Global + * + * @name Phaser.Plugins.DefaultPlugins.Global * @type {array} * @since 3.0.0 */ @@ -35215,10 +35735,10 @@ var DefaultPlugins = { /** * These are the core plugins that are installed into every Scene.Systems instance, no matter what. * They are optionally exposed in the Scene as well (see the InjectionMap for details) - * + * * They are created in the order in which they appear in this array and EventEmitter is always first. - * - * @name Phaser.Plugins.CoreScene + * + * @name Phaser.Plugins.DefaultPlugins.CoreScene * @type {array} * @since 3.0.0 */ @@ -35237,16 +35757,16 @@ var DefaultPlugins = { /** * These plugins are created in Scene.Systems in addition to the CoreScenePlugins. - * + * * You can elect not to have these plugins by either creating a DefaultPlugins object as part * of the Game Config, by creating a Plugins object as part of a Scene Config, or by modifying this array * and building your own bundle. - * + * * They are optionally exposed in the Scene as well (see the InjectionMap for details) - * + * * They are always created in the order in which they appear in the array. - * - * @name Phaser.Plugins.DefaultScene + * + * @name Phaser.Plugins.DefaultPlugins.DefaultScene * @type {array} * @since 3.0.0 */ @@ -35273,7 +35793,7 @@ module.exports = DefaultPlugins; /***/ }), -/* 181 */ +/* 183 */ /***/ (function(module, exports) { /** @@ -35331,7 +35851,7 @@ module.exports = ProjectOrtho; /***/ }), -/* 182 */ +/* 184 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35417,7 +35937,7 @@ module.exports = FromPoints; /***/ }), -/* 183 */ +/* 185 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35428,10 +35948,10 @@ module.exports = FromPoints; var CONST = { - CENTER: __webpack_require__(359), - ORIENTATION: __webpack_require__(360), - SCALE_MODE: __webpack_require__(361), - ZOOM: __webpack_require__(362) + CENTER: __webpack_require__(369), + ORIENTATION: __webpack_require__(370), + SCALE_MODE: __webpack_require__(371), + ZOOM: __webpack_require__(372) }; @@ -35439,7 +35959,7 @@ module.exports = CONST; /***/ }), -/* 184 */ +/* 186 */ /***/ (function(module, exports) { /** @@ -35468,7 +35988,7 @@ module.exports = RemoveFromDOM; /***/ }), -/* 185 */ +/* 187 */ /***/ (function(module, exports) { /** @@ -35566,7 +36086,7 @@ module.exports = INPUT_CONST; /***/ }), -/* 186 */ +/* 188 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35576,13 +36096,13 @@ module.exports = INPUT_CONST; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(131); -var DefaultPlugins = __webpack_require__(180); -var Events = __webpack_require__(22); -var GetPhysicsPlugins = __webpack_require__(888); -var GetScenePlugins = __webpack_require__(889); +var CONST = __webpack_require__(132); +var DefaultPlugins = __webpack_require__(182); +var Events = __webpack_require__(20); +var GetPhysicsPlugins = __webpack_require__(385); +var GetScenePlugins = __webpack_require__(386); var NOOP = __webpack_require__(1); -var Settings = __webpack_require__(375); +var Settings = __webpack_require__(387); /** * @classdesc @@ -36340,7 +36860,7 @@ module.exports = Systems; /***/ }), -/* 187 */ +/* 189 */ /***/ (function(module, exports) { /** @@ -36377,7 +36897,7 @@ module.exports = UppercaseFirst; /***/ }), -/* 188 */ +/* 190 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36387,8 +36907,8 @@ module.exports = UppercaseFirst; */ var Class = __webpack_require__(0); -var Frame = __webpack_require__(95); -var TextureSource = __webpack_require__(378); +var Frame = __webpack_require__(96); +var TextureSource = __webpack_require__(390); var TEXTURE_MISSING_ERROR = 'Texture.frame missing: '; @@ -36897,7 +37417,69 @@ module.exports = Texture; /***/ }), -/* 189 */ +/* 191 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SafeRange = __webpack_require__(70); + +/** + * Returns all elements in the array. + * + * You can optionally specify a matching criteria using the `property` and `value` arguments. + * + * For example: `getAll('visible', true)` would return only elements that have their visible property set. + * + * Optionally you can specify a start and end index. For example if the array had 100 elements, + * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only + * the first 50 elements. + * + * @function Phaser.Utils.Array.GetAll + * @since 3.4.0 + * + * @param {array} array - The array to search. + * @param {string} [property] - The property to test on each array element. + * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check. + * @param {integer} [startIndex] - An optional start index to search from. + * @param {integer} [endIndex] - An optional end index to search to. + * + * @return {array} All matching elements from the array. + */ +var GetAll = function (array, property, value, startIndex, endIndex) +{ + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = array.length; } + + var output = []; + + if (SafeRange(array, startIndex, endIndex)) + { + for (var i = startIndex; i < endIndex; i++) + { + var child = array[i]; + + if (!property || + (property && value === undefined && child.hasOwnProperty(property)) || + (property && value !== undefined && child[property] === value)) + { + output.push(child); + } + } + } + + return output; +}; + +module.exports = GetAll; + + +/***/ }), +/* 192 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36912,45 +37494,46 @@ module.exports = Texture; module.exports = { - Matrix: __webpack_require__(924), + Matrix: __webpack_require__(938), - Add: __webpack_require__(931), - AddAt: __webpack_require__(932), - BringToTop: __webpack_require__(933), - CountAllMatching: __webpack_require__(934), - Each: __webpack_require__(935), - EachInRange: __webpack_require__(936), - FindClosestInSorted: __webpack_require__(274), - GetAll: __webpack_require__(382), - GetFirst: __webpack_require__(383), - GetRandom: __webpack_require__(191), - MoveDown: __webpack_require__(937), - MoveTo: __webpack_require__(938), - MoveUp: __webpack_require__(939), - NumberArray: __webpack_require__(940), - NumberArrayStep: __webpack_require__(941), - QuickSelect: __webpack_require__(391), - Range: __webpack_require__(392), - Remove: __webpack_require__(129), - RemoveAt: __webpack_require__(942), - RemoveBetween: __webpack_require__(943), - RemoveRandomElement: __webpack_require__(944), - Replace: __webpack_require__(945), - RotateLeft: __webpack_require__(290), - RotateRight: __webpack_require__(291), - SafeRange: __webpack_require__(68), - SendToBack: __webpack_require__(946), - SetAll: __webpack_require__(947), + Add: __webpack_require__(945), + AddAt: __webpack_require__(946), + BringToTop: __webpack_require__(947), + CountAllMatching: __webpack_require__(948), + Each: __webpack_require__(949), + EachInRange: __webpack_require__(950), + FindClosestInSorted: __webpack_require__(297), + GetAll: __webpack_require__(191), + GetFirst: __webpack_require__(394), + GetRandom: __webpack_require__(194), + MoveDown: __webpack_require__(951), + MoveTo: __webpack_require__(952), + MoveUp: __webpack_require__(953), + NumberArray: __webpack_require__(301), + NumberArrayStep: __webpack_require__(954), + QuickSelect: __webpack_require__(402), + Range: __webpack_require__(403), + Remove: __webpack_require__(95), + RemoveAt: __webpack_require__(955), + RemoveBetween: __webpack_require__(956), + RemoveRandomElement: __webpack_require__(957), + Replace: __webpack_require__(958), + RotateLeft: __webpack_require__(294), + RotateRight: __webpack_require__(295), + SafeRange: __webpack_require__(70), + SendToBack: __webpack_require__(959), + SetAll: __webpack_require__(960), Shuffle: __webpack_require__(119), - SpliceOne: __webpack_require__(81), - StableSort: __webpack_require__(137), - Swap: __webpack_require__(948) + SortByDigits: __webpack_require__(299), + SpliceOne: __webpack_require__(82), + StableSort: __webpack_require__(138), + Swap: __webpack_require__(961) }; /***/ }), -/* 190 */ +/* 193 */ /***/ (function(module, exports) { /** @@ -37011,7 +37594,7 @@ module.exports = CheckMatrix; /***/ }), -/* 191 */ +/* 194 */ /***/ (function(module, exports) { /** @@ -37046,7 +37629,7 @@ module.exports = GetRandom; /***/ }), -/* 192 */ +/* 195 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37056,8 +37639,8 @@ module.exports = GetRandom; */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(950); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(404); /** * @classdesc @@ -37139,6 +37722,15 @@ var ProcessQueue = new Class({ * @since 3.0.0 */ this._toProcess = 0; + + /** + * If `true` only unique objects will be allowed in the queue. + * + * @name Phaser.Structs.ProcessQueue#checkQueue + * @type {boolean} + * @since 3.50.0 + */ + this.checkQueue = false; }, /** @@ -37268,9 +37860,12 @@ var ProcessQueue = new Class({ { item = list[i]; - this._active.push(item); + if (!this.checkQueue || (this.checkQueue && active.indexOf(item) === -1)) + { + active.push(item); - this.emit(Events.PROCESS_QUEUE_ADD, item); + this.emit(Events.PROCESS_QUEUE_ADD, item); + } } list.length = 0; @@ -37278,7 +37873,7 @@ var ProcessQueue = new Class({ this._toProcess = 0; // The owner of this queue can now safely do whatever it needs to with the active list - return this._active; + return active; }, /** @@ -37337,7 +37932,7 @@ module.exports = ProcessQueue; /***/ }), -/* 193 */ +/* 196 */ /***/ (function(module, exports) { /** @@ -37498,7 +38093,7 @@ module.exports = ParseXMLBitmapFont; /***/ }), -/* 194 */ +/* 197 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37507,13 +38102,13 @@ module.exports = ParseXMLBitmapFont; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlitterRender = __webpack_require__(959); -var Bob = __webpack_require__(962); +var BlitterRender = __webpack_require__(971); +var Bob = __webpack_require__(406); var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var Frame = __webpack_require__(95); +var Components = __webpack_require__(11); +var Frame = __webpack_require__(96); var GameObject = __webpack_require__(14); -var List = __webpack_require__(135); +var List = __webpack_require__(136); /** * @callback CreateCallback @@ -37797,7 +38392,7 @@ module.exports = Blitter; /***/ }), -/* 195 */ +/* 198 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37807,15 +38402,16 @@ module.exports = Blitter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayUtils = __webpack_require__(189); -var BlendModes = __webpack_require__(53); +var ArrayUtils = __webpack_require__(192); +var BlendModes = __webpack_require__(54); var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var Events = __webpack_require__(91); +var Components = __webpack_require__(11); +var Events = __webpack_require__(29); var GameObject = __webpack_require__(14); +var GameObjectEvents = __webpack_require__(29); var Rectangle = __webpack_require__(9); -var Render = __webpack_require__(963); -var Union = __webpack_require__(394); +var Render = __webpack_require__(974); +var Union = __webpack_require__(407); var Vector2 = __webpack_require__(3); /** @@ -38254,6 +38850,12 @@ var Container = new Class({ gameObject.parentContainer = this; } + + // Is only on the Display List via this Container + if (!this.scene.sys.displayList.exists(gameObject)) + { + gameObject.emit(GameObjectEvents.ADDED_TO_SCENE, gameObject, this.scene); + } }, /** @@ -38273,6 +38875,12 @@ var Container = new Class({ { gameObject.parentContainer = null; } + + // Is only on the Display List via this Container + if (!this.scene.sys.displayList.exists(gameObject)) + { + gameObject.emit(GameObjectEvents.REMOVED_FROM_SCENE, gameObject, this.scene); + } }, /** @@ -38425,7 +39033,7 @@ var Container = new Class({ }; } - ArrayUtils.StableSort.inplace(this.list, handler); + ArrayUtils.StableSort(this.list, handler); return this; }, @@ -39149,7 +39757,7 @@ module.exports = Container; /***/ }), -/* 196 */ +/* 199 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -39158,17 +39766,17 @@ module.exports = Container; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(138); +var BitmapText = __webpack_require__(139); var Class = __webpack_require__(0); -var Render = __webpack_require__(968); +var Render = __webpack_require__(979); /** * @classdesc * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure. - * + * * During rendering for each letter of the text is rendered to the display, proportionally spaced out and aligned to * match the font structure. - * + * * Dynamic Bitmap Text objects are different from Static Bitmap Text in that they invoke a callback for each * letter being rendered during the render pass. This callback allows you to manipulate the properties of * each letter being rendered, such as its position, scale or tint, allowing you to create interesting effects @@ -39183,12 +39791,12 @@ var Render = __webpack_require__(968); * * To create a BitmapText data files you need a 3rd party app such as: * - * BMFont (Windows, free): http://www.angelcode.com/products/bmfont/ - * Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner - * Littera (Web-based, free): http://kvazars.com/littera/ + * BMFont (Windows, free): {@link http://www.angelcode.com/products/bmfont/|http://www.angelcode.com/products/bmfont/} + * Glyph Designer (OS X, commercial): {@link http://www.71squared.com/en/glyphdesigner|http://www.71squared.com/en/glyphdesigner} + * Littera (Web-based, free): {@link http://kvazars.com/littera/|http://kvazars.com/littera/} * * For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of - * converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson + * converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: {@link http://codebeautify.org/xmltojson|http://codebeautify.org/xmltojson} * * @class DynamicBitmapText * @extends Phaser.GameObjects.BitmapText @@ -39273,7 +39881,7 @@ var DynamicBitmapText = new Class({ * The data object that is populated during rendering, then passed to the displayCallback. * You should modify this object then return it back from the callback. It's updated values * will be used to render the specific glyph. - * + * * Please note that if you need a reference to this object locally in your game code then you * should shallow copy it, as it's updated and re-used for every glyph in the text. * @@ -39382,7 +39990,7 @@ module.exports = DynamicBitmapText; /***/ }), -/* 197 */ +/* 200 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -39393,24 +40001,24 @@ module.exports = DynamicBitmapText; var BaseCamera = __webpack_require__(92); var Class = __webpack_require__(0); -var Commands = __webpack_require__(198); -var ComponentsAlpha = __webpack_require__(273); -var ComponentsBlendMode = __webpack_require__(276); -var ComponentsDepth = __webpack_require__(277); -var ComponentsMask = __webpack_require__(281); -var ComponentsPipeline = __webpack_require__(161); -var ComponentsTransform = __webpack_require__(286); -var ComponentsVisible = __webpack_require__(287); -var ComponentsScrollFactor = __webpack_require__(284); +var Commands = __webpack_require__(201); +var ComponentsAlpha = __webpack_require__(279); +var ComponentsBlendMode = __webpack_require__(280); +var ComponentsDepth = __webpack_require__(281); +var ComponentsMask = __webpack_require__(285); +var ComponentsPipeline = __webpack_require__(163); +var ComponentsTransform = __webpack_require__(290); +var ComponentsVisible = __webpack_require__(291); +var ComponentsScrollFactor = __webpack_require__(288); -var TransformMatrix = __webpack_require__(30); +var TransformMatrix = __webpack_require__(31); -var Ellipse = __webpack_require__(96); +var Ellipse = __webpack_require__(97); var GameObject = __webpack_require__(14); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); var MATH_CONST = __webpack_require__(13); -var Render = __webpack_require__(974); +var Render = __webpack_require__(985); /** * @classdesc @@ -40936,7 +41544,7 @@ module.exports = Graphics; /***/ }), -/* 198 */ +/* 201 */ /***/ (function(module, exports) { /** @@ -40973,7 +41581,7 @@ module.exports = { /***/ }), -/* 199 */ +/* 202 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41015,7 +41623,7 @@ module.exports = CircumferencePoint; /***/ }), -/* 200 */ +/* 203 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41025,12 +41633,13 @@ module.exports = CircumferencePoint; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); +var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); -var GravityWell = __webpack_require__(402); -var List = __webpack_require__(135); -var ParticleEmitter = __webpack_require__(404); -var Render = __webpack_require__(984); +var GameObjectEvents = __webpack_require__(29); +var GravityWell = __webpack_require__(416); +var List = __webpack_require__(136); +var ParticleEmitter = __webpack_require__(418); +var Render = __webpack_require__(994); /** * @classdesc @@ -41167,6 +41776,21 @@ var ParticleEmitterManager = new Class({ this.createEmitter(emitters[i]); } } + + this.on(GameObjectEvents.ADDED_TO_SCENE, this.addedToScene, this); + this.on(GameObjectEvents.REMOVED_FROM_SCENE, this.removedFromScene, this); + }, + + // Overrides Game Object method + addedToScene: function () + { + this.scene.sys.updateList.add(this); + }, + + // Overrides Game Object method + removedFromScene: function () + { + this.scene.sys.updateList.remove(this); }, /** @@ -41504,7 +42128,7 @@ module.exports = ParticleEmitterManager; /***/ }), -/* 201 */ +/* 204 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41513,19 +42137,19 @@ module.exports = ParticleEmitterManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlendModes = __webpack_require__(53); +var BlendModes = __webpack_require__(54); var Camera = __webpack_require__(92); var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var CONST = __webpack_require__(33); -var Frame = __webpack_require__(95); +var Components = __webpack_require__(11); +var CONST = __webpack_require__(34); +var Frame = __webpack_require__(96); var GameObject = __webpack_require__(14); var NOOP = __webpack_require__(1); -var ProjectOrtho = __webpack_require__(181); -var Render = __webpack_require__(988); +var ProjectOrtho = __webpack_require__(183); +var Render = __webpack_require__(998); var Utils = __webpack_require__(10); -var UUID = __webpack_require__(202); +var UUID = __webpack_require__(205); /** * @classdesc @@ -42776,7 +43400,7 @@ module.exports = RenderTexture; /***/ }), -/* 202 */ +/* 205 */ /***/ (function(module, exports) { /** @@ -42811,7 +43435,7 @@ module.exports = UUID; /***/ }), -/* 203 */ +/* 206 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -42821,9 +43445,10 @@ module.exports = UUID; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); +var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); -var RopeRender = __webpack_require__(994); +var GameObjectEvents = __webpack_require__(29); +var RopeRender = __webpack_require__(1004); var Vector2 = __webpack_require__(3); /** @@ -42836,7 +43461,7 @@ var Vector2 = __webpack_require__(3); * Unlike a Sprite, it isn't restricted to using just a quad and can have as many vertices as you define * when creating it. The vertices can be arranged in a horizontal or vertical strip and have their own * color and alpha values as well. - * + * * A Ropes origin is always 0.5 x 0.5 and cannot be changed. * * @class Rope @@ -42908,15 +43533,15 @@ var Rope = new Class({ /** * An array containing the points data for this Rope. - * + * * Each point should be given as a Vector2Like object (i.e. a Vector2, Geom.Point or object with public x/y properties). - * + * * The point coordinates are given in local space, where 0 x 0 is the start of the Rope strip. - * + * * You can modify the contents of this array directly in real-time to create interesting effects. * If you do so, be sure to call `setDirty` _after_ modifying this array, so that the vertices data is * updated before the next render. Alternatively, you can use the `setPoints` method instead. - * + * * Should you need to change the _size_ of this array, then you should always use the `setPoints` method. * * @name Phaser.GameObjects.Rope#points @@ -42927,7 +43552,7 @@ var Rope = new Class({ /** * An array containing the vertices data for this Rope. - * + * * This data is calculated automatically in the `updateVertices` method, based on the points provided. * * @name Phaser.GameObjects.Rope#vertices @@ -42938,7 +43563,7 @@ var Rope = new Class({ /** * An array containing the uv data for this Rope. - * + * * This data is calculated automatically in the `setPoints` method, based on the points provided. * * @name Phaser.GameObjects.Rope#uv @@ -42949,10 +43574,10 @@ var Rope = new Class({ /** * An array containing the color data for this Rope. - * + * * Colors should be given as numeric RGB values, such as 0xff0000. * You should provide _two_ color values for every point in the Rope, one for the top and one for the bottom of each quad. - * + * * You can modify the contents of this array directly in real-time, however, should you need to change the _size_ * of the array, then you should use the `setColors` method instead. * @@ -42964,10 +43589,10 @@ var Rope = new Class({ /** * An array containing the alpha data for this Rope. - * + * * Alphas should be given as float values, such as 0.5. * You should provide _two_ alpha values for every point in the Rope, one for the top and one for the bottom of each quad. - * + * * You can modify the contents of this array directly in real-time, however, should you need to change the _size_ * of the array, then you should use the `setAlphas` method instead. * @@ -42979,11 +43604,11 @@ var Rope = new Class({ /** * The tint fill mode. - * + * * 0 = An additive tint (the default), where vertices colors are blended with the texture. * 1 = A fill tint, where the vertices colors replace the texture, but respects texture alpha. * 2 = A complete tint, where the vertices colors replace the texture, including alpha, entirely. - * + * * @name Phaser.GameObjects.Rope#tintFill * @type {integer} * @since 3.23.0 @@ -42993,7 +43618,7 @@ var Rope = new Class({ /** * If the Rope is marked as `dirty` it will automatically recalculate its vertices * the next time it renders. You can also force this by calling `updateVertices`. - * + * * @name Phaser.GameObjects.Rope#dirty * @type {boolean} * @since 3.23.0 @@ -43002,10 +43627,10 @@ var Rope = new Class({ /** * Are the Rope vertices aligned horizontally, in a strip, or vertically, in a column? - * + * * This property is set during instantiation and cannot be changed directly. * See the `setVertical` and `setHorizontal` methods. - * + * * @name Phaser.GameObjects.Rope#horizontal * @type {boolean} * @readonly @@ -43015,11 +43640,11 @@ var Rope = new Class({ /** * The horizontally flipped state of the Game Object. - * + * * A Game Object that is flipped horizontally will render inversed on the horizontal axis. * Flipping always takes place from the middle of the texture and does not impact the scale value. * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - * + * * @name Phaser.GameObjects.Rope#_flipX * @type {boolean} * @default false @@ -43030,11 +43655,11 @@ var Rope = new Class({ /** * The vertically flipped state of the Game Object. - * + * * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) * Flipping always takes place from the middle of the texture and does not impact the scale value. * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - * + * * @name Phaser.GameObjects.Rope#flipY * @type {boolean} * @default false @@ -43045,7 +43670,7 @@ var Rope = new Class({ /** * Internal Vector2 used for vertices updates. - * + * * @name Phaser.GameObjects.Rope#_perp * @type {Phaser.Math.Vector2} * @private @@ -43055,21 +43680,21 @@ var Rope = new Class({ /** * You can optionally choose to render the vertices of this Rope to a Graphics instance. - * + * * Achieve this by setting the `debugCallback` and the `debugGraphic` properties. - * + * * You can do this in a single call via the `Rope.setDebug` method, which will use the * built-in debug function. You can also set it to your own callback. The callback * will be invoked _once per render_ and sent the following parameters: - * + * * `debugCallback(src, meshLength, verts)` - * + * * `src` is the Rope instance being debugged. * `meshLength` is the number of mesh vertices in total. * `verts` is an array of the translated vertex coordinates. - * + * * To disable rendering, set this property back to `null`. - * + * * @name Phaser.GameObjects.Rope#debugCallback * @type {function} * @since 3.23.0 @@ -43079,7 +43704,7 @@ var Rope = new Class({ /** * The Graphics instance that the debug vertices will be drawn to, if `setDebug` has * been called. - * + * * @name Phaser.GameObjects.Rope#debugGraphic * @type {Phaser.GameObjects.Graphics} * @since 3.23.0 @@ -43089,7 +43714,7 @@ var Rope = new Class({ this.setTexture(texture, frame); this.setPosition(x, y); this.setSizeToFrame(); - this.initPipeline('TextureTintStripPipeline'); + this.initPipeline('RopePipeline'); if (Array.isArray(points)) { @@ -43099,6 +43724,21 @@ var Rope = new Class({ this.setPoints(points, colors, alphas); this.updateVertices(); + + this.on(GameObjectEvents.ADDED_TO_SCENE, this.addedToScene, this); + this.on(GameObjectEvents.REMOVED_FROM_SCENE, this.removedFromScene, this); + }, + + // Overrides Game Object method + addedToScene: function () + { + this.scene.sys.updateList.add(this); + }, + + // Overrides Game Object method + removedFromScene: function () + { + this.scene.sys.updateList.remove(this); }, /** @@ -43147,10 +43787,10 @@ var Rope = new Class({ * Flags this Rope as being dirty. A dirty rope will recalculate all of its vertices data * the _next_ time it renders. You should set this rope as dirty if you update the points * array directly. - * + * * @method Phaser.GameObjects.Rope#setDirty * @since 3.23.0 - * + * * @return {this} This Game Object instance. */ setDirty: function () @@ -43162,17 +43802,17 @@ var Rope = new Class({ /** * Sets the alignment of the points in this Rope to be horizontal, in a strip format. - * + * * Calling this method will reset this Rope. The current points, vertices, colors and alpha * values will be reset to thoes values given as parameters. - * + * * @method Phaser.GameObjects.Rope#setHorizontal * @since 3.23.0 - * + * * @param {(integer|Phaser.Types.Math.Vector2Like[])} [points] - An array containing the vertices data for this Rope, or a number that indicates how many segments to split the texture frame into. If none is provided the current points length is used. * @param {(number|number[])} [colors] - Either a single color value, or an array of values. * @param {(number|number[])} [alphas] - Either a single alpha value, or an array of values. - * + * * @return {this} This Game Object instance. */ setHorizontal: function (points, colors, alphas) @@ -43191,17 +43831,17 @@ var Rope = new Class({ /** * Sets the alignment of the points in this Rope to be vertical, in a column format. - * + * * Calling this method will reset this Rope. The current points, vertices, colors and alpha * values will be reset to thoes values given as parameters. - * + * * @method Phaser.GameObjects.Rope#setVertical * @since 3.23.0 - * + * * @param {(integer|Phaser.Types.Math.Vector2Like[])} [points] - An array containing the vertices data for this Rope, or a number that indicates how many segments to split the texture frame into. If none is provided the current points length is used. * @param {(number|number[])} [colors] - Either a single color value, or an array of values. * @param {(number|number[])} [alphas] - Either a single alpha value, or an array of values. - * + * * @return {this} This Game Object instance. */ setVertical: function (points, colors, alphas) @@ -43220,16 +43860,16 @@ var Rope = new Class({ /** * Sets the tint fill mode. - * + * * Mode 0 is an additive tint, the default, which blends the vertices colors with the texture. * This mode respects the texture alpha. - * + * * Mode 1 is a fill tint. Unlike an additive tint, a fill-tint literally replaces the pixel colors * from the texture with those in the tint. You can use this for effects such as making a player flash 'white' * if hit by something. This mode respects the texture alpha. - * + * * Mode 2 is a complete tint. The texture colors and alpha are replaced entirely by the vertices colors. - * + * * See the `setColors` method for details of how to color each of the vertices. * * @method Phaser.GameObjects.Rope#setTintFill @@ -43237,7 +43877,7 @@ var Rope = new Class({ * @since 3.23.0 * * @param {integer} [value=0] - Set to 0 for an Additive tint, 1 for a fill tint with alpha, or 2 for a fill tint without alpha. - * + * * @return {this} This Game Object instance. */ setTintFill: function (value) @@ -43251,28 +43891,28 @@ var Rope = new Class({ /** * Set the alpha values used by the Rope during rendering. - * + * * You can provide the values in a number of ways: - * + * * 1) One single numeric value: `setAlphas(0.5)` - This will set a single alpha for the whole Rope. * 2) Two numeric value: `setAlphas(1, 0.5)` - This will set a 'top' and 'bottom' alpha value across the whole Rope. * 3) An array of values: `setAlphas([ 1, 0.5, 0.2 ])` - * + * * If you provide an array of values and the array has exactly the same number of values as `points` in the Rope, it * will use each alpha value per rope segment. - * + * * If the provided array has a different number of values than `points` then it will use the values in order, from * the first Rope segment and on, until it runs out of values. This allows you to control the alpha values at all * vertices in the Rope. - * + * * Note this method is called `setAlphas` (plural) and not `setAlpha`. - * + * * @method Phaser.GameObjects.Rope#setAlphas * @since 3.23.0 - * + * * @param {(number|number[])} [alphas] - Either a single alpha value, or an array of values. If nothing is provided alpha is reset to 1. * @param {number} [bottomAlpha] - An optional bottom alpha value. See the method description for details. - * + * * @return {this} This Game Object instance. */ setAlphas: function (alphas, bottomAlpha) @@ -43327,7 +43967,7 @@ var Rope = new Class({ for (i = 0; i < total; i++) { index = i * 2; - + if (alphas.length > index) { prevAlpha = alphas[index]; @@ -43350,26 +43990,26 @@ var Rope = new Class({ /** * Set the color values used by the Rope during rendering. - * + * * Colors are used to control the level of tint applied across the Rope texture. - * + * * You can provide the values in a number of ways: - * + * * * One single numeric value: `setColors(0xff0000)` - This will set a single color tint for the whole Rope. * * An array of values: `setColors([ 0xff0000, 0x00ff00, 0x0000ff ])` - * + * * If you provide an array of values and the array has exactly the same number of values as `points` in the Rope, it * will use each color per rope segment. - * + * * If the provided array has a different number of values than `points` then it will use the values in order, from * the first Rope segment and on, until it runs out of values. This allows you to control the color values at all * vertices in the Rope. - * + * * @method Phaser.GameObjects.Rope#setColors * @since 3.23.0 - * + * * @param {(number|number[])} [colors] - Either a single color value, or an array of values. If nothing is provided color is reset to 0xffffff. - * + * * @return {this} This Game Object instance. */ setColors: function (colors) @@ -43413,7 +44053,7 @@ var Rope = new Class({ for (i = 0; i < total; i++) { index = i * 2; - + if (colors.length > index) { prevColor = colors[index]; @@ -43435,16 +44075,16 @@ var Rope = new Class({ /** * Sets the points used by this Rope. - * + * * The points should be provided as an array of Vector2, or vector2-like objects (i.e. those with public x/y properties). - * + * * Each point corresponds to one segment of the Rope. The more points in the array, the more segments the rope has. - * + * * Point coordinates are given in local-space, not world-space, and are directly related to the size of the texture * this Rope object is using. - * + * * For example, a Rope using a 512 px wide texture, split into 4 segments (128px each) would use the following points: - * + * * ```javascript * rope.setPoints([ * { x: 0, y: 0 }, @@ -43453,25 +44093,25 @@ var Rope = new Class({ * { x: 384, y: 0 } * ]); * ``` - * + * * Or, you can provide an integer to do the same thing: - * + * * ```javascript * rope.setPoints(4); * ``` - * + * * Which will divide the Rope into 4 equally sized segments based on the frame width. - * + * * Note that calling this method with a different number of points than the Rope has currently will * _reset_ the color and alpha values, unless you provide them as arguments to this method. - * + * * @method Phaser.GameObjects.Rope#setPoints * @since 3.23.0 - * + * * @param {(integer|Phaser.Types.Math.Vector2Like[])} [points=2] - An array containing the vertices data for this Rope, or a number that indicates how many segments to split the texture frame into. If none is provided a simple quad is created. * @param {(number|number[])} [colors] - Either a single color value, or an array of values. * @param {(number|number[])} [alphas] - Either a single alpha value, or an array of values. - * + * * @return {this} This Game Object instance. */ setPoints: function (points, colors, alphas) @@ -43493,7 +44133,7 @@ var Rope = new Class({ var s; var frameSegment; var offset; - + if (this.horizontal) { offset = -(this.frame.halfWidth); @@ -43555,10 +44195,10 @@ var Rope = new Class({ /** * Updates all of the UVs based on the Rope.points and `flipX` and `flipY` settings. - * + * * @method Phaser.GameObjects.Rope#updateUVs * @since 3.23.0 - * + * * @return {this} This Game Object instance. */ updateUVs: function () @@ -43573,7 +44213,7 @@ var Rope = new Class({ var partH = (u1 - u0) / (total - 1); var partV = (v1 - v0) / (total - 1); - + for (var i = 0; i < total; i++) { var index = i * 4; @@ -43644,12 +44284,12 @@ var Rope = new Class({ /** * Resizes all of the internal arrays: `vertices`, `uv`, `colors` and `alphas` to the new * given Rope segment total. - * + * * @method Phaser.GameObjects.Rope#resizeArrays * @since 3.23.0 - * + * * @param {integer} newSize - The amount of segments to split the Rope in to. - * + * * @return {this} This Game Object instance. */ resizeArrays: function (newSize) @@ -43680,14 +44320,14 @@ var Rope = new Class({ /** * Updates the vertices based on the Rope points. - * + * * This method is called automatically during rendering if `Rope.dirty` is `true`, which is set * by the `setPoints` and `setDirty` methods. You should flag the Rope as being dirty if you modify * the Rope points directly. - * + * * @method Phaser.GameObjects.Rope#updateVertices * @since 3.23.0 - * + * * @return {this} This Game Object instance. */ updateVertices: function () @@ -43709,12 +44349,12 @@ var Rope = new Class({ var lastPoint = points[0]; var frameSize = (this.horizontal) ? this.frame.halfHeight : this.frame.halfWidth; - + for (var i = 0; i < total; i++) { var point = points[i]; var index = i * 4; - + if (i < total - 1) { nextPoint = points[i + 1]; @@ -43726,12 +44366,12 @@ var Rope = new Class({ perp.x = nextPoint.y - lastPoint.y; perp.y = -(nextPoint.x - lastPoint.x); - + var perpLength = perp.length(); perp.x /= perpLength; perp.y /= perpLength; - + perp.x *= frameSize; perp.y *= frameSize; @@ -43739,7 +44379,7 @@ var Rope = new Class({ vertices[index + 1] = point.y + perp.y; vertices[index + 2] = point.x - perp.x; vertices[index + 3] = point.y - perp.y; - + lastPoint = point; } @@ -43748,33 +44388,33 @@ var Rope = new Class({ /** * This method enables rendering of the Rope vertices to the given Graphics instance. - * + * * If you enable this feature, you must call `Graphics.clear()` in your Scene `update`, * otherwise the Graphics instance will fill-in with draw calls. This is not done automatically * to allow for you to debug render multiple Rope objects to a single Graphics instance. - * + * * The Rope class has a built-in debug rendering callback `Rope.renderDebugVerts`, however * you can also provide your own callback to be used instead. Do this by setting the `callback` parameter. - * + * * The callback is invoked _once per render_ and sent the following parameters: - * + * * `callback(src, meshLength, verts)` - * + * * `src` is the Rope instance being debugged. * `meshLength` is the number of mesh vertices in total. * `verts` is an array of the translated vertex coordinates. - * + * * If using your own callback you do not have to provide a Graphics instance to this method. - * + * * To disable debug rendering, to either your own callback or the built-in one, call this method * with no arguments. - * + * * @method Phaser.GameObjects.Rope#setDebug * @since 3.23.0 - * + * * @param {Phaser.GameObjects.Graphics} [graphic] - The Graphic instance to render to if using the built-in callback. * @param {function} [callback] - The callback to invoke during debug render. Leave as undefined to use the built-in callback. - * + * * @return {this} This Game Object instance. */ setDebug: function (graphic, callback) @@ -43799,12 +44439,12 @@ var Rope = new Class({ /** * The built-in Rope vertices debug rendering method. - * + * * See `Rope.setDebug` for more details. * * @method Phaser.GameObjects.Rope#renderDebugVerts * @since 3.23.0 - * + * * @param {Phaser.GameObjects.Rope} src - The Rope object being rendered. * @param {integer} meshLength - The number of vertices in the mesh. * @param {number[]} verts - An array of translated vertex coordinates. @@ -43864,11 +44504,11 @@ var Rope = new Class({ /** * The horizontally flipped state of the Game Object. - * + * * A Game Object that is flipped horizontally will render inversed on the horizontal axis. * Flipping always takes place from the middle of the texture and does not impact the scale value. * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - * + * * @name Phaser.GameObjects.Rope#flipX * @type {boolean} * @default false @@ -43892,11 +44532,11 @@ var Rope = new Class({ /** * The vertically flipped state of the Game Object. - * + * * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) * Flipping always takes place from the middle of the texture and does not impact the scale value. * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - * + * * @name Phaser.GameObjects.Rope#flipY * @type {boolean} * @default false @@ -43924,7 +44564,7 @@ module.exports = Rope; /***/ }), -/* 204 */ +/* 207 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -43933,17 +44573,17 @@ module.exports = Rope; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(128); +var AddToDOM = __webpack_require__(130); var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var GameEvents = __webpack_require__(20); +var Components = __webpack_require__(11); +var GameEvents = __webpack_require__(21); var GameObject = __webpack_require__(14); -var GetTextSize = __webpack_require__(997); +var GetTextSize = __webpack_require__(424); var GetValue = __webpack_require__(6); -var RemoveFromDOM = __webpack_require__(184); -var TextRender = __webpack_require__(998); -var TextStyle = __webpack_require__(1001); +var RemoveFromDOM = __webpack_require__(186); +var TextRender = __webpack_require__(1007); +var TextStyle = __webpack_require__(425); /** * @classdesc @@ -45336,7 +45976,7 @@ module.exports = Text; /***/ }), -/* 205 */ +/* 208 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45347,12 +45987,12 @@ module.exports = Text; var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var GameEvents = __webpack_require__(20); +var Components = __webpack_require__(11); +var GameEvents = __webpack_require__(21); var GameObject = __webpack_require__(14); -var GetPowerOfTwo = __webpack_require__(333); -var Smoothing = __webpack_require__(173); -var TileSpriteRender = __webpack_require__(1003); +var GetPowerOfTwo = __webpack_require__(341); +var Smoothing = __webpack_require__(175); +var TileSpriteRender = __webpack_require__(1010); var Vector2 = __webpack_require__(3); // bitmask flag for GameObject.renderMask @@ -45988,7 +46628,7 @@ module.exports = TileSprite; /***/ }), -/* 206 */ +/* 209 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45999,13 +46639,13 @@ module.exports = TileSprite; var Class = __webpack_require__(0); var Clamp = __webpack_require__(17); -var Components = __webpack_require__(12); -var Events = __webpack_require__(91); -var GameEvents = __webpack_require__(20); +var Components = __webpack_require__(11); +var Events = __webpack_require__(29); +var GameEvents = __webpack_require__(21); var GameObject = __webpack_require__(14); -var SoundEvents = __webpack_require__(59); -var UUID = __webpack_require__(202); -var VideoRender = __webpack_require__(1006); +var SoundEvents = __webpack_require__(61); +var UUID = __webpack_require__(205); +var VideoRender = __webpack_require__(1013); var MATH_CONST = __webpack_require__(13); /** @@ -47757,7 +48397,7 @@ module.exports = Video; /***/ }), -/* 207 */ +/* 210 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -47767,9 +48407,9 @@ module.exports = Video; */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(208); -var GetPoints = __webpack_require__(419); -var GEOM_CONST = __webpack_require__(48); +var Contains = __webpack_require__(211); +var GetPoints = __webpack_require__(436); +var GEOM_CONST = __webpack_require__(49); /** * @classdesc @@ -47991,7 +48631,7 @@ module.exports = Polygon; /***/ }), -/* 208 */ +/* 211 */ /***/ (function(module, exports) { /** @@ -48040,7 +48680,7 @@ module.exports = Contains; /***/ }), -/* 209 */ +/* 212 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -48050,7 +48690,7 @@ module.exports = Contains; */ var Class = __webpack_require__(0); -var Mesh = __webpack_require__(140); +var Mesh = __webpack_require__(141); /** * @classdesc @@ -48701,7 +49341,7 @@ module.exports = Quad; /***/ }), -/* 210 */ +/* 213 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -48711,13 +49351,13 @@ module.exports = Quad; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); +var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); var GetFastValue = __webpack_require__(2); var Extend = __webpack_require__(19); -var SetValue = __webpack_require__(427); -var ShaderRender = __webpack_require__(1089); -var TransformMatrix = __webpack_require__(30); +var SetValue = __webpack_require__(444); +var ShaderRender = __webpack_require__(1096); +var TransformMatrix = __webpack_require__(31); /** * @classdesc @@ -49924,7 +50564,7 @@ module.exports = Shader; /***/ }), -/* 211 */ +/* 214 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -49933,7 +50573,7 @@ module.exports = Shader; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DistanceBetween = __webpack_require__(54); +var DistanceBetween = __webpack_require__(55); /** * Checks if two Circles intersect. @@ -49955,7 +50595,7 @@ module.exports = CircleToCircle; /***/ }), -/* 212 */ +/* 215 */ /***/ (function(module, exports) { /** @@ -50009,7 +50649,7 @@ module.exports = CircleToRectangle; /***/ }), -/* 213 */ +/* 216 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50020,7 +50660,7 @@ module.exports = CircleToRectangle; */ var Point = __webpack_require__(4); -var LineToCircle = __webpack_require__(214); +var LineToCircle = __webpack_require__(217); /** * Checks for intersection between the line segment and circle, @@ -50101,7 +50741,7 @@ module.exports = GetLineToCircle; /***/ }), -/* 214 */ +/* 217 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50110,7 +50750,7 @@ module.exports = GetLineToCircle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(56); +var Contains = __webpack_require__(57); var Point = __webpack_require__(4); var tmp = new Point(); @@ -50185,7 +50825,7 @@ module.exports = LineToCircle; /***/ }), -/* 215 */ +/* 218 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50196,8 +50836,8 @@ module.exports = LineToCircle; */ var Point = __webpack_require__(4); -var LineToLine = __webpack_require__(85); -var LineToRectangle = __webpack_require__(435); +var LineToLine = __webpack_require__(86); +var LineToRectangle = __webpack_require__(452); /** * Checks for intersection between the Line and a Rectangle shape, @@ -50245,7 +50885,7 @@ module.exports = GetLineToRectangle; /***/ }), -/* 216 */ +/* 219 */ /***/ (function(module, exports) { /** @@ -50332,7 +50972,7 @@ module.exports = ContainsArray; /***/ }), -/* 217 */ +/* 220 */ /***/ (function(module, exports) { /** @@ -50380,7 +51020,7 @@ module.exports = RotateAroundXY; /***/ }), -/* 218 */ +/* 221 */ /***/ (function(module, exports) { /** @@ -50408,7 +51048,7 @@ module.exports = GetAspectRatio; /***/ }), -/* 219 */ +/* 222 */ /***/ (function(module, exports) { /** @@ -50462,7 +51102,7 @@ module.exports = RotateAroundXY; /***/ }), -/* 220 */ +/* 223 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50477,18 +51117,18 @@ module.exports = RotateAroundXY; module.exports = { - BUTTON_DOWN: __webpack_require__(1215), - BUTTON_UP: __webpack_require__(1216), - CONNECTED: __webpack_require__(1217), - DISCONNECTED: __webpack_require__(1218), - GAMEPAD_BUTTON_DOWN: __webpack_require__(1219), - GAMEPAD_BUTTON_UP: __webpack_require__(1220) + BUTTON_DOWN: __webpack_require__(1222), + BUTTON_UP: __webpack_require__(1223), + CONNECTED: __webpack_require__(1224), + DISCONNECTED: __webpack_require__(1225), + GAMEPAD_BUTTON_DOWN: __webpack_require__(1226), + GAMEPAD_BUTTON_UP: __webpack_require__(1227) }; /***/ }), -/* 221 */ +/* 224 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50498,7 +51138,7 @@ module.exports = { */ var Extend = __webpack_require__(19); -var XHRSettings = __webpack_require__(145); +var XHRSettings = __webpack_require__(146); /** * Takes two XHRSettings Objects and creates a new XHRSettings object from them. @@ -50536,7 +51176,7 @@ module.exports = MergeXHRSettings; /***/ }), -/* 222 */ +/* 225 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50547,11 +51187,11 @@ module.exports = MergeXHRSettings; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var File = __webpack_require__(21); +var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); -var ParseXML = __webpack_require__(364); +var ParseXML = __webpack_require__(374); /** * @classdesc @@ -50721,7 +51361,7 @@ module.exports = XMLFile; /***/ }), -/* 223 */ +/* 226 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50736,24 +51376,111 @@ module.exports = XMLFile; module.exports = { - Acceleration: __webpack_require__(1275), - Angular: __webpack_require__(1276), - Bounce: __webpack_require__(1277), - Debug: __webpack_require__(1278), - Drag: __webpack_require__(1279), - Enable: __webpack_require__(1280), - Friction: __webpack_require__(1281), - Gravity: __webpack_require__(1282), - Immovable: __webpack_require__(1283), - Mass: __webpack_require__(1284), - Size: __webpack_require__(1285), - Velocity: __webpack_require__(1286) + Acceleration: __webpack_require__(1281), + Angular: __webpack_require__(1282), + Bounce: __webpack_require__(1283), + Debug: __webpack_require__(1284), + Drag: __webpack_require__(1285), + Enable: __webpack_require__(1286), + Friction: __webpack_require__(1287), + Gravity: __webpack_require__(1288), + Immovable: __webpack_require__(1289), + Mass: __webpack_require__(1290), + OverlapCirc: __webpack_require__(483), + OverlapRect: __webpack_require__(227), + Size: __webpack_require__(1291), + Velocity: __webpack_require__(1292) }; /***/ }), -/* 224 */ +/* 227 */ +/***/ (function(module, exports) { + +/** + * This method will search the given rectangular area and return an array of all physics bodies that + * overlap with it. It can return either Dynamic, Static bodies or a mixture of both. + * + * A body only has to intersect with the search area to be considered, it doesn't have to be fully + * contained within it. + * + * If Arcade Physics is set to use the RTree (which it is by default) then the search for is extremely fast, + * otherwise the search is O(N) for Dynamic Bodies. + * + * @function Phaser.Physics.Arcade.Components.OverlapRect + * @since 3.17.0 + * + * @param {number} x - The top-left x coordinate of the area to search within. + * @param {number} y - The top-left y coordinate of the area to search within. + * @param {number} width - The width of the area to search within. + * @param {number} height - The height of the area to search within. + * @param {boolean} [includeDynamic=true] - Should the search include Dynamic Bodies? + * @param {boolean} [includeStatic=false] - Should the search include Static Bodies? + * + * @return {(Phaser.Physics.Arcade.Body[]|Phaser.Physics.Arcade.StaticBody[])} An array of bodies that overlap with the given area. + */ +var OverlapRect = function (world, x, y, width, height, includeDynamic, includeStatic) +{ + if (includeDynamic === undefined) { includeDynamic = true; } + if (includeStatic === undefined) { includeStatic = false; } + + var dynamicBodies = []; + var staticBodies = []; + + var minMax = world.treeMinMax; + + minMax.minX = x; + minMax.minY = y; + minMax.maxX = x + width; + minMax.maxY = y + height; + + if (includeStatic) + { + staticBodies = world.staticTree.search(minMax); + } + + if (includeDynamic && world.useTree) + { + dynamicBodies = world.tree.search(minMax); + } + else if (includeDynamic) + { + var bodies = world.bodies; + + var fakeBody = + { + position: { + x: x, + y: y + }, + left: x, + top: y, + right: x + width, + bottom: y + height, + isCircle: false + }; + + var intersects = world.intersects; + + bodies.iterate(function (target) + { + if (intersects(target, fakeBody)) + { + dynamicBodies.push(target); + } + + }); + } + + return staticBodies.concat(dynamicBodies); +}; + +module.exports = OverlapRect; + + +/***/ }), +/* 228 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50768,21 +51495,20 @@ module.exports = { module.exports = { - COLLIDE: __webpack_require__(1288), - OVERLAP: __webpack_require__(1289), - PAUSE: __webpack_require__(1290), - RESUME: __webpack_require__(1291), - TILE_COLLIDE: __webpack_require__(1292), - TILE_OVERLAP: __webpack_require__(1293), - WORLD_BOUNDS: __webpack_require__(1294), - WORLD_STEP: __webpack_require__(1295) + COLLIDE: __webpack_require__(1293), + OVERLAP: __webpack_require__(1294), + PAUSE: __webpack_require__(1295), + RESUME: __webpack_require__(1296), + TILE_COLLIDE: __webpack_require__(1297), + TILE_OVERLAP: __webpack_require__(1298), + WORLD_BOUNDS: __webpack_require__(1299), + WORLD_STEP: __webpack_require__(1300) }; /***/ }), -/* 225 */, -/* 226 */ +/* 229 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50791,7 +51517,260 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(148); +var CONST = __webpack_require__(52); + +/** + * Calculates and returns the horizontal overlap between two arcade physics bodies and sets their properties + * accordingly, including: `touching.left`, `touching.right`, `touching.none` and `overlapX'. + * + * @function Phaser.Physics.Arcade.GetOverlapX + * @since 3.0.0 + * + * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to separate. + * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to separate. + * @param {boolean} overlapOnly - Is this an overlap only check, or part of separation? + * @param {number} bias - A value added to the delta values during collision checks. Increase it to prevent sprite tunneling(sprites passing through another instead of colliding). + * + * @return {number} The amount of overlap. + */ +var GetOverlapX = function (body1, body2, overlapOnly, bias) +{ + var overlap = 0; + var maxOverlap = body1.deltaAbsX() + body2.deltaAbsX() + bias; + + if (body1._dx === 0 && body2._dx === 0) + { + // They overlap but neither of them are moving + body1.embedded = true; + body2.embedded = true; + } + else if (body1._dx > body2._dx) + { + // Body1 is moving right and / or Body2 is moving left + overlap = body1.right - body2.x; + + if ((overlap > maxOverlap && !overlapOnly) || body1.checkCollision.right === false || body2.checkCollision.left === false) + { + overlap = 0; + } + else + { + body1.touching.none = false; + body1.touching.right = true; + + body2.touching.none = false; + body2.touching.left = true; + + if (body2.physicsType === CONST.STATIC_BODY) + { + body1.blocked.none = false; + body1.blocked.right = true; + } + + if (body1.physicsType === CONST.STATIC_BODY) + { + body2.blocked.none = false; + body2.blocked.left = true; + } + } + } + else if (body1._dx < body2._dx) + { + // Body1 is moving left and/or Body2 is moving right + overlap = body1.x - body2.width - body2.x; + + if ((-overlap > maxOverlap && !overlapOnly) || body1.checkCollision.left === false || body2.checkCollision.right === false) + { + overlap = 0; + } + else + { + body1.touching.none = false; + body1.touching.left = true; + + body2.touching.none = false; + body2.touching.right = true; + + if (body2.physicsType === CONST.STATIC_BODY) + { + body1.blocked.none = false; + body1.blocked.left = true; + } + + if (body1.physicsType === CONST.STATIC_BODY) + { + body2.blocked.none = false; + body2.blocked.right = true; + } + } + } + + // Resets the overlapX to zero if there is no overlap, or to the actual pixel value if there is + body1.overlapX = overlap; + body2.overlapX = overlap; + + return overlap; +}; + +module.exports = GetOverlapX; + + +/***/ }), +/* 230 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(52); + +/** + * Calculates and returns the vertical overlap between two arcade physics bodies and sets their properties + * accordingly, including: `touching.up`, `touching.down`, `touching.none` and `overlapY'. + * + * @function Phaser.Physics.Arcade.GetOverlapY + * @since 3.0.0 + * + * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to separate. + * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to separate. + * @param {boolean} overlapOnly - Is this an overlap only check, or part of separation? + * @param {number} bias - A value added to the delta values during collision checks. Increase it to prevent sprite tunneling(sprites passing through another instead of colliding). + * + * @return {number} The amount of overlap. + */ +var GetOverlapY = function (body1, body2, overlapOnly, bias) +{ + var overlap = 0; + var maxOverlap = body1.deltaAbsY() + body2.deltaAbsY() + bias; + + if (body1._dy === 0 && body2._dy === 0) + { + // They overlap but neither of them are moving + body1.embedded = true; + body2.embedded = true; + } + else if (body1._dy > body2._dy) + { + // Body1 is moving down and/or Body2 is moving up + overlap = body1.bottom - body2.y; + + if ((overlap > maxOverlap && !overlapOnly) || body1.checkCollision.down === false || body2.checkCollision.up === false) + { + overlap = 0; + } + else + { + body1.touching.none = false; + body1.touching.down = true; + + body2.touching.none = false; + body2.touching.up = true; + + if (body2.physicsType === CONST.STATIC_BODY) + { + body1.blocked.none = false; + body1.blocked.down = true; + } + + if (body1.physicsType === CONST.STATIC_BODY) + { + body2.blocked.none = false; + body2.blocked.up = true; + } + } + } + else if (body1._dy < body2._dy) + { + // Body1 is moving up and/or Body2 is moving down + overlap = body1.y - body2.bottom; + + if ((-overlap > maxOverlap && !overlapOnly) || body1.checkCollision.up === false || body2.checkCollision.down === false) + { + overlap = 0; + } + else + { + body1.touching.none = false; + body1.touching.up = true; + + body2.touching.none = false; + body2.touching.down = true; + + if (body2.physicsType === CONST.STATIC_BODY) + { + body1.blocked.none = false; + body1.blocked.up = true; + } + + if (body1.physicsType === CONST.STATIC_BODY) + { + body2.blocked.none = false; + body2.blocked.down = true; + } + } + } + + // Resets the overlapY to zero if there is no overlap, or to the actual pixel value if there is + body1.overlapY = overlap; + body2.overlapY = overlap; + + return overlap; +}; + +module.exports = GetOverlapY; + + +/***/ }), +/* 231 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Checks for intersection between the given tile rectangle-like object and an Arcade Physics body. + * + * @function Phaser.Physics.Arcade.Tilemap.TileIntersectsBody + * @since 3.0.0 + * + * @param {{ left: number, right: number, top: number, bottom: number }} tileWorldRect - A rectangle object that defines the tile placement in the world. + * @param {Phaser.Physics.Arcade.Body} body - The body to check for intersection against. + * + * @return {boolean} Returns `true` of the tile intersects with the body, otherwise `false`. + */ +var TileIntersectsBody = function (tileWorldRect, body) +{ + // Currently, all bodies are treated as rectangles when colliding with a Tile. + + return !( + body.right <= tileWorldRect.left || + body.bottom <= tileWorldRect.top || + body.position.x >= tileWorldRect.right || + body.position.y >= tileWorldRect.bottom + ); +}; + +module.exports = TileIntersectsBody; + + +/***/ }), +/* 232 */, +/* 233 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetTileAt = __webpack_require__(149); /** * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting @@ -50799,9 +51778,8 @@ var GetTileAt = __webpack_require__(148); * internally to optimize recalculating faces when only one tile has been changed. * * @function Phaser.Tilemaps.Components.CalculateFacesAt - * @private * @since 3.0.0 - * + * * @param {integer} tileX - The x coordinate. * @param {integer} tileY - The y coordinate. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. @@ -50827,29 +51805,48 @@ var CalculateFacesAt = function (tileX, tileY, layer) // Reset edges that are shared between tile and its neighbors if (above && above.collides) { - if (tileCollides) { tile.faceTop = false; } + if (tileCollides) + { + tile.faceTop = false; + } + above.faceBottom = !tileCollides; } if (below && below.collides) { - if (tileCollides) { tile.faceBottom = false; } + if (tileCollides) + { + tile.faceBottom = false; + } + below.faceTop = !tileCollides; } if (left && left.collides) { - if (tileCollides) { tile.faceLeft = false; } + if (tileCollides) + { + tile.faceLeft = false; + } + left.faceRight = !tileCollides; } if (right && right.collides) { - if (tileCollides) { tile.faceRight = false; } + if (tileCollides) + { + tile.faceRight = false; + } + right.faceLeft = !tileCollides; } - if (tile && !tile.collides) { tile.resetFaces(); } + if (tile && !tile.collides) + { + tile.resetFaces(); + } return tile; }; @@ -50858,7 +51855,7 @@ module.exports = CalculateFacesAt; /***/ }), -/* 227 */ +/* 234 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50867,10 +51864,10 @@ module.exports = CalculateFacesAt; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Tile = __webpack_require__(74); -var IsInLayerBounds = __webpack_require__(102); -var CalculateFacesAt = __webpack_require__(226); -var SetTileCollision = __webpack_require__(73); +var Tile = __webpack_require__(75); +var IsInLayerBounds = __webpack_require__(103); +var CalculateFacesAt = __webpack_require__(233); +var SetTileCollision = __webpack_require__(65); /** * Puts a tile at the given tile coordinates in the specified layer. You can pass in either an index @@ -50879,7 +51876,6 @@ var SetTileCollision = __webpack_require__(73); * Collision information will be recalculated at the specified location. * * @function Phaser.Tilemaps.Components.PutTileAt - * @private * @since 3.0.0 * * @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object. @@ -50904,11 +51900,13 @@ var PutTileAt = function (tile, tileX, tileY, recalculateFaces, layer) { layer.data[tileY][tileX] = new Tile(layer, tile.index, tileX, tileY, tile.width, tile.height); } + layer.data[tileY][tileX].copy(tile); } else { var index = tile; + if (layer.data[tileY][tileX] === null) { layer.data[tileY][tileX] = new Tile(layer, index, tileX, tileY, layer.tileWidth, layer.tileHeight); @@ -50922,6 +51920,7 @@ var PutTileAt = function (tile, tileX, tileY, recalculateFaces, layer) // Updating colliding flag on the new tile var newTile = layer.data[tileY][tileX]; var collides = layer.collideIndexes.indexOf(newTile.index) !== -1; + SetTileCollision(newTile, collides); // Recalculate faces only if the colliding flag at (tileX, tileY) has changed @@ -50936,48 +51935,8 @@ var PutTileAt = function (tile, tileX, tileY, recalculateFaces, layer) module.exports = PutTileAt; - /***/ }), -/* 228 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Internally used method to keep track of the tile indexes that collide within a layer. This - * updates LayerData.collideIndexes to either contain or not contain the given `tileIndex`. - * - * @function Phaser.Tilemaps.Components.SetLayerCollisionIndex - * @private - * @since 3.0.0 - * - * @param {integer} tileIndex - The tile index to set the collision boolean for. - * @param {boolean} [collides=true] - Should the tile index collide or not? - * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - */ -var SetLayerCollisionIndex = function (tileIndex, collides, layer) -{ - var loc = layer.collideIndexes.indexOf(tileIndex); - - if (collides && loc === -1) - { - layer.collideIndexes.push(tileIndex); - } - else if (!collides && loc !== -1) - { - layer.collideIndexes.splice(loc, 1); - } -}; - -module.exports = SetLayerCollisionIndex; - - -/***/ }), -/* 229 */ +/* 235 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50986,10 +51945,10 @@ module.exports = SetLayerCollisionIndex; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Formats = __webpack_require__(32); -var LayerData = __webpack_require__(103); -var MapData = __webpack_require__(104); -var Tile = __webpack_require__(74); +var Formats = __webpack_require__(33); +var LayerData = __webpack_require__(104); +var MapData = __webpack_require__(105); +var Tile = __webpack_require__(75); /** * Parses a 2D array of tile indexes into a new MapData object with a single layer. @@ -51069,7 +52028,7 @@ module.exports = Parse2DArray; /***/ }), -/* 230 */ +/* 236 */ /***/ (function(module, exports) { /** @@ -51159,68 +52118,7 @@ module.exports = ParseGID; /***/ }), -/* 231 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Seth Berrier - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetFastValue = __webpack_require__(2); - -/** - * Parse a Tiled group layer and create a state object for inheriting. - * - * @function Phaser.Tilemaps.Parsers.Tiled.CreateGroupLayer - * @since 3.21.0 - * - * @param {object} json - The Tiled JSON object. - * @param {object} [currentl] - The current group layer from the Tiled JSON file. - * @param {object} [parentstate] - The state of the parent group (if any). - * - * @return {object} A group state object with proper values for updating children layers. - */ -var CreateGroupLayer = function (json, groupl, parentstate) -{ - if (!groupl) - { - // Return a default group state object - return { - i: 0, // Current layer array iterator - layers: json.layers, // Current array of layers - - // Values inherited from parent group - name: '', - opacity: 1, - visible: true, - x: 0, - y: 0 - }; - } - - // Compute group layer x, y - var layerX = groupl.x + GetFastValue(groupl, 'startx', 0) * json.tilewidth + GetFastValue(groupl, 'offsetx', 0); - var layerY = groupl.y + GetFastValue(groupl, 'starty', 0) * json.tileheight + GetFastValue(groupl, 'offsety', 0); - - // Compute next state inherited from group - return { - i: 0, - layers: groupl.layers, - name: parentstate.name + groupl.name + '/', - opacity: parentstate.opacity * groupl.opacity, - visible: parentstate.visible && groupl.visible, - x: parentstate.x + layerX, - y: parentstate.y + layerY - }; -}; - -module.exports = CreateGroupLayer; - - -/***/ }), -/* 232 */ +/* 237 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51229,8 +52127,8 @@ module.exports = CreateGroupLayer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Pick = __webpack_require__(489); -var ParseGID = __webpack_require__(230); +var Pick = __webpack_require__(513); +var ParseGID = __webpack_require__(236); var copyPoints = function (p) { return { x: p.x, y: p.y }; }; @@ -51300,7 +52198,7 @@ module.exports = ParseObject; /***/ }), -/* 233 */ +/* 238 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51309,10 +52207,10 @@ module.exports = ParseObject; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Formats = __webpack_require__(32); -var MapData = __webpack_require__(104); -var Parse = __webpack_require__(481); -var Tilemap = __webpack_require__(497); +var Formats = __webpack_require__(33); +var MapData = __webpack_require__(105); +var Parse = __webpack_require__(505); +var Tilemap = __webpack_require__(521); /** * Create a Tilemap from the given key or data. If neither is given, make a blank Tilemap. When @@ -51386,7 +52284,7 @@ module.exports = ParseToTilemap; /***/ }), -/* 234 */ +/* 239 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51435,7 +52333,7 @@ module.exports = GetTargets; /***/ }), -/* 235 */ +/* 240 */ /***/ (function(module, exports) { /** @@ -51703,7 +52601,7 @@ module.exports = GetValueOp; /***/ }), -/* 236 */ +/* 241 */ /***/ (function(module, exports) { /** @@ -51747,7 +52645,7 @@ module.exports = TWEEN_DEFAULTS; /***/ }), -/* 237 */ +/* 242 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51757,11 +52655,11 @@ module.exports = TWEEN_DEFAULTS; */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(238); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(243); var GameObjectCreator = __webpack_require__(16); var GameObjectFactory = __webpack_require__(5); -var TWEEN_CONST = __webpack_require__(90); +var TWEEN_CONST = __webpack_require__(91); var MATH_CONST = __webpack_require__(13); /** @@ -52062,9 +52960,9 @@ var Tween = new Class({ /** * An object containing the different Tween callback functions. - * + * * You can either set these in the Tween config, or by calling the `Tween.setCallback` method. - * + * * `onActive` When the Tween is moved from the pending to the active list in the Tween Manager, even if playback paused. * `onStart` When the Tween starts playing after a delayed state. Will happen at the same time as `onActive` if it has no delay. * `onYoyo` When a TweenData starts a yoyo. This happens _after_ the `hold` delay expires, if set. @@ -52098,12 +52996,12 @@ var Tween = new Class({ this.callbackScope; }, - /** + /** * Returns the current value of the specified Tween Data. * * @method Phaser.Tweens.Tween#getValue * @since 3.0.0 - * + * * @param {integer} [index=0] - The Tween Data to return the value from. * * @return {number} The value of the requested Tween Data. @@ -52188,9 +53086,9 @@ var Tween = new Class({ /** * Updates the 'end' value of the given property across all matching targets. - * + * * Calling this does not adjust the duration of the tween, or the current progress. - * + * * You can optionally tell it to set the 'start' value to be the current value (before the change). * * @method Phaser.Tweens.Tween#updateTo @@ -52472,12 +53370,12 @@ var Tween = new Class({ /** * Starts a Tween playing. - * + * * You only need to call this method if you have configured the tween to be paused on creation. - * + * * If the Tween is already playing, calling this method again will have no effect. If you wish to * restart the Tween, use `Tween.restart` instead. - * + * * Calling this method after the Tween has completed will start the Tween playing again from the start. * This is the same as calling `Tween.seek(0)` and then `Tween.play()`. * @@ -52629,16 +53527,17 @@ var Tween = new Class({ /** * Seeks to a specific point in the Tween. - * - * **Note:** You cannot seek a Tween that repeats or loops forever, or that has an unusually long total duration. - * + * + * **Note:** Be careful when seeking a Tween that repeats or loops forever, + * or that has an unusually long total duration, as it's possible to hang the browser. + * * The given position is a value between 0 and 1 which represents how far through the Tween to seek to. * A value of 0.5 would seek to half-way through the Tween, where-as a value of zero would seek to the start. - * + * * Note that the seek takes the entire duration of the Tween into account, including delays, loops and repeats. * For example, a Tween that lasts for 2 seconds, but that loops 3 times, would have a total duration of 6 seconds, * so seeking to 0.5 would seek to 3 seconds into the Tween, as that's half-way through its _entire_ duration. - * + * * Seeking works by resetting the Tween to its initial values and then iterating through the Tween at `delta` * jumps per step. The longer the Tween, the longer this can take. * @@ -52654,13 +53553,6 @@ var Tween = new Class({ { if (delta === undefined) { delta = 16.6; } - if (this.totalDuration >= 3600000) - { - console.warn('Tween.seek duration too long'); - - return this; - } - if (this.state === TWEEN_CONST.REMOVED) { this.makeActive(); @@ -52739,11 +53631,11 @@ var Tween = new Class({ /** * Sets an event based callback to be invoked during playback. - * + * * Calling this method will replace a previously set callback for the given type, if any exists. - * + * * The types available are: - * + * * `onActive` When the Tween is moved from the pending to the active list in the Tween Manager, even if playback paused. * `onStart` When the Tween starts playing after a delayed state. Will happen at the same time as `onActive` if it has no delay. * `onYoyo` When a TweenData starts a yoyo. This happens _after_ the `hold` delay expires, if set. @@ -52808,7 +53700,7 @@ var Tween = new Class({ /** * Immediately removes this Tween from the TweenManager and all of its internal arrays, * no matter what stage it as it. Then sets the tween state to `REMOVED`. - * + * * You should dispose of your reference to this tween after calling this method, to * free it from memory. * @@ -52911,7 +53803,7 @@ var Tween = new Class({ if (!this.hasStarted && !this.isSeeking) { this.startDelay -= delta; - + if (this.startDelay <= 0) { this.hasStarted = true; @@ -53024,7 +53916,7 @@ var Tween = new Class({ if (callback) { callback.params[1] = this.targets; - + callback.func.apply(callback.scope, callback.params); } } @@ -53396,7 +54288,7 @@ module.exports = Tween; /***/ }), -/* 238 */ +/* 243 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53411,26 +54303,26 @@ module.exports = Tween; module.exports = { - TIMELINE_COMPLETE: __webpack_require__(1375), - TIMELINE_LOOP: __webpack_require__(1376), - TIMELINE_PAUSE: __webpack_require__(1377), - TIMELINE_RESUME: __webpack_require__(1378), - TIMELINE_START: __webpack_require__(1379), - TIMELINE_UPDATE: __webpack_require__(1380), - TWEEN_ACTIVE: __webpack_require__(1381), - TWEEN_COMPLETE: __webpack_require__(1382), - TWEEN_LOOP: __webpack_require__(1383), - TWEEN_REPEAT: __webpack_require__(1384), - TWEEN_START: __webpack_require__(1385), - TWEEN_STOP: __webpack_require__(1386), - TWEEN_UPDATE: __webpack_require__(1387), - TWEEN_YOYO: __webpack_require__(1388) + TIMELINE_COMPLETE: __webpack_require__(1372), + TIMELINE_LOOP: __webpack_require__(1373), + TIMELINE_PAUSE: __webpack_require__(1374), + TIMELINE_RESUME: __webpack_require__(1375), + TIMELINE_START: __webpack_require__(1376), + TIMELINE_UPDATE: __webpack_require__(1377), + TWEEN_ACTIVE: __webpack_require__(1378), + TWEEN_COMPLETE: __webpack_require__(1379), + TWEEN_LOOP: __webpack_require__(1380), + TWEEN_REPEAT: __webpack_require__(1381), + TWEEN_START: __webpack_require__(1382), + TWEEN_STOP: __webpack_require__(1383), + TWEEN_UPDATE: __webpack_require__(1384), + TWEEN_YOYO: __webpack_require__(1385) }; /***/ }), -/* 239 */ +/* 244 */ /***/ (function(module, exports) { /** @@ -53557,7 +54449,7 @@ module.exports = TweenData; /***/ }), -/* 240 */ +/* 245 */ /***/ (function(module, exports) { /** @@ -53611,7 +54503,7 @@ module.exports = ScaleModes; /***/ }), -/* 241 */ +/* 246 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53620,7 +54512,7 @@ module.exports = ScaleModes; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathWrap = __webpack_require__(58); +var MathWrap = __webpack_require__(59); /** * Wrap an angle. @@ -53643,7 +54535,7 @@ module.exports = Wrap; /***/ }), -/* 242 */ +/* 247 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53652,7 +54544,7 @@ module.exports = Wrap; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Wrap = __webpack_require__(58); +var Wrap = __webpack_require__(59); /** * Wrap an angle in degrees. @@ -53675,9 +54567,1786 @@ module.exports = WrapDegrees; /***/ }), -/* 243 */, -/* 244 */, -/* 245 */ +/* 248 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var CustomMap = __webpack_require__(121); +var GetFastValue = __webpack_require__(2); +var Events = __webpack_require__(120); +var Animation = __webpack_require__(170); + +/** + * @classdesc + * The Animation State Component. + * + * This component provides features to apply animations to Game Objects. It is responsible for + * loading, queuing animations for later playback, mixing between animations and setting + * the current animation frame to the Game Object that owns this component. + * + * This component lives as an instance within any Game Object that has it defined, such as Sprites. + * + * You can access its properties and methods via the `anims` property, i.e. `Sprite.anims`. + * + * As well as playing animations stored in the global Animation Manager, this component + * can also create animations that are stored locally within it. See the `create` method + * for more details. + * + * Prior to Phaser 3.50 this component was called just `Animation` and lived in the + * `Phaser.GameObjects.Components` namespace. It was renamed to `AnimationState` + * in 3.50 to help better identify its true purpose when browsing the documentation. + * + * @class AnimationState + * @memberof Phaser.Animations + * @constructor + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} parent - The Game Object to which this animation component belongs. + */ +var AnimationState = new Class({ + + initialize: + + function AnimationState (parent) + { + /** + * The Game Object to which this animation component belongs. + * + * You can typically access this component from the Game Object + * via the `this.anims` property. + * + * @name Phaser.Animations.AnimationState#parent + * @type {Phaser.GameObjects.GameObject} + * @since 3.0.0 + */ + this.parent = parent; + + /** + * A reference to the global Animation Manager. + * + * @name Phaser.Animations.AnimationState#animationManager + * @type {Phaser.Animations.AnimationManager} + * @since 3.0.0 + */ + this.animationManager = parent.scene.sys.anims; + + this.animationManager.on(Events.REMOVE_ANIMATION, this.globalRemove, this); + + /** + * A reference to the Texture Manager. + * + * @name Phaser.Animations.AnimationState#textureManager + * @type {Phaser.Textures.TextureManager} + * @protected + * @since 3.50.0 + */ + this.textureManager = this.animationManager.textureManager; + + /** + * The Animations stored locally in this Animation component. + * + * Do not modify the contents of this Map directly, instead use the + * `add`, `create` and `remove` methods of this class instead. + * + * @name Phaser.Animations.AnimationState#anims + * @type {Phaser.Structs.Map.} + * @protected + * @since 3.50.0 + */ + this.anims = null; + + /** + * Is an animation currently playing or not? + * + * @name Phaser.Animations.AnimationState#isPlaying + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.isPlaying = false; + + /** + * Has the current animation started playing, or is it waiting for a delay to expire? + * + * @name Phaser.Animations.AnimationState#hasStarted + * @type {boolean} + * @default false + * @since 3.50.0 + */ + this.hasStarted = false; + + /** + * The current Animation loaded into this Animation component. + * + * Will by `null` if no animation is yet loaded. + * + * @name Phaser.Animations.AnimationState#currentAnim + * @type {?Phaser.Animations.Animation} + * @default null + * @since 3.0.0 + */ + this.currentAnim = null; + + /** + * The current AnimationFrame being displayed by this Animation component. + * + * Will by `null` if no animation is yet loaded. + * + * @name Phaser.Animations.AnimationState#currentFrame + * @type {?Phaser.Animations.AnimationFrame} + * @default null + * @since 3.0.0 + */ + this.currentFrame = null; + + /** + * The key, instance, or config of the next Animation to be loaded into this Animation component + * when the current animation completes. + * + * Will by `null` if no animation has been queued. + * + * @name Phaser.Animations.AnimationState#nextAnim + * @type {?(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} + * @default null + * @since 3.16.0 + */ + this.nextAnim = null; + + /** + * A queue of Animations to be loaded into this Animation component when the current animation completes. + * + * Populate this queue via the `chain` method. + * + * @name Phaser.Animations.AnimationState#nextAnimsQueue + * @type {array} + * @since 3.24.0 + */ + this.nextAnimsQueue = []; + + /** + * The Time Scale factor. + * + * You can adjust this value to modify the passage of time for the animation that is currently + * playing. For example, setting it to 2 will make the animation play twice as fast. Or setting + * it to 0.5 will slow the animation down. + * + * You can change this value at run-time, or set it via the `PlayAnimationConfig`. + * + * Prior to Phaser 3.50 this property was private and called `_timeScale`. + * + * @name Phaser.Animations.AnimationState#timeScale + * @type {number} + * @default 1 + * @since 3.50.0 + */ + this.timeScale = 1; + + /** + * The frame rate of playback, of the current animation, in frames per second. + * + * This value is set when a new animation is loaded into this component and should + * be treated as read-only, as changing it once playback has started will not alter + * the animation. To change the frame rate, provide a new value in the `PlayAnimationConfig` object. + * + * @name Phaser.Animations.AnimationState#frameRate + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.frameRate = 0; + + /** + * The duration of the current animation, in milliseconds. + * + * This value is set when a new animation is loaded into this component and should + * be treated as read-only, as changing it once playback has started will not alter + * the animation. To change the duration, provide a new value in the `PlayAnimationConfig` object. + * + * @name Phaser.Animations.AnimationState#duration + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.duration = 0; + + /** + * The number of milliseconds per frame, not including frame specific modifiers that may be present in the + * Animation data. + * + * This value is calculated when a new animation is loaded into this component and should + * be treated as read-only. Changing it will not alter playback speed. + * + * @name Phaser.Animations.AnimationState#msPerFrame + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.msPerFrame = 0; + + /** + * Skip frames if the time lags, or always advanced anyway? + * + * @name Phaser.Animations.AnimationState#skipMissedFrames + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.skipMissedFrames = true; + + /** + * The delay before starting playback of the current animation, in milliseconds. + * + * This value is set when a new animation is loaded into this component and should + * be treated as read-only, as changing it once playback has started will not alter + * the animation. To change the delay, provide a new value in the `PlayAnimationConfig` object. + * + * Prior to Phaser 3.50 this property was private and called `_delay`. + * + * @name Phaser.Animations.AnimationState#delay + * @type {number} + * @default 0 + * @since 3.50.0 + */ + this.delay = 0; + + /** + * The number of times to repeat playback of the current animation. + * + * If -1, it means the animation will repeat forever. + * + * This value is set when a new animation is loaded into this component and should + * be treated as read-only, as changing it once playback has started will not alter + * the animation. To change the number of repeats, provide a new value in the `PlayAnimationConfig` object. + * + * Prior to Phaser 3.50 this property was private and called `_repeat`. + * + * @name Phaser.Animations.AnimationState#repeat + * @type {number} + * @default 0 + * @since 3.50.0 + */ + this.repeat = 0; + + /** + * The number of milliseconds to wait before starting the repeat playback of the current animation. + * + * This value is set when a new animation is loaded into this component, but can also be modified + * at run-time. + * + * You can change the repeat delay by providing a new value in the `PlayAnimationConfig` object. + * + * Prior to Phaser 3.50 this property was private and called `_repeatDelay`. + * + * @name Phaser.Animations.AnimationState#repeatDelay + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.repeatDelay = 0; + + /** + * Should the current animation yoyo? An animation that yoyos will play in reverse, from the end + * to the start, before then repeating or completing. An animation that does not yoyo will just + * play from the start to the end. + * + * This value is set when a new animation is loaded into this component, but can also be modified + * at run-time. + * + * You can change the yoyo by providing a new value in the `PlayAnimationConfig` object. + * + * Prior to Phaser 3.50 this property was private and called `_yoyo`. + * + * @name Phaser.Animations.AnimationState#yoyo + * @type {boolean} + * @default false + * @since 3.50.0 + */ + this.yoyo = false; + + /** + * Should the GameObject's `visible` property be set to `true` when the animation starts to play? + * + * This will happen _after_ any delay that may have been set. + * + * This value is set when a new animation is loaded into this component, but can also be modified + * at run-time, assuming the animation is currently delayed. + * + * @name Phaser.Animations.AnimationState#showOnStart + * @type {boolean} + * @since 3.50.0 + */ + this.showOnStart = false; + + /** + * Should the GameObject's `visible` property be set to `false` when the animation completes? + * + * This value is set when a new animation is loaded into this component, but can also be modified + * at run-time, assuming the animation is still actively playing. + * + * @name Phaser.Animations.AnimationState#hideOnComplete + * @type {boolean} + * @since 3.50.0 + */ + this.hideOnComplete = false; + + /** + * Is the playhead moving forwards (`true`) or in reverse (`false`) ? + * + * @name Phaser.Animations.AnimationState#forward + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.forward = true; + + /** + * An internal trigger that tells the component if it should plays the animation + * in reverse mode ('true') or not ('false'). This is used because `forward` can + * be changed by the `yoyo` feature. + * + * Prior to Phaser 3.50 this property was private and called `_reverse`. + * + * @name Phaser.Animations.AnimationState#inReverse + * @type {boolean} + * @default false + * @since 3.50.0 + */ + this.inReverse = false; + + /** + * Internal time overflow accumulator. + * + * This has the `delta` time added to it as part of the `update` step. + * + * @name Phaser.Animations.AnimationState#accumulator + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.accumulator = 0; + + /** + * The time point at which the next animation frame will change. + * + * This value is compared against the `accumulator` as part of the `update` step. + * + * @name Phaser.Animations.AnimationState#nextTick + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.nextTick = 0; + + /** + * A counter keeping track of how much delay time, in milliseconds, is left before playback begins. + * + * This is set via the `playAfterDelay` method, although it can be modified at run-time + * if required, as long as the animation has not already started playing. + * + * @name Phaser.Animations.AnimationState#delayCounter + * @type {number} + * @default 0 + * @since 3.50.0 + */ + this.delayCounter = 0; + + /** + * A counter that keeps track of how many repeats are left to run. + * + * This value is set when a new animation is loaded into this component, but can also be modified + * at run-time. + * + * @name Phaser.Animations.AnimationState#repeatCounter + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.repeatCounter = 0; + + /** + * An internal flag keeping track of pending repeats. + * + * @name Phaser.Animations.AnimationState#pendingRepeat + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.pendingRepeat = false; + + /** + * Is the Animation paused? + * + * @name Phaser.Animations.AnimationState#_paused + * @type {boolean} + * @private + * @default false + * @since 3.0.0 + */ + this._paused = false; + + /** + * Was the animation previously playing before being paused? + * + * @name Phaser.Animations.AnimationState#_wasPlaying + * @type {boolean} + * @private + * @default false + * @since 3.0.0 + */ + this._wasPlaying = false; + + /** + * Internal property tracking if this Animation is waiting to stop. + * + * 0 = No + * 1 = Waiting for ms to pass + * 2 = Waiting for repeat + * 3 = Waiting for specific frame + * + * @name Phaser.Animations.AnimationState#_pendingStop + * @type {integer} + * @private + * @since 3.4.0 + */ + this._pendingStop = 0; + + /** + * Internal property used by _pendingStop. + * + * @name Phaser.Animations.AnimationState#_pendingStopValue + * @type {any} + * @private + * @since 3.4.0 + */ + this._pendingStopValue; + }, + + /** + * Sets an animation, or an array of animations, to be played in the future, after the current one completes or stops. + * + * The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc, + * or have one of the `stop` methods called. + * + * An animation set to repeat forever will never enter a completed state unless stopped. + * + * You can chain a new animation at any point, including before the current one starts playing, during it, or when it ends (via its `animationcomplete` event). + * + * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained animations without impacting the global animation they're playing. + * + * Call this method with no arguments to reset all currently chained animations. + * + * @method Phaser.Animations.AnimationState#chain + * @since 3.16.0 + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig|string[]|Phaser.Animations.Animation[]|Phaser.Types.Animations.PlayAnimationConfig[])} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object, or an array of them. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + chain: function (key) + { + var parent = this.parent; + + if (key === undefined) + { + this.nextAnimsQueue.length = 0; + this.nextAnim = null; + + return parent; + } + + if (!Array.isArray(key)) + { + key = [ key ]; + } + + for (var i = 0; i < key.length; i++) + { + var anim = key[i]; + + if (this.nextAnim === null) + { + this.nextAnim = anim; + } + else + { + this.nextAnimsQueue.push(anim); + } + } + + return this.parent; + }, + + /** + * Returns the key of the animation currently loaded into this component. + * + * Prior to Phaser 3.50 this method was called `getCurrentKey`. + * + * @method Phaser.Animations.AnimationState#getName + * @since 3.50.0 + * + * @return {string} The key of the Animation currently loaded into this component, or an empty string if none loaded. + */ + getName: function () + { + return (this.currentAnim) ? this.currentAnim.key : ''; + }, + + /** + * Returns the key of the animation frame currently displayed by this component. + * + * @method Phaser.Animations.AnimationState#getFrameName + * @since 3.50.0 + * + * @return {string} The key of the Animation Frame currently displayed by this component, or an empty string if no animation has been loaded. + */ + getFrameName: function () + { + return (this.currentFrame) ? this.currentFrame.textureFrame : ''; + }, + + /** + * Internal method used to load an animation into this component. + * + * @method Phaser.Animations.AnimationState#load + * @protected + * @since 3.0.0 + * + * @param {(string|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or a `PlayAnimationConfig` object. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + load: function (key) + { + if (this.isPlaying) + { + this.stop(); + } + + var manager = this.animationManager; + var animKey = (typeof key === 'string') ? key : GetFastValue(key, 'key', null); + + // Get the animation, first from the local map and, if not found, from the Animation Manager + var anim = (this.exists(animKey)) ? this.get(animKey) : manager.get(animKey); + + if (!anim) + { + console.warn('Missing animation: ' + animKey); + } + else + { + this.currentAnim = anim; + + // And now override the animation values, if set in the config. + + var totalFrames = anim.getTotalFrames(); + var frameRate = GetFastValue(key, 'frameRate', anim.frameRate); + var duration = GetFastValue(key, 'duration', anim.duration); + + anim.calculateDuration(this, totalFrames, duration, frameRate); + + this.delay = GetFastValue(key, 'delay', anim.delay); + this.repeat = GetFastValue(key, 'repeat', anim.repeat); + this.repeatDelay = GetFastValue(key, 'repeatDelay', anim.repeatDelay); + this.yoyo = GetFastValue(key, 'yoyo', anim.yoyo); + this.showOnStart = GetFastValue(key, 'showOnStart', anim.showOnStart); + this.hideOnComplete = GetFastValue(key, 'hideOnComplete', anim.hideOnComplete); + this.skipMissedFrames = GetFastValue(key, 'skipMissedFrames', anim.skipMissedFrames); + + this.timeScale = GetFastValue(key, 'timeScale', this.timeScale); + + var startFrame = GetFastValue(key, 'startFrame', 0); + + if (startFrame > anim.getTotalFrames()) + { + startFrame = 0; + } + + var frame = anim.frames[startFrame]; + + if (startFrame === 0 && !this.forward) + { + frame = anim.getLastFrame(); + } + + this.currentFrame = frame; + } + + return this.parent; + }, + + /** + * Pause the current animation and set the `isPlaying` property to `false`. + * You can optionally pause it at a specific frame. + * + * @method Phaser.Animations.AnimationState#pause + * @since 3.0.0 + * + * @param {Phaser.Animations.AnimationFrame} [atFrame] - An optional frame to set after pausing the animation. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + pause: function (atFrame) + { + if (!this._paused) + { + this._paused = true; + this._wasPlaying = this.isPlaying; + this.isPlaying = false; + } + + if (atFrame !== undefined) + { + this.setCurrentFrame(atFrame); + } + + return this.parent; + }, + + /** + * Resumes playback of a paused animation and sets the `isPlaying` property to `true`. + * You can optionally tell it to start playback from a specific frame. + * + * @method Phaser.Animations.AnimationState#resume + * @since 3.0.0 + * + * @param {Phaser.Animations.AnimationFrame} [fromFrame] - An optional frame to set before restarting playback. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + resume: function (fromFrame) + { + if (this._paused) + { + this._paused = false; + this.isPlaying = this._wasPlaying; + } + + if (fromFrame !== undefined) + { + this.setCurrentFrame(fromFrame); + } + + return this.parent; + }, + + /** + * Waits for the specified delay, in milliseconds, then starts playback of the given animation. + * + * If the animation _also_ has a delay value set in its config, it will be **added** to the delay given here. + * + * If an animation is already running and a new animation is given to this method, it will wait for + * the given delay before starting the new animation. + * + * If no animation is currently running, the given one begins after the delay. + * + * Prior to Phaser 3.50 this method was called 'delayedPlay' and the parameters were in the reverse order. + * + * @method Phaser.Animations.AnimationState#playAfterDelay + * @fires Phaser.Animations.Events#ANIMATION_START + * @since 3.50.0 + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {integer} delay - The delay, in milliseconds, to wait before starting the animation playing. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + playAfterDelay: function (key, delay) + { + if (!this.isPlaying) + { + this.delayCounter = delay; + + this.play(key, true); + } + else + { + // If we've got a nextAnim, move it to the queue + var nextAnim = this.nextAnim; + var queue = this.nextAnimsQueue; + + if (nextAnim) + { + queue.unshift(nextAnim); + } + + this.nextAnim = key; + + this._pendingStop = 1; + this._pendingStopValue = delay; + } + + return this.parent; + }, + + /** + * Waits for the current animation to complete the `repeatCount` number of repeat cycles, then starts playback + * of the given animation. + * + * You can use this to ensure there are no harsh jumps between two sets of animations, i.e. going from an + * idle animation to a walking animation, by making them blend smoothly into each other. + * + * If no animation is currently running, the given one will start immediately. + * + * @method Phaser.Animations.AnimationState#playAfterRepeat + * @fires Phaser.Animations.Events#ANIMATION_START + * @since 3.50.0 + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {integer} [repeatCount=1] - How many times should the animation repeat before the next one starts? + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + playAfterRepeat: function (key, repeatCount) + { + if (repeatCount === undefined) { repeatCount = 1; } + + if (!this.isPlaying) + { + this.play(key); + } + else + { + // If we've got a nextAnim, move it to the queue + var nextAnim = this.nextAnim; + var queue = this.nextAnimsQueue; + + if (nextAnim) + { + queue.unshift(nextAnim); + } + + if (this.repeatCounter !== -1 && repeatCount > this.repeatCounter) + { + repeatCount = this.repeatCounter; + } + + this.nextAnim = key; + + this._pendingStop = 2; + this._pendingStopValue = repeatCount; + } + + return this.parent; + }, + + /** + * Start playing the given animation on this Sprite. + * + * Animations in Phaser can either belong to the global Animation Manager, or specifically to this Sprite. + * + * The benefit of a global animation is that multiple Sprites can all play the same animation, without + * having to duplicate the data. You can just create it once and then play it on any Sprite. + * + * The following code shows how to create a global repeating animation. The animation will be created + * from all of the frames within the sprite sheet that was loaded with the key 'muybridge': + * + * ```javascript + * var config = { + * key: 'run', + * frames: 'muybridge', + * frameRate: 15, + * repeat: -1 + * }; + * + * // This code should be run from within a Scene: + * this.anims.create(config); + * ``` + * + * However, if you wish to create an animation that is unique to this Sprite, and this Sprite alone, + * you can call the `Animation.create` method instead. It accepts the exact same parameters as when + * creating a global animation, however the resulting data is kept locally in this Sprite. + * + * With the animation created, either globally or locally, you can now play it on this Sprite: + * + * ```javascript + * this.add.sprite(x, y).play('run'); + * ``` + * + * Alternatively, if you wish to run it at a different frame rate, for example, you can pass a config + * object instead: + * + * ```javascript + * this.add.sprite(x, y).play({ key: 'run', frameRate: 24 }); + * ``` + * + * When playing an animation on a Sprite it will first check to see if it can find a matching key + * locally within the Sprite. If it can, it will play the local animation. If not, it will then + * search the global Animation Manager and look for it there. + * + * If you need a Sprite to be able to play both local and global animations, make sure they don't + * have conflicting keys. + * + * See the documentation for the `PlayAnimationConfig` config object for more details about this. + * + * Also, see the documentation in the Animation Manager for further details on creating animations. + * + * @method Phaser.Animations.AnimationState#play + * @fires Phaser.Animations.Events#ANIMATION_START + * @since 3.0.0 + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + play: function (key, ignoreIfPlaying) + { + if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } + + var currentAnim = this.currentAnim; + var parent = this.parent; + + // Must be either an Animation instance, or a PlayAnimationConfig object + var animKey = (typeof key === 'string') ? key : key.key; + + if (ignoreIfPlaying && this.isPlaying && currentAnim.key === animKey) + { + return parent; + } + + // Are we mixing? + if (currentAnim && this.isPlaying) + { + var mix = this.animationManager.getMix(currentAnim.key, key); + + if (mix > 0) + { + return this.playAfterDelay(key, mix); + } + } + + this.forward = true; + this.inReverse = false; + + this._paused = false; + this._wasPlaying = true; + + return this.startAnimation(key); + }, + + /** + * Start playing the given animation on this Sprite, in reverse. + * + * Animations in Phaser can either belong to the global Animation Manager, or specifically to this Sprite. + * + * The benefit of a global animation is that multiple Sprites can all play the same animation, without + * having to duplicate the data. You can just create it once and then play it on any Sprite. + * + * The following code shows how to create a global repeating animation. The animation will be created + * from all of the frames within the sprite sheet that was loaded with the key 'muybridge': + * + * ```javascript + * var config = { + * key: 'run', + * frames: 'muybridge', + * frameRate: 15, + * repeat: -1 + * }; + * + * // This code should be run from within a Scene: + * this.anims.create(config); + * ``` + * + * However, if you wish to create an animation that is unique to this Sprite, and this Sprite alone, + * you can call the `Animation.create` method instead. It accepts the exact same parameters as when + * creating a global animation, however the resulting data is kept locally in this Sprite. + * + * With the animation created, either globally or locally, you can now play it on this Sprite: + * + * ```javascript + * this.add.sprite(x, y).playReverse('run'); + * ``` + * + * Alternatively, if you wish to run it at a different frame rate, for example, you can pass a config + * object instead: + * + * ```javascript + * this.add.sprite(x, y).playReverse({ key: 'run', frameRate: 24 }); + * ``` + * + * When playing an animation on a Sprite it will first check to see if it can find a matching key + * locally within the Sprite. If it can, it will play the local animation. If not, it will then + * search the global Animation Manager and look for it there. + * + * If you need a Sprite to be able to play both local and global animations, make sure they don't + * have conflicting keys. + * + * See the documentation for the `PlayAnimationConfig` config object for more details about this. + * + * Also, see the documentation in the Animation Manager for further details on creating animations. + * + * @method Phaser.Animations.AnimationState#playReverse + * @fires Phaser.Animations.Events#ANIMATION_START + * @since 3.12.0 + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + playReverse: function (key, ignoreIfPlaying) + { + if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } + + // Must be either an Animation instance, or a PlayAnimationConfig object + var animKey = (typeof key === 'string') ? key : key.key; + + if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === animKey) + { + return this.parent; + } + + this.forward = false; + this.inReverse = true; + + this._paused = false; + this._wasPlaying = true; + + return this.startAnimation(key); + }, + + /** + * Load the animation based on the key and set-up all of the internal values + * needed for playback to start. If there is no delay, it will also fire the start events. + * + * @method Phaser.Animations.AnimationState#startAnimation + * @fires Phaser.Animations.Events#ANIMATION_START + * @since 3.50.0 + * + * @param {(string|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or a `PlayAnimationConfig` object. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + startAnimation: function (key) + { + this.load(key); + + var anim = this.currentAnim; + var gameObject = this.parent; + + if (!anim) + { + return gameObject; + } + + // Should give us 9,007,199,254,740,991 safe repeats + this.repeatCounter = (this.repeat === -1) ? Number.MAX_VALUE : this.repeat; + + anim.getFirstTick(this); + + this.isPlaying = true; + this.pendingRepeat = false; + this.hasStarted = false; + + this._pendingStop = 0; + this._pendingStopValue = 0; + this._paused = false; + + // Add any delay the animation itself may have had as well + this.delayCounter += this.delay; + + if (this.delayCounter === 0) + { + this.handleStart(); + } + + return gameObject; + }, + + /** + * Handles the start of an animation playback. + * + * @method Phaser.Animations.AnimationState#handleStart + * @private + * @since 3.50.0 + */ + handleStart: function () + { + if (this.showOnStart) + { + this.parent.setVisible(true); + } + + this.setCurrentFrame(this.currentFrame); + + this.hasStarted = true; + + this.emitEvents(Events.ANIMATION_START); + }, + + /** + * Handles the repeat of an animation. + * + * @method Phaser.Animations.AnimationState#handleRepeat + * @private + * @since 3.50.0 + */ + handleRepeat: function () + { + this.pendingRepeat = false; + + this.emitEvents(Events.ANIMATION_REPEAT); + }, + + /** + * Handles the stop of an animation playback. + * + * @method Phaser.Animations.AnimationState#handleStop + * @private + * @since 3.50.0 + */ + handleStop: function () + { + this._pendingStop = 0; + + this.isPlaying = false; + + this.emitEvents(Events.ANIMATION_STOP); + }, + + /** + * Handles the completion of an animation playback. + * + * @method Phaser.Animations.AnimationState#handleComplete + * @private + * @since 3.50.0 + */ + handleComplete: function () + { + this._pendingStop = 0; + + this.isPlaying = false; + + if (this.hideOnComplete) + { + this.parent.setVisible(false); + } + + this.emitEvents(Events.ANIMATION_COMPLETE); + }, + + /** + * Fires the given animation event. + * + * @method Phaser.Animations.AnimationState#emitEvents + * @private + * @since 3.50.0 + * + * @param {string} event - The Animation Event to dispatch. + */ + emitEvents: function (event) + { + var anim = this.currentAnim; + var frame = this.currentFrame; + var gameObject = this.parent; + + gameObject.emit(event, anim, frame, gameObject, frame.textureFrame); + }, + + /** + * Reverse the Animation that is already playing on the Game Object. + * + * @method Phaser.Animations.AnimationState#reverse + * @since 3.12.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + reverse: function () + { + if (this.isPlaying) + { + this.inReverse = !this.inReverse; + + this.forward = !this.forward; + } + + return this.parent; + }, + + /** + * Returns a value between 0 and 1 indicating how far this animation is through, ignoring repeats and yoyos. + * + * The value is based on the current frame and how far that is in the animation, it is not based on + * the duration of the animation. + * + * @method Phaser.Animations.AnimationState#getProgress + * @since 3.4.0 + * + * @return {number} The progress of the current animation in frames, between 0 and 1. + */ + getProgress: function () + { + var frame = this.currentFrame; + + if (!frame) + { + return 0; + } + + var p = frame.progress; + + if (this.inReverse) + { + p *= -1; + } + + return p; + }, + + /** + * Takes a value between 0 and 1 and uses it to set how far this animation is through playback. + * + * Does not factor in repeats or yoyos, but does handle playing forwards or backwards. + * + * The value is based on the current frame and how far that is in the animation, it is not based on + * the duration of the animation. + * + * @method Phaser.Animations.AnimationState#setProgress + * @since 3.4.0 + * + * @param {number} [value=0] - The progress value, between 0 and 1. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + setProgress: function (value) + { + if (!this.forward) + { + value = 1 - value; + } + + this.setCurrentFrame(this.currentAnim.getFrameByProgress(value)); + + return this.parent; + }, + + /** + * Sets the number of times that the animation should repeat after its first play through. + * For example, if repeat is 1, the animation will play a total of twice: the initial play plus 1 repeat. + * + * To repeat indefinitely, use -1. + * The value should always be an integer. + * + * Calling this method only works if the animation is already running. Otherwise, any + * value specified here will be overwritten when the next animation loads in. To avoid this, + * use the `repeat` property of the `PlayAnimationConfig` object instead. + * + * @method Phaser.Animations.AnimationState#setRepeat + * @since 3.4.0 + * + * @param {integer} value - The number of times that the animation should repeat. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + setRepeat: function (value) + { + this.repeatCounter = (value === -1) ? Number.MAX_VALUE : value; + + return this.parent; + }, + + /** + * Handle the removal of an animation from the Animation Manager. + * + * @method Phaser.Animations.AnimationState#globalRemove + * @since 3.50.0 + * + * @param {string} [key] - The key of the removed Animation. + * @param {Phaser.Animations.Animation} [animation] - The removed Animation. + */ + globalRemove: function (key, animation) + { + if (animation === undefined) { animation = this.currentAnim; } + + if (this.isPlaying && animation.key === this.currentAnim.key) + { + this.stop(); + + this.setCurrentFrame(this.currentAnim.frames[0]); + } + }, + + /** + * Restarts the current animation from its beginning. + * + * You can optionally reset the delay and repeat counters as well. + * + * Calling this will fire the `ANIMATION_RESTART` event immediately. + * + * If you `includeDelay` then it will also fire the `ANIMATION_START` event once + * the delay has expired, otherwise, playback will just begin immediately. + * + * @method Phaser.Animations.AnimationState#restart + * @fires Phaser.Animations.Events#ANIMATION_RESTART + * @since 3.0.0 + * + * @param {boolean} [includeDelay=false] - Whether to include the delay value of the animation when restarting. + * @param {boolean} [resetRepeats=false] - Whether to reset the repeat counter or not? + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + restart: function (includeDelay, resetRepeats) + { + if (includeDelay === undefined) { includeDelay = false; } + if (resetRepeats === undefined) { resetRepeats = false; } + + var anim = this.currentAnim; + var gameObject = this.parent; + + if (!anim) + { + return gameObject; + } + + if (resetRepeats) + { + this.repeatCounter = (this.repeat === -1) ? Number.MAX_VALUE : this.repeat; + } + + anim.getFirstTick(this); + + this.emitEvents(Events.ANIMATION_RESTART); + + this.isPlaying = true; + this.pendingRepeat = false; + + // Set this to `true` if there is no delay to include, so it skips the `hasStarted` check in `update`. + this.hasStarted = !includeDelay; + + this._pendingStop = 0; + this._pendingStopValue = 0; + this._paused = false; + + this.setCurrentFrame(anim.frames[0]); + + return this.parent; + }, + + /** + * The current animation has completed. This dispatches the `ANIMATION_COMPLETE` event. + * + * This method is called by the Animation instance and should not usually be invoked directly. + * + * If no animation is loaded, no events will be dispatched. + * + * If another animation has been queued for playback, it will be started after the events fire. + * + * @method Phaser.Animations.AnimationState#complete + * @fires Phaser.Animations.Events#ANIMATION_COMPLETE + * @since 3.50.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + complete: function () + { + this._pendingStop = 0; + + this.isPlaying = false; + + if (this.currentAnim) + { + this.handleComplete(); + } + + if (this.nextAnim) + { + var key = this.nextAnim; + + this.nextAnim = (this.nextAnimsQueue.length > 0) ? this.nextAnimsQueue.shift() : null; + + this.play(key); + } + + return this.parent; + }, + + /** + * Immediately stops the current animation from playing and dispatches the `ANIMATION_STOP` event. + * + * If no animation is running, no events will be dispatched. + * + * If there is another animation in the queue (set via the `chain` method) then it will start playing. + * + * @method Phaser.Animations.AnimationState#stop + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @since 3.0.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stop: function () + { + this._pendingStop = 0; + + this.isPlaying = false; + + if (this.currentAnim) + { + this.handleStop(); + } + + if (this.nextAnim) + { + var key = this.nextAnim; + + this.nextAnim = this.nextAnimsQueue.shift(); + + this.play(key); + } + + return this.parent; + }, + + /** + * Stops the current animation from playing after the specified time delay, given in milliseconds. + * + * It then dispatches the `ANIMATION_STOP` event. + * + * If no animation is running, no events will be dispatched. + * + * If there is another animation in the queue (set via the `chain` method) then it will start playing, + * when the current one stops. + * + * @method Phaser.Animations.AnimationState#stopAfterDelay + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @since 3.4.0 + * + * @param {integer} delay - The number of milliseconds to wait before stopping this animation. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stopAfterDelay: function (delay) + { + this._pendingStop = 1; + this._pendingStopValue = delay; + + return this.parent; + }, + + /** + * Stops the current animation from playing when it next repeats. + * + * It then dispatches the `ANIMATION_STOP` event. + * + * If no animation is running, no events will be dispatched. + * + * If there is another animation in the queue (set via the `chain` method) then it will start playing, + * when the current one stops. + * + * Prior to Phaser 3.50 this method was called `stopOnRepeat` and had no parameters. + * + * @method Phaser.Animations.AnimationState#stopAfterRepeat + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @since 3.50.0 + * + * @param {integer} [repeatCount=1] - How many times should the animation repeat before stopping? + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stopAfterRepeat: function (repeatCount) + { + if (repeatCount === undefined) { repeatCount = 1; } + + if (this.repeatCounter !== -1 && repeatCount > this.repeatCounter) + { + repeatCount = this.repeatCounter; + } + + this._pendingStop = 2; + this._pendingStopValue = repeatCount; + + return this.parent; + }, + + /** + * Stops the current animation from playing when it next sets the given frame. + * If this frame doesn't exist within the animation it will not stop it from playing. + * + * It then dispatches the `ANIMATION_STOP` event. + * + * If no animation is running, no events will be dispatched. + * + * If there is another animation in the queue (set via the `chain` method) then it will start playing, + * when the current one stops. + * + * @method Phaser.Animations.AnimationState#stopOnFrame + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @since 3.4.0 + * + * @param {Phaser.Animations.AnimationFrame} frame - The frame to check before stopping this animation. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stopOnFrame: function (frame) + { + this._pendingStop = 3; + this._pendingStopValue = frame; + + return this.parent; + }, + + /** + * Returns the total number of frames in this animation, or returns zero if no + * animation has been loaded. + * + * @method Phaser.Animations.AnimationState#getTotalFrames + * @since 3.4.0 + * + * @return {integer} The total number of frames in the current animation, or zero if no animation has been loaded. + */ + getTotalFrames: function () + { + return (this.currentAnim) ? this.currentAnim.getTotalFrames() : 0; + }, + + /** + * The internal update loop for the AnimationState Component. + * + * This is called automatically by the `Sprite.preUpdate` method. + * + * @method Phaser.Animations.AnimationState#update + * @since 3.0.0 + * + * @param {number} time - The current timestamp. + * @param {number} delta - The delta time, in ms, elapsed since the last frame. + */ + update: function (time, delta) + { + var anim = this.currentAnim; + + if (!this.isPlaying || !anim || anim.paused) + { + return; + } + + this.accumulator += delta * this.timeScale; + + if (this._pendingStop === 1) + { + this._pendingStopValue -= delta; + + if (this._pendingStopValue <= 0) + { + return this.stop(); + } + } + + if (!this.hasStarted) + { + if (this.accumulator >= this.delayCounter) + { + this.accumulator -= this.delayCounter; + + this.handleStart(); + } + } + else if (this.accumulator >= this.nextTick) + { + // Process one frame advance as standard + + if (this.forward) + { + anim.nextFrame(this); + } + else + { + anim.previousFrame(this); + } + + // And only do more if we're skipping frames and have time left + if (this.isPlaying && this._pendingStop === 0 && this.skipMissedFrames && this.accumulator > this.nextTick) + { + var safetyNet = 0; + + do + { + if (this.forward) + { + anim.nextFrame(this); + } + else + { + anim.previousFrame(this); + } + + safetyNet++; + + } while (this.accumulator > this.nextTick && safetyNet < 60); + } + } + }, + + /** + * Sets the given Animation Frame as being the current frame + * and applies it to the parent Game Object, adjusting size and origin as needed. + * + * @method Phaser.Animations.AnimationState#setCurrentFrame + * @fires Phaser.Animations.Events#ANIMATION_UPDATE + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @since 3.4.0 + * + * @param {Phaser.Animations.AnimationFrame} animationFrame - The animation frame to change to. + * + * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. + */ + setCurrentFrame: function (animationFrame) + { + var gameObject = this.parent; + + this.currentFrame = animationFrame; + + gameObject.texture = animationFrame.frame.texture; + gameObject.frame = animationFrame.frame; + + if (gameObject.isCropped) + { + gameObject.frame.updateCropUVs(gameObject._crop, gameObject.flipX, gameObject.flipY); + } + + if (animationFrame.setAlpha) + { + gameObject.alpha = animationFrame.alpha; + } + + gameObject.setSizeToFrame(); + + if (gameObject._originComponent) + { + if (animationFrame.frame.customPivot) + { + gameObject.setOrigin(animationFrame.frame.pivotX, animationFrame.frame.pivotY); + } + else + { + gameObject.updateDisplayOrigin(); + } + } + + if (this.isPlaying && this.hasStarted) + { + this.emitEvents(Events.ANIMATION_UPDATE); + + if (this._pendingStop === 3 && this._pendingStopValue === animationFrame) + { + this.stop(); + } + } + + return gameObject; + }, + + /** + * Advances the animation to the next frame, regardless of the time or animation state. + * If the animation is set to repeat, or yoyo, this will still take effect. + * + * Calling this does not change the direction of the animation. I.e. if it was currently + * playing in reverse, calling this method doesn't then change the direction to forwards. + * + * @method Phaser.Animations.AnimationState#nextFrame + * @since 3.16.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. + */ + nextFrame: function () + { + if (this.currentAnim) + { + this.currentAnim.nextFrame(this); + } + + return this.parent; + }, + + /** + * Advances the animation to the previous frame, regardless of the time or animation state. + * If the animation is set to repeat, or yoyo, this will still take effect. + * + * Calling this does not change the direction of the animation. I.e. if it was currently + * playing in forwards, calling this method doesn't then change the direction to backwards. + * + * @method Phaser.Animations.AnimationState#previousFrame + * @since 3.16.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. + */ + previousFrame: function () + { + if (this.currentAnim) + { + this.currentAnim.previousFrame(this); + } + + return this.parent; + }, + + /** + * Get an Animation instance that has been created locally on this Sprite. + * + * See the `create` method for more details. + * + * @method Phaser.Animations.AnimationState#get + * @since 3.50.0 + * + * @param {string} key - The key of the Animation to retrieve. + * + * @return {Phaser.Animations.Animation} The Animation, or `undefined` if the key is invalid. + */ + get: function (key) + { + return (this.anims && this.anims.get(key)); + }, + + /** + * Checks to see if the given key is already used locally within the animations stored on this Sprite. + * + * @method Phaser.Animations.AnimationState#exists + * @since 3.50.0 + * + * @param {string} key - The key of the Animation to check. + * + * @return {boolean} `true` if the Animation exists locally, or `false` if the key is available. + */ + exists: function (key) + { + return (this.anims && this.anims.has(key)); + }, + + /** + * Creates a new Animation that is local specifically to this Sprite. + * + * When a Sprite owns an animation, it is kept out of the global Animation Manager, which means + * you're free to use keys that may be already defined there. Unless you specifically need a Sprite + * to have a unique animation, you should favor using global animations instead, as they allow for + * the same animation to be used across multiple Sprites, saving on memory. However, if this Sprite + * is the only one to use this animation, it's sensible to create it here. + * + * If an invalid key is given this method will return `false`. + * + * If you pass the key of an animation that already exists locally, that animation will be returned. + * + * A brand new animation is only created if the key is valid and not already in use by this Sprite. + * + * If you wish to re-use an existing key, call the `remove` method first, then this method. + * + * @method Phaser.Animations.AnimationState#create + * @since 3.50.0 + * + * @param {Phaser.Types.Animations.Animation} config - The configuration settings for the Animation. + * + * @return {(Phaser.Animations.Animation|false)} The Animation that was created, or `false` if the key is already in use. + */ + create: function (config) + { + var key = config.key; + + var anim = false; + + if (key) + { + anim = this.get(key); + + if (!anim) + { + anim = new Animation(this, key, config); + + if (!this.anims) + { + this.anims = new CustomMap(); + } + + this.anims.set(key, anim); + } + } + + return anim; + }, + + /** + * Removes a locally created Animation from this Sprite, based on the given key. + * + * Once an Animation has been removed, this Sprite cannot play it again without re-creating it. + * + * @method Phaser.Animations.AnimationState#remove + * @since 3.50.0 + * + * @param {string} key - The key of the animation to remove. + * + * @return {Phaser.Animations.Animation} The Animation instance that was removed from this Sprite, if the key was valid. + */ + remove: function (key) + { + var anim = this.get(key); + + if (anim) + { + if (this.currentAnim === anim) + { + this.stop(); + } + + this.anims.delete(key); + } + + return anim; + }, + + /** + * Destroy this Animation component. + * + * Unregisters event listeners and cleans up its references. + * + * @method Phaser.Animations.AnimationState#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.animationManager.off(Events.REMOVE_ANIMATION, this.globalRemove, this); + + if (this.anims) + { + this.anims.clear(); + } + + this.animationManager = null; + this.parent = null; + this.nextAnim = null; + this.nextAnimsQueue.length = 0; + + this.currentAnim = null; + this.currentFrame = null; + }, + + /** + * `true` if the current animation is paused, otherwise `false`. + * + * @name Phaser.Animations.AnimationState#isPaused + * @readonly + * @type {boolean} + * @since 3.4.0 + */ + isPaused: { + + get: function () + { + return this._paused; + } + + } + +}); + +module.exports = AnimationState; + + +/***/ }), +/* 249 */, +/* 250 */, +/* 251 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53692,65 +56361,65 @@ module.exports = WrapDegrees; module.exports = { - AlignTo: __webpack_require__(531), - Angle: __webpack_require__(532), - Call: __webpack_require__(533), - GetFirst: __webpack_require__(534), - GetLast: __webpack_require__(535), - GridAlign: __webpack_require__(536), - IncAlpha: __webpack_require__(597), - IncX: __webpack_require__(598), - IncXY: __webpack_require__(599), - IncY: __webpack_require__(600), - PlaceOnCircle: __webpack_require__(601), - PlaceOnEllipse: __webpack_require__(602), - PlaceOnLine: __webpack_require__(603), - PlaceOnRectangle: __webpack_require__(604), - PlaceOnTriangle: __webpack_require__(605), - PlayAnimation: __webpack_require__(606), - PropertyValueInc: __webpack_require__(38), + AlignTo: __webpack_require__(553), + Angle: __webpack_require__(554), + Call: __webpack_require__(555), + GetFirst: __webpack_require__(556), + GetLast: __webpack_require__(557), + GridAlign: __webpack_require__(558), + IncAlpha: __webpack_require__(603), + IncX: __webpack_require__(604), + IncXY: __webpack_require__(605), + IncY: __webpack_require__(606), + PlaceOnCircle: __webpack_require__(607), + PlaceOnEllipse: __webpack_require__(608), + PlaceOnLine: __webpack_require__(609), + PlaceOnRectangle: __webpack_require__(610), + PlaceOnTriangle: __webpack_require__(611), + PlayAnimation: __webpack_require__(612), + PropertyValueInc: __webpack_require__(39), PropertyValueSet: __webpack_require__(25), - RandomCircle: __webpack_require__(607), - RandomEllipse: __webpack_require__(608), - RandomLine: __webpack_require__(609), - RandomRectangle: __webpack_require__(610), - RandomTriangle: __webpack_require__(611), - Rotate: __webpack_require__(612), - RotateAround: __webpack_require__(613), - RotateAroundDistance: __webpack_require__(614), - ScaleX: __webpack_require__(615), - ScaleXY: __webpack_require__(616), - ScaleY: __webpack_require__(617), - SetAlpha: __webpack_require__(618), - SetBlendMode: __webpack_require__(619), - SetDepth: __webpack_require__(620), - SetHitArea: __webpack_require__(621), - SetOrigin: __webpack_require__(622), - SetRotation: __webpack_require__(623), - SetScale: __webpack_require__(624), - SetScaleX: __webpack_require__(625), - SetScaleY: __webpack_require__(626), - SetScrollFactor: __webpack_require__(627), - SetScrollFactorX: __webpack_require__(628), - SetScrollFactorY: __webpack_require__(629), - SetTint: __webpack_require__(630), - SetVisible: __webpack_require__(631), - SetX: __webpack_require__(632), - SetXY: __webpack_require__(633), - SetY: __webpack_require__(634), - ShiftPosition: __webpack_require__(635), - Shuffle: __webpack_require__(636), - SmootherStep: __webpack_require__(637), - SmoothStep: __webpack_require__(638), - Spread: __webpack_require__(639), - ToggleVisible: __webpack_require__(640), - WrapInRectangle: __webpack_require__(641) + RandomCircle: __webpack_require__(613), + RandomEllipse: __webpack_require__(614), + RandomLine: __webpack_require__(615), + RandomRectangle: __webpack_require__(616), + RandomTriangle: __webpack_require__(617), + Rotate: __webpack_require__(618), + RotateAround: __webpack_require__(619), + RotateAroundDistance: __webpack_require__(620), + ScaleX: __webpack_require__(621), + ScaleXY: __webpack_require__(622), + ScaleY: __webpack_require__(623), + SetAlpha: __webpack_require__(624), + SetBlendMode: __webpack_require__(625), + SetDepth: __webpack_require__(626), + SetHitArea: __webpack_require__(627), + SetOrigin: __webpack_require__(628), + SetRotation: __webpack_require__(629), + SetScale: __webpack_require__(630), + SetScaleX: __webpack_require__(631), + SetScaleY: __webpack_require__(632), + SetScrollFactor: __webpack_require__(633), + SetScrollFactorX: __webpack_require__(634), + SetScrollFactorY: __webpack_require__(635), + SetTint: __webpack_require__(636), + SetVisible: __webpack_require__(637), + SetX: __webpack_require__(638), + SetXY: __webpack_require__(639), + SetY: __webpack_require__(640), + ShiftPosition: __webpack_require__(641), + Shuffle: __webpack_require__(642), + SmootherStep: __webpack_require__(643), + SmoothStep: __webpack_require__(644), + Spread: __webpack_require__(645), + ToggleVisible: __webpack_require__(646), + WrapInRectangle: __webpack_require__(647) }; /***/ }), -/* 246 */ +/* 252 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53759,22 +56428,22 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ALIGN_CONST = __webpack_require__(106); +var ALIGN_CONST = __webpack_require__(107); var AlignToMap = []; -AlignToMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(247); -AlignToMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(248); -AlignToMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(249); -AlignToMap[ALIGN_CONST.LEFT_BOTTOM] = __webpack_require__(250); -AlignToMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(251); -AlignToMap[ALIGN_CONST.LEFT_TOP] = __webpack_require__(252); -AlignToMap[ALIGN_CONST.RIGHT_BOTTOM] = __webpack_require__(253); -AlignToMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(254); -AlignToMap[ALIGN_CONST.RIGHT_TOP] = __webpack_require__(255); -AlignToMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(256); -AlignToMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(257); -AlignToMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(258); +AlignToMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(253); +AlignToMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(254); +AlignToMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(255); +AlignToMap[ALIGN_CONST.LEFT_BOTTOM] = __webpack_require__(256); +AlignToMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(257); +AlignToMap[ALIGN_CONST.LEFT_TOP] = __webpack_require__(258); +AlignToMap[ALIGN_CONST.RIGHT_BOTTOM] = __webpack_require__(259); +AlignToMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(260); +AlignToMap[ALIGN_CONST.RIGHT_TOP] = __webpack_require__(261); +AlignToMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(262); +AlignToMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(263); +AlignToMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(264); /** * Takes a Game Object and aligns it next to another, at the given position. @@ -53802,7 +56471,7 @@ module.exports = QuickSet; /***/ }), -/* 247 */ +/* 253 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53811,10 +56480,10 @@ module.exports = QuickSet; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetBottom = __webpack_require__(34); -var GetCenterX = __webpack_require__(76); -var SetCenterX = __webpack_require__(77); -var SetTop = __webpack_require__(44); +var GetBottom = __webpack_require__(35); +var GetCenterX = __webpack_require__(77); +var SetCenterX = __webpack_require__(78); +var SetTop = __webpack_require__(45); /** * Takes given Game Object and aligns it so that it is positioned next to the bottom center position of the other. @@ -53846,7 +56515,7 @@ module.exports = BottomCenter; /***/ }), -/* 248 */ +/* 254 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53855,10 +56524,10 @@ module.exports = BottomCenter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetBottom = __webpack_require__(34); -var GetLeft = __webpack_require__(35); -var SetLeft = __webpack_require__(45); -var SetTop = __webpack_require__(44); +var GetBottom = __webpack_require__(35); +var GetLeft = __webpack_require__(36); +var SetLeft = __webpack_require__(46); +var SetTop = __webpack_require__(45); /** * Takes given Game Object and aligns it so that it is positioned next to the bottom left position of the other. @@ -53890,7 +56559,7 @@ module.exports = BottomLeft; /***/ }), -/* 249 */ +/* 255 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53899,10 +56568,10 @@ module.exports = BottomLeft; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetBottom = __webpack_require__(34); -var GetRight = __webpack_require__(36); -var SetRight = __webpack_require__(46); -var SetTop = __webpack_require__(44); +var GetBottom = __webpack_require__(35); +var GetRight = __webpack_require__(37); +var SetRight = __webpack_require__(47); +var SetTop = __webpack_require__(45); /** * Takes given Game Object and aligns it so that it is positioned next to the bottom right position of the other. @@ -53934,7 +56603,7 @@ module.exports = BottomRight; /***/ }), -/* 250 */ +/* 256 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53943,10 +56612,10 @@ module.exports = BottomRight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetBottom = __webpack_require__(34); -var GetLeft = __webpack_require__(35); -var SetBottom = __webpack_require__(47); -var SetRight = __webpack_require__(46); +var GetBottom = __webpack_require__(35); +var GetLeft = __webpack_require__(36); +var SetBottom = __webpack_require__(48); +var SetRight = __webpack_require__(47); /** * Takes given Game Object and aligns it so that it is positioned next to the left bottom position of the other. @@ -53978,7 +56647,7 @@ module.exports = LeftBottom; /***/ }), -/* 251 */ +/* 257 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53987,10 +56656,10 @@ module.exports = LeftBottom; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetCenterY = __webpack_require__(78); -var GetLeft = __webpack_require__(35); -var SetCenterY = __webpack_require__(79); -var SetRight = __webpack_require__(46); +var GetCenterY = __webpack_require__(79); +var GetLeft = __webpack_require__(36); +var SetCenterY = __webpack_require__(80); +var SetRight = __webpack_require__(47); /** * Takes given Game Object and aligns it so that it is positioned next to the left center position of the other. @@ -54022,7 +56691,7 @@ module.exports = LeftCenter; /***/ }), -/* 252 */ +/* 258 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54031,10 +56700,10 @@ module.exports = LeftCenter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLeft = __webpack_require__(35); -var GetTop = __webpack_require__(37); -var SetRight = __webpack_require__(46); -var SetTop = __webpack_require__(44); +var GetLeft = __webpack_require__(36); +var GetTop = __webpack_require__(38); +var SetRight = __webpack_require__(47); +var SetTop = __webpack_require__(45); /** * Takes given Game Object and aligns it so that it is positioned next to the left top position of the other. @@ -54066,7 +56735,7 @@ module.exports = LeftTop; /***/ }), -/* 253 */ +/* 259 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54075,10 +56744,10 @@ module.exports = LeftTop; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetBottom = __webpack_require__(34); -var GetRight = __webpack_require__(36); -var SetBottom = __webpack_require__(47); -var SetLeft = __webpack_require__(45); +var GetBottom = __webpack_require__(35); +var GetRight = __webpack_require__(37); +var SetBottom = __webpack_require__(48); +var SetLeft = __webpack_require__(46); /** * Takes given Game Object and aligns it so that it is positioned next to the right bottom position of the other. @@ -54110,7 +56779,7 @@ module.exports = RightBottom; /***/ }), -/* 254 */ +/* 260 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54119,10 +56788,10 @@ module.exports = RightBottom; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetCenterY = __webpack_require__(78); -var GetRight = __webpack_require__(36); -var SetCenterY = __webpack_require__(79); -var SetLeft = __webpack_require__(45); +var GetCenterY = __webpack_require__(79); +var GetRight = __webpack_require__(37); +var SetCenterY = __webpack_require__(80); +var SetLeft = __webpack_require__(46); /** * Takes given Game Object and aligns it so that it is positioned next to the right center position of the other. @@ -54154,7 +56823,7 @@ module.exports = RightCenter; /***/ }), -/* 255 */ +/* 261 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54163,10 +56832,10 @@ module.exports = RightCenter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetRight = __webpack_require__(36); -var GetTop = __webpack_require__(37); -var SetLeft = __webpack_require__(45); -var SetTop = __webpack_require__(44); +var GetRight = __webpack_require__(37); +var GetTop = __webpack_require__(38); +var SetLeft = __webpack_require__(46); +var SetTop = __webpack_require__(45); /** * Takes given Game Object and aligns it so that it is positioned next to the right top position of the other. @@ -54198,7 +56867,7 @@ module.exports = RightTop; /***/ }), -/* 256 */ +/* 262 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54207,10 +56876,10 @@ module.exports = RightTop; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetCenterX = __webpack_require__(76); -var GetTop = __webpack_require__(37); -var SetBottom = __webpack_require__(47); -var SetCenterX = __webpack_require__(77); +var GetCenterX = __webpack_require__(77); +var GetTop = __webpack_require__(38); +var SetBottom = __webpack_require__(48); +var SetCenterX = __webpack_require__(78); /** * Takes given Game Object and aligns it so that it is positioned next to the top center position of the other. @@ -54242,7 +56911,7 @@ module.exports = TopCenter; /***/ }), -/* 257 */ +/* 263 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54251,10 +56920,10 @@ module.exports = TopCenter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLeft = __webpack_require__(35); -var GetTop = __webpack_require__(37); -var SetBottom = __webpack_require__(47); -var SetLeft = __webpack_require__(45); +var GetLeft = __webpack_require__(36); +var GetTop = __webpack_require__(38); +var SetBottom = __webpack_require__(48); +var SetLeft = __webpack_require__(46); /** * Takes given Game Object and aligns it so that it is positioned next to the top left position of the other. @@ -54286,7 +56955,7 @@ module.exports = TopLeft; /***/ }), -/* 258 */ +/* 264 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54295,10 +56964,10 @@ module.exports = TopLeft; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetRight = __webpack_require__(36); -var GetTop = __webpack_require__(37); -var SetBottom = __webpack_require__(47); -var SetRight = __webpack_require__(46); +var GetRight = __webpack_require__(37); +var GetTop = __webpack_require__(38); +var SetBottom = __webpack_require__(48); +var SetRight = __webpack_require__(47); /** * Takes given Game Object and aligns it so that it is positioned next to the top right position of the other. @@ -54330,7 +56999,7 @@ module.exports = TopRight; /***/ }), -/* 259 */ +/* 265 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54339,19 +57008,19 @@ module.exports = TopRight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ALIGN_CONST = __webpack_require__(106); +var ALIGN_CONST = __webpack_require__(107); var AlignInMap = []; -AlignInMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(260); -AlignInMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(261); -AlignInMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(262); -AlignInMap[ALIGN_CONST.CENTER] = __webpack_require__(263); -AlignInMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(265); -AlignInMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(266); -AlignInMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(267); -AlignInMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(268); -AlignInMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(269); +AlignInMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(266); +AlignInMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(267); +AlignInMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(268); +AlignInMap[ALIGN_CONST.CENTER] = __webpack_require__(269); +AlignInMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(271); +AlignInMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(272); +AlignInMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(273); +AlignInMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(274); +AlignInMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(275); AlignInMap[ALIGN_CONST.LEFT_BOTTOM] = AlignInMap[ALIGN_CONST.BOTTOM_LEFT]; AlignInMap[ALIGN_CONST.LEFT_TOP] = AlignInMap[ALIGN_CONST.TOP_LEFT]; AlignInMap[ALIGN_CONST.RIGHT_BOTTOM] = AlignInMap[ALIGN_CONST.BOTTOM_RIGHT]; @@ -54383,7 +57052,7 @@ module.exports = QuickSet; /***/ }), -/* 260 */ +/* 266 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54392,10 +57061,10 @@ module.exports = QuickSet; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetBottom = __webpack_require__(34); -var GetCenterX = __webpack_require__(76); -var SetBottom = __webpack_require__(47); -var SetCenterX = __webpack_require__(77); +var GetBottom = __webpack_require__(35); +var GetCenterX = __webpack_require__(77); +var SetBottom = __webpack_require__(48); +var SetCenterX = __webpack_require__(78); /** * Takes given Game Object and aligns it so that it is positioned in the bottom center of the other. @@ -54427,7 +57096,7 @@ module.exports = BottomCenter; /***/ }), -/* 261 */ +/* 267 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54436,10 +57105,10 @@ module.exports = BottomCenter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetBottom = __webpack_require__(34); -var GetLeft = __webpack_require__(35); -var SetBottom = __webpack_require__(47); -var SetLeft = __webpack_require__(45); +var GetBottom = __webpack_require__(35); +var GetLeft = __webpack_require__(36); +var SetBottom = __webpack_require__(48); +var SetLeft = __webpack_require__(46); /** * Takes given Game Object and aligns it so that it is positioned in the bottom left of the other. @@ -54471,7 +57140,7 @@ module.exports = BottomLeft; /***/ }), -/* 262 */ +/* 268 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54480,10 +57149,10 @@ module.exports = BottomLeft; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetBottom = __webpack_require__(34); -var GetRight = __webpack_require__(36); -var SetBottom = __webpack_require__(47); -var SetRight = __webpack_require__(46); +var GetBottom = __webpack_require__(35); +var GetRight = __webpack_require__(37); +var SetBottom = __webpack_require__(48); +var SetRight = __webpack_require__(47); /** * Takes given Game Object and aligns it so that it is positioned in the bottom right of the other. @@ -54515,7 +57184,7 @@ module.exports = BottomRight; /***/ }), -/* 263 */ +/* 269 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54524,9 +57193,9 @@ module.exports = BottomRight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CenterOn = __webpack_require__(264); -var GetCenterX = __webpack_require__(76); -var GetCenterY = __webpack_require__(78); +var CenterOn = __webpack_require__(270); +var GetCenterX = __webpack_require__(77); +var GetCenterY = __webpack_require__(79); /** * Takes given Game Object and aligns it so that it is positioned in the center of the other. @@ -54557,7 +57226,7 @@ module.exports = Center; /***/ }), -/* 264 */ +/* 270 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54566,8 +57235,8 @@ module.exports = Center; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetCenterX = __webpack_require__(77); -var SetCenterY = __webpack_require__(79); +var SetCenterX = __webpack_require__(78); +var SetCenterY = __webpack_require__(80); /** * Positions the Game Object so that it is centered on the given coordinates. @@ -54594,7 +57263,7 @@ module.exports = CenterOn; /***/ }), -/* 265 */ +/* 271 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54603,10 +57272,10 @@ module.exports = CenterOn; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetCenterY = __webpack_require__(78); -var GetLeft = __webpack_require__(35); -var SetCenterY = __webpack_require__(79); -var SetLeft = __webpack_require__(45); +var GetCenterY = __webpack_require__(79); +var GetLeft = __webpack_require__(36); +var SetCenterY = __webpack_require__(80); +var SetLeft = __webpack_require__(46); /** * Takes given Game Object and aligns it so that it is positioned in the left center of the other. @@ -54638,7 +57307,7 @@ module.exports = LeftCenter; /***/ }), -/* 266 */ +/* 272 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54647,10 +57316,10 @@ module.exports = LeftCenter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetCenterY = __webpack_require__(78); -var GetRight = __webpack_require__(36); -var SetCenterY = __webpack_require__(79); -var SetRight = __webpack_require__(46); +var GetCenterY = __webpack_require__(79); +var GetRight = __webpack_require__(37); +var SetCenterY = __webpack_require__(80); +var SetRight = __webpack_require__(47); /** * Takes given Game Object and aligns it so that it is positioned in the right center of the other. @@ -54682,7 +57351,7 @@ module.exports = RightCenter; /***/ }), -/* 267 */ +/* 273 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54691,10 +57360,10 @@ module.exports = RightCenter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetCenterX = __webpack_require__(76); -var GetTop = __webpack_require__(37); -var SetCenterX = __webpack_require__(77); -var SetTop = __webpack_require__(44); +var GetCenterX = __webpack_require__(77); +var GetTop = __webpack_require__(38); +var SetCenterX = __webpack_require__(78); +var SetTop = __webpack_require__(45); /** * Takes given Game Object and aligns it so that it is positioned in the top center of the other. @@ -54726,7 +57395,7 @@ module.exports = TopCenter; /***/ }), -/* 268 */ +/* 274 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54735,10 +57404,10 @@ module.exports = TopCenter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLeft = __webpack_require__(35); -var GetTop = __webpack_require__(37); -var SetLeft = __webpack_require__(45); -var SetTop = __webpack_require__(44); +var GetLeft = __webpack_require__(36); +var GetTop = __webpack_require__(38); +var SetLeft = __webpack_require__(46); +var SetTop = __webpack_require__(45); /** * Takes given Game Object and aligns it so that it is positioned in the top left of the other. @@ -54770,7 +57439,7 @@ module.exports = TopLeft; /***/ }), -/* 269 */ +/* 275 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54779,10 +57448,10 @@ module.exports = TopLeft; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetRight = __webpack_require__(36); -var GetTop = __webpack_require__(37); -var SetRight = __webpack_require__(46); -var SetTop = __webpack_require__(44); +var GetRight = __webpack_require__(37); +var GetTop = __webpack_require__(38); +var SetRight = __webpack_require__(47); +var SetTop = __webpack_require__(45); /** * Takes given Game Object and aligns it so that it is positioned in the top right of the other. @@ -54814,7 +57483,7 @@ module.exports = TopRight; /***/ }), -/* 270 */ +/* 276 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54823,8 +57492,8 @@ module.exports = TopRight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CircumferencePoint = __webpack_require__(154); -var FromPercent = __webpack_require__(88); +var CircumferencePoint = __webpack_require__(157); +var FromPercent = __webpack_require__(89); var MATH_CONST = __webpack_require__(13); var Point = __webpack_require__(4); @@ -54857,7 +57526,7 @@ module.exports = GetPoint; /***/ }), -/* 271 */ +/* 277 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54866,9 +57535,9 @@ module.exports = GetPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circumference = __webpack_require__(272); -var CircumferencePoint = __webpack_require__(154); -var FromPercent = __webpack_require__(88); +var Circumference = __webpack_require__(278); +var CircumferencePoint = __webpack_require__(157); +var FromPercent = __webpack_require__(89); var MATH_CONST = __webpack_require__(13); /** @@ -54909,7 +57578,7 @@ module.exports = GetPoints; /***/ }), -/* 272 */ +/* 278 */ /***/ (function(module, exports) { /** @@ -54937,7 +57606,7 @@ module.exports = Circumference; /***/ }), -/* 273 */ +/* 279 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55047,91 +57716,7 @@ module.exports = AlphaSingle; /***/ }), -/* 274 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Searches a pre-sorted array for the closet value to the given number. - * - * If the `key` argument is given it will assume the array contains objects that all have the required `key` property name, - * and will check for the closest value of those to the given number. - * - * @function Phaser.Utils.Array.FindClosestInSorted - * @since 3.0.0 - * - * @param {number} value - The value to search for in the array. - * @param {array} array - The array to search, which must be sorted. - * @param {string} [key] - An optional property key. If specified the array elements property will be checked against value. - * - * @return {(number|any)} The nearest value found in the array, or if a `key` was given, the nearest object with the matching property value. - */ -var FindClosestInSorted = function (value, array, key) -{ - if (!array.length) - { - return NaN; - } - else if (array.length === 1) - { - return array[0]; - } - - var i = 1; - var low; - var high; - - if (key) - { - if (value < array[0][key]) - { - return array[0]; - } - - while (array[i][key] < value) - { - i++; - } - } - else - { - while (array[i] < value) - { - i++; - } - } - - if (i > array.length) - { - i = array.length; - } - - if (key) - { - low = array[i - 1][key]; - high = array[i][key]; - - return ((high - value) <= (value - low)) ? array[i] : array[i - 1]; - } - else - { - low = array[i - 1]; - high = array[i]; - - return ((high - value) <= (value - low)) ? high : low; - } -}; - -module.exports = FindClosestInSorted; - - -/***/ }), -/* 275 */ +/* 280 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55140,181 +57725,7 @@ module.exports = FindClosestInSorted; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Class = __webpack_require__(0); - -/** - * @classdesc - * A single frame in an Animation sequence. - * - * An AnimationFrame consists of a reference to the Texture it uses for rendering, references to other - * frames in the animation, and index data. It also has the ability to modify the animation timing. - * - * AnimationFrames are generated automatically by the Animation class. - * - * @class AnimationFrame - * @memberof Phaser.Animations - * @constructor - * @since 3.0.0 - * - * @param {string} textureKey - The key of the Texture this AnimationFrame uses. - * @param {(string|integer)} textureFrame - The key of the Frame within the Texture that this AnimationFrame uses. - * @param {integer} index - The index of this AnimationFrame within the Animation sequence. - * @param {Phaser.Textures.Frame} frame - A reference to the Texture Frame this AnimationFrame uses for rendering. - */ -var AnimationFrame = new Class({ - - initialize: - - function AnimationFrame (textureKey, textureFrame, index, frame) - { - /** - * The key of the Texture this AnimationFrame uses. - * - * @name Phaser.Animations.AnimationFrame#textureKey - * @type {string} - * @since 3.0.0 - */ - this.textureKey = textureKey; - - /** - * The key of the Frame within the Texture that this AnimationFrame uses. - * - * @name Phaser.Animations.AnimationFrame#textureFrame - * @type {(string|integer)} - * @since 3.0.0 - */ - this.textureFrame = textureFrame; - - /** - * The index of this AnimationFrame within the Animation sequence. - * - * @name Phaser.Animations.AnimationFrame#index - * @type {integer} - * @since 3.0.0 - */ - this.index = index; - - /** - * A reference to the Texture Frame this AnimationFrame uses for rendering. - * - * @name Phaser.Animations.AnimationFrame#frame - * @type {Phaser.Textures.Frame} - * @since 3.0.0 - */ - this.frame = frame; - - /** - * Is this the first frame in an animation sequence? - * - * @name Phaser.Animations.AnimationFrame#isFirst - * @type {boolean} - * @default false - * @readonly - * @since 3.0.0 - */ - this.isFirst = false; - - /** - * Is this the last frame in an animation sequence? - * - * @name Phaser.Animations.AnimationFrame#isLast - * @type {boolean} - * @default false - * @readonly - * @since 3.0.0 - */ - this.isLast = false; - - /** - * A reference to the AnimationFrame that comes before this one in the animation, if any. - * - * @name Phaser.Animations.AnimationFrame#prevFrame - * @type {?Phaser.Animations.AnimationFrame} - * @default null - * @readonly - * @since 3.0.0 - */ - this.prevFrame = null; - - /** - * A reference to the AnimationFrame that comes after this one in the animation, if any. - * - * @name Phaser.Animations.AnimationFrame#nextFrame - * @type {?Phaser.Animations.AnimationFrame} - * @default null - * @readonly - * @since 3.0.0 - */ - this.nextFrame = null; - - /** - * Additional time (in ms) that this frame should appear for during playback. - * The value is added onto the msPerFrame set by the animation. - * - * @name Phaser.Animations.AnimationFrame#duration - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.duration = 0; - - /** - * What % through the animation does this frame come? - * This value is generated when the animation is created and cached here. - * - * @name Phaser.Animations.AnimationFrame#progress - * @type {number} - * @default 0 - * @readonly - * @since 3.0.0 - */ - this.progress = 0; - }, - - /** - * Generates a JavaScript object suitable for converting to JSON. - * - * @method Phaser.Animations.AnimationFrame#toJSON - * @since 3.0.0 - * - * @return {Phaser.Types.Animations.JSONAnimationFrame} The AnimationFrame data. - */ - toJSON: function () - { - return { - key: this.textureKey, - frame: this.textureFrame, - duration: this.duration - }; - }, - - /** - * Destroys this object by removing references to external resources and callbacks. - * - * @method Phaser.Animations.AnimationFrame#destroy - * @since 3.0.0 - */ - destroy: function () - { - this.frame = undefined; - } - -}); - -module.exports = AnimationFrame; - - -/***/ }), -/* 276 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var BlendModes = __webpack_require__(53); +var BlendModes = __webpack_require__(54); /** * Provides methods used for setting the blend mode of a Game Object. @@ -55427,7 +57838,7 @@ module.exports = BlendMode; /***/ }), -/* 277 */ +/* 281 */ /***/ (function(module, exports) { /** @@ -55520,7 +57931,7 @@ module.exports = Depth; /***/ }), -/* 278 */ +/* 282 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55529,7 +57940,7 @@ module.exports = Depth; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetPoint = __webpack_require__(157); +var GetPoint = __webpack_require__(159); var Perimeter = __webpack_require__(116); // Return an array of points from the perimeter of the rectangle @@ -55574,7 +57985,7 @@ module.exports = GetPoints; /***/ }), -/* 279 */ +/* 283 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55613,7 +58024,7 @@ module.exports = GetPoint; /***/ }), -/* 280 */ +/* 284 */ /***/ (function(module, exports) { /** @@ -55657,7 +58068,7 @@ module.exports = RotateAround; /***/ }), -/* 281 */ +/* 285 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55666,8 +58077,8 @@ module.exports = RotateAround; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapMask = __webpack_require__(282); -var GeometryMask = __webpack_require__(283); +var BitmapMask = __webpack_require__(286); +var GeometryMask = __webpack_require__(287); /** * Provides methods used for getting and setting the mask of a Game Object. @@ -55804,7 +58215,7 @@ module.exports = Mask; /***/ }), -/* 282 */ +/* 286 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55814,7 +58225,7 @@ module.exports = Mask; */ var Class = __webpack_require__(0); -var GameEvents = __webpack_require__(20); +var GameEvents = __webpack_require__(21); /** * @classdesc @@ -56097,7 +58508,7 @@ module.exports = BitmapMask; /***/ }), -/* 283 */ +/* 287 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56412,7 +58823,7 @@ module.exports = GeometryMask; /***/ }), -/* 284 */ +/* 288 */ /***/ (function(module, exports) { /** @@ -56519,7 +58930,7 @@ module.exports = ScrollFactor; /***/ }), -/* 285 */ +/* 289 */ /***/ (function(module, exports) { /** @@ -56580,7 +58991,7 @@ module.exports = ToJSON; /***/ }), -/* 286 */ +/* 290 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56590,10 +59001,10 @@ module.exports = ToJSON; */ var MATH_CONST = __webpack_require__(13); -var TransformMatrix = __webpack_require__(30); -var TransformXY = __webpack_require__(162); -var WrapAngle = __webpack_require__(241); -var WrapAngleDegrees = __webpack_require__(242); +var TransformMatrix = __webpack_require__(31); +var TransformXY = __webpack_require__(164); +var WrapAngle = __webpack_require__(246); +var WrapAngleDegrees = __webpack_require__(247); var Vector2 = __webpack_require__(3); // global bitmask flag for GameObject.renderMask (used by Scale) @@ -57171,7 +59582,7 @@ module.exports = Transform; /***/ }), -/* 287 */ +/* 291 */ /***/ (function(module, exports) { /** @@ -57260,7 +59671,7 @@ module.exports = Visible; /***/ }), -/* 288 */ +/* 292 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57275,16 +59686,16 @@ module.exports = Visible; module.exports = { - CHANGE_DATA: __webpack_require__(582), - CHANGE_DATA_KEY: __webpack_require__(583), - REMOVE_DATA: __webpack_require__(584), - SET_DATA: __webpack_require__(585) + CHANGE_DATA: __webpack_require__(586), + CHANGE_DATA_KEY: __webpack_require__(587), + REMOVE_DATA: __webpack_require__(588), + SET_DATA: __webpack_require__(589) }; /***/ }), -/* 289 */ +/* 293 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57403,7 +59814,7 @@ module.exports = MarchingAnts; /***/ }), -/* 290 */ +/* 294 */ /***/ (function(module, exports) { /** @@ -57443,7 +59854,7 @@ module.exports = RotateLeft; /***/ }), -/* 291 */ +/* 295 */ /***/ (function(module, exports) { /** @@ -57483,7 +59894,7 @@ module.exports = RotateRight; /***/ }), -/* 292 */ +/* 296 */ /***/ (function(module, exports) { /** @@ -57557,7 +59968,91 @@ module.exports = BresenhamPoints; /***/ }), -/* 293 */ +/* 297 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Searches a pre-sorted array for the closet value to the given number. + * + * If the `key` argument is given it will assume the array contains objects that all have the required `key` property name, + * and will check for the closest value of those to the given number. + * + * @function Phaser.Utils.Array.FindClosestInSorted + * @since 3.0.0 + * + * @param {number} value - The value to search for in the array. + * @param {array} array - The array to search, which must be sorted. + * @param {string} [key] - An optional property key. If specified the array elements property will be checked against value. + * + * @return {(number|any)} The nearest value found in the array, or if a `key` was given, the nearest object with the matching property value. + */ +var FindClosestInSorted = function (value, array, key) +{ + if (!array.length) + { + return NaN; + } + else if (array.length === 1) + { + return array[0]; + } + + var i = 1; + var low; + var high; + + if (key) + { + if (value < array[0][key]) + { + return array[0]; + } + + while (array[i][key] < value) + { + i++; + } + } + else + { + while (array[i] < value) + { + i++; + } + } + + if (i > array.length) + { + i = array.length; + } + + if (key) + { + low = array[i - 1][key]; + high = array[i][key]; + + return ((high - value) <= (value - low)) ? array[i] : array[i - 1]; + } + else + { + low = array[i - 1]; + high = array[i]; + + return ((high - value) <= (value - low)) ? high : low; + } +}; + +module.exports = FindClosestInSorted; + + +/***/ }), +/* 298 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57566,14 +60061,228 @@ module.exports = BresenhamPoints; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Animation = __webpack_require__(156); var Class = __webpack_require__(0); -var CustomMap = __webpack_require__(168); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(115); -var GameEvents = __webpack_require__(20); + +/** + * @classdesc + * A single frame in an Animation sequence. + * + * An AnimationFrame consists of a reference to the Texture it uses for rendering, references to other + * frames in the animation, and index data. It also has the ability to modify the animation timing. + * + * AnimationFrames are generated automatically by the Animation class. + * + * @class AnimationFrame + * @memberof Phaser.Animations + * @constructor + * @since 3.0.0 + * + * @param {string} textureKey - The key of the Texture this AnimationFrame uses. + * @param {(string|integer)} textureFrame - The key of the Frame within the Texture that this AnimationFrame uses. + * @param {integer} index - The index of this AnimationFrame within the Animation sequence. + * @param {Phaser.Textures.Frame} frame - A reference to the Texture Frame this AnimationFrame uses for rendering. + */ +var AnimationFrame = new Class({ + + initialize: + + function AnimationFrame (textureKey, textureFrame, index, frame) + { + /** + * The key of the Texture this AnimationFrame uses. + * + * @name Phaser.Animations.AnimationFrame#textureKey + * @type {string} + * @since 3.0.0 + */ + this.textureKey = textureKey; + + /** + * The key of the Frame within the Texture that this AnimationFrame uses. + * + * @name Phaser.Animations.AnimationFrame#textureFrame + * @type {(string|integer)} + * @since 3.0.0 + */ + this.textureFrame = textureFrame; + + /** + * The index of this AnimationFrame within the Animation sequence. + * + * @name Phaser.Animations.AnimationFrame#index + * @type {integer} + * @since 3.0.0 + */ + this.index = index; + + /** + * A reference to the Texture Frame this AnimationFrame uses for rendering. + * + * @name Phaser.Animations.AnimationFrame#frame + * @type {Phaser.Textures.Frame} + * @since 3.0.0 + */ + this.frame = frame; + + /** + * Is this the first frame in an animation sequence? + * + * @name Phaser.Animations.AnimationFrame#isFirst + * @type {boolean} + * @default false + * @readonly + * @since 3.0.0 + */ + this.isFirst = false; + + /** + * Is this the last frame in an animation sequence? + * + * @name Phaser.Animations.AnimationFrame#isLast + * @type {boolean} + * @default false + * @readonly + * @since 3.0.0 + */ + this.isLast = false; + + /** + * A reference to the AnimationFrame that comes before this one in the animation, if any. + * + * @name Phaser.Animations.AnimationFrame#prevFrame + * @type {?Phaser.Animations.AnimationFrame} + * @default null + * @readonly + * @since 3.0.0 + */ + this.prevFrame = null; + + /** + * A reference to the AnimationFrame that comes after this one in the animation, if any. + * + * @name Phaser.Animations.AnimationFrame#nextFrame + * @type {?Phaser.Animations.AnimationFrame} + * @default null + * @readonly + * @since 3.0.0 + */ + this.nextFrame = null; + + /** + * Additional time (in ms) that this frame should appear for during playback. + * The value is added onto the msPerFrame set by the animation. + * + * @name Phaser.Animations.AnimationFrame#duration + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.duration = 0; + + /** + * What % through the animation does this frame come? + * This value is generated when the animation is created and cached here. + * + * @name Phaser.Animations.AnimationFrame#progress + * @type {number} + * @default 0 + * @readonly + * @since 3.0.0 + */ + this.progress = 0; + }, + + /** + * Generates a JavaScript object suitable for converting to JSON. + * + * @method Phaser.Animations.AnimationFrame#toJSON + * @since 3.0.0 + * + * @return {Phaser.Types.Animations.JSONAnimationFrame} The AnimationFrame data. + */ + toJSON: function () + { + return { + key: this.textureKey, + frame: this.textureFrame, + duration: this.duration + }; + }, + + /** + * Destroys this object by removing references to external resources and callbacks. + * + * @method Phaser.Animations.AnimationFrame#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.frame = undefined; + } + +}); + +module.exports = AnimationFrame; + + +/***/ }), +/* 299 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Takes the given array and runs a numeric sort on it, ignoring any non-digits that + * may be in the entries. + * + * You should only run this on arrays containing strings. + * + * @function Phaser.Utils.Array.SortByDigits + * @since 3.50.0 + * + * @param {string[]} array - The input array of strings. + * + * @return {string[]} The sorted input array. + */ +var SortByDigits = function (array) +{ + var re = /\D/g; + + array.sort(function (a, b) + { + return (parseInt(a.replace(re, ''), 10) - parseInt(b.replace(re, ''), 10)); + }); + + return array; +}; + +module.exports = SortByDigits; + + +/***/ }), +/* 300 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Animation = __webpack_require__(170); +var Class = __webpack_require__(0); +var CustomMap = __webpack_require__(121); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(120); +var GameEvents = __webpack_require__(21); +var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); -var Pad = __webpack_require__(169); +var Pad = __webpack_require__(171); +var NumberArray = __webpack_require__(301); /** * @classdesc @@ -57647,6 +60356,17 @@ var AnimationManager = new Class({ */ this.anims = new CustomMap(); + /** + * A list of animation mix times. + * + * See the {@link #setMix} method for more details. + * + * @name Phaser.Animations.AnimationManager#mixes + * @type {Phaser.Structs.Map.} + * @since 3.50.0 + */ + this.mixes = new CustomMap(); + /** * Whether the Animation Manager is paused along with all of its Animations. * @@ -57683,6 +60403,144 @@ var AnimationManager = new Class({ this.game.events.once(GameEvents.DESTROY, this.destroy, this); }, + /** + * Adds a mix between two animations. + * + * Mixing allows you to specify a unique delay between a pairing of animations. + * + * When playing Animation A on a Game Object, if you then play Animation B, and a + * mix exists, it will wait for the specified delay to be over before playing Animation B. + * + * This allows you to customise smoothing between different types of animation, such + * as blending between an idle and a walk state, or a running and a firing state. + * + * Note that mixing is only applied if you use the `Sprite.play` method. If you opt to use + * `playAfterRepeat` or `playAfterDelay` instead, those will take pririty and the mix + * delay will not be used. + * + * To update an existing mix, just call this method with the new delay. + * + * To remove a mix pairing, see the `removeMix` method. + * + * @method Phaser.Animations.AnimationManager#addMix + * @since 3.50.0 + * + * @param {(string|Phaser.Animations.Animation)} animA - The string-based key, or instance of, Animation A. + * @param {(string|Phaser.Animations.Animation)} animB - The string-based key, or instance of, Animation B. + * @param {number} delay - The delay, in milliseconds, to wait when transitioning from Animation A to B. + * + * @return {this} This Animation Manager. + */ + addMix: function (animA, animB, delay) + { + var anims = this.anims; + var mixes = this.mixes; + + var keyA = (typeof(animA) === 'string') ? animA : animA.key; + var keyB = (typeof(animB) === 'string') ? animB : animB.key; + + if (anims.has(keyA) && anims.has(keyB)) + { + var mixObj = mixes.get(keyA); + + if (!mixObj) + { + mixObj = {}; + } + + mixObj[keyB] = delay; + + mixes.set(keyA, mixObj); + } + + return this; + }, + + /** + * Removes a mix between two animations. + * + * Mixing allows you to specify a unique delay between a pairing of animations. + * + * Calling this method lets you remove those pairings. You can either remove + * it between `animA` and `animB`, or if you do not provide the `animB` parameter, + * it will remove all `animA` mixes. + * + * If you wish to update an existing mix instead, call the `addMix` method with the + * new delay. + * + * @method Phaser.Animations.AnimationManager#removeMix + * @since 3.50.0 + * + * @param {(string|Phaser.Animations.Animation)} animA - The string-based key, or instance of, Animation A. + * @param {(string|Phaser.Animations.Animation)} [animB] - The string-based key, or instance of, Animation B. If not given, all mixes for Animation A will be removed. + * + * @return {this} This Animation Manager. + */ + removeMix: function (animA, animB) + { + var mixes = this.mixes; + + var keyA = (typeof(animA) === 'string') ? animA : animA.key; + + var mixObj = mixes.get(keyA); + + if (mixObj) + { + if (animB) + { + var keyB = (typeof(animB) === 'string') ? animB : animB.key; + + if (mixObj.hasOwnProperty(keyB)) + { + // Remove just this pairing + delete mixObj[keyB]; + } + } + else if (!animB) + { + // Remove everything for animA + mixes.delete(keyA); + } + } + + return this; + }, + + /** + * Returns the mix delay between two animations. + * + * If no mix has been set-up, this method will return zero. + * + * If you wish to create, or update, a new mix, call the `addMix` method. + * If you wish to remove a mix, call the `removeMix` method. + * + * @method Phaser.Animations.AnimationManager#getMix + * @since 3.50.0 + * + * @param {(string|Phaser.Animations.Animation)} animA - The string-based key, or instance of, Animation A. + * @param {(string|Phaser.Animations.Animation)} animB - The string-based key, or instance of, Animation B. + * + * @return {number} The mix duration, or zero if no mix exists. + */ + getMix: function (animA, animB) + { + var mixes = this.mixes; + + var keyA = (typeof(animA) === 'string') ? animA : animA.key; + var keyB = (typeof(animB) === 'string') ? animB : animB.key; + + var mixObj = mixes.get(keyA); + + if (mixObj && mixObj.hasOwnProperty(keyB)) + { + return mixObj[keyB]; + } + else + { + return 0; + } + }, + /** * Adds an existing Animation to the Animation Manager. * @@ -57715,7 +60573,7 @@ var AnimationManager = new Class({ /** * Checks to see if the given key is already in use within the Animation Manager or not. - * + * * Animations are global. Keys created in one scene can be used from any other Scene in your game. They are not Scene specific. * * @method Phaser.Animations.AnimationManager#exists @@ -57730,17 +60588,189 @@ var AnimationManager = new Class({ return this.anims.has(key); }, + /** + * Create one, or more animations from a loaded Aseprite JSON file. + * + * Aseprite is a powerful animated sprite editor and pixel art tool. + * + * You can find more details at https://www.aseprite.org/ + * + * To export a compatible JSON file in Aseprite, please do the following: + * + * 1. Go to "File - Export Sprite Sheet" + * + * 2. On the **Layout** tab: + * 2a. Set the "Sheet type" to "Packed" + * 2b. Set the "Constraints" to "None" + * 2c. Check the "Merge Duplicates" checkbox + * + * 3. On the **Sprite** tab: + * 3a. Set "Layers" to "Visible layers" + * 3b. Set "Frames" to "All frames", unless you only wish to export a sub-set of tags + * + * 4. On the **Borders** tab: + * 4a. Check the "Trim Sprite" and "Trim Cells" options + * 4b. Ensure "Border Padding", "Spacing" and "Inner Padding" are all > 0 (1 is usually enough) + * + * 5. On the **Output** tab: + * 5a. Check "Output File", give your image a name and make sure you choose "png files" as the file type + * 5b. Check "JSON Data" and give your json file a name + * 5c. The JSON Data type can be either a Hash or Array, Phaser doesn't mind. + * 5d. Make sure "Tags" is checked in the Meta options + * 5e. In the "Item Filename" input box, make sure it says just "{frame}" and nothing more. + * + * 6. Click export + * + * This was tested with Aseprite 1.2.25. + * + * This will export a png and json file which you can load using the Atlas Loader, i.e.: + * + * ```javascript + * function preload () + * { + * this.load.path = 'assets/animations/aseprite/'; + * this.load.atlas('paladin', 'paladin.png', 'paladin.json'); + * } + * ``` + * + * Once exported, you can call this method from within a Scene with the 'atlas' key: + * + * ```javascript + * this.anims.createFromAseprite('paladin'); + * ``` + * + * Any animations defined in the JSON will now be available to use in Phaser and you play them + * via their Tag name. For example, if you have an animation called 'War Cry' on your Aseprite timeline, + * you can play it in Phaser using that Tag name: + * + * ```javascript + * this.add.sprite(400, 300).play('War Cry'); + * ``` + * + * When calling this method you can optionally provide an array of tag names, and only those animations + * will be created. For example: + * + * ```javascript + * this.anims.createFromAseprite('paladin', [ 'step', 'War Cry', 'Magnum Break' ]); + * ``` + * + * This will only create the 3 animations defined. Note that the tag names are case-sensitive. + * + * @method Phaser.Animations.AnimationManager#createFromAseprite + * @since 3.50.0 + * + * @param {string} key - The key of the loaded Aseprite atlas. It must have been loaded prior to calling this method. + * @param {string[]} [tags] - An array of Tag names. If provided, only animations found in this array will be created. + * + * @return {Phaser.Animations.Animation[]} An array of Animation instances that were successfully created. + */ + createFromAseprite: function (key, tags) + { + var output = []; + + var data = this.game.cache.json.get(key); + + if (!data) + { + return output; + } + + var _this = this; + + var meta = GetValue(data, 'meta', null); + var frames = GetValue(data, 'frames', null); + + if (meta && frames) + { + var frameTags = GetValue(meta, 'frameTags', []); + + frameTags.forEach(function (tag) + { + var animFrames = []; + + var name = GetFastValue(tag, 'name', null); + var from = GetFastValue(tag, 'from', 0); + var to = GetFastValue(tag, 'to', 0); + var direction = GetFastValue(tag, 'direction', 'forward'); + + if (!name) + { + // Skip if no name + return; + } + + if (!tags || (tags && tags.indexOf(name) > -1)) + { + // Get all the frames for this tag + var tempFrames = []; + var minDuration = Number.MAX_SAFE_INTEGER; + + for (var i = from; i <= to; i++) + { + var frameKey = i.toString(); + var frame = frames[frameKey]; + + if (frame) + { + var frameDuration = GetFastValue(frame, 'duration', Number.MAX_SAFE_INTEGER); + + if (frameDuration < minDuration) + { + minDuration = frameDuration; + } + + tempFrames.push({ frame: frameKey, duration: frameDuration }); + } + } + + tempFrames.forEach(function (entry) + { + animFrames.push({ + key: key, + frame: entry.frame, + duration: (minDuration - entry.duration) + }); + }); + + var totalDuration = (minDuration * animFrames.length); + + if (direction === 'reverse') + { + animFrames = animFrames.reverse(); + } + + // Create the animation + var createConfig = { + key: name, + frames: animFrames, + duration: totalDuration, + yoyo: (direction === 'pingpong') + }; + + var result = _this.create(createConfig); + + if (result) + { + output.push(result); + } + } + }); + } + + return output; + }, + /** * Creates a new Animation and adds it to the Animation Manager. - * + * * Animations are global. Once created, you can use them in any Scene in your game. They are not Scene specific. - * + * * If an invalid key is given this method will return `false`. - * + * * If you pass the key of an animation that already exists in the Animation Manager, that animation will be returned. - * + * * A brand new animation is only created if the key is valid and not already in use. - * + * * If you wish to re-use an existing key, call `AnimationManager.remove` first, then this method. * * @method Phaser.Animations.AnimationManager#create @@ -57749,7 +60779,7 @@ var AnimationManager = new Class({ * * @param {Phaser.Types.Animations.Animation} config - The configuration settings for the Animation. * - * @return {(Phaser.Animations.Animation|false)} The Animation that was created, or `false` is the key is already in use. + * @return {(Phaser.Animations.Animation|false)} The Animation that was created, or `false` if the key is already in use. */ create: function (config) { @@ -57766,7 +60796,7 @@ var AnimationManager = new Class({ anim = new Animation(this, key, config); this.anims.set(key, anim); - + this.emit(Events.ADD_ANIMATION, key, anim); } } @@ -57827,18 +60857,18 @@ var AnimationManager = new Class({ * Generate an array of {@link Phaser.Types.Animations.AnimationFrame} objects from a texture key and configuration object. * * Generates objects with string based frame names, as configured by the given {@link Phaser.Types.Animations.GenerateFrameNames}. - * + * * It's a helper method, designed to make it easier for you to extract all of the frame names from texture atlases. * If you're working with a sprite sheet, see the `generateFrameNumbers` method instead. - * + * * Example: - * + * * If you have a texture atlases loaded called `gems` and it contains 6 frames called `ruby_0001`, `ruby_0002`, and so on, * then you can call this method using: `this.anims.generateFrameNames('gems', { prefix: 'ruby_', end: 6, zeroPad: 4 })`. - * + * * The `end` value tells it to look for 6 frames, incrementally numbered, all starting with the prefix `ruby_`. The `zeroPad` * value tells it how many zeroes pad out the numbers. To create an animation using this method, you can do: - * + * * ```javascript * this.anims.create({ * key: 'ruby', @@ -57850,7 +60880,7 @@ var AnimationManager = new Class({ * }) * }); * ``` - * + * * Please see the animation examples for further details. * * @method Phaser.Animations.AnimationManager#generateFrameNames @@ -57878,17 +60908,11 @@ var AnimationManager = new Class({ return out; } - var diff = (start < end) ? 1 : -1; - - // Adjust because we use i !== end in the for loop - end += diff; - var i; - var frame; if (!config) { - // Use every frame in the atlas? + // Use every frame in the atlas frames = texture.getFrameNames(); for (i = 0; i < frames.length; i++) @@ -57896,28 +60920,24 @@ var AnimationManager = new Class({ out.push({ key: key, frame: frames[i] }); } } - else if (Array.isArray(frames)) + else { - // Have they provided their own custom frame sequence array? + if (!frames) + { + frames = NumberArray(start, end); + } + for (i = 0; i < frames.length; i++) { - frame = prefix + Pad(frames[i], zeroPad, '0', 1) + suffix; + var frame = prefix + Pad(frames[i], zeroPad, '0', 1) + suffix; if (texture.has(frame)) { out.push({ key: key, frame: frame }); } - } - } - else - { - for (i = start; i !== end; i += diff) - { - frame = prefix + Pad(i, zeroPad, '0', 1) + suffix; - - if (texture.has(frame)) + else { - out.push({ key: key, frame: frame }); + console.warn('generateFrameNames: Frame missing: ' + frame + ' from texture: ' + key); } } } @@ -57929,7 +60949,7 @@ var AnimationManager = new Class({ * Generate an array of {@link Phaser.Types.Animations.AnimationFrame} objects from a texture key and configuration object. * * Generates objects with numbered frame names, as configured by the given {@link Phaser.Types.Animations.GenerateFrameNumbers}. - * + * * If you're working with a texture atlas, see the `generateFrameNames` method instead. * * @method Phaser.Animations.AnimationManager#generateFrameNumbers @@ -57942,9 +60962,9 @@ var AnimationManager = new Class({ */ generateFrameNumbers: function (key, config) { - var startFrame = GetValue(config, 'start', 0); - var endFrame = GetValue(config, 'end', -1); - var firstFrame = GetValue(config, 'first', false); + var start = GetValue(config, 'start', 0); + var end = GetValue(config, 'end', -1); + var first = GetValue(config, 'first', false); var out = GetValue(config, 'outputArray', []); var frames = GetValue(config, 'frames', false); @@ -57955,43 +60975,33 @@ var AnimationManager = new Class({ return out; } - if (firstFrame && texture.has(firstFrame)) + if (first && texture.has(first)) { - out.push({ key: key, frame: firstFrame }); + out.push({ key: key, frame: first }); } - var i; - - // Have they provided their own custom frame sequence array? - if (Array.isArray(frames)) + // No 'frames' array? Then generate one automatically + if (!frames) { - for (i = 0; i < frames.length; i++) + if (end === -1) { - if (texture.has(frames[i])) - { - out.push({ key: key, frame: frames[i] }); - } + // -1 because of __BASE, which we don't want in our results + // and -1 because frames are zero based + end = texture.frameTotal - 2; } + + frames = NumberArray(start, end); } - else + + for (var i = 0; i < frames.length; i++) { - // No endFrame then see if we can get it - if (endFrame === -1) + if (texture.has(frames[i])) { - endFrame = texture.frameTotal; + out.push({ key: key, frame: frames[i] }); } - - var diff = (startFrame < endFrame) ? 1 : -1; - - // Adjust because we use i !== end in the for loop - endFrame += diff; - - for (i = startFrame; i !== endFrame; i += diff) + else { - if (texture.has(i)) - { - out.push({ key: key, frame: i }); - } + console.warn('generateFrameNumbers: Frame ' + i + ' missing from texture: ' + key); } } @@ -58013,34 +61023,6 @@ var AnimationManager = new Class({ return this.anims.get(key); }, - /** - * Load an Animation into a Game Object's Animation Component. - * - * @method Phaser.Animations.AnimationManager#load - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject} child - The Game Object to load the animation into. - * @param {string} key - The key of the animation to load. - * @param {(string|integer)} [startFrame] - The name of a start frame to set on the loaded animation. - * - * @return {Phaser.GameObjects.GameObject} The Game Object with the animation loaded into it. - */ - load: function (child, key, startFrame) - { - var anim = this.get(key); - - if (anim) - { - anim.load(child, startFrame); - } - else - { - console.warn('Missing animation: ' + key); - } - - return child; - }, - /** * Pause all animations. * @@ -58068,28 +61050,87 @@ var AnimationManager = new Class({ * @method Phaser.Animations.AnimationManager#play * @since 3.0.0 * - * @param {string} key - The key of the animation to play on the Game Object. - * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Objects to play the animation on. + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} children - An array of Game Objects to play the animation on. They must have an Animation Component. * * @return {this} This Animation Manager. */ - play: function (key, child) + play: function (key, children) { - if (!Array.isArray(child)) + if (!Array.isArray(children)) { - child = [ child ]; + children = [ children ]; } - var anim = this.get(key); - - if (!anim) + for (var i = 0; i < children.length; i++) { - return this; + children[i].anims.play(key); } - for (var i = 0; i < child.length; i++) + return this; + }, + + /** + * Takes an array of Game Objects that have an Animation Component and then + * starts the given animation playing on them. The start time of each Game Object + * is offset, incrementally, by the `stagger` amount. + * + * For example, if you pass an array with 4 children and a stagger time of 1000, + * the delays will be: + * + * child 1: 1000ms delay + * child 2: 2000ms delay + * child 3: 3000ms delay + * child 4: 4000ms delay + * + * If you set the `staggerFirst` parameter to `false` they would be: + * + * child 1: 0ms delay + * child 2: 1000ms delay + * child 3: 2000ms delay + * child 4: 3000ms delay + * + * You can also set `stagger` to be a negative value. If it was -1000, the above would be: + * + * child 1: 3000ms delay + * child 2: 2000ms delay + * child 3: 1000ms delay + * child 4: 0ms delay + * + * @method Phaser.Animations.AnimationManager#staggerPlay + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return] + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} children - An array of Game Objects to play the animation on. They must have an Animation Component. + * @param {number} stagger - The amount of time, in milliseconds, to offset each play time by. If a negative value is given, it's applied to the children in reverse order. + * @param {boolean} [staggerFirst=true] -Should the first child be staggered as well? + * + * @return {this} This Animation Manager. + */ + staggerPlay: function (key, children, stagger, staggerFirst) + { + if (stagger === undefined) { stagger = 0; } + if (staggerFirst === undefined) { staggerFirst = true; } + + if (!Array.isArray(children)) { - child[i].anims.play(key); + children = [ children ]; + } + + var len = children.length; + + if (!staggerFirst) + { + len--; + } + + for (var i = 0; i < children.length; i++) + { + var time = (stagger < 0) ? Math.abs(stagger) * (len - i) : stagger * i; + + children[i].anims.playAfterDelay(key, time); } return this; @@ -58097,7 +61138,7 @@ var AnimationManager = new Class({ /** * Removes an Animation from this Animation Manager, based on the given key. - * + * * This is a global action. Once an Animation has been removed, no Game Objects * can carry on using it. * @@ -58118,6 +61159,8 @@ var AnimationManager = new Class({ this.emit(Events.REMOVE_ANIMATION, key, anim); this.anims.delete(key); + + this.removeMix(key); } return anim; @@ -58144,46 +61187,6 @@ var AnimationManager = new Class({ return this; }, - /** - * Takes an array of Game Objects that have an Animation Component and then - * starts the given animation playing on them, each one offset by the - * `stagger` amount given to this method. - * - * @method Phaser.Animations.AnimationManager#staggerPlay - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return] - * - * @param {string} key - The key of the animation to play on the Game Objects. - * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} children - An array of Game Objects to play the animation on. They must have an Animation Component. - * @param {number} [stagger=0] - The amount of time, in milliseconds, to offset each play time by. - * - * @return {this} This Animation Manager. - */ - staggerPlay: function (key, children, stagger) - { - if (stagger === undefined) { stagger = 0; } - - if (!Array.isArray(children)) - { - children = [ children ]; - } - - var anim = this.get(key); - - if (!anim) - { - return this; - } - - for (var i = 0; i < children.length; i++) - { - children[i].anims.delayedPlay(stagger * i, key); - } - - return this; - }, - /** * Returns the Animation data as JavaScript object based on the given key. * Or, if not key is defined, it will return the data of all animations as array of objects. @@ -58227,6 +61230,7 @@ var AnimationManager = new Class({ destroy: function () { this.anims.clear(); + this.mixes.clear(); this.textureManager = null; @@ -58239,7 +61243,100 @@ module.exports = AnimationManager; /***/ }), -/* 294 */ +/* 301 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Create an array representing the range of numbers (usually integers), between, and inclusive of, + * the given `start` and `end` arguments. For example: + * + * `var array = Phaser.Utils.Array.NumberArray(2, 4); // array = [2, 3, 4]` + * `var array = Phaser.Utils.Array.NumberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]` + * `var array = Phaser.Utils.Array.NumberArray(8, 2); // array = [8, 7, 6, 5, 4, 3, 2]` + * + * This is equivalent to `Phaser.Utils.Array.NumberArrayStep(start, end, 1)`. + * + * You can optionally provide a prefix and / or suffix string. If given the array will contain + * strings, not integers. For example: + * + * `var array = Phaser.Utils.Array.NumberArray(1, 4, 'Level '); // array = ["Level 1", "Level 2", "Level 3", "Level 4"]` + * `var array = Phaser.Utils.Array.NumberArray(5, 7, 'HD-', '.png'); // array = ["HD-5.png", "HD-6.png", "HD-7.png"]` + * + * @function Phaser.Utils.Array.NumberArray + * @since 3.0.0 + * + * @param {number} start - The minimum value the array starts with. + * @param {number} end - The maximum value the array contains. + * @param {string} [prefix] - Optional prefix to place before the number. If provided the array will contain strings, not integers. + * @param {string} [suffix] - Optional suffix to place after the number. If provided the array will contain strings, not integers. + * + * @return {(number[]|string[])} The array of number values, or strings if a prefix or suffix was provided. + */ +var NumberArray = function (start, end, prefix, suffix) +{ + var result = []; + + var i; + var asString = false; + + if (prefix || suffix) + { + asString = true; + + if (!prefix) + { + prefix = ''; + } + + if (!suffix) + { + suffix = ''; + } + } + + if (end < start) + { + for (i = start; i >= end; i--) + { + if (asString) + { + result.push(prefix + i.toString() + suffix); + } + else + { + result.push(i); + } + } + } + else + { + for (i = start; i <= end; i++) + { + if (asString) + { + result.push(prefix + i.toString() + suffix); + } + else + { + result.push(i); + } + } + } + + return result; +}; + +module.exports = NumberArray; + + +/***/ }), +/* 302 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58249,9 +61346,9 @@ module.exports = AnimationManager; */ var Class = __webpack_require__(0); -var CustomMap = __webpack_require__(168); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(295); +var CustomMap = __webpack_require__(121); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(303); /** * @classdesc @@ -58425,7 +61522,7 @@ module.exports = BaseCache; /***/ }), -/* 295 */ +/* 303 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58440,14 +61537,14 @@ module.exports = BaseCache; module.exports = { - ADD: __webpack_require__(644), - REMOVE: __webpack_require__(645) + ADD: __webpack_require__(660), + REMOVE: __webpack_require__(661) }; /***/ }), -/* 296 */ +/* 304 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58456,9 +61553,9 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseCache = __webpack_require__(294); +var BaseCache = __webpack_require__(302); var Class = __webpack_require__(0); -var GameEvents = __webpack_require__(20); +var GameEvents = __webpack_require__(21); /** * @classdesc @@ -58681,7 +61778,7 @@ module.exports = CacheManager; /***/ }), -/* 297 */ +/* 305 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58692,12 +61789,12 @@ module.exports = CacheManager; var BaseCamera = __webpack_require__(92); var CanvasPool = __webpack_require__(26); -var CenterOn = __webpack_require__(174); +var CenterOn = __webpack_require__(176); var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var Effects = __webpack_require__(305); -var Linear = __webpack_require__(121); +var Components = __webpack_require__(11); +var Effects = __webpack_require__(313); +var Linear = __webpack_require__(123); var Rectangle = __webpack_require__(9); var Vector2 = __webpack_require__(3); @@ -59735,7 +62832,7 @@ module.exports = Camera; /***/ }), -/* 298 */ +/* 306 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59744,7 +62841,7 @@ module.exports = Camera; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Color = __webpack_require__(31); +var Color = __webpack_require__(32); /** * Converts a hex string into a Phaser Color object. @@ -59788,7 +62885,7 @@ module.exports = HexStringToColor; /***/ }), -/* 299 */ +/* 307 */ /***/ (function(module, exports) { /** @@ -59819,7 +62916,7 @@ module.exports = GetColor32; /***/ }), -/* 300 */ +/* 308 */ /***/ (function(module, exports) { /** @@ -59899,7 +62996,7 @@ module.exports = RGBToHSV; /***/ }), -/* 301 */ +/* 309 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59908,8 +63005,8 @@ module.exports = RGBToHSV; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Color = __webpack_require__(31); -var IntegerToRGB = __webpack_require__(302); +var Color = __webpack_require__(32); +var IntegerToRGB = __webpack_require__(310); /** * Converts the given color value into an instance of a Color object. @@ -59932,7 +63029,7 @@ module.exports = IntegerToColor; /***/ }), -/* 302 */ +/* 310 */ /***/ (function(module, exports) { /** @@ -59980,7 +63077,7 @@ module.exports = IntegerToRGB; /***/ }), -/* 303 */ +/* 311 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59989,7 +63086,7 @@ module.exports = IntegerToRGB; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Color = __webpack_require__(31); +var Color = __webpack_require__(32); /** * Converts an object containing `r`, `g`, `b` and `a` properties into a Color class instance. @@ -60010,7 +63107,7 @@ module.exports = ObjectToColor; /***/ }), -/* 304 */ +/* 312 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60019,7 +63116,7 @@ module.exports = ObjectToColor; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Color = __webpack_require__(31); +var Color = __webpack_require__(32); /** * Converts a CSS 'web' string into a Phaser Color object. @@ -60056,7 +63153,7 @@ module.exports = RGBStringToColor; /***/ }), -/* 305 */ +/* 313 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60071,186 +63168,12 @@ module.exports = RGBStringToColor; module.exports = { - Fade: __webpack_require__(668), - Flash: __webpack_require__(669), - Pan: __webpack_require__(670), - Shake: __webpack_require__(703), - RotateTo: __webpack_require__(704), - Zoom: __webpack_require__(705) - -}; - - -/***/ }), -/* 306 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Back - */ - -module.exports = { - - In: __webpack_require__(671), - Out: __webpack_require__(672), - InOut: __webpack_require__(673) - -}; - - -/***/ }), -/* 307 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Bounce - */ - -module.exports = { - - In: __webpack_require__(674), - Out: __webpack_require__(675), - InOut: __webpack_require__(676) - -}; - - -/***/ }), -/* 308 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Circular - */ - -module.exports = { - - In: __webpack_require__(677), - Out: __webpack_require__(678), - InOut: __webpack_require__(679) - -}; - - -/***/ }), -/* 309 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Cubic - */ - -module.exports = { - - In: __webpack_require__(680), - Out: __webpack_require__(681), - InOut: __webpack_require__(682) - -}; - - -/***/ }), -/* 310 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Elastic - */ - -module.exports = { - - In: __webpack_require__(683), - Out: __webpack_require__(684), - InOut: __webpack_require__(685) - -}; - - -/***/ }), -/* 311 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Expo - */ - -module.exports = { - - In: __webpack_require__(686), - Out: __webpack_require__(687), - InOut: __webpack_require__(688) - -}; - - -/***/ }), -/* 312 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -module.exports = __webpack_require__(689); - - -/***/ }), -/* 313 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Quadratic - */ - -module.exports = { - - In: __webpack_require__(690), - Out: __webpack_require__(691), - InOut: __webpack_require__(692) + Fade: __webpack_require__(684), + Flash: __webpack_require__(685), + Pan: __webpack_require__(686), + Shake: __webpack_require__(719), + RotateTo: __webpack_require__(720), + Zoom: __webpack_require__(721) }; @@ -60266,14 +63189,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Quartic + * @namespace Phaser.Math.Easing.Back */ module.exports = { - In: __webpack_require__(693), - Out: __webpack_require__(694), - InOut: __webpack_require__(695) + In: __webpack_require__(687), + Out: __webpack_require__(688), + InOut: __webpack_require__(689) }; @@ -60289,14 +63212,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Quintic + * @namespace Phaser.Math.Easing.Bounce */ module.exports = { - In: __webpack_require__(696), - Out: __webpack_require__(697), - InOut: __webpack_require__(698) + In: __webpack_require__(690), + Out: __webpack_require__(691), + InOut: __webpack_require__(692) }; @@ -60312,14 +63235,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Sine + * @namespace Phaser.Math.Easing.Circular */ module.exports = { - In: __webpack_require__(699), - Out: __webpack_require__(700), - InOut: __webpack_require__(701) + In: __webpack_require__(693), + Out: __webpack_require__(694), + InOut: __webpack_require__(695) }; @@ -60335,16 +63258,190 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Stepped + * @namespace Phaser.Math.Easing.Cubic */ -module.exports = __webpack_require__(702); +module.exports = { + + In: __webpack_require__(696), + Out: __webpack_require__(697), + InOut: __webpack_require__(698) + +}; /***/ }), /* 318 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Elastic + */ + +module.exports = { + + In: __webpack_require__(699), + Out: __webpack_require__(700), + InOut: __webpack_require__(701) + +}; + + +/***/ }), +/* 319 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Expo + */ + +module.exports = { + + In: __webpack_require__(702), + Out: __webpack_require__(703), + InOut: __webpack_require__(704) + +}; + + +/***/ }), +/* 320 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +module.exports = __webpack_require__(705); + + +/***/ }), +/* 321 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Quadratic + */ + +module.exports = { + + In: __webpack_require__(706), + Out: __webpack_require__(707), + InOut: __webpack_require__(708) + +}; + + +/***/ }), +/* 322 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Quartic + */ + +module.exports = { + + In: __webpack_require__(709), + Out: __webpack_require__(710), + InOut: __webpack_require__(711) + +}; + + +/***/ }), +/* 323 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Quintic + */ + +module.exports = { + + In: __webpack_require__(712), + Out: __webpack_require__(713), + InOut: __webpack_require__(714) + +}; + + +/***/ }), +/* 324 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Sine + */ + +module.exports = { + + In: __webpack_require__(715), + Out: __webpack_require__(716), + InOut: __webpack_require__(717) + +}; + + +/***/ }), +/* 325 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Stepped + */ + +module.exports = __webpack_require__(718); + + +/***/ }), +/* 326 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. @@ -60352,15 +63449,15 @@ module.exports = __webpack_require__(702); */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(33); -var Device = __webpack_require__(319); +var CONST = __webpack_require__(34); +var Device = __webpack_require__(327); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); var IsPlainObject = __webpack_require__(7); -var PhaserMath = __webpack_require__(176); +var PhaserMath = __webpack_require__(178); var NOOP = __webpack_require__(1); -var DefaultPlugins = __webpack_require__(180); -var ValueToColor = __webpack_require__(170); +var DefaultPlugins = __webpack_require__(182); +var ValueToColor = __webpack_require__(172); /** * @classdesc @@ -60928,7 +64025,7 @@ module.exports = Config; /***/ }), -/* 319 */ +/* 327 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60962,20 +64059,20 @@ module.exports = Config; module.exports = { - os: __webpack_require__(122), - browser: __webpack_require__(123), - features: __webpack_require__(175), - input: __webpack_require__(734), - audio: __webpack_require__(735), - video: __webpack_require__(736), - fullscreen: __webpack_require__(737), - canvasFeatures: __webpack_require__(320) + os: __webpack_require__(124), + browser: __webpack_require__(125), + features: __webpack_require__(177), + input: __webpack_require__(752), + audio: __webpack_require__(753), + video: __webpack_require__(754), + fullscreen: __webpack_require__(755), + canvasFeatures: __webpack_require__(328) }; /***/ }), -/* 320 */ +/* 328 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61089,7 +64186,7 @@ module.exports = init(); /***/ }), -/* 321 */ +/* 329 */ /***/ (function(module, exports) { /** @@ -61120,7 +64217,7 @@ module.exports = Between; /***/ }), -/* 322 */ +/* 330 */ /***/ (function(module, exports) { /** @@ -61151,7 +64248,7 @@ module.exports = BetweenPoints; /***/ }), -/* 323 */ +/* 331 */ /***/ (function(module, exports) { /** @@ -61188,7 +64285,7 @@ module.exports = Normalize; /***/ }), -/* 324 */ +/* 332 */ /***/ (function(module, exports) { /** @@ -61220,7 +64317,7 @@ module.exports = DistanceBetweenPoints; /***/ }), -/* 325 */ +/* 333 */ /***/ (function(module, exports) { /** @@ -61254,7 +64351,7 @@ module.exports = DistanceSquared; /***/ }), -/* 326 */ +/* 334 */ /***/ (function(module, exports) { /** @@ -61288,7 +64385,7 @@ module.exports = GreaterThan; /***/ }), -/* 327 */ +/* 335 */ /***/ (function(module, exports) { /** @@ -61322,7 +64419,7 @@ module.exports = LessThan; /***/ }), -/* 328 */ +/* 336 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61331,7 +64428,7 @@ module.exports = LessThan; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Factorial = __webpack_require__(329); +var Factorial = __webpack_require__(337); /** * Calculates the Bernstein basis from the three factorial coefficients. @@ -61353,7 +64450,7 @@ module.exports = Bernstein; /***/ }), -/* 329 */ +/* 337 */ /***/ (function(module, exports) { /** @@ -61393,7 +64490,7 @@ module.exports = Factorial; /***/ }), -/* 330 */ +/* 338 */ /***/ (function(module, exports) { /** @@ -61463,7 +64560,7 @@ module.exports = CubicBezierInterpolation; /***/ }), -/* 331 */ +/* 339 */ /***/ (function(module, exports) { /** @@ -61522,7 +64619,7 @@ module.exports = QuadraticBezierInterpolation; /***/ }), -/* 332 */ +/* 340 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61531,7 +64628,7 @@ module.exports = QuadraticBezierInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmoothStep = __webpack_require__(167); +var SmoothStep = __webpack_require__(169); /** * A Smooth Step interpolation method. @@ -61555,7 +64652,7 @@ module.exports = SmoothStepInterpolation; /***/ }), -/* 333 */ +/* 341 */ /***/ (function(module, exports) { /** @@ -61585,7 +64682,7 @@ module.exports = GetPowerOfTwo; /***/ }), -/* 334 */ +/* 342 */ /***/ (function(module, exports) { /** @@ -61629,7 +64726,7 @@ module.exports = SnapCeil; /***/ }), -/* 335 */ +/* 343 */ /***/ (function(module, exports) { /** @@ -61664,7 +64761,7 @@ module.exports = Rotate; /***/ }), -/* 336 */ +/* 344 */ /***/ (function(module, exports) { /** @@ -61693,7 +64790,7 @@ module.exports = RoundAwayFromZero; /***/ }), -/* 337 */ +/* 345 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62286,7 +65383,7 @@ module.exports = Matrix3; /***/ }), -/* 338 */ +/* 346 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63748,7 +66845,7 @@ module.exports = Matrix4; /***/ }), -/* 339 */ +/* 347 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63761,8 +66858,8 @@ module.exports = Matrix4; // and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl var Class = __webpack_require__(0); -var Vector3 = __webpack_require__(80); -var Matrix3 = __webpack_require__(337); +var Vector3 = __webpack_require__(81); +var Matrix3 = __webpack_require__(345); var EPSILON = 0.000001; @@ -64520,7 +67617,7 @@ module.exports = Quaternion; /***/ }), -/* 340 */ +/* 348 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64529,10 +67626,10 @@ module.exports = Quaternion; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CanvasInterpolation = __webpack_require__(341); +var CanvasInterpolation = __webpack_require__(349); var CanvasPool = __webpack_require__(26); -var CONST = __webpack_require__(33); -var Features = __webpack_require__(175); +var CONST = __webpack_require__(34); +var Features = __webpack_require__(177); /** * Called automatically by Phaser.Game and responsible for creating the renderer it will use. @@ -64622,8 +67719,8 @@ var CreateRenderer = function (game) if (true) { - CanvasRenderer = __webpack_require__(508); - WebGLRenderer = __webpack_require__(511); + CanvasRenderer = __webpack_require__(531); + WebGLRenderer = __webpack_require__(534); // Let the config pick the renderer type, as both are included if (config.renderType === CONST.WEBGL) @@ -64648,7 +67745,7 @@ module.exports = CreateRenderer; /***/ }), -/* 341 */ +/* 349 */ /***/ (function(module, exports) { /** @@ -64711,7 +67808,7 @@ module.exports = CanvasInterpolation; /***/ }), -/* 342 */ +/* 350 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64720,7 +67817,7 @@ module.exports = CanvasInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(33); +var CONST = __webpack_require__(34); /** * Called automatically by Phaser.Game and responsible for creating the console.log debug header. @@ -64841,7 +67938,7 @@ module.exports = DebugHeader; /***/ }), -/* 343 */ +/* 351 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64853,7 +67950,7 @@ module.exports = DebugHeader; var Class = __webpack_require__(0); var GetValue = __webpack_require__(6); var NOOP = __webpack_require__(1); -var RequestAnimationFrame = __webpack_require__(344); +var RequestAnimationFrame = __webpack_require__(352); // http://www.testufo.com/#test=animation-time-graph @@ -65571,7 +68668,7 @@ module.exports = TimeStep; /***/ }), -/* 344 */ +/* 352 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -65785,7 +68882,7 @@ module.exports = RequestAnimationFrame; /***/ }), -/* 345 */ +/* 353 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -65794,7 +68891,7 @@ module.exports = RequestAnimationFrame; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Events = __webpack_require__(20); +var Events = __webpack_require__(21); /** * The Visibility Handler is responsible for listening out for document level visibility change events. @@ -65876,7 +68973,7 @@ module.exports = VisibilityHandler; /***/ }), -/* 346 */ +/* 354 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -65885,7 +68982,7 @@ module.exports = VisibilityHandler; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Arne16 = __webpack_require__(347); +var Arne16 = __webpack_require__(355); var CanvasPool = __webpack_require__(26); var GetValue = __webpack_require__(6); @@ -65998,7 +69095,7 @@ module.exports = GenerateTexture; /***/ }), -/* 347 */ +/* 355 */ /***/ (function(module, exports) { /** @@ -66036,7 +69133,7 @@ module.exports = { /***/ }), -/* 348 */ +/* 356 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -66048,8 +69145,8 @@ module.exports = { // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) var Class = __webpack_require__(0); -var CubicBezier = __webpack_require__(330); -var Curve = __webpack_require__(82); +var CubicBezier = __webpack_require__(338); +var Curve = __webpack_require__(83); var Vector2 = __webpack_require__(3); /** @@ -66263,7 +69360,7 @@ module.exports = CubicBezierCurve; /***/ }), -/* 349 */ +/* 357 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -66275,10 +69372,10 @@ module.exports = CubicBezierCurve; // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) var Class = __webpack_require__(0); -var Curve = __webpack_require__(82); -var DegToRad = __webpack_require__(40); +var Curve = __webpack_require__(83); +var DegToRad = __webpack_require__(41); var GetValue = __webpack_require__(6); -var RadToDeg = __webpack_require__(179); +var RadToDeg = __webpack_require__(181); var Vector2 = __webpack_require__(3); /** @@ -66887,7 +69984,7 @@ module.exports = EllipseCurve; /***/ }), -/* 350 */ +/* 358 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -66899,8 +69996,8 @@ module.exports = EllipseCurve; // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) var Class = __webpack_require__(0); -var Curve = __webpack_require__(82); -var FromPoints = __webpack_require__(182); +var Curve = __webpack_require__(83); +var FromPoints = __webpack_require__(184); var Rectangle = __webpack_require__(9); var Vector2 = __webpack_require__(3); @@ -67190,7 +70287,7 @@ module.exports = LineCurve; /***/ }), -/* 351 */ +/* 359 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67200,8 +70297,147 @@ module.exports = LineCurve; */ var Class = __webpack_require__(0); -var Curve = __webpack_require__(82); -var QuadraticBezierInterpolation = __webpack_require__(331); +var Vector2 = __webpack_require__(3); + +/** + * @classdesc + * A MoveTo Curve is a very simple curve consisting of only a single point. + * Its intended use is to move the ending point in a Path. + * + * @class MoveTo + * @memberof Phaser.Curves + * @constructor + * @since 3.0.0 + * + * @param {number} [x=0] - `x` pixel coordinate. + * @param {number} [y=0] - `y` pixel coordinate. + */ +var MoveTo = new Class({ + + initialize: + + function MoveTo (x, y) + { + /** + * Denotes that this Curve does not influence the bounds, points, and drawing of its parent Path. Must be `false` or some methods in the parent Path will throw errors. + * + * @name Phaser.Curves.MoveTo#active + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.active = false; + + /** + * The lone point which this curve consists of. + * + * @name Phaser.Curves.MoveTo#p0 + * @type {Phaser.Math.Vector2} + * @since 3.0.0 + */ + this.p0 = new Vector2(x, y); + }, + + /** + * Get point at relative position in curve according to length. + * + * @method Phaser.Curves.MoveTo#getPoint + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [out,$return] + * + * @param {number} t - The position along the curve to return. Where 0 is the start and 1 is the end. + * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created. + * + * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned. + */ + getPoint: function (t, out) + { + if (out === undefined) { out = new Vector2(); } + + return out.copy(this.p0); + }, + + /** + * Retrieves the point at given position in the curve. This will always return this curve's only point. + * + * @method Phaser.Curves.MoveTo#getPointAt + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [out,$return] + * + * @param {number} u - The position in the path to retrieve, between 0 and 1. Not used. + * @param {Phaser.Math.Vector2} [out] - An optional vector in which to store the point. + * + * @return {Phaser.Math.Vector2} The modified `out` vector, or a new `Vector2` if none was provided. + */ + getPointAt: function (u, out) + { + return this.getPoint(u, out); + }, + + /** + * Gets the resolution of this curve. + * + * @method Phaser.Curves.MoveTo#getResolution + * @since 3.0.0 + * + * @return {number} The resolution of this curve. For a MoveTo the value is always 1. + */ + getResolution: function () + { + return 1; + }, + + /** + * Gets the length of this curve. + * + * @method Phaser.Curves.MoveTo#getLength + * @since 3.0.0 + * + * @return {number} The length of this curve. For a MoveTo the value is always 0. + */ + getLength: function () + { + return 0; + }, + + /** + * Converts this curve into a JSON-serializable object. + * + * @method Phaser.Curves.MoveTo#toJSON + * @since 3.0.0 + * + * @return {Phaser.Types.Curves.JSONCurve} A primitive object with the curve's type and only point. + */ + toJSON: function () + { + return { + type: 'MoveTo', + points: [ + this.p0.x, this.p0.y + ] + }; + } + +}); + +module.exports = MoveTo; + + +/***/ }), +/* 360 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var Curve = __webpack_require__(83); +var QuadraticBezierInterpolation = __webpack_require__(339); var Vector2 = __webpack_require__(3); /** @@ -67407,7 +70643,7 @@ module.exports = QuadraticBezier; /***/ }), -/* 352 */ +/* 361 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67418,9 +70654,9 @@ module.exports = QuadraticBezier; // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) -var CatmullRom = __webpack_require__(177); +var CatmullRom = __webpack_require__(179); var Class = __webpack_require__(0); -var Curve = __webpack_require__(82); +var Curve = __webpack_require__(83); var Vector2 = __webpack_require__(3); /** @@ -67632,7 +70868,7 @@ module.exports = SplineCurve; /***/ }), -/* 353 */ +/* 362 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67646,16 +70882,16 @@ var Class = __webpack_require__(0); /** * @classdesc * A BaseShader is a small resource class that contains the data required for a WebGL Shader to be created. - * + * * It contains the raw source code to the fragment and vertex shader, as well as an object that defines * the uniforms the shader requires, if any. - * + * * BaseShaders are stored in the Shader Cache, available in a Scene via `this.cache.shaders` and are referenced * by a unique key-based string. Retrieve them via `this.cache.shaders.get(key)`. - * + * * BaseShaders are created automatically by the GLSL File Loader when loading an external shader resource. * They can also be created at runtime, allowing you to use dynamically generated shader source code. - * + * * Default fragment and vertex source is used if not provided in the constructor, setting-up a basic shader, * suitable for debug rendering. * @@ -67703,10 +70939,12 @@ var BaseShader = new Class({ '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);', + ' 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'); } @@ -67756,7 +70994,7 @@ module.exports = BaseShader; /***/ }), -/* 354 */ +/* 363 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67765,33 +71003,33 @@ module.exports = BaseShader; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Color = __webpack_require__(31); +var Color = __webpack_require__(32); -Color.ColorToRGBA = __webpack_require__(819); -Color.ComponentToHex = __webpack_require__(355); -Color.GetColor = __webpack_require__(171); -Color.GetColor32 = __webpack_require__(299); +Color.ColorToRGBA = __webpack_require__(836); +Color.ComponentToHex = __webpack_require__(364); +Color.GetColor = __webpack_require__(173); +Color.GetColor32 = __webpack_require__(307); Color.GetColorFromValue = __webpack_require__(117); -Color.HexStringToColor = __webpack_require__(298); -Color.HSLToColor = __webpack_require__(820); -Color.HSVColorWheel = __webpack_require__(821); -Color.HSVToRGB = __webpack_require__(172); -Color.HueToComponent = __webpack_require__(356); -Color.IntegerToColor = __webpack_require__(301); -Color.IntegerToRGB = __webpack_require__(302); -Color.Interpolate = __webpack_require__(822); -Color.ObjectToColor = __webpack_require__(303); -Color.RandomRGB = __webpack_require__(823); -Color.RGBStringToColor = __webpack_require__(304); -Color.RGBToHSV = __webpack_require__(300); -Color.RGBToString = __webpack_require__(824); -Color.ValueToColor = __webpack_require__(170); +Color.HexStringToColor = __webpack_require__(306); +Color.HSLToColor = __webpack_require__(837); +Color.HSVColorWheel = __webpack_require__(838); +Color.HSVToRGB = __webpack_require__(174); +Color.HueToComponent = __webpack_require__(365); +Color.IntegerToColor = __webpack_require__(309); +Color.IntegerToRGB = __webpack_require__(310); +Color.Interpolate = __webpack_require__(839); +Color.ObjectToColor = __webpack_require__(311); +Color.RandomRGB = __webpack_require__(840); +Color.RGBStringToColor = __webpack_require__(312); +Color.RGBToHSV = __webpack_require__(308); +Color.RGBToString = __webpack_require__(841); +Color.ValueToColor = __webpack_require__(172); module.exports = Color; /***/ }), -/* 355 */ +/* 364 */ /***/ (function(module, exports) { /** @@ -67821,7 +71059,7 @@ module.exports = ComponentToHex; /***/ }), -/* 356 */ +/* 365 */ /***/ (function(module, exports) { /** @@ -67877,7 +71115,7 @@ module.exports = HueToComponent; /***/ }), -/* 357 */ +/* 366 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67886,7 +71124,7 @@ module.exports = HueToComponent; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var OS = __webpack_require__(122); +var OS = __webpack_require__(124); /** * @callback ContentLoadedCallback @@ -67940,7 +71178,66 @@ module.exports = DOMContentLoaded; /***/ }), -/* 358 */ +/* 367 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Attempts to determine the document inner height across iOS and standard devices. + * Based on code by @tylerjpeterson + * + * @function Phaser.DOM.GetInnerHeight + * @since 3.16.0 + * + * @param {boolean} iOS - Is this running on iOS? + * + * @return {number} The inner height value. + */ +var GetInnerHeight = function (iOS) +{ + + if (!iOS) + { + return window.innerHeight; + } + + var axis = Math.abs(window.orientation); + + var size = { w: 0, h: 0 }; + + var ruler = document.createElement('div'); + + ruler.setAttribute('style', 'position: fixed; height: 100vh; width: 0; top: 0'); + + document.documentElement.appendChild(ruler); + + size.w = (axis === 90) ? ruler.offsetHeight : window.innerWidth; + size.h = (axis === 90) ? window.innerWidth : ruler.offsetHeight; + + document.documentElement.removeChild(ruler); + + ruler = null; + + if (Math.abs(window.orientation) !== 90) + { + return size.h; + } + else + { + return size.w; + } +}; + +module.exports = GetInnerHeight; + + +/***/ }), +/* 368 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67949,7 +71246,7 @@ module.exports = DOMContentLoaded; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(183); +var CONST = __webpack_require__(185); /** * Attempts to determine the screen orientation using the Orientation API. @@ -68006,7 +71303,7 @@ module.exports = GetScreenOrientation; /***/ }), -/* 359 */ +/* 369 */ /***/ (function(module, exports) { /** @@ -68092,7 +71389,7 @@ module.exports = { /***/ }), -/* 360 */ +/* 370 */ /***/ (function(module, exports) { /** @@ -68145,7 +71442,7 @@ module.exports = { /***/ }), -/* 361 */ +/* 371 */ /***/ (function(module, exports) { /** @@ -68243,7 +71540,7 @@ module.exports = { /***/ }), -/* 362 */ +/* 372 */ /***/ (function(module, exports) { /** @@ -68317,7 +71614,7 @@ module.exports = { /***/ }), -/* 363 */ +/* 373 */ /***/ (function(module, exports) { /** @@ -68368,7 +71665,7 @@ module.exports = GetTarget; /***/ }), -/* 364 */ +/* 374 */ /***/ (function(module, exports) { /** @@ -68425,7 +71722,7 @@ module.exports = ParseXML; /***/ }), -/* 365 */ +/* 375 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68435,16 +71732,16 @@ module.exports = ParseXML; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(185); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(55); -var GameEvents = __webpack_require__(20); -var Keyboard = __webpack_require__(366); -var Mouse = __webpack_require__(367); -var Pointer = __webpack_require__(368); -var Touch = __webpack_require__(369); -var TransformMatrix = __webpack_require__(30); -var TransformXY = __webpack_require__(162); +var CONST = __webpack_require__(187); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(56); +var GameEvents = __webpack_require__(21); +var Keyboard = __webpack_require__(376); +var Mouse = __webpack_require__(377); +var Pointer = __webpack_require__(378); +var Touch = __webpack_require__(379); +var TransformMatrix = __webpack_require__(31); +var TransformXY = __webpack_require__(164); /** * @classdesc @@ -69507,7 +72804,7 @@ module.exports = InputManager; /***/ }), -/* 366 */ +/* 376 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -69516,11 +72813,11 @@ module.exports = InputManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayRemove = __webpack_require__(129); +var ArrayRemove = __webpack_require__(95); var Class = __webpack_require__(0); -var GameEvents = __webpack_require__(20); -var InputEvents = __webpack_require__(55); -var KeyCodes = __webpack_require__(130); +var GameEvents = __webpack_require__(21); +var InputEvents = __webpack_require__(56); +var KeyCodes = __webpack_require__(131); var NOOP = __webpack_require__(1); /** @@ -69951,7 +73248,7 @@ module.exports = KeyboardManager; /***/ }), -/* 367 */ +/* 377 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -69961,8 +73258,8 @@ module.exports = KeyboardManager; */ var Class = __webpack_require__(0); -var Features = __webpack_require__(175); -var InputEvents = __webpack_require__(55); +var Features = __webpack_require__(177); +var InputEvents = __webpack_require__(56); var NOOP = __webpack_require__(1); // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent @@ -69971,9 +73268,9 @@ var NOOP = __webpack_require__(1); /** * @classdesc * The Mouse Manager is a helper class that belongs to the Input Manager. - * + * * Its role is to listen for native DOM Mouse Events and then pass them onto the Input Manager for further processing. - * + * * You do not need to create this class directly, the Input Manager will create an instance of it automatically. * * @class MouseManager @@ -70178,9 +73475,9 @@ var MouseManager = new Class({ /** * Attempts to disable the context menu from appearing if you right-click on the browser. - * + * * Works by listening for the `contextmenu` event and prevent defaulting it. - * + * * Use this if you need to enable right-button mouse support in your game, and the browser * menu keeps getting in the way. * @@ -70262,7 +73559,7 @@ var MouseManager = new Class({ if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled) { _this.manager.onMouseMove(event); - + if (_this.capture) { event.preventDefault(); @@ -70280,7 +73577,7 @@ var MouseManager = new Class({ if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled) { _this.manager.onMouseDown(event); - + if (_this.capture && event.target === canvas) { event.preventDefault(); @@ -70302,7 +73599,7 @@ var MouseManager = new Class({ if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled) { _this.manager.onMouseUp(event); - + if (_this.capture && event.target === canvas) { event.preventDefault(); @@ -70362,8 +73659,8 @@ var MouseManager = new Class({ if (window && this.manager.game.config.inputWindowEvents) { - window.addEventListener('mousedown', this.onMouseDownWindow, nonPassive); - window.addEventListener('mouseup', this.onMouseUpWindow, nonPassive); + window.top.addEventListener('mousedown', this.onMouseDownWindow, nonPassive); + window.top.addEventListener('mouseup', this.onMouseUpWindow, nonPassive); } if (Features.pointerLock) @@ -70404,8 +73701,8 @@ var MouseManager = new Class({ if (window) { - window.removeEventListener('mousedown', this.onMouseDownWindow); - window.removeEventListener('mouseup', this.onMouseUpWindow); + window.top.removeEventListener('mousedown', this.onMouseDownWindow); + window.top.removeEventListener('mouseup', this.onMouseUpWindow); } if (Features.pointerLock) @@ -70437,7 +73734,7 @@ module.exports = MouseManager; /***/ }), -/* 368 */ +/* 378 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -70446,11 +73743,11 @@ module.exports = MouseManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Angle = __webpack_require__(321); +var Angle = __webpack_require__(329); var Class = __webpack_require__(0); -var Distance = __webpack_require__(54); -var FuzzyEqual = __webpack_require__(107); -var SmoothStepInterpolation = __webpack_require__(332); +var Distance = __webpack_require__(55); +var FuzzyEqual = __webpack_require__(108); +var SmoothStepInterpolation = __webpack_require__(340); var Vector2 = __webpack_require__(3); /** @@ -70534,7 +73831,7 @@ var Pointer = new Class({ /** * The camera the Pointer interacted with during its last update. - * + * * A Pointer can only ever interact with one camera at once, which will be the top-most camera * in the list should multiple cameras be positioned on-top of each other. * @@ -70548,9 +73845,9 @@ var Pointer = new Class({ /** * A read-only property that indicates which button was pressed, or released, on the pointer * during the most recent event. It is only set during `up` and `down` events. - * + * * On Touch devices the value is always 0. - * + * * Users may change the configuration of buttons on their pointing device so that if an event's button property * is zero, it may not have been caused by the button that is physically left–most on the pointing device; * however, it should behave as if the left button was clicked in the standard button layout. @@ -70570,7 +73867,7 @@ var Pointer = new Class({ * 4: Wheel button or middle button * 8: 4th button (typically the "Browser Back" button) * 16: 5th button (typically the "Browser Forward" button) - * + * * For a mouse configured for left-handed use, the button actions are reversed. * In this case, the values are read from right to left. * @@ -70593,9 +73890,9 @@ var Pointer = new Class({ /** * The previous position of the Pointer in screen space. - * + * * The old x and y values are stored in here during the InputManager.transformPointer call. - * + * * Use the properties `velocity`, `angle` and `distance` to create your own gesture recognition. * * @name Phaser.Input.Pointer#prevPosition @@ -70617,9 +73914,9 @@ var Pointer = new Class({ /** * The current velocity of the Pointer, based on its current and previous positions. - * + * * This value is smoothed out each frame, according to the `motionFactor` property. - * + * * This property is updated whenever the Pointer moves, regardless of any button states. In other words, * it changes based on movement alone - a button doesn't have to be pressed first. * @@ -70632,9 +73929,9 @@ var Pointer = new Class({ /** * The current angle the Pointer is moving, in radians, based on its previous and current position. - * + * * The angle is based on the old position facing to the current position. - * + * * This property is updated whenever the Pointer moves, regardless of any button states. In other words, * it changes based on movement alone - a button doesn't have to be pressed first. * @@ -70647,12 +73944,12 @@ var Pointer = new Class({ /** * The distance the Pointer has moved, based on its previous and current position. - * + * * This value is smoothed out each frame, according to the `motionFactor` property. - * + * * This property is updated whenever the Pointer moves, regardless of any button states. In other words, * it changes based on movement alone - a button doesn't have to be pressed first. - * + * * If you need the total distance travelled since the primary buttons was pressed down, * then use the `Pointer.getDistance` method. * @@ -70665,14 +73962,14 @@ var Pointer = new Class({ /** * The smoothing factor to apply to the Pointer position. - * + * * Due to their nature, pointer positions are inherently noisy. While this is fine for lots of games, if you need cleaner positions * then you can set this value to apply an automatic smoothing to the positions as they are recorded. - * + * * The default value of zero means 'no smoothing'. * Set to a small value, such as 0.2, to apply an average level of smoothing between positions. You can do this by changing this * value directly, or by setting the `input.smoothFactor` property in the Game Config. - * + * * Positions are only smoothed when the pointer moves. If the primary button on this Pointer enters an Up or Down state, then the position * is always precise, and not smoothed. * @@ -70685,7 +73982,7 @@ var Pointer = new Class({ /** * The factor applied to the motion smoothing each frame. - * + * * This value is passed to the Smooth Step Interpolation that is used to calculate the velocity, * angle and distance of the Pointer. It's applied every frame, until the midPoint reaches the current * position of the Pointer. 0.2 provides a good average but can be increased if you need a @@ -70701,7 +73998,7 @@ var Pointer = new Class({ /** * The x position of this Pointer, translated into the coordinate space of the most recent Camera it interacted with. - * + * * If you wish to use this value _outside_ of an input event handler then you should update it first by calling * the `Pointer.updateWorldPoint` method. * @@ -70714,7 +74011,7 @@ var Pointer = new Class({ /** * The y position of this Pointer, translated into the coordinate space of the most recent Camera it interacted with. - * + * * If you wish to use this value _outside_ of an input event handler then you should update it first by calling * the `Pointer.updateWorldPoint` method. * @@ -70756,7 +74053,7 @@ var Pointer = new Class({ this.downY = 0; /** - * Time when Button 1 (left button), or Touch, was pressed, used for dragging objects. + * The Event timestamp when the first button, or Touch input, was pressed. Used for dragging objects. * * @name Phaser.Input.Pointer#downTime * @type {number} @@ -70786,7 +74083,7 @@ var Pointer = new Class({ this.upY = 0; /** - * Time when Button 1 (left button), or Touch, was released, used for dragging objects. + * The Event timestamp when the final button, or Touch input, was released. Used for dragging objects. * * @name Phaser.Input.Pointer#upTime * @type {number} @@ -70827,7 +74124,7 @@ var Pointer = new Class({ /** * Did this Pointer get canceled by a touchcancel event? - * + * * Note: "canceled" is the American-English spelling of "cancelled". Please don't submit PRs correcting it! * * @name Phaser.Input.Pointer#wasCanceled @@ -70888,10 +74185,10 @@ var Pointer = new Class({ /** * Is this pointer Pointer Locked? - * + * * Only a mouse pointer can be locked and it only becomes locked when requested via * the browsers Pointer Lock API. - * + * * You can request this by calling the `this.input.mouse.requestPointerLock()` method from * a `pointerdown` or `pointerup` event handler. * @@ -70937,7 +74234,7 @@ var Pointer = new Class({ /** * Takes a Camera and updates this Pointer's `worldX` and `worldY` values so they are * the result of a translation through the given Camera. - * + * * Note that the values will be automatically replaced the moment the Pointer is * updated by an input event, such as a mouse move, so should be used immediately. * @@ -71064,12 +74361,17 @@ var Pointer = new Class({ this.primaryDown = false; this.upX = this.x; this.upY = this.y; - this.upTime = event.timeStamp; } - this.isDown = false; + if (this.buttons === 0) + { + // No more buttons are still down + this.isDown = false; - this.wasTouch = false; + this.upTime = event.timeStamp; + + this.wasTouch = false; + } }, /** @@ -71103,10 +74405,14 @@ var Pointer = new Class({ this.primaryDown = true; this.downX = this.x; this.downY = this.y; - this.downTime = event.timeStamp; } - this.isDown = true; + if (!this.isDown) + { + this.isDown = true; + + this.downTime = event.timeStamp; + } this.wasTouch = false; }, @@ -71269,7 +74575,7 @@ var Pointer = new Class({ this.wasTouch = true; this.wasCanceled = false; - + this.active = false; this.updateMotion(); @@ -71305,7 +74611,7 @@ var Pointer = new Class({ this.wasTouch = true; this.wasCanceled = true; - + this.active = false; }, @@ -71455,10 +74761,10 @@ var Pointer = new Class({ /** * If the Pointer has a button pressed down at the time this method is called, it will return the * distance between the Pointer's `downX` and `downY` values and the current position. - * + * * If no button is held down, it will return the last recorded distance, based on where * the Pointer was when the button was released. - * + * * If you wish to get the distance being travelled currently, based on the velocity of the Pointer, * then see the `Pointer.distance` property. * @@ -71482,7 +74788,7 @@ var Pointer = new Class({ /** * If the Pointer has a button pressed down at the time this method is called, it will return the * horizontal distance between the Pointer's `downX` and `downY` values and the current position. - * + * * If no button is held down, it will return the last recorded horizontal distance, based on where * the Pointer was when the button was released. * @@ -71506,7 +74812,7 @@ var Pointer = new Class({ /** * If the Pointer has a button pressed down at the time this method is called, it will return the * vertical distance between the Pointer's `downX` and `downY` values and the current position. - * + * * If no button is held down, it will return the last recorded vertical distance, based on where * the Pointer was when the button was released. * @@ -71530,9 +74836,9 @@ var Pointer = new Class({ /** * If the Pointer has a button pressed down at the time this method is called, it will return the * duration since the button was pressed down. - * + * * If no button is held down, it will return the last recorded duration, based on the time - * the Pointer button was released. + * the last button on the Pointer was released. * * @method Phaser.Input.Pointer#getDuration * @since 3.16.0 @@ -71554,12 +74860,12 @@ var Pointer = new Class({ /** * If the Pointer has a button pressed down at the time this method is called, it will return the * angle between the Pointer's `downX` and `downY` values and the current position. - * + * * If no button is held down, it will return the last recorded angle, based on where * the Pointer was when the button was released. - * + * * The angle is based on the old position facing to the current position. - * + * * If you wish to get the current angle, based on the velocity of the Pointer, then * see the `Pointer.angle` property. * @@ -71583,31 +74889,31 @@ var Pointer = new Class({ /** * Takes the previous and current Pointer positions and then generates an array of interpolated values between * the two. The array will be populated up to the size of the `steps` argument. - * + * * ```javaScript * var points = pointer.getInterpolatedPosition(4); - * + * * // points[0] = { x: 0, y: 0 } * // points[1] = { x: 2, y: 1 } * // points[2] = { x: 3, y: 2 } * // points[3] = { x: 6, y: 3 } * ``` - * + * * Use this if you need to get smoothed values between the previous and current pointer positions. DOM pointer * events can often fire faster than the main browser loop, and this will help you avoid janky movement * especially if you have an object following a Pointer. - * + * * Note that if you provide an output array it will only be populated up to the number of steps provided. * It will not clear any previous data that may have existed beyond the range of the steps count. - * + * * Internally it uses the Smooth Step interpolation calculation. * * @method Phaser.Input.Pointer#getInterpolatedPosition * @since 3.11.0 - * + * * @param {integer} [steps=10] - The number of interpolation steps to use. * @param {array} [out] - An array to store the results in. If not provided a new one will be created. - * + * * @return {array} An array of interpolated values. */ getInterpolatedPosition: function (steps, out) @@ -71715,7 +75021,7 @@ module.exports = Pointer; /***/ }), -/* 369 */ +/* 379 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71725,7 +75031,7 @@ module.exports = Pointer; */ var Class = __webpack_require__(0); -var InputEvents = __webpack_require__(55); +var InputEvents = __webpack_require__(56); var NOOP = __webpack_require__(1); // https://developer.mozilla.org/en-US/docs/Web/API/Touch_events @@ -72128,7 +75434,7 @@ module.exports = TouchManager; /***/ }), -/* 370 */ +/* 380 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -72138,14 +75444,14 @@ module.exports = TouchManager; */ var Class = __webpack_require__(0); -var GameEvents = __webpack_require__(20); -var EventEmitter = __webpack_require__(11); +var GameEvents = __webpack_require__(21); +var EventEmitter = __webpack_require__(12); var FileTypesManager = __webpack_require__(8); var GameObjectCreator = __webpack_require__(16); var GameObjectFactory = __webpack_require__(5); var GetFastValue = __webpack_require__(2); var PluginCache = __webpack_require__(23); -var Remove = __webpack_require__(129); +var Remove = __webpack_require__(95); /** * @classdesc @@ -73030,7 +76336,7 @@ module.exports = PluginManager; /***/ }), -/* 371 */ +/* 381 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -73039,17 +76345,17 @@ module.exports = PluginManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(183); +var CONST = __webpack_require__(185); var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(11); +var EventEmitter = __webpack_require__(12); var Events = __webpack_require__(93); -var GameEvents = __webpack_require__(20); -var GetInnerHeight = __webpack_require__(877); -var GetTarget = __webpack_require__(363); -var GetScreenOrientation = __webpack_require__(358); +var GameEvents = __webpack_require__(21); +var GetInnerHeight = __webpack_require__(367); +var GetTarget = __webpack_require__(373); +var GetScreenOrientation = __webpack_require__(368); var NOOP = __webpack_require__(1); var Rectangle = __webpack_require__(9); -var Size = __webpack_require__(372); +var Size = __webpack_require__(382); var SnapFloor = __webpack_require__(94); var Vector2 = __webpack_require__(3); @@ -74741,7 +78047,7 @@ module.exports = ScaleManager; /***/ }), -/* 372 */ +/* 382 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -75519,7 +78825,7 @@ module.exports = Size; /***/ }), -/* 373 */ +/* 383 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -75529,14 +78835,14 @@ module.exports = Size; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(131); -var Events = __webpack_require__(22); -var GameEvents = __webpack_require__(20); +var CONST = __webpack_require__(132); +var Events = __webpack_require__(20); +var GameEvents = __webpack_require__(21); var GetValue = __webpack_require__(6); -var LoaderEvents = __webpack_require__(83); +var LoaderEvents = __webpack_require__(84); var NOOP = __webpack_require__(1); -var Scene = __webpack_require__(374); -var Systems = __webpack_require__(186); +var Scene = __webpack_require__(384); +var Systems = __webpack_require__(188); /** * @classdesc @@ -77157,7 +80463,7 @@ module.exports = SceneManager; /***/ }), -/* 374 */ +/* 384 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77167,7 +80473,7 @@ module.exports = SceneManager; */ var Class = __webpack_require__(0); -var Systems = __webpack_require__(186); +var Systems = __webpack_require__(188); /** * @classdesc @@ -77443,7 +80749,7 @@ module.exports = Scene; /***/ }), -/* 375 */ +/* 385 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77452,10 +80758,119 @@ module.exports = Scene; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(131); +var GetFastValue = __webpack_require__(2); +var UppercaseFirst = __webpack_require__(189); + +/** + * Builds an array of which physics plugins should be activated for the given Scene. + * + * @function Phaser.Scenes.GetPhysicsPlugins + * @since 3.0.0 + * + * @param {Phaser.Scenes.Systems} sys - The scene system to get the physics systems of. + * + * @return {array} An array of Physics systems to start for this Scene. + */ +var GetPhysicsPlugins = function (sys) +{ + var defaultSystem = sys.game.config.defaultPhysicsSystem; + var sceneSystems = GetFastValue(sys.settings, 'physics', false); + + if (!defaultSystem && !sceneSystems) + { + // No default physics system or systems in this scene + return; + } + + // Let's build the systems array + var output = []; + + if (defaultSystem) + { + output.push(UppercaseFirst(defaultSystem + 'Physics')); + } + + if (sceneSystems) + { + for (var key in sceneSystems) + { + key = UppercaseFirst(key.concat('Physics')); + + if (output.indexOf(key) === -1) + { + output.push(key); + } + } + } + + // An array of Physics systems to start for this Scene + return output; +}; + +module.exports = GetPhysicsPlugins; + + +/***/ }), +/* 386 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetFastValue = __webpack_require__(2); + +/** + * Builds an array of which plugins (not including physics plugins) should be activated for the given Scene. + * + * @function Phaser.Scenes.GetScenePlugins + * @since 3.0.0 + * + * @param {Phaser.Scenes.Systems} sys - The Scene Systems object to check for plugins. + * + * @return {array} An array of all plugins which should be activated, either the default ones or the ones configured in the Scene Systems object. + */ +var GetScenePlugins = function (sys) +{ + var defaultPlugins = sys.plugins.getDefaultScenePlugins(); + + var scenePlugins = GetFastValue(sys.settings, 'plugins', false); + + // Scene Plugins always override Default Plugins + if (Array.isArray(scenePlugins)) + { + return scenePlugins; + } + else if (defaultPlugins) + { + return defaultPlugins; + } + else + { + // No default plugins or plugins in this scene + return []; + } +}; + +module.exports = GetScenePlugins; + + +/***/ }), +/* 387 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(132); var GetValue = __webpack_require__(6); -var Merge = __webpack_require__(132); -var InjectionMap = __webpack_require__(890); +var Merge = __webpack_require__(133); +var InjectionMap = __webpack_require__(904); /** * @namespace Phaser.Scenes.Settings @@ -77539,7 +80954,7 @@ module.exports = Settings; /***/ }), -/* 376 */ +/* 388 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77549,17 +80964,17 @@ module.exports = Settings; */ var CanvasPool = __webpack_require__(26); -var CanvasTexture = __webpack_require__(377); +var CanvasTexture = __webpack_require__(389); var Class = __webpack_require__(0); -var Color = __webpack_require__(31); -var CONST = __webpack_require__(33); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(127); -var GameEvents = __webpack_require__(20); -var GenerateTexture = __webpack_require__(346); +var Color = __webpack_require__(32); +var CONST = __webpack_require__(34); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(129); +var GameEvents = __webpack_require__(21); +var GenerateTexture = __webpack_require__(354); var GetValue = __webpack_require__(6); -var Parser = __webpack_require__(379); -var Texture = __webpack_require__(188); +var Parser = __webpack_require__(391); +var Texture = __webpack_require__(190); /** * @callback EachTextureCallback @@ -78741,7 +82156,7 @@ module.exports = TextureManager; /***/ }), -/* 377 */ +/* 389 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78752,10 +82167,10 @@ module.exports = TextureManager; var Class = __webpack_require__(0); var Clamp = __webpack_require__(17); -var Color = __webpack_require__(31); -var CONST = __webpack_require__(33); -var IsSizePowerOfTwo = __webpack_require__(125); -var Texture = __webpack_require__(188); +var Color = __webpack_require__(32); +var CONST = __webpack_require__(34); +var IsSizePowerOfTwo = __webpack_require__(127); +var Texture = __webpack_require__(190); /** * @classdesc @@ -79376,7 +82791,7 @@ module.exports = CanvasTexture; /***/ }), -/* 378 */ +/* 390 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79387,8 +82802,8 @@ module.exports = CanvasTexture; var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); -var IsSizePowerOfTwo = __webpack_require__(125); -var ScaleModes = __webpack_require__(240); +var IsSizePowerOfTwo = __webpack_require__(127); +var ScaleModes = __webpack_require__(245); /** * @classdesc @@ -79741,7 +83156,7 @@ module.exports = TextureSource; /***/ }), -/* 379 */ +/* 391 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79756,20 +83171,20 @@ module.exports = TextureSource; module.exports = { - AtlasXML: __webpack_require__(891), - Canvas: __webpack_require__(892), - Image: __webpack_require__(893), - JSONArray: __webpack_require__(894), - JSONHash: __webpack_require__(895), - SpriteSheet: __webpack_require__(896), - SpriteSheetFromAtlas: __webpack_require__(897), - UnityYAML: __webpack_require__(898) + AtlasXML: __webpack_require__(905), + Canvas: __webpack_require__(906), + Image: __webpack_require__(907), + JSONArray: __webpack_require__(908), + JSONHash: __webpack_require__(909), + SpriteSheet: __webpack_require__(910), + SpriteSheetFromAtlas: __webpack_require__(911), + UnityYAML: __webpack_require__(912) }; /***/ }), -/* 380 */ +/* 392 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79779,9 +83194,9 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HTML5AudioSoundManager = __webpack_require__(381); -var NoAudioSoundManager = __webpack_require__(385); -var WebAudioSoundManager = __webpack_require__(387); +var HTML5AudioSoundManager = __webpack_require__(393); +var NoAudioSoundManager = __webpack_require__(396); +var WebAudioSoundManager = __webpack_require__(398); /** * Creates a Web Audio, HTML5 Audio or No Audio Sound Manager based on config and device settings. @@ -79821,7 +83236,7 @@ module.exports = SoundManagerCreator; /***/ }), -/* 381 */ +/* 393 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79831,10 +83246,10 @@ module.exports = SoundManagerCreator; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSoundManager = __webpack_require__(133); +var BaseSoundManager = __webpack_require__(134); var Class = __webpack_require__(0); -var Events = __webpack_require__(59); -var HTML5AudioSound = __webpack_require__(384); +var Events = __webpack_require__(61); +var HTML5AudioSound = __webpack_require__(395); /** * HTML5 Audio implementation of the Sound Manager. @@ -80290,7 +83705,7 @@ module.exports = HTML5AudioSoundManager; /***/ }), -/* 382 */ +/* 394 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80299,69 +83714,7 @@ module.exports = HTML5AudioSoundManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SafeRange = __webpack_require__(68); - -/** - * Returns all elements in the array. - * - * You can optionally specify a matching criteria using the `property` and `value` arguments. - * - * For example: `getAll('visible', true)` would return only elements that have their visible property set. - * - * Optionally you can specify a start and end index. For example if the array had 100 elements, - * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only - * the first 50 elements. - * - * @function Phaser.Utils.Array.GetAll - * @since 3.4.0 - * - * @param {array} array - The array to search. - * @param {string} [property] - The property to test on each array element. - * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check. - * @param {integer} [startIndex] - An optional start index to search from. - * @param {integer} [endIndex] - An optional end index to search to. - * - * @return {array} All matching elements from the array. - */ -var GetAll = function (array, property, value, startIndex, endIndex) -{ - if (startIndex === undefined) { startIndex = 0; } - if (endIndex === undefined) { endIndex = array.length; } - - var output = []; - - if (SafeRange(array, startIndex, endIndex)) - { - for (var i = startIndex; i < endIndex; i++) - { - var child = array[i]; - - if (!property || - (property && value === undefined && child.hasOwnProperty(property)) || - (property && value !== undefined && child[property] === value)) - { - output.push(child); - } - } - } - - return output; -}; - -module.exports = GetAll; - - -/***/ }), -/* 383 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SafeRange = __webpack_require__(68); +var SafeRange = __webpack_require__(70); /** * Returns the first element in the array. @@ -80411,7 +83764,7 @@ module.exports = GetFirst; /***/ }), -/* 384 */ +/* 395 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80421,9 +83774,9 @@ module.exports = GetFirst; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(134); +var BaseSound = __webpack_require__(135); var Class = __webpack_require__(0); -var Events = __webpack_require__(59); +var Events = __webpack_require__(61); var Clamp = __webpack_require__(17); /** @@ -81341,7 +84694,7 @@ module.exports = HTML5AudioSound; /***/ }), -/* 385 */ +/* 396 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81351,10 +84704,10 @@ module.exports = HTML5AudioSound; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSoundManager = __webpack_require__(133); +var BaseSoundManager = __webpack_require__(134); var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(11); -var NoAudioSound = __webpack_require__(386); +var EventEmitter = __webpack_require__(12); +var NoAudioSound = __webpack_require__(397); var NOOP = __webpack_require__(1); /** @@ -81459,7 +84812,7 @@ module.exports = NoAudioSoundManager; /***/ }), -/* 386 */ +/* 397 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81469,9 +84822,9 @@ module.exports = NoAudioSoundManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(134); +var BaseSound = __webpack_require__(135); var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(11); +var EventEmitter = __webpack_require__(12); var Extend = __webpack_require__(19); var returnFalse = function () @@ -81650,7 +85003,7 @@ module.exports = NoAudioSound; /***/ }), -/* 387 */ +/* 398 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81660,11 +85013,11 @@ module.exports = NoAudioSound; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Base64ToArrayBuffer = __webpack_require__(388); -var BaseSoundManager = __webpack_require__(133); +var Base64ToArrayBuffer = __webpack_require__(399); +var BaseSoundManager = __webpack_require__(134); var Class = __webpack_require__(0); -var Events = __webpack_require__(59); -var WebAudioSound = __webpack_require__(389); +var Events = __webpack_require__(61); +var WebAudioSound = __webpack_require__(400); /** * @classdesc @@ -82113,7 +85466,7 @@ module.exports = WebAudioSoundManager; /***/ }), -/* 388 */ +/* 399 */ /***/ (function(module, exports) { /** @@ -82188,7 +85541,7 @@ module.exports = Base64ToArrayBuffer; /***/ }), -/* 389 */ +/* 400 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82198,9 +85551,9 @@ module.exports = Base64ToArrayBuffer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(134); +var BaseSound = __webpack_require__(135); var Class = __webpack_require__(0); -var Events = __webpack_require__(59); +var Events = __webpack_require__(61); /** * @classdesc @@ -83094,7 +86447,7 @@ module.exports = WebAudioSound; /***/ }), -/* 390 */ +/* 401 */ /***/ (function(module, exports) { /** @@ -83142,7 +86495,7 @@ module.exports = TransposeMatrix; /***/ }), -/* 391 */ +/* 402 */ /***/ (function(module, exports) { /** @@ -83264,7 +86617,7 @@ module.exports = QuickSelect; /***/ }), -/* 392 */ +/* 403 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83402,7 +86755,29 @@ module.exports = Range; /***/ }), -/* 393 */ +/* 404 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Structs.Events + */ + +module.exports = { + + PROCESS_QUEUE_ADD: __webpack_require__(963), + PROCESS_QUEUE_REMOVE: __webpack_require__(964) + +}; + + +/***/ }), +/* 405 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83455,32 +86830,40 @@ var BuildGameObjectAnimation = function (sprite, config) var anims = sprite.anims; var key = GetAdvancedValue(animConfig, 'key', undefined); - var startFrame = GetAdvancedValue(animConfig, 'startFrame', undefined); - var delay = GetAdvancedValue(animConfig, 'delay', 0); - var repeat = GetAdvancedValue(animConfig, 'repeat', 0); - var repeatDelay = GetAdvancedValue(animConfig, 'repeatDelay', 0); - var yoyo = GetAdvancedValue(animConfig, 'yoyo', false); - - var play = GetAdvancedValue(animConfig, 'play', false); - var delayedPlay = GetAdvancedValue(animConfig, 'delayedPlay', 0); - - anims.setDelay(delay); - anims.setRepeat(repeat); - anims.setRepeatDelay(repeatDelay); - anims.setYoyo(yoyo); - - if (play) + if (key) { - anims.play(key, startFrame); - } - else if (delayedPlay > 0) - { - anims.delayedPlay(delayedPlay, key, startFrame); - } - else - { - anims.load(key); + var startFrame = GetAdvancedValue(animConfig, 'startFrame', undefined); + + var delay = GetAdvancedValue(animConfig, 'delay', 0); + var repeat = GetAdvancedValue(animConfig, 'repeat', 0); + var repeatDelay = GetAdvancedValue(animConfig, 'repeatDelay', 0); + var yoyo = GetAdvancedValue(animConfig, 'yoyo', false); + + var play = GetAdvancedValue(animConfig, 'play', false); + var delayedPlay = GetAdvancedValue(animConfig, 'delayedPlay', 0); + + var playConfig = { + key: key, + delay: delay, + repeat: repeat, + repeatDelay: repeatDelay, + yoyo: yoyo, + startFrame: startFrame + }; + + if (play) + { + anims.play(playConfig); + } + else if (delayedPlay > 0) + { + anims.playAfterDelay(playConfig, delayedPlay); + } + else + { + anims.load(playConfig); + } } } @@ -83491,7 +86874,437 @@ module.exports = BuildGameObjectAnimation; /***/ }), -/* 394 */ +/* 406 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var Frame = __webpack_require__(96); + +/** + * @classdesc + * A Bob Game Object. + * + * A Bob belongs to a Blitter Game Object. The Blitter is responsible for managing and rendering this object. + * + * A Bob has a position, alpha value and a frame from a texture that it uses to render with. You can also toggle + * the flipped and visible state of the Bob. The Frame the Bob uses to render can be changed dynamically, but it + * must be a Frame within the Texture used by the parent Blitter. + * + * Bob positions are relative to the Blitter parent. So if you move the Blitter parent, all Bob children will + * have their positions impacted by this change as well. + * + * You can manipulate Bob objects directly from your game code, but the creation and destruction of them should be + * handled via the Blitter parent. + * + * @class Bob + * @memberof Phaser.GameObjects + * @constructor + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Blitter} blitter - The parent Blitter object is responsible for updating this Bob. + * @param {number} x - The horizontal position of this Game Object in the world, relative to the parent Blitter position. + * @param {number} y - The vertical position of this Game Object in the world, relative to the parent Blitter position. + * @param {(string|integer)} frame - The Frame this Bob will render with, as defined in the Texture the parent Blitter is using. + * @param {boolean} visible - Should the Bob render visible or not to start with? + */ +var Bob = new Class({ + + initialize: + + function Bob (blitter, x, y, frame, visible) + { + /** + * The Blitter object that this Bob belongs to. + * + * @name Phaser.GameObjects.Bob#parent + * @type {Phaser.GameObjects.Blitter} + * @since 3.0.0 + */ + this.parent = blitter; + + /** + * The x position of this Bob, relative to the x position of the Blitter. + * + * @name Phaser.GameObjects.Bob#x + * @type {number} + * @since 3.0.0 + */ + this.x = x; + + /** + * The y position of this Bob, relative to the y position of the Blitter. + * + * @name Phaser.GameObjects.Bob#y + * @type {number} + * @since 3.0.0 + */ + this.y = y; + + /** + * The frame that the Bob uses to render with. + * To change the frame use the `Bob.setFrame` method. + * + * @name Phaser.GameObjects.Bob#frame + * @type {Phaser.Textures.Frame} + * @protected + * @since 3.0.0 + */ + this.frame = frame; + + /** + * A blank object which can be used to store data related to this Bob in. + * + * @name Phaser.GameObjects.Bob#data + * @type {object} + * @default {} + * @since 3.0.0 + */ + this.data = {}; + + /** + * The tint value of this Bob. + * + * @name Phaser.GameObjects.Bob#tint + * @type {number} + * @default 0xffffff + * @since 3.20.0 + */ + this.tint = 0xffffff; + + /** + * The visible state of this Bob. + * + * @name Phaser.GameObjects.Bob#_visible + * @type {boolean} + * @private + * @since 3.0.0 + */ + this._visible = visible; + + /** + * The alpha value of this Bob. + * + * @name Phaser.GameObjects.Bob#_alpha + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + this._alpha = 1; + + /** + * The horizontally flipped state of the Bob. + * A Bob that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture. + * + * @name Phaser.GameObjects.Bob#flipX + * @type {boolean} + * @since 3.0.0 + */ + this.flipX = false; + + /** + * The vertically flipped state of the Bob. + * A Bob that is flipped vertically will render inversed on the vertical axis (i.e. upside down) + * Flipping always takes place from the middle of the texture. + * + * @name Phaser.GameObjects.Bob#flipY + * @type {boolean} + * @since 3.0.0 + */ + this.flipY = false; + }, + + /** + * Changes the Texture Frame being used by this Bob. + * The frame must be part of the Texture the parent Blitter is using. + * If no value is given it will use the default frame of the Blitter parent. + * + * @method Phaser.GameObjects.Bob#setFrame + * @since 3.0.0 + * + * @param {(string|integer|Phaser.Textures.Frame)} [frame] - The frame to be used during rendering. + * + * @return {this} This Bob Game Object. + */ + setFrame: function (frame) + { + if (frame === undefined) + { + this.frame = this.parent.frame; + } + else if (frame instanceof Frame && frame.texture === this.parent.texture) + { + this.frame = frame; + } + else + { + this.frame = this.parent.texture.get(frame); + } + + return this; + }, + + /** + * Resets the horizontal and vertical flipped state of this Bob back to their default un-flipped state. + * + * @method Phaser.GameObjects.Bob#resetFlip + * @since 3.0.0 + * + * @return {this} This Bob Game Object. + */ + resetFlip: function () + { + this.flipX = false; + this.flipY = false; + + return this; + }, + + /** + * Resets this Bob. + * + * Changes the position to the values given, and optionally changes the frame. + * + * Also resets the flipX and flipY values, sets alpha back to 1 and visible to true. + * + * @method Phaser.GameObjects.Bob#reset + * @since 3.0.0 + * + * @param {number} x - The x position of the Bob. Bob coordinate are relative to the position of the Blitter object. + * @param {number} y - The y position of the Bob. Bob coordinate are relative to the position of the Blitter object. + * @param {(string|integer|Phaser.Textures.Frame)} [frame] - The Frame the Bob will use. It _must_ be part of the Texture the parent Blitter object is using. + * + * @return {this} This Bob Game Object. + */ + reset: function (x, y, frame) + { + this.x = x; + this.y = y; + + this.flipX = false; + this.flipY = false; + + this._alpha = 1; + this._visible = true; + + this.parent.dirty = true; + + if (frame) + { + this.setFrame(frame); + } + + return this; + }, + + /** + * Changes the position of this Bob to the values given. + * + * @method Phaser.GameObjects.Bob#setPosition + * @since 3.20.0 + * + * @param {number} x - The x position of the Bob. Bob coordinate are relative to the position of the Blitter object. + * @param {number} y - The y position of the Bob. Bob coordinate are relative to the position of the Blitter object. + * + * @return {this} This Bob Game Object. + */ + setPosition: function (x, y) + { + this.x = x; + this.y = y; + + return this; + }, + + /** + * Sets the horizontal flipped state of this Bob. + * + * @method Phaser.GameObjects.Bob#setFlipX + * @since 3.0.0 + * + * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped. + * + * @return {this} This Bob Game Object. + */ + setFlipX: function (value) + { + this.flipX = value; + + return this; + }, + + /** + * Sets the vertical flipped state of this Bob. + * + * @method Phaser.GameObjects.Bob#setFlipY + * @since 3.0.0 + * + * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped. + * + * @return {this} This Bob Game Object. + */ + setFlipY: function (value) + { + this.flipY = value; + + return this; + }, + + /** + * Sets the horizontal and vertical flipped state of this Bob. + * + * @method Phaser.GameObjects.Bob#setFlip + * @since 3.0.0 + * + * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped. + * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped. + * + * @return {this} This Bob Game Object. + */ + setFlip: function (x, y) + { + this.flipX = x; + this.flipY = y; + + return this; + }, + + /** + * Sets the visibility of this Bob. + * + * An invisible Bob will skip rendering. + * + * @method Phaser.GameObjects.Bob#setVisible + * @since 3.0.0 + * + * @param {boolean} value - The visible state of the Game Object. + * + * @return {this} This Bob Game Object. + */ + setVisible: function (value) + { + this.visible = value; + + return this; + }, + + /** + * Set the Alpha level of this Bob. 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. + * + * A Bob with alpha 0 will skip rendering. + * + * @method Phaser.GameObjects.Bob#setAlpha + * @since 3.0.0 + * + * @param {number} value - The alpha value used for this Bob. Between 0 and 1. + * + * @return {this} This Bob Game Object. + */ + setAlpha: function (value) + { + this.alpha = value; + + return this; + }, + + /** + * Sets the tint of this Bob. + * + * @method Phaser.GameObjects.Bob#setTint + * @since 3.20.0 + * + * @param {number} value - The tint value used for this Bob. Between 0 and 0xffffff. + * + * @return {this} This Bob Game Object. + */ + setTint: function (value) + { + this.tint = value; + + return this; + }, + + /** + * Destroys this Bob instance. + * Removes itself from the Blitter and clears the parent, frame and data properties. + * + * @method Phaser.GameObjects.Bob#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.parent.dirty = true; + + this.parent.children.remove(this); + + this.parent = undefined; + this.frame = undefined; + this.data = undefined; + }, + + /** + * The visible state of the Bob. + * + * An invisible Bob will skip rendering. + * + * @name Phaser.GameObjects.Bob#visible + * @type {boolean} + * @since 3.0.0 + */ + visible: { + + get: function () + { + return this._visible; + }, + + set: function (value) + { + this.parent.dirty |= (this._visible !== value); + this._visible = value; + } + + }, + + /** + * The alpha value of the Bob, between 0 and 1. + * + * A Bob with alpha 0 will skip rendering. + * + * @name Phaser.GameObjects.Bob#alpha + * @type {number} + * @since 3.0.0 + */ + alpha: { + + get: function () + { + return this._alpha; + }, + + set: function (value) + { + this.parent.dirty |= ((this._alpha > 0) !== (value > 0)); + this._alpha = value; + } + + } + +}); + +module.exports = Bob; + + +/***/ }), +/* 407 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83533,7 +87346,7 @@ module.exports = Union; /***/ }), -/* 395 */ +/* 408 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83543,13 +87356,14 @@ module.exports = Union; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var DOMElementRender = __webpack_require__(966); +var Components = __webpack_require__(11); +var DOMElementRender = __webpack_require__(977); var GameObject = __webpack_require__(14); +var GameObjectEvents = __webpack_require__(29); var IsPlainObject = __webpack_require__(7); -var RemoveFromDOM = __webpack_require__(184); -var SCENE_EVENTS = __webpack_require__(22); -var Vector4 = __webpack_require__(126); +var RemoveFromDOM = __webpack_require__(186); +var SCENE_EVENTS = __webpack_require__(20); +var Vector4 = __webpack_require__(128); /** * @classdesc @@ -83568,6 +87382,9 @@ var Vector4 = __webpack_require__(126); * of the game canvas. This div is sized to match the canvas, and if the canvas size changes, as a result of * settings within the Scale Manager, the dom container is resized accordingly. * + * If you have not already done so, you have to provide a `parent` in the Game Configuration, or the DOM + * Container will fail to be created. + * * You can create a DOM Element by either passing in DOMStrings, or by passing in a reference to an existing * Element that you wish to be placed under the control of Phaser. For example: * @@ -83825,6 +87642,21 @@ var DOMElement = new Class({ scene.sys.events.on(SCENE_EVENTS.SLEEP, this.handleSceneEvent, this); scene.sys.events.on(SCENE_EVENTS.WAKE, this.handleSceneEvent, this); + + this.on(GameObjectEvents.ADDED_TO_SCENE, this.addedToScene, this); + this.on(GameObjectEvents.REMOVED_FROM_SCENE, this.removedFromScene, this); + }, + + // Overrides Game Object method + addedToScene: function () + { + this.scene.sys.updateList.add(this); + }, + + // Overrides Game Object method + removedFromScene: function () + { + this.scene.sys.updateList.remove(this); }, /** @@ -84510,7 +88342,7 @@ module.exports = DOMElement; /***/ }), -/* 396 */ +/* 409 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84519,7 +88351,7 @@ module.exports = DOMElement; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CSSBlendModes = __webpack_require__(967); +var CSSBlendModes = __webpack_require__(978); var GameObject = __webpack_require__(14); /** @@ -84632,7 +88464,7 @@ module.exports = DOMElementCSSRenderer; /***/ }), -/* 397 */ +/* 410 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84642,25 +88474,26 @@ module.exports = DOMElementCSSRenderer; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); +var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); -var ExternRender = __webpack_require__(971); +var GameObjectEvents = __webpack_require__(29); +var ExternRender = __webpack_require__(982); /** * @classdesc * An Extern Game Object is a special type of Game Object that allows you to pass * rendering off to a 3rd party. - * + * * When you create an Extern and place it in the display list of a Scene, the renderer will * process the list as usual. When it finds an Extern it will flush the current batch, * clear down the pipeline and prepare a transform matrix which your render function can * take advantage of, if required. - * + * * The WebGL context is then left is a 'clean' state, ready for you to bind your own shaders, * or draw to it, whatever you wish to do. Once you've finished, you should free-up any - * of your resources. The Extern will then rebind the Phaser pipeline and carry on + * of your resources. The Extern will then rebind the Phaser pipeline and carry on * rendering the display list. - * + * * Although this object has lots of properties such as Alpha, Blend Mode and Tint, none of * them are used during rendering unless you take advantage of them in your own render code. * @@ -84708,6 +88541,21 @@ var Extern = new Class({ function Extern (scene) { GameObject.call(this, scene, 'Extern'); + + this.on(GameObjectEvents.ADDED_TO_SCENE, this.addedToScene, this); + this.on(GameObjectEvents.REMOVED_FROM_SCENE, this.removedFromScene, this); + }, + + // Overrides Game Object method + addedToScene: function () + { + this.scene.sys.updateList.add(this); + }, + + // Overrides Game Object method + removedFromScene: function () + { + this.scene.sys.updateList.remove(this); }, preUpdate: function () @@ -84728,7 +88576,7 @@ module.exports = Extern; /***/ }), -/* 398 */ +/* 411 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84737,8 +88585,8 @@ module.exports = Extern; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CircumferencePoint = __webpack_require__(199); -var FromPercent = __webpack_require__(88); +var CircumferencePoint = __webpack_require__(202); +var FromPercent = __webpack_require__(89); var MATH_CONST = __webpack_require__(13); var Point = __webpack_require__(4); @@ -84771,7 +88619,7 @@ module.exports = GetPoint; /***/ }), -/* 399 */ +/* 412 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84780,9 +88628,9 @@ module.exports = GetPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circumference = __webpack_require__(400); -var CircumferencePoint = __webpack_require__(199); -var FromPercent = __webpack_require__(88); +var Circumference = __webpack_require__(413); +var CircumferencePoint = __webpack_require__(202); +var FromPercent = __webpack_require__(89); var MATH_CONST = __webpack_require__(13); /** @@ -84825,7 +88673,7 @@ module.exports = GetPoints; /***/ }), -/* 400 */ +/* 413 */ /***/ (function(module, exports) { /** @@ -84857,7 +88705,7 @@ module.exports = Circumference; /***/ }), -/* 401 */ +/* 414 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84866,7 +88714,7 @@ module.exports = Circumference; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Commands = __webpack_require__(198); +var Commands = __webpack_require__(201); var SetTransform = __webpack_require__(28); /** @@ -85107,7 +88955,598 @@ module.exports = GraphicsCanvasRenderer; /***/ }), -/* 402 */ +/* 415 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var FloatBetween = __webpack_require__(126); +var GetEaseFunction = __webpack_require__(71); +var GetFastValue = __webpack_require__(2); +var Wrap = __webpack_require__(59); + +/** + * @classdesc + * A Particle Emitter property. + * + * Facilitates changing Particle properties as they are emitted and throughout their lifetime. + * + * @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 {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) + { + if (emitOnly === undefined) + { + emitOnly = false; + } + + /** + * The name of this property. + * + * @name Phaser.GameObjects.Particles.EmitterOp#propertyKey + * @type {string} + * @since 3.0.0 + */ + this.propertyKey = key; + + /** + * The value of this property. + * + * @name Phaser.GameObjects.Particles.EmitterOp#propertyValue + * @type {number} + * @since 3.0.0 + */ + this.propertyValue = defaultValue; + + /** + * The default value of this property. + * + * @name Phaser.GameObjects.Particles.EmitterOp#defaultValue + * @type {number} + * @since 3.0.0 + */ + this.defaultValue = defaultValue; + + /** + * The number of steps for stepped easing between {@link Phaser.GameObjects.Particles.EmitterOp#start} and + * {@link Phaser.GameObjects.Particles.EmitterOp#end} values, per emit. + * + * @name Phaser.GameObjects.Particles.EmitterOp#steps + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.steps = 0; + + /** + * The step counter for stepped easing, per emit. + * + * @name Phaser.GameObjects.Particles.EmitterOp#counter + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.counter = 0; + + /** + * The start value for this property to ease between. + * + * @name Phaser.GameObjects.Particles.EmitterOp#start + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.start = 0; + + /** + * The end value for this property to ease between. + * + * @name Phaser.GameObjects.Particles.EmitterOp#end + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.end = 0; + + /** + * The easing function to use for updating this property. + * + * @name Phaser.GameObjects.Particles.EmitterOp#ease + * @type {?function} + * @since 3.0.0 + */ + this.ease; + + /** + * Whether this property can only be modified when a Particle is emitted. + * + * Set to `true` to allow only {@link Phaser.GameObjects.Particles.EmitterOp#onEmit} callbacks to be set and + * affect this property. + * + * Set to `false` to allow both {@link Phaser.GameObjects.Particles.EmitterOp#onEmit} and + * {@link Phaser.GameObjects.Particles.EmitterOp#onUpdate} callbacks to be set and affect this property. + * + * @name Phaser.GameObjects.Particles.EmitterOp#emitOnly + * @type {boolean} + * @since 3.0.0 + */ + this.emitOnly = emitOnly; + + /** + * The callback to run for Particles when they are emitted from the Particle Emitter. + * + * @name Phaser.GameObjects.Particles.EmitterOp#onEmit + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitCallback} + * @since 3.0.0 + */ + this.onEmit = this.defaultEmit; + + /** + * The callback to run for Particles when they are updated. + * + * @name Phaser.GameObjects.Particles.EmitterOp#onUpdate + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateCallback} + * @since 3.0.0 + */ + this.onUpdate = this.defaultUpdate; + + this.loadConfig(config); + }, + + /** + * Load the property from a Particle Emitter configuration object. + * + * Optionally accepts a new property key to use, replacing the current one. + * + * @method Phaser.GameObjects.Particles.EmitterOp#loadConfig + * @since 3.0.0 + * + * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} [config] - Settings for the Particle Emitter that owns this property. + * @param {string} [newKey] - The new key to use for this property, if any. + */ + loadConfig: function (config, newKey) + { + if (config === undefined) + { + config = {}; + } + + if (newKey) + { + this.propertyKey = newKey; + } + + this.propertyValue = GetFastValue( + config, + this.propertyKey, + this.defaultValue + ); + + this.setMethods(); + + if (this.emitOnly) + { + // Reset it back again + this.onUpdate = this.defaultUpdate; + } + }, + + /** + * Build a JSON representation of this Particle Emitter property. + * + * @method Phaser.GameObjects.Particles.EmitterOp#toJSON + * @since 3.0.0 + * + * @return {object} A JSON representation of this Particle Emitter property. + */ + toJSON: function () + { + return this.propertyValue; + }, + + /** + * Change the current value of the property and update its callback methods. + * + * @method Phaser.GameObjects.Particles.EmitterOp#onChange + * @since 3.0.0 + * + * @param {number} value - The value of the property. + * + * @return {this} This Emitter Op object. + */ + onChange: function (value) + { + this.propertyValue = value; + + return this.setMethods(); + }, + + /** + * 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}. + * + * @method Phaser.GameObjects.Particles.EmitterOp#setMethods + * @since 3.0.0 + * + * @return {this} This Emitter Op object. + */ + setMethods: function () + { + var value = this.propertyValue; + + var t = typeof value; + + if (t === 'number') + { + // Explicit static value: + // x: 400 + + this.onEmit = this.staticValueEmit; + this.onUpdate = this.staticValueUpdate; // How? + } + else if (Array.isArray(value)) + { + // Picks a random element from the array: + // x: [ 100, 200, 300, 400 ] + + this.onEmit = this.randomStaticValueEmit; + } + 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) + { + this.onEmit = value; + } + else + { + this.onUpdate = value; + } + } + else if (t === 'object' && (this.has(value, 'random') || this.hasBoth(value, 'start', 'end') || this.hasBoth(value, 'min', 'max'))) + { + this.start = this.has(value, 'start') ? value.start : value.min; + this.end = this.has(value, 'end') ? value.end : value.max; + + var isRandom = (this.hasBoth(value, 'min', 'max') || !!value.random); + + // A random starting value (using 'min | max' instead of 'start | end' automatically implies a random value) + + // x: { start: 100, end: 400, random: true } OR { min: 100, max: 400 } OR { random: [ 100, 400 ] } + + if (isRandom) + { + var rnd = value.random; + + // x: { random: [ 100, 400 ] } = the same as doing: x: { start: 100, end: 400, random: true } + if (Array.isArray(rnd)) + { + this.start = rnd[0]; + this.end = rnd[1]; + } + + this.onEmit = this.randomRangedValueEmit; + } + + if (this.has(value, 'steps')) + { + // 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; + } + else + { + // An eased range (defaults to Linear if not specified) + + // x: { start: 100, end: 400, [ ease: 'Linear' ] } + + var easeType = this.has(value, 'ease') ? value.ease : 'Linear'; + + this.ease = GetEaseFunction(easeType); + + if (!isRandom) + { + this.onEmit = this.easedValueEmit; + } + + // BUG: alpha, rotate, scaleX, scaleY, or tint are eased here if {min, max} is given. + // Probably this branch should exclude isRandom entirely. + + this.onUpdate = this.easeValueUpdate; + } + } + else if (t === 'object' && this.hasEither(value, 'onEmit', 'onUpdate')) + { + // Custom onEmit and onUpdate callbacks + + /* + x: { + // Called at the start of the particles life, when it is being created + onEmit: function (particle, key, t, value) + { + return value; + }, + + // Called during the particles life on each update + onUpdate: function (particle, key, t, value) + { + return value; + } + } + */ + + if (this.has(value, 'onEmit')) + { + this.onEmit = value.onEmit; + } + + if (this.has(value, 'onUpdate')) + { + this.onUpdate = value.onUpdate; + } + } + + return this; + }, + + /** + * Check whether an object has the given property. + * + * @method Phaser.GameObjects.Particles.EmitterOp#has + * @since 3.0.0 + * + * @param {object} object - The object to check. + * @param {string} key - The key of the property to look for in the object. + * + * @return {boolean} `true` if the property exists in the object, `false` otherwise. + */ + has: function (object, key) + { + return object.hasOwnProperty(key); + }, + + /** + * Check whether an object has both of the given properties. + * + * @method Phaser.GameObjects.Particles.EmitterOp#hasBoth + * @since 3.0.0 + * + * @param {object} object - The object to check. + * @param {string} key1 - The key of the first property to check the object for. + * @param {string} key2 - The key of the second property to check the object for. + * + * @return {boolean} `true` if both properties exist in the object, `false` otherwise. + */ + hasBoth: function (object, key1, key2) + { + return object.hasOwnProperty(key1) && object.hasOwnProperty(key2); + }, + + /** + * Check whether an object has at least one of the given properties. + * + * @method Phaser.GameObjects.Particles.EmitterOp#hasEither + * @since 3.0.0 + * + * @param {object} object - The object to check. + * @param {string} key1 - The key of the first property to check the object for. + * @param {string} key2 - The key of the second property to check the object for. + * + * @return {boolean} `true` if at least one of the properties exists in the object, `false` if neither exist. + */ + hasEither: function (object, key1, key2) + { + return object.hasOwnProperty(key1) || object.hasOwnProperty(key2); + }, + + /** + * The returned value sets what the property will be at the START of the particles life, on emit. + * + * @method Phaser.GameObjects.Particles.EmitterOp#defaultEmit + * @since 3.0.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. + */ + defaultEmit: function (particle, key, value) + { + return value; + }, + + /** + * The returned value updates the property for the duration of the particles life. + * + * @method Phaser.GameObjects.Particles.EmitterOp#defaultUpdate + * @since 3.0.0 + * + * @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} value - The current value of the property. + * + * @return {number} The new value of the property. + */ + defaultUpdate: function (particle, key, t, value) + { + return value; + }, + + /** + * An `onEmit` callback that returns the current value of the property. + * + * @method Phaser.GameObjects.Particles.EmitterOp#staticValueEmit + * @since 3.0.0 + * + * @return {number} The current value of the property. + */ + staticValueEmit: function () + { + return this.propertyValue; + }, + + /** + * An `onUpdate` callback that returns the current value of the property. + * + * @method Phaser.GameObjects.Particles.EmitterOp#staticValueUpdate + * @since 3.0.0 + * + * @return {number} The current value of the property. + */ + staticValueUpdate: function () + { + return this.propertyValue; + }, + + /** + * An `onEmit` callback that returns a random value from the current value array. + * + * @method Phaser.GameObjects.Particles.EmitterOp#randomStaticValueEmit + * @since 3.0.0 + * + * @return {number} The new value of the property. + */ + randomStaticValueEmit: function () + { + var randomIndex = Math.floor(Math.random() * this.propertyValue.length); + + return this.propertyValue[randomIndex]; + }, + + /** + * 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#randomRangedValueEmit + * @since 3.0.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. + */ + randomRangedValueEmit: function (particle, key) + { + var value = FloatBetween(this.start, this.end); + + if (particle && particle.data[key]) + { + particle.data[key].min = value; + } + + return value; + }, + + /** + * An `onEmit` callback that returns a stepped value between the + * {@link Phaser.GameObjects.Particles.EmitterOp#start} and {@link Phaser.GameObjects.Particles.EmitterOp#end} + * range. + * + * @method Phaser.GameObjects.Particles.EmitterOp#steppedEmit + * @since 3.0.0 + * + * @return {number} The new value of the property. + */ + steppedEmit: function () + { + var current = this.counter; + + var next = this.counter + (this.end - this.start) / this.steps; + + this.counter = Wrap(next, this.start, this.end); + + return current; + }, + + /** + * An `onEmit` callback for an eased property. + * + * It prepares the particle for easing by {@link Phaser.GameObjects.Particles.EmitterOp#easeValueUpdate}. + * + * @method Phaser.GameObjects.Particles.EmitterOp#easedValueEmit + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Particles.Particle} particle - The particle. + * @param {string} key - The name of the property. + * + * @return {number} {@link Phaser.GameObjects.Particles.EmitterOp#start}, as the new value of the property. + */ + easedValueEmit: function (particle, key) + { + if (particle && particle.data[key]) + { + var data = particle.data[key]; + + data.min = this.start; + data.max = this.end; + } + + return this.start; + }, + + /** + * An `onUpdate` callback that returns an eased value between the + * {@link Phaser.GameObjects.Particles.EmitterOp#start} and {@link Phaser.GameObjects.Particles.EmitterOp#end} + * range. + * + * @method Phaser.GameObjects.Particles.EmitterOp#easeValueUpdate + * @since 3.0.0 + * + * @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) + * + * @return {number} The new value of the property. + */ + easeValueUpdate: function (particle, key, t) + { + var data = particle.data[key]; + + return (data.max - data.min) * this.ease(t) + data.min; + } +}); + +module.exports = EmitterOp; + + +/***/ }), +/* 416 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85326,7 +89765,7 @@ module.exports = GravityWell; /***/ }), -/* 403 */ +/* 417 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85336,8 +89775,8 @@ module.exports = GravityWell; */ var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(40); -var DistanceBetween = __webpack_require__(54); +var DegToRad = __webpack_require__(41); +var DistanceBetween = __webpack_require__(55); /** * @classdesc @@ -85895,7 +90334,7 @@ module.exports = Particle; /***/ }), -/* 404 */ +/* 418 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85904,22 +90343,22 @@ module.exports = Particle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlendModes = __webpack_require__(53); +var BlendModes = __webpack_require__(54); var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var DeathZone = __webpack_require__(405); -var EdgeZone = __webpack_require__(406); -var EmitterOp = __webpack_require__(983); +var Components = __webpack_require__(11); +var DeathZone = __webpack_require__(419); +var EdgeZone = __webpack_require__(420); +var EmitterOp = __webpack_require__(415); var GetFastValue = __webpack_require__(2); -var GetRandom = __webpack_require__(191); -var HasAny = __webpack_require__(407); -var HasValue = __webpack_require__(112); -var Particle = __webpack_require__(403); -var RandomZone = __webpack_require__(408); +var GetRandom = __webpack_require__(194); +var HasAny = __webpack_require__(421); +var HasValue = __webpack_require__(113); +var Particle = __webpack_require__(417); +var RandomZone = __webpack_require__(422); var Rectangle = __webpack_require__(9); -var StableSort = __webpack_require__(137); +var StableSort = __webpack_require__(138); var Vector2 = __webpack_require__(3); -var Wrap = __webpack_require__(58); +var Wrap = __webpack_require__(59); /** * @classdesc @@ -87724,7 +92163,7 @@ var ParticleEmitter = new Class({ */ depthSort: function () { - StableSort.inplace(this.alive, this.depthSortCallback); + StableSort(this.alive, this.depthSortCallback); return this; }, @@ -87966,7 +92405,7 @@ module.exports = ParticleEmitter; /***/ }), -/* 405 */ +/* 419 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -88044,7 +92483,7 @@ module.exports = DeathZone; /***/ }), -/* 406 */ +/* 420 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -88288,7 +92727,7 @@ module.exports = EdgeZone; /***/ }), -/* 407 */ +/* 421 */ /***/ (function(module, exports) { /** @@ -88325,7 +92764,7 @@ module.exports = HasAny; /***/ }), -/* 408 */ +/* 422 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -88398,7 +92837,7 @@ module.exports = RandomZone; /***/ }), -/* 409 */ +/* 423 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -88408,8 +92847,8 @@ module.exports = RandomZone; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var Sprite = __webpack_require__(75); +var Components = __webpack_require__(11); +var Sprite = __webpack_require__(76); /** * @classdesc @@ -88480,7 +92919,89 @@ module.exports = PathFollower; /***/ }), -/* 410 */ +/* 424 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Returns an object containing dimensions of the Text object. + * + * @function Phaser.GameObjects.GetTextSize + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Text} text - The Text object to calculate the size from. + * @param {Phaser.Types.GameObjects.Text.TextMetrics} size - The Text metrics to use when calculating the size. + * @param {string[]} lines - The lines of text to calculate the size from. + * + * @return {Phaser.Types.GameObjects.Text.GetTextSizeObject} An object containing dimensions of the Text object. + */ +var GetTextSize = function (text, size, lines) +{ + var canvas = text.canvas; + var context = text.context; + var style = text.style; + + var lineWidths = []; + var maxLineWidth = 0; + var drawnLines = lines.length; + + if (style.maxLines > 0 && style.maxLines < lines.length) + { + drawnLines = style.maxLines; + } + + style.syncFont(canvas, context); + + // Text Width + + for (var i = 0; i < drawnLines; i++) + { + var lineWidth = style.strokeThickness; + + lineWidth += context.measureText(lines[i]).width; + + // Adjust for wrapped text + if (style.wordWrap) + { + lineWidth -= context.measureText(' ').width; + } + + lineWidths[i] = Math.ceil(lineWidth); + maxLineWidth = Math.max(maxLineWidth, lineWidths[i]); + } + + // Text Height + + var lineHeight = size.fontSize + style.strokeThickness; + var height = lineHeight * drawnLines; + var lineSpacing = text.lineSpacing; + + // Adjust for line spacing + if (drawnLines > 1) + { + height += lineSpacing * (drawnLines - 1); + } + + return { + width: maxLineWidth, + height: height, + lines: drawnLines, + lineWidths: lineWidths, + lineSpacing: lineSpacing, + lineHeight: lineHeight + }; +}; + +module.exports = GetTextSize; + + +/***/ }), +/* 425 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -88489,13 +93010,1254 @@ module.exports = PathFollower; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcRender = __webpack_require__(1009); var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(40); -var Earcut = __webpack_require__(66); -var GeomCircle = __webpack_require__(65); +var GetAdvancedValue = __webpack_require__(15); +var GetValue = __webpack_require__(6); +var MeasureText = __webpack_require__(426); + +// Key: [ Object Key, Default Value ] + +var propertyMap = { + 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', false ], + shadowFill: [ 'shadow.fill', false ], + align: [ 'align', 'left' ], + maxLines: [ 'maxLines', 0 ], + fixedWidth: [ 'fixedWidth', 0 ], + fixedHeight: [ 'fixedHeight', 0 ], + resolution: [ 'resolution', 0 ], + rtl: [ 'rtl', false ], + 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', false ] +}; + +/** + * @classdesc + * A TextStyle class manages all of the style settings for a Text object. + * + * Text Game Objects create a TextStyle instance automatically, which is + * accessed via the `Text.style` property. You do not normally need to + * instantiate one yourself. + * + * @class TextStyle + * @memberof Phaser.GameObjects + * @constructor + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Text} text - The Text object that this TextStyle is styling. + * @param {Phaser.Types.GameObjects.Text.TextStyle} style - The style settings to set. + */ +var TextStyle = new Class({ + + initialize: + + function TextStyle (text, style) + { + /** + * The Text object that this TextStyle is styling. + * + * @name Phaser.GameObjects.TextStyle#parent + * @type {Phaser.GameObjects.Text} + * @since 3.0.0 + */ + this.parent = text; + + /** + * The font family. + * + * @name Phaser.GameObjects.TextStyle#fontFamily + * @type {string} + * @default 'Courier' + * @since 3.0.0 + */ + this.fontFamily; + + /** + * The font size. + * + * @name Phaser.GameObjects.TextStyle#fontSize + * @type {string} + * @default '16px' + * @since 3.0.0 + */ + this.fontSize; + + /** + * The font style. + * + * @name Phaser.GameObjects.TextStyle#fontStyle + * @type {string} + * @since 3.0.0 + */ + this.fontStyle; + + /** + * The background color. + * + * @name Phaser.GameObjects.TextStyle#backgroundColor + * @type {string} + * @since 3.0.0 + */ + this.backgroundColor; + + /** + * The text fill color. + * + * @name Phaser.GameObjects.TextStyle#color + * @type {string} + * @default '#fff' + * @since 3.0.0 + */ + this.color; + + /** + * The text stroke color. + * + * @name Phaser.GameObjects.TextStyle#stroke + * @type {string} + * @default '#fff' + * @since 3.0.0 + */ + this.stroke; + + /** + * The text stroke thickness. + * + * @name Phaser.GameObjects.TextStyle#strokeThickness + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.strokeThickness; + + /** + * The horizontal shadow offset. + * + * @name Phaser.GameObjects.TextStyle#shadowOffsetX + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.shadowOffsetX; + + /** + * The vertical shadow offset. + * + * @name Phaser.GameObjects.TextStyle#shadowOffsetY + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.shadowOffsetY; + + /** + * The shadow color. + * + * @name Phaser.GameObjects.TextStyle#shadowColor + * @type {string} + * @default '#000' + * @since 3.0.0 + */ + this.shadowColor; + + /** + * The shadow blur radius. + * + * @name Phaser.GameObjects.TextStyle#shadowBlur + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.shadowBlur; + + /** + * Whether shadow stroke is enabled or not. + * + * @name Phaser.GameObjects.TextStyle#shadowStroke + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.shadowStroke; + + /** + * Whether shadow fill is enabled or not. + * + * @name Phaser.GameObjects.TextStyle#shadowFill + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.shadowFill; + + /** + * The text alignment. + * + * @name Phaser.GameObjects.TextStyle#align + * @type {string} + * @default 'left' + * @since 3.0.0 + */ + this.align; + + /** + * The maximum number of lines to draw. + * + * @name Phaser.GameObjects.TextStyle#maxLines + * @type {integer} + * @default 0 + * @since 3.0.0 + */ + this.maxLines; + + /** + * The fixed width of the text. + * + * `0` means no fixed with. + * + * @name Phaser.GameObjects.TextStyle#fixedWidth + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.fixedWidth; + + /** + * The fixed height of the text. + * + * `0` means no fixed height. + * + * @name Phaser.GameObjects.TextStyle#fixedHeight + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.fixedHeight; + + /** + * The resolution the text is rendered to its internal canvas at. + * The default is 0, which means it will use the resolution set in the Game Config. + * + * @name Phaser.GameObjects.TextStyle#resolution + * @type {number} + * @default 0 + * @since 3.12.0 + */ + this.resolution; + + /** + * Whether the text should render right to left. + * + * @name Phaser.GameObjects.TextStyle#rtl + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.rtl; + + /** + * The test string to use when measuring the font. + * + * @name Phaser.GameObjects.TextStyle#testString + * @type {string} + * @default '|MÉqgy' + * @since 3.0.0 + */ + this.testString; + + /** + * The amount of horizontal padding added to the width of the text when calculating the font metrics. + * + * @name Phaser.GameObjects.TextStyle#baselineX + * @type {number} + * @default 1.2 + * @since 3.3.0 + */ + this.baselineX; + + /** + * The amount of vertical padding added to the height of the text when calculating the font metrics. + * + * @name Phaser.GameObjects.TextStyle#baselineY + * @type {number} + * @default 1.4 + * @since 3.3.0 + */ + this.baselineY; + + /** + * The maximum width of a line of text in pixels. Null means no line wrapping. Setting this + * property directly will not re-run the word wrapping algorithm. To change the width and + * re-wrap, use {@link Phaser.GameObjects.TextStyle#setWordWrapWidth}. + * + * @name Phaser.GameObjects.TextStyle#wordWrapWidth + * @type {number | null} + * @default null + * @since 3.24.0 + */ + this.wordWrapWidth; + + /** + * A custom function that will be responsible for wrapping the text. It will receive two + * arguments: text (the string to wrap), textObject (this Text instance). It should return + * the wrapped lines either as an array of lines or as a string with newline characters in + * place to indicate where breaks should happen. Setting this directly will not re-run the + * word wrapping algorithm. To change the callback and re-wrap, use + * {@link Phaser.GameObjects.TextStyle#setWordWrapCallback}. + * + * @name Phaser.GameObjects.TextStyle#wordWrapCallback + * @type {TextStyleWordWrapCallback | null} + * @default null + * @since 3.24.0 + */ + this.wordWrapCallback; + + /** + * The scope that will be applied when the wordWrapCallback is invoked. Setting this directly will not re-run the + * word wrapping algorithm. To change the callback and re-wrap, use + * {@link Phaser.GameObjects.TextStyle#setWordWrapCallback}. + * + * @name Phaser.GameObjects.TextStyle#wordWrapCallbackScope + * @type {object | null} + * @default null + * @since 3.24.0 + */ + this.wordWrapCallbackScope; + + /** + * Whether or not to use the advanced wrapping algorithm. If true, spaces are collapsed and + * whitespace is trimmed from lines. If false, spaces and whitespace are left as is. Setting + * this property directly will not re-run the word wrapping algorithm. To change the + * advanced setting and re-wrap, use {@link Phaser.GameObjects.TextStyle#setWordWrapWidth}. + * + * @name Phaser.GameObjects.TextStyle#wordWrapUseAdvanced + * @type {boolean} + * @default false + * @since 3.24.0 + */ + this.wordWrapUseAdvanced; + + /** + * The font style, size and family. + * + * @name Phaser.GameObjects.TextStyle#_font + * @type {string} + * @private + * @since 3.0.0 + */ + this._font; + + // Set to defaults + user style + this.setStyle(style, false, true); + + var metrics = GetValue(style, 'metrics', false); + + // Provide optional TextMetrics in the style object to avoid the canvas look-up / scanning + // Doing this is reset if you then change the font of this TextStyle after creation + if (metrics) + { + this.metrics = { + ascent: GetValue(metrics, 'ascent', 0), + descent: GetValue(metrics, 'descent', 0), + fontSize: GetValue(metrics, 'fontSize', 0) + }; + } + else + { + this.metrics = MeasureText(this); + } + }, + + /** + * Set the text style. + * + * @example + * text.setStyle({ + * fontSize: '64px', + * fontFamily: 'Arial', + * color: '#ffffff', + * align: 'center', + * backgroundColor: '#ff00ff' + * }); + * + * @method Phaser.GameObjects.TextStyle#setStyle + * @since 3.0.0 + * + * @param {Phaser.Types.GameObjects.Text.TextStyle} style - The style settings to set. + * @param {boolean} [updateText=true] - Whether to update the text immediately. + * @param {boolean} [setDefaults=false] - Use the default values is not set, or the local values. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setStyle: function (style, updateText, setDefaults) + { + if (updateText === undefined) { updateText = true; } + if (setDefaults === undefined) { setDefaults = false; } + + // Avoid type mutation + // eslint-disable-next-line no-prototype-builtins + if (style && style.hasOwnProperty('fontSize') && typeof style.fontSize === 'number') + { + style.fontSize = style.fontSize.toString() + 'px'; + } + + for (var key in propertyMap) + { + var value = (setDefaults) ? propertyMap[key][1] : this[key]; + + if (key === 'wordWrapCallback' || key === 'wordWrapCallbackScope') + { + // Callback & scope should be set without processing the values + this[key] = GetValue(style, propertyMap[key][0], value); + } + else + { + this[key] = GetAdvancedValue(style, propertyMap[key][0], value); + } + } + + // Allow for 'font' override + var font = GetValue(style, 'font', null); + + if (font !== null) + { + this.setFont(font, false); + } + + this._font = [ this.fontStyle, this.fontSize, this.fontFamily ].join(' ').trim(); + + // Allow for 'fill' to be used in place of 'color' + var fill = GetValue(style, 'fill', null); + + if (fill !== null) + { + this.color = fill; + } + + if (updateText) + { + return this.update(true); + } + else + { + return this.parent; + } + }, + + /** + * Synchronize the font settings to the given Canvas Rendering Context. + * + * @method Phaser.GameObjects.TextStyle#syncFont + * @since 3.0.0 + * + * @param {HTMLCanvasElement} canvas - The Canvas Element. + * @param {CanvasRenderingContext2D} context - The Canvas Rendering Context. + */ + syncFont: function (canvas, context) + { + context.font = this._font; + }, + + /** + * Synchronize the text style settings to the given Canvas Rendering Context. + * + * @method Phaser.GameObjects.TextStyle#syncStyle + * @since 3.0.0 + * + * @param {HTMLCanvasElement} canvas - The Canvas Element. + * @param {CanvasRenderingContext2D} context - The Canvas Rendering Context. + */ + syncStyle: function (canvas, context) + { + context.textBaseline = 'alphabetic'; + + context.fillStyle = this.color; + context.strokeStyle = this.stroke; + + context.lineWidth = this.strokeThickness; + context.lineCap = 'round'; + context.lineJoin = 'round'; + }, + + /** + * Synchronize the shadow settings to the given Canvas Rendering Context. + * + * @method Phaser.GameObjects.TextStyle#syncShadow + * @since 3.0.0 + * + * @param {CanvasRenderingContext2D} context - The Canvas Rendering Context. + * @param {boolean} enabled - Whether shadows are enabled or not. + */ + syncShadow: function (context, enabled) + { + if (enabled) + { + context.shadowOffsetX = this.shadowOffsetX; + context.shadowOffsetY = this.shadowOffsetY; + context.shadowColor = this.shadowColor; + context.shadowBlur = this.shadowBlur; + } + else + { + context.shadowOffsetX = 0; + context.shadowOffsetY = 0; + context.shadowColor = 0; + context.shadowBlur = 0; + } + }, + + /** + * Update the style settings for the parent Text object. + * + * @method Phaser.GameObjects.TextStyle#update + * @since 3.0.0 + * + * @param {boolean} recalculateMetrics - Whether to recalculate font and text metrics. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + update: function (recalculateMetrics) + { + if (recalculateMetrics) + { + this._font = [ this.fontStyle, this.fontSize, this.fontFamily ].join(' ').trim(); + + this.metrics = MeasureText(this); + } + + return this.parent.updateText(); + }, + + /** + * Set the font. + * + * If a string is given, the font family is set. + * + * If an object is given, the `fontFamily`, `fontSize` and `fontStyle` + * properties of that object are set. + * + * @method Phaser.GameObjects.TextStyle#setFont + * @since 3.0.0 + * + * @param {(string|object)} font - The font family or font settings to set. + * @param {boolean} [updateText=true] - Whether to update the text immediately. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setFont: function (font, updateText) + { + if (updateText === undefined) { updateText = true; } + + var fontFamily = font; + var fontSize = ''; + var fontStyle = ''; + + if (typeof font !== 'string') + { + fontFamily = GetValue(font, 'fontFamily', 'Courier'); + fontSize = GetValue(font, 'fontSize', '16px'); + fontStyle = GetValue(font, 'fontStyle', ''); + } + else + { + var fontSplit = font.split(' '); + + var i = 0; + + fontStyle = (fontSplit.length > 2) ? fontSplit[i++] : ''; + fontSize = fontSplit[i++] || '16px'; + fontFamily = fontSplit[i++] || 'Courier'; + } + + if (fontFamily !== this.fontFamily || fontSize !== this.fontSize || fontStyle !== this.fontStyle) + { + this.fontFamily = fontFamily; + this.fontSize = fontSize; + this.fontStyle = fontStyle; + + if (updateText) + { + this.update(true); + } + } + + return this.parent; + }, + + /** + * Set the font family. + * + * @method Phaser.GameObjects.TextStyle#setFontFamily + * @since 3.0.0 + * + * @param {string} family - The font family. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setFontFamily: function (family) + { + if (this.fontFamily !== family) + { + this.fontFamily = family; + + this.update(true); + } + + return this.parent; + }, + + /** + * Set the font style. + * + * @method Phaser.GameObjects.TextStyle#setFontStyle + * @since 3.0.0 + * + * @param {string} style - The font style. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setFontStyle: function (style) + { + if (this.fontStyle !== style) + { + this.fontStyle = style; + + this.update(true); + } + + return this.parent; + }, + + /** + * Set the font size. + * + * @method Phaser.GameObjects.TextStyle#setFontSize + * @since 3.0.0 + * + * @param {(number|string)} size - The font size. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setFontSize: function (size) + { + if (typeof size === 'number') + { + size = size.toString() + 'px'; + } + + if (this.fontSize !== size) + { + this.fontSize = size; + + this.update(true); + } + + return this.parent; + }, + + /** + * Set the test string to use when measuring the font. + * + * @method Phaser.GameObjects.TextStyle#setTestString + * @since 3.0.0 + * + * @param {string} string - The test string to use when measuring the font. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setTestString: function (string) + { + this.testString = string; + + return this.update(true); + }, + + /** + * Set a fixed width and height for the text. + * + * Pass in `0` for either of these parameters to disable fixed width or height respectively. + * + * @method Phaser.GameObjects.TextStyle#setFixedSize + * @since 3.0.0 + * + * @param {number} width - The fixed width to set. + * @param {number} height - The fixed height to set. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setFixedSize: function (width, height) + { + this.fixedWidth = width; + this.fixedHeight = height; + + if (width) + { + this.parent.width = width; + } + + if (height) + { + this.parent.height = height; + } + + return this.update(false); + }, + + /** + * Set the background color. + * + * @method Phaser.GameObjects.TextStyle#setBackgroundColor + * @since 3.0.0 + * + * @param {string} color - The background color. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setBackgroundColor: function (color) + { + this.backgroundColor = color; + + return this.update(false); + }, + + /** + * Set the text fill color. + * + * @method Phaser.GameObjects.TextStyle#setFill + * @since 3.0.0 + * + * @param {string} color - The text fill color. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setFill: function (color) + { + this.color = color; + + return this.update(false); + }, + + /** + * Set the text fill color. + * + * @method Phaser.GameObjects.TextStyle#setColor + * @since 3.0.0 + * + * @param {string} color - The text fill color. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setColor: function (color) + { + this.color = color; + + return this.update(false); + }, + + /** + * Set the resolution used by the Text object. + * + * By default it will be set to match the resolution set in the Game Config, + * but you can override it via this method. It allows for much clearer text on High DPI devices, + * at the cost of memory because it uses larger internal Canvas textures for the Text. + * + * Please use with caution, as the more high res Text you have, the more memory it uses up. + * + * @method Phaser.GameObjects.TextStyle#setResolution + * @since 3.12.0 + * + * @param {number} value - The resolution for this Text object to use. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setResolution: function (value) + { + this.resolution = value; + + return this.update(false); + }, + + /** + * Set the stroke settings. + * + * @method Phaser.GameObjects.TextStyle#setStroke + * @since 3.0.0 + * + * @param {string} color - The stroke color. + * @param {number} thickness - The stroke thickness. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setStroke: function (color, thickness) + { + if (thickness === undefined) { thickness = this.strokeThickness; } + + if (color === undefined && this.strokeThickness !== 0) + { + // Reset the stroke to zero (disabling it) + this.strokeThickness = 0; + + this.update(true); + } + else if (this.stroke !== color || this.strokeThickness !== thickness) + { + this.stroke = color; + this.strokeThickness = thickness; + + this.update(true); + } + + return this.parent; + }, + + /** + * Set the shadow settings. + * + * Calling this method always re-measures the parent Text object, + * so only call it when you actually change the shadow settings. + * + * @method Phaser.GameObjects.TextStyle#setShadow + * @since 3.0.0 + * + * @param {number} [x=0] - The horizontal shadow offset. + * @param {number} [y=0] - The vertical shadow offset. + * @param {string} [color='#000'] - The shadow color. + * @param {number} [blur=0] - The shadow blur radius. + * @param {boolean} [shadowStroke=false] - Whether to stroke the shadow. + * @param {boolean} [shadowFill=true] - Whether to fill the shadow. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setShadow: function (x, y, color, blur, shadowStroke, shadowFill) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + if (color === undefined) { color = '#000'; } + if (blur === undefined) { blur = 0; } + if (shadowStroke === undefined) { shadowStroke = false; } + if (shadowFill === undefined) { shadowFill = true; } + + this.shadowOffsetX = x; + this.shadowOffsetY = y; + this.shadowColor = color; + this.shadowBlur = blur; + this.shadowStroke = shadowStroke; + this.shadowFill = shadowFill; + + return this.update(false); + }, + + /** + * Set the shadow offset. + * + * @method Phaser.GameObjects.TextStyle#setShadowOffset + * @since 3.0.0 + * + * @param {number} [x=0] - The horizontal shadow offset. + * @param {number} [y=0] - The vertical shadow offset. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setShadowOffset: function (x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = x; } + + this.shadowOffsetX = x; + this.shadowOffsetY = y; + + return this.update(false); + }, + + /** + * Set the shadow color. + * + * @method Phaser.GameObjects.TextStyle#setShadowColor + * @since 3.0.0 + * + * @param {string} [color='#000'] - The shadow color. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setShadowColor: function (color) + { + if (color === undefined) { color = '#000'; } + + this.shadowColor = color; + + return this.update(false); + }, + + /** + * Set the shadow blur radius. + * + * @method Phaser.GameObjects.TextStyle#setShadowBlur + * @since 3.0.0 + * + * @param {number} [blur=0] - The shadow blur radius. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setShadowBlur: function (blur) + { + if (blur === undefined) { blur = 0; } + + this.shadowBlur = blur; + + return this.update(false); + }, + + /** + * Enable or disable shadow stroke. + * + * @method Phaser.GameObjects.TextStyle#setShadowStroke + * @since 3.0.0 + * + * @param {boolean} enabled - Whether shadow stroke is enabled or not. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setShadowStroke: function (enabled) + { + this.shadowStroke = enabled; + + return this.update(false); + }, + + /** + * Enable or disable shadow fill. + * + * @method Phaser.GameObjects.TextStyle#setShadowFill + * @since 3.0.0 + * + * @param {boolean} enabled - Whether shadow fill is enabled or not. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setShadowFill: function (enabled) + { + this.shadowFill = enabled; + + return this.update(false); + }, + + /** + * Set the width (in pixels) to use for wrapping lines. + * + * Pass in null to remove wrapping by width. + * + * @method Phaser.GameObjects.TextStyle#setWordWrapWidth + * @since 3.0.0 + * + * @param {number} width - The maximum width of a line in pixels. Set to null to remove wrapping. + * @param {boolean} [useAdvancedWrap=false] - Whether or not to use the advanced wrapping + * algorithm. If true, spaces are collapsed and whitespace is trimmed from lines. If false, + * spaces and whitespace are left as is. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setWordWrapWidth: function (width, useAdvancedWrap) + { + if (useAdvancedWrap === undefined) { useAdvancedWrap = false; } + + this.wordWrapWidth = width; + this.wordWrapUseAdvanced = useAdvancedWrap; + + return this.update(false); + }, + + /** + * Set a custom callback for wrapping lines. + * + * Pass in null to remove wrapping by callback. + * + * @method Phaser.GameObjects.TextStyle#setWordWrapCallback + * @since 3.0.0 + * + * @param {TextStyleWordWrapCallback} callback - A custom function that will be responsible for wrapping the + * text. It will receive two arguments: text (the string to wrap), textObject (this Text + * instance). It should return the wrapped lines either as an array of lines or as a string with + * newline characters in place to indicate where breaks should happen. + * @param {object} [scope=null] - The scope that will be applied when the callback is invoked. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setWordWrapCallback: function (callback, scope) + { + if (scope === undefined) { scope = null; } + + this.wordWrapCallback = callback; + this.wordWrapCallbackScope = scope; + + return this.update(false); + }, + + /** + * Set the alignment of the text in this Text object. + * + * The argument can be one of: `left`, `right`, `center` or `justify`. + * + * Alignment only works if the Text object has more than one line of text. + * + * @method Phaser.GameObjects.TextStyle#setAlign + * @since 3.0.0 + * + * @param {string} [align='left'] - The text alignment for multi-line text. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setAlign: function (align) + { + if (align === undefined) { align = 'left'; } + + this.align = align; + + return this.update(false); + }, + + /** + * Set the maximum number of lines to draw. + * + * @method Phaser.GameObjects.TextStyle#setMaxLines + * @since 3.0.0 + * + * @param {integer} [max=0] - The maximum number of lines to draw. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setMaxLines: function (max) + { + if (max === undefined) { max = 0; } + + this.maxLines = max; + + return this.update(false); + }, + + /** + * Get the current text metrics. + * + * @method Phaser.GameObjects.TextStyle#getTextMetrics + * @since 3.0.0 + * + * @return {Phaser.Types.GameObjects.Text.TextMetrics} The text metrics. + */ + getTextMetrics: function () + { + var metrics = this.metrics; + + return { + ascent: metrics.ascent, + descent: metrics.descent, + fontSize: metrics.fontSize + }; + }, + + /** + * Build a JSON representation of this Text Style. + * + * @method Phaser.GameObjects.TextStyle#toJSON + * @since 3.0.0 + * + * @return {object} A JSON representation of this Text Style. + */ + toJSON: function () + { + var output = {}; + + for (var key in propertyMap) + { + output[key] = this[key]; + } + + output.metrics = this.getTextMetrics(); + + return output; + }, + + /** + * Destroy this Text Style. + * + * @method Phaser.GameObjects.TextStyle#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.parent = undefined; + } + +}); + +module.exports = TextStyle; + + +/***/ }), +/* 426 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CanvasPool = __webpack_require__(26); + +/** + * Calculates the ascent, descent and fontSize of a given font style. + * + * @function Phaser.GameObjects.MeasureText + * @since 3.0.0 + * + * @param {Phaser.GameObjects.TextStyle} textStyle - The TextStyle object to measure. + * + * @return {Phaser.Types.GameObjects.Text.TextMetrics} An object containing the ascent, descent and fontSize of the TextStyle. + */ +var MeasureText = function (textStyle) +{ + // @property {HTMLCanvasElement} canvas - The canvas element that the text is rendered. + var canvas = CanvasPool.create(this); + + // @property {HTMLCanvasElement} context - The context of the canvas element that the text is rendered to. + var context = canvas.getContext('2d'); + + textStyle.syncFont(canvas, context); + + var width = Math.ceil(context.measureText(textStyle.testString).width * textStyle.baselineX); + var baseline = width; + var height = 2 * baseline; + + baseline = baseline * textStyle.baselineY | 0; + + canvas.width = width; + canvas.height = height; + + context.fillStyle = '#f00'; + context.fillRect(0, 0, width, height); + + context.font = textStyle._font; + + context.textBaseline = 'alphabetic'; + context.fillStyle = '#000'; + context.fillText(textStyle.testString, 0, baseline); + + var output = { + ascent: 0, + descent: 0, + fontSize: 0 + }; + + if (!context.getImageData(0, 0, width, height)) + { + output.ascent = baseline; + output.descent = baseline + 6; + output.fontSize = output.ascent + output.descent; + + CanvasPool.remove(canvas); + + return output; + } + + var imagedata = context.getImageData(0, 0, width, height).data; + var pixels = imagedata.length; + var line = width * 4; + var i; + var j; + var idx = 0; + var stop = false; + + // ascent. scan from top to bottom until we find a non red pixel + for (i = 0; i < baseline; i++) + { + for (j = 0; j < line; j += 4) + { + if (imagedata[idx + j] !== 255) + { + stop = true; + break; + } + } + + if (!stop) + { + idx += line; + } + else + { + break; + } + } + + output.ascent = baseline - i; + + idx = pixels - line; + stop = false; + + // descent. scan from bottom to top until we find a non red pixel + for (i = height; i > baseline; i--) + { + for (j = 0; j < line; j += 4) + { + if (imagedata[idx + j] !== 255) + { + stop = true; + break; + } + } + + if (!stop) + { + idx -= line; + } + else + { + break; + } + } + + output.descent = (i - baseline); + output.fontSize = output.ascent + output.descent; + + CanvasPool.remove(canvas); + + return output; +}; + +module.exports = MeasureText; + + +/***/ }), +/* 427 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var ArcRender = __webpack_require__(1016); +var Class = __webpack_require__(0); +var DegToRad = __webpack_require__(41); +var Earcut = __webpack_require__(60); +var GeomCircle = __webpack_require__(68); var MATH_CONST = __webpack_require__(13); -var Shape = __webpack_require__(29); +var Shape = __webpack_require__(30); /** * @classdesc @@ -88889,7 +94651,7 @@ module.exports = Arc; /***/ }), -/* 411 */ +/* 428 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -88899,10 +94661,10 @@ module.exports = Arc; */ var Class = __webpack_require__(0); -var CurveRender = __webpack_require__(1012); -var Earcut = __webpack_require__(66); +var CurveRender = __webpack_require__(1019); +var Earcut = __webpack_require__(60); var Rectangle = __webpack_require__(9); -var Shape = __webpack_require__(29); +var Shape = __webpack_require__(30); /** * @classdesc @@ -89071,7 +94833,7 @@ module.exports = Curve; /***/ }), -/* 412 */ +/* 429 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89081,10 +94843,10 @@ module.exports = Curve; */ var Class = __webpack_require__(0); -var Earcut = __webpack_require__(66); -var EllipseRender = __webpack_require__(1015); -var GeomEllipse = __webpack_require__(96); -var Shape = __webpack_require__(29); +var Earcut = __webpack_require__(60); +var EllipseRender = __webpack_require__(1022); +var GeomEllipse = __webpack_require__(97); +var Shape = __webpack_require__(30); /** * @classdesc @@ -89258,7 +95020,7 @@ module.exports = Ellipse; /***/ }), -/* 413 */ +/* 430 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89268,8 +95030,8 @@ module.exports = Ellipse; */ var Class = __webpack_require__(0); -var Shape = __webpack_require__(29); -var GridRender = __webpack_require__(1018); +var Shape = __webpack_require__(30); +var GridRender = __webpack_require__(1025); /** * @classdesc @@ -89277,9 +95039,9 @@ var GridRender = __webpack_require__(1018); * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling * it for input or physics. It provides a quick and easy way for you to render this shape in your * game without using a texture, while still taking advantage of being fully batched in WebGL. - * + * * This shape supports only fill colors and cannot be stroked. - * + * * A Grid Shape allows you to display a grid in your game, where you can control the size of the * grid as well as the width and height of the grid cells. You can set a fill color for each grid * cell as well as an alternate fill color. When the alternate fill color is set then the grid @@ -89414,32 +95176,25 @@ var Grid = new Class({ this.setPosition(x, y); this.setSize(width, height); - if (fillColor !== undefined) - { - this.setFillStyle(fillColor, fillAlpha); - } - - if (outlineFillColor !== undefined) - { - this.setOutlineStyle(outlineFillColor, outlineFillAlpha); - } + this.setFillStyle(fillColor, fillAlpha); + this.setOutlineStyle(outlineFillColor, outlineFillAlpha); this.updateDisplayOrigin(); }, /** * Sets the fill color and alpha level the grid cells will use when rendering. - * - * If this method is called with no values then the grid cells will not be rendered, + * + * If this method is called with no values then the grid cells will not be rendered, * however the grid lines and alternating cells may still be. - * + * * Also see the `setOutlineStyle` and `setAltFillStyle` methods. - * + * * This call can be chained. * * @method Phaser.GameObjects.Grid#setFillStyle * @since 3.13.0 - * + * * @param {number} [fillColor] - The color the grid cells will be filled with, i.e. 0xff0000 for red. * @param {number} [fillAlpha=1] - The alpha the grid cells will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. * @@ -89465,16 +95220,16 @@ var Grid = new Class({ /** * Sets the fill color and alpha level that the alternating grid cells will use. - * + * * If this method is called with no values then alternating grid cells will not be rendered in a different color. - * + * * Also see the `setOutlineStyle` and `setFillStyle` methods. - * + * * This call can be chained. * * @method Phaser.GameObjects.Grid#setAltFillStyle * @since 3.13.0 - * + * * @param {number} [fillColor] - The color the alternating grid cells will be filled with, i.e. 0xff0000 for red. * @param {number} [fillAlpha=1] - The alpha the alternating grid cells will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. * @@ -89500,17 +95255,17 @@ var Grid = new Class({ /** * Sets the fill color and alpha level that the lines between each grid cell will use. - * + * * If this method is called with no values then the grid lines will not be rendered at all, however * the cells themselves may still be if they have colors set. - * + * * Also see the `setFillStyle` and `setAltFillStyle` methods. - * + * * This call can be chained. * * @method Phaser.GameObjects.Grid#setOutlineStyle * @since 3.13.0 - * + * * @param {number} [fillColor] - The color the lines between the grid cells will be filled with, i.e. 0xff0000 for red. * @param {number} [fillAlpha=1] - The alpha the lines between the grid cells will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. * @@ -89540,7 +95295,7 @@ module.exports = Grid; /***/ }), -/* 414 */ +/* 431 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89549,9 +95304,9 @@ module.exports = Grid; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var IsoBoxRender = __webpack_require__(1021); +var IsoBoxRender = __webpack_require__(1028); var Class = __webpack_require__(0); -var Shape = __webpack_require__(29); +var Shape = __webpack_require__(30); /** * @classdesc @@ -89755,7 +95510,7 @@ module.exports = IsoBox; /***/ }), -/* 415 */ +/* 432 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89765,8 +95520,8 @@ module.exports = IsoBox; */ var Class = __webpack_require__(0); -var IsoTriangleRender = __webpack_require__(1024); -var Shape = __webpack_require__(29); +var IsoTriangleRender = __webpack_require__(1031); +var Shape = __webpack_require__(30); /** * @classdesc @@ -90001,7 +95756,7 @@ module.exports = IsoTriangle; /***/ }), -/* 416 */ +/* 433 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90011,9 +95766,9 @@ module.exports = IsoTriangle; */ var Class = __webpack_require__(0); -var Shape = __webpack_require__(29); -var GeomLine = __webpack_require__(39); -var LineRender = __webpack_require__(1027); +var Shape = __webpack_require__(30); +var GeomLine = __webpack_require__(40); +var LineRender = __webpack_require__(1034); /** * @classdesc @@ -90168,7 +95923,7 @@ module.exports = Line; /***/ }), -/* 417 */ +/* 434 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90177,13 +95932,13 @@ module.exports = Line; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PolygonRender = __webpack_require__(1030); +var PolygonRender = __webpack_require__(1037); var Class = __webpack_require__(0); -var Earcut = __webpack_require__(66); -var GetAABB = __webpack_require__(418); -var GeomPolygon = __webpack_require__(207); -var Shape = __webpack_require__(29); -var Smooth = __webpack_require__(421); +var Earcut = __webpack_require__(60); +var GetAABB = __webpack_require__(435); +var GeomPolygon = __webpack_require__(210); +var Shape = __webpack_require__(30); +var Smooth = __webpack_require__(438); /** * @classdesc @@ -90307,7 +96062,7 @@ module.exports = Polygon; /***/ }), -/* 418 */ +/* 435 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90363,7 +96118,7 @@ module.exports = GetAABB; /***/ }), -/* 419 */ +/* 436 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90372,9 +96127,9 @@ module.exports = GetAABB; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Length = __webpack_require__(57); -var Line = __webpack_require__(39); -var Perimeter = __webpack_require__(420); +var Length = __webpack_require__(58); +var Line = __webpack_require__(40); +var Perimeter = __webpack_require__(437); /** * Returns an array of Point objects containing the coordinates of the points around the perimeter of the Polygon, @@ -90440,7 +96195,7 @@ module.exports = GetPoints; /***/ }), -/* 420 */ +/* 437 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90449,8 +96204,8 @@ module.exports = GetPoints; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Length = __webpack_require__(57); -var Line = __webpack_require__(39); +var Length = __webpack_require__(58); +var Line = __webpack_require__(40); /** * Returns the perimeter of the given Polygon. @@ -90488,7 +96243,7 @@ module.exports = Perimeter; /***/ }), -/* 421 */ +/* 438 */ /***/ (function(module, exports) { /** @@ -90564,7 +96319,7 @@ module.exports = Smooth; /***/ }), -/* 422 */ +/* 439 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90575,8 +96330,8 @@ module.exports = Smooth; var Class = __webpack_require__(0); var GeomRectangle = __webpack_require__(9); -var Shape = __webpack_require__(29); -var RectangleRender = __webpack_require__(1033); +var Shape = __webpack_require__(30); +var RectangleRender = __webpack_require__(1040); /** * @classdesc @@ -90707,7 +96462,7 @@ module.exports = Rectangle; /***/ }), -/* 423 */ +/* 440 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90716,10 +96471,10 @@ module.exports = Rectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var StarRender = __webpack_require__(1036); +var StarRender = __webpack_require__(1043); var Class = __webpack_require__(0); -var Earcut = __webpack_require__(66); -var Shape = __webpack_require__(29); +var Earcut = __webpack_require__(60); +var Shape = __webpack_require__(30); /** * @classdesc @@ -90995,7 +96750,7 @@ module.exports = Star; /***/ }), -/* 424 */ +/* 441 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91005,9 +96760,9 @@ module.exports = Star; */ var Class = __webpack_require__(0); -var Shape = __webpack_require__(29); -var GeomTriangle = __webpack_require__(71); -var TriangleRender = __webpack_require__(1039); +var Shape = __webpack_require__(30); +var GeomTriangle = __webpack_require__(73); +var TriangleRender = __webpack_require__(1046); /** * @classdesc @@ -91138,7 +96893,7 @@ module.exports = Triangle; /***/ }), -/* 425 */ +/* 442 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91148,7 +96903,7 @@ module.exports = Triangle; */ var Point = __webpack_require__(4); -var Length = __webpack_require__(57); +var Length = __webpack_require__(58); /** * Returns a Point from around the perimeter of a Triangle. @@ -91225,7 +96980,7 @@ module.exports = GetPoint; /***/ }), -/* 426 */ +/* 443 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91234,7 +96989,7 @@ module.exports = GetPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Length = __webpack_require__(57); +var Length = __webpack_require__(58); var Point = __webpack_require__(4); /** @@ -91318,7 +97073,7 @@ module.exports = GetPoints; /***/ }), -/* 427 */ +/* 444 */ /***/ (function(module, exports) { /** @@ -91401,7 +97156,7 @@ module.exports = SetValue; /***/ }), -/* 428 */ +/* 445 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91892,7 +97647,7 @@ module.exports = Light; /***/ }), -/* 429 */ +/* 446 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91902,7 +97657,7 @@ module.exports = Light; */ var Class = __webpack_require__(0); -var Light = __webpack_require__(428); +var Light = __webpack_require__(445); var Utils = __webpack_require__(10); /** @@ -92261,7 +98016,7 @@ module.exports = LightsManager; /***/ }), -/* 430 */ +/* 447 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92270,7 +98025,7 @@ module.exports = LightsManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(48); +var CONST = __webpack_require__(49); var Extend = __webpack_require__(19); /** @@ -92279,14 +98034,14 @@ var Extend = __webpack_require__(19); var Geom = { - Circle: __webpack_require__(1099), - Ellipse: __webpack_require__(1109), - Intersects: __webpack_require__(431), - Line: __webpack_require__(1129), - Point: __webpack_require__(1151), - Polygon: __webpack_require__(1165), - Rectangle: __webpack_require__(447), - Triangle: __webpack_require__(1198) + Circle: __webpack_require__(1106), + Ellipse: __webpack_require__(1116), + Intersects: __webpack_require__(448), + Line: __webpack_require__(1136), + Point: __webpack_require__(1158), + Polygon: __webpack_require__(1172), + Rectangle: __webpack_require__(464), + Triangle: __webpack_require__(1205) }; @@ -92297,7 +98052,7 @@ module.exports = Geom; /***/ }), -/* 431 */ +/* 448 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92312,39 +98067,39 @@ module.exports = Geom; module.exports = { - CircleToCircle: __webpack_require__(211), - CircleToRectangle: __webpack_require__(212), - GetCircleToCircle: __webpack_require__(1119), - GetCircleToRectangle: __webpack_require__(1120), - GetLineToCircle: __webpack_require__(213), - GetLineToLine: __webpack_require__(432), - GetLineToPoints: __webpack_require__(433), - GetLineToPolygon: __webpack_require__(434), - GetLineToRectangle: __webpack_require__(215), - GetRaysFromPointToPolygon: __webpack_require__(1121), - GetRectangleIntersection: __webpack_require__(1122), - GetRectangleToRectangle: __webpack_require__(1123), - GetRectangleToTriangle: __webpack_require__(1124), - GetTriangleToCircle: __webpack_require__(1125), - GetTriangleToLine: __webpack_require__(439), - GetTriangleToTriangle: __webpack_require__(1126), - LineToCircle: __webpack_require__(214), - LineToLine: __webpack_require__(85), - LineToRectangle: __webpack_require__(435), - PointToLine: __webpack_require__(443), - PointToLineSegment: __webpack_require__(1127), - RectangleToRectangle: __webpack_require__(141), - RectangleToTriangle: __webpack_require__(436), - RectangleToValues: __webpack_require__(1128), - TriangleToCircle: __webpack_require__(438), - TriangleToLine: __webpack_require__(440), - TriangleToTriangle: __webpack_require__(441) + CircleToCircle: __webpack_require__(214), + CircleToRectangle: __webpack_require__(215), + GetCircleToCircle: __webpack_require__(1126), + GetCircleToRectangle: __webpack_require__(1127), + GetLineToCircle: __webpack_require__(216), + GetLineToLine: __webpack_require__(449), + GetLineToPoints: __webpack_require__(450), + GetLineToPolygon: __webpack_require__(451), + GetLineToRectangle: __webpack_require__(218), + GetRaysFromPointToPolygon: __webpack_require__(1128), + GetRectangleIntersection: __webpack_require__(1129), + GetRectangleToRectangle: __webpack_require__(1130), + GetRectangleToTriangle: __webpack_require__(1131), + GetTriangleToCircle: __webpack_require__(1132), + GetTriangleToLine: __webpack_require__(456), + GetTriangleToTriangle: __webpack_require__(1133), + LineToCircle: __webpack_require__(217), + LineToLine: __webpack_require__(86), + LineToRectangle: __webpack_require__(452), + PointToLine: __webpack_require__(460), + PointToLineSegment: __webpack_require__(1134), + RectangleToRectangle: __webpack_require__(142), + RectangleToTriangle: __webpack_require__(453), + RectangleToValues: __webpack_require__(1135), + TriangleToCircle: __webpack_require__(455), + TriangleToLine: __webpack_require__(457), + TriangleToTriangle: __webpack_require__(458) }; /***/ }), -/* 432 */ +/* 449 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92353,7 +98108,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector3 = __webpack_require__(80); +var Vector3 = __webpack_require__(81); /** * Checks for intersection between the two line segments and returns the intersection point as a Vector3, @@ -92413,7 +98168,7 @@ module.exports = GetLineToLine; /***/ }), -/* 433 */ +/* 450 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92422,9 +98177,9 @@ module.exports = GetLineToLine; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector3 = __webpack_require__(80); -var GetLineToLine = __webpack_require__(432); -var Line = __webpack_require__(39); +var Vector3 = __webpack_require__(81); +var GetLineToLine = __webpack_require__(449); +var Line = __webpack_require__(40); // Temp calculation segment var segment = new Line(); @@ -92490,7 +98245,7 @@ module.exports = GetLineToPoints; /***/ }), -/* 434 */ +/* 451 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92499,9 +98254,9 @@ module.exports = GetLineToPoints; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector3 = __webpack_require__(80); -var Vector4 = __webpack_require__(126); -var GetLineToPoints = __webpack_require__(433); +var Vector3 = __webpack_require__(81); +var Vector4 = __webpack_require__(128); +var GetLineToPoints = __webpack_require__(450); // Temp vec3 var tempIntersect = new Vector3(); @@ -92561,7 +98316,7 @@ module.exports = GetLineToPolygon; /***/ }), -/* 435 */ +/* 452 */ /***/ (function(module, exports) { /** @@ -92662,7 +98417,7 @@ module.exports = LineToRectangle; /***/ }), -/* 436 */ +/* 453 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92671,10 +98426,10 @@ module.exports = LineToRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var LineToLine = __webpack_require__(85); -var Contains = __webpack_require__(49); -var ContainsArray = __webpack_require__(216); -var Decompose = __webpack_require__(437); +var LineToLine = __webpack_require__(86); +var Contains = __webpack_require__(50); +var ContainsArray = __webpack_require__(219); +var Decompose = __webpack_require__(454); /** * Checks for intersection between Rectangle shape and Triangle shape. @@ -92755,7 +98510,7 @@ module.exports = RectangleToTriangle; /***/ }), -/* 437 */ +/* 454 */ /***/ (function(module, exports) { /** @@ -92792,7 +98547,7 @@ module.exports = Decompose; /***/ }), -/* 438 */ +/* 455 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92801,8 +98556,8 @@ module.exports = Decompose; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var LineToCircle = __webpack_require__(214); -var Contains = __webpack_require__(84); +var LineToCircle = __webpack_require__(217); +var Contains = __webpack_require__(85); /** * Checks if a Triangle and a Circle intersect. @@ -92857,7 +98612,7 @@ module.exports = TriangleToCircle; /***/ }), -/* 439 */ +/* 456 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92868,8 +98623,8 @@ module.exports = TriangleToCircle; */ var Point = __webpack_require__(4); -var TriangleToLine = __webpack_require__(440); -var LineToLine = __webpack_require__(85); +var TriangleToLine = __webpack_require__(457); +var LineToLine = __webpack_require__(86); /** * Checks if a Triangle and a Line intersect, and returns the intersection points as a Point object array. @@ -92916,7 +98671,7 @@ module.exports = GetTriangleToLine; /***/ }), -/* 440 */ +/* 457 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92925,8 +98680,8 @@ module.exports = GetTriangleToLine; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(84); -var LineToLine = __webpack_require__(85); +var Contains = __webpack_require__(85); +var LineToLine = __webpack_require__(86); /** * Checks if a Triangle and a Line intersect. @@ -92972,7 +98727,7 @@ module.exports = TriangleToLine; /***/ }), -/* 441 */ +/* 458 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92981,9 +98736,9 @@ module.exports = TriangleToLine; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ContainsArray = __webpack_require__(216); -var Decompose = __webpack_require__(442); -var LineToLine = __webpack_require__(85); +var ContainsArray = __webpack_require__(219); +var Decompose = __webpack_require__(459); +var LineToLine = __webpack_require__(86); /** * Checks if two Triangles intersect. @@ -93062,7 +98817,7 @@ module.exports = TriangleToTriangle; /***/ }), -/* 442 */ +/* 459 */ /***/ (function(module, exports) { /** @@ -93097,7 +98852,7 @@ module.exports = Decompose; /***/ }), -/* 443 */ +/* 460 */ /***/ (function(module, exports) { /** @@ -93167,7 +98922,7 @@ module.exports = PointToLine; /***/ }), -/* 444 */ +/* 461 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93177,8 +98932,8 @@ module.exports = PointToLine; */ var MATH_CONST = __webpack_require__(13); -var Wrap = __webpack_require__(58); -var Angle = __webpack_require__(86); +var Wrap = __webpack_require__(59); +var Angle = __webpack_require__(87); /** * Get the angle of the normal of the given line in radians. @@ -93201,7 +98956,7 @@ module.exports = NormalAngle; /***/ }), -/* 445 */ +/* 462 */ /***/ (function(module, exports) { /** @@ -93229,7 +98984,7 @@ module.exports = GetMagnitude; /***/ }), -/* 446 */ +/* 463 */ /***/ (function(module, exports) { /** @@ -93257,7 +99012,7 @@ module.exports = GetMagnitudeSq; /***/ }), -/* 447 */ +/* 464 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93268,50 +99023,50 @@ module.exports = GetMagnitudeSq; var Rectangle = __webpack_require__(9); -Rectangle.Area = __webpack_require__(1172); -Rectangle.Ceil = __webpack_require__(1173); -Rectangle.CeilAll = __webpack_require__(1174); -Rectangle.CenterOn = __webpack_require__(174); -Rectangle.Clone = __webpack_require__(1175); -Rectangle.Contains = __webpack_require__(49); -Rectangle.ContainsPoint = __webpack_require__(1176); -Rectangle.ContainsRect = __webpack_require__(448); -Rectangle.CopyFrom = __webpack_require__(1177); -Rectangle.Decompose = __webpack_require__(437); -Rectangle.Equals = __webpack_require__(1178); -Rectangle.FitInside = __webpack_require__(1179); -Rectangle.FitOutside = __webpack_require__(1180); -Rectangle.Floor = __webpack_require__(1181); -Rectangle.FloorAll = __webpack_require__(1182); -Rectangle.FromPoints = __webpack_require__(182); -Rectangle.FromXY = __webpack_require__(1183); -Rectangle.GetAspectRatio = __webpack_require__(218); -Rectangle.GetCenter = __webpack_require__(1184); -Rectangle.GetPoint = __webpack_require__(157); -Rectangle.GetPoints = __webpack_require__(278); -Rectangle.GetSize = __webpack_require__(1185); -Rectangle.Inflate = __webpack_require__(1186); -Rectangle.Intersection = __webpack_require__(1187); -Rectangle.MarchingAnts = __webpack_require__(289); -Rectangle.MergePoints = __webpack_require__(1188); -Rectangle.MergeRect = __webpack_require__(1189); -Rectangle.MergeXY = __webpack_require__(1190); -Rectangle.Offset = __webpack_require__(1191); -Rectangle.OffsetPoint = __webpack_require__(1192); -Rectangle.Overlaps = __webpack_require__(1193); +Rectangle.Area = __webpack_require__(1179); +Rectangle.Ceil = __webpack_require__(1180); +Rectangle.CeilAll = __webpack_require__(1181); +Rectangle.CenterOn = __webpack_require__(176); +Rectangle.Clone = __webpack_require__(1182); +Rectangle.Contains = __webpack_require__(50); +Rectangle.ContainsPoint = __webpack_require__(1183); +Rectangle.ContainsRect = __webpack_require__(465); +Rectangle.CopyFrom = __webpack_require__(1184); +Rectangle.Decompose = __webpack_require__(454); +Rectangle.Equals = __webpack_require__(1185); +Rectangle.FitInside = __webpack_require__(1186); +Rectangle.FitOutside = __webpack_require__(1187); +Rectangle.Floor = __webpack_require__(1188); +Rectangle.FloorAll = __webpack_require__(1189); +Rectangle.FromPoints = __webpack_require__(184); +Rectangle.FromXY = __webpack_require__(1190); +Rectangle.GetAspectRatio = __webpack_require__(221); +Rectangle.GetCenter = __webpack_require__(1191); +Rectangle.GetPoint = __webpack_require__(159); +Rectangle.GetPoints = __webpack_require__(282); +Rectangle.GetSize = __webpack_require__(1192); +Rectangle.Inflate = __webpack_require__(1193); +Rectangle.Intersection = __webpack_require__(1194); +Rectangle.MarchingAnts = __webpack_require__(293); +Rectangle.MergePoints = __webpack_require__(1195); +Rectangle.MergeRect = __webpack_require__(1196); +Rectangle.MergeXY = __webpack_require__(1197); +Rectangle.Offset = __webpack_require__(1198); +Rectangle.OffsetPoint = __webpack_require__(1199); +Rectangle.Overlaps = __webpack_require__(1200); Rectangle.Perimeter = __webpack_require__(116); -Rectangle.PerimeterPoint = __webpack_require__(1194); -Rectangle.Random = __webpack_require__(160); -Rectangle.RandomOutside = __webpack_require__(1195); -Rectangle.SameDimensions = __webpack_require__(1196); -Rectangle.Scale = __webpack_require__(1197); -Rectangle.Union = __webpack_require__(394); +Rectangle.PerimeterPoint = __webpack_require__(1201); +Rectangle.Random = __webpack_require__(162); +Rectangle.RandomOutside = __webpack_require__(1202); +Rectangle.SameDimensions = __webpack_require__(1203); +Rectangle.Scale = __webpack_require__(1204); +Rectangle.Union = __webpack_require__(407); module.exports = Rectangle; /***/ }), -/* 448 */ +/* 465 */ /***/ (function(module, exports) { /** @@ -93351,7 +99106,7 @@ module.exports = ContainsRect; /***/ }), -/* 449 */ +/* 466 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93395,7 +99150,7 @@ module.exports = Centroid; /***/ }), -/* 450 */ +/* 467 */ /***/ (function(module, exports) { /** @@ -93436,7 +99191,7 @@ module.exports = Offset; /***/ }), -/* 451 */ +/* 468 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93501,7 +99256,43 @@ module.exports = InCenter; /***/ }), -/* 452 */ +/* 469 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Creates a new Pixel Perfect Handler function. + * + * Access via `InputPlugin.makePixelPerfect` rather than calling it directly. + * + * @function Phaser.Input.CreatePixelPerfectHandler + * @since 3.10.0 + * + * @param {Phaser.Textures.TextureManager} textureManager - A reference to the Texture Manager. + * @param {integer} alphaTolerance - The alpha level that the pixel should be above to be included as a successful interaction. + * + * @return {function} The new Pixel Perfect Handler function. + */ +var CreatePixelPerfectHandler = function (textureManager, alphaTolerance) +{ + return function (hitArea, x, y, gameObject) + { + var alpha = textureManager.getPixelAlpha(x, y, gameObject.texture.key, gameObject.frame.name); + + return (alpha && alpha >= alphaTolerance); + }; +}; + +module.exports = CreatePixelPerfectHandler; + + +/***/ }), +/* 470 */ /***/ (function(module, exports) { /** @@ -93572,7 +99363,7 @@ module.exports = CreateInteractiveObject; /***/ }), -/* 453 */ +/* 471 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93697,7 +99488,7 @@ module.exports = Axis; /***/ }), -/* 454 */ +/* 472 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93707,7 +99498,7 @@ module.exports = Axis; */ var Class = __webpack_require__(0); -var Events = __webpack_require__(220); +var Events = __webpack_require__(223); /** * @classdesc @@ -93843,7 +99634,7 @@ module.exports = Button; /***/ }), -/* 455 */ +/* 473 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93852,10 +99643,10 @@ module.exports = Button; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Axis = __webpack_require__(453); -var Button = __webpack_require__(454); +var Axis = __webpack_require__(471); +var Button = __webpack_require__(472); var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(11); +var EventEmitter = __webpack_require__(12); var Vector2 = __webpack_require__(3); /** @@ -94601,7 +100392,7 @@ module.exports = Gamepad; /***/ }), -/* 456 */ +/* 474 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94611,8 +100402,8 @@ module.exports = Gamepad; */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(143); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(144); /** * @classdesc @@ -95003,7 +100794,7 @@ module.exports = Key; /***/ }), -/* 457 */ +/* 475 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95013,10 +100804,10 @@ module.exports = Key; */ var Class = __webpack_require__(0); -var Events = __webpack_require__(143); +var Events = __webpack_require__(144); var GetFastValue = __webpack_require__(2); -var ProcessKeyCombo = __webpack_require__(1237); -var ResetKeyCombo = __webpack_require__(1239); +var ProcessKeyCombo = __webpack_require__(1243); +var ResetKeyCombo = __webpack_require__(1245); /** * @classdesc @@ -95296,7 +101087,7 @@ module.exports = KeyCombo; /***/ }), -/* 458 */ +/* 476 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95305,7 +101096,7 @@ module.exports = KeyCombo; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MergeXHRSettings = __webpack_require__(221); +var MergeXHRSettings = __webpack_require__(224); /** * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings @@ -95377,7 +101168,7 @@ module.exports = XHRLoader; /***/ }), -/* 459 */ +/* 477 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95388,10 +101179,10 @@ module.exports = XHRLoader; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var File = __webpack_require__(21); +var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); -var HTML5AudioFile = __webpack_require__(460); +var HTML5AudioFile = __webpack_require__(478); var IsPlainObject = __webpack_require__(7); /** @@ -95651,7 +101442,7 @@ module.exports = AudioFile; /***/ }), -/* 460 */ +/* 478 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95661,10 +101452,10 @@ module.exports = AudioFile; */ var Class = __webpack_require__(0); -var Events = __webpack_require__(83); -var File = __webpack_require__(21); +var Events = __webpack_require__(84); +var File = __webpack_require__(22); var GetFastValue = __webpack_require__(2); -var GetURL = __webpack_require__(144); +var GetURL = __webpack_require__(145); var IsPlainObject = __webpack_require__(7); /** @@ -95854,7 +101645,7 @@ module.exports = HTML5AudioFile; /***/ }), -/* 461 */ +/* 479 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95865,7 +101656,7 @@ module.exports = HTML5AudioFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var File = __webpack_require__(21); +var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -96025,7 +101816,7 @@ module.exports = ScriptFile; /***/ }), -/* 462 */ +/* 480 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96036,7 +101827,7 @@ module.exports = ScriptFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var File = __webpack_require__(21); +var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -96200,7 +101991,7 @@ module.exports = TextFile; /***/ }), -/* 463 */ +/* 481 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96209,12 +102000,12 @@ module.exports = TextFile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeImage = __webpack_require__(464); -var ArcadeSprite = __webpack_require__(146); +var ArcadeImage = __webpack_require__(482); +var ArcadeSprite = __webpack_require__(147); var Class = __webpack_require__(0); -var CONST = __webpack_require__(51); -var PhysicsGroup = __webpack_require__(465); -var StaticPhysicsGroup = __webpack_require__(466); +var CONST = __webpack_require__(52); +var PhysicsGroup = __webpack_require__(484); +var StaticPhysicsGroup = __webpack_require__(485); /** * @classdesc @@ -96473,7 +102264,7 @@ module.exports = Factory; /***/ }), -/* 464 */ +/* 482 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96483,8 +102274,8 @@ module.exports = Factory; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(223); -var Image = __webpack_require__(111); +var Components = __webpack_require__(226); +var Image = __webpack_require__(112); /** * @classdesc @@ -96573,7 +102364,75 @@ module.exports = ArcadeImage; /***/ }), -/* 465 */ +/* 483 */ +/***/ (function(module, exports, __webpack_require__) { + +var OverlapRect = __webpack_require__(227); +var Circle = __webpack_require__(68); +var CircleToCircle = __webpack_require__(214); +var CircleToRectangle = __webpack_require__(215); + +/** + * This method will search the given circular area and return an array of all physics bodies that + * overlap with it. It can return either Dynamic, Static bodies or a mixture of both. + * + * A body only has to intersect with the search area to be considered, it doesn't have to be fully + * contained within it. + * + * If Arcade Physics is set to use the RTree (which it is by default) then the search is rather fast, + * otherwise the search is O(N) for Dynamic Bodies. + * + * @function Phaser.Physics.Arcade.Components.OverlapCirc + * @since 3.21.0 + * + * @param {number} x - The x coordinate of the center of the area to search within. + * @param {number} y - The y coordinate of the center of the area to search within. + * @param {number} radius - The radius of the area to search within. + * @param {boolean} [includeDynamic=true] - Should the search include Dynamic Bodies? + * @param {boolean} [includeStatic=false] - Should the search include Static Bodies? + * + * @return {(Phaser.Physics.Arcade.Body[]|Phaser.Physics.Arcade.StaticBody[])} An array of bodies that overlap with the given area. + */ +var OverlapCirc = function (world, x, y, radius, includeDynamic, includeStatic) +{ + var bodiesInRect = OverlapRect(world, x - radius, y - radius, 2 * radius, 2 * radius, includeDynamic, includeStatic); + + if (bodiesInRect.length === 0) + { + return bodiesInRect; + } + + var area = new Circle(x, y, radius); + var circFromBody = new Circle(); + var bodiesInArea = []; + + for (var i = 0; i < bodiesInRect.length; i++) + { + var body = bodiesInRect[i]; + + if (body.isCircle) + { + circFromBody.setTo(body.center.x, body.center.y, body.halfWidth); + + if (CircleToCircle(area, circFromBody)) + { + bodiesInArea.push(body); + } + } + else if (CircleToRectangle(area, body)) + { + bodiesInArea.push(body); + } + } + + return bodiesInArea; +}; + +module.exports = OverlapCirc; + + +/***/ }), +/* 484 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96582,21 +102441,30 @@ module.exports = ArcadeImage; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeSprite = __webpack_require__(146); +var ArcadeSprite = __webpack_require__(147); var Class = __webpack_require__(0); -var CONST = __webpack_require__(51); +var CONST = __webpack_require__(52); var GetFastValue = __webpack_require__(2); -var Group = __webpack_require__(98); +var Group = __webpack_require__(99); var IsPlainObject = __webpack_require__(7); /** * @classdesc * An Arcade Physics Group object. * - * All Game Objects created by or added to this Group will automatically be given dynamic Arcade Physics bodies (if they have no body) - * and the bodies will receive the Group's {@link Phaser.Physics.Arcade.Group#defaults default values}. + * The primary use of a Physics Group is a way to collect together physics enable objects + * that share the same intrinsic structure into a single pool. They can they be easily + * compared against other Groups, or Game Objects. * - * Its static counterpart is {@link Phaser.Physics.Arcade.StaticGroup}. + * All Game Objects created by, or added to this Group will automatically be given **dynamic** + * Arcade Physics bodies (if they have no body already) and the bodies will receive the + * Groups {@link Phaser.Physics.Arcade.Group#defaults default values}. + * + * You should not pass objects into this Group that should not receive a body. For example, + * do not add basic Geometry or Tilemap Layers into a Group, as they will not behave in the + * way you may expect. Groups should all ideally have objects of the same type in them. + * + * If you wish to create a Group filled with Static Bodies, please see {@link Phaser.Physics.Arcade.StaticGroup}. * * @class Group * @extends Phaser.GameObjects.Group @@ -96858,7 +102726,7 @@ module.exports = PhysicsGroup; /***/ }), -/* 466 */ +/* 485 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96867,11 +102735,11 @@ module.exports = PhysicsGroup; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeSprite = __webpack_require__(146); +var ArcadeSprite = __webpack_require__(147); var Class = __webpack_require__(0); -var CONST = __webpack_require__(51); +var CONST = __webpack_require__(52); var GetFastValue = __webpack_require__(2); -var Group = __webpack_require__(98); +var Group = __webpack_require__(99); var IsPlainObject = __webpack_require__(7); /** @@ -97057,92 +102925,7 @@ module.exports = StaticPhysicsGroup; /***/ }), -/* 467 */ -/***/ (function(module, exports) { - -/** - * This method will search the given rectangular area and return an array of all physics bodies that - * overlap with it. It can return either Dynamic, Static bodies or a mixture of both. - * - * A body only has to intersect with the search area to be considered, it doesn't have to be fully - * contained within it. - * - * If Arcade Physics is set to use the RTree (which it is by default) then the search for is extremely fast, - * otherwise the search is O(N) for Dynamic Bodies. - * - * @function Phaser.Physics.Arcade.Components.OverlapRect - * @since 3.17.0 - * - * @param {number} x - The top-left x coordinate of the area to search within. - * @param {number} y - The top-left y coordinate of the area to search within. - * @param {number} width - The width of the area to search within. - * @param {number} height - The height of the area to search within. - * @param {boolean} [includeDynamic=true] - Should the search include Dynamic Bodies? - * @param {boolean} [includeStatic=false] - Should the search include Static Bodies? - * - * @return {(Phaser.Physics.Arcade.Body[]|Phaser.Physics.Arcade.StaticBody[])} An array of bodies that overlap with the given area. - */ -var OverlapRect = function (world, x, y, width, height, includeDynamic, includeStatic) -{ - if (includeDynamic === undefined) { includeDynamic = true; } - if (includeStatic === undefined) { includeStatic = false; } - - var dynamicBodies = []; - var staticBodies = []; - - var minMax = world.treeMinMax; - - minMax.minX = x; - minMax.minY = y; - minMax.maxX = x + width; - minMax.maxY = y + height; - - if (includeStatic) - { - staticBodies = world.staticTree.search(minMax); - } - - if (includeDynamic && world.useTree) - { - dynamicBodies = world.tree.search(minMax); - } - else if (includeDynamic) - { - var bodies = world.bodies; - - var fakeBody = - { - position: { - x: x, - y: y - }, - left: x, - top: y, - right: x + width, - bottom: y + height, - isCircle: false - }; - - var intersects = world.intersects; - - bodies.iterate(function (target) - { - if (intersects(target, fakeBody)) - { - dynamicBodies.push(target); - } - - }); - } - - return staticBodies.concat(dynamicBodies); -}; - -module.exports = OverlapRect; - - -/***/ }), -/* 468 */ +/* 486 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97151,35 +102934,35 @@ module.exports = OverlapRect; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AngleBetweenPoints = __webpack_require__(322); -var Body = __webpack_require__(469); +var AngleBetweenPoints = __webpack_require__(330); +var Body = __webpack_require__(487); var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var Collider = __webpack_require__(470); -var CONST = __webpack_require__(51); -var DistanceBetween = __webpack_require__(54); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(224); -var FuzzyEqual = __webpack_require__(107); -var FuzzyGreaterThan = __webpack_require__(326); -var FuzzyLessThan = __webpack_require__(327); -var GetOverlapX = __webpack_require__(471); -var GetOverlapY = __webpack_require__(472); +var Collider = __webpack_require__(488); +var CONST = __webpack_require__(52); +var DistanceBetween = __webpack_require__(55); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(228); +var FuzzyEqual = __webpack_require__(108); +var FuzzyGreaterThan = __webpack_require__(334); +var FuzzyLessThan = __webpack_require__(335); +var GetOverlapX = __webpack_require__(229); +var GetOverlapY = __webpack_require__(230); var GetValue = __webpack_require__(6); var MATH_CONST = __webpack_require__(13); -var ProcessQueue = __webpack_require__(192); -var ProcessTileCallbacks = __webpack_require__(1296); +var ProcessQueue = __webpack_require__(195); +var ProcessTileCallbacks = __webpack_require__(489); var Rectangle = __webpack_require__(9); -var RTree = __webpack_require__(473); -var SeparateTile = __webpack_require__(1297); -var SeparateX = __webpack_require__(1302); -var SeparateY = __webpack_require__(1303); -var Set = __webpack_require__(139); -var StaticBody = __webpack_require__(475); -var TileIntersectsBody = __webpack_require__(474); -var TransformMatrix = __webpack_require__(30); +var RTree = __webpack_require__(490); +var SeparateTile = __webpack_require__(491); +var SeparateX = __webpack_require__(496); +var SeparateY = __webpack_require__(497); +var Set = __webpack_require__(140); +var StaticBody = __webpack_require__(498); +var TileIntersectsBody = __webpack_require__(231); +var TransformMatrix = __webpack_require__(31); var Vector2 = __webpack_require__(3); -var Wrap = __webpack_require__(58); +var Wrap = __webpack_require__(59); /** * @classdesc @@ -97312,7 +103095,7 @@ var World = new Class({ * @default true * @since 3.23.0 */ - this.fixedStep = true; + this.fixedStep = GetValue(config, 'fixedStep', true); /** * The amount of elapsed ms since the last frame. @@ -98060,7 +103843,6 @@ var World = new Class({ * This is called automatically by your Scene and does not need to be invoked directly. * * @method Phaser.Physics.Arcade.World#update - * @protected * @fires Phaser.Physics.Arcade.Events#WORLD_STEP * @since 3.0.0 * @@ -99576,7 +105358,7 @@ module.exports = World; /***/ }), -/* 469 */ +/* 487 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99587,11 +105369,11 @@ module.exports = World; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(51); -var Events = __webpack_require__(224); -var RadToDeg = __webpack_require__(179); +var CONST = __webpack_require__(52); +var Events = __webpack_require__(228); +var RadToDeg = __webpack_require__(181); var Rectangle = __webpack_require__(9); -var RectangleContains = __webpack_require__(49); +var RectangleContains = __webpack_require__(50); var Vector2 = __webpack_require__(3); /** @@ -100515,19 +106297,37 @@ var Body = new Class({ * * @method Phaser.Physics.Arcade.Body#resetFlags * @since 3.18.0 + * + * @param {boolean} [clear=false] - Set the `wasTouching` values to their defaults. */ - resetFlags: function () + resetFlags: function (clear) { + if (clear === undefined) + { + clear = false; + } + // Store and reset collision flags var wasTouching = this.wasTouching; var touching = this.touching; var blocked = this.blocked; - wasTouching.none = touching.none; - wasTouching.up = touching.up; - wasTouching.down = touching.down; - wasTouching.left = touching.left; - wasTouching.right = touching.right; + if (clear) + { + wasTouching.none = true; + wasTouching.up = false; + wasTouching.down = false; + wasTouching.left = false; + wasTouching.right = false; + } + else + { + wasTouching.none = touching.none; + wasTouching.up = touching.up; + wasTouching.down = touching.down; + wasTouching.left = touching.left; + wasTouching.right = touching.right; + } touching.none = true; touching.up = false; @@ -100934,6 +106734,7 @@ var Body = new Class({ this.updateBounds(); this.updateCenter(); + this.resetFlags(true); }, /** @@ -101934,7 +107735,7 @@ module.exports = Body; /***/ }), -/* 470 */ +/* 488 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102117,8 +107918,8 @@ module.exports = Collider; /***/ }), -/* 471 */ -/***/ (function(module, exports, __webpack_require__) { +/* 489 */ +/***/ (function(module, exports) { /** * @author Richard Davey @@ -102126,214 +107927,39 @@ module.exports = Collider; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(51); - /** - * Calculates and returns the horizontal overlap between two arcade physics bodies and sets their properties - * accordingly, including: `touching.left`, `touching.right`, `touching.none` and `overlapX'. + * A function to process the collision callbacks between a single tile and an Arcade Physics enabled Game Object. * - * @function Phaser.Physics.Arcade.GetOverlapX + * @function Phaser.Physics.Arcade.Tilemap.ProcessTileCallbacks * @since 3.0.0 * - * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to separate. - * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to separate. - * @param {boolean} overlapOnly - Is this an overlap only check, or part of separation? - * @param {number} bias - A value added to the delta values during collision checks. Increase it to prevent sprite tunneling(sprites passing through another instead of colliding). + * @param {Phaser.Tilemaps.Tile} tile - The Tile to process. + * @param {Phaser.GameObjects.Sprite} sprite - The Game Object to process with the Tile. * - * @return {number} The amount of overlap. + * @return {boolean} The result of the callback, `true` for further processing, or `false` to skip this pair. */ -var GetOverlapX = function (body1, body2, overlapOnly, bias) +var ProcessTileCallbacks = function (tile, sprite) { - var overlap = 0; - var maxOverlap = body1.deltaAbsX() + body2.deltaAbsX() + bias; - - if (body1._dx === 0 && body2._dx === 0) + // Tile callbacks take priority over layer level callbacks + if (tile.collisionCallback) { - // They overlap but neither of them are moving - body1.embedded = true; - body2.embedded = true; + return !tile.collisionCallback.call(tile.collisionCallbackContext, sprite, tile); } - else if (body1._dx > body2._dx) + else if (tile.layer.callbacks[tile.index]) { - // Body1 is moving right and / or Body2 is moving left - overlap = body1.right - body2.x; - - if ((overlap > maxOverlap && !overlapOnly) || body1.checkCollision.right === false || body2.checkCollision.left === false) - { - overlap = 0; - } - else - { - body1.touching.none = false; - body1.touching.right = true; - - body2.touching.none = false; - body2.touching.left = true; - - if (body2.physicsType === CONST.STATIC_BODY) - { - body1.blocked.none = false; - body1.blocked.right = true; - } - - if (body1.physicsType === CONST.STATIC_BODY) - { - body2.blocked.none = false; - body2.blocked.left = true; - } - } - } - else if (body1._dx < body2._dx) - { - // Body1 is moving left and/or Body2 is moving right - overlap = body1.x - body2.width - body2.x; - - if ((-overlap > maxOverlap && !overlapOnly) || body1.checkCollision.left === false || body2.checkCollision.right === false) - { - overlap = 0; - } - else - { - body1.touching.none = false; - body1.touching.left = true; - - body2.touching.none = false; - body2.touching.right = true; - - if (body2.physicsType === CONST.STATIC_BODY) - { - body1.blocked.none = false; - body1.blocked.left = true; - } - - if (body1.physicsType === CONST.STATIC_BODY) - { - body2.blocked.none = false; - body2.blocked.right = true; - } - } + return !tile.layer.callbacks[tile.index].callback.call( + tile.layer.callbacks[tile.index].callbackContext, sprite, tile + ); } - // Resets the overlapX to zero if there is no overlap, or to the actual pixel value if there is - body1.overlapX = overlap; - body2.overlapX = overlap; - - return overlap; + return true; }; -module.exports = GetOverlapX; +module.exports = ProcessTileCallbacks; /***/ }), -/* 472 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var CONST = __webpack_require__(51); - -/** - * Calculates and returns the vertical overlap between two arcade physics bodies and sets their properties - * accordingly, including: `touching.up`, `touching.down`, `touching.none` and `overlapY'. - * - * @function Phaser.Physics.Arcade.GetOverlapY - * @since 3.0.0 - * - * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to separate. - * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to separate. - * @param {boolean} overlapOnly - Is this an overlap only check, or part of separation? - * @param {number} bias - A value added to the delta values during collision checks. Increase it to prevent sprite tunneling(sprites passing through another instead of colliding). - * - * @return {number} The amount of overlap. - */ -var GetOverlapY = function (body1, body2, overlapOnly, bias) -{ - var overlap = 0; - var maxOverlap = body1.deltaAbsY() + body2.deltaAbsY() + bias; - - if (body1._dy === 0 && body2._dy === 0) - { - // They overlap but neither of them are moving - body1.embedded = true; - body2.embedded = true; - } - else if (body1._dy > body2._dy) - { - // Body1 is moving down and/or Body2 is moving up - overlap = body1.bottom - body2.y; - - if ((overlap > maxOverlap && !overlapOnly) || body1.checkCollision.down === false || body2.checkCollision.up === false) - { - overlap = 0; - } - else - { - body1.touching.none = false; - body1.touching.down = true; - - body2.touching.none = false; - body2.touching.up = true; - - if (body2.physicsType === CONST.STATIC_BODY) - { - body1.blocked.none = false; - body1.blocked.down = true; - } - - if (body1.physicsType === CONST.STATIC_BODY) - { - body2.blocked.none = false; - body2.blocked.up = true; - } - } - } - else if (body1._dy < body2._dy) - { - // Body1 is moving up and/or Body2 is moving down - overlap = body1.y - body2.bottom; - - if ((-overlap > maxOverlap && !overlapOnly) || body1.checkCollision.up === false || body2.checkCollision.down === false) - { - overlap = 0; - } - else - { - body1.touching.none = false; - body1.touching.up = true; - - body2.touching.none = false; - body2.touching.down = true; - - if (body2.physicsType === CONST.STATIC_BODY) - { - body1.blocked.none = false; - body1.blocked.up = true; - } - - if (body1.physicsType === CONST.STATIC_BODY) - { - body2.blocked.none = false; - body2.blocked.down = true; - } - } - } - - // Resets the overlapY to zero if there is no overlap, or to the actual pixel value if there is - body1.overlapY = overlap; - body2.overlapY = overlap; - - return overlap; -}; - -module.exports = GetOverlapY; - - -/***/ }), -/* 473 */ +/* 490 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102343,7 +107969,7 @@ module.exports = GetOverlapY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var quickselect = __webpack_require__(391); +var quickselect = __webpack_require__(402); /** * @classdesc @@ -102944,7 +108570,217 @@ function multiSelect (arr, left, right, n, compare) module.exports = rbush; /***/ }), -/* 474 */ +/* 491 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var TileCheckX = __webpack_require__(492); +var TileCheckY = __webpack_require__(494); +var TileIntersectsBody = __webpack_require__(231); + +/** + * The core separation function to separate a physics body and a tile. + * + * @function Phaser.Physics.Arcade.Tilemap.SeparateTile + * @since 3.0.0 + * + * @param {number} i - The index of the tile within the map data. + * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate. + * @param {Phaser.Tilemaps.Tile} tile - The tile to collide against. + * @param {Phaser.Geom.Rectangle} tileWorldRect - A rectangle-like object defining the dimensions of the tile. + * @param {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} tilemapLayer - The tilemapLayer to collide against. + * @param {number} tileBias - The tile bias value. Populated by the `World.TILE_BIAS` constant. + * @param {boolean} isLayer - Is this check coming from a TilemapLayer or an array of tiles? + * + * @return {boolean} `true` if the body was separated, otherwise `false`. + */ +var SeparateTile = function (i, body, tile, tileWorldRect, tilemapLayer, tileBias, isLayer) +{ + var tileLeft = tileWorldRect.left; + var tileTop = tileWorldRect.top; + var tileRight = tileWorldRect.right; + var tileBottom = tileWorldRect.bottom; + var faceHorizontal = tile.faceLeft || tile.faceRight; + var faceVertical = tile.faceTop || tile.faceBottom; + + if (!isLayer) + { + faceHorizontal = true; + faceVertical = true; + } + + // We don't need to go any further if this tile doesn't actually have any colliding faces. This + // could happen if the tile was meant to be collided with re: a callback, but otherwise isn't + // needed for separation. + if (!faceHorizontal && !faceVertical) + { + return false; + } + + var ox = 0; + var oy = 0; + var minX = 0; + var minY = 1; + + if (body.deltaAbsX() > body.deltaAbsY()) + { + // Moving faster horizontally, check X axis first + minX = -1; + } + else if (body.deltaAbsX() < body.deltaAbsY()) + { + // Moving faster vertically, check Y axis first + minY = -1; + } + + if (body.deltaX() !== 0 && body.deltaY() !== 0 && faceHorizontal && faceVertical) + { + // We only need do this if both axes have colliding faces AND we're moving in both + // directions + minX = Math.min(Math.abs(body.position.x - tileRight), Math.abs(body.right - tileLeft)); + minY = Math.min(Math.abs(body.position.y - tileBottom), Math.abs(body.bottom - tileTop)); + } + + if (minX < minY) + { + if (faceHorizontal) + { + ox = TileCheckX(body, tile, tileLeft, tileRight, tileBias, isLayer); + + // That's horizontal done, check if we still intersects? If not then we can return now + if (ox !== 0 && !TileIntersectsBody(tileWorldRect, body)) + { + return true; + } + } + + if (faceVertical) + { + oy = TileCheckY(body, tile, tileTop, tileBottom, tileBias, isLayer); + } + } + else + { + if (faceVertical) + { + oy = TileCheckY(body, tile, tileTop, tileBottom, tileBias, isLayer); + + // That's vertical done, check if we still intersects? If not then we can return now + if (oy !== 0 && !TileIntersectsBody(tileWorldRect, body)) + { + return true; + } + } + + if (faceHorizontal) + { + ox = TileCheckX(body, tile, tileLeft, tileRight, tileBias, isLayer); + } + } + + return (ox !== 0 || oy !== 0); +}; + +module.exports = SeparateTile; + + +/***/ }), +/* 492 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var ProcessTileSeparationX = __webpack_require__(493); + +/** + * Check the body against the given tile on the X axis. + * Used internally by the SeparateTile function. + * + * @function Phaser.Physics.Arcade.Tilemap.TileCheckX + * @since 3.0.0 + * + * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate. + * @param {Phaser.Tilemaps.Tile} tile - The tile to check. + * @param {number} tileLeft - The left position of the tile within the tile world. + * @param {number} tileRight - The right position of the tile within the tile world. + * @param {number} tileBias - The tile bias value. Populated by the `World.TILE_BIAS` constant. + * @param {boolean} isLayer - Is this check coming from a TilemapLayer or an array of tiles? + * + * @return {number} The amount of separation that occurred. + */ +var TileCheckX = function (body, tile, tileLeft, tileRight, tileBias, isLayer) +{ + var ox = 0; + + var faceLeft = tile.faceLeft; + var faceRight = tile.faceRight; + var collideLeft = tile.collideLeft; + var collideRight = tile.collideRight; + + if (!isLayer) + { + faceLeft = true; + faceRight = true; + collideLeft = true; + collideRight = true; + } + + if (body.deltaX() < 0 && collideRight && body.checkCollision.left) + { + // Body is moving LEFT + if (faceRight && body.x < tileRight) + { + ox = body.x - tileRight; + + if (ox < -tileBias) + { + ox = 0; + } + } + } + else if (body.deltaX() > 0 && collideLeft && body.checkCollision.right) + { + // Body is moving RIGHT + if (faceLeft && body.right > tileLeft) + { + ox = body.right - tileLeft; + + if (ox > tileBias) + { + ox = 0; + } + } + } + + if (ox !== 0) + { + if (body.customSeparateX) + { + body.overlapX = ox; + } + else + { + ProcessTileSeparationX(body, ox); + } + } + + return ox; +}; + +module.exports = TileCheckX; + + +/***/ }), +/* 493 */ /***/ (function(module, exports) { /** @@ -102954,33 +108790,44 @@ module.exports = rbush; */ /** - * Checks for intersection between the given tile rectangle-like object and an Arcade Physics body. + * Internal function to process the separation of a physics body from a tile. * - * @function Phaser.Physics.Arcade.Tilemap.TileIntersectsBody + * @function Phaser.Physics.Arcade.Tilemap.ProcessTileSeparationX * @since 3.0.0 * - * @param {{ left: number, right: number, top: number, bottom: number }} tileWorldRect - A rectangle object that defines the tile placement in the world. - * @param {Phaser.Physics.Arcade.Body} body - The body to check for intersection against. - * - * @return {boolean} Returns `true` of the tile intersects with the body, otherwise `false`. + * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate. + * @param {number} x - The x separation amount. */ -var TileIntersectsBody = function (tileWorldRect, body) +var ProcessTileSeparationX = function (body, x) { - // Currently, all bodies are treated as rectangles when colliding with a Tile. + if (x < 0) + { + body.blocked.none = false; + body.blocked.left = true; + } + else if (x > 0) + { + body.blocked.none = false; + body.blocked.right = true; + } - return !( - body.right <= tileWorldRect.left || - body.bottom <= tileWorldRect.top || - body.position.x >= tileWorldRect.right || - body.position.y >= tileWorldRect.bottom - ); + body.position.x -= x; + + if (body.bounce.x === 0) + { + body.velocity.x = 0; + } + else + { + body.velocity.x = -body.velocity.x * body.bounce.x; + } }; -module.exports = TileIntersectsBody; +module.exports = ProcessTileSeparationX; /***/ }), -/* 475 */ +/* 494 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102989,10 +108836,333 @@ module.exports = TileIntersectsBody; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CircleContains = __webpack_require__(56); +var ProcessTileSeparationY = __webpack_require__(495); + +/** + * Check the body against the given tile on the Y axis. + * Used internally by the SeparateTile function. + * + * @function Phaser.Physics.Arcade.Tilemap.TileCheckY + * @since 3.0.0 + * + * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate. + * @param {Phaser.Tilemaps.Tile} tile - The tile to check. + * @param {number} tileTop - The top position of the tile within the tile world. + * @param {number} tileBottom - The bottom position of the tile within the tile world. + * @param {number} tileBias - The tile bias value. Populated by the `World.TILE_BIAS` constant. + * @param {boolean} isLayer - Is this check coming from a TilemapLayer or an array of tiles? + * + * @return {number} The amount of separation that occurred. + */ +var TileCheckY = function (body, tile, tileTop, tileBottom, tileBias, isLayer) +{ + var oy = 0; + + var faceTop = tile.faceTop; + var faceBottom = tile.faceBottom; + var collideUp = tile.collideUp; + var collideDown = tile.collideDown; + + if (!isLayer) + { + faceTop = true; + faceBottom = true; + collideUp = true; + collideDown = true; + } + + if (body.deltaY() < 0 && collideDown && body.checkCollision.up) + { + // Body is moving UP + if (faceBottom && body.y < tileBottom) + { + oy = body.y - tileBottom; + + if (oy < -tileBias) + { + oy = 0; + } + } + } + else if (body.deltaY() > 0 && collideUp && body.checkCollision.down) + { + // Body is moving DOWN + if (faceTop && body.bottom > tileTop) + { + oy = body.bottom - tileTop; + + if (oy > tileBias) + { + oy = 0; + } + } + } + + if (oy !== 0) + { + if (body.customSeparateY) + { + body.overlapY = oy; + } + else + { + ProcessTileSeparationY(body, oy); + } + } + + return oy; +}; + +module.exports = TileCheckY; + + +/***/ }), +/* 495 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Internal function to process the separation of a physics body from a tile. + * + * @function Phaser.Physics.Arcade.Tilemap.ProcessTileSeparationY + * @since 3.0.0 + * + * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate. + * @param {number} y - The y separation amount. + */ +var ProcessTileSeparationY = function (body, y) +{ + if (y < 0) + { + body.blocked.none = false; + body.blocked.up = true; + } + else if (y > 0) + { + body.blocked.none = false; + body.blocked.down = true; + } + + body.position.y -= y; + + if (body.bounce.y === 0) + { + body.velocity.y = 0; + } + else + { + body.velocity.y = -body.velocity.y * body.bounce.y; + } +}; + +module.exports = ProcessTileSeparationY; + + +/***/ }), +/* 496 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetOverlapX = __webpack_require__(229); + +/** + * Separates two overlapping bodies on the X-axis (horizontally). + * + * Separation involves moving two overlapping bodies so they don't overlap anymore and adjusting their velocities based on their mass. This is a core part of collision detection. + * + * The bodies won't be separated if there is no horizontal overlap between them, if they are static, or if either one uses custom logic for its separation. + * + * @function Phaser.Physics.Arcade.SeparateX + * @since 3.0.0 + * + * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to separate. + * @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. + * + * @return {boolean} `true` if the two bodies overlap horizontally, otherwise `false`. + */ +var SeparateX = function (body1, body2, overlapOnly, bias) +{ + var overlap = GetOverlapX(body1, body2, overlapOnly, bias); + + // 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) + { + // return true if there was some overlap, otherwise false + return (overlap !== 0) || (body1.embedded && body2.embedded); + } + + // Adjust their positions and velocities accordingly (if there was any overlap) + var v1 = body1.velocity.x; + var v2 = body2.velocity.x; + + if (!body1.immovable && !body2.immovable) + { + overlap *= 0.5; + + body1.x -= overlap; + body2.x += overlap; + + var nv1 = Math.sqrt((v2 * v2 * body2.mass) / body1.mass) * ((v2 > 0) ? 1 : -1); + var nv2 = Math.sqrt((v1 * v1 * body1.mass) / body2.mass) * ((v1 > 0) ? 1 : -1); + var avg = (nv1 + nv2) * 0.5; + + nv1 -= avg; + nv2 -= avg; + + body1.velocity.x = avg + nv1 * body1.bounce.x; + body2.velocity.x = avg + nv2 * body2.bounce.x; + } + else if (!body1.immovable) + { + body1.x -= overlap; + body1.velocity.x = v2 - v1 * body1.bounce.x; + + // This is special case code that handles things like vertically moving platforms you can ride + if (body2.moves) + { + body1.y += (body2.y - body2.prev.y) * body2.friction.y; + body1._dy = body1.y - body1.prev.y; + } + } + else + { + body2.x += overlap; + body2.velocity.x = v1 - v2 * body2.bounce.x; + + // This is special case code that handles things like vertically moving platforms you can ride + if (body1.moves) + { + body2.y += (body1.y - body1.prev.y) * body1.friction.y; + body2._dy = body2.y - body2.prev.y; + } + } + + // If we got this far then there WAS overlap, and separation is complete, so return true + return true; +}; + +module.exports = SeparateX; + + +/***/ }), +/* 497 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetOverlapY = __webpack_require__(230); + +/** + * Separates two overlapping bodies on the Y-axis (vertically). + * + * Separation involves moving two overlapping bodies so they don't overlap anymore and adjusting their velocities based on their mass. This is a core part of collision detection. + * + * The bodies won't be separated if there is no vertical overlap between them, if they are static, or if either one uses custom logic for its separation. + * + * @function Phaser.Physics.Arcade.SeparateY + * @since 3.0.0 + * + * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to separate. + * @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. + * + * @return {boolean} `true` if the two bodies overlap vertically, otherwise `false`. + */ +var SeparateY = function (body1, body2, overlapOnly, bias) +{ + var overlap = GetOverlapY(body1, body2, overlapOnly, bias); + + // Can't separate two immovable bodies, or a body with its own custom separation logic + if (overlapOnly || overlap === 0 || (body1.immovable && body2.immovable) || body1.customSeparateY || body2.customSeparateY) + { + // return true if there was some overlap, otherwise false + return (overlap !== 0) || (body1.embedded && body2.embedded); + } + + // Adjust their positions and velocities accordingly (if there was any overlap) + var v1 = body1.velocity.y; + var v2 = body2.velocity.y; + + if (!body1.immovable && !body2.immovable) + { + overlap *= 0.5; + + body1.y -= overlap; + body2.y += overlap; + + var nv1 = Math.sqrt((v2 * v2 * body2.mass) / body1.mass) * ((v2 > 0) ? 1 : -1); + var nv2 = Math.sqrt((v1 * v1 * body1.mass) / body2.mass) * ((v1 > 0) ? 1 : -1); + var avg = (nv1 + nv2) * 0.5; + + nv1 -= avg; + nv2 -= avg; + + body1.velocity.y = avg + nv1 * body1.bounce.y; + body2.velocity.y = avg + nv2 * body2.bounce.y; + } + else if (!body1.immovable) + { + body1.y -= overlap; + body1.velocity.y = v2 - v1 * body1.bounce.y; + + // This is special case code that handles things like horizontal moving platforms you can ride + if (body2.moves) + { + body1.x += (body2.x - body2.prev.x) * body2.friction.x; + body1._dx = body1.x - body1.prev.x; + } + } + else + { + body2.y += overlap; + body2.velocity.y = v1 - v2 * body2.bounce.y; + + // This is special case code that handles things like horizontal moving platforms you can ride + if (body1.moves) + { + body2.x += (body1.x - body1.prev.x) * body1.friction.x; + body2._dx = body2.x - body2.prev.x; + } + } + + // If we got this far then there WAS overlap, and separation is complete, so return true + return true; +}; + +module.exports = SeparateY; + + +/***/ }), +/* 498 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CircleContains = __webpack_require__(57); var Class = __webpack_require__(0); -var CONST = __webpack_require__(51); -var RectangleContains = __webpack_require__(49); +var CONST = __webpack_require__(52); +var RectangleContains = __webpack_require__(50); var Vector2 = __webpack_require__(3); /** @@ -103969,8 +110139,9 @@ module.exports = StaticBody; /***/ }), -/* 476 */, -/* 477 */ +/* 499 */, +/* 500 */, +/* 501 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104100,7 +110271,7 @@ module.exports = BasePlugin; /***/ }), -/* 478 */ +/* 502 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104117,7 +110288,6 @@ var GetTilesWithin = __webpack_require__(24); * not change collision information. * * @function Phaser.Tilemaps.Components.ReplaceByIndex - * @private * @since 3.0.0 * * @param {integer} findIndex - The index of the tile to search for. @@ -104145,7 +110315,7 @@ module.exports = ReplaceByIndex; /***/ }), -/* 479 */ +/* 503 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104154,20 +110324,19 @@ module.exports = ReplaceByIndex; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var IsInLayerBounds = __webpack_require__(102); +var IsInLayerBounds = __webpack_require__(103); /** * Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns * false if there is no tile or if the tile at that location has an index of -1. * * @function Phaser.Tilemaps.Components.HasTileAt - * @private * @since 3.0.0 * * @param {integer} tileX - X position to get the tile from (given in tile units, not pixels). * @param {integer} tileY - Y position to get the tile from (given in tile units, not pixels). * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {?boolean} Returns a boolean, or null if the layer given was invalid. */ var HasTileAt = function (tileX, tileY, layer) @@ -104175,20 +110344,20 @@ var HasTileAt = function (tileX, tileY, layer) if (IsInLayerBounds(tileX, tileY, layer)) { var tile = layer.data[tileY][tileX]; + return (tile !== null && tile.index > -1); } else { return false; } - }; module.exports = HasTileAt; /***/ }), -/* 480 */ +/* 504 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104197,16 +110366,15 @@ module.exports = HasTileAt; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Tile = __webpack_require__(74); -var IsInLayerBounds = __webpack_require__(102); -var CalculateFacesAt = __webpack_require__(226); +var Tile = __webpack_require__(75); +var IsInLayerBounds = __webpack_require__(103); +var CalculateFacesAt = __webpack_require__(233); /** * Removes the tile at the given tile coordinates in the specified layer and updates the layer's * collision information. * * @function Phaser.Tilemaps.Components.RemoveTileAt - * @private * @since 3.0.0 * * @param {integer} tileX - The x coordinate. @@ -104251,7 +110419,7 @@ module.exports = RemoveTileAt; /***/ }), -/* 481 */ +/* 505 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104260,11 +110428,11 @@ module.exports = RemoveTileAt; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Formats = __webpack_require__(32); -var Parse2DArray = __webpack_require__(229); -var ParseCSV = __webpack_require__(482); -var ParseJSONTiled = __webpack_require__(483); -var ParseWeltmeister = __webpack_require__(494); +var Formats = __webpack_require__(33); +var Parse2DArray = __webpack_require__(235); +var ParseCSV = __webpack_require__(506); +var ParseJSONTiled = __webpack_require__(507); +var ParseWeltmeister = __webpack_require__(518); /** * Parses raw data of a given Tilemap format into a new MapData object. If no recognized data format @@ -104321,7 +110489,7 @@ module.exports = Parse; /***/ }), -/* 482 */ +/* 506 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104330,8 +110498,8 @@ module.exports = Parse; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Formats = __webpack_require__(32); -var Parse2DArray = __webpack_require__(229); +var Formats = __webpack_require__(33); +var Parse2DArray = __webpack_require__(235); /** * Parses a CSV string of tile indexes into a new MapData object with a single layer. @@ -104369,7 +110537,7 @@ module.exports = ParseCSV; /***/ }), -/* 483 */ +/* 507 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104378,14 +110546,14 @@ module.exports = ParseCSV; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Formats = __webpack_require__(32); -var MapData = __webpack_require__(104); -var ParseTileLayers = __webpack_require__(484); -var ParseImageLayers = __webpack_require__(486); -var ParseTilesets = __webpack_require__(487); -var ParseObjectLayers = __webpack_require__(490); -var BuildTilesetIndex = __webpack_require__(492); -var AssignTileProperties = __webpack_require__(493); +var Formats = __webpack_require__(33); +var MapData = __webpack_require__(105); +var ParseTileLayers = __webpack_require__(508); +var ParseImageLayers = __webpack_require__(510); +var ParseTilesets = __webpack_require__(511); +var ParseObjectLayers = __webpack_require__(514); +var BuildTilesetIndex = __webpack_require__(516); +var AssignTileProperties = __webpack_require__(517); /** * Parses a Tiled JSON object into a new MapData object. @@ -104447,7 +110615,7 @@ module.exports = ParseJSONTiled; /***/ }), -/* 484 */ +/* 508 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104456,12 +110624,12 @@ module.exports = ParseJSONTiled; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Base64Decode = __webpack_require__(485); +var Base64Decode = __webpack_require__(509); var GetFastValue = __webpack_require__(2); -var LayerData = __webpack_require__(103); -var ParseGID = __webpack_require__(230); -var Tile = __webpack_require__(74); -var CreateGroupLayer = __webpack_require__(231); +var LayerData = __webpack_require__(104); +var ParseGID = __webpack_require__(236); +var Tile = __webpack_require__(75); +var CreateGroupLayer = __webpack_require__(153); /** * Parses all tilemap layers in a Tiled JSON object into new LayerData objects. @@ -104705,7 +110873,7 @@ module.exports = ParseTileLayers; /***/ }), -/* 485 */ +/* 509 */ /***/ (function(module, exports) { /** @@ -104748,7 +110916,7 @@ module.exports = Base64Decode; /***/ }), -/* 486 */ +/* 510 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104758,7 +110926,7 @@ module.exports = Base64Decode; */ var GetFastValue = __webpack_require__(2); -var CreateGroupLayer = __webpack_require__(231); +var CreateGroupLayer = __webpack_require__(153); /** * Parses a Tiled JSON object into an array of objects with details about the image layers. @@ -104836,7 +111004,7 @@ module.exports = ParseImageLayers; /***/ }), -/* 487 */ +/* 511 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104845,9 +111013,9 @@ module.exports = ParseImageLayers; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Tileset = __webpack_require__(105); -var ImageCollection = __webpack_require__(488); -var ParseObject = __webpack_require__(232); +var Tileset = __webpack_require__(106); +var ImageCollection = __webpack_require__(512); +var ParseObject = __webpack_require__(237); /** * Tilesets and Image Collections @@ -105005,7 +111173,7 @@ module.exports = ParseTilesets; /***/ }), -/* 488 */ +/* 512 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105177,7 +111345,7 @@ module.exports = ImageCollection; /***/ }), -/* 489 */ +/* 513 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105186,7 +111354,7 @@ module.exports = ImageCollection; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HasValue = __webpack_require__(112); +var HasValue = __webpack_require__(113); /** * Returns a new object that only contains the `keys` that were found on the object provided. @@ -105221,7 +111389,7 @@ module.exports = Pick; /***/ }), -/* 490 */ +/* 514 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105231,9 +111399,9 @@ module.exports = Pick; */ var GetFastValue = __webpack_require__(2); -var ParseObject = __webpack_require__(232); -var ObjectLayer = __webpack_require__(491); -var CreateGroupLayer = __webpack_require__(231); +var ParseObject = __webpack_require__(237); +var ObjectLayer = __webpack_require__(515); +var CreateGroupLayer = __webpack_require__(153); /** * Parses a Tiled JSON object into an array of ObjectLayer objects. @@ -105320,7 +111488,7 @@ module.exports = ParseObjectLayers; /***/ }), -/* 491 */ +/* 515 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105442,7 +111610,7 @@ module.exports = ObjectLayer; /***/ }), -/* 492 */ +/* 516 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105451,7 +111619,7 @@ module.exports = ObjectLayer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Tileset = __webpack_require__(105); +var Tileset = __webpack_require__(106); /** * Master list of tiles -> x, y, index in tileset. @@ -105536,7 +111704,7 @@ module.exports = BuildTilesetIndex; /***/ }), -/* 493 */ +/* 517 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105609,7 +111777,7 @@ module.exports = AssignTileProperties; /***/ }), -/* 494 */ +/* 518 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105618,10 +111786,10 @@ module.exports = AssignTileProperties; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Formats = __webpack_require__(32); -var MapData = __webpack_require__(104); -var ParseTileLayers = __webpack_require__(495); -var ParseTilesets = __webpack_require__(496); +var Formats = __webpack_require__(33); +var MapData = __webpack_require__(105); +var ParseTileLayers = __webpack_require__(519); +var ParseTilesets = __webpack_require__(520); /** * Parses a Weltmeister JSON object into a new MapData object. @@ -105676,7 +111844,7 @@ module.exports = ParseWeltmeister; /***/ }), -/* 495 */ +/* 519 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105685,8 +111853,8 @@ module.exports = ParseWeltmeister; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var LayerData = __webpack_require__(103); -var Tile = __webpack_require__(74); +var LayerData = __webpack_require__(104); +var Tile = __webpack_require__(75); /** * Parses all tilemap layers in an Impact JSON object into new LayerData objects. @@ -105762,7 +111930,7 @@ module.exports = ParseTileLayers; /***/ }), -/* 496 */ +/* 520 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105771,7 +111939,7 @@ module.exports = ParseTileLayers; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Tileset = __webpack_require__(105); +var Tileset = __webpack_require__(106); /** * Tilesets and Image Collections @@ -105813,7 +111981,7 @@ module.exports = ParseTilesets; /***/ }), -/* 497 */ +/* 521 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105823,17 +111991,17 @@ module.exports = ParseTilesets; */ var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(40); -var DynamicTilemapLayer = __webpack_require__(498); +var DegToRad = __webpack_require__(41); +var DynamicTilemapLayer = __webpack_require__(522); var Extend = __webpack_require__(19); -var Formats = __webpack_require__(32); -var LayerData = __webpack_require__(103); -var Rotate = __webpack_require__(335); -var SpliceOne = __webpack_require__(81); -var StaticTilemapLayer = __webpack_require__(499); -var Tile = __webpack_require__(74); -var TilemapComponents = __webpack_require__(147); -var Tileset = __webpack_require__(105); +var Formats = __webpack_require__(33); +var LayerData = __webpack_require__(104); +var Rotate = __webpack_require__(343); +var SpliceOne = __webpack_require__(82); +var StaticTilemapLayer = __webpack_require__(523); +var Tile = __webpack_require__(75); +var TilemapComponents = __webpack_require__(148); +var Tileset = __webpack_require__(106); /** * @callback TilemapFilterCallback @@ -108370,7 +114538,7 @@ module.exports = Tilemap; /***/ }), -/* 498 */ +/* 522 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108380,10 +114548,10 @@ module.exports = Tilemap; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var DynamicTilemapLayerRender = __webpack_require__(1357); +var Components = __webpack_require__(11); +var DynamicTilemapLayerRender = __webpack_require__(1354); var GameObject = __webpack_require__(14); -var TilemapComponents = __webpack_require__(147); +var TilemapComponents = __webpack_require__(148); /** * @classdesc @@ -109691,7 +115859,7 @@ module.exports = DynamicTilemapLayer; /***/ }), -/* 499 */ +/* 523 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109701,13 +115869,13 @@ module.exports = DynamicTilemapLayer; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var GameEvents = __webpack_require__(20); +var Components = __webpack_require__(11); +var GameEvents = __webpack_require__(21); var GameObject = __webpack_require__(14); -var ModelViewProjection = __webpack_require__(110); -var StaticTilemapLayerRender = __webpack_require__(1360); -var TilemapComponents = __webpack_require__(147); -var TransformMatrix = __webpack_require__(30); +var ModelViewProjection = __webpack_require__(111); +var StaticTilemapLayerRender = __webpack_require__(1357); +var TilemapComponents = __webpack_require__(148); +var TransformMatrix = __webpack_require__(31); var Utils = __webpack_require__(10); /** @@ -111211,7 +117379,7 @@ module.exports = StaticTilemapLayer; /***/ }), -/* 500 */ +/* 524 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111524,7 +117692,7 @@ module.exports = TimerEvent; /***/ }), -/* 501 */ +/* 525 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111533,7 +117701,7 @@ module.exports = TimerEvent; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RESERVED = __webpack_require__(1374); +var RESERVED = __webpack_require__(1371); /** * Internal function used by the Tween Builder to return an array of properties @@ -111585,7 +117753,7 @@ module.exports = GetProps; /***/ }), -/* 502 */ +/* 526 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111633,7 +117801,7 @@ module.exports = GetTweens; /***/ }), -/* 503 */ +/* 527 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111642,15 +117810,15 @@ module.exports = GetTweens; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Defaults = __webpack_require__(236); +var Defaults = __webpack_require__(241); var GetAdvancedValue = __webpack_require__(15); -var GetBoolean = __webpack_require__(89); -var GetEaseFunction = __webpack_require__(69); -var GetNewValue = __webpack_require__(151); +var GetBoolean = __webpack_require__(90); +var GetEaseFunction = __webpack_require__(71); +var GetNewValue = __webpack_require__(154); var GetValue = __webpack_require__(6); -var GetValueOp = __webpack_require__(235); -var Tween = __webpack_require__(237); -var TweenData = __webpack_require__(239); +var GetValueOp = __webpack_require__(240); +var Tween = __webpack_require__(242); +var TweenData = __webpack_require__(244); /** * Creates a new Number Tween. @@ -111763,7 +117931,7 @@ module.exports = NumberTweenBuilder; /***/ }), -/* 504 */ +/* 528 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111772,7 +117940,7 @@ module.exports = NumberTweenBuilder; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetEaseFunction = __webpack_require__(69); +var GetEaseFunction = __webpack_require__(71); var GetValue = __webpack_require__(6); var MATH_CONST = __webpack_require__(13); @@ -112009,7 +118177,7 @@ module.exports = StaggerBuilder; /***/ }), -/* 505 */ +/* 529 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112018,17 +118186,17 @@ module.exports = StaggerBuilder; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clone = __webpack_require__(67); -var Defaults = __webpack_require__(236); +var Clone = __webpack_require__(69); +var Defaults = __webpack_require__(241); var GetAdvancedValue = __webpack_require__(15); -var GetBoolean = __webpack_require__(89); -var GetEaseFunction = __webpack_require__(69); -var GetNewValue = __webpack_require__(151); -var GetTargets = __webpack_require__(234); -var GetTweens = __webpack_require__(502); +var GetBoolean = __webpack_require__(90); +var GetEaseFunction = __webpack_require__(71); +var GetNewValue = __webpack_require__(154); +var GetTargets = __webpack_require__(239); +var GetTweens = __webpack_require__(526); var GetValue = __webpack_require__(6); -var Timeline = __webpack_require__(506); -var TweenBuilder = __webpack_require__(152); +var Timeline = __webpack_require__(530); +var TweenBuilder = __webpack_require__(155); /** * Builds a Timeline of Tweens based on a configuration object. @@ -112163,7 +118331,7 @@ module.exports = TimelineBuilder; /***/ }), -/* 506 */ +/* 530 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112173,10 +118341,10 @@ module.exports = TimelineBuilder; */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(238); -var TweenBuilder = __webpack_require__(152); -var TWEEN_CONST = __webpack_require__(90); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(243); +var TweenBuilder = __webpack_require__(155); +var TWEEN_CONST = __webpack_require__(91); /** * @classdesc @@ -113068,1202 +119236,7 @@ module.exports = Timeline; /***/ }), -/* 507 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var BaseAnimation = __webpack_require__(156); -var Class = __webpack_require__(0); -var Events = __webpack_require__(115); - -/** - * @classdesc - * A Game Object Animation Controller. - * - * This controller lives as an instance within a Game Object, accessible as `sprite.anims`. - * - * @class Animation - * @memberof Phaser.GameObjects.Components - * @constructor - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject} parent - The Game Object to which this animation controller belongs. - */ -var Animation = new Class({ - - initialize: - - function Animation (parent) - { - /** - * The Game Object to which this animation controller belongs. - * - * @name Phaser.GameObjects.Components.Animation#parent - * @type {Phaser.GameObjects.GameObject} - * @since 3.0.0 - */ - this.parent = parent; - - /** - * A reference to the global Animation Manager. - * - * @name Phaser.GameObjects.Components.Animation#animationManager - * @type {Phaser.Animations.AnimationManager} - * @since 3.0.0 - */ - this.animationManager = parent.scene.sys.anims; - - this.animationManager.once(Events.REMOVE_ANIMATION, this.remove, this); - - /** - * Is an animation currently playing or not? - * - * @name Phaser.GameObjects.Components.Animation#isPlaying - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.isPlaying = false; - - /** - * The current Animation loaded into this Animation Controller. - * - * @name Phaser.GameObjects.Components.Animation#currentAnim - * @type {?Phaser.Animations.Animation} - * @default null - * @since 3.0.0 - */ - this.currentAnim = null; - - /** - * The current AnimationFrame being displayed by this Animation Controller. - * - * @name Phaser.GameObjects.Components.Animation#currentFrame - * @type {?Phaser.Animations.AnimationFrame} - * @default null - * @since 3.0.0 - */ - this.currentFrame = null; - - /** - * The key of the next Animation to be loaded into this Animation Controller when the current animation completes. - * - * @name Phaser.GameObjects.Components.Animation#nextAnim - * @type {?string} - * @default null - * @since 3.16.0 - */ - this.nextAnim = null; - - /** - * A queue of keys of the next Animations to be loaded into this Animation Controller when the current animation completes. - * - * @name Phaser.GameObjects.Components.Animation#nextAnimsQueue - * @type {string[]} - * @since 3.24.0 - */ - this.nextAnimsQueue = []; - - /** - * Time scale factor. - * - * @name Phaser.GameObjects.Components.Animation#_timeScale - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - this._timeScale = 1; - - /** - * The frame rate of playback in frames per second. - * The default is 24 if the `duration` property is `null`. - * - * @name Phaser.GameObjects.Components.Animation#frameRate - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.frameRate = 0; - - /** - * How long the animation should play for, in milliseconds. - * If the `frameRate` property has been set then it overrides this value, - * otherwise the `frameRate` is derived from `duration`. - * - * @name Phaser.GameObjects.Components.Animation#duration - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.duration = 0; - - /** - * ms per frame, not including frame specific modifiers that may be present in the Animation data. - * - * @name Phaser.GameObjects.Components.Animation#msPerFrame - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.msPerFrame = 0; - - /** - * Skip frames if the time lags, or always advanced anyway? - * - * @name Phaser.GameObjects.Components.Animation#skipMissedFrames - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.skipMissedFrames = true; - - /** - * A delay before starting playback, in milliseconds. - * - * @name Phaser.GameObjects.Components.Animation#_delay - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._delay = 0; - - /** - * Number of times to repeat the animation (-1 for infinity) - * - * @name Phaser.GameObjects.Components.Animation#_repeat - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._repeat = 0; - - /** - * Delay before the repeat starts, in milliseconds. - * - * @name Phaser.GameObjects.Components.Animation#_repeatDelay - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._repeatDelay = 0; - - /** - * Should the animation yoyo? (reverse back down to the start) before repeating? - * - * @name Phaser.GameObjects.Components.Animation#_yoyo - * @type {boolean} - * @private - * @default false - * @since 3.0.0 - */ - this._yoyo = false; - - /** - * Will the playhead move forwards (`true`) or in reverse (`false`). - * - * @name Phaser.GameObjects.Components.Animation#forward - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.forward = true; - - /** - * An Internal trigger that's play the animation in reverse mode ('true') or not ('false'), - * needed because forward can be changed by yoyo feature. - * - * @name Phaser.GameObjects.Components.Animation#_reverse - * @type {boolean} - * @default false - * @private - * @since 3.12.0 - */ - this._reverse = false; - - /** - * Internal time overflow accumulator. - * - * @name Phaser.GameObjects.Components.Animation#accumulator - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.accumulator = 0; - - /** - * The time point at which the next animation frame will change. - * - * @name Phaser.GameObjects.Components.Animation#nextTick - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.nextTick = 0; - - /** - * An internal counter keeping track of how many repeats are left to play. - * - * @name Phaser.GameObjects.Components.Animation#repeatCounter - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.repeatCounter = 0; - - /** - * An internal flag keeping track of pending repeats. - * - * @name Phaser.GameObjects.Components.Animation#pendingRepeat - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.pendingRepeat = false; - - /** - * Is the Animation paused? - * - * @name Phaser.GameObjects.Components.Animation#_paused - * @type {boolean} - * @private - * @default false - * @since 3.0.0 - */ - this._paused = false; - - /** - * Was the animation previously playing before being paused? - * - * @name Phaser.GameObjects.Components.Animation#_wasPlaying - * @type {boolean} - * @private - * @default false - * @since 3.0.0 - */ - this._wasPlaying = false; - - /** - * Internal property tracking if this Animation is waiting to stop. - * - * 0 = No - * 1 = Waiting for ms to pass - * 2 = Waiting for repeat - * 3 = Waiting for specific frame - * - * @name Phaser.GameObjects.Components.Animation#_pendingStop - * @type {integer} - * @private - * @since 3.4.0 - */ - this._pendingStop = 0; - - /** - * Internal property used by _pendingStop. - * - * @name Phaser.GameObjects.Components.Animation#_pendingStopValue - * @type {any} - * @private - * @since 3.4.0 - */ - this._pendingStopValue; - }, - - /** - * Sets an animation to be played immediately after the current one completes. - * - * The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc, or have the `stop` method called directly on it. - * - * An animation set to repeat forever will never enter a completed state. - * - * You can chain a new animation at any point, including before the current one starts playing, during it, or when it ends (via its `animationcomplete` callback). - * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained animations without impacting the global animation they're playing. - * - * Call this method with no arguments to reset the chained animation. - * - * @method Phaser.GameObjects.Components.Animation#chain - * @since 3.16.0 - * - * @param {(string|Phaser.Animations.Animation)} [key] - The string-based key of the animation to play next, as defined previously in the Animation Manager. Or an Animation instance. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - chain: function (key) - { - if (key instanceof BaseAnimation) - { - key = key.key; - } - - if (this.nextAnim === null) - { - this.nextAnim = key; - } - else - { - this.nextAnimsQueue.push(key); - } - - return this.parent; - }, - - /** - * Sets the amount of time, in milliseconds, that the animation will be delayed before starting playback. - * - * @method Phaser.GameObjects.Components.Animation#setDelay - * @since 3.4.0 - * - * @param {integer} [value=0] - The amount of time, in milliseconds, to wait before starting playback. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - setDelay: function (value) - { - if (value === undefined) { value = 0; } - - this._delay = value; - - return this.parent; - }, - - /** - * Gets the amount of time, in milliseconds that the animation will be delayed before starting playback. - * - * @method Phaser.GameObjects.Components.Animation#getDelay - * @since 3.4.0 - * - * @return {integer} The amount of time, in milliseconds, the Animation will wait before starting playback. - */ - getDelay: function () - { - return this._delay; - }, - - /** - * Waits for the specified delay, in milliseconds, then starts playback of the requested animation. - * - * @method Phaser.GameObjects.Components.Animation#delayedPlay - * @since 3.0.0 - * - * @param {integer} delay - The delay, in milliseconds, to wait before starting the animation playing. - * @param {string} key - The key of the animation to play. - * @param {integer} [startFrame=0] - The frame of the animation to start from. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - delayedPlay: function (delay, key, startFrame) - { - this.play(key, true, startFrame); - - this.nextTick += delay; - - return this.parent; - }, - - /** - * Returns the key of the animation currently loaded into this component. - * - * @method Phaser.GameObjects.Components.Animation#getCurrentKey - * @since 3.0.0 - * - * @return {string} The key of the Animation loaded into this component. - */ - getCurrentKey: function () - { - if (this.currentAnim) - { - return this.currentAnim.key; - } - }, - - /** - * Internal method used to load an animation into this component. - * - * @method Phaser.GameObjects.Components.Animation#load - * @protected - * @since 3.0.0 - * - * @param {string} key - The key of the animation to load. - * @param {integer} [startFrame=0] - The start frame of the animation to load. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - load: function (key, startFrame) - { - if (startFrame === undefined) { startFrame = 0; } - - if (this.isPlaying) - { - this.stop(); - } - - // Load the new animation in - this.animationManager.load(this, key, startFrame); - - return this.parent; - }, - - /** - * Pause the current animation and set the `isPlaying` property to `false`. - * You can optionally pause it at a specific frame. - * - * @method Phaser.GameObjects.Components.Animation#pause - * @since 3.0.0 - * - * @param {Phaser.Animations.AnimationFrame} [atFrame] - An optional frame to set after pausing the animation. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - pause: function (atFrame) - { - if (!this._paused) - { - this._paused = true; - this._wasPlaying = this.isPlaying; - this.isPlaying = false; - } - - if (atFrame !== undefined) - { - this.updateFrame(atFrame); - } - - return this.parent; - }, - - /** - * Resumes playback of a paused animation and sets the `isPlaying` property to `true`. - * You can optionally tell it to start playback from a specific frame. - * - * @method Phaser.GameObjects.Components.Animation#resume - * @since 3.0.0 - * - * @param {Phaser.Animations.AnimationFrame} [fromFrame] - An optional frame to set before restarting playback. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - resume: function (fromFrame) - { - if (this._paused) - { - this._paused = false; - this.isPlaying = this._wasPlaying; - } - - if (fromFrame !== undefined) - { - this.updateFrame(fromFrame); - } - - return this.parent; - }, - - /** - * `true` if the current animation is paused, otherwise `false`. - * - * @name Phaser.GameObjects.Components.Animation#isPaused - * @readonly - * @type {boolean} - * @since 3.4.0 - */ - isPaused: { - - get: function () - { - return this._paused; - } - - }, - - /** - * Plays an Animation on a Game Object that has the Animation component, such as a Sprite. - * - * Animations are stored in the global Animation Manager and are referenced by a unique string-based key. - * - * @method Phaser.GameObjects.Components.Animation#play - * @fires Phaser.GameObjects.Components.Animation#onStartEvent - * @since 3.0.0 - * - * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance. - * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call. - * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - play: function (key, ignoreIfPlaying, startFrame) - { - if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } - if (startFrame === undefined) { startFrame = 0; } - - if (key instanceof BaseAnimation) - { - key = key.key; - } - - if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key) - { - return this.parent; - } - - this.forward = true; - this._reverse = false; - this._paused = false; - this._wasPlaying = true; - - return this._startAnimation(key, startFrame); - }, - - /** - * Plays an Animation (in reverse mode) on the Game Object that owns this Animation Component. - * - * @method Phaser.GameObjects.Components.Animation#playReverse - * @fires Phaser.GameObjects.Components.Animation#onStartEvent - * @since 3.12.0 - * - * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance. - * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. - * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - playReverse: function (key, ignoreIfPlaying, startFrame) - { - if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } - if (startFrame === undefined) { startFrame = 0; } - - if (key instanceof BaseAnimation) - { - key = key.key; - } - - if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key) - { - return this.parent; - } - - this.forward = false; - this._reverse = true; - - return this._startAnimation(key, startFrame); - }, - - /** - * Load an Animation and fires 'onStartEvent' event, extracted from 'play' method. - * - * @method Phaser.GameObjects.Components.Animation#_startAnimation - * @fires Phaser.Animations.Events#ANIMATION_START - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START - * @since 3.12.0 - * - * @param {string} key - The string-based key of the animation to play, as defined previously in the Animation Manager. - * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - _startAnimation: function (key, startFrame) - { - this.load(key, startFrame); - - var anim = this.currentAnim; - var gameObject = this.parent; - - if (!anim) - { - return gameObject; - } - - // Should give us 9,007,199,254,740,991 safe repeats - this.repeatCounter = (this._repeat === -1) ? Number.MAX_VALUE : this._repeat; - - anim.getFirstTick(this); - - this.isPlaying = true; - this.pendingRepeat = false; - - if (anim.showOnStart) - { - gameObject.visible = true; - } - - var frame = this.currentFrame; - - anim.emit(Events.ANIMATION_START, anim, frame, gameObject); - - gameObject.emit(Events.SPRITE_ANIMATION_KEY_START + key, anim, frame, gameObject); - - gameObject.emit(Events.SPRITE_ANIMATION_START, anim, frame, gameObject); - - return gameObject; - }, - - /** - * Reverse the Animation that is already playing on the Game Object. - * - * @method Phaser.GameObjects.Components.Animation#reverse - * @since 3.12.0 - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - reverse: function () - { - if (this.isPlaying) - { - this._reverse = !this._reverse; - - this.forward = !this.forward; - } - - return this.parent; - }, - - /** - * Returns a value between 0 and 1 indicating how far this animation is through, ignoring repeats and yoyos. - * If the animation has a non-zero repeat defined, `getProgress` and `getTotalProgress` will be different - * because `getProgress` doesn't include any repeats or repeat delays, whereas `getTotalProgress` does. - * - * @method Phaser.GameObjects.Components.Animation#getProgress - * @since 3.4.0 - * - * @return {number} The progress of the current animation, between 0 and 1. - */ - getProgress: function () - { - var p = this.currentFrame.progress; - - if (!this.forward) - { - p = 1 - p; - } - - return p; - }, - - /** - * Takes a value between 0 and 1 and uses it to set how far this animation is through playback. - * Does not factor in repeats or yoyos, but does handle playing forwards or backwards. - * - * @method Phaser.GameObjects.Components.Animation#setProgress - * @since 3.4.0 - * - * @param {number} [value=0] - The progress value, between 0 and 1. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - setProgress: function (value) - { - if (!this.forward) - { - value = 1 - value; - } - - this.setCurrentFrame(this.currentAnim.getFrameByProgress(value)); - - return this.parent; - }, - - /** - * Handle the removal of an animation from the Animation Manager. - * - * @method Phaser.GameObjects.Components.Animation#remove - * @since 3.0.0 - * - * @param {string} [key] - The key of the removed Animation. - * @param {Phaser.Animations.Animation} [animation] - The removed Animation. - */ - remove: function (key, animation) - { - if (animation === undefined) { animation = this.currentAnim; } - - if (this.isPlaying && animation.key === this.currentAnim.key) - { - this.stop(); - - this.setCurrentFrame(this.currentAnim.frames[0]); - } - }, - - /** - * Gets the number of times that the animation will repeat - * after its first iteration. For example, if returns 1, the animation will - * play a total of twice (the initial play plus 1 repeat). - * A value of -1 means the animation will repeat indefinitely. - * - * @method Phaser.GameObjects.Components.Animation#getRepeat - * @since 3.4.0 - * - * @return {integer} The number of times that the animation will repeat. - */ - getRepeat: function () - { - return this._repeat; - }, - - /** - * Sets the number of times that the animation should repeat - * after its first iteration. For example, if repeat is 1, the animation will - * play a total of twice (the initial play plus 1 repeat). - * To repeat indefinitely, use -1. repeat should always be an integer. - * - * @method Phaser.GameObjects.Components.Animation#setRepeat - * @since 3.4.0 - * - * @param {integer} value - The number of times that the animation should repeat. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - setRepeat: function (value) - { - this._repeat = value; - - this.repeatCounter = (value === -1) ? Number.MAX_VALUE : value; - - return this.parent; - }, - - /** - * Gets the amount of delay between repeats, if any. - * - * @method Phaser.GameObjects.Components.Animation#getRepeatDelay - * @since 3.4.0 - * - * @return {number} The delay between repeats. - */ - getRepeatDelay: function () - { - return this._repeatDelay; - }, - - /** - * Sets the amount of time in seconds between repeats. - * For example, if `repeat` is 2 and `repeatDelay` is 10, the animation will play initially, - * then wait for 10 seconds before repeating, then play again, then wait another 10 seconds - * before doing its final repeat. - * - * @method Phaser.GameObjects.Components.Animation#setRepeatDelay - * @since 3.4.0 - * - * @param {number} value - The delay to wait between repeats, in seconds. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - setRepeatDelay: function (value) - { - this._repeatDelay = value; - - return this.parent; - }, - - /** - * Restarts the current animation from its beginning, optionally including its delay value. - * - * @method Phaser.GameObjects.Components.Animation#restart - * @fires Phaser.Animations.Events#ANIMATION_RESTART - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_RESTART - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART - * @since 3.0.0 - * - * @param {boolean} [includeDelay=false] - Whether to include the delay value of the animation when restarting. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - restart: function (includeDelay) - { - if (includeDelay === undefined) { includeDelay = false; } - - var anim = this.currentAnim; - - anim.getFirstTick(this, includeDelay); - - this.forward = true; - this.isPlaying = true; - this.pendingRepeat = false; - this._paused = false; - - // Set frame - this.updateFrame(anim.frames[0]); - - var gameObject = this.parent; - var frame = this.currentFrame; - - anim.emit(Events.ANIMATION_RESTART, anim, frame, gameObject); - - gameObject.emit(Events.SPRITE_ANIMATION_KEY_RESTART + anim.key, anim, frame, gameObject); - - gameObject.emit(Events.SPRITE_ANIMATION_RESTART, anim, frame, gameObject); - - return this.parent; - }, - - /** - * Immediately stops the current animation from playing and dispatches the `animationcomplete` event. - * - * If no animation is set, no event will be dispatched. - * - * If there is another animation queued (via the `chain` method) then it will start playing immediately. - * - * @method Phaser.GameObjects.Components.Animation#stop - * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent - * @since 3.0.0 - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - stop: function () - { - this._pendingStop = 0; - - this.isPlaying = false; - - var gameObject = this.parent; - var anim = this.currentAnim; - var frame = this.currentFrame; - - if (anim) - { - anim.emit(Events.ANIMATION_COMPLETE, anim, frame, gameObject); - - gameObject.emit(Events.SPRITE_ANIMATION_KEY_COMPLETE + anim.key, anim, frame, gameObject); - - gameObject.emit(Events.SPRITE_ANIMATION_COMPLETE, anim, frame, gameObject); - } - - if (this.nextAnim) - { - var key = this.nextAnim; - - this.nextAnim = (this.nextAnimsQueue.length > 0) ? this.nextAnimsQueue.shift() : null; - - this.play(key); - } - - return gameObject; - }, - - /** - * Stops the current animation from playing after the specified time delay, given in milliseconds. - * - * @method Phaser.GameObjects.Components.Animation#stopAfterDelay - * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent - * @since 3.4.0 - * - * @param {integer} delay - The number of milliseconds to wait before stopping this animation. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - stopAfterDelay: function (delay) - { - this._pendingStop = 1; - this._pendingStopValue = delay; - - return this.parent; - }, - - /** - * Stops the current animation from playing when it next repeats. - * - * @method Phaser.GameObjects.Components.Animation#stopOnRepeat - * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent - * @since 3.4.0 - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - stopOnRepeat: function () - { - this._pendingStop = 2; - - return this.parent; - }, - - /** - * Stops the current animation from playing when it next sets the given frame. - * If this frame doesn't exist within the animation it will not stop it from playing. - * - * @method Phaser.GameObjects.Components.Animation#stopOnFrame - * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent - * @since 3.4.0 - * - * @param {Phaser.Animations.AnimationFrame} frame - The frame to check before stopping this animation. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - stopOnFrame: function (frame) - { - this._pendingStop = 3; - this._pendingStopValue = frame; - - return this.parent; - }, - - /** - * Sets the Time Scale factor, allowing you to make the animation go go faster or slower than default. - * Where 1 = normal speed (the default), 0.5 = half speed, 2 = double speed, etc. - * - * @method Phaser.GameObjects.Components.Animation#setTimeScale - * @since 3.4.0 - * - * @param {number} [value=1] - The time scale factor, where 1 is no change, 0.5 is half speed, etc. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - setTimeScale: function (value) - { - if (value === undefined) { value = 1; } - - this._timeScale = value; - - return this.parent; - }, - - /** - * Gets the Time Scale factor. - * - * @method Phaser.GameObjects.Components.Animation#getTimeScale - * @since 3.4.0 - * - * @return {number} The Time Scale value. - */ - getTimeScale: function () - { - return this._timeScale; - }, - - /** - * Returns the total number of frames in this animation. - * - * @method Phaser.GameObjects.Components.Animation#getTotalFrames - * @since 3.4.0 - * - * @return {integer} The total number of frames in this animation. - */ - getTotalFrames: function () - { - return this.currentAnim.frames.length; - }, - - /** - * The internal update loop for the Animation Component. - * - * @method Phaser.GameObjects.Components.Animation#update - * @since 3.0.0 - * - * @param {number} time - The current timestamp. - * @param {number} delta - The delta time, in ms, elapsed since the last frame. - */ - update: function (time, delta) - { - if (!this.currentAnim || !this.isPlaying || this.currentAnim.paused) - { - return; - } - - this.accumulator += delta * this._timeScale; - - if (this._pendingStop === 1) - { - this._pendingStopValue -= delta; - - if (this._pendingStopValue <= 0) - { - return this.currentAnim.completeAnimation(this); - } - } - - if (this.accumulator >= this.nextTick) - { - this.currentAnim.setFrame(this); - } - }, - - /** - * Sets the given Animation Frame as being the current frame - * and applies it to the parent Game Object, adjusting its size and origin as needed. - * - * @method Phaser.GameObjects.Components.Animation#setCurrentFrame - * @since 3.4.0 - * - * @param {Phaser.Animations.AnimationFrame} animationFrame - The Animation Frame to set as being current. - * - * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. - */ - setCurrentFrame: function (animationFrame) - { - var gameObject = this.parent; - - this.currentFrame = animationFrame; - - gameObject.texture = animationFrame.frame.texture; - gameObject.frame = animationFrame.frame; - - if (gameObject.isCropped) - { - gameObject.frame.updateCropUVs(gameObject._crop, gameObject.flipX, gameObject.flipY); - } - - gameObject.setSizeToFrame(); - - if (gameObject._originComponent) - { - if (animationFrame.frame.customPivot) - { - gameObject.setOrigin(animationFrame.frame.pivotX, animationFrame.frame.pivotY); - } - else - { - gameObject.updateDisplayOrigin(); - } - } - - return gameObject; - }, - - /** - * Internal frame change handler. - * - * @method Phaser.GameObjects.Components.Animation#updateFrame - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE - * @private - * @since 3.0.0 - * - * @param {Phaser.Animations.AnimationFrame} animationFrame - The animation frame to change to. - */ - updateFrame: function (animationFrame) - { - var gameObject = this.setCurrentFrame(animationFrame); - - if (this.isPlaying) - { - if (animationFrame.setAlpha) - { - gameObject.alpha = animationFrame.alpha; - } - - var anim = this.currentAnim; - - gameObject.emit(Events.SPRITE_ANIMATION_KEY_UPDATE + anim.key, anim, animationFrame, gameObject); - - gameObject.emit(Events.SPRITE_ANIMATION_UPDATE, anim, animationFrame, gameObject); - - if (this._pendingStop === 3 && this._pendingStopValue === animationFrame) - { - this.currentAnim.completeAnimation(this); - } - } - }, - - /** - * Advances the animation to the next frame, regardless of the time or animation state. - * If the animation is set to repeat, or yoyo, this will still take effect. - * - * Calling this does not change the direction of the animation. I.e. if it was currently - * playing in reverse, calling this method doesn't then change the direction to forwards. - * - * @method Phaser.GameObjects.Components.Animation#nextFrame - * @since 3.16.0 - * - * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. - */ - nextFrame: function () - { - if (this.currentAnim) - { - this.currentAnim.nextFrame(this); - } - - return this.parent; - }, - - /** - * Advances the animation to the previous frame, regardless of the time or animation state. - * If the animation is set to repeat, or yoyo, this will still take effect. - * - * Calling this does not change the direction of the animation. I.e. if it was currently - * playing in forwards, calling this method doesn't then change the direction to backwards. - * - * @method Phaser.GameObjects.Components.Animation#previousFrame - * @since 3.16.0 - * - * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. - */ - previousFrame: function () - { - if (this.currentAnim) - { - this.currentAnim.previousFrame(this); - } - - return this.parent; - }, - - /** - * Sets if the current Animation will yoyo when it reaches the end. - * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again. - * - * @method Phaser.GameObjects.Components.Animation#setYoyo - * @since 3.4.0 - * - * @param {boolean} [value=false] - `true` if the animation should yoyo, `false` to not. - * - * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. - */ - setYoyo: function (value) - { - if (value === undefined) { value = false; } - - this._yoyo = value; - - return this.parent; - }, - - /** - * Gets if the current Animation will yoyo when it reaches the end. - * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again. - * - * @method Phaser.GameObjects.Components.Animation#getYoyo - * @since 3.4.0 - * - * @return {boolean} `true` if the animation is set to yoyo, `false` if not. - */ - getYoyo: function () - { - return this._yoyo; - }, - - /** - * Destroy this Animation component. - * - * Unregisters event listeners and cleans up its references. - * - * @method Phaser.GameObjects.Components.Animation#destroy - * @since 3.0.0 - */ - destroy: function () - { - this.animationManager.off(Events.REMOVE_ANIMATION, this.remove, this); - - this.animationManager = null; - this.parent = null; - this.nextAnimsQueue.length = 0; - - this.currentAnim = null; - this.currentFrame = null; - } - -}); - -module.exports = Animation; - - -/***/ }), -/* 508 */ +/* 531 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -114273,13 +119246,13 @@ module.exports = Animation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CanvasSnapshot = __webpack_require__(509); -var CameraEvents = __webpack_require__(41); +var CanvasSnapshot = __webpack_require__(532); +var CameraEvents = __webpack_require__(42); var Class = __webpack_require__(0); -var CONST = __webpack_require__(33); -var GetBlendModes = __webpack_require__(510); +var CONST = __webpack_require__(34); +var GetBlendModes = __webpack_require__(533); var ScaleEvents = __webpack_require__(93); -var TransformMatrix = __webpack_require__(30); +var TransformMatrix = __webpack_require__(31); /** * @classdesc @@ -115070,7 +120043,7 @@ module.exports = CanvasRenderer; /***/ }), -/* 509 */ +/* 532 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115080,7 +120053,7 @@ module.exports = CanvasRenderer; */ var CanvasPool = __webpack_require__(26); -var Color = __webpack_require__(31); +var Color = __webpack_require__(32); var GetFastValue = __webpack_require__(2); /** @@ -115163,7 +120136,7 @@ module.exports = CanvasSnapshot; /***/ }), -/* 510 */ +/* 533 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115172,8 +120145,8 @@ module.exports = CanvasSnapshot; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var modes = __webpack_require__(53); -var CanvasFeatures = __webpack_require__(320); +var modes = __webpack_require__(54); +var CanvasFeatures = __webpack_require__(328); /** * Returns an array which maps the default blend modes to supported Canvas blend modes. @@ -115227,7 +120200,7 @@ module.exports = GetBlendModes; /***/ }), -/* 511 */ +/* 534 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115238,26 +120211,26 @@ module.exports = GetBlendModes; */ var BaseCamera = __webpack_require__(92); -var CameraEvents = __webpack_require__(41); +var CameraEvents = __webpack_require__(42); var Class = __webpack_require__(0); -var CONST = __webpack_require__(33); -var GameEvents = __webpack_require__(20); -var IsSizePowerOfTwo = __webpack_require__(125); +var CONST = __webpack_require__(34); +var GameEvents = __webpack_require__(21); +var IsSizePowerOfTwo = __webpack_require__(127); var NOOP = __webpack_require__(1); -var ProjectOrtho = __webpack_require__(181); +var ProjectOrtho = __webpack_require__(183); var ScaleEvents = __webpack_require__(93); -var SpliceOne = __webpack_require__(81); -var TextureEvents = __webpack_require__(127); -var TransformMatrix = __webpack_require__(30); +var SpliceOne = __webpack_require__(82); +var TextureEvents = __webpack_require__(129); +var TransformMatrix = __webpack_require__(31); var Utils = __webpack_require__(10); -var WebGLSnapshot = __webpack_require__(512); +var WebGLSnapshot = __webpack_require__(535); // Default Pipelines -var BitmapMaskPipeline = __webpack_require__(513); -var LightPipeline = __webpack_require__(514); -var MultiPipeline = __webpack_require__(109); -var RopePipeline = __webpack_require__(515); -var SinglePipeline = __webpack_require__(516); +var BitmapMaskPipeline = __webpack_require__(536); +var LightPipeline = __webpack_require__(537); +var MultiPipeline = __webpack_require__(110); +var RopePipeline = __webpack_require__(538); +var SinglePipeline = __webpack_require__(539); /** * @callback WebGLContextCallback @@ -115506,7 +120479,7 @@ var WebGLRenderer = new Class({ this.normalTexture; /** - * Current framebuffer in use + * Current framebuffer in use. * * @name Phaser.Renderer.WebGL.WebGLRenderer#currentFramebuffer * @type {WebGLFramebuffer} @@ -115516,7 +120489,7 @@ var WebGLRenderer = new Class({ this.currentFramebuffer = null; /** - * Current WebGLPipeline in use + * Current WebGLPipeline in use. * * @name Phaser.Renderer.WebGL.WebGLRenderer#currentPipeline * @type {Phaser.Renderer.WebGL.WebGLPipeline} @@ -115526,7 +120499,18 @@ var WebGLRenderer = new Class({ this.currentPipeline = null; /** - * Current WebGLProgram in use + * The previous WebGLPipeline in use. + * This is set when `clearPipeline` is called and restored in `rebindPipeline` if none is given. + * + * @name Phaser.Renderer.WebGL.WebGLRenderer#previousPipeline + * @type {Phaser.Renderer.WebGL.WebGLPipeline} + * @default null + * @since 3.50.0 + */ + this.previousPipeline = null; + + /** + * Current WebGLProgram in use. * * @name Phaser.Renderer.WebGL.WebGLRenderer#currentProgram * @type {WebGLProgram} @@ -115811,6 +120795,15 @@ var WebGLRenderer = new Class({ */ this.nextTypeMatch = false; + /** + * Is the Game Object being currently rendered the final one in the list? + * + * @name Phaser.Renderer.WebGL.WebGLRenderer#finalType + * @type {boolean} + * @since 3.50.0 + */ + this.finalType = false; + /** * The mipmap magFilter to be used when creating textures. * @@ -116429,10 +121422,20 @@ var WebGLRenderer = new Class({ * @method Phaser.Renderer.WebGL.WebGLRenderer#rebindPipeline * @since 3.16.0 * - * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipelineInstance - The pipeline instance to be activated. + * @param {Phaser.Renderer.WebGL.WebGLPipeline} [pipelineInstance] - The pipeline instance to be activated. */ rebindPipeline: function (pipelineInstance) { + if (pipelineInstance === undefined && this.previousPipeline) + { + pipelineInstance = this.previousPipeline; + } + + if (!pipelineInstance) + { + return; + } + var gl = this.gl; gl.disable(gl.DEPTH_TEST); @@ -116451,15 +121454,16 @@ var WebGLRenderer = new Class({ gl.viewport(0, 0, this.width, this.height); + this.currentProgram = null; + this.currentVertexBuffer = null; + this.currentIndexBuffer = null; + this.setBlendMode(0, true); - this.resetTextures(true); - - this.currentActiveTexture = 1; - this.startActiveTexture++; + this.resetTextures(); this.currentPipeline = pipelineInstance; - this.currentPipeline.bind(); + this.currentPipeline.bind(true); this.currentPipeline.onBind(); }, @@ -116476,6 +121480,8 @@ var WebGLRenderer = new Class({ { this.flush(); + this.previousPipeline = this.currentPipeline; + this.currentPipeline = null; this.currentProgram = null; this.currentVertexBuffer = null; @@ -117548,8 +122554,8 @@ var WebGLRenderer = new Class({ camera.width, camera.height, camera.x, camera.y, camera.width, camera.height, - camera.zoom, camera.zoom, - camera.rotation, + 1, 1, + 0, camera.flipX, !camera.flipY, 1, 1, 0, 0, @@ -117681,6 +122687,8 @@ var WebGLRenderer = new Class({ for (var i = 0; i < childCount; i++) { + this.finalType = (i === childCount - 1); + var child = list[i]; if (!child.willRender(camera)) @@ -118032,6 +123040,7 @@ var WebGLRenderer = new Class({ gl.bindTexture(gl.TEXTURE_2D, dstTexture); gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, flipY); + gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true); gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, srcCanvas); @@ -118640,7 +123649,7 @@ module.exports = WebGLRenderer; /***/ }), -/* 512 */ +/* 535 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -118650,7 +123659,7 @@ module.exports = WebGLRenderer; */ var CanvasPool = __webpack_require__(26); -var Color = __webpack_require__(31); +var Color = __webpack_require__(32); var GetFastValue = __webpack_require__(2); /** @@ -118750,7 +123759,7 @@ module.exports = WebGLSnapshot; /***/ }), -/* 513 */ +/* 536 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -118762,17 +123771,30 @@ module.exports = WebGLSnapshot; var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(2); -var ShaderSourceFS = __webpack_require__(790); -var ShaderSourceVS = __webpack_require__(791); -var WebGLPipeline = __webpack_require__(108); +var ShaderSourceFS = __webpack_require__(808); +var ShaderSourceVS = __webpack_require__(809); +var WebGLPipeline = __webpack_require__(109); /** * @classdesc * + * The Bitmap Mask Pipeline handles all of the bitmap mask rendering in WebGL for applying + * alpha masks to Game Objects. It works by sampling two texture on the fragment shader and + * using the fragments alpha to clip the region. * + * The fragment shader it uses can be found in `shaders/src/BitmapMask.frag`. + * The vertex shader it uses can be found in `shaders/src/BitmapMask.vert`. * - * BitmapMaskPipeline handles all bitmap masking rendering in WebGL. It works by using - * sampling two texture on the fragment shader and using the fragment's alpha to clip the region. + * The default shader attributes for this pipeline are: + * + * `inPosition` (vec2, offset 0) + * + * The default shader uniforms for this pipeline are: + * + * `uResolution` (vec2) + * `uMainSampler` (sampler2D) + * `uMaskSampler` (sampler2D) + * `uInvertMaskAlpha` (bool) * * @class BitmapMaskPipeline * @extends Phaser.Renderer.WebGL.WebGLPipeline @@ -118808,55 +123830,8 @@ var BitmapMaskPipeline = new Class({ ]); WebGLPipeline.call(this, config); - - /** - * Float32 view of the array buffer containing the pipeline's vertices. - * - * @name Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#vertexViewF32 - * @type {Float32Array} - * @since 3.0.0 - */ - // this.vertexViewF32 = new Float32Array(this.vertexData); - - /** - * Dirty flag to check if resolution properties need to be updated on the - * masking shader. - * - * @name Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#resolutionDirty - * @type {boolean} - * @default true - * @since 3.0.0 - */ - // this.resolutionDirty = true; }, - /** - * Called every time the pipeline needs to be used. - * It binds all necessary resources. - * - * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#onBind - * @since 3.0.0 - * - * @return {this} This WebGLPipeline instance. - onBind: function () - { - WebGLPipeline.prototype.onBind.call(this); - - var renderer = this.renderer; - var program = this.program; - - if (this.resolutionDirty) - { - renderer.setFloat2(program, 'uResolution', this.width, this.height); - renderer.setInt1(program, 'uMainSampler', 0); - renderer.setInt1(program, 'uMaskSampler', 1); - this.resolutionDirty = false; - } - - return this; - }, - */ - /** * Called every time the pipeline is bound by the renderer. * Sets the shader program, vertex buffer and other resources. @@ -118865,11 +123840,15 @@ var BitmapMaskPipeline = new Class({ * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#bind * @since 3.50.0 * + * @param {boolean} [reset=false] - Should the pipeline be fully re-bound after a renderer pipeline clear? + * * @return {this} This WebGLPipeline instance. */ - bind: function () + bind: function (reset) { - WebGLPipeline.prototype.bind.call(this); + if (reset === undefined) { reset = false; } + + WebGLPipeline.prototype.bind.call(this, reset); var renderer = this.renderer; var program = this.program; @@ -118881,27 +123860,6 @@ var BitmapMaskPipeline = new Class({ return this; }, - /** - * Resizes this pipeline and updates the projection. - * - * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#resize - * @since 3.0.0 - * - * @param {number} width - The new width. - * @param {number} height - The new height. - * @param {number} resolution - The resolution. - * - * @return {this} This WebGLPipeline instance. - */ - resize: function (width, height, resolution) - { - WebGLPipeline.prototype.resize.call(this, width, height, resolution); - - this.resolutionDirty = true; - - return this; - }, - /** * Binds necessary resources and renders the mask to a separated framebuffer. * The framebuffer for the masked object is also bound for further use. @@ -119016,7 +123974,7 @@ module.exports = BitmapMaskPipeline; /***/ }), -/* 514 */ +/* 537 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119028,9 +123986,9 @@ module.exports = BitmapMaskPipeline; var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(2); -var ShaderSourceFS = __webpack_require__(792); -var MultiPipeline = __webpack_require__(109); -var WebGLPipeline = __webpack_require__(108); +var ShaderSourceFS = __webpack_require__(810); +var MultiPipeline = __webpack_require__(110); +var WebGLPipeline = __webpack_require__(109); var LIGHT_COUNT = 10; @@ -119170,11 +124128,15 @@ var LightPipeline = new Class({ * @method Phaser.Renderer.WebGL.Pipelines.LightPipeline#bind * @since 3.50.0 * + * @param {boolean} [reset=false] - Should the pipeline be fully re-bound after a renderer pipeline clear? + * * @return {this} This WebGLPipeline instance. */ - bind: function () + bind: function (reset) { - WebGLPipeline.prototype.bind.call(this); + if (reset === undefined) { reset = false; } + + WebGLPipeline.prototype.bind.call(this, reset); var renderer = this.renderer; var program = this.program; @@ -119435,7 +124397,7 @@ module.exports = LightPipeline; /***/ }), -/* 515 */ +/* 538 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119445,8 +124407,8 @@ module.exports = LightPipeline; */ var Class = __webpack_require__(0); -var ModelViewProjection = __webpack_require__(110); -var MultiPipeline = __webpack_require__(109); +var ModelViewProjection = __webpack_require__(111); +var MultiPipeline = __webpack_require__(110); /** * @classdesc @@ -119507,7 +124469,7 @@ module.exports = RopePipeline; /***/ }), -/* 516 */ +/* 539 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119518,11 +124480,11 @@ module.exports = RopePipeline; var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(2); -var ModelViewProjection = __webpack_require__(110); -var MultiPipeline = __webpack_require__(109); -var ShaderSourceFS = __webpack_require__(795); -var ShaderSourceVS = __webpack_require__(796); -var WebGLPipeline = __webpack_require__(108); +var ModelViewProjection = __webpack_require__(111); +var MultiPipeline = __webpack_require__(110); +var ShaderSourceFS = __webpack_require__(813); +var ShaderSourceVS = __webpack_require__(814); +var WebGLPipeline = __webpack_require__(109); /** * @classdesc @@ -119820,11 +124782,15 @@ var SinglePipeline = new Class({ * @method Phaser.Renderer.WebGL.Pipelines.SinglePipeline#bind * @since 3.50.0 * + * @param {boolean} [reset=false] - Should the pipeline be fully re-bound after a renderer pipeline clear? + * * @return {this} This WebGLPipeline instance. */ - bind: function () + bind: function (reset) { - WebGLPipeline.prototype.bind.call(this); + if (reset === undefined) { reset = false; } + + WebGLPipeline.prototype.bind.call(this, reset); return this; } @@ -119835,51 +124801,25 @@ module.exports = SinglePipeline; /***/ }), -/* 517 */, -/* 518 */, -/* 519 */, -/* 520 */, -/* 521 */ -/***/ (function(module, exports) { - -var g; - -// This works in non-strict mode -g = (function() { - return this; -})(); - -try { - // This works if eval is allowed (see CSP) - g = g || new Function("return this")(); -} catch (e) { - // This works if the window reference is available - if (typeof window === "object") g = window; -} - -// g can still be undefined, but nothing to do about it... -// We return undefined, instead of nothing here, so it's -// easier to handle this case. if(!global) { ...} - -module.exports = g; - - -/***/ }), -/* 522 */ +/* 540 */, +/* 541 */, +/* 542 */, +/* 543 */, +/* 544 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(523); -__webpack_require__(524); -__webpack_require__(525); -__webpack_require__(526); -__webpack_require__(527); -__webpack_require__(528); -__webpack_require__(529); -__webpack_require__(530); +__webpack_require__(545); +__webpack_require__(546); +__webpack_require__(547); +__webpack_require__(548); +__webpack_require__(549); +__webpack_require__(550); +__webpack_require__(551); +__webpack_require__(552); /***/ }), -/* 523 */ +/* 545 */ /***/ (function(module, exports) { /** @@ -119919,7 +124859,7 @@ if (!Array.prototype.forEach) /***/ }), -/* 524 */ +/* 546 */ /***/ (function(module, exports) { /** @@ -119935,7 +124875,7 @@ if (!Array.isArray) /***/ }), -/* 525 */ +/* 547 */ /***/ (function(module, exports) { /* Copyright 2013 Chris Wilson @@ -120122,7 +125062,7 @@ BiquadFilterNode.type and OscillatorNode.type. /***/ }), -/* 526 */ +/* 548 */ /***/ (function(module, exports) { /** @@ -120137,7 +125077,7 @@ if (!window.console) /***/ }), -/* 527 */ +/* 549 */ /***/ (function(module, exports) { // ES6 Math.trunc - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc @@ -120149,7 +125089,7 @@ if (!Math.trunc) { /***/ }), -/* 528 */ +/* 550 */ /***/ (function(module, exports) { /** @@ -120186,7 +125126,7 @@ if (!Math.trunc) { /***/ }), -/* 529 */ +/* 551 */ /***/ (function(module, exports) { // References: @@ -120243,7 +125183,7 @@ if (!window.cancelAnimationFrame) /***/ }), -/* 530 */ +/* 552 */ /***/ (function(module, exports) { /** @@ -120296,7 +125236,7 @@ if (typeof window.Uint32Array !== 'function' && typeof window.Uint32Array !== 'o /***/ }), -/* 531 */ +/* 553 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120305,7 +125245,7 @@ if (typeof window.Uint32Array !== 'function' && typeof window.Uint32Array !== 'o * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var QuickSet = __webpack_require__(246); +var QuickSet = __webpack_require__(252); /** * Takes an array of Game Objects, or any objects that have public `x` and `y` properties, and aligns them next to each other. @@ -120344,7 +125284,7 @@ module.exports = AlignTo; /***/ }), -/* 532 */ +/* 554 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120353,7 +125293,7 @@ module.exports = AlignTo; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PropertyValueInc = __webpack_require__(38); +var PropertyValueInc = __webpack_require__(39); /** * Takes an array of Game Objects, or any objects that have a public `angle` property, @@ -120385,7 +125325,7 @@ module.exports = Angle; /***/ }), -/* 533 */ +/* 555 */ /***/ (function(module, exports) { /** @@ -120424,7 +125364,7 @@ module.exports = Call; /***/ }), -/* 534 */ +/* 556 */ /***/ (function(module, exports) { /** @@ -120482,7 +125422,7 @@ module.exports = GetFirst; /***/ }), -/* 535 */ +/* 557 */ /***/ (function(module, exports) { /** @@ -120540,7 +125480,7 @@ module.exports = GetLast; /***/ }), -/* 536 */ +/* 558 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120549,11 +125489,11 @@ module.exports = GetLast; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AlignIn = __webpack_require__(259); -var CONST = __webpack_require__(106); +var AlignIn = __webpack_require__(265); +var CONST = __webpack_require__(107); var GetFastValue = __webpack_require__(2); var NOOP = __webpack_require__(1); -var Zone = __webpack_require__(114); +var Zone = __webpack_require__(115); var tempZone = new Zone({ sys: { queueDepthSort: NOOP, events: { once: NOOP } } }, 0, 0, 1, 1); @@ -120610,6 +125550,26 @@ var GridAlign = function (items, options) // We keep laying them out vertically until we've done them all tempZone.y += cellHeight; } + else if (heightSet && !widthSet) + { + // We keep laying them out until we hit the column limit + cy += cellHeight; + tempZone.y += cellHeight; + + if (cy === h) + { + cy = 0; + cx += cellWidth; + tempZone.y = y; + tempZone.x += cellWidth; + + if (cx === w) + { + // We've hit the column limit, so return, even if there are items left + break; + } + } + } else { // We keep laying them out until we hit the column limit @@ -120639,7 +125599,7 @@ module.exports = GridAlign; /***/ }), -/* 537 */ +/* 559 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120934,505 +125894,7 @@ module.exports = Alpha; /***/ }), -/* 538 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Add Animation Event. - * - * This event is dispatched when a new animation is added to the global Animation Manager. - * - * This can happen either as a result of an animation instance being added to the Animation Manager, - * or the Animation Manager creating a new animation directly. - * - * @event Phaser.Animations.Events#ADD_ANIMATION - * @since 3.0.0 - * - * @param {string} key - The key of the Animation that was added to the global Animation Manager. - * @param {Phaser.Animations.Animation} animation - An instance of the newly created Animation. - */ -module.exports = 'add'; - - -/***/ }), -/* 539 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Animation Complete Event. - * - * This event is dispatched by an Animation instance when it completes, i.e. finishes playing or is manually stopped. - * - * Be careful with the volume of events this could generate. If a group of Sprites all complete the same - * animation at the same time, this event will invoke its handler for each one of them. - * - * @event Phaser.Animations.Events#ANIMATION_COMPLETE - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed. - */ -module.exports = 'complete'; - - -/***/ }), -/* 540 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Animation Repeat Event. - * - * This event is dispatched when a currently playing animation repeats. - * - * The event is dispatched directly from the Animation object itself. Which means that listeners - * bound to this event will be invoked every time the Animation repeats, for every Game Object that may have it. - * - * @event Phaser.Animations.Events#ANIMATION_REPEAT - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that repeated. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation was on when it repeated. - */ -module.exports = 'repeat'; - - -/***/ }), -/* 541 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Animation Restart Event. - * - * This event is dispatched by an Animation instance when it restarts. - * - * Be careful with the volume of events this could generate. If a group of Sprites all restart the same - * animation at the same time, this event will invoke its handler for each one of them. - * - * @event Phaser.Animations.Events#ANIMATION_RESTART - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that restarted playing. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing. - */ -module.exports = 'restart'; - - -/***/ }), -/* 542 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Animation Start Event. - * - * This event is dispatched by an Animation instance when it starts playing. - * - * Be careful with the volume of events this could generate. If a group of Sprites all play the same - * animation at the same time, this event will invoke its handler for each one of them. - * - * @event Phaser.Animations.Events#ANIMATION_START - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that started playing. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing. - */ -module.exports = 'start'; - - -/***/ }), -/* 543 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Pause All Animations Event. - * - * This event is dispatched when the global Animation Manager is told to pause. - * - * When this happens all current animations will stop updating, although it doesn't necessarily mean - * that the game has paused as well. - * - * @event Phaser.Animations.Events#PAUSE_ALL - * @since 3.0.0 - */ -module.exports = 'pauseall'; - - -/***/ }), -/* 544 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Remove Animation Event. - * - * This event is dispatched when an animation is removed from the global Animation Manager. - * - * @event Phaser.Animations.Events#REMOVE_ANIMATION - * @since 3.0.0 - * - * @param {string} key - The key of the Animation that was removed from the global Animation Manager. - * @param {Phaser.Animations.Animation} animation - An instance of the removed Animation. - */ -module.exports = 'remove'; - - -/***/ }), -/* 545 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Resume All Animations Event. - * - * This event is dispatched when the global Animation Manager resumes, having been previously paused. - * - * When this happens all current animations will continue updating again. - * - * @event Phaser.Animations.Events#RESUME_ALL - * @since 3.0.0 - */ -module.exports = 'resumeall'; - - -/***/ }), -/* 546 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Complete Event. - * - * This event is dispatched by a Sprite when an animation finishes playing on it. - * - * Listen for it on the Sprite using `sprite.on('animationcomplete', listener)` - * - * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_COMPLETE` event. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_COMPLETE - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed. - */ -module.exports = 'animationcomplete'; - - -/***/ }), -/* 547 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Key Complete Event. - * - * This event is dispatched by a Sprite when a specific animation finishes playing on it. - * - * Listen for it on the Sprite using `sprite.on('animationcomplete-key', listener)` where `key` is the key of - * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationcomplete-explode`. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_COMPLETE - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed. - */ -module.exports = 'animationcomplete-'; - - -/***/ }), -/* 548 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Key Repeat Event. - * - * This event is dispatched by a Sprite when a specific animation repeats playing on it. - * - * Listen for it on the Sprite using `sprite.on('animationrepeat-key', listener)` where `key` is the key of - * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrepeat-explode`. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. - * @param {integer} repeatCount - The number of times the Animation has repeated so far. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing. - */ -module.exports = 'animationrepeat-'; - - -/***/ }), -/* 549 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Key Restart Event. - * - * This event is dispatched by a Sprite when a specific animation restarts playing on it. - * - * Listen for it on the Sprite using `sprite.on('animationrestart-key', listener)` where `key` is the key of - * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrestart-explode`. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing. - */ -module.exports = 'animationrestart-'; - - -/***/ }), -/* 550 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Key Start Event. - * - * This event is dispatched by a Sprite when a specific animation starts playing on it. - * - * Listen for it on the Sprite using `sprite.on('animationstart-key', listener)` where `key` is the key of - * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationstart-explode`. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing. - */ -module.exports = 'animationstart-'; - - -/***/ }), -/* 551 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Key Update Event. - * - * This event is dispatched by a Sprite when a specific animation playing on it updates. This happens when the animation changes frame, - * based on the animation frame rate and other factors like `timeScale` and `delay`. - * - * Listen for it on the Sprite using `sprite.on('animationupdate-key', listener)` where `key` is the key of - * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationupdate-explode`. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated. - */ -module.exports = 'animationupdate-'; - - -/***/ }), -/* 552 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Repeat Event. - * - * This event is dispatched by a Sprite when an animation repeats playing on it. - * - * Listen for it on the Sprite using `sprite.on('animationrepeat', listener)` - * - * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_REPEAT` event. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_REPEAT - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. - * @param {integer} repeatCount - The number of times the Animation has repeated so far. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing. - */ -module.exports = 'animationrepeat'; - - -/***/ }), -/* 553 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Restart Event. - * - * This event is dispatched by a Sprite when an animation restarts playing on it. - * - * Listen for it on the Sprite using `sprite.on('animationrestart', listener)` - * - * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_RESTART` event. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_RESTART - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing. - */ -module.exports = 'animationrestart'; - - -/***/ }), -/* 554 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Start Event. - * - * This event is dispatched by a Sprite when an animation starts playing on it. - * - * Listen for it on the Sprite using `sprite.on('animationstart', listener)` - * - * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_START` event. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_START - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing. - */ -module.exports = 'animationstart'; - - -/***/ }), -/* 555 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Update Event. - * - * This event is dispatched by a Sprite when an animation playing on it updates. This happens when the animation changes frame, - * based on the animation frame rate and other factors like `timeScale` and `delay`. - * - * Listen for it on the Sprite using `sprite.on('animationupdate', listener)` - * - * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_UPDATE` event. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated. - */ -module.exports = 'animationupdate'; - - -/***/ }), -/* 556 */ +/* 560 */ /***/ (function(module, exports) { /** @@ -121581,7 +126043,7 @@ module.exports = ComputedSize; /***/ }), -/* 557 */ +/* 561 */ /***/ (function(module, exports) { /** @@ -121706,7 +126168,7 @@ module.exports = Crop; /***/ }), -/* 558 */ +/* 562 */ /***/ (function(module, exports) { /** @@ -121870,7 +126332,7 @@ module.exports = Flip; /***/ }), -/* 559 */ +/* 563 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121880,7 +126342,7 @@ module.exports = Flip; */ var Rectangle = __webpack_require__(9); -var RotateAround = __webpack_require__(280); +var RotateAround = __webpack_require__(284); var Vector2 = __webpack_require__(3); /** @@ -122229,7 +126691,7 @@ module.exports = GetBounds; /***/ }), -/* 560 */ +/* 564 */ /***/ (function(module, exports) { /** @@ -122252,7 +126714,7 @@ module.exports = 'blur'; /***/ }), -/* 561 */ +/* 565 */ /***/ (function(module, exports) { /** @@ -122274,7 +126736,7 @@ module.exports = 'boot'; /***/ }), -/* 562 */ +/* 566 */ /***/ (function(module, exports) { /** @@ -122297,7 +126759,7 @@ module.exports = 'contextlost'; /***/ }), -/* 563 */ +/* 567 */ /***/ (function(module, exports) { /** @@ -122320,7 +126782,7 @@ module.exports = 'contextrestored'; /***/ }), -/* 564 */ +/* 568 */ /***/ (function(module, exports) { /** @@ -122343,7 +126805,7 @@ module.exports = 'destroy'; /***/ }), -/* 565 */ +/* 569 */ /***/ (function(module, exports) { /** @@ -122365,7 +126827,7 @@ module.exports = 'focus'; /***/ }), -/* 566 */ +/* 570 */ /***/ (function(module, exports) { /** @@ -122391,7 +126853,7 @@ module.exports = 'hidden'; /***/ }), -/* 567 */ +/* 571 */ /***/ (function(module, exports) { /** @@ -122412,7 +126874,7 @@ module.exports = 'pause'; /***/ }), -/* 568 */ +/* 572 */ /***/ (function(module, exports) { /** @@ -122438,7 +126900,7 @@ module.exports = 'postrender'; /***/ }), -/* 569 */ +/* 573 */ /***/ (function(module, exports) { /** @@ -122463,7 +126925,7 @@ module.exports = 'poststep'; /***/ }), -/* 570 */ +/* 574 */ /***/ (function(module, exports) { /** @@ -122488,7 +126950,7 @@ module.exports = 'prerender'; /***/ }), -/* 571 */ +/* 575 */ /***/ (function(module, exports) { /** @@ -122513,7 +126975,7 @@ module.exports = 'prestep'; /***/ }), -/* 572 */ +/* 576 */ /***/ (function(module, exports) { /** @@ -122535,7 +126997,7 @@ module.exports = 'ready'; /***/ }), -/* 573 */ +/* 577 */ /***/ (function(module, exports) { /** @@ -122556,7 +127018,7 @@ module.exports = 'resume'; /***/ }), -/* 574 */ +/* 578 */ /***/ (function(module, exports) { /** @@ -122581,7 +127043,7 @@ module.exports = 'step'; /***/ }), -/* 575 */ +/* 579 */ /***/ (function(module, exports) { /** @@ -122605,7 +127067,7 @@ module.exports = 'visible'; /***/ }), -/* 576 */ +/* 580 */ /***/ (function(module, exports) { /** @@ -122808,7 +127270,7 @@ module.exports = Origin; /***/ }), -/* 577 */ +/* 581 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122817,10 +127279,10 @@ module.exports = Origin; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DegToRad = __webpack_require__(40); -var GetBoolean = __webpack_require__(89); +var DegToRad = __webpack_require__(41); +var GetBoolean = __webpack_require__(90); var GetValue = __webpack_require__(6); -var TWEEN_CONST = __webpack_require__(90); +var TWEEN_CONST = __webpack_require__(91); var Vector2 = __webpack_require__(3); /** @@ -123235,7 +127697,7 @@ module.exports = PathFollower; /***/ }), -/* 578 */ +/* 582 */ /***/ (function(module, exports) { /** @@ -123422,7 +127884,7 @@ module.exports = Size; /***/ }), -/* 579 */ +/* 583 */ /***/ (function(module, exports) { /** @@ -123552,7 +128014,7 @@ module.exports = Texture; /***/ }), -/* 580 */ +/* 584 */ /***/ (function(module, exports) { /** @@ -123760,7 +128222,7 @@ module.exports = TextureCrop; /***/ }), -/* 581 */ +/* 585 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124092,7 +128554,7 @@ module.exports = Tint; /***/ }), -/* 582 */ +/* 586 */ /***/ (function(module, exports) { /** @@ -124124,7 +128586,7 @@ module.exports = 'changedata'; /***/ }), -/* 583 */ +/* 587 */ /***/ (function(module, exports) { /** @@ -124154,7 +128616,7 @@ module.exports = 'changedata-'; /***/ }), -/* 584 */ +/* 588 */ /***/ (function(module, exports) { /** @@ -124182,7 +128644,7 @@ module.exports = 'removedata'; /***/ }), -/* 585 */ +/* 589 */ /***/ (function(module, exports) { /** @@ -124210,7 +128672,33 @@ module.exports = 'setdata'; /***/ }), -/* 586 */ +/* 590 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Object Added to Scene Event. + * + * This event is dispatched when a Game Object is added to a Scene. + * + * Listen for it on a Game Object instance using `GameObject.on('addedtoscene', listener)`. + * + * @event Phaser.GameObjects.Events#ADDED_TO_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene. + * @param {Phaser.Scene} scene - The Scene to which the Game Object was added. + */ +module.exports = 'addedtoscene'; + + +/***/ }), +/* 591 */ /***/ (function(module, exports) { /** @@ -124235,7 +128723,33 @@ module.exports = 'destroy'; /***/ }), -/* 587 */ +/* 592 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Object Removed from Scene Event. + * + * This event is dispatched when a Game Object is removed from a Scene. + * + * Listen for it on a Game Object instance using `GameObject.on('removedfromscene', listener)`. + * + * @event Phaser.GameObjects.Events#REMOVED_FROM_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene. + * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed. + */ +module.exports = 'removedfromscene'; + + +/***/ }), +/* 593 */ /***/ (function(module, exports) { /** @@ -124267,7 +128781,7 @@ module.exports = 'complete'; /***/ }), -/* 588 */ +/* 594 */ /***/ (function(module, exports) { /** @@ -124296,7 +128810,7 @@ module.exports = 'created'; /***/ }), -/* 589 */ +/* 595 */ /***/ (function(module, exports) { /** @@ -124322,7 +128836,7 @@ module.exports = 'error'; /***/ }), -/* 590 */ +/* 596 */ /***/ (function(module, exports) { /** @@ -124354,7 +128868,7 @@ module.exports = 'loop'; /***/ }), -/* 591 */ +/* 597 */ /***/ (function(module, exports) { /** @@ -124382,7 +128896,7 @@ module.exports = 'play'; /***/ }), -/* 592 */ +/* 598 */ /***/ (function(module, exports) { /** @@ -124407,7 +128921,7 @@ module.exports = 'seeked'; /***/ }), -/* 593 */ +/* 599 */ /***/ (function(module, exports) { /** @@ -124433,7 +128947,7 @@ module.exports = 'seeking'; /***/ }), -/* 594 */ +/* 600 */ /***/ (function(module, exports) { /** @@ -124459,7 +128973,7 @@ module.exports = 'stop'; /***/ }), -/* 595 */ +/* 601 */ /***/ (function(module, exports) { /** @@ -124485,7 +128999,7 @@ module.exports = 'timeout'; /***/ }), -/* 596 */ +/* 602 */ /***/ (function(module, exports) { /** @@ -124511,7 +129025,7 @@ module.exports = 'unlocked'; /***/ }), -/* 597 */ +/* 603 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124520,7 +129034,7 @@ module.exports = 'unlocked'; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PropertyValueInc = __webpack_require__(38); +var PropertyValueInc = __webpack_require__(39); /** * Takes an array of Game Objects, or any objects that have a public `alpha` property, @@ -124552,7 +129066,7 @@ module.exports = IncAlpha; /***/ }), -/* 598 */ +/* 604 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124561,7 +129075,7 @@ module.exports = IncAlpha; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PropertyValueInc = __webpack_require__(38); +var PropertyValueInc = __webpack_require__(39); /** * Takes an array of Game Objects, or any objects that have a public `x` property, @@ -124593,7 +129107,7 @@ module.exports = IncX; /***/ }), -/* 599 */ +/* 605 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124602,7 +129116,7 @@ module.exports = IncX; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PropertyValueInc = __webpack_require__(38); +var PropertyValueInc = __webpack_require__(39); /** * Takes an array of Game Objects, or any objects that have public `x` and `y` properties, @@ -124640,7 +129154,7 @@ module.exports = IncXY; /***/ }), -/* 600 */ +/* 606 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124649,7 +129163,7 @@ module.exports = IncXY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PropertyValueInc = __webpack_require__(38); +var PropertyValueInc = __webpack_require__(39); /** * Takes an array of Game Objects, or any objects that have a public `y` property, @@ -124681,7 +129195,7 @@ module.exports = IncY; /***/ }), -/* 601 */ +/* 607 */ /***/ (function(module, exports) { /** @@ -124730,7 +129244,7 @@ module.exports = PlaceOnCircle; /***/ }), -/* 602 */ +/* 608 */ /***/ (function(module, exports) { /** @@ -124782,7 +129296,7 @@ module.exports = PlaceOnEllipse; /***/ }), -/* 603 */ +/* 609 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124791,7 +129305,7 @@ module.exports = PlaceOnEllipse; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetPoints = __webpack_require__(158); +var GetPoints = __webpack_require__(160); /** * Positions an array of Game Objects on evenly spaced points of a Line. @@ -124826,7 +129340,7 @@ module.exports = PlaceOnLine; /***/ }), -/* 604 */ +/* 610 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124835,9 +129349,9 @@ module.exports = PlaceOnLine; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MarchingAnts = __webpack_require__(289); -var RotateLeft = __webpack_require__(290); -var RotateRight = __webpack_require__(291); +var MarchingAnts = __webpack_require__(293); +var RotateLeft = __webpack_require__(294); +var RotateRight = __webpack_require__(295); /** * Takes an array of Game Objects and positions them on evenly spaced points around the perimeter of a Rectangle. @@ -124884,7 +129398,7 @@ module.exports = PlaceOnRectangle; /***/ }), -/* 605 */ +/* 611 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124893,7 +129407,7 @@ module.exports = PlaceOnRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BresenhamPoints = __webpack_require__(292); +var BresenhamPoints = __webpack_require__(296); /** * Takes an array of Game Objects and positions them on evenly spaced points around the edges of a Triangle. @@ -124945,7 +129459,7 @@ module.exports = PlaceOnTriangle; /***/ }), -/* 606 */ +/* 612 */ /***/ (function(module, exports) { /** @@ -124982,7 +129496,7 @@ module.exports = PlayAnimation; /***/ }), -/* 607 */ +/* 613 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124991,7 +129505,7 @@ module.exports = PlayAnimation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(155); +var Random = __webpack_require__(158); /** * Takes an array of Game Objects and positions them at random locations within the Circle. @@ -125022,7 +129536,7 @@ module.exports = RandomCircle; /***/ }), -/* 608 */ +/* 614 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125031,7 +129545,7 @@ module.exports = RandomCircle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(163); +var Random = __webpack_require__(165); /** * Takes an array of Game Objects and positions them at random locations within the Ellipse. @@ -125062,7 +129576,7 @@ module.exports = RandomEllipse; /***/ }), -/* 609 */ +/* 615 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125071,7 +129585,7 @@ module.exports = RandomEllipse; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(159); +var Random = __webpack_require__(161); /** * Takes an array of Game Objects and positions them at random locations on the Line. @@ -125102,7 +129616,7 @@ module.exports = RandomLine; /***/ }), -/* 610 */ +/* 616 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125111,7 +129625,7 @@ module.exports = RandomLine; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(160); +var Random = __webpack_require__(162); /** * Takes an array of Game Objects and positions them at random locations within the Rectangle. @@ -125140,7 +129654,7 @@ module.exports = RandomRectangle; /***/ }), -/* 611 */ +/* 617 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125149,7 +129663,7 @@ module.exports = RandomRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(164); +var Random = __webpack_require__(166); /** * Takes an array of Game Objects and positions them at random locations within the Triangle. @@ -125180,7 +129694,7 @@ module.exports = RandomTriangle; /***/ }), -/* 612 */ +/* 618 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125189,7 +129703,7 @@ module.exports = RandomTriangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PropertyValueInc = __webpack_require__(38); +var PropertyValueInc = __webpack_require__(39); /** * Takes an array of Game Objects, or any objects that have a public `rotation` property, @@ -125221,7 +129735,7 @@ module.exports = Rotate; /***/ }), -/* 613 */ +/* 619 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125230,8 +129744,8 @@ module.exports = Rotate; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundDistance = __webpack_require__(165); -var DistanceBetween = __webpack_require__(54); +var RotateAroundDistance = __webpack_require__(167); +var DistanceBetween = __webpack_require__(55); /** * Rotates each item around the given point by the given angle. @@ -125267,7 +129781,7 @@ module.exports = RotateAround; /***/ }), -/* 614 */ +/* 620 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125276,7 +129790,7 @@ module.exports = RotateAround; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathRotateAroundDistance = __webpack_require__(165); +var MathRotateAroundDistance = __webpack_require__(167); /** * Rotates an array of Game Objects around a point by the given angle and distance. @@ -125316,7 +129830,7 @@ module.exports = RotateAroundDistance; /***/ }), -/* 615 */ +/* 621 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125325,7 +129839,7 @@ module.exports = RotateAroundDistance; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PropertyValueInc = __webpack_require__(38); +var PropertyValueInc = __webpack_require__(39); /** * Takes an array of Game Objects, or any objects that have a public `scaleX` property, @@ -125357,7 +129871,7 @@ module.exports = ScaleX; /***/ }), -/* 616 */ +/* 622 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125366,7 +129880,7 @@ module.exports = ScaleX; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PropertyValueInc = __webpack_require__(38); +var PropertyValueInc = __webpack_require__(39); /** * Takes an array of Game Objects, or any objects that have public `scaleX` and `scaleY` properties, @@ -125404,7 +129918,7 @@ module.exports = ScaleXY; /***/ }), -/* 617 */ +/* 623 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125413,7 +129927,7 @@ module.exports = ScaleXY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PropertyValueInc = __webpack_require__(38); +var PropertyValueInc = __webpack_require__(39); /** * Takes an array of Game Objects, or any objects that have a public `scaleY` property, @@ -125445,7 +129959,7 @@ module.exports = ScaleY; /***/ }), -/* 618 */ +/* 624 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125486,7 +130000,7 @@ module.exports = SetAlpha; /***/ }), -/* 619 */ +/* 625 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125526,7 +130040,7 @@ module.exports = SetBlendMode; /***/ }), -/* 620 */ +/* 626 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125567,7 +130081,7 @@ module.exports = SetDepth; /***/ }), -/* 621 */ +/* 627 */ /***/ (function(module, exports) { /** @@ -125606,7 +130120,7 @@ module.exports = SetHitArea; /***/ }), -/* 622 */ +/* 628 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125645,15 +130159,21 @@ var SetOrigin = function (items, originX, originY, stepX, stepY, index, directio if (originY === undefined || originY === null) { originY = originX; } PropertyValueSet(items, 'originX', originX, stepX, index, direction); + PropertyValueSet(items, 'originY', originY, stepY, index, direction); - return PropertyValueSet(items, 'originY', originY, stepY, index, direction); + items.forEach(function (item) + { + item.updateDisplayOrigin(); + }); + + return items; }; module.exports = SetOrigin; /***/ }), -/* 623 */ +/* 629 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125694,7 +130214,7 @@ module.exports = SetRotation; /***/ }), -/* 624 */ +/* 630 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125741,7 +130261,7 @@ module.exports = SetScale; /***/ }), -/* 625 */ +/* 631 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125782,7 +130302,7 @@ module.exports = SetScaleX; /***/ }), -/* 626 */ +/* 632 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125823,7 +130343,7 @@ module.exports = SetScaleY; /***/ }), -/* 627 */ +/* 633 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125870,7 +130390,7 @@ module.exports = SetScrollFactor; /***/ }), -/* 628 */ +/* 634 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125911,7 +130431,7 @@ module.exports = SetScrollFactorX; /***/ }), -/* 629 */ +/* 635 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125952,7 +130472,7 @@ module.exports = SetScrollFactorY; /***/ }), -/* 630 */ +/* 636 */ /***/ (function(module, exports) { /** @@ -125991,7 +130511,7 @@ module.exports = SetTint; /***/ }), -/* 631 */ +/* 637 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126029,7 +130549,7 @@ module.exports = SetVisible; /***/ }), -/* 632 */ +/* 638 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126070,7 +130590,7 @@ module.exports = SetX; /***/ }), -/* 633 */ +/* 639 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126117,7 +130637,7 @@ module.exports = SetXY; /***/ }), -/* 634 */ +/* 640 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126158,7 +130678,7 @@ module.exports = SetY; /***/ }), -/* 635 */ +/* 641 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126288,7 +130808,7 @@ module.exports = ShiftPosition; /***/ }), -/* 636 */ +/* 642 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126321,7 +130841,7 @@ module.exports = Shuffle; /***/ }), -/* 637 */ +/* 643 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126330,7 +130850,7 @@ module.exports = Shuffle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathSmootherStep = __webpack_require__(166); +var MathSmootherStep = __webpack_require__(168); /** * Smootherstep is a sigmoid-like interpolation and clamping function. @@ -126379,7 +130899,7 @@ module.exports = SmootherStep; /***/ }), -/* 638 */ +/* 644 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126388,7 +130908,7 @@ module.exports = SmootherStep; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathSmoothStep = __webpack_require__(167); +var MathSmoothStep = __webpack_require__(169); /** * Smoothstep is a sigmoid-like interpolation and clamping function. @@ -126437,7 +130957,7 @@ module.exports = SmoothStep; /***/ }), -/* 639 */ +/* 645 */ /***/ (function(module, exports) { /** @@ -126500,7 +131020,7 @@ module.exports = Spread; /***/ }), -/* 640 */ +/* 646 */ /***/ (function(module, exports) { /** @@ -126536,7 +131056,7 @@ module.exports = ToggleVisible; /***/ }), -/* 641 */ +/* 647 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126546,7 +131066,7 @@ module.exports = ToggleVisible; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Wrap = __webpack_require__(58); +var Wrap = __webpack_require__(59); /** * Wrap each item's coordinates within a rectangle's area. @@ -126585,7 +131105,7 @@ module.exports = WrapInRectangle; /***/ }), -/* 642 */ +/* 648 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126600,16 +131120,369 @@ module.exports = WrapInRectangle; module.exports = { - Animation: __webpack_require__(156), - AnimationFrame: __webpack_require__(275), - AnimationManager: __webpack_require__(293), - Events: __webpack_require__(115) + Animation: __webpack_require__(170), + AnimationFrame: __webpack_require__(298), + AnimationManager: __webpack_require__(300), + AnimationState: __webpack_require__(248), + Events: __webpack_require__(120) }; /***/ }), -/* 643 */ +/* 649 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Add Animation Event. + * + * This event is dispatched when a new animation is added to the global Animation Manager. + * + * This can happen either as a result of an animation instance being added to the Animation Manager, + * or the Animation Manager creating a new animation directly. + * + * @event Phaser.Animations.Events#ADD_ANIMATION + * @since 3.0.0 + * + * @param {string} key - The key of the Animation that was added to the global Animation Manager. + * @param {Phaser.Animations.Animation} animation - An instance of the newly created Animation. + */ +module.exports = 'add'; + + +/***/ }), +/* 650 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Complete Event. + * + * This event is dispatched by a Sprite when an animation playing on it completes playback. + * This happens when the animation gets to the end of its sequence, factoring in any delays + * or repeats it may have to process. + * + * An animation that is set to loop, or repeat forever, will never fire this event, because + * it never actually completes. If you need to handle this, listen for the `ANIMATION_STOP` + * event instead, as this is emitted when the animation is stopped directly. + * + * Listen for it on the Sprite using `sprite.on('animationcomplete', listener)` + * + * The animation event flow is as follows: + * + * 1. `ANIMATION_START` + * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) + * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) + * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * + * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. + * + * If the animation is restarted while it is already playing, `ANIMATION_RESTART` is emitted. + * + * @event Phaser.Animations.Events#ANIMATION_COMPLETE + * @since 3.50.0 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated. + * @param {string} frameKey - The unique key of the Animation Frame within the Animation. + */ +module.exports = 'animationcomplete'; + + +/***/ }), +/* 651 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Repeat Event. + * + * This event is dispatched by a Sprite when an animation repeats playing on it. + * This happens if the animation was created, or played, with a `repeat` value specified. + * + * An animation will repeat when it reaches the end of its sequence. + * + * Listen for it on the Sprite using `sprite.on('animationrepeat', listener)` + * + * The animation event flow is as follows: + * + * 1. `ANIMATION_START` + * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) + * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) + * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * + * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. + * + * If the animation is restarted while it is already playing, `ANIMATION_RESTART` is emitted. + * + * @event Phaser.Animations.Events#ANIMATION_REPEAT + * @since 3.50.0 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has repeated. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated. + * @param {string} frameKey - The unique key of the Animation Frame within the Animation. + */ +module.exports = 'animationrepeat'; + + +/***/ }), +/* 652 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Restart Event. + * + * This event is dispatched by a Sprite when an animation restarts playing on it. + * This only happens when the `Sprite.anims.restart` method is called. + * + * Listen for it on the Sprite using `sprite.on('animationrestart', listener)` + * + * The animation event flow is as follows: + * + * 1. `ANIMATION_START` + * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) + * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) + * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * + * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. + * + * If the animation is restarted while it is already playing, `ANIMATION_RESTART` is emitted. + * + * @event Phaser.Animations.Events#ANIMATION_RESTART + * @since 3.50.0 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has restarted. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted. + * @param {string} frameKey - The unique key of the Animation Frame within the Animation. + */ +module.exports = 'animationrestart'; + + +/***/ }), +/* 653 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Start Event. + * + * This event is dispatched by a Sprite when an animation starts playing on it. + * This happens when the animation is played, factoring in any delay that may have been specified. + * This event happens after the delay has expired and prior to the first update event. + * + * Listen for it on the Sprite using `sprite.on('animationstart', listener)` + * + * The animation event flow is as follows: + * + * 1. `ANIMATION_START` + * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) + * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) + * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * + * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. + * + * If the animation is restarted while it is already playing, `ANIMATION_RESTART` is emitted. + * + * @event Phaser.Animations.Events#ANIMATION_START + * @since 3.50.0 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has started. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started. + * @param {string} frameKey - The unique key of the Animation Frame within the Animation. + */ +module.exports = 'animationstart'; + + +/***/ }), +/* 654 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Stop Event. + * + * This event is dispatched by a Sprite when an animation is stopped on it. An animation + * will only be stopeed if a method such as `Sprite.stop` or `Sprite.anims.stopAfterDelay` + * is called. It can also be emitted if a new animation is started before the current one completes. + * + * Listen for it on the Sprite using `sprite.on('animationstop', listener)` + * + * The animation event flow is as follows: + * + * 1. `ANIMATION_START` + * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) + * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) + * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * + * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. + * + * If the animation is restarted while it is already playing, `ANIMATION_RESTART` is emitted. + * + * @event Phaser.Animations.Events#ANIMATION_STOP + * @since 3.50.0 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has stopped. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation stopped. + * @param {string} frameKey - The unique key of the Animation Frame within the Animation. + */ +module.exports = 'animationstop'; + + +/***/ }), +/* 655 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Update Event. + * + * This event is dispatched by a Sprite when an animation playing on it updates. This happens when the animation changes frame. + * An animation will change frame based on the frme rate and other factors like `timeScale` and `delay`. It can also change + * frame when stopped or restarted. + * + * Listen for it on the Sprite using `sprite.on('animationupdate', listener)` + * + * If an animation is playing faster than the game frame-rate can handle, it's entirely possible for it to emit several + * update events in a single game frame, so please be aware of this in your code. The **final** event received that frame + * is the one that is rendered to the game. + * + * The animation event flow is as follows: + * + * 1. `ANIMATION_START` + * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) + * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) + * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * + * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. + * + * If the animation is restarted while it is already playing, `ANIMATION_RESTART` is emitted. + * + * @event Phaser.Animations.Events#ANIMATION_UPDATE + * @since 3.50.0 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated. + * @param {string} frameKey - The unique key of the Animation Frame within the Animation. + */ +module.exports = 'animationupdate'; + + +/***/ }), +/* 656 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Pause All Animations Event. + * + * This event is dispatched when the global Animation Manager is told to pause. + * + * When this happens all current animations will stop updating, although it doesn't necessarily mean + * that the game has paused as well. + * + * @event Phaser.Animations.Events#PAUSE_ALL + * @since 3.0.0 + */ +module.exports = 'pauseall'; + + +/***/ }), +/* 657 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Remove Animation Event. + * + * This event is dispatched when an animation is removed from the global Animation Manager. + * + * @event Phaser.Animations.Events#REMOVE_ANIMATION + * @since 3.0.0 + * + * @param {string} key - The key of the Animation that was removed from the global Animation Manager. + * @param {Phaser.Animations.Animation} animation - An instance of the removed Animation. + */ +module.exports = 'remove'; + + +/***/ }), +/* 658 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Resume All Animations Event. + * + * This event is dispatched when the global Animation Manager resumes, having been previously paused. + * + * When this happens all current animations will continue updating again. + * + * @event Phaser.Animations.Events#RESUME_ALL + * @since 3.0.0 + */ +module.exports = 'resumeall'; + + +/***/ }), +/* 659 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126624,15 +131497,15 @@ module.exports = { module.exports = { - BaseCache: __webpack_require__(294), - CacheManager: __webpack_require__(296), - Events: __webpack_require__(295) + BaseCache: __webpack_require__(302), + CacheManager: __webpack_require__(304), + Events: __webpack_require__(303) }; /***/ }), -/* 644 */ +/* 660 */ /***/ (function(module, exports) { /** @@ -126657,7 +131530,7 @@ module.exports = 'add'; /***/ }), -/* 645 */ +/* 661 */ /***/ (function(module, exports) { /** @@ -126682,7 +131555,7 @@ module.exports = 'remove'; /***/ }), -/* 646 */ +/* 662 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126701,14 +131574,14 @@ module.exports = 'remove'; module.exports = { - Controls: __webpack_require__(647), - Scene2D: __webpack_require__(650) + Controls: __webpack_require__(663), + Scene2D: __webpack_require__(666) }; /***/ }), -/* 647 */ +/* 663 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126723,14 +131596,14 @@ module.exports = { module.exports = { - FixedKeyControl: __webpack_require__(648), - SmoothedKeyControl: __webpack_require__(649) + FixedKeyControl: __webpack_require__(664), + SmoothedKeyControl: __webpack_require__(665) }; /***/ }), -/* 648 */ +/* 664 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127036,7 +131909,7 @@ module.exports = FixedKeyControl; /***/ }), -/* 649 */ +/* 665 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127519,7 +132392,7 @@ module.exports = SmoothedKeyControl; /***/ }), -/* 650 */ +/* 666 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127534,17 +132407,17 @@ module.exports = SmoothedKeyControl; module.exports = { - Camera: __webpack_require__(297), + Camera: __webpack_require__(305), BaseCamera: __webpack_require__(92), - CameraManager: __webpack_require__(706), - Effects: __webpack_require__(305), - Events: __webpack_require__(41) + CameraManager: __webpack_require__(722), + Effects: __webpack_require__(313), + Events: __webpack_require__(42) }; /***/ }), -/* 651 */ +/* 667 */ /***/ (function(module, exports) { /** @@ -127567,7 +132440,7 @@ module.exports = 'cameradestroy'; /***/ }), -/* 652 */ +/* 668 */ /***/ (function(module, exports) { /** @@ -127593,7 +132466,7 @@ module.exports = 'camerafadeincomplete'; /***/ }), -/* 653 */ +/* 669 */ /***/ (function(module, exports) { /** @@ -127623,7 +132496,7 @@ module.exports = 'camerafadeinstart'; /***/ }), -/* 654 */ +/* 670 */ /***/ (function(module, exports) { /** @@ -127649,7 +132522,7 @@ module.exports = 'camerafadeoutcomplete'; /***/ }), -/* 655 */ +/* 671 */ /***/ (function(module, exports) { /** @@ -127679,7 +132552,7 @@ module.exports = 'camerafadeoutstart'; /***/ }), -/* 656 */ +/* 672 */ /***/ (function(module, exports) { /** @@ -127703,7 +132576,7 @@ module.exports = 'cameraflashcomplete'; /***/ }), -/* 657 */ +/* 673 */ /***/ (function(module, exports) { /** @@ -127731,7 +132604,7 @@ module.exports = 'cameraflashstart'; /***/ }), -/* 658 */ +/* 674 */ /***/ (function(module, exports) { /** @@ -127755,7 +132628,7 @@ module.exports = 'camerapancomplete'; /***/ }), -/* 659 */ +/* 675 */ /***/ (function(module, exports) { /** @@ -127782,7 +132655,7 @@ module.exports = 'camerapanstart'; /***/ }), -/* 660 */ +/* 676 */ /***/ (function(module, exports) { /** @@ -127808,7 +132681,7 @@ module.exports = 'postrender'; /***/ }), -/* 661 */ +/* 677 */ /***/ (function(module, exports) { /** @@ -127834,7 +132707,7 @@ module.exports = 'prerender'; /***/ }), -/* 662 */ +/* 678 */ /***/ (function(module, exports) { /** @@ -127858,7 +132731,7 @@ module.exports = 'camerarotatecomplete'; /***/ }), -/* 663 */ +/* 679 */ /***/ (function(module, exports) { /** @@ -127884,7 +132757,7 @@ module.exports = 'camerarotatestart'; /***/ }), -/* 664 */ +/* 680 */ /***/ (function(module, exports) { /** @@ -127908,7 +132781,7 @@ module.exports = 'camerashakecomplete'; /***/ }), -/* 665 */ +/* 681 */ /***/ (function(module, exports) { /** @@ -127934,7 +132807,7 @@ module.exports = 'camerashakestart'; /***/ }), -/* 666 */ +/* 682 */ /***/ (function(module, exports) { /** @@ -127958,7 +132831,7 @@ module.exports = 'camerazoomcomplete'; /***/ }), -/* 667 */ +/* 683 */ /***/ (function(module, exports) { /** @@ -127984,7 +132857,7 @@ module.exports = 'camerazoomstart'; /***/ }), -/* 668 */ +/* 684 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127995,7 +132868,7 @@ module.exports = 'camerazoomstart'; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var Events = __webpack_require__(41); +var Events = __webpack_require__(42); /** * @classdesc @@ -128372,7 +133245,7 @@ module.exports = Fade; /***/ }), -/* 669 */ +/* 685 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128383,7 +133256,7 @@ module.exports = Fade; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var Events = __webpack_require__(41); +var Events = __webpack_require__(42); /** * @classdesc @@ -128723,7 +133596,7 @@ module.exports = Flash; /***/ }), -/* 670 */ +/* 686 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128734,8 +133607,8 @@ module.exports = Flash; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var EaseMap = __webpack_require__(120); -var Events = __webpack_require__(41); +var EaseMap = __webpack_require__(122); +var Events = __webpack_require__(42); var Vector2 = __webpack_require__(3); /** @@ -129048,7 +133921,7 @@ module.exports = Pan; /***/ }), -/* 671 */ +/* 687 */ /***/ (function(module, exports) { /** @@ -129079,7 +133952,7 @@ module.exports = In; /***/ }), -/* 672 */ +/* 688 */ /***/ (function(module, exports) { /** @@ -129110,7 +133983,7 @@ module.exports = Out; /***/ }), -/* 673 */ +/* 689 */ /***/ (function(module, exports) { /** @@ -129150,7 +134023,7 @@ module.exports = InOut; /***/ }), -/* 674 */ +/* 690 */ /***/ (function(module, exports) { /** @@ -129195,7 +134068,7 @@ module.exports = In; /***/ }), -/* 675 */ +/* 691 */ /***/ (function(module, exports) { /** @@ -129238,7 +134111,7 @@ module.exports = Out; /***/ }), -/* 676 */ +/* 692 */ /***/ (function(module, exports) { /** @@ -129302,7 +134175,7 @@ module.exports = InOut; /***/ }), -/* 677 */ +/* 693 */ /***/ (function(module, exports) { /** @@ -129330,7 +134203,7 @@ module.exports = In; /***/ }), -/* 678 */ +/* 694 */ /***/ (function(module, exports) { /** @@ -129358,7 +134231,7 @@ module.exports = Out; /***/ }), -/* 679 */ +/* 695 */ /***/ (function(module, exports) { /** @@ -129393,7 +134266,7 @@ module.exports = InOut; /***/ }), -/* 680 */ +/* 696 */ /***/ (function(module, exports) { /** @@ -129421,7 +134294,7 @@ module.exports = In; /***/ }), -/* 681 */ +/* 697 */ /***/ (function(module, exports) { /** @@ -129449,7 +134322,7 @@ module.exports = Out; /***/ }), -/* 682 */ +/* 698 */ /***/ (function(module, exports) { /** @@ -129484,7 +134357,7 @@ module.exports = InOut; /***/ }), -/* 683 */ +/* 699 */ /***/ (function(module, exports) { /** @@ -129539,7 +134412,7 @@ module.exports = In; /***/ }), -/* 684 */ +/* 700 */ /***/ (function(module, exports) { /** @@ -129594,7 +134467,7 @@ module.exports = Out; /***/ }), -/* 685 */ +/* 701 */ /***/ (function(module, exports) { /** @@ -129656,7 +134529,7 @@ module.exports = InOut; /***/ }), -/* 686 */ +/* 702 */ /***/ (function(module, exports) { /** @@ -129684,7 +134557,7 @@ module.exports = In; /***/ }), -/* 687 */ +/* 703 */ /***/ (function(module, exports) { /** @@ -129712,7 +134585,7 @@ module.exports = Out; /***/ }), -/* 688 */ +/* 704 */ /***/ (function(module, exports) { /** @@ -129747,7 +134620,7 @@ module.exports = InOut; /***/ }), -/* 689 */ +/* 705 */ /***/ (function(module, exports) { /** @@ -129775,7 +134648,7 @@ module.exports = Linear; /***/ }), -/* 690 */ +/* 706 */ /***/ (function(module, exports) { /** @@ -129803,7 +134676,7 @@ module.exports = In; /***/ }), -/* 691 */ +/* 707 */ /***/ (function(module, exports) { /** @@ -129831,7 +134704,7 @@ module.exports = Out; /***/ }), -/* 692 */ +/* 708 */ /***/ (function(module, exports) { /** @@ -129866,7 +134739,7 @@ module.exports = InOut; /***/ }), -/* 693 */ +/* 709 */ /***/ (function(module, exports) { /** @@ -129894,7 +134767,7 @@ module.exports = In; /***/ }), -/* 694 */ +/* 710 */ /***/ (function(module, exports) { /** @@ -129922,7 +134795,7 @@ module.exports = Out; /***/ }), -/* 695 */ +/* 711 */ /***/ (function(module, exports) { /** @@ -129957,7 +134830,7 @@ module.exports = InOut; /***/ }), -/* 696 */ +/* 712 */ /***/ (function(module, exports) { /** @@ -129985,7 +134858,7 @@ module.exports = In; /***/ }), -/* 697 */ +/* 713 */ /***/ (function(module, exports) { /** @@ -130013,7 +134886,7 @@ module.exports = Out; /***/ }), -/* 698 */ +/* 714 */ /***/ (function(module, exports) { /** @@ -130048,7 +134921,7 @@ module.exports = InOut; /***/ }), -/* 699 */ +/* 715 */ /***/ (function(module, exports) { /** @@ -130087,7 +134960,7 @@ module.exports = In; /***/ }), -/* 700 */ +/* 716 */ /***/ (function(module, exports) { /** @@ -130126,7 +134999,7 @@ module.exports = Out; /***/ }), -/* 701 */ +/* 717 */ /***/ (function(module, exports) { /** @@ -130165,7 +135038,7 @@ module.exports = InOut; /***/ }), -/* 702 */ +/* 718 */ /***/ (function(module, exports) { /** @@ -130207,7 +135080,7 @@ module.exports = Stepped; /***/ }), -/* 703 */ +/* 719 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130218,7 +135091,7 @@ module.exports = Stepped; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var Events = __webpack_require__(41); +var Events = __webpack_require__(42); var Vector2 = __webpack_require__(3); /** @@ -130526,7 +135399,7 @@ module.exports = Shake; /***/ }), -/* 704 */ +/* 720 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130537,8 +135410,8 @@ module.exports = Shake; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var Events = __webpack_require__(41); -var EaseMap = __webpack_require__(120); +var Events = __webpack_require__(42); +var EaseMap = __webpack_require__(122); /** * @classdesc @@ -130959,7 +135832,7 @@ module.exports = RotateTo; /***/ }), -/* 705 */ +/* 721 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130970,8 +135843,8 @@ module.exports = RotateTo; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var EaseMap = __webpack_require__(120); -var Events = __webpack_require__(41); +var EaseMap = __webpack_require__(122); +var Events = __webpack_require__(42); /** * @classdesc @@ -131252,7 +136125,7 @@ module.exports = Zoom; /***/ }), -/* 706 */ +/* 722 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131261,13 +136134,13 @@ module.exports = Zoom; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Camera = __webpack_require__(297); +var Camera = __webpack_require__(305); var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(2); var PluginCache = __webpack_require__(23); -var RectangleContains = __webpack_require__(49); +var RectangleContains = __webpack_require__(50); var ScaleEvents = __webpack_require__(93); -var SceneEvents = __webpack_require__(22); +var SceneEvents = __webpack_require__(20); /** * @classdesc @@ -132000,7 +136873,7 @@ module.exports = CameraManager; /***/ }), -/* 707 */ +/* 723 */ /***/ (function(module, exports) { /** @@ -132019,7 +136892,7 @@ module.exports = 'enterfullscreen'; /***/ }), -/* 708 */ +/* 724 */ /***/ (function(module, exports) { /** @@ -132038,7 +136911,7 @@ module.exports = 'fullscreenfailed'; /***/ }), -/* 709 */ +/* 725 */ /***/ (function(module, exports) { /** @@ -132057,7 +136930,7 @@ module.exports = 'fullscreenunsupported'; /***/ }), -/* 710 */ +/* 726 */ /***/ (function(module, exports) { /** @@ -132077,7 +136950,7 @@ module.exports = 'leavefullscreen'; /***/ }), -/* 711 */ +/* 727 */ /***/ (function(module, exports) { /** @@ -132098,7 +136971,7 @@ module.exports = 'orientationchange'; /***/ }), -/* 712 */ +/* 728 */ /***/ (function(module, exports) { /** @@ -132129,7 +137002,33 @@ module.exports = 'resize'; /***/ }), -/* 713 */ +/* 729 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Object Added to Scene Event. + * + * This event is dispatched when a Game Object is added to a Scene. + * + * Listen for it from a Scene using `this.scene.events.on('addedtoscene', listener)`. + * + * @event Phaser.Scenes.Events#ADDED_TO_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene. + * @param {Phaser.Scene} scene - The Scene to which the Game Object was added. + */ +module.exports = 'addedtoscene'; + + +/***/ }), +/* 730 */ /***/ (function(module, exports) { /** @@ -132154,7 +137053,7 @@ module.exports = 'boot'; /***/ }), -/* 714 */ +/* 731 */ /***/ (function(module, exports) { /** @@ -132183,7 +137082,7 @@ module.exports = 'create'; /***/ }), -/* 715 */ +/* 732 */ /***/ (function(module, exports) { /** @@ -132210,7 +137109,7 @@ module.exports = 'destroy'; /***/ }), -/* 716 */ +/* 733 */ /***/ (function(module, exports) { /** @@ -132237,7 +137136,7 @@ module.exports = 'pause'; /***/ }), -/* 717 */ +/* 734 */ /***/ (function(module, exports) { /** @@ -132274,7 +137173,7 @@ module.exports = 'postupdate'; /***/ }), -/* 718 */ +/* 735 */ /***/ (function(module, exports) { /** @@ -132311,7 +137210,7 @@ module.exports = 'preupdate'; /***/ }), -/* 719 */ +/* 736 */ /***/ (function(module, exports) { /** @@ -132339,7 +137238,33 @@ module.exports = 'ready'; /***/ }), -/* 720 */ +/* 737 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Object Removed from Scene Event. + * + * This event is dispatched when a Game Object is removed from a Scene. + * + * Listen for it from a Scene using `this.scene.events.on('removedfromscene', listener)`. + * + * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene. + * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed. + */ +module.exports = 'removedfromscene'; + + +/***/ }), +/* 738 */ /***/ (function(module, exports) { /** @@ -132375,7 +137300,7 @@ module.exports = 'render'; /***/ }), -/* 721 */ +/* 739 */ /***/ (function(module, exports) { /** @@ -132402,7 +137327,7 @@ module.exports = 'resume'; /***/ }), -/* 722 */ +/* 740 */ /***/ (function(module, exports) { /** @@ -132432,7 +137357,7 @@ module.exports = 'shutdown'; /***/ }), -/* 723 */ +/* 741 */ /***/ (function(module, exports) { /** @@ -132459,7 +137384,7 @@ module.exports = 'sleep'; /***/ }), -/* 724 */ +/* 742 */ /***/ (function(module, exports) { /** @@ -132484,7 +137409,7 @@ module.exports = 'start'; /***/ }), -/* 725 */ +/* 743 */ /***/ (function(module, exports) { /** @@ -132520,7 +137445,7 @@ module.exports = 'transitioncomplete'; /***/ }), -/* 726 */ +/* 744 */ /***/ (function(module, exports) { /** @@ -132557,7 +137482,7 @@ module.exports = 'transitioninit'; /***/ }), -/* 727 */ +/* 745 */ /***/ (function(module, exports) { /** @@ -132591,7 +137516,7 @@ module.exports = 'transitionout'; /***/ }), -/* 728 */ +/* 746 */ /***/ (function(module, exports) { /** @@ -132631,7 +137556,7 @@ module.exports = 'transitionstart'; /***/ }), -/* 729 */ +/* 747 */ /***/ (function(module, exports) { /** @@ -132666,7 +137591,7 @@ module.exports = 'transitionwake'; /***/ }), -/* 730 */ +/* 748 */ /***/ (function(module, exports) { /** @@ -132703,7 +137628,7 @@ module.exports = 'update'; /***/ }), -/* 731 */ +/* 749 */ /***/ (function(module, exports) { /** @@ -132730,7 +137655,7 @@ module.exports = 'wake'; /***/ }), -/* 732 */ +/* 750 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132745,18 +137670,18 @@ module.exports = 'wake'; module.exports = { - Config: __webpack_require__(318), - CreateRenderer: __webpack_require__(340), - DebugHeader: __webpack_require__(342), - Events: __webpack_require__(20), - TimeStep: __webpack_require__(343), - VisibilityHandler: __webpack_require__(345) + Config: __webpack_require__(326), + CreateRenderer: __webpack_require__(348), + DebugHeader: __webpack_require__(350), + Events: __webpack_require__(21), + TimeStep: __webpack_require__(351), + VisibilityHandler: __webpack_require__(353) }; /***/ }), -/* 733 */ +/* 751 */ /***/ (function(module, exports) { // shim for using process in browser @@ -132946,7 +137871,7 @@ process.umask = function() { return 0; }; /***/ }), -/* 734 */ +/* 752 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132955,7 +137880,7 @@ process.umask = function() { return 0; }; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Browser = __webpack_require__(123); +var Browser = __webpack_require__(125); /** * Determines the input support of the browser running this Phaser Game instance. @@ -133021,7 +137946,7 @@ module.exports = init(); /***/ }), -/* 735 */ +/* 753 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133030,7 +137955,7 @@ module.exports = init(); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Browser = __webpack_require__(123); +var Browser = __webpack_require__(125); /** * Determines the audio playback capabilities of the device running this Phaser Game instance. @@ -133146,7 +138071,7 @@ module.exports = init(); /***/ }), -/* 736 */ +/* 754 */ /***/ (function(module, exports) { /** @@ -133233,7 +138158,7 @@ module.exports = init(); /***/ }), -/* 737 */ +/* 755 */ /***/ (function(module, exports) { /** @@ -133337,7 +138262,7 @@ module.exports = init(); /***/ }), -/* 738 */ +/* 756 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133352,25 +138277,25 @@ module.exports = init(); module.exports = { - Between: __webpack_require__(321), - BetweenPoints: __webpack_require__(322), - BetweenPointsY: __webpack_require__(739), - BetweenY: __webpack_require__(740), - CounterClockwise: __webpack_require__(741), - Normalize: __webpack_require__(323), - Random: __webpack_require__(742), - RandomDegrees: __webpack_require__(743), - Reverse: __webpack_require__(744), - RotateTo: __webpack_require__(745), - ShortestBetween: __webpack_require__(746), - Wrap: __webpack_require__(241), - WrapDegrees: __webpack_require__(242) + Between: __webpack_require__(329), + BetweenPoints: __webpack_require__(330), + BetweenPointsY: __webpack_require__(757), + BetweenY: __webpack_require__(758), + CounterClockwise: __webpack_require__(759), + Normalize: __webpack_require__(331), + Random: __webpack_require__(760), + RandomDegrees: __webpack_require__(761), + Reverse: __webpack_require__(762), + RotateTo: __webpack_require__(763), + ShortestBetween: __webpack_require__(764), + Wrap: __webpack_require__(246), + WrapDegrees: __webpack_require__(247) }; /***/ }), -/* 739 */ +/* 757 */ /***/ (function(module, exports) { /** @@ -133402,7 +138327,7 @@ module.exports = BetweenPointsY; /***/ }), -/* 740 */ +/* 758 */ /***/ (function(module, exports) { /** @@ -133436,7 +138361,7 @@ module.exports = BetweenY; /***/ }), -/* 741 */ +/* 759 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133481,7 +138406,7 @@ module.exports = CounterClockwise; /***/ }), -/* 742 */ +/* 760 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133491,7 +138416,7 @@ module.exports = CounterClockwise; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FloatBetween = __webpack_require__(124); +var FloatBetween = __webpack_require__(126); /** * Returns a random angle in the range [-pi, pi]. @@ -133510,7 +138435,7 @@ module.exports = Random; /***/ }), -/* 743 */ +/* 761 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133520,7 +138445,7 @@ module.exports = Random; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FloatBetween = __webpack_require__(124); +var FloatBetween = __webpack_require__(126); /** * Returns a random angle in the range [-180, 180]. @@ -133539,7 +138464,7 @@ module.exports = RandomDegrees; /***/ }), -/* 744 */ +/* 762 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133548,7 +138473,7 @@ module.exports = RandomDegrees; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Normalize = __webpack_require__(323); +var Normalize = __webpack_require__(331); /** * Reverse the given angle. @@ -133569,7 +138494,7 @@ module.exports = Reverse; /***/ }), -/* 745 */ +/* 763 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133636,7 +138561,7 @@ module.exports = RotateTo; /***/ }), -/* 746 */ +/* 764 */ /***/ (function(module, exports) { /** @@ -133685,7 +138610,7 @@ module.exports = ShortestBetween; /***/ }), -/* 747 */ +/* 765 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133700,19 +138625,19 @@ module.exports = ShortestBetween; module.exports = { - Between: __webpack_require__(54), - BetweenPoints: __webpack_require__(324), - BetweenPointsSquared: __webpack_require__(748), - Chebyshev: __webpack_require__(749), - Power: __webpack_require__(750), - Snake: __webpack_require__(751), - Squared: __webpack_require__(325) + Between: __webpack_require__(55), + BetweenPoints: __webpack_require__(332), + BetweenPointsSquared: __webpack_require__(766), + Chebyshev: __webpack_require__(767), + Power: __webpack_require__(768), + Snake: __webpack_require__(769), + Squared: __webpack_require__(333) }; /***/ }), -/* 748 */ +/* 766 */ /***/ (function(module, exports) { /** @@ -133744,7 +138669,7 @@ module.exports = DistanceBetweenPointsSquared; /***/ }), -/* 749 */ +/* 767 */ /***/ (function(module, exports) { /** @@ -133778,7 +138703,7 @@ module.exports = ChebyshevDistance; /***/ }), -/* 750 */ +/* 768 */ /***/ (function(module, exports) { /** @@ -133812,7 +138737,7 @@ module.exports = DistancePower; /***/ }), -/* 751 */ +/* 769 */ /***/ (function(module, exports) { /** @@ -133846,7 +138771,7 @@ module.exports = SnakeDistance; /***/ }), -/* 752 */ +/* 770 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133861,24 +138786,24 @@ module.exports = SnakeDistance; module.exports = { - Back: __webpack_require__(306), - Bounce: __webpack_require__(307), - Circular: __webpack_require__(308), - Cubic: __webpack_require__(309), - Elastic: __webpack_require__(310), - Expo: __webpack_require__(311), - Linear: __webpack_require__(312), - Quadratic: __webpack_require__(313), - Quartic: __webpack_require__(314), - Quintic: __webpack_require__(315), - Sine: __webpack_require__(316), - Stepped: __webpack_require__(317) + Back: __webpack_require__(314), + Bounce: __webpack_require__(315), + Circular: __webpack_require__(316), + Cubic: __webpack_require__(317), + Elastic: __webpack_require__(318), + Expo: __webpack_require__(319), + Linear: __webpack_require__(320), + Quadratic: __webpack_require__(321), + Quartic: __webpack_require__(322), + Quintic: __webpack_require__(323), + Sine: __webpack_require__(324), + Stepped: __webpack_require__(325) }; /***/ }), -/* 753 */ +/* 771 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133893,17 +138818,17 @@ module.exports = { module.exports = { - Ceil: __webpack_require__(754), - Equal: __webpack_require__(107), - Floor: __webpack_require__(755), - GreaterThan: __webpack_require__(326), - LessThan: __webpack_require__(327) + Ceil: __webpack_require__(772), + Equal: __webpack_require__(108), + Floor: __webpack_require__(773), + GreaterThan: __webpack_require__(334), + LessThan: __webpack_require__(335) }; /***/ }), -/* 754 */ +/* 772 */ /***/ (function(module, exports) { /** @@ -133934,7 +138859,7 @@ module.exports = Ceil; /***/ }), -/* 755 */ +/* 773 */ /***/ (function(module, exports) { /** @@ -133965,7 +138890,7 @@ module.exports = Floor; /***/ }), -/* 756 */ +/* 774 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133980,19 +138905,19 @@ module.exports = Floor; module.exports = { - Bezier: __webpack_require__(757), - CatmullRom: __webpack_require__(758), - CubicBezier: __webpack_require__(330), - Linear: __webpack_require__(759), - QuadraticBezier: __webpack_require__(331), - SmoothStep: __webpack_require__(332), - SmootherStep: __webpack_require__(760) + Bezier: __webpack_require__(775), + CatmullRom: __webpack_require__(776), + CubicBezier: __webpack_require__(338), + Linear: __webpack_require__(777), + QuadraticBezier: __webpack_require__(339), + SmoothStep: __webpack_require__(340), + SmootherStep: __webpack_require__(778) }; /***/ }), -/* 757 */ +/* 775 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134001,7 +138926,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bernstein = __webpack_require__(328); +var Bernstein = __webpack_require__(336); /** * A bezier interpolation method. @@ -134031,7 +138956,7 @@ module.exports = BezierInterpolation; /***/ }), -/* 758 */ +/* 776 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134040,7 +138965,7 @@ module.exports = BezierInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CatmullRom = __webpack_require__(177); +var CatmullRom = __webpack_require__(179); /** * A Catmull-Rom interpolation method. @@ -134088,7 +139013,7 @@ module.exports = CatmullRomInterpolation; /***/ }), -/* 759 */ +/* 777 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134097,7 +139022,7 @@ module.exports = CatmullRomInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Linear = __webpack_require__(121); +var Linear = __webpack_require__(123); /** * A linear interpolation method. @@ -134135,7 +139060,7 @@ module.exports = LinearInterpolation; /***/ }), -/* 760 */ +/* 778 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134144,7 +139069,7 @@ module.exports = LinearInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmootherStep = __webpack_require__(166); +var SmootherStep = __webpack_require__(168); /** * A Smoother Step interpolation method. @@ -134168,7 +139093,7 @@ module.exports = SmootherStepInterpolation; /***/ }), -/* 761 */ +/* 779 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134183,15 +139108,15 @@ module.exports = SmootherStepInterpolation; module.exports = { - GetNext: __webpack_require__(333), - IsSize: __webpack_require__(125), - IsValue: __webpack_require__(762) + GetNext: __webpack_require__(341), + IsSize: __webpack_require__(127), + IsValue: __webpack_require__(780) }; /***/ }), -/* 762 */ +/* 780 */ /***/ (function(module, exports) { /** @@ -134219,7 +139144,7 @@ module.exports = IsValuePowerOfTwo; /***/ }), -/* 763 */ +/* 781 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134234,15 +139159,15 @@ module.exports = IsValuePowerOfTwo; module.exports = { - Ceil: __webpack_require__(334), + Ceil: __webpack_require__(342), Floor: __webpack_require__(94), - To: __webpack_require__(764) + To: __webpack_require__(782) }; /***/ }), -/* 764 */ +/* 782 */ /***/ (function(module, exports) { /** @@ -134285,7 +139210,7 @@ module.exports = SnapTo; /***/ }), -/* 765 */ +/* 783 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134795,7 +139720,7 @@ module.exports = RandomDataGenerator; /***/ }), -/* 766 */ +/* 784 */ /***/ (function(module, exports) { /** @@ -134830,7 +139755,7 @@ module.exports = Average; /***/ }), -/* 767 */ +/* 785 */ /***/ (function(module, exports) { /** @@ -134867,7 +139792,7 @@ module.exports = CeilTo; /***/ }), -/* 768 */ +/* 786 */ /***/ (function(module, exports) { /** @@ -134896,7 +139821,7 @@ module.exports = Difference; /***/ }), -/* 769 */ +/* 787 */ /***/ (function(module, exports) { /** @@ -134933,7 +139858,7 @@ module.exports = FloorTo; /***/ }), -/* 770 */ +/* 788 */ /***/ (function(module, exports) { /** @@ -134966,7 +139891,7 @@ module.exports = GetSpeed; /***/ }), -/* 771 */ +/* 789 */ /***/ (function(module, exports) { /** @@ -134997,7 +139922,7 @@ module.exports = IsEven; /***/ }), -/* 772 */ +/* 790 */ /***/ (function(module, exports) { /** @@ -135026,7 +139951,7 @@ module.exports = IsEvenStrict; /***/ }), -/* 773 */ +/* 791 */ /***/ (function(module, exports) { /** @@ -135056,7 +139981,7 @@ module.exports = MaxAdd; /***/ }), -/* 774 */ +/* 792 */ /***/ (function(module, exports) { /** @@ -135086,7 +140011,7 @@ module.exports = MinSub; /***/ }), -/* 775 */ +/* 793 */ /***/ (function(module, exports) { /** @@ -135145,7 +140070,7 @@ module.exports = Percent; /***/ }), -/* 776 */ +/* 794 */ /***/ (function(module, exports) { /** @@ -135185,7 +140110,7 @@ module.exports = RandomXY; /***/ }), -/* 777 */ +/* 795 */ /***/ (function(module, exports) { /** @@ -135224,7 +140149,7 @@ module.exports = RandomXYZ; /***/ }), -/* 778 */ +/* 796 */ /***/ (function(module, exports) { /** @@ -135261,7 +140186,7 @@ module.exports = RandomXYZW; /***/ }), -/* 779 */ +/* 797 */ /***/ (function(module, exports) { /** @@ -135298,7 +140223,7 @@ module.exports = RotateTo; /***/ }), -/* 780 */ +/* 798 */ /***/ (function(module, exports) { /** @@ -135350,7 +140275,7 @@ module.exports = RoundTo; /***/ }), -/* 781 */ +/* 799 */ /***/ (function(module, exports) { /** @@ -135403,7 +140328,7 @@ module.exports = SinCosTableGenerator; /***/ }), -/* 782 */ +/* 800 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135461,7 +140386,7 @@ module.exports = ToXY; /***/ }), -/* 783 */ +/* 801 */ /***/ (function(module, exports) { /** @@ -135491,7 +140416,7 @@ module.exports = Within; /***/ }), -/* 784 */ +/* 802 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135500,9 +140425,9 @@ module.exports = Within; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector3 = __webpack_require__(80); -var Matrix4 = __webpack_require__(338); -var Quaternion = __webpack_require__(339); +var Vector3 = __webpack_require__(81); +var Matrix4 = __webpack_require__(346); +var Quaternion = __webpack_require__(347); var tmpMat4 = new Matrix4(); var tmpQuat = new Quaternion(); @@ -135539,7 +140464,7 @@ module.exports = RotateVec3; /***/ }), -/* 785 */ +/* 803 */ /***/ (function(module, exports) { /** @@ -135565,7 +140490,7 @@ module.exports = 'addtexture'; /***/ }), -/* 786 */ +/* 804 */ /***/ (function(module, exports) { /** @@ -135591,7 +140516,7 @@ module.exports = 'onerror'; /***/ }), -/* 787 */ +/* 805 */ /***/ (function(module, exports) { /** @@ -135620,7 +140545,7 @@ module.exports = 'onload'; /***/ }), -/* 788 */ +/* 806 */ /***/ (function(module, exports) { /** @@ -135643,7 +140568,7 @@ module.exports = 'ready'; /***/ }), -/* 789 */ +/* 807 */ /***/ (function(module, exports) { /** @@ -135671,7 +140596,7 @@ module.exports = 'removetexture'; /***/ }), -/* 790 */ +/* 808 */ /***/ (function(module, exports) { module.exports = [ @@ -135707,7 +140632,7 @@ module.exports = [ /***/ }), -/* 791 */ +/* 809 */ /***/ (function(module, exports) { module.exports = [ @@ -135726,11 +140651,11 @@ module.exports = [ /***/ }), -/* 792 */ +/* 810 */ /***/ (function(module, exports) { module.exports = [ - '#define SHADER_NAME PHASER_FORWARD_DIFFUSE_FS', + '#define SHADER_NAME PHASER_LIGHT_FS', '', 'precision mediump float;', '', @@ -135785,11 +140710,11 @@ module.exports = [ /***/ }), -/* 793 */ +/* 811 */ /***/ (function(module, exports) { module.exports = [ - '#define SHADER_NAME PHASER_TEXTURE_TINT_FS', + '#define SHADER_NAME PHASER_MULTI_FS', '', 'precision mediump float;', '', @@ -135833,11 +140758,11 @@ module.exports = [ /***/ }), -/* 794 */ +/* 812 */ /***/ (function(module, exports) { module.exports = [ - '#define SHADER_NAME PHASER_TEXTURE_TINT_VS', + '#define SHADER_NAME PHASER_MULTI_VS', '', 'precision mediump float;', '', @@ -135871,11 +140796,11 @@ module.exports = [ /***/ }), -/* 795 */ +/* 813 */ /***/ (function(module, exports) { module.exports = [ - '#define SHADER_NAME PHASER_SINGLE_TEXTURE_TINT_FS', + '#define SHADER_NAME PHASER_SINGLE_FS', '', 'precision mediump float;', '', @@ -135915,11 +140840,11 @@ module.exports = [ /***/ }), -/* 796 */ +/* 814 */ /***/ (function(module, exports) { module.exports = [ - '#define SHADER_NAME PHASER_SINGLE_TEXTURE_TINT_VS', + '#define SHADER_NAME PHASER_SINGLE_VS', '', 'precision mediump float;', '', @@ -135949,7 +140874,7 @@ module.exports = [ /***/ }), -/* 797 */ +/* 815 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135964,14 +140889,14 @@ module.exports = [ module.exports = { - GenerateTexture: __webpack_require__(346), - Palettes: __webpack_require__(798) + GenerateTexture: __webpack_require__(354), + Palettes: __webpack_require__(816) }; /***/ }), -/* 798 */ +/* 816 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135986,17 +140911,17 @@ module.exports = { module.exports = { - ARNE16: __webpack_require__(347), - C64: __webpack_require__(799), - CGA: __webpack_require__(800), - JMP: __webpack_require__(801), - MSX: __webpack_require__(802) + ARNE16: __webpack_require__(355), + C64: __webpack_require__(817), + CGA: __webpack_require__(818), + JMP: __webpack_require__(819), + MSX: __webpack_require__(820) }; /***/ }), -/* 799 */ +/* 817 */ /***/ (function(module, exports) { /** @@ -136034,7 +140959,7 @@ module.exports = { /***/ }), -/* 800 */ +/* 818 */ /***/ (function(module, exports) { /** @@ -136072,7 +140997,7 @@ module.exports = { /***/ }), -/* 801 */ +/* 819 */ /***/ (function(module, exports) { /** @@ -136110,7 +141035,7 @@ module.exports = { /***/ }), -/* 802 */ +/* 820 */ /***/ (function(module, exports) { /** @@ -136148,7 +141073,7 @@ module.exports = { /***/ }), -/* 803 */ +/* 821 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136162,19 +141087,20 @@ module.exports = { */ module.exports = { - Path: __webpack_require__(804), + Path: __webpack_require__(822), + MoveTo: __webpack_require__(359), - CubicBezier: __webpack_require__(348), - Curve: __webpack_require__(82), - Ellipse: __webpack_require__(349), - Line: __webpack_require__(350), - QuadraticBezier: __webpack_require__(351), - Spline: __webpack_require__(352) + CubicBezier: __webpack_require__(356), + Curve: __webpack_require__(83), + Ellipse: __webpack_require__(357), + Line: __webpack_require__(358), + QuadraticBezier: __webpack_require__(360), + Spline: __webpack_require__(361) }; /***/ }), -/* 804 */ +/* 822 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136186,14 +141112,14 @@ module.exports = { // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) var Class = __webpack_require__(0); -var CubicBezierCurve = __webpack_require__(348); -var EllipseCurve = __webpack_require__(349); +var CubicBezierCurve = __webpack_require__(356); +var EllipseCurve = __webpack_require__(357); var GameObjectFactory = __webpack_require__(5); -var LineCurve = __webpack_require__(350); -var MovePathTo = __webpack_require__(805); -var QuadraticBezierCurve = __webpack_require__(351); +var LineCurve = __webpack_require__(358); +var MovePathTo = __webpack_require__(359); +var QuadraticBezierCurve = __webpack_require__(360); var Rectangle = __webpack_require__(9); -var SplineCurve = __webpack_require__(352); +var SplineCurve = __webpack_require__(361); var Vector2 = __webpack_require__(3); var MATH_CONST = __webpack_require__(13); @@ -137063,147 +141989,7 @@ module.exports = Path; /***/ }), -/* 805 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var Vector2 = __webpack_require__(3); - -/** - * @classdesc - * A MoveTo Curve is a very simple curve consisting of only a single point. Its intended use is to move the ending point in a Path. - * - * @class MoveTo - * @memberof Phaser.Curves - * @constructor - * @since 3.0.0 - * - * @param {number} [x] - `x` pixel coordinate. - * @param {number} [y] - `y` pixel coordinate. - */ -var MoveTo = new Class({ - - initialize: - - function MoveTo (x, y) - { - // Skip length calcs in paths - - /** - * Denotes that this Curve does not influence the bounds, points, and drawing of its parent Path. Must be `false` or some methods in the parent Path will throw errors. - * - * @name Phaser.Curves.MoveTo#active - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.active = false; - - /** - * The lone point which this curve consists of. - * - * @name Phaser.Curves.MoveTo#p0 - * @type {Phaser.Math.Vector2} - * @since 3.0.0 - */ - this.p0 = new Vector2(x, y); - }, - - /** - * Get point at relative position in curve according to length. - * - * @method Phaser.Curves.MoveTo#getPoint - * @since 3.0.0 - * - * @generic {Phaser.Math.Vector2} O - [out,$return] - * - * @param {number} t - The position along the curve to return. Where 0 is the start and 1 is the end. - * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created. - * - * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned. - */ - getPoint: function (t, out) - { - if (out === undefined) { out = new Vector2(); } - - return out.copy(this.p0); - }, - - /** - * Retrieves the point at given position in the curve. This will always return this curve's only point. - * - * @method Phaser.Curves.MoveTo#getPointAt - * @since 3.0.0 - * - * @generic {Phaser.Math.Vector2} O - [out,$return] - * - * @param {number} u - The position in the path to retrieve, between 0 and 1. Not used. - * @param {Phaser.Math.Vector2} [out] - An optional vector in which to store the point. - * - * @return {Phaser.Math.Vector2} The modified `out` vector, or a new `Vector2` if none was provided. - */ - getPointAt: function (u, out) - { - return this.getPoint(u, out); - }, - - /** - * Gets the resolution of this curve. - * - * @method Phaser.Curves.MoveTo#getResolution - * @since 3.0.0 - * - * @return {number} The resolution of this curve. For a MoveTo the value is always 1. - */ - getResolution: function () - { - return 1; - }, - - /** - * Gets the length of this curve. - * - * @method Phaser.Curves.MoveTo#getLength - * @since 3.0.0 - * - * @return {number} The length of this curve. For a MoveTo the value is always 0. - */ - getLength: function () - { - return 0; - }, - - /** - * Converts this curve into a JSON-serializable object. - * - * @method Phaser.Curves.MoveTo#toJSON - * @since 3.0.0 - * - * @return {Phaser.Types.Curves.JSONCurve} A primitive object with the curve's type and only point. - */ - toJSON: function () - { - return { - type: 'MoveTo', - points: [ - this.p0.x, this.p0.y - ] - }; - } - -}); - -module.exports = MoveTo; - - -/***/ }), -/* 806 */ +/* 823 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137219,14 +142005,14 @@ module.exports = MoveTo; module.exports = { DataManager: __webpack_require__(118), - DataManagerPlugin: __webpack_require__(807), - Events: __webpack_require__(288) + DataManagerPlugin: __webpack_require__(824), + Events: __webpack_require__(292) }; /***/ }), -/* 807 */ +/* 824 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137238,7 +142024,7 @@ module.exports = { var Class = __webpack_require__(0); var DataManager = __webpack_require__(118); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(22); +var SceneEvents = __webpack_require__(20); /** * @classdesc @@ -137353,7 +142139,7 @@ module.exports = DataManagerPlugin; /***/ }), -/* 808 */ +/* 825 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137368,18 +142154,18 @@ module.exports = DataManagerPlugin; module.exports = { - Align: __webpack_require__(809), - BaseShader: __webpack_require__(353), - Bounds: __webpack_require__(812), - Canvas: __webpack_require__(816), - Color: __webpack_require__(354), - Masks: __webpack_require__(825) + Align: __webpack_require__(826), + BaseShader: __webpack_require__(362), + Bounds: __webpack_require__(829), + Canvas: __webpack_require__(833), + Color: __webpack_require__(363), + Masks: __webpack_require__(842) }; /***/ }), -/* 809 */ +/* 826 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137388,7 +142174,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(106); +var CONST = __webpack_require__(107); var Extend = __webpack_require__(19); /** @@ -137397,8 +142183,8 @@ var Extend = __webpack_require__(19); var Align = { - In: __webpack_require__(810), - To: __webpack_require__(811) + In: __webpack_require__(827), + To: __webpack_require__(828) }; @@ -137409,7 +142195,7 @@ module.exports = Align; /***/ }), -/* 810 */ +/* 827 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137424,22 +142210,22 @@ module.exports = Align; module.exports = { - BottomCenter: __webpack_require__(260), - BottomLeft: __webpack_require__(261), - BottomRight: __webpack_require__(262), - Center: __webpack_require__(263), - LeftCenter: __webpack_require__(265), - QuickSet: __webpack_require__(259), - RightCenter: __webpack_require__(266), - TopCenter: __webpack_require__(267), - TopLeft: __webpack_require__(268), - TopRight: __webpack_require__(269) + BottomCenter: __webpack_require__(266), + BottomLeft: __webpack_require__(267), + BottomRight: __webpack_require__(268), + Center: __webpack_require__(269), + LeftCenter: __webpack_require__(271), + QuickSet: __webpack_require__(265), + RightCenter: __webpack_require__(272), + TopCenter: __webpack_require__(273), + TopLeft: __webpack_require__(274), + TopRight: __webpack_require__(275) }; /***/ }), -/* 811 */ +/* 828 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137454,25 +142240,25 @@ module.exports = { module.exports = { - BottomCenter: __webpack_require__(247), - BottomLeft: __webpack_require__(248), - BottomRight: __webpack_require__(249), - LeftBottom: __webpack_require__(250), - LeftCenter: __webpack_require__(251), - LeftTop: __webpack_require__(252), - QuickSet: __webpack_require__(246), - RightBottom: __webpack_require__(253), - RightCenter: __webpack_require__(254), - RightTop: __webpack_require__(255), - TopCenter: __webpack_require__(256), - TopLeft: __webpack_require__(257), - TopRight: __webpack_require__(258) + BottomCenter: __webpack_require__(253), + BottomLeft: __webpack_require__(254), + BottomRight: __webpack_require__(255), + LeftBottom: __webpack_require__(256), + LeftCenter: __webpack_require__(257), + LeftTop: __webpack_require__(258), + QuickSet: __webpack_require__(252), + RightBottom: __webpack_require__(259), + RightCenter: __webpack_require__(260), + RightTop: __webpack_require__(261), + TopCenter: __webpack_require__(262), + TopLeft: __webpack_require__(263), + TopRight: __webpack_require__(264) }; /***/ }), -/* 812 */ +/* 829 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137487,28 +142273,28 @@ module.exports = { module.exports = { - CenterOn: __webpack_require__(264), - GetBottom: __webpack_require__(34), - GetBounds: __webpack_require__(813), - GetCenterX: __webpack_require__(76), - GetCenterY: __webpack_require__(78), - GetLeft: __webpack_require__(35), - GetOffsetX: __webpack_require__(814), - GetOffsetY: __webpack_require__(815), - GetRight: __webpack_require__(36), - GetTop: __webpack_require__(37), - SetBottom: __webpack_require__(47), - SetCenterX: __webpack_require__(77), - SetCenterY: __webpack_require__(79), - SetLeft: __webpack_require__(45), - SetRight: __webpack_require__(46), - SetTop: __webpack_require__(44) + CenterOn: __webpack_require__(270), + GetBottom: __webpack_require__(35), + GetBounds: __webpack_require__(830), + GetCenterX: __webpack_require__(77), + GetCenterY: __webpack_require__(79), + GetLeft: __webpack_require__(36), + GetOffsetX: __webpack_require__(831), + GetOffsetY: __webpack_require__(832), + GetRight: __webpack_require__(37), + GetTop: __webpack_require__(38), + SetBottom: __webpack_require__(48), + SetCenterX: __webpack_require__(78), + SetCenterY: __webpack_require__(80), + SetLeft: __webpack_require__(46), + SetRight: __webpack_require__(47), + SetTop: __webpack_require__(45) }; /***/ }), -/* 813 */ +/* 830 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137517,10 +142303,10 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetBottom = __webpack_require__(34); -var GetLeft = __webpack_require__(35); -var GetRight = __webpack_require__(36); -var GetTop = __webpack_require__(37); +var GetBottom = __webpack_require__(35); +var GetLeft = __webpack_require__(36); +var GetRight = __webpack_require__(37); +var GetTop = __webpack_require__(38); /** * Returns the unrotated bounds of the Game Object as a rectangle. @@ -137552,7 +142338,7 @@ module.exports = GetBounds; /***/ }), -/* 814 */ +/* 831 */ /***/ (function(module, exports) { /** @@ -137582,7 +142368,7 @@ module.exports = GetOffsetX; /***/ }), -/* 815 */ +/* 832 */ /***/ (function(module, exports) { /** @@ -137612,7 +142398,7 @@ module.exports = GetOffsetY; /***/ }), -/* 816 */ +/* 833 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137627,17 +142413,17 @@ module.exports = GetOffsetY; module.exports = { - CanvasInterpolation: __webpack_require__(341), + CanvasInterpolation: __webpack_require__(349), CanvasPool: __webpack_require__(26), - Smoothing: __webpack_require__(173), - TouchAction: __webpack_require__(817), - UserSelect: __webpack_require__(818) + Smoothing: __webpack_require__(175), + TouchAction: __webpack_require__(834), + UserSelect: __webpack_require__(835) }; /***/ }), -/* 817 */ +/* 834 */ /***/ (function(module, exports) { /** @@ -137672,7 +142458,7 @@ module.exports = TouchAction; /***/ }), -/* 818 */ +/* 835 */ /***/ (function(module, exports) { /** @@ -137719,7 +142505,7 @@ module.exports = UserSelect; /***/ }), -/* 819 */ +/* 836 */ /***/ (function(module, exports) { /** @@ -137759,7 +142545,7 @@ module.exports = ColorToRGBA; /***/ }), -/* 820 */ +/* 837 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137768,8 +142554,8 @@ module.exports = ColorToRGBA; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Color = __webpack_require__(31); -var HueToComponent = __webpack_require__(356); +var Color = __webpack_require__(32); +var HueToComponent = __webpack_require__(365); /** * Converts HSL (hue, saturation and lightness) values to a Phaser Color object. @@ -137809,7 +142595,7 @@ module.exports = HSLToColor; /***/ }), -/* 821 */ +/* 838 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137818,7 +142604,7 @@ module.exports = HSLToColor; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HSVToRGB = __webpack_require__(172); +var HSVToRGB = __webpack_require__(174); /** * Get HSV color wheel values in an array which will be 360 elements in size. @@ -137850,7 +142636,7 @@ module.exports = HSVColorWheel; /***/ }), -/* 822 */ +/* 839 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137859,7 +142645,7 @@ module.exports = HSVColorWheel; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Linear = __webpack_require__(121); +var Linear = __webpack_require__(123); /** * @namespace Phaser.Display.Color.Interpolate @@ -137958,7 +142744,7 @@ module.exports = { /***/ }), -/* 823 */ +/* 840 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137967,8 +142753,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Between = __webpack_require__(178); -var Color = __webpack_require__(31); +var Between = __webpack_require__(180); +var Color = __webpack_require__(32); /** * Creates a new Color object where the r, g, and b values have been set to random values @@ -137994,7 +142780,7 @@ module.exports = RandomRGB; /***/ }), -/* 824 */ +/* 841 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138003,7 +142789,7 @@ module.exports = RandomRGB; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ComponentToHex = __webpack_require__(355); +var ComponentToHex = __webpack_require__(364); /** * Converts the color values into an HTML compatible color string, prefixed with either `#` or `0x`. @@ -138038,7 +142824,7 @@ module.exports = RGBToString; /***/ }), -/* 825 */ +/* 842 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138053,14 +142839,14 @@ module.exports = RGBToString; module.exports = { - BitmapMask: __webpack_require__(282), - GeometryMask: __webpack_require__(283) + BitmapMask: __webpack_require__(286), + GeometryMask: __webpack_require__(287) }; /***/ }), -/* 826 */ +/* 843 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138075,13 +142861,14 @@ module.exports = { var Dom = { - AddToDOM: __webpack_require__(128), - DOMContentLoaded: __webpack_require__(357), - GetScreenOrientation: __webpack_require__(358), - GetTarget: __webpack_require__(363), - ParseXML: __webpack_require__(364), - RemoveFromDOM: __webpack_require__(184), - RequestAnimationFrame: __webpack_require__(344) + AddToDOM: __webpack_require__(130), + DOMContentLoaded: __webpack_require__(366), + GetInnerHeight: __webpack_require__(367), + GetScreenOrientation: __webpack_require__(368), + GetTarget: __webpack_require__(373), + ParseXML: __webpack_require__(374), + RemoveFromDOM: __webpack_require__(186), + RequestAnimationFrame: __webpack_require__(352) }; @@ -138089,7 +142876,7 @@ module.exports = Dom; /***/ }), -/* 827 */ +/* 844 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138102,11 +142889,11 @@ module.exports = Dom; * @namespace Phaser.Events */ -module.exports = { EventEmitter: __webpack_require__(828) }; +module.exports = { EventEmitter: __webpack_require__(845) }; /***/ }), -/* 828 */ +/* 845 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138116,7 +142903,7 @@ module.exports = { EventEmitter: __webpack_require__(828) }; */ var Class = __webpack_require__(0); -var EE = __webpack_require__(11); +var EE = __webpack_require__(12); var PluginCache = __webpack_require__(23); /** @@ -138290,7 +143077,7 @@ module.exports = EventEmitter; /***/ }), -/* 829 */ +/* 846 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138299,33 +143086,33 @@ module.exports = EventEmitter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(128); -var AnimationManager = __webpack_require__(293); -var CacheManager = __webpack_require__(296); +var AddToDOM = __webpack_require__(130); +var AnimationManager = __webpack_require__(300); +var CacheManager = __webpack_require__(304); var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); -var Config = __webpack_require__(318); -var CreateDOMContainer = __webpack_require__(830); -var CreateRenderer = __webpack_require__(340); +var Config = __webpack_require__(326); +var CreateDOMContainer = __webpack_require__(847); +var CreateRenderer = __webpack_require__(348); var DataManager = __webpack_require__(118); -var DebugHeader = __webpack_require__(342); -var Device = __webpack_require__(319); -var DOMContentLoaded = __webpack_require__(357); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(20); -var InputManager = __webpack_require__(365); +var DebugHeader = __webpack_require__(350); +var Device = __webpack_require__(327); +var DOMContentLoaded = __webpack_require__(366); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(21); +var InputManager = __webpack_require__(375); var PluginCache = __webpack_require__(23); -var PluginManager = __webpack_require__(370); -var ScaleManager = __webpack_require__(371); -var SceneManager = __webpack_require__(373); -var TextureEvents = __webpack_require__(127); -var TextureManager = __webpack_require__(376); -var TimeStep = __webpack_require__(343); -var VisibilityHandler = __webpack_require__(345); +var PluginManager = __webpack_require__(380); +var ScaleManager = __webpack_require__(381); +var SceneManager = __webpack_require__(383); +var TextureEvents = __webpack_require__(129); +var TextureManager = __webpack_require__(388); +var TimeStep = __webpack_require__(351); +var VisibilityHandler = __webpack_require__(353); if (true) { - var SoundManagerCreator = __webpack_require__(380); + var SoundManagerCreator = __webpack_require__(392); } if (false) @@ -138993,7 +143780,7 @@ module.exports = Game; /***/ }), -/* 830 */ +/* 847 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139002,7 +143789,7 @@ module.exports = Game; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(128); +var AddToDOM = __webpack_require__(130); var CreateDOMContainer = function (game) { @@ -139037,7 +143824,7 @@ module.exports = CreateDOMContainer; /***/ }), -/* 831 */ +/* 848 */ /***/ (function(module, exports) { /** @@ -139058,7 +143845,7 @@ module.exports = 'boot'; /***/ }), -/* 832 */ +/* 849 */ /***/ (function(module, exports) { /** @@ -139079,7 +143866,7 @@ module.exports = 'destroy'; /***/ }), -/* 833 */ +/* 850 */ /***/ (function(module, exports) { /** @@ -139107,7 +143894,7 @@ module.exports = 'dragend'; /***/ }), -/* 834 */ +/* 851 */ /***/ (function(module, exports) { /** @@ -139138,7 +143925,7 @@ module.exports = 'dragenter'; /***/ }), -/* 835 */ +/* 852 */ /***/ (function(module, exports) { /** @@ -139170,7 +143957,7 @@ module.exports = 'drag'; /***/ }), -/* 836 */ +/* 853 */ /***/ (function(module, exports) { /** @@ -139201,7 +143988,7 @@ module.exports = 'dragleave'; /***/ }), -/* 837 */ +/* 854 */ /***/ (function(module, exports) { /** @@ -139235,7 +144022,7 @@ module.exports = 'dragover'; /***/ }), -/* 838 */ +/* 855 */ /***/ (function(module, exports) { /** @@ -139265,7 +144052,7 @@ module.exports = 'dragstart'; /***/ }), -/* 839 */ +/* 856 */ /***/ (function(module, exports) { /** @@ -139294,7 +144081,7 @@ module.exports = 'drop'; /***/ }), -/* 840 */ +/* 857 */ /***/ (function(module, exports) { /** @@ -139321,7 +144108,7 @@ module.exports = 'gameout'; /***/ }), -/* 841 */ +/* 858 */ /***/ (function(module, exports) { /** @@ -139348,7 +144135,7 @@ module.exports = 'gameover'; /***/ }), -/* 842 */ +/* 859 */ /***/ (function(module, exports) { /** @@ -139389,7 +144176,7 @@ module.exports = 'gameobjectdown'; /***/ }), -/* 843 */ +/* 860 */ /***/ (function(module, exports) { /** @@ -139420,7 +144207,7 @@ module.exports = 'dragend'; /***/ }), -/* 844 */ +/* 861 */ /***/ (function(module, exports) { /** @@ -139450,7 +144237,7 @@ module.exports = 'dragenter'; /***/ }), -/* 845 */ +/* 862 */ /***/ (function(module, exports) { /** @@ -139481,7 +144268,7 @@ module.exports = 'drag'; /***/ }), -/* 846 */ +/* 863 */ /***/ (function(module, exports) { /** @@ -139511,7 +144298,7 @@ module.exports = 'dragleave'; /***/ }), -/* 847 */ +/* 864 */ /***/ (function(module, exports) { /** @@ -139544,7 +144331,7 @@ module.exports = 'dragover'; /***/ }), -/* 848 */ +/* 865 */ /***/ (function(module, exports) { /** @@ -139578,7 +144365,7 @@ module.exports = 'dragstart'; /***/ }), -/* 849 */ +/* 866 */ /***/ (function(module, exports) { /** @@ -139608,7 +144395,7 @@ module.exports = 'drop'; /***/ }), -/* 850 */ +/* 867 */ /***/ (function(module, exports) { /** @@ -139649,7 +144436,7 @@ module.exports = 'gameobjectmove'; /***/ }), -/* 851 */ +/* 868 */ /***/ (function(module, exports) { /** @@ -139690,7 +144477,7 @@ module.exports = 'gameobjectout'; /***/ }), -/* 852 */ +/* 869 */ /***/ (function(module, exports) { /** @@ -139731,7 +144518,7 @@ module.exports = 'gameobjectover'; /***/ }), -/* 853 */ +/* 870 */ /***/ (function(module, exports) { /** @@ -139772,7 +144559,7 @@ module.exports = 'pointerdown'; /***/ }), -/* 854 */ +/* 871 */ /***/ (function(module, exports) { /** @@ -139813,7 +144600,7 @@ module.exports = 'pointermove'; /***/ }), -/* 855 */ +/* 872 */ /***/ (function(module, exports) { /** @@ -139852,7 +144639,7 @@ module.exports = 'pointerout'; /***/ }), -/* 856 */ +/* 873 */ /***/ (function(module, exports) { /** @@ -139893,7 +144680,7 @@ module.exports = 'pointerover'; /***/ }), -/* 857 */ +/* 874 */ /***/ (function(module, exports) { /** @@ -139934,7 +144721,7 @@ module.exports = 'pointerup'; /***/ }), -/* 858 */ +/* 875 */ /***/ (function(module, exports) { /** @@ -139976,7 +144763,7 @@ module.exports = 'wheel'; /***/ }), -/* 859 */ +/* 876 */ /***/ (function(module, exports) { /** @@ -140017,7 +144804,7 @@ module.exports = 'gameobjectup'; /***/ }), -/* 860 */ +/* 877 */ /***/ (function(module, exports) { /** @@ -140061,7 +144848,7 @@ module.exports = 'gameobjectwheel'; /***/ }), -/* 861 */ +/* 878 */ /***/ (function(module, exports) { /** @@ -140082,7 +144869,7 @@ module.exports = 'boot'; /***/ }), -/* 862 */ +/* 879 */ /***/ (function(module, exports) { /** @@ -140107,7 +144894,7 @@ module.exports = 'process'; /***/ }), -/* 863 */ +/* 880 */ /***/ (function(module, exports) { /** @@ -140128,7 +144915,7 @@ module.exports = 'update'; /***/ }), -/* 864 */ +/* 881 */ /***/ (function(module, exports) { /** @@ -140163,7 +144950,7 @@ module.exports = 'pointerdown'; /***/ }), -/* 865 */ +/* 882 */ /***/ (function(module, exports) { /** @@ -140197,7 +144984,7 @@ module.exports = 'pointerdownoutside'; /***/ }), -/* 866 */ +/* 883 */ /***/ (function(module, exports) { /** @@ -140232,7 +145019,7 @@ module.exports = 'pointermove'; /***/ }), -/* 867 */ +/* 884 */ /***/ (function(module, exports) { /** @@ -140267,7 +145054,7 @@ module.exports = 'pointerout'; /***/ }), -/* 868 */ +/* 885 */ /***/ (function(module, exports) { /** @@ -140302,7 +145089,7 @@ module.exports = 'pointerover'; /***/ }), -/* 869 */ +/* 886 */ /***/ (function(module, exports) { /** @@ -140337,7 +145124,7 @@ module.exports = 'pointerup'; /***/ }), -/* 870 */ +/* 887 */ /***/ (function(module, exports) { /** @@ -140371,7 +145158,7 @@ module.exports = 'pointerupoutside'; /***/ }), -/* 871 */ +/* 888 */ /***/ (function(module, exports) { /** @@ -140409,7 +145196,7 @@ module.exports = 'wheel'; /***/ }), -/* 872 */ +/* 889 */ /***/ (function(module, exports) { /** @@ -140433,7 +145220,7 @@ module.exports = 'pointerlockchange'; /***/ }), -/* 873 */ +/* 890 */ /***/ (function(module, exports) { /** @@ -140455,7 +145242,7 @@ module.exports = 'preupdate'; /***/ }), -/* 874 */ +/* 891 */ /***/ (function(module, exports) { /** @@ -140476,7 +145263,7 @@ module.exports = 'shutdown'; /***/ }), -/* 875 */ +/* 892 */ /***/ (function(module, exports) { /** @@ -140498,7 +145285,7 @@ module.exports = 'start'; /***/ }), -/* 876 */ +/* 893 */ /***/ (function(module, exports) { /** @@ -140523,66 +145310,7 @@ module.exports = 'update'; /***/ }), -/* 877 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Attempts to determine the document inner height across iOS and standard devices. - * Based on code by @tylerjpeterson - * - * @function Phaser.DOM.GetInnerHeight - * @since 3.16.0 - * - * @param {boolean} iOS - Is this running on iOS? - * - * @return {number} The inner height value. - */ -var GetInnerHeight = function (iOS) -{ - - if (!iOS) - { - return window.innerHeight; - } - - var axis = Math.abs(window.orientation); - - var size = { w: 0, h: 0 }; - - var ruler = document.createElement('div'); - - ruler.setAttribute('style', 'position: fixed; height: 100vh; width: 0; top: 0'); - - document.documentElement.appendChild(ruler); - - size.w = (axis === 90) ? ruler.offsetHeight : window.innerWidth; - size.h = (axis === 90) ? window.innerWidth : ruler.offsetHeight; - - document.documentElement.removeChild(ruler); - - ruler = null; - - if (Math.abs(window.orientation) !== 90) - { - return size.h; - } - else - { - return size.w; - } -}; - -module.exports = GetInnerHeight; - - -/***/ }), -/* 878 */ +/* 894 */ /***/ (function(module, exports) { /** @@ -140612,7 +145340,7 @@ module.exports = 'addfile'; /***/ }), -/* 879 */ +/* 895 */ /***/ (function(module, exports) { /** @@ -140640,7 +145368,7 @@ module.exports = 'complete'; /***/ }), -/* 880 */ +/* 896 */ /***/ (function(module, exports) { /** @@ -140669,7 +145397,7 @@ module.exports = 'filecomplete'; /***/ }), -/* 881 */ +/* 897 */ /***/ (function(module, exports) { /** @@ -140723,7 +145451,7 @@ module.exports = 'filecomplete-'; /***/ }), -/* 882 */ +/* 898 */ /***/ (function(module, exports) { /** @@ -140748,7 +145476,7 @@ module.exports = 'loaderror'; /***/ }), -/* 883 */ +/* 899 */ /***/ (function(module, exports) { /** @@ -140774,7 +145502,7 @@ module.exports = 'load'; /***/ }), -/* 884 */ +/* 900 */ /***/ (function(module, exports) { /** @@ -140801,7 +145529,7 @@ module.exports = 'fileprogress'; /***/ }), -/* 885 */ +/* 901 */ /***/ (function(module, exports) { /** @@ -140830,7 +145558,7 @@ module.exports = 'postprocess'; /***/ }), -/* 886 */ +/* 902 */ /***/ (function(module, exports) { /** @@ -140855,7 +145583,7 @@ module.exports = 'progress'; /***/ }), -/* 887 */ +/* 903 */ /***/ (function(module, exports) { /** @@ -140882,116 +145610,7 @@ module.exports = 'start'; /***/ }), -/* 888 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetFastValue = __webpack_require__(2); -var UppercaseFirst = __webpack_require__(187); - -/** - * Builds an array of which physics plugins should be activated for the given Scene. - * - * @function Phaser.Scenes.GetPhysicsPlugins - * @since 3.0.0 - * - * @param {Phaser.Scenes.Systems} sys - The scene system to get the physics systems of. - * - * @return {array} An array of Physics systems to start for this Scene. - */ -var GetPhysicsPlugins = function (sys) -{ - var defaultSystem = sys.game.config.defaultPhysicsSystem; - var sceneSystems = GetFastValue(sys.settings, 'physics', false); - - if (!defaultSystem && !sceneSystems) - { - // No default physics system or systems in this scene - return; - } - - // Let's build the systems array - var output = []; - - if (defaultSystem) - { - output.push(UppercaseFirst(defaultSystem + 'Physics')); - } - - if (sceneSystems) - { - for (var key in sceneSystems) - { - key = UppercaseFirst(key.concat('Physics')); - - if (output.indexOf(key) === -1) - { - output.push(key); - } - } - } - - // An array of Physics systems to start for this Scene - return output; -}; - -module.exports = GetPhysicsPlugins; - - -/***/ }), -/* 889 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetFastValue = __webpack_require__(2); - -/** - * Builds an array of which plugins (not including physics plugins) should be activated for the given Scene. - * - * @function Phaser.Scenes.GetScenePlugins - * @since 3.0.0 - * - * @param {Phaser.Scenes.Systems} sys - The Scene Systems object to check for plugins. - * - * @return {array} An array of all plugins which should be activated, either the default ones or the ones configured in the Scene Systems object. - */ -var GetScenePlugins = function (sys) -{ - var defaultPlugins = sys.plugins.getDefaultScenePlugins(); - - var scenePlugins = GetFastValue(sys.settings, 'plugins', false); - - // Scene Plugins always override Default Plugins - if (Array.isArray(scenePlugins)) - { - return scenePlugins; - } - else if (defaultPlugins) - { - return defaultPlugins; - } - else - { - // No default plugins or plugins in this scene - return []; - } -}; - -module.exports = GetScenePlugins; - - -/***/ }), -/* 890 */ +/* 904 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141013,6 +145632,7 @@ module.exports = GetScenePlugins; var InjectionMap = { game: 'game', + renderer: 'renderer', anims: 'anims', cache: 'cache', @@ -141052,7 +145672,7 @@ module.exports = InjectionMap; /***/ }), -/* 891 */ +/* 905 */ /***/ (function(module, exports) { /** @@ -141133,7 +145753,7 @@ module.exports = AtlasXML; /***/ }), -/* 892 */ +/* 906 */ /***/ (function(module, exports) { /** @@ -141168,7 +145788,7 @@ module.exports = Canvas; /***/ }), -/* 893 */ +/* 907 */ /***/ (function(module, exports) { /** @@ -141203,7 +145823,7 @@ module.exports = Image; /***/ }), -/* 894 */ +/* 908 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141212,7 +145832,7 @@ module.exports = Image; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clone = __webpack_require__(67); +var Clone = __webpack_require__(69); /** * Parses a Texture Atlas JSON Array and adds the Frames to the Texture. @@ -141312,7 +145932,7 @@ module.exports = JSONArray; /***/ }), -/* 895 */ +/* 909 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141321,7 +145941,7 @@ module.exports = JSONArray; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clone = __webpack_require__(67); +var Clone = __webpack_require__(69); /** * Parses a Texture Atlas JSON Hash and adds the Frames to the Texture. @@ -141358,6 +145978,11 @@ var JSONHash = function (texture, sourceIndex, json) for (var key in frames) { + if (!frames.hasOwnProperty(key)) + { + continue; + } + var src = frames[key]; // The frame values are the exact coordinates to cut the frame out of the atlas from @@ -141420,7 +146045,7 @@ module.exports = JSONHash; /***/ }), -/* 896 */ +/* 910 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141545,7 +146170,7 @@ module.exports = SpriteSheet; /***/ }), -/* 897 */ +/* 911 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141736,7 +146361,7 @@ module.exports = SpriteSheetFromAtlas; /***/ }), -/* 898 */ +/* 912 */ /***/ (function(module, exports) { /** @@ -141906,7 +146531,7 @@ TextureImporter: /***/ }), -/* 899 */ +/* 913 */ /***/ (function(module, exports) { /** @@ -141937,7 +146562,7 @@ module.exports = 'complete'; /***/ }), -/* 900 */ +/* 914 */ /***/ (function(module, exports) { /** @@ -141967,7 +146592,7 @@ module.exports = 'decoded'; /***/ }), -/* 901 */ +/* 915 */ /***/ (function(module, exports) { /** @@ -141999,7 +146624,7 @@ module.exports = 'decodedall'; /***/ }), -/* 902 */ +/* 916 */ /***/ (function(module, exports) { /** @@ -142031,7 +146656,7 @@ module.exports = 'destroy'; /***/ }), -/* 903 */ +/* 917 */ /***/ (function(module, exports) { /** @@ -142064,7 +146689,7 @@ module.exports = 'detune'; /***/ }), -/* 904 */ +/* 918 */ /***/ (function(module, exports) { /** @@ -142092,7 +146717,7 @@ module.exports = 'detune'; /***/ }), -/* 905 */ +/* 919 */ /***/ (function(module, exports) { /** @@ -142119,7 +146744,7 @@ module.exports = 'mute'; /***/ }), -/* 906 */ +/* 920 */ /***/ (function(module, exports) { /** @@ -142147,7 +146772,7 @@ module.exports = 'rate'; /***/ }), -/* 907 */ +/* 921 */ /***/ (function(module, exports) { /** @@ -142174,7 +146799,7 @@ module.exports = 'volume'; /***/ }), -/* 908 */ +/* 922 */ /***/ (function(module, exports) { /** @@ -142208,7 +146833,7 @@ module.exports = 'loop'; /***/ }), -/* 909 */ +/* 923 */ /***/ (function(module, exports) { /** @@ -142242,7 +146867,7 @@ module.exports = 'looped'; /***/ }), -/* 910 */ +/* 924 */ /***/ (function(module, exports) { /** @@ -142275,7 +146900,7 @@ module.exports = 'mute'; /***/ }), -/* 911 */ +/* 925 */ /***/ (function(module, exports) { /** @@ -142302,7 +146927,7 @@ module.exports = 'pauseall'; /***/ }), -/* 912 */ +/* 926 */ /***/ (function(module, exports) { /** @@ -142334,7 +146959,7 @@ module.exports = 'pause'; /***/ }), -/* 913 */ +/* 927 */ /***/ (function(module, exports) { /** @@ -142365,7 +146990,7 @@ module.exports = 'play'; /***/ }), -/* 914 */ +/* 928 */ /***/ (function(module, exports) { /** @@ -142398,7 +147023,7 @@ module.exports = 'rate'; /***/ }), -/* 915 */ +/* 929 */ /***/ (function(module, exports) { /** @@ -142425,7 +147050,7 @@ module.exports = 'resumeall'; /***/ }), -/* 916 */ +/* 930 */ /***/ (function(module, exports) { /** @@ -142458,7 +147083,7 @@ module.exports = 'resume'; /***/ }), -/* 917 */ +/* 931 */ /***/ (function(module, exports) { /** @@ -142491,7 +147116,7 @@ module.exports = 'seek'; /***/ }), -/* 918 */ +/* 932 */ /***/ (function(module, exports) { /** @@ -142518,7 +147143,7 @@ module.exports = 'stopall'; /***/ }), -/* 919 */ +/* 933 */ /***/ (function(module, exports) { /** @@ -142550,7 +147175,7 @@ module.exports = 'stop'; /***/ }), -/* 920 */ +/* 934 */ /***/ (function(module, exports) { /** @@ -142577,7 +147202,7 @@ module.exports = 'unlocked'; /***/ }), -/* 921 */ +/* 935 */ /***/ (function(module, exports) { /** @@ -142610,7 +147235,7 @@ module.exports = 'volume'; /***/ }), -/* 922 */ +/* 936 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142625,105 +147250,111 @@ module.exports = 'volume'; var GameObjects = { - Events: __webpack_require__(91), + Events: __webpack_require__(29), - DisplayList: __webpack_require__(923), + DisplayList: __webpack_require__(937), GameObjectCreator: __webpack_require__(16), GameObjectFactory: __webpack_require__(5), - UpdateList: __webpack_require__(949), + UpdateList: __webpack_require__(962), - Components: __webpack_require__(12), + Components: __webpack_require__(11), BuildGameObject: __webpack_require__(27), - BuildGameObjectAnimation: __webpack_require__(393), + BuildGameObjectAnimation: __webpack_require__(405), GameObject: __webpack_require__(14), - BitmapText: __webpack_require__(138), - Blitter: __webpack_require__(194), - Container: __webpack_require__(195), - DOMElement: __webpack_require__(395), - DynamicBitmapText: __webpack_require__(196), - Extern: __webpack_require__(397), - Graphics: __webpack_require__(197), - Group: __webpack_require__(98), - Image: __webpack_require__(111), - Particles: __webpack_require__(982), - PathFollower: __webpack_require__(409), - RenderTexture: __webpack_require__(201), - RetroFont: __webpack_require__(991), - Rope: __webpack_require__(203), - Sprite: __webpack_require__(75), - Text: __webpack_require__(204), - TileSprite: __webpack_require__(205), - Zone: __webpack_require__(114), - Video: __webpack_require__(206), + BitmapText: __webpack_require__(139), + Blitter: __webpack_require__(197), + Bob: __webpack_require__(406), + Container: __webpack_require__(198), + DOMElement: __webpack_require__(408), + DynamicBitmapText: __webpack_require__(199), + Extern: __webpack_require__(410), + Graphics: __webpack_require__(200), + Group: __webpack_require__(99), + Image: __webpack_require__(112), + Particles: __webpack_require__(993), + PathFollower: __webpack_require__(423), + RenderTexture: __webpack_require__(204), + RetroFont: __webpack_require__(1001), + Rope: __webpack_require__(206), + Sprite: __webpack_require__(76), + + Text: __webpack_require__(207), + GetTextSize: __webpack_require__(424), + MeasureText: __webpack_require__(426), + TextStyle: __webpack_require__(425), + + TileSprite: __webpack_require__(208), + Zone: __webpack_require__(115), + Video: __webpack_require__(209), // Shapes - Shape: __webpack_require__(29), - Arc: __webpack_require__(410), - Curve: __webpack_require__(411), - Ellipse: __webpack_require__(412), - Grid: __webpack_require__(413), - IsoBox: __webpack_require__(414), - IsoTriangle: __webpack_require__(415), - Line: __webpack_require__(416), - Polygon: __webpack_require__(417), - Rectangle: __webpack_require__(422), - Star: __webpack_require__(423), - Triangle: __webpack_require__(424), + Shape: __webpack_require__(30), + Arc: __webpack_require__(427), + Curve: __webpack_require__(428), + Ellipse: __webpack_require__(429), + Grid: __webpack_require__(430), + IsoBox: __webpack_require__(431), + IsoTriangle: __webpack_require__(432), + Line: __webpack_require__(433), + Polygon: __webpack_require__(434), + Rectangle: __webpack_require__(439), + Star: __webpack_require__(440), + Triangle: __webpack_require__(441), // Game Object Factories Factories: { - Blitter: __webpack_require__(1042), - Container: __webpack_require__(1043), - DOMElement: __webpack_require__(1044), - DynamicBitmapText: __webpack_require__(1045), - Extern: __webpack_require__(1046), - Graphics: __webpack_require__(1047), - Group: __webpack_require__(1048), - Image: __webpack_require__(1049), - Particles: __webpack_require__(1050), - PathFollower: __webpack_require__(1051), - RenderTexture: __webpack_require__(1052), - Rope: __webpack_require__(1053), - Sprite: __webpack_require__(1054), - StaticBitmapText: __webpack_require__(1055), - Text: __webpack_require__(1056), - TileSprite: __webpack_require__(1057), - Zone: __webpack_require__(1058), - Video: __webpack_require__(1059), + Blitter: __webpack_require__(1049), + Container: __webpack_require__(1050), + DOMElement: __webpack_require__(1051), + DynamicBitmapText: __webpack_require__(1052), + Extern: __webpack_require__(1053), + Graphics: __webpack_require__(1054), + Group: __webpack_require__(1055), + Image: __webpack_require__(1056), + Particles: __webpack_require__(1057), + PathFollower: __webpack_require__(1058), + RenderTexture: __webpack_require__(1059), + Rope: __webpack_require__(1060), + Sprite: __webpack_require__(1061), + StaticBitmapText: __webpack_require__(1062), + Text: __webpack_require__(1063), + TileSprite: __webpack_require__(1064), + Zone: __webpack_require__(1065), + Video: __webpack_require__(1066), // Shapes - Arc: __webpack_require__(1060), - Curve: __webpack_require__(1061), - Ellipse: __webpack_require__(1062), - Grid: __webpack_require__(1063), - IsoBox: __webpack_require__(1064), - IsoTriangle: __webpack_require__(1065), - Line: __webpack_require__(1066), - Polygon: __webpack_require__(1067), - Rectangle: __webpack_require__(1068), - Star: __webpack_require__(1069), - Triangle: __webpack_require__(1070) + Arc: __webpack_require__(1067), + Curve: __webpack_require__(1068), + Ellipse: __webpack_require__(1069), + Grid: __webpack_require__(1070), + IsoBox: __webpack_require__(1071), + IsoTriangle: __webpack_require__(1072), + Line: __webpack_require__(1073), + Polygon: __webpack_require__(1074), + Rectangle: __webpack_require__(1075), + Star: __webpack_require__(1076), + Triangle: __webpack_require__(1077) }, Creators: { - Blitter: __webpack_require__(1071), - Container: __webpack_require__(1072), - DynamicBitmapText: __webpack_require__(1073), - Graphics: __webpack_require__(1074), - Group: __webpack_require__(1075), - Image: __webpack_require__(1076), - Particles: __webpack_require__(1077), - RenderTexture: __webpack_require__(1078), - Rope: __webpack_require__(1079), - Sprite: __webpack_require__(1080), - StaticBitmapText: __webpack_require__(1081), - Text: __webpack_require__(1082), - TileSprite: __webpack_require__(1083), - Zone: __webpack_require__(1084), - Video: __webpack_require__(1085) + Blitter: __webpack_require__(1078), + Container: __webpack_require__(1079), + DynamicBitmapText: __webpack_require__(1080), + Graphics: __webpack_require__(1081), + Group: __webpack_require__(1082), + Image: __webpack_require__(1083), + Particles: __webpack_require__(1084), + RenderTexture: __webpack_require__(1085), + Rope: __webpack_require__(1086), + Sprite: __webpack_require__(1087), + StaticBitmapText: __webpack_require__(1088), + Text: __webpack_require__(1089), + TileSprite: __webpack_require__(1090), + Zone: __webpack_require__(1091), + Video: __webpack_require__(1092) } }; @@ -142731,29 +147362,28 @@ var GameObjects = { if (true) { // WebGL only Game Objects - GameObjects.Mesh = __webpack_require__(140); - GameObjects.Quad = __webpack_require__(209); - GameObjects.Shader = __webpack_require__(210); + GameObjects.Mesh = __webpack_require__(141); + GameObjects.Quad = __webpack_require__(212); + GameObjects.Shader = __webpack_require__(213); - GameObjects.Factories.Mesh = __webpack_require__(1092); - GameObjects.Factories.Quad = __webpack_require__(1093); - GameObjects.Factories.Shader = __webpack_require__(1094); + GameObjects.Factories.Mesh = __webpack_require__(1099); + GameObjects.Factories.Quad = __webpack_require__(1100); + GameObjects.Factories.Shader = __webpack_require__(1101); - GameObjects.Creators.Mesh = __webpack_require__(1095); - GameObjects.Creators.Quad = __webpack_require__(1096); - GameObjects.Creators.Shader = __webpack_require__(1097); + GameObjects.Creators.Mesh = __webpack_require__(1102); + GameObjects.Creators.Quad = __webpack_require__(1103); + GameObjects.Creators.Shader = __webpack_require__(1104); - GameObjects.Light = __webpack_require__(428); - - __webpack_require__(429); - __webpack_require__(1098); + GameObjects.Light = __webpack_require__(445); + GameObjects.LightsManager = __webpack_require__(446); + GameObjects.LightsPlugin = __webpack_require__(1105); } module.exports = GameObjects; /***/ }), -/* 923 */ +/* 937 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142763,10 +147393,11 @@ module.exports = GameObjects; */ var Class = __webpack_require__(0); -var List = __webpack_require__(135); +var List = __webpack_require__(136); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(22); -var StableSort = __webpack_require__(137); +var GameObjectEvents = __webpack_require__(29); +var SceneEvents = __webpack_require__(20); +var StableSort = __webpack_require__(138); /** * @classdesc @@ -142822,8 +147453,21 @@ var DisplayList = new Class({ */ this.systems = scene.sys; - scene.sys.events.once(SceneEvents.BOOT, this.boot, this); - scene.sys.events.on(SceneEvents.START, this.start, this); + /** + * The Scene's Event Emitter. + * + * @name Phaser.GameObjects.DisplayList#events + * @type {Phaser.Events.EventEmitter} + * @since 3.50.0 + */ + this.events = scene.sys.events; + + // Set the List callbacks + this.addCallback = this.addChildCallback; + this.removeCallback = this.removeChildCallback; + + this.events.once(SceneEvents.BOOT, this.boot, this); + this.events.on(SceneEvents.START, this.start, this); }, /** @@ -142836,7 +147480,43 @@ var DisplayList = new Class({ */ boot: function () { - this.systems.events.once(SceneEvents.DESTROY, this.destroy, this); + this.events.once(SceneEvents.DESTROY, this.destroy, this); + }, + + /** + * Internal method called from `List.addCallback`. + * + * @method Phaser.GameObjects.DisplayList#addChildCallback + * @private + * @fires Phaser.Scenes.Events#ADDED_TO_SCENE + * @fires Phaser.GameObjects.Events#ADDED_TO_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the list. + */ + addChildCallback: function (gameObject) + { + gameObject.emit(GameObjectEvents.ADDED_TO_SCENE, gameObject, this.scene); + + this.events.emit(SceneEvents.ADDED_TO_SCENE, gameObject, this.scene); + }, + + /** + * Internal method called from `List.removeCallback`. + * + * @method Phaser.GameObjects.DisplayList#removeChildCallback + * @private + * @fires Phaser.Scenes.Events#REMOVED_FROM_SCENE + * @fires Phaser.GameObjects.Events#REMOVED_FROM_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the list. + */ + removeChildCallback: function (gameObject) + { + gameObject.emit(GameObjectEvents.REMOVED_FROM_SCENE, gameObject, this.scene); + + this.events.emit(SceneEvents.REMOVED_FROM_SCENE, gameObject, this.scene); }, /** @@ -142850,7 +147530,7 @@ var DisplayList = new Class({ */ start: function () { - this.systems.events.once(SceneEvents.SHUTDOWN, this.shutdown, this); + this.events.once(SceneEvents.SHUTDOWN, this.shutdown, this); }, /** @@ -142874,7 +147554,7 @@ var DisplayList = new Class({ { if (this.sortChildrenFlag) { - StableSort.inplace(this.list, this.sortByDepth); + StableSort(this.list, this.sortByDepth); this.sortChildrenFlag = false; } @@ -142920,16 +147600,18 @@ var DisplayList = new Class({ */ shutdown: function () { - var i = this.list.length; + var list = this.list; + + var i = list.length; while (i--) { - this.list[i].destroy(true); + list[i].destroy(true); } - this.list.length = 0; + list.length = 0; - this.systems.events.off(SceneEvents.SHUTDOWN, this.shutdown, this); + this.events.off(SceneEvents.SHUTDOWN, this.shutdown, this); }, /** @@ -142944,10 +147626,11 @@ var DisplayList = new Class({ { this.shutdown(); - this.scene.sys.events.off(SceneEvents.START, this.start, this); + this.events.off(SceneEvents.START, this.start, this); this.scene = null; this.systems = null; + this.events = null; } }); @@ -142958,7 +147641,7 @@ module.exports = DisplayList; /***/ }), -/* 924 */ +/* 938 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142973,21 +147656,21 @@ module.exports = DisplayList; module.exports = { - CheckMatrix: __webpack_require__(190), - MatrixToString: __webpack_require__(925), - ReverseColumns: __webpack_require__(926), - ReverseRows: __webpack_require__(927), - Rotate180: __webpack_require__(928), - RotateLeft: __webpack_require__(929), - RotateMatrix: __webpack_require__(136), - RotateRight: __webpack_require__(930), - TransposeMatrix: __webpack_require__(390) + CheckMatrix: __webpack_require__(193), + MatrixToString: __webpack_require__(939), + ReverseColumns: __webpack_require__(940), + ReverseRows: __webpack_require__(941), + Rotate180: __webpack_require__(942), + RotateLeft: __webpack_require__(943), + RotateMatrix: __webpack_require__(137), + RotateRight: __webpack_require__(944), + TransposeMatrix: __webpack_require__(401) }; /***/ }), -/* 925 */ +/* 939 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142996,8 +147679,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Pad = __webpack_require__(169); -var CheckMatrix = __webpack_require__(190); +var Pad = __webpack_require__(171); +var CheckMatrix = __webpack_require__(193); /** * Generates a string (which you can pass to console.log) from the given Array Matrix. @@ -143068,7 +147751,7 @@ module.exports = MatrixToString; /***/ }), -/* 926 */ +/* 940 */ /***/ (function(module, exports) { /** @@ -143099,7 +147782,7 @@ module.exports = ReverseColumns; /***/ }), -/* 927 */ +/* 941 */ /***/ (function(module, exports) { /** @@ -143135,7 +147818,7 @@ module.exports = ReverseRows; /***/ }), -/* 928 */ +/* 942 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143144,7 +147827,7 @@ module.exports = ReverseRows; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(136); +var RotateMatrix = __webpack_require__(137); /** * Rotates the array matrix 180 degrees. @@ -143168,7 +147851,7 @@ module.exports = Rotate180; /***/ }), -/* 929 */ +/* 943 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143177,7 +147860,7 @@ module.exports = Rotate180; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(136); +var RotateMatrix = __webpack_require__(137); /** * Rotates the array matrix to the left (or 90 degrees) @@ -143201,7 +147884,7 @@ module.exports = RotateLeft; /***/ }), -/* 930 */ +/* 944 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143210,7 +147893,7 @@ module.exports = RotateLeft; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(136); +var RotateMatrix = __webpack_require__(137); /** * Rotates the array matrix to the left (or -90 degrees) @@ -143234,7 +147917,7 @@ module.exports = RotateRight; /***/ }), -/* 931 */ +/* 945 */ /***/ (function(module, exports) { /** @@ -143351,7 +148034,7 @@ module.exports = Add; /***/ }), -/* 932 */ +/* 946 */ /***/ (function(module, exports) { /** @@ -143473,7 +148156,7 @@ module.exports = AddAt; /***/ }), -/* 933 */ +/* 947 */ /***/ (function(module, exports) { /** @@ -143511,7 +148194,7 @@ module.exports = BringToTop; /***/ }), -/* 934 */ +/* 948 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143520,7 +148203,7 @@ module.exports = BringToTop; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SafeRange = __webpack_require__(68); +var SafeRange = __webpack_require__(70); /** * Returns the total number of elements in the array which have a property matching the given value. @@ -143563,7 +148246,7 @@ module.exports = CountAllMatching; /***/ }), -/* 935 */ +/* 949 */ /***/ (function(module, exports) { /** @@ -143609,7 +148292,7 @@ module.exports = Each; /***/ }), -/* 936 */ +/* 950 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143618,7 +148301,7 @@ module.exports = Each; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SafeRange = __webpack_require__(68); +var SafeRange = __webpack_require__(70); /** * Passes each element in the array, between the start and end indexes, to the given callback. @@ -143665,7 +148348,7 @@ module.exports = EachInRange; /***/ }), -/* 937 */ +/* 951 */ /***/ (function(module, exports) { /** @@ -143707,7 +148390,7 @@ module.exports = MoveDown; /***/ }), -/* 938 */ +/* 952 */ /***/ (function(module, exports) { /** @@ -143754,7 +148437,7 @@ module.exports = MoveTo; /***/ }), -/* 939 */ +/* 953 */ /***/ (function(module, exports) { /** @@ -143796,71 +148479,7 @@ module.exports = MoveUp; /***/ }), -/* 940 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Create an array representing the range of numbers (usually integers), between, and inclusive of, - * the given `start` and `end` arguments. For example: - * - * `var array = numberArray(2, 4); // array = [2, 3, 4]` - * `var array = numberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]` - * - * This is equivalent to `numberArrayStep(start, end, 1)`. - * - * You can optionally provide a prefix and / or suffix string. If given the array will contain - * strings, not integers. For example: - * - * `var array = numberArray(1, 4, 'Level '); // array = ["Level 1", "Level 2", "Level 3", "Level 4"]` - * `var array = numberArray(5, 7, 'HD-', '.png'); // array = ["HD-5.png", "HD-6.png", "HD-7.png"]` - * - * @function Phaser.Utils.Array.NumberArray - * @since 3.0.0 - * - * @param {number} start - The minimum value the array starts with. - * @param {number} end - The maximum value the array contains. - * @param {string} [prefix] - Optional prefix to place before the number. If provided the array will contain strings, not integers. - * @param {string} [suffix] - Optional suffix to place after the number. If provided the array will contain strings, not integers. - * - * @return {(number[]|string[])} The array of number values, or strings if a prefix or suffix was provided. - */ -var NumberArray = function (start, end, prefix, suffix) -{ - var result = []; - - for (var i = start; i <= end; i++) - { - if (prefix || suffix) - { - var key = (prefix) ? prefix + i.toString() : i.toString(); - - if (suffix) - { - key = key.concat(suffix); - } - - result.push(key); - } - else - { - result.push(i); - } - } - - return result; -}; - -module.exports = NumberArray; - - -/***/ }), -/* 941 */ +/* 954 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143869,7 +148488,7 @@ module.exports = NumberArray; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RoundAwayFromZero = __webpack_require__(336); +var RoundAwayFromZero = __webpack_require__(344); /** * Create an array of numbers (positive and/or negative) progressing from `start` @@ -143937,7 +148556,7 @@ module.exports = NumberArrayStep; /***/ }), -/* 942 */ +/* 955 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143946,7 +148565,7 @@ module.exports = NumberArrayStep; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SpliceOne = __webpack_require__(81); +var SpliceOne = __webpack_require__(82); /** * Removes the item from the given position in the array. @@ -143988,7 +148607,7 @@ module.exports = RemoveAt; /***/ }), -/* 943 */ +/* 956 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143997,7 +148616,7 @@ module.exports = RemoveAt; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SafeRange = __webpack_require__(68); +var SafeRange = __webpack_require__(70); /** * Removes the item within the given range in the array. @@ -144051,7 +148670,7 @@ module.exports = RemoveBetween; /***/ }), -/* 944 */ +/* 957 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144060,7 +148679,7 @@ module.exports = RemoveBetween; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SpliceOne = __webpack_require__(81); +var SpliceOne = __webpack_require__(82); /** * Removes a random object from the given array and returns it. @@ -144089,7 +148708,7 @@ module.exports = RemoveRandomElement; /***/ }), -/* 945 */ +/* 958 */ /***/ (function(module, exports) { /** @@ -144133,7 +148752,7 @@ module.exports = Replace; /***/ }), -/* 946 */ +/* 959 */ /***/ (function(module, exports) { /** @@ -144171,7 +148790,7 @@ module.exports = SendToBack; /***/ }), -/* 947 */ +/* 960 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144180,7 +148799,7 @@ module.exports = SendToBack; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SafeRange = __webpack_require__(68); +var SafeRange = __webpack_require__(70); /** * Scans the array for elements with the given property. If found, the property is set to the `value`. @@ -144226,7 +148845,7 @@ module.exports = SetAll; /***/ }), -/* 948 */ +/* 961 */ /***/ (function(module, exports) { /** @@ -144274,7 +148893,7 @@ module.exports = Swap; /***/ }), -/* 949 */ +/* 962 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144284,9 +148903,9 @@ module.exports = Swap; */ var Class = __webpack_require__(0); -var ProcessQueue = __webpack_require__(192); +var ProcessQueue = __webpack_require__(195); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(22); +var SceneEvents = __webpack_require__(20); /** * @classdesc @@ -144314,6 +148933,9 @@ var UpdateList = new Class({ { ProcessQueue.call(this); + // No duplicates in this list + this.checkQueue = true; + /** * The Scene that the Update List belongs to. * @@ -144436,7 +149058,7 @@ var UpdateList = new Class({ /** * The Scene that owns this plugin is shutting down. - * + * * We need to kill and reset all internal properties as well as stop listening to Scene events. * * @method Phaser.GameObjects.UpdateList#shutdown @@ -144482,7 +149104,7 @@ var UpdateList = new Class({ /** * The Scene that owns this plugin is being destroyed. - * + * * We need to shutdown and then kill off all external references. * * @method Phaser.GameObjects.UpdateList#destroy @@ -144500,7 +149122,7 @@ var UpdateList = new Class({ /** * Adds a new item to the Update List. - * + * * The item is added to the pending list and made active in the next update. * * @method Phaser.GameObjects.UpdateList#add @@ -144513,7 +149135,7 @@ var UpdateList = new Class({ /** * Removes an item from the Update List. - * + * * The item is added to the pending destroy and fully removed in the next update. * * @method Phaser.GameObjects.UpdateList#remove @@ -144526,7 +149148,7 @@ var UpdateList = new Class({ /** * Removes all active items from this Update List. - * + * * All the items are marked as 'pending destroy' and fully removed in the next update. * * @method Phaser.GameObjects.UpdateList#removeAll @@ -144537,7 +149159,7 @@ var UpdateList = new Class({ /** * Update this queue. First it will process any items awaiting destruction, and remove them. - * + * * Then it will check to see if there are any items pending insertion, and move them to an * active state. Finally, it will return a list of active items for further processing. * @@ -144549,7 +149171,7 @@ var UpdateList = new Class({ /** * Returns the current list of active items. - * + * * This method returns a reference to the active list array, not a copy of it. * Therefore, be careful to not modify this array outside of the ProcessQueue. * @@ -144575,29 +149197,7 @@ module.exports = UpdateList; /***/ }), -/* 950 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Structs.Events - */ - -module.exports = { - - PROCESS_QUEUE_ADD: __webpack_require__(951), - PROCESS_QUEUE_REMOVE: __webpack_require__(952) - -}; - - -/***/ }), -/* 951 */ +/* 963 */ /***/ (function(module, exports) { /** @@ -144624,7 +149224,7 @@ module.exports = 'add'; /***/ }), -/* 952 */ +/* 964 */ /***/ (function(module, exports) { /** @@ -144651,7 +149251,7 @@ module.exports = 'remove'; /***/ }), -/* 953 */ +/* 965 */ /***/ (function(module, exports) { /** @@ -145173,7 +149773,7 @@ module.exports = GetBitmapTextSize; /***/ }), -/* 954 */ +/* 966 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145182,7 +149782,7 @@ module.exports = GetBitmapTextSize; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ParseXMLBitmapFont = __webpack_require__(193); +var ParseXMLBitmapFont = __webpack_require__(196); /** * Parse an XML Bitmap Font from an Atlas. @@ -145227,7 +149827,7 @@ module.exports = ParseFromAtlas; /***/ }), -/* 955 */ +/* 967 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145241,12 +149841,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(956); + renderWebGL = __webpack_require__(968); } if (true) { - renderCanvas = __webpack_require__(958); + renderCanvas = __webpack_require__(970); } module.exports = { @@ -145258,7 +149858,7 @@ module.exports = { /***/ }), -/* 956 */ +/* 968 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145267,7 +149867,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BatchChar = __webpack_require__(957); +var BatchChar = __webpack_require__(969); var Utils = __webpack_require__(10); /** @@ -145418,7 +150018,7 @@ module.exports = BitmapTextWebGLRenderer; /***/ }), -/* 957 */ +/* 969 */ /***/ (function(module, exports) { /** @@ -145477,7 +150077,7 @@ module.exports = BatchChar; /***/ }), -/* 958 */ +/* 970 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145659,7 +150259,7 @@ module.exports = BitmapTextCanvasRenderer; /***/ }), -/* 959 */ +/* 971 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145673,12 +150273,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(960); + renderWebGL = __webpack_require__(972); } if (true) { - renderCanvas = __webpack_require__(961); + renderCanvas = __webpack_require__(973); } module.exports = { @@ -145690,7 +150290,7 @@ module.exports = { /***/ }), -/* 960 */ +/* 972 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145820,7 +150420,7 @@ module.exports = BlitterWebGLRenderer; /***/ }), -/* 961 */ +/* 973 */ /***/ (function(module, exports) { /** @@ -145950,437 +150550,7 @@ module.exports = BlitterCanvasRenderer; /***/ }), -/* 962 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var Frame = __webpack_require__(95); - -/** - * @classdesc - * A Bob Game Object. - * - * A Bob belongs to a Blitter Game Object. The Blitter is responsible for managing and rendering this object. - * - * A Bob has a position, alpha value and a frame from a texture that it uses to render with. You can also toggle - * the flipped and visible state of the Bob. The Frame the Bob uses to render can be changed dynamically, but it - * must be a Frame within the Texture used by the parent Blitter. - * - * Bob positions are relative to the Blitter parent. So if you move the Blitter parent, all Bob children will - * have their positions impacted by this change as well. - * - * You can manipulate Bob objects directly from your game code, but the creation and destruction of them should be - * handled via the Blitter parent. - * - * @class Bob - * @memberof Phaser.GameObjects - * @constructor - * @since 3.0.0 - * - * @param {Phaser.GameObjects.Blitter} blitter - The parent Blitter object is responsible for updating this Bob. - * @param {number} x - The horizontal position of this Game Object in the world, relative to the parent Blitter position. - * @param {number} y - The vertical position of this Game Object in the world, relative to the parent Blitter position. - * @param {(string|integer)} frame - The Frame this Bob will render with, as defined in the Texture the parent Blitter is using. - * @param {boolean} visible - Should the Bob render visible or not to start with? - */ -var Bob = new Class({ - - initialize: - - function Bob (blitter, x, y, frame, visible) - { - /** - * The Blitter object that this Bob belongs to. - * - * @name Phaser.GameObjects.Bob#parent - * @type {Phaser.GameObjects.Blitter} - * @since 3.0.0 - */ - this.parent = blitter; - - /** - * The x position of this Bob, relative to the x position of the Blitter. - * - * @name Phaser.GameObjects.Bob#x - * @type {number} - * @since 3.0.0 - */ - this.x = x; - - /** - * The y position of this Bob, relative to the y position of the Blitter. - * - * @name Phaser.GameObjects.Bob#y - * @type {number} - * @since 3.0.0 - */ - this.y = y; - - /** - * The frame that the Bob uses to render with. - * To change the frame use the `Bob.setFrame` method. - * - * @name Phaser.GameObjects.Bob#frame - * @type {Phaser.Textures.Frame} - * @protected - * @since 3.0.0 - */ - this.frame = frame; - - /** - * A blank object which can be used to store data related to this Bob in. - * - * @name Phaser.GameObjects.Bob#data - * @type {object} - * @default {} - * @since 3.0.0 - */ - this.data = {}; - - /** - * The tint value of this Bob. - * - * @name Phaser.GameObjects.Bob#tint - * @type {number} - * @default 0xffffff - * @since 3.20.0 - */ - this.tint = 0xffffff; - - /** - * The visible state of this Bob. - * - * @name Phaser.GameObjects.Bob#_visible - * @type {boolean} - * @private - * @since 3.0.0 - */ - this._visible = visible; - - /** - * The alpha value of this Bob. - * - * @name Phaser.GameObjects.Bob#_alpha - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - this._alpha = 1; - - /** - * The horizontally flipped state of the Bob. - * A Bob that is flipped horizontally will render inversed on the horizontal axis. - * Flipping always takes place from the middle of the texture. - * - * @name Phaser.GameObjects.Bob#flipX - * @type {boolean} - * @since 3.0.0 - */ - this.flipX = false; - - /** - * The vertically flipped state of the Bob. - * A Bob that is flipped vertically will render inversed on the vertical axis (i.e. upside down) - * Flipping always takes place from the middle of the texture. - * - * @name Phaser.GameObjects.Bob#flipY - * @type {boolean} - * @since 3.0.0 - */ - this.flipY = false; - }, - - /** - * Changes the Texture Frame being used by this Bob. - * The frame must be part of the Texture the parent Blitter is using. - * If no value is given it will use the default frame of the Blitter parent. - * - * @method Phaser.GameObjects.Bob#setFrame - * @since 3.0.0 - * - * @param {(string|integer|Phaser.Textures.Frame)} [frame] - The frame to be used during rendering. - * - * @return {this} This Bob Game Object. - */ - setFrame: function (frame) - { - if (frame === undefined) - { - this.frame = this.parent.frame; - } - else if (frame instanceof Frame && frame.texture === this.parent.texture) - { - this.frame = frame; - } - else - { - this.frame = this.parent.texture.get(frame); - } - - return this; - }, - - /** - * Resets the horizontal and vertical flipped state of this Bob back to their default un-flipped state. - * - * @method Phaser.GameObjects.Bob#resetFlip - * @since 3.0.0 - * - * @return {this} This Bob Game Object. - */ - resetFlip: function () - { - this.flipX = false; - this.flipY = false; - - return this; - }, - - /** - * Resets this Bob. - * - * Changes the position to the values given, and optionally changes the frame. - * - * Also resets the flipX and flipY values, sets alpha back to 1 and visible to true. - * - * @method Phaser.GameObjects.Bob#reset - * @since 3.0.0 - * - * @param {number} x - The x position of the Bob. Bob coordinate are relative to the position of the Blitter object. - * @param {number} y - The y position of the Bob. Bob coordinate are relative to the position of the Blitter object. - * @param {(string|integer|Phaser.Textures.Frame)} [frame] - The Frame the Bob will use. It _must_ be part of the Texture the parent Blitter object is using. - * - * @return {this} This Bob Game Object. - */ - reset: function (x, y, frame) - { - this.x = x; - this.y = y; - - this.flipX = false; - this.flipY = false; - - this._alpha = 1; - this._visible = true; - - this.parent.dirty = true; - - if (frame) - { - this.setFrame(frame); - } - - return this; - }, - - /** - * Changes the position of this Bob to the values given. - * - * @method Phaser.GameObjects.Bob#setPosition - * @since 3.20.0 - * - * @param {number} x - The x position of the Bob. Bob coordinate are relative to the position of the Blitter object. - * @param {number} y - The y position of the Bob. Bob coordinate are relative to the position of the Blitter object. - * - * @return {this} This Bob Game Object. - */ - setPosition: function (x, y) - { - this.x = x; - this.y = y; - - return this; - }, - - /** - * Sets the horizontal flipped state of this Bob. - * - * @method Phaser.GameObjects.Bob#setFlipX - * @since 3.0.0 - * - * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped. - * - * @return {this} This Bob Game Object. - */ - setFlipX: function (value) - { - this.flipX = value; - - return this; - }, - - /** - * Sets the vertical flipped state of this Bob. - * - * @method Phaser.GameObjects.Bob#setFlipY - * @since 3.0.0 - * - * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped. - * - * @return {this} This Bob Game Object. - */ - setFlipY: function (value) - { - this.flipY = value; - - return this; - }, - - /** - * Sets the horizontal and vertical flipped state of this Bob. - * - * @method Phaser.GameObjects.Bob#setFlip - * @since 3.0.0 - * - * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped. - * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped. - * - * @return {this} This Bob Game Object. - */ - setFlip: function (x, y) - { - this.flipX = x; - this.flipY = y; - - return this; - }, - - /** - * Sets the visibility of this Bob. - * - * An invisible Bob will skip rendering. - * - * @method Phaser.GameObjects.Bob#setVisible - * @since 3.0.0 - * - * @param {boolean} value - The visible state of the Game Object. - * - * @return {this} This Bob Game Object. - */ - setVisible: function (value) - { - this.visible = value; - - return this; - }, - - /** - * Set the Alpha level of this Bob. 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. - * - * A Bob with alpha 0 will skip rendering. - * - * @method Phaser.GameObjects.Bob#setAlpha - * @since 3.0.0 - * - * @param {number} value - The alpha value used for this Bob. Between 0 and 1. - * - * @return {this} This Bob Game Object. - */ - setAlpha: function (value) - { - this.alpha = value; - - return this; - }, - - /** - * Sets the tint of this Bob. - * - * @method Phaser.GameObjects.Bob#setTint - * @since 3.20.0 - * - * @param {number} value - The tint value used for this Bob. Between 0 and 0xffffff. - * - * @return {this} This Bob Game Object. - */ - setTint: function (value) - { - this.tint = value; - - return this; - }, - - /** - * Destroys this Bob instance. - * Removes itself from the Blitter and clears the parent, frame and data properties. - * - * @method Phaser.GameObjects.Bob#destroy - * @since 3.0.0 - */ - destroy: function () - { - this.parent.dirty = true; - - this.parent.children.remove(this); - - this.parent = undefined; - this.frame = undefined; - this.data = undefined; - }, - - /** - * The visible state of the Bob. - * - * An invisible Bob will skip rendering. - * - * @name Phaser.GameObjects.Bob#visible - * @type {boolean} - * @since 3.0.0 - */ - visible: { - - get: function () - { - return this._visible; - }, - - set: function (value) - { - this.parent.dirty |= (this._visible !== value); - this._visible = value; - } - - }, - - /** - * The alpha value of the Bob, between 0 and 1. - * - * A Bob with alpha 0 will skip rendering. - * - * @name Phaser.GameObjects.Bob#alpha - * @type {number} - * @since 3.0.0 - */ - alpha: { - - get: function () - { - return this._alpha; - }, - - set: function (value) - { - this.parent.dirty |= ((this._alpha > 0) !== (value > 0)); - this._alpha = value; - } - - } - -}); - -module.exports = Bob; - - -/***/ }), -/* 963 */ +/* 974 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146395,12 +150565,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(964); + renderWebGL = __webpack_require__(975); } if (true) { - renderCanvas = __webpack_require__(965); + renderCanvas = __webpack_require__(976); } module.exports = { @@ -146412,7 +150582,7 @@ module.exports = { /***/ }), -/* 964 */ +/* 975 */ /***/ (function(module, exports) { /** @@ -146561,7 +150731,7 @@ module.exports = ContainerWebGLRenderer; /***/ }), -/* 965 */ +/* 976 */ /***/ (function(module, exports) { /** @@ -146668,7 +150838,7 @@ module.exports = ContainerCanvasRenderer; /***/ }), -/* 966 */ +/* 977 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146682,12 +150852,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(396); + renderWebGL = __webpack_require__(409); } if (true) { - renderCanvas = __webpack_require__(396); + renderCanvas = __webpack_require__(409); } module.exports = { @@ -146699,7 +150869,7 @@ module.exports = { /***/ }), -/* 967 */ +/* 978 */ /***/ (function(module, exports) { /** @@ -146710,8 +150880,9 @@ module.exports = { /** * Phaser Blend Modes to CSS Blend Modes Map. - * + * * @name Phaser.CSSBlendModes + * @ignore * @enum {string} * @memberof Phaser * @readonly @@ -146740,7 +150911,7 @@ module.exports = [ /***/ }), -/* 968 */ +/* 979 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146754,12 +150925,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(969); + renderWebGL = __webpack_require__(980); } if (true) { - renderCanvas = __webpack_require__(970); + renderCanvas = __webpack_require__(981); } module.exports = { @@ -146771,7 +150942,7 @@ module.exports = { /***/ }), -/* 969 */ +/* 980 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147078,7 +151249,7 @@ module.exports = DynamicBitmapTextWebGLRenderer; /***/ }), -/* 970 */ +/* 981 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147289,7 +151460,7 @@ module.exports = DynamicBitmapTextCanvasRenderer; /***/ }), -/* 971 */ +/* 982 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147303,12 +151474,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(972); + renderWebGL = __webpack_require__(983); } if (true) { - renderCanvas = __webpack_require__(973); + renderCanvas = __webpack_require__(984); } module.exports = { @@ -147320,7 +151491,7 @@ module.exports = { /***/ }), -/* 972 */ +/* 983 */ /***/ (function(module, exports) { /** @@ -147389,13 +151560,13 @@ module.exports = ExternWebGLRenderer; /***/ }), -/* 973 */ +/* 984 */ /***/ (function(module, exports) { /***/ }), -/* 974 */ +/* 985 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147409,15 +151580,15 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(975); + renderWebGL = __webpack_require__(986); // Needed for Graphics.generateTexture - renderCanvas = __webpack_require__(401); + renderCanvas = __webpack_require__(414); } if (true) { - renderCanvas = __webpack_require__(401); + renderCanvas = __webpack_require__(414); } module.exports = { @@ -147429,7 +151600,7 @@ module.exports = { /***/ }), -/* 975 */ +/* 986 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147438,7 +151609,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Commands = __webpack_require__(198); +var Commands = __webpack_require__(201); var Utils = __webpack_require__(10); // TODO: Remove the use of this @@ -147795,7 +151966,7 @@ module.exports = GraphicsWebGLRenderer; /***/ }), -/* 976 */ +/* 987 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147809,12 +151980,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(977); + renderWebGL = __webpack_require__(988); } if (true) { - renderCanvas = __webpack_require__(978); + renderCanvas = __webpack_require__(989); } module.exports = { @@ -147826,7 +151997,7 @@ module.exports = { /***/ }), -/* 977 */ +/* 988 */ /***/ (function(module, exports) { /** @@ -147859,7 +152030,7 @@ module.exports = SpriteWebGLRenderer; /***/ }), -/* 978 */ +/* 989 */ /***/ (function(module, exports) { /** @@ -147892,7 +152063,7 @@ module.exports = SpriteCanvasRenderer; /***/ }), -/* 979 */ +/* 990 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147906,12 +152077,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(980); + renderWebGL = __webpack_require__(991); } if (true) { - renderCanvas = __webpack_require__(981); + renderCanvas = __webpack_require__(992); } module.exports = { @@ -147923,7 +152094,7 @@ module.exports = { /***/ }), -/* 980 */ +/* 991 */ /***/ (function(module, exports) { /** @@ -147956,7 +152127,7 @@ module.exports = ImageWebGLRenderer; /***/ }), -/* 981 */ +/* 992 */ /***/ (function(module, exports) { /** @@ -147989,7 +152160,7 @@ module.exports = ImageCanvasRenderer; /***/ }), -/* 982 */ +/* 993 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148004,608 +152175,18 @@ module.exports = ImageCanvasRenderer; module.exports = { - GravityWell: __webpack_require__(402), - Particle: __webpack_require__(403), - ParticleEmitter: __webpack_require__(404), - ParticleEmitterManager: __webpack_require__(200), - Zones: __webpack_require__(987) + EmitterOp: __webpack_require__(415), + GravityWell: __webpack_require__(416), + Particle: __webpack_require__(417), + ParticleEmitter: __webpack_require__(418), + ParticleEmitterManager: __webpack_require__(203), + Zones: __webpack_require__(997) }; /***/ }), -/* 983 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var FloatBetween = __webpack_require__(124); -var GetEaseFunction = __webpack_require__(69); -var GetFastValue = __webpack_require__(2); -var Wrap = __webpack_require__(58); - -/** - * @classdesc - * A Particle Emitter property. - * - * Facilitates changing Particle properties as they are emitted and throughout their lifetime. - * - * @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 {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) - { - if (emitOnly === undefined) - { - emitOnly = false; - } - - /** - * The name of this property. - * - * @name Phaser.GameObjects.Particles.EmitterOp#propertyKey - * @type {string} - * @since 3.0.0 - */ - this.propertyKey = key; - - /** - * The value of this property. - * - * @name Phaser.GameObjects.Particles.EmitterOp#propertyValue - * @type {number} - * @since 3.0.0 - */ - this.propertyValue = defaultValue; - - /** - * The default value of this property. - * - * @name Phaser.GameObjects.Particles.EmitterOp#defaultValue - * @type {number} - * @since 3.0.0 - */ - this.defaultValue = defaultValue; - - /** - * The number of steps for stepped easing between {@link Phaser.GameObjects.Particles.EmitterOp#start} and - * {@link Phaser.GameObjects.Particles.EmitterOp#end} values, per emit. - * - * @name Phaser.GameObjects.Particles.EmitterOp#steps - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.steps = 0; - - /** - * The step counter for stepped easing, per emit. - * - * @name Phaser.GameObjects.Particles.EmitterOp#counter - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.counter = 0; - - /** - * The start value for this property to ease between. - * - * @name Phaser.GameObjects.Particles.EmitterOp#start - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.start = 0; - - /** - * The end value for this property to ease between. - * - * @name Phaser.GameObjects.Particles.EmitterOp#end - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.end = 0; - - /** - * The easing function to use for updating this property. - * - * @name Phaser.GameObjects.Particles.EmitterOp#ease - * @type {?function} - * @since 3.0.0 - */ - this.ease; - - /** - * Whether this property can only be modified when a Particle is emitted. - * - * Set to `true` to allow only {@link Phaser.GameObjects.Particles.EmitterOp#onEmit} callbacks to be set and - * affect this property. - * - * Set to `false` to allow both {@link Phaser.GameObjects.Particles.EmitterOp#onEmit} and - * {@link Phaser.GameObjects.Particles.EmitterOp#onUpdate} callbacks to be set and affect this property. - * - * @name Phaser.GameObjects.Particles.EmitterOp#emitOnly - * @type {boolean} - * @since 3.0.0 - */ - this.emitOnly = emitOnly; - - /** - * The callback to run for Particles when they are emitted from the Particle Emitter. - * - * @name Phaser.GameObjects.Particles.EmitterOp#onEmit - * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitCallback} - * @since 3.0.0 - */ - this.onEmit = this.defaultEmit; - - /** - * The callback to run for Particles when they are updated. - * - * @name Phaser.GameObjects.Particles.EmitterOp#onUpdate - * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateCallback} - * @since 3.0.0 - */ - this.onUpdate = this.defaultUpdate; - - this.loadConfig(config); - }, - - /** - * Load the property from a Particle Emitter configuration object. - * - * Optionally accepts a new property key to use, replacing the current one. - * - * @method Phaser.GameObjects.Particles.EmitterOp#loadConfig - * @since 3.0.0 - * - * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} [config] - Settings for the Particle Emitter that owns this property. - * @param {string} [newKey] - The new key to use for this property, if any. - */ - loadConfig: function (config, newKey) - { - if (config === undefined) - { - config = {}; - } - - if (newKey) - { - this.propertyKey = newKey; - } - - this.propertyValue = GetFastValue( - config, - this.propertyKey, - this.defaultValue - ); - - this.setMethods(); - - if (this.emitOnly) - { - // Reset it back again - this.onUpdate = this.defaultUpdate; - } - }, - - /** - * Build a JSON representation of this Particle Emitter property. - * - * @method Phaser.GameObjects.Particles.EmitterOp#toJSON - * @since 3.0.0 - * - * @return {object} A JSON representation of this Particle Emitter property. - */ - toJSON: function () - { - return this.propertyValue; - }, - - /** - * Change the current value of the property and update its callback methods. - * - * @method Phaser.GameObjects.Particles.EmitterOp#onChange - * @since 3.0.0 - * - * @param {number} value - The value of the property. - * - * @return {this} This Emitter Op object. - */ - onChange: function (value) - { - this.propertyValue = value; - - return this.setMethods(); - }, - - /** - * 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}. - * - * @method Phaser.GameObjects.Particles.EmitterOp#setMethods - * @since 3.0.0 - * - * @return {this} This Emitter Op object. - */ - setMethods: function () - { - var value = this.propertyValue; - - var t = typeof value; - - if (t === 'number') - { - // Explicit static value: - // x: 400 - - this.onEmit = this.staticValueEmit; - this.onUpdate = this.staticValueUpdate; // How? - } - else if (Array.isArray(value)) - { - // Picks a random element from the array: - // x: [ 100, 200, 300, 400 ] - - this.onEmit = this.randomStaticValueEmit; - } - 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) - { - this.onEmit = value; - } - else - { - this.onUpdate = value; - } - } - else if (t === 'object' && (this.has(value, 'random') || this.hasBoth(value, 'start', 'end') || this.hasBoth(value, 'min', 'max'))) - { - this.start = this.has(value, 'start') ? value.start : value.min; - this.end = this.has(value, 'end') ? value.end : value.max; - - var isRandom = (this.hasBoth(value, 'min', 'max') || !!value.random); - - // A random starting value (using 'min | max' instead of 'start | end' automatically implies a random value) - - // x: { start: 100, end: 400, random: true } OR { min: 100, max: 400 } OR { random: [ 100, 400 ] } - - if (isRandom) - { - var rnd = value.random; - - // x: { random: [ 100, 400 ] } = the same as doing: x: { start: 100, end: 400, random: true } - if (Array.isArray(rnd)) - { - this.start = rnd[0]; - this.end = rnd[1]; - } - - this.onEmit = this.randomRangedValueEmit; - } - - if (this.has(value, 'steps')) - { - // 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; - } - else - { - // An eased range (defaults to Linear if not specified) - - // x: { start: 100, end: 400, [ ease: 'Linear' ] } - - var easeType = this.has(value, 'ease') ? value.ease : 'Linear'; - - this.ease = GetEaseFunction(easeType); - - if (!isRandom) - { - this.onEmit = this.easedValueEmit; - } - - // BUG: alpha, rotate, scaleX, scaleY, or tint are eased here if {min, max} is given. - // Probably this branch should exclude isRandom entirely. - - this.onUpdate = this.easeValueUpdate; - } - } - else if (t === 'object' && this.hasEither(value, 'onEmit', 'onUpdate')) - { - // Custom onEmit and onUpdate callbacks - - /* - x: { - // Called at the start of the particles life, when it is being created - onEmit: function (particle, key, t, value) - { - return value; - }, - - // Called during the particles life on each update - onUpdate: function (particle, key, t, value) - { - return value; - } - } - */ - - if (this.has(value, 'onEmit')) - { - this.onEmit = value.onEmit; - } - - if (this.has(value, 'onUpdate')) - { - this.onUpdate = value.onUpdate; - } - } - - return this; - }, - - /** - * Check whether an object has the given property. - * - * @method Phaser.GameObjects.Particles.EmitterOp#has - * @since 3.0.0 - * - * @param {object} object - The object to check. - * @param {string} key - The key of the property to look for in the object. - * - * @return {boolean} `true` if the property exists in the object, `false` otherwise. - */ - has: function (object, key) - { - return object.hasOwnProperty(key); - }, - - /** - * Check whether an object has both of the given properties. - * - * @method Phaser.GameObjects.Particles.EmitterOp#hasBoth - * @since 3.0.0 - * - * @param {object} object - The object to check. - * @param {string} key1 - The key of the first property to check the object for. - * @param {string} key2 - The key of the second property to check the object for. - * - * @return {boolean} `true` if both properties exist in the object, `false` otherwise. - */ - hasBoth: function (object, key1, key2) - { - return object.hasOwnProperty(key1) && object.hasOwnProperty(key2); - }, - - /** - * Check whether an object has at least one of the given properties. - * - * @method Phaser.GameObjects.Particles.EmitterOp#hasEither - * @since 3.0.0 - * - * @param {object} object - The object to check. - * @param {string} key1 - The key of the first property to check the object for. - * @param {string} key2 - The key of the second property to check the object for. - * - * @return {boolean} `true` if at least one of the properties exists in the object, `false` if neither exist. - */ - hasEither: function (object, key1, key2) - { - return object.hasOwnProperty(key1) || object.hasOwnProperty(key2); - }, - - /** - * The returned value sets what the property will be at the START of the particles life, on emit. - * - * @method Phaser.GameObjects.Particles.EmitterOp#defaultEmit - * @since 3.0.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. - */ - defaultEmit: function (particle, key, value) - { - return value; - }, - - /** - * The returned value updates the property for the duration of the particles life. - * - * @method Phaser.GameObjects.Particles.EmitterOp#defaultUpdate - * @since 3.0.0 - * - * @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} value - The current value of the property. - * - * @return {number} The new value of the property. - */ - defaultUpdate: function (particle, key, t, value) - { - return value; - }, - - /** - * An `onEmit` callback that returns the current value of the property. - * - * @method Phaser.GameObjects.Particles.EmitterOp#staticValueEmit - * @since 3.0.0 - * - * @return {number} The current value of the property. - */ - staticValueEmit: function () - { - return this.propertyValue; - }, - - /** - * An `onUpdate` callback that returns the current value of the property. - * - * @method Phaser.GameObjects.Particles.EmitterOp#staticValueUpdate - * @since 3.0.0 - * - * @return {number} The current value of the property. - */ - staticValueUpdate: function () - { - return this.propertyValue; - }, - - /** - * An `onEmit` callback that returns a random value from the current value array. - * - * @method Phaser.GameObjects.Particles.EmitterOp#randomStaticValueEmit - * @since 3.0.0 - * - * @return {number} The new value of the property. - */ - randomStaticValueEmit: function () - { - var randomIndex = Math.floor(Math.random() * this.propertyValue.length); - - return this.propertyValue[randomIndex]; - }, - - /** - * 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#randomRangedValueEmit - * @since 3.0.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. - */ - randomRangedValueEmit: function (particle, key) - { - var value = FloatBetween(this.start, this.end); - - if (particle && particle.data[key]) - { - particle.data[key].min = value; - } - - return value; - }, - - /** - * An `onEmit` callback that returns a stepped value between the - * {@link Phaser.GameObjects.Particles.EmitterOp#start} and {@link Phaser.GameObjects.Particles.EmitterOp#end} - * range. - * - * @method Phaser.GameObjects.Particles.EmitterOp#steppedEmit - * @since 3.0.0 - * - * @return {number} The new value of the property. - */ - steppedEmit: function () - { - var current = this.counter; - - var next = this.counter + (this.end - this.start) / this.steps; - - this.counter = Wrap(next, this.start, this.end); - - return current; - }, - - /** - * An `onEmit` callback for an eased property. - * - * It prepares the particle for easing by {@link Phaser.GameObjects.Particles.EmitterOp#easeValueUpdate}. - * - * @method Phaser.GameObjects.Particles.EmitterOp#easedValueEmit - * @since 3.0.0 - * - * @param {Phaser.GameObjects.Particles.Particle} particle - The particle. - * @param {string} key - The name of the property. - * - * @return {number} {@link Phaser.GameObjects.Particles.EmitterOp#start}, as the new value of the property. - */ - easedValueEmit: function (particle, key) - { - if (particle && particle.data[key]) - { - var data = particle.data[key]; - - data.min = this.start; - data.max = this.end; - } - - return this.start; - }, - - /** - * An `onUpdate` callback that returns an eased value between the - * {@link Phaser.GameObjects.Particles.EmitterOp#start} and {@link Phaser.GameObjects.Particles.EmitterOp#end} - * range. - * - * @method Phaser.GameObjects.Particles.EmitterOp#easeValueUpdate - * @since 3.0.0 - * - * @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) - * - * @return {number} The new value of the property. - */ - easeValueUpdate: function (particle, key, t) - { - var data = particle.data[key]; - - return (data.max - data.min) * this.ease(t) + data.min; - } -}); - -module.exports = EmitterOp; - - -/***/ }), -/* 984 */ +/* 994 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148619,12 +152200,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(985); + renderWebGL = __webpack_require__(995); } if (true) { - renderCanvas = __webpack_require__(986); + renderCanvas = __webpack_require__(996); } module.exports = { @@ -148636,7 +152217,7 @@ module.exports = { /***/ }), -/* 985 */ +/* 995 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148797,7 +152378,7 @@ module.exports = ParticleManagerWebGLRenderer; /***/ }), -/* 986 */ +/* 996 */ /***/ (function(module, exports) { /** @@ -148920,7 +152501,7 @@ module.exports = ParticleManagerCanvasRenderer; /***/ }), -/* 987 */ +/* 997 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148935,15 +152516,15 @@ module.exports = ParticleManagerCanvasRenderer; module.exports = { - DeathZone: __webpack_require__(405), - EdgeZone: __webpack_require__(406), - RandomZone: __webpack_require__(408) + DeathZone: __webpack_require__(419), + EdgeZone: __webpack_require__(420), + RandomZone: __webpack_require__(422) }; /***/ }), -/* 988 */ +/* 998 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148957,12 +152538,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(989); + renderWebGL = __webpack_require__(999); } if (true) { - renderCanvas = __webpack_require__(990); + renderCanvas = __webpack_require__(1000); } module.exports = { @@ -148974,7 +152555,7 @@ module.exports = { /***/ }), -/* 989 */ +/* 999 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149041,7 +152622,7 @@ module.exports = RenderTextureWebGLRenderer; /***/ }), -/* 990 */ +/* 1000 */ /***/ (function(module, exports) { /** @@ -149074,7 +152655,7 @@ module.exports = RenderTextureCanvasRenderer; /***/ }), -/* 991 */ +/* 1001 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149083,7 +152664,7 @@ module.exports = RenderTextureCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RETRO_FONT_CONST = __webpack_require__(992); +var RETRO_FONT_CONST = __webpack_require__(1002); var Extend = __webpack_require__(19); /** @@ -149091,7 +152672,7 @@ var Extend = __webpack_require__(19); * @since 3.6.0 */ -var RetroFont = { Parse: __webpack_require__(993) }; +var RetroFont = { Parse: __webpack_require__(1003) }; // Merge in the consts RetroFont = Extend(false, RetroFont, RETRO_FONT_CONST); @@ -149100,7 +152681,7 @@ module.exports = RetroFont; /***/ }), -/* 992 */ +/* 1002 */ /***/ (function(module, exports) { /** @@ -149216,7 +152797,7 @@ module.exports = RETRO_FONT_CONST; /***/ }), -/* 993 */ +/* 1003 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149332,7 +152913,7 @@ module.exports = ParseRetroFont; /***/ }), -/* 994 */ +/* 1004 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149346,12 +152927,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(995); + renderWebGL = __webpack_require__(1005); } if (true) { - renderCanvas = __webpack_require__(996); + renderCanvas = __webpack_require__(1006); } module.exports = { @@ -149363,7 +152944,7 @@ module.exports = { /***/ }), -/* 995 */ +/* 1005 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149500,7 +153081,7 @@ module.exports = RopeWebGLRenderer; /***/ }), -/* 996 */ +/* 1006 */ /***/ (function(module, exports) { /** @@ -149529,89 +153110,7 @@ module.exports = RopeCanvasRenderer; /***/ }), -/* 997 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Returns an object containing dimensions of the Text object. - * - * @function Phaser.GameObjects.Text.GetTextSize - * @since 3.0.0 - * - * @param {Phaser.GameObjects.Text} text - The Text object to calculate the size from. - * @param {Phaser.Types.GameObjects.Text.TextMetrics} size - The Text metrics to use when calculating the size. - * @param {array} lines - The lines of text to calculate the size from. - * - * @return {object} An object containing dimensions of the Text object. - */ -var GetTextSize = function (text, size, lines) -{ - var canvas = text.canvas; - var context = text.context; - var style = text.style; - - var lineWidths = []; - var maxLineWidth = 0; - var drawnLines = lines.length; - - if (style.maxLines > 0 && style.maxLines < lines.length) - { - drawnLines = style.maxLines; - } - - style.syncFont(canvas, context); - - // Text Width - - for (var i = 0; i < drawnLines; i++) - { - var lineWidth = style.strokeThickness; - - lineWidth += context.measureText(lines[i]).width; - - // Adjust for wrapped text - if (style.wordWrap) - { - lineWidth -= context.measureText(' ').width; - } - - lineWidths[i] = Math.ceil(lineWidth); - maxLineWidth = Math.max(maxLineWidth, lineWidths[i]); - } - - // Text Height - - var lineHeight = size.fontSize + style.strokeThickness; - var height = lineHeight * drawnLines; - var lineSpacing = text.lineSpacing; - - // Adjust for line spacing - if (drawnLines > 1) - { - height += lineSpacing * (drawnLines - 1); - } - - return { - width: maxLineWidth, - height: height, - lines: drawnLines, - lineWidths: lineWidths, - lineSpacing: lineSpacing, - lineHeight: lineHeight - }; -}; - -module.exports = GetTextSize; - - -/***/ }), -/* 998 */ +/* 1007 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149625,12 +153124,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(999); + renderWebGL = __webpack_require__(1008); } if (true) { - renderCanvas = __webpack_require__(1000); + renderCanvas = __webpack_require__(1009); } module.exports = { @@ -149642,7 +153141,7 @@ module.exports = { /***/ }), -/* 999 */ +/* 1008 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149714,7 +153213,7 @@ module.exports = TextWebGLRenderer; /***/ }), -/* 1000 */ +/* 1009 */ /***/ (function(module, exports) { /** @@ -149752,1248 +153251,7 @@ module.exports = TextCanvasRenderer; /***/ }), -/* 1001 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var GetAdvancedValue = __webpack_require__(15); -var GetValue = __webpack_require__(6); -var MeasureText = __webpack_require__(1002); - -// Key: [ Object Key, Default Value ] - -var propertyMap = { - 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', false ], - shadowFill: [ 'shadow.fill', false ], - align: [ 'align', 'left' ], - maxLines: [ 'maxLines', 0 ], - fixedWidth: [ 'fixedWidth', 0 ], - fixedHeight: [ 'fixedHeight', 0 ], - resolution: [ 'resolution', 0 ], - rtl: [ 'rtl', false ], - 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', false ] -}; - -/** - * @classdesc - * A TextStyle class manages all of the style settings for a Text object. - * - * Text Game Objects create a TextStyle instance automatically, which is - * accessed via the `Text.style` property. You do not normally need to - * instantiate one yourself. - * - * @class TextStyle - * @memberof Phaser.GameObjects - * @constructor - * @since 3.0.0 - * - * @param {Phaser.GameObjects.Text} text - The Text object that this TextStyle is styling. - * @param {Phaser.Types.GameObjects.Text.TextStyle} style - The style settings to set. - */ -var TextStyle = new Class({ - - initialize: - - function TextStyle (text, style) - { - /** - * The Text object that this TextStyle is styling. - * - * @name Phaser.GameObjects.TextStyle#parent - * @type {Phaser.GameObjects.Text} - * @since 3.0.0 - */ - this.parent = text; - - /** - * The font family. - * - * @name Phaser.GameObjects.TextStyle#fontFamily - * @type {string} - * @default 'Courier' - * @since 3.0.0 - */ - this.fontFamily; - - /** - * The font size. - * - * @name Phaser.GameObjects.TextStyle#fontSize - * @type {string} - * @default '16px' - * @since 3.0.0 - */ - this.fontSize; - - /** - * The font style. - * - * @name Phaser.GameObjects.TextStyle#fontStyle - * @type {string} - * @since 3.0.0 - */ - this.fontStyle; - - /** - * The background color. - * - * @name Phaser.GameObjects.TextStyle#backgroundColor - * @type {string} - * @since 3.0.0 - */ - this.backgroundColor; - - /** - * The text fill color. - * - * @name Phaser.GameObjects.TextStyle#color - * @type {string} - * @default '#fff' - * @since 3.0.0 - */ - this.color; - - /** - * The text stroke color. - * - * @name Phaser.GameObjects.TextStyle#stroke - * @type {string} - * @default '#fff' - * @since 3.0.0 - */ - this.stroke; - - /** - * The text stroke thickness. - * - * @name Phaser.GameObjects.TextStyle#strokeThickness - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.strokeThickness; - - /** - * The horizontal shadow offset. - * - * @name Phaser.GameObjects.TextStyle#shadowOffsetX - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.shadowOffsetX; - - /** - * The vertical shadow offset. - * - * @name Phaser.GameObjects.TextStyle#shadowOffsetY - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.shadowOffsetY; - - /** - * The shadow color. - * - * @name Phaser.GameObjects.TextStyle#shadowColor - * @type {string} - * @default '#000' - * @since 3.0.0 - */ - this.shadowColor; - - /** - * The shadow blur radius. - * - * @name Phaser.GameObjects.TextStyle#shadowBlur - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.shadowBlur; - - /** - * Whether shadow stroke is enabled or not. - * - * @name Phaser.GameObjects.TextStyle#shadowStroke - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.shadowStroke; - - /** - * Whether shadow fill is enabled or not. - * - * @name Phaser.GameObjects.TextStyle#shadowFill - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.shadowFill; - - /** - * The text alignment. - * - * @name Phaser.GameObjects.TextStyle#align - * @type {string} - * @default 'left' - * @since 3.0.0 - */ - this.align; - - /** - * The maximum number of lines to draw. - * - * @name Phaser.GameObjects.TextStyle#maxLines - * @type {integer} - * @default 0 - * @since 3.0.0 - */ - this.maxLines; - - /** - * The fixed width of the text. - * - * `0` means no fixed with. - * - * @name Phaser.GameObjects.TextStyle#fixedWidth - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.fixedWidth; - - /** - * The fixed height of the text. - * - * `0` means no fixed height. - * - * @name Phaser.GameObjects.TextStyle#fixedHeight - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.fixedHeight; - - /** - * The resolution the text is rendered to its internal canvas at. - * The default is 0, which means it will use the resolution set in the Game Config. - * - * @name Phaser.GameObjects.TextStyle#resolution - * @type {number} - * @default 0 - * @since 3.12.0 - */ - this.resolution; - - /** - * Whether the text should render right to left. - * - * @name Phaser.GameObjects.TextStyle#rtl - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.rtl; - - /** - * The test string to use when measuring the font. - * - * @name Phaser.GameObjects.TextStyle#testString - * @type {string} - * @default '|MÉqgy' - * @since 3.0.0 - */ - this.testString; - - /** - * The amount of horizontal padding added to the width of the text when calculating the font metrics. - * - * @name Phaser.GameObjects.TextStyle#baselineX - * @type {number} - * @default 1.2 - * @since 3.3.0 - */ - this.baselineX; - - /** - * The amount of vertical padding added to the height of the text when calculating the font metrics. - * - * @name Phaser.GameObjects.TextStyle#baselineY - * @type {number} - * @default 1.4 - * @since 3.3.0 - */ - this.baselineY; - - /** - * The maximum width of a line of text in pixels. Null means no line wrapping. Setting this - * property directly will not re-run the word wrapping algorithm. To change the width and - * re-wrap, use {@link Phaser.GameObjects.TextStyle#setWordWrapWidth}. - * - * @name Phaser.GameObjects.TextStyle#wordWrapWidth - * @type {number | null} - * @default null - * @since 3.24.0 - */ - this.wordWrapWidth; - - /** - * A custom function that will be responsible for wrapping the text. It will receive two - * arguments: text (the string to wrap), textObject (this Text instance). It should return - * the wrapped lines either as an array of lines or as a string with newline characters in - * place to indicate where breaks should happen. Setting this directly will not re-run the - * word wrapping algorithm. To change the callback and re-wrap, use - * {@link Phaser.GameObjects.TextStyle#setWordWrapCallback}. - * - * @name Phaser.GameObjects.TextStyle#wordWrapCallback - * @type {TextStyleWordWrapCallback | null} - * @default null - * @since 3.24.0 - */ - this.wordWrapCallback; - - /** - * The scope that will be applied when the wordWrapCallback is invoked. Setting this directly will not re-run the - * word wrapping algorithm. To change the callback and re-wrap, use - * {@link Phaser.GameObjects.TextStyle#setWordWrapCallback}. - * - * @name Phaser.GameObjects.TextStyle#wordWrapCallbackScope - * @type {object | null} - * @default null - * @since 3.24.0 - */ - this.wordWrapCallbackScope; - - /** - * Whether or not to use the advanced wrapping algorithm. If true, spaces are collapsed and - * whitespace is trimmed from lines. If false, spaces and whitespace are left as is. Setting - * this property directly will not re-run the word wrapping algorithm. To change the - * advanced setting and re-wrap, use {@link Phaser.GameObjects.TextStyle#setWordWrapWidth}. - * - * @name Phaser.GameObjects.TextStyle#wordWrapUseAdvanced - * @type {boolean} - * @default false - * @since 3.24.0 - */ - this.wordWrapUseAdvanced; - - /** - * The font style, size and family. - * - * @name Phaser.GameObjects.TextStyle#_font - * @type {string} - * @private - * @since 3.0.0 - */ - this._font; - - // Set to defaults + user style - this.setStyle(style, false, true); - - var metrics = GetValue(style, 'metrics', false); - - // Provide optional TextMetrics in the style object to avoid the canvas look-up / scanning - // Doing this is reset if you then change the font of this TextStyle after creation - if (metrics) - { - this.metrics = { - ascent: GetValue(metrics, 'ascent', 0), - descent: GetValue(metrics, 'descent', 0), - fontSize: GetValue(metrics, 'fontSize', 0) - }; - } - else - { - this.metrics = MeasureText(this); - } - }, - - /** - * Set the text style. - * - * @example - * text.setStyle({ - * fontSize: '64px', - * fontFamily: 'Arial', - * color: '#ffffff', - * align: 'center', - * backgroundColor: '#ff00ff' - * }); - * - * @method Phaser.GameObjects.TextStyle#setStyle - * @since 3.0.0 - * - * @param {Phaser.Types.GameObjects.Text.TextStyle} style - The style settings to set. - * @param {boolean} [updateText=true] - Whether to update the text immediately. - * @param {boolean} [setDefaults=false] - Use the default values is not set, or the local values. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setStyle: function (style, updateText, setDefaults) - { - if (updateText === undefined) { updateText = true; } - if (setDefaults === undefined) { setDefaults = false; } - - // Avoid type mutation - // eslint-disable-next-line no-prototype-builtins - if (style && style.hasOwnProperty('fontSize') && typeof style.fontSize === 'number') - { - style.fontSize = style.fontSize.toString() + 'px'; - } - - for (var key in propertyMap) - { - var value = (setDefaults) ? propertyMap[key][1] : this[key]; - - if (key === 'wordWrapCallback' || key === 'wordWrapCallbackScope') - { - // Callback & scope should be set without processing the values - this[key] = GetValue(style, propertyMap[key][0], value); - } - else - { - this[key] = GetAdvancedValue(style, propertyMap[key][0], value); - } - } - - // Allow for 'font' override - var font = GetValue(style, 'font', null); - - if (font !== null) - { - this.setFont(font, false); - } - - this._font = [ this.fontStyle, this.fontSize, this.fontFamily ].join(' ').trim(); - - // Allow for 'fill' to be used in place of 'color' - var fill = GetValue(style, 'fill', null); - - if (fill !== null) - { - this.color = fill; - } - - if (updateText) - { - return this.update(true); - } - else - { - return this.parent; - } - }, - - /** - * Synchronize the font settings to the given Canvas Rendering Context. - * - * @method Phaser.GameObjects.TextStyle#syncFont - * @since 3.0.0 - * - * @param {HTMLCanvasElement} canvas - The Canvas Element. - * @param {CanvasRenderingContext2D} context - The Canvas Rendering Context. - */ - syncFont: function (canvas, context) - { - context.font = this._font; - }, - - /** - * Synchronize the text style settings to the given Canvas Rendering Context. - * - * @method Phaser.GameObjects.TextStyle#syncStyle - * @since 3.0.0 - * - * @param {HTMLCanvasElement} canvas - The Canvas Element. - * @param {CanvasRenderingContext2D} context - The Canvas Rendering Context. - */ - syncStyle: function (canvas, context) - { - context.textBaseline = 'alphabetic'; - - context.fillStyle = this.color; - context.strokeStyle = this.stroke; - - context.lineWidth = this.strokeThickness; - context.lineCap = 'round'; - context.lineJoin = 'round'; - }, - - /** - * Synchronize the shadow settings to the given Canvas Rendering Context. - * - * @method Phaser.GameObjects.TextStyle#syncShadow - * @since 3.0.0 - * - * @param {CanvasRenderingContext2D} context - The Canvas Rendering Context. - * @param {boolean} enabled - Whether shadows are enabled or not. - */ - syncShadow: function (context, enabled) - { - if (enabled) - { - context.shadowOffsetX = this.shadowOffsetX; - context.shadowOffsetY = this.shadowOffsetY; - context.shadowColor = this.shadowColor; - context.shadowBlur = this.shadowBlur; - } - else - { - context.shadowOffsetX = 0; - context.shadowOffsetY = 0; - context.shadowColor = 0; - context.shadowBlur = 0; - } - }, - - /** - * Update the style settings for the parent Text object. - * - * @method Phaser.GameObjects.TextStyle#update - * @since 3.0.0 - * - * @param {boolean} recalculateMetrics - Whether to recalculate font and text metrics. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - update: function (recalculateMetrics) - { - if (recalculateMetrics) - { - this._font = [ this.fontStyle, this.fontSize, this.fontFamily ].join(' ').trim(); - - this.metrics = MeasureText(this); - } - - return this.parent.updateText(); - }, - - /** - * Set the font. - * - * If a string is given, the font family is set. - * - * If an object is given, the `fontFamily`, `fontSize` and `fontStyle` - * properties of that object are set. - * - * @method Phaser.GameObjects.TextStyle#setFont - * @since 3.0.0 - * - * @param {(string|object)} font - The font family or font settings to set. - * @param {boolean} [updateText=true] - Whether to update the text immediately. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setFont: function (font, updateText) - { - if (updateText === undefined) { updateText = true; } - - var fontFamily = font; - var fontSize = ''; - var fontStyle = ''; - - if (typeof font !== 'string') - { - fontFamily = GetValue(font, 'fontFamily', 'Courier'); - fontSize = GetValue(font, 'fontSize', '16px'); - fontStyle = GetValue(font, 'fontStyle', ''); - } - else - { - var fontSplit = font.split(' '); - - var i = 0; - - fontStyle = (fontSplit.length > 2) ? fontSplit[i++] : ''; - fontSize = fontSplit[i++] || '16px'; - fontFamily = fontSplit[i++] || 'Courier'; - } - - if (fontFamily !== this.fontFamily || fontSize !== this.fontSize || fontStyle !== this.fontStyle) - { - this.fontFamily = fontFamily; - this.fontSize = fontSize; - this.fontStyle = fontStyle; - - if (updateText) - { - this.update(true); - } - } - - return this.parent; - }, - - /** - * Set the font family. - * - * @method Phaser.GameObjects.TextStyle#setFontFamily - * @since 3.0.0 - * - * @param {string} family - The font family. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setFontFamily: function (family) - { - if (this.fontFamily !== family) - { - this.fontFamily = family; - - this.update(true); - } - - return this.parent; - }, - - /** - * Set the font style. - * - * @method Phaser.GameObjects.TextStyle#setFontStyle - * @since 3.0.0 - * - * @param {string} style - The font style. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setFontStyle: function (style) - { - if (this.fontStyle !== style) - { - this.fontStyle = style; - - this.update(true); - } - - return this.parent; - }, - - /** - * Set the font size. - * - * @method Phaser.GameObjects.TextStyle#setFontSize - * @since 3.0.0 - * - * @param {(number|string)} size - The font size. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setFontSize: function (size) - { - if (typeof size === 'number') - { - size = size.toString() + 'px'; - } - - if (this.fontSize !== size) - { - this.fontSize = size; - - this.update(true); - } - - return this.parent; - }, - - /** - * Set the test string to use when measuring the font. - * - * @method Phaser.GameObjects.TextStyle#setTestString - * @since 3.0.0 - * - * @param {string} string - The test string to use when measuring the font. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setTestString: function (string) - { - this.testString = string; - - return this.update(true); - }, - - /** - * Set a fixed width and height for the text. - * - * Pass in `0` for either of these parameters to disable fixed width or height respectively. - * - * @method Phaser.GameObjects.TextStyle#setFixedSize - * @since 3.0.0 - * - * @param {number} width - The fixed width to set. - * @param {number} height - The fixed height to set. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setFixedSize: function (width, height) - { - this.fixedWidth = width; - this.fixedHeight = height; - - if (width) - { - this.parent.width = width; - } - - if (height) - { - this.parent.height = height; - } - - return this.update(false); - }, - - /** - * Set the background color. - * - * @method Phaser.GameObjects.TextStyle#setBackgroundColor - * @since 3.0.0 - * - * @param {string} color - The background color. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setBackgroundColor: function (color) - { - this.backgroundColor = color; - - return this.update(false); - }, - - /** - * Set the text fill color. - * - * @method Phaser.GameObjects.TextStyle#setFill - * @since 3.0.0 - * - * @param {string} color - The text fill color. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setFill: function (color) - { - this.color = color; - - return this.update(false); - }, - - /** - * Set the text fill color. - * - * @method Phaser.GameObjects.TextStyle#setColor - * @since 3.0.0 - * - * @param {string} color - The text fill color. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setColor: function (color) - { - this.color = color; - - return this.update(false); - }, - - /** - * Set the resolution used by the Text object. - * - * By default it will be set to match the resolution set in the Game Config, - * but you can override it via this method. It allows for much clearer text on High DPI devices, - * at the cost of memory because it uses larger internal Canvas textures for the Text. - * - * Please use with caution, as the more high res Text you have, the more memory it uses up. - * - * @method Phaser.GameObjects.TextStyle#setResolution - * @since 3.12.0 - * - * @param {number} value - The resolution for this Text object to use. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setResolution: function (value) - { - this.resolution = value; - - return this.update(false); - }, - - /** - * Set the stroke settings. - * - * @method Phaser.GameObjects.TextStyle#setStroke - * @since 3.0.0 - * - * @param {string} color - The stroke color. - * @param {number} thickness - The stroke thickness. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setStroke: function (color, thickness) - { - if (thickness === undefined) { thickness = this.strokeThickness; } - - if (color === undefined && this.strokeThickness !== 0) - { - // Reset the stroke to zero (disabling it) - this.strokeThickness = 0; - - this.update(true); - } - else if (this.stroke !== color || this.strokeThickness !== thickness) - { - this.stroke = color; - this.strokeThickness = thickness; - - this.update(true); - } - - return this.parent; - }, - - /** - * Set the shadow settings. - * - * Calling this method always re-measures the parent Text object, - * so only call it when you actually change the shadow settings. - * - * @method Phaser.GameObjects.TextStyle#setShadow - * @since 3.0.0 - * - * @param {number} [x=0] - The horizontal shadow offset. - * @param {number} [y=0] - The vertical shadow offset. - * @param {string} [color='#000'] - The shadow color. - * @param {number} [blur=0] - The shadow blur radius. - * @param {boolean} [shadowStroke=false] - Whether to stroke the shadow. - * @param {boolean} [shadowFill=true] - Whether to fill the shadow. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setShadow: function (x, y, color, blur, shadowStroke, shadowFill) - { - if (x === undefined) { x = 0; } - if (y === undefined) { y = 0; } - if (color === undefined) { color = '#000'; } - if (blur === undefined) { blur = 0; } - if (shadowStroke === undefined) { shadowStroke = false; } - if (shadowFill === undefined) { shadowFill = true; } - - this.shadowOffsetX = x; - this.shadowOffsetY = y; - this.shadowColor = color; - this.shadowBlur = blur; - this.shadowStroke = shadowStroke; - this.shadowFill = shadowFill; - - return this.update(false); - }, - - /** - * Set the shadow offset. - * - * @method Phaser.GameObjects.TextStyle#setShadowOffset - * @since 3.0.0 - * - * @param {number} [x=0] - The horizontal shadow offset. - * @param {number} [y=0] - The vertical shadow offset. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setShadowOffset: function (x, y) - { - if (x === undefined) { x = 0; } - if (y === undefined) { y = x; } - - this.shadowOffsetX = x; - this.shadowOffsetY = y; - - return this.update(false); - }, - - /** - * Set the shadow color. - * - * @method Phaser.GameObjects.TextStyle#setShadowColor - * @since 3.0.0 - * - * @param {string} [color='#000'] - The shadow color. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setShadowColor: function (color) - { - if (color === undefined) { color = '#000'; } - - this.shadowColor = color; - - return this.update(false); - }, - - /** - * Set the shadow blur radius. - * - * @method Phaser.GameObjects.TextStyle#setShadowBlur - * @since 3.0.0 - * - * @param {number} [blur=0] - The shadow blur radius. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setShadowBlur: function (blur) - { - if (blur === undefined) { blur = 0; } - - this.shadowBlur = blur; - - return this.update(false); - }, - - /** - * Enable or disable shadow stroke. - * - * @method Phaser.GameObjects.TextStyle#setShadowStroke - * @since 3.0.0 - * - * @param {boolean} enabled - Whether shadow stroke is enabled or not. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setShadowStroke: function (enabled) - { - this.shadowStroke = enabled; - - return this.update(false); - }, - - /** - * Enable or disable shadow fill. - * - * @method Phaser.GameObjects.TextStyle#setShadowFill - * @since 3.0.0 - * - * @param {boolean} enabled - Whether shadow fill is enabled or not. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setShadowFill: function (enabled) - { - this.shadowFill = enabled; - - return this.update(false); - }, - - /** - * Set the width (in pixels) to use for wrapping lines. - * - * Pass in null to remove wrapping by width. - * - * @method Phaser.GameObjects.TextStyle#setWordWrapWidth - * @since 3.0.0 - * - * @param {number} width - The maximum width of a line in pixels. Set to null to remove wrapping. - * @param {boolean} [useAdvancedWrap=false] - Whether or not to use the advanced wrapping - * algorithm. If true, spaces are collapsed and whitespace is trimmed from lines. If false, - * spaces and whitespace are left as is. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setWordWrapWidth: function (width, useAdvancedWrap) - { - if (useAdvancedWrap === undefined) { useAdvancedWrap = false; } - - this.wordWrapWidth = width; - this.wordWrapUseAdvanced = useAdvancedWrap; - - return this.update(false); - }, - - /** - * Set a custom callback for wrapping lines. - * - * Pass in null to remove wrapping by callback. - * - * @method Phaser.GameObjects.TextStyle#setWordWrapCallback - * @since 3.0.0 - * - * @param {TextStyleWordWrapCallback} callback - A custom function that will be responsible for wrapping the - * text. It will receive two arguments: text (the string to wrap), textObject (this Text - * instance). It should return the wrapped lines either as an array of lines or as a string with - * newline characters in place to indicate where breaks should happen. - * @param {object} [scope=null] - The scope that will be applied when the callback is invoked. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setWordWrapCallback: function (callback, scope) - { - if (scope === undefined) { scope = null; } - - this.wordWrapCallback = callback; - this.wordWrapCallbackScope = scope; - - return this.update(false); - }, - - /** - * Set the alignment of the text in this Text object. - * - * The argument can be one of: `left`, `right`, `center` or `justify`. - * - * Alignment only works if the Text object has more than one line of text. - * - * @method Phaser.GameObjects.TextStyle#setAlign - * @since 3.0.0 - * - * @param {string} [align='left'] - The text alignment for multi-line text. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setAlign: function (align) - { - if (align === undefined) { align = 'left'; } - - this.align = align; - - return this.update(false); - }, - - /** - * Set the maximum number of lines to draw. - * - * @method Phaser.GameObjects.TextStyle#setMaxLines - * @since 3.0.0 - * - * @param {integer} [max=0] - The maximum number of lines to draw. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setMaxLines: function (max) - { - if (max === undefined) { max = 0; } - - this.maxLines = max; - - return this.update(false); - }, - - /** - * Get the current text metrics. - * - * @method Phaser.GameObjects.TextStyle#getTextMetrics - * @since 3.0.0 - * - * @return {Phaser.Types.GameObjects.Text.TextMetrics} The text metrics. - */ - getTextMetrics: function () - { - var metrics = this.metrics; - - return { - ascent: metrics.ascent, - descent: metrics.descent, - fontSize: metrics.fontSize - }; - }, - - /** - * Build a JSON representation of this Text Style. - * - * @method Phaser.GameObjects.TextStyle#toJSON - * @since 3.0.0 - * - * @return {object} A JSON representation of this Text Style. - */ - toJSON: function () - { - var output = {}; - - for (var key in propertyMap) - { - output[key] = this[key]; - } - - output.metrics = this.getTextMetrics(); - - return output; - }, - - /** - * Destroy this Text Style. - * - * @method Phaser.GameObjects.TextStyle#destroy - * @since 3.0.0 - */ - destroy: function () - { - this.parent = undefined; - } - -}); - -module.exports = TextStyle; - - -/***/ }), -/* 1002 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var CanvasPool = __webpack_require__(26); - -/** - * Calculates the ascent, descent and fontSize of a given font style. - * - * @function Phaser.GameObjects.Text.MeasureText - * @since 3.0.0 - * - * @param {Phaser.GameObjects.TextStyle} textStyle - The TextStyle object to measure. - * - * @return {Phaser.Types.GameObjects.Text.TextMetrics} An object containing the ascent, descent and fontSize of the TextStyle. - */ -var MeasureText = function (textStyle) -{ - // @property {HTMLCanvasElement} canvas - The canvas element that the text is rendered. - var canvas = CanvasPool.create(this); - - // @property {HTMLCanvasElement} context - The context of the canvas element that the text is rendered to. - var context = canvas.getContext('2d'); - - textStyle.syncFont(canvas, context); - - var width = Math.ceil(context.measureText(textStyle.testString).width * textStyle.baselineX); - var baseline = width; - var height = 2 * baseline; - - baseline = baseline * textStyle.baselineY | 0; - - canvas.width = width; - canvas.height = height; - - context.fillStyle = '#f00'; - context.fillRect(0, 0, width, height); - - context.font = textStyle._font; - - context.textBaseline = 'alphabetic'; - context.fillStyle = '#000'; - context.fillText(textStyle.testString, 0, baseline); - - var output = { - ascent: 0, - descent: 0, - fontSize: 0 - }; - - if (!context.getImageData(0, 0, width, height)) - { - output.ascent = baseline; - output.descent = baseline + 6; - output.fontSize = output.ascent + output.descent; - - CanvasPool.remove(canvas); - - return output; - } - - var imagedata = context.getImageData(0, 0, width, height).data; - var pixels = imagedata.length; - var line = width * 4; - var i; - var j; - var idx = 0; - var stop = false; - - // ascent. scan from top to bottom until we find a non red pixel - for (i = 0; i < baseline; i++) - { - for (j = 0; j < line; j += 4) - { - if (imagedata[idx + j] !== 255) - { - stop = true; - break; - } - } - - if (!stop) - { - idx += line; - } - else - { - break; - } - } - - output.ascent = baseline - i; - - idx = pixels - line; - stop = false; - - // descent. scan from bottom to top until we find a non red pixel - for (i = height; i > baseline; i--) - { - for (j = 0; j < line; j += 4) - { - if (imagedata[idx + j] !== 255) - { - stop = true; - break; - } - } - - if (!stop) - { - idx -= line; - } - else - { - break; - } - } - - output.descent = (i - baseline); - output.fontSize = output.ascent + output.descent; - - CanvasPool.remove(canvas); - - return output; -}; - -module.exports = MeasureText; - - -/***/ }), -/* 1003 */ +/* 1010 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151007,12 +153265,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1004); + renderWebGL = __webpack_require__(1011); } if (true) { - renderCanvas = __webpack_require__(1005); + renderCanvas = __webpack_require__(1012); } module.exports = { @@ -151024,7 +153282,7 @@ module.exports = { /***/ }), -/* 1004 */ +/* 1011 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151098,7 +153356,7 @@ module.exports = TileSpriteWebGLRenderer; /***/ }), -/* 1005 */ +/* 1012 */ /***/ (function(module, exports) { /** @@ -151133,7 +153391,7 @@ module.exports = TileSpriteCanvasRenderer; /***/ }), -/* 1006 */ +/* 1013 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151147,12 +153405,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1007); + renderWebGL = __webpack_require__(1014); } if (true) { - renderCanvas = __webpack_require__(1008); + renderCanvas = __webpack_require__(1015); } module.exports = { @@ -151164,7 +153422,7 @@ module.exports = { /***/ }), -/* 1007 */ +/* 1014 */ /***/ (function(module, exports) { /** @@ -151200,7 +153458,7 @@ module.exports = VideoWebGLRenderer; /***/ }), -/* 1008 */ +/* 1015 */ /***/ (function(module, exports) { /** @@ -151236,7 +153494,7 @@ module.exports = VideoCanvasRenderer; /***/ }), -/* 1009 */ +/* 1016 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151250,12 +153508,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1010); + renderWebGL = __webpack_require__(1017); } if (true) { - renderCanvas = __webpack_require__(1011); + renderCanvas = __webpack_require__(1018); } module.exports = { @@ -151267,7 +153525,7 @@ module.exports = { /***/ }), -/* 1010 */ +/* 1017 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151276,8 +153534,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(99); -var StrokePathWebGL = __webpack_require__(70); +var FillPathWebGL = __webpack_require__(100); +var StrokePathWebGL = __webpack_require__(72); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -151345,7 +153603,7 @@ module.exports = ArcWebGLRenderer; /***/ }), -/* 1011 */ +/* 1018 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151354,9 +153612,9 @@ module.exports = ArcWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DegToRad = __webpack_require__(40); -var FillStyleCanvas = __webpack_require__(42); -var LineStyleCanvas = __webpack_require__(50); +var DegToRad = __webpack_require__(41); +var FillStyleCanvas = __webpack_require__(43); +var LineStyleCanvas = __webpack_require__(51); var SetTransform = __webpack_require__(28); /** @@ -151421,7 +153679,7 @@ module.exports = ArcCanvasRenderer; /***/ }), -/* 1012 */ +/* 1019 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151435,12 +153693,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1013); + renderWebGL = __webpack_require__(1020); } if (true) { - renderCanvas = __webpack_require__(1014); + renderCanvas = __webpack_require__(1021); } module.exports = { @@ -151452,7 +153710,7 @@ module.exports = { /***/ }), -/* 1013 */ +/* 1020 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151461,8 +153719,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(99); -var StrokePathWebGL = __webpack_require__(70); +var FillPathWebGL = __webpack_require__(100); +var StrokePathWebGL = __webpack_require__(72); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -151530,7 +153788,7 @@ module.exports = CurveWebGLRenderer; /***/ }), -/* 1014 */ +/* 1021 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151539,8 +153797,8 @@ module.exports = CurveWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(42); -var LineStyleCanvas = __webpack_require__(50); +var FillStyleCanvas = __webpack_require__(43); +var LineStyleCanvas = __webpack_require__(51); var SetTransform = __webpack_require__(28); /** @@ -151618,7 +153876,7 @@ module.exports = CurveCanvasRenderer; /***/ }), -/* 1015 */ +/* 1022 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151632,12 +153890,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1016); + renderWebGL = __webpack_require__(1023); } if (true) { - renderCanvas = __webpack_require__(1017); + renderCanvas = __webpack_require__(1024); } module.exports = { @@ -151649,7 +153907,7 @@ module.exports = { /***/ }), -/* 1016 */ +/* 1023 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151658,8 +153916,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(99); -var StrokePathWebGL = __webpack_require__(70); +var FillPathWebGL = __webpack_require__(100); +var StrokePathWebGL = __webpack_require__(72); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -151727,7 +153985,7 @@ module.exports = EllipseWebGLRenderer; /***/ }), -/* 1017 */ +/* 1024 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151736,8 +153994,8 @@ module.exports = EllipseWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(42); -var LineStyleCanvas = __webpack_require__(50); +var FillStyleCanvas = __webpack_require__(43); +var LineStyleCanvas = __webpack_require__(51); var SetTransform = __webpack_require__(28); /** @@ -151812,7 +154070,7 @@ module.exports = EllipseCanvasRenderer; /***/ }), -/* 1018 */ +/* 1025 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151826,12 +154084,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1019); + renderWebGL = __webpack_require__(1026); } if (true) { - renderCanvas = __webpack_require__(1020); + renderCanvas = __webpack_require__(1027); } module.exports = { @@ -151843,7 +154101,7 @@ module.exports = { /***/ }), -/* 1019 */ +/* 1026 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152063,7 +154321,7 @@ module.exports = GridWebGLRenderer; /***/ }), -/* 1020 */ +/* 1027 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152072,8 +154330,8 @@ module.exports = GridWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(42); -var LineStyleCanvas = __webpack_require__(50); +var FillStyleCanvas = __webpack_require__(43); +var LineStyleCanvas = __webpack_require__(51); var SetTransform = __webpack_require__(28); /** @@ -152252,7 +154510,7 @@ module.exports = GridCanvasRenderer; /***/ }), -/* 1021 */ +/* 1028 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152266,12 +154524,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1022); + renderWebGL = __webpack_require__(1029); } if (true) { - renderCanvas = __webpack_require__(1023); + renderCanvas = __webpack_require__(1030); } module.exports = { @@ -152283,7 +154541,7 @@ module.exports = { /***/ }), -/* 1022 */ +/* 1029 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152437,7 +154695,7 @@ module.exports = IsoBoxWebGLRenderer; /***/ }), -/* 1023 */ +/* 1030 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152446,7 +154704,7 @@ module.exports = IsoBoxWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(42); +var FillStyleCanvas = __webpack_require__(43); var SetTransform = __webpack_require__(28); /** @@ -152538,7 +154796,7 @@ module.exports = IsoBoxCanvasRenderer; /***/ }), -/* 1024 */ +/* 1031 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152552,12 +154810,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1025); + renderWebGL = __webpack_require__(1032); } if (true) { - renderCanvas = __webpack_require__(1026); + renderCanvas = __webpack_require__(1033); } module.exports = { @@ -152569,7 +154827,7 @@ module.exports = { /***/ }), -/* 1025 */ +/* 1032 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152744,7 +155002,7 @@ module.exports = IsoTriangleWebGLRenderer; /***/ }), -/* 1026 */ +/* 1033 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152753,7 +155011,7 @@ module.exports = IsoTriangleWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(42); +var FillStyleCanvas = __webpack_require__(43); var SetTransform = __webpack_require__(28); /** @@ -152858,7 +155116,7 @@ module.exports = IsoTriangleCanvasRenderer; /***/ }), -/* 1027 */ +/* 1034 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152872,12 +155130,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1028); + renderWebGL = __webpack_require__(1035); } if (true) { - renderCanvas = __webpack_require__(1029); + renderCanvas = __webpack_require__(1036); } module.exports = { @@ -152889,7 +155147,7 @@ module.exports = { /***/ }), -/* 1028 */ +/* 1035 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152982,7 +155240,7 @@ module.exports = LineWebGLRenderer; /***/ }), -/* 1029 */ +/* 1036 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152991,7 +155249,7 @@ module.exports = LineWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var LineStyleCanvas = __webpack_require__(50); +var LineStyleCanvas = __webpack_require__(51); var SetTransform = __webpack_require__(28); /** @@ -153039,7 +155297,7 @@ module.exports = LineCanvasRenderer; /***/ }), -/* 1030 */ +/* 1037 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153053,12 +155311,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1031); + renderWebGL = __webpack_require__(1038); } if (true) { - renderCanvas = __webpack_require__(1032); + renderCanvas = __webpack_require__(1039); } module.exports = { @@ -153070,7 +155328,7 @@ module.exports = { /***/ }), -/* 1031 */ +/* 1038 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153079,8 +155337,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(99); -var StrokePathWebGL = __webpack_require__(70); +var FillPathWebGL = __webpack_require__(100); +var StrokePathWebGL = __webpack_require__(72); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -153148,7 +155406,7 @@ module.exports = PolygonWebGLRenderer; /***/ }), -/* 1032 */ +/* 1039 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153157,8 +155415,8 @@ module.exports = PolygonWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(42); -var LineStyleCanvas = __webpack_require__(50); +var FillStyleCanvas = __webpack_require__(43); +var LineStyleCanvas = __webpack_require__(51); var SetTransform = __webpack_require__(28); /** @@ -153233,7 +155491,7 @@ module.exports = PolygonCanvasRenderer; /***/ }), -/* 1033 */ +/* 1040 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153247,12 +155505,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1034); + renderWebGL = __webpack_require__(1041); } if (true) { - renderCanvas = __webpack_require__(1035); + renderCanvas = __webpack_require__(1042); } module.exports = { @@ -153264,7 +155522,7 @@ module.exports = { /***/ }), -/* 1034 */ +/* 1041 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153273,7 +155531,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var StrokePathWebGL = __webpack_require__(70); +var StrokePathWebGL = __webpack_require__(72); var Utils = __webpack_require__(10); /** @@ -153356,7 +155614,7 @@ module.exports = RectangleWebGLRenderer; /***/ }), -/* 1035 */ +/* 1042 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153365,8 +155623,8 @@ module.exports = RectangleWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(42); -var LineStyleCanvas = __webpack_require__(50); +var FillStyleCanvas = __webpack_require__(43); +var LineStyleCanvas = __webpack_require__(51); var SetTransform = __webpack_require__(28); /** @@ -153430,7 +155688,7 @@ module.exports = RectangleCanvasRenderer; /***/ }), -/* 1036 */ +/* 1043 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153444,12 +155702,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1037); + renderWebGL = __webpack_require__(1044); } if (true) { - renderCanvas = __webpack_require__(1038); + renderCanvas = __webpack_require__(1045); } module.exports = { @@ -153461,7 +155719,7 @@ module.exports = { /***/ }), -/* 1037 */ +/* 1044 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153470,8 +155728,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(99); -var StrokePathWebGL = __webpack_require__(70); +var FillPathWebGL = __webpack_require__(100); +var StrokePathWebGL = __webpack_require__(72); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -153539,7 +155797,7 @@ module.exports = StarWebGLRenderer; /***/ }), -/* 1038 */ +/* 1045 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153548,8 +155806,8 @@ module.exports = StarWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(42); -var LineStyleCanvas = __webpack_require__(50); +var FillStyleCanvas = __webpack_require__(43); +var LineStyleCanvas = __webpack_require__(51); var SetTransform = __webpack_require__(28); /** @@ -153624,7 +155882,7 @@ module.exports = StarCanvasRenderer; /***/ }), -/* 1039 */ +/* 1046 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153638,12 +155896,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1040); + renderWebGL = __webpack_require__(1047); } if (true) { - renderCanvas = __webpack_require__(1041); + renderCanvas = __webpack_require__(1048); } module.exports = { @@ -153655,7 +155913,7 @@ module.exports = { /***/ }), -/* 1040 */ +/* 1047 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153664,7 +155922,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var StrokePathWebGL = __webpack_require__(70); +var StrokePathWebGL = __webpack_require__(72); var Utils = __webpack_require__(10); /** @@ -153758,7 +156016,7 @@ module.exports = TriangleWebGLRenderer; /***/ }), -/* 1041 */ +/* 1048 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153767,8 +156025,8 @@ module.exports = TriangleWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(42); -var LineStyleCanvas = __webpack_require__(50); +var FillStyleCanvas = __webpack_require__(43); +var LineStyleCanvas = __webpack_require__(51); var SetTransform = __webpack_require__(28); /** @@ -153833,7 +156091,7 @@ module.exports = TriangleCanvasRenderer; /***/ }), -/* 1042 */ +/* 1049 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153842,7 +156100,7 @@ module.exports = TriangleCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Blitter = __webpack_require__(194); +var Blitter = __webpack_require__(197); var GameObjectFactory = __webpack_require__(5); /** @@ -153875,7 +156133,7 @@ GameObjectFactory.register('blitter', function (x, y, key, frame) /***/ }), -/* 1043 */ +/* 1050 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153885,7 +156143,7 @@ GameObjectFactory.register('blitter', function (x, y, key, frame) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Container = __webpack_require__(195); +var Container = __webpack_require__(198); var GameObjectFactory = __webpack_require__(5); /** @@ -153909,7 +156167,7 @@ GameObjectFactory.register('container', function (x, y, children) /***/ }), -/* 1044 */ +/* 1051 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153918,56 +156176,56 @@ GameObjectFactory.register('container', function (x, y, children) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DOMElement = __webpack_require__(395); +var DOMElement = __webpack_require__(408); var GameObjectFactory = __webpack_require__(5); /** * DOM Element Game Objects are a way to control and manipulate HTML Elements over the top of your game. - * + * * In order for DOM Elements to display you have to enable them by adding the following to your game * configuration object: - * + * * ```javascript * dom { * createContainer: true * } * ``` - * + * * When this is added, Phaser will automatically create a DOM Container div that is positioned over the top * of the game canvas. This div is sized to match the canvas, and if the canvas size changes, as a result of * settings within the Scale Manager, the dom container is resized accordingly. - * + * * You can create a DOM Element by either passing in DOMStrings, or by passing in a reference to an existing * Element that you wish to be placed under the control of Phaser. For example: - * + * * ```javascript * this.add.dom(x, y, 'div', 'background-color: lime; width: 220px; height: 100px; font: 48px Arial', 'Phaser'); * ``` - * + * * The above code will insert a div element into the DOM Container at the given x/y coordinate. The DOMString in * the 4th argument sets the initial CSS style of the div and the final argument is the inner text. In this case, * it will create a lime colored div that is 220px by 100px in size with the text Phaser in it, in an Arial font. - * + * * You should nearly always, without exception, use explicitly sized HTML Elements, in order to fully control * alignment and positioning of the elements next to regular game content. - * + * * Rather than specify the CSS and HTML directly you can use the `load.html` File Loader to load it into the * cache and then use the `createFromCache` method instead. You can also use `createFromHTML` and various other * methods available in this class to help construct your elements. - * + * * Once the element has been created you can then control it like you would any other Game Object. You can set its * position, scale, rotation, alpha and other properties. It will move as the main Scene Camera moves and be clipped * at the edge of the canvas. It's important to remember some limitations of DOM Elements: The obvious one is that * they appear above or below your game canvas. You cannot blend them into the display list, meaning you cannot have * a DOM Element, then a Sprite, then another DOM Element behind it. - * + * * They also cannot be enabled for input. To do that, you have to use the `addListener` method to add native event * listeners directly. The final limitation is to do with cameras. The DOM Container is sized to match the game canvas * entirely and clipped accordingly. DOM Elements respect camera scrolling and scrollFactor settings, but if you * change the size of the camera so it no longer matches the size of the canvas, they won't be clipped accordingly. - * + * * Also, all DOM Elements are inserted into the same DOM Container, regardless of which Scene they are created in. - * + * * DOM Elements are a powerful way to align native HTML with your Phaser Game Objects. For example, you can insert * a login form for a multiplayer game directly into your title screen. Or a text input box for a highscore table. * Or a banner ad from a 3rd party service. Or perhaps you'd like to use them for high resolution text display and @@ -153992,14 +156250,13 @@ GameObjectFactory.register('dom', function (x, y, element, style, innerText) var gameObject = new DOMElement(this.scene, x, y, element, style, innerText); this.displayList.add(gameObject); - this.updateList.add(gameObject); return gameObject; }); /***/ }), -/* 1045 */ +/* 1052 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154008,7 +156265,7 @@ GameObjectFactory.register('dom', function (x, y, element, style, innerText) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DynamicBitmapText = __webpack_require__(196); +var DynamicBitmapText = __webpack_require__(199); var GameObjectFactory = __webpack_require__(5); /** @@ -154068,7 +156325,7 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size /***/ }), -/* 1046 */ +/* 1053 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154077,7 +156334,7 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Extern = __webpack_require__(397); +var Extern = __webpack_require__(410); var GameObjectFactory = __webpack_require__(5); /** @@ -154095,7 +156352,6 @@ GameObjectFactory.register('extern', function () var extern = new Extern(this.scene); this.displayList.add(extern); - this.updateList.add(extern); return extern; }); @@ -154110,7 +156366,7 @@ GameObjectFactory.register('extern', function () /***/ }), -/* 1047 */ +/* 1054 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154119,7 +156375,7 @@ GameObjectFactory.register('extern', function () * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Graphics = __webpack_require__(197); +var Graphics = __webpack_require__(200); var GameObjectFactory = __webpack_require__(5); /** @@ -154149,7 +156405,7 @@ GameObjectFactory.register('graphics', function (config) /***/ }), -/* 1048 */ +/* 1055 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154158,7 +156414,7 @@ GameObjectFactory.register('graphics', function (config) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Group = __webpack_require__(98); +var Group = __webpack_require__(99); var GameObjectFactory = __webpack_require__(5); /** @@ -154181,7 +156437,7 @@ GameObjectFactory.register('group', function (children, config) /***/ }), -/* 1049 */ +/* 1056 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154190,7 +156446,7 @@ GameObjectFactory.register('group', function (children, config) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Image = __webpack_require__(111); +var Image = __webpack_require__(112); var GameObjectFactory = __webpack_require__(5); /** @@ -154223,7 +156479,7 @@ GameObjectFactory.register('image', function (x, y, key, frame) /***/ }), -/* 1050 */ +/* 1057 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154233,7 +156489,7 @@ GameObjectFactory.register('image', function (x, y, key, frame) */ var GameObjectFactory = __webpack_require__(5); -var ParticleEmitterManager = __webpack_require__(200); +var ParticleEmitterManager = __webpack_require__(203); /** * Creates a new Particle Emitter Manager Game Object and adds it to the Scene. @@ -154251,12 +156507,7 @@ var ParticleEmitterManager = __webpack_require__(200); */ GameObjectFactory.register('particles', function (key, frame, emitters) { - var manager = new ParticleEmitterManager(this.scene, key, frame, emitters); - - this.displayList.add(manager); - this.updateList.add(manager); - - return manager; + return this.displayList.add(new ParticleEmitterManager(this.scene, key, frame, emitters)); }); // When registering a factory function 'this' refers to the GameObjectFactory context. @@ -154269,7 +156520,7 @@ GameObjectFactory.register('particles', function (key, frame, emitters) /***/ }), -/* 1051 */ +/* 1058 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154279,7 +156530,7 @@ GameObjectFactory.register('particles', function (key, frame, emitters) */ var GameObjectFactory = __webpack_require__(5); -var PathFollower = __webpack_require__(409); +var PathFollower = __webpack_require__(423); /** * Creates a new PathFollower Game Object and adds it to the Scene. @@ -154317,7 +156568,7 @@ GameObjectFactory.register('follower', function (path, x, y, key, frame) /***/ }), -/* 1052 */ +/* 1059 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154327,7 +156578,7 @@ GameObjectFactory.register('follower', function (path, x, y, key, frame) */ var GameObjectFactory = __webpack_require__(5); -var RenderTexture = __webpack_require__(201); +var RenderTexture = __webpack_require__(204); /** * Creates a new Render Texture Game Object and adds it to the Scene. @@ -154357,7 +156608,7 @@ GameObjectFactory.register('renderTexture', function (x, y, width, height, key, /***/ }), -/* 1053 */ +/* 1060 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154366,7 +156617,7 @@ GameObjectFactory.register('renderTexture', function (x, y, width, height, key, * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Rope = __webpack_require__(203); +var Rope = __webpack_require__(206); var GameObjectFactory = __webpack_require__(5); /** @@ -154393,11 +156644,7 @@ if (true) { GameObjectFactory.register('rope', function (x, y, texture, frame, points, horizontal, colors, alphas) { - var rope = new Rope(this.scene, x, y, texture, frame, points, horizontal, colors, alphas); - - this.displayList.add(rope); - - return this.updateList.add(rope); + return this.displayList.add(new Rope(this.scene, x, y, texture, frame, points, horizontal, colors, alphas)); }); } @@ -154411,7 +156658,7 @@ if (true) /***/ }), -/* 1054 */ +/* 1061 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154421,7 +156668,7 @@ if (true) */ var GameObjectFactory = __webpack_require__(5); -var Sprite = __webpack_require__(75); +var Sprite = __webpack_require__(76); /** * Creates a new Sprite Game Object and adds it to the Scene. @@ -154443,7 +156690,6 @@ GameObjectFactory.register('sprite', function (x, y, key, frame) var sprite = new Sprite(this.scene, x, y, key, frame); this.displayList.add(sprite); - this.updateList.add(sprite); return sprite; }); @@ -154458,7 +156704,7 @@ GameObjectFactory.register('sprite', function (x, y, key, frame) /***/ }), -/* 1055 */ +/* 1062 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154467,7 +156713,7 @@ GameObjectFactory.register('sprite', function (x, y, key, frame) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(138); +var BitmapText = __webpack_require__(139); var GameObjectFactory = __webpack_require__(5); /** @@ -154522,7 +156768,7 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size, align /***/ }), -/* 1056 */ +/* 1063 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154531,7 +156777,7 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size, align * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Text = __webpack_require__(204); +var Text = __webpack_require__(207); var GameObjectFactory = __webpack_require__(5); /** @@ -154587,7 +156833,7 @@ GameObjectFactory.register('text', function (x, y, text, style) /***/ }), -/* 1057 */ +/* 1064 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154596,7 +156842,7 @@ GameObjectFactory.register('text', function (x, y, text, style) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileSprite = __webpack_require__(205); +var TileSprite = __webpack_require__(208); var GameObjectFactory = __webpack_require__(5); /** @@ -154631,7 +156877,7 @@ GameObjectFactory.register('tileSprite', function (x, y, width, height, key, fra /***/ }), -/* 1058 */ +/* 1065 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154640,7 +156886,7 @@ GameObjectFactory.register('tileSprite', function (x, y, width, height, key, fra * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Zone = __webpack_require__(114); +var Zone = __webpack_require__(115); var GameObjectFactory = __webpack_require__(5); /** @@ -154673,7 +156919,7 @@ GameObjectFactory.register('zone', function (x, y, width, height) /***/ }), -/* 1059 */ +/* 1066 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154682,7 +156928,7 @@ GameObjectFactory.register('zone', function (x, y, width, height) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Video = __webpack_require__(206); +var Video = __webpack_require__(209); var GameObjectFactory = __webpack_require__(5); /** @@ -154719,7 +156965,7 @@ GameObjectFactory.register('video', function (x, y, key) /***/ }), -/* 1060 */ +/* 1067 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154728,7 +156974,7 @@ GameObjectFactory.register('video', function (x, y, key) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Arc = __webpack_require__(410); +var Arc = __webpack_require__(427); var GameObjectFactory = __webpack_require__(5); /** @@ -154792,7 +157038,7 @@ GameObjectFactory.register('circle', function (x, y, radius, fillColor, fillAlph /***/ }), -/* 1061 */ +/* 1068 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154802,7 +157048,7 @@ GameObjectFactory.register('circle', function (x, y, radius, fillColor, fillAlph */ var GameObjectFactory = __webpack_require__(5); -var Curve = __webpack_require__(411); +var Curve = __webpack_require__(428); /** * Creates a new Curve Shape Game Object and adds it to the Scene. @@ -154842,7 +157088,7 @@ GameObjectFactory.register('curve', function (x, y, curve, fillColor, fillAlpha) /***/ }), -/* 1062 */ +/* 1069 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154851,7 +157097,7 @@ GameObjectFactory.register('curve', function (x, y, curve, fillColor, fillAlpha) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Ellipse = __webpack_require__(412); +var Ellipse = __webpack_require__(429); var GameObjectFactory = __webpack_require__(5); /** @@ -154894,7 +157140,7 @@ GameObjectFactory.register('ellipse', function (x, y, width, height, fillColor, /***/ }), -/* 1063 */ +/* 1070 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154904,7 +157150,7 @@ GameObjectFactory.register('ellipse', function (x, y, width, height, fillColor, */ var GameObjectFactory = __webpack_require__(5); -var Grid = __webpack_require__(413); +var Grid = __webpack_require__(430); /** * Creates a new Grid Shape Game Object and adds it to the Scene. @@ -154949,7 +157195,7 @@ GameObjectFactory.register('grid', function (x, y, width, height, cellWidth, cel /***/ }), -/* 1064 */ +/* 1071 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154959,7 +157205,7 @@ GameObjectFactory.register('grid', function (x, y, width, height, cellWidth, cel */ var GameObjectFactory = __webpack_require__(5); -var IsoBox = __webpack_require__(414); +var IsoBox = __webpack_require__(431); /** * Creates a new IsoBox Shape Game Object and adds it to the Scene. @@ -155000,7 +157246,7 @@ GameObjectFactory.register('isobox', function (x, y, size, height, fillTop, fill /***/ }), -/* 1065 */ +/* 1072 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155010,7 +157256,7 @@ GameObjectFactory.register('isobox', function (x, y, size, height, fillTop, fill */ var GameObjectFactory = __webpack_require__(5); -var IsoTriangle = __webpack_require__(415); +var IsoTriangle = __webpack_require__(432); /** * Creates a new IsoTriangle Shape Game Object and adds it to the Scene. @@ -155053,7 +157299,7 @@ GameObjectFactory.register('isotriangle', function (x, y, size, height, reversed /***/ }), -/* 1066 */ +/* 1073 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155063,7 +157309,7 @@ GameObjectFactory.register('isotriangle', function (x, y, size, height, reversed */ var GameObjectFactory = __webpack_require__(5); -var Line = __webpack_require__(416); +var Line = __webpack_require__(433); /** * Creates a new Line Shape Game Object and adds it to the Scene. @@ -155104,7 +157350,7 @@ GameObjectFactory.register('line', function (x, y, x1, y1, x2, y2, strokeColor, /***/ }), -/* 1067 */ +/* 1074 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155114,7 +157360,7 @@ GameObjectFactory.register('line', function (x, y, x1, y1, x2, y2, strokeColor, */ var GameObjectFactory = __webpack_require__(5); -var Polygon = __webpack_require__(417); +var Polygon = __webpack_require__(434); /** * Creates a new Polygon Shape Game Object and adds it to the Scene. @@ -155157,7 +157403,7 @@ GameObjectFactory.register('polygon', function (x, y, points, fillColor, fillAlp /***/ }), -/* 1068 */ +/* 1075 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155167,7 +157413,7 @@ GameObjectFactory.register('polygon', function (x, y, points, fillColor, fillAlp */ var GameObjectFactory = __webpack_require__(5); -var Rectangle = __webpack_require__(422); +var Rectangle = __webpack_require__(439); /** * Creates a new Rectangle Shape Game Object and adds it to the Scene. @@ -155202,7 +157448,7 @@ GameObjectFactory.register('rectangle', function (x, y, width, height, fillColor /***/ }), -/* 1069 */ +/* 1076 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155211,7 +157457,7 @@ GameObjectFactory.register('rectangle', function (x, y, width, height, fillColor * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Star = __webpack_require__(423); +var Star = __webpack_require__(440); var GameObjectFactory = __webpack_require__(5); /** @@ -155254,7 +157500,7 @@ GameObjectFactory.register('star', function (x, y, points, innerRadius, outerRad /***/ }), -/* 1070 */ +/* 1077 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155264,7 +157510,7 @@ GameObjectFactory.register('star', function (x, y, points, innerRadius, outerRad */ var GameObjectFactory = __webpack_require__(5); -var Triangle = __webpack_require__(424); +var Triangle = __webpack_require__(441); /** * Creates a new Triangle Shape Game Object and adds it to the Scene. @@ -155305,7 +157551,7 @@ GameObjectFactory.register('triangle', function (x, y, x1, y1, x2, y2, x3, y3, f /***/ }), -/* 1071 */ +/* 1078 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155314,7 +157560,7 @@ GameObjectFactory.register('triangle', function (x, y, x1, y1, x2, y2, x3, y3, f * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Blitter = __webpack_require__(194); +var Blitter = __webpack_require__(197); var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); @@ -155355,7 +157601,7 @@ GameObjectCreator.register('blitter', function (config, addToScene) /***/ }), -/* 1072 */ +/* 1079 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155366,7 +157612,7 @@ GameObjectCreator.register('blitter', function (config, addToScene) */ var BuildGameObject = __webpack_require__(27); -var Container = __webpack_require__(195); +var Container = __webpack_require__(198); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); @@ -155389,8 +157635,9 @@ GameObjectCreator.register('container', function (config, addToScene) var x = GetAdvancedValue(config, 'x', 0); var y = GetAdvancedValue(config, 'y', 0); + var children = GetAdvancedValue(config, 'children', null); - var container = new Container(this.scene, x, y); + var container = new Container(this.scene, x, y, children); if (addToScene !== undefined) { @@ -155398,13 +157645,13 @@ GameObjectCreator.register('container', function (config, addToScene) } BuildGameObject(this.scene, container, config); - + return container; }); /***/ }), -/* 1073 */ +/* 1080 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155413,7 +157660,7 @@ GameObjectCreator.register('container', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(196); +var BitmapText = __webpack_require__(199); var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); @@ -155455,7 +157702,7 @@ GameObjectCreator.register('dynamicBitmapText', function (config, addToScene) /***/ }), -/* 1074 */ +/* 1081 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155465,7 +157712,7 @@ GameObjectCreator.register('dynamicBitmapText', function (config, addToScene) */ var GameObjectCreator = __webpack_require__(16); -var Graphics = __webpack_require__(197); +var Graphics = __webpack_require__(200); /** * Creates a new Graphics Game Object and returns it. @@ -155503,7 +157750,7 @@ GameObjectCreator.register('graphics', function (config, addToScene) /***/ }), -/* 1075 */ +/* 1082 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155513,7 +157760,7 @@ GameObjectCreator.register('graphics', function (config, addToScene) */ var GameObjectCreator = __webpack_require__(16); -var Group = __webpack_require__(98); +var Group = __webpack_require__(99); /** * Creates a new Group Game Object and returns it. @@ -155536,7 +157783,7 @@ GameObjectCreator.register('group', function (config) /***/ }), -/* 1076 */ +/* 1083 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155548,7 +157795,7 @@ GameObjectCreator.register('group', function (config) var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Image = __webpack_require__(111); +var Image = __webpack_require__(112); /** * Creates a new Image Game Object and returns it. @@ -155586,7 +157833,7 @@ GameObjectCreator.register('image', function (config, addToScene) /***/ }), -/* 1077 */ +/* 1084 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155598,7 +157845,7 @@ GameObjectCreator.register('image', function (config, addToScene) var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); var GetFastValue = __webpack_require__(2); -var ParticleEmitterManager = __webpack_require__(200); +var ParticleEmitterManager = __webpack_require__(203); /** * Creates a new Particle Emitter Manager Game Object and returns it. @@ -155636,14 +157883,12 @@ GameObjectCreator.register('particles', function (config, addToScene) this.displayList.add(manager); } - this.updateList.add(manager); - return manager; }); /***/ }), -/* 1078 */ +/* 1085 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155655,7 +157900,7 @@ GameObjectCreator.register('particles', function (config, addToScene) var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var RenderTexture = __webpack_require__(201); +var RenderTexture = __webpack_require__(204); /** * Creates a new Render Texture Game Object and returns it. @@ -155695,7 +157940,7 @@ GameObjectCreator.register('renderTexture', function (config, addToScene) /***/ }), -/* 1079 */ +/* 1086 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155708,7 +157953,7 @@ var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); var GetValue = __webpack_require__(6); -var Rope = __webpack_require__(203); +var Rope = __webpack_require__(206); /** * Creates a new Rope Game Object and returns it. @@ -155750,7 +157995,7 @@ GameObjectCreator.register('rope', function (config, addToScene) /***/ }), -/* 1080 */ +/* 1087 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155760,10 +158005,10 @@ GameObjectCreator.register('rope', function (config, addToScene) */ var BuildGameObject = __webpack_require__(27); -var BuildGameObjectAnimation = __webpack_require__(393); +var BuildGameObjectAnimation = __webpack_require__(405); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Sprite = __webpack_require__(75); +var Sprite = __webpack_require__(76); /** * Creates a new Sprite Game Object and returns it. @@ -155803,7 +158048,7 @@ GameObjectCreator.register('sprite', function (config, addToScene) /***/ }), -/* 1081 */ +/* 1088 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155812,7 +158057,7 @@ GameObjectCreator.register('sprite', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(138); +var BitmapText = __webpack_require__(139); var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); @@ -155856,7 +158101,7 @@ GameObjectCreator.register('bitmapText', function (config, addToScene) /***/ }), -/* 1082 */ +/* 1089 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155868,7 +158113,7 @@ GameObjectCreator.register('bitmapText', function (config, addToScene) var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Text = __webpack_require__(204); +var Text = __webpack_require__(207); /** * Creates a new Text Game Object and returns it. @@ -155943,7 +158188,7 @@ GameObjectCreator.register('text', function (config, addToScene) /***/ }), -/* 1083 */ +/* 1090 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155955,7 +158200,7 @@ GameObjectCreator.register('text', function (config, addToScene) var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var TileSprite = __webpack_require__(205); +var TileSprite = __webpack_require__(208); /** * Creates a new TileSprite Game Object and returns it. @@ -155995,7 +158240,7 @@ GameObjectCreator.register('tileSprite', function (config, addToScene) /***/ }), -/* 1084 */ +/* 1091 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156006,7 +158251,7 @@ GameObjectCreator.register('tileSprite', function (config, addToScene) var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Zone = __webpack_require__(114); +var Zone = __webpack_require__(115); /** * Creates a new Zone Game Object and returns it. @@ -156034,7 +158279,7 @@ GameObjectCreator.register('zone', function (config) /***/ }), -/* 1085 */ +/* 1092 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156046,7 +158291,7 @@ GameObjectCreator.register('zone', function (config) var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Video = __webpack_require__(206); +var Video = __webpack_require__(209); /** * Creates a new Video Game Object and returns it. @@ -156083,7 +158328,7 @@ GameObjectCreator.register('video', function (config, addToScene) /***/ }), -/* 1086 */ +/* 1093 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156097,12 +158342,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1087); + renderWebGL = __webpack_require__(1094); } if (true) { - renderCanvas = __webpack_require__(1088); + renderCanvas = __webpack_require__(1095); } module.exports = { @@ -156114,7 +158359,7 @@ module.exports = { /***/ }), -/* 1087 */ +/* 1094 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156230,7 +158475,7 @@ module.exports = MeshWebGLRenderer; /***/ }), -/* 1088 */ +/* 1095 */ /***/ (function(module, exports) { /** @@ -156259,7 +158504,7 @@ module.exports = MeshCanvasRenderer; /***/ }), -/* 1089 */ +/* 1096 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156273,12 +158518,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1090); + renderWebGL = __webpack_require__(1097); } if (true) { - renderCanvas = __webpack_require__(1091); + renderCanvas = __webpack_require__(1098); } module.exports = { @@ -156290,7 +158535,7 @@ module.exports = { /***/ }), -/* 1090 */ +/* 1097 */ /***/ (function(module, exports) { /** @@ -156374,7 +158619,7 @@ module.exports = ShaderWebGLRenderer; /***/ }), -/* 1091 */ +/* 1098 */ /***/ (function(module, exports) { /** @@ -156403,7 +158648,7 @@ module.exports = ShaderCanvasRenderer; /***/ }), -/* 1092 */ +/* 1099 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156412,7 +158657,7 @@ module.exports = ShaderCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Mesh = __webpack_require__(140); +var Mesh = __webpack_require__(141); var GameObjectFactory = __webpack_require__(5); /** @@ -156453,7 +158698,7 @@ if (true) /***/ }), -/* 1093 */ +/* 1100 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156462,7 +158707,7 @@ if (true) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Quad = __webpack_require__(209); +var Quad = __webpack_require__(212); var GameObjectFactory = __webpack_require__(5); /** @@ -156499,7 +158744,7 @@ if (true) /***/ }), -/* 1094 */ +/* 1101 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156508,7 +158753,7 @@ if (true) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Shader = __webpack_require__(210); +var Shader = __webpack_require__(213); var GameObjectFactory = __webpack_require__(5); /** @@ -156540,7 +158785,7 @@ if (true) /***/ }), -/* 1095 */ +/* 1102 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156553,7 +158798,7 @@ var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); var GetValue = __webpack_require__(6); -var Mesh = __webpack_require__(140); +var Mesh = __webpack_require__(141); /** * Creates a new Mesh Game Object and returns it. @@ -156595,7 +158840,7 @@ GameObjectCreator.register('mesh', function (config, addToScene) /***/ }), -/* 1096 */ +/* 1103 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156607,7 +158852,7 @@ GameObjectCreator.register('mesh', function (config, addToScene) var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Quad = __webpack_require__(209); +var Quad = __webpack_require__(212); /** * Creates a new Quad Game Object and returns it. @@ -156645,7 +158890,7 @@ GameObjectCreator.register('quad', function (config, addToScene) /***/ }), -/* 1097 */ +/* 1104 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156657,7 +158902,7 @@ GameObjectCreator.register('quad', function (config, addToScene) var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Shader = __webpack_require__(210); +var Shader = __webpack_require__(213); /** * Creates a new Shader Game Object and returns it. @@ -156698,7 +158943,7 @@ GameObjectCreator.register('shader', function (config, addToScene) /***/ }), -/* 1098 */ +/* 1105 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156708,9 +158953,9 @@ GameObjectCreator.register('shader', function (config, addToScene) */ var Class = __webpack_require__(0); -var LightsManager = __webpack_require__(429); +var LightsManager = __webpack_require__(446); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(22); +var SceneEvents = __webpack_require__(20); /** * @classdesc @@ -156814,7 +159059,7 @@ module.exports = LightsPlugin; /***/ }), -/* 1099 */ +/* 1106 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156823,29 +159068,29 @@ module.exports = LightsPlugin; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circle = __webpack_require__(65); +var Circle = __webpack_require__(68); -Circle.Area = __webpack_require__(1100); -Circle.Circumference = __webpack_require__(272); -Circle.CircumferencePoint = __webpack_require__(154); -Circle.Clone = __webpack_require__(1101); -Circle.Contains = __webpack_require__(56); -Circle.ContainsPoint = __webpack_require__(1102); -Circle.ContainsRect = __webpack_require__(1103); -Circle.CopyFrom = __webpack_require__(1104); -Circle.Equals = __webpack_require__(1105); -Circle.GetBounds = __webpack_require__(1106); -Circle.GetPoint = __webpack_require__(270); -Circle.GetPoints = __webpack_require__(271); -Circle.Offset = __webpack_require__(1107); -Circle.OffsetPoint = __webpack_require__(1108); -Circle.Random = __webpack_require__(155); +Circle.Area = __webpack_require__(1107); +Circle.Circumference = __webpack_require__(278); +Circle.CircumferencePoint = __webpack_require__(157); +Circle.Clone = __webpack_require__(1108); +Circle.Contains = __webpack_require__(57); +Circle.ContainsPoint = __webpack_require__(1109); +Circle.ContainsRect = __webpack_require__(1110); +Circle.CopyFrom = __webpack_require__(1111); +Circle.Equals = __webpack_require__(1112); +Circle.GetBounds = __webpack_require__(1113); +Circle.GetPoint = __webpack_require__(276); +Circle.GetPoints = __webpack_require__(277); +Circle.Offset = __webpack_require__(1114); +Circle.OffsetPoint = __webpack_require__(1115); +Circle.Random = __webpack_require__(158); module.exports = Circle; /***/ }), -/* 1100 */ +/* 1107 */ /***/ (function(module, exports) { /** @@ -156873,7 +159118,7 @@ module.exports = Area; /***/ }), -/* 1101 */ +/* 1108 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156882,7 +159127,7 @@ module.exports = Area; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circle = __webpack_require__(65); +var Circle = __webpack_require__(68); /** * Creates a new Circle instance based on the values contained in the given source. @@ -156903,7 +159148,7 @@ module.exports = Clone; /***/ }), -/* 1102 */ +/* 1109 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156912,7 +159157,7 @@ module.exports = Clone; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(56); +var Contains = __webpack_require__(57); /** * Check to see if the Circle contains the given Point object. @@ -156934,7 +159179,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1103 */ +/* 1110 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156943,7 +159188,7 @@ module.exports = ContainsPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(56); +var Contains = __webpack_require__(57); /** * Check to see if the Circle contains all four points of the given Rectangle object. @@ -156970,7 +159215,7 @@ module.exports = ContainsRect; /***/ }), -/* 1104 */ +/* 1111 */ /***/ (function(module, exports) { /** @@ -157002,7 +159247,7 @@ module.exports = CopyFrom; /***/ }), -/* 1105 */ +/* 1112 */ /***/ (function(module, exports) { /** @@ -157036,7 +159281,7 @@ module.exports = Equals; /***/ }), -/* 1106 */ +/* 1113 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157076,7 +159321,7 @@ module.exports = GetBounds; /***/ }), -/* 1107 */ +/* 1114 */ /***/ (function(module, exports) { /** @@ -157111,7 +159356,7 @@ module.exports = Offset; /***/ }), -/* 1108 */ +/* 1115 */ /***/ (function(module, exports) { /** @@ -157145,7 +159390,7 @@ module.exports = OffsetPoint; /***/ }), -/* 1109 */ +/* 1116 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157154,29 +159399,29 @@ module.exports = OffsetPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Ellipse = __webpack_require__(96); +var Ellipse = __webpack_require__(97); -Ellipse.Area = __webpack_require__(1110); -Ellipse.Circumference = __webpack_require__(400); -Ellipse.CircumferencePoint = __webpack_require__(199); -Ellipse.Clone = __webpack_require__(1111); -Ellipse.Contains = __webpack_require__(97); -Ellipse.ContainsPoint = __webpack_require__(1112); -Ellipse.ContainsRect = __webpack_require__(1113); -Ellipse.CopyFrom = __webpack_require__(1114); -Ellipse.Equals = __webpack_require__(1115); -Ellipse.GetBounds = __webpack_require__(1116); -Ellipse.GetPoint = __webpack_require__(398); -Ellipse.GetPoints = __webpack_require__(399); -Ellipse.Offset = __webpack_require__(1117); -Ellipse.OffsetPoint = __webpack_require__(1118); -Ellipse.Random = __webpack_require__(163); +Ellipse.Area = __webpack_require__(1117); +Ellipse.Circumference = __webpack_require__(413); +Ellipse.CircumferencePoint = __webpack_require__(202); +Ellipse.Clone = __webpack_require__(1118); +Ellipse.Contains = __webpack_require__(98); +Ellipse.ContainsPoint = __webpack_require__(1119); +Ellipse.ContainsRect = __webpack_require__(1120); +Ellipse.CopyFrom = __webpack_require__(1121); +Ellipse.Equals = __webpack_require__(1122); +Ellipse.GetBounds = __webpack_require__(1123); +Ellipse.GetPoint = __webpack_require__(411); +Ellipse.GetPoints = __webpack_require__(412); +Ellipse.Offset = __webpack_require__(1124); +Ellipse.OffsetPoint = __webpack_require__(1125); +Ellipse.Random = __webpack_require__(165); module.exports = Ellipse; /***/ }), -/* 1110 */ +/* 1117 */ /***/ (function(module, exports) { /** @@ -157210,7 +159455,7 @@ module.exports = Area; /***/ }), -/* 1111 */ +/* 1118 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157219,7 +159464,7 @@ module.exports = Area; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Ellipse = __webpack_require__(96); +var Ellipse = __webpack_require__(97); /** * Creates a new Ellipse instance based on the values contained in the given source. @@ -157240,7 +159485,7 @@ module.exports = Clone; /***/ }), -/* 1112 */ +/* 1119 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157249,7 +159494,7 @@ module.exports = Clone; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(97); +var Contains = __webpack_require__(98); /** * Check to see if the Ellipse contains the given Point object. @@ -157271,7 +159516,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1113 */ +/* 1120 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157280,7 +159525,7 @@ module.exports = ContainsPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(97); +var Contains = __webpack_require__(98); /** * Check to see if the Ellipse contains all four points of the given Rectangle object. @@ -157307,7 +159552,7 @@ module.exports = ContainsRect; /***/ }), -/* 1114 */ +/* 1121 */ /***/ (function(module, exports) { /** @@ -157339,7 +159584,7 @@ module.exports = CopyFrom; /***/ }), -/* 1115 */ +/* 1122 */ /***/ (function(module, exports) { /** @@ -157374,7 +159619,7 @@ module.exports = Equals; /***/ }), -/* 1116 */ +/* 1123 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157414,7 +159659,7 @@ module.exports = GetBounds; /***/ }), -/* 1117 */ +/* 1124 */ /***/ (function(module, exports) { /** @@ -157449,7 +159694,7 @@ module.exports = Offset; /***/ }), -/* 1118 */ +/* 1125 */ /***/ (function(module, exports) { /** @@ -157483,7 +159728,7 @@ module.exports = OffsetPoint; /***/ }), -/* 1119 */ +/* 1126 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157494,7 +159739,7 @@ module.exports = OffsetPoint; */ var Point = __webpack_require__(4); -var CircleToCircle = __webpack_require__(211); +var CircleToCircle = __webpack_require__(214); /** * Checks if two Circles intersect and returns the intersection points as a Point object array. @@ -157577,7 +159822,7 @@ module.exports = GetCircleToCircle; /***/ }), -/* 1120 */ +/* 1127 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157587,8 +159832,8 @@ module.exports = GetCircleToCircle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLineToCircle = __webpack_require__(213); -var CircleToRectangle = __webpack_require__(212); +var GetLineToCircle = __webpack_require__(216); +var CircleToRectangle = __webpack_require__(215); /** * Checks for intersection between a circle and a rectangle, @@ -157627,7 +159872,7 @@ module.exports = GetCircleToRectangle; /***/ }), -/* 1121 */ +/* 1128 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157636,9 +159881,9 @@ module.exports = GetCircleToRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector4 = __webpack_require__(126); -var GetLineToPolygon = __webpack_require__(434); -var Line = __webpack_require__(39); +var Vector4 = __webpack_require__(128); +var GetLineToPolygon = __webpack_require__(451); +var Line = __webpack_require__(40); // Temp calculation segment var segment = new Line(); @@ -157729,7 +159974,7 @@ module.exports = GetRaysFromPointToPolygon; /***/ }), -/* 1122 */ +/* 1129 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157739,7 +159984,7 @@ module.exports = GetRaysFromPointToPolygon; */ var Rectangle = __webpack_require__(9); -var RectangleToRectangle = __webpack_require__(141); +var RectangleToRectangle = __webpack_require__(142); /** * Checks if two Rectangle shapes intersect and returns the area of this intersection as Rectangle object. @@ -157778,7 +160023,7 @@ module.exports = GetRectangleIntersection; /***/ }), -/* 1123 */ +/* 1130 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157788,8 +160033,8 @@ module.exports = GetRectangleIntersection; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLineToRectangle = __webpack_require__(215); -var RectangleToRectangle = __webpack_require__(141); +var GetLineToRectangle = __webpack_require__(218); +var RectangleToRectangle = __webpack_require__(142); /** * Checks if two Rectangles intersect and returns the intersection points as a Point object array. @@ -157829,7 +160074,7 @@ module.exports = GetRectangleToRectangle; /***/ }), -/* 1124 */ +/* 1131 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157839,8 +160084,8 @@ module.exports = GetRectangleToRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RectangleToTriangle = __webpack_require__(436); -var GetLineToRectangle = __webpack_require__(215); +var RectangleToTriangle = __webpack_require__(453); +var GetLineToRectangle = __webpack_require__(218); /** * Checks for intersection between Rectangle shape and Triangle shape, @@ -157877,7 +160122,7 @@ module.exports = GetRectangleToTriangle; /***/ }), -/* 1125 */ +/* 1132 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157887,8 +160132,8 @@ module.exports = GetRectangleToTriangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLineToCircle = __webpack_require__(213); -var TriangleToCircle = __webpack_require__(438); +var GetLineToCircle = __webpack_require__(216); +var TriangleToCircle = __webpack_require__(455); /** * Checks if a Triangle and a Circle intersect, and returns the intersection points as a Point object array. @@ -157926,7 +160171,7 @@ module.exports = GetTriangleToCircle; /***/ }), -/* 1126 */ +/* 1133 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157936,8 +160181,8 @@ module.exports = GetTriangleToCircle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TriangleToTriangle = __webpack_require__(441); -var GetTriangleToLine = __webpack_require__(439); +var TriangleToTriangle = __webpack_require__(458); +var GetTriangleToLine = __webpack_require__(456); /** * Checks if two Triangles intersect, and returns the intersection points as a Point object array. @@ -157975,7 +160220,7 @@ module.exports = GetTriangleToTriangle; /***/ }), -/* 1127 */ +/* 1134 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157984,7 +160229,7 @@ module.exports = GetTriangleToTriangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PointToLine = __webpack_require__(443); +var PointToLine = __webpack_require__(460); /** * Checks if a Point is located on the given line segment. @@ -158016,7 +160261,7 @@ module.exports = PointToLineSegment; /***/ }), -/* 1128 */ +/* 1135 */ /***/ (function(module, exports) { /** @@ -158056,7 +160301,7 @@ module.exports = RectangleToValues; /***/ }), -/* 1129 */ +/* 1136 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158065,43 +160310,43 @@ module.exports = RectangleToValues; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Line = __webpack_require__(39); +var Line = __webpack_require__(40); -Line.Angle = __webpack_require__(86); -Line.BresenhamPoints = __webpack_require__(292); -Line.CenterOn = __webpack_require__(1130); -Line.Clone = __webpack_require__(1131); -Line.CopyFrom = __webpack_require__(1132); -Line.Equals = __webpack_require__(1133); -Line.Extend = __webpack_require__(1134); -Line.GetEasedPoints = __webpack_require__(1135); -Line.GetMidPoint = __webpack_require__(1136); -Line.GetNearestPoint = __webpack_require__(1137); -Line.GetNormal = __webpack_require__(1138); -Line.GetPoint = __webpack_require__(279); -Line.GetPoints = __webpack_require__(158); -Line.GetShortestDistance = __webpack_require__(1139); -Line.Height = __webpack_require__(1140); -Line.Length = __webpack_require__(57); -Line.NormalAngle = __webpack_require__(444); -Line.NormalX = __webpack_require__(1141); -Line.NormalY = __webpack_require__(1142); -Line.Offset = __webpack_require__(1143); -Line.PerpSlope = __webpack_require__(1144); -Line.Random = __webpack_require__(159); -Line.ReflectAngle = __webpack_require__(1145); -Line.Rotate = __webpack_require__(1146); -Line.RotateAroundPoint = __webpack_require__(1147); -Line.RotateAroundXY = __webpack_require__(217); -Line.SetToAngle = __webpack_require__(1148); -Line.Slope = __webpack_require__(1149); -Line.Width = __webpack_require__(1150); +Line.Angle = __webpack_require__(87); +Line.BresenhamPoints = __webpack_require__(296); +Line.CenterOn = __webpack_require__(1137); +Line.Clone = __webpack_require__(1138); +Line.CopyFrom = __webpack_require__(1139); +Line.Equals = __webpack_require__(1140); +Line.Extend = __webpack_require__(1141); +Line.GetEasedPoints = __webpack_require__(1142); +Line.GetMidPoint = __webpack_require__(1143); +Line.GetNearestPoint = __webpack_require__(1144); +Line.GetNormal = __webpack_require__(1145); +Line.GetPoint = __webpack_require__(283); +Line.GetPoints = __webpack_require__(160); +Line.GetShortestDistance = __webpack_require__(1146); +Line.Height = __webpack_require__(1147); +Line.Length = __webpack_require__(58); +Line.NormalAngle = __webpack_require__(461); +Line.NormalX = __webpack_require__(1148); +Line.NormalY = __webpack_require__(1149); +Line.Offset = __webpack_require__(1150); +Line.PerpSlope = __webpack_require__(1151); +Line.Random = __webpack_require__(161); +Line.ReflectAngle = __webpack_require__(1152); +Line.Rotate = __webpack_require__(1153); +Line.RotateAroundPoint = __webpack_require__(1154); +Line.RotateAroundXY = __webpack_require__(220); +Line.SetToAngle = __webpack_require__(1155); +Line.Slope = __webpack_require__(1156); +Line.Width = __webpack_require__(1157); module.exports = Line; /***/ }), -/* 1130 */ +/* 1137 */ /***/ (function(module, exports) { /** @@ -158141,7 +160386,7 @@ module.exports = CenterOn; /***/ }), -/* 1131 */ +/* 1138 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158150,7 +160395,7 @@ module.exports = CenterOn; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Line = __webpack_require__(39); +var Line = __webpack_require__(40); /** * Clone the given line. @@ -158171,7 +160416,7 @@ module.exports = Clone; /***/ }), -/* 1132 */ +/* 1139 */ /***/ (function(module, exports) { /** @@ -158202,7 +160447,7 @@ module.exports = CopyFrom; /***/ }), -/* 1133 */ +/* 1140 */ /***/ (function(module, exports) { /** @@ -158236,7 +160481,7 @@ module.exports = Equals; /***/ }), -/* 1134 */ +/* 1141 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158245,7 +160490,7 @@ module.exports = Equals; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Length = __webpack_require__(57); +var Length = __webpack_require__(58); /** * Extends the start and end points of a Line by the given amounts. @@ -158294,7 +160539,7 @@ module.exports = Extend; /***/ }), -/* 1135 */ +/* 1142 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158303,8 +160548,8 @@ module.exports = Extend; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DistanceBetweenPoints = __webpack_require__(324); -var GetEaseFunction = __webpack_require__(69); +var DistanceBetweenPoints = __webpack_require__(332); +var GetEaseFunction = __webpack_require__(71); var Point = __webpack_require__(4); /** @@ -158414,7 +160659,7 @@ module.exports = GetEasedPoints; /***/ }), -/* 1136 */ +/* 1143 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158452,7 +160697,7 @@ module.exports = GetMidPoint; /***/ }), -/* 1137 */ +/* 1144 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158507,7 +160752,7 @@ module.exports = GetNearestPoint; /***/ }), -/* 1138 */ +/* 1145 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158517,7 +160762,7 @@ module.exports = GetNearestPoint; */ var MATH_CONST = __webpack_require__(13); -var Angle = __webpack_require__(86); +var Angle = __webpack_require__(87); var Point = __webpack_require__(4); /** @@ -158551,7 +160796,7 @@ module.exports = GetNormal; /***/ }), -/* 1139 */ +/* 1146 */ /***/ (function(module, exports) { /** @@ -158598,7 +160843,7 @@ module.exports = GetShortestDistance; /***/ }), -/* 1140 */ +/* 1147 */ /***/ (function(module, exports) { /** @@ -158626,7 +160871,7 @@ module.exports = Height; /***/ }), -/* 1141 */ +/* 1148 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158636,7 +160881,7 @@ module.exports = Height; */ var MATH_CONST = __webpack_require__(13); -var Angle = __webpack_require__(86); +var Angle = __webpack_require__(87); /** * Returns the x component of the normal vector of the given line. @@ -158657,7 +160902,7 @@ module.exports = NormalX; /***/ }), -/* 1142 */ +/* 1149 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158667,7 +160912,7 @@ module.exports = NormalX; */ var MATH_CONST = __webpack_require__(13); -var Angle = __webpack_require__(86); +var Angle = __webpack_require__(87); /** * The Y value of the normal of the given line. @@ -158689,7 +160934,7 @@ module.exports = NormalY; /***/ }), -/* 1143 */ +/* 1150 */ /***/ (function(module, exports) { /** @@ -158727,7 +160972,7 @@ module.exports = Offset; /***/ }), -/* 1144 */ +/* 1151 */ /***/ (function(module, exports) { /** @@ -158755,7 +161000,7 @@ module.exports = PerpSlope; /***/ }), -/* 1145 */ +/* 1152 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158764,8 +161009,8 @@ module.exports = PerpSlope; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Angle = __webpack_require__(86); -var NormalAngle = __webpack_require__(444); +var Angle = __webpack_require__(87); +var NormalAngle = __webpack_require__(461); /** * Calculate the reflected angle between two lines. @@ -158789,7 +161034,7 @@ module.exports = ReflectAngle; /***/ }), -/* 1146 */ +/* 1153 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158798,7 +161043,7 @@ module.exports = ReflectAngle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(217); +var RotateAroundXY = __webpack_require__(220); /** * Rotate a line around its midpoint by the given angle in radians. @@ -158825,7 +161070,7 @@ module.exports = Rotate; /***/ }), -/* 1147 */ +/* 1154 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158834,7 +161079,7 @@ module.exports = Rotate; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(217); +var RotateAroundXY = __webpack_require__(220); /** * Rotate a line around a point by the given angle in radians. @@ -158859,7 +161104,7 @@ module.exports = RotateAroundPoint; /***/ }), -/* 1148 */ +/* 1155 */ /***/ (function(module, exports) { /** @@ -158899,7 +161144,7 @@ module.exports = SetToAngle; /***/ }), -/* 1149 */ +/* 1156 */ /***/ (function(module, exports) { /** @@ -158927,7 +161172,7 @@ module.exports = Slope; /***/ }), -/* 1150 */ +/* 1157 */ /***/ (function(module, exports) { /** @@ -158955,7 +161200,7 @@ module.exports = Width; /***/ }), -/* 1151 */ +/* 1158 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158966,27 +161211,27 @@ module.exports = Width; var Point = __webpack_require__(4); -Point.Ceil = __webpack_require__(1152); -Point.Clone = __webpack_require__(1153); -Point.CopyFrom = __webpack_require__(1154); -Point.Equals = __webpack_require__(1155); -Point.Floor = __webpack_require__(1156); -Point.GetCentroid = __webpack_require__(1157); -Point.GetMagnitude = __webpack_require__(445); -Point.GetMagnitudeSq = __webpack_require__(446); -Point.GetRectangleFromPoints = __webpack_require__(1158); -Point.Interpolate = __webpack_require__(1159); -Point.Invert = __webpack_require__(1160); -Point.Negative = __webpack_require__(1161); -Point.Project = __webpack_require__(1162); -Point.ProjectUnit = __webpack_require__(1163); -Point.SetMagnitude = __webpack_require__(1164); +Point.Ceil = __webpack_require__(1159); +Point.Clone = __webpack_require__(1160); +Point.CopyFrom = __webpack_require__(1161); +Point.Equals = __webpack_require__(1162); +Point.Floor = __webpack_require__(1163); +Point.GetCentroid = __webpack_require__(1164); +Point.GetMagnitude = __webpack_require__(462); +Point.GetMagnitudeSq = __webpack_require__(463); +Point.GetRectangleFromPoints = __webpack_require__(1165); +Point.Interpolate = __webpack_require__(1166); +Point.Invert = __webpack_require__(1167); +Point.Negative = __webpack_require__(1168); +Point.Project = __webpack_require__(1169); +Point.ProjectUnit = __webpack_require__(1170); +Point.SetMagnitude = __webpack_require__(1171); module.exports = Point; /***/ }), -/* 1152 */ +/* 1159 */ /***/ (function(module, exports) { /** @@ -159016,7 +161261,7 @@ module.exports = Ceil; /***/ }), -/* 1153 */ +/* 1160 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159046,7 +161291,7 @@ module.exports = Clone; /***/ }), -/* 1154 */ +/* 1161 */ /***/ (function(module, exports) { /** @@ -159077,7 +161322,7 @@ module.exports = CopyFrom; /***/ }), -/* 1155 */ +/* 1162 */ /***/ (function(module, exports) { /** @@ -159106,7 +161351,7 @@ module.exports = Equals; /***/ }), -/* 1156 */ +/* 1163 */ /***/ (function(module, exports) { /** @@ -159136,7 +161381,7 @@ module.exports = Floor; /***/ }), -/* 1157 */ +/* 1164 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159200,7 +161445,7 @@ module.exports = GetCentroid; /***/ }), -/* 1158 */ +/* 1165 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159270,7 +161515,7 @@ module.exports = GetRectangleFromPoints; /***/ }), -/* 1159 */ +/* 1166 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159311,7 +161556,7 @@ module.exports = Interpolate; /***/ }), -/* 1160 */ +/* 1167 */ /***/ (function(module, exports) { /** @@ -159341,7 +161586,7 @@ module.exports = Invert; /***/ }), -/* 1161 */ +/* 1168 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159376,7 +161621,7 @@ module.exports = Negative; /***/ }), -/* 1162 */ +/* 1169 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159386,7 +161631,7 @@ module.exports = Negative; */ var Point = __webpack_require__(4); -var GetMagnitudeSq = __webpack_require__(446); +var GetMagnitudeSq = __webpack_require__(463); /** * Calculates the vector projection of `pointA` onto the nonzero `pointB`. This is the @@ -159423,7 +161668,7 @@ module.exports = Project; /***/ }), -/* 1163 */ +/* 1170 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159468,7 +161713,7 @@ module.exports = ProjectUnit; /***/ }), -/* 1164 */ +/* 1171 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159477,7 +161722,7 @@ module.exports = ProjectUnit; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetMagnitude = __webpack_require__(445); +var GetMagnitude = __webpack_require__(462); /** * Changes the magnitude (length) of a two-dimensional vector without changing its direction. @@ -159512,7 +161757,7 @@ module.exports = SetMagnitude; /***/ }), -/* 1165 */ +/* 1172 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159521,25 +161766,26 @@ module.exports = SetMagnitude; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Polygon = __webpack_require__(207); +var Polygon = __webpack_require__(210); -Polygon.Clone = __webpack_require__(1166); -Polygon.Contains = __webpack_require__(208); -Polygon.ContainsPoint = __webpack_require__(1167); -Polygon.GetAABB = __webpack_require__(418); -Polygon.GetNumberArray = __webpack_require__(1168); -Polygon.GetPoints = __webpack_require__(419); -Polygon.Perimeter = __webpack_require__(420); -Polygon.Reverse = __webpack_require__(1169); -Polygon.Simplify = __webpack_require__(1170); -Polygon.Smooth = __webpack_require__(421); -Polygon.Translate = __webpack_require__(1171); +Polygon.Clone = __webpack_require__(1173); +Polygon.Contains = __webpack_require__(211); +Polygon.ContainsPoint = __webpack_require__(1174); +Polygon.Earcut = __webpack_require__(60); +Polygon.GetAABB = __webpack_require__(435); +Polygon.GetNumberArray = __webpack_require__(1175); +Polygon.GetPoints = __webpack_require__(436); +Polygon.Perimeter = __webpack_require__(437); +Polygon.Reverse = __webpack_require__(1176); +Polygon.Simplify = __webpack_require__(1177); +Polygon.Smooth = __webpack_require__(438); +Polygon.Translate = __webpack_require__(1178); module.exports = Polygon; /***/ }), -/* 1166 */ +/* 1173 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159548,7 +161794,7 @@ module.exports = Polygon; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Polygon = __webpack_require__(207); +var Polygon = __webpack_require__(210); /** * Create a new polygon which is a copy of the specified polygon @@ -159569,7 +161815,7 @@ module.exports = Clone; /***/ }), -/* 1167 */ +/* 1174 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159578,7 +161824,7 @@ module.exports = Clone; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(208); +var Contains = __webpack_require__(211); /** * Checks the given Point again the Polygon to see if the Point lays within its vertices. @@ -159600,7 +161846,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1168 */ +/* 1175 */ /***/ (function(module, exports) { /** @@ -159643,7 +161889,7 @@ module.exports = GetNumberArray; /***/ }), -/* 1169 */ +/* 1176 */ /***/ (function(module, exports) { /** @@ -159675,7 +161921,7 @@ module.exports = Reverse; /***/ }), -/* 1170 */ +/* 1177 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -159885,7 +162131,7 @@ module.exports = Simplify; /***/ }), -/* 1171 */ +/* 1178 */ /***/ (function(module, exports) { /** @@ -159925,7 +162171,7 @@ module.exports = Translate; /***/ }), -/* 1172 */ +/* 1179 */ /***/ (function(module, exports) { /** @@ -159953,7 +162199,7 @@ module.exports = Area; /***/ }), -/* 1173 */ +/* 1180 */ /***/ (function(module, exports) { /** @@ -159986,7 +162232,7 @@ module.exports = Ceil; /***/ }), -/* 1174 */ +/* 1181 */ /***/ (function(module, exports) { /** @@ -160021,7 +162267,7 @@ module.exports = CeilAll; /***/ }), -/* 1175 */ +/* 1182 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160051,7 +162297,7 @@ module.exports = Clone; /***/ }), -/* 1176 */ +/* 1183 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160060,7 +162306,7 @@ module.exports = Clone; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(49); +var Contains = __webpack_require__(50); /** * Determines whether the specified point is contained within the rectangular region defined by this Rectangle object. @@ -160082,7 +162328,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1177 */ +/* 1184 */ /***/ (function(module, exports) { /** @@ -160113,7 +162359,7 @@ module.exports = CopyFrom; /***/ }), -/* 1178 */ +/* 1185 */ /***/ (function(module, exports) { /** @@ -160147,7 +162393,7 @@ module.exports = Equals; /***/ }), -/* 1179 */ +/* 1186 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160156,7 +162402,7 @@ module.exports = Equals; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetAspectRatio = __webpack_require__(218); +var GetAspectRatio = __webpack_require__(221); /** * Adjusts the target rectangle, changing its width, height and position, @@ -160200,7 +162446,7 @@ module.exports = FitInside; /***/ }), -/* 1180 */ +/* 1187 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160209,7 +162455,7 @@ module.exports = FitInside; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetAspectRatio = __webpack_require__(218); +var GetAspectRatio = __webpack_require__(221); /** * Adjusts the target rectangle, changing its width, height and position, @@ -160253,7 +162499,7 @@ module.exports = FitOutside; /***/ }), -/* 1181 */ +/* 1188 */ /***/ (function(module, exports) { /** @@ -160286,7 +162532,7 @@ module.exports = Floor; /***/ }), -/* 1182 */ +/* 1189 */ /***/ (function(module, exports) { /** @@ -160321,7 +162567,7 @@ module.exports = FloorAll; /***/ }), -/* 1183 */ +/* 1190 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160364,7 +162610,7 @@ module.exports = FromXY; /***/ }), -/* 1184 */ +/* 1191 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160402,7 +162648,7 @@ module.exports = GetCenter; /***/ }), -/* 1185 */ +/* 1192 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160442,7 +162688,7 @@ module.exports = GetSize; /***/ }), -/* 1186 */ +/* 1193 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160451,7 +162697,7 @@ module.exports = GetSize; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CenterOn = __webpack_require__(174); +var CenterOn = __webpack_require__(176); /** @@ -160484,7 +162730,7 @@ module.exports = Inflate; /***/ }), -/* 1187 */ +/* 1194 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160494,7 +162740,7 @@ module.exports = Inflate; */ var Rectangle = __webpack_require__(9); -var Intersects = __webpack_require__(141); +var Intersects = __webpack_require__(142); /** * Takes two Rectangles and first checks to see if they intersect. @@ -160535,7 +162781,7 @@ module.exports = Intersection; /***/ }), -/* 1188 */ +/* 1195 */ /***/ (function(module, exports) { /** @@ -160584,7 +162830,7 @@ module.exports = MergePoints; /***/ }), -/* 1189 */ +/* 1196 */ /***/ (function(module, exports) { /** @@ -160631,7 +162877,7 @@ module.exports = MergeRect; /***/ }), -/* 1190 */ +/* 1197 */ /***/ (function(module, exports) { /** @@ -160675,7 +162921,7 @@ module.exports = MergeXY; /***/ }), -/* 1191 */ +/* 1198 */ /***/ (function(module, exports) { /** @@ -160710,7 +162956,7 @@ module.exports = Offset; /***/ }), -/* 1192 */ +/* 1199 */ /***/ (function(module, exports) { /** @@ -160744,7 +162990,7 @@ module.exports = OffsetPoint; /***/ }), -/* 1193 */ +/* 1200 */ /***/ (function(module, exports) { /** @@ -160778,7 +163024,7 @@ module.exports = Overlaps; /***/ }), -/* 1194 */ +/* 1201 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160788,7 +163034,7 @@ module.exports = Overlaps; */ var Point = __webpack_require__(4); -var DegToRad = __webpack_require__(40); +var DegToRad = __webpack_require__(41); /** * Returns a Point from the perimeter of a Rectangle based on the given angle. @@ -160835,7 +163081,7 @@ module.exports = PerimeterPoint; /***/ }), -/* 1195 */ +/* 1202 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160844,8 +163090,8 @@ module.exports = PerimeterPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Between = __webpack_require__(178); -var ContainsRect = __webpack_require__(448); +var Between = __webpack_require__(180); +var ContainsRect = __webpack_require__(465); var Point = __webpack_require__(4); /** @@ -160906,7 +163152,7 @@ module.exports = RandomOutside; /***/ }), -/* 1196 */ +/* 1203 */ /***/ (function(module, exports) { /** @@ -160935,7 +163181,7 @@ module.exports = SameDimensions; /***/ }), -/* 1197 */ +/* 1204 */ /***/ (function(module, exports) { /** @@ -160974,7 +163220,7 @@ module.exports = Scale; /***/ }), -/* 1198 */ +/* 1205 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160983,38 +163229,38 @@ module.exports = Scale; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Triangle = __webpack_require__(71); +var Triangle = __webpack_require__(73); -Triangle.Area = __webpack_require__(1199); -Triangle.BuildEquilateral = __webpack_require__(1200); -Triangle.BuildFromPolygon = __webpack_require__(1201); -Triangle.BuildRight = __webpack_require__(1202); -Triangle.CenterOn = __webpack_require__(1203); -Triangle.Centroid = __webpack_require__(449); -Triangle.CircumCenter = __webpack_require__(1204); -Triangle.CircumCircle = __webpack_require__(1205); -Triangle.Clone = __webpack_require__(1206); -Triangle.Contains = __webpack_require__(84); -Triangle.ContainsArray = __webpack_require__(216); -Triangle.ContainsPoint = __webpack_require__(1207); -Triangle.CopyFrom = __webpack_require__(1208); -Triangle.Decompose = __webpack_require__(442); -Triangle.Equals = __webpack_require__(1209); -Triangle.GetPoint = __webpack_require__(425); -Triangle.GetPoints = __webpack_require__(426); -Triangle.InCenter = __webpack_require__(451); -Triangle.Perimeter = __webpack_require__(1210); -Triangle.Offset = __webpack_require__(450); -Triangle.Random = __webpack_require__(164); -Triangle.Rotate = __webpack_require__(1211); -Triangle.RotateAroundPoint = __webpack_require__(1212); -Triangle.RotateAroundXY = __webpack_require__(219); +Triangle.Area = __webpack_require__(1206); +Triangle.BuildEquilateral = __webpack_require__(1207); +Triangle.BuildFromPolygon = __webpack_require__(1208); +Triangle.BuildRight = __webpack_require__(1209); +Triangle.CenterOn = __webpack_require__(1210); +Triangle.Centroid = __webpack_require__(466); +Triangle.CircumCenter = __webpack_require__(1211); +Triangle.CircumCircle = __webpack_require__(1212); +Triangle.Clone = __webpack_require__(1213); +Triangle.Contains = __webpack_require__(85); +Triangle.ContainsArray = __webpack_require__(219); +Triangle.ContainsPoint = __webpack_require__(1214); +Triangle.CopyFrom = __webpack_require__(1215); +Triangle.Decompose = __webpack_require__(459); +Triangle.Equals = __webpack_require__(1216); +Triangle.GetPoint = __webpack_require__(442); +Triangle.GetPoints = __webpack_require__(443); +Triangle.InCenter = __webpack_require__(468); +Triangle.Perimeter = __webpack_require__(1217); +Triangle.Offset = __webpack_require__(467); +Triangle.Random = __webpack_require__(166); +Triangle.Rotate = __webpack_require__(1218); +Triangle.RotateAroundPoint = __webpack_require__(1219); +Triangle.RotateAroundXY = __webpack_require__(222); module.exports = Triangle; /***/ }), -/* 1199 */ +/* 1206 */ /***/ (function(module, exports) { /** @@ -161053,7 +163299,7 @@ module.exports = Area; /***/ }), -/* 1200 */ +/* 1207 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161062,7 +163308,7 @@ module.exports = Area; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Triangle = __webpack_require__(71); +var Triangle = __webpack_require__(73); /** * Builds an equilateral triangle. In the equilateral triangle, all the sides are the same length (congruent) and all the angles are the same size (congruent). @@ -161097,7 +163343,7 @@ module.exports = BuildEquilateral; /***/ }), -/* 1201 */ +/* 1208 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161106,8 +163352,8 @@ module.exports = BuildEquilateral; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var EarCut = __webpack_require__(66); -var Triangle = __webpack_require__(71); +var EarCut = __webpack_require__(60); +var Triangle = __webpack_require__(73); /** * Takes an array of vertex coordinates, and optionally an array of hole indices, then returns an array @@ -161173,7 +163419,7 @@ module.exports = BuildFromPolygon; /***/ }), -/* 1202 */ +/* 1209 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161182,7 +163428,7 @@ module.exports = BuildFromPolygon; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Triangle = __webpack_require__(71); +var Triangle = __webpack_require__(73); // Builds a right triangle, with one 90 degree angle and two acute angles // The x/y is the coordinate of the 90 degree angle (and will map to x1/y1 in the resulting Triangle) @@ -161222,7 +163468,7 @@ module.exports = BuildRight; /***/ }), -/* 1203 */ +/* 1210 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161231,8 +163477,8 @@ module.exports = BuildRight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Centroid = __webpack_require__(449); -var Offset = __webpack_require__(450); +var Centroid = __webpack_require__(466); +var Offset = __webpack_require__(467); /** * @callback CenterFunction @@ -161275,7 +163521,7 @@ module.exports = CenterOn; /***/ }), -/* 1204 */ +/* 1211 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161351,7 +163597,7 @@ module.exports = CircumCenter; /***/ }), -/* 1205 */ +/* 1212 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161360,7 +163606,7 @@ module.exports = CircumCenter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circle = __webpack_require__(65); +var Circle = __webpack_require__(68); // Adapted from https://gist.github.com/mutoo/5617691 @@ -161434,7 +163680,7 @@ module.exports = CircumCircle; /***/ }), -/* 1206 */ +/* 1213 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161443,7 +163689,7 @@ module.exports = CircumCircle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Triangle = __webpack_require__(71); +var Triangle = __webpack_require__(73); /** * Clones a Triangle object. @@ -161464,7 +163710,7 @@ module.exports = Clone; /***/ }), -/* 1207 */ +/* 1214 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161473,7 +163719,7 @@ module.exports = Clone; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(84); +var Contains = __webpack_require__(85); /** * Tests if a triangle contains a point. @@ -161495,7 +163741,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1208 */ +/* 1215 */ /***/ (function(module, exports) { /** @@ -161526,7 +163772,7 @@ module.exports = CopyFrom; /***/ }), -/* 1209 */ +/* 1216 */ /***/ (function(module, exports) { /** @@ -161562,7 +163808,7 @@ module.exports = Equals; /***/ }), -/* 1210 */ +/* 1217 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161571,7 +163817,7 @@ module.exports = Equals; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Length = __webpack_require__(57); +var Length = __webpack_require__(58); /** * Gets the length of the perimeter of the given triangle. @@ -161597,7 +163843,7 @@ module.exports = Perimeter; /***/ }), -/* 1211 */ +/* 1218 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161606,8 +163852,8 @@ module.exports = Perimeter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(219); -var InCenter = __webpack_require__(451); +var RotateAroundXY = __webpack_require__(222); +var InCenter = __webpack_require__(468); /** * Rotates a Triangle about its incenter, which is the point at which its three angle bisectors meet. @@ -161633,7 +163879,7 @@ module.exports = Rotate; /***/ }), -/* 1212 */ +/* 1219 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161642,7 +163888,7 @@ module.exports = Rotate; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(219); +var RotateAroundXY = __webpack_require__(222); /** * Rotates a Triangle at a certain angle about a given Point or object with public `x` and `y` properties. @@ -161667,7 +163913,7 @@ module.exports = RotateAroundPoint; /***/ }), -/* 1213 */ +/* 1220 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161676,7 +163922,7 @@ module.exports = RotateAroundPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(185); +var CONST = __webpack_require__(187); var Extend = __webpack_require__(19); /** @@ -161685,16 +163931,17 @@ var Extend = __webpack_require__(19); var Input = { - CreateInteractiveObject: __webpack_require__(452), - Events: __webpack_require__(55), - Gamepad: __webpack_require__(1214), - InputManager: __webpack_require__(365), - InputPlugin: __webpack_require__(1226), - InputPluginCache: __webpack_require__(142), - Keyboard: __webpack_require__(1228), - Mouse: __webpack_require__(1245), - Pointer: __webpack_require__(368), - Touch: __webpack_require__(1246) + CreatePixelPerfectHandler: __webpack_require__(469), + CreateInteractiveObject: __webpack_require__(470), + Events: __webpack_require__(56), + Gamepad: __webpack_require__(1221), + InputManager: __webpack_require__(375), + InputPlugin: __webpack_require__(1233), + InputPluginCache: __webpack_require__(143), + Keyboard: __webpack_require__(1234), + Mouse: __webpack_require__(1251), + Pointer: __webpack_require__(378), + Touch: __webpack_require__(1252) }; @@ -161705,7 +163952,7 @@ module.exports = Input; /***/ }), -/* 1214 */ +/* 1221 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161720,18 +163967,18 @@ module.exports = Input; module.exports = { - Axis: __webpack_require__(453), - Button: __webpack_require__(454), - Events: __webpack_require__(220), - Gamepad: __webpack_require__(455), - GamepadPlugin: __webpack_require__(1221), + Axis: __webpack_require__(471), + Button: __webpack_require__(472), + Events: __webpack_require__(223), + Gamepad: __webpack_require__(473), + GamepadPlugin: __webpack_require__(1228), - Configs: __webpack_require__(1222) + Configs: __webpack_require__(1229) }; /***/ }), -/* 1215 */ +/* 1222 */ /***/ (function(module, exports) { /** @@ -161760,7 +164007,7 @@ module.exports = 'down'; /***/ }), -/* 1216 */ +/* 1223 */ /***/ (function(module, exports) { /** @@ -161789,7 +164036,7 @@ module.exports = 'up'; /***/ }), -/* 1217 */ +/* 1224 */ /***/ (function(module, exports) { /** @@ -161820,7 +164067,7 @@ module.exports = 'connected'; /***/ }), -/* 1218 */ +/* 1225 */ /***/ (function(module, exports) { /** @@ -161846,7 +164093,7 @@ module.exports = 'disconnected'; /***/ }), -/* 1219 */ +/* 1226 */ /***/ (function(module, exports) { /** @@ -161878,7 +164125,7 @@ module.exports = 'down'; /***/ }), -/* 1220 */ +/* 1227 */ /***/ (function(module, exports) { /** @@ -161910,7 +164157,7 @@ module.exports = 'up'; /***/ }), -/* 1221 */ +/* 1228 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161920,12 +164167,12 @@ module.exports = 'up'; */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(220); -var Gamepad = __webpack_require__(455); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(223); +var Gamepad = __webpack_require__(473); var GetValue = __webpack_require__(6); -var InputPluginCache = __webpack_require__(142); -var InputEvents = __webpack_require__(55); +var InputPluginCache = __webpack_require__(143); +var InputEvents = __webpack_require__(56); /** * @classdesc @@ -162548,7 +164795,7 @@ module.exports = GamepadPlugin; /***/ }), -/* 1222 */ +/* 1229 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162563,15 +164810,15 @@ module.exports = GamepadPlugin; module.exports = { - DUALSHOCK_4: __webpack_require__(1223), - SNES_USB: __webpack_require__(1224), - XBOX_360: __webpack_require__(1225) + DUALSHOCK_4: __webpack_require__(1230), + SNES_USB: __webpack_require__(1231), + XBOX_360: __webpack_require__(1232) }; /***/ }), -/* 1223 */ +/* 1230 */ /***/ (function(module, exports) { /** @@ -162621,7 +164868,7 @@ module.exports = { /***/ }), -/* 1224 */ +/* 1231 */ /***/ (function(module, exports) { /** @@ -162660,7 +164907,7 @@ module.exports = { /***/ }), -/* 1225 */ +/* 1232 */ /***/ (function(module, exports) { /** @@ -162711,7 +164958,7 @@ module.exports = { /***/ }), -/* 1226 */ +/* 1233 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162720,27 +164967,27 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circle = __webpack_require__(65); -var CircleContains = __webpack_require__(56); +var Circle = __webpack_require__(68); +var CircleContains = __webpack_require__(57); var Class = __webpack_require__(0); -var CONST = __webpack_require__(185); -var CreateInteractiveObject = __webpack_require__(452); -var CreatePixelPerfectHandler = __webpack_require__(1227); -var DistanceBetween = __webpack_require__(54); -var Ellipse = __webpack_require__(96); -var EllipseContains = __webpack_require__(97); -var Events = __webpack_require__(55); -var EventEmitter = __webpack_require__(11); +var CONST = __webpack_require__(187); +var CreateInteractiveObject = __webpack_require__(470); +var CreatePixelPerfectHandler = __webpack_require__(469); +var DistanceBetween = __webpack_require__(55); +var Ellipse = __webpack_require__(97); +var EllipseContains = __webpack_require__(98); +var Events = __webpack_require__(56); +var EventEmitter = __webpack_require__(12); var GetFastValue = __webpack_require__(2); -var GEOM_CONST = __webpack_require__(48); -var InputPluginCache = __webpack_require__(142); +var GEOM_CONST = __webpack_require__(49); +var InputPluginCache = __webpack_require__(143); var IsPlainObject = __webpack_require__(7); var PluginCache = __webpack_require__(23); var Rectangle = __webpack_require__(9); -var RectangleContains = __webpack_require__(49); -var SceneEvents = __webpack_require__(22); -var Triangle = __webpack_require__(71); -var TriangleContains = __webpack_require__(84); +var RectangleContains = __webpack_require__(50); +var SceneEvents = __webpack_require__(20); +var Triangle = __webpack_require__(73); +var TriangleContains = __webpack_require__(85); /** * @classdesc @@ -165892,43 +168139,7 @@ module.exports = InputPlugin; /***/ }), -/* 1227 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Creates a new Pixel Perfect Handler function. - * - * Access via `InputPlugin.makePixelPerfect` rather than calling it directly. - * - * @function Phaser.Input.CreatePixelPerfectHandler - * @since 3.10.0 - * - * @param {Phaser.Textures.TextureManager} textureManager - A reference to the Texture Manager. - * @param {integer} alphaTolerance - The alpha level that the pixel should be above to be included as a successful interaction. - * - * @return {function} The new Pixel Perfect Handler function. - */ -var CreatePixelPerfectHandler = function (textureManager, alphaTolerance) -{ - return function (hitArea, x, y, gameObject) - { - var alpha = textureManager.getPixelAlpha(x, y, gameObject.texture.key, gameObject.frame.name); - - return (alpha && alpha >= alphaTolerance); - }; -}; - -module.exports = CreatePixelPerfectHandler; - - -/***/ }), -/* 1228 */ +/* 1234 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165943,26 +168154,26 @@ module.exports = CreatePixelPerfectHandler; module.exports = { - Events: __webpack_require__(143), + Events: __webpack_require__(144), - KeyboardManager: __webpack_require__(366), - KeyboardPlugin: __webpack_require__(1236), + KeyboardManager: __webpack_require__(376), + KeyboardPlugin: __webpack_require__(1242), - Key: __webpack_require__(456), - KeyCodes: __webpack_require__(130), + Key: __webpack_require__(474), + KeyCodes: __webpack_require__(131), - KeyCombo: __webpack_require__(457), + KeyCombo: __webpack_require__(475), - JustDown: __webpack_require__(1241), - JustUp: __webpack_require__(1242), - DownDuration: __webpack_require__(1243), - UpDuration: __webpack_require__(1244) + JustDown: __webpack_require__(1247), + JustUp: __webpack_require__(1248), + DownDuration: __webpack_require__(1249), + UpDuration: __webpack_require__(1250) }; /***/ }), -/* 1229 */ +/* 1235 */ /***/ (function(module, exports) { /** @@ -165998,7 +168209,7 @@ module.exports = 'keydown'; /***/ }), -/* 1230 */ +/* 1236 */ /***/ (function(module, exports) { /** @@ -166027,7 +168238,7 @@ module.exports = 'keyup'; /***/ }), -/* 1231 */ +/* 1237 */ /***/ (function(module, exports) { /** @@ -166061,7 +168272,7 @@ module.exports = 'keycombomatch'; /***/ }), -/* 1232 */ +/* 1238 */ /***/ (function(module, exports) { /** @@ -166095,7 +168306,7 @@ module.exports = 'down'; /***/ }), -/* 1233 */ +/* 1239 */ /***/ (function(module, exports) { /** @@ -166134,7 +168345,7 @@ module.exports = 'keydown-'; /***/ }), -/* 1234 */ +/* 1240 */ /***/ (function(module, exports) { /** @@ -166166,7 +168377,7 @@ module.exports = 'keyup-'; /***/ }), -/* 1235 */ +/* 1241 */ /***/ (function(module, exports) { /** @@ -166200,7 +168411,7 @@ module.exports = 'up'; /***/ }), -/* 1236 */ +/* 1242 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166210,16 +168421,17 @@ module.exports = 'up'; */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(143); -var GameEvents = __webpack_require__(20); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(144); +var GameEvents = __webpack_require__(21); var GetValue = __webpack_require__(6); -var InputEvents = __webpack_require__(55); -var InputPluginCache = __webpack_require__(142); -var Key = __webpack_require__(456); -var KeyCodes = __webpack_require__(130); -var KeyCombo = __webpack_require__(457); -var KeyMap = __webpack_require__(1240); +var InputEvents = __webpack_require__(56); +var InputPluginCache = __webpack_require__(143); +var Key = __webpack_require__(474); +var KeyCodes = __webpack_require__(131); +var KeyCombo = __webpack_require__(475); +var KeyMap = __webpack_require__(1246); +var SceneEvents = __webpack_require__(20); var SnapFloor = __webpack_require__(94); /** @@ -166415,6 +168627,9 @@ var KeyboardPlugin = new Class({ this.sceneInputPlugin.pluginEvents.once(InputEvents.SHUTDOWN, this.shutdown, this); this.game.events.on(GameEvents.BLUR, this.resetKeys, this); + + this.scene.sys.events.on(SceneEvents.PAUSE, this.resetKeys, this); + this.scene.sys.events.on(SceneEvents.SLEEP, this.resetKeys, this); }, /** @@ -167058,6 +169273,9 @@ var KeyboardPlugin = new Class({ this.game.events.off(GameEvents.BLUR, this.resetKeys); + this.scene.sys.events.off(SceneEvents.PAUSE, this.resetKeys, this); + this.scene.sys.events.off(SceneEvents.SLEEP, this.resetKeys, this); + this.removeAllListeners(); this.queue = []; @@ -167128,7 +169346,7 @@ module.exports = KeyboardPlugin; /***/ }), -/* 1237 */ +/* 1243 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167137,7 +169355,7 @@ module.exports = KeyboardPlugin; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AdvanceKeyCombo = __webpack_require__(1238); +var AdvanceKeyCombo = __webpack_require__(1244); /** * Used internally by the KeyCombo class. @@ -167209,7 +169427,7 @@ module.exports = ProcessKeyCombo; /***/ }), -/* 1238 */ +/* 1244 */ /***/ (function(module, exports) { /** @@ -167251,7 +169469,7 @@ module.exports = AdvanceKeyCombo; /***/ }), -/* 1239 */ +/* 1245 */ /***/ (function(module, exports) { /** @@ -167286,7 +169504,7 @@ module.exports = ResetKeyCombo; /***/ }), -/* 1240 */ +/* 1246 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167295,7 +169513,7 @@ module.exports = ResetKeyCombo; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var KeyCodes = __webpack_require__(130); +var KeyCodes = __webpack_require__(131); var KeyMap = {}; @@ -167308,7 +169526,7 @@ module.exports = KeyMap; /***/ }), -/* 1241 */ +/* 1247 */ /***/ (function(module, exports) { /** @@ -167350,7 +169568,7 @@ module.exports = JustDown; /***/ }), -/* 1242 */ +/* 1248 */ /***/ (function(module, exports) { /** @@ -167392,7 +169610,7 @@ module.exports = JustUp; /***/ }), -/* 1243 */ +/* 1249 */ /***/ (function(module, exports) { /** @@ -167426,7 +169644,7 @@ module.exports = DownDuration; /***/ }), -/* 1244 */ +/* 1250 */ /***/ (function(module, exports) { /** @@ -167460,7 +169678,7 @@ module.exports = UpDuration; /***/ }), -/* 1245 */ +/* 1251 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167476,14 +169694,14 @@ module.exports = UpDuration; /* eslint-disable */ module.exports = { - MouseManager: __webpack_require__(367) + MouseManager: __webpack_require__(377) }; /* eslint-enable */ /***/ }), -/* 1246 */ +/* 1252 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167499,14 +169717,14 @@ module.exports = { /* eslint-disable */ module.exports = { - TouchManager: __webpack_require__(369) + TouchManager: __webpack_require__(379) }; /* eslint-enable */ /***/ }), -/* 1247 */ +/* 1253 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167524,18 +169742,18 @@ var Extend = __webpack_require__(19); var Loader = { - Events: __webpack_require__(83), + Events: __webpack_require__(84), - FileTypes: __webpack_require__(1248), + FileTypes: __webpack_require__(1254), - File: __webpack_require__(21), + File: __webpack_require__(22), FileTypesManager: __webpack_require__(8), - GetURL: __webpack_require__(144), - LoaderPlugin: __webpack_require__(1272), - MergeXHRSettings: __webpack_require__(221), - MultiFile: __webpack_require__(61), - XHRLoader: __webpack_require__(458), - XHRSettings: __webpack_require__(145) + GetURL: __webpack_require__(145), + LoaderPlugin: __webpack_require__(1278), + MergeXHRSettings: __webpack_require__(224), + MultiFile: __webpack_require__(63), + XHRLoader: __webpack_require__(476), + XHRSettings: __webpack_require__(146) }; @@ -167546,7 +169764,7 @@ module.exports = Loader; /***/ }), -/* 1248 */ +/* 1254 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167561,42 +169779,42 @@ module.exports = Loader; module.exports = { - AnimationJSONFile: __webpack_require__(1249), - AtlasJSONFile: __webpack_require__(1250), - AtlasXMLFile: __webpack_require__(1251), - AudioFile: __webpack_require__(459), - AudioSpriteFile: __webpack_require__(1252), - BinaryFile: __webpack_require__(1253), - BitmapFontFile: __webpack_require__(1254), - CSSFile: __webpack_require__(1255), - GLSLFile: __webpack_require__(1256), - HTML5AudioFile: __webpack_require__(460), - HTMLFile: __webpack_require__(1257), - HTMLTextureFile: __webpack_require__(1258), - ImageFile: __webpack_require__(72), - JSONFile: __webpack_require__(60), - MultiAtlasFile: __webpack_require__(1259), - MultiScriptFile: __webpack_require__(1260), - PackFile: __webpack_require__(1261), - PluginFile: __webpack_require__(1262), - SceneFile: __webpack_require__(1263), - ScenePluginFile: __webpack_require__(1264), - ScriptFile: __webpack_require__(461), - SpriteSheetFile: __webpack_require__(1265), - SVGFile: __webpack_require__(1266), - TextFile: __webpack_require__(462), - TilemapCSVFile: __webpack_require__(1267), - TilemapImpactFile: __webpack_require__(1268), - TilemapJSONFile: __webpack_require__(1269), - UnityAtlasFile: __webpack_require__(1270), - VideoFile: __webpack_require__(1271), - XMLFile: __webpack_require__(222) + AnimationJSONFile: __webpack_require__(1255), + AtlasJSONFile: __webpack_require__(1256), + AtlasXMLFile: __webpack_require__(1257), + AudioFile: __webpack_require__(477), + AudioSpriteFile: __webpack_require__(1258), + BinaryFile: __webpack_require__(1259), + BitmapFontFile: __webpack_require__(1260), + CSSFile: __webpack_require__(1261), + GLSLFile: __webpack_require__(1262), + HTML5AudioFile: __webpack_require__(478), + HTMLFile: __webpack_require__(1263), + HTMLTextureFile: __webpack_require__(1264), + ImageFile: __webpack_require__(74), + JSONFile: __webpack_require__(62), + MultiAtlasFile: __webpack_require__(1265), + MultiScriptFile: __webpack_require__(1266), + PackFile: __webpack_require__(1267), + PluginFile: __webpack_require__(1268), + SceneFile: __webpack_require__(1269), + ScenePluginFile: __webpack_require__(1270), + ScriptFile: __webpack_require__(479), + SpriteSheetFile: __webpack_require__(1271), + SVGFile: __webpack_require__(1272), + TextFile: __webpack_require__(480), + TilemapCSVFile: __webpack_require__(1273), + TilemapImpactFile: __webpack_require__(1274), + TilemapJSONFile: __webpack_require__(1275), + UnityAtlasFile: __webpack_require__(1276), + VideoFile: __webpack_require__(1277), + XMLFile: __webpack_require__(225) }; /***/ }), -/* 1249 */ +/* 1255 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167607,8 +169825,8 @@ module.exports = { var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); -var JSONFile = __webpack_require__(60); -var LoaderEvents = __webpack_require__(83); +var JSONFile = __webpack_require__(62); +var LoaderEvents = __webpack_require__(84); /** * @classdesc @@ -167797,7 +170015,7 @@ module.exports = AnimationJSONFile; /***/ }), -/* 1250 */ +/* 1256 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167809,10 +170027,10 @@ module.exports = AnimationJSONFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); -var ImageFile = __webpack_require__(72); +var ImageFile = __webpack_require__(74); var IsPlainObject = __webpack_require__(7); -var JSONFile = __webpack_require__(60); -var MultiFile = __webpack_require__(61); +var JSONFile = __webpack_require__(62); +var MultiFile = __webpack_require__(63); /** * @classdesc @@ -168046,7 +170264,7 @@ module.exports = AtlasJSONFile; /***/ }), -/* 1251 */ +/* 1257 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168058,10 +170276,10 @@ module.exports = AtlasJSONFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); -var ImageFile = __webpack_require__(72); +var ImageFile = __webpack_require__(74); var IsPlainObject = __webpack_require__(7); -var MultiFile = __webpack_require__(61); -var XMLFile = __webpack_require__(222); +var MultiFile = __webpack_require__(63); +var XMLFile = __webpack_require__(225); /** * @classdesc @@ -168289,7 +170507,7 @@ module.exports = AtlasXMLFile; /***/ }), -/* 1252 */ +/* 1258 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168298,13 +170516,13 @@ module.exports = AtlasXMLFile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AudioFile = __webpack_require__(459); +var AudioFile = __webpack_require__(477); var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); -var JSONFile = __webpack_require__(60); -var MultiFile = __webpack_require__(61); +var JSONFile = __webpack_require__(62); +var MultiFile = __webpack_require__(63); /** * @classdesc @@ -168579,7 +170797,7 @@ FileTypesManager.register('audioSprite', function (key, jsonURL, audioURL, audio /***/ }), -/* 1253 */ +/* 1259 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168590,7 +170808,7 @@ FileTypesManager.register('audioSprite', function (key, jsonURL, audioURL, audio var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var File = __webpack_require__(21); +var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -168761,7 +170979,7 @@ module.exports = BinaryFile; /***/ }), -/* 1254 */ +/* 1260 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168773,11 +170991,11 @@ module.exports = BinaryFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); -var ImageFile = __webpack_require__(72); +var ImageFile = __webpack_require__(74); var IsPlainObject = __webpack_require__(7); -var MultiFile = __webpack_require__(61); -var ParseXMLBitmapFont = __webpack_require__(193); -var XMLFile = __webpack_require__(222); +var MultiFile = __webpack_require__(63); +var ParseXMLBitmapFont = __webpack_require__(196); +var XMLFile = __webpack_require__(225); /** * @classdesc @@ -169008,7 +171226,7 @@ module.exports = BitmapFontFile; /***/ }), -/* 1255 */ +/* 1261 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -169019,7 +171237,7 @@ module.exports = BitmapFontFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var File = __webpack_require__(21); +var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -169176,7 +171394,7 @@ module.exports = CSSFile; /***/ }), -/* 1256 */ +/* 1262 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -169187,11 +171405,11 @@ module.exports = CSSFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var File = __webpack_require__(21); +var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); -var Shader = __webpack_require__(353); +var Shader = __webpack_require__(362); /** * @classdesc @@ -169587,7 +171805,7 @@ module.exports = GLSLFile; /***/ }), -/* 1257 */ +/* 1263 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -169598,7 +171816,7 @@ module.exports = GLSLFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var File = __webpack_require__(21); +var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -169762,7 +171980,7 @@ module.exports = HTMLFile; /***/ }), -/* 1258 */ +/* 1264 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -169773,7 +171991,7 @@ module.exports = HTMLFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var File = __webpack_require__(21); +var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -170020,7 +172238,7 @@ module.exports = HTMLTextureFile; /***/ }), -/* 1259 */ +/* 1265 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170032,10 +172250,10 @@ module.exports = HTMLTextureFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); -var ImageFile = __webpack_require__(72); +var ImageFile = __webpack_require__(74); var IsPlainObject = __webpack_require__(7); -var JSONFile = __webpack_require__(60); -var MultiFile = __webpack_require__(61); +var JSONFile = __webpack_require__(62); +var MultiFile = __webpack_require__(63); /** * @classdesc @@ -170353,7 +172571,7 @@ module.exports = MultiAtlasFile; /***/ }), -/* 1260 */ +/* 1266 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170366,8 +172584,8 @@ var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); -var MultiFile = __webpack_require__(61); -var ScriptFile = __webpack_require__(461); +var MultiFile = __webpack_require__(63); +var ScriptFile = __webpack_require__(479); /** * @classdesc @@ -170570,7 +172788,7 @@ module.exports = MultiScriptFile; /***/ }), -/* 1261 */ +/* 1267 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170582,7 +172800,7 @@ module.exports = MultiScriptFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); var FileTypesManager = __webpack_require__(8); -var JSONFile = __webpack_require__(60); +var JSONFile = __webpack_require__(62); /** * @classdesc @@ -170788,7 +173006,7 @@ module.exports = PackFile; /***/ }), -/* 1262 */ +/* 1268 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170799,7 +173017,7 @@ module.exports = PackFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var File = __webpack_require__(21); +var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -171000,7 +173218,7 @@ module.exports = PluginFile; /***/ }), -/* 1263 */ +/* 1269 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171011,7 +173229,7 @@ module.exports = PluginFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var File = __webpack_require__(21); +var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -171221,7 +173439,7 @@ module.exports = SceneFile; /***/ }), -/* 1264 */ +/* 1270 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171232,7 +173450,7 @@ module.exports = SceneFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var File = __webpack_require__(21); +var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -171427,7 +173645,7 @@ module.exports = ScenePluginFile; /***/ }), -/* 1265 */ +/* 1271 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171438,7 +173656,7 @@ module.exports = ScenePluginFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); -var ImageFile = __webpack_require__(72); +var ImageFile = __webpack_require__(74); /** * @classdesc @@ -171618,7 +173836,7 @@ module.exports = SpriteSheetFile; /***/ }), -/* 1266 */ +/* 1272 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171629,7 +173847,7 @@ module.exports = SpriteSheetFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var File = __webpack_require__(21); +var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -171957,7 +174175,7 @@ module.exports = SVGFile; /***/ }), -/* 1267 */ +/* 1273 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171968,11 +174186,11 @@ module.exports = SVGFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var File = __webpack_require__(21); +var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); -var TILEMAP_FORMATS = __webpack_require__(32); +var TILEMAP_FORMATS = __webpack_require__(33); /** * @classdesc @@ -172152,7 +174370,7 @@ module.exports = TilemapCSVFile; /***/ }), -/* 1268 */ +/* 1274 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172163,8 +174381,8 @@ module.exports = TilemapCSVFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); -var JSONFile = __webpack_require__(60); -var TILEMAP_FORMATS = __webpack_require__(32); +var JSONFile = __webpack_require__(62); +var TILEMAP_FORMATS = __webpack_require__(33); /** * @classdesc @@ -172308,7 +174526,7 @@ module.exports = TilemapImpactFile; /***/ }), -/* 1269 */ +/* 1275 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172319,8 +174537,8 @@ module.exports = TilemapImpactFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); -var JSONFile = __webpack_require__(60); -var TILEMAP_FORMATS = __webpack_require__(32); +var JSONFile = __webpack_require__(62); +var TILEMAP_FORMATS = __webpack_require__(33); /** * @classdesc @@ -172464,7 +174682,7 @@ module.exports = TilemapJSONFile; /***/ }), -/* 1270 */ +/* 1276 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172476,10 +174694,10 @@ module.exports = TilemapJSONFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); -var ImageFile = __webpack_require__(72); +var ImageFile = __webpack_require__(74); var IsPlainObject = __webpack_require__(7); -var MultiFile = __webpack_require__(61); -var TextFile = __webpack_require__(462); +var MultiFile = __webpack_require__(63); +var TextFile = __webpack_require__(480); /** * @classdesc @@ -172706,7 +174924,7 @@ module.exports = UnityAtlasFile; /***/ }), -/* 1271 */ +/* 1277 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172717,9 +174935,9 @@ module.exports = UnityAtlasFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var File = __webpack_require__(21); +var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); -var GetURL = __webpack_require__(144); +var GetURL = __webpack_require__(145); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -173100,7 +175318,7 @@ module.exports = VideoFile; /***/ }), -/* 1272 */ +/* 1278 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173111,14 +175329,14 @@ module.exports = VideoFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var CustomSet = __webpack_require__(139); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(83); +var CustomSet = __webpack_require__(140); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(84); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(22); -var XHRSettings = __webpack_require__(145); +var SceneEvents = __webpack_require__(20); +var XHRSettings = __webpack_require__(146); /** * @classdesc @@ -174183,7 +176401,7 @@ module.exports = LoaderPlugin; /***/ }), -/* 1273 */ +/* 1279 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174192,7 +176410,7 @@ module.exports = LoaderPlugin; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(51); +var CONST = __webpack_require__(52); var Extend = __webpack_require__(19); /** @@ -174201,18 +176419,23 @@ var Extend = __webpack_require__(19); var Arcade = { - ArcadePhysics: __webpack_require__(1274), - Body: __webpack_require__(469), - Collider: __webpack_require__(470), - Components: __webpack_require__(223), - Events: __webpack_require__(224), - Factory: __webpack_require__(463), - Group: __webpack_require__(465), - Image: __webpack_require__(464), - Sprite: __webpack_require__(146), - StaticBody: __webpack_require__(475), - StaticGroup: __webpack_require__(466), - World: __webpack_require__(468) + ArcadePhysics: __webpack_require__(1280), + Body: __webpack_require__(487), + Collider: __webpack_require__(488), + Components: __webpack_require__(226), + Events: __webpack_require__(228), + Factory: __webpack_require__(481), + GetOverlapX: __webpack_require__(229), + GetOverlapY: __webpack_require__(230), + SeparateX: __webpack_require__(496), + SeparateY: __webpack_require__(497), + Group: __webpack_require__(484), + Image: __webpack_require__(482), + Sprite: __webpack_require__(147), + StaticBody: __webpack_require__(498), + StaticGroup: __webpack_require__(485), + Tilemap: __webpack_require__(1301), + World: __webpack_require__(486) }; @@ -174223,7 +176446,7 @@ module.exports = Arcade; /***/ }), -/* 1274 */ +/* 1280 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174233,18 +176456,18 @@ module.exports = Arcade; */ var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(40); -var DistanceBetween = __webpack_require__(54); -var DistanceSquared = __webpack_require__(325); -var Factory = __webpack_require__(463); +var DegToRad = __webpack_require__(41); +var DistanceBetween = __webpack_require__(55); +var DistanceSquared = __webpack_require__(333); +var Factory = __webpack_require__(481); var GetFastValue = __webpack_require__(2); -var Merge = __webpack_require__(132); -var OverlapCirc = __webpack_require__(1287); -var OverlapRect = __webpack_require__(467); +var Merge = __webpack_require__(133); +var OverlapCirc = __webpack_require__(483); +var OverlapRect = __webpack_require__(227); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(22); +var SceneEvents = __webpack_require__(20); var Vector2 = __webpack_require__(3); -var World = __webpack_require__(468); +var World = __webpack_require__(486); /** * @classdesc @@ -174293,7 +176516,7 @@ var ArcadePhysics = new Class({ * A configuration object. Union of the `physics.arcade.*` properties of the GameConfig and SceneConfig objects. * * @name Phaser.Physics.Arcade.ArcadePhysics#config - * @type {object} + * @type {Phaser.Types.Physics.Arcade.ArcadeWorldConfig} * @since 3.0.0 */ this.config = this.getConfig(); @@ -174355,18 +176578,54 @@ var ArcadePhysics = new Class({ var eventEmitter = this.systems.events; - eventEmitter.on(SceneEvents.UPDATE, this.world.update, this.world); + if (!GetFastValue(this.config, 'customUpdate', false)) + { + eventEmitter.on(SceneEvents.UPDATE, this.world.update, this.world); + } + eventEmitter.on(SceneEvents.POST_UPDATE, this.world.postUpdate, this.world); eventEmitter.once(SceneEvents.SHUTDOWN, this.shutdown, this); }, + /** + * Causes `World.update` to be automatically called each time the Scene + * emits and `UPDATE` event. This is the default setting, so only needs + * calling if you have specifically disabled it. + * + * @method Phaser.Physics.Arcade.ArcadePhysics#enableUpdate + * @since 3.50.0 + */ + enableUpdate: function () + { + this.systems.events.on(SceneEvents.UPDATE, this.world.update, this.world); + }, + + /** + * Causes `World.update` to **not** be automatically called each time the Scene + * emits and `UPDATE` event. + * + * If you wish to run the World update at your own rate, or from your own + * component, then you should call this method to disable the built-in link, + * and then call `World.update(delta, time)` accordingly. + * + * Note that `World.postUpdate` is always automatically called when the Scene + * emits a `POST_UPDATE` event, regardless of this setting. + * + * @method Phaser.Physics.Arcade.ArcadePhysics#disableUpdate + * @since 3.50.0 + */ + disableUpdate: function () + { + this.systems.events.off(SceneEvents.UPDATE, this.world.update, this.world); + }, + /** * Creates the physics configuration for the current Scene. * * @method Phaser.Physics.Arcade.ArcadePhysics#getConfig * @since 3.0.0 * - * @return {object} The physics configuration. + * @return {Phaser.Types.Physics.Arcade.ArcadeWorldConfig} The physics configuration. */ getConfig: function () { @@ -174912,7 +177171,7 @@ module.exports = ArcadePhysics; /***/ }), -/* 1275 */ +/* 1281 */ /***/ (function(module, exports) { /** @@ -174987,7 +177246,7 @@ module.exports = Acceleration; /***/ }), -/* 1276 */ +/* 1282 */ /***/ (function(module, exports) { /** @@ -175069,7 +177328,7 @@ module.exports = Angular; /***/ }), -/* 1277 */ +/* 1283 */ /***/ (function(module, exports) { /** @@ -175168,7 +177427,7 @@ module.exports = Bounce; /***/ }), -/* 1278 */ +/* 1284 */ /***/ (function(module, exports) { /** @@ -175295,7 +177554,7 @@ module.exports = Debug; /***/ }), -/* 1279 */ +/* 1285 */ /***/ (function(module, exports) { /** @@ -175428,7 +177687,7 @@ module.exports = Drag; /***/ }), -/* 1280 */ +/* 1286 */ /***/ (function(module, exports) { /** @@ -175552,7 +177811,7 @@ module.exports = Enable; /***/ }), -/* 1281 */ +/* 1287 */ /***/ (function(module, exports) { /** @@ -175640,7 +177899,7 @@ module.exports = Friction; /***/ }), -/* 1282 */ +/* 1288 */ /***/ (function(module, exports) { /** @@ -175718,7 +177977,7 @@ module.exports = Gravity; /***/ }), -/* 1283 */ +/* 1289 */ /***/ (function(module, exports) { /** @@ -175760,7 +178019,7 @@ module.exports = Immovable; /***/ }), -/* 1284 */ +/* 1290 */ /***/ (function(module, exports) { /** @@ -175800,7 +178059,7 @@ module.exports = Mass; /***/ }), -/* 1285 */ +/* 1291 */ /***/ (function(module, exports) { /** @@ -175903,7 +178162,7 @@ module.exports = Size; /***/ }), -/* 1286 */ +/* 1292 */ /***/ (function(module, exports) { /** @@ -176002,75 +178261,7 @@ module.exports = Velocity; /***/ }), -/* 1287 */ -/***/ (function(module, exports, __webpack_require__) { - -var OverlapRect = __webpack_require__(467); -var Circle = __webpack_require__(65); -var CircleToCircle = __webpack_require__(211); -var CircleToRectangle = __webpack_require__(212); - -/** - * This method will search the given circular area and return an array of all physics bodies that - * overlap with it. It can return either Dynamic, Static bodies or a mixture of both. - * - * A body only has to intersect with the search area to be considered, it doesn't have to be fully - * contained within it. - * - * If Arcade Physics is set to use the RTree (which it is by default) then the search is rather fast, - * otherwise the search is O(N) for Dynamic Bodies. - * - * @function Phaser.Physics.Arcade.Components.OverlapCirc - * @since 3.21.0 - * - * @param {number} x - The x coordinate of the center of the area to search within. - * @param {number} y - The y coordinate of the center of the area to search within. - * @param {number} radius - The radius of the area to search within. - * @param {boolean} [includeDynamic=true] - Should the search include Dynamic Bodies? - * @param {boolean} [includeStatic=false] - Should the search include Static Bodies? - * - * @return {(Phaser.Physics.Arcade.Body[]|Phaser.Physics.Arcade.StaticBody[])} An array of bodies that overlap with the given area. - */ -var OverlapCirc = function (world, x, y, radius, includeDynamic, includeStatic) -{ - var bodiesInRect = OverlapRect(world, x - radius, y - radius, 2 * radius, 2 * radius, includeDynamic, includeStatic); - - if (bodiesInRect.length === 0) - { - return bodiesInRect; - } - - var area = new Circle(x, y, radius); - var circFromBody = new Circle(); - var bodiesInArea = []; - - for (var i = 0; i < bodiesInRect.length; i++) - { - var body = bodiesInRect[i]; - - if (body.isCircle) - { - circFromBody.setTo(body.center.x, body.center.y, body.halfWidth); - - if (CircleToCircle(area, circFromBody)) - { - bodiesInArea.push(body); - } - } - else if (CircleToRectangle(area, body)) - { - bodiesInArea.push(body); - } - } - - return bodiesInArea; -}; - -module.exports = OverlapCirc; - - -/***/ }), -/* 1288 */ +/* 1293 */ /***/ (function(module, exports) { /** @@ -176103,7 +178294,7 @@ module.exports = 'collide'; /***/ }), -/* 1289 */ +/* 1294 */ /***/ (function(module, exports) { /** @@ -176136,7 +178327,7 @@ module.exports = 'overlap'; /***/ }), -/* 1290 */ +/* 1295 */ /***/ (function(module, exports) { /** @@ -176159,7 +178350,7 @@ module.exports = 'pause'; /***/ }), -/* 1291 */ +/* 1296 */ /***/ (function(module, exports) { /** @@ -176182,7 +178373,7 @@ module.exports = 'resume'; /***/ }), -/* 1292 */ +/* 1297 */ /***/ (function(module, exports) { /** @@ -176214,7 +178405,7 @@ module.exports = 'tilecollide'; /***/ }), -/* 1293 */ +/* 1298 */ /***/ (function(module, exports) { /** @@ -176246,7 +178437,7 @@ module.exports = 'tileoverlap'; /***/ }), -/* 1294 */ +/* 1299 */ /***/ (function(module, exports) { /** @@ -176278,7 +178469,7 @@ module.exports = 'worldbounds'; /***/ }), -/* 1295 */ +/* 1300 */ /***/ (function(module, exports) { /** @@ -176303,443 +178494,8 @@ module.exports = 'worldbounds'; module.exports = 'worldstep'; -/***/ }), -/* 1296 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * A function to process the collision callbacks between a single tile and an Arcade Physics enabled Game Object. - * - * @function Phaser.Physics.Arcade.Tilemap.ProcessTileCallbacks - * @since 3.0.0 - * - * @param {Phaser.Tilemaps.Tile} tile - The Tile to process. - * @param {Phaser.GameObjects.Sprite} sprite - The Game Object to process with the Tile. - * - * @return {boolean} The result of the callback, `true` for further processing, or `false` to skip this pair. - */ -var ProcessTileCallbacks = function (tile, sprite) -{ - // Tile callbacks take priority over layer level callbacks - if (tile.collisionCallback) - { - return !tile.collisionCallback.call(tile.collisionCallbackContext, sprite, tile); - } - else if (tile.layer.callbacks[tile.index]) - { - return !tile.layer.callbacks[tile.index].callback.call( - tile.layer.callbacks[tile.index].callbackContext, sprite, tile - ); - } - - return true; -}; - -module.exports = ProcessTileCallbacks; - - -/***/ }), -/* 1297 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var TileCheckX = __webpack_require__(1298); -var TileCheckY = __webpack_require__(1300); -var TileIntersectsBody = __webpack_require__(474); - -/** - * The core separation function to separate a physics body and a tile. - * - * @function Phaser.Physics.Arcade.Tilemap.SeparateTile - * @since 3.0.0 - * - * @param {number} i - The index of the tile within the map data. - * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate. - * @param {Phaser.Tilemaps.Tile} tile - The tile to collide against. - * @param {Phaser.Geom.Rectangle} tileWorldRect - A rectangle-like object defining the dimensions of the tile. - * @param {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} tilemapLayer - The tilemapLayer to collide against. - * @param {number} tileBias - The tile bias value. Populated by the `World.TILE_BIAS` constant. - * @param {boolean} isLayer - Is this check coming from a TilemapLayer or an array of tiles? - * - * @return {boolean} `true` if the body was separated, otherwise `false`. - */ -var SeparateTile = function (i, body, tile, tileWorldRect, tilemapLayer, tileBias, isLayer) -{ - var tileLeft = tileWorldRect.left; - var tileTop = tileWorldRect.top; - var tileRight = tileWorldRect.right; - var tileBottom = tileWorldRect.bottom; - var faceHorizontal = tile.faceLeft || tile.faceRight; - var faceVertical = tile.faceTop || tile.faceBottom; - - if (!isLayer) - { - faceHorizontal = true; - faceVertical = true; - } - - // We don't need to go any further if this tile doesn't actually have any colliding faces. This - // could happen if the tile was meant to be collided with re: a callback, but otherwise isn't - // needed for separation. - if (!faceHorizontal && !faceVertical) - { - return false; - } - - var ox = 0; - var oy = 0; - var minX = 0; - var minY = 1; - - if (body.deltaAbsX() > body.deltaAbsY()) - { - // Moving faster horizontally, check X axis first - minX = -1; - } - else if (body.deltaAbsX() < body.deltaAbsY()) - { - // Moving faster vertically, check Y axis first - minY = -1; - } - - if (body.deltaX() !== 0 && body.deltaY() !== 0 && faceHorizontal && faceVertical) - { - // We only need do this if both axes have colliding faces AND we're moving in both - // directions - minX = Math.min(Math.abs(body.position.x - tileRight), Math.abs(body.right - tileLeft)); - minY = Math.min(Math.abs(body.position.y - tileBottom), Math.abs(body.bottom - tileTop)); - } - - if (minX < minY) - { - if (faceHorizontal) - { - ox = TileCheckX(body, tile, tileLeft, tileRight, tileBias, isLayer); - - // That's horizontal done, check if we still intersects? If not then we can return now - if (ox !== 0 && !TileIntersectsBody(tileWorldRect, body)) - { - return true; - } - } - - if (faceVertical) - { - oy = TileCheckY(body, tile, tileTop, tileBottom, tileBias, isLayer); - } - } - else - { - if (faceVertical) - { - oy = TileCheckY(body, tile, tileTop, tileBottom, tileBias, isLayer); - - // That's vertical done, check if we still intersects? If not then we can return now - if (oy !== 0 && !TileIntersectsBody(tileWorldRect, body)) - { - return true; - } - } - - if (faceHorizontal) - { - ox = TileCheckX(body, tile, tileLeft, tileRight, tileBias, isLayer); - } - } - - return (ox !== 0 || oy !== 0); -}; - -module.exports = SeparateTile; - - -/***/ }), -/* 1298 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var ProcessTileSeparationX = __webpack_require__(1299); - -/** - * Check the body against the given tile on the X axis. - * Used internally by the SeparateTile function. - * - * @function Phaser.Physics.Arcade.Tilemap.TileCheckX - * @since 3.0.0 - * - * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate. - * @param {Phaser.Tilemaps.Tile} tile - The tile to check. - * @param {number} tileLeft - The left position of the tile within the tile world. - * @param {number} tileRight - The right position of the tile within the tile world. - * @param {number} tileBias - The tile bias value. Populated by the `World.TILE_BIAS` constant. - * @param {boolean} isLayer - Is this check coming from a TilemapLayer or an array of tiles? - * - * @return {number} The amount of separation that occurred. - */ -var TileCheckX = function (body, tile, tileLeft, tileRight, tileBias, isLayer) -{ - var ox = 0; - - var faceLeft = tile.faceLeft; - var faceRight = tile.faceRight; - var collideLeft = tile.collideLeft; - var collideRight = tile.collideRight; - - if (!isLayer) - { - faceLeft = true; - faceRight = true; - collideLeft = true; - collideRight = true; - } - - if (body.deltaX() < 0 && collideRight && body.checkCollision.left) - { - // Body is moving LEFT - if (faceRight && body.x < tileRight) - { - ox = body.x - tileRight; - - if (ox < -tileBias) - { - ox = 0; - } - } - } - else if (body.deltaX() > 0 && collideLeft && body.checkCollision.right) - { - // Body is moving RIGHT - if (faceLeft && body.right > tileLeft) - { - ox = body.right - tileLeft; - - if (ox > tileBias) - { - ox = 0; - } - } - } - - if (ox !== 0) - { - if (body.customSeparateX) - { - body.overlapX = ox; - } - else - { - ProcessTileSeparationX(body, ox); - } - } - - return ox; -}; - -module.exports = TileCheckX; - - -/***/ }), -/* 1299 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Internal function to process the separation of a physics body from a tile. - * - * @function Phaser.Physics.Arcade.Tilemap.ProcessTileSeparationX - * @since 3.0.0 - * - * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate. - * @param {number} x - The x separation amount. - */ -var ProcessTileSeparationX = function (body, x) -{ - if (x < 0) - { - body.blocked.none = false; - body.blocked.left = true; - } - else if (x > 0) - { - body.blocked.none = false; - body.blocked.right = true; - } - - body.position.x -= x; - - if (body.bounce.x === 0) - { - body.velocity.x = 0; - } - else - { - body.velocity.x = -body.velocity.x * body.bounce.x; - } -}; - -module.exports = ProcessTileSeparationX; - - -/***/ }), -/* 1300 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var ProcessTileSeparationY = __webpack_require__(1301); - -/** - * Check the body against the given tile on the Y axis. - * Used internally by the SeparateTile function. - * - * @function Phaser.Physics.Arcade.Tilemap.TileCheckY - * @since 3.0.0 - * - * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate. - * @param {Phaser.Tilemaps.Tile} tile - The tile to check. - * @param {number} tileTop - The top position of the tile within the tile world. - * @param {number} tileBottom - The bottom position of the tile within the tile world. - * @param {number} tileBias - The tile bias value. Populated by the `World.TILE_BIAS` constant. - * @param {boolean} isLayer - Is this check coming from a TilemapLayer or an array of tiles? - * - * @return {number} The amount of separation that occurred. - */ -var TileCheckY = function (body, tile, tileTop, tileBottom, tileBias, isLayer) -{ - var oy = 0; - - var faceTop = tile.faceTop; - var faceBottom = tile.faceBottom; - var collideUp = tile.collideUp; - var collideDown = tile.collideDown; - - if (!isLayer) - { - faceTop = true; - faceBottom = true; - collideUp = true; - collideDown = true; - } - - if (body.deltaY() < 0 && collideDown && body.checkCollision.up) - { - // Body is moving UP - if (faceBottom && body.y < tileBottom) - { - oy = body.y - tileBottom; - - if (oy < -tileBias) - { - oy = 0; - } - } - } - else if (body.deltaY() > 0 && collideUp && body.checkCollision.down) - { - // Body is moving DOWN - if (faceTop && body.bottom > tileTop) - { - oy = body.bottom - tileTop; - - if (oy > tileBias) - { - oy = 0; - } - } - } - - if (oy !== 0) - { - if (body.customSeparateY) - { - body.overlapY = oy; - } - else - { - ProcessTileSeparationY(body, oy); - } - } - - return oy; -}; - -module.exports = TileCheckY; - - /***/ }), /* 1301 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Internal function to process the separation of a physics body from a tile. - * - * @function Phaser.Physics.Arcade.Tilemap.ProcessTileSeparationY - * @since 3.0.0 - * - * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate. - * @param {number} y - The y separation amount. - */ -var ProcessTileSeparationY = function (body, y) -{ - if (y < 0) - { - body.blocked.none = false; - body.blocked.up = true; - } - else if (y > 0) - { - body.blocked.none = false; - body.blocked.down = true; - } - - body.position.y -= y; - - if (body.bounce.y === 0) - { - body.velocity.y = 0; - } - else - { - body.velocity.y = -body.velocity.y * body.bounce.y; - } -}; - -module.exports = ProcessTileSeparationY; - - -/***/ }), -/* 1302 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -176748,183 +178504,28 @@ module.exports = ProcessTileSeparationY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetOverlapX = __webpack_require__(471); - /** - * Separates two overlapping bodies on the X-axis (horizontally). - * - * Separation involves moving two overlapping bodies so they don't overlap anymore and adjusting their velocities based on their mass. This is a core part of collision detection. - * - * The bodies won't be separated if there is no horizontal overlap between them, if they are static, or if either one uses custom logic for its separation. - * - * @function Phaser.Physics.Arcade.SeparateX - * @since 3.0.0 - * - * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to separate. - * @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. - * - * @return {boolean} `true` if the two bodies overlap horizontally, otherwise `false`. + * @namespace Phaser.Physics.Arcade.Tilemap */ -var SeparateX = function (body1, body2, overlapOnly, bias) -{ - var overlap = GetOverlapX(body1, body2, overlapOnly, bias); - // 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) - { - // return true if there was some overlap, otherwise false - return (overlap !== 0) || (body1.embedded && body2.embedded); - } +var Tilemap = { - // Adjust their positions and velocities accordingly (if there was any overlap) - var v1 = body1.velocity.x; - var v2 = body2.velocity.x; + ProcessTileCallbacks: __webpack_require__(489), + ProcessTileSeparationX: __webpack_require__(493), + ProcessTileSeparationY: __webpack_require__(495), + SeparateTile: __webpack_require__(491), + TileCheckX: __webpack_require__(492), + TileCheckY: __webpack_require__(494), + TileIntersectsBody: __webpack_require__(231) - if (!body1.immovable && !body2.immovable) - { - overlap *= 0.5; - - body1.x -= overlap; - body2.x += overlap; - - var nv1 = Math.sqrt((v2 * v2 * body2.mass) / body1.mass) * ((v2 > 0) ? 1 : -1); - var nv2 = Math.sqrt((v1 * v1 * body1.mass) / body2.mass) * ((v1 > 0) ? 1 : -1); - var avg = (nv1 + nv2) * 0.5; - - nv1 -= avg; - nv2 -= avg; - - body1.velocity.x = avg + nv1 * body1.bounce.x; - body2.velocity.x = avg + nv2 * body2.bounce.x; - } - else if (!body1.immovable) - { - body1.x -= overlap; - body1.velocity.x = v2 - v1 * body1.bounce.x; - - // This is special case code that handles things like vertically moving platforms you can ride - if (body2.moves) - { - body1.y += (body2.y - body2.prev.y) * body2.friction.y; - body1._dy = body1.y - body1.prev.y; - } - } - else - { - body2.x += overlap; - body2.velocity.x = v1 - v2 * body2.bounce.x; - - // This is special case code that handles things like vertically moving platforms you can ride - if (body1.moves) - { - body2.y += (body1.y - body1.prev.y) * body1.friction.y; - body2._dy = body2.y - body2.prev.y; - } - } - - // If we got this far then there WAS overlap, and separation is complete, so return true - return true; }; -module.exports = SeparateX; - - -/***/ }), -/* 1303 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetOverlapY = __webpack_require__(472); - -/** - * Separates two overlapping bodies on the Y-axis (vertically). - * - * Separation involves moving two overlapping bodies so they don't overlap anymore and adjusting their velocities based on their mass. This is a core part of collision detection. - * - * The bodies won't be separated if there is no vertical overlap between them, if they are static, or if either one uses custom logic for its separation. - * - * @function Phaser.Physics.Arcade.SeparateY - * @since 3.0.0 - * - * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to separate. - * @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. - * - * @return {boolean} `true` if the two bodies overlap vertically, otherwise `false`. - */ -var SeparateY = function (body1, body2, overlapOnly, bias) -{ - var overlap = GetOverlapY(body1, body2, overlapOnly, bias); - - // Can't separate two immovable bodies, or a body with its own custom separation logic - if (overlapOnly || overlap === 0 || (body1.immovable && body2.immovable) || body1.customSeparateY || body2.customSeparateY) - { - // return true if there was some overlap, otherwise false - return (overlap !== 0) || (body1.embedded && body2.embedded); - } - - // Adjust their positions and velocities accordingly (if there was any overlap) - var v1 = body1.velocity.y; - var v2 = body2.velocity.y; - - if (!body1.immovable && !body2.immovable) - { - overlap *= 0.5; - - body1.y -= overlap; - body2.y += overlap; - - var nv1 = Math.sqrt((v2 * v2 * body2.mass) / body1.mass) * ((v2 > 0) ? 1 : -1); - var nv2 = Math.sqrt((v1 * v1 * body1.mass) / body2.mass) * ((v1 > 0) ? 1 : -1); - var avg = (nv1 + nv2) * 0.5; - - nv1 -= avg; - nv2 -= avg; - - body1.velocity.y = avg + nv1 * body1.bounce.y; - body2.velocity.y = avg + nv2 * body2.bounce.y; - } - else if (!body1.immovable) - { - body1.y -= overlap; - body1.velocity.y = v2 - v1 * body1.bounce.y; - - // This is special case code that handles things like horizontal moving platforms you can ride - if (body2.moves) - { - body1.x += (body2.x - body2.prev.x) * body2.friction.x; - body1._dx = body1.x - body1.prev.x; - } - } - else - { - body2.y += overlap; - body2.velocity.y = v1 - v2 * body2.bounce.y; - - // This is special case code that handles things like horizontal moving platforms you can ride - if (body1.moves) - { - body2.x += (body1.x - body1.prev.x) * body1.friction.x; - body2._dx = body2.x - body2.prev.x; - } - } - - // If we got this far then there WAS overlap, and separation is complete, so return true - return true; -}; - -module.exports = SeparateY; +module.exports = Tilemap; /***/ }), +/* 1302 */, +/* 1303 */, /* 1304 */, /* 1305 */, /* 1306 */, @@ -176934,10 +178535,7 @@ module.exports = SeparateY; /* 1310 */, /* 1311 */, /* 1312 */, -/* 1313 */, -/* 1314 */, -/* 1315 */, -/* 1316 */ +/* 1313 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -176952,17 +178550,17 @@ module.exports = SeparateY; module.exports = { - BasePlugin: __webpack_require__(477), - DefaultPlugins: __webpack_require__(180), + BasePlugin: __webpack_require__(501), + DefaultPlugins: __webpack_require__(182), PluginCache: __webpack_require__(23), - PluginManager: __webpack_require__(370), - ScenePlugin: __webpack_require__(1317) + PluginManager: __webpack_require__(380), + ScenePlugin: __webpack_require__(1314) }; /***/ }), -/* 1317 */ +/* 1314 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -176971,9 +178569,9 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ -var BasePlugin = __webpack_require__(477); +var BasePlugin = __webpack_require__(501); var Class = __webpack_require__(0); -var SceneEvents = __webpack_require__(22); +var SceneEvents = __webpack_require__(20); /** * @classdesc @@ -177090,7 +178688,7 @@ module.exports = ScenePlugin; /***/ }), -/* 1318 */ +/* 1315 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177100,7 +178698,7 @@ module.exports = ScenePlugin; */ var Extend = __webpack_require__(19); -var CONST = __webpack_require__(183); +var CONST = __webpack_require__(185); /** * @namespace Phaser.Scale @@ -177128,12 +178726,12 @@ var CONST = __webpack_require__(183); var Scale = { - Center: __webpack_require__(359), + Center: __webpack_require__(369), Events: __webpack_require__(93), - Orientation: __webpack_require__(360), - ScaleManager: __webpack_require__(371), - ScaleModes: __webpack_require__(361), - Zoom: __webpack_require__(362) + Orientation: __webpack_require__(370), + ScaleManager: __webpack_require__(381), + ScaleModes: __webpack_require__(371), + Zoom: __webpack_require__(372) }; @@ -177146,7 +178744,7 @@ module.exports = Scale; /***/ }), -/* 1319 */ +/* 1316 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177155,7 +178753,7 @@ module.exports = Scale; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(131); +var CONST = __webpack_require__(132); var Extend = __webpack_require__(19); /** @@ -177164,11 +178762,13 @@ var Extend = __webpack_require__(19); var Scene = { - Events: __webpack_require__(22), - SceneManager: __webpack_require__(373), - ScenePlugin: __webpack_require__(1320), - Settings: __webpack_require__(375), - Systems: __webpack_require__(186) + Events: __webpack_require__(20), + GetPhysicsPlugins: __webpack_require__(385), + GetScenePlugins: __webpack_require__(386), + SceneManager: __webpack_require__(383), + ScenePlugin: __webpack_require__(1317), + Settings: __webpack_require__(387), + Systems: __webpack_require__(188) }; @@ -177179,7 +178779,7 @@ module.exports = Scene; /***/ }), -/* 1320 */ +/* 1317 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177190,7 +178790,7 @@ module.exports = Scene; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var Events = __webpack_require__(22); +var Events = __webpack_require__(20); var GetFastValue = __webpack_require__(2); var PluginCache = __webpack_require__(23); @@ -178189,7 +179789,7 @@ module.exports = ScenePlugin; /***/ }), -/* 1321 */ +/* 1318 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178204,18 +179804,19 @@ module.exports = ScenePlugin; module.exports = { - List: __webpack_require__(135), - Map: __webpack_require__(168), - ProcessQueue: __webpack_require__(192), - RTree: __webpack_require__(473), - Set: __webpack_require__(139), - Size: __webpack_require__(372) + Events: __webpack_require__(404), + List: __webpack_require__(136), + Map: __webpack_require__(121), + ProcessQueue: __webpack_require__(195), + RTree: __webpack_require__(490), + Set: __webpack_require__(140), + Size: __webpack_require__(382) }; /***/ }), -/* 1322 */ +/* 1319 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178225,7 +179826,7 @@ module.exports = { */ var Extend = __webpack_require__(19); -var FilterMode = __webpack_require__(1323); +var FilterMode = __webpack_require__(1320); /** * @namespace Phaser.Textures @@ -178251,14 +179852,14 @@ var FilterMode = __webpack_require__(1323); var Textures = { - CanvasTexture: __webpack_require__(377), - Events: __webpack_require__(127), + CanvasTexture: __webpack_require__(389), + Events: __webpack_require__(129), FilterMode: FilterMode, - Frame: __webpack_require__(95), - Parsers: __webpack_require__(379), - Texture: __webpack_require__(188), - TextureManager: __webpack_require__(376), - TextureSource: __webpack_require__(378) + Frame: __webpack_require__(96), + Parsers: __webpack_require__(391), + Texture: __webpack_require__(190), + TextureManager: __webpack_require__(388), + TextureSource: __webpack_require__(390) }; @@ -178268,7 +179869,7 @@ module.exports = Textures; /***/ }), -/* 1323 */ +/* 1320 */ /***/ (function(module, exports) { /** @@ -178312,7 +179913,7 @@ module.exports = CONST; /***/ }), -/* 1324 */ +/* 1321 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178327,30 +179928,30 @@ module.exports = CONST; module.exports = { - Components: __webpack_require__(147), - Parsers: __webpack_require__(1354), + Components: __webpack_require__(148), + Parsers: __webpack_require__(1351), - Formats: __webpack_require__(32), - ImageCollection: __webpack_require__(488), - ParseToTilemap: __webpack_require__(233), - Tile: __webpack_require__(74), - Tilemap: __webpack_require__(497), - TilemapCreator: __webpack_require__(1368), - TilemapFactory: __webpack_require__(1369), - Tileset: __webpack_require__(105), + Formats: __webpack_require__(33), + ImageCollection: __webpack_require__(512), + ParseToTilemap: __webpack_require__(238), + Tile: __webpack_require__(75), + Tilemap: __webpack_require__(521), + TilemapCreator: __webpack_require__(1365), + TilemapFactory: __webpack_require__(1366), + Tileset: __webpack_require__(106), - LayerData: __webpack_require__(103), - MapData: __webpack_require__(104), - ObjectLayer: __webpack_require__(491), + LayerData: __webpack_require__(104), + MapData: __webpack_require__(105), + ObjectLayer: __webpack_require__(515), - DynamicTilemapLayer: __webpack_require__(498), - StaticTilemapLayer: __webpack_require__(499) + DynamicTilemapLayer: __webpack_require__(522), + StaticTilemapLayer: __webpack_require__(523) }; /***/ }), -/* 1325 */ +/* 1322 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178360,7 +179961,7 @@ module.exports = { */ var GetTilesWithin = __webpack_require__(24); -var CalculateFacesWithin = __webpack_require__(52); +var CalculateFacesWithin = __webpack_require__(53); /** * Copies the tiles in the source rectangular area to a new destination (all specified in tile @@ -178368,7 +179969,6 @@ var CalculateFacesWithin = __webpack_require__(52); * information in the destination region. * * @function Phaser.Tilemaps.Components.Copy - * @private * @since 3.0.0 * * @param {integer} srcTileX - The x coordinate of the area to copy from, in tiles, not pixels. @@ -178395,6 +179995,7 @@ var Copy = function (srcTileX, srcTileY, width, height, destTileX, destTileY, re { var tileX = srcTiles[i].x + offsetX; var tileY = srcTiles[i].y + offsetY; + if (tileX >= 0 && tileX < layer.width && tileY >= 0 && tileY < layer.height) { if (layer.data[tileY][tileX]) @@ -178415,7 +180016,7 @@ module.exports = Copy; /***/ }), -/* 1326 */ +/* 1323 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178424,10 +180025,10 @@ module.exports = Copy; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileToWorldX = __webpack_require__(149); -var TileToWorldY = __webpack_require__(150); +var TileToWorldX = __webpack_require__(150); +var TileToWorldY = __webpack_require__(151); var GetTilesWithin = __webpack_require__(24); -var ReplaceByIndex = __webpack_require__(478); +var ReplaceByIndex = __webpack_require__(502); /** * Creates a Sprite for every object matching the given tile indexes in the layer. You can @@ -178436,11 +180037,10 @@ var ReplaceByIndex = __webpack_require__(478); * Sprites, but want to replace the tile itself with a floor tile or similar once converted. * * @function Phaser.Tilemaps.Components.CreateFromTiles - * @private * @since 3.0.0 * - * @param {(integer|array)} indexes - The tile index, or array of indexes, to create Sprites from. - * @param {(integer|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 {(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 {Phaser.Types.GameObjects.Sprite.SpriteConfig} spriteConfig - The config object to pass into the Sprite creator (i.e. scene.make.sprite). * @param {Phaser.Scene} [scene=scene the map is within] - The Scene to create the Sprites within. * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when determining the world XY @@ -178452,9 +180052,13 @@ var CreateFromTiles = function (indexes, replacements, spriteConfig, scene, came { if (spriteConfig === undefined) { spriteConfig = {}; } - if (!Array.isArray(indexes)) { indexes = [ indexes ]; } + if (!Array.isArray(indexes)) + { + indexes = [ indexes ]; + } var tilemapLayer = layer.tilemapLayer; + if (scene === undefined) { scene = tilemapLayer.scene; } if (camera === undefined) { camera = scene.cameras.main; } @@ -178471,8 +180075,7 @@ var CreateFromTiles = function (indexes, replacements, spriteConfig, scene, came spriteConfig.x = TileToWorldX(tile.x, camera, layer); spriteConfig.y = TileToWorldY(tile.y, camera, layer); - var sprite = scene.make.sprite(spriteConfig); - sprites.push(sprite); + sprites.push(scene.make.sprite(spriteConfig)); } } @@ -178500,7 +180103,7 @@ module.exports = CreateFromTiles; /***/ }), -/* 1327 */ +/* 1324 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178510,13 +180113,12 @@ module.exports = CreateFromTiles; */ var SnapFloor = __webpack_require__(94); -var SnapCeil = __webpack_require__(334); +var SnapCeil = __webpack_require__(342); /** * Returns the tiles in the given layer that are within the camera's viewport. This is used internally. * * @function Phaser.Tilemaps.Components.CullTiles - * @private * @since 3.0.0 * * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. @@ -178657,7 +180259,7 @@ module.exports = CullTiles; /***/ }), -/* 1328 */ +/* 1325 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178667,8 +180269,8 @@ module.exports = CullTiles; */ var GetTilesWithin = __webpack_require__(24); -var CalculateFacesWithin = __webpack_require__(52); -var SetTileCollision = __webpack_require__(73); +var CalculateFacesWithin = __webpack_require__(53); +var SetTileCollision = __webpack_require__(65); /** * Sets the tiles in the given rectangular area (in tile coordinates) of the layer with the @@ -178676,7 +180278,6 @@ var SetTileCollision = __webpack_require__(73); * Collision information in the region will be recalculated. * * @function Phaser.Tilemaps.Components.Fill - * @private * @since 3.0.0 * * @param {integer} index - The tile index to fill the area with. @@ -178711,7 +180312,7 @@ module.exports = Fill; /***/ }), -/* 1329 */ +/* 1326 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178728,7 +180329,6 @@ var GetTilesWithin = __webpack_require__(24); * true) will returned as a new array. Similar to Array.prototype.Filter in vanilla JS. * * @function Phaser.Tilemaps.Components.FilterTiles - * @private * @since 3.0.0 * * @param {function} callback - The callback. Each tile in the given area will be passed to this @@ -178744,7 +180344,7 @@ var GetTilesWithin = __webpack_require__(24); * @param {boolean} [filteringOptions.isColliding=false] - If true, only return tiles that collide on at least one side. * @param {boolean} [filteringOptions.hasInterestingFace=false] - If true, only return tiles that have at least one interesting face. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {Phaser.Tilemaps.Tile[]} The filtered array of Tiles. */ var FilterTiles = function (callback, context, tileX, tileY, width, height, filteringOptions, layer) @@ -178757,9 +180357,8 @@ var FilterTiles = function (callback, context, tileX, tileY, width, height, filt module.exports = FilterTiles; - /***/ }), -/* 1330 */ +/* 1327 */ /***/ (function(module, exports) { /** @@ -178776,7 +180375,6 @@ module.exports = FilterTiles; * the top-left. * * @function Phaser.Tilemaps.Components.FindByIndex - * @private * @since 3.0.0 * * @param {integer} index - The tile index value to search for. @@ -178847,7 +180445,7 @@ module.exports = FindByIndex; /***/ }), -/* 1331 */ +/* 1328 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178874,7 +180472,6 @@ var GetTilesWithin = __webpack_require__(24); * true. Similar to Array.prototype.find in vanilla JS. * * @function Phaser.Tilemaps.Components.FindTile - * @private * @since 3.0.0 * * @param {FindTileCallback} callback - The callback. Each tile in the given area will be passed to this callback as the first and only parameter. @@ -178901,7 +180498,7 @@ module.exports = FindTile; /***/ }), -/* 1332 */ +/* 1329 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178925,7 +180522,6 @@ var GetTilesWithin = __webpack_require__(24); * callback. Similar to Array.prototype.forEach in vanilla JS. * * @function Phaser.Tilemaps.Components.ForEachTile - * @private * @since 3.0.0 * * @param {EachTileCallback} callback - The callback. Each tile in the given area will be passed to this callback as the first and only parameter. @@ -178951,7 +180547,7 @@ module.exports = ForEachTile; /***/ }), -/* 1333 */ +/* 1330 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178960,15 +180556,14 @@ module.exports = ForEachTile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(148); -var WorldToTileX = __webpack_require__(63); -var WorldToTileY = __webpack_require__(64); +var GetTileAt = __webpack_require__(149); +var WorldToTileX = __webpack_require__(66); +var WorldToTileY = __webpack_require__(67); /** * Gets a tile at the given world coordinates from the given layer. * * @function Phaser.Tilemaps.Components.GetTileAtWorldXY - * @private * @since 3.0.0 * * @param {number} worldX - X position to get the tile from (given in pixels) @@ -178976,7 +180571,7 @@ var WorldToTileY = __webpack_require__(64); * @param {boolean} [nonNull=false] - If true, function won't return null for empty tiles, but a Tile object with an index of -1. * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {Phaser.Tilemaps.Tile} The tile at the given coordinates or null if no tile was found or the coordinates * were invalid. */ @@ -178992,7 +180587,7 @@ module.exports = GetTileAtWorldXY; /***/ }), -/* 1334 */ +/* 1331 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179001,14 +180596,14 @@ module.exports = GetTileAtWorldXY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Geom = __webpack_require__(430); +var Geom = __webpack_require__(447); var GetTilesWithin = __webpack_require__(24); -var Intersects = __webpack_require__(431); +var Intersects = __webpack_require__(448); var NOOP = __webpack_require__(1); -var TileToWorldX = __webpack_require__(149); -var TileToWorldY = __webpack_require__(150); -var WorldToTileX = __webpack_require__(63); -var WorldToTileY = __webpack_require__(64); +var TileToWorldX = __webpack_require__(150); +var TileToWorldY = __webpack_require__(151); +var WorldToTileX = __webpack_require__(66); +var WorldToTileY = __webpack_require__(67); var TriangleToRectangle = function (triangle, rect) { @@ -179023,7 +180618,6 @@ var TriangleToRectangle = function (triangle, rect) * Line, Rectangle or Triangle. The shape should be in world coordinates. * * @function Phaser.Tilemaps.Components.GetTilesWithinShape - * @private * @since 3.0.0 * * @param {(Phaser.Geom.Circle|Phaser.Geom.Line|Phaser.Geom.Rectangle|Phaser.Geom.Triangle)} shape - A shape in world (pixel) coordinates @@ -179042,10 +180636,33 @@ var GetTilesWithinShape = function (shape, filteringOptions, camera, layer) // intersectTest is a function with parameters: shape, rect var intersectTest = NOOP; - if (shape instanceof Geom.Circle) { intersectTest = Intersects.CircleToRectangle; } - else if (shape instanceof Geom.Rectangle) { intersectTest = Intersects.RectangleToRectangle; } - else if (shape instanceof Geom.Triangle) { intersectTest = TriangleToRectangle; } - else if (shape instanceof Geom.Line) { intersectTest = Intersects.LineToRectangle; } + + switch (typeof(shape)) + { + case Geom.Circle: + { + intersectTest = Intersects.CircleToRectangle; + break; + } + + case Geom.Rectangle: + { + intersectTest = Intersects.RectangleToRectangle; + break; + } + + case Geom.Triangle: + { + intersectTest = TriangleToRectangle; + break; + } + + case Geom.Line: + { + intersectTest = Intersects.LineToRectangle; + break; + } + } // Top left corner of the shapes's bounding box, rounded down to include partial tiles var xStart = WorldToTileX(shape.left, true, camera, layer); @@ -179063,6 +180680,7 @@ var GetTilesWithinShape = function (shape, filteringOptions, camera, layer) var tileWidth = layer.tileWidth; var tileHeight = layer.tileHeight; + if (layer.tilemapLayer) { tileWidth *= layer.tilemapLayer.scaleX; @@ -179071,11 +180689,14 @@ var GetTilesWithinShape = function (shape, filteringOptions, camera, layer) var results = []; var tileRect = new Geom.Rectangle(0, 0, tileWidth, tileHeight); + for (var i = 0; i < tiles.length; i++) { var tile = tiles[i]; + tileRect.x = TileToWorldX(tile.x, camera, layer); tileRect.y = TileToWorldY(tile.y, camera, layer); + if (intersectTest(shape, tileRect)) { results.push(tile); @@ -179089,7 +180710,7 @@ module.exports = GetTilesWithinShape; /***/ }), -/* 1335 */ +/* 1332 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179099,14 +180720,13 @@ module.exports = GetTilesWithinShape; */ var GetTilesWithin = __webpack_require__(24); -var WorldToTileX = __webpack_require__(63); -var WorldToTileY = __webpack_require__(64); +var WorldToTileX = __webpack_require__(66); +var WorldToTileY = __webpack_require__(67); /** * Gets the tiles in the given rectangular area (in world coordinates) of the layer. * * @function Phaser.Tilemaps.Components.GetTilesWithinWorldXY - * @private * @since 3.0.0 * * @param {number} worldX - The world x coordinate for the top-left of the area. @@ -179119,7 +180739,7 @@ var WorldToTileY = __webpack_require__(64); * @param {boolean} [filteringOptions.hasInterestingFace=false] - If true, only return tiles that have at least one interesting face. * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {Phaser.Tilemaps.Tile[]} Array of Tile objects. */ var GetTilesWithinWorldXY = function (worldX, worldY, width, height, filteringOptions, camera, layer) @@ -179139,7 +180759,7 @@ module.exports = GetTilesWithinWorldXY; /***/ }), -/* 1336 */ +/* 1333 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179148,23 +180768,22 @@ module.exports = GetTilesWithinWorldXY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HasTileAt = __webpack_require__(479); -var WorldToTileX = __webpack_require__(63); -var WorldToTileY = __webpack_require__(64); +var HasTileAt = __webpack_require__(503); +var WorldToTileX = __webpack_require__(66); +var WorldToTileY = __webpack_require__(67); /** * Checks if there is a tile at the given location (in world coordinates) in the given layer. Returns * false if there is no tile or if the tile at that location has an index of -1. * * @function Phaser.Tilemaps.Components.HasTileAtWorldXY - * @private * @since 3.0.0 * * @param {number} worldX - The X coordinate of the world position. * @param {number} worldY - The Y coordinate of the world position. * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {?boolean} Returns a boolean, or null if the layer given was invalid. */ var HasTileAtWorldXY = function (worldX, worldY, camera, layer) @@ -179179,7 +180798,7 @@ module.exports = HasTileAtWorldXY; /***/ }), -/* 1337 */ +/* 1334 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179188,9 +180807,9 @@ module.exports = HasTileAtWorldXY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PutTileAt = __webpack_require__(227); -var WorldToTileX = __webpack_require__(63); -var WorldToTileY = __webpack_require__(64); +var PutTileAt = __webpack_require__(234); +var WorldToTileX = __webpack_require__(66); +var WorldToTileY = __webpack_require__(67); /** * Puts a tile at the given world coordinates (pixels) in the specified layer. You can pass in either @@ -179199,7 +180818,6 @@ var WorldToTileY = __webpack_require__(64); * changed. Collision information will be recalculated at the specified location. * * @function Phaser.Tilemaps.Components.PutTileAtWorldXY - * @private * @since 3.0.0 * * @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object. @@ -179215,6 +180833,7 @@ var PutTileAtWorldXY = function (tile, worldX, worldY, recalculateFaces, camera, { var tileX = WorldToTileX(worldX, true, camera, layer); var tileY = WorldToTileY(worldY, true, camera, layer); + return PutTileAt(tile, tileX, tileY, recalculateFaces, layer); }; @@ -179222,7 +180841,7 @@ module.exports = PutTileAtWorldXY; /***/ }), -/* 1338 */ +/* 1335 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179231,8 +180850,8 @@ module.exports = PutTileAtWorldXY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CalculateFacesWithin = __webpack_require__(52); -var PutTileAt = __webpack_require__(227); +var CalculateFacesWithin = __webpack_require__(53); +var PutTileAt = __webpack_require__(234); /** * Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified @@ -179242,7 +180861,6 @@ var PutTileAt = __webpack_require__(227); * within the region tiles were changed. * * @function Phaser.Tilemaps.Components.PutTilesAt - * @private * @since 3.0.0 * * @param {(integer[]|integer[][]|Phaser.Tilemaps.Tile[]|Phaser.Tilemaps.Tile[][])} tile - A row (array) or grid (2D array) of Tiles or tile indexes to place. @@ -179270,6 +180888,7 @@ var PutTilesAt = function (tilesArray, tileX, tileY, recalculateFaces, layer) for (var tx = 0; tx < width; tx++) { var tile = tilesArray[ty][tx]; + PutTileAt(tile, tileX + tx, tileY + ty, false, layer); } } @@ -179284,9 +180903,8 @@ var PutTilesAt = function (tilesArray, tileX, tileY, recalculateFaces, layer) module.exports = PutTilesAt; - /***/ }), -/* 1339 */ +/* 1336 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179296,7 +180914,7 @@ module.exports = PutTilesAt; */ var GetTilesWithin = __webpack_require__(24); -var GetRandom = __webpack_require__(191); +var GetRandom = __webpack_require__(194); /** * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the @@ -179306,7 +180924,6 @@ var GetRandom = __webpack_require__(191); * indexes. This method only modifies tile indexes and does not change collision information. * * @function Phaser.Tilemaps.Components.Randomize - * @private * @since 3.0.0 * * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area. @@ -179325,6 +180942,7 @@ var Randomize = function (tileX, tileY, width, height, indexes, layer) if (indexes === undefined) { indexes = []; + for (i = 0; i < tiles.length; i++) { if (indexes.indexOf(tiles[i].index) === -1) @@ -179344,7 +180962,7 @@ module.exports = Randomize; /***/ }), -/* 1340 */ +/* 1337 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179353,16 +180971,15 @@ module.exports = Randomize; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RemoveTileAt = __webpack_require__(480); -var WorldToTileX = __webpack_require__(63); -var WorldToTileY = __webpack_require__(64); +var RemoveTileAt = __webpack_require__(504); +var WorldToTileX = __webpack_require__(66); +var WorldToTileY = __webpack_require__(67); /** * Removes the tile at the given world coordinates in the specified layer and updates the layer's * collision information. * * @function Phaser.Tilemaps.Components.RemoveTileAtWorldXY - * @private * @since 3.0.0 * * @param {number} worldX - The x coordinate, in pixels. @@ -179378,6 +180995,7 @@ var RemoveTileAtWorldXY = function (worldX, worldY, replaceWithNull, recalculate { var tileX = WorldToTileX(worldX, true, camera, layer); var tileY = WorldToTileY(worldY, true, camera, layer); + return RemoveTileAt(tileX, tileY, replaceWithNull, recalculateFaces, layer); }; @@ -179385,7 +181003,7 @@ module.exports = RemoveTileAtWorldXY; /***/ }), -/* 1341 */ +/* 1338 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179395,7 +181013,7 @@ module.exports = RemoveTileAtWorldXY; */ var GetTilesWithin = __webpack_require__(24); -var Color = __webpack_require__(354); +var Color = __webpack_require__(363); var defaultTileColor = new Color(105, 210, 231, 150); var defaultCollidingTileColor = new Color(243, 134, 48, 200); @@ -179408,7 +181026,6 @@ var defaultFaceColor = new Color(40, 39, 37, 150); * wherever you want on the screen. * * @function Phaser.Tilemaps.Components.RenderDebug - * @private * @since 3.0.0 * * @param {Phaser.GameObjects.Graphics} graphics - The target Graphics object to draw upon. @@ -179474,7 +181091,7 @@ module.exports = RenderDebug; /***/ }), -/* 1342 */ +/* 1339 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179483,9 +181100,9 @@ module.exports = RenderDebug; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetTileCollision = __webpack_require__(73); -var CalculateFacesWithin = __webpack_require__(52); -var SetLayerCollisionIndex = __webpack_require__(228); +var SetTileCollision = __webpack_require__(65); +var CalculateFacesWithin = __webpack_require__(53); +var SetLayerCollisionIndex = __webpack_require__(152); /** * Sets collision on the given tile or tiles within a layer by index. You can pass in either a @@ -179493,7 +181110,6 @@ var SetLayerCollisionIndex = __webpack_require__(228); * collision will be enabled (true) or disabled (false). * * @function Phaser.Tilemaps.Components.SetCollision - * @private * @since 3.0.0 * * @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes. @@ -179515,7 +181131,7 @@ var SetCollision = function (indexes, collides, recalculateFaces, layer, updateL { SetLayerCollisionIndex(indexes[i], collides, layer); } - + // Update the tiles if (updateLayer) { @@ -179543,7 +181159,7 @@ module.exports = SetCollision; /***/ }), -/* 1343 */ +/* 1340 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179552,9 +181168,9 @@ module.exports = SetCollision; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetTileCollision = __webpack_require__(73); -var CalculateFacesWithin = __webpack_require__(52); -var SetLayerCollisionIndex = __webpack_require__(228); +var SetTileCollision = __webpack_require__(65); +var CalculateFacesWithin = __webpack_require__(53); +var SetLayerCollisionIndex = __webpack_require__(152); /** * Sets collision on a range of tiles in a layer whose index is between the specified `start` and @@ -179563,7 +181179,6 @@ var SetLayerCollisionIndex = __webpack_require__(228); * enabled (true) or disabled (false). * * @function Phaser.Tilemaps.Components.SetCollisionBetween - * @private * @since 3.0.0 * * @param {integer} start - The first index of the tile to be set for collision. @@ -179596,7 +181211,7 @@ var SetCollisionBetween = function (start, stop, collides, recalculateFaces, lay for (var tx = 0; tx < layer.width; tx++) { var tile = layer.data[ty][tx]; - + if (tile) { if (tile.index >= start && tile.index <= stop) @@ -179618,7 +181233,7 @@ module.exports = SetCollisionBetween; /***/ }), -/* 1344 */ +/* 1341 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179627,9 +181242,9 @@ module.exports = SetCollisionBetween; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetTileCollision = __webpack_require__(73); -var CalculateFacesWithin = __webpack_require__(52); -var SetLayerCollisionIndex = __webpack_require__(228); +var SetTileCollision = __webpack_require__(65); +var CalculateFacesWithin = __webpack_require__(53); +var SetLayerCollisionIndex = __webpack_require__(152); /** * Sets collision on all tiles in the given layer, except for tiles that have an index specified in @@ -179637,7 +181252,6 @@ var SetLayerCollisionIndex = __webpack_require__(228); * disabled (false). Tile indexes not currently in the layer are not affected. * * @function Phaser.Tilemaps.Components.SetCollisionByExclusion - * @private * @since 3.0.0 * * @param {integer[]} indexes - An array of the tile indexes to not be counted for collision. @@ -179675,7 +181289,7 @@ module.exports = SetCollisionByExclusion; /***/ }), -/* 1345 */ +/* 1342 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179684,9 +181298,9 @@ module.exports = SetCollisionByExclusion; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetTileCollision = __webpack_require__(73); -var CalculateFacesWithin = __webpack_require__(52); -var HasValue = __webpack_require__(112); +var SetTileCollision = __webpack_require__(65); +var CalculateFacesWithin = __webpack_require__(53); +var HasValue = __webpack_require__(113); /** * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property @@ -179698,7 +181312,6 @@ var HasValue = __webpack_require__(112); * "types" property that matches any of those values, its collision flag will be updated. * * @function Phaser.Tilemaps.Components.SetCollisionByProperty - * @private * @since 3.0.0 * * @param {object} properties - An object with tile properties and corresponding values that should be checked. @@ -179750,7 +181363,7 @@ module.exports = SetCollisionByProperty; /***/ }), -/* 1346 */ +/* 1343 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179759,8 +181372,8 @@ module.exports = SetCollisionByProperty; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetTileCollision = __webpack_require__(73); -var CalculateFacesWithin = __webpack_require__(52); +var SetTileCollision = __webpack_require__(65); +var CalculateFacesWithin = __webpack_require__(53); /** * Sets collision on the tiles within a layer by checking each tile's collision group data @@ -179769,7 +181382,6 @@ var CalculateFacesWithin = __webpack_require__(52); * controls if collision will be enabled (true) or disabled (false). * * @function Phaser.Tilemaps.Components.SetCollisionFromCollisionGroup - * @private * @since 3.0.0 * * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision. @@ -179810,7 +181422,7 @@ module.exports = SetCollisionFromCollisionGroup; /***/ }), -/* 1347 */ +/* 1344 */ /***/ (function(module, exports) { /** @@ -179826,7 +181438,6 @@ module.exports = SetCollisionFromCollisionGroup; * at a specific location on the map then see setTileLocationCallback. * * @function Phaser.Tilemaps.Components.SetTileIndexCallback - * @private * @since 3.0.0 * * @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes to have a collision callback set for. @@ -179857,7 +181468,7 @@ module.exports = SetTileIndexCallback; /***/ }), -/* 1348 */ +/* 1345 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179874,7 +181485,6 @@ var GetTilesWithin = __webpack_require__(24); * remove it. * * @function Phaser.Tilemaps.Components.SetTileLocationCallback - * @private * @since 3.0.0 * * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area. @@ -179893,14 +181503,13 @@ var SetTileLocationCallback = function (tileX, tileY, width, height, callback, c { tiles[i].setCollisionCallback(callback, callbackContext); } - }; module.exports = SetTileLocationCallback; /***/ }), -/* 1349 */ +/* 1346 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179919,7 +181528,6 @@ var ShuffleArray = __webpack_require__(119); * information. * * @function Phaser.Tilemaps.Components.Shuffle - * @private * @since 3.0.0 * * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area. @@ -179933,6 +181541,7 @@ var Shuffle = function (tileX, tileY, width, height, layer) var tiles = GetTilesWithin(tileX, tileY, width, height, null, layer); var indexes = tiles.map(function (tile) { return tile.index; }); + ShuffleArray(indexes); for (var i = 0; i < tiles.length; i++) @@ -179945,7 +181554,7 @@ module.exports = Shuffle; /***/ }), -/* 1350 */ +/* 1347 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179962,7 +181571,6 @@ var GetTilesWithin = __webpack_require__(24); * information. * * @function Phaser.Tilemaps.Components.SwapByIndex - * @private * @since 3.0.0 * * @param {integer} tileA - First tile index. @@ -179976,6 +181584,7 @@ var GetTilesWithin = __webpack_require__(24); var SwapByIndex = function (indexA, indexB, tileX, tileY, width, height, layer) { var tiles = GetTilesWithin(tileX, tileY, width, height, null, layer); + for (var i = 0; i < tiles.length; i++) { if (tiles[i]) @@ -179996,7 +181605,7 @@ module.exports = SwapByIndex; /***/ }), -/* 1351 */ +/* 1348 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180005,8 +181614,8 @@ module.exports = SwapByIndex; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileToWorldX = __webpack_require__(149); -var TileToWorldY = __webpack_require__(150); +var TileToWorldX = __webpack_require__(150); +var TileToWorldY = __webpack_require__(151); var Vector2 = __webpack_require__(3); /** @@ -180015,7 +181624,6 @@ var Vector2 = __webpack_require__(3); * `point` object. * * @function Phaser.Tilemaps.Components.TileToWorldXY - * @private * @since 3.0.0 * * @param {integer} tileX - The x coordinate, in tiles, not pixels. @@ -180023,7 +181631,7 @@ var Vector2 = __webpack_require__(3); * @param {Phaser.Math.Vector2} [point] - A Vector2 to store the coordinates in. If not given a new Vector2 is created. * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {Phaser.Math.Vector2} The XY location in world coordinates. */ var TileToWorldXY = function (tileX, tileY, point, camera, layer) @@ -180040,7 +181648,7 @@ module.exports = TileToWorldXY; /***/ }), -/* 1352 */ +/* 1349 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180067,7 +181675,6 @@ var GetTilesWithin = __webpack_require__(24); * method only modifies tile indexes and does not change collision information. * * @function Phaser.Tilemaps.Components.WeightedRandomize - * @private * @since 3.0.0 * * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area. @@ -180099,12 +181706,15 @@ var WeightedRandomize = function (tileX, tileY, width, height, weightedIndexes, var rand = Math.random() * weightTotal; var sum = 0; var randomIndex = -1; + for (var j = 0; j < weightedIndexes.length; j++) { sum += weightedIndexes[j].weight; + if (rand <= sum) { var chosen = weightedIndexes[j].index; + randomIndex = Array.isArray(chosen) ? chosen[Math.floor(Math.random() * chosen.length)] : chosen; @@ -180120,7 +181730,7 @@ module.exports = WeightedRandomize; /***/ }), -/* 1353 */ +/* 1350 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180129,8 +181739,8 @@ module.exports = WeightedRandomize; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var WorldToTileX = __webpack_require__(63); -var WorldToTileY = __webpack_require__(64); +var WorldToTileX = __webpack_require__(66); +var WorldToTileY = __webpack_require__(67); var Vector2 = __webpack_require__(3); /** @@ -180139,7 +181749,6 @@ var Vector2 = __webpack_require__(3); * `point` object. * * @function Phaser.Tilemaps.Components.WorldToTileXY - * @private * @since 3.0.0 * * @param {number} worldX - The x coordinate to be converted, in pixels, not tiles. @@ -180148,7 +181757,7 @@ var Vector2 = __webpack_require__(3); * @param {Phaser.Math.Vector2} [point] - A Vector2 to store the coordinates in. If not given a new Vector2 is created. * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {Phaser.Math.Vector2} The XY location in tile units. */ var WorldToTileXY = function (worldX, worldY, snapToFloor, point, camera, layer) @@ -180165,7 +181774,7 @@ module.exports = WorldToTileXY; /***/ }), -/* 1354 */ +/* 1351 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180180,18 +181789,18 @@ module.exports = WorldToTileXY; module.exports = { - Parse: __webpack_require__(481), - Parse2DArray: __webpack_require__(229), - ParseCSV: __webpack_require__(482), + Parse: __webpack_require__(505), + Parse2DArray: __webpack_require__(235), + ParseCSV: __webpack_require__(506), - Impact: __webpack_require__(1355), - Tiled: __webpack_require__(1356) + Impact: __webpack_require__(1352), + Tiled: __webpack_require__(1353) }; /***/ }), -/* 1355 */ +/* 1352 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180206,15 +181815,15 @@ module.exports = { module.exports = { - ParseTileLayers: __webpack_require__(495), - ParseTilesets: __webpack_require__(496), - ParseWeltmeister: __webpack_require__(494) + ParseTileLayers: __webpack_require__(519), + ParseTilesets: __webpack_require__(520), + ParseWeltmeister: __webpack_require__(518) }; /***/ }), -/* 1356 */ +/* 1353 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180229,22 +181838,23 @@ module.exports = { module.exports = { - AssignTileProperties: __webpack_require__(493), - Base64Decode: __webpack_require__(485), - BuildTilesetIndex: __webpack_require__(492), - ParseGID: __webpack_require__(230), - ParseImageLayers: __webpack_require__(486), - ParseJSONTiled: __webpack_require__(483), - ParseObject: __webpack_require__(232), - ParseObjectLayers: __webpack_require__(490), - ParseTileLayers: __webpack_require__(484), - ParseTilesets: __webpack_require__(487) + AssignTileProperties: __webpack_require__(517), + Base64Decode: __webpack_require__(509), + BuildTilesetIndex: __webpack_require__(516), + CreateGroupLayer: __webpack_require__(153), + ParseGID: __webpack_require__(236), + ParseImageLayers: __webpack_require__(510), + ParseJSONTiled: __webpack_require__(507), + ParseObject: __webpack_require__(237), + ParseObjectLayers: __webpack_require__(514), + ParseTileLayers: __webpack_require__(508), + ParseTilesets: __webpack_require__(511) }; /***/ }), -/* 1357 */ +/* 1354 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180258,12 +181868,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1358); + renderWebGL = __webpack_require__(1355); } if (true) { - renderCanvas = __webpack_require__(1359); + renderCanvas = __webpack_require__(1356); } module.exports = { @@ -180275,7 +181885,7 @@ module.exports = { /***/ }), -/* 1358 */ +/* 1355 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180396,7 +182006,7 @@ module.exports = DynamicTilemapLayerWebGLRenderer; /***/ }), -/* 1359 */ +/* 1356 */ /***/ (function(module, exports) { /** @@ -180528,7 +182138,7 @@ module.exports = DynamicTilemapLayerCanvasRenderer; /***/ }), -/* 1360 */ +/* 1357 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180542,12 +182152,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1361); + renderWebGL = __webpack_require__(1358); } if (true) { - renderCanvas = __webpack_require__(1367); + renderCanvas = __webpack_require__(1364); } module.exports = { @@ -180559,7 +182169,7 @@ module.exports = { /***/ }), -/* 1361 */ +/* 1358 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180568,10 +182178,10 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Identity = __webpack_require__(1362); -var Scale = __webpack_require__(1364); -var Translate = __webpack_require__(1365); -var ViewLoad2D = __webpack_require__(1366); +var Identity = __webpack_require__(1359); +var Scale = __webpack_require__(1361); +var Translate = __webpack_require__(1362); +var ViewLoad2D = __webpack_require__(1363); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -180654,7 +182264,7 @@ module.exports = StaticTilemapLayerWebGLRenderer; /***/ }), -/* 1362 */ +/* 1359 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180663,7 +182273,7 @@ module.exports = StaticTilemapLayerWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetIdentity = __webpack_require__(1363); +var SetIdentity = __webpack_require__(1360); /** * Loads an identity matrix into the model matrix. @@ -180688,7 +182298,7 @@ module.exports = Identity; /***/ }), -/* 1363 */ +/* 1360 */ /***/ (function(module, exports) { /** @@ -180729,7 +182339,7 @@ module.exports = SetIdentity; /***/ }), -/* 1364 */ +/* 1361 */ /***/ (function(module, exports) { /** @@ -180777,7 +182387,7 @@ module.exports = Scale; /***/ }), -/* 1365 */ +/* 1362 */ /***/ (function(module, exports) { /** @@ -180817,7 +182427,7 @@ module.exports = Translate; /***/ }), -/* 1366 */ +/* 1363 */ /***/ (function(module, exports) { /** @@ -180867,7 +182477,7 @@ module.exports = ViewLoad2D; /***/ }), -/* 1367 */ +/* 1364 */ /***/ (function(module, exports) { /** @@ -181001,7 +182611,7 @@ module.exports = StaticTilemapLayerCanvasRenderer; /***/ }), -/* 1368 */ +/* 1365 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181011,7 +182621,7 @@ module.exports = StaticTilemapLayerCanvasRenderer; */ var GameObjectCreator = __webpack_require__(16); -var ParseToTilemap = __webpack_require__(233); +var ParseToTilemap = __webpack_require__(238); /** * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. @@ -181045,7 +182655,7 @@ GameObjectCreator.register('tilemap', function (config) /***/ }), -/* 1369 */ +/* 1366 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181055,7 +182665,7 @@ GameObjectCreator.register('tilemap', function (config) */ var GameObjectFactory = __webpack_require__(5); -var ParseToTilemap = __webpack_require__(233); +var ParseToTilemap = __webpack_require__(238); /** * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. @@ -181111,7 +182721,7 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt /***/ }), -/* 1370 */ +/* 1367 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181126,14 +182736,14 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt module.exports = { - Clock: __webpack_require__(1371), - TimerEvent: __webpack_require__(500) + Clock: __webpack_require__(1368), + TimerEvent: __webpack_require__(524) }; /***/ }), -/* 1371 */ +/* 1368 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181144,8 +182754,9 @@ module.exports = { var Class = __webpack_require__(0); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(22); -var TimerEvent = __webpack_require__(500); +var SceneEvents = __webpack_require__(20); +var TimerEvent = __webpack_require__(524); +var Remove = __webpack_require__(95); /** * @classdesc @@ -181193,12 +182804,9 @@ var Clock = new Class({ */ this.now = 0; - // Scale the delta time coming into the Clock by this factor - // which then influences anything using this Clock for calculations, like TimerEvents - /** * The scale of the Clock's time delta. - * + * * The time delta is the time elapsed between two consecutive frames and influences the speed of time for this Clock and anything which uses it, such as its Timer Events. Values higher than 1 increase the speed of time, while values smaller than 1 decrease it. A value of 0 freezes time and is effectively equivalent to pausing the Clock. * * @name Phaser.Time.Clock#timeScale @@ -181232,7 +182840,7 @@ var Clock = new Class({ this._active = []; /** - * An array of all Timer Events which will be added to the Clock at the start of the frame. + * An array of all Timer Events which will be added to the Clock at the start of the next frame. * * @name Phaser.Time.Clock#_pendingInsertion * @type {Phaser.Time.TimerEvent[]} @@ -181243,7 +182851,7 @@ var Clock = new Class({ this._pendingInsertion = []; /** - * An array of all Timer Events which will be removed from the Clock at the start of the frame. + * An array of all Timer Events which will be removed from the Clock at the start of the next frame. * * @name Phaser.Time.Clock#_pendingRemoval * @type {Phaser.Time.TimerEvent[]} @@ -181269,7 +182877,7 @@ var Clock = new Class({ { // Sync with the TimeStep this.now = this.systems.game.loop.time; - + this.systems.events.once(SceneEvents.DESTROY, this.destroy, this); }, @@ -181294,16 +182902,36 @@ var Clock = new Class({ /** * Creates a Timer Event and adds it to the Clock at the start of the frame. * + * You can also pass in an existing Timer Event, which will be reset and added to this Clock. + * + * Note that if the Timer Event is being used by _another_ Clock (in another Scene) it will still + * be updated by that Clock as well, so be careful when using this feature. + * * @method Phaser.Time.Clock#addEvent * @since 3.0.0 * - * @param {Phaser.Types.Time.TimerEventConfig} config - The configuration for the Timer Event. + * @param {(Phaser.Time.TimerEvent | Phaser.Types.Time.TimerEventConfig)} config - The configuration for the Timer Event, or an existing Timer Event object. * - * @return {Phaser.Time.TimerEvent} The Timer Event which was created. + * @return {Phaser.Time.TimerEvent} The Timer Event which was created, or passed in. */ addEvent: function (config) { - var event = new TimerEvent(config); + var event; + + if (config instanceof Phaser.Time.TimerEvent) + { + event = config; + + this.removeEvent(event); + + event.elapsed = event.startAt; + event.hasDispatched = false; + event.repeatCount = (event.repeat === -1 || event.loop) ? 999999999999 : event.repeat; + } + else + { + event = new TimerEvent(config); + } this._pendingInsertion.push(event); @@ -181336,7 +182964,7 @@ var Clock = new Class({ * @method Phaser.Time.Clock#clearPendingEvents * @since 3.0.0 * - * @return {Phaser.Time.Clock} This Clock object. + * @return {this} - This Clock instance. */ clearPendingEvents: function () { @@ -181345,13 +182973,45 @@ var Clock = new Class({ return this; }, + /** + * Removes the given Timer Event, or an array of Timer Events, from this Clock. + * + * The events are removed from all internal lists (active, pending and removal), + * freeing the event up to be re-used. + * + * @method Phaser.Time.Clock#removeEvent + * @since 3.50.0 + * + * @param {(Phaser.Time.TimerEvent | Phaser.Time.TimerEvent[])} events - The Timer Event, or an array of Timer Events, to remove from this Clock. + * + * @return {this} - This Clock instance. + */ + removeEvent: function (events) + { + if (!Array.isArray(events)) + { + events = [ events ]; + } + + for (var i = 0; i < events.length; i++) + { + var event = events[i]; + + Remove(this._pendingRemoval, event); + Remove(this._pendingInsertion, event); + Remove(this._active, event); + } + + return this; + }, + /** * Schedules all active Timer Events for removal at the start of the frame. * * @method Phaser.Time.Clock#removeAllEvents * @since 3.0.0 * - * @return {Phaser.Time.Clock} This Clock object. + * @return {this} - This Clock instance. */ removeAllEvents: function () { @@ -181539,7 +183199,7 @@ module.exports = Clock; /***/ }), -/* 1372 */ +/* 1369 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181548,7 +183208,7 @@ module.exports = Clock; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(90); +var CONST = __webpack_require__(91); var Extend = __webpack_require__(19); /** @@ -181557,13 +183217,13 @@ var Extend = __webpack_require__(19); var Tweens = { - Builders: __webpack_require__(1373), - Events: __webpack_require__(238), + Builders: __webpack_require__(1370), + Events: __webpack_require__(243), - TweenManager: __webpack_require__(1389), - Tween: __webpack_require__(237), - TweenData: __webpack_require__(239), - Timeline: __webpack_require__(506) + TweenManager: __webpack_require__(1386), + Tween: __webpack_require__(242), + TweenData: __webpack_require__(244), + Timeline: __webpack_require__(530) }; @@ -181574,7 +183234,7 @@ module.exports = Tweens; /***/ }), -/* 1373 */ +/* 1370 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181589,23 +183249,23 @@ module.exports = Tweens; module.exports = { - GetBoolean: __webpack_require__(89), - GetEaseFunction: __webpack_require__(69), - GetNewValue: __webpack_require__(151), - GetProps: __webpack_require__(501), - GetTargets: __webpack_require__(234), - GetTweens: __webpack_require__(502), - GetValueOp: __webpack_require__(235), - NumberTweenBuilder: __webpack_require__(503), - StaggerBuilder: __webpack_require__(504), - TimelineBuilder: __webpack_require__(505), - TweenBuilder: __webpack_require__(152) + GetBoolean: __webpack_require__(90), + GetEaseFunction: __webpack_require__(71), + GetNewValue: __webpack_require__(154), + GetProps: __webpack_require__(525), + GetTargets: __webpack_require__(239), + GetTweens: __webpack_require__(526), + GetValueOp: __webpack_require__(240), + NumberTweenBuilder: __webpack_require__(527), + StaggerBuilder: __webpack_require__(528), + TimelineBuilder: __webpack_require__(529), + TweenBuilder: __webpack_require__(155) }; /***/ }), -/* 1374 */ +/* 1371 */ /***/ (function(module, exports) { /** @@ -181683,7 +183343,7 @@ module.exports = [ /***/ }), -/* 1375 */ +/* 1372 */ /***/ (function(module, exports) { /** @@ -181719,7 +183379,7 @@ module.exports = 'complete'; /***/ }), -/* 1376 */ +/* 1373 */ /***/ (function(module, exports) { /** @@ -181756,7 +183416,7 @@ module.exports = 'loop'; /***/ }), -/* 1377 */ +/* 1374 */ /***/ (function(module, exports) { /** @@ -181793,7 +183453,7 @@ module.exports = 'pause'; /***/ }), -/* 1378 */ +/* 1375 */ /***/ (function(module, exports) { /** @@ -181830,7 +183490,7 @@ module.exports = 'resume'; /***/ }), -/* 1379 */ +/* 1376 */ /***/ (function(module, exports) { /** @@ -181866,7 +183526,7 @@ module.exports = 'start'; /***/ }), -/* 1380 */ +/* 1377 */ /***/ (function(module, exports) { /** @@ -181903,7 +183563,7 @@ module.exports = 'update'; /***/ }), -/* 1381 */ +/* 1378 */ /***/ (function(module, exports) { /** @@ -181943,7 +183603,7 @@ module.exports = 'active'; /***/ }), -/* 1382 */ +/* 1379 */ /***/ (function(module, exports) { /** @@ -181984,7 +183644,7 @@ module.exports = 'complete'; /***/ }), -/* 1383 */ +/* 1380 */ /***/ (function(module, exports) { /** @@ -182028,7 +183688,7 @@ module.exports = 'loop'; /***/ }), -/* 1384 */ +/* 1381 */ /***/ (function(module, exports) { /** @@ -182073,7 +183733,7 @@ module.exports = 'repeat'; /***/ }), -/* 1385 */ +/* 1382 */ /***/ (function(module, exports) { /** @@ -182113,7 +183773,7 @@ module.exports = 'start'; /***/ }), -/* 1386 */ +/* 1383 */ /***/ (function(module, exports) { /** @@ -182149,7 +183809,7 @@ module.exports = 'stop'; /***/ }), -/* 1387 */ +/* 1384 */ /***/ (function(module, exports) { /** @@ -182192,7 +183852,7 @@ module.exports = 'update'; /***/ }), -/* 1388 */ +/* 1385 */ /***/ (function(module, exports) { /** @@ -182238,7 +183898,7 @@ module.exports = 'yoyo'; /***/ }), -/* 1389 */ +/* 1386 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182247,15 +183907,15 @@ module.exports = 'yoyo'; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayRemove = __webpack_require__(129); +var ArrayRemove = __webpack_require__(95); var Class = __webpack_require__(0); -var NumberTweenBuilder = __webpack_require__(503); +var NumberTweenBuilder = __webpack_require__(527); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(22); -var StaggerBuilder = __webpack_require__(504); -var TimelineBuilder = __webpack_require__(505); -var TWEEN_CONST = __webpack_require__(90); -var TweenBuilder = __webpack_require__(152); +var SceneEvents = __webpack_require__(20); +var StaggerBuilder = __webpack_require__(528); +var TimelineBuilder = __webpack_require__(529); +var TWEEN_CONST = __webpack_require__(91); +var TweenBuilder = __webpack_require__(155); /** * @classdesc @@ -183027,7 +184687,7 @@ module.exports = TweenManager; /***/ }), -/* 1390 */ +/* 1387 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183042,16 +184702,17 @@ module.exports = TweenManager; module.exports = { - Array: __webpack_require__(189), - Base64: __webpack_require__(1391), - Objects: __webpack_require__(1393), - String: __webpack_require__(1397) + Array: __webpack_require__(192), + Base64: __webpack_require__(1388), + Objects: __webpack_require__(1390), + String: __webpack_require__(1394), + NOOP: __webpack_require__(1) }; /***/ }), -/* 1391 */ +/* 1388 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183066,14 +184727,14 @@ module.exports = { module.exports = { - ArrayBufferToBase64: __webpack_require__(1392), - Base64ToArrayBuffer: __webpack_require__(388) + ArrayBufferToBase64: __webpack_require__(1389), + Base64ToArrayBuffer: __webpack_require__(399) }; /***/ }), -/* 1392 */ +/* 1389 */ /***/ (function(module, exports) { /** @@ -183131,7 +184792,7 @@ module.exports = ArrayBufferToBase64; /***/ }), -/* 1393 */ +/* 1390 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183146,26 +184807,26 @@ module.exports = ArrayBufferToBase64; module.exports = { - Clone: __webpack_require__(67), + Clone: __webpack_require__(69), Extend: __webpack_require__(19), GetAdvancedValue: __webpack_require__(15), GetFastValue: __webpack_require__(2), - GetMinMaxValue: __webpack_require__(1394), + GetMinMaxValue: __webpack_require__(1391), GetValue: __webpack_require__(6), - HasAll: __webpack_require__(1395), - HasAny: __webpack_require__(407), - HasValue: __webpack_require__(112), + HasAll: __webpack_require__(1392), + HasAny: __webpack_require__(421), + HasValue: __webpack_require__(113), IsPlainObject: __webpack_require__(7), - Merge: __webpack_require__(132), - MergeRight: __webpack_require__(1396), - Pick: __webpack_require__(489), - SetValue: __webpack_require__(427) + Merge: __webpack_require__(133), + MergeRight: __webpack_require__(1393), + Pick: __webpack_require__(513), + SetValue: __webpack_require__(444) }; /***/ }), -/* 1394 */ +/* 1391 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183204,7 +184865,7 @@ module.exports = GetMinMaxValue; /***/ }), -/* 1395 */ +/* 1392 */ /***/ (function(module, exports) { /** @@ -183241,7 +184902,7 @@ module.exports = HasAll; /***/ }), -/* 1396 */ +/* 1393 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183250,7 +184911,7 @@ module.exports = HasAll; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clone = __webpack_require__(67); +var Clone = __webpack_require__(69); /** * Creates a new Object using all values from obj1. @@ -183284,7 +184945,7 @@ module.exports = MergeRight; /***/ }), -/* 1397 */ +/* 1394 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183299,18 +184960,18 @@ module.exports = MergeRight; module.exports = { - Format: __webpack_require__(1398), - Pad: __webpack_require__(169), - RemoveAt: __webpack_require__(1399), - Reverse: __webpack_require__(1400), - UppercaseFirst: __webpack_require__(187), - UUID: __webpack_require__(202) + Format: __webpack_require__(1395), + Pad: __webpack_require__(171), + RemoveAt: __webpack_require__(1396), + Reverse: __webpack_require__(1397), + UppercaseFirst: __webpack_require__(189), + UUID: __webpack_require__(205) }; /***/ }), -/* 1398 */ +/* 1395 */ /***/ (function(module, exports) { /** @@ -183345,7 +185006,7 @@ module.exports = Format; /***/ }), -/* 1399 */ +/* 1396 */ /***/ (function(module, exports) { /** @@ -183381,7 +185042,7 @@ module.exports = RemoveAt; /***/ }), -/* 1400 */ +/* 1397 */ /***/ (function(module, exports) { /** @@ -183410,7 +185071,7 @@ module.exports = Reverse; /***/ }), -/* 1401 */ +/* 1398 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183426,26 +185087,29 @@ module.exports = Reverse; module.exports = { - SoundManagerCreator: __webpack_require__(380), + SoundManagerCreator: __webpack_require__(392), - Events: __webpack_require__(59), + Events: __webpack_require__(61), - BaseSound: __webpack_require__(134), - BaseSoundManager: __webpack_require__(133), + BaseSound: __webpack_require__(135), + BaseSoundManager: __webpack_require__(134), - WebAudioSound: __webpack_require__(389), - WebAudioSoundManager: __webpack_require__(387), + WebAudioSound: __webpack_require__(400), + WebAudioSoundManager: __webpack_require__(398), - HTML5AudioSound: __webpack_require__(384), - HTML5AudioSoundManager: __webpack_require__(381), + HTML5AudioSound: __webpack_require__(395), + HTML5AudioSoundManager: __webpack_require__(393), - NoAudioSound: __webpack_require__(386), - NoAudioSoundManager: __webpack_require__(385) + NoAudioSound: __webpack_require__(397), + NoAudioSoundManager: __webpack_require__(396) }; /***/ }), +/* 1399 */, +/* 1400 */, +/* 1401 */, /* 1402 */, /* 1403 */, /* 1404 */, @@ -183495,21 +185159,18 @@ module.exports = { /* 1448 */, /* 1449 */, /* 1450 */, -/* 1451 */, -/* 1452 */, -/* 1453 */, -/* 1454 */ +/* 1451 */ /***/ (function(module, exports, __webpack_require__) { -/* WEBPACK VAR INJECTION */(function(global) {/** +/** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -__webpack_require__(522); +__webpack_require__(544); -var CONST = __webpack_require__(33); +var CONST = __webpack_require__(34); var Extend = __webpack_require__(19); /** @@ -183518,44 +185179,44 @@ var Extend = __webpack_require__(19); /** * The root types namespace. - * + * * @namespace Phaser.Types * @since 3.17.0 */ var Phaser = { - Actions: __webpack_require__(245), - Animations: __webpack_require__(642), - Cache: __webpack_require__(643), - Cameras: __webpack_require__(646), - Core: __webpack_require__(732), + Actions: __webpack_require__(251), + Animations: __webpack_require__(648), + Cache: __webpack_require__(659), + Cameras: __webpack_require__(662), + Core: __webpack_require__(750), Class: __webpack_require__(0), - Create: __webpack_require__(797), - Curves: __webpack_require__(803), - Data: __webpack_require__(806), - Display: __webpack_require__(808), - DOM: __webpack_require__(826), - Events: __webpack_require__(827), - Game: __webpack_require__(829), - GameObjects: __webpack_require__(922), - Geom: __webpack_require__(430), - Input: __webpack_require__(1213), - Loader: __webpack_require__(1247), - Math: __webpack_require__(176), + Create: __webpack_require__(815), + Curves: __webpack_require__(821), + Data: __webpack_require__(823), + Display: __webpack_require__(825), + DOM: __webpack_require__(843), + Events: __webpack_require__(844), + Game: __webpack_require__(846), + GameObjects: __webpack_require__(936), + Geom: __webpack_require__(447), + Input: __webpack_require__(1220), + Loader: __webpack_require__(1253), + Math: __webpack_require__(178), Physics: { - Arcade: __webpack_require__(1273) + Arcade: __webpack_require__(1279) }, - Plugins: __webpack_require__(1316), - Scale: __webpack_require__(1318), - Scene: __webpack_require__(374), - Scenes: __webpack_require__(1319), - Structs: __webpack_require__(1321), - Textures: __webpack_require__(1322), - Tilemaps: __webpack_require__(1324), - Time: __webpack_require__(1370), - Tweens: __webpack_require__(1372), - Utils: __webpack_require__(1390) + Plugins: __webpack_require__(1313), + Scale: __webpack_require__(1315), + Scene: __webpack_require__(384), + Scenes: __webpack_require__(1316), + Structs: __webpack_require__(1318), + Textures: __webpack_require__(1319), + Tilemaps: __webpack_require__(1321), + Time: __webpack_require__(1367), + Tweens: __webpack_require__(1369), + Utils: __webpack_require__(1387) }; @@ -183565,22 +185226,19 @@ Phaser = Extend(false, Phaser, CONST); if (true) { - Phaser.Sound = __webpack_require__(1401); + Phaser.Sound = __webpack_require__(1398); } // Export it module.exports = Phaser; -global.Phaser = Phaser; - /* * "Documentation is like pizza: when it is good, it is very, very good; * and when it is bad, it is better than nothing." * -- Dick Brandon */ -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(521))) /***/ }) /******/ ]); diff --git a/dist/phaser-arcade-physics.min.js b/dist/phaser-arcade-physics.min.js index b108399d8..bffba9303 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()}(window,function(){return n={},s.m=i=[function(t,e){function r(t,e,i,n){for(var s in e)if(e.hasOwnProperty(s)){var r=(u=e,l=s,f=d=void 0,f=(c=i)?u[l]:Object.getOwnPropertyDescriptor(u,l),!c&&f.value&&"object"==typeof f.value&&(f=f.value),!(!f||!((d=f).get&&"function"==typeof d.get||d.set&&"function"==typeof d.set))&&(void 0===f.enumerable&&(f.enumerable=!0),void 0===f.configurable&&(f.configurable=!0),f));if(!1!==r){if(o=(n||t).prototype,a=s,h=void 0,(h=Object.getOwnPropertyDescriptor(o,a))&&(h.value&&"object"==typeof h.value&&(h=h.value),!1===h.configurable)){if(p.ignoreFinals)continue;throw new Error("cannot override final property '"+s+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,s,r)}else t.prototype[s]=e[s]}var o,a,h,u,l,c,d,f}function o(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i=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=l},function(t,e){t.exports={getTintFromFloats:function(t,e,i,n){return((255&(255*n|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]},getComponentCount:function(t,e){for(var i=0,n=0;nr.width&&(i=Math.max(r.width-t,0)),e+n>r.height&&(n=Math.max(r.height-e,0));for(var u=[],l=e;lthis.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=u},function(t,e,i){var n=i(13);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e,i){t.exports={DESTROY:i(651),FADE_IN_COMPLETE:i(652),FADE_IN_START:i(653),FADE_OUT_COMPLETE:i(654),FADE_OUT_START:i(655),FLASH_COMPLETE:i(656),FLASH_START:i(657),PAN_COMPLETE:i(658),PAN_START:i(659),POST_RENDER:i(660),PRE_RENDER:i(661),ROTATE_COMPLETE:i(662),ROTATE_START:i(663),SHAKE_COMPLETE:i(664),SHAKE_START:i(665),ZOOM_COMPLETE:i(666),ZOOM_START:i(667)}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.fillColor,r=n||e.fillAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.fillStyle="rgba("+o+","+a+","+h+","+r+")"}},,function(t,e){t.exports=function(t,e){return t.y=e+t.height*t.originY,t}},function(t,e){t.exports=function(t,e){return t.x=e+t.width*t.originX,t}},function(t,e){t.exports=function(t,e){return t.x=e-t.width+t.width*t.originX,t}},function(t,e){t.exports=function(t,e){return t.y=e-t.height+t.height*t.originY,t}},function(t,e){t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},function(t,e){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)}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.strokeColor,r=n||e.strokeAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.strokeStyle="rgba("+o+","+a+","+h+","+r+")",t.lineWidth=e.lineWidth}},function(t,e){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}},function(t,e,i){var d=i(148),f=i(24);t.exports=function(t,e,i,n,s){for(var r,o,a,h,u=f(t,e,i,n,null,s),l=0;l=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}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e,i){t.exports={COMPLETE:i(899),DECODED:i(900),DECODED_ALL:i(901),DESTROY:i(902),DETUNE:i(903),GLOBAL_DETUNE:i(904),GLOBAL_MUTE:i(905),GLOBAL_RATE:i(906),GLOBAL_VOLUME:i(907),LOOP:i(908),LOOPED:i(909),MUTE:i(910),PAUSE_ALL:i(911),PAUSE:i(912),PLAY:i(913),RATE:i(914),RESUME_ALL:i(915),RESUME:i(916),SEEK:i(917),STOP_ALL:i(918),STOP:i(919),UNLOCKED:i(920),VOLUME:i(921)}},function(t,e,i){var n=i(0),h=i(18),u=i(21),s=i(8),l=i(2),c=i(6),d=i(7),r=new n({Extends:u,initialize:function(t,e,i,n,s){var r,o="json";d(e)&&(e=l(r=e,"key"),i=l(r,"url"),n=l(r,"xhrSettings"),o=l(r,"extension",o),s=l(r,"dataKey",s));var a={type:"json",cache:t.cacheManager.json,extension:o,responseType:"text",key:e,url:i,xhrSettings:n,config:s};u.call(this,t,a),d(i)&&(this.data=s?c(i,s):i,this.state=h.FILE_POPULATED)},onProcess:function(){var t,e;this.state!==h.FILE_POPULATED&&(this.state=h.FILE_PROCESSING,t=JSON.parse(this.xhrLoader.responseText),e=this.config,this.data="string"==typeof e?c(t,e,t):t),this.onProcessComplete()}});s.register("json",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&o=n.x&&n.x>=l&&s!==n.x&&T(ri.x||n.x===i.x&&function(t,e){return w(t.prev,t,e.prev)<0&&w(e.next,t,t.next)<0}(i,n)))&&(i=n,d=h)),n=n.next,n!==u;);return i}(t,e))&&(i=_(e,t),v(e,e.next),v(i,i.next))}}(u[s],i),i=v(i,i.next);return i}(t,e,d,i)),t.length>80*i){n=r=t[0],s=o=t[1];for(var p=i;pr.x?s.x>o.x?s.x:o.x:r.x>o.x?r.x:o.x,l=s.y>r.y?s.y>o.y?s.y:o.y:r.y>o.y?r.y:o.y,c=x(a,h,e,i,n),d=x(u,l,e,i,n),f=t.prevZ,p=t.nextZ;for(;f&&f.z>=c&&p&&p.z<=d;){if(f!==t.prev&&f!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,f.x,f.y)&&0<=w(f.prev,f,f.next))return!1;if(f=f.prevZ,p!==t.prev&&p!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&0<=w(p.prev,p,p.next))return!1;p=p.nextZ}for(;f&&f.z>=c;){if(f!==t.prev&&f!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,f.x,f.y)&&0<=w(f.prev,f,f.next))return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&0<=w(p.prev,p,p.next))return!1;p=p.nextZ}return!0}(t,n,s,r):function(t){var e=t.prev,i=t,n=t.next;if(0<=w(e,i,n))return!1;var s=t.next.next;for(;s!==t.prev;){if(T(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&0<=w(s.prev,s,s.next))return!1;s=s.next}return!0}(t))e.push(a.i/i),e.push(t.i/i),e.push(h.i/i),d(t),t=h.next,u=h.next;else if((t=h)===u){o?1===o?m(t=function(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!l(s,r)&&c(s,n,n.next,r)&&E(s,r)&&E(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),d(n),d(n.next),n=t=r),n=n.next}while(n!==t);return v(n)}(v(t),e,i),e,i,n,s,r,2):2===o&&function(t,e,i,n,s,r){var o=t;do{for(var a=o.next.next;a!==o.prev;){if(o.i!==a.i&&function(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&&c(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&(E(t,e)&&E(e,t)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;for(;i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next,i!==t;);return n}(t,e)&&(w(t.prev,t,e.prev)||w(t,e.prev,e))||l(t,e)&&0=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function u(t){return 0=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=l},function(t,e,i){var n=i(0),s=i(18),c=i(21),r=i(8),d=i(2),f=i(7),o=new n({Extends:c,initialize:function t(e,i,n,s,r){var o,a,h="png";f(i)&&(i=d(a=i,"key"),n=d(a,"url"),o=d(a,"normalMap"),s=d(a,"xhrSettings"),h=d(a,"extension",h),r=d(a,"frameConfig")),Array.isArray(n)&&(o=n[1],n=n[0]);var u,l={type:"image",cache:e.textureManager,extension:h,responseType:"blob",key:i,url:n,xhrSettings:s,config:r};c.call(this,e,l),o&&((u=new t(e,this.key,o,s,r)).type="normalMap",this.setLink(u),e.addFile(u))},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){c.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){c.revokeObjectURL(t.data),t.onProcessError()},c.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var t,e=this.linkFile;e&&e.state===s.FILE_COMPLETE?(t="image"===this.type?this.cache.addImage(this.key,this.data,e.data):this.cache.addImage(e.key,e.data,this.data),this.pendingDestroy(t),e.pendingDestroy(t)):e||(t=this.cache.addImage(this.key,this.data),this.pendingDestroy(t))}});r.register("image",function(t,e,i){if(Array.isArray(t))for(var n=0;nthis.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=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.tileToWorldX(this.x,t):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.tileToWorldY(this.y,t)-(this.height-this.baseHeight)*e.scaleY:this.y*this.baseHeight-(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 r),e.x=this.getLeft(),e.y=this.getTop(),e.width=this.getRight()-e.x,e.height=this.getBottom()-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},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=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){return 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),this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){return void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===s&&(s=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,s&&this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y),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,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight,this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||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=o},function(t,e,i){var n=i(0),r=i(12),o=i(14),s=i(976),a=new n({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,s],initialize:function(t,e,i,n,s){o.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new r.Animation(this),this.setTexture(n,s),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()},preUpdate:function(t,e){this.anims.update(t,e)},play:function(t,e,i){return this.anims.play(t,e,i),this},toJSON:function(){return r.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=a},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e,i){var n=new(i(0))({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},clone:function(){return new n(this.x,this.y,this.z)},crossVectors:function(t,e){var i=t.x,n=t.y,s=t.z,r=e.x,o=e.y,a=e.z;return this.x=n*a-s*o,this.y=s*r-i*a,this.z=i*o-n*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},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||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,n=t.z-this.z||0;return Math.sqrt(e*e+i*i+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return e*e+i*i+n*n},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,n=t*t+e*e+i*i;return 0=t.length)){for(var i=t.length-1,n=t[e],s=e;sh||a.y>u)?(l=Math.max(a.x,e),c=Math.max(a.y,i),E=d=Math.min(a.r,h)-l,_=f=Math.min(a.b,u)-c,T=r?p+(v-(l-a.x)-d):p+(l-a.x),w=o?g+(m-(c-a.y)-f):g+(c-a.y),e=l,i=c,n=d,s=f):_=E=w=T=0):(r&&(T=p+(v-e-n)),o&&(w=g+(m-i-s)));var A=this.source.width,S=this.source.height;return t.u0=Math.max(0,T/A),t.v0=Math.max(0,w/S),t.u1=Math.min(1,(T+E)/A),t.v1=Math.min(1,(w+_)/S),t.x=e,t.y=i,t.cx=T,t.cy=w,t.cw=E,t.ch=_,t.width=n,t.height=s,t.flipX=r,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,n,s,r){var o=this.data.drawImage;return o.width=t,o.height=e,this.u0=i,this.v0=n,this.u1=s,this.v1=r,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.width=i,s.height=n;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+n)/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 r(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=s(!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=r},function(t,e,i){var n=i(0),s=i(97),r=i(398),o=i(399),a=i(48),h=i(163),u=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=a.ELLIPSE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(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,n){return this.x=t,this.y=e,this.width=i,this.height=n,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=u},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){var B=i(245),n=i(0),r=i(91),Y=i(2),N=i(6),s=i(7),X=i(392),o=i(139),a=i(75),h=new n({initialize:function(t,e,i){i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?s(e[0])&&(i=e,e=null):s(e)&&(i=e,e=null),this.scene=t,this.children=new o,this.isParent=!0,this.type="Group",this.classType=Y(i,"classType",a),this.name=Y(i,"name",""),this.active=Y(i,"active",!0),this.maxSize=Y(i,"maxSize",-1),this.defaultKey=Y(i,"defaultKey",null),this.defaultFrame=Y(i,"defaultFrame",null),this.runChildUpdate=Y(i,"runChildUpdate",!1),this.createCallback=Y(i,"createCallback",null),this.removeCallback=Y(i,"removeCallback",null),this.createMultipleCallback=Y(i,"createMultipleCallback",null),this.internalCreateCallback=Y(i,"internalCreateCallback",null),this.internalRemoveCallback=Y(i,"internalRemoveCallback",null),e&&this.addMultiple(e),i&&this.createMultiple(i)},create:function(t,e,i,n,s,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),void 0===r&&(r=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(o),o.preUpdate&&this.scene.sys.updateList.add(o),o.visible=s,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=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;i=this.firstgid&&t=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this.resolution=i,this},bind:function(){var t=this.vertexBuffer,e=this.program,i=this.renderer;return i.setProgram(e),i.setVertexBuffer(t),this.setAttribPointers(),this},setAttribPointers:function(){for(var t=this.gl,e=this.attributes,i=this.vertexSize,n=0;nthis.vertexCapacity&&this.flush();var Y=this.setGameObject(t),N=t._isTinted&&t.tintFill;this.batchQuad(S,C,M,O,R,P,L,F,u,l,c,d,D,k,I,B,N,h,Y)},batchQuad:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g,v,m,y){void 0===y&&(y=this.currentUnit);var x=!1;this.vertexCount+6>this.vertexCapacity&&(this.flush(),x=!0,y=this.setTexture2D(m));var T=this.vertexViewF32,w=this.vertexViewU32,E=this.vertexCount*this.vertexComponentCount-1;return T[++E]=t,T[++E]=e,T[++E]=h,T[++E]=u,T[++E]=y,T[++E]=v,w[++E]=d,T[++E]=i,T[++E]=n,T[++E]=h,T[++E]=c,T[++E]=y,T[++E]=v,w[++E]=p,T[++E]=s,T[++E]=r,T[++E]=l,T[++E]=c,T[++E]=y,T[++E]=v,w[++E]=g,T[++E]=t,T[++E]=e,T[++E]=h,T[++E]=u,T[++E]=y,T[++E]=v,w[++E]=d,T[++E]=s,T[++E]=r,T[++E]=l,T[++E]=c,T[++E]=y,T[++E]=v,w[++E]=g,T[++E]=o,T[++E]=a,T[++E]=l,T[++E]=u,T[++E]=y,T[++E]=v,w[++E]=f,this.vertexCount+=6,x},batchTri:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g){void 0===g&&(g=this.currentUnit);var v=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),v=!0,g=this.setTexture2D(p));var m=this.vertexViewF32,y=this.vertexViewU32,x=this.vertexCount*this.vertexComponentCount-1;return m[++x]=t,m[++x]=e,m[++x]=o,m[++x]=a,m[++x]=g,m[++x]=f,y[++x]=l,m[++x]=i,m[++x]=n,m[++x]=o,m[++x]=u,m[++x]=g,m[++x]=f,y[++x]=c,m[++x]=s,m[++x]=r,m[++x]=h,m[++x]=u,m[++x]=g,m[++x]=f,y[++x]=d,this.vertexCount+=3,v},batchTexture:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g,v,m,y,x,T,w,E,_,b,A,S,C,M,O,R,P){this.renderer.setPipeline(this,t);var L,F,D,k=this._tempMatrix1,I=this._tempMatrix2,B=this._tempMatrix3,Y=m/i+S,N=y/n+C,X=(m+x)/i+S,U=(y+T)/n+C,z=o,G=a,W=-g,V=-v;t.isCropped&&(z=(L=t._crop).width,G=L.height,o=L.width,a=L.height,F=m=L.x,D=y=L.y,c&&(F=x-L.x-L.width),d&&!e.isRenderTexture&&(D=T-L.y-L.height),Y=F/i+S,N=D/n+C,X=(F+L.width)/i+S,U=(D+L.height)/n+C,W=-g+m,V=-v+y),c&&(z*=-1,W+=o),(d^=!R&&e.isRenderTexture?1:0)&&(G*=-1,V+=a);var H=W+z,j=V+G;I.applyITRS(s,r,l,h,u),k.copyFrom(M.matrix),O?(k.multiplyWithOffset(O,-M.scrollX*f,-M.scrollY*p),I.e=s,I.f=r):(I.e-=M.scrollX*f,I.f-=M.scrollY*p),k.multiply(I,B);var K=B.getX(W,V),q=B.getY(W,V),Z=B.getX(W,j),J=B.getY(W,j),Q=B.getX(H,j),$=B.getY(H,j),tt=B.getX(H,V),et=B.getY(H,V);M.roundPixels&&(K=Math.round(K),q=Math.round(q),Z=Math.round(Z),J=Math.round(J),Q=Math.round(Q),$=Math.round($),tt=Math.round(tt),et=Math.round(et)),void 0===P&&(P=this.renderer.setTexture2D(e)),this.batchQuad(K,q,Z,J,Q,$,tt,et,Y,N,X,U,w,E,_,b,A,e,P)},batchTextureFrame:function(t,e,i,n,s,r,o){this.renderer.setPipeline(this);var a=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2,u=e+t.width,l=i+t.height;o?a.multiply(o,h):h=a;var c=h.getX(e,i),d=h.getY(e,i),f=h.getX(e,l),p=h.getY(e,l),g=h.getX(u,l),v=h.getY(u,l),m=h.getX(u,i),y=h.getY(u,i),x=this.renderer.setTextureSource(t.source);n=X.getTintAppendFloatAlpha(n,s),this.batchQuad(c,d,f,p,g,v,m,y,t.u0,t.v0,t.u1,t.v1,n,n,n,n,0,t.glTexture,x)},drawFillRect:function(t,e,i,n,s,r){t=Math.floor(t),e=Math.floor(e);var o=Math.floor(t+i),a=Math.floor(e+n),h=this.renderer.blankTexture.glTexture,u=this.renderer.setTexture2D(h),l=X.getTintAppendFloatAlphaAndSwap(s,r);this.batchQuad(t,e,t,a,o,a,o,e,0,0,1,1,l,l,l,l,2,h,u)},batchFillRect:function(t,e,i,n,s,r){this.renderer.setPipeline(this);var o=this._tempMatrix3;r&&r.multiply(s,o);var a=t+i,h=e+n,u=o.getX(t,e),l=o.getY(t,e),c=o.getX(t,h),d=o.getY(t,h),f=o.getX(a,h),p=o.getY(a,h),g=o.getX(a,e),v=o.getY(a,e),m=this.currentFrame,y=m.u0,x=m.v0,T=m.u1,w=m.v1,E=this.fillTint;this.batchQuad(u,l,c,d,f,p,g,v,y,x,T,w,E.TL,E.TR,E.BL,E.BR,this.tintEffect)},batchFillTriangle:function(t,e,i,n,s,r,o,a){this.renderer.setPipeline(this);var h=this._tempMatrix3;a&&a.multiply(o,h);var u=h.getX(t,e),l=h.getY(t,e),c=h.getX(i,n),d=h.getY(i,n),f=h.getX(s,r),p=h.getY(s,r),g=this.currentFrame,v=g.u0,m=g.v0,y=g.u1,x=g.v1;this.batchTri(u,l,c,d,f,p,v,m,y,x,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.tintEffect)},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h){var u=this.tempTriangle;u[0].x=t,u[0].y=e,u[0].width=o,u[1].x=i,u[1].y=n,u[1].width=o,u[2].x=s,u[2].y=r,u[2].width=o,u[3].x=t,u[3].y=e,u[3].width=o,this.batchStrokePath(u,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.setPipeline(this);var n=this._tempMatrix3;i&&i.multiply(e,n);for(var s,r,o=t.length,a=this.polygonCache,h=this.fillTint.TL,u=this.fillTint.TR,l=this.fillTint.BL,c=this.tintEffect,d=0;d>16)+(65280&t)+((255&t)<<16)}},function(t,e,i){var n=i(0),a=i(288),s=new n({initialize:function(t,e){this.parent=t,(this.events=e)||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once("destroy",this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],n=0;ne.right||t.y>e.bottom)}},function(t,e,i){var u=i(6),l={},n={register:function(t,e,i,n,s){l[t]={plugin:e,mapping:i,settingsKey:n,configKey:s}},getPlugin:function(t){return l[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,n=e.game.config;for(var s in l){var r=l[s].plugin,o=l[s].mapping,a=l[s].settingsKey,h=l[s].configKey;u(i,a,n[h])&&(t[o]=new r(t))}},remove:function(t){l.hasOwnProperty(t)&&delete l[t]}};t.exports=n},function(t,e,i){t.exports={ANY_KEY_DOWN:i(1229),ANY_KEY_UP:i(1230),COMBO_MATCH:i(1231),DOWN:i(1232),KEY_DOWN:i(1233),KEY_UP:i(1234),UP:i(1235)}},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),void 0===r&&(r=!1),{responseType:t,async:e,user:i,password:n,timeout:s,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:r}}},function(t,e,i){var n=i(0),s=i(223),r=i(75),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s),this.body=null}});t.exports=o},function(t,e,i){t.exports={CalculateFacesAt:i(226),CalculateFacesWithin:i(52),Copy:i(1325),CreateFromTiles:i(1326),CullTiles:i(1327),Fill:i(1328),FilterTiles:i(1329),FindByIndex:i(1330),FindTile:i(1331),ForEachTile:i(1332),GetTileAt:i(148),GetTileAtWorldXY:i(1333),GetTilesWithin:i(24),GetTilesWithinShape:i(1334),GetTilesWithinWorldXY:i(1335),HasTileAt:i(479),HasTileAtWorldXY:i(1336),IsInLayerBounds:i(102),PutTileAt:i(227),PutTileAtWorldXY:i(1337),PutTilesAt:i(1338),Randomize:i(1339),RemoveTileAt:i(480),RemoveTileAtWorldXY:i(1340),RenderDebug:i(1341),ReplaceByIndex:i(478),SetCollision:i(1342),SetCollisionBetween:i(1343),SetCollisionByExclusion:i(1344),SetCollisionByProperty:i(1345),SetCollisionFromCollisionGroup:i(1346),SetTileIndexCallback:i(1347),SetTileLocationCallback:i(1348),Shuffle:i(1349),SwapByIndex:i(1350),TileToWorldX:i(149),TileToWorldXY:i(1351),TileToWorldY:i(150),WeightedRandomize:i(1352),WorldToTileX:i(63),WorldToTileXY:i(1353),WorldToTileY:i(64)}},function(t,e,i){var r=i(102);t.exports=function(t,e,i,n){if(void 0===i&&(i=!1),r(t,e,n)){var s=n.data[e][t]||null;return null!==s&&(-1!==s.index||i)?s:null}return null}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),n*=s.scaleX),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*n}},function(t,e){t.exports=function(o,a,t){return o.hasOwnProperty(a)?"function"==typeof o[a]?function(t,e,i,n,s,r){return o[a](t,e,i,n,s,r)}:function(){return o[a]}:"function"==typeof t?t:function(){return t}}},function(t,e,i){var P=i(236),L=i(15),F=i(89),D=i(69),k=i(151),I=i(501),B=i(234),Y=i(6),N=i(235),X=i(237),U=i(239);t.exports=function(t,e,i){void 0===i&&(i=P);for(var n=i.targets?i.targets:B(e),s=I(e),r=k(e,"delay",i.delay),o=k(e,"duration",i.duration),a=Y(e,"easeParams",i.easeParams),h=D(Y(e,"ease",i.ease),a),u=k(e,"hold",i.hold),l=k(e,"repeat",i.repeat),c=k(e,"repeatDelay",i.repeatDelay),d=F(e,"yoyo",i.yoyo),f=F(e,"flipX",i.flipX),p=F(e,"flipY",i.flipY),g=[],v=0;v=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo);var i=this.frames[e];0!==e||t.forward||(i=this.getLastFrame()),t.updateFrame(i)},getFrameByProgress:function(t){return t=n(t,0,1),a(t,this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t._yoyo?this.handleYoyoFrame(t,!1):0=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2);t=new Array(1+(s-r)).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){var n=i(298),s=i(301),r=i(303),o=i(304);t.exports=function(t){switch(typeof t){case"string":return("rgb"===t.substr(0,3).toLowerCase()?o:n)(t);case"number":return s(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){var f=i(171);t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1);var s=Math.floor(6*t),r=6*t-s,o=Math.floor(i*(1-e)*255),a=Math.floor(i*(1-r*e)*255),h=Math.floor(i*(1-(1-r)*e)*255),u=i=Math.floor(i*=255),l=i,c=i,d=s%6;return 0==d?(l=h,c=o):1==d?(u=a,c=o):2==d?(u=o,c=h):3==d?(u=o,l=a):4==d?(u=h,l=o):5==d&&(l=o,c=a),n?n.setTo?n.setTo(u,l,c,n.alpha,!1):(n.r=u,n.g=l,n.b=c,n.color=f(u,l,c),n):{r:u,g:l,b:c,color:f(u,l,c)}}},function(t,e){var i="";function n(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;is.width&&(t=s.width-r.cutX),r.cutY+e>s.height&&(e=s.height-r.cutY),r.setSize(t,e,r.cutX,r.cutY)),this.updateDisplayOrigin();var a=this.input;return a&&!a.customHitArea&&(a.hitArea.width=t,a.hitArea.height=e),this},setGlobalTint:function(t){return this.globalTint=t,this},setGlobalAlpha:function(t){return this.globalAlpha=t,this},saveTexture:function(t){return this.textureManager.renameTexture(this.texture.key,t),this._saved=!0,this.texture},fill:function(t,e,i,n,s,r){var o=this.gl,a=this.frame,h=this.texture,u=this.camera,l=this.renderer;void 0===e&&(e=1),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=a.cutWidth),void 0===r&&(r=a.cutHeight);var c,d,f,p,g,v,m,y,x,T,w=255&(t>>16|0),E=255&(t>>8|0),_=255&(0|t);return u.preRender(1,1),o?(c=u._cx,d=u._cy,f=u._cw,p=u._ch,l.resetTextures(!0),l.pushScissor(c,d,f,-p),l.setFramebuffer(this.framebuffer,!1),g=this.pipeline,v=h.width,m=h.height,y=g.width/v,x=g.height/m,g.drawFillRect(i*y,(m-r-n)*x,s*y,r*x,b.getTintFromFloats(w/255,E/255,_/255,1),e),g.flush(),l.setFramebuffer(null,!1),l.popScissor()):(T=this.context,l.setContext(T),T.fillStyle="rgba("+w+","+E+","+_+","+e+")",T.fillRect(i+a.cutX,n+a.cutY,s,r),l.setContext()),this.dirty=!0,this},clear:function(){var t,e,i;return this.dirty&&((t=this.gl)?((e=this.renderer).setFramebuffer(this.framebuffer,!0),this.frame.cutWidth===this.canvas.width&&this.frame.cutHeight===this.canvas.height||t.scissor(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),e.setFramebuffer(null,!0)):((i=this.context).save(),i.setTransform(1,0,0,1,0,0),i.clearRect(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),i.restore()),this.dirty=!1),this},erase:function(t,e,i){this._eraseMode=!0;var n=this.renderer.currentBlendMode;return this.renderer.setBlendMode(o.ERASE),this.draw(t,e,i,1,16777215),this.renderer.setBlendMode(n),this._eraseMode=!1,this},draw:function(t,e,i,n,s){void 0===n&&(n=this.globalAlpha),s=void 0===s?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(s>>16)+(65280&s)+((255&s)<<16),Array.isArray(t)||(t=[t]);var r,o,a,h,u,l=this.gl,c=this.camera,d=this.renderer;return c.preRender(1,1),l?(r=c._cx,o=c._cy,a=c._cw,h=c._ch,d.resetTextures(!0),d.setFramebuffer(this.framebuffer,!1),d.pushScissor(r,o,a,h,h),u=this.pipeline,g(u,0,this.texture.width,0,this.texture.height,-1e3,1e3),this.batchList(t,e,i,n,s),d.setFramebuffer(null,!0),d.resetTextures(!0),g(u,0,u.width,u.height,0,-1e3,1e3)):(d.setContext(this.context),this.batchList(t,e,i,n,s),d.setContext()),this.dirty=!0,this},drawFrame:function(t,e,i,n,s,r){void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.globalAlpha),r=void 0===r?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(r>>16)+(65280&r)+((255&r)<<16);var o,a,h,u,l,c=this.gl,d=this.camera,f=this.renderer,p=this.textureManager.getFrame(t,e);return p&&(d.preRender(1,1),c?(o=d._cx,a=d._cy,h=d._cw,u=d._ch,f.resetTextures(!0),f.setFramebuffer(this.framebuffer,!1),f.pushScissor(o,a,h,u,u),l=this.pipeline,g(l,0,this.texture.width,0,this.texture.height,-1e3,1e3),l.batchTextureFrame(p,i+this.frame.cutX,n+this.frame.cutY,r,s,d.matrix,null),l.flush(),f.setFramebuffer(null,!1),f.popScissor(),g(l,0,l.width,l.height,0,-1e3,1e3)):this.batchTextureFrame(p,i+this.frame.cutX,n+this.frame.cutY,s,r),this.dirty=!0),this},batchList:function(t,e,i,n,s){for(var r=0;rs&&(r=t[s]),n[s]=r,t.length>s+1&&(r=t[s+1]),n[s+1]=r;return this},setColors:function(t){var e=this.points.length;if(e<1)return this;var i=this.colors;void 0===t?t=[16777215]:Array.isArray(t)||(t=[t]);var n=0;if(t.length===e)for(r=0;rn&&(s=t[n]),i[n]=s,t.length>n+1&&(s=t[n+1]),i[n+1]=s;return this},setPoints:function(t,e,i){if(void 0===t&&(t=2),"number"==typeof t){var n,s,r,o=t;if(o<2&&(o=2),t=[],this.horizontal)for(r=-this.frame.halfWidth,s=this.frame.width/(o-1),n=0;n=this._markerOut&&(e.loop?(e.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=t,this.emit(o.VIDEO_LOOP,this)):(this.emit(o.VIDEO_COMPLETE,this),this.stop())))},checkVideoProgress:function(){2<=this.video.readyState?this.updateTexture():(this.retry--,0t&&(t=s.totalDuration),s.delaye.length&&(r=e.length),i?(n=e[r-1][i],(s=e[r][i])-t<=t-n?e[r]:e[r-1]):(n=e[r-1],(s=e[r])-t<=t-n?s:n)}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=n,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0}});t.exports=n},function(t,e,i){var n=i(53),s={_blendMode:n.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=n[t]),-1<=(t|=0)&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e,i){var o=i(157),a=i(116);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&0=t.right&&(o=1,r+=s-t.right,s=t.right);break;case 1:(r+=e)>=t.bottom&&(o=2,s-=r-t.bottom,r=t.bottom);break;case 2:(s-=e)<=t.left&&(o=3,r-=t.left-s,s=t.left);break;case 3:(r-=e)<=t.top&&(o=0,r=t.top)}return n}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;nd.right&&(f=T(f,f+(e-d.right),this.lerp.x)),id.bottom&&(p=T(p,p+(i-d.bottom),this.lerp.y))):(f=T(f,e-u,this.lerp.x),p=T(p,i-l,this.lerp.y))),this.useBounds&&(f=this.clampX(f),p=this.clampY(p)),this.roundPixels&&(u=Math.round(u),l=Math.round(l));var g=(this.scrollX=f)+r,v=(this.scrollY=p)+o;this.midPoint.set(g,v);var m=n/a,y=s/a;this.worldView.setTo(g-m/2,v-y/2,m,y),h.applyITRS(this.x+u,this.y+l,this.rotation,a,a),h.translate(-u,-l),this.shakeEffect.preRender()},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,n,s,r){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===n&&(n=i),void 0===s&&(s=0),void 0===r&&(r=s),this._follow=t,this.roundPixels=e,i=l(i,0,1),n=l(n,0,1),this.lerp.set(i,n),this.followOffset.set(s,r);var o=this.width/2,a=this.height/2,h=t.x-s,u=t.y-r;return this.midPoint.set(h,u),this.scrollX=h-o,this.scrollY=u-a,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.clearRenderToTexture(),this.resetFX(),s.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=c},function(t,e,i){var o=i(31);t.exports=function(t){var e=new o;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,n){return e+e+i+i+n+n});var i,n,s,r=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return r&&(i=parseInt(r[1],16),n=parseInt(r[2],16),s=parseInt(r[3],16),e.setTo(i,n,s)),e}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},function(t,e){t.exports=function(t,e,i,n){void 0===n&&(n={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var s=Math.min(t,e,i),r=Math.max(t,e,i),o=r-s,a=0,h=0===r?0:o/r,u=r;return r!==s&&(r===t?a=(e-i)/o+(e>>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}}},function(t,e,i){var n=i(31);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var a=i(31);t.exports=function(t){var e,i,n,s,r=new a,o=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());return o&&(e=parseInt(o[1],10),i=parseInt(o[2],10),n=parseInt(o[3],10),s=void 0!==o[4]?parseFloat(o[4]):1,r.setTo(e,i,n,255*s)),r}},function(t,e,i){t.exports={Fade:i(668),Flash:i(669),Pan:i(670),Shake:i(703),RotateTo:i(704),Zoom:i(705)}},function(t,e,i){t.exports={In:i(671),Out:i(672),InOut:i(673)}},function(t,e,i){t.exports={In:i(674),Out:i(675),InOut:i(676)}},function(t,e,i){t.exports={In:i(677),Out:i(678),InOut:i(679)}},function(t,e,i){t.exports={In:i(680),Out:i(681),InOut:i(682)}},function(t,e,i){t.exports={In:i(683),Out:i(684),InOut:i(685)}},function(t,e,i){t.exports={In:i(686),Out:i(687),InOut:i(688)}},function(t,e,i){t.exports=i(689)},function(t,e,i){t.exports={In:i(690),Out:i(691),InOut:i(692)}},function(t,e,i){t.exports={In:i(693),Out:i(694),InOut:i(695)}},function(t,e,i){t.exports={In:i(696),Out:i(697),InOut:i(698)}},function(t,e,i){t.exports={In:i(699),Out:i(700),InOut:i(701)}},function(t,e,i){t.exports=i(702)},function(t,e,i){var n=i(0),a=i(33),h=i(319),u=i(2),l=i(6),c=i(7),d=i(176),f=i(1),p=i(180),g=i(170),s=new n({initialize:function(t){void 0===t&&(t={});this.width=l(t,"width",1024),this.height=l(t,"height",768),this.zoom=l(t,"zoom",1),this.resolution=l(t,"resolution",1),this.parent=l(t,"parent",void 0),this.scaleMode=l(t,"scaleMode",0),this.expandParent=l(t,"expandParent",!0),this.autoRound=l(t,"autoRound",!1),this.autoCenter=l(t,"autoCenter",0),this.resizeInterval=l(t,"resizeInterval",500),this.fullscreenTarget=l(t,"fullscreenTarget",null),this.minWidth=l(t,"minWidth",0),this.maxWidth=l(t,"maxWidth",0),this.minHeight=l(t,"minHeight",0),this.maxHeight=l(t,"maxHeight",0);var e=l(t,"scale",null);e&&(this.width=l(e,"width",this.width),this.height=l(e,"height",this.height),this.zoom=l(e,"zoom",this.zoom),this.resolution=l(e,"resolution",this.resolution),this.parent=l(e,"parent",this.parent),this.scaleMode=l(e,"mode",this.scaleMode),this.expandParent=l(e,"expandParent",this.expandParent),this.autoRound=l(e,"autoRound",this.autoRound),this.autoCenter=l(e,"autoCenter",this.autoCenter),this.resizeInterval=l(e,"resizeInterval",this.resizeInterval),this.fullscreenTarget=l(e,"fullscreenTarget",this.fullscreenTarget),this.minWidth=l(e,"min.width",this.minWidth),this.maxWidth=l(e,"max.width",this.maxWidth),this.minHeight=l(e,"min.height",this.minHeight),this.maxHeight=l(e,"max.height",this.maxHeight)),this.renderType=l(t,"type",a.AUTO),this.canvas=l(t,"canvas",null),this.context=l(t,"context",null),this.canvasStyle=l(t,"canvasStyle",null),this.customEnvironment=l(t,"customEnvironment",!1),this.sceneConfig=l(t,"scene",null),this.seed=l(t,"seed",[(Date.now()*Math.random()).toString()]),d.RND=new d.RandomDataGenerator(this.seed),this.gameTitle=l(t,"title",""),this.gameURL=l(t,"url","https://phaser.io"),this.gameVersion=l(t,"version",""),this.autoFocus=l(t,"autoFocus",!0),this.domCreateContainer=l(t,"dom.createContainer",!1),this.domBehindCanvas=l(t,"dom.behindCanvas",!1),this.inputKeyboard=l(t,"input.keyboard",!0),this.inputKeyboardEventTarget=l(t,"input.keyboard.target",window),this.inputKeyboardCapture=l(t,"input.keyboard.capture",[]),this.inputMouse=l(t,"input.mouse",!0),this.inputMouseEventTarget=l(t,"input.mouse.target",null),this.inputMouseCapture=l(t,"input.mouse.capture",!0),this.inputTouch=l(t,"input.touch",h.input.touch),this.inputTouchEventTarget=l(t,"input.touch.target",null),this.inputTouchCapture=l(t,"input.touch.capture",!0),this.inputActivePointers=l(t,"input.activePointers",1),this.inputSmoothFactor=l(t,"input.smoothFactor",0),this.inputWindowEvents=l(t,"input.windowEvents",!0),this.inputGamepad=l(t,"input.gamepad",!1),this.inputGamepadEventTarget=l(t,"input.gamepad.target",window),this.disableContextMenu=l(t,"disableContextMenu",!1),this.audio=l(t,"audio"),this.hideBanner=!1===l(t,"banner",null),this.hidePhaser=l(t,"banner.hidePhaser",!1),this.bannerTextColor=l(t,"banner.text","#ffffff"),this.bannerBackgroundColor=l(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=l(t,"fps",null);var i=l(t,"render",t);this.antialias=l(i,"antialias",!0),this.antialiasGL=l(i,"antialiasGL",!0),this.mipmapFilter=l(i,"mipmapFilter","LINEAR"),this.desynchronized=l(i,"desynchronized",!1),this.roundPixels=l(i,"roundPixels",!1),this.pixelArt=l(i,"pixelArt",1!==this.zoom),this.pixelArt&&(this.antialias=!1,this.roundPixels=!0),this.transparent=l(i,"transparent",!1),this.clearBeforeRender=l(i,"clearBeforeRender",!0),this.premultipliedAlpha=l(i,"premultipliedAlpha",!0),this.failIfMajorPerformanceCaveat=l(i,"failIfMajorPerformanceCaveat",!1),this.powerPreference=l(i,"powerPreference","default"),this.batchSize=l(i,"batchSize",4096),this.maxTextures=l(i,"maxTextures",-1),this.maxLights=l(i,"maxLights",10);var n=l(t,"backgroundColor",0);this.backgroundColor=g(n),0===n&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=l(t,"callbacks.preBoot",f),this.postBoot=l(t,"callbacks.postBoot",f),this.physics=l(t,"physics",{}),this.defaultPhysicsSystem=l(this.physics,"default",!1),this.loaderBaseURL=l(t,"loader.baseURL",""),this.loaderPath=l(t,"loader.path",""),this.loaderMaxParallelDownloads=l(t,"loader.maxParallelDownloads",32),this.loaderCrossOrigin=l(t,"loader.crossOrigin",void 0),this.loaderResponseType=l(t,"loader.responseType",""),this.loaderAsync=l(t,"loader.async",!0),this.loaderUser=l(t,"loader.user",""),this.loaderPassword=l(t,"loader.password",""),this.loaderTimeout=l(t,"loader.timeout",0),this.loaderWithCredentials=l(t,"loader.withCredentials",!1),this.installGlobalPlugins=[],this.installScenePlugins=[];var s=l(t,"plugins",null),r=p.DefaultScene;s&&(Array.isArray(s)?this.defaultPlugins=s:c(s)&&(this.installGlobalPlugins=u(s,"global",[]),this.installScenePlugins=u(s,"scene",[]),Array.isArray(s.default)?r=s.default:Array.isArray(s.defaultMerge)&&(r=r.concat(s.defaultMerge)))),this.defaultPlugins=r;var o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=l(t,"images.default",o+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=l(t,"images.missing",o+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),window&&(window.FORCE_WEBGL?this.renderType=a.WEBGL:window.FORCE_CANVAS&&(this.renderType=a.CANVAS))}});t.exports=s},function(t,e,i){t.exports={os:i(122),browser:i(123),features:i(175),input:i(734),audio:i(735),video:i(736),fullscreen:i(737),canvasFeatures:i(320)}},function(t,e,i){var n,s,r,o=i(26),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var i=new Image;i.onload=function(){var t=o.create(i,6,1).getContext("2d");if(t.globalCompositeOperation="multiply",t.drawImage(r,0,0),t.drawImage(i,2,0),!t.getImageData(2,0,1,1))return!1;var e=t.getImageData(2,0,1,1).data;o.remove(i),a.supportNewBlendModes=255===e[0]&&0===e[1]&&0===e[2]},i.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");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);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},function(t,e){t.exports=function(t){return 0<=(t%=2*Math.PI)?t:t+2*Math.PI}},function(t,e){t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return s*s+r*r}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),e-ir[0]&&(e=1),r[8]>r[3*e+e]&&(e=2),i=a[e],n=a[i],s=Math.sqrt(r[3*e+e]-r[3*i+i]-r[3*n+n]+1),h[e]=.5*s,s=.5/s,h[i]=(r[3*i+e]+r[3*e+i])*s,h[n]=(r[3*n+e]+r[3*e+n])*s,this.x=h[0],this.y=h[1],this.z=h[2],this.w=(r[3*n+i]-r[3*i+n])*s),this}});t.exports=d},function(t,e,a){var h=a(341),u=a(26),l=a(33),c=a(175);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===l.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==l.HEADLESS)if(e.renderType===l.CANVAS||e.renderType!==l.CANVAS&&!c.webGL){if(!c.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");e.renderType=l.CANVAS}else e.renderType=l.WEBGL;e.antialias||u.disableSmoothing();var i,n,s=t.scale.baseSize,r=s.width,o=s.height;e.canvas?(t.canvas=e.canvas,t.canvas.width=r,t.canvas.height=o):t.canvas=u.create(t,r,o,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||h.setCrisp(t.canvas),e.renderType!==l.HEADLESS&&(i=a(508),n=a(511),e.renderType===l.WEBGL?t.renderer=new n(t):(t.renderer=new i(t),t.context=t.renderer.gameContext))}},function(t,e){t.exports={setCrisp:function(e){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach(function(t){e.style["image-rendering"]=t}),e.style.msInterpolationMode="nearest-neighbor",e},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},function(t,e,i){var u=i(33);t.exports=function(t){var e,i,n,s,r,o,a,h=t.config;h.hideBanner||(e="WebGL",h.renderType===u.CANVAS?e="Canvas":h.renderType===u.HEADLESS&&(e="Headless"),i=h.audio,a=!(n=t.device.audio).webAudio||i&&i.disableWebAudio?i&&i.noAudio||!n.webAudio&&!n.audioData?"No Audio":"HTML5 Audio":"Web Audio",t.device.browser.ie?window.console&&console.log("Phaser v"+u.VERSION+" / https://phaser.io"):(r=[s=""],Array.isArray(h.bannerBackgroundColor)?(h.bannerBackgroundColor.forEach(function(t){s=s.concat("%c "),r.push("background: "+t),o=t}),r[r.length-1]="color: "+h.bannerTextColor+"; background: "+o):(s=s.concat("%c "),r.push("color: "+h.bannerTextColor+"; background: "+h.bannerBackgroundColor)),r.push("background: #fff"),h.gameTitle&&(s=s.concat(h.gameTitle),h.gameVersion&&(s=s.concat(" v"+h.gameVersion)),h.hidePhaser||(s=s.concat(" / "))),h.hidePhaser||(s=s.concat("Phaser v"+u.VERSION+" ("+e+" | "+a+")")),s=s.concat(" %c "+h.gameURL),r[0]=s,console.log.apply(console,r)))}},function(t,e,i){var n=i(0),s=i(6),r=i(1),o=i(344),a=new n({initialize:function(t,e){this.game=t,this.raf=new o,this.started=!1,this.running=!1,this.minFps=s(e,"min",5),this.targetFps=s(e,"target",60),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=s(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=s(e,"deltaHistory",10),this.panicMax=s(e,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=s(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;for(var e=this.framesThisSecond=0;ethis._min&&(r=n[i],r=Math.min(r,this._min)),n[i]=r,this.deltaIndex++,this.deltaIndex>s&&(this.deltaIndex=0);for(var a=o=0;athis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var h=o/this._target;this.callback(t,o,h),this.lastTime=t,this.frame++},tick:function(){this.step()},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running||(t&&(this.startTime+=-this.lastTime+(this.lastTime+window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step())},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.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0,this.target=0;var n=this;this.step=function t(){var e=window.performance.now();n.lastTime=n.tick,n.tick=e,n.callback(e),n.timeOutID=window.requestAnimationFrame(t)},this.stepTimeout=function t(){var e=Date.now(),i=Math.min(Math.max(2*n.target+n.tick-e,0),n.target);n.lastTime=n.tick,n.tick=e,n.callback(e),n.timeOutID=window.setTimeout(t,i)}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.target=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=s}});t.exports=r},function(t,e,i){var n=i(20);t.exports=function(t){var e,i=t.events;void 0!==document.hidden?e="visibilitychange":["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(n.HIDDEN):i.emit(n.VISIBLE)},!1),window.onblur=function(){i.emit(n.BLUR)},window.onfocus=function(){i.emit(n.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},function(t,e,i){var m=i(347),y=i(26),x=i(6);t.exports=function(t){var e=x(t,"data",[]),i=x(t,"canvas",null),n=x(t,"palette",m),s=x(t,"pixelWidth",1),r=x(t,"pixelHeight",s),o=x(t,"resizeCanvas",!0),a=x(t,"clearCanvas",!0),h=x(t,"preRender",null),u=x(t,"postRender",null),l=Math.floor(Math.abs(e[0].length*s)),c=Math.floor(Math.abs(e.length*r));i||(i=y.create2D(this,l,c),a=o=!1),o&&(i.width=l,i.height=c);var d=i.getContext("2d");a&&d.clearRect(0,0,l,c),h&&h(i,d);for(var f=0;fi.length-2?i.length-1:s+1],u=i[s>i.length-3?i.length-1:s+2];return e.set(l(r,o.x,a.x,h.x,u.x),l(r,o.y,a.y,h.y,u.y))},toJSON:function(){for(var t=[],e=0;ei.width?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE;if("number"==typeof window.orientation)return 0===window.orientation||180===window.orientation?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return s.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return s.ORIENTATION.LANDSCAPE}return tthis.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var e=this.listeners;window.removeEventListener("orientationchange",e.orientationChange,!1),window.removeEventListener("resize",e.windowResize,!1);["webkit","moz",""].forEach(function(t){document.removeEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.removeEventListener(t+"fullscreenerror",e.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",e.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===c.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===c.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=v},function(t,e,i){var n=i(17),s=i(0),r=i(94),o=i(3),a=new s({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=null),this._width=t,this._height=e,this._parent=n,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=n(t,0,this.maxWidth),this.minHeight=n(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=n(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=n(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=n(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=n(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 n=this.snapTo,s=0===e?1:t/e;return i&&this.aspectRatio>s||!i&&this.aspectRatios)&&(t=(e=r(e,n.y))*this.aspectRatio,0r.START&&n.settings.status<=r.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e=r.LOADING&&i.settings.status=r.x&&t=r.y&&e=r.x&&t=r.y&&e=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s>4,u[a++]=(15&i)<<4|n>>2,u[a++]=(3&n)<<6|63&s;return h}},function(t,e,i){var n=i(134),s=i(0),r=i(59),o=new s({Extends:n,initialize:function(t,e,i){if(void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),!this.audioBuffer)throw new Error('There is no audio asset with key "'+e+'" in the audio cache');this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,n.call(this,t,e,i)},play:function(t,e){return!!n.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(r.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime>>16,v=(65280&d)>>>8,m=255&d,u.strokeStyle="rgba("+g+","+v+","+m+","+l+")",u.lineWidth=p,y+=3;break;case x.FILL_STYLE:f=a[y+1],c=a[y+2],g=(16711680&f)>>>16,v=(65280&f)>>>8,m=255&f,u.fillStyle="rgba("+g+","+v+","+m+","+c+")",y+=2;break;case x.BEGIN_PATH:u.beginPath();break;case x.CLOSE_PATH:u.closePath();break;case x.FILL_PATH:o||u.fill();break;case x.STROKE_PATH:o||u.stroke();break;case x.FILL_RECT:o?u.rect(a[y+1],a[y+2],a[y+3],a[y+4]):u.fillRect(a[y+1],a[y+2],a[y+3],a[y+4]),y+=4;break;case x.FILL_TRIANGLE:u.beginPath(),u.moveTo(a[y+1],a[y+2]),u.lineTo(a[y+3],a[y+4]),u.lineTo(a[y+5],a[y+6]),u.closePath(),o||u.fill(),y+=6;break;case x.STROKE_TRIANGLE:u.beginPath(),u.moveTo(a[y+1],a[y+2]),u.lineTo(a[y+3],a[y+4]),u.lineTo(a[y+5],a[y+6]),u.closePath(),o||u.stroke(),y+=6;break;case x.LINE_TO:u.lineTo(a[y+1],a[y+2]),y+=2;break;case x.MOVE_TO:u.moveTo(a[y+1],a[y+2]),y+=2;break;case x.LINE_FX_TO:u.lineTo(a[y+1],a[y+2]),y+=5;break;case x.MOVE_FX_TO:u.moveTo(a[y+1],a[y+2]),y+=5;break;case x.SAVE:u.save();break;case x.RESTORE:u.restore();break;case x.TRANSLATE:u.translate(a[y+1],a[y+2]),y+=2;break;case x.SCALE:u.scale(a[y+1],a[y+2]),y+=2;break;case x.ROTATE:u.rotate(a[y+1]),y+=1;break;case x.GRADIENT_FILL_STYLE:y+=5;break;case x.GRADIENT_LINE_STYLE:y+=6;break;case x.SET_TEXTURE:y+=2}}u.restore()}}},function(t,e,i){var n=i(0),o=i(2),s=new n({initialize:function(t,e,i,n,s){var r;"object"==typeof t?(t=o(r=t,"x",0),e=o(r,"y",0),i=o(r,"power",0),n=o(r,"epsilon",100),s=o(r,"gravity",50)):(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===s&&(s=50)),this.x=t,this.y=e,this.active=!0,this._gravity=s,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i,n,s=this.x-t.x,r=this.y-t.y,o=s*s+r*r;0!==o&&(i=Math.sqrt(o),oe.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(0this._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=n},function(t,e){t.exports=function(t,e){for(var i=0;id.PI2?s=d.PI2:s<0&&(s=d.PI2+s%d.PI2);for(var a,h=[r+Math.cos(n)*i,o+Math.sin(n)*i];e<1;)a=s*e+n,h.push(r+Math.cos(a)*i,o+Math.sin(a)*i),e+=t;return a=s+n,h.push(r+Math.cos(a)*i,o+Math.sin(a)*i),h.push(r+Math.cos(n)*i,o+Math.sin(n)*i),this.pathIndexes=l(h),this.pathData=h,this}});t.exports=r},function(t,e,i){var n=i(0),s=i(1012),r=i(66),o=i(9),a=i(29),h=new n({Extends:a,Mixins:[s],initialize:function(t,e,i,n,s,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Curve",n),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(e,i),void 0!==s&&this.setFillStyle(s,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=[],n=this.geom.getPoints(e),s=0;st.right||e.rightt.bottom||e.bottome.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottomt.width*t.height)&&(e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(s.BUTTON_DOWN,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(s.BUTTON_UP,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=r},function(t,e,i){var a=i(453),h=i(454),n=i(0),u=i(11),l=i(3),s=new n({Extends:u,initialize:function(t,e){u.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],n=0;n=s;for(this.fixedStep||(n=.001*e,o=!0,this._elapsed=0),h=0;h=s;)this._elapsed-=s,this.step(n)}},step:function(t){for(var e,i=this.bodies.entries,n=i.length,s=0;sc)&&(d.xl))return this.separateCircle(t,e,s)}var f=!1,p=!1;s?(f=S(t,e,s,this.OVERLAP_BIAS),p=C(t,e,s,this.OVERLAP_BIAS)):this.forceX||Math.abs(this.gravity.y+t.gravity.y)=e.right||t.position.y>=e.bottom))},circleBodyIntersects:function(t,e){var i=p(t.center.x,e.left,e.right),n=p(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o;t.isParent&&void 0===t.physicsType&&(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var a=Array.isArray(t),h=Array.isArray(e);if(this._total=0,a||h)if(!a&&h)for(o=0;od.baseTileWidth&&(h-=a=(d.tileWidth-d.baseTileWidth)*e.scaleX,l+=a),d.tileHeight>d.baseTileHeight&&(c+=(d.tileHeight-d.baseTileHeight)*e.scaleY);var f=e.getTilesWithinWorldXY(h,u,l,c);return 0!==f.length&&this.collideSpriteVsTilesHandler(t,f,i,n,s,r,!0)},collideSpriteVsTilesHandler:function(t,e,i,n,s,r,o){for(var a,h,u=t.body,l={left:0,right:0,top:0,bottom:0},c=!1,d=0;de.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,r=this.blocked.right=!0),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,r=this.blocked.down=!0),r&&(this.blocked.none=!1),r},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this.updateCenter(),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n,s,r=this.gameObject;return!t&&r.frame&&(t=r.frame.realWidth),!e&&r.frame&&(e=r.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&&r.getCenter&&(n=(r.width-t)/2,s=(r.height-e)/2,this.offset.set(n,s)),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),0=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 0e._dx?r<(s=t.right-e.x)&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?s=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0,e.physicsType===o.STATIC_BODY&&(t.blocked.none=!1,t.blocked.right=!0),t.physicsType===o.STATIC_BODY&&(e.blocked.none=!1,e.blocked.left=!0)):t._dxe._dy?r<(s=t.bottom-e.y)&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?s=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0,e.physicsType===o.STATIC_BODY&&(t.blocked.none=!1,t.blocked.down=!0),t.physicsType===o.STATIC_BODY&&(e.blocked.none=!1,e.blocked.up=!0)):t._dy=t.minX&&e.maxY>=t.minY}function p(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,s){for(var r,o=[e,i];o.length;)(i=o.pop())-(e=o.pop())<=n||(r=e+Math.ceil((i-e)/n/2)*n,a(t,r,e,i,s),o.push(e,r,r,i))}n.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!u(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;sthis._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),o=p(i.children.splice(r,i.children.length-r));o.height=i.height,o.leaf=i.leaf,f(i,this.toBBox),f(o,this.toBBox),e?t[e-1].children.push(o):this._splitRoot(i,o)},_splitRoot:function(t,e){this.data=p([t,e]),this.data.height=t.height+1,this.data.leaf=!1,f(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){for(var n,s,r,o,a,h,u,l,c,d,f,p,g=a=1/0,v=e;v<=i-e;v++)n=m(t,0,v,this.toBBox),s=m(t,v,i,this.toBBox),u=n,l=s,p=f=d=c=void 0,c=Math.max(u.minX,l.minX),d=Math.max(u.minY,l.minY),f=Math.min(u.maxX,l.maxX),p=Math.min(u.maxY,l.maxY),r=Math.max(0,f-c)*Math.max(0,p-d),o=y(n)+y(s),r=t.right||e.position.y>=t.bottom)}},function(t,e,i){var n=i(56),s=i(0),r=i(51),o=i(49),a=i(3),h=new s({initialize:function(t,e){var i=e.displayWidth?e.displayWidth:64,n=e.displayHeight?e.displayHeight:64;this.world=t,this.gameObject=e,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-n*e.originY),this.width=i,this.height=n,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.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).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 n,s,r=this.gameObject;return!t&&r.frame&&(t=r.frame.realWidth),!e&&r.frame&&(e=r.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&&r.getCenter&&(n=r.displayWidth/2,s=r.displayHeight/2,this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(n-this.halfWidth,s-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y),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),0=r.layers.length){if(s.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}r=s.pop()}else{var o,a=r.layers[r.i];if(r.i++,"tilelayer"===a.type)if(a.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+a.name+"'");else{if(a.encoding&&"base64"===a.encoding){if(a.chunks)for(var h=0;h>>0;return n}},function(t,e,i){var h=i(2),u=i(231);t.exports=function(t){for(var e=[],i=[],n=u(t);n.i=n.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}n=i.pop()}else{var s,r,o,a=n.layers[n.i];n.i++,"imagelayer"===a.type?(s=h(a,"offsetx",0)+h(a,"startx",0),r=h(a,"offsety",0)+h(a,"starty",0),e.push({name:n.name+a.name,image:a.image,x:n.x+s+a.x,y:n.y+r+a.y,alpha:n.opacity*a.opacity,visible:n.visible&&a.visible,properties:h(a,"properties",{})})):"group"===a.type&&(o=u(t,a,n),i.push(n),n=o)}return e}},function(t,e,i){var x=i(105),T=i(488),w=i(232);t.exports=function(t){for(var e,i=[],n=[],s=null,r=0;r=this.firstgid&&t=n.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}n=i.pop()}else{var s,r=n.layers[n.i];if(n.i++,r.opacity*=n.opacity,r.visible=n.visible&&r.visible,"objectgroup"===r.type){r.name=n.name+r.name;for(var o=n.x+d(r,"startx",0)+d(r,"offsetx",0),a=n.y+d(r,"starty",0)+d(r,"offsety",0),h=[],u=0;un&&(n=e.layer[r].width),e.layer[r].height>s&&(s=e.layer[r].height);var o=new h({width:n,height:s,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:a.WELTMEISTER});return o.layers=u(e,i),o.tilesets=l(e),o}},function(t,e,i){var d=i(103),f=i(74);t.exports=function(t,e){for(var i=[],n=0;nx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(1===m)for(h=0;hx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(2===m)for(h=f-1;0<=h;h--)for(u=0;ux||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(3===m)for(h=f-1;0<=h;h--)for(u=d-1;0<=u;u--)!(a=v[h][u])||a.indexx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));return this.dirty[e]=!1,null===r&&(r=n.createVertexBuffer(o,s.STATIC_DRAW),this.vertexBuffer[e]=r),n.setVertexBuffer(r),i.setAttribPointers(),s.bufferSubData(s.ARRAY_BUFFER,0,o),this},batchTile:function(t,e,i,n,s,r,o){var a=i.getTileTextureCoordinates(e.index);if(!a)return t;var h=i.tileWidth,u=i.tileHeight,l=h/2,c=u/2,d=a.x/n,f=a.y/s,p=(a.x+h)/n,g=(a.y+u)/s,v=this._tempMatrix,m=-l,y=-c;e.flipX&&(h*=-1,m+=i.tileWidth),e.flipY&&(u*=-1,y+=i.tileHeight);var x=m+h,T=y+u;v.applyITRS(l+e.pixelX,c+e.pixelY,e.rotation,1,1);var w=L.getTintAppendFloatAlpha(16777215,r.alpha*this.alpha*e.alpha),E=v.getX(m,y),_=v.getY(m,y),b=v.getX(m,T),A=v.getY(m,T),S=v.getX(x,T),C=v.getY(x,T),M=v.getX(x,y),O=v.getY(x,y);r.roundPixels&&(E=Math.round(E),_=Math.round(_),b=Math.round(b),A=Math.round(A),S=Math.round(S),C=Math.round(C),M=Math.round(M),O=Math.round(O));var R=this.vertexViewF32[o],P=this.vertexViewU32[o];return R[++t]=E,R[++t]=_,R[++t]=d,R[++t]=f,R[++t]=0,R[++t]=0,P[++t]=w,R[++t]=b,R[++t]=A,R[++t]=d,R[++t]=g,R[++t]=0,R[++t]=0,P[++t]=w,R[++t]=S,R[++t]=C,R[++t]=p,R[++t]=g,R[++t]=0,R[++t]=0,P[++t]=w,R[++t]=E,R[++t]=_,R[++t]=d,R[++t]=f,R[++t]=0,R[++t]=0,P[++t]=w,R[++t]=S,R[++t]=C,R[++t]=p,R[++t]=g,R[++t]=0,R[++t]=0,P[++t]=w,R[++t]=M,R[++t]=O,R[++t]=p,R[++t]=f,R[++t]=0,R[++t]=0,P[++t]=w,this.vertexCount[o]+=6,t},setRenderOrder:function(t){if("string"==typeof t&&(t=["right-down","left-down","right-up","left-up"].indexOf(t)),0<=t&&t<4){this._renderOrder=t;for(var e=0;e=this.nextTick&&this.currentAnim.setFrame(this)}},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),e.setSizeToFrame(),e._originComponent&&(t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin()),e},updateFrame:function(t){var e,i=this.setCurrentFrame(t);this.isPlaying&&(t.setAlpha&&(i.alpha=t.alpha),e=this.currentAnim,i.emit(r.SPRITE_ANIMATION_KEY_UPDATE+e.key,e,t,i),i.emit(r.SPRITE_ANIMATION_UPDATE,e,t,i),3===this._pendingStop&&this._pendingStopValue===t&&this.currentAnim.completeAnimation(this))},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},setYoyo:function(t){return void 0===t&&(t=!1),this._yoyo=t,this.parent},getYoyo:function(){return this._yoyo},destroy:function(){this.animationManager.off(r.REMOVE_ANIMATION,this.remove,this),this.animationManager=null,this.parent=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null}});t.exports=o},function(t,e,i){var l=i(509),p=i(41),n=i(0),s=i(33),r=i(510),o=i(93),a=i(30),h=new n({initialize:function(t){this.game=t,this.type=s.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.config={clearBeforeRender:t.config.clearBeforeRender,backgroundColor:t.config.backgroundColor,resolution:t.config.resolution,antialias:t.config.antialias,roundPixels:t.config.roundPixels},this.gameCanvas=t.canvas;var e={alpha:t.config.transparent,desynchronized:t.config.desynchronized};this.gameContext=this.game.config.context?this.game.config.context:this.gameCanvas.getContext("2d",e),this.currentContext=this.gameContext,this.antialias=t.config.antialias,this.blendModes=r(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new a,this._tempMatrix2=new a,this._tempMatrix3=new a,this._tempMatrix4=new a,this.init()},init:function(){this.game.scale.on(o.RESIZE,this.onResize,this);var t=this.game.scale.baseSize;this.resize(t.width,t.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},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,n=this.height;t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),e.clearBeforeRender&&t.clearRect(0,0,i,n),e.transparent||(t.fillStyle=e.backgroundColor.rgba,t.fillRect(0,0,i,n)),t.save(),this.drawCount=0},render:function(t,e,i,n){var s=e.list,r=s.length,o=n._cx,a=n._cy,h=n._cw,u=n._ch,l=n.renderToTexture?n.context:t.sys.context;l.save(),this.game.scene.customViewports&&(l.beginPath(),l.rect(o,a,h,u),l.clip()),this.currentContext=l;var c=n.mask;c&&c.preRenderCanvas(this,null,n._maskCamera),n.transparent||(l.fillStyle=n.backgroundColor.rgba,l.fillRect(o,a,h,u)),l.globalAlpha=n.alpha,l.globalCompositeOperation="source-over",this.drawCount+=s.length,n.renderToTexture&&n.emit(p.PRE_RENDER,n),n.matrix.copyToContext(l);for(var d=0;dthis.vertexCapacity&&(this.flush(),x=!0,y=this.setTexture2D(m));var T=this.vertexViewF32,w=this.vertexViewU32,E=this.vertexCount*this.vertexComponentCount-1;return T[++E]=t,T[++E]=e,T[++E]=h,T[++E]=u,T[++E]=v,w[++E]=d,T[++E]=i,T[++E]=n,T[++E]=h,T[++E]=c,T[++E]=v,w[++E]=p,T[++E]=s,T[++E]=r,T[++E]=l,T[++E]=c,T[++E]=v,w[++E]=g,T[++E]=t,T[++E]=e,T[++E]=h,T[++E]=u,T[++E]=v,w[++E]=d,T[++E]=s,T[++E]=r,T[++E]=l,T[++E]=c,T[++E]=v,w[++E]=g,T[++E]=o,T[++E]=a,T[++E]=l,T[++E]=u,T[++E]=v,w[++E]=f,this.vertexCount+=6,x},batchTri:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g){void 0===g&&(g=this.currentUnit);var v=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),v=!0,g=this.setTexture2D(p));var m=this.vertexViewF32,y=this.vertexViewU32,x=this.vertexCount*this.vertexComponentCount-1;return m[++x]=t,m[++x]=e,m[++x]=o,m[++x]=a,m[++x]=f,y[++x]=l,m[++x]=i,m[++x]=n,m[++x]=o,m[++x]=u,m[++x]=f,y[++x]=c,m[++x]=s,m[++x]=r,m[++x]=h,m[++x]=u,m[++x]=f,y[++x]=d,this.vertexCount+=3,v},bind:function(){return u.prototype.bind.call(this),this}});t.exports=l},,,,,function(t,e){var i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){i(523),i(524),i(525),i(526),i(527),i(528),i(529),i(530)},function(t,e){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 n=2<=arguments.length?arguments[1]:void 0,s=0;sthis.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.zoom<.001&&(e.zoom=.001)))},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},function(t,e,i){t.exports={Camera:i(297),BaseCamera:i(92),CameraManager:i(706),Effects:i(305),Events:i(41)}},function(t,e){t.exports="cameradestroy"},function(t,e){t.exports="camerafadeincomplete"},function(t,e){t.exports="camerafadeinstart"},function(t,e){t.exports="camerafadeoutcomplete"},function(t,e){t.exports="camerafadeoutstart"},function(t,e){t.exports="cameraflashcomplete"},function(t,e){t.exports="cameraflashstart"},function(t,e){t.exports="camerapancomplete"},function(t,e){t.exports="camerapanstart"},function(t,e){t.exports="postrender"},function(t,e){t.exports="prerender"},function(t,e){t.exports="camerarotatecomplete"},function(t,e){t.exports="camerarotatestart"},function(t,e){t.exports="camerashakecomplete"},function(t,e){t.exports="camerashakestart"},function(t,e){t.exports="camerazoomcomplete"},function(t,e){t.exports="camerazoomstart"},function(t,e,i){var n=i(17),s=i(0),u=i(41),r=new s({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,n,s,r,o,a){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=!1),void 0===o&&(o=null),void 0===a&&(a=this.camera.scene),!r&&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=n,this.blue=s,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=o,this._onUpdateScope=a;var h=t?u.FADE_OUT_START:u.FADE_IN_START;return this.camera.emit(h,this.camera,this,e,i,n,s),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsedthis.source?Math.abs(this.destination-this.source):Math.abs(this.destination+h)-this.source)<(l=this.source>this.destination?Math.abs(this.source-this.destination):Math.abs(this.source+h)-this.destination)?this.clockwise=!0:lMath.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},function(t,e,i){var n=i(124);t.exports=function(){return n(-Math.PI,Math.PI)}},function(t,e,i){var n=i(124);t.exports=function(){return n(-180,180)}},function(t,e,i){var n=i(323);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(13);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(e>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return 2.3283064365386963e-10*((this.n=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;e=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}s++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getTangentAt(h,e)}s++}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 r([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 o(t.x,t.y)):this.add(new o(t,e))},toJSON:function(){for(var t=[],e=0;e>16&255,g:t>>8&255,b:255&t,a:255};return 16777215>>24),e}},function(t,e,i){var h=i(31),u=i(356);t.exports=function(t,e,i){var n,s,r=i,o=i,a=i;return 0!==e&&(r=u(s=2*i-(n=i<.5?i*(1+e):i+e-i*e),n,t+1/3),o=u(s,n,t),a=u(s,n,t-1/3)),(new h).setGLTo(r,o,a,1)}},function(t,e,i){var s=i(172);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}},function(t,e,i){function o(t,e,i,n,s,r,o,a){void 0===o&&(o=100),void 0===a&&(a=0);var h=a/o;return{r:u(t,n,h),g:u(e,s,h),b:u(i,r,h)}}var u=i(121);t.exports={RGBWithRGB:o,ColorWithRGB:function(t,e,i,n,s,r){return void 0===s&&(s=100),void 0===r&&(r=0),o(t.r,t.g,t.b,e,i,n,s,r)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),o(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(178),s=i(31);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new s(n(t,e),n(t,e),n(t,e))}},function(t,e,i){var r=i(355);t.exports=function(t,e,i,n,s){return void 0===n&&(n=255),void 0===s&&(s="#"),"#"===s?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1):"0x"+r(n)+r(t)+r(e)+r(i)}},function(t,e,i){t.exports={BitmapMask:i(282),GeometryMask:i(283)}},function(t,e,i){var n={AddToDOM:i(128),DOMContentLoaded:i(357),GetScreenOrientation:i(358),GetTarget:i(363),ParseXML:i(364),RemoveFromDOM:i(184),RequestAnimationFrame:i(344)};t.exports=n},function(t,e,i){t.exports={EventEmitter:i(828)}},function(t,e,i){var n=i(0),s=i(11),r=i(23),o=new n({Extends:s,initialize:function(){s.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",o,"events"),t.exports=o},function(t,e,i){var n=i(128),s=i(293),r=i(296),o=i(26),a=i(0),h=i(318),u=i(830),l=i(340),c=i(118),d=i(342),f=i(319),p=i(357),g=i(11),v=i(20),m=i(365),y=i(23),x=i(370),T=i(371),w=i(373),E=i(127),_=i(376),b=i(343),A=i(345),S=i(380),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 g,this.anims=new s(this),this.textures=new _(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=S.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(),l(this),u(this),d(this),n(this.canvas,this.config.parent),this.textures.once(E.READY,this.texturesReady,this),this.events.emit(v.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(v.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(v.HIDDEN,this.onHidden,this),t.on(v.VISIBLE,this.onVisible,this),t.on(v.BLUR,this.onBlur,this),t.on(v.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e);var n=this.renderer;n.preRender(),i.emit(v.PRE_RENDER,n,t,e),this.scene.render(n),n.postRender(),i.emit(v.POST_RENDER,n,t,e)},headlessStep:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e),i.emit(v.PRE_RENDER),i.emit(v.POST_RENDER)},onHidden:function(){this.loop.pause(),this.events.emit(v.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(v.RESUME)},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(v.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},function(t,e,i){var n=i(128);t.exports=function(t){var e,i=t.config;i.parent&&i.domCreateContainer&&((e=document.createElement("div")).style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: none;","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=e,n(e,i.parent))}},function(t,e){t.exports="boot"},function(t,e){t.exports="destroy"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameout"},function(t,e){t.exports="gameover"},function(t,e){t.exports="gameobjectdown"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameobjectmove"},function(t,e){t.exports="gameobjectout"},function(t,e){t.exports="gameobjectover"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="wheel"},function(t,e){t.exports="gameobjectup"},function(t,e){t.exports="gameobjectwheel"},function(t,e){t.exports="boot"},function(t,e){t.exports="process"},function(t,e){t.exports="update"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointerdownoutside"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="pointerupoutside"},function(t,e){t.exports="wheel"},function(t,e){t.exports="pointerlockchange"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="start"},function(t,e){t.exports="update"},function(t,e){t.exports=function(t){if(!t)return window.innerHeight;var e=Math.abs(window.orientation),i={w:0,h:0},n=document.createElement("div");return n.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(n),i.w=90===e?n.offsetHeight:window.innerWidth,i.h=90===e?window.innerWidth:n.offsetHeight,document.documentElement.removeChild(n),n=null,90!==Math.abs(window.orientation)?i.h:i.w}},function(t,e){t.exports="addfile"},function(t,e){t.exports="complete"},function(t,e){t.exports="filecomplete"},function(t,e){t.exports="filecomplete-"},function(t,e){t.exports="loaderror"},function(t,e){t.exports="load"},function(t,e){t.exports="fileprogress"},function(t,e){t.exports="postprocess"},function(t,e){t.exports="progress"},function(t,e){t.exports="start"},function(t,e,i){var r=i(2),o=i(187);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=r(t.settings,"physics",!1);if(e||i){var n=[];if(e&&n.push(o(e+"Physics")),i)for(var s in i)s=o(s.concat("Physics")),-1===n.indexOf(s)&&n.push(s);return n}}},function(t,e,i){var n=i(2);t.exports=function(t){var e=t.plugins.getDefaultScenePlugins(),i=n(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},function(t,e,i){t.exports={game:"game",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"}},function(t,e){t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var s=i.getElementsByTagName("SubTexture"),r=0;r=t.length)throw new Error("Supplied index out of bounds");return n!==i&&(t.splice(n,1),t.splice(i,0,e)),e}},function(t,e){t.exports=function(t,e){var i,n,s=t.indexOf(e);return-1!==s&&st.length-1)throw new Error("Index out of bounds");var s=r(t,e);return i&&i.call(n,s),s}},function(t,e,i){var u=i(68);t.exports=function(t,e,i,n,s){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===s&&(s=t),u(t,e,i)){var r=i-e,o=t.splice(e,r);if(n)for(var a=0;a?@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"}},function(t,e,i){var T=i(6);t.exports=function(t,e){var i=e.width,n=e.height,s=Math.floor(i/2),r=Math.floor(n/2),o=T(e,"chars","");if(""!==o){var a=T(e,"image",""),h=T(e,"offset.x",0),u=T(e,"offset.y",0),l=T(e,"spacing.x",0),c=T(e,"spacing.y",0),d=T(e,"lineSpacing",0),f=T(e,"charsPerRow",null);null===f&&(f=t.sys.textures.getFrame(a).width/i)>o.length&&(f=o.length);for(var p=h,g=u,v={retroFont:!0,font:a,size:i,lineHeight:n+d,chars:{}},m=0,y=0;yr.vertexCapacity&&r.flush();for(var g=r.setGameObject(e),v=r.vertexViewF32,m=r.vertexViewU32,y=r.vertexCount*r.vertexComponentCount-1,x=0,T=e.tintFill,w=0;w=i&&t.x<=n&&t.y>=s&&t.y<=r}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===r&&(r=0),!(e>t.right+r||it.bottom+r||s=n&&(p.push(v),f=v)}var m=o[o.length-1];return y(f,m)i&&(i=a.x),a.xs&&(s=a.y),a.yn(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)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){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}},function(t,e,i){var r=i(9);t.exports=function(t,e,i,n,s){return void 0===s&&(s=new r),s.setTo(Math.min(t,i),Math.min(e,n),Math.abs(t-i),Math.abs(e-n))}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.centerX,e.y=t.centerY,e}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var r=i(174);t.exports=function(t,e,i){var n=t.centerX,s=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),r(t,n,s)}},function(t,e,i){var n=i(9),s=i(141);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(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}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){var a=i(4),h=i(40);t.exports=function(t,e,i){void 0===i&&(i=new a),e=h(e);var n=Math.sin(e),s=Math.cos(e),r=0=s||0=t.downTime+n)&&(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;it._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,n=0;n'),i.push(''),i.push(''),i.push(this.xhrLoader.responseText),i.push(""),i.push(""),i.push("");var n=[i.join("\n")],s=this;try{var r=new window.Blob(n,{type:"image/svg+xml;charset=utf-8"})}catch(t){return s.state=o.FILE_ERRORED,void s.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){u.revokeObjectURL(s.data),s.onProcessComplete()},this.data.onerror=function(){u.revokeObjectURL(s.data),s.onProcessError()},u.createObjectURL(this.data,r,"image/svg+xml")},addToCache:function(){var t=this.cache.addImage(this.key,this.data);this.pendingDestroy(t)}});s.register("htmlTexture",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;re.deltaAbsY()?g=-1:e.deltaAbsX()i&&s<(o=t.right-i)&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:c(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):0i&&s<(o=t.bottom-i)&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:c(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):0=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;this.systems.events.off(a.UPDATE,this.step,this),t.events.emit(a.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,n){return this.manager.add(t,e,i,n)},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 n=this.manager.getScene(e);return n&&n.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)},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(a.SHUTDOWN,this.shutdown,this),t.off(a.POST_UPDATE,this.step,this),t.off(a.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(a.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});r.register("ScenePlugin",o,"scenePlugin"),t.exports=o},function(t,e,i){t.exports={List:i(135),Map:i(168),ProcessQueue:i(192),RTree:i(473),Set:i(139),Size:i(372)}},function(t,e,i){var n=i(19),s=i(1323),r=n(!1,r={CanvasTexture:i(377),Events:i(127),FilterMode:s,Frame:i(95),Parsers:i(379),Texture:i(188),TextureManager:i(376),TextureSource:i(378)},s);t.exports=r},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){t.exports={Components:i(147),Parsers:i(1354),Formats:i(32),ImageCollection:i(488),ParseToTilemap:i(233),Tile:i(74),Tilemap:i(497),TilemapCreator:i(1368),TilemapFactory:i(1369),Tileset:i(105),LayerData:i(103),MapData:i(104),ObjectLayer:i(491),DynamicTilemapLayer:i(498),StaticTilemapLayer:i(499)}},function(t,e,i){var p=i(24),g=i(52);t.exports=function(t,e,i,n,s,r,o,a){t<0&&(t=0),e<0&&(e=0),void 0===o&&(o=!0);for(var h=p(t,e,i,n,null,a),u=s-t,l=r-e,c=0;c=t&&u.index<=e&&l(u,i)}n&&c(0,0,s.width,s.height,s)}}},function(t,e,i){var a=i(73),h=i(52),u=i(228);t.exports=function(t,e,i,n){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var s=0;s=s.delay&&(n=s.elapsed-s.delay,s.elapsed=s.delay,!s.hasDispatched&&s.callback&&(s.hasDispatched=!0,s.callback.apply(s.callbackScope,s.args)),0>2],s+=o[(3&i[r])<<4|i[r+1]>>4],s+=o[(15&i[r+1])<<2|i[r+2]>>6],s+=o[63&i[r+2]];return n%3==2?s=s.substring(0,s.length-1)+"=":n%3==1&&(s=s.substring(0,s.length-2)+"=="),s}},function(t,e,i){t.exports={Clone:i(67),Extend:i(19),GetAdvancedValue:i(15),GetFastValue:i(2),GetMinMaxValue:i(1394),GetValue:i(6),HasAll:i(1395),HasAny:i(407),HasValue:i(112),IsPlainObject:i(7),Merge:i(132),MergeRight:i(1396),Pick:i(489),SetValue:i(427)}},function(t,e,i){var o=i(6),a=i(17);t.exports=function(t,e,i,n,s){void 0===s&&(s=i);var r=o(t,e,s);return a(r,i,n)}},function(t,e){t.exports=function(t,e){for(var i=0;i=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=l},function(t,e){t.exports={getTintFromFloats:function(t,e,i,n){return((255&(255*n|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]},getComponentCount:function(t,e){for(var i=0,n=0;nr.width&&(i=Math.max(r.width-t,0)),e+n>r.height&&(n=Math.max(r.height-e,0));for(var u=[],l=e;lthis.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=u},function(t,e,i){var n=i(13);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e,i){t.exports={DESTROY:i(667),FADE_IN_COMPLETE:i(668),FADE_IN_START:i(669),FADE_OUT_COMPLETE:i(670),FADE_OUT_START:i(671),FLASH_COMPLETE:i(672),FLASH_START:i(673),PAN_COMPLETE:i(674),PAN_START:i(675),POST_RENDER:i(676),PRE_RENDER:i(677),ROTATE_COMPLETE:i(678),ROTATE_START:i(679),SHAKE_COMPLETE:i(680),SHAKE_START:i(681),ZOOM_COMPLETE:i(682),ZOOM_START:i(683)}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.fillColor,r=n||e.fillAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.fillStyle="rgba("+o+","+a+","+h+","+r+")"}},,function(t,e){t.exports=function(t,e){return t.y=e+t.height*t.originY,t}},function(t,e){t.exports=function(t,e){return t.x=e+t.width*t.originX,t}},function(t,e){t.exports=function(t,e){return t.x=e-t.width+t.width*t.originX,t}},function(t,e){t.exports=function(t,e){return t.y=e-t.height+t.height*t.originY,t}},function(t,e){t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},function(t,e){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)}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.strokeColor,r=n||e.strokeAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.strokeStyle="rgba("+o+","+a+","+h+","+r+")",t.lineWidth=e.lineWidth}},function(t,e){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}},function(t,e,i){var d=i(149),f=i(24);t.exports=function(t,e,i,n,s){for(var r,o,a,h,u=f(t,e,i,n,null,s),l=0;l=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}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e,i){"use strict";function n(t,e,i){i=i||2;var n,s,r,o,a,h,u,l=e&&e.length,c=l?e[0]*i:t.length,d=g(t,0,c,i,!0),f=[];if(!d||d.next===d.prev)return f;if(l&&(d=function(t,e,i,n){var s,r,o,a,h,u=[];for(s=0,r=e.length;s=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&o=n.x&&n.x>=l&&s!==n.x&&T(ri.x||n.x===i.x&&function(t,e){return w(t.prev,t,e.prev)<0&&w(e.next,t,t.next)<0}(i,n)))&&(i=n,d=h)),n=n.next,n!==u;);return i}(t,e))&&(i=_(e,t),v(e,e.next),v(i,i.next))}}(u[s],i),i=v(i,i.next);return i}(t,e,d,i)),t.length>80*i){n=r=t[0],s=o=t[1];for(var p=i;pr.x?s.x>o.x?s.x:o.x:r.x>o.x?r.x:o.x,l=s.y>r.y?s.y>o.y?s.y:o.y:r.y>o.y?r.y:o.y,c=x(a,h,e,i,n),d=x(u,l,e,i,n),f=t.prevZ,p=t.nextZ;for(;f&&f.z>=c&&p&&p.z<=d;){if(f!==t.prev&&f!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,f.x,f.y)&&0<=w(f.prev,f,f.next))return!1;if(f=f.prevZ,p!==t.prev&&p!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&0<=w(p.prev,p,p.next))return!1;p=p.nextZ}for(;f&&f.z>=c;){if(f!==t.prev&&f!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,f.x,f.y)&&0<=w(f.prev,f,f.next))return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&0<=w(p.prev,p,p.next))return!1;p=p.nextZ}return!0}(t,n,s,r):function(t){var e=t.prev,i=t,n=t.next;if(0<=w(e,i,n))return!1;var s=t.next.next;for(;s!==t.prev;){if(T(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&0<=w(s.prev,s,s.next))return!1;s=s.next}return!0}(t))e.push(a.i/i),e.push(t.i/i),e.push(h.i/i),d(t),t=h.next,u=h.next;else if((t=h)===u){o?1===o?m(t=function(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!l(s,r)&&c(s,n,n.next,r)&&E(s,r)&&E(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),d(n),d(n.next),n=t=r),n=n.next}while(n!==t);return v(n)}(v(t),e,i),e,i,n,s,r,2):2===o&&function(t,e,i,n,s,r){var o=t;do{for(var a=o.next.next;a!==o.prev;){if(o.i!==a.i&&function(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&&c(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&(E(t,e)&&E(e,t)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;for(;i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next,i!==t;);return n}(t,e)&&(w(t.prev,t,e.prev)||w(t,e.prev,e))||l(t,e)&&0=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function u(t){return 0=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=l},function(t,e,i){var n=i(0),s=i(18),c=i(22),r=i(8),d=i(2),f=i(7),o=new n({Extends:c,initialize:function t(e,i,n,s,r){var o,a,h="png";f(i)&&(i=d(a=i,"key"),n=d(a,"url"),o=d(a,"normalMap"),s=d(a,"xhrSettings"),h=d(a,"extension",h),r=d(a,"frameConfig")),Array.isArray(n)&&(o=n[1],n=n[0]);var u,l={type:"image",cache:e.textureManager,extension:h,responseType:"blob",key:i,url:n,xhrSettings:s,config:r};c.call(this,e,l),o&&((u=new t(e,this.key,o,s,r)).type="normalMap",this.setLink(u),e.addFile(u))},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){c.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){c.revokeObjectURL(t.data),t.onProcessError()},c.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var t,e=this.linkFile;e&&e.state===s.FILE_COMPLETE?(t="image"===this.type?this.cache.addImage(this.key,this.data,e.data):this.cache.addImage(e.key,e.data,this.data),this.pendingDestroy(t),e.pendingDestroy(t)):e||(t=this.cache.addImage(this.key,this.data),this.pendingDestroy(t))}});r.register("image",function(t,e,i){if(Array.isArray(t))for(var n=0;nthis.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=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.tileToWorldX(this.x,t):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.tileToWorldY(this.y,t)-(this.height-this.baseHeight)*e.scaleY:this.y*this.baseHeight-(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 r),e.x=this.getLeft(),e.y=this.getTop(),e.width=this.getRight()-e.x,e.height=this.getBottom()-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},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=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){return 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),this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){return void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===s&&(s=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,s&&this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y),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,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight,this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||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=o},function(t,e,i){var r=i(248),n=i(0),s=i(11),o=i(14),a=i(29),h=i(987),u=new n({Extends:o,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScrollFactor,s.Size,s.TextureCrop,s.Tint,s.Transform,s.Visible,h],initialize:function(t,e,i,n,s){o.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new r(this),this.setTexture(n,s),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.on(a.ADDED_TO_SCENE,this.addedToScene,this),this.on(a.REMOVED_FROM_SCENE,this.removedFromScene,this)},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 s.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=u},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e,i){var n=new(i(0))({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},clone:function(){return new n(this.x,this.y,this.z)},crossVectors:function(t,e){var i=t.x,n=t.y,s=t.z,r=e.x,o=e.y,a=e.z;return this.x=n*a-s*o,this.y=s*r-i*a,this.z=i*o-n*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},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||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,n=t.z-this.z||0;return Math.sqrt(e*e+i*i+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return e*e+i*i+n*n},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,n=t*t+e*e+i*i;return 0=t.length)){for(var i=t.length-1,n=t[e],s=e;sh||a.y>u)?(l=Math.max(a.x,e),c=Math.max(a.y,i),E=d=Math.min(a.r,h)-l,_=f=Math.min(a.b,u)-c,T=r?p+(v-(l-a.x)-d):p+(l-a.x),w=o?g+(m-(c-a.y)-f):g+(c-a.y),e=l,i=c,n=d,s=f):_=E=w=T=0):(r&&(T=p+(v-e-n)),o&&(w=g+(m-i-s)));var S=this.source.width,A=this.source.height;return t.u0=Math.max(0,T/S),t.v0=Math.max(0,w/A),t.u1=Math.min(1,(T+E)/S),t.v1=Math.min(1,(w+_)/A),t.x=e,t.y=i,t.cx=T,t.cy=w,t.cw=E,t.ch=_,t.width=n,t.height=s,t.flipX=r,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,n,s,r){var o=this.data.drawImage;return o.width=t,o.height=e,this.u0=i,this.v0=n,this.u1=s,this.v1=r,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.width=i,s.height=n;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+n)/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 r(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=s(!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=r},function(t,e,i){var n=i(0),s=i(98),r=i(411),o=i(412),a=i(49),h=i(165),u=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=a.ELLIPSE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(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,n){return this.x=t,this.y=e,this.width=i,this.height=n,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=u},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){var U=i(251),n=i(0),r=i(29),s=i(191),z=i(2),G=i(6),o=i(7),W=i(403),a=i(140),h=i(76),u=new n({initialize:function(t,e,i){i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?o(e[0])&&(i=e,e=null):o(e)&&(i=e,e=null),this.scene=t,this.children=new a,this.isParent=!0,this.type="Group",this.classType=z(i,"classType",h),this.name=z(i,"name",""),this.active=z(i,"active",!0),this.maxSize=z(i,"maxSize",-1),this.defaultKey=z(i,"defaultKey",null),this.defaultFrame=z(i,"defaultFrame",null),this.runChildUpdate=z(i,"runChildUpdate",!1),this.createCallback=z(i,"createCallback",null),this.removeCallback=z(i,"removeCallback",null),this.createMultipleCallback=z(i,"createMultipleCallback",null),this.internalCreateCallback=z(i,"internalCreateCallback",null),this.internalRemoveCallback=z(i,"internalRemoveCallback",null),e&&this.addMultiple(e),i&&this.createMultiple(i)},create:function(t,e,i,n,s,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),void 0===r&&(r=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(o),o.preUpdate&&this.scene.sys.updateList.add(o),o.visible=s,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=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;i=this.firstgid&&t=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this.resolution=i,this},bind:function(t){void 0===t&&(t=!1);var e=this.vertexBuffer,i=this.program,n=this.renderer;return n.setProgram(i),n.setVertexBuffer(e),this.setAttribPointers(t),this},setAttribPointers:function(t){void 0===t&&(t=!1);for(var e=this.gl,i=this.attributes,n=this.vertexSize,s=this.program,r=0;rthis.vertexCapacity&&this.flush();var Y=this.setGameObject(t),N=t._isTinted&&t.tintFill;this.batchQuad(A,C,M,O,R,P,L,D,u,l,c,d,F,k,I,B,N,h,Y)},batchQuad:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g,v,m,y){void 0===y&&(y=this.currentUnit);var x=!1;this.vertexCount+6>this.vertexCapacity&&(this.flush(),x=!0,y=this.setTexture2D(m));var T=this.vertexViewF32,w=this.vertexViewU32,E=this.vertexCount*this.vertexComponentCount-1;return T[++E]=t,T[++E]=e,T[++E]=h,T[++E]=u,T[++E]=y,T[++E]=v,w[++E]=d,T[++E]=i,T[++E]=n,T[++E]=h,T[++E]=c,T[++E]=y,T[++E]=v,w[++E]=p,T[++E]=s,T[++E]=r,T[++E]=l,T[++E]=c,T[++E]=y,T[++E]=v,w[++E]=g,T[++E]=t,T[++E]=e,T[++E]=h,T[++E]=u,T[++E]=y,T[++E]=v,w[++E]=d,T[++E]=s,T[++E]=r,T[++E]=l,T[++E]=c,T[++E]=y,T[++E]=v,w[++E]=g,T[++E]=o,T[++E]=a,T[++E]=l,T[++E]=u,T[++E]=y,T[++E]=v,w[++E]=f,this.vertexCount+=6,x},batchTri:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g){void 0===g&&(g=this.currentUnit);var v=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),v=!0,g=this.setTexture2D(p));var m=this.vertexViewF32,y=this.vertexViewU32,x=this.vertexCount*this.vertexComponentCount-1;return m[++x]=t,m[++x]=e,m[++x]=o,m[++x]=a,m[++x]=g,m[++x]=f,y[++x]=l,m[++x]=i,m[++x]=n,m[++x]=o,m[++x]=u,m[++x]=g,m[++x]=f,y[++x]=c,m[++x]=s,m[++x]=r,m[++x]=h,m[++x]=u,m[++x]=g,m[++x]=f,y[++x]=d,this.vertexCount+=3,v},batchTexture:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g,v,m,y,x,T,w,E,_,b,S,A,C,M,O,R,P){this.renderer.setPipeline(this,t);var L,D,F,k=this._tempMatrix1,I=this._tempMatrix2,B=this._tempMatrix3,Y=m/i+A,N=y/n+C,X=(m+x)/i+A,U=(y+T)/n+C,z=o,G=a,W=-g,V=-v;t.isCropped&&(z=(L=t._crop).width,G=L.height,o=L.width,a=L.height,D=m=L.x,F=y=L.y,c&&(D=x-L.x-L.width),d&&!e.isRenderTexture&&(F=T-L.y-L.height),Y=D/i+A,N=F/n+C,X=(D+L.width)/i+A,U=(F+L.height)/n+C,W=-g+m,V=-v+y),c&&(z*=-1,W+=o),(d^=!R&&e.isRenderTexture?1:0)&&(G*=-1,V+=a);var H=W+z,j=V+G;I.applyITRS(s,r,l,h,u),k.copyFrom(M.matrix),O?(k.multiplyWithOffset(O,-M.scrollX*f,-M.scrollY*p),I.e=s,I.f=r):(I.e-=M.scrollX*f,I.f-=M.scrollY*p),k.multiply(I,B);var K=B.getX(W,V),q=B.getY(W,V),Z=B.getX(W,j),J=B.getY(W,j),Q=B.getX(H,j),$=B.getY(H,j),tt=B.getX(H,V),et=B.getY(H,V);M.roundPixels&&(K=Math.round(K),q=Math.round(q),Z=Math.round(Z),J=Math.round(J),Q=Math.round(Q),$=Math.round($),tt=Math.round(tt),et=Math.round(et)),void 0===P&&(P=this.renderer.setTexture2D(e)),this.batchQuad(K,q,Z,J,Q,$,tt,et,Y,N,X,U,w,E,_,b,S,e,P)},batchTextureFrame:function(t,e,i,n,s,r,o){this.renderer.setPipeline(this);var a=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2,u=e+t.width,l=i+t.height;o?a.multiply(o,h):h=a;var c=h.getX(e,i),d=h.getY(e,i),f=h.getX(e,l),p=h.getY(e,l),g=h.getX(u,l),v=h.getY(u,l),m=h.getX(u,i),y=h.getY(u,i),x=this.renderer.setTextureSource(t.source);n=X.getTintAppendFloatAlpha(n,s),this.batchQuad(c,d,f,p,g,v,m,y,t.u0,t.v0,t.u1,t.v1,n,n,n,n,0,t.glTexture,x)},drawFillRect:function(t,e,i,n,s,r){t=Math.floor(t),e=Math.floor(e);var o=Math.floor(t+i),a=Math.floor(e+n),h=this.renderer.blankTexture.glTexture,u=this.renderer.setTexture2D(h),l=X.getTintAppendFloatAlphaAndSwap(s,r);this.batchQuad(t,e,t,a,o,a,o,e,0,0,1,1,l,l,l,l,2,h,u)},batchFillRect:function(t,e,i,n,s,r){this.renderer.setPipeline(this);var o=this._tempMatrix3;r&&r.multiply(s,o);var a=t+i,h=e+n,u=o.getX(t,e),l=o.getY(t,e),c=o.getX(t,h),d=o.getY(t,h),f=o.getX(a,h),p=o.getY(a,h),g=o.getX(a,e),v=o.getY(a,e),m=this.currentFrame,y=m.u0,x=m.v0,T=m.u1,w=m.v1,E=this.fillTint;this.batchQuad(u,l,c,d,f,p,g,v,y,x,T,w,E.TL,E.TR,E.BL,E.BR,this.tintEffect)},batchFillTriangle:function(t,e,i,n,s,r,o,a){this.renderer.setPipeline(this);var h=this._tempMatrix3;a&&a.multiply(o,h);var u=h.getX(t,e),l=h.getY(t,e),c=h.getX(i,n),d=h.getY(i,n),f=h.getX(s,r),p=h.getY(s,r),g=this.currentFrame,v=g.u0,m=g.v0,y=g.u1,x=g.v1;this.batchTri(u,l,c,d,f,p,v,m,y,x,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.tintEffect)},batchStrokeTriangle:function(t,e,i,n,s,r,o,a,h){var u=this.tempTriangle;u[0].x=t,u[0].y=e,u[0].width=o,u[1].x=i,u[1].y=n,u[1].width=o,u[2].x=s,u[2].y=r,u[2].width=o,u[3].x=t,u[3].y=e,u[3].width=o,this.batchStrokePath(u,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.setPipeline(this);var n=this._tempMatrix3;i&&i.multiply(e,n);for(var s,r,o=t.length,a=this.polygonCache,h=this.fillTint.TL,u=this.fillTint.TR,l=this.fillTint.BL,c=this.tintEffect,d=0;d>16)+(65280&t)+((255&t)<<16)}},function(t,e,i){var n=i(0),a=i(292),s=new n({initialize:function(t,e){this.parent=t,(this.events=e)||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once("destroy",this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],n=0;ne.right||t.y>e.bottom)}},function(t,e,i){var u=i(6),l={},n={register:function(t,e,i,n,s){l[t]={plugin:e,mapping:i,settingsKey:n,configKey:s}},getPlugin:function(t){return l[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,n=e.game.config;for(var s in l){var r=l[s].plugin,o=l[s].mapping,a=l[s].settingsKey,h=l[s].configKey;u(i,a,n[h])&&(t[o]=new r(t))}},remove:function(t){l.hasOwnProperty(t)&&delete l[t]}};t.exports=n},function(t,e,i){t.exports={ANY_KEY_DOWN:i(1235),ANY_KEY_UP:i(1236),COMBO_MATCH:i(1237),DOWN:i(1238),KEY_DOWN:i(1239),KEY_UP:i(1240),UP:i(1241)}},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),void 0===r&&(r=!1),{responseType:t,async:e,user:i,password:n,timeout:s,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:r}}},function(t,e,i){var n=i(0),s=i(226),r=i(76),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s),this.body=null}});t.exports=o},function(t,e,i){t.exports={CalculateFacesAt:i(233),CalculateFacesWithin:i(53),Copy:i(1322),CreateFromTiles:i(1323),CullTiles:i(1324),Fill:i(1325),FilterTiles:i(1326),FindByIndex:i(1327),FindTile:i(1328),ForEachTile:i(1329),GetTileAt:i(149),GetTileAtWorldXY:i(1330),GetTilesWithin:i(24),GetTilesWithinShape:i(1331),GetTilesWithinWorldXY:i(1332),HasTileAt:i(503),HasTileAtWorldXY:i(1333),IsInLayerBounds:i(103),PutTileAt:i(234),PutTileAtWorldXY:i(1334),PutTilesAt:i(1335),Randomize:i(1336),RemoveTileAt:i(504),RemoveTileAtWorldXY:i(1337),RenderDebug:i(1338),ReplaceByIndex:i(502),SetCollision:i(1339),SetCollisionBetween:i(1340),SetCollisionByExclusion:i(1341),SetCollisionByProperty:i(1342),SetCollisionFromCollisionGroup:i(1343),SetLayerCollisionIndex:i(152),SetTileCollision:i(65),SetTileIndexCallback:i(1344),SetTileLocationCallback:i(1345),Shuffle:i(1346),SwapByIndex:i(1347),TileToWorldX:i(150),TileToWorldXY:i(1348),TileToWorldY:i(151),WeightedRandomize:i(1349),WorldToTileX:i(66),WorldToTileXY:i(1350),WorldToTileY:i(67)}},function(t,e,i){var r=i(103);t.exports=function(t,e,i,n){if(void 0===i&&(i=!1),r(t,e,n)){var s=n.data[e][t]||null;return null!==s&&(-1!==s.index||i)?s:null}return null}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),n*=s.scaleX),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.collideIndexes.indexOf(t);e&&-1===n?i.collideIndexes.push(t):e||-1===n||i.collideIndexes.splice(n,1)}},function(t,e,i){var r=i(2);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+r(e,"startx",0)*t.tilewidth+r(e,"offsetx",0),s=e.y+r(e,"starty",0)*t.tileheight+r(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+s}}},function(t,e){t.exports=function(o,a,t){return o.hasOwnProperty(a)?"function"==typeof o[a]?function(t,e,i,n,s,r){return o[a](t,e,i,n,s,r)}:function(){return o[a]}:"function"==typeof t?t:function(){return t}}},function(t,e,i){var P=i(241),L=i(15),D=i(90),F=i(71),k=i(154),I=i(525),B=i(239),Y=i(6),N=i(240),X=i(242),U=i(244);t.exports=function(t,e,i){void 0===i&&(i=P);for(var n=i.targets?i.targets:B(e),s=I(e),r=k(e,"delay",i.delay),o=k(e,"duration",i.duration),a=Y(e,"easeParams",i.easeParams),h=F(Y(e,"ease",i.ease),a),u=k(e,"hold",i.hold),l=k(e,"repeat",i.repeat),c=k(e,"repeatDelay",i.repeatDelay),d=D(e,"yoyo",i.yoyo),f=D(e,"flipX",i.flipX),p=D(e,"flipY",i.flipY),g=[],v=0;v=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2);t=new Array(1+(s-r)).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){var n=i(306),s=i(309),r=i(311),o=i(312);t.exports=function(t){switch(typeof t){case"string":return("rgb"===t.substr(0,3).toLowerCase()?o:n)(t);case"number":return s(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){var a=i(173);function h(t,e,i,n){var s=(t+6*e)%6,r=Math.min(s,4-s,1);return Math.round(255*(n-n*i*Math.max(0,r)))}t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1);var s=h(5,t,e,i),r=h(3,t,e,i),o=h(1,t,e,i);return n?n.setTo?n.setTo(s,r,o,n.alpha,!1):(n.r=s,n.g=r,n.b=o,n.color=a(s,r,o),n):{r:s,g:r,b:o,color:a(s,r,o)}}},function(t,e){var i="";function n(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;is.width&&(t=s.width-r.cutX),r.cutY+e>s.height&&(e=s.height-r.cutY),r.setSize(t,e,r.cutX,r.cutY)),this.updateDisplayOrigin();var a=this.input;return a&&!a.customHitArea&&(a.hitArea.width=t,a.hitArea.height=e),this},setGlobalTint:function(t){return this.globalTint=t,this},setGlobalAlpha:function(t){return this.globalAlpha=t,this},saveTexture:function(t){return this.textureManager.renameTexture(this.texture.key,t),this._saved=!0,this.texture},fill:function(t,e,i,n,s,r){var o=this.gl,a=this.frame,h=this.texture,u=this.camera,l=this.renderer;void 0===e&&(e=1),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=a.cutWidth),void 0===r&&(r=a.cutHeight);var c,d,f,p,g,v,m,y,x,T,w=255&(t>>16|0),E=255&(t>>8|0),_=255&(0|t);return u.preRender(1,1),o?(c=u._cx,d=u._cy,f=u._cw,p=u._ch,l.resetTextures(!0),l.pushScissor(c,d,f,-p),l.setFramebuffer(this.framebuffer,!1),g=this.pipeline,v=h.width,m=h.height,y=g.width/v,x=g.height/m,g.drawFillRect(i*y,(m-r-n)*x,s*y,r*x,b.getTintFromFloats(w/255,E/255,_/255,1),e),g.flush(),l.setFramebuffer(null,!1),l.popScissor()):(T=this.context,l.setContext(T),T.fillStyle="rgba("+w+","+E+","+_+","+e+")",T.fillRect(i+a.cutX,n+a.cutY,s,r),l.setContext()),this.dirty=!0,this},clear:function(){var t,e,i;return this.dirty&&((t=this.gl)?((e=this.renderer).setFramebuffer(this.framebuffer,!0),this.frame.cutWidth===this.canvas.width&&this.frame.cutHeight===this.canvas.height||t.scissor(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),e.setFramebuffer(null,!0)):((i=this.context).save(),i.setTransform(1,0,0,1,0,0),i.clearRect(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),i.restore()),this.dirty=!1),this},erase:function(t,e,i){this._eraseMode=!0;var n=this.renderer.currentBlendMode;return this.renderer.setBlendMode(o.ERASE),this.draw(t,e,i,1,16777215),this.renderer.setBlendMode(n),this._eraseMode=!1,this},draw:function(t,e,i,n,s){void 0===n&&(n=this.globalAlpha),s=void 0===s?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(s>>16)+(65280&s)+((255&s)<<16),Array.isArray(t)||(t=[t]);var r,o,a,h,u,l=this.gl,c=this.camera,d=this.renderer;return c.preRender(1,1),l?(r=c._cx,o=c._cy,a=c._cw,h=c._ch,d.resetTextures(!0),d.setFramebuffer(this.framebuffer,!1),d.pushScissor(r,o,a,h,h),u=this.pipeline,g(u,0,this.texture.width,0,this.texture.height,-1e3,1e3),this.batchList(t,e,i,n,s),d.setFramebuffer(null,!0),d.resetTextures(!0),g(u,0,u.width,u.height,0,-1e3,1e3)):(d.setContext(this.context),this.batchList(t,e,i,n,s),d.setContext()),this.dirty=!0,this},drawFrame:function(t,e,i,n,s,r){void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.globalAlpha),r=void 0===r?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(r>>16)+(65280&r)+((255&r)<<16);var o,a,h,u,l,c=this.gl,d=this.camera,f=this.renderer,p=this.textureManager.getFrame(t,e);return p&&(d.preRender(1,1),c?(o=d._cx,a=d._cy,h=d._cw,u=d._ch,f.resetTextures(!0),f.setFramebuffer(this.framebuffer,!1),f.pushScissor(o,a,h,u,u),l=this.pipeline,g(l,0,this.texture.width,0,this.texture.height,-1e3,1e3),l.batchTextureFrame(p,i+this.frame.cutX,n+this.frame.cutY,r,s,d.matrix,null),l.flush(),f.setFramebuffer(null,!1),f.popScissor(),g(l,0,l.width,l.height,0,-1e3,1e3)):this.batchTextureFrame(p,i+this.frame.cutX,n+this.frame.cutY,s,r),this.dirty=!0),this},batchList:function(t,e,i,n,s){for(var r=0;rs&&(r=t[s]),n[s]=r,t.length>s+1&&(r=t[s+1]),n[s+1]=r;return this},setColors:function(t){var e=this.points.length;if(e<1)return this;var i=this.colors;void 0===t?t=[16777215]:Array.isArray(t)||(t=[t]);var n=0;if(t.length===e)for(r=0;rn&&(s=t[n]),i[n]=s,t.length>n+1&&(s=t[n+1]),i[n+1]=s;return this},setPoints:function(t,e,i){if(void 0===t&&(t=2),"number"==typeof t){var n,s,r,o=t;if(o<2&&(o=2),t=[],this.horizontal)for(r=-this.frame.halfWidth,s=this.frame.width/(o-1),n=0;n=this._markerOut&&(e.loop?(e.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=t,this.emit(o.VIDEO_LOOP,this)):(this.emit(o.VIDEO_COMPLETE,this),this.stop())))},checkVideoProgress:function(){2<=this.video.readyState?this.updateTexture():(this.retry--,0e._dx?r<(s=t.right-e.x)&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?s=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0,e.physicsType===o.STATIC_BODY&&(t.blocked.none=!1,t.blocked.right=!0),t.physicsType===o.STATIC_BODY&&(e.blocked.none=!1,e.blocked.left=!0)):t._dxe._dy?r<(s=t.bottom-e.y)&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?s=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0,e.physicsType===o.STATIC_BODY&&(t.blocked.none=!1,t.blocked.down=!0),t.physicsType===o.STATIC_BODY&&(e.blocked.none=!1,e.blocked.up=!0)):t._dy=t.right||e.position.y>=t.bottom)}},,function(t,e,i){var u=i(149);t.exports=function(t,e,i){var n=u(t,e,!0,i),s=u(t,e-1,!0,i),r=u(t,e+1,!0,i),o=u(t-1,e,!0,i),a=u(t+1,e,!0,i),h=n&&n.collides;return h&&(n.faceTop=!0,n.faceBottom=!0,n.faceLeft=!0,n.faceRight=!0),s&&s.collides&&(h&&(n.faceTop=!1),s.faceBottom=!h),r&&r.collides&&(h&&(n.faceBottom=!1),r.faceTop=!h),o&&o.collides&&(h&&(n.faceLeft=!1),o.faceRight=!h),a&&a.collides&&(h&&(n.faceRight=!1),a.faceLeft=!h),n&&!n.collides&&n.resetFaces(),n}},function(t,e,i){var l=i(75),c=i(103),d=i(233),f=i(65);t.exports=function(t,e,i,n,s){if(!c(e,i,s))return null;void 0===n&&(n=!0);var r,o=s.data[i][e],a=o&&o.collides;t instanceof l?(null===s.data[i][e]&&(s.data[i][e]=new l(s,t.index,e,i,t.width,t.height)),s.data[i][e].copy(t)):(r=t,null===s.data[i][e]?s.data[i][e]=new l(s,r,e,i,s.tileWidth,s.tileHeight):s.data[i][e].index=r);var h=s.data[i][e],u=-1!==s.collideIndexes.indexOf(h.index);return f(h,u),n&&a!==h.collides&&d(e,i,s),h}},function(t,e,i){var p=i(33),g=i(104),v=i(105),m=i(75);t.exports=function(t,e,i,n,s){for(var r=new g({tileWidth:i,tileHeight:n}),o=new v({name:t,tileWidth:i,tileHeight:n,format:p.ARRAY_2D,layers:[r]}),a=[],h=e.length,u=0,l=0;lt&&(t=s.totalDuration),s.delayh.getTotalFrames()&&(s=0),r=h.frames[s],0!==s||this.forward||(r=h.getLastFrame()),this.currentFrame=r):console.warn("Missing animation: "+a),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){var i,n;return this.isPlaying?(i=this.nextAnim,n=this.nextAnimsQueue,i&&n.unshift(i),this.nextAnim=t,this._pendingStop=1,this._pendingStopValue=e):(this.delayCounter=e,this.play(t,!0)),this.parent},playAfterRepeat:function(t,e){var i,n;return void 0===e&&(e=1),this.isPlaying?(i=this.nextAnim,n=this.nextAnimsQueue,i&&n.unshift(i),-1!==this.repeatCounter&&e>this.repeatCounter&&(e=this.repeatCounter),this.nextAnim=t,this._pendingStop=2,this._pendingStopValue=e):this.play(t),this.parent},play:function(t,e){void 0===e&&(e=!1);var i=this.currentAnim,n=this.parent,s="string"==typeof t?t:t.key;if(e&&this.isPlaying&&i.key===s)return n;if(i&&this.isPlaying){var r=this.animationManager.getMix(i.key,t);if(0this.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))for(var n=0;this.forward?i.nextFrame(this):i.previousFrame(this),n++,this.accumulator>this.nextTick&&n<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(r.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)},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 s),this.anims.set(e,i))),i},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(r.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=a},,,function(t,e,i){t.exports={AlignTo:i(553),Angle:i(554),Call:i(555),GetFirst:i(556),GetLast:i(557),GridAlign:i(558),IncAlpha:i(603),IncX:i(604),IncXY:i(605),IncY:i(606),PlaceOnCircle:i(607),PlaceOnEllipse:i(608),PlaceOnLine:i(609),PlaceOnRectangle:i(610),PlaceOnTriangle:i(611),PlayAnimation:i(612),PropertyValueInc:i(39),PropertyValueSet:i(25),RandomCircle:i(613),RandomEllipse:i(614),RandomLine:i(615),RandomRectangle:i(616),RandomTriangle:i(617),Rotate:i(618),RotateAround:i(619),RotateAroundDistance:i(620),ScaleX:i(621),ScaleXY:i(622),ScaleY:i(623),SetAlpha:i(624),SetBlendMode:i(625),SetDepth:i(626),SetHitArea:i(627),SetOrigin:i(628),SetRotation:i(629),SetScale:i(630),SetScaleX:i(631),SetScaleY:i(632),SetScrollFactor:i(633),SetScrollFactorX:i(634),SetScrollFactorY:i(635),SetTint:i(636),SetVisible:i(637),SetX:i(638),SetXY:i(639),SetY:i(640),ShiftPosition:i(641),Shuffle:i(642),SmootherStep:i(643),SmoothStep:i(644),Spread:i(645),ToggleVisible:i(646),WrapInRectangle:i(647)}},function(t,e,i){var n=i(107),r=[];r[n.BOTTOM_CENTER]=i(253),r[n.BOTTOM_LEFT]=i(254),r[n.BOTTOM_RIGHT]=i(255),r[n.LEFT_BOTTOM]=i(256),r[n.LEFT_CENTER]=i(257),r[n.LEFT_TOP]=i(258),r[n.RIGHT_BOTTOM]=i(259),r[n.RIGHT_CENTER]=i(260),r[n.RIGHT_TOP]=i(261),r[n.TOP_CENTER]=i(262),r[n.TOP_LEFT]=i(263),r[n.TOP_RIGHT]=i(264);t.exports=function(t,e,i,n,s){return r[i](t,e,n,s)}},function(t,e,i){var s=i(35),r=i(77),o=i(78),a=i(45);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),o(t,r(e)+i),a(t,s(e)+n),t}},function(t,e,i){var s=i(35),r=i(36),o=i(46),a=i(45);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),o(t,r(e)-i),a(t,s(e)+n),t}},function(t,e,i){var s=i(35),r=i(37),o=i(47),a=i(45);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),o(t,r(e)+i),a(t,s(e)+n),t}},function(t,e,i){var s=i(35),r=i(36),o=i(48),a=i(47);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,r(e)-i),o(t,s(e)+n),t}},function(t,e,i){var s=i(79),r=i(36),o=i(80),a=i(47);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,r(e)-i),o(t,s(e)+n),t}},function(t,e,i){var s=i(36),r=i(38),o=i(47),a=i(45);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),o(t,s(e)-i),a(t,r(e)-n),t}},function(t,e,i){var s=i(35),r=i(37),o=i(48),a=i(46);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,r(e)+i),o(t,s(e)+n),t}},function(t,e,i){var s=i(79),r=i(37),o=i(80),a=i(46);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,r(e)+i),o(t,s(e)+n),t}},function(t,e,i){var s=i(37),r=i(38),o=i(46),a=i(45);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),o(t,s(e)+i),a(t,r(e)-n),t}},function(t,e,i){var s=i(77),r=i(38),o=i(48),a=i(78);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,s(e)+i),o(t,r(e)-n),t}},function(t,e,i){var s=i(36),r=i(38),o=i(48),a=i(46);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,s(e)-i),o(t,r(e)-n),t}},function(t,e,i){var s=i(37),r=i(38),o=i(48),a=i(47);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,s(e)+i),o(t,r(e)-n),t}},function(t,e,i){var n=i(107),r=[];r[n.BOTTOM_CENTER]=i(266),r[n.BOTTOM_LEFT]=i(267),r[n.BOTTOM_RIGHT]=i(268),r[n.CENTER]=i(269),r[n.LEFT_CENTER]=i(271),r[n.RIGHT_CENTER]=i(272),r[n.TOP_CENTER]=i(273),r[n.TOP_LEFT]=i(274),r[n.TOP_RIGHT]=i(275),r[n.LEFT_BOTTOM]=r[n.BOTTOM_LEFT],r[n.LEFT_TOP]=r[n.TOP_LEFT],r[n.RIGHT_BOTTOM]=r[n.BOTTOM_RIGHT],r[n.RIGHT_TOP]=r[n.TOP_RIGHT];t.exports=function(t,e,i,n,s){return r[i](t,e,n,s)}},function(t,e,i){var s=i(35),r=i(77),o=i(48),a=i(78);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,r(e)+i),o(t,s(e)+n),t}},function(t,e,i){var s=i(35),r=i(36),o=i(48),a=i(46);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,r(e)-i),o(t,s(e)+n),t}},function(t,e,i){var s=i(35),r=i(37),o=i(48),a=i(47);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,r(e)+i),o(t,s(e)+n),t}},function(t,e,i){var s=i(270),r=i(77),o=i(79);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),s(t,r(e)+i,o(e)+n),t}},function(t,e,i){var n=i(78),s=i(80);t.exports=function(t,e,i){return n(t,e),s(t,i)}},function(t,e,i){var s=i(79),r=i(36),o=i(80),a=i(46);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,r(e)-i),o(t,s(e)+n),t}},function(t,e,i){var s=i(79),r=i(37),o=i(80),a=i(47);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),a(t,r(e)+i),o(t,s(e)+n),t}},function(t,e,i){var s=i(77),r=i(38),o=i(78),a=i(45);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),o(t,s(e)+i),a(t,r(e)-n),t}},function(t,e,i){var s=i(36),r=i(38),o=i(46),a=i(45);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),o(t,s(e)-i),a(t,r(e)-n),t}},function(t,e,i){var s=i(37),r=i(38),o=i(47),a=i(45);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),o(t,s(e)+i),a(t,r(e)-n),t}},function(t,e,i){var s=i(157),r=i(89),o=i(13),a=i(4);t.exports=function(t,e,i){void 0===i&&(i=new a);var n=r(e,0,o.PI2);return s(t,n,i)}},function(t,e,i){var o=i(278),a=i(157),h=i(89),u=i(13);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&0=t.right&&(o=1,r+=s-t.right,s=t.right);break;case 1:(r+=e)>=t.bottom&&(o=2,s-=r-t.bottom,r=t.bottom);break;case 2:(s-=e)<=t.left&&(o=3,r-=t.left-s,s=t.left);break;case 3:(r-=e)<=t.top&&(o=0,r=t.top)}return n}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;ne.length&&(r=e.length),i?(n=e[r-1][i],(s=e[r][i])-t<=t-n?e[r]:e[r-1]):(n=e[r-1],(s=e[r])-t<=t-n?s:n)}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=n,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0}});t.exports=n},function(t,e){t.exports=function(t){var i=/\D/g;return t.sort(function(t,e){return parseInt(t.replace(i,""),10)-parseInt(e.replace(i,""),10)}),t}},function(t,e,i){var n=i(170),s=i(0),r=i(121),o=i(12),a=i(120),h=i(21),T=i(2),d=i(6),f=i(171),p=i(301),u=new s({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 n,s=this.anims,r=this.mixes,o="string"==typeof t?t:t.key,a="string"==typeof e?e:e.key;return s.has(o)&&s.has(a)&&((n=(n=r.get(o))||{})[a]=i,r.set(o,n)),this},removeMix:function(t,e){var i,n=this.mixes,s="string"==typeof t?t:t.key,r=n.get(s);return r&&(e?(i="string"==typeof e?e:e.key,r.hasOwnProperty(i)&&delete r[i]):e||n.delete(s)),this},getMix:function(t,e){var i=this.mixes,n="string"==typeof t?t:t.key,s="string"==typeof e?e:e.key,r=i.get(n);return r&&r.hasOwnProperty(s)?r[s]:0},add:function(t,e){return this.anims.has(t)?console.warn("Animation key exists: "+t):(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(g,v){var m=[],t=this.game.cache.json.get(g);if(!t)return m;var y=this,e=d(t,"meta",null),x=d(t,"frames",null);return e&&x&&d(e,"frameTags",[]).forEach(function(t){var e=[],i=T(t,"name",null),n=T(t,"from",0),s=T(t,"to",0),r=T(t,"direction","forward");if(i&&(!v||v&&-1d.right&&(f=T(f,f+(e-d.right),this.lerp.x)),id.bottom&&(p=T(p,p+(i-d.bottom),this.lerp.y))):(f=T(f,e-u,this.lerp.x),p=T(p,i-l,this.lerp.y))),this.useBounds&&(f=this.clampX(f),p=this.clampY(p)),this.roundPixels&&(u=Math.round(u),l=Math.round(l));var g=(this.scrollX=f)+r,v=(this.scrollY=p)+o;this.midPoint.set(g,v);var m=n/a,y=s/a;this.worldView.setTo(g-m/2,v-y/2,m,y),h.applyITRS(this.x+u,this.y+l,this.rotation,a,a),h.translate(-u,-l),this.shakeEffect.preRender()},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,n,s,r){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===n&&(n=i),void 0===s&&(s=0),void 0===r&&(r=s),this._follow=t,this.roundPixels=e,i=l(i,0,1),n=l(n,0,1),this.lerp.set(i,n),this.followOffset.set(s,r);var o=this.width/2,a=this.height/2,h=t.x-s,u=t.y-r;return this.midPoint.set(h,u),this.scrollX=h-o,this.scrollY=u-a,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.clearRenderToTexture(),this.resetFX(),s.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=c},function(t,e,i){var o=i(32);t.exports=function(t){var e=new o;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,n){return e+e+i+i+n+n});var i,n,s,r=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return r&&(i=parseInt(r[1],16),n=parseInt(r[2],16),s=parseInt(r[3],16),e.setTo(i,n,s)),e}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},function(t,e){t.exports=function(t,e,i,n){void 0===n&&(n={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var s=Math.min(t,e,i),r=Math.max(t,e,i),o=r-s,a=0,h=0===r?0:o/r,u=r;return r!==s&&(r===t?a=(e-i)/o+(e>>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}}},function(t,e,i){var n=i(32);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var a=i(32);t.exports=function(t){var e,i,n,s,r=new a,o=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());return o&&(e=parseInt(o[1],10),i=parseInt(o[2],10),n=parseInt(o[3],10),s=void 0!==o[4]?parseFloat(o[4]):1,r.setTo(e,i,n,255*s)),r}},function(t,e,i){t.exports={Fade:i(684),Flash:i(685),Pan:i(686),Shake:i(719),RotateTo:i(720),Zoom:i(721)}},function(t,e,i){t.exports={In:i(687),Out:i(688),InOut:i(689)}},function(t,e,i){t.exports={In:i(690),Out:i(691),InOut:i(692)}},function(t,e,i){t.exports={In:i(693),Out:i(694),InOut:i(695)}},function(t,e,i){t.exports={In:i(696),Out:i(697),InOut:i(698)}},function(t,e,i){t.exports={In:i(699),Out:i(700),InOut:i(701)}},function(t,e,i){t.exports={In:i(702),Out:i(703),InOut:i(704)}},function(t,e,i){t.exports=i(705)},function(t,e,i){t.exports={In:i(706),Out:i(707),InOut:i(708)}},function(t,e,i){t.exports={In:i(709),Out:i(710),InOut:i(711)}},function(t,e,i){t.exports={In:i(712),Out:i(713),InOut:i(714)}},function(t,e,i){t.exports={In:i(715),Out:i(716),InOut:i(717)}},function(t,e,i){t.exports=i(718)},function(t,e,i){var n=i(0),a=i(34),h=i(327),u=i(2),l=i(6),c=i(7),d=i(178),f=i(1),p=i(182),g=i(172),s=new n({initialize:function(t){void 0===t&&(t={});this.width=l(t,"width",1024),this.height=l(t,"height",768),this.zoom=l(t,"zoom",1),this.resolution=l(t,"resolution",1),this.parent=l(t,"parent",void 0),this.scaleMode=l(t,"scaleMode",0),this.expandParent=l(t,"expandParent",!0),this.autoRound=l(t,"autoRound",!1),this.autoCenter=l(t,"autoCenter",0),this.resizeInterval=l(t,"resizeInterval",500),this.fullscreenTarget=l(t,"fullscreenTarget",null),this.minWidth=l(t,"minWidth",0),this.maxWidth=l(t,"maxWidth",0),this.minHeight=l(t,"minHeight",0),this.maxHeight=l(t,"maxHeight",0);var e=l(t,"scale",null);e&&(this.width=l(e,"width",this.width),this.height=l(e,"height",this.height),this.zoom=l(e,"zoom",this.zoom),this.resolution=l(e,"resolution",this.resolution),this.parent=l(e,"parent",this.parent),this.scaleMode=l(e,"mode",this.scaleMode),this.expandParent=l(e,"expandParent",this.expandParent),this.autoRound=l(e,"autoRound",this.autoRound),this.autoCenter=l(e,"autoCenter",this.autoCenter),this.resizeInterval=l(e,"resizeInterval",this.resizeInterval),this.fullscreenTarget=l(e,"fullscreenTarget",this.fullscreenTarget),this.minWidth=l(e,"min.width",this.minWidth),this.maxWidth=l(e,"max.width",this.maxWidth),this.minHeight=l(e,"min.height",this.minHeight),this.maxHeight=l(e,"max.height",this.maxHeight)),this.renderType=l(t,"type",a.AUTO),this.canvas=l(t,"canvas",null),this.context=l(t,"context",null),this.canvasStyle=l(t,"canvasStyle",null),this.customEnvironment=l(t,"customEnvironment",!1),this.sceneConfig=l(t,"scene",null),this.seed=l(t,"seed",[(Date.now()*Math.random()).toString()]),d.RND=new d.RandomDataGenerator(this.seed),this.gameTitle=l(t,"title",""),this.gameURL=l(t,"url","https://phaser.io"),this.gameVersion=l(t,"version",""),this.autoFocus=l(t,"autoFocus",!0),this.domCreateContainer=l(t,"dom.createContainer",!1),this.domBehindCanvas=l(t,"dom.behindCanvas",!1),this.inputKeyboard=l(t,"input.keyboard",!0),this.inputKeyboardEventTarget=l(t,"input.keyboard.target",window),this.inputKeyboardCapture=l(t,"input.keyboard.capture",[]),this.inputMouse=l(t,"input.mouse",!0),this.inputMouseEventTarget=l(t,"input.mouse.target",null),this.inputMouseCapture=l(t,"input.mouse.capture",!0),this.inputTouch=l(t,"input.touch",h.input.touch),this.inputTouchEventTarget=l(t,"input.touch.target",null),this.inputTouchCapture=l(t,"input.touch.capture",!0),this.inputActivePointers=l(t,"input.activePointers",1),this.inputSmoothFactor=l(t,"input.smoothFactor",0),this.inputWindowEvents=l(t,"input.windowEvents",!0),this.inputGamepad=l(t,"input.gamepad",!1),this.inputGamepadEventTarget=l(t,"input.gamepad.target",window),this.disableContextMenu=l(t,"disableContextMenu",!1),this.audio=l(t,"audio"),this.hideBanner=!1===l(t,"banner",null),this.hidePhaser=l(t,"banner.hidePhaser",!1),this.bannerTextColor=l(t,"banner.text","#ffffff"),this.bannerBackgroundColor=l(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=l(t,"fps",null);var i=l(t,"render",t);this.antialias=l(i,"antialias",!0),this.antialiasGL=l(i,"antialiasGL",!0),this.mipmapFilter=l(i,"mipmapFilter","LINEAR"),this.desynchronized=l(i,"desynchronized",!1),this.roundPixels=l(i,"roundPixels",!1),this.pixelArt=l(i,"pixelArt",1!==this.zoom),this.pixelArt&&(this.antialias=!1,this.roundPixels=!0),this.transparent=l(i,"transparent",!1),this.clearBeforeRender=l(i,"clearBeforeRender",!0),this.premultipliedAlpha=l(i,"premultipliedAlpha",!0),this.failIfMajorPerformanceCaveat=l(i,"failIfMajorPerformanceCaveat",!1),this.powerPreference=l(i,"powerPreference","default"),this.batchSize=l(i,"batchSize",4096),this.maxTextures=l(i,"maxTextures",-1),this.maxLights=l(i,"maxLights",10);var n=l(t,"backgroundColor",0);this.backgroundColor=g(n),0===n&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=l(t,"callbacks.preBoot",f),this.postBoot=l(t,"callbacks.postBoot",f),this.physics=l(t,"physics",{}),this.defaultPhysicsSystem=l(this.physics,"default",!1),this.loaderBaseURL=l(t,"loader.baseURL",""),this.loaderPath=l(t,"loader.path",""),this.loaderMaxParallelDownloads=l(t,"loader.maxParallelDownloads",32),this.loaderCrossOrigin=l(t,"loader.crossOrigin",void 0),this.loaderResponseType=l(t,"loader.responseType",""),this.loaderAsync=l(t,"loader.async",!0),this.loaderUser=l(t,"loader.user",""),this.loaderPassword=l(t,"loader.password",""),this.loaderTimeout=l(t,"loader.timeout",0),this.loaderWithCredentials=l(t,"loader.withCredentials",!1),this.installGlobalPlugins=[],this.installScenePlugins=[];var s=l(t,"plugins",null),r=p.DefaultScene;s&&(Array.isArray(s)?this.defaultPlugins=s:c(s)&&(this.installGlobalPlugins=u(s,"global",[]),this.installScenePlugins=u(s,"scene",[]),Array.isArray(s.default)?r=s.default:Array.isArray(s.defaultMerge)&&(r=r.concat(s.defaultMerge)))),this.defaultPlugins=r;var o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=l(t,"images.default",o+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=l(t,"images.missing",o+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),window&&(window.FORCE_WEBGL?this.renderType=a.WEBGL:window.FORCE_CANVAS&&(this.renderType=a.CANVAS))}});t.exports=s},function(t,e,i){t.exports={os:i(124),browser:i(125),features:i(177),input:i(752),audio:i(753),video:i(754),fullscreen:i(755),canvasFeatures:i(328)}},function(t,e,i){var n,s,r,o=i(26),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var i=new Image;i.onload=function(){var t=o.create(i,6,1).getContext("2d");if(t.globalCompositeOperation="multiply",t.drawImage(r,0,0),t.drawImage(i,2,0),!t.getImageData(2,0,1,1))return!1;var e=t.getImageData(2,0,1,1).data;o.remove(i),a.supportNewBlendModes=255===e[0]&&0===e[1]&&0===e[2]},i.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");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);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},function(t,e){t.exports=function(t){return 0<=(t%=2*Math.PI)?t:t+2*Math.PI}},function(t,e){t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return s*s+r*r}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),e-ir[0]&&(e=1),r[8]>r[3*e+e]&&(e=2),i=a[e],n=a[i],s=Math.sqrt(r[3*e+e]-r[3*i+i]-r[3*n+n]+1),h[e]=.5*s,s=.5/s,h[i]=(r[3*i+e]+r[3*e+i])*s,h[n]=(r[3*n+e]+r[3*e+n])*s,this.x=h[0],this.y=h[1],this.z=h[2],this.w=(r[3*n+i]-r[3*i+n])*s),this}});t.exports=d},function(t,e,a){var h=a(349),u=a(26),l=a(34),c=a(177);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===l.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==l.HEADLESS)if(e.renderType===l.CANVAS||e.renderType!==l.CANVAS&&!c.webGL){if(!c.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");e.renderType=l.CANVAS}else e.renderType=l.WEBGL;e.antialias||u.disableSmoothing();var i,n,s=t.scale.baseSize,r=s.width,o=s.height;e.canvas?(t.canvas=e.canvas,t.canvas.width=r,t.canvas.height=o):t.canvas=u.create(t,r,o,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||h.setCrisp(t.canvas),e.renderType!==l.HEADLESS&&(i=a(531),n=a(534),e.renderType===l.WEBGL?t.renderer=new n(t):(t.renderer=new i(t),t.context=t.renderer.gameContext))}},function(t,e){t.exports={setCrisp:function(e){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach(function(t){e.style["image-rendering"]=t}),e.style.msInterpolationMode="nearest-neighbor",e},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},function(t,e,i){var u=i(34);t.exports=function(t){var e,i,n,s,r,o,a,h=t.config;h.hideBanner||(e="WebGL",h.renderType===u.CANVAS?e="Canvas":h.renderType===u.HEADLESS&&(e="Headless"),i=h.audio,a=!(n=t.device.audio).webAudio||i&&i.disableWebAudio?i&&i.noAudio||!n.webAudio&&!n.audioData?"No Audio":"HTML5 Audio":"Web Audio",t.device.browser.ie?window.console&&console.log("Phaser v"+u.VERSION+" / https://phaser.io"):(r=[s=""],Array.isArray(h.bannerBackgroundColor)?(h.bannerBackgroundColor.forEach(function(t){s=s.concat("%c "),r.push("background: "+t),o=t}),r[r.length-1]="color: "+h.bannerTextColor+"; background: "+o):(s=s.concat("%c "),r.push("color: "+h.bannerTextColor+"; background: "+h.bannerBackgroundColor)),r.push("background: #fff"),h.gameTitle&&(s=s.concat(h.gameTitle),h.gameVersion&&(s=s.concat(" v"+h.gameVersion)),h.hidePhaser||(s=s.concat(" / "))),h.hidePhaser||(s=s.concat("Phaser v"+u.VERSION+" ("+e+" | "+a+")")),s=s.concat(" %c "+h.gameURL),r[0]=s,console.log.apply(console,r)))}},function(t,e,i){var n=i(0),s=i(6),r=i(1),o=i(352),a=new n({initialize:function(t,e){this.game=t,this.raf=new o,this.started=!1,this.running=!1,this.minFps=s(e,"min",5),this.targetFps=s(e,"target",60),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=s(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=s(e,"deltaHistory",10),this.panicMax=s(e,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=s(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;for(var e=this.framesThisSecond=0;ethis._min&&(r=n[i],r=Math.min(r,this._min)),n[i]=r,this.deltaIndex++,this.deltaIndex>s&&(this.deltaIndex=0);for(var a=o=0;athis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var h=o/this._target;this.callback(t,o,h),this.lastTime=t,this.frame++},tick:function(){this.step()},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running||(t&&(this.startTime+=-this.lastTime+(this.lastTime+window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step())},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.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0,this.target=0;var n=this;this.step=function t(){var e=window.performance.now();n.lastTime=n.tick,n.tick=e,n.callback(e),n.timeOutID=window.requestAnimationFrame(t)},this.stepTimeout=function t(){var e=Date.now(),i=Math.min(Math.max(2*n.target+n.tick-e,0),n.target);n.lastTime=n.tick,n.tick=e,n.callback(e),n.timeOutID=window.setTimeout(t,i)}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.target=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=s}});t.exports=r},function(t,e,i){var n=i(21);t.exports=function(t){var e,i=t.events;void 0!==document.hidden?e="visibilitychange":["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(n.HIDDEN):i.emit(n.VISIBLE)},!1),window.onblur=function(){i.emit(n.BLUR)},window.onfocus=function(){i.emit(n.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},function(t,e,i){var m=i(355),y=i(26),x=i(6);t.exports=function(t){var e=x(t,"data",[]),i=x(t,"canvas",null),n=x(t,"palette",m),s=x(t,"pixelWidth",1),r=x(t,"pixelHeight",s),o=x(t,"resizeCanvas",!0),a=x(t,"clearCanvas",!0),h=x(t,"preRender",null),u=x(t,"postRender",null),l=Math.floor(Math.abs(e[0].length*s)),c=Math.floor(Math.abs(e.length*r));i||(i=y.create2D(this,l,c),a=o=!1),o&&(i.width=l,i.height=c);var d=i.getContext("2d");a&&d.clearRect(0,0,l,c),h&&h(i,d);for(var f=0;fi.length-2?i.length-1:s+1],u=i[s>i.length-3?i.length-1:s+2];return e.set(l(r,o.x,a.x,h.x,u.x),l(r,o.y,a.y,h.y,u.y))},toJSON:function(){for(var t=[],e=0;ei.width?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE;if("number"==typeof window.orientation)return 0===window.orientation||180===window.orientation?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return s.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return s.ORIENTATION.LANDSCAPE}return tthis.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var e=this.listeners;window.removeEventListener("orientationchange",e.orientationChange,!1),window.removeEventListener("resize",e.windowResize,!1);["webkit","moz",""].forEach(function(t){document.removeEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.removeEventListener(t+"fullscreenerror",e.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",e.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===c.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===c.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=v},function(t,e,i){var n=i(17),s=i(0),r=i(94),o=i(3),a=new s({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=null),this._width=t,this._height=e,this._parent=n,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=n(t,0,this.maxWidth),this.minHeight=n(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=n(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=n(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=n(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=n(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 n=this.snapTo,s=0===e?1:t/e;return i&&this.aspectRatio>s||!i&&this.aspectRatios)&&(t=(e=r(e,n.y))*this.aspectRatio,0r.START&&n.settings.status<=r.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e=r.LOADING&&i.settings.status=r.x&&t=r.y&&e=r.x&&t=r.y&&e=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s>4,u[a++]=(15&i)<<4|n>>2,u[a++]=(3&n)<<6|63&s;return h}},function(t,e,i){var n=i(135),s=i(0),r=i(61),o=new s({Extends:n,initialize:function(t,e,i){if(void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),!this.audioBuffer)throw new Error('There is no audio asset with key "'+e+'" in the audio cache');this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,n.call(this,t,e,i)},play:function(t,e){return!!n.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(r.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime>>16,v=(65280&d)>>>8,m=255&d,u.strokeStyle="rgba("+g+","+v+","+m+","+l+")",u.lineWidth=p,y+=3;break;case x.FILL_STYLE:f=a[y+1],c=a[y+2],g=(16711680&f)>>>16,v=(65280&f)>>>8,m=255&f,u.fillStyle="rgba("+g+","+v+","+m+","+c+")",y+=2;break;case x.BEGIN_PATH:u.beginPath();break;case x.CLOSE_PATH:u.closePath();break;case x.FILL_PATH:o||u.fill();break;case x.STROKE_PATH:o||u.stroke();break;case x.FILL_RECT:o?u.rect(a[y+1],a[y+2],a[y+3],a[y+4]):u.fillRect(a[y+1],a[y+2],a[y+3],a[y+4]),y+=4;break;case x.FILL_TRIANGLE:u.beginPath(),u.moveTo(a[y+1],a[y+2]),u.lineTo(a[y+3],a[y+4]),u.lineTo(a[y+5],a[y+6]),u.closePath(),o||u.fill(),y+=6;break;case x.STROKE_TRIANGLE:u.beginPath(),u.moveTo(a[y+1],a[y+2]),u.lineTo(a[y+3],a[y+4]),u.lineTo(a[y+5],a[y+6]),u.closePath(),o||u.stroke(),y+=6;break;case x.LINE_TO:u.lineTo(a[y+1],a[y+2]),y+=2;break;case x.MOVE_TO:u.moveTo(a[y+1],a[y+2]),y+=2;break;case x.LINE_FX_TO:u.lineTo(a[y+1],a[y+2]),y+=5;break;case x.MOVE_FX_TO:u.moveTo(a[y+1],a[y+2]),y+=5;break;case x.SAVE:u.save();break;case x.RESTORE:u.restore();break;case x.TRANSLATE:u.translate(a[y+1],a[y+2]),y+=2;break;case x.SCALE:u.scale(a[y+1],a[y+2]),y+=2;break;case x.ROTATE:u.rotate(a[y+1]),y+=1;break;case x.GRADIENT_FILL_STYLE:y+=5;break;case x.GRADIENT_LINE_STYLE:y+=6;break;case x.SET_TEXTURE:y+=2}}u.restore()}}},function(t,e,i){var n=i(0),s=i(126),r=i(71),o=i(2),a=i(59),h=new n({initialize:function(t,e,i,n){void 0===n&&(n=!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=n,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,e,i,n=this.propertyValue,s=typeof n;return"number"==s?(this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate):Array.isArray(n)?this.onEmit=this.randomStaticValueEmit:"function"==s?this.emitOnly?this.onEmit=n:this.onUpdate=n:"object"==s&&(this.has(n,"random")||this.hasBoth(n,"start","end")||this.hasBoth(n,"min","max"))?(this.start=this.has(n,"start")?n.start:n.min,this.end=this.has(n,"end")?n.end:n.max,(t=this.hasBoth(n,"min","max")||!!n.random)&&(e=n.random,Array.isArray(e)&&(this.start=e[0],this.end=e[1]),this.onEmit=this.randomRangedValueEmit),this.has(n,"steps")?(this.steps=n.steps,this.counter=this.start,this.onEmit=this.steppedEmit):(i=this.has(n,"ease")?n.ease:"Linear",this.ease=r(i),t||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate)):"object"==s&&this.hasEither(n,"onEmit","onUpdate")&&(this.has(n,"onEmit")&&(this.onEmit=n.onEmit),this.has(n,"onUpdate")&&(this.onUpdate=n.onUpdate)),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,n){return n},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=s(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){var i;return t&&t.data[e]&&((i=t.data[e]).min=this.start,i.max=this.end),this.start},easeValueUpdate:function(t,e,i){var n=t.data[e];return(n.max-n.min)*this.ease(i)+n.min}});t.exports=h},function(t,e,i){var n=i(0),o=i(2),s=new n({initialize:function(t,e,i,n,s){var r;"object"==typeof t?(t=o(r=t,"x",0),e=o(r,"y",0),i=o(r,"power",0),n=o(r,"epsilon",100),s=o(r,"gravity",50)):(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===s&&(s=50)),this.x=t,this.y=e,this.active=!0,this._gravity=s,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i,n,s=this.x-t.x,r=this.y-t.y,o=s*s+r*r;0!==o&&(i=Math.sqrt(o),oe.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(0this._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=n},function(t,e){t.exports=function(t,e){for(var i=0;id.PI2?s=d.PI2:s<0&&(s=d.PI2+s%d.PI2);for(var a,h=[r+Math.cos(n)*i,o+Math.sin(n)*i];e<1;)a=s*e+n,h.push(r+Math.cos(a)*i,o+Math.sin(a)*i),e+=t;return a=s+n,h.push(r+Math.cos(a)*i,o+Math.sin(a)*i),h.push(r+Math.cos(n)*i,o+Math.sin(n)*i),this.pathIndexes=l(h),this.pathData=h,this}});t.exports=r},function(t,e,i){var n=i(0),s=i(1019),r=i(60),o=i(9),a=i(30),h=new n({Extends:a,Mixins:[s],initialize:function(t,e,i,n,s,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Curve",n),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(e,i),void 0!==s&&this.setFillStyle(s,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=[],n=this.geom.getPoints(e),s=0;st.right||e.rightt.bottom||e.bottome.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottomt.width*t.height)&&(e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(s.BUTTON_DOWN,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(s.BUTTON_UP,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=r},function(t,e,i){var a=i(471),h=i(472),n=i(0),u=i(12),l=i(3),s=new n({Extends:u,initialize:function(t,e){u.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],n=0;n=s;for(this.fixedStep||(n=.001*e,o=!0,this._elapsed=0),h=0;h=s;)this._elapsed-=s,this.step(n)}},step:function(t){for(var e,i=this.bodies.entries,n=i.length,s=0;sc)&&(d.xl))return this.separateCircle(t,e,s)}var f=!1,p=!1;s?(f=A(t,e,s,this.OVERLAP_BIAS),p=C(t,e,s,this.OVERLAP_BIAS)):this.forceX||Math.abs(this.gravity.y+t.gravity.y)=e.right||t.position.y>=e.bottom))},circleBodyIntersects:function(t,e){var i=p(t.center.x,e.left,e.right),n=p(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o;t.isParent&&void 0===t.physicsType&&(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var a=Array.isArray(t),h=Array.isArray(e);if(this._total=0,a||h)if(!a&&h)for(o=0;od.baseTileWidth&&(h-=a=(d.tileWidth-d.baseTileWidth)*e.scaleX,l+=a),d.tileHeight>d.baseTileHeight&&(c+=(d.tileHeight-d.baseTileHeight)*e.scaleY);var f=e.getTilesWithinWorldXY(h,u,l,c);return 0!==f.length&&this.collideSpriteVsTilesHandler(t,f,i,n,s,r,!0)},collideSpriteVsTilesHandler:function(t,e,i,n,s,r,o){for(var a,h,u=t.body,l={left:0,right:0,top:0,bottom:0},c=!1,d=0;de.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,r=this.blocked.right=!0),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,r=this.blocked.down=!0),r&&(this.blocked.none=!1),r},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this.updateCenter(),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n,s,r=this.gameObject;return!t&&r.frame&&(t=r.frame.realWidth),!e&&r.frame&&(e=r.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&&r.getCenter&&(n=(r.width-t)/2,s=(r.height-e)/2,this.offset.set(n,s)),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),0=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 0=t.minX&&e.maxY>=t.minY}function p(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,s){for(var r,o=[e,i];o.length;)(i=o.pop())-(e=o.pop())<=n||(r=e+Math.ceil((i-e)/n/2)*n,a(t,r,e,i,s),o.push(e,r,r,i))}n.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!u(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;sthis._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),o=p(i.children.splice(r,i.children.length-r));o.height=i.height,o.leaf=i.leaf,f(i,this.toBBox),f(o,this.toBBox),e?t[e-1].children.push(o):this._splitRoot(i,o)},_splitRoot:function(t,e){this.data=p([t,e]),this.data.height=t.height+1,this.data.leaf=!1,f(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){for(var n,s,r,o,a,h,u,l,c,d,f,p,g=a=1/0,v=e;v<=i-e;v++)n=m(t,0,v,this.toBBox),s=m(t,v,i,this.toBBox),u=n,l=s,p=f=d=c=void 0,c=Math.max(u.minX,l.minX),d=Math.max(u.minY,l.minY),f=Math.min(u.maxX,l.maxX),p=Math.min(u.maxY,l.maxY),r=Math.max(0,f-c)*Math.max(0,p-d),o=y(n)+y(s),re.deltaAbsY()?g=-1:e.deltaAbsX()i&&s<(o=t.right-i)&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:c(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):0i&&s<(o=t.bottom-i)&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:c(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):0=r.layers.length){if(s.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}r=s.pop()}else{var o,a=r.layers[r.i];if(r.i++,"tilelayer"===a.type)if(a.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+a.name+"'");else{if(a.encoding&&"base64"===a.encoding){if(a.chunks)for(var h=0;h>>0;return n}},function(t,e,i){var h=i(2),u=i(153);t.exports=function(t){for(var e=[],i=[],n=u(t);n.i=n.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}n=i.pop()}else{var s,r,o,a=n.layers[n.i];n.i++,"imagelayer"===a.type?(s=h(a,"offsetx",0)+h(a,"startx",0),r=h(a,"offsety",0)+h(a,"starty",0),e.push({name:n.name+a.name,image:a.image,x:n.x+s+a.x,y:n.y+r+a.y,alpha:n.opacity*a.opacity,visible:n.visible&&a.visible,properties:h(a,"properties",{})})):"group"===a.type&&(o=u(t,a,n),i.push(n),n=o)}return e}},function(t,e,i){var x=i(106),T=i(512),w=i(237);t.exports=function(t){for(var e,i=[],n=[],s=null,r=0;r=this.firstgid&&t=n.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}n=i.pop()}else{var s,r=n.layers[n.i];if(n.i++,r.opacity*=n.opacity,r.visible=n.visible&&r.visible,"objectgroup"===r.type){r.name=n.name+r.name;for(var o=n.x+d(r,"startx",0)+d(r,"offsetx",0),a=n.y+d(r,"starty",0)+d(r,"offsety",0),h=[],u=0;un&&(n=e.layer[r].width),e.layer[r].height>s&&(s=e.layer[r].height);var o=new h({width:n,height:s,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:a.WELTMEISTER});return o.layers=u(e,i),o.tilesets=l(e),o}},function(t,e,i){var d=i(104),f=i(75);t.exports=function(t,e){for(var i=[],n=0;nx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(1===m)for(h=0;hx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(2===m)for(h=f-1;0<=h;h--)for(u=0;ux||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(3===m)for(h=f-1;0<=h;h--)for(u=d-1;0<=u;u--)!(a=v[h][u])||a.indexx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));return this.dirty[e]=!1,null===r&&(r=n.createVertexBuffer(o,s.STATIC_DRAW),this.vertexBuffer[e]=r),n.setVertexBuffer(r),i.setAttribPointers(),s.bufferSubData(s.ARRAY_BUFFER,0,o),this},batchTile:function(t,e,i,n,s,r,o){var a=i.getTileTextureCoordinates(e.index);if(!a)return t;var h=i.tileWidth,u=i.tileHeight,l=h/2,c=u/2,d=a.x/n,f=a.y/s,p=(a.x+h)/n,g=(a.y+u)/s,v=this._tempMatrix,m=-l,y=-c;e.flipX&&(h*=-1,m+=i.tileWidth),e.flipY&&(u*=-1,y+=i.tileHeight);var x=m+h,T=y+u;v.applyITRS(l+e.pixelX,c+e.pixelY,e.rotation,1,1);var w=L.getTintAppendFloatAlpha(16777215,r.alpha*this.alpha*e.alpha),E=v.getX(m,y),_=v.getY(m,y),b=v.getX(m,T),S=v.getY(m,T),A=v.getX(x,T),C=v.getY(x,T),M=v.getX(x,y),O=v.getY(x,y);r.roundPixels&&(E=Math.round(E),_=Math.round(_),b=Math.round(b),S=Math.round(S),A=Math.round(A),C=Math.round(C),M=Math.round(M),O=Math.round(O));var R=this.vertexViewF32[o],P=this.vertexViewU32[o];return R[++t]=E,R[++t]=_,R[++t]=d,R[++t]=f,R[++t]=0,R[++t]=0,P[++t]=w,R[++t]=b,R[++t]=S,R[++t]=d,R[++t]=g,R[++t]=0,R[++t]=0,P[++t]=w,R[++t]=A,R[++t]=C,R[++t]=p,R[++t]=g,R[++t]=0,R[++t]=0,P[++t]=w,R[++t]=E,R[++t]=_,R[++t]=d,R[++t]=f,R[++t]=0,R[++t]=0,P[++t]=w,R[++t]=A,R[++t]=C,R[++t]=p,R[++t]=g,R[++t]=0,R[++t]=0,P[++t]=w,R[++t]=M,R[++t]=O,R[++t]=p,R[++t]=f,R[++t]=0,R[++t]=0,P[++t]=w,this.vertexCount[o]+=6,t},setRenderOrder:function(t){if("string"==typeof t&&(t=["right-down","left-down","right-up","left-up"].indexOf(t)),0<=t&&t<4){this._renderOrder=t;for(var e=0;ethis.vertexCapacity&&(this.flush(),x=!0,y=this.setTexture2D(m));var T=this.vertexViewF32,w=this.vertexViewU32,E=this.vertexCount*this.vertexComponentCount-1;return T[++E]=t,T[++E]=e,T[++E]=h,T[++E]=u,T[++E]=v,w[++E]=d,T[++E]=i,T[++E]=n,T[++E]=h,T[++E]=c,T[++E]=v,w[++E]=p,T[++E]=s,T[++E]=r,T[++E]=l,T[++E]=c,T[++E]=v,w[++E]=g,T[++E]=t,T[++E]=e,T[++E]=h,T[++E]=u,T[++E]=v,w[++E]=d,T[++E]=s,T[++E]=r,T[++E]=l,T[++E]=c,T[++E]=v,w[++E]=g,T[++E]=o,T[++E]=a,T[++E]=l,T[++E]=u,T[++E]=v,w[++E]=f,this.vertexCount+=6,x},batchTri:function(t,e,i,n,s,r,o,a,h,u,l,c,d,f,p,g){void 0===g&&(g=this.currentUnit);var v=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),v=!0,g=this.setTexture2D(p));var m=this.vertexViewF32,y=this.vertexViewU32,x=this.vertexCount*this.vertexComponentCount-1;return m[++x]=t,m[++x]=e,m[++x]=o,m[++x]=a,m[++x]=f,y[++x]=l,m[++x]=i,m[++x]=n,m[++x]=o,m[++x]=u,m[++x]=f,y[++x]=c,m[++x]=s,m[++x]=r,m[++x]=h,m[++x]=u,m[++x]=f,y[++x]=d,this.vertexCount+=3,v},bind:function(t){return void 0===t&&(t=!1),u.prototype.bind.call(this,t),this}});t.exports=l},,,,,function(t,e,i){i(545),i(546),i(547),i(548),i(549),i(550),i(551),i(552)},function(t,e){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 n=2<=arguments.length?arguments[1]:void 0,s=0;sthis.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.zoom<.001&&(e.zoom=.001)))},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},function(t,e,i){t.exports={Camera:i(305),BaseCamera:i(92),CameraManager:i(722),Effects:i(313),Events:i(42)}},function(t,e){t.exports="cameradestroy"},function(t,e){t.exports="camerafadeincomplete"},function(t,e){t.exports="camerafadeinstart"},function(t,e){t.exports="camerafadeoutcomplete"},function(t,e){t.exports="camerafadeoutstart"},function(t,e){t.exports="cameraflashcomplete"},function(t,e){t.exports="cameraflashstart"},function(t,e){t.exports="camerapancomplete"},function(t,e){t.exports="camerapanstart"},function(t,e){t.exports="postrender"},function(t,e){t.exports="prerender"},function(t,e){t.exports="camerarotatecomplete"},function(t,e){t.exports="camerarotatestart"},function(t,e){t.exports="camerashakecomplete"},function(t,e){t.exports="camerashakestart"},function(t,e){t.exports="camerazoomcomplete"},function(t,e){t.exports="camerazoomstart"},function(t,e,i){var n=i(17),s=i(0),u=i(42),r=new s({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,n,s,r,o,a){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=!1),void 0===o&&(o=null),void 0===a&&(a=this.camera.scene),!r&&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=n,this.blue=s,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=o,this._onUpdateScope=a;var h=t?u.FADE_OUT_START:u.FADE_IN_START;return this.camera.emit(h,this.camera,this,e,i,n,s),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsedthis.source?Math.abs(this.destination-this.source):Math.abs(this.destination+h)-this.source)<(l=this.source>this.destination?Math.abs(this.source-this.destination):Math.abs(this.source+h)-this.destination)?this.clockwise=!0:lMath.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},function(t,e,i){var n=i(126);t.exports=function(){return n(-Math.PI,Math.PI)}},function(t,e,i){var n=i(126);t.exports=function(){return n(-180,180)}},function(t,e,i){var n=i(331);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(13);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(e>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return 2.3283064365386963e-10*((this.n=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;e=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}s++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getTangentAt(h,e)}s++}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 r([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 o(t.x,t.y)):this.add(new o(t,e))},toJSON:function(){for(var t=[],e=0;e>16&255,g:t>>8&255,b:255&t,a:255};return 16777215>>24),e}},function(t,e,i){var h=i(32),u=i(365);t.exports=function(t,e,i){var n,s,r=i,o=i,a=i;return 0!==e&&(r=u(s=2*i-(n=i<.5?i*(1+e):i+e-i*e),n,t+1/3),o=u(s,n,t),a=u(s,n,t-1/3)),(new h).setGLTo(r,o,a,1)}},function(t,e,i){var s=i(174);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}},function(t,e,i){function o(t,e,i,n,s,r,o,a){void 0===o&&(o=100),void 0===a&&(a=0);var h=a/o;return{r:u(t,n,h),g:u(e,s,h),b:u(i,r,h)}}var u=i(123);t.exports={RGBWithRGB:o,ColorWithRGB:function(t,e,i,n,s,r){return void 0===s&&(s=100),void 0===r&&(r=0),o(t.r,t.g,t.b,e,i,n,s,r)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),o(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(180),s=i(32);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new s(n(t,e),n(t,e),n(t,e))}},function(t,e,i){var r=i(364);t.exports=function(t,e,i,n,s){return void 0===n&&(n=255),void 0===s&&(s="#"),"#"===s?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1):"0x"+r(n)+r(t)+r(e)+r(i)}},function(t,e,i){t.exports={BitmapMask:i(286),GeometryMask:i(287)}},function(t,e,i){var n={AddToDOM:i(130),DOMContentLoaded:i(366),GetInnerHeight:i(367),GetScreenOrientation:i(368),GetTarget:i(373),ParseXML:i(374),RemoveFromDOM:i(186),RequestAnimationFrame:i(352)};t.exports=n},function(t,e,i){t.exports={EventEmitter:i(845)}},function(t,e,i){var n=i(0),s=i(12),r=i(23),o=new n({Extends:s,initialize:function(){s.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",o,"events"),t.exports=o},function(t,e,i){var n=i(130),s=i(300),r=i(304),o=i(26),a=i(0),h=i(326),u=i(847),l=i(348),c=i(118),d=i(350),f=i(327),p=i(366),g=i(12),v=i(21),m=i(375),y=i(23),x=i(380),T=i(381),w=i(383),E=i(129),_=i(388),b=i(351),S=i(353),A=i(392),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 g,this.anims=new s(this),this.textures=new _(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=A.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(),l(this),u(this),d(this),n(this.canvas,this.config.parent),this.textures.once(E.READY,this.texturesReady,this),this.events.emit(v.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(v.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)),S(this);var t=this.events;t.on(v.HIDDEN,this.onHidden,this),t.on(v.VISIBLE,this.onVisible,this),t.on(v.BLUR,this.onBlur,this),t.on(v.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e);var n=this.renderer;n.preRender(),i.emit(v.PRE_RENDER,n,t,e),this.scene.render(n),n.postRender(),i.emit(v.POST_RENDER,n,t,e)},headlessStep:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e),i.emit(v.PRE_RENDER),i.emit(v.POST_RENDER)},onHidden:function(){this.loop.pause(),this.events.emit(v.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(v.RESUME)},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(v.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},function(t,e,i){var n=i(130);t.exports=function(t){var e,i=t.config;i.parent&&i.domCreateContainer&&((e=document.createElement("div")).style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: none;","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=e,n(e,i.parent))}},function(t,e){t.exports="boot"},function(t,e){t.exports="destroy"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameout"},function(t,e){t.exports="gameover"},function(t,e){t.exports="gameobjectdown"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameobjectmove"},function(t,e){t.exports="gameobjectout"},function(t,e){t.exports="gameobjectover"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="wheel"},function(t,e){t.exports="gameobjectup"},function(t,e){t.exports="gameobjectwheel"},function(t,e){t.exports="boot"},function(t,e){t.exports="process"},function(t,e){t.exports="update"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointerdownoutside"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="pointerupoutside"},function(t,e){t.exports="wheel"},function(t,e){t.exports="pointerlockchange"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="start"},function(t,e){t.exports="update"},function(t,e){t.exports="addfile"},function(t,e){t.exports="complete"},function(t,e){t.exports="filecomplete"},function(t,e){t.exports="filecomplete-"},function(t,e){t.exports="loaderror"},function(t,e){t.exports="load"},function(t,e){t.exports="fileprogress"},function(t,e){t.exports="postprocess"},function(t,e){t.exports="progress"},function(t,e){t.exports="start"},function(t,e,i){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"}},function(t,e){t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var s=i.getElementsByTagName("SubTexture"),r=0;r=t.length)throw new Error("Supplied index out of bounds");return n!==i&&(t.splice(n,1),t.splice(i,0,e)),e}},function(t,e){t.exports=function(t,e){var i,n,s=t.indexOf(e);return-1!==s&&st.length-1)throw new Error("Index out of bounds");var s=r(t,e);return i&&i.call(n,s),s}},function(t,e,i){var u=i(70);t.exports=function(t,e,i,n,s){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===s&&(s=t),u(t,e,i)){var r=i-e,o=t.splice(e,r);if(n)for(var a=0;a?@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"}},function(t,e,i){var T=i(6);t.exports=function(t,e){var i=e.width,n=e.height,s=Math.floor(i/2),r=Math.floor(n/2),o=T(e,"chars","");if(""!==o){var a=T(e,"image",""),h=T(e,"offset.x",0),u=T(e,"offset.y",0),l=T(e,"spacing.x",0),c=T(e,"spacing.y",0),d=T(e,"lineSpacing",0),f=T(e,"charsPerRow",null);null===f&&(f=t.sys.textures.getFrame(a).width/i)>o.length&&(f=o.length);for(var p=h,g=u,v={retroFont:!0,font:a,size:i,lineHeight:n+d,chars:{}},m=0,y=0;yr.vertexCapacity&&r.flush();for(var g=r.setGameObject(e),v=r.vertexViewF32,m=r.vertexViewU32,y=r.vertexCount*r.vertexComponentCount-1,x=0,T=e.tintFill,w=0;w=i&&t.x<=n&&t.y>=s&&t.y<=r}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===r&&(r=0),!(e>t.right+r||it.bottom+r||s=n&&(p.push(v),f=v)}var m=o[o.length-1];return y(f,m)i&&(i=a.x),a.xs&&(s=a.y),a.yn(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)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){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}},function(t,e,i){var r=i(9);t.exports=function(t,e,i,n,s){return void 0===s&&(s=new r),s.setTo(Math.min(t,i),Math.min(e,n),Math.abs(t-i),Math.abs(e-n))}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.centerX,e.y=t.centerY,e}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var r=i(176);t.exports=function(t,e,i){var n=t.centerX,s=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),r(t,n,s)}},function(t,e,i){var n=i(9),s=i(142);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(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}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){var a=i(4),h=i(41);t.exports=function(t,e,i){void 0===i&&(i=new a),e=h(e);var n=Math.sin(e),s=Math.cos(e),r=0=s||0=t.downTime+n)&&(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;it._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,n=0;n'),i.push(''),i.push(''),i.push(this.xhrLoader.responseText),i.push(""),i.push(""),i.push("");var n=[i.join("\n")],s=this;try{var r=new window.Blob(n,{type:"image/svg+xml;charset=utf-8"})}catch(t){return s.state=o.FILE_ERRORED,void s.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){u.revokeObjectURL(s.data),s.onProcessComplete()},this.data.onerror=function(){u.revokeObjectURL(s.data),s.onProcessError()},u.createObjectURL(this.data,r,"image/svg+xml")},addToCache:function(){var t=this.cache.addImage(this.key,this.data);this.pendingDestroy(t)}});s.register("htmlTexture",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;this.systems.events.off(a.UPDATE,this.step,this),t.events.emit(a.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,n){return this.manager.add(t,e,i,n)},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 n=this.manager.getScene(e);return n&&n.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)},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(a.SHUTDOWN,this.shutdown,this),t.off(a.POST_UPDATE,this.step,this),t.off(a.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(a.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});r.register("ScenePlugin",o,"scenePlugin"),t.exports=o},function(t,e,i){t.exports={Events:i(404),List:i(136),Map:i(121),ProcessQueue:i(195),RTree:i(490),Set:i(140),Size:i(382)}},function(t,e,i){var n=i(19),s=i(1320),r=n(!1,r={CanvasTexture:i(389),Events:i(129),FilterMode:s,Frame:i(96),Parsers:i(391),Texture:i(190),TextureManager:i(388),TextureSource:i(390)},s);t.exports=r},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){t.exports={Components:i(148),Parsers:i(1351),Formats:i(33),ImageCollection:i(512),ParseToTilemap:i(238),Tile:i(75),Tilemap:i(521),TilemapCreator:i(1365),TilemapFactory:i(1366),Tileset:i(106),LayerData:i(104),MapData:i(105),ObjectLayer:i(515),DynamicTilemapLayer:i(522),StaticTilemapLayer:i(523)}},function(t,e,i){var p=i(24),g=i(53);t.exports=function(t,e,i,n,s,r,o,a){t<0&&(t=0),e<0&&(e=0),void 0===o&&(o=!0);for(var h=p(t,e,i,n,null,a),u=s-t,l=r-e,c=0;c=t&&u.index<=e&&l(u,i)}n&&c(0,0,s.width,s.height,s)}}},function(t,e,i){var a=i(65),h=i(53),u=i(152);t.exports=function(t,e,i,n){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var s=0;s=s.delay&&(n=s.elapsed-s.delay,s.elapsed=s.delay,!s.hasDispatched&&s.callback&&(s.hasDispatched=!0,s.callback.apply(s.callbackScope,s.args)),0>2],s+=o[(3&i[r])<<4|i[r+1]>>4],s+=o[(15&i[r+1])<<2|i[r+2]>>6],s+=o[63&i[r+2]];return n%3==2?s=s.substring(0,s.length-1)+"=":n%3==1&&(s=s.substring(0,s.length-2)+"=="),s}},function(t,e,i){t.exports={Clone:i(69),Extend:i(19),GetAdvancedValue:i(15),GetFastValue:i(2),GetMinMaxValue:i(1391),GetValue:i(6),HasAll:i(1392),HasAny:i(421),HasValue:i(113),IsPlainObject:i(7),Merge:i(133),MergeRight:i(1393),Pick:i(513),SetValue:i(444)}},function(t,e,i){var o=i(6),a=i(17);t.exports=function(t,e,i,n,s){void 0===s&&(s=i);var r=o(t,e,s);return a(r,i,n)}},function(t,e){t.exports=function(t,e){for(var i=0;i + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.GameObjects.Components + */ + +module.exports = { + + Alpha: __webpack_require__(559), + AlphaSingle: __webpack_require__(279), + BlendMode: __webpack_require__(280), + ComputedSize: __webpack_require__(560), + Crop: __webpack_require__(561), + Depth: __webpack_require__(281), + Flip: __webpack_require__(562), + GetBounds: __webpack_require__(563), + Mask: __webpack_require__(285), + Origin: __webpack_require__(580), + PathFollower: __webpack_require__(581), + Pipeline: __webpack_require__(163), + ScrollFactor: __webpack_require__(288), + Size: __webpack_require__(582), + Texture: __webpack_require__(583), + TextureCrop: __webpack_require__(584), + Tint: __webpack_require__(585), + ToJSON: __webpack_require__(289), + Transform: __webpack_require__(290), + TransformMatrix: __webpack_require__(31), + Visible: __webpack_require__(291) + +}; + + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + "use strict"; @@ -2808,48 +2860,6 @@ if (true) { } -/***/ }), -/* 12 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.GameObjects.Components - */ - -module.exports = { - - Alpha: __webpack_require__(537), - AlphaSingle: __webpack_require__(273), - Animation: __webpack_require__(507), - BlendMode: __webpack_require__(276), - ComputedSize: __webpack_require__(556), - Crop: __webpack_require__(557), - Depth: __webpack_require__(277), - Flip: __webpack_require__(558), - GetBounds: __webpack_require__(559), - Mask: __webpack_require__(281), - Origin: __webpack_require__(576), - PathFollower: __webpack_require__(577), - Pipeline: __webpack_require__(161), - ScrollFactor: __webpack_require__(284), - Size: __webpack_require__(578), - Texture: __webpack_require__(579), - TextureCrop: __webpack_require__(580), - Tint: __webpack_require__(581), - ToJSON: __webpack_require__(285), - Transform: __webpack_require__(286), - TransformMatrix: __webpack_require__(30), - Visible: __webpack_require__(287) - -}; - - /***/ }), /* 13 */ /***/ (function(module, exports) { @@ -2953,10 +2963,10 @@ module.exports = MATH_CONST; */ var Class = __webpack_require__(0); -var ComponentsToJSON = __webpack_require__(285); +var ComponentsToJSON = __webpack_require__(289); var DataManager = __webpack_require__(118); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(91); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(29); /** * @classdesc @@ -3006,9 +3016,9 @@ var GameObject = new Class({ /** * The current state of this Game Object. - * + * * Phaser itself will never modify this value, although plugins may do so. - * + * * Use this property to track the state of a Game Object during its lifetime. For example, it could change from * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons. @@ -3178,9 +3188,9 @@ var GameObject = new Class({ /** * Sets the current state of this Game Object. - * + * * Phaser itself will never modify the State of a Game Object, although plugins may do so. - * + * * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'. * The state value should typically be an integer (ideally mapped to a constant * in your game code), but could also be a string. It is recommended to keep it light and simple. @@ -3285,7 +3295,7 @@ var GameObject = new Class({ * before setting the value. * * If the key doesn't already exist in the Data Manager then it is created. - * + * * When the value is first set, a `setdata` event is emitted from this Game Object. * * @method Phaser.GameObjects.GameObject#incData @@ -3315,7 +3325,7 @@ var GameObject = new Class({ * before setting the value. * * If the key doesn't already exist in the Data Manager then it is created. - * + * * When the value is first set, a `setdata` event is emitted from this Game Object. * * @method Phaser.GameObjects.GameObject#toggleData @@ -3453,7 +3463,7 @@ var GameObject = new Class({ * If you wish to only temporarily stop an object from receiving input then use * `disableInteractive` instead, as that toggles the interactive state, where-as * this erases it completely. - * + * * If you wish to resize a hit area, don't remove and then set it as being * interactive. Instead, access the hitarea object directly and resize the shape * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the @@ -3473,6 +3483,36 @@ var GameObject = new Class({ return this; }, + /** + * This callback is invoked when this Game Object is added to a Scene. + * + * Can be overriden by custom Game Objects, but be aware of some Game Objects that + * will use this, such as Sprites, to add themselves into the Update List. + * + * You can also listen for the `ADDED_TO_SCENE` event from this Game Object. + * + * @method Phaser.GameObjects.GameObject#addedToScene + * @since 3.50.0 + */ + addedToScene: function () + { + }, + + /** + * This callback is invoked when this Game Object is removed from a Scene. + * + * Can be overriden by custom Game Objects, but be aware of some Game Objects that + * will use this, such as Sprites, to removed themselves from the Update List. + * + * You can also listen for the `REMOVED_FROM_SCENE` event from this Game Object. + * + * @method Phaser.GameObjects.GameObject#removedFromScene + * @since 3.50.0 + */ + removedFromScene: function () + { + }, + /** * To be overridden by custom GameObjects. Allows base objects to be used in a Pool. * @@ -3599,7 +3639,6 @@ var GameObject = new Class({ if (!fromScene) { sys.displayList.remove(this); - sys.updateList.remove(this); } if (this.input) @@ -3661,7 +3700,7 @@ module.exports = GameObject; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH = __webpack_require__(176); +var MATH = __webpack_require__(178); var GetValue = __webpack_require__(6); /** @@ -3750,7 +3789,7 @@ module.exports = GetAdvancedValue; var Class = __webpack_require__(0); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(22); +var SceneEvents = __webpack_require__(20); /** * @classdesc @@ -3794,6 +3833,16 @@ var GameObjectCreator = new Class({ */ this.systems = scene.sys; + /** + * A reference to the Scene Event Emitter. + * + * @name Phaser.GameObjects.GameObjectCreator#events + * @type {Phaser.Events.EventEmitter} + * @protected + * @since 3.50.0 + */ + this.events = scene.sys.events; + /** * A reference to the Scene Display List. * @@ -3814,8 +3863,8 @@ var GameObjectCreator = new Class({ */ this.updateList; - scene.sys.events.once(SceneEvents.BOOT, this.boot, this); - scene.sys.events.on(SceneEvents.START, this.start, this); + this.events.once(SceneEvents.BOOT, this.boot, this); + this.events.on(SceneEvents.START, this.start, this); }, /** @@ -3831,7 +3880,7 @@ var GameObjectCreator = new Class({ this.displayList = this.systems.displayList; this.updateList = this.systems.updateList; - this.systems.events.once(SceneEvents.DESTROY, this.destroy, this); + this.events.once(SceneEvents.DESTROY, this.destroy, this); }, /** @@ -3845,7 +3894,7 @@ var GameObjectCreator = new Class({ */ start: function () { - this.systems.events.once(SceneEvents.SHUTDOWN, this.shutdown, this); + this.events.once(SceneEvents.SHUTDOWN, this.shutdown, this); }, /** @@ -3858,7 +3907,7 @@ var GameObjectCreator = new Class({ */ shutdown: function () { - this.systems.events.off(SceneEvents.SHUTDOWN, this.shutdown, this); + this.events.off(SceneEvents.SHUTDOWN, this.shutdown, this); }, /** @@ -3873,10 +3922,12 @@ var GameObjectCreator = new Class({ { this.shutdown(); - this.scene.sys.events.off(SceneEvents.START, this.start, this); + this.events.off(SceneEvents.START, this.start, this); this.scene = null; this.systems = null; + this.events = null; + this.displayList = null; this.updateList = null; } @@ -4200,27 +4251,32 @@ module.exports = Extend; */ /** - * @namespace Phaser.Core.Events + * @namespace Phaser.Scenes.Events */ module.exports = { - BLUR: __webpack_require__(560), - BOOT: __webpack_require__(561), - CONTEXT_LOST: __webpack_require__(562), - CONTEXT_RESTORED: __webpack_require__(563), - DESTROY: __webpack_require__(564), - FOCUS: __webpack_require__(565), - HIDDEN: __webpack_require__(566), - PAUSE: __webpack_require__(567), - POST_RENDER: __webpack_require__(568), - POST_STEP: __webpack_require__(569), - PRE_RENDER: __webpack_require__(570), - PRE_STEP: __webpack_require__(571), - READY: __webpack_require__(572), - RESUME: __webpack_require__(573), - STEP: __webpack_require__(574), - VISIBLE: __webpack_require__(575) + ADDED_TO_SCENE: __webpack_require__(729), + BOOT: __webpack_require__(730), + CREATE: __webpack_require__(731), + DESTROY: __webpack_require__(732), + PAUSE: __webpack_require__(733), + POST_UPDATE: __webpack_require__(734), + PRE_UPDATE: __webpack_require__(735), + READY: __webpack_require__(736), + REMOVED_FROM_SCENE: __webpack_require__(737), + RENDER: __webpack_require__(738), + RESUME: __webpack_require__(739), + SHUTDOWN: __webpack_require__(740), + SLEEP: __webpack_require__(741), + START: __webpack_require__(742), + TRANSITION_COMPLETE: __webpack_require__(743), + TRANSITION_INIT: __webpack_require__(744), + TRANSITION_OUT: __webpack_require__(745), + TRANSITION_START: __webpack_require__(746), + TRANSITION_WAKE: __webpack_require__(747), + UPDATE: __webpack_require__(748), + WAKE: __webpack_require__(749) }; @@ -4229,6 +4285,42 @@ module.exports = { /* 21 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Core.Events + */ + +module.exports = { + + BLUR: __webpack_require__(564), + BOOT: __webpack_require__(565), + CONTEXT_LOST: __webpack_require__(566), + CONTEXT_RESTORED: __webpack_require__(567), + DESTROY: __webpack_require__(568), + FOCUS: __webpack_require__(569), + HIDDEN: __webpack_require__(570), + PAUSE: __webpack_require__(571), + POST_RENDER: __webpack_require__(572), + POST_STEP: __webpack_require__(573), + PRE_RENDER: __webpack_require__(574), + PRE_STEP: __webpack_require__(575), + READY: __webpack_require__(576), + RESUME: __webpack_require__(577), + STEP: __webpack_require__(578), + VISIBLE: __webpack_require__(579) + +}; + + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. @@ -4237,12 +4329,12 @@ module.exports = { var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var Events = __webpack_require__(83); +var Events = __webpack_require__(84); var GetFastValue = __webpack_require__(2); -var GetURL = __webpack_require__(144); -var MergeXHRSettings = __webpack_require__(221); -var XHRLoader = __webpack_require__(458); -var XHRSettings = __webpack_require__(145); +var GetURL = __webpack_require__(145); +var MergeXHRSettings = __webpack_require__(224); +var XHRLoader = __webpack_require__(476); +var XHRSettings = __webpack_require__(146); /** * @classdesc @@ -4773,45 +4865,6 @@ File.revokeObjectURL = function (image) module.exports = File; -/***/ }), -/* 22 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Scenes.Events - */ - -module.exports = { - - BOOT: __webpack_require__(713), - CREATE: __webpack_require__(714), - DESTROY: __webpack_require__(715), - PAUSE: __webpack_require__(716), - POST_UPDATE: __webpack_require__(717), - PRE_UPDATE: __webpack_require__(718), - READY: __webpack_require__(719), - RENDER: __webpack_require__(720), - RESUME: __webpack_require__(721), - SHUTDOWN: __webpack_require__(722), - SLEEP: __webpack_require__(723), - START: __webpack_require__(724), - TRANSITION_COMPLETE: __webpack_require__(725), - TRANSITION_INIT: __webpack_require__(726), - TRANSITION_OUT: __webpack_require__(727), - TRANSITION_START: __webpack_require__(728), - TRANSITION_WAKE: __webpack_require__(729), - UPDATE: __webpack_require__(730), - WAKE: __webpack_require__(731) - -}; - - /***/ }), /* 23 */ /***/ (function(module, exports) { @@ -5037,7 +5090,6 @@ var GetFastValue = __webpack_require__(2); * Gets the tiles in the given rectangular area (in tile coordinates) of the layer. * * @function Phaser.Tilemaps.Components.GetTilesWithin - * @private * @since 3.0.0 * * @param {integer} tileX - The left most tile index (in tile coordinates) to use as the origin of the area. @@ -5046,7 +5098,7 @@ var GetFastValue = __webpack_require__(2); * @param {integer} height - How many tiles tall from the `tileY` index the area will be. * @param {Phaser.Types.Tilemaps.GetTilesWithinFilteringOptions} GetTilesWithinFilteringOptions - Optional filters to apply when getting the tiles. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {Phaser.Tilemaps.Tile[]} Array of Tile objects. */ var GetTilesWithin = function (tileX, tileY, width, height, filteringOptions, layer) @@ -5066,6 +5118,7 @@ var GetTilesWithin = function (tileX, tileY, width, height, filteringOptions, la width += tileX; tileX = 0; } + if (tileY < 0) { height += tileY; @@ -5077,6 +5130,7 @@ var GetTilesWithin = function (tileX, tileY, width, height, filteringOptions, la { width = Math.max(layer.width - tileX, 0); } + if (tileY + height > layer.height) { height = Math.max(layer.height - tileY, 0); @@ -5089,11 +5143,24 @@ var GetTilesWithin = function (tileX, tileY, width, height, filteringOptions, la for (var tx = tileX; tx < tileX + width; tx++) { var tile = layer.data[ty][tx]; + if (tile !== null) { - if (isNotEmpty && tile.index === -1) { continue; } - if (isColliding && !tile.collides) { continue; } - if (hasInterestingFace && !tile.hasInterestingFace) { continue; } + if (isNotEmpty && tile.index === -1) + { + continue; + } + + if (isColliding && !tile.collides) + { + continue; + } + + if (hasInterestingFace && !tile.hasInterestingFace) + { + continue; + } + results.push(tile); } } @@ -5182,8 +5249,8 @@ module.exports = PropertyValueSet; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(33); -var Smoothing = __webpack_require__(173); +var CONST = __webpack_require__(34); +var Smoothing = __webpack_require__(175); // The pool into which the canvas elements are placed. var pool = []; @@ -5443,7 +5510,7 @@ module.exports = CanvasPool(); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlendModes = __webpack_require__(53); +var BlendModes = __webpack_require__(54); var GetAdvancedValue = __webpack_require__(15); /** @@ -5653,6 +5720,39 @@ module.exports = SetTransform; /* 29 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.GameObjects.Events + */ + +module.exports = { + + ADDED_TO_SCENE: __webpack_require__(590), + DESTROY: __webpack_require__(591), + REMOVED_FROM_SCENE: __webpack_require__(592), + VIDEO_COMPLETE: __webpack_require__(593), + VIDEO_CREATED: __webpack_require__(594), + VIDEO_ERROR: __webpack_require__(595), + VIDEO_LOOP: __webpack_require__(596), + VIDEO_PLAY: __webpack_require__(597), + VIDEO_SEEKED: __webpack_require__(598), + VIDEO_SEEKING: __webpack_require__(599), + VIDEO_STOP: __webpack_require__(600), + VIDEO_TIMEOUT: __webpack_require__(601), + VIDEO_UNLOCKED: __webpack_require__(602) + +}; + + +/***/ }), +/* 30 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. @@ -5660,9 +5760,9 @@ module.exports = SetTransform; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); +var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); -var Line = __webpack_require__(39); +var Line = __webpack_require__(40); /** * @classdesc @@ -5950,7 +6050,7 @@ module.exports = Shape; /***/ }), -/* 30 */ +/* 31 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -6970,7 +7070,7 @@ module.exports = TransformMatrix; /***/ }), -/* 31 */ +/* 32 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -6980,10 +7080,10 @@ module.exports = TransformMatrix; */ var Class = __webpack_require__(0); -var GetColor = __webpack_require__(171); -var GetColor32 = __webpack_require__(299); -var HSVToRGB = __webpack_require__(172); -var RGBToHSV = __webpack_require__(300); +var GetColor = __webpack_require__(173); +var GetColor32 = __webpack_require__(307); +var HSVToRGB = __webpack_require__(174); +var RGBToHSV = __webpack_require__(308); /** * @namespace Phaser.Display.Color @@ -7833,7 +7933,7 @@ module.exports = Color; /***/ }), -/* 32 */ +/* 33 */ /***/ (function(module, exports) { /** @@ -7888,7 +7988,7 @@ module.exports = { /***/ }), -/* 33 */ +/* 34 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -7913,11 +8013,11 @@ var CONST = { * @type {string} * @since 3.0.0 */ - VERSION: '3.50.0-beta.2', + VERSION: '3.50.0-beta.4', - BlendModes: __webpack_require__(53), + BlendModes: __webpack_require__(54), - ScaleModes: __webpack_require__(240), + ScaleModes: __webpack_require__(245), /** * AUTO Detect Renderer. @@ -8026,7 +8126,7 @@ module.exports = CONST; /***/ }), -/* 34 */ +/* 35 */ /***/ (function(module, exports) { /** @@ -8054,7 +8154,7 @@ module.exports = GetBottom; /***/ }), -/* 35 */ +/* 36 */ /***/ (function(module, exports) { /** @@ -8082,7 +8182,7 @@ module.exports = GetLeft; /***/ }), -/* 36 */ +/* 37 */ /***/ (function(module, exports) { /** @@ -8110,7 +8210,7 @@ module.exports = GetRight; /***/ }), -/* 37 */ +/* 38 */ /***/ (function(module, exports) { /** @@ -8138,7 +8238,7 @@ module.exports = GetTop; /***/ }), -/* 38 */ +/* 39 */ /***/ (function(module, exports) { /** @@ -8205,7 +8305,7 @@ module.exports = PropertyValueInc; /***/ }), -/* 39 */ +/* 40 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8215,10 +8315,10 @@ module.exports = PropertyValueInc; */ var Class = __webpack_require__(0); -var GetPoint = __webpack_require__(279); -var GetPoints = __webpack_require__(158); -var GEOM_CONST = __webpack_require__(48); -var Random = __webpack_require__(159); +var GetPoint = __webpack_require__(283); +var GetPoints = __webpack_require__(160); +var GEOM_CONST = __webpack_require__(49); +var Random = __webpack_require__(161); var Vector2 = __webpack_require__(3); /** @@ -8542,7 +8642,7 @@ module.exports = Line; /***/ }), -/* 40 */ +/* 41 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8572,7 +8672,7 @@ module.exports = DegToRad; /***/ }), -/* 41 */ +/* 42 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8587,29 +8687,29 @@ module.exports = DegToRad; module.exports = { - DESTROY: __webpack_require__(651), - FADE_IN_COMPLETE: __webpack_require__(652), - FADE_IN_START: __webpack_require__(653), - FADE_OUT_COMPLETE: __webpack_require__(654), - FADE_OUT_START: __webpack_require__(655), - FLASH_COMPLETE: __webpack_require__(656), - FLASH_START: __webpack_require__(657), - PAN_COMPLETE: __webpack_require__(658), - PAN_START: __webpack_require__(659), - POST_RENDER: __webpack_require__(660), - PRE_RENDER: __webpack_require__(661), - ROTATE_COMPLETE: __webpack_require__(662), - ROTATE_START: __webpack_require__(663), - SHAKE_COMPLETE: __webpack_require__(664), - SHAKE_START: __webpack_require__(665), - ZOOM_COMPLETE: __webpack_require__(666), - ZOOM_START: __webpack_require__(667) + DESTROY: __webpack_require__(667), + FADE_IN_COMPLETE: __webpack_require__(668), + FADE_IN_START: __webpack_require__(669), + FADE_OUT_COMPLETE: __webpack_require__(670), + FADE_OUT_START: __webpack_require__(671), + FLASH_COMPLETE: __webpack_require__(672), + FLASH_START: __webpack_require__(673), + PAN_COMPLETE: __webpack_require__(674), + PAN_START: __webpack_require__(675), + POST_RENDER: __webpack_require__(676), + PRE_RENDER: __webpack_require__(677), + ROTATE_COMPLETE: __webpack_require__(678), + ROTATE_START: __webpack_require__(679), + SHAKE_COMPLETE: __webpack_require__(680), + SHAKE_START: __webpack_require__(681), + ZOOM_COMPLETE: __webpack_require__(682), + ZOOM_START: __webpack_require__(683) }; /***/ }), -/* 42 */ +/* 43 */ /***/ (function(module, exports) { /** @@ -8646,7 +8746,7 @@ module.exports = FillStyleCanvas; /***/ }), -/* 43 */ +/* 44 */ /***/ (function(module, exports) { /** @@ -9190,7 +9290,7 @@ module.exports = Common; /***/ }), -/* 44 */ +/* 45 */ /***/ (function(module, exports) { /** @@ -9223,7 +9323,7 @@ module.exports = SetTop; /***/ }), -/* 45 */ +/* 46 */ /***/ (function(module, exports) { /** @@ -9256,7 +9356,7 @@ module.exports = SetLeft; /***/ }), -/* 46 */ +/* 47 */ /***/ (function(module, exports) { /** @@ -9289,7 +9389,7 @@ module.exports = SetRight; /***/ }), -/* 47 */ +/* 48 */ /***/ (function(module, exports) { /** @@ -9322,7 +9422,7 @@ module.exports = SetBottom; /***/ }), -/* 48 */ +/* 49 */ /***/ (function(module, exports) { /** @@ -9402,7 +9502,7 @@ module.exports = GEOM_CONST; /***/ }), -/* 49 */ +/* 50 */ /***/ (function(module, exports) { /** @@ -9437,7 +9537,7 @@ module.exports = Contains; /***/ }), -/* 50 */ +/* 51 */ /***/ (function(module, exports) { /** @@ -9475,7 +9575,7 @@ module.exports = LineStyleCanvas; /***/ }), -/* 51 */ +/* 52 */ /***/ (function(module, exports) { /** @@ -9604,7 +9704,7 @@ module.exports = CONST; /***/ }), -/* 52 */ +/* 53 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -9613,7 +9713,7 @@ module.exports = CONST; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(148); +var GetTileAt = __webpack_require__(149); var GetTilesWithin = __webpack_require__(24); /** @@ -9622,7 +9722,6 @@ var GetTilesWithin = __webpack_require__(24); * is mostly used internally. * * @function Phaser.Tilemaps.Components.CalculateFacesWithin - * @private * @since 3.0.0 * * @param {integer} tileX - The left most tile index (in tile coordinates) to use as the origin of the area. @@ -9670,7 +9769,7 @@ module.exports = CalculateFacesWithin; /***/ }), -/* 53 */ +/* 54 */ /***/ (function(module, exports) { /** @@ -10009,7 +10108,7 @@ module.exports = { /***/ }), -/* 54 */ +/* 55 */ /***/ (function(module, exports) { /** @@ -10043,7 +10142,7 @@ module.exports = DistanceBetween; /***/ }), -/* 55 */ +/* 56 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10058,58 +10157,58 @@ module.exports = DistanceBetween; module.exports = { - BOOT: __webpack_require__(831), - DESTROY: __webpack_require__(832), - DRAG_END: __webpack_require__(833), - DRAG_ENTER: __webpack_require__(834), - DRAG: __webpack_require__(835), - DRAG_LEAVE: __webpack_require__(836), - DRAG_OVER: __webpack_require__(837), - DRAG_START: __webpack_require__(838), - DROP: __webpack_require__(839), - GAME_OUT: __webpack_require__(840), - GAME_OVER: __webpack_require__(841), - GAMEOBJECT_DOWN: __webpack_require__(842), - GAMEOBJECT_DRAG_END: __webpack_require__(843), - GAMEOBJECT_DRAG_ENTER: __webpack_require__(844), - GAMEOBJECT_DRAG: __webpack_require__(845), - GAMEOBJECT_DRAG_LEAVE: __webpack_require__(846), - GAMEOBJECT_DRAG_OVER: __webpack_require__(847), - GAMEOBJECT_DRAG_START: __webpack_require__(848), - GAMEOBJECT_DROP: __webpack_require__(849), - GAMEOBJECT_MOVE: __webpack_require__(850), - GAMEOBJECT_OUT: __webpack_require__(851), - GAMEOBJECT_OVER: __webpack_require__(852), - GAMEOBJECT_POINTER_DOWN: __webpack_require__(853), - GAMEOBJECT_POINTER_MOVE: __webpack_require__(854), - GAMEOBJECT_POINTER_OUT: __webpack_require__(855), - GAMEOBJECT_POINTER_OVER: __webpack_require__(856), - GAMEOBJECT_POINTER_UP: __webpack_require__(857), - GAMEOBJECT_POINTER_WHEEL: __webpack_require__(858), - GAMEOBJECT_UP: __webpack_require__(859), - GAMEOBJECT_WHEEL: __webpack_require__(860), - MANAGER_BOOT: __webpack_require__(861), - MANAGER_PROCESS: __webpack_require__(862), - MANAGER_UPDATE: __webpack_require__(863), - POINTER_DOWN: __webpack_require__(864), - POINTER_DOWN_OUTSIDE: __webpack_require__(865), - POINTER_MOVE: __webpack_require__(866), - POINTER_OUT: __webpack_require__(867), - POINTER_OVER: __webpack_require__(868), - POINTER_UP: __webpack_require__(869), - POINTER_UP_OUTSIDE: __webpack_require__(870), - POINTER_WHEEL: __webpack_require__(871), - POINTERLOCK_CHANGE: __webpack_require__(872), - PRE_UPDATE: __webpack_require__(873), - SHUTDOWN: __webpack_require__(874), - START: __webpack_require__(875), - UPDATE: __webpack_require__(876) + BOOT: __webpack_require__(848), + DESTROY: __webpack_require__(849), + DRAG_END: __webpack_require__(850), + DRAG_ENTER: __webpack_require__(851), + DRAG: __webpack_require__(852), + DRAG_LEAVE: __webpack_require__(853), + DRAG_OVER: __webpack_require__(854), + DRAG_START: __webpack_require__(855), + DROP: __webpack_require__(856), + GAME_OUT: __webpack_require__(857), + GAME_OVER: __webpack_require__(858), + GAMEOBJECT_DOWN: __webpack_require__(859), + GAMEOBJECT_DRAG_END: __webpack_require__(860), + GAMEOBJECT_DRAG_ENTER: __webpack_require__(861), + GAMEOBJECT_DRAG: __webpack_require__(862), + GAMEOBJECT_DRAG_LEAVE: __webpack_require__(863), + GAMEOBJECT_DRAG_OVER: __webpack_require__(864), + GAMEOBJECT_DRAG_START: __webpack_require__(865), + GAMEOBJECT_DROP: __webpack_require__(866), + GAMEOBJECT_MOVE: __webpack_require__(867), + GAMEOBJECT_OUT: __webpack_require__(868), + GAMEOBJECT_OVER: __webpack_require__(869), + GAMEOBJECT_POINTER_DOWN: __webpack_require__(870), + GAMEOBJECT_POINTER_MOVE: __webpack_require__(871), + GAMEOBJECT_POINTER_OUT: __webpack_require__(872), + GAMEOBJECT_POINTER_OVER: __webpack_require__(873), + GAMEOBJECT_POINTER_UP: __webpack_require__(874), + GAMEOBJECT_POINTER_WHEEL: __webpack_require__(875), + GAMEOBJECT_UP: __webpack_require__(876), + GAMEOBJECT_WHEEL: __webpack_require__(877), + MANAGER_BOOT: __webpack_require__(878), + MANAGER_PROCESS: __webpack_require__(879), + MANAGER_UPDATE: __webpack_require__(880), + POINTER_DOWN: __webpack_require__(881), + POINTER_DOWN_OUTSIDE: __webpack_require__(882), + POINTER_MOVE: __webpack_require__(883), + POINTER_OUT: __webpack_require__(884), + POINTER_OVER: __webpack_require__(885), + POINTER_UP: __webpack_require__(886), + POINTER_UP_OUTSIDE: __webpack_require__(887), + POINTER_WHEEL: __webpack_require__(888), + POINTERLOCK_CHANGE: __webpack_require__(889), + PRE_UPDATE: __webpack_require__(890), + SHUTDOWN: __webpack_require__(891), + START: __webpack_require__(892), + UPDATE: __webpack_require__(893) }; /***/ }), -/* 56 */ +/* 57 */ /***/ (function(module, exports) { /** @@ -10150,7 +10249,7 @@ module.exports = Contains; /***/ }), -/* 57 */ +/* 58 */ /***/ (function(module, exports) { /** @@ -10178,7 +10277,7 @@ module.exports = Length; /***/ }), -/* 58 */ +/* 59 */ /***/ (function(module, exports) { /** @@ -10210,7 +10309,771 @@ module.exports = Wrap; /***/ }), -/* 59 */ +/* 60 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * This module implements a modified ear slicing algorithm, optimized by z-order curve hashing and extended to + * handle holes, twisted polygons, degeneracies and self-intersections in a way that doesn't guarantee correctness + * of triangulation, but attempts to always produce acceptable results for practical data. + * + * Example: + * + * ```javascript + * const triangles = Phaser.Geom.Polygon.Earcut([10,0, 0,50, 60,60, 70,10]); // returns [1,0,3, 3,2,1] + * ``` + * + * Each group of three vertex indices in the resulting array forms a triangle. + * + * ```javascript + * // triangulating a polygon with a hole + * earcut([0,0, 100,0, 100,100, 0,100, 20,20, 80,20, 80,80, 20,80], [4]); + * // [3,0,4, 5,4,0, 3,4,7, 5,0,1, 2,3,7, 6,5,1, 2,7,6, 6,1,2] + * + * // triangulating a polygon with 3d coords + * earcut([10,0,1, 0,50,2, 60,60,3, 70,10,4], null, 3); + * // [1,0,3, 3,2,1] + * ``` + * + * If you pass a single vertex as a hole, Earcut treats it as a Steiner point. + * + * If your input is a multi-dimensional array (e.g. GeoJSON Polygon), you can convert it to the format + * expected by Earcut with `Phaser.Geom.Polygon.Earcut.flatten`: + * + * ```javascript + * var data = earcut.flatten(geojson.geometry.coordinates); + * var triangles = earcut(data.vertices, data.holes, data.dimensions); + * ``` + * + * After getting a triangulation, you can verify its correctness with `Phaser.Geom.Polygon.Earcut.deviation`: + * + * ```javascript + * var deviation = earcut.deviation(vertices, holes, dimensions, triangles); + * ``` + * Returns the relative difference between the total area of triangles and the area of the input polygon. + * 0 means the triangulation is fully correct. + * + * For more information see https://github.com/mapbox/earcut + * + * @function Phaser.Geom.Polygon.Earcut + * @since 3.50.0 + * + * @param {number[]} data - A flat array of vertex coordinate, like [x0,y0, x1,y1, x2,y2, ...] + * @param {number[]} [holeIndices] - An array of hole indices if any (e.g. [5, 8] for a 12-vertex input would mean one hole with vertices 5–7 and another with 8–11). + * @param {number} [dimensions=2] - The number of coordinates per vertex in the input array (2 by default). + * + * @return {number[]} An array of triangulated data. + */ + + // Earcut 2.2.2 (January 21st 2020) + +/* + * ISC License + * + * Copyright (c) 2016, Mapbox + * + * Permission to use, copy, modify, and/or distribute this software for any purpose + * with or without fee is hereby granted, provided that the above copyright notice + * and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS + * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF + * THIS SOFTWARE. + */ + + + +function earcut(data, holeIndices, dim) { + + dim = dim || 2; + + var hasHoles = holeIndices && holeIndices.length, + outerLen = hasHoles ? holeIndices[0] * dim : data.length, + outerNode = linkedList(data, 0, outerLen, dim, true), + triangles = []; + + if (!outerNode || outerNode.next === outerNode.prev) return triangles; + + var minX, minY, maxX, maxY, x, y, invSize; + + if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim); + + // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox + if (data.length > 80 * dim) { + minX = maxX = data[0]; + minY = maxY = data[1]; + + for (var i = dim; i < outerLen; i += dim) { + x = data[i]; + y = data[i + 1]; + if (x < minX) minX = x; + if (y < minY) minY = y; + if (x > maxX) maxX = x; + if (y > maxY) maxY = y; + } + + // minX, minY and invSize are later used to transform coords into integers for z-order calculation + invSize = Math.max(maxX - minX, maxY - minY); + invSize = invSize !== 0 ? 1 / invSize : 0; + } + + earcutLinked(outerNode, triangles, dim, minX, minY, invSize); + + return triangles; +} + +// create a circular doubly linked list from polygon points in the specified winding order +function linkedList(data, start, end, dim, clockwise) { + var i, last; + + if (clockwise === (signedArea(data, start, end, dim) > 0)) { + for (i = start; i < end; i += dim) last = insertNode(i, data[i], data[i + 1], last); + } else { + for (i = end - dim; i >= start; i -= dim) last = insertNode(i, data[i], data[i + 1], last); + } + + if (last && equals(last, last.next)) { + removeNode(last); + last = last.next; + } + + return last; +} + +// eliminate colinear or duplicate points +function filterPoints(start, end) { + if (!start) return start; + if (!end) end = start; + + var p = start, + again; + do { + again = false; + + if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) { + removeNode(p); + p = end = p.prev; + if (p === p.next) break; + again = true; + + } else { + p = p.next; + } + } while (again || p !== end); + + return end; +} + +// main ear slicing loop which triangulates a polygon (given as a linked list) +function earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) { + if (!ear) return; + + // interlink polygon nodes in z-order + if (!pass && invSize) indexCurve(ear, minX, minY, invSize); + + var stop = ear, + prev, next; + + // iterate through ears, slicing them one by one + while (ear.prev !== ear.next) { + prev = ear.prev; + next = ear.next; + + if (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) { + // cut off the triangle + triangles.push(prev.i / dim); + triangles.push(ear.i / dim); + triangles.push(next.i / dim); + + removeNode(ear); + + // skipping the next vertex leads to less sliver triangles + ear = next.next; + stop = next.next; + + continue; + } + + ear = next; + + // if we looped through the whole remaining polygon and can't find any more ears + if (ear === stop) { + // try filtering points and slicing again + if (!pass) { + earcutLinked(filterPoints(ear), triangles, dim, minX, minY, invSize, 1); + + // if this didn't work, try curing all small self-intersections locally + } else if (pass === 1) { + ear = cureLocalIntersections(filterPoints(ear), triangles, dim); + earcutLinked(ear, triangles, dim, minX, minY, invSize, 2); + + // as a last resort, try splitting the remaining polygon into two + } else if (pass === 2) { + splitEarcut(ear, triangles, dim, minX, minY, invSize); + } + + break; + } + } +} + +// check whether a polygon node forms a valid ear with adjacent nodes +function isEar(ear) { + var a = ear.prev, + b = ear, + c = ear.next; + + if (area(a, b, c) >= 0) return false; // reflex, can't be an ear + + // now make sure we don't have other points inside the potential ear + var p = ear.next.next; + + while (p !== ear.prev) { + if (pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) && + area(p.prev, p, p.next) >= 0) return false; + p = p.next; + } + + return true; +} + +function isEarHashed(ear, minX, minY, invSize) { + var a = ear.prev, + b = ear, + c = ear.next; + + if (area(a, b, c) >= 0) return false; // reflex, can't be an ear + + // triangle bbox; min & max are calculated like this for speed + var minTX = a.x < b.x ? (a.x < c.x ? a.x : c.x) : (b.x < c.x ? b.x : c.x), + minTY = a.y < b.y ? (a.y < c.y ? a.y : c.y) : (b.y < c.y ? b.y : c.y), + maxTX = a.x > b.x ? (a.x > c.x ? a.x : c.x) : (b.x > c.x ? b.x : c.x), + maxTY = a.y > b.y ? (a.y > c.y ? a.y : c.y) : (b.y > c.y ? b.y : c.y); + + // z-order range for the current triangle bbox; + var minZ = zOrder(minTX, minTY, minX, minY, invSize), + maxZ = zOrder(maxTX, maxTY, minX, minY, invSize); + + var p = ear.prevZ, + n = ear.nextZ; + + // look for points inside the triangle in both directions + while (p && p.z >= minZ && n && n.z <= maxZ) { + if (p !== ear.prev && p !== ear.next && + pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) && + area(p.prev, p, p.next) >= 0) return false; + p = p.prevZ; + + if (n !== ear.prev && n !== ear.next && + pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) && + area(n.prev, n, n.next) >= 0) return false; + n = n.nextZ; + } + + // look for remaining points in decreasing z-order + while (p && p.z >= minZ) { + if (p !== ear.prev && p !== ear.next && + pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) && + area(p.prev, p, p.next) >= 0) return false; + p = p.prevZ; + } + + // look for remaining points in increasing z-order + while (n && n.z <= maxZ) { + if (n !== ear.prev && n !== ear.next && + pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) && + area(n.prev, n, n.next) >= 0) return false; + n = n.nextZ; + } + + return true; +} + +// go through all polygon nodes and cure small local self-intersections +function cureLocalIntersections(start, triangles, dim) { + var p = start; + do { + var a = p.prev, + b = p.next.next; + + if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) { + + triangles.push(a.i / dim); + triangles.push(p.i / dim); + triangles.push(b.i / dim); + + // remove two nodes involved + removeNode(p); + removeNode(p.next); + + p = start = b; + } + p = p.next; + } while (p !== start); + + return filterPoints(p); +} + +// try splitting polygon into two and triangulate them independently +function splitEarcut(start, triangles, dim, minX, minY, invSize) { + // look for a valid diagonal that divides the polygon into two + var a = start; + do { + var b = a.next.next; + while (b !== a.prev) { + if (a.i !== b.i && isValidDiagonal(a, b)) { + // split the polygon in two by the diagonal + var c = splitPolygon(a, b); + + // filter colinear points around the cuts + a = filterPoints(a, a.next); + c = filterPoints(c, c.next); + + // run earcut on each half + earcutLinked(a, triangles, dim, minX, minY, invSize); + earcutLinked(c, triangles, dim, minX, minY, invSize); + return; + } + b = b.next; + } + a = a.next; + } while (a !== start); +} + +// link every hole into the outer loop, producing a single-ring polygon without holes +function eliminateHoles(data, holeIndices, outerNode, dim) { + var queue = [], + i, len, start, end, list; + + for (i = 0, len = holeIndices.length; i < len; i++) { + start = holeIndices[i] * dim; + end = i < len - 1 ? holeIndices[i + 1] * dim : data.length; + list = linkedList(data, start, end, dim, false); + if (list === list.next) list.steiner = true; + queue.push(getLeftmost(list)); + } + + queue.sort(compareX); + + // process holes from left to right + for (i = 0; i < queue.length; i++) { + eliminateHole(queue[i], outerNode); + outerNode = filterPoints(outerNode, outerNode.next); + } + + return outerNode; +} + +function compareX(a, b) { + return a.x - b.x; +} + +// find a bridge between vertices that connects hole with an outer ring and and link it +function eliminateHole(hole, outerNode) { + outerNode = findHoleBridge(hole, outerNode); + if (outerNode) { + var b = splitPolygon(outerNode, hole); + + // filter collinear points around the cuts + filterPoints(outerNode, outerNode.next); + filterPoints(b, b.next); + } +} + +// David Eberly's algorithm for finding a bridge between hole and outer polygon +function findHoleBridge(hole, outerNode) { + var p = outerNode, + hx = hole.x, + hy = hole.y, + qx = -Infinity, + m; + + // find a segment intersected by a ray from the hole's leftmost point to the left; + // segment's endpoint with lesser x will be potential connection point + do { + if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) { + var x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y); + if (x <= hx && x > qx) { + qx = x; + if (x === hx) { + if (hy === p.y) return p; + if (hy === p.next.y) return p.next; + } + m = p.x < p.next.x ? p : p.next; + } + } + p = p.next; + } while (p !== outerNode); + + if (!m) return null; + + if (hx === qx) return m; // hole touches outer segment; pick leftmost endpoint + + // look for points inside the triangle of hole point, segment intersection and endpoint; + // if there are no points found, we have a valid connection; + // otherwise choose the point of the minimum angle with the ray as connection point + + var stop = m, + mx = m.x, + my = m.y, + tanMin = Infinity, + tan; + + p = m; + + do { + if (hx >= p.x && p.x >= mx && hx !== p.x && + pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) { + + tan = Math.abs(hy - p.y) / (hx - p.x); // tangential + + if (locallyInside(p, hole) && + (tan < tanMin || (tan === tanMin && (p.x > m.x || (p.x === m.x && sectorContainsSector(m, p)))))) { + m = p; + tanMin = tan; + } + } + + p = p.next; + } while (p !== stop); + + return m; +} + +// whether sector in vertex m contains sector in vertex p in the same coordinates +function sectorContainsSector(m, p) { + return area(m.prev, m, p.prev) < 0 && area(p.next, m, m.next) < 0; +} + +// interlink polygon nodes in z-order +function indexCurve(start, minX, minY, invSize) { + var p = start; + do { + if (p.z === null) p.z = zOrder(p.x, p.y, minX, minY, invSize); + p.prevZ = p.prev; + p.nextZ = p.next; + p = p.next; + } while (p !== start); + + p.prevZ.nextZ = null; + p.prevZ = null; + + sortLinked(p); +} + +// Simon Tatham's linked list merge sort algorithm +// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html +function sortLinked(list) { + var i, p, q, e, tail, numMerges, pSize, qSize, + inSize = 1; + + do { + p = list; + list = null; + tail = null; + numMerges = 0; + + while (p) { + numMerges++; + q = p; + pSize = 0; + for (i = 0; i < inSize; i++) { + pSize++; + q = q.nextZ; + if (!q) break; + } + qSize = inSize; + + while (pSize > 0 || (qSize > 0 && q)) { + + if (pSize !== 0 && (qSize === 0 || !q || p.z <= q.z)) { + e = p; + p = p.nextZ; + pSize--; + } else { + e = q; + q = q.nextZ; + qSize--; + } + + if (tail) tail.nextZ = e; + else list = e; + + e.prevZ = tail; + tail = e; + } + + p = q; + } + + tail.nextZ = null; + inSize *= 2; + + } while (numMerges > 1); + + return list; +} + +// z-order of a point given coords and inverse of the longer side of data bbox +function zOrder(x, y, minX, minY, invSize) { + // coords are transformed into non-negative 15-bit integer range + x = 32767 * (x - minX) * invSize; + y = 32767 * (y - minY) * invSize; + + x = (x | (x << 8)) & 0x00FF00FF; + x = (x | (x << 4)) & 0x0F0F0F0F; + x = (x | (x << 2)) & 0x33333333; + x = (x | (x << 1)) & 0x55555555; + + y = (y | (y << 8)) & 0x00FF00FF; + y = (y | (y << 4)) & 0x0F0F0F0F; + y = (y | (y << 2)) & 0x33333333; + y = (y | (y << 1)) & 0x55555555; + + return x | (y << 1); +} + +// find the leftmost node of a polygon ring +function getLeftmost(start) { + var p = start, + leftmost = start; + do { + if (p.x < leftmost.x || (p.x === leftmost.x && p.y < leftmost.y)) leftmost = p; + p = p.next; + } while (p !== start); + + return leftmost; +} + +// check if a point lies within a convex triangle +function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) { + return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 && + (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 && + (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0; +} + +// check if a diagonal between two polygon nodes is valid (lies in polygon interior) +function isValidDiagonal(a, b) { + return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && // dones't intersect other edges + (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible + (area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors + equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case +} + +// signed area of a triangle +function area(p, q, r) { + return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y); +} + +// check if two points are equal +function equals(p1, p2) { + return p1.x === p2.x && p1.y === p2.y; +} + +// check if two segments intersect +function intersects(p1, q1, p2, q2) { + var o1 = sign(area(p1, q1, p2)); + var o2 = sign(area(p1, q1, q2)); + var o3 = sign(area(p2, q2, p1)); + var o4 = sign(area(p2, q2, q1)); + + if (o1 !== o2 && o3 !== o4) return true; // general case + + if (o1 === 0 && onSegment(p1, p2, q1)) return true; // p1, q1 and p2 are collinear and p2 lies on p1q1 + if (o2 === 0 && onSegment(p1, q2, q1)) return true; // p1, q1 and q2 are collinear and q2 lies on p1q1 + if (o3 === 0 && onSegment(p2, p1, q2)) return true; // p2, q2 and p1 are collinear and p1 lies on p2q2 + if (o4 === 0 && onSegment(p2, q1, q2)) return true; // p2, q2 and q1 are collinear and q1 lies on p2q2 + + return false; +} + +// for collinear points p, q, r, check if point q lies on segment pr +function onSegment(p, q, r) { + return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y); +} + +function sign(num) { + return num > 0 ? 1 : num < 0 ? -1 : 0; +} + +// check if a polygon diagonal intersects any polygon segments +function intersectsPolygon(a, b) { + var p = a; + do { + if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i && + intersects(p, p.next, a, b)) return true; + p = p.next; + } while (p !== a); + + return false; +} + +// check if a polygon diagonal is locally inside the polygon +function locallyInside(a, b) { + return area(a.prev, a, a.next) < 0 ? + area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 : + area(a, b, a.prev) < 0 || area(a, a.next, b) < 0; +} + +// check if the middle point of a polygon diagonal is inside the polygon +function middleInside(a, b) { + var p = a, + inside = false, + px = (a.x + b.x) / 2, + py = (a.y + b.y) / 2; + do { + if (((p.y > py) !== (p.next.y > py)) && p.next.y !== p.y && + (px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x)) + inside = !inside; + p = p.next; + } while (p !== a); + + return inside; +} + +// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two; +// if one belongs to the outer ring and another to a hole, it merges it into a single ring +function splitPolygon(a, b) { + var a2 = new Node(a.i, a.x, a.y), + b2 = new Node(b.i, b.x, b.y), + an = a.next, + bp = b.prev; + + a.next = b; + b.prev = a; + + a2.next = an; + an.prev = a2; + + b2.next = a2; + a2.prev = b2; + + bp.next = b2; + b2.prev = bp; + + return b2; +} + +// create a node and optionally link it with previous one (in a circular doubly linked list) +function insertNode(i, x, y, last) { + var p = new Node(i, x, y); + + if (!last) { + p.prev = p; + p.next = p; + + } else { + p.next = last.next; + p.prev = last; + last.next.prev = p; + last.next = p; + } + return p; +} + +function removeNode(p) { + p.next.prev = p.prev; + p.prev.next = p.next; + + if (p.prevZ) p.prevZ.nextZ = p.nextZ; + if (p.nextZ) p.nextZ.prevZ = p.prevZ; +} + +function Node(i, x, y) { + // vertex index in coordinates array + this.i = i; + + // vertex coordinates + this.x = x; + this.y = y; + + // previous and next vertex nodes in a polygon ring + this.prev = null; + this.next = null; + + // z-order curve value + this.z = null; + + // previous and next nodes in z-order + this.prevZ = null; + this.nextZ = null; + + // indicates whether this is a steiner point + this.steiner = false; +} + +// return a percentage difference between the polygon area and its triangulation area; +// used to verify correctness of triangulation +earcut.deviation = function (data, holeIndices, dim, triangles) { + var hasHoles = holeIndices && holeIndices.length; + var outerLen = hasHoles ? holeIndices[0] * dim : data.length; + + var polygonArea = Math.abs(signedArea(data, 0, outerLen, dim)); + if (hasHoles) { + for (var i = 0, len = holeIndices.length; i < len; i++) { + var start = holeIndices[i] * dim; + var end = i < len - 1 ? holeIndices[i + 1] * dim : data.length; + polygonArea -= Math.abs(signedArea(data, start, end, dim)); + } + } + + var trianglesArea = 0; + for (i = 0; i < triangles.length; i += 3) { + var a = triangles[i] * dim; + var b = triangles[i + 1] * dim; + var c = triangles[i + 2] * dim; + trianglesArea += Math.abs( + (data[a] - data[c]) * (data[b + 1] - data[a + 1]) - + (data[a] - data[b]) * (data[c + 1] - data[a + 1])); + } + + return polygonArea === 0 && trianglesArea === 0 ? 0 : + Math.abs((trianglesArea - polygonArea) / polygonArea); +}; + +function signedArea(data, start, end, dim) { + var sum = 0; + for (var i = start, j = end - dim; i < end; i += dim) { + sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]); + j = i; + } + return sum; +} + +// turn a polygon in a multi-dimensional array form (e.g. as in GeoJSON) into a form Earcut accepts +earcut.flatten = function (data) { + var dim = data[0][0].length, + result = {vertices: [], holes: [], dimensions: dim}, + holeIndex = 0; + + for (var i = 0; i < data.length; i++) { + for (var j = 0; j < data[i].length; j++) { + for (var d = 0; d < dim; d++) result.vertices.push(data[i][j][d]); + } + if (i > 0) { + holeIndex += data[i - 1].length; + result.holes.push(holeIndex); + } + } + return result; +}; + +module.exports = earcut; + + +/***/ }), +/* 61 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10225,35 +11088,35 @@ module.exports = Wrap; module.exports = { - COMPLETE: __webpack_require__(899), - DECODED: __webpack_require__(900), - DECODED_ALL: __webpack_require__(901), - DESTROY: __webpack_require__(902), - DETUNE: __webpack_require__(903), - GLOBAL_DETUNE: __webpack_require__(904), - GLOBAL_MUTE: __webpack_require__(905), - GLOBAL_RATE: __webpack_require__(906), - GLOBAL_VOLUME: __webpack_require__(907), - LOOP: __webpack_require__(908), - LOOPED: __webpack_require__(909), - MUTE: __webpack_require__(910), - PAUSE_ALL: __webpack_require__(911), - PAUSE: __webpack_require__(912), - PLAY: __webpack_require__(913), - RATE: __webpack_require__(914), - RESUME_ALL: __webpack_require__(915), - RESUME: __webpack_require__(916), - SEEK: __webpack_require__(917), - STOP_ALL: __webpack_require__(918), - STOP: __webpack_require__(919), - UNLOCKED: __webpack_require__(920), - VOLUME: __webpack_require__(921) + COMPLETE: __webpack_require__(913), + DECODED: __webpack_require__(914), + DECODED_ALL: __webpack_require__(915), + DESTROY: __webpack_require__(916), + DETUNE: __webpack_require__(917), + GLOBAL_DETUNE: __webpack_require__(918), + GLOBAL_MUTE: __webpack_require__(919), + GLOBAL_RATE: __webpack_require__(920), + GLOBAL_VOLUME: __webpack_require__(921), + LOOP: __webpack_require__(922), + LOOPED: __webpack_require__(923), + MUTE: __webpack_require__(924), + PAUSE_ALL: __webpack_require__(925), + PAUSE: __webpack_require__(926), + PLAY: __webpack_require__(927), + RATE: __webpack_require__(928), + RESUME_ALL: __webpack_require__(929), + RESUME: __webpack_require__(930), + SEEK: __webpack_require__(931), + STOP_ALL: __webpack_require__(932), + STOP: __webpack_require__(933), + UNLOCKED: __webpack_require__(934), + VOLUME: __webpack_require__(935) }; /***/ }), -/* 60 */ +/* 62 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10264,7 +11127,7 @@ module.exports = { var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var File = __webpack_require__(21); +var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); @@ -10483,7 +11346,7 @@ module.exports = JSONFile; /***/ }), -/* 61 */ +/* 63 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10717,7 +11580,7 @@ module.exports = MultiFile; /***/ }), -/* 62 */ +/* 64 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10733,12 +11596,12 @@ var Body = {}; module.exports = Body; -var Vertices = __webpack_require__(87); -var Vector = __webpack_require__(100); -var Sleeping = __webpack_require__(243); -var Common = __webpack_require__(43); -var Bounds = __webpack_require__(101); -var Axes = __webpack_require__(517); +var Vertices = __webpack_require__(88); +var Vector = __webpack_require__(101); +var Sleeping = __webpack_require__(249); +var Common = __webpack_require__(44); +var Bounds = __webpack_require__(102); +var Axes = __webpack_require__(540); (function() { @@ -12099,7 +12962,42 @@ var Axes = __webpack_require__(517); /***/ }), -/* 63 */ +/* 65 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Internally used method to set the colliding state of a tile. This does not recalculate + * interesting faces. + * + * @function Phaser.Tilemaps.Components.SetTileCollision + * @since 3.0.0 + * + * @param {Phaser.Tilemaps.Tile} tile - The Tile to set the collision on. + * @param {boolean} [collides=true] - Should the tile index collide or not? + */ +var SetTileCollision = function (tile, collides) +{ + if (collides) + { + tile.setCollision(true, true, true, true, false); + } + else + { + tile.resetCollision(false); + } +}; + +module.exports = SetTileCollision; + + +/***/ }), +/* 66 */ /***/ (function(module, exports) { /** @@ -12113,14 +13011,13 @@ var Axes = __webpack_require__(517); * layer's position, scale and scroll. * * @function Phaser.Tilemaps.Components.WorldToTileX - * @private * @since 3.0.0 * * @param {number} worldX - The x coordinate to be converted, in pixels, not tiles. * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer. * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {number} The X location in tile units. */ var WorldToTileX = function (worldX, snapToFloor, camera, layer) @@ -12150,7 +13047,7 @@ module.exports = WorldToTileX; /***/ }), -/* 64 */ +/* 67 */ /***/ (function(module, exports) { /** @@ -12164,14 +13061,13 @@ module.exports = WorldToTileX; * layer's position, scale and scroll. * * @function Phaser.Tilemaps.Components.WorldToTileY - * @private * @since 3.0.0 * * @param {number} worldY - The y coordinate to be converted, in pixels, not tiles. * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer. * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {number} The Y location in tile units. */ var WorldToTileY = function (worldY, snapToFloor, camera, layer) @@ -12201,7 +13097,7 @@ module.exports = WorldToTileY; /***/ }), -/* 65 */ +/* 68 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -12211,11 +13107,11 @@ module.exports = WorldToTileY; */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(56); -var GetPoint = __webpack_require__(270); -var GetPoints = __webpack_require__(271); -var GEOM_CONST = __webpack_require__(48); -var Random = __webpack_require__(155); +var Contains = __webpack_require__(57); +var GetPoint = __webpack_require__(276); +var GetPoints = __webpack_require__(277); +var GEOM_CONST = __webpack_require__(49); +var Random = __webpack_require__(158); /** * @classdesc @@ -12576,718 +13472,7 @@ module.exports = Circle; /***/ }), -/* 66 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -// Earcut 2.2.2 (January 21st 2020) - -/* - * ISC License - * - * Copyright (c) 2016, Mapbox - * - * Permission to use, copy, modify, and/or distribute this software for any purpose - * with or without fee is hereby granted, provided that the above copyright notice - * and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS - * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF - * THIS SOFTWARE. - */ - - - -module.exports = earcut; - -function earcut(data, holeIndices, dim) { - - dim = dim || 2; - - var hasHoles = holeIndices && holeIndices.length, - outerLen = hasHoles ? holeIndices[0] * dim : data.length, - outerNode = linkedList(data, 0, outerLen, dim, true), - triangles = []; - - if (!outerNode || outerNode.next === outerNode.prev) return triangles; - - var minX, minY, maxX, maxY, x, y, invSize; - - if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim); - - // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox - if (data.length > 80 * dim) { - minX = maxX = data[0]; - minY = maxY = data[1]; - - for (var i = dim; i < outerLen; i += dim) { - x = data[i]; - y = data[i + 1]; - if (x < minX) minX = x; - if (y < minY) minY = y; - if (x > maxX) maxX = x; - if (y > maxY) maxY = y; - } - - // minX, minY and invSize are later used to transform coords into integers for z-order calculation - invSize = Math.max(maxX - minX, maxY - minY); - invSize = invSize !== 0 ? 1 / invSize : 0; - } - - earcutLinked(outerNode, triangles, dim, minX, minY, invSize); - - return triangles; -} - -// create a circular doubly linked list from polygon points in the specified winding order -function linkedList(data, start, end, dim, clockwise) { - var i, last; - - if (clockwise === (signedArea(data, start, end, dim) > 0)) { - for (i = start; i < end; i += dim) last = insertNode(i, data[i], data[i + 1], last); - } else { - for (i = end - dim; i >= start; i -= dim) last = insertNode(i, data[i], data[i + 1], last); - } - - if (last && equals(last, last.next)) { - removeNode(last); - last = last.next; - } - - return last; -} - -// eliminate colinear or duplicate points -function filterPoints(start, end) { - if (!start) return start; - if (!end) end = start; - - var p = start, - again; - do { - again = false; - - if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) { - removeNode(p); - p = end = p.prev; - if (p === p.next) break; - again = true; - - } else { - p = p.next; - } - } while (again || p !== end); - - return end; -} - -// main ear slicing loop which triangulates a polygon (given as a linked list) -function earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) { - if (!ear) return; - - // interlink polygon nodes in z-order - if (!pass && invSize) indexCurve(ear, minX, minY, invSize); - - var stop = ear, - prev, next; - - // iterate through ears, slicing them one by one - while (ear.prev !== ear.next) { - prev = ear.prev; - next = ear.next; - - if (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) { - // cut off the triangle - triangles.push(prev.i / dim); - triangles.push(ear.i / dim); - triangles.push(next.i / dim); - - removeNode(ear); - - // skipping the next vertex leads to less sliver triangles - ear = next.next; - stop = next.next; - - continue; - } - - ear = next; - - // if we looped through the whole remaining polygon and can't find any more ears - if (ear === stop) { - // try filtering points and slicing again - if (!pass) { - earcutLinked(filterPoints(ear), triangles, dim, minX, minY, invSize, 1); - - // if this didn't work, try curing all small self-intersections locally - } else if (pass === 1) { - ear = cureLocalIntersections(filterPoints(ear), triangles, dim); - earcutLinked(ear, triangles, dim, minX, minY, invSize, 2); - - // as a last resort, try splitting the remaining polygon into two - } else if (pass === 2) { - splitEarcut(ear, triangles, dim, minX, minY, invSize); - } - - break; - } - } -} - -// check whether a polygon node forms a valid ear with adjacent nodes -function isEar(ear) { - var a = ear.prev, - b = ear, - c = ear.next; - - if (area(a, b, c) >= 0) return false; // reflex, can't be an ear - - // now make sure we don't have other points inside the potential ear - var p = ear.next.next; - - while (p !== ear.prev) { - if (pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) && - area(p.prev, p, p.next) >= 0) return false; - p = p.next; - } - - return true; -} - -function isEarHashed(ear, minX, minY, invSize) { - var a = ear.prev, - b = ear, - c = ear.next; - - if (area(a, b, c) >= 0) return false; // reflex, can't be an ear - - // triangle bbox; min & max are calculated like this for speed - var minTX = a.x < b.x ? (a.x < c.x ? a.x : c.x) : (b.x < c.x ? b.x : c.x), - minTY = a.y < b.y ? (a.y < c.y ? a.y : c.y) : (b.y < c.y ? b.y : c.y), - maxTX = a.x > b.x ? (a.x > c.x ? a.x : c.x) : (b.x > c.x ? b.x : c.x), - maxTY = a.y > b.y ? (a.y > c.y ? a.y : c.y) : (b.y > c.y ? b.y : c.y); - - // z-order range for the current triangle bbox; - var minZ = zOrder(minTX, minTY, minX, minY, invSize), - maxZ = zOrder(maxTX, maxTY, minX, minY, invSize); - - var p = ear.prevZ, - n = ear.nextZ; - - // look for points inside the triangle in both directions - while (p && p.z >= minZ && n && n.z <= maxZ) { - if (p !== ear.prev && p !== ear.next && - pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) && - area(p.prev, p, p.next) >= 0) return false; - p = p.prevZ; - - if (n !== ear.prev && n !== ear.next && - pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) && - area(n.prev, n, n.next) >= 0) return false; - n = n.nextZ; - } - - // look for remaining points in decreasing z-order - while (p && p.z >= minZ) { - if (p !== ear.prev && p !== ear.next && - pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) && - area(p.prev, p, p.next) >= 0) return false; - p = p.prevZ; - } - - // look for remaining points in increasing z-order - while (n && n.z <= maxZ) { - if (n !== ear.prev && n !== ear.next && - pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) && - area(n.prev, n, n.next) >= 0) return false; - n = n.nextZ; - } - - return true; -} - -// go through all polygon nodes and cure small local self-intersections -function cureLocalIntersections(start, triangles, dim) { - var p = start; - do { - var a = p.prev, - b = p.next.next; - - if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) { - - triangles.push(a.i / dim); - triangles.push(p.i / dim); - triangles.push(b.i / dim); - - // remove two nodes involved - removeNode(p); - removeNode(p.next); - - p = start = b; - } - p = p.next; - } while (p !== start); - - return filterPoints(p); -} - -// try splitting polygon into two and triangulate them independently -function splitEarcut(start, triangles, dim, minX, minY, invSize) { - // look for a valid diagonal that divides the polygon into two - var a = start; - do { - var b = a.next.next; - while (b !== a.prev) { - if (a.i !== b.i && isValidDiagonal(a, b)) { - // split the polygon in two by the diagonal - var c = splitPolygon(a, b); - - // filter colinear points around the cuts - a = filterPoints(a, a.next); - c = filterPoints(c, c.next); - - // run earcut on each half - earcutLinked(a, triangles, dim, minX, minY, invSize); - earcutLinked(c, triangles, dim, minX, minY, invSize); - return; - } - b = b.next; - } - a = a.next; - } while (a !== start); -} - -// link every hole into the outer loop, producing a single-ring polygon without holes -function eliminateHoles(data, holeIndices, outerNode, dim) { - var queue = [], - i, len, start, end, list; - - for (i = 0, len = holeIndices.length; i < len; i++) { - start = holeIndices[i] * dim; - end = i < len - 1 ? holeIndices[i + 1] * dim : data.length; - list = linkedList(data, start, end, dim, false); - if (list === list.next) list.steiner = true; - queue.push(getLeftmost(list)); - } - - queue.sort(compareX); - - // process holes from left to right - for (i = 0; i < queue.length; i++) { - eliminateHole(queue[i], outerNode); - outerNode = filterPoints(outerNode, outerNode.next); - } - - return outerNode; -} - -function compareX(a, b) { - return a.x - b.x; -} - -// find a bridge between vertices that connects hole with an outer ring and and link it -function eliminateHole(hole, outerNode) { - outerNode = findHoleBridge(hole, outerNode); - if (outerNode) { - var b = splitPolygon(outerNode, hole); - - // filter collinear points around the cuts - filterPoints(outerNode, outerNode.next); - filterPoints(b, b.next); - } -} - -// David Eberly's algorithm for finding a bridge between hole and outer polygon -function findHoleBridge(hole, outerNode) { - var p = outerNode, - hx = hole.x, - hy = hole.y, - qx = -Infinity, - m; - - // find a segment intersected by a ray from the hole's leftmost point to the left; - // segment's endpoint with lesser x will be potential connection point - do { - if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) { - var x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y); - if (x <= hx && x > qx) { - qx = x; - if (x === hx) { - if (hy === p.y) return p; - if (hy === p.next.y) return p.next; - } - m = p.x < p.next.x ? p : p.next; - } - } - p = p.next; - } while (p !== outerNode); - - if (!m) return null; - - if (hx === qx) return m; // hole touches outer segment; pick leftmost endpoint - - // look for points inside the triangle of hole point, segment intersection and endpoint; - // if there are no points found, we have a valid connection; - // otherwise choose the point of the minimum angle with the ray as connection point - - var stop = m, - mx = m.x, - my = m.y, - tanMin = Infinity, - tan; - - p = m; - - do { - if (hx >= p.x && p.x >= mx && hx !== p.x && - pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) { - - tan = Math.abs(hy - p.y) / (hx - p.x); // tangential - - if (locallyInside(p, hole) && - (tan < tanMin || (tan === tanMin && (p.x > m.x || (p.x === m.x && sectorContainsSector(m, p)))))) { - m = p; - tanMin = tan; - } - } - - p = p.next; - } while (p !== stop); - - return m; -} - -// whether sector in vertex m contains sector in vertex p in the same coordinates -function sectorContainsSector(m, p) { - return area(m.prev, m, p.prev) < 0 && area(p.next, m, m.next) < 0; -} - -// interlink polygon nodes in z-order -function indexCurve(start, minX, minY, invSize) { - var p = start; - do { - if (p.z === null) p.z = zOrder(p.x, p.y, minX, minY, invSize); - p.prevZ = p.prev; - p.nextZ = p.next; - p = p.next; - } while (p !== start); - - p.prevZ.nextZ = null; - p.prevZ = null; - - sortLinked(p); -} - -// Simon Tatham's linked list merge sort algorithm -// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html -function sortLinked(list) { - var i, p, q, e, tail, numMerges, pSize, qSize, - inSize = 1; - - do { - p = list; - list = null; - tail = null; - numMerges = 0; - - while (p) { - numMerges++; - q = p; - pSize = 0; - for (i = 0; i < inSize; i++) { - pSize++; - q = q.nextZ; - if (!q) break; - } - qSize = inSize; - - while (pSize > 0 || (qSize > 0 && q)) { - - if (pSize !== 0 && (qSize === 0 || !q || p.z <= q.z)) { - e = p; - p = p.nextZ; - pSize--; - } else { - e = q; - q = q.nextZ; - qSize--; - } - - if (tail) tail.nextZ = e; - else list = e; - - e.prevZ = tail; - tail = e; - } - - p = q; - } - - tail.nextZ = null; - inSize *= 2; - - } while (numMerges > 1); - - return list; -} - -// z-order of a point given coords and inverse of the longer side of data bbox -function zOrder(x, y, minX, minY, invSize) { - // coords are transformed into non-negative 15-bit integer range - x = 32767 * (x - minX) * invSize; - y = 32767 * (y - minY) * invSize; - - x = (x | (x << 8)) & 0x00FF00FF; - x = (x | (x << 4)) & 0x0F0F0F0F; - x = (x | (x << 2)) & 0x33333333; - x = (x | (x << 1)) & 0x55555555; - - y = (y | (y << 8)) & 0x00FF00FF; - y = (y | (y << 4)) & 0x0F0F0F0F; - y = (y | (y << 2)) & 0x33333333; - y = (y | (y << 1)) & 0x55555555; - - return x | (y << 1); -} - -// find the leftmost node of a polygon ring -function getLeftmost(start) { - var p = start, - leftmost = start; - do { - if (p.x < leftmost.x || (p.x === leftmost.x && p.y < leftmost.y)) leftmost = p; - p = p.next; - } while (p !== start); - - return leftmost; -} - -// check if a point lies within a convex triangle -function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) { - return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 && - (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 && - (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0; -} - -// check if a diagonal between two polygon nodes is valid (lies in polygon interior) -function isValidDiagonal(a, b) { - return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && // dones't intersect other edges - (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible - (area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors - equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case -} - -// signed area of a triangle -function area(p, q, r) { - return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y); -} - -// check if two points are equal -function equals(p1, p2) { - return p1.x === p2.x && p1.y === p2.y; -} - -// check if two segments intersect -function intersects(p1, q1, p2, q2) { - var o1 = sign(area(p1, q1, p2)); - var o2 = sign(area(p1, q1, q2)); - var o3 = sign(area(p2, q2, p1)); - var o4 = sign(area(p2, q2, q1)); - - if (o1 !== o2 && o3 !== o4) return true; // general case - - if (o1 === 0 && onSegment(p1, p2, q1)) return true; // p1, q1 and p2 are collinear and p2 lies on p1q1 - if (o2 === 0 && onSegment(p1, q2, q1)) return true; // p1, q1 and q2 are collinear and q2 lies on p1q1 - if (o3 === 0 && onSegment(p2, p1, q2)) return true; // p2, q2 and p1 are collinear and p1 lies on p2q2 - if (o4 === 0 && onSegment(p2, q1, q2)) return true; // p2, q2 and q1 are collinear and q1 lies on p2q2 - - return false; -} - -// for collinear points p, q, r, check if point q lies on segment pr -function onSegment(p, q, r) { - return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y); -} - -function sign(num) { - return num > 0 ? 1 : num < 0 ? -1 : 0; -} - -// check if a polygon diagonal intersects any polygon segments -function intersectsPolygon(a, b) { - var p = a; - do { - if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i && - intersects(p, p.next, a, b)) return true; - p = p.next; - } while (p !== a); - - return false; -} - -// check if a polygon diagonal is locally inside the polygon -function locallyInside(a, b) { - return area(a.prev, a, a.next) < 0 ? - area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 : - area(a, b, a.prev) < 0 || area(a, a.next, b) < 0; -} - -// check if the middle point of a polygon diagonal is inside the polygon -function middleInside(a, b) { - var p = a, - inside = false, - px = (a.x + b.x) / 2, - py = (a.y + b.y) / 2; - do { - if (((p.y > py) !== (p.next.y > py)) && p.next.y !== p.y && - (px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x)) - inside = !inside; - p = p.next; - } while (p !== a); - - return inside; -} - -// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two; -// if one belongs to the outer ring and another to a hole, it merges it into a single ring -function splitPolygon(a, b) { - var a2 = new Node(a.i, a.x, a.y), - b2 = new Node(b.i, b.x, b.y), - an = a.next, - bp = b.prev; - - a.next = b; - b.prev = a; - - a2.next = an; - an.prev = a2; - - b2.next = a2; - a2.prev = b2; - - bp.next = b2; - b2.prev = bp; - - return b2; -} - -// create a node and optionally link it with previous one (in a circular doubly linked list) -function insertNode(i, x, y, last) { - var p = new Node(i, x, y); - - if (!last) { - p.prev = p; - p.next = p; - - } else { - p.next = last.next; - p.prev = last; - last.next.prev = p; - last.next = p; - } - return p; -} - -function removeNode(p) { - p.next.prev = p.prev; - p.prev.next = p.next; - - if (p.prevZ) p.prevZ.nextZ = p.nextZ; - if (p.nextZ) p.nextZ.prevZ = p.prevZ; -} - -function Node(i, x, y) { - // vertex index in coordinates array - this.i = i; - - // vertex coordinates - this.x = x; - this.y = y; - - // previous and next vertex nodes in a polygon ring - this.prev = null; - this.next = null; - - // z-order curve value - this.z = null; - - // previous and next nodes in z-order - this.prevZ = null; - this.nextZ = null; - - // indicates whether this is a steiner point - this.steiner = false; -} - -// return a percentage difference between the polygon area and its triangulation area; -// used to verify correctness of triangulation -earcut.deviation = function (data, holeIndices, dim, triangles) { - var hasHoles = holeIndices && holeIndices.length; - var outerLen = hasHoles ? holeIndices[0] * dim : data.length; - - var polygonArea = Math.abs(signedArea(data, 0, outerLen, dim)); - if (hasHoles) { - for (var i = 0, len = holeIndices.length; i < len; i++) { - var start = holeIndices[i] * dim; - var end = i < len - 1 ? holeIndices[i + 1] * dim : data.length; - polygonArea -= Math.abs(signedArea(data, start, end, dim)); - } - } - - var trianglesArea = 0; - for (i = 0; i < triangles.length; i += 3) { - var a = triangles[i] * dim; - var b = triangles[i + 1] * dim; - var c = triangles[i + 2] * dim; - trianglesArea += Math.abs( - (data[a] - data[c]) * (data[b + 1] - data[a + 1]) - - (data[a] - data[b]) * (data[c + 1] - data[a + 1])); - } - - return polygonArea === 0 && trianglesArea === 0 ? 0 : - Math.abs((trianglesArea - polygonArea) / polygonArea); -}; - -function signedArea(data, start, end, dim) { - var sum = 0; - for (var i = start, j = end - dim; i < end; i += dim) { - sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]); - j = i; - } - return sum; -} - -// turn a polygon in a multi-dimensional array form (e.g. as in GeoJSON) into a form Earcut accepts -earcut.flatten = function (data) { - var dim = data[0][0].length, - result = {vertices: [], holes: [], dimensions: dim}, - holeIndex = 0; - - for (var i = 0; i < data.length; i++) { - for (var j = 0; j < data[i].length; j++) { - for (var d = 0; d < dim; d++) result.vertices.push(data[i][j][d]); - } - if (i > 0) { - holeIndex += data[i - 1].length; - result.holes.push(holeIndex); - } - } - return result; -}; - - -/***/ }), -/* 67 */ +/* 69 */ /***/ (function(module, exports) { /** @@ -13329,7 +13514,7 @@ module.exports = Clone; /***/ }), -/* 68 */ +/* 70 */ /***/ (function(module, exports) { /** @@ -13378,7 +13563,7 @@ module.exports = SafeRange; /***/ }), -/* 69 */ +/* 71 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -13387,8 +13572,8 @@ module.exports = SafeRange; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var EaseMap = __webpack_require__(120); -var UppercaseFirst = __webpack_require__(187); +var EaseMap = __webpack_require__(122); +var UppercaseFirst = __webpack_require__(189); /** * This internal function is used to return the correct ease function for a Tween. @@ -13487,7 +13672,7 @@ module.exports = GetEaseFunction; /***/ }), -/* 70 */ +/* 72 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -13562,7 +13747,7 @@ module.exports = StrokePathWebGL; /***/ }), -/* 71 */ +/* 73 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -13572,12 +13757,12 @@ module.exports = StrokePathWebGL; */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(84); -var GetPoint = __webpack_require__(425); -var GetPoints = __webpack_require__(426); -var GEOM_CONST = __webpack_require__(48); -var Line = __webpack_require__(39); -var Random = __webpack_require__(164); +var Contains = __webpack_require__(85); +var GetPoint = __webpack_require__(442); +var GetPoints = __webpack_require__(443); +var GEOM_CONST = __webpack_require__(49); +var Line = __webpack_require__(40); +var Random = __webpack_require__(166); /** * @classdesc @@ -14009,7 +14194,7 @@ module.exports = Triangle; /***/ }), -/* 72 */ +/* 74 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -14020,7 +14205,7 @@ module.exports = Triangle; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var File = __webpack_require__(21); +var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -14283,43 +14468,7 @@ module.exports = ImageFile; /***/ }), -/* 73 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Internally used method to set the colliding state of a tile. This does not recalculate - * interesting faces. - * - * @function Phaser.Tilemaps.Components.SetTileCollision - * @private - * @since 3.0.0 - * - * @param {Phaser.Tilemaps.Tile} tile - The Tile to set the collision on. - * @param {boolean} [collides=true] - Should the tile index collide or not? - */ -var SetTileCollision = function (tile, collides) -{ - if (collides) - { - tile.setCollision(true, true, true, true, false); - } - else - { - tile.resetCollision(false); - } -}; - -module.exports = SetTileCollision; - - -/***/ }), -/* 74 */ +/* 75 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -14329,8 +14478,8 @@ module.exports = SetTileCollision; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var Rectangle = __webpack_require__(447); +var Components = __webpack_require__(11); +var Rectangle = __webpack_require__(464); /** * @classdesc @@ -15157,7 +15306,7 @@ module.exports = Tile; /***/ }), -/* 75 */ +/* 76 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -15166,10 +15315,12 @@ module.exports = Tile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var AnimationState = __webpack_require__(248); var Class = __webpack_require__(0); -var Components = __webpack_require__(12); +var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); -var SpriteRender = __webpack_require__(976); +var GameObjectEvents = __webpack_require__(29); +var SpriteRender = __webpack_require__(987); /** * @classdesc @@ -15249,19 +15400,38 @@ var Sprite = new Class({ this._crop = this.resetCropObject(); /** - * The Animation Controller of this Sprite. + * The Animation State component of this Sprite. + * + * This component provides features to apply animations to this Sprite. + * It is responsible for playing, loading, queuing animations for later playback, + * mixing between animations and setting the current animation frame to this Sprite. * * @name Phaser.GameObjects.Sprite#anims - * @type {Phaser.GameObjects.Components.Animation} + * @type {Phaser.Animations.AnimationState} * @since 3.0.0 */ - this.anims = new Components.Animation(this); + this.anims = new AnimationState(this); this.setTexture(texture, frame); this.setPosition(x, y); this.setSizeToFrame(); this.setOriginFromFrame(); this.initPipeline(); + + this.on(GameObjectEvents.ADDED_TO_SCENE, this.addedToScene, this); + this.on(GameObjectEvents.REMOVED_FROM_SCENE, this.removedFromScene, this); + }, + + // Overrides Game Object method + addedToScene: function () + { + this.scene.sys.updateList.add(this); + }, + + // Overrides Game Object method + removedFromScene: function () + { + this.scene.sys.updateList.remove(this); }, /** @@ -15280,22 +15450,310 @@ var Sprite = new Class({ }, /** - * Start playing the given animation. + * Start playing the given animation on this Sprite. + * + * Animations in Phaser can either belong to the global Animation Manager, or specifically to this Sprite. + * + * The benefit of a global animation is that multiple Sprites can all play the same animation, without + * having to duplicate the data. You can just create it once and then play it on any Sprite. + * + * The following code shows how to create a global repeating animation. The animation will be created + * from all of the frames within the sprite sheet that was loaded with the key 'muybridge': + * + * ```javascript + * var config = { + * key: 'run', + * frames: 'muybridge', + * frameRate: 15, + * repeat: -1 + * }; + * + * // This code should be run from within a Scene: + * this.anims.create(config); + * ``` + * + * However, if you wish to create an animation that is unique to this Sprite, and this Sprite alone, + * you can call the `Animation.create` method instead. It accepts the exact same parameters as when + * creating a global animation, however the resulting data is kept locally in this Sprite. + * + * With the animation created, either globally or locally, you can now play it on this Sprite: + * + * ```javascript + * this.add.sprite(x, y).play('run'); + * ``` + * + * Alternatively, if you wish to run it at a different frame rate, for example, you can pass a config + * object instead: + * + * ```javascript + * this.add.sprite(x, y).play({ key: 'run', frameRate: 24 }); + * ``` + * + * When playing an animation on a Sprite it will first check to see if it can find a matching key + * locally within the Sprite. If it can, it will play the local animation. If not, it will then + * search the global Animation Manager and look for it there. + * + * If you need a Sprite to be able to play both local and global animations, make sure they don't + * have conflicting keys. + * + * See the documentation for the `PlayAnimationConfig` config object for more details about this. + * + * Also, see the documentation in the Animation Manager for further details on creating animations. * * @method Phaser.GameObjects.Sprite#play + * @fires Phaser.Animations.Events#ANIMATION_START * @since 3.0.0 * - * @param {string} key - The string-based key of the animation to play. + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. - * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. * * @return {this} This Game Object. */ - play: function (key, ignoreIfPlaying, startFrame) + play: function (key, ignoreIfPlaying) { - this.anims.play(key, ignoreIfPlaying, startFrame); + return this.anims.play(key, ignoreIfPlaying); + }, - return this; + /** + * Start playing the given animation on this Sprite, in reverse. + * + * Animations in Phaser can either belong to the global Animation Manager, or specifically to this Sprite. + * + * The benefit of a global animation is that multiple Sprites can all play the same animation, without + * having to duplicate the data. You can just create it once and then play it on any Sprite. + * + * The following code shows how to create a global repeating animation. The animation will be created + * from all of the frames within the sprite sheet that was loaded with the key 'muybridge': + * + * ```javascript + * var config = { + * key: 'run', + * frames: 'muybridge', + * frameRate: 15, + * repeat: -1 + * }; + * + * // This code should be run from within a Scene: + * this.anims.create(config); + * ``` + * + * However, if you wish to create an animation that is unique to this Sprite, and this Sprite alone, + * you can call the `Animation.create` method instead. It accepts the exact same parameters as when + * creating a global animation, however the resulting data is kept locally in this Sprite. + * + * With the animation created, either globally or locally, you can now play it on this Sprite: + * + * ```javascript + * this.add.sprite(x, y).playReverse('run'); + * ``` + * + * Alternatively, if you wish to run it at a different frame rate, for example, you can pass a config + * object instead: + * + * ```javascript + * this.add.sprite(x, y).playReverse({ key: 'run', frameRate: 24 }); + * ``` + * + * When playing an animation on a Sprite it will first check to see if it can find a matching key + * locally within the Sprite. If it can, it will play the local animation. If not, it will then + * search the global Animation Manager and look for it there. + * + * If you need a Sprite to be able to play both local and global animations, make sure they don't + * have conflicting keys. + * + * See the documentation for the `PlayAnimationConfig` config object for more details about this. + * + * Also, see the documentation in the Animation Manager for further details on creating animations. + * + * @method Phaser.GameObjects.Sprite#playReverse + * @fires Phaser.Animations.Events#ANIMATION_START + * @since 3.50.0 + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. + * + * @return {this} This Game Object. + */ + playReverse: function (key, ignoreIfPlaying) + { + return this.anims.playReverse(key, ignoreIfPlaying); + }, + + /** + * Waits for the specified delay, in milliseconds, then starts playback of the given animation. + * + * If the animation _also_ has a delay value set in its config, it will be **added** to the delay given here. + * + * If an animation is already running and a new animation is given to this method, it will wait for + * the given delay before starting the new animation. + * + * If no animation is currently running, the given one begins after the delay. + * + * When playing an animation on a Sprite it will first check to see if it can find a matching key + * locally within the Sprite. If it can, it will play the local animation. If not, it will then + * search the global Animation Manager and look for it there. + * + * Prior to Phaser 3.50 this method was called 'delayedPlay'. + * + * @method Phaser.GameObjects.Components.Animation#playAfterDelay + * @fires Phaser.Animations.Events#ANIMATION_START + * @since 3.50.0 + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {integer} delay - The delay, in milliseconds, to wait before starting the animation playing. + * + * @return {this} This Game Object. + */ + playAfterDelay: function (key, delay) + { + return this.anims.playAfterDelay(key, delay); + }, + + /** + * Waits for the current animation to complete the `repeatCount` number of repeat cycles, then starts playback + * of the given animation. + * + * You can use this to ensure there are no harsh jumps between two sets of animations, i.e. going from an + * idle animation to a walking animation, by making them blend smoothly into each other. + * + * If no animation is currently running, the given one will start immediately. + * + * When playing an animation on a Sprite it will first check to see if it can find a matching key + * locally within the Sprite. If it can, it will play the local animation. If not, it will then + * search the global Animation Manager and look for it there. + * + * @method Phaser.GameObjects.Components.Animation#playAfterRepeat + * @fires Phaser.Animations.Events#ANIMATION_START + * @since 3.50.0 + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {integer} [repeatCount=1] - How many times should the animation repeat before the next one starts? + * + * @return {this} This Game Object. + */ + playAfterRepeat: function (key, repeatCount) + { + return this.anims.playAfterRepeat(key, repeatCount); + }, + + /** + * Sets an animation, or an array of animations, to be played immediately after the current one completes or stops. + * + * The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc, + * or have the `stop` method called directly on it. + * + * An animation set to repeat forever will never enter a completed state. + * + * You can chain a new animation at any point, including before the current one starts playing, during it, + * or when it ends (via its `animationcomplete` event). + * + * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained + * animations without impacting the animation they're playing. + * + * Call this method with no arguments to reset all currently chained animations. + * + * When playing an animation on a Sprite it will first check to see if it can find a matching key + * locally within the Sprite. If it can, it will play the local animation. If not, it will then + * search the global Animation Manager and look for it there. + * + * @method Phaser.GameObjects.Sprite#chain + * @since 3.50.0 + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig|string[]|Phaser.Animations.Animation[]|Phaser.Types.Animations.PlayAnimationConfig[])} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object, or an array of them. + * + * @return {this} This Game Object. + */ + chain: function (key) + { + return this.anims.chain(key); + }, + + /** + * Immediately stops the current animation from playing and dispatches the `ANIMATION_STOP` events. + * + * If no animation is playing, no event will be dispatched. + * + * If there is another animation queued (via the `chain` method) then it will start playing immediately. + * + * @method Phaser.GameObjects.Sprite#stop + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @since 3.50.0 + * + * @return {this} This Game Object. + */ + stop: function () + { + return this.anims.stop(); + }, + + /** + * Stops the current animation from playing after the specified time delay, given in milliseconds. + * + * It then dispatches the `ANIMATION_STOP` event. + * + * If no animation is running, no events will be dispatched. + * + * If there is another animation in the queue (set via the `chain` method) then it will start playing, + * when the current one stops. + * + * @method Phaser.GameObjects.Sprite#stopAfterDelay + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @since 3.50.0 + * + * @param {integer} delay - The number of milliseconds to wait before stopping this animation. + * + * @return {this} This Game Object. + */ + stopAfterDelay: function (delay) + { + return this.anims.stopAfterDelay(delay); + }, + + /** + * Stops the current animation from playing after the given number of repeats. + * + * It then dispatches the `ANIMATION_STOP` event. + * + * If no animation is running, no events will be dispatched. + * + * If there is another animation in the queue (set via the `chain` method) then it will start playing, + * when the current one stops. + * + * @method Phaser.GameObjects.Sprite#stopAfterRepeat + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @since 3.50.0 + * + * @param {integer} [repeatCount=1] - How many times should the animation repeat before stopping? + * + * @return {this} This Game Object. + */ + stopAfterRepeat: function (repeatCount) + { + return this.anims.stopAfterRepeat(repeatCount); + }, + + /** + * Stops the current animation from playing when it next sets the given frame. + * If this frame doesn't exist within the animation it will not stop it from playing. + * + * It then dispatches the `ANIMATION_STOP` event. + * + * If no animation is running, no events will be dispatched. + * + * If there is another animation in the queue (set via the `chain` method) then it will start playing, + * when the current one stops. + * + * @method Phaser.GameObjects.Sprite#stopOnFrame + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @since 3.50.0 + * + * @param {Phaser.Animations.AnimationFrame} frame - The frame to check before stopping this animation. + * + * @return {this} This Game Object. + */ + stopOnFrame: function (frame) + { + return this.anims.stopOnFrame(frame); }, /** @@ -15308,11 +15766,7 @@ var Sprite = new Class({ */ toJSON: function () { - var data = Components.ToJSON(this); - - // Extra Sprite data is added here - - return data; + return Components.ToJSON(this); }, /** @@ -15335,7 +15789,7 @@ module.exports = Sprite; /***/ }), -/* 76 */ +/* 77 */ /***/ (function(module, exports) { /** @@ -15363,7 +15817,7 @@ module.exports = GetCenterX; /***/ }), -/* 77 */ +/* 78 */ /***/ (function(module, exports) { /** @@ -15398,7 +15852,7 @@ module.exports = SetCenterX; /***/ }), -/* 78 */ +/* 79 */ /***/ (function(module, exports) { /** @@ -15426,7 +15880,7 @@ module.exports = GetCenterY; /***/ }), -/* 79 */ +/* 80 */ /***/ (function(module, exports) { /** @@ -15461,7 +15915,7 @@ module.exports = SetCenterY; /***/ }), -/* 80 */ +/* 81 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16271,7 +16725,7 @@ module.exports = Vector3; /***/ }), -/* 81 */ +/* 82 */ /***/ (function(module, exports) { /** @@ -16317,7 +16771,7 @@ module.exports = SpliceOne; /***/ }), -/* 82 */ +/* 83 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16327,7 +16781,7 @@ module.exports = SpliceOne; */ var Class = __webpack_require__(0); -var FromPoints = __webpack_require__(182); +var FromPoints = __webpack_require__(184); var Rectangle = __webpack_require__(9); var Vector2 = __webpack_require__(3); @@ -16934,7 +17388,7 @@ module.exports = Curve; /***/ }), -/* 83 */ +/* 84 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16949,22 +17403,22 @@ module.exports = Curve; module.exports = { - ADD: __webpack_require__(878), - COMPLETE: __webpack_require__(879), - FILE_COMPLETE: __webpack_require__(880), - FILE_KEY_COMPLETE: __webpack_require__(881), - FILE_LOAD_ERROR: __webpack_require__(882), - FILE_LOAD: __webpack_require__(883), - FILE_PROGRESS: __webpack_require__(884), - POST_PROCESS: __webpack_require__(885), - PROGRESS: __webpack_require__(886), - START: __webpack_require__(887) + ADD: __webpack_require__(894), + COMPLETE: __webpack_require__(895), + FILE_COMPLETE: __webpack_require__(896), + FILE_KEY_COMPLETE: __webpack_require__(897), + FILE_LOAD_ERROR: __webpack_require__(898), + FILE_LOAD: __webpack_require__(899), + FILE_PROGRESS: __webpack_require__(900), + POST_PROCESS: __webpack_require__(901), + PROGRESS: __webpack_require__(902), + START: __webpack_require__(903) }; /***/ }), -/* 84 */ +/* 85 */ /***/ (function(module, exports) { /** @@ -17017,7 +17471,7 @@ module.exports = Contains; /***/ }), -/* 85 */ +/* 86 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -17093,7 +17547,7 @@ module.exports = LineToLine; /***/ }), -/* 86 */ +/* 87 */ /***/ (function(module, exports) { /** @@ -17121,7 +17575,7 @@ module.exports = Angle; /***/ }), -/* 87 */ +/* 88 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -17138,8 +17592,8 @@ var Vertices = {}; module.exports = Vertices; -var Vector = __webpack_require__(100); -var Common = __webpack_require__(43); +var Vector = __webpack_require__(101); +var Common = __webpack_require__(44); (function() { @@ -17582,7 +18036,7 @@ var Common = __webpack_require__(43); /***/ }), -/* 88 */ +/* 89 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -17616,7 +18070,7 @@ module.exports = FromPercent; /***/ }), -/* 89 */ +/* 90 */ /***/ (function(module, exports) { /** @@ -17657,7 +18111,7 @@ module.exports = GetBoolean; /***/ }), -/* 90 */ +/* 91 */ /***/ (function(module, exports) { /** @@ -17828,37 +18282,6 @@ var TWEEN_CONST = { module.exports = TWEEN_CONST; -/***/ }), -/* 91 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.GameObjects.Events - */ - -module.exports = { - - DESTROY: __webpack_require__(586), - VIDEO_COMPLETE: __webpack_require__(587), - VIDEO_CREATED: __webpack_require__(588), - VIDEO_ERROR: __webpack_require__(589), - VIDEO_LOOP: __webpack_require__(590), - VIDEO_PLAY: __webpack_require__(591), - VIDEO_SEEKED: __webpack_require__(592), - VIDEO_SEEKING: __webpack_require__(593), - VIDEO_STOP: __webpack_require__(594), - VIDEO_TIMEOUT: __webpack_require__(595), - VIDEO_UNLOCKED: __webpack_require__(596) - -}; - - /***/ }), /* 92 */ /***/ (function(module, exports, __webpack_require__) { @@ -17870,13 +18293,13 @@ module.exports = { */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var DegToRad = __webpack_require__(40); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(41); +var Components = __webpack_require__(11); +var DegToRad = __webpack_require__(41); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(42); var Rectangle = __webpack_require__(9); -var TransformMatrix = __webpack_require__(30); -var ValueToColor = __webpack_require__(170); +var TransformMatrix = __webpack_require__(31); +var ValueToColor = __webpack_require__(172); var Vector2 = __webpack_require__(3); /** @@ -19796,12 +20219,12 @@ module.exports = BaseCamera; module.exports = { - ENTER_FULLSCREEN: __webpack_require__(707), - FULLSCREEN_FAILED: __webpack_require__(708), - FULLSCREEN_UNSUPPORTED: __webpack_require__(709), - LEAVE_FULLSCREEN: __webpack_require__(710), - ORIENTATION_CHANGE: __webpack_require__(711), - RESIZE: __webpack_require__(712) + ENTER_FULLSCREEN: __webpack_require__(723), + FULLSCREEN_FAILED: __webpack_require__(724), + FULLSCREEN_UNSUPPORTED: __webpack_require__(725), + LEAVE_FULLSCREEN: __webpack_require__(726), + ORIENTATION_CHANGE: __webpack_require__(727), + RESIZE: __webpack_require__(728) }; @@ -19854,6 +20277,97 @@ module.exports = SnapFloor; /* 95 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SpliceOne = __webpack_require__(82); + +/** + * Removes the given item, or array of items, from the array. + * + * The array is modified in-place. + * + * You can optionally specify a callback to be invoked for each item successfully removed from the array. + * + * @function Phaser.Utils.Array.Remove + * @since 3.4.0 + * + * @param {array} array - The array to be modified. + * @param {*|Array.<*>} item - The item, or array of items, to be removed from the array. + * @param {function} [callback] - A callback to be invoked for each item successfully removed from the array. + * @param {object} [context] - The context in which the callback is invoked. + * + * @return {*|Array.<*>} The item, or array of items, that were successfully removed from the array. + */ +var Remove = function (array, item, callback, context) +{ + if (context === undefined) { context = array; } + + var index; + + // Fast path to avoid array mutation and iteration + if (!Array.isArray(item)) + { + index = array.indexOf(item); + + if (index !== -1) + { + SpliceOne(array, index); + + if (callback) + { + callback.call(context, item); + } + + return item; + } + else + { + return null; + } + } + + // If we got this far, we have an array of items to remove + + var itemLength = item.length - 1; + + while (itemLength >= 0) + { + var entry = item[itemLength]; + + index = array.indexOf(entry); + + if (index !== -1) + { + SpliceOne(array, index); + + if (callback) + { + callback.call(context, entry); + } + } + else + { + // Item wasn't found in the array, so remove it from our return results + item.pop(); + } + + itemLength--; + } + + return item; +}; + +module.exports = Remove; + + +/***/ }), +/* 96 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. @@ -20708,7 +21222,7 @@ module.exports = Frame; /***/ }), -/* 96 */ +/* 97 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -20718,11 +21232,11 @@ module.exports = Frame; */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(97); -var GetPoint = __webpack_require__(398); -var GetPoints = __webpack_require__(399); -var GEOM_CONST = __webpack_require__(48); -var Random = __webpack_require__(163); +var Contains = __webpack_require__(98); +var GetPoint = __webpack_require__(411); +var GetPoints = __webpack_require__(412); +var GEOM_CONST = __webpack_require__(49); +var Random = __webpack_require__(165); /** * @classdesc @@ -21090,7 +21604,7 @@ module.exports = Ellipse; /***/ }), -/* 97 */ +/* 98 */ /***/ (function(module, exports) { /** @@ -21132,7 +21646,7 @@ module.exports = Contains; /***/ }), -/* 98 */ +/* 99 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -21141,15 +21655,16 @@ module.exports = Contains; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Actions = __webpack_require__(245); +var Actions = __webpack_require__(251); var Class = __webpack_require__(0); -var Events = __webpack_require__(91); +var Events = __webpack_require__(29); +var GetAll = __webpack_require__(191); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); var IsPlainObject = __webpack_require__(7); -var Range = __webpack_require__(392); -var Set = __webpack_require__(139); -var Sprite = __webpack_require__(75); +var Range = __webpack_require__(403); +var Set = __webpack_require__(140); +var Sprite = __webpack_require__(76); /** * @classdesc @@ -21581,6 +22096,13 @@ var Group = new Class({ Actions.SetScale(entries, scaleX, scaleY, stepScaleX, stepScaleY); + var originX = GetValue(options, 'setOrigin.x', 0.5); + var originY = GetValue(options, 'setOrigin.y', originX); + var stepOriginX = GetValue(options, 'setOrigin.stepX', 0); + var stepOriginY = GetValue(options, 'setOrigin.stepY', 0); + + Actions.SetOrigin(entries, originX, originY, stepOriginX, stepOriginY); + var alpha = GetValue(options, 'setAlpha.value', 1); var stepAlpha = GetValue(options, 'setAlpha.step', 0); @@ -21870,6 +22392,30 @@ var Group = new Class({ return this.children.size; }, + /** + * Returns all children in this Group that match the given criteria based on the `property` and `value` arguments. + * + * For example: `getAll('visible', true)` would return only children that have their `visible` property set. + * + * Optionally, you can specify a start and end index. For example if the Group has 100 elements, + * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only + * the first 50. + * + * @method Phaser.GameObjects.Group#getMatching + * @since 3.50.0 + * + * @param {string} [property] - The property to test on each array element. + * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check. + * @param {integer} [startIndex] - An optional start index to search from. + * @param {integer} [endIndex] - An optional end index to search to. + * + * @return {any[]} An array of matching Group members. The array will be empty if nothing matched. + */ + getMatching: function (property, value, startIndex, endIndex) + { + return GetAll(this.children, property, value, startIndex, endIndex); + }, + /** * Scans the Group, from top to bottom, for the first member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument, * assigns `x` and `y`, and returns the member. @@ -22810,7 +23356,7 @@ module.exports = Group; /***/ }), -/* 99 */ +/* 100 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -22874,7 +23420,7 @@ module.exports = FillPathWebGL; /***/ }), -/* 100 */ +/* 101 */ /***/ (function(module, exports) { /** @@ -23118,7 +23664,7 @@ module.exports = Vector; })(); /***/ }), -/* 101 */ +/* 102 */ /***/ (function(module, exports) { /** @@ -23244,7 +23790,7 @@ module.exports = Bounds; /***/ }), -/* 102 */ +/* 103 */ /***/ (function(module, exports) { /** @@ -23257,13 +23803,12 @@ module.exports = Bounds; * Checks if the given tile coordinates are within the bounds of the layer. * * @function Phaser.Tilemaps.Components.IsInLayerBounds - * @private * @since 3.0.0 * * @param {integer} tileX - The x coordinate, in tiles, not pixels. * @param {integer} tileY - The y coordinate, in tiles, not pixels. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {boolean} `true` if the tile coordinates are within the bounds of the layer, otherwise `false`. */ var IsInLayerBounds = function (tileX, tileY, layer) @@ -23275,7 +23820,7 @@ module.exports = IsInLayerBounds; /***/ }), -/* 103 */ +/* 104 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -23495,7 +24040,7 @@ module.exports = LayerData; /***/ }), -/* 104 */ +/* 105 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -23720,7 +24265,7 @@ module.exports = MapData; /***/ }), -/* 105 */ +/* 106 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -24124,7 +24669,7 @@ module.exports = Tileset; /***/ }), -/* 106 */ +/* 107 */ /***/ (function(module, exports) { /** @@ -24258,7 +24803,7 @@ module.exports = ALIGN_CONST; /***/ }), -/* 107 */ +/* 108 */ /***/ (function(module, exports) { /** @@ -24292,7 +24837,7 @@ module.exports = Equal; /***/ }), -/* 108 */ +/* 109 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -24464,7 +25009,14 @@ var WebGLPipeline = new Class({ * @type {WebGLBuffer} * @since 3.0.0 */ - this.vertexBuffer = this.renderer.createVertexBuffer(this.vertexData.byteLength, this.gl.STREAM_DRAW); + if (GetFastValue(config, 'vertices', null)) + { + this.vertexBuffer = this.renderer.createVertexBuffer(this.vertexData, this.gl.STREAM_DRAW); + } + else + { + this.vertexBuffer = this.renderer.createVertexBuffer(this.vertexData.byteLength, this.gl.STREAM_DRAW); + } /** * The handle to a WebGL program. @@ -24574,33 +25126,12 @@ var WebGLPipeline = new Class({ */ boot: function () { - var gl = this.gl; - var vertexBuffer = this.vertexBuffer; - var attributes = this.attributes; - var program = this.program; var renderer = this.renderer; - var vertexSize = this.vertexSize; - renderer.setProgram(program); - renderer.setVertexBuffer(vertexBuffer); + renderer.setProgram(this.program); + renderer.setVertexBuffer(this.vertexBuffer); - for (var i = 0; i < attributes.length; i++) - { - var element = attributes[i]; - var location = gl.getAttribLocation(program, element.name); - - if (location >= 0) - { - gl.enableVertexAttribArray(location); - gl.vertexAttribPointer(location, element.size, element.type, element.normalized, vertexSize, element.offset); - element.enabled = true; - element.location = location; - } - else if (location !== -1) - { - gl.disableVertexAttribArray(location); - } - } + this.setAttribPointers(true); this.hasBooted = true; @@ -24701,10 +25232,14 @@ var WebGLPipeline = new Class({ * @method Phaser.Renderer.WebGL.WebGLPipeline#bind * @since 3.0.0 * + * @param {boolean} [reset=false] - Should the pipeline be fully re-bound after a renderer pipeline clear? + * * @return {this} This WebGLPipeline instance. */ - bind: function () + bind: function (reset) { + if (reset === undefined) { reset = false; } + var vertexBuffer = this.vertexBuffer; var program = this.program; var renderer = this.renderer; @@ -24712,7 +25247,7 @@ var WebGLPipeline = new Class({ renderer.setProgram(program); renderer.setVertexBuffer(vertexBuffer); - this.setAttribPointers(); + this.setAttribPointers(reset); return this; }, @@ -24724,19 +25259,40 @@ var WebGLPipeline = new Class({ * @method Phaser.Renderer.WebGL.WebGLPipeline#setAttribPointers * @since 3.50.0 * + * @param {boolean} [reset=false] - Reset the vertex attribute locations? + * * @return {this} This WebGLPipeline instance. */ - setAttribPointers: function () + setAttribPointers: function (reset) { + if (reset === undefined) { reset = false; } + var gl = this.gl; var attributes = this.attributes; var vertexSize = this.vertexSize; + var program = this.program; for (var i = 0; i < attributes.length; i++) { var element = attributes[i]; - if (element.enabled) + if (reset) + { + var location = gl.getAttribLocation(program, element.name); + + if (location >= 0) + { + gl.enableVertexAttribArray(location); + gl.vertexAttribPointer(location, element.size, element.type, element.normalized, vertexSize, element.offset); + element.enabled = true; + element.location = location; + } + else if (location !== -1) + { + gl.disableVertexAttribArray(location); + } + } + else if (element.enabled) { gl.vertexAttribPointer(element.location, element.size, element.type, element.normalized, vertexSize, element.offset); } @@ -25157,7 +25713,7 @@ module.exports = WebGLPipeline; /***/ }), -/* 109 */ +/* 110 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25168,15 +25724,15 @@ module.exports = WebGLPipeline; */ var Class = __webpack_require__(0); -var Earcut = __webpack_require__(66); +var Earcut = __webpack_require__(60); var GetFastValue = __webpack_require__(2); -var ModelViewProjection = __webpack_require__(110); -var ProjectOrtho = __webpack_require__(181); -var ShaderSourceFS = __webpack_require__(793); -var ShaderSourceVS = __webpack_require__(794); -var TransformMatrix = __webpack_require__(30); +var ModelViewProjection = __webpack_require__(111); +var ProjectOrtho = __webpack_require__(183); +var ShaderSourceFS = __webpack_require__(811); +var ShaderSourceVS = __webpack_require__(812); +var TransformMatrix = __webpack_require__(31); var Utils = __webpack_require__(10); -var WebGLPipeline = __webpack_require__(108); +var WebGLPipeline = __webpack_require__(109); /** * @classdesc @@ -25460,11 +26016,15 @@ var MultiPipeline = new Class({ * @method Phaser.Renderer.WebGL.Pipelines.MultiPipeline#bind * @since 3.50.0 * + * @param {boolean} [reset=false] - Should the pipeline be fully re-bound after a renderer pipeline clear? + * * @return {this} This WebGLPipeline instance. */ - bind: function () + bind: function (reset) { - WebGLPipeline.prototype.bind.call(this); + if (reset === undefined) { reset = false; } + + WebGLPipeline.prototype.bind.call(this, reset); this.renderer.setInt1iv(this.program, 'uMainSampler', this.renderer.textureIndexes); @@ -26600,7 +27160,7 @@ module.exports = MultiPipeline; /***/ }), -/* 110 */ +/* 111 */ /***/ (function(module, exports) { /** @@ -26744,7 +27304,7 @@ module.exports = ModelViewProjection; /***/ }), -/* 111 */ +/* 112 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26754,9 +27314,9 @@ module.exports = ModelViewProjection; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); +var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); -var ImageRender = __webpack_require__(979); +var ImageRender = __webpack_require__(990); /** * @classdesc @@ -26845,7 +27405,7 @@ module.exports = Image; /***/ }), -/* 112 */ +/* 113 */ /***/ (function(module, exports) { /** @@ -26874,7 +27434,7 @@ module.exports = HasValue; /***/ }), -/* 113 */ +/* 114 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26892,12 +27452,12 @@ var Bodies = {}; module.exports = Bodies; -var Vertices = __webpack_require__(87); -var Common = __webpack_require__(43); -var Body = __webpack_require__(62); -var Bounds = __webpack_require__(101); -var Vector = __webpack_require__(100); -var decomp = __webpack_require__(1404); +var Vertices = __webpack_require__(88); +var Common = __webpack_require__(44); +var Body = __webpack_require__(64); +var Bounds = __webpack_require__(102); +var Vector = __webpack_require__(101); +var decomp = __webpack_require__(1400); (function() { @@ -27232,7 +27792,7 @@ var decomp = __webpack_require__(1404); /***/ }), -/* 114 */ +/* 115 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -27241,14 +27801,14 @@ var decomp = __webpack_require__(1404); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlendModes = __webpack_require__(53); -var Circle = __webpack_require__(65); -var CircleContains = __webpack_require__(56); +var BlendModes = __webpack_require__(54); +var Circle = __webpack_require__(68); +var CircleContains = __webpack_require__(57); var Class = __webpack_require__(0); -var Components = __webpack_require__(12); +var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); var Rectangle = __webpack_require__(9); -var RectangleContains = __webpack_require__(49); +var RectangleContains = __webpack_require__(50); /** * @classdesc @@ -27544,44 +28104,6 @@ var Zone = new Class({ module.exports = Zone; -/***/ }), -/* 115 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Animations.Events - */ - -module.exports = { - - ADD_ANIMATION: __webpack_require__(538), - ANIMATION_COMPLETE: __webpack_require__(539), - ANIMATION_REPEAT: __webpack_require__(540), - ANIMATION_RESTART: __webpack_require__(541), - ANIMATION_START: __webpack_require__(542), - PAUSE_ALL: __webpack_require__(543), - REMOVE_ANIMATION: __webpack_require__(544), - RESUME_ALL: __webpack_require__(545), - SPRITE_ANIMATION_COMPLETE: __webpack_require__(546), - SPRITE_ANIMATION_KEY_COMPLETE: __webpack_require__(547), - SPRITE_ANIMATION_KEY_REPEAT: __webpack_require__(548), - SPRITE_ANIMATION_KEY_RESTART: __webpack_require__(549), - SPRITE_ANIMATION_KEY_START: __webpack_require__(550), - SPRITE_ANIMATION_KEY_UPDATE: __webpack_require__(551), - SPRITE_ANIMATION_REPEAT: __webpack_require__(552), - SPRITE_ANIMATION_RESTART: __webpack_require__(553), - SPRITE_ANIMATION_START: __webpack_require__(554), - SPRITE_ANIMATION_UPDATE: __webpack_require__(555) - -}; - - /***/ }), /* 116 */ /***/ (function(module, exports) { @@ -27650,7 +28172,7 @@ module.exports = GetColorFromValue; */ var Class = __webpack_require__(0); -var Events = __webpack_require__(288); +var Events = __webpack_require__(292); /** * @callback DataEachCallback @@ -28397,18 +28919,421 @@ module.exports = Shuffle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Back = __webpack_require__(306); -var Bounce = __webpack_require__(307); -var Circular = __webpack_require__(308); -var Cubic = __webpack_require__(309); -var Elastic = __webpack_require__(310); -var Expo = __webpack_require__(311); -var Linear = __webpack_require__(312); -var Quadratic = __webpack_require__(313); -var Quartic = __webpack_require__(314); -var Quintic = __webpack_require__(315); -var Sine = __webpack_require__(316); -var Stepped = __webpack_require__(317); +/** + * @namespace Phaser.Animations.Events + */ + +module.exports = { + + ADD_ANIMATION: __webpack_require__(649), + ANIMATION_COMPLETE: __webpack_require__(650), + ANIMATION_REPEAT: __webpack_require__(651), + ANIMATION_RESTART: __webpack_require__(652), + ANIMATION_START: __webpack_require__(653), + ANIMATION_STOP: __webpack_require__(654), + ANIMATION_UPDATE: __webpack_require__(655), + PAUSE_ALL: __webpack_require__(656), + REMOVE_ANIMATION: __webpack_require__(657), + RESUME_ALL: __webpack_require__(658) + +}; + + +/***/ }), +/* 121 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); + +/** + * @callback EachMapCallback + * + * @param {string} key - The key of the Map entry. + * @param {E} entry - The value of the Map entry. + * + * @return {?boolean} The callback result. + */ + +/** + * @classdesc + * The keys of a Map can be arbitrary values. + * + * ```javascript + * var map = new Map([ + * [ 1, 'one' ], + * [ 2, 'two' ], + * [ 3, 'three' ] + * ]); + * ``` + * + * @class Map + * @memberof Phaser.Structs + * @constructor + * @since 3.0.0 + * + * @generic K + * @generic V + * @genericUse {V[]} - [elements] + * + * @param {Array.<*>} elements - An optional array of key-value pairs to populate this Map with. + */ +var Map = new Class({ + + initialize: + + function Map (elements) + { + /** + * The entries in this Map. + * + * @genericUse {Object.} - [$type] + * + * @name Phaser.Structs.Map#entries + * @type {Object.} + * @default {} + * @since 3.0.0 + */ + this.entries = {}; + + /** + * The number of key / value pairs in this Map. + * + * @name Phaser.Structs.Map#size + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.size = 0; + + if (Array.isArray(elements)) + { + for (var i = 0; i < elements.length; i++) + { + this.set(elements[i][0], elements[i][1]); + } + } + }, + + /** + * Adds an element with a specified `key` and `value` to this Map. + * If the `key` already exists, the value will be replaced. + * + * @method Phaser.Structs.Map#set + * @since 3.0.0 + * + * @genericUse {K} - [key] + * @genericUse {V} - [value] + * @genericUse {Phaser.Structs.Map.} - [$return] + * + * @param {string} key - The key of the element to be added to this Map. + * @param {*} value - The value of the element to be added to this Map. + * + * @return {Phaser.Structs.Map} This Map object. + */ + set: function (key, value) + { + if (!this.has(key)) + { + this.size++; + } + + this.entries[key] = value; + + return this; + }, + + /** + * Returns the value associated to the `key`, or `undefined` if there is none. + * + * @method Phaser.Structs.Map#get + * @since 3.0.0 + * + * @genericUse {K} - [key] + * @genericUse {V} - [$return] + * + * @param {string} key - The key of the element to return from the `Map` object. + * + * @return {*} The element associated with the specified key or `undefined` if the key can't be found in this Map object. + */ + get: function (key) + { + if (this.has(key)) + { + return this.entries[key]; + } + }, + + /** + * Returns an `Array` of all the values stored in this Map. + * + * @method Phaser.Structs.Map#getArray + * @since 3.0.0 + * + * @genericUse {V[]} - [$return] + * + * @return {Array.<*>} An array of the values stored in this Map. + */ + getArray: function () + { + var output = []; + var entries = this.entries; + + for (var key in entries) + { + output.push(entries[key]); + } + + return output; + }, + + /** + * Returns a boolean indicating whether an element with the specified key exists or not. + * + * @method Phaser.Structs.Map#has + * @since 3.0.0 + * + * @genericUse {K} - [key] + * + * @param {string} key - The key of the element to test for presence of in this Map. + * + * @return {boolean} Returns `true` if an element with the specified key exists in this Map, otherwise `false`. + */ + has: function (key) + { + return (this.entries.hasOwnProperty(key)); + }, + + /** + * Delete the specified element from this Map. + * + * @method Phaser.Structs.Map#delete + * @since 3.0.0 + * + * @genericUse {K} - [key] + * @genericUse {Phaser.Structs.Map.} - [$return] + * + * @param {string} key - The key of the element to delete from this Map. + * + * @return {Phaser.Structs.Map} This Map object. + */ + delete: function (key) + { + if (this.has(key)) + { + delete this.entries[key]; + this.size--; + } + + return this; + }, + + /** + * Delete all entries from this Map. + * + * @method Phaser.Structs.Map#clear + * @since 3.0.0 + * + * @genericUse {Phaser.Structs.Map.} - [$return] + * + * @return {Phaser.Structs.Map} This Map object. + */ + clear: function () + { + Object.keys(this.entries).forEach(function (prop) + { + delete this.entries[prop]; + + }, this); + + this.size = 0; + + return this; + }, + + /** + * Returns all entries keys in this Map. + * + * @method Phaser.Structs.Map#keys + * @since 3.0.0 + * + * @genericUse {K[]} - [$return] + * + * @return {string[]} Array containing entries' keys. + */ + keys: function () + { + return Object.keys(this.entries); + }, + + /** + * Returns an `Array` of all entries. + * + * @method Phaser.Structs.Map#values + * @since 3.0.0 + * + * @genericUse {V[]} - [$return] + * + * @return {Array.<*>} An `Array` of entries. + */ + values: function () + { + var output = []; + var entries = this.entries; + + for (var key in entries) + { + output.push(entries[key]); + } + + return output; + }, + + /** + * Dumps the contents of this Map to the console via `console.group`. + * + * @method Phaser.Structs.Map#dump + * @since 3.0.0 + */ + dump: function () + { + var entries = this.entries; + + // eslint-disable-next-line no-console + console.group('Map'); + + for (var key in entries) + { + console.log(key, entries[key]); + } + + // eslint-disable-next-line no-console + console.groupEnd(); + }, + + /** + * Passes all entries in this Map to the given callback. + * + * @method Phaser.Structs.Map#each + * @since 3.0.0 + * + * @genericUse {EachMapCallback.} - [callback] + * @genericUse {Phaser.Structs.Map.} - [$return] + * + * @param {EachMapCallback} callback - The callback which will receive the keys and entries held in this Map. + * + * @return {Phaser.Structs.Map} This Map object. + */ + each: function (callback) + { + var entries = this.entries; + + for (var key in entries) + { + if (callback(key, entries[key]) === false) + { + break; + } + } + + return this; + }, + + /** + * Returns `true` if the value exists within this Map. Otherwise, returns `false`. + * + * @method Phaser.Structs.Map#contains + * @since 3.0.0 + * + * @genericUse {V} - [value] + * + * @param {*} value - The value to search for. + * + * @return {boolean} `true` if the value is found, otherwise `false`. + */ + contains: function (value) + { + var entries = this.entries; + + for (var key in entries) + { + if (entries[key] === value) + { + return true; + } + } + + return false; + }, + + /** + * Merges all new keys from the given Map into this one. + * If it encounters a key that already exists it will be skipped unless override is set to `true`. + * + * @method Phaser.Structs.Map#merge + * @since 3.0.0 + * + * @genericUse {Phaser.Structs.Map.} - [map,$return] + * + * @param {Phaser.Structs.Map} map - The Map to merge in to this Map. + * @param {boolean} [override=false] - Set to `true` to replace values in this Map with those from the source map, or `false` to skip them. + * + * @return {Phaser.Structs.Map} This Map object. + */ + merge: function (map, override) + { + if (override === undefined) { override = false; } + + var local = this.entries; + var source = map.entries; + + for (var key in source) + { + if (local.hasOwnProperty(key) && override) + { + local[key] = source[key]; + } + else + { + this.set(key, source[key]); + } + } + + return this; + } + +}); + +module.exports = Map; + + +/***/ }), +/* 122 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Back = __webpack_require__(314); +var Bounce = __webpack_require__(315); +var Circular = __webpack_require__(316); +var Cubic = __webpack_require__(317); +var Elastic = __webpack_require__(318); +var Expo = __webpack_require__(319); +var Linear = __webpack_require__(320); +var Quadratic = __webpack_require__(321); +var Quartic = __webpack_require__(322); +var Quintic = __webpack_require__(323); +var Sine = __webpack_require__(324); +var Stepped = __webpack_require__(325); // EaseMap module.exports = { @@ -28469,7 +29394,7 @@ module.exports = { /***/ }), -/* 121 */ +/* 123 */ /***/ (function(module, exports) { /** @@ -28499,7 +29424,7 @@ module.exports = Linear; /***/ }), -/* 122 */ +/* 124 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -28668,10 +29593,10 @@ function init () module.exports = init(); -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(733))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(751))) /***/ }), -/* 123 */ +/* 125 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28680,7 +29605,7 @@ module.exports = init(); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var OS = __webpack_require__(122); +var OS = __webpack_require__(124); /** * Determines the browser type and version running this Phaser Game instance. @@ -28781,7 +29706,7 @@ module.exports = init(); /***/ }), -/* 124 */ +/* 126 */ /***/ (function(module, exports) { /** @@ -28810,7 +29735,7 @@ module.exports = FloatBetween; /***/ }), -/* 125 */ +/* 127 */ /***/ (function(module, exports) { /** @@ -28840,7 +29765,7 @@ module.exports = IsSizePowerOfTwo; /***/ }), -/* 126 */ +/* 128 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29385,7 +30310,7 @@ module.exports = Vector4; /***/ }), -/* 127 */ +/* 129 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29400,17 +30325,17 @@ module.exports = Vector4; module.exports = { - ADD: __webpack_require__(785), - ERROR: __webpack_require__(786), - LOAD: __webpack_require__(787), - READY: __webpack_require__(788), - REMOVE: __webpack_require__(789) + ADD: __webpack_require__(803), + ERROR: __webpack_require__(804), + LOAD: __webpack_require__(805), + READY: __webpack_require__(806), + REMOVE: __webpack_require__(807) }; /***/ }), -/* 128 */ +/* 130 */ /***/ (function(module, exports) { /** @@ -29468,98 +30393,7 @@ module.exports = AddToDOM; /***/ }), -/* 129 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SpliceOne = __webpack_require__(81); - -/** - * Removes the given item, or array of items, from the array. - * - * The array is modified in-place. - * - * You can optionally specify a callback to be invoked for each item successfully removed from the array. - * - * @function Phaser.Utils.Array.Remove - * @since 3.4.0 - * - * @param {array} array - The array to be modified. - * @param {*|Array.<*>} item - The item, or array of items, to be removed from the array. - * @param {function} [callback] - A callback to be invoked for each item successfully removed from the array. - * @param {object} [context] - The context in which the callback is invoked. - * - * @return {*|Array.<*>} The item, or array of items, that were successfully removed from the array. - */ -var Remove = function (array, item, callback, context) -{ - if (context === undefined) { context = array; } - - var index; - - // Fast path to avoid array mutation and iteration - if (!Array.isArray(item)) - { - index = array.indexOf(item); - - if (index !== -1) - { - SpliceOne(array, index); - - if (callback) - { - callback.call(context, item); - } - - return item; - } - else - { - return null; - } - } - - // If we got this far, we have an array of items to remove - - var itemLength = item.length - 1; - - while (itemLength >= 0) - { - var entry = item[itemLength]; - - index = array.indexOf(entry); - - if (index !== -1) - { - SpliceOne(array, index); - - if (callback) - { - callback.call(context, entry); - } - } - else - { - // Item wasn't found in the array, so remove it from our return results - item.pop(); - } - - itemLength--; - } - - return item; -}; - -module.exports = Remove; - - -/***/ }), -/* 130 */ +/* 131 */ /***/ (function(module, exports) { /** @@ -30465,7 +31299,7 @@ module.exports = KeyCodes; /***/ }), -/* 131 */ +/* 132 */ /***/ (function(module, exports) { /** @@ -30588,7 +31422,7 @@ module.exports = CONST; /***/ }), -/* 132 */ +/* 133 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -30597,7 +31431,7 @@ module.exports = CONST; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clone = __webpack_require__(67); +var Clone = __webpack_require__(69); /** * Creates a new Object using all values from obj1 and obj2. @@ -30633,7 +31467,7 @@ module.exports = Merge; /***/ }), -/* 133 */ +/* 134 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -30644,13 +31478,13 @@ module.exports = Merge; */ var Class = __webpack_require__(0); -var Clone = __webpack_require__(67); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(59); -var GameEvents = __webpack_require__(20); +var Clone = __webpack_require__(69); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(61); +var GameEvents = __webpack_require__(21); var NOOP = __webpack_require__(1); -var GetAll = __webpack_require__(382); -var GetFirst = __webpack_require__(383); +var GetAll = __webpack_require__(191); +var GetFirst = __webpack_require__(394); /** * @classdesc @@ -31347,7 +32181,7 @@ module.exports = BaseSoundManager; /***/ }), -/* 134 */ +/* 135 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31358,8 +32192,8 @@ module.exports = BaseSoundManager; */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(59); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(61); var Extend = __webpack_require__(19); var NOOP = __webpack_require__(1); @@ -31847,7 +32681,7 @@ module.exports = BaseSound; /***/ }), -/* 135 */ +/* 136 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31856,10 +32690,10 @@ module.exports = BaseSound; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayUtils = __webpack_require__(189); +var ArrayUtils = __webpack_require__(192); var Class = __webpack_require__(0); var NOOP = __webpack_require__(1); -var StableSort = __webpack_require__(137); +var StableSort = __webpack_require__(138); /** * @callback EachListCallback @@ -31910,7 +32744,7 @@ var List = new Class({ /** * The index of the current element. - * + * * This is used internally when iterating through the list with the {@link #first}, {@link #last}, {@link #get}, and {@link #previous} properties. * * @name Phaser.Structs.List#position @@ -32063,7 +32897,7 @@ var List = new Class({ }; } - StableSort.inplace(this.list, handler); + StableSort(this.list, handler); return this; }, @@ -32133,7 +32967,7 @@ var List = new Class({ * For example: `getAll('parent')` would return only children that have a property called `parent`. * * You can also specify a value to compare the property to: - * + * * `getAll('visible', true)` would return only children that have their visible property set to `true`. * * Optionally you can specify a start and end index. For example if this List had 100 children, @@ -32293,7 +33127,7 @@ var List = new Class({ * @since 3.0.0 * * @genericUse {Phaser.Structs.List.} - [$return] - * + * * @param {boolean} [skipCallback=false] - Skip calling the List.removeCallback. * * @return {Phaser.Structs.List} This List object. @@ -32601,7 +33435,7 @@ var List = new Class({ /** * The next item in the List, or `null` if the entire List has been traversed. - * + * * This property can be read successively after reading {@link #first} or manually setting the {@link #position} to iterate the List. * * @name Phaser.Structs.List#next @@ -32630,7 +33464,7 @@ var List = new Class({ /** * The previous item in the List, or `null` if the entire List has been traversed. - * + * * This property can be read successively after reading {@link #last} or manually setting the {@link #position} to iterate the List backwards. * * @name Phaser.Structs.List#previous @@ -32663,7 +33497,7 @@ module.exports = List; /***/ }), -/* 136 */ +/* 137 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32672,8 +33506,8 @@ module.exports = List; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CheckMatrix = __webpack_require__(190); -var TransposeMatrix = __webpack_require__(390); +var CheckMatrix = __webpack_require__(193); +var TransposeMatrix = __webpack_require__(401); /** * Rotates the array matrix based on the given rotation value. @@ -32735,152 +33569,183 @@ module.exports = RotateMatrix; /***/ }), -/* 137 */ -/***/ (function(module, exports, __webpack_require__) { +/* 138 */ +/***/ (function(module, exports) { /** * @author Richard Davey + * @author Angry Bytes (and contributors) * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -//! stable.js 0.1.6, https://github.com/Two-Screen/stable -//! © 2017 Angry Bytes and contributors. MIT licensed. +/** + * The comparator function. + * + * @ignore + * + * @param {*} a - The first item to test. + * @param {*} b - The second itemt to test. + * + * @return {boolean} True if they localCompare, otherwise false. + */ +function Compare (a, b) +{ + return String(a).localeCompare(b); +} /** - * @namespace Phaser.Utils.Array.StableSortFunctions + * Process the array contents. + * + * @ignore + * + * @param {array} array - The array to process. + * @param {function} compare - The comparison function. + * + * @return {array} - The processed array. */ - -(function() { - - /** - * A stable array sort, because `Array#sort()` is not guaranteed stable. - * This is an implementation of merge sort, without recursion. - * - * @function Phaser.Utils.Array.StableSort - * @since 3.0.0 - * - * @param {array} arr - The input array to be sorted. - * @param {function} comp - The comparison handler. - * - * @return {array} The sorted result. - */ -var stable = function(arr, comp) { - return exec(arr.slice(), comp); -}; - - /** - * Sort the input array and simply copy it back if the result isn't in the original array, which happens on an odd number of passes. - * - * @function Phaser.Utils.Array.StableSortFunctions.inplace - * @memberof Phaser.Utils.Array.StableSortFunctions - * @since 3.0.0 - * - * @param {array} arr - The input array. - * @param {function} comp - The comparison handler. - * - * @return {array} The sorted array. - */ -stable.inplace = function(arr, comp) { - var result = exec(arr, comp); - - // This simply copies back if the result isn't in the original array, - // which happens on an odd number of passes. - if (result !== arr) { - pass(result, null, arr.length, arr); - } - - return arr; -}; - -// Execute the sort using the input array and a second buffer as work space. -// Returns one of those two, containing the final result. -function exec(arr, comp) { - if (typeof(comp) !== 'function') { - comp = function(a, b) { - return String(a).localeCompare(b); - }; - } - +function Process (array, compare) +{ // Short-circuit when there's nothing to sort. - var len = arr.length; - if (len <= 1) { - return arr; + var len = array.length; + + if (len <= 1) + { + return array; } // Rather than dividing input, simply iterate chunks of 1, 2, 4, 8, etc. // Chunks are the size of the left or right hand in merge sort. // Stop when the left-hand covers all of the array. var buffer = new Array(len); - for (var chk = 1; chk < len; chk *= 2) { - pass(arr, comp, chk, buffer); - var tmp = arr; - arr = buffer; + for (var chk = 1; chk < len; chk *= 2) + { + RunPass(array, compare, chk, buffer); + + var tmp = array; + + array = buffer; + buffer = tmp; } - return arr; + return array; } -// Run a single pass with the given chunk size. -var pass = function(arr, comp, chk, result) { +/** + * Run a single pass with the given chunk size. + * + * @ignore + * + * @param {array} arr - The array to run the pass on. + * @param {function} comp - The comparison function. + * @param {number} chk - The number of iterations. + * @param {array} result - The array to store the result in. + */ +function RunPass (arr, comp, chk, result) +{ var len = arr.length; var i = 0; + // Step size / double chunk size. var dbl = chk * 2; + // Bounds of the left and right chunks. var l, r, e; + // Iterators over the left and right chunk. var li, ri; // Iterate over pairs of chunks. - for (l = 0; l < len; l += dbl) { + for (l = 0; l < len; l += dbl) + { r = l + chk; e = r + chk; - if (r > len) r = len; - if (e > len) e = len; + + if (r > len) + { + r = len; + } + + if (e > len) + { + e = len; + } // Iterate both chunks in parallel. li = l; ri = r; - while (true) { + + while (true) + { // Compare the chunks. - if (li < r && ri < e) { + if (li < r && ri < e) + { // This works for a regular `sort()` compatible comparator, // but also for a simple comparator like: `a > b` - if (comp(arr[li], arr[ri]) <= 0) { + if (comp(arr[li], arr[ri]) <= 0) + { result[i++] = arr[li++]; } - else { + else + { result[i++] = arr[ri++]; } } - // Nothing to compare, just flush what's left. - else if (li < r) { + else if (li < r) + { + // Nothing to compare, just flush what's left. result[i++] = arr[li++]; } - else if (ri < e) { + else if (ri < e) + { result[i++] = arr[ri++]; } - // Both iterators are at the chunk ends. - else { + else + { + // Both iterators are at the chunk ends. break; } } } +} + +/** + * An in-place stable array sort, because `Array#sort()` is not guaranteed stable. + * + * This is an implementation of merge sort, without recursion. + * + * Function based on the Two-Screen/stable sort 0.1.8 from https://github.com/Two-Screen/stable + * + * @function Phaser.Utils.Array.StableSort + * @since 3.0.0 + * + * @param {array} array - The input array to be sorted. + * @param {function} [compare] - The comparison function. + * + * @return {array} The sorted result. + */ +var StableSort = function (array, compare) +{ + if (compare === undefined) { compare = Compare; } + + var result = Process(array, compare); + + // This simply copies back if the result isn't in the original array, which happens on an odd number of passes. + if (result !== array) + { + RunPass(result, null, array.length, array); + } + + return array; }; -// Export using CommonJS or to the window. -if (true) { - module.exports = stable; -} -else {} +module.exports = StableSort; -})(); /***/ }), -/* 138 */ +/* 139 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32891,14 +33756,14 @@ else {} var Class = __webpack_require__(0); var Clamp = __webpack_require__(17); -var Components = __webpack_require__(12); +var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); var GetColorFromValue = __webpack_require__(117); -var GetBitmapTextSize = __webpack_require__(953); -var ParseFromAtlas = __webpack_require__(954); -var ParseXMLBitmapFont = __webpack_require__(193); +var GetBitmapTextSize = __webpack_require__(965); +var ParseFromAtlas = __webpack_require__(966); +var ParseXMLBitmapFont = __webpack_require__(196); var Rectangle = __webpack_require__(9); -var Render = __webpack_require__(955); +var Render = __webpack_require__(967); /** * @classdesc @@ -34008,7 +34873,7 @@ module.exports = BitmapText; /***/ }), -/* 139 */ +/* 140 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34457,7 +35322,7 @@ module.exports = Set; /***/ }), -/* 140 */ +/* 141 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34467,9 +35332,9 @@ module.exports = Set; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); +var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); -var MeshRender = __webpack_require__(1086); +var MeshRender = __webpack_require__(1093); var NOOP = __webpack_require__(1); /** @@ -34628,7 +35493,7 @@ module.exports = Mesh; /***/ }), -/* 141 */ +/* 142 */ /***/ (function(module, exports) { /** @@ -34666,7 +35531,7 @@ module.exports = RectangleToRectangle; /***/ }), -/* 142 */ +/* 143 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34711,7 +35576,7 @@ InputPluginCache.register = function (key, plugin, mapping, settingsKey, configK /** * Returns the input plugin object from the cache based on the given key. * - * @function Phaser.Input.InputPluginCache.getCore + * @function Phaser.Input.InputPluginCache.getPlugin * @static * @since 3.10.0 * @@ -34774,7 +35639,7 @@ module.exports = InputPluginCache; /***/ }), -/* 143 */ +/* 144 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34789,19 +35654,19 @@ module.exports = InputPluginCache; module.exports = { - ANY_KEY_DOWN: __webpack_require__(1229), - ANY_KEY_UP: __webpack_require__(1230), - COMBO_MATCH: __webpack_require__(1231), - DOWN: __webpack_require__(1232), - KEY_DOWN: __webpack_require__(1233), - KEY_UP: __webpack_require__(1234), - UP: __webpack_require__(1235) + ANY_KEY_DOWN: __webpack_require__(1235), + ANY_KEY_UP: __webpack_require__(1236), + COMBO_MATCH: __webpack_require__(1237), + DOWN: __webpack_require__(1238), + KEY_DOWN: __webpack_require__(1239), + KEY_UP: __webpack_require__(1240), + UP: __webpack_require__(1241) }; /***/ }), -/* 144 */ +/* 145 */ /***/ (function(module, exports) { /** @@ -34842,7 +35707,7 @@ module.exports = GetURL; /***/ }), -/* 145 */ +/* 146 */ /***/ (function(module, exports) { /** @@ -34912,7 +35777,7 @@ module.exports = XHRSettings; /***/ }), -/* 146 */ +/* 147 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34922,8 +35787,8 @@ module.exports = XHRSettings; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(223); -var Sprite = __webpack_require__(75); +var Components = __webpack_require__(226); +var Sprite = __webpack_require__(76); /** * @classdesc @@ -35013,7 +35878,7 @@ module.exports = ArcadeSprite; /***/ }), -/* 147 */ +/* 148 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35028,54 +35893,56 @@ module.exports = ArcadeSprite; module.exports = { - CalculateFacesAt: __webpack_require__(226), - CalculateFacesWithin: __webpack_require__(52), - Copy: __webpack_require__(1325), - CreateFromTiles: __webpack_require__(1326), - CullTiles: __webpack_require__(1327), - Fill: __webpack_require__(1328), - FilterTiles: __webpack_require__(1329), - FindByIndex: __webpack_require__(1330), - FindTile: __webpack_require__(1331), - ForEachTile: __webpack_require__(1332), - GetTileAt: __webpack_require__(148), - GetTileAtWorldXY: __webpack_require__(1333), + CalculateFacesAt: __webpack_require__(233), + CalculateFacesWithin: __webpack_require__(53), + Copy: __webpack_require__(1322), + CreateFromTiles: __webpack_require__(1323), + CullTiles: __webpack_require__(1324), + Fill: __webpack_require__(1325), + FilterTiles: __webpack_require__(1326), + FindByIndex: __webpack_require__(1327), + FindTile: __webpack_require__(1328), + ForEachTile: __webpack_require__(1329), + GetTileAt: __webpack_require__(149), + GetTileAtWorldXY: __webpack_require__(1330), GetTilesWithin: __webpack_require__(24), - GetTilesWithinShape: __webpack_require__(1334), - GetTilesWithinWorldXY: __webpack_require__(1335), - HasTileAt: __webpack_require__(479), - HasTileAtWorldXY: __webpack_require__(1336), - IsInLayerBounds: __webpack_require__(102), - PutTileAt: __webpack_require__(227), - PutTileAtWorldXY: __webpack_require__(1337), - PutTilesAt: __webpack_require__(1338), - Randomize: __webpack_require__(1339), - RemoveTileAt: __webpack_require__(480), - RemoveTileAtWorldXY: __webpack_require__(1340), - RenderDebug: __webpack_require__(1341), - ReplaceByIndex: __webpack_require__(478), - SetCollision: __webpack_require__(1342), - SetCollisionBetween: __webpack_require__(1343), - SetCollisionByExclusion: __webpack_require__(1344), - SetCollisionByProperty: __webpack_require__(1345), - SetCollisionFromCollisionGroup: __webpack_require__(1346), - SetTileIndexCallback: __webpack_require__(1347), - SetTileLocationCallback: __webpack_require__(1348), - Shuffle: __webpack_require__(1349), - SwapByIndex: __webpack_require__(1350), - TileToWorldX: __webpack_require__(149), - TileToWorldXY: __webpack_require__(1351), - TileToWorldY: __webpack_require__(150), - WeightedRandomize: __webpack_require__(1352), - WorldToTileX: __webpack_require__(63), - WorldToTileXY: __webpack_require__(1353), - WorldToTileY: __webpack_require__(64) + GetTilesWithinShape: __webpack_require__(1331), + GetTilesWithinWorldXY: __webpack_require__(1332), + HasTileAt: __webpack_require__(503), + HasTileAtWorldXY: __webpack_require__(1333), + IsInLayerBounds: __webpack_require__(103), + PutTileAt: __webpack_require__(234), + PutTileAtWorldXY: __webpack_require__(1334), + PutTilesAt: __webpack_require__(1335), + Randomize: __webpack_require__(1336), + RemoveTileAt: __webpack_require__(504), + RemoveTileAtWorldXY: __webpack_require__(1337), + RenderDebug: __webpack_require__(1338), + ReplaceByIndex: __webpack_require__(502), + SetCollision: __webpack_require__(1339), + SetCollisionBetween: __webpack_require__(1340), + SetCollisionByExclusion: __webpack_require__(1341), + SetCollisionByProperty: __webpack_require__(1342), + SetCollisionFromCollisionGroup: __webpack_require__(1343), + SetLayerCollisionIndex: __webpack_require__(152), + SetTileCollision: __webpack_require__(65), + SetTileIndexCallback: __webpack_require__(1344), + SetTileLocationCallback: __webpack_require__(1345), + Shuffle: __webpack_require__(1346), + SwapByIndex: __webpack_require__(1347), + TileToWorldX: __webpack_require__(150), + TileToWorldXY: __webpack_require__(1348), + TileToWorldY: __webpack_require__(151), + WeightedRandomize: __webpack_require__(1349), + WorldToTileX: __webpack_require__(66), + WorldToTileXY: __webpack_require__(1350), + WorldToTileY: __webpack_require__(67) }; /***/ }), -/* 148 */ +/* 149 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35084,20 +35951,19 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var IsInLayerBounds = __webpack_require__(102); +var IsInLayerBounds = __webpack_require__(103); /** * Gets a tile at the given tile coordinates from the given layer. * * @function Phaser.Tilemaps.Components.GetTileAt - * @private * @since 3.0.0 * * @param {integer} tileX - X position to get the tile from (given in tile units, not pixels). * @param {integer} tileY - Y position to get the tile from (given in tile units, not pixels). * @param {boolean} [nonNull=false] - If true getTile won't return null for empty tiles, but a Tile object with an index of -1. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {Phaser.Tilemaps.Tile} The tile at the given coordinates or null if no tile was found or the coordinates * were invalid. */ @@ -35131,7 +35997,7 @@ module.exports = GetTileAt; /***/ }), -/* 149 */ +/* 150 */ /***/ (function(module, exports) { /** @@ -35145,13 +36011,12 @@ module.exports = GetTileAt; * layer's position, scale and scroll. * * @function Phaser.Tilemaps.Components.TileToWorldX - * @private * @since 3.0.0 * * @param {integer} tileX - The x coordinate, in tiles, not pixels. * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {number} */ var TileToWorldX = function (tileX, camera, layer) @@ -35176,7 +36041,7 @@ module.exports = TileToWorldX; /***/ }), -/* 150 */ +/* 151 */ /***/ (function(module, exports) { /** @@ -35190,13 +36055,12 @@ module.exports = TileToWorldX; * layer's position, scale and scroll. * * @function Phaser.Tilemaps.Components.TileToWorldY - * @private * @since 3.0.0 * * @param {integer} tileY - The x coordinate, in tiles, not pixels. * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {number} */ var TileToWorldY = function (tileY, camera, layer) @@ -35221,7 +36085,106 @@ module.exports = TileToWorldY; /***/ }), -/* 151 */ +/* 152 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Internally used method to keep track of the tile indexes that collide within a layer. This + * updates LayerData.collideIndexes to either contain or not contain the given `tileIndex`. + * + * @function Phaser.Tilemaps.Components.SetLayerCollisionIndex + * @since 3.0.0 + * + * @param {integer} tileIndex - The tile index to set the collision boolean for. + * @param {boolean} [collides=true] - Should the tile index collide or not? + * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. + */ +var SetLayerCollisionIndex = function (tileIndex, collides, layer) +{ + var loc = layer.collideIndexes.indexOf(tileIndex); + + if (collides && loc === -1) + { + layer.collideIndexes.push(tileIndex); + } + else if (!collides && loc !== -1) + { + layer.collideIndexes.splice(loc, 1); + } +}; + +module.exports = SetLayerCollisionIndex; + + +/***/ }), +/* 153 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Seth Berrier + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetFastValue = __webpack_require__(2); + +/** + * Parse a Tiled group layer and create a state object for inheriting. + * + * @function Phaser.Tilemaps.Parsers.Tiled.CreateGroupLayer + * @since 3.21.0 + * + * @param {object} json - The Tiled JSON object. + * @param {object} [currentl] - The current group layer from the Tiled JSON file. + * @param {object} [parentstate] - The state of the parent group (if any). + * + * @return {object} A group state object with proper values for updating children layers. + */ +var CreateGroupLayer = function (json, groupl, parentstate) +{ + if (!groupl) + { + // Return a default group state object + return { + i: 0, // Current layer array iterator + layers: json.layers, // Current array of layers + + // Values inherited from parent group + name: '', + opacity: 1, + visible: true, + x: 0, + y: 0 + }; + } + + // Compute group layer x, y + var layerX = groupl.x + GetFastValue(groupl, 'startx', 0) * json.tilewidth + GetFastValue(groupl, 'offsetx', 0); + var layerY = groupl.y + GetFastValue(groupl, 'starty', 0) * json.tileheight + GetFastValue(groupl, 'offsety', 0); + + // Compute next state inherited from group + return { + i: 0, + layers: groupl.layers, + name: parentstate.name + groupl.name + '/', + opacity: parentstate.opacity * groupl.opacity, + visible: parentstate.visible && groupl.visible, + x: parentstate.x + layerX, + y: parentstate.y + layerY + }; +}; + +module.exports = CreateGroupLayer; + + +/***/ }), +/* 154 */ /***/ (function(module, exports) { /** @@ -35285,7 +36248,7 @@ module.exports = GetNewValue; /***/ }), -/* 152 */ +/* 155 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35294,17 +36257,17 @@ module.exports = GetNewValue; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Defaults = __webpack_require__(236); +var Defaults = __webpack_require__(241); var GetAdvancedValue = __webpack_require__(15); -var GetBoolean = __webpack_require__(89); -var GetEaseFunction = __webpack_require__(69); -var GetNewValue = __webpack_require__(151); -var GetProps = __webpack_require__(501); -var GetTargets = __webpack_require__(234); +var GetBoolean = __webpack_require__(90); +var GetEaseFunction = __webpack_require__(71); +var GetNewValue = __webpack_require__(154); +var GetProps = __webpack_require__(525); +var GetTargets = __webpack_require__(239); var GetValue = __webpack_require__(6); -var GetValueOp = __webpack_require__(235); -var Tween = __webpack_require__(237); -var TweenData = __webpack_require__(239); +var GetValueOp = __webpack_require__(240); +var Tween = __webpack_require__(242); +var TweenData = __webpack_require__(244); /** * Creates a new Tween. @@ -35363,7 +36326,7 @@ var TweenBuilder = function (parent, config, defaults) ops.getEnd, ops.getStart, ops.getActive, - GetEaseFunction(GetValue(value, 'ease', ease), easeParams), + GetEaseFunction(GetValue(value, 'ease', ease), GetValue(value, 'easeParams', easeParams)), GetNewValue(value, 'delay', delay), GetNewValue(value, 'duration', duration), GetBoolean(value, 'yoyo', yoyo), @@ -35418,7 +36381,7 @@ module.exports = TweenBuilder; /***/ }), -/* 153 */ +/* 156 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35436,10 +36399,10 @@ var Composite = {}; module.exports = Composite; -var Events = __webpack_require__(244); -var Common = __webpack_require__(43); -var Bounds = __webpack_require__(101); -var Body = __webpack_require__(62); +var Events = __webpack_require__(250); +var Common = __webpack_require__(44); +var Bounds = __webpack_require__(102); +var Body = __webpack_require__(64); (function() { @@ -36112,7 +37075,7 @@ var Body = __webpack_require__(62); /***/ }), -/* 154 */ +/* 157 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36151,7 +37114,7 @@ module.exports = CircumferencePoint; /***/ }), -/* 155 */ +/* 158 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36195,7 +37158,640 @@ module.exports = Random; /***/ }), -/* 156 */ +/* 159 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Perimeter = __webpack_require__(116); +var Point = __webpack_require__(4); + +/** + * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter. + * + * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is. + * + * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side. + * + * @function Phaser.Geom.Rectangle.GetPoint + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [out,$return] + * + * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle to get the perimeter point from. + * @param {number} position - The normalized distance into the Rectangle's perimeter to return. + * @param {(Phaser.Geom.Point|object)} [out] - An object to update with the `x` and `y` coordinates of the point. + * + * @return {Phaser.Geom.Point} The updated `output` object, or a new Point if no `output` object was given. + */ +var GetPoint = function (rectangle, position, out) +{ + if (out === undefined) { out = new Point(); } + + if (position <= 0 || position >= 1) + { + out.x = rectangle.x; + out.y = rectangle.y; + + return out; + } + + var p = Perimeter(rectangle) * position; + + if (position > 0.5) + { + p -= (rectangle.width + rectangle.height); + + if (p <= rectangle.width) + { + // Face 3 + out.x = rectangle.right - p; + out.y = rectangle.bottom; + } + else + { + // Face 4 + out.x = rectangle.x; + out.y = rectangle.bottom - (p - rectangle.width); + } + } + else if (p <= rectangle.width) + { + // Face 1 + out.x = rectangle.x + p; + out.y = rectangle.y; + } + else + { + // Face 2 + out.x = rectangle.right; + out.y = rectangle.y + (p - rectangle.width); + } + + return out; +}; + +module.exports = GetPoint; + + +/***/ }), +/* 160 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Length = __webpack_require__(58); +var Point = __webpack_require__(4); + +/** + * Get a number of points along a line's length. + * + * Provide a `quantity` to get an exact number of points along the line. + * + * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when + * providing a `stepRate`. + * + * @function Phaser.Geom.Line.GetPoints + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point[]} O - [out,$return] + * + * @param {Phaser.Geom.Line} line - The line. + * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead. + * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`. + * @param {(array|Phaser.Geom.Point[])} [out] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line. + * + * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line. + */ +var GetPoints = function (line, quantity, stepRate, out) +{ + if (out === undefined) { out = []; } + + // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. + if (!quantity && stepRate > 0) + { + quantity = Length(line) / stepRate; + } + + var x1 = line.x1; + var y1 = line.y1; + + var x2 = line.x2; + var y2 = line.y2; + + for (var i = 0; i < quantity; i++) + { + var position = i / quantity; + + var x = x1 + (x2 - x1) * position; + var y = y1 + (y2 - y1) * position; + + out.push(new Point(x, y)); + } + + return out; +}; + +module.exports = GetPoints; + + +/***/ }), +/* 161 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Point = __webpack_require__(4); + +/** + * Returns a random point on a given Line. + * + * @function Phaser.Geom.Line.Random + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [out,$return] + * + * @param {Phaser.Geom.Line} line - The Line to calculate the random Point on. + * @param {(Phaser.Geom.Point|object)} [out] - An instance of a Point to be modified. + * + * @return {(Phaser.Geom.Point|object)} A random Point on the Line. + */ +var Random = function (line, out) +{ + if (out === undefined) { out = new Point(); } + + var t = Math.random(); + + out.x = line.x1 + t * (line.x2 - line.x1); + out.y = line.y1 + t * (line.y2 - line.y1); + + return out; +}; + +module.exports = Random; + + +/***/ }), +/* 162 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Point = __webpack_require__(4); + +/** + * Returns a random point within a Rectangle. + * + * @function Phaser.Geom.Rectangle.Random + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [out,$return] + * + * @param {Phaser.Geom.Rectangle} rect - The Rectangle to return a point from. + * @param {Phaser.Geom.Point} out - The object to update with the point's coordinates. + * + * @return {Phaser.Geom.Point} The modified `out` object, or a new Point if none was provided. + */ +var Random = function (rect, out) +{ + if (out === undefined) { out = new Point(); } + + out.x = rect.x + (Math.random() * rect.width); + out.y = rect.y + (Math.random() * rect.height); + + return out; +}; + +module.exports = Random; + + +/***/ }), +/* 163 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Provides methods used for setting the WebGL rendering pipeline of a Game Object. + * + * @namespace Phaser.GameObjects.Components.Pipeline + * @webglOnly + * @since 3.0.0 + */ + +var Pipeline = { + + /** + * The initial WebGL pipeline of this Game Object. + * + * @name Phaser.GameObjects.Components.Pipeline#defaultPipeline + * @type {Phaser.Renderer.WebGL.WebGLPipeline} + * @default null + * @webglOnly + * @since 3.0.0 + */ + defaultPipeline: null, + + /** + * The current WebGL pipeline of this Game Object. + * + * @name Phaser.GameObjects.Components.Pipeline#pipeline + * @type {Phaser.Renderer.WebGL.WebGLPipeline} + * @default null + * @webglOnly + * @since 3.0.0 + */ + pipeline: null, + + /** + * Sets the initial WebGL Pipeline of this Game Object. + * + * This should only be called during the instantiation of the Game Object. + * + * @method Phaser.GameObjects.Components.Pipeline#initPipeline + * @webglOnly + * @since 3.0.0 + * + * @param {string} [pipelineName=MultiPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Multi Pipeline. + * + * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. + */ + initPipeline: function (pipelineName) + { + if (pipelineName === undefined) { pipelineName = 'MultiPipeline'; } + + var renderer = this.scene.sys.game.renderer; + + if (renderer && renderer.gl && renderer.hasPipeline(pipelineName)) + { + this.defaultPipeline = renderer.getPipeline(pipelineName); + this.pipeline = this.defaultPipeline; + + return true; + } + + return false; + }, + + /** + * Sets the active WebGL Pipeline of this Game Object. + * + * @method Phaser.GameObjects.Components.Pipeline#setPipeline + * @webglOnly + * @since 3.0.0 + * + * @param {string} pipelineName - The name of the pipeline to set on this Game Object. + * + * @return {this} This Game Object instance. + */ + setPipeline: function (pipelineName) + { + var renderer = this.scene.sys.game.renderer; + + if (renderer && renderer.gl && renderer.hasPipeline(pipelineName)) + { + this.pipeline = renderer.getPipeline(pipelineName); + } + + return this; + }, + + /** + * Resets the WebGL Pipeline of this Game Object back to the default it was created with. + * + * @method Phaser.GameObjects.Components.Pipeline#resetPipeline + * @webglOnly + * @since 3.0.0 + * + * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. + */ + resetPipeline: function () + { + this.pipeline = this.defaultPipeline; + + return (this.pipeline !== null); + }, + + /** + * Gets the name of the WebGL Pipeline this Game Object is currently using. + * + * @method Phaser.GameObjects.Components.Pipeline#getPipelineName + * @webglOnly + * @since 3.0.0 + * + * @return {string} The string-based name of the pipeline being used by this Game Object. + */ + getPipelineName: function () + { + return this.pipeline.name; + } + +}; + +module.exports = Pipeline; + + +/***/ }), +/* 164 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Vector2 = __webpack_require__(3); + +/** + * Takes the `x` and `y` coordinates and transforms them into the same space as + * defined by the position, rotation and scale values. + * + * @function Phaser.Math.TransformXY + * @since 3.0.0 + * + * @param {number} x - The x coordinate to be transformed. + * @param {number} y - The y coordinate to be transformed. + * @param {number} positionX - Horizontal position of the transform point. + * @param {number} positionY - Vertical position of the transform point. + * @param {number} rotation - Rotation of the transform point, in radians. + * @param {number} scaleX - Horizontal scale of the transform point. + * @param {number} scaleY - Vertical scale of the transform point. + * @param {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} [output] - The output vector, point or object for the translated coordinates. + * + * @return {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} The translated point. + */ +var TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output) +{ + if (output === undefined) { output = new Vector2(); } + + var radianSin = Math.sin(rotation); + var radianCos = Math.cos(rotation); + + // Rotate and Scale + var a = radianCos * scaleX; + var b = radianSin * scaleX; + var c = -radianSin * scaleY; + var d = radianCos * scaleY; + + // Invert + var id = 1 / ((a * d) + (c * -b)); + + output.x = (d * id * x) + (-c * id * y) + (((positionY * c) - (positionX * d)) * id); + output.y = (a * id * y) + (-b * id * x) + (((-positionY * a) + (positionX * b)) * id); + + return output; +}; + +module.exports = TransformXY; + + +/***/ }), +/* 165 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Point = __webpack_require__(4); + +/** + * Returns a uniformly distributed random point from anywhere within the given Ellipse. + * + * @function Phaser.Geom.Ellipse.Random + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [out,$return] + * + * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to get a random point from. + * @param {(Phaser.Geom.Point|object)} [out] - A Point or point-like object to set the random `x` and `y` values in. + * + * @return {(Phaser.Geom.Point|object)} A Point object with the random values set in the `x` and `y` properties. + */ +var Random = function (ellipse, out) +{ + if (out === undefined) { out = new Point(); } + + var p = Math.random() * Math.PI * 2; + var s = Math.sqrt(Math.random()); + + out.x = ellipse.x + ((s * Math.cos(p)) * ellipse.width / 2); + out.y = ellipse.y + ((s * Math.sin(p)) * ellipse.height / 2); + + return out; +}; + +module.exports = Random; + + +/***/ }), +/* 166 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Point = __webpack_require__(4); + +/** + * Returns a random Point from within the area of the given Triangle. + * + * @function Phaser.Geom.Triangle.Random + * @since 3.0.0 + * + * @generic {Phaser.Geom.Point} O - [out,$return] + * + * @param {Phaser.Geom.Triangle} triangle - The Triangle to get a random point from. + * @param {Phaser.Geom.Point} [out] - The Point object to store the position in. If not given, a new Point instance is created. + * + * @return {Phaser.Geom.Point} A Point object holding the coordinates of a random position within the Triangle. + */ +var Random = function (triangle, out) +{ + if (out === undefined) { out = new Point(); } + + // Basis vectors + var ux = triangle.x2 - triangle.x1; + var uy = triangle.y2 - triangle.y1; + + var vx = triangle.x3 - triangle.x1; + var vy = triangle.y3 - triangle.y1; + + // Random point within the unit square + var r = Math.random(); + var s = Math.random(); + + // Point outside the triangle? Remap it. + if (r + s >= 1) + { + r = 1 - r; + s = 1 - s; + } + + out.x = triangle.x1 + ((ux * r) + (vx * s)); + out.y = triangle.y1 + ((uy * r) + (vy * s)); + + return out; +}; + +module.exports = Random; + + +/***/ }), +/* 167 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Rotate a `point` around `x` and `y` by the given `angle` and `distance`. + * + * In polar notation, this maps a point from (r, t) to (distance, t + angle), vs. the origin (x, y). + * + * @function Phaser.Math.RotateAroundDistance + * @since 3.0.0 + * + * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return] + * + * @param {(Phaser.Geom.Point|object)} point - The point to be rotated. + * @param {number} x - The horizontal coordinate to rotate around. + * @param {number} y - The vertical coordinate to rotate around. + * @param {number} angle - The angle of rotation in radians. + * @param {number} distance - The distance from (x, y) to place the point at. + * + * @return {Phaser.Types.Math.Vector2Like} The given point. + */ +var RotateAroundDistance = function (point, x, y, angle, distance) +{ + var t = angle + Math.atan2(point.y - y, point.x - x); + + point.x = x + (distance * Math.cos(t)); + point.y = y + (distance * Math.sin(t)); + + return point; +}; + +module.exports = RotateAroundDistance; + + +/***/ }), +/* 168 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate a smoother interpolation percentage of `x` between `min` and `max`. + * + * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge, + * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial, + * between 0 and 1 otherwise. + * + * Produces an even smoother interpolation than {@link Phaser.Math.SmoothStep}. + * + * @function Phaser.Math.SmootherStep + * @since 3.0.0 + * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations} + * + * @param {number} x - The input value. + * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'. + * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'. + * + * @return {number} The percentage of interpolation, between 0 and 1. + */ +var SmootherStep = function (x, min, max) +{ + x = Math.max(0, Math.min(1, (x - min) / (max - min))); + + return x * x * x * (x * (x * 6 - 15) + 10); +}; + +module.exports = SmootherStep; + + +/***/ }), +/* 169 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Calculate a smooth interpolation percentage of `x` between `min` and `max`. + * + * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge, + * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial, + * between 0 and 1 otherwise. + * + * @function Phaser.Math.SmoothStep + * @since 3.0.0 + * @see {@link https://en.wikipedia.org/wiki/Smoothstep} + * + * @param {number} x - The input value. + * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'. + * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'. + * + * @return {number} The percentage of interpolation, between 0 and 1. + */ +var SmoothStep = function (x, min, max) +{ + if (x <= min) + { + return 0; + } + + if (x >= max) + { + return 1; + } + + x = (x - min) / (max - min); + + return x * x * (3 - 2 * x); +}; + +module.exports = SmoothStep; + + +/***/ }), +/* 170 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36206,25 +37802,29 @@ module.exports = Random; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(115); -var FindClosestInSorted = __webpack_require__(274); -var Frame = __webpack_require__(275); +var Events = __webpack_require__(120); +var FindClosestInSorted = __webpack_require__(297); +var Frame = __webpack_require__(298); var GetValue = __webpack_require__(6); +var SortByDigits = __webpack_require__(299); /** * @classdesc * A Frame based Animation. * - * This consists of a key, some default values (like the frame rate) and a bunch of Frame objects. + * Animations in Phaser consist of a sequence of `AnimationFrame` objects, which are managed by + * this class, along with properties that impact playback, such as the animations frame rate + * or delay. * - * The Animation Manager creates these. Game Objects don't own an instance of these directly. - * Game Objects have the Animation Component, which are like playheads to global Animations (these objects) - * So multiple Game Objects can have playheads all pointing to this one Animation instance. + * This class contains all of the properties and methods needed to handle playback of the animation + * directly to an `AnimationState` instance, which is owned by a Sprite, or similar Game Object. + * + * You don't typically create an instance of this class directly, but instead go via + * either the `AnimationManager` or the `AnimationState` and use their `create` methods, + * depending on if you need a global animation, or local to a specific Sprite. * * @class Animation * @memberof Phaser.Animations - * @extends Phaser.Events.EventEmitter * @constructor * @since 3.0.0 * @@ -36234,14 +37834,10 @@ var GetValue = __webpack_require__(6); */ var Animation = new Class({ - Extends: EventEmitter, - initialize: function Animation (manager, key, config) { - EventEmitter.call(this); - /** * A reference to the global Animation Manager. * @@ -36280,7 +37876,8 @@ var Animation = new Class({ this.frames = this.getFrames( manager.textureManager, GetValue(config, 'frames', []), - GetValue(config, 'defaultTextureKey', null) + GetValue(config, 'defaultTextureKey', null), + GetValue(config, 'sortFrames', true) ); /** @@ -36304,27 +37901,6 @@ var Animation = new Class({ */ this.duration = GetValue(config, 'duration', null); - if (this.duration === null && this.frameRate === null) - { - // No duration or frameRate given, use default frameRate of 24fps - this.frameRate = 24; - this.duration = (this.frameRate / this.frames.length) * 1000; - } - else if (this.duration && this.frameRate === null) - { - // Duration given but no frameRate, so set the frameRate based on duration - // I.e. 12 frames in the animation, duration = 4000 ms - // So frameRate is 12 / (4000 / 1000) = 3 fps - this.frameRate = this.frames.length / (this.duration / 1000); - } - else - { - // frameRate given, derive duration from it (even if duration also specified) - // I.e. 15 frames in the animation, frameRate = 30 fps - // So duration is 15 / 30 = 0.5 * 1000 (half a second, or 500ms) - this.duration = (this.frames.length / this.frameRate) * 1000; - } - /** * How many ms per frame, not including frame specific modifiers. * @@ -36332,14 +37908,14 @@ var Animation = new Class({ * @type {integer} * @since 3.0.0 */ - this.msPerFrame = 1000 / this.frameRate; + this.msPerFrame; /** * Skip frames if the time lags, or always advanced anyway? * * @name Phaser.Animations.Animation#skipMissedFrames * @type {boolean} - * @default false + * @default true * @since 3.0.0 */ this.skipMissedFrames = GetValue(config, 'skipMissedFrames', true); @@ -36414,8 +37990,65 @@ var Animation = new Class({ */ this.paused = false; - this.manager.on(Events.PAUSE_ALL, this.pause, this); - this.manager.on(Events.RESUME_ALL, this.resume, this); + this.calculateDuration(this, this.getTotalFrames(), this.duration, this.frameRate); + + if (this.manager.on) + { + this.manager.on(Events.PAUSE_ALL, this.pause, this); + this.manager.on(Events.RESUME_ALL, this.resume, this); + } + }, + + /** + * Gets the total number of frames in this animation. + * + * @method Phaser.Animations.Animation#getTotalFrames + * @since 3.50.0 + * + * @return {number} The total number of frames in this animation. + */ + getTotalFrames: function () + { + return this.frames.length; + }, + + /** + * Calculates the duration, frame rate and msPerFrame values. + * + * @method Phaser.Animations.Animation#calculateDuration + * @since 3.50.0 + * + * @param {(Phaser.Animations.Animation|Phaser.GameObjects.Components.Animation)} target - The target to set the values on. + * @param {number} totalFrames - The total number of frames in the animation. + * @param {number} duration - The duration to calculate the frame rate from. + * @param {number} frameRate - The frame ate to calculate the duration from. + */ + calculateDuration: function (target, totalFrames, duration, frameRate) + { + if (duration === null && frameRate === null) + { + // No duration or frameRate given, use default frameRate of 24fps + target.frameRate = 24; + target.duration = (24 / totalFrames) * 1000; + } + else if (duration && frameRate === null) + { + // Duration given but no frameRate, so set the frameRate based on duration + // I.e. 12 frames in the animation, duration = 4000 ms + // So frameRate is 12 / (4000 / 1000) = 3 fps + target.duration = duration; + target.frameRate = totalFrames / (duration / 1000); + } + else + { + // frameRate given, derive duration from it (even if duration also specified) + // I.e. 15 frames in the animation, frameRate = 30 fps + // So duration is 15 / 30 = 0.5 * 1000 (half a second, or 500ms) + target.frameRate = frameRate; + target.duration = (totalFrames / frameRate) * 1000; + } + + target.msPerFrame = 1000 / target.frameRate; }, /** @@ -36487,26 +38120,6 @@ var Animation = new Class({ return (index >= 0 && index < this.frames.length); }, - /** - * Called internally when this Animation completes playback. - * Optionally, hides the parent Game Object, then stops playback. - * - * @method Phaser.Animations.Animation#completeAnimation - * @protected - * @since 3.0.0 - * - * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. - */ - completeAnimation: function (component) - { - if (this.hideOnComplete) - { - component.parent.visible = false; - } - - component.stop(); - }, - /** * Called internally when this Animation first starts to play. * Sets the accumulator and nextTick properties. @@ -36516,20 +38129,13 @@ var Animation = new Class({ * @since 3.0.0 * * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. - * @param {boolean} [includeDelay=true] - If `true` the Animation Components delay value will be added to the `nextTick` total. */ - getFirstTick: function (component, includeDelay) + getFirstTick: function (component) { - if (includeDelay === undefined) { includeDelay = true; } - // When is the first update due? component.accumulator = 0; - component.nextTick = component.msPerFrame + component.currentFrame.duration; - if (includeDelay) - { - component.nextTick += component._delay; - } + component.nextTick = component.msPerFrame + component.currentFrame.duration; }, /** @@ -36560,8 +38166,10 @@ var Animation = new Class({ * * @return {Phaser.Animations.AnimationFrame[]} An array of newly created AnimationFrame instances. */ - getFrames: function (textureManager, frames, defaultTextureKey) + getFrames: function (textureManager, frames, defaultTextureKey, sortFrames) { + if (sortFrames === undefined) { sortFrames = true; } + var out = []; var prev; var animationFrame; @@ -36577,9 +38185,14 @@ var Animation = new Class({ var texture = textureManager.get(textureKey); var frameKeys = texture.getFrameNames(); + if (sortFrames) + { + SortByDigits(frameKeys); + } + frames = []; - frameKeys.forEach(function (idx, value) + frameKeys.forEach(function (value) { frames.push({ key: textureKey, frame: value }); }); @@ -36660,57 +38273,11 @@ var Animation = new Class({ */ getNextTick: function (component) { - // accumulator += delta * _timeScale - // after a large delta surge (perf issue for example) we need to adjust for it here - - // When is the next update due? component.accumulator -= component.nextTick; component.nextTick = component.msPerFrame + component.currentFrame.duration; }, - /** - * Loads the Animation values into the Animation Component. - * - * @method Phaser.Animations.Animation#load - * @private - * @since 3.0.0 - * - * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to load values into. - * @param {integer} startFrame - The start frame of the animation to load. - */ - load: function (component, startFrame) - { - if (startFrame >= this.frames.length) - { - startFrame = 0; - } - - if (component.currentAnim !== this) - { - component.currentAnim = this; - - component.frameRate = this.frameRate; - component.duration = this.duration; - component.msPerFrame = this.msPerFrame; - component.skipMissedFrames = this.skipMissedFrames; - - component._delay = this.delay; - component._repeat = this.repeat; - component._repeatDelay = this.repeatDelay; - component._yoyo = this.yoyo; - } - - var frame = this.frames[startFrame]; - - if (startFrame === 0 && !component.forward) - { - frame = this.getLastFrame(); - } - - component.updateFrame(frame); - }, - /** * Returns the frame closest to the given progress value between 0 and 1. * @@ -36740,14 +38307,12 @@ var Animation = new Class({ { var frame = component.currentFrame; - // TODO: Add frame skip support - if (frame.isLast) { // We're at the end of the animation // Yoyo? (happens before repeat) - if (component._yoyo) + if (component.yoyo) { this.handleYoyoFrame(component, false); } @@ -36755,7 +38320,7 @@ var Animation = new Class({ { // Repeat (happens before complete) - if (component._reverse && component.forward) + if (component.inReverse && component.forward) { component.forward = false; } @@ -36766,7 +38331,7 @@ var Animation = new Class({ } else { - this.completeAnimation(component); + component.complete(); } } else @@ -36789,10 +38354,9 @@ var Animation = new Class({ { if (!isReverse) { isReverse = false; } - if (component._reverse === !isReverse && component.repeatCounter > 0) + if (component.inReverse === !isReverse && component.repeatCounter > 0) { - if (!component._repeatDelay || component.pendingRepeat) - + if (component.repeatDelay === 0 || component.pendingRepeat) { component.forward = isReverse; } @@ -36802,13 +38366,13 @@ var Animation = new Class({ return; } - if (component._reverse !== isReverse && component.repeatCounter === 0) + if (component.inReverse !== isReverse && component.repeatCounter === 0) { - this.completeAnimation(component); + component.complete(); return; } - + component.forward = isReverse; var frame = (isReverse) ? component.currentFrame.nextFrame : component.currentFrame.prevFrame; @@ -36842,33 +38406,30 @@ var Animation = new Class({ { var frame = component.currentFrame; - // TODO: Add frame skip support - if (frame.isFirst) { // We're at the start of the animation - - if (component._yoyo) + if (component.yoyo) { this.handleYoyoFrame(component, true); } else if (component.repeatCounter > 0) { - if (component._reverse && !component.forward) + if (component.inReverse && !component.forward) { - component.currentFrame = this.getLastFrame(); this.repeatAnimation(component); } else { // Repeat (happens before complete) component.forward = true; + this.repeatAnimation(component); } } else { - this.completeAnimation(component); + component.complete(); } } else @@ -36888,7 +38449,7 @@ var Animation = new Class({ */ updateAndGetNextTick: function (component, frame) { - component.updateFrame(frame); + component.setCurrentFrame(frame); this.getNextTick(component); }, @@ -36952,60 +38513,44 @@ var Animation = new Class({ { if (component._pendingStop === 2) { - return this.completeAnimation(component); + if (component._pendingStopValue === 0) + { + return component.stop(); + } + else + { + component._pendingStopValue--; + } } - if (component._repeatDelay > 0 && component.pendingRepeat === false) + if (component.repeatDelay > 0 && !component.pendingRepeat) { component.pendingRepeat = true; component.accumulator -= component.nextTick; - component.nextTick += component._repeatDelay; + component.nextTick += component.repeatDelay; } else { component.repeatCounter--; - component.updateFrame(component.currentFrame[(component.forward) ? 'nextFrame' : 'prevFrame']); + if (component.forward) + { + component.setCurrentFrame(component.currentFrame.nextFrame); + } + else + { + component.setCurrentFrame(component.currentFrame.prevFrame); + } if (component.isPlaying) { this.getNextTick(component); - component.pendingRepeat = false; - - var frame = component.currentFrame; - var parent = component.parent; - - this.emit(Events.ANIMATION_REPEAT, this, frame); - - parent.emit(Events.SPRITE_ANIMATION_KEY_REPEAT + this.key, this, frame, component.repeatCounter, parent); - - parent.emit(Events.SPRITE_ANIMATION_REPEAT, this, frame, component.repeatCounter, parent); + component.handleRepeat(); } } }, - /** - * Sets the texture frame the animation uses for rendering. - * - * @method Phaser.Animations.Animation#setFrame - * @since 3.0.0 - * - * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. - */ - setFrame: function (component) - { - // Work out which frame should be set next on the child, and set it - if (component.forward) - { - this.nextFrame(component); - } - else - { - this.previousFrame(component); - } - }, - /** * Converts the animation data to JSON. * @@ -37136,10 +38681,11 @@ var Animation = new Class({ */ destroy: function () { - this.removeAllListeners(); - - this.manager.off(Events.PAUSE_ALL, this.pause, this); - this.manager.off(Events.RESUME_ALL, this.resume, this); + if (this.manager.off) + { + this.manager.off(Events.PAUSE_ALL, this.pause, this); + this.manager.off(Events.RESUME_ALL, this.resume, this); + } this.manager.remove(this.key); @@ -37159,1013 +38705,7 @@ module.exports = Animation; /***/ }), -/* 157 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Perimeter = __webpack_require__(116); -var Point = __webpack_require__(4); - -/** - * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter. - * - * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is. - * - * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side. - * - * @function Phaser.Geom.Rectangle.GetPoint - * @since 3.0.0 - * - * @generic {Phaser.Geom.Point} O - [out,$return] - * - * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle to get the perimeter point from. - * @param {number} position - The normalized distance into the Rectangle's perimeter to return. - * @param {(Phaser.Geom.Point|object)} [out] - An object to update with the `x` and `y` coordinates of the point. - * - * @return {Phaser.Geom.Point} The updated `output` object, or a new Point if no `output` object was given. - */ -var GetPoint = function (rectangle, position, out) -{ - if (out === undefined) { out = new Point(); } - - if (position <= 0 || position >= 1) - { - out.x = rectangle.x; - out.y = rectangle.y; - - return out; - } - - var p = Perimeter(rectangle) * position; - - if (position > 0.5) - { - p -= (rectangle.width + rectangle.height); - - if (p <= rectangle.width) - { - // Face 3 - out.x = rectangle.right - p; - out.y = rectangle.bottom; - } - else - { - // Face 4 - out.x = rectangle.x; - out.y = rectangle.bottom - (p - rectangle.width); - } - } - else if (p <= rectangle.width) - { - // Face 1 - out.x = rectangle.x + p; - out.y = rectangle.y; - } - else - { - // Face 2 - out.x = rectangle.right; - out.y = rectangle.y + (p - rectangle.width); - } - - return out; -}; - -module.exports = GetPoint; - - -/***/ }), -/* 158 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Length = __webpack_require__(57); -var Point = __webpack_require__(4); - -/** - * Get a number of points along a line's length. - * - * Provide a `quantity` to get an exact number of points along the line. - * - * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when - * providing a `stepRate`. - * - * @function Phaser.Geom.Line.GetPoints - * @since 3.0.0 - * - * @generic {Phaser.Geom.Point[]} O - [out,$return] - * - * @param {Phaser.Geom.Line} line - The line. - * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead. - * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`. - * @param {(array|Phaser.Geom.Point[])} [out] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line. - * - * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line. - */ -var GetPoints = function (line, quantity, stepRate, out) -{ - if (out === undefined) { out = []; } - - // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. - if (!quantity && stepRate > 0) - { - quantity = Length(line) / stepRate; - } - - var x1 = line.x1; - var y1 = line.y1; - - var x2 = line.x2; - var y2 = line.y2; - - for (var i = 0; i < quantity; i++) - { - var position = i / quantity; - - var x = x1 + (x2 - x1) * position; - var y = y1 + (y2 - y1) * position; - - out.push(new Point(x, y)); - } - - return out; -}; - -module.exports = GetPoints; - - -/***/ }), -/* 159 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Point = __webpack_require__(4); - -/** - * Returns a random point on a given Line. - * - * @function Phaser.Geom.Line.Random - * @since 3.0.0 - * - * @generic {Phaser.Geom.Point} O - [out,$return] - * - * @param {Phaser.Geom.Line} line - The Line to calculate the random Point on. - * @param {(Phaser.Geom.Point|object)} [out] - An instance of a Point to be modified. - * - * @return {(Phaser.Geom.Point|object)} A random Point on the Line. - */ -var Random = function (line, out) -{ - if (out === undefined) { out = new Point(); } - - var t = Math.random(); - - out.x = line.x1 + t * (line.x2 - line.x1); - out.y = line.y1 + t * (line.y2 - line.y1); - - return out; -}; - -module.exports = Random; - - -/***/ }), -/* 160 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Point = __webpack_require__(4); - -/** - * Returns a random point within a Rectangle. - * - * @function Phaser.Geom.Rectangle.Random - * @since 3.0.0 - * - * @generic {Phaser.Geom.Point} O - [out,$return] - * - * @param {Phaser.Geom.Rectangle} rect - The Rectangle to return a point from. - * @param {Phaser.Geom.Point} out - The object to update with the point's coordinates. - * - * @return {Phaser.Geom.Point} The modified `out` object, or a new Point if none was provided. - */ -var Random = function (rect, out) -{ - if (out === undefined) { out = new Point(); } - - out.x = rect.x + (Math.random() * rect.width); - out.y = rect.y + (Math.random() * rect.height); - - return out; -}; - -module.exports = Random; - - -/***/ }), -/* 161 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Provides methods used for setting the WebGL rendering pipeline of a Game Object. - * - * @namespace Phaser.GameObjects.Components.Pipeline - * @webglOnly - * @since 3.0.0 - */ - -var Pipeline = { - - /** - * The initial WebGL pipeline of this Game Object. - * - * @name Phaser.GameObjects.Components.Pipeline#defaultPipeline - * @type {Phaser.Renderer.WebGL.WebGLPipeline} - * @default null - * @webglOnly - * @since 3.0.0 - */ - defaultPipeline: null, - - /** - * The current WebGL pipeline of this Game Object. - * - * @name Phaser.GameObjects.Components.Pipeline#pipeline - * @type {Phaser.Renderer.WebGL.WebGLPipeline} - * @default null - * @webglOnly - * @since 3.0.0 - */ - pipeline: null, - - /** - * Sets the initial WebGL Pipeline of this Game Object. - * - * This should only be called during the instantiation of the Game Object. - * - * @method Phaser.GameObjects.Components.Pipeline#initPipeline - * @webglOnly - * @since 3.0.0 - * - * @param {string} [pipelineName=MultiPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Multi Pipeline. - * - * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. - */ - initPipeline: function (pipelineName) - { - if (pipelineName === undefined) { pipelineName = 'MultiPipeline'; } - - var renderer = this.scene.sys.game.renderer; - - if (renderer && renderer.gl && renderer.hasPipeline(pipelineName)) - { - this.defaultPipeline = renderer.getPipeline(pipelineName); - this.pipeline = this.defaultPipeline; - - return true; - } - - return false; - }, - - /** - * Sets the active WebGL Pipeline of this Game Object. - * - * @method Phaser.GameObjects.Components.Pipeline#setPipeline - * @webglOnly - * @since 3.0.0 - * - * @param {string} pipelineName - The name of the pipeline to set on this Game Object. - * - * @return {this} This Game Object instance. - */ - setPipeline: function (pipelineName) - { - var renderer = this.scene.sys.game.renderer; - - if (renderer && renderer.gl && renderer.hasPipeline(pipelineName)) - { - this.pipeline = renderer.getPipeline(pipelineName); - } - - return this; - }, - - /** - * Resets the WebGL Pipeline of this Game Object back to the default it was created with. - * - * @method Phaser.GameObjects.Components.Pipeline#resetPipeline - * @webglOnly - * @since 3.0.0 - * - * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`. - */ - resetPipeline: function () - { - this.pipeline = this.defaultPipeline; - - return (this.pipeline !== null); - }, - - /** - * Gets the name of the WebGL Pipeline this Game Object is currently using. - * - * @method Phaser.GameObjects.Components.Pipeline#getPipelineName - * @webglOnly - * @since 3.0.0 - * - * @return {string} The string-based name of the pipeline being used by this Game Object. - */ - getPipelineName: function () - { - return this.pipeline.name; - } - -}; - -module.exports = Pipeline; - - -/***/ }), -/* 162 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Vector2 = __webpack_require__(3); - -/** - * Takes the `x` and `y` coordinates and transforms them into the same space as - * defined by the position, rotation and scale values. - * - * @function Phaser.Math.TransformXY - * @since 3.0.0 - * - * @param {number} x - The x coordinate to be transformed. - * @param {number} y - The y coordinate to be transformed. - * @param {number} positionX - Horizontal position of the transform point. - * @param {number} positionY - Vertical position of the transform point. - * @param {number} rotation - Rotation of the transform point, in radians. - * @param {number} scaleX - Horizontal scale of the transform point. - * @param {number} scaleY - Vertical scale of the transform point. - * @param {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} [output] - The output vector, point or object for the translated coordinates. - * - * @return {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} The translated point. - */ -var TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output) -{ - if (output === undefined) { output = new Vector2(); } - - var radianSin = Math.sin(rotation); - var radianCos = Math.cos(rotation); - - // Rotate and Scale - var a = radianCos * scaleX; - var b = radianSin * scaleX; - var c = -radianSin * scaleY; - var d = radianCos * scaleY; - - // Invert - var id = 1 / ((a * d) + (c * -b)); - - output.x = (d * id * x) + (-c * id * y) + (((positionY * c) - (positionX * d)) * id); - output.y = (a * id * y) + (-b * id * x) + (((-positionY * a) + (positionX * b)) * id); - - return output; -}; - -module.exports = TransformXY; - - -/***/ }), -/* 163 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Point = __webpack_require__(4); - -/** - * Returns a uniformly distributed random point from anywhere within the given Ellipse. - * - * @function Phaser.Geom.Ellipse.Random - * @since 3.0.0 - * - * @generic {Phaser.Geom.Point} O - [out,$return] - * - * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to get a random point from. - * @param {(Phaser.Geom.Point|object)} [out] - A Point or point-like object to set the random `x` and `y` values in. - * - * @return {(Phaser.Geom.Point|object)} A Point object with the random values set in the `x` and `y` properties. - */ -var Random = function (ellipse, out) -{ - if (out === undefined) { out = new Point(); } - - var p = Math.random() * Math.PI * 2; - var s = Math.sqrt(Math.random()); - - out.x = ellipse.x + ((s * Math.cos(p)) * ellipse.width / 2); - out.y = ellipse.y + ((s * Math.sin(p)) * ellipse.height / 2); - - return out; -}; - -module.exports = Random; - - -/***/ }), -/* 164 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Point = __webpack_require__(4); - -/** - * Returns a random Point from within the area of the given Triangle. - * - * @function Phaser.Geom.Triangle.Random - * @since 3.0.0 - * - * @generic {Phaser.Geom.Point} O - [out,$return] - * - * @param {Phaser.Geom.Triangle} triangle - The Triangle to get a random point from. - * @param {Phaser.Geom.Point} [out] - The Point object to store the position in. If not given, a new Point instance is created. - * - * @return {Phaser.Geom.Point} A Point object holding the coordinates of a random position within the Triangle. - */ -var Random = function (triangle, out) -{ - if (out === undefined) { out = new Point(); } - - // Basis vectors - var ux = triangle.x2 - triangle.x1; - var uy = triangle.y2 - triangle.y1; - - var vx = triangle.x3 - triangle.x1; - var vy = triangle.y3 - triangle.y1; - - // Random point within the unit square - var r = Math.random(); - var s = Math.random(); - - // Point outside the triangle? Remap it. - if (r + s >= 1) - { - r = 1 - r; - s = 1 - s; - } - - out.x = triangle.x1 + ((ux * r) + (vx * s)); - out.y = triangle.y1 + ((uy * r) + (vy * s)); - - return out; -}; - -module.exports = Random; - - -/***/ }), -/* 165 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Rotate a `point` around `x` and `y` by the given `angle` and `distance`. - * - * In polar notation, this maps a point from (r, t) to (distance, t + angle), vs. the origin (x, y). - * - * @function Phaser.Math.RotateAroundDistance - * @since 3.0.0 - * - * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return] - * - * @param {(Phaser.Geom.Point|object)} point - The point to be rotated. - * @param {number} x - The horizontal coordinate to rotate around. - * @param {number} y - The vertical coordinate to rotate around. - * @param {number} angle - The angle of rotation in radians. - * @param {number} distance - The distance from (x, y) to place the point at. - * - * @return {Phaser.Types.Math.Vector2Like} The given point. - */ -var RotateAroundDistance = function (point, x, y, angle, distance) -{ - var t = angle + Math.atan2(point.y - y, point.x - x); - - point.x = x + (distance * Math.cos(t)); - point.y = y + (distance * Math.sin(t)); - - return point; -}; - -module.exports = RotateAroundDistance; - - -/***/ }), -/* 166 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Calculate a smoother interpolation percentage of `x` between `min` and `max`. - * - * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge, - * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial, - * between 0 and 1 otherwise. - * - * Produces an even smoother interpolation than {@link Phaser.Math.SmoothStep}. - * - * @function Phaser.Math.SmootherStep - * @since 3.0.0 - * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations} - * - * @param {number} x - The input value. - * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'. - * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'. - * - * @return {number} The percentage of interpolation, between 0 and 1. - */ -var SmootherStep = function (x, min, max) -{ - x = Math.max(0, Math.min(1, (x - min) / (max - min))); - - return x * x * x * (x * (x * 6 - 15) + 10); -}; - -module.exports = SmootherStep; - - -/***/ }), -/* 167 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Calculate a smooth interpolation percentage of `x` between `min` and `max`. - * - * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge, - * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial, - * between 0 and 1 otherwise. - * - * @function Phaser.Math.SmoothStep - * @since 3.0.0 - * @see {@link https://en.wikipedia.org/wiki/Smoothstep} - * - * @param {number} x - The input value. - * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'. - * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'. - * - * @return {number} The percentage of interpolation, between 0 and 1. - */ -var SmoothStep = function (x, min, max) -{ - if (x <= min) - { - return 0; - } - - if (x >= max) - { - return 1; - } - - x = (x - min) / (max - min); - - return x * x * (3 - 2 * x); -}; - -module.exports = SmoothStep; - - -/***/ }), -/* 168 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); - -/** - * @callback EachMapCallback - * - * @param {string} key - The key of the Map entry. - * @param {E} entry - The value of the Map entry. - * - * @return {?boolean} The callback result. - */ - -/** - * @classdesc - * The keys of a Map can be arbitrary values. - * - * ```javascript - * var map = new Map([ - * [ 1, 'one' ], - * [ 2, 'two' ], - * [ 3, 'three' ] - * ]); - * ``` - * - * @class Map - * @memberof Phaser.Structs - * @constructor - * @since 3.0.0 - * - * @generic K - * @generic V - * @genericUse {V[]} - [elements] - * - * @param {Array.<*>} elements - An optional array of key-value pairs to populate this Map with. - */ -var Map = new Class({ - - initialize: - - function Map (elements) - { - /** - * The entries in this Map. - * - * @genericUse {Object.} - [$type] - * - * @name Phaser.Structs.Map#entries - * @type {Object.} - * @default {} - * @since 3.0.0 - */ - this.entries = {}; - - /** - * The number of key / value pairs in this Map. - * - * @name Phaser.Structs.Map#size - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.size = 0; - - if (Array.isArray(elements)) - { - for (var i = 0; i < elements.length; i++) - { - this.set(elements[i][0], elements[i][1]); - } - } - }, - - /** - * Adds an element with a specified `key` and `value` to this Map. - * If the `key` already exists, the value will be replaced. - * - * @method Phaser.Structs.Map#set - * @since 3.0.0 - * - * @genericUse {K} - [key] - * @genericUse {V} - [value] - * @genericUse {Phaser.Structs.Map.} - [$return] - * - * @param {string} key - The key of the element to be added to this Map. - * @param {*} value - The value of the element to be added to this Map. - * - * @return {Phaser.Structs.Map} This Map object. - */ - set: function (key, value) - { - if (!this.has(key)) - { - this.size++; - } - - this.entries[key] = value; - - return this; - }, - - /** - * Returns the value associated to the `key`, or `undefined` if there is none. - * - * @method Phaser.Structs.Map#get - * @since 3.0.0 - * - * @genericUse {K} - [key] - * @genericUse {V} - [$return] - * - * @param {string} key - The key of the element to return from the `Map` object. - * - * @return {*} The element associated with the specified key or `undefined` if the key can't be found in this Map object. - */ - get: function (key) - { - if (this.has(key)) - { - return this.entries[key]; - } - }, - - /** - * Returns an `Array` of all the values stored in this Map. - * - * @method Phaser.Structs.Map#getArray - * @since 3.0.0 - * - * @genericUse {V[]} - [$return] - * - * @return {Array.<*>} An array of the values stored in this Map. - */ - getArray: function () - { - var output = []; - var entries = this.entries; - - for (var key in entries) - { - output.push(entries[key]); - } - - return output; - }, - - /** - * Returns a boolean indicating whether an element with the specified key exists or not. - * - * @method Phaser.Structs.Map#has - * @since 3.0.0 - * - * @genericUse {K} - [key] - * - * @param {string} key - The key of the element to test for presence of in this Map. - * - * @return {boolean} Returns `true` if an element with the specified key exists in this Map, otherwise `false`. - */ - has: function (key) - { - return (this.entries.hasOwnProperty(key)); - }, - - /** - * Delete the specified element from this Map. - * - * @method Phaser.Structs.Map#delete - * @since 3.0.0 - * - * @genericUse {K} - [key] - * @genericUse {Phaser.Structs.Map.} - [$return] - * - * @param {string} key - The key of the element to delete from this Map. - * - * @return {Phaser.Structs.Map} This Map object. - */ - delete: function (key) - { - if (this.has(key)) - { - delete this.entries[key]; - this.size--; - } - - return this; - }, - - /** - * Delete all entries from this Map. - * - * @method Phaser.Structs.Map#clear - * @since 3.0.0 - * - * @genericUse {Phaser.Structs.Map.} - [$return] - * - * @return {Phaser.Structs.Map} This Map object. - */ - clear: function () - { - Object.keys(this.entries).forEach(function (prop) - { - delete this.entries[prop]; - - }, this); - - this.size = 0; - - return this; - }, - - /** - * Returns all entries keys in this Map. - * - * @method Phaser.Structs.Map#keys - * @since 3.0.0 - * - * @genericUse {K[]} - [$return] - * - * @return {string[]} Array containing entries' keys. - */ - keys: function () - { - return Object.keys(this.entries); - }, - - /** - * Returns an `Array` of all entries. - * - * @method Phaser.Structs.Map#values - * @since 3.0.0 - * - * @genericUse {V[]} - [$return] - * - * @return {Array.<*>} An `Array` of entries. - */ - values: function () - { - var output = []; - var entries = this.entries; - - for (var key in entries) - { - output.push(entries[key]); - } - - return output; - }, - - /** - * Dumps the contents of this Map to the console via `console.group`. - * - * @method Phaser.Structs.Map#dump - * @since 3.0.0 - */ - dump: function () - { - var entries = this.entries; - - // eslint-disable-next-line no-console - console.group('Map'); - - for (var key in entries) - { - console.log(key, entries[key]); - } - - // eslint-disable-next-line no-console - console.groupEnd(); - }, - - /** - * Passes all entries in this Map to the given callback. - * - * @method Phaser.Structs.Map#each - * @since 3.0.0 - * - * @genericUse {EachMapCallback.} - [callback] - * @genericUse {Phaser.Structs.Map.} - [$return] - * - * @param {EachMapCallback} callback - The callback which will receive the keys and entries held in this Map. - * - * @return {Phaser.Structs.Map} This Map object. - */ - each: function (callback) - { - var entries = this.entries; - - for (var key in entries) - { - if (callback(key, entries[key]) === false) - { - break; - } - } - - return this; - }, - - /** - * Returns `true` if the value exists within this Map. Otherwise, returns `false`. - * - * @method Phaser.Structs.Map#contains - * @since 3.0.0 - * - * @genericUse {V} - [value] - * - * @param {*} value - The value to search for. - * - * @return {boolean} `true` if the value is found, otherwise `false`. - */ - contains: function (value) - { - var entries = this.entries; - - for (var key in entries) - { - if (entries[key] === value) - { - return true; - } - } - - return false; - }, - - /** - * Merges all new keys from the given Map into this one. - * If it encounters a key that already exists it will be skipped unless override is set to `true`. - * - * @method Phaser.Structs.Map#merge - * @since 3.0.0 - * - * @genericUse {Phaser.Structs.Map.} - [map,$return] - * - * @param {Phaser.Structs.Map} map - The Map to merge in to this Map. - * @param {boolean} [override=false] - Set to `true` to replace values in this Map with those from the source map, or `false` to skip them. - * - * @return {Phaser.Structs.Map} This Map object. - */ - merge: function (map, override) - { - if (override === undefined) { override = false; } - - var local = this.entries; - var source = map.entries; - - for (var key in source) - { - if (local.hasOwnProperty(key) && override) - { - local[key] = source[key]; - } - else - { - this.set(key, source[key]); - } - } - - return this; - } - -}); - -module.exports = Map; - - -/***/ }), -/* 169 */ +/* 171 */ /***/ (function(module, exports) { /** @@ -38241,7 +38781,7 @@ module.exports = Pad; /***/ }), -/* 170 */ +/* 172 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38250,10 +38790,10 @@ module.exports = Pad; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HexStringToColor = __webpack_require__(298); -var IntegerToColor = __webpack_require__(301); -var ObjectToColor = __webpack_require__(303); -var RGBStringToColor = __webpack_require__(304); +var HexStringToColor = __webpack_require__(306); +var IntegerToColor = __webpack_require__(309); +var ObjectToColor = __webpack_require__(311); +var RGBStringToColor = __webpack_require__(312); /** * Converts the given source color value into an instance of a Color class. @@ -38297,7 +38837,7 @@ module.exports = ValueToColor; /***/ }), -/* 171 */ +/* 173 */ /***/ (function(module, exports) { /** @@ -38327,7 +38867,7 @@ module.exports = GetColor; /***/ }), -/* 172 */ +/* 174 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38336,13 +38876,35 @@ module.exports = GetColor; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetColor = __webpack_require__(171); +var GetColor = __webpack_require__(173); /** - * Converts an HSV (hue, saturation and value) color value to RGB. - * Conversion formula from http://en.wikipedia.org/wiki/HSL_color_space. + * RGB space conversion. + * + * @ignore + * + * @param {number} n - The value to convert. + * @param {number} h - The h value. + * @param {number} s - The s value. + * @param {number} v - The v value. + * + * @return {number} The converted value. + */ +function ConvertValue (n, h, s, v) +{ + var k = (n + h * 6) % 6; + + var min = Math.min(k, 4 - k, 1); + + return Math.round(255 * (v - v * s * Math.max(0, min))); +} + +/** + * Converts a HSV (hue, saturation and value) color set to RGB. + * + * Conversion formula from https://en.wikipedia.org/wiki/HSL_and_HSV + * * Assumes HSV values are contained in the set [0, 1]. - * Based on code by Michael Jackson (https://github.com/mjijackson) * * @function Phaser.Display.Color.HSVToRGB * @since 3.0.0 @@ -38359,51 +38921,9 @@ var HSVToRGB = function (h, s, v, out) if (s === undefined) { s = 1; } if (v === undefined) { v = 1; } - var i = Math.floor(h * 6); - var f = h * 6 - i; - - var p = Math.floor((v * (1 - s)) * 255); - var q = Math.floor((v * (1 - f * s)) * 255); - var t = Math.floor((v * (1 - (1 - f) * s)) * 255); - - v = Math.floor(v *= 255); - - var r = v; - var g = v; - var b = v; - - var c = i % 6; - - if (c === 0) - { - g = t; - b = p; - } - else if (c === 1) - { - r = q; - b = p; - } - else if (c === 2) - { - r = p; - b = t; - } - else if (c === 3) - { - r = p; - g = q; - } - else if (c === 4) - { - r = t; - g = p; - } - else if (c === 5) - { - g = p; - b = q; - } + var r = ConvertValue(5, h, s, v); + var g = ConvertValue(3, h, s, v); + var b = ConvertValue(1, h, s, v); if (!out) { @@ -38428,7 +38948,7 @@ module.exports = HSVToRGB; /***/ }), -/* 173 */ +/* 175 */ /***/ (function(module, exports) { /** @@ -38560,7 +39080,7 @@ module.exports = Smoothing(); /***/ }), -/* 174 */ +/* 176 */ /***/ (function(module, exports) { /** @@ -38597,7 +39117,7 @@ module.exports = CenterOn; /***/ }), -/* 175 */ +/* 177 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38606,8 +39126,8 @@ module.exports = CenterOn; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var OS = __webpack_require__(122); -var Browser = __webpack_require__(123); +var OS = __webpack_require__(124); +var Browser = __webpack_require__(125); var CanvasPool = __webpack_require__(26); /** @@ -38789,7 +39309,7 @@ module.exports = init(); /***/ }), -/* 176 */ +/* 178 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38808,63 +39328,63 @@ var Extend = __webpack_require__(19); var PhaserMath = { // Collections of functions - Angle: __webpack_require__(738), - Distance: __webpack_require__(747), - Easing: __webpack_require__(752), - Fuzzy: __webpack_require__(753), - Interpolation: __webpack_require__(756), - Pow2: __webpack_require__(761), - Snap: __webpack_require__(763), + Angle: __webpack_require__(756), + Distance: __webpack_require__(765), + Easing: __webpack_require__(770), + Fuzzy: __webpack_require__(771), + Interpolation: __webpack_require__(774), + Pow2: __webpack_require__(779), + Snap: __webpack_require__(781), // Expose the RNG Class - RandomDataGenerator: __webpack_require__(765), + RandomDataGenerator: __webpack_require__(783), // Single functions - Average: __webpack_require__(766), - Bernstein: __webpack_require__(328), - Between: __webpack_require__(178), - CatmullRom: __webpack_require__(177), - CeilTo: __webpack_require__(767), + Average: __webpack_require__(784), + Bernstein: __webpack_require__(336), + Between: __webpack_require__(180), + CatmullRom: __webpack_require__(179), + CeilTo: __webpack_require__(785), Clamp: __webpack_require__(17), - DegToRad: __webpack_require__(40), - Difference: __webpack_require__(768), - Factorial: __webpack_require__(329), - FloatBetween: __webpack_require__(124), - FloorTo: __webpack_require__(769), - FromPercent: __webpack_require__(88), - GetSpeed: __webpack_require__(770), - IsEven: __webpack_require__(771), - IsEvenStrict: __webpack_require__(772), - Linear: __webpack_require__(121), - MaxAdd: __webpack_require__(773), - MinSub: __webpack_require__(774), - Percent: __webpack_require__(775), - RadToDeg: __webpack_require__(179), - RandomXY: __webpack_require__(776), - RandomXYZ: __webpack_require__(777), - RandomXYZW: __webpack_require__(778), - Rotate: __webpack_require__(335), - RotateAround: __webpack_require__(280), - RotateAroundDistance: __webpack_require__(165), - RotateTo: __webpack_require__(779), - RoundAwayFromZero: __webpack_require__(336), - RoundTo: __webpack_require__(780), - SinCosTableGenerator: __webpack_require__(781), - SmootherStep: __webpack_require__(166), - SmoothStep: __webpack_require__(167), - ToXY: __webpack_require__(782), - TransformXY: __webpack_require__(162), - Within: __webpack_require__(783), - Wrap: __webpack_require__(58), + DegToRad: __webpack_require__(41), + Difference: __webpack_require__(786), + Factorial: __webpack_require__(337), + FloatBetween: __webpack_require__(126), + FloorTo: __webpack_require__(787), + FromPercent: __webpack_require__(89), + GetSpeed: __webpack_require__(788), + IsEven: __webpack_require__(789), + IsEvenStrict: __webpack_require__(790), + Linear: __webpack_require__(123), + MaxAdd: __webpack_require__(791), + MinSub: __webpack_require__(792), + Percent: __webpack_require__(793), + RadToDeg: __webpack_require__(181), + RandomXY: __webpack_require__(794), + RandomXYZ: __webpack_require__(795), + RandomXYZW: __webpack_require__(796), + Rotate: __webpack_require__(343), + RotateAround: __webpack_require__(284), + RotateAroundDistance: __webpack_require__(167), + RotateTo: __webpack_require__(797), + RoundAwayFromZero: __webpack_require__(344), + RoundTo: __webpack_require__(798), + SinCosTableGenerator: __webpack_require__(799), + SmootherStep: __webpack_require__(168), + SmoothStep: __webpack_require__(169), + ToXY: __webpack_require__(800), + TransformXY: __webpack_require__(164), + Within: __webpack_require__(801), + Wrap: __webpack_require__(59), // Vector classes Vector2: __webpack_require__(3), - Vector3: __webpack_require__(80), - Vector4: __webpack_require__(126), - Matrix3: __webpack_require__(337), - Matrix4: __webpack_require__(338), - Quaternion: __webpack_require__(339), - RotateVec3: __webpack_require__(784) + Vector3: __webpack_require__(81), + Vector4: __webpack_require__(128), + Matrix3: __webpack_require__(345), + Matrix4: __webpack_require__(346), + Quaternion: __webpack_require__(347), + RotateVec3: __webpack_require__(802) }; @@ -38878,7 +39398,7 @@ module.exports = PhaserMath; /***/ }), -/* 177 */ +/* 179 */ /***/ (function(module, exports) { /** @@ -38915,7 +39435,7 @@ module.exports = CatmullRom; /***/ }), -/* 178 */ +/* 180 */ /***/ (function(module, exports) { /** @@ -38944,7 +39464,7 @@ module.exports = Between; /***/ }), -/* 179 */ +/* 181 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38974,7 +39494,7 @@ module.exports = RadToDeg; /***/ }), -/* 180 */ +/* 182 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38985,7 +39505,7 @@ module.exports = RadToDeg; /** * @typedef {object} Phaser.Plugins.DefaultPlugins - * + * * @property {array} Global - These are the Global Managers that are created by the Phaser.Game instance. * @property {array} CoreScene - These are the core plugins that are installed into every Scene.Systems instance, no matter what. * @property {array} DefaultScene - These plugins are created in Scene.Systems in addition to the CoreScenePlugins. @@ -38996,8 +39516,8 @@ var DefaultPlugins = { /** * These are the Global Managers that are created by the Phaser.Game instance. * They are referenced from Scene.Systems so that plugins can use them. - * - * @name Phaser.Plugins.Global + * + * @name Phaser.Plugins.DefaultPlugins.Global * @type {array} * @since 3.0.0 */ @@ -39017,10 +39537,10 @@ var DefaultPlugins = { /** * These are the core plugins that are installed into every Scene.Systems instance, no matter what. * They are optionally exposed in the Scene as well (see the InjectionMap for details) - * + * * They are created in the order in which they appear in this array and EventEmitter is always first. - * - * @name Phaser.Plugins.CoreScene + * + * @name Phaser.Plugins.DefaultPlugins.CoreScene * @type {array} * @since 3.0.0 */ @@ -39039,16 +39559,16 @@ var DefaultPlugins = { /** * These plugins are created in Scene.Systems in addition to the CoreScenePlugins. - * + * * You can elect not to have these plugins by either creating a DefaultPlugins object as part * of the Game Config, by creating a Plugins object as part of a Scene Config, or by modifying this array * and building your own bundle. - * + * * They are optionally exposed in the Scene as well (see the InjectionMap for details) - * + * * They are always created in the order in which they appear in the array. - * - * @name Phaser.Plugins.DefaultScene + * + * @name Phaser.Plugins.DefaultPlugins.DefaultScene * @type {array} * @since 3.0.0 */ @@ -39075,7 +39595,7 @@ module.exports = DefaultPlugins; /***/ }), -/* 181 */ +/* 183 */ /***/ (function(module, exports) { /** @@ -39133,7 +39653,7 @@ module.exports = ProjectOrtho; /***/ }), -/* 182 */ +/* 184 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -39219,7 +39739,7 @@ module.exports = FromPoints; /***/ }), -/* 183 */ +/* 185 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -39230,10 +39750,10 @@ module.exports = FromPoints; var CONST = { - CENTER: __webpack_require__(359), - ORIENTATION: __webpack_require__(360), - SCALE_MODE: __webpack_require__(361), - ZOOM: __webpack_require__(362) + CENTER: __webpack_require__(369), + ORIENTATION: __webpack_require__(370), + SCALE_MODE: __webpack_require__(371), + ZOOM: __webpack_require__(372) }; @@ -39241,7 +39761,7 @@ module.exports = CONST; /***/ }), -/* 184 */ +/* 186 */ /***/ (function(module, exports) { /** @@ -39270,7 +39790,7 @@ module.exports = RemoveFromDOM; /***/ }), -/* 185 */ +/* 187 */ /***/ (function(module, exports) { /** @@ -39368,7 +39888,7 @@ module.exports = INPUT_CONST; /***/ }), -/* 186 */ +/* 188 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -39378,13 +39898,13 @@ module.exports = INPUT_CONST; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(131); -var DefaultPlugins = __webpack_require__(180); -var Events = __webpack_require__(22); -var GetPhysicsPlugins = __webpack_require__(888); -var GetScenePlugins = __webpack_require__(889); +var CONST = __webpack_require__(132); +var DefaultPlugins = __webpack_require__(182); +var Events = __webpack_require__(20); +var GetPhysicsPlugins = __webpack_require__(385); +var GetScenePlugins = __webpack_require__(386); var NOOP = __webpack_require__(1); -var Settings = __webpack_require__(375); +var Settings = __webpack_require__(387); /** * @classdesc @@ -40142,7 +40662,7 @@ module.exports = Systems; /***/ }), -/* 187 */ +/* 189 */ /***/ (function(module, exports) { /** @@ -40179,7 +40699,7 @@ module.exports = UppercaseFirst; /***/ }), -/* 188 */ +/* 190 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -40189,8 +40709,8 @@ module.exports = UppercaseFirst; */ var Class = __webpack_require__(0); -var Frame = __webpack_require__(95); -var TextureSource = __webpack_require__(378); +var Frame = __webpack_require__(96); +var TextureSource = __webpack_require__(390); var TEXTURE_MISSING_ERROR = 'Texture.frame missing: '; @@ -40699,7 +41219,69 @@ module.exports = Texture; /***/ }), -/* 189 */ +/* 191 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SafeRange = __webpack_require__(70); + +/** + * Returns all elements in the array. + * + * You can optionally specify a matching criteria using the `property` and `value` arguments. + * + * For example: `getAll('visible', true)` would return only elements that have their visible property set. + * + * Optionally you can specify a start and end index. For example if the array had 100 elements, + * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only + * the first 50 elements. + * + * @function Phaser.Utils.Array.GetAll + * @since 3.4.0 + * + * @param {array} array - The array to search. + * @param {string} [property] - The property to test on each array element. + * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check. + * @param {integer} [startIndex] - An optional start index to search from. + * @param {integer} [endIndex] - An optional end index to search to. + * + * @return {array} All matching elements from the array. + */ +var GetAll = function (array, property, value, startIndex, endIndex) +{ + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = array.length; } + + var output = []; + + if (SafeRange(array, startIndex, endIndex)) + { + for (var i = startIndex; i < endIndex; i++) + { + var child = array[i]; + + if (!property || + (property && value === undefined && child.hasOwnProperty(property)) || + (property && value !== undefined && child[property] === value)) + { + output.push(child); + } + } + } + + return output; +}; + +module.exports = GetAll; + + +/***/ }), +/* 192 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -40714,45 +41296,46 @@ module.exports = Texture; module.exports = { - Matrix: __webpack_require__(924), + Matrix: __webpack_require__(938), - Add: __webpack_require__(931), - AddAt: __webpack_require__(932), - BringToTop: __webpack_require__(933), - CountAllMatching: __webpack_require__(934), - Each: __webpack_require__(935), - EachInRange: __webpack_require__(936), - FindClosestInSorted: __webpack_require__(274), - GetAll: __webpack_require__(382), - GetFirst: __webpack_require__(383), - GetRandom: __webpack_require__(191), - MoveDown: __webpack_require__(937), - MoveTo: __webpack_require__(938), - MoveUp: __webpack_require__(939), - NumberArray: __webpack_require__(940), - NumberArrayStep: __webpack_require__(941), - QuickSelect: __webpack_require__(391), - Range: __webpack_require__(392), - Remove: __webpack_require__(129), - RemoveAt: __webpack_require__(942), - RemoveBetween: __webpack_require__(943), - RemoveRandomElement: __webpack_require__(944), - Replace: __webpack_require__(945), - RotateLeft: __webpack_require__(290), - RotateRight: __webpack_require__(291), - SafeRange: __webpack_require__(68), - SendToBack: __webpack_require__(946), - SetAll: __webpack_require__(947), + Add: __webpack_require__(945), + AddAt: __webpack_require__(946), + BringToTop: __webpack_require__(947), + CountAllMatching: __webpack_require__(948), + Each: __webpack_require__(949), + EachInRange: __webpack_require__(950), + FindClosestInSorted: __webpack_require__(297), + GetAll: __webpack_require__(191), + GetFirst: __webpack_require__(394), + GetRandom: __webpack_require__(194), + MoveDown: __webpack_require__(951), + MoveTo: __webpack_require__(952), + MoveUp: __webpack_require__(953), + NumberArray: __webpack_require__(301), + NumberArrayStep: __webpack_require__(954), + QuickSelect: __webpack_require__(402), + Range: __webpack_require__(403), + Remove: __webpack_require__(95), + RemoveAt: __webpack_require__(955), + RemoveBetween: __webpack_require__(956), + RemoveRandomElement: __webpack_require__(957), + Replace: __webpack_require__(958), + RotateLeft: __webpack_require__(294), + RotateRight: __webpack_require__(295), + SafeRange: __webpack_require__(70), + SendToBack: __webpack_require__(959), + SetAll: __webpack_require__(960), Shuffle: __webpack_require__(119), - SpliceOne: __webpack_require__(81), - StableSort: __webpack_require__(137), - Swap: __webpack_require__(948) + SortByDigits: __webpack_require__(299), + SpliceOne: __webpack_require__(82), + StableSort: __webpack_require__(138), + Swap: __webpack_require__(961) }; /***/ }), -/* 190 */ +/* 193 */ /***/ (function(module, exports) { /** @@ -40813,7 +41396,7 @@ module.exports = CheckMatrix; /***/ }), -/* 191 */ +/* 194 */ /***/ (function(module, exports) { /** @@ -40848,7 +41431,7 @@ module.exports = GetRandom; /***/ }), -/* 192 */ +/* 195 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -40858,8 +41441,8 @@ module.exports = GetRandom; */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(950); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(404); /** * @classdesc @@ -40941,6 +41524,15 @@ var ProcessQueue = new Class({ * @since 3.0.0 */ this._toProcess = 0; + + /** + * If `true` only unique objects will be allowed in the queue. + * + * @name Phaser.Structs.ProcessQueue#checkQueue + * @type {boolean} + * @since 3.50.0 + */ + this.checkQueue = false; }, /** @@ -41070,9 +41662,12 @@ var ProcessQueue = new Class({ { item = list[i]; - this._active.push(item); + if (!this.checkQueue || (this.checkQueue && active.indexOf(item) === -1)) + { + active.push(item); - this.emit(Events.PROCESS_QUEUE_ADD, item); + this.emit(Events.PROCESS_QUEUE_ADD, item); + } } list.length = 0; @@ -41080,7 +41675,7 @@ var ProcessQueue = new Class({ this._toProcess = 0; // The owner of this queue can now safely do whatever it needs to with the active list - return this._active; + return active; }, /** @@ -41139,7 +41734,7 @@ module.exports = ProcessQueue; /***/ }), -/* 193 */ +/* 196 */ /***/ (function(module, exports) { /** @@ -41300,7 +41895,7 @@ module.exports = ParseXMLBitmapFont; /***/ }), -/* 194 */ +/* 197 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41309,13 +41904,13 @@ module.exports = ParseXMLBitmapFont; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlitterRender = __webpack_require__(959); -var Bob = __webpack_require__(962); +var BlitterRender = __webpack_require__(971); +var Bob = __webpack_require__(406); var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var Frame = __webpack_require__(95); +var Components = __webpack_require__(11); +var Frame = __webpack_require__(96); var GameObject = __webpack_require__(14); -var List = __webpack_require__(135); +var List = __webpack_require__(136); /** * @callback CreateCallback @@ -41599,7 +42194,7 @@ module.exports = Blitter; /***/ }), -/* 195 */ +/* 198 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41609,15 +42204,16 @@ module.exports = Blitter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayUtils = __webpack_require__(189); -var BlendModes = __webpack_require__(53); +var ArrayUtils = __webpack_require__(192); +var BlendModes = __webpack_require__(54); var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var Events = __webpack_require__(91); +var Components = __webpack_require__(11); +var Events = __webpack_require__(29); var GameObject = __webpack_require__(14); +var GameObjectEvents = __webpack_require__(29); var Rectangle = __webpack_require__(9); -var Render = __webpack_require__(963); -var Union = __webpack_require__(394); +var Render = __webpack_require__(974); +var Union = __webpack_require__(407); var Vector2 = __webpack_require__(3); /** @@ -42056,6 +42652,12 @@ var Container = new Class({ gameObject.parentContainer = this; } + + // Is only on the Display List via this Container + if (!this.scene.sys.displayList.exists(gameObject)) + { + gameObject.emit(GameObjectEvents.ADDED_TO_SCENE, gameObject, this.scene); + } }, /** @@ -42075,6 +42677,12 @@ var Container = new Class({ { gameObject.parentContainer = null; } + + // Is only on the Display List via this Container + if (!this.scene.sys.displayList.exists(gameObject)) + { + gameObject.emit(GameObjectEvents.REMOVED_FROM_SCENE, gameObject, this.scene); + } }, /** @@ -42227,7 +42835,7 @@ var Container = new Class({ }; } - ArrayUtils.StableSort.inplace(this.list, handler); + ArrayUtils.StableSort(this.list, handler); return this; }, @@ -42951,7 +43559,7 @@ module.exports = Container; /***/ }), -/* 196 */ +/* 199 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -42960,17 +43568,17 @@ module.exports = Container; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(138); +var BitmapText = __webpack_require__(139); var Class = __webpack_require__(0); -var Render = __webpack_require__(968); +var Render = __webpack_require__(979); /** * @classdesc * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure. - * + * * During rendering for each letter of the text is rendered to the display, proportionally spaced out and aligned to * match the font structure. - * + * * Dynamic Bitmap Text objects are different from Static Bitmap Text in that they invoke a callback for each * letter being rendered during the render pass. This callback allows you to manipulate the properties of * each letter being rendered, such as its position, scale or tint, allowing you to create interesting effects @@ -42985,12 +43593,12 @@ var Render = __webpack_require__(968); * * To create a BitmapText data files you need a 3rd party app such as: * - * BMFont (Windows, free): http://www.angelcode.com/products/bmfont/ - * Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner - * Littera (Web-based, free): http://kvazars.com/littera/ + * BMFont (Windows, free): {@link http://www.angelcode.com/products/bmfont/|http://www.angelcode.com/products/bmfont/} + * Glyph Designer (OS X, commercial): {@link http://www.71squared.com/en/glyphdesigner|http://www.71squared.com/en/glyphdesigner} + * Littera (Web-based, free): {@link http://kvazars.com/littera/|http://kvazars.com/littera/} * * For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of - * converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson + * converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: {@link http://codebeautify.org/xmltojson|http://codebeautify.org/xmltojson} * * @class DynamicBitmapText * @extends Phaser.GameObjects.BitmapText @@ -43075,7 +43683,7 @@ var DynamicBitmapText = new Class({ * The data object that is populated during rendering, then passed to the displayCallback. * You should modify this object then return it back from the callback. It's updated values * will be used to render the specific glyph. - * + * * Please note that if you need a reference to this object locally in your game code then you * should shallow copy it, as it's updated and re-used for every glyph in the text. * @@ -43184,7 +43792,7 @@ module.exports = DynamicBitmapText; /***/ }), -/* 197 */ +/* 200 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -43195,24 +43803,24 @@ module.exports = DynamicBitmapText; var BaseCamera = __webpack_require__(92); var Class = __webpack_require__(0); -var Commands = __webpack_require__(198); -var ComponentsAlpha = __webpack_require__(273); -var ComponentsBlendMode = __webpack_require__(276); -var ComponentsDepth = __webpack_require__(277); -var ComponentsMask = __webpack_require__(281); -var ComponentsPipeline = __webpack_require__(161); -var ComponentsTransform = __webpack_require__(286); -var ComponentsVisible = __webpack_require__(287); -var ComponentsScrollFactor = __webpack_require__(284); +var Commands = __webpack_require__(201); +var ComponentsAlpha = __webpack_require__(279); +var ComponentsBlendMode = __webpack_require__(280); +var ComponentsDepth = __webpack_require__(281); +var ComponentsMask = __webpack_require__(285); +var ComponentsPipeline = __webpack_require__(163); +var ComponentsTransform = __webpack_require__(290); +var ComponentsVisible = __webpack_require__(291); +var ComponentsScrollFactor = __webpack_require__(288); -var TransformMatrix = __webpack_require__(30); +var TransformMatrix = __webpack_require__(31); -var Ellipse = __webpack_require__(96); +var Ellipse = __webpack_require__(97); var GameObject = __webpack_require__(14); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); var MATH_CONST = __webpack_require__(13); -var Render = __webpack_require__(974); +var Render = __webpack_require__(985); /** * @classdesc @@ -44738,7 +45346,7 @@ module.exports = Graphics; /***/ }), -/* 198 */ +/* 201 */ /***/ (function(module, exports) { /** @@ -44775,7 +45383,7 @@ module.exports = { /***/ }), -/* 199 */ +/* 202 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -44817,7 +45425,7 @@ module.exports = CircumferencePoint; /***/ }), -/* 200 */ +/* 203 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -44827,12 +45435,13 @@ module.exports = CircumferencePoint; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); +var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); -var GravityWell = __webpack_require__(402); -var List = __webpack_require__(135); -var ParticleEmitter = __webpack_require__(404); -var Render = __webpack_require__(984); +var GameObjectEvents = __webpack_require__(29); +var GravityWell = __webpack_require__(416); +var List = __webpack_require__(136); +var ParticleEmitter = __webpack_require__(418); +var Render = __webpack_require__(994); /** * @classdesc @@ -44969,6 +45578,21 @@ var ParticleEmitterManager = new Class({ this.createEmitter(emitters[i]); } } + + this.on(GameObjectEvents.ADDED_TO_SCENE, this.addedToScene, this); + this.on(GameObjectEvents.REMOVED_FROM_SCENE, this.removedFromScene, this); + }, + + // Overrides Game Object method + addedToScene: function () + { + this.scene.sys.updateList.add(this); + }, + + // Overrides Game Object method + removedFromScene: function () + { + this.scene.sys.updateList.remove(this); }, /** @@ -45306,7 +45930,7 @@ module.exports = ParticleEmitterManager; /***/ }), -/* 201 */ +/* 204 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45315,19 +45939,19 @@ module.exports = ParticleEmitterManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlendModes = __webpack_require__(53); +var BlendModes = __webpack_require__(54); var Camera = __webpack_require__(92); var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var CONST = __webpack_require__(33); -var Frame = __webpack_require__(95); +var Components = __webpack_require__(11); +var CONST = __webpack_require__(34); +var Frame = __webpack_require__(96); var GameObject = __webpack_require__(14); var NOOP = __webpack_require__(1); -var ProjectOrtho = __webpack_require__(181); -var Render = __webpack_require__(988); +var ProjectOrtho = __webpack_require__(183); +var Render = __webpack_require__(998); var Utils = __webpack_require__(10); -var UUID = __webpack_require__(202); +var UUID = __webpack_require__(205); /** * @classdesc @@ -46578,7 +47202,7 @@ module.exports = RenderTexture; /***/ }), -/* 202 */ +/* 205 */ /***/ (function(module, exports) { /** @@ -46613,7 +47237,7 @@ module.exports = UUID; /***/ }), -/* 203 */ +/* 206 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -46623,9 +47247,10 @@ module.exports = UUID; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); +var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); -var RopeRender = __webpack_require__(994); +var GameObjectEvents = __webpack_require__(29); +var RopeRender = __webpack_require__(1004); var Vector2 = __webpack_require__(3); /** @@ -46638,7 +47263,7 @@ var Vector2 = __webpack_require__(3); * Unlike a Sprite, it isn't restricted to using just a quad and can have as many vertices as you define * when creating it. The vertices can be arranged in a horizontal or vertical strip and have their own * color and alpha values as well. - * + * * A Ropes origin is always 0.5 x 0.5 and cannot be changed. * * @class Rope @@ -46710,15 +47335,15 @@ var Rope = new Class({ /** * An array containing the points data for this Rope. - * + * * Each point should be given as a Vector2Like object (i.e. a Vector2, Geom.Point or object with public x/y properties). - * + * * The point coordinates are given in local space, where 0 x 0 is the start of the Rope strip. - * + * * You can modify the contents of this array directly in real-time to create interesting effects. * If you do so, be sure to call `setDirty` _after_ modifying this array, so that the vertices data is * updated before the next render. Alternatively, you can use the `setPoints` method instead. - * + * * Should you need to change the _size_ of this array, then you should always use the `setPoints` method. * * @name Phaser.GameObjects.Rope#points @@ -46729,7 +47354,7 @@ var Rope = new Class({ /** * An array containing the vertices data for this Rope. - * + * * This data is calculated automatically in the `updateVertices` method, based on the points provided. * * @name Phaser.GameObjects.Rope#vertices @@ -46740,7 +47365,7 @@ var Rope = new Class({ /** * An array containing the uv data for this Rope. - * + * * This data is calculated automatically in the `setPoints` method, based on the points provided. * * @name Phaser.GameObjects.Rope#uv @@ -46751,10 +47376,10 @@ var Rope = new Class({ /** * An array containing the color data for this Rope. - * + * * Colors should be given as numeric RGB values, such as 0xff0000. * You should provide _two_ color values for every point in the Rope, one for the top and one for the bottom of each quad. - * + * * You can modify the contents of this array directly in real-time, however, should you need to change the _size_ * of the array, then you should use the `setColors` method instead. * @@ -46766,10 +47391,10 @@ var Rope = new Class({ /** * An array containing the alpha data for this Rope. - * + * * Alphas should be given as float values, such as 0.5. * You should provide _two_ alpha values for every point in the Rope, one for the top and one for the bottom of each quad. - * + * * You can modify the contents of this array directly in real-time, however, should you need to change the _size_ * of the array, then you should use the `setAlphas` method instead. * @@ -46781,11 +47406,11 @@ var Rope = new Class({ /** * The tint fill mode. - * + * * 0 = An additive tint (the default), where vertices colors are blended with the texture. * 1 = A fill tint, where the vertices colors replace the texture, but respects texture alpha. * 2 = A complete tint, where the vertices colors replace the texture, including alpha, entirely. - * + * * @name Phaser.GameObjects.Rope#tintFill * @type {integer} * @since 3.23.0 @@ -46795,7 +47420,7 @@ var Rope = new Class({ /** * If the Rope is marked as `dirty` it will automatically recalculate its vertices * the next time it renders. You can also force this by calling `updateVertices`. - * + * * @name Phaser.GameObjects.Rope#dirty * @type {boolean} * @since 3.23.0 @@ -46804,10 +47429,10 @@ var Rope = new Class({ /** * Are the Rope vertices aligned horizontally, in a strip, or vertically, in a column? - * + * * This property is set during instantiation and cannot be changed directly. * See the `setVertical` and `setHorizontal` methods. - * + * * @name Phaser.GameObjects.Rope#horizontal * @type {boolean} * @readonly @@ -46817,11 +47442,11 @@ var Rope = new Class({ /** * The horizontally flipped state of the Game Object. - * + * * A Game Object that is flipped horizontally will render inversed on the horizontal axis. * Flipping always takes place from the middle of the texture and does not impact the scale value. * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - * + * * @name Phaser.GameObjects.Rope#_flipX * @type {boolean} * @default false @@ -46832,11 +47457,11 @@ var Rope = new Class({ /** * The vertically flipped state of the Game Object. - * + * * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) * Flipping always takes place from the middle of the texture and does not impact the scale value. * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - * + * * @name Phaser.GameObjects.Rope#flipY * @type {boolean} * @default false @@ -46847,7 +47472,7 @@ var Rope = new Class({ /** * Internal Vector2 used for vertices updates. - * + * * @name Phaser.GameObjects.Rope#_perp * @type {Phaser.Math.Vector2} * @private @@ -46857,21 +47482,21 @@ var Rope = new Class({ /** * You can optionally choose to render the vertices of this Rope to a Graphics instance. - * + * * Achieve this by setting the `debugCallback` and the `debugGraphic` properties. - * + * * You can do this in a single call via the `Rope.setDebug` method, which will use the * built-in debug function. You can also set it to your own callback. The callback * will be invoked _once per render_ and sent the following parameters: - * + * * `debugCallback(src, meshLength, verts)` - * + * * `src` is the Rope instance being debugged. * `meshLength` is the number of mesh vertices in total. * `verts` is an array of the translated vertex coordinates. - * + * * To disable rendering, set this property back to `null`. - * + * * @name Phaser.GameObjects.Rope#debugCallback * @type {function} * @since 3.23.0 @@ -46881,7 +47506,7 @@ var Rope = new Class({ /** * The Graphics instance that the debug vertices will be drawn to, if `setDebug` has * been called. - * + * * @name Phaser.GameObjects.Rope#debugGraphic * @type {Phaser.GameObjects.Graphics} * @since 3.23.0 @@ -46891,7 +47516,7 @@ var Rope = new Class({ this.setTexture(texture, frame); this.setPosition(x, y); this.setSizeToFrame(); - this.initPipeline('TextureTintStripPipeline'); + this.initPipeline('RopePipeline'); if (Array.isArray(points)) { @@ -46901,6 +47526,21 @@ var Rope = new Class({ this.setPoints(points, colors, alphas); this.updateVertices(); + + this.on(GameObjectEvents.ADDED_TO_SCENE, this.addedToScene, this); + this.on(GameObjectEvents.REMOVED_FROM_SCENE, this.removedFromScene, this); + }, + + // Overrides Game Object method + addedToScene: function () + { + this.scene.sys.updateList.add(this); + }, + + // Overrides Game Object method + removedFromScene: function () + { + this.scene.sys.updateList.remove(this); }, /** @@ -46949,10 +47589,10 @@ var Rope = new Class({ * Flags this Rope as being dirty. A dirty rope will recalculate all of its vertices data * the _next_ time it renders. You should set this rope as dirty if you update the points * array directly. - * + * * @method Phaser.GameObjects.Rope#setDirty * @since 3.23.0 - * + * * @return {this} This Game Object instance. */ setDirty: function () @@ -46964,17 +47604,17 @@ var Rope = new Class({ /** * Sets the alignment of the points in this Rope to be horizontal, in a strip format. - * + * * Calling this method will reset this Rope. The current points, vertices, colors and alpha * values will be reset to thoes values given as parameters. - * + * * @method Phaser.GameObjects.Rope#setHorizontal * @since 3.23.0 - * + * * @param {(integer|Phaser.Types.Math.Vector2Like[])} [points] - An array containing the vertices data for this Rope, or a number that indicates how many segments to split the texture frame into. If none is provided the current points length is used. * @param {(number|number[])} [colors] - Either a single color value, or an array of values. * @param {(number|number[])} [alphas] - Either a single alpha value, or an array of values. - * + * * @return {this} This Game Object instance. */ setHorizontal: function (points, colors, alphas) @@ -46993,17 +47633,17 @@ var Rope = new Class({ /** * Sets the alignment of the points in this Rope to be vertical, in a column format. - * + * * Calling this method will reset this Rope. The current points, vertices, colors and alpha * values will be reset to thoes values given as parameters. - * + * * @method Phaser.GameObjects.Rope#setVertical * @since 3.23.0 - * + * * @param {(integer|Phaser.Types.Math.Vector2Like[])} [points] - An array containing the vertices data for this Rope, or a number that indicates how many segments to split the texture frame into. If none is provided the current points length is used. * @param {(number|number[])} [colors] - Either a single color value, or an array of values. * @param {(number|number[])} [alphas] - Either a single alpha value, or an array of values. - * + * * @return {this} This Game Object instance. */ setVertical: function (points, colors, alphas) @@ -47022,16 +47662,16 @@ var Rope = new Class({ /** * Sets the tint fill mode. - * + * * Mode 0 is an additive tint, the default, which blends the vertices colors with the texture. * This mode respects the texture alpha. - * + * * Mode 1 is a fill tint. Unlike an additive tint, a fill-tint literally replaces the pixel colors * from the texture with those in the tint. You can use this for effects such as making a player flash 'white' * if hit by something. This mode respects the texture alpha. - * + * * Mode 2 is a complete tint. The texture colors and alpha are replaced entirely by the vertices colors. - * + * * See the `setColors` method for details of how to color each of the vertices. * * @method Phaser.GameObjects.Rope#setTintFill @@ -47039,7 +47679,7 @@ var Rope = new Class({ * @since 3.23.0 * * @param {integer} [value=0] - Set to 0 for an Additive tint, 1 for a fill tint with alpha, or 2 for a fill tint without alpha. - * + * * @return {this} This Game Object instance. */ setTintFill: function (value) @@ -47053,28 +47693,28 @@ var Rope = new Class({ /** * Set the alpha values used by the Rope during rendering. - * + * * You can provide the values in a number of ways: - * + * * 1) One single numeric value: `setAlphas(0.5)` - This will set a single alpha for the whole Rope. * 2) Two numeric value: `setAlphas(1, 0.5)` - This will set a 'top' and 'bottom' alpha value across the whole Rope. * 3) An array of values: `setAlphas([ 1, 0.5, 0.2 ])` - * + * * If you provide an array of values and the array has exactly the same number of values as `points` in the Rope, it * will use each alpha value per rope segment. - * + * * If the provided array has a different number of values than `points` then it will use the values in order, from * the first Rope segment and on, until it runs out of values. This allows you to control the alpha values at all * vertices in the Rope. - * + * * Note this method is called `setAlphas` (plural) and not `setAlpha`. - * + * * @method Phaser.GameObjects.Rope#setAlphas * @since 3.23.0 - * + * * @param {(number|number[])} [alphas] - Either a single alpha value, or an array of values. If nothing is provided alpha is reset to 1. * @param {number} [bottomAlpha] - An optional bottom alpha value. See the method description for details. - * + * * @return {this} This Game Object instance. */ setAlphas: function (alphas, bottomAlpha) @@ -47129,7 +47769,7 @@ var Rope = new Class({ for (i = 0; i < total; i++) { index = i * 2; - + if (alphas.length > index) { prevAlpha = alphas[index]; @@ -47152,26 +47792,26 @@ var Rope = new Class({ /** * Set the color values used by the Rope during rendering. - * + * * Colors are used to control the level of tint applied across the Rope texture. - * + * * You can provide the values in a number of ways: - * + * * * One single numeric value: `setColors(0xff0000)` - This will set a single color tint for the whole Rope. * * An array of values: `setColors([ 0xff0000, 0x00ff00, 0x0000ff ])` - * + * * If you provide an array of values and the array has exactly the same number of values as `points` in the Rope, it * will use each color per rope segment. - * + * * If the provided array has a different number of values than `points` then it will use the values in order, from * the first Rope segment and on, until it runs out of values. This allows you to control the color values at all * vertices in the Rope. - * + * * @method Phaser.GameObjects.Rope#setColors * @since 3.23.0 - * + * * @param {(number|number[])} [colors] - Either a single color value, or an array of values. If nothing is provided color is reset to 0xffffff. - * + * * @return {this} This Game Object instance. */ setColors: function (colors) @@ -47215,7 +47855,7 @@ var Rope = new Class({ for (i = 0; i < total; i++) { index = i * 2; - + if (colors.length > index) { prevColor = colors[index]; @@ -47237,16 +47877,16 @@ var Rope = new Class({ /** * Sets the points used by this Rope. - * + * * The points should be provided as an array of Vector2, or vector2-like objects (i.e. those with public x/y properties). - * + * * Each point corresponds to one segment of the Rope. The more points in the array, the more segments the rope has. - * + * * Point coordinates are given in local-space, not world-space, and are directly related to the size of the texture * this Rope object is using. - * + * * For example, a Rope using a 512 px wide texture, split into 4 segments (128px each) would use the following points: - * + * * ```javascript * rope.setPoints([ * { x: 0, y: 0 }, @@ -47255,25 +47895,25 @@ var Rope = new Class({ * { x: 384, y: 0 } * ]); * ``` - * + * * Or, you can provide an integer to do the same thing: - * + * * ```javascript * rope.setPoints(4); * ``` - * + * * Which will divide the Rope into 4 equally sized segments based on the frame width. - * + * * Note that calling this method with a different number of points than the Rope has currently will * _reset_ the color and alpha values, unless you provide them as arguments to this method. - * + * * @method Phaser.GameObjects.Rope#setPoints * @since 3.23.0 - * + * * @param {(integer|Phaser.Types.Math.Vector2Like[])} [points=2] - An array containing the vertices data for this Rope, or a number that indicates how many segments to split the texture frame into. If none is provided a simple quad is created. * @param {(number|number[])} [colors] - Either a single color value, or an array of values. * @param {(number|number[])} [alphas] - Either a single alpha value, or an array of values. - * + * * @return {this} This Game Object instance. */ setPoints: function (points, colors, alphas) @@ -47295,7 +47935,7 @@ var Rope = new Class({ var s; var frameSegment; var offset; - + if (this.horizontal) { offset = -(this.frame.halfWidth); @@ -47357,10 +47997,10 @@ var Rope = new Class({ /** * Updates all of the UVs based on the Rope.points and `flipX` and `flipY` settings. - * + * * @method Phaser.GameObjects.Rope#updateUVs * @since 3.23.0 - * + * * @return {this} This Game Object instance. */ updateUVs: function () @@ -47375,7 +48015,7 @@ var Rope = new Class({ var partH = (u1 - u0) / (total - 1); var partV = (v1 - v0) / (total - 1); - + for (var i = 0; i < total; i++) { var index = i * 4; @@ -47446,12 +48086,12 @@ var Rope = new Class({ /** * Resizes all of the internal arrays: `vertices`, `uv`, `colors` and `alphas` to the new * given Rope segment total. - * + * * @method Phaser.GameObjects.Rope#resizeArrays * @since 3.23.0 - * + * * @param {integer} newSize - The amount of segments to split the Rope in to. - * + * * @return {this} This Game Object instance. */ resizeArrays: function (newSize) @@ -47482,14 +48122,14 @@ var Rope = new Class({ /** * Updates the vertices based on the Rope points. - * + * * This method is called automatically during rendering if `Rope.dirty` is `true`, which is set * by the `setPoints` and `setDirty` methods. You should flag the Rope as being dirty if you modify * the Rope points directly. - * + * * @method Phaser.GameObjects.Rope#updateVertices * @since 3.23.0 - * + * * @return {this} This Game Object instance. */ updateVertices: function () @@ -47511,12 +48151,12 @@ var Rope = new Class({ var lastPoint = points[0]; var frameSize = (this.horizontal) ? this.frame.halfHeight : this.frame.halfWidth; - + for (var i = 0; i < total; i++) { var point = points[i]; var index = i * 4; - + if (i < total - 1) { nextPoint = points[i + 1]; @@ -47528,12 +48168,12 @@ var Rope = new Class({ perp.x = nextPoint.y - lastPoint.y; perp.y = -(nextPoint.x - lastPoint.x); - + var perpLength = perp.length(); perp.x /= perpLength; perp.y /= perpLength; - + perp.x *= frameSize; perp.y *= frameSize; @@ -47541,7 +48181,7 @@ var Rope = new Class({ vertices[index + 1] = point.y + perp.y; vertices[index + 2] = point.x - perp.x; vertices[index + 3] = point.y - perp.y; - + lastPoint = point; } @@ -47550,33 +48190,33 @@ var Rope = new Class({ /** * This method enables rendering of the Rope vertices to the given Graphics instance. - * + * * If you enable this feature, you must call `Graphics.clear()` in your Scene `update`, * otherwise the Graphics instance will fill-in with draw calls. This is not done automatically * to allow for you to debug render multiple Rope objects to a single Graphics instance. - * + * * The Rope class has a built-in debug rendering callback `Rope.renderDebugVerts`, however * you can also provide your own callback to be used instead. Do this by setting the `callback` parameter. - * + * * The callback is invoked _once per render_ and sent the following parameters: - * + * * `callback(src, meshLength, verts)` - * + * * `src` is the Rope instance being debugged. * `meshLength` is the number of mesh vertices in total. * `verts` is an array of the translated vertex coordinates. - * + * * If using your own callback you do not have to provide a Graphics instance to this method. - * + * * To disable debug rendering, to either your own callback or the built-in one, call this method * with no arguments. - * + * * @method Phaser.GameObjects.Rope#setDebug * @since 3.23.0 - * + * * @param {Phaser.GameObjects.Graphics} [graphic] - The Graphic instance to render to if using the built-in callback. * @param {function} [callback] - The callback to invoke during debug render. Leave as undefined to use the built-in callback. - * + * * @return {this} This Game Object instance. */ setDebug: function (graphic, callback) @@ -47601,12 +48241,12 @@ var Rope = new Class({ /** * The built-in Rope vertices debug rendering method. - * + * * See `Rope.setDebug` for more details. * * @method Phaser.GameObjects.Rope#renderDebugVerts * @since 3.23.0 - * + * * @param {Phaser.GameObjects.Rope} src - The Rope object being rendered. * @param {integer} meshLength - The number of vertices in the mesh. * @param {number[]} verts - An array of translated vertex coordinates. @@ -47666,11 +48306,11 @@ var Rope = new Class({ /** * The horizontally flipped state of the Game Object. - * + * * A Game Object that is flipped horizontally will render inversed on the horizontal axis. * Flipping always takes place from the middle of the texture and does not impact the scale value. * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - * + * * @name Phaser.GameObjects.Rope#flipX * @type {boolean} * @default false @@ -47694,11 +48334,11 @@ var Rope = new Class({ /** * The vertically flipped state of the Game Object. - * + * * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down) * Flipping always takes place from the middle of the texture and does not impact the scale value. * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only. - * + * * @name Phaser.GameObjects.Rope#flipY * @type {boolean} * @default false @@ -47726,7 +48366,7 @@ module.exports = Rope; /***/ }), -/* 204 */ +/* 207 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -47735,17 +48375,17 @@ module.exports = Rope; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(128); +var AddToDOM = __webpack_require__(130); var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var GameEvents = __webpack_require__(20); +var Components = __webpack_require__(11); +var GameEvents = __webpack_require__(21); var GameObject = __webpack_require__(14); -var GetTextSize = __webpack_require__(997); +var GetTextSize = __webpack_require__(424); var GetValue = __webpack_require__(6); -var RemoveFromDOM = __webpack_require__(184); -var TextRender = __webpack_require__(998); -var TextStyle = __webpack_require__(1001); +var RemoveFromDOM = __webpack_require__(186); +var TextRender = __webpack_require__(1007); +var TextStyle = __webpack_require__(425); /** * @classdesc @@ -49138,7 +49778,7 @@ module.exports = Text; /***/ }), -/* 205 */ +/* 208 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -49149,12 +49789,12 @@ module.exports = Text; var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var GameEvents = __webpack_require__(20); +var Components = __webpack_require__(11); +var GameEvents = __webpack_require__(21); var GameObject = __webpack_require__(14); -var GetPowerOfTwo = __webpack_require__(333); -var Smoothing = __webpack_require__(173); -var TileSpriteRender = __webpack_require__(1003); +var GetPowerOfTwo = __webpack_require__(341); +var Smoothing = __webpack_require__(175); +var TileSpriteRender = __webpack_require__(1010); var Vector2 = __webpack_require__(3); // bitmask flag for GameObject.renderMask @@ -49790,7 +50430,7 @@ module.exports = TileSprite; /***/ }), -/* 206 */ +/* 209 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -49801,13 +50441,13 @@ module.exports = TileSprite; var Class = __webpack_require__(0); var Clamp = __webpack_require__(17); -var Components = __webpack_require__(12); -var Events = __webpack_require__(91); -var GameEvents = __webpack_require__(20); +var Components = __webpack_require__(11); +var Events = __webpack_require__(29); +var GameEvents = __webpack_require__(21); var GameObject = __webpack_require__(14); -var SoundEvents = __webpack_require__(59); -var UUID = __webpack_require__(202); -var VideoRender = __webpack_require__(1006); +var SoundEvents = __webpack_require__(61); +var UUID = __webpack_require__(205); +var VideoRender = __webpack_require__(1013); var MATH_CONST = __webpack_require__(13); /** @@ -51559,7 +52199,7 @@ module.exports = Video; /***/ }), -/* 207 */ +/* 210 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51569,9 +52209,9 @@ module.exports = Video; */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(208); -var GetPoints = __webpack_require__(419); -var GEOM_CONST = __webpack_require__(48); +var Contains = __webpack_require__(211); +var GetPoints = __webpack_require__(436); +var GEOM_CONST = __webpack_require__(49); /** * @classdesc @@ -51793,7 +52433,7 @@ module.exports = Polygon; /***/ }), -/* 208 */ +/* 211 */ /***/ (function(module, exports) { /** @@ -51842,7 +52482,7 @@ module.exports = Contains; /***/ }), -/* 209 */ +/* 212 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51852,7 +52492,7 @@ module.exports = Contains; */ var Class = __webpack_require__(0); -var Mesh = __webpack_require__(140); +var Mesh = __webpack_require__(141); /** * @classdesc @@ -52503,7 +53143,7 @@ module.exports = Quad; /***/ }), -/* 210 */ +/* 213 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52513,13 +53153,13 @@ module.exports = Quad; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); +var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); var GetFastValue = __webpack_require__(2); var Extend = __webpack_require__(19); -var SetValue = __webpack_require__(427); -var ShaderRender = __webpack_require__(1089); -var TransformMatrix = __webpack_require__(30); +var SetValue = __webpack_require__(444); +var ShaderRender = __webpack_require__(1096); +var TransformMatrix = __webpack_require__(31); /** * @classdesc @@ -53726,7 +54366,7 @@ module.exports = Shader; /***/ }), -/* 211 */ +/* 214 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53735,7 +54375,7 @@ module.exports = Shader; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DistanceBetween = __webpack_require__(54); +var DistanceBetween = __webpack_require__(55); /** * Checks if two Circles intersect. @@ -53757,7 +54397,7 @@ module.exports = CircleToCircle; /***/ }), -/* 212 */ +/* 215 */ /***/ (function(module, exports) { /** @@ -53811,7 +54451,7 @@ module.exports = CircleToRectangle; /***/ }), -/* 213 */ +/* 216 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53822,7 +54462,7 @@ module.exports = CircleToRectangle; */ var Point = __webpack_require__(4); -var LineToCircle = __webpack_require__(214); +var LineToCircle = __webpack_require__(217); /** * Checks for intersection between the line segment and circle, @@ -53903,7 +54543,7 @@ module.exports = GetLineToCircle; /***/ }), -/* 214 */ +/* 217 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53912,7 +54552,7 @@ module.exports = GetLineToCircle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(56); +var Contains = __webpack_require__(57); var Point = __webpack_require__(4); var tmp = new Point(); @@ -53987,7 +54627,7 @@ module.exports = LineToCircle; /***/ }), -/* 215 */ +/* 218 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53998,8 +54638,8 @@ module.exports = LineToCircle; */ var Point = __webpack_require__(4); -var LineToLine = __webpack_require__(85); -var LineToRectangle = __webpack_require__(435); +var LineToLine = __webpack_require__(86); +var LineToRectangle = __webpack_require__(452); /** * Checks for intersection between the Line and a Rectangle shape, @@ -54047,7 +54687,7 @@ module.exports = GetLineToRectangle; /***/ }), -/* 216 */ +/* 219 */ /***/ (function(module, exports) { /** @@ -54134,7 +54774,7 @@ module.exports = ContainsArray; /***/ }), -/* 217 */ +/* 220 */ /***/ (function(module, exports) { /** @@ -54182,7 +54822,7 @@ module.exports = RotateAroundXY; /***/ }), -/* 218 */ +/* 221 */ /***/ (function(module, exports) { /** @@ -54210,7 +54850,7 @@ module.exports = GetAspectRatio; /***/ }), -/* 219 */ +/* 222 */ /***/ (function(module, exports) { /** @@ -54264,7 +54904,7 @@ module.exports = RotateAroundXY; /***/ }), -/* 220 */ +/* 223 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54279,18 +54919,18 @@ module.exports = RotateAroundXY; module.exports = { - BUTTON_DOWN: __webpack_require__(1215), - BUTTON_UP: __webpack_require__(1216), - CONNECTED: __webpack_require__(1217), - DISCONNECTED: __webpack_require__(1218), - GAMEPAD_BUTTON_DOWN: __webpack_require__(1219), - GAMEPAD_BUTTON_UP: __webpack_require__(1220) + BUTTON_DOWN: __webpack_require__(1222), + BUTTON_UP: __webpack_require__(1223), + CONNECTED: __webpack_require__(1224), + DISCONNECTED: __webpack_require__(1225), + GAMEPAD_BUTTON_DOWN: __webpack_require__(1226), + GAMEPAD_BUTTON_UP: __webpack_require__(1227) }; /***/ }), -/* 221 */ +/* 224 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54300,7 +54940,7 @@ module.exports = { */ var Extend = __webpack_require__(19); -var XHRSettings = __webpack_require__(145); +var XHRSettings = __webpack_require__(146); /** * Takes two XHRSettings Objects and creates a new XHRSettings object from them. @@ -54338,7 +54978,7 @@ module.exports = MergeXHRSettings; /***/ }), -/* 222 */ +/* 225 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54349,11 +54989,11 @@ module.exports = MergeXHRSettings; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var File = __webpack_require__(21); +var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); -var ParseXML = __webpack_require__(364); +var ParseXML = __webpack_require__(374); /** * @classdesc @@ -54523,7 +55163,7 @@ module.exports = XMLFile; /***/ }), -/* 223 */ +/* 226 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54538,24 +55178,111 @@ module.exports = XMLFile; module.exports = { - Acceleration: __webpack_require__(1275), - Angular: __webpack_require__(1276), - Bounce: __webpack_require__(1277), - Debug: __webpack_require__(1278), - Drag: __webpack_require__(1279), - Enable: __webpack_require__(1280), - Friction: __webpack_require__(1281), - Gravity: __webpack_require__(1282), - Immovable: __webpack_require__(1283), - Mass: __webpack_require__(1284), - Size: __webpack_require__(1285), - Velocity: __webpack_require__(1286) + Acceleration: __webpack_require__(1281), + Angular: __webpack_require__(1282), + Bounce: __webpack_require__(1283), + Debug: __webpack_require__(1284), + Drag: __webpack_require__(1285), + Enable: __webpack_require__(1286), + Friction: __webpack_require__(1287), + Gravity: __webpack_require__(1288), + Immovable: __webpack_require__(1289), + Mass: __webpack_require__(1290), + OverlapCirc: __webpack_require__(483), + OverlapRect: __webpack_require__(227), + Size: __webpack_require__(1291), + Velocity: __webpack_require__(1292) }; /***/ }), -/* 224 */ +/* 227 */ +/***/ (function(module, exports) { + +/** + * This method will search the given rectangular area and return an array of all physics bodies that + * overlap with it. It can return either Dynamic, Static bodies or a mixture of both. + * + * A body only has to intersect with the search area to be considered, it doesn't have to be fully + * contained within it. + * + * If Arcade Physics is set to use the RTree (which it is by default) then the search for is extremely fast, + * otherwise the search is O(N) for Dynamic Bodies. + * + * @function Phaser.Physics.Arcade.Components.OverlapRect + * @since 3.17.0 + * + * @param {number} x - The top-left x coordinate of the area to search within. + * @param {number} y - The top-left y coordinate of the area to search within. + * @param {number} width - The width of the area to search within. + * @param {number} height - The height of the area to search within. + * @param {boolean} [includeDynamic=true] - Should the search include Dynamic Bodies? + * @param {boolean} [includeStatic=false] - Should the search include Static Bodies? + * + * @return {(Phaser.Physics.Arcade.Body[]|Phaser.Physics.Arcade.StaticBody[])} An array of bodies that overlap with the given area. + */ +var OverlapRect = function (world, x, y, width, height, includeDynamic, includeStatic) +{ + if (includeDynamic === undefined) { includeDynamic = true; } + if (includeStatic === undefined) { includeStatic = false; } + + var dynamicBodies = []; + var staticBodies = []; + + var minMax = world.treeMinMax; + + minMax.minX = x; + minMax.minY = y; + minMax.maxX = x + width; + minMax.maxY = y + height; + + if (includeStatic) + { + staticBodies = world.staticTree.search(minMax); + } + + if (includeDynamic && world.useTree) + { + dynamicBodies = world.tree.search(minMax); + } + else if (includeDynamic) + { + var bodies = world.bodies; + + var fakeBody = + { + position: { + x: x, + y: y + }, + left: x, + top: y, + right: x + width, + bottom: y + height, + isCircle: false + }; + + var intersects = world.intersects; + + bodies.iterate(function (target) + { + if (intersects(target, fakeBody)) + { + dynamicBodies.push(target); + } + + }); + } + + return staticBodies.concat(dynamicBodies); +}; + +module.exports = OverlapRect; + + +/***/ }), +/* 228 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54570,20 +55297,272 @@ module.exports = { module.exports = { - COLLIDE: __webpack_require__(1288), - OVERLAP: __webpack_require__(1289), - PAUSE: __webpack_require__(1290), - RESUME: __webpack_require__(1291), - TILE_COLLIDE: __webpack_require__(1292), - TILE_OVERLAP: __webpack_require__(1293), - WORLD_BOUNDS: __webpack_require__(1294), - WORLD_STEP: __webpack_require__(1295) + COLLIDE: __webpack_require__(1293), + OVERLAP: __webpack_require__(1294), + PAUSE: __webpack_require__(1295), + RESUME: __webpack_require__(1296), + TILE_COLLIDE: __webpack_require__(1297), + TILE_OVERLAP: __webpack_require__(1298), + WORLD_BOUNDS: __webpack_require__(1299), + WORLD_STEP: __webpack_require__(1300) }; /***/ }), -/* 225 */ +/* 229 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(52); + +/** + * Calculates and returns the horizontal overlap between two arcade physics bodies and sets their properties + * accordingly, including: `touching.left`, `touching.right`, `touching.none` and `overlapX'. + * + * @function Phaser.Physics.Arcade.GetOverlapX + * @since 3.0.0 + * + * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to separate. + * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to separate. + * @param {boolean} overlapOnly - Is this an overlap only check, or part of separation? + * @param {number} bias - A value added to the delta values during collision checks. Increase it to prevent sprite tunneling(sprites passing through another instead of colliding). + * + * @return {number} The amount of overlap. + */ +var GetOverlapX = function (body1, body2, overlapOnly, bias) +{ + var overlap = 0; + var maxOverlap = body1.deltaAbsX() + body2.deltaAbsX() + bias; + + if (body1._dx === 0 && body2._dx === 0) + { + // They overlap but neither of them are moving + body1.embedded = true; + body2.embedded = true; + } + else if (body1._dx > body2._dx) + { + // Body1 is moving right and / or Body2 is moving left + overlap = body1.right - body2.x; + + if ((overlap > maxOverlap && !overlapOnly) || body1.checkCollision.right === false || body2.checkCollision.left === false) + { + overlap = 0; + } + else + { + body1.touching.none = false; + body1.touching.right = true; + + body2.touching.none = false; + body2.touching.left = true; + + if (body2.physicsType === CONST.STATIC_BODY) + { + body1.blocked.none = false; + body1.blocked.right = true; + } + + if (body1.physicsType === CONST.STATIC_BODY) + { + body2.blocked.none = false; + body2.blocked.left = true; + } + } + } + else if (body1._dx < body2._dx) + { + // Body1 is moving left and/or Body2 is moving right + overlap = body1.x - body2.width - body2.x; + + if ((-overlap > maxOverlap && !overlapOnly) || body1.checkCollision.left === false || body2.checkCollision.right === false) + { + overlap = 0; + } + else + { + body1.touching.none = false; + body1.touching.left = true; + + body2.touching.none = false; + body2.touching.right = true; + + if (body2.physicsType === CONST.STATIC_BODY) + { + body1.blocked.none = false; + body1.blocked.left = true; + } + + if (body1.physicsType === CONST.STATIC_BODY) + { + body2.blocked.none = false; + body2.blocked.right = true; + } + } + } + + // Resets the overlapX to zero if there is no overlap, or to the actual pixel value if there is + body1.overlapX = overlap; + body2.overlapX = overlap; + + return overlap; +}; + +module.exports = GetOverlapX; + + +/***/ }), +/* 230 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(52); + +/** + * Calculates and returns the vertical overlap between two arcade physics bodies and sets their properties + * accordingly, including: `touching.up`, `touching.down`, `touching.none` and `overlapY'. + * + * @function Phaser.Physics.Arcade.GetOverlapY + * @since 3.0.0 + * + * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to separate. + * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to separate. + * @param {boolean} overlapOnly - Is this an overlap only check, or part of separation? + * @param {number} bias - A value added to the delta values during collision checks. Increase it to prevent sprite tunneling(sprites passing through another instead of colliding). + * + * @return {number} The amount of overlap. + */ +var GetOverlapY = function (body1, body2, overlapOnly, bias) +{ + var overlap = 0; + var maxOverlap = body1.deltaAbsY() + body2.deltaAbsY() + bias; + + if (body1._dy === 0 && body2._dy === 0) + { + // They overlap but neither of them are moving + body1.embedded = true; + body2.embedded = true; + } + else if (body1._dy > body2._dy) + { + // Body1 is moving down and/or Body2 is moving up + overlap = body1.bottom - body2.y; + + if ((overlap > maxOverlap && !overlapOnly) || body1.checkCollision.down === false || body2.checkCollision.up === false) + { + overlap = 0; + } + else + { + body1.touching.none = false; + body1.touching.down = true; + + body2.touching.none = false; + body2.touching.up = true; + + if (body2.physicsType === CONST.STATIC_BODY) + { + body1.blocked.none = false; + body1.blocked.down = true; + } + + if (body1.physicsType === CONST.STATIC_BODY) + { + body2.blocked.none = false; + body2.blocked.up = true; + } + } + } + else if (body1._dy < body2._dy) + { + // Body1 is moving up and/or Body2 is moving down + overlap = body1.y - body2.bottom; + + if ((-overlap > maxOverlap && !overlapOnly) || body1.checkCollision.up === false || body2.checkCollision.down === false) + { + overlap = 0; + } + else + { + body1.touching.none = false; + body1.touching.up = true; + + body2.touching.none = false; + body2.touching.down = true; + + if (body2.physicsType === CONST.STATIC_BODY) + { + body1.blocked.none = false; + body1.blocked.up = true; + } + + if (body1.physicsType === CONST.STATIC_BODY) + { + body2.blocked.none = false; + body2.blocked.down = true; + } + } + } + + // Resets the overlapY to zero if there is no overlap, or to the actual pixel value if there is + body1.overlapY = overlap; + body2.overlapY = overlap; + + return overlap; +}; + +module.exports = GetOverlapY; + + +/***/ }), +/* 231 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Checks for intersection between the given tile rectangle-like object and an Arcade Physics body. + * + * @function Phaser.Physics.Arcade.Tilemap.TileIntersectsBody + * @since 3.0.0 + * + * @param {{ left: number, right: number, top: number, bottom: number }} tileWorldRect - A rectangle object that defines the tile placement in the world. + * @param {Phaser.Physics.Arcade.Body} body - The body to check for intersection against. + * + * @return {boolean} Returns `true` of the tile intersects with the body, otherwise `false`. + */ +var TileIntersectsBody = function (tileWorldRect, body) +{ + // Currently, all bodies are treated as rectangles when colliding with a Tile. + + return !( + body.right <= tileWorldRect.left || + body.bottom <= tileWorldRect.top || + body.position.x >= tileWorldRect.right || + body.position.y >= tileWorldRect.bottom + ); +}; + +module.exports = TileIntersectsBody; + + +/***/ }), +/* 232 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54600,12 +55579,12 @@ var Constraint = {}; module.exports = Constraint; -var Vertices = __webpack_require__(87); -var Vector = __webpack_require__(100); -var Sleeping = __webpack_require__(243); -var Bounds = __webpack_require__(101); -var Axes = __webpack_require__(517); -var Common = __webpack_require__(43); +var Vertices = __webpack_require__(88); +var Vector = __webpack_require__(101); +var Sleeping = __webpack_require__(249); +var Bounds = __webpack_require__(102); +var Axes = __webpack_require__(540); +var Common = __webpack_require__(44); (function() { @@ -55072,7 +56051,7 @@ var Common = __webpack_require__(43); /***/ }), -/* 226 */ +/* 233 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55081,7 +56060,7 @@ var Common = __webpack_require__(43); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(148); +var GetTileAt = __webpack_require__(149); /** * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting @@ -55089,9 +56068,8 @@ var GetTileAt = __webpack_require__(148); * internally to optimize recalculating faces when only one tile has been changed. * * @function Phaser.Tilemaps.Components.CalculateFacesAt - * @private * @since 3.0.0 - * + * * @param {integer} tileX - The x coordinate. * @param {integer} tileY - The y coordinate. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. @@ -55117,29 +56095,48 @@ var CalculateFacesAt = function (tileX, tileY, layer) // Reset edges that are shared between tile and its neighbors if (above && above.collides) { - if (tileCollides) { tile.faceTop = false; } + if (tileCollides) + { + tile.faceTop = false; + } + above.faceBottom = !tileCollides; } if (below && below.collides) { - if (tileCollides) { tile.faceBottom = false; } + if (tileCollides) + { + tile.faceBottom = false; + } + below.faceTop = !tileCollides; } if (left && left.collides) { - if (tileCollides) { tile.faceLeft = false; } + if (tileCollides) + { + tile.faceLeft = false; + } + left.faceRight = !tileCollides; } if (right && right.collides) { - if (tileCollides) { tile.faceRight = false; } + if (tileCollides) + { + tile.faceRight = false; + } + right.faceLeft = !tileCollides; } - if (tile && !tile.collides) { tile.resetFaces(); } + if (tile && !tile.collides) + { + tile.resetFaces(); + } return tile; }; @@ -55148,7 +56145,7 @@ module.exports = CalculateFacesAt; /***/ }), -/* 227 */ +/* 234 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55157,10 +56154,10 @@ module.exports = CalculateFacesAt; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Tile = __webpack_require__(74); -var IsInLayerBounds = __webpack_require__(102); -var CalculateFacesAt = __webpack_require__(226); -var SetTileCollision = __webpack_require__(73); +var Tile = __webpack_require__(75); +var IsInLayerBounds = __webpack_require__(103); +var CalculateFacesAt = __webpack_require__(233); +var SetTileCollision = __webpack_require__(65); /** * Puts a tile at the given tile coordinates in the specified layer. You can pass in either an index @@ -55169,7 +56166,6 @@ var SetTileCollision = __webpack_require__(73); * Collision information will be recalculated at the specified location. * * @function Phaser.Tilemaps.Components.PutTileAt - * @private * @since 3.0.0 * * @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object. @@ -55194,11 +56190,13 @@ var PutTileAt = function (tile, tileX, tileY, recalculateFaces, layer) { layer.data[tileY][tileX] = new Tile(layer, tile.index, tileX, tileY, tile.width, tile.height); } + layer.data[tileY][tileX].copy(tile); } else { var index = tile; + if (layer.data[tileY][tileX] === null) { layer.data[tileY][tileX] = new Tile(layer, index, tileX, tileY, layer.tileWidth, layer.tileHeight); @@ -55212,6 +56210,7 @@ var PutTileAt = function (tile, tileX, tileY, recalculateFaces, layer) // Updating colliding flag on the new tile var newTile = layer.data[tileY][tileX]; var collides = layer.collideIndexes.indexOf(newTile.index) !== -1; + SetTileCollision(newTile, collides); // Recalculate faces only if the colliding flag at (tileX, tileY) has changed @@ -55226,48 +56225,8 @@ var PutTileAt = function (tile, tileX, tileY, recalculateFaces, layer) module.exports = PutTileAt; - /***/ }), -/* 228 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Internally used method to keep track of the tile indexes that collide within a layer. This - * updates LayerData.collideIndexes to either contain or not contain the given `tileIndex`. - * - * @function Phaser.Tilemaps.Components.SetLayerCollisionIndex - * @private - * @since 3.0.0 - * - * @param {integer} tileIndex - The tile index to set the collision boolean for. - * @param {boolean} [collides=true] - Should the tile index collide or not? - * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - */ -var SetLayerCollisionIndex = function (tileIndex, collides, layer) -{ - var loc = layer.collideIndexes.indexOf(tileIndex); - - if (collides && loc === -1) - { - layer.collideIndexes.push(tileIndex); - } - else if (!collides && loc !== -1) - { - layer.collideIndexes.splice(loc, 1); - } -}; - -module.exports = SetLayerCollisionIndex; - - -/***/ }), -/* 229 */ +/* 235 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55276,10 +56235,10 @@ module.exports = SetLayerCollisionIndex; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Formats = __webpack_require__(32); -var LayerData = __webpack_require__(103); -var MapData = __webpack_require__(104); -var Tile = __webpack_require__(74); +var Formats = __webpack_require__(33); +var LayerData = __webpack_require__(104); +var MapData = __webpack_require__(105); +var Tile = __webpack_require__(75); /** * Parses a 2D array of tile indexes into a new MapData object with a single layer. @@ -55359,7 +56318,7 @@ module.exports = Parse2DArray; /***/ }), -/* 230 */ +/* 236 */ /***/ (function(module, exports) { /** @@ -55449,68 +56408,7 @@ module.exports = ParseGID; /***/ }), -/* 231 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Seth Berrier - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetFastValue = __webpack_require__(2); - -/** - * Parse a Tiled group layer and create a state object for inheriting. - * - * @function Phaser.Tilemaps.Parsers.Tiled.CreateGroupLayer - * @since 3.21.0 - * - * @param {object} json - The Tiled JSON object. - * @param {object} [currentl] - The current group layer from the Tiled JSON file. - * @param {object} [parentstate] - The state of the parent group (if any). - * - * @return {object} A group state object with proper values for updating children layers. - */ -var CreateGroupLayer = function (json, groupl, parentstate) -{ - if (!groupl) - { - // Return a default group state object - return { - i: 0, // Current layer array iterator - layers: json.layers, // Current array of layers - - // Values inherited from parent group - name: '', - opacity: 1, - visible: true, - x: 0, - y: 0 - }; - } - - // Compute group layer x, y - var layerX = groupl.x + GetFastValue(groupl, 'startx', 0) * json.tilewidth + GetFastValue(groupl, 'offsetx', 0); - var layerY = groupl.y + GetFastValue(groupl, 'starty', 0) * json.tileheight + GetFastValue(groupl, 'offsety', 0); - - // Compute next state inherited from group - return { - i: 0, - layers: groupl.layers, - name: parentstate.name + groupl.name + '/', - opacity: parentstate.opacity * groupl.opacity, - visible: parentstate.visible && groupl.visible, - x: parentstate.x + layerX, - y: parentstate.y + layerY - }; -}; - -module.exports = CreateGroupLayer; - - -/***/ }), -/* 232 */ +/* 237 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55519,8 +56417,8 @@ module.exports = CreateGroupLayer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Pick = __webpack_require__(489); -var ParseGID = __webpack_require__(230); +var Pick = __webpack_require__(513); +var ParseGID = __webpack_require__(236); var copyPoints = function (p) { return { x: p.x, y: p.y }; }; @@ -55590,7 +56488,7 @@ module.exports = ParseObject; /***/ }), -/* 233 */ +/* 238 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55599,10 +56497,10 @@ module.exports = ParseObject; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Formats = __webpack_require__(32); -var MapData = __webpack_require__(104); -var Parse = __webpack_require__(481); -var Tilemap = __webpack_require__(497); +var Formats = __webpack_require__(33); +var MapData = __webpack_require__(105); +var Parse = __webpack_require__(505); +var Tilemap = __webpack_require__(521); /** * Create a Tilemap from the given key or data. If neither is given, make a blank Tilemap. When @@ -55676,7 +56574,7 @@ module.exports = ParseToTilemap; /***/ }), -/* 234 */ +/* 239 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55725,7 +56623,7 @@ module.exports = GetTargets; /***/ }), -/* 235 */ +/* 240 */ /***/ (function(module, exports) { /** @@ -55993,7 +56891,7 @@ module.exports = GetValueOp; /***/ }), -/* 236 */ +/* 241 */ /***/ (function(module, exports) { /** @@ -56037,7 +56935,7 @@ module.exports = TWEEN_DEFAULTS; /***/ }), -/* 237 */ +/* 242 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56047,11 +56945,11 @@ module.exports = TWEEN_DEFAULTS; */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(238); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(243); var GameObjectCreator = __webpack_require__(16); var GameObjectFactory = __webpack_require__(5); -var TWEEN_CONST = __webpack_require__(90); +var TWEEN_CONST = __webpack_require__(91); var MATH_CONST = __webpack_require__(13); /** @@ -56352,9 +57250,9 @@ var Tween = new Class({ /** * An object containing the different Tween callback functions. - * + * * You can either set these in the Tween config, or by calling the `Tween.setCallback` method. - * + * * `onActive` When the Tween is moved from the pending to the active list in the Tween Manager, even if playback paused. * `onStart` When the Tween starts playing after a delayed state. Will happen at the same time as `onActive` if it has no delay. * `onYoyo` When a TweenData starts a yoyo. This happens _after_ the `hold` delay expires, if set. @@ -56388,12 +57286,12 @@ var Tween = new Class({ this.callbackScope; }, - /** + /** * Returns the current value of the specified Tween Data. * * @method Phaser.Tweens.Tween#getValue * @since 3.0.0 - * + * * @param {integer} [index=0] - The Tween Data to return the value from. * * @return {number} The value of the requested Tween Data. @@ -56478,9 +57376,9 @@ var Tween = new Class({ /** * Updates the 'end' value of the given property across all matching targets. - * + * * Calling this does not adjust the duration of the tween, or the current progress. - * + * * You can optionally tell it to set the 'start' value to be the current value (before the change). * * @method Phaser.Tweens.Tween#updateTo @@ -56762,12 +57660,12 @@ var Tween = new Class({ /** * Starts a Tween playing. - * + * * You only need to call this method if you have configured the tween to be paused on creation. - * + * * If the Tween is already playing, calling this method again will have no effect. If you wish to * restart the Tween, use `Tween.restart` instead. - * + * * Calling this method after the Tween has completed will start the Tween playing again from the start. * This is the same as calling `Tween.seek(0)` and then `Tween.play()`. * @@ -56919,16 +57817,17 @@ var Tween = new Class({ /** * Seeks to a specific point in the Tween. - * - * **Note:** You cannot seek a Tween that repeats or loops forever, or that has an unusually long total duration. - * + * + * **Note:** Be careful when seeking a Tween that repeats or loops forever, + * or that has an unusually long total duration, as it's possible to hang the browser. + * * The given position is a value between 0 and 1 which represents how far through the Tween to seek to. * A value of 0.5 would seek to half-way through the Tween, where-as a value of zero would seek to the start. - * + * * Note that the seek takes the entire duration of the Tween into account, including delays, loops and repeats. * For example, a Tween that lasts for 2 seconds, but that loops 3 times, would have a total duration of 6 seconds, * so seeking to 0.5 would seek to 3 seconds into the Tween, as that's half-way through its _entire_ duration. - * + * * Seeking works by resetting the Tween to its initial values and then iterating through the Tween at `delta` * jumps per step. The longer the Tween, the longer this can take. * @@ -56944,13 +57843,6 @@ var Tween = new Class({ { if (delta === undefined) { delta = 16.6; } - if (this.totalDuration >= 3600000) - { - console.warn('Tween.seek duration too long'); - - return this; - } - if (this.state === TWEEN_CONST.REMOVED) { this.makeActive(); @@ -57029,11 +57921,11 @@ var Tween = new Class({ /** * Sets an event based callback to be invoked during playback. - * + * * Calling this method will replace a previously set callback for the given type, if any exists. - * + * * The types available are: - * + * * `onActive` When the Tween is moved from the pending to the active list in the Tween Manager, even if playback paused. * `onStart` When the Tween starts playing after a delayed state. Will happen at the same time as `onActive` if it has no delay. * `onYoyo` When a TweenData starts a yoyo. This happens _after_ the `hold` delay expires, if set. @@ -57098,7 +57990,7 @@ var Tween = new Class({ /** * Immediately removes this Tween from the TweenManager and all of its internal arrays, * no matter what stage it as it. Then sets the tween state to `REMOVED`. - * + * * You should dispose of your reference to this tween after calling this method, to * free it from memory. * @@ -57201,7 +58093,7 @@ var Tween = new Class({ if (!this.hasStarted && !this.isSeeking) { this.startDelay -= delta; - + if (this.startDelay <= 0) { this.hasStarted = true; @@ -57314,7 +58206,7 @@ var Tween = new Class({ if (callback) { callback.params[1] = this.targets; - + callback.func.apply(callback.scope, callback.params); } } @@ -57686,7 +58578,7 @@ module.exports = Tween; /***/ }), -/* 238 */ +/* 243 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57701,26 +58593,26 @@ module.exports = Tween; module.exports = { - TIMELINE_COMPLETE: __webpack_require__(1375), - TIMELINE_LOOP: __webpack_require__(1376), - TIMELINE_PAUSE: __webpack_require__(1377), - TIMELINE_RESUME: __webpack_require__(1378), - TIMELINE_START: __webpack_require__(1379), - TIMELINE_UPDATE: __webpack_require__(1380), - TWEEN_ACTIVE: __webpack_require__(1381), - TWEEN_COMPLETE: __webpack_require__(1382), - TWEEN_LOOP: __webpack_require__(1383), - TWEEN_REPEAT: __webpack_require__(1384), - TWEEN_START: __webpack_require__(1385), - TWEEN_STOP: __webpack_require__(1386), - TWEEN_UPDATE: __webpack_require__(1387), - TWEEN_YOYO: __webpack_require__(1388) + TIMELINE_COMPLETE: __webpack_require__(1372), + TIMELINE_LOOP: __webpack_require__(1373), + TIMELINE_PAUSE: __webpack_require__(1374), + TIMELINE_RESUME: __webpack_require__(1375), + TIMELINE_START: __webpack_require__(1376), + TIMELINE_UPDATE: __webpack_require__(1377), + TWEEN_ACTIVE: __webpack_require__(1378), + TWEEN_COMPLETE: __webpack_require__(1379), + TWEEN_LOOP: __webpack_require__(1380), + TWEEN_REPEAT: __webpack_require__(1381), + TWEEN_START: __webpack_require__(1382), + TWEEN_STOP: __webpack_require__(1383), + TWEEN_UPDATE: __webpack_require__(1384), + TWEEN_YOYO: __webpack_require__(1385) }; /***/ }), -/* 239 */ +/* 244 */ /***/ (function(module, exports) { /** @@ -57847,7 +58739,7 @@ module.exports = TweenData; /***/ }), -/* 240 */ +/* 245 */ /***/ (function(module, exports) { /** @@ -57901,7 +58793,7 @@ module.exports = ScaleModes; /***/ }), -/* 241 */ +/* 246 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57910,7 +58802,7 @@ module.exports = ScaleModes; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathWrap = __webpack_require__(58); +var MathWrap = __webpack_require__(59); /** * Wrap an angle. @@ -57933,7 +58825,7 @@ module.exports = Wrap; /***/ }), -/* 242 */ +/* 247 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57942,7 +58834,7 @@ module.exports = Wrap; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Wrap = __webpack_require__(58); +var Wrap = __webpack_require__(59); /** * Wrap an angle in degrees. @@ -57965,7 +58857,1784 @@ module.exports = WrapDegrees; /***/ }), -/* 243 */ +/* 248 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var CustomMap = __webpack_require__(121); +var GetFastValue = __webpack_require__(2); +var Events = __webpack_require__(120); +var Animation = __webpack_require__(170); + +/** + * @classdesc + * The Animation State Component. + * + * This component provides features to apply animations to Game Objects. It is responsible for + * loading, queuing animations for later playback, mixing between animations and setting + * the current animation frame to the Game Object that owns this component. + * + * This component lives as an instance within any Game Object that has it defined, such as Sprites. + * + * You can access its properties and methods via the `anims` property, i.e. `Sprite.anims`. + * + * As well as playing animations stored in the global Animation Manager, this component + * can also create animations that are stored locally within it. See the `create` method + * for more details. + * + * Prior to Phaser 3.50 this component was called just `Animation` and lived in the + * `Phaser.GameObjects.Components` namespace. It was renamed to `AnimationState` + * in 3.50 to help better identify its true purpose when browsing the documentation. + * + * @class AnimationState + * @memberof Phaser.Animations + * @constructor + * @since 3.0.0 + * + * @param {Phaser.GameObjects.GameObject} parent - The Game Object to which this animation component belongs. + */ +var AnimationState = new Class({ + + initialize: + + function AnimationState (parent) + { + /** + * The Game Object to which this animation component belongs. + * + * You can typically access this component from the Game Object + * via the `this.anims` property. + * + * @name Phaser.Animations.AnimationState#parent + * @type {Phaser.GameObjects.GameObject} + * @since 3.0.0 + */ + this.parent = parent; + + /** + * A reference to the global Animation Manager. + * + * @name Phaser.Animations.AnimationState#animationManager + * @type {Phaser.Animations.AnimationManager} + * @since 3.0.0 + */ + this.animationManager = parent.scene.sys.anims; + + this.animationManager.on(Events.REMOVE_ANIMATION, this.globalRemove, this); + + /** + * A reference to the Texture Manager. + * + * @name Phaser.Animations.AnimationState#textureManager + * @type {Phaser.Textures.TextureManager} + * @protected + * @since 3.50.0 + */ + this.textureManager = this.animationManager.textureManager; + + /** + * The Animations stored locally in this Animation component. + * + * Do not modify the contents of this Map directly, instead use the + * `add`, `create` and `remove` methods of this class instead. + * + * @name Phaser.Animations.AnimationState#anims + * @type {Phaser.Structs.Map.} + * @protected + * @since 3.50.0 + */ + this.anims = null; + + /** + * Is an animation currently playing or not? + * + * @name Phaser.Animations.AnimationState#isPlaying + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.isPlaying = false; + + /** + * Has the current animation started playing, or is it waiting for a delay to expire? + * + * @name Phaser.Animations.AnimationState#hasStarted + * @type {boolean} + * @default false + * @since 3.50.0 + */ + this.hasStarted = false; + + /** + * The current Animation loaded into this Animation component. + * + * Will by `null` if no animation is yet loaded. + * + * @name Phaser.Animations.AnimationState#currentAnim + * @type {?Phaser.Animations.Animation} + * @default null + * @since 3.0.0 + */ + this.currentAnim = null; + + /** + * The current AnimationFrame being displayed by this Animation component. + * + * Will by `null` if no animation is yet loaded. + * + * @name Phaser.Animations.AnimationState#currentFrame + * @type {?Phaser.Animations.AnimationFrame} + * @default null + * @since 3.0.0 + */ + this.currentFrame = null; + + /** + * The key, instance, or config of the next Animation to be loaded into this Animation component + * when the current animation completes. + * + * Will by `null` if no animation has been queued. + * + * @name Phaser.Animations.AnimationState#nextAnim + * @type {?(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} + * @default null + * @since 3.16.0 + */ + this.nextAnim = null; + + /** + * A queue of Animations to be loaded into this Animation component when the current animation completes. + * + * Populate this queue via the `chain` method. + * + * @name Phaser.Animations.AnimationState#nextAnimsQueue + * @type {array} + * @since 3.24.0 + */ + this.nextAnimsQueue = []; + + /** + * The Time Scale factor. + * + * You can adjust this value to modify the passage of time for the animation that is currently + * playing. For example, setting it to 2 will make the animation play twice as fast. Or setting + * it to 0.5 will slow the animation down. + * + * You can change this value at run-time, or set it via the `PlayAnimationConfig`. + * + * Prior to Phaser 3.50 this property was private and called `_timeScale`. + * + * @name Phaser.Animations.AnimationState#timeScale + * @type {number} + * @default 1 + * @since 3.50.0 + */ + this.timeScale = 1; + + /** + * The frame rate of playback, of the current animation, in frames per second. + * + * This value is set when a new animation is loaded into this component and should + * be treated as read-only, as changing it once playback has started will not alter + * the animation. To change the frame rate, provide a new value in the `PlayAnimationConfig` object. + * + * @name Phaser.Animations.AnimationState#frameRate + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.frameRate = 0; + + /** + * The duration of the current animation, in milliseconds. + * + * This value is set when a new animation is loaded into this component and should + * be treated as read-only, as changing it once playback has started will not alter + * the animation. To change the duration, provide a new value in the `PlayAnimationConfig` object. + * + * @name Phaser.Animations.AnimationState#duration + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.duration = 0; + + /** + * The number of milliseconds per frame, not including frame specific modifiers that may be present in the + * Animation data. + * + * This value is calculated when a new animation is loaded into this component and should + * be treated as read-only. Changing it will not alter playback speed. + * + * @name Phaser.Animations.AnimationState#msPerFrame + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.msPerFrame = 0; + + /** + * Skip frames if the time lags, or always advanced anyway? + * + * @name Phaser.Animations.AnimationState#skipMissedFrames + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.skipMissedFrames = true; + + /** + * The delay before starting playback of the current animation, in milliseconds. + * + * This value is set when a new animation is loaded into this component and should + * be treated as read-only, as changing it once playback has started will not alter + * the animation. To change the delay, provide a new value in the `PlayAnimationConfig` object. + * + * Prior to Phaser 3.50 this property was private and called `_delay`. + * + * @name Phaser.Animations.AnimationState#delay + * @type {number} + * @default 0 + * @since 3.50.0 + */ + this.delay = 0; + + /** + * The number of times to repeat playback of the current animation. + * + * If -1, it means the animation will repeat forever. + * + * This value is set when a new animation is loaded into this component and should + * be treated as read-only, as changing it once playback has started will not alter + * the animation. To change the number of repeats, provide a new value in the `PlayAnimationConfig` object. + * + * Prior to Phaser 3.50 this property was private and called `_repeat`. + * + * @name Phaser.Animations.AnimationState#repeat + * @type {number} + * @default 0 + * @since 3.50.0 + */ + this.repeat = 0; + + /** + * The number of milliseconds to wait before starting the repeat playback of the current animation. + * + * This value is set when a new animation is loaded into this component, but can also be modified + * at run-time. + * + * You can change the repeat delay by providing a new value in the `PlayAnimationConfig` object. + * + * Prior to Phaser 3.50 this property was private and called `_repeatDelay`. + * + * @name Phaser.Animations.AnimationState#repeatDelay + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.repeatDelay = 0; + + /** + * Should the current animation yoyo? An animation that yoyos will play in reverse, from the end + * to the start, before then repeating or completing. An animation that does not yoyo will just + * play from the start to the end. + * + * This value is set when a new animation is loaded into this component, but can also be modified + * at run-time. + * + * You can change the yoyo by providing a new value in the `PlayAnimationConfig` object. + * + * Prior to Phaser 3.50 this property was private and called `_yoyo`. + * + * @name Phaser.Animations.AnimationState#yoyo + * @type {boolean} + * @default false + * @since 3.50.0 + */ + this.yoyo = false; + + /** + * Should the GameObject's `visible` property be set to `true` when the animation starts to play? + * + * This will happen _after_ any delay that may have been set. + * + * This value is set when a new animation is loaded into this component, but can also be modified + * at run-time, assuming the animation is currently delayed. + * + * @name Phaser.Animations.AnimationState#showOnStart + * @type {boolean} + * @since 3.50.0 + */ + this.showOnStart = false; + + /** + * Should the GameObject's `visible` property be set to `false` when the animation completes? + * + * This value is set when a new animation is loaded into this component, but can also be modified + * at run-time, assuming the animation is still actively playing. + * + * @name Phaser.Animations.AnimationState#hideOnComplete + * @type {boolean} + * @since 3.50.0 + */ + this.hideOnComplete = false; + + /** + * Is the playhead moving forwards (`true`) or in reverse (`false`) ? + * + * @name Phaser.Animations.AnimationState#forward + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.forward = true; + + /** + * An internal trigger that tells the component if it should plays the animation + * in reverse mode ('true') or not ('false'). This is used because `forward` can + * be changed by the `yoyo` feature. + * + * Prior to Phaser 3.50 this property was private and called `_reverse`. + * + * @name Phaser.Animations.AnimationState#inReverse + * @type {boolean} + * @default false + * @since 3.50.0 + */ + this.inReverse = false; + + /** + * Internal time overflow accumulator. + * + * This has the `delta` time added to it as part of the `update` step. + * + * @name Phaser.Animations.AnimationState#accumulator + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.accumulator = 0; + + /** + * The time point at which the next animation frame will change. + * + * This value is compared against the `accumulator` as part of the `update` step. + * + * @name Phaser.Animations.AnimationState#nextTick + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.nextTick = 0; + + /** + * A counter keeping track of how much delay time, in milliseconds, is left before playback begins. + * + * This is set via the `playAfterDelay` method, although it can be modified at run-time + * if required, as long as the animation has not already started playing. + * + * @name Phaser.Animations.AnimationState#delayCounter + * @type {number} + * @default 0 + * @since 3.50.0 + */ + this.delayCounter = 0; + + /** + * A counter that keeps track of how many repeats are left to run. + * + * This value is set when a new animation is loaded into this component, but can also be modified + * at run-time. + * + * @name Phaser.Animations.AnimationState#repeatCounter + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.repeatCounter = 0; + + /** + * An internal flag keeping track of pending repeats. + * + * @name Phaser.Animations.AnimationState#pendingRepeat + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.pendingRepeat = false; + + /** + * Is the Animation paused? + * + * @name Phaser.Animations.AnimationState#_paused + * @type {boolean} + * @private + * @default false + * @since 3.0.0 + */ + this._paused = false; + + /** + * Was the animation previously playing before being paused? + * + * @name Phaser.Animations.AnimationState#_wasPlaying + * @type {boolean} + * @private + * @default false + * @since 3.0.0 + */ + this._wasPlaying = false; + + /** + * Internal property tracking if this Animation is waiting to stop. + * + * 0 = No + * 1 = Waiting for ms to pass + * 2 = Waiting for repeat + * 3 = Waiting for specific frame + * + * @name Phaser.Animations.AnimationState#_pendingStop + * @type {integer} + * @private + * @since 3.4.0 + */ + this._pendingStop = 0; + + /** + * Internal property used by _pendingStop. + * + * @name Phaser.Animations.AnimationState#_pendingStopValue + * @type {any} + * @private + * @since 3.4.0 + */ + this._pendingStopValue; + }, + + /** + * Sets an animation, or an array of animations, to be played in the future, after the current one completes or stops. + * + * The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc, + * or have one of the `stop` methods called. + * + * An animation set to repeat forever will never enter a completed state unless stopped. + * + * You can chain a new animation at any point, including before the current one starts playing, during it, or when it ends (via its `animationcomplete` event). + * + * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained animations without impacting the global animation they're playing. + * + * Call this method with no arguments to reset all currently chained animations. + * + * @method Phaser.Animations.AnimationState#chain + * @since 3.16.0 + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig|string[]|Phaser.Animations.Animation[]|Phaser.Types.Animations.PlayAnimationConfig[])} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object, or an array of them. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + chain: function (key) + { + var parent = this.parent; + + if (key === undefined) + { + this.nextAnimsQueue.length = 0; + this.nextAnim = null; + + return parent; + } + + if (!Array.isArray(key)) + { + key = [ key ]; + } + + for (var i = 0; i < key.length; i++) + { + var anim = key[i]; + + if (this.nextAnim === null) + { + this.nextAnim = anim; + } + else + { + this.nextAnimsQueue.push(anim); + } + } + + return this.parent; + }, + + /** + * Returns the key of the animation currently loaded into this component. + * + * Prior to Phaser 3.50 this method was called `getCurrentKey`. + * + * @method Phaser.Animations.AnimationState#getName + * @since 3.50.0 + * + * @return {string} The key of the Animation currently loaded into this component, or an empty string if none loaded. + */ + getName: function () + { + return (this.currentAnim) ? this.currentAnim.key : ''; + }, + + /** + * Returns the key of the animation frame currently displayed by this component. + * + * @method Phaser.Animations.AnimationState#getFrameName + * @since 3.50.0 + * + * @return {string} The key of the Animation Frame currently displayed by this component, or an empty string if no animation has been loaded. + */ + getFrameName: function () + { + return (this.currentFrame) ? this.currentFrame.textureFrame : ''; + }, + + /** + * Internal method used to load an animation into this component. + * + * @method Phaser.Animations.AnimationState#load + * @protected + * @since 3.0.0 + * + * @param {(string|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or a `PlayAnimationConfig` object. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + load: function (key) + { + if (this.isPlaying) + { + this.stop(); + } + + var manager = this.animationManager; + var animKey = (typeof key === 'string') ? key : GetFastValue(key, 'key', null); + + // Get the animation, first from the local map and, if not found, from the Animation Manager + var anim = (this.exists(animKey)) ? this.get(animKey) : manager.get(animKey); + + if (!anim) + { + console.warn('Missing animation: ' + animKey); + } + else + { + this.currentAnim = anim; + + // And now override the animation values, if set in the config. + + var totalFrames = anim.getTotalFrames(); + var frameRate = GetFastValue(key, 'frameRate', anim.frameRate); + var duration = GetFastValue(key, 'duration', anim.duration); + + anim.calculateDuration(this, totalFrames, duration, frameRate); + + this.delay = GetFastValue(key, 'delay', anim.delay); + this.repeat = GetFastValue(key, 'repeat', anim.repeat); + this.repeatDelay = GetFastValue(key, 'repeatDelay', anim.repeatDelay); + this.yoyo = GetFastValue(key, 'yoyo', anim.yoyo); + this.showOnStart = GetFastValue(key, 'showOnStart', anim.showOnStart); + this.hideOnComplete = GetFastValue(key, 'hideOnComplete', anim.hideOnComplete); + this.skipMissedFrames = GetFastValue(key, 'skipMissedFrames', anim.skipMissedFrames); + + this.timeScale = GetFastValue(key, 'timeScale', this.timeScale); + + var startFrame = GetFastValue(key, 'startFrame', 0); + + if (startFrame > anim.getTotalFrames()) + { + startFrame = 0; + } + + var frame = anim.frames[startFrame]; + + if (startFrame === 0 && !this.forward) + { + frame = anim.getLastFrame(); + } + + this.currentFrame = frame; + } + + return this.parent; + }, + + /** + * Pause the current animation and set the `isPlaying` property to `false`. + * You can optionally pause it at a specific frame. + * + * @method Phaser.Animations.AnimationState#pause + * @since 3.0.0 + * + * @param {Phaser.Animations.AnimationFrame} [atFrame] - An optional frame to set after pausing the animation. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + pause: function (atFrame) + { + if (!this._paused) + { + this._paused = true; + this._wasPlaying = this.isPlaying; + this.isPlaying = false; + } + + if (atFrame !== undefined) + { + this.setCurrentFrame(atFrame); + } + + return this.parent; + }, + + /** + * Resumes playback of a paused animation and sets the `isPlaying` property to `true`. + * You can optionally tell it to start playback from a specific frame. + * + * @method Phaser.Animations.AnimationState#resume + * @since 3.0.0 + * + * @param {Phaser.Animations.AnimationFrame} [fromFrame] - An optional frame to set before restarting playback. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + resume: function (fromFrame) + { + if (this._paused) + { + this._paused = false; + this.isPlaying = this._wasPlaying; + } + + if (fromFrame !== undefined) + { + this.setCurrentFrame(fromFrame); + } + + return this.parent; + }, + + /** + * Waits for the specified delay, in milliseconds, then starts playback of the given animation. + * + * If the animation _also_ has a delay value set in its config, it will be **added** to the delay given here. + * + * If an animation is already running and a new animation is given to this method, it will wait for + * the given delay before starting the new animation. + * + * If no animation is currently running, the given one begins after the delay. + * + * Prior to Phaser 3.50 this method was called 'delayedPlay' and the parameters were in the reverse order. + * + * @method Phaser.Animations.AnimationState#playAfterDelay + * @fires Phaser.Animations.Events#ANIMATION_START + * @since 3.50.0 + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {integer} delay - The delay, in milliseconds, to wait before starting the animation playing. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + playAfterDelay: function (key, delay) + { + if (!this.isPlaying) + { + this.delayCounter = delay; + + this.play(key, true); + } + else + { + // If we've got a nextAnim, move it to the queue + var nextAnim = this.nextAnim; + var queue = this.nextAnimsQueue; + + if (nextAnim) + { + queue.unshift(nextAnim); + } + + this.nextAnim = key; + + this._pendingStop = 1; + this._pendingStopValue = delay; + } + + return this.parent; + }, + + /** + * Waits for the current animation to complete the `repeatCount` number of repeat cycles, then starts playback + * of the given animation. + * + * You can use this to ensure there are no harsh jumps between two sets of animations, i.e. going from an + * idle animation to a walking animation, by making them blend smoothly into each other. + * + * If no animation is currently running, the given one will start immediately. + * + * @method Phaser.Animations.AnimationState#playAfterRepeat + * @fires Phaser.Animations.Events#ANIMATION_START + * @since 3.50.0 + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {integer} [repeatCount=1] - How many times should the animation repeat before the next one starts? + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + playAfterRepeat: function (key, repeatCount) + { + if (repeatCount === undefined) { repeatCount = 1; } + + if (!this.isPlaying) + { + this.play(key); + } + else + { + // If we've got a nextAnim, move it to the queue + var nextAnim = this.nextAnim; + var queue = this.nextAnimsQueue; + + if (nextAnim) + { + queue.unshift(nextAnim); + } + + if (this.repeatCounter !== -1 && repeatCount > this.repeatCounter) + { + repeatCount = this.repeatCounter; + } + + this.nextAnim = key; + + this._pendingStop = 2; + this._pendingStopValue = repeatCount; + } + + return this.parent; + }, + + /** + * Start playing the given animation on this Sprite. + * + * Animations in Phaser can either belong to the global Animation Manager, or specifically to this Sprite. + * + * The benefit of a global animation is that multiple Sprites can all play the same animation, without + * having to duplicate the data. You can just create it once and then play it on any Sprite. + * + * The following code shows how to create a global repeating animation. The animation will be created + * from all of the frames within the sprite sheet that was loaded with the key 'muybridge': + * + * ```javascript + * var config = { + * key: 'run', + * frames: 'muybridge', + * frameRate: 15, + * repeat: -1 + * }; + * + * // This code should be run from within a Scene: + * this.anims.create(config); + * ``` + * + * However, if you wish to create an animation that is unique to this Sprite, and this Sprite alone, + * you can call the `Animation.create` method instead. It accepts the exact same parameters as when + * creating a global animation, however the resulting data is kept locally in this Sprite. + * + * With the animation created, either globally or locally, you can now play it on this Sprite: + * + * ```javascript + * this.add.sprite(x, y).play('run'); + * ``` + * + * Alternatively, if you wish to run it at a different frame rate, for example, you can pass a config + * object instead: + * + * ```javascript + * this.add.sprite(x, y).play({ key: 'run', frameRate: 24 }); + * ``` + * + * When playing an animation on a Sprite it will first check to see if it can find a matching key + * locally within the Sprite. If it can, it will play the local animation. If not, it will then + * search the global Animation Manager and look for it there. + * + * If you need a Sprite to be able to play both local and global animations, make sure they don't + * have conflicting keys. + * + * See the documentation for the `PlayAnimationConfig` config object for more details about this. + * + * Also, see the documentation in the Animation Manager for further details on creating animations. + * + * @method Phaser.Animations.AnimationState#play + * @fires Phaser.Animations.Events#ANIMATION_START + * @since 3.0.0 + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + play: function (key, ignoreIfPlaying) + { + if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } + + var currentAnim = this.currentAnim; + var parent = this.parent; + + // Must be either an Animation instance, or a PlayAnimationConfig object + var animKey = (typeof key === 'string') ? key : key.key; + + if (ignoreIfPlaying && this.isPlaying && currentAnim.key === animKey) + { + return parent; + } + + // Are we mixing? + if (currentAnim && this.isPlaying) + { + var mix = this.animationManager.getMix(currentAnim.key, key); + + if (mix > 0) + { + return this.playAfterDelay(key, mix); + } + } + + this.forward = true; + this.inReverse = false; + + this._paused = false; + this._wasPlaying = true; + + return this.startAnimation(key); + }, + + /** + * Start playing the given animation on this Sprite, in reverse. + * + * Animations in Phaser can either belong to the global Animation Manager, or specifically to this Sprite. + * + * The benefit of a global animation is that multiple Sprites can all play the same animation, without + * having to duplicate the data. You can just create it once and then play it on any Sprite. + * + * The following code shows how to create a global repeating animation. The animation will be created + * from all of the frames within the sprite sheet that was loaded with the key 'muybridge': + * + * ```javascript + * var config = { + * key: 'run', + * frames: 'muybridge', + * frameRate: 15, + * repeat: -1 + * }; + * + * // This code should be run from within a Scene: + * this.anims.create(config); + * ``` + * + * However, if you wish to create an animation that is unique to this Sprite, and this Sprite alone, + * you can call the `Animation.create` method instead. It accepts the exact same parameters as when + * creating a global animation, however the resulting data is kept locally in this Sprite. + * + * With the animation created, either globally or locally, you can now play it on this Sprite: + * + * ```javascript + * this.add.sprite(x, y).playReverse('run'); + * ``` + * + * Alternatively, if you wish to run it at a different frame rate, for example, you can pass a config + * object instead: + * + * ```javascript + * this.add.sprite(x, y).playReverse({ key: 'run', frameRate: 24 }); + * ``` + * + * When playing an animation on a Sprite it will first check to see if it can find a matching key + * locally within the Sprite. If it can, it will play the local animation. If not, it will then + * search the global Animation Manager and look for it there. + * + * If you need a Sprite to be able to play both local and global animations, make sure they don't + * have conflicting keys. + * + * See the documentation for the `PlayAnimationConfig` config object for more details about this. + * + * Also, see the documentation in the Animation Manager for further details on creating animations. + * + * @method Phaser.Animations.AnimationState#playReverse + * @fires Phaser.Animations.Events#ANIMATION_START + * @since 3.12.0 + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + playReverse: function (key, ignoreIfPlaying) + { + if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } + + // Must be either an Animation instance, or a PlayAnimationConfig object + var animKey = (typeof key === 'string') ? key : key.key; + + if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === animKey) + { + return this.parent; + } + + this.forward = false; + this.inReverse = true; + + this._paused = false; + this._wasPlaying = true; + + return this.startAnimation(key); + }, + + /** + * Load the animation based on the key and set-up all of the internal values + * needed for playback to start. If there is no delay, it will also fire the start events. + * + * @method Phaser.Animations.AnimationState#startAnimation + * @fires Phaser.Animations.Events#ANIMATION_START + * @since 3.50.0 + * + * @param {(string|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or a `PlayAnimationConfig` object. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + startAnimation: function (key) + { + this.load(key); + + var anim = this.currentAnim; + var gameObject = this.parent; + + if (!anim) + { + return gameObject; + } + + // Should give us 9,007,199,254,740,991 safe repeats + this.repeatCounter = (this.repeat === -1) ? Number.MAX_VALUE : this.repeat; + + anim.getFirstTick(this); + + this.isPlaying = true; + this.pendingRepeat = false; + this.hasStarted = false; + + this._pendingStop = 0; + this._pendingStopValue = 0; + this._paused = false; + + // Add any delay the animation itself may have had as well + this.delayCounter += this.delay; + + if (this.delayCounter === 0) + { + this.handleStart(); + } + + return gameObject; + }, + + /** + * Handles the start of an animation playback. + * + * @method Phaser.Animations.AnimationState#handleStart + * @private + * @since 3.50.0 + */ + handleStart: function () + { + if (this.showOnStart) + { + this.parent.setVisible(true); + } + + this.setCurrentFrame(this.currentFrame); + + this.hasStarted = true; + + this.emitEvents(Events.ANIMATION_START); + }, + + /** + * Handles the repeat of an animation. + * + * @method Phaser.Animations.AnimationState#handleRepeat + * @private + * @since 3.50.0 + */ + handleRepeat: function () + { + this.pendingRepeat = false; + + this.emitEvents(Events.ANIMATION_REPEAT); + }, + + /** + * Handles the stop of an animation playback. + * + * @method Phaser.Animations.AnimationState#handleStop + * @private + * @since 3.50.0 + */ + handleStop: function () + { + this._pendingStop = 0; + + this.isPlaying = false; + + this.emitEvents(Events.ANIMATION_STOP); + }, + + /** + * Handles the completion of an animation playback. + * + * @method Phaser.Animations.AnimationState#handleComplete + * @private + * @since 3.50.0 + */ + handleComplete: function () + { + this._pendingStop = 0; + + this.isPlaying = false; + + if (this.hideOnComplete) + { + this.parent.setVisible(false); + } + + this.emitEvents(Events.ANIMATION_COMPLETE); + }, + + /** + * Fires the given animation event. + * + * @method Phaser.Animations.AnimationState#emitEvents + * @private + * @since 3.50.0 + * + * @param {string} event - The Animation Event to dispatch. + */ + emitEvents: function (event) + { + var anim = this.currentAnim; + var frame = this.currentFrame; + var gameObject = this.parent; + + gameObject.emit(event, anim, frame, gameObject, frame.textureFrame); + }, + + /** + * Reverse the Animation that is already playing on the Game Object. + * + * @method Phaser.Animations.AnimationState#reverse + * @since 3.12.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + reverse: function () + { + if (this.isPlaying) + { + this.inReverse = !this.inReverse; + + this.forward = !this.forward; + } + + return this.parent; + }, + + /** + * Returns a value between 0 and 1 indicating how far this animation is through, ignoring repeats and yoyos. + * + * The value is based on the current frame and how far that is in the animation, it is not based on + * the duration of the animation. + * + * @method Phaser.Animations.AnimationState#getProgress + * @since 3.4.0 + * + * @return {number} The progress of the current animation in frames, between 0 and 1. + */ + getProgress: function () + { + var frame = this.currentFrame; + + if (!frame) + { + return 0; + } + + var p = frame.progress; + + if (this.inReverse) + { + p *= -1; + } + + return p; + }, + + /** + * Takes a value between 0 and 1 and uses it to set how far this animation is through playback. + * + * Does not factor in repeats or yoyos, but does handle playing forwards or backwards. + * + * The value is based on the current frame and how far that is in the animation, it is not based on + * the duration of the animation. + * + * @method Phaser.Animations.AnimationState#setProgress + * @since 3.4.0 + * + * @param {number} [value=0] - The progress value, between 0 and 1. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + setProgress: function (value) + { + if (!this.forward) + { + value = 1 - value; + } + + this.setCurrentFrame(this.currentAnim.getFrameByProgress(value)); + + return this.parent; + }, + + /** + * Sets the number of times that the animation should repeat after its first play through. + * For example, if repeat is 1, the animation will play a total of twice: the initial play plus 1 repeat. + * + * To repeat indefinitely, use -1. + * The value should always be an integer. + * + * Calling this method only works if the animation is already running. Otherwise, any + * value specified here will be overwritten when the next animation loads in. To avoid this, + * use the `repeat` property of the `PlayAnimationConfig` object instead. + * + * @method Phaser.Animations.AnimationState#setRepeat + * @since 3.4.0 + * + * @param {integer} value - The number of times that the animation should repeat. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + setRepeat: function (value) + { + this.repeatCounter = (value === -1) ? Number.MAX_VALUE : value; + + return this.parent; + }, + + /** + * Handle the removal of an animation from the Animation Manager. + * + * @method Phaser.Animations.AnimationState#globalRemove + * @since 3.50.0 + * + * @param {string} [key] - The key of the removed Animation. + * @param {Phaser.Animations.Animation} [animation] - The removed Animation. + */ + globalRemove: function (key, animation) + { + if (animation === undefined) { animation = this.currentAnim; } + + if (this.isPlaying && animation.key === this.currentAnim.key) + { + this.stop(); + + this.setCurrentFrame(this.currentAnim.frames[0]); + } + }, + + /** + * Restarts the current animation from its beginning. + * + * You can optionally reset the delay and repeat counters as well. + * + * Calling this will fire the `ANIMATION_RESTART` event immediately. + * + * If you `includeDelay` then it will also fire the `ANIMATION_START` event once + * the delay has expired, otherwise, playback will just begin immediately. + * + * @method Phaser.Animations.AnimationState#restart + * @fires Phaser.Animations.Events#ANIMATION_RESTART + * @since 3.0.0 + * + * @param {boolean} [includeDelay=false] - Whether to include the delay value of the animation when restarting. + * @param {boolean} [resetRepeats=false] - Whether to reset the repeat counter or not? + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + restart: function (includeDelay, resetRepeats) + { + if (includeDelay === undefined) { includeDelay = false; } + if (resetRepeats === undefined) { resetRepeats = false; } + + var anim = this.currentAnim; + var gameObject = this.parent; + + if (!anim) + { + return gameObject; + } + + if (resetRepeats) + { + this.repeatCounter = (this.repeat === -1) ? Number.MAX_VALUE : this.repeat; + } + + anim.getFirstTick(this); + + this.emitEvents(Events.ANIMATION_RESTART); + + this.isPlaying = true; + this.pendingRepeat = false; + + // Set this to `true` if there is no delay to include, so it skips the `hasStarted` check in `update`. + this.hasStarted = !includeDelay; + + this._pendingStop = 0; + this._pendingStopValue = 0; + this._paused = false; + + this.setCurrentFrame(anim.frames[0]); + + return this.parent; + }, + + /** + * The current animation has completed. This dispatches the `ANIMATION_COMPLETE` event. + * + * This method is called by the Animation instance and should not usually be invoked directly. + * + * If no animation is loaded, no events will be dispatched. + * + * If another animation has been queued for playback, it will be started after the events fire. + * + * @method Phaser.Animations.AnimationState#complete + * @fires Phaser.Animations.Events#ANIMATION_COMPLETE + * @since 3.50.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + complete: function () + { + this._pendingStop = 0; + + this.isPlaying = false; + + if (this.currentAnim) + { + this.handleComplete(); + } + + if (this.nextAnim) + { + var key = this.nextAnim; + + this.nextAnim = (this.nextAnimsQueue.length > 0) ? this.nextAnimsQueue.shift() : null; + + this.play(key); + } + + return this.parent; + }, + + /** + * Immediately stops the current animation from playing and dispatches the `ANIMATION_STOP` event. + * + * If no animation is running, no events will be dispatched. + * + * If there is another animation in the queue (set via the `chain` method) then it will start playing. + * + * @method Phaser.Animations.AnimationState#stop + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @since 3.0.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stop: function () + { + this._pendingStop = 0; + + this.isPlaying = false; + + if (this.currentAnim) + { + this.handleStop(); + } + + if (this.nextAnim) + { + var key = this.nextAnim; + + this.nextAnim = this.nextAnimsQueue.shift(); + + this.play(key); + } + + return this.parent; + }, + + /** + * Stops the current animation from playing after the specified time delay, given in milliseconds. + * + * It then dispatches the `ANIMATION_STOP` event. + * + * If no animation is running, no events will be dispatched. + * + * If there is another animation in the queue (set via the `chain` method) then it will start playing, + * when the current one stops. + * + * @method Phaser.Animations.AnimationState#stopAfterDelay + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @since 3.4.0 + * + * @param {integer} delay - The number of milliseconds to wait before stopping this animation. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stopAfterDelay: function (delay) + { + this._pendingStop = 1; + this._pendingStopValue = delay; + + return this.parent; + }, + + /** + * Stops the current animation from playing when it next repeats. + * + * It then dispatches the `ANIMATION_STOP` event. + * + * If no animation is running, no events will be dispatched. + * + * If there is another animation in the queue (set via the `chain` method) then it will start playing, + * when the current one stops. + * + * Prior to Phaser 3.50 this method was called `stopOnRepeat` and had no parameters. + * + * @method Phaser.Animations.AnimationState#stopAfterRepeat + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @since 3.50.0 + * + * @param {integer} [repeatCount=1] - How many times should the animation repeat before stopping? + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stopAfterRepeat: function (repeatCount) + { + if (repeatCount === undefined) { repeatCount = 1; } + + if (this.repeatCounter !== -1 && repeatCount > this.repeatCounter) + { + repeatCount = this.repeatCounter; + } + + this._pendingStop = 2; + this._pendingStopValue = repeatCount; + + return this.parent; + }, + + /** + * Stops the current animation from playing when it next sets the given frame. + * If this frame doesn't exist within the animation it will not stop it from playing. + * + * It then dispatches the `ANIMATION_STOP` event. + * + * If no animation is running, no events will be dispatched. + * + * If there is another animation in the queue (set via the `chain` method) then it will start playing, + * when the current one stops. + * + * @method Phaser.Animations.AnimationState#stopOnFrame + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @since 3.4.0 + * + * @param {Phaser.Animations.AnimationFrame} frame - The frame to check before stopping this animation. + * + * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. + */ + stopOnFrame: function (frame) + { + this._pendingStop = 3; + this._pendingStopValue = frame; + + return this.parent; + }, + + /** + * Returns the total number of frames in this animation, or returns zero if no + * animation has been loaded. + * + * @method Phaser.Animations.AnimationState#getTotalFrames + * @since 3.4.0 + * + * @return {integer} The total number of frames in the current animation, or zero if no animation has been loaded. + */ + getTotalFrames: function () + { + return (this.currentAnim) ? this.currentAnim.getTotalFrames() : 0; + }, + + /** + * The internal update loop for the AnimationState Component. + * + * This is called automatically by the `Sprite.preUpdate` method. + * + * @method Phaser.Animations.AnimationState#update + * @since 3.0.0 + * + * @param {number} time - The current timestamp. + * @param {number} delta - The delta time, in ms, elapsed since the last frame. + */ + update: function (time, delta) + { + var anim = this.currentAnim; + + if (!this.isPlaying || !anim || anim.paused) + { + return; + } + + this.accumulator += delta * this.timeScale; + + if (this._pendingStop === 1) + { + this._pendingStopValue -= delta; + + if (this._pendingStopValue <= 0) + { + return this.stop(); + } + } + + if (!this.hasStarted) + { + if (this.accumulator >= this.delayCounter) + { + this.accumulator -= this.delayCounter; + + this.handleStart(); + } + } + else if (this.accumulator >= this.nextTick) + { + // Process one frame advance as standard + + if (this.forward) + { + anim.nextFrame(this); + } + else + { + anim.previousFrame(this); + } + + // And only do more if we're skipping frames and have time left + if (this.isPlaying && this._pendingStop === 0 && this.skipMissedFrames && this.accumulator > this.nextTick) + { + var safetyNet = 0; + + do + { + if (this.forward) + { + anim.nextFrame(this); + } + else + { + anim.previousFrame(this); + } + + safetyNet++; + + } while (this.accumulator > this.nextTick && safetyNet < 60); + } + } + }, + + /** + * Sets the given Animation Frame as being the current frame + * and applies it to the parent Game Object, adjusting size and origin as needed. + * + * @method Phaser.Animations.AnimationState#setCurrentFrame + * @fires Phaser.Animations.Events#ANIMATION_UPDATE + * @fires Phaser.Animations.Events#ANIMATION_STOP + * @since 3.4.0 + * + * @param {Phaser.Animations.AnimationFrame} animationFrame - The animation frame to change to. + * + * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. + */ + setCurrentFrame: function (animationFrame) + { + var gameObject = this.parent; + + this.currentFrame = animationFrame; + + gameObject.texture = animationFrame.frame.texture; + gameObject.frame = animationFrame.frame; + + if (gameObject.isCropped) + { + gameObject.frame.updateCropUVs(gameObject._crop, gameObject.flipX, gameObject.flipY); + } + + if (animationFrame.setAlpha) + { + gameObject.alpha = animationFrame.alpha; + } + + gameObject.setSizeToFrame(); + + if (gameObject._originComponent) + { + if (animationFrame.frame.customPivot) + { + gameObject.setOrigin(animationFrame.frame.pivotX, animationFrame.frame.pivotY); + } + else + { + gameObject.updateDisplayOrigin(); + } + } + + if (this.isPlaying && this.hasStarted) + { + this.emitEvents(Events.ANIMATION_UPDATE); + + if (this._pendingStop === 3 && this._pendingStopValue === animationFrame) + { + this.stop(); + } + } + + return gameObject; + }, + + /** + * Advances the animation to the next frame, regardless of the time or animation state. + * If the animation is set to repeat, or yoyo, this will still take effect. + * + * Calling this does not change the direction of the animation. I.e. if it was currently + * playing in reverse, calling this method doesn't then change the direction to forwards. + * + * @method Phaser.Animations.AnimationState#nextFrame + * @since 3.16.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. + */ + nextFrame: function () + { + if (this.currentAnim) + { + this.currentAnim.nextFrame(this); + } + + return this.parent; + }, + + /** + * Advances the animation to the previous frame, regardless of the time or animation state. + * If the animation is set to repeat, or yoyo, this will still take effect. + * + * Calling this does not change the direction of the animation. I.e. if it was currently + * playing in forwards, calling this method doesn't then change the direction to backwards. + * + * @method Phaser.Animations.AnimationState#previousFrame + * @since 3.16.0 + * + * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. + */ + previousFrame: function () + { + if (this.currentAnim) + { + this.currentAnim.previousFrame(this); + } + + return this.parent; + }, + + /** + * Get an Animation instance that has been created locally on this Sprite. + * + * See the `create` method for more details. + * + * @method Phaser.Animations.AnimationState#get + * @since 3.50.0 + * + * @param {string} key - The key of the Animation to retrieve. + * + * @return {Phaser.Animations.Animation} The Animation, or `undefined` if the key is invalid. + */ + get: function (key) + { + return (this.anims && this.anims.get(key)); + }, + + /** + * Checks to see if the given key is already used locally within the animations stored on this Sprite. + * + * @method Phaser.Animations.AnimationState#exists + * @since 3.50.0 + * + * @param {string} key - The key of the Animation to check. + * + * @return {boolean} `true` if the Animation exists locally, or `false` if the key is available. + */ + exists: function (key) + { + return (this.anims && this.anims.has(key)); + }, + + /** + * Creates a new Animation that is local specifically to this Sprite. + * + * When a Sprite owns an animation, it is kept out of the global Animation Manager, which means + * you're free to use keys that may be already defined there. Unless you specifically need a Sprite + * to have a unique animation, you should favor using global animations instead, as they allow for + * the same animation to be used across multiple Sprites, saving on memory. However, if this Sprite + * is the only one to use this animation, it's sensible to create it here. + * + * If an invalid key is given this method will return `false`. + * + * If you pass the key of an animation that already exists locally, that animation will be returned. + * + * A brand new animation is only created if the key is valid and not already in use by this Sprite. + * + * If you wish to re-use an existing key, call the `remove` method first, then this method. + * + * @method Phaser.Animations.AnimationState#create + * @since 3.50.0 + * + * @param {Phaser.Types.Animations.Animation} config - The configuration settings for the Animation. + * + * @return {(Phaser.Animations.Animation|false)} The Animation that was created, or `false` if the key is already in use. + */ + create: function (config) + { + var key = config.key; + + var anim = false; + + if (key) + { + anim = this.get(key); + + if (!anim) + { + anim = new Animation(this, key, config); + + if (!this.anims) + { + this.anims = new CustomMap(); + } + + this.anims.set(key, anim); + } + } + + return anim; + }, + + /** + * Removes a locally created Animation from this Sprite, based on the given key. + * + * Once an Animation has been removed, this Sprite cannot play it again without re-creating it. + * + * @method Phaser.Animations.AnimationState#remove + * @since 3.50.0 + * + * @param {string} key - The key of the animation to remove. + * + * @return {Phaser.Animations.Animation} The Animation instance that was removed from this Sprite, if the key was valid. + */ + remove: function (key) + { + var anim = this.get(key); + + if (anim) + { + if (this.currentAnim === anim) + { + this.stop(); + } + + this.anims.delete(key); + } + + return anim; + }, + + /** + * Destroy this Animation component. + * + * Unregisters event listeners and cleans up its references. + * + * @method Phaser.Animations.AnimationState#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.animationManager.off(Events.REMOVE_ANIMATION, this.globalRemove, this); + + if (this.anims) + { + this.anims.clear(); + } + + this.animationManager = null; + this.parent = null; + this.nextAnim = null; + this.nextAnimsQueue.length = 0; + + this.currentAnim = null; + this.currentFrame = null; + }, + + /** + * `true` if the current animation is paused, otherwise `false`. + * + * @name Phaser.Animations.AnimationState#isPaused + * @readonly + * @type {boolean} + * @since 3.4.0 + */ + isPaused: { + + get: function () + { + return this._paused; + } + + } + +}); + +module.exports = AnimationState; + + +/***/ }), +/* 249 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57978,7 +60647,7 @@ var Sleeping = {}; module.exports = Sleeping; -var Events = __webpack_require__(244); +var Events = __webpack_require__(250); (function() { @@ -58100,7 +60769,7 @@ var Events = __webpack_require__(244); /***/ }), -/* 244 */ +/* 250 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58115,7 +60784,7 @@ var Events = {}; module.exports = Events; -var Common = __webpack_require__(43); +var Common = __webpack_require__(44); (function() { @@ -58218,7 +60887,7 @@ var Common = __webpack_require__(43); /***/ }), -/* 245 */ +/* 251 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58233,65 +60902,65 @@ var Common = __webpack_require__(43); module.exports = { - AlignTo: __webpack_require__(531), - Angle: __webpack_require__(532), - Call: __webpack_require__(533), - GetFirst: __webpack_require__(534), - GetLast: __webpack_require__(535), - GridAlign: __webpack_require__(536), - IncAlpha: __webpack_require__(597), - IncX: __webpack_require__(598), - IncXY: __webpack_require__(599), - IncY: __webpack_require__(600), - PlaceOnCircle: __webpack_require__(601), - PlaceOnEllipse: __webpack_require__(602), - PlaceOnLine: __webpack_require__(603), - PlaceOnRectangle: __webpack_require__(604), - PlaceOnTriangle: __webpack_require__(605), - PlayAnimation: __webpack_require__(606), - PropertyValueInc: __webpack_require__(38), + AlignTo: __webpack_require__(553), + Angle: __webpack_require__(554), + Call: __webpack_require__(555), + GetFirst: __webpack_require__(556), + GetLast: __webpack_require__(557), + GridAlign: __webpack_require__(558), + IncAlpha: __webpack_require__(603), + IncX: __webpack_require__(604), + IncXY: __webpack_require__(605), + IncY: __webpack_require__(606), + PlaceOnCircle: __webpack_require__(607), + PlaceOnEllipse: __webpack_require__(608), + PlaceOnLine: __webpack_require__(609), + PlaceOnRectangle: __webpack_require__(610), + PlaceOnTriangle: __webpack_require__(611), + PlayAnimation: __webpack_require__(612), + PropertyValueInc: __webpack_require__(39), PropertyValueSet: __webpack_require__(25), - RandomCircle: __webpack_require__(607), - RandomEllipse: __webpack_require__(608), - RandomLine: __webpack_require__(609), - RandomRectangle: __webpack_require__(610), - RandomTriangle: __webpack_require__(611), - Rotate: __webpack_require__(612), - RotateAround: __webpack_require__(613), - RotateAroundDistance: __webpack_require__(614), - ScaleX: __webpack_require__(615), - ScaleXY: __webpack_require__(616), - ScaleY: __webpack_require__(617), - SetAlpha: __webpack_require__(618), - SetBlendMode: __webpack_require__(619), - SetDepth: __webpack_require__(620), - SetHitArea: __webpack_require__(621), - SetOrigin: __webpack_require__(622), - SetRotation: __webpack_require__(623), - SetScale: __webpack_require__(624), - SetScaleX: __webpack_require__(625), - SetScaleY: __webpack_require__(626), - SetScrollFactor: __webpack_require__(627), - SetScrollFactorX: __webpack_require__(628), - SetScrollFactorY: __webpack_require__(629), - SetTint: __webpack_require__(630), - SetVisible: __webpack_require__(631), - SetX: __webpack_require__(632), - SetXY: __webpack_require__(633), - SetY: __webpack_require__(634), - ShiftPosition: __webpack_require__(635), - Shuffle: __webpack_require__(636), - SmootherStep: __webpack_require__(637), - SmoothStep: __webpack_require__(638), - Spread: __webpack_require__(639), - ToggleVisible: __webpack_require__(640), - WrapInRectangle: __webpack_require__(641) + RandomCircle: __webpack_require__(613), + RandomEllipse: __webpack_require__(614), + RandomLine: __webpack_require__(615), + RandomRectangle: __webpack_require__(616), + RandomTriangle: __webpack_require__(617), + Rotate: __webpack_require__(618), + RotateAround: __webpack_require__(619), + RotateAroundDistance: __webpack_require__(620), + ScaleX: __webpack_require__(621), + ScaleXY: __webpack_require__(622), + ScaleY: __webpack_require__(623), + SetAlpha: __webpack_require__(624), + SetBlendMode: __webpack_require__(625), + SetDepth: __webpack_require__(626), + SetHitArea: __webpack_require__(627), + SetOrigin: __webpack_require__(628), + SetRotation: __webpack_require__(629), + SetScale: __webpack_require__(630), + SetScaleX: __webpack_require__(631), + SetScaleY: __webpack_require__(632), + SetScrollFactor: __webpack_require__(633), + SetScrollFactorX: __webpack_require__(634), + SetScrollFactorY: __webpack_require__(635), + SetTint: __webpack_require__(636), + SetVisible: __webpack_require__(637), + SetX: __webpack_require__(638), + SetXY: __webpack_require__(639), + SetY: __webpack_require__(640), + ShiftPosition: __webpack_require__(641), + Shuffle: __webpack_require__(642), + SmootherStep: __webpack_require__(643), + SmoothStep: __webpack_require__(644), + Spread: __webpack_require__(645), + ToggleVisible: __webpack_require__(646), + WrapInRectangle: __webpack_require__(647) }; /***/ }), -/* 246 */ +/* 252 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58300,22 +60969,22 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ALIGN_CONST = __webpack_require__(106); +var ALIGN_CONST = __webpack_require__(107); var AlignToMap = []; -AlignToMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(247); -AlignToMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(248); -AlignToMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(249); -AlignToMap[ALIGN_CONST.LEFT_BOTTOM] = __webpack_require__(250); -AlignToMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(251); -AlignToMap[ALIGN_CONST.LEFT_TOP] = __webpack_require__(252); -AlignToMap[ALIGN_CONST.RIGHT_BOTTOM] = __webpack_require__(253); -AlignToMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(254); -AlignToMap[ALIGN_CONST.RIGHT_TOP] = __webpack_require__(255); -AlignToMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(256); -AlignToMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(257); -AlignToMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(258); +AlignToMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(253); +AlignToMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(254); +AlignToMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(255); +AlignToMap[ALIGN_CONST.LEFT_BOTTOM] = __webpack_require__(256); +AlignToMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(257); +AlignToMap[ALIGN_CONST.LEFT_TOP] = __webpack_require__(258); +AlignToMap[ALIGN_CONST.RIGHT_BOTTOM] = __webpack_require__(259); +AlignToMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(260); +AlignToMap[ALIGN_CONST.RIGHT_TOP] = __webpack_require__(261); +AlignToMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(262); +AlignToMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(263); +AlignToMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(264); /** * Takes a Game Object and aligns it next to another, at the given position. @@ -58343,7 +61012,7 @@ module.exports = QuickSet; /***/ }), -/* 247 */ +/* 253 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58352,10 +61021,10 @@ module.exports = QuickSet; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetBottom = __webpack_require__(34); -var GetCenterX = __webpack_require__(76); -var SetCenterX = __webpack_require__(77); -var SetTop = __webpack_require__(44); +var GetBottom = __webpack_require__(35); +var GetCenterX = __webpack_require__(77); +var SetCenterX = __webpack_require__(78); +var SetTop = __webpack_require__(45); /** * Takes given Game Object and aligns it so that it is positioned next to the bottom center position of the other. @@ -58387,7 +61056,7 @@ module.exports = BottomCenter; /***/ }), -/* 248 */ +/* 254 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58396,10 +61065,10 @@ module.exports = BottomCenter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetBottom = __webpack_require__(34); -var GetLeft = __webpack_require__(35); -var SetLeft = __webpack_require__(45); -var SetTop = __webpack_require__(44); +var GetBottom = __webpack_require__(35); +var GetLeft = __webpack_require__(36); +var SetLeft = __webpack_require__(46); +var SetTop = __webpack_require__(45); /** * Takes given Game Object and aligns it so that it is positioned next to the bottom left position of the other. @@ -58431,7 +61100,7 @@ module.exports = BottomLeft; /***/ }), -/* 249 */ +/* 255 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58440,10 +61109,10 @@ module.exports = BottomLeft; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetBottom = __webpack_require__(34); -var GetRight = __webpack_require__(36); -var SetRight = __webpack_require__(46); -var SetTop = __webpack_require__(44); +var GetBottom = __webpack_require__(35); +var GetRight = __webpack_require__(37); +var SetRight = __webpack_require__(47); +var SetTop = __webpack_require__(45); /** * Takes given Game Object and aligns it so that it is positioned next to the bottom right position of the other. @@ -58475,7 +61144,7 @@ module.exports = BottomRight; /***/ }), -/* 250 */ +/* 256 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58484,10 +61153,10 @@ module.exports = BottomRight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetBottom = __webpack_require__(34); -var GetLeft = __webpack_require__(35); -var SetBottom = __webpack_require__(47); -var SetRight = __webpack_require__(46); +var GetBottom = __webpack_require__(35); +var GetLeft = __webpack_require__(36); +var SetBottom = __webpack_require__(48); +var SetRight = __webpack_require__(47); /** * Takes given Game Object and aligns it so that it is positioned next to the left bottom position of the other. @@ -58519,7 +61188,7 @@ module.exports = LeftBottom; /***/ }), -/* 251 */ +/* 257 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58528,10 +61197,10 @@ module.exports = LeftBottom; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetCenterY = __webpack_require__(78); -var GetLeft = __webpack_require__(35); -var SetCenterY = __webpack_require__(79); -var SetRight = __webpack_require__(46); +var GetCenterY = __webpack_require__(79); +var GetLeft = __webpack_require__(36); +var SetCenterY = __webpack_require__(80); +var SetRight = __webpack_require__(47); /** * Takes given Game Object and aligns it so that it is positioned next to the left center position of the other. @@ -58563,7 +61232,7 @@ module.exports = LeftCenter; /***/ }), -/* 252 */ +/* 258 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58572,10 +61241,10 @@ module.exports = LeftCenter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLeft = __webpack_require__(35); -var GetTop = __webpack_require__(37); -var SetRight = __webpack_require__(46); -var SetTop = __webpack_require__(44); +var GetLeft = __webpack_require__(36); +var GetTop = __webpack_require__(38); +var SetRight = __webpack_require__(47); +var SetTop = __webpack_require__(45); /** * Takes given Game Object and aligns it so that it is positioned next to the left top position of the other. @@ -58607,7 +61276,7 @@ module.exports = LeftTop; /***/ }), -/* 253 */ +/* 259 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58616,10 +61285,10 @@ module.exports = LeftTop; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetBottom = __webpack_require__(34); -var GetRight = __webpack_require__(36); -var SetBottom = __webpack_require__(47); -var SetLeft = __webpack_require__(45); +var GetBottom = __webpack_require__(35); +var GetRight = __webpack_require__(37); +var SetBottom = __webpack_require__(48); +var SetLeft = __webpack_require__(46); /** * Takes given Game Object and aligns it so that it is positioned next to the right bottom position of the other. @@ -58651,7 +61320,7 @@ module.exports = RightBottom; /***/ }), -/* 254 */ +/* 260 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58660,10 +61329,10 @@ module.exports = RightBottom; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetCenterY = __webpack_require__(78); -var GetRight = __webpack_require__(36); -var SetCenterY = __webpack_require__(79); -var SetLeft = __webpack_require__(45); +var GetCenterY = __webpack_require__(79); +var GetRight = __webpack_require__(37); +var SetCenterY = __webpack_require__(80); +var SetLeft = __webpack_require__(46); /** * Takes given Game Object and aligns it so that it is positioned next to the right center position of the other. @@ -58695,7 +61364,7 @@ module.exports = RightCenter; /***/ }), -/* 255 */ +/* 261 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58704,10 +61373,10 @@ module.exports = RightCenter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetRight = __webpack_require__(36); -var GetTop = __webpack_require__(37); -var SetLeft = __webpack_require__(45); -var SetTop = __webpack_require__(44); +var GetRight = __webpack_require__(37); +var GetTop = __webpack_require__(38); +var SetLeft = __webpack_require__(46); +var SetTop = __webpack_require__(45); /** * Takes given Game Object and aligns it so that it is positioned next to the right top position of the other. @@ -58739,7 +61408,7 @@ module.exports = RightTop; /***/ }), -/* 256 */ +/* 262 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58748,10 +61417,10 @@ module.exports = RightTop; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetCenterX = __webpack_require__(76); -var GetTop = __webpack_require__(37); -var SetBottom = __webpack_require__(47); -var SetCenterX = __webpack_require__(77); +var GetCenterX = __webpack_require__(77); +var GetTop = __webpack_require__(38); +var SetBottom = __webpack_require__(48); +var SetCenterX = __webpack_require__(78); /** * Takes given Game Object and aligns it so that it is positioned next to the top center position of the other. @@ -58783,7 +61452,7 @@ module.exports = TopCenter; /***/ }), -/* 257 */ +/* 263 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58792,10 +61461,10 @@ module.exports = TopCenter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLeft = __webpack_require__(35); -var GetTop = __webpack_require__(37); -var SetBottom = __webpack_require__(47); -var SetLeft = __webpack_require__(45); +var GetLeft = __webpack_require__(36); +var GetTop = __webpack_require__(38); +var SetBottom = __webpack_require__(48); +var SetLeft = __webpack_require__(46); /** * Takes given Game Object and aligns it so that it is positioned next to the top left position of the other. @@ -58827,7 +61496,7 @@ module.exports = TopLeft; /***/ }), -/* 258 */ +/* 264 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58836,10 +61505,10 @@ module.exports = TopLeft; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetRight = __webpack_require__(36); -var GetTop = __webpack_require__(37); -var SetBottom = __webpack_require__(47); -var SetRight = __webpack_require__(46); +var GetRight = __webpack_require__(37); +var GetTop = __webpack_require__(38); +var SetBottom = __webpack_require__(48); +var SetRight = __webpack_require__(47); /** * Takes given Game Object and aligns it so that it is positioned next to the top right position of the other. @@ -58871,7 +61540,7 @@ module.exports = TopRight; /***/ }), -/* 259 */ +/* 265 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58880,19 +61549,19 @@ module.exports = TopRight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ALIGN_CONST = __webpack_require__(106); +var ALIGN_CONST = __webpack_require__(107); var AlignInMap = []; -AlignInMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(260); -AlignInMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(261); -AlignInMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(262); -AlignInMap[ALIGN_CONST.CENTER] = __webpack_require__(263); -AlignInMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(265); -AlignInMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(266); -AlignInMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(267); -AlignInMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(268); -AlignInMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(269); +AlignInMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(266); +AlignInMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(267); +AlignInMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(268); +AlignInMap[ALIGN_CONST.CENTER] = __webpack_require__(269); +AlignInMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(271); +AlignInMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(272); +AlignInMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(273); +AlignInMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(274); +AlignInMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(275); AlignInMap[ALIGN_CONST.LEFT_BOTTOM] = AlignInMap[ALIGN_CONST.BOTTOM_LEFT]; AlignInMap[ALIGN_CONST.LEFT_TOP] = AlignInMap[ALIGN_CONST.TOP_LEFT]; AlignInMap[ALIGN_CONST.RIGHT_BOTTOM] = AlignInMap[ALIGN_CONST.BOTTOM_RIGHT]; @@ -58924,7 +61593,7 @@ module.exports = QuickSet; /***/ }), -/* 260 */ +/* 266 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58933,10 +61602,10 @@ module.exports = QuickSet; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetBottom = __webpack_require__(34); -var GetCenterX = __webpack_require__(76); -var SetBottom = __webpack_require__(47); -var SetCenterX = __webpack_require__(77); +var GetBottom = __webpack_require__(35); +var GetCenterX = __webpack_require__(77); +var SetBottom = __webpack_require__(48); +var SetCenterX = __webpack_require__(78); /** * Takes given Game Object and aligns it so that it is positioned in the bottom center of the other. @@ -58968,7 +61637,7 @@ module.exports = BottomCenter; /***/ }), -/* 261 */ +/* 267 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58977,10 +61646,10 @@ module.exports = BottomCenter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetBottom = __webpack_require__(34); -var GetLeft = __webpack_require__(35); -var SetBottom = __webpack_require__(47); -var SetLeft = __webpack_require__(45); +var GetBottom = __webpack_require__(35); +var GetLeft = __webpack_require__(36); +var SetBottom = __webpack_require__(48); +var SetLeft = __webpack_require__(46); /** * Takes given Game Object and aligns it so that it is positioned in the bottom left of the other. @@ -59012,7 +61681,7 @@ module.exports = BottomLeft; /***/ }), -/* 262 */ +/* 268 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59021,10 +61690,10 @@ module.exports = BottomLeft; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetBottom = __webpack_require__(34); -var GetRight = __webpack_require__(36); -var SetBottom = __webpack_require__(47); -var SetRight = __webpack_require__(46); +var GetBottom = __webpack_require__(35); +var GetRight = __webpack_require__(37); +var SetBottom = __webpack_require__(48); +var SetRight = __webpack_require__(47); /** * Takes given Game Object and aligns it so that it is positioned in the bottom right of the other. @@ -59056,7 +61725,7 @@ module.exports = BottomRight; /***/ }), -/* 263 */ +/* 269 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59065,9 +61734,9 @@ module.exports = BottomRight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CenterOn = __webpack_require__(264); -var GetCenterX = __webpack_require__(76); -var GetCenterY = __webpack_require__(78); +var CenterOn = __webpack_require__(270); +var GetCenterX = __webpack_require__(77); +var GetCenterY = __webpack_require__(79); /** * Takes given Game Object and aligns it so that it is positioned in the center of the other. @@ -59098,7 +61767,7 @@ module.exports = Center; /***/ }), -/* 264 */ +/* 270 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59107,8 +61776,8 @@ module.exports = Center; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetCenterX = __webpack_require__(77); -var SetCenterY = __webpack_require__(79); +var SetCenterX = __webpack_require__(78); +var SetCenterY = __webpack_require__(80); /** * Positions the Game Object so that it is centered on the given coordinates. @@ -59135,7 +61804,7 @@ module.exports = CenterOn; /***/ }), -/* 265 */ +/* 271 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59144,10 +61813,10 @@ module.exports = CenterOn; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetCenterY = __webpack_require__(78); -var GetLeft = __webpack_require__(35); -var SetCenterY = __webpack_require__(79); -var SetLeft = __webpack_require__(45); +var GetCenterY = __webpack_require__(79); +var GetLeft = __webpack_require__(36); +var SetCenterY = __webpack_require__(80); +var SetLeft = __webpack_require__(46); /** * Takes given Game Object and aligns it so that it is positioned in the left center of the other. @@ -59179,7 +61848,7 @@ module.exports = LeftCenter; /***/ }), -/* 266 */ +/* 272 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59188,10 +61857,10 @@ module.exports = LeftCenter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetCenterY = __webpack_require__(78); -var GetRight = __webpack_require__(36); -var SetCenterY = __webpack_require__(79); -var SetRight = __webpack_require__(46); +var GetCenterY = __webpack_require__(79); +var GetRight = __webpack_require__(37); +var SetCenterY = __webpack_require__(80); +var SetRight = __webpack_require__(47); /** * Takes given Game Object and aligns it so that it is positioned in the right center of the other. @@ -59223,7 +61892,7 @@ module.exports = RightCenter; /***/ }), -/* 267 */ +/* 273 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59232,10 +61901,10 @@ module.exports = RightCenter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetCenterX = __webpack_require__(76); -var GetTop = __webpack_require__(37); -var SetCenterX = __webpack_require__(77); -var SetTop = __webpack_require__(44); +var GetCenterX = __webpack_require__(77); +var GetTop = __webpack_require__(38); +var SetCenterX = __webpack_require__(78); +var SetTop = __webpack_require__(45); /** * Takes given Game Object and aligns it so that it is positioned in the top center of the other. @@ -59267,7 +61936,7 @@ module.exports = TopCenter; /***/ }), -/* 268 */ +/* 274 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59276,10 +61945,10 @@ module.exports = TopCenter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLeft = __webpack_require__(35); -var GetTop = __webpack_require__(37); -var SetLeft = __webpack_require__(45); -var SetTop = __webpack_require__(44); +var GetLeft = __webpack_require__(36); +var GetTop = __webpack_require__(38); +var SetLeft = __webpack_require__(46); +var SetTop = __webpack_require__(45); /** * Takes given Game Object and aligns it so that it is positioned in the top left of the other. @@ -59311,7 +61980,7 @@ module.exports = TopLeft; /***/ }), -/* 269 */ +/* 275 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59320,10 +61989,10 @@ module.exports = TopLeft; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetRight = __webpack_require__(36); -var GetTop = __webpack_require__(37); -var SetRight = __webpack_require__(46); -var SetTop = __webpack_require__(44); +var GetRight = __webpack_require__(37); +var GetTop = __webpack_require__(38); +var SetRight = __webpack_require__(47); +var SetTop = __webpack_require__(45); /** * Takes given Game Object and aligns it so that it is positioned in the top right of the other. @@ -59355,7 +62024,7 @@ module.exports = TopRight; /***/ }), -/* 270 */ +/* 276 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59364,8 +62033,8 @@ module.exports = TopRight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CircumferencePoint = __webpack_require__(154); -var FromPercent = __webpack_require__(88); +var CircumferencePoint = __webpack_require__(157); +var FromPercent = __webpack_require__(89); var MATH_CONST = __webpack_require__(13); var Point = __webpack_require__(4); @@ -59398,7 +62067,7 @@ module.exports = GetPoint; /***/ }), -/* 271 */ +/* 277 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59407,9 +62076,9 @@ module.exports = GetPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circumference = __webpack_require__(272); -var CircumferencePoint = __webpack_require__(154); -var FromPercent = __webpack_require__(88); +var Circumference = __webpack_require__(278); +var CircumferencePoint = __webpack_require__(157); +var FromPercent = __webpack_require__(89); var MATH_CONST = __webpack_require__(13); /** @@ -59450,7 +62119,7 @@ module.exports = GetPoints; /***/ }), -/* 272 */ +/* 278 */ /***/ (function(module, exports) { /** @@ -59478,7 +62147,7 @@ module.exports = Circumference; /***/ }), -/* 273 */ +/* 279 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59588,91 +62257,7 @@ module.exports = AlphaSingle; /***/ }), -/* 274 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Searches a pre-sorted array for the closet value to the given number. - * - * If the `key` argument is given it will assume the array contains objects that all have the required `key` property name, - * and will check for the closest value of those to the given number. - * - * @function Phaser.Utils.Array.FindClosestInSorted - * @since 3.0.0 - * - * @param {number} value - The value to search for in the array. - * @param {array} array - The array to search, which must be sorted. - * @param {string} [key] - An optional property key. If specified the array elements property will be checked against value. - * - * @return {(number|any)} The nearest value found in the array, or if a `key` was given, the nearest object with the matching property value. - */ -var FindClosestInSorted = function (value, array, key) -{ - if (!array.length) - { - return NaN; - } - else if (array.length === 1) - { - return array[0]; - } - - var i = 1; - var low; - var high; - - if (key) - { - if (value < array[0][key]) - { - return array[0]; - } - - while (array[i][key] < value) - { - i++; - } - } - else - { - while (array[i] < value) - { - i++; - } - } - - if (i > array.length) - { - i = array.length; - } - - if (key) - { - low = array[i - 1][key]; - high = array[i][key]; - - return ((high - value) <= (value - low)) ? array[i] : array[i - 1]; - } - else - { - low = array[i - 1]; - high = array[i]; - - return ((high - value) <= (value - low)) ? high : low; - } -}; - -module.exports = FindClosestInSorted; - - -/***/ }), -/* 275 */ +/* 280 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59681,181 +62266,7 @@ module.exports = FindClosestInSorted; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Class = __webpack_require__(0); - -/** - * @classdesc - * A single frame in an Animation sequence. - * - * An AnimationFrame consists of a reference to the Texture it uses for rendering, references to other - * frames in the animation, and index data. It also has the ability to modify the animation timing. - * - * AnimationFrames are generated automatically by the Animation class. - * - * @class AnimationFrame - * @memberof Phaser.Animations - * @constructor - * @since 3.0.0 - * - * @param {string} textureKey - The key of the Texture this AnimationFrame uses. - * @param {(string|integer)} textureFrame - The key of the Frame within the Texture that this AnimationFrame uses. - * @param {integer} index - The index of this AnimationFrame within the Animation sequence. - * @param {Phaser.Textures.Frame} frame - A reference to the Texture Frame this AnimationFrame uses for rendering. - */ -var AnimationFrame = new Class({ - - initialize: - - function AnimationFrame (textureKey, textureFrame, index, frame) - { - /** - * The key of the Texture this AnimationFrame uses. - * - * @name Phaser.Animations.AnimationFrame#textureKey - * @type {string} - * @since 3.0.0 - */ - this.textureKey = textureKey; - - /** - * The key of the Frame within the Texture that this AnimationFrame uses. - * - * @name Phaser.Animations.AnimationFrame#textureFrame - * @type {(string|integer)} - * @since 3.0.0 - */ - this.textureFrame = textureFrame; - - /** - * The index of this AnimationFrame within the Animation sequence. - * - * @name Phaser.Animations.AnimationFrame#index - * @type {integer} - * @since 3.0.0 - */ - this.index = index; - - /** - * A reference to the Texture Frame this AnimationFrame uses for rendering. - * - * @name Phaser.Animations.AnimationFrame#frame - * @type {Phaser.Textures.Frame} - * @since 3.0.0 - */ - this.frame = frame; - - /** - * Is this the first frame in an animation sequence? - * - * @name Phaser.Animations.AnimationFrame#isFirst - * @type {boolean} - * @default false - * @readonly - * @since 3.0.0 - */ - this.isFirst = false; - - /** - * Is this the last frame in an animation sequence? - * - * @name Phaser.Animations.AnimationFrame#isLast - * @type {boolean} - * @default false - * @readonly - * @since 3.0.0 - */ - this.isLast = false; - - /** - * A reference to the AnimationFrame that comes before this one in the animation, if any. - * - * @name Phaser.Animations.AnimationFrame#prevFrame - * @type {?Phaser.Animations.AnimationFrame} - * @default null - * @readonly - * @since 3.0.0 - */ - this.prevFrame = null; - - /** - * A reference to the AnimationFrame that comes after this one in the animation, if any. - * - * @name Phaser.Animations.AnimationFrame#nextFrame - * @type {?Phaser.Animations.AnimationFrame} - * @default null - * @readonly - * @since 3.0.0 - */ - this.nextFrame = null; - - /** - * Additional time (in ms) that this frame should appear for during playback. - * The value is added onto the msPerFrame set by the animation. - * - * @name Phaser.Animations.AnimationFrame#duration - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.duration = 0; - - /** - * What % through the animation does this frame come? - * This value is generated when the animation is created and cached here. - * - * @name Phaser.Animations.AnimationFrame#progress - * @type {number} - * @default 0 - * @readonly - * @since 3.0.0 - */ - this.progress = 0; - }, - - /** - * Generates a JavaScript object suitable for converting to JSON. - * - * @method Phaser.Animations.AnimationFrame#toJSON - * @since 3.0.0 - * - * @return {Phaser.Types.Animations.JSONAnimationFrame} The AnimationFrame data. - */ - toJSON: function () - { - return { - key: this.textureKey, - frame: this.textureFrame, - duration: this.duration - }; - }, - - /** - * Destroys this object by removing references to external resources and callbacks. - * - * @method Phaser.Animations.AnimationFrame#destroy - * @since 3.0.0 - */ - destroy: function () - { - this.frame = undefined; - } - -}); - -module.exports = AnimationFrame; - - -/***/ }), -/* 276 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var BlendModes = __webpack_require__(53); +var BlendModes = __webpack_require__(54); /** * Provides methods used for setting the blend mode of a Game Object. @@ -59968,7 +62379,7 @@ module.exports = BlendMode; /***/ }), -/* 277 */ +/* 281 */ /***/ (function(module, exports) { /** @@ -60061,7 +62472,7 @@ module.exports = Depth; /***/ }), -/* 278 */ +/* 282 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60070,7 +62481,7 @@ module.exports = Depth; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetPoint = __webpack_require__(157); +var GetPoint = __webpack_require__(159); var Perimeter = __webpack_require__(116); // Return an array of points from the perimeter of the rectangle @@ -60115,7 +62526,7 @@ module.exports = GetPoints; /***/ }), -/* 279 */ +/* 283 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60154,7 +62565,7 @@ module.exports = GetPoint; /***/ }), -/* 280 */ +/* 284 */ /***/ (function(module, exports) { /** @@ -60198,7 +62609,7 @@ module.exports = RotateAround; /***/ }), -/* 281 */ +/* 285 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60207,8 +62618,8 @@ module.exports = RotateAround; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapMask = __webpack_require__(282); -var GeometryMask = __webpack_require__(283); +var BitmapMask = __webpack_require__(286); +var GeometryMask = __webpack_require__(287); /** * Provides methods used for getting and setting the mask of a Game Object. @@ -60345,7 +62756,7 @@ module.exports = Mask; /***/ }), -/* 282 */ +/* 286 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60355,7 +62766,7 @@ module.exports = Mask; */ var Class = __webpack_require__(0); -var GameEvents = __webpack_require__(20); +var GameEvents = __webpack_require__(21); /** * @classdesc @@ -60638,7 +63049,7 @@ module.exports = BitmapMask; /***/ }), -/* 283 */ +/* 287 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60953,7 +63364,7 @@ module.exports = GeometryMask; /***/ }), -/* 284 */ +/* 288 */ /***/ (function(module, exports) { /** @@ -61060,7 +63471,7 @@ module.exports = ScrollFactor; /***/ }), -/* 285 */ +/* 289 */ /***/ (function(module, exports) { /** @@ -61121,7 +63532,7 @@ module.exports = ToJSON; /***/ }), -/* 286 */ +/* 290 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61131,10 +63542,10 @@ module.exports = ToJSON; */ var MATH_CONST = __webpack_require__(13); -var TransformMatrix = __webpack_require__(30); -var TransformXY = __webpack_require__(162); -var WrapAngle = __webpack_require__(241); -var WrapAngleDegrees = __webpack_require__(242); +var TransformMatrix = __webpack_require__(31); +var TransformXY = __webpack_require__(164); +var WrapAngle = __webpack_require__(246); +var WrapAngleDegrees = __webpack_require__(247); var Vector2 = __webpack_require__(3); // global bitmask flag for GameObject.renderMask (used by Scale) @@ -61712,7 +64123,7 @@ module.exports = Transform; /***/ }), -/* 287 */ +/* 291 */ /***/ (function(module, exports) { /** @@ -61801,7 +64212,7 @@ module.exports = Visible; /***/ }), -/* 288 */ +/* 292 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61816,16 +64227,16 @@ module.exports = Visible; module.exports = { - CHANGE_DATA: __webpack_require__(582), - CHANGE_DATA_KEY: __webpack_require__(583), - REMOVE_DATA: __webpack_require__(584), - SET_DATA: __webpack_require__(585) + CHANGE_DATA: __webpack_require__(586), + CHANGE_DATA_KEY: __webpack_require__(587), + REMOVE_DATA: __webpack_require__(588), + SET_DATA: __webpack_require__(589) }; /***/ }), -/* 289 */ +/* 293 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61944,7 +64355,7 @@ module.exports = MarchingAnts; /***/ }), -/* 290 */ +/* 294 */ /***/ (function(module, exports) { /** @@ -61984,7 +64395,7 @@ module.exports = RotateLeft; /***/ }), -/* 291 */ +/* 295 */ /***/ (function(module, exports) { /** @@ -62024,7 +64435,7 @@ module.exports = RotateRight; /***/ }), -/* 292 */ +/* 296 */ /***/ (function(module, exports) { /** @@ -62098,7 +64509,91 @@ module.exports = BresenhamPoints; /***/ }), -/* 293 */ +/* 297 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Searches a pre-sorted array for the closet value to the given number. + * + * If the `key` argument is given it will assume the array contains objects that all have the required `key` property name, + * and will check for the closest value of those to the given number. + * + * @function Phaser.Utils.Array.FindClosestInSorted + * @since 3.0.0 + * + * @param {number} value - The value to search for in the array. + * @param {array} array - The array to search, which must be sorted. + * @param {string} [key] - An optional property key. If specified the array elements property will be checked against value. + * + * @return {(number|any)} The nearest value found in the array, or if a `key` was given, the nearest object with the matching property value. + */ +var FindClosestInSorted = function (value, array, key) +{ + if (!array.length) + { + return NaN; + } + else if (array.length === 1) + { + return array[0]; + } + + var i = 1; + var low; + var high; + + if (key) + { + if (value < array[0][key]) + { + return array[0]; + } + + while (array[i][key] < value) + { + i++; + } + } + else + { + while (array[i] < value) + { + i++; + } + } + + if (i > array.length) + { + i = array.length; + } + + if (key) + { + low = array[i - 1][key]; + high = array[i][key]; + + return ((high - value) <= (value - low)) ? array[i] : array[i - 1]; + } + else + { + low = array[i - 1]; + high = array[i]; + + return ((high - value) <= (value - low)) ? high : low; + } +}; + +module.exports = FindClosestInSorted; + + +/***/ }), +/* 298 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62107,14 +64602,228 @@ module.exports = BresenhamPoints; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Animation = __webpack_require__(156); var Class = __webpack_require__(0); -var CustomMap = __webpack_require__(168); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(115); -var GameEvents = __webpack_require__(20); + +/** + * @classdesc + * A single frame in an Animation sequence. + * + * An AnimationFrame consists of a reference to the Texture it uses for rendering, references to other + * frames in the animation, and index data. It also has the ability to modify the animation timing. + * + * AnimationFrames are generated automatically by the Animation class. + * + * @class AnimationFrame + * @memberof Phaser.Animations + * @constructor + * @since 3.0.0 + * + * @param {string} textureKey - The key of the Texture this AnimationFrame uses. + * @param {(string|integer)} textureFrame - The key of the Frame within the Texture that this AnimationFrame uses. + * @param {integer} index - The index of this AnimationFrame within the Animation sequence. + * @param {Phaser.Textures.Frame} frame - A reference to the Texture Frame this AnimationFrame uses for rendering. + */ +var AnimationFrame = new Class({ + + initialize: + + function AnimationFrame (textureKey, textureFrame, index, frame) + { + /** + * The key of the Texture this AnimationFrame uses. + * + * @name Phaser.Animations.AnimationFrame#textureKey + * @type {string} + * @since 3.0.0 + */ + this.textureKey = textureKey; + + /** + * The key of the Frame within the Texture that this AnimationFrame uses. + * + * @name Phaser.Animations.AnimationFrame#textureFrame + * @type {(string|integer)} + * @since 3.0.0 + */ + this.textureFrame = textureFrame; + + /** + * The index of this AnimationFrame within the Animation sequence. + * + * @name Phaser.Animations.AnimationFrame#index + * @type {integer} + * @since 3.0.0 + */ + this.index = index; + + /** + * A reference to the Texture Frame this AnimationFrame uses for rendering. + * + * @name Phaser.Animations.AnimationFrame#frame + * @type {Phaser.Textures.Frame} + * @since 3.0.0 + */ + this.frame = frame; + + /** + * Is this the first frame in an animation sequence? + * + * @name Phaser.Animations.AnimationFrame#isFirst + * @type {boolean} + * @default false + * @readonly + * @since 3.0.0 + */ + this.isFirst = false; + + /** + * Is this the last frame in an animation sequence? + * + * @name Phaser.Animations.AnimationFrame#isLast + * @type {boolean} + * @default false + * @readonly + * @since 3.0.0 + */ + this.isLast = false; + + /** + * A reference to the AnimationFrame that comes before this one in the animation, if any. + * + * @name Phaser.Animations.AnimationFrame#prevFrame + * @type {?Phaser.Animations.AnimationFrame} + * @default null + * @readonly + * @since 3.0.0 + */ + this.prevFrame = null; + + /** + * A reference to the AnimationFrame that comes after this one in the animation, if any. + * + * @name Phaser.Animations.AnimationFrame#nextFrame + * @type {?Phaser.Animations.AnimationFrame} + * @default null + * @readonly + * @since 3.0.0 + */ + this.nextFrame = null; + + /** + * Additional time (in ms) that this frame should appear for during playback. + * The value is added onto the msPerFrame set by the animation. + * + * @name Phaser.Animations.AnimationFrame#duration + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.duration = 0; + + /** + * What % through the animation does this frame come? + * This value is generated when the animation is created and cached here. + * + * @name Phaser.Animations.AnimationFrame#progress + * @type {number} + * @default 0 + * @readonly + * @since 3.0.0 + */ + this.progress = 0; + }, + + /** + * Generates a JavaScript object suitable for converting to JSON. + * + * @method Phaser.Animations.AnimationFrame#toJSON + * @since 3.0.0 + * + * @return {Phaser.Types.Animations.JSONAnimationFrame} The AnimationFrame data. + */ + toJSON: function () + { + return { + key: this.textureKey, + frame: this.textureFrame, + duration: this.duration + }; + }, + + /** + * Destroys this object by removing references to external resources and callbacks. + * + * @method Phaser.Animations.AnimationFrame#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.frame = undefined; + } + +}); + +module.exports = AnimationFrame; + + +/***/ }), +/* 299 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Takes the given array and runs a numeric sort on it, ignoring any non-digits that + * may be in the entries. + * + * You should only run this on arrays containing strings. + * + * @function Phaser.Utils.Array.SortByDigits + * @since 3.50.0 + * + * @param {string[]} array - The input array of strings. + * + * @return {string[]} The sorted input array. + */ +var SortByDigits = function (array) +{ + var re = /\D/g; + + array.sort(function (a, b) + { + return (parseInt(a.replace(re, ''), 10) - parseInt(b.replace(re, ''), 10)); + }); + + return array; +}; + +module.exports = SortByDigits; + + +/***/ }), +/* 300 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Animation = __webpack_require__(170); +var Class = __webpack_require__(0); +var CustomMap = __webpack_require__(121); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(120); +var GameEvents = __webpack_require__(21); +var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); -var Pad = __webpack_require__(169); +var Pad = __webpack_require__(171); +var NumberArray = __webpack_require__(301); /** * @classdesc @@ -62188,6 +64897,17 @@ var AnimationManager = new Class({ */ this.anims = new CustomMap(); + /** + * A list of animation mix times. + * + * See the {@link #setMix} method for more details. + * + * @name Phaser.Animations.AnimationManager#mixes + * @type {Phaser.Structs.Map.} + * @since 3.50.0 + */ + this.mixes = new CustomMap(); + /** * Whether the Animation Manager is paused along with all of its Animations. * @@ -62224,6 +64944,144 @@ var AnimationManager = new Class({ this.game.events.once(GameEvents.DESTROY, this.destroy, this); }, + /** + * Adds a mix between two animations. + * + * Mixing allows you to specify a unique delay between a pairing of animations. + * + * When playing Animation A on a Game Object, if you then play Animation B, and a + * mix exists, it will wait for the specified delay to be over before playing Animation B. + * + * This allows you to customise smoothing between different types of animation, such + * as blending between an idle and a walk state, or a running and a firing state. + * + * Note that mixing is only applied if you use the `Sprite.play` method. If you opt to use + * `playAfterRepeat` or `playAfterDelay` instead, those will take pririty and the mix + * delay will not be used. + * + * To update an existing mix, just call this method with the new delay. + * + * To remove a mix pairing, see the `removeMix` method. + * + * @method Phaser.Animations.AnimationManager#addMix + * @since 3.50.0 + * + * @param {(string|Phaser.Animations.Animation)} animA - The string-based key, or instance of, Animation A. + * @param {(string|Phaser.Animations.Animation)} animB - The string-based key, or instance of, Animation B. + * @param {number} delay - The delay, in milliseconds, to wait when transitioning from Animation A to B. + * + * @return {this} This Animation Manager. + */ + addMix: function (animA, animB, delay) + { + var anims = this.anims; + var mixes = this.mixes; + + var keyA = (typeof(animA) === 'string') ? animA : animA.key; + var keyB = (typeof(animB) === 'string') ? animB : animB.key; + + if (anims.has(keyA) && anims.has(keyB)) + { + var mixObj = mixes.get(keyA); + + if (!mixObj) + { + mixObj = {}; + } + + mixObj[keyB] = delay; + + mixes.set(keyA, mixObj); + } + + return this; + }, + + /** + * Removes a mix between two animations. + * + * Mixing allows you to specify a unique delay between a pairing of animations. + * + * Calling this method lets you remove those pairings. You can either remove + * it between `animA` and `animB`, or if you do not provide the `animB` parameter, + * it will remove all `animA` mixes. + * + * If you wish to update an existing mix instead, call the `addMix` method with the + * new delay. + * + * @method Phaser.Animations.AnimationManager#removeMix + * @since 3.50.0 + * + * @param {(string|Phaser.Animations.Animation)} animA - The string-based key, or instance of, Animation A. + * @param {(string|Phaser.Animations.Animation)} [animB] - The string-based key, or instance of, Animation B. If not given, all mixes for Animation A will be removed. + * + * @return {this} This Animation Manager. + */ + removeMix: function (animA, animB) + { + var mixes = this.mixes; + + var keyA = (typeof(animA) === 'string') ? animA : animA.key; + + var mixObj = mixes.get(keyA); + + if (mixObj) + { + if (animB) + { + var keyB = (typeof(animB) === 'string') ? animB : animB.key; + + if (mixObj.hasOwnProperty(keyB)) + { + // Remove just this pairing + delete mixObj[keyB]; + } + } + else if (!animB) + { + // Remove everything for animA + mixes.delete(keyA); + } + } + + return this; + }, + + /** + * Returns the mix delay between two animations. + * + * If no mix has been set-up, this method will return zero. + * + * If you wish to create, or update, a new mix, call the `addMix` method. + * If you wish to remove a mix, call the `removeMix` method. + * + * @method Phaser.Animations.AnimationManager#getMix + * @since 3.50.0 + * + * @param {(string|Phaser.Animations.Animation)} animA - The string-based key, or instance of, Animation A. + * @param {(string|Phaser.Animations.Animation)} animB - The string-based key, or instance of, Animation B. + * + * @return {number} The mix duration, or zero if no mix exists. + */ + getMix: function (animA, animB) + { + var mixes = this.mixes; + + var keyA = (typeof(animA) === 'string') ? animA : animA.key; + var keyB = (typeof(animB) === 'string') ? animB : animB.key; + + var mixObj = mixes.get(keyA); + + if (mixObj && mixObj.hasOwnProperty(keyB)) + { + return mixObj[keyB]; + } + else + { + return 0; + } + }, + /** * Adds an existing Animation to the Animation Manager. * @@ -62256,7 +65114,7 @@ var AnimationManager = new Class({ /** * Checks to see if the given key is already in use within the Animation Manager or not. - * + * * Animations are global. Keys created in one scene can be used from any other Scene in your game. They are not Scene specific. * * @method Phaser.Animations.AnimationManager#exists @@ -62271,17 +65129,189 @@ var AnimationManager = new Class({ return this.anims.has(key); }, + /** + * Create one, or more animations from a loaded Aseprite JSON file. + * + * Aseprite is a powerful animated sprite editor and pixel art tool. + * + * You can find more details at https://www.aseprite.org/ + * + * To export a compatible JSON file in Aseprite, please do the following: + * + * 1. Go to "File - Export Sprite Sheet" + * + * 2. On the **Layout** tab: + * 2a. Set the "Sheet type" to "Packed" + * 2b. Set the "Constraints" to "None" + * 2c. Check the "Merge Duplicates" checkbox + * + * 3. On the **Sprite** tab: + * 3a. Set "Layers" to "Visible layers" + * 3b. Set "Frames" to "All frames", unless you only wish to export a sub-set of tags + * + * 4. On the **Borders** tab: + * 4a. Check the "Trim Sprite" and "Trim Cells" options + * 4b. Ensure "Border Padding", "Spacing" and "Inner Padding" are all > 0 (1 is usually enough) + * + * 5. On the **Output** tab: + * 5a. Check "Output File", give your image a name and make sure you choose "png files" as the file type + * 5b. Check "JSON Data" and give your json file a name + * 5c. The JSON Data type can be either a Hash or Array, Phaser doesn't mind. + * 5d. Make sure "Tags" is checked in the Meta options + * 5e. In the "Item Filename" input box, make sure it says just "{frame}" and nothing more. + * + * 6. Click export + * + * This was tested with Aseprite 1.2.25. + * + * This will export a png and json file which you can load using the Atlas Loader, i.e.: + * + * ```javascript + * function preload () + * { + * this.load.path = 'assets/animations/aseprite/'; + * this.load.atlas('paladin', 'paladin.png', 'paladin.json'); + * } + * ``` + * + * Once exported, you can call this method from within a Scene with the 'atlas' key: + * + * ```javascript + * this.anims.createFromAseprite('paladin'); + * ``` + * + * Any animations defined in the JSON will now be available to use in Phaser and you play them + * via their Tag name. For example, if you have an animation called 'War Cry' on your Aseprite timeline, + * you can play it in Phaser using that Tag name: + * + * ```javascript + * this.add.sprite(400, 300).play('War Cry'); + * ``` + * + * When calling this method you can optionally provide an array of tag names, and only those animations + * will be created. For example: + * + * ```javascript + * this.anims.createFromAseprite('paladin', [ 'step', 'War Cry', 'Magnum Break' ]); + * ``` + * + * This will only create the 3 animations defined. Note that the tag names are case-sensitive. + * + * @method Phaser.Animations.AnimationManager#createFromAseprite + * @since 3.50.0 + * + * @param {string} key - The key of the loaded Aseprite atlas. It must have been loaded prior to calling this method. + * @param {string[]} [tags] - An array of Tag names. If provided, only animations found in this array will be created. + * + * @return {Phaser.Animations.Animation[]} An array of Animation instances that were successfully created. + */ + createFromAseprite: function (key, tags) + { + var output = []; + + var data = this.game.cache.json.get(key); + + if (!data) + { + return output; + } + + var _this = this; + + var meta = GetValue(data, 'meta', null); + var frames = GetValue(data, 'frames', null); + + if (meta && frames) + { + var frameTags = GetValue(meta, 'frameTags', []); + + frameTags.forEach(function (tag) + { + var animFrames = []; + + var name = GetFastValue(tag, 'name', null); + var from = GetFastValue(tag, 'from', 0); + var to = GetFastValue(tag, 'to', 0); + var direction = GetFastValue(tag, 'direction', 'forward'); + + if (!name) + { + // Skip if no name + return; + } + + if (!tags || (tags && tags.indexOf(name) > -1)) + { + // Get all the frames for this tag + var tempFrames = []; + var minDuration = Number.MAX_SAFE_INTEGER; + + for (var i = from; i <= to; i++) + { + var frameKey = i.toString(); + var frame = frames[frameKey]; + + if (frame) + { + var frameDuration = GetFastValue(frame, 'duration', Number.MAX_SAFE_INTEGER); + + if (frameDuration < minDuration) + { + minDuration = frameDuration; + } + + tempFrames.push({ frame: frameKey, duration: frameDuration }); + } + } + + tempFrames.forEach(function (entry) + { + animFrames.push({ + key: key, + frame: entry.frame, + duration: (minDuration - entry.duration) + }); + }); + + var totalDuration = (minDuration * animFrames.length); + + if (direction === 'reverse') + { + animFrames = animFrames.reverse(); + } + + // Create the animation + var createConfig = { + key: name, + frames: animFrames, + duration: totalDuration, + yoyo: (direction === 'pingpong') + }; + + var result = _this.create(createConfig); + + if (result) + { + output.push(result); + } + } + }); + } + + return output; + }, + /** * Creates a new Animation and adds it to the Animation Manager. - * + * * Animations are global. Once created, you can use them in any Scene in your game. They are not Scene specific. - * + * * If an invalid key is given this method will return `false`. - * + * * If you pass the key of an animation that already exists in the Animation Manager, that animation will be returned. - * + * * A brand new animation is only created if the key is valid and not already in use. - * + * * If you wish to re-use an existing key, call `AnimationManager.remove` first, then this method. * * @method Phaser.Animations.AnimationManager#create @@ -62290,7 +65320,7 @@ var AnimationManager = new Class({ * * @param {Phaser.Types.Animations.Animation} config - The configuration settings for the Animation. * - * @return {(Phaser.Animations.Animation|false)} The Animation that was created, or `false` is the key is already in use. + * @return {(Phaser.Animations.Animation|false)} The Animation that was created, or `false` if the key is already in use. */ create: function (config) { @@ -62307,7 +65337,7 @@ var AnimationManager = new Class({ anim = new Animation(this, key, config); this.anims.set(key, anim); - + this.emit(Events.ADD_ANIMATION, key, anim); } } @@ -62368,18 +65398,18 @@ var AnimationManager = new Class({ * Generate an array of {@link Phaser.Types.Animations.AnimationFrame} objects from a texture key and configuration object. * * Generates objects with string based frame names, as configured by the given {@link Phaser.Types.Animations.GenerateFrameNames}. - * + * * It's a helper method, designed to make it easier for you to extract all of the frame names from texture atlases. * If you're working with a sprite sheet, see the `generateFrameNumbers` method instead. - * + * * Example: - * + * * If you have a texture atlases loaded called `gems` and it contains 6 frames called `ruby_0001`, `ruby_0002`, and so on, * then you can call this method using: `this.anims.generateFrameNames('gems', { prefix: 'ruby_', end: 6, zeroPad: 4 })`. - * + * * The `end` value tells it to look for 6 frames, incrementally numbered, all starting with the prefix `ruby_`. The `zeroPad` * value tells it how many zeroes pad out the numbers. To create an animation using this method, you can do: - * + * * ```javascript * this.anims.create({ * key: 'ruby', @@ -62391,7 +65421,7 @@ var AnimationManager = new Class({ * }) * }); * ``` - * + * * Please see the animation examples for further details. * * @method Phaser.Animations.AnimationManager#generateFrameNames @@ -62419,17 +65449,11 @@ var AnimationManager = new Class({ return out; } - var diff = (start < end) ? 1 : -1; - - // Adjust because we use i !== end in the for loop - end += diff; - var i; - var frame; if (!config) { - // Use every frame in the atlas? + // Use every frame in the atlas frames = texture.getFrameNames(); for (i = 0; i < frames.length; i++) @@ -62437,28 +65461,24 @@ var AnimationManager = new Class({ out.push({ key: key, frame: frames[i] }); } } - else if (Array.isArray(frames)) + else { - // Have they provided their own custom frame sequence array? + if (!frames) + { + frames = NumberArray(start, end); + } + for (i = 0; i < frames.length; i++) { - frame = prefix + Pad(frames[i], zeroPad, '0', 1) + suffix; + var frame = prefix + Pad(frames[i], zeroPad, '0', 1) + suffix; if (texture.has(frame)) { out.push({ key: key, frame: frame }); } - } - } - else - { - for (i = start; i !== end; i += diff) - { - frame = prefix + Pad(i, zeroPad, '0', 1) + suffix; - - if (texture.has(frame)) + else { - out.push({ key: key, frame: frame }); + console.warn('generateFrameNames: Frame missing: ' + frame + ' from texture: ' + key); } } } @@ -62470,7 +65490,7 @@ var AnimationManager = new Class({ * Generate an array of {@link Phaser.Types.Animations.AnimationFrame} objects from a texture key and configuration object. * * Generates objects with numbered frame names, as configured by the given {@link Phaser.Types.Animations.GenerateFrameNumbers}. - * + * * If you're working with a texture atlas, see the `generateFrameNames` method instead. * * @method Phaser.Animations.AnimationManager#generateFrameNumbers @@ -62483,9 +65503,9 @@ var AnimationManager = new Class({ */ generateFrameNumbers: function (key, config) { - var startFrame = GetValue(config, 'start', 0); - var endFrame = GetValue(config, 'end', -1); - var firstFrame = GetValue(config, 'first', false); + var start = GetValue(config, 'start', 0); + var end = GetValue(config, 'end', -1); + var first = GetValue(config, 'first', false); var out = GetValue(config, 'outputArray', []); var frames = GetValue(config, 'frames', false); @@ -62496,43 +65516,33 @@ var AnimationManager = new Class({ return out; } - if (firstFrame && texture.has(firstFrame)) + if (first && texture.has(first)) { - out.push({ key: key, frame: firstFrame }); + out.push({ key: key, frame: first }); } - var i; - - // Have they provided their own custom frame sequence array? - if (Array.isArray(frames)) + // No 'frames' array? Then generate one automatically + if (!frames) { - for (i = 0; i < frames.length; i++) + if (end === -1) { - if (texture.has(frames[i])) - { - out.push({ key: key, frame: frames[i] }); - } + // -1 because of __BASE, which we don't want in our results + // and -1 because frames are zero based + end = texture.frameTotal - 2; } + + frames = NumberArray(start, end); } - else + + for (var i = 0; i < frames.length; i++) { - // No endFrame then see if we can get it - if (endFrame === -1) + if (texture.has(frames[i])) { - endFrame = texture.frameTotal; + out.push({ key: key, frame: frames[i] }); } - - var diff = (startFrame < endFrame) ? 1 : -1; - - // Adjust because we use i !== end in the for loop - endFrame += diff; - - for (i = startFrame; i !== endFrame; i += diff) + else { - if (texture.has(i)) - { - out.push({ key: key, frame: i }); - } + console.warn('generateFrameNumbers: Frame ' + i + ' missing from texture: ' + key); } } @@ -62554,34 +65564,6 @@ var AnimationManager = new Class({ return this.anims.get(key); }, - /** - * Load an Animation into a Game Object's Animation Component. - * - * @method Phaser.Animations.AnimationManager#load - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject} child - The Game Object to load the animation into. - * @param {string} key - The key of the animation to load. - * @param {(string|integer)} [startFrame] - The name of a start frame to set on the loaded animation. - * - * @return {Phaser.GameObjects.GameObject} The Game Object with the animation loaded into it. - */ - load: function (child, key, startFrame) - { - var anim = this.get(key); - - if (anim) - { - anim.load(child, startFrame); - } - else - { - console.warn('Missing animation: ' + key); - } - - return child; - }, - /** * Pause all animations. * @@ -62609,28 +65591,87 @@ var AnimationManager = new Class({ * @method Phaser.Animations.AnimationManager#play * @since 3.0.0 * - * @param {string} key - The key of the animation to play on the Game Object. - * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Objects to play the animation on. + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} children - An array of Game Objects to play the animation on. They must have an Animation Component. * * @return {this} This Animation Manager. */ - play: function (key, child) + play: function (key, children) { - if (!Array.isArray(child)) + if (!Array.isArray(children)) { - child = [ child ]; + children = [ children ]; } - var anim = this.get(key); - - if (!anim) + for (var i = 0; i < children.length; i++) { - return this; + children[i].anims.play(key); } - for (var i = 0; i < child.length; i++) + return this; + }, + + /** + * Takes an array of Game Objects that have an Animation Component and then + * starts the given animation playing on them. The start time of each Game Object + * is offset, incrementally, by the `stagger` amount. + * + * For example, if you pass an array with 4 children and a stagger time of 1000, + * the delays will be: + * + * child 1: 1000ms delay + * child 2: 2000ms delay + * child 3: 3000ms delay + * child 4: 4000ms delay + * + * If you set the `staggerFirst` parameter to `false` they would be: + * + * child 1: 0ms delay + * child 2: 1000ms delay + * child 3: 2000ms delay + * child 4: 3000ms delay + * + * You can also set `stagger` to be a negative value. If it was -1000, the above would be: + * + * child 1: 3000ms delay + * child 2: 2000ms delay + * child 3: 1000ms delay + * child 4: 0ms delay + * + * @method Phaser.Animations.AnimationManager#staggerPlay + * @since 3.0.0 + * + * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return] + * + * @param {(string|Phaser.Animations.Animation|Phaser.Types.Animations.PlayAnimationConfig)} key - The string-based key of the animation to play, or an Animation instance, or a `PlayAnimationConfig` object. + * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} children - An array of Game Objects to play the animation on. They must have an Animation Component. + * @param {number} stagger - The amount of time, in milliseconds, to offset each play time by. If a negative value is given, it's applied to the children in reverse order. + * @param {boolean} [staggerFirst=true] -Should the first child be staggered as well? + * + * @return {this} This Animation Manager. + */ + staggerPlay: function (key, children, stagger, staggerFirst) + { + if (stagger === undefined) { stagger = 0; } + if (staggerFirst === undefined) { staggerFirst = true; } + + if (!Array.isArray(children)) { - child[i].anims.play(key); + children = [ children ]; + } + + var len = children.length; + + if (!staggerFirst) + { + len--; + } + + for (var i = 0; i < children.length; i++) + { + var time = (stagger < 0) ? Math.abs(stagger) * (len - i) : stagger * i; + + children[i].anims.playAfterDelay(key, time); } return this; @@ -62638,7 +65679,7 @@ var AnimationManager = new Class({ /** * Removes an Animation from this Animation Manager, based on the given key. - * + * * This is a global action. Once an Animation has been removed, no Game Objects * can carry on using it. * @@ -62659,6 +65700,8 @@ var AnimationManager = new Class({ this.emit(Events.REMOVE_ANIMATION, key, anim); this.anims.delete(key); + + this.removeMix(key); } return anim; @@ -62685,46 +65728,6 @@ var AnimationManager = new Class({ return this; }, - /** - * Takes an array of Game Objects that have an Animation Component and then - * starts the given animation playing on them, each one offset by the - * `stagger` amount given to this method. - * - * @method Phaser.Animations.AnimationManager#staggerPlay - * @since 3.0.0 - * - * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return] - * - * @param {string} key - The key of the animation to play on the Game Objects. - * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} children - An array of Game Objects to play the animation on. They must have an Animation Component. - * @param {number} [stagger=0] - The amount of time, in milliseconds, to offset each play time by. - * - * @return {this} This Animation Manager. - */ - staggerPlay: function (key, children, stagger) - { - if (stagger === undefined) { stagger = 0; } - - if (!Array.isArray(children)) - { - children = [ children ]; - } - - var anim = this.get(key); - - if (!anim) - { - return this; - } - - for (var i = 0; i < children.length; i++) - { - children[i].anims.delayedPlay(stagger * i, key); - } - - return this; - }, - /** * Returns the Animation data as JavaScript object based on the given key. * Or, if not key is defined, it will return the data of all animations as array of objects. @@ -62768,6 +65771,7 @@ var AnimationManager = new Class({ destroy: function () { this.anims.clear(); + this.mixes.clear(); this.textureManager = null; @@ -62780,7 +65784,100 @@ module.exports = AnimationManager; /***/ }), -/* 294 */ +/* 301 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Create an array representing the range of numbers (usually integers), between, and inclusive of, + * the given `start` and `end` arguments. For example: + * + * `var array = Phaser.Utils.Array.NumberArray(2, 4); // array = [2, 3, 4]` + * `var array = Phaser.Utils.Array.NumberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]` + * `var array = Phaser.Utils.Array.NumberArray(8, 2); // array = [8, 7, 6, 5, 4, 3, 2]` + * + * This is equivalent to `Phaser.Utils.Array.NumberArrayStep(start, end, 1)`. + * + * You can optionally provide a prefix and / or suffix string. If given the array will contain + * strings, not integers. For example: + * + * `var array = Phaser.Utils.Array.NumberArray(1, 4, 'Level '); // array = ["Level 1", "Level 2", "Level 3", "Level 4"]` + * `var array = Phaser.Utils.Array.NumberArray(5, 7, 'HD-', '.png'); // array = ["HD-5.png", "HD-6.png", "HD-7.png"]` + * + * @function Phaser.Utils.Array.NumberArray + * @since 3.0.0 + * + * @param {number} start - The minimum value the array starts with. + * @param {number} end - The maximum value the array contains. + * @param {string} [prefix] - Optional prefix to place before the number. If provided the array will contain strings, not integers. + * @param {string} [suffix] - Optional suffix to place after the number. If provided the array will contain strings, not integers. + * + * @return {(number[]|string[])} The array of number values, or strings if a prefix or suffix was provided. + */ +var NumberArray = function (start, end, prefix, suffix) +{ + var result = []; + + var i; + var asString = false; + + if (prefix || suffix) + { + asString = true; + + if (!prefix) + { + prefix = ''; + } + + if (!suffix) + { + suffix = ''; + } + } + + if (end < start) + { + for (i = start; i >= end; i--) + { + if (asString) + { + result.push(prefix + i.toString() + suffix); + } + else + { + result.push(i); + } + } + } + else + { + for (i = start; i <= end; i++) + { + if (asString) + { + result.push(prefix + i.toString() + suffix); + } + else + { + result.push(i); + } + } + } + + return result; +}; + +module.exports = NumberArray; + + +/***/ }), +/* 302 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62790,9 +65887,9 @@ module.exports = AnimationManager; */ var Class = __webpack_require__(0); -var CustomMap = __webpack_require__(168); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(295); +var CustomMap = __webpack_require__(121); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(303); /** * @classdesc @@ -62966,7 +66063,7 @@ module.exports = BaseCache; /***/ }), -/* 295 */ +/* 303 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62981,14 +66078,14 @@ module.exports = BaseCache; module.exports = { - ADD: __webpack_require__(644), - REMOVE: __webpack_require__(645) + ADD: __webpack_require__(660), + REMOVE: __webpack_require__(661) }; /***/ }), -/* 296 */ +/* 304 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62997,9 +66094,9 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseCache = __webpack_require__(294); +var BaseCache = __webpack_require__(302); var Class = __webpack_require__(0); -var GameEvents = __webpack_require__(20); +var GameEvents = __webpack_require__(21); /** * @classdesc @@ -63222,7 +66319,7 @@ module.exports = CacheManager; /***/ }), -/* 297 */ +/* 305 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63233,12 +66330,12 @@ module.exports = CacheManager; var BaseCamera = __webpack_require__(92); var CanvasPool = __webpack_require__(26); -var CenterOn = __webpack_require__(174); +var CenterOn = __webpack_require__(176); var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var Effects = __webpack_require__(305); -var Linear = __webpack_require__(121); +var Components = __webpack_require__(11); +var Effects = __webpack_require__(313); +var Linear = __webpack_require__(123); var Rectangle = __webpack_require__(9); var Vector2 = __webpack_require__(3); @@ -64276,7 +67373,7 @@ module.exports = Camera; /***/ }), -/* 298 */ +/* 306 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64285,7 +67382,7 @@ module.exports = Camera; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Color = __webpack_require__(31); +var Color = __webpack_require__(32); /** * Converts a hex string into a Phaser Color object. @@ -64329,7 +67426,7 @@ module.exports = HexStringToColor; /***/ }), -/* 299 */ +/* 307 */ /***/ (function(module, exports) { /** @@ -64360,7 +67457,7 @@ module.exports = GetColor32; /***/ }), -/* 300 */ +/* 308 */ /***/ (function(module, exports) { /** @@ -64440,7 +67537,7 @@ module.exports = RGBToHSV; /***/ }), -/* 301 */ +/* 309 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64449,8 +67546,8 @@ module.exports = RGBToHSV; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Color = __webpack_require__(31); -var IntegerToRGB = __webpack_require__(302); +var Color = __webpack_require__(32); +var IntegerToRGB = __webpack_require__(310); /** * Converts the given color value into an instance of a Color object. @@ -64473,7 +67570,7 @@ module.exports = IntegerToColor; /***/ }), -/* 302 */ +/* 310 */ /***/ (function(module, exports) { /** @@ -64521,7 +67618,7 @@ module.exports = IntegerToRGB; /***/ }), -/* 303 */ +/* 311 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64530,7 +67627,7 @@ module.exports = IntegerToRGB; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Color = __webpack_require__(31); +var Color = __webpack_require__(32); /** * Converts an object containing `r`, `g`, `b` and `a` properties into a Color class instance. @@ -64551,7 +67648,7 @@ module.exports = ObjectToColor; /***/ }), -/* 304 */ +/* 312 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64560,7 +67657,7 @@ module.exports = ObjectToColor; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Color = __webpack_require__(31); +var Color = __webpack_require__(32); /** * Converts a CSS 'web' string into a Phaser Color object. @@ -64597,7 +67694,7 @@ module.exports = RGBStringToColor; /***/ }), -/* 305 */ +/* 313 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64612,186 +67709,12 @@ module.exports = RGBStringToColor; module.exports = { - Fade: __webpack_require__(668), - Flash: __webpack_require__(669), - Pan: __webpack_require__(670), - Shake: __webpack_require__(703), - RotateTo: __webpack_require__(704), - Zoom: __webpack_require__(705) - -}; - - -/***/ }), -/* 306 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Back - */ - -module.exports = { - - In: __webpack_require__(671), - Out: __webpack_require__(672), - InOut: __webpack_require__(673) - -}; - - -/***/ }), -/* 307 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Bounce - */ - -module.exports = { - - In: __webpack_require__(674), - Out: __webpack_require__(675), - InOut: __webpack_require__(676) - -}; - - -/***/ }), -/* 308 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Circular - */ - -module.exports = { - - In: __webpack_require__(677), - Out: __webpack_require__(678), - InOut: __webpack_require__(679) - -}; - - -/***/ }), -/* 309 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Cubic - */ - -module.exports = { - - In: __webpack_require__(680), - Out: __webpack_require__(681), - InOut: __webpack_require__(682) - -}; - - -/***/ }), -/* 310 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Elastic - */ - -module.exports = { - - In: __webpack_require__(683), - Out: __webpack_require__(684), - InOut: __webpack_require__(685) - -}; - - -/***/ }), -/* 311 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Expo - */ - -module.exports = { - - In: __webpack_require__(686), - Out: __webpack_require__(687), - InOut: __webpack_require__(688) - -}; - - -/***/ }), -/* 312 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -module.exports = __webpack_require__(689); - - -/***/ }), -/* 313 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Math.Easing.Quadratic - */ - -module.exports = { - - In: __webpack_require__(690), - Out: __webpack_require__(691), - InOut: __webpack_require__(692) + Fade: __webpack_require__(684), + Flash: __webpack_require__(685), + Pan: __webpack_require__(686), + Shake: __webpack_require__(719), + RotateTo: __webpack_require__(720), + Zoom: __webpack_require__(721) }; @@ -64807,14 +67730,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Quartic + * @namespace Phaser.Math.Easing.Back */ module.exports = { - In: __webpack_require__(693), - Out: __webpack_require__(694), - InOut: __webpack_require__(695) + In: __webpack_require__(687), + Out: __webpack_require__(688), + InOut: __webpack_require__(689) }; @@ -64830,14 +67753,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Quintic + * @namespace Phaser.Math.Easing.Bounce */ module.exports = { - In: __webpack_require__(696), - Out: __webpack_require__(697), - InOut: __webpack_require__(698) + In: __webpack_require__(690), + Out: __webpack_require__(691), + InOut: __webpack_require__(692) }; @@ -64853,14 +67776,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Sine + * @namespace Phaser.Math.Easing.Circular */ module.exports = { - In: __webpack_require__(699), - Out: __webpack_require__(700), - InOut: __webpack_require__(701) + In: __webpack_require__(693), + Out: __webpack_require__(694), + InOut: __webpack_require__(695) }; @@ -64876,16 +67799,190 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Stepped + * @namespace Phaser.Math.Easing.Cubic */ -module.exports = __webpack_require__(702); +module.exports = { + + In: __webpack_require__(696), + Out: __webpack_require__(697), + InOut: __webpack_require__(698) + +}; /***/ }), /* 318 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Elastic + */ + +module.exports = { + + In: __webpack_require__(699), + Out: __webpack_require__(700), + InOut: __webpack_require__(701) + +}; + + +/***/ }), +/* 319 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Expo + */ + +module.exports = { + + In: __webpack_require__(702), + Out: __webpack_require__(703), + InOut: __webpack_require__(704) + +}; + + +/***/ }), +/* 320 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +module.exports = __webpack_require__(705); + + +/***/ }), +/* 321 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Quadratic + */ + +module.exports = { + + In: __webpack_require__(706), + Out: __webpack_require__(707), + InOut: __webpack_require__(708) + +}; + + +/***/ }), +/* 322 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Quartic + */ + +module.exports = { + + In: __webpack_require__(709), + Out: __webpack_require__(710), + InOut: __webpack_require__(711) + +}; + + +/***/ }), +/* 323 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Quintic + */ + +module.exports = { + + In: __webpack_require__(712), + Out: __webpack_require__(713), + InOut: __webpack_require__(714) + +}; + + +/***/ }), +/* 324 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Sine + */ + +module.exports = { + + In: __webpack_require__(715), + Out: __webpack_require__(716), + InOut: __webpack_require__(717) + +}; + + +/***/ }), +/* 325 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Math.Easing.Stepped + */ + +module.exports = __webpack_require__(718); + + +/***/ }), +/* 326 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. @@ -64893,15 +67990,15 @@ module.exports = __webpack_require__(702); */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(33); -var Device = __webpack_require__(319); +var CONST = __webpack_require__(34); +var Device = __webpack_require__(327); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); var IsPlainObject = __webpack_require__(7); -var PhaserMath = __webpack_require__(176); +var PhaserMath = __webpack_require__(178); var NOOP = __webpack_require__(1); -var DefaultPlugins = __webpack_require__(180); -var ValueToColor = __webpack_require__(170); +var DefaultPlugins = __webpack_require__(182); +var ValueToColor = __webpack_require__(172); /** * @classdesc @@ -65469,7 +68566,7 @@ module.exports = Config; /***/ }), -/* 319 */ +/* 327 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -65503,20 +68600,20 @@ module.exports = Config; module.exports = { - os: __webpack_require__(122), - browser: __webpack_require__(123), - features: __webpack_require__(175), - input: __webpack_require__(734), - audio: __webpack_require__(735), - video: __webpack_require__(736), - fullscreen: __webpack_require__(737), - canvasFeatures: __webpack_require__(320) + os: __webpack_require__(124), + browser: __webpack_require__(125), + features: __webpack_require__(177), + input: __webpack_require__(752), + audio: __webpack_require__(753), + video: __webpack_require__(754), + fullscreen: __webpack_require__(755), + canvasFeatures: __webpack_require__(328) }; /***/ }), -/* 320 */ +/* 328 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -65630,7 +68727,7 @@ module.exports = init(); /***/ }), -/* 321 */ +/* 329 */ /***/ (function(module, exports) { /** @@ -65661,7 +68758,7 @@ module.exports = Between; /***/ }), -/* 322 */ +/* 330 */ /***/ (function(module, exports) { /** @@ -65692,7 +68789,7 @@ module.exports = BetweenPoints; /***/ }), -/* 323 */ +/* 331 */ /***/ (function(module, exports) { /** @@ -65729,7 +68826,7 @@ module.exports = Normalize; /***/ }), -/* 324 */ +/* 332 */ /***/ (function(module, exports) { /** @@ -65761,7 +68858,7 @@ module.exports = DistanceBetweenPoints; /***/ }), -/* 325 */ +/* 333 */ /***/ (function(module, exports) { /** @@ -65795,7 +68892,7 @@ module.exports = DistanceSquared; /***/ }), -/* 326 */ +/* 334 */ /***/ (function(module, exports) { /** @@ -65829,7 +68926,7 @@ module.exports = GreaterThan; /***/ }), -/* 327 */ +/* 335 */ /***/ (function(module, exports) { /** @@ -65863,7 +68960,7 @@ module.exports = LessThan; /***/ }), -/* 328 */ +/* 336 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -65872,7 +68969,7 @@ module.exports = LessThan; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Factorial = __webpack_require__(329); +var Factorial = __webpack_require__(337); /** * Calculates the Bernstein basis from the three factorial coefficients. @@ -65894,7 +68991,7 @@ module.exports = Bernstein; /***/ }), -/* 329 */ +/* 337 */ /***/ (function(module, exports) { /** @@ -65934,7 +69031,7 @@ module.exports = Factorial; /***/ }), -/* 330 */ +/* 338 */ /***/ (function(module, exports) { /** @@ -66004,7 +69101,7 @@ module.exports = CubicBezierInterpolation; /***/ }), -/* 331 */ +/* 339 */ /***/ (function(module, exports) { /** @@ -66063,7 +69160,7 @@ module.exports = QuadraticBezierInterpolation; /***/ }), -/* 332 */ +/* 340 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -66072,7 +69169,7 @@ module.exports = QuadraticBezierInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmoothStep = __webpack_require__(167); +var SmoothStep = __webpack_require__(169); /** * A Smooth Step interpolation method. @@ -66096,7 +69193,7 @@ module.exports = SmoothStepInterpolation; /***/ }), -/* 333 */ +/* 341 */ /***/ (function(module, exports) { /** @@ -66126,7 +69223,7 @@ module.exports = GetPowerOfTwo; /***/ }), -/* 334 */ +/* 342 */ /***/ (function(module, exports) { /** @@ -66170,7 +69267,7 @@ module.exports = SnapCeil; /***/ }), -/* 335 */ +/* 343 */ /***/ (function(module, exports) { /** @@ -66205,7 +69302,7 @@ module.exports = Rotate; /***/ }), -/* 336 */ +/* 344 */ /***/ (function(module, exports) { /** @@ -66234,7 +69331,7 @@ module.exports = RoundAwayFromZero; /***/ }), -/* 337 */ +/* 345 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -66827,7 +69924,7 @@ module.exports = Matrix3; /***/ }), -/* 338 */ +/* 346 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68289,7 +71386,7 @@ module.exports = Matrix4; /***/ }), -/* 339 */ +/* 347 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68302,8 +71399,8 @@ module.exports = Matrix4; // and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl var Class = __webpack_require__(0); -var Vector3 = __webpack_require__(80); -var Matrix3 = __webpack_require__(337); +var Vector3 = __webpack_require__(81); +var Matrix3 = __webpack_require__(345); var EPSILON = 0.000001; @@ -69061,7 +72158,7 @@ module.exports = Quaternion; /***/ }), -/* 340 */ +/* 348 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -69070,10 +72167,10 @@ module.exports = Quaternion; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CanvasInterpolation = __webpack_require__(341); +var CanvasInterpolation = __webpack_require__(349); var CanvasPool = __webpack_require__(26); -var CONST = __webpack_require__(33); -var Features = __webpack_require__(175); +var CONST = __webpack_require__(34); +var Features = __webpack_require__(177); /** * Called automatically by Phaser.Game and responsible for creating the renderer it will use. @@ -69163,8 +72260,8 @@ var CreateRenderer = function (game) if (true) { - CanvasRenderer = __webpack_require__(508); - WebGLRenderer = __webpack_require__(511); + CanvasRenderer = __webpack_require__(531); + WebGLRenderer = __webpack_require__(534); // Let the config pick the renderer type, as both are included if (config.renderType === CONST.WEBGL) @@ -69189,7 +72286,7 @@ module.exports = CreateRenderer; /***/ }), -/* 341 */ +/* 349 */ /***/ (function(module, exports) { /** @@ -69252,7 +72349,7 @@ module.exports = CanvasInterpolation; /***/ }), -/* 342 */ +/* 350 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -69261,7 +72358,7 @@ module.exports = CanvasInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(33); +var CONST = __webpack_require__(34); /** * Called automatically by Phaser.Game and responsible for creating the console.log debug header. @@ -69382,7 +72479,7 @@ module.exports = DebugHeader; /***/ }), -/* 343 */ +/* 351 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -69394,7 +72491,7 @@ module.exports = DebugHeader; var Class = __webpack_require__(0); var GetValue = __webpack_require__(6); var NOOP = __webpack_require__(1); -var RequestAnimationFrame = __webpack_require__(344); +var RequestAnimationFrame = __webpack_require__(352); // http://www.testufo.com/#test=animation-time-graph @@ -70112,7 +73209,7 @@ module.exports = TimeStep; /***/ }), -/* 344 */ +/* 352 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -70326,7 +73423,7 @@ module.exports = RequestAnimationFrame; /***/ }), -/* 345 */ +/* 353 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -70335,7 +73432,7 @@ module.exports = RequestAnimationFrame; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Events = __webpack_require__(20); +var Events = __webpack_require__(21); /** * The Visibility Handler is responsible for listening out for document level visibility change events. @@ -70417,7 +73514,7 @@ module.exports = VisibilityHandler; /***/ }), -/* 346 */ +/* 354 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -70426,7 +73523,7 @@ module.exports = VisibilityHandler; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Arne16 = __webpack_require__(347); +var Arne16 = __webpack_require__(355); var CanvasPool = __webpack_require__(26); var GetValue = __webpack_require__(6); @@ -70539,7 +73636,7 @@ module.exports = GenerateTexture; /***/ }), -/* 347 */ +/* 355 */ /***/ (function(module, exports) { /** @@ -70577,7 +73674,7 @@ module.exports = { /***/ }), -/* 348 */ +/* 356 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -70589,8 +73686,8 @@ module.exports = { // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) var Class = __webpack_require__(0); -var CubicBezier = __webpack_require__(330); -var Curve = __webpack_require__(82); +var CubicBezier = __webpack_require__(338); +var Curve = __webpack_require__(83); var Vector2 = __webpack_require__(3); /** @@ -70804,7 +73901,7 @@ module.exports = CubicBezierCurve; /***/ }), -/* 349 */ +/* 357 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -70816,10 +73913,10 @@ module.exports = CubicBezierCurve; // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) var Class = __webpack_require__(0); -var Curve = __webpack_require__(82); -var DegToRad = __webpack_require__(40); +var Curve = __webpack_require__(83); +var DegToRad = __webpack_require__(41); var GetValue = __webpack_require__(6); -var RadToDeg = __webpack_require__(179); +var RadToDeg = __webpack_require__(181); var Vector2 = __webpack_require__(3); /** @@ -71428,7 +74525,7 @@ module.exports = EllipseCurve; /***/ }), -/* 350 */ +/* 358 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71440,8 +74537,8 @@ module.exports = EllipseCurve; // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) var Class = __webpack_require__(0); -var Curve = __webpack_require__(82); -var FromPoints = __webpack_require__(182); +var Curve = __webpack_require__(83); +var FromPoints = __webpack_require__(184); var Rectangle = __webpack_require__(9); var Vector2 = __webpack_require__(3); @@ -71731,7 +74828,7 @@ module.exports = LineCurve; /***/ }), -/* 351 */ +/* 359 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71741,8 +74838,147 @@ module.exports = LineCurve; */ var Class = __webpack_require__(0); -var Curve = __webpack_require__(82); -var QuadraticBezierInterpolation = __webpack_require__(331); +var Vector2 = __webpack_require__(3); + +/** + * @classdesc + * A MoveTo Curve is a very simple curve consisting of only a single point. + * Its intended use is to move the ending point in a Path. + * + * @class MoveTo + * @memberof Phaser.Curves + * @constructor + * @since 3.0.0 + * + * @param {number} [x=0] - `x` pixel coordinate. + * @param {number} [y=0] - `y` pixel coordinate. + */ +var MoveTo = new Class({ + + initialize: + + function MoveTo (x, y) + { + /** + * Denotes that this Curve does not influence the bounds, points, and drawing of its parent Path. Must be `false` or some methods in the parent Path will throw errors. + * + * @name Phaser.Curves.MoveTo#active + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.active = false; + + /** + * The lone point which this curve consists of. + * + * @name Phaser.Curves.MoveTo#p0 + * @type {Phaser.Math.Vector2} + * @since 3.0.0 + */ + this.p0 = new Vector2(x, y); + }, + + /** + * Get point at relative position in curve according to length. + * + * @method Phaser.Curves.MoveTo#getPoint + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [out,$return] + * + * @param {number} t - The position along the curve to return. Where 0 is the start and 1 is the end. + * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created. + * + * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned. + */ + getPoint: function (t, out) + { + if (out === undefined) { out = new Vector2(); } + + return out.copy(this.p0); + }, + + /** + * Retrieves the point at given position in the curve. This will always return this curve's only point. + * + * @method Phaser.Curves.MoveTo#getPointAt + * @since 3.0.0 + * + * @generic {Phaser.Math.Vector2} O - [out,$return] + * + * @param {number} u - The position in the path to retrieve, between 0 and 1. Not used. + * @param {Phaser.Math.Vector2} [out] - An optional vector in which to store the point. + * + * @return {Phaser.Math.Vector2} The modified `out` vector, or a new `Vector2` if none was provided. + */ + getPointAt: function (u, out) + { + return this.getPoint(u, out); + }, + + /** + * Gets the resolution of this curve. + * + * @method Phaser.Curves.MoveTo#getResolution + * @since 3.0.0 + * + * @return {number} The resolution of this curve. For a MoveTo the value is always 1. + */ + getResolution: function () + { + return 1; + }, + + /** + * Gets the length of this curve. + * + * @method Phaser.Curves.MoveTo#getLength + * @since 3.0.0 + * + * @return {number} The length of this curve. For a MoveTo the value is always 0. + */ + getLength: function () + { + return 0; + }, + + /** + * Converts this curve into a JSON-serializable object. + * + * @method Phaser.Curves.MoveTo#toJSON + * @since 3.0.0 + * + * @return {Phaser.Types.Curves.JSONCurve} A primitive object with the curve's type and only point. + */ + toJSON: function () + { + return { + type: 'MoveTo', + points: [ + this.p0.x, this.p0.y + ] + }; + } + +}); + +module.exports = MoveTo; + + +/***/ }), +/* 360 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var Curve = __webpack_require__(83); +var QuadraticBezierInterpolation = __webpack_require__(339); var Vector2 = __webpack_require__(3); /** @@ -71948,7 +75184,7 @@ module.exports = QuadraticBezier; /***/ }), -/* 352 */ +/* 361 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71959,9 +75195,9 @@ module.exports = QuadraticBezier; // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) -var CatmullRom = __webpack_require__(177); +var CatmullRom = __webpack_require__(179); var Class = __webpack_require__(0); -var Curve = __webpack_require__(82); +var Curve = __webpack_require__(83); var Vector2 = __webpack_require__(3); /** @@ -72173,7 +75409,7 @@ module.exports = SplineCurve; /***/ }), -/* 353 */ +/* 362 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -72187,16 +75423,16 @@ var Class = __webpack_require__(0); /** * @classdesc * A BaseShader is a small resource class that contains the data required for a WebGL Shader to be created. - * + * * It contains the raw source code to the fragment and vertex shader, as well as an object that defines * the uniforms the shader requires, if any. - * + * * BaseShaders are stored in the Shader Cache, available in a Scene via `this.cache.shaders` and are referenced * by a unique key-based string. Retrieve them via `this.cache.shaders.get(key)`. - * + * * BaseShaders are created automatically by the GLSL File Loader when loading an external shader resource. * They can also be created at runtime, allowing you to use dynamically generated shader source code. - * + * * Default fragment and vertex source is used if not provided in the constructor, setting-up a basic shader, * suitable for debug rendering. * @@ -72244,10 +75480,12 @@ var BaseShader = new Class({ '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);', + ' 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'); } @@ -72297,7 +75535,7 @@ module.exports = BaseShader; /***/ }), -/* 354 */ +/* 363 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -72306,33 +75544,33 @@ module.exports = BaseShader; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Color = __webpack_require__(31); +var Color = __webpack_require__(32); -Color.ColorToRGBA = __webpack_require__(819); -Color.ComponentToHex = __webpack_require__(355); -Color.GetColor = __webpack_require__(171); -Color.GetColor32 = __webpack_require__(299); +Color.ColorToRGBA = __webpack_require__(836); +Color.ComponentToHex = __webpack_require__(364); +Color.GetColor = __webpack_require__(173); +Color.GetColor32 = __webpack_require__(307); Color.GetColorFromValue = __webpack_require__(117); -Color.HexStringToColor = __webpack_require__(298); -Color.HSLToColor = __webpack_require__(820); -Color.HSVColorWheel = __webpack_require__(821); -Color.HSVToRGB = __webpack_require__(172); -Color.HueToComponent = __webpack_require__(356); -Color.IntegerToColor = __webpack_require__(301); -Color.IntegerToRGB = __webpack_require__(302); -Color.Interpolate = __webpack_require__(822); -Color.ObjectToColor = __webpack_require__(303); -Color.RandomRGB = __webpack_require__(823); -Color.RGBStringToColor = __webpack_require__(304); -Color.RGBToHSV = __webpack_require__(300); -Color.RGBToString = __webpack_require__(824); -Color.ValueToColor = __webpack_require__(170); +Color.HexStringToColor = __webpack_require__(306); +Color.HSLToColor = __webpack_require__(837); +Color.HSVColorWheel = __webpack_require__(838); +Color.HSVToRGB = __webpack_require__(174); +Color.HueToComponent = __webpack_require__(365); +Color.IntegerToColor = __webpack_require__(309); +Color.IntegerToRGB = __webpack_require__(310); +Color.Interpolate = __webpack_require__(839); +Color.ObjectToColor = __webpack_require__(311); +Color.RandomRGB = __webpack_require__(840); +Color.RGBStringToColor = __webpack_require__(312); +Color.RGBToHSV = __webpack_require__(308); +Color.RGBToString = __webpack_require__(841); +Color.ValueToColor = __webpack_require__(172); module.exports = Color; /***/ }), -/* 355 */ +/* 364 */ /***/ (function(module, exports) { /** @@ -72362,7 +75600,7 @@ module.exports = ComponentToHex; /***/ }), -/* 356 */ +/* 365 */ /***/ (function(module, exports) { /** @@ -72418,7 +75656,7 @@ module.exports = HueToComponent; /***/ }), -/* 357 */ +/* 366 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -72427,7 +75665,7 @@ module.exports = HueToComponent; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var OS = __webpack_require__(122); +var OS = __webpack_require__(124); /** * @callback ContentLoadedCallback @@ -72481,7 +75719,66 @@ module.exports = DOMContentLoaded; /***/ }), -/* 358 */ +/* 367 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Attempts to determine the document inner height across iOS and standard devices. + * Based on code by @tylerjpeterson + * + * @function Phaser.DOM.GetInnerHeight + * @since 3.16.0 + * + * @param {boolean} iOS - Is this running on iOS? + * + * @return {number} The inner height value. + */ +var GetInnerHeight = function (iOS) +{ + + if (!iOS) + { + return window.innerHeight; + } + + var axis = Math.abs(window.orientation); + + var size = { w: 0, h: 0 }; + + var ruler = document.createElement('div'); + + ruler.setAttribute('style', 'position: fixed; height: 100vh; width: 0; top: 0'); + + document.documentElement.appendChild(ruler); + + size.w = (axis === 90) ? ruler.offsetHeight : window.innerWidth; + size.h = (axis === 90) ? window.innerWidth : ruler.offsetHeight; + + document.documentElement.removeChild(ruler); + + ruler = null; + + if (Math.abs(window.orientation) !== 90) + { + return size.h; + } + else + { + return size.w; + } +}; + +module.exports = GetInnerHeight; + + +/***/ }), +/* 368 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -72490,7 +75787,7 @@ module.exports = DOMContentLoaded; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(183); +var CONST = __webpack_require__(185); /** * Attempts to determine the screen orientation using the Orientation API. @@ -72547,7 +75844,7 @@ module.exports = GetScreenOrientation; /***/ }), -/* 359 */ +/* 369 */ /***/ (function(module, exports) { /** @@ -72633,7 +75930,7 @@ module.exports = { /***/ }), -/* 360 */ +/* 370 */ /***/ (function(module, exports) { /** @@ -72686,7 +75983,7 @@ module.exports = { /***/ }), -/* 361 */ +/* 371 */ /***/ (function(module, exports) { /** @@ -72784,7 +76081,7 @@ module.exports = { /***/ }), -/* 362 */ +/* 372 */ /***/ (function(module, exports) { /** @@ -72858,7 +76155,7 @@ module.exports = { /***/ }), -/* 363 */ +/* 373 */ /***/ (function(module, exports) { /** @@ -72909,7 +76206,7 @@ module.exports = GetTarget; /***/ }), -/* 364 */ +/* 374 */ /***/ (function(module, exports) { /** @@ -72966,7 +76263,7 @@ module.exports = ParseXML; /***/ }), -/* 365 */ +/* 375 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -72976,16 +76273,16 @@ module.exports = ParseXML; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(185); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(55); -var GameEvents = __webpack_require__(20); -var Keyboard = __webpack_require__(366); -var Mouse = __webpack_require__(367); -var Pointer = __webpack_require__(368); -var Touch = __webpack_require__(369); -var TransformMatrix = __webpack_require__(30); -var TransformXY = __webpack_require__(162); +var CONST = __webpack_require__(187); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(56); +var GameEvents = __webpack_require__(21); +var Keyboard = __webpack_require__(376); +var Mouse = __webpack_require__(377); +var Pointer = __webpack_require__(378); +var Touch = __webpack_require__(379); +var TransformMatrix = __webpack_require__(31); +var TransformXY = __webpack_require__(164); /** * @classdesc @@ -74048,7 +77345,7 @@ module.exports = InputManager; /***/ }), -/* 366 */ +/* 376 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74057,11 +77354,11 @@ module.exports = InputManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayRemove = __webpack_require__(129); +var ArrayRemove = __webpack_require__(95); var Class = __webpack_require__(0); -var GameEvents = __webpack_require__(20); -var InputEvents = __webpack_require__(55); -var KeyCodes = __webpack_require__(130); +var GameEvents = __webpack_require__(21); +var InputEvents = __webpack_require__(56); +var KeyCodes = __webpack_require__(131); var NOOP = __webpack_require__(1); /** @@ -74492,7 +77789,7 @@ module.exports = KeyboardManager; /***/ }), -/* 367 */ +/* 377 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74502,8 +77799,8 @@ module.exports = KeyboardManager; */ var Class = __webpack_require__(0); -var Features = __webpack_require__(175); -var InputEvents = __webpack_require__(55); +var Features = __webpack_require__(177); +var InputEvents = __webpack_require__(56); var NOOP = __webpack_require__(1); // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent @@ -74512,9 +77809,9 @@ var NOOP = __webpack_require__(1); /** * @classdesc * The Mouse Manager is a helper class that belongs to the Input Manager. - * + * * Its role is to listen for native DOM Mouse Events and then pass them onto the Input Manager for further processing. - * + * * You do not need to create this class directly, the Input Manager will create an instance of it automatically. * * @class MouseManager @@ -74719,9 +78016,9 @@ var MouseManager = new Class({ /** * Attempts to disable the context menu from appearing if you right-click on the browser. - * + * * Works by listening for the `contextmenu` event and prevent defaulting it. - * + * * Use this if you need to enable right-button mouse support in your game, and the browser * menu keeps getting in the way. * @@ -74803,7 +78100,7 @@ var MouseManager = new Class({ if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled) { _this.manager.onMouseMove(event); - + if (_this.capture) { event.preventDefault(); @@ -74821,7 +78118,7 @@ var MouseManager = new Class({ if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled) { _this.manager.onMouseDown(event); - + if (_this.capture && event.target === canvas) { event.preventDefault(); @@ -74843,7 +78140,7 @@ var MouseManager = new Class({ if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled) { _this.manager.onMouseUp(event); - + if (_this.capture && event.target === canvas) { event.preventDefault(); @@ -74903,8 +78200,8 @@ var MouseManager = new Class({ if (window && this.manager.game.config.inputWindowEvents) { - window.addEventListener('mousedown', this.onMouseDownWindow, nonPassive); - window.addEventListener('mouseup', this.onMouseUpWindow, nonPassive); + window.top.addEventListener('mousedown', this.onMouseDownWindow, nonPassive); + window.top.addEventListener('mouseup', this.onMouseUpWindow, nonPassive); } if (Features.pointerLock) @@ -74945,8 +78242,8 @@ var MouseManager = new Class({ if (window) { - window.removeEventListener('mousedown', this.onMouseDownWindow); - window.removeEventListener('mouseup', this.onMouseUpWindow); + window.top.removeEventListener('mousedown', this.onMouseDownWindow); + window.top.removeEventListener('mouseup', this.onMouseUpWindow); } if (Features.pointerLock) @@ -74978,7 +78275,7 @@ module.exports = MouseManager; /***/ }), -/* 368 */ +/* 378 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74987,11 +78284,11 @@ module.exports = MouseManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Angle = __webpack_require__(321); +var Angle = __webpack_require__(329); var Class = __webpack_require__(0); -var Distance = __webpack_require__(54); -var FuzzyEqual = __webpack_require__(107); -var SmoothStepInterpolation = __webpack_require__(332); +var Distance = __webpack_require__(55); +var FuzzyEqual = __webpack_require__(108); +var SmoothStepInterpolation = __webpack_require__(340); var Vector2 = __webpack_require__(3); /** @@ -75075,7 +78372,7 @@ var Pointer = new Class({ /** * The camera the Pointer interacted with during its last update. - * + * * A Pointer can only ever interact with one camera at once, which will be the top-most camera * in the list should multiple cameras be positioned on-top of each other. * @@ -75089,9 +78386,9 @@ var Pointer = new Class({ /** * A read-only property that indicates which button was pressed, or released, on the pointer * during the most recent event. It is only set during `up` and `down` events. - * + * * On Touch devices the value is always 0. - * + * * Users may change the configuration of buttons on their pointing device so that if an event's button property * is zero, it may not have been caused by the button that is physically left–most on the pointing device; * however, it should behave as if the left button was clicked in the standard button layout. @@ -75111,7 +78408,7 @@ var Pointer = new Class({ * 4: Wheel button or middle button * 8: 4th button (typically the "Browser Back" button) * 16: 5th button (typically the "Browser Forward" button) - * + * * For a mouse configured for left-handed use, the button actions are reversed. * In this case, the values are read from right to left. * @@ -75134,9 +78431,9 @@ var Pointer = new Class({ /** * The previous position of the Pointer in screen space. - * + * * The old x and y values are stored in here during the InputManager.transformPointer call. - * + * * Use the properties `velocity`, `angle` and `distance` to create your own gesture recognition. * * @name Phaser.Input.Pointer#prevPosition @@ -75158,9 +78455,9 @@ var Pointer = new Class({ /** * The current velocity of the Pointer, based on its current and previous positions. - * + * * This value is smoothed out each frame, according to the `motionFactor` property. - * + * * This property is updated whenever the Pointer moves, regardless of any button states. In other words, * it changes based on movement alone - a button doesn't have to be pressed first. * @@ -75173,9 +78470,9 @@ var Pointer = new Class({ /** * The current angle the Pointer is moving, in radians, based on its previous and current position. - * + * * The angle is based on the old position facing to the current position. - * + * * This property is updated whenever the Pointer moves, regardless of any button states. In other words, * it changes based on movement alone - a button doesn't have to be pressed first. * @@ -75188,12 +78485,12 @@ var Pointer = new Class({ /** * The distance the Pointer has moved, based on its previous and current position. - * + * * This value is smoothed out each frame, according to the `motionFactor` property. - * + * * This property is updated whenever the Pointer moves, regardless of any button states. In other words, * it changes based on movement alone - a button doesn't have to be pressed first. - * + * * If you need the total distance travelled since the primary buttons was pressed down, * then use the `Pointer.getDistance` method. * @@ -75206,14 +78503,14 @@ var Pointer = new Class({ /** * The smoothing factor to apply to the Pointer position. - * + * * Due to their nature, pointer positions are inherently noisy. While this is fine for lots of games, if you need cleaner positions * then you can set this value to apply an automatic smoothing to the positions as they are recorded. - * + * * The default value of zero means 'no smoothing'. * Set to a small value, such as 0.2, to apply an average level of smoothing between positions. You can do this by changing this * value directly, or by setting the `input.smoothFactor` property in the Game Config. - * + * * Positions are only smoothed when the pointer moves. If the primary button on this Pointer enters an Up or Down state, then the position * is always precise, and not smoothed. * @@ -75226,7 +78523,7 @@ var Pointer = new Class({ /** * The factor applied to the motion smoothing each frame. - * + * * This value is passed to the Smooth Step Interpolation that is used to calculate the velocity, * angle and distance of the Pointer. It's applied every frame, until the midPoint reaches the current * position of the Pointer. 0.2 provides a good average but can be increased if you need a @@ -75242,7 +78539,7 @@ var Pointer = new Class({ /** * The x position of this Pointer, translated into the coordinate space of the most recent Camera it interacted with. - * + * * If you wish to use this value _outside_ of an input event handler then you should update it first by calling * the `Pointer.updateWorldPoint` method. * @@ -75255,7 +78552,7 @@ var Pointer = new Class({ /** * The y position of this Pointer, translated into the coordinate space of the most recent Camera it interacted with. - * + * * If you wish to use this value _outside_ of an input event handler then you should update it first by calling * the `Pointer.updateWorldPoint` method. * @@ -75297,7 +78594,7 @@ var Pointer = new Class({ this.downY = 0; /** - * Time when Button 1 (left button), or Touch, was pressed, used for dragging objects. + * The Event timestamp when the first button, or Touch input, was pressed. Used for dragging objects. * * @name Phaser.Input.Pointer#downTime * @type {number} @@ -75327,7 +78624,7 @@ var Pointer = new Class({ this.upY = 0; /** - * Time when Button 1 (left button), or Touch, was released, used for dragging objects. + * The Event timestamp when the final button, or Touch input, was released. Used for dragging objects. * * @name Phaser.Input.Pointer#upTime * @type {number} @@ -75368,7 +78665,7 @@ var Pointer = new Class({ /** * Did this Pointer get canceled by a touchcancel event? - * + * * Note: "canceled" is the American-English spelling of "cancelled". Please don't submit PRs correcting it! * * @name Phaser.Input.Pointer#wasCanceled @@ -75429,10 +78726,10 @@ var Pointer = new Class({ /** * Is this pointer Pointer Locked? - * + * * Only a mouse pointer can be locked and it only becomes locked when requested via * the browsers Pointer Lock API. - * + * * You can request this by calling the `this.input.mouse.requestPointerLock()` method from * a `pointerdown` or `pointerup` event handler. * @@ -75478,7 +78775,7 @@ var Pointer = new Class({ /** * Takes a Camera and updates this Pointer's `worldX` and `worldY` values so they are * the result of a translation through the given Camera. - * + * * Note that the values will be automatically replaced the moment the Pointer is * updated by an input event, such as a mouse move, so should be used immediately. * @@ -75605,12 +78902,17 @@ var Pointer = new Class({ this.primaryDown = false; this.upX = this.x; this.upY = this.y; - this.upTime = event.timeStamp; } - this.isDown = false; + if (this.buttons === 0) + { + // No more buttons are still down + this.isDown = false; - this.wasTouch = false; + this.upTime = event.timeStamp; + + this.wasTouch = false; + } }, /** @@ -75644,10 +78946,14 @@ var Pointer = new Class({ this.primaryDown = true; this.downX = this.x; this.downY = this.y; - this.downTime = event.timeStamp; } - this.isDown = true; + if (!this.isDown) + { + this.isDown = true; + + this.downTime = event.timeStamp; + } this.wasTouch = false; }, @@ -75810,7 +79116,7 @@ var Pointer = new Class({ this.wasTouch = true; this.wasCanceled = false; - + this.active = false; this.updateMotion(); @@ -75846,7 +79152,7 @@ var Pointer = new Class({ this.wasTouch = true; this.wasCanceled = true; - + this.active = false; }, @@ -75996,10 +79302,10 @@ var Pointer = new Class({ /** * If the Pointer has a button pressed down at the time this method is called, it will return the * distance between the Pointer's `downX` and `downY` values and the current position. - * + * * If no button is held down, it will return the last recorded distance, based on where * the Pointer was when the button was released. - * + * * If you wish to get the distance being travelled currently, based on the velocity of the Pointer, * then see the `Pointer.distance` property. * @@ -76023,7 +79329,7 @@ var Pointer = new Class({ /** * If the Pointer has a button pressed down at the time this method is called, it will return the * horizontal distance between the Pointer's `downX` and `downY` values and the current position. - * + * * If no button is held down, it will return the last recorded horizontal distance, based on where * the Pointer was when the button was released. * @@ -76047,7 +79353,7 @@ var Pointer = new Class({ /** * If the Pointer has a button pressed down at the time this method is called, it will return the * vertical distance between the Pointer's `downX` and `downY` values and the current position. - * + * * If no button is held down, it will return the last recorded vertical distance, based on where * the Pointer was when the button was released. * @@ -76071,9 +79377,9 @@ var Pointer = new Class({ /** * If the Pointer has a button pressed down at the time this method is called, it will return the * duration since the button was pressed down. - * + * * If no button is held down, it will return the last recorded duration, based on the time - * the Pointer button was released. + * the last button on the Pointer was released. * * @method Phaser.Input.Pointer#getDuration * @since 3.16.0 @@ -76095,12 +79401,12 @@ var Pointer = new Class({ /** * If the Pointer has a button pressed down at the time this method is called, it will return the * angle between the Pointer's `downX` and `downY` values and the current position. - * + * * If no button is held down, it will return the last recorded angle, based on where * the Pointer was when the button was released. - * + * * The angle is based on the old position facing to the current position. - * + * * If you wish to get the current angle, based on the velocity of the Pointer, then * see the `Pointer.angle` property. * @@ -76124,31 +79430,31 @@ var Pointer = new Class({ /** * Takes the previous and current Pointer positions and then generates an array of interpolated values between * the two. The array will be populated up to the size of the `steps` argument. - * + * * ```javaScript * var points = pointer.getInterpolatedPosition(4); - * + * * // points[0] = { x: 0, y: 0 } * // points[1] = { x: 2, y: 1 } * // points[2] = { x: 3, y: 2 } * // points[3] = { x: 6, y: 3 } * ``` - * + * * Use this if you need to get smoothed values between the previous and current pointer positions. DOM pointer * events can often fire faster than the main browser loop, and this will help you avoid janky movement * especially if you have an object following a Pointer. - * + * * Note that if you provide an output array it will only be populated up to the number of steps provided. * It will not clear any previous data that may have existed beyond the range of the steps count. - * + * * Internally it uses the Smooth Step interpolation calculation. * * @method Phaser.Input.Pointer#getInterpolatedPosition * @since 3.11.0 - * + * * @param {integer} [steps=10] - The number of interpolation steps to use. * @param {array} [out] - An array to store the results in. If not provided a new one will be created. - * + * * @return {array} An array of interpolated values. */ getInterpolatedPosition: function (steps, out) @@ -76256,7 +79562,7 @@ module.exports = Pointer; /***/ }), -/* 369 */ +/* 379 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -76266,7 +79572,7 @@ module.exports = Pointer; */ var Class = __webpack_require__(0); -var InputEvents = __webpack_require__(55); +var InputEvents = __webpack_require__(56); var NOOP = __webpack_require__(1); // https://developer.mozilla.org/en-US/docs/Web/API/Touch_events @@ -76669,7 +79975,7 @@ module.exports = TouchManager; /***/ }), -/* 370 */ +/* 380 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -76679,14 +79985,14 @@ module.exports = TouchManager; */ var Class = __webpack_require__(0); -var GameEvents = __webpack_require__(20); -var EventEmitter = __webpack_require__(11); +var GameEvents = __webpack_require__(21); +var EventEmitter = __webpack_require__(12); var FileTypesManager = __webpack_require__(8); var GameObjectCreator = __webpack_require__(16); var GameObjectFactory = __webpack_require__(5); var GetFastValue = __webpack_require__(2); var PluginCache = __webpack_require__(23); -var Remove = __webpack_require__(129); +var Remove = __webpack_require__(95); /** * @classdesc @@ -77571,7 +80877,7 @@ module.exports = PluginManager; /***/ }), -/* 371 */ +/* 381 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77580,17 +80886,17 @@ module.exports = PluginManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(183); +var CONST = __webpack_require__(185); var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(11); +var EventEmitter = __webpack_require__(12); var Events = __webpack_require__(93); -var GameEvents = __webpack_require__(20); -var GetInnerHeight = __webpack_require__(877); -var GetTarget = __webpack_require__(363); -var GetScreenOrientation = __webpack_require__(358); +var GameEvents = __webpack_require__(21); +var GetInnerHeight = __webpack_require__(367); +var GetTarget = __webpack_require__(373); +var GetScreenOrientation = __webpack_require__(368); var NOOP = __webpack_require__(1); var Rectangle = __webpack_require__(9); -var Size = __webpack_require__(372); +var Size = __webpack_require__(382); var SnapFloor = __webpack_require__(94); var Vector2 = __webpack_require__(3); @@ -79282,7 +82588,7 @@ module.exports = ScaleManager; /***/ }), -/* 372 */ +/* 382 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80060,7 +83366,7 @@ module.exports = Size; /***/ }), -/* 373 */ +/* 383 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80070,14 +83376,14 @@ module.exports = Size; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(131); -var Events = __webpack_require__(22); -var GameEvents = __webpack_require__(20); +var CONST = __webpack_require__(132); +var Events = __webpack_require__(20); +var GameEvents = __webpack_require__(21); var GetValue = __webpack_require__(6); -var LoaderEvents = __webpack_require__(83); +var LoaderEvents = __webpack_require__(84); var NOOP = __webpack_require__(1); -var Scene = __webpack_require__(374); -var Systems = __webpack_require__(186); +var Scene = __webpack_require__(384); +var Systems = __webpack_require__(188); /** * @classdesc @@ -81698,7 +85004,7 @@ module.exports = SceneManager; /***/ }), -/* 374 */ +/* 384 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81708,7 +85014,7 @@ module.exports = SceneManager; */ var Class = __webpack_require__(0); -var Systems = __webpack_require__(186); +var Systems = __webpack_require__(188); /** * @classdesc @@ -81984,7 +85290,7 @@ module.exports = Scene; /***/ }), -/* 375 */ +/* 385 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81993,10 +85299,119 @@ module.exports = Scene; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(131); +var GetFastValue = __webpack_require__(2); +var UppercaseFirst = __webpack_require__(189); + +/** + * Builds an array of which physics plugins should be activated for the given Scene. + * + * @function Phaser.Scenes.GetPhysicsPlugins + * @since 3.0.0 + * + * @param {Phaser.Scenes.Systems} sys - The scene system to get the physics systems of. + * + * @return {array} An array of Physics systems to start for this Scene. + */ +var GetPhysicsPlugins = function (sys) +{ + var defaultSystem = sys.game.config.defaultPhysicsSystem; + var sceneSystems = GetFastValue(sys.settings, 'physics', false); + + if (!defaultSystem && !sceneSystems) + { + // No default physics system or systems in this scene + return; + } + + // Let's build the systems array + var output = []; + + if (defaultSystem) + { + output.push(UppercaseFirst(defaultSystem + 'Physics')); + } + + if (sceneSystems) + { + for (var key in sceneSystems) + { + key = UppercaseFirst(key.concat('Physics')); + + if (output.indexOf(key) === -1) + { + output.push(key); + } + } + } + + // An array of Physics systems to start for this Scene + return output; +}; + +module.exports = GetPhysicsPlugins; + + +/***/ }), +/* 386 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetFastValue = __webpack_require__(2); + +/** + * Builds an array of which plugins (not including physics plugins) should be activated for the given Scene. + * + * @function Phaser.Scenes.GetScenePlugins + * @since 3.0.0 + * + * @param {Phaser.Scenes.Systems} sys - The Scene Systems object to check for plugins. + * + * @return {array} An array of all plugins which should be activated, either the default ones or the ones configured in the Scene Systems object. + */ +var GetScenePlugins = function (sys) +{ + var defaultPlugins = sys.plugins.getDefaultScenePlugins(); + + var scenePlugins = GetFastValue(sys.settings, 'plugins', false); + + // Scene Plugins always override Default Plugins + if (Array.isArray(scenePlugins)) + { + return scenePlugins; + } + else if (defaultPlugins) + { + return defaultPlugins; + } + else + { + // No default plugins or plugins in this scene + return []; + } +}; + +module.exports = GetScenePlugins; + + +/***/ }), +/* 387 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(132); var GetValue = __webpack_require__(6); -var Merge = __webpack_require__(132); -var InjectionMap = __webpack_require__(890); +var Merge = __webpack_require__(133); +var InjectionMap = __webpack_require__(904); /** * @namespace Phaser.Scenes.Settings @@ -82080,7 +85495,7 @@ module.exports = Settings; /***/ }), -/* 376 */ +/* 388 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82090,17 +85505,17 @@ module.exports = Settings; */ var CanvasPool = __webpack_require__(26); -var CanvasTexture = __webpack_require__(377); +var CanvasTexture = __webpack_require__(389); var Class = __webpack_require__(0); -var Color = __webpack_require__(31); -var CONST = __webpack_require__(33); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(127); -var GameEvents = __webpack_require__(20); -var GenerateTexture = __webpack_require__(346); +var Color = __webpack_require__(32); +var CONST = __webpack_require__(34); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(129); +var GameEvents = __webpack_require__(21); +var GenerateTexture = __webpack_require__(354); var GetValue = __webpack_require__(6); -var Parser = __webpack_require__(379); -var Texture = __webpack_require__(188); +var Parser = __webpack_require__(391); +var Texture = __webpack_require__(190); /** * @callback EachTextureCallback @@ -83282,7 +86697,7 @@ module.exports = TextureManager; /***/ }), -/* 377 */ +/* 389 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83293,10 +86708,10 @@ module.exports = TextureManager; var Class = __webpack_require__(0); var Clamp = __webpack_require__(17); -var Color = __webpack_require__(31); -var CONST = __webpack_require__(33); -var IsSizePowerOfTwo = __webpack_require__(125); -var Texture = __webpack_require__(188); +var Color = __webpack_require__(32); +var CONST = __webpack_require__(34); +var IsSizePowerOfTwo = __webpack_require__(127); +var Texture = __webpack_require__(190); /** * @classdesc @@ -83917,7 +87332,7 @@ module.exports = CanvasTexture; /***/ }), -/* 378 */ +/* 390 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83928,8 +87343,8 @@ module.exports = CanvasTexture; var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); -var IsSizePowerOfTwo = __webpack_require__(125); -var ScaleModes = __webpack_require__(240); +var IsSizePowerOfTwo = __webpack_require__(127); +var ScaleModes = __webpack_require__(245); /** * @classdesc @@ -84282,7 +87697,7 @@ module.exports = TextureSource; /***/ }), -/* 379 */ +/* 391 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84297,20 +87712,20 @@ module.exports = TextureSource; module.exports = { - AtlasXML: __webpack_require__(891), - Canvas: __webpack_require__(892), - Image: __webpack_require__(893), - JSONArray: __webpack_require__(894), - JSONHash: __webpack_require__(895), - SpriteSheet: __webpack_require__(896), - SpriteSheetFromAtlas: __webpack_require__(897), - UnityYAML: __webpack_require__(898) + AtlasXML: __webpack_require__(905), + Canvas: __webpack_require__(906), + Image: __webpack_require__(907), + JSONArray: __webpack_require__(908), + JSONHash: __webpack_require__(909), + SpriteSheet: __webpack_require__(910), + SpriteSheetFromAtlas: __webpack_require__(911), + UnityYAML: __webpack_require__(912) }; /***/ }), -/* 380 */ +/* 392 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84320,9 +87735,9 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HTML5AudioSoundManager = __webpack_require__(381); -var NoAudioSoundManager = __webpack_require__(385); -var WebAudioSoundManager = __webpack_require__(387); +var HTML5AudioSoundManager = __webpack_require__(393); +var NoAudioSoundManager = __webpack_require__(396); +var WebAudioSoundManager = __webpack_require__(398); /** * Creates a Web Audio, HTML5 Audio or No Audio Sound Manager based on config and device settings. @@ -84362,7 +87777,7 @@ module.exports = SoundManagerCreator; /***/ }), -/* 381 */ +/* 393 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84372,10 +87787,10 @@ module.exports = SoundManagerCreator; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSoundManager = __webpack_require__(133); +var BaseSoundManager = __webpack_require__(134); var Class = __webpack_require__(0); -var Events = __webpack_require__(59); -var HTML5AudioSound = __webpack_require__(384); +var Events = __webpack_require__(61); +var HTML5AudioSound = __webpack_require__(395); /** * HTML5 Audio implementation of the Sound Manager. @@ -84831,7 +88246,7 @@ module.exports = HTML5AudioSoundManager; /***/ }), -/* 382 */ +/* 394 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84840,69 +88255,7 @@ module.exports = HTML5AudioSoundManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SafeRange = __webpack_require__(68); - -/** - * Returns all elements in the array. - * - * You can optionally specify a matching criteria using the `property` and `value` arguments. - * - * For example: `getAll('visible', true)` would return only elements that have their visible property set. - * - * Optionally you can specify a start and end index. For example if the array had 100 elements, - * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only - * the first 50 elements. - * - * @function Phaser.Utils.Array.GetAll - * @since 3.4.0 - * - * @param {array} array - The array to search. - * @param {string} [property] - The property to test on each array element. - * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check. - * @param {integer} [startIndex] - An optional start index to search from. - * @param {integer} [endIndex] - An optional end index to search to. - * - * @return {array} All matching elements from the array. - */ -var GetAll = function (array, property, value, startIndex, endIndex) -{ - if (startIndex === undefined) { startIndex = 0; } - if (endIndex === undefined) { endIndex = array.length; } - - var output = []; - - if (SafeRange(array, startIndex, endIndex)) - { - for (var i = startIndex; i < endIndex; i++) - { - var child = array[i]; - - if (!property || - (property && value === undefined && child.hasOwnProperty(property)) || - (property && value !== undefined && child[property] === value)) - { - output.push(child); - } - } - } - - return output; -}; - -module.exports = GetAll; - - -/***/ }), -/* 383 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SafeRange = __webpack_require__(68); +var SafeRange = __webpack_require__(70); /** * Returns the first element in the array. @@ -84952,7 +88305,7 @@ module.exports = GetFirst; /***/ }), -/* 384 */ +/* 395 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84962,9 +88315,9 @@ module.exports = GetFirst; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(134); +var BaseSound = __webpack_require__(135); var Class = __webpack_require__(0); -var Events = __webpack_require__(59); +var Events = __webpack_require__(61); var Clamp = __webpack_require__(17); /** @@ -85882,7 +89235,7 @@ module.exports = HTML5AudioSound; /***/ }), -/* 385 */ +/* 396 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85892,10 +89245,10 @@ module.exports = HTML5AudioSound; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSoundManager = __webpack_require__(133); +var BaseSoundManager = __webpack_require__(134); var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(11); -var NoAudioSound = __webpack_require__(386); +var EventEmitter = __webpack_require__(12); +var NoAudioSound = __webpack_require__(397); var NOOP = __webpack_require__(1); /** @@ -86000,7 +89353,7 @@ module.exports = NoAudioSoundManager; /***/ }), -/* 386 */ +/* 397 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86010,9 +89363,9 @@ module.exports = NoAudioSoundManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(134); +var BaseSound = __webpack_require__(135); var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(11); +var EventEmitter = __webpack_require__(12); var Extend = __webpack_require__(19); var returnFalse = function () @@ -86191,7 +89544,7 @@ module.exports = NoAudioSound; /***/ }), -/* 387 */ +/* 398 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86201,11 +89554,11 @@ module.exports = NoAudioSound; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Base64ToArrayBuffer = __webpack_require__(388); -var BaseSoundManager = __webpack_require__(133); +var Base64ToArrayBuffer = __webpack_require__(399); +var BaseSoundManager = __webpack_require__(134); var Class = __webpack_require__(0); -var Events = __webpack_require__(59); -var WebAudioSound = __webpack_require__(389); +var Events = __webpack_require__(61); +var WebAudioSound = __webpack_require__(400); /** * @classdesc @@ -86654,7 +90007,7 @@ module.exports = WebAudioSoundManager; /***/ }), -/* 388 */ +/* 399 */ /***/ (function(module, exports) { /** @@ -86729,7 +90082,7 @@ module.exports = Base64ToArrayBuffer; /***/ }), -/* 389 */ +/* 400 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86739,9 +90092,9 @@ module.exports = Base64ToArrayBuffer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(134); +var BaseSound = __webpack_require__(135); var Class = __webpack_require__(0); -var Events = __webpack_require__(59); +var Events = __webpack_require__(61); /** * @classdesc @@ -87635,7 +90988,7 @@ module.exports = WebAudioSound; /***/ }), -/* 390 */ +/* 401 */ /***/ (function(module, exports) { /** @@ -87683,7 +91036,7 @@ module.exports = TransposeMatrix; /***/ }), -/* 391 */ +/* 402 */ /***/ (function(module, exports) { /** @@ -87805,7 +91158,7 @@ module.exports = QuickSelect; /***/ }), -/* 392 */ +/* 403 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87943,7 +91296,29 @@ module.exports = Range; /***/ }), -/* 393 */ +/* 404 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Structs.Events + */ + +module.exports = { + + PROCESS_QUEUE_ADD: __webpack_require__(963), + PROCESS_QUEUE_REMOVE: __webpack_require__(964) + +}; + + +/***/ }), +/* 405 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87996,32 +91371,40 @@ var BuildGameObjectAnimation = function (sprite, config) var anims = sprite.anims; var key = GetAdvancedValue(animConfig, 'key', undefined); - var startFrame = GetAdvancedValue(animConfig, 'startFrame', undefined); - var delay = GetAdvancedValue(animConfig, 'delay', 0); - var repeat = GetAdvancedValue(animConfig, 'repeat', 0); - var repeatDelay = GetAdvancedValue(animConfig, 'repeatDelay', 0); - var yoyo = GetAdvancedValue(animConfig, 'yoyo', false); - - var play = GetAdvancedValue(animConfig, 'play', false); - var delayedPlay = GetAdvancedValue(animConfig, 'delayedPlay', 0); - - anims.setDelay(delay); - anims.setRepeat(repeat); - anims.setRepeatDelay(repeatDelay); - anims.setYoyo(yoyo); - - if (play) + if (key) { - anims.play(key, startFrame); - } - else if (delayedPlay > 0) - { - anims.delayedPlay(delayedPlay, key, startFrame); - } - else - { - anims.load(key); + var startFrame = GetAdvancedValue(animConfig, 'startFrame', undefined); + + var delay = GetAdvancedValue(animConfig, 'delay', 0); + var repeat = GetAdvancedValue(animConfig, 'repeat', 0); + var repeatDelay = GetAdvancedValue(animConfig, 'repeatDelay', 0); + var yoyo = GetAdvancedValue(animConfig, 'yoyo', false); + + var play = GetAdvancedValue(animConfig, 'play', false); + var delayedPlay = GetAdvancedValue(animConfig, 'delayedPlay', 0); + + var playConfig = { + key: key, + delay: delay, + repeat: repeat, + repeatDelay: repeatDelay, + yoyo: yoyo, + startFrame: startFrame + }; + + if (play) + { + anims.play(playConfig); + } + else if (delayedPlay > 0) + { + anims.playAfterDelay(playConfig, delayedPlay); + } + else + { + anims.load(playConfig); + } } } @@ -88032,7 +91415,437 @@ module.exports = BuildGameObjectAnimation; /***/ }), -/* 394 */ +/* 406 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var Frame = __webpack_require__(96); + +/** + * @classdesc + * A Bob Game Object. + * + * A Bob belongs to a Blitter Game Object. The Blitter is responsible for managing and rendering this object. + * + * A Bob has a position, alpha value and a frame from a texture that it uses to render with. You can also toggle + * the flipped and visible state of the Bob. The Frame the Bob uses to render can be changed dynamically, but it + * must be a Frame within the Texture used by the parent Blitter. + * + * Bob positions are relative to the Blitter parent. So if you move the Blitter parent, all Bob children will + * have their positions impacted by this change as well. + * + * You can manipulate Bob objects directly from your game code, but the creation and destruction of them should be + * handled via the Blitter parent. + * + * @class Bob + * @memberof Phaser.GameObjects + * @constructor + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Blitter} blitter - The parent Blitter object is responsible for updating this Bob. + * @param {number} x - The horizontal position of this Game Object in the world, relative to the parent Blitter position. + * @param {number} y - The vertical position of this Game Object in the world, relative to the parent Blitter position. + * @param {(string|integer)} frame - The Frame this Bob will render with, as defined in the Texture the parent Blitter is using. + * @param {boolean} visible - Should the Bob render visible or not to start with? + */ +var Bob = new Class({ + + initialize: + + function Bob (blitter, x, y, frame, visible) + { + /** + * The Blitter object that this Bob belongs to. + * + * @name Phaser.GameObjects.Bob#parent + * @type {Phaser.GameObjects.Blitter} + * @since 3.0.0 + */ + this.parent = blitter; + + /** + * The x position of this Bob, relative to the x position of the Blitter. + * + * @name Phaser.GameObjects.Bob#x + * @type {number} + * @since 3.0.0 + */ + this.x = x; + + /** + * The y position of this Bob, relative to the y position of the Blitter. + * + * @name Phaser.GameObjects.Bob#y + * @type {number} + * @since 3.0.0 + */ + this.y = y; + + /** + * The frame that the Bob uses to render with. + * To change the frame use the `Bob.setFrame` method. + * + * @name Phaser.GameObjects.Bob#frame + * @type {Phaser.Textures.Frame} + * @protected + * @since 3.0.0 + */ + this.frame = frame; + + /** + * A blank object which can be used to store data related to this Bob in. + * + * @name Phaser.GameObjects.Bob#data + * @type {object} + * @default {} + * @since 3.0.0 + */ + this.data = {}; + + /** + * The tint value of this Bob. + * + * @name Phaser.GameObjects.Bob#tint + * @type {number} + * @default 0xffffff + * @since 3.20.0 + */ + this.tint = 0xffffff; + + /** + * The visible state of this Bob. + * + * @name Phaser.GameObjects.Bob#_visible + * @type {boolean} + * @private + * @since 3.0.0 + */ + this._visible = visible; + + /** + * The alpha value of this Bob. + * + * @name Phaser.GameObjects.Bob#_alpha + * @type {number} + * @private + * @default 1 + * @since 3.0.0 + */ + this._alpha = 1; + + /** + * The horizontally flipped state of the Bob. + * A Bob that is flipped horizontally will render inversed on the horizontal axis. + * Flipping always takes place from the middle of the texture. + * + * @name Phaser.GameObjects.Bob#flipX + * @type {boolean} + * @since 3.0.0 + */ + this.flipX = false; + + /** + * The vertically flipped state of the Bob. + * A Bob that is flipped vertically will render inversed on the vertical axis (i.e. upside down) + * Flipping always takes place from the middle of the texture. + * + * @name Phaser.GameObjects.Bob#flipY + * @type {boolean} + * @since 3.0.0 + */ + this.flipY = false; + }, + + /** + * Changes the Texture Frame being used by this Bob. + * The frame must be part of the Texture the parent Blitter is using. + * If no value is given it will use the default frame of the Blitter parent. + * + * @method Phaser.GameObjects.Bob#setFrame + * @since 3.0.0 + * + * @param {(string|integer|Phaser.Textures.Frame)} [frame] - The frame to be used during rendering. + * + * @return {this} This Bob Game Object. + */ + setFrame: function (frame) + { + if (frame === undefined) + { + this.frame = this.parent.frame; + } + else if (frame instanceof Frame && frame.texture === this.parent.texture) + { + this.frame = frame; + } + else + { + this.frame = this.parent.texture.get(frame); + } + + return this; + }, + + /** + * Resets the horizontal and vertical flipped state of this Bob back to their default un-flipped state. + * + * @method Phaser.GameObjects.Bob#resetFlip + * @since 3.0.0 + * + * @return {this} This Bob Game Object. + */ + resetFlip: function () + { + this.flipX = false; + this.flipY = false; + + return this; + }, + + /** + * Resets this Bob. + * + * Changes the position to the values given, and optionally changes the frame. + * + * Also resets the flipX and flipY values, sets alpha back to 1 and visible to true. + * + * @method Phaser.GameObjects.Bob#reset + * @since 3.0.0 + * + * @param {number} x - The x position of the Bob. Bob coordinate are relative to the position of the Blitter object. + * @param {number} y - The y position of the Bob. Bob coordinate are relative to the position of the Blitter object. + * @param {(string|integer|Phaser.Textures.Frame)} [frame] - The Frame the Bob will use. It _must_ be part of the Texture the parent Blitter object is using. + * + * @return {this} This Bob Game Object. + */ + reset: function (x, y, frame) + { + this.x = x; + this.y = y; + + this.flipX = false; + this.flipY = false; + + this._alpha = 1; + this._visible = true; + + this.parent.dirty = true; + + if (frame) + { + this.setFrame(frame); + } + + return this; + }, + + /** + * Changes the position of this Bob to the values given. + * + * @method Phaser.GameObjects.Bob#setPosition + * @since 3.20.0 + * + * @param {number} x - The x position of the Bob. Bob coordinate are relative to the position of the Blitter object. + * @param {number} y - The y position of the Bob. Bob coordinate are relative to the position of the Blitter object. + * + * @return {this} This Bob Game Object. + */ + setPosition: function (x, y) + { + this.x = x; + this.y = y; + + return this; + }, + + /** + * Sets the horizontal flipped state of this Bob. + * + * @method Phaser.GameObjects.Bob#setFlipX + * @since 3.0.0 + * + * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped. + * + * @return {this} This Bob Game Object. + */ + setFlipX: function (value) + { + this.flipX = value; + + return this; + }, + + /** + * Sets the vertical flipped state of this Bob. + * + * @method Phaser.GameObjects.Bob#setFlipY + * @since 3.0.0 + * + * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped. + * + * @return {this} This Bob Game Object. + */ + setFlipY: function (value) + { + this.flipY = value; + + return this; + }, + + /** + * Sets the horizontal and vertical flipped state of this Bob. + * + * @method Phaser.GameObjects.Bob#setFlip + * @since 3.0.0 + * + * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped. + * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped. + * + * @return {this} This Bob Game Object. + */ + setFlip: function (x, y) + { + this.flipX = x; + this.flipY = y; + + return this; + }, + + /** + * Sets the visibility of this Bob. + * + * An invisible Bob will skip rendering. + * + * @method Phaser.GameObjects.Bob#setVisible + * @since 3.0.0 + * + * @param {boolean} value - The visible state of the Game Object. + * + * @return {this} This Bob Game Object. + */ + setVisible: function (value) + { + this.visible = value; + + return this; + }, + + /** + * Set the Alpha level of this Bob. 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. + * + * A Bob with alpha 0 will skip rendering. + * + * @method Phaser.GameObjects.Bob#setAlpha + * @since 3.0.0 + * + * @param {number} value - The alpha value used for this Bob. Between 0 and 1. + * + * @return {this} This Bob Game Object. + */ + setAlpha: function (value) + { + this.alpha = value; + + return this; + }, + + /** + * Sets the tint of this Bob. + * + * @method Phaser.GameObjects.Bob#setTint + * @since 3.20.0 + * + * @param {number} value - The tint value used for this Bob. Between 0 and 0xffffff. + * + * @return {this} This Bob Game Object. + */ + setTint: function (value) + { + this.tint = value; + + return this; + }, + + /** + * Destroys this Bob instance. + * Removes itself from the Blitter and clears the parent, frame and data properties. + * + * @method Phaser.GameObjects.Bob#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.parent.dirty = true; + + this.parent.children.remove(this); + + this.parent = undefined; + this.frame = undefined; + this.data = undefined; + }, + + /** + * The visible state of the Bob. + * + * An invisible Bob will skip rendering. + * + * @name Phaser.GameObjects.Bob#visible + * @type {boolean} + * @since 3.0.0 + */ + visible: { + + get: function () + { + return this._visible; + }, + + set: function (value) + { + this.parent.dirty |= (this._visible !== value); + this._visible = value; + } + + }, + + /** + * The alpha value of the Bob, between 0 and 1. + * + * A Bob with alpha 0 will skip rendering. + * + * @name Phaser.GameObjects.Bob#alpha + * @type {number} + * @since 3.0.0 + */ + alpha: { + + get: function () + { + return this._alpha; + }, + + set: function (value) + { + this.parent.dirty |= ((this._alpha > 0) !== (value > 0)); + this._alpha = value; + } + + } + +}); + +module.exports = Bob; + + +/***/ }), +/* 407 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -88074,7 +91887,7 @@ module.exports = Union; /***/ }), -/* 395 */ +/* 408 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -88084,13 +91897,14 @@ module.exports = Union; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var DOMElementRender = __webpack_require__(966); +var Components = __webpack_require__(11); +var DOMElementRender = __webpack_require__(977); var GameObject = __webpack_require__(14); +var GameObjectEvents = __webpack_require__(29); var IsPlainObject = __webpack_require__(7); -var RemoveFromDOM = __webpack_require__(184); -var SCENE_EVENTS = __webpack_require__(22); -var Vector4 = __webpack_require__(126); +var RemoveFromDOM = __webpack_require__(186); +var SCENE_EVENTS = __webpack_require__(20); +var Vector4 = __webpack_require__(128); /** * @classdesc @@ -88109,6 +91923,9 @@ var Vector4 = __webpack_require__(126); * of the game canvas. This div is sized to match the canvas, and if the canvas size changes, as a result of * settings within the Scale Manager, the dom container is resized accordingly. * + * If you have not already done so, you have to provide a `parent` in the Game Configuration, or the DOM + * Container will fail to be created. + * * You can create a DOM Element by either passing in DOMStrings, or by passing in a reference to an existing * Element that you wish to be placed under the control of Phaser. For example: * @@ -88366,6 +92183,21 @@ var DOMElement = new Class({ scene.sys.events.on(SCENE_EVENTS.SLEEP, this.handleSceneEvent, this); scene.sys.events.on(SCENE_EVENTS.WAKE, this.handleSceneEvent, this); + + this.on(GameObjectEvents.ADDED_TO_SCENE, this.addedToScene, this); + this.on(GameObjectEvents.REMOVED_FROM_SCENE, this.removedFromScene, this); + }, + + // Overrides Game Object method + addedToScene: function () + { + this.scene.sys.updateList.add(this); + }, + + // Overrides Game Object method + removedFromScene: function () + { + this.scene.sys.updateList.remove(this); }, /** @@ -89051,7 +92883,7 @@ module.exports = DOMElement; /***/ }), -/* 396 */ +/* 409 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89060,7 +92892,7 @@ module.exports = DOMElement; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CSSBlendModes = __webpack_require__(967); +var CSSBlendModes = __webpack_require__(978); var GameObject = __webpack_require__(14); /** @@ -89173,7 +93005,7 @@ module.exports = DOMElementCSSRenderer; /***/ }), -/* 397 */ +/* 410 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89183,25 +93015,26 @@ module.exports = DOMElementCSSRenderer; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); +var Components = __webpack_require__(11); var GameObject = __webpack_require__(14); -var ExternRender = __webpack_require__(971); +var GameObjectEvents = __webpack_require__(29); +var ExternRender = __webpack_require__(982); /** * @classdesc * An Extern Game Object is a special type of Game Object that allows you to pass * rendering off to a 3rd party. - * + * * When you create an Extern and place it in the display list of a Scene, the renderer will * process the list as usual. When it finds an Extern it will flush the current batch, * clear down the pipeline and prepare a transform matrix which your render function can * take advantage of, if required. - * + * * The WebGL context is then left is a 'clean' state, ready for you to bind your own shaders, * or draw to it, whatever you wish to do. Once you've finished, you should free-up any - * of your resources. The Extern will then rebind the Phaser pipeline and carry on + * of your resources. The Extern will then rebind the Phaser pipeline and carry on * rendering the display list. - * + * * Although this object has lots of properties such as Alpha, Blend Mode and Tint, none of * them are used during rendering unless you take advantage of them in your own render code. * @@ -89249,6 +93082,21 @@ var Extern = new Class({ function Extern (scene) { GameObject.call(this, scene, 'Extern'); + + this.on(GameObjectEvents.ADDED_TO_SCENE, this.addedToScene, this); + this.on(GameObjectEvents.REMOVED_FROM_SCENE, this.removedFromScene, this); + }, + + // Overrides Game Object method + addedToScene: function () + { + this.scene.sys.updateList.add(this); + }, + + // Overrides Game Object method + removedFromScene: function () + { + this.scene.sys.updateList.remove(this); }, preUpdate: function () @@ -89269,7 +93117,7 @@ module.exports = Extern; /***/ }), -/* 398 */ +/* 411 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89278,8 +93126,8 @@ module.exports = Extern; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CircumferencePoint = __webpack_require__(199); -var FromPercent = __webpack_require__(88); +var CircumferencePoint = __webpack_require__(202); +var FromPercent = __webpack_require__(89); var MATH_CONST = __webpack_require__(13); var Point = __webpack_require__(4); @@ -89312,7 +93160,7 @@ module.exports = GetPoint; /***/ }), -/* 399 */ +/* 412 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89321,9 +93169,9 @@ module.exports = GetPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circumference = __webpack_require__(400); -var CircumferencePoint = __webpack_require__(199); -var FromPercent = __webpack_require__(88); +var Circumference = __webpack_require__(413); +var CircumferencePoint = __webpack_require__(202); +var FromPercent = __webpack_require__(89); var MATH_CONST = __webpack_require__(13); /** @@ -89366,7 +93214,7 @@ module.exports = GetPoints; /***/ }), -/* 400 */ +/* 413 */ /***/ (function(module, exports) { /** @@ -89398,7 +93246,7 @@ module.exports = Circumference; /***/ }), -/* 401 */ +/* 414 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89407,7 +93255,7 @@ module.exports = Circumference; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Commands = __webpack_require__(198); +var Commands = __webpack_require__(201); var SetTransform = __webpack_require__(28); /** @@ -89648,7 +93496,598 @@ module.exports = GraphicsCanvasRenderer; /***/ }), -/* 402 */ +/* 415 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var FloatBetween = __webpack_require__(126); +var GetEaseFunction = __webpack_require__(71); +var GetFastValue = __webpack_require__(2); +var Wrap = __webpack_require__(59); + +/** + * @classdesc + * A Particle Emitter property. + * + * Facilitates changing Particle properties as they are emitted and throughout their lifetime. + * + * @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 {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) + { + if (emitOnly === undefined) + { + emitOnly = false; + } + + /** + * The name of this property. + * + * @name Phaser.GameObjects.Particles.EmitterOp#propertyKey + * @type {string} + * @since 3.0.0 + */ + this.propertyKey = key; + + /** + * The value of this property. + * + * @name Phaser.GameObjects.Particles.EmitterOp#propertyValue + * @type {number} + * @since 3.0.0 + */ + this.propertyValue = defaultValue; + + /** + * The default value of this property. + * + * @name Phaser.GameObjects.Particles.EmitterOp#defaultValue + * @type {number} + * @since 3.0.0 + */ + this.defaultValue = defaultValue; + + /** + * The number of steps for stepped easing between {@link Phaser.GameObjects.Particles.EmitterOp#start} and + * {@link Phaser.GameObjects.Particles.EmitterOp#end} values, per emit. + * + * @name Phaser.GameObjects.Particles.EmitterOp#steps + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.steps = 0; + + /** + * The step counter for stepped easing, per emit. + * + * @name Phaser.GameObjects.Particles.EmitterOp#counter + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.counter = 0; + + /** + * The start value for this property to ease between. + * + * @name Phaser.GameObjects.Particles.EmitterOp#start + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.start = 0; + + /** + * The end value for this property to ease between. + * + * @name Phaser.GameObjects.Particles.EmitterOp#end + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.end = 0; + + /** + * The easing function to use for updating this property. + * + * @name Phaser.GameObjects.Particles.EmitterOp#ease + * @type {?function} + * @since 3.0.0 + */ + this.ease; + + /** + * Whether this property can only be modified when a Particle is emitted. + * + * Set to `true` to allow only {@link Phaser.GameObjects.Particles.EmitterOp#onEmit} callbacks to be set and + * affect this property. + * + * Set to `false` to allow both {@link Phaser.GameObjects.Particles.EmitterOp#onEmit} and + * {@link Phaser.GameObjects.Particles.EmitterOp#onUpdate} callbacks to be set and affect this property. + * + * @name Phaser.GameObjects.Particles.EmitterOp#emitOnly + * @type {boolean} + * @since 3.0.0 + */ + this.emitOnly = emitOnly; + + /** + * The callback to run for Particles when they are emitted from the Particle Emitter. + * + * @name Phaser.GameObjects.Particles.EmitterOp#onEmit + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitCallback} + * @since 3.0.0 + */ + this.onEmit = this.defaultEmit; + + /** + * The callback to run for Particles when they are updated. + * + * @name Phaser.GameObjects.Particles.EmitterOp#onUpdate + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateCallback} + * @since 3.0.0 + */ + this.onUpdate = this.defaultUpdate; + + this.loadConfig(config); + }, + + /** + * Load the property from a Particle Emitter configuration object. + * + * Optionally accepts a new property key to use, replacing the current one. + * + * @method Phaser.GameObjects.Particles.EmitterOp#loadConfig + * @since 3.0.0 + * + * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} [config] - Settings for the Particle Emitter that owns this property. + * @param {string} [newKey] - The new key to use for this property, if any. + */ + loadConfig: function (config, newKey) + { + if (config === undefined) + { + config = {}; + } + + if (newKey) + { + this.propertyKey = newKey; + } + + this.propertyValue = GetFastValue( + config, + this.propertyKey, + this.defaultValue + ); + + this.setMethods(); + + if (this.emitOnly) + { + // Reset it back again + this.onUpdate = this.defaultUpdate; + } + }, + + /** + * Build a JSON representation of this Particle Emitter property. + * + * @method Phaser.GameObjects.Particles.EmitterOp#toJSON + * @since 3.0.0 + * + * @return {object} A JSON representation of this Particle Emitter property. + */ + toJSON: function () + { + return this.propertyValue; + }, + + /** + * Change the current value of the property and update its callback methods. + * + * @method Phaser.GameObjects.Particles.EmitterOp#onChange + * @since 3.0.0 + * + * @param {number} value - The value of the property. + * + * @return {this} This Emitter Op object. + */ + onChange: function (value) + { + this.propertyValue = value; + + return this.setMethods(); + }, + + /** + * 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}. + * + * @method Phaser.GameObjects.Particles.EmitterOp#setMethods + * @since 3.0.0 + * + * @return {this} This Emitter Op object. + */ + setMethods: function () + { + var value = this.propertyValue; + + var t = typeof value; + + if (t === 'number') + { + // Explicit static value: + // x: 400 + + this.onEmit = this.staticValueEmit; + this.onUpdate = this.staticValueUpdate; // How? + } + else if (Array.isArray(value)) + { + // Picks a random element from the array: + // x: [ 100, 200, 300, 400 ] + + this.onEmit = this.randomStaticValueEmit; + } + 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) + { + this.onEmit = value; + } + else + { + this.onUpdate = value; + } + } + else if (t === 'object' && (this.has(value, 'random') || this.hasBoth(value, 'start', 'end') || this.hasBoth(value, 'min', 'max'))) + { + this.start = this.has(value, 'start') ? value.start : value.min; + this.end = this.has(value, 'end') ? value.end : value.max; + + var isRandom = (this.hasBoth(value, 'min', 'max') || !!value.random); + + // A random starting value (using 'min | max' instead of 'start | end' automatically implies a random value) + + // x: { start: 100, end: 400, random: true } OR { min: 100, max: 400 } OR { random: [ 100, 400 ] } + + if (isRandom) + { + var rnd = value.random; + + // x: { random: [ 100, 400 ] } = the same as doing: x: { start: 100, end: 400, random: true } + if (Array.isArray(rnd)) + { + this.start = rnd[0]; + this.end = rnd[1]; + } + + this.onEmit = this.randomRangedValueEmit; + } + + if (this.has(value, 'steps')) + { + // 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; + } + else + { + // An eased range (defaults to Linear if not specified) + + // x: { start: 100, end: 400, [ ease: 'Linear' ] } + + var easeType = this.has(value, 'ease') ? value.ease : 'Linear'; + + this.ease = GetEaseFunction(easeType); + + if (!isRandom) + { + this.onEmit = this.easedValueEmit; + } + + // BUG: alpha, rotate, scaleX, scaleY, or tint are eased here if {min, max} is given. + // Probably this branch should exclude isRandom entirely. + + this.onUpdate = this.easeValueUpdate; + } + } + else if (t === 'object' && this.hasEither(value, 'onEmit', 'onUpdate')) + { + // Custom onEmit and onUpdate callbacks + + /* + x: { + // Called at the start of the particles life, when it is being created + onEmit: function (particle, key, t, value) + { + return value; + }, + + // Called during the particles life on each update + onUpdate: function (particle, key, t, value) + { + return value; + } + } + */ + + if (this.has(value, 'onEmit')) + { + this.onEmit = value.onEmit; + } + + if (this.has(value, 'onUpdate')) + { + this.onUpdate = value.onUpdate; + } + } + + return this; + }, + + /** + * Check whether an object has the given property. + * + * @method Phaser.GameObjects.Particles.EmitterOp#has + * @since 3.0.0 + * + * @param {object} object - The object to check. + * @param {string} key - The key of the property to look for in the object. + * + * @return {boolean} `true` if the property exists in the object, `false` otherwise. + */ + has: function (object, key) + { + return object.hasOwnProperty(key); + }, + + /** + * Check whether an object has both of the given properties. + * + * @method Phaser.GameObjects.Particles.EmitterOp#hasBoth + * @since 3.0.0 + * + * @param {object} object - The object to check. + * @param {string} key1 - The key of the first property to check the object for. + * @param {string} key2 - The key of the second property to check the object for. + * + * @return {boolean} `true` if both properties exist in the object, `false` otherwise. + */ + hasBoth: function (object, key1, key2) + { + return object.hasOwnProperty(key1) && object.hasOwnProperty(key2); + }, + + /** + * Check whether an object has at least one of the given properties. + * + * @method Phaser.GameObjects.Particles.EmitterOp#hasEither + * @since 3.0.0 + * + * @param {object} object - The object to check. + * @param {string} key1 - The key of the first property to check the object for. + * @param {string} key2 - The key of the second property to check the object for. + * + * @return {boolean} `true` if at least one of the properties exists in the object, `false` if neither exist. + */ + hasEither: function (object, key1, key2) + { + return object.hasOwnProperty(key1) || object.hasOwnProperty(key2); + }, + + /** + * The returned value sets what the property will be at the START of the particles life, on emit. + * + * @method Phaser.GameObjects.Particles.EmitterOp#defaultEmit + * @since 3.0.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. + */ + defaultEmit: function (particle, key, value) + { + return value; + }, + + /** + * The returned value updates the property for the duration of the particles life. + * + * @method Phaser.GameObjects.Particles.EmitterOp#defaultUpdate + * @since 3.0.0 + * + * @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} value - The current value of the property. + * + * @return {number} The new value of the property. + */ + defaultUpdate: function (particle, key, t, value) + { + return value; + }, + + /** + * An `onEmit` callback that returns the current value of the property. + * + * @method Phaser.GameObjects.Particles.EmitterOp#staticValueEmit + * @since 3.0.0 + * + * @return {number} The current value of the property. + */ + staticValueEmit: function () + { + return this.propertyValue; + }, + + /** + * An `onUpdate` callback that returns the current value of the property. + * + * @method Phaser.GameObjects.Particles.EmitterOp#staticValueUpdate + * @since 3.0.0 + * + * @return {number} The current value of the property. + */ + staticValueUpdate: function () + { + return this.propertyValue; + }, + + /** + * An `onEmit` callback that returns a random value from the current value array. + * + * @method Phaser.GameObjects.Particles.EmitterOp#randomStaticValueEmit + * @since 3.0.0 + * + * @return {number} The new value of the property. + */ + randomStaticValueEmit: function () + { + var randomIndex = Math.floor(Math.random() * this.propertyValue.length); + + return this.propertyValue[randomIndex]; + }, + + /** + * 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#randomRangedValueEmit + * @since 3.0.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. + */ + randomRangedValueEmit: function (particle, key) + { + var value = FloatBetween(this.start, this.end); + + if (particle && particle.data[key]) + { + particle.data[key].min = value; + } + + return value; + }, + + /** + * An `onEmit` callback that returns a stepped value between the + * {@link Phaser.GameObjects.Particles.EmitterOp#start} and {@link Phaser.GameObjects.Particles.EmitterOp#end} + * range. + * + * @method Phaser.GameObjects.Particles.EmitterOp#steppedEmit + * @since 3.0.0 + * + * @return {number} The new value of the property. + */ + steppedEmit: function () + { + var current = this.counter; + + var next = this.counter + (this.end - this.start) / this.steps; + + this.counter = Wrap(next, this.start, this.end); + + return current; + }, + + /** + * An `onEmit` callback for an eased property. + * + * It prepares the particle for easing by {@link Phaser.GameObjects.Particles.EmitterOp#easeValueUpdate}. + * + * @method Phaser.GameObjects.Particles.EmitterOp#easedValueEmit + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Particles.Particle} particle - The particle. + * @param {string} key - The name of the property. + * + * @return {number} {@link Phaser.GameObjects.Particles.EmitterOp#start}, as the new value of the property. + */ + easedValueEmit: function (particle, key) + { + if (particle && particle.data[key]) + { + var data = particle.data[key]; + + data.min = this.start; + data.max = this.end; + } + + return this.start; + }, + + /** + * An `onUpdate` callback that returns an eased value between the + * {@link Phaser.GameObjects.Particles.EmitterOp#start} and {@link Phaser.GameObjects.Particles.EmitterOp#end} + * range. + * + * @method Phaser.GameObjects.Particles.EmitterOp#easeValueUpdate + * @since 3.0.0 + * + * @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) + * + * @return {number} The new value of the property. + */ + easeValueUpdate: function (particle, key, t) + { + var data = particle.data[key]; + + return (data.max - data.min) * this.ease(t) + data.min; + } +}); + +module.exports = EmitterOp; + + +/***/ }), +/* 416 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89867,7 +94306,7 @@ module.exports = GravityWell; /***/ }), -/* 403 */ +/* 417 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89877,8 +94316,8 @@ module.exports = GravityWell; */ var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(40); -var DistanceBetween = __webpack_require__(54); +var DegToRad = __webpack_require__(41); +var DistanceBetween = __webpack_require__(55); /** * @classdesc @@ -90436,7 +94875,7 @@ module.exports = Particle; /***/ }), -/* 404 */ +/* 418 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90445,22 +94884,22 @@ module.exports = Particle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlendModes = __webpack_require__(53); +var BlendModes = __webpack_require__(54); var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var DeathZone = __webpack_require__(405); -var EdgeZone = __webpack_require__(406); -var EmitterOp = __webpack_require__(983); +var Components = __webpack_require__(11); +var DeathZone = __webpack_require__(419); +var EdgeZone = __webpack_require__(420); +var EmitterOp = __webpack_require__(415); var GetFastValue = __webpack_require__(2); -var GetRandom = __webpack_require__(191); -var HasAny = __webpack_require__(407); -var HasValue = __webpack_require__(112); -var Particle = __webpack_require__(403); -var RandomZone = __webpack_require__(408); +var GetRandom = __webpack_require__(194); +var HasAny = __webpack_require__(421); +var HasValue = __webpack_require__(113); +var Particle = __webpack_require__(417); +var RandomZone = __webpack_require__(422); var Rectangle = __webpack_require__(9); -var StableSort = __webpack_require__(137); +var StableSort = __webpack_require__(138); var Vector2 = __webpack_require__(3); -var Wrap = __webpack_require__(58); +var Wrap = __webpack_require__(59); /** * @classdesc @@ -92265,7 +96704,7 @@ var ParticleEmitter = new Class({ */ depthSort: function () { - StableSort.inplace(this.alive, this.depthSortCallback); + StableSort(this.alive, this.depthSortCallback); return this; }, @@ -92507,7 +96946,7 @@ module.exports = ParticleEmitter; /***/ }), -/* 405 */ +/* 419 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92585,7 +97024,7 @@ module.exports = DeathZone; /***/ }), -/* 406 */ +/* 420 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92829,7 +97268,7 @@ module.exports = EdgeZone; /***/ }), -/* 407 */ +/* 421 */ /***/ (function(module, exports) { /** @@ -92866,7 +97305,7 @@ module.exports = HasAny; /***/ }), -/* 408 */ +/* 422 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92939,7 +97378,7 @@ module.exports = RandomZone; /***/ }), -/* 409 */ +/* 423 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92949,8 +97388,8 @@ module.exports = RandomZone; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var Sprite = __webpack_require__(75); +var Components = __webpack_require__(11); +var Sprite = __webpack_require__(76); /** * @classdesc @@ -93021,7 +97460,89 @@ module.exports = PathFollower; /***/ }), -/* 410 */ +/* 424 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Returns an object containing dimensions of the Text object. + * + * @function Phaser.GameObjects.GetTextSize + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Text} text - The Text object to calculate the size from. + * @param {Phaser.Types.GameObjects.Text.TextMetrics} size - The Text metrics to use when calculating the size. + * @param {string[]} lines - The lines of text to calculate the size from. + * + * @return {Phaser.Types.GameObjects.Text.GetTextSizeObject} An object containing dimensions of the Text object. + */ +var GetTextSize = function (text, size, lines) +{ + var canvas = text.canvas; + var context = text.context; + var style = text.style; + + var lineWidths = []; + var maxLineWidth = 0; + var drawnLines = lines.length; + + if (style.maxLines > 0 && style.maxLines < lines.length) + { + drawnLines = style.maxLines; + } + + style.syncFont(canvas, context); + + // Text Width + + for (var i = 0; i < drawnLines; i++) + { + var lineWidth = style.strokeThickness; + + lineWidth += context.measureText(lines[i]).width; + + // Adjust for wrapped text + if (style.wordWrap) + { + lineWidth -= context.measureText(' ').width; + } + + lineWidths[i] = Math.ceil(lineWidth); + maxLineWidth = Math.max(maxLineWidth, lineWidths[i]); + } + + // Text Height + + var lineHeight = size.fontSize + style.strokeThickness; + var height = lineHeight * drawnLines; + var lineSpacing = text.lineSpacing; + + // Adjust for line spacing + if (drawnLines > 1) + { + height += lineSpacing * (drawnLines - 1); + } + + return { + width: maxLineWidth, + height: height, + lines: drawnLines, + lineWidths: lineWidths, + lineSpacing: lineSpacing, + lineHeight: lineHeight + }; +}; + +module.exports = GetTextSize; + + +/***/ }), +/* 425 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93030,13 +97551,1254 @@ module.exports = PathFollower; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcRender = __webpack_require__(1009); var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(40); -var Earcut = __webpack_require__(66); -var GeomCircle = __webpack_require__(65); +var GetAdvancedValue = __webpack_require__(15); +var GetValue = __webpack_require__(6); +var MeasureText = __webpack_require__(426); + +// Key: [ Object Key, Default Value ] + +var propertyMap = { + 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', false ], + shadowFill: [ 'shadow.fill', false ], + align: [ 'align', 'left' ], + maxLines: [ 'maxLines', 0 ], + fixedWidth: [ 'fixedWidth', 0 ], + fixedHeight: [ 'fixedHeight', 0 ], + resolution: [ 'resolution', 0 ], + rtl: [ 'rtl', false ], + 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', false ] +}; + +/** + * @classdesc + * A TextStyle class manages all of the style settings for a Text object. + * + * Text Game Objects create a TextStyle instance automatically, which is + * accessed via the `Text.style` property. You do not normally need to + * instantiate one yourself. + * + * @class TextStyle + * @memberof Phaser.GameObjects + * @constructor + * @since 3.0.0 + * + * @param {Phaser.GameObjects.Text} text - The Text object that this TextStyle is styling. + * @param {Phaser.Types.GameObjects.Text.TextStyle} style - The style settings to set. + */ +var TextStyle = new Class({ + + initialize: + + function TextStyle (text, style) + { + /** + * The Text object that this TextStyle is styling. + * + * @name Phaser.GameObjects.TextStyle#parent + * @type {Phaser.GameObjects.Text} + * @since 3.0.0 + */ + this.parent = text; + + /** + * The font family. + * + * @name Phaser.GameObjects.TextStyle#fontFamily + * @type {string} + * @default 'Courier' + * @since 3.0.0 + */ + this.fontFamily; + + /** + * The font size. + * + * @name Phaser.GameObjects.TextStyle#fontSize + * @type {string} + * @default '16px' + * @since 3.0.0 + */ + this.fontSize; + + /** + * The font style. + * + * @name Phaser.GameObjects.TextStyle#fontStyle + * @type {string} + * @since 3.0.0 + */ + this.fontStyle; + + /** + * The background color. + * + * @name Phaser.GameObjects.TextStyle#backgroundColor + * @type {string} + * @since 3.0.0 + */ + this.backgroundColor; + + /** + * The text fill color. + * + * @name Phaser.GameObjects.TextStyle#color + * @type {string} + * @default '#fff' + * @since 3.0.0 + */ + this.color; + + /** + * The text stroke color. + * + * @name Phaser.GameObjects.TextStyle#stroke + * @type {string} + * @default '#fff' + * @since 3.0.0 + */ + this.stroke; + + /** + * The text stroke thickness. + * + * @name Phaser.GameObjects.TextStyle#strokeThickness + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.strokeThickness; + + /** + * The horizontal shadow offset. + * + * @name Phaser.GameObjects.TextStyle#shadowOffsetX + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.shadowOffsetX; + + /** + * The vertical shadow offset. + * + * @name Phaser.GameObjects.TextStyle#shadowOffsetY + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.shadowOffsetY; + + /** + * The shadow color. + * + * @name Phaser.GameObjects.TextStyle#shadowColor + * @type {string} + * @default '#000' + * @since 3.0.0 + */ + this.shadowColor; + + /** + * The shadow blur radius. + * + * @name Phaser.GameObjects.TextStyle#shadowBlur + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.shadowBlur; + + /** + * Whether shadow stroke is enabled or not. + * + * @name Phaser.GameObjects.TextStyle#shadowStroke + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.shadowStroke; + + /** + * Whether shadow fill is enabled or not. + * + * @name Phaser.GameObjects.TextStyle#shadowFill + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.shadowFill; + + /** + * The text alignment. + * + * @name Phaser.GameObjects.TextStyle#align + * @type {string} + * @default 'left' + * @since 3.0.0 + */ + this.align; + + /** + * The maximum number of lines to draw. + * + * @name Phaser.GameObjects.TextStyle#maxLines + * @type {integer} + * @default 0 + * @since 3.0.0 + */ + this.maxLines; + + /** + * The fixed width of the text. + * + * `0` means no fixed with. + * + * @name Phaser.GameObjects.TextStyle#fixedWidth + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.fixedWidth; + + /** + * The fixed height of the text. + * + * `0` means no fixed height. + * + * @name Phaser.GameObjects.TextStyle#fixedHeight + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.fixedHeight; + + /** + * The resolution the text is rendered to its internal canvas at. + * The default is 0, which means it will use the resolution set in the Game Config. + * + * @name Phaser.GameObjects.TextStyle#resolution + * @type {number} + * @default 0 + * @since 3.12.0 + */ + this.resolution; + + /** + * Whether the text should render right to left. + * + * @name Phaser.GameObjects.TextStyle#rtl + * @type {boolean} + * @default false + * @since 3.0.0 + */ + this.rtl; + + /** + * The test string to use when measuring the font. + * + * @name Phaser.GameObjects.TextStyle#testString + * @type {string} + * @default '|MÉqgy' + * @since 3.0.0 + */ + this.testString; + + /** + * The amount of horizontal padding added to the width of the text when calculating the font metrics. + * + * @name Phaser.GameObjects.TextStyle#baselineX + * @type {number} + * @default 1.2 + * @since 3.3.0 + */ + this.baselineX; + + /** + * The amount of vertical padding added to the height of the text when calculating the font metrics. + * + * @name Phaser.GameObjects.TextStyle#baselineY + * @type {number} + * @default 1.4 + * @since 3.3.0 + */ + this.baselineY; + + /** + * The maximum width of a line of text in pixels. Null means no line wrapping. Setting this + * property directly will not re-run the word wrapping algorithm. To change the width and + * re-wrap, use {@link Phaser.GameObjects.TextStyle#setWordWrapWidth}. + * + * @name Phaser.GameObjects.TextStyle#wordWrapWidth + * @type {number | null} + * @default null + * @since 3.24.0 + */ + this.wordWrapWidth; + + /** + * A custom function that will be responsible for wrapping the text. It will receive two + * arguments: text (the string to wrap), textObject (this Text instance). It should return + * the wrapped lines either as an array of lines or as a string with newline characters in + * place to indicate where breaks should happen. Setting this directly will not re-run the + * word wrapping algorithm. To change the callback and re-wrap, use + * {@link Phaser.GameObjects.TextStyle#setWordWrapCallback}. + * + * @name Phaser.GameObjects.TextStyle#wordWrapCallback + * @type {TextStyleWordWrapCallback | null} + * @default null + * @since 3.24.0 + */ + this.wordWrapCallback; + + /** + * The scope that will be applied when the wordWrapCallback is invoked. Setting this directly will not re-run the + * word wrapping algorithm. To change the callback and re-wrap, use + * {@link Phaser.GameObjects.TextStyle#setWordWrapCallback}. + * + * @name Phaser.GameObjects.TextStyle#wordWrapCallbackScope + * @type {object | null} + * @default null + * @since 3.24.0 + */ + this.wordWrapCallbackScope; + + /** + * Whether or not to use the advanced wrapping algorithm. If true, spaces are collapsed and + * whitespace is trimmed from lines. If false, spaces and whitespace are left as is. Setting + * this property directly will not re-run the word wrapping algorithm. To change the + * advanced setting and re-wrap, use {@link Phaser.GameObjects.TextStyle#setWordWrapWidth}. + * + * @name Phaser.GameObjects.TextStyle#wordWrapUseAdvanced + * @type {boolean} + * @default false + * @since 3.24.0 + */ + this.wordWrapUseAdvanced; + + /** + * The font style, size and family. + * + * @name Phaser.GameObjects.TextStyle#_font + * @type {string} + * @private + * @since 3.0.0 + */ + this._font; + + // Set to defaults + user style + this.setStyle(style, false, true); + + var metrics = GetValue(style, 'metrics', false); + + // Provide optional TextMetrics in the style object to avoid the canvas look-up / scanning + // Doing this is reset if you then change the font of this TextStyle after creation + if (metrics) + { + this.metrics = { + ascent: GetValue(metrics, 'ascent', 0), + descent: GetValue(metrics, 'descent', 0), + fontSize: GetValue(metrics, 'fontSize', 0) + }; + } + else + { + this.metrics = MeasureText(this); + } + }, + + /** + * Set the text style. + * + * @example + * text.setStyle({ + * fontSize: '64px', + * fontFamily: 'Arial', + * color: '#ffffff', + * align: 'center', + * backgroundColor: '#ff00ff' + * }); + * + * @method Phaser.GameObjects.TextStyle#setStyle + * @since 3.0.0 + * + * @param {Phaser.Types.GameObjects.Text.TextStyle} style - The style settings to set. + * @param {boolean} [updateText=true] - Whether to update the text immediately. + * @param {boolean} [setDefaults=false] - Use the default values is not set, or the local values. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setStyle: function (style, updateText, setDefaults) + { + if (updateText === undefined) { updateText = true; } + if (setDefaults === undefined) { setDefaults = false; } + + // Avoid type mutation + // eslint-disable-next-line no-prototype-builtins + if (style && style.hasOwnProperty('fontSize') && typeof style.fontSize === 'number') + { + style.fontSize = style.fontSize.toString() + 'px'; + } + + for (var key in propertyMap) + { + var value = (setDefaults) ? propertyMap[key][1] : this[key]; + + if (key === 'wordWrapCallback' || key === 'wordWrapCallbackScope') + { + // Callback & scope should be set without processing the values + this[key] = GetValue(style, propertyMap[key][0], value); + } + else + { + this[key] = GetAdvancedValue(style, propertyMap[key][0], value); + } + } + + // Allow for 'font' override + var font = GetValue(style, 'font', null); + + if (font !== null) + { + this.setFont(font, false); + } + + this._font = [ this.fontStyle, this.fontSize, this.fontFamily ].join(' ').trim(); + + // Allow for 'fill' to be used in place of 'color' + var fill = GetValue(style, 'fill', null); + + if (fill !== null) + { + this.color = fill; + } + + if (updateText) + { + return this.update(true); + } + else + { + return this.parent; + } + }, + + /** + * Synchronize the font settings to the given Canvas Rendering Context. + * + * @method Phaser.GameObjects.TextStyle#syncFont + * @since 3.0.0 + * + * @param {HTMLCanvasElement} canvas - The Canvas Element. + * @param {CanvasRenderingContext2D} context - The Canvas Rendering Context. + */ + syncFont: function (canvas, context) + { + context.font = this._font; + }, + + /** + * Synchronize the text style settings to the given Canvas Rendering Context. + * + * @method Phaser.GameObjects.TextStyle#syncStyle + * @since 3.0.0 + * + * @param {HTMLCanvasElement} canvas - The Canvas Element. + * @param {CanvasRenderingContext2D} context - The Canvas Rendering Context. + */ + syncStyle: function (canvas, context) + { + context.textBaseline = 'alphabetic'; + + context.fillStyle = this.color; + context.strokeStyle = this.stroke; + + context.lineWidth = this.strokeThickness; + context.lineCap = 'round'; + context.lineJoin = 'round'; + }, + + /** + * Synchronize the shadow settings to the given Canvas Rendering Context. + * + * @method Phaser.GameObjects.TextStyle#syncShadow + * @since 3.0.0 + * + * @param {CanvasRenderingContext2D} context - The Canvas Rendering Context. + * @param {boolean} enabled - Whether shadows are enabled or not. + */ + syncShadow: function (context, enabled) + { + if (enabled) + { + context.shadowOffsetX = this.shadowOffsetX; + context.shadowOffsetY = this.shadowOffsetY; + context.shadowColor = this.shadowColor; + context.shadowBlur = this.shadowBlur; + } + else + { + context.shadowOffsetX = 0; + context.shadowOffsetY = 0; + context.shadowColor = 0; + context.shadowBlur = 0; + } + }, + + /** + * Update the style settings for the parent Text object. + * + * @method Phaser.GameObjects.TextStyle#update + * @since 3.0.0 + * + * @param {boolean} recalculateMetrics - Whether to recalculate font and text metrics. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + update: function (recalculateMetrics) + { + if (recalculateMetrics) + { + this._font = [ this.fontStyle, this.fontSize, this.fontFamily ].join(' ').trim(); + + this.metrics = MeasureText(this); + } + + return this.parent.updateText(); + }, + + /** + * Set the font. + * + * If a string is given, the font family is set. + * + * If an object is given, the `fontFamily`, `fontSize` and `fontStyle` + * properties of that object are set. + * + * @method Phaser.GameObjects.TextStyle#setFont + * @since 3.0.0 + * + * @param {(string|object)} font - The font family or font settings to set. + * @param {boolean} [updateText=true] - Whether to update the text immediately. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setFont: function (font, updateText) + { + if (updateText === undefined) { updateText = true; } + + var fontFamily = font; + var fontSize = ''; + var fontStyle = ''; + + if (typeof font !== 'string') + { + fontFamily = GetValue(font, 'fontFamily', 'Courier'); + fontSize = GetValue(font, 'fontSize', '16px'); + fontStyle = GetValue(font, 'fontStyle', ''); + } + else + { + var fontSplit = font.split(' '); + + var i = 0; + + fontStyle = (fontSplit.length > 2) ? fontSplit[i++] : ''; + fontSize = fontSplit[i++] || '16px'; + fontFamily = fontSplit[i++] || 'Courier'; + } + + if (fontFamily !== this.fontFamily || fontSize !== this.fontSize || fontStyle !== this.fontStyle) + { + this.fontFamily = fontFamily; + this.fontSize = fontSize; + this.fontStyle = fontStyle; + + if (updateText) + { + this.update(true); + } + } + + return this.parent; + }, + + /** + * Set the font family. + * + * @method Phaser.GameObjects.TextStyle#setFontFamily + * @since 3.0.0 + * + * @param {string} family - The font family. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setFontFamily: function (family) + { + if (this.fontFamily !== family) + { + this.fontFamily = family; + + this.update(true); + } + + return this.parent; + }, + + /** + * Set the font style. + * + * @method Phaser.GameObjects.TextStyle#setFontStyle + * @since 3.0.0 + * + * @param {string} style - The font style. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setFontStyle: function (style) + { + if (this.fontStyle !== style) + { + this.fontStyle = style; + + this.update(true); + } + + return this.parent; + }, + + /** + * Set the font size. + * + * @method Phaser.GameObjects.TextStyle#setFontSize + * @since 3.0.0 + * + * @param {(number|string)} size - The font size. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setFontSize: function (size) + { + if (typeof size === 'number') + { + size = size.toString() + 'px'; + } + + if (this.fontSize !== size) + { + this.fontSize = size; + + this.update(true); + } + + return this.parent; + }, + + /** + * Set the test string to use when measuring the font. + * + * @method Phaser.GameObjects.TextStyle#setTestString + * @since 3.0.0 + * + * @param {string} string - The test string to use when measuring the font. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setTestString: function (string) + { + this.testString = string; + + return this.update(true); + }, + + /** + * Set a fixed width and height for the text. + * + * Pass in `0` for either of these parameters to disable fixed width or height respectively. + * + * @method Phaser.GameObjects.TextStyle#setFixedSize + * @since 3.0.0 + * + * @param {number} width - The fixed width to set. + * @param {number} height - The fixed height to set. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setFixedSize: function (width, height) + { + this.fixedWidth = width; + this.fixedHeight = height; + + if (width) + { + this.parent.width = width; + } + + if (height) + { + this.parent.height = height; + } + + return this.update(false); + }, + + /** + * Set the background color. + * + * @method Phaser.GameObjects.TextStyle#setBackgroundColor + * @since 3.0.0 + * + * @param {string} color - The background color. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setBackgroundColor: function (color) + { + this.backgroundColor = color; + + return this.update(false); + }, + + /** + * Set the text fill color. + * + * @method Phaser.GameObjects.TextStyle#setFill + * @since 3.0.0 + * + * @param {string} color - The text fill color. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setFill: function (color) + { + this.color = color; + + return this.update(false); + }, + + /** + * Set the text fill color. + * + * @method Phaser.GameObjects.TextStyle#setColor + * @since 3.0.0 + * + * @param {string} color - The text fill color. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setColor: function (color) + { + this.color = color; + + return this.update(false); + }, + + /** + * Set the resolution used by the Text object. + * + * By default it will be set to match the resolution set in the Game Config, + * but you can override it via this method. It allows for much clearer text on High DPI devices, + * at the cost of memory because it uses larger internal Canvas textures for the Text. + * + * Please use with caution, as the more high res Text you have, the more memory it uses up. + * + * @method Phaser.GameObjects.TextStyle#setResolution + * @since 3.12.0 + * + * @param {number} value - The resolution for this Text object to use. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setResolution: function (value) + { + this.resolution = value; + + return this.update(false); + }, + + /** + * Set the stroke settings. + * + * @method Phaser.GameObjects.TextStyle#setStroke + * @since 3.0.0 + * + * @param {string} color - The stroke color. + * @param {number} thickness - The stroke thickness. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setStroke: function (color, thickness) + { + if (thickness === undefined) { thickness = this.strokeThickness; } + + if (color === undefined && this.strokeThickness !== 0) + { + // Reset the stroke to zero (disabling it) + this.strokeThickness = 0; + + this.update(true); + } + else if (this.stroke !== color || this.strokeThickness !== thickness) + { + this.stroke = color; + this.strokeThickness = thickness; + + this.update(true); + } + + return this.parent; + }, + + /** + * Set the shadow settings. + * + * Calling this method always re-measures the parent Text object, + * so only call it when you actually change the shadow settings. + * + * @method Phaser.GameObjects.TextStyle#setShadow + * @since 3.0.0 + * + * @param {number} [x=0] - The horizontal shadow offset. + * @param {number} [y=0] - The vertical shadow offset. + * @param {string} [color='#000'] - The shadow color. + * @param {number} [blur=0] - The shadow blur radius. + * @param {boolean} [shadowStroke=false] - Whether to stroke the shadow. + * @param {boolean} [shadowFill=true] - Whether to fill the shadow. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setShadow: function (x, y, color, blur, shadowStroke, shadowFill) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + if (color === undefined) { color = '#000'; } + if (blur === undefined) { blur = 0; } + if (shadowStroke === undefined) { shadowStroke = false; } + if (shadowFill === undefined) { shadowFill = true; } + + this.shadowOffsetX = x; + this.shadowOffsetY = y; + this.shadowColor = color; + this.shadowBlur = blur; + this.shadowStroke = shadowStroke; + this.shadowFill = shadowFill; + + return this.update(false); + }, + + /** + * Set the shadow offset. + * + * @method Phaser.GameObjects.TextStyle#setShadowOffset + * @since 3.0.0 + * + * @param {number} [x=0] - The horizontal shadow offset. + * @param {number} [y=0] - The vertical shadow offset. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setShadowOffset: function (x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = x; } + + this.shadowOffsetX = x; + this.shadowOffsetY = y; + + return this.update(false); + }, + + /** + * Set the shadow color. + * + * @method Phaser.GameObjects.TextStyle#setShadowColor + * @since 3.0.0 + * + * @param {string} [color='#000'] - The shadow color. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setShadowColor: function (color) + { + if (color === undefined) { color = '#000'; } + + this.shadowColor = color; + + return this.update(false); + }, + + /** + * Set the shadow blur radius. + * + * @method Phaser.GameObjects.TextStyle#setShadowBlur + * @since 3.0.0 + * + * @param {number} [blur=0] - The shadow blur radius. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setShadowBlur: function (blur) + { + if (blur === undefined) { blur = 0; } + + this.shadowBlur = blur; + + return this.update(false); + }, + + /** + * Enable or disable shadow stroke. + * + * @method Phaser.GameObjects.TextStyle#setShadowStroke + * @since 3.0.0 + * + * @param {boolean} enabled - Whether shadow stroke is enabled or not. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setShadowStroke: function (enabled) + { + this.shadowStroke = enabled; + + return this.update(false); + }, + + /** + * Enable or disable shadow fill. + * + * @method Phaser.GameObjects.TextStyle#setShadowFill + * @since 3.0.0 + * + * @param {boolean} enabled - Whether shadow fill is enabled or not. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setShadowFill: function (enabled) + { + this.shadowFill = enabled; + + return this.update(false); + }, + + /** + * Set the width (in pixels) to use for wrapping lines. + * + * Pass in null to remove wrapping by width. + * + * @method Phaser.GameObjects.TextStyle#setWordWrapWidth + * @since 3.0.0 + * + * @param {number} width - The maximum width of a line in pixels. Set to null to remove wrapping. + * @param {boolean} [useAdvancedWrap=false] - Whether or not to use the advanced wrapping + * algorithm. If true, spaces are collapsed and whitespace is trimmed from lines. If false, + * spaces and whitespace are left as is. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setWordWrapWidth: function (width, useAdvancedWrap) + { + if (useAdvancedWrap === undefined) { useAdvancedWrap = false; } + + this.wordWrapWidth = width; + this.wordWrapUseAdvanced = useAdvancedWrap; + + return this.update(false); + }, + + /** + * Set a custom callback for wrapping lines. + * + * Pass in null to remove wrapping by callback. + * + * @method Phaser.GameObjects.TextStyle#setWordWrapCallback + * @since 3.0.0 + * + * @param {TextStyleWordWrapCallback} callback - A custom function that will be responsible for wrapping the + * text. It will receive two arguments: text (the string to wrap), textObject (this Text + * instance). It should return the wrapped lines either as an array of lines or as a string with + * newline characters in place to indicate where breaks should happen. + * @param {object} [scope=null] - The scope that will be applied when the callback is invoked. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setWordWrapCallback: function (callback, scope) + { + if (scope === undefined) { scope = null; } + + this.wordWrapCallback = callback; + this.wordWrapCallbackScope = scope; + + return this.update(false); + }, + + /** + * Set the alignment of the text in this Text object. + * + * The argument can be one of: `left`, `right`, `center` or `justify`. + * + * Alignment only works if the Text object has more than one line of text. + * + * @method Phaser.GameObjects.TextStyle#setAlign + * @since 3.0.0 + * + * @param {string} [align='left'] - The text alignment for multi-line text. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setAlign: function (align) + { + if (align === undefined) { align = 'left'; } + + this.align = align; + + return this.update(false); + }, + + /** + * Set the maximum number of lines to draw. + * + * @method Phaser.GameObjects.TextStyle#setMaxLines + * @since 3.0.0 + * + * @param {integer} [max=0] - The maximum number of lines to draw. + * + * @return {Phaser.GameObjects.Text} The parent Text object. + */ + setMaxLines: function (max) + { + if (max === undefined) { max = 0; } + + this.maxLines = max; + + return this.update(false); + }, + + /** + * Get the current text metrics. + * + * @method Phaser.GameObjects.TextStyle#getTextMetrics + * @since 3.0.0 + * + * @return {Phaser.Types.GameObjects.Text.TextMetrics} The text metrics. + */ + getTextMetrics: function () + { + var metrics = this.metrics; + + return { + ascent: metrics.ascent, + descent: metrics.descent, + fontSize: metrics.fontSize + }; + }, + + /** + * Build a JSON representation of this Text Style. + * + * @method Phaser.GameObjects.TextStyle#toJSON + * @since 3.0.0 + * + * @return {object} A JSON representation of this Text Style. + */ + toJSON: function () + { + var output = {}; + + for (var key in propertyMap) + { + output[key] = this[key]; + } + + output.metrics = this.getTextMetrics(); + + return output; + }, + + /** + * Destroy this Text Style. + * + * @method Phaser.GameObjects.TextStyle#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.parent = undefined; + } + +}); + +module.exports = TextStyle; + + +/***/ }), +/* 426 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CanvasPool = __webpack_require__(26); + +/** + * Calculates the ascent, descent and fontSize of a given font style. + * + * @function Phaser.GameObjects.MeasureText + * @since 3.0.0 + * + * @param {Phaser.GameObjects.TextStyle} textStyle - The TextStyle object to measure. + * + * @return {Phaser.Types.GameObjects.Text.TextMetrics} An object containing the ascent, descent and fontSize of the TextStyle. + */ +var MeasureText = function (textStyle) +{ + // @property {HTMLCanvasElement} canvas - The canvas element that the text is rendered. + var canvas = CanvasPool.create(this); + + // @property {HTMLCanvasElement} context - The context of the canvas element that the text is rendered to. + var context = canvas.getContext('2d'); + + textStyle.syncFont(canvas, context); + + var width = Math.ceil(context.measureText(textStyle.testString).width * textStyle.baselineX); + var baseline = width; + var height = 2 * baseline; + + baseline = baseline * textStyle.baselineY | 0; + + canvas.width = width; + canvas.height = height; + + context.fillStyle = '#f00'; + context.fillRect(0, 0, width, height); + + context.font = textStyle._font; + + context.textBaseline = 'alphabetic'; + context.fillStyle = '#000'; + context.fillText(textStyle.testString, 0, baseline); + + var output = { + ascent: 0, + descent: 0, + fontSize: 0 + }; + + if (!context.getImageData(0, 0, width, height)) + { + output.ascent = baseline; + output.descent = baseline + 6; + output.fontSize = output.ascent + output.descent; + + CanvasPool.remove(canvas); + + return output; + } + + var imagedata = context.getImageData(0, 0, width, height).data; + var pixels = imagedata.length; + var line = width * 4; + var i; + var j; + var idx = 0; + var stop = false; + + // ascent. scan from top to bottom until we find a non red pixel + for (i = 0; i < baseline; i++) + { + for (j = 0; j < line; j += 4) + { + if (imagedata[idx + j] !== 255) + { + stop = true; + break; + } + } + + if (!stop) + { + idx += line; + } + else + { + break; + } + } + + output.ascent = baseline - i; + + idx = pixels - line; + stop = false; + + // descent. scan from bottom to top until we find a non red pixel + for (i = height; i > baseline; i--) + { + for (j = 0; j < line; j += 4) + { + if (imagedata[idx + j] !== 255) + { + stop = true; + break; + } + } + + if (!stop) + { + idx -= line; + } + else + { + break; + } + } + + output.descent = (i - baseline); + output.fontSize = output.ascent + output.descent; + + CanvasPool.remove(canvas); + + return output; +}; + +module.exports = MeasureText; + + +/***/ }), +/* 427 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var ArcRender = __webpack_require__(1016); +var Class = __webpack_require__(0); +var DegToRad = __webpack_require__(41); +var Earcut = __webpack_require__(60); +var GeomCircle = __webpack_require__(68); var MATH_CONST = __webpack_require__(13); -var Shape = __webpack_require__(29); +var Shape = __webpack_require__(30); /** * @classdesc @@ -93430,7 +99192,7 @@ module.exports = Arc; /***/ }), -/* 411 */ +/* 428 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93440,10 +99202,10 @@ module.exports = Arc; */ var Class = __webpack_require__(0); -var CurveRender = __webpack_require__(1012); -var Earcut = __webpack_require__(66); +var CurveRender = __webpack_require__(1019); +var Earcut = __webpack_require__(60); var Rectangle = __webpack_require__(9); -var Shape = __webpack_require__(29); +var Shape = __webpack_require__(30); /** * @classdesc @@ -93612,7 +99374,7 @@ module.exports = Curve; /***/ }), -/* 412 */ +/* 429 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93622,10 +99384,10 @@ module.exports = Curve; */ var Class = __webpack_require__(0); -var Earcut = __webpack_require__(66); -var EllipseRender = __webpack_require__(1015); -var GeomEllipse = __webpack_require__(96); -var Shape = __webpack_require__(29); +var Earcut = __webpack_require__(60); +var EllipseRender = __webpack_require__(1022); +var GeomEllipse = __webpack_require__(97); +var Shape = __webpack_require__(30); /** * @classdesc @@ -93799,7 +99561,7 @@ module.exports = Ellipse; /***/ }), -/* 413 */ +/* 430 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93809,8 +99571,8 @@ module.exports = Ellipse; */ var Class = __webpack_require__(0); -var Shape = __webpack_require__(29); -var GridRender = __webpack_require__(1018); +var Shape = __webpack_require__(30); +var GridRender = __webpack_require__(1025); /** * @classdesc @@ -93818,9 +99580,9 @@ var GridRender = __webpack_require__(1018); * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling * it for input or physics. It provides a quick and easy way for you to render this shape in your * game without using a texture, while still taking advantage of being fully batched in WebGL. - * + * * This shape supports only fill colors and cannot be stroked. - * + * * A Grid Shape allows you to display a grid in your game, where you can control the size of the * grid as well as the width and height of the grid cells. You can set a fill color for each grid * cell as well as an alternate fill color. When the alternate fill color is set then the grid @@ -93955,32 +99717,25 @@ var Grid = new Class({ this.setPosition(x, y); this.setSize(width, height); - if (fillColor !== undefined) - { - this.setFillStyle(fillColor, fillAlpha); - } - - if (outlineFillColor !== undefined) - { - this.setOutlineStyle(outlineFillColor, outlineFillAlpha); - } + this.setFillStyle(fillColor, fillAlpha); + this.setOutlineStyle(outlineFillColor, outlineFillAlpha); this.updateDisplayOrigin(); }, /** * Sets the fill color and alpha level the grid cells will use when rendering. - * - * If this method is called with no values then the grid cells will not be rendered, + * + * If this method is called with no values then the grid cells will not be rendered, * however the grid lines and alternating cells may still be. - * + * * Also see the `setOutlineStyle` and `setAltFillStyle` methods. - * + * * This call can be chained. * * @method Phaser.GameObjects.Grid#setFillStyle * @since 3.13.0 - * + * * @param {number} [fillColor] - The color the grid cells will be filled with, i.e. 0xff0000 for red. * @param {number} [fillAlpha=1] - The alpha the grid cells will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. * @@ -94006,16 +99761,16 @@ var Grid = new Class({ /** * Sets the fill color and alpha level that the alternating grid cells will use. - * + * * If this method is called with no values then alternating grid cells will not be rendered in a different color. - * + * * Also see the `setOutlineStyle` and `setFillStyle` methods. - * + * * This call can be chained. * * @method Phaser.GameObjects.Grid#setAltFillStyle * @since 3.13.0 - * + * * @param {number} [fillColor] - The color the alternating grid cells will be filled with, i.e. 0xff0000 for red. * @param {number} [fillAlpha=1] - The alpha the alternating grid cells will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. * @@ -94041,17 +99796,17 @@ var Grid = new Class({ /** * Sets the fill color and alpha level that the lines between each grid cell will use. - * + * * If this method is called with no values then the grid lines will not be rendered at all, however * the cells themselves may still be if they have colors set. - * + * * Also see the `setFillStyle` and `setAltFillStyle` methods. - * + * * This call can be chained. * * @method Phaser.GameObjects.Grid#setOutlineStyle * @since 3.13.0 - * + * * @param {number} [fillColor] - The color the lines between the grid cells will be filled with, i.e. 0xff0000 for red. * @param {number} [fillAlpha=1] - The alpha the lines between the grid cells will be filled with. You can also set the alpha of the overall Shape using its `alpha` property. * @@ -94081,7 +99836,7 @@ module.exports = Grid; /***/ }), -/* 414 */ +/* 431 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94090,9 +99845,9 @@ module.exports = Grid; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var IsoBoxRender = __webpack_require__(1021); +var IsoBoxRender = __webpack_require__(1028); var Class = __webpack_require__(0); -var Shape = __webpack_require__(29); +var Shape = __webpack_require__(30); /** * @classdesc @@ -94296,7 +100051,7 @@ module.exports = IsoBox; /***/ }), -/* 415 */ +/* 432 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94306,8 +100061,8 @@ module.exports = IsoBox; */ var Class = __webpack_require__(0); -var IsoTriangleRender = __webpack_require__(1024); -var Shape = __webpack_require__(29); +var IsoTriangleRender = __webpack_require__(1031); +var Shape = __webpack_require__(30); /** * @classdesc @@ -94542,7 +100297,7 @@ module.exports = IsoTriangle; /***/ }), -/* 416 */ +/* 433 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94552,9 +100307,9 @@ module.exports = IsoTriangle; */ var Class = __webpack_require__(0); -var Shape = __webpack_require__(29); -var GeomLine = __webpack_require__(39); -var LineRender = __webpack_require__(1027); +var Shape = __webpack_require__(30); +var GeomLine = __webpack_require__(40); +var LineRender = __webpack_require__(1034); /** * @classdesc @@ -94709,7 +100464,7 @@ module.exports = Line; /***/ }), -/* 417 */ +/* 434 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94718,13 +100473,13 @@ module.exports = Line; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PolygonRender = __webpack_require__(1030); +var PolygonRender = __webpack_require__(1037); var Class = __webpack_require__(0); -var Earcut = __webpack_require__(66); -var GetAABB = __webpack_require__(418); -var GeomPolygon = __webpack_require__(207); -var Shape = __webpack_require__(29); -var Smooth = __webpack_require__(421); +var Earcut = __webpack_require__(60); +var GetAABB = __webpack_require__(435); +var GeomPolygon = __webpack_require__(210); +var Shape = __webpack_require__(30); +var Smooth = __webpack_require__(438); /** * @classdesc @@ -94848,7 +100603,7 @@ module.exports = Polygon; /***/ }), -/* 418 */ +/* 435 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94904,7 +100659,7 @@ module.exports = GetAABB; /***/ }), -/* 419 */ +/* 436 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94913,9 +100668,9 @@ module.exports = GetAABB; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Length = __webpack_require__(57); -var Line = __webpack_require__(39); -var Perimeter = __webpack_require__(420); +var Length = __webpack_require__(58); +var Line = __webpack_require__(40); +var Perimeter = __webpack_require__(437); /** * Returns an array of Point objects containing the coordinates of the points around the perimeter of the Polygon, @@ -94981,7 +100736,7 @@ module.exports = GetPoints; /***/ }), -/* 420 */ +/* 437 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94990,8 +100745,8 @@ module.exports = GetPoints; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Length = __webpack_require__(57); -var Line = __webpack_require__(39); +var Length = __webpack_require__(58); +var Line = __webpack_require__(40); /** * Returns the perimeter of the given Polygon. @@ -95029,7 +100784,7 @@ module.exports = Perimeter; /***/ }), -/* 421 */ +/* 438 */ /***/ (function(module, exports) { /** @@ -95105,7 +100860,7 @@ module.exports = Smooth; /***/ }), -/* 422 */ +/* 439 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95116,8 +100871,8 @@ module.exports = Smooth; var Class = __webpack_require__(0); var GeomRectangle = __webpack_require__(9); -var Shape = __webpack_require__(29); -var RectangleRender = __webpack_require__(1033); +var Shape = __webpack_require__(30); +var RectangleRender = __webpack_require__(1040); /** * @classdesc @@ -95248,7 +101003,7 @@ module.exports = Rectangle; /***/ }), -/* 423 */ +/* 440 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95257,10 +101012,10 @@ module.exports = Rectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var StarRender = __webpack_require__(1036); +var StarRender = __webpack_require__(1043); var Class = __webpack_require__(0); -var Earcut = __webpack_require__(66); -var Shape = __webpack_require__(29); +var Earcut = __webpack_require__(60); +var Shape = __webpack_require__(30); /** * @classdesc @@ -95536,7 +101291,7 @@ module.exports = Star; /***/ }), -/* 424 */ +/* 441 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95546,9 +101301,9 @@ module.exports = Star; */ var Class = __webpack_require__(0); -var Shape = __webpack_require__(29); -var GeomTriangle = __webpack_require__(71); -var TriangleRender = __webpack_require__(1039); +var Shape = __webpack_require__(30); +var GeomTriangle = __webpack_require__(73); +var TriangleRender = __webpack_require__(1046); /** * @classdesc @@ -95679,7 +101434,7 @@ module.exports = Triangle; /***/ }), -/* 425 */ +/* 442 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95689,7 +101444,7 @@ module.exports = Triangle; */ var Point = __webpack_require__(4); -var Length = __webpack_require__(57); +var Length = __webpack_require__(58); /** * Returns a Point from around the perimeter of a Triangle. @@ -95766,7 +101521,7 @@ module.exports = GetPoint; /***/ }), -/* 426 */ +/* 443 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95775,7 +101530,7 @@ module.exports = GetPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Length = __webpack_require__(57); +var Length = __webpack_require__(58); var Point = __webpack_require__(4); /** @@ -95859,7 +101614,7 @@ module.exports = GetPoints; /***/ }), -/* 427 */ +/* 444 */ /***/ (function(module, exports) { /** @@ -95942,7 +101697,7 @@ module.exports = SetValue; /***/ }), -/* 428 */ +/* 445 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96433,7 +102188,7 @@ module.exports = Light; /***/ }), -/* 429 */ +/* 446 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96443,7 +102198,7 @@ module.exports = Light; */ var Class = __webpack_require__(0); -var Light = __webpack_require__(428); +var Light = __webpack_require__(445); var Utils = __webpack_require__(10); /** @@ -96802,7 +102557,7 @@ module.exports = LightsManager; /***/ }), -/* 430 */ +/* 447 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96811,7 +102566,7 @@ module.exports = LightsManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(48); +var CONST = __webpack_require__(49); var Extend = __webpack_require__(19); /** @@ -96820,14 +102575,14 @@ var Extend = __webpack_require__(19); var Geom = { - Circle: __webpack_require__(1099), - Ellipse: __webpack_require__(1109), - Intersects: __webpack_require__(431), - Line: __webpack_require__(1129), - Point: __webpack_require__(1151), - Polygon: __webpack_require__(1165), - Rectangle: __webpack_require__(447), - Triangle: __webpack_require__(1198) + Circle: __webpack_require__(1106), + Ellipse: __webpack_require__(1116), + Intersects: __webpack_require__(448), + Line: __webpack_require__(1136), + Point: __webpack_require__(1158), + Polygon: __webpack_require__(1172), + Rectangle: __webpack_require__(464), + Triangle: __webpack_require__(1205) }; @@ -96838,7 +102593,7 @@ module.exports = Geom; /***/ }), -/* 431 */ +/* 448 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96853,39 +102608,39 @@ module.exports = Geom; module.exports = { - CircleToCircle: __webpack_require__(211), - CircleToRectangle: __webpack_require__(212), - GetCircleToCircle: __webpack_require__(1119), - GetCircleToRectangle: __webpack_require__(1120), - GetLineToCircle: __webpack_require__(213), - GetLineToLine: __webpack_require__(432), - GetLineToPoints: __webpack_require__(433), - GetLineToPolygon: __webpack_require__(434), - GetLineToRectangle: __webpack_require__(215), - GetRaysFromPointToPolygon: __webpack_require__(1121), - GetRectangleIntersection: __webpack_require__(1122), - GetRectangleToRectangle: __webpack_require__(1123), - GetRectangleToTriangle: __webpack_require__(1124), - GetTriangleToCircle: __webpack_require__(1125), - GetTriangleToLine: __webpack_require__(439), - GetTriangleToTriangle: __webpack_require__(1126), - LineToCircle: __webpack_require__(214), - LineToLine: __webpack_require__(85), - LineToRectangle: __webpack_require__(435), - PointToLine: __webpack_require__(443), - PointToLineSegment: __webpack_require__(1127), - RectangleToRectangle: __webpack_require__(141), - RectangleToTriangle: __webpack_require__(436), - RectangleToValues: __webpack_require__(1128), - TriangleToCircle: __webpack_require__(438), - TriangleToLine: __webpack_require__(440), - TriangleToTriangle: __webpack_require__(441) + CircleToCircle: __webpack_require__(214), + CircleToRectangle: __webpack_require__(215), + GetCircleToCircle: __webpack_require__(1126), + GetCircleToRectangle: __webpack_require__(1127), + GetLineToCircle: __webpack_require__(216), + GetLineToLine: __webpack_require__(449), + GetLineToPoints: __webpack_require__(450), + GetLineToPolygon: __webpack_require__(451), + GetLineToRectangle: __webpack_require__(218), + GetRaysFromPointToPolygon: __webpack_require__(1128), + GetRectangleIntersection: __webpack_require__(1129), + GetRectangleToRectangle: __webpack_require__(1130), + GetRectangleToTriangle: __webpack_require__(1131), + GetTriangleToCircle: __webpack_require__(1132), + GetTriangleToLine: __webpack_require__(456), + GetTriangleToTriangle: __webpack_require__(1133), + LineToCircle: __webpack_require__(217), + LineToLine: __webpack_require__(86), + LineToRectangle: __webpack_require__(452), + PointToLine: __webpack_require__(460), + PointToLineSegment: __webpack_require__(1134), + RectangleToRectangle: __webpack_require__(142), + RectangleToTriangle: __webpack_require__(453), + RectangleToValues: __webpack_require__(1135), + TriangleToCircle: __webpack_require__(455), + TriangleToLine: __webpack_require__(457), + TriangleToTriangle: __webpack_require__(458) }; /***/ }), -/* 432 */ +/* 449 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96894,7 +102649,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector3 = __webpack_require__(80); +var Vector3 = __webpack_require__(81); /** * Checks for intersection between the two line segments and returns the intersection point as a Vector3, @@ -96954,7 +102709,7 @@ module.exports = GetLineToLine; /***/ }), -/* 433 */ +/* 450 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96963,9 +102718,9 @@ module.exports = GetLineToLine; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector3 = __webpack_require__(80); -var GetLineToLine = __webpack_require__(432); -var Line = __webpack_require__(39); +var Vector3 = __webpack_require__(81); +var GetLineToLine = __webpack_require__(449); +var Line = __webpack_require__(40); // Temp calculation segment var segment = new Line(); @@ -97031,7 +102786,7 @@ module.exports = GetLineToPoints; /***/ }), -/* 434 */ +/* 451 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97040,9 +102795,9 @@ module.exports = GetLineToPoints; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector3 = __webpack_require__(80); -var Vector4 = __webpack_require__(126); -var GetLineToPoints = __webpack_require__(433); +var Vector3 = __webpack_require__(81); +var Vector4 = __webpack_require__(128); +var GetLineToPoints = __webpack_require__(450); // Temp vec3 var tempIntersect = new Vector3(); @@ -97102,7 +102857,7 @@ module.exports = GetLineToPolygon; /***/ }), -/* 435 */ +/* 452 */ /***/ (function(module, exports) { /** @@ -97203,7 +102958,7 @@ module.exports = LineToRectangle; /***/ }), -/* 436 */ +/* 453 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97212,10 +102967,10 @@ module.exports = LineToRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var LineToLine = __webpack_require__(85); -var Contains = __webpack_require__(49); -var ContainsArray = __webpack_require__(216); -var Decompose = __webpack_require__(437); +var LineToLine = __webpack_require__(86); +var Contains = __webpack_require__(50); +var ContainsArray = __webpack_require__(219); +var Decompose = __webpack_require__(454); /** * Checks for intersection between Rectangle shape and Triangle shape. @@ -97296,7 +103051,7 @@ module.exports = RectangleToTriangle; /***/ }), -/* 437 */ +/* 454 */ /***/ (function(module, exports) { /** @@ -97333,7 +103088,7 @@ module.exports = Decompose; /***/ }), -/* 438 */ +/* 455 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97342,8 +103097,8 @@ module.exports = Decompose; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var LineToCircle = __webpack_require__(214); -var Contains = __webpack_require__(84); +var LineToCircle = __webpack_require__(217); +var Contains = __webpack_require__(85); /** * Checks if a Triangle and a Circle intersect. @@ -97398,7 +103153,7 @@ module.exports = TriangleToCircle; /***/ }), -/* 439 */ +/* 456 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97409,8 +103164,8 @@ module.exports = TriangleToCircle; */ var Point = __webpack_require__(4); -var TriangleToLine = __webpack_require__(440); -var LineToLine = __webpack_require__(85); +var TriangleToLine = __webpack_require__(457); +var LineToLine = __webpack_require__(86); /** * Checks if a Triangle and a Line intersect, and returns the intersection points as a Point object array. @@ -97457,7 +103212,7 @@ module.exports = GetTriangleToLine; /***/ }), -/* 440 */ +/* 457 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97466,8 +103221,8 @@ module.exports = GetTriangleToLine; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(84); -var LineToLine = __webpack_require__(85); +var Contains = __webpack_require__(85); +var LineToLine = __webpack_require__(86); /** * Checks if a Triangle and a Line intersect. @@ -97513,7 +103268,7 @@ module.exports = TriangleToLine; /***/ }), -/* 441 */ +/* 458 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97522,9 +103277,9 @@ module.exports = TriangleToLine; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ContainsArray = __webpack_require__(216); -var Decompose = __webpack_require__(442); -var LineToLine = __webpack_require__(85); +var ContainsArray = __webpack_require__(219); +var Decompose = __webpack_require__(459); +var LineToLine = __webpack_require__(86); /** * Checks if two Triangles intersect. @@ -97603,7 +103358,7 @@ module.exports = TriangleToTriangle; /***/ }), -/* 442 */ +/* 459 */ /***/ (function(module, exports) { /** @@ -97638,7 +103393,7 @@ module.exports = Decompose; /***/ }), -/* 443 */ +/* 460 */ /***/ (function(module, exports) { /** @@ -97708,7 +103463,7 @@ module.exports = PointToLine; /***/ }), -/* 444 */ +/* 461 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97718,8 +103473,8 @@ module.exports = PointToLine; */ var MATH_CONST = __webpack_require__(13); -var Wrap = __webpack_require__(58); -var Angle = __webpack_require__(86); +var Wrap = __webpack_require__(59); +var Angle = __webpack_require__(87); /** * Get the angle of the normal of the given line in radians. @@ -97742,7 +103497,7 @@ module.exports = NormalAngle; /***/ }), -/* 445 */ +/* 462 */ /***/ (function(module, exports) { /** @@ -97770,7 +103525,7 @@ module.exports = GetMagnitude; /***/ }), -/* 446 */ +/* 463 */ /***/ (function(module, exports) { /** @@ -97798,7 +103553,7 @@ module.exports = GetMagnitudeSq; /***/ }), -/* 447 */ +/* 464 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97809,50 +103564,50 @@ module.exports = GetMagnitudeSq; var Rectangle = __webpack_require__(9); -Rectangle.Area = __webpack_require__(1172); -Rectangle.Ceil = __webpack_require__(1173); -Rectangle.CeilAll = __webpack_require__(1174); -Rectangle.CenterOn = __webpack_require__(174); -Rectangle.Clone = __webpack_require__(1175); -Rectangle.Contains = __webpack_require__(49); -Rectangle.ContainsPoint = __webpack_require__(1176); -Rectangle.ContainsRect = __webpack_require__(448); -Rectangle.CopyFrom = __webpack_require__(1177); -Rectangle.Decompose = __webpack_require__(437); -Rectangle.Equals = __webpack_require__(1178); -Rectangle.FitInside = __webpack_require__(1179); -Rectangle.FitOutside = __webpack_require__(1180); -Rectangle.Floor = __webpack_require__(1181); -Rectangle.FloorAll = __webpack_require__(1182); -Rectangle.FromPoints = __webpack_require__(182); -Rectangle.FromXY = __webpack_require__(1183); -Rectangle.GetAspectRatio = __webpack_require__(218); -Rectangle.GetCenter = __webpack_require__(1184); -Rectangle.GetPoint = __webpack_require__(157); -Rectangle.GetPoints = __webpack_require__(278); -Rectangle.GetSize = __webpack_require__(1185); -Rectangle.Inflate = __webpack_require__(1186); -Rectangle.Intersection = __webpack_require__(1187); -Rectangle.MarchingAnts = __webpack_require__(289); -Rectangle.MergePoints = __webpack_require__(1188); -Rectangle.MergeRect = __webpack_require__(1189); -Rectangle.MergeXY = __webpack_require__(1190); -Rectangle.Offset = __webpack_require__(1191); -Rectangle.OffsetPoint = __webpack_require__(1192); -Rectangle.Overlaps = __webpack_require__(1193); +Rectangle.Area = __webpack_require__(1179); +Rectangle.Ceil = __webpack_require__(1180); +Rectangle.CeilAll = __webpack_require__(1181); +Rectangle.CenterOn = __webpack_require__(176); +Rectangle.Clone = __webpack_require__(1182); +Rectangle.Contains = __webpack_require__(50); +Rectangle.ContainsPoint = __webpack_require__(1183); +Rectangle.ContainsRect = __webpack_require__(465); +Rectangle.CopyFrom = __webpack_require__(1184); +Rectangle.Decompose = __webpack_require__(454); +Rectangle.Equals = __webpack_require__(1185); +Rectangle.FitInside = __webpack_require__(1186); +Rectangle.FitOutside = __webpack_require__(1187); +Rectangle.Floor = __webpack_require__(1188); +Rectangle.FloorAll = __webpack_require__(1189); +Rectangle.FromPoints = __webpack_require__(184); +Rectangle.FromXY = __webpack_require__(1190); +Rectangle.GetAspectRatio = __webpack_require__(221); +Rectangle.GetCenter = __webpack_require__(1191); +Rectangle.GetPoint = __webpack_require__(159); +Rectangle.GetPoints = __webpack_require__(282); +Rectangle.GetSize = __webpack_require__(1192); +Rectangle.Inflate = __webpack_require__(1193); +Rectangle.Intersection = __webpack_require__(1194); +Rectangle.MarchingAnts = __webpack_require__(293); +Rectangle.MergePoints = __webpack_require__(1195); +Rectangle.MergeRect = __webpack_require__(1196); +Rectangle.MergeXY = __webpack_require__(1197); +Rectangle.Offset = __webpack_require__(1198); +Rectangle.OffsetPoint = __webpack_require__(1199); +Rectangle.Overlaps = __webpack_require__(1200); Rectangle.Perimeter = __webpack_require__(116); -Rectangle.PerimeterPoint = __webpack_require__(1194); -Rectangle.Random = __webpack_require__(160); -Rectangle.RandomOutside = __webpack_require__(1195); -Rectangle.SameDimensions = __webpack_require__(1196); -Rectangle.Scale = __webpack_require__(1197); -Rectangle.Union = __webpack_require__(394); +Rectangle.PerimeterPoint = __webpack_require__(1201); +Rectangle.Random = __webpack_require__(162); +Rectangle.RandomOutside = __webpack_require__(1202); +Rectangle.SameDimensions = __webpack_require__(1203); +Rectangle.Scale = __webpack_require__(1204); +Rectangle.Union = __webpack_require__(407); module.exports = Rectangle; /***/ }), -/* 448 */ +/* 465 */ /***/ (function(module, exports) { /** @@ -97892,7 +103647,7 @@ module.exports = ContainsRect; /***/ }), -/* 449 */ +/* 466 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97936,7 +103691,7 @@ module.exports = Centroid; /***/ }), -/* 450 */ +/* 467 */ /***/ (function(module, exports) { /** @@ -97977,7 +103732,7 @@ module.exports = Offset; /***/ }), -/* 451 */ +/* 468 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98042,7 +103797,43 @@ module.exports = InCenter; /***/ }), -/* 452 */ +/* 469 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Creates a new Pixel Perfect Handler function. + * + * Access via `InputPlugin.makePixelPerfect` rather than calling it directly. + * + * @function Phaser.Input.CreatePixelPerfectHandler + * @since 3.10.0 + * + * @param {Phaser.Textures.TextureManager} textureManager - A reference to the Texture Manager. + * @param {integer} alphaTolerance - The alpha level that the pixel should be above to be included as a successful interaction. + * + * @return {function} The new Pixel Perfect Handler function. + */ +var CreatePixelPerfectHandler = function (textureManager, alphaTolerance) +{ + return function (hitArea, x, y, gameObject) + { + var alpha = textureManager.getPixelAlpha(x, y, gameObject.texture.key, gameObject.frame.name); + + return (alpha && alpha >= alphaTolerance); + }; +}; + +module.exports = CreatePixelPerfectHandler; + + +/***/ }), +/* 470 */ /***/ (function(module, exports) { /** @@ -98113,7 +103904,7 @@ module.exports = CreateInteractiveObject; /***/ }), -/* 453 */ +/* 471 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98238,7 +104029,7 @@ module.exports = Axis; /***/ }), -/* 454 */ +/* 472 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98248,7 +104039,7 @@ module.exports = Axis; */ var Class = __webpack_require__(0); -var Events = __webpack_require__(220); +var Events = __webpack_require__(223); /** * @classdesc @@ -98384,7 +104175,7 @@ module.exports = Button; /***/ }), -/* 455 */ +/* 473 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98393,10 +104184,10 @@ module.exports = Button; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Axis = __webpack_require__(453); -var Button = __webpack_require__(454); +var Axis = __webpack_require__(471); +var Button = __webpack_require__(472); var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(11); +var EventEmitter = __webpack_require__(12); var Vector2 = __webpack_require__(3); /** @@ -99142,7 +104933,7 @@ module.exports = Gamepad; /***/ }), -/* 456 */ +/* 474 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99152,8 +104943,8 @@ module.exports = Gamepad; */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(143); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(144); /** * @classdesc @@ -99544,7 +105335,7 @@ module.exports = Key; /***/ }), -/* 457 */ +/* 475 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99554,10 +105345,10 @@ module.exports = Key; */ var Class = __webpack_require__(0); -var Events = __webpack_require__(143); +var Events = __webpack_require__(144); var GetFastValue = __webpack_require__(2); -var ProcessKeyCombo = __webpack_require__(1237); -var ResetKeyCombo = __webpack_require__(1239); +var ProcessKeyCombo = __webpack_require__(1243); +var ResetKeyCombo = __webpack_require__(1245); /** * @classdesc @@ -99837,7 +105628,7 @@ module.exports = KeyCombo; /***/ }), -/* 458 */ +/* 476 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99846,7 +105637,7 @@ module.exports = KeyCombo; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MergeXHRSettings = __webpack_require__(221); +var MergeXHRSettings = __webpack_require__(224); /** * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings @@ -99918,7 +105709,7 @@ module.exports = XHRLoader; /***/ }), -/* 459 */ +/* 477 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99929,10 +105720,10 @@ module.exports = XHRLoader; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var File = __webpack_require__(21); +var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); -var HTML5AudioFile = __webpack_require__(460); +var HTML5AudioFile = __webpack_require__(478); var IsPlainObject = __webpack_require__(7); /** @@ -100192,7 +105983,7 @@ module.exports = AudioFile; /***/ }), -/* 460 */ +/* 478 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100202,10 +105993,10 @@ module.exports = AudioFile; */ var Class = __webpack_require__(0); -var Events = __webpack_require__(83); -var File = __webpack_require__(21); +var Events = __webpack_require__(84); +var File = __webpack_require__(22); var GetFastValue = __webpack_require__(2); -var GetURL = __webpack_require__(144); +var GetURL = __webpack_require__(145); var IsPlainObject = __webpack_require__(7); /** @@ -100395,7 +106186,7 @@ module.exports = HTML5AudioFile; /***/ }), -/* 461 */ +/* 479 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100406,7 +106197,7 @@ module.exports = HTML5AudioFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var File = __webpack_require__(21); +var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -100566,7 +106357,7 @@ module.exports = ScriptFile; /***/ }), -/* 462 */ +/* 480 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100577,7 +106368,7 @@ module.exports = ScriptFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var File = __webpack_require__(21); +var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -100741,7 +106532,7 @@ module.exports = TextFile; /***/ }), -/* 463 */ +/* 481 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100750,12 +106541,12 @@ module.exports = TextFile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeImage = __webpack_require__(464); -var ArcadeSprite = __webpack_require__(146); +var ArcadeImage = __webpack_require__(482); +var ArcadeSprite = __webpack_require__(147); var Class = __webpack_require__(0); -var CONST = __webpack_require__(51); -var PhysicsGroup = __webpack_require__(465); -var StaticPhysicsGroup = __webpack_require__(466); +var CONST = __webpack_require__(52); +var PhysicsGroup = __webpack_require__(484); +var StaticPhysicsGroup = __webpack_require__(485); /** * @classdesc @@ -101014,7 +106805,7 @@ module.exports = Factory; /***/ }), -/* 464 */ +/* 482 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101024,8 +106815,8 @@ module.exports = Factory; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(223); -var Image = __webpack_require__(111); +var Components = __webpack_require__(226); +var Image = __webpack_require__(112); /** * @classdesc @@ -101114,7 +106905,75 @@ module.exports = ArcadeImage; /***/ }), -/* 465 */ +/* 483 */ +/***/ (function(module, exports, __webpack_require__) { + +var OverlapRect = __webpack_require__(227); +var Circle = __webpack_require__(68); +var CircleToCircle = __webpack_require__(214); +var CircleToRectangle = __webpack_require__(215); + +/** + * This method will search the given circular area and return an array of all physics bodies that + * overlap with it. It can return either Dynamic, Static bodies or a mixture of both. + * + * A body only has to intersect with the search area to be considered, it doesn't have to be fully + * contained within it. + * + * If Arcade Physics is set to use the RTree (which it is by default) then the search is rather fast, + * otherwise the search is O(N) for Dynamic Bodies. + * + * @function Phaser.Physics.Arcade.Components.OverlapCirc + * @since 3.21.0 + * + * @param {number} x - The x coordinate of the center of the area to search within. + * @param {number} y - The y coordinate of the center of the area to search within. + * @param {number} radius - The radius of the area to search within. + * @param {boolean} [includeDynamic=true] - Should the search include Dynamic Bodies? + * @param {boolean} [includeStatic=false] - Should the search include Static Bodies? + * + * @return {(Phaser.Physics.Arcade.Body[]|Phaser.Physics.Arcade.StaticBody[])} An array of bodies that overlap with the given area. + */ +var OverlapCirc = function (world, x, y, radius, includeDynamic, includeStatic) +{ + var bodiesInRect = OverlapRect(world, x - radius, y - radius, 2 * radius, 2 * radius, includeDynamic, includeStatic); + + if (bodiesInRect.length === 0) + { + return bodiesInRect; + } + + var area = new Circle(x, y, radius); + var circFromBody = new Circle(); + var bodiesInArea = []; + + for (var i = 0; i < bodiesInRect.length; i++) + { + var body = bodiesInRect[i]; + + if (body.isCircle) + { + circFromBody.setTo(body.center.x, body.center.y, body.halfWidth); + + if (CircleToCircle(area, circFromBody)) + { + bodiesInArea.push(body); + } + } + else if (CircleToRectangle(area, body)) + { + bodiesInArea.push(body); + } + } + + return bodiesInArea; +}; + +module.exports = OverlapCirc; + + +/***/ }), +/* 484 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101123,21 +106982,30 @@ module.exports = ArcadeImage; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeSprite = __webpack_require__(146); +var ArcadeSprite = __webpack_require__(147); var Class = __webpack_require__(0); -var CONST = __webpack_require__(51); +var CONST = __webpack_require__(52); var GetFastValue = __webpack_require__(2); -var Group = __webpack_require__(98); +var Group = __webpack_require__(99); var IsPlainObject = __webpack_require__(7); /** * @classdesc * An Arcade Physics Group object. * - * All Game Objects created by or added to this Group will automatically be given dynamic Arcade Physics bodies (if they have no body) - * and the bodies will receive the Group's {@link Phaser.Physics.Arcade.Group#defaults default values}. + * The primary use of a Physics Group is a way to collect together physics enable objects + * that share the same intrinsic structure into a single pool. They can they be easily + * compared against other Groups, or Game Objects. * - * Its static counterpart is {@link Phaser.Physics.Arcade.StaticGroup}. + * All Game Objects created by, or added to this Group will automatically be given **dynamic** + * Arcade Physics bodies (if they have no body already) and the bodies will receive the + * Groups {@link Phaser.Physics.Arcade.Group#defaults default values}. + * + * You should not pass objects into this Group that should not receive a body. For example, + * do not add basic Geometry or Tilemap Layers into a Group, as they will not behave in the + * way you may expect. Groups should all ideally have objects of the same type in them. + * + * If you wish to create a Group filled with Static Bodies, please see {@link Phaser.Physics.Arcade.StaticGroup}. * * @class Group * @extends Phaser.GameObjects.Group @@ -101399,7 +107267,7 @@ module.exports = PhysicsGroup; /***/ }), -/* 466 */ +/* 485 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101408,11 +107276,11 @@ module.exports = PhysicsGroup; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeSprite = __webpack_require__(146); +var ArcadeSprite = __webpack_require__(147); var Class = __webpack_require__(0); -var CONST = __webpack_require__(51); +var CONST = __webpack_require__(52); var GetFastValue = __webpack_require__(2); -var Group = __webpack_require__(98); +var Group = __webpack_require__(99); var IsPlainObject = __webpack_require__(7); /** @@ -101598,92 +107466,7 @@ module.exports = StaticPhysicsGroup; /***/ }), -/* 467 */ -/***/ (function(module, exports) { - -/** - * This method will search the given rectangular area and return an array of all physics bodies that - * overlap with it. It can return either Dynamic, Static bodies or a mixture of both. - * - * A body only has to intersect with the search area to be considered, it doesn't have to be fully - * contained within it. - * - * If Arcade Physics is set to use the RTree (which it is by default) then the search for is extremely fast, - * otherwise the search is O(N) for Dynamic Bodies. - * - * @function Phaser.Physics.Arcade.Components.OverlapRect - * @since 3.17.0 - * - * @param {number} x - The top-left x coordinate of the area to search within. - * @param {number} y - The top-left y coordinate of the area to search within. - * @param {number} width - The width of the area to search within. - * @param {number} height - The height of the area to search within. - * @param {boolean} [includeDynamic=true] - Should the search include Dynamic Bodies? - * @param {boolean} [includeStatic=false] - Should the search include Static Bodies? - * - * @return {(Phaser.Physics.Arcade.Body[]|Phaser.Physics.Arcade.StaticBody[])} An array of bodies that overlap with the given area. - */ -var OverlapRect = function (world, x, y, width, height, includeDynamic, includeStatic) -{ - if (includeDynamic === undefined) { includeDynamic = true; } - if (includeStatic === undefined) { includeStatic = false; } - - var dynamicBodies = []; - var staticBodies = []; - - var minMax = world.treeMinMax; - - minMax.minX = x; - minMax.minY = y; - minMax.maxX = x + width; - minMax.maxY = y + height; - - if (includeStatic) - { - staticBodies = world.staticTree.search(minMax); - } - - if (includeDynamic && world.useTree) - { - dynamicBodies = world.tree.search(minMax); - } - else if (includeDynamic) - { - var bodies = world.bodies; - - var fakeBody = - { - position: { - x: x, - y: y - }, - left: x, - top: y, - right: x + width, - bottom: y + height, - isCircle: false - }; - - var intersects = world.intersects; - - bodies.iterate(function (target) - { - if (intersects(target, fakeBody)) - { - dynamicBodies.push(target); - } - - }); - } - - return staticBodies.concat(dynamicBodies); -}; - -module.exports = OverlapRect; - - -/***/ }), -/* 468 */ +/* 486 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101692,35 +107475,35 @@ module.exports = OverlapRect; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AngleBetweenPoints = __webpack_require__(322); -var Body = __webpack_require__(469); +var AngleBetweenPoints = __webpack_require__(330); +var Body = __webpack_require__(487); var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var Collider = __webpack_require__(470); -var CONST = __webpack_require__(51); -var DistanceBetween = __webpack_require__(54); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(224); -var FuzzyEqual = __webpack_require__(107); -var FuzzyGreaterThan = __webpack_require__(326); -var FuzzyLessThan = __webpack_require__(327); -var GetOverlapX = __webpack_require__(471); -var GetOverlapY = __webpack_require__(472); +var Collider = __webpack_require__(488); +var CONST = __webpack_require__(52); +var DistanceBetween = __webpack_require__(55); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(228); +var FuzzyEqual = __webpack_require__(108); +var FuzzyGreaterThan = __webpack_require__(334); +var FuzzyLessThan = __webpack_require__(335); +var GetOverlapX = __webpack_require__(229); +var GetOverlapY = __webpack_require__(230); var GetValue = __webpack_require__(6); var MATH_CONST = __webpack_require__(13); -var ProcessQueue = __webpack_require__(192); -var ProcessTileCallbacks = __webpack_require__(1296); +var ProcessQueue = __webpack_require__(195); +var ProcessTileCallbacks = __webpack_require__(489); var Rectangle = __webpack_require__(9); -var RTree = __webpack_require__(473); -var SeparateTile = __webpack_require__(1297); -var SeparateX = __webpack_require__(1302); -var SeparateY = __webpack_require__(1303); -var Set = __webpack_require__(139); -var StaticBody = __webpack_require__(475); -var TileIntersectsBody = __webpack_require__(474); -var TransformMatrix = __webpack_require__(30); +var RTree = __webpack_require__(490); +var SeparateTile = __webpack_require__(491); +var SeparateX = __webpack_require__(496); +var SeparateY = __webpack_require__(497); +var Set = __webpack_require__(140); +var StaticBody = __webpack_require__(498); +var TileIntersectsBody = __webpack_require__(231); +var TransformMatrix = __webpack_require__(31); var Vector2 = __webpack_require__(3); -var Wrap = __webpack_require__(58); +var Wrap = __webpack_require__(59); /** * @classdesc @@ -101853,7 +107636,7 @@ var World = new Class({ * @default true * @since 3.23.0 */ - this.fixedStep = true; + this.fixedStep = GetValue(config, 'fixedStep', true); /** * The amount of elapsed ms since the last frame. @@ -102601,7 +108384,6 @@ var World = new Class({ * This is called automatically by your Scene and does not need to be invoked directly. * * @method Phaser.Physics.Arcade.World#update - * @protected * @fires Phaser.Physics.Arcade.Events#WORLD_STEP * @since 3.0.0 * @@ -104117,7 +109899,7 @@ module.exports = World; /***/ }), -/* 469 */ +/* 487 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104128,11 +109910,11 @@ module.exports = World; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(51); -var Events = __webpack_require__(224); -var RadToDeg = __webpack_require__(179); +var CONST = __webpack_require__(52); +var Events = __webpack_require__(228); +var RadToDeg = __webpack_require__(181); var Rectangle = __webpack_require__(9); -var RectangleContains = __webpack_require__(49); +var RectangleContains = __webpack_require__(50); var Vector2 = __webpack_require__(3); /** @@ -105056,19 +110838,37 @@ var Body = new Class({ * * @method Phaser.Physics.Arcade.Body#resetFlags * @since 3.18.0 + * + * @param {boolean} [clear=false] - Set the `wasTouching` values to their defaults. */ - resetFlags: function () + resetFlags: function (clear) { + if (clear === undefined) + { + clear = false; + } + // Store and reset collision flags var wasTouching = this.wasTouching; var touching = this.touching; var blocked = this.blocked; - wasTouching.none = touching.none; - wasTouching.up = touching.up; - wasTouching.down = touching.down; - wasTouching.left = touching.left; - wasTouching.right = touching.right; + if (clear) + { + wasTouching.none = true; + wasTouching.up = false; + wasTouching.down = false; + wasTouching.left = false; + wasTouching.right = false; + } + else + { + wasTouching.none = touching.none; + wasTouching.up = touching.up; + wasTouching.down = touching.down; + wasTouching.left = touching.left; + wasTouching.right = touching.right; + } touching.none = true; touching.up = false; @@ -105475,6 +111275,7 @@ var Body = new Class({ this.updateBounds(); this.updateCenter(); + this.resetFlags(true); }, /** @@ -106475,7 +112276,7 @@ module.exports = Body; /***/ }), -/* 470 */ +/* 488 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106658,8 +112459,8 @@ module.exports = Collider; /***/ }), -/* 471 */ -/***/ (function(module, exports, __webpack_require__) { +/* 489 */ +/***/ (function(module, exports) { /** * @author Richard Davey @@ -106667,214 +112468,39 @@ module.exports = Collider; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(51); - /** - * Calculates and returns the horizontal overlap between two arcade physics bodies and sets their properties - * accordingly, including: `touching.left`, `touching.right`, `touching.none` and `overlapX'. + * A function to process the collision callbacks between a single tile and an Arcade Physics enabled Game Object. * - * @function Phaser.Physics.Arcade.GetOverlapX + * @function Phaser.Physics.Arcade.Tilemap.ProcessTileCallbacks * @since 3.0.0 * - * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to separate. - * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to separate. - * @param {boolean} overlapOnly - Is this an overlap only check, or part of separation? - * @param {number} bias - A value added to the delta values during collision checks. Increase it to prevent sprite tunneling(sprites passing through another instead of colliding). + * @param {Phaser.Tilemaps.Tile} tile - The Tile to process. + * @param {Phaser.GameObjects.Sprite} sprite - The Game Object to process with the Tile. * - * @return {number} The amount of overlap. + * @return {boolean} The result of the callback, `true` for further processing, or `false` to skip this pair. */ -var GetOverlapX = function (body1, body2, overlapOnly, bias) +var ProcessTileCallbacks = function (tile, sprite) { - var overlap = 0; - var maxOverlap = body1.deltaAbsX() + body2.deltaAbsX() + bias; - - if (body1._dx === 0 && body2._dx === 0) + // Tile callbacks take priority over layer level callbacks + if (tile.collisionCallback) { - // They overlap but neither of them are moving - body1.embedded = true; - body2.embedded = true; + return !tile.collisionCallback.call(tile.collisionCallbackContext, sprite, tile); } - else if (body1._dx > body2._dx) + else if (tile.layer.callbacks[tile.index]) { - // Body1 is moving right and / or Body2 is moving left - overlap = body1.right - body2.x; - - if ((overlap > maxOverlap && !overlapOnly) || body1.checkCollision.right === false || body2.checkCollision.left === false) - { - overlap = 0; - } - else - { - body1.touching.none = false; - body1.touching.right = true; - - body2.touching.none = false; - body2.touching.left = true; - - if (body2.physicsType === CONST.STATIC_BODY) - { - body1.blocked.none = false; - body1.blocked.right = true; - } - - if (body1.physicsType === CONST.STATIC_BODY) - { - body2.blocked.none = false; - body2.blocked.left = true; - } - } - } - else if (body1._dx < body2._dx) - { - // Body1 is moving left and/or Body2 is moving right - overlap = body1.x - body2.width - body2.x; - - if ((-overlap > maxOverlap && !overlapOnly) || body1.checkCollision.left === false || body2.checkCollision.right === false) - { - overlap = 0; - } - else - { - body1.touching.none = false; - body1.touching.left = true; - - body2.touching.none = false; - body2.touching.right = true; - - if (body2.physicsType === CONST.STATIC_BODY) - { - body1.blocked.none = false; - body1.blocked.left = true; - } - - if (body1.physicsType === CONST.STATIC_BODY) - { - body2.blocked.none = false; - body2.blocked.right = true; - } - } + return !tile.layer.callbacks[tile.index].callback.call( + tile.layer.callbacks[tile.index].callbackContext, sprite, tile + ); } - // Resets the overlapX to zero if there is no overlap, or to the actual pixel value if there is - body1.overlapX = overlap; - body2.overlapX = overlap; - - return overlap; + return true; }; -module.exports = GetOverlapX; +module.exports = ProcessTileCallbacks; /***/ }), -/* 472 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var CONST = __webpack_require__(51); - -/** - * Calculates and returns the vertical overlap between two arcade physics bodies and sets their properties - * accordingly, including: `touching.up`, `touching.down`, `touching.none` and `overlapY'. - * - * @function Phaser.Physics.Arcade.GetOverlapY - * @since 3.0.0 - * - * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to separate. - * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to separate. - * @param {boolean} overlapOnly - Is this an overlap only check, or part of separation? - * @param {number} bias - A value added to the delta values during collision checks. Increase it to prevent sprite tunneling(sprites passing through another instead of colliding). - * - * @return {number} The amount of overlap. - */ -var GetOverlapY = function (body1, body2, overlapOnly, bias) -{ - var overlap = 0; - var maxOverlap = body1.deltaAbsY() + body2.deltaAbsY() + bias; - - if (body1._dy === 0 && body2._dy === 0) - { - // They overlap but neither of them are moving - body1.embedded = true; - body2.embedded = true; - } - else if (body1._dy > body2._dy) - { - // Body1 is moving down and/or Body2 is moving up - overlap = body1.bottom - body2.y; - - if ((overlap > maxOverlap && !overlapOnly) || body1.checkCollision.down === false || body2.checkCollision.up === false) - { - overlap = 0; - } - else - { - body1.touching.none = false; - body1.touching.down = true; - - body2.touching.none = false; - body2.touching.up = true; - - if (body2.physicsType === CONST.STATIC_BODY) - { - body1.blocked.none = false; - body1.blocked.down = true; - } - - if (body1.physicsType === CONST.STATIC_BODY) - { - body2.blocked.none = false; - body2.blocked.up = true; - } - } - } - else if (body1._dy < body2._dy) - { - // Body1 is moving up and/or Body2 is moving down - overlap = body1.y - body2.bottom; - - if ((-overlap > maxOverlap && !overlapOnly) || body1.checkCollision.up === false || body2.checkCollision.down === false) - { - overlap = 0; - } - else - { - body1.touching.none = false; - body1.touching.up = true; - - body2.touching.none = false; - body2.touching.down = true; - - if (body2.physicsType === CONST.STATIC_BODY) - { - body1.blocked.none = false; - body1.blocked.up = true; - } - - if (body1.physicsType === CONST.STATIC_BODY) - { - body2.blocked.none = false; - body2.blocked.down = true; - } - } - } - - // Resets the overlapY to zero if there is no overlap, or to the actual pixel value if there is - body1.overlapY = overlap; - body2.overlapY = overlap; - - return overlap; -}; - -module.exports = GetOverlapY; - - -/***/ }), -/* 473 */ +/* 490 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106884,7 +112510,7 @@ module.exports = GetOverlapY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var quickselect = __webpack_require__(391); +var quickselect = __webpack_require__(402); /** * @classdesc @@ -107485,7 +113111,217 @@ function multiSelect (arr, left, right, n, compare) module.exports = rbush; /***/ }), -/* 474 */ +/* 491 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var TileCheckX = __webpack_require__(492); +var TileCheckY = __webpack_require__(494); +var TileIntersectsBody = __webpack_require__(231); + +/** + * The core separation function to separate a physics body and a tile. + * + * @function Phaser.Physics.Arcade.Tilemap.SeparateTile + * @since 3.0.0 + * + * @param {number} i - The index of the tile within the map data. + * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate. + * @param {Phaser.Tilemaps.Tile} tile - The tile to collide against. + * @param {Phaser.Geom.Rectangle} tileWorldRect - A rectangle-like object defining the dimensions of the tile. + * @param {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} tilemapLayer - The tilemapLayer to collide against. + * @param {number} tileBias - The tile bias value. Populated by the `World.TILE_BIAS` constant. + * @param {boolean} isLayer - Is this check coming from a TilemapLayer or an array of tiles? + * + * @return {boolean} `true` if the body was separated, otherwise `false`. + */ +var SeparateTile = function (i, body, tile, tileWorldRect, tilemapLayer, tileBias, isLayer) +{ + var tileLeft = tileWorldRect.left; + var tileTop = tileWorldRect.top; + var tileRight = tileWorldRect.right; + var tileBottom = tileWorldRect.bottom; + var faceHorizontal = tile.faceLeft || tile.faceRight; + var faceVertical = tile.faceTop || tile.faceBottom; + + if (!isLayer) + { + faceHorizontal = true; + faceVertical = true; + } + + // We don't need to go any further if this tile doesn't actually have any colliding faces. This + // could happen if the tile was meant to be collided with re: a callback, but otherwise isn't + // needed for separation. + if (!faceHorizontal && !faceVertical) + { + return false; + } + + var ox = 0; + var oy = 0; + var minX = 0; + var minY = 1; + + if (body.deltaAbsX() > body.deltaAbsY()) + { + // Moving faster horizontally, check X axis first + minX = -1; + } + else if (body.deltaAbsX() < body.deltaAbsY()) + { + // Moving faster vertically, check Y axis first + minY = -1; + } + + if (body.deltaX() !== 0 && body.deltaY() !== 0 && faceHorizontal && faceVertical) + { + // We only need do this if both axes have colliding faces AND we're moving in both + // directions + minX = Math.min(Math.abs(body.position.x - tileRight), Math.abs(body.right - tileLeft)); + minY = Math.min(Math.abs(body.position.y - tileBottom), Math.abs(body.bottom - tileTop)); + } + + if (minX < minY) + { + if (faceHorizontal) + { + ox = TileCheckX(body, tile, tileLeft, tileRight, tileBias, isLayer); + + // That's horizontal done, check if we still intersects? If not then we can return now + if (ox !== 0 && !TileIntersectsBody(tileWorldRect, body)) + { + return true; + } + } + + if (faceVertical) + { + oy = TileCheckY(body, tile, tileTop, tileBottom, tileBias, isLayer); + } + } + else + { + if (faceVertical) + { + oy = TileCheckY(body, tile, tileTop, tileBottom, tileBias, isLayer); + + // That's vertical done, check if we still intersects? If not then we can return now + if (oy !== 0 && !TileIntersectsBody(tileWorldRect, body)) + { + return true; + } + } + + if (faceHorizontal) + { + ox = TileCheckX(body, tile, tileLeft, tileRight, tileBias, isLayer); + } + } + + return (ox !== 0 || oy !== 0); +}; + +module.exports = SeparateTile; + + +/***/ }), +/* 492 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var ProcessTileSeparationX = __webpack_require__(493); + +/** + * Check the body against the given tile on the X axis. + * Used internally by the SeparateTile function. + * + * @function Phaser.Physics.Arcade.Tilemap.TileCheckX + * @since 3.0.0 + * + * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate. + * @param {Phaser.Tilemaps.Tile} tile - The tile to check. + * @param {number} tileLeft - The left position of the tile within the tile world. + * @param {number} tileRight - The right position of the tile within the tile world. + * @param {number} tileBias - The tile bias value. Populated by the `World.TILE_BIAS` constant. + * @param {boolean} isLayer - Is this check coming from a TilemapLayer or an array of tiles? + * + * @return {number} The amount of separation that occurred. + */ +var TileCheckX = function (body, tile, tileLeft, tileRight, tileBias, isLayer) +{ + var ox = 0; + + var faceLeft = tile.faceLeft; + var faceRight = tile.faceRight; + var collideLeft = tile.collideLeft; + var collideRight = tile.collideRight; + + if (!isLayer) + { + faceLeft = true; + faceRight = true; + collideLeft = true; + collideRight = true; + } + + if (body.deltaX() < 0 && collideRight && body.checkCollision.left) + { + // Body is moving LEFT + if (faceRight && body.x < tileRight) + { + ox = body.x - tileRight; + + if (ox < -tileBias) + { + ox = 0; + } + } + } + else if (body.deltaX() > 0 && collideLeft && body.checkCollision.right) + { + // Body is moving RIGHT + if (faceLeft && body.right > tileLeft) + { + ox = body.right - tileLeft; + + if (ox > tileBias) + { + ox = 0; + } + } + } + + if (ox !== 0) + { + if (body.customSeparateX) + { + body.overlapX = ox; + } + else + { + ProcessTileSeparationX(body, ox); + } + } + + return ox; +}; + +module.exports = TileCheckX; + + +/***/ }), +/* 493 */ /***/ (function(module, exports) { /** @@ -107495,33 +113331,44 @@ module.exports = rbush; */ /** - * Checks for intersection between the given tile rectangle-like object and an Arcade Physics body. + * Internal function to process the separation of a physics body from a tile. * - * @function Phaser.Physics.Arcade.Tilemap.TileIntersectsBody + * @function Phaser.Physics.Arcade.Tilemap.ProcessTileSeparationX * @since 3.0.0 * - * @param {{ left: number, right: number, top: number, bottom: number }} tileWorldRect - A rectangle object that defines the tile placement in the world. - * @param {Phaser.Physics.Arcade.Body} body - The body to check for intersection against. - * - * @return {boolean} Returns `true` of the tile intersects with the body, otherwise `false`. + * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate. + * @param {number} x - The x separation amount. */ -var TileIntersectsBody = function (tileWorldRect, body) +var ProcessTileSeparationX = function (body, x) { - // Currently, all bodies are treated as rectangles when colliding with a Tile. + if (x < 0) + { + body.blocked.none = false; + body.blocked.left = true; + } + else if (x > 0) + { + body.blocked.none = false; + body.blocked.right = true; + } - return !( - body.right <= tileWorldRect.left || - body.bottom <= tileWorldRect.top || - body.position.x >= tileWorldRect.right || - body.position.y >= tileWorldRect.bottom - ); + body.position.x -= x; + + if (body.bounce.x === 0) + { + body.velocity.x = 0; + } + else + { + body.velocity.x = -body.velocity.x * body.bounce.x; + } }; -module.exports = TileIntersectsBody; +module.exports = ProcessTileSeparationX; /***/ }), -/* 475 */ +/* 494 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107530,10 +113377,333 @@ module.exports = TileIntersectsBody; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CircleContains = __webpack_require__(56); +var ProcessTileSeparationY = __webpack_require__(495); + +/** + * Check the body against the given tile on the Y axis. + * Used internally by the SeparateTile function. + * + * @function Phaser.Physics.Arcade.Tilemap.TileCheckY + * @since 3.0.0 + * + * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate. + * @param {Phaser.Tilemaps.Tile} tile - The tile to check. + * @param {number} tileTop - The top position of the tile within the tile world. + * @param {number} tileBottom - The bottom position of the tile within the tile world. + * @param {number} tileBias - The tile bias value. Populated by the `World.TILE_BIAS` constant. + * @param {boolean} isLayer - Is this check coming from a TilemapLayer or an array of tiles? + * + * @return {number} The amount of separation that occurred. + */ +var TileCheckY = function (body, tile, tileTop, tileBottom, tileBias, isLayer) +{ + var oy = 0; + + var faceTop = tile.faceTop; + var faceBottom = tile.faceBottom; + var collideUp = tile.collideUp; + var collideDown = tile.collideDown; + + if (!isLayer) + { + faceTop = true; + faceBottom = true; + collideUp = true; + collideDown = true; + } + + if (body.deltaY() < 0 && collideDown && body.checkCollision.up) + { + // Body is moving UP + if (faceBottom && body.y < tileBottom) + { + oy = body.y - tileBottom; + + if (oy < -tileBias) + { + oy = 0; + } + } + } + else if (body.deltaY() > 0 && collideUp && body.checkCollision.down) + { + // Body is moving DOWN + if (faceTop && body.bottom > tileTop) + { + oy = body.bottom - tileTop; + + if (oy > tileBias) + { + oy = 0; + } + } + } + + if (oy !== 0) + { + if (body.customSeparateY) + { + body.overlapY = oy; + } + else + { + ProcessTileSeparationY(body, oy); + } + } + + return oy; +}; + +module.exports = TileCheckY; + + +/***/ }), +/* 495 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Internal function to process the separation of a physics body from a tile. + * + * @function Phaser.Physics.Arcade.Tilemap.ProcessTileSeparationY + * @since 3.0.0 + * + * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate. + * @param {number} y - The y separation amount. + */ +var ProcessTileSeparationY = function (body, y) +{ + if (y < 0) + { + body.blocked.none = false; + body.blocked.up = true; + } + else if (y > 0) + { + body.blocked.none = false; + body.blocked.down = true; + } + + body.position.y -= y; + + if (body.bounce.y === 0) + { + body.velocity.y = 0; + } + else + { + body.velocity.y = -body.velocity.y * body.bounce.y; + } +}; + +module.exports = ProcessTileSeparationY; + + +/***/ }), +/* 496 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetOverlapX = __webpack_require__(229); + +/** + * Separates two overlapping bodies on the X-axis (horizontally). + * + * Separation involves moving two overlapping bodies so they don't overlap anymore and adjusting their velocities based on their mass. This is a core part of collision detection. + * + * The bodies won't be separated if there is no horizontal overlap between them, if they are static, or if either one uses custom logic for its separation. + * + * @function Phaser.Physics.Arcade.SeparateX + * @since 3.0.0 + * + * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to separate. + * @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. + * + * @return {boolean} `true` if the two bodies overlap horizontally, otherwise `false`. + */ +var SeparateX = function (body1, body2, overlapOnly, bias) +{ + var overlap = GetOverlapX(body1, body2, overlapOnly, bias); + + // 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) + { + // return true if there was some overlap, otherwise false + return (overlap !== 0) || (body1.embedded && body2.embedded); + } + + // Adjust their positions and velocities accordingly (if there was any overlap) + var v1 = body1.velocity.x; + var v2 = body2.velocity.x; + + if (!body1.immovable && !body2.immovable) + { + overlap *= 0.5; + + body1.x -= overlap; + body2.x += overlap; + + var nv1 = Math.sqrt((v2 * v2 * body2.mass) / body1.mass) * ((v2 > 0) ? 1 : -1); + var nv2 = Math.sqrt((v1 * v1 * body1.mass) / body2.mass) * ((v1 > 0) ? 1 : -1); + var avg = (nv1 + nv2) * 0.5; + + nv1 -= avg; + nv2 -= avg; + + body1.velocity.x = avg + nv1 * body1.bounce.x; + body2.velocity.x = avg + nv2 * body2.bounce.x; + } + else if (!body1.immovable) + { + body1.x -= overlap; + body1.velocity.x = v2 - v1 * body1.bounce.x; + + // This is special case code that handles things like vertically moving platforms you can ride + if (body2.moves) + { + body1.y += (body2.y - body2.prev.y) * body2.friction.y; + body1._dy = body1.y - body1.prev.y; + } + } + else + { + body2.x += overlap; + body2.velocity.x = v1 - v2 * body2.bounce.x; + + // This is special case code that handles things like vertically moving platforms you can ride + if (body1.moves) + { + body2.y += (body1.y - body1.prev.y) * body1.friction.y; + body2._dy = body2.y - body2.prev.y; + } + } + + // If we got this far then there WAS overlap, and separation is complete, so return true + return true; +}; + +module.exports = SeparateX; + + +/***/ }), +/* 497 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var GetOverlapY = __webpack_require__(230); + +/** + * Separates two overlapping bodies on the Y-axis (vertically). + * + * Separation involves moving two overlapping bodies so they don't overlap anymore and adjusting their velocities based on their mass. This is a core part of collision detection. + * + * The bodies won't be separated if there is no vertical overlap between them, if they are static, or if either one uses custom logic for its separation. + * + * @function Phaser.Physics.Arcade.SeparateY + * @since 3.0.0 + * + * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to separate. + * @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. + * + * @return {boolean} `true` if the two bodies overlap vertically, otherwise `false`. + */ +var SeparateY = function (body1, body2, overlapOnly, bias) +{ + var overlap = GetOverlapY(body1, body2, overlapOnly, bias); + + // Can't separate two immovable bodies, or a body with its own custom separation logic + if (overlapOnly || overlap === 0 || (body1.immovable && body2.immovable) || body1.customSeparateY || body2.customSeparateY) + { + // return true if there was some overlap, otherwise false + return (overlap !== 0) || (body1.embedded && body2.embedded); + } + + // Adjust their positions and velocities accordingly (if there was any overlap) + var v1 = body1.velocity.y; + var v2 = body2.velocity.y; + + if (!body1.immovable && !body2.immovable) + { + overlap *= 0.5; + + body1.y -= overlap; + body2.y += overlap; + + var nv1 = Math.sqrt((v2 * v2 * body2.mass) / body1.mass) * ((v2 > 0) ? 1 : -1); + var nv2 = Math.sqrt((v1 * v1 * body1.mass) / body2.mass) * ((v1 > 0) ? 1 : -1); + var avg = (nv1 + nv2) * 0.5; + + nv1 -= avg; + nv2 -= avg; + + body1.velocity.y = avg + nv1 * body1.bounce.y; + body2.velocity.y = avg + nv2 * body2.bounce.y; + } + else if (!body1.immovable) + { + body1.y -= overlap; + body1.velocity.y = v2 - v1 * body1.bounce.y; + + // This is special case code that handles things like horizontal moving platforms you can ride + if (body2.moves) + { + body1.x += (body2.x - body2.prev.x) * body2.friction.x; + body1._dx = body1.x - body1.prev.x; + } + } + else + { + body2.y += overlap; + body2.velocity.y = v1 - v2 * body2.bounce.y; + + // This is special case code that handles things like horizontal moving platforms you can ride + if (body1.moves) + { + body2.x += (body1.x - body1.prev.x) * body1.friction.x; + body2._dx = body2.x - body2.prev.x; + } + } + + // If we got this far then there WAS overlap, and separation is complete, so return true + return true; +}; + +module.exports = SeparateY; + + +/***/ }), +/* 498 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CircleContains = __webpack_require__(57); var Class = __webpack_require__(0); -var CONST = __webpack_require__(51); -var RectangleContains = __webpack_require__(49); +var CONST = __webpack_require__(52); +var RectangleContains = __webpack_require__(50); var Vector2 = __webpack_require__(3); /** @@ -108510,7 +114680,39 @@ module.exports = StaticBody; /***/ }), -/* 476 */ +/* 499 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Physics.Matter.Components + */ + +module.exports = { + + Bounce: __webpack_require__(1413), + Collision: __webpack_require__(1414), + Force: __webpack_require__(1415), + Friction: __webpack_require__(1416), + Gravity: __webpack_require__(1417), + Mass: __webpack_require__(1418), + Sensor: __webpack_require__(1419), + SetBody: __webpack_require__(1420), + Sleep: __webpack_require__(1421), + Static: __webpack_require__(1438), + Transform: __webpack_require__(1439), + Velocity: __webpack_require__(1440) + +}; + + +/***/ }), +/* 500 */ /***/ (function(module, exports) { /** @@ -108636,7 +114838,7 @@ module.exports = Pair; /***/ }), -/* 477 */ +/* 501 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108766,7 +114968,7 @@ module.exports = BasePlugin; /***/ }), -/* 478 */ +/* 502 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108783,7 +114985,6 @@ var GetTilesWithin = __webpack_require__(24); * not change collision information. * * @function Phaser.Tilemaps.Components.ReplaceByIndex - * @private * @since 3.0.0 * * @param {integer} findIndex - The index of the tile to search for. @@ -108811,7 +115012,7 @@ module.exports = ReplaceByIndex; /***/ }), -/* 479 */ +/* 503 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108820,20 +115021,19 @@ module.exports = ReplaceByIndex; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var IsInLayerBounds = __webpack_require__(102); +var IsInLayerBounds = __webpack_require__(103); /** * Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns * false if there is no tile or if the tile at that location has an index of -1. * * @function Phaser.Tilemaps.Components.HasTileAt - * @private * @since 3.0.0 * * @param {integer} tileX - X position to get the tile from (given in tile units, not pixels). * @param {integer} tileY - Y position to get the tile from (given in tile units, not pixels). * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {?boolean} Returns a boolean, or null if the layer given was invalid. */ var HasTileAt = function (tileX, tileY, layer) @@ -108841,20 +115041,20 @@ var HasTileAt = function (tileX, tileY, layer) if (IsInLayerBounds(tileX, tileY, layer)) { var tile = layer.data[tileY][tileX]; + return (tile !== null && tile.index > -1); } else { return false; } - }; module.exports = HasTileAt; /***/ }), -/* 480 */ +/* 504 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108863,16 +115063,15 @@ module.exports = HasTileAt; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Tile = __webpack_require__(74); -var IsInLayerBounds = __webpack_require__(102); -var CalculateFacesAt = __webpack_require__(226); +var Tile = __webpack_require__(75); +var IsInLayerBounds = __webpack_require__(103); +var CalculateFacesAt = __webpack_require__(233); /** * Removes the tile at the given tile coordinates in the specified layer and updates the layer's * collision information. * * @function Phaser.Tilemaps.Components.RemoveTileAt - * @private * @since 3.0.0 * * @param {integer} tileX - The x coordinate. @@ -108917,7 +115116,7 @@ module.exports = RemoveTileAt; /***/ }), -/* 481 */ +/* 505 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108926,11 +115125,11 @@ module.exports = RemoveTileAt; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Formats = __webpack_require__(32); -var Parse2DArray = __webpack_require__(229); -var ParseCSV = __webpack_require__(482); -var ParseJSONTiled = __webpack_require__(483); -var ParseWeltmeister = __webpack_require__(494); +var Formats = __webpack_require__(33); +var Parse2DArray = __webpack_require__(235); +var ParseCSV = __webpack_require__(506); +var ParseJSONTiled = __webpack_require__(507); +var ParseWeltmeister = __webpack_require__(518); /** * Parses raw data of a given Tilemap format into a new MapData object. If no recognized data format @@ -108987,7 +115186,7 @@ module.exports = Parse; /***/ }), -/* 482 */ +/* 506 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108996,8 +115195,8 @@ module.exports = Parse; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Formats = __webpack_require__(32); -var Parse2DArray = __webpack_require__(229); +var Formats = __webpack_require__(33); +var Parse2DArray = __webpack_require__(235); /** * Parses a CSV string of tile indexes into a new MapData object with a single layer. @@ -109035,7 +115234,7 @@ module.exports = ParseCSV; /***/ }), -/* 483 */ +/* 507 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109044,14 +115243,14 @@ module.exports = ParseCSV; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Formats = __webpack_require__(32); -var MapData = __webpack_require__(104); -var ParseTileLayers = __webpack_require__(484); -var ParseImageLayers = __webpack_require__(486); -var ParseTilesets = __webpack_require__(487); -var ParseObjectLayers = __webpack_require__(490); -var BuildTilesetIndex = __webpack_require__(492); -var AssignTileProperties = __webpack_require__(493); +var Formats = __webpack_require__(33); +var MapData = __webpack_require__(105); +var ParseTileLayers = __webpack_require__(508); +var ParseImageLayers = __webpack_require__(510); +var ParseTilesets = __webpack_require__(511); +var ParseObjectLayers = __webpack_require__(514); +var BuildTilesetIndex = __webpack_require__(516); +var AssignTileProperties = __webpack_require__(517); /** * Parses a Tiled JSON object into a new MapData object. @@ -109113,7 +115312,7 @@ module.exports = ParseJSONTiled; /***/ }), -/* 484 */ +/* 508 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109122,12 +115321,12 @@ module.exports = ParseJSONTiled; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Base64Decode = __webpack_require__(485); +var Base64Decode = __webpack_require__(509); var GetFastValue = __webpack_require__(2); -var LayerData = __webpack_require__(103); -var ParseGID = __webpack_require__(230); -var Tile = __webpack_require__(74); -var CreateGroupLayer = __webpack_require__(231); +var LayerData = __webpack_require__(104); +var ParseGID = __webpack_require__(236); +var Tile = __webpack_require__(75); +var CreateGroupLayer = __webpack_require__(153); /** * Parses all tilemap layers in a Tiled JSON object into new LayerData objects. @@ -109371,7 +115570,7 @@ module.exports = ParseTileLayers; /***/ }), -/* 485 */ +/* 509 */ /***/ (function(module, exports) { /** @@ -109414,7 +115613,7 @@ module.exports = Base64Decode; /***/ }), -/* 486 */ +/* 510 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109424,7 +115623,7 @@ module.exports = Base64Decode; */ var GetFastValue = __webpack_require__(2); -var CreateGroupLayer = __webpack_require__(231); +var CreateGroupLayer = __webpack_require__(153); /** * Parses a Tiled JSON object into an array of objects with details about the image layers. @@ -109502,7 +115701,7 @@ module.exports = ParseImageLayers; /***/ }), -/* 487 */ +/* 511 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109511,9 +115710,9 @@ module.exports = ParseImageLayers; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Tileset = __webpack_require__(105); -var ImageCollection = __webpack_require__(488); -var ParseObject = __webpack_require__(232); +var Tileset = __webpack_require__(106); +var ImageCollection = __webpack_require__(512); +var ParseObject = __webpack_require__(237); /** * Tilesets and Image Collections @@ -109671,7 +115870,7 @@ module.exports = ParseTilesets; /***/ }), -/* 488 */ +/* 512 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109843,7 +116042,7 @@ module.exports = ImageCollection; /***/ }), -/* 489 */ +/* 513 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109852,7 +116051,7 @@ module.exports = ImageCollection; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HasValue = __webpack_require__(112); +var HasValue = __webpack_require__(113); /** * Returns a new object that only contains the `keys` that were found on the object provided. @@ -109887,7 +116086,7 @@ module.exports = Pick; /***/ }), -/* 490 */ +/* 514 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109897,9 +116096,9 @@ module.exports = Pick; */ var GetFastValue = __webpack_require__(2); -var ParseObject = __webpack_require__(232); -var ObjectLayer = __webpack_require__(491); -var CreateGroupLayer = __webpack_require__(231); +var ParseObject = __webpack_require__(237); +var ObjectLayer = __webpack_require__(515); +var CreateGroupLayer = __webpack_require__(153); /** * Parses a Tiled JSON object into an array of ObjectLayer objects. @@ -109986,7 +116185,7 @@ module.exports = ParseObjectLayers; /***/ }), -/* 491 */ +/* 515 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110108,7 +116307,7 @@ module.exports = ObjectLayer; /***/ }), -/* 492 */ +/* 516 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110117,7 +116316,7 @@ module.exports = ObjectLayer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Tileset = __webpack_require__(105); +var Tileset = __webpack_require__(106); /** * Master list of tiles -> x, y, index in tileset. @@ -110202,7 +116401,7 @@ module.exports = BuildTilesetIndex; /***/ }), -/* 493 */ +/* 517 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110275,7 +116474,7 @@ module.exports = AssignTileProperties; /***/ }), -/* 494 */ +/* 518 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110284,10 +116483,10 @@ module.exports = AssignTileProperties; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Formats = __webpack_require__(32); -var MapData = __webpack_require__(104); -var ParseTileLayers = __webpack_require__(495); -var ParseTilesets = __webpack_require__(496); +var Formats = __webpack_require__(33); +var MapData = __webpack_require__(105); +var ParseTileLayers = __webpack_require__(519); +var ParseTilesets = __webpack_require__(520); /** * Parses a Weltmeister JSON object into a new MapData object. @@ -110342,7 +116541,7 @@ module.exports = ParseWeltmeister; /***/ }), -/* 495 */ +/* 519 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110351,8 +116550,8 @@ module.exports = ParseWeltmeister; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var LayerData = __webpack_require__(103); -var Tile = __webpack_require__(74); +var LayerData = __webpack_require__(104); +var Tile = __webpack_require__(75); /** * Parses all tilemap layers in an Impact JSON object into new LayerData objects. @@ -110428,7 +116627,7 @@ module.exports = ParseTileLayers; /***/ }), -/* 496 */ +/* 520 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110437,7 +116636,7 @@ module.exports = ParseTileLayers; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Tileset = __webpack_require__(105); +var Tileset = __webpack_require__(106); /** * Tilesets and Image Collections @@ -110479,7 +116678,7 @@ module.exports = ParseTilesets; /***/ }), -/* 497 */ +/* 521 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110489,17 +116688,17 @@ module.exports = ParseTilesets; */ var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(40); -var DynamicTilemapLayer = __webpack_require__(498); +var DegToRad = __webpack_require__(41); +var DynamicTilemapLayer = __webpack_require__(522); var Extend = __webpack_require__(19); -var Formats = __webpack_require__(32); -var LayerData = __webpack_require__(103); -var Rotate = __webpack_require__(335); -var SpliceOne = __webpack_require__(81); -var StaticTilemapLayer = __webpack_require__(499); -var Tile = __webpack_require__(74); -var TilemapComponents = __webpack_require__(147); -var Tileset = __webpack_require__(105); +var Formats = __webpack_require__(33); +var LayerData = __webpack_require__(104); +var Rotate = __webpack_require__(343); +var SpliceOne = __webpack_require__(82); +var StaticTilemapLayer = __webpack_require__(523); +var Tile = __webpack_require__(75); +var TilemapComponents = __webpack_require__(148); +var Tileset = __webpack_require__(106); /** * @callback TilemapFilterCallback @@ -113036,7 +119235,7 @@ module.exports = Tilemap; /***/ }), -/* 498 */ +/* 522 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113046,10 +119245,10 @@ module.exports = Tilemap; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var DynamicTilemapLayerRender = __webpack_require__(1357); +var Components = __webpack_require__(11); +var DynamicTilemapLayerRender = __webpack_require__(1354); var GameObject = __webpack_require__(14); -var TilemapComponents = __webpack_require__(147); +var TilemapComponents = __webpack_require__(148); /** * @classdesc @@ -114357,7 +120556,7 @@ module.exports = DynamicTilemapLayer; /***/ }), -/* 499 */ +/* 523 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -114367,13 +120566,13 @@ module.exports = DynamicTilemapLayer; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var GameEvents = __webpack_require__(20); +var Components = __webpack_require__(11); +var GameEvents = __webpack_require__(21); var GameObject = __webpack_require__(14); -var ModelViewProjection = __webpack_require__(110); -var StaticTilemapLayerRender = __webpack_require__(1360); -var TilemapComponents = __webpack_require__(147); -var TransformMatrix = __webpack_require__(30); +var ModelViewProjection = __webpack_require__(111); +var StaticTilemapLayerRender = __webpack_require__(1357); +var TilemapComponents = __webpack_require__(148); +var TransformMatrix = __webpack_require__(31); var Utils = __webpack_require__(10); /** @@ -115877,7 +122076,7 @@ module.exports = StaticTilemapLayer; /***/ }), -/* 500 */ +/* 524 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116190,7 +122389,7 @@ module.exports = TimerEvent; /***/ }), -/* 501 */ +/* 525 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116199,7 +122398,7 @@ module.exports = TimerEvent; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RESERVED = __webpack_require__(1374); +var RESERVED = __webpack_require__(1371); /** * Internal function used by the Tween Builder to return an array of properties @@ -116251,7 +122450,7 @@ module.exports = GetProps; /***/ }), -/* 502 */ +/* 526 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116299,7 +122498,7 @@ module.exports = GetTweens; /***/ }), -/* 503 */ +/* 527 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116308,15 +122507,15 @@ module.exports = GetTweens; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Defaults = __webpack_require__(236); +var Defaults = __webpack_require__(241); var GetAdvancedValue = __webpack_require__(15); -var GetBoolean = __webpack_require__(89); -var GetEaseFunction = __webpack_require__(69); -var GetNewValue = __webpack_require__(151); +var GetBoolean = __webpack_require__(90); +var GetEaseFunction = __webpack_require__(71); +var GetNewValue = __webpack_require__(154); var GetValue = __webpack_require__(6); -var GetValueOp = __webpack_require__(235); -var Tween = __webpack_require__(237); -var TweenData = __webpack_require__(239); +var GetValueOp = __webpack_require__(240); +var Tween = __webpack_require__(242); +var TweenData = __webpack_require__(244); /** * Creates a new Number Tween. @@ -116429,7 +122628,7 @@ module.exports = NumberTweenBuilder; /***/ }), -/* 504 */ +/* 528 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116438,7 +122637,7 @@ module.exports = NumberTweenBuilder; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetEaseFunction = __webpack_require__(69); +var GetEaseFunction = __webpack_require__(71); var GetValue = __webpack_require__(6); var MATH_CONST = __webpack_require__(13); @@ -116675,7 +122874,7 @@ module.exports = StaggerBuilder; /***/ }), -/* 505 */ +/* 529 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116684,17 +122883,17 @@ module.exports = StaggerBuilder; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clone = __webpack_require__(67); -var Defaults = __webpack_require__(236); +var Clone = __webpack_require__(69); +var Defaults = __webpack_require__(241); var GetAdvancedValue = __webpack_require__(15); -var GetBoolean = __webpack_require__(89); -var GetEaseFunction = __webpack_require__(69); -var GetNewValue = __webpack_require__(151); -var GetTargets = __webpack_require__(234); -var GetTweens = __webpack_require__(502); +var GetBoolean = __webpack_require__(90); +var GetEaseFunction = __webpack_require__(71); +var GetNewValue = __webpack_require__(154); +var GetTargets = __webpack_require__(239); +var GetTweens = __webpack_require__(526); var GetValue = __webpack_require__(6); -var Timeline = __webpack_require__(506); -var TweenBuilder = __webpack_require__(152); +var Timeline = __webpack_require__(530); +var TweenBuilder = __webpack_require__(155); /** * Builds a Timeline of Tweens based on a configuration object. @@ -116829,7 +123028,7 @@ module.exports = TimelineBuilder; /***/ }), -/* 506 */ +/* 530 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116839,10 +123038,10 @@ module.exports = TimelineBuilder; */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(238); -var TweenBuilder = __webpack_require__(152); -var TWEEN_CONST = __webpack_require__(90); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(243); +var TweenBuilder = __webpack_require__(155); +var TWEEN_CONST = __webpack_require__(91); /** * @classdesc @@ -117734,1202 +123933,7 @@ module.exports = Timeline; /***/ }), -/* 507 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var BaseAnimation = __webpack_require__(156); -var Class = __webpack_require__(0); -var Events = __webpack_require__(115); - -/** - * @classdesc - * A Game Object Animation Controller. - * - * This controller lives as an instance within a Game Object, accessible as `sprite.anims`. - * - * @class Animation - * @memberof Phaser.GameObjects.Components - * @constructor - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject} parent - The Game Object to which this animation controller belongs. - */ -var Animation = new Class({ - - initialize: - - function Animation (parent) - { - /** - * The Game Object to which this animation controller belongs. - * - * @name Phaser.GameObjects.Components.Animation#parent - * @type {Phaser.GameObjects.GameObject} - * @since 3.0.0 - */ - this.parent = parent; - - /** - * A reference to the global Animation Manager. - * - * @name Phaser.GameObjects.Components.Animation#animationManager - * @type {Phaser.Animations.AnimationManager} - * @since 3.0.0 - */ - this.animationManager = parent.scene.sys.anims; - - this.animationManager.once(Events.REMOVE_ANIMATION, this.remove, this); - - /** - * Is an animation currently playing or not? - * - * @name Phaser.GameObjects.Components.Animation#isPlaying - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.isPlaying = false; - - /** - * The current Animation loaded into this Animation Controller. - * - * @name Phaser.GameObjects.Components.Animation#currentAnim - * @type {?Phaser.Animations.Animation} - * @default null - * @since 3.0.0 - */ - this.currentAnim = null; - - /** - * The current AnimationFrame being displayed by this Animation Controller. - * - * @name Phaser.GameObjects.Components.Animation#currentFrame - * @type {?Phaser.Animations.AnimationFrame} - * @default null - * @since 3.0.0 - */ - this.currentFrame = null; - - /** - * The key of the next Animation to be loaded into this Animation Controller when the current animation completes. - * - * @name Phaser.GameObjects.Components.Animation#nextAnim - * @type {?string} - * @default null - * @since 3.16.0 - */ - this.nextAnim = null; - - /** - * A queue of keys of the next Animations to be loaded into this Animation Controller when the current animation completes. - * - * @name Phaser.GameObjects.Components.Animation#nextAnimsQueue - * @type {string[]} - * @since 3.24.0 - */ - this.nextAnimsQueue = []; - - /** - * Time scale factor. - * - * @name Phaser.GameObjects.Components.Animation#_timeScale - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - this._timeScale = 1; - - /** - * The frame rate of playback in frames per second. - * The default is 24 if the `duration` property is `null`. - * - * @name Phaser.GameObjects.Components.Animation#frameRate - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.frameRate = 0; - - /** - * How long the animation should play for, in milliseconds. - * If the `frameRate` property has been set then it overrides this value, - * otherwise the `frameRate` is derived from `duration`. - * - * @name Phaser.GameObjects.Components.Animation#duration - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.duration = 0; - - /** - * ms per frame, not including frame specific modifiers that may be present in the Animation data. - * - * @name Phaser.GameObjects.Components.Animation#msPerFrame - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.msPerFrame = 0; - - /** - * Skip frames if the time lags, or always advanced anyway? - * - * @name Phaser.GameObjects.Components.Animation#skipMissedFrames - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.skipMissedFrames = true; - - /** - * A delay before starting playback, in milliseconds. - * - * @name Phaser.GameObjects.Components.Animation#_delay - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._delay = 0; - - /** - * Number of times to repeat the animation (-1 for infinity) - * - * @name Phaser.GameObjects.Components.Animation#_repeat - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._repeat = 0; - - /** - * Delay before the repeat starts, in milliseconds. - * - * @name Phaser.GameObjects.Components.Animation#_repeatDelay - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._repeatDelay = 0; - - /** - * Should the animation yoyo? (reverse back down to the start) before repeating? - * - * @name Phaser.GameObjects.Components.Animation#_yoyo - * @type {boolean} - * @private - * @default false - * @since 3.0.0 - */ - this._yoyo = false; - - /** - * Will the playhead move forwards (`true`) or in reverse (`false`). - * - * @name Phaser.GameObjects.Components.Animation#forward - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.forward = true; - - /** - * An Internal trigger that's play the animation in reverse mode ('true') or not ('false'), - * needed because forward can be changed by yoyo feature. - * - * @name Phaser.GameObjects.Components.Animation#_reverse - * @type {boolean} - * @default false - * @private - * @since 3.12.0 - */ - this._reverse = false; - - /** - * Internal time overflow accumulator. - * - * @name Phaser.GameObjects.Components.Animation#accumulator - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.accumulator = 0; - - /** - * The time point at which the next animation frame will change. - * - * @name Phaser.GameObjects.Components.Animation#nextTick - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.nextTick = 0; - - /** - * An internal counter keeping track of how many repeats are left to play. - * - * @name Phaser.GameObjects.Components.Animation#repeatCounter - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.repeatCounter = 0; - - /** - * An internal flag keeping track of pending repeats. - * - * @name Phaser.GameObjects.Components.Animation#pendingRepeat - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.pendingRepeat = false; - - /** - * Is the Animation paused? - * - * @name Phaser.GameObjects.Components.Animation#_paused - * @type {boolean} - * @private - * @default false - * @since 3.0.0 - */ - this._paused = false; - - /** - * Was the animation previously playing before being paused? - * - * @name Phaser.GameObjects.Components.Animation#_wasPlaying - * @type {boolean} - * @private - * @default false - * @since 3.0.0 - */ - this._wasPlaying = false; - - /** - * Internal property tracking if this Animation is waiting to stop. - * - * 0 = No - * 1 = Waiting for ms to pass - * 2 = Waiting for repeat - * 3 = Waiting for specific frame - * - * @name Phaser.GameObjects.Components.Animation#_pendingStop - * @type {integer} - * @private - * @since 3.4.0 - */ - this._pendingStop = 0; - - /** - * Internal property used by _pendingStop. - * - * @name Phaser.GameObjects.Components.Animation#_pendingStopValue - * @type {any} - * @private - * @since 3.4.0 - */ - this._pendingStopValue; - }, - - /** - * Sets an animation to be played immediately after the current one completes. - * - * The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc, or have the `stop` method called directly on it. - * - * An animation set to repeat forever will never enter a completed state. - * - * You can chain a new animation at any point, including before the current one starts playing, during it, or when it ends (via its `animationcomplete` callback). - * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained animations without impacting the global animation they're playing. - * - * Call this method with no arguments to reset the chained animation. - * - * @method Phaser.GameObjects.Components.Animation#chain - * @since 3.16.0 - * - * @param {(string|Phaser.Animations.Animation)} [key] - The string-based key of the animation to play next, as defined previously in the Animation Manager. Or an Animation instance. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - chain: function (key) - { - if (key instanceof BaseAnimation) - { - key = key.key; - } - - if (this.nextAnim === null) - { - this.nextAnim = key; - } - else - { - this.nextAnimsQueue.push(key); - } - - return this.parent; - }, - - /** - * Sets the amount of time, in milliseconds, that the animation will be delayed before starting playback. - * - * @method Phaser.GameObjects.Components.Animation#setDelay - * @since 3.4.0 - * - * @param {integer} [value=0] - The amount of time, in milliseconds, to wait before starting playback. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - setDelay: function (value) - { - if (value === undefined) { value = 0; } - - this._delay = value; - - return this.parent; - }, - - /** - * Gets the amount of time, in milliseconds that the animation will be delayed before starting playback. - * - * @method Phaser.GameObjects.Components.Animation#getDelay - * @since 3.4.0 - * - * @return {integer} The amount of time, in milliseconds, the Animation will wait before starting playback. - */ - getDelay: function () - { - return this._delay; - }, - - /** - * Waits for the specified delay, in milliseconds, then starts playback of the requested animation. - * - * @method Phaser.GameObjects.Components.Animation#delayedPlay - * @since 3.0.0 - * - * @param {integer} delay - The delay, in milliseconds, to wait before starting the animation playing. - * @param {string} key - The key of the animation to play. - * @param {integer} [startFrame=0] - The frame of the animation to start from. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - delayedPlay: function (delay, key, startFrame) - { - this.play(key, true, startFrame); - - this.nextTick += delay; - - return this.parent; - }, - - /** - * Returns the key of the animation currently loaded into this component. - * - * @method Phaser.GameObjects.Components.Animation#getCurrentKey - * @since 3.0.0 - * - * @return {string} The key of the Animation loaded into this component. - */ - getCurrentKey: function () - { - if (this.currentAnim) - { - return this.currentAnim.key; - } - }, - - /** - * Internal method used to load an animation into this component. - * - * @method Phaser.GameObjects.Components.Animation#load - * @protected - * @since 3.0.0 - * - * @param {string} key - The key of the animation to load. - * @param {integer} [startFrame=0] - The start frame of the animation to load. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - load: function (key, startFrame) - { - if (startFrame === undefined) { startFrame = 0; } - - if (this.isPlaying) - { - this.stop(); - } - - // Load the new animation in - this.animationManager.load(this, key, startFrame); - - return this.parent; - }, - - /** - * Pause the current animation and set the `isPlaying` property to `false`. - * You can optionally pause it at a specific frame. - * - * @method Phaser.GameObjects.Components.Animation#pause - * @since 3.0.0 - * - * @param {Phaser.Animations.AnimationFrame} [atFrame] - An optional frame to set after pausing the animation. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - pause: function (atFrame) - { - if (!this._paused) - { - this._paused = true; - this._wasPlaying = this.isPlaying; - this.isPlaying = false; - } - - if (atFrame !== undefined) - { - this.updateFrame(atFrame); - } - - return this.parent; - }, - - /** - * Resumes playback of a paused animation and sets the `isPlaying` property to `true`. - * You can optionally tell it to start playback from a specific frame. - * - * @method Phaser.GameObjects.Components.Animation#resume - * @since 3.0.0 - * - * @param {Phaser.Animations.AnimationFrame} [fromFrame] - An optional frame to set before restarting playback. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - resume: function (fromFrame) - { - if (this._paused) - { - this._paused = false; - this.isPlaying = this._wasPlaying; - } - - if (fromFrame !== undefined) - { - this.updateFrame(fromFrame); - } - - return this.parent; - }, - - /** - * `true` if the current animation is paused, otherwise `false`. - * - * @name Phaser.GameObjects.Components.Animation#isPaused - * @readonly - * @type {boolean} - * @since 3.4.0 - */ - isPaused: { - - get: function () - { - return this._paused; - } - - }, - - /** - * Plays an Animation on a Game Object that has the Animation component, such as a Sprite. - * - * Animations are stored in the global Animation Manager and are referenced by a unique string-based key. - * - * @method Phaser.GameObjects.Components.Animation#play - * @fires Phaser.GameObjects.Components.Animation#onStartEvent - * @since 3.0.0 - * - * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance. - * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call. - * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - play: function (key, ignoreIfPlaying, startFrame) - { - if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } - if (startFrame === undefined) { startFrame = 0; } - - if (key instanceof BaseAnimation) - { - key = key.key; - } - - if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key) - { - return this.parent; - } - - this.forward = true; - this._reverse = false; - this._paused = false; - this._wasPlaying = true; - - return this._startAnimation(key, startFrame); - }, - - /** - * Plays an Animation (in reverse mode) on the Game Object that owns this Animation Component. - * - * @method Phaser.GameObjects.Components.Animation#playReverse - * @fires Phaser.GameObjects.Components.Animation#onStartEvent - * @since 3.12.0 - * - * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance. - * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. - * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - playReverse: function (key, ignoreIfPlaying, startFrame) - { - if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; } - if (startFrame === undefined) { startFrame = 0; } - - if (key instanceof BaseAnimation) - { - key = key.key; - } - - if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key) - { - return this.parent; - } - - this.forward = false; - this._reverse = true; - - return this._startAnimation(key, startFrame); - }, - - /** - * Load an Animation and fires 'onStartEvent' event, extracted from 'play' method. - * - * @method Phaser.GameObjects.Components.Animation#_startAnimation - * @fires Phaser.Animations.Events#ANIMATION_START - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START - * @since 3.12.0 - * - * @param {string} key - The string-based key of the animation to play, as defined previously in the Animation Manager. - * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - _startAnimation: function (key, startFrame) - { - this.load(key, startFrame); - - var anim = this.currentAnim; - var gameObject = this.parent; - - if (!anim) - { - return gameObject; - } - - // Should give us 9,007,199,254,740,991 safe repeats - this.repeatCounter = (this._repeat === -1) ? Number.MAX_VALUE : this._repeat; - - anim.getFirstTick(this); - - this.isPlaying = true; - this.pendingRepeat = false; - - if (anim.showOnStart) - { - gameObject.visible = true; - } - - var frame = this.currentFrame; - - anim.emit(Events.ANIMATION_START, anim, frame, gameObject); - - gameObject.emit(Events.SPRITE_ANIMATION_KEY_START + key, anim, frame, gameObject); - - gameObject.emit(Events.SPRITE_ANIMATION_START, anim, frame, gameObject); - - return gameObject; - }, - - /** - * Reverse the Animation that is already playing on the Game Object. - * - * @method Phaser.GameObjects.Components.Animation#reverse - * @since 3.12.0 - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - reverse: function () - { - if (this.isPlaying) - { - this._reverse = !this._reverse; - - this.forward = !this.forward; - } - - return this.parent; - }, - - /** - * Returns a value between 0 and 1 indicating how far this animation is through, ignoring repeats and yoyos. - * If the animation has a non-zero repeat defined, `getProgress` and `getTotalProgress` will be different - * because `getProgress` doesn't include any repeats or repeat delays, whereas `getTotalProgress` does. - * - * @method Phaser.GameObjects.Components.Animation#getProgress - * @since 3.4.0 - * - * @return {number} The progress of the current animation, between 0 and 1. - */ - getProgress: function () - { - var p = this.currentFrame.progress; - - if (!this.forward) - { - p = 1 - p; - } - - return p; - }, - - /** - * Takes a value between 0 and 1 and uses it to set how far this animation is through playback. - * Does not factor in repeats or yoyos, but does handle playing forwards or backwards. - * - * @method Phaser.GameObjects.Components.Animation#setProgress - * @since 3.4.0 - * - * @param {number} [value=0] - The progress value, between 0 and 1. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - setProgress: function (value) - { - if (!this.forward) - { - value = 1 - value; - } - - this.setCurrentFrame(this.currentAnim.getFrameByProgress(value)); - - return this.parent; - }, - - /** - * Handle the removal of an animation from the Animation Manager. - * - * @method Phaser.GameObjects.Components.Animation#remove - * @since 3.0.0 - * - * @param {string} [key] - The key of the removed Animation. - * @param {Phaser.Animations.Animation} [animation] - The removed Animation. - */ - remove: function (key, animation) - { - if (animation === undefined) { animation = this.currentAnim; } - - if (this.isPlaying && animation.key === this.currentAnim.key) - { - this.stop(); - - this.setCurrentFrame(this.currentAnim.frames[0]); - } - }, - - /** - * Gets the number of times that the animation will repeat - * after its first iteration. For example, if returns 1, the animation will - * play a total of twice (the initial play plus 1 repeat). - * A value of -1 means the animation will repeat indefinitely. - * - * @method Phaser.GameObjects.Components.Animation#getRepeat - * @since 3.4.0 - * - * @return {integer} The number of times that the animation will repeat. - */ - getRepeat: function () - { - return this._repeat; - }, - - /** - * Sets the number of times that the animation should repeat - * after its first iteration. For example, if repeat is 1, the animation will - * play a total of twice (the initial play plus 1 repeat). - * To repeat indefinitely, use -1. repeat should always be an integer. - * - * @method Phaser.GameObjects.Components.Animation#setRepeat - * @since 3.4.0 - * - * @param {integer} value - The number of times that the animation should repeat. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - setRepeat: function (value) - { - this._repeat = value; - - this.repeatCounter = (value === -1) ? Number.MAX_VALUE : value; - - return this.parent; - }, - - /** - * Gets the amount of delay between repeats, if any. - * - * @method Phaser.GameObjects.Components.Animation#getRepeatDelay - * @since 3.4.0 - * - * @return {number} The delay between repeats. - */ - getRepeatDelay: function () - { - return this._repeatDelay; - }, - - /** - * Sets the amount of time in seconds between repeats. - * For example, if `repeat` is 2 and `repeatDelay` is 10, the animation will play initially, - * then wait for 10 seconds before repeating, then play again, then wait another 10 seconds - * before doing its final repeat. - * - * @method Phaser.GameObjects.Components.Animation#setRepeatDelay - * @since 3.4.0 - * - * @param {number} value - The delay to wait between repeats, in seconds. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - setRepeatDelay: function (value) - { - this._repeatDelay = value; - - return this.parent; - }, - - /** - * Restarts the current animation from its beginning, optionally including its delay value. - * - * @method Phaser.GameObjects.Components.Animation#restart - * @fires Phaser.Animations.Events#ANIMATION_RESTART - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_RESTART - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART - * @since 3.0.0 - * - * @param {boolean} [includeDelay=false] - Whether to include the delay value of the animation when restarting. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - restart: function (includeDelay) - { - if (includeDelay === undefined) { includeDelay = false; } - - var anim = this.currentAnim; - - anim.getFirstTick(this, includeDelay); - - this.forward = true; - this.isPlaying = true; - this.pendingRepeat = false; - this._paused = false; - - // Set frame - this.updateFrame(anim.frames[0]); - - var gameObject = this.parent; - var frame = this.currentFrame; - - anim.emit(Events.ANIMATION_RESTART, anim, frame, gameObject); - - gameObject.emit(Events.SPRITE_ANIMATION_KEY_RESTART + anim.key, anim, frame, gameObject); - - gameObject.emit(Events.SPRITE_ANIMATION_RESTART, anim, frame, gameObject); - - return this.parent; - }, - - /** - * Immediately stops the current animation from playing and dispatches the `animationcomplete` event. - * - * If no animation is set, no event will be dispatched. - * - * If there is another animation queued (via the `chain` method) then it will start playing immediately. - * - * @method Phaser.GameObjects.Components.Animation#stop - * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent - * @since 3.0.0 - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - stop: function () - { - this._pendingStop = 0; - - this.isPlaying = false; - - var gameObject = this.parent; - var anim = this.currentAnim; - var frame = this.currentFrame; - - if (anim) - { - anim.emit(Events.ANIMATION_COMPLETE, anim, frame, gameObject); - - gameObject.emit(Events.SPRITE_ANIMATION_KEY_COMPLETE + anim.key, anim, frame, gameObject); - - gameObject.emit(Events.SPRITE_ANIMATION_COMPLETE, anim, frame, gameObject); - } - - if (this.nextAnim) - { - var key = this.nextAnim; - - this.nextAnim = (this.nextAnimsQueue.length > 0) ? this.nextAnimsQueue.shift() : null; - - this.play(key); - } - - return gameObject; - }, - - /** - * Stops the current animation from playing after the specified time delay, given in milliseconds. - * - * @method Phaser.GameObjects.Components.Animation#stopAfterDelay - * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent - * @since 3.4.0 - * - * @param {integer} delay - The number of milliseconds to wait before stopping this animation. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - stopAfterDelay: function (delay) - { - this._pendingStop = 1; - this._pendingStopValue = delay; - - return this.parent; - }, - - /** - * Stops the current animation from playing when it next repeats. - * - * @method Phaser.GameObjects.Components.Animation#stopOnRepeat - * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent - * @since 3.4.0 - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - stopOnRepeat: function () - { - this._pendingStop = 2; - - return this.parent; - }, - - /** - * Stops the current animation from playing when it next sets the given frame. - * If this frame doesn't exist within the animation it will not stop it from playing. - * - * @method Phaser.GameObjects.Components.Animation#stopOnFrame - * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent - * @since 3.4.0 - * - * @param {Phaser.Animations.AnimationFrame} frame - The frame to check before stopping this animation. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - stopOnFrame: function (frame) - { - this._pendingStop = 3; - this._pendingStopValue = frame; - - return this.parent; - }, - - /** - * Sets the Time Scale factor, allowing you to make the animation go go faster or slower than default. - * Where 1 = normal speed (the default), 0.5 = half speed, 2 = double speed, etc. - * - * @method Phaser.GameObjects.Components.Animation#setTimeScale - * @since 3.4.0 - * - * @param {number} [value=1] - The time scale factor, where 1 is no change, 0.5 is half speed, etc. - * - * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component. - */ - setTimeScale: function (value) - { - if (value === undefined) { value = 1; } - - this._timeScale = value; - - return this.parent; - }, - - /** - * Gets the Time Scale factor. - * - * @method Phaser.GameObjects.Components.Animation#getTimeScale - * @since 3.4.0 - * - * @return {number} The Time Scale value. - */ - getTimeScale: function () - { - return this._timeScale; - }, - - /** - * Returns the total number of frames in this animation. - * - * @method Phaser.GameObjects.Components.Animation#getTotalFrames - * @since 3.4.0 - * - * @return {integer} The total number of frames in this animation. - */ - getTotalFrames: function () - { - return this.currentAnim.frames.length; - }, - - /** - * The internal update loop for the Animation Component. - * - * @method Phaser.GameObjects.Components.Animation#update - * @since 3.0.0 - * - * @param {number} time - The current timestamp. - * @param {number} delta - The delta time, in ms, elapsed since the last frame. - */ - update: function (time, delta) - { - if (!this.currentAnim || !this.isPlaying || this.currentAnim.paused) - { - return; - } - - this.accumulator += delta * this._timeScale; - - if (this._pendingStop === 1) - { - this._pendingStopValue -= delta; - - if (this._pendingStopValue <= 0) - { - return this.currentAnim.completeAnimation(this); - } - } - - if (this.accumulator >= this.nextTick) - { - this.currentAnim.setFrame(this); - } - }, - - /** - * Sets the given Animation Frame as being the current frame - * and applies it to the parent Game Object, adjusting its size and origin as needed. - * - * @method Phaser.GameObjects.Components.Animation#setCurrentFrame - * @since 3.4.0 - * - * @param {Phaser.Animations.AnimationFrame} animationFrame - The Animation Frame to set as being current. - * - * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. - */ - setCurrentFrame: function (animationFrame) - { - var gameObject = this.parent; - - this.currentFrame = animationFrame; - - gameObject.texture = animationFrame.frame.texture; - gameObject.frame = animationFrame.frame; - - if (gameObject.isCropped) - { - gameObject.frame.updateCropUVs(gameObject._crop, gameObject.flipX, gameObject.flipY); - } - - gameObject.setSizeToFrame(); - - if (gameObject._originComponent) - { - if (animationFrame.frame.customPivot) - { - gameObject.setOrigin(animationFrame.frame.pivotX, animationFrame.frame.pivotY); - } - else - { - gameObject.updateDisplayOrigin(); - } - } - - return gameObject; - }, - - /** - * Internal frame change handler. - * - * @method Phaser.GameObjects.Components.Animation#updateFrame - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE - * @private - * @since 3.0.0 - * - * @param {Phaser.Animations.AnimationFrame} animationFrame - The animation frame to change to. - */ - updateFrame: function (animationFrame) - { - var gameObject = this.setCurrentFrame(animationFrame); - - if (this.isPlaying) - { - if (animationFrame.setAlpha) - { - gameObject.alpha = animationFrame.alpha; - } - - var anim = this.currentAnim; - - gameObject.emit(Events.SPRITE_ANIMATION_KEY_UPDATE + anim.key, anim, animationFrame, gameObject); - - gameObject.emit(Events.SPRITE_ANIMATION_UPDATE, anim, animationFrame, gameObject); - - if (this._pendingStop === 3 && this._pendingStopValue === animationFrame) - { - this.currentAnim.completeAnimation(this); - } - } - }, - - /** - * Advances the animation to the next frame, regardless of the time or animation state. - * If the animation is set to repeat, or yoyo, this will still take effect. - * - * Calling this does not change the direction of the animation. I.e. if it was currently - * playing in reverse, calling this method doesn't then change the direction to forwards. - * - * @method Phaser.GameObjects.Components.Animation#nextFrame - * @since 3.16.0 - * - * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. - */ - nextFrame: function () - { - if (this.currentAnim) - { - this.currentAnim.nextFrame(this); - } - - return this.parent; - }, - - /** - * Advances the animation to the previous frame, regardless of the time or animation state. - * If the animation is set to repeat, or yoyo, this will still take effect. - * - * Calling this does not change the direction of the animation. I.e. if it was currently - * playing in forwards, calling this method doesn't then change the direction to backwards. - * - * @method Phaser.GameObjects.Components.Animation#previousFrame - * @since 3.16.0 - * - * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. - */ - previousFrame: function () - { - if (this.currentAnim) - { - this.currentAnim.previousFrame(this); - } - - return this.parent; - }, - - /** - * Sets if the current Animation will yoyo when it reaches the end. - * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again. - * - * @method Phaser.GameObjects.Components.Animation#setYoyo - * @since 3.4.0 - * - * @param {boolean} [value=false] - `true` if the animation should yoyo, `false` to not. - * - * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to. - */ - setYoyo: function (value) - { - if (value === undefined) { value = false; } - - this._yoyo = value; - - return this.parent; - }, - - /** - * Gets if the current Animation will yoyo when it reaches the end. - * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again. - * - * @method Phaser.GameObjects.Components.Animation#getYoyo - * @since 3.4.0 - * - * @return {boolean} `true` if the animation is set to yoyo, `false` if not. - */ - getYoyo: function () - { - return this._yoyo; - }, - - /** - * Destroy this Animation component. - * - * Unregisters event listeners and cleans up its references. - * - * @method Phaser.GameObjects.Components.Animation#destroy - * @since 3.0.0 - */ - destroy: function () - { - this.animationManager.off(Events.REMOVE_ANIMATION, this.remove, this); - - this.animationManager = null; - this.parent = null; - this.nextAnimsQueue.length = 0; - - this.currentAnim = null; - this.currentFrame = null; - } - -}); - -module.exports = Animation; - - -/***/ }), -/* 508 */ +/* 531 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -118939,13 +123943,13 @@ module.exports = Animation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CanvasSnapshot = __webpack_require__(509); -var CameraEvents = __webpack_require__(41); +var CanvasSnapshot = __webpack_require__(532); +var CameraEvents = __webpack_require__(42); var Class = __webpack_require__(0); -var CONST = __webpack_require__(33); -var GetBlendModes = __webpack_require__(510); +var CONST = __webpack_require__(34); +var GetBlendModes = __webpack_require__(533); var ScaleEvents = __webpack_require__(93); -var TransformMatrix = __webpack_require__(30); +var TransformMatrix = __webpack_require__(31); /** * @classdesc @@ -119736,7 +124740,7 @@ module.exports = CanvasRenderer; /***/ }), -/* 509 */ +/* 532 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119746,7 +124750,7 @@ module.exports = CanvasRenderer; */ var CanvasPool = __webpack_require__(26); -var Color = __webpack_require__(31); +var Color = __webpack_require__(32); var GetFastValue = __webpack_require__(2); /** @@ -119829,7 +124833,7 @@ module.exports = CanvasSnapshot; /***/ }), -/* 510 */ +/* 533 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119838,8 +124842,8 @@ module.exports = CanvasSnapshot; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var modes = __webpack_require__(53); -var CanvasFeatures = __webpack_require__(320); +var modes = __webpack_require__(54); +var CanvasFeatures = __webpack_require__(328); /** * Returns an array which maps the default blend modes to supported Canvas blend modes. @@ -119893,7 +124897,7 @@ module.exports = GetBlendModes; /***/ }), -/* 511 */ +/* 534 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119904,26 +124908,26 @@ module.exports = GetBlendModes; */ var BaseCamera = __webpack_require__(92); -var CameraEvents = __webpack_require__(41); +var CameraEvents = __webpack_require__(42); var Class = __webpack_require__(0); -var CONST = __webpack_require__(33); -var GameEvents = __webpack_require__(20); -var IsSizePowerOfTwo = __webpack_require__(125); +var CONST = __webpack_require__(34); +var GameEvents = __webpack_require__(21); +var IsSizePowerOfTwo = __webpack_require__(127); var NOOP = __webpack_require__(1); -var ProjectOrtho = __webpack_require__(181); +var ProjectOrtho = __webpack_require__(183); var ScaleEvents = __webpack_require__(93); -var SpliceOne = __webpack_require__(81); -var TextureEvents = __webpack_require__(127); -var TransformMatrix = __webpack_require__(30); +var SpliceOne = __webpack_require__(82); +var TextureEvents = __webpack_require__(129); +var TransformMatrix = __webpack_require__(31); var Utils = __webpack_require__(10); -var WebGLSnapshot = __webpack_require__(512); +var WebGLSnapshot = __webpack_require__(535); // Default Pipelines -var BitmapMaskPipeline = __webpack_require__(513); -var LightPipeline = __webpack_require__(514); -var MultiPipeline = __webpack_require__(109); -var RopePipeline = __webpack_require__(515); -var SinglePipeline = __webpack_require__(516); +var BitmapMaskPipeline = __webpack_require__(536); +var LightPipeline = __webpack_require__(537); +var MultiPipeline = __webpack_require__(110); +var RopePipeline = __webpack_require__(538); +var SinglePipeline = __webpack_require__(539); /** * @callback WebGLContextCallback @@ -120172,7 +125176,7 @@ var WebGLRenderer = new Class({ this.normalTexture; /** - * Current framebuffer in use + * Current framebuffer in use. * * @name Phaser.Renderer.WebGL.WebGLRenderer#currentFramebuffer * @type {WebGLFramebuffer} @@ -120182,7 +125186,7 @@ var WebGLRenderer = new Class({ this.currentFramebuffer = null; /** - * Current WebGLPipeline in use + * Current WebGLPipeline in use. * * @name Phaser.Renderer.WebGL.WebGLRenderer#currentPipeline * @type {Phaser.Renderer.WebGL.WebGLPipeline} @@ -120192,7 +125196,18 @@ var WebGLRenderer = new Class({ this.currentPipeline = null; /** - * Current WebGLProgram in use + * The previous WebGLPipeline in use. + * This is set when `clearPipeline` is called and restored in `rebindPipeline` if none is given. + * + * @name Phaser.Renderer.WebGL.WebGLRenderer#previousPipeline + * @type {Phaser.Renderer.WebGL.WebGLPipeline} + * @default null + * @since 3.50.0 + */ + this.previousPipeline = null; + + /** + * Current WebGLProgram in use. * * @name Phaser.Renderer.WebGL.WebGLRenderer#currentProgram * @type {WebGLProgram} @@ -120477,6 +125492,15 @@ var WebGLRenderer = new Class({ */ this.nextTypeMatch = false; + /** + * Is the Game Object being currently rendered the final one in the list? + * + * @name Phaser.Renderer.WebGL.WebGLRenderer#finalType + * @type {boolean} + * @since 3.50.0 + */ + this.finalType = false; + /** * The mipmap magFilter to be used when creating textures. * @@ -121095,10 +126119,20 @@ var WebGLRenderer = new Class({ * @method Phaser.Renderer.WebGL.WebGLRenderer#rebindPipeline * @since 3.16.0 * - * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipelineInstance - The pipeline instance to be activated. + * @param {Phaser.Renderer.WebGL.WebGLPipeline} [pipelineInstance] - The pipeline instance to be activated. */ rebindPipeline: function (pipelineInstance) { + if (pipelineInstance === undefined && this.previousPipeline) + { + pipelineInstance = this.previousPipeline; + } + + if (!pipelineInstance) + { + return; + } + var gl = this.gl; gl.disable(gl.DEPTH_TEST); @@ -121117,15 +126151,16 @@ var WebGLRenderer = new Class({ gl.viewport(0, 0, this.width, this.height); + this.currentProgram = null; + this.currentVertexBuffer = null; + this.currentIndexBuffer = null; + this.setBlendMode(0, true); - this.resetTextures(true); - - this.currentActiveTexture = 1; - this.startActiveTexture++; + this.resetTextures(); this.currentPipeline = pipelineInstance; - this.currentPipeline.bind(); + this.currentPipeline.bind(true); this.currentPipeline.onBind(); }, @@ -121142,6 +126177,8 @@ var WebGLRenderer = new Class({ { this.flush(); + this.previousPipeline = this.currentPipeline; + this.currentPipeline = null; this.currentProgram = null; this.currentVertexBuffer = null; @@ -122214,8 +127251,8 @@ var WebGLRenderer = new Class({ camera.width, camera.height, camera.x, camera.y, camera.width, camera.height, - camera.zoom, camera.zoom, - camera.rotation, + 1, 1, + 0, camera.flipX, !camera.flipY, 1, 1, 0, 0, @@ -122347,6 +127384,8 @@ var WebGLRenderer = new Class({ for (var i = 0; i < childCount; i++) { + this.finalType = (i === childCount - 1); + var child = list[i]; if (!child.willRender(camera)) @@ -122698,6 +127737,7 @@ var WebGLRenderer = new Class({ gl.bindTexture(gl.TEXTURE_2D, dstTexture); gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, flipY); + gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true); gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, srcCanvas); @@ -123306,7 +128346,7 @@ module.exports = WebGLRenderer; /***/ }), -/* 512 */ +/* 535 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123316,7 +128356,7 @@ module.exports = WebGLRenderer; */ var CanvasPool = __webpack_require__(26); -var Color = __webpack_require__(31); +var Color = __webpack_require__(32); var GetFastValue = __webpack_require__(2); /** @@ -123416,7 +128456,7 @@ module.exports = WebGLSnapshot; /***/ }), -/* 513 */ +/* 536 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123428,17 +128468,30 @@ module.exports = WebGLSnapshot; var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(2); -var ShaderSourceFS = __webpack_require__(790); -var ShaderSourceVS = __webpack_require__(791); -var WebGLPipeline = __webpack_require__(108); +var ShaderSourceFS = __webpack_require__(808); +var ShaderSourceVS = __webpack_require__(809); +var WebGLPipeline = __webpack_require__(109); /** * @classdesc * + * The Bitmap Mask Pipeline handles all of the bitmap mask rendering in WebGL for applying + * alpha masks to Game Objects. It works by sampling two texture on the fragment shader and + * using the fragments alpha to clip the region. * + * The fragment shader it uses can be found in `shaders/src/BitmapMask.frag`. + * The vertex shader it uses can be found in `shaders/src/BitmapMask.vert`. * - * BitmapMaskPipeline handles all bitmap masking rendering in WebGL. It works by using - * sampling two texture on the fragment shader and using the fragment's alpha to clip the region. + * The default shader attributes for this pipeline are: + * + * `inPosition` (vec2, offset 0) + * + * The default shader uniforms for this pipeline are: + * + * `uResolution` (vec2) + * `uMainSampler` (sampler2D) + * `uMaskSampler` (sampler2D) + * `uInvertMaskAlpha` (bool) * * @class BitmapMaskPipeline * @extends Phaser.Renderer.WebGL.WebGLPipeline @@ -123474,55 +128527,8 @@ var BitmapMaskPipeline = new Class({ ]); WebGLPipeline.call(this, config); - - /** - * Float32 view of the array buffer containing the pipeline's vertices. - * - * @name Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#vertexViewF32 - * @type {Float32Array} - * @since 3.0.0 - */ - // this.vertexViewF32 = new Float32Array(this.vertexData); - - /** - * Dirty flag to check if resolution properties need to be updated on the - * masking shader. - * - * @name Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#resolutionDirty - * @type {boolean} - * @default true - * @since 3.0.0 - */ - // this.resolutionDirty = true; }, - /** - * Called every time the pipeline needs to be used. - * It binds all necessary resources. - * - * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#onBind - * @since 3.0.0 - * - * @return {this} This WebGLPipeline instance. - onBind: function () - { - WebGLPipeline.prototype.onBind.call(this); - - var renderer = this.renderer; - var program = this.program; - - if (this.resolutionDirty) - { - renderer.setFloat2(program, 'uResolution', this.width, this.height); - renderer.setInt1(program, 'uMainSampler', 0); - renderer.setInt1(program, 'uMaskSampler', 1); - this.resolutionDirty = false; - } - - return this; - }, - */ - /** * Called every time the pipeline is bound by the renderer. * Sets the shader program, vertex buffer and other resources. @@ -123531,11 +128537,15 @@ var BitmapMaskPipeline = new Class({ * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#bind * @since 3.50.0 * + * @param {boolean} [reset=false] - Should the pipeline be fully re-bound after a renderer pipeline clear? + * * @return {this} This WebGLPipeline instance. */ - bind: function () + bind: function (reset) { - WebGLPipeline.prototype.bind.call(this); + if (reset === undefined) { reset = false; } + + WebGLPipeline.prototype.bind.call(this, reset); var renderer = this.renderer; var program = this.program; @@ -123547,27 +128557,6 @@ var BitmapMaskPipeline = new Class({ return this; }, - /** - * Resizes this pipeline and updates the projection. - * - * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#resize - * @since 3.0.0 - * - * @param {number} width - The new width. - * @param {number} height - The new height. - * @param {number} resolution - The resolution. - * - * @return {this} This WebGLPipeline instance. - */ - resize: function (width, height, resolution) - { - WebGLPipeline.prototype.resize.call(this, width, height, resolution); - - this.resolutionDirty = true; - - return this; - }, - /** * Binds necessary resources and renders the mask to a separated framebuffer. * The framebuffer for the masked object is also bound for further use. @@ -123682,7 +128671,7 @@ module.exports = BitmapMaskPipeline; /***/ }), -/* 514 */ +/* 537 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123694,9 +128683,9 @@ module.exports = BitmapMaskPipeline; var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(2); -var ShaderSourceFS = __webpack_require__(792); -var MultiPipeline = __webpack_require__(109); -var WebGLPipeline = __webpack_require__(108); +var ShaderSourceFS = __webpack_require__(810); +var MultiPipeline = __webpack_require__(110); +var WebGLPipeline = __webpack_require__(109); var LIGHT_COUNT = 10; @@ -123836,11 +128825,15 @@ var LightPipeline = new Class({ * @method Phaser.Renderer.WebGL.Pipelines.LightPipeline#bind * @since 3.50.0 * + * @param {boolean} [reset=false] - Should the pipeline be fully re-bound after a renderer pipeline clear? + * * @return {this} This WebGLPipeline instance. */ - bind: function () + bind: function (reset) { - WebGLPipeline.prototype.bind.call(this); + if (reset === undefined) { reset = false; } + + WebGLPipeline.prototype.bind.call(this, reset); var renderer = this.renderer; var program = this.program; @@ -124101,7 +129094,7 @@ module.exports = LightPipeline; /***/ }), -/* 515 */ +/* 538 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124111,8 +129104,8 @@ module.exports = LightPipeline; */ var Class = __webpack_require__(0); -var ModelViewProjection = __webpack_require__(110); -var MultiPipeline = __webpack_require__(109); +var ModelViewProjection = __webpack_require__(111); +var MultiPipeline = __webpack_require__(110); /** * @classdesc @@ -124173,7 +129166,7 @@ module.exports = RopePipeline; /***/ }), -/* 516 */ +/* 539 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124184,11 +129177,11 @@ module.exports = RopePipeline; var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(2); -var ModelViewProjection = __webpack_require__(110); -var MultiPipeline = __webpack_require__(109); -var ShaderSourceFS = __webpack_require__(795); -var ShaderSourceVS = __webpack_require__(796); -var WebGLPipeline = __webpack_require__(108); +var ModelViewProjection = __webpack_require__(111); +var MultiPipeline = __webpack_require__(110); +var ShaderSourceFS = __webpack_require__(813); +var ShaderSourceVS = __webpack_require__(814); +var WebGLPipeline = __webpack_require__(109); /** * @classdesc @@ -124486,11 +129479,15 @@ var SinglePipeline = new Class({ * @method Phaser.Renderer.WebGL.Pipelines.SinglePipeline#bind * @since 3.50.0 * + * @param {boolean} [reset=false] - Should the pipeline be fully re-bound after a renderer pipeline clear? + * * @return {this} This WebGLPipeline instance. */ - bind: function () + bind: function (reset) { - WebGLPipeline.prototype.bind.call(this); + if (reset === undefined) { reset = false; } + + WebGLPipeline.prototype.bind.call(this, reset); return this; } @@ -124501,7 +129498,7 @@ module.exports = SinglePipeline; /***/ }), -/* 517 */ +/* 540 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124514,8 +129511,8 @@ var Axes = {}; module.exports = Axes; -var Vector = __webpack_require__(100); -var Common = __webpack_require__(43); +var Vector = __webpack_require__(101); +var Common = __webpack_require__(44); (function() { @@ -124571,7 +129568,7 @@ var Common = __webpack_require__(43); /***/ }), -/* 518 */ +/* 541 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124581,29 +129578,33 @@ var Common = __webpack_require__(43); */ /** - * @namespace Phaser.Physics.Matter.Components + * @namespace Phaser.Physics.Matter.Events */ module.exports = { - Bounce: __webpack_require__(1415), - Collision: __webpack_require__(1416), - Force: __webpack_require__(1417), - Friction: __webpack_require__(1418), - Gravity: __webpack_require__(1419), - Mass: __webpack_require__(1420), - Static: __webpack_require__(1421), - Sensor: __webpack_require__(1422), - SetBody: __webpack_require__(1423), - Sleep: __webpack_require__(1424), - Transform: __webpack_require__(1441), - Velocity: __webpack_require__(1442) + AFTER_ADD: __webpack_require__(1422), + AFTER_REMOVE: __webpack_require__(1423), + AFTER_UPDATE: __webpack_require__(1424), + BEFORE_ADD: __webpack_require__(1425), + BEFORE_REMOVE: __webpack_require__(1426), + BEFORE_UPDATE: __webpack_require__(1427), + COLLISION_ACTIVE: __webpack_require__(1428), + COLLISION_END: __webpack_require__(1429), + COLLISION_START: __webpack_require__(1430), + DRAG_END: __webpack_require__(1431), + DRAG: __webpack_require__(1432), + DRAG_START: __webpack_require__(1433), + PAUSE: __webpack_require__(1434), + RESUME: __webpack_require__(1435), + SLEEP_END: __webpack_require__(1436), + SLEEP_START: __webpack_require__(1437) }; /***/ }), -/* 519 */ +/* 542 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124618,9 +129619,9 @@ var Detector = {}; module.exports = Detector; -var SAT = __webpack_require__(520); -var Pair = __webpack_require__(476); -var Bounds = __webpack_require__(101); +var SAT = __webpack_require__(543); +var Pair = __webpack_require__(500); +var Bounds = __webpack_require__(102); (function() { @@ -124716,7 +129717,7 @@ var Bounds = __webpack_require__(101); /***/ }), -/* 520 */ +/* 543 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124731,8 +129732,8 @@ var SAT = {}; module.exports = SAT; -var Vertices = __webpack_require__(87); -var Vector = __webpack_require__(100); +var Vertices = __webpack_require__(88); +var Vector = __webpack_require__(101); (function() { @@ -124992,47 +129993,21 @@ var Vector = __webpack_require__(100); /***/ }), -/* 521 */ -/***/ (function(module, exports) { - -var g; - -// This works in non-strict mode -g = (function() { - return this; -})(); - -try { - // This works if eval is allowed (see CSP) - g = g || new Function("return this")(); -} catch (e) { - // This works if the window reference is available - if (typeof window === "object") g = window; -} - -// g can still be undefined, but nothing to do about it... -// We return undefined, instead of nothing here, so it's -// easier to handle this case. if(!global) { ...} - -module.exports = g; - - -/***/ }), -/* 522 */ +/* 544 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(523); -__webpack_require__(524); -__webpack_require__(525); -__webpack_require__(526); -__webpack_require__(527); -__webpack_require__(528); -__webpack_require__(529); -__webpack_require__(530); +__webpack_require__(545); +__webpack_require__(546); +__webpack_require__(547); +__webpack_require__(548); +__webpack_require__(549); +__webpack_require__(550); +__webpack_require__(551); +__webpack_require__(552); /***/ }), -/* 523 */ +/* 545 */ /***/ (function(module, exports) { /** @@ -125072,7 +130047,7 @@ if (!Array.prototype.forEach) /***/ }), -/* 524 */ +/* 546 */ /***/ (function(module, exports) { /** @@ -125088,7 +130063,7 @@ if (!Array.isArray) /***/ }), -/* 525 */ +/* 547 */ /***/ (function(module, exports) { /* Copyright 2013 Chris Wilson @@ -125275,7 +130250,7 @@ BiquadFilterNode.type and OscillatorNode.type. /***/ }), -/* 526 */ +/* 548 */ /***/ (function(module, exports) { /** @@ -125290,7 +130265,7 @@ if (!window.console) /***/ }), -/* 527 */ +/* 549 */ /***/ (function(module, exports) { // ES6 Math.trunc - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc @@ -125302,7 +130277,7 @@ if (!Math.trunc) { /***/ }), -/* 528 */ +/* 550 */ /***/ (function(module, exports) { /** @@ -125339,7 +130314,7 @@ if (!Math.trunc) { /***/ }), -/* 529 */ +/* 551 */ /***/ (function(module, exports) { // References: @@ -125396,7 +130371,7 @@ if (!window.cancelAnimationFrame) /***/ }), -/* 530 */ +/* 552 */ /***/ (function(module, exports) { /** @@ -125449,7 +130424,7 @@ if (typeof window.Uint32Array !== 'function' && typeof window.Uint32Array !== 'o /***/ }), -/* 531 */ +/* 553 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125458,7 +130433,7 @@ if (typeof window.Uint32Array !== 'function' && typeof window.Uint32Array !== 'o * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var QuickSet = __webpack_require__(246); +var QuickSet = __webpack_require__(252); /** * Takes an array of Game Objects, or any objects that have public `x` and `y` properties, and aligns them next to each other. @@ -125497,7 +130472,7 @@ module.exports = AlignTo; /***/ }), -/* 532 */ +/* 554 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125506,7 +130481,7 @@ module.exports = AlignTo; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PropertyValueInc = __webpack_require__(38); +var PropertyValueInc = __webpack_require__(39); /** * Takes an array of Game Objects, or any objects that have a public `angle` property, @@ -125538,7 +130513,7 @@ module.exports = Angle; /***/ }), -/* 533 */ +/* 555 */ /***/ (function(module, exports) { /** @@ -125577,7 +130552,7 @@ module.exports = Call; /***/ }), -/* 534 */ +/* 556 */ /***/ (function(module, exports) { /** @@ -125635,7 +130610,7 @@ module.exports = GetFirst; /***/ }), -/* 535 */ +/* 557 */ /***/ (function(module, exports) { /** @@ -125693,7 +130668,7 @@ module.exports = GetLast; /***/ }), -/* 536 */ +/* 558 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125702,11 +130677,11 @@ module.exports = GetLast; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AlignIn = __webpack_require__(259); -var CONST = __webpack_require__(106); +var AlignIn = __webpack_require__(265); +var CONST = __webpack_require__(107); var GetFastValue = __webpack_require__(2); var NOOP = __webpack_require__(1); -var Zone = __webpack_require__(114); +var Zone = __webpack_require__(115); var tempZone = new Zone({ sys: { queueDepthSort: NOOP, events: { once: NOOP } } }, 0, 0, 1, 1); @@ -125763,6 +130738,26 @@ var GridAlign = function (items, options) // We keep laying them out vertically until we've done them all tempZone.y += cellHeight; } + else if (heightSet && !widthSet) + { + // We keep laying them out until we hit the column limit + cy += cellHeight; + tempZone.y += cellHeight; + + if (cy === h) + { + cy = 0; + cx += cellWidth; + tempZone.y = y; + tempZone.x += cellWidth; + + if (cx === w) + { + // We've hit the column limit, so return, even if there are items left + break; + } + } + } else { // We keep laying them out until we hit the column limit @@ -125792,7 +130787,7 @@ module.exports = GridAlign; /***/ }), -/* 537 */ +/* 559 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126087,505 +131082,7 @@ module.exports = Alpha; /***/ }), -/* 538 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Add Animation Event. - * - * This event is dispatched when a new animation is added to the global Animation Manager. - * - * This can happen either as a result of an animation instance being added to the Animation Manager, - * or the Animation Manager creating a new animation directly. - * - * @event Phaser.Animations.Events#ADD_ANIMATION - * @since 3.0.0 - * - * @param {string} key - The key of the Animation that was added to the global Animation Manager. - * @param {Phaser.Animations.Animation} animation - An instance of the newly created Animation. - */ -module.exports = 'add'; - - -/***/ }), -/* 539 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Animation Complete Event. - * - * This event is dispatched by an Animation instance when it completes, i.e. finishes playing or is manually stopped. - * - * Be careful with the volume of events this could generate. If a group of Sprites all complete the same - * animation at the same time, this event will invoke its handler for each one of them. - * - * @event Phaser.Animations.Events#ANIMATION_COMPLETE - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed. - */ -module.exports = 'complete'; - - -/***/ }), -/* 540 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Animation Repeat Event. - * - * This event is dispatched when a currently playing animation repeats. - * - * The event is dispatched directly from the Animation object itself. Which means that listeners - * bound to this event will be invoked every time the Animation repeats, for every Game Object that may have it. - * - * @event Phaser.Animations.Events#ANIMATION_REPEAT - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that repeated. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation was on when it repeated. - */ -module.exports = 'repeat'; - - -/***/ }), -/* 541 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Animation Restart Event. - * - * This event is dispatched by an Animation instance when it restarts. - * - * Be careful with the volume of events this could generate. If a group of Sprites all restart the same - * animation at the same time, this event will invoke its handler for each one of them. - * - * @event Phaser.Animations.Events#ANIMATION_RESTART - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that restarted playing. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing. - */ -module.exports = 'restart'; - - -/***/ }), -/* 542 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Animation Start Event. - * - * This event is dispatched by an Animation instance when it starts playing. - * - * Be careful with the volume of events this could generate. If a group of Sprites all play the same - * animation at the same time, this event will invoke its handler for each one of them. - * - * @event Phaser.Animations.Events#ANIMATION_START - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that started playing. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing. - */ -module.exports = 'start'; - - -/***/ }), -/* 543 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Pause All Animations Event. - * - * This event is dispatched when the global Animation Manager is told to pause. - * - * When this happens all current animations will stop updating, although it doesn't necessarily mean - * that the game has paused as well. - * - * @event Phaser.Animations.Events#PAUSE_ALL - * @since 3.0.0 - */ -module.exports = 'pauseall'; - - -/***/ }), -/* 544 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Remove Animation Event. - * - * This event is dispatched when an animation is removed from the global Animation Manager. - * - * @event Phaser.Animations.Events#REMOVE_ANIMATION - * @since 3.0.0 - * - * @param {string} key - The key of the Animation that was removed from the global Animation Manager. - * @param {Phaser.Animations.Animation} animation - An instance of the removed Animation. - */ -module.exports = 'remove'; - - -/***/ }), -/* 545 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Resume All Animations Event. - * - * This event is dispatched when the global Animation Manager resumes, having been previously paused. - * - * When this happens all current animations will continue updating again. - * - * @event Phaser.Animations.Events#RESUME_ALL - * @since 3.0.0 - */ -module.exports = 'resumeall'; - - -/***/ }), -/* 546 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Complete Event. - * - * This event is dispatched by a Sprite when an animation finishes playing on it. - * - * Listen for it on the Sprite using `sprite.on('animationcomplete', listener)` - * - * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_COMPLETE` event. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_COMPLETE - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed. - */ -module.exports = 'animationcomplete'; - - -/***/ }), -/* 547 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Key Complete Event. - * - * This event is dispatched by a Sprite when a specific animation finishes playing on it. - * - * Listen for it on the Sprite using `sprite.on('animationcomplete-key', listener)` where `key` is the key of - * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationcomplete-explode`. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_COMPLETE - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed. - */ -module.exports = 'animationcomplete-'; - - -/***/ }), -/* 548 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Key Repeat Event. - * - * This event is dispatched by a Sprite when a specific animation repeats playing on it. - * - * Listen for it on the Sprite using `sprite.on('animationrepeat-key', listener)` where `key` is the key of - * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrepeat-explode`. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. - * @param {integer} repeatCount - The number of times the Animation has repeated so far. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing. - */ -module.exports = 'animationrepeat-'; - - -/***/ }), -/* 549 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Key Restart Event. - * - * This event is dispatched by a Sprite when a specific animation restarts playing on it. - * - * Listen for it on the Sprite using `sprite.on('animationrestart-key', listener)` where `key` is the key of - * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrestart-explode`. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing. - */ -module.exports = 'animationrestart-'; - - -/***/ }), -/* 550 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Key Start Event. - * - * This event is dispatched by a Sprite when a specific animation starts playing on it. - * - * Listen for it on the Sprite using `sprite.on('animationstart-key', listener)` where `key` is the key of - * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationstart-explode`. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing. - */ -module.exports = 'animationstart-'; - - -/***/ }), -/* 551 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Key Update Event. - * - * This event is dispatched by a Sprite when a specific animation playing on it updates. This happens when the animation changes frame, - * based on the animation frame rate and other factors like `timeScale` and `delay`. - * - * Listen for it on the Sprite using `sprite.on('animationupdate-key', listener)` where `key` is the key of - * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationupdate-explode`. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated. - */ -module.exports = 'animationupdate-'; - - -/***/ }), -/* 552 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Repeat Event. - * - * This event is dispatched by a Sprite when an animation repeats playing on it. - * - * Listen for it on the Sprite using `sprite.on('animationrepeat', listener)` - * - * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_REPEAT` event. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_REPEAT - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. - * @param {integer} repeatCount - The number of times the Animation has repeated so far. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing. - */ -module.exports = 'animationrepeat'; - - -/***/ }), -/* 553 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Restart Event. - * - * This event is dispatched by a Sprite when an animation restarts playing on it. - * - * Listen for it on the Sprite using `sprite.on('animationrestart', listener)` - * - * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_RESTART` event. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_RESTART - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing. - */ -module.exports = 'animationrestart'; - - -/***/ }), -/* 554 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Start Event. - * - * This event is dispatched by a Sprite when an animation starts playing on it. - * - * Listen for it on the Sprite using `sprite.on('animationstart', listener)` - * - * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_START` event. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_START - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing. - */ -module.exports = 'animationstart'; - - -/***/ }), -/* 555 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Sprite Animation Update Event. - * - * This event is dispatched by a Sprite when an animation playing on it updates. This happens when the animation changes frame, - * based on the animation frame rate and other factors like `timeScale` and `delay`. - * - * Listen for it on the Sprite using `sprite.on('animationupdate', listener)` - * - * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_UPDATE` event. - * - * @event Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE - * @since 3.16.1 - * - * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite. - * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. - * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated. - */ -module.exports = 'animationupdate'; - - -/***/ }), -/* 556 */ +/* 560 */ /***/ (function(module, exports) { /** @@ -126734,7 +131231,7 @@ module.exports = ComputedSize; /***/ }), -/* 557 */ +/* 561 */ /***/ (function(module, exports) { /** @@ -126859,7 +131356,7 @@ module.exports = Crop; /***/ }), -/* 558 */ +/* 562 */ /***/ (function(module, exports) { /** @@ -127023,7 +131520,7 @@ module.exports = Flip; /***/ }), -/* 559 */ +/* 563 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127033,7 +131530,7 @@ module.exports = Flip; */ var Rectangle = __webpack_require__(9); -var RotateAround = __webpack_require__(280); +var RotateAround = __webpack_require__(284); var Vector2 = __webpack_require__(3); /** @@ -127382,7 +131879,7 @@ module.exports = GetBounds; /***/ }), -/* 560 */ +/* 564 */ /***/ (function(module, exports) { /** @@ -127405,7 +131902,7 @@ module.exports = 'blur'; /***/ }), -/* 561 */ +/* 565 */ /***/ (function(module, exports) { /** @@ -127427,7 +131924,7 @@ module.exports = 'boot'; /***/ }), -/* 562 */ +/* 566 */ /***/ (function(module, exports) { /** @@ -127450,7 +131947,7 @@ module.exports = 'contextlost'; /***/ }), -/* 563 */ +/* 567 */ /***/ (function(module, exports) { /** @@ -127473,7 +131970,7 @@ module.exports = 'contextrestored'; /***/ }), -/* 564 */ +/* 568 */ /***/ (function(module, exports) { /** @@ -127496,7 +131993,7 @@ module.exports = 'destroy'; /***/ }), -/* 565 */ +/* 569 */ /***/ (function(module, exports) { /** @@ -127518,7 +132015,7 @@ module.exports = 'focus'; /***/ }), -/* 566 */ +/* 570 */ /***/ (function(module, exports) { /** @@ -127544,7 +132041,7 @@ module.exports = 'hidden'; /***/ }), -/* 567 */ +/* 571 */ /***/ (function(module, exports) { /** @@ -127565,7 +132062,7 @@ module.exports = 'pause'; /***/ }), -/* 568 */ +/* 572 */ /***/ (function(module, exports) { /** @@ -127591,7 +132088,7 @@ module.exports = 'postrender'; /***/ }), -/* 569 */ +/* 573 */ /***/ (function(module, exports) { /** @@ -127616,7 +132113,7 @@ module.exports = 'poststep'; /***/ }), -/* 570 */ +/* 574 */ /***/ (function(module, exports) { /** @@ -127641,7 +132138,7 @@ module.exports = 'prerender'; /***/ }), -/* 571 */ +/* 575 */ /***/ (function(module, exports) { /** @@ -127666,7 +132163,7 @@ module.exports = 'prestep'; /***/ }), -/* 572 */ +/* 576 */ /***/ (function(module, exports) { /** @@ -127688,7 +132185,7 @@ module.exports = 'ready'; /***/ }), -/* 573 */ +/* 577 */ /***/ (function(module, exports) { /** @@ -127709,7 +132206,7 @@ module.exports = 'resume'; /***/ }), -/* 574 */ +/* 578 */ /***/ (function(module, exports) { /** @@ -127734,7 +132231,7 @@ module.exports = 'step'; /***/ }), -/* 575 */ +/* 579 */ /***/ (function(module, exports) { /** @@ -127758,7 +132255,7 @@ module.exports = 'visible'; /***/ }), -/* 576 */ +/* 580 */ /***/ (function(module, exports) { /** @@ -127961,7 +132458,7 @@ module.exports = Origin; /***/ }), -/* 577 */ +/* 581 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127970,10 +132467,10 @@ module.exports = Origin; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DegToRad = __webpack_require__(40); -var GetBoolean = __webpack_require__(89); +var DegToRad = __webpack_require__(41); +var GetBoolean = __webpack_require__(90); var GetValue = __webpack_require__(6); -var TWEEN_CONST = __webpack_require__(90); +var TWEEN_CONST = __webpack_require__(91); var Vector2 = __webpack_require__(3); /** @@ -128388,7 +132885,7 @@ module.exports = PathFollower; /***/ }), -/* 578 */ +/* 582 */ /***/ (function(module, exports) { /** @@ -128575,7 +133072,7 @@ module.exports = Size; /***/ }), -/* 579 */ +/* 583 */ /***/ (function(module, exports) { /** @@ -128705,7 +133202,7 @@ module.exports = Texture; /***/ }), -/* 580 */ +/* 584 */ /***/ (function(module, exports) { /** @@ -128913,7 +133410,7 @@ module.exports = TextureCrop; /***/ }), -/* 581 */ +/* 585 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129245,7 +133742,7 @@ module.exports = Tint; /***/ }), -/* 582 */ +/* 586 */ /***/ (function(module, exports) { /** @@ -129277,7 +133774,7 @@ module.exports = 'changedata'; /***/ }), -/* 583 */ +/* 587 */ /***/ (function(module, exports) { /** @@ -129307,7 +133804,7 @@ module.exports = 'changedata-'; /***/ }), -/* 584 */ +/* 588 */ /***/ (function(module, exports) { /** @@ -129335,7 +133832,7 @@ module.exports = 'removedata'; /***/ }), -/* 585 */ +/* 589 */ /***/ (function(module, exports) { /** @@ -129363,7 +133860,33 @@ module.exports = 'setdata'; /***/ }), -/* 586 */ +/* 590 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Object Added to Scene Event. + * + * This event is dispatched when a Game Object is added to a Scene. + * + * Listen for it on a Game Object instance using `GameObject.on('addedtoscene', listener)`. + * + * @event Phaser.GameObjects.Events#ADDED_TO_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene. + * @param {Phaser.Scene} scene - The Scene to which the Game Object was added. + */ +module.exports = 'addedtoscene'; + + +/***/ }), +/* 591 */ /***/ (function(module, exports) { /** @@ -129388,7 +133911,33 @@ module.exports = 'destroy'; /***/ }), -/* 587 */ +/* 592 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Object Removed from Scene Event. + * + * This event is dispatched when a Game Object is removed from a Scene. + * + * Listen for it on a Game Object instance using `GameObject.on('removedfromscene', listener)`. + * + * @event Phaser.GameObjects.Events#REMOVED_FROM_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene. + * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed. + */ +module.exports = 'removedfromscene'; + + +/***/ }), +/* 593 */ /***/ (function(module, exports) { /** @@ -129420,7 +133969,7 @@ module.exports = 'complete'; /***/ }), -/* 588 */ +/* 594 */ /***/ (function(module, exports) { /** @@ -129449,7 +133998,7 @@ module.exports = 'created'; /***/ }), -/* 589 */ +/* 595 */ /***/ (function(module, exports) { /** @@ -129475,7 +134024,7 @@ module.exports = 'error'; /***/ }), -/* 590 */ +/* 596 */ /***/ (function(module, exports) { /** @@ -129507,7 +134056,7 @@ module.exports = 'loop'; /***/ }), -/* 591 */ +/* 597 */ /***/ (function(module, exports) { /** @@ -129535,7 +134084,7 @@ module.exports = 'play'; /***/ }), -/* 592 */ +/* 598 */ /***/ (function(module, exports) { /** @@ -129560,7 +134109,7 @@ module.exports = 'seeked'; /***/ }), -/* 593 */ +/* 599 */ /***/ (function(module, exports) { /** @@ -129586,7 +134135,7 @@ module.exports = 'seeking'; /***/ }), -/* 594 */ +/* 600 */ /***/ (function(module, exports) { /** @@ -129612,7 +134161,7 @@ module.exports = 'stop'; /***/ }), -/* 595 */ +/* 601 */ /***/ (function(module, exports) { /** @@ -129638,7 +134187,7 @@ module.exports = 'timeout'; /***/ }), -/* 596 */ +/* 602 */ /***/ (function(module, exports) { /** @@ -129664,7 +134213,7 @@ module.exports = 'unlocked'; /***/ }), -/* 597 */ +/* 603 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129673,7 +134222,7 @@ module.exports = 'unlocked'; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PropertyValueInc = __webpack_require__(38); +var PropertyValueInc = __webpack_require__(39); /** * Takes an array of Game Objects, or any objects that have a public `alpha` property, @@ -129705,7 +134254,7 @@ module.exports = IncAlpha; /***/ }), -/* 598 */ +/* 604 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129714,7 +134263,7 @@ module.exports = IncAlpha; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PropertyValueInc = __webpack_require__(38); +var PropertyValueInc = __webpack_require__(39); /** * Takes an array of Game Objects, or any objects that have a public `x` property, @@ -129746,7 +134295,7 @@ module.exports = IncX; /***/ }), -/* 599 */ +/* 605 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129755,7 +134304,7 @@ module.exports = IncX; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PropertyValueInc = __webpack_require__(38); +var PropertyValueInc = __webpack_require__(39); /** * Takes an array of Game Objects, or any objects that have public `x` and `y` properties, @@ -129793,7 +134342,7 @@ module.exports = IncXY; /***/ }), -/* 600 */ +/* 606 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129802,7 +134351,7 @@ module.exports = IncXY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PropertyValueInc = __webpack_require__(38); +var PropertyValueInc = __webpack_require__(39); /** * Takes an array of Game Objects, or any objects that have a public `y` property, @@ -129834,7 +134383,7 @@ module.exports = IncY; /***/ }), -/* 601 */ +/* 607 */ /***/ (function(module, exports) { /** @@ -129883,7 +134432,7 @@ module.exports = PlaceOnCircle; /***/ }), -/* 602 */ +/* 608 */ /***/ (function(module, exports) { /** @@ -129935,7 +134484,7 @@ module.exports = PlaceOnEllipse; /***/ }), -/* 603 */ +/* 609 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129944,7 +134493,7 @@ module.exports = PlaceOnEllipse; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetPoints = __webpack_require__(158); +var GetPoints = __webpack_require__(160); /** * Positions an array of Game Objects on evenly spaced points of a Line. @@ -129979,7 +134528,7 @@ module.exports = PlaceOnLine; /***/ }), -/* 604 */ +/* 610 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129988,9 +134537,9 @@ module.exports = PlaceOnLine; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MarchingAnts = __webpack_require__(289); -var RotateLeft = __webpack_require__(290); -var RotateRight = __webpack_require__(291); +var MarchingAnts = __webpack_require__(293); +var RotateLeft = __webpack_require__(294); +var RotateRight = __webpack_require__(295); /** * Takes an array of Game Objects and positions them on evenly spaced points around the perimeter of a Rectangle. @@ -130037,7 +134586,7 @@ module.exports = PlaceOnRectangle; /***/ }), -/* 605 */ +/* 611 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130046,7 +134595,7 @@ module.exports = PlaceOnRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BresenhamPoints = __webpack_require__(292); +var BresenhamPoints = __webpack_require__(296); /** * Takes an array of Game Objects and positions them on evenly spaced points around the edges of a Triangle. @@ -130098,7 +134647,7 @@ module.exports = PlaceOnTriangle; /***/ }), -/* 606 */ +/* 612 */ /***/ (function(module, exports) { /** @@ -130135,7 +134684,7 @@ module.exports = PlayAnimation; /***/ }), -/* 607 */ +/* 613 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130144,7 +134693,7 @@ module.exports = PlayAnimation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(155); +var Random = __webpack_require__(158); /** * Takes an array of Game Objects and positions them at random locations within the Circle. @@ -130175,7 +134724,7 @@ module.exports = RandomCircle; /***/ }), -/* 608 */ +/* 614 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130184,7 +134733,7 @@ module.exports = RandomCircle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(163); +var Random = __webpack_require__(165); /** * Takes an array of Game Objects and positions them at random locations within the Ellipse. @@ -130215,7 +134764,7 @@ module.exports = RandomEllipse; /***/ }), -/* 609 */ +/* 615 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130224,7 +134773,7 @@ module.exports = RandomEllipse; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(159); +var Random = __webpack_require__(161); /** * Takes an array of Game Objects and positions them at random locations on the Line. @@ -130255,7 +134804,7 @@ module.exports = RandomLine; /***/ }), -/* 610 */ +/* 616 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130264,7 +134813,7 @@ module.exports = RandomLine; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(160); +var Random = __webpack_require__(162); /** * Takes an array of Game Objects and positions them at random locations within the Rectangle. @@ -130293,7 +134842,7 @@ module.exports = RandomRectangle; /***/ }), -/* 611 */ +/* 617 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130302,7 +134851,7 @@ module.exports = RandomRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(164); +var Random = __webpack_require__(166); /** * Takes an array of Game Objects and positions them at random locations within the Triangle. @@ -130333,7 +134882,7 @@ module.exports = RandomTriangle; /***/ }), -/* 612 */ +/* 618 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130342,7 +134891,7 @@ module.exports = RandomTriangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PropertyValueInc = __webpack_require__(38); +var PropertyValueInc = __webpack_require__(39); /** * Takes an array of Game Objects, or any objects that have a public `rotation` property, @@ -130374,7 +134923,7 @@ module.exports = Rotate; /***/ }), -/* 613 */ +/* 619 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130383,8 +134932,8 @@ module.exports = Rotate; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundDistance = __webpack_require__(165); -var DistanceBetween = __webpack_require__(54); +var RotateAroundDistance = __webpack_require__(167); +var DistanceBetween = __webpack_require__(55); /** * Rotates each item around the given point by the given angle. @@ -130420,7 +134969,7 @@ module.exports = RotateAround; /***/ }), -/* 614 */ +/* 620 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130429,7 +134978,7 @@ module.exports = RotateAround; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathRotateAroundDistance = __webpack_require__(165); +var MathRotateAroundDistance = __webpack_require__(167); /** * Rotates an array of Game Objects around a point by the given angle and distance. @@ -130469,7 +135018,7 @@ module.exports = RotateAroundDistance; /***/ }), -/* 615 */ +/* 621 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130478,7 +135027,7 @@ module.exports = RotateAroundDistance; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PropertyValueInc = __webpack_require__(38); +var PropertyValueInc = __webpack_require__(39); /** * Takes an array of Game Objects, or any objects that have a public `scaleX` property, @@ -130510,7 +135059,7 @@ module.exports = ScaleX; /***/ }), -/* 616 */ +/* 622 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130519,7 +135068,7 @@ module.exports = ScaleX; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PropertyValueInc = __webpack_require__(38); +var PropertyValueInc = __webpack_require__(39); /** * Takes an array of Game Objects, or any objects that have public `scaleX` and `scaleY` properties, @@ -130557,7 +135106,7 @@ module.exports = ScaleXY; /***/ }), -/* 617 */ +/* 623 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130566,7 +135115,7 @@ module.exports = ScaleXY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PropertyValueInc = __webpack_require__(38); +var PropertyValueInc = __webpack_require__(39); /** * Takes an array of Game Objects, or any objects that have a public `scaleY` property, @@ -130598,7 +135147,7 @@ module.exports = ScaleY; /***/ }), -/* 618 */ +/* 624 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130639,7 +135188,7 @@ module.exports = SetAlpha; /***/ }), -/* 619 */ +/* 625 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130679,7 +135228,7 @@ module.exports = SetBlendMode; /***/ }), -/* 620 */ +/* 626 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130720,7 +135269,7 @@ module.exports = SetDepth; /***/ }), -/* 621 */ +/* 627 */ /***/ (function(module, exports) { /** @@ -130759,7 +135308,7 @@ module.exports = SetHitArea; /***/ }), -/* 622 */ +/* 628 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130798,15 +135347,21 @@ var SetOrigin = function (items, originX, originY, stepX, stepY, index, directio if (originY === undefined || originY === null) { originY = originX; } PropertyValueSet(items, 'originX', originX, stepX, index, direction); + PropertyValueSet(items, 'originY', originY, stepY, index, direction); - return PropertyValueSet(items, 'originY', originY, stepY, index, direction); + items.forEach(function (item) + { + item.updateDisplayOrigin(); + }); + + return items; }; module.exports = SetOrigin; /***/ }), -/* 623 */ +/* 629 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130847,7 +135402,7 @@ module.exports = SetRotation; /***/ }), -/* 624 */ +/* 630 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130894,7 +135449,7 @@ module.exports = SetScale; /***/ }), -/* 625 */ +/* 631 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130935,7 +135490,7 @@ module.exports = SetScaleX; /***/ }), -/* 626 */ +/* 632 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130976,7 +135531,7 @@ module.exports = SetScaleY; /***/ }), -/* 627 */ +/* 633 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131023,7 +135578,7 @@ module.exports = SetScrollFactor; /***/ }), -/* 628 */ +/* 634 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131064,7 +135619,7 @@ module.exports = SetScrollFactorX; /***/ }), -/* 629 */ +/* 635 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131105,7 +135660,7 @@ module.exports = SetScrollFactorY; /***/ }), -/* 630 */ +/* 636 */ /***/ (function(module, exports) { /** @@ -131144,7 +135699,7 @@ module.exports = SetTint; /***/ }), -/* 631 */ +/* 637 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131182,7 +135737,7 @@ module.exports = SetVisible; /***/ }), -/* 632 */ +/* 638 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131223,7 +135778,7 @@ module.exports = SetX; /***/ }), -/* 633 */ +/* 639 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131270,7 +135825,7 @@ module.exports = SetXY; /***/ }), -/* 634 */ +/* 640 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131311,7 +135866,7 @@ module.exports = SetY; /***/ }), -/* 635 */ +/* 641 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131441,7 +135996,7 @@ module.exports = ShiftPosition; /***/ }), -/* 636 */ +/* 642 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131474,7 +136029,7 @@ module.exports = Shuffle; /***/ }), -/* 637 */ +/* 643 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131483,7 +136038,7 @@ module.exports = Shuffle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathSmootherStep = __webpack_require__(166); +var MathSmootherStep = __webpack_require__(168); /** * Smootherstep is a sigmoid-like interpolation and clamping function. @@ -131532,7 +136087,7 @@ module.exports = SmootherStep; /***/ }), -/* 638 */ +/* 644 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131541,7 +136096,7 @@ module.exports = SmootherStep; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathSmoothStep = __webpack_require__(167); +var MathSmoothStep = __webpack_require__(169); /** * Smoothstep is a sigmoid-like interpolation and clamping function. @@ -131590,7 +136145,7 @@ module.exports = SmoothStep; /***/ }), -/* 639 */ +/* 645 */ /***/ (function(module, exports) { /** @@ -131653,7 +136208,7 @@ module.exports = Spread; /***/ }), -/* 640 */ +/* 646 */ /***/ (function(module, exports) { /** @@ -131689,7 +136244,7 @@ module.exports = ToggleVisible; /***/ }), -/* 641 */ +/* 647 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131699,7 +136254,7 @@ module.exports = ToggleVisible; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Wrap = __webpack_require__(58); +var Wrap = __webpack_require__(59); /** * Wrap each item's coordinates within a rectangle's area. @@ -131738,7 +136293,7 @@ module.exports = WrapInRectangle; /***/ }), -/* 642 */ +/* 648 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131753,16 +136308,369 @@ module.exports = WrapInRectangle; module.exports = { - Animation: __webpack_require__(156), - AnimationFrame: __webpack_require__(275), - AnimationManager: __webpack_require__(293), - Events: __webpack_require__(115) + Animation: __webpack_require__(170), + AnimationFrame: __webpack_require__(298), + AnimationManager: __webpack_require__(300), + AnimationState: __webpack_require__(248), + Events: __webpack_require__(120) }; /***/ }), -/* 643 */ +/* 649 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Add Animation Event. + * + * This event is dispatched when a new animation is added to the global Animation Manager. + * + * This can happen either as a result of an animation instance being added to the Animation Manager, + * or the Animation Manager creating a new animation directly. + * + * @event Phaser.Animations.Events#ADD_ANIMATION + * @since 3.0.0 + * + * @param {string} key - The key of the Animation that was added to the global Animation Manager. + * @param {Phaser.Animations.Animation} animation - An instance of the newly created Animation. + */ +module.exports = 'add'; + + +/***/ }), +/* 650 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Complete Event. + * + * This event is dispatched by a Sprite when an animation playing on it completes playback. + * This happens when the animation gets to the end of its sequence, factoring in any delays + * or repeats it may have to process. + * + * An animation that is set to loop, or repeat forever, will never fire this event, because + * it never actually completes. If you need to handle this, listen for the `ANIMATION_STOP` + * event instead, as this is emitted when the animation is stopped directly. + * + * Listen for it on the Sprite using `sprite.on('animationcomplete', listener)` + * + * The animation event flow is as follows: + * + * 1. `ANIMATION_START` + * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) + * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) + * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * + * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. + * + * If the animation is restarted while it is already playing, `ANIMATION_RESTART` is emitted. + * + * @event Phaser.Animations.Events#ANIMATION_COMPLETE + * @since 3.50.0 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated. + * @param {string} frameKey - The unique key of the Animation Frame within the Animation. + */ +module.exports = 'animationcomplete'; + + +/***/ }), +/* 651 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Repeat Event. + * + * This event is dispatched by a Sprite when an animation repeats playing on it. + * This happens if the animation was created, or played, with a `repeat` value specified. + * + * An animation will repeat when it reaches the end of its sequence. + * + * Listen for it on the Sprite using `sprite.on('animationrepeat', listener)` + * + * The animation event flow is as follows: + * + * 1. `ANIMATION_START` + * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) + * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) + * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * + * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. + * + * If the animation is restarted while it is already playing, `ANIMATION_RESTART` is emitted. + * + * @event Phaser.Animations.Events#ANIMATION_REPEAT + * @since 3.50.0 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has repeated. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated. + * @param {string} frameKey - The unique key of the Animation Frame within the Animation. + */ +module.exports = 'animationrepeat'; + + +/***/ }), +/* 652 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Restart Event. + * + * This event is dispatched by a Sprite when an animation restarts playing on it. + * This only happens when the `Sprite.anims.restart` method is called. + * + * Listen for it on the Sprite using `sprite.on('animationrestart', listener)` + * + * The animation event flow is as follows: + * + * 1. `ANIMATION_START` + * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) + * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) + * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * + * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. + * + * If the animation is restarted while it is already playing, `ANIMATION_RESTART` is emitted. + * + * @event Phaser.Animations.Events#ANIMATION_RESTART + * @since 3.50.0 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has restarted. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted. + * @param {string} frameKey - The unique key of the Animation Frame within the Animation. + */ +module.exports = 'animationrestart'; + + +/***/ }), +/* 653 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Start Event. + * + * This event is dispatched by a Sprite when an animation starts playing on it. + * This happens when the animation is played, factoring in any delay that may have been specified. + * This event happens after the delay has expired and prior to the first update event. + * + * Listen for it on the Sprite using `sprite.on('animationstart', listener)` + * + * The animation event flow is as follows: + * + * 1. `ANIMATION_START` + * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) + * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) + * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * + * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. + * + * If the animation is restarted while it is already playing, `ANIMATION_RESTART` is emitted. + * + * @event Phaser.Animations.Events#ANIMATION_START + * @since 3.50.0 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has started. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started. + * @param {string} frameKey - The unique key of the Animation Frame within the Animation. + */ +module.exports = 'animationstart'; + + +/***/ }), +/* 654 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Stop Event. + * + * This event is dispatched by a Sprite when an animation is stopped on it. An animation + * will only be stopeed if a method such as `Sprite.stop` or `Sprite.anims.stopAfterDelay` + * is called. It can also be emitted if a new animation is started before the current one completes. + * + * Listen for it on the Sprite using `sprite.on('animationstop', listener)` + * + * The animation event flow is as follows: + * + * 1. `ANIMATION_START` + * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) + * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) + * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * + * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. + * + * If the animation is restarted while it is already playing, `ANIMATION_RESTART` is emitted. + * + * @event Phaser.Animations.Events#ANIMATION_STOP + * @since 3.50.0 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has stopped. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation stopped. + * @param {string} frameKey - The unique key of the Animation Frame within the Animation. + */ +module.exports = 'animationstop'; + + +/***/ }), +/* 655 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Animation Update Event. + * + * This event is dispatched by a Sprite when an animation playing on it updates. This happens when the animation changes frame. + * An animation will change frame based on the frme rate and other factors like `timeScale` and `delay`. It can also change + * frame when stopped or restarted. + * + * Listen for it on the Sprite using `sprite.on('animationupdate', listener)` + * + * If an animation is playing faster than the game frame-rate can handle, it's entirely possible for it to emit several + * update events in a single game frame, so please be aware of this in your code. The **final** event received that frame + * is the one that is rendered to the game. + * + * The animation event flow is as follows: + * + * 1. `ANIMATION_START` + * 2. `ANIMATION_UPDATE` (repeated for however many frames the animation has) + * 3. `ANIMATION_REPEAT` (only if the animation is set to repeat, it then emits more update events after this) + * 4. `ANIMATION_COMPLETE` (only if there is a finite, or zero, repeat count) + * + * If the animation is stopped directly, the `ANIMATION_STOP` event is dispatched instead of `ANIMATION_COMPLETE`. + * + * If the animation is restarted while it is already playing, `ANIMATION_RESTART` is emitted. + * + * @event Phaser.Animations.Events#ANIMATION_UPDATE + * @since 3.50.0 + * + * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated. + * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation. + * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated. + * @param {string} frameKey - The unique key of the Animation Frame within the Animation. + */ +module.exports = 'animationupdate'; + + +/***/ }), +/* 656 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Pause All Animations Event. + * + * This event is dispatched when the global Animation Manager is told to pause. + * + * When this happens all current animations will stop updating, although it doesn't necessarily mean + * that the game has paused as well. + * + * @event Phaser.Animations.Events#PAUSE_ALL + * @since 3.0.0 + */ +module.exports = 'pauseall'; + + +/***/ }), +/* 657 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Remove Animation Event. + * + * This event is dispatched when an animation is removed from the global Animation Manager. + * + * @event Phaser.Animations.Events#REMOVE_ANIMATION + * @since 3.0.0 + * + * @param {string} key - The key of the Animation that was removed from the global Animation Manager. + * @param {Phaser.Animations.Animation} animation - An instance of the removed Animation. + */ +module.exports = 'remove'; + + +/***/ }), +/* 658 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Resume All Animations Event. + * + * This event is dispatched when the global Animation Manager resumes, having been previously paused. + * + * When this happens all current animations will continue updating again. + * + * @event Phaser.Animations.Events#RESUME_ALL + * @since 3.0.0 + */ +module.exports = 'resumeall'; + + +/***/ }), +/* 659 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131777,15 +136685,15 @@ module.exports = { module.exports = { - BaseCache: __webpack_require__(294), - CacheManager: __webpack_require__(296), - Events: __webpack_require__(295) + BaseCache: __webpack_require__(302), + CacheManager: __webpack_require__(304), + Events: __webpack_require__(303) }; /***/ }), -/* 644 */ +/* 660 */ /***/ (function(module, exports) { /** @@ -131810,7 +136718,7 @@ module.exports = 'add'; /***/ }), -/* 645 */ +/* 661 */ /***/ (function(module, exports) { /** @@ -131835,7 +136743,7 @@ module.exports = 'remove'; /***/ }), -/* 646 */ +/* 662 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131854,14 +136762,14 @@ module.exports = 'remove'; module.exports = { - Controls: __webpack_require__(647), - Scene2D: __webpack_require__(650) + Controls: __webpack_require__(663), + Scene2D: __webpack_require__(666) }; /***/ }), -/* 647 */ +/* 663 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131876,14 +136784,14 @@ module.exports = { module.exports = { - FixedKeyControl: __webpack_require__(648), - SmoothedKeyControl: __webpack_require__(649) + FixedKeyControl: __webpack_require__(664), + SmoothedKeyControl: __webpack_require__(665) }; /***/ }), -/* 648 */ +/* 664 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132189,7 +137097,7 @@ module.exports = FixedKeyControl; /***/ }), -/* 649 */ +/* 665 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132672,7 +137580,7 @@ module.exports = SmoothedKeyControl; /***/ }), -/* 650 */ +/* 666 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132687,17 +137595,17 @@ module.exports = SmoothedKeyControl; module.exports = { - Camera: __webpack_require__(297), + Camera: __webpack_require__(305), BaseCamera: __webpack_require__(92), - CameraManager: __webpack_require__(706), - Effects: __webpack_require__(305), - Events: __webpack_require__(41) + CameraManager: __webpack_require__(722), + Effects: __webpack_require__(313), + Events: __webpack_require__(42) }; /***/ }), -/* 651 */ +/* 667 */ /***/ (function(module, exports) { /** @@ -132720,7 +137628,7 @@ module.exports = 'cameradestroy'; /***/ }), -/* 652 */ +/* 668 */ /***/ (function(module, exports) { /** @@ -132746,7 +137654,7 @@ module.exports = 'camerafadeincomplete'; /***/ }), -/* 653 */ +/* 669 */ /***/ (function(module, exports) { /** @@ -132776,7 +137684,7 @@ module.exports = 'camerafadeinstart'; /***/ }), -/* 654 */ +/* 670 */ /***/ (function(module, exports) { /** @@ -132802,7 +137710,7 @@ module.exports = 'camerafadeoutcomplete'; /***/ }), -/* 655 */ +/* 671 */ /***/ (function(module, exports) { /** @@ -132832,7 +137740,7 @@ module.exports = 'camerafadeoutstart'; /***/ }), -/* 656 */ +/* 672 */ /***/ (function(module, exports) { /** @@ -132856,7 +137764,7 @@ module.exports = 'cameraflashcomplete'; /***/ }), -/* 657 */ +/* 673 */ /***/ (function(module, exports) { /** @@ -132884,7 +137792,7 @@ module.exports = 'cameraflashstart'; /***/ }), -/* 658 */ +/* 674 */ /***/ (function(module, exports) { /** @@ -132908,7 +137816,7 @@ module.exports = 'camerapancomplete'; /***/ }), -/* 659 */ +/* 675 */ /***/ (function(module, exports) { /** @@ -132935,7 +137843,7 @@ module.exports = 'camerapanstart'; /***/ }), -/* 660 */ +/* 676 */ /***/ (function(module, exports) { /** @@ -132961,7 +137869,7 @@ module.exports = 'postrender'; /***/ }), -/* 661 */ +/* 677 */ /***/ (function(module, exports) { /** @@ -132987,7 +137895,7 @@ module.exports = 'prerender'; /***/ }), -/* 662 */ +/* 678 */ /***/ (function(module, exports) { /** @@ -133011,7 +137919,7 @@ module.exports = 'camerarotatecomplete'; /***/ }), -/* 663 */ +/* 679 */ /***/ (function(module, exports) { /** @@ -133037,7 +137945,7 @@ module.exports = 'camerarotatestart'; /***/ }), -/* 664 */ +/* 680 */ /***/ (function(module, exports) { /** @@ -133061,7 +137969,7 @@ module.exports = 'camerashakecomplete'; /***/ }), -/* 665 */ +/* 681 */ /***/ (function(module, exports) { /** @@ -133087,7 +137995,7 @@ module.exports = 'camerashakestart'; /***/ }), -/* 666 */ +/* 682 */ /***/ (function(module, exports) { /** @@ -133111,7 +138019,7 @@ module.exports = 'camerazoomcomplete'; /***/ }), -/* 667 */ +/* 683 */ /***/ (function(module, exports) { /** @@ -133137,7 +138045,7 @@ module.exports = 'camerazoomstart'; /***/ }), -/* 668 */ +/* 684 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133148,7 +138056,7 @@ module.exports = 'camerazoomstart'; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var Events = __webpack_require__(41); +var Events = __webpack_require__(42); /** * @classdesc @@ -133525,7 +138433,7 @@ module.exports = Fade; /***/ }), -/* 669 */ +/* 685 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133536,7 +138444,7 @@ module.exports = Fade; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var Events = __webpack_require__(41); +var Events = __webpack_require__(42); /** * @classdesc @@ -133876,7 +138784,7 @@ module.exports = Flash; /***/ }), -/* 670 */ +/* 686 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133887,8 +138795,8 @@ module.exports = Flash; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var EaseMap = __webpack_require__(120); -var Events = __webpack_require__(41); +var EaseMap = __webpack_require__(122); +var Events = __webpack_require__(42); var Vector2 = __webpack_require__(3); /** @@ -134201,7 +139109,7 @@ module.exports = Pan; /***/ }), -/* 671 */ +/* 687 */ /***/ (function(module, exports) { /** @@ -134232,7 +139140,7 @@ module.exports = In; /***/ }), -/* 672 */ +/* 688 */ /***/ (function(module, exports) { /** @@ -134263,7 +139171,7 @@ module.exports = Out; /***/ }), -/* 673 */ +/* 689 */ /***/ (function(module, exports) { /** @@ -134303,7 +139211,7 @@ module.exports = InOut; /***/ }), -/* 674 */ +/* 690 */ /***/ (function(module, exports) { /** @@ -134348,7 +139256,7 @@ module.exports = In; /***/ }), -/* 675 */ +/* 691 */ /***/ (function(module, exports) { /** @@ -134391,7 +139299,7 @@ module.exports = Out; /***/ }), -/* 676 */ +/* 692 */ /***/ (function(module, exports) { /** @@ -134455,7 +139363,7 @@ module.exports = InOut; /***/ }), -/* 677 */ +/* 693 */ /***/ (function(module, exports) { /** @@ -134483,7 +139391,7 @@ module.exports = In; /***/ }), -/* 678 */ +/* 694 */ /***/ (function(module, exports) { /** @@ -134511,7 +139419,7 @@ module.exports = Out; /***/ }), -/* 679 */ +/* 695 */ /***/ (function(module, exports) { /** @@ -134546,7 +139454,7 @@ module.exports = InOut; /***/ }), -/* 680 */ +/* 696 */ /***/ (function(module, exports) { /** @@ -134574,7 +139482,7 @@ module.exports = In; /***/ }), -/* 681 */ +/* 697 */ /***/ (function(module, exports) { /** @@ -134602,7 +139510,7 @@ module.exports = Out; /***/ }), -/* 682 */ +/* 698 */ /***/ (function(module, exports) { /** @@ -134637,7 +139545,7 @@ module.exports = InOut; /***/ }), -/* 683 */ +/* 699 */ /***/ (function(module, exports) { /** @@ -134692,7 +139600,7 @@ module.exports = In; /***/ }), -/* 684 */ +/* 700 */ /***/ (function(module, exports) { /** @@ -134747,7 +139655,7 @@ module.exports = Out; /***/ }), -/* 685 */ +/* 701 */ /***/ (function(module, exports) { /** @@ -134809,7 +139717,7 @@ module.exports = InOut; /***/ }), -/* 686 */ +/* 702 */ /***/ (function(module, exports) { /** @@ -134837,7 +139745,7 @@ module.exports = In; /***/ }), -/* 687 */ +/* 703 */ /***/ (function(module, exports) { /** @@ -134865,7 +139773,7 @@ module.exports = Out; /***/ }), -/* 688 */ +/* 704 */ /***/ (function(module, exports) { /** @@ -134900,7 +139808,7 @@ module.exports = InOut; /***/ }), -/* 689 */ +/* 705 */ /***/ (function(module, exports) { /** @@ -134928,7 +139836,7 @@ module.exports = Linear; /***/ }), -/* 690 */ +/* 706 */ /***/ (function(module, exports) { /** @@ -134956,7 +139864,7 @@ module.exports = In; /***/ }), -/* 691 */ +/* 707 */ /***/ (function(module, exports) { /** @@ -134984,7 +139892,7 @@ module.exports = Out; /***/ }), -/* 692 */ +/* 708 */ /***/ (function(module, exports) { /** @@ -135019,7 +139927,7 @@ module.exports = InOut; /***/ }), -/* 693 */ +/* 709 */ /***/ (function(module, exports) { /** @@ -135047,7 +139955,7 @@ module.exports = In; /***/ }), -/* 694 */ +/* 710 */ /***/ (function(module, exports) { /** @@ -135075,7 +139983,7 @@ module.exports = Out; /***/ }), -/* 695 */ +/* 711 */ /***/ (function(module, exports) { /** @@ -135110,7 +140018,7 @@ module.exports = InOut; /***/ }), -/* 696 */ +/* 712 */ /***/ (function(module, exports) { /** @@ -135138,7 +140046,7 @@ module.exports = In; /***/ }), -/* 697 */ +/* 713 */ /***/ (function(module, exports) { /** @@ -135166,7 +140074,7 @@ module.exports = Out; /***/ }), -/* 698 */ +/* 714 */ /***/ (function(module, exports) { /** @@ -135201,7 +140109,7 @@ module.exports = InOut; /***/ }), -/* 699 */ +/* 715 */ /***/ (function(module, exports) { /** @@ -135240,7 +140148,7 @@ module.exports = In; /***/ }), -/* 700 */ +/* 716 */ /***/ (function(module, exports) { /** @@ -135279,7 +140187,7 @@ module.exports = Out; /***/ }), -/* 701 */ +/* 717 */ /***/ (function(module, exports) { /** @@ -135318,7 +140226,7 @@ module.exports = InOut; /***/ }), -/* 702 */ +/* 718 */ /***/ (function(module, exports) { /** @@ -135360,7 +140268,7 @@ module.exports = Stepped; /***/ }), -/* 703 */ +/* 719 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135371,7 +140279,7 @@ module.exports = Stepped; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var Events = __webpack_require__(41); +var Events = __webpack_require__(42); var Vector2 = __webpack_require__(3); /** @@ -135679,7 +140587,7 @@ module.exports = Shake; /***/ }), -/* 704 */ +/* 720 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135690,8 +140598,8 @@ module.exports = Shake; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var Events = __webpack_require__(41); -var EaseMap = __webpack_require__(120); +var Events = __webpack_require__(42); +var EaseMap = __webpack_require__(122); /** * @classdesc @@ -136112,7 +141020,7 @@ module.exports = RotateTo; /***/ }), -/* 705 */ +/* 721 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136123,8 +141031,8 @@ module.exports = RotateTo; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var EaseMap = __webpack_require__(120); -var Events = __webpack_require__(41); +var EaseMap = __webpack_require__(122); +var Events = __webpack_require__(42); /** * @classdesc @@ -136405,7 +141313,7 @@ module.exports = Zoom; /***/ }), -/* 706 */ +/* 722 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136414,13 +141322,13 @@ module.exports = Zoom; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Camera = __webpack_require__(297); +var Camera = __webpack_require__(305); var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(2); var PluginCache = __webpack_require__(23); -var RectangleContains = __webpack_require__(49); +var RectangleContains = __webpack_require__(50); var ScaleEvents = __webpack_require__(93); -var SceneEvents = __webpack_require__(22); +var SceneEvents = __webpack_require__(20); /** * @classdesc @@ -137153,7 +142061,7 @@ module.exports = CameraManager; /***/ }), -/* 707 */ +/* 723 */ /***/ (function(module, exports) { /** @@ -137172,7 +142080,7 @@ module.exports = 'enterfullscreen'; /***/ }), -/* 708 */ +/* 724 */ /***/ (function(module, exports) { /** @@ -137191,7 +142099,7 @@ module.exports = 'fullscreenfailed'; /***/ }), -/* 709 */ +/* 725 */ /***/ (function(module, exports) { /** @@ -137210,7 +142118,7 @@ module.exports = 'fullscreenunsupported'; /***/ }), -/* 710 */ +/* 726 */ /***/ (function(module, exports) { /** @@ -137230,7 +142138,7 @@ module.exports = 'leavefullscreen'; /***/ }), -/* 711 */ +/* 727 */ /***/ (function(module, exports) { /** @@ -137251,7 +142159,7 @@ module.exports = 'orientationchange'; /***/ }), -/* 712 */ +/* 728 */ /***/ (function(module, exports) { /** @@ -137282,7 +142190,33 @@ module.exports = 'resize'; /***/ }), -/* 713 */ +/* 729 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Object Added to Scene Event. + * + * This event is dispatched when a Game Object is added to a Scene. + * + * Listen for it from a Scene using `this.scene.events.on('addedtoscene', listener)`. + * + * @event Phaser.Scenes.Events#ADDED_TO_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the Scene. + * @param {Phaser.Scene} scene - The Scene to which the Game Object was added. + */ +module.exports = 'addedtoscene'; + + +/***/ }), +/* 730 */ /***/ (function(module, exports) { /** @@ -137307,7 +142241,7 @@ module.exports = 'boot'; /***/ }), -/* 714 */ +/* 731 */ /***/ (function(module, exports) { /** @@ -137336,7 +142270,7 @@ module.exports = 'create'; /***/ }), -/* 715 */ +/* 732 */ /***/ (function(module, exports) { /** @@ -137363,7 +142297,7 @@ module.exports = 'destroy'; /***/ }), -/* 716 */ +/* 733 */ /***/ (function(module, exports) { /** @@ -137390,7 +142324,7 @@ module.exports = 'pause'; /***/ }), -/* 717 */ +/* 734 */ /***/ (function(module, exports) { /** @@ -137427,7 +142361,7 @@ module.exports = 'postupdate'; /***/ }), -/* 718 */ +/* 735 */ /***/ (function(module, exports) { /** @@ -137464,7 +142398,7 @@ module.exports = 'preupdate'; /***/ }), -/* 719 */ +/* 736 */ /***/ (function(module, exports) { /** @@ -137492,7 +142426,33 @@ module.exports = 'ready'; /***/ }), -/* 720 */ +/* 737 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Game Object Removed from Scene Event. + * + * This event is dispatched when a Game Object is removed from a Scene. + * + * Listen for it from a Scene using `this.scene.events.on('removedfromscene', listener)`. + * + * @event Phaser.Scenes.Events#REMOVED_FROM_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the Scene. + * @param {Phaser.Scene} scene - The Scene from which the Game Object was removed. + */ +module.exports = 'removedfromscene'; + + +/***/ }), +/* 738 */ /***/ (function(module, exports) { /** @@ -137528,7 +142488,7 @@ module.exports = 'render'; /***/ }), -/* 721 */ +/* 739 */ /***/ (function(module, exports) { /** @@ -137555,7 +142515,7 @@ module.exports = 'resume'; /***/ }), -/* 722 */ +/* 740 */ /***/ (function(module, exports) { /** @@ -137585,7 +142545,7 @@ module.exports = 'shutdown'; /***/ }), -/* 723 */ +/* 741 */ /***/ (function(module, exports) { /** @@ -137612,7 +142572,7 @@ module.exports = 'sleep'; /***/ }), -/* 724 */ +/* 742 */ /***/ (function(module, exports) { /** @@ -137637,7 +142597,7 @@ module.exports = 'start'; /***/ }), -/* 725 */ +/* 743 */ /***/ (function(module, exports) { /** @@ -137673,7 +142633,7 @@ module.exports = 'transitioncomplete'; /***/ }), -/* 726 */ +/* 744 */ /***/ (function(module, exports) { /** @@ -137710,7 +142670,7 @@ module.exports = 'transitioninit'; /***/ }), -/* 727 */ +/* 745 */ /***/ (function(module, exports) { /** @@ -137744,7 +142704,7 @@ module.exports = 'transitionout'; /***/ }), -/* 728 */ +/* 746 */ /***/ (function(module, exports) { /** @@ -137784,7 +142744,7 @@ module.exports = 'transitionstart'; /***/ }), -/* 729 */ +/* 747 */ /***/ (function(module, exports) { /** @@ -137819,7 +142779,7 @@ module.exports = 'transitionwake'; /***/ }), -/* 730 */ +/* 748 */ /***/ (function(module, exports) { /** @@ -137856,7 +142816,7 @@ module.exports = 'update'; /***/ }), -/* 731 */ +/* 749 */ /***/ (function(module, exports) { /** @@ -137883,7 +142843,7 @@ module.exports = 'wake'; /***/ }), -/* 732 */ +/* 750 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137898,18 +142858,18 @@ module.exports = 'wake'; module.exports = { - Config: __webpack_require__(318), - CreateRenderer: __webpack_require__(340), - DebugHeader: __webpack_require__(342), - Events: __webpack_require__(20), - TimeStep: __webpack_require__(343), - VisibilityHandler: __webpack_require__(345) + Config: __webpack_require__(326), + CreateRenderer: __webpack_require__(348), + DebugHeader: __webpack_require__(350), + Events: __webpack_require__(21), + TimeStep: __webpack_require__(351), + VisibilityHandler: __webpack_require__(353) }; /***/ }), -/* 733 */ +/* 751 */ /***/ (function(module, exports) { // shim for using process in browser @@ -138099,7 +143059,7 @@ process.umask = function() { return 0; }; /***/ }), -/* 734 */ +/* 752 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138108,7 +143068,7 @@ process.umask = function() { return 0; }; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Browser = __webpack_require__(123); +var Browser = __webpack_require__(125); /** * Determines the input support of the browser running this Phaser Game instance. @@ -138174,7 +143134,7 @@ module.exports = init(); /***/ }), -/* 735 */ +/* 753 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138183,7 +143143,7 @@ module.exports = init(); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Browser = __webpack_require__(123); +var Browser = __webpack_require__(125); /** * Determines the audio playback capabilities of the device running this Phaser Game instance. @@ -138299,7 +143259,7 @@ module.exports = init(); /***/ }), -/* 736 */ +/* 754 */ /***/ (function(module, exports) { /** @@ -138386,7 +143346,7 @@ module.exports = init(); /***/ }), -/* 737 */ +/* 755 */ /***/ (function(module, exports) { /** @@ -138490,7 +143450,7 @@ module.exports = init(); /***/ }), -/* 738 */ +/* 756 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138505,25 +143465,25 @@ module.exports = init(); module.exports = { - Between: __webpack_require__(321), - BetweenPoints: __webpack_require__(322), - BetweenPointsY: __webpack_require__(739), - BetweenY: __webpack_require__(740), - CounterClockwise: __webpack_require__(741), - Normalize: __webpack_require__(323), - Random: __webpack_require__(742), - RandomDegrees: __webpack_require__(743), - Reverse: __webpack_require__(744), - RotateTo: __webpack_require__(745), - ShortestBetween: __webpack_require__(746), - Wrap: __webpack_require__(241), - WrapDegrees: __webpack_require__(242) + Between: __webpack_require__(329), + BetweenPoints: __webpack_require__(330), + BetweenPointsY: __webpack_require__(757), + BetweenY: __webpack_require__(758), + CounterClockwise: __webpack_require__(759), + Normalize: __webpack_require__(331), + Random: __webpack_require__(760), + RandomDegrees: __webpack_require__(761), + Reverse: __webpack_require__(762), + RotateTo: __webpack_require__(763), + ShortestBetween: __webpack_require__(764), + Wrap: __webpack_require__(246), + WrapDegrees: __webpack_require__(247) }; /***/ }), -/* 739 */ +/* 757 */ /***/ (function(module, exports) { /** @@ -138555,7 +143515,7 @@ module.exports = BetweenPointsY; /***/ }), -/* 740 */ +/* 758 */ /***/ (function(module, exports) { /** @@ -138589,7 +143549,7 @@ module.exports = BetweenY; /***/ }), -/* 741 */ +/* 759 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138634,7 +143594,7 @@ module.exports = CounterClockwise; /***/ }), -/* 742 */ +/* 760 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138644,7 +143604,7 @@ module.exports = CounterClockwise; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FloatBetween = __webpack_require__(124); +var FloatBetween = __webpack_require__(126); /** * Returns a random angle in the range [-pi, pi]. @@ -138663,7 +143623,7 @@ module.exports = Random; /***/ }), -/* 743 */ +/* 761 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138673,7 +143633,7 @@ module.exports = Random; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FloatBetween = __webpack_require__(124); +var FloatBetween = __webpack_require__(126); /** * Returns a random angle in the range [-180, 180]. @@ -138692,7 +143652,7 @@ module.exports = RandomDegrees; /***/ }), -/* 744 */ +/* 762 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138701,7 +143661,7 @@ module.exports = RandomDegrees; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Normalize = __webpack_require__(323); +var Normalize = __webpack_require__(331); /** * Reverse the given angle. @@ -138722,7 +143682,7 @@ module.exports = Reverse; /***/ }), -/* 745 */ +/* 763 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138789,7 +143749,7 @@ module.exports = RotateTo; /***/ }), -/* 746 */ +/* 764 */ /***/ (function(module, exports) { /** @@ -138838,7 +143798,7 @@ module.exports = ShortestBetween; /***/ }), -/* 747 */ +/* 765 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138853,19 +143813,19 @@ module.exports = ShortestBetween; module.exports = { - Between: __webpack_require__(54), - BetweenPoints: __webpack_require__(324), - BetweenPointsSquared: __webpack_require__(748), - Chebyshev: __webpack_require__(749), - Power: __webpack_require__(750), - Snake: __webpack_require__(751), - Squared: __webpack_require__(325) + Between: __webpack_require__(55), + BetweenPoints: __webpack_require__(332), + BetweenPointsSquared: __webpack_require__(766), + Chebyshev: __webpack_require__(767), + Power: __webpack_require__(768), + Snake: __webpack_require__(769), + Squared: __webpack_require__(333) }; /***/ }), -/* 748 */ +/* 766 */ /***/ (function(module, exports) { /** @@ -138897,7 +143857,7 @@ module.exports = DistanceBetweenPointsSquared; /***/ }), -/* 749 */ +/* 767 */ /***/ (function(module, exports) { /** @@ -138931,7 +143891,7 @@ module.exports = ChebyshevDistance; /***/ }), -/* 750 */ +/* 768 */ /***/ (function(module, exports) { /** @@ -138965,7 +143925,7 @@ module.exports = DistancePower; /***/ }), -/* 751 */ +/* 769 */ /***/ (function(module, exports) { /** @@ -138999,7 +143959,7 @@ module.exports = SnakeDistance; /***/ }), -/* 752 */ +/* 770 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139014,24 +143974,24 @@ module.exports = SnakeDistance; module.exports = { - Back: __webpack_require__(306), - Bounce: __webpack_require__(307), - Circular: __webpack_require__(308), - Cubic: __webpack_require__(309), - Elastic: __webpack_require__(310), - Expo: __webpack_require__(311), - Linear: __webpack_require__(312), - Quadratic: __webpack_require__(313), - Quartic: __webpack_require__(314), - Quintic: __webpack_require__(315), - Sine: __webpack_require__(316), - Stepped: __webpack_require__(317) + Back: __webpack_require__(314), + Bounce: __webpack_require__(315), + Circular: __webpack_require__(316), + Cubic: __webpack_require__(317), + Elastic: __webpack_require__(318), + Expo: __webpack_require__(319), + Linear: __webpack_require__(320), + Quadratic: __webpack_require__(321), + Quartic: __webpack_require__(322), + Quintic: __webpack_require__(323), + Sine: __webpack_require__(324), + Stepped: __webpack_require__(325) }; /***/ }), -/* 753 */ +/* 771 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139046,17 +144006,17 @@ module.exports = { module.exports = { - Ceil: __webpack_require__(754), - Equal: __webpack_require__(107), - Floor: __webpack_require__(755), - GreaterThan: __webpack_require__(326), - LessThan: __webpack_require__(327) + Ceil: __webpack_require__(772), + Equal: __webpack_require__(108), + Floor: __webpack_require__(773), + GreaterThan: __webpack_require__(334), + LessThan: __webpack_require__(335) }; /***/ }), -/* 754 */ +/* 772 */ /***/ (function(module, exports) { /** @@ -139087,7 +144047,7 @@ module.exports = Ceil; /***/ }), -/* 755 */ +/* 773 */ /***/ (function(module, exports) { /** @@ -139118,7 +144078,7 @@ module.exports = Floor; /***/ }), -/* 756 */ +/* 774 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139133,19 +144093,19 @@ module.exports = Floor; module.exports = { - Bezier: __webpack_require__(757), - CatmullRom: __webpack_require__(758), - CubicBezier: __webpack_require__(330), - Linear: __webpack_require__(759), - QuadraticBezier: __webpack_require__(331), - SmoothStep: __webpack_require__(332), - SmootherStep: __webpack_require__(760) + Bezier: __webpack_require__(775), + CatmullRom: __webpack_require__(776), + CubicBezier: __webpack_require__(338), + Linear: __webpack_require__(777), + QuadraticBezier: __webpack_require__(339), + SmoothStep: __webpack_require__(340), + SmootherStep: __webpack_require__(778) }; /***/ }), -/* 757 */ +/* 775 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139154,7 +144114,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bernstein = __webpack_require__(328); +var Bernstein = __webpack_require__(336); /** * A bezier interpolation method. @@ -139184,7 +144144,7 @@ module.exports = BezierInterpolation; /***/ }), -/* 758 */ +/* 776 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139193,7 +144153,7 @@ module.exports = BezierInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CatmullRom = __webpack_require__(177); +var CatmullRom = __webpack_require__(179); /** * A Catmull-Rom interpolation method. @@ -139241,7 +144201,7 @@ module.exports = CatmullRomInterpolation; /***/ }), -/* 759 */ +/* 777 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139250,7 +144210,7 @@ module.exports = CatmullRomInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Linear = __webpack_require__(121); +var Linear = __webpack_require__(123); /** * A linear interpolation method. @@ -139288,7 +144248,7 @@ module.exports = LinearInterpolation; /***/ }), -/* 760 */ +/* 778 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139297,7 +144257,7 @@ module.exports = LinearInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmootherStep = __webpack_require__(166); +var SmootherStep = __webpack_require__(168); /** * A Smoother Step interpolation method. @@ -139321,7 +144281,7 @@ module.exports = SmootherStepInterpolation; /***/ }), -/* 761 */ +/* 779 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139336,15 +144296,15 @@ module.exports = SmootherStepInterpolation; module.exports = { - GetNext: __webpack_require__(333), - IsSize: __webpack_require__(125), - IsValue: __webpack_require__(762) + GetNext: __webpack_require__(341), + IsSize: __webpack_require__(127), + IsValue: __webpack_require__(780) }; /***/ }), -/* 762 */ +/* 780 */ /***/ (function(module, exports) { /** @@ -139372,7 +144332,7 @@ module.exports = IsValuePowerOfTwo; /***/ }), -/* 763 */ +/* 781 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139387,15 +144347,15 @@ module.exports = IsValuePowerOfTwo; module.exports = { - Ceil: __webpack_require__(334), + Ceil: __webpack_require__(342), Floor: __webpack_require__(94), - To: __webpack_require__(764) + To: __webpack_require__(782) }; /***/ }), -/* 764 */ +/* 782 */ /***/ (function(module, exports) { /** @@ -139438,7 +144398,7 @@ module.exports = SnapTo; /***/ }), -/* 765 */ +/* 783 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139948,7 +144908,7 @@ module.exports = RandomDataGenerator; /***/ }), -/* 766 */ +/* 784 */ /***/ (function(module, exports) { /** @@ -139983,7 +144943,7 @@ module.exports = Average; /***/ }), -/* 767 */ +/* 785 */ /***/ (function(module, exports) { /** @@ -140020,7 +144980,7 @@ module.exports = CeilTo; /***/ }), -/* 768 */ +/* 786 */ /***/ (function(module, exports) { /** @@ -140049,7 +145009,7 @@ module.exports = Difference; /***/ }), -/* 769 */ +/* 787 */ /***/ (function(module, exports) { /** @@ -140086,7 +145046,7 @@ module.exports = FloorTo; /***/ }), -/* 770 */ +/* 788 */ /***/ (function(module, exports) { /** @@ -140119,7 +145079,7 @@ module.exports = GetSpeed; /***/ }), -/* 771 */ +/* 789 */ /***/ (function(module, exports) { /** @@ -140150,7 +145110,7 @@ module.exports = IsEven; /***/ }), -/* 772 */ +/* 790 */ /***/ (function(module, exports) { /** @@ -140179,7 +145139,7 @@ module.exports = IsEvenStrict; /***/ }), -/* 773 */ +/* 791 */ /***/ (function(module, exports) { /** @@ -140209,7 +145169,7 @@ module.exports = MaxAdd; /***/ }), -/* 774 */ +/* 792 */ /***/ (function(module, exports) { /** @@ -140239,7 +145199,7 @@ module.exports = MinSub; /***/ }), -/* 775 */ +/* 793 */ /***/ (function(module, exports) { /** @@ -140298,7 +145258,7 @@ module.exports = Percent; /***/ }), -/* 776 */ +/* 794 */ /***/ (function(module, exports) { /** @@ -140338,7 +145298,7 @@ module.exports = RandomXY; /***/ }), -/* 777 */ +/* 795 */ /***/ (function(module, exports) { /** @@ -140377,7 +145337,7 @@ module.exports = RandomXYZ; /***/ }), -/* 778 */ +/* 796 */ /***/ (function(module, exports) { /** @@ -140414,7 +145374,7 @@ module.exports = RandomXYZW; /***/ }), -/* 779 */ +/* 797 */ /***/ (function(module, exports) { /** @@ -140451,7 +145411,7 @@ module.exports = RotateTo; /***/ }), -/* 780 */ +/* 798 */ /***/ (function(module, exports) { /** @@ -140503,7 +145463,7 @@ module.exports = RoundTo; /***/ }), -/* 781 */ +/* 799 */ /***/ (function(module, exports) { /** @@ -140556,7 +145516,7 @@ module.exports = SinCosTableGenerator; /***/ }), -/* 782 */ +/* 800 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140614,7 +145574,7 @@ module.exports = ToXY; /***/ }), -/* 783 */ +/* 801 */ /***/ (function(module, exports) { /** @@ -140644,7 +145604,7 @@ module.exports = Within; /***/ }), -/* 784 */ +/* 802 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140653,9 +145613,9 @@ module.exports = Within; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector3 = __webpack_require__(80); -var Matrix4 = __webpack_require__(338); -var Quaternion = __webpack_require__(339); +var Vector3 = __webpack_require__(81); +var Matrix4 = __webpack_require__(346); +var Quaternion = __webpack_require__(347); var tmpMat4 = new Matrix4(); var tmpQuat = new Quaternion(); @@ -140692,7 +145652,7 @@ module.exports = RotateVec3; /***/ }), -/* 785 */ +/* 803 */ /***/ (function(module, exports) { /** @@ -140718,7 +145678,7 @@ module.exports = 'addtexture'; /***/ }), -/* 786 */ +/* 804 */ /***/ (function(module, exports) { /** @@ -140744,7 +145704,7 @@ module.exports = 'onerror'; /***/ }), -/* 787 */ +/* 805 */ /***/ (function(module, exports) { /** @@ -140773,7 +145733,7 @@ module.exports = 'onload'; /***/ }), -/* 788 */ +/* 806 */ /***/ (function(module, exports) { /** @@ -140796,7 +145756,7 @@ module.exports = 'ready'; /***/ }), -/* 789 */ +/* 807 */ /***/ (function(module, exports) { /** @@ -140824,7 +145784,7 @@ module.exports = 'removetexture'; /***/ }), -/* 790 */ +/* 808 */ /***/ (function(module, exports) { module.exports = [ @@ -140860,7 +145820,7 @@ module.exports = [ /***/ }), -/* 791 */ +/* 809 */ /***/ (function(module, exports) { module.exports = [ @@ -140879,11 +145839,11 @@ module.exports = [ /***/ }), -/* 792 */ +/* 810 */ /***/ (function(module, exports) { module.exports = [ - '#define SHADER_NAME PHASER_FORWARD_DIFFUSE_FS', + '#define SHADER_NAME PHASER_LIGHT_FS', '', 'precision mediump float;', '', @@ -140938,11 +145898,11 @@ module.exports = [ /***/ }), -/* 793 */ +/* 811 */ /***/ (function(module, exports) { module.exports = [ - '#define SHADER_NAME PHASER_TEXTURE_TINT_FS', + '#define SHADER_NAME PHASER_MULTI_FS', '', 'precision mediump float;', '', @@ -140986,11 +145946,11 @@ module.exports = [ /***/ }), -/* 794 */ +/* 812 */ /***/ (function(module, exports) { module.exports = [ - '#define SHADER_NAME PHASER_TEXTURE_TINT_VS', + '#define SHADER_NAME PHASER_MULTI_VS', '', 'precision mediump float;', '', @@ -141024,11 +145984,11 @@ module.exports = [ /***/ }), -/* 795 */ +/* 813 */ /***/ (function(module, exports) { module.exports = [ - '#define SHADER_NAME PHASER_SINGLE_TEXTURE_TINT_FS', + '#define SHADER_NAME PHASER_SINGLE_FS', '', 'precision mediump float;', '', @@ -141068,11 +146028,11 @@ module.exports = [ /***/ }), -/* 796 */ +/* 814 */ /***/ (function(module, exports) { module.exports = [ - '#define SHADER_NAME PHASER_SINGLE_TEXTURE_TINT_VS', + '#define SHADER_NAME PHASER_SINGLE_VS', '', 'precision mediump float;', '', @@ -141102,7 +146062,7 @@ module.exports = [ /***/ }), -/* 797 */ +/* 815 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141117,14 +146077,14 @@ module.exports = [ module.exports = { - GenerateTexture: __webpack_require__(346), - Palettes: __webpack_require__(798) + GenerateTexture: __webpack_require__(354), + Palettes: __webpack_require__(816) }; /***/ }), -/* 798 */ +/* 816 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141139,17 +146099,17 @@ module.exports = { module.exports = { - ARNE16: __webpack_require__(347), - C64: __webpack_require__(799), - CGA: __webpack_require__(800), - JMP: __webpack_require__(801), - MSX: __webpack_require__(802) + ARNE16: __webpack_require__(355), + C64: __webpack_require__(817), + CGA: __webpack_require__(818), + JMP: __webpack_require__(819), + MSX: __webpack_require__(820) }; /***/ }), -/* 799 */ +/* 817 */ /***/ (function(module, exports) { /** @@ -141187,7 +146147,7 @@ module.exports = { /***/ }), -/* 800 */ +/* 818 */ /***/ (function(module, exports) { /** @@ -141225,7 +146185,7 @@ module.exports = { /***/ }), -/* 801 */ +/* 819 */ /***/ (function(module, exports) { /** @@ -141263,7 +146223,7 @@ module.exports = { /***/ }), -/* 802 */ +/* 820 */ /***/ (function(module, exports) { /** @@ -141301,7 +146261,7 @@ module.exports = { /***/ }), -/* 803 */ +/* 821 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141315,19 +146275,20 @@ module.exports = { */ module.exports = { - Path: __webpack_require__(804), + Path: __webpack_require__(822), + MoveTo: __webpack_require__(359), - CubicBezier: __webpack_require__(348), - Curve: __webpack_require__(82), - Ellipse: __webpack_require__(349), - Line: __webpack_require__(350), - QuadraticBezier: __webpack_require__(351), - Spline: __webpack_require__(352) + CubicBezier: __webpack_require__(356), + Curve: __webpack_require__(83), + Ellipse: __webpack_require__(357), + Line: __webpack_require__(358), + QuadraticBezier: __webpack_require__(360), + Spline: __webpack_require__(361) }; /***/ }), -/* 804 */ +/* 822 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141339,14 +146300,14 @@ module.exports = { // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) var Class = __webpack_require__(0); -var CubicBezierCurve = __webpack_require__(348); -var EllipseCurve = __webpack_require__(349); +var CubicBezierCurve = __webpack_require__(356); +var EllipseCurve = __webpack_require__(357); var GameObjectFactory = __webpack_require__(5); -var LineCurve = __webpack_require__(350); -var MovePathTo = __webpack_require__(805); -var QuadraticBezierCurve = __webpack_require__(351); +var LineCurve = __webpack_require__(358); +var MovePathTo = __webpack_require__(359); +var QuadraticBezierCurve = __webpack_require__(360); var Rectangle = __webpack_require__(9); -var SplineCurve = __webpack_require__(352); +var SplineCurve = __webpack_require__(361); var Vector2 = __webpack_require__(3); var MATH_CONST = __webpack_require__(13); @@ -142216,147 +147177,7 @@ module.exports = Path; /***/ }), -/* 805 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var Vector2 = __webpack_require__(3); - -/** - * @classdesc - * A MoveTo Curve is a very simple curve consisting of only a single point. Its intended use is to move the ending point in a Path. - * - * @class MoveTo - * @memberof Phaser.Curves - * @constructor - * @since 3.0.0 - * - * @param {number} [x] - `x` pixel coordinate. - * @param {number} [y] - `y` pixel coordinate. - */ -var MoveTo = new Class({ - - initialize: - - function MoveTo (x, y) - { - // Skip length calcs in paths - - /** - * Denotes that this Curve does not influence the bounds, points, and drawing of its parent Path. Must be `false` or some methods in the parent Path will throw errors. - * - * @name Phaser.Curves.MoveTo#active - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.active = false; - - /** - * The lone point which this curve consists of. - * - * @name Phaser.Curves.MoveTo#p0 - * @type {Phaser.Math.Vector2} - * @since 3.0.0 - */ - this.p0 = new Vector2(x, y); - }, - - /** - * Get point at relative position in curve according to length. - * - * @method Phaser.Curves.MoveTo#getPoint - * @since 3.0.0 - * - * @generic {Phaser.Math.Vector2} O - [out,$return] - * - * @param {number} t - The position along the curve to return. Where 0 is the start and 1 is the end. - * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created. - * - * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned. - */ - getPoint: function (t, out) - { - if (out === undefined) { out = new Vector2(); } - - return out.copy(this.p0); - }, - - /** - * Retrieves the point at given position in the curve. This will always return this curve's only point. - * - * @method Phaser.Curves.MoveTo#getPointAt - * @since 3.0.0 - * - * @generic {Phaser.Math.Vector2} O - [out,$return] - * - * @param {number} u - The position in the path to retrieve, between 0 and 1. Not used. - * @param {Phaser.Math.Vector2} [out] - An optional vector in which to store the point. - * - * @return {Phaser.Math.Vector2} The modified `out` vector, or a new `Vector2` if none was provided. - */ - getPointAt: function (u, out) - { - return this.getPoint(u, out); - }, - - /** - * Gets the resolution of this curve. - * - * @method Phaser.Curves.MoveTo#getResolution - * @since 3.0.0 - * - * @return {number} The resolution of this curve. For a MoveTo the value is always 1. - */ - getResolution: function () - { - return 1; - }, - - /** - * Gets the length of this curve. - * - * @method Phaser.Curves.MoveTo#getLength - * @since 3.0.0 - * - * @return {number} The length of this curve. For a MoveTo the value is always 0. - */ - getLength: function () - { - return 0; - }, - - /** - * Converts this curve into a JSON-serializable object. - * - * @method Phaser.Curves.MoveTo#toJSON - * @since 3.0.0 - * - * @return {Phaser.Types.Curves.JSONCurve} A primitive object with the curve's type and only point. - */ - toJSON: function () - { - return { - type: 'MoveTo', - points: [ - this.p0.x, this.p0.y - ] - }; - } - -}); - -module.exports = MoveTo; - - -/***/ }), -/* 806 */ +/* 823 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142372,14 +147193,14 @@ module.exports = MoveTo; module.exports = { DataManager: __webpack_require__(118), - DataManagerPlugin: __webpack_require__(807), - Events: __webpack_require__(288) + DataManagerPlugin: __webpack_require__(824), + Events: __webpack_require__(292) }; /***/ }), -/* 807 */ +/* 824 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142391,7 +147212,7 @@ module.exports = { var Class = __webpack_require__(0); var DataManager = __webpack_require__(118); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(22); +var SceneEvents = __webpack_require__(20); /** * @classdesc @@ -142506,7 +147327,7 @@ module.exports = DataManagerPlugin; /***/ }), -/* 808 */ +/* 825 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142521,18 +147342,18 @@ module.exports = DataManagerPlugin; module.exports = { - Align: __webpack_require__(809), - BaseShader: __webpack_require__(353), - Bounds: __webpack_require__(812), - Canvas: __webpack_require__(816), - Color: __webpack_require__(354), - Masks: __webpack_require__(825) + Align: __webpack_require__(826), + BaseShader: __webpack_require__(362), + Bounds: __webpack_require__(829), + Canvas: __webpack_require__(833), + Color: __webpack_require__(363), + Masks: __webpack_require__(842) }; /***/ }), -/* 809 */ +/* 826 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142541,7 +147362,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(106); +var CONST = __webpack_require__(107); var Extend = __webpack_require__(19); /** @@ -142550,8 +147371,8 @@ var Extend = __webpack_require__(19); var Align = { - In: __webpack_require__(810), - To: __webpack_require__(811) + In: __webpack_require__(827), + To: __webpack_require__(828) }; @@ -142562,7 +147383,7 @@ module.exports = Align; /***/ }), -/* 810 */ +/* 827 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142577,22 +147398,22 @@ module.exports = Align; module.exports = { - BottomCenter: __webpack_require__(260), - BottomLeft: __webpack_require__(261), - BottomRight: __webpack_require__(262), - Center: __webpack_require__(263), - LeftCenter: __webpack_require__(265), - QuickSet: __webpack_require__(259), - RightCenter: __webpack_require__(266), - TopCenter: __webpack_require__(267), - TopLeft: __webpack_require__(268), - TopRight: __webpack_require__(269) + BottomCenter: __webpack_require__(266), + BottomLeft: __webpack_require__(267), + BottomRight: __webpack_require__(268), + Center: __webpack_require__(269), + LeftCenter: __webpack_require__(271), + QuickSet: __webpack_require__(265), + RightCenter: __webpack_require__(272), + TopCenter: __webpack_require__(273), + TopLeft: __webpack_require__(274), + TopRight: __webpack_require__(275) }; /***/ }), -/* 811 */ +/* 828 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142607,25 +147428,25 @@ module.exports = { module.exports = { - BottomCenter: __webpack_require__(247), - BottomLeft: __webpack_require__(248), - BottomRight: __webpack_require__(249), - LeftBottom: __webpack_require__(250), - LeftCenter: __webpack_require__(251), - LeftTop: __webpack_require__(252), - QuickSet: __webpack_require__(246), - RightBottom: __webpack_require__(253), - RightCenter: __webpack_require__(254), - RightTop: __webpack_require__(255), - TopCenter: __webpack_require__(256), - TopLeft: __webpack_require__(257), - TopRight: __webpack_require__(258) + BottomCenter: __webpack_require__(253), + BottomLeft: __webpack_require__(254), + BottomRight: __webpack_require__(255), + LeftBottom: __webpack_require__(256), + LeftCenter: __webpack_require__(257), + LeftTop: __webpack_require__(258), + QuickSet: __webpack_require__(252), + RightBottom: __webpack_require__(259), + RightCenter: __webpack_require__(260), + RightTop: __webpack_require__(261), + TopCenter: __webpack_require__(262), + TopLeft: __webpack_require__(263), + TopRight: __webpack_require__(264) }; /***/ }), -/* 812 */ +/* 829 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142640,28 +147461,28 @@ module.exports = { module.exports = { - CenterOn: __webpack_require__(264), - GetBottom: __webpack_require__(34), - GetBounds: __webpack_require__(813), - GetCenterX: __webpack_require__(76), - GetCenterY: __webpack_require__(78), - GetLeft: __webpack_require__(35), - GetOffsetX: __webpack_require__(814), - GetOffsetY: __webpack_require__(815), - GetRight: __webpack_require__(36), - GetTop: __webpack_require__(37), - SetBottom: __webpack_require__(47), - SetCenterX: __webpack_require__(77), - SetCenterY: __webpack_require__(79), - SetLeft: __webpack_require__(45), - SetRight: __webpack_require__(46), - SetTop: __webpack_require__(44) + CenterOn: __webpack_require__(270), + GetBottom: __webpack_require__(35), + GetBounds: __webpack_require__(830), + GetCenterX: __webpack_require__(77), + GetCenterY: __webpack_require__(79), + GetLeft: __webpack_require__(36), + GetOffsetX: __webpack_require__(831), + GetOffsetY: __webpack_require__(832), + GetRight: __webpack_require__(37), + GetTop: __webpack_require__(38), + SetBottom: __webpack_require__(48), + SetCenterX: __webpack_require__(78), + SetCenterY: __webpack_require__(80), + SetLeft: __webpack_require__(46), + SetRight: __webpack_require__(47), + SetTop: __webpack_require__(45) }; /***/ }), -/* 813 */ +/* 830 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142670,10 +147491,10 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetBottom = __webpack_require__(34); -var GetLeft = __webpack_require__(35); -var GetRight = __webpack_require__(36); -var GetTop = __webpack_require__(37); +var GetBottom = __webpack_require__(35); +var GetLeft = __webpack_require__(36); +var GetRight = __webpack_require__(37); +var GetTop = __webpack_require__(38); /** * Returns the unrotated bounds of the Game Object as a rectangle. @@ -142705,7 +147526,7 @@ module.exports = GetBounds; /***/ }), -/* 814 */ +/* 831 */ /***/ (function(module, exports) { /** @@ -142735,7 +147556,7 @@ module.exports = GetOffsetX; /***/ }), -/* 815 */ +/* 832 */ /***/ (function(module, exports) { /** @@ -142765,7 +147586,7 @@ module.exports = GetOffsetY; /***/ }), -/* 816 */ +/* 833 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142780,17 +147601,17 @@ module.exports = GetOffsetY; module.exports = { - CanvasInterpolation: __webpack_require__(341), + CanvasInterpolation: __webpack_require__(349), CanvasPool: __webpack_require__(26), - Smoothing: __webpack_require__(173), - TouchAction: __webpack_require__(817), - UserSelect: __webpack_require__(818) + Smoothing: __webpack_require__(175), + TouchAction: __webpack_require__(834), + UserSelect: __webpack_require__(835) }; /***/ }), -/* 817 */ +/* 834 */ /***/ (function(module, exports) { /** @@ -142825,7 +147646,7 @@ module.exports = TouchAction; /***/ }), -/* 818 */ +/* 835 */ /***/ (function(module, exports) { /** @@ -142872,7 +147693,7 @@ module.exports = UserSelect; /***/ }), -/* 819 */ +/* 836 */ /***/ (function(module, exports) { /** @@ -142912,7 +147733,7 @@ module.exports = ColorToRGBA; /***/ }), -/* 820 */ +/* 837 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142921,8 +147742,8 @@ module.exports = ColorToRGBA; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Color = __webpack_require__(31); -var HueToComponent = __webpack_require__(356); +var Color = __webpack_require__(32); +var HueToComponent = __webpack_require__(365); /** * Converts HSL (hue, saturation and lightness) values to a Phaser Color object. @@ -142962,7 +147783,7 @@ module.exports = HSLToColor; /***/ }), -/* 821 */ +/* 838 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142971,7 +147792,7 @@ module.exports = HSLToColor; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HSVToRGB = __webpack_require__(172); +var HSVToRGB = __webpack_require__(174); /** * Get HSV color wheel values in an array which will be 360 elements in size. @@ -143003,7 +147824,7 @@ module.exports = HSVColorWheel; /***/ }), -/* 822 */ +/* 839 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143012,7 +147833,7 @@ module.exports = HSVColorWheel; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Linear = __webpack_require__(121); +var Linear = __webpack_require__(123); /** * @namespace Phaser.Display.Color.Interpolate @@ -143111,7 +147932,7 @@ module.exports = { /***/ }), -/* 823 */ +/* 840 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143120,8 +147941,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Between = __webpack_require__(178); -var Color = __webpack_require__(31); +var Between = __webpack_require__(180); +var Color = __webpack_require__(32); /** * Creates a new Color object where the r, g, and b values have been set to random values @@ -143147,7 +147968,7 @@ module.exports = RandomRGB; /***/ }), -/* 824 */ +/* 841 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143156,7 +147977,7 @@ module.exports = RandomRGB; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ComponentToHex = __webpack_require__(355); +var ComponentToHex = __webpack_require__(364); /** * Converts the color values into an HTML compatible color string, prefixed with either `#` or `0x`. @@ -143191,7 +148012,7 @@ module.exports = RGBToString; /***/ }), -/* 825 */ +/* 842 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143206,14 +148027,14 @@ module.exports = RGBToString; module.exports = { - BitmapMask: __webpack_require__(282), - GeometryMask: __webpack_require__(283) + BitmapMask: __webpack_require__(286), + GeometryMask: __webpack_require__(287) }; /***/ }), -/* 826 */ +/* 843 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143228,13 +148049,14 @@ module.exports = { var Dom = { - AddToDOM: __webpack_require__(128), - DOMContentLoaded: __webpack_require__(357), - GetScreenOrientation: __webpack_require__(358), - GetTarget: __webpack_require__(363), - ParseXML: __webpack_require__(364), - RemoveFromDOM: __webpack_require__(184), - RequestAnimationFrame: __webpack_require__(344) + AddToDOM: __webpack_require__(130), + DOMContentLoaded: __webpack_require__(366), + GetInnerHeight: __webpack_require__(367), + GetScreenOrientation: __webpack_require__(368), + GetTarget: __webpack_require__(373), + ParseXML: __webpack_require__(374), + RemoveFromDOM: __webpack_require__(186), + RequestAnimationFrame: __webpack_require__(352) }; @@ -143242,7 +148064,7 @@ module.exports = Dom; /***/ }), -/* 827 */ +/* 844 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143255,11 +148077,11 @@ module.exports = Dom; * @namespace Phaser.Events */ -module.exports = { EventEmitter: __webpack_require__(828) }; +module.exports = { EventEmitter: __webpack_require__(845) }; /***/ }), -/* 828 */ +/* 845 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143269,7 +148091,7 @@ module.exports = { EventEmitter: __webpack_require__(828) }; */ var Class = __webpack_require__(0); -var EE = __webpack_require__(11); +var EE = __webpack_require__(12); var PluginCache = __webpack_require__(23); /** @@ -143443,7 +148265,7 @@ module.exports = EventEmitter; /***/ }), -/* 829 */ +/* 846 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143452,33 +148274,33 @@ module.exports = EventEmitter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(128); -var AnimationManager = __webpack_require__(293); -var CacheManager = __webpack_require__(296); +var AddToDOM = __webpack_require__(130); +var AnimationManager = __webpack_require__(300); +var CacheManager = __webpack_require__(304); var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); -var Config = __webpack_require__(318); -var CreateDOMContainer = __webpack_require__(830); -var CreateRenderer = __webpack_require__(340); +var Config = __webpack_require__(326); +var CreateDOMContainer = __webpack_require__(847); +var CreateRenderer = __webpack_require__(348); var DataManager = __webpack_require__(118); -var DebugHeader = __webpack_require__(342); -var Device = __webpack_require__(319); -var DOMContentLoaded = __webpack_require__(357); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(20); -var InputManager = __webpack_require__(365); +var DebugHeader = __webpack_require__(350); +var Device = __webpack_require__(327); +var DOMContentLoaded = __webpack_require__(366); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(21); +var InputManager = __webpack_require__(375); var PluginCache = __webpack_require__(23); -var PluginManager = __webpack_require__(370); -var ScaleManager = __webpack_require__(371); -var SceneManager = __webpack_require__(373); -var TextureEvents = __webpack_require__(127); -var TextureManager = __webpack_require__(376); -var TimeStep = __webpack_require__(343); -var VisibilityHandler = __webpack_require__(345); +var PluginManager = __webpack_require__(380); +var ScaleManager = __webpack_require__(381); +var SceneManager = __webpack_require__(383); +var TextureEvents = __webpack_require__(129); +var TextureManager = __webpack_require__(388); +var TimeStep = __webpack_require__(351); +var VisibilityHandler = __webpack_require__(353); if (true) { - var SoundManagerCreator = __webpack_require__(380); + var SoundManagerCreator = __webpack_require__(392); } if (false) @@ -144146,7 +148968,7 @@ module.exports = Game; /***/ }), -/* 830 */ +/* 847 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144155,7 +148977,7 @@ module.exports = Game; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(128); +var AddToDOM = __webpack_require__(130); var CreateDOMContainer = function (game) { @@ -144190,7 +149012,7 @@ module.exports = CreateDOMContainer; /***/ }), -/* 831 */ +/* 848 */ /***/ (function(module, exports) { /** @@ -144211,7 +149033,7 @@ module.exports = 'boot'; /***/ }), -/* 832 */ +/* 849 */ /***/ (function(module, exports) { /** @@ -144232,7 +149054,7 @@ module.exports = 'destroy'; /***/ }), -/* 833 */ +/* 850 */ /***/ (function(module, exports) { /** @@ -144260,7 +149082,7 @@ module.exports = 'dragend'; /***/ }), -/* 834 */ +/* 851 */ /***/ (function(module, exports) { /** @@ -144291,7 +149113,7 @@ module.exports = 'dragenter'; /***/ }), -/* 835 */ +/* 852 */ /***/ (function(module, exports) { /** @@ -144323,7 +149145,7 @@ module.exports = 'drag'; /***/ }), -/* 836 */ +/* 853 */ /***/ (function(module, exports) { /** @@ -144354,7 +149176,7 @@ module.exports = 'dragleave'; /***/ }), -/* 837 */ +/* 854 */ /***/ (function(module, exports) { /** @@ -144388,7 +149210,7 @@ module.exports = 'dragover'; /***/ }), -/* 838 */ +/* 855 */ /***/ (function(module, exports) { /** @@ -144418,7 +149240,7 @@ module.exports = 'dragstart'; /***/ }), -/* 839 */ +/* 856 */ /***/ (function(module, exports) { /** @@ -144447,7 +149269,7 @@ module.exports = 'drop'; /***/ }), -/* 840 */ +/* 857 */ /***/ (function(module, exports) { /** @@ -144474,7 +149296,7 @@ module.exports = 'gameout'; /***/ }), -/* 841 */ +/* 858 */ /***/ (function(module, exports) { /** @@ -144501,7 +149323,7 @@ module.exports = 'gameover'; /***/ }), -/* 842 */ +/* 859 */ /***/ (function(module, exports) { /** @@ -144542,7 +149364,7 @@ module.exports = 'gameobjectdown'; /***/ }), -/* 843 */ +/* 860 */ /***/ (function(module, exports) { /** @@ -144573,7 +149395,7 @@ module.exports = 'dragend'; /***/ }), -/* 844 */ +/* 861 */ /***/ (function(module, exports) { /** @@ -144603,7 +149425,7 @@ module.exports = 'dragenter'; /***/ }), -/* 845 */ +/* 862 */ /***/ (function(module, exports) { /** @@ -144634,7 +149456,7 @@ module.exports = 'drag'; /***/ }), -/* 846 */ +/* 863 */ /***/ (function(module, exports) { /** @@ -144664,7 +149486,7 @@ module.exports = 'dragleave'; /***/ }), -/* 847 */ +/* 864 */ /***/ (function(module, exports) { /** @@ -144697,7 +149519,7 @@ module.exports = 'dragover'; /***/ }), -/* 848 */ +/* 865 */ /***/ (function(module, exports) { /** @@ -144731,7 +149553,7 @@ module.exports = 'dragstart'; /***/ }), -/* 849 */ +/* 866 */ /***/ (function(module, exports) { /** @@ -144761,7 +149583,7 @@ module.exports = 'drop'; /***/ }), -/* 850 */ +/* 867 */ /***/ (function(module, exports) { /** @@ -144802,7 +149624,7 @@ module.exports = 'gameobjectmove'; /***/ }), -/* 851 */ +/* 868 */ /***/ (function(module, exports) { /** @@ -144843,7 +149665,7 @@ module.exports = 'gameobjectout'; /***/ }), -/* 852 */ +/* 869 */ /***/ (function(module, exports) { /** @@ -144884,7 +149706,7 @@ module.exports = 'gameobjectover'; /***/ }), -/* 853 */ +/* 870 */ /***/ (function(module, exports) { /** @@ -144925,7 +149747,7 @@ module.exports = 'pointerdown'; /***/ }), -/* 854 */ +/* 871 */ /***/ (function(module, exports) { /** @@ -144966,7 +149788,7 @@ module.exports = 'pointermove'; /***/ }), -/* 855 */ +/* 872 */ /***/ (function(module, exports) { /** @@ -145005,7 +149827,7 @@ module.exports = 'pointerout'; /***/ }), -/* 856 */ +/* 873 */ /***/ (function(module, exports) { /** @@ -145046,7 +149868,7 @@ module.exports = 'pointerover'; /***/ }), -/* 857 */ +/* 874 */ /***/ (function(module, exports) { /** @@ -145087,7 +149909,7 @@ module.exports = 'pointerup'; /***/ }), -/* 858 */ +/* 875 */ /***/ (function(module, exports) { /** @@ -145129,7 +149951,7 @@ module.exports = 'wheel'; /***/ }), -/* 859 */ +/* 876 */ /***/ (function(module, exports) { /** @@ -145170,7 +149992,7 @@ module.exports = 'gameobjectup'; /***/ }), -/* 860 */ +/* 877 */ /***/ (function(module, exports) { /** @@ -145214,7 +150036,7 @@ module.exports = 'gameobjectwheel'; /***/ }), -/* 861 */ +/* 878 */ /***/ (function(module, exports) { /** @@ -145235,7 +150057,7 @@ module.exports = 'boot'; /***/ }), -/* 862 */ +/* 879 */ /***/ (function(module, exports) { /** @@ -145260,7 +150082,7 @@ module.exports = 'process'; /***/ }), -/* 863 */ +/* 880 */ /***/ (function(module, exports) { /** @@ -145281,7 +150103,7 @@ module.exports = 'update'; /***/ }), -/* 864 */ +/* 881 */ /***/ (function(module, exports) { /** @@ -145316,7 +150138,7 @@ module.exports = 'pointerdown'; /***/ }), -/* 865 */ +/* 882 */ /***/ (function(module, exports) { /** @@ -145350,7 +150172,7 @@ module.exports = 'pointerdownoutside'; /***/ }), -/* 866 */ +/* 883 */ /***/ (function(module, exports) { /** @@ -145385,7 +150207,7 @@ module.exports = 'pointermove'; /***/ }), -/* 867 */ +/* 884 */ /***/ (function(module, exports) { /** @@ -145420,7 +150242,7 @@ module.exports = 'pointerout'; /***/ }), -/* 868 */ +/* 885 */ /***/ (function(module, exports) { /** @@ -145455,7 +150277,7 @@ module.exports = 'pointerover'; /***/ }), -/* 869 */ +/* 886 */ /***/ (function(module, exports) { /** @@ -145490,7 +150312,7 @@ module.exports = 'pointerup'; /***/ }), -/* 870 */ +/* 887 */ /***/ (function(module, exports) { /** @@ -145524,7 +150346,7 @@ module.exports = 'pointerupoutside'; /***/ }), -/* 871 */ +/* 888 */ /***/ (function(module, exports) { /** @@ -145562,7 +150384,7 @@ module.exports = 'wheel'; /***/ }), -/* 872 */ +/* 889 */ /***/ (function(module, exports) { /** @@ -145586,7 +150408,7 @@ module.exports = 'pointerlockchange'; /***/ }), -/* 873 */ +/* 890 */ /***/ (function(module, exports) { /** @@ -145608,7 +150430,7 @@ module.exports = 'preupdate'; /***/ }), -/* 874 */ +/* 891 */ /***/ (function(module, exports) { /** @@ -145629,7 +150451,7 @@ module.exports = 'shutdown'; /***/ }), -/* 875 */ +/* 892 */ /***/ (function(module, exports) { /** @@ -145651,7 +150473,7 @@ module.exports = 'start'; /***/ }), -/* 876 */ +/* 893 */ /***/ (function(module, exports) { /** @@ -145676,66 +150498,7 @@ module.exports = 'update'; /***/ }), -/* 877 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Attempts to determine the document inner height across iOS and standard devices. - * Based on code by @tylerjpeterson - * - * @function Phaser.DOM.GetInnerHeight - * @since 3.16.0 - * - * @param {boolean} iOS - Is this running on iOS? - * - * @return {number} The inner height value. - */ -var GetInnerHeight = function (iOS) -{ - - if (!iOS) - { - return window.innerHeight; - } - - var axis = Math.abs(window.orientation); - - var size = { w: 0, h: 0 }; - - var ruler = document.createElement('div'); - - ruler.setAttribute('style', 'position: fixed; height: 100vh; width: 0; top: 0'); - - document.documentElement.appendChild(ruler); - - size.w = (axis === 90) ? ruler.offsetHeight : window.innerWidth; - size.h = (axis === 90) ? window.innerWidth : ruler.offsetHeight; - - document.documentElement.removeChild(ruler); - - ruler = null; - - if (Math.abs(window.orientation) !== 90) - { - return size.h; - } - else - { - return size.w; - } -}; - -module.exports = GetInnerHeight; - - -/***/ }), -/* 878 */ +/* 894 */ /***/ (function(module, exports) { /** @@ -145765,7 +150528,7 @@ module.exports = 'addfile'; /***/ }), -/* 879 */ +/* 895 */ /***/ (function(module, exports) { /** @@ -145793,7 +150556,7 @@ module.exports = 'complete'; /***/ }), -/* 880 */ +/* 896 */ /***/ (function(module, exports) { /** @@ -145822,7 +150585,7 @@ module.exports = 'filecomplete'; /***/ }), -/* 881 */ +/* 897 */ /***/ (function(module, exports) { /** @@ -145876,7 +150639,7 @@ module.exports = 'filecomplete-'; /***/ }), -/* 882 */ +/* 898 */ /***/ (function(module, exports) { /** @@ -145901,7 +150664,7 @@ module.exports = 'loaderror'; /***/ }), -/* 883 */ +/* 899 */ /***/ (function(module, exports) { /** @@ -145927,7 +150690,7 @@ module.exports = 'load'; /***/ }), -/* 884 */ +/* 900 */ /***/ (function(module, exports) { /** @@ -145954,7 +150717,7 @@ module.exports = 'fileprogress'; /***/ }), -/* 885 */ +/* 901 */ /***/ (function(module, exports) { /** @@ -145983,7 +150746,7 @@ module.exports = 'postprocess'; /***/ }), -/* 886 */ +/* 902 */ /***/ (function(module, exports) { /** @@ -146008,7 +150771,7 @@ module.exports = 'progress'; /***/ }), -/* 887 */ +/* 903 */ /***/ (function(module, exports) { /** @@ -146035,116 +150798,7 @@ module.exports = 'start'; /***/ }), -/* 888 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetFastValue = __webpack_require__(2); -var UppercaseFirst = __webpack_require__(187); - -/** - * Builds an array of which physics plugins should be activated for the given Scene. - * - * @function Phaser.Scenes.GetPhysicsPlugins - * @since 3.0.0 - * - * @param {Phaser.Scenes.Systems} sys - The scene system to get the physics systems of. - * - * @return {array} An array of Physics systems to start for this Scene. - */ -var GetPhysicsPlugins = function (sys) -{ - var defaultSystem = sys.game.config.defaultPhysicsSystem; - var sceneSystems = GetFastValue(sys.settings, 'physics', false); - - if (!defaultSystem && !sceneSystems) - { - // No default physics system or systems in this scene - return; - } - - // Let's build the systems array - var output = []; - - if (defaultSystem) - { - output.push(UppercaseFirst(defaultSystem + 'Physics')); - } - - if (sceneSystems) - { - for (var key in sceneSystems) - { - key = UppercaseFirst(key.concat('Physics')); - - if (output.indexOf(key) === -1) - { - output.push(key); - } - } - } - - // An array of Physics systems to start for this Scene - return output; -}; - -module.exports = GetPhysicsPlugins; - - -/***/ }), -/* 889 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var GetFastValue = __webpack_require__(2); - -/** - * Builds an array of which plugins (not including physics plugins) should be activated for the given Scene. - * - * @function Phaser.Scenes.GetScenePlugins - * @since 3.0.0 - * - * @param {Phaser.Scenes.Systems} sys - The Scene Systems object to check for plugins. - * - * @return {array} An array of all plugins which should be activated, either the default ones or the ones configured in the Scene Systems object. - */ -var GetScenePlugins = function (sys) -{ - var defaultPlugins = sys.plugins.getDefaultScenePlugins(); - - var scenePlugins = GetFastValue(sys.settings, 'plugins', false); - - // Scene Plugins always override Default Plugins - if (Array.isArray(scenePlugins)) - { - return scenePlugins; - } - else if (defaultPlugins) - { - return defaultPlugins; - } - else - { - // No default plugins or plugins in this scene - return []; - } -}; - -module.exports = GetScenePlugins; - - -/***/ }), -/* 890 */ +/* 904 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146166,6 +150820,7 @@ module.exports = GetScenePlugins; var InjectionMap = { game: 'game', + renderer: 'renderer', anims: 'anims', cache: 'cache', @@ -146205,7 +150860,7 @@ module.exports = InjectionMap; /***/ }), -/* 891 */ +/* 905 */ /***/ (function(module, exports) { /** @@ -146286,7 +150941,7 @@ module.exports = AtlasXML; /***/ }), -/* 892 */ +/* 906 */ /***/ (function(module, exports) { /** @@ -146321,7 +150976,7 @@ module.exports = Canvas; /***/ }), -/* 893 */ +/* 907 */ /***/ (function(module, exports) { /** @@ -146356,7 +151011,7 @@ module.exports = Image; /***/ }), -/* 894 */ +/* 908 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146365,7 +151020,7 @@ module.exports = Image; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clone = __webpack_require__(67); +var Clone = __webpack_require__(69); /** * Parses a Texture Atlas JSON Array and adds the Frames to the Texture. @@ -146465,7 +151120,7 @@ module.exports = JSONArray; /***/ }), -/* 895 */ +/* 909 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146474,7 +151129,7 @@ module.exports = JSONArray; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clone = __webpack_require__(67); +var Clone = __webpack_require__(69); /** * Parses a Texture Atlas JSON Hash and adds the Frames to the Texture. @@ -146511,6 +151166,11 @@ var JSONHash = function (texture, sourceIndex, json) for (var key in frames) { + if (!frames.hasOwnProperty(key)) + { + continue; + } + var src = frames[key]; // The frame values are the exact coordinates to cut the frame out of the atlas from @@ -146573,7 +151233,7 @@ module.exports = JSONHash; /***/ }), -/* 896 */ +/* 910 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146698,7 +151358,7 @@ module.exports = SpriteSheet; /***/ }), -/* 897 */ +/* 911 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146889,7 +151549,7 @@ module.exports = SpriteSheetFromAtlas; /***/ }), -/* 898 */ +/* 912 */ /***/ (function(module, exports) { /** @@ -147059,7 +151719,7 @@ TextureImporter: /***/ }), -/* 899 */ +/* 913 */ /***/ (function(module, exports) { /** @@ -147090,7 +151750,7 @@ module.exports = 'complete'; /***/ }), -/* 900 */ +/* 914 */ /***/ (function(module, exports) { /** @@ -147120,7 +151780,7 @@ module.exports = 'decoded'; /***/ }), -/* 901 */ +/* 915 */ /***/ (function(module, exports) { /** @@ -147152,7 +151812,7 @@ module.exports = 'decodedall'; /***/ }), -/* 902 */ +/* 916 */ /***/ (function(module, exports) { /** @@ -147184,7 +151844,7 @@ module.exports = 'destroy'; /***/ }), -/* 903 */ +/* 917 */ /***/ (function(module, exports) { /** @@ -147217,7 +151877,7 @@ module.exports = 'detune'; /***/ }), -/* 904 */ +/* 918 */ /***/ (function(module, exports) { /** @@ -147245,7 +151905,7 @@ module.exports = 'detune'; /***/ }), -/* 905 */ +/* 919 */ /***/ (function(module, exports) { /** @@ -147272,7 +151932,7 @@ module.exports = 'mute'; /***/ }), -/* 906 */ +/* 920 */ /***/ (function(module, exports) { /** @@ -147300,7 +151960,7 @@ module.exports = 'rate'; /***/ }), -/* 907 */ +/* 921 */ /***/ (function(module, exports) { /** @@ -147327,7 +151987,7 @@ module.exports = 'volume'; /***/ }), -/* 908 */ +/* 922 */ /***/ (function(module, exports) { /** @@ -147361,7 +152021,7 @@ module.exports = 'loop'; /***/ }), -/* 909 */ +/* 923 */ /***/ (function(module, exports) { /** @@ -147395,7 +152055,7 @@ module.exports = 'looped'; /***/ }), -/* 910 */ +/* 924 */ /***/ (function(module, exports) { /** @@ -147428,7 +152088,7 @@ module.exports = 'mute'; /***/ }), -/* 911 */ +/* 925 */ /***/ (function(module, exports) { /** @@ -147455,7 +152115,7 @@ module.exports = 'pauseall'; /***/ }), -/* 912 */ +/* 926 */ /***/ (function(module, exports) { /** @@ -147487,7 +152147,7 @@ module.exports = 'pause'; /***/ }), -/* 913 */ +/* 927 */ /***/ (function(module, exports) { /** @@ -147518,7 +152178,7 @@ module.exports = 'play'; /***/ }), -/* 914 */ +/* 928 */ /***/ (function(module, exports) { /** @@ -147551,7 +152211,7 @@ module.exports = 'rate'; /***/ }), -/* 915 */ +/* 929 */ /***/ (function(module, exports) { /** @@ -147578,7 +152238,7 @@ module.exports = 'resumeall'; /***/ }), -/* 916 */ +/* 930 */ /***/ (function(module, exports) { /** @@ -147611,7 +152271,7 @@ module.exports = 'resume'; /***/ }), -/* 917 */ +/* 931 */ /***/ (function(module, exports) { /** @@ -147644,7 +152304,7 @@ module.exports = 'seek'; /***/ }), -/* 918 */ +/* 932 */ /***/ (function(module, exports) { /** @@ -147671,7 +152331,7 @@ module.exports = 'stopall'; /***/ }), -/* 919 */ +/* 933 */ /***/ (function(module, exports) { /** @@ -147703,7 +152363,7 @@ module.exports = 'stop'; /***/ }), -/* 920 */ +/* 934 */ /***/ (function(module, exports) { /** @@ -147730,7 +152390,7 @@ module.exports = 'unlocked'; /***/ }), -/* 921 */ +/* 935 */ /***/ (function(module, exports) { /** @@ -147763,7 +152423,7 @@ module.exports = 'volume'; /***/ }), -/* 922 */ +/* 936 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147778,105 +152438,111 @@ module.exports = 'volume'; var GameObjects = { - Events: __webpack_require__(91), + Events: __webpack_require__(29), - DisplayList: __webpack_require__(923), + DisplayList: __webpack_require__(937), GameObjectCreator: __webpack_require__(16), GameObjectFactory: __webpack_require__(5), - UpdateList: __webpack_require__(949), + UpdateList: __webpack_require__(962), - Components: __webpack_require__(12), + Components: __webpack_require__(11), BuildGameObject: __webpack_require__(27), - BuildGameObjectAnimation: __webpack_require__(393), + BuildGameObjectAnimation: __webpack_require__(405), GameObject: __webpack_require__(14), - BitmapText: __webpack_require__(138), - Blitter: __webpack_require__(194), - Container: __webpack_require__(195), - DOMElement: __webpack_require__(395), - DynamicBitmapText: __webpack_require__(196), - Extern: __webpack_require__(397), - Graphics: __webpack_require__(197), - Group: __webpack_require__(98), - Image: __webpack_require__(111), - Particles: __webpack_require__(982), - PathFollower: __webpack_require__(409), - RenderTexture: __webpack_require__(201), - RetroFont: __webpack_require__(991), - Rope: __webpack_require__(203), - Sprite: __webpack_require__(75), - Text: __webpack_require__(204), - TileSprite: __webpack_require__(205), - Zone: __webpack_require__(114), - Video: __webpack_require__(206), + BitmapText: __webpack_require__(139), + Blitter: __webpack_require__(197), + Bob: __webpack_require__(406), + Container: __webpack_require__(198), + DOMElement: __webpack_require__(408), + DynamicBitmapText: __webpack_require__(199), + Extern: __webpack_require__(410), + Graphics: __webpack_require__(200), + Group: __webpack_require__(99), + Image: __webpack_require__(112), + Particles: __webpack_require__(993), + PathFollower: __webpack_require__(423), + RenderTexture: __webpack_require__(204), + RetroFont: __webpack_require__(1001), + Rope: __webpack_require__(206), + Sprite: __webpack_require__(76), + + Text: __webpack_require__(207), + GetTextSize: __webpack_require__(424), + MeasureText: __webpack_require__(426), + TextStyle: __webpack_require__(425), + + TileSprite: __webpack_require__(208), + Zone: __webpack_require__(115), + Video: __webpack_require__(209), // Shapes - Shape: __webpack_require__(29), - Arc: __webpack_require__(410), - Curve: __webpack_require__(411), - Ellipse: __webpack_require__(412), - Grid: __webpack_require__(413), - IsoBox: __webpack_require__(414), - IsoTriangle: __webpack_require__(415), - Line: __webpack_require__(416), - Polygon: __webpack_require__(417), - Rectangle: __webpack_require__(422), - Star: __webpack_require__(423), - Triangle: __webpack_require__(424), + Shape: __webpack_require__(30), + Arc: __webpack_require__(427), + Curve: __webpack_require__(428), + Ellipse: __webpack_require__(429), + Grid: __webpack_require__(430), + IsoBox: __webpack_require__(431), + IsoTriangle: __webpack_require__(432), + Line: __webpack_require__(433), + Polygon: __webpack_require__(434), + Rectangle: __webpack_require__(439), + Star: __webpack_require__(440), + Triangle: __webpack_require__(441), // Game Object Factories Factories: { - Blitter: __webpack_require__(1042), - Container: __webpack_require__(1043), - DOMElement: __webpack_require__(1044), - DynamicBitmapText: __webpack_require__(1045), - Extern: __webpack_require__(1046), - Graphics: __webpack_require__(1047), - Group: __webpack_require__(1048), - Image: __webpack_require__(1049), - Particles: __webpack_require__(1050), - PathFollower: __webpack_require__(1051), - RenderTexture: __webpack_require__(1052), - Rope: __webpack_require__(1053), - Sprite: __webpack_require__(1054), - StaticBitmapText: __webpack_require__(1055), - Text: __webpack_require__(1056), - TileSprite: __webpack_require__(1057), - Zone: __webpack_require__(1058), - Video: __webpack_require__(1059), + Blitter: __webpack_require__(1049), + Container: __webpack_require__(1050), + DOMElement: __webpack_require__(1051), + DynamicBitmapText: __webpack_require__(1052), + Extern: __webpack_require__(1053), + Graphics: __webpack_require__(1054), + Group: __webpack_require__(1055), + Image: __webpack_require__(1056), + Particles: __webpack_require__(1057), + PathFollower: __webpack_require__(1058), + RenderTexture: __webpack_require__(1059), + Rope: __webpack_require__(1060), + Sprite: __webpack_require__(1061), + StaticBitmapText: __webpack_require__(1062), + Text: __webpack_require__(1063), + TileSprite: __webpack_require__(1064), + Zone: __webpack_require__(1065), + Video: __webpack_require__(1066), // Shapes - Arc: __webpack_require__(1060), - Curve: __webpack_require__(1061), - Ellipse: __webpack_require__(1062), - Grid: __webpack_require__(1063), - IsoBox: __webpack_require__(1064), - IsoTriangle: __webpack_require__(1065), - Line: __webpack_require__(1066), - Polygon: __webpack_require__(1067), - Rectangle: __webpack_require__(1068), - Star: __webpack_require__(1069), - Triangle: __webpack_require__(1070) + Arc: __webpack_require__(1067), + Curve: __webpack_require__(1068), + Ellipse: __webpack_require__(1069), + Grid: __webpack_require__(1070), + IsoBox: __webpack_require__(1071), + IsoTriangle: __webpack_require__(1072), + Line: __webpack_require__(1073), + Polygon: __webpack_require__(1074), + Rectangle: __webpack_require__(1075), + Star: __webpack_require__(1076), + Triangle: __webpack_require__(1077) }, Creators: { - Blitter: __webpack_require__(1071), - Container: __webpack_require__(1072), - DynamicBitmapText: __webpack_require__(1073), - Graphics: __webpack_require__(1074), - Group: __webpack_require__(1075), - Image: __webpack_require__(1076), - Particles: __webpack_require__(1077), - RenderTexture: __webpack_require__(1078), - Rope: __webpack_require__(1079), - Sprite: __webpack_require__(1080), - StaticBitmapText: __webpack_require__(1081), - Text: __webpack_require__(1082), - TileSprite: __webpack_require__(1083), - Zone: __webpack_require__(1084), - Video: __webpack_require__(1085) + Blitter: __webpack_require__(1078), + Container: __webpack_require__(1079), + DynamicBitmapText: __webpack_require__(1080), + Graphics: __webpack_require__(1081), + Group: __webpack_require__(1082), + Image: __webpack_require__(1083), + Particles: __webpack_require__(1084), + RenderTexture: __webpack_require__(1085), + Rope: __webpack_require__(1086), + Sprite: __webpack_require__(1087), + StaticBitmapText: __webpack_require__(1088), + Text: __webpack_require__(1089), + TileSprite: __webpack_require__(1090), + Zone: __webpack_require__(1091), + Video: __webpack_require__(1092) } }; @@ -147884,29 +152550,28 @@ var GameObjects = { if (true) { // WebGL only Game Objects - GameObjects.Mesh = __webpack_require__(140); - GameObjects.Quad = __webpack_require__(209); - GameObjects.Shader = __webpack_require__(210); + GameObjects.Mesh = __webpack_require__(141); + GameObjects.Quad = __webpack_require__(212); + GameObjects.Shader = __webpack_require__(213); - GameObjects.Factories.Mesh = __webpack_require__(1092); - GameObjects.Factories.Quad = __webpack_require__(1093); - GameObjects.Factories.Shader = __webpack_require__(1094); + GameObjects.Factories.Mesh = __webpack_require__(1099); + GameObjects.Factories.Quad = __webpack_require__(1100); + GameObjects.Factories.Shader = __webpack_require__(1101); - GameObjects.Creators.Mesh = __webpack_require__(1095); - GameObjects.Creators.Quad = __webpack_require__(1096); - GameObjects.Creators.Shader = __webpack_require__(1097); + GameObjects.Creators.Mesh = __webpack_require__(1102); + GameObjects.Creators.Quad = __webpack_require__(1103); + GameObjects.Creators.Shader = __webpack_require__(1104); - GameObjects.Light = __webpack_require__(428); - - __webpack_require__(429); - __webpack_require__(1098); + GameObjects.Light = __webpack_require__(445); + GameObjects.LightsManager = __webpack_require__(446); + GameObjects.LightsPlugin = __webpack_require__(1105); } module.exports = GameObjects; /***/ }), -/* 923 */ +/* 937 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147916,10 +152581,11 @@ module.exports = GameObjects; */ var Class = __webpack_require__(0); -var List = __webpack_require__(135); +var List = __webpack_require__(136); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(22); -var StableSort = __webpack_require__(137); +var GameObjectEvents = __webpack_require__(29); +var SceneEvents = __webpack_require__(20); +var StableSort = __webpack_require__(138); /** * @classdesc @@ -147975,8 +152641,21 @@ var DisplayList = new Class({ */ this.systems = scene.sys; - scene.sys.events.once(SceneEvents.BOOT, this.boot, this); - scene.sys.events.on(SceneEvents.START, this.start, this); + /** + * The Scene's Event Emitter. + * + * @name Phaser.GameObjects.DisplayList#events + * @type {Phaser.Events.EventEmitter} + * @since 3.50.0 + */ + this.events = scene.sys.events; + + // Set the List callbacks + this.addCallback = this.addChildCallback; + this.removeCallback = this.removeChildCallback; + + this.events.once(SceneEvents.BOOT, this.boot, this); + this.events.on(SceneEvents.START, this.start, this); }, /** @@ -147989,7 +152668,43 @@ var DisplayList = new Class({ */ boot: function () { - this.systems.events.once(SceneEvents.DESTROY, this.destroy, this); + this.events.once(SceneEvents.DESTROY, this.destroy, this); + }, + + /** + * Internal method called from `List.addCallback`. + * + * @method Phaser.GameObjects.DisplayList#addChildCallback + * @private + * @fires Phaser.Scenes.Events#ADDED_TO_SCENE + * @fires Phaser.GameObjects.Events#ADDED_TO_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was added to the list. + */ + addChildCallback: function (gameObject) + { + gameObject.emit(GameObjectEvents.ADDED_TO_SCENE, gameObject, this.scene); + + this.events.emit(SceneEvents.ADDED_TO_SCENE, gameObject, this.scene); + }, + + /** + * Internal method called from `List.removeCallback`. + * + * @method Phaser.GameObjects.DisplayList#removeChildCallback + * @private + * @fires Phaser.Scenes.Events#REMOVED_FROM_SCENE + * @fires Phaser.GameObjects.Events#REMOVED_FROM_SCENE + * @since 3.50.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was removed from the list. + */ + removeChildCallback: function (gameObject) + { + gameObject.emit(GameObjectEvents.REMOVED_FROM_SCENE, gameObject, this.scene); + + this.events.emit(SceneEvents.REMOVED_FROM_SCENE, gameObject, this.scene); }, /** @@ -148003,7 +152718,7 @@ var DisplayList = new Class({ */ start: function () { - this.systems.events.once(SceneEvents.SHUTDOWN, this.shutdown, this); + this.events.once(SceneEvents.SHUTDOWN, this.shutdown, this); }, /** @@ -148027,7 +152742,7 @@ var DisplayList = new Class({ { if (this.sortChildrenFlag) { - StableSort.inplace(this.list, this.sortByDepth); + StableSort(this.list, this.sortByDepth); this.sortChildrenFlag = false; } @@ -148073,16 +152788,18 @@ var DisplayList = new Class({ */ shutdown: function () { - var i = this.list.length; + var list = this.list; + + var i = list.length; while (i--) { - this.list[i].destroy(true); + list[i].destroy(true); } - this.list.length = 0; + list.length = 0; - this.systems.events.off(SceneEvents.SHUTDOWN, this.shutdown, this); + this.events.off(SceneEvents.SHUTDOWN, this.shutdown, this); }, /** @@ -148097,10 +152814,11 @@ var DisplayList = new Class({ { this.shutdown(); - this.scene.sys.events.off(SceneEvents.START, this.start, this); + this.events.off(SceneEvents.START, this.start, this); this.scene = null; this.systems = null; + this.events = null; } }); @@ -148111,7 +152829,7 @@ module.exports = DisplayList; /***/ }), -/* 924 */ +/* 938 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148126,21 +152844,21 @@ module.exports = DisplayList; module.exports = { - CheckMatrix: __webpack_require__(190), - MatrixToString: __webpack_require__(925), - ReverseColumns: __webpack_require__(926), - ReverseRows: __webpack_require__(927), - Rotate180: __webpack_require__(928), - RotateLeft: __webpack_require__(929), - RotateMatrix: __webpack_require__(136), - RotateRight: __webpack_require__(930), - TransposeMatrix: __webpack_require__(390) + CheckMatrix: __webpack_require__(193), + MatrixToString: __webpack_require__(939), + ReverseColumns: __webpack_require__(940), + ReverseRows: __webpack_require__(941), + Rotate180: __webpack_require__(942), + RotateLeft: __webpack_require__(943), + RotateMatrix: __webpack_require__(137), + RotateRight: __webpack_require__(944), + TransposeMatrix: __webpack_require__(401) }; /***/ }), -/* 925 */ +/* 939 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148149,8 +152867,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Pad = __webpack_require__(169); -var CheckMatrix = __webpack_require__(190); +var Pad = __webpack_require__(171); +var CheckMatrix = __webpack_require__(193); /** * Generates a string (which you can pass to console.log) from the given Array Matrix. @@ -148221,7 +152939,7 @@ module.exports = MatrixToString; /***/ }), -/* 926 */ +/* 940 */ /***/ (function(module, exports) { /** @@ -148252,7 +152970,7 @@ module.exports = ReverseColumns; /***/ }), -/* 927 */ +/* 941 */ /***/ (function(module, exports) { /** @@ -148288,7 +153006,7 @@ module.exports = ReverseRows; /***/ }), -/* 928 */ +/* 942 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148297,7 +153015,7 @@ module.exports = ReverseRows; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(136); +var RotateMatrix = __webpack_require__(137); /** * Rotates the array matrix 180 degrees. @@ -148321,7 +153039,7 @@ module.exports = Rotate180; /***/ }), -/* 929 */ +/* 943 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148330,7 +153048,7 @@ module.exports = Rotate180; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(136); +var RotateMatrix = __webpack_require__(137); /** * Rotates the array matrix to the left (or 90 degrees) @@ -148354,7 +153072,7 @@ module.exports = RotateLeft; /***/ }), -/* 930 */ +/* 944 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148363,7 +153081,7 @@ module.exports = RotateLeft; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(136); +var RotateMatrix = __webpack_require__(137); /** * Rotates the array matrix to the left (or -90 degrees) @@ -148387,7 +153105,7 @@ module.exports = RotateRight; /***/ }), -/* 931 */ +/* 945 */ /***/ (function(module, exports) { /** @@ -148504,7 +153222,7 @@ module.exports = Add; /***/ }), -/* 932 */ +/* 946 */ /***/ (function(module, exports) { /** @@ -148626,7 +153344,7 @@ module.exports = AddAt; /***/ }), -/* 933 */ +/* 947 */ /***/ (function(module, exports) { /** @@ -148664,7 +153382,7 @@ module.exports = BringToTop; /***/ }), -/* 934 */ +/* 948 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148673,7 +153391,7 @@ module.exports = BringToTop; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SafeRange = __webpack_require__(68); +var SafeRange = __webpack_require__(70); /** * Returns the total number of elements in the array which have a property matching the given value. @@ -148716,7 +153434,7 @@ module.exports = CountAllMatching; /***/ }), -/* 935 */ +/* 949 */ /***/ (function(module, exports) { /** @@ -148762,7 +153480,7 @@ module.exports = Each; /***/ }), -/* 936 */ +/* 950 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148771,7 +153489,7 @@ module.exports = Each; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SafeRange = __webpack_require__(68); +var SafeRange = __webpack_require__(70); /** * Passes each element in the array, between the start and end indexes, to the given callback. @@ -148818,7 +153536,7 @@ module.exports = EachInRange; /***/ }), -/* 937 */ +/* 951 */ /***/ (function(module, exports) { /** @@ -148860,7 +153578,7 @@ module.exports = MoveDown; /***/ }), -/* 938 */ +/* 952 */ /***/ (function(module, exports) { /** @@ -148907,7 +153625,7 @@ module.exports = MoveTo; /***/ }), -/* 939 */ +/* 953 */ /***/ (function(module, exports) { /** @@ -148949,71 +153667,7 @@ module.exports = MoveUp; /***/ }), -/* 940 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Create an array representing the range of numbers (usually integers), between, and inclusive of, - * the given `start` and `end` arguments. For example: - * - * `var array = numberArray(2, 4); // array = [2, 3, 4]` - * `var array = numberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]` - * - * This is equivalent to `numberArrayStep(start, end, 1)`. - * - * You can optionally provide a prefix and / or suffix string. If given the array will contain - * strings, not integers. For example: - * - * `var array = numberArray(1, 4, 'Level '); // array = ["Level 1", "Level 2", "Level 3", "Level 4"]` - * `var array = numberArray(5, 7, 'HD-', '.png'); // array = ["HD-5.png", "HD-6.png", "HD-7.png"]` - * - * @function Phaser.Utils.Array.NumberArray - * @since 3.0.0 - * - * @param {number} start - The minimum value the array starts with. - * @param {number} end - The maximum value the array contains. - * @param {string} [prefix] - Optional prefix to place before the number. If provided the array will contain strings, not integers. - * @param {string} [suffix] - Optional suffix to place after the number. If provided the array will contain strings, not integers. - * - * @return {(number[]|string[])} The array of number values, or strings if a prefix or suffix was provided. - */ -var NumberArray = function (start, end, prefix, suffix) -{ - var result = []; - - for (var i = start; i <= end; i++) - { - if (prefix || suffix) - { - var key = (prefix) ? prefix + i.toString() : i.toString(); - - if (suffix) - { - key = key.concat(suffix); - } - - result.push(key); - } - else - { - result.push(i); - } - } - - return result; -}; - -module.exports = NumberArray; - - -/***/ }), -/* 941 */ +/* 954 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149022,7 +153676,7 @@ module.exports = NumberArray; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RoundAwayFromZero = __webpack_require__(336); +var RoundAwayFromZero = __webpack_require__(344); /** * Create an array of numbers (positive and/or negative) progressing from `start` @@ -149090,7 +153744,7 @@ module.exports = NumberArrayStep; /***/ }), -/* 942 */ +/* 955 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149099,7 +153753,7 @@ module.exports = NumberArrayStep; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SpliceOne = __webpack_require__(81); +var SpliceOne = __webpack_require__(82); /** * Removes the item from the given position in the array. @@ -149141,7 +153795,7 @@ module.exports = RemoveAt; /***/ }), -/* 943 */ +/* 956 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149150,7 +153804,7 @@ module.exports = RemoveAt; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SafeRange = __webpack_require__(68); +var SafeRange = __webpack_require__(70); /** * Removes the item within the given range in the array. @@ -149204,7 +153858,7 @@ module.exports = RemoveBetween; /***/ }), -/* 944 */ +/* 957 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149213,7 +153867,7 @@ module.exports = RemoveBetween; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SpliceOne = __webpack_require__(81); +var SpliceOne = __webpack_require__(82); /** * Removes a random object from the given array and returns it. @@ -149242,7 +153896,7 @@ module.exports = RemoveRandomElement; /***/ }), -/* 945 */ +/* 958 */ /***/ (function(module, exports) { /** @@ -149286,7 +153940,7 @@ module.exports = Replace; /***/ }), -/* 946 */ +/* 959 */ /***/ (function(module, exports) { /** @@ -149324,7 +153978,7 @@ module.exports = SendToBack; /***/ }), -/* 947 */ +/* 960 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149333,7 +153987,7 @@ module.exports = SendToBack; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SafeRange = __webpack_require__(68); +var SafeRange = __webpack_require__(70); /** * Scans the array for elements with the given property. If found, the property is set to the `value`. @@ -149379,7 +154033,7 @@ module.exports = SetAll; /***/ }), -/* 948 */ +/* 961 */ /***/ (function(module, exports) { /** @@ -149427,7 +154081,7 @@ module.exports = Swap; /***/ }), -/* 949 */ +/* 962 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149437,9 +154091,9 @@ module.exports = Swap; */ var Class = __webpack_require__(0); -var ProcessQueue = __webpack_require__(192); +var ProcessQueue = __webpack_require__(195); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(22); +var SceneEvents = __webpack_require__(20); /** * @classdesc @@ -149467,6 +154121,9 @@ var UpdateList = new Class({ { ProcessQueue.call(this); + // No duplicates in this list + this.checkQueue = true; + /** * The Scene that the Update List belongs to. * @@ -149589,7 +154246,7 @@ var UpdateList = new Class({ /** * The Scene that owns this plugin is shutting down. - * + * * We need to kill and reset all internal properties as well as stop listening to Scene events. * * @method Phaser.GameObjects.UpdateList#shutdown @@ -149635,7 +154292,7 @@ var UpdateList = new Class({ /** * The Scene that owns this plugin is being destroyed. - * + * * We need to shutdown and then kill off all external references. * * @method Phaser.GameObjects.UpdateList#destroy @@ -149653,7 +154310,7 @@ var UpdateList = new Class({ /** * Adds a new item to the Update List. - * + * * The item is added to the pending list and made active in the next update. * * @method Phaser.GameObjects.UpdateList#add @@ -149666,7 +154323,7 @@ var UpdateList = new Class({ /** * Removes an item from the Update List. - * + * * The item is added to the pending destroy and fully removed in the next update. * * @method Phaser.GameObjects.UpdateList#remove @@ -149679,7 +154336,7 @@ var UpdateList = new Class({ /** * Removes all active items from this Update List. - * + * * All the items are marked as 'pending destroy' and fully removed in the next update. * * @method Phaser.GameObjects.UpdateList#removeAll @@ -149690,7 +154347,7 @@ var UpdateList = new Class({ /** * Update this queue. First it will process any items awaiting destruction, and remove them. - * + * * Then it will check to see if there are any items pending insertion, and move them to an * active state. Finally, it will return a list of active items for further processing. * @@ -149702,7 +154359,7 @@ var UpdateList = new Class({ /** * Returns the current list of active items. - * + * * This method returns a reference to the active list array, not a copy of it. * Therefore, be careful to not modify this array outside of the ProcessQueue. * @@ -149728,29 +154385,7 @@ module.exports = UpdateList; /***/ }), -/* 950 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Structs.Events - */ - -module.exports = { - - PROCESS_QUEUE_ADD: __webpack_require__(951), - PROCESS_QUEUE_REMOVE: __webpack_require__(952) - -}; - - -/***/ }), -/* 951 */ +/* 963 */ /***/ (function(module, exports) { /** @@ -149777,7 +154412,7 @@ module.exports = 'add'; /***/ }), -/* 952 */ +/* 964 */ /***/ (function(module, exports) { /** @@ -149804,7 +154439,7 @@ module.exports = 'remove'; /***/ }), -/* 953 */ +/* 965 */ /***/ (function(module, exports) { /** @@ -150326,7 +154961,7 @@ module.exports = GetBitmapTextSize; /***/ }), -/* 954 */ +/* 966 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150335,7 +154970,7 @@ module.exports = GetBitmapTextSize; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ParseXMLBitmapFont = __webpack_require__(193); +var ParseXMLBitmapFont = __webpack_require__(196); /** * Parse an XML Bitmap Font from an Atlas. @@ -150380,7 +155015,7 @@ module.exports = ParseFromAtlas; /***/ }), -/* 955 */ +/* 967 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150394,12 +155029,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(956); + renderWebGL = __webpack_require__(968); } if (true) { - renderCanvas = __webpack_require__(958); + renderCanvas = __webpack_require__(970); } module.exports = { @@ -150411,7 +155046,7 @@ module.exports = { /***/ }), -/* 956 */ +/* 968 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150420,7 +155055,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BatchChar = __webpack_require__(957); +var BatchChar = __webpack_require__(969); var Utils = __webpack_require__(10); /** @@ -150571,7 +155206,7 @@ module.exports = BitmapTextWebGLRenderer; /***/ }), -/* 957 */ +/* 969 */ /***/ (function(module, exports) { /** @@ -150630,7 +155265,7 @@ module.exports = BatchChar; /***/ }), -/* 958 */ +/* 970 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150812,7 +155447,7 @@ module.exports = BitmapTextCanvasRenderer; /***/ }), -/* 959 */ +/* 971 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150826,12 +155461,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(960); + renderWebGL = __webpack_require__(972); } if (true) { - renderCanvas = __webpack_require__(961); + renderCanvas = __webpack_require__(973); } module.exports = { @@ -150843,7 +155478,7 @@ module.exports = { /***/ }), -/* 960 */ +/* 972 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150973,7 +155608,7 @@ module.exports = BlitterWebGLRenderer; /***/ }), -/* 961 */ +/* 973 */ /***/ (function(module, exports) { /** @@ -151103,437 +155738,7 @@ module.exports = BlitterCanvasRenderer; /***/ }), -/* 962 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var Frame = __webpack_require__(95); - -/** - * @classdesc - * A Bob Game Object. - * - * A Bob belongs to a Blitter Game Object. The Blitter is responsible for managing and rendering this object. - * - * A Bob has a position, alpha value and a frame from a texture that it uses to render with. You can also toggle - * the flipped and visible state of the Bob. The Frame the Bob uses to render can be changed dynamically, but it - * must be a Frame within the Texture used by the parent Blitter. - * - * Bob positions are relative to the Blitter parent. So if you move the Blitter parent, all Bob children will - * have their positions impacted by this change as well. - * - * You can manipulate Bob objects directly from your game code, but the creation and destruction of them should be - * handled via the Blitter parent. - * - * @class Bob - * @memberof Phaser.GameObjects - * @constructor - * @since 3.0.0 - * - * @param {Phaser.GameObjects.Blitter} blitter - The parent Blitter object is responsible for updating this Bob. - * @param {number} x - The horizontal position of this Game Object in the world, relative to the parent Blitter position. - * @param {number} y - The vertical position of this Game Object in the world, relative to the parent Blitter position. - * @param {(string|integer)} frame - The Frame this Bob will render with, as defined in the Texture the parent Blitter is using. - * @param {boolean} visible - Should the Bob render visible or not to start with? - */ -var Bob = new Class({ - - initialize: - - function Bob (blitter, x, y, frame, visible) - { - /** - * The Blitter object that this Bob belongs to. - * - * @name Phaser.GameObjects.Bob#parent - * @type {Phaser.GameObjects.Blitter} - * @since 3.0.0 - */ - this.parent = blitter; - - /** - * The x position of this Bob, relative to the x position of the Blitter. - * - * @name Phaser.GameObjects.Bob#x - * @type {number} - * @since 3.0.0 - */ - this.x = x; - - /** - * The y position of this Bob, relative to the y position of the Blitter. - * - * @name Phaser.GameObjects.Bob#y - * @type {number} - * @since 3.0.0 - */ - this.y = y; - - /** - * The frame that the Bob uses to render with. - * To change the frame use the `Bob.setFrame` method. - * - * @name Phaser.GameObjects.Bob#frame - * @type {Phaser.Textures.Frame} - * @protected - * @since 3.0.0 - */ - this.frame = frame; - - /** - * A blank object which can be used to store data related to this Bob in. - * - * @name Phaser.GameObjects.Bob#data - * @type {object} - * @default {} - * @since 3.0.0 - */ - this.data = {}; - - /** - * The tint value of this Bob. - * - * @name Phaser.GameObjects.Bob#tint - * @type {number} - * @default 0xffffff - * @since 3.20.0 - */ - this.tint = 0xffffff; - - /** - * The visible state of this Bob. - * - * @name Phaser.GameObjects.Bob#_visible - * @type {boolean} - * @private - * @since 3.0.0 - */ - this._visible = visible; - - /** - * The alpha value of this Bob. - * - * @name Phaser.GameObjects.Bob#_alpha - * @type {number} - * @private - * @default 1 - * @since 3.0.0 - */ - this._alpha = 1; - - /** - * The horizontally flipped state of the Bob. - * A Bob that is flipped horizontally will render inversed on the horizontal axis. - * Flipping always takes place from the middle of the texture. - * - * @name Phaser.GameObjects.Bob#flipX - * @type {boolean} - * @since 3.0.0 - */ - this.flipX = false; - - /** - * The vertically flipped state of the Bob. - * A Bob that is flipped vertically will render inversed on the vertical axis (i.e. upside down) - * Flipping always takes place from the middle of the texture. - * - * @name Phaser.GameObjects.Bob#flipY - * @type {boolean} - * @since 3.0.0 - */ - this.flipY = false; - }, - - /** - * Changes the Texture Frame being used by this Bob. - * The frame must be part of the Texture the parent Blitter is using. - * If no value is given it will use the default frame of the Blitter parent. - * - * @method Phaser.GameObjects.Bob#setFrame - * @since 3.0.0 - * - * @param {(string|integer|Phaser.Textures.Frame)} [frame] - The frame to be used during rendering. - * - * @return {this} This Bob Game Object. - */ - setFrame: function (frame) - { - if (frame === undefined) - { - this.frame = this.parent.frame; - } - else if (frame instanceof Frame && frame.texture === this.parent.texture) - { - this.frame = frame; - } - else - { - this.frame = this.parent.texture.get(frame); - } - - return this; - }, - - /** - * Resets the horizontal and vertical flipped state of this Bob back to their default un-flipped state. - * - * @method Phaser.GameObjects.Bob#resetFlip - * @since 3.0.0 - * - * @return {this} This Bob Game Object. - */ - resetFlip: function () - { - this.flipX = false; - this.flipY = false; - - return this; - }, - - /** - * Resets this Bob. - * - * Changes the position to the values given, and optionally changes the frame. - * - * Also resets the flipX and flipY values, sets alpha back to 1 and visible to true. - * - * @method Phaser.GameObjects.Bob#reset - * @since 3.0.0 - * - * @param {number} x - The x position of the Bob. Bob coordinate are relative to the position of the Blitter object. - * @param {number} y - The y position of the Bob. Bob coordinate are relative to the position of the Blitter object. - * @param {(string|integer|Phaser.Textures.Frame)} [frame] - The Frame the Bob will use. It _must_ be part of the Texture the parent Blitter object is using. - * - * @return {this} This Bob Game Object. - */ - reset: function (x, y, frame) - { - this.x = x; - this.y = y; - - this.flipX = false; - this.flipY = false; - - this._alpha = 1; - this._visible = true; - - this.parent.dirty = true; - - if (frame) - { - this.setFrame(frame); - } - - return this; - }, - - /** - * Changes the position of this Bob to the values given. - * - * @method Phaser.GameObjects.Bob#setPosition - * @since 3.20.0 - * - * @param {number} x - The x position of the Bob. Bob coordinate are relative to the position of the Blitter object. - * @param {number} y - The y position of the Bob. Bob coordinate are relative to the position of the Blitter object. - * - * @return {this} This Bob Game Object. - */ - setPosition: function (x, y) - { - this.x = x; - this.y = y; - - return this; - }, - - /** - * Sets the horizontal flipped state of this Bob. - * - * @method Phaser.GameObjects.Bob#setFlipX - * @since 3.0.0 - * - * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped. - * - * @return {this} This Bob Game Object. - */ - setFlipX: function (value) - { - this.flipX = value; - - return this; - }, - - /** - * Sets the vertical flipped state of this Bob. - * - * @method Phaser.GameObjects.Bob#setFlipY - * @since 3.0.0 - * - * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped. - * - * @return {this} This Bob Game Object. - */ - setFlipY: function (value) - { - this.flipY = value; - - return this; - }, - - /** - * Sets the horizontal and vertical flipped state of this Bob. - * - * @method Phaser.GameObjects.Bob#setFlip - * @since 3.0.0 - * - * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped. - * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped. - * - * @return {this} This Bob Game Object. - */ - setFlip: function (x, y) - { - this.flipX = x; - this.flipY = y; - - return this; - }, - - /** - * Sets the visibility of this Bob. - * - * An invisible Bob will skip rendering. - * - * @method Phaser.GameObjects.Bob#setVisible - * @since 3.0.0 - * - * @param {boolean} value - The visible state of the Game Object. - * - * @return {this} This Bob Game Object. - */ - setVisible: function (value) - { - this.visible = value; - - return this; - }, - - /** - * Set the Alpha level of this Bob. 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. - * - * A Bob with alpha 0 will skip rendering. - * - * @method Phaser.GameObjects.Bob#setAlpha - * @since 3.0.0 - * - * @param {number} value - The alpha value used for this Bob. Between 0 and 1. - * - * @return {this} This Bob Game Object. - */ - setAlpha: function (value) - { - this.alpha = value; - - return this; - }, - - /** - * Sets the tint of this Bob. - * - * @method Phaser.GameObjects.Bob#setTint - * @since 3.20.0 - * - * @param {number} value - The tint value used for this Bob. Between 0 and 0xffffff. - * - * @return {this} This Bob Game Object. - */ - setTint: function (value) - { - this.tint = value; - - return this; - }, - - /** - * Destroys this Bob instance. - * Removes itself from the Blitter and clears the parent, frame and data properties. - * - * @method Phaser.GameObjects.Bob#destroy - * @since 3.0.0 - */ - destroy: function () - { - this.parent.dirty = true; - - this.parent.children.remove(this); - - this.parent = undefined; - this.frame = undefined; - this.data = undefined; - }, - - /** - * The visible state of the Bob. - * - * An invisible Bob will skip rendering. - * - * @name Phaser.GameObjects.Bob#visible - * @type {boolean} - * @since 3.0.0 - */ - visible: { - - get: function () - { - return this._visible; - }, - - set: function (value) - { - this.parent.dirty |= (this._visible !== value); - this._visible = value; - } - - }, - - /** - * The alpha value of the Bob, between 0 and 1. - * - * A Bob with alpha 0 will skip rendering. - * - * @name Phaser.GameObjects.Bob#alpha - * @type {number} - * @since 3.0.0 - */ - alpha: { - - get: function () - { - return this._alpha; - }, - - set: function (value) - { - this.parent.dirty |= ((this._alpha > 0) !== (value > 0)); - this._alpha = value; - } - - } - -}); - -module.exports = Bob; - - -/***/ }), -/* 963 */ +/* 974 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151548,12 +155753,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(964); + renderWebGL = __webpack_require__(975); } if (true) { - renderCanvas = __webpack_require__(965); + renderCanvas = __webpack_require__(976); } module.exports = { @@ -151565,7 +155770,7 @@ module.exports = { /***/ }), -/* 964 */ +/* 975 */ /***/ (function(module, exports) { /** @@ -151714,7 +155919,7 @@ module.exports = ContainerWebGLRenderer; /***/ }), -/* 965 */ +/* 976 */ /***/ (function(module, exports) { /** @@ -151821,7 +156026,7 @@ module.exports = ContainerCanvasRenderer; /***/ }), -/* 966 */ +/* 977 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151835,12 +156040,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(396); + renderWebGL = __webpack_require__(409); } if (true) { - renderCanvas = __webpack_require__(396); + renderCanvas = __webpack_require__(409); } module.exports = { @@ -151852,7 +156057,7 @@ module.exports = { /***/ }), -/* 967 */ +/* 978 */ /***/ (function(module, exports) { /** @@ -151863,8 +156068,9 @@ module.exports = { /** * Phaser Blend Modes to CSS Blend Modes Map. - * + * * @name Phaser.CSSBlendModes + * @ignore * @enum {string} * @memberof Phaser * @readonly @@ -151893,7 +156099,7 @@ module.exports = [ /***/ }), -/* 968 */ +/* 979 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151907,12 +156113,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(969); + renderWebGL = __webpack_require__(980); } if (true) { - renderCanvas = __webpack_require__(970); + renderCanvas = __webpack_require__(981); } module.exports = { @@ -151924,7 +156130,7 @@ module.exports = { /***/ }), -/* 969 */ +/* 980 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152231,7 +156437,7 @@ module.exports = DynamicBitmapTextWebGLRenderer; /***/ }), -/* 970 */ +/* 981 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152442,7 +156648,7 @@ module.exports = DynamicBitmapTextCanvasRenderer; /***/ }), -/* 971 */ +/* 982 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152456,12 +156662,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(972); + renderWebGL = __webpack_require__(983); } if (true) { - renderCanvas = __webpack_require__(973); + renderCanvas = __webpack_require__(984); } module.exports = { @@ -152473,7 +156679,7 @@ module.exports = { /***/ }), -/* 972 */ +/* 983 */ /***/ (function(module, exports) { /** @@ -152542,13 +156748,13 @@ module.exports = ExternWebGLRenderer; /***/ }), -/* 973 */ +/* 984 */ /***/ (function(module, exports) { /***/ }), -/* 974 */ +/* 985 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152562,15 +156768,15 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(975); + renderWebGL = __webpack_require__(986); // Needed for Graphics.generateTexture - renderCanvas = __webpack_require__(401); + renderCanvas = __webpack_require__(414); } if (true) { - renderCanvas = __webpack_require__(401); + renderCanvas = __webpack_require__(414); } module.exports = { @@ -152582,7 +156788,7 @@ module.exports = { /***/ }), -/* 975 */ +/* 986 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152591,7 +156797,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Commands = __webpack_require__(198); +var Commands = __webpack_require__(201); var Utils = __webpack_require__(10); // TODO: Remove the use of this @@ -152948,7 +157154,7 @@ module.exports = GraphicsWebGLRenderer; /***/ }), -/* 976 */ +/* 987 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152962,12 +157168,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(977); + renderWebGL = __webpack_require__(988); } if (true) { - renderCanvas = __webpack_require__(978); + renderCanvas = __webpack_require__(989); } module.exports = { @@ -152979,7 +157185,7 @@ module.exports = { /***/ }), -/* 977 */ +/* 988 */ /***/ (function(module, exports) { /** @@ -153012,7 +157218,7 @@ module.exports = SpriteWebGLRenderer; /***/ }), -/* 978 */ +/* 989 */ /***/ (function(module, exports) { /** @@ -153045,7 +157251,7 @@ module.exports = SpriteCanvasRenderer; /***/ }), -/* 979 */ +/* 990 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153059,12 +157265,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(980); + renderWebGL = __webpack_require__(991); } if (true) { - renderCanvas = __webpack_require__(981); + renderCanvas = __webpack_require__(992); } module.exports = { @@ -153076,7 +157282,7 @@ module.exports = { /***/ }), -/* 980 */ +/* 991 */ /***/ (function(module, exports) { /** @@ -153109,7 +157315,7 @@ module.exports = ImageWebGLRenderer; /***/ }), -/* 981 */ +/* 992 */ /***/ (function(module, exports) { /** @@ -153142,7 +157348,7 @@ module.exports = ImageCanvasRenderer; /***/ }), -/* 982 */ +/* 993 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153157,608 +157363,18 @@ module.exports = ImageCanvasRenderer; module.exports = { - GravityWell: __webpack_require__(402), - Particle: __webpack_require__(403), - ParticleEmitter: __webpack_require__(404), - ParticleEmitterManager: __webpack_require__(200), - Zones: __webpack_require__(987) + EmitterOp: __webpack_require__(415), + GravityWell: __webpack_require__(416), + Particle: __webpack_require__(417), + ParticleEmitter: __webpack_require__(418), + ParticleEmitterManager: __webpack_require__(203), + Zones: __webpack_require__(997) }; /***/ }), -/* 983 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var FloatBetween = __webpack_require__(124); -var GetEaseFunction = __webpack_require__(69); -var GetFastValue = __webpack_require__(2); -var Wrap = __webpack_require__(58); - -/** - * @classdesc - * A Particle Emitter property. - * - * Facilitates changing Particle properties as they are emitted and throughout their lifetime. - * - * @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 {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) - { - if (emitOnly === undefined) - { - emitOnly = false; - } - - /** - * The name of this property. - * - * @name Phaser.GameObjects.Particles.EmitterOp#propertyKey - * @type {string} - * @since 3.0.0 - */ - this.propertyKey = key; - - /** - * The value of this property. - * - * @name Phaser.GameObjects.Particles.EmitterOp#propertyValue - * @type {number} - * @since 3.0.0 - */ - this.propertyValue = defaultValue; - - /** - * The default value of this property. - * - * @name Phaser.GameObjects.Particles.EmitterOp#defaultValue - * @type {number} - * @since 3.0.0 - */ - this.defaultValue = defaultValue; - - /** - * The number of steps for stepped easing between {@link Phaser.GameObjects.Particles.EmitterOp#start} and - * {@link Phaser.GameObjects.Particles.EmitterOp#end} values, per emit. - * - * @name Phaser.GameObjects.Particles.EmitterOp#steps - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.steps = 0; - - /** - * The step counter for stepped easing, per emit. - * - * @name Phaser.GameObjects.Particles.EmitterOp#counter - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.counter = 0; - - /** - * The start value for this property to ease between. - * - * @name Phaser.GameObjects.Particles.EmitterOp#start - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.start = 0; - - /** - * The end value for this property to ease between. - * - * @name Phaser.GameObjects.Particles.EmitterOp#end - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.end = 0; - - /** - * The easing function to use for updating this property. - * - * @name Phaser.GameObjects.Particles.EmitterOp#ease - * @type {?function} - * @since 3.0.0 - */ - this.ease; - - /** - * Whether this property can only be modified when a Particle is emitted. - * - * Set to `true` to allow only {@link Phaser.GameObjects.Particles.EmitterOp#onEmit} callbacks to be set and - * affect this property. - * - * Set to `false` to allow both {@link Phaser.GameObjects.Particles.EmitterOp#onEmit} and - * {@link Phaser.GameObjects.Particles.EmitterOp#onUpdate} callbacks to be set and affect this property. - * - * @name Phaser.GameObjects.Particles.EmitterOp#emitOnly - * @type {boolean} - * @since 3.0.0 - */ - this.emitOnly = emitOnly; - - /** - * The callback to run for Particles when they are emitted from the Particle Emitter. - * - * @name Phaser.GameObjects.Particles.EmitterOp#onEmit - * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitCallback} - * @since 3.0.0 - */ - this.onEmit = this.defaultEmit; - - /** - * The callback to run for Particles when they are updated. - * - * @name Phaser.GameObjects.Particles.EmitterOp#onUpdate - * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateCallback} - * @since 3.0.0 - */ - this.onUpdate = this.defaultUpdate; - - this.loadConfig(config); - }, - - /** - * Load the property from a Particle Emitter configuration object. - * - * Optionally accepts a new property key to use, replacing the current one. - * - * @method Phaser.GameObjects.Particles.EmitterOp#loadConfig - * @since 3.0.0 - * - * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} [config] - Settings for the Particle Emitter that owns this property. - * @param {string} [newKey] - The new key to use for this property, if any. - */ - loadConfig: function (config, newKey) - { - if (config === undefined) - { - config = {}; - } - - if (newKey) - { - this.propertyKey = newKey; - } - - this.propertyValue = GetFastValue( - config, - this.propertyKey, - this.defaultValue - ); - - this.setMethods(); - - if (this.emitOnly) - { - // Reset it back again - this.onUpdate = this.defaultUpdate; - } - }, - - /** - * Build a JSON representation of this Particle Emitter property. - * - * @method Phaser.GameObjects.Particles.EmitterOp#toJSON - * @since 3.0.0 - * - * @return {object} A JSON representation of this Particle Emitter property. - */ - toJSON: function () - { - return this.propertyValue; - }, - - /** - * Change the current value of the property and update its callback methods. - * - * @method Phaser.GameObjects.Particles.EmitterOp#onChange - * @since 3.0.0 - * - * @param {number} value - The value of the property. - * - * @return {this} This Emitter Op object. - */ - onChange: function (value) - { - this.propertyValue = value; - - return this.setMethods(); - }, - - /** - * 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}. - * - * @method Phaser.GameObjects.Particles.EmitterOp#setMethods - * @since 3.0.0 - * - * @return {this} This Emitter Op object. - */ - setMethods: function () - { - var value = this.propertyValue; - - var t = typeof value; - - if (t === 'number') - { - // Explicit static value: - // x: 400 - - this.onEmit = this.staticValueEmit; - this.onUpdate = this.staticValueUpdate; // How? - } - else if (Array.isArray(value)) - { - // Picks a random element from the array: - // x: [ 100, 200, 300, 400 ] - - this.onEmit = this.randomStaticValueEmit; - } - 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) - { - this.onEmit = value; - } - else - { - this.onUpdate = value; - } - } - else if (t === 'object' && (this.has(value, 'random') || this.hasBoth(value, 'start', 'end') || this.hasBoth(value, 'min', 'max'))) - { - this.start = this.has(value, 'start') ? value.start : value.min; - this.end = this.has(value, 'end') ? value.end : value.max; - - var isRandom = (this.hasBoth(value, 'min', 'max') || !!value.random); - - // A random starting value (using 'min | max' instead of 'start | end' automatically implies a random value) - - // x: { start: 100, end: 400, random: true } OR { min: 100, max: 400 } OR { random: [ 100, 400 ] } - - if (isRandom) - { - var rnd = value.random; - - // x: { random: [ 100, 400 ] } = the same as doing: x: { start: 100, end: 400, random: true } - if (Array.isArray(rnd)) - { - this.start = rnd[0]; - this.end = rnd[1]; - } - - this.onEmit = this.randomRangedValueEmit; - } - - if (this.has(value, 'steps')) - { - // 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; - } - else - { - // An eased range (defaults to Linear if not specified) - - // x: { start: 100, end: 400, [ ease: 'Linear' ] } - - var easeType = this.has(value, 'ease') ? value.ease : 'Linear'; - - this.ease = GetEaseFunction(easeType); - - if (!isRandom) - { - this.onEmit = this.easedValueEmit; - } - - // BUG: alpha, rotate, scaleX, scaleY, or tint are eased here if {min, max} is given. - // Probably this branch should exclude isRandom entirely. - - this.onUpdate = this.easeValueUpdate; - } - } - else if (t === 'object' && this.hasEither(value, 'onEmit', 'onUpdate')) - { - // Custom onEmit and onUpdate callbacks - - /* - x: { - // Called at the start of the particles life, when it is being created - onEmit: function (particle, key, t, value) - { - return value; - }, - - // Called during the particles life on each update - onUpdate: function (particle, key, t, value) - { - return value; - } - } - */ - - if (this.has(value, 'onEmit')) - { - this.onEmit = value.onEmit; - } - - if (this.has(value, 'onUpdate')) - { - this.onUpdate = value.onUpdate; - } - } - - return this; - }, - - /** - * Check whether an object has the given property. - * - * @method Phaser.GameObjects.Particles.EmitterOp#has - * @since 3.0.0 - * - * @param {object} object - The object to check. - * @param {string} key - The key of the property to look for in the object. - * - * @return {boolean} `true` if the property exists in the object, `false` otherwise. - */ - has: function (object, key) - { - return object.hasOwnProperty(key); - }, - - /** - * Check whether an object has both of the given properties. - * - * @method Phaser.GameObjects.Particles.EmitterOp#hasBoth - * @since 3.0.0 - * - * @param {object} object - The object to check. - * @param {string} key1 - The key of the first property to check the object for. - * @param {string} key2 - The key of the second property to check the object for. - * - * @return {boolean} `true` if both properties exist in the object, `false` otherwise. - */ - hasBoth: function (object, key1, key2) - { - return object.hasOwnProperty(key1) && object.hasOwnProperty(key2); - }, - - /** - * Check whether an object has at least one of the given properties. - * - * @method Phaser.GameObjects.Particles.EmitterOp#hasEither - * @since 3.0.0 - * - * @param {object} object - The object to check. - * @param {string} key1 - The key of the first property to check the object for. - * @param {string} key2 - The key of the second property to check the object for. - * - * @return {boolean} `true` if at least one of the properties exists in the object, `false` if neither exist. - */ - hasEither: function (object, key1, key2) - { - return object.hasOwnProperty(key1) || object.hasOwnProperty(key2); - }, - - /** - * The returned value sets what the property will be at the START of the particles life, on emit. - * - * @method Phaser.GameObjects.Particles.EmitterOp#defaultEmit - * @since 3.0.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. - */ - defaultEmit: function (particle, key, value) - { - return value; - }, - - /** - * The returned value updates the property for the duration of the particles life. - * - * @method Phaser.GameObjects.Particles.EmitterOp#defaultUpdate - * @since 3.0.0 - * - * @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} value - The current value of the property. - * - * @return {number} The new value of the property. - */ - defaultUpdate: function (particle, key, t, value) - { - return value; - }, - - /** - * An `onEmit` callback that returns the current value of the property. - * - * @method Phaser.GameObjects.Particles.EmitterOp#staticValueEmit - * @since 3.0.0 - * - * @return {number} The current value of the property. - */ - staticValueEmit: function () - { - return this.propertyValue; - }, - - /** - * An `onUpdate` callback that returns the current value of the property. - * - * @method Phaser.GameObjects.Particles.EmitterOp#staticValueUpdate - * @since 3.0.0 - * - * @return {number} The current value of the property. - */ - staticValueUpdate: function () - { - return this.propertyValue; - }, - - /** - * An `onEmit` callback that returns a random value from the current value array. - * - * @method Phaser.GameObjects.Particles.EmitterOp#randomStaticValueEmit - * @since 3.0.0 - * - * @return {number} The new value of the property. - */ - randomStaticValueEmit: function () - { - var randomIndex = Math.floor(Math.random() * this.propertyValue.length); - - return this.propertyValue[randomIndex]; - }, - - /** - * 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#randomRangedValueEmit - * @since 3.0.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. - */ - randomRangedValueEmit: function (particle, key) - { - var value = FloatBetween(this.start, this.end); - - if (particle && particle.data[key]) - { - particle.data[key].min = value; - } - - return value; - }, - - /** - * An `onEmit` callback that returns a stepped value between the - * {@link Phaser.GameObjects.Particles.EmitterOp#start} and {@link Phaser.GameObjects.Particles.EmitterOp#end} - * range. - * - * @method Phaser.GameObjects.Particles.EmitterOp#steppedEmit - * @since 3.0.0 - * - * @return {number} The new value of the property. - */ - steppedEmit: function () - { - var current = this.counter; - - var next = this.counter + (this.end - this.start) / this.steps; - - this.counter = Wrap(next, this.start, this.end); - - return current; - }, - - /** - * An `onEmit` callback for an eased property. - * - * It prepares the particle for easing by {@link Phaser.GameObjects.Particles.EmitterOp#easeValueUpdate}. - * - * @method Phaser.GameObjects.Particles.EmitterOp#easedValueEmit - * @since 3.0.0 - * - * @param {Phaser.GameObjects.Particles.Particle} particle - The particle. - * @param {string} key - The name of the property. - * - * @return {number} {@link Phaser.GameObjects.Particles.EmitterOp#start}, as the new value of the property. - */ - easedValueEmit: function (particle, key) - { - if (particle && particle.data[key]) - { - var data = particle.data[key]; - - data.min = this.start; - data.max = this.end; - } - - return this.start; - }, - - /** - * An `onUpdate` callback that returns an eased value between the - * {@link Phaser.GameObjects.Particles.EmitterOp#start} and {@link Phaser.GameObjects.Particles.EmitterOp#end} - * range. - * - * @method Phaser.GameObjects.Particles.EmitterOp#easeValueUpdate - * @since 3.0.0 - * - * @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) - * - * @return {number} The new value of the property. - */ - easeValueUpdate: function (particle, key, t) - { - var data = particle.data[key]; - - return (data.max - data.min) * this.ease(t) + data.min; - } -}); - -module.exports = EmitterOp; - - -/***/ }), -/* 984 */ +/* 994 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153772,12 +157388,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(985); + renderWebGL = __webpack_require__(995); } if (true) { - renderCanvas = __webpack_require__(986); + renderCanvas = __webpack_require__(996); } module.exports = { @@ -153789,7 +157405,7 @@ module.exports = { /***/ }), -/* 985 */ +/* 995 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153950,7 +157566,7 @@ module.exports = ParticleManagerWebGLRenderer; /***/ }), -/* 986 */ +/* 996 */ /***/ (function(module, exports) { /** @@ -154073,7 +157689,7 @@ module.exports = ParticleManagerCanvasRenderer; /***/ }), -/* 987 */ +/* 997 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154088,15 +157704,15 @@ module.exports = ParticleManagerCanvasRenderer; module.exports = { - DeathZone: __webpack_require__(405), - EdgeZone: __webpack_require__(406), - RandomZone: __webpack_require__(408) + DeathZone: __webpack_require__(419), + EdgeZone: __webpack_require__(420), + RandomZone: __webpack_require__(422) }; /***/ }), -/* 988 */ +/* 998 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154110,12 +157726,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(989); + renderWebGL = __webpack_require__(999); } if (true) { - renderCanvas = __webpack_require__(990); + renderCanvas = __webpack_require__(1000); } module.exports = { @@ -154127,7 +157743,7 @@ module.exports = { /***/ }), -/* 989 */ +/* 999 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154194,7 +157810,7 @@ module.exports = RenderTextureWebGLRenderer; /***/ }), -/* 990 */ +/* 1000 */ /***/ (function(module, exports) { /** @@ -154227,7 +157843,7 @@ module.exports = RenderTextureCanvasRenderer; /***/ }), -/* 991 */ +/* 1001 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154236,7 +157852,7 @@ module.exports = RenderTextureCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RETRO_FONT_CONST = __webpack_require__(992); +var RETRO_FONT_CONST = __webpack_require__(1002); var Extend = __webpack_require__(19); /** @@ -154244,7 +157860,7 @@ var Extend = __webpack_require__(19); * @since 3.6.0 */ -var RetroFont = { Parse: __webpack_require__(993) }; +var RetroFont = { Parse: __webpack_require__(1003) }; // Merge in the consts RetroFont = Extend(false, RetroFont, RETRO_FONT_CONST); @@ -154253,7 +157869,7 @@ module.exports = RetroFont; /***/ }), -/* 992 */ +/* 1002 */ /***/ (function(module, exports) { /** @@ -154369,7 +157985,7 @@ module.exports = RETRO_FONT_CONST; /***/ }), -/* 993 */ +/* 1003 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154485,7 +158101,7 @@ module.exports = ParseRetroFont; /***/ }), -/* 994 */ +/* 1004 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154499,12 +158115,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(995); + renderWebGL = __webpack_require__(1005); } if (true) { - renderCanvas = __webpack_require__(996); + renderCanvas = __webpack_require__(1006); } module.exports = { @@ -154516,7 +158132,7 @@ module.exports = { /***/ }), -/* 995 */ +/* 1005 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154653,7 +158269,7 @@ module.exports = RopeWebGLRenderer; /***/ }), -/* 996 */ +/* 1006 */ /***/ (function(module, exports) { /** @@ -154682,89 +158298,7 @@ module.exports = RopeCanvasRenderer; /***/ }), -/* 997 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Returns an object containing dimensions of the Text object. - * - * @function Phaser.GameObjects.Text.GetTextSize - * @since 3.0.0 - * - * @param {Phaser.GameObjects.Text} text - The Text object to calculate the size from. - * @param {Phaser.Types.GameObjects.Text.TextMetrics} size - The Text metrics to use when calculating the size. - * @param {array} lines - The lines of text to calculate the size from. - * - * @return {object} An object containing dimensions of the Text object. - */ -var GetTextSize = function (text, size, lines) -{ - var canvas = text.canvas; - var context = text.context; - var style = text.style; - - var lineWidths = []; - var maxLineWidth = 0; - var drawnLines = lines.length; - - if (style.maxLines > 0 && style.maxLines < lines.length) - { - drawnLines = style.maxLines; - } - - style.syncFont(canvas, context); - - // Text Width - - for (var i = 0; i < drawnLines; i++) - { - var lineWidth = style.strokeThickness; - - lineWidth += context.measureText(lines[i]).width; - - // Adjust for wrapped text - if (style.wordWrap) - { - lineWidth -= context.measureText(' ').width; - } - - lineWidths[i] = Math.ceil(lineWidth); - maxLineWidth = Math.max(maxLineWidth, lineWidths[i]); - } - - // Text Height - - var lineHeight = size.fontSize + style.strokeThickness; - var height = lineHeight * drawnLines; - var lineSpacing = text.lineSpacing; - - // Adjust for line spacing - if (drawnLines > 1) - { - height += lineSpacing * (drawnLines - 1); - } - - return { - width: maxLineWidth, - height: height, - lines: drawnLines, - lineWidths: lineWidths, - lineSpacing: lineSpacing, - lineHeight: lineHeight - }; -}; - -module.exports = GetTextSize; - - -/***/ }), -/* 998 */ +/* 1007 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154778,12 +158312,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(999); + renderWebGL = __webpack_require__(1008); } if (true) { - renderCanvas = __webpack_require__(1000); + renderCanvas = __webpack_require__(1009); } module.exports = { @@ -154795,7 +158329,7 @@ module.exports = { /***/ }), -/* 999 */ +/* 1008 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154867,7 +158401,7 @@ module.exports = TextWebGLRenderer; /***/ }), -/* 1000 */ +/* 1009 */ /***/ (function(module, exports) { /** @@ -154905,1248 +158439,7 @@ module.exports = TextCanvasRenderer; /***/ }), -/* 1001 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var GetAdvancedValue = __webpack_require__(15); -var GetValue = __webpack_require__(6); -var MeasureText = __webpack_require__(1002); - -// Key: [ Object Key, Default Value ] - -var propertyMap = { - 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', false ], - shadowFill: [ 'shadow.fill', false ], - align: [ 'align', 'left' ], - maxLines: [ 'maxLines', 0 ], - fixedWidth: [ 'fixedWidth', 0 ], - fixedHeight: [ 'fixedHeight', 0 ], - resolution: [ 'resolution', 0 ], - rtl: [ 'rtl', false ], - 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', false ] -}; - -/** - * @classdesc - * A TextStyle class manages all of the style settings for a Text object. - * - * Text Game Objects create a TextStyle instance automatically, which is - * accessed via the `Text.style` property. You do not normally need to - * instantiate one yourself. - * - * @class TextStyle - * @memberof Phaser.GameObjects - * @constructor - * @since 3.0.0 - * - * @param {Phaser.GameObjects.Text} text - The Text object that this TextStyle is styling. - * @param {Phaser.Types.GameObjects.Text.TextStyle} style - The style settings to set. - */ -var TextStyle = new Class({ - - initialize: - - function TextStyle (text, style) - { - /** - * The Text object that this TextStyle is styling. - * - * @name Phaser.GameObjects.TextStyle#parent - * @type {Phaser.GameObjects.Text} - * @since 3.0.0 - */ - this.parent = text; - - /** - * The font family. - * - * @name Phaser.GameObjects.TextStyle#fontFamily - * @type {string} - * @default 'Courier' - * @since 3.0.0 - */ - this.fontFamily; - - /** - * The font size. - * - * @name Phaser.GameObjects.TextStyle#fontSize - * @type {string} - * @default '16px' - * @since 3.0.0 - */ - this.fontSize; - - /** - * The font style. - * - * @name Phaser.GameObjects.TextStyle#fontStyle - * @type {string} - * @since 3.0.0 - */ - this.fontStyle; - - /** - * The background color. - * - * @name Phaser.GameObjects.TextStyle#backgroundColor - * @type {string} - * @since 3.0.0 - */ - this.backgroundColor; - - /** - * The text fill color. - * - * @name Phaser.GameObjects.TextStyle#color - * @type {string} - * @default '#fff' - * @since 3.0.0 - */ - this.color; - - /** - * The text stroke color. - * - * @name Phaser.GameObjects.TextStyle#stroke - * @type {string} - * @default '#fff' - * @since 3.0.0 - */ - this.stroke; - - /** - * The text stroke thickness. - * - * @name Phaser.GameObjects.TextStyle#strokeThickness - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.strokeThickness; - - /** - * The horizontal shadow offset. - * - * @name Phaser.GameObjects.TextStyle#shadowOffsetX - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.shadowOffsetX; - - /** - * The vertical shadow offset. - * - * @name Phaser.GameObjects.TextStyle#shadowOffsetY - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.shadowOffsetY; - - /** - * The shadow color. - * - * @name Phaser.GameObjects.TextStyle#shadowColor - * @type {string} - * @default '#000' - * @since 3.0.0 - */ - this.shadowColor; - - /** - * The shadow blur radius. - * - * @name Phaser.GameObjects.TextStyle#shadowBlur - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.shadowBlur; - - /** - * Whether shadow stroke is enabled or not. - * - * @name Phaser.GameObjects.TextStyle#shadowStroke - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.shadowStroke; - - /** - * Whether shadow fill is enabled or not. - * - * @name Phaser.GameObjects.TextStyle#shadowFill - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.shadowFill; - - /** - * The text alignment. - * - * @name Phaser.GameObjects.TextStyle#align - * @type {string} - * @default 'left' - * @since 3.0.0 - */ - this.align; - - /** - * The maximum number of lines to draw. - * - * @name Phaser.GameObjects.TextStyle#maxLines - * @type {integer} - * @default 0 - * @since 3.0.0 - */ - this.maxLines; - - /** - * The fixed width of the text. - * - * `0` means no fixed with. - * - * @name Phaser.GameObjects.TextStyle#fixedWidth - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.fixedWidth; - - /** - * The fixed height of the text. - * - * `0` means no fixed height. - * - * @name Phaser.GameObjects.TextStyle#fixedHeight - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.fixedHeight; - - /** - * The resolution the text is rendered to its internal canvas at. - * The default is 0, which means it will use the resolution set in the Game Config. - * - * @name Phaser.GameObjects.TextStyle#resolution - * @type {number} - * @default 0 - * @since 3.12.0 - */ - this.resolution; - - /** - * Whether the text should render right to left. - * - * @name Phaser.GameObjects.TextStyle#rtl - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.rtl; - - /** - * The test string to use when measuring the font. - * - * @name Phaser.GameObjects.TextStyle#testString - * @type {string} - * @default '|MÉqgy' - * @since 3.0.0 - */ - this.testString; - - /** - * The amount of horizontal padding added to the width of the text when calculating the font metrics. - * - * @name Phaser.GameObjects.TextStyle#baselineX - * @type {number} - * @default 1.2 - * @since 3.3.0 - */ - this.baselineX; - - /** - * The amount of vertical padding added to the height of the text when calculating the font metrics. - * - * @name Phaser.GameObjects.TextStyle#baselineY - * @type {number} - * @default 1.4 - * @since 3.3.0 - */ - this.baselineY; - - /** - * The maximum width of a line of text in pixels. Null means no line wrapping. Setting this - * property directly will not re-run the word wrapping algorithm. To change the width and - * re-wrap, use {@link Phaser.GameObjects.TextStyle#setWordWrapWidth}. - * - * @name Phaser.GameObjects.TextStyle#wordWrapWidth - * @type {number | null} - * @default null - * @since 3.24.0 - */ - this.wordWrapWidth; - - /** - * A custom function that will be responsible for wrapping the text. It will receive two - * arguments: text (the string to wrap), textObject (this Text instance). It should return - * the wrapped lines either as an array of lines or as a string with newline characters in - * place to indicate where breaks should happen. Setting this directly will not re-run the - * word wrapping algorithm. To change the callback and re-wrap, use - * {@link Phaser.GameObjects.TextStyle#setWordWrapCallback}. - * - * @name Phaser.GameObjects.TextStyle#wordWrapCallback - * @type {TextStyleWordWrapCallback | null} - * @default null - * @since 3.24.0 - */ - this.wordWrapCallback; - - /** - * The scope that will be applied when the wordWrapCallback is invoked. Setting this directly will not re-run the - * word wrapping algorithm. To change the callback and re-wrap, use - * {@link Phaser.GameObjects.TextStyle#setWordWrapCallback}. - * - * @name Phaser.GameObjects.TextStyle#wordWrapCallbackScope - * @type {object | null} - * @default null - * @since 3.24.0 - */ - this.wordWrapCallbackScope; - - /** - * Whether or not to use the advanced wrapping algorithm. If true, spaces are collapsed and - * whitespace is trimmed from lines. If false, spaces and whitespace are left as is. Setting - * this property directly will not re-run the word wrapping algorithm. To change the - * advanced setting and re-wrap, use {@link Phaser.GameObjects.TextStyle#setWordWrapWidth}. - * - * @name Phaser.GameObjects.TextStyle#wordWrapUseAdvanced - * @type {boolean} - * @default false - * @since 3.24.0 - */ - this.wordWrapUseAdvanced; - - /** - * The font style, size and family. - * - * @name Phaser.GameObjects.TextStyle#_font - * @type {string} - * @private - * @since 3.0.0 - */ - this._font; - - // Set to defaults + user style - this.setStyle(style, false, true); - - var metrics = GetValue(style, 'metrics', false); - - // Provide optional TextMetrics in the style object to avoid the canvas look-up / scanning - // Doing this is reset if you then change the font of this TextStyle after creation - if (metrics) - { - this.metrics = { - ascent: GetValue(metrics, 'ascent', 0), - descent: GetValue(metrics, 'descent', 0), - fontSize: GetValue(metrics, 'fontSize', 0) - }; - } - else - { - this.metrics = MeasureText(this); - } - }, - - /** - * Set the text style. - * - * @example - * text.setStyle({ - * fontSize: '64px', - * fontFamily: 'Arial', - * color: '#ffffff', - * align: 'center', - * backgroundColor: '#ff00ff' - * }); - * - * @method Phaser.GameObjects.TextStyle#setStyle - * @since 3.0.0 - * - * @param {Phaser.Types.GameObjects.Text.TextStyle} style - The style settings to set. - * @param {boolean} [updateText=true] - Whether to update the text immediately. - * @param {boolean} [setDefaults=false] - Use the default values is not set, or the local values. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setStyle: function (style, updateText, setDefaults) - { - if (updateText === undefined) { updateText = true; } - if (setDefaults === undefined) { setDefaults = false; } - - // Avoid type mutation - // eslint-disable-next-line no-prototype-builtins - if (style && style.hasOwnProperty('fontSize') && typeof style.fontSize === 'number') - { - style.fontSize = style.fontSize.toString() + 'px'; - } - - for (var key in propertyMap) - { - var value = (setDefaults) ? propertyMap[key][1] : this[key]; - - if (key === 'wordWrapCallback' || key === 'wordWrapCallbackScope') - { - // Callback & scope should be set without processing the values - this[key] = GetValue(style, propertyMap[key][0], value); - } - else - { - this[key] = GetAdvancedValue(style, propertyMap[key][0], value); - } - } - - // Allow for 'font' override - var font = GetValue(style, 'font', null); - - if (font !== null) - { - this.setFont(font, false); - } - - this._font = [ this.fontStyle, this.fontSize, this.fontFamily ].join(' ').trim(); - - // Allow for 'fill' to be used in place of 'color' - var fill = GetValue(style, 'fill', null); - - if (fill !== null) - { - this.color = fill; - } - - if (updateText) - { - return this.update(true); - } - else - { - return this.parent; - } - }, - - /** - * Synchronize the font settings to the given Canvas Rendering Context. - * - * @method Phaser.GameObjects.TextStyle#syncFont - * @since 3.0.0 - * - * @param {HTMLCanvasElement} canvas - The Canvas Element. - * @param {CanvasRenderingContext2D} context - The Canvas Rendering Context. - */ - syncFont: function (canvas, context) - { - context.font = this._font; - }, - - /** - * Synchronize the text style settings to the given Canvas Rendering Context. - * - * @method Phaser.GameObjects.TextStyle#syncStyle - * @since 3.0.0 - * - * @param {HTMLCanvasElement} canvas - The Canvas Element. - * @param {CanvasRenderingContext2D} context - The Canvas Rendering Context. - */ - syncStyle: function (canvas, context) - { - context.textBaseline = 'alphabetic'; - - context.fillStyle = this.color; - context.strokeStyle = this.stroke; - - context.lineWidth = this.strokeThickness; - context.lineCap = 'round'; - context.lineJoin = 'round'; - }, - - /** - * Synchronize the shadow settings to the given Canvas Rendering Context. - * - * @method Phaser.GameObjects.TextStyle#syncShadow - * @since 3.0.0 - * - * @param {CanvasRenderingContext2D} context - The Canvas Rendering Context. - * @param {boolean} enabled - Whether shadows are enabled or not. - */ - syncShadow: function (context, enabled) - { - if (enabled) - { - context.shadowOffsetX = this.shadowOffsetX; - context.shadowOffsetY = this.shadowOffsetY; - context.shadowColor = this.shadowColor; - context.shadowBlur = this.shadowBlur; - } - else - { - context.shadowOffsetX = 0; - context.shadowOffsetY = 0; - context.shadowColor = 0; - context.shadowBlur = 0; - } - }, - - /** - * Update the style settings for the parent Text object. - * - * @method Phaser.GameObjects.TextStyle#update - * @since 3.0.0 - * - * @param {boolean} recalculateMetrics - Whether to recalculate font and text metrics. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - update: function (recalculateMetrics) - { - if (recalculateMetrics) - { - this._font = [ this.fontStyle, this.fontSize, this.fontFamily ].join(' ').trim(); - - this.metrics = MeasureText(this); - } - - return this.parent.updateText(); - }, - - /** - * Set the font. - * - * If a string is given, the font family is set. - * - * If an object is given, the `fontFamily`, `fontSize` and `fontStyle` - * properties of that object are set. - * - * @method Phaser.GameObjects.TextStyle#setFont - * @since 3.0.0 - * - * @param {(string|object)} font - The font family or font settings to set. - * @param {boolean} [updateText=true] - Whether to update the text immediately. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setFont: function (font, updateText) - { - if (updateText === undefined) { updateText = true; } - - var fontFamily = font; - var fontSize = ''; - var fontStyle = ''; - - if (typeof font !== 'string') - { - fontFamily = GetValue(font, 'fontFamily', 'Courier'); - fontSize = GetValue(font, 'fontSize', '16px'); - fontStyle = GetValue(font, 'fontStyle', ''); - } - else - { - var fontSplit = font.split(' '); - - var i = 0; - - fontStyle = (fontSplit.length > 2) ? fontSplit[i++] : ''; - fontSize = fontSplit[i++] || '16px'; - fontFamily = fontSplit[i++] || 'Courier'; - } - - if (fontFamily !== this.fontFamily || fontSize !== this.fontSize || fontStyle !== this.fontStyle) - { - this.fontFamily = fontFamily; - this.fontSize = fontSize; - this.fontStyle = fontStyle; - - if (updateText) - { - this.update(true); - } - } - - return this.parent; - }, - - /** - * Set the font family. - * - * @method Phaser.GameObjects.TextStyle#setFontFamily - * @since 3.0.0 - * - * @param {string} family - The font family. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setFontFamily: function (family) - { - if (this.fontFamily !== family) - { - this.fontFamily = family; - - this.update(true); - } - - return this.parent; - }, - - /** - * Set the font style. - * - * @method Phaser.GameObjects.TextStyle#setFontStyle - * @since 3.0.0 - * - * @param {string} style - The font style. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setFontStyle: function (style) - { - if (this.fontStyle !== style) - { - this.fontStyle = style; - - this.update(true); - } - - return this.parent; - }, - - /** - * Set the font size. - * - * @method Phaser.GameObjects.TextStyle#setFontSize - * @since 3.0.0 - * - * @param {(number|string)} size - The font size. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setFontSize: function (size) - { - if (typeof size === 'number') - { - size = size.toString() + 'px'; - } - - if (this.fontSize !== size) - { - this.fontSize = size; - - this.update(true); - } - - return this.parent; - }, - - /** - * Set the test string to use when measuring the font. - * - * @method Phaser.GameObjects.TextStyle#setTestString - * @since 3.0.0 - * - * @param {string} string - The test string to use when measuring the font. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setTestString: function (string) - { - this.testString = string; - - return this.update(true); - }, - - /** - * Set a fixed width and height for the text. - * - * Pass in `0` for either of these parameters to disable fixed width or height respectively. - * - * @method Phaser.GameObjects.TextStyle#setFixedSize - * @since 3.0.0 - * - * @param {number} width - The fixed width to set. - * @param {number} height - The fixed height to set. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setFixedSize: function (width, height) - { - this.fixedWidth = width; - this.fixedHeight = height; - - if (width) - { - this.parent.width = width; - } - - if (height) - { - this.parent.height = height; - } - - return this.update(false); - }, - - /** - * Set the background color. - * - * @method Phaser.GameObjects.TextStyle#setBackgroundColor - * @since 3.0.0 - * - * @param {string} color - The background color. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setBackgroundColor: function (color) - { - this.backgroundColor = color; - - return this.update(false); - }, - - /** - * Set the text fill color. - * - * @method Phaser.GameObjects.TextStyle#setFill - * @since 3.0.0 - * - * @param {string} color - The text fill color. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setFill: function (color) - { - this.color = color; - - return this.update(false); - }, - - /** - * Set the text fill color. - * - * @method Phaser.GameObjects.TextStyle#setColor - * @since 3.0.0 - * - * @param {string} color - The text fill color. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setColor: function (color) - { - this.color = color; - - return this.update(false); - }, - - /** - * Set the resolution used by the Text object. - * - * By default it will be set to match the resolution set in the Game Config, - * but you can override it via this method. It allows for much clearer text on High DPI devices, - * at the cost of memory because it uses larger internal Canvas textures for the Text. - * - * Please use with caution, as the more high res Text you have, the more memory it uses up. - * - * @method Phaser.GameObjects.TextStyle#setResolution - * @since 3.12.0 - * - * @param {number} value - The resolution for this Text object to use. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setResolution: function (value) - { - this.resolution = value; - - return this.update(false); - }, - - /** - * Set the stroke settings. - * - * @method Phaser.GameObjects.TextStyle#setStroke - * @since 3.0.0 - * - * @param {string} color - The stroke color. - * @param {number} thickness - The stroke thickness. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setStroke: function (color, thickness) - { - if (thickness === undefined) { thickness = this.strokeThickness; } - - if (color === undefined && this.strokeThickness !== 0) - { - // Reset the stroke to zero (disabling it) - this.strokeThickness = 0; - - this.update(true); - } - else if (this.stroke !== color || this.strokeThickness !== thickness) - { - this.stroke = color; - this.strokeThickness = thickness; - - this.update(true); - } - - return this.parent; - }, - - /** - * Set the shadow settings. - * - * Calling this method always re-measures the parent Text object, - * so only call it when you actually change the shadow settings. - * - * @method Phaser.GameObjects.TextStyle#setShadow - * @since 3.0.0 - * - * @param {number} [x=0] - The horizontal shadow offset. - * @param {number} [y=0] - The vertical shadow offset. - * @param {string} [color='#000'] - The shadow color. - * @param {number} [blur=0] - The shadow blur radius. - * @param {boolean} [shadowStroke=false] - Whether to stroke the shadow. - * @param {boolean} [shadowFill=true] - Whether to fill the shadow. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setShadow: function (x, y, color, blur, shadowStroke, shadowFill) - { - if (x === undefined) { x = 0; } - if (y === undefined) { y = 0; } - if (color === undefined) { color = '#000'; } - if (blur === undefined) { blur = 0; } - if (shadowStroke === undefined) { shadowStroke = false; } - if (shadowFill === undefined) { shadowFill = true; } - - this.shadowOffsetX = x; - this.shadowOffsetY = y; - this.shadowColor = color; - this.shadowBlur = blur; - this.shadowStroke = shadowStroke; - this.shadowFill = shadowFill; - - return this.update(false); - }, - - /** - * Set the shadow offset. - * - * @method Phaser.GameObjects.TextStyle#setShadowOffset - * @since 3.0.0 - * - * @param {number} [x=0] - The horizontal shadow offset. - * @param {number} [y=0] - The vertical shadow offset. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setShadowOffset: function (x, y) - { - if (x === undefined) { x = 0; } - if (y === undefined) { y = x; } - - this.shadowOffsetX = x; - this.shadowOffsetY = y; - - return this.update(false); - }, - - /** - * Set the shadow color. - * - * @method Phaser.GameObjects.TextStyle#setShadowColor - * @since 3.0.0 - * - * @param {string} [color='#000'] - The shadow color. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setShadowColor: function (color) - { - if (color === undefined) { color = '#000'; } - - this.shadowColor = color; - - return this.update(false); - }, - - /** - * Set the shadow blur radius. - * - * @method Phaser.GameObjects.TextStyle#setShadowBlur - * @since 3.0.0 - * - * @param {number} [blur=0] - The shadow blur radius. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setShadowBlur: function (blur) - { - if (blur === undefined) { blur = 0; } - - this.shadowBlur = blur; - - return this.update(false); - }, - - /** - * Enable or disable shadow stroke. - * - * @method Phaser.GameObjects.TextStyle#setShadowStroke - * @since 3.0.0 - * - * @param {boolean} enabled - Whether shadow stroke is enabled or not. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setShadowStroke: function (enabled) - { - this.shadowStroke = enabled; - - return this.update(false); - }, - - /** - * Enable or disable shadow fill. - * - * @method Phaser.GameObjects.TextStyle#setShadowFill - * @since 3.0.0 - * - * @param {boolean} enabled - Whether shadow fill is enabled or not. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setShadowFill: function (enabled) - { - this.shadowFill = enabled; - - return this.update(false); - }, - - /** - * Set the width (in pixels) to use for wrapping lines. - * - * Pass in null to remove wrapping by width. - * - * @method Phaser.GameObjects.TextStyle#setWordWrapWidth - * @since 3.0.0 - * - * @param {number} width - The maximum width of a line in pixels. Set to null to remove wrapping. - * @param {boolean} [useAdvancedWrap=false] - Whether or not to use the advanced wrapping - * algorithm. If true, spaces are collapsed and whitespace is trimmed from lines. If false, - * spaces and whitespace are left as is. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setWordWrapWidth: function (width, useAdvancedWrap) - { - if (useAdvancedWrap === undefined) { useAdvancedWrap = false; } - - this.wordWrapWidth = width; - this.wordWrapUseAdvanced = useAdvancedWrap; - - return this.update(false); - }, - - /** - * Set a custom callback for wrapping lines. - * - * Pass in null to remove wrapping by callback. - * - * @method Phaser.GameObjects.TextStyle#setWordWrapCallback - * @since 3.0.0 - * - * @param {TextStyleWordWrapCallback} callback - A custom function that will be responsible for wrapping the - * text. It will receive two arguments: text (the string to wrap), textObject (this Text - * instance). It should return the wrapped lines either as an array of lines or as a string with - * newline characters in place to indicate where breaks should happen. - * @param {object} [scope=null] - The scope that will be applied when the callback is invoked. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setWordWrapCallback: function (callback, scope) - { - if (scope === undefined) { scope = null; } - - this.wordWrapCallback = callback; - this.wordWrapCallbackScope = scope; - - return this.update(false); - }, - - /** - * Set the alignment of the text in this Text object. - * - * The argument can be one of: `left`, `right`, `center` or `justify`. - * - * Alignment only works if the Text object has more than one line of text. - * - * @method Phaser.GameObjects.TextStyle#setAlign - * @since 3.0.0 - * - * @param {string} [align='left'] - The text alignment for multi-line text. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setAlign: function (align) - { - if (align === undefined) { align = 'left'; } - - this.align = align; - - return this.update(false); - }, - - /** - * Set the maximum number of lines to draw. - * - * @method Phaser.GameObjects.TextStyle#setMaxLines - * @since 3.0.0 - * - * @param {integer} [max=0] - The maximum number of lines to draw. - * - * @return {Phaser.GameObjects.Text} The parent Text object. - */ - setMaxLines: function (max) - { - if (max === undefined) { max = 0; } - - this.maxLines = max; - - return this.update(false); - }, - - /** - * Get the current text metrics. - * - * @method Phaser.GameObjects.TextStyle#getTextMetrics - * @since 3.0.0 - * - * @return {Phaser.Types.GameObjects.Text.TextMetrics} The text metrics. - */ - getTextMetrics: function () - { - var metrics = this.metrics; - - return { - ascent: metrics.ascent, - descent: metrics.descent, - fontSize: metrics.fontSize - }; - }, - - /** - * Build a JSON representation of this Text Style. - * - * @method Phaser.GameObjects.TextStyle#toJSON - * @since 3.0.0 - * - * @return {object} A JSON representation of this Text Style. - */ - toJSON: function () - { - var output = {}; - - for (var key in propertyMap) - { - output[key] = this[key]; - } - - output.metrics = this.getTextMetrics(); - - return output; - }, - - /** - * Destroy this Text Style. - * - * @method Phaser.GameObjects.TextStyle#destroy - * @since 3.0.0 - */ - destroy: function () - { - this.parent = undefined; - } - -}); - -module.exports = TextStyle; - - -/***/ }), -/* 1002 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var CanvasPool = __webpack_require__(26); - -/** - * Calculates the ascent, descent and fontSize of a given font style. - * - * @function Phaser.GameObjects.Text.MeasureText - * @since 3.0.0 - * - * @param {Phaser.GameObjects.TextStyle} textStyle - The TextStyle object to measure. - * - * @return {Phaser.Types.GameObjects.Text.TextMetrics} An object containing the ascent, descent and fontSize of the TextStyle. - */ -var MeasureText = function (textStyle) -{ - // @property {HTMLCanvasElement} canvas - The canvas element that the text is rendered. - var canvas = CanvasPool.create(this); - - // @property {HTMLCanvasElement} context - The context of the canvas element that the text is rendered to. - var context = canvas.getContext('2d'); - - textStyle.syncFont(canvas, context); - - var width = Math.ceil(context.measureText(textStyle.testString).width * textStyle.baselineX); - var baseline = width; - var height = 2 * baseline; - - baseline = baseline * textStyle.baselineY | 0; - - canvas.width = width; - canvas.height = height; - - context.fillStyle = '#f00'; - context.fillRect(0, 0, width, height); - - context.font = textStyle._font; - - context.textBaseline = 'alphabetic'; - context.fillStyle = '#000'; - context.fillText(textStyle.testString, 0, baseline); - - var output = { - ascent: 0, - descent: 0, - fontSize: 0 - }; - - if (!context.getImageData(0, 0, width, height)) - { - output.ascent = baseline; - output.descent = baseline + 6; - output.fontSize = output.ascent + output.descent; - - CanvasPool.remove(canvas); - - return output; - } - - var imagedata = context.getImageData(0, 0, width, height).data; - var pixels = imagedata.length; - var line = width * 4; - var i; - var j; - var idx = 0; - var stop = false; - - // ascent. scan from top to bottom until we find a non red pixel - for (i = 0; i < baseline; i++) - { - for (j = 0; j < line; j += 4) - { - if (imagedata[idx + j] !== 255) - { - stop = true; - break; - } - } - - if (!stop) - { - idx += line; - } - else - { - break; - } - } - - output.ascent = baseline - i; - - idx = pixels - line; - stop = false; - - // descent. scan from bottom to top until we find a non red pixel - for (i = height; i > baseline; i--) - { - for (j = 0; j < line; j += 4) - { - if (imagedata[idx + j] !== 255) - { - stop = true; - break; - } - } - - if (!stop) - { - idx -= line; - } - else - { - break; - } - } - - output.descent = (i - baseline); - output.fontSize = output.ascent + output.descent; - - CanvasPool.remove(canvas); - - return output; -}; - -module.exports = MeasureText; - - -/***/ }), -/* 1003 */ +/* 1010 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156160,12 +158453,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1004); + renderWebGL = __webpack_require__(1011); } if (true) { - renderCanvas = __webpack_require__(1005); + renderCanvas = __webpack_require__(1012); } module.exports = { @@ -156177,7 +158470,7 @@ module.exports = { /***/ }), -/* 1004 */ +/* 1011 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156251,7 +158544,7 @@ module.exports = TileSpriteWebGLRenderer; /***/ }), -/* 1005 */ +/* 1012 */ /***/ (function(module, exports) { /** @@ -156286,7 +158579,7 @@ module.exports = TileSpriteCanvasRenderer; /***/ }), -/* 1006 */ +/* 1013 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156300,12 +158593,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1007); + renderWebGL = __webpack_require__(1014); } if (true) { - renderCanvas = __webpack_require__(1008); + renderCanvas = __webpack_require__(1015); } module.exports = { @@ -156317,7 +158610,7 @@ module.exports = { /***/ }), -/* 1007 */ +/* 1014 */ /***/ (function(module, exports) { /** @@ -156353,7 +158646,7 @@ module.exports = VideoWebGLRenderer; /***/ }), -/* 1008 */ +/* 1015 */ /***/ (function(module, exports) { /** @@ -156389,7 +158682,7 @@ module.exports = VideoCanvasRenderer; /***/ }), -/* 1009 */ +/* 1016 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156403,12 +158696,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1010); + renderWebGL = __webpack_require__(1017); } if (true) { - renderCanvas = __webpack_require__(1011); + renderCanvas = __webpack_require__(1018); } module.exports = { @@ -156420,7 +158713,7 @@ module.exports = { /***/ }), -/* 1010 */ +/* 1017 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156429,8 +158722,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(99); -var StrokePathWebGL = __webpack_require__(70); +var FillPathWebGL = __webpack_require__(100); +var StrokePathWebGL = __webpack_require__(72); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -156498,7 +158791,7 @@ module.exports = ArcWebGLRenderer; /***/ }), -/* 1011 */ +/* 1018 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156507,9 +158800,9 @@ module.exports = ArcWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DegToRad = __webpack_require__(40); -var FillStyleCanvas = __webpack_require__(42); -var LineStyleCanvas = __webpack_require__(50); +var DegToRad = __webpack_require__(41); +var FillStyleCanvas = __webpack_require__(43); +var LineStyleCanvas = __webpack_require__(51); var SetTransform = __webpack_require__(28); /** @@ -156574,7 +158867,7 @@ module.exports = ArcCanvasRenderer; /***/ }), -/* 1012 */ +/* 1019 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156588,12 +158881,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1013); + renderWebGL = __webpack_require__(1020); } if (true) { - renderCanvas = __webpack_require__(1014); + renderCanvas = __webpack_require__(1021); } module.exports = { @@ -156605,7 +158898,7 @@ module.exports = { /***/ }), -/* 1013 */ +/* 1020 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156614,8 +158907,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(99); -var StrokePathWebGL = __webpack_require__(70); +var FillPathWebGL = __webpack_require__(100); +var StrokePathWebGL = __webpack_require__(72); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -156683,7 +158976,7 @@ module.exports = CurveWebGLRenderer; /***/ }), -/* 1014 */ +/* 1021 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156692,8 +158985,8 @@ module.exports = CurveWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(42); -var LineStyleCanvas = __webpack_require__(50); +var FillStyleCanvas = __webpack_require__(43); +var LineStyleCanvas = __webpack_require__(51); var SetTransform = __webpack_require__(28); /** @@ -156771,7 +159064,7 @@ module.exports = CurveCanvasRenderer; /***/ }), -/* 1015 */ +/* 1022 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156785,12 +159078,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1016); + renderWebGL = __webpack_require__(1023); } if (true) { - renderCanvas = __webpack_require__(1017); + renderCanvas = __webpack_require__(1024); } module.exports = { @@ -156802,7 +159095,7 @@ module.exports = { /***/ }), -/* 1016 */ +/* 1023 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156811,8 +159104,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(99); -var StrokePathWebGL = __webpack_require__(70); +var FillPathWebGL = __webpack_require__(100); +var StrokePathWebGL = __webpack_require__(72); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -156880,7 +159173,7 @@ module.exports = EllipseWebGLRenderer; /***/ }), -/* 1017 */ +/* 1024 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156889,8 +159182,8 @@ module.exports = EllipseWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(42); -var LineStyleCanvas = __webpack_require__(50); +var FillStyleCanvas = __webpack_require__(43); +var LineStyleCanvas = __webpack_require__(51); var SetTransform = __webpack_require__(28); /** @@ -156965,7 +159258,7 @@ module.exports = EllipseCanvasRenderer; /***/ }), -/* 1018 */ +/* 1025 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156979,12 +159272,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1019); + renderWebGL = __webpack_require__(1026); } if (true) { - renderCanvas = __webpack_require__(1020); + renderCanvas = __webpack_require__(1027); } module.exports = { @@ -156996,7 +159289,7 @@ module.exports = { /***/ }), -/* 1019 */ +/* 1026 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157216,7 +159509,7 @@ module.exports = GridWebGLRenderer; /***/ }), -/* 1020 */ +/* 1027 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157225,8 +159518,8 @@ module.exports = GridWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(42); -var LineStyleCanvas = __webpack_require__(50); +var FillStyleCanvas = __webpack_require__(43); +var LineStyleCanvas = __webpack_require__(51); var SetTransform = __webpack_require__(28); /** @@ -157405,7 +159698,7 @@ module.exports = GridCanvasRenderer; /***/ }), -/* 1021 */ +/* 1028 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157419,12 +159712,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1022); + renderWebGL = __webpack_require__(1029); } if (true) { - renderCanvas = __webpack_require__(1023); + renderCanvas = __webpack_require__(1030); } module.exports = { @@ -157436,7 +159729,7 @@ module.exports = { /***/ }), -/* 1022 */ +/* 1029 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157590,7 +159883,7 @@ module.exports = IsoBoxWebGLRenderer; /***/ }), -/* 1023 */ +/* 1030 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157599,7 +159892,7 @@ module.exports = IsoBoxWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(42); +var FillStyleCanvas = __webpack_require__(43); var SetTransform = __webpack_require__(28); /** @@ -157691,7 +159984,7 @@ module.exports = IsoBoxCanvasRenderer; /***/ }), -/* 1024 */ +/* 1031 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157705,12 +159998,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1025); + renderWebGL = __webpack_require__(1032); } if (true) { - renderCanvas = __webpack_require__(1026); + renderCanvas = __webpack_require__(1033); } module.exports = { @@ -157722,7 +160015,7 @@ module.exports = { /***/ }), -/* 1025 */ +/* 1032 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157897,7 +160190,7 @@ module.exports = IsoTriangleWebGLRenderer; /***/ }), -/* 1026 */ +/* 1033 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157906,7 +160199,7 @@ module.exports = IsoTriangleWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(42); +var FillStyleCanvas = __webpack_require__(43); var SetTransform = __webpack_require__(28); /** @@ -158011,7 +160304,7 @@ module.exports = IsoTriangleCanvasRenderer; /***/ }), -/* 1027 */ +/* 1034 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158025,12 +160318,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1028); + renderWebGL = __webpack_require__(1035); } if (true) { - renderCanvas = __webpack_require__(1029); + renderCanvas = __webpack_require__(1036); } module.exports = { @@ -158042,7 +160335,7 @@ module.exports = { /***/ }), -/* 1028 */ +/* 1035 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158135,7 +160428,7 @@ module.exports = LineWebGLRenderer; /***/ }), -/* 1029 */ +/* 1036 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158144,7 +160437,7 @@ module.exports = LineWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var LineStyleCanvas = __webpack_require__(50); +var LineStyleCanvas = __webpack_require__(51); var SetTransform = __webpack_require__(28); /** @@ -158192,7 +160485,7 @@ module.exports = LineCanvasRenderer; /***/ }), -/* 1030 */ +/* 1037 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158206,12 +160499,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1031); + renderWebGL = __webpack_require__(1038); } if (true) { - renderCanvas = __webpack_require__(1032); + renderCanvas = __webpack_require__(1039); } module.exports = { @@ -158223,7 +160516,7 @@ module.exports = { /***/ }), -/* 1031 */ +/* 1038 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158232,8 +160525,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(99); -var StrokePathWebGL = __webpack_require__(70); +var FillPathWebGL = __webpack_require__(100); +var StrokePathWebGL = __webpack_require__(72); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -158301,7 +160594,7 @@ module.exports = PolygonWebGLRenderer; /***/ }), -/* 1032 */ +/* 1039 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158310,8 +160603,8 @@ module.exports = PolygonWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(42); -var LineStyleCanvas = __webpack_require__(50); +var FillStyleCanvas = __webpack_require__(43); +var LineStyleCanvas = __webpack_require__(51); var SetTransform = __webpack_require__(28); /** @@ -158386,7 +160679,7 @@ module.exports = PolygonCanvasRenderer; /***/ }), -/* 1033 */ +/* 1040 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158400,12 +160693,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1034); + renderWebGL = __webpack_require__(1041); } if (true) { - renderCanvas = __webpack_require__(1035); + renderCanvas = __webpack_require__(1042); } module.exports = { @@ -158417,7 +160710,7 @@ module.exports = { /***/ }), -/* 1034 */ +/* 1041 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158426,7 +160719,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var StrokePathWebGL = __webpack_require__(70); +var StrokePathWebGL = __webpack_require__(72); var Utils = __webpack_require__(10); /** @@ -158509,7 +160802,7 @@ module.exports = RectangleWebGLRenderer; /***/ }), -/* 1035 */ +/* 1042 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158518,8 +160811,8 @@ module.exports = RectangleWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(42); -var LineStyleCanvas = __webpack_require__(50); +var FillStyleCanvas = __webpack_require__(43); +var LineStyleCanvas = __webpack_require__(51); var SetTransform = __webpack_require__(28); /** @@ -158583,7 +160876,7 @@ module.exports = RectangleCanvasRenderer; /***/ }), -/* 1036 */ +/* 1043 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158597,12 +160890,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1037); + renderWebGL = __webpack_require__(1044); } if (true) { - renderCanvas = __webpack_require__(1038); + renderCanvas = __webpack_require__(1045); } module.exports = { @@ -158614,7 +160907,7 @@ module.exports = { /***/ }), -/* 1037 */ +/* 1044 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158623,8 +160916,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(99); -var StrokePathWebGL = __webpack_require__(70); +var FillPathWebGL = __webpack_require__(100); +var StrokePathWebGL = __webpack_require__(72); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -158692,7 +160985,7 @@ module.exports = StarWebGLRenderer; /***/ }), -/* 1038 */ +/* 1045 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158701,8 +160994,8 @@ module.exports = StarWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(42); -var LineStyleCanvas = __webpack_require__(50); +var FillStyleCanvas = __webpack_require__(43); +var LineStyleCanvas = __webpack_require__(51); var SetTransform = __webpack_require__(28); /** @@ -158777,7 +161070,7 @@ module.exports = StarCanvasRenderer; /***/ }), -/* 1039 */ +/* 1046 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158791,12 +161084,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1040); + renderWebGL = __webpack_require__(1047); } if (true) { - renderCanvas = __webpack_require__(1041); + renderCanvas = __webpack_require__(1048); } module.exports = { @@ -158808,7 +161101,7 @@ module.exports = { /***/ }), -/* 1040 */ +/* 1047 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158817,7 +161110,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var StrokePathWebGL = __webpack_require__(70); +var StrokePathWebGL = __webpack_require__(72); var Utils = __webpack_require__(10); /** @@ -158911,7 +161204,7 @@ module.exports = TriangleWebGLRenderer; /***/ }), -/* 1041 */ +/* 1048 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158920,8 +161213,8 @@ module.exports = TriangleWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(42); -var LineStyleCanvas = __webpack_require__(50); +var FillStyleCanvas = __webpack_require__(43); +var LineStyleCanvas = __webpack_require__(51); var SetTransform = __webpack_require__(28); /** @@ -158986,7 +161279,7 @@ module.exports = TriangleCanvasRenderer; /***/ }), -/* 1042 */ +/* 1049 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158995,7 +161288,7 @@ module.exports = TriangleCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Blitter = __webpack_require__(194); +var Blitter = __webpack_require__(197); var GameObjectFactory = __webpack_require__(5); /** @@ -159028,7 +161321,7 @@ GameObjectFactory.register('blitter', function (x, y, key, frame) /***/ }), -/* 1043 */ +/* 1050 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159038,7 +161331,7 @@ GameObjectFactory.register('blitter', function (x, y, key, frame) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Container = __webpack_require__(195); +var Container = __webpack_require__(198); var GameObjectFactory = __webpack_require__(5); /** @@ -159062,7 +161355,7 @@ GameObjectFactory.register('container', function (x, y, children) /***/ }), -/* 1044 */ +/* 1051 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159071,56 +161364,56 @@ GameObjectFactory.register('container', function (x, y, children) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DOMElement = __webpack_require__(395); +var DOMElement = __webpack_require__(408); var GameObjectFactory = __webpack_require__(5); /** * DOM Element Game Objects are a way to control and manipulate HTML Elements over the top of your game. - * + * * In order for DOM Elements to display you have to enable them by adding the following to your game * configuration object: - * + * * ```javascript * dom { * createContainer: true * } * ``` - * + * * When this is added, Phaser will automatically create a DOM Container div that is positioned over the top * of the game canvas. This div is sized to match the canvas, and if the canvas size changes, as a result of * settings within the Scale Manager, the dom container is resized accordingly. - * + * * You can create a DOM Element by either passing in DOMStrings, or by passing in a reference to an existing * Element that you wish to be placed under the control of Phaser. For example: - * + * * ```javascript * this.add.dom(x, y, 'div', 'background-color: lime; width: 220px; height: 100px; font: 48px Arial', 'Phaser'); * ``` - * + * * The above code will insert a div element into the DOM Container at the given x/y coordinate. The DOMString in * the 4th argument sets the initial CSS style of the div and the final argument is the inner text. In this case, * it will create a lime colored div that is 220px by 100px in size with the text Phaser in it, in an Arial font. - * + * * You should nearly always, without exception, use explicitly sized HTML Elements, in order to fully control * alignment and positioning of the elements next to regular game content. - * + * * Rather than specify the CSS and HTML directly you can use the `load.html` File Loader to load it into the * cache and then use the `createFromCache` method instead. You can also use `createFromHTML` and various other * methods available in this class to help construct your elements. - * + * * Once the element has been created you can then control it like you would any other Game Object. You can set its * position, scale, rotation, alpha and other properties. It will move as the main Scene Camera moves and be clipped * at the edge of the canvas. It's important to remember some limitations of DOM Elements: The obvious one is that * they appear above or below your game canvas. You cannot blend them into the display list, meaning you cannot have * a DOM Element, then a Sprite, then another DOM Element behind it. - * + * * They also cannot be enabled for input. To do that, you have to use the `addListener` method to add native event * listeners directly. The final limitation is to do with cameras. The DOM Container is sized to match the game canvas * entirely and clipped accordingly. DOM Elements respect camera scrolling and scrollFactor settings, but if you * change the size of the camera so it no longer matches the size of the canvas, they won't be clipped accordingly. - * + * * Also, all DOM Elements are inserted into the same DOM Container, regardless of which Scene they are created in. - * + * * DOM Elements are a powerful way to align native HTML with your Phaser Game Objects. For example, you can insert * a login form for a multiplayer game directly into your title screen. Or a text input box for a highscore table. * Or a banner ad from a 3rd party service. Or perhaps you'd like to use them for high resolution text display and @@ -159145,14 +161438,13 @@ GameObjectFactory.register('dom', function (x, y, element, style, innerText) var gameObject = new DOMElement(this.scene, x, y, element, style, innerText); this.displayList.add(gameObject); - this.updateList.add(gameObject); return gameObject; }); /***/ }), -/* 1045 */ +/* 1052 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159161,7 +161453,7 @@ GameObjectFactory.register('dom', function (x, y, element, style, innerText) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DynamicBitmapText = __webpack_require__(196); +var DynamicBitmapText = __webpack_require__(199); var GameObjectFactory = __webpack_require__(5); /** @@ -159221,7 +161513,7 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size /***/ }), -/* 1046 */ +/* 1053 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159230,7 +161522,7 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Extern = __webpack_require__(397); +var Extern = __webpack_require__(410); var GameObjectFactory = __webpack_require__(5); /** @@ -159248,7 +161540,6 @@ GameObjectFactory.register('extern', function () var extern = new Extern(this.scene); this.displayList.add(extern); - this.updateList.add(extern); return extern; }); @@ -159263,7 +161554,7 @@ GameObjectFactory.register('extern', function () /***/ }), -/* 1047 */ +/* 1054 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159272,7 +161563,7 @@ GameObjectFactory.register('extern', function () * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Graphics = __webpack_require__(197); +var Graphics = __webpack_require__(200); var GameObjectFactory = __webpack_require__(5); /** @@ -159302,7 +161593,7 @@ GameObjectFactory.register('graphics', function (config) /***/ }), -/* 1048 */ +/* 1055 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159311,7 +161602,7 @@ GameObjectFactory.register('graphics', function (config) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Group = __webpack_require__(98); +var Group = __webpack_require__(99); var GameObjectFactory = __webpack_require__(5); /** @@ -159334,7 +161625,7 @@ GameObjectFactory.register('group', function (children, config) /***/ }), -/* 1049 */ +/* 1056 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159343,7 +161634,7 @@ GameObjectFactory.register('group', function (children, config) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Image = __webpack_require__(111); +var Image = __webpack_require__(112); var GameObjectFactory = __webpack_require__(5); /** @@ -159376,7 +161667,7 @@ GameObjectFactory.register('image', function (x, y, key, frame) /***/ }), -/* 1050 */ +/* 1057 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159386,7 +161677,7 @@ GameObjectFactory.register('image', function (x, y, key, frame) */ var GameObjectFactory = __webpack_require__(5); -var ParticleEmitterManager = __webpack_require__(200); +var ParticleEmitterManager = __webpack_require__(203); /** * Creates a new Particle Emitter Manager Game Object and adds it to the Scene. @@ -159404,12 +161695,7 @@ var ParticleEmitterManager = __webpack_require__(200); */ GameObjectFactory.register('particles', function (key, frame, emitters) { - var manager = new ParticleEmitterManager(this.scene, key, frame, emitters); - - this.displayList.add(manager); - this.updateList.add(manager); - - return manager; + return this.displayList.add(new ParticleEmitterManager(this.scene, key, frame, emitters)); }); // When registering a factory function 'this' refers to the GameObjectFactory context. @@ -159422,7 +161708,7 @@ GameObjectFactory.register('particles', function (key, frame, emitters) /***/ }), -/* 1051 */ +/* 1058 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159432,7 +161718,7 @@ GameObjectFactory.register('particles', function (key, frame, emitters) */ var GameObjectFactory = __webpack_require__(5); -var PathFollower = __webpack_require__(409); +var PathFollower = __webpack_require__(423); /** * Creates a new PathFollower Game Object and adds it to the Scene. @@ -159470,7 +161756,7 @@ GameObjectFactory.register('follower', function (path, x, y, key, frame) /***/ }), -/* 1052 */ +/* 1059 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159480,7 +161766,7 @@ GameObjectFactory.register('follower', function (path, x, y, key, frame) */ var GameObjectFactory = __webpack_require__(5); -var RenderTexture = __webpack_require__(201); +var RenderTexture = __webpack_require__(204); /** * Creates a new Render Texture Game Object and adds it to the Scene. @@ -159510,7 +161796,7 @@ GameObjectFactory.register('renderTexture', function (x, y, width, height, key, /***/ }), -/* 1053 */ +/* 1060 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159519,7 +161805,7 @@ GameObjectFactory.register('renderTexture', function (x, y, width, height, key, * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Rope = __webpack_require__(203); +var Rope = __webpack_require__(206); var GameObjectFactory = __webpack_require__(5); /** @@ -159546,11 +161832,7 @@ if (true) { GameObjectFactory.register('rope', function (x, y, texture, frame, points, horizontal, colors, alphas) { - var rope = new Rope(this.scene, x, y, texture, frame, points, horizontal, colors, alphas); - - this.displayList.add(rope); - - return this.updateList.add(rope); + return this.displayList.add(new Rope(this.scene, x, y, texture, frame, points, horizontal, colors, alphas)); }); } @@ -159564,7 +161846,7 @@ if (true) /***/ }), -/* 1054 */ +/* 1061 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159574,7 +161856,7 @@ if (true) */ var GameObjectFactory = __webpack_require__(5); -var Sprite = __webpack_require__(75); +var Sprite = __webpack_require__(76); /** * Creates a new Sprite Game Object and adds it to the Scene. @@ -159596,7 +161878,6 @@ GameObjectFactory.register('sprite', function (x, y, key, frame) var sprite = new Sprite(this.scene, x, y, key, frame); this.displayList.add(sprite); - this.updateList.add(sprite); return sprite; }); @@ -159611,7 +161892,7 @@ GameObjectFactory.register('sprite', function (x, y, key, frame) /***/ }), -/* 1055 */ +/* 1062 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159620,7 +161901,7 @@ GameObjectFactory.register('sprite', function (x, y, key, frame) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(138); +var BitmapText = __webpack_require__(139); var GameObjectFactory = __webpack_require__(5); /** @@ -159675,7 +161956,7 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size, align /***/ }), -/* 1056 */ +/* 1063 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159684,7 +161965,7 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size, align * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Text = __webpack_require__(204); +var Text = __webpack_require__(207); var GameObjectFactory = __webpack_require__(5); /** @@ -159740,7 +162021,7 @@ GameObjectFactory.register('text', function (x, y, text, style) /***/ }), -/* 1057 */ +/* 1064 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159749,7 +162030,7 @@ GameObjectFactory.register('text', function (x, y, text, style) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileSprite = __webpack_require__(205); +var TileSprite = __webpack_require__(208); var GameObjectFactory = __webpack_require__(5); /** @@ -159784,7 +162065,7 @@ GameObjectFactory.register('tileSprite', function (x, y, width, height, key, fra /***/ }), -/* 1058 */ +/* 1065 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159793,7 +162074,7 @@ GameObjectFactory.register('tileSprite', function (x, y, width, height, key, fra * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Zone = __webpack_require__(114); +var Zone = __webpack_require__(115); var GameObjectFactory = __webpack_require__(5); /** @@ -159826,7 +162107,7 @@ GameObjectFactory.register('zone', function (x, y, width, height) /***/ }), -/* 1059 */ +/* 1066 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159835,7 +162116,7 @@ GameObjectFactory.register('zone', function (x, y, width, height) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Video = __webpack_require__(206); +var Video = __webpack_require__(209); var GameObjectFactory = __webpack_require__(5); /** @@ -159872,7 +162153,7 @@ GameObjectFactory.register('video', function (x, y, key) /***/ }), -/* 1060 */ +/* 1067 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159881,7 +162162,7 @@ GameObjectFactory.register('video', function (x, y, key) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Arc = __webpack_require__(410); +var Arc = __webpack_require__(427); var GameObjectFactory = __webpack_require__(5); /** @@ -159945,7 +162226,7 @@ GameObjectFactory.register('circle', function (x, y, radius, fillColor, fillAlph /***/ }), -/* 1061 */ +/* 1068 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159955,7 +162236,7 @@ GameObjectFactory.register('circle', function (x, y, radius, fillColor, fillAlph */ var GameObjectFactory = __webpack_require__(5); -var Curve = __webpack_require__(411); +var Curve = __webpack_require__(428); /** * Creates a new Curve Shape Game Object and adds it to the Scene. @@ -159995,7 +162276,7 @@ GameObjectFactory.register('curve', function (x, y, curve, fillColor, fillAlpha) /***/ }), -/* 1062 */ +/* 1069 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160004,7 +162285,7 @@ GameObjectFactory.register('curve', function (x, y, curve, fillColor, fillAlpha) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Ellipse = __webpack_require__(412); +var Ellipse = __webpack_require__(429); var GameObjectFactory = __webpack_require__(5); /** @@ -160047,7 +162328,7 @@ GameObjectFactory.register('ellipse', function (x, y, width, height, fillColor, /***/ }), -/* 1063 */ +/* 1070 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160057,7 +162338,7 @@ GameObjectFactory.register('ellipse', function (x, y, width, height, fillColor, */ var GameObjectFactory = __webpack_require__(5); -var Grid = __webpack_require__(413); +var Grid = __webpack_require__(430); /** * Creates a new Grid Shape Game Object and adds it to the Scene. @@ -160102,7 +162383,7 @@ GameObjectFactory.register('grid', function (x, y, width, height, cellWidth, cel /***/ }), -/* 1064 */ +/* 1071 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160112,7 +162393,7 @@ GameObjectFactory.register('grid', function (x, y, width, height, cellWidth, cel */ var GameObjectFactory = __webpack_require__(5); -var IsoBox = __webpack_require__(414); +var IsoBox = __webpack_require__(431); /** * Creates a new IsoBox Shape Game Object and adds it to the Scene. @@ -160153,7 +162434,7 @@ GameObjectFactory.register('isobox', function (x, y, size, height, fillTop, fill /***/ }), -/* 1065 */ +/* 1072 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160163,7 +162444,7 @@ GameObjectFactory.register('isobox', function (x, y, size, height, fillTop, fill */ var GameObjectFactory = __webpack_require__(5); -var IsoTriangle = __webpack_require__(415); +var IsoTriangle = __webpack_require__(432); /** * Creates a new IsoTriangle Shape Game Object and adds it to the Scene. @@ -160206,7 +162487,7 @@ GameObjectFactory.register('isotriangle', function (x, y, size, height, reversed /***/ }), -/* 1066 */ +/* 1073 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160216,7 +162497,7 @@ GameObjectFactory.register('isotriangle', function (x, y, size, height, reversed */ var GameObjectFactory = __webpack_require__(5); -var Line = __webpack_require__(416); +var Line = __webpack_require__(433); /** * Creates a new Line Shape Game Object and adds it to the Scene. @@ -160257,7 +162538,7 @@ GameObjectFactory.register('line', function (x, y, x1, y1, x2, y2, strokeColor, /***/ }), -/* 1067 */ +/* 1074 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160267,7 +162548,7 @@ GameObjectFactory.register('line', function (x, y, x1, y1, x2, y2, strokeColor, */ var GameObjectFactory = __webpack_require__(5); -var Polygon = __webpack_require__(417); +var Polygon = __webpack_require__(434); /** * Creates a new Polygon Shape Game Object and adds it to the Scene. @@ -160310,7 +162591,7 @@ GameObjectFactory.register('polygon', function (x, y, points, fillColor, fillAlp /***/ }), -/* 1068 */ +/* 1075 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160320,7 +162601,7 @@ GameObjectFactory.register('polygon', function (x, y, points, fillColor, fillAlp */ var GameObjectFactory = __webpack_require__(5); -var Rectangle = __webpack_require__(422); +var Rectangle = __webpack_require__(439); /** * Creates a new Rectangle Shape Game Object and adds it to the Scene. @@ -160355,7 +162636,7 @@ GameObjectFactory.register('rectangle', function (x, y, width, height, fillColor /***/ }), -/* 1069 */ +/* 1076 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160364,7 +162645,7 @@ GameObjectFactory.register('rectangle', function (x, y, width, height, fillColor * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Star = __webpack_require__(423); +var Star = __webpack_require__(440); var GameObjectFactory = __webpack_require__(5); /** @@ -160407,7 +162688,7 @@ GameObjectFactory.register('star', function (x, y, points, innerRadius, outerRad /***/ }), -/* 1070 */ +/* 1077 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160417,7 +162698,7 @@ GameObjectFactory.register('star', function (x, y, points, innerRadius, outerRad */ var GameObjectFactory = __webpack_require__(5); -var Triangle = __webpack_require__(424); +var Triangle = __webpack_require__(441); /** * Creates a new Triangle Shape Game Object and adds it to the Scene. @@ -160458,7 +162739,7 @@ GameObjectFactory.register('triangle', function (x, y, x1, y1, x2, y2, x3, y3, f /***/ }), -/* 1071 */ +/* 1078 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160467,7 +162748,7 @@ GameObjectFactory.register('triangle', function (x, y, x1, y1, x2, y2, x3, y3, f * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Blitter = __webpack_require__(194); +var Blitter = __webpack_require__(197); var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); @@ -160508,7 +162789,7 @@ GameObjectCreator.register('blitter', function (config, addToScene) /***/ }), -/* 1072 */ +/* 1079 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160519,7 +162800,7 @@ GameObjectCreator.register('blitter', function (config, addToScene) */ var BuildGameObject = __webpack_require__(27); -var Container = __webpack_require__(195); +var Container = __webpack_require__(198); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); @@ -160542,8 +162823,9 @@ GameObjectCreator.register('container', function (config, addToScene) var x = GetAdvancedValue(config, 'x', 0); var y = GetAdvancedValue(config, 'y', 0); + var children = GetAdvancedValue(config, 'children', null); - var container = new Container(this.scene, x, y); + var container = new Container(this.scene, x, y, children); if (addToScene !== undefined) { @@ -160551,13 +162833,13 @@ GameObjectCreator.register('container', function (config, addToScene) } BuildGameObject(this.scene, container, config); - + return container; }); /***/ }), -/* 1073 */ +/* 1080 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160566,7 +162848,7 @@ GameObjectCreator.register('container', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(196); +var BitmapText = __webpack_require__(199); var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); @@ -160608,7 +162890,7 @@ GameObjectCreator.register('dynamicBitmapText', function (config, addToScene) /***/ }), -/* 1074 */ +/* 1081 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160618,7 +162900,7 @@ GameObjectCreator.register('dynamicBitmapText', function (config, addToScene) */ var GameObjectCreator = __webpack_require__(16); -var Graphics = __webpack_require__(197); +var Graphics = __webpack_require__(200); /** * Creates a new Graphics Game Object and returns it. @@ -160656,7 +162938,7 @@ GameObjectCreator.register('graphics', function (config, addToScene) /***/ }), -/* 1075 */ +/* 1082 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160666,7 +162948,7 @@ GameObjectCreator.register('graphics', function (config, addToScene) */ var GameObjectCreator = __webpack_require__(16); -var Group = __webpack_require__(98); +var Group = __webpack_require__(99); /** * Creates a new Group Game Object and returns it. @@ -160689,7 +162971,7 @@ GameObjectCreator.register('group', function (config) /***/ }), -/* 1076 */ +/* 1083 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160701,7 +162983,7 @@ GameObjectCreator.register('group', function (config) var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Image = __webpack_require__(111); +var Image = __webpack_require__(112); /** * Creates a new Image Game Object and returns it. @@ -160739,7 +163021,7 @@ GameObjectCreator.register('image', function (config, addToScene) /***/ }), -/* 1077 */ +/* 1084 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160751,7 +163033,7 @@ GameObjectCreator.register('image', function (config, addToScene) var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); var GetFastValue = __webpack_require__(2); -var ParticleEmitterManager = __webpack_require__(200); +var ParticleEmitterManager = __webpack_require__(203); /** * Creates a new Particle Emitter Manager Game Object and returns it. @@ -160789,14 +163071,12 @@ GameObjectCreator.register('particles', function (config, addToScene) this.displayList.add(manager); } - this.updateList.add(manager); - return manager; }); /***/ }), -/* 1078 */ +/* 1085 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160808,7 +163088,7 @@ GameObjectCreator.register('particles', function (config, addToScene) var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var RenderTexture = __webpack_require__(201); +var RenderTexture = __webpack_require__(204); /** * Creates a new Render Texture Game Object and returns it. @@ -160848,7 +163128,7 @@ GameObjectCreator.register('renderTexture', function (config, addToScene) /***/ }), -/* 1079 */ +/* 1086 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160861,7 +163141,7 @@ var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); var GetValue = __webpack_require__(6); -var Rope = __webpack_require__(203); +var Rope = __webpack_require__(206); /** * Creates a new Rope Game Object and returns it. @@ -160903,7 +163183,7 @@ GameObjectCreator.register('rope', function (config, addToScene) /***/ }), -/* 1080 */ +/* 1087 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160913,10 +163193,10 @@ GameObjectCreator.register('rope', function (config, addToScene) */ var BuildGameObject = __webpack_require__(27); -var BuildGameObjectAnimation = __webpack_require__(393); +var BuildGameObjectAnimation = __webpack_require__(405); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Sprite = __webpack_require__(75); +var Sprite = __webpack_require__(76); /** * Creates a new Sprite Game Object and returns it. @@ -160956,7 +163236,7 @@ GameObjectCreator.register('sprite', function (config, addToScene) /***/ }), -/* 1081 */ +/* 1088 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160965,7 +163245,7 @@ GameObjectCreator.register('sprite', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(138); +var BitmapText = __webpack_require__(139); var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); @@ -161009,7 +163289,7 @@ GameObjectCreator.register('bitmapText', function (config, addToScene) /***/ }), -/* 1082 */ +/* 1089 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161021,7 +163301,7 @@ GameObjectCreator.register('bitmapText', function (config, addToScene) var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Text = __webpack_require__(204); +var Text = __webpack_require__(207); /** * Creates a new Text Game Object and returns it. @@ -161096,7 +163376,7 @@ GameObjectCreator.register('text', function (config, addToScene) /***/ }), -/* 1083 */ +/* 1090 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161108,7 +163388,7 @@ GameObjectCreator.register('text', function (config, addToScene) var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var TileSprite = __webpack_require__(205); +var TileSprite = __webpack_require__(208); /** * Creates a new TileSprite Game Object and returns it. @@ -161148,7 +163428,7 @@ GameObjectCreator.register('tileSprite', function (config, addToScene) /***/ }), -/* 1084 */ +/* 1091 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161159,7 +163439,7 @@ GameObjectCreator.register('tileSprite', function (config, addToScene) var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Zone = __webpack_require__(114); +var Zone = __webpack_require__(115); /** * Creates a new Zone Game Object and returns it. @@ -161187,7 +163467,7 @@ GameObjectCreator.register('zone', function (config) /***/ }), -/* 1085 */ +/* 1092 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161199,7 +163479,7 @@ GameObjectCreator.register('zone', function (config) var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Video = __webpack_require__(206); +var Video = __webpack_require__(209); /** * Creates a new Video Game Object and returns it. @@ -161236,7 +163516,7 @@ GameObjectCreator.register('video', function (config, addToScene) /***/ }), -/* 1086 */ +/* 1093 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161250,12 +163530,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1087); + renderWebGL = __webpack_require__(1094); } if (true) { - renderCanvas = __webpack_require__(1088); + renderCanvas = __webpack_require__(1095); } module.exports = { @@ -161267,7 +163547,7 @@ module.exports = { /***/ }), -/* 1087 */ +/* 1094 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161383,7 +163663,7 @@ module.exports = MeshWebGLRenderer; /***/ }), -/* 1088 */ +/* 1095 */ /***/ (function(module, exports) { /** @@ -161412,7 +163692,7 @@ module.exports = MeshCanvasRenderer; /***/ }), -/* 1089 */ +/* 1096 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161426,12 +163706,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1090); + renderWebGL = __webpack_require__(1097); } if (true) { - renderCanvas = __webpack_require__(1091); + renderCanvas = __webpack_require__(1098); } module.exports = { @@ -161443,7 +163723,7 @@ module.exports = { /***/ }), -/* 1090 */ +/* 1097 */ /***/ (function(module, exports) { /** @@ -161527,7 +163807,7 @@ module.exports = ShaderWebGLRenderer; /***/ }), -/* 1091 */ +/* 1098 */ /***/ (function(module, exports) { /** @@ -161556,7 +163836,7 @@ module.exports = ShaderCanvasRenderer; /***/ }), -/* 1092 */ +/* 1099 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161565,7 +163845,7 @@ module.exports = ShaderCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Mesh = __webpack_require__(140); +var Mesh = __webpack_require__(141); var GameObjectFactory = __webpack_require__(5); /** @@ -161606,7 +163886,7 @@ if (true) /***/ }), -/* 1093 */ +/* 1100 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161615,7 +163895,7 @@ if (true) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Quad = __webpack_require__(209); +var Quad = __webpack_require__(212); var GameObjectFactory = __webpack_require__(5); /** @@ -161652,7 +163932,7 @@ if (true) /***/ }), -/* 1094 */ +/* 1101 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161661,7 +163941,7 @@ if (true) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Shader = __webpack_require__(210); +var Shader = __webpack_require__(213); var GameObjectFactory = __webpack_require__(5); /** @@ -161693,7 +163973,7 @@ if (true) /***/ }), -/* 1095 */ +/* 1102 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161706,7 +163986,7 @@ var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); var GetValue = __webpack_require__(6); -var Mesh = __webpack_require__(140); +var Mesh = __webpack_require__(141); /** * Creates a new Mesh Game Object and returns it. @@ -161748,7 +164028,7 @@ GameObjectCreator.register('mesh', function (config, addToScene) /***/ }), -/* 1096 */ +/* 1103 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161760,7 +164040,7 @@ GameObjectCreator.register('mesh', function (config, addToScene) var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Quad = __webpack_require__(209); +var Quad = __webpack_require__(212); /** * Creates a new Quad Game Object and returns it. @@ -161798,7 +164078,7 @@ GameObjectCreator.register('quad', function (config, addToScene) /***/ }), -/* 1097 */ +/* 1104 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161810,7 +164090,7 @@ GameObjectCreator.register('quad', function (config, addToScene) var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Shader = __webpack_require__(210); +var Shader = __webpack_require__(213); /** * Creates a new Shader Game Object and returns it. @@ -161851,7 +164131,7 @@ GameObjectCreator.register('shader', function (config, addToScene) /***/ }), -/* 1098 */ +/* 1105 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161861,9 +164141,9 @@ GameObjectCreator.register('shader', function (config, addToScene) */ var Class = __webpack_require__(0); -var LightsManager = __webpack_require__(429); +var LightsManager = __webpack_require__(446); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(22); +var SceneEvents = __webpack_require__(20); /** * @classdesc @@ -161967,7 +164247,7 @@ module.exports = LightsPlugin; /***/ }), -/* 1099 */ +/* 1106 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161976,29 +164256,29 @@ module.exports = LightsPlugin; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circle = __webpack_require__(65); +var Circle = __webpack_require__(68); -Circle.Area = __webpack_require__(1100); -Circle.Circumference = __webpack_require__(272); -Circle.CircumferencePoint = __webpack_require__(154); -Circle.Clone = __webpack_require__(1101); -Circle.Contains = __webpack_require__(56); -Circle.ContainsPoint = __webpack_require__(1102); -Circle.ContainsRect = __webpack_require__(1103); -Circle.CopyFrom = __webpack_require__(1104); -Circle.Equals = __webpack_require__(1105); -Circle.GetBounds = __webpack_require__(1106); -Circle.GetPoint = __webpack_require__(270); -Circle.GetPoints = __webpack_require__(271); -Circle.Offset = __webpack_require__(1107); -Circle.OffsetPoint = __webpack_require__(1108); -Circle.Random = __webpack_require__(155); +Circle.Area = __webpack_require__(1107); +Circle.Circumference = __webpack_require__(278); +Circle.CircumferencePoint = __webpack_require__(157); +Circle.Clone = __webpack_require__(1108); +Circle.Contains = __webpack_require__(57); +Circle.ContainsPoint = __webpack_require__(1109); +Circle.ContainsRect = __webpack_require__(1110); +Circle.CopyFrom = __webpack_require__(1111); +Circle.Equals = __webpack_require__(1112); +Circle.GetBounds = __webpack_require__(1113); +Circle.GetPoint = __webpack_require__(276); +Circle.GetPoints = __webpack_require__(277); +Circle.Offset = __webpack_require__(1114); +Circle.OffsetPoint = __webpack_require__(1115); +Circle.Random = __webpack_require__(158); module.exports = Circle; /***/ }), -/* 1100 */ +/* 1107 */ /***/ (function(module, exports) { /** @@ -162026,7 +164306,7 @@ module.exports = Area; /***/ }), -/* 1101 */ +/* 1108 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162035,7 +164315,7 @@ module.exports = Area; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circle = __webpack_require__(65); +var Circle = __webpack_require__(68); /** * Creates a new Circle instance based on the values contained in the given source. @@ -162056,7 +164336,7 @@ module.exports = Clone; /***/ }), -/* 1102 */ +/* 1109 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162065,7 +164345,7 @@ module.exports = Clone; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(56); +var Contains = __webpack_require__(57); /** * Check to see if the Circle contains the given Point object. @@ -162087,7 +164367,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1103 */ +/* 1110 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162096,7 +164376,7 @@ module.exports = ContainsPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(56); +var Contains = __webpack_require__(57); /** * Check to see if the Circle contains all four points of the given Rectangle object. @@ -162123,7 +164403,7 @@ module.exports = ContainsRect; /***/ }), -/* 1104 */ +/* 1111 */ /***/ (function(module, exports) { /** @@ -162155,7 +164435,7 @@ module.exports = CopyFrom; /***/ }), -/* 1105 */ +/* 1112 */ /***/ (function(module, exports) { /** @@ -162189,7 +164469,7 @@ module.exports = Equals; /***/ }), -/* 1106 */ +/* 1113 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162229,7 +164509,7 @@ module.exports = GetBounds; /***/ }), -/* 1107 */ +/* 1114 */ /***/ (function(module, exports) { /** @@ -162264,7 +164544,7 @@ module.exports = Offset; /***/ }), -/* 1108 */ +/* 1115 */ /***/ (function(module, exports) { /** @@ -162298,7 +164578,7 @@ module.exports = OffsetPoint; /***/ }), -/* 1109 */ +/* 1116 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162307,29 +164587,29 @@ module.exports = OffsetPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Ellipse = __webpack_require__(96); +var Ellipse = __webpack_require__(97); -Ellipse.Area = __webpack_require__(1110); -Ellipse.Circumference = __webpack_require__(400); -Ellipse.CircumferencePoint = __webpack_require__(199); -Ellipse.Clone = __webpack_require__(1111); -Ellipse.Contains = __webpack_require__(97); -Ellipse.ContainsPoint = __webpack_require__(1112); -Ellipse.ContainsRect = __webpack_require__(1113); -Ellipse.CopyFrom = __webpack_require__(1114); -Ellipse.Equals = __webpack_require__(1115); -Ellipse.GetBounds = __webpack_require__(1116); -Ellipse.GetPoint = __webpack_require__(398); -Ellipse.GetPoints = __webpack_require__(399); -Ellipse.Offset = __webpack_require__(1117); -Ellipse.OffsetPoint = __webpack_require__(1118); -Ellipse.Random = __webpack_require__(163); +Ellipse.Area = __webpack_require__(1117); +Ellipse.Circumference = __webpack_require__(413); +Ellipse.CircumferencePoint = __webpack_require__(202); +Ellipse.Clone = __webpack_require__(1118); +Ellipse.Contains = __webpack_require__(98); +Ellipse.ContainsPoint = __webpack_require__(1119); +Ellipse.ContainsRect = __webpack_require__(1120); +Ellipse.CopyFrom = __webpack_require__(1121); +Ellipse.Equals = __webpack_require__(1122); +Ellipse.GetBounds = __webpack_require__(1123); +Ellipse.GetPoint = __webpack_require__(411); +Ellipse.GetPoints = __webpack_require__(412); +Ellipse.Offset = __webpack_require__(1124); +Ellipse.OffsetPoint = __webpack_require__(1125); +Ellipse.Random = __webpack_require__(165); module.exports = Ellipse; /***/ }), -/* 1110 */ +/* 1117 */ /***/ (function(module, exports) { /** @@ -162363,7 +164643,7 @@ module.exports = Area; /***/ }), -/* 1111 */ +/* 1118 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162372,7 +164652,7 @@ module.exports = Area; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Ellipse = __webpack_require__(96); +var Ellipse = __webpack_require__(97); /** * Creates a new Ellipse instance based on the values contained in the given source. @@ -162393,7 +164673,7 @@ module.exports = Clone; /***/ }), -/* 1112 */ +/* 1119 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162402,7 +164682,7 @@ module.exports = Clone; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(97); +var Contains = __webpack_require__(98); /** * Check to see if the Ellipse contains the given Point object. @@ -162424,7 +164704,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1113 */ +/* 1120 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162433,7 +164713,7 @@ module.exports = ContainsPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(97); +var Contains = __webpack_require__(98); /** * Check to see if the Ellipse contains all four points of the given Rectangle object. @@ -162460,7 +164740,7 @@ module.exports = ContainsRect; /***/ }), -/* 1114 */ +/* 1121 */ /***/ (function(module, exports) { /** @@ -162492,7 +164772,7 @@ module.exports = CopyFrom; /***/ }), -/* 1115 */ +/* 1122 */ /***/ (function(module, exports) { /** @@ -162527,7 +164807,7 @@ module.exports = Equals; /***/ }), -/* 1116 */ +/* 1123 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162567,7 +164847,7 @@ module.exports = GetBounds; /***/ }), -/* 1117 */ +/* 1124 */ /***/ (function(module, exports) { /** @@ -162602,7 +164882,7 @@ module.exports = Offset; /***/ }), -/* 1118 */ +/* 1125 */ /***/ (function(module, exports) { /** @@ -162636,7 +164916,7 @@ module.exports = OffsetPoint; /***/ }), -/* 1119 */ +/* 1126 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162647,7 +164927,7 @@ module.exports = OffsetPoint; */ var Point = __webpack_require__(4); -var CircleToCircle = __webpack_require__(211); +var CircleToCircle = __webpack_require__(214); /** * Checks if two Circles intersect and returns the intersection points as a Point object array. @@ -162730,7 +165010,7 @@ module.exports = GetCircleToCircle; /***/ }), -/* 1120 */ +/* 1127 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162740,8 +165020,8 @@ module.exports = GetCircleToCircle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLineToCircle = __webpack_require__(213); -var CircleToRectangle = __webpack_require__(212); +var GetLineToCircle = __webpack_require__(216); +var CircleToRectangle = __webpack_require__(215); /** * Checks for intersection between a circle and a rectangle, @@ -162780,7 +165060,7 @@ module.exports = GetCircleToRectangle; /***/ }), -/* 1121 */ +/* 1128 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162789,9 +165069,9 @@ module.exports = GetCircleToRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector4 = __webpack_require__(126); -var GetLineToPolygon = __webpack_require__(434); -var Line = __webpack_require__(39); +var Vector4 = __webpack_require__(128); +var GetLineToPolygon = __webpack_require__(451); +var Line = __webpack_require__(40); // Temp calculation segment var segment = new Line(); @@ -162882,7 +165162,7 @@ module.exports = GetRaysFromPointToPolygon; /***/ }), -/* 1122 */ +/* 1129 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162892,7 +165172,7 @@ module.exports = GetRaysFromPointToPolygon; */ var Rectangle = __webpack_require__(9); -var RectangleToRectangle = __webpack_require__(141); +var RectangleToRectangle = __webpack_require__(142); /** * Checks if two Rectangle shapes intersect and returns the area of this intersection as Rectangle object. @@ -162931,7 +165211,7 @@ module.exports = GetRectangleIntersection; /***/ }), -/* 1123 */ +/* 1130 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162941,8 +165221,8 @@ module.exports = GetRectangleIntersection; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLineToRectangle = __webpack_require__(215); -var RectangleToRectangle = __webpack_require__(141); +var GetLineToRectangle = __webpack_require__(218); +var RectangleToRectangle = __webpack_require__(142); /** * Checks if two Rectangles intersect and returns the intersection points as a Point object array. @@ -162982,7 +165262,7 @@ module.exports = GetRectangleToRectangle; /***/ }), -/* 1124 */ +/* 1131 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162992,8 +165272,8 @@ module.exports = GetRectangleToRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RectangleToTriangle = __webpack_require__(436); -var GetLineToRectangle = __webpack_require__(215); +var RectangleToTriangle = __webpack_require__(453); +var GetLineToRectangle = __webpack_require__(218); /** * Checks for intersection between Rectangle shape and Triangle shape, @@ -163030,7 +165310,7 @@ module.exports = GetRectangleToTriangle; /***/ }), -/* 1125 */ +/* 1132 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163040,8 +165320,8 @@ module.exports = GetRectangleToTriangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLineToCircle = __webpack_require__(213); -var TriangleToCircle = __webpack_require__(438); +var GetLineToCircle = __webpack_require__(216); +var TriangleToCircle = __webpack_require__(455); /** * Checks if a Triangle and a Circle intersect, and returns the intersection points as a Point object array. @@ -163079,7 +165359,7 @@ module.exports = GetTriangleToCircle; /***/ }), -/* 1126 */ +/* 1133 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163089,8 +165369,8 @@ module.exports = GetTriangleToCircle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TriangleToTriangle = __webpack_require__(441); -var GetTriangleToLine = __webpack_require__(439); +var TriangleToTriangle = __webpack_require__(458); +var GetTriangleToLine = __webpack_require__(456); /** * Checks if two Triangles intersect, and returns the intersection points as a Point object array. @@ -163128,7 +165408,7 @@ module.exports = GetTriangleToTriangle; /***/ }), -/* 1127 */ +/* 1134 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163137,7 +165417,7 @@ module.exports = GetTriangleToTriangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PointToLine = __webpack_require__(443); +var PointToLine = __webpack_require__(460); /** * Checks if a Point is located on the given line segment. @@ -163169,7 +165449,7 @@ module.exports = PointToLineSegment; /***/ }), -/* 1128 */ +/* 1135 */ /***/ (function(module, exports) { /** @@ -163209,7 +165489,7 @@ module.exports = RectangleToValues; /***/ }), -/* 1129 */ +/* 1136 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163218,43 +165498,43 @@ module.exports = RectangleToValues; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Line = __webpack_require__(39); +var Line = __webpack_require__(40); -Line.Angle = __webpack_require__(86); -Line.BresenhamPoints = __webpack_require__(292); -Line.CenterOn = __webpack_require__(1130); -Line.Clone = __webpack_require__(1131); -Line.CopyFrom = __webpack_require__(1132); -Line.Equals = __webpack_require__(1133); -Line.Extend = __webpack_require__(1134); -Line.GetEasedPoints = __webpack_require__(1135); -Line.GetMidPoint = __webpack_require__(1136); -Line.GetNearestPoint = __webpack_require__(1137); -Line.GetNormal = __webpack_require__(1138); -Line.GetPoint = __webpack_require__(279); -Line.GetPoints = __webpack_require__(158); -Line.GetShortestDistance = __webpack_require__(1139); -Line.Height = __webpack_require__(1140); -Line.Length = __webpack_require__(57); -Line.NormalAngle = __webpack_require__(444); -Line.NormalX = __webpack_require__(1141); -Line.NormalY = __webpack_require__(1142); -Line.Offset = __webpack_require__(1143); -Line.PerpSlope = __webpack_require__(1144); -Line.Random = __webpack_require__(159); -Line.ReflectAngle = __webpack_require__(1145); -Line.Rotate = __webpack_require__(1146); -Line.RotateAroundPoint = __webpack_require__(1147); -Line.RotateAroundXY = __webpack_require__(217); -Line.SetToAngle = __webpack_require__(1148); -Line.Slope = __webpack_require__(1149); -Line.Width = __webpack_require__(1150); +Line.Angle = __webpack_require__(87); +Line.BresenhamPoints = __webpack_require__(296); +Line.CenterOn = __webpack_require__(1137); +Line.Clone = __webpack_require__(1138); +Line.CopyFrom = __webpack_require__(1139); +Line.Equals = __webpack_require__(1140); +Line.Extend = __webpack_require__(1141); +Line.GetEasedPoints = __webpack_require__(1142); +Line.GetMidPoint = __webpack_require__(1143); +Line.GetNearestPoint = __webpack_require__(1144); +Line.GetNormal = __webpack_require__(1145); +Line.GetPoint = __webpack_require__(283); +Line.GetPoints = __webpack_require__(160); +Line.GetShortestDistance = __webpack_require__(1146); +Line.Height = __webpack_require__(1147); +Line.Length = __webpack_require__(58); +Line.NormalAngle = __webpack_require__(461); +Line.NormalX = __webpack_require__(1148); +Line.NormalY = __webpack_require__(1149); +Line.Offset = __webpack_require__(1150); +Line.PerpSlope = __webpack_require__(1151); +Line.Random = __webpack_require__(161); +Line.ReflectAngle = __webpack_require__(1152); +Line.Rotate = __webpack_require__(1153); +Line.RotateAroundPoint = __webpack_require__(1154); +Line.RotateAroundXY = __webpack_require__(220); +Line.SetToAngle = __webpack_require__(1155); +Line.Slope = __webpack_require__(1156); +Line.Width = __webpack_require__(1157); module.exports = Line; /***/ }), -/* 1130 */ +/* 1137 */ /***/ (function(module, exports) { /** @@ -163294,7 +165574,7 @@ module.exports = CenterOn; /***/ }), -/* 1131 */ +/* 1138 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163303,7 +165583,7 @@ module.exports = CenterOn; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Line = __webpack_require__(39); +var Line = __webpack_require__(40); /** * Clone the given line. @@ -163324,7 +165604,7 @@ module.exports = Clone; /***/ }), -/* 1132 */ +/* 1139 */ /***/ (function(module, exports) { /** @@ -163355,7 +165635,7 @@ module.exports = CopyFrom; /***/ }), -/* 1133 */ +/* 1140 */ /***/ (function(module, exports) { /** @@ -163389,7 +165669,7 @@ module.exports = Equals; /***/ }), -/* 1134 */ +/* 1141 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163398,7 +165678,7 @@ module.exports = Equals; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Length = __webpack_require__(57); +var Length = __webpack_require__(58); /** * Extends the start and end points of a Line by the given amounts. @@ -163447,7 +165727,7 @@ module.exports = Extend; /***/ }), -/* 1135 */ +/* 1142 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163456,8 +165736,8 @@ module.exports = Extend; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DistanceBetweenPoints = __webpack_require__(324); -var GetEaseFunction = __webpack_require__(69); +var DistanceBetweenPoints = __webpack_require__(332); +var GetEaseFunction = __webpack_require__(71); var Point = __webpack_require__(4); /** @@ -163567,7 +165847,7 @@ module.exports = GetEasedPoints; /***/ }), -/* 1136 */ +/* 1143 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163605,7 +165885,7 @@ module.exports = GetMidPoint; /***/ }), -/* 1137 */ +/* 1144 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163660,7 +165940,7 @@ module.exports = GetNearestPoint; /***/ }), -/* 1138 */ +/* 1145 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163670,7 +165950,7 @@ module.exports = GetNearestPoint; */ var MATH_CONST = __webpack_require__(13); -var Angle = __webpack_require__(86); +var Angle = __webpack_require__(87); var Point = __webpack_require__(4); /** @@ -163704,7 +165984,7 @@ module.exports = GetNormal; /***/ }), -/* 1139 */ +/* 1146 */ /***/ (function(module, exports) { /** @@ -163751,7 +166031,7 @@ module.exports = GetShortestDistance; /***/ }), -/* 1140 */ +/* 1147 */ /***/ (function(module, exports) { /** @@ -163779,7 +166059,7 @@ module.exports = Height; /***/ }), -/* 1141 */ +/* 1148 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163789,7 +166069,7 @@ module.exports = Height; */ var MATH_CONST = __webpack_require__(13); -var Angle = __webpack_require__(86); +var Angle = __webpack_require__(87); /** * Returns the x component of the normal vector of the given line. @@ -163810,7 +166090,7 @@ module.exports = NormalX; /***/ }), -/* 1142 */ +/* 1149 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163820,7 +166100,7 @@ module.exports = NormalX; */ var MATH_CONST = __webpack_require__(13); -var Angle = __webpack_require__(86); +var Angle = __webpack_require__(87); /** * The Y value of the normal of the given line. @@ -163842,7 +166122,7 @@ module.exports = NormalY; /***/ }), -/* 1143 */ +/* 1150 */ /***/ (function(module, exports) { /** @@ -163880,7 +166160,7 @@ module.exports = Offset; /***/ }), -/* 1144 */ +/* 1151 */ /***/ (function(module, exports) { /** @@ -163908,7 +166188,7 @@ module.exports = PerpSlope; /***/ }), -/* 1145 */ +/* 1152 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163917,8 +166197,8 @@ module.exports = PerpSlope; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Angle = __webpack_require__(86); -var NormalAngle = __webpack_require__(444); +var Angle = __webpack_require__(87); +var NormalAngle = __webpack_require__(461); /** * Calculate the reflected angle between two lines. @@ -163942,7 +166222,7 @@ module.exports = ReflectAngle; /***/ }), -/* 1146 */ +/* 1153 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163951,7 +166231,7 @@ module.exports = ReflectAngle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(217); +var RotateAroundXY = __webpack_require__(220); /** * Rotate a line around its midpoint by the given angle in radians. @@ -163978,7 +166258,7 @@ module.exports = Rotate; /***/ }), -/* 1147 */ +/* 1154 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163987,7 +166267,7 @@ module.exports = Rotate; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(217); +var RotateAroundXY = __webpack_require__(220); /** * Rotate a line around a point by the given angle in radians. @@ -164012,7 +166292,7 @@ module.exports = RotateAroundPoint; /***/ }), -/* 1148 */ +/* 1155 */ /***/ (function(module, exports) { /** @@ -164052,7 +166332,7 @@ module.exports = SetToAngle; /***/ }), -/* 1149 */ +/* 1156 */ /***/ (function(module, exports) { /** @@ -164080,7 +166360,7 @@ module.exports = Slope; /***/ }), -/* 1150 */ +/* 1157 */ /***/ (function(module, exports) { /** @@ -164108,7 +166388,7 @@ module.exports = Width; /***/ }), -/* 1151 */ +/* 1158 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164119,27 +166399,27 @@ module.exports = Width; var Point = __webpack_require__(4); -Point.Ceil = __webpack_require__(1152); -Point.Clone = __webpack_require__(1153); -Point.CopyFrom = __webpack_require__(1154); -Point.Equals = __webpack_require__(1155); -Point.Floor = __webpack_require__(1156); -Point.GetCentroid = __webpack_require__(1157); -Point.GetMagnitude = __webpack_require__(445); -Point.GetMagnitudeSq = __webpack_require__(446); -Point.GetRectangleFromPoints = __webpack_require__(1158); -Point.Interpolate = __webpack_require__(1159); -Point.Invert = __webpack_require__(1160); -Point.Negative = __webpack_require__(1161); -Point.Project = __webpack_require__(1162); -Point.ProjectUnit = __webpack_require__(1163); -Point.SetMagnitude = __webpack_require__(1164); +Point.Ceil = __webpack_require__(1159); +Point.Clone = __webpack_require__(1160); +Point.CopyFrom = __webpack_require__(1161); +Point.Equals = __webpack_require__(1162); +Point.Floor = __webpack_require__(1163); +Point.GetCentroid = __webpack_require__(1164); +Point.GetMagnitude = __webpack_require__(462); +Point.GetMagnitudeSq = __webpack_require__(463); +Point.GetRectangleFromPoints = __webpack_require__(1165); +Point.Interpolate = __webpack_require__(1166); +Point.Invert = __webpack_require__(1167); +Point.Negative = __webpack_require__(1168); +Point.Project = __webpack_require__(1169); +Point.ProjectUnit = __webpack_require__(1170); +Point.SetMagnitude = __webpack_require__(1171); module.exports = Point; /***/ }), -/* 1152 */ +/* 1159 */ /***/ (function(module, exports) { /** @@ -164169,7 +166449,7 @@ module.exports = Ceil; /***/ }), -/* 1153 */ +/* 1160 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164199,7 +166479,7 @@ module.exports = Clone; /***/ }), -/* 1154 */ +/* 1161 */ /***/ (function(module, exports) { /** @@ -164230,7 +166510,7 @@ module.exports = CopyFrom; /***/ }), -/* 1155 */ +/* 1162 */ /***/ (function(module, exports) { /** @@ -164259,7 +166539,7 @@ module.exports = Equals; /***/ }), -/* 1156 */ +/* 1163 */ /***/ (function(module, exports) { /** @@ -164289,7 +166569,7 @@ module.exports = Floor; /***/ }), -/* 1157 */ +/* 1164 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164353,7 +166633,7 @@ module.exports = GetCentroid; /***/ }), -/* 1158 */ +/* 1165 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164423,7 +166703,7 @@ module.exports = GetRectangleFromPoints; /***/ }), -/* 1159 */ +/* 1166 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164464,7 +166744,7 @@ module.exports = Interpolate; /***/ }), -/* 1160 */ +/* 1167 */ /***/ (function(module, exports) { /** @@ -164494,7 +166774,7 @@ module.exports = Invert; /***/ }), -/* 1161 */ +/* 1168 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164529,7 +166809,7 @@ module.exports = Negative; /***/ }), -/* 1162 */ +/* 1169 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164539,7 +166819,7 @@ module.exports = Negative; */ var Point = __webpack_require__(4); -var GetMagnitudeSq = __webpack_require__(446); +var GetMagnitudeSq = __webpack_require__(463); /** * Calculates the vector projection of `pointA` onto the nonzero `pointB`. This is the @@ -164576,7 +166856,7 @@ module.exports = Project; /***/ }), -/* 1163 */ +/* 1170 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164621,7 +166901,7 @@ module.exports = ProjectUnit; /***/ }), -/* 1164 */ +/* 1171 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164630,7 +166910,7 @@ module.exports = ProjectUnit; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetMagnitude = __webpack_require__(445); +var GetMagnitude = __webpack_require__(462); /** * Changes the magnitude (length) of a two-dimensional vector without changing its direction. @@ -164665,7 +166945,7 @@ module.exports = SetMagnitude; /***/ }), -/* 1165 */ +/* 1172 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164674,25 +166954,26 @@ module.exports = SetMagnitude; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Polygon = __webpack_require__(207); +var Polygon = __webpack_require__(210); -Polygon.Clone = __webpack_require__(1166); -Polygon.Contains = __webpack_require__(208); -Polygon.ContainsPoint = __webpack_require__(1167); -Polygon.GetAABB = __webpack_require__(418); -Polygon.GetNumberArray = __webpack_require__(1168); -Polygon.GetPoints = __webpack_require__(419); -Polygon.Perimeter = __webpack_require__(420); -Polygon.Reverse = __webpack_require__(1169); -Polygon.Simplify = __webpack_require__(1170); -Polygon.Smooth = __webpack_require__(421); -Polygon.Translate = __webpack_require__(1171); +Polygon.Clone = __webpack_require__(1173); +Polygon.Contains = __webpack_require__(211); +Polygon.ContainsPoint = __webpack_require__(1174); +Polygon.Earcut = __webpack_require__(60); +Polygon.GetAABB = __webpack_require__(435); +Polygon.GetNumberArray = __webpack_require__(1175); +Polygon.GetPoints = __webpack_require__(436); +Polygon.Perimeter = __webpack_require__(437); +Polygon.Reverse = __webpack_require__(1176); +Polygon.Simplify = __webpack_require__(1177); +Polygon.Smooth = __webpack_require__(438); +Polygon.Translate = __webpack_require__(1178); module.exports = Polygon; /***/ }), -/* 1166 */ +/* 1173 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164701,7 +166982,7 @@ module.exports = Polygon; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Polygon = __webpack_require__(207); +var Polygon = __webpack_require__(210); /** * Create a new polygon which is a copy of the specified polygon @@ -164722,7 +167003,7 @@ module.exports = Clone; /***/ }), -/* 1167 */ +/* 1174 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164731,7 +167012,7 @@ module.exports = Clone; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(208); +var Contains = __webpack_require__(211); /** * Checks the given Point again the Polygon to see if the Point lays within its vertices. @@ -164753,7 +167034,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1168 */ +/* 1175 */ /***/ (function(module, exports) { /** @@ -164796,7 +167077,7 @@ module.exports = GetNumberArray; /***/ }), -/* 1169 */ +/* 1176 */ /***/ (function(module, exports) { /** @@ -164828,7 +167109,7 @@ module.exports = Reverse; /***/ }), -/* 1170 */ +/* 1177 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -165038,7 +167319,7 @@ module.exports = Simplify; /***/ }), -/* 1171 */ +/* 1178 */ /***/ (function(module, exports) { /** @@ -165078,7 +167359,7 @@ module.exports = Translate; /***/ }), -/* 1172 */ +/* 1179 */ /***/ (function(module, exports) { /** @@ -165106,7 +167387,7 @@ module.exports = Area; /***/ }), -/* 1173 */ +/* 1180 */ /***/ (function(module, exports) { /** @@ -165139,7 +167420,7 @@ module.exports = Ceil; /***/ }), -/* 1174 */ +/* 1181 */ /***/ (function(module, exports) { /** @@ -165174,7 +167455,7 @@ module.exports = CeilAll; /***/ }), -/* 1175 */ +/* 1182 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165204,7 +167485,7 @@ module.exports = Clone; /***/ }), -/* 1176 */ +/* 1183 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165213,7 +167494,7 @@ module.exports = Clone; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(49); +var Contains = __webpack_require__(50); /** * Determines whether the specified point is contained within the rectangular region defined by this Rectangle object. @@ -165235,7 +167516,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1177 */ +/* 1184 */ /***/ (function(module, exports) { /** @@ -165266,7 +167547,7 @@ module.exports = CopyFrom; /***/ }), -/* 1178 */ +/* 1185 */ /***/ (function(module, exports) { /** @@ -165300,7 +167581,7 @@ module.exports = Equals; /***/ }), -/* 1179 */ +/* 1186 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165309,7 +167590,7 @@ module.exports = Equals; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetAspectRatio = __webpack_require__(218); +var GetAspectRatio = __webpack_require__(221); /** * Adjusts the target rectangle, changing its width, height and position, @@ -165353,7 +167634,7 @@ module.exports = FitInside; /***/ }), -/* 1180 */ +/* 1187 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165362,7 +167643,7 @@ module.exports = FitInside; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetAspectRatio = __webpack_require__(218); +var GetAspectRatio = __webpack_require__(221); /** * Adjusts the target rectangle, changing its width, height and position, @@ -165406,7 +167687,7 @@ module.exports = FitOutside; /***/ }), -/* 1181 */ +/* 1188 */ /***/ (function(module, exports) { /** @@ -165439,7 +167720,7 @@ module.exports = Floor; /***/ }), -/* 1182 */ +/* 1189 */ /***/ (function(module, exports) { /** @@ -165474,7 +167755,7 @@ module.exports = FloorAll; /***/ }), -/* 1183 */ +/* 1190 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165517,7 +167798,7 @@ module.exports = FromXY; /***/ }), -/* 1184 */ +/* 1191 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165555,7 +167836,7 @@ module.exports = GetCenter; /***/ }), -/* 1185 */ +/* 1192 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165595,7 +167876,7 @@ module.exports = GetSize; /***/ }), -/* 1186 */ +/* 1193 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165604,7 +167885,7 @@ module.exports = GetSize; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CenterOn = __webpack_require__(174); +var CenterOn = __webpack_require__(176); /** @@ -165637,7 +167918,7 @@ module.exports = Inflate; /***/ }), -/* 1187 */ +/* 1194 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165647,7 +167928,7 @@ module.exports = Inflate; */ var Rectangle = __webpack_require__(9); -var Intersects = __webpack_require__(141); +var Intersects = __webpack_require__(142); /** * Takes two Rectangles and first checks to see if they intersect. @@ -165688,7 +167969,7 @@ module.exports = Intersection; /***/ }), -/* 1188 */ +/* 1195 */ /***/ (function(module, exports) { /** @@ -165737,7 +168018,7 @@ module.exports = MergePoints; /***/ }), -/* 1189 */ +/* 1196 */ /***/ (function(module, exports) { /** @@ -165784,7 +168065,7 @@ module.exports = MergeRect; /***/ }), -/* 1190 */ +/* 1197 */ /***/ (function(module, exports) { /** @@ -165828,7 +168109,7 @@ module.exports = MergeXY; /***/ }), -/* 1191 */ +/* 1198 */ /***/ (function(module, exports) { /** @@ -165863,7 +168144,7 @@ module.exports = Offset; /***/ }), -/* 1192 */ +/* 1199 */ /***/ (function(module, exports) { /** @@ -165897,7 +168178,7 @@ module.exports = OffsetPoint; /***/ }), -/* 1193 */ +/* 1200 */ /***/ (function(module, exports) { /** @@ -165931,7 +168212,7 @@ module.exports = Overlaps; /***/ }), -/* 1194 */ +/* 1201 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165941,7 +168222,7 @@ module.exports = Overlaps; */ var Point = __webpack_require__(4); -var DegToRad = __webpack_require__(40); +var DegToRad = __webpack_require__(41); /** * Returns a Point from the perimeter of a Rectangle based on the given angle. @@ -165988,7 +168269,7 @@ module.exports = PerimeterPoint; /***/ }), -/* 1195 */ +/* 1202 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165997,8 +168278,8 @@ module.exports = PerimeterPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Between = __webpack_require__(178); -var ContainsRect = __webpack_require__(448); +var Between = __webpack_require__(180); +var ContainsRect = __webpack_require__(465); var Point = __webpack_require__(4); /** @@ -166059,7 +168340,7 @@ module.exports = RandomOutside; /***/ }), -/* 1196 */ +/* 1203 */ /***/ (function(module, exports) { /** @@ -166088,7 +168369,7 @@ module.exports = SameDimensions; /***/ }), -/* 1197 */ +/* 1204 */ /***/ (function(module, exports) { /** @@ -166127,7 +168408,7 @@ module.exports = Scale; /***/ }), -/* 1198 */ +/* 1205 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166136,38 +168417,38 @@ module.exports = Scale; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Triangle = __webpack_require__(71); +var Triangle = __webpack_require__(73); -Triangle.Area = __webpack_require__(1199); -Triangle.BuildEquilateral = __webpack_require__(1200); -Triangle.BuildFromPolygon = __webpack_require__(1201); -Triangle.BuildRight = __webpack_require__(1202); -Triangle.CenterOn = __webpack_require__(1203); -Triangle.Centroid = __webpack_require__(449); -Triangle.CircumCenter = __webpack_require__(1204); -Triangle.CircumCircle = __webpack_require__(1205); -Triangle.Clone = __webpack_require__(1206); -Triangle.Contains = __webpack_require__(84); -Triangle.ContainsArray = __webpack_require__(216); -Triangle.ContainsPoint = __webpack_require__(1207); -Triangle.CopyFrom = __webpack_require__(1208); -Triangle.Decompose = __webpack_require__(442); -Triangle.Equals = __webpack_require__(1209); -Triangle.GetPoint = __webpack_require__(425); -Triangle.GetPoints = __webpack_require__(426); -Triangle.InCenter = __webpack_require__(451); -Triangle.Perimeter = __webpack_require__(1210); -Triangle.Offset = __webpack_require__(450); -Triangle.Random = __webpack_require__(164); -Triangle.Rotate = __webpack_require__(1211); -Triangle.RotateAroundPoint = __webpack_require__(1212); -Triangle.RotateAroundXY = __webpack_require__(219); +Triangle.Area = __webpack_require__(1206); +Triangle.BuildEquilateral = __webpack_require__(1207); +Triangle.BuildFromPolygon = __webpack_require__(1208); +Triangle.BuildRight = __webpack_require__(1209); +Triangle.CenterOn = __webpack_require__(1210); +Triangle.Centroid = __webpack_require__(466); +Triangle.CircumCenter = __webpack_require__(1211); +Triangle.CircumCircle = __webpack_require__(1212); +Triangle.Clone = __webpack_require__(1213); +Triangle.Contains = __webpack_require__(85); +Triangle.ContainsArray = __webpack_require__(219); +Triangle.ContainsPoint = __webpack_require__(1214); +Triangle.CopyFrom = __webpack_require__(1215); +Triangle.Decompose = __webpack_require__(459); +Triangle.Equals = __webpack_require__(1216); +Triangle.GetPoint = __webpack_require__(442); +Triangle.GetPoints = __webpack_require__(443); +Triangle.InCenter = __webpack_require__(468); +Triangle.Perimeter = __webpack_require__(1217); +Triangle.Offset = __webpack_require__(467); +Triangle.Random = __webpack_require__(166); +Triangle.Rotate = __webpack_require__(1218); +Triangle.RotateAroundPoint = __webpack_require__(1219); +Triangle.RotateAroundXY = __webpack_require__(222); module.exports = Triangle; /***/ }), -/* 1199 */ +/* 1206 */ /***/ (function(module, exports) { /** @@ -166206,7 +168487,7 @@ module.exports = Area; /***/ }), -/* 1200 */ +/* 1207 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166215,7 +168496,7 @@ module.exports = Area; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Triangle = __webpack_require__(71); +var Triangle = __webpack_require__(73); /** * Builds an equilateral triangle. In the equilateral triangle, all the sides are the same length (congruent) and all the angles are the same size (congruent). @@ -166250,7 +168531,7 @@ module.exports = BuildEquilateral; /***/ }), -/* 1201 */ +/* 1208 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166259,8 +168540,8 @@ module.exports = BuildEquilateral; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var EarCut = __webpack_require__(66); -var Triangle = __webpack_require__(71); +var EarCut = __webpack_require__(60); +var Triangle = __webpack_require__(73); /** * Takes an array of vertex coordinates, and optionally an array of hole indices, then returns an array @@ -166326,7 +168607,7 @@ module.exports = BuildFromPolygon; /***/ }), -/* 1202 */ +/* 1209 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166335,7 +168616,7 @@ module.exports = BuildFromPolygon; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Triangle = __webpack_require__(71); +var Triangle = __webpack_require__(73); // Builds a right triangle, with one 90 degree angle and two acute angles // The x/y is the coordinate of the 90 degree angle (and will map to x1/y1 in the resulting Triangle) @@ -166375,7 +168656,7 @@ module.exports = BuildRight; /***/ }), -/* 1203 */ +/* 1210 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166384,8 +168665,8 @@ module.exports = BuildRight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Centroid = __webpack_require__(449); -var Offset = __webpack_require__(450); +var Centroid = __webpack_require__(466); +var Offset = __webpack_require__(467); /** * @callback CenterFunction @@ -166428,7 +168709,7 @@ module.exports = CenterOn; /***/ }), -/* 1204 */ +/* 1211 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166504,7 +168785,7 @@ module.exports = CircumCenter; /***/ }), -/* 1205 */ +/* 1212 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166513,7 +168794,7 @@ module.exports = CircumCenter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circle = __webpack_require__(65); +var Circle = __webpack_require__(68); // Adapted from https://gist.github.com/mutoo/5617691 @@ -166587,7 +168868,7 @@ module.exports = CircumCircle; /***/ }), -/* 1206 */ +/* 1213 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166596,7 +168877,7 @@ module.exports = CircumCircle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Triangle = __webpack_require__(71); +var Triangle = __webpack_require__(73); /** * Clones a Triangle object. @@ -166617,7 +168898,7 @@ module.exports = Clone; /***/ }), -/* 1207 */ +/* 1214 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166626,7 +168907,7 @@ module.exports = Clone; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(84); +var Contains = __webpack_require__(85); /** * Tests if a triangle contains a point. @@ -166648,7 +168929,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1208 */ +/* 1215 */ /***/ (function(module, exports) { /** @@ -166679,7 +168960,7 @@ module.exports = CopyFrom; /***/ }), -/* 1209 */ +/* 1216 */ /***/ (function(module, exports) { /** @@ -166715,7 +168996,7 @@ module.exports = Equals; /***/ }), -/* 1210 */ +/* 1217 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166724,7 +169005,7 @@ module.exports = Equals; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Length = __webpack_require__(57); +var Length = __webpack_require__(58); /** * Gets the length of the perimeter of the given triangle. @@ -166750,7 +169031,7 @@ module.exports = Perimeter; /***/ }), -/* 1211 */ +/* 1218 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166759,8 +169040,8 @@ module.exports = Perimeter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(219); -var InCenter = __webpack_require__(451); +var RotateAroundXY = __webpack_require__(222); +var InCenter = __webpack_require__(468); /** * Rotates a Triangle about its incenter, which is the point at which its three angle bisectors meet. @@ -166786,7 +169067,7 @@ module.exports = Rotate; /***/ }), -/* 1212 */ +/* 1219 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166795,7 +169076,7 @@ module.exports = Rotate; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(219); +var RotateAroundXY = __webpack_require__(222); /** * Rotates a Triangle at a certain angle about a given Point or object with public `x` and `y` properties. @@ -166820,7 +169101,7 @@ module.exports = RotateAroundPoint; /***/ }), -/* 1213 */ +/* 1220 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166829,7 +169110,7 @@ module.exports = RotateAroundPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(185); +var CONST = __webpack_require__(187); var Extend = __webpack_require__(19); /** @@ -166838,16 +169119,17 @@ var Extend = __webpack_require__(19); var Input = { - CreateInteractiveObject: __webpack_require__(452), - Events: __webpack_require__(55), - Gamepad: __webpack_require__(1214), - InputManager: __webpack_require__(365), - InputPlugin: __webpack_require__(1226), - InputPluginCache: __webpack_require__(142), - Keyboard: __webpack_require__(1228), - Mouse: __webpack_require__(1245), - Pointer: __webpack_require__(368), - Touch: __webpack_require__(1246) + CreatePixelPerfectHandler: __webpack_require__(469), + CreateInteractiveObject: __webpack_require__(470), + Events: __webpack_require__(56), + Gamepad: __webpack_require__(1221), + InputManager: __webpack_require__(375), + InputPlugin: __webpack_require__(1233), + InputPluginCache: __webpack_require__(143), + Keyboard: __webpack_require__(1234), + Mouse: __webpack_require__(1251), + Pointer: __webpack_require__(378), + Touch: __webpack_require__(1252) }; @@ -166858,7 +169140,7 @@ module.exports = Input; /***/ }), -/* 1214 */ +/* 1221 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166873,18 +169155,18 @@ module.exports = Input; module.exports = { - Axis: __webpack_require__(453), - Button: __webpack_require__(454), - Events: __webpack_require__(220), - Gamepad: __webpack_require__(455), - GamepadPlugin: __webpack_require__(1221), + Axis: __webpack_require__(471), + Button: __webpack_require__(472), + Events: __webpack_require__(223), + Gamepad: __webpack_require__(473), + GamepadPlugin: __webpack_require__(1228), - Configs: __webpack_require__(1222) + Configs: __webpack_require__(1229) }; /***/ }), -/* 1215 */ +/* 1222 */ /***/ (function(module, exports) { /** @@ -166913,7 +169195,7 @@ module.exports = 'down'; /***/ }), -/* 1216 */ +/* 1223 */ /***/ (function(module, exports) { /** @@ -166942,7 +169224,7 @@ module.exports = 'up'; /***/ }), -/* 1217 */ +/* 1224 */ /***/ (function(module, exports) { /** @@ -166973,7 +169255,7 @@ module.exports = 'connected'; /***/ }), -/* 1218 */ +/* 1225 */ /***/ (function(module, exports) { /** @@ -166999,7 +169281,7 @@ module.exports = 'disconnected'; /***/ }), -/* 1219 */ +/* 1226 */ /***/ (function(module, exports) { /** @@ -167031,7 +169313,7 @@ module.exports = 'down'; /***/ }), -/* 1220 */ +/* 1227 */ /***/ (function(module, exports) { /** @@ -167063,7 +169345,7 @@ module.exports = 'up'; /***/ }), -/* 1221 */ +/* 1228 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167073,12 +169355,12 @@ module.exports = 'up'; */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(220); -var Gamepad = __webpack_require__(455); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(223); +var Gamepad = __webpack_require__(473); var GetValue = __webpack_require__(6); -var InputPluginCache = __webpack_require__(142); -var InputEvents = __webpack_require__(55); +var InputPluginCache = __webpack_require__(143); +var InputEvents = __webpack_require__(56); /** * @classdesc @@ -167701,7 +169983,7 @@ module.exports = GamepadPlugin; /***/ }), -/* 1222 */ +/* 1229 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167716,15 +169998,15 @@ module.exports = GamepadPlugin; module.exports = { - DUALSHOCK_4: __webpack_require__(1223), - SNES_USB: __webpack_require__(1224), - XBOX_360: __webpack_require__(1225) + DUALSHOCK_4: __webpack_require__(1230), + SNES_USB: __webpack_require__(1231), + XBOX_360: __webpack_require__(1232) }; /***/ }), -/* 1223 */ +/* 1230 */ /***/ (function(module, exports) { /** @@ -167774,7 +170056,7 @@ module.exports = { /***/ }), -/* 1224 */ +/* 1231 */ /***/ (function(module, exports) { /** @@ -167813,7 +170095,7 @@ module.exports = { /***/ }), -/* 1225 */ +/* 1232 */ /***/ (function(module, exports) { /** @@ -167864,7 +170146,7 @@ module.exports = { /***/ }), -/* 1226 */ +/* 1233 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167873,27 +170155,27 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circle = __webpack_require__(65); -var CircleContains = __webpack_require__(56); +var Circle = __webpack_require__(68); +var CircleContains = __webpack_require__(57); var Class = __webpack_require__(0); -var CONST = __webpack_require__(185); -var CreateInteractiveObject = __webpack_require__(452); -var CreatePixelPerfectHandler = __webpack_require__(1227); -var DistanceBetween = __webpack_require__(54); -var Ellipse = __webpack_require__(96); -var EllipseContains = __webpack_require__(97); -var Events = __webpack_require__(55); -var EventEmitter = __webpack_require__(11); +var CONST = __webpack_require__(187); +var CreateInteractiveObject = __webpack_require__(470); +var CreatePixelPerfectHandler = __webpack_require__(469); +var DistanceBetween = __webpack_require__(55); +var Ellipse = __webpack_require__(97); +var EllipseContains = __webpack_require__(98); +var Events = __webpack_require__(56); +var EventEmitter = __webpack_require__(12); var GetFastValue = __webpack_require__(2); -var GEOM_CONST = __webpack_require__(48); -var InputPluginCache = __webpack_require__(142); +var GEOM_CONST = __webpack_require__(49); +var InputPluginCache = __webpack_require__(143); var IsPlainObject = __webpack_require__(7); var PluginCache = __webpack_require__(23); var Rectangle = __webpack_require__(9); -var RectangleContains = __webpack_require__(49); -var SceneEvents = __webpack_require__(22); -var Triangle = __webpack_require__(71); -var TriangleContains = __webpack_require__(84); +var RectangleContains = __webpack_require__(50); +var SceneEvents = __webpack_require__(20); +var Triangle = __webpack_require__(73); +var TriangleContains = __webpack_require__(85); /** * @classdesc @@ -171045,43 +173327,7 @@ module.exports = InputPlugin; /***/ }), -/* 1227 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Creates a new Pixel Perfect Handler function. - * - * Access via `InputPlugin.makePixelPerfect` rather than calling it directly. - * - * @function Phaser.Input.CreatePixelPerfectHandler - * @since 3.10.0 - * - * @param {Phaser.Textures.TextureManager} textureManager - A reference to the Texture Manager. - * @param {integer} alphaTolerance - The alpha level that the pixel should be above to be included as a successful interaction. - * - * @return {function} The new Pixel Perfect Handler function. - */ -var CreatePixelPerfectHandler = function (textureManager, alphaTolerance) -{ - return function (hitArea, x, y, gameObject) - { - var alpha = textureManager.getPixelAlpha(x, y, gameObject.texture.key, gameObject.frame.name); - - return (alpha && alpha >= alphaTolerance); - }; -}; - -module.exports = CreatePixelPerfectHandler; - - -/***/ }), -/* 1228 */ +/* 1234 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171096,26 +173342,26 @@ module.exports = CreatePixelPerfectHandler; module.exports = { - Events: __webpack_require__(143), + Events: __webpack_require__(144), - KeyboardManager: __webpack_require__(366), - KeyboardPlugin: __webpack_require__(1236), + KeyboardManager: __webpack_require__(376), + KeyboardPlugin: __webpack_require__(1242), - Key: __webpack_require__(456), - KeyCodes: __webpack_require__(130), + Key: __webpack_require__(474), + KeyCodes: __webpack_require__(131), - KeyCombo: __webpack_require__(457), + KeyCombo: __webpack_require__(475), - JustDown: __webpack_require__(1241), - JustUp: __webpack_require__(1242), - DownDuration: __webpack_require__(1243), - UpDuration: __webpack_require__(1244) + JustDown: __webpack_require__(1247), + JustUp: __webpack_require__(1248), + DownDuration: __webpack_require__(1249), + UpDuration: __webpack_require__(1250) }; /***/ }), -/* 1229 */ +/* 1235 */ /***/ (function(module, exports) { /** @@ -171151,7 +173397,7 @@ module.exports = 'keydown'; /***/ }), -/* 1230 */ +/* 1236 */ /***/ (function(module, exports) { /** @@ -171180,7 +173426,7 @@ module.exports = 'keyup'; /***/ }), -/* 1231 */ +/* 1237 */ /***/ (function(module, exports) { /** @@ -171214,7 +173460,7 @@ module.exports = 'keycombomatch'; /***/ }), -/* 1232 */ +/* 1238 */ /***/ (function(module, exports) { /** @@ -171248,7 +173494,7 @@ module.exports = 'down'; /***/ }), -/* 1233 */ +/* 1239 */ /***/ (function(module, exports) { /** @@ -171287,7 +173533,7 @@ module.exports = 'keydown-'; /***/ }), -/* 1234 */ +/* 1240 */ /***/ (function(module, exports) { /** @@ -171319,7 +173565,7 @@ module.exports = 'keyup-'; /***/ }), -/* 1235 */ +/* 1241 */ /***/ (function(module, exports) { /** @@ -171353,7 +173599,7 @@ module.exports = 'up'; /***/ }), -/* 1236 */ +/* 1242 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171363,16 +173609,17 @@ module.exports = 'up'; */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(143); -var GameEvents = __webpack_require__(20); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(144); +var GameEvents = __webpack_require__(21); var GetValue = __webpack_require__(6); -var InputEvents = __webpack_require__(55); -var InputPluginCache = __webpack_require__(142); -var Key = __webpack_require__(456); -var KeyCodes = __webpack_require__(130); -var KeyCombo = __webpack_require__(457); -var KeyMap = __webpack_require__(1240); +var InputEvents = __webpack_require__(56); +var InputPluginCache = __webpack_require__(143); +var Key = __webpack_require__(474); +var KeyCodes = __webpack_require__(131); +var KeyCombo = __webpack_require__(475); +var KeyMap = __webpack_require__(1246); +var SceneEvents = __webpack_require__(20); var SnapFloor = __webpack_require__(94); /** @@ -171568,6 +173815,9 @@ var KeyboardPlugin = new Class({ this.sceneInputPlugin.pluginEvents.once(InputEvents.SHUTDOWN, this.shutdown, this); this.game.events.on(GameEvents.BLUR, this.resetKeys, this); + + this.scene.sys.events.on(SceneEvents.PAUSE, this.resetKeys, this); + this.scene.sys.events.on(SceneEvents.SLEEP, this.resetKeys, this); }, /** @@ -172211,6 +174461,9 @@ var KeyboardPlugin = new Class({ this.game.events.off(GameEvents.BLUR, this.resetKeys); + this.scene.sys.events.off(SceneEvents.PAUSE, this.resetKeys, this); + this.scene.sys.events.off(SceneEvents.SLEEP, this.resetKeys, this); + this.removeAllListeners(); this.queue = []; @@ -172281,7 +174534,7 @@ module.exports = KeyboardPlugin; /***/ }), -/* 1237 */ +/* 1243 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172290,7 +174543,7 @@ module.exports = KeyboardPlugin; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AdvanceKeyCombo = __webpack_require__(1238); +var AdvanceKeyCombo = __webpack_require__(1244); /** * Used internally by the KeyCombo class. @@ -172362,7 +174615,7 @@ module.exports = ProcessKeyCombo; /***/ }), -/* 1238 */ +/* 1244 */ /***/ (function(module, exports) { /** @@ -172404,7 +174657,7 @@ module.exports = AdvanceKeyCombo; /***/ }), -/* 1239 */ +/* 1245 */ /***/ (function(module, exports) { /** @@ -172439,7 +174692,7 @@ module.exports = ResetKeyCombo; /***/ }), -/* 1240 */ +/* 1246 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172448,7 +174701,7 @@ module.exports = ResetKeyCombo; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var KeyCodes = __webpack_require__(130); +var KeyCodes = __webpack_require__(131); var KeyMap = {}; @@ -172461,7 +174714,7 @@ module.exports = KeyMap; /***/ }), -/* 1241 */ +/* 1247 */ /***/ (function(module, exports) { /** @@ -172503,7 +174756,7 @@ module.exports = JustDown; /***/ }), -/* 1242 */ +/* 1248 */ /***/ (function(module, exports) { /** @@ -172545,7 +174798,7 @@ module.exports = JustUp; /***/ }), -/* 1243 */ +/* 1249 */ /***/ (function(module, exports) { /** @@ -172579,7 +174832,7 @@ module.exports = DownDuration; /***/ }), -/* 1244 */ +/* 1250 */ /***/ (function(module, exports) { /** @@ -172613,7 +174866,7 @@ module.exports = UpDuration; /***/ }), -/* 1245 */ +/* 1251 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172629,14 +174882,14 @@ module.exports = UpDuration; /* eslint-disable */ module.exports = { - MouseManager: __webpack_require__(367) + MouseManager: __webpack_require__(377) }; /* eslint-enable */ /***/ }), -/* 1246 */ +/* 1252 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172652,14 +174905,14 @@ module.exports = { /* eslint-disable */ module.exports = { - TouchManager: __webpack_require__(369) + TouchManager: __webpack_require__(379) }; /* eslint-enable */ /***/ }), -/* 1247 */ +/* 1253 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172677,18 +174930,18 @@ var Extend = __webpack_require__(19); var Loader = { - Events: __webpack_require__(83), + Events: __webpack_require__(84), - FileTypes: __webpack_require__(1248), + FileTypes: __webpack_require__(1254), - File: __webpack_require__(21), + File: __webpack_require__(22), FileTypesManager: __webpack_require__(8), - GetURL: __webpack_require__(144), - LoaderPlugin: __webpack_require__(1272), - MergeXHRSettings: __webpack_require__(221), - MultiFile: __webpack_require__(61), - XHRLoader: __webpack_require__(458), - XHRSettings: __webpack_require__(145) + GetURL: __webpack_require__(145), + LoaderPlugin: __webpack_require__(1278), + MergeXHRSettings: __webpack_require__(224), + MultiFile: __webpack_require__(63), + XHRLoader: __webpack_require__(476), + XHRSettings: __webpack_require__(146) }; @@ -172699,7 +174952,7 @@ module.exports = Loader; /***/ }), -/* 1248 */ +/* 1254 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172714,42 +174967,42 @@ module.exports = Loader; module.exports = { - AnimationJSONFile: __webpack_require__(1249), - AtlasJSONFile: __webpack_require__(1250), - AtlasXMLFile: __webpack_require__(1251), - AudioFile: __webpack_require__(459), - AudioSpriteFile: __webpack_require__(1252), - BinaryFile: __webpack_require__(1253), - BitmapFontFile: __webpack_require__(1254), - CSSFile: __webpack_require__(1255), - GLSLFile: __webpack_require__(1256), - HTML5AudioFile: __webpack_require__(460), - HTMLFile: __webpack_require__(1257), - HTMLTextureFile: __webpack_require__(1258), - ImageFile: __webpack_require__(72), - JSONFile: __webpack_require__(60), - MultiAtlasFile: __webpack_require__(1259), - MultiScriptFile: __webpack_require__(1260), - PackFile: __webpack_require__(1261), - PluginFile: __webpack_require__(1262), - SceneFile: __webpack_require__(1263), - ScenePluginFile: __webpack_require__(1264), - ScriptFile: __webpack_require__(461), - SpriteSheetFile: __webpack_require__(1265), - SVGFile: __webpack_require__(1266), - TextFile: __webpack_require__(462), - TilemapCSVFile: __webpack_require__(1267), - TilemapImpactFile: __webpack_require__(1268), - TilemapJSONFile: __webpack_require__(1269), - UnityAtlasFile: __webpack_require__(1270), - VideoFile: __webpack_require__(1271), - XMLFile: __webpack_require__(222) + AnimationJSONFile: __webpack_require__(1255), + AtlasJSONFile: __webpack_require__(1256), + AtlasXMLFile: __webpack_require__(1257), + AudioFile: __webpack_require__(477), + AudioSpriteFile: __webpack_require__(1258), + BinaryFile: __webpack_require__(1259), + BitmapFontFile: __webpack_require__(1260), + CSSFile: __webpack_require__(1261), + GLSLFile: __webpack_require__(1262), + HTML5AudioFile: __webpack_require__(478), + HTMLFile: __webpack_require__(1263), + HTMLTextureFile: __webpack_require__(1264), + ImageFile: __webpack_require__(74), + JSONFile: __webpack_require__(62), + MultiAtlasFile: __webpack_require__(1265), + MultiScriptFile: __webpack_require__(1266), + PackFile: __webpack_require__(1267), + PluginFile: __webpack_require__(1268), + SceneFile: __webpack_require__(1269), + ScenePluginFile: __webpack_require__(1270), + ScriptFile: __webpack_require__(479), + SpriteSheetFile: __webpack_require__(1271), + SVGFile: __webpack_require__(1272), + TextFile: __webpack_require__(480), + TilemapCSVFile: __webpack_require__(1273), + TilemapImpactFile: __webpack_require__(1274), + TilemapJSONFile: __webpack_require__(1275), + UnityAtlasFile: __webpack_require__(1276), + VideoFile: __webpack_require__(1277), + XMLFile: __webpack_require__(225) }; /***/ }), -/* 1249 */ +/* 1255 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172760,8 +175013,8 @@ module.exports = { var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); -var JSONFile = __webpack_require__(60); -var LoaderEvents = __webpack_require__(83); +var JSONFile = __webpack_require__(62); +var LoaderEvents = __webpack_require__(84); /** * @classdesc @@ -172950,7 +175203,7 @@ module.exports = AnimationJSONFile; /***/ }), -/* 1250 */ +/* 1256 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172962,10 +175215,10 @@ module.exports = AnimationJSONFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); -var ImageFile = __webpack_require__(72); +var ImageFile = __webpack_require__(74); var IsPlainObject = __webpack_require__(7); -var JSONFile = __webpack_require__(60); -var MultiFile = __webpack_require__(61); +var JSONFile = __webpack_require__(62); +var MultiFile = __webpack_require__(63); /** * @classdesc @@ -173199,7 +175452,7 @@ module.exports = AtlasJSONFile; /***/ }), -/* 1251 */ +/* 1257 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173211,10 +175464,10 @@ module.exports = AtlasJSONFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); -var ImageFile = __webpack_require__(72); +var ImageFile = __webpack_require__(74); var IsPlainObject = __webpack_require__(7); -var MultiFile = __webpack_require__(61); -var XMLFile = __webpack_require__(222); +var MultiFile = __webpack_require__(63); +var XMLFile = __webpack_require__(225); /** * @classdesc @@ -173442,7 +175695,7 @@ module.exports = AtlasXMLFile; /***/ }), -/* 1252 */ +/* 1258 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173451,13 +175704,13 @@ module.exports = AtlasXMLFile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AudioFile = __webpack_require__(459); +var AudioFile = __webpack_require__(477); var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); -var JSONFile = __webpack_require__(60); -var MultiFile = __webpack_require__(61); +var JSONFile = __webpack_require__(62); +var MultiFile = __webpack_require__(63); /** * @classdesc @@ -173732,7 +175985,7 @@ FileTypesManager.register('audioSprite', function (key, jsonURL, audioURL, audio /***/ }), -/* 1253 */ +/* 1259 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173743,7 +175996,7 @@ FileTypesManager.register('audioSprite', function (key, jsonURL, audioURL, audio var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var File = __webpack_require__(21); +var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -173914,7 +176167,7 @@ module.exports = BinaryFile; /***/ }), -/* 1254 */ +/* 1260 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173926,11 +176179,11 @@ module.exports = BinaryFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); -var ImageFile = __webpack_require__(72); +var ImageFile = __webpack_require__(74); var IsPlainObject = __webpack_require__(7); -var MultiFile = __webpack_require__(61); -var ParseXMLBitmapFont = __webpack_require__(193); -var XMLFile = __webpack_require__(222); +var MultiFile = __webpack_require__(63); +var ParseXMLBitmapFont = __webpack_require__(196); +var XMLFile = __webpack_require__(225); /** * @classdesc @@ -174161,7 +176414,7 @@ module.exports = BitmapFontFile; /***/ }), -/* 1255 */ +/* 1261 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174172,7 +176425,7 @@ module.exports = BitmapFontFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var File = __webpack_require__(21); +var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -174329,7 +176582,7 @@ module.exports = CSSFile; /***/ }), -/* 1256 */ +/* 1262 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174340,11 +176593,11 @@ module.exports = CSSFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var File = __webpack_require__(21); +var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); -var Shader = __webpack_require__(353); +var Shader = __webpack_require__(362); /** * @classdesc @@ -174740,7 +176993,7 @@ module.exports = GLSLFile; /***/ }), -/* 1257 */ +/* 1263 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174751,7 +177004,7 @@ module.exports = GLSLFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var File = __webpack_require__(21); +var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -174915,7 +177168,7 @@ module.exports = HTMLFile; /***/ }), -/* 1258 */ +/* 1264 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174926,7 +177179,7 @@ module.exports = HTMLFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var File = __webpack_require__(21); +var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -175173,7 +177426,7 @@ module.exports = HTMLTextureFile; /***/ }), -/* 1259 */ +/* 1265 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -175185,10 +177438,10 @@ module.exports = HTMLTextureFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); -var ImageFile = __webpack_require__(72); +var ImageFile = __webpack_require__(74); var IsPlainObject = __webpack_require__(7); -var JSONFile = __webpack_require__(60); -var MultiFile = __webpack_require__(61); +var JSONFile = __webpack_require__(62); +var MultiFile = __webpack_require__(63); /** * @classdesc @@ -175506,7 +177759,7 @@ module.exports = MultiAtlasFile; /***/ }), -/* 1260 */ +/* 1266 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -175519,8 +177772,8 @@ var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); -var MultiFile = __webpack_require__(61); -var ScriptFile = __webpack_require__(461); +var MultiFile = __webpack_require__(63); +var ScriptFile = __webpack_require__(479); /** * @classdesc @@ -175723,7 +177976,7 @@ module.exports = MultiScriptFile; /***/ }), -/* 1261 */ +/* 1267 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -175735,7 +177988,7 @@ module.exports = MultiScriptFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); var FileTypesManager = __webpack_require__(8); -var JSONFile = __webpack_require__(60); +var JSONFile = __webpack_require__(62); /** * @classdesc @@ -175941,7 +178194,7 @@ module.exports = PackFile; /***/ }), -/* 1262 */ +/* 1268 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -175952,7 +178205,7 @@ module.exports = PackFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var File = __webpack_require__(21); +var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -176153,7 +178406,7 @@ module.exports = PluginFile; /***/ }), -/* 1263 */ +/* 1269 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -176164,7 +178417,7 @@ module.exports = PluginFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var File = __webpack_require__(21); +var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -176374,7 +178627,7 @@ module.exports = SceneFile; /***/ }), -/* 1264 */ +/* 1270 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -176385,7 +178638,7 @@ module.exports = SceneFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var File = __webpack_require__(21); +var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -176580,7 +178833,7 @@ module.exports = ScenePluginFile; /***/ }), -/* 1265 */ +/* 1271 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -176591,7 +178844,7 @@ module.exports = ScenePluginFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); -var ImageFile = __webpack_require__(72); +var ImageFile = __webpack_require__(74); /** * @classdesc @@ -176771,7 +179024,7 @@ module.exports = SpriteSheetFile; /***/ }), -/* 1266 */ +/* 1272 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -176782,7 +179035,7 @@ module.exports = SpriteSheetFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var File = __webpack_require__(21); +var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -177110,7 +179363,7 @@ module.exports = SVGFile; /***/ }), -/* 1267 */ +/* 1273 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177121,11 +179374,11 @@ module.exports = SVGFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var File = __webpack_require__(21); +var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); -var TILEMAP_FORMATS = __webpack_require__(32); +var TILEMAP_FORMATS = __webpack_require__(33); /** * @classdesc @@ -177305,7 +179558,7 @@ module.exports = TilemapCSVFile; /***/ }), -/* 1268 */ +/* 1274 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177316,8 +179569,8 @@ module.exports = TilemapCSVFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); -var JSONFile = __webpack_require__(60); -var TILEMAP_FORMATS = __webpack_require__(32); +var JSONFile = __webpack_require__(62); +var TILEMAP_FORMATS = __webpack_require__(33); /** * @classdesc @@ -177461,7 +179714,7 @@ module.exports = TilemapImpactFile; /***/ }), -/* 1269 */ +/* 1275 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177472,8 +179725,8 @@ module.exports = TilemapImpactFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); -var JSONFile = __webpack_require__(60); -var TILEMAP_FORMATS = __webpack_require__(32); +var JSONFile = __webpack_require__(62); +var TILEMAP_FORMATS = __webpack_require__(33); /** * @classdesc @@ -177617,7 +179870,7 @@ module.exports = TilemapJSONFile; /***/ }), -/* 1270 */ +/* 1276 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177629,10 +179882,10 @@ module.exports = TilemapJSONFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); -var ImageFile = __webpack_require__(72); +var ImageFile = __webpack_require__(74); var IsPlainObject = __webpack_require__(7); -var MultiFile = __webpack_require__(61); -var TextFile = __webpack_require__(462); +var MultiFile = __webpack_require__(63); +var TextFile = __webpack_require__(480); /** * @classdesc @@ -177859,7 +180112,7 @@ module.exports = UnityAtlasFile; /***/ }), -/* 1271 */ +/* 1277 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177870,9 +180123,9 @@ module.exports = UnityAtlasFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var File = __webpack_require__(21); +var File = __webpack_require__(22); var FileTypesManager = __webpack_require__(8); -var GetURL = __webpack_require__(144); +var GetURL = __webpack_require__(145); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -178253,7 +180506,7 @@ module.exports = VideoFile; /***/ }), -/* 1272 */ +/* 1278 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178264,14 +180517,14 @@ module.exports = VideoFile; var Class = __webpack_require__(0); var CONST = __webpack_require__(18); -var CustomSet = __webpack_require__(139); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(83); +var CustomSet = __webpack_require__(140); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(84); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(22); -var XHRSettings = __webpack_require__(145); +var SceneEvents = __webpack_require__(20); +var XHRSettings = __webpack_require__(146); /** * @classdesc @@ -179336,7 +181589,7 @@ module.exports = LoaderPlugin; /***/ }), -/* 1273 */ +/* 1279 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179345,7 +181598,7 @@ module.exports = LoaderPlugin; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(51); +var CONST = __webpack_require__(52); var Extend = __webpack_require__(19); /** @@ -179354,18 +181607,23 @@ var Extend = __webpack_require__(19); var Arcade = { - ArcadePhysics: __webpack_require__(1274), - Body: __webpack_require__(469), - Collider: __webpack_require__(470), - Components: __webpack_require__(223), - Events: __webpack_require__(224), - Factory: __webpack_require__(463), - Group: __webpack_require__(465), - Image: __webpack_require__(464), - Sprite: __webpack_require__(146), - StaticBody: __webpack_require__(475), - StaticGroup: __webpack_require__(466), - World: __webpack_require__(468) + ArcadePhysics: __webpack_require__(1280), + Body: __webpack_require__(487), + Collider: __webpack_require__(488), + Components: __webpack_require__(226), + Events: __webpack_require__(228), + Factory: __webpack_require__(481), + GetOverlapX: __webpack_require__(229), + GetOverlapY: __webpack_require__(230), + SeparateX: __webpack_require__(496), + SeparateY: __webpack_require__(497), + Group: __webpack_require__(484), + Image: __webpack_require__(482), + Sprite: __webpack_require__(147), + StaticBody: __webpack_require__(498), + StaticGroup: __webpack_require__(485), + Tilemap: __webpack_require__(1301), + World: __webpack_require__(486) }; @@ -179376,7 +181634,7 @@ module.exports = Arcade; /***/ }), -/* 1274 */ +/* 1280 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179386,18 +181644,18 @@ module.exports = Arcade; */ var Class = __webpack_require__(0); -var DegToRad = __webpack_require__(40); -var DistanceBetween = __webpack_require__(54); -var DistanceSquared = __webpack_require__(325); -var Factory = __webpack_require__(463); +var DegToRad = __webpack_require__(41); +var DistanceBetween = __webpack_require__(55); +var DistanceSquared = __webpack_require__(333); +var Factory = __webpack_require__(481); var GetFastValue = __webpack_require__(2); -var Merge = __webpack_require__(132); -var OverlapCirc = __webpack_require__(1287); -var OverlapRect = __webpack_require__(467); +var Merge = __webpack_require__(133); +var OverlapCirc = __webpack_require__(483); +var OverlapRect = __webpack_require__(227); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(22); +var SceneEvents = __webpack_require__(20); var Vector2 = __webpack_require__(3); -var World = __webpack_require__(468); +var World = __webpack_require__(486); /** * @classdesc @@ -179446,7 +181704,7 @@ var ArcadePhysics = new Class({ * A configuration object. Union of the `physics.arcade.*` properties of the GameConfig and SceneConfig objects. * * @name Phaser.Physics.Arcade.ArcadePhysics#config - * @type {object} + * @type {Phaser.Types.Physics.Arcade.ArcadeWorldConfig} * @since 3.0.0 */ this.config = this.getConfig(); @@ -179508,18 +181766,54 @@ var ArcadePhysics = new Class({ var eventEmitter = this.systems.events; - eventEmitter.on(SceneEvents.UPDATE, this.world.update, this.world); + if (!GetFastValue(this.config, 'customUpdate', false)) + { + eventEmitter.on(SceneEvents.UPDATE, this.world.update, this.world); + } + eventEmitter.on(SceneEvents.POST_UPDATE, this.world.postUpdate, this.world); eventEmitter.once(SceneEvents.SHUTDOWN, this.shutdown, this); }, + /** + * Causes `World.update` to be automatically called each time the Scene + * emits and `UPDATE` event. This is the default setting, so only needs + * calling if you have specifically disabled it. + * + * @method Phaser.Physics.Arcade.ArcadePhysics#enableUpdate + * @since 3.50.0 + */ + enableUpdate: function () + { + this.systems.events.on(SceneEvents.UPDATE, this.world.update, this.world); + }, + + /** + * Causes `World.update` to **not** be automatically called each time the Scene + * emits and `UPDATE` event. + * + * If you wish to run the World update at your own rate, or from your own + * component, then you should call this method to disable the built-in link, + * and then call `World.update(delta, time)` accordingly. + * + * Note that `World.postUpdate` is always automatically called when the Scene + * emits a `POST_UPDATE` event, regardless of this setting. + * + * @method Phaser.Physics.Arcade.ArcadePhysics#disableUpdate + * @since 3.50.0 + */ + disableUpdate: function () + { + this.systems.events.off(SceneEvents.UPDATE, this.world.update, this.world); + }, + /** * Creates the physics configuration for the current Scene. * * @method Phaser.Physics.Arcade.ArcadePhysics#getConfig * @since 3.0.0 * - * @return {object} The physics configuration. + * @return {Phaser.Types.Physics.Arcade.ArcadeWorldConfig} The physics configuration. */ getConfig: function () { @@ -180065,7 +182359,7 @@ module.exports = ArcadePhysics; /***/ }), -/* 1275 */ +/* 1281 */ /***/ (function(module, exports) { /** @@ -180140,7 +182434,7 @@ module.exports = Acceleration; /***/ }), -/* 1276 */ +/* 1282 */ /***/ (function(module, exports) { /** @@ -180222,7 +182516,7 @@ module.exports = Angular; /***/ }), -/* 1277 */ +/* 1283 */ /***/ (function(module, exports) { /** @@ -180321,7 +182615,7 @@ module.exports = Bounce; /***/ }), -/* 1278 */ +/* 1284 */ /***/ (function(module, exports) { /** @@ -180448,7 +182742,7 @@ module.exports = Debug; /***/ }), -/* 1279 */ +/* 1285 */ /***/ (function(module, exports) { /** @@ -180581,7 +182875,7 @@ module.exports = Drag; /***/ }), -/* 1280 */ +/* 1286 */ /***/ (function(module, exports) { /** @@ -180705,7 +182999,7 @@ module.exports = Enable; /***/ }), -/* 1281 */ +/* 1287 */ /***/ (function(module, exports) { /** @@ -180793,7 +183087,7 @@ module.exports = Friction; /***/ }), -/* 1282 */ +/* 1288 */ /***/ (function(module, exports) { /** @@ -180871,7 +183165,7 @@ module.exports = Gravity; /***/ }), -/* 1283 */ +/* 1289 */ /***/ (function(module, exports) { /** @@ -180913,7 +183207,7 @@ module.exports = Immovable; /***/ }), -/* 1284 */ +/* 1290 */ /***/ (function(module, exports) { /** @@ -180953,7 +183247,7 @@ module.exports = Mass; /***/ }), -/* 1285 */ +/* 1291 */ /***/ (function(module, exports) { /** @@ -181056,7 +183350,7 @@ module.exports = Size; /***/ }), -/* 1286 */ +/* 1292 */ /***/ (function(module, exports) { /** @@ -181155,75 +183449,7 @@ module.exports = Velocity; /***/ }), -/* 1287 */ -/***/ (function(module, exports, __webpack_require__) { - -var OverlapRect = __webpack_require__(467); -var Circle = __webpack_require__(65); -var CircleToCircle = __webpack_require__(211); -var CircleToRectangle = __webpack_require__(212); - -/** - * This method will search the given circular area and return an array of all physics bodies that - * overlap with it. It can return either Dynamic, Static bodies or a mixture of both. - * - * A body only has to intersect with the search area to be considered, it doesn't have to be fully - * contained within it. - * - * If Arcade Physics is set to use the RTree (which it is by default) then the search is rather fast, - * otherwise the search is O(N) for Dynamic Bodies. - * - * @function Phaser.Physics.Arcade.Components.OverlapCirc - * @since 3.21.0 - * - * @param {number} x - The x coordinate of the center of the area to search within. - * @param {number} y - The y coordinate of the center of the area to search within. - * @param {number} radius - The radius of the area to search within. - * @param {boolean} [includeDynamic=true] - Should the search include Dynamic Bodies? - * @param {boolean} [includeStatic=false] - Should the search include Static Bodies? - * - * @return {(Phaser.Physics.Arcade.Body[]|Phaser.Physics.Arcade.StaticBody[])} An array of bodies that overlap with the given area. - */ -var OverlapCirc = function (world, x, y, radius, includeDynamic, includeStatic) -{ - var bodiesInRect = OverlapRect(world, x - radius, y - radius, 2 * radius, 2 * radius, includeDynamic, includeStatic); - - if (bodiesInRect.length === 0) - { - return bodiesInRect; - } - - var area = new Circle(x, y, radius); - var circFromBody = new Circle(); - var bodiesInArea = []; - - for (var i = 0; i < bodiesInRect.length; i++) - { - var body = bodiesInRect[i]; - - if (body.isCircle) - { - circFromBody.setTo(body.center.x, body.center.y, body.halfWidth); - - if (CircleToCircle(area, circFromBody)) - { - bodiesInArea.push(body); - } - } - else if (CircleToRectangle(area, body)) - { - bodiesInArea.push(body); - } - } - - return bodiesInArea; -}; - -module.exports = OverlapCirc; - - -/***/ }), -/* 1288 */ +/* 1293 */ /***/ (function(module, exports) { /** @@ -181256,7 +183482,7 @@ module.exports = 'collide'; /***/ }), -/* 1289 */ +/* 1294 */ /***/ (function(module, exports) { /** @@ -181289,7 +183515,7 @@ module.exports = 'overlap'; /***/ }), -/* 1290 */ +/* 1295 */ /***/ (function(module, exports) { /** @@ -181312,7 +183538,7 @@ module.exports = 'pause'; /***/ }), -/* 1291 */ +/* 1296 */ /***/ (function(module, exports) { /** @@ -181335,7 +183561,7 @@ module.exports = 'resume'; /***/ }), -/* 1292 */ +/* 1297 */ /***/ (function(module, exports) { /** @@ -181367,7 +183593,7 @@ module.exports = 'tilecollide'; /***/ }), -/* 1293 */ +/* 1298 */ /***/ (function(module, exports) { /** @@ -181399,7 +183625,7 @@ module.exports = 'tileoverlap'; /***/ }), -/* 1294 */ +/* 1299 */ /***/ (function(module, exports) { /** @@ -181431,7 +183657,7 @@ module.exports = 'worldbounds'; /***/ }), -/* 1295 */ +/* 1300 */ /***/ (function(module, exports) { /** @@ -181456,397 +183682,9 @@ module.exports = 'worldbounds'; module.exports = 'worldstep'; -/***/ }), -/* 1296 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * A function to process the collision callbacks between a single tile and an Arcade Physics enabled Game Object. - * - * @function Phaser.Physics.Arcade.Tilemap.ProcessTileCallbacks - * @since 3.0.0 - * - * @param {Phaser.Tilemaps.Tile} tile - The Tile to process. - * @param {Phaser.GameObjects.Sprite} sprite - The Game Object to process with the Tile. - * - * @return {boolean} The result of the callback, `true` for further processing, or `false` to skip this pair. - */ -var ProcessTileCallbacks = function (tile, sprite) -{ - // Tile callbacks take priority over layer level callbacks - if (tile.collisionCallback) - { - return !tile.collisionCallback.call(tile.collisionCallbackContext, sprite, tile); - } - else if (tile.layer.callbacks[tile.index]) - { - return !tile.layer.callbacks[tile.index].callback.call( - tile.layer.callbacks[tile.index].callbackContext, sprite, tile - ); - } - - return true; -}; - -module.exports = ProcessTileCallbacks; - - -/***/ }), -/* 1297 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var TileCheckX = __webpack_require__(1298); -var TileCheckY = __webpack_require__(1300); -var TileIntersectsBody = __webpack_require__(474); - -/** - * The core separation function to separate a physics body and a tile. - * - * @function Phaser.Physics.Arcade.Tilemap.SeparateTile - * @since 3.0.0 - * - * @param {number} i - The index of the tile within the map data. - * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate. - * @param {Phaser.Tilemaps.Tile} tile - The tile to collide against. - * @param {Phaser.Geom.Rectangle} tileWorldRect - A rectangle-like object defining the dimensions of the tile. - * @param {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} tilemapLayer - The tilemapLayer to collide against. - * @param {number} tileBias - The tile bias value. Populated by the `World.TILE_BIAS` constant. - * @param {boolean} isLayer - Is this check coming from a TilemapLayer or an array of tiles? - * - * @return {boolean} `true` if the body was separated, otherwise `false`. - */ -var SeparateTile = function (i, body, tile, tileWorldRect, tilemapLayer, tileBias, isLayer) -{ - var tileLeft = tileWorldRect.left; - var tileTop = tileWorldRect.top; - var tileRight = tileWorldRect.right; - var tileBottom = tileWorldRect.bottom; - var faceHorizontal = tile.faceLeft || tile.faceRight; - var faceVertical = tile.faceTop || tile.faceBottom; - - if (!isLayer) - { - faceHorizontal = true; - faceVertical = true; - } - - // We don't need to go any further if this tile doesn't actually have any colliding faces. This - // could happen if the tile was meant to be collided with re: a callback, but otherwise isn't - // needed for separation. - if (!faceHorizontal && !faceVertical) - { - return false; - } - - var ox = 0; - var oy = 0; - var minX = 0; - var minY = 1; - - if (body.deltaAbsX() > body.deltaAbsY()) - { - // Moving faster horizontally, check X axis first - minX = -1; - } - else if (body.deltaAbsX() < body.deltaAbsY()) - { - // Moving faster vertically, check Y axis first - minY = -1; - } - - if (body.deltaX() !== 0 && body.deltaY() !== 0 && faceHorizontal && faceVertical) - { - // We only need do this if both axes have colliding faces AND we're moving in both - // directions - minX = Math.min(Math.abs(body.position.x - tileRight), Math.abs(body.right - tileLeft)); - minY = Math.min(Math.abs(body.position.y - tileBottom), Math.abs(body.bottom - tileTop)); - } - - if (minX < minY) - { - if (faceHorizontal) - { - ox = TileCheckX(body, tile, tileLeft, tileRight, tileBias, isLayer); - - // That's horizontal done, check if we still intersects? If not then we can return now - if (ox !== 0 && !TileIntersectsBody(tileWorldRect, body)) - { - return true; - } - } - - if (faceVertical) - { - oy = TileCheckY(body, tile, tileTop, tileBottom, tileBias, isLayer); - } - } - else - { - if (faceVertical) - { - oy = TileCheckY(body, tile, tileTop, tileBottom, tileBias, isLayer); - - // That's vertical done, check if we still intersects? If not then we can return now - if (oy !== 0 && !TileIntersectsBody(tileWorldRect, body)) - { - return true; - } - } - - if (faceHorizontal) - { - ox = TileCheckX(body, tile, tileLeft, tileRight, tileBias, isLayer); - } - } - - return (ox !== 0 || oy !== 0); -}; - -module.exports = SeparateTile; - - -/***/ }), -/* 1298 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var ProcessTileSeparationX = __webpack_require__(1299); - -/** - * Check the body against the given tile on the X axis. - * Used internally by the SeparateTile function. - * - * @function Phaser.Physics.Arcade.Tilemap.TileCheckX - * @since 3.0.0 - * - * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate. - * @param {Phaser.Tilemaps.Tile} tile - The tile to check. - * @param {number} tileLeft - The left position of the tile within the tile world. - * @param {number} tileRight - The right position of the tile within the tile world. - * @param {number} tileBias - The tile bias value. Populated by the `World.TILE_BIAS` constant. - * @param {boolean} isLayer - Is this check coming from a TilemapLayer or an array of tiles? - * - * @return {number} The amount of separation that occurred. - */ -var TileCheckX = function (body, tile, tileLeft, tileRight, tileBias, isLayer) -{ - var ox = 0; - - var faceLeft = tile.faceLeft; - var faceRight = tile.faceRight; - var collideLeft = tile.collideLeft; - var collideRight = tile.collideRight; - - if (!isLayer) - { - faceLeft = true; - faceRight = true; - collideLeft = true; - collideRight = true; - } - - if (body.deltaX() < 0 && collideRight && body.checkCollision.left) - { - // Body is moving LEFT - if (faceRight && body.x < tileRight) - { - ox = body.x - tileRight; - - if (ox < -tileBias) - { - ox = 0; - } - } - } - else if (body.deltaX() > 0 && collideLeft && body.checkCollision.right) - { - // Body is moving RIGHT - if (faceLeft && body.right > tileLeft) - { - ox = body.right - tileLeft; - - if (ox > tileBias) - { - ox = 0; - } - } - } - - if (ox !== 0) - { - if (body.customSeparateX) - { - body.overlapX = ox; - } - else - { - ProcessTileSeparationX(body, ox); - } - } - - return ox; -}; - -module.exports = TileCheckX; - - -/***/ }), -/* 1299 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Internal function to process the separation of a physics body from a tile. - * - * @function Phaser.Physics.Arcade.Tilemap.ProcessTileSeparationX - * @since 3.0.0 - * - * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate. - * @param {number} x - The x separation amount. - */ -var ProcessTileSeparationX = function (body, x) -{ - if (x < 0) - { - body.blocked.none = false; - body.blocked.left = true; - } - else if (x > 0) - { - body.blocked.none = false; - body.blocked.right = true; - } - - body.position.x -= x; - - if (body.bounce.x === 0) - { - body.velocity.x = 0; - } - else - { - body.velocity.x = -body.velocity.x * body.bounce.x; - } -}; - -module.exports = ProcessTileSeparationX; - - -/***/ }), -/* 1300 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var ProcessTileSeparationY = __webpack_require__(1301); - -/** - * Check the body against the given tile on the Y axis. - * Used internally by the SeparateTile function. - * - * @function Phaser.Physics.Arcade.Tilemap.TileCheckY - * @since 3.0.0 - * - * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate. - * @param {Phaser.Tilemaps.Tile} tile - The tile to check. - * @param {number} tileTop - The top position of the tile within the tile world. - * @param {number} tileBottom - The bottom position of the tile within the tile world. - * @param {number} tileBias - The tile bias value. Populated by the `World.TILE_BIAS` constant. - * @param {boolean} isLayer - Is this check coming from a TilemapLayer or an array of tiles? - * - * @return {number} The amount of separation that occurred. - */ -var TileCheckY = function (body, tile, tileTop, tileBottom, tileBias, isLayer) -{ - var oy = 0; - - var faceTop = tile.faceTop; - var faceBottom = tile.faceBottom; - var collideUp = tile.collideUp; - var collideDown = tile.collideDown; - - if (!isLayer) - { - faceTop = true; - faceBottom = true; - collideUp = true; - collideDown = true; - } - - if (body.deltaY() < 0 && collideDown && body.checkCollision.up) - { - // Body is moving UP - if (faceBottom && body.y < tileBottom) - { - oy = body.y - tileBottom; - - if (oy < -tileBias) - { - oy = 0; - } - } - } - else if (body.deltaY() > 0 && collideUp && body.checkCollision.down) - { - // Body is moving DOWN - if (faceTop && body.bottom > tileTop) - { - oy = body.bottom - tileTop; - - if (oy > tileBias) - { - oy = 0; - } - } - } - - if (oy !== 0) - { - if (body.customSeparateY) - { - body.overlapY = oy; - } - else - { - ProcessTileSeparationY(body, oy); - } - } - - return oy; -}; - -module.exports = TileCheckY; - - /***/ }), /* 1301 */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey @@ -181855,40 +183693,22 @@ module.exports = TileCheckY; */ /** - * Internal function to process the separation of a physics body from a tile. - * - * @function Phaser.Physics.Arcade.Tilemap.ProcessTileSeparationY - * @since 3.0.0 - * - * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate. - * @param {number} y - The y separation amount. + * @namespace Phaser.Physics.Arcade.Tilemap */ -var ProcessTileSeparationY = function (body, y) -{ - if (y < 0) - { - body.blocked.none = false; - body.blocked.up = true; - } - else if (y > 0) - { - body.blocked.none = false; - body.blocked.down = true; - } - body.position.y -= y; +var Tilemap = { + + ProcessTileCallbacks: __webpack_require__(489), + ProcessTileSeparationX: __webpack_require__(493), + ProcessTileSeparationY: __webpack_require__(495), + SeparateTile: __webpack_require__(491), + TileCheckX: __webpack_require__(492), + TileCheckY: __webpack_require__(494), + TileIntersectsBody: __webpack_require__(231) - if (body.bounce.y === 0) - { - body.velocity.y = 0; - } - else - { - body.velocity.y = -body.velocity.y * body.bounce.y; - } }; -module.exports = ProcessTileSeparationY; +module.exports = Tilemap; /***/ }), @@ -181896,92 +183716,141 @@ module.exports = ProcessTileSeparationY; /***/ (function(module, exports, __webpack_require__) { /** + * @author Joachim Grill * @author Richard Davey + * @copyright 2018 CodeAndWeb GmbH * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetOverlapX = __webpack_require__(471); +var Bodies = __webpack_require__(114); +var Body = __webpack_require__(64); +var Common = __webpack_require__(44); +var GetFastValue = __webpack_require__(2); +var Vertices = __webpack_require__(88); /** - * Separates two overlapping bodies on the X-axis (horizontally). + * Use PhysicsEditorParser.parseBody() to build a Matter body object, based on a physics data file + * created and exported with PhysicsEditor (https://www.codeandweb.com/physicseditor). * - * Separation involves moving two overlapping bodies so they don't overlap anymore and adjusting their velocities based on their mass. This is a core part of collision detection. - * - * The bodies won't be separated if there is no horizontal overlap between them, if they are static, or if either one uses custom logic for its separation. - * - * @function Phaser.Physics.Arcade.SeparateX - * @since 3.0.0 - * - * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to separate. - * @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. - * - * @return {boolean} `true` if the two bodies overlap horizontally, otherwise `false`. + * @namespace Phaser.Physics.Matter.PhysicsEditorParser + * @since 3.10.0 */ -var SeparateX = function (body1, body2, overlapOnly, bias) -{ - var overlap = GetOverlapX(body1, body2, overlapOnly, bias); +var PhysicsEditorParser = { - // 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) + /** + * Parses a body element exported by PhysicsEditor. + * + * @function Phaser.Physics.Matter.PhysicsEditorParser.parseBody + * @since 3.10.0 + * + * @param {number} x - The horizontal world location of the body. + * @param {number} y - The vertical world location of the body. + * @param {object} config - The body configuration and fixture (child body) definitions, as exported by PhysicsEditor. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. + * + * @return {MatterJS.BodyType} A compound Matter JS Body. + */ + parseBody: function (x, y, config, options) { - // return true if there was some overlap, otherwise false - return (overlap !== 0) || (body1.embedded && body2.embedded); - } + if (options === undefined) { options = {}; } - // Adjust their positions and velocities accordingly (if there was any overlap) - var v1 = body1.velocity.x; - var v2 = body2.velocity.x; + var fixtureConfigs = GetFastValue(config, 'fixtures', []); + var fixtures = []; - if (!body1.immovable && !body2.immovable) - { - overlap *= 0.5; - - body1.x -= overlap; - body2.x += overlap; - - var nv1 = Math.sqrt((v2 * v2 * body2.mass) / body1.mass) * ((v2 > 0) ? 1 : -1); - var nv2 = Math.sqrt((v1 * v1 * body1.mass) / body2.mass) * ((v1 > 0) ? 1 : -1); - var avg = (nv1 + nv2) * 0.5; - - nv1 -= avg; - nv2 -= avg; - - body1.velocity.x = avg + nv1 * body1.bounce.x; - body2.velocity.x = avg + nv2 * body2.bounce.x; - } - else if (!body1.immovable) - { - body1.x -= overlap; - body1.velocity.x = v2 - v1 * body1.bounce.x; - - // This is special case code that handles things like vertically moving platforms you can ride - if (body2.moves) + for (var fc = 0; fc < fixtureConfigs.length; fc++) { - body1.y += (body2.y - body2.prev.y) * body2.friction.y; - body1._dy = body1.y - body1.prev.y; + var fixtureParts = this.parseFixture(fixtureConfigs[fc]); + + for (var i = 0; i < fixtureParts.length; i++) + { + fixtures.push(fixtureParts[i]); + } } - } - else + + var matterConfig = Common.clone(config, true); + + Common.extend(matterConfig, options, true); + + delete matterConfig.fixtures; + delete matterConfig.type; + + var body = Body.create(matterConfig); + + Body.setParts(body, fixtures); + + Body.setPosition(body, { x: x, y: y }); + + return body; + }, + + /** + * Parses an element of the "fixtures" list exported by PhysicsEditor + * + * @function Phaser.Physics.Matter.PhysicsEditorParser.parseFixture + * @since 3.10.0 + * + * @param {object} fixtureConfig - The fixture object to parse. + * + * @return {MatterJS.BodyType[]} - An array of Matter JS Bodies. + */ + parseFixture: function (fixtureConfig) { - body2.x += overlap; - body2.velocity.x = v1 - v2 * body2.bounce.x; + var matterConfig = Common.extend({}, false, fixtureConfig); - // This is special case code that handles things like vertically moving platforms you can ride - if (body1.moves) + delete matterConfig.circle; + delete matterConfig.vertices; + + var fixtures; + + if (fixtureConfig.circle) { - body2.y += (body1.y - body1.prev.y) * body1.friction.y; - body2._dy = body2.y - body2.prev.y; + var x = GetFastValue(fixtureConfig.circle, 'x'); + var y = GetFastValue(fixtureConfig.circle, 'y'); + var r = GetFastValue(fixtureConfig.circle, 'radius'); + fixtures = [ Bodies.circle(x, y, r, matterConfig) ]; + } + else if (fixtureConfig.vertices) + { + fixtures = this.parseVertices(fixtureConfig.vertices, matterConfig); } - } - // If we got this far then there WAS overlap, and separation is complete, so return true - return true; + return fixtures; + }, + + /** + * Parses the "vertices" lists exported by PhysicsEditor. + * + * @function Phaser.Physics.Matter.PhysicsEditorParser.parseVertices + * @since 3.10.0 + * + * @param {array} vertexSets - The vertex lists to parse. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. + * + * @return {MatterJS.BodyType[]} - An array of Matter JS Bodies. + */ + parseVertices: function (vertexSets, options) + { + if (options === undefined) { options = {}; } + + var parts = []; + + for (var v = 0; v < vertexSets.length; v++) + { + Vertices.clockwiseSort(vertexSets[v]); + + parts.push(Body.create(Common.extend({ + position: Vertices.centre(vertexSets[v]), + vertices: vertexSets[v] + }, options))); + } + + // flag coincident part edges + return Bodies.flagCoincidentParts(parts); + } }; -module.exports = SeparateX; +module.exports = PhysicsEditorParser; /***/ }), @@ -181994,87 +183863,111 @@ module.exports = SeparateX; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetOverlapY = __webpack_require__(472); +var Bodies = __webpack_require__(114); +var Body = __webpack_require__(64); /** - * Separates two overlapping bodies on the Y-axis (vertically). + * Creates a body using the supplied physics data, as provided by a JSON file. + * + * The data file should be loaded as JSON: + * + * ```javascript + * preload () + * { + * this.load.json('ninjas', 'assets/ninjas.json); + * } + * + * create () + * { + * const ninjaShapes = this.cache.json.get('ninjas'); + * + * this.matter.add.fromJSON(400, 300, ninjaShapes.shinobi); + * } + * ``` + * + * Do not pass the entire JSON file to this method, but instead pass one of the shapes contained within it. + * + * If you pas in an `options` object, any settings in there will override those in the config object. + * + * The structure of the JSON file is as follows: + * + * ```text + * { + * 'generator_info': // The name of the application that created the JSON data + * 'shapeName': { + * 'type': // The type of body + * 'label': // Optional body label + * 'vertices': // An array, or an array of arrays, containing the vertex data in x/y object pairs + * } + * } + * ``` + * + * At the time of writing, only the Phaser Physics Tracer App exports in this format. * - * Separation involves moving two overlapping bodies so they don't overlap anymore and adjusting their velocities based on their mass. This is a core part of collision detection. - * - * The bodies won't be separated if there is no vertical overlap between them, if they are static, or if either one uses custom logic for its separation. - * - * @function Phaser.Physics.Arcade.SeparateY - * @since 3.0.0 - * - * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to separate. - * @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. - * - * @return {boolean} `true` if the two bodies overlap vertically, otherwise `false`. + * @namespace Phaser.Physics.Matter.PhysicsJSONParser + * @since 3.22.0 */ -var SeparateY = function (body1, body2, overlapOnly, bias) -{ - var overlap = GetOverlapY(body1, body2, overlapOnly, bias); +var PhysicsJSONParser = { - // Can't separate two immovable bodies, or a body with its own custom separation logic - if (overlapOnly || overlap === 0 || (body1.immovable && body2.immovable) || body1.customSeparateY || body2.customSeparateY) + /** + * Parses a body element from the given JSON data. + * + * @function Phaser.Physics.Matter.PhysicsJSONParser.parseBody + * @since 3.22.0 + * + * @param {number} x - The horizontal world location of the body. + * @param {number} y - The vertical world location of the body. + * @param {object} config - The body configuration data. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. + * + * @return {MatterJS.BodyType} A Matter JS Body. + */ + parseBody: function (x, y, config, options) { - // return true if there was some overlap, otherwise false - return (overlap !== 0) || (body1.embedded && body2.embedded); - } + if (options === undefined) { options = {}; } - // Adjust their positions and velocities accordingly (if there was any overlap) - var v1 = body1.velocity.y; - var v2 = body2.velocity.y; + var body; + var vertexSets = config.vertices; - if (!body1.immovable && !body2.immovable) - { - overlap *= 0.5; - - body1.y -= overlap; - body2.y += overlap; - - var nv1 = Math.sqrt((v2 * v2 * body2.mass) / body1.mass) * ((v2 > 0) ? 1 : -1); - var nv2 = Math.sqrt((v1 * v1 * body1.mass) / body2.mass) * ((v1 > 0) ? 1 : -1); - var avg = (nv1 + nv2) * 0.5; - - nv1 -= avg; - nv2 -= avg; - - body1.velocity.y = avg + nv1 * body1.bounce.y; - body2.velocity.y = avg + nv2 * body2.bounce.y; - } - else if (!body1.immovable) - { - body1.y -= overlap; - body1.velocity.y = v2 - v1 * body1.bounce.y; - - // This is special case code that handles things like horizontal moving platforms you can ride - if (body2.moves) + if (vertexSets.length === 1) { - body1.x += (body2.x - body2.prev.x) * body2.friction.x; - body1._dx = body1.x - body1.prev.x; - } - } - else - { - body2.y += overlap; - body2.velocity.y = v1 - v2 * body2.bounce.y; + // Just a single Body + options.vertices = vertexSets[0]; - // This is special case code that handles things like horizontal moving platforms you can ride - if (body1.moves) + body = Body.create(options); + + Bodies.flagCoincidentParts(body.parts); + } + else { - body2.x += (body1.x - body1.prev.x) * body1.friction.x; - body2._dx = body2.x - body2.prev.x; + var parts = []; + + for (var i = 0; i < vertexSets.length; i++) + { + var part = Body.create({ + vertices: vertexSets[i] + }); + + parts.push(part); + } + + Bodies.flagCoincidentParts(parts); + + options.parts = parts; + + body = Body.create(options); } + + body.label = config.label; + + Body.setPosition(body, { x: x, y: y }); + + return body; } - // If we got this far then there WAS overlap, and separation is complete, so return true - return true; }; -module.exports = SeparateY; +module.exports = PhysicsJSONParser; /***/ }), @@ -182094,11 +183987,11 @@ var Composites = {}; module.exports = Composites; -var Composite = __webpack_require__(153); -var Constraint = __webpack_require__(225); -var Common = __webpack_require__(43); -var Body = __webpack_require__(62); -var Bodies = __webpack_require__(113); +var Composite = __webpack_require__(156); +var Constraint = __webpack_require__(232); +var Common = __webpack_require__(44); +var Body = __webpack_require__(64); +var Bodies = __webpack_require__(114); (function() { @@ -182428,8 +184321,8 @@ var Svg = {}; module.exports = Svg; -var Bounds = __webpack_require__(101); -var Common = __webpack_require__(43); +var Bounds = __webpack_require__(102); +var Common = __webpack_require__(44); (function() { @@ -182645,315 +184538,20 @@ var Common = __webpack_require__(43); /* 1306 */ /***/ (function(module, exports, __webpack_require__) { -/** - * @author Joachim Grill - * @author Richard Davey - * @copyright 2018 CodeAndWeb GmbH - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Bodies = __webpack_require__(113); -var Body = __webpack_require__(62); -var Common = __webpack_require__(43); -var GetFastValue = __webpack_require__(2); -var Vertices = __webpack_require__(87); - -/** - * Use PhysicsEditorParser.parseBody() to build a Matter body object, based on a physics data file - * created and exported with PhysicsEditor (https://www.codeandweb.com/physicseditor). - * - * @namespace Phaser.Physics.Matter.PhysicsEditorParser - * @since 3.10.0 - */ -var PhysicsEditorParser = { - - /** - * Parses a body element exported by PhysicsEditor. - * - * @function Phaser.Physics.Matter.PhysicsEditorParser.parseBody - * @since 3.10.0 - * - * @param {number} x - The horizontal world location of the body. - * @param {number} y - The vertical world location of the body. - * @param {object} config - The body configuration and fixture (child body) definitions, as exported by PhysicsEditor. - * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. - * - * @return {MatterJS.BodyType} A compound Matter JS Body. - */ - parseBody: function (x, y, config, options) - { - if (options === undefined) { options = {}; } - - var fixtureConfigs = GetFastValue(config, 'fixtures', []); - var fixtures = []; - - for (var fc = 0; fc < fixtureConfigs.length; fc++) - { - var fixtureParts = this.parseFixture(fixtureConfigs[fc]); - - for (var i = 0; i < fixtureParts.length; i++) - { - fixtures.push(fixtureParts[i]); - } - } - - var matterConfig = Common.clone(config, true); - - Common.extend(matterConfig, options, true); - - delete matterConfig.fixtures; - delete matterConfig.type; - - var body = Body.create(matterConfig); - - Body.setParts(body, fixtures); - - Body.setPosition(body, { x: x, y: y }); - - return body; - }, - - /** - * Parses an element of the "fixtures" list exported by PhysicsEditor - * - * @function Phaser.Physics.Matter.PhysicsEditorParser.parseFixture - * @since 3.10.0 - * - * @param {object} fixtureConfig - The fixture object to parse. - * - * @return {MatterJS.BodyType[]} - An array of Matter JS Bodies. - */ - parseFixture: function (fixtureConfig) - { - var matterConfig = Common.extend({}, false, fixtureConfig); - - delete matterConfig.circle; - delete matterConfig.vertices; - - var fixtures; - - if (fixtureConfig.circle) - { - var x = GetFastValue(fixtureConfig.circle, 'x'); - var y = GetFastValue(fixtureConfig.circle, 'y'); - var r = GetFastValue(fixtureConfig.circle, 'radius'); - fixtures = [ Bodies.circle(x, y, r, matterConfig) ]; - } - else if (fixtureConfig.vertices) - { - fixtures = this.parseVertices(fixtureConfig.vertices, matterConfig); - } - - return fixtures; - }, - - /** - * Parses the "vertices" lists exported by PhysicsEditor. - * - * @function Phaser.Physics.Matter.PhysicsEditorParser.parseVertices - * @since 3.10.0 - * - * @param {array} vertexSets - The vertex lists to parse. - * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. - * - * @return {MatterJS.BodyType[]} - An array of Matter JS Bodies. - */ - parseVertices: function (vertexSets, options) - { - if (options === undefined) { options = {}; } - - var parts = []; - - for (var v = 0; v < vertexSets.length; v++) - { - Vertices.clockwiseSort(vertexSets[v]); - - parts.push(Body.create(Common.extend({ - position: Vertices.centre(vertexSets[v]), - vertices: vertexSets[v] - }, options))); - } - - // flag coincident part edges - return Bodies.flagCoincidentParts(parts); - } -}; - -module.exports = PhysicsEditorParser; - - -/***/ }), -/* 1307 */ -/***/ (function(module, exports, __webpack_require__) { - /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bodies = __webpack_require__(113); -var Body = __webpack_require__(62); - -/** - * Creates a body using the supplied physics data, as provided by a JSON file. - * - * The data file should be loaded as JSON: - * - * ```javascript - * preload () - * { - * this.load.json('ninjas', 'assets/ninjas.json); - * } - * - * create () - * { - * const ninjaShapes = this.cache.json.get('ninjas'); - * - * this.matter.add.fromJSON(400, 300, ninjaShapes.shinobi); - * } - * ``` - * - * Do not pass the entire JSON file to this method, but instead pass one of the shapes contained within it. - * - * If you pas in an `options` object, any settings in there will override those in the config object. - * - * The structure of the JSON file is as follows: - * - * ```text - * { - * 'generator_info': // The name of the application that created the JSON data - * 'shapeName': { - * 'type': // The type of body - * 'label': // Optional body label - * 'vertices': // An array, or an array of arrays, containing the vertex data in x/y object pairs - * } - * } - * ``` - * - * At the time of writing, only the Phaser Physics Tracer App exports in this format. - * - * @namespace Phaser.Physics.Matter.PhysicsJSONParser - * @since 3.22.0 - */ -var PhysicsJSONParser = { - - /** - * Parses a body element from the given JSON data. - * - * @function Phaser.Physics.Matter.PhysicsJSONParser.parseBody - * @since 3.22.0 - * - * @param {number} x - The horizontal world location of the body. - * @param {number} y - The vertical world location of the body. - * @param {object} config - The body configuration data. - * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. - * - * @return {MatterJS.BodyType} A Matter JS Body. - */ - parseBody: function (x, y, config, options) - { - if (options === undefined) { options = {}; } - - var body; - var vertexSets = config.vertices; - - if (vertexSets.length === 1) - { - // Just a single Body - options.vertices = vertexSets[0]; - - body = Body.create(options); - - Bodies.flagCoincidentParts(body.parts); - } - else - { - var parts = []; - - for (var i = 0; i < vertexSets.length; i++) - { - var part = Body.create({ - vertices: vertexSets[i] - }); - - parts.push(part); - } - - Bodies.flagCoincidentParts(parts); - - options.parts = parts; - - body = Body.create(options); - } - - body.label = config.label; - - Body.setPosition(body, { x: x, y: y }); - - return body; - } - -}; - -module.exports = PhysicsJSONParser; - - -/***/ }), -/* 1308 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Physics.Matter.Events - */ - -module.exports = { - - AFTER_ADD: __webpack_require__(1425), - AFTER_REMOVE: __webpack_require__(1426), - AFTER_UPDATE: __webpack_require__(1427), - BEFORE_ADD: __webpack_require__(1428), - BEFORE_REMOVE: __webpack_require__(1429), - BEFORE_UPDATE: __webpack_require__(1430), - COLLISION_ACTIVE: __webpack_require__(1431), - COLLISION_END: __webpack_require__(1432), - COLLISION_START: __webpack_require__(1433), - DRAG_END: __webpack_require__(1434), - DRAG: __webpack_require__(1435), - DRAG_START: __webpack_require__(1436), - PAUSE: __webpack_require__(1437), - RESUME: __webpack_require__(1438), - SLEEP_END: __webpack_require__(1439), - SLEEP_START: __webpack_require__(1440) - -}; - - -/***/ }), -/* 1309 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Bodies = __webpack_require__(113); -var Body = __webpack_require__(62); +var Bodies = __webpack_require__(114); +var Body = __webpack_require__(64); var Class = __webpack_require__(0); -var Components = __webpack_require__(518); -var EventEmitter = __webpack_require__(11); +var Components = __webpack_require__(499); +var EventEmitter = __webpack_require__(12); var GetFastValue = __webpack_require__(2); -var HasValue = __webpack_require__(112); -var Vertices = __webpack_require__(87); +var HasValue = __webpack_require__(113); +var Vertices = __webpack_require__(88); /** * @classdesc @@ -183257,7 +184855,7 @@ module.exports = MatterTileBody; /***/ }), -/* 1310 */ +/* 1307 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183270,36 +184868,36 @@ module.exports = MatterTileBody; * @namespace Phaser.Physics.Matter.Matter */ -var Matter = __webpack_require__(1407); +var Matter = __webpack_require__(1406); -Matter.Body = __webpack_require__(62); -Matter.Composite = __webpack_require__(153); -Matter.World = __webpack_require__(1312); +Matter.Body = __webpack_require__(64); +Matter.Composite = __webpack_require__(156); +Matter.World = __webpack_require__(1309); -Matter.Detector = __webpack_require__(519); -Matter.Grid = __webpack_require__(1313); -Matter.Pairs = __webpack_require__(1314); -Matter.Pair = __webpack_require__(476); -Matter.Query = __webpack_require__(1408); -Matter.Resolver = __webpack_require__(1315); -Matter.SAT = __webpack_require__(520); +Matter.Detector = __webpack_require__(542); +Matter.Grid = __webpack_require__(1310); +Matter.Pairs = __webpack_require__(1311); +Matter.Pair = __webpack_require__(500); +Matter.Query = __webpack_require__(1407); +Matter.Resolver = __webpack_require__(1312); +Matter.SAT = __webpack_require__(543); -Matter.Constraint = __webpack_require__(225); +Matter.Constraint = __webpack_require__(232); -Matter.Common = __webpack_require__(43); -Matter.Engine = __webpack_require__(1409); -Matter.Events = __webpack_require__(244); -Matter.Sleeping = __webpack_require__(243); -Matter.Plugin = __webpack_require__(1311); +Matter.Common = __webpack_require__(44); +Matter.Engine = __webpack_require__(1408); +Matter.Events = __webpack_require__(250); +Matter.Sleeping = __webpack_require__(249); +Matter.Plugin = __webpack_require__(1308); -Matter.Bodies = __webpack_require__(113); +Matter.Bodies = __webpack_require__(114); Matter.Composites = __webpack_require__(1304); -Matter.Axes = __webpack_require__(517); -Matter.Bounds = __webpack_require__(101); +Matter.Axes = __webpack_require__(540); +Matter.Bounds = __webpack_require__(102); Matter.Svg = __webpack_require__(1305); -Matter.Vector = __webpack_require__(100); -Matter.Vertices = __webpack_require__(87); +Matter.Vector = __webpack_require__(101); +Matter.Vertices = __webpack_require__(88); // aliases @@ -183314,7 +184912,7 @@ module.exports = Matter; /***/ }), -/* 1311 */ +/* 1308 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183327,7 +184925,7 @@ var Plugin = {}; module.exports = Plugin; -var Common = __webpack_require__(43); +var Common = __webpack_require__(44); (function() { @@ -183664,7 +185262,7 @@ var Common = __webpack_require__(43); /***/ }), -/* 1312 */ +/* 1309 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183684,9 +185282,9 @@ var World = {}; module.exports = World; -var Composite = __webpack_require__(153); -var Constraint = __webpack_require__(225); -var Common = __webpack_require__(43); +var Composite = __webpack_require__(156); +var Constraint = __webpack_require__(232); +var Common = __webpack_require__(44); (function() { @@ -183817,7 +185415,7 @@ var Common = __webpack_require__(43); /***/ }), -/* 1313 */ +/* 1310 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183830,9 +185428,9 @@ var Grid = {}; module.exports = Grid; -var Pair = __webpack_require__(476); -var Detector = __webpack_require__(519); -var Common = __webpack_require__(43); +var Pair = __webpack_require__(500); +var Detector = __webpack_require__(542); +var Common = __webpack_require__(44); (function() { @@ -184144,7 +185742,7 @@ var Common = __webpack_require__(43); /***/ }), -/* 1314 */ +/* 1311 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -184157,8 +185755,8 @@ var Pairs = {}; module.exports = Pairs; -var Pair = __webpack_require__(476); -var Common = __webpack_require__(43); +var Pair = __webpack_require__(500); +var Common = __webpack_require__(44); (function() { @@ -184309,7 +185907,7 @@ var Common = __webpack_require__(43); /***/ }), -/* 1315 */ +/* 1312 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -184322,10 +185920,10 @@ var Resolver = {}; module.exports = Resolver; -var Vertices = __webpack_require__(87); -var Vector = __webpack_require__(100); -var Common = __webpack_require__(43); -var Bounds = __webpack_require__(101); +var Vertices = __webpack_require__(88); +var Vector = __webpack_require__(101); +var Common = __webpack_require__(44); +var Bounds = __webpack_require__(102); (function() { @@ -184665,7 +186263,7 @@ var Bounds = __webpack_require__(101); /***/ }), -/* 1316 */ +/* 1313 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -184680,17 +186278,17 @@ var Bounds = __webpack_require__(101); module.exports = { - BasePlugin: __webpack_require__(477), - DefaultPlugins: __webpack_require__(180), + BasePlugin: __webpack_require__(501), + DefaultPlugins: __webpack_require__(182), PluginCache: __webpack_require__(23), - PluginManager: __webpack_require__(370), - ScenePlugin: __webpack_require__(1317) + PluginManager: __webpack_require__(380), + ScenePlugin: __webpack_require__(1314) }; /***/ }), -/* 1317 */ +/* 1314 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -184699,9 +186297,9 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ -var BasePlugin = __webpack_require__(477); +var BasePlugin = __webpack_require__(501); var Class = __webpack_require__(0); -var SceneEvents = __webpack_require__(22); +var SceneEvents = __webpack_require__(20); /** * @classdesc @@ -184818,7 +186416,7 @@ module.exports = ScenePlugin; /***/ }), -/* 1318 */ +/* 1315 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -184828,7 +186426,7 @@ module.exports = ScenePlugin; */ var Extend = __webpack_require__(19); -var CONST = __webpack_require__(183); +var CONST = __webpack_require__(185); /** * @namespace Phaser.Scale @@ -184856,12 +186454,12 @@ var CONST = __webpack_require__(183); var Scale = { - Center: __webpack_require__(359), + Center: __webpack_require__(369), Events: __webpack_require__(93), - Orientation: __webpack_require__(360), - ScaleManager: __webpack_require__(371), - ScaleModes: __webpack_require__(361), - Zoom: __webpack_require__(362) + Orientation: __webpack_require__(370), + ScaleManager: __webpack_require__(381), + ScaleModes: __webpack_require__(371), + Zoom: __webpack_require__(372) }; @@ -184874,7 +186472,7 @@ module.exports = Scale; /***/ }), -/* 1319 */ +/* 1316 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -184883,7 +186481,7 @@ module.exports = Scale; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(131); +var CONST = __webpack_require__(132); var Extend = __webpack_require__(19); /** @@ -184892,11 +186490,13 @@ var Extend = __webpack_require__(19); var Scene = { - Events: __webpack_require__(22), - SceneManager: __webpack_require__(373), - ScenePlugin: __webpack_require__(1320), - Settings: __webpack_require__(375), - Systems: __webpack_require__(186) + Events: __webpack_require__(20), + GetPhysicsPlugins: __webpack_require__(385), + GetScenePlugins: __webpack_require__(386), + SceneManager: __webpack_require__(383), + ScenePlugin: __webpack_require__(1317), + Settings: __webpack_require__(387), + Systems: __webpack_require__(188) }; @@ -184907,7 +186507,7 @@ module.exports = Scene; /***/ }), -/* 1320 */ +/* 1317 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -184918,7 +186518,7 @@ module.exports = Scene; var Clamp = __webpack_require__(17); var Class = __webpack_require__(0); -var Events = __webpack_require__(22); +var Events = __webpack_require__(20); var GetFastValue = __webpack_require__(2); var PluginCache = __webpack_require__(23); @@ -185917,7 +187517,7 @@ module.exports = ScenePlugin; /***/ }), -/* 1321 */ +/* 1318 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -185932,18 +187532,19 @@ module.exports = ScenePlugin; module.exports = { - List: __webpack_require__(135), - Map: __webpack_require__(168), - ProcessQueue: __webpack_require__(192), - RTree: __webpack_require__(473), - Set: __webpack_require__(139), - Size: __webpack_require__(372) + Events: __webpack_require__(404), + List: __webpack_require__(136), + Map: __webpack_require__(121), + ProcessQueue: __webpack_require__(195), + RTree: __webpack_require__(490), + Set: __webpack_require__(140), + Size: __webpack_require__(382) }; /***/ }), -/* 1322 */ +/* 1319 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -185953,7 +187554,7 @@ module.exports = { */ var Extend = __webpack_require__(19); -var FilterMode = __webpack_require__(1323); +var FilterMode = __webpack_require__(1320); /** * @namespace Phaser.Textures @@ -185979,14 +187580,14 @@ var FilterMode = __webpack_require__(1323); var Textures = { - CanvasTexture: __webpack_require__(377), - Events: __webpack_require__(127), + CanvasTexture: __webpack_require__(389), + Events: __webpack_require__(129), FilterMode: FilterMode, - Frame: __webpack_require__(95), - Parsers: __webpack_require__(379), - Texture: __webpack_require__(188), - TextureManager: __webpack_require__(376), - TextureSource: __webpack_require__(378) + Frame: __webpack_require__(96), + Parsers: __webpack_require__(391), + Texture: __webpack_require__(190), + TextureManager: __webpack_require__(388), + TextureSource: __webpack_require__(390) }; @@ -185996,7 +187597,7 @@ module.exports = Textures; /***/ }), -/* 1323 */ +/* 1320 */ /***/ (function(module, exports) { /** @@ -186040,7 +187641,7 @@ module.exports = CONST; /***/ }), -/* 1324 */ +/* 1321 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186055,30 +187656,30 @@ module.exports = CONST; module.exports = { - Components: __webpack_require__(147), - Parsers: __webpack_require__(1354), + Components: __webpack_require__(148), + Parsers: __webpack_require__(1351), - Formats: __webpack_require__(32), - ImageCollection: __webpack_require__(488), - ParseToTilemap: __webpack_require__(233), - Tile: __webpack_require__(74), - Tilemap: __webpack_require__(497), - TilemapCreator: __webpack_require__(1368), - TilemapFactory: __webpack_require__(1369), - Tileset: __webpack_require__(105), + Formats: __webpack_require__(33), + ImageCollection: __webpack_require__(512), + ParseToTilemap: __webpack_require__(238), + Tile: __webpack_require__(75), + Tilemap: __webpack_require__(521), + TilemapCreator: __webpack_require__(1365), + TilemapFactory: __webpack_require__(1366), + Tileset: __webpack_require__(106), - LayerData: __webpack_require__(103), - MapData: __webpack_require__(104), - ObjectLayer: __webpack_require__(491), + LayerData: __webpack_require__(104), + MapData: __webpack_require__(105), + ObjectLayer: __webpack_require__(515), - DynamicTilemapLayer: __webpack_require__(498), - StaticTilemapLayer: __webpack_require__(499) + DynamicTilemapLayer: __webpack_require__(522), + StaticTilemapLayer: __webpack_require__(523) }; /***/ }), -/* 1325 */ +/* 1322 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186088,7 +187689,7 @@ module.exports = { */ var GetTilesWithin = __webpack_require__(24); -var CalculateFacesWithin = __webpack_require__(52); +var CalculateFacesWithin = __webpack_require__(53); /** * Copies the tiles in the source rectangular area to a new destination (all specified in tile @@ -186096,7 +187697,6 @@ var CalculateFacesWithin = __webpack_require__(52); * information in the destination region. * * @function Phaser.Tilemaps.Components.Copy - * @private * @since 3.0.0 * * @param {integer} srcTileX - The x coordinate of the area to copy from, in tiles, not pixels. @@ -186123,6 +187723,7 @@ var Copy = function (srcTileX, srcTileY, width, height, destTileX, destTileY, re { var tileX = srcTiles[i].x + offsetX; var tileY = srcTiles[i].y + offsetY; + if (tileX >= 0 && tileX < layer.width && tileY >= 0 && tileY < layer.height) { if (layer.data[tileY][tileX]) @@ -186143,7 +187744,7 @@ module.exports = Copy; /***/ }), -/* 1326 */ +/* 1323 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186152,10 +187753,10 @@ module.exports = Copy; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileToWorldX = __webpack_require__(149); -var TileToWorldY = __webpack_require__(150); +var TileToWorldX = __webpack_require__(150); +var TileToWorldY = __webpack_require__(151); var GetTilesWithin = __webpack_require__(24); -var ReplaceByIndex = __webpack_require__(478); +var ReplaceByIndex = __webpack_require__(502); /** * Creates a Sprite for every object matching the given tile indexes in the layer. You can @@ -186164,11 +187765,10 @@ var ReplaceByIndex = __webpack_require__(478); * Sprites, but want to replace the tile itself with a floor tile or similar once converted. * * @function Phaser.Tilemaps.Components.CreateFromTiles - * @private * @since 3.0.0 * - * @param {(integer|array)} indexes - The tile index, or array of indexes, to create Sprites from. - * @param {(integer|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 {(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 {Phaser.Types.GameObjects.Sprite.SpriteConfig} spriteConfig - The config object to pass into the Sprite creator (i.e. scene.make.sprite). * @param {Phaser.Scene} [scene=scene the map is within] - The Scene to create the Sprites within. * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when determining the world XY @@ -186180,9 +187780,13 @@ var CreateFromTiles = function (indexes, replacements, spriteConfig, scene, came { if (spriteConfig === undefined) { spriteConfig = {}; } - if (!Array.isArray(indexes)) { indexes = [ indexes ]; } + if (!Array.isArray(indexes)) + { + indexes = [ indexes ]; + } var tilemapLayer = layer.tilemapLayer; + if (scene === undefined) { scene = tilemapLayer.scene; } if (camera === undefined) { camera = scene.cameras.main; } @@ -186199,8 +187803,7 @@ var CreateFromTiles = function (indexes, replacements, spriteConfig, scene, came spriteConfig.x = TileToWorldX(tile.x, camera, layer); spriteConfig.y = TileToWorldY(tile.y, camera, layer); - var sprite = scene.make.sprite(spriteConfig); - sprites.push(sprite); + sprites.push(scene.make.sprite(spriteConfig)); } } @@ -186228,7 +187831,7 @@ module.exports = CreateFromTiles; /***/ }), -/* 1327 */ +/* 1324 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186238,13 +187841,12 @@ module.exports = CreateFromTiles; */ var SnapFloor = __webpack_require__(94); -var SnapCeil = __webpack_require__(334); +var SnapCeil = __webpack_require__(342); /** * Returns the tiles in the given layer that are within the camera's viewport. This is used internally. * * @function Phaser.Tilemaps.Components.CullTiles - * @private * @since 3.0.0 * * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. @@ -186385,7 +187987,7 @@ module.exports = CullTiles; /***/ }), -/* 1328 */ +/* 1325 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186395,8 +187997,8 @@ module.exports = CullTiles; */ var GetTilesWithin = __webpack_require__(24); -var CalculateFacesWithin = __webpack_require__(52); -var SetTileCollision = __webpack_require__(73); +var CalculateFacesWithin = __webpack_require__(53); +var SetTileCollision = __webpack_require__(65); /** * Sets the tiles in the given rectangular area (in tile coordinates) of the layer with the @@ -186404,7 +188006,6 @@ var SetTileCollision = __webpack_require__(73); * Collision information in the region will be recalculated. * * @function Phaser.Tilemaps.Components.Fill - * @private * @since 3.0.0 * * @param {integer} index - The tile index to fill the area with. @@ -186439,7 +188040,7 @@ module.exports = Fill; /***/ }), -/* 1329 */ +/* 1326 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186456,7 +188057,6 @@ var GetTilesWithin = __webpack_require__(24); * true) will returned as a new array. Similar to Array.prototype.Filter in vanilla JS. * * @function Phaser.Tilemaps.Components.FilterTiles - * @private * @since 3.0.0 * * @param {function} callback - The callback. Each tile in the given area will be passed to this @@ -186472,7 +188072,7 @@ var GetTilesWithin = __webpack_require__(24); * @param {boolean} [filteringOptions.isColliding=false] - If true, only return tiles that collide on at least one side. * @param {boolean} [filteringOptions.hasInterestingFace=false] - If true, only return tiles that have at least one interesting face. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {Phaser.Tilemaps.Tile[]} The filtered array of Tiles. */ var FilterTiles = function (callback, context, tileX, tileY, width, height, filteringOptions, layer) @@ -186485,9 +188085,8 @@ var FilterTiles = function (callback, context, tileX, tileY, width, height, filt module.exports = FilterTiles; - /***/ }), -/* 1330 */ +/* 1327 */ /***/ (function(module, exports) { /** @@ -186504,7 +188103,6 @@ module.exports = FilterTiles; * the top-left. * * @function Phaser.Tilemaps.Components.FindByIndex - * @private * @since 3.0.0 * * @param {integer} index - The tile index value to search for. @@ -186575,7 +188173,7 @@ module.exports = FindByIndex; /***/ }), -/* 1331 */ +/* 1328 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186602,7 +188200,6 @@ var GetTilesWithin = __webpack_require__(24); * true. Similar to Array.prototype.find in vanilla JS. * * @function Phaser.Tilemaps.Components.FindTile - * @private * @since 3.0.0 * * @param {FindTileCallback} callback - The callback. Each tile in the given area will be passed to this callback as the first and only parameter. @@ -186629,7 +188226,7 @@ module.exports = FindTile; /***/ }), -/* 1332 */ +/* 1329 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186653,7 +188250,6 @@ var GetTilesWithin = __webpack_require__(24); * callback. Similar to Array.prototype.forEach in vanilla JS. * * @function Phaser.Tilemaps.Components.ForEachTile - * @private * @since 3.0.0 * * @param {EachTileCallback} callback - The callback. Each tile in the given area will be passed to this callback as the first and only parameter. @@ -186679,7 +188275,7 @@ module.exports = ForEachTile; /***/ }), -/* 1333 */ +/* 1330 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186688,15 +188284,14 @@ module.exports = ForEachTile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(148); -var WorldToTileX = __webpack_require__(63); -var WorldToTileY = __webpack_require__(64); +var GetTileAt = __webpack_require__(149); +var WorldToTileX = __webpack_require__(66); +var WorldToTileY = __webpack_require__(67); /** * Gets a tile at the given world coordinates from the given layer. * * @function Phaser.Tilemaps.Components.GetTileAtWorldXY - * @private * @since 3.0.0 * * @param {number} worldX - X position to get the tile from (given in pixels) @@ -186704,7 +188299,7 @@ var WorldToTileY = __webpack_require__(64); * @param {boolean} [nonNull=false] - If true, function won't return null for empty tiles, but a Tile object with an index of -1. * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {Phaser.Tilemaps.Tile} The tile at the given coordinates or null if no tile was found or the coordinates * were invalid. */ @@ -186720,7 +188315,7 @@ module.exports = GetTileAtWorldXY; /***/ }), -/* 1334 */ +/* 1331 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186729,14 +188324,14 @@ module.exports = GetTileAtWorldXY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Geom = __webpack_require__(430); +var Geom = __webpack_require__(447); var GetTilesWithin = __webpack_require__(24); -var Intersects = __webpack_require__(431); +var Intersects = __webpack_require__(448); var NOOP = __webpack_require__(1); -var TileToWorldX = __webpack_require__(149); -var TileToWorldY = __webpack_require__(150); -var WorldToTileX = __webpack_require__(63); -var WorldToTileY = __webpack_require__(64); +var TileToWorldX = __webpack_require__(150); +var TileToWorldY = __webpack_require__(151); +var WorldToTileX = __webpack_require__(66); +var WorldToTileY = __webpack_require__(67); var TriangleToRectangle = function (triangle, rect) { @@ -186751,7 +188346,6 @@ var TriangleToRectangle = function (triangle, rect) * Line, Rectangle or Triangle. The shape should be in world coordinates. * * @function Phaser.Tilemaps.Components.GetTilesWithinShape - * @private * @since 3.0.0 * * @param {(Phaser.Geom.Circle|Phaser.Geom.Line|Phaser.Geom.Rectangle|Phaser.Geom.Triangle)} shape - A shape in world (pixel) coordinates @@ -186770,10 +188364,33 @@ var GetTilesWithinShape = function (shape, filteringOptions, camera, layer) // intersectTest is a function with parameters: shape, rect var intersectTest = NOOP; - if (shape instanceof Geom.Circle) { intersectTest = Intersects.CircleToRectangle; } - else if (shape instanceof Geom.Rectangle) { intersectTest = Intersects.RectangleToRectangle; } - else if (shape instanceof Geom.Triangle) { intersectTest = TriangleToRectangle; } - else if (shape instanceof Geom.Line) { intersectTest = Intersects.LineToRectangle; } + + switch (typeof(shape)) + { + case Geom.Circle: + { + intersectTest = Intersects.CircleToRectangle; + break; + } + + case Geom.Rectangle: + { + intersectTest = Intersects.RectangleToRectangle; + break; + } + + case Geom.Triangle: + { + intersectTest = TriangleToRectangle; + break; + } + + case Geom.Line: + { + intersectTest = Intersects.LineToRectangle; + break; + } + } // Top left corner of the shapes's bounding box, rounded down to include partial tiles var xStart = WorldToTileX(shape.left, true, camera, layer); @@ -186791,6 +188408,7 @@ var GetTilesWithinShape = function (shape, filteringOptions, camera, layer) var tileWidth = layer.tileWidth; var tileHeight = layer.tileHeight; + if (layer.tilemapLayer) { tileWidth *= layer.tilemapLayer.scaleX; @@ -186799,11 +188417,14 @@ var GetTilesWithinShape = function (shape, filteringOptions, camera, layer) var results = []; var tileRect = new Geom.Rectangle(0, 0, tileWidth, tileHeight); + for (var i = 0; i < tiles.length; i++) { var tile = tiles[i]; + tileRect.x = TileToWorldX(tile.x, camera, layer); tileRect.y = TileToWorldY(tile.y, camera, layer); + if (intersectTest(shape, tileRect)) { results.push(tile); @@ -186817,7 +188438,7 @@ module.exports = GetTilesWithinShape; /***/ }), -/* 1335 */ +/* 1332 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186827,14 +188448,13 @@ module.exports = GetTilesWithinShape; */ var GetTilesWithin = __webpack_require__(24); -var WorldToTileX = __webpack_require__(63); -var WorldToTileY = __webpack_require__(64); +var WorldToTileX = __webpack_require__(66); +var WorldToTileY = __webpack_require__(67); /** * Gets the tiles in the given rectangular area (in world coordinates) of the layer. * * @function Phaser.Tilemaps.Components.GetTilesWithinWorldXY - * @private * @since 3.0.0 * * @param {number} worldX - The world x coordinate for the top-left of the area. @@ -186847,7 +188467,7 @@ var WorldToTileY = __webpack_require__(64); * @param {boolean} [filteringOptions.hasInterestingFace=false] - If true, only return tiles that have at least one interesting face. * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {Phaser.Tilemaps.Tile[]} Array of Tile objects. */ var GetTilesWithinWorldXY = function (worldX, worldY, width, height, filteringOptions, camera, layer) @@ -186867,7 +188487,7 @@ module.exports = GetTilesWithinWorldXY; /***/ }), -/* 1336 */ +/* 1333 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186876,23 +188496,22 @@ module.exports = GetTilesWithinWorldXY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HasTileAt = __webpack_require__(479); -var WorldToTileX = __webpack_require__(63); -var WorldToTileY = __webpack_require__(64); +var HasTileAt = __webpack_require__(503); +var WorldToTileX = __webpack_require__(66); +var WorldToTileY = __webpack_require__(67); /** * Checks if there is a tile at the given location (in world coordinates) in the given layer. Returns * false if there is no tile or if the tile at that location has an index of -1. * * @function Phaser.Tilemaps.Components.HasTileAtWorldXY - * @private * @since 3.0.0 * * @param {number} worldX - The X coordinate of the world position. * @param {number} worldY - The Y coordinate of the world position. * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {?boolean} Returns a boolean, or null if the layer given was invalid. */ var HasTileAtWorldXY = function (worldX, worldY, camera, layer) @@ -186907,7 +188526,7 @@ module.exports = HasTileAtWorldXY; /***/ }), -/* 1337 */ +/* 1334 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186916,9 +188535,9 @@ module.exports = HasTileAtWorldXY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PutTileAt = __webpack_require__(227); -var WorldToTileX = __webpack_require__(63); -var WorldToTileY = __webpack_require__(64); +var PutTileAt = __webpack_require__(234); +var WorldToTileX = __webpack_require__(66); +var WorldToTileY = __webpack_require__(67); /** * Puts a tile at the given world coordinates (pixels) in the specified layer. You can pass in either @@ -186927,7 +188546,6 @@ var WorldToTileY = __webpack_require__(64); * changed. Collision information will be recalculated at the specified location. * * @function Phaser.Tilemaps.Components.PutTileAtWorldXY - * @private * @since 3.0.0 * * @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object. @@ -186943,6 +188561,7 @@ var PutTileAtWorldXY = function (tile, worldX, worldY, recalculateFaces, camera, { var tileX = WorldToTileX(worldX, true, camera, layer); var tileY = WorldToTileY(worldY, true, camera, layer); + return PutTileAt(tile, tileX, tileY, recalculateFaces, layer); }; @@ -186950,7 +188569,7 @@ module.exports = PutTileAtWorldXY; /***/ }), -/* 1338 */ +/* 1335 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186959,8 +188578,8 @@ module.exports = PutTileAtWorldXY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CalculateFacesWithin = __webpack_require__(52); -var PutTileAt = __webpack_require__(227); +var CalculateFacesWithin = __webpack_require__(53); +var PutTileAt = __webpack_require__(234); /** * Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified @@ -186970,7 +188589,6 @@ var PutTileAt = __webpack_require__(227); * within the region tiles were changed. * * @function Phaser.Tilemaps.Components.PutTilesAt - * @private * @since 3.0.0 * * @param {(integer[]|integer[][]|Phaser.Tilemaps.Tile[]|Phaser.Tilemaps.Tile[][])} tile - A row (array) or grid (2D array) of Tiles or tile indexes to place. @@ -186998,6 +188616,7 @@ var PutTilesAt = function (tilesArray, tileX, tileY, recalculateFaces, layer) for (var tx = 0; tx < width; tx++) { var tile = tilesArray[ty][tx]; + PutTileAt(tile, tileX + tx, tileY + ty, false, layer); } } @@ -187012,9 +188631,8 @@ var PutTilesAt = function (tilesArray, tileX, tileY, recalculateFaces, layer) module.exports = PutTilesAt; - /***/ }), -/* 1339 */ +/* 1336 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187024,7 +188642,7 @@ module.exports = PutTilesAt; */ var GetTilesWithin = __webpack_require__(24); -var GetRandom = __webpack_require__(191); +var GetRandom = __webpack_require__(194); /** * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the @@ -187034,7 +188652,6 @@ var GetRandom = __webpack_require__(191); * indexes. This method only modifies tile indexes and does not change collision information. * * @function Phaser.Tilemaps.Components.Randomize - * @private * @since 3.0.0 * * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area. @@ -187053,6 +188670,7 @@ var Randomize = function (tileX, tileY, width, height, indexes, layer) if (indexes === undefined) { indexes = []; + for (i = 0; i < tiles.length; i++) { if (indexes.indexOf(tiles[i].index) === -1) @@ -187072,7 +188690,7 @@ module.exports = Randomize; /***/ }), -/* 1340 */ +/* 1337 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187081,16 +188699,15 @@ module.exports = Randomize; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RemoveTileAt = __webpack_require__(480); -var WorldToTileX = __webpack_require__(63); -var WorldToTileY = __webpack_require__(64); +var RemoveTileAt = __webpack_require__(504); +var WorldToTileX = __webpack_require__(66); +var WorldToTileY = __webpack_require__(67); /** * Removes the tile at the given world coordinates in the specified layer and updates the layer's * collision information. * * @function Phaser.Tilemaps.Components.RemoveTileAtWorldXY - * @private * @since 3.0.0 * * @param {number} worldX - The x coordinate, in pixels. @@ -187106,6 +188723,7 @@ var RemoveTileAtWorldXY = function (worldX, worldY, replaceWithNull, recalculate { var tileX = WorldToTileX(worldX, true, camera, layer); var tileY = WorldToTileY(worldY, true, camera, layer); + return RemoveTileAt(tileX, tileY, replaceWithNull, recalculateFaces, layer); }; @@ -187113,7 +188731,7 @@ module.exports = RemoveTileAtWorldXY; /***/ }), -/* 1341 */ +/* 1338 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187123,7 +188741,7 @@ module.exports = RemoveTileAtWorldXY; */ var GetTilesWithin = __webpack_require__(24); -var Color = __webpack_require__(354); +var Color = __webpack_require__(363); var defaultTileColor = new Color(105, 210, 231, 150); var defaultCollidingTileColor = new Color(243, 134, 48, 200); @@ -187136,7 +188754,6 @@ var defaultFaceColor = new Color(40, 39, 37, 150); * wherever you want on the screen. * * @function Phaser.Tilemaps.Components.RenderDebug - * @private * @since 3.0.0 * * @param {Phaser.GameObjects.Graphics} graphics - The target Graphics object to draw upon. @@ -187202,7 +188819,7 @@ module.exports = RenderDebug; /***/ }), -/* 1342 */ +/* 1339 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187211,9 +188828,9 @@ module.exports = RenderDebug; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetTileCollision = __webpack_require__(73); -var CalculateFacesWithin = __webpack_require__(52); -var SetLayerCollisionIndex = __webpack_require__(228); +var SetTileCollision = __webpack_require__(65); +var CalculateFacesWithin = __webpack_require__(53); +var SetLayerCollisionIndex = __webpack_require__(152); /** * Sets collision on the given tile or tiles within a layer by index. You can pass in either a @@ -187221,7 +188838,6 @@ var SetLayerCollisionIndex = __webpack_require__(228); * collision will be enabled (true) or disabled (false). * * @function Phaser.Tilemaps.Components.SetCollision - * @private * @since 3.0.0 * * @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes. @@ -187243,7 +188859,7 @@ var SetCollision = function (indexes, collides, recalculateFaces, layer, updateL { SetLayerCollisionIndex(indexes[i], collides, layer); } - + // Update the tiles if (updateLayer) { @@ -187271,7 +188887,7 @@ module.exports = SetCollision; /***/ }), -/* 1343 */ +/* 1340 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187280,9 +188896,9 @@ module.exports = SetCollision; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetTileCollision = __webpack_require__(73); -var CalculateFacesWithin = __webpack_require__(52); -var SetLayerCollisionIndex = __webpack_require__(228); +var SetTileCollision = __webpack_require__(65); +var CalculateFacesWithin = __webpack_require__(53); +var SetLayerCollisionIndex = __webpack_require__(152); /** * Sets collision on a range of tiles in a layer whose index is between the specified `start` and @@ -187291,7 +188907,6 @@ var SetLayerCollisionIndex = __webpack_require__(228); * enabled (true) or disabled (false). * * @function Phaser.Tilemaps.Components.SetCollisionBetween - * @private * @since 3.0.0 * * @param {integer} start - The first index of the tile to be set for collision. @@ -187324,7 +188939,7 @@ var SetCollisionBetween = function (start, stop, collides, recalculateFaces, lay for (var tx = 0; tx < layer.width; tx++) { var tile = layer.data[ty][tx]; - + if (tile) { if (tile.index >= start && tile.index <= stop) @@ -187346,7 +188961,7 @@ module.exports = SetCollisionBetween; /***/ }), -/* 1344 */ +/* 1341 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187355,9 +188970,9 @@ module.exports = SetCollisionBetween; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetTileCollision = __webpack_require__(73); -var CalculateFacesWithin = __webpack_require__(52); -var SetLayerCollisionIndex = __webpack_require__(228); +var SetTileCollision = __webpack_require__(65); +var CalculateFacesWithin = __webpack_require__(53); +var SetLayerCollisionIndex = __webpack_require__(152); /** * Sets collision on all tiles in the given layer, except for tiles that have an index specified in @@ -187365,7 +188980,6 @@ var SetLayerCollisionIndex = __webpack_require__(228); * disabled (false). Tile indexes not currently in the layer are not affected. * * @function Phaser.Tilemaps.Components.SetCollisionByExclusion - * @private * @since 3.0.0 * * @param {integer[]} indexes - An array of the tile indexes to not be counted for collision. @@ -187403,7 +189017,7 @@ module.exports = SetCollisionByExclusion; /***/ }), -/* 1345 */ +/* 1342 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187412,9 +189026,9 @@ module.exports = SetCollisionByExclusion; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetTileCollision = __webpack_require__(73); -var CalculateFacesWithin = __webpack_require__(52); -var HasValue = __webpack_require__(112); +var SetTileCollision = __webpack_require__(65); +var CalculateFacesWithin = __webpack_require__(53); +var HasValue = __webpack_require__(113); /** * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property @@ -187426,7 +189040,6 @@ var HasValue = __webpack_require__(112); * "types" property that matches any of those values, its collision flag will be updated. * * @function Phaser.Tilemaps.Components.SetCollisionByProperty - * @private * @since 3.0.0 * * @param {object} properties - An object with tile properties and corresponding values that should be checked. @@ -187478,7 +189091,7 @@ module.exports = SetCollisionByProperty; /***/ }), -/* 1346 */ +/* 1343 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187487,8 +189100,8 @@ module.exports = SetCollisionByProperty; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetTileCollision = __webpack_require__(73); -var CalculateFacesWithin = __webpack_require__(52); +var SetTileCollision = __webpack_require__(65); +var CalculateFacesWithin = __webpack_require__(53); /** * Sets collision on the tiles within a layer by checking each tile's collision group data @@ -187497,7 +189110,6 @@ var CalculateFacesWithin = __webpack_require__(52); * controls if collision will be enabled (true) or disabled (false). * * @function Phaser.Tilemaps.Components.SetCollisionFromCollisionGroup - * @private * @since 3.0.0 * * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision. @@ -187538,7 +189150,7 @@ module.exports = SetCollisionFromCollisionGroup; /***/ }), -/* 1347 */ +/* 1344 */ /***/ (function(module, exports) { /** @@ -187554,7 +189166,6 @@ module.exports = SetCollisionFromCollisionGroup; * at a specific location on the map then see setTileLocationCallback. * * @function Phaser.Tilemaps.Components.SetTileIndexCallback - * @private * @since 3.0.0 * * @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes to have a collision callback set for. @@ -187585,7 +189196,7 @@ module.exports = SetTileIndexCallback; /***/ }), -/* 1348 */ +/* 1345 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187602,7 +189213,6 @@ var GetTilesWithin = __webpack_require__(24); * remove it. * * @function Phaser.Tilemaps.Components.SetTileLocationCallback - * @private * @since 3.0.0 * * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area. @@ -187621,14 +189231,13 @@ var SetTileLocationCallback = function (tileX, tileY, width, height, callback, c { tiles[i].setCollisionCallback(callback, callbackContext); } - }; module.exports = SetTileLocationCallback; /***/ }), -/* 1349 */ +/* 1346 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187647,7 +189256,6 @@ var ShuffleArray = __webpack_require__(119); * information. * * @function Phaser.Tilemaps.Components.Shuffle - * @private * @since 3.0.0 * * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area. @@ -187661,6 +189269,7 @@ var Shuffle = function (tileX, tileY, width, height, layer) var tiles = GetTilesWithin(tileX, tileY, width, height, null, layer); var indexes = tiles.map(function (tile) { return tile.index; }); + ShuffleArray(indexes); for (var i = 0; i < tiles.length; i++) @@ -187673,7 +189282,7 @@ module.exports = Shuffle; /***/ }), -/* 1350 */ +/* 1347 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187690,7 +189299,6 @@ var GetTilesWithin = __webpack_require__(24); * information. * * @function Phaser.Tilemaps.Components.SwapByIndex - * @private * @since 3.0.0 * * @param {integer} tileA - First tile index. @@ -187704,6 +189312,7 @@ var GetTilesWithin = __webpack_require__(24); var SwapByIndex = function (indexA, indexB, tileX, tileY, width, height, layer) { var tiles = GetTilesWithin(tileX, tileY, width, height, null, layer); + for (var i = 0; i < tiles.length; i++) { if (tiles[i]) @@ -187724,7 +189333,7 @@ module.exports = SwapByIndex; /***/ }), -/* 1351 */ +/* 1348 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187733,8 +189342,8 @@ module.exports = SwapByIndex; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileToWorldX = __webpack_require__(149); -var TileToWorldY = __webpack_require__(150); +var TileToWorldX = __webpack_require__(150); +var TileToWorldY = __webpack_require__(151); var Vector2 = __webpack_require__(3); /** @@ -187743,7 +189352,6 @@ var Vector2 = __webpack_require__(3); * `point` object. * * @function Phaser.Tilemaps.Components.TileToWorldXY - * @private * @since 3.0.0 * * @param {integer} tileX - The x coordinate, in tiles, not pixels. @@ -187751,7 +189359,7 @@ var Vector2 = __webpack_require__(3); * @param {Phaser.Math.Vector2} [point] - A Vector2 to store the coordinates in. If not given a new Vector2 is created. * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {Phaser.Math.Vector2} The XY location in world coordinates. */ var TileToWorldXY = function (tileX, tileY, point, camera, layer) @@ -187768,7 +189376,7 @@ module.exports = TileToWorldXY; /***/ }), -/* 1352 */ +/* 1349 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187795,7 +189403,6 @@ var GetTilesWithin = __webpack_require__(24); * method only modifies tile indexes and does not change collision information. * * @function Phaser.Tilemaps.Components.WeightedRandomize - * @private * @since 3.0.0 * * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area. @@ -187827,12 +189434,15 @@ var WeightedRandomize = function (tileX, tileY, width, height, weightedIndexes, var rand = Math.random() * weightTotal; var sum = 0; var randomIndex = -1; + for (var j = 0; j < weightedIndexes.length; j++) { sum += weightedIndexes[j].weight; + if (rand <= sum) { var chosen = weightedIndexes[j].index; + randomIndex = Array.isArray(chosen) ? chosen[Math.floor(Math.random() * chosen.length)] : chosen; @@ -187848,7 +189458,7 @@ module.exports = WeightedRandomize; /***/ }), -/* 1353 */ +/* 1350 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187857,8 +189467,8 @@ module.exports = WeightedRandomize; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var WorldToTileX = __webpack_require__(63); -var WorldToTileY = __webpack_require__(64); +var WorldToTileX = __webpack_require__(66); +var WorldToTileY = __webpack_require__(67); var Vector2 = __webpack_require__(3); /** @@ -187867,7 +189477,6 @@ var Vector2 = __webpack_require__(3); * `point` object. * * @function Phaser.Tilemaps.Components.WorldToTileXY - * @private * @since 3.0.0 * * @param {number} worldX - The x coordinate to be converted, in pixels, not tiles. @@ -187876,7 +189485,7 @@ var Vector2 = __webpack_require__(3); * @param {Phaser.Math.Vector2} [point] - A Vector2 to store the coordinates in. If not given a new Vector2 is created. * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. - * + * * @return {Phaser.Math.Vector2} The XY location in tile units. */ var WorldToTileXY = function (worldX, worldY, snapToFloor, point, camera, layer) @@ -187893,7 +189502,7 @@ module.exports = WorldToTileXY; /***/ }), -/* 1354 */ +/* 1351 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187908,18 +189517,18 @@ module.exports = WorldToTileXY; module.exports = { - Parse: __webpack_require__(481), - Parse2DArray: __webpack_require__(229), - ParseCSV: __webpack_require__(482), + Parse: __webpack_require__(505), + Parse2DArray: __webpack_require__(235), + ParseCSV: __webpack_require__(506), - Impact: __webpack_require__(1355), - Tiled: __webpack_require__(1356) + Impact: __webpack_require__(1352), + Tiled: __webpack_require__(1353) }; /***/ }), -/* 1355 */ +/* 1352 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187934,15 +189543,15 @@ module.exports = { module.exports = { - ParseTileLayers: __webpack_require__(495), - ParseTilesets: __webpack_require__(496), - ParseWeltmeister: __webpack_require__(494) + ParseTileLayers: __webpack_require__(519), + ParseTilesets: __webpack_require__(520), + ParseWeltmeister: __webpack_require__(518) }; /***/ }), -/* 1356 */ +/* 1353 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187957,22 +189566,23 @@ module.exports = { module.exports = { - AssignTileProperties: __webpack_require__(493), - Base64Decode: __webpack_require__(485), - BuildTilesetIndex: __webpack_require__(492), - ParseGID: __webpack_require__(230), - ParseImageLayers: __webpack_require__(486), - ParseJSONTiled: __webpack_require__(483), - ParseObject: __webpack_require__(232), - ParseObjectLayers: __webpack_require__(490), - ParseTileLayers: __webpack_require__(484), - ParseTilesets: __webpack_require__(487) + AssignTileProperties: __webpack_require__(517), + Base64Decode: __webpack_require__(509), + BuildTilesetIndex: __webpack_require__(516), + CreateGroupLayer: __webpack_require__(153), + ParseGID: __webpack_require__(236), + ParseImageLayers: __webpack_require__(510), + ParseJSONTiled: __webpack_require__(507), + ParseObject: __webpack_require__(237), + ParseObjectLayers: __webpack_require__(514), + ParseTileLayers: __webpack_require__(508), + ParseTilesets: __webpack_require__(511) }; /***/ }), -/* 1357 */ +/* 1354 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187986,12 +189596,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1358); + renderWebGL = __webpack_require__(1355); } if (true) { - renderCanvas = __webpack_require__(1359); + renderCanvas = __webpack_require__(1356); } module.exports = { @@ -188003,7 +189613,7 @@ module.exports = { /***/ }), -/* 1358 */ +/* 1355 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -188124,7 +189734,7 @@ module.exports = DynamicTilemapLayerWebGLRenderer; /***/ }), -/* 1359 */ +/* 1356 */ /***/ (function(module, exports) { /** @@ -188256,7 +189866,7 @@ module.exports = DynamicTilemapLayerCanvasRenderer; /***/ }), -/* 1360 */ +/* 1357 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -188270,12 +189880,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1361); + renderWebGL = __webpack_require__(1358); } if (true) { - renderCanvas = __webpack_require__(1367); + renderCanvas = __webpack_require__(1364); } module.exports = { @@ -188287,7 +189897,7 @@ module.exports = { /***/ }), -/* 1361 */ +/* 1358 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -188296,10 +189906,10 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Identity = __webpack_require__(1362); -var Scale = __webpack_require__(1364); -var Translate = __webpack_require__(1365); -var ViewLoad2D = __webpack_require__(1366); +var Identity = __webpack_require__(1359); +var Scale = __webpack_require__(1361); +var Translate = __webpack_require__(1362); +var ViewLoad2D = __webpack_require__(1363); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -188382,7 +189992,7 @@ module.exports = StaticTilemapLayerWebGLRenderer; /***/ }), -/* 1362 */ +/* 1359 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -188391,7 +190001,7 @@ module.exports = StaticTilemapLayerWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetIdentity = __webpack_require__(1363); +var SetIdentity = __webpack_require__(1360); /** * Loads an identity matrix into the model matrix. @@ -188416,7 +190026,7 @@ module.exports = Identity; /***/ }), -/* 1363 */ +/* 1360 */ /***/ (function(module, exports) { /** @@ -188457,7 +190067,7 @@ module.exports = SetIdentity; /***/ }), -/* 1364 */ +/* 1361 */ /***/ (function(module, exports) { /** @@ -188505,7 +190115,7 @@ module.exports = Scale; /***/ }), -/* 1365 */ +/* 1362 */ /***/ (function(module, exports) { /** @@ -188545,7 +190155,7 @@ module.exports = Translate; /***/ }), -/* 1366 */ +/* 1363 */ /***/ (function(module, exports) { /** @@ -188595,7 +190205,7 @@ module.exports = ViewLoad2D; /***/ }), -/* 1367 */ +/* 1364 */ /***/ (function(module, exports) { /** @@ -188729,7 +190339,7 @@ module.exports = StaticTilemapLayerCanvasRenderer; /***/ }), -/* 1368 */ +/* 1365 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -188739,7 +190349,7 @@ module.exports = StaticTilemapLayerCanvasRenderer; */ var GameObjectCreator = __webpack_require__(16); -var ParseToTilemap = __webpack_require__(233); +var ParseToTilemap = __webpack_require__(238); /** * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. @@ -188773,7 +190383,7 @@ GameObjectCreator.register('tilemap', function (config) /***/ }), -/* 1369 */ +/* 1366 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -188783,7 +190393,7 @@ GameObjectCreator.register('tilemap', function (config) */ var GameObjectFactory = __webpack_require__(5); -var ParseToTilemap = __webpack_require__(233); +var ParseToTilemap = __webpack_require__(238); /** * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. @@ -188839,7 +190449,7 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt /***/ }), -/* 1370 */ +/* 1367 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -188854,14 +190464,14 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt module.exports = { - Clock: __webpack_require__(1371), - TimerEvent: __webpack_require__(500) + Clock: __webpack_require__(1368), + TimerEvent: __webpack_require__(524) }; /***/ }), -/* 1371 */ +/* 1368 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -188872,8 +190482,9 @@ module.exports = { var Class = __webpack_require__(0); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(22); -var TimerEvent = __webpack_require__(500); +var SceneEvents = __webpack_require__(20); +var TimerEvent = __webpack_require__(524); +var Remove = __webpack_require__(95); /** * @classdesc @@ -188921,12 +190532,9 @@ var Clock = new Class({ */ this.now = 0; - // Scale the delta time coming into the Clock by this factor - // which then influences anything using this Clock for calculations, like TimerEvents - /** * The scale of the Clock's time delta. - * + * * The time delta is the time elapsed between two consecutive frames and influences the speed of time for this Clock and anything which uses it, such as its Timer Events. Values higher than 1 increase the speed of time, while values smaller than 1 decrease it. A value of 0 freezes time and is effectively equivalent to pausing the Clock. * * @name Phaser.Time.Clock#timeScale @@ -188960,7 +190568,7 @@ var Clock = new Class({ this._active = []; /** - * An array of all Timer Events which will be added to the Clock at the start of the frame. + * An array of all Timer Events which will be added to the Clock at the start of the next frame. * * @name Phaser.Time.Clock#_pendingInsertion * @type {Phaser.Time.TimerEvent[]} @@ -188971,7 +190579,7 @@ var Clock = new Class({ this._pendingInsertion = []; /** - * An array of all Timer Events which will be removed from the Clock at the start of the frame. + * An array of all Timer Events which will be removed from the Clock at the start of the next frame. * * @name Phaser.Time.Clock#_pendingRemoval * @type {Phaser.Time.TimerEvent[]} @@ -188997,7 +190605,7 @@ var Clock = new Class({ { // Sync with the TimeStep this.now = this.systems.game.loop.time; - + this.systems.events.once(SceneEvents.DESTROY, this.destroy, this); }, @@ -189022,16 +190630,36 @@ var Clock = new Class({ /** * Creates a Timer Event and adds it to the Clock at the start of the frame. * + * You can also pass in an existing Timer Event, which will be reset and added to this Clock. + * + * Note that if the Timer Event is being used by _another_ Clock (in another Scene) it will still + * be updated by that Clock as well, so be careful when using this feature. + * * @method Phaser.Time.Clock#addEvent * @since 3.0.0 * - * @param {Phaser.Types.Time.TimerEventConfig} config - The configuration for the Timer Event. + * @param {(Phaser.Time.TimerEvent | Phaser.Types.Time.TimerEventConfig)} config - The configuration for the Timer Event, or an existing Timer Event object. * - * @return {Phaser.Time.TimerEvent} The Timer Event which was created. + * @return {Phaser.Time.TimerEvent} The Timer Event which was created, or passed in. */ addEvent: function (config) { - var event = new TimerEvent(config); + var event; + + if (config instanceof Phaser.Time.TimerEvent) + { + event = config; + + this.removeEvent(event); + + event.elapsed = event.startAt; + event.hasDispatched = false; + event.repeatCount = (event.repeat === -1 || event.loop) ? 999999999999 : event.repeat; + } + else + { + event = new TimerEvent(config); + } this._pendingInsertion.push(event); @@ -189064,7 +190692,7 @@ var Clock = new Class({ * @method Phaser.Time.Clock#clearPendingEvents * @since 3.0.0 * - * @return {Phaser.Time.Clock} This Clock object. + * @return {this} - This Clock instance. */ clearPendingEvents: function () { @@ -189073,13 +190701,45 @@ var Clock = new Class({ return this; }, + /** + * Removes the given Timer Event, or an array of Timer Events, from this Clock. + * + * The events are removed from all internal lists (active, pending and removal), + * freeing the event up to be re-used. + * + * @method Phaser.Time.Clock#removeEvent + * @since 3.50.0 + * + * @param {(Phaser.Time.TimerEvent | Phaser.Time.TimerEvent[])} events - The Timer Event, or an array of Timer Events, to remove from this Clock. + * + * @return {this} - This Clock instance. + */ + removeEvent: function (events) + { + if (!Array.isArray(events)) + { + events = [ events ]; + } + + for (var i = 0; i < events.length; i++) + { + var event = events[i]; + + Remove(this._pendingRemoval, event); + Remove(this._pendingInsertion, event); + Remove(this._active, event); + } + + return this; + }, + /** * Schedules all active Timer Events for removal at the start of the frame. * * @method Phaser.Time.Clock#removeAllEvents * @since 3.0.0 * - * @return {Phaser.Time.Clock} This Clock object. + * @return {this} - This Clock instance. */ removeAllEvents: function () { @@ -189267,7 +190927,7 @@ module.exports = Clock; /***/ }), -/* 1372 */ +/* 1369 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -189276,7 +190936,7 @@ module.exports = Clock; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(90); +var CONST = __webpack_require__(91); var Extend = __webpack_require__(19); /** @@ -189285,13 +190945,13 @@ var Extend = __webpack_require__(19); var Tweens = { - Builders: __webpack_require__(1373), - Events: __webpack_require__(238), + Builders: __webpack_require__(1370), + Events: __webpack_require__(243), - TweenManager: __webpack_require__(1389), - Tween: __webpack_require__(237), - TweenData: __webpack_require__(239), - Timeline: __webpack_require__(506) + TweenManager: __webpack_require__(1386), + Tween: __webpack_require__(242), + TweenData: __webpack_require__(244), + Timeline: __webpack_require__(530) }; @@ -189302,7 +190962,7 @@ module.exports = Tweens; /***/ }), -/* 1373 */ +/* 1370 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -189317,23 +190977,23 @@ module.exports = Tweens; module.exports = { - GetBoolean: __webpack_require__(89), - GetEaseFunction: __webpack_require__(69), - GetNewValue: __webpack_require__(151), - GetProps: __webpack_require__(501), - GetTargets: __webpack_require__(234), - GetTweens: __webpack_require__(502), - GetValueOp: __webpack_require__(235), - NumberTweenBuilder: __webpack_require__(503), - StaggerBuilder: __webpack_require__(504), - TimelineBuilder: __webpack_require__(505), - TweenBuilder: __webpack_require__(152) + GetBoolean: __webpack_require__(90), + GetEaseFunction: __webpack_require__(71), + GetNewValue: __webpack_require__(154), + GetProps: __webpack_require__(525), + GetTargets: __webpack_require__(239), + GetTweens: __webpack_require__(526), + GetValueOp: __webpack_require__(240), + NumberTweenBuilder: __webpack_require__(527), + StaggerBuilder: __webpack_require__(528), + TimelineBuilder: __webpack_require__(529), + TweenBuilder: __webpack_require__(155) }; /***/ }), -/* 1374 */ +/* 1371 */ /***/ (function(module, exports) { /** @@ -189411,7 +191071,7 @@ module.exports = [ /***/ }), -/* 1375 */ +/* 1372 */ /***/ (function(module, exports) { /** @@ -189447,7 +191107,7 @@ module.exports = 'complete'; /***/ }), -/* 1376 */ +/* 1373 */ /***/ (function(module, exports) { /** @@ -189484,7 +191144,7 @@ module.exports = 'loop'; /***/ }), -/* 1377 */ +/* 1374 */ /***/ (function(module, exports) { /** @@ -189521,7 +191181,7 @@ module.exports = 'pause'; /***/ }), -/* 1378 */ +/* 1375 */ /***/ (function(module, exports) { /** @@ -189558,7 +191218,7 @@ module.exports = 'resume'; /***/ }), -/* 1379 */ +/* 1376 */ /***/ (function(module, exports) { /** @@ -189594,7 +191254,7 @@ module.exports = 'start'; /***/ }), -/* 1380 */ +/* 1377 */ /***/ (function(module, exports) { /** @@ -189631,7 +191291,7 @@ module.exports = 'update'; /***/ }), -/* 1381 */ +/* 1378 */ /***/ (function(module, exports) { /** @@ -189671,7 +191331,7 @@ module.exports = 'active'; /***/ }), -/* 1382 */ +/* 1379 */ /***/ (function(module, exports) { /** @@ -189712,7 +191372,7 @@ module.exports = 'complete'; /***/ }), -/* 1383 */ +/* 1380 */ /***/ (function(module, exports) { /** @@ -189756,7 +191416,7 @@ module.exports = 'loop'; /***/ }), -/* 1384 */ +/* 1381 */ /***/ (function(module, exports) { /** @@ -189801,7 +191461,7 @@ module.exports = 'repeat'; /***/ }), -/* 1385 */ +/* 1382 */ /***/ (function(module, exports) { /** @@ -189841,7 +191501,7 @@ module.exports = 'start'; /***/ }), -/* 1386 */ +/* 1383 */ /***/ (function(module, exports) { /** @@ -189877,7 +191537,7 @@ module.exports = 'stop'; /***/ }), -/* 1387 */ +/* 1384 */ /***/ (function(module, exports) { /** @@ -189920,7 +191580,7 @@ module.exports = 'update'; /***/ }), -/* 1388 */ +/* 1385 */ /***/ (function(module, exports) { /** @@ -189966,7 +191626,7 @@ module.exports = 'yoyo'; /***/ }), -/* 1389 */ +/* 1386 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -189975,15 +191635,15 @@ module.exports = 'yoyo'; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayRemove = __webpack_require__(129); +var ArrayRemove = __webpack_require__(95); var Class = __webpack_require__(0); -var NumberTweenBuilder = __webpack_require__(503); +var NumberTweenBuilder = __webpack_require__(527); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(22); -var StaggerBuilder = __webpack_require__(504); -var TimelineBuilder = __webpack_require__(505); -var TWEEN_CONST = __webpack_require__(90); -var TweenBuilder = __webpack_require__(152); +var SceneEvents = __webpack_require__(20); +var StaggerBuilder = __webpack_require__(528); +var TimelineBuilder = __webpack_require__(529); +var TWEEN_CONST = __webpack_require__(91); +var TweenBuilder = __webpack_require__(155); /** * @classdesc @@ -190755,7 +192415,7 @@ module.exports = TweenManager; /***/ }), -/* 1390 */ +/* 1387 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -190770,16 +192430,17 @@ module.exports = TweenManager; module.exports = { - Array: __webpack_require__(189), - Base64: __webpack_require__(1391), - Objects: __webpack_require__(1393), - String: __webpack_require__(1397) + Array: __webpack_require__(192), + Base64: __webpack_require__(1388), + Objects: __webpack_require__(1390), + String: __webpack_require__(1394), + NOOP: __webpack_require__(1) }; /***/ }), -/* 1391 */ +/* 1388 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -190794,14 +192455,14 @@ module.exports = { module.exports = { - ArrayBufferToBase64: __webpack_require__(1392), - Base64ToArrayBuffer: __webpack_require__(388) + ArrayBufferToBase64: __webpack_require__(1389), + Base64ToArrayBuffer: __webpack_require__(399) }; /***/ }), -/* 1392 */ +/* 1389 */ /***/ (function(module, exports) { /** @@ -190859,7 +192520,7 @@ module.exports = ArrayBufferToBase64; /***/ }), -/* 1393 */ +/* 1390 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -190874,26 +192535,26 @@ module.exports = ArrayBufferToBase64; module.exports = { - Clone: __webpack_require__(67), + Clone: __webpack_require__(69), Extend: __webpack_require__(19), GetAdvancedValue: __webpack_require__(15), GetFastValue: __webpack_require__(2), - GetMinMaxValue: __webpack_require__(1394), + GetMinMaxValue: __webpack_require__(1391), GetValue: __webpack_require__(6), - HasAll: __webpack_require__(1395), - HasAny: __webpack_require__(407), - HasValue: __webpack_require__(112), + HasAll: __webpack_require__(1392), + HasAny: __webpack_require__(421), + HasValue: __webpack_require__(113), IsPlainObject: __webpack_require__(7), - Merge: __webpack_require__(132), - MergeRight: __webpack_require__(1396), - Pick: __webpack_require__(489), - SetValue: __webpack_require__(427) + Merge: __webpack_require__(133), + MergeRight: __webpack_require__(1393), + Pick: __webpack_require__(513), + SetValue: __webpack_require__(444) }; /***/ }), -/* 1394 */ +/* 1391 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -190932,7 +192593,7 @@ module.exports = GetMinMaxValue; /***/ }), -/* 1395 */ +/* 1392 */ /***/ (function(module, exports) { /** @@ -190969,7 +192630,7 @@ module.exports = HasAll; /***/ }), -/* 1396 */ +/* 1393 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -190978,7 +192639,7 @@ module.exports = HasAll; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clone = __webpack_require__(67); +var Clone = __webpack_require__(69); /** * Creates a new Object using all values from obj1. @@ -191012,7 +192673,7 @@ module.exports = MergeRight; /***/ }), -/* 1397 */ +/* 1394 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -191027,18 +192688,18 @@ module.exports = MergeRight; module.exports = { - Format: __webpack_require__(1398), - Pad: __webpack_require__(169), - RemoveAt: __webpack_require__(1399), - Reverse: __webpack_require__(1400), - UppercaseFirst: __webpack_require__(187), - UUID: __webpack_require__(202) + Format: __webpack_require__(1395), + Pad: __webpack_require__(171), + RemoveAt: __webpack_require__(1396), + Reverse: __webpack_require__(1397), + UppercaseFirst: __webpack_require__(189), + UUID: __webpack_require__(205) }; /***/ }), -/* 1398 */ +/* 1395 */ /***/ (function(module, exports) { /** @@ -191073,7 +192734,7 @@ module.exports = Format; /***/ }), -/* 1399 */ +/* 1396 */ /***/ (function(module, exports) { /** @@ -191109,7 +192770,7 @@ module.exports = RemoveAt; /***/ }), -/* 1400 */ +/* 1397 */ /***/ (function(module, exports) { /** @@ -191138,7 +192799,7 @@ module.exports = Reverse; /***/ }), -/* 1401 */ +/* 1398 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -191154,27 +192815,27 @@ module.exports = Reverse; module.exports = { - SoundManagerCreator: __webpack_require__(380), + SoundManagerCreator: __webpack_require__(392), - Events: __webpack_require__(59), + Events: __webpack_require__(61), - BaseSound: __webpack_require__(134), - BaseSoundManager: __webpack_require__(133), + BaseSound: __webpack_require__(135), + BaseSoundManager: __webpack_require__(134), - WebAudioSound: __webpack_require__(389), - WebAudioSoundManager: __webpack_require__(387), + WebAudioSound: __webpack_require__(400), + WebAudioSoundManager: __webpack_require__(398), - HTML5AudioSound: __webpack_require__(384), - HTML5AudioSoundManager: __webpack_require__(381), + HTML5AudioSound: __webpack_require__(395), + HTML5AudioSoundManager: __webpack_require__(393), - NoAudioSound: __webpack_require__(386), - NoAudioSoundManager: __webpack_require__(385) + NoAudioSound: __webpack_require__(397), + NoAudioSoundManager: __webpack_require__(396) }; /***/ }), -/* 1402 */ +/* 1399 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -191580,937 +193241,7 @@ module.exports = BodyBounds; /***/ }), -/* 1403 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Bodies = __webpack_require__(113); -var Class = __webpack_require__(0); -var Composites = __webpack_require__(1304); -var Constraint = __webpack_require__(225); -var Svg = __webpack_require__(1305); -var MatterGameObject = __webpack_require__(1414); -var MatterImage = __webpack_require__(1405); -var MatterSprite = __webpack_require__(1406); -var MatterTileBody = __webpack_require__(1309); -var PhysicsEditorParser = __webpack_require__(1306); -var PhysicsJSONParser = __webpack_require__(1307); -var PointerConstraint = __webpack_require__(1443); -var Vertices = __webpack_require__(87); - -/** - * @classdesc - * The Matter Factory is responsible for quickly creating a variety of different types of - * bodies, constraints and Game Objects and adding them into the physics world. - * - * You access the factory from within a Scene using `add`: - * - * ```javascript - * this.matter.add.rectangle(x, y, width, height); - * ``` - * - * Use of the Factory is optional. All of the objects it creates can also be created - * directly via your own code or constructors. It is provided as a means to keep your - * code concise. - * - * @class Factory - * @memberof Phaser.Physics.Matter - * @constructor - * @since 3.0.0 - * - * @param {Phaser.Physics.Matter.World} world - The Matter World which this Factory adds to. - */ -var Factory = new Class({ - - initialize: - - function Factory (world) - { - /** - * The Matter World which this Factory adds to. - * - * @name Phaser.Physics.Matter.Factory#world - * @type {Phaser.Physics.Matter.World} - * @since 3.0.0 - */ - this.world = world; - - /** - * The Scene which this Factory's Matter World belongs to. - * - * @name Phaser.Physics.Matter.Factory#scene - * @type {Phaser.Scene} - * @since 3.0.0 - */ - this.scene = world.scene; - - /** - * A reference to the Scene.Systems this Matter Physics instance belongs to. - * - * @name Phaser.Physics.Matter.Factory#sys - * @type {Phaser.Scenes.Systems} - * @since 3.0.0 - */ - this.sys = world.scene.sys; - }, - - /** - * Creates a new rigid rectangular Body and adds it to the World. - * - * @method Phaser.Physics.Matter.Factory#rectangle - * @since 3.0.0 - * - * @param {number} x - The X coordinate of the center of the Body. - * @param {number} y - The Y coordinate of the center of the Body. - * @param {number} width - The width of the Body. - * @param {number} height - The height of the Body. - * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. - * - * @return {MatterJS.BodyType} A Matter JS Body. - */ - rectangle: function (x, y, width, height, options) - { - var body = Bodies.rectangle(x, y, width, height, options); - - this.world.add(body); - - return body; - }, - - /** - * Creates a new rigid trapezoidal Body and adds it to the World. - * - * @method Phaser.Physics.Matter.Factory#trapezoid - * @since 3.0.0 - * - * @param {number} x - The X coordinate of the center of the Body. - * @param {number} y - The Y coordinate of the center of the Body. - * @param {number} width - The width of the trapezoid Body. - * @param {number} height - The height of the trapezoid Body. - * @param {number} slope - The slope of the trapezoid. 0 creates a rectangle, while 1 creates a triangle. Positive values make the top side shorter, while negative values make the bottom side shorter. - * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. - * - * @return {MatterJS.BodyType} A Matter JS Body. - */ - trapezoid: function (x, y, width, height, slope, options) - { - var body = Bodies.trapezoid(x, y, width, height, slope, options); - - this.world.add(body); - - return body; - }, - - /** - * Creates a new rigid circular Body and adds it to the World. - * - * @method Phaser.Physics.Matter.Factory#circle - * @since 3.0.0 - * - * @param {number} x - The X coordinate of the center of the Body. - * @param {number} y - The Y coordinate of the center of the Body. - * @param {number} radius - The radius of the circle. - * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. - * @param {number} [maxSides] - The maximum amount of sides to use for the polygon which will approximate this circle. - * - * @return {MatterJS.BodyType} A Matter JS Body. - */ - circle: function (x, y, radius, options, maxSides) - { - var body = Bodies.circle(x, y, radius, options, maxSides); - - this.world.add(body); - - return body; - }, - - /** - * Creates a new rigid polygonal Body and adds it to the World. - * - * @method Phaser.Physics.Matter.Factory#polygon - * @since 3.0.0 - * - * @param {number} x - The X coordinate of the center of the Body. - * @param {number} y - The Y coordinate of the center of the Body. - * @param {number} sides - The number of sides the polygon will have. - * @param {number} radius - The "radius" of the polygon, i.e. the distance from its center to any vertex. This is also the radius of its circumcircle. - * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. - * - * @return {MatterJS.BodyType} A Matter JS Body. - */ - polygon: function (x, y, sides, radius, options) - { - var body = Bodies.polygon(x, y, sides, radius, options); - - this.world.add(body); - - return body; - }, - - /** - * Creates a body using the supplied vertices (or an array containing multiple sets of vertices) and adds it to the World. - * If the vertices are convex, they will pass through as supplied. Otherwise, if the vertices are concave, they will be decomposed. Note that this process is not guaranteed to support complex sets of vertices, e.g. ones with holes. - * - * @method Phaser.Physics.Matter.Factory#fromVertices - * @since 3.0.0 - * - * @param {number} x - The X coordinate of the center of the Body. - * @param {number} y - The Y coordinate of the center of the Body. - * @param {(string|array)} vertexSets - The vertices data. Either a path string or an array of vertices. - * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. - * @param {boolean} [flagInternal=false] - Flag internal edges (coincident part edges) - * @param {number} [removeCollinear=0.01] - Whether Matter.js will discard collinear edges (to improve performance). - * @param {number} [minimumArea=10] - During decomposition discard parts that have an area less than this. - * - * @return {MatterJS.BodyType} A Matter JS Body. - */ - fromVertices: function (x, y, vertexSets, options, flagInternal, removeCollinear, minimumArea) - { - if (typeof vertexSets === 'string') - { - vertexSets = Vertices.fromPath(vertexSets); - } - - var body = Bodies.fromVertices(x, y, vertexSets, options, flagInternal, removeCollinear, minimumArea); - - this.world.add(body); - - return body; - }, - - /** - * Creates a body using data exported from the application PhysicsEditor (https://www.codeandweb.com/physicseditor) - * - * The PhysicsEditor file should be loaded as JSON: - * - * ```javascript - * preload () - * { - * this.load.json('vehicles', 'assets/vehicles.json); - * } - * - * create () - * { - * const vehicleShapes = this.cache.json.get('vehicles'); - * this.matter.add.fromPhysicsEditor(400, 300, vehicleShapes.truck); - * } - * ``` - * - * Do not pass the entire JSON file to this method, but instead pass one of the shapes contained within it. - * - * If you pas in an `options` object, any settings in there will override those in the PhysicsEditor config object. - * - * @method Phaser.Physics.Matter.Factory#fromPhysicsEditor - * @since 3.22.0 - * - * @param {number} x - The horizontal world location of the body. - * @param {number} y - The vertical world location of the body. - * @param {any} config - The JSON data exported from PhysicsEditor. - * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. - * @param {boolean} [addToWorld=true] - Should the newly created body be immediately added to the World? - * - * @return {MatterJS.BodyType} A Matter JS Body. - */ - fromPhysicsEditor: function (x, y, config, options, addToWorld) - { - if (addToWorld === undefined) { addToWorld = true; } - - var body = PhysicsEditorParser.parseBody(x, y, config, options); - - if (addToWorld && !this.world.has(body)) - { - this.world.add(body); - } - - return body; - }, - - /** - * Creates a body using the path data from an SVG file. - * - * SVG Parsing requires the pathseg polyfill from https://github.com/progers/pathseg - * - * The SVG file should be loaded as XML, as this method requires the ability to extract - * the path data from it. I.e.: - * - * ```javascript - * preload () - * { - * this.load.xml('face', 'assets/face.svg); - * } - * - * create () - * { - * this.matter.add.fromSVG(400, 300, this.cache.xml.get('face')); - * } - * ``` - * - * @method Phaser.Physics.Matter.Factory#fromSVG - * @since 3.22.0 - * - * @param {number} x - The X coordinate of the body. - * @param {number} y - The Y coordinate of the body. - * @param {object} xml - The SVG Path data. - * @param {number} [scale=1] - Scale the vertices by this amount after creation. - * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. - * @param {boolean} [addToWorld=true] - Should the newly created body be immediately added to the World? - * - * @return {MatterJS.BodyType} A Matter JS Body. - */ - fromSVG: function (x, y, xml, scale, options, addToWorld) - { - if (scale === undefined) { scale = 1; } - if (options === undefined) { options = {}; } - if (addToWorld === undefined) { addToWorld = true; } - - var path = xml.getElementsByTagName('path'); - var vertexSets = []; - - for (var i = 0; i < path.length; i++) - { - var points = Svg.pathToVertices(path[i], 30); - - if (scale !== 1) - { - Vertices.scale(points, scale, scale); - } - - vertexSets.push(points); - } - - var body = Bodies.fromVertices(x, y, vertexSets, options); - - if (addToWorld) - { - this.world.add(body); - } - - return body; - }, - - /** - * Creates a body using the supplied physics data, as provided by a JSON file. - * - * The data file should be loaded as JSON: - * - * ```javascript - * preload () - * { - * this.load.json('ninjas', 'assets/ninjas.json); - * } - * - * create () - * { - * const ninjaShapes = this.cache.json.get('ninjas'); - * - * this.matter.add.fromJSON(400, 300, ninjaShapes.shinobi); - * } - * ``` - * - * Do not pass the entire JSON file to this method, but instead pass one of the shapes contained within it. - * - * If you pas in an `options` object, any settings in there will override those in the config object. - * - * The structure of the JSON file is as follows: - * - * ```text - * { - * 'generator_info': // The name of the application that created the JSON data - * 'shapeName': { - * 'type': // The type of body - * 'label': // Optional body label - * 'vertices': // An array, or an array of arrays, containing the vertex data in x/y object pairs - * } - * } - * ``` - * - * At the time of writing, only the Phaser Physics Tracer App exports in this format. - * - * @method Phaser.Physics.Matter.Factory#fromJSON - * @since 3.22.0 - * - * @param {number} x - The X coordinate of the body. - * @param {number} y - The Y coordinate of the body. - * @param {any} config - The JSON physics data. - * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. - * @param {boolean} [addToWorld=true] - Should the newly created body be immediately added to the World? - * - * @return {MatterJS.BodyType} A Matter JS Body. - */ - fromJSON: function (x, y, config, options, addToWorld) - { - if (options === undefined) { options = {}; } - if (addToWorld === undefined) { addToWorld = true; } - - var body = PhysicsJSONParser.parseBody(x, y, config, options); - - if (body && addToWorld) - { - this.world.add(body); - } - - return body; - }, - - /** - * Create a new composite containing Matter Image objects created in a grid arrangement. - * This function uses the body bounds to prevent overlaps. - * - * @method Phaser.Physics.Matter.Factory#imageStack - * @since 3.0.0 - * - * @param {string} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. - * @param {(string|integer)} frame - An optional frame from the Texture this Game Object is rendering with. Set to `null` to skip this value. - * @param {number} x - The horizontal position of this composite in the world. - * @param {number} y - The vertical position of this composite in the world. - * @param {number} columns - The number of columns in the grid. - * @param {number} rows - The number of rows in the grid. - * @param {number} [columnGap=0] - The distance between each column. - * @param {number} [rowGap=0] - The distance between each row. - * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. - * - * @return {MatterJS.CompositeType} A Matter JS Composite Stack. - */ - imageStack: function (key, frame, x, y, columns, rows, columnGap, rowGap, options) - { - if (columnGap === undefined) { columnGap = 0; } - if (rowGap === undefined) { rowGap = 0; } - if (options === undefined) { options = {}; } - - var world = this.world; - var displayList = this.sys.displayList; - - options.addToWorld = false; - - var stack = Composites.stack(x, y, columns, rows, columnGap, rowGap, function (x, y) - { - var image = new MatterImage(world, x, y, key, frame, options); - - displayList.add(image); - - return image.body; - }); - - world.add(stack); - - return stack; - }, - - /** - * Create a new composite containing bodies created in the callback in a grid arrangement. - * - * This function uses the body bounds to prevent overlaps. - * - * @method Phaser.Physics.Matter.Factory#stack - * @since 3.0.0 - * - * @param {number} x - The horizontal position of this composite in the world. - * @param {number} y - The vertical position of this composite in the world. - * @param {number} columns - The number of columns in the grid. - * @param {number} rows - The number of rows in the grid. - * @param {number} columnGap - The distance between each column. - * @param {number} rowGap - The distance between each row. - * @param {function} callback - The callback that creates the stack. - * - * @return {MatterJS.CompositeType} A new composite containing objects created in the callback. - */ - stack: function (x, y, columns, rows, columnGap, rowGap, callback) - { - var stack = Composites.stack(x, y, columns, rows, columnGap, rowGap, callback); - - this.world.add(stack); - - return stack; - }, - - /** - * Create a new composite containing bodies created in the callback in a pyramid arrangement. - * This function uses the body bounds to prevent overlaps. - * - * @method Phaser.Physics.Matter.Factory#pyramid - * @since 3.0.0 - * - * @param {number} x - The horizontal position of this composite in the world. - * @param {number} y - The vertical position of this composite in the world. - * @param {number} columns - The number of columns in the pyramid. - * @param {number} rows - The number of rows in the pyramid. - * @param {number} columnGap - The distance between each column. - * @param {number} rowGap - The distance between each row. - * @param {function} callback - The callback function to be invoked. - * - * @return {MatterJS.CompositeType} A Matter JS Composite pyramid. - */ - pyramid: function (x, y, columns, rows, columnGap, rowGap, callback) - { - var stack = Composites.pyramid(x, y, columns, rows, columnGap, rowGap, callback); - - this.world.add(stack); - - return stack; - }, - - /** - * Chains all bodies in the given composite together using constraints. - * - * @method Phaser.Physics.Matter.Factory#chain - * @since 3.0.0 - * - * @param {MatterJS.CompositeType} composite - The composite in which all bodies will be chained together sequentially. - * @param {number} xOffsetA - The horizontal offset of the BodyA constraint. This is a percentage based on the body size, not a world position. - * @param {number} yOffsetA - The vertical offset of the BodyA constraint. This is a percentage based on the body size, not a world position. - * @param {number} xOffsetB - The horizontal offset of the BodyB constraint. This is a percentage based on the body size, not a world position. - * @param {number} yOffsetB - The vertical offset of the BodyB constraint. This is a percentage based on the body size, not a world position. - * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. - * - * @return {MatterJS.CompositeType} The original composite that was passed to this method. - */ - chain: function (composite, xOffsetA, yOffsetA, xOffsetB, yOffsetB, options) - { - return Composites.chain(composite, xOffsetA, yOffsetA, xOffsetB, yOffsetB, options); - }, - - /** - * Connects bodies in the composite with constraints in a grid pattern, with optional cross braces. - * - * @method Phaser.Physics.Matter.Factory#mesh - * @since 3.0.0 - * - * @param {MatterJS.CompositeType} composite - The composite in which all bodies will be chained together. - * @param {number} columns - The number of columns in the mesh. - * @param {number} rows - The number of rows in the mesh. - * @param {boolean} crossBrace - Create cross braces for the mesh as well? - * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. - * - * @return {MatterJS.CompositeType} The original composite that was passed to this method. - */ - mesh: function (composite, columns, rows, crossBrace, options) - { - return Composites.mesh(composite, columns, rows, crossBrace, options); - }, - - /** - * Creates a composite with a Newton's Cradle setup of bodies and constraints. - * - * @method Phaser.Physics.Matter.Factory#newtonsCradle - * @since 3.0.0 - * - * @param {number} x - The horizontal position of the start of the cradle. - * @param {number} y - The vertical position of the start of the cradle. - * @param {number} number - The number of balls in the cradle. - * @param {number} size - The radius of each ball in the cradle. - * @param {number} length - The length of the 'string' the balls hang from. - * - * @return {MatterJS.CompositeType} A Newton's cradle composite. - */ - newtonsCradle: function (x, y, number, size, length) - { - var composite = Composites.newtonsCradle(x, y, number, size, length); - - this.world.add(composite); - - return composite; - }, - - /** - * Creates a composite with simple car setup of bodies and constraints. - * - * @method Phaser.Physics.Matter.Factory#car - * @since 3.0.0 - * - * @param {number} x - The horizontal position of the car in the world. - * @param {number} y - The vertical position of the car in the world. - * @param {number} width - The width of the car chasis. - * @param {number} height - The height of the car chasis. - * @param {number} wheelSize - The radius of the car wheels. - * - * @return {MatterJS.CompositeType} A new composite car body. - */ - car: function (x, y, width, height, wheelSize) - { - var composite = Composites.car(x, y, width, height, wheelSize); - - this.world.add(composite); - - return composite; - }, - - /** - * Creates a simple soft body like object. - * - * @method Phaser.Physics.Matter.Factory#softBody - * @since 3.0.0 - * - * @param {number} x - The horizontal position of this composite in the world. - * @param {number} y - The vertical position of this composite in the world. - * @param {number} columns - The number of columns in the Composite. - * @param {number} rows - The number of rows in the Composite. - * @param {number} columnGap - The distance between each column. - * @param {number} rowGap - The distance between each row. - * @param {boolean} crossBrace - `true` to create cross braces between the bodies, or `false` to create just straight braces. - * @param {number} particleRadius - The radius of this circlular composite. - * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [particleOptions] - An optional Body configuration object that is used to set initial Body properties on creation. - * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [constraintOptions] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. - * - * @return {MatterJS.CompositeType} A new composite simple soft body. - */ - softBody: function (x, y, columns, rows, columnGap, rowGap, crossBrace, particleRadius, particleOptions, constraintOptions) - { - var composite = Composites.softBody(x, y, columns, rows, columnGap, rowGap, crossBrace, particleRadius, particleOptions, constraintOptions); - - this.world.add(composite); - - return composite; - }, - - /** - * This method is an alias for `Factory.constraint`. - * - * Constraints (or joints) are used for specifying that a fixed distance must be maintained - * between two bodies, or a body and a fixed world-space position. - * - * The stiffness of constraints can be modified to create springs or elastic. - * - * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` - * value (e.g. `0.7` or above). - * - * If the constraint is unstable, try lowering the `stiffness` value and / or increasing - * `constraintIterations` within the Matter Config. - * - * For compound bodies, constraints must be applied to the parent body and not one of its parts. - * - * @method Phaser.Physics.Matter.Factory#joint - * @since 3.0.0 - * - * @param {MatterJS.BodyType} bodyA - The first possible `Body` that this constraint is attached to. - * @param {MatterJS.BodyType} bodyB - The second possible `Body` that this constraint is attached to. - * @param {number} [length] - A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. - * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. - * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. - * - * @return {MatterJS.ConstraintType} A Matter JS Constraint. - */ - joint: function (bodyA, bodyB, length, stiffness, options) - { - return this.constraint(bodyA, bodyB, length, stiffness, options); - }, - - /** - * This method is an alias for `Factory.constraint`. - * - * Constraints (or joints) are used for specifying that a fixed distance must be maintained - * between two bodies, or a body and a fixed world-space position. - * - * The stiffness of constraints can be modified to create springs or elastic. - * - * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` - * value (e.g. `0.7` or above). - * - * If the constraint is unstable, try lowering the `stiffness` value and / or increasing - * `constraintIterations` within the Matter Config. - * - * For compound bodies, constraints must be applied to the parent body and not one of its parts. - * - * @method Phaser.Physics.Matter.Factory#spring - * @since 3.0.0 - * - * @param {MatterJS.BodyType} bodyA - The first possible `Body` that this constraint is attached to. - * @param {MatterJS.BodyType} bodyB - The second possible `Body` that this constraint is attached to. - * @param {number} [length] - A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. - * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. - * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. - * - * @return {MatterJS.ConstraintType} A Matter JS Constraint. - */ - spring: function (bodyA, bodyB, length, stiffness, options) - { - return this.constraint(bodyA, bodyB, length, stiffness, options); - }, - - /** - * Constraints (or joints) are used for specifying that a fixed distance must be maintained - * between two bodies, or a body and a fixed world-space position. - * - * The stiffness of constraints can be modified to create springs or elastic. - * - * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` - * value (e.g. `0.7` or above). - * - * If the constraint is unstable, try lowering the `stiffness` value and / or increasing - * `constraintIterations` within the Matter Config. - * - * For compound bodies, constraints must be applied to the parent body and not one of its parts. - * - * @method Phaser.Physics.Matter.Factory#constraint - * @since 3.0.0 - * - * @param {MatterJS.BodyType} bodyA - The first possible `Body` that this constraint is attached to. - * @param {MatterJS.BodyType} bodyB - The second possible `Body` that this constraint is attached to. - * @param {number} [length] - A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. - * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. - * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. - * - * @return {MatterJS.ConstraintType} A Matter JS Constraint. - */ - constraint: function (bodyA, bodyB, length, stiffness, options) - { - if (stiffness === undefined) { stiffness = 1; } - if (options === undefined) { options = {}; } - - options.bodyA = (bodyA.type === 'body') ? bodyA : bodyA.body; - options.bodyB = (bodyB.type === 'body') ? bodyB : bodyB.body; - - if (!isNaN(length)) - { - options.length = length; - } - - options.stiffness = stiffness; - - var constraint = Constraint.create(options); - - this.world.add(constraint); - - return constraint; - }, - - /** - * Constraints (or joints) are used for specifying that a fixed distance must be maintained - * between two bodies, or a body and a fixed world-space position. - * - * A world constraint has only one body, you should specify a `pointA` position in - * the constraint options parameter to attach the constraint to the world. - * - * The stiffness of constraints can be modified to create springs or elastic. - * - * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` - * value (e.g. `0.7` or above). - * - * If the constraint is unstable, try lowering the `stiffness` value and / or increasing - * `constraintIterations` within the Matter Config. - * - * For compound bodies, constraints must be applied to the parent body and not one of its parts. - * - * @method Phaser.Physics.Matter.Factory#worldConstraint - * @since 3.0.0 - * - * @param {MatterJS.BodyType} body - The Matter `Body` that this constraint is attached to. - * @param {number} [length] - A number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. - * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. - * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. - * - * @return {MatterJS.ConstraintType} A Matter JS Constraint. - */ - worldConstraint: function (body, length, stiffness, options) - { - if (stiffness === undefined) { stiffness = 1; } - if (options === undefined) { options = {}; } - - options.bodyB = (body.type === 'body') ? body : body.body; - - if (!isNaN(length)) - { - options.length = length; - } - - options.stiffness = stiffness; - - var constraint = Constraint.create(options); - - this.world.add(constraint); - - return constraint; - }, - - /** - * This method is an alias for `Factory.pointerConstraint`. - * - * A Pointer Constraint is a special type of constraint that allows you to click - * and drag bodies in a Matter World. It monitors the active Pointers in a Scene, - * and when one is pressed down it checks to see if that hit any part of any active - * body in the world. If it did, and the body has input enabled, it will begin to - * drag it until either released, or you stop it via the `stopDrag` method. - * - * You can adjust the stiffness, length and other properties of the constraint via - * the `options` object on creation. - * - * @method Phaser.Physics.Matter.Factory#mouseSpring - * @since 3.0.0 - * - * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. - * - * @return {MatterJS.ConstraintType} A Matter JS Constraint. - */ - mouseSpring: function (options) - { - return this.pointerConstraint(options); - }, - - /** - * A Pointer Constraint is a special type of constraint that allows you to click - * and drag bodies in a Matter World. It monitors the active Pointers in a Scene, - * and when one is pressed down it checks to see if that hit any part of any active - * body in the world. If it did, and the body has input enabled, it will begin to - * drag it until either released, or you stop it via the `stopDrag` method. - * - * You can adjust the stiffness, length and other properties of the constraint via - * the `options` object on creation. - * - * @method Phaser.Physics.Matter.Factory#pointerConstraint - * @since 3.0.0 - * - * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. - * - * @return {MatterJS.ConstraintType} A Matter JS Constraint. - */ - pointerConstraint: function (options) - { - if (options === undefined) { options = {}; } - - if (!options.hasOwnProperty('render')) - { - options.render = { visible: false }; - } - - var pointerConstraint = new PointerConstraint(this.scene, this.world, options); - - this.world.add(pointerConstraint.constraint); - - return pointerConstraint; - }, - - /** - * Creates a Matter Physics Image Game Object. - * - * An Image is a light-weight Game Object useful for the display of static images in your game, - * such as logos, backgrounds, scenery or other non-animated elements. Images can have input - * events and physics bodies, or be tweened, tinted or scrolled. The main difference between an - * Image and a Sprite is that you cannot animate an Image as they do not have the Animation component. - * - * @method Phaser.Physics.Matter.Factory#image - * @since 3.0.0 - * - * @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} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. - * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with. Set to `null` to skip this value. - * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. - * - * @return {Phaser.Physics.Matter.Image} The Matter Image Game Object. - */ - image: function (x, y, key, frame, options) - { - var image = new MatterImage(this.world, x, y, key, frame, options); - - this.sys.displayList.add(image); - - return image; - }, - - /** - * Creates a wrapper around a Tile that provides access to a corresponding Matter body. A tile can only - * have one Matter body associated with it. You can either pass in an existing Matter body for - * the tile or allow the constructor to create the corresponding body for you. If the Tile has a - * collision group (defined in Tiled), those shapes will be used to create the body. If not, the - * tile's rectangle bounding box will be used. - * - * The corresponding body will be accessible on the Tile itself via Tile.physics.matterBody. - * - * Note: not all Tiled collision shapes are supported. See - * Phaser.Physics.Matter.TileBody#setFromTileCollision for more information. - * - * @method Phaser.Physics.Matter.Factory#tileBody - * @since 3.0.0 - * - * @param {Phaser.Tilemaps.Tile} tile - The target tile that should have a Matter body. - * @param {Phaser.Types.Physics.Matter.MatterTileOptions} [options] - Options to be used when creating the Matter body. - * - * @return {Phaser.Physics.Matter.TileBody} The Matter Tile Body Game Object. - */ - tileBody: function (tile, options) - { - return new MatterTileBody(this.world, tile, options); - }, - - /** - * Creates a Matter Physics Sprite Game Object. - * - * A Sprite Game Object is used for the display of both static and animated images in your game. - * Sprites can have input events and physics bodies. They can also be tweened, tinted, scrolled - * and animated. - * - * The main difference between a Sprite and an Image Game Object is that you cannot animate Images. - * As such, Sprites take a fraction longer to process and have a larger API footprint due to the Animation - * Component. If you do not require animation then you can safely use Images to replace Sprites in all cases. - * - * @method Phaser.Physics.Matter.Factory#sprite - * @since 3.0.0 - * - * @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} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. - * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with. Set to `null` to skip this value. - * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. - * - * @return {Phaser.Physics.Matter.Sprite} The Matter Sprite Game Object. - */ - sprite: function (x, y, key, frame, options) - { - var sprite = new MatterSprite(this.world, x, y, key, frame, options); - - this.sys.displayList.add(sprite); - this.sys.updateList.add(sprite); - - return sprite; - }, - - /** - * Takes an existing Game Object and injects all of the Matter Components into it. - * - * This enables you to use component methods such as `setVelocity` or `isSensor` directly from - * this Game Object. - * - * You can also pass in either a Matter Body Configuration object, or a Matter Body instance - * to link with this Game Object. - * - * @method Phaser.Physics.Matter.Factory#gameObject - * @since 3.3.0 - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to inject the Matter Components in to. - * @param {(Phaser.Types.Physics.Matter.MatterBodyConfig|MatterJS.Body)} [options] - A Matter Body configuration object, or an instance of a Matter Body. - * @param {boolean} [addToWorld=true] - Add this Matter Body to the World? - * - * @return {Phaser.GameObjects.GameObject} The Game Object that had the Matter Components injected into it. - */ - gameObject: function (gameObject, options, addToWorld) - { - return MatterGameObject(this.world, gameObject, options, addToWorld); - }, - - /** - * Destroys this Factory. - * - * @method Phaser.Physics.Matter.Factory#destroy - * @since 3.5.0 - */ - destroy: function () - { - this.world = null; - this.scene = null; - this.sys = null; - } - -}); - -module.exports = Factory; - - -/***/ }), -/* 1404 */ +/* 1400 */ /***/ (function(module, exports) { /** @@ -193180,7 +193911,1063 @@ function points_eq(a,b,precision){ /***/ }), -/* 1405 */ +/* 1401 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Bodies = __webpack_require__(114); +var Class = __webpack_require__(0); +var Composites = __webpack_require__(1304); +var Constraint = __webpack_require__(232); +var Svg = __webpack_require__(1305); +var MatterGameObject = __webpack_require__(1402); +var MatterImage = __webpack_require__(1403); +var MatterSprite = __webpack_require__(1404); +var MatterTileBody = __webpack_require__(1306); +var PhysicsEditorParser = __webpack_require__(1302); +var PhysicsJSONParser = __webpack_require__(1303); +var PointerConstraint = __webpack_require__(1405); +var Vertices = __webpack_require__(88); + +/** + * @classdesc + * The Matter Factory is responsible for quickly creating a variety of different types of + * bodies, constraints and Game Objects and adding them into the physics world. + * + * You access the factory from within a Scene using `add`: + * + * ```javascript + * this.matter.add.rectangle(x, y, width, height); + * ``` + * + * Use of the Factory is optional. All of the objects it creates can also be created + * directly via your own code or constructors. It is provided as a means to keep your + * code concise. + * + * @class Factory + * @memberof Phaser.Physics.Matter + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Physics.Matter.World} world - The Matter World which this Factory adds to. + */ +var Factory = new Class({ + + initialize: + + function Factory (world) + { + /** + * The Matter World which this Factory adds to. + * + * @name Phaser.Physics.Matter.Factory#world + * @type {Phaser.Physics.Matter.World} + * @since 3.0.0 + */ + this.world = world; + + /** + * The Scene which this Factory's Matter World belongs to. + * + * @name Phaser.Physics.Matter.Factory#scene + * @type {Phaser.Scene} + * @since 3.0.0 + */ + this.scene = world.scene; + + /** + * A reference to the Scene.Systems this Matter Physics instance belongs to. + * + * @name Phaser.Physics.Matter.Factory#sys + * @type {Phaser.Scenes.Systems} + * @since 3.0.0 + */ + this.sys = world.scene.sys; + }, + + /** + * Creates a new rigid rectangular Body and adds it to the World. + * + * @method Phaser.Physics.Matter.Factory#rectangle + * @since 3.0.0 + * + * @param {number} x - The X coordinate of the center of the Body. + * @param {number} y - The Y coordinate of the center of the Body. + * @param {number} width - The width of the Body. + * @param {number} height - The height of the Body. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. + * + * @return {MatterJS.BodyType} A Matter JS Body. + */ + rectangle: function (x, y, width, height, options) + { + var body = Bodies.rectangle(x, y, width, height, options); + + this.world.add(body); + + return body; + }, + + /** + * Creates a new rigid trapezoidal Body and adds it to the World. + * + * @method Phaser.Physics.Matter.Factory#trapezoid + * @since 3.0.0 + * + * @param {number} x - The X coordinate of the center of the Body. + * @param {number} y - The Y coordinate of the center of the Body. + * @param {number} width - The width of the trapezoid Body. + * @param {number} height - The height of the trapezoid Body. + * @param {number} slope - The slope of the trapezoid. 0 creates a rectangle, while 1 creates a triangle. Positive values make the top side shorter, while negative values make the bottom side shorter. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. + * + * @return {MatterJS.BodyType} A Matter JS Body. + */ + trapezoid: function (x, y, width, height, slope, options) + { + var body = Bodies.trapezoid(x, y, width, height, slope, options); + + this.world.add(body); + + return body; + }, + + /** + * Creates a new rigid circular Body and adds it to the World. + * + * @method Phaser.Physics.Matter.Factory#circle + * @since 3.0.0 + * + * @param {number} x - The X coordinate of the center of the Body. + * @param {number} y - The Y coordinate of the center of the Body. + * @param {number} radius - The radius of the circle. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. + * @param {number} [maxSides] - The maximum amount of sides to use for the polygon which will approximate this circle. + * + * @return {MatterJS.BodyType} A Matter JS Body. + */ + circle: function (x, y, radius, options, maxSides) + { + var body = Bodies.circle(x, y, radius, options, maxSides); + + this.world.add(body); + + return body; + }, + + /** + * Creates a new rigid polygonal Body and adds it to the World. + * + * @method Phaser.Physics.Matter.Factory#polygon + * @since 3.0.0 + * + * @param {number} x - The X coordinate of the center of the Body. + * @param {number} y - The Y coordinate of the center of the Body. + * @param {number} sides - The number of sides the polygon will have. + * @param {number} radius - The "radius" of the polygon, i.e. the distance from its center to any vertex. This is also the radius of its circumcircle. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. + * + * @return {MatterJS.BodyType} A Matter JS Body. + */ + polygon: function (x, y, sides, radius, options) + { + var body = Bodies.polygon(x, y, sides, radius, options); + + this.world.add(body); + + return body; + }, + + /** + * Creates a body using the supplied vertices (or an array containing multiple sets of vertices) and adds it to the World. + * If the vertices are convex, they will pass through as supplied. Otherwise, if the vertices are concave, they will be decomposed. Note that this process is not guaranteed to support complex sets of vertices, e.g. ones with holes. + * + * @method Phaser.Physics.Matter.Factory#fromVertices + * @since 3.0.0 + * + * @param {number} x - The X coordinate of the center of the Body. + * @param {number} y - The Y coordinate of the center of the Body. + * @param {(string|array)} vertexSets - The vertices data. Either a path string or an array of vertices. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. + * @param {boolean} [flagInternal=false] - Flag internal edges (coincident part edges) + * @param {number} [removeCollinear=0.01] - Whether Matter.js will discard collinear edges (to improve performance). + * @param {number} [minimumArea=10] - During decomposition discard parts that have an area less than this. + * + * @return {MatterJS.BodyType} A Matter JS Body. + */ + fromVertices: function (x, y, vertexSets, options, flagInternal, removeCollinear, minimumArea) + { + if (typeof vertexSets === 'string') + { + vertexSets = Vertices.fromPath(vertexSets); + } + + var body = Bodies.fromVertices(x, y, vertexSets, options, flagInternal, removeCollinear, minimumArea); + + this.world.add(body); + + return body; + }, + + /** + * Creates a body using data exported from the application PhysicsEditor (https://www.codeandweb.com/physicseditor) + * + * The PhysicsEditor file should be loaded as JSON: + * + * ```javascript + * preload () + * { + * this.load.json('vehicles', 'assets/vehicles.json); + * } + * + * create () + * { + * const vehicleShapes = this.cache.json.get('vehicles'); + * this.matter.add.fromPhysicsEditor(400, 300, vehicleShapes.truck); + * } + * ``` + * + * Do not pass the entire JSON file to this method, but instead pass one of the shapes contained within it. + * + * If you pas in an `options` object, any settings in there will override those in the PhysicsEditor config object. + * + * @method Phaser.Physics.Matter.Factory#fromPhysicsEditor + * @since 3.22.0 + * + * @param {number} x - The horizontal world location of the body. + * @param {number} y - The vertical world location of the body. + * @param {any} config - The JSON data exported from PhysicsEditor. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. + * @param {boolean} [addToWorld=true] - Should the newly created body be immediately added to the World? + * + * @return {MatterJS.BodyType} A Matter JS Body. + */ + fromPhysicsEditor: function (x, y, config, options, addToWorld) + { + if (addToWorld === undefined) { addToWorld = true; } + + var body = PhysicsEditorParser.parseBody(x, y, config, options); + + if (addToWorld && !this.world.has(body)) + { + this.world.add(body); + } + + return body; + }, + + /** + * Creates a body using the path data from an SVG file. + * + * SVG Parsing requires the pathseg polyfill from https://github.com/progers/pathseg + * + * The SVG file should be loaded as XML, as this method requires the ability to extract + * the path data from it. I.e.: + * + * ```javascript + * preload () + * { + * this.load.xml('face', 'assets/face.svg); + * } + * + * create () + * { + * this.matter.add.fromSVG(400, 300, this.cache.xml.get('face')); + * } + * ``` + * + * @method Phaser.Physics.Matter.Factory#fromSVG + * @since 3.22.0 + * + * @param {number} x - The X coordinate of the body. + * @param {number} y - The Y coordinate of the body. + * @param {object} xml - The SVG Path data. + * @param {number} [scale=1] - Scale the vertices by this amount after creation. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. + * @param {boolean} [addToWorld=true] - Should the newly created body be immediately added to the World? + * + * @return {MatterJS.BodyType} A Matter JS Body. + */ + fromSVG: function (x, y, xml, scale, options, addToWorld) + { + if (scale === undefined) { scale = 1; } + if (options === undefined) { options = {}; } + if (addToWorld === undefined) { addToWorld = true; } + + var path = xml.getElementsByTagName('path'); + var vertexSets = []; + + for (var i = 0; i < path.length; i++) + { + var points = Svg.pathToVertices(path[i], 30); + + if (scale !== 1) + { + Vertices.scale(points, scale, scale); + } + + vertexSets.push(points); + } + + var body = Bodies.fromVertices(x, y, vertexSets, options); + + if (addToWorld) + { + this.world.add(body); + } + + return body; + }, + + /** + * Creates a body using the supplied physics data, as provided by a JSON file. + * + * The data file should be loaded as JSON: + * + * ```javascript + * preload () + * { + * this.load.json('ninjas', 'assets/ninjas.json); + * } + * + * create () + * { + * const ninjaShapes = this.cache.json.get('ninjas'); + * + * this.matter.add.fromJSON(400, 300, ninjaShapes.shinobi); + * } + * ``` + * + * Do not pass the entire JSON file to this method, but instead pass one of the shapes contained within it. + * + * If you pas in an `options` object, any settings in there will override those in the config object. + * + * The structure of the JSON file is as follows: + * + * ```text + * { + * 'generator_info': // The name of the application that created the JSON data + * 'shapeName': { + * 'type': // The type of body + * 'label': // Optional body label + * 'vertices': // An array, or an array of arrays, containing the vertex data in x/y object pairs + * } + * } + * ``` + * + * At the time of writing, only the Phaser Physics Tracer App exports in this format. + * + * @method Phaser.Physics.Matter.Factory#fromJSON + * @since 3.22.0 + * + * @param {number} x - The X coordinate of the body. + * @param {number} y - The Y coordinate of the body. + * @param {any} config - The JSON physics data. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. + * @param {boolean} [addToWorld=true] - Should the newly created body be immediately added to the World? + * + * @return {MatterJS.BodyType} A Matter JS Body. + */ + fromJSON: function (x, y, config, options, addToWorld) + { + if (options === undefined) { options = {}; } + if (addToWorld === undefined) { addToWorld = true; } + + var body = PhysicsJSONParser.parseBody(x, y, config, options); + + if (body && addToWorld) + { + this.world.add(body); + } + + return body; + }, + + /** + * Create a new composite containing Matter Image objects created in a grid arrangement. + * This function uses the body bounds to prevent overlaps. + * + * @method Phaser.Physics.Matter.Factory#imageStack + * @since 3.0.0 + * + * @param {string} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param {(string|integer)} frame - An optional frame from the Texture this Game Object is rendering with. Set to `null` to skip this value. + * @param {number} x - The horizontal position of this composite in the world. + * @param {number} y - The vertical position of this composite in the world. + * @param {number} columns - The number of columns in the grid. + * @param {number} rows - The number of rows in the grid. + * @param {number} [columnGap=0] - The distance between each column. + * @param {number} [rowGap=0] - The distance between each row. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. + * + * @return {MatterJS.CompositeType} A Matter JS Composite Stack. + */ + imageStack: function (key, frame, x, y, columns, rows, columnGap, rowGap, options) + { + if (columnGap === undefined) { columnGap = 0; } + if (rowGap === undefined) { rowGap = 0; } + if (options === undefined) { options = {}; } + + var world = this.world; + var displayList = this.sys.displayList; + + options.addToWorld = false; + + var stack = Composites.stack(x, y, columns, rows, columnGap, rowGap, function (x, y) + { + var image = new MatterImage(world, x, y, key, frame, options); + + displayList.add(image); + + return image.body; + }); + + world.add(stack); + + return stack; + }, + + /** + * Create a new composite containing bodies created in the callback in a grid arrangement. + * + * This function uses the body bounds to prevent overlaps. + * + * @method Phaser.Physics.Matter.Factory#stack + * @since 3.0.0 + * + * @param {number} x - The horizontal position of this composite in the world. + * @param {number} y - The vertical position of this composite in the world. + * @param {number} columns - The number of columns in the grid. + * @param {number} rows - The number of rows in the grid. + * @param {number} columnGap - The distance between each column. + * @param {number} rowGap - The distance between each row. + * @param {function} callback - The callback that creates the stack. + * + * @return {MatterJS.CompositeType} A new composite containing objects created in the callback. + */ + stack: function (x, y, columns, rows, columnGap, rowGap, callback) + { + var stack = Composites.stack(x, y, columns, rows, columnGap, rowGap, callback); + + this.world.add(stack); + + return stack; + }, + + /** + * Create a new composite containing bodies created in the callback in a pyramid arrangement. + * This function uses the body bounds to prevent overlaps. + * + * @method Phaser.Physics.Matter.Factory#pyramid + * @since 3.0.0 + * + * @param {number} x - The horizontal position of this composite in the world. + * @param {number} y - The vertical position of this composite in the world. + * @param {number} columns - The number of columns in the pyramid. + * @param {number} rows - The number of rows in the pyramid. + * @param {number} columnGap - The distance between each column. + * @param {number} rowGap - The distance between each row. + * @param {function} callback - The callback function to be invoked. + * + * @return {MatterJS.CompositeType} A Matter JS Composite pyramid. + */ + pyramid: function (x, y, columns, rows, columnGap, rowGap, callback) + { + var stack = Composites.pyramid(x, y, columns, rows, columnGap, rowGap, callback); + + this.world.add(stack); + + return stack; + }, + + /** + * Chains all bodies in the given composite together using constraints. + * + * @method Phaser.Physics.Matter.Factory#chain + * @since 3.0.0 + * + * @param {MatterJS.CompositeType} composite - The composite in which all bodies will be chained together sequentially. + * @param {number} xOffsetA - The horizontal offset of the BodyA constraint. This is a percentage based on the body size, not a world position. + * @param {number} yOffsetA - The vertical offset of the BodyA constraint. This is a percentage based on the body size, not a world position. + * @param {number} xOffsetB - The horizontal offset of the BodyB constraint. This is a percentage based on the body size, not a world position. + * @param {number} yOffsetB - The vertical offset of the BodyB constraint. This is a percentage based on the body size, not a world position. + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. + * + * @return {MatterJS.CompositeType} The original composite that was passed to this method. + */ + chain: function (composite, xOffsetA, yOffsetA, xOffsetB, yOffsetB, options) + { + return Composites.chain(composite, xOffsetA, yOffsetA, xOffsetB, yOffsetB, options); + }, + + /** + * Connects bodies in the composite with constraints in a grid pattern, with optional cross braces. + * + * @method Phaser.Physics.Matter.Factory#mesh + * @since 3.0.0 + * + * @param {MatterJS.CompositeType} composite - The composite in which all bodies will be chained together. + * @param {number} columns - The number of columns in the mesh. + * @param {number} rows - The number of rows in the mesh. + * @param {boolean} crossBrace - Create cross braces for the mesh as well? + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. + * + * @return {MatterJS.CompositeType} The original composite that was passed to this method. + */ + mesh: function (composite, columns, rows, crossBrace, options) + { + return Composites.mesh(composite, columns, rows, crossBrace, options); + }, + + /** + * Creates a composite with a Newton's Cradle setup of bodies and constraints. + * + * @method Phaser.Physics.Matter.Factory#newtonsCradle + * @since 3.0.0 + * + * @param {number} x - The horizontal position of the start of the cradle. + * @param {number} y - The vertical position of the start of the cradle. + * @param {number} number - The number of balls in the cradle. + * @param {number} size - The radius of each ball in the cradle. + * @param {number} length - The length of the 'string' the balls hang from. + * + * @return {MatterJS.CompositeType} A Newton's cradle composite. + */ + newtonsCradle: function (x, y, number, size, length) + { + var composite = Composites.newtonsCradle(x, y, number, size, length); + + this.world.add(composite); + + return composite; + }, + + /** + * Creates a composite with simple car setup of bodies and constraints. + * + * @method Phaser.Physics.Matter.Factory#car + * @since 3.0.0 + * + * @param {number} x - The horizontal position of the car in the world. + * @param {number} y - The vertical position of the car in the world. + * @param {number} width - The width of the car chasis. + * @param {number} height - The height of the car chasis. + * @param {number} wheelSize - The radius of the car wheels. + * + * @return {MatterJS.CompositeType} A new composite car body. + */ + car: function (x, y, width, height, wheelSize) + { + var composite = Composites.car(x, y, width, height, wheelSize); + + this.world.add(composite); + + return composite; + }, + + /** + * Creates a simple soft body like object. + * + * @method Phaser.Physics.Matter.Factory#softBody + * @since 3.0.0 + * + * @param {number} x - The horizontal position of this composite in the world. + * @param {number} y - The vertical position of this composite in the world. + * @param {number} columns - The number of columns in the Composite. + * @param {number} rows - The number of rows in the Composite. + * @param {number} columnGap - The distance between each column. + * @param {number} rowGap - The distance between each row. + * @param {boolean} crossBrace - `true` to create cross braces between the bodies, or `false` to create just straight braces. + * @param {number} particleRadius - The radius of this circlular composite. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [particleOptions] - An optional Body configuration object that is used to set initial Body properties on creation. + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [constraintOptions] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. + * + * @return {MatterJS.CompositeType} A new composite simple soft body. + */ + softBody: function (x, y, columns, rows, columnGap, rowGap, crossBrace, particleRadius, particleOptions, constraintOptions) + { + var composite = Composites.softBody(x, y, columns, rows, columnGap, rowGap, crossBrace, particleRadius, particleOptions, constraintOptions); + + this.world.add(composite); + + return composite; + }, + + /** + * This method is an alias for `Factory.constraint`. + * + * Constraints (or joints) are used for specifying that a fixed distance must be maintained + * between two bodies, or a body and a fixed world-space position. + * + * The stiffness of constraints can be modified to create springs or elastic. + * + * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` + * value (e.g. `0.7` or above). + * + * If the constraint is unstable, try lowering the `stiffness` value and / or increasing + * `constraintIterations` within the Matter Config. + * + * For compound bodies, constraints must be applied to the parent body and not one of its parts. + * + * @method Phaser.Physics.Matter.Factory#joint + * @since 3.0.0 + * + * @param {MatterJS.BodyType} bodyA - The first possible `Body` that this constraint is attached to. + * @param {MatterJS.BodyType} bodyB - The second possible `Body` that this constraint is attached to. + * @param {number} [length] - A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. + * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. + * + * @return {MatterJS.ConstraintType} A Matter JS Constraint. + */ + joint: function (bodyA, bodyB, length, stiffness, options) + { + return this.constraint(bodyA, bodyB, length, stiffness, options); + }, + + /** + * This method is an alias for `Factory.constraint`. + * + * Constraints (or joints) are used for specifying that a fixed distance must be maintained + * between two bodies, or a body and a fixed world-space position. + * + * The stiffness of constraints can be modified to create springs or elastic. + * + * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` + * value (e.g. `0.7` or above). + * + * If the constraint is unstable, try lowering the `stiffness` value and / or increasing + * `constraintIterations` within the Matter Config. + * + * For compound bodies, constraints must be applied to the parent body and not one of its parts. + * + * @method Phaser.Physics.Matter.Factory#spring + * @since 3.0.0 + * + * @param {MatterJS.BodyType} bodyA - The first possible `Body` that this constraint is attached to. + * @param {MatterJS.BodyType} bodyB - The second possible `Body` that this constraint is attached to. + * @param {number} [length] - A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. + * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. + * + * @return {MatterJS.ConstraintType} A Matter JS Constraint. + */ + spring: function (bodyA, bodyB, length, stiffness, options) + { + return this.constraint(bodyA, bodyB, length, stiffness, options); + }, + + /** + * Constraints (or joints) are used for specifying that a fixed distance must be maintained + * between two bodies, or a body and a fixed world-space position. + * + * The stiffness of constraints can be modified to create springs or elastic. + * + * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` + * value (e.g. `0.7` or above). + * + * If the constraint is unstable, try lowering the `stiffness` value and / or increasing + * `constraintIterations` within the Matter Config. + * + * For compound bodies, constraints must be applied to the parent body and not one of its parts. + * + * @method Phaser.Physics.Matter.Factory#constraint + * @since 3.0.0 + * + * @param {MatterJS.BodyType} bodyA - The first possible `Body` that this constraint is attached to. + * @param {MatterJS.BodyType} bodyB - The second possible `Body` that this constraint is attached to. + * @param {number} [length] - A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. + * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. + * + * @return {MatterJS.ConstraintType} A Matter JS Constraint. + */ + constraint: function (bodyA, bodyB, length, stiffness, options) + { + if (stiffness === undefined) { stiffness = 1; } + if (options === undefined) { options = {}; } + + options.bodyA = (bodyA.type === 'body') ? bodyA : bodyA.body; + options.bodyB = (bodyB.type === 'body') ? bodyB : bodyB.body; + + if (!isNaN(length)) + { + options.length = length; + } + + options.stiffness = stiffness; + + var constraint = Constraint.create(options); + + this.world.add(constraint); + + return constraint; + }, + + /** + * Constraints (or joints) are used for specifying that a fixed distance must be maintained + * between two bodies, or a body and a fixed world-space position. + * + * A world constraint has only one body, you should specify a `pointA` position in + * the constraint options parameter to attach the constraint to the world. + * + * The stiffness of constraints can be modified to create springs or elastic. + * + * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` + * value (e.g. `0.7` or above). + * + * If the constraint is unstable, try lowering the `stiffness` value and / or increasing + * `constraintIterations` within the Matter Config. + * + * For compound bodies, constraints must be applied to the parent body and not one of its parts. + * + * @method Phaser.Physics.Matter.Factory#worldConstraint + * @since 3.0.0 + * + * @param {MatterJS.BodyType} body - The Matter `Body` that this constraint is attached to. + * @param {number} [length] - A number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`. + * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring. + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. + * + * @return {MatterJS.ConstraintType} A Matter JS Constraint. + */ + worldConstraint: function (body, length, stiffness, options) + { + if (stiffness === undefined) { stiffness = 1; } + if (options === undefined) { options = {}; } + + options.bodyB = (body.type === 'body') ? body : body.body; + + if (!isNaN(length)) + { + options.length = length; + } + + options.stiffness = stiffness; + + var constraint = Constraint.create(options); + + this.world.add(constraint); + + return constraint; + }, + + /** + * This method is an alias for `Factory.pointerConstraint`. + * + * A Pointer Constraint is a special type of constraint that allows you to click + * and drag bodies in a Matter World. It monitors the active Pointers in a Scene, + * and when one is pressed down it checks to see if that hit any part of any active + * body in the world. If it did, and the body has input enabled, it will begin to + * drag it until either released, or you stop it via the `stopDrag` method. + * + * You can adjust the stiffness, length and other properties of the constraint via + * the `options` object on creation. + * + * @method Phaser.Physics.Matter.Factory#mouseSpring + * @since 3.0.0 + * + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. + * + * @return {MatterJS.ConstraintType} A Matter JS Constraint. + */ + mouseSpring: function (options) + { + return this.pointerConstraint(options); + }, + + /** + * A Pointer Constraint is a special type of constraint that allows you to click + * and drag bodies in a Matter World. It monitors the active Pointers in a Scene, + * and when one is pressed down it checks to see if that hit any part of any active + * body in the world. If it did, and the body has input enabled, it will begin to + * drag it until either released, or you stop it via the `stopDrag` method. + * + * You can adjust the stiffness, length and other properties of the constraint via + * the `options` object on creation. + * + * @method Phaser.Physics.Matter.Factory#pointerConstraint + * @since 3.0.0 + * + * @param {Phaser.Types.Physics.Matter.MatterConstraintConfig} [options] - An optional Constraint configuration object that is used to set initial Constraint properties on creation. + * + * @return {MatterJS.ConstraintType} A Matter JS Constraint. + */ + pointerConstraint: function (options) + { + if (options === undefined) { options = {}; } + + if (!options.hasOwnProperty('render')) + { + options.render = { visible: false }; + } + + var pointerConstraint = new PointerConstraint(this.scene, this.world, options); + + this.world.add(pointerConstraint.constraint); + + return pointerConstraint; + }, + + /** + * Creates a Matter Physics Image Game Object. + * + * An Image is a light-weight Game Object useful for the display of static images in your game, + * such as logos, backgrounds, scenery or other non-animated elements. Images can have input + * events and physics bodies, or be tweened, tinted or scrolled. The main difference between an + * Image and a Sprite is that you cannot animate an Image as they do not have the Animation component. + * + * @method Phaser.Physics.Matter.Factory#image + * @since 3.0.0 + * + * @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} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with. Set to `null` to skip this value. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. + * + * @return {Phaser.Physics.Matter.Image} The Matter Image Game Object. + */ + image: function (x, y, key, frame, options) + { + var image = new MatterImage(this.world, x, y, key, frame, options); + + this.sys.displayList.add(image); + + return image; + }, + + /** + * Creates a wrapper around a Tile that provides access to a corresponding Matter body. A tile can only + * have one Matter body associated with it. You can either pass in an existing Matter body for + * the tile or allow the constructor to create the corresponding body for you. If the Tile has a + * collision group (defined in Tiled), those shapes will be used to create the body. If not, the + * tile's rectangle bounding box will be used. + * + * The corresponding body will be accessible on the Tile itself via Tile.physics.matterBody. + * + * Note: not all Tiled collision shapes are supported. See + * Phaser.Physics.Matter.TileBody#setFromTileCollision for more information. + * + * @method Phaser.Physics.Matter.Factory#tileBody + * @since 3.0.0 + * + * @param {Phaser.Tilemaps.Tile} tile - The target tile that should have a Matter body. + * @param {Phaser.Types.Physics.Matter.MatterTileOptions} [options] - Options to be used when creating the Matter body. + * + * @return {Phaser.Physics.Matter.TileBody} The Matter Tile Body Game Object. + */ + tileBody: function (tile, options) + { + return new MatterTileBody(this.world, tile, options); + }, + + /** + * Creates a Matter Physics Sprite Game Object. + * + * A Sprite Game Object is used for the display of both static and animated images in your game. + * Sprites can have input events and physics bodies. They can also be tweened, tinted, scrolled + * and animated. + * + * The main difference between a Sprite and an Image Game Object is that you cannot animate Images. + * As such, Sprites take a fraction longer to process and have a larger API footprint due to the Animation + * Component. If you do not require animation then you can safely use Images to replace Sprites in all cases. + * + * @method Phaser.Physics.Matter.Factory#sprite + * @since 3.0.0 + * + * @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} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with. Set to `null` to skip this value. + * @param {Phaser.Types.Physics.Matter.MatterBodyConfig} [options] - An optional Body configuration object that is used to set initial Body properties on creation. + * + * @return {Phaser.Physics.Matter.Sprite} The Matter Sprite Game Object. + */ + sprite: function (x, y, key, frame, options) + { + var sprite = new MatterSprite(this.world, x, y, key, frame, options); + + this.sys.displayList.add(sprite); + this.sys.updateList.add(sprite); + + return sprite; + }, + + /** + * Takes an existing Game Object and injects all of the Matter Components into it. + * + * This enables you to use component methods such as `setVelocity` or `isSensor` directly from + * this Game Object. + * + * You can also pass in either a Matter Body Configuration object, or a Matter Body instance + * to link with this Game Object. + * + * @method Phaser.Physics.Matter.Factory#gameObject + * @since 3.3.0 + * + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to inject the Matter Components in to. + * @param {(Phaser.Types.Physics.Matter.MatterBodyConfig|MatterJS.Body)} [options] - A Matter Body configuration object, or an instance of a Matter Body. + * @param {boolean} [addToWorld=true] - Add this Matter Body to the World? + * + * @return {Phaser.Physics.Matter.MatterGameObject} The Game Object that had the Matter Components injected into it. + */ + gameObject: function (gameObject, options, addToWorld) + { + return MatterGameObject(this.world, gameObject, options, addToWorld); + }, + + /** + * Destroys this Factory. + * + * @method Phaser.Physics.Matter.Factory#destroy + * @since 3.5.0 + */ + destroy: function () + { + this.world = null; + this.scene = null; + this.sys = null; + } + +}); + +module.exports = Factory; + + +/***/ }), +/* 1402 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Components = __webpack_require__(499); +var GetFastValue = __webpack_require__(2); +var Vector2 = __webpack_require__(3); + +/** + * Internal function to check if the object has a getter or setter. + * + * @function hasGetterOrSetter + * @private + * + * @param {object} def - The object to check. + * + * @return {boolean} True if it has a getter or setter, otherwise false. + */ +function hasGetterOrSetter (def) +{ + return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function'); +} + +/** + * A Matter Game Object is a generic object that allows you to combine any Phaser Game Object, + * including those you have extended or created yourself, with all of the Matter Components. + * + * This enables you to use component methods such as `setVelocity` or `isSensor` directly from + * this Game Object. + * + * @function Phaser.Physics.Matter.MatterGameObject + * @since 3.3.0 + * + * @param {Phaser.Physics.Matter.World} world - The Matter world to add the body to. + * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will have the Matter body applied to it. + * @param {(Phaser.Types.Physics.Matter.MatterBodyConfig|MatterJS.Body)} [options] - A Matter Body configuration object, or an instance of a Matter Body. + * @param {boolean} [addToWorld=true] - Should the newly created body be immediately added to the World? + * + * @return {Phaser.GameObjects.GameObject} The Game Object that was created with the Matter body. + */ +var MatterGameObject = function (world, gameObject, options, addToWorld) +{ + if (options === undefined) { options = {}; } + if (addToWorld === undefined) { addToWorld = true; } + + var x = gameObject.x; + var y = gameObject.y; + + // Temp body pos to avoid body null checks + gameObject.body = { + temp: true, + position: { + x: x, + y: y + } + }; + + var mixins = [ + Components.Bounce, + Components.Collision, + Components.Force, + Components.Friction, + Components.Gravity, + Components.Mass, + Components.Sensor, + Components.SetBody, + Components.Sleep, + Components.Static, + Components.Transform, + Components.Velocity + ]; + + // First let's inject all of the components into the Game Object + mixins.forEach(function (mixin) + { + for (var key in mixin) + { + if (hasGetterOrSetter(mixin[key])) + { + Object.defineProperty(gameObject, key, { + get: mixin[key].get, + set: mixin[key].set + }); + } + else + { + Object.defineProperty(gameObject, key, {value: mixin[key]}); + } + } + + }); + + gameObject.world = world; + + gameObject._tempVec2 = new Vector2(x, y); + + if (options.hasOwnProperty('type') && options.type === 'body') + { + gameObject.setExistingBody(options, addToWorld); + } + else + { + var shape = GetFastValue(options, 'shape', null); + + if (!shape) + { + shape = 'rectangle'; + } + + options.addToWorld = addToWorld; + + gameObject.setBody(shape, options); + } + + return gameObject; +}; + +module.exports = MatterGameObject; + + +/***/ }), +/* 1403 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -193190,11 +194977,11 @@ function points_eq(a,b,precision){ */ var Class = __webpack_require__(0); -var Components = __webpack_require__(518); +var Components = __webpack_require__(499); var GameObject = __webpack_require__(14); var GetFastValue = __webpack_require__(2); -var Image = __webpack_require__(111); -var Pipeline = __webpack_require__(161); +var Image = __webpack_require__(112); +var Pipeline = __webpack_require__(163); var Vector2 = __webpack_require__(3); /** @@ -193326,7 +195113,7 @@ module.exports = MatterImage; /***/ }), -/* 1406 */ +/* 1404 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -193335,13 +195122,13 @@ module.exports = MatterImage; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AnimationComponent = __webpack_require__(507); +var AnimationState = __webpack_require__(248); var Class = __webpack_require__(0); -var Components = __webpack_require__(518); +var Components = __webpack_require__(499); var GameObject = __webpack_require__(14); var GetFastValue = __webpack_require__(2); -var Pipeline = __webpack_require__(161); -var Sprite = __webpack_require__(75); +var Pipeline = __webpack_require__(163); +var Sprite = __webpack_require__(76); var Vector2 = __webpack_require__(3); /** @@ -193431,7 +195218,7 @@ var MatterSprite = new Class({ */ this._crop = this.resetCropObject(); - this.anims = new AnimationComponent(this); + this.anims = new AnimationState(this); this.setTexture(texture, frame); this.setSizeToFrame(); @@ -193478,7 +195265,395 @@ module.exports = MatterSprite; /***/ }), -/* 1407 */ +/* 1405 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Bounds = __webpack_require__(102); +var Class = __webpack_require__(0); +var Composite = __webpack_require__(156); +var Constraint = __webpack_require__(232); +var Detector = __webpack_require__(542); +var Events = __webpack_require__(541); +var InputEvents = __webpack_require__(56); +var Merge = __webpack_require__(133); +var Sleeping = __webpack_require__(249); +var Vector2 = __webpack_require__(3); +var Vertices = __webpack_require__(88); + +/** + * @classdesc + * A Pointer Constraint is a special type of constraint that allows you to click + * and drag bodies in a Matter World. It monitors the active Pointers in a Scene, + * and when one is pressed down it checks to see if that hit any part of any active + * body in the world. If it did, and the body has input enabled, it will begin to + * drag it until either released, or you stop it via the `stopDrag` method. + * + * You can adjust the stiffness, length and other properties of the constraint via + * the `options` object on creation. + * + * @class PointerConstraint + * @memberof Phaser.Physics.Matter + * @constructor + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - A reference to the Scene to which this Pointer Constraint belongs. + * @param {Phaser.Physics.Matter.World} world - A reference to the Matter World instance to which this Constraint belongs. + * @param {object} [options] - A Constraint configuration object. + */ +var PointerConstraint = new Class({ + + initialize: + + function PointerConstraint (scene, world, options) + { + if (options === undefined) { options = {}; } + + // Defaults + var defaults = { + label: 'Pointer Constraint', + pointA: { x: 0, y: 0 }, + pointB: { x: 0, y: 0 }, + length: 0.01, + stiffness: 0.1, + angularStiffness: 1, + collisionFilter: { + category: 0x0001, + mask: 0xFFFFFFFF, + group: 0 + } + }; + + /** + * A reference to the Scene to which this Pointer Constraint belongs. + * This is the same Scene as the Matter World instance. + * + * @name Phaser.Physics.Matter.PointerConstraint#scene + * @type {Phaser.Scene} + * @since 3.0.0 + */ + this.scene = scene; + + /** + * A reference to the Matter World instance to which this Constraint belongs. + * + * @name Phaser.Physics.Matter.PointerConstraint#world + * @type {Phaser.Physics.Matter.World} + * @since 3.0.0 + */ + this.world = world; + + /** + * The Camera the Pointer was interacting with when the input + * down event was processed. + * + * @name Phaser.Physics.Matter.PointerConstraint#camera + * @type {Phaser.Cameras.Scene2D.Camera} + * @since 3.0.0 + */ + this.camera = null; + + /** + * A reference to the Input Pointer that activated this Constraint. + * This is set in the `onDown` handler. + * + * @name Phaser.Physics.Matter.PointerConstraint#pointer + * @type {Phaser.Input.Pointer} + * @default null + * @since 3.0.0 + */ + this.pointer = null; + + /** + * Is this Constraint active or not? + * + * An active constraint will be processed each update. An inactive one will be skipped. + * Use this to toggle a Pointer Constraint on and off. + * + * @name Phaser.Physics.Matter.PointerConstraint#active + * @type {boolean} + * @default true + * @since 3.0.0 + */ + this.active = true; + + /** + * The internal transformed position. + * + * @name Phaser.Physics.Matter.PointerConstraint#position + * @type {Phaser.Math.Vector2} + * @since 3.0.0 + */ + this.position = new Vector2(); + + /** + * The body that is currently being dragged, if any. + * + * @name Phaser.Physics.Matter.PointerConstraint#body + * @type {?MatterJS.BodyType} + * @since 3.16.2 + */ + this.body = null; + + /** + * The part of the body that was clicked on to start the drag. + * + * @name Phaser.Physics.Matter.PointerConstraint#part + * @type {?MatterJS.BodyType} + * @since 3.16.2 + */ + this.part = null; + + /** + * The native Matter Constraint that is used to attach to bodies. + * + * @name Phaser.Physics.Matter.PointerConstraint#constraint + * @type {MatterJS.ConstraintType} + * @since 3.0.0 + */ + this.constraint = Constraint.create(Merge(options, defaults)); + + this.world.on(Events.BEFORE_UPDATE, this.update, this); + + scene.sys.input.on(InputEvents.POINTER_DOWN, this.onDown, this); + scene.sys.input.on(InputEvents.POINTER_UP, this.onUp, this); + }, + + /** + * A Pointer has been pressed down onto the Scene. + * + * If this Constraint doesn't have an active Pointer then a hit test is set to + * run against all active bodies in the world during the _next_ call to `update`. + * If a body is found, it is bound to this constraint and the drag begins. + * + * @method Phaser.Physics.Matter.PointerConstraint#onDown + * @since 3.0.0 + * + * @param {Phaser.Input.Pointer} pointer - A reference to the Pointer that was pressed. + */ + onDown: function (pointer) + { + if (!this.pointer) + { + this.pointer = pointer; + this.camera = pointer.camera; + } + }, + + /** + * A Pointer has been released from the Scene. If it was the one this constraint was using, it's cleared. + * + * @method Phaser.Physics.Matter.PointerConstraint#onUp + * @since 3.22.0 + * + * @param {Phaser.Input.Pointer} pointer - A reference to the Pointer that was pressed. + */ + onUp: function (pointer) + { + if (pointer === this.pointer) + { + this.pointer = null; + } + }, + + /** + * Scans all active bodies in the current Matter World to see if any of them + * are hit by the Pointer. The _first one_ found to hit is set as the active contraint + * body. + * + * @method Phaser.Physics.Matter.PointerConstraint#getBody + * @fires Phaser.Physics.Matter.Events#DRAG_START + * @since 3.16.2 + * + * @return {boolean} `true` if a body was found and set, otherwise `false`. + */ + getBody: function (pointer) + { + var pos = this.position; + var constraint = this.constraint; + + this.camera.getWorldPoint(pointer.x, pointer.y, pos); + + var bodies = Composite.allBodies(this.world.localWorld); + + for (var i = 0; i < bodies.length; i++) + { + var body = bodies[i]; + + if (!body.ignorePointer && + Bounds.contains(body.bounds, pos) && + Detector.canCollide(body.collisionFilter, constraint.collisionFilter)) + { + if (this.hitTestBody(body, pos)) + { + this.world.emit(Events.DRAG_START, body, this.part, this); + + return true; + } + } + } + + return false; + }, + + /** + * Scans the current body to determine if a part of it was clicked on. + * If a part is found the body is set as the `constraint.bodyB` property, + * as well as the `body` property of this class. The part is also set. + * + * @method Phaser.Physics.Matter.PointerConstraint#hitTestBody + * @since 3.16.2 + * + * @param {MatterJS.BodyType} body - The Matter Body to check. + * @param {Phaser.Math.Vector2} position - A translated hit test position. + * + * @return {boolean} `true` if a part of the body was hit, otherwise `false`. + */ + hitTestBody: function (body, position) + { + var constraint = this.constraint; + var partsLength = body.parts.length; + + var start = (partsLength > 1) ? 1 : 0; + + for (var i = start; i < partsLength; i++) + { + var part = body.parts[i]; + + if (Vertices.contains(part.vertices, position)) + { + constraint.pointA = position; + constraint.pointB = { x: position.x - body.position.x, y: position.y - body.position.y }; + + constraint.bodyB = body; + constraint.angleB = body.angle; + + Sleeping.set(body, false); + + this.part = part; + this.body = body; + + return true; + } + } + + return false; + }, + + /** + * Internal update handler. Called in the Matter BEFORE_UPDATE step. + * + * @method Phaser.Physics.Matter.PointerConstraint#update + * @fires Phaser.Physics.Matter.Events#DRAG + * @since 3.0.0 + */ + update: function () + { + var pointer = this.pointer; + var body = this.body; + + if (!this.active || !pointer) + { + if (body) + { + this.stopDrag(); + } + + return; + } + + if (!pointer.isDown && body) + { + this.stopDrag(); + + return; + } + else if (pointer.isDown) + { + if (!body && !this.getBody(pointer)) + { + return; + } + + body = this.body; + + var pos = this.position; + var constraint = this.constraint; + + this.camera.getWorldPoint(pointer.x, pointer.y, pos); + + // Drag update + constraint.pointA.x = pos.x; + constraint.pointA.y = pos.y; + + Sleeping.set(body, false); + + this.world.emit(Events.DRAG, body, this); + } + }, + + /** + * Stops the Pointer Constraint from dragging the body any further. + * + * This is called automatically if the Pointer is released while actively + * dragging a body. Or, you can call it manually to release a body from a + * constraint without having to first release the pointer. + * + * @method Phaser.Physics.Matter.PointerConstraint#stopDrag + * @fires Phaser.Physics.Matter.Events#DRAG_END + * @since 3.16.2 + */ + stopDrag: function () + { + var body = this.body; + var constraint = this.constraint; + + constraint.bodyB = null; + constraint.pointB = null; + + this.pointer = null; + this.body = null; + this.part = null; + + if (body) + { + this.world.emit(Events.DRAG_END, body, this); + } + }, + + /** + * Destroys this Pointer Constraint instance and all of its references. + * + * @method Phaser.Physics.Matter.PointerConstraint#destroy + * @since 3.0.0 + */ + destroy: function () + { + this.world.removeConstraint(this.constraint); + + this.pointer = null; + this.constraint = null; + this.body = null; + this.part = null; + + this.world.off(Events.BEFORE_UPDATE, this.update); + + this.scene.sys.input.off(InputEvents.POINTER_DOWN, this.onDown, this); + this.scene.sys.input.off(InputEvents.POINTER_UP, this.onUp, this); + } + +}); + +module.exports = PointerConstraint; + + +/***/ }), +/* 1406 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -193491,8 +195666,8 @@ var Matter = {}; module.exports = Matter; -var Plugin = __webpack_require__(1311); -var Common = __webpack_require__(43); +var Plugin = __webpack_require__(1308); +var Common = __webpack_require__(44); (function() { @@ -193570,7 +195745,7 @@ var Common = __webpack_require__(43); /***/ }), -/* 1408 */ +/* 1407 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -193585,11 +195760,11 @@ var Query = {}; module.exports = Query; -var Vector = __webpack_require__(100); -var SAT = __webpack_require__(520); -var Bounds = __webpack_require__(101); -var Bodies = __webpack_require__(113); -var Vertices = __webpack_require__(87); +var Vector = __webpack_require__(101); +var SAT = __webpack_require__(543); +var Bounds = __webpack_require__(102); +var Bodies = __webpack_require__(114); +var Vertices = __webpack_require__(88); (function() { @@ -193712,7 +195887,7 @@ var Vertices = __webpack_require__(87); /***/ }), -/* 1409 */ +/* 1408 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -193729,17 +195904,17 @@ var Engine = {}; module.exports = Engine; -var World = __webpack_require__(1312); -var Sleeping = __webpack_require__(243); -var Resolver = __webpack_require__(1315); -var Pairs = __webpack_require__(1314); -var Metrics = __webpack_require__(1444); -var Grid = __webpack_require__(1313); -var Events = __webpack_require__(244); -var Composite = __webpack_require__(153); -var Constraint = __webpack_require__(225); -var Common = __webpack_require__(43); -var Body = __webpack_require__(62); +var World = __webpack_require__(1309); +var Sleeping = __webpack_require__(249); +var Resolver = __webpack_require__(1312); +var Pairs = __webpack_require__(1311); +var Metrics = __webpack_require__(1441); +var Grid = __webpack_require__(1310); +var Events = __webpack_require__(250); +var Composite = __webpack_require__(156); +var Constraint = __webpack_require__(232); +var Common = __webpack_require__(44); +var Body = __webpack_require__(64); (function() { @@ -194205,7 +196380,7 @@ var Body = __webpack_require__(62); /***/ }), -/* 1410 */ +/* 1409 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -194214,21 +196389,21 @@ var Body = __webpack_require__(62); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bodies = __webpack_require__(113); -var Body = __webpack_require__(62); +var Bodies = __webpack_require__(114); +var Body = __webpack_require__(64); var Class = __webpack_require__(0); -var Common = __webpack_require__(43); -var Composite = __webpack_require__(153); -var Engine = __webpack_require__(1409); -var EventEmitter = __webpack_require__(11); -var Events = __webpack_require__(1308); +var Common = __webpack_require__(44); +var Composite = __webpack_require__(156); +var Engine = __webpack_require__(1408); +var EventEmitter = __webpack_require__(12); +var Events = __webpack_require__(541); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); -var MatterBody = __webpack_require__(62); -var MatterEvents = __webpack_require__(244); -var MatterTileBody = __webpack_require__(1309); -var MatterWorld = __webpack_require__(1312); -var Vector = __webpack_require__(100); +var MatterBody = __webpack_require__(64); +var MatterEvents = __webpack_require__(250); +var MatterTileBody = __webpack_require__(1306); +var MatterWorld = __webpack_require__(1309); +var Vector = __webpack_require__(101); /** * @classdesc @@ -196426,18 +198601,18 @@ module.exports = World; /***/ }), -/* 1411 */ +/* 1410 */ /***/ (function(module, exports, __webpack_require__) { -/* WEBPACK VAR INJECTION */(function(global) {/** +/** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -__webpack_require__(522); +__webpack_require__(544); -var CONST = __webpack_require__(33); +var CONST = __webpack_require__(34); var Extend = __webpack_require__(19); /** @@ -196446,38 +198621,38 @@ var Extend = __webpack_require__(19); var Phaser = { - Actions: __webpack_require__(245), - Animations: __webpack_require__(642), - BlendModes: __webpack_require__(53), - Cache: __webpack_require__(643), - Cameras: __webpack_require__(646), - Core: __webpack_require__(732), + Actions: __webpack_require__(251), + Animations: __webpack_require__(648), + BlendModes: __webpack_require__(54), + Cache: __webpack_require__(659), + Cameras: __webpack_require__(662), + Core: __webpack_require__(750), Class: __webpack_require__(0), - Create: __webpack_require__(797), - Curves: __webpack_require__(803), - Data: __webpack_require__(806), - Display: __webpack_require__(808), - DOM: __webpack_require__(826), - Events: __webpack_require__(827), - Game: __webpack_require__(829), - GameObjects: __webpack_require__(922), - Geom: __webpack_require__(430), - Input: __webpack_require__(1213), - Loader: __webpack_require__(1247), - Math: __webpack_require__(176), - Physics: __webpack_require__(1412), - Plugins: __webpack_require__(1316), - Renderer: __webpack_require__(1449), - Scale: __webpack_require__(1318), - ScaleModes: __webpack_require__(240), - Scene: __webpack_require__(374), - Scenes: __webpack_require__(1319), - Structs: __webpack_require__(1321), - Textures: __webpack_require__(1322), - Tilemaps: __webpack_require__(1324), - Time: __webpack_require__(1370), - Tweens: __webpack_require__(1372), - Utils: __webpack_require__(1390) + Create: __webpack_require__(815), + Curves: __webpack_require__(821), + Data: __webpack_require__(823), + Display: __webpack_require__(825), + DOM: __webpack_require__(843), + Events: __webpack_require__(844), + Game: __webpack_require__(846), + GameObjects: __webpack_require__(936), + Geom: __webpack_require__(447), + Input: __webpack_require__(1220), + Loader: __webpack_require__(1253), + Math: __webpack_require__(178), + Physics: __webpack_require__(1411), + Plugins: __webpack_require__(1313), + Renderer: __webpack_require__(1446), + Scale: __webpack_require__(1315), + ScaleModes: __webpack_require__(245), + Scene: __webpack_require__(384), + Scenes: __webpack_require__(1316), + Structs: __webpack_require__(1318), + Textures: __webpack_require__(1319), + Tilemaps: __webpack_require__(1321), + Time: __webpack_require__(1367), + Tweens: __webpack_require__(1369), + Utils: __webpack_require__(1387) }; @@ -196485,7 +198660,7 @@ var Phaser = { if (true) { - Phaser.Sound = __webpack_require__(1401); + Phaser.Sound = __webpack_require__(1398); } if (false) @@ -196500,7 +198675,7 @@ Phaser = Extend(false, Phaser, CONST); /** * The root types namespace. - * + * * @namespace Phaser.Types * @since 3.17.0 */ @@ -196509,18 +198684,15 @@ Phaser = Extend(false, Phaser, CONST); module.exports = Phaser; -global.Phaser = Phaser; - /* * "Documentation is like pizza: when it is good, it is very, very good; * and when it is bad, it is better than nothing." * -- Dick Brandon */ -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(521))) /***/ }), -/* 1412 */ +/* 1411 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -196539,14 +198711,14 @@ global.Phaser = Phaser; module.exports = { - Arcade: __webpack_require__(1273), - Matter: __webpack_require__(1413) + Arcade: __webpack_require__(1279), + Matter: __webpack_require__(1412) }; /***/ }), -/* 1413 */ +/* 1412 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -196561,149 +198733,27 @@ module.exports = { module.exports = { - BodyBounds: __webpack_require__(1402), - Factory: __webpack_require__(1403), - Image: __webpack_require__(1405), - Matter: __webpack_require__(1310), - MatterPhysics: __webpack_require__(1445), - PolyDecomp: __webpack_require__(1404), - Sprite: __webpack_require__(1406), - TileBody: __webpack_require__(1309), - PhysicsEditorParser: __webpack_require__(1306), - PhysicsJSONParser: __webpack_require__(1307), - World: __webpack_require__(1410) + BodyBounds: __webpack_require__(1399), + Components: __webpack_require__(499), + Events: __webpack_require__(541), + Factory: __webpack_require__(1401), + MatterGameObject: __webpack_require__(1402), + Image: __webpack_require__(1403), + Matter: __webpack_require__(1307), + MatterPhysics: __webpack_require__(1442), + PolyDecomp: __webpack_require__(1400), + Sprite: __webpack_require__(1404), + TileBody: __webpack_require__(1306), + PhysicsEditorParser: __webpack_require__(1302), + PhysicsJSONParser: __webpack_require__(1303), + PointerConstraint: __webpack_require__(1405), + World: __webpack_require__(1409) }; /***/ }), -/* 1414 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Components = __webpack_require__(518); -var GetFastValue = __webpack_require__(2); -var Vector2 = __webpack_require__(3); - -/** - * Internal function to check if the object has a getter or setter. - * - * @function hasGetterOrSetter - * @private - * - * @param {object} def - The object to check. - * - * @return {boolean} True if it has a getter or setter, otherwise false. - */ -function hasGetterOrSetter (def) -{ - return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function'); -} - -/** - * A Matter Game Object is a generic object that allows you to combine any Phaser Game Object, - * including those you have extended or created yourself, with all of the Matter Components. - * - * This enables you to use component methods such as `setVelocity` or `isSensor` directly from - * this Game Object. - * - * @function Phaser.Physics.Matter.MatterGameObject - * @since 3.3.0 - * - * @param {Phaser.Physics.Matter.World} world - The Matter world to add the body to. - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will have the Matter body applied to it. - * @param {(Phaser.Types.Physics.Matter.MatterBodyConfig|MatterJS.Body)} [options] - A Matter Body configuration object, or an instance of a Matter Body. - * @param {boolean} [addToWorld=true] - Should the newly created body be immediately added to the World? - * - * @return {Phaser.GameObjects.GameObject} The Game Object that was created with the Matter body. - */ -var MatterGameObject = function (world, gameObject, options, addToWorld) -{ - if (options === undefined) { options = {}; } - if (addToWorld === undefined) { addToWorld = true; } - - var x = gameObject.x; - var y = gameObject.y; - - // Temp body pos to avoid body null checks - gameObject.body = { - temp: true, - position: { - x: x, - y: y - } - }; - - var mixins = [ - Components.Bounce, - Components.Collision, - Components.Force, - Components.Friction, - Components.Gravity, - Components.Mass, - Components.Sensor, - Components.SetBody, - Components.Sleep, - Components.Static, - Components.Transform, - Components.Velocity - ]; - - // First let's inject all of the components into the Game Object - mixins.forEach(function (mixin) - { - for (var key in mixin) - { - if (hasGetterOrSetter(mixin[key])) - { - Object.defineProperty(gameObject, key, { - get: mixin[key].get, - set: mixin[key].set - }); - } - else - { - Object.defineProperty(gameObject, key, {value: mixin[key]}); - } - } - - }); - - gameObject.world = world; - - gameObject._tempVec2 = new Vector2(x, y); - - if (options.hasOwnProperty('type') && options.type === 'body') - { - gameObject.setExistingBody(options, addToWorld); - } - else - { - var shape = GetFastValue(options, 'shape', null); - - if (!shape) - { - shape = 'rectangle'; - } - - options.addToWorld = addToWorld; - - gameObject.setBody(shape, options); - } - - return gameObject; -}; - -module.exports = MatterGameObject; - - -/***/ }), -/* 1415 */ +/* 1413 */ /***/ (function(module, exports) { /** @@ -196743,7 +198793,7 @@ module.exports = Bounce; /***/ }), -/* 1416 */ +/* 1414 */ /***/ (function(module, exports) { /** @@ -196929,7 +198979,7 @@ module.exports = Collision; /***/ }), -/* 1417 */ +/* 1415 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -196938,7 +198988,7 @@ module.exports = Collision; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Body = __webpack_require__(62); +var Body = __webpack_require__(64); /** * A component to apply force to Matter.js bodies. @@ -197085,7 +199135,7 @@ module.exports = Force; /***/ }), -/* 1418 */ +/* 1416 */ /***/ (function(module, exports) { /** @@ -197175,7 +199225,7 @@ module.exports = Friction; /***/ }), -/* 1419 */ +/* 1417 */ /***/ (function(module, exports) { /** @@ -197215,7 +199265,7 @@ module.exports = Gravity; /***/ }), -/* 1420 */ +/* 1418 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -197224,7 +199274,7 @@ module.exports = Gravity; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Body = __webpack_require__(62); +var Body = __webpack_require__(64); var Vector2 = __webpack_require__(3); /** @@ -197297,62 +199347,7 @@ module.exports = Mass; /***/ }), -/* 1421 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Body = __webpack_require__(62); - -/** - * Provides methods used for getting and setting the static state of a physics body. - * - * @namespace Phaser.Physics.Matter.Components.Static - * @since 3.0.0 - */ -var Static = { - - /** - * Changes the physics body to be either static `true` or dynamic `false`. - * - * @method Phaser.Physics.Matter.Components.Static#setStatic - * @since 3.0.0 - * - * @param {boolean} value - `true` to set the body as being static, or `false` to make it dynamic. - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setStatic: function (value) - { - Body.setStatic(this.body, value); - - return this; - }, - - /** - * Returns `true` if the body is static, otherwise `false` for a dynamic body. - * - * @method Phaser.Physics.Matter.Components.Static#isStatic - * @since 3.0.0 - * - * @return {boolean} `true` if the body is static, otherwise `false`. - */ - isStatic: function () - { - return this.body.isStatic; - } - -}; - -module.exports = Static; - - -/***/ }), -/* 1422 */ +/* 1419 */ /***/ (function(module, exports) { /** @@ -197406,7 +199401,7 @@ module.exports = Sensor; /***/ }), -/* 1423 */ +/* 1420 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -197415,13 +199410,13 @@ module.exports = Sensor; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bodies = __webpack_require__(113); -var Body = __webpack_require__(62); -var FuzzyEquals = __webpack_require__(107); +var Bodies = __webpack_require__(114); +var Body = __webpack_require__(64); +var FuzzyEquals = __webpack_require__(108); var GetFastValue = __webpack_require__(2); -var PhysicsEditorParser = __webpack_require__(1306); -var PhysicsJSONParser = __webpack_require__(1307); -var Vertices = __webpack_require__(87); +var PhysicsEditorParser = __webpack_require__(1302); +var PhysicsJSONParser = __webpack_require__(1303); +var Vertices = __webpack_require__(88); /** * Enables a Matter-enabled Game Object to set its Body. Should be used as a mixin and not directly. @@ -197696,7 +199691,7 @@ module.exports = SetBody; /***/ }), -/* 1424 */ +/* 1421 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -197705,9 +199700,9 @@ module.exports = SetBody; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Events = __webpack_require__(1308); -var Sleeping = __webpack_require__(243); -var MatterEvents = __webpack_require__(244); +var Events = __webpack_require__(541); +var Sleeping = __webpack_require__(249); +var MatterEvents = __webpack_require__(250); /** * Enables a Matter-enabled Game Object to be able to go to sleep. Should be used as a mixin and not directly. @@ -197850,7 +199845,7 @@ module.exports = Sleep; /***/ }), -/* 1425 */ +/* 1422 */ /***/ (function(module, exports) { /** @@ -197884,7 +199879,7 @@ module.exports = 'afteradd'; /***/ }), -/* 1426 */ +/* 1423 */ /***/ (function(module, exports) { /** @@ -197918,7 +199913,7 @@ module.exports = 'afterremove'; /***/ }), -/* 1427 */ +/* 1424 */ /***/ (function(module, exports) { /** @@ -197951,7 +199946,7 @@ module.exports = 'afterupdate'; /***/ }), -/* 1428 */ +/* 1425 */ /***/ (function(module, exports) { /** @@ -197985,7 +199980,7 @@ module.exports = 'beforeadd'; /***/ }), -/* 1429 */ +/* 1426 */ /***/ (function(module, exports) { /** @@ -198019,7 +200014,7 @@ module.exports = 'beforeremove'; /***/ }), -/* 1430 */ +/* 1427 */ /***/ (function(module, exports) { /** @@ -198052,7 +200047,7 @@ module.exports = 'beforeupdate'; /***/ }), -/* 1431 */ +/* 1428 */ /***/ (function(module, exports) { /** @@ -198089,7 +200084,7 @@ module.exports = 'collisionactive'; /***/ }), -/* 1432 */ +/* 1429 */ /***/ (function(module, exports) { /** @@ -198126,7 +200121,7 @@ module.exports = 'collisionend'; /***/ }), -/* 1433 */ +/* 1430 */ /***/ (function(module, exports) { /** @@ -198163,7 +200158,7 @@ module.exports = 'collisionstart'; /***/ }), -/* 1434 */ +/* 1431 */ /***/ (function(module, exports) { /** @@ -198190,7 +200185,7 @@ module.exports = 'dragend'; /***/ }), -/* 1435 */ +/* 1432 */ /***/ (function(module, exports) { /** @@ -198217,7 +200212,7 @@ module.exports = 'drag'; /***/ }), -/* 1436 */ +/* 1433 */ /***/ (function(module, exports) { /** @@ -198245,7 +200240,7 @@ module.exports = 'dragstart'; /***/ }), -/* 1437 */ +/* 1434 */ /***/ (function(module, exports) { /** @@ -198268,7 +200263,7 @@ module.exports = 'pause'; /***/ }), -/* 1438 */ +/* 1435 */ /***/ (function(module, exports) { /** @@ -198291,7 +200286,7 @@ module.exports = 'resume'; /***/ }), -/* 1439 */ +/* 1436 */ /***/ (function(module, exports) { /** @@ -198324,7 +200319,7 @@ module.exports = 'sleepend'; /***/ }), -/* 1440 */ +/* 1437 */ /***/ (function(module, exports) { /** @@ -198357,7 +200352,7 @@ module.exports = 'sleepstart'; /***/ }), -/* 1441 */ +/* 1438 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -198366,10 +200361,65 @@ module.exports = 'sleepstart'; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Body = __webpack_require__(62); +var Body = __webpack_require__(64); + +/** + * Provides methods used for getting and setting the static state of a physics body. + * + * @namespace Phaser.Physics.Matter.Components.Static + * @since 3.0.0 + */ +var Static = { + + /** + * Changes the physics body to be either static `true` or dynamic `false`. + * + * @method Phaser.Physics.Matter.Components.Static#setStatic + * @since 3.0.0 + * + * @param {boolean} value - `true` to set the body as being static, or `false` to make it dynamic. + * + * @return {Phaser.GameObjects.GameObject} This Game Object. + */ + setStatic: function (value) + { + Body.setStatic(this.body, value); + + return this; + }, + + /** + * Returns `true` if the body is static, otherwise `false` for a dynamic body. + * + * @method Phaser.Physics.Matter.Components.Static#isStatic + * @since 3.0.0 + * + * @return {boolean} `true` if the body is static, otherwise `false`. + */ + isStatic: function () + { + return this.body.isStatic; + } + +}; + +module.exports = Static; + + +/***/ }), +/* 1439 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Body = __webpack_require__(64); var MATH_CONST = __webpack_require__(13); -var WrapAngle = __webpack_require__(241); -var WrapAngleDegrees = __webpack_require__(242); +var WrapAngle = __webpack_require__(246); +var WrapAngleDegrees = __webpack_require__(247); // global bitmask flag for GameObject.renderMask (used by Scale) var _FLAG = 4; // 0100 @@ -198672,7 +200722,7 @@ module.exports = Transform; /***/ }), -/* 1442 */ +/* 1440 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -198681,7 +200731,7 @@ module.exports = Transform; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Body = __webpack_require__(62); +var Body = __webpack_require__(64); /** * Contains methods for changing the velocity of a Matter Body. Should be used as a mixin and not called directly. @@ -198773,395 +200823,7 @@ module.exports = Velocity; /***/ }), -/* 1443 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Bounds = __webpack_require__(101); -var Class = __webpack_require__(0); -var Composite = __webpack_require__(153); -var Constraint = __webpack_require__(225); -var Detector = __webpack_require__(519); -var Events = __webpack_require__(1308); -var InputEvents = __webpack_require__(55); -var Merge = __webpack_require__(132); -var Sleeping = __webpack_require__(243); -var Vector2 = __webpack_require__(3); -var Vertices = __webpack_require__(87); - -/** - * @classdesc - * A Pointer Constraint is a special type of constraint that allows you to click - * and drag bodies in a Matter World. It monitors the active Pointers in a Scene, - * and when one is pressed down it checks to see if that hit any part of any active - * body in the world. If it did, and the body has input enabled, it will begin to - * drag it until either released, or you stop it via the `stopDrag` method. - * - * You can adjust the stiffness, length and other properties of the constraint via - * the `options` object on creation. - * - * @class PointerConstraint - * @memberof Phaser.Physics.Matter - * @constructor - * @since 3.0.0 - * - * @param {Phaser.Scene} scene - A reference to the Scene to which this Pointer Constraint belongs. - * @param {Phaser.Physics.Matter.World} world - A reference to the Matter World instance to which this Constraint belongs. - * @param {object} [options] - A Constraint configuration object. - */ -var PointerConstraint = new Class({ - - initialize: - - function PointerConstraint (scene, world, options) - { - if (options === undefined) { options = {}; } - - // Defaults - var defaults = { - label: 'Pointer Constraint', - pointA: { x: 0, y: 0 }, - pointB: { x: 0, y: 0 }, - length: 0.01, - stiffness: 0.1, - angularStiffness: 1, - collisionFilter: { - category: 0x0001, - mask: 0xFFFFFFFF, - group: 0 - } - }; - - /** - * A reference to the Scene to which this Pointer Constraint belongs. - * This is the same Scene as the Matter World instance. - * - * @name Phaser.Physics.Matter.PointerConstraint#scene - * @type {Phaser.Scene} - * @since 3.0.0 - */ - this.scene = scene; - - /** - * A reference to the Matter World instance to which this Constraint belongs. - * - * @name Phaser.Physics.Matter.PointerConstraint#world - * @type {Phaser.Physics.Matter.World} - * @since 3.0.0 - */ - this.world = world; - - /** - * The Camera the Pointer was interacting with when the input - * down event was processed. - * - * @name Phaser.Physics.Matter.PointerConstraint#camera - * @type {Phaser.Cameras.Scene2D.Camera} - * @since 3.0.0 - */ - this.camera = null; - - /** - * A reference to the Input Pointer that activated this Constraint. - * This is set in the `onDown` handler. - * - * @name Phaser.Physics.Matter.PointerConstraint#pointer - * @type {Phaser.Input.Pointer} - * @default null - * @since 3.0.0 - */ - this.pointer = null; - - /** - * Is this Constraint active or not? - * - * An active constraint will be processed each update. An inactive one will be skipped. - * Use this to toggle a Pointer Constraint on and off. - * - * @name Phaser.Physics.Matter.PointerConstraint#active - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.active = true; - - /** - * The internal transformed position. - * - * @name Phaser.Physics.Matter.PointerConstraint#position - * @type {Phaser.Math.Vector2} - * @since 3.0.0 - */ - this.position = new Vector2(); - - /** - * The body that is currently being dragged, if any. - * - * @name Phaser.Physics.Matter.PointerConstraint#body - * @type {?MatterJS.BodyType} - * @since 3.16.2 - */ - this.body = null; - - /** - * The part of the body that was clicked on to start the drag. - * - * @name Phaser.Physics.Matter.PointerConstraint#part - * @type {?MatterJS.BodyType} - * @since 3.16.2 - */ - this.part = null; - - /** - * The native Matter Constraint that is used to attach to bodies. - * - * @name Phaser.Physics.Matter.PointerConstraint#constraint - * @type {MatterJS.ConstraintType} - * @since 3.0.0 - */ - this.constraint = Constraint.create(Merge(options, defaults)); - - this.world.on(Events.BEFORE_UPDATE, this.update, this); - - scene.sys.input.on(InputEvents.POINTER_DOWN, this.onDown, this); - scene.sys.input.on(InputEvents.POINTER_UP, this.onUp, this); - }, - - /** - * A Pointer has been pressed down onto the Scene. - * - * If this Constraint doesn't have an active Pointer then a hit test is set to - * run against all active bodies in the world during the _next_ call to `update`. - * If a body is found, it is bound to this constraint and the drag begins. - * - * @method Phaser.Physics.Matter.PointerConstraint#onDown - * @since 3.0.0 - * - * @param {Phaser.Input.Pointer} pointer - A reference to the Pointer that was pressed. - */ - onDown: function (pointer) - { - if (!this.pointer) - { - this.pointer = pointer; - this.camera = pointer.camera; - } - }, - - /** - * A Pointer has been released from the Scene. If it was the one this constraint was using, it's cleared. - * - * @method Phaser.Physics.Matter.PointerConstraint#onUp - * @since 3.22.0 - * - * @param {Phaser.Input.Pointer} pointer - A reference to the Pointer that was pressed. - */ - onUp: function (pointer) - { - if (pointer === this.pointer) - { - this.pointer = null; - } - }, - - /** - * Scans all active bodies in the current Matter World to see if any of them - * are hit by the Pointer. The _first one_ found to hit is set as the active contraint - * body. - * - * @method Phaser.Physics.Matter.PointerConstraint#getBody - * @fires Phaser.Physics.Matter.Events#DRAG_START - * @since 3.16.2 - * - * @return {boolean} `true` if a body was found and set, otherwise `false`. - */ - getBody: function (pointer) - { - var pos = this.position; - var constraint = this.constraint; - - this.camera.getWorldPoint(pointer.x, pointer.y, pos); - - var bodies = Composite.allBodies(this.world.localWorld); - - for (var i = 0; i < bodies.length; i++) - { - var body = bodies[i]; - - if (!body.ignorePointer && - Bounds.contains(body.bounds, pos) && - Detector.canCollide(body.collisionFilter, constraint.collisionFilter)) - { - if (this.hitTestBody(body, pos)) - { - this.world.emit(Events.DRAG_START, body, this.part, this); - - return true; - } - } - } - - return false; - }, - - /** - * Scans the current body to determine if a part of it was clicked on. - * If a part is found the body is set as the `constraint.bodyB` property, - * as well as the `body` property of this class. The part is also set. - * - * @method Phaser.Physics.Matter.PointerConstraint#hitTestBody - * @since 3.16.2 - * - * @param {MatterJS.BodyType} body - The Matter Body to check. - * @param {Phaser.Math.Vector2} position - A translated hit test position. - * - * @return {boolean} `true` if a part of the body was hit, otherwise `false`. - */ - hitTestBody: function (body, position) - { - var constraint = this.constraint; - var partsLength = body.parts.length; - - var start = (partsLength > 1) ? 1 : 0; - - for (var i = start; i < partsLength; i++) - { - var part = body.parts[i]; - - if (Vertices.contains(part.vertices, position)) - { - constraint.pointA = position; - constraint.pointB = { x: position.x - body.position.x, y: position.y - body.position.y }; - - constraint.bodyB = body; - constraint.angleB = body.angle; - - Sleeping.set(body, false); - - this.part = part; - this.body = body; - - return true; - } - } - - return false; - }, - - /** - * Internal update handler. Called in the Matter BEFORE_UPDATE step. - * - * @method Phaser.Physics.Matter.PointerConstraint#update - * @fires Phaser.Physics.Matter.Events#DRAG - * @since 3.0.0 - */ - update: function () - { - var pointer = this.pointer; - var body = this.body; - - if (!this.active || !pointer) - { - if (body) - { - this.stopDrag(); - } - - return; - } - - if (!pointer.isDown && body) - { - this.stopDrag(); - - return; - } - else if (pointer.isDown) - { - if (!body && !this.getBody(pointer)) - { - return; - } - - body = this.body; - - var pos = this.position; - var constraint = this.constraint; - - this.camera.getWorldPoint(pointer.x, pointer.y, pos); - - // Drag update - constraint.pointA.x = pos.x; - constraint.pointA.y = pos.y; - - Sleeping.set(body, false); - - this.world.emit(Events.DRAG, body, this); - } - }, - - /** - * Stops the Pointer Constraint from dragging the body any further. - * - * This is called automatically if the Pointer is released while actively - * dragging a body. Or, you can call it manually to release a body from a - * constraint without having to first release the pointer. - * - * @method Phaser.Physics.Matter.PointerConstraint#stopDrag - * @fires Phaser.Physics.Matter.Events#DRAG_END - * @since 3.16.2 - */ - stopDrag: function () - { - var body = this.body; - var constraint = this.constraint; - - constraint.bodyB = null; - constraint.pointB = null; - - this.pointer = null; - this.body = null; - this.part = null; - - if (body) - { - this.world.emit(Events.DRAG_END, body, this); - } - }, - - /** - * Destroys this Pointer Constraint instance and all of its references. - * - * @method Phaser.Physics.Matter.PointerConstraint#destroy - * @since 3.0.0 - */ - destroy: function () - { - this.world.removeConstraint(this.constraint); - - this.pointer = null; - this.constraint = null; - this.body = null; - this.part = null; - - this.world.off(Events.BEFORE_UPDATE, this.update); - - this.scene.sys.input.off(InputEvents.POINTER_DOWN, this.onDown, this); - this.scene.sys.input.off(InputEvents.POINTER_UP, this.onUp, this); - } - -}); - -module.exports = PointerConstraint; - - -/***/ }), -/* 1444 */ +/* 1441 */ /***/ (function(module, exports, __webpack_require__) { // @if DEBUG @@ -199174,8 +200836,8 @@ var Metrics = {}; module.exports = Metrics; -var Composite = __webpack_require__(153); -var Common = __webpack_require__(43); +var Composite = __webpack_require__(156); +var Common = __webpack_require__(44); (function() { @@ -199260,7 +200922,7 @@ var Common = __webpack_require__(43); /***/ }), -/* 1445 */ +/* 1442 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -199269,39 +200931,39 @@ var Common = __webpack_require__(43); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ALIGN_CONST = __webpack_require__(106); -var Axes = __webpack_require__(517); -var Bodies = __webpack_require__(113); -var Body = __webpack_require__(62); -var BodyBounds = __webpack_require__(1402); -var Bounds = __webpack_require__(101); +var ALIGN_CONST = __webpack_require__(107); +var Axes = __webpack_require__(540); +var Bodies = __webpack_require__(114); +var Body = __webpack_require__(64); +var BodyBounds = __webpack_require__(1399); +var Bounds = __webpack_require__(102); var Class = __webpack_require__(0); -var Composite = __webpack_require__(153); +var Composite = __webpack_require__(156); var Composites = __webpack_require__(1304); -var Constraint = __webpack_require__(225); -var Detector = __webpack_require__(519); -var DistanceBetween = __webpack_require__(54); -var Factory = __webpack_require__(1403); +var Constraint = __webpack_require__(232); +var Detector = __webpack_require__(542); +var DistanceBetween = __webpack_require__(55); +var Factory = __webpack_require__(1401); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); -var Grid = __webpack_require__(1313); -var MatterAttractors = __webpack_require__(1446); -var MatterCollisionEvents = __webpack_require__(1447); -var MatterLib = __webpack_require__(1407); -var MatterWrap = __webpack_require__(1448); -var Merge = __webpack_require__(132); -var Pair = __webpack_require__(476); -var Pairs = __webpack_require__(1314); -var Plugin = __webpack_require__(1311); +var Grid = __webpack_require__(1310); +var MatterAttractors = __webpack_require__(1443); +var MatterCollisionEvents = __webpack_require__(1444); +var MatterLib = __webpack_require__(1406); +var MatterWrap = __webpack_require__(1445); +var Merge = __webpack_require__(133); +var Pair = __webpack_require__(500); +var Pairs = __webpack_require__(1311); +var Plugin = __webpack_require__(1308); var PluginCache = __webpack_require__(23); -var Query = __webpack_require__(1408); -var Resolver = __webpack_require__(1315); -var SAT = __webpack_require__(520); -var SceneEvents = __webpack_require__(22); +var Query = __webpack_require__(1407); +var Resolver = __webpack_require__(1312); +var SAT = __webpack_require__(543); +var SceneEvents = __webpack_require__(20); var Svg = __webpack_require__(1305); -var Vector = __webpack_require__(100); -var Vertices = __webpack_require__(87); -var World = __webpack_require__(1410); +var Vector = __webpack_require__(101); +var Vertices = __webpack_require__(88); +var World = __webpack_require__(1409); /** * @classdesc @@ -200729,10 +202391,10 @@ module.exports = MatterPhysics; /***/ }), -/* 1446 */ +/* 1443 */ /***/ (function(module, exports, __webpack_require__) { -var Matter = __webpack_require__(1310); +var Matter = __webpack_require__(1307); /** * An attractors plugin for matter.js. @@ -200888,7 +202550,7 @@ module.exports = MatterAttractors; /***/ }), -/* 1447 */ +/* 1444 */ /***/ (function(module, exports) { /** @@ -201021,10 +202683,10 @@ module.exports = MatterCollisionEvents; /***/ }), -/* 1448 */ +/* 1445 */ /***/ (function(module, exports, __webpack_require__) { -var Matter = __webpack_require__(1310); +var Matter = __webpack_require__(1307); /** * A coordinate wrapping plugin for matter.js. @@ -201203,7 +202865,7 @@ module.exports = MatterWrap; */ /***/ }), -/* 1449 */ +/* 1446 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -201222,15 +202884,15 @@ module.exports = MatterWrap; module.exports = { - Canvas: __webpack_require__(1450), - Snapshot: __webpack_require__(1451), - WebGL: __webpack_require__(1452) + Canvas: __webpack_require__(1447), + Snapshot: __webpack_require__(1448), + WebGL: __webpack_require__(1449) }; /***/ }), -/* 1450 */ +/* 1447 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -201245,15 +202907,15 @@ module.exports = { module.exports = { - CanvasRenderer: __webpack_require__(508), - GetBlendModes: __webpack_require__(510), + CanvasRenderer: __webpack_require__(531), + GetBlendModes: __webpack_require__(533), SetTransform: __webpack_require__(28) }; /***/ }), -/* 1451 */ +/* 1448 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -201268,14 +202930,14 @@ module.exports = { module.exports = { - Canvas: __webpack_require__(509), - WebGL: __webpack_require__(512) + Canvas: __webpack_require__(532), + WebGL: __webpack_require__(535) }; /***/ }), -/* 1452 */ +/* 1449 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -201291,15 +202953,15 @@ module.exports = { module.exports = { Utils: __webpack_require__(10), - WebGLPipeline: __webpack_require__(108), - WebGLRenderer: __webpack_require__(511), - Pipelines: __webpack_require__(1453) + WebGLPipeline: __webpack_require__(109), + WebGLRenderer: __webpack_require__(534), + Pipelines: __webpack_require__(1450) }; /***/ }), -/* 1453 */ +/* 1450 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -201314,12 +202976,12 @@ module.exports = { module.exports = { - BitmapMaskPipeline: __webpack_require__(513), - LightPipeline: __webpack_require__(514), - SinglePipeline: __webpack_require__(516), - MultiPipeline: __webpack_require__(109), - RopePipeline: __webpack_require__(515), - ModelViewProjection: __webpack_require__(110) + BitmapMaskPipeline: __webpack_require__(536), + LightPipeline: __webpack_require__(537), + SinglePipeline: __webpack_require__(539), + MultiPipeline: __webpack_require__(110), + RopePipeline: __webpack_require__(538), + ModelViewProjection: __webpack_require__(111) }; diff --git a/dist/phaser.min.js b/dist/phaser.min.js index e420c4e99..7fc13c2b8 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()}(window,function(){return n={},s.m=i=[function(t,e){function r(t,e,i,n){for(var s in e)if(e.hasOwnProperty(s)){var r=(l=e,u=s,f=d=void 0,f=(c=i)?l[u]:Object.getOwnPropertyDescriptor(l,u),!c&&f.value&&"object"==typeof f.value&&(f=f.value),!(!f||!((d=f).get&&"function"==typeof d.get||d.set&&"function"==typeof d.set))&&(void 0===f.enumerable&&(f.enumerable=!0),void 0===f.configurable&&(f.configurable=!0),f));if(!1!==r){if(o=(n||t).prototype,a=s,h=void 0,(h=Object.getOwnPropertyDescriptor(o,a))&&(h.value&&"object"==typeof h.value&&(h=h.value),!1===h.configurable)){if(p.ignoreFinals)continue;throw new Error("cannot override final property '"+s+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,s,r)}else t.prototype[s]=e[s]}var o,a,h,l,u,c,d,f}function o(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i=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},function(t,e){t.exports={getTintFromFloats:function(t,e,i,n){return((255&(255*n|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]},getComponentCount:function(t,e){for(var i=0,n=0;nr.width&&(i=Math.max(r.width-t,0)),e+n>r.height&&(n=Math.max(r.height-e,0));for(var l=[],u=e;uthis.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},function(t,e,i){var n=i(13);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e,i){t.exports={DESTROY:i(651),FADE_IN_COMPLETE:i(652),FADE_IN_START:i(653),FADE_OUT_COMPLETE:i(654),FADE_OUT_START:i(655),FLASH_COMPLETE:i(656),FLASH_START:i(657),PAN_COMPLETE:i(658),PAN_START:i(659),POST_RENDER:i(660),PRE_RENDER:i(661),ROTATE_COMPLETE:i(662),ROTATE_START:i(663),SHAKE_COMPLETE:i(664),SHAKE_START:i(665),ZOOM_COMPLETE:i(666),ZOOM_START:i(667)}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.fillColor,r=n||e.fillAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.fillStyle="rgba("+o+","+a+","+h+","+r+")"}},function(t,e){var h={};t.exports=h,function(){h._nextId=0,h._seed=0,h._nowStartTime=+new Date,h.extend=function(t,e){for(var i,n="boolean"==typeof e?(i=2,e):(i=1,!0),s=i;s=e&&t.y<=i&&t.y+t.height>=i)}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.strokeColor,r=n||e.strokeAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.strokeStyle="rgba("+o+","+a+","+h+","+r+")",t.lineWidth=e.lineWidth}},function(t,e){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}},function(t,e,i){var d=i(148),f=i(24);t.exports=function(t,e,i,n,s){for(var r,o,a,h,l=f(t,e,i,n,null,s),u=0;u=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}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e,i){t.exports={COMPLETE:i(899),DECODED:i(900),DECODED_ALL:i(901),DESTROY:i(902),DETUNE:i(903),GLOBAL_DETUNE:i(904),GLOBAL_MUTE:i(905),GLOBAL_RATE:i(906),GLOBAL_VOLUME:i(907),LOOP:i(908),LOOPED:i(909),MUTE:i(910),PAUSE_ALL:i(911),PAUSE:i(912),PLAY:i(913),RATE:i(914),RESUME_ALL:i(915),RESUME:i(916),SEEK:i(917),STOP_ALL:i(918),STOP:i(919),UNLOCKED:i(920),VOLUME:i(921)}},function(t,e,i){var n=i(0),h=i(18),l=i(21),s=i(8),u=i(2),c=i(6),d=i(7),r=new n({Extends:l,initialize:function(t,e,i,n,s){var r,o="json";d(e)&&(e=u(r=e,"key"),i=u(r,"url"),n=u(r,"xhrSettings"),o=u(r,"extension",o),s=u(r,"dataKey",s));var a={type:"json",cache:t.cacheManager.json,extension:o,responseType:"text",key:e,url:i,xhrSettings:n,config:s};l.call(this,t,a),d(i)&&(this.data=s?c(i,s):i,this.state=h.FILE_POPULATED)},onProcess:function(){var t,e;this.state!==h.FILE_POPULATED&&(this.state=h.FILE_PROCESSING,t=JSON.parse(this.xhrLoader.responseText),e=this.config,this.data="string"==typeof e?c(t,e,t):t),this.onProcessComplete()}});s.register("json",function(t,e,i,n){if(Array.isArray(t))for(var s=0;s=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&o=n.x&&n.x>=u&&s!==n.x&&T(ri.x||n.x===i.x&&function(t,e){return w(t.prev,t,e.prev)<0&&w(e.next,t,t.next)<0}(i,n)))&&(i=n,d=h)),n=n.next,n!==l;);return i}(t,e))&&(i=E(e,t),v(e,e.next),v(i,i.next))}}(l[s],i),i=v(i,i.next);return i}(t,e,d,i)),t.length>80*i){n=r=t[0],s=o=t[1];for(var p=i;pr.x?s.x>o.x?s.x:o.x:r.x>o.x?r.x:o.x,u=s.y>r.y?s.y>o.y?s.y:o.y:r.y>o.y?r.y:o.y,c=x(a,h,e,i,n),d=x(l,u,e,i,n),f=t.prevZ,p=t.nextZ;for(;f&&f.z>=c&&p&&p.z<=d;){if(f!==t.prev&&f!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,f.x,f.y)&&0<=w(f.prev,f,f.next))return!1;if(f=f.prevZ,p!==t.prev&&p!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&0<=w(p.prev,p,p.next))return!1;p=p.nextZ}for(;f&&f.z>=c;){if(f!==t.prev&&f!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,f.x,f.y)&&0<=w(f.prev,f,f.next))return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&0<=w(p.prev,p,p.next))return!1;p=p.nextZ}return!0}(t,n,s,r):function(t){var e=t.prev,i=t,n=t.next;if(0<=w(e,i,n))return!1;var s=t.next.next;for(;s!==t.prev;){if(T(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&0<=w(s.prev,s,s.next))return!1;s=s.next}return!0}(t))e.push(a.i/i),e.push(t.i/i),e.push(h.i/i),d(t),t=h.next,l=h.next;else if((t=h)===l){o?1===o?m(t=function(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!u(s,r)&&c(s,n,n.next,r)&&b(s,r)&&b(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),d(n),d(n.next),n=t=r),n=n.next}while(n!==t);return v(n)}(v(t),e,i),e,i,n,s,r,2):2===o&&function(t,e,i,n,s,r){var o=t;do{for(var a=o.next.next;a!==o.prev;){if(o.i!==a.i&&function(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&&c(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&(b(t,e)&&b(e,t)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;for(;i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next,i!==t;);return n}(t,e)&&(w(t.prev,t,e.prev)||w(t,e.prev,e))||u(t,e)&&0=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function l(t){return 0=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},function(t,e,i){var n=i(0),s=i(18),c=i(21),r=i(8),d=i(2),f=i(7),o=new n({Extends:c,initialize:function t(e,i,n,s,r){var o,a,h="png";f(i)&&(i=d(a=i,"key"),n=d(a,"url"),o=d(a,"normalMap"),s=d(a,"xhrSettings"),h=d(a,"extension",h),r=d(a,"frameConfig")),Array.isArray(n)&&(o=n[1],n=n[0]);var l,u={type:"image",cache:e.textureManager,extension:h,responseType:"blob",key:i,url:n,xhrSettings:s,config:r};c.call(this,e,u),o&&((l=new t(e,this.key,o,s,r)).type="normalMap",this.setLink(l),e.addFile(l))},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){c.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){c.revokeObjectURL(t.data),t.onProcessError()},c.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var t,e=this.linkFile;e&&e.state===s.FILE_COMPLETE?(t="image"===this.type?this.cache.addImage(this.key,this.data,e.data):this.cache.addImage(e.key,e.data,this.data),this.pendingDestroy(t),e.pendingDestroy(t)):e||(t=this.cache.addImage(this.key,this.data),this.pendingDestroy(t))}});r.register("image",function(t,e,i){if(Array.isArray(t))for(var n=0;nthis.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=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.tileToWorldX(this.x,t):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.tileToWorldY(this.y,t)-(this.height-this.baseHeight)*e.scaleY:this.y*this.baseHeight-(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 r),e.x=this.getLeft(),e.y=this.getTop(),e.width=this.getRight()-e.x,e.height=this.getBottom()-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},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=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){return 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),this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){return void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===s&&(s=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,s&&this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y),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,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight,this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||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=o},function(t,e,i){var n=i(0),r=i(12),o=i(14),s=i(976),a=new n({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,s],initialize:function(t,e,i,n,s){o.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new r.Animation(this),this.setTexture(n,s),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()},preUpdate:function(t,e){this.anims.update(t,e)},play:function(t,e,i){return this.anims.play(t,e,i),this},toJSON:function(){return r.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=a},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e,i){var n=new(i(0))({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},clone:function(){return new n(this.x,this.y,this.z)},crossVectors:function(t,e){var i=t.x,n=t.y,s=t.z,r=e.x,o=e.y,a=e.z;return this.x=n*a-s*o,this.y=s*r-i*a,this.z=i*o-n*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},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||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,n=t.z-this.z||0;return Math.sqrt(e*e+i*i+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return e*e+i*i+n*n},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,n=t*t+e*e+i*i;return 0=t.length)){for(var i=t.length-1,n=t[e],s=e;sh||a.y>l)?(u=Math.max(a.x,e),c=Math.max(a.y,i),b=d=Math.min(a.r,h)-u,E=f=Math.min(a.b,l)-c,T=r?p+(v-(u-a.x)-d):p+(u-a.x),w=o?g+(m-(c-a.y)-f):g+(c-a.y),e=u,i=c,n=d,s=f):E=b=w=T=0):(r&&(T=p+(v-e-n)),o&&(w=g+(m-i-s)));var _=this.source.width,A=this.source.height;return t.u0=Math.max(0,T/_),t.v0=Math.max(0,w/A),t.u1=Math.min(1,(T+b)/_),t.v1=Math.min(1,(w+E)/A),t.x=e,t.y=i,t.cx=T,t.cy=w,t.cw=b,t.ch=E,t.width=n,t.height=s,t.flipX=r,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,n,s,r){var o=this.data.drawImage;return o.width=t,o.height=e,this.u0=i,this.v0=n,this.u1=s,this.v1=r,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.width=i,s.height=n;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+n)/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 r(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=s(!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=r},function(t,e,i){var n=i(0),s=i(97),r=i(398),o=i(399),a=i(48),h=i(163),l=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=a.ELLIPSE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(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,n){return this.x=t,this.y=e,this.width=i,this.height=n,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},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){var B=i(245),n=i(0),r=i(91),N=i(2),Y=i(6),s=i(7),X=i(392),o=i(139),a=i(75),h=new n({initialize:function(t,e,i){i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?s(e[0])&&(i=e,e=null):s(e)&&(i=e,e=null),this.scene=t,this.children=new o,this.isParent=!0,this.type="Group",this.classType=N(i,"classType",a),this.name=N(i,"name",""),this.active=N(i,"active",!0),this.maxSize=N(i,"maxSize",-1),this.defaultKey=N(i,"defaultKey",null),this.defaultFrame=N(i,"defaultFrame",null),this.runChildUpdate=N(i,"runChildUpdate",!1),this.createCallback=N(i,"createCallback",null),this.removeCallback=N(i,"removeCallback",null),this.createMultipleCallback=N(i,"createMultipleCallback",null),this.internalCreateCallback=N(i,"internalCreateCallback",null),this.internalRemoveCallback=N(i,"internalRemoveCallback",null),e&&this.addMultiple(e),i&&this.createMultiple(i)},create:function(t,e,i,n,s,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),void 0===r&&(r=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(o),o.preUpdate&&this.scene.sys.updateList.add(o),o.visible=s,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=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;it.max.x&&(t.max.x=s.x),s.xt.max.y&&(t.max.y=s.y),s.y=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},i.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},i.translate=function(t,e){t.min.x+=e.x,t.max.x+=e.x,t.min.y+=e.y,t.max.y+=e.y},i.shift=function(t,e){var i=t.max.x-t.min.x,n=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+n}},function(t,e){t.exports=function(t,e,i){return 0<=t&&t=this.firstgid&&t=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this.resolution=i,this},bind:function(){var t=this.vertexBuffer,e=this.program,i=this.renderer;return i.setProgram(e),i.setVertexBuffer(t),this.setAttribPointers(),this},setAttribPointers:function(){for(var t=this.gl,e=this.attributes,i=this.vertexSize,n=0;nthis.vertexCapacity&&this.flush();var N=this.setGameObject(t),Y=t._isTinted&&t.tintFill;this.batchQuad(A,C,M,P,O,R,L,F,l,u,c,d,k,D,I,B,Y,h,N)},batchQuad:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,m,y){void 0===y&&(y=this.currentUnit);var x=!1;this.vertexCount+6>this.vertexCapacity&&(this.flush(),x=!0,y=this.setTexture2D(m));var T=this.vertexViewF32,w=this.vertexViewU32,b=this.vertexCount*this.vertexComponentCount-1;return T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=y,T[++b]=v,w[++b]=d,T[++b]=i,T[++b]=n,T[++b]=h,T[++b]=c,T[++b]=y,T[++b]=v,w[++b]=p,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=y,T[++b]=v,w[++b]=g,T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=y,T[++b]=v,w[++b]=d,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=y,T[++b]=v,w[++b]=g,T[++b]=o,T[++b]=a,T[++b]=u,T[++b]=l,T[++b]=y,T[++b]=v,w[++b]=f,this.vertexCount+=6,x},batchTri:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g){void 0===g&&(g=this.currentUnit);var v=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),v=!0,g=this.setTexture2D(p));var m=this.vertexViewF32,y=this.vertexViewU32,x=this.vertexCount*this.vertexComponentCount-1;return m[++x]=t,m[++x]=e,m[++x]=o,m[++x]=a,m[++x]=g,m[++x]=f,y[++x]=u,m[++x]=i,m[++x]=n,m[++x]=o,m[++x]=l,m[++x]=g,m[++x]=f,y[++x]=c,m[++x]=s,m[++x]=r,m[++x]=h,m[++x]=l,m[++x]=g,m[++x]=f,y[++x]=d,this.vertexCount+=3,v},batchTexture:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,m,y,x,T,w,b,E,S,_,A,C,M,P,O,R){this.renderer.setPipeline(this,t);var L,F,k,D=this._tempMatrix1,I=this._tempMatrix2,B=this._tempMatrix3,N=m/i+A,Y=y/n+C,X=(m+x)/i+A,U=(y+T)/n+C,z=o,G=a,W=-g,V=-v;t.isCropped&&(z=(L=t._crop).width,G=L.height,o=L.width,a=L.height,F=m=L.x,k=y=L.y,c&&(F=x-L.x-L.width),d&&!e.isRenderTexture&&(k=T-L.y-L.height),N=F/i+A,Y=k/n+C,X=(F+L.width)/i+A,U=(k+L.height)/n+C,W=-g+m,V=-v+y),c&&(z*=-1,W+=o),(d^=!O&&e.isRenderTexture?1:0)&&(G*=-1,V+=a);var H=W+z,j=V+G;I.applyITRS(s,r,u,h,l),D.copyFrom(M.matrix),P?(D.multiplyWithOffset(P,-M.scrollX*f,-M.scrollY*p),I.e=s,I.f=r):(I.e-=M.scrollX*f,I.f-=M.scrollY*p),D.multiply(I,B);var q=B.getX(W,V),K=B.getY(W,V),Z=B.getX(W,j),J=B.getY(W,j),Q=B.getX(H,j),$=B.getY(H,j),tt=B.getX(H,V),et=B.getY(H,V);M.roundPixels&&(q=Math.round(q),K=Math.round(K),Z=Math.round(Z),J=Math.round(J),Q=Math.round(Q),$=Math.round($),tt=Math.round(tt),et=Math.round(et)),void 0===R&&(R=this.renderer.setTexture2D(e)),this.batchQuad(q,K,Z,J,Q,$,tt,et,N,Y,X,U,w,b,E,S,_,e,R)},batchTextureFrame:function(t,e,i,n,s,r,o){this.renderer.setPipeline(this);var a=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2,l=e+t.width,u=i+t.height;o?a.multiply(o,h):h=a;var c=h.getX(e,i),d=h.getY(e,i),f=h.getX(e,u),p=h.getY(e,u),g=h.getX(l,u),v=h.getY(l,u),m=h.getX(l,i),y=h.getY(l,i),x=this.renderer.setTextureSource(t.source);n=X.getTintAppendFloatAlpha(n,s),this.batchQuad(c,d,f,p,g,v,m,y,t.u0,t.v0,t.u1,t.v1,n,n,n,n,0,t.glTexture,x)},drawFillRect:function(t,e,i,n,s,r){t=Math.floor(t),e=Math.floor(e);var o=Math.floor(t+i),a=Math.floor(e+n),h=this.renderer.blankTexture.glTexture,l=this.renderer.setTexture2D(h),u=X.getTintAppendFloatAlphaAndSwap(s,r);this.batchQuad(t,e,t,a,o,a,o,e,0,0,1,1,u,u,u,u,2,h,l)},batchFillRect:function(t,e,i,n,s,r){this.renderer.setPipeline(this);var o=this._tempMatrix3;r&&r.multiply(s,o);var a=t+i,h=e+n,l=o.getX(t,e),u=o.getY(t,e),c=o.getX(t,h),d=o.getY(t,h),f=o.getX(a,h),p=o.getY(a,h),g=o.getX(a,e),v=o.getY(a,e),m=this.currentFrame,y=m.u0,x=m.v0,T=m.u1,w=m.v1,b=this.fillTint;this.batchQuad(l,u,c,d,f,p,g,v,y,x,T,w,b.TL,b.TR,b.BL,b.BR,this.tintEffect)},batchFillTriangle:function(t,e,i,n,s,r,o,a){this.renderer.setPipeline(this);var h=this._tempMatrix3;a&&a.multiply(o,h);var l=h.getX(t,e),u=h.getY(t,e),c=h.getX(i,n),d=h.getY(i,n),f=h.getX(s,r),p=h.getY(s,r),g=this.currentFrame,v=g.u0,m=g.v0,y=g.u1,x=g.v1;this.batchTri(l,u,c,d,f,p,v,m,y,x,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.tintEffect)},batchStrokeTriangle:function(t,e,i,n,s,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=n,l[1].width=o,l[2].x=s,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.setPipeline(this);var n=this._tempMatrix3;i&&i.multiply(e,n);for(var s,r,o=t.length,a=this.polygonCache,h=this.fillTint.TL,l=this.fillTint.TR,u=this.fillTint.BL,c=this.tintEffect,d=0;d>16)+(65280&t)+((255&t)<<16)}},function(t,e,i){var n=i(0),a=i(288),s=new n({initialize:function(t,e){this.parent=t,(this.events=e)||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once("destroy",this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],n=0;ne.right||t.y>e.bottom)}},function(t,e,i){var l=i(6),u={},n={register:function(t,e,i,n,s){u[t]={plugin:e,mapping:i,settingsKey:n,configKey:s}},getPlugin:function(t){return u[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,n=e.game.config;for(var s in u){var r=u[s].plugin,o=u[s].mapping,a=u[s].settingsKey,h=u[s].configKey;l(i,a,n[h])&&(t[o]=new r(t))}},remove:function(t){u.hasOwnProperty(t)&&delete u[t]}};t.exports=n},function(t,e,i){t.exports={ANY_KEY_DOWN:i(1229),ANY_KEY_UP:i(1230),COMBO_MATCH:i(1231),DOWN:i(1232),KEY_DOWN:i(1233),KEY_UP:i(1234),UP:i(1235)}},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),void 0===r&&(r=!1),{responseType:t,async:e,user:i,password:n,timeout:s,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:r}}},function(t,e,i){var n=i(0),s=i(223),r=i(75),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s),this.body=null}});t.exports=o},function(t,e,i){t.exports={CalculateFacesAt:i(226),CalculateFacesWithin:i(52),Copy:i(1325),CreateFromTiles:i(1326),CullTiles:i(1327),Fill:i(1328),FilterTiles:i(1329),FindByIndex:i(1330),FindTile:i(1331),ForEachTile:i(1332),GetTileAt:i(148),GetTileAtWorldXY:i(1333),GetTilesWithin:i(24),GetTilesWithinShape:i(1334),GetTilesWithinWorldXY:i(1335),HasTileAt:i(479),HasTileAtWorldXY:i(1336),IsInLayerBounds:i(102),PutTileAt:i(227),PutTileAtWorldXY:i(1337),PutTilesAt:i(1338),Randomize:i(1339),RemoveTileAt:i(480),RemoveTileAtWorldXY:i(1340),RenderDebug:i(1341),ReplaceByIndex:i(478),SetCollision:i(1342),SetCollisionBetween:i(1343),SetCollisionByExclusion:i(1344),SetCollisionByProperty:i(1345),SetCollisionFromCollisionGroup:i(1346),SetTileIndexCallback:i(1347),SetTileLocationCallback:i(1348),Shuffle:i(1349),SwapByIndex:i(1350),TileToWorldX:i(149),TileToWorldXY:i(1351),TileToWorldY:i(150),WeightedRandomize:i(1352),WorldToTileX:i(63),WorldToTileXY:i(1353),WorldToTileY:i(64)}},function(t,e,i){var r=i(102);t.exports=function(t,e,i,n){if(void 0===i&&(i=!1),r(t,e,n)){var s=n.data[e][t]||null;return null!==s&&(-1!==s.index||i)?s:null}return null}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),n*=s.scaleX),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*n}},function(t,e){t.exports=function(o,a,t){return o.hasOwnProperty(a)?"function"==typeof o[a]?function(t,e,i,n,s,r){return o[a](t,e,i,n,s,r)}:function(){return o[a]}:"function"==typeof t?t:function(){return t}}},function(t,e,i){var R=i(236),L=i(15),F=i(89),k=i(69),D=i(151),I=i(501),B=i(234),N=i(6),Y=i(235),X=i(237),U=i(239);t.exports=function(t,e,i){void 0===i&&(i=R);for(var n=i.targets?i.targets:B(e),s=I(e),r=D(e,"delay",i.delay),o=D(e,"duration",i.duration),a=N(e,"easeParams",i.easeParams),h=k(N(e,"ease",i.ease),a),l=D(e,"hold",i.hold),u=D(e,"repeat",i.repeat),c=D(e,"repeatDelay",i.repeatDelay),d=F(e,"yoyo",i.yoyo),f=F(e,"flipX",i.flipX),p=F(e,"flipY",i.flipY),g=[],v=0;v=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo);var i=this.frames[e];0!==e||t.forward||(i=this.getLastFrame()),t.updateFrame(i)},getFrameByProgress:function(t){return t=n(t,0,1),a(t,this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t._yoyo?this.handleYoyoFrame(t,!1):0=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2);t=new Array(1+(s-r)).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){var n=i(298),s=i(301),r=i(303),o=i(304);t.exports=function(t){switch(typeof t){case"string":return("rgb"===t.substr(0,3).toLowerCase()?o:n)(t);case"number":return s(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){var f=i(171);t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1);var s=Math.floor(6*t),r=6*t-s,o=Math.floor(i*(1-e)*255),a=Math.floor(i*(1-r*e)*255),h=Math.floor(i*(1-(1-r)*e)*255),l=i=Math.floor(i*=255),u=i,c=i,d=s%6;return 0==d?(u=h,c=o):1==d?(l=a,c=o):2==d?(l=o,c=h):3==d?(l=o,u=a):4==d?(l=h,u=o):5==d&&(u=o,c=a),n?n.setTo?n.setTo(l,u,c,n.alpha,!1):(n.r=l,n.g=u,n.b=c,n.color=f(l,u,c),n):{r:l,g:u,b:c,color:f(l,u,c)}}},function(t,e){var i="";function n(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;is.width&&(t=s.width-r.cutX),r.cutY+e>s.height&&(e=s.height-r.cutY),r.setSize(t,e,r.cutX,r.cutY)),this.updateDisplayOrigin();var a=this.input;return a&&!a.customHitArea&&(a.hitArea.width=t,a.hitArea.height=e),this},setGlobalTint:function(t){return this.globalTint=t,this},setGlobalAlpha:function(t){return this.globalAlpha=t,this},saveTexture:function(t){return this.textureManager.renameTexture(this.texture.key,t),this._saved=!0,this.texture},fill:function(t,e,i,n,s,r){var o=this.gl,a=this.frame,h=this.texture,l=this.camera,u=this.renderer;void 0===e&&(e=1),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=a.cutWidth),void 0===r&&(r=a.cutHeight);var c,d,f,p,g,v,m,y,x,T,w=255&(t>>16|0),b=255&(t>>8|0),E=255&(0|t);return l.preRender(1,1),o?(c=l._cx,d=l._cy,f=l._cw,p=l._ch,u.resetTextures(!0),u.pushScissor(c,d,f,-p),u.setFramebuffer(this.framebuffer,!1),g=this.pipeline,v=h.width,m=h.height,y=g.width/v,x=g.height/m,g.drawFillRect(i*y,(m-r-n)*x,s*y,r*x,S.getTintFromFloats(w/255,b/255,E/255,1),e),g.flush(),u.setFramebuffer(null,!1),u.popScissor()):(T=this.context,u.setContext(T),T.fillStyle="rgba("+w+","+b+","+E+","+e+")",T.fillRect(i+a.cutX,n+a.cutY,s,r),u.setContext()),this.dirty=!0,this},clear:function(){var t,e,i;return this.dirty&&((t=this.gl)?((e=this.renderer).setFramebuffer(this.framebuffer,!0),this.frame.cutWidth===this.canvas.width&&this.frame.cutHeight===this.canvas.height||t.scissor(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),e.setFramebuffer(null,!0)):((i=this.context).save(),i.setTransform(1,0,0,1,0,0),i.clearRect(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),i.restore()),this.dirty=!1),this},erase:function(t,e,i){this._eraseMode=!0;var n=this.renderer.currentBlendMode;return this.renderer.setBlendMode(o.ERASE),this.draw(t,e,i,1,16777215),this.renderer.setBlendMode(n),this._eraseMode=!1,this},draw:function(t,e,i,n,s){void 0===n&&(n=this.globalAlpha),s=void 0===s?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(s>>16)+(65280&s)+((255&s)<<16),Array.isArray(t)||(t=[t]);var r,o,a,h,l,u=this.gl,c=this.camera,d=this.renderer;return c.preRender(1,1),u?(r=c._cx,o=c._cy,a=c._cw,h=c._ch,d.resetTextures(!0),d.setFramebuffer(this.framebuffer,!1),d.pushScissor(r,o,a,h,h),l=this.pipeline,g(l,0,this.texture.width,0,this.texture.height,-1e3,1e3),this.batchList(t,e,i,n,s),d.setFramebuffer(null,!0),d.resetTextures(!0),g(l,0,l.width,l.height,0,-1e3,1e3)):(d.setContext(this.context),this.batchList(t,e,i,n,s),d.setContext()),this.dirty=!0,this},drawFrame:function(t,e,i,n,s,r){void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.globalAlpha),r=void 0===r?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(r>>16)+(65280&r)+((255&r)<<16);var o,a,h,l,u,c=this.gl,d=this.camera,f=this.renderer,p=this.textureManager.getFrame(t,e);return p&&(d.preRender(1,1),c?(o=d._cx,a=d._cy,h=d._cw,l=d._ch,f.resetTextures(!0),f.setFramebuffer(this.framebuffer,!1),f.pushScissor(o,a,h,l,l),u=this.pipeline,g(u,0,this.texture.width,0,this.texture.height,-1e3,1e3),u.batchTextureFrame(p,i+this.frame.cutX,n+this.frame.cutY,r,s,d.matrix,null),u.flush(),f.setFramebuffer(null,!1),f.popScissor(),g(u,0,u.width,u.height,0,-1e3,1e3)):this.batchTextureFrame(p,i+this.frame.cutX,n+this.frame.cutY,s,r),this.dirty=!0),this},batchList:function(t,e,i,n,s){for(var r=0;rs&&(r=t[s]),n[s]=r,t.length>s+1&&(r=t[s+1]),n[s+1]=r;return this},setColors:function(t){var e=this.points.length;if(e<1)return this;var i=this.colors;void 0===t?t=[16777215]:Array.isArray(t)||(t=[t]);var n=0;if(t.length===e)for(r=0;rn&&(s=t[n]),i[n]=s,t.length>n+1&&(s=t[n+1]),i[n+1]=s;return this},setPoints:function(t,e,i){if(void 0===t&&(t=2),"number"==typeof t){var n,s,r,o=t;if(o<2&&(o=2),t=[],this.horizontal)for(r=-this.frame.halfWidth,s=this.frame.width/(o-1),n=0;n=this._markerOut&&(e.loop?(e.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=t,this.emit(o.VIDEO_LOOP,this)):(this.emit(o.VIDEO_COMPLETE,this),this.stop())))},checkVideoProgress:function(){2<=this.video.readyState?this.updateTexture():(this.retry--,0t&&(t=s.totalDuration),s.delay=o.sleepThreshold&&u.set(o,!0)):0u._motionWakeThreshold*i&&u.set(a,!1)))}},u.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"))}},function(t,e,i){var n={};t.exports=n;var u=i(43);n.on=function(t,e,i){for(var n,s=e.split(" "),r=0;re.length&&(r=e.length),i?(n=e[r-1][i],(s=e[r][i])-t<=t-n?e[r]:e[r-1]):(n=e[r-1],(s=e[r])-t<=t-n?s:n)}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=n,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0}});t.exports=n},function(t,e,i){var n=i(53),s={_blendMode:n.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=n[t]),-1<=(t|=0)&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e,i){var o=i(157),a=i(116);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&0=t.right&&(o=1,r+=s-t.right,s=t.right);break;case 1:(r+=e)>=t.bottom&&(o=2,s-=r-t.bottom,r=t.bottom);break;case 2:(s-=e)<=t.left&&(o=3,r-=t.left-s,s=t.left);break;case 3:(r-=e)<=t.top&&(o=0,r=t.top)}return n}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;nd.right&&(f=T(f,f+(e-d.right),this.lerp.x)),id.bottom&&(p=T(p,p+(i-d.bottom),this.lerp.y))):(f=T(f,e-l,this.lerp.x),p=T(p,i-u,this.lerp.y))),this.useBounds&&(f=this.clampX(f),p=this.clampY(p)),this.roundPixels&&(l=Math.round(l),u=Math.round(u));var g=(this.scrollX=f)+r,v=(this.scrollY=p)+o;this.midPoint.set(g,v);var m=n/a,y=s/a;this.worldView.setTo(g-m/2,v-y/2,m,y),h.applyITRS(this.x+l,this.y+u,this.rotation,a,a),h.translate(-l,-u),this.shakeEffect.preRender()},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,n,s,r){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===n&&(n=i),void 0===s&&(s=0),void 0===r&&(r=s),this._follow=t,this.roundPixels=e,i=u(i,0,1),n=u(n,0,1),this.lerp.set(i,n),this.followOffset.set(s,r);var o=this.width/2,a=this.height/2,h=t.x-s,l=t.y-r;return this.midPoint.set(h,l),this.scrollX=h-o,this.scrollY=l-a,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.clearRenderToTexture(),this.resetFX(),s.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=c},function(t,e,i){var o=i(31);t.exports=function(t){var e=new o;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,n){return e+e+i+i+n+n});var i,n,s,r=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return r&&(i=parseInt(r[1],16),n=parseInt(r[2],16),s=parseInt(r[3],16),e.setTo(i,n,s)),e}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},function(t,e){t.exports=function(t,e,i,n){void 0===n&&(n={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var s=Math.min(t,e,i),r=Math.max(t,e,i),o=r-s,a=0,h=0===r?0:o/r,l=r;return r!==s&&(r===t?a=(e-i)/o+(e>>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}}},function(t,e,i){var n=i(31);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var a=i(31);t.exports=function(t){var e,i,n,s,r=new a,o=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());return o&&(e=parseInt(o[1],10),i=parseInt(o[2],10),n=parseInt(o[3],10),s=void 0!==o[4]?parseFloat(o[4]):1,r.setTo(e,i,n,255*s)),r}},function(t,e,i){t.exports={Fade:i(668),Flash:i(669),Pan:i(670),Shake:i(703),RotateTo:i(704),Zoom:i(705)}},function(t,e,i){t.exports={In:i(671),Out:i(672),InOut:i(673)}},function(t,e,i){t.exports={In:i(674),Out:i(675),InOut:i(676)}},function(t,e,i){t.exports={In:i(677),Out:i(678),InOut:i(679)}},function(t,e,i){t.exports={In:i(680),Out:i(681),InOut:i(682)}},function(t,e,i){t.exports={In:i(683),Out:i(684),InOut:i(685)}},function(t,e,i){t.exports={In:i(686),Out:i(687),InOut:i(688)}},function(t,e,i){t.exports=i(689)},function(t,e,i){t.exports={In:i(690),Out:i(691),InOut:i(692)}},function(t,e,i){t.exports={In:i(693),Out:i(694),InOut:i(695)}},function(t,e,i){t.exports={In:i(696),Out:i(697),InOut:i(698)}},function(t,e,i){t.exports={In:i(699),Out:i(700),InOut:i(701)}},function(t,e,i){t.exports=i(702)},function(t,e,i){var n=i(0),a=i(33),h=i(319),l=i(2),u=i(6),c=i(7),d=i(176),f=i(1),p=i(180),g=i(170),s=new n({initialize:function(t){void 0===t&&(t={});this.width=u(t,"width",1024),this.height=u(t,"height",768),this.zoom=u(t,"zoom",1),this.resolution=u(t,"resolution",1),this.parent=u(t,"parent",void 0),this.scaleMode=u(t,"scaleMode",0),this.expandParent=u(t,"expandParent",!0),this.autoRound=u(t,"autoRound",!1),this.autoCenter=u(t,"autoCenter",0),this.resizeInterval=u(t,"resizeInterval",500),this.fullscreenTarget=u(t,"fullscreenTarget",null),this.minWidth=u(t,"minWidth",0),this.maxWidth=u(t,"maxWidth",0),this.minHeight=u(t,"minHeight",0),this.maxHeight=u(t,"maxHeight",0);var e=u(t,"scale",null);e&&(this.width=u(e,"width",this.width),this.height=u(e,"height",this.height),this.zoom=u(e,"zoom",this.zoom),this.resolution=u(e,"resolution",this.resolution),this.parent=u(e,"parent",this.parent),this.scaleMode=u(e,"mode",this.scaleMode),this.expandParent=u(e,"expandParent",this.expandParent),this.autoRound=u(e,"autoRound",this.autoRound),this.autoCenter=u(e,"autoCenter",this.autoCenter),this.resizeInterval=u(e,"resizeInterval",this.resizeInterval),this.fullscreenTarget=u(e,"fullscreenTarget",this.fullscreenTarget),this.minWidth=u(e,"min.width",this.minWidth),this.maxWidth=u(e,"max.width",this.maxWidth),this.minHeight=u(e,"min.height",this.minHeight),this.maxHeight=u(e,"max.height",this.maxHeight)),this.renderType=u(t,"type",a.AUTO),this.canvas=u(t,"canvas",null),this.context=u(t,"context",null),this.canvasStyle=u(t,"canvasStyle",null),this.customEnvironment=u(t,"customEnvironment",!1),this.sceneConfig=u(t,"scene",null),this.seed=u(t,"seed",[(Date.now()*Math.random()).toString()]),d.RND=new d.RandomDataGenerator(this.seed),this.gameTitle=u(t,"title",""),this.gameURL=u(t,"url","https://phaser.io"),this.gameVersion=u(t,"version",""),this.autoFocus=u(t,"autoFocus",!0),this.domCreateContainer=u(t,"dom.createContainer",!1),this.domBehindCanvas=u(t,"dom.behindCanvas",!1),this.inputKeyboard=u(t,"input.keyboard",!0),this.inputKeyboardEventTarget=u(t,"input.keyboard.target",window),this.inputKeyboardCapture=u(t,"input.keyboard.capture",[]),this.inputMouse=u(t,"input.mouse",!0),this.inputMouseEventTarget=u(t,"input.mouse.target",null),this.inputMouseCapture=u(t,"input.mouse.capture",!0),this.inputTouch=u(t,"input.touch",h.input.touch),this.inputTouchEventTarget=u(t,"input.touch.target",null),this.inputTouchCapture=u(t,"input.touch.capture",!0),this.inputActivePointers=u(t,"input.activePointers",1),this.inputSmoothFactor=u(t,"input.smoothFactor",0),this.inputWindowEvents=u(t,"input.windowEvents",!0),this.inputGamepad=u(t,"input.gamepad",!1),this.inputGamepadEventTarget=u(t,"input.gamepad.target",window),this.disableContextMenu=u(t,"disableContextMenu",!1),this.audio=u(t,"audio"),this.hideBanner=!1===u(t,"banner",null),this.hidePhaser=u(t,"banner.hidePhaser",!1),this.bannerTextColor=u(t,"banner.text","#ffffff"),this.bannerBackgroundColor=u(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=u(t,"fps",null);var i=u(t,"render",t);this.antialias=u(i,"antialias",!0),this.antialiasGL=u(i,"antialiasGL",!0),this.mipmapFilter=u(i,"mipmapFilter","LINEAR"),this.desynchronized=u(i,"desynchronized",!1),this.roundPixels=u(i,"roundPixels",!1),this.pixelArt=u(i,"pixelArt",1!==this.zoom),this.pixelArt&&(this.antialias=!1,this.roundPixels=!0),this.transparent=u(i,"transparent",!1),this.clearBeforeRender=u(i,"clearBeforeRender",!0),this.premultipliedAlpha=u(i,"premultipliedAlpha",!0),this.failIfMajorPerformanceCaveat=u(i,"failIfMajorPerformanceCaveat",!1),this.powerPreference=u(i,"powerPreference","default"),this.batchSize=u(i,"batchSize",4096),this.maxTextures=u(i,"maxTextures",-1),this.maxLights=u(i,"maxLights",10);var n=u(t,"backgroundColor",0);this.backgroundColor=g(n),0===n&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=u(t,"callbacks.preBoot",f),this.postBoot=u(t,"callbacks.postBoot",f),this.physics=u(t,"physics",{}),this.defaultPhysicsSystem=u(this.physics,"default",!1),this.loaderBaseURL=u(t,"loader.baseURL",""),this.loaderPath=u(t,"loader.path",""),this.loaderMaxParallelDownloads=u(t,"loader.maxParallelDownloads",32),this.loaderCrossOrigin=u(t,"loader.crossOrigin",void 0),this.loaderResponseType=u(t,"loader.responseType",""),this.loaderAsync=u(t,"loader.async",!0),this.loaderUser=u(t,"loader.user",""),this.loaderPassword=u(t,"loader.password",""),this.loaderTimeout=u(t,"loader.timeout",0),this.loaderWithCredentials=u(t,"loader.withCredentials",!1),this.installGlobalPlugins=[],this.installScenePlugins=[];var s=u(t,"plugins",null),r=p.DefaultScene;s&&(Array.isArray(s)?this.defaultPlugins=s:c(s)&&(this.installGlobalPlugins=l(s,"global",[]),this.installScenePlugins=l(s,"scene",[]),Array.isArray(s.default)?r=s.default:Array.isArray(s.defaultMerge)&&(r=r.concat(s.defaultMerge)))),this.defaultPlugins=r;var o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=u(t,"images.default",o+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=u(t,"images.missing",o+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),window&&(window.FORCE_WEBGL?this.renderType=a.WEBGL:window.FORCE_CANVAS&&(this.renderType=a.CANVAS))}});t.exports=s},function(t,e,i){t.exports={os:i(122),browser:i(123),features:i(175),input:i(734),audio:i(735),video:i(736),fullscreen:i(737),canvasFeatures:i(320)}},function(t,e,i){var n,s,r,o=i(26),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var i=new Image;i.onload=function(){var t=o.create(i,6,1).getContext("2d");if(t.globalCompositeOperation="multiply",t.drawImage(r,0,0),t.drawImage(i,2,0),!t.getImageData(2,0,1,1))return!1;var e=t.getImageData(2,0,1,1).data;o.remove(i),a.supportNewBlendModes=255===e[0]&&0===e[1]&&0===e[2]},i.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");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);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},function(t,e){t.exports=function(t){return 0<=(t%=2*Math.PI)?t:t+2*Math.PI}},function(t,e){t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return s*s+r*r}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),e-ir[0]&&(e=1),r[8]>r[3*e+e]&&(e=2),i=a[e],n=a[i],s=Math.sqrt(r[3*e+e]-r[3*i+i]-r[3*n+n]+1),h[e]=.5*s,s=.5/s,h[i]=(r[3*i+e]+r[3*e+i])*s,h[n]=(r[3*n+e]+r[3*e+n])*s,this.x=h[0],this.y=h[1],this.z=h[2],this.w=(r[3*n+i]-r[3*i+n])*s),this}});t.exports=d},function(t,e,a){var h=a(341),l=a(26),u=a(33),c=a(175);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===u.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==u.HEADLESS)if(e.renderType===u.CANVAS||e.renderType!==u.CANVAS&&!c.webGL){if(!c.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");e.renderType=u.CANVAS}else e.renderType=u.WEBGL;e.antialias||l.disableSmoothing();var i,n,s=t.scale.baseSize,r=s.width,o=s.height;e.canvas?(t.canvas=e.canvas,t.canvas.width=r,t.canvas.height=o):t.canvas=l.create(t,r,o,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||h.setCrisp(t.canvas),e.renderType!==u.HEADLESS&&(i=a(508),n=a(511),e.renderType===u.WEBGL?t.renderer=new n(t):(t.renderer=new i(t),t.context=t.renderer.gameContext))}},function(t,e){t.exports={setCrisp:function(e){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach(function(t){e.style["image-rendering"]=t}),e.style.msInterpolationMode="nearest-neighbor",e},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},function(t,e,i){var l=i(33);t.exports=function(t){var e,i,n,s,r,o,a,h=t.config;h.hideBanner||(e="WebGL",h.renderType===l.CANVAS?e="Canvas":h.renderType===l.HEADLESS&&(e="Headless"),i=h.audio,a=!(n=t.device.audio).webAudio||i&&i.disableWebAudio?i&&i.noAudio||!n.webAudio&&!n.audioData?"No Audio":"HTML5 Audio":"Web Audio",t.device.browser.ie?window.console&&console.log("Phaser v"+l.VERSION+" / https://phaser.io"):(r=[s=""],Array.isArray(h.bannerBackgroundColor)?(h.bannerBackgroundColor.forEach(function(t){s=s.concat("%c "),r.push("background: "+t),o=t}),r[r.length-1]="color: "+h.bannerTextColor+"; background: "+o):(s=s.concat("%c "),r.push("color: "+h.bannerTextColor+"; background: "+h.bannerBackgroundColor)),r.push("background: #fff"),h.gameTitle&&(s=s.concat(h.gameTitle),h.gameVersion&&(s=s.concat(" v"+h.gameVersion)),h.hidePhaser||(s=s.concat(" / "))),h.hidePhaser||(s=s.concat("Phaser v"+l.VERSION+" ("+e+" | "+a+")")),s=s.concat(" %c "+h.gameURL),r[0]=s,console.log.apply(console,r)))}},function(t,e,i){var n=i(0),s=i(6),r=i(1),o=i(344),a=new n({initialize:function(t,e){this.game=t,this.raf=new o,this.started=!1,this.running=!1,this.minFps=s(e,"min",5),this.targetFps=s(e,"target",60),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=s(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=s(e,"deltaHistory",10),this.panicMax=s(e,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=s(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;for(var e=this.framesThisSecond=0;ethis._min&&(r=n[i],r=Math.min(r,this._min)),n[i]=r,this.deltaIndex++,this.deltaIndex>s&&(this.deltaIndex=0);for(var a=o=0;athis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var h=o/this._target;this.callback(t,o,h),this.lastTime=t,this.frame++},tick:function(){this.step()},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running||(t&&(this.startTime+=-this.lastTime+(this.lastTime+window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step())},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.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0,this.target=0;var n=this;this.step=function t(){var e=window.performance.now();n.lastTime=n.tick,n.tick=e,n.callback(e),n.timeOutID=window.requestAnimationFrame(t)},this.stepTimeout=function t(){var e=Date.now(),i=Math.min(Math.max(2*n.target+n.tick-e,0),n.target);n.lastTime=n.tick,n.tick=e,n.callback(e),n.timeOutID=window.setTimeout(t,i)}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.target=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=s}});t.exports=r},function(t,e,i){var n=i(20);t.exports=function(t){var e,i=t.events;void 0!==document.hidden?e="visibilitychange":["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(n.HIDDEN):i.emit(n.VISIBLE)},!1),window.onblur=function(){i.emit(n.BLUR)},window.onfocus=function(){i.emit(n.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},function(t,e,i){var m=i(347),y=i(26),x=i(6);t.exports=function(t){var e=x(t,"data",[]),i=x(t,"canvas",null),n=x(t,"palette",m),s=x(t,"pixelWidth",1),r=x(t,"pixelHeight",s),o=x(t,"resizeCanvas",!0),a=x(t,"clearCanvas",!0),h=x(t,"preRender",null),l=x(t,"postRender",null),u=Math.floor(Math.abs(e[0].length*s)),c=Math.floor(Math.abs(e.length*r));i||(i=y.create2D(this,u,c),a=o=!1),o&&(i.width=u,i.height=c);var d=i.getContext("2d");a&&d.clearRect(0,0,u,c),h&&h(i,d);for(var f=0;fi.length-2?i.length-1:s+1],l=i[s>i.length-3?i.length-1:s+2];return e.set(u(r,o.x,a.x,h.x,l.x),u(r,o.y,a.y,h.y,l.y))},toJSON:function(){for(var t=[],e=0;ei.width?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE;if("number"==typeof window.orientation)return 0===window.orientation||180===window.orientation?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return s.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return s.ORIENTATION.LANDSCAPE}return tthis.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var e=this.listeners;window.removeEventListener("orientationchange",e.orientationChange,!1),window.removeEventListener("resize",e.windowResize,!1);["webkit","moz",""].forEach(function(t){document.removeEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.removeEventListener(t+"fullscreenerror",e.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",e.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===c.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===c.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=v},function(t,e,i){var n=i(17),s=i(0),r=i(94),o=i(3),a=new s({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=null),this._width=t,this._height=e,this._parent=n,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=n(t,0,this.maxWidth),this.minHeight=n(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=n(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=n(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=n(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=n(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 n=this.snapTo,s=0===e?1:t/e;return i&&this.aspectRatio>s||!i&&this.aspectRatios)&&(t=(e=r(e,n.y))*this.aspectRatio,0r.START&&n.settings.status<=r.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e=r.LOADING&&i.settings.status=r.x&&t=r.y&&e=r.x&&t=r.y&&e=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s>4,l[a++]=(15&i)<<4|n>>2,l[a++]=(3&n)<<6|63&s;return h}},function(t,e,i){var n=i(134),s=i(0),r=i(59),o=new s({Extends:n,initialize:function(t,e,i){if(void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),!this.audioBuffer)throw new Error('There is no audio asset with key "'+e+'" in the audio cache');this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,n.call(this,t,e,i)},play:function(t,e){return!!n.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(r.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime>>16,v=(65280&d)>>>8,m=255&d,l.strokeStyle="rgba("+g+","+v+","+m+","+u+")",l.lineWidth=p,y+=3;break;case x.FILL_STYLE:f=a[y+1],c=a[y+2],g=(16711680&f)>>>16,v=(65280&f)>>>8,m=255&f,l.fillStyle="rgba("+g+","+v+","+m+","+c+")",y+=2;break;case x.BEGIN_PATH:l.beginPath();break;case x.CLOSE_PATH:l.closePath();break;case x.FILL_PATH:o||l.fill();break;case x.STROKE_PATH:o||l.stroke();break;case x.FILL_RECT:o?l.rect(a[y+1],a[y+2],a[y+3],a[y+4]):l.fillRect(a[y+1],a[y+2],a[y+3],a[y+4]),y+=4;break;case x.FILL_TRIANGLE:l.beginPath(),l.moveTo(a[y+1],a[y+2]),l.lineTo(a[y+3],a[y+4]),l.lineTo(a[y+5],a[y+6]),l.closePath(),o||l.fill(),y+=6;break;case x.STROKE_TRIANGLE:l.beginPath(),l.moveTo(a[y+1],a[y+2]),l.lineTo(a[y+3],a[y+4]),l.lineTo(a[y+5],a[y+6]),l.closePath(),o||l.stroke(),y+=6;break;case x.LINE_TO:l.lineTo(a[y+1],a[y+2]),y+=2;break;case x.MOVE_TO:l.moveTo(a[y+1],a[y+2]),y+=2;break;case x.LINE_FX_TO:l.lineTo(a[y+1],a[y+2]),y+=5;break;case x.MOVE_FX_TO:l.moveTo(a[y+1],a[y+2]),y+=5;break;case x.SAVE:l.save();break;case x.RESTORE:l.restore();break;case x.TRANSLATE:l.translate(a[y+1],a[y+2]),y+=2;break;case x.SCALE:l.scale(a[y+1],a[y+2]),y+=2;break;case x.ROTATE:l.rotate(a[y+1]),y+=1;break;case x.GRADIENT_FILL_STYLE:y+=5;break;case x.GRADIENT_LINE_STYLE:y+=6;break;case x.SET_TEXTURE:y+=2}}l.restore()}}},function(t,e,i){var n=i(0),o=i(2),s=new n({initialize:function(t,e,i,n,s){var r;"object"==typeof t?(t=o(r=t,"x",0),e=o(r,"y",0),i=o(r,"power",0),n=o(r,"epsilon",100),s=o(r,"gravity",50)):(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===s&&(s=50)),this.x=t,this.y=e,this.active=!0,this._gravity=s,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i,n,s=this.x-t.x,r=this.y-t.y,o=s*s+r*r;0!==o&&(i=Math.sqrt(o),oe.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(0this._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=n},function(t,e){t.exports=function(t,e){for(var i=0;id.PI2?s=d.PI2:s<0&&(s=d.PI2+s%d.PI2);for(var a,h=[r+Math.cos(n)*i,o+Math.sin(n)*i];e<1;)a=s*e+n,h.push(r+Math.cos(a)*i,o+Math.sin(a)*i),e+=t;return a=s+n,h.push(r+Math.cos(a)*i,o+Math.sin(a)*i),h.push(r+Math.cos(n)*i,o+Math.sin(n)*i),this.pathIndexes=u(h),this.pathData=h,this}});t.exports=r},function(t,e,i){var n=i(0),s=i(1012),r=i(66),o=i(9),a=i(29),h=new n({Extends:a,Mixins:[s],initialize:function(t,e,i,n,s,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Curve",n),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(e,i),void 0!==s&&this.setFillStyle(s,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=[],n=this.geom.getPoints(e),s=0;st.right||e.rightt.bottom||e.bottome.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottomt.width*t.height)&&(e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(s.BUTTON_DOWN,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(s.BUTTON_UP,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=r},function(t,e,i){var a=i(453),h=i(454),n=i(0),l=i(11),u=i(3),s=new n({Extends:l,initialize:function(t,e){l.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],n=0;n=s;for(this.fixedStep||(n=.001*e,o=!0,this._elapsed=0),h=0;h=s;)this._elapsed-=s,this.step(n)}},step:function(t){for(var e,i=this.bodies.entries,n=i.length,s=0;sc)&&(d.xu))return this.separateCircle(t,e,s)}var f=!1,p=!1;s?(f=A(t,e,s,this.OVERLAP_BIAS),p=C(t,e,s,this.OVERLAP_BIAS)):this.forceX||Math.abs(this.gravity.y+t.gravity.y)=e.right||t.position.y>=e.bottom))},circleBodyIntersects:function(t,e){var i=p(t.center.x,e.left,e.right),n=p(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o;t.isParent&&void 0===t.physicsType&&(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var a=Array.isArray(t),h=Array.isArray(e);if(this._total=0,a||h)if(!a&&h)for(o=0;od.baseTileWidth&&(h-=a=(d.tileWidth-d.baseTileWidth)*e.scaleX,u+=a),d.tileHeight>d.baseTileHeight&&(c+=(d.tileHeight-d.baseTileHeight)*e.scaleY);var f=e.getTilesWithinWorldXY(h,l,u,c);return 0!==f.length&&this.collideSpriteVsTilesHandler(t,f,i,n,s,r,!0)},collideSpriteVsTilesHandler:function(t,e,i,n,s,r,o){for(var a,h,l=t.body,u={left:0,right:0,top:0,bottom:0},c=!1,d=0;de.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,r=this.blocked.right=!0),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,r=this.blocked.down=!0),r&&(this.blocked.none=!1),r},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this.updateCenter(),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n,s,r=this.gameObject;return!t&&r.frame&&(t=r.frame.realWidth),!e&&r.frame&&(e=r.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&&r.getCenter&&(n=(r.width-t)/2,s=(r.height-e)/2,this.offset.set(n,s)),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),0=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 0e._dx?r<(s=t.right-e.x)&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?s=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0,e.physicsType===o.STATIC_BODY&&(t.blocked.none=!1,t.blocked.right=!0),t.physicsType===o.STATIC_BODY&&(e.blocked.none=!1,e.blocked.left=!0)):t._dxe._dy?r<(s=t.bottom-e.y)&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?s=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0,e.physicsType===o.STATIC_BODY&&(t.blocked.none=!1,t.blocked.down=!0),t.physicsType===o.STATIC_BODY&&(e.blocked.none=!1,e.blocked.up=!0)):t._dy=t.minX&&e.maxY>=t.minY}function p(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,s){for(var r,o=[e,i];o.length;)(i=o.pop())-(e=o.pop())<=n||(r=e+Math.ceil((i-e)/n/2)*n,a(t,r,e,i,s),o.push(e,r,r,i))}n.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!l(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;sthis._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),o=p(i.children.splice(r,i.children.length-r));o.height=i.height,o.leaf=i.leaf,f(i,this.toBBox),f(o,this.toBBox),e?t[e-1].children.push(o):this._splitRoot(i,o)},_splitRoot:function(t,e){this.data=p([t,e]),this.data.height=t.height+1,this.data.leaf=!1,f(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){for(var n,s,r,o,a,h,l,u,c,d,f,p,g=a=1/0,v=e;v<=i-e;v++)n=m(t,0,v,this.toBBox),s=m(t,v,i,this.toBBox),l=n,u=s,p=f=d=c=void 0,c=Math.max(l.minX,u.minX),d=Math.max(l.minY,u.minY),f=Math.min(l.maxX,u.maxX),p=Math.min(l.maxY,u.maxY),r=Math.max(0,f-c)*Math.max(0,p-d),o=y(n)+y(s),r=t.right||e.position.y>=t.bottom)}},function(t,e,i){var n=i(56),s=i(0),r=i(51),o=i(49),a=i(3),h=new s({initialize:function(t,e){var i=e.displayWidth?e.displayWidth:64,n=e.displayHeight?e.displayHeight:64;this.world=t,this.gameObject=e,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-n*e.originY),this.width=i,this.height=n,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.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).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 n,s,r=this.gameObject;return!t&&r.frame&&(t=r.frame.realWidth),!e&&r.frame&&(e=r.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&&r.getCenter&&(n=r.displayWidth/2,s=r.displayHeight/2,this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(n-this.halfWidth,s-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y),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),0=r.layers.length){if(s.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}r=s.pop()}else{var o,a=r.layers[r.i];if(r.i++,"tilelayer"===a.type)if(a.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+a.name+"'");else{if(a.encoding&&"base64"===a.encoding){if(a.chunks)for(var h=0;h>>0;return n}},function(t,e,i){var h=i(2),l=i(231);t.exports=function(t){for(var e=[],i=[],n=l(t);n.i=n.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}n=i.pop()}else{var s,r,o,a=n.layers[n.i];n.i++,"imagelayer"===a.type?(s=h(a,"offsetx",0)+h(a,"startx",0),r=h(a,"offsety",0)+h(a,"starty",0),e.push({name:n.name+a.name,image:a.image,x:n.x+s+a.x,y:n.y+r+a.y,alpha:n.opacity*a.opacity,visible:n.visible&&a.visible,properties:h(a,"properties",{})})):"group"===a.type&&(o=l(t,a,n),i.push(n),n=o)}return e}},function(t,e,i){var x=i(105),T=i(488),w=i(232);t.exports=function(t){for(var e,i=[],n=[],s=null,r=0;r=this.firstgid&&t=n.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}n=i.pop()}else{var s,r=n.layers[n.i];if(n.i++,r.opacity*=n.opacity,r.visible=n.visible&&r.visible,"objectgroup"===r.type){r.name=n.name+r.name;for(var o=n.x+d(r,"startx",0)+d(r,"offsetx",0),a=n.y+d(r,"starty",0)+d(r,"offsety",0),h=[],l=0;ln&&(n=e.layer[r].width),e.layer[r].height>s&&(s=e.layer[r].height);var o=new h({width:n,height:s,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:a.WELTMEISTER});return o.layers=l(e,i),o.tilesets=u(e),o}},function(t,e,i){var d=i(103),f=i(74);t.exports=function(t,e){for(var i=[],n=0;nx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(1===m)for(h=0;hx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(2===m)for(h=f-1;0<=h;h--)for(l=0;lx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(3===m)for(h=f-1;0<=h;h--)for(l=d-1;0<=l;l--)!(a=v[h][l])||a.indexx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));return this.dirty[e]=!1,null===r&&(r=n.createVertexBuffer(o,s.STATIC_DRAW),this.vertexBuffer[e]=r),n.setVertexBuffer(r),i.setAttribPointers(),s.bufferSubData(s.ARRAY_BUFFER,0,o),this},batchTile:function(t,e,i,n,s,r,o){var a=i.getTileTextureCoordinates(e.index);if(!a)return t;var h=i.tileWidth,l=i.tileHeight,u=h/2,c=l/2,d=a.x/n,f=a.y/s,p=(a.x+h)/n,g=(a.y+l)/s,v=this._tempMatrix,m=-u,y=-c;e.flipX&&(h*=-1,m+=i.tileWidth),e.flipY&&(l*=-1,y+=i.tileHeight);var x=m+h,T=y+l;v.applyITRS(u+e.pixelX,c+e.pixelY,e.rotation,1,1);var w=L.getTintAppendFloatAlpha(16777215,r.alpha*this.alpha*e.alpha),b=v.getX(m,y),E=v.getY(m,y),S=v.getX(m,T),_=v.getY(m,T),A=v.getX(x,T),C=v.getY(x,T),M=v.getX(x,y),P=v.getY(x,y);r.roundPixels&&(b=Math.round(b),E=Math.round(E),S=Math.round(S),_=Math.round(_),A=Math.round(A),C=Math.round(C),M=Math.round(M),P=Math.round(P));var O=this.vertexViewF32[o],R=this.vertexViewU32[o];return O[++t]=b,O[++t]=E,O[++t]=d,O[++t]=f,O[++t]=0,O[++t]=0,R[++t]=w,O[++t]=S,O[++t]=_,O[++t]=d,O[++t]=g,O[++t]=0,O[++t]=0,R[++t]=w,O[++t]=A,O[++t]=C,O[++t]=p,O[++t]=g,O[++t]=0,O[++t]=0,R[++t]=w,O[++t]=b,O[++t]=E,O[++t]=d,O[++t]=f,O[++t]=0,O[++t]=0,R[++t]=w,O[++t]=A,O[++t]=C,O[++t]=p,O[++t]=g,O[++t]=0,O[++t]=0,R[++t]=w,O[++t]=M,O[++t]=P,O[++t]=p,O[++t]=f,O[++t]=0,O[++t]=0,R[++t]=w,this.vertexCount[o]+=6,t},setRenderOrder:function(t){if("string"==typeof t&&(t=["right-down","left-down","right-up","left-up"].indexOf(t)),0<=t&&t<4){this._renderOrder=t;for(var e=0;e=this.nextTick&&this.currentAnim.setFrame(this)}},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),e.setSizeToFrame(),e._originComponent&&(t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin()),e},updateFrame:function(t){var e,i=this.setCurrentFrame(t);this.isPlaying&&(t.setAlpha&&(i.alpha=t.alpha),e=this.currentAnim,i.emit(r.SPRITE_ANIMATION_KEY_UPDATE+e.key,e,t,i),i.emit(r.SPRITE_ANIMATION_UPDATE,e,t,i),3===this._pendingStop&&this._pendingStopValue===t&&this.currentAnim.completeAnimation(this))},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},setYoyo:function(t){return void 0===t&&(t=!1),this._yoyo=t,this.parent},getYoyo:function(){return this._yoyo},destroy:function(){this.animationManager.off(r.REMOVE_ANIMATION,this.remove,this),this.animationManager=null,this.parent=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null}});t.exports=o},function(t,e,i){var u=i(509),p=i(41),n=i(0),s=i(33),r=i(510),o=i(93),a=i(30),h=new n({initialize:function(t){this.game=t,this.type=s.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.config={clearBeforeRender:t.config.clearBeforeRender,backgroundColor:t.config.backgroundColor,resolution:t.config.resolution,antialias:t.config.antialias,roundPixels:t.config.roundPixels},this.gameCanvas=t.canvas;var e={alpha:t.config.transparent,desynchronized:t.config.desynchronized};this.gameContext=this.game.config.context?this.game.config.context:this.gameCanvas.getContext("2d",e),this.currentContext=this.gameContext,this.antialias=t.config.antialias,this.blendModes=r(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new a,this._tempMatrix2=new a,this._tempMatrix3=new a,this._tempMatrix4=new a,this.init()},init:function(){this.game.scale.on(o.RESIZE,this.onResize,this);var t=this.game.scale.baseSize;this.resize(t.width,t.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},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,n=this.height;t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),e.clearBeforeRender&&t.clearRect(0,0,i,n),e.transparent||(t.fillStyle=e.backgroundColor.rgba,t.fillRect(0,0,i,n)),t.save(),this.drawCount=0},render:function(t,e,i,n){var s=e.list,r=s.length,o=n._cx,a=n._cy,h=n._cw,l=n._ch,u=n.renderToTexture?n.context:t.sys.context;u.save(),this.game.scene.customViewports&&(u.beginPath(),u.rect(o,a,h,l),u.clip()),this.currentContext=u;var c=n.mask;c&&c.preRenderCanvas(this,null,n._maskCamera),n.transparent||(u.fillStyle=n.backgroundColor.rgba,u.fillRect(o,a,h,l)),u.globalAlpha=n.alpha,u.globalCompositeOperation="source-over",this.drawCount+=s.length,n.renderToTexture&&n.emit(p.PRE_RENDER,n),n.matrix.copyToContext(u);for(var d=0;dthis.vertexCapacity&&(this.flush(),x=!0,y=this.setTexture2D(m));var T=this.vertexViewF32,w=this.vertexViewU32,b=this.vertexCount*this.vertexComponentCount-1;return T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=v,w[++b]=d,T[++b]=i,T[++b]=n,T[++b]=h,T[++b]=c,T[++b]=v,w[++b]=p,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=v,w[++b]=g,T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=v,w[++b]=d,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=v,w[++b]=g,T[++b]=o,T[++b]=a,T[++b]=u,T[++b]=l,T[++b]=v,w[++b]=f,this.vertexCount+=6,x},batchTri:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g){void 0===g&&(g=this.currentUnit);var v=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),v=!0,g=this.setTexture2D(p));var m=this.vertexViewF32,y=this.vertexViewU32,x=this.vertexCount*this.vertexComponentCount-1;return m[++x]=t,m[++x]=e,m[++x]=o,m[++x]=a,m[++x]=f,y[++x]=u,m[++x]=i,m[++x]=n,m[++x]=o,m[++x]=l,m[++x]=f,y[++x]=c,m[++x]=s,m[++x]=r,m[++x]=h,m[++x]=l,m[++x]=f,y[++x]=d,this.vertexCount+=3,v},bind:function(){return l.prototype.bind.call(this),this}});t.exports=u},function(t,e,i){var n={};t.exports=n;var r=i(100),o=i(43);n.fromVertices=function(t){for(var e={},i=0;i>>0;if("function"!=typeof t)throw new TypeError;for(var n=2<=arguments.length?arguments[1]:void 0,s=0;sthis.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.zoom<.001&&(e.zoom=.001)))},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},function(t,e,i){t.exports={Camera:i(297),BaseCamera:i(92),CameraManager:i(706),Effects:i(305),Events:i(41)}},function(t,e){t.exports="cameradestroy"},function(t,e){t.exports="camerafadeincomplete"},function(t,e){t.exports="camerafadeinstart"},function(t,e){t.exports="camerafadeoutcomplete"},function(t,e){t.exports="camerafadeoutstart"},function(t,e){t.exports="cameraflashcomplete"},function(t,e){t.exports="cameraflashstart"},function(t,e){t.exports="camerapancomplete"},function(t,e){t.exports="camerapanstart"},function(t,e){t.exports="postrender"},function(t,e){t.exports="prerender"},function(t,e){t.exports="camerarotatecomplete"},function(t,e){t.exports="camerarotatestart"},function(t,e){t.exports="camerashakecomplete"},function(t,e){t.exports="camerashakestart"},function(t,e){t.exports="camerazoomcomplete"},function(t,e){t.exports="camerazoomstart"},function(t,e,i){var n=i(17),s=i(0),l=i(41),r=new s({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,n,s,r,o,a){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=!1),void 0===o&&(o=null),void 0===a&&(a=this.camera.scene),!r&&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=n,this.blue=s,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=o,this._onUpdateScope=a;var h=t?l.FADE_OUT_START:l.FADE_IN_START;return this.camera.emit(h,this.camera,this,e,i,n,s),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsedthis.source?Math.abs(this.destination-this.source):Math.abs(this.destination+h)-this.source)<(u=this.source>this.destination?Math.abs(this.source-this.destination):Math.abs(this.source+h)-this.destination)?this.clockwise=!0:uMath.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},function(t,e,i){var n=i(124);t.exports=function(){return n(-Math.PI,Math.PI)}},function(t,e,i){var n=i(124);t.exports=function(){return n(-180,180)}},function(t,e,i){var n=i(323);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(13);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(e>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return 2.3283064365386963e-10*((this.n=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;e=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}s++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getTangentAt(h,e)}s++}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 r([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 o(t.x,t.y)):this.add(new o(t,e))},toJSON:function(){for(var t=[],e=0;e>16&255,g:t>>8&255,b:255&t,a:255};return 16777215>>24),e}},function(t,e,i){var h=i(31),l=i(356);t.exports=function(t,e,i){var n,s,r=i,o=i,a=i;return 0!==e&&(r=l(s=2*i-(n=i<.5?i*(1+e):i+e-i*e),n,t+1/3),o=l(s,n,t),a=l(s,n,t-1/3)),(new h).setGLTo(r,o,a,1)}},function(t,e,i){var s=i(172);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}},function(t,e,i){function o(t,e,i,n,s,r,o,a){void 0===o&&(o=100),void 0===a&&(a=0);var h=a/o;return{r:l(t,n,h),g:l(e,s,h),b:l(i,r,h)}}var l=i(121);t.exports={RGBWithRGB:o,ColorWithRGB:function(t,e,i,n,s,r){return void 0===s&&(s=100),void 0===r&&(r=0),o(t.r,t.g,t.b,e,i,n,s,r)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),o(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(178),s=i(31);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new s(n(t,e),n(t,e),n(t,e))}},function(t,e,i){var r=i(355);t.exports=function(t,e,i,n,s){return void 0===n&&(n=255),void 0===s&&(s="#"),"#"===s?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1):"0x"+r(n)+r(t)+r(e)+r(i)}},function(t,e,i){t.exports={BitmapMask:i(282),GeometryMask:i(283)}},function(t,e,i){var n={AddToDOM:i(128),DOMContentLoaded:i(357),GetScreenOrientation:i(358),GetTarget:i(363),ParseXML:i(364),RemoveFromDOM:i(184),RequestAnimationFrame:i(344)};t.exports=n},function(t,e,i){t.exports={EventEmitter:i(828)}},function(t,e,i){var n=i(0),s=i(11),r=i(23),o=new n({Extends:s,initialize:function(){s.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",o,"events"),t.exports=o},function(t,e,i){var n=i(128),s=i(293),r=i(296),o=i(26),a=i(0),h=i(318),l=i(830),u=i(340),c=i(118),d=i(342),f=i(319),p=i(357),g=i(11),v=i(20),m=i(365),y=i(23),x=i(370),T=i(371),w=i(373),b=i(127),E=i(376),S=i(343),_=i(345),A=i(380),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 g,this.anims=new s(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=f,this.scale=new T(this,this.config),this.sound=null,this.sound=A.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,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),n(this.canvas,this.config.parent),this.textures.once(b.READY,this.texturesReady,this),this.events.emit(v.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(v.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)),_(this);var t=this.events;t.on(v.HIDDEN,this.onHidden,this),t.on(v.VISIBLE,this.onVisible,this),t.on(v.BLUR,this.onBlur,this),t.on(v.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e);var n=this.renderer;n.preRender(),i.emit(v.PRE_RENDER,n,t,e),this.scene.render(n),n.postRender(),i.emit(v.POST_RENDER,n,t,e)},headlessStep:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e),i.emit(v.PRE_RENDER),i.emit(v.POST_RENDER)},onHidden:function(){this.loop.pause(),this.events.emit(v.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(v.RESUME)},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(v.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},function(t,e,i){var n=i(128);t.exports=function(t){var e,i=t.config;i.parent&&i.domCreateContainer&&((e=document.createElement("div")).style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: none;","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=e,n(e,i.parent))}},function(t,e){t.exports="boot"},function(t,e){t.exports="destroy"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameout"},function(t,e){t.exports="gameover"},function(t,e){t.exports="gameobjectdown"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameobjectmove"},function(t,e){t.exports="gameobjectout"},function(t,e){t.exports="gameobjectover"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="wheel"},function(t,e){t.exports="gameobjectup"},function(t,e){t.exports="gameobjectwheel"},function(t,e){t.exports="boot"},function(t,e){t.exports="process"},function(t,e){t.exports="update"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointerdownoutside"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="pointerupoutside"},function(t,e){t.exports="wheel"},function(t,e){t.exports="pointerlockchange"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="start"},function(t,e){t.exports="update"},function(t,e){t.exports=function(t){if(!t)return window.innerHeight;var e=Math.abs(window.orientation),i={w:0,h:0},n=document.createElement("div");return n.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(n),i.w=90===e?n.offsetHeight:window.innerWidth,i.h=90===e?window.innerWidth:n.offsetHeight,document.documentElement.removeChild(n),n=null,90!==Math.abs(window.orientation)?i.h:i.w}},function(t,e){t.exports="addfile"},function(t,e){t.exports="complete"},function(t,e){t.exports="filecomplete"},function(t,e){t.exports="filecomplete-"},function(t,e){t.exports="loaderror"},function(t,e){t.exports="load"},function(t,e){t.exports="fileprogress"},function(t,e){t.exports="postprocess"},function(t,e){t.exports="progress"},function(t,e){t.exports="start"},function(t,e,i){var r=i(2),o=i(187);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=r(t.settings,"physics",!1);if(e||i){var n=[];if(e&&n.push(o(e+"Physics")),i)for(var s in i)s=o(s.concat("Physics")),-1===n.indexOf(s)&&n.push(s);return n}}},function(t,e,i){var n=i(2);t.exports=function(t){var e=t.plugins.getDefaultScenePlugins(),i=n(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},function(t,e,i){t.exports={game:"game",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"}},function(t,e){t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var s=i.getElementsByTagName("SubTexture"),r=0;r=t.length)throw new Error("Supplied index out of bounds");return n!==i&&(t.splice(n,1),t.splice(i,0,e)),e}},function(t,e){t.exports=function(t,e){var i,n,s=t.indexOf(e);return-1!==s&&st.length-1)throw new Error("Index out of bounds");var s=r(t,e);return i&&i.call(n,s),s}},function(t,e,i){var l=i(68);t.exports=function(t,e,i,n,s){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===s&&(s=t),l(t,e,i)){var r=i-e,o=t.splice(e,r);if(n)for(var a=0;a?@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"}},function(t,e,i){var T=i(6);t.exports=function(t,e){var i=e.width,n=e.height,s=Math.floor(i/2),r=Math.floor(n/2),o=T(e,"chars","");if(""!==o){var a=T(e,"image",""),h=T(e,"offset.x",0),l=T(e,"offset.y",0),u=T(e,"spacing.x",0),c=T(e,"spacing.y",0),d=T(e,"lineSpacing",0),f=T(e,"charsPerRow",null);null===f&&(f=t.sys.textures.getFrame(a).width/i)>o.length&&(f=o.length);for(var p=h,g=l,v={retroFont:!0,font:a,size:i,lineHeight:n+d,chars:{}},m=0,y=0;yr.vertexCapacity&&r.flush();for(var g=r.setGameObject(e),v=r.vertexViewF32,m=r.vertexViewU32,y=r.vertexCount*r.vertexComponentCount-1,x=0,T=e.tintFill,w=0;w=i&&t.x<=n&&t.y>=s&&t.y<=r}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===r&&(r=0),!(e>t.right+r||it.bottom+r||s=n&&(p.push(v),f=v)}var m=o[o.length-1];return y(f,m)i&&(i=a.x),a.xs&&(s=a.y),a.yn(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)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){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}},function(t,e,i){var r=i(9);t.exports=function(t,e,i,n,s){return void 0===s&&(s=new r),s.setTo(Math.min(t,i),Math.min(e,n),Math.abs(t-i),Math.abs(e-n))}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.centerX,e.y=t.centerY,e}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var r=i(174);t.exports=function(t,e,i){var n=t.centerX,s=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),r(t,n,s)}},function(t,e,i){var n=i(9),s=i(141);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(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}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){var a=i(4),h=i(40);t.exports=function(t,e,i){void 0===i&&(i=new a),e=h(e);var n=Math.sin(e),s=Math.cos(e),r=0=s||0=t.downTime+n)&&(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;it._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,n=0;n'),i.push(''),i.push(''),i.push(this.xhrLoader.responseText),i.push(""),i.push(""),i.push("");var n=[i.join("\n")],s=this;try{var r=new window.Blob(n,{type:"image/svg+xml;charset=utf-8"})}catch(t){return s.state=o.FILE_ERRORED,void s.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){l.revokeObjectURL(s.data),s.onProcessComplete()},this.data.onerror=function(){l.revokeObjectURL(s.data),s.onProcessError()},l.createObjectURL(this.data,r,"image/svg+xml")},addToCache:function(){var t=this.cache.addImage(this.key,this.data);this.pendingDestroy(t)}});s.register("htmlTexture",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;re.deltaAbsY()?g=-1:e.deltaAbsX()i&&s<(o=t.right-i)&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:c(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):0i&&s<(o=t.bottom-i)&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:c(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):0=n[2];if("^"===i.operator)return 0=i.number:0=n[2]:r[2]===n[2]}return t===e||"*"===t}},function(t,e,i){var n={};t.exports=n;var s=i(153),r=(i(225),i(43));n.create=function(t){var e=s.create(),i={label:"World",gravity:{x:0,y:1,scale:.001},bounds:{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}};return r.extend(e,i,t)}},function(t,e,i){var y={};t.exports=y;var a=i(476),n=i(519),r=i(43);y.create=function(t){var e={controller:y,detector:n.collisions,buckets:{},pairs:{},pairsList:[],bucketWidth:48,bucketHeight:48};return r.extend(e,t)},y.update=function(t,e,i,n){for(var s,r,o,a=i.world,h=t.buckets,l=!1,u=i.metrics,c=u.broadphaseTests=0;ca.bounds.max.x||d.bounds.max.ya.bounds.max.y)){var f=y._getRegion(t,d);if(!d.region||f.id!==d.region.id||n){u.broadphaseTests+=1,d.region&&!n||(d.region=f);for(var p=y._regionUnion(f,d.region),g=p.startCol;g<=p.endCol;g++)for(s=p.startRow;s<=p.endRow;s++){r=h[o=y._getBucketId(g,s)];var v=g>=f.startCol&&g<=f.endCol&&s>=f.startRow&&s<=f.endRow,m=g>=d.region.startCol&&g<=d.region.endCol&&s>=d.region.startRow&&s<=d.region.endRow;!v&&m&&m&&r&&y._bucketRemoveBody(t,r,d),(d.region===f||v&&!m||n)&&(r=r||y._createBucket(h,o),y._bucketAddBody(t,r,d))}d.region=f,l=!0}}}l&&(t.pairsList=y._createActivePairsList(t))},y.clear=function(t){t.buckets={},t.pairs={},t.pairsList=[]},y._regionUnion=function(t,e){var i=Math.min(t.startCol,e.startCol),n=Math.max(t.endCol,e.endCol),s=Math.min(t.startRow,e.startRow),r=Math.max(t.endRow,e.endRow);return y._createRegion(i,n,s,r)},y._getRegion=function(t,e){var i=e.bounds,n=Math.floor(i.min.x/t.bucketWidth),s=Math.floor(i.max.x/t.bucketWidth),r=Math.floor(i.min.y/t.bucketHeight),o=Math.floor(i.max.y/t.bucketHeight);return y._createRegion(n,s,r,o)},y._createRegion=function(t,e,i,n){return{id:t+","+e+","+i+","+n,startCol:t,endCol:e,startRow:i,endRow:n}},y._getBucketId=function(t,e){return"C"+t+"R"+e},y._createBucket=function(t,e){return t[e]=[]},y._bucketAddBody=function(t,e,i){for(var n=0;nl._pairMaxIdleLife&&a.push(h);for(h=0;hu.friction*u.frictionStatic*R*i&&(F=M,L=U.clamp(u.friction*P*i,-F,F));var k,D,I=X.cross(w,p),B=X.cross(b,p),N=m/(d.inverseMass+f.inverseMass+d.inverseInertia*I*I+f.inverseInertia*B*B);O*=N,L*=N,A<0&&A*A>Y._restingThresh*i?x.normalImpulse=0:(k=x.normalImpulse,x.normalImpulse=Math.min(x.normalImpulse+O,0),O=x.normalImpulse-k),C*C>Y._restingThreshTangent*i?x.tangentImpulse=0:(D=x.tangentImpulse,x.tangentImpulse=U.clamp(x.tangentImpulse+L,-F,F),L=x.tangentImpulse-D),n.x=p.x*O+g.x*L,n.y=p.y*O+g.y*L,d.isStatic||d.isSleeping||(d.positionPrev.x+=n.x*d.inverseMass,d.positionPrev.y+=n.y*d.inverseMass,d.anglePrev+=X.cross(w,n)*d.inverseInertia),f.isStatic||f.isSleeping||(f.positionPrev.x-=n.x*f.inverseMass,f.positionPrev.y-=n.y*f.inverseMass,f.anglePrev-=X.cross(b,n)*f.inverseInertia)}}}}},function(t,e,i){t.exports={BasePlugin:i(477),DefaultPlugins:i(180),PluginCache:i(23),PluginManager:i(370),ScenePlugin:i(1317)}},function(t,e,i){var n=i(477),s=i(0),r=i(22),o=new s({Extends:n,initialize:function(t,e){n.call(this,e),this.scene=t,this.systems=t.sys,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},function(t,e,i){var n=i(19),s=i(183),r=n(!1,r={Center:i(359),Events:i(93),Orientation:i(360),ScaleManager:i(371),ScaleModes:i(361),Zoom:i(362)},s.CENTER);r=n(!1,r,s.ORIENTATION),r=n(!1,r,s.SCALE_MODE),r=n(!1,r,s.ZOOM),t.exports=r},function(t,e,i){var n=i(131),s=i(19)(!1,s={Events:i(22),SceneManager:i(373),ScenePlugin:i(1320),Settings:i(375),Systems:i(186)},n);t.exports=s},function(t,e,i){var n=i(17),s=i(0),a=i(22),h=i(2),r=i(23),o=new s({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(a.BOOT,this.boot,this),t.sys.events.on(a.START,this.pluginStart,this)},boot:function(){this.systems.events.once(a.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(a.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=h(t,"target",!1),i=this.manager.getScene(e);if(!e||!this.checkValidTransition(i))return!1;var n=h(t,"duration",1e3);this._elapsed=0,this._target=i,this._duration=n,this._willSleep=h(t,"sleep",!1),this._willRemove=h(t,"remove",!1);var s=h(t,"onUpdate",null);s&&(this._onUpdate=s,this._onUpdateScope=h(t,"onUpdateScope",this.scene));var r=h(t,"allowInput",!1);this.settings.transitionAllowInput=r;var o=i.sys.settings;return o.isTransition=!0,o.transitionFrom=this.scene,o.transitionDuration=n,o.transitionAllowInput=r,h(t,"moveAbove",!1)?this.manager.moveAbove(this.key,e):h(t,"moveBelow",!1)&&this.manager.moveBelow(this.key,e),i.sys.isSleeping()?i.sys.wake(h(t,"data")):this.manager.start(e,h(t,"data")),this.systems.events.emit(a.TRANSITION_OUT,i,n),this.systems.events.on(a.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=n(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(a.UPDATE,this.step,this),t.events.emit(a.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,n){return this.manager.add(t,e,i,n)},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 n=this.manager.getScene(e);return n&&n.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)},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(a.SHUTDOWN,this.shutdown,this),t.off(a.POST_UPDATE,this.step,this),t.off(a.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(a.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});r.register("ScenePlugin",o,"scenePlugin"),t.exports=o},function(t,e,i){t.exports={List:i(135),Map:i(168),ProcessQueue:i(192),RTree:i(473),Set:i(139),Size:i(372)}},function(t,e,i){var n=i(19),s=i(1323),r=n(!1,r={CanvasTexture:i(377),Events:i(127),FilterMode:s,Frame:i(95),Parsers:i(379),Texture:i(188),TextureManager:i(376),TextureSource:i(378)},s);t.exports=r},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){t.exports={Components:i(147),Parsers:i(1354),Formats:i(32),ImageCollection:i(488),ParseToTilemap:i(233),Tile:i(74),Tilemap:i(497),TilemapCreator:i(1368),TilemapFactory:i(1369),Tileset:i(105),LayerData:i(103),MapData:i(104),ObjectLayer:i(491),DynamicTilemapLayer:i(498),StaticTilemapLayer:i(499)}},function(t,e,i){var p=i(24),g=i(52);t.exports=function(t,e,i,n,s,r,o,a){t<0&&(t=0),e<0&&(e=0),void 0===o&&(o=!0);for(var h=p(t,e,i,n,null,a),l=s-t,u=r-e,c=0;c=t&&l.index<=e&&u(l,i)}n&&c(0,0,s.width,s.height,s)}}},function(t,e,i){var a=i(73),h=i(52),l=i(228);t.exports=function(t,e,i,n){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var s=0;s=s.delay&&(n=s.elapsed-s.delay,s.elapsed=s.delay,!s.hasDispatched&&s.callback&&(s.hasDispatched=!0,s.callback.apply(s.callbackScope,s.args)),0>2],s+=o[(3&i[r])<<4|i[r+1]>>4],s+=o[(15&i[r+1])<<2|i[r+2]>>6],s+=o[63&i[r+2]];return n%3==2?s=s.substring(0,s.length-1)+"=":n%3==1&&(s=s.substring(0,s.length-2)+"=="),s}},function(t,e,i){t.exports={Clone:i(67),Extend:i(19),GetAdvancedValue:i(15),GetFastValue:i(2),GetMinMaxValue:i(1394),GetValue:i(6),HasAll:i(1395),HasAny:i(407),HasValue:i(112),IsPlainObject:i(7),Merge:i(132),MergeRight:i(1396),Pick:i(489),SetValue:i(427)}},function(t,e,i){var o=i(6),a=i(17);t.exports=function(t,e,i,n,s){void 0===s&&(s=i);var r=o(t,e,s);return a(r,i,n)}},function(t,e){t.exports=function(t,e){for(var i=0;ii[e][0])&&(e=n);return!S(P(t,e-1),P(t,e),P(t,e+1))&&(function(t){for(var e=[],i=t.length,n=0;n!==i;n++)e.push(t.pop());for(n=0;n!==i;n++)t[n]=e[n]}(t),!0)}};var u=[],c=[];function M(t,e){var i=e[0]-t[0],n=e[1]-t[1];return i*i+n*n}function P(t,e){var i=t.length;return t[e<0?e%i+i:e%i]}function O(t,e,i,n){for(var s=i;sn.deltaMax?n.deltaMax:e)/n.delta,n.delta=e),0!==n.timeScalePrev&&(r*=s.timeScale/n.timeScalePrev),0===s.timeScale&&(r=0),n.timeScalePrev=s.timeScale,n.correction=r,n.frameCounter+=1,1e3<=t-n.counterTimestamp&&(n.fps=n.frameCounter*((t-n.counterTimestamp)/1e3),n.counterTimestamp=t,n.frameCounter=0),T.update(i,e,r))},step:function(t,e){T.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!==u.get(this.localWorld,e.id,e.type)},getAllBodies:function(){return u.allBodies(this.localWorld)},getAllConstraints:function(){return u.allConstraints(this.localWorld)},getAllComposites:function(){return u.allComposites(this.localWorld)},postUpdate:function(){var t,e,i,n;this.drawDebug&&(t=this.debugConfig,e=this.engine,i=this.debugGraphic,n=u.allBodies(this.localWorld),this.debugGraphic.clear(),t.showBroadphase&&e.broadphase.controller&&this.renderGrid(e.broadphase,i,t.broadphaseColor,.5),t.showBounds&&this.renderBodyBounds(n,i,t.boundsColor,.5),(t.showBody||t.showStaticBody)&&this.renderBodies(n),t.showJoint&&this.renderJoints(),(t.showAxes||t.showAngleIndicator)&&this.renderBodyAxes(n,i,t.showAxes,t.angleColor,.5),t.showVelocity&&this.renderBodyVelocity(n,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,n){e.lineStyle(1,i,n);for(var s=y.keys(t.buckets),r=0;re.max.x?i=e.min.x-t.max.x:t.max.xe.max.y?n=e.min.y-t.max.y:t.max.y=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},function(t,e){t.exports={getTintFromFloats:function(t,e,i,n){return((255&(255*n|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]},getComponentCount:function(t,e){for(var i=0,n=0;nr.width&&(i=Math.max(r.width-t,0)),e+n>r.height&&(n=Math.max(r.height-e,0));for(var l=[],u=e;uthis.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},function(t,e,i){var n=i(13);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e,i){t.exports={DESTROY:i(667),FADE_IN_COMPLETE:i(668),FADE_IN_START:i(669),FADE_OUT_COMPLETE:i(670),FADE_OUT_START:i(671),FLASH_COMPLETE:i(672),FLASH_START:i(673),PAN_COMPLETE:i(674),PAN_START:i(675),POST_RENDER:i(676),PRE_RENDER:i(677),ROTATE_COMPLETE:i(678),ROTATE_START:i(679),SHAKE_COMPLETE:i(680),SHAKE_START:i(681),ZOOM_COMPLETE:i(682),ZOOM_START:i(683)}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.fillColor,r=n||e.fillAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.fillStyle="rgba("+o+","+a+","+h+","+r+")"}},function(t,e){var h={};t.exports=h,function(){h._nextId=0,h._seed=0,h._nowStartTime=+new Date,h.extend=function(t,e){for(var i,n="boolean"==typeof e?(i=2,e):(i=1,!0),s=i;s=e&&t.y<=i&&t.y+t.height>=i)}},function(t,e){t.exports=function(t,e,i,n){var s=i||e.strokeColor,r=n||e.strokeAlpha,o=(16711680&s)>>>16,a=(65280&s)>>>8,h=255&s;t.strokeStyle="rgba("+o+","+a+","+h+","+r+")",t.lineWidth=e.lineWidth}},function(t,e){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}},function(t,e,i){var d=i(149),f=i(24);t.exports=function(t,e,i,n,s){for(var r,o,a,h,l=f(t,e,i,n,null,s),u=0;u=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}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e,i){"use strict";function n(t,e,i){i=i||2;var n,s,r,o,a,h,l,u=e&&e.length,c=u?e[0]*i:t.length,d=g(t,0,c,i,!0),f=[];if(!d||d.next===d.prev)return f;if(u&&(d=function(t,e,i,n){var s,r,o,a,h,l=[];for(s=0,r=e.length;s=n.next.y&&n.next.y!==n.y){var a=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=s&&o=n.x&&n.x>=u&&s!==n.x&&T(ri.x||n.x===i.x&&function(t,e){return w(t.prev,t,e.prev)<0&&w(e.next,t,t.next)<0}(i,n)))&&(i=n,d=h)),n=n.next,n!==l;);return i}(t,e))&&(i=E(e,t),v(e,e.next),v(i,i.next))}}(l[s],i),i=v(i,i.next);return i}(t,e,d,i)),t.length>80*i){n=r=t[0],s=o=t[1];for(var p=i;pr.x?s.x>o.x?s.x:o.x:r.x>o.x?r.x:o.x,u=s.y>r.y?s.y>o.y?s.y:o.y:r.y>o.y?r.y:o.y,c=x(a,h,e,i,n),d=x(l,u,e,i,n),f=t.prevZ,p=t.nextZ;for(;f&&f.z>=c&&p&&p.z<=d;){if(f!==t.prev&&f!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,f.x,f.y)&&0<=w(f.prev,f,f.next))return!1;if(f=f.prevZ,p!==t.prev&&p!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&0<=w(p.prev,p,p.next))return!1;p=p.nextZ}for(;f&&f.z>=c;){if(f!==t.prev&&f!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,f.x,f.y)&&0<=w(f.prev,f,f.next))return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&T(s.x,s.y,r.x,r.y,o.x,o.y,p.x,p.y)&&0<=w(p.prev,p,p.next))return!1;p=p.nextZ}return!0}(t,n,s,r):function(t){var e=t.prev,i=t,n=t.next;if(0<=w(e,i,n))return!1;var s=t.next.next;for(;s!==t.prev;){if(T(e.x,e.y,i.x,i.y,n.x,n.y,s.x,s.y)&&0<=w(s.prev,s,s.next))return!1;s=s.next}return!0}(t))e.push(a.i/i),e.push(t.i/i),e.push(h.i/i),d(t),t=h.next,l=h.next;else if((t=h)===l){o?1===o?m(t=function(t,e,i){var n=t;do{var s=n.prev,r=n.next.next;!u(s,r)&&c(s,n,n.next,r)&&b(s,r)&&b(r,s)&&(e.push(s.i/i),e.push(n.i/i),e.push(r.i/i),d(n),d(n.next),n=t=r),n=n.next}while(n!==t);return v(n)}(v(t),e,i),e,i,n,s,r,2):2===o&&function(t,e,i,n,s,r){var o=t;do{for(var a=o.next.next;a!==o.prev;){if(o.i!==a.i&&function(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&&c(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&(b(t,e)&&b(e,t)&&function(t,e){var i=t,n=!1,s=(t.x+e.x)/2,r=(t.y+e.y)/2;for(;i.y>r!=i.next.y>r&&i.next.y!==i.y&&s<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next,i!==t;);return n}(t,e)&&(w(t.prev,t,e.prev)||w(t,e.prev,e))||u(t,e)&&0=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function l(t){return 0=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},function(t,e,i){var n=i(0),s=i(18),c=i(22),r=i(8),d=i(2),f=i(7),o=new n({Extends:c,initialize:function t(e,i,n,s,r){var o,a,h="png";f(i)&&(i=d(a=i,"key"),n=d(a,"url"),o=d(a,"normalMap"),s=d(a,"xhrSettings"),h=d(a,"extension",h),r=d(a,"frameConfig")),Array.isArray(n)&&(o=n[1],n=n[0]);var l,u={type:"image",cache:e.textureManager,extension:h,responseType:"blob",key:i,url:n,xhrSettings:s,config:r};c.call(this,e,u),o&&((l=new t(e,this.key,o,s,r)).type="normalMap",this.setLink(l),e.addFile(l))},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){c.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){c.revokeObjectURL(t.data),t.onProcessError()},c.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var t,e=this.linkFile;e&&e.state===s.FILE_COMPLETE?(t="image"===this.type?this.cache.addImage(this.key,this.data,e.data):this.cache.addImage(e.key,e.data,this.data),this.pendingDestroy(t),e.pendingDestroy(t)):e||(t=this.cache.addImage(this.key,this.data),this.pendingDestroy(t))}});r.register("image",function(t,e,i){if(Array.isArray(t))for(var n=0;nthis.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=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.tileToWorldX(this.x,t):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.tileToWorldY(this.y,t)-(this.height-this.baseHeight)*e.scaleY:this.y*this.baseHeight-(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 r),e.x=this.getLeft(),e.y=this.getTop(),e.width=this.getRight()-e.x,e.height=this.getBottom()-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},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},intersects:function(t,e,i,n){return!(i<=this.pixelX||n<=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){return 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),this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,n,s){return void 0===e&&(e=t),void 0===i&&(i=t),void 0===n&&(n=t),void 0===s&&(s=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=n,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=n,s&&this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y),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,n){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==n&&(this.baseHeight=n),this.updatePixelXY(),this},updatePixelXY:function(){return this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight,this},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||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=o},function(t,e,i){var r=i(248),n=i(0),s=i(11),o=i(14),a=i(29),h=i(987),l=new n({Extends:o,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.ScrollFactor,s.Size,s.TextureCrop,s.Tint,s.Transform,s.Visible,h],initialize:function(t,e,i,n,s){o.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new r(this),this.setTexture(n,s),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.on(a.ADDED_TO_SCENE,this.addedToScene,this),this.on(a.REMOVED_FROM_SCENE,this.removedFromScene,this)},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 s.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=l},function(t,e){t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},function(t,e){t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},function(t,e){t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},function(t,e){t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},function(t,e,i){var n=new(i(0))({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},clone:function(){return new n(this.x,this.y,this.z)},crossVectors:function(t,e){var i=t.x,n=t.y,s=t.z,r=e.x,o=e.y,a=e.z;return this.x=n*a-s*o,this.y=s*r-i*a,this.z=i*o-n*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},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||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,n=t.z-this.z||0;return Math.sqrt(e*e+i*i+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return e*e+i*i+n*n},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,n=t*t+e*e+i*i;return 0=t.length)){for(var i=t.length-1,n=t[e],s=e;sh||a.y>l)?(u=Math.max(a.x,e),c=Math.max(a.y,i),b=d=Math.min(a.r,h)-u,E=f=Math.min(a.b,l)-c,T=r?p+(v-(u-a.x)-d):p+(u-a.x),w=o?g+(m-(c-a.y)-f):g+(c-a.y),e=u,i=c,n=d,s=f):E=b=w=T=0):(r&&(T=p+(v-e-n)),o&&(w=g+(m-i-s)));var _=this.source.width,A=this.source.height;return t.u0=Math.max(0,T/_),t.v0=Math.max(0,w/A),t.u1=Math.min(1,(T+b)/_),t.v1=Math.min(1,(w+E)/A),t.x=e,t.y=i,t.cx=T,t.cy=w,t.cw=b,t.ch=E,t.width=n,t.height=s,t.flipX=r,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,n,s,r){var o=this.data.drawImage;return o.width=t,o.height=e,this.u0=i,this.v0=n,this.u1=s,this.v1=r,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.width=i,s.height=n;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+n)/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 r(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=s(!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=r},function(t,e,i){var n=i(0),s=i(98),r=i(411),o=i(412),a=i(49),h=i(165),l=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=a.ELLIPSE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(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,n){return this.x=t,this.y=e,this.width=i,this.height=n,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},function(t,e){t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var n=(e-t.x)/t.width,s=(i-t.y)/t.height;return(n*=n)+(s*=s)<.25}},function(t,e,i){var U=i(251),n=i(0),r=i(29),s=i(191),z=i(2),G=i(6),o=i(7),W=i(403),a=i(140),h=i(76),l=new n({initialize:function(t,e,i){i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?o(e[0])&&(i=e,e=null):o(e)&&(i=e,e=null),this.scene=t,this.children=new a,this.isParent=!0,this.type="Group",this.classType=z(i,"classType",h),this.name=z(i,"name",""),this.active=z(i,"active",!0),this.maxSize=z(i,"maxSize",-1),this.defaultKey=z(i,"defaultKey",null),this.defaultFrame=z(i,"defaultFrame",null),this.runChildUpdate=z(i,"runChildUpdate",!1),this.createCallback=z(i,"createCallback",null),this.removeCallback=z(i,"removeCallback",null),this.createMultipleCallback=z(i,"createMultipleCallback",null),this.internalCreateCallback=z(i,"internalCreateCallback",null),this.internalRemoveCallback=z(i,"internalRemoveCallback",null),e&&this.addMultiple(e),i&&this.createMultiple(i)},create:function(t,e,i,n,s,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===n&&(n=this.defaultFrame),void 0===s&&(s=!0),void 0===r&&(r=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,n);return this.scene.sys.displayList.add(o),o.preUpdate&&this.scene.sys.updateList.add(o),o.visible=s,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=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;it.max.x&&(t.max.x=s.x),s.xt.max.y&&(t.max.y=s.y),s.y=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},i.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},i.translate=function(t,e){t.min.x+=e.x,t.max.x+=e.x,t.min.y+=e.y,t.max.y+=e.y},i.shift=function(t,e){var i=t.max.x-t.min.x,n=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+n}},function(t,e){t.exports=function(t,e,i){return 0<=t&&t=this.firstgid&&t=this.vertexCapacity},resize:function(t,e,i){return this.width=t*i,this.height=e*i,this.resolution=i,this},bind:function(t){void 0===t&&(t=!1);var e=this.vertexBuffer,i=this.program,n=this.renderer;return n.setProgram(i),n.setVertexBuffer(e),this.setAttribPointers(t),this},setAttribPointers:function(t){void 0===t&&(t=!1);for(var e=this.gl,i=this.attributes,n=this.vertexSize,s=this.program,r=0;rthis.vertexCapacity&&this.flush();var N=this.setGameObject(t),Y=t._isTinted&&t.tintFill;this.batchQuad(A,C,M,P,O,R,L,F,l,u,c,d,D,k,I,B,Y,h,N)},batchQuad:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,m,y){void 0===y&&(y=this.currentUnit);var x=!1;this.vertexCount+6>this.vertexCapacity&&(this.flush(),x=!0,y=this.setTexture2D(m));var T=this.vertexViewF32,w=this.vertexViewU32,b=this.vertexCount*this.vertexComponentCount-1;return T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=y,T[++b]=v,w[++b]=d,T[++b]=i,T[++b]=n,T[++b]=h,T[++b]=c,T[++b]=y,T[++b]=v,w[++b]=p,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=y,T[++b]=v,w[++b]=g,T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=y,T[++b]=v,w[++b]=d,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=y,T[++b]=v,w[++b]=g,T[++b]=o,T[++b]=a,T[++b]=u,T[++b]=l,T[++b]=y,T[++b]=v,w[++b]=f,this.vertexCount+=6,x},batchTri:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g){void 0===g&&(g=this.currentUnit);var v=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),v=!0,g=this.setTexture2D(p));var m=this.vertexViewF32,y=this.vertexViewU32,x=this.vertexCount*this.vertexComponentCount-1;return m[++x]=t,m[++x]=e,m[++x]=o,m[++x]=a,m[++x]=g,m[++x]=f,y[++x]=u,m[++x]=i,m[++x]=n,m[++x]=o,m[++x]=l,m[++x]=g,m[++x]=f,y[++x]=c,m[++x]=s,m[++x]=r,m[++x]=h,m[++x]=l,m[++x]=g,m[++x]=f,y[++x]=d,this.vertexCount+=3,v},batchTexture:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g,v,m,y,x,T,w,b,E,S,_,A,C,M,P,O,R){this.renderer.setPipeline(this,t);var L,F,D,k=this._tempMatrix1,I=this._tempMatrix2,B=this._tempMatrix3,N=m/i+A,Y=y/n+C,X=(m+x)/i+A,U=(y+T)/n+C,z=o,G=a,W=-g,V=-v;t.isCropped&&(z=(L=t._crop).width,G=L.height,o=L.width,a=L.height,F=m=L.x,D=y=L.y,c&&(F=x-L.x-L.width),d&&!e.isRenderTexture&&(D=T-L.y-L.height),N=F/i+A,Y=D/n+C,X=(F+L.width)/i+A,U=(D+L.height)/n+C,W=-g+m,V=-v+y),c&&(z*=-1,W+=o),(d^=!O&&e.isRenderTexture?1:0)&&(G*=-1,V+=a);var H=W+z,j=V+G;I.applyITRS(s,r,u,h,l),k.copyFrom(M.matrix),P?(k.multiplyWithOffset(P,-M.scrollX*f,-M.scrollY*p),I.e=s,I.f=r):(I.e-=M.scrollX*f,I.f-=M.scrollY*p),k.multiply(I,B);var q=B.getX(W,V),K=B.getY(W,V),Z=B.getX(W,j),J=B.getY(W,j),Q=B.getX(H,j),$=B.getY(H,j),tt=B.getX(H,V),et=B.getY(H,V);M.roundPixels&&(q=Math.round(q),K=Math.round(K),Z=Math.round(Z),J=Math.round(J),Q=Math.round(Q),$=Math.round($),tt=Math.round(tt),et=Math.round(et)),void 0===R&&(R=this.renderer.setTexture2D(e)),this.batchQuad(q,K,Z,J,Q,$,tt,et,N,Y,X,U,w,b,E,S,_,e,R)},batchTextureFrame:function(t,e,i,n,s,r,o){this.renderer.setPipeline(this);var a=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2,l=e+t.width,u=i+t.height;o?a.multiply(o,h):h=a;var c=h.getX(e,i),d=h.getY(e,i),f=h.getX(e,u),p=h.getY(e,u),g=h.getX(l,u),v=h.getY(l,u),m=h.getX(l,i),y=h.getY(l,i),x=this.renderer.setTextureSource(t.source);n=X.getTintAppendFloatAlpha(n,s),this.batchQuad(c,d,f,p,g,v,m,y,t.u0,t.v0,t.u1,t.v1,n,n,n,n,0,t.glTexture,x)},drawFillRect:function(t,e,i,n,s,r){t=Math.floor(t),e=Math.floor(e);var o=Math.floor(t+i),a=Math.floor(e+n),h=this.renderer.blankTexture.glTexture,l=this.renderer.setTexture2D(h),u=X.getTintAppendFloatAlphaAndSwap(s,r);this.batchQuad(t,e,t,a,o,a,o,e,0,0,1,1,u,u,u,u,2,h,l)},batchFillRect:function(t,e,i,n,s,r){this.renderer.setPipeline(this);var o=this._tempMatrix3;r&&r.multiply(s,o);var a=t+i,h=e+n,l=o.getX(t,e),u=o.getY(t,e),c=o.getX(t,h),d=o.getY(t,h),f=o.getX(a,h),p=o.getY(a,h),g=o.getX(a,e),v=o.getY(a,e),m=this.currentFrame,y=m.u0,x=m.v0,T=m.u1,w=m.v1,b=this.fillTint;this.batchQuad(l,u,c,d,f,p,g,v,y,x,T,w,b.TL,b.TR,b.BL,b.BR,this.tintEffect)},batchFillTriangle:function(t,e,i,n,s,r,o,a){this.renderer.setPipeline(this);var h=this._tempMatrix3;a&&a.multiply(o,h);var l=h.getX(t,e),u=h.getY(t,e),c=h.getX(i,n),d=h.getY(i,n),f=h.getX(s,r),p=h.getY(s,r),g=this.currentFrame,v=g.u0,m=g.v0,y=g.u1,x=g.v1;this.batchTri(l,u,c,d,f,p,v,m,y,x,this.fillTint.TL,this.fillTint.TR,this.fillTint.BL,this.tintEffect)},batchStrokeTriangle:function(t,e,i,n,s,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=n,l[1].width=o,l[2].x=s,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.setPipeline(this);var n=this._tempMatrix3;i&&i.multiply(e,n);for(var s,r,o=t.length,a=this.polygonCache,h=this.fillTint.TL,l=this.fillTint.TR,u=this.fillTint.BL,c=this.tintEffect,d=0;d>16)+(65280&t)+((255&t)<<16)}},function(t,e,i){var n=i(0),a=i(292),s=new n({initialize:function(t,e){this.parent=t,(this.events=e)||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once("destroy",this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],n=0;ne.right||t.y>e.bottom)}},function(t,e,i){var l=i(6),u={},n={register:function(t,e,i,n,s){u[t]={plugin:e,mapping:i,settingsKey:n,configKey:s}},getPlugin:function(t){return u[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,n=e.game.config;for(var s in u){var r=u[s].plugin,o=u[s].mapping,a=u[s].settingsKey,h=u[s].configKey;l(i,a,n[h])&&(t[o]=new r(t))}},remove:function(t){u.hasOwnProperty(t)&&delete u[t]}};t.exports=n},function(t,e,i){t.exports={ANY_KEY_DOWN:i(1235),ANY_KEY_UP:i(1236),COMBO_MATCH:i(1237),DOWN:i(1238),KEY_DOWN:i(1239),KEY_UP:i(1240),UP:i(1241)}},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),void 0===r&&(r=!1),{responseType:t,async:e,user:i,password:n,timeout:s,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:r}}},function(t,e,i){var n=i(0),s=i(226),r=i(76),o=new n({Extends:r,Mixins:[s.Acceleration,s.Angular,s.Bounce,s.Debug,s.Drag,s.Enable,s.Friction,s.Gravity,s.Immovable,s.Mass,s.Size,s.Velocity],initialize:function(t,e,i,n,s){r.call(this,t,e,i,n,s),this.body=null}});t.exports=o},function(t,e,i){t.exports={CalculateFacesAt:i(233),CalculateFacesWithin:i(53),Copy:i(1322),CreateFromTiles:i(1323),CullTiles:i(1324),Fill:i(1325),FilterTiles:i(1326),FindByIndex:i(1327),FindTile:i(1328),ForEachTile:i(1329),GetTileAt:i(149),GetTileAtWorldXY:i(1330),GetTilesWithin:i(24),GetTilesWithinShape:i(1331),GetTilesWithinWorldXY:i(1332),HasTileAt:i(503),HasTileAtWorldXY:i(1333),IsInLayerBounds:i(103),PutTileAt:i(234),PutTileAtWorldXY:i(1334),PutTilesAt:i(1335),Randomize:i(1336),RemoveTileAt:i(504),RemoveTileAtWorldXY:i(1337),RenderDebug:i(1338),ReplaceByIndex:i(502),SetCollision:i(1339),SetCollisionBetween:i(1340),SetCollisionByExclusion:i(1341),SetCollisionByProperty:i(1342),SetCollisionFromCollisionGroup:i(1343),SetLayerCollisionIndex:i(152),SetTileCollision:i(65),SetTileIndexCallback:i(1344),SetTileLocationCallback:i(1345),Shuffle:i(1346),SwapByIndex:i(1347),TileToWorldX:i(150),TileToWorldXY:i(1348),TileToWorldY:i(151),WeightedRandomize:i(1349),WorldToTileX:i(66),WorldToTileXY:i(1350),WorldToTileY:i(67)}},function(t,e,i){var r=i(103);t.exports=function(t,e,i,n){if(void 0===i&&(i=!1),r(t,e,n)){var s=n.data[e][t]||null;return null!==s&&(-1!==s.index||i)?s:null}return null}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileWidth,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.x+e.scrollX*(1-s.scrollFactorX),n*=s.scaleX),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.baseTileHeight,s=i.tilemapLayer,r=0;return s&&(void 0===e&&(e=s.scene.cameras.main),r=s.y+e.scrollY*(1-s.scrollFactorY),n*=s.scaleY),r+t*n}},function(t,e){t.exports=function(t,e,i){var n=i.collideIndexes.indexOf(t);e&&-1===n?i.collideIndexes.push(t):e||-1===n||i.collideIndexes.splice(n,1)}},function(t,e,i){var r=i(2);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+r(e,"startx",0)*t.tilewidth+r(e,"offsetx",0),s=e.y+r(e,"starty",0)*t.tileheight+r(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+s}}},function(t,e){t.exports=function(o,a,t){return o.hasOwnProperty(a)?"function"==typeof o[a]?function(t,e,i,n,s,r){return o[a](t,e,i,n,s,r)}:function(){return o[a]}:"function"==typeof t?t:function(){return t}}},function(t,e,i){var R=i(241),L=i(15),F=i(90),D=i(71),k=i(154),I=i(525),B=i(239),N=i(6),Y=i(240),X=i(242),U=i(244);t.exports=function(t,e,i){void 0===i&&(i=R);for(var n=i.targets?i.targets:B(e),s=I(e),r=k(e,"delay",i.delay),o=k(e,"duration",i.duration),a=N(e,"easeParams",i.easeParams),h=D(N(e,"ease",i.ease),a),l=k(e,"hold",i.hold),u=k(e,"repeat",i.repeat),c=k(e,"repeatDelay",i.repeatDelay),d=F(e,"yoyo",i.yoyo),f=F(e,"flipX",i.flipX),p=F(e,"flipY",i.flipY),g=[],v=0;v=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2);t=new Array(1+(s-r)).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e,i){var n=i(306),s=i(309),r=i(311),o=i(312);t.exports=function(t){switch(typeof t){case"string":return("rgb"===t.substr(0,3).toLowerCase()?o:n)(t);case"number":return s(t);case"object":return r(t)}}},function(t,e){t.exports=function(t,e,i){return t<<16|e<<8|i}},function(t,e,i){var a=i(173);function h(t,e,i,n){var s=(t+6*e)%6,r=Math.min(s,4-s,1);return Math.round(255*(n-n*i*Math.max(0,r)))}t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1);var s=h(5,t,e,i),r=h(3,t,e,i),o=h(1,t,e,i);return n?n.setTo?n.setTo(s,r,o,n.alpha,!1):(n.r=s,n.g=r,n.b=o,n.color=a(s,r,o),n):{r:s,g:r,b:o,color:a(s,r,o)}}},function(t,e){var i="";function n(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;is.width&&(t=s.width-r.cutX),r.cutY+e>s.height&&(e=s.height-r.cutY),r.setSize(t,e,r.cutX,r.cutY)),this.updateDisplayOrigin();var a=this.input;return a&&!a.customHitArea&&(a.hitArea.width=t,a.hitArea.height=e),this},setGlobalTint:function(t){return this.globalTint=t,this},setGlobalAlpha:function(t){return this.globalAlpha=t,this},saveTexture:function(t){return this.textureManager.renameTexture(this.texture.key,t),this._saved=!0,this.texture},fill:function(t,e,i,n,s,r){var o=this.gl,a=this.frame,h=this.texture,l=this.camera,u=this.renderer;void 0===e&&(e=1),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=a.cutWidth),void 0===r&&(r=a.cutHeight);var c,d,f,p,g,v,m,y,x,T,w=255&(t>>16|0),b=255&(t>>8|0),E=255&(0|t);return l.preRender(1,1),o?(c=l._cx,d=l._cy,f=l._cw,p=l._ch,u.resetTextures(!0),u.pushScissor(c,d,f,-p),u.setFramebuffer(this.framebuffer,!1),g=this.pipeline,v=h.width,m=h.height,y=g.width/v,x=g.height/m,g.drawFillRect(i*y,(m-r-n)*x,s*y,r*x,S.getTintFromFloats(w/255,b/255,E/255,1),e),g.flush(),u.setFramebuffer(null,!1),u.popScissor()):(T=this.context,u.setContext(T),T.fillStyle="rgba("+w+","+b+","+E+","+e+")",T.fillRect(i+a.cutX,n+a.cutY,s,r),u.setContext()),this.dirty=!0,this},clear:function(){var t,e,i;return this.dirty&&((t=this.gl)?((e=this.renderer).setFramebuffer(this.framebuffer,!0),this.frame.cutWidth===this.canvas.width&&this.frame.cutHeight===this.canvas.height||t.scissor(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),e.setFramebuffer(null,!0)):((i=this.context).save(),i.setTransform(1,0,0,1,0,0),i.clearRect(this.frame.cutX,this.frame.cutY,this.frame.cutWidth,this.frame.cutHeight),i.restore()),this.dirty=!1),this},erase:function(t,e,i){this._eraseMode=!0;var n=this.renderer.currentBlendMode;return this.renderer.setBlendMode(o.ERASE),this.draw(t,e,i,1,16777215),this.renderer.setBlendMode(n),this._eraseMode=!1,this},draw:function(t,e,i,n,s){void 0===n&&(n=this.globalAlpha),s=void 0===s?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(s>>16)+(65280&s)+((255&s)<<16),Array.isArray(t)||(t=[t]);var r,o,a,h,l,u=this.gl,c=this.camera,d=this.renderer;return c.preRender(1,1),u?(r=c._cx,o=c._cy,a=c._cw,h=c._ch,d.resetTextures(!0),d.setFramebuffer(this.framebuffer,!1),d.pushScissor(r,o,a,h,h),l=this.pipeline,g(l,0,this.texture.width,0,this.texture.height,-1e3,1e3),this.batchList(t,e,i,n,s),d.setFramebuffer(null,!0),d.resetTextures(!0),g(l,0,l.width,l.height,0,-1e3,1e3)):(d.setContext(this.context),this.batchList(t,e,i,n,s),d.setContext()),this.dirty=!0,this},drawFrame:function(t,e,i,n,s,r){void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=this.globalAlpha),r=void 0===r?(this.globalTint>>16)+(65280&this.globalTint)+((255&this.globalTint)<<16):(r>>16)+(65280&r)+((255&r)<<16);var o,a,h,l,u,c=this.gl,d=this.camera,f=this.renderer,p=this.textureManager.getFrame(t,e);return p&&(d.preRender(1,1),c?(o=d._cx,a=d._cy,h=d._cw,l=d._ch,f.resetTextures(!0),f.setFramebuffer(this.framebuffer,!1),f.pushScissor(o,a,h,l,l),u=this.pipeline,g(u,0,this.texture.width,0,this.texture.height,-1e3,1e3),u.batchTextureFrame(p,i+this.frame.cutX,n+this.frame.cutY,r,s,d.matrix,null),u.flush(),f.setFramebuffer(null,!1),f.popScissor(),g(u,0,u.width,u.height,0,-1e3,1e3)):this.batchTextureFrame(p,i+this.frame.cutX,n+this.frame.cutY,s,r),this.dirty=!0),this},batchList:function(t,e,i,n,s){for(var r=0;rs&&(r=t[s]),n[s]=r,t.length>s+1&&(r=t[s+1]),n[s+1]=r;return this},setColors:function(t){var e=this.points.length;if(e<1)return this;var i=this.colors;void 0===t?t=[16777215]:Array.isArray(t)||(t=[t]);var n=0;if(t.length===e)for(r=0;rn&&(s=t[n]),i[n]=s,t.length>n+1&&(s=t[n+1]),i[n+1]=s;return this},setPoints:function(t,e,i){if(void 0===t&&(t=2),"number"==typeof t){var n,s,r,o=t;if(o<2&&(o=2),t=[],this.horizontal)for(r=-this.frame.halfWidth,s=this.frame.width/(o-1),n=0;n=this._markerOut&&(e.loop?(e.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=t,this.emit(o.VIDEO_LOOP,this)):(this.emit(o.VIDEO_COMPLETE,this),this.stop())))},checkVideoProgress:function(){2<=this.video.readyState?this.updateTexture():(this.retry--,0e._dx?r<(s=t.right-e.x)&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?s=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0,e.physicsType===o.STATIC_BODY&&(t.blocked.none=!1,t.blocked.right=!0),t.physicsType===o.STATIC_BODY&&(e.blocked.none=!1,e.blocked.left=!0)):t._dxe._dy?r<(s=t.bottom-e.y)&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?s=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0,e.physicsType===o.STATIC_BODY&&(t.blocked.none=!1,t.blocked.down=!0),t.physicsType===o.STATIC_BODY&&(e.blocked.none=!1,e.blocked.up=!0)):t._dy=t.right||e.position.y>=t.bottom)}},function(t,e,i){var w={};t.exports=w;var o=i(88),b=i(101),a=i(249),h=i(102),l=i(540),u=i(44);w._warming=.4,w._torqueDampen=1,w._minLength=1e-6,w.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?b.add(e.bodyA.position,e.pointA):e.pointA,n=e.bodyB?b.add(e.bodyB.position,e.pointB):e.pointB,s=b.magnitude(b.sub(i,n));e.length=void 0!==e.length?e.length:s,e.id=e.id||u.nextId(),e.label=e.label||"Constraint",e.type="constraint",e.stiffness=e.stiffness||(0t&&(t=s.totalDuration),s.delayh.getTotalFrames()&&(s=0),r=h.frames[s],0!==s||this.forward||(r=h.getLastFrame()),this.currentFrame=r):console.warn("Missing animation: "+a),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){var i,n;return this.isPlaying?(i=this.nextAnim,n=this.nextAnimsQueue,i&&n.unshift(i),this.nextAnim=t,this._pendingStop=1,this._pendingStopValue=e):(this.delayCounter=e,this.play(t,!0)),this.parent},playAfterRepeat:function(t,e){var i,n;return void 0===e&&(e=1),this.isPlaying?(i=this.nextAnim,n=this.nextAnimsQueue,i&&n.unshift(i),-1!==this.repeatCounter&&e>this.repeatCounter&&(e=this.repeatCounter),this.nextAnim=t,this._pendingStop=2,this._pendingStopValue=e):this.play(t),this.parent},play:function(t,e){void 0===e&&(e=!1);var i=this.currentAnim,n=this.parent,s="string"==typeof t?t:t.key;if(e&&this.isPlaying&&i.key===s)return n;if(i&&this.isPlaying){var r=this.animationManager.getMix(i.key,t);if(0this.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))for(var n=0;this.forward?i.nextFrame(this):i.previousFrame(this),n++,this.accumulator>this.nextTick&&n<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(r.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)},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 s),this.anims.set(e,i))),i},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(r.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=a},function(t,e,i){var u={};t.exports=u;var n=i(250);u._motionWakeThreshold=.18,u._motionSleepThreshold=.08,u._minBias=.9,u.update=function(t,e){for(var i=e*e*e,n=0;n=o.sleepThreshold&&u.set(o,!0)):0u._motionWakeThreshold*i&&u.set(a,!1)))}},u.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"))}},function(t,e,i){var n={};t.exports=n;var u=i(44);n.on=function(t,e,i){for(var n,s=e.split(" "),r=0;r=t.right&&(o=1,r+=s-t.right,s=t.right);break;case 1:(r+=e)>=t.bottom&&(o=2,s-=r-t.bottom,r=t.bottom);break;case 2:(s-=e)<=t.left&&(o=3,r-=t.left-s,s=t.left);break;case 3:(r-=e)<=t.top&&(o=0,r=t.top)}return n}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;ne.length&&(r=e.length),i?(n=e[r-1][i],(s=e[r][i])-t<=t-n?e[r]:e[r-1]):(n=e[r-1],(s=e[r])-t<=t-n?s:n)}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=n,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0}});t.exports=n},function(t,e){t.exports=function(t){var i=/\D/g;return t.sort(function(t,e){return parseInt(t.replace(i,""),10)-parseInt(e.replace(i,""),10)}),t}},function(t,e,i){var n=i(170),s=i(0),r=i(121),o=i(12),a=i(120),h=i(21),T=i(2),d=i(6),f=i(171),p=i(301),l=new s({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 n,s=this.anims,r=this.mixes,o="string"==typeof t?t:t.key,a="string"==typeof e?e:e.key;return s.has(o)&&s.has(a)&&((n=(n=r.get(o))||{})[a]=i,r.set(o,n)),this},removeMix:function(t,e){var i,n=this.mixes,s="string"==typeof t?t:t.key,r=n.get(s);return r&&(e?(i="string"==typeof e?e:e.key,r.hasOwnProperty(i)&&delete r[i]):e||n.delete(s)),this},getMix:function(t,e){var i=this.mixes,n="string"==typeof t?t:t.key,s="string"==typeof e?e:e.key,r=i.get(n);return r&&r.hasOwnProperty(s)?r[s]:0},add:function(t,e){return this.anims.has(t)?console.warn("Animation key exists: "+t):(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(g,v){var m=[],t=this.game.cache.json.get(g);if(!t)return m;var y=this,e=d(t,"meta",null),x=d(t,"frames",null);return e&&x&&d(e,"frameTags",[]).forEach(function(t){var e=[],i=T(t,"name",null),n=T(t,"from",0),s=T(t,"to",0),r=T(t,"direction","forward");if(i&&(!v||v&&-1d.right&&(f=T(f,f+(e-d.right),this.lerp.x)),id.bottom&&(p=T(p,p+(i-d.bottom),this.lerp.y))):(f=T(f,e-l,this.lerp.x),p=T(p,i-u,this.lerp.y))),this.useBounds&&(f=this.clampX(f),p=this.clampY(p)),this.roundPixels&&(l=Math.round(l),u=Math.round(u));var g=(this.scrollX=f)+r,v=(this.scrollY=p)+o;this.midPoint.set(g,v);var m=n/a,y=s/a;this.worldView.setTo(g-m/2,v-y/2,m,y),h.applyITRS(this.x+l,this.y+u,this.rotation,a,a),h.translate(-l,-u),this.shakeEffect.preRender()},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,n,s,r){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===n&&(n=i),void 0===s&&(s=0),void 0===r&&(r=s),this._follow=t,this.roundPixels=e,i=u(i,0,1),n=u(n,0,1),this.lerp.set(i,n),this.followOffset.set(s,r);var o=this.width/2,a=this.height/2,h=t.x-s,l=t.y-r;return this.midPoint.set(h,l),this.scrollX=h-o,this.scrollY=l-a,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.clearRenderToTexture(),this.resetFX(),s.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=c},function(t,e,i){var o=i(32);t.exports=function(t){var e=new o;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,n){return e+e+i+i+n+n});var i,n,s,r=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return r&&(i=parseInt(r[1],16),n=parseInt(r[2],16),s=parseInt(r[3],16),e.setTo(i,n,s)),e}},function(t,e){t.exports=function(t,e,i,n){return n<<24|t<<16|e<<8|i}},function(t,e){t.exports=function(t,e,i,n){void 0===n&&(n={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var s=Math.min(t,e,i),r=Math.max(t,e,i),o=r-s,a=0,h=0===r?0:o/r,l=r;return r!==s&&(r===t?a=(e-i)/o+(e>>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}}},function(t,e,i){var n=i(32);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var a=i(32);t.exports=function(t){var e,i,n,s,r=new a,o=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());return o&&(e=parseInt(o[1],10),i=parseInt(o[2],10),n=parseInt(o[3],10),s=void 0!==o[4]?parseFloat(o[4]):1,r.setTo(e,i,n,255*s)),r}},function(t,e,i){t.exports={Fade:i(684),Flash:i(685),Pan:i(686),Shake:i(719),RotateTo:i(720),Zoom:i(721)}},function(t,e,i){t.exports={In:i(687),Out:i(688),InOut:i(689)}},function(t,e,i){t.exports={In:i(690),Out:i(691),InOut:i(692)}},function(t,e,i){t.exports={In:i(693),Out:i(694),InOut:i(695)}},function(t,e,i){t.exports={In:i(696),Out:i(697),InOut:i(698)}},function(t,e,i){t.exports={In:i(699),Out:i(700),InOut:i(701)}},function(t,e,i){t.exports={In:i(702),Out:i(703),InOut:i(704)}},function(t,e,i){t.exports=i(705)},function(t,e,i){t.exports={In:i(706),Out:i(707),InOut:i(708)}},function(t,e,i){t.exports={In:i(709),Out:i(710),InOut:i(711)}},function(t,e,i){t.exports={In:i(712),Out:i(713),InOut:i(714)}},function(t,e,i){t.exports={In:i(715),Out:i(716),InOut:i(717)}},function(t,e,i){t.exports=i(718)},function(t,e,i){var n=i(0),a=i(34),h=i(327),l=i(2),u=i(6),c=i(7),d=i(178),f=i(1),p=i(182),g=i(172),s=new n({initialize:function(t){void 0===t&&(t={});this.width=u(t,"width",1024),this.height=u(t,"height",768),this.zoom=u(t,"zoom",1),this.resolution=u(t,"resolution",1),this.parent=u(t,"parent",void 0),this.scaleMode=u(t,"scaleMode",0),this.expandParent=u(t,"expandParent",!0),this.autoRound=u(t,"autoRound",!1),this.autoCenter=u(t,"autoCenter",0),this.resizeInterval=u(t,"resizeInterval",500),this.fullscreenTarget=u(t,"fullscreenTarget",null),this.minWidth=u(t,"minWidth",0),this.maxWidth=u(t,"maxWidth",0),this.minHeight=u(t,"minHeight",0),this.maxHeight=u(t,"maxHeight",0);var e=u(t,"scale",null);e&&(this.width=u(e,"width",this.width),this.height=u(e,"height",this.height),this.zoom=u(e,"zoom",this.zoom),this.resolution=u(e,"resolution",this.resolution),this.parent=u(e,"parent",this.parent),this.scaleMode=u(e,"mode",this.scaleMode),this.expandParent=u(e,"expandParent",this.expandParent),this.autoRound=u(e,"autoRound",this.autoRound),this.autoCenter=u(e,"autoCenter",this.autoCenter),this.resizeInterval=u(e,"resizeInterval",this.resizeInterval),this.fullscreenTarget=u(e,"fullscreenTarget",this.fullscreenTarget),this.minWidth=u(e,"min.width",this.minWidth),this.maxWidth=u(e,"max.width",this.maxWidth),this.minHeight=u(e,"min.height",this.minHeight),this.maxHeight=u(e,"max.height",this.maxHeight)),this.renderType=u(t,"type",a.AUTO),this.canvas=u(t,"canvas",null),this.context=u(t,"context",null),this.canvasStyle=u(t,"canvasStyle",null),this.customEnvironment=u(t,"customEnvironment",!1),this.sceneConfig=u(t,"scene",null),this.seed=u(t,"seed",[(Date.now()*Math.random()).toString()]),d.RND=new d.RandomDataGenerator(this.seed),this.gameTitle=u(t,"title",""),this.gameURL=u(t,"url","https://phaser.io"),this.gameVersion=u(t,"version",""),this.autoFocus=u(t,"autoFocus",!0),this.domCreateContainer=u(t,"dom.createContainer",!1),this.domBehindCanvas=u(t,"dom.behindCanvas",!1),this.inputKeyboard=u(t,"input.keyboard",!0),this.inputKeyboardEventTarget=u(t,"input.keyboard.target",window),this.inputKeyboardCapture=u(t,"input.keyboard.capture",[]),this.inputMouse=u(t,"input.mouse",!0),this.inputMouseEventTarget=u(t,"input.mouse.target",null),this.inputMouseCapture=u(t,"input.mouse.capture",!0),this.inputTouch=u(t,"input.touch",h.input.touch),this.inputTouchEventTarget=u(t,"input.touch.target",null),this.inputTouchCapture=u(t,"input.touch.capture",!0),this.inputActivePointers=u(t,"input.activePointers",1),this.inputSmoothFactor=u(t,"input.smoothFactor",0),this.inputWindowEvents=u(t,"input.windowEvents",!0),this.inputGamepad=u(t,"input.gamepad",!1),this.inputGamepadEventTarget=u(t,"input.gamepad.target",window),this.disableContextMenu=u(t,"disableContextMenu",!1),this.audio=u(t,"audio"),this.hideBanner=!1===u(t,"banner",null),this.hidePhaser=u(t,"banner.hidePhaser",!1),this.bannerTextColor=u(t,"banner.text","#ffffff"),this.bannerBackgroundColor=u(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=u(t,"fps",null);var i=u(t,"render",t);this.antialias=u(i,"antialias",!0),this.antialiasGL=u(i,"antialiasGL",!0),this.mipmapFilter=u(i,"mipmapFilter","LINEAR"),this.desynchronized=u(i,"desynchronized",!1),this.roundPixels=u(i,"roundPixels",!1),this.pixelArt=u(i,"pixelArt",1!==this.zoom),this.pixelArt&&(this.antialias=!1,this.roundPixels=!0),this.transparent=u(i,"transparent",!1),this.clearBeforeRender=u(i,"clearBeforeRender",!0),this.premultipliedAlpha=u(i,"premultipliedAlpha",!0),this.failIfMajorPerformanceCaveat=u(i,"failIfMajorPerformanceCaveat",!1),this.powerPreference=u(i,"powerPreference","default"),this.batchSize=u(i,"batchSize",4096),this.maxTextures=u(i,"maxTextures",-1),this.maxLights=u(i,"maxLights",10);var n=u(t,"backgroundColor",0);this.backgroundColor=g(n),0===n&&this.transparent&&(this.backgroundColor.alpha=0),this.preBoot=u(t,"callbacks.preBoot",f),this.postBoot=u(t,"callbacks.postBoot",f),this.physics=u(t,"physics",{}),this.defaultPhysicsSystem=u(this.physics,"default",!1),this.loaderBaseURL=u(t,"loader.baseURL",""),this.loaderPath=u(t,"loader.path",""),this.loaderMaxParallelDownloads=u(t,"loader.maxParallelDownloads",32),this.loaderCrossOrigin=u(t,"loader.crossOrigin",void 0),this.loaderResponseType=u(t,"loader.responseType",""),this.loaderAsync=u(t,"loader.async",!0),this.loaderUser=u(t,"loader.user",""),this.loaderPassword=u(t,"loader.password",""),this.loaderTimeout=u(t,"loader.timeout",0),this.loaderWithCredentials=u(t,"loader.withCredentials",!1),this.installGlobalPlugins=[],this.installScenePlugins=[];var s=u(t,"plugins",null),r=p.DefaultScene;s&&(Array.isArray(s)?this.defaultPlugins=s:c(s)&&(this.installGlobalPlugins=l(s,"global",[]),this.installScenePlugins=l(s,"scene",[]),Array.isArray(s.default)?r=s.default:Array.isArray(s.defaultMerge)&&(r=r.concat(s.defaultMerge)))),this.defaultPlugins=r;var o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=u(t,"images.default",o+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=u(t,"images.missing",o+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),window&&(window.FORCE_WEBGL?this.renderType=a.WEBGL:window.FORCE_CANVAS&&(this.renderType=a.CANVAS))}});t.exports=s},function(t,e,i){t.exports={os:i(124),browser:i(125),features:i(177),input:i(752),audio:i(753),video:i(754),fullscreen:i(755),canvasFeatures:i(328)}},function(t,e,i){var n,s,r,o=i(26),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=(void 0!==document&&(a.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var i=new Image;i.onload=function(){var t=o.create(i,6,1).getContext("2d");if(t.globalCompositeOperation="multiply",t.drawImage(r,0,0),t.drawImage(i,2,0),!t.getImageData(2,0,1,1))return!1;var e=t.getImageData(2,0,1,1).data;o.remove(i),a.supportNewBlendModes=255===e[0]&&0===e[1]&&0===e[2]},i.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),a.supportInverseAlpha=function(){var t=o.create(this,2,1).getContext("2d");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);return i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3]}()),a)},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},function(t,e){t.exports=function(t){return 0<=(t%=2*Math.PI)?t:t+2*Math.PI}},function(t,e){t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return s*s+r*r}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),e-ir[0]&&(e=1),r[8]>r[3*e+e]&&(e=2),i=a[e],n=a[i],s=Math.sqrt(r[3*e+e]-r[3*i+i]-r[3*n+n]+1),h[e]=.5*s,s=.5/s,h[i]=(r[3*i+e]+r[3*e+i])*s,h[n]=(r[3*n+e]+r[3*e+n])*s,this.x=h[0],this.y=h[1],this.z=h[2],this.w=(r[3*n+i]-r[3*i+n])*s),this}});t.exports=d},function(t,e,a){var h=a(349),l=a(26),u=a(34),c=a(177);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===u.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==u.HEADLESS)if(e.renderType===u.CANVAS||e.renderType!==u.CANVAS&&!c.webGL){if(!c.canvas)throw new Error("Cannot create Canvas or WebGL context, aborting.");e.renderType=u.CANVAS}else e.renderType=u.WEBGL;e.antialias||l.disableSmoothing();var i,n,s=t.scale.baseSize,r=s.width,o=s.height;e.canvas?(t.canvas=e.canvas,t.canvas.width=r,t.canvas.height=o):t.canvas=l.create(t,r,o,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||h.setCrisp(t.canvas),e.renderType!==u.HEADLESS&&(i=a(531),n=a(534),e.renderType===u.WEBGL?t.renderer=new n(t):(t.renderer=new i(t),t.context=t.renderer.gameContext))}},function(t,e){t.exports={setCrisp:function(e){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach(function(t){e.style["image-rendering"]=t}),e.style.msInterpolationMode="nearest-neighbor",e},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},function(t,e,i){var l=i(34);t.exports=function(t){var e,i,n,s,r,o,a,h=t.config;h.hideBanner||(e="WebGL",h.renderType===l.CANVAS?e="Canvas":h.renderType===l.HEADLESS&&(e="Headless"),i=h.audio,a=!(n=t.device.audio).webAudio||i&&i.disableWebAudio?i&&i.noAudio||!n.webAudio&&!n.audioData?"No Audio":"HTML5 Audio":"Web Audio",t.device.browser.ie?window.console&&console.log("Phaser v"+l.VERSION+" / https://phaser.io"):(r=[s=""],Array.isArray(h.bannerBackgroundColor)?(h.bannerBackgroundColor.forEach(function(t){s=s.concat("%c "),r.push("background: "+t),o=t}),r[r.length-1]="color: "+h.bannerTextColor+"; background: "+o):(s=s.concat("%c "),r.push("color: "+h.bannerTextColor+"; background: "+h.bannerBackgroundColor)),r.push("background: #fff"),h.gameTitle&&(s=s.concat(h.gameTitle),h.gameVersion&&(s=s.concat(" v"+h.gameVersion)),h.hidePhaser||(s=s.concat(" / "))),h.hidePhaser||(s=s.concat("Phaser v"+l.VERSION+" ("+e+" | "+a+")")),s=s.concat(" %c "+h.gameURL),r[0]=s,console.log.apply(console,r)))}},function(t,e,i){var n=i(0),s=i(6),r=i(1),o=i(352),a=new n({initialize:function(t,e){this.game=t,this.raf=new o,this.started=!1,this.running=!1,this.minFps=s(e,"min",5),this.targetFps=s(e,"target",60),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=s(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=s(e,"deltaHistory",10),this.panicMax=s(e,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=s(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;for(var e=this.framesThisSecond=0;ethis._min&&(r=n[i],r=Math.min(r,this._min)),n[i]=r,this.deltaIndex++,this.deltaIndex>s&&(this.deltaIndex=0);for(var a=o=0;athis.nextFpsUpdate&&(this.actualFps=.25*this.framesThisSecond+.75*this.actualFps,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0),this.framesThisSecond++;var h=o/this._target;this.callback(t,o,h),this.lastTime=t,this.frame++},tick:function(){this.step()},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){this.running||(t&&(this.startTime+=-this.lastTime+(this.lastTime+window.performance.now())),this.raf.start(this.step.bind(this),this.useRAF),this.running=!0,this.step())},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.callback=r,this.raf=null,this.game=null}});t.exports=a},function(t,e,i){var n=i(0),s=i(1),r=new n({initialize:function(){this.isRunning=!1,this.callback=s,this.tick=0,this.isSetTimeOut=!1,this.timeOutID=null,this.lastTime=0,this.target=0;var n=this;this.step=function t(){var e=window.performance.now();n.lastTime=n.tick,n.tick=e,n.callback(e),n.timeOutID=window.requestAnimationFrame(t)},this.stepTimeout=function t(){var e=Date.now(),i=Math.min(Math.max(2*n.target+n.tick-e,0),n.target);n.lastTime=n.tick,n.tick=e,n.callback(e),n.timeOutID=window.setTimeout(t,i)}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.target=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=s}});t.exports=r},function(t,e,i){var n=i(21);t.exports=function(t){var e,i=t.events;void 0!==document.hidden?e="visibilitychange":["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(n.HIDDEN):i.emit(n.VISIBLE)},!1),window.onblur=function(){i.emit(n.BLUR)},window.onfocus=function(){i.emit(n.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},function(t,e,i){var m=i(355),y=i(26),x=i(6);t.exports=function(t){var e=x(t,"data",[]),i=x(t,"canvas",null),n=x(t,"palette",m),s=x(t,"pixelWidth",1),r=x(t,"pixelHeight",s),o=x(t,"resizeCanvas",!0),a=x(t,"clearCanvas",!0),h=x(t,"preRender",null),l=x(t,"postRender",null),u=Math.floor(Math.abs(e[0].length*s)),c=Math.floor(Math.abs(e.length*r));i||(i=y.create2D(this,u,c),a=o=!1),o&&(i.width=u,i.height=c);var d=i.getContext("2d");a&&d.clearRect(0,0,u,c),h&&h(i,d);for(var f=0;fi.length-2?i.length-1:s+1],l=i[s>i.length-3?i.length-1:s+2];return e.set(u(r,o.x,a.x,h.x,l.x),u(r,o.y,a.y,h.y,l.y))},toJSON:function(){for(var t=[],e=0;ei.width?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE;if("number"==typeof window.orientation)return 0===window.orientation||180===window.orientation?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return s.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return s.ORIENTATION.LANDSCAPE}return tthis.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var e=this.listeners;window.removeEventListener("orientationchange",e.orientationChange,!1),window.removeEventListener("resize",e.windowResize,!1);["webkit","moz",""].forEach(function(t){document.removeEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.removeEventListener(t+"fullscreenerror",e.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",e.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===c.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===c.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=v},function(t,e,i){var n=i(17),s=i(0),r=i(94),o=i(3),a=new s({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=null),this._width=t,this._height=e,this._parent=n,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=n(t,0,this.maxWidth),this.minHeight=n(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=n(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=n(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=n(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=n(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 n=this.snapTo,s=0===e?1:t/e;return i&&this.aspectRatio>s||!i&&this.aspectRatios)&&(t=(e=r(e,n.y))*this.aspectRatio,0r.START&&n.settings.status<=r.RUNNING&&n.step(t,e)}},render:function(t){for(var e=0;e=r.LOADING&&i.settings.status=r.x&&t=r.y&&e=r.x&&t=r.y&&e=n-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-n),s=this.audio.currentTime):s>4,l[a++]=(15&i)<<4|n>>2,l[a++]=(3&n)<<6|63&s;return h}},function(t,e,i){var n=i(135),s=i(0),r=i(61),o=new s({Extends:n,initialize:function(t,e,i){if(void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),!this.audioBuffer)throw new Error('There is no audio asset with key "'+e+'" in the audio cache');this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,n.call(this,t,e,i)},play:function(t,e){return!!n.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(r.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime>>16,v=(65280&d)>>>8,m=255&d,l.strokeStyle="rgba("+g+","+v+","+m+","+u+")",l.lineWidth=p,y+=3;break;case x.FILL_STYLE:f=a[y+1],c=a[y+2],g=(16711680&f)>>>16,v=(65280&f)>>>8,m=255&f,l.fillStyle="rgba("+g+","+v+","+m+","+c+")",y+=2;break;case x.BEGIN_PATH:l.beginPath();break;case x.CLOSE_PATH:l.closePath();break;case x.FILL_PATH:o||l.fill();break;case x.STROKE_PATH:o||l.stroke();break;case x.FILL_RECT:o?l.rect(a[y+1],a[y+2],a[y+3],a[y+4]):l.fillRect(a[y+1],a[y+2],a[y+3],a[y+4]),y+=4;break;case x.FILL_TRIANGLE:l.beginPath(),l.moveTo(a[y+1],a[y+2]),l.lineTo(a[y+3],a[y+4]),l.lineTo(a[y+5],a[y+6]),l.closePath(),o||l.fill(),y+=6;break;case x.STROKE_TRIANGLE:l.beginPath(),l.moveTo(a[y+1],a[y+2]),l.lineTo(a[y+3],a[y+4]),l.lineTo(a[y+5],a[y+6]),l.closePath(),o||l.stroke(),y+=6;break;case x.LINE_TO:l.lineTo(a[y+1],a[y+2]),y+=2;break;case x.MOVE_TO:l.moveTo(a[y+1],a[y+2]),y+=2;break;case x.LINE_FX_TO:l.lineTo(a[y+1],a[y+2]),y+=5;break;case x.MOVE_FX_TO:l.moveTo(a[y+1],a[y+2]),y+=5;break;case x.SAVE:l.save();break;case x.RESTORE:l.restore();break;case x.TRANSLATE:l.translate(a[y+1],a[y+2]),y+=2;break;case x.SCALE:l.scale(a[y+1],a[y+2]),y+=2;break;case x.ROTATE:l.rotate(a[y+1]),y+=1;break;case x.GRADIENT_FILL_STYLE:y+=5;break;case x.GRADIENT_LINE_STYLE:y+=6;break;case x.SET_TEXTURE:y+=2}}l.restore()}}},function(t,e,i){var n=i(0),s=i(126),r=i(71),o=i(2),a=i(59),h=new n({initialize:function(t,e,i,n){void 0===n&&(n=!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=n,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,e,i,n=this.propertyValue,s=typeof n;return"number"==s?(this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate):Array.isArray(n)?this.onEmit=this.randomStaticValueEmit:"function"==s?this.emitOnly?this.onEmit=n:this.onUpdate=n:"object"==s&&(this.has(n,"random")||this.hasBoth(n,"start","end")||this.hasBoth(n,"min","max"))?(this.start=this.has(n,"start")?n.start:n.min,this.end=this.has(n,"end")?n.end:n.max,(t=this.hasBoth(n,"min","max")||!!n.random)&&(e=n.random,Array.isArray(e)&&(this.start=e[0],this.end=e[1]),this.onEmit=this.randomRangedValueEmit),this.has(n,"steps")?(this.steps=n.steps,this.counter=this.start,this.onEmit=this.steppedEmit):(i=this.has(n,"ease")?n.ease:"Linear",this.ease=r(i),t||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate)):"object"==s&&this.hasEither(n,"onEmit","onUpdate")&&(this.has(n,"onEmit")&&(this.onEmit=n.onEmit),this.has(n,"onUpdate")&&(this.onUpdate=n.onUpdate)),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,n){return n},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=s(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){var i;return t&&t.data[e]&&((i=t.data[e]).min=this.start,i.max=this.end),this.start},easeValueUpdate:function(t,e,i){var n=t.data[e];return(n.max-n.min)*this.ease(i)+n.min}});t.exports=h},function(t,e,i){var n=i(0),o=i(2),s=new n({initialize:function(t,e,i,n,s){var r;"object"==typeof t?(t=o(r=t,"x",0),e=o(r,"y",0),i=o(r,"power",0),n=o(r,"epsilon",100),s=o(r,"gravity",50)):(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=100),void 0===s&&(s=50)),this.x=t,this.y=e,this.active=!0,this._gravity=s,this._power=0,this._epsilon=0,this.power=i,this.epsilon=n},update:function(t,e){var i,n,s=this.x-t.x,r=this.y-t.y,o=s*s+r*r;0!==o&&(i=Math.sqrt(o),oe.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(0this._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=n},function(t,e){t.exports=function(t,e){for(var i=0;id.PI2?s=d.PI2:s<0&&(s=d.PI2+s%d.PI2);for(var a,h=[r+Math.cos(n)*i,o+Math.sin(n)*i];e<1;)a=s*e+n,h.push(r+Math.cos(a)*i,o+Math.sin(a)*i),e+=t;return a=s+n,h.push(r+Math.cos(a)*i,o+Math.sin(a)*i),h.push(r+Math.cos(n)*i,o+Math.sin(n)*i),this.pathIndexes=u(h),this.pathData=h,this}});t.exports=r},function(t,e,i){var n=i(0),s=i(1019),r=i(60),o=i(9),a=i(30),h=new n({Extends:a,Mixins:[s],initialize:function(t,e,i,n,s,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Curve",n),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(e,i),void 0!==s&&this.setFillStyle(s,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=[],n=this.geom.getPoints(e),s=0;st.right||e.rightt.bottom||e.bottome.right||t.righte.bottom||t.bottome.right||t.righte.bottom||t.bottomt.width*t.height)&&(e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(s.BUTTON_DOWN,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(s.BUTTON_UP,e,this,t),this.pad.emit(s.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=r},function(t,e,i){var a=i(471),h=i(472),n=i(0),l=i(12),u=i(3),s=new n({Extends:l,initialize:function(t,e){l.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],n=0;n=s;for(this.fixedStep||(n=.001*e,o=!0,this._elapsed=0),h=0;h=s;)this._elapsed-=s,this.step(n)}},step:function(t){for(var e,i=this.bodies.entries,n=i.length,s=0;sc)&&(d.xu))return this.separateCircle(t,e,s)}var f=!1,p=!1;s?(f=A(t,e,s,this.OVERLAP_BIAS),p=C(t,e,s,this.OVERLAP_BIAS)):this.forceX||Math.abs(this.gravity.y+t.gravity.y)=e.right||t.position.y>=e.bottom))},circleBodyIntersects:function(t,e){var i=p(t.center.x,e.left,e.right),n=p(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-n)*(t.center.y-n)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!0)},collide:function(t,e,i,n,s){return void 0===i&&(i=null),void 0===n&&(n=null),void 0===s&&(s=i),this.collideObjects(t,e,i,n,s,!1)},collideObjects:function(t,e,i,n,s,r){var o;t.isParent&&void 0===t.physicsType&&(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var a=Array.isArray(t),h=Array.isArray(e);if(this._total=0,a||h)if(!a&&h)for(o=0;od.baseTileWidth&&(h-=a=(d.tileWidth-d.baseTileWidth)*e.scaleX,u+=a),d.tileHeight>d.baseTileHeight&&(c+=(d.tileHeight-d.baseTileHeight)*e.scaleY);var f=e.getTilesWithinWorldXY(h,l,u,c);return 0!==f.length&&this.collideSpriteVsTilesHandler(t,f,i,n,s,r,!0)},collideSpriteVsTilesHandler:function(t,e,i,n,s,r,o){for(var a,h,l=t.body,u={left:0,right:0,top:0,bottom:0},c=!1,d=0;de.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=n,r=this.blocked.right=!0),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=s,r=this.blocked.down=!0),r&&(this.blocked.none=!1),r},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this.updateCenter(),this},setSize:function(t,e,i){void 0===i&&(i=!0);var n,s,r=this.gameObject;return!t&&r.frame&&(t=r.frame.realWidth),!e&&r.frame&&(e=r.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&&r.getCenter&&(n=(r.width-t)/2,s=(r.height-e)/2,this.offset.set(n,s)),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),0=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 0=t.minX&&e.maxY>=t.minY}function p(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,s){for(var r,o=[e,i];o.length;)(i=o.pop())-(e=o.pop())<=n||(r=e+Math.ceil((i-e)/n/2)*n,a(t,r,e,i,s),o.push(e,r,r,i))}n.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!l(t,e))return i;for(var s,r,o,a,h=[];e;){for(s=0,r=e.children.length;sthis._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var r=this._chooseSplitIndex(i,s,n),o=p(i.children.splice(r,i.children.length-r));o.height=i.height,o.leaf=i.leaf,f(i,this.toBBox),f(o,this.toBBox),e?t[e-1].children.push(o):this._splitRoot(i,o)},_splitRoot:function(t,e){this.data=p([t,e]),this.data.height=t.height+1,this.data.leaf=!1,f(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){for(var n,s,r,o,a,h,l,u,c,d,f,p,g=a=1/0,v=e;v<=i-e;v++)n=m(t,0,v,this.toBBox),s=m(t,v,i,this.toBBox),l=n,u=s,p=f=d=c=void 0,c=Math.max(l.minX,u.minX),d=Math.max(l.minY,u.minY),f=Math.min(l.maxX,u.maxX),p=Math.min(l.maxY,u.maxY),r=Math.max(0,f-c)*Math.max(0,p-d),o=y(n)+y(s),re.deltaAbsY()?g=-1:e.deltaAbsX()i&&s<(o=t.right-i)&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:c(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):0i&&s<(o=t.bottom-i)&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:c(t,o)),o}},function(t,e){t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):0=r.layers.length){if(s.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}r=s.pop()}else{var o,a=r.layers[r.i];if(r.i++,"tilelayer"===a.type)if(a.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+a.name+"'");else{if(a.encoding&&"base64"===a.encoding){if(a.chunks)for(var h=0;h>>0;return n}},function(t,e,i){var h=i(2),l=i(153);t.exports=function(t){for(var e=[],i=[],n=l(t);n.i=n.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}n=i.pop()}else{var s,r,o,a=n.layers[n.i];n.i++,"imagelayer"===a.type?(s=h(a,"offsetx",0)+h(a,"startx",0),r=h(a,"offsety",0)+h(a,"starty",0),e.push({name:n.name+a.name,image:a.image,x:n.x+s+a.x,y:n.y+r+a.y,alpha:n.opacity*a.opacity,visible:n.visible&&a.visible,properties:h(a,"properties",{})})):"group"===a.type&&(o=l(t,a,n),i.push(n),n=o)}return e}},function(t,e,i){var x=i(106),T=i(512),w=i(237);t.exports=function(t){for(var e,i=[],n=[],s=null,r=0;r=this.firstgid&&t=n.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}n=i.pop()}else{var s,r=n.layers[n.i];if(n.i++,r.opacity*=n.opacity,r.visible=n.visible&&r.visible,"objectgroup"===r.type){r.name=n.name+r.name;for(var o=n.x+d(r,"startx",0)+d(r,"offsetx",0),a=n.y+d(r,"starty",0)+d(r,"offsety",0),h=[],l=0;ln&&(n=e.layer[r].width),e.layer[r].height>s&&(s=e.layer[r].height);var o=new h({width:n,height:s,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:a.WELTMEISTER});return o.layers=l(e,i),o.tilesets=u(e),o}},function(t,e,i){var d=i(104),f=i(75);t.exports=function(t,e){for(var i=[],n=0;nx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(1===m)for(h=0;hx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(2===m)for(h=f-1;0<=h;h--)for(l=0;lx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));else if(3===m)for(h=f-1;0<=h;h--)for(l=d-1;0<=l;l--)!(a=v[h][l])||a.indexx||!a.visible||(T=this.batchTile(T,a,c,p,g,t,e));return this.dirty[e]=!1,null===r&&(r=n.createVertexBuffer(o,s.STATIC_DRAW),this.vertexBuffer[e]=r),n.setVertexBuffer(r),i.setAttribPointers(),s.bufferSubData(s.ARRAY_BUFFER,0,o),this},batchTile:function(t,e,i,n,s,r,o){var a=i.getTileTextureCoordinates(e.index);if(!a)return t;var h=i.tileWidth,l=i.tileHeight,u=h/2,c=l/2,d=a.x/n,f=a.y/s,p=(a.x+h)/n,g=(a.y+l)/s,v=this._tempMatrix,m=-u,y=-c;e.flipX&&(h*=-1,m+=i.tileWidth),e.flipY&&(l*=-1,y+=i.tileHeight);var x=m+h,T=y+l;v.applyITRS(u+e.pixelX,c+e.pixelY,e.rotation,1,1);var w=L.getTintAppendFloatAlpha(16777215,r.alpha*this.alpha*e.alpha),b=v.getX(m,y),E=v.getY(m,y),S=v.getX(m,T),_=v.getY(m,T),A=v.getX(x,T),C=v.getY(x,T),M=v.getX(x,y),P=v.getY(x,y);r.roundPixels&&(b=Math.round(b),E=Math.round(E),S=Math.round(S),_=Math.round(_),A=Math.round(A),C=Math.round(C),M=Math.round(M),P=Math.round(P));var O=this.vertexViewF32[o],R=this.vertexViewU32[o];return O[++t]=b,O[++t]=E,O[++t]=d,O[++t]=f,O[++t]=0,O[++t]=0,R[++t]=w,O[++t]=S,O[++t]=_,O[++t]=d,O[++t]=g,O[++t]=0,O[++t]=0,R[++t]=w,O[++t]=A,O[++t]=C,O[++t]=p,O[++t]=g,O[++t]=0,O[++t]=0,R[++t]=w,O[++t]=b,O[++t]=E,O[++t]=d,O[++t]=f,O[++t]=0,O[++t]=0,R[++t]=w,O[++t]=A,O[++t]=C,O[++t]=p,O[++t]=g,O[++t]=0,O[++t]=0,R[++t]=w,O[++t]=M,O[++t]=P,O[++t]=p,O[++t]=f,O[++t]=0,O[++t]=0,R[++t]=w,this.vertexCount[o]+=6,t},setRenderOrder:function(t){if("string"==typeof t&&(t=["right-down","left-down","right-up","left-up"].indexOf(t)),0<=t&&t<4){this._renderOrder=t;for(var e=0;ethis.vertexCapacity&&(this.flush(),x=!0,y=this.setTexture2D(m));var T=this.vertexViewF32,w=this.vertexViewU32,b=this.vertexCount*this.vertexComponentCount-1;return T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=v,w[++b]=d,T[++b]=i,T[++b]=n,T[++b]=h,T[++b]=c,T[++b]=v,w[++b]=p,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=v,w[++b]=g,T[++b]=t,T[++b]=e,T[++b]=h,T[++b]=l,T[++b]=v,w[++b]=d,T[++b]=s,T[++b]=r,T[++b]=u,T[++b]=c,T[++b]=v,w[++b]=g,T[++b]=o,T[++b]=a,T[++b]=u,T[++b]=l,T[++b]=v,w[++b]=f,this.vertexCount+=6,x},batchTri:function(t,e,i,n,s,r,o,a,h,l,u,c,d,f,p,g){void 0===g&&(g=this.currentUnit);var v=!1;this.vertexCount+3>this.vertexCapacity&&(this.flush(),v=!0,g=this.setTexture2D(p));var m=this.vertexViewF32,y=this.vertexViewU32,x=this.vertexCount*this.vertexComponentCount-1;return m[++x]=t,m[++x]=e,m[++x]=o,m[++x]=a,m[++x]=f,y[++x]=u,m[++x]=i,m[++x]=n,m[++x]=o,m[++x]=l,m[++x]=f,y[++x]=c,m[++x]=s,m[++x]=r,m[++x]=h,m[++x]=l,m[++x]=f,y[++x]=d,this.vertexCount+=3,v},bind:function(t){return void 0===t&&(t=!1),l.prototype.bind.call(this,t),this}});t.exports=u},function(t,e,i){var n={};t.exports=n;var r=i(101),o=i(44);n.fromVertices=function(t){for(var e={},i=0;i>>0;if("function"!=typeof t)throw new TypeError;for(var n=2<=arguments.length?arguments[1]:void 0,s=0;sthis.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.zoom<.001&&(e.zoom=.001)))},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},function(t,e,i){t.exports={Camera:i(305),BaseCamera:i(92),CameraManager:i(722),Effects:i(313),Events:i(42)}},function(t,e){t.exports="cameradestroy"},function(t,e){t.exports="camerafadeincomplete"},function(t,e){t.exports="camerafadeinstart"},function(t,e){t.exports="camerafadeoutcomplete"},function(t,e){t.exports="camerafadeoutstart"},function(t,e){t.exports="cameraflashcomplete"},function(t,e){t.exports="cameraflashstart"},function(t,e){t.exports="camerapancomplete"},function(t,e){t.exports="camerapanstart"},function(t,e){t.exports="postrender"},function(t,e){t.exports="prerender"},function(t,e){t.exports="camerarotatecomplete"},function(t,e){t.exports="camerarotatestart"},function(t,e){t.exports="camerashakecomplete"},function(t,e){t.exports="camerashakestart"},function(t,e){t.exports="camerazoomcomplete"},function(t,e){t.exports="camerazoomstart"},function(t,e,i){var n=i(17),s=i(0),l=i(42),r=new s({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,n,s,r,o,a){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===r&&(r=!1),void 0===o&&(o=null),void 0===a&&(a=this.camera.scene),!r&&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=n,this.blue=s,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=o,this._onUpdateScope=a;var h=t?l.FADE_OUT_START:l.FADE_IN_START;return this.camera.emit(h,this.camera,this,e,i,n,s),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsedthis.source?Math.abs(this.destination-this.source):Math.abs(this.destination+h)-this.source)<(u=this.source>this.destination?Math.abs(this.source-this.destination):Math.abs(this.source+h)-this.destination)?this.clockwise=!0:uMath.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},function(t,e,i){var n=i(126);t.exports=function(){return n(-Math.PI,Math.PI)}},function(t,e,i){var n=i(126);t.exports=function(){return n(-180,180)}},function(t,e,i){var n=i(331);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(13);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(e>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return 2.3283064365386963e-10*((this.n=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;e=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}s++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],n=0;n=i){var r=n[s]-i,o=this.curves[s],a=o.getLength(),h=0===a?0:1-r/a;return o.getTangentAt(h,e)}s++}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 r([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 o(t.x,t.y)):this.add(new o(t,e))},toJSON:function(){for(var t=[],e=0;e>16&255,g:t>>8&255,b:255&t,a:255};return 16777215>>24),e}},function(t,e,i){var h=i(32),l=i(365);t.exports=function(t,e,i){var n,s,r=i,o=i,a=i;return 0!==e&&(r=l(s=2*i-(n=i<.5?i*(1+e):i+e-i*e),n,t+1/3),o=l(s,n,t),a=l(s,n,t-1/3)),(new h).setGLTo(r,o,a,1)}},function(t,e,i){var s=i(174);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}},function(t,e,i){function o(t,e,i,n,s,r,o,a){void 0===o&&(o=100),void 0===a&&(a=0);var h=a/o;return{r:l(t,n,h),g:l(e,s,h),b:l(i,r,h)}}var l=i(123);t.exports={RGBWithRGB:o,ColorWithRGB:function(t,e,i,n,s,r){return void 0===s&&(s=100),void 0===r&&(r=0),o(t.r,t.g,t.b,e,i,n,s,r)},ColorWithColor:function(t,e,i,n){return void 0===i&&(i=100),void 0===n&&(n=0),o(t.r,t.g,t.b,e.r,e.g,e.b,i,n)}}},function(t,e,i){var n=i(180),s=i(32);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new s(n(t,e),n(t,e),n(t,e))}},function(t,e,i){var r=i(364);t.exports=function(t,e,i,n,s){return void 0===n&&(n=255),void 0===s&&(s="#"),"#"===s?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1):"0x"+r(n)+r(t)+r(e)+r(i)}},function(t,e,i){t.exports={BitmapMask:i(286),GeometryMask:i(287)}},function(t,e,i){var n={AddToDOM:i(130),DOMContentLoaded:i(366),GetInnerHeight:i(367),GetScreenOrientation:i(368),GetTarget:i(373),ParseXML:i(374),RemoveFromDOM:i(186),RequestAnimationFrame:i(352)};t.exports=n},function(t,e,i){t.exports={EventEmitter:i(845)}},function(t,e,i){var n=i(0),s=i(12),r=i(23),o=new n({Extends:s,initialize:function(){s.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",o,"events"),t.exports=o},function(t,e,i){var n=i(130),s=i(300),r=i(304),o=i(26),a=i(0),h=i(326),l=i(847),u=i(348),c=i(118),d=i(350),f=i(327),p=i(366),g=i(12),v=i(21),m=i(375),y=i(23),x=i(380),T=i(381),w=i(383),b=i(129),E=i(388),S=i(351),_=i(353),A=i(392),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 g,this.anims=new s(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=f,this.scale=new T(this,this.config),this.sound=null,this.sound=A.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,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),n(this.canvas,this.config.parent),this.textures.once(b.READY,this.texturesReady,this),this.events.emit(v.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(v.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)),_(this);var t=this.events;t.on(v.HIDDEN,this.onHidden,this),t.on(v.VISIBLE,this.onVisible,this),t.on(v.BLUR,this.onBlur,this),t.on(v.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e);var n=this.renderer;n.preRender(),i.emit(v.PRE_RENDER,n,t,e),this.scene.render(n),n.postRender(),i.emit(v.POST_RENDER,n,t,e)},headlessStep:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(v.PRE_STEP,t,e),i.emit(v.STEP,t,e),this.scene.update(t,e),i.emit(v.POST_STEP,t,e),i.emit(v.PRE_RENDER),i.emit(v.POST_RENDER)},onHidden:function(){this.loop.pause(),this.events.emit(v.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(v.RESUME)},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(v.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},function(t,e,i){var n=i(130);t.exports=function(t){var e,i=t.config;i.parent&&i.domCreateContainer&&((e=document.createElement("div")).style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: none;","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=e,n(e,i.parent))}},function(t,e){t.exports="boot"},function(t,e){t.exports="destroy"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameout"},function(t,e){t.exports="gameover"},function(t,e){t.exports="gameobjectdown"},function(t,e){t.exports="dragend"},function(t,e){t.exports="dragenter"},function(t,e){t.exports="drag"},function(t,e){t.exports="dragleave"},function(t,e){t.exports="dragover"},function(t,e){t.exports="dragstart"},function(t,e){t.exports="drop"},function(t,e){t.exports="gameobjectmove"},function(t,e){t.exports="gameobjectout"},function(t,e){t.exports="gameobjectover"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="wheel"},function(t,e){t.exports="gameobjectup"},function(t,e){t.exports="gameobjectwheel"},function(t,e){t.exports="boot"},function(t,e){t.exports="process"},function(t,e){t.exports="update"},function(t,e){t.exports="pointerdown"},function(t,e){t.exports="pointerdownoutside"},function(t,e){t.exports="pointermove"},function(t,e){t.exports="pointerout"},function(t,e){t.exports="pointerover"},function(t,e){t.exports="pointerup"},function(t,e){t.exports="pointerupoutside"},function(t,e){t.exports="wheel"},function(t,e){t.exports="pointerlockchange"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="start"},function(t,e){t.exports="update"},function(t,e){t.exports="addfile"},function(t,e){t.exports="complete"},function(t,e){t.exports="filecomplete"},function(t,e){t.exports="filecomplete-"},function(t,e){t.exports="loaderror"},function(t,e){t.exports="load"},function(t,e){t.exports="fileprogress"},function(t,e){t.exports="postprocess"},function(t,e){t.exports="progress"},function(t,e){t.exports="start"},function(t,e,i){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"}},function(t,e){t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var s=i.getElementsByTagName("SubTexture"),r=0;r=t.length)throw new Error("Supplied index out of bounds");return n!==i&&(t.splice(n,1),t.splice(i,0,e)),e}},function(t,e){t.exports=function(t,e){var i,n,s=t.indexOf(e);return-1!==s&&st.length-1)throw new Error("Index out of bounds");var s=r(t,e);return i&&i.call(n,s),s}},function(t,e,i){var l=i(70);t.exports=function(t,e,i,n,s){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===s&&(s=t),l(t,e,i)){var r=i-e,o=t.splice(e,r);if(n)for(var a=0;a?@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"}},function(t,e,i){var T=i(6);t.exports=function(t,e){var i=e.width,n=e.height,s=Math.floor(i/2),r=Math.floor(n/2),o=T(e,"chars","");if(""!==o){var a=T(e,"image",""),h=T(e,"offset.x",0),l=T(e,"offset.y",0),u=T(e,"spacing.x",0),c=T(e,"spacing.y",0),d=T(e,"lineSpacing",0),f=T(e,"charsPerRow",null);null===f&&(f=t.sys.textures.getFrame(a).width/i)>o.length&&(f=o.length);for(var p=h,g=l,v={retroFont:!0,font:a,size:i,lineHeight:n+d,chars:{}},m=0,y=0;yr.vertexCapacity&&r.flush();for(var g=r.setGameObject(e),v=r.vertexViewF32,m=r.vertexViewU32,y=r.vertexCount*r.vertexComponentCount-1,x=0,T=e.tintFill,w=0;w=i&&t.x<=n&&t.y>=s&&t.y<=r}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===r&&(r=0),!(e>t.right+r||it.bottom+r||s=n&&(p.push(v),f=v)}var m=o[o.length-1];return y(f,m)i&&(i=a.x),a.xs&&(s=a.y),a.yn(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)}},function(t,e){t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},function(t,e){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}},function(t,e,i){var r=i(9);t.exports=function(t,e,i,n,s){return void 0===s&&(s=new r),s.setTo(Math.min(t,i),Math.min(e,n),Math.abs(t-i),Math.abs(e-n))}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.centerX,e.y=t.centerY,e}},function(t,e,i){var n=i(4);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.width,e.y=t.height,e}},function(t,e,i){var r=i(176);t.exports=function(t,e,i){var n=t.centerX,s=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),r(t,n,s)}},function(t,e,i){var n=i(9),s=i(142);t.exports=function(t,e,i){return void 0===i&&(i=new n),s(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}},function(t,e){t.exports=function(t,e){for(var i=t.x,n=t.right,s=t.y,r=t.bottom,o=0;oe.x&&t.ye.y}},function(t,e,i){var a=i(4),h=i(41);t.exports=function(t,e,i){void 0===i&&(i=new a),e=h(e);var n=Math.sin(e),s=Math.cos(e),r=0=s||0=t.downTime+n)&&(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;it._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,n=0;n'),i.push(''),i.push(''),i.push(this.xhrLoader.responseText),i.push(""),i.push(""),i.push("");var n=[i.join("\n")],s=this;try{var r=new window.Blob(n,{type:"image/svg+xml;charset=utf-8"})}catch(t){return s.state=o.FILE_ERRORED,void s.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){l.revokeObjectURL(s.data),s.onProcessComplete()},this.data.onerror=function(){l.revokeObjectURL(s.data),s.onProcessError()},l.createObjectURL(this.data,r,"image/svg+xml")},addToCache:function(){var t=this.cache.addImage(this.key,this.data);this.pendingDestroy(t)}});s.register("htmlTexture",function(t,e,i,n,s){if(Array.isArray(t))for(var r=0;r=n[2];if("^"===i.operator)return 0=i.number:0=n[2]:r[2]===n[2]}return t===e||"*"===t}},function(t,e,i){var n={};t.exports=n;var s=i(156),r=(i(232),i(44));n.create=function(t){var e=s.create(),i={label:"World",gravity:{x:0,y:1,scale:.001},bounds:{min:{x:-1/0,y:-1/0},max:{x:1/0,y:1/0}}};return r.extend(e,i,t)}},function(t,e,i){var y={};t.exports=y;var a=i(500),n=i(542),r=i(44);y.create=function(t){var e={controller:y,detector:n.collisions,buckets:{},pairs:{},pairsList:[],bucketWidth:48,bucketHeight:48};return r.extend(e,t)},y.update=function(t,e,i,n){for(var s,r,o,a=i.world,h=t.buckets,l=!1,u=i.metrics,c=u.broadphaseTests=0;ca.bounds.max.x||d.bounds.max.ya.bounds.max.y)){var f=y._getRegion(t,d);if(!d.region||f.id!==d.region.id||n){u.broadphaseTests+=1,d.region&&!n||(d.region=f);for(var p=y._regionUnion(f,d.region),g=p.startCol;g<=p.endCol;g++)for(s=p.startRow;s<=p.endRow;s++){r=h[o=y._getBucketId(g,s)];var v=g>=f.startCol&&g<=f.endCol&&s>=f.startRow&&s<=f.endRow,m=g>=d.region.startCol&&g<=d.region.endCol&&s>=d.region.startRow&&s<=d.region.endRow;!v&&m&&m&&r&&y._bucketRemoveBody(t,r,d),(d.region===f||v&&!m||n)&&(r=r||y._createBucket(h,o),y._bucketAddBody(t,r,d))}d.region=f,l=!0}}}l&&(t.pairsList=y._createActivePairsList(t))},y.clear=function(t){t.buckets={},t.pairs={},t.pairsList=[]},y._regionUnion=function(t,e){var i=Math.min(t.startCol,e.startCol),n=Math.max(t.endCol,e.endCol),s=Math.min(t.startRow,e.startRow),r=Math.max(t.endRow,e.endRow);return y._createRegion(i,n,s,r)},y._getRegion=function(t,e){var i=e.bounds,n=Math.floor(i.min.x/t.bucketWidth),s=Math.floor(i.max.x/t.bucketWidth),r=Math.floor(i.min.y/t.bucketHeight),o=Math.floor(i.max.y/t.bucketHeight);return y._createRegion(n,s,r,o)},y._createRegion=function(t,e,i,n){return{id:t+","+e+","+i+","+n,startCol:t,endCol:e,startRow:i,endRow:n}},y._getBucketId=function(t,e){return"C"+t+"R"+e},y._createBucket=function(t,e){return t[e]=[]},y._bucketAddBody=function(t,e,i){for(var n=0;nl._pairMaxIdleLife&&a.push(h);for(h=0;hu.friction*u.frictionStatic*R*i&&(F=M,L=U.clamp(u.friction*P*i,-F,F));var D,k,I=X.cross(w,p),B=X.cross(b,p),N=m/(d.inverseMass+f.inverseMass+d.inverseInertia*I*I+f.inverseInertia*B*B);O*=N,L*=N,A<0&&A*A>Y._restingThresh*i?x.normalImpulse=0:(D=x.normalImpulse,x.normalImpulse=Math.min(x.normalImpulse+O,0),O=x.normalImpulse-D),C*C>Y._restingThreshTangent*i?x.tangentImpulse=0:(k=x.tangentImpulse,x.tangentImpulse=U.clamp(x.tangentImpulse+L,-F,F),L=x.tangentImpulse-k),n.x=p.x*O+g.x*L,n.y=p.y*O+g.y*L,d.isStatic||d.isSleeping||(d.positionPrev.x+=n.x*d.inverseMass,d.positionPrev.y+=n.y*d.inverseMass,d.anglePrev+=X.cross(w,n)*d.inverseInertia),f.isStatic||f.isSleeping||(f.positionPrev.x-=n.x*f.inverseMass,f.positionPrev.y-=n.y*f.inverseMass,f.anglePrev-=X.cross(b,n)*f.inverseInertia)}}}}},function(t,e,i){t.exports={BasePlugin:i(501),DefaultPlugins:i(182),PluginCache:i(23),PluginManager:i(380),ScenePlugin:i(1314)}},function(t,e,i){var n=i(501),s=i(0),r=i(20),o=new s({Extends:n,initialize:function(t,e){n.call(this,e),this.scene=t,this.systems=t.sys,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},function(t,e,i){var n=i(19),s=i(185),r=n(!1,r={Center:i(369),Events:i(93),Orientation:i(370),ScaleManager:i(381),ScaleModes:i(371),Zoom:i(372)},s.CENTER);r=n(!1,r,s.ORIENTATION),r=n(!1,r,s.SCALE_MODE),r=n(!1,r,s.ZOOM),t.exports=r},function(t,e,i){var n=i(132),s=i(19)(!1,s={Events:i(20),GetPhysicsPlugins:i(385),GetScenePlugins:i(386),SceneManager:i(383),ScenePlugin:i(1317),Settings:i(387),Systems:i(188)},n);t.exports=s},function(t,e,i){var n=i(17),s=i(0),a=i(20),h=i(2),r=i(23),o=new s({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(a.BOOT,this.boot,this),t.sys.events.on(a.START,this.pluginStart,this)},boot:function(){this.systems.events.once(a.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(a.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=h(t,"target",!1),i=this.manager.getScene(e);if(!e||!this.checkValidTransition(i))return!1;var n=h(t,"duration",1e3);this._elapsed=0,this._target=i,this._duration=n,this._willSleep=h(t,"sleep",!1),this._willRemove=h(t,"remove",!1);var s=h(t,"onUpdate",null);s&&(this._onUpdate=s,this._onUpdateScope=h(t,"onUpdateScope",this.scene));var r=h(t,"allowInput",!1);this.settings.transitionAllowInput=r;var o=i.sys.settings;return o.isTransition=!0,o.transitionFrom=this.scene,o.transitionDuration=n,o.transitionAllowInput=r,h(t,"moveAbove",!1)?this.manager.moveAbove(this.key,e):h(t,"moveBelow",!1)&&this.manager.moveBelow(this.key,e),i.sys.isSleeping()?i.sys.wake(h(t,"data")):this.manager.start(e,h(t,"data")),this.systems.events.emit(a.TRANSITION_OUT,i,n),this.systems.events.on(a.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=n(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(a.UPDATE,this.step,this),t.events.emit(a.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,n){return this.manager.add(t,e,i,n)},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 n=this.manager.getScene(e);return n&&n.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)},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(a.SHUTDOWN,this.shutdown,this),t.off(a.POST_UPDATE,this.step,this),t.off(a.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(a.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});r.register("ScenePlugin",o,"scenePlugin"),t.exports=o},function(t,e,i){t.exports={Events:i(404),List:i(136),Map:i(121),ProcessQueue:i(195),RTree:i(490),Set:i(140),Size:i(382)}},function(t,e,i){var n=i(19),s=i(1320),r=n(!1,r={CanvasTexture:i(389),Events:i(129),FilterMode:s,Frame:i(96),Parsers:i(391),Texture:i(190),TextureManager:i(388),TextureSource:i(390)},s);t.exports=r},function(t,e){t.exports={LINEAR:0,NEAREST:1}},function(t,e,i){t.exports={Components:i(148),Parsers:i(1351),Formats:i(33),ImageCollection:i(512),ParseToTilemap:i(238),Tile:i(75),Tilemap:i(521),TilemapCreator:i(1365),TilemapFactory:i(1366),Tileset:i(106),LayerData:i(104),MapData:i(105),ObjectLayer:i(515),DynamicTilemapLayer:i(522),StaticTilemapLayer:i(523)}},function(t,e,i){var p=i(24),g=i(53);t.exports=function(t,e,i,n,s,r,o,a){t<0&&(t=0),e<0&&(e=0),void 0===o&&(o=!0);for(var h=p(t,e,i,n,null,a),l=s-t,u=r-e,c=0;c=t&&l.index<=e&&u(l,i)}n&&c(0,0,s.width,s.height,s)}}},function(t,e,i){var a=i(65),h=i(53),l=i(152);t.exports=function(t,e,i,n){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var s=0;s=s.delay&&(n=s.elapsed-s.delay,s.elapsed=s.delay,!s.hasDispatched&&s.callback&&(s.hasDispatched=!0,s.callback.apply(s.callbackScope,s.args)),0>2],s+=o[(3&i[r])<<4|i[r+1]>>4],s+=o[(15&i[r+1])<<2|i[r+2]>>6],s+=o[63&i[r+2]];return n%3==2?s=s.substring(0,s.length-1)+"=":n%3==1&&(s=s.substring(0,s.length-2)+"=="),s}},function(t,e,i){t.exports={Clone:i(69),Extend:i(19),GetAdvancedValue:i(15),GetFastValue:i(2),GetMinMaxValue:i(1391),GetValue:i(6),HasAll:i(1392),HasAny:i(421),HasValue:i(113),IsPlainObject:i(7),Merge:i(133),MergeRight:i(1393),Pick:i(513),SetValue:i(444)}},function(t,e,i){var o=i(6),a=i(17);t.exports=function(t,e,i,n,s){void 0===s&&(s=i);var r=o(t,e,s);return a(r,i,n)}},function(t,e){t.exports=function(t,e){for(var i=0;ii[e][0])&&(e=n);return!S(P(t,e-1),P(t,e),P(t,e+1))&&(function(t){for(var e=[],i=t.length,n=0;n!==i;n++)e.push(t.pop());for(n=0;n!==i;n++)t[n]=e[n]}(t),!0)}};var u=[],c=[];function M(t,e){var i=e[0]-t[0],n=e[1]-t[1];return i*i+n*n}function P(t,e){var i=t.length;return t[e<0?e%i+i:e%i]}function O(t,e,i,n){for(var s=i;sn.deltaMax?n.deltaMax:e)/n.delta,n.delta=e),0!==n.timeScalePrev&&(r*=s.timeScale/n.timeScalePrev),0===s.timeScale&&(r=0),n.timeScalePrev=s.timeScale,n.correction=r,n.frameCounter+=1,1e3<=t-n.counterTimestamp&&(n.fps=n.frameCounter*((t-n.counterTimestamp)/1e3),n.counterTimestamp=t,n.frameCounter=0),T.update(i,e,r))},step:function(t,e){T.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!==u.get(this.localWorld,e.id,e.type)},getAllBodies:function(){return u.allBodies(this.localWorld)},getAllConstraints:function(){return u.allConstraints(this.localWorld)},getAllComposites:function(){return u.allComposites(this.localWorld)},postUpdate:function(){var t,e,i,n;this.drawDebug&&(t=this.debugConfig,e=this.engine,i=this.debugGraphic,n=u.allBodies(this.localWorld),this.debugGraphic.clear(),t.showBroadphase&&e.broadphase.controller&&this.renderGrid(e.broadphase,i,t.broadphaseColor,.5),t.showBounds&&this.renderBodyBounds(n,i,t.boundsColor,.5),(t.showBody||t.showStaticBody)&&this.renderBodies(n),t.showJoint&&this.renderJoints(),(t.showAxes||t.showAngleIndicator)&&this.renderBodyAxes(n,i,t.showAxes,t.angleColor,.5),t.showVelocity&&this.renderBodyVelocity(n,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,n){e.lineStyle(1,i,n);for(var s=y.keys(t.buckets),r=0;re.max.x?i=e.min.x-t.max.x:t.max.xe.max.y?n=e.min.y-t.max.y:t.max.y